From a095981e18cc37a8ecc7cd237cc22b9c10329264 Mon Sep 17 00:00:00 2001 From: Carlos Lopez Date: Wed, 12 Aug 2009 20:35:33 +0200 Subject: [PATCH] Remove ancient trunk folder from svn repository --- ETL/AUTHORS | 12 + ETL/ETL-config.in | 64 + ETL/ETL.kdevprj | 651 +++ ETL/ETL.pbproj/darco.mode1 | 1121 ++++ ETL/ETL.pbproj/darco.pbxuser | 859 ++++ ETL/ETL.pbproj/etl_profile.h | 40 + ETL/ETL.pbproj/frameworkfix.cpp | 8 + ETL/ETL.pbproj/project.pbxproj | 3111 +++++++++++ ETL/ETL.pc.in | 11 + ETL/ETL.prj | 169 + ETL/ETL/Makefile.am | 86 + ETL/ETL/_angle.h | 516 ++ ETL/ETL/_bezier.h | 992 ++++ ETL/ETL/_bezier_angle.h | 107 + ETL/ETL/_bit_rotate.h | 62 + ETL/ETL/_boxblur.h | 246 + ETL/ETL/_bspline.h | 237 + ETL/ETL/_calculus.h | 102 + ETL/ETL/_clock_base.h | 133 + ETL/ETL/_clock_gettimeofday.h | 136 + ETL/ETL/_clock_system.h | 147 + ETL/ETL/_clock_win32hpcount.h | 98 + ETL/ETL/_condition.h | 70 + ETL/ETL/_curve.h | 80 + ETL/ETL/_curve_func.h | 68 + ETL/ETL/_fastangle.h | 461 ++ ETL/ETL/_fastangle_tables.h | 4952 ++++++++++++++++++ ETL/ETL/_fixed.h | 643 +++ ETL/ETL/_gaussian.h | 315 ++ ETL/ETL/_handle.h | 826 +++ ETL/ETL/_hermite.h | 174 + ETL/ETL/_misc.h | 103 + ETL/ETL/_mutex_null.h | 71 + ETL/ETL/_mutex_pthreads.h | 116 + ETL/ETL/_mutex_pthreads_simple.h | 64 + ETL/ETL/_mutex_win32.h | 82 + ETL/ETL/_pen.h | 405 ++ ETL/ETL/_random.h | 138 + ETL/ETL/_rect.h | 171 + ETL/ETL/_ref_count.h | 158 + ETL/ETL/_rwlock.h | 93 + ETL/ETL/_smach.h | 598 +++ ETL/ETL/_smart_ptr.h | 363 ++ ETL/ETL/_status.h | 69 + ETL/ETL/_stringf.h | 409 ++ ETL/ETL/_surface.h | 649 +++ ETL/ETL/_thread.h | 515 ++ ETL/ETL/_trivial.h | 164 + ETL/ETL/_value.h | 237 + ETL/ETL/angle | 48 + ETL/ETL/bezier | 40 + ETL/ETL/boxblur | 36 + ETL/ETL/calculus | 36 + ETL/ETL/clock | 104 + ETL/ETL/etl_config.h | 66 + ETL/ETL/fastangle | 36 + ETL/ETL/fixed | 36 + ETL/ETL/gaussian | 36 + ETL/ETL/handle | 49 + ETL/ETL/hermite | 36 + ETL/ETL/ipc | 41 + ETL/ETL/misc | 36 + ETL/ETL/mutex | 42 + ETL/ETL/pen | 36 + ETL/ETL/random | 36 + ETL/ETL/rect | 36 + ETL/ETL/ref_count | 36 + ETL/ETL/smach | 36 + ETL/ETL/smart_ptr | 36 + ETL/ETL/spline | 37 + ETL/ETL/status | 38 + ETL/ETL/stringf | 36 + ETL/ETL/surface | 36 + ETL/ETL/thread | 36 + ETL/ETL/trivial | 36 + ETL/ETL/value | 36 + ETL/Makefile.am | 116 + ETL/NEWS | 50 + ETL/README | 37 + ETL/config/pkg-support/ETL-devel.info | 14 + ETL/config/pkg-support/devel-resources/License.rtf | 10 + ETL/config/pkg-support/devel-resources/ReadMe.rtf | 7 + ETL/config/pkg-support/devel-resources/Welcome.rtf | 6 + ETL/config/pkg-support/devel-resources/install.sh | 48 + ETL/configure.ac | 94 + ETL/doxygen.cfg.in | 1220 +++++ ETL/m4/ETL.m4 | 69 + ETL/m4/cxx_macros.m4 | 88 + ETL/m4/subs.m4 | 244 + ETL/test/Makefile.am | 64 + ETL/test/angle.cpp | 528 ++ ETL/test/benchmark.cpp | 475 ++ ETL/test/clock.cpp | 79 + ETL/test/fixed.cpp | 294 ++ ETL/test/handle.cpp | 504 ++ ETL/test/hermite.cpp | 248 + ETL/test/pen.cpp | 548 ++ ETL/test/random.cpp | 48 + ETL/test/smach.cpp | 207 + ETL/test/smart_ptr.cpp | 319 ++ ETL/test/spline.cpp | 99 + ETL/test/stringf.cpp | 152 + ETL/test/surface.cpp | 221 + ETL/test/value.cpp | 119 + ETL/trunk/AUTHORS | 12 - ETL/trunk/ETL-config.in | 64 - ETL/trunk/ETL.kdevprj | 651 --- ETL/trunk/ETL.pbproj/darco.mode1 | 1121 ---- ETL/trunk/ETL.pbproj/darco.pbxuser | 859 ---- ETL/trunk/ETL.pbproj/etl_profile.h | 40 - ETL/trunk/ETL.pbproj/frameworkfix.cpp | 8 - ETL/trunk/ETL.pbproj/project.pbxproj | 3111 ----------- ETL/trunk/ETL.pc.in | 11 - ETL/trunk/ETL.prj | 169 - ETL/trunk/ETL/Makefile.am | 86 - ETL/trunk/ETL/_angle.h | 516 -- ETL/trunk/ETL/_bezier.h | 992 ---- ETL/trunk/ETL/_bezier_angle.h | 107 - ETL/trunk/ETL/_bit_rotate.h | 62 - ETL/trunk/ETL/_boxblur.h | 246 - ETL/trunk/ETL/_bspline.h | 237 - ETL/trunk/ETL/_calculus.h | 102 - ETL/trunk/ETL/_clock_base.h | 133 - ETL/trunk/ETL/_clock_gettimeofday.h | 136 - ETL/trunk/ETL/_clock_system.h | 147 - ETL/trunk/ETL/_clock_win32hpcount.h | 98 - ETL/trunk/ETL/_condition.h | 70 - ETL/trunk/ETL/_curve.h | 80 - ETL/trunk/ETL/_curve_func.h | 68 - ETL/trunk/ETL/_fastangle.h | 461 -- ETL/trunk/ETL/_fastangle_tables.h | 4952 ------------------ ETL/trunk/ETL/_fixed.h | 643 --- ETL/trunk/ETL/_gaussian.h | 315 -- ETL/trunk/ETL/_handle.h | 826 --- ETL/trunk/ETL/_hermite.h | 174 - ETL/trunk/ETL/_misc.h | 103 - ETL/trunk/ETL/_mutex_null.h | 71 - ETL/trunk/ETL/_mutex_pthreads.h | 116 - ETL/trunk/ETL/_mutex_pthreads_simple.h | 64 - ETL/trunk/ETL/_mutex_win32.h | 82 - ETL/trunk/ETL/_pen.h | 405 -- ETL/trunk/ETL/_random.h | 138 - ETL/trunk/ETL/_rect.h | 171 - ETL/trunk/ETL/_ref_count.h | 158 - ETL/trunk/ETL/_rwlock.h | 93 - ETL/trunk/ETL/_smach.h | 598 --- ETL/trunk/ETL/_smart_ptr.h | 363 -- ETL/trunk/ETL/_status.h | 69 - ETL/trunk/ETL/_stringf.h | 409 -- ETL/trunk/ETL/_surface.h | 649 --- ETL/trunk/ETL/_thread.h | 515 -- ETL/trunk/ETL/_trivial.h | 164 - ETL/trunk/ETL/_value.h | 237 - ETL/trunk/ETL/angle | 48 - ETL/trunk/ETL/bezier | 40 - ETL/trunk/ETL/boxblur | 36 - ETL/trunk/ETL/calculus | 36 - ETL/trunk/ETL/clock | 104 - ETL/trunk/ETL/etl_config.h | 66 - ETL/trunk/ETL/fastangle | 36 - ETL/trunk/ETL/fixed | 36 - ETL/trunk/ETL/gaussian | 36 - ETL/trunk/ETL/handle | 49 - ETL/trunk/ETL/hermite | 36 - ETL/trunk/ETL/ipc | 41 - ETL/trunk/ETL/misc | 36 - ETL/trunk/ETL/mutex | 42 - ETL/trunk/ETL/pen | 36 - ETL/trunk/ETL/random | 36 - ETL/trunk/ETL/rect | 36 - ETL/trunk/ETL/ref_count | 36 - ETL/trunk/ETL/smach | 36 - ETL/trunk/ETL/smart_ptr | 36 - ETL/trunk/ETL/spline | 37 - ETL/trunk/ETL/status | 38 - ETL/trunk/ETL/stringf | 36 - ETL/trunk/ETL/surface | 36 - ETL/trunk/ETL/thread | 36 - ETL/trunk/ETL/trivial | 36 - ETL/trunk/ETL/value | 36 - ETL/trunk/Makefile.am | 116 - ETL/trunk/NEWS | 50 - ETL/trunk/README | 37 - ETL/trunk/config/pkg-support/ETL-devel.info | 14 - .../config/pkg-support/devel-resources/License.rtf | 10 - .../config/pkg-support/devel-resources/ReadMe.rtf | 7 - .../config/pkg-support/devel-resources/Welcome.rtf | 6 - .../config/pkg-support/devel-resources/install.sh | 48 - ETL/trunk/configure.ac | 94 - ETL/trunk/doxygen.cfg.in | 1220 ----- ETL/trunk/m4/ETL.m4 | 69 - ETL/trunk/m4/cxx_macros.m4 | 88 - ETL/trunk/m4/subs.m4 | 244 - ETL/trunk/test/Makefile.am | 64 - ETL/trunk/test/angle.cpp | 528 -- ETL/trunk/test/benchmark.cpp | 475 -- ETL/trunk/test/clock.cpp | 79 - ETL/trunk/test/fixed.cpp | 294 -- ETL/trunk/test/handle.cpp | 504 -- ETL/trunk/test/hermite.cpp | 248 - ETL/trunk/test/pen.cpp | 548 -- ETL/trunk/test/random.cpp | 48 - ETL/trunk/test/smach.cpp | 207 - ETL/trunk/test/smart_ptr.cpp | 319 -- ETL/trunk/test/spline.cpp | 99 - ETL/trunk/test/stringf.cpp | 152 - ETL/trunk/test/surface.cpp | 221 - ETL/trunk/test/value.cpp | 119 - autobuild/Makefile | 92 + autobuild/trunk/Makefile | 92 - gtkmm-osx/Makefile | 602 +++ gtkmm-osx/Packages | 1 + gtkmm-osx/PkgResource/License.txt | 340 ++ gtkmm-osx/PkgResource/ReadMe.txt | 3 + gtkmm-osx/PkgResource/postflight | 40 + gtkmm-osx/gtkmm-meta.mpkg/Contents/Info.plist | 89 + gtkmm-osx/gtkmm-meta.mpkg/Contents/PkgInfo | 1 + .../Resources/English.lproj/Description.plist | 10 + .../Resources/English.lproj/background.tif | Bin 0 -> 40132 bytes .../Resources/English.lproj/gtkmm-meta.info | 17 + .../Contents/Resources/package_version | 2 + gtkmm-osx/jpeg-6b/README | 385 ++ gtkmm-osx/jpeg-6b/ansi2knr.1 | 36 + gtkmm-osx/jpeg-6b/ansi2knr.c | 693 +++ gtkmm-osx/jpeg-6b/cderror.h | 132 + gtkmm-osx/jpeg-6b/cdjpeg.c | 181 + gtkmm-osx/jpeg-6b/cdjpeg.h | 184 + gtkmm-osx/jpeg-6b/change.log | 217 + gtkmm-osx/jpeg-6b/cjpeg.1 | 292 ++ gtkmm-osx/jpeg-6b/cjpeg.c | 606 +++ gtkmm-osx/jpeg-6b/ckconfig.c | 402 ++ gtkmm-osx/jpeg-6b/coderules.doc | 118 + gtkmm-osx/jpeg-6b/config.guess | 1371 +++++ gtkmm-osx/jpeg-6b/config.sub | 954 ++++ gtkmm-osx/jpeg-6b/configure | 2011 ++++++++ gtkmm-osx/jpeg-6b/djpeg.1 | 253 + gtkmm-osx/jpeg-6b/djpeg.c | 616 +++ gtkmm-osx/jpeg-6b/example.c | 433 ++ gtkmm-osx/jpeg-6b/filelist.doc | 210 + gtkmm-osx/jpeg-6b/install-sh | 250 + gtkmm-osx/jpeg-6b/install.doc | 1063 ++++ gtkmm-osx/jpeg-6b/jcapimin.c | 280 + gtkmm-osx/jpeg-6b/jcapistd.c | 161 + gtkmm-osx/jpeg-6b/jccoefct.c | 449 ++ gtkmm-osx/jpeg-6b/jccolor.c | 459 ++ gtkmm-osx/jpeg-6b/jcdctmgr.c | 387 ++ gtkmm-osx/jpeg-6b/jchuff.c | 909 ++++ gtkmm-osx/jpeg-6b/jchuff.h | 47 + gtkmm-osx/jpeg-6b/jcinit.c | 72 + gtkmm-osx/jpeg-6b/jcmainct.c | 293 ++ gtkmm-osx/jpeg-6b/jcmarker.c | 664 +++ gtkmm-osx/jpeg-6b/jcmaster.c | 590 +++ gtkmm-osx/jpeg-6b/jcomapi.c | 106 + gtkmm-osx/jpeg-6b/jconfig.bcc | 48 + gtkmm-osx/jpeg-6b/jconfig.cfg | 44 + gtkmm-osx/jpeg-6b/jconfig.dj | 38 + gtkmm-osx/jpeg-6b/jconfig.doc | 155 + gtkmm-osx/jpeg-6b/jconfig.mac | 43 + gtkmm-osx/jpeg-6b/jconfig.manx | 43 + gtkmm-osx/jpeg-6b/jconfig.mc6 | 52 + gtkmm-osx/jpeg-6b/jconfig.sas | 43 + gtkmm-osx/jpeg-6b/jconfig.st | 42 + gtkmm-osx/jpeg-6b/jconfig.vc | 45 + gtkmm-osx/jpeg-6b/jconfig.vms | 37 + gtkmm-osx/jpeg-6b/jconfig.wat | 38 + gtkmm-osx/jpeg-6b/jcparam.c | 610 +++ gtkmm-osx/jpeg-6b/jcphuff.c | 833 +++ gtkmm-osx/jpeg-6b/jcprepct.c | 354 ++ gtkmm-osx/jpeg-6b/jcsample.c | 519 ++ gtkmm-osx/jpeg-6b/jctrans.c | 388 ++ gtkmm-osx/jpeg-6b/jdapimin.c | 395 ++ gtkmm-osx/jpeg-6b/jdapistd.c | 275 + gtkmm-osx/jpeg-6b/jdatadst.c | 151 + gtkmm-osx/jpeg-6b/jdatasrc.c | 212 + gtkmm-osx/jpeg-6b/jdcoefct.c | 736 +++ gtkmm-osx/jpeg-6b/jdcolor.c | 396 ++ gtkmm-osx/jpeg-6b/jdct.h | 176 + gtkmm-osx/jpeg-6b/jddctmgr.c | 269 + gtkmm-osx/jpeg-6b/jdhuff.c | 651 +++ gtkmm-osx/jpeg-6b/jdhuff.h | 201 + gtkmm-osx/jpeg-6b/jdinput.c | 381 ++ gtkmm-osx/jpeg-6b/jdmainct.c | 512 ++ gtkmm-osx/jpeg-6b/jdmarker.c | 1360 +++++ gtkmm-osx/jpeg-6b/jdmaster.c | 557 ++ gtkmm-osx/jpeg-6b/jdmerge.c | 400 ++ gtkmm-osx/jpeg-6b/jdphuff.c | 668 +++ gtkmm-osx/jpeg-6b/jdpostct.c | 290 ++ gtkmm-osx/jpeg-6b/jdsample.c | 478 ++ gtkmm-osx/jpeg-6b/jdtrans.c | 143 + gtkmm-osx/jpeg-6b/jerror.c | 252 + gtkmm-osx/jpeg-6b/jerror.h | 291 ++ gtkmm-osx/jpeg-6b/jfdctflt.c | 168 + gtkmm-osx/jpeg-6b/jfdctfst.c | 224 + gtkmm-osx/jpeg-6b/jfdctint.c | 283 + gtkmm-osx/jpeg-6b/jidctflt.c | 242 + gtkmm-osx/jpeg-6b/jidctfst.c | 368 ++ gtkmm-osx/jpeg-6b/jidctint.c | 389 ++ gtkmm-osx/jpeg-6b/jidctred.c | 398 ++ gtkmm-osx/jpeg-6b/jinclude.h | 91 + gtkmm-osx/jpeg-6b/jmemansi.c | 167 + gtkmm-osx/jpeg-6b/jmemdos.c | 638 +++ gtkmm-osx/jpeg-6b/jmemdosa.asm | 379 ++ gtkmm-osx/jpeg-6b/jmemmac.c | 289 ++ gtkmm-osx/jpeg-6b/jmemmgr.c | 1118 ++++ gtkmm-osx/jpeg-6b/jmemname.c | 276 + gtkmm-osx/jpeg-6b/jmemnobs.c | 109 + gtkmm-osx/jpeg-6b/jmemsys.h | 198 + gtkmm-osx/jpeg-6b/jmorecfg.h | 363 ++ gtkmm-osx/jpeg-6b/jpegint.h | 392 ++ gtkmm-osx/jpeg-6b/jpeglib.h | 1096 ++++ gtkmm-osx/jpeg-6b/jpegtran.1 | 238 + gtkmm-osx/jpeg-6b/jpegtran.c | 504 ++ gtkmm-osx/jpeg-6b/jquant1.c | 856 ++++ gtkmm-osx/jpeg-6b/jquant2.c | 1310 +++++ gtkmm-osx/jpeg-6b/jutils.c | 179 + gtkmm-osx/jpeg-6b/jversion.h | 14 + gtkmm-osx/jpeg-6b/libjpeg.doc | 3006 +++++++++++ gtkmm-osx/jpeg-6b/ltconfig | 1512 ++++++ gtkmm-osx/jpeg-6b/ltmain.sh | 2453 +++++++++ gtkmm-osx/jpeg-6b/makcjpeg.st | 38 + gtkmm-osx/jpeg-6b/makdjpeg.st | 38 + gtkmm-osx/jpeg-6b/makeapps.ds | 828 +++ gtkmm-osx/jpeg-6b/makefile.ansi | 214 + gtkmm-osx/jpeg-6b/makefile.bcc | 285 ++ gtkmm-osx/jpeg-6b/makefile.cfg | 319 ++ gtkmm-osx/jpeg-6b/makefile.dj | 220 + gtkmm-osx/jpeg-6b/makefile.manx | 214 + gtkmm-osx/jpeg-6b/makefile.mc6 | 249 + gtkmm-osx/jpeg-6b/makefile.mms | 218 + gtkmm-osx/jpeg-6b/makefile.sas | 252 + gtkmm-osx/jpeg-6b/makefile.unix | 228 + gtkmm-osx/jpeg-6b/makefile.vc | 211 + gtkmm-osx/jpeg-6b/makefile.vms | 142 + gtkmm-osx/jpeg-6b/makefile.wat | 233 + gtkmm-osx/jpeg-6b/makelib.ds | 1046 ++++ gtkmm-osx/jpeg-6b/makeproj.mac | 213 + gtkmm-osx/jpeg-6b/makljpeg.st | 70 + gtkmm-osx/jpeg-6b/maktjpeg.st | 32 + gtkmm-osx/jpeg-6b/makvms.opt | 4 + gtkmm-osx/jpeg-6b/rdbmp.c | 439 ++ gtkmm-osx/jpeg-6b/rdcolmap.c | 253 + gtkmm-osx/jpeg-6b/rdgif.c | 38 + gtkmm-osx/jpeg-6b/rdjpgcom.1 | 54 + gtkmm-osx/jpeg-6b/rdjpgcom.c | 496 ++ gtkmm-osx/jpeg-6b/rdppm.c | 458 ++ gtkmm-osx/jpeg-6b/rdrle.c | 387 ++ gtkmm-osx/jpeg-6b/rdswitch.c | 332 ++ gtkmm-osx/jpeg-6b/rdtarga.c | 500 ++ gtkmm-osx/jpeg-6b/structure.doc | 948 ++++ gtkmm-osx/jpeg-6b/testimg.bmp | Bin 0 -> 35050 bytes gtkmm-osx/jpeg-6b/testimg.jpg | Bin 0 -> 5756 bytes gtkmm-osx/jpeg-6b/testimg.ppm | 4 + gtkmm-osx/jpeg-6b/testimgp.jpg | Bin 0 -> 5645 bytes gtkmm-osx/jpeg-6b/testorig.jpg | Bin 0 -> 5770 bytes gtkmm-osx/jpeg-6b/testprog.jpg | Bin 0 -> 5655 bytes gtkmm-osx/jpeg-6b/transupp.c | 928 ++++ gtkmm-osx/jpeg-6b/transupp.h | 135 + gtkmm-osx/jpeg-6b/usage.doc | 562 ++ gtkmm-osx/jpeg-6b/wizard.doc | 211 + gtkmm-osx/jpeg-6b/wrbmp.c | 442 ++ gtkmm-osx/jpeg-6b/wrgif.c | 399 ++ gtkmm-osx/jpeg-6b/wrjpgcom.1 | 103 + gtkmm-osx/jpeg-6b/wrjpgcom.c | 583 +++ gtkmm-osx/jpeg-6b/wrppm.c | 268 + gtkmm-osx/jpeg-6b/wrrle.c | 305 ++ gtkmm-osx/jpeg-6b/wrtarga.c | 253 + gtkmm-osx/libpng-1.2.5/ANNOUNCE | 29 + gtkmm-osx/libpng-1.2.5/CHANGES | 1184 +++++ gtkmm-osx/libpng-1.2.5/INSTALL | 151 + gtkmm-osx/libpng-1.2.5/KNOWNBUG | 11 + gtkmm-osx/libpng-1.2.5/LICENSE | 102 + gtkmm-osx/libpng-1.2.5/README | 269 + gtkmm-osx/libpng-1.2.5/TODO | 24 + gtkmm-osx/libpng-1.2.5/Y2KINFO | 55 + gtkmm-osx/libpng-1.2.5/configure | 6 + gtkmm-osx/libpng-1.2.5/contrib/gregbook/LICENSE | 26 + .../libpng-1.2.5/contrib/gregbook/Makefile.sgi | 104 + .../libpng-1.2.5/contrib/gregbook/Makefile.unx | 104 + .../libpng-1.2.5/contrib/gregbook/Makefile.w32 | 112 + gtkmm-osx/libpng-1.2.5/contrib/gregbook/README | 185 + .../libpng-1.2.5/contrib/gregbook/makevms.com | 132 + gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng.c | 280 + gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng.h | 64 + gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng2.c | 624 +++ gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng2.h | 91 + gtkmm-osx/libpng-1.2.5/contrib/gregbook/rpng-win.c | 642 +++ gtkmm-osx/libpng-1.2.5/contrib/gregbook/rpng-x.c | 858 ++++ .../libpng-1.2.5/contrib/gregbook/rpng2-win.c | 1166 +++++ gtkmm-osx/libpng-1.2.5/contrib/gregbook/rpng2-x.c | 1408 +++++ gtkmm-osx/libpng-1.2.5/contrib/gregbook/toucan.png | Bin 0 -> 12901 bytes gtkmm-osx/libpng-1.2.5/contrib/gregbook/wpng.c | 816 +++ gtkmm-osx/libpng-1.2.5/contrib/gregbook/writepng.c | 368 ++ gtkmm-osx/libpng-1.2.5/contrib/gregbook/writepng.h | 109 + gtkmm-osx/libpng-1.2.5/contrib/msvctest/README.txt | 22 + .../libpng-1.2.5/contrib/msvctest/msvctest.dsp | 247 + .../libpng-1.2.5/contrib/msvctest/msvctest.dsw | 29 + gtkmm-osx/libpng-1.2.5/contrib/pngminus/README | 153 + .../libpng-1.2.5/contrib/pngminus/makefile.std | 65 + .../libpng-1.2.5/contrib/pngminus/makefile.tc3 | 38 + .../libpng-1.2.5/contrib/pngminus/makevms.com | 92 + .../libpng-1.2.5/contrib/pngminus/png2pnm.bat | 41 + gtkmm-osx/libpng-1.2.5/contrib/pngminus/png2pnm.c | 430 ++ gtkmm-osx/libpng-1.2.5/contrib/pngminus/png2pnm.sh | 41 + .../libpng-1.2.5/contrib/pngminus/pngminus.bat | 4 + .../libpng-1.2.5/contrib/pngminus/pngminus.sh | 4 + .../libpng-1.2.5/contrib/pngminus/pnm2png.bat | 41 + gtkmm-osx/libpng-1.2.5/contrib/pngminus/pnm2png.c | 533 ++ gtkmm-osx/libpng-1.2.5/contrib/pngminus/pnm2png.sh | 41 + gtkmm-osx/libpng-1.2.5/contrib/pngsuite/README | 85 + .../libpng-1.2.5/contrib/pngsuite/basn0g01.png | Bin 0 -> 164 bytes .../libpng-1.2.5/contrib/pngsuite/basn0g02.png | Bin 0 -> 104 bytes .../libpng-1.2.5/contrib/pngsuite/basn0g04.png | Bin 0 -> 145 bytes .../libpng-1.2.5/contrib/pngsuite/basn0g08.png | Bin 0 -> 138 bytes .../libpng-1.2.5/contrib/pngsuite/basn0g16.png | Bin 0 -> 167 bytes .../libpng-1.2.5/contrib/pngsuite/basn2c08.png | Bin 0 -> 145 bytes .../libpng-1.2.5/contrib/pngsuite/basn2c16.png | Bin 0 -> 302 bytes .../libpng-1.2.5/contrib/pngsuite/basn3p01.png | Bin 0 -> 112 bytes .../libpng-1.2.5/contrib/pngsuite/basn3p02.png | Bin 0 -> 146 bytes .../libpng-1.2.5/contrib/pngsuite/basn3p04.png | Bin 0 -> 216 bytes .../libpng-1.2.5/contrib/pngsuite/basn3p08.png | Bin 0 -> 1286 bytes .../libpng-1.2.5/contrib/pngsuite/basn4a08.png | Bin 0 -> 126 bytes .../libpng-1.2.5/contrib/pngsuite/basn4a16.png | Bin 0 -> 2206 bytes .../libpng-1.2.5/contrib/pngsuite/basn6a08.png | Bin 0 -> 184 bytes .../libpng-1.2.5/contrib/pngsuite/basn6a16.png | Bin 0 -> 3435 bytes gtkmm-osx/libpng-1.2.5/contrib/visupng/PngFile.c | 439 ++ gtkmm-osx/libpng-1.2.5/contrib/visupng/PngFile.h | 27 + gtkmm-osx/libpng-1.2.5/contrib/visupng/README.txt | 58 + gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.c | 961 ++++ .../libpng-1.2.5/contrib/visupng/VisualPng.dsp | 223 + .../libpng-1.2.5/contrib/visupng/VisualPng.dsw | 29 + .../libpng-1.2.5/contrib/visupng/VisualPng.ico | Bin 0 -> 766 bytes .../libpng-1.2.5/contrib/visupng/VisualPng.png | Bin 0 -> 208 bytes .../libpng-1.2.5/contrib/visupng/VisualPng.rc | 152 + gtkmm-osx/libpng-1.2.5/contrib/visupng/cexcept.h | 244 + gtkmm-osx/libpng-1.2.5/contrib/visupng/resource.h | 23 + gtkmm-osx/libpng-1.2.5/example.c | 804 +++ gtkmm-osx/libpng-1.2.5/libpng-config | 121 + gtkmm-osx/libpng-1.2.5/libpng.3 | 3958 ++++++++++++++ gtkmm-osx/libpng-1.2.5/libpng.pc | 11 + gtkmm-osx/libpng-1.2.5/libpng.txt | 2905 +++++++++++ gtkmm-osx/libpng-1.2.5/libpngpf.3 | 552 ++ gtkmm-osx/libpng-1.2.5/makefile.macosx | 198 + gtkmm-osx/libpng-1.2.5/png.5 | 60 + gtkmm-osx/libpng-1.2.5/png.c | 805 +++ gtkmm-osx/libpng-1.2.5/png.h | 3283 ++++++++++++ gtkmm-osx/libpng-1.2.5/pngasmrd.h | 11 + gtkmm-osx/libpng-1.2.5/pngbar.jpg | Bin 0 -> 2498 bytes gtkmm-osx/libpng-1.2.5/pngbar.png | Bin 0 -> 2399 bytes gtkmm-osx/libpng-1.2.5/pngconf.h | 1348 +++++ gtkmm-osx/libpng-1.2.5/pngerror.c | 291 ++ gtkmm-osx/libpng-1.2.5/pnggccrd.c | 5397 ++++++++++++++++++++ gtkmm-osx/libpng-1.2.5/pngget.c | 927 ++++ gtkmm-osx/libpng-1.2.5/pngmem.c | 566 ++ gtkmm-osx/libpng-1.2.5/pngnow.png | Bin 0 -> 2018 bytes gtkmm-osx/libpng-1.2.5/pngpread.c | 1543 ++++++ gtkmm-osx/libpng-1.2.5/pngread.c | 1424 ++++++ gtkmm-osx/libpng-1.2.5/pngrio.c | 161 + gtkmm-osx/libpng-1.2.5/pngrtran.c | 4175 +++++++++++++++ gtkmm-osx/libpng-1.2.5/pngrutil.c | 3101 +++++++++++ gtkmm-osx/libpng-1.2.5/pngset.c | 1160 +++++ gtkmm-osx/libpng-1.2.5/pngtest.c | 1541 ++++++ gtkmm-osx/libpng-1.2.5/pngtest.png | Bin 0 -> 8574 bytes gtkmm-osx/libpng-1.2.5/pngtrans.c | 640 +++ gtkmm-osx/libpng-1.2.5/pngvcrd.c | 3845 ++++++++++++++ gtkmm-osx/libpng-1.2.5/pngwio.c | 228 + gtkmm-osx/libpng-1.2.5/pngwrite.c | 1450 ++++++ gtkmm-osx/libpng-1.2.5/pngwtran.c | 563 ++ gtkmm-osx/libpng-1.2.5/pngwutil.c | 2675 ++++++++++ .../libpng-1.2.5/projects/beos/x86-shared.proj | Bin 0 -> 17031 bytes .../libpng-1.2.5/projects/beos/x86-shared.txt | 22 + .../libpng-1.2.5/projects/beos/x86-static.proj | Bin 0 -> 16706 bytes .../libpng-1.2.5/projects/beos/x86-static.txt | 22 + gtkmm-osx/libpng-1.2.5/projects/borland/libpng.bpf | 22 + gtkmm-osx/libpng-1.2.5/projects/borland/libpng.bpg | 25 + gtkmm-osx/libpng-1.2.5/projects/borland/libpng.bpr | 157 + gtkmm-osx/libpng-1.2.5/projects/borland/libpng.cpp | 28 + .../projects/borland/libpng.readme.txt | 19 + .../libpng-1.2.5/projects/borland/libpngstat.bpf | 22 + .../libpng-1.2.5/projects/borland/libpngstat.bpr | 109 + .../libpng-1.2.5/projects/borland/zlib+libpng.bpg | 33 + gtkmm-osx/libpng-1.2.5/projects/borland/zlib.bpf | 20 + gtkmm-osx/libpng-1.2.5/projects/borland/zlib.bpg | 25 + gtkmm-osx/libpng-1.2.5/projects/borland/zlib.bpr | 147 + gtkmm-osx/libpng-1.2.5/projects/borland/zlib.cpp | 29 + .../libpng-1.2.5/projects/borland/zlibstat.bpf | 20 + .../libpng-1.2.5/projects/borland/zlibstat.bpr | 131 + gtkmm-osx/libpng-1.2.5/projects/msvc/README.txt | 57 + gtkmm-osx/libpng-1.2.5/projects/msvc/libpng.dsp | 439 ++ gtkmm-osx/libpng-1.2.5/projects/msvc/libpng.dsw | 44 + gtkmm-osx/libpng-1.2.5/projects/msvc/png.rc | 100 + gtkmm-osx/libpng-1.2.5/projects/msvc/png32ms.def | 220 + gtkmm-osx/libpng-1.2.5/projects/msvc/zlib.def | 45 + gtkmm-osx/libpng-1.2.5/projects/msvc/zlib.dsp | 441 ++ gtkmm-osx/libpng-1.2.5/projects/netware.txt | 6 + gtkmm-osx/libpng-1.2.5/projects/wince.txt | 6 + gtkmm-osx/libpng-1.2.5/scripts/SCOPTIONS.ppc | 7 + gtkmm-osx/libpng-1.2.5/scripts/descrip.mms | 52 + .../libpng-1.2.5/scripts/libpng-config-body.in | 96 + .../libpng-1.2.5/scripts/libpng-config-head.in | 21 + gtkmm-osx/libpng-1.2.5/scripts/libpng.icc | 44 + gtkmm-osx/libpng-1.2.5/scripts/libpng.pc.in | 11 + gtkmm-osx/libpng-1.2.5/scripts/makefile.32sunu | 224 + gtkmm-osx/libpng-1.2.5/scripts/makefile.64sunu | 224 + gtkmm-osx/libpng-1.2.5/scripts/makefile.acorn | 51 + gtkmm-osx/libpng-1.2.5/scripts/makefile.aix | 104 + gtkmm-osx/libpng-1.2.5/scripts/makefile.amiga | 48 + gtkmm-osx/libpng-1.2.5/scripts/makefile.atari | 51 + gtkmm-osx/libpng-1.2.5/scripts/makefile.bc32 | 151 + gtkmm-osx/libpng-1.2.5/scripts/makefile.bd32 | 76 + gtkmm-osx/libpng-1.2.5/scripts/makefile.beos | 199 + gtkmm-osx/libpng-1.2.5/scripts/makefile.bor | 162 + gtkmm-osx/libpng-1.2.5/scripts/makefile.cygwin | 305 ++ gtkmm-osx/libpng-1.2.5/scripts/makefile.darwin | 205 + gtkmm-osx/libpng-1.2.5/scripts/makefile.dec | 185 + gtkmm-osx/libpng-1.2.5/scripts/makefile.dj2 | 55 + gtkmm-osx/libpng-1.2.5/scripts/makefile.freebsd | 48 + gtkmm-osx/libpng-1.2.5/scripts/makefile.gcc | 66 + gtkmm-osx/libpng-1.2.5/scripts/makefile.gcmmx | 249 + gtkmm-osx/libpng-1.2.5/scripts/makefile.hpgcc | 217 + gtkmm-osx/libpng-1.2.5/scripts/makefile.hpux | 202 + gtkmm-osx/libpng-1.2.5/scripts/makefile.ibmc | 71 + gtkmm-osx/libpng-1.2.5/scripts/makefile.intel | 114 + gtkmm-osx/libpng-1.2.5/scripts/makefile.knr | 99 + gtkmm-osx/libpng-1.2.5/scripts/makefile.linux | 223 + gtkmm-osx/libpng-1.2.5/scripts/makefile.macosx | 197 + gtkmm-osx/libpng-1.2.5/scripts/makefile.mips | 83 + gtkmm-osx/libpng-1.2.5/scripts/makefile.msc | 86 + gtkmm-osx/libpng-1.2.5/scripts/makefile.ne12bsd | 44 + gtkmm-osx/libpng-1.2.5/scripts/makefile.netbsd | 44 + gtkmm-osx/libpng-1.2.5/scripts/makefile.openbsd | 72 + gtkmm-osx/libpng-1.2.5/scripts/makefile.os2 | 69 + gtkmm-osx/libpng-1.2.5/scripts/makefile.sco | 201 + gtkmm-osx/libpng-1.2.5/scripts/makefile.sggcc | 211 + gtkmm-osx/libpng-1.2.5/scripts/makefile.sgi | 217 + gtkmm-osx/libpng-1.2.5/scripts/makefile.so9 | 223 + gtkmm-osx/libpng-1.2.5/scripts/makefile.solaris | 220 + gtkmm-osx/libpng-1.2.5/scripts/makefile.std | 89 + gtkmm-osx/libpng-1.2.5/scripts/makefile.sunos | 93 + gtkmm-osx/libpng-1.2.5/scripts/makefile.tc3 | 89 + gtkmm-osx/libpng-1.2.5/scripts/makefile.vcawin32 | 94 + gtkmm-osx/libpng-1.2.5/scripts/makefile.vcwin32 | 87 + gtkmm-osx/libpng-1.2.5/scripts/makefile.watcom | 109 + gtkmm-osx/libpng-1.2.5/scripts/makevms.com | 144 + gtkmm-osx/libpng-1.2.5/scripts/pngdef.pas | 795 +++ gtkmm-osx/libpng-1.2.5/scripts/pngos2.def | 241 + gtkmm-osx/libpng-1.2.5/scripts/smakefile.ppc | 30 + gtkmm-osx/package | 292 ++ gtkmm-osx/package.info | 14 + gtkmm-osx/trunk/Makefile | 602 --- gtkmm-osx/trunk/Packages | 1 - gtkmm-osx/trunk/PkgResource/License.txt | 340 -- gtkmm-osx/trunk/PkgResource/ReadMe.txt | 3 - gtkmm-osx/trunk/PkgResource/postflight | 40 - .../trunk/gtkmm-meta.mpkg/Contents/Info.plist | 89 - gtkmm-osx/trunk/gtkmm-meta.mpkg/Contents/PkgInfo | 1 - .../Resources/English.lproj/Description.plist | 10 - .../Resources/English.lproj/background.tif | Bin 40132 -> 0 bytes .../Resources/English.lproj/gtkmm-meta.info | 17 - .../Contents/Resources/package_version | 2 - gtkmm-osx/trunk/jpeg-6b/README | 385 -- gtkmm-osx/trunk/jpeg-6b/ansi2knr.1 | 36 - gtkmm-osx/trunk/jpeg-6b/ansi2knr.c | 693 --- gtkmm-osx/trunk/jpeg-6b/cderror.h | 132 - gtkmm-osx/trunk/jpeg-6b/cdjpeg.c | 181 - gtkmm-osx/trunk/jpeg-6b/cdjpeg.h | 184 - gtkmm-osx/trunk/jpeg-6b/change.log | 217 - gtkmm-osx/trunk/jpeg-6b/cjpeg.1 | 292 -- gtkmm-osx/trunk/jpeg-6b/cjpeg.c | 606 --- gtkmm-osx/trunk/jpeg-6b/ckconfig.c | 402 -- gtkmm-osx/trunk/jpeg-6b/coderules.doc | 118 - gtkmm-osx/trunk/jpeg-6b/config.guess | 1371 ----- gtkmm-osx/trunk/jpeg-6b/config.sub | 954 ---- gtkmm-osx/trunk/jpeg-6b/configure | 2011 -------- gtkmm-osx/trunk/jpeg-6b/djpeg.1 | 253 - gtkmm-osx/trunk/jpeg-6b/djpeg.c | 616 --- gtkmm-osx/trunk/jpeg-6b/example.c | 433 -- gtkmm-osx/trunk/jpeg-6b/filelist.doc | 210 - gtkmm-osx/trunk/jpeg-6b/install-sh | 250 - gtkmm-osx/trunk/jpeg-6b/install.doc | 1063 ---- gtkmm-osx/trunk/jpeg-6b/jcapimin.c | 280 - gtkmm-osx/trunk/jpeg-6b/jcapistd.c | 161 - gtkmm-osx/trunk/jpeg-6b/jccoefct.c | 449 -- gtkmm-osx/trunk/jpeg-6b/jccolor.c | 459 -- gtkmm-osx/trunk/jpeg-6b/jcdctmgr.c | 387 -- gtkmm-osx/trunk/jpeg-6b/jchuff.c | 909 ---- gtkmm-osx/trunk/jpeg-6b/jchuff.h | 47 - gtkmm-osx/trunk/jpeg-6b/jcinit.c | 72 - gtkmm-osx/trunk/jpeg-6b/jcmainct.c | 293 -- gtkmm-osx/trunk/jpeg-6b/jcmarker.c | 664 --- gtkmm-osx/trunk/jpeg-6b/jcmaster.c | 590 --- gtkmm-osx/trunk/jpeg-6b/jcomapi.c | 106 - gtkmm-osx/trunk/jpeg-6b/jconfig.bcc | 48 - gtkmm-osx/trunk/jpeg-6b/jconfig.cfg | 44 - gtkmm-osx/trunk/jpeg-6b/jconfig.dj | 38 - gtkmm-osx/trunk/jpeg-6b/jconfig.doc | 155 - gtkmm-osx/trunk/jpeg-6b/jconfig.mac | 43 - gtkmm-osx/trunk/jpeg-6b/jconfig.manx | 43 - gtkmm-osx/trunk/jpeg-6b/jconfig.mc6 | 52 - gtkmm-osx/trunk/jpeg-6b/jconfig.sas | 43 - gtkmm-osx/trunk/jpeg-6b/jconfig.st | 42 - gtkmm-osx/trunk/jpeg-6b/jconfig.vc | 45 - gtkmm-osx/trunk/jpeg-6b/jconfig.vms | 37 - gtkmm-osx/trunk/jpeg-6b/jconfig.wat | 38 - gtkmm-osx/trunk/jpeg-6b/jcparam.c | 610 --- gtkmm-osx/trunk/jpeg-6b/jcphuff.c | 833 --- gtkmm-osx/trunk/jpeg-6b/jcprepct.c | 354 -- gtkmm-osx/trunk/jpeg-6b/jcsample.c | 519 -- gtkmm-osx/trunk/jpeg-6b/jctrans.c | 388 -- gtkmm-osx/trunk/jpeg-6b/jdapimin.c | 395 -- gtkmm-osx/trunk/jpeg-6b/jdapistd.c | 275 - gtkmm-osx/trunk/jpeg-6b/jdatadst.c | 151 - gtkmm-osx/trunk/jpeg-6b/jdatasrc.c | 212 - gtkmm-osx/trunk/jpeg-6b/jdcoefct.c | 736 --- gtkmm-osx/trunk/jpeg-6b/jdcolor.c | 396 -- gtkmm-osx/trunk/jpeg-6b/jdct.h | 176 - gtkmm-osx/trunk/jpeg-6b/jddctmgr.c | 269 - gtkmm-osx/trunk/jpeg-6b/jdhuff.c | 651 --- gtkmm-osx/trunk/jpeg-6b/jdhuff.h | 201 - gtkmm-osx/trunk/jpeg-6b/jdinput.c | 381 -- gtkmm-osx/trunk/jpeg-6b/jdmainct.c | 512 -- gtkmm-osx/trunk/jpeg-6b/jdmarker.c | 1360 ----- gtkmm-osx/trunk/jpeg-6b/jdmaster.c | 557 -- gtkmm-osx/trunk/jpeg-6b/jdmerge.c | 400 -- gtkmm-osx/trunk/jpeg-6b/jdphuff.c | 668 --- gtkmm-osx/trunk/jpeg-6b/jdpostct.c | 290 -- gtkmm-osx/trunk/jpeg-6b/jdsample.c | 478 -- gtkmm-osx/trunk/jpeg-6b/jdtrans.c | 143 - gtkmm-osx/trunk/jpeg-6b/jerror.c | 252 - gtkmm-osx/trunk/jpeg-6b/jerror.h | 291 -- gtkmm-osx/trunk/jpeg-6b/jfdctflt.c | 168 - gtkmm-osx/trunk/jpeg-6b/jfdctfst.c | 224 - gtkmm-osx/trunk/jpeg-6b/jfdctint.c | 283 - gtkmm-osx/trunk/jpeg-6b/jidctflt.c | 242 - gtkmm-osx/trunk/jpeg-6b/jidctfst.c | 368 -- gtkmm-osx/trunk/jpeg-6b/jidctint.c | 389 -- gtkmm-osx/trunk/jpeg-6b/jidctred.c | 398 -- gtkmm-osx/trunk/jpeg-6b/jinclude.h | 91 - gtkmm-osx/trunk/jpeg-6b/jmemansi.c | 167 - gtkmm-osx/trunk/jpeg-6b/jmemdos.c | 638 --- gtkmm-osx/trunk/jpeg-6b/jmemdosa.asm | 379 -- gtkmm-osx/trunk/jpeg-6b/jmemmac.c | 289 -- gtkmm-osx/trunk/jpeg-6b/jmemmgr.c | 1118 ---- gtkmm-osx/trunk/jpeg-6b/jmemname.c | 276 - gtkmm-osx/trunk/jpeg-6b/jmemnobs.c | 109 - gtkmm-osx/trunk/jpeg-6b/jmemsys.h | 198 - gtkmm-osx/trunk/jpeg-6b/jmorecfg.h | 363 -- gtkmm-osx/trunk/jpeg-6b/jpegint.h | 392 -- gtkmm-osx/trunk/jpeg-6b/jpeglib.h | 1096 ---- gtkmm-osx/trunk/jpeg-6b/jpegtran.1 | 238 - gtkmm-osx/trunk/jpeg-6b/jpegtran.c | 504 -- gtkmm-osx/trunk/jpeg-6b/jquant1.c | 856 ---- gtkmm-osx/trunk/jpeg-6b/jquant2.c | 1310 ----- gtkmm-osx/trunk/jpeg-6b/jutils.c | 179 - gtkmm-osx/trunk/jpeg-6b/jversion.h | 14 - gtkmm-osx/trunk/jpeg-6b/libjpeg.doc | 3006 ----------- gtkmm-osx/trunk/jpeg-6b/ltconfig | 1512 ------ gtkmm-osx/trunk/jpeg-6b/ltmain.sh | 2453 --------- gtkmm-osx/trunk/jpeg-6b/makcjpeg.st | 38 - gtkmm-osx/trunk/jpeg-6b/makdjpeg.st | 38 - gtkmm-osx/trunk/jpeg-6b/makeapps.ds | 828 --- gtkmm-osx/trunk/jpeg-6b/makefile.ansi | 214 - gtkmm-osx/trunk/jpeg-6b/makefile.bcc | 285 -- gtkmm-osx/trunk/jpeg-6b/makefile.cfg | 319 -- gtkmm-osx/trunk/jpeg-6b/makefile.dj | 220 - gtkmm-osx/trunk/jpeg-6b/makefile.manx | 214 - gtkmm-osx/trunk/jpeg-6b/makefile.mc6 | 249 - gtkmm-osx/trunk/jpeg-6b/makefile.mms | 218 - gtkmm-osx/trunk/jpeg-6b/makefile.sas | 252 - gtkmm-osx/trunk/jpeg-6b/makefile.unix | 228 - gtkmm-osx/trunk/jpeg-6b/makefile.vc | 211 - gtkmm-osx/trunk/jpeg-6b/makefile.vms | 142 - gtkmm-osx/trunk/jpeg-6b/makefile.wat | 233 - gtkmm-osx/trunk/jpeg-6b/makelib.ds | 1046 ---- gtkmm-osx/trunk/jpeg-6b/makeproj.mac | 213 - gtkmm-osx/trunk/jpeg-6b/makljpeg.st | 70 - gtkmm-osx/trunk/jpeg-6b/maktjpeg.st | 32 - gtkmm-osx/trunk/jpeg-6b/makvms.opt | 4 - gtkmm-osx/trunk/jpeg-6b/rdbmp.c | 439 -- gtkmm-osx/trunk/jpeg-6b/rdcolmap.c | 253 - gtkmm-osx/trunk/jpeg-6b/rdgif.c | 38 - gtkmm-osx/trunk/jpeg-6b/rdjpgcom.1 | 54 - gtkmm-osx/trunk/jpeg-6b/rdjpgcom.c | 496 -- gtkmm-osx/trunk/jpeg-6b/rdppm.c | 458 -- gtkmm-osx/trunk/jpeg-6b/rdrle.c | 387 -- gtkmm-osx/trunk/jpeg-6b/rdswitch.c | 332 -- gtkmm-osx/trunk/jpeg-6b/rdtarga.c | 500 -- gtkmm-osx/trunk/jpeg-6b/structure.doc | 948 ---- gtkmm-osx/trunk/jpeg-6b/testimg.bmp | Bin 35050 -> 0 bytes gtkmm-osx/trunk/jpeg-6b/testimg.jpg | Bin 5756 -> 0 bytes gtkmm-osx/trunk/jpeg-6b/testimg.ppm | 4 - gtkmm-osx/trunk/jpeg-6b/testimgp.jpg | Bin 5645 -> 0 bytes gtkmm-osx/trunk/jpeg-6b/testorig.jpg | Bin 5770 -> 0 bytes gtkmm-osx/trunk/jpeg-6b/testprog.jpg | Bin 5655 -> 0 bytes gtkmm-osx/trunk/jpeg-6b/transupp.c | 928 ---- gtkmm-osx/trunk/jpeg-6b/transupp.h | 135 - gtkmm-osx/trunk/jpeg-6b/usage.doc | 562 -- gtkmm-osx/trunk/jpeg-6b/wizard.doc | 211 - gtkmm-osx/trunk/jpeg-6b/wrbmp.c | 442 -- gtkmm-osx/trunk/jpeg-6b/wrgif.c | 399 -- gtkmm-osx/trunk/jpeg-6b/wrjpgcom.1 | 103 - gtkmm-osx/trunk/jpeg-6b/wrjpgcom.c | 583 --- gtkmm-osx/trunk/jpeg-6b/wrppm.c | 268 - gtkmm-osx/trunk/jpeg-6b/wrrle.c | 305 -- gtkmm-osx/trunk/jpeg-6b/wrtarga.c | 253 - gtkmm-osx/trunk/libpng-1.2.5/ANNOUNCE | 29 - gtkmm-osx/trunk/libpng-1.2.5/CHANGES | 1184 ----- gtkmm-osx/trunk/libpng-1.2.5/INSTALL | 151 - gtkmm-osx/trunk/libpng-1.2.5/KNOWNBUG | 11 - gtkmm-osx/trunk/libpng-1.2.5/LICENSE | 102 - gtkmm-osx/trunk/libpng-1.2.5/README | 269 - gtkmm-osx/trunk/libpng-1.2.5/TODO | 24 - gtkmm-osx/trunk/libpng-1.2.5/Y2KINFO | 55 - gtkmm-osx/trunk/libpng-1.2.5/configure | 6 - .../trunk/libpng-1.2.5/contrib/gregbook/LICENSE | 26 - .../libpng-1.2.5/contrib/gregbook/Makefile.sgi | 104 - .../libpng-1.2.5/contrib/gregbook/Makefile.unx | 104 - .../libpng-1.2.5/contrib/gregbook/Makefile.w32 | 112 - .../trunk/libpng-1.2.5/contrib/gregbook/README | 185 - .../libpng-1.2.5/contrib/gregbook/makevms.com | 132 - .../trunk/libpng-1.2.5/contrib/gregbook/readpng.c | 280 - .../trunk/libpng-1.2.5/contrib/gregbook/readpng.h | 64 - .../trunk/libpng-1.2.5/contrib/gregbook/readpng2.c | 624 --- .../trunk/libpng-1.2.5/contrib/gregbook/readpng2.h | 91 - .../trunk/libpng-1.2.5/contrib/gregbook/rpng-win.c | 642 --- .../trunk/libpng-1.2.5/contrib/gregbook/rpng-x.c | 858 ---- .../libpng-1.2.5/contrib/gregbook/rpng2-win.c | 1166 ----- .../trunk/libpng-1.2.5/contrib/gregbook/rpng2-x.c | 1408 ----- .../trunk/libpng-1.2.5/contrib/gregbook/toucan.png | Bin 12901 -> 0 bytes .../trunk/libpng-1.2.5/contrib/gregbook/wpng.c | 816 --- .../trunk/libpng-1.2.5/contrib/gregbook/writepng.c | 368 -- .../trunk/libpng-1.2.5/contrib/gregbook/writepng.h | 109 - .../trunk/libpng-1.2.5/contrib/msvctest/README.txt | 22 - .../libpng-1.2.5/contrib/msvctest/msvctest.dsp | 247 - .../libpng-1.2.5/contrib/msvctest/msvctest.dsw | 29 - .../trunk/libpng-1.2.5/contrib/pngminus/README | 153 - .../libpng-1.2.5/contrib/pngminus/makefile.std | 65 - .../libpng-1.2.5/contrib/pngminus/makefile.tc3 | 38 - .../libpng-1.2.5/contrib/pngminus/makevms.com | 92 - .../libpng-1.2.5/contrib/pngminus/png2pnm.bat | 41 - .../trunk/libpng-1.2.5/contrib/pngminus/png2pnm.c | 430 -- .../trunk/libpng-1.2.5/contrib/pngminus/png2pnm.sh | 41 - .../libpng-1.2.5/contrib/pngminus/pngminus.bat | 4 - .../libpng-1.2.5/contrib/pngminus/pngminus.sh | 4 - .../libpng-1.2.5/contrib/pngminus/pnm2png.bat | 41 - .../trunk/libpng-1.2.5/contrib/pngminus/pnm2png.c | 533 -- .../trunk/libpng-1.2.5/contrib/pngminus/pnm2png.sh | 41 - .../trunk/libpng-1.2.5/contrib/pngsuite/README | 85 - .../libpng-1.2.5/contrib/pngsuite/basn0g01.png | Bin 164 -> 0 bytes .../libpng-1.2.5/contrib/pngsuite/basn0g02.png | Bin 104 -> 0 bytes .../libpng-1.2.5/contrib/pngsuite/basn0g04.png | Bin 145 -> 0 bytes .../libpng-1.2.5/contrib/pngsuite/basn0g08.png | Bin 138 -> 0 bytes .../libpng-1.2.5/contrib/pngsuite/basn0g16.png | Bin 167 -> 0 bytes .../libpng-1.2.5/contrib/pngsuite/basn2c08.png | Bin 145 -> 0 bytes .../libpng-1.2.5/contrib/pngsuite/basn2c16.png | Bin 302 -> 0 bytes .../libpng-1.2.5/contrib/pngsuite/basn3p01.png | Bin 112 -> 0 bytes .../libpng-1.2.5/contrib/pngsuite/basn3p02.png | Bin 146 -> 0 bytes .../libpng-1.2.5/contrib/pngsuite/basn3p04.png | Bin 216 -> 0 bytes .../libpng-1.2.5/contrib/pngsuite/basn3p08.png | Bin 1286 -> 0 bytes .../libpng-1.2.5/contrib/pngsuite/basn4a08.png | Bin 126 -> 0 bytes .../libpng-1.2.5/contrib/pngsuite/basn4a16.png | Bin 2206 -> 0 bytes .../libpng-1.2.5/contrib/pngsuite/basn6a08.png | Bin 184 -> 0 bytes .../libpng-1.2.5/contrib/pngsuite/basn6a16.png | Bin 3435 -> 0 bytes .../trunk/libpng-1.2.5/contrib/visupng/PngFile.c | 439 -- .../trunk/libpng-1.2.5/contrib/visupng/PngFile.h | 27 - .../trunk/libpng-1.2.5/contrib/visupng/README.txt | 58 - .../trunk/libpng-1.2.5/contrib/visupng/VisualPng.c | 961 ---- .../libpng-1.2.5/contrib/visupng/VisualPng.dsp | 223 - .../libpng-1.2.5/contrib/visupng/VisualPng.dsw | 29 - .../libpng-1.2.5/contrib/visupng/VisualPng.ico | Bin 766 -> 0 bytes .../libpng-1.2.5/contrib/visupng/VisualPng.png | Bin 208 -> 0 bytes .../libpng-1.2.5/contrib/visupng/VisualPng.rc | 152 - .../trunk/libpng-1.2.5/contrib/visupng/cexcept.h | 244 - .../trunk/libpng-1.2.5/contrib/visupng/resource.h | 23 - gtkmm-osx/trunk/libpng-1.2.5/example.c | 804 --- gtkmm-osx/trunk/libpng-1.2.5/libpng-config | 121 - gtkmm-osx/trunk/libpng-1.2.5/libpng.3 | 3958 -------------- gtkmm-osx/trunk/libpng-1.2.5/libpng.pc | 11 - gtkmm-osx/trunk/libpng-1.2.5/libpng.txt | 2905 ----------- gtkmm-osx/trunk/libpng-1.2.5/libpngpf.3 | 552 -- gtkmm-osx/trunk/libpng-1.2.5/makefile.macosx | 198 - gtkmm-osx/trunk/libpng-1.2.5/png.5 | 60 - gtkmm-osx/trunk/libpng-1.2.5/png.c | 805 --- gtkmm-osx/trunk/libpng-1.2.5/png.h | 3283 ------------ gtkmm-osx/trunk/libpng-1.2.5/pngasmrd.h | 11 - gtkmm-osx/trunk/libpng-1.2.5/pngbar.jpg | Bin 2498 -> 0 bytes gtkmm-osx/trunk/libpng-1.2.5/pngbar.png | Bin 2399 -> 0 bytes gtkmm-osx/trunk/libpng-1.2.5/pngconf.h | 1348 ----- gtkmm-osx/trunk/libpng-1.2.5/pngerror.c | 291 -- gtkmm-osx/trunk/libpng-1.2.5/pnggccrd.c | 5397 -------------------- gtkmm-osx/trunk/libpng-1.2.5/pngget.c | 927 ---- gtkmm-osx/trunk/libpng-1.2.5/pngmem.c | 566 -- gtkmm-osx/trunk/libpng-1.2.5/pngnow.png | Bin 2018 -> 0 bytes gtkmm-osx/trunk/libpng-1.2.5/pngpread.c | 1543 ------ gtkmm-osx/trunk/libpng-1.2.5/pngread.c | 1424 ------ gtkmm-osx/trunk/libpng-1.2.5/pngrio.c | 161 - gtkmm-osx/trunk/libpng-1.2.5/pngrtran.c | 4175 --------------- gtkmm-osx/trunk/libpng-1.2.5/pngrutil.c | 3101 ----------- gtkmm-osx/trunk/libpng-1.2.5/pngset.c | 1160 ----- gtkmm-osx/trunk/libpng-1.2.5/pngtest.c | 1541 ------ gtkmm-osx/trunk/libpng-1.2.5/pngtest.png | Bin 8574 -> 0 bytes gtkmm-osx/trunk/libpng-1.2.5/pngtrans.c | 640 --- gtkmm-osx/trunk/libpng-1.2.5/pngvcrd.c | 3845 -------------- gtkmm-osx/trunk/libpng-1.2.5/pngwio.c | 228 - gtkmm-osx/trunk/libpng-1.2.5/pngwrite.c | 1450 ------ gtkmm-osx/trunk/libpng-1.2.5/pngwtran.c | 563 -- gtkmm-osx/trunk/libpng-1.2.5/pngwutil.c | 2675 ---------- .../libpng-1.2.5/projects/beos/x86-shared.proj | Bin 17031 -> 0 bytes .../libpng-1.2.5/projects/beos/x86-shared.txt | 22 - .../libpng-1.2.5/projects/beos/x86-static.proj | Bin 16706 -> 0 bytes .../libpng-1.2.5/projects/beos/x86-static.txt | 22 - .../trunk/libpng-1.2.5/projects/borland/libpng.bpf | 22 - .../trunk/libpng-1.2.5/projects/borland/libpng.bpg | 25 - .../trunk/libpng-1.2.5/projects/borland/libpng.bpr | 157 - .../trunk/libpng-1.2.5/projects/borland/libpng.cpp | 28 - .../projects/borland/libpng.readme.txt | 19 - .../libpng-1.2.5/projects/borland/libpngstat.bpf | 22 - .../libpng-1.2.5/projects/borland/libpngstat.bpr | 109 - .../libpng-1.2.5/projects/borland/zlib+libpng.bpg | 33 - .../trunk/libpng-1.2.5/projects/borland/zlib.bpf | 20 - .../trunk/libpng-1.2.5/projects/borland/zlib.bpg | 25 - .../trunk/libpng-1.2.5/projects/borland/zlib.bpr | 147 - .../trunk/libpng-1.2.5/projects/borland/zlib.cpp | 29 - .../libpng-1.2.5/projects/borland/zlibstat.bpf | 20 - .../libpng-1.2.5/projects/borland/zlibstat.bpr | 131 - .../trunk/libpng-1.2.5/projects/msvc/README.txt | 57 - .../trunk/libpng-1.2.5/projects/msvc/libpng.dsp | 439 -- .../trunk/libpng-1.2.5/projects/msvc/libpng.dsw | 44 - gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/png.rc | 100 - .../trunk/libpng-1.2.5/projects/msvc/png32ms.def | 220 - .../trunk/libpng-1.2.5/projects/msvc/zlib.def | 45 - .../trunk/libpng-1.2.5/projects/msvc/zlib.dsp | 441 -- gtkmm-osx/trunk/libpng-1.2.5/projects/netware.txt | 6 - gtkmm-osx/trunk/libpng-1.2.5/projects/wince.txt | 6 - gtkmm-osx/trunk/libpng-1.2.5/scripts/SCOPTIONS.ppc | 7 - gtkmm-osx/trunk/libpng-1.2.5/scripts/descrip.mms | 52 - .../libpng-1.2.5/scripts/libpng-config-body.in | 96 - .../libpng-1.2.5/scripts/libpng-config-head.in | 21 - gtkmm-osx/trunk/libpng-1.2.5/scripts/libpng.icc | 44 - gtkmm-osx/trunk/libpng-1.2.5/scripts/libpng.pc.in | 11 - .../trunk/libpng-1.2.5/scripts/makefile.32sunu | 224 - .../trunk/libpng-1.2.5/scripts/makefile.64sunu | 224 - .../trunk/libpng-1.2.5/scripts/makefile.acorn | 51 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.aix | 104 - .../trunk/libpng-1.2.5/scripts/makefile.amiga | 48 - .../trunk/libpng-1.2.5/scripts/makefile.atari | 51 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.bc32 | 151 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.bd32 | 76 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.beos | 199 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.bor | 162 - .../trunk/libpng-1.2.5/scripts/makefile.cygwin | 305 -- .../trunk/libpng-1.2.5/scripts/makefile.darwin | 205 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.dec | 185 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.dj2 | 55 - .../trunk/libpng-1.2.5/scripts/makefile.freebsd | 48 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.gcc | 66 - .../trunk/libpng-1.2.5/scripts/makefile.gcmmx | 249 - .../trunk/libpng-1.2.5/scripts/makefile.hpgcc | 217 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.hpux | 202 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.ibmc | 71 - .../trunk/libpng-1.2.5/scripts/makefile.intel | 114 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.knr | 99 - .../trunk/libpng-1.2.5/scripts/makefile.linux | 223 - .../trunk/libpng-1.2.5/scripts/makefile.macosx | 197 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.mips | 83 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.msc | 86 - .../trunk/libpng-1.2.5/scripts/makefile.ne12bsd | 44 - .../trunk/libpng-1.2.5/scripts/makefile.netbsd | 44 - .../trunk/libpng-1.2.5/scripts/makefile.openbsd | 72 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.os2 | 69 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.sco | 201 - .../trunk/libpng-1.2.5/scripts/makefile.sggcc | 211 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.sgi | 217 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.so9 | 223 - .../trunk/libpng-1.2.5/scripts/makefile.solaris | 220 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.std | 89 - .../trunk/libpng-1.2.5/scripts/makefile.sunos | 93 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.tc3 | 89 - .../trunk/libpng-1.2.5/scripts/makefile.vcawin32 | 94 - .../trunk/libpng-1.2.5/scripts/makefile.vcwin32 | 87 - .../trunk/libpng-1.2.5/scripts/makefile.watcom | 109 - gtkmm-osx/trunk/libpng-1.2.5/scripts/makevms.com | 144 - gtkmm-osx/trunk/libpng-1.2.5/scripts/pngdef.pas | 795 --- gtkmm-osx/trunk/libpng-1.2.5/scripts/pngos2.def | 241 - gtkmm-osx/trunk/libpng-1.2.5/scripts/smakefile.ppc | 30 - gtkmm-osx/trunk/package | 292 -- gtkmm-osx/trunk/package.info | 14 - synfig-core/AUTHORS | 25 + synfig-core/ChangeLog.old | 136 + synfig-core/Makefile.am | 188 + synfig-core/NEWS | 127 + synfig-core/README | 51 + synfig-core/TODO | 38 + synfig-core/build_tools/Makefile.am | 8 + synfig-core/build_tools/autorevision.sh | 107 + synfig-core/config/ltmain.patch | 17 + synfig-core/config/package | 292 ++ synfig-core/configure.ac | 734 +++ synfig-core/doc/hw-gfx-mapping.txt | 75 + synfig-core/doxygen.cfg.in | 1220 +++++ synfig-core/examples/Makefile.am | 36 + synfig-core/examples/about_dialog.sifz | Bin 0 -> 3668 bytes synfig-core/examples/backdrop.sifz | Bin 0 -> 79099 bytes synfig-core/examples/business_card.sifz | Bin 0 -> 2662 bytes synfig-core/examples/candy.sifz | Bin 0 -> 1316 bytes synfig-core/examples/cells.sifz | Bin 0 -> 1417 bytes synfig-core/examples/eye.sifz | Bin 0 -> 127203 bytes synfig-core/examples/eyes.sifz | Bin 0 -> 1753 bytes synfig-core/examples/gamma.sifz | Bin 0 -> 740 bytes synfig-core/examples/gradient.sifz | Bin 0 -> 2343 bytes synfig-core/examples/headmo.sifz | Bin 0 -> 4692 bytes synfig-core/examples/installer-logo.sifz | Bin 0 -> 5214 bytes synfig-core/examples/japan.sifz | Bin 0 -> 548 bytes synfig-core/examples/logo.sifz | Bin 0 -> 5077 bytes synfig-core/examples/macwolfen.sifz | Bin 0 -> 254858 bytes synfig-core/examples/mandelbrot.sifz | Bin 0 -> 1353 bytes synfig-core/examples/newjulia.sifz | Bin 0 -> 1534 bytes synfig-core/examples/newjulia2.sifz | Bin 0 -> 1250 bytes synfig-core/examples/noise.sifz | Bin 0 -> 699 bytes synfig-core/examples/pirates.sifz | Bin 0 -> 654072 bytes synfig-core/examples/preambletaffy.sifz | Bin 0 -> 1030 bytes synfig-core/examples/prologue_kid.sifz | Bin 0 -> 82709 bytes synfig-core/examples/sparkle.sifz | Bin 0 -> 1786 bytes synfig-core/examples/splat.sifz | Bin 0 -> 860 bytes synfig-core/examples/star.sifz | Bin 0 -> 2179 bytes synfig-core/examples/walk/Makefile.am | 10 + synfig-core/examples/walk/animation.lst | 53 + synfig-core/examples/walk/frame_01.jpg | Bin 0 -> 5934 bytes synfig-core/examples/walk/frame_02.jpg | Bin 0 -> 5118 bytes synfig-core/examples/walk/frame_03.jpg | Bin 0 -> 5842 bytes synfig-core/examples/walk/frame_04.jpg | Bin 0 -> 4891 bytes synfig-core/examples/walk/walk.sifz | Bin 0 -> 10574 bytes synfig-core/examples/wallpaper.sifz | Bin 0 -> 2154 bytes synfig-core/examples/warpcube.sifz | Bin 0 -> 3153 bytes synfig-core/examples/warptext.sifz | Bin 0 -> 690 bytes synfig-core/examples/z_depth_test.sifz | Bin 0 -> 1330 bytes synfig-core/m4/ETL.m4 | 75 + synfig-core/m4/cxx_macros.m4 | 88 + synfig-core/m4/freetype2.m4 | 146 + synfig-core/m4/libxml++.m4 | 23 + synfig-core/m4/libxml.m4 | 389 ++ synfig-core/m4/pkgconfig.m4 | 57 + synfig-core/m4/subs.m4 | 246 + synfig-core/m4/synfig.m4 | 51 + synfig-core/macosxbuild.sh | 59 + .../pkg-info/macosx/core-resources/License.txt | 515 ++ .../pkg-info/macosx/core-resources/ReadMe.txt | 1 + .../pkg-info/macosx/core-resources/Welcome.txt | 1 + .../pkg-info/macosx/core-resources/install.sh | 58 + .../pkg-info/macosx/core-resources/upgrade.sh | 58 + synfig-core/pkg-info/macosx/synfig-core.info.in | 14 + synfig-core/po/Makevars | 7 + synfig-core/po/POTFILES.in | 367 ++ synfig-core/po/es.po | 3145 ++++++++++++ synfig-core/po/fr.po | 3152 ++++++++++++ synfig-core/po/ru.po | 3151 ++++++++++++ synfig-core/src/Makefile.am | 13 + synfig-core/src/modules/Makefile.am | 60 + synfig-core/src/modules/example/Makefile.am | 34 + synfig-core/src/modules/example/filledrect.cpp | 586 +++ synfig-core/src/modules/example/filledrect.h | 81 + synfig-core/src/modules/example/main.cpp | 61 + synfig-core/src/modules/example/metaballs.cpp | 252 + synfig-core/src/modules/example/metaballs.h | 81 + synfig-core/src/modules/example/simplecircle.cpp | 187 + synfig-core/src/modules/example/simplecircle.h | 73 + synfig-core/src/modules/lyr_freetype/Makefile.am | 49 + .../src/modules/lyr_freetype/lyr_freetype.cpp | 919 ++++ .../src/modules/lyr_freetype/lyr_freetype.h | 167 + .../src/modules/lyr_freetype/lyr_freetype.nsh | 21 + synfig-core/src/modules/lyr_freetype/main.cpp | 91 + .../src/modules/lyr_freetype/unlyr_freetype.nsh | 8 + synfig-core/src/modules/lyr_std/Makefile.am | 71 + synfig-core/src/modules/lyr_std/bevel.cpp | 409 ++ synfig-core/src/modules/lyr_std/bevel.h | 81 + synfig-core/src/modules/lyr_std/booleancurve.cpp | 121 + synfig-core/src/modules/lyr_std/booleancurve.h | 75 + synfig-core/src/modules/lyr_std/clamp.cpp | 207 + synfig-core/src/modules/lyr_std/clamp.h | 75 + synfig-core/src/modules/lyr_std/curvewarp.cpp | 591 +++ synfig-core/src/modules/lyr_std/curvewarp.h | 80 + synfig-core/src/modules/lyr_std/import.cpp | 238 + synfig-core/src/modules/lyr_std/import.h | 72 + synfig-core/src/modules/lyr_std/insideout.cpp | 146 + synfig-core/src/modules/lyr_std/insideout.h | 69 + synfig-core/src/modules/lyr_std/julia.cpp | 365 ++ synfig-core/src/modules/lyr_std/julia.h | 90 + synfig-core/src/modules/lyr_std/lyr_std.nsh | 21 + synfig-core/src/modules/lyr_std/main.cpp | 104 + synfig-core/src/modules/lyr_std/mandelbrot.cpp | 385 ++ synfig-core/src/modules/lyr_std/mandelbrot.h | 86 + synfig-core/src/modules/lyr_std/rotate.cpp | 337 ++ synfig-core/src/modules/lyr_std/rotate.h | 74 + synfig-core/src/modules/lyr_std/shade.cpp | 424 ++ synfig-core/src/modules/lyr_std/shade.h | 69 + synfig-core/src/modules/lyr_std/sphere_distort.cpp | 578 +++ synfig-core/src/modules/lyr_std/sphere_distort.h | 92 + synfig-core/src/modules/lyr_std/stretch.cpp | 192 + synfig-core/src/modules/lyr_std/stretch.h | 75 + synfig-core/src/modules/lyr_std/supersample.cpp | 237 + synfig-core/src/modules/lyr_std/supersample.h | 66 + synfig-core/src/modules/lyr_std/timeloop.cpp | 252 + synfig-core/src/modules/lyr_std/timeloop.h | 78 + synfig-core/src/modules/lyr_std/translate.cpp | 161 + synfig-core/src/modules/lyr_std/translate.h | 71 + synfig-core/src/modules/lyr_std/twirl.cpp | 241 + synfig-core/src/modules/lyr_std/twirl.h | 84 + synfig-core/src/modules/lyr_std/unlyr_std.nsh | 8 + synfig-core/src/modules/lyr_std/warp.cpp | 851 +++ synfig-core/src/modules/lyr_std/warp.h | 91 + synfig-core/src/modules/lyr_std/xorpattern.cpp | 153 + synfig-core/src/modules/lyr_std/xorpattern.h | 69 + synfig-core/src/modules/lyr_std/zoom.cpp | 162 + synfig-core/src/modules/lyr_std/zoom.h | 68 + synfig-core/src/modules/mod_bmp/Makefile.am | 37 + synfig-core/src/modules/mod_bmp/main.cpp | 58 + synfig-core/src/modules/mod_bmp/mod_bmp.nsh | 21 + synfig-core/src/modules/mod_bmp/mptr_bmp.cpp | 235 + synfig-core/src/modules/mod_bmp/mptr_bmp.h | 59 + synfig-core/src/modules/mod_bmp/trgt_bmp.cpp | 265 + synfig-core/src/modules/mod_bmp/trgt_bmp.h | 67 + synfig-core/src/modules/mod_bmp/unmod_bmp.nsh | 8 + synfig-core/src/modules/mod_dv/Makefile.am | 39 + synfig-core/src/modules/mod_dv/main.cpp | 54 + synfig-core/src/modules/mod_dv/mod_dv.nsh | 21 + synfig-core/src/modules/mod_dv/trgt_dv.cpp | 290 ++ synfig-core/src/modules/mod_dv/trgt_dv.h | 71 + synfig-core/src/modules/mod_dv/unmod_dv.nsh | 8 + synfig-core/src/modules/mod_ffmpeg/Makefile.am | 41 + synfig-core/src/modules/mod_ffmpeg/main.cpp | 70 + synfig-core/src/modules/mod_ffmpeg/mod_ffmpeg.nsh | 21 + synfig-core/src/modules/mod_ffmpeg/mptr_ffmpeg.cpp | 274 + synfig-core/src/modules/mod_ffmpeg/mptr_ffmpeg.h | 77 + synfig-core/src/modules/mod_ffmpeg/trgt_ffmpeg.cpp | 270 + synfig-core/src/modules/mod_ffmpeg/trgt_ffmpeg.h | 70 + .../src/modules/mod_ffmpeg/unmod_ffmpeg.nsh | 8 + synfig-core/src/modules/mod_filter/Makefile.am | 46 + synfig-core/src/modules/mod_filter/blur.cpp | 268 + synfig-core/src/modules/mod_filter/blur.h | 68 + .../src/modules/mod_filter/colorcorrect.cpp | 258 + synfig-core/src/modules/mod_filter/colorcorrect.h | 79 + synfig-core/src/modules/mod_filter/halftone.cpp | 168 + synfig-core/src/modules/mod_filter/halftone.h | 62 + synfig-core/src/modules/mod_filter/halftone2.cpp | 245 + synfig-core/src/modules/mod_filter/halftone2.h | 74 + synfig-core/src/modules/mod_filter/halftone3.cpp | 408 ++ synfig-core/src/modules/mod_filter/halftone3.h | 79 + synfig-core/src/modules/mod_filter/lumakey.cpp | 168 + synfig-core/src/modules/mod_filter/lumakey.h | 68 + synfig-core/src/modules/mod_filter/main.cpp | 68 + synfig-core/src/modules/mod_filter/mod_filter.nsh | 21 + synfig-core/src/modules/mod_filter/radialblur.cpp | 321 ++ synfig-core/src/modules/mod_filter/radialblur.h | 70 + .../src/modules/mod_filter/unmod_filter.nsh | 8 + synfig-core/src/modules/mod_geometry/Makefile.am | 51 + .../src/modules/mod_geometry/checkerboard.cpp | 200 + .../src/modules/mod_geometry/checkerboard.h | 71 + synfig-core/src/modules/mod_geometry/circle.cpp | 783 +++ synfig-core/src/modules/mod_geometry/circle.h | 124 + synfig-core/src/modules/mod_geometry/main.cpp | 75 + .../src/modules/mod_geometry/mod_geometry.nsh | 21 + synfig-core/src/modules/mod_geometry/outline.cpp | 854 ++++ synfig-core/src/modules/mod_geometry/outline.h | 94 + synfig-core/src/modules/mod_geometry/rectangle.cpp | 632 +++ synfig-core/src/modules/mod_geometry/rectangle.h | 81 + synfig-core/src/modules/mod_geometry/region.cpp | 251 + synfig-core/src/modules/mod_geometry/region.h | 73 + synfig-core/src/modules/mod_geometry/star.cpp | 204 + synfig-core/src/modules/mod_geometry/star.h | 72 + .../src/modules/mod_geometry/unmod_geometry.nsh | 8 + synfig-core/src/modules/mod_gif/Makefile.am | 35 + synfig-core/src/modules/mod_gif/main.cpp | 55 + synfig-core/src/modules/mod_gif/mod_gif.nsh | 21 + synfig-core/src/modules/mod_gif/trgt_gif.cpp | 456 ++ synfig-core/src/modules/mod_gif/trgt_gif.h | 213 + synfig-core/src/modules/mod_gif/unmod_gif.nsh | 8 + synfig-core/src/modules/mod_gradient/Makefile.am | 41 + .../src/modules/mod_gradient/conicalgradient.cpp | 284 + .../src/modules/mod_gradient/conicalgradient.h | 79 + .../src/modules/mod_gradient/curvegradient.cpp | 615 +++ .../src/modules/mod_gradient/curvegradient.h | 86 + .../src/modules/mod_gradient/lineargradient.cpp | 259 + .../src/modules/mod_gradient/lineargradient.h | 79 + synfig-core/src/modules/mod_gradient/main.cpp | 66 + .../src/modules/mod_gradient/mod_gradient.nsh | 21 + .../src/modules/mod_gradient/radialgradient.cpp | 250 + .../src/modules/mod_gradient/radialgradient.h | 79 + .../src/modules/mod_gradient/spiralgradient.cpp | 246 + .../src/modules/mod_gradient/spiralgradient.h | 81 + .../src/modules/mod_gradient/unmod_gradient.nsh | 8 + .../src/modules/mod_imagemagick/Makefile.am | 41 + synfig-core/src/modules/mod_imagemagick/main.cpp | 103 + .../modules/mod_imagemagick/mod_imagemagick.nsh | 21 + .../modules/mod_imagemagick/mptr_imagemagick.cpp | 299 ++ .../src/modules/mod_imagemagick/mptr_imagemagick.h | 62 + .../modules/mod_imagemagick/trgt_imagemagick.cpp | 264 + .../src/modules/mod_imagemagick/trgt_imagemagick.h | 70 + .../modules/mod_imagemagick/unmod_imagemagick.nsh | 8 + synfig-core/src/modules/mod_jpeg/Makefile.am | 42 + synfig-core/src/modules/mod_jpeg/main.cpp | 61 + synfig-core/src/modules/mod_jpeg/mod_jpeg.nsh | 21 + synfig-core/src/modules/mod_jpeg/mptr_jpeg.cpp | 256 + synfig-core/src/modules/mod_jpeg/mptr_jpeg.h | 67 + synfig-core/src/modules/mod_jpeg/trgt_jpeg.cpp | 197 + synfig-core/src/modules/mod_jpeg/trgt_jpeg.h | 76 + synfig-core/src/modules/mod_jpeg/unmod_jpeg.nsh | 8 + synfig-core/src/modules/mod_libavcodec/Makefile.am | 44 + synfig-core/src/modules/mod_libavcodec/main.cpp | 68 + .../src/modules/mod_libavcodec/mod_libavcodec.nsh | 21 + synfig-core/src/modules/mod_libavcodec/mptr.cpp | 72 + synfig-core/src/modules/mod_libavcodec/mptr.h | 57 + synfig-core/src/modules/mod_libavcodec/trgt_av.cpp | 983 ++++ synfig-core/src/modules/mod_libavcodec/trgt_av.h | 69 + .../modules/mod_libavcodec/unmod_libavcodec.nsh | 8 + synfig-core/src/modules/mod_magickpp/Makefile.am | 40 + synfig-core/src/modules/mod_magickpp/main.cpp | 216 + .../src/modules/mod_magickpp/mod_magickpp.nsh | 11 + .../src/modules/mod_magickpp/trgt_magickpp.cpp | 309 ++ .../src/modules/mod_magickpp/trgt_magickpp.h | 72 + .../src/modules/mod_magickpp/unmod_magickpp.nsh | 5 + synfig-core/src/modules/mod_mng/Makefile.am | 41 + synfig-core/src/modules/mod_mng/main.cpp | 65 + synfig-core/src/modules/mod_mng/mod_mng.nsh | 11 + synfig-core/src/modules/mod_mng/trgt_mng.cpp | 337 ++ synfig-core/src/modules/mod_mng/trgt_mng.h | 99 + synfig-core/src/modules/mod_mng/unmod_mng.nsh | 5 + synfig-core/src/modules/mod_noise/Makefile.am | 38 + synfig-core/src/modules/mod_noise/distort.cpp | 301 ++ synfig-core/src/modules/mod_noise/distort.h | 83 + synfig-core/src/modules/mod_noise/main.cpp | 68 + synfig-core/src/modules/mod_noise/mod_noise.nsh | 21 + synfig-core/src/modules/mod_noise/noise.cpp | 346 ++ synfig-core/src/modules/mod_noise/noise.h | 88 + synfig-core/src/modules/mod_noise/random_noise.cpp | 323 ++ synfig-core/src/modules/mod_noise/random_noise.h | 63 + synfig-core/src/modules/mod_noise/unmod_noise.nsh | 8 + .../src/modules/mod_noise/valuenode_random.cpp | 304 ++ .../src/modules/mod_noise/valuenode_random.h | 91 + synfig-core/src/modules/mod_openexr/Makefile.am | 42 + synfig-core/src/modules/mod_openexr/main.cpp | 60 + .../src/modules/mod_openexr/mod_openexr.nsh | 26 + .../src/modules/mod_openexr/mptr_openexr.cpp | 123 + synfig-core/src/modules/mod_openexr/mptr_openexr.h | 60 + .../src/modules/mod_openexr/trgt_openexr.cpp | 190 + synfig-core/src/modules/mod_openexr/trgt_openexr.h | 78 + .../src/modules/mod_openexr/unmod_openexr.nsh | 13 + synfig-core/src/modules/mod_particle/Makefile.am | 37 + synfig-core/src/modules/mod_particle/main.cpp | 58 + .../src/modules/mod_particle/mod_particle.nsh | 21 + synfig-core/src/modules/mod_particle/plant.cpp | 742 +++ synfig-core/src/modules/mod_particle/plant.h | 119 + synfig-core/src/modules/mod_particle/random.cpp | 312 ++ synfig-core/src/modules/mod_particle/random.h | 67 + .../src/modules/mod_particle/unmod_particle.nsh | 8 + synfig-core/src/modules/mod_png/Makefile.am | 42 + synfig-core/src/modules/mod_png/main.cpp | 58 + synfig-core/src/modules/mod_png/mod_png.nsh | 21 + synfig-core/src/modules/mod_png/mptr_png.cpp | 431 ++ synfig-core/src/modules/mod_png/mptr_png.h | 73 + synfig-core/src/modules/mod_png/trgt_png.cpp | 244 + synfig-core/src/modules/mod_png/trgt_png.h | 73 + synfig-core/src/modules/mod_png/unmod_png.nsh | 8 + synfig-core/src/modules/mod_ppm/Makefile.am | 35 + synfig-core/src/modules/mod_ppm/main.cpp | 58 + synfig-core/src/modules/mod_ppm/mod_ppm.nsh | 21 + synfig-core/src/modules/mod_ppm/mptr_ppm.cpp | 120 + synfig-core/src/modules/mod_ppm/mptr_ppm.h | 55 + synfig-core/src/modules/mod_ppm/trgt_mpg.cpp | 215 + synfig-core/src/modules/mod_ppm/trgt_mpg.h | 73 + synfig-core/src/modules/mod_ppm/trgt_ppm.cpp | 152 + synfig-core/src/modules/mod_ppm/trgt_ppm.h | 68 + synfig-core/src/modules/mod_ppm/unmod_ppm.nsh | 8 + synfig-core/src/modules/mod_svg/Makefile.am | 14 + synfig-core/src/modules/mod_svg/layer_svg.cpp | 103 + synfig-core/src/modules/mod_svg/layer_svg.h | 67 + synfig-core/src/modules/mod_svg/main.cpp | 57 + synfig-core/src/modules/mod_svg/mod_svg.nsh | 20 + synfig-core/src/modules/mod_svg/svg_parser.cpp | 1934 +++++++ synfig-core/src/modules/mod_svg/svg_parser.h | 211 + synfig-core/src/modules/mod_svg/unmod_svg.nsh | 9 + synfig-core/src/modules/mod_yuv420p/Makefile.am | 34 + synfig-core/src/modules/mod_yuv420p/main.cpp | 54 + .../src/modules/mod_yuv420p/mod_yuv420p.nsh | 21 + synfig-core/src/modules/mod_yuv420p/trgt_yuv.cpp | 236 + synfig-core/src/modules/mod_yuv420p/trgt_yuv.h | 71 + .../src/modules/mod_yuv420p/unmod_yuv420p.nsh | 8 + synfig-core/src/modules/mptr_mplayer/Makefile.am | 30 + synfig-core/src/modules/mptr_mplayer/main.cpp | 58 + .../src/modules/mptr_mplayer/mptr_mplayer.cpp | 133 + .../src/modules/mptr_mplayer/mptr_mplayer.h | 63 + synfig-core/src/modules/synfig_modules.cfg.in | 18 + synfig-core/src/modules/template.nsh | 21 + synfig-core/src/modules/untemplate.nsh | 8 + synfig-core/src/synfig/Makefile.am | 312 ++ synfig-core/src/synfig/activepoint.cpp | 55 + synfig-core/src/synfig/activepoint.h | 91 + synfig-core/src/synfig/angle.h | 49 + synfig-core/src/synfig/blinepoint.cpp | 63 + synfig-core/src/synfig/blinepoint.h | 92 + synfig-core/src/synfig/blur.cpp | 1204 +++++ synfig-core/src/synfig/blur.h | 90 + synfig-core/src/synfig/canvas.cpp | 1408 +++++ synfig-core/src/synfig/canvas.h | 572 +++ synfig-core/src/synfig/canvasbase.h | 47 + synfig-core/src/synfig/color.cpp | 599 +++ synfig-core/src/synfig/color.h | 901 ++++ synfig-core/src/synfig/context.cpp | 421 ++ synfig-core/src/synfig/context.h | 87 + synfig-core/src/synfig/curve_helper.cpp | 704 +++ synfig-core/src/synfig/curve_helper.h | 172 + synfig-core/src/synfig/curveset.cpp | 483 ++ synfig-core/src/synfig/curveset.h | 92 + synfig-core/src/synfig/distance.cpp | 257 + synfig-core/src/synfig/distance.h | 128 + synfig-core/src/synfig/exception.cpp | 105 + synfig-core/src/synfig/exception.h | 97 + synfig-core/src/synfig/gamma.cpp | 193 + synfig-core/src/synfig/gamma.h | 108 + synfig-core/src/synfig/general.h | 156 + synfig-core/src/synfig/gradient.cpp | 574 +++ synfig-core/src/synfig/gradient.h | 134 + synfig-core/src/synfig/guid.cpp | 206 + synfig-core/src/synfig/guid.h | 141 + synfig-core/src/synfig/guidset.h | 60 + synfig-core/src/synfig/importer.cpp | 146 + synfig-core/src/synfig/importer.h | 131 + synfig-core/src/synfig/interpolation.h | 54 + synfig-core/src/synfig/keyframe.cpp | 235 + synfig-core/src/synfig/keyframe.h | 128 + synfig-core/src/synfig/layer.cpp | 613 +++ synfig-core/src/synfig/layer.h | 517 ++ synfig-core/src/synfig/layer_bitmap.cpp | 525 ++ synfig-core/src/synfig/layer_bitmap.h | 80 + synfig-core/src/synfig/layer_composite.cpp | 208 + synfig-core/src/synfig/layer_composite.h | 100 + synfig-core/src/synfig/layer_duplicate.cpp | 210 + synfig-core/src/synfig/layer_duplicate.h | 69 + synfig-core/src/synfig/layer_mime.cpp | 148 + synfig-core/src/synfig/layer_mime.h | 75 + synfig-core/src/synfig/layer_motionblur.cpp | 202 + synfig-core/src/synfig/layer_motionblur.h | 62 + synfig-core/src/synfig/layer_pastecanvas.cpp | 570 +++ synfig-core/src/synfig/layer_pastecanvas.h | 165 + synfig-core/src/synfig/layer_polygon.cpp | 177 + synfig-core/src/synfig/layer_polygon.h | 96 + synfig-core/src/synfig/layer_shape.cpp | 3108 +++++++++++ synfig-core/src/synfig/layer_shape.h | 128 + synfig-core/src/synfig/layer_solidcolor.cpp | 169 + synfig-core/src/synfig/layer_solidcolor.h | 71 + synfig-core/src/synfig/listimporter.cpp | 208 + synfig-core/src/synfig/listimporter.h | 73 + synfig-core/src/synfig/loadcanvas.cpp | 2301 +++++++++ synfig-core/src/synfig/loadcanvas.h | 193 + synfig-core/src/synfig/main.cpp | 379 ++ synfig-core/src/synfig/main.h | 60 + synfig-core/src/synfig/matrix.h | 229 + synfig-core/src/synfig/module.cpp | 194 + synfig-core/src/synfig/module.h | 204 + synfig-core/src/synfig/mutex.cpp | 304 ++ synfig-core/src/synfig/mutex.h | 118 + synfig-core/src/synfig/node.cpp | 310 ++ synfig-core/src/synfig/node.h | 283 + synfig-core/src/synfig/nodebase.h | 102 + synfig-core/src/synfig/palette.cpp | 359 ++ synfig-core/src/synfig/palette.h | 94 + synfig-core/src/synfig/paramdesc.cpp | 100 + synfig-core/src/synfig/paramdesc.h | 226 + synfig-core/src/synfig/pch.h | 37 + synfig-core/src/synfig/polynomial_root.cpp | 267 + synfig-core/src/synfig/polynomial_root.h | 121 + synfig-core/src/synfig/protocol.h | 68 + synfig-core/src/synfig/quick_rng.h | 85 + synfig-core/src/synfig/real.h | 41 + synfig-core/src/synfig/rect.cpp | 70 + synfig-core/src/synfig/rect.h | 182 + synfig-core/src/synfig/releases.h | 51 + synfig-core/src/synfig/renddesc.cpp | 566 ++ synfig-core/src/synfig/renddesc.h | 311 ++ synfig-core/src/synfig/render.cpp | 526 ++ synfig-core/src/synfig/render.h | 66 + synfig-core/src/synfig/savecanvas.cpp | 814 +++ synfig-core/src/synfig/savecanvas.h | 59 + synfig-core/src/synfig/segment.h | 67 + synfig-core/src/synfig/smartfile.h | 52 + synfig-core/src/synfig/string.h | 62 + synfig-core/src/synfig/string_decl.h | 58 + synfig-core/src/synfig/surface.cpp | 242 + synfig-core/src/synfig/surface.h | 159 + synfig-core/src/synfig/surfacenew.cpp | 706 +++ synfig-core/src/synfig/surfacenew.h | 400 ++ synfig-core/src/synfig/synfig.h | 140 + synfig-core/src/synfig/synfig.nsh | 20 + synfig-core/src/synfig/target.cpp | 113 + synfig-core/src/synfig/target.h | 187 + synfig-core/src/synfig/target_multi.cpp | 119 + synfig-core/src/synfig/target_multi.h | 68 + synfig-core/src/synfig/target_null.cpp | 50 + synfig-core/src/synfig/target_null.h | 71 + synfig-core/src/synfig/target_null_tile.cpp | 50 + synfig-core/src/synfig/target_null_tile.h | 66 + synfig-core/src/synfig/target_scanline.cpp | 524 ++ synfig-core/src/synfig/target_scanline.h | 100 + synfig-core/src/synfig/target_tile.cpp | 456 ++ synfig-core/src/synfig/target_tile.h | 124 + synfig-core/src/synfig/time.cpp | 324 ++ synfig-core/src/synfig/time.h | 171 + synfig-core/src/synfig/timepointcollect.cpp | 153 + synfig-core/src/synfig/timepointcollect.h | 54 + synfig-core/src/synfig/transform.cpp | 149 + synfig-core/src/synfig/transform.h | 86 + synfig-core/src/synfig/types.h | 47 + synfig-core/src/synfig/uniqueid.cpp | 51 + synfig-core/src/synfig/uniqueid.h | 91 + synfig-core/src/synfig/value.cpp | 369 ++ synfig-core/src/synfig/value.h | 481 ++ synfig-core/src/synfig/valuenode.cpp | 704 +++ synfig-core/src/synfig/valuenode.h | 418 ++ synfig-core/src/synfig/valuenode_add.cpp | 243 + synfig-core/src/synfig/valuenode_add.h | 72 + synfig-core/src/synfig/valuenode_and.cpp | 168 + synfig-core/src/synfig/valuenode_and.h | 81 + synfig-core/src/synfig/valuenode_anglestring.cpp | 210 + synfig-core/src/synfig/valuenode_anglestring.h | 85 + synfig-core/src/synfig/valuenode_animated.cpp | 1194 +++++ synfig-core/src/synfig/valuenode_animated.h | 117 + synfig-core/src/synfig/valuenode_atan2.cpp | 180 + synfig-core/src/synfig/valuenode_atan2.h | 83 + synfig-core/src/synfig/valuenode_bline.cpp | 844 +++ synfig-core/src/synfig/valuenode_bline.h | 100 + .../src/synfig/valuenode_blinecalctangent.cpp | 271 + .../src/synfig/valuenode_blinecalctangent.h | 85 + .../src/synfig/valuenode_blinecalcvertex.cpp | 222 + synfig-core/src/synfig/valuenode_blinecalcvertex.h | 80 + .../src/synfig/valuenode_blinecalcwidth.cpp | 230 + synfig-core/src/synfig/valuenode_blinecalcwidth.h | 83 + .../src/synfig/valuenode_blinereversetangent.cpp | 202 + .../src/synfig/valuenode_blinereversetangent.h | 81 + synfig-core/src/synfig/valuenode_compare.cpp | 197 + synfig-core/src/synfig/valuenode_compare.h | 85 + synfig-core/src/synfig/valuenode_composite.cpp | 445 ++ synfig-core/src/synfig/valuenode_composite.h | 77 + synfig-core/src/synfig/valuenode_const.cpp | 134 + synfig-core/src/synfig/valuenode_const.h | 76 + synfig-core/src/synfig/valuenode_cos.cpp | 186 + synfig-core/src/synfig/valuenode_cos.h | 83 + synfig-core/src/synfig/valuenode_dotproduct.cpp | 199 + synfig-core/src/synfig/valuenode_dotproduct.h | 83 + synfig-core/src/synfig/valuenode_duplicate.cpp | 217 + synfig-core/src/synfig/valuenode_duplicate.h | 87 + synfig-core/src/synfig/valuenode_dynamiclist.cpp | 909 ++++ synfig-core/src/synfig/valuenode_dynamiclist.h | 248 + synfig-core/src/synfig/valuenode_exp.cpp | 179 + synfig-core/src/synfig/valuenode_exp.h | 82 + synfig-core/src/synfig/valuenode_gradientcolor.cpp | 189 + synfig-core/src/synfig/valuenode_gradientcolor.h | 84 + .../src/synfig/valuenode_gradientrotate.cpp | 198 + synfig-core/src/synfig/valuenode_gradientrotate.h | 92 + synfig-core/src/synfig/valuenode_greyed.cpp | 82 + synfig-core/src/synfig/valuenode_greyed.h | 60 + synfig-core/src/synfig/valuenode_integer.cpp | 199 + synfig-core/src/synfig/valuenode_integer.h | 81 + synfig-core/src/synfig/valuenode_intstring.cpp | 202 + synfig-core/src/synfig/valuenode_intstring.h | 84 + synfig-core/src/synfig/valuenode_join.cpp | 229 + synfig-core/src/synfig/valuenode_join.h | 85 + synfig-core/src/synfig/valuenode_linear.cpp | 229 + synfig-core/src/synfig/valuenode_linear.h | 83 + synfig-core/src/synfig/valuenode_log.cpp | 186 + synfig-core/src/synfig/valuenode_log.h | 85 + synfig-core/src/synfig/valuenode_not.cpp | 159 + synfig-core/src/synfig/valuenode_not.h | 80 + synfig-core/src/synfig/valuenode_or.cpp | 168 + synfig-core/src/synfig/valuenode_or.h | 81 + synfig-core/src/synfig/valuenode_pow.cpp | 204 + synfig-core/src/synfig/valuenode_pow.h | 84 + .../src/synfig/valuenode_radialcomposite.cpp | 315 ++ synfig-core/src/synfig/valuenode_radialcomposite.h | 77 + synfig-core/src/synfig/valuenode_range.cpp | 243 + synfig-core/src/synfig/valuenode_range.h | 80 + synfig-core/src/synfig/valuenode_realstring.cpp | 210 + synfig-core/src/synfig/valuenode_realstring.h | 85 + synfig-core/src/synfig/valuenode_reciprocal.cpp | 189 + synfig-core/src/synfig/valuenode_reciprocal.h | 82 + synfig-core/src/synfig/valuenode_reference.cpp | 168 + synfig-core/src/synfig/valuenode_reference.h | 85 + .../src/synfig/valuenode_repeat_gradient.cpp | 244 + synfig-core/src/synfig/valuenode_repeat_gradient.h | 92 + synfig-core/src/synfig/valuenode_scale.cpp | 277 + synfig-core/src/synfig/valuenode_scale.h | 95 + .../src/synfig/valuenode_segcalctangent.cpp | 183 + synfig-core/src/synfig/valuenode_segcalctangent.h | 83 + synfig-core/src/synfig/valuenode_segcalcvertex.cpp | 181 + synfig-core/src/synfig/valuenode_segcalcvertex.h | 84 + synfig-core/src/synfig/valuenode_sine.cpp | 183 + synfig-core/src/synfig/valuenode_sine.h | 83 + synfig-core/src/synfig/valuenode_step.cpp | 234 + synfig-core/src/synfig/valuenode_step.h | 84 + synfig-core/src/synfig/valuenode_stripes.cpp | 235 + synfig-core/src/synfig/valuenode_stripes.h | 89 + synfig-core/src/synfig/valuenode_subtract.cpp | 249 + synfig-core/src/synfig/valuenode_subtract.h | 82 + synfig-core/src/synfig/valuenode_switch.cpp | 182 + synfig-core/src/synfig/valuenode_switch.h | 88 + synfig-core/src/synfig/valuenode_timedswap.cpp | 280 + synfig-core/src/synfig/valuenode_timedswap.h | 87 + synfig-core/src/synfig/valuenode_timeloop.cpp | 200 + synfig-core/src/synfig/valuenode_timeloop.h | 84 + synfig-core/src/synfig/valuenode_timestring.cpp | 189 + synfig-core/src/synfig/valuenode_timestring.h | 82 + synfig-core/src/synfig/valuenode_twotone.cpp | 189 + synfig-core/src/synfig/valuenode_twotone.h | 82 + synfig-core/src/synfig/valuenode_vectorangle.cpp | 169 + synfig-core/src/synfig/valuenode_vectorangle.h | 82 + synfig-core/src/synfig/valuenode_vectorlength.cpp | 168 + synfig-core/src/synfig/valuenode_vectorlength.h | 82 + synfig-core/src/synfig/valuenode_vectorx.cpp | 168 + synfig-core/src/synfig/valuenode_vectorx.h | 82 + synfig-core/src/synfig/valuenode_vectory.cpp | 168 + synfig-core/src/synfig/valuenode_vectory.h | 82 + synfig-core/src/synfig/vector.h | 290 ++ synfig-core/src/synfig/version.h | 75 + synfig-core/src/synfig/waypoint.cpp | 155 + synfig-core/src/synfig/waypoint.h | 267 + synfig-core/src/template.cpp | 54 + synfig-core/src/template.h | 38 + synfig-core/src/tool/Makefile.am | 27 + synfig-core/src/tool/main.cpp | 1434 ++++++ synfig-core/src/tool/tool.nsh | 20 + synfig-core/synfig-config.in | 82 + synfig-core/synfig-core.xcodeproj/config.h | 264 + synfig-core/synfig-core.xcodeproj/darco.mode1 | 1542 ++++++ synfig-core/synfig-core.xcodeproj/darco.pbxuser | 3939 ++++++++++++++ synfig-core/synfig-core.xcodeproj/project.pbxproj | 3071 +++++++++++ synfig-core/synfig.kdevprj | 1186 +++++ synfig-core/synfig.pc.in | 11 + synfig-core/synfig.prj | 214 + synfig-core/trunk/AUTHORS | 25 - synfig-core/trunk/ChangeLog.old | 136 - synfig-core/trunk/Makefile.am | 188 - synfig-core/trunk/NEWS | 127 - synfig-core/trunk/README | 51 - synfig-core/trunk/TODO | 38 - synfig-core/trunk/build_tools/Makefile.am | 8 - synfig-core/trunk/build_tools/autorevision.sh | 107 - synfig-core/trunk/config/ltmain.patch | 17 - synfig-core/trunk/config/package | 292 -- synfig-core/trunk/configure.ac | 734 --- synfig-core/trunk/doc/hw-gfx-mapping.txt | 75 - synfig-core/trunk/doxygen.cfg.in | 1220 ----- synfig-core/trunk/examples/Makefile.am | 36 - synfig-core/trunk/examples/about_dialog.sifz | Bin 3668 -> 0 bytes synfig-core/trunk/examples/backdrop.sifz | Bin 79099 -> 0 bytes synfig-core/trunk/examples/business_card.sifz | Bin 2662 -> 0 bytes synfig-core/trunk/examples/candy.sifz | Bin 1316 -> 0 bytes synfig-core/trunk/examples/cells.sifz | Bin 1417 -> 0 bytes synfig-core/trunk/examples/eye.sifz | Bin 127203 -> 0 bytes synfig-core/trunk/examples/eyes.sifz | Bin 1753 -> 0 bytes synfig-core/trunk/examples/gamma.sifz | Bin 740 -> 0 bytes synfig-core/trunk/examples/gradient.sifz | Bin 2343 -> 0 bytes synfig-core/trunk/examples/headmo.sifz | Bin 4692 -> 0 bytes synfig-core/trunk/examples/installer-logo.sifz | Bin 5214 -> 0 bytes synfig-core/trunk/examples/japan.sifz | Bin 548 -> 0 bytes synfig-core/trunk/examples/logo.sifz | Bin 5077 -> 0 bytes synfig-core/trunk/examples/macwolfen.sifz | Bin 254858 -> 0 bytes synfig-core/trunk/examples/mandelbrot.sifz | Bin 1353 -> 0 bytes synfig-core/trunk/examples/newjulia.sifz | Bin 1534 -> 0 bytes synfig-core/trunk/examples/newjulia2.sifz | Bin 1250 -> 0 bytes synfig-core/trunk/examples/noise.sifz | Bin 699 -> 0 bytes synfig-core/trunk/examples/pirates.sifz | Bin 654072 -> 0 bytes synfig-core/trunk/examples/preambletaffy.sifz | Bin 1030 -> 0 bytes synfig-core/trunk/examples/prologue_kid.sifz | Bin 82709 -> 0 bytes synfig-core/trunk/examples/sparkle.sifz | Bin 1786 -> 0 bytes synfig-core/trunk/examples/splat.sifz | Bin 860 -> 0 bytes synfig-core/trunk/examples/star.sifz | Bin 2179 -> 0 bytes synfig-core/trunk/examples/walk/Makefile.am | 10 - synfig-core/trunk/examples/walk/animation.lst | 53 - synfig-core/trunk/examples/walk/frame_01.jpg | Bin 5934 -> 0 bytes synfig-core/trunk/examples/walk/frame_02.jpg | Bin 5118 -> 0 bytes synfig-core/trunk/examples/walk/frame_03.jpg | Bin 5842 -> 0 bytes synfig-core/trunk/examples/walk/frame_04.jpg | Bin 4891 -> 0 bytes synfig-core/trunk/examples/walk/walk.sifz | Bin 10574 -> 0 bytes synfig-core/trunk/examples/wallpaper.sifz | Bin 2154 -> 0 bytes synfig-core/trunk/examples/warpcube.sifz | Bin 3153 -> 0 bytes synfig-core/trunk/examples/warptext.sifz | Bin 690 -> 0 bytes synfig-core/trunk/examples/z_depth_test.sifz | Bin 1330 -> 0 bytes synfig-core/trunk/m4/ETL.m4 | 75 - synfig-core/trunk/m4/cxx_macros.m4 | 88 - synfig-core/trunk/m4/freetype2.m4 | 146 - synfig-core/trunk/m4/libxml++.m4 | 23 - synfig-core/trunk/m4/libxml.m4 | 389 -- synfig-core/trunk/m4/pkgconfig.m4 | 57 - synfig-core/trunk/m4/subs.m4 | 246 - synfig-core/trunk/m4/synfig.m4 | 51 - synfig-core/trunk/macosxbuild.sh | 59 - .../pkg-info/macosx/core-resources/License.txt | 515 -- .../pkg-info/macosx/core-resources/ReadMe.txt | 1 - .../pkg-info/macosx/core-resources/Welcome.txt | 1 - .../pkg-info/macosx/core-resources/install.sh | 58 - .../pkg-info/macosx/core-resources/upgrade.sh | 58 - .../trunk/pkg-info/macosx/synfig-core.info.in | 14 - synfig-core/trunk/po/Makevars | 7 - synfig-core/trunk/po/POTFILES.in | 367 -- synfig-core/trunk/po/es.po | 3145 ------------ synfig-core/trunk/po/fr.po | 3152 ------------ synfig-core/trunk/po/ru.po | 3151 ------------ synfig-core/trunk/src/Makefile.am | 13 - synfig-core/trunk/src/modules/Makefile.am | 60 - synfig-core/trunk/src/modules/example/Makefile.am | 34 - .../trunk/src/modules/example/filledrect.cpp | 586 --- synfig-core/trunk/src/modules/example/filledrect.h | 81 - synfig-core/trunk/src/modules/example/main.cpp | 61 - .../trunk/src/modules/example/metaballs.cpp | 252 - synfig-core/trunk/src/modules/example/metaballs.h | 81 - .../trunk/src/modules/example/simplecircle.cpp | 187 - .../trunk/src/modules/example/simplecircle.h | 73 - .../trunk/src/modules/lyr_freetype/Makefile.am | 49 - .../src/modules/lyr_freetype/lyr_freetype.cpp | 919 ---- .../trunk/src/modules/lyr_freetype/lyr_freetype.h | 167 - .../src/modules/lyr_freetype/lyr_freetype.nsh | 21 - .../trunk/src/modules/lyr_freetype/main.cpp | 91 - .../src/modules/lyr_freetype/unlyr_freetype.nsh | 8 - synfig-core/trunk/src/modules/lyr_std/Makefile.am | 71 - synfig-core/trunk/src/modules/lyr_std/bevel.cpp | 409 -- synfig-core/trunk/src/modules/lyr_std/bevel.h | 81 - .../trunk/src/modules/lyr_std/booleancurve.cpp | 121 - .../trunk/src/modules/lyr_std/booleancurve.h | 75 - synfig-core/trunk/src/modules/lyr_std/clamp.cpp | 207 - synfig-core/trunk/src/modules/lyr_std/clamp.h | 75 - .../trunk/src/modules/lyr_std/curvewarp.cpp | 591 --- synfig-core/trunk/src/modules/lyr_std/curvewarp.h | 80 - synfig-core/trunk/src/modules/lyr_std/import.cpp | 238 - synfig-core/trunk/src/modules/lyr_std/import.h | 72 - .../trunk/src/modules/lyr_std/insideout.cpp | 146 - synfig-core/trunk/src/modules/lyr_std/insideout.h | 69 - synfig-core/trunk/src/modules/lyr_std/julia.cpp | 365 -- synfig-core/trunk/src/modules/lyr_std/julia.h | 90 - synfig-core/trunk/src/modules/lyr_std/lyr_std.nsh | 21 - synfig-core/trunk/src/modules/lyr_std/main.cpp | 104 - .../trunk/src/modules/lyr_std/mandelbrot.cpp | 385 -- synfig-core/trunk/src/modules/lyr_std/mandelbrot.h | 86 - synfig-core/trunk/src/modules/lyr_std/rotate.cpp | 337 -- synfig-core/trunk/src/modules/lyr_std/rotate.h | 74 - synfig-core/trunk/src/modules/lyr_std/shade.cpp | 424 -- synfig-core/trunk/src/modules/lyr_std/shade.h | 69 - .../trunk/src/modules/lyr_std/sphere_distort.cpp | 578 --- .../trunk/src/modules/lyr_std/sphere_distort.h | 92 - synfig-core/trunk/src/modules/lyr_std/stretch.cpp | 192 - synfig-core/trunk/src/modules/lyr_std/stretch.h | 75 - .../trunk/src/modules/lyr_std/supersample.cpp | 237 - .../trunk/src/modules/lyr_std/supersample.h | 66 - synfig-core/trunk/src/modules/lyr_std/timeloop.cpp | 252 - synfig-core/trunk/src/modules/lyr_std/timeloop.h | 78 - .../trunk/src/modules/lyr_std/translate.cpp | 161 - synfig-core/trunk/src/modules/lyr_std/translate.h | 71 - synfig-core/trunk/src/modules/lyr_std/twirl.cpp | 241 - synfig-core/trunk/src/modules/lyr_std/twirl.h | 84 - .../trunk/src/modules/lyr_std/unlyr_std.nsh | 8 - synfig-core/trunk/src/modules/lyr_std/warp.cpp | 851 --- synfig-core/trunk/src/modules/lyr_std/warp.h | 91 - .../trunk/src/modules/lyr_std/xorpattern.cpp | 153 - synfig-core/trunk/src/modules/lyr_std/xorpattern.h | 69 - synfig-core/trunk/src/modules/lyr_std/zoom.cpp | 162 - synfig-core/trunk/src/modules/lyr_std/zoom.h | 68 - synfig-core/trunk/src/modules/mod_bmp/Makefile.am | 37 - synfig-core/trunk/src/modules/mod_bmp/main.cpp | 58 - synfig-core/trunk/src/modules/mod_bmp/mod_bmp.nsh | 21 - synfig-core/trunk/src/modules/mod_bmp/mptr_bmp.cpp | 235 - synfig-core/trunk/src/modules/mod_bmp/mptr_bmp.h | 59 - synfig-core/trunk/src/modules/mod_bmp/trgt_bmp.cpp | 265 - synfig-core/trunk/src/modules/mod_bmp/trgt_bmp.h | 67 - .../trunk/src/modules/mod_bmp/unmod_bmp.nsh | 8 - synfig-core/trunk/src/modules/mod_dv/Makefile.am | 39 - synfig-core/trunk/src/modules/mod_dv/main.cpp | 54 - synfig-core/trunk/src/modules/mod_dv/mod_dv.nsh | 21 - synfig-core/trunk/src/modules/mod_dv/trgt_dv.cpp | 290 -- synfig-core/trunk/src/modules/mod_dv/trgt_dv.h | 71 - synfig-core/trunk/src/modules/mod_dv/unmod_dv.nsh | 8 - .../trunk/src/modules/mod_ffmpeg/Makefile.am | 41 - synfig-core/trunk/src/modules/mod_ffmpeg/main.cpp | 70 - .../trunk/src/modules/mod_ffmpeg/mod_ffmpeg.nsh | 21 - .../trunk/src/modules/mod_ffmpeg/mptr_ffmpeg.cpp | 274 - .../trunk/src/modules/mod_ffmpeg/mptr_ffmpeg.h | 77 - .../trunk/src/modules/mod_ffmpeg/trgt_ffmpeg.cpp | 270 - .../trunk/src/modules/mod_ffmpeg/trgt_ffmpeg.h | 70 - .../trunk/src/modules/mod_ffmpeg/unmod_ffmpeg.nsh | 8 - .../trunk/src/modules/mod_filter/Makefile.am | 46 - synfig-core/trunk/src/modules/mod_filter/blur.cpp | 268 - synfig-core/trunk/src/modules/mod_filter/blur.h | 68 - .../trunk/src/modules/mod_filter/colorcorrect.cpp | 258 - .../trunk/src/modules/mod_filter/colorcorrect.h | 79 - .../trunk/src/modules/mod_filter/halftone.cpp | 168 - .../trunk/src/modules/mod_filter/halftone.h | 62 - .../trunk/src/modules/mod_filter/halftone2.cpp | 245 - .../trunk/src/modules/mod_filter/halftone2.h | 74 - .../trunk/src/modules/mod_filter/halftone3.cpp | 408 -- .../trunk/src/modules/mod_filter/halftone3.h | 79 - .../trunk/src/modules/mod_filter/lumakey.cpp | 168 - synfig-core/trunk/src/modules/mod_filter/lumakey.h | 68 - synfig-core/trunk/src/modules/mod_filter/main.cpp | 68 - .../trunk/src/modules/mod_filter/mod_filter.nsh | 21 - .../trunk/src/modules/mod_filter/radialblur.cpp | 321 -- .../trunk/src/modules/mod_filter/radialblur.h | 70 - .../trunk/src/modules/mod_filter/unmod_filter.nsh | 8 - .../trunk/src/modules/mod_geometry/Makefile.am | 51 - .../src/modules/mod_geometry/checkerboard.cpp | 200 - .../trunk/src/modules/mod_geometry/checkerboard.h | 71 - .../trunk/src/modules/mod_geometry/circle.cpp | 783 --- .../trunk/src/modules/mod_geometry/circle.h | 124 - .../trunk/src/modules/mod_geometry/main.cpp | 75 - .../src/modules/mod_geometry/mod_geometry.nsh | 21 - .../trunk/src/modules/mod_geometry/outline.cpp | 854 ---- .../trunk/src/modules/mod_geometry/outline.h | 94 - .../trunk/src/modules/mod_geometry/rectangle.cpp | 632 --- .../trunk/src/modules/mod_geometry/rectangle.h | 81 - .../trunk/src/modules/mod_geometry/region.cpp | 251 - .../trunk/src/modules/mod_geometry/region.h | 73 - .../trunk/src/modules/mod_geometry/star.cpp | 204 - synfig-core/trunk/src/modules/mod_geometry/star.h | 72 - .../src/modules/mod_geometry/unmod_geometry.nsh | 8 - synfig-core/trunk/src/modules/mod_gif/Makefile.am | 35 - synfig-core/trunk/src/modules/mod_gif/main.cpp | 55 - synfig-core/trunk/src/modules/mod_gif/mod_gif.nsh | 21 - synfig-core/trunk/src/modules/mod_gif/trgt_gif.cpp | 456 -- synfig-core/trunk/src/modules/mod_gif/trgt_gif.h | 213 - .../trunk/src/modules/mod_gif/unmod_gif.nsh | 8 - .../trunk/src/modules/mod_gradient/Makefile.am | 41 - .../src/modules/mod_gradient/conicalgradient.cpp | 284 - .../src/modules/mod_gradient/conicalgradient.h | 79 - .../src/modules/mod_gradient/curvegradient.cpp | 615 --- .../trunk/src/modules/mod_gradient/curvegradient.h | 86 - .../src/modules/mod_gradient/lineargradient.cpp | 259 - .../src/modules/mod_gradient/lineargradient.h | 79 - .../trunk/src/modules/mod_gradient/main.cpp | 66 - .../src/modules/mod_gradient/mod_gradient.nsh | 21 - .../src/modules/mod_gradient/radialgradient.cpp | 250 - .../src/modules/mod_gradient/radialgradient.h | 79 - .../src/modules/mod_gradient/spiralgradient.cpp | 246 - .../src/modules/mod_gradient/spiralgradient.h | 81 - .../src/modules/mod_gradient/unmod_gradient.nsh | 8 - .../trunk/src/modules/mod_imagemagick/Makefile.am | 41 - .../trunk/src/modules/mod_imagemagick/main.cpp | 103 - .../modules/mod_imagemagick/mod_imagemagick.nsh | 21 - .../modules/mod_imagemagick/mptr_imagemagick.cpp | 299 -- .../src/modules/mod_imagemagick/mptr_imagemagick.h | 62 - .../modules/mod_imagemagick/trgt_imagemagick.cpp | 264 - .../src/modules/mod_imagemagick/trgt_imagemagick.h | 70 - .../modules/mod_imagemagick/unmod_imagemagick.nsh | 8 - synfig-core/trunk/src/modules/mod_jpeg/Makefile.am | 42 - synfig-core/trunk/src/modules/mod_jpeg/main.cpp | 61 - .../trunk/src/modules/mod_jpeg/mod_jpeg.nsh | 21 - .../trunk/src/modules/mod_jpeg/mptr_jpeg.cpp | 256 - synfig-core/trunk/src/modules/mod_jpeg/mptr_jpeg.h | 67 - .../trunk/src/modules/mod_jpeg/trgt_jpeg.cpp | 197 - synfig-core/trunk/src/modules/mod_jpeg/trgt_jpeg.h | 76 - .../trunk/src/modules/mod_jpeg/unmod_jpeg.nsh | 8 - .../trunk/src/modules/mod_libavcodec/Makefile.am | 44 - .../trunk/src/modules/mod_libavcodec/main.cpp | 68 - .../src/modules/mod_libavcodec/mod_libavcodec.nsh | 21 - .../trunk/src/modules/mod_libavcodec/mptr.cpp | 72 - .../trunk/src/modules/mod_libavcodec/mptr.h | 57 - .../trunk/src/modules/mod_libavcodec/trgt_av.cpp | 983 ---- .../trunk/src/modules/mod_libavcodec/trgt_av.h | 69 - .../modules/mod_libavcodec/unmod_libavcodec.nsh | 8 - .../trunk/src/modules/mod_magickpp/Makefile.am | 40 - .../trunk/src/modules/mod_magickpp/main.cpp | 216 - .../src/modules/mod_magickpp/mod_magickpp.nsh | 11 - .../src/modules/mod_magickpp/trgt_magickpp.cpp | 309 -- .../trunk/src/modules/mod_magickpp/trgt_magickpp.h | 72 - .../src/modules/mod_magickpp/unmod_magickpp.nsh | 5 - synfig-core/trunk/src/modules/mod_mng/Makefile.am | 41 - synfig-core/trunk/src/modules/mod_mng/main.cpp | 65 - synfig-core/trunk/src/modules/mod_mng/mod_mng.nsh | 11 - synfig-core/trunk/src/modules/mod_mng/trgt_mng.cpp | 337 -- synfig-core/trunk/src/modules/mod_mng/trgt_mng.h | 99 - .../trunk/src/modules/mod_mng/unmod_mng.nsh | 5 - .../trunk/src/modules/mod_noise/Makefile.am | 38 - .../trunk/src/modules/mod_noise/distort.cpp | 301 -- synfig-core/trunk/src/modules/mod_noise/distort.h | 83 - synfig-core/trunk/src/modules/mod_noise/main.cpp | 68 - .../trunk/src/modules/mod_noise/mod_noise.nsh | 21 - synfig-core/trunk/src/modules/mod_noise/noise.cpp | 346 -- synfig-core/trunk/src/modules/mod_noise/noise.h | 88 - .../trunk/src/modules/mod_noise/random_noise.cpp | 323 -- .../trunk/src/modules/mod_noise/random_noise.h | 63 - .../trunk/src/modules/mod_noise/unmod_noise.nsh | 8 - .../src/modules/mod_noise/valuenode_random.cpp | 304 -- .../trunk/src/modules/mod_noise/valuenode_random.h | 91 - .../trunk/src/modules/mod_openexr/Makefile.am | 42 - synfig-core/trunk/src/modules/mod_openexr/main.cpp | 60 - .../trunk/src/modules/mod_openexr/mod_openexr.nsh | 26 - .../trunk/src/modules/mod_openexr/mptr_openexr.cpp | 123 - .../trunk/src/modules/mod_openexr/mptr_openexr.h | 60 - .../trunk/src/modules/mod_openexr/trgt_openexr.cpp | 190 - .../trunk/src/modules/mod_openexr/trgt_openexr.h | 78 - .../src/modules/mod_openexr/unmod_openexr.nsh | 13 - .../trunk/src/modules/mod_particle/Makefile.am | 37 - .../trunk/src/modules/mod_particle/main.cpp | 58 - .../src/modules/mod_particle/mod_particle.nsh | 21 - .../trunk/src/modules/mod_particle/plant.cpp | 742 --- synfig-core/trunk/src/modules/mod_particle/plant.h | 119 - .../trunk/src/modules/mod_particle/random.cpp | 312 -- .../trunk/src/modules/mod_particle/random.h | 67 - .../src/modules/mod_particle/unmod_particle.nsh | 8 - synfig-core/trunk/src/modules/mod_png/Makefile.am | 42 - synfig-core/trunk/src/modules/mod_png/main.cpp | 58 - synfig-core/trunk/src/modules/mod_png/mod_png.nsh | 21 - synfig-core/trunk/src/modules/mod_png/mptr_png.cpp | 431 -- synfig-core/trunk/src/modules/mod_png/mptr_png.h | 73 - synfig-core/trunk/src/modules/mod_png/trgt_png.cpp | 244 - synfig-core/trunk/src/modules/mod_png/trgt_png.h | 73 - .../trunk/src/modules/mod_png/unmod_png.nsh | 8 - synfig-core/trunk/src/modules/mod_ppm/Makefile.am | 35 - synfig-core/trunk/src/modules/mod_ppm/main.cpp | 58 - synfig-core/trunk/src/modules/mod_ppm/mod_ppm.nsh | 21 - synfig-core/trunk/src/modules/mod_ppm/mptr_ppm.cpp | 120 - synfig-core/trunk/src/modules/mod_ppm/mptr_ppm.h | 55 - synfig-core/trunk/src/modules/mod_ppm/trgt_mpg.cpp | 215 - synfig-core/trunk/src/modules/mod_ppm/trgt_mpg.h | 73 - synfig-core/trunk/src/modules/mod_ppm/trgt_ppm.cpp | 152 - synfig-core/trunk/src/modules/mod_ppm/trgt_ppm.h | 68 - .../trunk/src/modules/mod_ppm/unmod_ppm.nsh | 8 - synfig-core/trunk/src/modules/mod_svg/Makefile.am | 14 - .../trunk/src/modules/mod_svg/layer_svg.cpp | 103 - synfig-core/trunk/src/modules/mod_svg/layer_svg.h | 67 - synfig-core/trunk/src/modules/mod_svg/main.cpp | 57 - synfig-core/trunk/src/modules/mod_svg/mod_svg.nsh | 20 - .../trunk/src/modules/mod_svg/svg_parser.cpp | 1934 ------- synfig-core/trunk/src/modules/mod_svg/svg_parser.h | 211 - .../trunk/src/modules/mod_svg/unmod_svg.nsh | 9 - .../trunk/src/modules/mod_yuv420p/Makefile.am | 34 - synfig-core/trunk/src/modules/mod_yuv420p/main.cpp | 54 - .../trunk/src/modules/mod_yuv420p/mod_yuv420p.nsh | 21 - .../trunk/src/modules/mod_yuv420p/trgt_yuv.cpp | 236 - .../trunk/src/modules/mod_yuv420p/trgt_yuv.h | 71 - .../src/modules/mod_yuv420p/unmod_yuv420p.nsh | 8 - .../trunk/src/modules/mptr_mplayer/Makefile.am | 30 - .../trunk/src/modules/mptr_mplayer/main.cpp | 58 - .../src/modules/mptr_mplayer/mptr_mplayer.cpp | 133 - .../trunk/src/modules/mptr_mplayer/mptr_mplayer.h | 63 - .../trunk/src/modules/synfig_modules.cfg.in | 18 - synfig-core/trunk/src/modules/template.nsh | 21 - synfig-core/trunk/src/modules/untemplate.nsh | 8 - synfig-core/trunk/src/synfig/Makefile.am | 312 -- synfig-core/trunk/src/synfig/activepoint.cpp | 55 - synfig-core/trunk/src/synfig/activepoint.h | 91 - synfig-core/trunk/src/synfig/angle.h | 49 - synfig-core/trunk/src/synfig/blinepoint.cpp | 63 - synfig-core/trunk/src/synfig/blinepoint.h | 92 - synfig-core/trunk/src/synfig/blur.cpp | 1204 ----- synfig-core/trunk/src/synfig/blur.h | 90 - synfig-core/trunk/src/synfig/canvas.cpp | 1408 ----- synfig-core/trunk/src/synfig/canvas.h | 572 --- synfig-core/trunk/src/synfig/canvasbase.h | 47 - synfig-core/trunk/src/synfig/color.cpp | 599 --- synfig-core/trunk/src/synfig/color.h | 901 ---- synfig-core/trunk/src/synfig/context.cpp | 421 -- synfig-core/trunk/src/synfig/context.h | 87 - synfig-core/trunk/src/synfig/curve_helper.cpp | 704 --- synfig-core/trunk/src/synfig/curve_helper.h | 172 - synfig-core/trunk/src/synfig/curveset.cpp | 483 -- synfig-core/trunk/src/synfig/curveset.h | 92 - synfig-core/trunk/src/synfig/distance.cpp | 257 - synfig-core/trunk/src/synfig/distance.h | 128 - synfig-core/trunk/src/synfig/exception.cpp | 105 - synfig-core/trunk/src/synfig/exception.h | 97 - synfig-core/trunk/src/synfig/gamma.cpp | 193 - synfig-core/trunk/src/synfig/gamma.h | 108 - synfig-core/trunk/src/synfig/general.h | 156 - synfig-core/trunk/src/synfig/gradient.cpp | 574 --- synfig-core/trunk/src/synfig/gradient.h | 134 - synfig-core/trunk/src/synfig/guid.cpp | 206 - synfig-core/trunk/src/synfig/guid.h | 141 - synfig-core/trunk/src/synfig/guidset.h | 60 - synfig-core/trunk/src/synfig/importer.cpp | 146 - synfig-core/trunk/src/synfig/importer.h | 131 - synfig-core/trunk/src/synfig/interpolation.h | 54 - synfig-core/trunk/src/synfig/keyframe.cpp | 235 - synfig-core/trunk/src/synfig/keyframe.h | 128 - synfig-core/trunk/src/synfig/layer.cpp | 613 --- synfig-core/trunk/src/synfig/layer.h | 517 -- synfig-core/trunk/src/synfig/layer_bitmap.cpp | 525 -- synfig-core/trunk/src/synfig/layer_bitmap.h | 80 - synfig-core/trunk/src/synfig/layer_composite.cpp | 208 - synfig-core/trunk/src/synfig/layer_composite.h | 100 - synfig-core/trunk/src/synfig/layer_duplicate.cpp | 210 - synfig-core/trunk/src/synfig/layer_duplicate.h | 69 - synfig-core/trunk/src/synfig/layer_mime.cpp | 148 - synfig-core/trunk/src/synfig/layer_mime.h | 75 - synfig-core/trunk/src/synfig/layer_motionblur.cpp | 202 - synfig-core/trunk/src/synfig/layer_motionblur.h | 62 - synfig-core/trunk/src/synfig/layer_pastecanvas.cpp | 570 --- synfig-core/trunk/src/synfig/layer_pastecanvas.h | 165 - synfig-core/trunk/src/synfig/layer_polygon.cpp | 177 - synfig-core/trunk/src/synfig/layer_polygon.h | 96 - synfig-core/trunk/src/synfig/layer_shape.cpp | 3108 ----------- synfig-core/trunk/src/synfig/layer_shape.h | 128 - synfig-core/trunk/src/synfig/layer_solidcolor.cpp | 169 - synfig-core/trunk/src/synfig/layer_solidcolor.h | 71 - synfig-core/trunk/src/synfig/listimporter.cpp | 208 - synfig-core/trunk/src/synfig/listimporter.h | 73 - synfig-core/trunk/src/synfig/loadcanvas.cpp | 2301 --------- synfig-core/trunk/src/synfig/loadcanvas.h | 193 - synfig-core/trunk/src/synfig/main.cpp | 379 -- synfig-core/trunk/src/synfig/main.h | 60 - synfig-core/trunk/src/synfig/matrix.h | 229 - synfig-core/trunk/src/synfig/module.cpp | 194 - synfig-core/trunk/src/synfig/module.h | 204 - synfig-core/trunk/src/synfig/mutex.cpp | 304 -- synfig-core/trunk/src/synfig/mutex.h | 118 - synfig-core/trunk/src/synfig/node.cpp | 310 -- synfig-core/trunk/src/synfig/node.h | 283 - synfig-core/trunk/src/synfig/nodebase.h | 102 - synfig-core/trunk/src/synfig/palette.cpp | 359 -- synfig-core/trunk/src/synfig/palette.h | 94 - synfig-core/trunk/src/synfig/paramdesc.cpp | 100 - synfig-core/trunk/src/synfig/paramdesc.h | 226 - synfig-core/trunk/src/synfig/pch.h | 37 - synfig-core/trunk/src/synfig/polynomial_root.cpp | 267 - synfig-core/trunk/src/synfig/polynomial_root.h | 121 - synfig-core/trunk/src/synfig/protocol.h | 68 - synfig-core/trunk/src/synfig/quick_rng.h | 85 - synfig-core/trunk/src/synfig/real.h | 41 - synfig-core/trunk/src/synfig/rect.cpp | 70 - synfig-core/trunk/src/synfig/rect.h | 182 - synfig-core/trunk/src/synfig/releases.h | 51 - synfig-core/trunk/src/synfig/renddesc.cpp | 566 -- synfig-core/trunk/src/synfig/renddesc.h | 311 -- synfig-core/trunk/src/synfig/render.cpp | 526 -- synfig-core/trunk/src/synfig/render.h | 66 - synfig-core/trunk/src/synfig/savecanvas.cpp | 814 --- synfig-core/trunk/src/synfig/savecanvas.h | 59 - synfig-core/trunk/src/synfig/segment.h | 67 - synfig-core/trunk/src/synfig/smartfile.h | 52 - synfig-core/trunk/src/synfig/string.h | 62 - synfig-core/trunk/src/synfig/string_decl.h | 58 - synfig-core/trunk/src/synfig/surface.cpp | 242 - synfig-core/trunk/src/synfig/surface.h | 159 - synfig-core/trunk/src/synfig/surfacenew.cpp | 706 --- synfig-core/trunk/src/synfig/surfacenew.h | 400 -- synfig-core/trunk/src/synfig/synfig.h | 140 - synfig-core/trunk/src/synfig/synfig.nsh | 20 - synfig-core/trunk/src/synfig/target.cpp | 113 - synfig-core/trunk/src/synfig/target.h | 187 - synfig-core/trunk/src/synfig/target_multi.cpp | 119 - synfig-core/trunk/src/synfig/target_multi.h | 68 - synfig-core/trunk/src/synfig/target_null.cpp | 50 - synfig-core/trunk/src/synfig/target_null.h | 71 - synfig-core/trunk/src/synfig/target_null_tile.cpp | 50 - synfig-core/trunk/src/synfig/target_null_tile.h | 66 - synfig-core/trunk/src/synfig/target_scanline.cpp | 524 -- synfig-core/trunk/src/synfig/target_scanline.h | 100 - synfig-core/trunk/src/synfig/target_tile.cpp | 456 -- synfig-core/trunk/src/synfig/target_tile.h | 124 - synfig-core/trunk/src/synfig/time.cpp | 324 -- synfig-core/trunk/src/synfig/time.h | 171 - synfig-core/trunk/src/synfig/timepointcollect.cpp | 153 - synfig-core/trunk/src/synfig/timepointcollect.h | 54 - synfig-core/trunk/src/synfig/transform.cpp | 149 - synfig-core/trunk/src/synfig/transform.h | 86 - synfig-core/trunk/src/synfig/types.h | 47 - synfig-core/trunk/src/synfig/uniqueid.cpp | 51 - synfig-core/trunk/src/synfig/uniqueid.h | 91 - synfig-core/trunk/src/synfig/value.cpp | 369 -- synfig-core/trunk/src/synfig/value.h | 481 -- synfig-core/trunk/src/synfig/valuenode.cpp | 704 --- synfig-core/trunk/src/synfig/valuenode.h | 418 -- synfig-core/trunk/src/synfig/valuenode_add.cpp | 243 - synfig-core/trunk/src/synfig/valuenode_add.h | 72 - synfig-core/trunk/src/synfig/valuenode_and.cpp | 168 - synfig-core/trunk/src/synfig/valuenode_and.h | 81 - .../trunk/src/synfig/valuenode_anglestring.cpp | 210 - .../trunk/src/synfig/valuenode_anglestring.h | 85 - .../trunk/src/synfig/valuenode_animated.cpp | 1194 ----- synfig-core/trunk/src/synfig/valuenode_animated.h | 117 - synfig-core/trunk/src/synfig/valuenode_atan2.cpp | 180 - synfig-core/trunk/src/synfig/valuenode_atan2.h | 83 - synfig-core/trunk/src/synfig/valuenode_bline.cpp | 844 --- synfig-core/trunk/src/synfig/valuenode_bline.h | 100 - .../src/synfig/valuenode_blinecalctangent.cpp | 271 - .../trunk/src/synfig/valuenode_blinecalctangent.h | 85 - .../trunk/src/synfig/valuenode_blinecalcvertex.cpp | 222 - .../trunk/src/synfig/valuenode_blinecalcvertex.h | 80 - .../trunk/src/synfig/valuenode_blinecalcwidth.cpp | 230 - .../trunk/src/synfig/valuenode_blinecalcwidth.h | 83 - .../src/synfig/valuenode_blinereversetangent.cpp | 202 - .../src/synfig/valuenode_blinereversetangent.h | 81 - synfig-core/trunk/src/synfig/valuenode_compare.cpp | 197 - synfig-core/trunk/src/synfig/valuenode_compare.h | 85 - .../trunk/src/synfig/valuenode_composite.cpp | 445 -- synfig-core/trunk/src/synfig/valuenode_composite.h | 77 - synfig-core/trunk/src/synfig/valuenode_const.cpp | 134 - synfig-core/trunk/src/synfig/valuenode_const.h | 76 - synfig-core/trunk/src/synfig/valuenode_cos.cpp | 186 - synfig-core/trunk/src/synfig/valuenode_cos.h | 83 - .../trunk/src/synfig/valuenode_dotproduct.cpp | 199 - .../trunk/src/synfig/valuenode_dotproduct.h | 83 - .../trunk/src/synfig/valuenode_duplicate.cpp | 217 - synfig-core/trunk/src/synfig/valuenode_duplicate.h | 87 - .../trunk/src/synfig/valuenode_dynamiclist.cpp | 909 ---- .../trunk/src/synfig/valuenode_dynamiclist.h | 248 - synfig-core/trunk/src/synfig/valuenode_exp.cpp | 179 - synfig-core/trunk/src/synfig/valuenode_exp.h | 82 - .../trunk/src/synfig/valuenode_gradientcolor.cpp | 189 - .../trunk/src/synfig/valuenode_gradientcolor.h | 84 - .../trunk/src/synfig/valuenode_gradientrotate.cpp | 198 - .../trunk/src/synfig/valuenode_gradientrotate.h | 92 - synfig-core/trunk/src/synfig/valuenode_greyed.cpp | 82 - synfig-core/trunk/src/synfig/valuenode_greyed.h | 60 - synfig-core/trunk/src/synfig/valuenode_integer.cpp | 199 - synfig-core/trunk/src/synfig/valuenode_integer.h | 81 - .../trunk/src/synfig/valuenode_intstring.cpp | 202 - synfig-core/trunk/src/synfig/valuenode_intstring.h | 84 - synfig-core/trunk/src/synfig/valuenode_join.cpp | 229 - synfig-core/trunk/src/synfig/valuenode_join.h | 85 - synfig-core/trunk/src/synfig/valuenode_linear.cpp | 229 - synfig-core/trunk/src/synfig/valuenode_linear.h | 83 - synfig-core/trunk/src/synfig/valuenode_log.cpp | 186 - synfig-core/trunk/src/synfig/valuenode_log.h | 85 - synfig-core/trunk/src/synfig/valuenode_not.cpp | 159 - synfig-core/trunk/src/synfig/valuenode_not.h | 80 - synfig-core/trunk/src/synfig/valuenode_or.cpp | 168 - synfig-core/trunk/src/synfig/valuenode_or.h | 81 - synfig-core/trunk/src/synfig/valuenode_pow.cpp | 204 - synfig-core/trunk/src/synfig/valuenode_pow.h | 84 - .../trunk/src/synfig/valuenode_radialcomposite.cpp | 315 -- .../trunk/src/synfig/valuenode_radialcomposite.h | 77 - synfig-core/trunk/src/synfig/valuenode_range.cpp | 243 - synfig-core/trunk/src/synfig/valuenode_range.h | 80 - .../trunk/src/synfig/valuenode_realstring.cpp | 210 - .../trunk/src/synfig/valuenode_realstring.h | 85 - .../trunk/src/synfig/valuenode_reciprocal.cpp | 189 - .../trunk/src/synfig/valuenode_reciprocal.h | 82 - .../trunk/src/synfig/valuenode_reference.cpp | 168 - synfig-core/trunk/src/synfig/valuenode_reference.h | 85 - .../trunk/src/synfig/valuenode_repeat_gradient.cpp | 244 - .../trunk/src/synfig/valuenode_repeat_gradient.h | 92 - synfig-core/trunk/src/synfig/valuenode_scale.cpp | 277 - synfig-core/trunk/src/synfig/valuenode_scale.h | 95 - .../trunk/src/synfig/valuenode_segcalctangent.cpp | 183 - .../trunk/src/synfig/valuenode_segcalctangent.h | 83 - .../trunk/src/synfig/valuenode_segcalcvertex.cpp | 181 - .../trunk/src/synfig/valuenode_segcalcvertex.h | 84 - synfig-core/trunk/src/synfig/valuenode_sine.cpp | 183 - synfig-core/trunk/src/synfig/valuenode_sine.h | 83 - synfig-core/trunk/src/synfig/valuenode_step.cpp | 234 - synfig-core/trunk/src/synfig/valuenode_step.h | 84 - synfig-core/trunk/src/synfig/valuenode_stripes.cpp | 235 - synfig-core/trunk/src/synfig/valuenode_stripes.h | 89 - .../trunk/src/synfig/valuenode_subtract.cpp | 249 - synfig-core/trunk/src/synfig/valuenode_subtract.h | 82 - synfig-core/trunk/src/synfig/valuenode_switch.cpp | 182 - synfig-core/trunk/src/synfig/valuenode_switch.h | 88 - .../trunk/src/synfig/valuenode_timedswap.cpp | 280 - synfig-core/trunk/src/synfig/valuenode_timedswap.h | 87 - .../trunk/src/synfig/valuenode_timeloop.cpp | 200 - synfig-core/trunk/src/synfig/valuenode_timeloop.h | 84 - .../trunk/src/synfig/valuenode_timestring.cpp | 189 - .../trunk/src/synfig/valuenode_timestring.h | 82 - synfig-core/trunk/src/synfig/valuenode_twotone.cpp | 189 - synfig-core/trunk/src/synfig/valuenode_twotone.h | 82 - .../trunk/src/synfig/valuenode_vectorangle.cpp | 169 - .../trunk/src/synfig/valuenode_vectorangle.h | 82 - .../trunk/src/synfig/valuenode_vectorlength.cpp | 168 - .../trunk/src/synfig/valuenode_vectorlength.h | 82 - synfig-core/trunk/src/synfig/valuenode_vectorx.cpp | 168 - synfig-core/trunk/src/synfig/valuenode_vectorx.h | 82 - synfig-core/trunk/src/synfig/valuenode_vectory.cpp | 168 - synfig-core/trunk/src/synfig/valuenode_vectory.h | 82 - synfig-core/trunk/src/synfig/vector.h | 290 -- synfig-core/trunk/src/synfig/version.h | 75 - synfig-core/trunk/src/synfig/waypoint.cpp | 155 - synfig-core/trunk/src/synfig/waypoint.h | 267 - synfig-core/trunk/src/template.cpp | 54 - synfig-core/trunk/src/template.h | 38 - synfig-core/trunk/src/tool/Makefile.am | 27 - synfig-core/trunk/src/tool/main.cpp | 1434 ------ synfig-core/trunk/src/tool/tool.nsh | 20 - synfig-core/trunk/synfig-config.in | 82 - synfig-core/trunk/synfig-core.xcodeproj/config.h | 264 - .../trunk/synfig-core.xcodeproj/darco.mode1 | 1542 ------ .../trunk/synfig-core.xcodeproj/darco.pbxuser | 3939 -------------- .../trunk/synfig-core.xcodeproj/project.pbxproj | 3071 ----------- synfig-core/trunk/synfig.kdevprj | 1186 ----- synfig-core/trunk/synfig.pc.in | 11 - synfig-core/trunk/synfig.prj | 214 - synfig-core/trunk/win32build.sh | 19 - synfig-core/trunk/win32inst.nsi.in | 238 - synfig-core/win32build.sh | 19 + synfig-core/win32inst.nsi.in | 238 + synfig-docs/IndexToDo | 33 + synfig-docs/Makefile | 165 + synfig-docs/README | 23 + synfig-docs/TODO | 3 + synfig-docs/build-deps | 1 + synfig-docs/ca/animation/conclusion.sgml | 2 + synfig-docs/ca/animation/introduction.sgml | 2 + synfig-docs/ca/animation/keyframe.sgml | 2 + synfig-docs/ca/animation/movement.sgml | 2 + synfig-docs/ca/animation/rendering.sgml | 2 + synfig-docs/ca/animation/timeline.sgml | 2 + synfig-docs/ca/animation/workspace.sgml | 2 + synfig-docs/ca/appendix/apendices.sgml | 46 + synfig-docs/ca/appendix/glossary.sgml | 2 + synfig-docs/ca/appendix/keyboard.sgml | 2 + synfig-docs/ca/installation/installation.sgml | 4 + synfig-docs/ca/interface/history.sgml | 8 + synfig-docs/ca/interface/interface.sgml | 76 + synfig-docs/ca/interface/layers.sgml | 8 + synfig-docs/ca/interface/navigator.sgml | 8 + synfig-docs/ca/interface/params.sgml | 8 + synfig-docs/ca/interface/toolbox.eps | 806 +++ synfig-docs/ca/interface/toolbox.sgml | 48 + synfig-docs/ca/interface/tooloptions.sgml | 8 + synfig-docs/ca/introduction/introduction.sgml | 52 + synfig-docs/ca/steps/done | 0 synfig-docs/ca/steps/firststeps.sgml | 69 + synfig-docs/ca/steps/layers/combining.sgml | 32 + synfig-docs/ca/steps/layers/done | 0 synfig-docs/ca/steps/layers/layers.sgml | 37 + synfig-docs/ca/steps/layers/using.sgml | 57 + synfig-docs/ca/steps/linking.sgml | 53 + synfig-docs/ca/steps/shapes.sgml | 82 + synfig-docs/ca/synfig-studio.sgml | 64 + synfig-docs/ca/tips/bitmap.sgml | 2 + synfig-docs/ca/tips/closebline.sgml | 2 + synfig-docs/ca/tips/dock.sgml | 2 + synfig-docs/ca/tips/filloutline.sgml | 2 + synfig-docs/ca/tips/gradient_object.sgml | 2 + synfig-docs/ca/tips/layer.sgml | 2 + synfig-docs/en/animation/conclusion.sgml | 2 + synfig-docs/en/animation/introduction.sgml | 2 + synfig-docs/en/animation/keyframe.sgml | 2 + synfig-docs/en/animation/movement.sgml | 2 + synfig-docs/en/animation/rendering.sgml | 2 + synfig-docs/en/animation/timeline.sgml | 2 + synfig-docs/en/animation/workspace.sgml | 2 + synfig-docs/en/appendix/apendices.sgml | 46 + synfig-docs/en/appendix/glossary.sgml | 2 + synfig-docs/en/appendix/keyboard.sgml | 2 + synfig-docs/en/installation/installation.sgml | 4 + synfig-docs/en/interface/history.sgml | 8 + synfig-docs/en/interface/interface.sgml | 76 + synfig-docs/en/interface/layers.sgml | 8 + synfig-docs/en/interface/navigator.sgml | 8 + synfig-docs/en/interface/params.sgml | 8 + synfig-docs/en/interface/toolbox.eps | 806 +++ synfig-docs/en/interface/toolbox.sgml | 48 + synfig-docs/en/interface/tooloptions.sgml | 8 + synfig-docs/en/introduction/introduction.sgml | 52 + synfig-docs/en/steps/done | 0 synfig-docs/en/steps/firststeps.sgml | 69 + synfig-docs/en/steps/layers/combining.sgml | 32 + synfig-docs/en/steps/layers/done | 0 synfig-docs/en/steps/layers/layers.sgml | 37 + synfig-docs/en/steps/layers/using.sgml | 57 + synfig-docs/en/steps/linking.sgml | 53 + synfig-docs/en/steps/shapes.sgml | 82 + synfig-docs/en/synfig-studio.sgml | 64 + synfig-docs/en/tips/bitmap.sgml | 2 + synfig-docs/en/tips/closebline.sgml | 2 + synfig-docs/en/tips/dock.sgml | 2 + synfig-docs/en/tips/filloutline.sgml | 2 + synfig-docs/en/tips/gradient_object.sgml | 2 + synfig-docs/en/tips/layer.sgml | 2 + synfig-docs/others/Authors | 1 + synfig-docs/others/hola.txt | 1 + synfig-docs/png/toolbox.png | Bin 0 -> 36891 bytes synfig-docs/scripts/build.sh | 22 + synfig-docs/scripts/clean.sh | 7 + synfig-docs/trunk/IndexToDo | 33 - synfig-docs/trunk/Makefile | 165 - synfig-docs/trunk/README | 23 - synfig-docs/trunk/TODO | 3 - synfig-docs/trunk/build-deps | 1 - synfig-docs/trunk/ca/animation/conclusion.sgml | 2 - synfig-docs/trunk/ca/animation/introduction.sgml | 2 - synfig-docs/trunk/ca/animation/keyframe.sgml | 2 - synfig-docs/trunk/ca/animation/movement.sgml | 2 - synfig-docs/trunk/ca/animation/rendering.sgml | 2 - synfig-docs/trunk/ca/animation/timeline.sgml | 2 - synfig-docs/trunk/ca/animation/workspace.sgml | 2 - synfig-docs/trunk/ca/appendix/apendices.sgml | 46 - synfig-docs/trunk/ca/appendix/glossary.sgml | 2 - synfig-docs/trunk/ca/appendix/keyboard.sgml | 2 - .../trunk/ca/installation/installation.sgml | 4 - synfig-docs/trunk/ca/interface/history.sgml | 8 - synfig-docs/trunk/ca/interface/interface.sgml | 76 - synfig-docs/trunk/ca/interface/layers.sgml | 8 - synfig-docs/trunk/ca/interface/navigator.sgml | 8 - synfig-docs/trunk/ca/interface/params.sgml | 8 - synfig-docs/trunk/ca/interface/toolbox.eps | 806 --- synfig-docs/trunk/ca/interface/toolbox.sgml | 48 - synfig-docs/trunk/ca/interface/tooloptions.sgml | 8 - .../trunk/ca/introduction/introduction.sgml | 52 - synfig-docs/trunk/ca/steps/done | 0 synfig-docs/trunk/ca/steps/firststeps.sgml | 69 - synfig-docs/trunk/ca/steps/layers/combining.sgml | 32 - synfig-docs/trunk/ca/steps/layers/done | 0 synfig-docs/trunk/ca/steps/layers/layers.sgml | 37 - synfig-docs/trunk/ca/steps/layers/using.sgml | 57 - synfig-docs/trunk/ca/steps/linking.sgml | 53 - synfig-docs/trunk/ca/steps/shapes.sgml | 82 - synfig-docs/trunk/ca/synfig-studio.sgml | 64 - synfig-docs/trunk/ca/tips/bitmap.sgml | 2 - synfig-docs/trunk/ca/tips/closebline.sgml | 2 - synfig-docs/trunk/ca/tips/dock.sgml | 2 - synfig-docs/trunk/ca/tips/filloutline.sgml | 2 - synfig-docs/trunk/ca/tips/gradient_object.sgml | 2 - synfig-docs/trunk/ca/tips/layer.sgml | 2 - synfig-docs/trunk/en/animation/conclusion.sgml | 2 - synfig-docs/trunk/en/animation/introduction.sgml | 2 - synfig-docs/trunk/en/animation/keyframe.sgml | 2 - synfig-docs/trunk/en/animation/movement.sgml | 2 - synfig-docs/trunk/en/animation/rendering.sgml | 2 - synfig-docs/trunk/en/animation/timeline.sgml | 2 - synfig-docs/trunk/en/animation/workspace.sgml | 2 - synfig-docs/trunk/en/appendix/apendices.sgml | 46 - synfig-docs/trunk/en/appendix/glossary.sgml | 2 - synfig-docs/trunk/en/appendix/keyboard.sgml | 2 - .../trunk/en/installation/installation.sgml | 4 - synfig-docs/trunk/en/interface/history.sgml | 8 - synfig-docs/trunk/en/interface/interface.sgml | 76 - synfig-docs/trunk/en/interface/layers.sgml | 8 - synfig-docs/trunk/en/interface/navigator.sgml | 8 - synfig-docs/trunk/en/interface/params.sgml | 8 - synfig-docs/trunk/en/interface/toolbox.eps | 806 --- synfig-docs/trunk/en/interface/toolbox.sgml | 48 - synfig-docs/trunk/en/interface/tooloptions.sgml | 8 - .../trunk/en/introduction/introduction.sgml | 52 - synfig-docs/trunk/en/steps/done | 0 synfig-docs/trunk/en/steps/firststeps.sgml | 69 - synfig-docs/trunk/en/steps/layers/combining.sgml | 32 - synfig-docs/trunk/en/steps/layers/done | 0 synfig-docs/trunk/en/steps/layers/layers.sgml | 37 - synfig-docs/trunk/en/steps/layers/using.sgml | 57 - synfig-docs/trunk/en/steps/linking.sgml | 53 - synfig-docs/trunk/en/steps/shapes.sgml | 82 - synfig-docs/trunk/en/synfig-studio.sgml | 64 - synfig-docs/trunk/en/tips/bitmap.sgml | 2 - synfig-docs/trunk/en/tips/closebline.sgml | 2 - synfig-docs/trunk/en/tips/dock.sgml | 2 - synfig-docs/trunk/en/tips/filloutline.sgml | 2 - synfig-docs/trunk/en/tips/gradient_object.sgml | 2 - synfig-docs/trunk/en/tips/layer.sgml | 2 - synfig-docs/trunk/others/Authors | 1 - synfig-docs/trunk/others/hola.txt | 1 - synfig-docs/trunk/png/toolbox.png | Bin 36891 -> 0 bytes synfig-docs/trunk/scripts/build.sh | 22 - synfig-docs/trunk/scripts/clean.sh | 7 - synfig-osx/launcher/.cvsignore | 9 + synfig-osx/launcher/English.lproj/.cvsignore | 1 + .../launcher/English.lproj/InfoPlist.strings | Bin 0 -> 380 bytes .../launcher/English.lproj/main.nib/classes.nib | 49 + .../launcher/English.lproj/main.nib/info.nib | 76 + .../launcher/English.lproj/main.nib/objects.nib | Bin 0 -> 12364 bytes .../launcher/English.lproj/main~.nib/classes.nib | 49 + .../launcher/English.lproj/main~.nib/info.nib | 78 + .../launcher/English.lproj/main~.nib/objects.nib | Bin 0 -> 15083 bytes synfig-osx/launcher/Imakefile | 136 + .../launcher/Synfig Studio.pbproj/.cvsignore | 1 + .../launcher/Synfig Studio.pbproj/darco.mode1 | 1315 +++++ .../launcher/Synfig Studio.pbproj/darco.pbxuser | 1624 ++++++ .../launcher/Synfig Studio.pbproj/project.pbxproj | 552 ++ synfig-osx/launcher/SynfigApplication.h | 16 + synfig-osx/launcher/SynfigApplication.m | 14 + synfig-osx/launcher/X11.icns | Bin 0 -> 28104 bytes synfig-osx/launcher/X11Application.h | 102 + synfig-osx/launcher/X11Application.m | 1085 ++++ synfig-osx/launcher/X11Controller.h | 86 + synfig-osx/launcher/X11Controller.m | 690 +++ synfig-osx/launcher/Xquartz.man | 158 + synfig-osx/launcher/appledri.c | 349 ++ synfig-osx/launcher/applewm-impl.c | 656 +++ synfig-osx/launcher/applewm.c | 529 ++ synfig-osx/launcher/applewm.h | 160 + synfig-osx/launcher/applewmstr.h | 333 ++ synfig-osx/launcher/bundle-main.c | 908 ++++ synfig-osx/launcher/darwin-input.c | 216 + synfig-osx/launcher/darwin-keyboard.c | 301 ++ synfig-osx/launcher/darwin-keyboard.h | 58 + synfig-osx/launcher/darwin-new-keymap.c | 364 ++ synfig-osx/launcher/darwin-old-keymap.c | 613 +++ synfig-osx/launcher/darwin.c | 982 ++++ synfig-osx/launcher/darwin.h | 117 + synfig-osx/launcher/dri-surface.c | 940 ++++ synfig-osx/launcher/dri-surface.h | 115 + synfig-osx/launcher/dri.h | 64 + synfig-osx/launcher/dristruct.h | 91 + synfig-osx/launcher/events.applescript | 14 + synfig-osx/launcher/keysym2ucs.c | 908 ++++ synfig-osx/launcher/keysym2ucs.h | 36 + synfig-osx/launcher/pseudoramiX.c | 426 ++ synfig-osx/launcher/pseudoramiX.h | 10 + synfig-osx/launcher/quartz-audio.c | 342 ++ synfig-osx/launcher/quartz-audio.h | 41 + synfig-osx/launcher/quartz-cursor.c | 357 ++ synfig-osx/launcher/quartz-cursor.h | 45 + synfig-osx/launcher/quartz-server.c | 190 + synfig-osx/launcher/quartz.c | 683 +++ synfig-osx/launcher/quartz.h | 73 + synfig-osx/launcher/rootless-common.c | 497 ++ synfig-osx/launcher/rootless-common.h | 305 ++ synfig-osx/launcher/rootless-gc.c | 1526 ++++++ synfig-osx/launcher/rootless-picture.c | 540 ++ synfig-osx/launcher/rootless-screen.c | 794 +++ synfig-osx/launcher/rootless-val-tree.c | 640 +++ synfig-osx/launcher/rootless-window.c | 2056 ++++++++ synfig-osx/launcher/rootless-window.h | 65 + synfig-osx/launcher/rootless.h | 61 + synfig-osx/launcher/sif_file.icns | Bin 0 -> 50361 bytes synfig-osx/launcher/utils/.cvsignore | 4 + synfig-osx/launcher/utils/Imakefile | 10 + synfig-osx/launcher/utils/README.txt | 111 + synfig-osx/launcher/utils/dumpkeymap.c | 1453 ++++++ synfig-osx/launcher/utils/dumpkeymap.man | 1004 ++++ synfig-osx/launcher/voria.icns | Bin 0 -> 43570 bytes synfig-osx/launcher/x-hash.c | 340 ++ synfig-osx/launcher/x-hash.h | 61 + synfig-osx/launcher/x-hook.c | 105 + synfig-osx/launcher/x-hook.h | 43 + synfig-osx/launcher/x-list.c | 334 ++ synfig-osx/launcher/x-list.h | 78 + synfig-osx/trunk/launcher/.cvsignore | 9 - synfig-osx/trunk/launcher/English.lproj/.cvsignore | 1 - .../trunk/launcher/English.lproj/InfoPlist.strings | Bin 380 -> 0 bytes .../launcher/English.lproj/main.nib/classes.nib | 49 - .../trunk/launcher/English.lproj/main.nib/info.nib | 76 - .../launcher/English.lproj/main.nib/objects.nib | Bin 12364 -> 0 bytes .../launcher/English.lproj/main~.nib/classes.nib | 49 - .../launcher/English.lproj/main~.nib/info.nib | 78 - .../launcher/English.lproj/main~.nib/objects.nib | Bin 15083 -> 0 bytes synfig-osx/trunk/launcher/Imakefile | 136 - .../trunk/launcher/Synfig Studio.pbproj/.cvsignore | 1 - .../launcher/Synfig Studio.pbproj/darco.mode1 | 1315 ----- .../launcher/Synfig Studio.pbproj/darco.pbxuser | 1624 ------ .../launcher/Synfig Studio.pbproj/project.pbxproj | 552 -- synfig-osx/trunk/launcher/SynfigApplication.h | 16 - synfig-osx/trunk/launcher/SynfigApplication.m | 14 - synfig-osx/trunk/launcher/X11.icns | Bin 28104 -> 0 bytes synfig-osx/trunk/launcher/X11Application.h | 102 - synfig-osx/trunk/launcher/X11Application.m | 1085 ---- synfig-osx/trunk/launcher/X11Controller.h | 86 - synfig-osx/trunk/launcher/X11Controller.m | 690 --- synfig-osx/trunk/launcher/Xquartz.man | 158 - synfig-osx/trunk/launcher/appledri.c | 349 -- synfig-osx/trunk/launcher/applewm-impl.c | 656 --- synfig-osx/trunk/launcher/applewm.c | 529 -- synfig-osx/trunk/launcher/applewm.h | 160 - synfig-osx/trunk/launcher/applewmstr.h | 333 -- synfig-osx/trunk/launcher/bundle-main.c | 908 ---- synfig-osx/trunk/launcher/darwin-input.c | 216 - synfig-osx/trunk/launcher/darwin-keyboard.c | 301 -- synfig-osx/trunk/launcher/darwin-keyboard.h | 58 - synfig-osx/trunk/launcher/darwin-new-keymap.c | 364 -- synfig-osx/trunk/launcher/darwin-old-keymap.c | 613 --- synfig-osx/trunk/launcher/darwin.c | 982 ---- synfig-osx/trunk/launcher/darwin.h | 117 - synfig-osx/trunk/launcher/dri-surface.c | 940 ---- synfig-osx/trunk/launcher/dri-surface.h | 115 - synfig-osx/trunk/launcher/dri.h | 64 - synfig-osx/trunk/launcher/dristruct.h | 91 - synfig-osx/trunk/launcher/events.applescript | 14 - synfig-osx/trunk/launcher/keysym2ucs.c | 908 ---- synfig-osx/trunk/launcher/keysym2ucs.h | 36 - synfig-osx/trunk/launcher/pseudoramiX.c | 426 -- synfig-osx/trunk/launcher/pseudoramiX.h | 10 - synfig-osx/trunk/launcher/quartz-audio.c | 342 -- synfig-osx/trunk/launcher/quartz-audio.h | 41 - synfig-osx/trunk/launcher/quartz-cursor.c | 357 -- synfig-osx/trunk/launcher/quartz-cursor.h | 45 - synfig-osx/trunk/launcher/quartz-server.c | 190 - synfig-osx/trunk/launcher/quartz.c | 683 --- synfig-osx/trunk/launcher/quartz.h | 73 - synfig-osx/trunk/launcher/rootless-common.c | 497 -- synfig-osx/trunk/launcher/rootless-common.h | 305 -- synfig-osx/trunk/launcher/rootless-gc.c | 1526 ------ synfig-osx/trunk/launcher/rootless-picture.c | 540 -- synfig-osx/trunk/launcher/rootless-screen.c | 794 --- synfig-osx/trunk/launcher/rootless-val-tree.c | 640 --- synfig-osx/trunk/launcher/rootless-window.c | 2056 -------- synfig-osx/trunk/launcher/rootless-window.h | 65 - synfig-osx/trunk/launcher/rootless.h | 61 - synfig-osx/trunk/launcher/sif_file.icns | Bin 50361 -> 0 bytes synfig-osx/trunk/launcher/utils/.cvsignore | 4 - synfig-osx/trunk/launcher/utils/Imakefile | 10 - synfig-osx/trunk/launcher/utils/README.txt | 111 - synfig-osx/trunk/launcher/utils/dumpkeymap.c | 1453 ------ synfig-osx/trunk/launcher/utils/dumpkeymap.man | 1004 ---- synfig-osx/trunk/launcher/voria.icns | Bin 43570 -> 0 bytes synfig-osx/trunk/launcher/x-hash.c | 340 -- synfig-osx/trunk/launcher/x-hash.h | 61 - synfig-osx/trunk/launcher/x-hook.c | 105 - synfig-osx/trunk/launcher/x-hook.h | 43 - synfig-osx/trunk/launcher/x-list.c | 334 -- synfig-osx/trunk/launcher/x-list.h | 78 - synfig-studio/AUTHORS | 36 + synfig-studio/ChangeLog.old | 342 ++ synfig-studio/Makefile.am | 145 + synfig-studio/NEWS | 147 + synfig-studio/README | 57 + synfig-studio/TODO | 32 + synfig-studio/build_tools/Makefile.am | 8 + synfig-studio/build_tools/autorevision.sh | 108 + synfig-studio/config/ltmain.patch | 17 + synfig-studio/config/package | 293 ++ synfig-studio/configure.ac | 309 ++ synfig-studio/debugcrash | 2 + synfig-studio/doxygen.cfg.in | 1220 +++++ synfig-studio/images/Makefile.am | 305 ++ synfig-studio/images/Makefile.inc | 35 + synfig-studio/images/about_icon.sif | 65 + synfig-studio/images/angle_icon.sif | 65 + synfig-studio/images/bline_icon.sif | 1813 +++++++ synfig-studio/images/blinepoint_icon.sif | 66 + synfig-studio/images/bool_icon.sif | 266 + synfig-studio/images/canvas_icon.sif | 332 ++ synfig-studio/images/canvas_pointer_icon.sif | 193 + synfig-studio/images/children_icon.sif | 80 + synfig-studio/images/circle_icon.sif | 289 ++ synfig-studio/images/clear_redo_icon.sif | 1834 +++++++ synfig-studio/images/clear_undo_icon.sif | 1834 +++++++ synfig-studio/images/color_icon.sif | 391 ++ synfig-studio/images/curves_icon.sif | 1178 +++++ synfig-studio/images/draw_icon.sif | 2879 +++++++++++ synfig-studio/images/duck_angle_icon.sif | 1139 +++++ synfig-studio/images/duck_position_icon.sif | 959 ++++ synfig-studio/images/duck_radius_icon.sif | 1232 +++++ synfig-studio/images/duck_tangent_icon.sif | 1838 +++++++ synfig-studio/images/duck_vertex_icon.sif | 575 +++ synfig-studio/images/duck_width_icon.sif | 1426 ++++++ synfig-studio/images/duplicate_icon.sif | 366 ++ synfig-studio/images/encapsulate_icon.sif | 2548 +++++++++ synfig-studio/images/eyedrop_icon.sif | 2834 ++++++++++ synfig-studio/images/fill_icon.sif | 1935 +++++++ synfig-studio/images/gradient_icon.sif | 286 ++ synfig-studio/images/group_icon.sif | 2065 ++++++++ synfig-studio/images/info_icon.sif | 106 + synfig-studio/images/installer_logo.sif | 568 ++ synfig-studio/images/installer_logo_osx.sif | 613 +++ synfig-studio/images/integer_icon.sif | 66 + synfig-studio/images/keyframe_icon.sif | 331 ++ synfig-studio/images/keyframe_lock_icon.sif | 2407 +++++++++ synfig-studio/images/layer_icon.sif | 332 ++ synfig-studio/images/list_icon.sif | 65 + synfig-studio/images/logo.sif | 3062 +++++++++++ synfig-studio/images/meta_data_icon.sif | 80 + synfig-studio/images/mirror_icon.sif | 3147 ++++++++++++ synfig-studio/images/navigator_icon.sif | 451 ++ synfig-studio/images/normal_icon.sif | 310 ++ synfig-studio/images/onion_skin_icon.sif | 3897 ++++++++++++++ synfig-studio/images/pastecanvas_icon.sif | 2065 ++++++++ synfig-studio/images/plant_icon.sif | 961 ++++ synfig-studio/images/polygon_icon.sif | 886 ++++ synfig-studio/images/polyline_icon.sif | 788 +++ synfig-studio/images/real_icon.sif | 281 + synfig-studio/images/rectangle_icon.sif | 286 ++ synfig-studio/images/rename_icon.sif | 3542 +++++++++++++ synfig-studio/images/reset_colors_icon.sif | 219 + synfig-studio/images/rotate_icon.sif | 2393 +++++++++ synfig-studio/images/saveall_icon.sif | 66 + synfig-studio/images/scale_icon.sif | 3494 +++++++++++++ synfig-studio/images/seek_begin.sif | 339 ++ synfig-studio/images/seek_end.sif | 339 ++ synfig-studio/images/seek_next_frame.sif | 339 ++ synfig-studio/images/seek_prev_frame.sif | 339 ++ synfig-studio/images/segment_icon.sif | 65 + .../images/select_all_child_layers_icon.sif | 2949 +++++++++++ synfig-studio/images/set_fill_color.sif | 306 ++ synfig-studio/images/set_outline_color.sif | 306 ++ synfig-studio/images/show_grid_icon.sif | 1155 +++++ synfig-studio/images/sif_icon.sif | 1236 +++++ synfig-studio/images/sketch_icon.sif | 2351 +++++++++ synfig-studio/images/smooth_move_icon.sif | 3458 +++++++++++++ synfig-studio/images/snap_grid_icon.sif | 1155 +++++ synfig-studio/images/splash_screen-0.61.07.sif | 1992 ++++++++ synfig-studio/images/splash_screen-0.61.08.sif | 3075 +++++++++++ synfig-studio/images/splash_screen.sifz | Bin 0 -> 323622 bytes synfig-studio/images/star_icon.sif | 551 ++ synfig-studio/images/string_icon.sif | 65 + synfig-studio/images/swap_colors_icon.sif | 308 ++ synfig-studio/images/synfig_icon.sif | 65 + synfig-studio/images/synfig_icon.svg | 256 + synfig-studio/images/text_icon.sif | 1868 +++++++ synfig-studio/images/time_icon.sif | 1198 +++++ synfig-studio/images/time_track_icon.sif | 242 + synfig-studio/images/valuenode_icon.sif | 240 + synfig-studio/images/vector_icon.sif | 250 + synfig-studio/images/wallpaper.sif | 687 +++ synfig-studio/images/width_icon.sif | 153 + synfig-studio/images/zoom_icon.sif | 1967 +++++++ synfig-studio/m4/ETL.m4 | 75 + synfig-studio/m4/cxx_macros.m4 | 88 + synfig-studio/m4/gnome.m4 | 405 ++ synfig-studio/m4/libxml.m4 | 389 ++ synfig-studio/m4/subs.m4 | 245 + synfig-studio/m4/synfig.m4 | 51 + synfig-studio/macosxbuild.sh | 48 + .../macosx/studio-resources/Description.plist | 8 + .../English.lproj/InstallationCheck.strings | 2 + .../pkg-info/macosx/studio-resources/ReadMe.txt | 1 + .../pkg-info/macosx/studio-resources/Welcome.txt | 1 + .../pkg-info/macosx/studio-resources/install.sh | 61 + .../studio-resources/synfig-studio.post_install | 61 + .../studio-resources/synfig-studio.post_upgrade | 61 + .../pkg-info/macosx/studio-resources/upgrade.sh | 61 + .../pkg-info/macosx/synfig-studio.info.in | 14 + synfig-studio/po/Makevars | 7 + synfig-studio/po/POTFILES.in | 419 ++ synfig-studio/po/ca.po | 4206 +++++++++++++++ synfig-studio/po/es.po | 4439 ++++++++++++++++ synfig-studio/po/fr.po | 4450 ++++++++++++++++ synfig-studio/po/ru.po | 4430 ++++++++++++++++ synfig-studio/src/Makefile.am | 11 + synfig-studio/src/gtkmm/Makefile.am | 385 ++ synfig-studio/src/gtkmm/about.cpp | 240 + synfig-studio/src/gtkmm/about.h | 55 + synfig-studio/src/gtkmm/adjust_window.cpp | 170 + synfig-studio/src/gtkmm/adjust_window.h | 94 + synfig-studio/src/gtkmm/app.cpp | 2599 ++++++++++ synfig-studio/src/gtkmm/app.h | 363 ++ synfig-studio/src/gtkmm/asyncrenderer.cpp | 541 ++ synfig-studio/src/gtkmm/asyncrenderer.h | 121 + synfig-studio/src/gtkmm/audiocontainer.cpp | 1429 ++++++ synfig-studio/src/gtkmm/audiocontainer.h | 139 + synfig-studio/src/gtkmm/autorecover.cpp | 330 ++ synfig-studio/src/gtkmm/autorecover.h | 75 + synfig-studio/src/gtkmm/canvasoptions.cpp | 215 + synfig-studio/src/gtkmm/canvasoptions.h | 82 + synfig-studio/src/gtkmm/canvasproperties.cpp | 255 + synfig-studio/src/gtkmm/canvasproperties.h | 87 + synfig-studio/src/gtkmm/canvastreestore.cpp | 622 +++ synfig-studio/src/gtkmm/canvastreestore.h | 195 + synfig-studio/src/gtkmm/canvasview.cpp | 4273 ++++++++++++++++ synfig-studio/src/gtkmm/canvasview.h | 741 +++ synfig-studio/src/gtkmm/cellrenderer_gradient.cpp | 95 + synfig-studio/src/gtkmm/cellrenderer_gradient.h | 88 + synfig-studio/src/gtkmm/cellrenderer_time.cpp | 133 + synfig-studio/src/gtkmm/cellrenderer_time.h | 94 + synfig-studio/src/gtkmm/cellrenderer_timetrack.cpp | 906 ++++ synfig-studio/src/gtkmm/cellrenderer_timetrack.h | 207 + synfig-studio/src/gtkmm/cellrenderer_value.cpp | 604 +++ synfig-studio/src/gtkmm/cellrenderer_value.h | 135 + synfig-studio/src/gtkmm/childrentree.cpp | 436 ++ synfig-studio/src/gtkmm/childrentree.h | 178 + synfig-studio/src/gtkmm/childrentreestore.cpp | 389 ++ synfig-studio/src/gtkmm/childrentreestore.h | 143 + synfig-studio/src/gtkmm/compview.cpp | 615 +++ synfig-studio/src/gtkmm/compview.h | 128 + synfig-studio/src/gtkmm/devicetracker.cpp | 141 + synfig-studio/src/gtkmm/devicetracker.h | 56 + synfig-studio/src/gtkmm/dialog_color.cpp | 155 + synfig-studio/src/gtkmm/dialog_color.h | 88 + synfig-studio/src/gtkmm/dialog_gradient.cpp | 201 + synfig-studio/src/gtkmm/dialog_gradient.h | 117 + synfig-studio/src/gtkmm/dialog_keyframe.cpp | 148 + synfig-studio/src/gtkmm/dialog_keyframe.h | 79 + synfig-studio/src/gtkmm/dialog_preview.cpp | 220 + synfig-studio/src/gtkmm/dialog_preview.h | 132 + synfig-studio/src/gtkmm/dialog_setup.cpp | 840 +++ synfig-studio/src/gtkmm/dialog_setup.h | 222 + synfig-studio/src/gtkmm/dialog_soundselect.cpp | 129 + synfig-studio/src/gtkmm/dialog_soundselect.h | 86 + synfig-studio/src/gtkmm/dialog_tooloptions.cpp | 101 + synfig-studio/src/gtkmm/dialog_tooloptions.h | 63 + synfig-studio/src/gtkmm/dialog_waypoint.cpp | 141 + synfig-studio/src/gtkmm/dialog_waypoint.h | 109 + synfig-studio/src/gtkmm/dialogsettings.cpp | 201 + synfig-studio/src/gtkmm/dialogsettings.h | 58 + synfig-studio/src/gtkmm/dock_canvases.cpp | 251 + synfig-studio/src/gtkmm/dock_canvases.h | 88 + synfig-studio/src/gtkmm/dock_canvasspecific.cpp | 175 + synfig-studio/src/gtkmm/dock_canvasspecific.h | 73 + synfig-studio/src/gtkmm/dock_children.cpp | 120 + synfig-studio/src/gtkmm/dock_children.h | 60 + synfig-studio/src/gtkmm/dock_curves.cpp | 199 + synfig-studio/src/gtkmm/dock_curves.h | 74 + synfig-studio/src/gtkmm/dock_history.cpp | 468 ++ synfig-studio/src/gtkmm/dock_history.h | 90 + synfig-studio/src/gtkmm/dock_info.cpp | 144 + synfig-studio/src/gtkmm/dock_info.h | 65 + synfig-studio/src/gtkmm/dock_keyframes.cpp | 190 + synfig-studio/src/gtkmm/dock_keyframes.h | 79 + synfig-studio/src/gtkmm/dock_layergroups.cpp | 136 + synfig-studio/src/gtkmm/dock_layergroups.h | 71 + synfig-studio/src/gtkmm/dock_layers.cpp | 296 ++ synfig-studio/src/gtkmm/dock_layers.h | 79 + synfig-studio/src/gtkmm/dock_metadata.cpp | 144 + synfig-studio/src/gtkmm/dock_metadata.h | 71 + synfig-studio/src/gtkmm/dock_navigator.cpp | 523 ++ synfig-studio/src/gtkmm/dock_navigator.h | 121 + synfig-studio/src/gtkmm/dock_params.cpp | 140 + synfig-studio/src/gtkmm/dock_params.h | 64 + synfig-studio/src/gtkmm/dock_timetrack.cpp | 527 ++ synfig-studio/src/gtkmm/dock_timetrack.h | 71 + synfig-studio/src/gtkmm/dockable.cpp | 403 ++ synfig-studio/src/gtkmm/dockable.h | 146 + synfig-studio/src/gtkmm/dockbook.cpp | 255 + synfig-studio/src/gtkmm/dockbook.h | 89 + synfig-studio/src/gtkmm/dockdialog.cpp | 564 ++ synfig-studio/src/gtkmm/dockdialog.h | 128 + synfig-studio/src/gtkmm/dockmanager.cpp | 328 ++ synfig-studio/src/gtkmm/dockmanager.h | 82 + synfig-studio/src/gtkmm/duck.cpp | 244 + synfig-studio/src/gtkmm/duck.h | 303 ++ synfig-studio/src/gtkmm/duckmatic.cpp | 1934 +++++++ synfig-studio/src/gtkmm/duckmatic.h | 452 ++ synfig-studio/src/gtkmm/ducktransform_rotate.h | 75 + synfig-studio/src/gtkmm/ducktransform_scale.h | 56 + synfig-studio/src/gtkmm/ducktransform_translate.h | 55 + synfig-studio/src/gtkmm/event_layerclick.h | 64 + synfig-studio/src/gtkmm/event_mouse.h | 106 + synfig-studio/src/gtkmm/eventkey.h | 74 + synfig-studio/src/gtkmm/framedial.cpp | 91 + synfig-studio/src/gtkmm/framedial.h | 79 + synfig-studio/src/gtkmm/general.h | 54 + synfig-studio/src/gtkmm/groupactionmanager.cpp | 275 + synfig-studio/src/gtkmm/groupactionmanager.h | 85 + synfig-studio/src/gtkmm/historytreestore.cpp | 235 + synfig-studio/src/gtkmm/historytreestore.h | 172 + synfig-studio/src/gtkmm/iconcontroller.cpp | 432 ++ synfig-studio/src/gtkmm/iconcontroller.h | 73 + synfig-studio/src/gtkmm/instance.cpp | 1265 +++++ synfig-studio/src/gtkmm/instance.h | 237 + synfig-studio/src/gtkmm/ipc.cpp | 343 ++ synfig-studio/src/gtkmm/ipc.h | 65 + synfig-studio/src/gtkmm/keyframeactionmanager.cpp | 251 + synfig-studio/src/gtkmm/keyframeactionmanager.h | 91 + synfig-studio/src/gtkmm/keyframedial.cpp | 96 + synfig-studio/src/gtkmm/keyframedial.h | 74 + synfig-studio/src/gtkmm/keyframetree.cpp | 292 ++ synfig-studio/src/gtkmm/keyframetree.h | 149 + synfig-studio/src/gtkmm/keyframetreestore.cpp | 901 ++++ synfig-studio/src/gtkmm/keyframetreestore.h | 224 + synfig-studio/src/gtkmm/keymapsettings.cpp | 113 + synfig-studio/src/gtkmm/keymapsettings.h | 83 + synfig-studio/src/gtkmm/layeractionmanager.cpp | 524 ++ synfig-studio/src/gtkmm/layeractionmanager.h | 112 + synfig-studio/src/gtkmm/layergrouptree.cpp | 334 ++ synfig-studio/src/gtkmm/layergrouptree.h | 127 + synfig-studio/src/gtkmm/layergrouptreestore.cpp | 1030 ++++ synfig-studio/src/gtkmm/layergrouptreestore.h | 202 + synfig-studio/src/gtkmm/layerparamtreestore.cpp | 577 +++ synfig-studio/src/gtkmm/layerparamtreestore.h | 166 + synfig-studio/src/gtkmm/layertree.cpp | 1232 +++++ synfig-studio/src/gtkmm/layertree.h | 261 + synfig-studio/src/gtkmm/layertreestore.cpp | 1081 ++++ synfig-studio/src/gtkmm/layertreestore.h | 226 + synfig-studio/src/gtkmm/main.cpp | 131 + synfig-studio/src/gtkmm/metadatatreestore.cpp | 152 + synfig-studio/src/gtkmm/metadatatreestore.h | 133 + synfig-studio/src/gtkmm/mod_mirror/mod_mirror.cpp | 68 + synfig-studio/src/gtkmm/mod_mirror/mod_mirror.h | 59 + .../src/gtkmm/mod_mirror/state_mirror.cpp | 306 ++ synfig-studio/src/gtkmm/mod_mirror/state_mirror.h | 55 + .../src/gtkmm/mod_palette/dock_palbrowse.cpp | 62 + .../src/gtkmm/mod_palette/dock_palbrowse.h | 65 + .../src/gtkmm/mod_palette/dock_paledit.cpp | 384 ++ synfig-studio/src/gtkmm/mod_palette/dock_paledit.h | 113 + .../src/gtkmm/mod_palette/mod_palette.cpp | 80 + synfig-studio/src/gtkmm/mod_palette/mod_palette.h | 64 + synfig-studio/src/gtkmm/module.cpp | 85 + synfig-studio/src/gtkmm/module.h | 67 + synfig-studio/src/gtkmm/onemoment.cpp | 121 + synfig-studio/src/gtkmm/onemoment.h | 56 + synfig-studio/src/gtkmm/preview.cpp | 893 ++++ synfig-studio/src/gtkmm/preview.h | 260 + synfig-studio/src/gtkmm/renddesc.cpp | 620 +++ synfig-studio/src/gtkmm/renddesc.h | 161 + synfig-studio/src/gtkmm/render.cpp | 363 ++ synfig-studio/src/gtkmm/render.h | 104 + synfig-studio/src/gtkmm/renderer_bbox.cpp | 144 + synfig-studio/src/gtkmm/renderer_bbox.h | 63 + synfig-studio/src/gtkmm/renderer_canvas.cpp | 219 + synfig-studio/src/gtkmm/renderer_canvas.h | 63 + synfig-studio/src/gtkmm/renderer_dragbox.cpp | 154 + synfig-studio/src/gtkmm/renderer_dragbox.h | 61 + synfig-studio/src/gtkmm/renderer_ducks.cpp | 489 ++ synfig-studio/src/gtkmm/renderer_ducks.h | 84 + synfig-studio/src/gtkmm/renderer_grid.cpp | 173 + synfig-studio/src/gtkmm/renderer_grid.h | 59 + synfig-studio/src/gtkmm/renderer_guides.cpp | 284 + synfig-studio/src/gtkmm/renderer_guides.h | 62 + synfig-studio/src/gtkmm/renderer_timecode.cpp | 169 + synfig-studio/src/gtkmm/renderer_timecode.h | 59 + synfig-studio/src/gtkmm/resolutiondial.cpp | 97 + synfig-studio/src/gtkmm/resolutiondial.h | 77 + synfig-studio/src/gtkmm/smach.h | 49 + synfig-studio/src/gtkmm/splash.cpp | 252 + synfig-studio/src/gtkmm/splash.h | 72 + synfig-studio/src/gtkmm/state_bline.cpp | 1413 +++++ synfig-studio/src/gtkmm/state_bline.h | 55 + synfig-studio/src/gtkmm/state_circle.cpp | 1063 ++++ synfig-studio/src/gtkmm/state_circle.h | 56 + synfig-studio/src/gtkmm/state_draw.cpp | 2032 ++++++++ synfig-studio/src/gtkmm/state_draw.h | 56 + synfig-studio/src/gtkmm/state_eyedrop.cpp | 143 + synfig-studio/src/gtkmm/state_eyedrop.h | 56 + synfig-studio/src/gtkmm/state_fill.cpp | 179 + synfig-studio/src/gtkmm/state_fill.h | 56 + synfig-studio/src/gtkmm/state_gradient.cpp | 543 ++ synfig-studio/src/gtkmm/state_gradient.h | 56 + synfig-studio/src/gtkmm/state_normal.cpp | 422 ++ synfig-studio/src/gtkmm/state_normal.h | 56 + synfig-studio/src/gtkmm/state_polygon.cpp | 943 ++++ synfig-studio/src/gtkmm/state_polygon.h | 55 + synfig-studio/src/gtkmm/state_rectangle.cpp | 872 ++++ synfig-studio/src/gtkmm/state_rectangle.h | 56 + synfig-studio/src/gtkmm/state_rotate.cpp | 387 ++ synfig-studio/src/gtkmm/state_rotate.h | 56 + synfig-studio/src/gtkmm/state_scale.cpp | 377 ++ synfig-studio/src/gtkmm/state_scale.h | 55 + synfig-studio/src/gtkmm/state_sketch.cpp | 505 ++ synfig-studio/src/gtkmm/state_sketch.h | 55 + synfig-studio/src/gtkmm/state_smoothmove.cpp | 333 ++ synfig-studio/src/gtkmm/state_smoothmove.h | 56 + synfig-studio/src/gtkmm/state_star.cpp | 1088 ++++ synfig-studio/src/gtkmm/state_star.h | 57 + synfig-studio/src/gtkmm/state_stroke.cpp | 198 + synfig-studio/src/gtkmm/state_stroke.h | 80 + synfig-studio/src/gtkmm/state_text.cpp | 457 ++ synfig-studio/src/gtkmm/state_text.h | 57 + synfig-studio/src/gtkmm/state_width.cpp | 603 +++ synfig-studio/src/gtkmm/state_width.h | 56 + synfig-studio/src/gtkmm/state_zoom.cpp | 260 + synfig-studio/src/gtkmm/state_zoom.h | 55 + synfig-studio/src/gtkmm/statemanager.cpp | 128 + synfig-studio/src/gtkmm/statemanager.h | 69 + synfig-studio/src/gtkmm/toggleducksdial.cpp | 97 + synfig-studio/src/gtkmm/toggleducksdial.h | 81 + synfig-studio/src/gtkmm/toolbox.cpp | 667 +++ synfig-studio/src/gtkmm/toolbox.h | 108 + synfig-studio/src/gtkmm/valuelink.cpp | 171 + synfig-studio/src/gtkmm/valuelink.h | 82 + synfig-studio/src/gtkmm/widget_canvaschooser.cpp | 167 + synfig-studio/src/gtkmm/widget_canvaschooser.h | 67 + synfig-studio/src/gtkmm/widget_color.cpp | 195 + synfig-studio/src/gtkmm/widget_color.h | 78 + synfig-studio/src/gtkmm/widget_coloredit.cpp | 587 +++ synfig-studio/src/gtkmm/widget_coloredit.h | 188 + synfig-studio/src/gtkmm/widget_compselect.cpp | 173 + synfig-studio/src/gtkmm/widget_compselect.h | 74 + synfig-studio/src/gtkmm/widget_curves.cpp | 588 +++ synfig-studio/src/gtkmm/widget_curves.h | 81 + synfig-studio/src/gtkmm/widget_defaults.cpp | 611 +++ synfig-studio/src/gtkmm/widget_defaults.h | 99 + synfig-studio/src/gtkmm/widget_distance.cpp | 99 + synfig-studio/src/gtkmm/widget_distance.h | 72 + synfig-studio/src/gtkmm/widget_enum.cpp | 115 + synfig-studio/src/gtkmm/widget_enum.h | 67 + synfig-studio/src/gtkmm/widget_filename.cpp | 122 + synfig-studio/src/gtkmm/widget_filename.h | 72 + synfig-studio/src/gtkmm/widget_gradient.cpp | 370 ++ synfig-studio/src/gtkmm/widget_gradient.h | 102 + synfig-studio/src/gtkmm/widget_keyframe_list.cpp | 425 ++ synfig-studio/src/gtkmm/widget_keyframe_list.h | 150 + synfig-studio/src/gtkmm/widget_sound.cpp | 323 ++ synfig-studio/src/gtkmm/widget_sound.h | 99 + synfig-studio/src/gtkmm/widget_time.cpp | 167 + synfig-studio/src/gtkmm/widget_time.h | 84 + synfig-studio/src/gtkmm/widget_timeslider.cpp | 966 ++++ synfig-studio/src/gtkmm/widget_timeslider.h | 133 + synfig-studio/src/gtkmm/widget_value.cpp | 486 ++ synfig-studio/src/gtkmm/widget_value.h | 136 + synfig-studio/src/gtkmm/widget_vector.cpp | 246 + synfig-studio/src/gtkmm/widget_vector.h | 96 + synfig-studio/src/gtkmm/widget_waypoint.cpp | 281 + synfig-studio/src/gtkmm/widget_waypoint.h | 96 + synfig-studio/src/gtkmm/widget_waypointmodel.cpp | 191 + synfig-studio/src/gtkmm/widget_waypointmodel.h | 95 + synfig-studio/src/gtkmm/workarea.cpp | 2792 ++++++++++ synfig-studio/src/gtkmm/workarea.h | 515 ++ synfig-studio/src/gtkmm/workarearenderer.cpp | 134 + synfig-studio/src/gtkmm/workarearenderer.h | 116 + synfig-studio/src/gtkmm/zoomdial.cpp | 81 + synfig-studio/src/gtkmm/zoomdial.h | 70 + synfig-studio/src/synfigapp/Makefile.am | 286 ++ synfig-studio/src/synfigapp/action.cpp | 547 ++ synfig-studio/src/synfigapp/action.h | 396 ++ synfig-studio/src/synfigapp/action_param.cpp | 518 ++ synfig-studio/src/synfigapp/action_param.h | 238 + synfig-studio/src/synfigapp/action_system.cpp | 704 +++ synfig-studio/src/synfigapp/action_system.h | 250 + .../src/synfigapp/actions/activepointadd.cpp | 207 + .../src/synfigapp/actions/activepointadd.h | 81 + .../src/synfigapp/actions/activepointremove.cpp | 179 + .../src/synfigapp/actions/activepointremove.h | 77 + .../src/synfigapp/actions/activepointset.cpp | 292 ++ .../src/synfigapp/actions/activepointset.h | 81 + .../src/synfigapp/actions/activepointsetoff.cpp | 216 + .../src/synfigapp/actions/activepointsetoff.h | 80 + .../src/synfigapp/actions/activepointseton.cpp | 216 + .../src/synfigapp/actions/activepointseton.h | 80 + .../src/synfigapp/actions/activepointsetsmart.cpp | 367 ++ .../src/synfigapp/actions/activepointsetsmart.h | 83 + .../src/synfigapp/actions/activepointsimpleadd.cpp | 185 + .../src/synfigapp/actions/activepointsimpleadd.h | 81 + .../synfigapp/actions/blinepointtangentmerge.cpp | 169 + .../src/synfigapp/actions/blinepointtangentmerge.h | 73 + .../synfigapp/actions/blinepointtangentsplit.cpp | 169 + .../src/synfigapp/actions/blinepointtangentsplit.h | 73 + synfig-studio/src/synfigapp/actions/canvasadd.cpp | 153 + synfig-studio/src/synfigapp/actions/canvasadd.h | 77 + .../src/synfigapp/actions/canvasdescriptionset.cpp | 141 + .../src/synfigapp/actions/canvasdescriptionset.h | 75 + .../src/synfigapp/actions/canvasidset.cpp | 141 + synfig-studio/src/synfigapp/actions/canvasidset.h | 75 + .../src/synfigapp/actions/canvasnameset.cpp | 141 + .../src/synfigapp/actions/canvasnameset.h | 75 + .../src/synfigapp/actions/canvasremove.cpp | 136 + synfig-studio/src/synfigapp/actions/canvasremove.h | 73 + .../src/synfigapp/actions/canvasrenddescset.cpp | 128 + .../src/synfigapp/actions/canvasrenddescset.h | 75 + synfig-studio/src/synfigapp/actions/colorset.cpp | 179 + synfig-studio/src/synfigapp/actions/colorset.h | 92 + .../src/synfigapp/actions/editmodeset.cpp | 131 + synfig-studio/src/synfigapp/actions/editmodeset.h | 72 + .../src/synfigapp/actions/gradientset.cpp | 148 + synfig-studio/src/synfigapp/actions/gradientset.h | 74 + .../src/synfigapp/actions/groupaddlayers.cpp | 147 + .../src/synfigapp/actions/groupaddlayers.h | 79 + .../src/synfigapp/actions/groupremove.cpp | 136 + synfig-studio/src/synfigapp/actions/groupremove.h | 79 + .../src/synfigapp/actions/groupremovelayers.cpp | 131 + .../src/synfigapp/actions/groupremovelayers.h | 77 + .../src/synfigapp/actions/grouprename.cpp | 132 + synfig-studio/src/synfigapp/actions/grouprename.h | 81 + .../src/synfigapp/actions/keyframeadd.cpp | 139 + synfig-studio/src/synfigapp/actions/keyframeadd.h | 74 + .../src/synfigapp/actions/keyframeduplicate.cpp | 246 + .../src/synfigapp/actions/keyframeduplicate.h | 77 + .../src/synfigapp/actions/keyframeremove.cpp | 234 + .../src/synfigapp/actions/keyframeremove.h | 76 + .../src/synfigapp/actions/keyframeset.cpp | 432 ++ synfig-studio/src/synfigapp/actions/keyframeset.h | 89 + .../src/synfigapp/actions/keyframesetdelta.cpp | 264 + .../src/synfigapp/actions/keyframesetdelta.h | 84 + .../src/synfigapp/actions/keyframewaypointset.cpp | 179 + .../src/synfigapp/actions/keyframewaypointset.h | 77 + .../src/synfigapp/actions/layeractivate.cpp | 198 + .../src/synfigapp/actions/layeractivate.h | 76 + synfig-studio/src/synfigapp/actions/layeradd.cpp | 158 + synfig-studio/src/synfigapp/actions/layeradd.h | 74 + .../src/synfigapp/actions/layerduplicate.cpp | 222 + .../src/synfigapp/actions/layerduplicate.h | 75 + .../src/synfigapp/actions/layerencapsulate.cpp | 226 + .../src/synfigapp/actions/layerencapsulate.h | 74 + synfig-studio/src/synfigapp/actions/layerlower.cpp | 165 + synfig-studio/src/synfigapp/actions/layerlower.h | 71 + synfig-studio/src/synfigapp/actions/layermove.cpp | 273 + synfig-studio/src/synfigapp/actions/layermove.h | 79 + .../src/synfigapp/actions/layerparamconnect.cpp | 190 + .../src/synfigapp/actions/layerparamconnect.h | 79 + .../src/synfigapp/actions/layerparamdisconnect.cpp | 179 + .../src/synfigapp/actions/layerparamdisconnect.h | 78 + .../src/synfigapp/actions/layerparamset.cpp | 173 + .../src/synfigapp/actions/layerparamset.h | 78 + synfig-studio/src/synfigapp/actions/layerraise.cpp | 161 + synfig-studio/src/synfigapp/actions/layerraise.h | 71 + .../src/synfigapp/actions/layerremove.cpp | 190 + synfig-studio/src/synfigapp/actions/layerremove.h | 78 + .../src/synfigapp/actions/layersetdesc.cpp | 155 + synfig-studio/src/synfigapp/actions/layersetdesc.h | 76 + .../src/synfigapp/actions/timepointscopy.cpp | 325 ++ .../src/synfigapp/actions/timepointscopy.h | 82 + .../src/synfigapp/actions/timepointsdelete.cpp | 288 ++ .../src/synfigapp/actions/timepointsdelete.h | 80 + .../src/synfigapp/actions/timepointsmove.cpp | 330 ++ .../src/synfigapp/actions/timepointsmove.h | 85 + .../src/synfigapp/actions/valuedescblinelink.cpp | 273 + .../src/synfigapp/actions/valuedescblinelink.h | 77 + .../src/synfigapp/actions/valuedescconnect.cpp | 258 + .../src/synfigapp/actions/valuedescconnect.h | 73 + .../src/synfigapp/actions/valuedescconvert.cpp | 254 + .../src/synfigapp/actions/valuedescconvert.h | 74 + .../src/synfigapp/actions/valuedescdisconnect.cpp | 236 + .../src/synfigapp/actions/valuedescdisconnect.h | 72 + .../src/synfigapp/actions/valuedescexport.cpp | 248 + .../src/synfigapp/actions/valuedescexport.h | 72 + .../src/synfigapp/actions/valuedesclink.cpp | 308 ++ .../src/synfigapp/actions/valuedesclink.h | 76 + .../src/synfigapp/actions/valuedescset.cpp | 566 ++ synfig-studio/src/synfigapp/actions/valuedescset.h | 75 + .../src/synfigapp/actions/valuenodeadd.cpp | 165 + synfig-studio/src/synfigapp/actions/valuenodeadd.h | 75 + .../src/synfigapp/actions/valuenodeconstset.cpp | 150 + .../src/synfigapp/actions/valuenodeconstset.h | 77 + .../actions/valuenodedynamiclistinsert.cpp | 199 + .../synfigapp/actions/valuenodedynamiclistinsert.h | 83 + .../actions/valuenodedynamiclistinsertsmart.cpp | 272 + .../actions/valuenodedynamiclistinsertsmart.h | 78 + .../synfigapp/actions/valuenodedynamiclistloop.cpp | 176 + .../synfigapp/actions/valuenodedynamiclistloop.h | 78 + .../actions/valuenodedynamiclistremove.cpp | 155 + .../synfigapp/actions/valuenodedynamiclistremove.h | 78 + .../actions/valuenodedynamiclistremovesmart.cpp | 190 + .../actions/valuenodedynamiclistremovesmart.h | 78 + .../actions/valuenodedynamiclistrotateorder.cpp | 166 + .../actions/valuenodedynamiclistrotateorder.h | 76 + .../actions/valuenodedynamiclistunloop.cpp | 178 + .../synfigapp/actions/valuenodedynamiclistunloop.h | 78 + .../src/synfigapp/actions/valuenodelinkconnect.cpp | 162 + .../src/synfigapp/actions/valuenodelinkconnect.h | 78 + .../synfigapp/actions/valuenodelinkdisconnect.cpp | 173 + .../synfigapp/actions/valuenodelinkdisconnect.h | 77 + .../src/synfigapp/actions/valuenoderemove.cpp | 187 + .../src/synfigapp/actions/valuenoderemove.h | 78 + .../src/synfigapp/actions/valuenoderename.cpp | 177 + .../src/synfigapp/actions/valuenoderename.h | 77 + .../src/synfigapp/actions/valuenodereplace.cpp | 227 + .../src/synfigapp/actions/valuenodereplace.h | 76 + .../src/synfigapp/actions/waypointadd.cpp | 212 + synfig-studio/src/synfigapp/actions/waypointadd.h | 83 + .../src/synfigapp/actions/waypointconnect.cpp | 159 + .../src/synfigapp/actions/waypointconnect.h | 79 + .../src/synfigapp/actions/waypointdisconnect.cpp | 172 + .../src/synfigapp/actions/waypointdisconnect.h | 80 + .../src/synfigapp/actions/waypointremove.cpp | 209 + .../src/synfigapp/actions/waypointremove.h | 78 + .../src/synfigapp/actions/waypointset.cpp | 269 + synfig-studio/src/synfigapp/actions/waypointset.h | 80 + .../src/synfigapp/actions/waypointsetsmart.cpp | 440 ++ .../src/synfigapp/actions/waypointsetsmart.h | 82 + .../src/synfigapp/actions/waypointsimpleadd.cpp | 160 + .../src/synfigapp/actions/waypointsimpleadd.h | 80 + synfig-studio/src/synfigapp/blineconvert.cpp | 839 +++ synfig-studio/src/synfigapp/blineconvert.h | 116 + synfig-studio/src/synfigapp/canvasinterface.cpp | 1009 ++++ synfig-studio/src/synfigapp/canvasinterface.h | 313 ++ synfig-studio/src/synfigapp/cvs.cpp | 381 ++ synfig-studio/src/synfigapp/cvs.h | 104 + synfig-studio/src/synfigapp/editmode.h | 84 + synfig-studio/src/synfigapp/general.h | 56 + synfig-studio/src/synfigapp/inputdevice.cpp | 306 ++ synfig-studio/src/synfigapp/inputdevice.h | 147 + synfig-studio/src/synfigapp/instance.cpp | 186 + synfig-studio/src/synfigapp/instance.h | 139 + synfig-studio/src/synfigapp/main.cpp | 411 ++ synfig-studio/src/synfigapp/main.h | 113 + synfig-studio/src/synfigapp/selectionmanager.h | 147 + synfig-studio/src/synfigapp/settings.cpp | 259 + synfig-studio/src/synfigapp/settings.h | 79 + synfig-studio/src/synfigapp/timegather.cpp | 305 ++ synfig-studio/src/synfigapp/timegather.h | 136 + synfig-studio/src/synfigapp/uimanager.cpp | 187 + synfig-studio/src/synfigapp/uimanager.h | 130 + synfig-studio/src/synfigapp/value_desc.cpp | 98 + synfig-studio/src/synfigapp/value_desc.h | 201 + synfig-studio/src/template.cpp | 54 + synfig-studio/src/template.h | 42 + synfig-studio/studio.kdevprj | 395 ++ synfig-studio/studio.pbproj/project.pbxproj | 4602 +++++++++++++++++ synfig-studio/studio.prj | 167 + synfig-studio/synfigstudio-cph-monitor | 163 + synfig-studio/synfigstudio-thumbnailer.schemas.in | 28 + synfig-studio/synfigstudio.desktop.in | 10 + synfig-studio/synfigstudio.keys.in | 10 + synfig-studio/synfigstudio.mime.in | 4 + synfig-studio/synfigstudio.xml.in | 5 + synfig-studio/trunk/AUTHORS | 36 - synfig-studio/trunk/ChangeLog.old | 342 -- synfig-studio/trunk/Makefile.am | 145 - synfig-studio/trunk/NEWS | 147 - synfig-studio/trunk/README | 57 - synfig-studio/trunk/TODO | 32 - synfig-studio/trunk/build_tools/Makefile.am | 8 - synfig-studio/trunk/build_tools/autorevision.sh | 108 - synfig-studio/trunk/config/ltmain.patch | 17 - synfig-studio/trunk/config/package | 293 -- synfig-studio/trunk/configure.ac | 309 -- synfig-studio/trunk/debugcrash | 2 - synfig-studio/trunk/doxygen.cfg.in | 1220 ----- synfig-studio/trunk/images/Makefile.am | 305 -- synfig-studio/trunk/images/Makefile.inc | 35 - synfig-studio/trunk/images/about_icon.sif | 65 - synfig-studio/trunk/images/angle_icon.sif | 65 - synfig-studio/trunk/images/bline_icon.sif | 1813 ------- synfig-studio/trunk/images/blinepoint_icon.sif | 66 - synfig-studio/trunk/images/bool_icon.sif | 266 - synfig-studio/trunk/images/canvas_icon.sif | 332 -- synfig-studio/trunk/images/canvas_pointer_icon.sif | 193 - synfig-studio/trunk/images/children_icon.sif | 80 - synfig-studio/trunk/images/circle_icon.sif | 289 -- synfig-studio/trunk/images/clear_redo_icon.sif | 1834 ------- synfig-studio/trunk/images/clear_undo_icon.sif | 1834 ------- synfig-studio/trunk/images/color_icon.sif | 391 -- synfig-studio/trunk/images/curves_icon.sif | 1178 ----- synfig-studio/trunk/images/draw_icon.sif | 2879 ----------- synfig-studio/trunk/images/duck_angle_icon.sif | 1139 ----- synfig-studio/trunk/images/duck_position_icon.sif | 959 ---- synfig-studio/trunk/images/duck_radius_icon.sif | 1232 ----- synfig-studio/trunk/images/duck_tangent_icon.sif | 1838 ------- synfig-studio/trunk/images/duck_vertex_icon.sif | 575 --- synfig-studio/trunk/images/duck_width_icon.sif | 1426 ------ synfig-studio/trunk/images/duplicate_icon.sif | 366 -- synfig-studio/trunk/images/encapsulate_icon.sif | 2548 --------- synfig-studio/trunk/images/eyedrop_icon.sif | 2834 ---------- synfig-studio/trunk/images/fill_icon.sif | 1935 ------- synfig-studio/trunk/images/gradient_icon.sif | 286 -- synfig-studio/trunk/images/group_icon.sif | 2065 -------- synfig-studio/trunk/images/info_icon.sif | 106 - synfig-studio/trunk/images/installer_logo.sif | 568 -- synfig-studio/trunk/images/installer_logo_osx.sif | 613 --- synfig-studio/trunk/images/integer_icon.sif | 66 - synfig-studio/trunk/images/keyframe_icon.sif | 331 -- synfig-studio/trunk/images/keyframe_lock_icon.sif | 2407 --------- synfig-studio/trunk/images/layer_icon.sif | 332 -- synfig-studio/trunk/images/list_icon.sif | 65 - synfig-studio/trunk/images/logo.sif | 3062 ----------- synfig-studio/trunk/images/meta_data_icon.sif | 80 - synfig-studio/trunk/images/mirror_icon.sif | 3147 ------------ synfig-studio/trunk/images/navigator_icon.sif | 451 -- synfig-studio/trunk/images/normal_icon.sif | 310 -- synfig-studio/trunk/images/onion_skin_icon.sif | 3897 -------------- synfig-studio/trunk/images/pastecanvas_icon.sif | 2065 -------- synfig-studio/trunk/images/plant_icon.sif | 961 ---- synfig-studio/trunk/images/polygon_icon.sif | 886 ---- synfig-studio/trunk/images/polyline_icon.sif | 788 --- synfig-studio/trunk/images/real_icon.sif | 281 - synfig-studio/trunk/images/rectangle_icon.sif | 286 -- synfig-studio/trunk/images/rename_icon.sif | 3542 ------------- synfig-studio/trunk/images/reset_colors_icon.sif | 219 - synfig-studio/trunk/images/rotate_icon.sif | 2393 --------- synfig-studio/trunk/images/saveall_icon.sif | 66 - synfig-studio/trunk/images/scale_icon.sif | 3494 ------------- synfig-studio/trunk/images/seek_begin.sif | 339 -- synfig-studio/trunk/images/seek_end.sif | 339 -- synfig-studio/trunk/images/seek_next_frame.sif | 339 -- synfig-studio/trunk/images/seek_prev_frame.sif | 339 -- synfig-studio/trunk/images/segment_icon.sif | 65 - .../trunk/images/select_all_child_layers_icon.sif | 2949 ----------- synfig-studio/trunk/images/set_fill_color.sif | 306 -- synfig-studio/trunk/images/set_outline_color.sif | 306 -- synfig-studio/trunk/images/show_grid_icon.sif | 1155 ----- synfig-studio/trunk/images/sif_icon.sif | 1236 ----- synfig-studio/trunk/images/sketch_icon.sif | 2351 --------- synfig-studio/trunk/images/smooth_move_icon.sif | 3458 ------------- synfig-studio/trunk/images/snap_grid_icon.sif | 1155 ----- .../trunk/images/splash_screen-0.61.07.sif | 1992 -------- .../trunk/images/splash_screen-0.61.08.sif | 3075 ----------- synfig-studio/trunk/images/splash_screen.sifz | Bin 323622 -> 0 bytes synfig-studio/trunk/images/star_icon.sif | 551 -- synfig-studio/trunk/images/string_icon.sif | 65 - synfig-studio/trunk/images/swap_colors_icon.sif | 308 -- synfig-studio/trunk/images/synfig_icon.sif | 65 - synfig-studio/trunk/images/synfig_icon.svg | 256 - synfig-studio/trunk/images/text_icon.sif | 1868 ------- synfig-studio/trunk/images/time_icon.sif | 1198 ----- synfig-studio/trunk/images/time_track_icon.sif | 242 - synfig-studio/trunk/images/valuenode_icon.sif | 240 - synfig-studio/trunk/images/vector_icon.sif | 250 - synfig-studio/trunk/images/wallpaper.sif | 687 --- synfig-studio/trunk/images/width_icon.sif | 153 - synfig-studio/trunk/images/zoom_icon.sif | 1967 ------- synfig-studio/trunk/m4/ETL.m4 | 75 - synfig-studio/trunk/m4/cxx_macros.m4 | 88 - synfig-studio/trunk/m4/gnome.m4 | 405 -- synfig-studio/trunk/m4/libxml.m4 | 389 -- synfig-studio/trunk/m4/subs.m4 | 245 - synfig-studio/trunk/m4/synfig.m4 | 51 - synfig-studio/trunk/macosxbuild.sh | 48 - .../macosx/studio-resources/Description.plist | 8 - .../English.lproj/InstallationCheck.strings | 2 - .../pkg-info/macosx/studio-resources/ReadMe.txt | 1 - .../pkg-info/macosx/studio-resources/Welcome.txt | 1 - .../pkg-info/macosx/studio-resources/install.sh | 61 - .../studio-resources/synfig-studio.post_install | 61 - .../studio-resources/synfig-studio.post_upgrade | 61 - .../pkg-info/macosx/studio-resources/upgrade.sh | 61 - .../trunk/pkg-info/macosx/synfig-studio.info.in | 14 - synfig-studio/trunk/po/Makevars | 7 - synfig-studio/trunk/po/POTFILES.in | 419 -- synfig-studio/trunk/po/ca.po | 4206 --------------- synfig-studio/trunk/po/es.po | 4439 ---------------- synfig-studio/trunk/po/fr.po | 4450 ---------------- synfig-studio/trunk/po/ru.po | 4430 ---------------- synfig-studio/trunk/src/Makefile.am | 11 - synfig-studio/trunk/src/gtkmm/Makefile.am | 385 -- synfig-studio/trunk/src/gtkmm/about.cpp | 240 - synfig-studio/trunk/src/gtkmm/about.h | 55 - synfig-studio/trunk/src/gtkmm/adjust_window.cpp | 170 - synfig-studio/trunk/src/gtkmm/adjust_window.h | 94 - synfig-studio/trunk/src/gtkmm/app.cpp | 2599 ---------- synfig-studio/trunk/src/gtkmm/app.h | 363 -- synfig-studio/trunk/src/gtkmm/asyncrenderer.cpp | 541 -- synfig-studio/trunk/src/gtkmm/asyncrenderer.h | 121 - synfig-studio/trunk/src/gtkmm/audiocontainer.cpp | 1429 ------ synfig-studio/trunk/src/gtkmm/audiocontainer.h | 139 - synfig-studio/trunk/src/gtkmm/autorecover.cpp | 330 -- synfig-studio/trunk/src/gtkmm/autorecover.h | 75 - synfig-studio/trunk/src/gtkmm/canvasoptions.cpp | 215 - synfig-studio/trunk/src/gtkmm/canvasoptions.h | 82 - synfig-studio/trunk/src/gtkmm/canvasproperties.cpp | 255 - synfig-studio/trunk/src/gtkmm/canvasproperties.h | 87 - synfig-studio/trunk/src/gtkmm/canvastreestore.cpp | 622 --- synfig-studio/trunk/src/gtkmm/canvastreestore.h | 195 - synfig-studio/trunk/src/gtkmm/canvasview.cpp | 4273 ---------------- synfig-studio/trunk/src/gtkmm/canvasview.h | 741 --- .../trunk/src/gtkmm/cellrenderer_gradient.cpp | 95 - .../trunk/src/gtkmm/cellrenderer_gradient.h | 88 - .../trunk/src/gtkmm/cellrenderer_time.cpp | 133 - synfig-studio/trunk/src/gtkmm/cellrenderer_time.h | 94 - .../trunk/src/gtkmm/cellrenderer_timetrack.cpp | 906 ---- .../trunk/src/gtkmm/cellrenderer_timetrack.h | 207 - .../trunk/src/gtkmm/cellrenderer_value.cpp | 604 --- synfig-studio/trunk/src/gtkmm/cellrenderer_value.h | 135 - synfig-studio/trunk/src/gtkmm/childrentree.cpp | 436 -- synfig-studio/trunk/src/gtkmm/childrentree.h | 178 - .../trunk/src/gtkmm/childrentreestore.cpp | 389 -- synfig-studio/trunk/src/gtkmm/childrentreestore.h | 143 - synfig-studio/trunk/src/gtkmm/compview.cpp | 615 --- synfig-studio/trunk/src/gtkmm/compview.h | 128 - synfig-studio/trunk/src/gtkmm/devicetracker.cpp | 141 - synfig-studio/trunk/src/gtkmm/devicetracker.h | 56 - synfig-studio/trunk/src/gtkmm/dialog_color.cpp | 155 - synfig-studio/trunk/src/gtkmm/dialog_color.h | 88 - synfig-studio/trunk/src/gtkmm/dialog_gradient.cpp | 201 - synfig-studio/trunk/src/gtkmm/dialog_gradient.h | 117 - synfig-studio/trunk/src/gtkmm/dialog_keyframe.cpp | 148 - synfig-studio/trunk/src/gtkmm/dialog_keyframe.h | 79 - synfig-studio/trunk/src/gtkmm/dialog_preview.cpp | 220 - synfig-studio/trunk/src/gtkmm/dialog_preview.h | 132 - synfig-studio/trunk/src/gtkmm/dialog_setup.cpp | 840 --- synfig-studio/trunk/src/gtkmm/dialog_setup.h | 222 - .../trunk/src/gtkmm/dialog_soundselect.cpp | 129 - synfig-studio/trunk/src/gtkmm/dialog_soundselect.h | 86 - .../trunk/src/gtkmm/dialog_tooloptions.cpp | 101 - synfig-studio/trunk/src/gtkmm/dialog_tooloptions.h | 63 - synfig-studio/trunk/src/gtkmm/dialog_waypoint.cpp | 141 - synfig-studio/trunk/src/gtkmm/dialog_waypoint.h | 109 - synfig-studio/trunk/src/gtkmm/dialogsettings.cpp | 201 - synfig-studio/trunk/src/gtkmm/dialogsettings.h | 58 - synfig-studio/trunk/src/gtkmm/dock_canvases.cpp | 251 - synfig-studio/trunk/src/gtkmm/dock_canvases.h | 88 - .../trunk/src/gtkmm/dock_canvasspecific.cpp | 175 - .../trunk/src/gtkmm/dock_canvasspecific.h | 73 - synfig-studio/trunk/src/gtkmm/dock_children.cpp | 120 - synfig-studio/trunk/src/gtkmm/dock_children.h | 60 - synfig-studio/trunk/src/gtkmm/dock_curves.cpp | 199 - synfig-studio/trunk/src/gtkmm/dock_curves.h | 74 - synfig-studio/trunk/src/gtkmm/dock_history.cpp | 468 -- synfig-studio/trunk/src/gtkmm/dock_history.h | 90 - synfig-studio/trunk/src/gtkmm/dock_info.cpp | 144 - synfig-studio/trunk/src/gtkmm/dock_info.h | 65 - synfig-studio/trunk/src/gtkmm/dock_keyframes.cpp | 190 - synfig-studio/trunk/src/gtkmm/dock_keyframes.h | 79 - synfig-studio/trunk/src/gtkmm/dock_layergroups.cpp | 136 - synfig-studio/trunk/src/gtkmm/dock_layergroups.h | 71 - synfig-studio/trunk/src/gtkmm/dock_layers.cpp | 296 -- synfig-studio/trunk/src/gtkmm/dock_layers.h | 79 - synfig-studio/trunk/src/gtkmm/dock_metadata.cpp | 144 - synfig-studio/trunk/src/gtkmm/dock_metadata.h | 71 - synfig-studio/trunk/src/gtkmm/dock_navigator.cpp | 523 -- synfig-studio/trunk/src/gtkmm/dock_navigator.h | 121 - synfig-studio/trunk/src/gtkmm/dock_params.cpp | 140 - synfig-studio/trunk/src/gtkmm/dock_params.h | 64 - synfig-studio/trunk/src/gtkmm/dock_timetrack.cpp | 527 -- synfig-studio/trunk/src/gtkmm/dock_timetrack.h | 71 - synfig-studio/trunk/src/gtkmm/dockable.cpp | 403 -- synfig-studio/trunk/src/gtkmm/dockable.h | 146 - synfig-studio/trunk/src/gtkmm/dockbook.cpp | 255 - synfig-studio/trunk/src/gtkmm/dockbook.h | 89 - synfig-studio/trunk/src/gtkmm/dockdialog.cpp | 564 -- synfig-studio/trunk/src/gtkmm/dockdialog.h | 128 - synfig-studio/trunk/src/gtkmm/dockmanager.cpp | 328 -- synfig-studio/trunk/src/gtkmm/dockmanager.h | 82 - synfig-studio/trunk/src/gtkmm/duck.cpp | 244 - synfig-studio/trunk/src/gtkmm/duck.h | 303 -- synfig-studio/trunk/src/gtkmm/duckmatic.cpp | 1934 ------- synfig-studio/trunk/src/gtkmm/duckmatic.h | 452 -- .../trunk/src/gtkmm/ducktransform_rotate.h | 75 - .../trunk/src/gtkmm/ducktransform_scale.h | 56 - .../trunk/src/gtkmm/ducktransform_translate.h | 55 - synfig-studio/trunk/src/gtkmm/event_layerclick.h | 64 - synfig-studio/trunk/src/gtkmm/event_mouse.h | 106 - synfig-studio/trunk/src/gtkmm/eventkey.h | 74 - synfig-studio/trunk/src/gtkmm/framedial.cpp | 91 - synfig-studio/trunk/src/gtkmm/framedial.h | 79 - synfig-studio/trunk/src/gtkmm/general.h | 54 - .../trunk/src/gtkmm/groupactionmanager.cpp | 275 - synfig-studio/trunk/src/gtkmm/groupactionmanager.h | 85 - synfig-studio/trunk/src/gtkmm/historytreestore.cpp | 235 - synfig-studio/trunk/src/gtkmm/historytreestore.h | 172 - synfig-studio/trunk/src/gtkmm/iconcontroller.cpp | 432 -- synfig-studio/trunk/src/gtkmm/iconcontroller.h | 73 - synfig-studio/trunk/src/gtkmm/instance.cpp | 1265 ----- synfig-studio/trunk/src/gtkmm/instance.h | 237 - synfig-studio/trunk/src/gtkmm/ipc.cpp | 343 -- synfig-studio/trunk/src/gtkmm/ipc.h | 65 - .../trunk/src/gtkmm/keyframeactionmanager.cpp | 251 - .../trunk/src/gtkmm/keyframeactionmanager.h | 91 - synfig-studio/trunk/src/gtkmm/keyframedial.cpp | 96 - synfig-studio/trunk/src/gtkmm/keyframedial.h | 74 - synfig-studio/trunk/src/gtkmm/keyframetree.cpp | 292 -- synfig-studio/trunk/src/gtkmm/keyframetree.h | 149 - .../trunk/src/gtkmm/keyframetreestore.cpp | 901 ---- synfig-studio/trunk/src/gtkmm/keyframetreestore.h | 224 - synfig-studio/trunk/src/gtkmm/keymapsettings.cpp | 113 - synfig-studio/trunk/src/gtkmm/keymapsettings.h | 83 - .../trunk/src/gtkmm/layeractionmanager.cpp | 524 -- synfig-studio/trunk/src/gtkmm/layeractionmanager.h | 112 - synfig-studio/trunk/src/gtkmm/layergrouptree.cpp | 334 -- synfig-studio/trunk/src/gtkmm/layergrouptree.h | 127 - .../trunk/src/gtkmm/layergrouptreestore.cpp | 1030 ---- .../trunk/src/gtkmm/layergrouptreestore.h | 202 - .../trunk/src/gtkmm/layerparamtreestore.cpp | 577 --- .../trunk/src/gtkmm/layerparamtreestore.h | 166 - synfig-studio/trunk/src/gtkmm/layertree.cpp | 1232 ----- synfig-studio/trunk/src/gtkmm/layertree.h | 261 - synfig-studio/trunk/src/gtkmm/layertreestore.cpp | 1081 ---- synfig-studio/trunk/src/gtkmm/layertreestore.h | 226 - synfig-studio/trunk/src/gtkmm/main.cpp | 131 - .../trunk/src/gtkmm/metadatatreestore.cpp | 152 - synfig-studio/trunk/src/gtkmm/metadatatreestore.h | 133 - .../trunk/src/gtkmm/mod_mirror/mod_mirror.cpp | 68 - .../trunk/src/gtkmm/mod_mirror/mod_mirror.h | 59 - .../trunk/src/gtkmm/mod_mirror/state_mirror.cpp | 306 -- .../trunk/src/gtkmm/mod_mirror/state_mirror.h | 55 - .../trunk/src/gtkmm/mod_palette/dock_palbrowse.cpp | 62 - .../trunk/src/gtkmm/mod_palette/dock_palbrowse.h | 65 - .../trunk/src/gtkmm/mod_palette/dock_paledit.cpp | 384 -- .../trunk/src/gtkmm/mod_palette/dock_paledit.h | 113 - .../trunk/src/gtkmm/mod_palette/mod_palette.cpp | 80 - .../trunk/src/gtkmm/mod_palette/mod_palette.h | 64 - synfig-studio/trunk/src/gtkmm/module.cpp | 85 - synfig-studio/trunk/src/gtkmm/module.h | 67 - synfig-studio/trunk/src/gtkmm/onemoment.cpp | 121 - synfig-studio/trunk/src/gtkmm/onemoment.h | 56 - synfig-studio/trunk/src/gtkmm/preview.cpp | 893 ---- synfig-studio/trunk/src/gtkmm/preview.h | 260 - synfig-studio/trunk/src/gtkmm/renddesc.cpp | 620 --- synfig-studio/trunk/src/gtkmm/renddesc.h | 161 - synfig-studio/trunk/src/gtkmm/render.cpp | 363 -- synfig-studio/trunk/src/gtkmm/render.h | 104 - synfig-studio/trunk/src/gtkmm/renderer_bbox.cpp | 144 - synfig-studio/trunk/src/gtkmm/renderer_bbox.h | 63 - synfig-studio/trunk/src/gtkmm/renderer_canvas.cpp | 219 - synfig-studio/trunk/src/gtkmm/renderer_canvas.h | 63 - synfig-studio/trunk/src/gtkmm/renderer_dragbox.cpp | 154 - synfig-studio/trunk/src/gtkmm/renderer_dragbox.h | 61 - synfig-studio/trunk/src/gtkmm/renderer_ducks.cpp | 489 -- synfig-studio/trunk/src/gtkmm/renderer_ducks.h | 84 - synfig-studio/trunk/src/gtkmm/renderer_grid.cpp | 173 - synfig-studio/trunk/src/gtkmm/renderer_grid.h | 59 - synfig-studio/trunk/src/gtkmm/renderer_guides.cpp | 284 - synfig-studio/trunk/src/gtkmm/renderer_guides.h | 62 - .../trunk/src/gtkmm/renderer_timecode.cpp | 169 - synfig-studio/trunk/src/gtkmm/renderer_timecode.h | 59 - synfig-studio/trunk/src/gtkmm/resolutiondial.cpp | 97 - synfig-studio/trunk/src/gtkmm/resolutiondial.h | 77 - synfig-studio/trunk/src/gtkmm/smach.h | 49 - synfig-studio/trunk/src/gtkmm/splash.cpp | 252 - synfig-studio/trunk/src/gtkmm/splash.h | 72 - synfig-studio/trunk/src/gtkmm/state_bline.cpp | 1413 ----- synfig-studio/trunk/src/gtkmm/state_bline.h | 55 - synfig-studio/trunk/src/gtkmm/state_circle.cpp | 1063 ---- synfig-studio/trunk/src/gtkmm/state_circle.h | 56 - synfig-studio/trunk/src/gtkmm/state_draw.cpp | 2032 -------- synfig-studio/trunk/src/gtkmm/state_draw.h | 56 - synfig-studio/trunk/src/gtkmm/state_eyedrop.cpp | 143 - synfig-studio/trunk/src/gtkmm/state_eyedrop.h | 56 - synfig-studio/trunk/src/gtkmm/state_fill.cpp | 179 - synfig-studio/trunk/src/gtkmm/state_fill.h | 56 - synfig-studio/trunk/src/gtkmm/state_gradient.cpp | 543 -- synfig-studio/trunk/src/gtkmm/state_gradient.h | 56 - synfig-studio/trunk/src/gtkmm/state_normal.cpp | 422 -- synfig-studio/trunk/src/gtkmm/state_normal.h | 56 - synfig-studio/trunk/src/gtkmm/state_polygon.cpp | 943 ---- synfig-studio/trunk/src/gtkmm/state_polygon.h | 55 - synfig-studio/trunk/src/gtkmm/state_rectangle.cpp | 872 ---- synfig-studio/trunk/src/gtkmm/state_rectangle.h | 56 - synfig-studio/trunk/src/gtkmm/state_rotate.cpp | 387 -- synfig-studio/trunk/src/gtkmm/state_rotate.h | 56 - synfig-studio/trunk/src/gtkmm/state_scale.cpp | 377 -- synfig-studio/trunk/src/gtkmm/state_scale.h | 55 - synfig-studio/trunk/src/gtkmm/state_sketch.cpp | 505 -- synfig-studio/trunk/src/gtkmm/state_sketch.h | 55 - synfig-studio/trunk/src/gtkmm/state_smoothmove.cpp | 333 -- synfig-studio/trunk/src/gtkmm/state_smoothmove.h | 56 - synfig-studio/trunk/src/gtkmm/state_star.cpp | 1088 ---- synfig-studio/trunk/src/gtkmm/state_star.h | 57 - synfig-studio/trunk/src/gtkmm/state_stroke.cpp | 198 - synfig-studio/trunk/src/gtkmm/state_stroke.h | 80 - synfig-studio/trunk/src/gtkmm/state_text.cpp | 457 -- synfig-studio/trunk/src/gtkmm/state_text.h | 57 - synfig-studio/trunk/src/gtkmm/state_width.cpp | 603 --- synfig-studio/trunk/src/gtkmm/state_width.h | 56 - synfig-studio/trunk/src/gtkmm/state_zoom.cpp | 260 - synfig-studio/trunk/src/gtkmm/state_zoom.h | 55 - synfig-studio/trunk/src/gtkmm/statemanager.cpp | 128 - synfig-studio/trunk/src/gtkmm/statemanager.h | 69 - synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp | 97 - synfig-studio/trunk/src/gtkmm/toggleducksdial.h | 81 - synfig-studio/trunk/src/gtkmm/toolbox.cpp | 667 --- synfig-studio/trunk/src/gtkmm/toolbox.h | 108 - synfig-studio/trunk/src/gtkmm/valuelink.cpp | 171 - synfig-studio/trunk/src/gtkmm/valuelink.h | 82 - .../trunk/src/gtkmm/widget_canvaschooser.cpp | 167 - .../trunk/src/gtkmm/widget_canvaschooser.h | 67 - synfig-studio/trunk/src/gtkmm/widget_color.cpp | 195 - synfig-studio/trunk/src/gtkmm/widget_color.h | 78 - synfig-studio/trunk/src/gtkmm/widget_coloredit.cpp | 587 --- synfig-studio/trunk/src/gtkmm/widget_coloredit.h | 188 - .../trunk/src/gtkmm/widget_compselect.cpp | 173 - synfig-studio/trunk/src/gtkmm/widget_compselect.h | 74 - synfig-studio/trunk/src/gtkmm/widget_curves.cpp | 588 --- synfig-studio/trunk/src/gtkmm/widget_curves.h | 81 - synfig-studio/trunk/src/gtkmm/widget_defaults.cpp | 611 --- synfig-studio/trunk/src/gtkmm/widget_defaults.h | 99 - synfig-studio/trunk/src/gtkmm/widget_distance.cpp | 99 - synfig-studio/trunk/src/gtkmm/widget_distance.h | 72 - synfig-studio/trunk/src/gtkmm/widget_enum.cpp | 115 - synfig-studio/trunk/src/gtkmm/widget_enum.h | 67 - synfig-studio/trunk/src/gtkmm/widget_filename.cpp | 122 - synfig-studio/trunk/src/gtkmm/widget_filename.h | 72 - synfig-studio/trunk/src/gtkmm/widget_gradient.cpp | 370 -- synfig-studio/trunk/src/gtkmm/widget_gradient.h | 102 - .../trunk/src/gtkmm/widget_keyframe_list.cpp | 425 -- .../trunk/src/gtkmm/widget_keyframe_list.h | 150 - synfig-studio/trunk/src/gtkmm/widget_sound.cpp | 323 -- synfig-studio/trunk/src/gtkmm/widget_sound.h | 99 - synfig-studio/trunk/src/gtkmm/widget_time.cpp | 167 - synfig-studio/trunk/src/gtkmm/widget_time.h | 84 - .../trunk/src/gtkmm/widget_timeslider.cpp | 966 ---- synfig-studio/trunk/src/gtkmm/widget_timeslider.h | 133 - synfig-studio/trunk/src/gtkmm/widget_value.cpp | 486 -- synfig-studio/trunk/src/gtkmm/widget_value.h | 136 - synfig-studio/trunk/src/gtkmm/widget_vector.cpp | 246 - synfig-studio/trunk/src/gtkmm/widget_vector.h | 96 - synfig-studio/trunk/src/gtkmm/widget_waypoint.cpp | 281 - synfig-studio/trunk/src/gtkmm/widget_waypoint.h | 96 - .../trunk/src/gtkmm/widget_waypointmodel.cpp | 191 - .../trunk/src/gtkmm/widget_waypointmodel.h | 95 - synfig-studio/trunk/src/gtkmm/workarea.cpp | 2792 ---------- synfig-studio/trunk/src/gtkmm/workarea.h | 515 -- synfig-studio/trunk/src/gtkmm/workarearenderer.cpp | 134 - synfig-studio/trunk/src/gtkmm/workarearenderer.h | 116 - synfig-studio/trunk/src/gtkmm/zoomdial.cpp | 81 - synfig-studio/trunk/src/gtkmm/zoomdial.h | 70 - synfig-studio/trunk/src/synfigapp/Makefile.am | 286 -- synfig-studio/trunk/src/synfigapp/action.cpp | 547 -- synfig-studio/trunk/src/synfigapp/action.h | 396 -- synfig-studio/trunk/src/synfigapp/action_param.cpp | 518 -- synfig-studio/trunk/src/synfigapp/action_param.h | 238 - .../trunk/src/synfigapp/action_system.cpp | 704 --- synfig-studio/trunk/src/synfigapp/action_system.h | 250 - .../trunk/src/synfigapp/actions/activepointadd.cpp | 207 - .../trunk/src/synfigapp/actions/activepointadd.h | 81 - .../src/synfigapp/actions/activepointremove.cpp | 179 - .../src/synfigapp/actions/activepointremove.h | 77 - .../trunk/src/synfigapp/actions/activepointset.cpp | 292 -- .../trunk/src/synfigapp/actions/activepointset.h | 81 - .../src/synfigapp/actions/activepointsetoff.cpp | 216 - .../src/synfigapp/actions/activepointsetoff.h | 80 - .../src/synfigapp/actions/activepointseton.cpp | 216 - .../trunk/src/synfigapp/actions/activepointseton.h | 80 - .../src/synfigapp/actions/activepointsetsmart.cpp | 367 -- .../src/synfigapp/actions/activepointsetsmart.h | 83 - .../src/synfigapp/actions/activepointsimpleadd.cpp | 185 - .../src/synfigapp/actions/activepointsimpleadd.h | 81 - .../synfigapp/actions/blinepointtangentmerge.cpp | 169 - .../src/synfigapp/actions/blinepointtangentmerge.h | 73 - .../synfigapp/actions/blinepointtangentsplit.cpp | 169 - .../src/synfigapp/actions/blinepointtangentsplit.h | 73 - .../trunk/src/synfigapp/actions/canvasadd.cpp | 153 - .../trunk/src/synfigapp/actions/canvasadd.h | 77 - .../src/synfigapp/actions/canvasdescriptionset.cpp | 141 - .../src/synfigapp/actions/canvasdescriptionset.h | 75 - .../trunk/src/synfigapp/actions/canvasidset.cpp | 141 - .../trunk/src/synfigapp/actions/canvasidset.h | 75 - .../trunk/src/synfigapp/actions/canvasnameset.cpp | 141 - .../trunk/src/synfigapp/actions/canvasnameset.h | 75 - .../trunk/src/synfigapp/actions/canvasremove.cpp | 136 - .../trunk/src/synfigapp/actions/canvasremove.h | 73 - .../src/synfigapp/actions/canvasrenddescset.cpp | 128 - .../src/synfigapp/actions/canvasrenddescset.h | 75 - .../trunk/src/synfigapp/actions/colorset.cpp | 179 - .../trunk/src/synfigapp/actions/colorset.h | 92 - .../trunk/src/synfigapp/actions/editmodeset.cpp | 131 - .../trunk/src/synfigapp/actions/editmodeset.h | 72 - .../trunk/src/synfigapp/actions/gradientset.cpp | 148 - .../trunk/src/synfigapp/actions/gradientset.h | 74 - .../trunk/src/synfigapp/actions/groupaddlayers.cpp | 147 - .../trunk/src/synfigapp/actions/groupaddlayers.h | 79 - .../trunk/src/synfigapp/actions/groupremove.cpp | 136 - .../trunk/src/synfigapp/actions/groupremove.h | 79 - .../src/synfigapp/actions/groupremovelayers.cpp | 131 - .../src/synfigapp/actions/groupremovelayers.h | 77 - .../trunk/src/synfigapp/actions/grouprename.cpp | 132 - .../trunk/src/synfigapp/actions/grouprename.h | 81 - .../trunk/src/synfigapp/actions/keyframeadd.cpp | 139 - .../trunk/src/synfigapp/actions/keyframeadd.h | 74 - .../src/synfigapp/actions/keyframeduplicate.cpp | 246 - .../src/synfigapp/actions/keyframeduplicate.h | 77 - .../trunk/src/synfigapp/actions/keyframeremove.cpp | 234 - .../trunk/src/synfigapp/actions/keyframeremove.h | 76 - .../trunk/src/synfigapp/actions/keyframeset.cpp | 432 -- .../trunk/src/synfigapp/actions/keyframeset.h | 89 - .../src/synfigapp/actions/keyframesetdelta.cpp | 264 - .../trunk/src/synfigapp/actions/keyframesetdelta.h | 84 - .../src/synfigapp/actions/keyframewaypointset.cpp | 179 - .../src/synfigapp/actions/keyframewaypointset.h | 77 - .../trunk/src/synfigapp/actions/layeractivate.cpp | 198 - .../trunk/src/synfigapp/actions/layeractivate.h | 76 - .../trunk/src/synfigapp/actions/layeradd.cpp | 158 - .../trunk/src/synfigapp/actions/layeradd.h | 74 - .../trunk/src/synfigapp/actions/layerduplicate.cpp | 222 - .../trunk/src/synfigapp/actions/layerduplicate.h | 75 - .../src/synfigapp/actions/layerencapsulate.cpp | 226 - .../trunk/src/synfigapp/actions/layerencapsulate.h | 74 - .../trunk/src/synfigapp/actions/layerlower.cpp | 165 - .../trunk/src/synfigapp/actions/layerlower.h | 71 - .../trunk/src/synfigapp/actions/layermove.cpp | 273 - .../trunk/src/synfigapp/actions/layermove.h | 79 - .../src/synfigapp/actions/layerparamconnect.cpp | 190 - .../src/synfigapp/actions/layerparamconnect.h | 79 - .../src/synfigapp/actions/layerparamdisconnect.cpp | 179 - .../src/synfigapp/actions/layerparamdisconnect.h | 78 - .../trunk/src/synfigapp/actions/layerparamset.cpp | 173 - .../trunk/src/synfigapp/actions/layerparamset.h | 78 - .../trunk/src/synfigapp/actions/layerraise.cpp | 161 - .../trunk/src/synfigapp/actions/layerraise.h | 71 - .../trunk/src/synfigapp/actions/layerremove.cpp | 190 - .../trunk/src/synfigapp/actions/layerremove.h | 78 - .../trunk/src/synfigapp/actions/layersetdesc.cpp | 155 - .../trunk/src/synfigapp/actions/layersetdesc.h | 76 - .../trunk/src/synfigapp/actions/timepointscopy.cpp | 325 -- .../trunk/src/synfigapp/actions/timepointscopy.h | 82 - .../src/synfigapp/actions/timepointsdelete.cpp | 288 -- .../trunk/src/synfigapp/actions/timepointsdelete.h | 80 - .../trunk/src/synfigapp/actions/timepointsmove.cpp | 330 -- .../trunk/src/synfigapp/actions/timepointsmove.h | 85 - .../src/synfigapp/actions/valuedescblinelink.cpp | 273 - .../src/synfigapp/actions/valuedescblinelink.h | 77 - .../src/synfigapp/actions/valuedescconnect.cpp | 258 - .../trunk/src/synfigapp/actions/valuedescconnect.h | 73 - .../src/synfigapp/actions/valuedescconvert.cpp | 254 - .../trunk/src/synfigapp/actions/valuedescconvert.h | 74 - .../src/synfigapp/actions/valuedescdisconnect.cpp | 236 - .../src/synfigapp/actions/valuedescdisconnect.h | 72 - .../src/synfigapp/actions/valuedescexport.cpp | 248 - .../trunk/src/synfigapp/actions/valuedescexport.h | 72 - .../trunk/src/synfigapp/actions/valuedesclink.cpp | 308 -- .../trunk/src/synfigapp/actions/valuedesclink.h | 76 - .../trunk/src/synfigapp/actions/valuedescset.cpp | 566 -- .../trunk/src/synfigapp/actions/valuedescset.h | 75 - .../trunk/src/synfigapp/actions/valuenodeadd.cpp | 165 - .../trunk/src/synfigapp/actions/valuenodeadd.h | 75 - .../src/synfigapp/actions/valuenodeconstset.cpp | 150 - .../src/synfigapp/actions/valuenodeconstset.h | 77 - .../actions/valuenodedynamiclistinsert.cpp | 199 - .../synfigapp/actions/valuenodedynamiclistinsert.h | 83 - .../actions/valuenodedynamiclistinsertsmart.cpp | 272 - .../actions/valuenodedynamiclistinsertsmart.h | 78 - .../synfigapp/actions/valuenodedynamiclistloop.cpp | 176 - .../synfigapp/actions/valuenodedynamiclistloop.h | 78 - .../actions/valuenodedynamiclistremove.cpp | 155 - .../synfigapp/actions/valuenodedynamiclistremove.h | 78 - .../actions/valuenodedynamiclistremovesmart.cpp | 190 - .../actions/valuenodedynamiclistremovesmart.h | 78 - .../actions/valuenodedynamiclistrotateorder.cpp | 166 - .../actions/valuenodedynamiclistrotateorder.h | 76 - .../actions/valuenodedynamiclistunloop.cpp | 178 - .../synfigapp/actions/valuenodedynamiclistunloop.h | 78 - .../src/synfigapp/actions/valuenodelinkconnect.cpp | 162 - .../src/synfigapp/actions/valuenodelinkconnect.h | 78 - .../synfigapp/actions/valuenodelinkdisconnect.cpp | 173 - .../synfigapp/actions/valuenodelinkdisconnect.h | 77 - .../src/synfigapp/actions/valuenoderemove.cpp | 187 - .../trunk/src/synfigapp/actions/valuenoderemove.h | 78 - .../src/synfigapp/actions/valuenoderename.cpp | 177 - .../trunk/src/synfigapp/actions/valuenoderename.h | 77 - .../src/synfigapp/actions/valuenodereplace.cpp | 227 - .../trunk/src/synfigapp/actions/valuenodereplace.h | 76 - .../trunk/src/synfigapp/actions/waypointadd.cpp | 212 - .../trunk/src/synfigapp/actions/waypointadd.h | 83 - .../src/synfigapp/actions/waypointconnect.cpp | 159 - .../trunk/src/synfigapp/actions/waypointconnect.h | 79 - .../src/synfigapp/actions/waypointdisconnect.cpp | 172 - .../src/synfigapp/actions/waypointdisconnect.h | 80 - .../trunk/src/synfigapp/actions/waypointremove.cpp | 209 - .../trunk/src/synfigapp/actions/waypointremove.h | 78 - .../trunk/src/synfigapp/actions/waypointset.cpp | 269 - .../trunk/src/synfigapp/actions/waypointset.h | 80 - .../src/synfigapp/actions/waypointsetsmart.cpp | 440 -- .../trunk/src/synfigapp/actions/waypointsetsmart.h | 82 - .../src/synfigapp/actions/waypointsimpleadd.cpp | 160 - .../src/synfigapp/actions/waypointsimpleadd.h | 80 - synfig-studio/trunk/src/synfigapp/blineconvert.cpp | 839 --- synfig-studio/trunk/src/synfigapp/blineconvert.h | 116 - .../trunk/src/synfigapp/canvasinterface.cpp | 1009 ---- .../trunk/src/synfigapp/canvasinterface.h | 313 -- synfig-studio/trunk/src/synfigapp/cvs.cpp | 381 -- synfig-studio/trunk/src/synfigapp/cvs.h | 104 - synfig-studio/trunk/src/synfigapp/editmode.h | 84 - synfig-studio/trunk/src/synfigapp/general.h | 56 - synfig-studio/trunk/src/synfigapp/inputdevice.cpp | 306 -- synfig-studio/trunk/src/synfigapp/inputdevice.h | 147 - synfig-studio/trunk/src/synfigapp/instance.cpp | 186 - synfig-studio/trunk/src/synfigapp/instance.h | 139 - synfig-studio/trunk/src/synfigapp/main.cpp | 411 -- synfig-studio/trunk/src/synfigapp/main.h | 113 - .../trunk/src/synfigapp/selectionmanager.h | 147 - synfig-studio/trunk/src/synfigapp/settings.cpp | 259 - synfig-studio/trunk/src/synfigapp/settings.h | 79 - synfig-studio/trunk/src/synfigapp/timegather.cpp | 305 -- synfig-studio/trunk/src/synfigapp/timegather.h | 136 - synfig-studio/trunk/src/synfigapp/uimanager.cpp | 187 - synfig-studio/trunk/src/synfigapp/uimanager.h | 130 - synfig-studio/trunk/src/synfigapp/value_desc.cpp | 98 - synfig-studio/trunk/src/synfigapp/value_desc.h | 201 - synfig-studio/trunk/src/template.cpp | 54 - synfig-studio/trunk/src/template.h | 42 - synfig-studio/trunk/studio.kdevprj | 395 -- synfig-studio/trunk/studio.pbproj/project.pbxproj | 4602 ----------------- synfig-studio/trunk/studio.prj | 167 - synfig-studio/trunk/synfigstudio-cph-monitor | 163 - .../trunk/synfigstudio-thumbnailer.schemas.in | 28 - synfig-studio/trunk/synfigstudio.desktop.in | 10 - synfig-studio/trunk/synfigstudio.keys.in | 10 - synfig-studio/trunk/synfigstudio.mime.in | 4 - synfig-studio/trunk/synfigstudio.xml.in | 5 - synfig-studio/trunk/win32build.sh | 23 - synfig-studio/trunk/win32inst.nsi.in | 197 - synfig-studio/win32build.sh | 23 + synfig-studio/win32inst.nsi.in | 197 + 3424 files changed, 512794 insertions(+), 512794 deletions(-) create mode 100644 ETL/AUTHORS create mode 100644 ETL/ETL-config.in create mode 100644 ETL/ETL.kdevprj create mode 100755 ETL/ETL.pbproj/darco.mode1 create mode 100755 ETL/ETL.pbproj/darco.pbxuser create mode 100644 ETL/ETL.pbproj/etl_profile.h create mode 100644 ETL/ETL.pbproj/frameworkfix.cpp create mode 100755 ETL/ETL.pbproj/project.pbxproj create mode 100644 ETL/ETL.pc.in create mode 100644 ETL/ETL.prj create mode 100644 ETL/ETL/Makefile.am create mode 100644 ETL/ETL/_angle.h create mode 100644 ETL/ETL/_bezier.h create mode 100644 ETL/ETL/_bezier_angle.h create mode 100644 ETL/ETL/_bit_rotate.h create mode 100644 ETL/ETL/_boxblur.h create mode 100644 ETL/ETL/_bspline.h create mode 100644 ETL/ETL/_calculus.h create mode 100644 ETL/ETL/_clock_base.h create mode 100644 ETL/ETL/_clock_gettimeofday.h create mode 100644 ETL/ETL/_clock_system.h create mode 100644 ETL/ETL/_clock_win32hpcount.h create mode 100644 ETL/ETL/_condition.h create mode 100644 ETL/ETL/_curve.h create mode 100644 ETL/ETL/_curve_func.h create mode 100644 ETL/ETL/_fastangle.h create mode 100644 ETL/ETL/_fastangle_tables.h create mode 100644 ETL/ETL/_fixed.h create mode 100644 ETL/ETL/_gaussian.h create mode 100644 ETL/ETL/_handle.h create mode 100644 ETL/ETL/_hermite.h create mode 100644 ETL/ETL/_misc.h create mode 100644 ETL/ETL/_mutex_null.h create mode 100644 ETL/ETL/_mutex_pthreads.h create mode 100644 ETL/ETL/_mutex_pthreads_simple.h create mode 100644 ETL/ETL/_mutex_win32.h create mode 100644 ETL/ETL/_pen.h create mode 100644 ETL/ETL/_random.h create mode 100644 ETL/ETL/_rect.h create mode 100644 ETL/ETL/_ref_count.h create mode 100644 ETL/ETL/_rwlock.h create mode 100644 ETL/ETL/_smach.h create mode 100644 ETL/ETL/_smart_ptr.h create mode 100644 ETL/ETL/_status.h create mode 100644 ETL/ETL/_stringf.h create mode 100644 ETL/ETL/_surface.h create mode 100644 ETL/ETL/_thread.h create mode 100644 ETL/ETL/_trivial.h create mode 100644 ETL/ETL/_value.h create mode 100644 ETL/ETL/angle create mode 100644 ETL/ETL/bezier create mode 100644 ETL/ETL/boxblur create mode 100644 ETL/ETL/calculus create mode 100644 ETL/ETL/clock create mode 100644 ETL/ETL/etl_config.h create mode 100644 ETL/ETL/fastangle create mode 100644 ETL/ETL/fixed create mode 100644 ETL/ETL/gaussian create mode 100644 ETL/ETL/handle create mode 100644 ETL/ETL/hermite create mode 100644 ETL/ETL/ipc create mode 100644 ETL/ETL/misc create mode 100644 ETL/ETL/mutex create mode 100644 ETL/ETL/pen create mode 100644 ETL/ETL/random create mode 100644 ETL/ETL/rect create mode 100644 ETL/ETL/ref_count create mode 100644 ETL/ETL/smach create mode 100644 ETL/ETL/smart_ptr create mode 100644 ETL/ETL/spline create mode 100644 ETL/ETL/status create mode 100644 ETL/ETL/stringf create mode 100644 ETL/ETL/surface create mode 100644 ETL/ETL/thread create mode 100644 ETL/ETL/trivial create mode 100644 ETL/ETL/value create mode 100644 ETL/Makefile.am create mode 100644 ETL/NEWS create mode 100644 ETL/README create mode 100755 ETL/config/pkg-support/ETL-devel.info create mode 100755 ETL/config/pkg-support/devel-resources/License.rtf create mode 100755 ETL/config/pkg-support/devel-resources/ReadMe.rtf create mode 100755 ETL/config/pkg-support/devel-resources/Welcome.rtf create mode 100755 ETL/config/pkg-support/devel-resources/install.sh create mode 100644 ETL/configure.ac create mode 100644 ETL/doxygen.cfg.in create mode 100644 ETL/m4/ETL.m4 create mode 100644 ETL/m4/cxx_macros.m4 create mode 100644 ETL/m4/subs.m4 create mode 100644 ETL/test/Makefile.am create mode 100644 ETL/test/angle.cpp create mode 100644 ETL/test/benchmark.cpp create mode 100644 ETL/test/clock.cpp create mode 100644 ETL/test/fixed.cpp create mode 100644 ETL/test/handle.cpp create mode 100644 ETL/test/hermite.cpp create mode 100644 ETL/test/pen.cpp create mode 100644 ETL/test/random.cpp create mode 100644 ETL/test/smach.cpp create mode 100644 ETL/test/smart_ptr.cpp create mode 100644 ETL/test/spline.cpp create mode 100644 ETL/test/stringf.cpp create mode 100644 ETL/test/surface.cpp create mode 100644 ETL/test/value.cpp delete mode 100644 ETL/trunk/AUTHORS delete mode 100644 ETL/trunk/ETL-config.in delete mode 100644 ETL/trunk/ETL.kdevprj delete mode 100755 ETL/trunk/ETL.pbproj/darco.mode1 delete mode 100755 ETL/trunk/ETL.pbproj/darco.pbxuser delete mode 100644 ETL/trunk/ETL.pbproj/etl_profile.h delete mode 100644 ETL/trunk/ETL.pbproj/frameworkfix.cpp delete mode 100755 ETL/trunk/ETL.pbproj/project.pbxproj delete mode 100644 ETL/trunk/ETL.pc.in delete mode 100644 ETL/trunk/ETL.prj delete mode 100644 ETL/trunk/ETL/Makefile.am delete mode 100644 ETL/trunk/ETL/_angle.h delete mode 100644 ETL/trunk/ETL/_bezier.h delete mode 100644 ETL/trunk/ETL/_bezier_angle.h delete mode 100644 ETL/trunk/ETL/_bit_rotate.h delete mode 100644 ETL/trunk/ETL/_boxblur.h delete mode 100644 ETL/trunk/ETL/_bspline.h delete mode 100644 ETL/trunk/ETL/_calculus.h delete mode 100644 ETL/trunk/ETL/_clock_base.h delete mode 100644 ETL/trunk/ETL/_clock_gettimeofday.h delete mode 100644 ETL/trunk/ETL/_clock_system.h delete mode 100644 ETL/trunk/ETL/_clock_win32hpcount.h delete mode 100644 ETL/trunk/ETL/_condition.h delete mode 100644 ETL/trunk/ETL/_curve.h delete mode 100644 ETL/trunk/ETL/_curve_func.h delete mode 100644 ETL/trunk/ETL/_fastangle.h delete mode 100644 ETL/trunk/ETL/_fastangle_tables.h delete mode 100644 ETL/trunk/ETL/_fixed.h delete mode 100644 ETL/trunk/ETL/_gaussian.h delete mode 100644 ETL/trunk/ETL/_handle.h delete mode 100644 ETL/trunk/ETL/_hermite.h delete mode 100644 ETL/trunk/ETL/_misc.h delete mode 100644 ETL/trunk/ETL/_mutex_null.h delete mode 100644 ETL/trunk/ETL/_mutex_pthreads.h delete mode 100644 ETL/trunk/ETL/_mutex_pthreads_simple.h delete mode 100644 ETL/trunk/ETL/_mutex_win32.h delete mode 100644 ETL/trunk/ETL/_pen.h delete mode 100644 ETL/trunk/ETL/_random.h delete mode 100644 ETL/trunk/ETL/_rect.h delete mode 100644 ETL/trunk/ETL/_ref_count.h delete mode 100644 ETL/trunk/ETL/_rwlock.h delete mode 100644 ETL/trunk/ETL/_smach.h delete mode 100644 ETL/trunk/ETL/_smart_ptr.h delete mode 100644 ETL/trunk/ETL/_status.h delete mode 100644 ETL/trunk/ETL/_stringf.h delete mode 100644 ETL/trunk/ETL/_surface.h delete mode 100644 ETL/trunk/ETL/_thread.h delete mode 100644 ETL/trunk/ETL/_trivial.h delete mode 100644 ETL/trunk/ETL/_value.h delete mode 100644 ETL/trunk/ETL/angle delete mode 100644 ETL/trunk/ETL/bezier delete mode 100644 ETL/trunk/ETL/boxblur delete mode 100644 ETL/trunk/ETL/calculus delete mode 100644 ETL/trunk/ETL/clock delete mode 100644 ETL/trunk/ETL/etl_config.h delete mode 100644 ETL/trunk/ETL/fastangle delete mode 100644 ETL/trunk/ETL/fixed delete mode 100644 ETL/trunk/ETL/gaussian delete mode 100644 ETL/trunk/ETL/handle delete mode 100644 ETL/trunk/ETL/hermite delete mode 100644 ETL/trunk/ETL/ipc delete mode 100644 ETL/trunk/ETL/misc delete mode 100644 ETL/trunk/ETL/mutex delete mode 100644 ETL/trunk/ETL/pen delete mode 100644 ETL/trunk/ETL/random delete mode 100644 ETL/trunk/ETL/rect delete mode 100644 ETL/trunk/ETL/ref_count delete mode 100644 ETL/trunk/ETL/smach delete mode 100644 ETL/trunk/ETL/smart_ptr delete mode 100644 ETL/trunk/ETL/spline delete mode 100644 ETL/trunk/ETL/status delete mode 100644 ETL/trunk/ETL/stringf delete mode 100644 ETL/trunk/ETL/surface delete mode 100644 ETL/trunk/ETL/thread delete mode 100644 ETL/trunk/ETL/trivial delete mode 100644 ETL/trunk/ETL/value delete mode 100644 ETL/trunk/Makefile.am delete mode 100644 ETL/trunk/NEWS delete mode 100644 ETL/trunk/README delete mode 100755 ETL/trunk/config/pkg-support/ETL-devel.info delete mode 100755 ETL/trunk/config/pkg-support/devel-resources/License.rtf delete mode 100755 ETL/trunk/config/pkg-support/devel-resources/ReadMe.rtf delete mode 100755 ETL/trunk/config/pkg-support/devel-resources/Welcome.rtf delete mode 100755 ETL/trunk/config/pkg-support/devel-resources/install.sh delete mode 100644 ETL/trunk/configure.ac delete mode 100644 ETL/trunk/doxygen.cfg.in delete mode 100644 ETL/trunk/m4/ETL.m4 delete mode 100644 ETL/trunk/m4/cxx_macros.m4 delete mode 100644 ETL/trunk/m4/subs.m4 delete mode 100644 ETL/trunk/test/Makefile.am delete mode 100644 ETL/trunk/test/angle.cpp delete mode 100644 ETL/trunk/test/benchmark.cpp delete mode 100644 ETL/trunk/test/clock.cpp delete mode 100644 ETL/trunk/test/fixed.cpp delete mode 100644 ETL/trunk/test/handle.cpp delete mode 100644 ETL/trunk/test/hermite.cpp delete mode 100644 ETL/trunk/test/pen.cpp delete mode 100644 ETL/trunk/test/random.cpp delete mode 100644 ETL/trunk/test/smach.cpp delete mode 100644 ETL/trunk/test/smart_ptr.cpp delete mode 100644 ETL/trunk/test/spline.cpp delete mode 100644 ETL/trunk/test/stringf.cpp delete mode 100644 ETL/trunk/test/surface.cpp delete mode 100644 ETL/trunk/test/value.cpp create mode 100644 autobuild/Makefile delete mode 100644 autobuild/trunk/Makefile create mode 100644 gtkmm-osx/Makefile create mode 120000 gtkmm-osx/Packages create mode 100644 gtkmm-osx/PkgResource/License.txt create mode 100644 gtkmm-osx/PkgResource/ReadMe.txt create mode 100755 gtkmm-osx/PkgResource/postflight create mode 100644 gtkmm-osx/gtkmm-meta.mpkg/Contents/Info.plist create mode 100644 gtkmm-osx/gtkmm-meta.mpkg/Contents/PkgInfo create mode 100644 gtkmm-osx/gtkmm-meta.mpkg/Contents/Resources/English.lproj/Description.plist create mode 100755 gtkmm-osx/gtkmm-meta.mpkg/Contents/Resources/English.lproj/background.tif create mode 100644 gtkmm-osx/gtkmm-meta.mpkg/Contents/Resources/English.lproj/gtkmm-meta.info create mode 100644 gtkmm-osx/gtkmm-meta.mpkg/Contents/Resources/package_version create mode 100644 gtkmm-osx/jpeg-6b/README create mode 100644 gtkmm-osx/jpeg-6b/ansi2knr.1 create mode 100644 gtkmm-osx/jpeg-6b/ansi2knr.c create mode 100644 gtkmm-osx/jpeg-6b/cderror.h create mode 100644 gtkmm-osx/jpeg-6b/cdjpeg.c create mode 100644 gtkmm-osx/jpeg-6b/cdjpeg.h create mode 100644 gtkmm-osx/jpeg-6b/change.log create mode 100644 gtkmm-osx/jpeg-6b/cjpeg.1 create mode 100644 gtkmm-osx/jpeg-6b/cjpeg.c create mode 100644 gtkmm-osx/jpeg-6b/ckconfig.c create mode 100644 gtkmm-osx/jpeg-6b/coderules.doc create mode 100755 gtkmm-osx/jpeg-6b/config.guess create mode 100755 gtkmm-osx/jpeg-6b/config.sub create mode 100755 gtkmm-osx/jpeg-6b/configure create mode 100644 gtkmm-osx/jpeg-6b/djpeg.1 create mode 100644 gtkmm-osx/jpeg-6b/djpeg.c create mode 100644 gtkmm-osx/jpeg-6b/example.c create mode 100644 gtkmm-osx/jpeg-6b/filelist.doc create mode 100755 gtkmm-osx/jpeg-6b/install-sh create mode 100644 gtkmm-osx/jpeg-6b/install.doc create mode 100644 gtkmm-osx/jpeg-6b/jcapimin.c create mode 100644 gtkmm-osx/jpeg-6b/jcapistd.c create mode 100644 gtkmm-osx/jpeg-6b/jccoefct.c create mode 100644 gtkmm-osx/jpeg-6b/jccolor.c create mode 100644 gtkmm-osx/jpeg-6b/jcdctmgr.c create mode 100644 gtkmm-osx/jpeg-6b/jchuff.c create mode 100644 gtkmm-osx/jpeg-6b/jchuff.h create mode 100644 gtkmm-osx/jpeg-6b/jcinit.c create mode 100644 gtkmm-osx/jpeg-6b/jcmainct.c create mode 100644 gtkmm-osx/jpeg-6b/jcmarker.c create mode 100644 gtkmm-osx/jpeg-6b/jcmaster.c create mode 100644 gtkmm-osx/jpeg-6b/jcomapi.c create mode 100644 gtkmm-osx/jpeg-6b/jconfig.bcc create mode 100644 gtkmm-osx/jpeg-6b/jconfig.cfg create mode 100644 gtkmm-osx/jpeg-6b/jconfig.dj create mode 100644 gtkmm-osx/jpeg-6b/jconfig.doc create mode 100644 gtkmm-osx/jpeg-6b/jconfig.mac create mode 100644 gtkmm-osx/jpeg-6b/jconfig.manx create mode 100644 gtkmm-osx/jpeg-6b/jconfig.mc6 create mode 100644 gtkmm-osx/jpeg-6b/jconfig.sas create mode 100644 gtkmm-osx/jpeg-6b/jconfig.st create mode 100644 gtkmm-osx/jpeg-6b/jconfig.vc create mode 100644 gtkmm-osx/jpeg-6b/jconfig.vms create mode 100644 gtkmm-osx/jpeg-6b/jconfig.wat create mode 100644 gtkmm-osx/jpeg-6b/jcparam.c create mode 100644 gtkmm-osx/jpeg-6b/jcphuff.c create mode 100644 gtkmm-osx/jpeg-6b/jcprepct.c create mode 100644 gtkmm-osx/jpeg-6b/jcsample.c create mode 100644 gtkmm-osx/jpeg-6b/jctrans.c create mode 100644 gtkmm-osx/jpeg-6b/jdapimin.c create mode 100644 gtkmm-osx/jpeg-6b/jdapistd.c create mode 100644 gtkmm-osx/jpeg-6b/jdatadst.c create mode 100644 gtkmm-osx/jpeg-6b/jdatasrc.c create mode 100644 gtkmm-osx/jpeg-6b/jdcoefct.c create mode 100644 gtkmm-osx/jpeg-6b/jdcolor.c create mode 100644 gtkmm-osx/jpeg-6b/jdct.h create mode 100644 gtkmm-osx/jpeg-6b/jddctmgr.c create mode 100644 gtkmm-osx/jpeg-6b/jdhuff.c create mode 100644 gtkmm-osx/jpeg-6b/jdhuff.h create mode 100644 gtkmm-osx/jpeg-6b/jdinput.c create mode 100644 gtkmm-osx/jpeg-6b/jdmainct.c create mode 100644 gtkmm-osx/jpeg-6b/jdmarker.c create mode 100644 gtkmm-osx/jpeg-6b/jdmaster.c create mode 100644 gtkmm-osx/jpeg-6b/jdmerge.c create mode 100644 gtkmm-osx/jpeg-6b/jdphuff.c create mode 100644 gtkmm-osx/jpeg-6b/jdpostct.c create mode 100644 gtkmm-osx/jpeg-6b/jdsample.c create mode 100644 gtkmm-osx/jpeg-6b/jdtrans.c create mode 100644 gtkmm-osx/jpeg-6b/jerror.c create mode 100644 gtkmm-osx/jpeg-6b/jerror.h create mode 100644 gtkmm-osx/jpeg-6b/jfdctflt.c create mode 100644 gtkmm-osx/jpeg-6b/jfdctfst.c create mode 100644 gtkmm-osx/jpeg-6b/jfdctint.c create mode 100644 gtkmm-osx/jpeg-6b/jidctflt.c create mode 100644 gtkmm-osx/jpeg-6b/jidctfst.c create mode 100644 gtkmm-osx/jpeg-6b/jidctint.c create mode 100644 gtkmm-osx/jpeg-6b/jidctred.c create mode 100644 gtkmm-osx/jpeg-6b/jinclude.h create mode 100644 gtkmm-osx/jpeg-6b/jmemansi.c create mode 100644 gtkmm-osx/jpeg-6b/jmemdos.c create mode 100644 gtkmm-osx/jpeg-6b/jmemdosa.asm create mode 100644 gtkmm-osx/jpeg-6b/jmemmac.c create mode 100644 gtkmm-osx/jpeg-6b/jmemmgr.c create mode 100644 gtkmm-osx/jpeg-6b/jmemname.c create mode 100644 gtkmm-osx/jpeg-6b/jmemnobs.c create mode 100644 gtkmm-osx/jpeg-6b/jmemsys.h create mode 100644 gtkmm-osx/jpeg-6b/jmorecfg.h create mode 100644 gtkmm-osx/jpeg-6b/jpegint.h create mode 100644 gtkmm-osx/jpeg-6b/jpeglib.h create mode 100644 gtkmm-osx/jpeg-6b/jpegtran.1 create mode 100644 gtkmm-osx/jpeg-6b/jpegtran.c create mode 100644 gtkmm-osx/jpeg-6b/jquant1.c create mode 100644 gtkmm-osx/jpeg-6b/jquant2.c create mode 100644 gtkmm-osx/jpeg-6b/jutils.c create mode 100644 gtkmm-osx/jpeg-6b/jversion.h create mode 100644 gtkmm-osx/jpeg-6b/libjpeg.doc create mode 100755 gtkmm-osx/jpeg-6b/ltconfig create mode 100644 gtkmm-osx/jpeg-6b/ltmain.sh create mode 100644 gtkmm-osx/jpeg-6b/makcjpeg.st create mode 100644 gtkmm-osx/jpeg-6b/makdjpeg.st create mode 100644 gtkmm-osx/jpeg-6b/makeapps.ds create mode 100644 gtkmm-osx/jpeg-6b/makefile.ansi create mode 100644 gtkmm-osx/jpeg-6b/makefile.bcc create mode 100644 gtkmm-osx/jpeg-6b/makefile.cfg create mode 100644 gtkmm-osx/jpeg-6b/makefile.dj create mode 100644 gtkmm-osx/jpeg-6b/makefile.manx create mode 100644 gtkmm-osx/jpeg-6b/makefile.mc6 create mode 100644 gtkmm-osx/jpeg-6b/makefile.mms create mode 100644 gtkmm-osx/jpeg-6b/makefile.sas create mode 100644 gtkmm-osx/jpeg-6b/makefile.unix create mode 100644 gtkmm-osx/jpeg-6b/makefile.vc create mode 100644 gtkmm-osx/jpeg-6b/makefile.vms create mode 100644 gtkmm-osx/jpeg-6b/makefile.wat create mode 100644 gtkmm-osx/jpeg-6b/makelib.ds create mode 100644 gtkmm-osx/jpeg-6b/makeproj.mac create mode 100644 gtkmm-osx/jpeg-6b/makljpeg.st create mode 100644 gtkmm-osx/jpeg-6b/maktjpeg.st create mode 100644 gtkmm-osx/jpeg-6b/makvms.opt create mode 100644 gtkmm-osx/jpeg-6b/rdbmp.c create mode 100644 gtkmm-osx/jpeg-6b/rdcolmap.c create mode 100644 gtkmm-osx/jpeg-6b/rdgif.c create mode 100644 gtkmm-osx/jpeg-6b/rdjpgcom.1 create mode 100644 gtkmm-osx/jpeg-6b/rdjpgcom.c create mode 100644 gtkmm-osx/jpeg-6b/rdppm.c create mode 100644 gtkmm-osx/jpeg-6b/rdrle.c create mode 100644 gtkmm-osx/jpeg-6b/rdswitch.c create mode 100644 gtkmm-osx/jpeg-6b/rdtarga.c create mode 100644 gtkmm-osx/jpeg-6b/structure.doc create mode 100644 gtkmm-osx/jpeg-6b/testimg.bmp create mode 100644 gtkmm-osx/jpeg-6b/testimg.jpg create mode 100644 gtkmm-osx/jpeg-6b/testimg.ppm create mode 100644 gtkmm-osx/jpeg-6b/testimgp.jpg create mode 100644 gtkmm-osx/jpeg-6b/testorig.jpg create mode 100644 gtkmm-osx/jpeg-6b/testprog.jpg create mode 100644 gtkmm-osx/jpeg-6b/transupp.c create mode 100644 gtkmm-osx/jpeg-6b/transupp.h create mode 100644 gtkmm-osx/jpeg-6b/usage.doc create mode 100644 gtkmm-osx/jpeg-6b/wizard.doc create mode 100644 gtkmm-osx/jpeg-6b/wrbmp.c create mode 100644 gtkmm-osx/jpeg-6b/wrgif.c create mode 100644 gtkmm-osx/jpeg-6b/wrjpgcom.1 create mode 100644 gtkmm-osx/jpeg-6b/wrjpgcom.c create mode 100644 gtkmm-osx/jpeg-6b/wrppm.c create mode 100644 gtkmm-osx/jpeg-6b/wrrle.c create mode 100644 gtkmm-osx/jpeg-6b/wrtarga.c create mode 100644 gtkmm-osx/libpng-1.2.5/ANNOUNCE create mode 100644 gtkmm-osx/libpng-1.2.5/CHANGES create mode 100644 gtkmm-osx/libpng-1.2.5/INSTALL create mode 100644 gtkmm-osx/libpng-1.2.5/KNOWNBUG create mode 100644 gtkmm-osx/libpng-1.2.5/LICENSE create mode 100644 gtkmm-osx/libpng-1.2.5/README create mode 100644 gtkmm-osx/libpng-1.2.5/TODO create mode 100644 gtkmm-osx/libpng-1.2.5/Y2KINFO create mode 100755 gtkmm-osx/libpng-1.2.5/configure create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/gregbook/LICENSE create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/gregbook/Makefile.sgi create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/gregbook/Makefile.unx create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/gregbook/Makefile.w32 create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/gregbook/README create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/gregbook/makevms.com create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng.c create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng.h create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng2.c create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng2.h create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/gregbook/rpng-win.c create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/gregbook/rpng-x.c create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/gregbook/rpng2-win.c create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/gregbook/rpng2-x.c create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/gregbook/toucan.png create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/gregbook/wpng.c create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/gregbook/writepng.c create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/gregbook/writepng.h create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/msvctest/README.txt create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/msvctest/msvctest.dsp create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/msvctest/msvctest.dsw create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngminus/README create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngminus/makefile.std create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngminus/makefile.tc3 create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngminus/makevms.com create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngminus/png2pnm.bat create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngminus/png2pnm.c create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngminus/png2pnm.sh create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngminus/pngminus.bat create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngminus/pngminus.sh create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngminus/pnm2png.bat create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngminus/pnm2png.c create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngminus/pnm2png.sh create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngsuite/README create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn0g01.png create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn0g02.png create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn0g04.png create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn0g08.png create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn0g16.png create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn2c08.png create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn2c16.png create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn3p01.png create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn3p02.png create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn3p04.png create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn3p08.png create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn4a08.png create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn4a16.png create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn6a08.png create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn6a16.png create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/visupng/PngFile.c create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/visupng/PngFile.h create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/visupng/README.txt create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.c create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.dsp create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.dsw create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.ico create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.png create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.rc create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/visupng/cexcept.h create mode 100644 gtkmm-osx/libpng-1.2.5/contrib/visupng/resource.h create mode 100644 gtkmm-osx/libpng-1.2.5/example.c create mode 100755 gtkmm-osx/libpng-1.2.5/libpng-config create mode 100644 gtkmm-osx/libpng-1.2.5/libpng.3 create mode 100644 gtkmm-osx/libpng-1.2.5/libpng.pc create mode 100644 gtkmm-osx/libpng-1.2.5/libpng.txt create mode 100644 gtkmm-osx/libpng-1.2.5/libpngpf.3 create mode 100644 gtkmm-osx/libpng-1.2.5/makefile.macosx create mode 100644 gtkmm-osx/libpng-1.2.5/png.5 create mode 100644 gtkmm-osx/libpng-1.2.5/png.c create mode 100644 gtkmm-osx/libpng-1.2.5/png.h create mode 100644 gtkmm-osx/libpng-1.2.5/pngasmrd.h create mode 100644 gtkmm-osx/libpng-1.2.5/pngbar.jpg create mode 100644 gtkmm-osx/libpng-1.2.5/pngbar.png create mode 100644 gtkmm-osx/libpng-1.2.5/pngconf.h create mode 100644 gtkmm-osx/libpng-1.2.5/pngerror.c create mode 100644 gtkmm-osx/libpng-1.2.5/pnggccrd.c create mode 100644 gtkmm-osx/libpng-1.2.5/pngget.c create mode 100644 gtkmm-osx/libpng-1.2.5/pngmem.c create mode 100644 gtkmm-osx/libpng-1.2.5/pngnow.png create mode 100644 gtkmm-osx/libpng-1.2.5/pngpread.c create mode 100644 gtkmm-osx/libpng-1.2.5/pngread.c create mode 100644 gtkmm-osx/libpng-1.2.5/pngrio.c create mode 100644 gtkmm-osx/libpng-1.2.5/pngrtran.c create mode 100644 gtkmm-osx/libpng-1.2.5/pngrutil.c create mode 100644 gtkmm-osx/libpng-1.2.5/pngset.c create mode 100644 gtkmm-osx/libpng-1.2.5/pngtest.c create mode 100644 gtkmm-osx/libpng-1.2.5/pngtest.png create mode 100644 gtkmm-osx/libpng-1.2.5/pngtrans.c create mode 100644 gtkmm-osx/libpng-1.2.5/pngvcrd.c create mode 100644 gtkmm-osx/libpng-1.2.5/pngwio.c create mode 100644 gtkmm-osx/libpng-1.2.5/pngwrite.c create mode 100644 gtkmm-osx/libpng-1.2.5/pngwtran.c create mode 100644 gtkmm-osx/libpng-1.2.5/pngwutil.c create mode 100644 gtkmm-osx/libpng-1.2.5/projects/beos/x86-shared.proj create mode 100644 gtkmm-osx/libpng-1.2.5/projects/beos/x86-shared.txt create mode 100644 gtkmm-osx/libpng-1.2.5/projects/beos/x86-static.proj create mode 100644 gtkmm-osx/libpng-1.2.5/projects/beos/x86-static.txt create mode 100644 gtkmm-osx/libpng-1.2.5/projects/borland/libpng.bpf create mode 100644 gtkmm-osx/libpng-1.2.5/projects/borland/libpng.bpg create mode 100644 gtkmm-osx/libpng-1.2.5/projects/borland/libpng.bpr create mode 100644 gtkmm-osx/libpng-1.2.5/projects/borland/libpng.cpp create mode 100644 gtkmm-osx/libpng-1.2.5/projects/borland/libpng.readme.txt create mode 100644 gtkmm-osx/libpng-1.2.5/projects/borland/libpngstat.bpf create mode 100644 gtkmm-osx/libpng-1.2.5/projects/borland/libpngstat.bpr create mode 100644 gtkmm-osx/libpng-1.2.5/projects/borland/zlib+libpng.bpg create mode 100644 gtkmm-osx/libpng-1.2.5/projects/borland/zlib.bpf create mode 100644 gtkmm-osx/libpng-1.2.5/projects/borland/zlib.bpg create mode 100644 gtkmm-osx/libpng-1.2.5/projects/borland/zlib.bpr create mode 100644 gtkmm-osx/libpng-1.2.5/projects/borland/zlib.cpp create mode 100644 gtkmm-osx/libpng-1.2.5/projects/borland/zlibstat.bpf create mode 100644 gtkmm-osx/libpng-1.2.5/projects/borland/zlibstat.bpr create mode 100644 gtkmm-osx/libpng-1.2.5/projects/msvc/README.txt create mode 100644 gtkmm-osx/libpng-1.2.5/projects/msvc/libpng.dsp create mode 100644 gtkmm-osx/libpng-1.2.5/projects/msvc/libpng.dsw create mode 100644 gtkmm-osx/libpng-1.2.5/projects/msvc/png.rc create mode 100644 gtkmm-osx/libpng-1.2.5/projects/msvc/png32ms.def create mode 100644 gtkmm-osx/libpng-1.2.5/projects/msvc/zlib.def create mode 100644 gtkmm-osx/libpng-1.2.5/projects/msvc/zlib.dsp create mode 100644 gtkmm-osx/libpng-1.2.5/projects/netware.txt create mode 100644 gtkmm-osx/libpng-1.2.5/projects/wince.txt create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/SCOPTIONS.ppc create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/descrip.mms create mode 100755 gtkmm-osx/libpng-1.2.5/scripts/libpng-config-body.in create mode 100755 gtkmm-osx/libpng-1.2.5/scripts/libpng-config-head.in create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/libpng.icc create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/libpng.pc.in create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.32sunu create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.64sunu create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.acorn create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.aix create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.amiga create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.atari create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.bc32 create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.bd32 create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.beos create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.bor create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.cygwin create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.darwin create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.dec create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.dj2 create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.freebsd create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.gcc create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.gcmmx create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.hpgcc create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.hpux create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.ibmc create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.intel create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.knr create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.linux create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.macosx create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.mips create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.msc create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.ne12bsd create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.netbsd create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.openbsd create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.os2 create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.sco create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.sggcc create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.sgi create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.so9 create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.solaris create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.std create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.sunos create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.tc3 create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.vcawin32 create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.vcwin32 create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makefile.watcom create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/makevms.com create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/pngdef.pas create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/pngos2.def create mode 100644 gtkmm-osx/libpng-1.2.5/scripts/smakefile.ppc create mode 100755 gtkmm-osx/package create mode 100644 gtkmm-osx/package.info delete mode 100644 gtkmm-osx/trunk/Makefile delete mode 120000 gtkmm-osx/trunk/Packages delete mode 100644 gtkmm-osx/trunk/PkgResource/License.txt delete mode 100644 gtkmm-osx/trunk/PkgResource/ReadMe.txt delete mode 100755 gtkmm-osx/trunk/PkgResource/postflight delete mode 100644 gtkmm-osx/trunk/gtkmm-meta.mpkg/Contents/Info.plist delete mode 100644 gtkmm-osx/trunk/gtkmm-meta.mpkg/Contents/PkgInfo delete mode 100644 gtkmm-osx/trunk/gtkmm-meta.mpkg/Contents/Resources/English.lproj/Description.plist delete mode 100755 gtkmm-osx/trunk/gtkmm-meta.mpkg/Contents/Resources/English.lproj/background.tif delete mode 100644 gtkmm-osx/trunk/gtkmm-meta.mpkg/Contents/Resources/English.lproj/gtkmm-meta.info delete mode 100644 gtkmm-osx/trunk/gtkmm-meta.mpkg/Contents/Resources/package_version delete mode 100644 gtkmm-osx/trunk/jpeg-6b/README delete mode 100644 gtkmm-osx/trunk/jpeg-6b/ansi2knr.1 delete mode 100644 gtkmm-osx/trunk/jpeg-6b/ansi2knr.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/cderror.h delete mode 100644 gtkmm-osx/trunk/jpeg-6b/cdjpeg.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/cdjpeg.h delete mode 100644 gtkmm-osx/trunk/jpeg-6b/change.log delete mode 100644 gtkmm-osx/trunk/jpeg-6b/cjpeg.1 delete mode 100644 gtkmm-osx/trunk/jpeg-6b/cjpeg.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/ckconfig.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/coderules.doc delete mode 100755 gtkmm-osx/trunk/jpeg-6b/config.guess delete mode 100755 gtkmm-osx/trunk/jpeg-6b/config.sub delete mode 100755 gtkmm-osx/trunk/jpeg-6b/configure delete mode 100644 gtkmm-osx/trunk/jpeg-6b/djpeg.1 delete mode 100644 gtkmm-osx/trunk/jpeg-6b/djpeg.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/example.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/filelist.doc delete mode 100755 gtkmm-osx/trunk/jpeg-6b/install-sh delete mode 100644 gtkmm-osx/trunk/jpeg-6b/install.doc delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jcapimin.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jcapistd.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jccoefct.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jccolor.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jcdctmgr.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jchuff.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jchuff.h delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jcinit.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jcmainct.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jcmarker.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jcmaster.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jcomapi.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jconfig.bcc delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jconfig.cfg delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jconfig.dj delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jconfig.doc delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jconfig.mac delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jconfig.manx delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jconfig.mc6 delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jconfig.sas delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jconfig.st delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jconfig.vc delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jconfig.vms delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jconfig.wat delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jcparam.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jcphuff.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jcprepct.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jcsample.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jctrans.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jdapimin.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jdapistd.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jdatadst.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jdatasrc.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jdcoefct.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jdcolor.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jdct.h delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jddctmgr.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jdhuff.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jdhuff.h delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jdinput.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jdmainct.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jdmarker.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jdmaster.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jdmerge.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jdphuff.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jdpostct.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jdsample.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jdtrans.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jerror.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jerror.h delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jfdctflt.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jfdctfst.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jfdctint.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jidctflt.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jidctfst.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jidctint.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jidctred.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jinclude.h delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jmemansi.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jmemdos.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jmemdosa.asm delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jmemmac.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jmemmgr.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jmemname.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jmemnobs.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jmemsys.h delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jmorecfg.h delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jpegint.h delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jpeglib.h delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jpegtran.1 delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jpegtran.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jquant1.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jquant2.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jutils.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/jversion.h delete mode 100644 gtkmm-osx/trunk/jpeg-6b/libjpeg.doc delete mode 100755 gtkmm-osx/trunk/jpeg-6b/ltconfig delete mode 100644 gtkmm-osx/trunk/jpeg-6b/ltmain.sh delete mode 100644 gtkmm-osx/trunk/jpeg-6b/makcjpeg.st delete mode 100644 gtkmm-osx/trunk/jpeg-6b/makdjpeg.st delete mode 100644 gtkmm-osx/trunk/jpeg-6b/makeapps.ds delete mode 100644 gtkmm-osx/trunk/jpeg-6b/makefile.ansi delete mode 100644 gtkmm-osx/trunk/jpeg-6b/makefile.bcc delete mode 100644 gtkmm-osx/trunk/jpeg-6b/makefile.cfg delete mode 100644 gtkmm-osx/trunk/jpeg-6b/makefile.dj delete mode 100644 gtkmm-osx/trunk/jpeg-6b/makefile.manx delete mode 100644 gtkmm-osx/trunk/jpeg-6b/makefile.mc6 delete mode 100644 gtkmm-osx/trunk/jpeg-6b/makefile.mms delete mode 100644 gtkmm-osx/trunk/jpeg-6b/makefile.sas delete mode 100644 gtkmm-osx/trunk/jpeg-6b/makefile.unix delete mode 100644 gtkmm-osx/trunk/jpeg-6b/makefile.vc delete mode 100644 gtkmm-osx/trunk/jpeg-6b/makefile.vms delete mode 100644 gtkmm-osx/trunk/jpeg-6b/makefile.wat delete mode 100644 gtkmm-osx/trunk/jpeg-6b/makelib.ds delete mode 100644 gtkmm-osx/trunk/jpeg-6b/makeproj.mac delete mode 100644 gtkmm-osx/trunk/jpeg-6b/makljpeg.st delete mode 100644 gtkmm-osx/trunk/jpeg-6b/maktjpeg.st delete mode 100644 gtkmm-osx/trunk/jpeg-6b/makvms.opt delete mode 100644 gtkmm-osx/trunk/jpeg-6b/rdbmp.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/rdcolmap.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/rdgif.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/rdjpgcom.1 delete mode 100644 gtkmm-osx/trunk/jpeg-6b/rdjpgcom.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/rdppm.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/rdrle.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/rdswitch.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/rdtarga.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/structure.doc delete mode 100644 gtkmm-osx/trunk/jpeg-6b/testimg.bmp delete mode 100644 gtkmm-osx/trunk/jpeg-6b/testimg.jpg delete mode 100644 gtkmm-osx/trunk/jpeg-6b/testimg.ppm delete mode 100644 gtkmm-osx/trunk/jpeg-6b/testimgp.jpg delete mode 100644 gtkmm-osx/trunk/jpeg-6b/testorig.jpg delete mode 100644 gtkmm-osx/trunk/jpeg-6b/testprog.jpg delete mode 100644 gtkmm-osx/trunk/jpeg-6b/transupp.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/transupp.h delete mode 100644 gtkmm-osx/trunk/jpeg-6b/usage.doc delete mode 100644 gtkmm-osx/trunk/jpeg-6b/wizard.doc delete mode 100644 gtkmm-osx/trunk/jpeg-6b/wrbmp.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/wrgif.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/wrjpgcom.1 delete mode 100644 gtkmm-osx/trunk/jpeg-6b/wrjpgcom.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/wrppm.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/wrrle.c delete mode 100644 gtkmm-osx/trunk/jpeg-6b/wrtarga.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/ANNOUNCE delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/CHANGES delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/INSTALL delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/KNOWNBUG delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/LICENSE delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/README delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/TODO delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/Y2KINFO delete mode 100755 gtkmm-osx/trunk/libpng-1.2.5/configure delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/LICENSE delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/Makefile.sgi delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/Makefile.unx delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/Makefile.w32 delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/README delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/makevms.com delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/readpng.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/readpng.h delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/readpng2.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/readpng2.h delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/rpng-win.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/rpng-x.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/rpng2-win.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/rpng2-x.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/toucan.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/wpng.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/writepng.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/writepng.h delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/msvctest/README.txt delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/msvctest/msvctest.dsp delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/msvctest/msvctest.dsw delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/README delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/makefile.std delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/makefile.tc3 delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/makevms.com delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/png2pnm.bat delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/png2pnm.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/png2pnm.sh delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pngminus.bat delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pngminus.sh delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pnm2png.bat delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pnm2png.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pnm2png.sh delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/README delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn0g01.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn0g02.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn0g04.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn0g08.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn0g16.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn2c08.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn2c16.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn3p01.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn3p02.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn3p04.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn3p08.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn4a08.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn4a16.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn6a08.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn6a16.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/PngFile.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/PngFile.h delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/README.txt delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.dsp delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.dsw delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.ico delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.rc delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/cexcept.h delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/resource.h delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/example.c delete mode 100755 gtkmm-osx/trunk/libpng-1.2.5/libpng-config delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/libpng.3 delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/libpng.pc delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/libpng.txt delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/libpngpf.3 delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/makefile.macosx delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/png.5 delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/png.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/png.h delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngasmrd.h delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngbar.jpg delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngbar.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngconf.h delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngerror.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pnggccrd.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngget.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngmem.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngnow.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngpread.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngread.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngrio.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngrtran.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngrutil.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngset.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngtest.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngtest.png delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngtrans.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngvcrd.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngwio.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngwrite.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngwtran.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/pngwutil.c delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/beos/x86-shared.proj delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/beos/x86-shared.txt delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/beos/x86-static.proj delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/beos/x86-static.txt delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/borland/libpng.bpf delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/borland/libpng.bpg delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/borland/libpng.bpr delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/borland/libpng.cpp delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/borland/libpng.readme.txt delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/borland/libpngstat.bpf delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/borland/libpngstat.bpr delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib+libpng.bpg delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib.bpf delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib.bpg delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib.bpr delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib.cpp delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlibstat.bpf delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlibstat.bpr delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/README.txt delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/libpng.dsp delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/libpng.dsw delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/png.rc delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/png32ms.def delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/zlib.def delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/zlib.dsp delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/netware.txt delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/projects/wince.txt delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/SCOPTIONS.ppc delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/descrip.mms delete mode 100755 gtkmm-osx/trunk/libpng-1.2.5/scripts/libpng-config-body.in delete mode 100755 gtkmm-osx/trunk/libpng-1.2.5/scripts/libpng-config-head.in delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/libpng.icc delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/libpng.pc.in delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.32sunu delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.64sunu delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.acorn delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.aix delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.amiga delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.atari delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.bc32 delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.bd32 delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.beos delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.bor delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.cygwin delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.darwin delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.dec delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.dj2 delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.freebsd delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.gcc delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.gcmmx delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.hpgcc delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.hpux delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.ibmc delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.intel delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.knr delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.linux delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.macosx delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.mips delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.msc delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.ne12bsd delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.netbsd delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.openbsd delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.os2 delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.sco delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.sggcc delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.sgi delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.so9 delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.solaris delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.std delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.sunos delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.tc3 delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.vcawin32 delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.vcwin32 delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.watcom delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/makevms.com delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/pngdef.pas delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/pngos2.def delete mode 100644 gtkmm-osx/trunk/libpng-1.2.5/scripts/smakefile.ppc delete mode 100755 gtkmm-osx/trunk/package delete mode 100644 gtkmm-osx/trunk/package.info create mode 100644 synfig-core/AUTHORS create mode 100644 synfig-core/ChangeLog.old create mode 100644 synfig-core/Makefile.am create mode 100644 synfig-core/NEWS create mode 100644 synfig-core/README create mode 100644 synfig-core/TODO create mode 100644 synfig-core/build_tools/Makefile.am create mode 100644 synfig-core/build_tools/autorevision.sh create mode 100644 synfig-core/config/ltmain.patch create mode 100755 synfig-core/config/package create mode 100644 synfig-core/configure.ac create mode 100644 synfig-core/doc/hw-gfx-mapping.txt create mode 100644 synfig-core/doxygen.cfg.in create mode 100644 synfig-core/examples/Makefile.am create mode 100644 synfig-core/examples/about_dialog.sifz create mode 100755 synfig-core/examples/backdrop.sifz create mode 100644 synfig-core/examples/business_card.sifz create mode 100644 synfig-core/examples/candy.sifz create mode 100644 synfig-core/examples/cells.sifz create mode 100644 synfig-core/examples/eye.sifz create mode 100644 synfig-core/examples/eyes.sifz create mode 100644 synfig-core/examples/gamma.sifz create mode 100644 synfig-core/examples/gradient.sifz create mode 100644 synfig-core/examples/headmo.sifz create mode 100644 synfig-core/examples/installer-logo.sifz create mode 100644 synfig-core/examples/japan.sifz create mode 100644 synfig-core/examples/logo.sifz create mode 100644 synfig-core/examples/macwolfen.sifz create mode 100644 synfig-core/examples/mandelbrot.sifz create mode 100644 synfig-core/examples/newjulia.sifz create mode 100644 synfig-core/examples/newjulia2.sifz create mode 100644 synfig-core/examples/noise.sifz create mode 100644 synfig-core/examples/pirates.sifz create mode 100644 synfig-core/examples/preambletaffy.sifz create mode 100644 synfig-core/examples/prologue_kid.sifz create mode 100644 synfig-core/examples/sparkle.sifz create mode 100644 synfig-core/examples/splat.sifz create mode 100644 synfig-core/examples/star.sifz create mode 100644 synfig-core/examples/walk/Makefile.am create mode 100755 synfig-core/examples/walk/animation.lst create mode 100755 synfig-core/examples/walk/frame_01.jpg create mode 100755 synfig-core/examples/walk/frame_02.jpg create mode 100755 synfig-core/examples/walk/frame_03.jpg create mode 100755 synfig-core/examples/walk/frame_04.jpg create mode 100644 synfig-core/examples/walk/walk.sifz create mode 100644 synfig-core/examples/wallpaper.sifz create mode 100644 synfig-core/examples/warpcube.sifz create mode 100644 synfig-core/examples/warptext.sifz create mode 100644 synfig-core/examples/z_depth_test.sifz create mode 100644 synfig-core/m4/ETL.m4 create mode 100644 synfig-core/m4/cxx_macros.m4 create mode 100644 synfig-core/m4/freetype2.m4 create mode 100644 synfig-core/m4/libxml++.m4 create mode 100644 synfig-core/m4/libxml.m4 create mode 100644 synfig-core/m4/pkgconfig.m4 create mode 100644 synfig-core/m4/subs.m4 create mode 100644 synfig-core/m4/synfig.m4 create mode 100755 synfig-core/macosxbuild.sh create mode 100644 synfig-core/pkg-info/macosx/core-resources/License.txt create mode 100644 synfig-core/pkg-info/macosx/core-resources/ReadMe.txt create mode 100644 synfig-core/pkg-info/macosx/core-resources/Welcome.txt create mode 100755 synfig-core/pkg-info/macosx/core-resources/install.sh create mode 100755 synfig-core/pkg-info/macosx/core-resources/upgrade.sh create mode 100644 synfig-core/pkg-info/macosx/synfig-core.info.in create mode 100644 synfig-core/po/Makevars create mode 100644 synfig-core/po/POTFILES.in create mode 100644 synfig-core/po/es.po create mode 100644 synfig-core/po/fr.po create mode 100644 synfig-core/po/ru.po create mode 100644 synfig-core/src/Makefile.am create mode 100644 synfig-core/src/modules/Makefile.am create mode 100644 synfig-core/src/modules/example/Makefile.am create mode 100644 synfig-core/src/modules/example/filledrect.cpp create mode 100644 synfig-core/src/modules/example/filledrect.h create mode 100644 synfig-core/src/modules/example/main.cpp create mode 100644 synfig-core/src/modules/example/metaballs.cpp create mode 100644 synfig-core/src/modules/example/metaballs.h create mode 100644 synfig-core/src/modules/example/simplecircle.cpp create mode 100644 synfig-core/src/modules/example/simplecircle.h create mode 100644 synfig-core/src/modules/lyr_freetype/Makefile.am create mode 100644 synfig-core/src/modules/lyr_freetype/lyr_freetype.cpp create mode 100644 synfig-core/src/modules/lyr_freetype/lyr_freetype.h create mode 100644 synfig-core/src/modules/lyr_freetype/lyr_freetype.nsh create mode 100644 synfig-core/src/modules/lyr_freetype/main.cpp create mode 100644 synfig-core/src/modules/lyr_freetype/unlyr_freetype.nsh create mode 100644 synfig-core/src/modules/lyr_std/Makefile.am create mode 100644 synfig-core/src/modules/lyr_std/bevel.cpp create mode 100644 synfig-core/src/modules/lyr_std/bevel.h create mode 100644 synfig-core/src/modules/lyr_std/booleancurve.cpp create mode 100644 synfig-core/src/modules/lyr_std/booleancurve.h create mode 100644 synfig-core/src/modules/lyr_std/clamp.cpp create mode 100644 synfig-core/src/modules/lyr_std/clamp.h create mode 100644 synfig-core/src/modules/lyr_std/curvewarp.cpp create mode 100644 synfig-core/src/modules/lyr_std/curvewarp.h create mode 100644 synfig-core/src/modules/lyr_std/import.cpp create mode 100644 synfig-core/src/modules/lyr_std/import.h create mode 100644 synfig-core/src/modules/lyr_std/insideout.cpp create mode 100644 synfig-core/src/modules/lyr_std/insideout.h create mode 100644 synfig-core/src/modules/lyr_std/julia.cpp create mode 100644 synfig-core/src/modules/lyr_std/julia.h create mode 100644 synfig-core/src/modules/lyr_std/lyr_std.nsh create mode 100644 synfig-core/src/modules/lyr_std/main.cpp create mode 100644 synfig-core/src/modules/lyr_std/mandelbrot.cpp create mode 100644 synfig-core/src/modules/lyr_std/mandelbrot.h create mode 100644 synfig-core/src/modules/lyr_std/rotate.cpp create mode 100644 synfig-core/src/modules/lyr_std/rotate.h create mode 100644 synfig-core/src/modules/lyr_std/shade.cpp create mode 100644 synfig-core/src/modules/lyr_std/shade.h create mode 100644 synfig-core/src/modules/lyr_std/sphere_distort.cpp create mode 100644 synfig-core/src/modules/lyr_std/sphere_distort.h create mode 100644 synfig-core/src/modules/lyr_std/stretch.cpp create mode 100644 synfig-core/src/modules/lyr_std/stretch.h create mode 100644 synfig-core/src/modules/lyr_std/supersample.cpp create mode 100644 synfig-core/src/modules/lyr_std/supersample.h create mode 100644 synfig-core/src/modules/lyr_std/timeloop.cpp create mode 100644 synfig-core/src/modules/lyr_std/timeloop.h create mode 100644 synfig-core/src/modules/lyr_std/translate.cpp create mode 100644 synfig-core/src/modules/lyr_std/translate.h create mode 100644 synfig-core/src/modules/lyr_std/twirl.cpp create mode 100644 synfig-core/src/modules/lyr_std/twirl.h create mode 100644 synfig-core/src/modules/lyr_std/unlyr_std.nsh create mode 100644 synfig-core/src/modules/lyr_std/warp.cpp create mode 100644 synfig-core/src/modules/lyr_std/warp.h create mode 100644 synfig-core/src/modules/lyr_std/xorpattern.cpp create mode 100644 synfig-core/src/modules/lyr_std/xorpattern.h create mode 100644 synfig-core/src/modules/lyr_std/zoom.cpp create mode 100644 synfig-core/src/modules/lyr_std/zoom.h create mode 100644 synfig-core/src/modules/mod_bmp/Makefile.am create mode 100644 synfig-core/src/modules/mod_bmp/main.cpp create mode 100644 synfig-core/src/modules/mod_bmp/mod_bmp.nsh create mode 100644 synfig-core/src/modules/mod_bmp/mptr_bmp.cpp create mode 100644 synfig-core/src/modules/mod_bmp/mptr_bmp.h create mode 100644 synfig-core/src/modules/mod_bmp/trgt_bmp.cpp create mode 100644 synfig-core/src/modules/mod_bmp/trgt_bmp.h create mode 100644 synfig-core/src/modules/mod_bmp/unmod_bmp.nsh create mode 100644 synfig-core/src/modules/mod_dv/Makefile.am create mode 100644 synfig-core/src/modules/mod_dv/main.cpp create mode 100644 synfig-core/src/modules/mod_dv/mod_dv.nsh create mode 100644 synfig-core/src/modules/mod_dv/trgt_dv.cpp create mode 100644 synfig-core/src/modules/mod_dv/trgt_dv.h create mode 100644 synfig-core/src/modules/mod_dv/unmod_dv.nsh create mode 100644 synfig-core/src/modules/mod_ffmpeg/Makefile.am create mode 100644 synfig-core/src/modules/mod_ffmpeg/main.cpp create mode 100644 synfig-core/src/modules/mod_ffmpeg/mod_ffmpeg.nsh create mode 100644 synfig-core/src/modules/mod_ffmpeg/mptr_ffmpeg.cpp create mode 100644 synfig-core/src/modules/mod_ffmpeg/mptr_ffmpeg.h create mode 100644 synfig-core/src/modules/mod_ffmpeg/trgt_ffmpeg.cpp create mode 100644 synfig-core/src/modules/mod_ffmpeg/trgt_ffmpeg.h create mode 100644 synfig-core/src/modules/mod_ffmpeg/unmod_ffmpeg.nsh create mode 100644 synfig-core/src/modules/mod_filter/Makefile.am create mode 100644 synfig-core/src/modules/mod_filter/blur.cpp create mode 100644 synfig-core/src/modules/mod_filter/blur.h create mode 100644 synfig-core/src/modules/mod_filter/colorcorrect.cpp create mode 100644 synfig-core/src/modules/mod_filter/colorcorrect.h create mode 100644 synfig-core/src/modules/mod_filter/halftone.cpp create mode 100644 synfig-core/src/modules/mod_filter/halftone.h create mode 100644 synfig-core/src/modules/mod_filter/halftone2.cpp create mode 100644 synfig-core/src/modules/mod_filter/halftone2.h create mode 100644 synfig-core/src/modules/mod_filter/halftone3.cpp create mode 100644 synfig-core/src/modules/mod_filter/halftone3.h create mode 100644 synfig-core/src/modules/mod_filter/lumakey.cpp create mode 100644 synfig-core/src/modules/mod_filter/lumakey.h create mode 100644 synfig-core/src/modules/mod_filter/main.cpp create mode 100644 synfig-core/src/modules/mod_filter/mod_filter.nsh create mode 100644 synfig-core/src/modules/mod_filter/radialblur.cpp create mode 100644 synfig-core/src/modules/mod_filter/radialblur.h create mode 100644 synfig-core/src/modules/mod_filter/unmod_filter.nsh create mode 100644 synfig-core/src/modules/mod_geometry/Makefile.am create mode 100644 synfig-core/src/modules/mod_geometry/checkerboard.cpp create mode 100644 synfig-core/src/modules/mod_geometry/checkerboard.h create mode 100644 synfig-core/src/modules/mod_geometry/circle.cpp create mode 100644 synfig-core/src/modules/mod_geometry/circle.h create mode 100644 synfig-core/src/modules/mod_geometry/main.cpp create mode 100644 synfig-core/src/modules/mod_geometry/mod_geometry.nsh create mode 100644 synfig-core/src/modules/mod_geometry/outline.cpp create mode 100644 synfig-core/src/modules/mod_geometry/outline.h create mode 100644 synfig-core/src/modules/mod_geometry/rectangle.cpp create mode 100644 synfig-core/src/modules/mod_geometry/rectangle.h create mode 100644 synfig-core/src/modules/mod_geometry/region.cpp create mode 100644 synfig-core/src/modules/mod_geometry/region.h create mode 100644 synfig-core/src/modules/mod_geometry/star.cpp create mode 100644 synfig-core/src/modules/mod_geometry/star.h create mode 100644 synfig-core/src/modules/mod_geometry/unmod_geometry.nsh create mode 100644 synfig-core/src/modules/mod_gif/Makefile.am create mode 100644 synfig-core/src/modules/mod_gif/main.cpp create mode 100644 synfig-core/src/modules/mod_gif/mod_gif.nsh create mode 100644 synfig-core/src/modules/mod_gif/trgt_gif.cpp create mode 100644 synfig-core/src/modules/mod_gif/trgt_gif.h create mode 100644 synfig-core/src/modules/mod_gif/unmod_gif.nsh create mode 100644 synfig-core/src/modules/mod_gradient/Makefile.am create mode 100644 synfig-core/src/modules/mod_gradient/conicalgradient.cpp create mode 100644 synfig-core/src/modules/mod_gradient/conicalgradient.h create mode 100644 synfig-core/src/modules/mod_gradient/curvegradient.cpp create mode 100644 synfig-core/src/modules/mod_gradient/curvegradient.h create mode 100644 synfig-core/src/modules/mod_gradient/lineargradient.cpp create mode 100644 synfig-core/src/modules/mod_gradient/lineargradient.h create mode 100644 synfig-core/src/modules/mod_gradient/main.cpp create mode 100644 synfig-core/src/modules/mod_gradient/mod_gradient.nsh create mode 100644 synfig-core/src/modules/mod_gradient/radialgradient.cpp create mode 100644 synfig-core/src/modules/mod_gradient/radialgradient.h create mode 100644 synfig-core/src/modules/mod_gradient/spiralgradient.cpp create mode 100644 synfig-core/src/modules/mod_gradient/spiralgradient.h create mode 100644 synfig-core/src/modules/mod_gradient/unmod_gradient.nsh create mode 100644 synfig-core/src/modules/mod_imagemagick/Makefile.am create mode 100644 synfig-core/src/modules/mod_imagemagick/main.cpp create mode 100644 synfig-core/src/modules/mod_imagemagick/mod_imagemagick.nsh create mode 100644 synfig-core/src/modules/mod_imagemagick/mptr_imagemagick.cpp create mode 100644 synfig-core/src/modules/mod_imagemagick/mptr_imagemagick.h create mode 100644 synfig-core/src/modules/mod_imagemagick/trgt_imagemagick.cpp create mode 100644 synfig-core/src/modules/mod_imagemagick/trgt_imagemagick.h create mode 100644 synfig-core/src/modules/mod_imagemagick/unmod_imagemagick.nsh create mode 100644 synfig-core/src/modules/mod_jpeg/Makefile.am create mode 100644 synfig-core/src/modules/mod_jpeg/main.cpp create mode 100644 synfig-core/src/modules/mod_jpeg/mod_jpeg.nsh create mode 100644 synfig-core/src/modules/mod_jpeg/mptr_jpeg.cpp create mode 100644 synfig-core/src/modules/mod_jpeg/mptr_jpeg.h create mode 100644 synfig-core/src/modules/mod_jpeg/trgt_jpeg.cpp create mode 100644 synfig-core/src/modules/mod_jpeg/trgt_jpeg.h create mode 100644 synfig-core/src/modules/mod_jpeg/unmod_jpeg.nsh create mode 100644 synfig-core/src/modules/mod_libavcodec/Makefile.am create mode 100644 synfig-core/src/modules/mod_libavcodec/main.cpp create mode 100644 synfig-core/src/modules/mod_libavcodec/mod_libavcodec.nsh create mode 100644 synfig-core/src/modules/mod_libavcodec/mptr.cpp create mode 100644 synfig-core/src/modules/mod_libavcodec/mptr.h create mode 100644 synfig-core/src/modules/mod_libavcodec/trgt_av.cpp create mode 100644 synfig-core/src/modules/mod_libavcodec/trgt_av.h create mode 100644 synfig-core/src/modules/mod_libavcodec/unmod_libavcodec.nsh create mode 100644 synfig-core/src/modules/mod_magickpp/Makefile.am create mode 100644 synfig-core/src/modules/mod_magickpp/main.cpp create mode 100644 synfig-core/src/modules/mod_magickpp/mod_magickpp.nsh create mode 100644 synfig-core/src/modules/mod_magickpp/trgt_magickpp.cpp create mode 100644 synfig-core/src/modules/mod_magickpp/trgt_magickpp.h create mode 100644 synfig-core/src/modules/mod_magickpp/unmod_magickpp.nsh create mode 100644 synfig-core/src/modules/mod_mng/Makefile.am create mode 100644 synfig-core/src/modules/mod_mng/main.cpp create mode 100644 synfig-core/src/modules/mod_mng/mod_mng.nsh create mode 100644 synfig-core/src/modules/mod_mng/trgt_mng.cpp create mode 100644 synfig-core/src/modules/mod_mng/trgt_mng.h create mode 100644 synfig-core/src/modules/mod_mng/unmod_mng.nsh create mode 100644 synfig-core/src/modules/mod_noise/Makefile.am create mode 100644 synfig-core/src/modules/mod_noise/distort.cpp create mode 100644 synfig-core/src/modules/mod_noise/distort.h create mode 100644 synfig-core/src/modules/mod_noise/main.cpp create mode 100644 synfig-core/src/modules/mod_noise/mod_noise.nsh create mode 100644 synfig-core/src/modules/mod_noise/noise.cpp create mode 100644 synfig-core/src/modules/mod_noise/noise.h create mode 100644 synfig-core/src/modules/mod_noise/random_noise.cpp create mode 100644 synfig-core/src/modules/mod_noise/random_noise.h create mode 100644 synfig-core/src/modules/mod_noise/unmod_noise.nsh create mode 100644 synfig-core/src/modules/mod_noise/valuenode_random.cpp create mode 100644 synfig-core/src/modules/mod_noise/valuenode_random.h create mode 100644 synfig-core/src/modules/mod_openexr/Makefile.am create mode 100644 synfig-core/src/modules/mod_openexr/main.cpp create mode 100644 synfig-core/src/modules/mod_openexr/mod_openexr.nsh create mode 100644 synfig-core/src/modules/mod_openexr/mptr_openexr.cpp create mode 100644 synfig-core/src/modules/mod_openexr/mptr_openexr.h create mode 100644 synfig-core/src/modules/mod_openexr/trgt_openexr.cpp create mode 100644 synfig-core/src/modules/mod_openexr/trgt_openexr.h create mode 100644 synfig-core/src/modules/mod_openexr/unmod_openexr.nsh create mode 100644 synfig-core/src/modules/mod_particle/Makefile.am create mode 100644 synfig-core/src/modules/mod_particle/main.cpp create mode 100644 synfig-core/src/modules/mod_particle/mod_particle.nsh create mode 100644 synfig-core/src/modules/mod_particle/plant.cpp create mode 100644 synfig-core/src/modules/mod_particle/plant.h create mode 100644 synfig-core/src/modules/mod_particle/random.cpp create mode 100644 synfig-core/src/modules/mod_particle/random.h create mode 100644 synfig-core/src/modules/mod_particle/unmod_particle.nsh create mode 100644 synfig-core/src/modules/mod_png/Makefile.am create mode 100644 synfig-core/src/modules/mod_png/main.cpp create mode 100644 synfig-core/src/modules/mod_png/mod_png.nsh create mode 100644 synfig-core/src/modules/mod_png/mptr_png.cpp create mode 100644 synfig-core/src/modules/mod_png/mptr_png.h create mode 100644 synfig-core/src/modules/mod_png/trgt_png.cpp create mode 100644 synfig-core/src/modules/mod_png/trgt_png.h create mode 100644 synfig-core/src/modules/mod_png/unmod_png.nsh create mode 100644 synfig-core/src/modules/mod_ppm/Makefile.am create mode 100644 synfig-core/src/modules/mod_ppm/main.cpp create mode 100644 synfig-core/src/modules/mod_ppm/mod_ppm.nsh create mode 100644 synfig-core/src/modules/mod_ppm/mptr_ppm.cpp create mode 100644 synfig-core/src/modules/mod_ppm/mptr_ppm.h create mode 100644 synfig-core/src/modules/mod_ppm/trgt_mpg.cpp create mode 100644 synfig-core/src/modules/mod_ppm/trgt_mpg.h create mode 100644 synfig-core/src/modules/mod_ppm/trgt_ppm.cpp create mode 100644 synfig-core/src/modules/mod_ppm/trgt_ppm.h create mode 100644 synfig-core/src/modules/mod_ppm/unmod_ppm.nsh create mode 100644 synfig-core/src/modules/mod_svg/Makefile.am create mode 100644 synfig-core/src/modules/mod_svg/layer_svg.cpp create mode 100644 synfig-core/src/modules/mod_svg/layer_svg.h create mode 100644 synfig-core/src/modules/mod_svg/main.cpp create mode 100644 synfig-core/src/modules/mod_svg/mod_svg.nsh create mode 100644 synfig-core/src/modules/mod_svg/svg_parser.cpp create mode 100644 synfig-core/src/modules/mod_svg/svg_parser.h create mode 100644 synfig-core/src/modules/mod_svg/unmod_svg.nsh create mode 100644 synfig-core/src/modules/mod_yuv420p/Makefile.am create mode 100644 synfig-core/src/modules/mod_yuv420p/main.cpp create mode 100644 synfig-core/src/modules/mod_yuv420p/mod_yuv420p.nsh create mode 100644 synfig-core/src/modules/mod_yuv420p/trgt_yuv.cpp create mode 100644 synfig-core/src/modules/mod_yuv420p/trgt_yuv.h create mode 100644 synfig-core/src/modules/mod_yuv420p/unmod_yuv420p.nsh create mode 100644 synfig-core/src/modules/mptr_mplayer/Makefile.am create mode 100644 synfig-core/src/modules/mptr_mplayer/main.cpp create mode 100644 synfig-core/src/modules/mptr_mplayer/mptr_mplayer.cpp create mode 100644 synfig-core/src/modules/mptr_mplayer/mptr_mplayer.h create mode 100644 synfig-core/src/modules/synfig_modules.cfg.in create mode 100644 synfig-core/src/modules/template.nsh create mode 100644 synfig-core/src/modules/untemplate.nsh create mode 100644 synfig-core/src/synfig/Makefile.am create mode 100644 synfig-core/src/synfig/activepoint.cpp create mode 100644 synfig-core/src/synfig/activepoint.h create mode 100644 synfig-core/src/synfig/angle.h create mode 100644 synfig-core/src/synfig/blinepoint.cpp create mode 100644 synfig-core/src/synfig/blinepoint.h create mode 100644 synfig-core/src/synfig/blur.cpp create mode 100644 synfig-core/src/synfig/blur.h create mode 100644 synfig-core/src/synfig/canvas.cpp create mode 100644 synfig-core/src/synfig/canvas.h create mode 100644 synfig-core/src/synfig/canvasbase.h create mode 100644 synfig-core/src/synfig/color.cpp create mode 100644 synfig-core/src/synfig/color.h create mode 100644 synfig-core/src/synfig/context.cpp create mode 100644 synfig-core/src/synfig/context.h create mode 100644 synfig-core/src/synfig/curve_helper.cpp create mode 100644 synfig-core/src/synfig/curve_helper.h create mode 100644 synfig-core/src/synfig/curveset.cpp create mode 100644 synfig-core/src/synfig/curveset.h create mode 100644 synfig-core/src/synfig/distance.cpp create mode 100644 synfig-core/src/synfig/distance.h create mode 100644 synfig-core/src/synfig/exception.cpp create mode 100644 synfig-core/src/synfig/exception.h create mode 100644 synfig-core/src/synfig/gamma.cpp create mode 100644 synfig-core/src/synfig/gamma.h create mode 100644 synfig-core/src/synfig/general.h create mode 100644 synfig-core/src/synfig/gradient.cpp create mode 100644 synfig-core/src/synfig/gradient.h create mode 100644 synfig-core/src/synfig/guid.cpp create mode 100644 synfig-core/src/synfig/guid.h create mode 100644 synfig-core/src/synfig/guidset.h create mode 100644 synfig-core/src/synfig/importer.cpp create mode 100644 synfig-core/src/synfig/importer.h create mode 100644 synfig-core/src/synfig/interpolation.h create mode 100644 synfig-core/src/synfig/keyframe.cpp create mode 100644 synfig-core/src/synfig/keyframe.h create mode 100644 synfig-core/src/synfig/layer.cpp create mode 100644 synfig-core/src/synfig/layer.h create mode 100644 synfig-core/src/synfig/layer_bitmap.cpp create mode 100644 synfig-core/src/synfig/layer_bitmap.h create mode 100644 synfig-core/src/synfig/layer_composite.cpp create mode 100644 synfig-core/src/synfig/layer_composite.h create mode 100644 synfig-core/src/synfig/layer_duplicate.cpp create mode 100644 synfig-core/src/synfig/layer_duplicate.h create mode 100644 synfig-core/src/synfig/layer_mime.cpp create mode 100644 synfig-core/src/synfig/layer_mime.h create mode 100644 synfig-core/src/synfig/layer_motionblur.cpp create mode 100644 synfig-core/src/synfig/layer_motionblur.h create mode 100644 synfig-core/src/synfig/layer_pastecanvas.cpp create mode 100644 synfig-core/src/synfig/layer_pastecanvas.h create mode 100644 synfig-core/src/synfig/layer_polygon.cpp create mode 100644 synfig-core/src/synfig/layer_polygon.h create mode 100644 synfig-core/src/synfig/layer_shape.cpp create mode 100644 synfig-core/src/synfig/layer_shape.h create mode 100644 synfig-core/src/synfig/layer_solidcolor.cpp create mode 100644 synfig-core/src/synfig/layer_solidcolor.h create mode 100644 synfig-core/src/synfig/listimporter.cpp create mode 100644 synfig-core/src/synfig/listimporter.h create mode 100644 synfig-core/src/synfig/loadcanvas.cpp create mode 100644 synfig-core/src/synfig/loadcanvas.h create mode 100644 synfig-core/src/synfig/main.cpp create mode 100644 synfig-core/src/synfig/main.h create mode 100644 synfig-core/src/synfig/matrix.h create mode 100644 synfig-core/src/synfig/module.cpp create mode 100644 synfig-core/src/synfig/module.h create mode 100644 synfig-core/src/synfig/mutex.cpp create mode 100644 synfig-core/src/synfig/mutex.h create mode 100644 synfig-core/src/synfig/node.cpp create mode 100644 synfig-core/src/synfig/node.h create mode 100644 synfig-core/src/synfig/nodebase.h create mode 100644 synfig-core/src/synfig/palette.cpp create mode 100644 synfig-core/src/synfig/palette.h create mode 100644 synfig-core/src/synfig/paramdesc.cpp create mode 100644 synfig-core/src/synfig/paramdesc.h create mode 100644 synfig-core/src/synfig/pch.h create mode 100644 synfig-core/src/synfig/polynomial_root.cpp create mode 100644 synfig-core/src/synfig/polynomial_root.h create mode 100644 synfig-core/src/synfig/protocol.h create mode 100644 synfig-core/src/synfig/quick_rng.h create mode 100644 synfig-core/src/synfig/real.h create mode 100644 synfig-core/src/synfig/rect.cpp create mode 100644 synfig-core/src/synfig/rect.h create mode 100644 synfig-core/src/synfig/releases.h create mode 100644 synfig-core/src/synfig/renddesc.cpp create mode 100644 synfig-core/src/synfig/renddesc.h create mode 100644 synfig-core/src/synfig/render.cpp create mode 100644 synfig-core/src/synfig/render.h create mode 100644 synfig-core/src/synfig/savecanvas.cpp create mode 100644 synfig-core/src/synfig/savecanvas.h create mode 100644 synfig-core/src/synfig/segment.h create mode 100644 synfig-core/src/synfig/smartfile.h create mode 100644 synfig-core/src/synfig/string.h create mode 100644 synfig-core/src/synfig/string_decl.h create mode 100644 synfig-core/src/synfig/surface.cpp create mode 100644 synfig-core/src/synfig/surface.h create mode 100644 synfig-core/src/synfig/surfacenew.cpp create mode 100644 synfig-core/src/synfig/surfacenew.h create mode 100644 synfig-core/src/synfig/synfig.h create mode 100644 synfig-core/src/synfig/synfig.nsh create mode 100644 synfig-core/src/synfig/target.cpp create mode 100644 synfig-core/src/synfig/target.h create mode 100644 synfig-core/src/synfig/target_multi.cpp create mode 100644 synfig-core/src/synfig/target_multi.h create mode 100644 synfig-core/src/synfig/target_null.cpp create mode 100644 synfig-core/src/synfig/target_null.h create mode 100644 synfig-core/src/synfig/target_null_tile.cpp create mode 100644 synfig-core/src/synfig/target_null_tile.h create mode 100644 synfig-core/src/synfig/target_scanline.cpp create mode 100644 synfig-core/src/synfig/target_scanline.h create mode 100644 synfig-core/src/synfig/target_tile.cpp create mode 100644 synfig-core/src/synfig/target_tile.h create mode 100644 synfig-core/src/synfig/time.cpp create mode 100644 synfig-core/src/synfig/time.h create mode 100644 synfig-core/src/synfig/timepointcollect.cpp create mode 100644 synfig-core/src/synfig/timepointcollect.h create mode 100644 synfig-core/src/synfig/transform.cpp create mode 100644 synfig-core/src/synfig/transform.h create mode 100644 synfig-core/src/synfig/types.h create mode 100644 synfig-core/src/synfig/uniqueid.cpp create mode 100644 synfig-core/src/synfig/uniqueid.h create mode 100644 synfig-core/src/synfig/value.cpp create mode 100644 synfig-core/src/synfig/value.h create mode 100644 synfig-core/src/synfig/valuenode.cpp create mode 100644 synfig-core/src/synfig/valuenode.h create mode 100644 synfig-core/src/synfig/valuenode_add.cpp create mode 100644 synfig-core/src/synfig/valuenode_add.h create mode 100644 synfig-core/src/synfig/valuenode_and.cpp create mode 100644 synfig-core/src/synfig/valuenode_and.h create mode 100644 synfig-core/src/synfig/valuenode_anglestring.cpp create mode 100644 synfig-core/src/synfig/valuenode_anglestring.h create mode 100644 synfig-core/src/synfig/valuenode_animated.cpp create mode 100644 synfig-core/src/synfig/valuenode_animated.h create mode 100644 synfig-core/src/synfig/valuenode_atan2.cpp create mode 100644 synfig-core/src/synfig/valuenode_atan2.h create mode 100644 synfig-core/src/synfig/valuenode_bline.cpp create mode 100644 synfig-core/src/synfig/valuenode_bline.h create mode 100644 synfig-core/src/synfig/valuenode_blinecalctangent.cpp create mode 100644 synfig-core/src/synfig/valuenode_blinecalctangent.h create mode 100644 synfig-core/src/synfig/valuenode_blinecalcvertex.cpp create mode 100644 synfig-core/src/synfig/valuenode_blinecalcvertex.h create mode 100644 synfig-core/src/synfig/valuenode_blinecalcwidth.cpp create mode 100644 synfig-core/src/synfig/valuenode_blinecalcwidth.h create mode 100644 synfig-core/src/synfig/valuenode_blinereversetangent.cpp create mode 100644 synfig-core/src/synfig/valuenode_blinereversetangent.h create mode 100644 synfig-core/src/synfig/valuenode_compare.cpp create mode 100644 synfig-core/src/synfig/valuenode_compare.h create mode 100644 synfig-core/src/synfig/valuenode_composite.cpp create mode 100644 synfig-core/src/synfig/valuenode_composite.h create mode 100644 synfig-core/src/synfig/valuenode_const.cpp create mode 100644 synfig-core/src/synfig/valuenode_const.h create mode 100644 synfig-core/src/synfig/valuenode_cos.cpp create mode 100644 synfig-core/src/synfig/valuenode_cos.h create mode 100644 synfig-core/src/synfig/valuenode_dotproduct.cpp create mode 100644 synfig-core/src/synfig/valuenode_dotproduct.h create mode 100644 synfig-core/src/synfig/valuenode_duplicate.cpp create mode 100644 synfig-core/src/synfig/valuenode_duplicate.h create mode 100644 synfig-core/src/synfig/valuenode_dynamiclist.cpp create mode 100644 synfig-core/src/synfig/valuenode_dynamiclist.h create mode 100644 synfig-core/src/synfig/valuenode_exp.cpp create mode 100644 synfig-core/src/synfig/valuenode_exp.h create mode 100644 synfig-core/src/synfig/valuenode_gradientcolor.cpp create mode 100644 synfig-core/src/synfig/valuenode_gradientcolor.h create mode 100644 synfig-core/src/synfig/valuenode_gradientrotate.cpp create mode 100644 synfig-core/src/synfig/valuenode_gradientrotate.h create mode 100644 synfig-core/src/synfig/valuenode_greyed.cpp create mode 100644 synfig-core/src/synfig/valuenode_greyed.h create mode 100644 synfig-core/src/synfig/valuenode_integer.cpp create mode 100644 synfig-core/src/synfig/valuenode_integer.h create mode 100644 synfig-core/src/synfig/valuenode_intstring.cpp create mode 100644 synfig-core/src/synfig/valuenode_intstring.h create mode 100644 synfig-core/src/synfig/valuenode_join.cpp create mode 100644 synfig-core/src/synfig/valuenode_join.h create mode 100644 synfig-core/src/synfig/valuenode_linear.cpp create mode 100644 synfig-core/src/synfig/valuenode_linear.h create mode 100644 synfig-core/src/synfig/valuenode_log.cpp create mode 100644 synfig-core/src/synfig/valuenode_log.h create mode 100644 synfig-core/src/synfig/valuenode_not.cpp create mode 100644 synfig-core/src/synfig/valuenode_not.h create mode 100644 synfig-core/src/synfig/valuenode_or.cpp create mode 100644 synfig-core/src/synfig/valuenode_or.h create mode 100644 synfig-core/src/synfig/valuenode_pow.cpp create mode 100644 synfig-core/src/synfig/valuenode_pow.h create mode 100644 synfig-core/src/synfig/valuenode_radialcomposite.cpp create mode 100644 synfig-core/src/synfig/valuenode_radialcomposite.h create mode 100644 synfig-core/src/synfig/valuenode_range.cpp create mode 100644 synfig-core/src/synfig/valuenode_range.h create mode 100644 synfig-core/src/synfig/valuenode_realstring.cpp create mode 100644 synfig-core/src/synfig/valuenode_realstring.h create mode 100644 synfig-core/src/synfig/valuenode_reciprocal.cpp create mode 100644 synfig-core/src/synfig/valuenode_reciprocal.h create mode 100644 synfig-core/src/synfig/valuenode_reference.cpp create mode 100644 synfig-core/src/synfig/valuenode_reference.h create mode 100644 synfig-core/src/synfig/valuenode_repeat_gradient.cpp create mode 100644 synfig-core/src/synfig/valuenode_repeat_gradient.h create mode 100644 synfig-core/src/synfig/valuenode_scale.cpp create mode 100644 synfig-core/src/synfig/valuenode_scale.h create mode 100644 synfig-core/src/synfig/valuenode_segcalctangent.cpp create mode 100644 synfig-core/src/synfig/valuenode_segcalctangent.h create mode 100644 synfig-core/src/synfig/valuenode_segcalcvertex.cpp create mode 100644 synfig-core/src/synfig/valuenode_segcalcvertex.h create mode 100644 synfig-core/src/synfig/valuenode_sine.cpp create mode 100644 synfig-core/src/synfig/valuenode_sine.h create mode 100644 synfig-core/src/synfig/valuenode_step.cpp create mode 100644 synfig-core/src/synfig/valuenode_step.h create mode 100644 synfig-core/src/synfig/valuenode_stripes.cpp create mode 100644 synfig-core/src/synfig/valuenode_stripes.h create mode 100644 synfig-core/src/synfig/valuenode_subtract.cpp create mode 100644 synfig-core/src/synfig/valuenode_subtract.h create mode 100644 synfig-core/src/synfig/valuenode_switch.cpp create mode 100644 synfig-core/src/synfig/valuenode_switch.h create mode 100644 synfig-core/src/synfig/valuenode_timedswap.cpp create mode 100644 synfig-core/src/synfig/valuenode_timedswap.h create mode 100644 synfig-core/src/synfig/valuenode_timeloop.cpp create mode 100644 synfig-core/src/synfig/valuenode_timeloop.h create mode 100644 synfig-core/src/synfig/valuenode_timestring.cpp create mode 100644 synfig-core/src/synfig/valuenode_timestring.h create mode 100644 synfig-core/src/synfig/valuenode_twotone.cpp create mode 100644 synfig-core/src/synfig/valuenode_twotone.h create mode 100644 synfig-core/src/synfig/valuenode_vectorangle.cpp create mode 100644 synfig-core/src/synfig/valuenode_vectorangle.h create mode 100644 synfig-core/src/synfig/valuenode_vectorlength.cpp create mode 100644 synfig-core/src/synfig/valuenode_vectorlength.h create mode 100644 synfig-core/src/synfig/valuenode_vectorx.cpp create mode 100644 synfig-core/src/synfig/valuenode_vectorx.h create mode 100644 synfig-core/src/synfig/valuenode_vectory.cpp create mode 100644 synfig-core/src/synfig/valuenode_vectory.h create mode 100644 synfig-core/src/synfig/vector.h create mode 100644 synfig-core/src/synfig/version.h create mode 100644 synfig-core/src/synfig/waypoint.cpp create mode 100644 synfig-core/src/synfig/waypoint.h create mode 100644 synfig-core/src/template.cpp create mode 100644 synfig-core/src/template.h create mode 100644 synfig-core/src/tool/Makefile.am create mode 100644 synfig-core/src/tool/main.cpp create mode 100644 synfig-core/src/tool/tool.nsh create mode 100644 synfig-core/synfig-config.in create mode 100644 synfig-core/synfig-core.xcodeproj/config.h create mode 100644 synfig-core/synfig-core.xcodeproj/darco.mode1 create mode 100644 synfig-core/synfig-core.xcodeproj/darco.pbxuser create mode 100644 synfig-core/synfig-core.xcodeproj/project.pbxproj create mode 100644 synfig-core/synfig.kdevprj create mode 100644 synfig-core/synfig.pc.in create mode 100644 synfig-core/synfig.prj delete mode 100644 synfig-core/trunk/AUTHORS delete mode 100644 synfig-core/trunk/ChangeLog.old delete mode 100644 synfig-core/trunk/Makefile.am delete mode 100644 synfig-core/trunk/NEWS delete mode 100644 synfig-core/trunk/README delete mode 100644 synfig-core/trunk/TODO delete mode 100644 synfig-core/trunk/build_tools/Makefile.am delete mode 100644 synfig-core/trunk/build_tools/autorevision.sh delete mode 100644 synfig-core/trunk/config/ltmain.patch delete mode 100755 synfig-core/trunk/config/package delete mode 100644 synfig-core/trunk/configure.ac delete mode 100644 synfig-core/trunk/doc/hw-gfx-mapping.txt delete mode 100644 synfig-core/trunk/doxygen.cfg.in delete mode 100644 synfig-core/trunk/examples/Makefile.am delete mode 100644 synfig-core/trunk/examples/about_dialog.sifz delete mode 100755 synfig-core/trunk/examples/backdrop.sifz delete mode 100644 synfig-core/trunk/examples/business_card.sifz delete mode 100644 synfig-core/trunk/examples/candy.sifz delete mode 100644 synfig-core/trunk/examples/cells.sifz delete mode 100644 synfig-core/trunk/examples/eye.sifz delete mode 100644 synfig-core/trunk/examples/eyes.sifz delete mode 100644 synfig-core/trunk/examples/gamma.sifz delete mode 100644 synfig-core/trunk/examples/gradient.sifz delete mode 100644 synfig-core/trunk/examples/headmo.sifz delete mode 100644 synfig-core/trunk/examples/installer-logo.sifz delete mode 100644 synfig-core/trunk/examples/japan.sifz delete mode 100644 synfig-core/trunk/examples/logo.sifz delete mode 100644 synfig-core/trunk/examples/macwolfen.sifz delete mode 100644 synfig-core/trunk/examples/mandelbrot.sifz delete mode 100644 synfig-core/trunk/examples/newjulia.sifz delete mode 100644 synfig-core/trunk/examples/newjulia2.sifz delete mode 100644 synfig-core/trunk/examples/noise.sifz delete mode 100644 synfig-core/trunk/examples/pirates.sifz delete mode 100644 synfig-core/trunk/examples/preambletaffy.sifz delete mode 100644 synfig-core/trunk/examples/prologue_kid.sifz delete mode 100644 synfig-core/trunk/examples/sparkle.sifz delete mode 100644 synfig-core/trunk/examples/splat.sifz delete mode 100644 synfig-core/trunk/examples/star.sifz delete mode 100644 synfig-core/trunk/examples/walk/Makefile.am delete mode 100755 synfig-core/trunk/examples/walk/animation.lst delete mode 100755 synfig-core/trunk/examples/walk/frame_01.jpg delete mode 100755 synfig-core/trunk/examples/walk/frame_02.jpg delete mode 100755 synfig-core/trunk/examples/walk/frame_03.jpg delete mode 100755 synfig-core/trunk/examples/walk/frame_04.jpg delete mode 100644 synfig-core/trunk/examples/walk/walk.sifz delete mode 100644 synfig-core/trunk/examples/wallpaper.sifz delete mode 100644 synfig-core/trunk/examples/warpcube.sifz delete mode 100644 synfig-core/trunk/examples/warptext.sifz delete mode 100644 synfig-core/trunk/examples/z_depth_test.sifz delete mode 100644 synfig-core/trunk/m4/ETL.m4 delete mode 100644 synfig-core/trunk/m4/cxx_macros.m4 delete mode 100644 synfig-core/trunk/m4/freetype2.m4 delete mode 100644 synfig-core/trunk/m4/libxml++.m4 delete mode 100644 synfig-core/trunk/m4/libxml.m4 delete mode 100644 synfig-core/trunk/m4/pkgconfig.m4 delete mode 100644 synfig-core/trunk/m4/subs.m4 delete mode 100644 synfig-core/trunk/m4/synfig.m4 delete mode 100755 synfig-core/trunk/macosxbuild.sh delete mode 100644 synfig-core/trunk/pkg-info/macosx/core-resources/License.txt delete mode 100644 synfig-core/trunk/pkg-info/macosx/core-resources/ReadMe.txt delete mode 100644 synfig-core/trunk/pkg-info/macosx/core-resources/Welcome.txt delete mode 100755 synfig-core/trunk/pkg-info/macosx/core-resources/install.sh delete mode 100755 synfig-core/trunk/pkg-info/macosx/core-resources/upgrade.sh delete mode 100644 synfig-core/trunk/pkg-info/macosx/synfig-core.info.in delete mode 100644 synfig-core/trunk/po/Makevars delete mode 100644 synfig-core/trunk/po/POTFILES.in delete mode 100644 synfig-core/trunk/po/es.po delete mode 100644 synfig-core/trunk/po/fr.po delete mode 100644 synfig-core/trunk/po/ru.po delete mode 100644 synfig-core/trunk/src/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/example/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/example/filledrect.cpp delete mode 100644 synfig-core/trunk/src/modules/example/filledrect.h delete mode 100644 synfig-core/trunk/src/modules/example/main.cpp delete mode 100644 synfig-core/trunk/src/modules/example/metaballs.cpp delete mode 100644 synfig-core/trunk/src/modules/example/metaballs.h delete mode 100644 synfig-core/trunk/src/modules/example/simplecircle.cpp delete mode 100644 synfig-core/trunk/src/modules/example/simplecircle.h delete mode 100644 synfig-core/trunk/src/modules/lyr_freetype/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.h delete mode 100644 synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.nsh delete mode 100644 synfig-core/trunk/src/modules/lyr_freetype/main.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_freetype/unlyr_freetype.nsh delete mode 100644 synfig-core/trunk/src/modules/lyr_std/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/lyr_std/bevel.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/bevel.h delete mode 100644 synfig-core/trunk/src/modules/lyr_std/booleancurve.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/booleancurve.h delete mode 100644 synfig-core/trunk/src/modules/lyr_std/clamp.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/clamp.h delete mode 100644 synfig-core/trunk/src/modules/lyr_std/curvewarp.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/curvewarp.h delete mode 100644 synfig-core/trunk/src/modules/lyr_std/import.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/import.h delete mode 100644 synfig-core/trunk/src/modules/lyr_std/insideout.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/insideout.h delete mode 100644 synfig-core/trunk/src/modules/lyr_std/julia.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/julia.h delete mode 100644 synfig-core/trunk/src/modules/lyr_std/lyr_std.nsh delete mode 100644 synfig-core/trunk/src/modules/lyr_std/main.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/mandelbrot.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/mandelbrot.h delete mode 100644 synfig-core/trunk/src/modules/lyr_std/rotate.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/rotate.h delete mode 100644 synfig-core/trunk/src/modules/lyr_std/shade.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/shade.h delete mode 100644 synfig-core/trunk/src/modules/lyr_std/sphere_distort.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/sphere_distort.h delete mode 100644 synfig-core/trunk/src/modules/lyr_std/stretch.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/stretch.h delete mode 100644 synfig-core/trunk/src/modules/lyr_std/supersample.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/supersample.h delete mode 100644 synfig-core/trunk/src/modules/lyr_std/timeloop.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/timeloop.h delete mode 100644 synfig-core/trunk/src/modules/lyr_std/translate.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/translate.h delete mode 100644 synfig-core/trunk/src/modules/lyr_std/twirl.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/twirl.h delete mode 100644 synfig-core/trunk/src/modules/lyr_std/unlyr_std.nsh delete mode 100644 synfig-core/trunk/src/modules/lyr_std/warp.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/warp.h delete mode 100644 synfig-core/trunk/src/modules/lyr_std/xorpattern.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/xorpattern.h delete mode 100644 synfig-core/trunk/src/modules/lyr_std/zoom.cpp delete mode 100644 synfig-core/trunk/src/modules/lyr_std/zoom.h delete mode 100644 synfig-core/trunk/src/modules/mod_bmp/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mod_bmp/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_bmp/mod_bmp.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_bmp/mptr_bmp.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_bmp/mptr_bmp.h delete mode 100644 synfig-core/trunk/src/modules/mod_bmp/trgt_bmp.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_bmp/trgt_bmp.h delete mode 100644 synfig-core/trunk/src/modules/mod_bmp/unmod_bmp.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_dv/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mod_dv/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_dv/mod_dv.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_dv/trgt_dv.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_dv/trgt_dv.h delete mode 100644 synfig-core/trunk/src/modules/mod_dv/unmod_dv.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_ffmpeg/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mod_ffmpeg/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_ffmpeg/mod_ffmpeg.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_ffmpeg/mptr_ffmpeg.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_ffmpeg/mptr_ffmpeg.h delete mode 100644 synfig-core/trunk/src/modules/mod_ffmpeg/trgt_ffmpeg.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_ffmpeg/trgt_ffmpeg.h delete mode 100644 synfig-core/trunk/src/modules/mod_ffmpeg/unmod_ffmpeg.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_filter/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mod_filter/blur.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_filter/blur.h delete mode 100644 synfig-core/trunk/src/modules/mod_filter/colorcorrect.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_filter/colorcorrect.h delete mode 100644 synfig-core/trunk/src/modules/mod_filter/halftone.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_filter/halftone.h delete mode 100644 synfig-core/trunk/src/modules/mod_filter/halftone2.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_filter/halftone2.h delete mode 100644 synfig-core/trunk/src/modules/mod_filter/halftone3.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_filter/halftone3.h delete mode 100644 synfig-core/trunk/src/modules/mod_filter/lumakey.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_filter/lumakey.h delete mode 100644 synfig-core/trunk/src/modules/mod_filter/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_filter/mod_filter.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_filter/radialblur.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_filter/radialblur.h delete mode 100644 synfig-core/trunk/src/modules/mod_filter/unmod_filter.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_geometry/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mod_geometry/checkerboard.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_geometry/checkerboard.h delete mode 100644 synfig-core/trunk/src/modules/mod_geometry/circle.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_geometry/circle.h delete mode 100644 synfig-core/trunk/src/modules/mod_geometry/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_geometry/mod_geometry.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_geometry/outline.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_geometry/outline.h delete mode 100644 synfig-core/trunk/src/modules/mod_geometry/rectangle.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_geometry/rectangle.h delete mode 100644 synfig-core/trunk/src/modules/mod_geometry/region.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_geometry/region.h delete mode 100644 synfig-core/trunk/src/modules/mod_geometry/star.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_geometry/star.h delete mode 100644 synfig-core/trunk/src/modules/mod_geometry/unmod_geometry.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_gif/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mod_gif/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_gif/mod_gif.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_gif/trgt_gif.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_gif/trgt_gif.h delete mode 100644 synfig-core/trunk/src/modules/mod_gif/unmod_gif.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_gradient/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mod_gradient/conicalgradient.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_gradient/conicalgradient.h delete mode 100644 synfig-core/trunk/src/modules/mod_gradient/curvegradient.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_gradient/curvegradient.h delete mode 100644 synfig-core/trunk/src/modules/mod_gradient/lineargradient.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_gradient/lineargradient.h delete mode 100644 synfig-core/trunk/src/modules/mod_gradient/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_gradient/mod_gradient.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_gradient/radialgradient.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_gradient/radialgradient.h delete mode 100644 synfig-core/trunk/src/modules/mod_gradient/spiralgradient.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_gradient/spiralgradient.h delete mode 100644 synfig-core/trunk/src/modules/mod_gradient/unmod_gradient.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_imagemagick/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mod_imagemagick/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_imagemagick/mod_imagemagick.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_imagemagick/mptr_imagemagick.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_imagemagick/mptr_imagemagick.h delete mode 100644 synfig-core/trunk/src/modules/mod_imagemagick/trgt_imagemagick.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_imagemagick/trgt_imagemagick.h delete mode 100644 synfig-core/trunk/src/modules/mod_imagemagick/unmod_imagemagick.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_jpeg/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mod_jpeg/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_jpeg/mod_jpeg.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_jpeg/mptr_jpeg.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_jpeg/mptr_jpeg.h delete mode 100644 synfig-core/trunk/src/modules/mod_jpeg/trgt_jpeg.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_jpeg/trgt_jpeg.h delete mode 100644 synfig-core/trunk/src/modules/mod_jpeg/unmod_jpeg.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_libavcodec/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mod_libavcodec/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_libavcodec/mod_libavcodec.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_libavcodec/mptr.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_libavcodec/mptr.h delete mode 100644 synfig-core/trunk/src/modules/mod_libavcodec/trgt_av.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_libavcodec/trgt_av.h delete mode 100644 synfig-core/trunk/src/modules/mod_libavcodec/unmod_libavcodec.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_magickpp/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mod_magickpp/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_magickpp/mod_magickpp.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_magickpp/trgt_magickpp.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_magickpp/trgt_magickpp.h delete mode 100644 synfig-core/trunk/src/modules/mod_magickpp/unmod_magickpp.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_mng/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mod_mng/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_mng/mod_mng.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_mng/trgt_mng.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_mng/trgt_mng.h delete mode 100644 synfig-core/trunk/src/modules/mod_mng/unmod_mng.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_noise/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mod_noise/distort.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_noise/distort.h delete mode 100644 synfig-core/trunk/src/modules/mod_noise/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_noise/mod_noise.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_noise/noise.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_noise/noise.h delete mode 100644 synfig-core/trunk/src/modules/mod_noise/random_noise.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_noise/random_noise.h delete mode 100644 synfig-core/trunk/src/modules/mod_noise/unmod_noise.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_noise/valuenode_random.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_noise/valuenode_random.h delete mode 100644 synfig-core/trunk/src/modules/mod_openexr/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mod_openexr/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_openexr/mod_openexr.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_openexr/mptr_openexr.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_openexr/mptr_openexr.h delete mode 100644 synfig-core/trunk/src/modules/mod_openexr/trgt_openexr.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_openexr/trgt_openexr.h delete mode 100644 synfig-core/trunk/src/modules/mod_openexr/unmod_openexr.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_particle/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mod_particle/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_particle/mod_particle.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_particle/plant.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_particle/plant.h delete mode 100644 synfig-core/trunk/src/modules/mod_particle/random.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_particle/random.h delete mode 100644 synfig-core/trunk/src/modules/mod_particle/unmod_particle.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_png/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mod_png/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_png/mod_png.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_png/mptr_png.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_png/mptr_png.h delete mode 100644 synfig-core/trunk/src/modules/mod_png/trgt_png.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_png/trgt_png.h delete mode 100644 synfig-core/trunk/src/modules/mod_png/unmod_png.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_ppm/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mod_ppm/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_ppm/mod_ppm.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_ppm/mptr_ppm.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_ppm/mptr_ppm.h delete mode 100644 synfig-core/trunk/src/modules/mod_ppm/trgt_mpg.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_ppm/trgt_mpg.h delete mode 100644 synfig-core/trunk/src/modules/mod_ppm/trgt_ppm.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_ppm/trgt_ppm.h delete mode 100644 synfig-core/trunk/src/modules/mod_ppm/unmod_ppm.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_svg/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mod_svg/layer_svg.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_svg/layer_svg.h delete mode 100644 synfig-core/trunk/src/modules/mod_svg/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_svg/mod_svg.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_svg/svg_parser.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_svg/svg_parser.h delete mode 100644 synfig-core/trunk/src/modules/mod_svg/unmod_svg.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_yuv420p/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mod_yuv420p/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_yuv420p/mod_yuv420p.nsh delete mode 100644 synfig-core/trunk/src/modules/mod_yuv420p/trgt_yuv.cpp delete mode 100644 synfig-core/trunk/src/modules/mod_yuv420p/trgt_yuv.h delete mode 100644 synfig-core/trunk/src/modules/mod_yuv420p/unmod_yuv420p.nsh delete mode 100644 synfig-core/trunk/src/modules/mptr_mplayer/Makefile.am delete mode 100644 synfig-core/trunk/src/modules/mptr_mplayer/main.cpp delete mode 100644 synfig-core/trunk/src/modules/mptr_mplayer/mptr_mplayer.cpp delete mode 100644 synfig-core/trunk/src/modules/mptr_mplayer/mptr_mplayer.h delete mode 100644 synfig-core/trunk/src/modules/synfig_modules.cfg.in delete mode 100644 synfig-core/trunk/src/modules/template.nsh delete mode 100644 synfig-core/trunk/src/modules/untemplate.nsh delete mode 100644 synfig-core/trunk/src/synfig/Makefile.am delete mode 100644 synfig-core/trunk/src/synfig/activepoint.cpp delete mode 100644 synfig-core/trunk/src/synfig/activepoint.h delete mode 100644 synfig-core/trunk/src/synfig/angle.h delete mode 100644 synfig-core/trunk/src/synfig/blinepoint.cpp delete mode 100644 synfig-core/trunk/src/synfig/blinepoint.h delete mode 100644 synfig-core/trunk/src/synfig/blur.cpp delete mode 100644 synfig-core/trunk/src/synfig/blur.h delete mode 100644 synfig-core/trunk/src/synfig/canvas.cpp delete mode 100644 synfig-core/trunk/src/synfig/canvas.h delete mode 100644 synfig-core/trunk/src/synfig/canvasbase.h delete mode 100644 synfig-core/trunk/src/synfig/color.cpp delete mode 100644 synfig-core/trunk/src/synfig/color.h delete mode 100644 synfig-core/trunk/src/synfig/context.cpp delete mode 100644 synfig-core/trunk/src/synfig/context.h delete mode 100644 synfig-core/trunk/src/synfig/curve_helper.cpp delete mode 100644 synfig-core/trunk/src/synfig/curve_helper.h delete mode 100644 synfig-core/trunk/src/synfig/curveset.cpp delete mode 100644 synfig-core/trunk/src/synfig/curveset.h delete mode 100644 synfig-core/trunk/src/synfig/distance.cpp delete mode 100644 synfig-core/trunk/src/synfig/distance.h delete mode 100644 synfig-core/trunk/src/synfig/exception.cpp delete mode 100644 synfig-core/trunk/src/synfig/exception.h delete mode 100644 synfig-core/trunk/src/synfig/gamma.cpp delete mode 100644 synfig-core/trunk/src/synfig/gamma.h delete mode 100644 synfig-core/trunk/src/synfig/general.h delete mode 100644 synfig-core/trunk/src/synfig/gradient.cpp delete mode 100644 synfig-core/trunk/src/synfig/gradient.h delete mode 100644 synfig-core/trunk/src/synfig/guid.cpp delete mode 100644 synfig-core/trunk/src/synfig/guid.h delete mode 100644 synfig-core/trunk/src/synfig/guidset.h delete mode 100644 synfig-core/trunk/src/synfig/importer.cpp delete mode 100644 synfig-core/trunk/src/synfig/importer.h delete mode 100644 synfig-core/trunk/src/synfig/interpolation.h delete mode 100644 synfig-core/trunk/src/synfig/keyframe.cpp delete mode 100644 synfig-core/trunk/src/synfig/keyframe.h delete mode 100644 synfig-core/trunk/src/synfig/layer.cpp delete mode 100644 synfig-core/trunk/src/synfig/layer.h delete mode 100644 synfig-core/trunk/src/synfig/layer_bitmap.cpp delete mode 100644 synfig-core/trunk/src/synfig/layer_bitmap.h delete mode 100644 synfig-core/trunk/src/synfig/layer_composite.cpp delete mode 100644 synfig-core/trunk/src/synfig/layer_composite.h delete mode 100644 synfig-core/trunk/src/synfig/layer_duplicate.cpp delete mode 100644 synfig-core/trunk/src/synfig/layer_duplicate.h delete mode 100644 synfig-core/trunk/src/synfig/layer_mime.cpp delete mode 100644 synfig-core/trunk/src/synfig/layer_mime.h delete mode 100644 synfig-core/trunk/src/synfig/layer_motionblur.cpp delete mode 100644 synfig-core/trunk/src/synfig/layer_motionblur.h delete mode 100644 synfig-core/trunk/src/synfig/layer_pastecanvas.cpp delete mode 100644 synfig-core/trunk/src/synfig/layer_pastecanvas.h delete mode 100644 synfig-core/trunk/src/synfig/layer_polygon.cpp delete mode 100644 synfig-core/trunk/src/synfig/layer_polygon.h delete mode 100644 synfig-core/trunk/src/synfig/layer_shape.cpp delete mode 100644 synfig-core/trunk/src/synfig/layer_shape.h delete mode 100644 synfig-core/trunk/src/synfig/layer_solidcolor.cpp delete mode 100644 synfig-core/trunk/src/synfig/layer_solidcolor.h delete mode 100644 synfig-core/trunk/src/synfig/listimporter.cpp delete mode 100644 synfig-core/trunk/src/synfig/listimporter.h delete mode 100644 synfig-core/trunk/src/synfig/loadcanvas.cpp delete mode 100644 synfig-core/trunk/src/synfig/loadcanvas.h delete mode 100644 synfig-core/trunk/src/synfig/main.cpp delete mode 100644 synfig-core/trunk/src/synfig/main.h delete mode 100644 synfig-core/trunk/src/synfig/matrix.h delete mode 100644 synfig-core/trunk/src/synfig/module.cpp delete mode 100644 synfig-core/trunk/src/synfig/module.h delete mode 100644 synfig-core/trunk/src/synfig/mutex.cpp delete mode 100644 synfig-core/trunk/src/synfig/mutex.h delete mode 100644 synfig-core/trunk/src/synfig/node.cpp delete mode 100644 synfig-core/trunk/src/synfig/node.h delete mode 100644 synfig-core/trunk/src/synfig/nodebase.h delete mode 100644 synfig-core/trunk/src/synfig/palette.cpp delete mode 100644 synfig-core/trunk/src/synfig/palette.h delete mode 100644 synfig-core/trunk/src/synfig/paramdesc.cpp delete mode 100644 synfig-core/trunk/src/synfig/paramdesc.h delete mode 100644 synfig-core/trunk/src/synfig/pch.h delete mode 100644 synfig-core/trunk/src/synfig/polynomial_root.cpp delete mode 100644 synfig-core/trunk/src/synfig/polynomial_root.h delete mode 100644 synfig-core/trunk/src/synfig/protocol.h delete mode 100644 synfig-core/trunk/src/synfig/quick_rng.h delete mode 100644 synfig-core/trunk/src/synfig/real.h delete mode 100644 synfig-core/trunk/src/synfig/rect.cpp delete mode 100644 synfig-core/trunk/src/synfig/rect.h delete mode 100644 synfig-core/trunk/src/synfig/releases.h delete mode 100644 synfig-core/trunk/src/synfig/renddesc.cpp delete mode 100644 synfig-core/trunk/src/synfig/renddesc.h delete mode 100644 synfig-core/trunk/src/synfig/render.cpp delete mode 100644 synfig-core/trunk/src/synfig/render.h delete mode 100644 synfig-core/trunk/src/synfig/savecanvas.cpp delete mode 100644 synfig-core/trunk/src/synfig/savecanvas.h delete mode 100644 synfig-core/trunk/src/synfig/segment.h delete mode 100644 synfig-core/trunk/src/synfig/smartfile.h delete mode 100644 synfig-core/trunk/src/synfig/string.h delete mode 100644 synfig-core/trunk/src/synfig/string_decl.h delete mode 100644 synfig-core/trunk/src/synfig/surface.cpp delete mode 100644 synfig-core/trunk/src/synfig/surface.h delete mode 100644 synfig-core/trunk/src/synfig/surfacenew.cpp delete mode 100644 synfig-core/trunk/src/synfig/surfacenew.h delete mode 100644 synfig-core/trunk/src/synfig/synfig.h delete mode 100644 synfig-core/trunk/src/synfig/synfig.nsh delete mode 100644 synfig-core/trunk/src/synfig/target.cpp delete mode 100644 synfig-core/trunk/src/synfig/target.h delete mode 100644 synfig-core/trunk/src/synfig/target_multi.cpp delete mode 100644 synfig-core/trunk/src/synfig/target_multi.h delete mode 100644 synfig-core/trunk/src/synfig/target_null.cpp delete mode 100644 synfig-core/trunk/src/synfig/target_null.h delete mode 100644 synfig-core/trunk/src/synfig/target_null_tile.cpp delete mode 100644 synfig-core/trunk/src/synfig/target_null_tile.h delete mode 100644 synfig-core/trunk/src/synfig/target_scanline.cpp delete mode 100644 synfig-core/trunk/src/synfig/target_scanline.h delete mode 100644 synfig-core/trunk/src/synfig/target_tile.cpp delete mode 100644 synfig-core/trunk/src/synfig/target_tile.h delete mode 100644 synfig-core/trunk/src/synfig/time.cpp delete mode 100644 synfig-core/trunk/src/synfig/time.h delete mode 100644 synfig-core/trunk/src/synfig/timepointcollect.cpp delete mode 100644 synfig-core/trunk/src/synfig/timepointcollect.h delete mode 100644 synfig-core/trunk/src/synfig/transform.cpp delete mode 100644 synfig-core/trunk/src/synfig/transform.h delete mode 100644 synfig-core/trunk/src/synfig/types.h delete mode 100644 synfig-core/trunk/src/synfig/uniqueid.cpp delete mode 100644 synfig-core/trunk/src/synfig/uniqueid.h delete mode 100644 synfig-core/trunk/src/synfig/value.cpp delete mode 100644 synfig-core/trunk/src/synfig/value.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_add.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_add.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_and.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_and.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_anglestring.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_anglestring.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_animated.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_animated.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_atan2.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_atan2.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_bline.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_bline.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_blinecalctangent.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_blinecalctangent.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_blinecalcvertex.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_blinecalcvertex.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_blinecalcwidth.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_blinecalcwidth.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_blinereversetangent.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_blinereversetangent.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_compare.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_compare.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_composite.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_composite.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_const.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_const.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_cos.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_cos.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_dotproduct.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_dotproduct.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_duplicate.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_duplicate.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_dynamiclist.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_exp.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_exp.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_gradientcolor.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_gradientcolor.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_gradientrotate.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_greyed.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_greyed.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_integer.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_integer.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_intstring.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_intstring.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_join.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_join.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_linear.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_linear.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_log.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_log.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_not.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_not.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_or.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_or.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_pow.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_pow.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_radialcomposite.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_radialcomposite.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_range.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_range.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_realstring.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_realstring.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_reciprocal.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_reciprocal.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_reference.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_reference.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_repeat_gradient.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_repeat_gradient.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_scale.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_scale.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_segcalctangent.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_segcalctangent.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_segcalcvertex.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_segcalcvertex.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_sine.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_sine.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_step.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_step.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_stripes.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_stripes.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_subtract.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_subtract.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_switch.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_switch.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_timedswap.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_timedswap.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_timeloop.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_timeloop.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_timestring.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_timestring.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_twotone.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_twotone.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_vectorangle.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_vectorangle.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_vectorlength.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_vectorlength.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_vectorx.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_vectorx.h delete mode 100644 synfig-core/trunk/src/synfig/valuenode_vectory.cpp delete mode 100644 synfig-core/trunk/src/synfig/valuenode_vectory.h delete mode 100644 synfig-core/trunk/src/synfig/vector.h delete mode 100644 synfig-core/trunk/src/synfig/version.h delete mode 100644 synfig-core/trunk/src/synfig/waypoint.cpp delete mode 100644 synfig-core/trunk/src/synfig/waypoint.h delete mode 100644 synfig-core/trunk/src/template.cpp delete mode 100644 synfig-core/trunk/src/template.h delete mode 100644 synfig-core/trunk/src/tool/Makefile.am delete mode 100644 synfig-core/trunk/src/tool/main.cpp delete mode 100644 synfig-core/trunk/src/tool/tool.nsh delete mode 100644 synfig-core/trunk/synfig-config.in delete mode 100644 synfig-core/trunk/synfig-core.xcodeproj/config.h delete mode 100644 synfig-core/trunk/synfig-core.xcodeproj/darco.mode1 delete mode 100644 synfig-core/trunk/synfig-core.xcodeproj/darco.pbxuser delete mode 100644 synfig-core/trunk/synfig-core.xcodeproj/project.pbxproj delete mode 100644 synfig-core/trunk/synfig.kdevprj delete mode 100644 synfig-core/trunk/synfig.pc.in delete mode 100644 synfig-core/trunk/synfig.prj delete mode 100755 synfig-core/trunk/win32build.sh delete mode 100644 synfig-core/trunk/win32inst.nsi.in create mode 100755 synfig-core/win32build.sh create mode 100644 synfig-core/win32inst.nsi.in create mode 100644 synfig-docs/IndexToDo create mode 100644 synfig-docs/Makefile create mode 100644 synfig-docs/README create mode 100644 synfig-docs/TODO create mode 100644 synfig-docs/build-deps create mode 100644 synfig-docs/ca/animation/conclusion.sgml create mode 100644 synfig-docs/ca/animation/introduction.sgml create mode 100644 synfig-docs/ca/animation/keyframe.sgml create mode 100644 synfig-docs/ca/animation/movement.sgml create mode 100644 synfig-docs/ca/animation/rendering.sgml create mode 100644 synfig-docs/ca/animation/timeline.sgml create mode 100644 synfig-docs/ca/animation/workspace.sgml create mode 100644 synfig-docs/ca/appendix/apendices.sgml create mode 100644 synfig-docs/ca/appendix/glossary.sgml create mode 100644 synfig-docs/ca/appendix/keyboard.sgml create mode 100644 synfig-docs/ca/installation/installation.sgml create mode 100644 synfig-docs/ca/interface/history.sgml create mode 100644 synfig-docs/ca/interface/interface.sgml create mode 100644 synfig-docs/ca/interface/layers.sgml create mode 100644 synfig-docs/ca/interface/navigator.sgml create mode 100644 synfig-docs/ca/interface/params.sgml create mode 100644 synfig-docs/ca/interface/toolbox.eps create mode 100644 synfig-docs/ca/interface/toolbox.sgml create mode 100644 synfig-docs/ca/interface/tooloptions.sgml create mode 100644 synfig-docs/ca/introduction/introduction.sgml create mode 100644 synfig-docs/ca/steps/done create mode 100644 synfig-docs/ca/steps/firststeps.sgml create mode 100644 synfig-docs/ca/steps/layers/combining.sgml create mode 100644 synfig-docs/ca/steps/layers/done create mode 100644 synfig-docs/ca/steps/layers/layers.sgml create mode 100644 synfig-docs/ca/steps/layers/using.sgml create mode 100644 synfig-docs/ca/steps/linking.sgml create mode 100644 synfig-docs/ca/steps/shapes.sgml create mode 100644 synfig-docs/ca/synfig-studio.sgml create mode 100644 synfig-docs/ca/tips/bitmap.sgml create mode 100644 synfig-docs/ca/tips/closebline.sgml create mode 100644 synfig-docs/ca/tips/dock.sgml create mode 100644 synfig-docs/ca/tips/filloutline.sgml create mode 100644 synfig-docs/ca/tips/gradient_object.sgml create mode 100644 synfig-docs/ca/tips/layer.sgml create mode 100644 synfig-docs/en/animation/conclusion.sgml create mode 100644 synfig-docs/en/animation/introduction.sgml create mode 100644 synfig-docs/en/animation/keyframe.sgml create mode 100644 synfig-docs/en/animation/movement.sgml create mode 100644 synfig-docs/en/animation/rendering.sgml create mode 100644 synfig-docs/en/animation/timeline.sgml create mode 100644 synfig-docs/en/animation/workspace.sgml create mode 100644 synfig-docs/en/appendix/apendices.sgml create mode 100644 synfig-docs/en/appendix/glossary.sgml create mode 100644 synfig-docs/en/appendix/keyboard.sgml create mode 100644 synfig-docs/en/installation/installation.sgml create mode 100644 synfig-docs/en/interface/history.sgml create mode 100644 synfig-docs/en/interface/interface.sgml create mode 100644 synfig-docs/en/interface/layers.sgml create mode 100644 synfig-docs/en/interface/navigator.sgml create mode 100644 synfig-docs/en/interface/params.sgml create mode 100644 synfig-docs/en/interface/toolbox.eps create mode 100644 synfig-docs/en/interface/toolbox.sgml create mode 100644 synfig-docs/en/interface/tooloptions.sgml create mode 100644 synfig-docs/en/introduction/introduction.sgml create mode 100644 synfig-docs/en/steps/done create mode 100644 synfig-docs/en/steps/firststeps.sgml create mode 100644 synfig-docs/en/steps/layers/combining.sgml create mode 100644 synfig-docs/en/steps/layers/done create mode 100644 synfig-docs/en/steps/layers/layers.sgml create mode 100644 synfig-docs/en/steps/layers/using.sgml create mode 100644 synfig-docs/en/steps/linking.sgml create mode 100644 synfig-docs/en/steps/shapes.sgml create mode 100644 synfig-docs/en/synfig-studio.sgml create mode 100644 synfig-docs/en/tips/bitmap.sgml create mode 100644 synfig-docs/en/tips/closebline.sgml create mode 100644 synfig-docs/en/tips/dock.sgml create mode 100644 synfig-docs/en/tips/filloutline.sgml create mode 100644 synfig-docs/en/tips/gradient_object.sgml create mode 100644 synfig-docs/en/tips/layer.sgml create mode 100644 synfig-docs/others/Authors create mode 100644 synfig-docs/others/hola.txt create mode 100644 synfig-docs/png/toolbox.png create mode 100755 synfig-docs/scripts/build.sh create mode 100755 synfig-docs/scripts/clean.sh delete mode 100644 synfig-docs/trunk/IndexToDo delete mode 100644 synfig-docs/trunk/Makefile delete mode 100644 synfig-docs/trunk/README delete mode 100644 synfig-docs/trunk/TODO delete mode 100644 synfig-docs/trunk/build-deps delete mode 100644 synfig-docs/trunk/ca/animation/conclusion.sgml delete mode 100644 synfig-docs/trunk/ca/animation/introduction.sgml delete mode 100644 synfig-docs/trunk/ca/animation/keyframe.sgml delete mode 100644 synfig-docs/trunk/ca/animation/movement.sgml delete mode 100644 synfig-docs/trunk/ca/animation/rendering.sgml delete mode 100644 synfig-docs/trunk/ca/animation/timeline.sgml delete mode 100644 synfig-docs/trunk/ca/animation/workspace.sgml delete mode 100644 synfig-docs/trunk/ca/appendix/apendices.sgml delete mode 100644 synfig-docs/trunk/ca/appendix/glossary.sgml delete mode 100644 synfig-docs/trunk/ca/appendix/keyboard.sgml delete mode 100644 synfig-docs/trunk/ca/installation/installation.sgml delete mode 100644 synfig-docs/trunk/ca/interface/history.sgml delete mode 100644 synfig-docs/trunk/ca/interface/interface.sgml delete mode 100644 synfig-docs/trunk/ca/interface/layers.sgml delete mode 100644 synfig-docs/trunk/ca/interface/navigator.sgml delete mode 100644 synfig-docs/trunk/ca/interface/params.sgml delete mode 100644 synfig-docs/trunk/ca/interface/toolbox.eps delete mode 100644 synfig-docs/trunk/ca/interface/toolbox.sgml delete mode 100644 synfig-docs/trunk/ca/interface/tooloptions.sgml delete mode 100644 synfig-docs/trunk/ca/introduction/introduction.sgml delete mode 100644 synfig-docs/trunk/ca/steps/done delete mode 100644 synfig-docs/trunk/ca/steps/firststeps.sgml delete mode 100644 synfig-docs/trunk/ca/steps/layers/combining.sgml delete mode 100644 synfig-docs/trunk/ca/steps/layers/done delete mode 100644 synfig-docs/trunk/ca/steps/layers/layers.sgml delete mode 100644 synfig-docs/trunk/ca/steps/layers/using.sgml delete mode 100644 synfig-docs/trunk/ca/steps/linking.sgml delete mode 100644 synfig-docs/trunk/ca/steps/shapes.sgml delete mode 100644 synfig-docs/trunk/ca/synfig-studio.sgml delete mode 100644 synfig-docs/trunk/ca/tips/bitmap.sgml delete mode 100644 synfig-docs/trunk/ca/tips/closebline.sgml delete mode 100644 synfig-docs/trunk/ca/tips/dock.sgml delete mode 100644 synfig-docs/trunk/ca/tips/filloutline.sgml delete mode 100644 synfig-docs/trunk/ca/tips/gradient_object.sgml delete mode 100644 synfig-docs/trunk/ca/tips/layer.sgml delete mode 100644 synfig-docs/trunk/en/animation/conclusion.sgml delete mode 100644 synfig-docs/trunk/en/animation/introduction.sgml delete mode 100644 synfig-docs/trunk/en/animation/keyframe.sgml delete mode 100644 synfig-docs/trunk/en/animation/movement.sgml delete mode 100644 synfig-docs/trunk/en/animation/rendering.sgml delete mode 100644 synfig-docs/trunk/en/animation/timeline.sgml delete mode 100644 synfig-docs/trunk/en/animation/workspace.sgml delete mode 100644 synfig-docs/trunk/en/appendix/apendices.sgml delete mode 100644 synfig-docs/trunk/en/appendix/glossary.sgml delete mode 100644 synfig-docs/trunk/en/appendix/keyboard.sgml delete mode 100644 synfig-docs/trunk/en/installation/installation.sgml delete mode 100644 synfig-docs/trunk/en/interface/history.sgml delete mode 100644 synfig-docs/trunk/en/interface/interface.sgml delete mode 100644 synfig-docs/trunk/en/interface/layers.sgml delete mode 100644 synfig-docs/trunk/en/interface/navigator.sgml delete mode 100644 synfig-docs/trunk/en/interface/params.sgml delete mode 100644 synfig-docs/trunk/en/interface/toolbox.eps delete mode 100644 synfig-docs/trunk/en/interface/toolbox.sgml delete mode 100644 synfig-docs/trunk/en/interface/tooloptions.sgml delete mode 100644 synfig-docs/trunk/en/introduction/introduction.sgml delete mode 100644 synfig-docs/trunk/en/steps/done delete mode 100644 synfig-docs/trunk/en/steps/firststeps.sgml delete mode 100644 synfig-docs/trunk/en/steps/layers/combining.sgml delete mode 100644 synfig-docs/trunk/en/steps/layers/done delete mode 100644 synfig-docs/trunk/en/steps/layers/layers.sgml delete mode 100644 synfig-docs/trunk/en/steps/layers/using.sgml delete mode 100644 synfig-docs/trunk/en/steps/linking.sgml delete mode 100644 synfig-docs/trunk/en/steps/shapes.sgml delete mode 100644 synfig-docs/trunk/en/synfig-studio.sgml delete mode 100644 synfig-docs/trunk/en/tips/bitmap.sgml delete mode 100644 synfig-docs/trunk/en/tips/closebline.sgml delete mode 100644 synfig-docs/trunk/en/tips/dock.sgml delete mode 100644 synfig-docs/trunk/en/tips/filloutline.sgml delete mode 100644 synfig-docs/trunk/en/tips/gradient_object.sgml delete mode 100644 synfig-docs/trunk/en/tips/layer.sgml delete mode 100644 synfig-docs/trunk/others/Authors delete mode 100644 synfig-docs/trunk/others/hola.txt delete mode 100644 synfig-docs/trunk/png/toolbox.png delete mode 100755 synfig-docs/trunk/scripts/build.sh delete mode 100755 synfig-docs/trunk/scripts/clean.sh create mode 100644 synfig-osx/launcher/.cvsignore create mode 100644 synfig-osx/launcher/English.lproj/.cvsignore create mode 100644 synfig-osx/launcher/English.lproj/InfoPlist.strings create mode 100644 synfig-osx/launcher/English.lproj/main.nib/classes.nib create mode 100644 synfig-osx/launcher/English.lproj/main.nib/info.nib create mode 100644 synfig-osx/launcher/English.lproj/main.nib/objects.nib create mode 100644 synfig-osx/launcher/English.lproj/main~.nib/classes.nib create mode 100644 synfig-osx/launcher/English.lproj/main~.nib/info.nib create mode 100644 synfig-osx/launcher/English.lproj/main~.nib/objects.nib create mode 100644 synfig-osx/launcher/Imakefile create mode 100644 synfig-osx/launcher/Synfig Studio.pbproj/.cvsignore create mode 100644 synfig-osx/launcher/Synfig Studio.pbproj/darco.mode1 create mode 100644 synfig-osx/launcher/Synfig Studio.pbproj/darco.pbxuser create mode 100644 synfig-osx/launcher/Synfig Studio.pbproj/project.pbxproj create mode 100644 synfig-osx/launcher/SynfigApplication.h create mode 100644 synfig-osx/launcher/SynfigApplication.m create mode 100644 synfig-osx/launcher/X11.icns create mode 100644 synfig-osx/launcher/X11Application.h create mode 100644 synfig-osx/launcher/X11Application.m create mode 100644 synfig-osx/launcher/X11Controller.h create mode 100644 synfig-osx/launcher/X11Controller.m create mode 100644 synfig-osx/launcher/Xquartz.man create mode 100644 synfig-osx/launcher/appledri.c create mode 100644 synfig-osx/launcher/applewm-impl.c create mode 100644 synfig-osx/launcher/applewm.c create mode 100644 synfig-osx/launcher/applewm.h create mode 100644 synfig-osx/launcher/applewmstr.h create mode 100644 synfig-osx/launcher/bundle-main.c create mode 100644 synfig-osx/launcher/darwin-input.c create mode 100644 synfig-osx/launcher/darwin-keyboard.c create mode 100644 synfig-osx/launcher/darwin-keyboard.h create mode 100644 synfig-osx/launcher/darwin-new-keymap.c create mode 100644 synfig-osx/launcher/darwin-old-keymap.c create mode 100644 synfig-osx/launcher/darwin.c create mode 100644 synfig-osx/launcher/darwin.h create mode 100644 synfig-osx/launcher/dri-surface.c create mode 100644 synfig-osx/launcher/dri-surface.h create mode 100644 synfig-osx/launcher/dri.h create mode 100644 synfig-osx/launcher/dristruct.h create mode 100644 synfig-osx/launcher/events.applescript create mode 100644 synfig-osx/launcher/keysym2ucs.c create mode 100644 synfig-osx/launcher/keysym2ucs.h create mode 100644 synfig-osx/launcher/pseudoramiX.c create mode 100644 synfig-osx/launcher/pseudoramiX.h create mode 100644 synfig-osx/launcher/quartz-audio.c create mode 100644 synfig-osx/launcher/quartz-audio.h create mode 100644 synfig-osx/launcher/quartz-cursor.c create mode 100644 synfig-osx/launcher/quartz-cursor.h create mode 100644 synfig-osx/launcher/quartz-server.c create mode 100644 synfig-osx/launcher/quartz.c create mode 100644 synfig-osx/launcher/quartz.h create mode 100644 synfig-osx/launcher/rootless-common.c create mode 100644 synfig-osx/launcher/rootless-common.h create mode 100644 synfig-osx/launcher/rootless-gc.c create mode 100644 synfig-osx/launcher/rootless-picture.c create mode 100644 synfig-osx/launcher/rootless-screen.c create mode 100644 synfig-osx/launcher/rootless-val-tree.c create mode 100644 synfig-osx/launcher/rootless-window.c create mode 100644 synfig-osx/launcher/rootless-window.h create mode 100644 synfig-osx/launcher/rootless.h create mode 100644 synfig-osx/launcher/sif_file.icns create mode 100644 synfig-osx/launcher/utils/.cvsignore create mode 100644 synfig-osx/launcher/utils/Imakefile create mode 100644 synfig-osx/launcher/utils/README.txt create mode 100644 synfig-osx/launcher/utils/dumpkeymap.c create mode 100644 synfig-osx/launcher/utils/dumpkeymap.man create mode 100644 synfig-osx/launcher/voria.icns create mode 100644 synfig-osx/launcher/x-hash.c create mode 100644 synfig-osx/launcher/x-hash.h create mode 100644 synfig-osx/launcher/x-hook.c create mode 100644 synfig-osx/launcher/x-hook.h create mode 100644 synfig-osx/launcher/x-list.c create mode 100644 synfig-osx/launcher/x-list.h delete mode 100644 synfig-osx/trunk/launcher/.cvsignore delete mode 100644 synfig-osx/trunk/launcher/English.lproj/.cvsignore delete mode 100644 synfig-osx/trunk/launcher/English.lproj/InfoPlist.strings delete mode 100644 synfig-osx/trunk/launcher/English.lproj/main.nib/classes.nib delete mode 100644 synfig-osx/trunk/launcher/English.lproj/main.nib/info.nib delete mode 100644 synfig-osx/trunk/launcher/English.lproj/main.nib/objects.nib delete mode 100644 synfig-osx/trunk/launcher/English.lproj/main~.nib/classes.nib delete mode 100644 synfig-osx/trunk/launcher/English.lproj/main~.nib/info.nib delete mode 100644 synfig-osx/trunk/launcher/English.lproj/main~.nib/objects.nib delete mode 100644 synfig-osx/trunk/launcher/Imakefile delete mode 100644 synfig-osx/trunk/launcher/Synfig Studio.pbproj/.cvsignore delete mode 100644 synfig-osx/trunk/launcher/Synfig Studio.pbproj/darco.mode1 delete mode 100644 synfig-osx/trunk/launcher/Synfig Studio.pbproj/darco.pbxuser delete mode 100644 synfig-osx/trunk/launcher/Synfig Studio.pbproj/project.pbxproj delete mode 100644 synfig-osx/trunk/launcher/SynfigApplication.h delete mode 100644 synfig-osx/trunk/launcher/SynfigApplication.m delete mode 100644 synfig-osx/trunk/launcher/X11.icns delete mode 100644 synfig-osx/trunk/launcher/X11Application.h delete mode 100644 synfig-osx/trunk/launcher/X11Application.m delete mode 100644 synfig-osx/trunk/launcher/X11Controller.h delete mode 100644 synfig-osx/trunk/launcher/X11Controller.m delete mode 100644 synfig-osx/trunk/launcher/Xquartz.man delete mode 100644 synfig-osx/trunk/launcher/appledri.c delete mode 100644 synfig-osx/trunk/launcher/applewm-impl.c delete mode 100644 synfig-osx/trunk/launcher/applewm.c delete mode 100644 synfig-osx/trunk/launcher/applewm.h delete mode 100644 synfig-osx/trunk/launcher/applewmstr.h delete mode 100644 synfig-osx/trunk/launcher/bundle-main.c delete mode 100644 synfig-osx/trunk/launcher/darwin-input.c delete mode 100644 synfig-osx/trunk/launcher/darwin-keyboard.c delete mode 100644 synfig-osx/trunk/launcher/darwin-keyboard.h delete mode 100644 synfig-osx/trunk/launcher/darwin-new-keymap.c delete mode 100644 synfig-osx/trunk/launcher/darwin-old-keymap.c delete mode 100644 synfig-osx/trunk/launcher/darwin.c delete mode 100644 synfig-osx/trunk/launcher/darwin.h delete mode 100644 synfig-osx/trunk/launcher/dri-surface.c delete mode 100644 synfig-osx/trunk/launcher/dri-surface.h delete mode 100644 synfig-osx/trunk/launcher/dri.h delete mode 100644 synfig-osx/trunk/launcher/dristruct.h delete mode 100644 synfig-osx/trunk/launcher/events.applescript delete mode 100644 synfig-osx/trunk/launcher/keysym2ucs.c delete mode 100644 synfig-osx/trunk/launcher/keysym2ucs.h delete mode 100644 synfig-osx/trunk/launcher/pseudoramiX.c delete mode 100644 synfig-osx/trunk/launcher/pseudoramiX.h delete mode 100644 synfig-osx/trunk/launcher/quartz-audio.c delete mode 100644 synfig-osx/trunk/launcher/quartz-audio.h delete mode 100644 synfig-osx/trunk/launcher/quartz-cursor.c delete mode 100644 synfig-osx/trunk/launcher/quartz-cursor.h delete mode 100644 synfig-osx/trunk/launcher/quartz-server.c delete mode 100644 synfig-osx/trunk/launcher/quartz.c delete mode 100644 synfig-osx/trunk/launcher/quartz.h delete mode 100644 synfig-osx/trunk/launcher/rootless-common.c delete mode 100644 synfig-osx/trunk/launcher/rootless-common.h delete mode 100644 synfig-osx/trunk/launcher/rootless-gc.c delete mode 100644 synfig-osx/trunk/launcher/rootless-picture.c delete mode 100644 synfig-osx/trunk/launcher/rootless-screen.c delete mode 100644 synfig-osx/trunk/launcher/rootless-val-tree.c delete mode 100644 synfig-osx/trunk/launcher/rootless-window.c delete mode 100644 synfig-osx/trunk/launcher/rootless-window.h delete mode 100644 synfig-osx/trunk/launcher/rootless.h delete mode 100644 synfig-osx/trunk/launcher/sif_file.icns delete mode 100644 synfig-osx/trunk/launcher/utils/.cvsignore delete mode 100644 synfig-osx/trunk/launcher/utils/Imakefile delete mode 100644 synfig-osx/trunk/launcher/utils/README.txt delete mode 100644 synfig-osx/trunk/launcher/utils/dumpkeymap.c delete mode 100644 synfig-osx/trunk/launcher/utils/dumpkeymap.man delete mode 100644 synfig-osx/trunk/launcher/voria.icns delete mode 100644 synfig-osx/trunk/launcher/x-hash.c delete mode 100644 synfig-osx/trunk/launcher/x-hash.h delete mode 100644 synfig-osx/trunk/launcher/x-hook.c delete mode 100644 synfig-osx/trunk/launcher/x-hook.h delete mode 100644 synfig-osx/trunk/launcher/x-list.c delete mode 100644 synfig-osx/trunk/launcher/x-list.h create mode 100644 synfig-studio/AUTHORS create mode 100644 synfig-studio/ChangeLog.old create mode 100644 synfig-studio/Makefile.am create mode 100644 synfig-studio/NEWS create mode 100644 synfig-studio/README create mode 100644 synfig-studio/TODO create mode 100644 synfig-studio/build_tools/Makefile.am create mode 100644 synfig-studio/build_tools/autorevision.sh create mode 100644 synfig-studio/config/ltmain.patch create mode 100755 synfig-studio/config/package create mode 100755 synfig-studio/configure.ac create mode 100755 synfig-studio/debugcrash create mode 100644 synfig-studio/doxygen.cfg.in create mode 100644 synfig-studio/images/Makefile.am create mode 100644 synfig-studio/images/Makefile.inc create mode 100644 synfig-studio/images/about_icon.sif create mode 100644 synfig-studio/images/angle_icon.sif create mode 100644 synfig-studio/images/bline_icon.sif create mode 100644 synfig-studio/images/blinepoint_icon.sif create mode 100644 synfig-studio/images/bool_icon.sif create mode 100644 synfig-studio/images/canvas_icon.sif create mode 100644 synfig-studio/images/canvas_pointer_icon.sif create mode 100644 synfig-studio/images/children_icon.sif create mode 100644 synfig-studio/images/circle_icon.sif create mode 100644 synfig-studio/images/clear_redo_icon.sif create mode 100644 synfig-studio/images/clear_undo_icon.sif create mode 100644 synfig-studio/images/color_icon.sif create mode 100644 synfig-studio/images/curves_icon.sif create mode 100644 synfig-studio/images/draw_icon.sif create mode 100644 synfig-studio/images/duck_angle_icon.sif create mode 100644 synfig-studio/images/duck_position_icon.sif create mode 100644 synfig-studio/images/duck_radius_icon.sif create mode 100644 synfig-studio/images/duck_tangent_icon.sif create mode 100644 synfig-studio/images/duck_vertex_icon.sif create mode 100644 synfig-studio/images/duck_width_icon.sif create mode 100644 synfig-studio/images/duplicate_icon.sif create mode 100644 synfig-studio/images/encapsulate_icon.sif create mode 100644 synfig-studio/images/eyedrop_icon.sif create mode 100644 synfig-studio/images/fill_icon.sif create mode 100644 synfig-studio/images/gradient_icon.sif create mode 100644 synfig-studio/images/group_icon.sif create mode 100644 synfig-studio/images/info_icon.sif create mode 100644 synfig-studio/images/installer_logo.sif create mode 100644 synfig-studio/images/installer_logo_osx.sif create mode 100644 synfig-studio/images/integer_icon.sif create mode 100644 synfig-studio/images/keyframe_icon.sif create mode 100644 synfig-studio/images/keyframe_lock_icon.sif create mode 100644 synfig-studio/images/layer_icon.sif create mode 100644 synfig-studio/images/list_icon.sif create mode 100644 synfig-studio/images/logo.sif create mode 100644 synfig-studio/images/meta_data_icon.sif create mode 100644 synfig-studio/images/mirror_icon.sif create mode 100644 synfig-studio/images/navigator_icon.sif create mode 100644 synfig-studio/images/normal_icon.sif create mode 100644 synfig-studio/images/onion_skin_icon.sif create mode 100644 synfig-studio/images/pastecanvas_icon.sif create mode 100644 synfig-studio/images/plant_icon.sif create mode 100644 synfig-studio/images/polygon_icon.sif create mode 100644 synfig-studio/images/polyline_icon.sif create mode 100644 synfig-studio/images/real_icon.sif create mode 100644 synfig-studio/images/rectangle_icon.sif create mode 100644 synfig-studio/images/rename_icon.sif create mode 100644 synfig-studio/images/reset_colors_icon.sif create mode 100644 synfig-studio/images/rotate_icon.sif create mode 100644 synfig-studio/images/saveall_icon.sif create mode 100644 synfig-studio/images/scale_icon.sif create mode 100644 synfig-studio/images/seek_begin.sif create mode 100644 synfig-studio/images/seek_end.sif create mode 100644 synfig-studio/images/seek_next_frame.sif create mode 100644 synfig-studio/images/seek_prev_frame.sif create mode 100644 synfig-studio/images/segment_icon.sif create mode 100644 synfig-studio/images/select_all_child_layers_icon.sif create mode 100644 synfig-studio/images/set_fill_color.sif create mode 100644 synfig-studio/images/set_outline_color.sif create mode 100644 synfig-studio/images/show_grid_icon.sif create mode 100644 synfig-studio/images/sif_icon.sif create mode 100644 synfig-studio/images/sketch_icon.sif create mode 100644 synfig-studio/images/smooth_move_icon.sif create mode 100644 synfig-studio/images/snap_grid_icon.sif create mode 100644 synfig-studio/images/splash_screen-0.61.07.sif create mode 100644 synfig-studio/images/splash_screen-0.61.08.sif create mode 100644 synfig-studio/images/splash_screen.sifz create mode 100644 synfig-studio/images/star_icon.sif create mode 100644 synfig-studio/images/string_icon.sif create mode 100644 synfig-studio/images/swap_colors_icon.sif create mode 100644 synfig-studio/images/synfig_icon.sif create mode 100644 synfig-studio/images/synfig_icon.svg create mode 100644 synfig-studio/images/text_icon.sif create mode 100644 synfig-studio/images/time_icon.sif create mode 100644 synfig-studio/images/time_track_icon.sif create mode 100644 synfig-studio/images/valuenode_icon.sif create mode 100644 synfig-studio/images/vector_icon.sif create mode 100644 synfig-studio/images/wallpaper.sif create mode 100644 synfig-studio/images/width_icon.sif create mode 100644 synfig-studio/images/zoom_icon.sif create mode 100755 synfig-studio/m4/ETL.m4 create mode 100755 synfig-studio/m4/cxx_macros.m4 create mode 100755 synfig-studio/m4/gnome.m4 create mode 100755 synfig-studio/m4/libxml.m4 create mode 100755 synfig-studio/m4/subs.m4 create mode 100755 synfig-studio/m4/synfig.m4 create mode 100755 synfig-studio/macosxbuild.sh create mode 100644 synfig-studio/pkg-info/macosx/studio-resources/Description.plist create mode 100644 synfig-studio/pkg-info/macosx/studio-resources/English.lproj/InstallationCheck.strings create mode 100644 synfig-studio/pkg-info/macosx/studio-resources/ReadMe.txt create mode 100644 synfig-studio/pkg-info/macosx/studio-resources/Welcome.txt create mode 100755 synfig-studio/pkg-info/macosx/studio-resources/install.sh create mode 100755 synfig-studio/pkg-info/macosx/studio-resources/synfig-studio.post_install create mode 100755 synfig-studio/pkg-info/macosx/studio-resources/synfig-studio.post_upgrade create mode 100755 synfig-studio/pkg-info/macosx/studio-resources/upgrade.sh create mode 100644 synfig-studio/pkg-info/macosx/synfig-studio.info.in create mode 100644 synfig-studio/po/Makevars create mode 100644 synfig-studio/po/POTFILES.in create mode 100644 synfig-studio/po/ca.po create mode 100644 synfig-studio/po/es.po create mode 100644 synfig-studio/po/fr.po create mode 100644 synfig-studio/po/ru.po create mode 100644 synfig-studio/src/Makefile.am create mode 100644 synfig-studio/src/gtkmm/Makefile.am create mode 100644 synfig-studio/src/gtkmm/about.cpp create mode 100644 synfig-studio/src/gtkmm/about.h create mode 100644 synfig-studio/src/gtkmm/adjust_window.cpp create mode 100644 synfig-studio/src/gtkmm/adjust_window.h create mode 100644 synfig-studio/src/gtkmm/app.cpp create mode 100644 synfig-studio/src/gtkmm/app.h create mode 100644 synfig-studio/src/gtkmm/asyncrenderer.cpp create mode 100644 synfig-studio/src/gtkmm/asyncrenderer.h create mode 100644 synfig-studio/src/gtkmm/audiocontainer.cpp create mode 100644 synfig-studio/src/gtkmm/audiocontainer.h create mode 100644 synfig-studio/src/gtkmm/autorecover.cpp create mode 100644 synfig-studio/src/gtkmm/autorecover.h create mode 100644 synfig-studio/src/gtkmm/canvasoptions.cpp create mode 100644 synfig-studio/src/gtkmm/canvasoptions.h create mode 100644 synfig-studio/src/gtkmm/canvasproperties.cpp create mode 100644 synfig-studio/src/gtkmm/canvasproperties.h create mode 100644 synfig-studio/src/gtkmm/canvastreestore.cpp create mode 100644 synfig-studio/src/gtkmm/canvastreestore.h create mode 100644 synfig-studio/src/gtkmm/canvasview.cpp create mode 100644 synfig-studio/src/gtkmm/canvasview.h create mode 100644 synfig-studio/src/gtkmm/cellrenderer_gradient.cpp create mode 100644 synfig-studio/src/gtkmm/cellrenderer_gradient.h create mode 100644 synfig-studio/src/gtkmm/cellrenderer_time.cpp create mode 100644 synfig-studio/src/gtkmm/cellrenderer_time.h create mode 100644 synfig-studio/src/gtkmm/cellrenderer_timetrack.cpp create mode 100644 synfig-studio/src/gtkmm/cellrenderer_timetrack.h create mode 100644 synfig-studio/src/gtkmm/cellrenderer_value.cpp create mode 100644 synfig-studio/src/gtkmm/cellrenderer_value.h create mode 100644 synfig-studio/src/gtkmm/childrentree.cpp create mode 100644 synfig-studio/src/gtkmm/childrentree.h create mode 100644 synfig-studio/src/gtkmm/childrentreestore.cpp create mode 100644 synfig-studio/src/gtkmm/childrentreestore.h create mode 100644 synfig-studio/src/gtkmm/compview.cpp create mode 100644 synfig-studio/src/gtkmm/compview.h create mode 100644 synfig-studio/src/gtkmm/devicetracker.cpp create mode 100644 synfig-studio/src/gtkmm/devicetracker.h create mode 100644 synfig-studio/src/gtkmm/dialog_color.cpp create mode 100644 synfig-studio/src/gtkmm/dialog_color.h create mode 100644 synfig-studio/src/gtkmm/dialog_gradient.cpp create mode 100644 synfig-studio/src/gtkmm/dialog_gradient.h create mode 100644 synfig-studio/src/gtkmm/dialog_keyframe.cpp create mode 100644 synfig-studio/src/gtkmm/dialog_keyframe.h create mode 100644 synfig-studio/src/gtkmm/dialog_preview.cpp create mode 100644 synfig-studio/src/gtkmm/dialog_preview.h create mode 100644 synfig-studio/src/gtkmm/dialog_setup.cpp create mode 100644 synfig-studio/src/gtkmm/dialog_setup.h create mode 100644 synfig-studio/src/gtkmm/dialog_soundselect.cpp create mode 100644 synfig-studio/src/gtkmm/dialog_soundselect.h create mode 100644 synfig-studio/src/gtkmm/dialog_tooloptions.cpp create mode 100644 synfig-studio/src/gtkmm/dialog_tooloptions.h create mode 100644 synfig-studio/src/gtkmm/dialog_waypoint.cpp create mode 100644 synfig-studio/src/gtkmm/dialog_waypoint.h create mode 100644 synfig-studio/src/gtkmm/dialogsettings.cpp create mode 100644 synfig-studio/src/gtkmm/dialogsettings.h create mode 100644 synfig-studio/src/gtkmm/dock_canvases.cpp create mode 100644 synfig-studio/src/gtkmm/dock_canvases.h create mode 100644 synfig-studio/src/gtkmm/dock_canvasspecific.cpp create mode 100644 synfig-studio/src/gtkmm/dock_canvasspecific.h create mode 100644 synfig-studio/src/gtkmm/dock_children.cpp create mode 100644 synfig-studio/src/gtkmm/dock_children.h create mode 100644 synfig-studio/src/gtkmm/dock_curves.cpp create mode 100644 synfig-studio/src/gtkmm/dock_curves.h create mode 100644 synfig-studio/src/gtkmm/dock_history.cpp create mode 100644 synfig-studio/src/gtkmm/dock_history.h create mode 100644 synfig-studio/src/gtkmm/dock_info.cpp create mode 100644 synfig-studio/src/gtkmm/dock_info.h create mode 100644 synfig-studio/src/gtkmm/dock_keyframes.cpp create mode 100644 synfig-studio/src/gtkmm/dock_keyframes.h create mode 100644 synfig-studio/src/gtkmm/dock_layergroups.cpp create mode 100644 synfig-studio/src/gtkmm/dock_layergroups.h create mode 100644 synfig-studio/src/gtkmm/dock_layers.cpp create mode 100644 synfig-studio/src/gtkmm/dock_layers.h create mode 100644 synfig-studio/src/gtkmm/dock_metadata.cpp create mode 100644 synfig-studio/src/gtkmm/dock_metadata.h create mode 100644 synfig-studio/src/gtkmm/dock_navigator.cpp create mode 100644 synfig-studio/src/gtkmm/dock_navigator.h create mode 100644 synfig-studio/src/gtkmm/dock_params.cpp create mode 100644 synfig-studio/src/gtkmm/dock_params.h create mode 100644 synfig-studio/src/gtkmm/dock_timetrack.cpp create mode 100644 synfig-studio/src/gtkmm/dock_timetrack.h create mode 100644 synfig-studio/src/gtkmm/dockable.cpp create mode 100644 synfig-studio/src/gtkmm/dockable.h create mode 100644 synfig-studio/src/gtkmm/dockbook.cpp create mode 100644 synfig-studio/src/gtkmm/dockbook.h create mode 100644 synfig-studio/src/gtkmm/dockdialog.cpp create mode 100644 synfig-studio/src/gtkmm/dockdialog.h create mode 100644 synfig-studio/src/gtkmm/dockmanager.cpp create mode 100644 synfig-studio/src/gtkmm/dockmanager.h create mode 100644 synfig-studio/src/gtkmm/duck.cpp create mode 100644 synfig-studio/src/gtkmm/duck.h create mode 100644 synfig-studio/src/gtkmm/duckmatic.cpp create mode 100644 synfig-studio/src/gtkmm/duckmatic.h create mode 100644 synfig-studio/src/gtkmm/ducktransform_rotate.h create mode 100644 synfig-studio/src/gtkmm/ducktransform_scale.h create mode 100644 synfig-studio/src/gtkmm/ducktransform_translate.h create mode 100644 synfig-studio/src/gtkmm/event_layerclick.h create mode 100644 synfig-studio/src/gtkmm/event_mouse.h create mode 100644 synfig-studio/src/gtkmm/eventkey.h create mode 100644 synfig-studio/src/gtkmm/framedial.cpp create mode 100644 synfig-studio/src/gtkmm/framedial.h create mode 100644 synfig-studio/src/gtkmm/general.h create mode 100644 synfig-studio/src/gtkmm/groupactionmanager.cpp create mode 100644 synfig-studio/src/gtkmm/groupactionmanager.h create mode 100644 synfig-studio/src/gtkmm/historytreestore.cpp create mode 100644 synfig-studio/src/gtkmm/historytreestore.h create mode 100644 synfig-studio/src/gtkmm/iconcontroller.cpp create mode 100644 synfig-studio/src/gtkmm/iconcontroller.h create mode 100644 synfig-studio/src/gtkmm/instance.cpp create mode 100644 synfig-studio/src/gtkmm/instance.h create mode 100644 synfig-studio/src/gtkmm/ipc.cpp create mode 100644 synfig-studio/src/gtkmm/ipc.h create mode 100644 synfig-studio/src/gtkmm/keyframeactionmanager.cpp create mode 100644 synfig-studio/src/gtkmm/keyframeactionmanager.h create mode 100644 synfig-studio/src/gtkmm/keyframedial.cpp create mode 100644 synfig-studio/src/gtkmm/keyframedial.h create mode 100644 synfig-studio/src/gtkmm/keyframetree.cpp create mode 100644 synfig-studio/src/gtkmm/keyframetree.h create mode 100644 synfig-studio/src/gtkmm/keyframetreestore.cpp create mode 100644 synfig-studio/src/gtkmm/keyframetreestore.h create mode 100644 synfig-studio/src/gtkmm/keymapsettings.cpp create mode 100644 synfig-studio/src/gtkmm/keymapsettings.h create mode 100644 synfig-studio/src/gtkmm/layeractionmanager.cpp create mode 100644 synfig-studio/src/gtkmm/layeractionmanager.h create mode 100644 synfig-studio/src/gtkmm/layergrouptree.cpp create mode 100644 synfig-studio/src/gtkmm/layergrouptree.h create mode 100644 synfig-studio/src/gtkmm/layergrouptreestore.cpp create mode 100644 synfig-studio/src/gtkmm/layergrouptreestore.h create mode 100644 synfig-studio/src/gtkmm/layerparamtreestore.cpp create mode 100644 synfig-studio/src/gtkmm/layerparamtreestore.h create mode 100644 synfig-studio/src/gtkmm/layertree.cpp create mode 100644 synfig-studio/src/gtkmm/layertree.h create mode 100644 synfig-studio/src/gtkmm/layertreestore.cpp create mode 100644 synfig-studio/src/gtkmm/layertreestore.h create mode 100644 synfig-studio/src/gtkmm/main.cpp create mode 100644 synfig-studio/src/gtkmm/metadatatreestore.cpp create mode 100644 synfig-studio/src/gtkmm/metadatatreestore.h create mode 100644 synfig-studio/src/gtkmm/mod_mirror/mod_mirror.cpp create mode 100644 synfig-studio/src/gtkmm/mod_mirror/mod_mirror.h create mode 100644 synfig-studio/src/gtkmm/mod_mirror/state_mirror.cpp create mode 100644 synfig-studio/src/gtkmm/mod_mirror/state_mirror.h create mode 100644 synfig-studio/src/gtkmm/mod_palette/dock_palbrowse.cpp create mode 100644 synfig-studio/src/gtkmm/mod_palette/dock_palbrowse.h create mode 100644 synfig-studio/src/gtkmm/mod_palette/dock_paledit.cpp create mode 100644 synfig-studio/src/gtkmm/mod_palette/dock_paledit.h create mode 100644 synfig-studio/src/gtkmm/mod_palette/mod_palette.cpp create mode 100644 synfig-studio/src/gtkmm/mod_palette/mod_palette.h create mode 100644 synfig-studio/src/gtkmm/module.cpp create mode 100644 synfig-studio/src/gtkmm/module.h create mode 100644 synfig-studio/src/gtkmm/onemoment.cpp create mode 100644 synfig-studio/src/gtkmm/onemoment.h create mode 100644 synfig-studio/src/gtkmm/preview.cpp create mode 100644 synfig-studio/src/gtkmm/preview.h create mode 100644 synfig-studio/src/gtkmm/renddesc.cpp create mode 100644 synfig-studio/src/gtkmm/renddesc.h create mode 100644 synfig-studio/src/gtkmm/render.cpp create mode 100644 synfig-studio/src/gtkmm/render.h create mode 100644 synfig-studio/src/gtkmm/renderer_bbox.cpp create mode 100644 synfig-studio/src/gtkmm/renderer_bbox.h create mode 100644 synfig-studio/src/gtkmm/renderer_canvas.cpp create mode 100644 synfig-studio/src/gtkmm/renderer_canvas.h create mode 100644 synfig-studio/src/gtkmm/renderer_dragbox.cpp create mode 100644 synfig-studio/src/gtkmm/renderer_dragbox.h create mode 100644 synfig-studio/src/gtkmm/renderer_ducks.cpp create mode 100644 synfig-studio/src/gtkmm/renderer_ducks.h create mode 100644 synfig-studio/src/gtkmm/renderer_grid.cpp create mode 100644 synfig-studio/src/gtkmm/renderer_grid.h create mode 100644 synfig-studio/src/gtkmm/renderer_guides.cpp create mode 100644 synfig-studio/src/gtkmm/renderer_guides.h create mode 100644 synfig-studio/src/gtkmm/renderer_timecode.cpp create mode 100644 synfig-studio/src/gtkmm/renderer_timecode.h create mode 100644 synfig-studio/src/gtkmm/resolutiondial.cpp create mode 100644 synfig-studio/src/gtkmm/resolutiondial.h create mode 100644 synfig-studio/src/gtkmm/smach.h create mode 100644 synfig-studio/src/gtkmm/splash.cpp create mode 100644 synfig-studio/src/gtkmm/splash.h create mode 100644 synfig-studio/src/gtkmm/state_bline.cpp create mode 100644 synfig-studio/src/gtkmm/state_bline.h create mode 100644 synfig-studio/src/gtkmm/state_circle.cpp create mode 100644 synfig-studio/src/gtkmm/state_circle.h create mode 100644 synfig-studio/src/gtkmm/state_draw.cpp create mode 100644 synfig-studio/src/gtkmm/state_draw.h create mode 100644 synfig-studio/src/gtkmm/state_eyedrop.cpp create mode 100644 synfig-studio/src/gtkmm/state_eyedrop.h create mode 100644 synfig-studio/src/gtkmm/state_fill.cpp create mode 100644 synfig-studio/src/gtkmm/state_fill.h create mode 100644 synfig-studio/src/gtkmm/state_gradient.cpp create mode 100644 synfig-studio/src/gtkmm/state_gradient.h create mode 100644 synfig-studio/src/gtkmm/state_normal.cpp create mode 100644 synfig-studio/src/gtkmm/state_normal.h create mode 100644 synfig-studio/src/gtkmm/state_polygon.cpp create mode 100644 synfig-studio/src/gtkmm/state_polygon.h create mode 100644 synfig-studio/src/gtkmm/state_rectangle.cpp create mode 100644 synfig-studio/src/gtkmm/state_rectangle.h create mode 100644 synfig-studio/src/gtkmm/state_rotate.cpp create mode 100644 synfig-studio/src/gtkmm/state_rotate.h create mode 100644 synfig-studio/src/gtkmm/state_scale.cpp create mode 100644 synfig-studio/src/gtkmm/state_scale.h create mode 100644 synfig-studio/src/gtkmm/state_sketch.cpp create mode 100644 synfig-studio/src/gtkmm/state_sketch.h create mode 100644 synfig-studio/src/gtkmm/state_smoothmove.cpp create mode 100644 synfig-studio/src/gtkmm/state_smoothmove.h create mode 100644 synfig-studio/src/gtkmm/state_star.cpp create mode 100644 synfig-studio/src/gtkmm/state_star.h create mode 100644 synfig-studio/src/gtkmm/state_stroke.cpp create mode 100644 synfig-studio/src/gtkmm/state_stroke.h create mode 100644 synfig-studio/src/gtkmm/state_text.cpp create mode 100644 synfig-studio/src/gtkmm/state_text.h create mode 100644 synfig-studio/src/gtkmm/state_width.cpp create mode 100644 synfig-studio/src/gtkmm/state_width.h create mode 100644 synfig-studio/src/gtkmm/state_zoom.cpp create mode 100644 synfig-studio/src/gtkmm/state_zoom.h create mode 100644 synfig-studio/src/gtkmm/statemanager.cpp create mode 100644 synfig-studio/src/gtkmm/statemanager.h create mode 100644 synfig-studio/src/gtkmm/toggleducksdial.cpp create mode 100644 synfig-studio/src/gtkmm/toggleducksdial.h create mode 100644 synfig-studio/src/gtkmm/toolbox.cpp create mode 100644 synfig-studio/src/gtkmm/toolbox.h create mode 100644 synfig-studio/src/gtkmm/valuelink.cpp create mode 100644 synfig-studio/src/gtkmm/valuelink.h create mode 100644 synfig-studio/src/gtkmm/widget_canvaschooser.cpp create mode 100644 synfig-studio/src/gtkmm/widget_canvaschooser.h create mode 100644 synfig-studio/src/gtkmm/widget_color.cpp create mode 100644 synfig-studio/src/gtkmm/widget_color.h create mode 100644 synfig-studio/src/gtkmm/widget_coloredit.cpp create mode 100644 synfig-studio/src/gtkmm/widget_coloredit.h create mode 100644 synfig-studio/src/gtkmm/widget_compselect.cpp create mode 100644 synfig-studio/src/gtkmm/widget_compselect.h create mode 100644 synfig-studio/src/gtkmm/widget_curves.cpp create mode 100644 synfig-studio/src/gtkmm/widget_curves.h create mode 100644 synfig-studio/src/gtkmm/widget_defaults.cpp create mode 100644 synfig-studio/src/gtkmm/widget_defaults.h create mode 100644 synfig-studio/src/gtkmm/widget_distance.cpp create mode 100644 synfig-studio/src/gtkmm/widget_distance.h create mode 100644 synfig-studio/src/gtkmm/widget_enum.cpp create mode 100644 synfig-studio/src/gtkmm/widget_enum.h create mode 100644 synfig-studio/src/gtkmm/widget_filename.cpp create mode 100644 synfig-studio/src/gtkmm/widget_filename.h create mode 100644 synfig-studio/src/gtkmm/widget_gradient.cpp create mode 100644 synfig-studio/src/gtkmm/widget_gradient.h create mode 100644 synfig-studio/src/gtkmm/widget_keyframe_list.cpp create mode 100644 synfig-studio/src/gtkmm/widget_keyframe_list.h create mode 100644 synfig-studio/src/gtkmm/widget_sound.cpp create mode 100644 synfig-studio/src/gtkmm/widget_sound.h create mode 100644 synfig-studio/src/gtkmm/widget_time.cpp create mode 100644 synfig-studio/src/gtkmm/widget_time.h create mode 100644 synfig-studio/src/gtkmm/widget_timeslider.cpp create mode 100644 synfig-studio/src/gtkmm/widget_timeslider.h create mode 100644 synfig-studio/src/gtkmm/widget_value.cpp create mode 100644 synfig-studio/src/gtkmm/widget_value.h create mode 100644 synfig-studio/src/gtkmm/widget_vector.cpp create mode 100644 synfig-studio/src/gtkmm/widget_vector.h create mode 100644 synfig-studio/src/gtkmm/widget_waypoint.cpp create mode 100644 synfig-studio/src/gtkmm/widget_waypoint.h create mode 100644 synfig-studio/src/gtkmm/widget_waypointmodel.cpp create mode 100644 synfig-studio/src/gtkmm/widget_waypointmodel.h create mode 100644 synfig-studio/src/gtkmm/workarea.cpp create mode 100644 synfig-studio/src/gtkmm/workarea.h create mode 100644 synfig-studio/src/gtkmm/workarearenderer.cpp create mode 100644 synfig-studio/src/gtkmm/workarearenderer.h create mode 100644 synfig-studio/src/gtkmm/zoomdial.cpp create mode 100644 synfig-studio/src/gtkmm/zoomdial.h create mode 100644 synfig-studio/src/synfigapp/Makefile.am create mode 100644 synfig-studio/src/synfigapp/action.cpp create mode 100644 synfig-studio/src/synfigapp/action.h create mode 100644 synfig-studio/src/synfigapp/action_param.cpp create mode 100644 synfig-studio/src/synfigapp/action_param.h create mode 100644 synfig-studio/src/synfigapp/action_system.cpp create mode 100644 synfig-studio/src/synfigapp/action_system.h create mode 100644 synfig-studio/src/synfigapp/actions/activepointadd.cpp create mode 100644 synfig-studio/src/synfigapp/actions/activepointadd.h create mode 100644 synfig-studio/src/synfigapp/actions/activepointremove.cpp create mode 100644 synfig-studio/src/synfigapp/actions/activepointremove.h create mode 100644 synfig-studio/src/synfigapp/actions/activepointset.cpp create mode 100644 synfig-studio/src/synfigapp/actions/activepointset.h create mode 100644 synfig-studio/src/synfigapp/actions/activepointsetoff.cpp create mode 100644 synfig-studio/src/synfigapp/actions/activepointsetoff.h create mode 100644 synfig-studio/src/synfigapp/actions/activepointseton.cpp create mode 100644 synfig-studio/src/synfigapp/actions/activepointseton.h create mode 100644 synfig-studio/src/synfigapp/actions/activepointsetsmart.cpp create mode 100644 synfig-studio/src/synfigapp/actions/activepointsetsmart.h create mode 100644 synfig-studio/src/synfigapp/actions/activepointsimpleadd.cpp create mode 100644 synfig-studio/src/synfigapp/actions/activepointsimpleadd.h create mode 100644 synfig-studio/src/synfigapp/actions/blinepointtangentmerge.cpp create mode 100644 synfig-studio/src/synfigapp/actions/blinepointtangentmerge.h create mode 100644 synfig-studio/src/synfigapp/actions/blinepointtangentsplit.cpp create mode 100644 synfig-studio/src/synfigapp/actions/blinepointtangentsplit.h create mode 100644 synfig-studio/src/synfigapp/actions/canvasadd.cpp create mode 100644 synfig-studio/src/synfigapp/actions/canvasadd.h create mode 100644 synfig-studio/src/synfigapp/actions/canvasdescriptionset.cpp create mode 100644 synfig-studio/src/synfigapp/actions/canvasdescriptionset.h create mode 100644 synfig-studio/src/synfigapp/actions/canvasidset.cpp create mode 100644 synfig-studio/src/synfigapp/actions/canvasidset.h create mode 100644 synfig-studio/src/synfigapp/actions/canvasnameset.cpp create mode 100644 synfig-studio/src/synfigapp/actions/canvasnameset.h create mode 100644 synfig-studio/src/synfigapp/actions/canvasremove.cpp create mode 100644 synfig-studio/src/synfigapp/actions/canvasremove.h create mode 100644 synfig-studio/src/synfigapp/actions/canvasrenddescset.cpp create mode 100644 synfig-studio/src/synfigapp/actions/canvasrenddescset.h create mode 100644 synfig-studio/src/synfigapp/actions/colorset.cpp create mode 100644 synfig-studio/src/synfigapp/actions/colorset.h create mode 100644 synfig-studio/src/synfigapp/actions/editmodeset.cpp create mode 100644 synfig-studio/src/synfigapp/actions/editmodeset.h create mode 100644 synfig-studio/src/synfigapp/actions/gradientset.cpp create mode 100644 synfig-studio/src/synfigapp/actions/gradientset.h create mode 100644 synfig-studio/src/synfigapp/actions/groupaddlayers.cpp create mode 100644 synfig-studio/src/synfigapp/actions/groupaddlayers.h create mode 100644 synfig-studio/src/synfigapp/actions/groupremove.cpp create mode 100644 synfig-studio/src/synfigapp/actions/groupremove.h create mode 100644 synfig-studio/src/synfigapp/actions/groupremovelayers.cpp create mode 100644 synfig-studio/src/synfigapp/actions/groupremovelayers.h create mode 100644 synfig-studio/src/synfigapp/actions/grouprename.cpp create mode 100644 synfig-studio/src/synfigapp/actions/grouprename.h create mode 100644 synfig-studio/src/synfigapp/actions/keyframeadd.cpp create mode 100644 synfig-studio/src/synfigapp/actions/keyframeadd.h create mode 100644 synfig-studio/src/synfigapp/actions/keyframeduplicate.cpp create mode 100644 synfig-studio/src/synfigapp/actions/keyframeduplicate.h create mode 100644 synfig-studio/src/synfigapp/actions/keyframeremove.cpp create mode 100644 synfig-studio/src/synfigapp/actions/keyframeremove.h create mode 100644 synfig-studio/src/synfigapp/actions/keyframeset.cpp create mode 100644 synfig-studio/src/synfigapp/actions/keyframeset.h create mode 100644 synfig-studio/src/synfigapp/actions/keyframesetdelta.cpp create mode 100644 synfig-studio/src/synfigapp/actions/keyframesetdelta.h create mode 100644 synfig-studio/src/synfigapp/actions/keyframewaypointset.cpp create mode 100644 synfig-studio/src/synfigapp/actions/keyframewaypointset.h create mode 100644 synfig-studio/src/synfigapp/actions/layeractivate.cpp create mode 100644 synfig-studio/src/synfigapp/actions/layeractivate.h create mode 100644 synfig-studio/src/synfigapp/actions/layeradd.cpp create mode 100644 synfig-studio/src/synfigapp/actions/layeradd.h create mode 100644 synfig-studio/src/synfigapp/actions/layerduplicate.cpp create mode 100644 synfig-studio/src/synfigapp/actions/layerduplicate.h create mode 100644 synfig-studio/src/synfigapp/actions/layerencapsulate.cpp create mode 100644 synfig-studio/src/synfigapp/actions/layerencapsulate.h create mode 100644 synfig-studio/src/synfigapp/actions/layerlower.cpp create mode 100644 synfig-studio/src/synfigapp/actions/layerlower.h create mode 100644 synfig-studio/src/synfigapp/actions/layermove.cpp create mode 100644 synfig-studio/src/synfigapp/actions/layermove.h create mode 100644 synfig-studio/src/synfigapp/actions/layerparamconnect.cpp create mode 100644 synfig-studio/src/synfigapp/actions/layerparamconnect.h create mode 100644 synfig-studio/src/synfigapp/actions/layerparamdisconnect.cpp create mode 100644 synfig-studio/src/synfigapp/actions/layerparamdisconnect.h create mode 100644 synfig-studio/src/synfigapp/actions/layerparamset.cpp create mode 100644 synfig-studio/src/synfigapp/actions/layerparamset.h create mode 100644 synfig-studio/src/synfigapp/actions/layerraise.cpp create mode 100644 synfig-studio/src/synfigapp/actions/layerraise.h create mode 100644 synfig-studio/src/synfigapp/actions/layerremove.cpp create mode 100644 synfig-studio/src/synfigapp/actions/layerremove.h create mode 100644 synfig-studio/src/synfigapp/actions/layersetdesc.cpp create mode 100644 synfig-studio/src/synfigapp/actions/layersetdesc.h create mode 100644 synfig-studio/src/synfigapp/actions/timepointscopy.cpp create mode 100644 synfig-studio/src/synfigapp/actions/timepointscopy.h create mode 100644 synfig-studio/src/synfigapp/actions/timepointsdelete.cpp create mode 100644 synfig-studio/src/synfigapp/actions/timepointsdelete.h create mode 100644 synfig-studio/src/synfigapp/actions/timepointsmove.cpp create mode 100644 synfig-studio/src/synfigapp/actions/timepointsmove.h create mode 100644 synfig-studio/src/synfigapp/actions/valuedescblinelink.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuedescblinelink.h create mode 100644 synfig-studio/src/synfigapp/actions/valuedescconnect.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuedescconnect.h create mode 100644 synfig-studio/src/synfigapp/actions/valuedescconvert.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuedescconvert.h create mode 100644 synfig-studio/src/synfigapp/actions/valuedescdisconnect.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuedescdisconnect.h create mode 100644 synfig-studio/src/synfigapp/actions/valuedescexport.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuedescexport.h create mode 100644 synfig-studio/src/synfigapp/actions/valuedesclink.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuedesclink.h create mode 100644 synfig-studio/src/synfigapp/actions/valuedescset.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuedescset.h create mode 100644 synfig-studio/src/synfigapp/actions/valuenodeadd.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuenodeadd.h create mode 100644 synfig-studio/src/synfigapp/actions/valuenodeconstset.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuenodeconstset.h create mode 100644 synfig-studio/src/synfigapp/actions/valuenodedynamiclistinsert.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuenodedynamiclistinsert.h create mode 100644 synfig-studio/src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuenodedynamiclistinsertsmart.h create mode 100644 synfig-studio/src/synfigapp/actions/valuenodedynamiclistloop.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuenodedynamiclistloop.h create mode 100644 synfig-studio/src/synfigapp/actions/valuenodedynamiclistremove.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuenodedynamiclistremove.h create mode 100644 synfig-studio/src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuenodedynamiclistremovesmart.h create mode 100644 synfig-studio/src/synfigapp/actions/valuenodedynamiclistrotateorder.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuenodedynamiclistrotateorder.h create mode 100644 synfig-studio/src/synfigapp/actions/valuenodedynamiclistunloop.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuenodedynamiclistunloop.h create mode 100644 synfig-studio/src/synfigapp/actions/valuenodelinkconnect.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuenodelinkconnect.h create mode 100644 synfig-studio/src/synfigapp/actions/valuenodelinkdisconnect.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuenodelinkdisconnect.h create mode 100644 synfig-studio/src/synfigapp/actions/valuenoderemove.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuenoderemove.h create mode 100644 synfig-studio/src/synfigapp/actions/valuenoderename.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuenoderename.h create mode 100644 synfig-studio/src/synfigapp/actions/valuenodereplace.cpp create mode 100644 synfig-studio/src/synfigapp/actions/valuenodereplace.h create mode 100644 synfig-studio/src/synfigapp/actions/waypointadd.cpp create mode 100644 synfig-studio/src/synfigapp/actions/waypointadd.h create mode 100644 synfig-studio/src/synfigapp/actions/waypointconnect.cpp create mode 100644 synfig-studio/src/synfigapp/actions/waypointconnect.h create mode 100644 synfig-studio/src/synfigapp/actions/waypointdisconnect.cpp create mode 100644 synfig-studio/src/synfigapp/actions/waypointdisconnect.h create mode 100644 synfig-studio/src/synfigapp/actions/waypointremove.cpp create mode 100644 synfig-studio/src/synfigapp/actions/waypointremove.h create mode 100644 synfig-studio/src/synfigapp/actions/waypointset.cpp create mode 100644 synfig-studio/src/synfigapp/actions/waypointset.h create mode 100644 synfig-studio/src/synfigapp/actions/waypointsetsmart.cpp create mode 100644 synfig-studio/src/synfigapp/actions/waypointsetsmart.h create mode 100644 synfig-studio/src/synfigapp/actions/waypointsimpleadd.cpp create mode 100644 synfig-studio/src/synfigapp/actions/waypointsimpleadd.h create mode 100644 synfig-studio/src/synfigapp/blineconvert.cpp create mode 100644 synfig-studio/src/synfigapp/blineconvert.h create mode 100644 synfig-studio/src/synfigapp/canvasinterface.cpp create mode 100644 synfig-studio/src/synfigapp/canvasinterface.h create mode 100644 synfig-studio/src/synfigapp/cvs.cpp create mode 100644 synfig-studio/src/synfigapp/cvs.h create mode 100644 synfig-studio/src/synfigapp/editmode.h create mode 100644 synfig-studio/src/synfigapp/general.h create mode 100644 synfig-studio/src/synfigapp/inputdevice.cpp create mode 100644 synfig-studio/src/synfigapp/inputdevice.h create mode 100644 synfig-studio/src/synfigapp/instance.cpp create mode 100644 synfig-studio/src/synfigapp/instance.h create mode 100644 synfig-studio/src/synfigapp/main.cpp create mode 100644 synfig-studio/src/synfigapp/main.h create mode 100644 synfig-studio/src/synfigapp/selectionmanager.h create mode 100644 synfig-studio/src/synfigapp/settings.cpp create mode 100644 synfig-studio/src/synfigapp/settings.h create mode 100644 synfig-studio/src/synfigapp/timegather.cpp create mode 100644 synfig-studio/src/synfigapp/timegather.h create mode 100644 synfig-studio/src/synfigapp/uimanager.cpp create mode 100644 synfig-studio/src/synfigapp/uimanager.h create mode 100644 synfig-studio/src/synfigapp/value_desc.cpp create mode 100644 synfig-studio/src/synfigapp/value_desc.h create mode 100644 synfig-studio/src/template.cpp create mode 100644 synfig-studio/src/template.h create mode 100644 synfig-studio/studio.kdevprj create mode 100755 synfig-studio/studio.pbproj/project.pbxproj create mode 100644 synfig-studio/studio.prj create mode 100755 synfig-studio/synfigstudio-cph-monitor create mode 100644 synfig-studio/synfigstudio-thumbnailer.schemas.in create mode 100644 synfig-studio/synfigstudio.desktop.in create mode 100644 synfig-studio/synfigstudio.keys.in create mode 100644 synfig-studio/synfigstudio.mime.in create mode 100644 synfig-studio/synfigstudio.xml.in delete mode 100644 synfig-studio/trunk/AUTHORS delete mode 100644 synfig-studio/trunk/ChangeLog.old delete mode 100644 synfig-studio/trunk/Makefile.am delete mode 100644 synfig-studio/trunk/NEWS delete mode 100644 synfig-studio/trunk/README delete mode 100644 synfig-studio/trunk/TODO delete mode 100644 synfig-studio/trunk/build_tools/Makefile.am delete mode 100644 synfig-studio/trunk/build_tools/autorevision.sh delete mode 100644 synfig-studio/trunk/config/ltmain.patch delete mode 100755 synfig-studio/trunk/config/package delete mode 100755 synfig-studio/trunk/configure.ac delete mode 100755 synfig-studio/trunk/debugcrash delete mode 100644 synfig-studio/trunk/doxygen.cfg.in delete mode 100644 synfig-studio/trunk/images/Makefile.am delete mode 100644 synfig-studio/trunk/images/Makefile.inc delete mode 100644 synfig-studio/trunk/images/about_icon.sif delete mode 100644 synfig-studio/trunk/images/angle_icon.sif delete mode 100644 synfig-studio/trunk/images/bline_icon.sif delete mode 100644 synfig-studio/trunk/images/blinepoint_icon.sif delete mode 100644 synfig-studio/trunk/images/bool_icon.sif delete mode 100644 synfig-studio/trunk/images/canvas_icon.sif delete mode 100644 synfig-studio/trunk/images/canvas_pointer_icon.sif delete mode 100644 synfig-studio/trunk/images/children_icon.sif delete mode 100644 synfig-studio/trunk/images/circle_icon.sif delete mode 100644 synfig-studio/trunk/images/clear_redo_icon.sif delete mode 100644 synfig-studio/trunk/images/clear_undo_icon.sif delete mode 100644 synfig-studio/trunk/images/color_icon.sif delete mode 100644 synfig-studio/trunk/images/curves_icon.sif delete mode 100644 synfig-studio/trunk/images/draw_icon.sif delete mode 100644 synfig-studio/trunk/images/duck_angle_icon.sif delete mode 100644 synfig-studio/trunk/images/duck_position_icon.sif delete mode 100644 synfig-studio/trunk/images/duck_radius_icon.sif delete mode 100644 synfig-studio/trunk/images/duck_tangent_icon.sif delete mode 100644 synfig-studio/trunk/images/duck_vertex_icon.sif delete mode 100644 synfig-studio/trunk/images/duck_width_icon.sif delete mode 100644 synfig-studio/trunk/images/duplicate_icon.sif delete mode 100644 synfig-studio/trunk/images/encapsulate_icon.sif delete mode 100644 synfig-studio/trunk/images/eyedrop_icon.sif delete mode 100644 synfig-studio/trunk/images/fill_icon.sif delete mode 100644 synfig-studio/trunk/images/gradient_icon.sif delete mode 100644 synfig-studio/trunk/images/group_icon.sif delete mode 100644 synfig-studio/trunk/images/info_icon.sif delete mode 100644 synfig-studio/trunk/images/installer_logo.sif delete mode 100644 synfig-studio/trunk/images/installer_logo_osx.sif delete mode 100644 synfig-studio/trunk/images/integer_icon.sif delete mode 100644 synfig-studio/trunk/images/keyframe_icon.sif delete mode 100644 synfig-studio/trunk/images/keyframe_lock_icon.sif delete mode 100644 synfig-studio/trunk/images/layer_icon.sif delete mode 100644 synfig-studio/trunk/images/list_icon.sif delete mode 100644 synfig-studio/trunk/images/logo.sif delete mode 100644 synfig-studio/trunk/images/meta_data_icon.sif delete mode 100644 synfig-studio/trunk/images/mirror_icon.sif delete mode 100644 synfig-studio/trunk/images/navigator_icon.sif delete mode 100644 synfig-studio/trunk/images/normal_icon.sif delete mode 100644 synfig-studio/trunk/images/onion_skin_icon.sif delete mode 100644 synfig-studio/trunk/images/pastecanvas_icon.sif delete mode 100644 synfig-studio/trunk/images/plant_icon.sif delete mode 100644 synfig-studio/trunk/images/polygon_icon.sif delete mode 100644 synfig-studio/trunk/images/polyline_icon.sif delete mode 100644 synfig-studio/trunk/images/real_icon.sif delete mode 100644 synfig-studio/trunk/images/rectangle_icon.sif delete mode 100644 synfig-studio/trunk/images/rename_icon.sif delete mode 100644 synfig-studio/trunk/images/reset_colors_icon.sif delete mode 100644 synfig-studio/trunk/images/rotate_icon.sif delete mode 100644 synfig-studio/trunk/images/saveall_icon.sif delete mode 100644 synfig-studio/trunk/images/scale_icon.sif delete mode 100644 synfig-studio/trunk/images/seek_begin.sif delete mode 100644 synfig-studio/trunk/images/seek_end.sif delete mode 100644 synfig-studio/trunk/images/seek_next_frame.sif delete mode 100644 synfig-studio/trunk/images/seek_prev_frame.sif delete mode 100644 synfig-studio/trunk/images/segment_icon.sif delete mode 100644 synfig-studio/trunk/images/select_all_child_layers_icon.sif delete mode 100644 synfig-studio/trunk/images/set_fill_color.sif delete mode 100644 synfig-studio/trunk/images/set_outline_color.sif delete mode 100644 synfig-studio/trunk/images/show_grid_icon.sif delete mode 100644 synfig-studio/trunk/images/sif_icon.sif delete mode 100644 synfig-studio/trunk/images/sketch_icon.sif delete mode 100644 synfig-studio/trunk/images/smooth_move_icon.sif delete mode 100644 synfig-studio/trunk/images/snap_grid_icon.sif delete mode 100644 synfig-studio/trunk/images/splash_screen-0.61.07.sif delete mode 100644 synfig-studio/trunk/images/splash_screen-0.61.08.sif delete mode 100644 synfig-studio/trunk/images/splash_screen.sifz delete mode 100644 synfig-studio/trunk/images/star_icon.sif delete mode 100644 synfig-studio/trunk/images/string_icon.sif delete mode 100644 synfig-studio/trunk/images/swap_colors_icon.sif delete mode 100644 synfig-studio/trunk/images/synfig_icon.sif delete mode 100644 synfig-studio/trunk/images/synfig_icon.svg delete mode 100644 synfig-studio/trunk/images/text_icon.sif delete mode 100644 synfig-studio/trunk/images/time_icon.sif delete mode 100644 synfig-studio/trunk/images/time_track_icon.sif delete mode 100644 synfig-studio/trunk/images/valuenode_icon.sif delete mode 100644 synfig-studio/trunk/images/vector_icon.sif delete mode 100644 synfig-studio/trunk/images/wallpaper.sif delete mode 100644 synfig-studio/trunk/images/width_icon.sif delete mode 100644 synfig-studio/trunk/images/zoom_icon.sif delete mode 100755 synfig-studio/trunk/m4/ETL.m4 delete mode 100755 synfig-studio/trunk/m4/cxx_macros.m4 delete mode 100755 synfig-studio/trunk/m4/gnome.m4 delete mode 100755 synfig-studio/trunk/m4/libxml.m4 delete mode 100755 synfig-studio/trunk/m4/subs.m4 delete mode 100755 synfig-studio/trunk/m4/synfig.m4 delete mode 100755 synfig-studio/trunk/macosxbuild.sh delete mode 100644 synfig-studio/trunk/pkg-info/macosx/studio-resources/Description.plist delete mode 100644 synfig-studio/trunk/pkg-info/macosx/studio-resources/English.lproj/InstallationCheck.strings delete mode 100644 synfig-studio/trunk/pkg-info/macosx/studio-resources/ReadMe.txt delete mode 100644 synfig-studio/trunk/pkg-info/macosx/studio-resources/Welcome.txt delete mode 100755 synfig-studio/trunk/pkg-info/macosx/studio-resources/install.sh delete mode 100755 synfig-studio/trunk/pkg-info/macosx/studio-resources/synfig-studio.post_install delete mode 100755 synfig-studio/trunk/pkg-info/macosx/studio-resources/synfig-studio.post_upgrade delete mode 100755 synfig-studio/trunk/pkg-info/macosx/studio-resources/upgrade.sh delete mode 100644 synfig-studio/trunk/pkg-info/macosx/synfig-studio.info.in delete mode 100644 synfig-studio/trunk/po/Makevars delete mode 100644 synfig-studio/trunk/po/POTFILES.in delete mode 100644 synfig-studio/trunk/po/ca.po delete mode 100644 synfig-studio/trunk/po/es.po delete mode 100644 synfig-studio/trunk/po/fr.po delete mode 100644 synfig-studio/trunk/po/ru.po delete mode 100644 synfig-studio/trunk/src/Makefile.am delete mode 100644 synfig-studio/trunk/src/gtkmm/Makefile.am delete mode 100644 synfig-studio/trunk/src/gtkmm/about.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/about.h delete mode 100644 synfig-studio/trunk/src/gtkmm/adjust_window.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/adjust_window.h delete mode 100644 synfig-studio/trunk/src/gtkmm/app.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/app.h delete mode 100644 synfig-studio/trunk/src/gtkmm/asyncrenderer.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/asyncrenderer.h delete mode 100644 synfig-studio/trunk/src/gtkmm/audiocontainer.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/audiocontainer.h delete mode 100644 synfig-studio/trunk/src/gtkmm/autorecover.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/autorecover.h delete mode 100644 synfig-studio/trunk/src/gtkmm/canvasoptions.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/canvasoptions.h delete mode 100644 synfig-studio/trunk/src/gtkmm/canvasproperties.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/canvasproperties.h delete mode 100644 synfig-studio/trunk/src/gtkmm/canvastreestore.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/canvastreestore.h delete mode 100644 synfig-studio/trunk/src/gtkmm/canvasview.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/canvasview.h delete mode 100644 synfig-studio/trunk/src/gtkmm/cellrenderer_gradient.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/cellrenderer_gradient.h delete mode 100644 synfig-studio/trunk/src/gtkmm/cellrenderer_time.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/cellrenderer_time.h delete mode 100644 synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.h delete mode 100644 synfig-studio/trunk/src/gtkmm/cellrenderer_value.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/cellrenderer_value.h delete mode 100644 synfig-studio/trunk/src/gtkmm/childrentree.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/childrentree.h delete mode 100644 synfig-studio/trunk/src/gtkmm/childrentreestore.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/childrentreestore.h delete mode 100644 synfig-studio/trunk/src/gtkmm/compview.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/compview.h delete mode 100644 synfig-studio/trunk/src/gtkmm/devicetracker.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/devicetracker.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dialog_color.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dialog_color.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dialog_gradient.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dialog_gradient.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dialog_keyframe.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dialog_keyframe.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dialog_preview.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dialog_preview.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dialog_setup.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dialog_setup.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dialog_soundselect.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dialog_soundselect.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dialog_tooloptions.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dialog_tooloptions.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dialog_waypoint.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dialog_waypoint.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dialogsettings.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dialogsettings.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_canvases.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_canvases.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_canvasspecific.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_canvasspecific.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_children.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_children.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_curves.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_curves.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_history.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_history.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_info.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_info.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_keyframes.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_keyframes.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_layergroups.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_layergroups.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_layers.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_layers.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_metadata.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_metadata.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_navigator.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_navigator.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_params.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_params.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_timetrack.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dock_timetrack.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dockable.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dockable.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dockbook.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dockbook.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dockdialog.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dockdialog.h delete mode 100644 synfig-studio/trunk/src/gtkmm/dockmanager.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/dockmanager.h delete mode 100644 synfig-studio/trunk/src/gtkmm/duck.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/duck.h delete mode 100644 synfig-studio/trunk/src/gtkmm/duckmatic.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/duckmatic.h delete mode 100644 synfig-studio/trunk/src/gtkmm/ducktransform_rotate.h delete mode 100644 synfig-studio/trunk/src/gtkmm/ducktransform_scale.h delete mode 100644 synfig-studio/trunk/src/gtkmm/ducktransform_translate.h delete mode 100644 synfig-studio/trunk/src/gtkmm/event_layerclick.h delete mode 100644 synfig-studio/trunk/src/gtkmm/event_mouse.h delete mode 100644 synfig-studio/trunk/src/gtkmm/eventkey.h delete mode 100644 synfig-studio/trunk/src/gtkmm/framedial.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/framedial.h delete mode 100644 synfig-studio/trunk/src/gtkmm/general.h delete mode 100644 synfig-studio/trunk/src/gtkmm/groupactionmanager.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/groupactionmanager.h delete mode 100644 synfig-studio/trunk/src/gtkmm/historytreestore.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/historytreestore.h delete mode 100644 synfig-studio/trunk/src/gtkmm/iconcontroller.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/iconcontroller.h delete mode 100644 synfig-studio/trunk/src/gtkmm/instance.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/instance.h delete mode 100644 synfig-studio/trunk/src/gtkmm/ipc.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/ipc.h delete mode 100644 synfig-studio/trunk/src/gtkmm/keyframeactionmanager.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/keyframeactionmanager.h delete mode 100644 synfig-studio/trunk/src/gtkmm/keyframedial.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/keyframedial.h delete mode 100644 synfig-studio/trunk/src/gtkmm/keyframetree.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/keyframetree.h delete mode 100644 synfig-studio/trunk/src/gtkmm/keyframetreestore.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/keyframetreestore.h delete mode 100644 synfig-studio/trunk/src/gtkmm/keymapsettings.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/keymapsettings.h delete mode 100644 synfig-studio/trunk/src/gtkmm/layeractionmanager.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/layeractionmanager.h delete mode 100644 synfig-studio/trunk/src/gtkmm/layergrouptree.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/layergrouptree.h delete mode 100644 synfig-studio/trunk/src/gtkmm/layergrouptreestore.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/layergrouptreestore.h delete mode 100644 synfig-studio/trunk/src/gtkmm/layerparamtreestore.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/layerparamtreestore.h delete mode 100644 synfig-studio/trunk/src/gtkmm/layertree.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/layertree.h delete mode 100644 synfig-studio/trunk/src/gtkmm/layertreestore.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/layertreestore.h delete mode 100644 synfig-studio/trunk/src/gtkmm/main.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/metadatatreestore.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/metadatatreestore.h delete mode 100644 synfig-studio/trunk/src/gtkmm/mod_mirror/mod_mirror.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/mod_mirror/mod_mirror.h delete mode 100644 synfig-studio/trunk/src/gtkmm/mod_mirror/state_mirror.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/mod_mirror/state_mirror.h delete mode 100644 synfig-studio/trunk/src/gtkmm/mod_palette/dock_palbrowse.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/mod_palette/dock_palbrowse.h delete mode 100644 synfig-studio/trunk/src/gtkmm/mod_palette/dock_paledit.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/mod_palette/dock_paledit.h delete mode 100644 synfig-studio/trunk/src/gtkmm/mod_palette/mod_palette.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/mod_palette/mod_palette.h delete mode 100644 synfig-studio/trunk/src/gtkmm/module.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/module.h delete mode 100644 synfig-studio/trunk/src/gtkmm/onemoment.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/onemoment.h delete mode 100644 synfig-studio/trunk/src/gtkmm/preview.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/preview.h delete mode 100644 synfig-studio/trunk/src/gtkmm/renddesc.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/renddesc.h delete mode 100644 synfig-studio/trunk/src/gtkmm/render.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/render.h delete mode 100644 synfig-studio/trunk/src/gtkmm/renderer_bbox.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/renderer_bbox.h delete mode 100644 synfig-studio/trunk/src/gtkmm/renderer_canvas.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/renderer_canvas.h delete mode 100644 synfig-studio/trunk/src/gtkmm/renderer_dragbox.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/renderer_dragbox.h delete mode 100644 synfig-studio/trunk/src/gtkmm/renderer_ducks.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/renderer_ducks.h delete mode 100644 synfig-studio/trunk/src/gtkmm/renderer_grid.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/renderer_grid.h delete mode 100644 synfig-studio/trunk/src/gtkmm/renderer_guides.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/renderer_guides.h delete mode 100644 synfig-studio/trunk/src/gtkmm/renderer_timecode.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/renderer_timecode.h delete mode 100644 synfig-studio/trunk/src/gtkmm/resolutiondial.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/resolutiondial.h delete mode 100644 synfig-studio/trunk/src/gtkmm/smach.h delete mode 100644 synfig-studio/trunk/src/gtkmm/splash.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/splash.h delete mode 100644 synfig-studio/trunk/src/gtkmm/state_bline.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/state_bline.h delete mode 100644 synfig-studio/trunk/src/gtkmm/state_circle.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/state_circle.h delete mode 100644 synfig-studio/trunk/src/gtkmm/state_draw.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/state_draw.h delete mode 100644 synfig-studio/trunk/src/gtkmm/state_eyedrop.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/state_eyedrop.h delete mode 100644 synfig-studio/trunk/src/gtkmm/state_fill.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/state_fill.h delete mode 100644 synfig-studio/trunk/src/gtkmm/state_gradient.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/state_gradient.h delete mode 100644 synfig-studio/trunk/src/gtkmm/state_normal.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/state_normal.h delete mode 100644 synfig-studio/trunk/src/gtkmm/state_polygon.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/state_polygon.h delete mode 100644 synfig-studio/trunk/src/gtkmm/state_rectangle.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/state_rectangle.h delete mode 100644 synfig-studio/trunk/src/gtkmm/state_rotate.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/state_rotate.h delete mode 100644 synfig-studio/trunk/src/gtkmm/state_scale.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/state_scale.h delete mode 100644 synfig-studio/trunk/src/gtkmm/state_sketch.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/state_sketch.h delete mode 100644 synfig-studio/trunk/src/gtkmm/state_smoothmove.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/state_smoothmove.h delete mode 100644 synfig-studio/trunk/src/gtkmm/state_star.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/state_star.h delete mode 100644 synfig-studio/trunk/src/gtkmm/state_stroke.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/state_stroke.h delete mode 100644 synfig-studio/trunk/src/gtkmm/state_text.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/state_text.h delete mode 100644 synfig-studio/trunk/src/gtkmm/state_width.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/state_width.h delete mode 100644 synfig-studio/trunk/src/gtkmm/state_zoom.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/state_zoom.h delete mode 100644 synfig-studio/trunk/src/gtkmm/statemanager.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/statemanager.h delete mode 100644 synfig-studio/trunk/src/gtkmm/toggleducksdial.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/toggleducksdial.h delete mode 100644 synfig-studio/trunk/src/gtkmm/toolbox.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/toolbox.h delete mode 100644 synfig-studio/trunk/src/gtkmm/valuelink.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/valuelink.h delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_canvaschooser.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_canvaschooser.h delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_color.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_color.h delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_coloredit.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_coloredit.h delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_compselect.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_compselect.h delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_curves.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_curves.h delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_defaults.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_defaults.h delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_distance.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_distance.h delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_enum.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_enum.h delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_filename.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_filename.h delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_gradient.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_gradient.h delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_keyframe_list.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_keyframe_list.h delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_sound.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_sound.h delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_time.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_time.h delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_timeslider.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_timeslider.h delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_value.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_value.h delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_vector.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_vector.h delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_waypoint.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_waypoint.h delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_waypointmodel.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/widget_waypointmodel.h delete mode 100644 synfig-studio/trunk/src/gtkmm/workarea.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/workarea.h delete mode 100644 synfig-studio/trunk/src/gtkmm/workarearenderer.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/workarearenderer.h delete mode 100644 synfig-studio/trunk/src/gtkmm/zoomdial.cpp delete mode 100644 synfig-studio/trunk/src/gtkmm/zoomdial.h delete mode 100644 synfig-studio/trunk/src/synfigapp/Makefile.am delete mode 100644 synfig-studio/trunk/src/synfigapp/action.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/action.h delete mode 100644 synfig-studio/trunk/src/synfigapp/action_param.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/action_param.h delete mode 100644 synfig-studio/trunk/src/synfigapp/action_system.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/action_system.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/activepointadd.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/activepointadd.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/activepointremove.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/activepointremove.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/activepointset.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/activepointset.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/activepointsetoff.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/activepointsetoff.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/activepointseton.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/activepointseton.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/activepointsetsmart.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/activepointsetsmart.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/activepointsimpleadd.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/activepointsimpleadd.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/blinepointtangentmerge.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/blinepointtangentmerge.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/blinepointtangentsplit.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/blinepointtangentsplit.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/canvasadd.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/canvasadd.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/canvasdescriptionset.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/canvasdescriptionset.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/canvasidset.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/canvasidset.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/canvasnameset.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/canvasnameset.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/canvasremove.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/canvasremove.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/canvasrenddescset.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/canvasrenddescset.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/colorset.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/colorset.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/editmodeset.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/editmodeset.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/gradientset.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/gradientset.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/groupaddlayers.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/groupaddlayers.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/groupremove.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/groupremove.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/groupremovelayers.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/groupremovelayers.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/grouprename.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/grouprename.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/keyframeadd.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/keyframeadd.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/keyframeduplicate.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/keyframeduplicate.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/keyframeremove.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/keyframeremove.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/keyframeset.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/keyframeset.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/keyframesetdelta.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/keyframesetdelta.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/keyframewaypointset.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/keyframewaypointset.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layeractivate.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layeractivate.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layeradd.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layeradd.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layerduplicate.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layerduplicate.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layerencapsulate.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layerencapsulate.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layerlower.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layerlower.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layermove.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layermove.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layerparamconnect.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layerparamconnect.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layerparamdisconnect.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layerparamdisconnect.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layerparamset.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layerparamset.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layerraise.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layerraise.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layerremove.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layerremove.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layersetdesc.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/layersetdesc.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/timepointscopy.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/timepointscopy.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/timepointsdelete.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/timepointsdelete.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/timepointsmove.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/timepointsmove.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuedescblinelink.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuedescblinelink.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuedescconnect.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuedescconnect.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuedescconvert.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuedescconvert.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuedescdisconnect.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuedescdisconnect.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuedescexport.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuedescexport.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuedesclink.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuedesclink.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuedescset.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuedescset.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodeadd.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodeadd.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodeconstset.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodeconstset.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistinsert.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistinsert.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistinsertsmart.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistloop.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistloop.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistremove.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistremove.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistremovesmart.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistrotateorder.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistrotateorder.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistunloop.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodedynamiclistunloop.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodelinkconnect.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodelinkconnect.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodelinkdisconnect.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodelinkdisconnect.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenoderemove.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenoderemove.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenoderename.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenoderename.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodereplace.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/valuenodereplace.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/waypointadd.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/waypointadd.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/waypointconnect.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/waypointconnect.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/waypointdisconnect.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/waypointdisconnect.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/waypointremove.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/waypointremove.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/waypointset.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/waypointset.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/waypointsetsmart.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/waypointsetsmart.h delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/waypointsimpleadd.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/actions/waypointsimpleadd.h delete mode 100644 synfig-studio/trunk/src/synfigapp/blineconvert.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/blineconvert.h delete mode 100644 synfig-studio/trunk/src/synfigapp/canvasinterface.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/canvasinterface.h delete mode 100644 synfig-studio/trunk/src/synfigapp/cvs.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/cvs.h delete mode 100644 synfig-studio/trunk/src/synfigapp/editmode.h delete mode 100644 synfig-studio/trunk/src/synfigapp/general.h delete mode 100644 synfig-studio/trunk/src/synfigapp/inputdevice.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/inputdevice.h delete mode 100644 synfig-studio/trunk/src/synfigapp/instance.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/instance.h delete mode 100644 synfig-studio/trunk/src/synfigapp/main.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/main.h delete mode 100644 synfig-studio/trunk/src/synfigapp/selectionmanager.h delete mode 100644 synfig-studio/trunk/src/synfigapp/settings.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/settings.h delete mode 100644 synfig-studio/trunk/src/synfigapp/timegather.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/timegather.h delete mode 100644 synfig-studio/trunk/src/synfigapp/uimanager.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/uimanager.h delete mode 100644 synfig-studio/trunk/src/synfigapp/value_desc.cpp delete mode 100644 synfig-studio/trunk/src/synfigapp/value_desc.h delete mode 100644 synfig-studio/trunk/src/template.cpp delete mode 100644 synfig-studio/trunk/src/template.h delete mode 100644 synfig-studio/trunk/studio.kdevprj delete mode 100755 synfig-studio/trunk/studio.pbproj/project.pbxproj delete mode 100644 synfig-studio/trunk/studio.prj delete mode 100755 synfig-studio/trunk/synfigstudio-cph-monitor delete mode 100644 synfig-studio/trunk/synfigstudio-thumbnailer.schemas.in delete mode 100644 synfig-studio/trunk/synfigstudio.desktop.in delete mode 100644 synfig-studio/trunk/synfigstudio.keys.in delete mode 100644 synfig-studio/trunk/synfigstudio.mime.in delete mode 100644 synfig-studio/trunk/synfigstudio.xml.in delete mode 100755 synfig-studio/trunk/win32build.sh delete mode 100644 synfig-studio/trunk/win32inst.nsi.in create mode 100755 synfig-studio/win32build.sh create mode 100644 synfig-studio/win32inst.nsi.in diff --git a/ETL/AUTHORS b/ETL/AUTHORS new file mode 100644 index 0000000..83446da --- /dev/null +++ b/ETL/AUTHORS @@ -0,0 +1,12 @@ +Developers: + +Robert B. Quattlebaum Jr (darco) +Adrian Bentley + +Contributors: + +Paul Wise (pabs) +Andreas Jochens +Chris Moore (dooglus) +Martin Michlmayr +Ralf Corsepius diff --git a/ETL/ETL-config.in b/ETL/ETL-config.in new file mode 100644 index 0000000..61bce4f --- /dev/null +++ b/ETL/ETL-config.in @@ -0,0 +1,64 @@ +#!/bin/sh + +VERSION=@VERSION@ +PACKAGE=@PACKAGE@ + +usage() +{ + cat < + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXRunSessionModule + Name + Run Log + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + Description + This workspace mimics that found in Xcode 1.2, with various minor improvements such as including attached editors to the build results window and the project find window. + DockingSystemVisible + + Extension + mode1 + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.mode1 + MajorVersion + 31 + MinorVersion + 0 + Name + Default Workspace + Notifications + + OpenEditors + + Perspectives + + + ChosenToolbarItems + + active-target-popup + action + NSToolbarFlexibleSpaceItem + buildOrClean + build-and-runOrDebug + clean-target + com.apple.ide.PBXToolbarStopButton + get-info + toggle-editor + NSToolbarFlexibleSpaceItem + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.project + IsVertical + + Layout + + + BecomeActive + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 265 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + F550016102F0983D01000102 + F550017202F0ABE401000102 + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 1044}, {265, 435}} + + PBXTopSmartGroupGIDs + + + GeometryConfiguration + + Frame + {{0, 0}, {282, 453}} + GroupTreeTableConfiguration + + MainColumn + 265 + + RubberWindowFrame + 46 184 812 495 0 0 1152 848 + + Module + PBXSmartGroupTreeModule + Proportion + 282pt + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20306471E060097A5F4 + PBXProjectModuleLabel + _angle.h + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CE0B20406471E060097A5F4 + PBXProjectModuleLabel + _angle.h + bookmark + A6E2EB1707656ADC002AF736 + history + + A6E2EAF207656836002AF736 + + + SplitCount + 1 + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {524, 0}} + RubberWindowFrame + 46 184 812 495 0 0 1152 848 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20506471E060097A5F4 + PBXProjectModuleLabel + Targets + + GeometryConfiguration + + Frame + {{0, 7}, {524, 446}} + RubberWindowFrame + 46 184 812 495 0 0 1152 848 + + Module + XCDetailModule + Proportion + 446pt + + + Proportion + 524pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDetailModule + + TableOfContents + + A6E2EAF407656836002AF736 + 1CE0B1FE06471DED0097A5F4 + A6E2EAF507656836002AF736 + 1CE0B20306471E060097A5F4 + 1CE0B20506471E060097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.default + + + PerspectivesBarVisible + + StatusbarIsVisible + + TimeStamp + 0.0 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 1 + Type + Perspectives + UpdateMessage + + WindowJustification + 5 + WindowOrderList + + A6E2EAFD076568E5002AF736 + A6E2EAFB076568E5002AF736 + /Users/darco/Projects/Voria/ETL/ETL.pbproj + + WindowString + 46 184 812 495 0 0 1152 848 + WindowTools + + + FirstTimeWindowDisplayed + + Identifier + windowTool.build + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD052900623707200166675 + + SplitCount + 1 + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {500, 66}} + RubberWindowFrame + 377 21 500 500 0 0 1152 848 + + Module + PBXNavigatorGroup + Proportion + 66pt + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build + XCBuildResultsTrigger_Collapse + 1021 + XCBuildResultsTrigger_Open + 1011 + + GeometryConfiguration + + Frame + {{0, 73}, {500, 385}} + RubberWindowFrame + 377 21 500 500 0 0 1152 848 + + Module + PBXBuildResultsModule + Proportion + 385pt + + + Proportion + 458pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + + TableOfContents + + A6E2EAFB076568E5002AF736 + A6E2EAFC076568E5002AF736 + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.build + WindowString + 377 21 500 500 0 0 1152 848 + WindowToolGUID + A6E2EAFB076568E5002AF736 + WindowToolIsVisible + + + + Identifier + windowTool.debugger + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {317, 164}} + {{317, 0}, {377, 164}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 164}} + {{0, 164}, {694, 216}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 380}} + RubberWindowFrame + 321 238 694 422 0 0 1440 878 + + Module + PBXDebugSessionModule + Proportion + 380pt + + + Proportion + 380pt + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + + TableOfContents + + 1CD10A99069EF8BA00B06720 + 1C0AD2AB069F1E9B00FABCE6 + 1C162984064C10D400B95A72 + 1C0AD2AC069F1E9B00FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.debug + WindowString + 321 238 694 422 0 0 1440 878 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + + + + Identifier + MENUSEPARATOR + + + Identifier + windowTool.debuggerConsole + Layout + + + Dock + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {440, 358}} + RubberWindowFrame + 650 41 440 400 0 0 1280 1002 + + Module + PBXDebugCLIModule + Proportion + 358pt + + + Proportion + 358pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + + TableOfContents + + 1C78EAAD065D492600B07095 + 1C78EAAE065D492600B07095 + 1C78EAAC065D492600B07095 + + WindowString + 650 41 440 400 0 0 1280 1002 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.run + Layout + + + Dock + + + ContentConfiguration + + LauncherConfigVersion + 3 + PBXProjectModuleGUID + 1CD0528B0623707200166675 + PBXProjectModuleLabel + Run + Runner + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {493, 167}} + {{0, 176}, {493, 267}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {405, 443}} + {{414, 0}, {514, 443}} + + + + + GeometryConfiguration + + Frame + {{0, 0}, {458, 143}} + RubberWindowFrame + 653 537 458 185 0 0 1152 848 + + Module + PBXRunSessionModule + Proportion + 143pt + + + Proportion + 143pt + + + Name + Run Log + ServiceClasses + + PBXRunSessionModule + + StatusbarIsVisible + + TableOfContents + + A6E2EAFD076568E5002AF736 + A6E2EAFE076568E5002AF736 + 1CD0528B0623707200166675 + A6E2EAFF076568E5002AF736 + + ToolbarConfiguration + xcode.toolbar.config.run + WindowString + 653 537 458 185 0 0 1152 848 + WindowToolGUID + A6E2EAFD076568E5002AF736 + WindowToolIsVisible + + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.09500122070312 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 259pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + Layout + + + Dock + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 1CD052930623707200166675 + PBXProjectModuleLabel + Breakpoints + + GeometryConfiguration + + BreakpointsTreeTableConfiguration + + enabledColumn + 16 + breakpointColumn + 201.5830078125 + + Frame + {{0, 0}, {240, 195}} + RubberWindowFrame + 342 421 240 216 0 0 1440 878 + + Module + PBXDebugBreakpointsModule + Proportion + 195pt + + + Proportion + 195pt + + + Name + Breakpoints + ServiceClasses + + PBXDebugBreakpointsModule + + StatusbarIsVisible + + TableOfContents + + 1C0AD2AD069F1E9B00FABCE6 + 1C0AD2AE069F1E9B00FABCE6 + 1CD052930623707200166675 + + WindowString + 342 421 240 216 0 0 1440 878 + WindowToolGUID + 1C0AD2AD069F1E9B00FABCE6 + WindowToolIsVisible + + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 166pt + + + Proportion + 166pt + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {374, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {630, 331}} + MembersFrame + {{0, 105}, {374, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 97 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + + RubberWindowFrame + 385 179 630 352 0 0 1440 878 + + Module + PBXClassBrowserModule + Proportion + 331pt + + + Proportion + 331pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + + TableOfContents + + 1C0AD2AF069F1E9B00FABCE6 + 1C0AD2B0069F1E9B00FABCE6 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 385 179 630 352 0 0 1440 878 + WindowToolGUID + 1C0AD2AF069F1E9B00FABCE6 + WindowToolIsVisible + + + + + diff --git a/ETL/ETL.pbproj/darco.pbxuser b/ETL/ETL.pbproj/darco.pbxuser new file mode 100755 index 0000000..63eaae6 --- /dev/null +++ b/ETL/ETL.pbproj/darco.pbxuser @@ -0,0 +1,859 @@ +// !$*UTF8*$! +{ + A6E2EADA07656777002AF736 = { + fallbackIsa = XCSourceControlManager; + isSCMEnabled = 0; + isa = PBXSourceControlManager; + scmConfiguration = { + }; + scmType = ""; + }; + A6E2EADB07656777002AF736 = { + indexTemplatePath = ""; + isa = PBXCodeSenseManager; + usesDefaults = 1; + wantsCodeCompletion = 1; + wantsCodeCompletionAutoSuggestions = 0; + wantsCodeCompletionCaseSensitivity = 1; + wantsCodeCompletionListAlways = 1; + wantsCodeCompletionOnlyMatchingItems = 1; + wantsCodeCompletionParametersIncluded = 1; + wantsCodeCompletionPlaceholdersInserted = 1; + wantsCodeCompletionTabCompletes = 1; + wantsIndex = 1; + }; + A6E2EAF207656836002AF736 = { + fRef = F5060A1C02F342A901000102; + isa = PBXBookmark; + }; + A6E2EB1707656ADC002AF736 = { + fRef = F5060A1C02F342A901000102; + isa = PBXTextBookmark; + name = "_angle.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + F5060A1C02F342A901000102 = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {608, 6187}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRect = "{{0, 0}, {0, 0}}"; + }; + }; + F5060A3602F37B5E01000102 = { + activeExec = 0; + executables = ( + F5060A3802F37B5E01000102, + ); + }; + F5060A3802F37B5E01000102 = { + activeArgIndex = 2147483647; + activeArgIndices = ( + ); + argumentStrings = ( + ); + configStateDict = { + }; + cppStopOnCatchEnabled = 0; + cppStopOnThrowEnabled = 0; + customDataFormattersEnabled = 1; + debuggerPlugin = GDBDebugging; + disassemblyDisplayState = 0; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + isa = PBXExecutable; + libgmallocEnabled = 0; + name = "Handle Test"; + shlibInfoDictList = ( + ); + sourceDirectories = ( + ); + }; + F5060A3C02F37BAC01000102 = { + activeExec = 0; + executables = ( + F5060A4402F37BAC01000102, + ); + }; + F5060A4402F37BAC01000102 = { + activeArgIndex = 2147483647; + activeArgIndices = ( + ); + argumentStrings = ( + ); + configStateDict = { + }; + cppStopOnCatchEnabled = 0; + cppStopOnThrowEnabled = 0; + customDataFormattersEnabled = 1; + debuggerPlugin = GDBDebugging; + disassemblyDisplayState = 0; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + isa = PBXExecutable; + libgmallocEnabled = 0; + name = "Angle Test"; + shlibInfoDictList = ( + ); + sourceDirectories = ( + ); + }; + F5060A4802F37BDD01000102 = { + activeExec = 0; + }; + F5060A5102F37D8201000102 = { + activeExec = 0; + executables = ( + F5060A5902F37D8201000102, + ); + }; + F5060A5902F37D8201000102 = { + activeArgIndex = 2147483647; + activeArgIndices = ( + ); + argumentStrings = ( + ); + configStateDict = { + }; + cppStopOnCatchEnabled = 0; + cppStopOnThrowEnabled = 0; + customDataFormattersEnabled = 1; + debuggerPlugin = GDBDebugging; + disassemblyDisplayState = 0; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + isa = PBXExecutable; + libgmallocEnabled = 0; + name = "Smach Test"; + shlibInfoDictList = ( + ); + sourceDirectories = ( + ); + }; + F5060A5A02F37D8501000102 = { + activeExec = 0; + executables = ( + F5060A6202F37D8501000102, + ); + }; + F5060A6202F37D8501000102 = { + activeArgIndex = 2147483647; + activeArgIndices = ( + ); + argumentStrings = ( + ); + configStateDict = { + }; + cppStopOnCatchEnabled = 0; + cppStopOnThrowEnabled = 0; + customDataFormattersEnabled = 1; + debuggerPlugin = GDBDebugging; + disassemblyDisplayState = 0; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + isa = PBXExecutable; + libgmallocEnabled = 0; + name = "Random Test"; + shlibInfoDictList = ( + ); + sourceDirectories = ( + ); + }; + F5060A6702F37DEF01000102 = { + activeExec = 0; + executables = ( + F5060A6F02F37DEF01000102, + ); + }; + F5060A6F02F37DEF01000102 = { + activeArgIndex = 2147483647; + activeArgIndices = ( + ); + argumentStrings = ( + ); + configStateDict = { + }; + cppStopOnCatchEnabled = 0; + cppStopOnThrowEnabled = 0; + customDataFormattersEnabled = 1; + debuggerPlugin = GDBDebugging; + disassemblyDisplayState = 0; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + isa = PBXExecutable; + libgmallocEnabled = 0; + name = "Fixed Test"; + shlibInfoDictList = ( + ); + sourceDirectories = ( + ); + }; + F513069D032666F8012F4765 = { + activeExec = 0; + }; + F51307D803269B0F012F4765 = { + activeExec = 0; + executables = ( + F51307E103269B0F012F4765, + ); + }; + F51307E103269B0F012F4765 = { + activeArgIndex = 2147483647; + activeArgIndices = ( + ); + argumentStrings = ( + ); + configStateDict = { + }; + cppStopOnCatchEnabled = 0; + cppStopOnThrowEnabled = 0; + customDataFormattersEnabled = 1; + debuggerPlugin = GDBDebugging; + disassemblyDisplayState = 0; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + isa = PBXExecutable; + libgmallocEnabled = 0; + name = "Stringf Test"; + shlibInfoDictList = ( + ); + sourceDirectories = ( + ); + }; + F54AEB2B02F6899D01000102 = { + activeExec = 0; + executables = ( + F54AEB3302F6899D01000102, + ); + }; + F54AEB3302F6899D01000102 = { + activeArgIndex = 2147483647; + activeArgIndices = ( + ); + argumentStrings = ( + ); + configStateDict = { + }; + cppStopOnCatchEnabled = 0; + cppStopOnThrowEnabled = 0; + customDataFormattersEnabled = 1; + debuggerPlugin = GDBDebugging; + disassemblyDisplayState = 0; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + isa = PBXExecutable; + libgmallocEnabled = 0; + name = "Clock Test"; + shlibInfoDictList = ( + ); + sourceDirectories = ( + ); + }; + F550016502F0983D01000102 = { + activeBuildStyle = F550016402F0983D01000102; + activeExecutable = F5060A5902F37D8201000102; + activeTarget = F513069D032666F8012F4765; + addToTargets = ( + F588A3BC02F0CCE501000102, + ); + breakpoints = ( + F5AD1D3D03098DA401B5FFC8, + ); + codeSenseManager = A6E2EADB07656777002AF736; + executables = ( + F5060A3802F37B5E01000102, + F5060A4402F37BAC01000102, + F5060A5902F37D8201000102, + F5060A6202F37D8501000102, + F5060A6F02F37DEF01000102, + F54AEB3302F6899D01000102, + F576CB76031841EA01A80006, + F5CAA207031AD533012F434D, + F51307E103269B0F012F4765, + F58D9F8E037F146301A80006, + F58D9F97037F14FE01A80006, + ); + perUserDictionary = { + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 279, + 20, + 54, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 241, + 62, + 20, + 56, + 43, + 43, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXTargetDataSource_PrimaryAttribute, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 124086103; + PBXPrepackagedSmartGroups_v2 = ( + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + activationKey = OldTargetSmartGroup; + clz = PBXTargetSmartGroup; + description = "Displays all targets of the project."; + globalID = 1C37FABC04509CD000000102; + name = Targets; + preferences = { + image = Targets; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXTargetSmartGroup2; + description = "Displays all targets of the project as well as nested build phases."; + globalID = 1C37FBAC04509CD000000102; + name = Targets; + preferences = { + image = Targets; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXExecutablesSmartGroup; + description = "Displays all executables of the project."; + globalID = 1C37FAAC04509CD000000102; + name = Executables; + preferences = { + image = Executable; + }; + }, + { + " PBXTransientLocationAtTop " = bottom; + absolutePathToBundle = ""; + clz = PBXErrorsWarningsSmartGroup; + description = "Displays files with errors or warnings."; + globalID = 1C08E77C0454961000C914BD; + name = "Errors and Warnings"; + preferences = { + fnmatch = ""; + image = WarningsErrors; + recursive = 1; + regex = ""; + root = ""; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXFilenameSmartGroup; + description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter."; + globalID = 1CC0EA4004350EF90044410B; + name = "Implementation Files"; + preferences = { + canSave = 1; + fnmatch = ""; + image = SmartFolder; + isLeaf = 0; + recursive = 1; + regex = "?*\\.[mcMC]"; + root = ""; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXFilenameSmartGroup; + description = "This group displays Interface Builder NIB Files."; + globalID = 1CC0EA4004350EF90041110B; + name = "NIB Files"; + preferences = { + canSave = 1; + fnmatch = "*.nib"; + image = SmartFolder; + isLeaf = 0; + recursive = 1; + regex = ""; + root = ""; + }; + }, + { + PBXTransientLocationAtTop = no; + absolutePathToBundle = ""; + clz = PBXFindSmartGroup; + description = "Displays Find Results."; + globalID = 1C37FABC05509CD000000102; + name = "Find Results"; + preferences = { + image = spyglass; + }; + }, + { + PBXTransientLocationAtTop = no; + absolutePathToBundle = ""; + clz = PBXBookmarksSmartGroup; + description = "Displays Project Bookmarks."; + globalID = 1C37FABC05539CD112110102; + name = Bookmarks; + preferences = { + image = Bookmarks; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = XCSCMSmartGroup; + description = "Displays files with interesting SCM status."; + globalID = E2644B35053B69B200211256; + name = SCM; + preferences = { + image = PBXRepository; + isLeaf = 0; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXSymbolsSmartGroup; + description = "Displays all symbols for the project."; + globalID = 1C37FABC04509CD000100104; + name = "Project Symbols"; + preferences = { + image = ProjectSymbols; + isLeaf = 1; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXFilenameSmartGroup; + description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter."; + globalID = PBXTemplateMarker; + name = "Simple Filter SmartGroup"; + preferences = { + canSave = 1; + fnmatch = "*.nib"; + image = SmartFolder; + isLeaf = 0; + recursive = 1; + regex = ""; + root = ""; + }; + }, + { + PBXTransientLocationAtTop = bottom; + absolutePathToBundle = ""; + clz = PBXFilenameSmartGroup; + description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter."; + globalID = PBXTemplateMarker; + name = "Simple Regular Expression SmartGroup"; + preferences = { + canSave = 1; + fnmatch = ""; + image = SmartFolder; + isLeaf = 0; + recursive = 1; + regex = "?*\\.[mcMC]"; + root = ""; + }; + }, + { + PBXTransientLocationAtTop = bottom; + clz = XDDesignSmartGroup; + description = "Displays Xdesign models"; + globalID = 2E4A936305E6979E00701470; + name = Design; + preferences = { + image = Design; + isLeaf = 0; + }; + }, + ); + PBXWorkspaceContents = ( + { + LeftSlideOut = { + Split0 = { + Split0 = { + NavContent0 = { + bookmark = A6FEFDFB05DF3B2E00140006; + history = ( + F530FB0803650921012F4ADF, + F5429FB903A918AB01A80006, + F5429FBA03A918AB01A80006, + F5C1F0ED03BCE61101A80006, + A64F6F3B052BE34900140006, + A64F6F3C052BE34900140006, + A64F6F3D052BE34900140006, + A64F6F3E052BE34900140006, + A63F3B810551700E00140006, + A63F3B820551700E00140006, + A64EF6BF05A73A8F00140006, + ); + prevStack = ( + F5429FBC03A918AB01A80006, + F5429FBD03A918AB01A80006, + F5429FBE03A918AB01A80006, + F5C1F0EF03BCE61101A80006, + A64F6F41052BE34900140006, + A64F6F42052BE34900140006, + A64F6F43052BE34900140006, + A64F6F44052BE34900140006, + A64F6F45052BE34900140006, + A64F6F46052BE34900140006, + A63F3B830551700E00140006, + A63F3B840551700E00140006, + ); + }; + NavCount = 1; + NavGeometry0 = { + Frame = "{{0, 0}, {992, 458}}"; + NavBarVisible = YES; + }; + NavSplitVertical = NO; + }; + SplitCount = 1; + Tab1 = { + Debugger = { + Split0 = { + SplitCount = 2; + }; + SplitCount = 1; + TabCount = 2; + }; + LauncherConfigVersion = 7; + }; + Tab2 = { + LauncherConfigVersion = 3; + Runner = { + }; + }; + TabCount = 5; + }; + SplitCount = 1; + Tab1 = { + OptionsSetName = "Hierarchy, all classes"; + }; + TabCount = 5; + }; + }, + ); + PBXWorkspaceGeometries = ( + { + ContentSize = "{1276, 770}"; + LeftSlideOut = { + ActiveTab = 0; + ActiveTabName = PBXGroupTreeModule; + Collapsed = NO; + Frame = "{{0, 23}, {1276, 747}}"; + Split0 = { + ActiveTab = 2; + ActiveTabName = PBXBuildResultsModule; + Collapsed = NO; + Frame = "{{284, 0}, {992, 747}}"; + Split0 = { + Frame = "{{0, 289}, {992, 458}}"; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {572, 214}}"; + }; + Tab1 = { + Debugger = { + Collapsed = NO; + Frame = "{{0, 0}, {992, 150}}"; + Split0 = { + Frame = "{{0, 24}, {992, 126}}"; + Split0 = { + Frame = "{{0, 0}, {488, 126}}"; + }; + Split1 = { + DebugVariablesTableConfiguration = ( + Name, + 123, + Value, + 85, + Summary, + 261.123, + ); + Frame = "{{497, 0}, {495, 126}}"; + }; + SplitCount = 2; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {100, 50}}"; + }; + Tab1 = { + Frame = "{{0, 0}, {100, 50}}"; + }; + TabCount = 2; + TabsVisible = YES; + }; + Frame = "{{0, 0}, {992, 125}}"; + LauncherConfigVersion = 7; + }; + Tab2 = { + Frame = "{{0, 0}, {992, 254}}"; + LauncherConfigVersion = 3; + Runner = { + Frame = "{{0, 0}, {992, 254}}"; + }; + }; + Tab3 = { + BuildMessageFrame = "{{0, 0}, {994, 232}}"; + BuildTranscriptFrame = "{{0, 241}, {994, 2}}"; + BuildTranscriptFrameExpanded = YES; + Frame = "{{0, 0}, {992, 265}}"; + }; + Tab4 = { + Frame = "{{0, 0}, {612, 295}}"; + }; + TabCount = 5; + TabsVisible = YES; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {260, 747}}"; + GroupTreeTableConfiguration = ( + TargetStatusColumn, + 18, + MainColumn, + 205, + SCMStatusColumn, + 22, + ); + }; + Tab1 = { + ClassesFrame = "{{0, 0}, {247, 330}}"; + ClassesTreeTableConfiguration = ( + PBXBookColumnIdentifier, + 20, + PBXClassColumnIdentifier, + 204, + ); + Frame = "{{0, 0}, {245, 549}}"; + MembersFrame = "{{0, 339}, {247, 210}}"; + MembersTreeTableConfiguration = ( + PBXBookColumnIdentifier, + 20, + PBXMethodColumnIdentifier, + 203, + ); + }; + Tab2 = { + Frame = "{{0, 0}, {226, 549}}"; + }; + Tab3 = { + Frame = "{{0, 0}, {191, 747}}"; + TargetTableConfiguration = ( + ActiveObject, + 16, + ObjectNames, + 202.296, + ); + }; + Tab4 = { + BreakpointsTreeTableConfiguration = ( + breakpointColumn, + 138, + enabledColumn, + 31, + ); + Frame = "{{0, 0}, {191, 549}}"; + }; + TabCount = 5; + TabsVisible = YES; + }; + NavBarShownByDefault = YES; + StatusViewVisible = YES; + Template = F5F68CF101725D4C0D7A8F4C; + ToolbarVisible = YES; + WindowLocation = "{4, 0}"; + }, + ); + PBXWorkspaceStateSaveDate = 124086103; + }; + perUserProjectItems = { + A6E2EAF207656836002AF736 = A6E2EAF207656836002AF736; + A6E2EB1707656ADC002AF736 = A6E2EB1707656ADC002AF736; + }; + sourceControlManager = A6E2EADA07656777002AF736; + userBuildSettings = { + }; + }; + F576CB6D031841EA01A80006 = { + activeExec = 0; + executables = ( + F576CB76031841EA01A80006, + ); + }; + F576CB76031841EA01A80006 = { + activeArgIndex = 2147483647; + activeArgIndices = ( + ); + argumentStrings = ( + ); + configStateDict = { + }; + cppStopOnCatchEnabled = 0; + cppStopOnThrowEnabled = 0; + customDataFormattersEnabled = 1; + debuggerPlugin = GDBDebugging; + disassemblyDisplayState = 0; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + isa = PBXExecutable; + libgmallocEnabled = 0; + name = "Hermite Test"; + shlibInfoDictList = ( + ); + sourceDirectories = ( + ); + }; + F588A3BC02F0CCE501000102 = { + activeExec = 0; + }; + F58D9F85037F146301A80006 = { + activeExec = 0; + executables = ( + F58D9F8E037F146301A80006, + ); + }; + F58D9F8E037F146301A80006 = { + activeArgIndex = 2147483647; + activeArgIndices = ( + ); + argumentStrings = ( + ); + configStateDict = { + }; + cppStopOnCatchEnabled = 0; + cppStopOnThrowEnabled = 0; + customDataFormattersEnabled = 1; + debuggerPlugin = GDBDebugging; + disassemblyDisplayState = 0; + enableDebugStr = 1; + environmentEntries = ( + ); + isa = PBXExecutable; + libgmallocEnabled = 0; + name = "Pen Test"; + shlibInfoDictList = ( + ); + sourceDirectories = ( + ); + }; + F58D9F8F037F14FE01A80006 = { + activeExec = 0; + executables = ( + F58D9F97037F14FE01A80006, + ); + }; + F58D9F97037F14FE01A80006 = { + activeArgIndex = 2147483647; + activeArgIndices = ( + ); + argumentStrings = ( + ); + configStateDict = { + }; + cppStopOnCatchEnabled = 0; + cppStopOnThrowEnabled = 0; + customDataFormattersEnabled = 1; + debuggerPlugin = GDBDebugging; + disassemblyDisplayState = 0; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + isa = PBXExecutable; + libgmallocEnabled = 0; + name = "Surface Test"; + shlibInfoDictList = ( + ); + sourceDirectories = ( + ); + }; + F5AD1D3D03098DA401B5FFC8 = { + fileReference = F5060A1E02F342A901000102; + isa = PBXFileBreakpoint; + lineNumber = 5; + state = 2; + }; + F5CAA1FE031AD533012F434D = { + activeExec = 0; + executables = ( + F5CAA207031AD533012F434D, + ); + }; + F5CAA207031AD533012F434D = { + activeArgIndex = 2147483647; + activeArgIndices = ( + ); + argumentStrings = ( + ); + configStateDict = { + }; + cppStopOnCatchEnabled = 0; + cppStopOnThrowEnabled = 0; + customDataFormattersEnabled = 1; + debuggerPlugin = GDBDebugging; + disassemblyDisplayState = 0; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + isa = PBXExecutable; + libgmallocEnabled = 0; + name = "Spline Test"; + shlibInfoDictList = ( + ); + sourceDirectories = ( + ); + }; +} diff --git a/ETL/ETL.pbproj/etl_profile.h b/ETL/ETL.pbproj/etl_profile.h new file mode 100644 index 0000000..e63e0fe --- /dev/null +++ b/ETL/ETL.pbproj/etl_profile.h @@ -0,0 +1,40 @@ +/* include/etl_profile.h. Generated by configure. */ +/* include/etl_profile.h.in. Generated from configure.in by autoheader. */ + + +#ifndef __VETL_PROFILE_H +#define __VETL_PROFILE_H + +/* define if target is big endian */ +#define WORDS_BIGENDIAN + +#ifndef HAVE_GETTIMEOFDAY +#define HAVE_GETTIMEOFDAY +#endif + +#ifndef HAVE_PTHREAD_H +#define HAVE_PTHREAD_H +#endif + +#ifndef HAVE_SCHED_H +#define HAVE_SCHED_H +#endif + +#ifndef HAVE_PTHREAD_CREATE +#define HAVE_PTHREAD_CREATE +#endif + +#ifndef HAVE_VASPRINTF +#define HAVE_VASPRINTF +#endif + +#ifndef HAVE_VSNPRINTF +#define HAVE_VSNPRINTF +#endif + +#ifndef HAVE_VSPRINTF +#define HAVE_VSPRINTF +#endif + +#endif // __VETL_CONFIG_H + diff --git a/ETL/ETL.pbproj/frameworkfix.cpp b/ETL/ETL.pbproj/frameworkfix.cpp new file mode 100644 index 0000000..0aee6e8 --- /dev/null +++ b/ETL/ETL.pbproj/frameworkfix.cpp @@ -0,0 +1,8 @@ +/* + * untitled.cpp + * ETL + * + * Created by Robert Quattlebaum on Mon Aug 26 2002. + * + */ + diff --git a/ETL/ETL.pbproj/project.pbxproj b/ETL/ETL.pbproj/project.pbxproj new file mode 100755 index 0000000..1be00a6 --- /dev/null +++ b/ETL/ETL.pbproj/project.pbxproj @@ -0,0 +1,3111 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 39; + objects = { + A63F3B3E054DA00200140006 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _misc.h; + path = ETL/_misc.h; + refType = 4; + sourceTree = ""; + }; + A63F3B3F054DA00200140006 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = misc; + path = ETL/misc; + refType = 4; + sourceTree = ""; + }; + A63F3B40054DA00200140006 = { + fileRef = A63F3B3E054DA00200140006; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + Private, + ); + }; + }; + A63F3B42054DA02500140006 = { + fileRef = A63F3B3F054DA00200140006; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + A64F6D24052A9DCC00140006 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _ref_count.h; + path = ETL/_ref_count.h; + refType = 4; + sourceTree = ""; + }; + A64F6D25052A9DCC00140006 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = ref_count; + path = ETL/ref_count; + refType = 4; + sourceTree = ""; + }; + A64F6D26052A9DCC00140006 = { + fileRef = A64F6D24052A9DCC00140006; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + Private, + ); + }; + }; + A64F6D28052A9DFF00140006 = { + fileRef = A64F6D25052A9DCC00140006; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + A6E2EAC007656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F588A3BC02F0CCE501000102; + remoteInfo = "ETL Framework"; + }; + A6E2EAC107656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F51307D803269B0F012F4765; + remoteInfo = "Stringf Test"; + }; + A6E2EAC207656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F5060A6702F37DEF01000102; + remoteInfo = "Fixed Test"; + }; + A6E2EAC307656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F5060A5A02F37D8501000102; + remoteInfo = "Random Test"; + }; + A6E2EAC407656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F5060A5102F37D8201000102; + remoteInfo = "Smach Test"; + }; + A6E2EAC507656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F5060A3C02F37BAC01000102; + remoteInfo = "Angle Test"; + }; + A6E2EAC607656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F5060A3602F37B5E01000102; + remoteInfo = "Handle Test"; + }; + A6E2EAC707656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F576CB6D031841EA01A80006; + remoteInfo = "Hermite Test"; + }; + A6E2EAC807656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F54AEB2B02F6899D01000102; + remoteInfo = "Clock Test"; + }; + A6E2EAC907656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F5CAA1FE031AD533012F434D; + remoteInfo = "Spline Test"; + }; + A6E2EACA07656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F588A3BC02F0CCE501000102; + remoteInfo = "ETL Framework"; + }; + A6E2EACB07656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F588A3BC02F0CCE501000102; + remoteInfo = "ETL Framework"; + }; + A6E2EACC07656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F588A3BC02F0CCE501000102; + remoteInfo = "ETL Framework"; + }; + A6E2EACD07656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F588A3BC02F0CCE501000102; + remoteInfo = "ETL Framework"; + }; + A6E2EACE07656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F588A3BC02F0CCE501000102; + remoteInfo = "ETL Framework"; + }; + A6E2EACF07656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F588A3BC02F0CCE501000102; + remoteInfo = "ETL Framework"; + }; + A6E2EAD007656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F588A3BC02F0CCE501000102; + remoteInfo = "ETL Framework"; + }; + A6E2EAD107656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F588A3BC02F0CCE501000102; + remoteInfo = "ETL Framework"; + }; + A6E2EAD207656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F588A3BC02F0CCE501000102; + remoteInfo = "ETL Framework"; + }; + A6E2EAD307656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F588A3BC02F0CCE501000102; + remoteInfo = "ETL Framework"; + }; + A6E2EAD407656757002AF736 = { + containerPortal = F550016502F0983D01000102; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = F588A3BC02F0CCE501000102; + remoteInfo = "ETL Framework"; + }; + A6E2EADC076567C1002AF736 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _rect.h; + path = ETL/_rect.h; + refType = 4; + sourceTree = ""; + }; + A6E2EADD076567C1002AF736 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _value.h; + path = ETL/_value.h; + refType = 4; + sourceTree = ""; + }; + A6E2EADE076567C1002AF736 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = rect; + path = ETL/rect; + refType = 4; + sourceTree = ""; + }; + A6E2EADF076567C1002AF736 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = value; + path = ETL/value; + refType = 4; + sourceTree = ""; + }; + A6E2EAE0076567C1002AF736 = { + fileRef = A6E2EADC076567C1002AF736; + isa = PBXBuildFile; + settings = { + }; + }; + A6E2EAE1076567C1002AF736 = { + fileRef = A6E2EADD076567C1002AF736; + isa = PBXBuildFile; + settings = { + }; + }; + A6E2EAE2076567C1002AF736 = { + fileRef = A6E2EADE076567C1002AF736; + isa = PBXBuildFile; + settings = { + }; + }; + A6E2EAE3076567C1002AF736 = { + fileRef = A6E2EADF076567C1002AF736; + isa = PBXBuildFile; + settings = { + }; + }; +//A60 +//A61 +//A62 +//A63 +//A64 +//F50 +//F51 +//F52 +//F53 +//F54 + F504527502F391C901000102 = { + buildSettings = { + COPY_PHASE_STRIP = NO; + DEBUGGING_SYMBOLS = YES; + OPTIMIZATION_CFLAGS = "-O0"; + PROFILING_CODE = YES; + }; + isa = PBXBuildStyle; + name = "Development (GCC3)"; + }; + F5060A0302F3337A01000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = etl_profile.h; + path = ETL.pbproj/etl_profile.h; + refType = 4; + sourceTree = ""; + }; + F5060A0402F3337A01000102 = { + fileRef = F5060A0302F3337A01000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F5060A0502F3366801000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = ipc; + path = ETL/ipc; + refType = 4; + sourceTree = ""; + }; + F5060A0602F3366801000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = thread; + path = ETL/thread; + refType = 4; + sourceTree = ""; + }; + F5060A0702F3366801000102 = { + fileRef = F5060A0502F3366801000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F5060A0802F3366801000102 = { + fileRef = F5060A0602F3366801000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F5060A1C02F342A901000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _angle.h; + path = ETL/_angle.h; + refType = 4; + sourceTree = ""; + }; + F5060A1D02F342A901000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _curve.h; + path = ETL/_curve.h; + refType = 4; + sourceTree = ""; + }; + F5060A1E02F342A901000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _fixed.h; + path = ETL/_fixed.h; + refType = 4; + sourceTree = ""; + }; + F5060A1F02F342A901000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _handle.h; + path = ETL/_handle.h; + refType = 4; + sourceTree = ""; + }; + F5060A2102F342A901000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _smach.h; + path = ETL/_smach.h; + refType = 4; + sourceTree = ""; + }; + F5060A2202F342A901000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _thread.h; + path = ETL/_thread.h; + refType = 4; + sourceTree = ""; + }; + F5060A2302F342A901000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _trivial.h; + path = ETL/_trivial.h; + refType = 4; + sourceTree = ""; + }; + F5060A2402F342A901000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = fixed; + path = ETL/fixed; + refType = 4; + sourceTree = ""; + }; + F5060A2502F342A901000102 = { + fileRef = F5060A1C02F342A901000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F5060A2602F342A901000102 = { + fileRef = F5060A1D02F342A901000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F5060A2702F342A901000102 = { + fileRef = F5060A1E02F342A901000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F5060A2802F342A901000102 = { + fileRef = F5060A1F02F342A901000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F5060A2A02F342A901000102 = { + fileRef = F5060A2102F342A901000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F5060A2B02F342A901000102 = { + fileRef = F5060A2202F342A901000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F5060A2C02F342A901000102 = { + fileRef = F5060A2302F342A901000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F5060A2D02F342A901000102 = { + fileRef = F5060A2402F342A901000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F5060A2E02F379BC01000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _random.h; + path = ETL/_random.h; + refType = 4; + sourceTree = ""; + }; + F5060A2F02F379BC01000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = random; + path = ETL/random; + refType = 4; + sourceTree = ""; + }; + F5060A3002F379BC01000102 = { + fileRef = F5060A2E02F379BC01000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F5060A3102F379BC01000102 = { + fileRef = F5060A2F02F379BC01000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F5060A3202F37B5E01000102 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A3302F37B5E01000102 = { + buildActionMask = 2147483647; + files = ( + F5060A3B02F37BA101000102, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A3402F37B5E01000102 = { + buildActionMask = 2147483647; + files = ( + F5060A3A02F37B6E01000102, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A3502F37B5E01000102 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A3602F37B5E01000102 = { + buildPhases = ( + F5060A3202F37B5E01000102, + F5060A3302F37B5E01000102, + F5060A3402F37B5E01000102, + F5060A3502F37B5E01000102, + ); + buildSettings = { + HEADER_SEARCH_PATHS = build/ETL.framework/Versions/A/Headers; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "Handle Test"; + REZ_EXECUTABLE = YES; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + }; + dependencies = ( + F5060A4602F37BCA01000102, + ); + isa = PBXToolTarget; + name = "Handle Test"; + productInstallPath = /usr/local/bin; + productName = "Handle Test"; + productReference = F5060A3702F37B5E01000102; + }; + F5060A3702F37B5E01000102 = { + explicitFileType = "compiled.mach-o.executable"; + isa = PBXFileReference; + path = "Handle Test"; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F5060A3A02F37B6E01000102 = { + fileRef = F588A3BD02F0CCE501000102; + isa = PBXBuildFile; + settings = { + }; + }; + F5060A3B02F37BA101000102 = { + fileRef = F588A3D602F0CF9101000102; + isa = PBXBuildFile; + settings = { + }; + }; + F5060A3C02F37BAC01000102 = { + buildPhases = ( + F5060A3D02F37BAC01000102, + F5060A3E02F37BAC01000102, + F5060A4002F37BAC01000102, + F5060A4202F37BAC01000102, + ); + buildSettings = { + DEBUGGING_SYMBOLS = NO; + HEADER_SEARCH_PATHS = ETL.pbproj; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "Angle Test"; + PROFILING_CODE = YES; + REZ_EXECUTABLE = YES; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + }; + dependencies = ( + F5060A4702F37BCD01000102, + ); + isa = PBXToolTarget; + name = "Angle Test"; + productInstallPath = /usr/local/bin; + productName = "Handle Test"; + productReference = F5060A4302F37BAC01000102; + }; + F5060A3D02F37BAC01000102 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A3E02F37BAC01000102 = { + buildActionMask = 2147483647; + files = ( + F5060A4502F37BBA01000102, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A4002F37BAC01000102 = { + buildActionMask = 2147483647; + files = ( + F5060A4102F37BAC01000102, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A4102F37BAC01000102 = { + fileRef = F588A3BD02F0CCE501000102; + isa = PBXBuildFile; + settings = { + }; + }; + F5060A4202F37BAC01000102 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A4302F37BAC01000102 = { + explicitFileType = "compiled.mach-o.executable"; + isa = PBXFileReference; + path = "Angle Test"; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F5060A4502F37BBA01000102 = { + fileRef = F5627F1902F0D1F801000102; + isa = PBXBuildFile; + settings = { + }; + }; + F5060A4602F37BCA01000102 = { + isa = PBXTargetDependency; + target = F588A3BC02F0CCE501000102; + targetProxy = A6E2EAD407656757002AF736; + }; + F5060A4702F37BCD01000102 = { + isa = PBXTargetDependency; + target = F588A3BC02F0CCE501000102; + targetProxy = A6E2EACB07656757002AF736; + }; + F5060A4802F37BDD01000102 = { + buildPhases = ( + ); + buildSettings = { + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "All Tests"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + }; + dependencies = ( + F51307E203269B1E012F4765, + F5CAA305031AEFBC012F434D, + F54AEB3502F689AD01000102, + F5CAA306031AEFC1012F434D, + F5060A4A02F37BF601000102, + F5060A4902F37BF401000102, + F5060A6502F37DD001000102, + F5060A6602F37DD201000102, + F5060A7402F37E3401000102, + ); + isa = PBXAggregateTarget; + name = "All Tests"; + productName = "All Tests"; + }; + F5060A4902F37BF401000102 = { + isa = PBXTargetDependency; + target = F5060A3C02F37BAC01000102; + targetProxy = A6E2EAC507656757002AF736; + }; + F5060A4A02F37BF601000102 = { + isa = PBXTargetDependency; + target = F5060A3602F37B5E01000102; + targetProxy = A6E2EAC607656757002AF736; + }; + F5060A4B02F37D3301000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = fixed.cpp; + path = test/fixed.cpp; + refType = 4; + sourceTree = ""; + }; + F5060A4C02F37D3301000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = random.cpp; + path = test/random.cpp; + refType = 4; + sourceTree = ""; + }; + F5060A4D02F37D3301000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = smach.cpp; + path = test/smach.cpp; + refType = 4; + sourceTree = ""; + }; + F5060A5102F37D8201000102 = { + buildPhases = ( + F5060A5202F37D8201000102, + F5060A5302F37D8201000102, + F5060A5502F37D8201000102, + F5060A5702F37D8201000102, + ); + buildSettings = { + HEADER_SEARCH_PATHS = build/ETL.framework/Versions/A/Headers; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "Smach Test"; + REZ_EXECUTABLE = YES; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + }; + dependencies = ( + F5060A7102F37E2601000102, + ); + isa = PBXToolTarget; + name = "Smach Test"; + productInstallPath = /usr/local/bin; + productName = "Handle Test"; + productReference = F5060A5802F37D8201000102; + }; + F5060A5202F37D8201000102 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A5302F37D8201000102 = { + buildActionMask = 2147483647; + files = ( + F5060A6302F37DB001000102, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A5502F37D8201000102 = { + buildActionMask = 2147483647; + files = ( + F5060A5602F37D8201000102, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A5602F37D8201000102 = { + fileRef = F588A3BD02F0CCE501000102; + isa = PBXBuildFile; + settings = { + }; + }; + F5060A5702F37D8201000102 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A5802F37D8201000102 = { + explicitFileType = "compiled.mach-o.executable"; + isa = PBXFileReference; + path = "Smach Test"; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F5060A5A02F37D8501000102 = { + buildPhases = ( + F5060A5B02F37D8501000102, + F5060A5C02F37D8501000102, + F5060A5E02F37D8501000102, + F5060A6002F37D8501000102, + ); + buildSettings = { + HEADER_SEARCH_PATHS = "ETL.pbproj include"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "Random Test"; + REZ_EXECUTABLE = YES; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + }; + dependencies = ( + F5060A7202F37E2901000102, + ); + isa = PBXToolTarget; + name = "Random Test"; + productInstallPath = /usr/local/bin; + productName = "Handle Test"; + productReference = F5060A6102F37D8501000102; + }; + F5060A5B02F37D8501000102 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A5C02F37D8501000102 = { + buildActionMask = 2147483647; + files = ( + F5060A6402F37DB501000102, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A5E02F37D8501000102 = { + buildActionMask = 2147483647; + files = ( + F5060A5F02F37D8501000102, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A5F02F37D8501000102 = { + fileRef = F588A3BD02F0CCE501000102; + isa = PBXBuildFile; + settings = { + }; + }; + F5060A6002F37D8501000102 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A6102F37D8501000102 = { + explicitFileType = "compiled.mach-o.executable"; + isa = PBXFileReference; + path = "Random Test"; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F5060A6302F37DB001000102 = { + fileRef = F5060A4D02F37D3301000102; + isa = PBXBuildFile; + settings = { + }; + }; + F5060A6402F37DB501000102 = { + fileRef = F5060A4C02F37D3301000102; + isa = PBXBuildFile; + settings = { + }; + }; + F5060A6502F37DD001000102 = { + isa = PBXTargetDependency; + target = F5060A5102F37D8201000102; + targetProxy = A6E2EAC407656757002AF736; + }; + F5060A6602F37DD201000102 = { + isa = PBXTargetDependency; + target = F5060A5A02F37D8501000102; + targetProxy = A6E2EAC307656757002AF736; + }; + F5060A6702F37DEF01000102 = { + buildPhases = ( + F5060A6802F37DEF01000102, + F5060A6902F37DEF01000102, + F5060A6B02F37DEF01000102, + F5060A6D02F37DEF01000102, + ); + buildSettings = { + HEADER_SEARCH_PATHS = "ETL.pbproj include"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "Fixed Test"; + REZ_EXECUTABLE = YES; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + }; + dependencies = ( + F5060A7302F37E2B01000102, + ); + isa = PBXToolTarget; + name = "Fixed Test"; + productInstallPath = /usr/local/bin; + productName = "Handle Test"; + productReference = F5060A6E02F37DEF01000102; + }; + F5060A6802F37DEF01000102 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A6902F37DEF01000102 = { + buildActionMask = 2147483647; + files = ( + F5060A7002F37E0001000102, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A6B02F37DEF01000102 = { + buildActionMask = 2147483647; + files = ( + F5060A6C02F37DEF01000102, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A6C02F37DEF01000102 = { + fileRef = F588A3BD02F0CCE501000102; + isa = PBXBuildFile; + settings = { + }; + }; + F5060A6D02F37DEF01000102 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5060A6E02F37DEF01000102 = { + explicitFileType = "compiled.mach-o.executable"; + isa = PBXFileReference; + path = "Fixed Test"; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F5060A7002F37E0001000102 = { + fileRef = F5060A4B02F37D3301000102; + isa = PBXBuildFile; + settings = { + }; + }; + F5060A7102F37E2601000102 = { + isa = PBXTargetDependency; + target = F588A3BC02F0CCE501000102; + targetProxy = A6E2EAD307656757002AF736; + }; + F5060A7202F37E2901000102 = { + isa = PBXTargetDependency; + target = F588A3BC02F0CCE501000102; + targetProxy = A6E2EACD07656757002AF736; + }; + F5060A7302F37E2B01000102 = { + isa = PBXTargetDependency; + target = F588A3BC02F0CCE501000102; + targetProxy = A6E2EACA07656757002AF736; + }; + F5060A7402F37E3401000102 = { + isa = PBXTargetDependency; + target = F5060A6702F37DEF01000102; + targetProxy = A6E2EAC207656757002AF736; + }; + F50AFD3D0370620B01A80006 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _bezier_angle.h; + path = ETL/_bezier_angle.h; + refType = 4; + sourceTree = ""; + }; + F50AFD3E0370620B01A80006 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _bezier.h; + path = ETL/_bezier.h; + refType = 4; + sourceTree = ""; + }; + F50AFD3F0370620B01A80006 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = bezier; + path = ETL/bezier; + refType = 4; + sourceTree = ""; + }; + F50AFD400370620B01A80006 = { + fileRef = F50AFD3D0370620B01A80006; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + Private, + ); + }; + }; + F50AFD410370620B01A80006 = { + fileRef = F50AFD3E0370620B01A80006; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + Private, + ); + }; + }; + F50AFD420370620B01A80006 = { + fileRef = F50AFD3F0370620B01A80006; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F50AFD490373BEC801A80006 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _status.h; + path = ETL/_status.h; + refType = 4; + sourceTree = ""; + }; + F50AFD4A0373BEC801A80006 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = status; + path = ETL/status; + refType = 4; + sourceTree = ""; + }; + F50AFD4B0373BEC801A80006 = { + fileRef = F50AFD490373BEC801A80006; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + Private, + ); + }; + }; + F50AFD4D0373BEE001A80006 = { + fileRef = F50AFD4A0373BEC801A80006; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F51305C10325EF93012F4765 = { + children = ( + F51305C20325EFB8012F4765, + F51305C70325EFB8012F4765, + ); + isa = PBXGroup; + name = "Package Files"; + refType = 4; + sourceTree = ""; + }; + F51305C20325EFB8012F4765 = { + children = ( + F51305C40325EFB8012F4765, + F5D988CB03325BFC01A80006, + F5D988CC03325BFC01A80006, + F5D988CD03325BFC01A80006, + ); + isa = PBXGroup; + name = "devel-resources"; + path = "config/pkg-support/devel-resources"; + refType = 4; + sourceTree = ""; + }; + F51305C40325EFB8012F4765 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.script.sh; + path = install.sh; + refType = 4; + sourceTree = ""; + }; + F51305C70325EFB8012F4765 = { + isa = PBXFileReference; + lastKnownFileType = text; + name = "ETL-devel.info"; + path = "config/pkg-support/ETL-devel.info"; + refType = 4; + sourceTree = ""; + }; + F513067A03266039012F4765 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.script.sh; + path = "ETL-config.in"; + refType = 4; + sourceTree = ""; + }; + F5130699032666F8012F4765 = { + buildActionMask = 2147483647; + files = ( + F51306A2032668FA012F4765, + F51306A6032668FF012F4765, + F5D988D503325CDB01A80006, + F5D988D603325CDE01A80006, + F5D988D403325CD801A80006, + ); + isa = PBXResourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F513069D032666F8012F4765 = { + buildPhases = ( + F5C1EE4903BCE00701A80006, + F513069F03266806012F4765, + F51306A00326682D012F4765, + F5130699032666F8012F4765, + F51306D203266E6A012F4765, + ); + buildSettings = { + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "ETL-devel"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + WRAPPER_EXTENSION = pkg; + }; + dependencies = ( + F51306B303266DAC012F4765, + ); + isa = PBXBundleTarget; + name = "Devel Package"; + productInstallPath = "$(USER_LIBRARY_DIR)/Bundles"; + productName = Untitled; + productReference = F513069E032666F8012F4765; + productSettingsXML = " + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + + CFBundleGetInfoString + + CFBundleIconFile + + CFBundleIdentifier + + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + + CFBundlePackageType + PKG + CFBundleShortVersionString + + CFBundleSignature + ???? + CFBundleVersion + 0.0.1d1 + + +"; + }; + F513069E032666F8012F4765 = { + explicitFileType = wrapper.cfbundle; + isa = PBXFileReference; + path = "ETL-devel.pkg"; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F513069F03266806012F4765 = { + buildActionMask = 2147483647; + dstPath = "pkg-tmp"; + dstSubfolderSpec = 16; + files = ( + F51306A1032668E7012F4765, + ); + isa = PBXCopyFilesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F51306A00326682D012F4765 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXShellScriptBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ". config/build.cfg\n\nset -x\n\n# clean up the framework, remove extra files\nrm -rf build/pkg-tmp/ETL.framework/Resources/pbdevelopment.plist\n\n# remove the .DS_Store file to keep tool from crapping out\nrm -rf pkg-support/devel-resources/.DS_Store\n\nsed \"\ns:@_VERSION_@:$VERSION:;\ns:@_PACKAGE_@:$PACKAGE:;\ns:@_RELEASE_@:$RELEASE:;\ns:@_PACKAGE_NAME_@:$PACKAGE_NAME:;\n\" < config/pkg-support/ETL-devel.info > build/ETL-devel.info\n\n# create the .pkg\npackage build/pkg-tmp build/ETL-devel.info -d build \n\n# remove temporary files\nrm -rf build/pkg-tmp build/ETL-devel.info\n\n# compress\n(cd build; sleep 1; tar -zcvf ETL-devel.pkg.tar.gz ETL-devel.pkg)"; + }; + F51306A1032668E7012F4765 = { + fileRef = F588A3BD02F0CCE501000102; + isa = PBXBuildFile; + settings = { + }; + }; + F51306A2032668FA012F4765 = { + fileRef = F51305C40325EFB8012F4765; + isa = PBXBuildFile; + settings = { + }; + }; + F51306A6032668FF012F4765 = { + fileRef = F513067A03266039012F4765; + isa = PBXBuildFile; + settings = { + }; + }; + F51306B303266DAC012F4765 = { + isa = PBXTargetDependency; + target = F588A3BC02F0CCE501000102; + targetProxy = A6E2EAD007656757002AF736; + }; + F51306D203266E6A012F4765 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXShellScriptBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = ". config/build.cfg\n\nDIR=build/ETL-devel.pkg/Contents/Resources\n\nsed \"\ns:@_VERSION_@:$VERSION:;\ns:@_PACKAGE_@:$PACKAGE:;\ns:@_RELEASE_@:$RELEASE:;\ns:@_PACKAGE_NAME_@:$PACKAGE_NAME:;\n\" < $DIR/install.sh > $DIR/ETL-devel.post_install\ncp $DIR/ETL-devel.post_install $DIR/ETL-devel.post_upgrade\n\nrm $DIR/install.sh\n\n# add execute flag to scripts\nchmod 755 $DIR/ETL-devel.post_install $DIR/ETL-devel.post_upgrade\n"; + }; + F51307D2032699F1012F4765 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _stringf.h; + path = ETL/_stringf.h; + refType = 4; + sourceTree = ""; + }; + F51307D3032699F1012F4765 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = stringf; + path = ETL/stringf; + refType = 4; + sourceTree = ""; + }; + F51307D4032699F1012F4765 = { + fileRef = F51307D2032699F1012F4765; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + Private, + ); + }; + }; + F51307D603269AA2012F4765 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = stringf.cpp; + path = test/stringf.cpp; + refType = 4; + sourceTree = ""; + }; + F51307D803269B0F012F4765 = { + buildPhases = ( + F51307DA03269B0F012F4765, + F51307DB03269B0F012F4765, + F51307DD03269B0F012F4765, + F51307DF03269B0F012F4765, + ); + buildSettings = { + HEADER_SEARCH_PATHS = "ETL.pbproj include"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "Stringf Test"; + REZ_EXECUTABLE = YES; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + }; + dependencies = ( + F51307D903269B0F012F4765, + ); + isa = PBXToolTarget; + name = "Stringf Test"; + productInstallPath = /usr/local/bin; + productName = "Handle Test"; + productReference = F51307E003269B0F012F4765; + }; + F51307D903269B0F012F4765 = { + isa = PBXTargetDependency; + target = F588A3BC02F0CCE501000102; + targetProxy = A6E2EAD107656757002AF736; + }; + F51307DA03269B0F012F4765 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F51307DB03269B0F012F4765 = { + buildActionMask = 2147483647; + files = ( + F51307E503269DBE012F4765, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F51307DD03269B0F012F4765 = { + buildActionMask = 2147483647; + files = ( + F51307DE03269B0F012F4765, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F51307DE03269B0F012F4765 = { + fileRef = F588A3BD02F0CCE501000102; + isa = PBXBuildFile; + settings = { + }; + }; + F51307DF03269B0F012F4765 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F51307E003269B0F012F4765 = { + explicitFileType = "compiled.mach-o.executable"; + isa = PBXFileReference; + path = "Stringf Test"; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F51307E203269B1E012F4765 = { + isa = PBXTargetDependency; + target = F51307D803269B0F012F4765; + targetProxy = A6E2EAC107656757002AF736; + }; + F51307E403269DA6012F4765 = { + fileRef = F51307D3032699F1012F4765; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F51307E503269DBE012F4765 = { + fileRef = F51307D603269AA2012F4765; + isa = PBXBuildFile; + settings = { + }; + }; + F51307F90326A75C012F4765 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = ETL.m4; + path = config/ETL.m4; + refType = 4; + sourceTree = ""; + }; + F51307FA0326A75C012F4765 = { + fileRef = F51307F90326A75C012F4765; + isa = PBXBuildFile; + settings = { + }; + }; + F519539B0332717E01A80006 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXShellScriptBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/bash; + shellScript = ". config/build.cfg\nset -x\nexport FRAMEWORK_VERSION=$VERSION\n"; + }; + F51F41DF02FF6A8F010001CC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _condition.h; + path = ETL/_condition.h; + refType = 4; + sourceTree = ""; + }; + F51F41E002FF6A8F010001CC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _mutex_pthreads.h; + path = ETL/_mutex_pthreads.h; + refType = 4; + sourceTree = ""; + }; + F51F41E102FF6A8F010001CC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _mutex_win32.h; + path = ETL/_mutex_win32.h; + refType = 4; + sourceTree = ""; + }; + F51F41E202FF6A8F010001CC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _rwlock.h; + path = ETL/_rwlock.h; + refType = 4; + sourceTree = ""; + }; + F51F41E302FF6A8F010001CC = { + fileRef = F51F41DF02FF6A8F010001CC; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F51F41E402FF6A8F010001CC = { + fileRef = F51F41E002FF6A8F010001CC; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F51F41E502FF6A8F010001CC = { + fileRef = F51F41E102FF6A8F010001CC; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F51F41E602FF6A8F010001CC = { + fileRef = F51F41E202FF6A8F010001CC; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F51F41E702FF71F6010001CC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _surface.h; + path = ETL/_surface.h; + refType = 4; + sourceTree = ""; + }; + F51F41E802FF71F6010001CC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = surface; + path = ETL/surface; + refType = 4; + sourceTree = ""; + }; + F51F41E902FF71F6010001CC = { + fileRef = F51F41E702FF71F6010001CC; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F51F41EA02FF71F6010001CC = { + fileRef = F51F41E802FF71F6010001CC; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F51F41EB02FFBD64010001CC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _bit_rotate.h; + path = ETL/_bit_rotate.h; + refType = 4; + sourceTree = ""; + }; + F51F41EC02FFBD64010001CC = { + fileRef = F51F41EB02FFBD64010001CC; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F54A063F030DA3DD01CC8267 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _fastangle_tables.h; + path = ETL/_fastangle_tables.h; + refType = 4; + sourceTree = ""; + }; + F54A0640030DA3DD01CC8267 = { + fileRef = F54A063F030DA3DD01CC8267; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F54A06CF030DE8A501CC8267 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = fastangle; + path = ETL/fastangle; + refType = 4; + sourceTree = ""; + }; + F54A06D0030DE8A501CC8267 = { + fileRef = F54A06CF030DE8A501CC8267; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F54A06D5030E4BCE01CC8267 = { + buildSettings = { + COPY_PHASE_STRIP = YES; + DEBUGGING_SYMBOLS = NO; + OPTIMIZATION_CFLAGS = "-O1"; + PROFILING_CODE = NO; + }; + isa = PBXBuildStyle; + name = "Slight Optimization"; + }; + F54AEAE202F6374901000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _clock_base.h; + path = ETL/_clock_base.h; + refType = 4; + sourceTree = ""; + }; + F54AEAE302F6374901000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = clock; + path = ETL/clock; + refType = 4; + sourceTree = ""; + }; + F54AEAE402F6374901000102 = { + fileRef = F54AEAE202F6374901000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F54AEAE502F6374901000102 = { + fileRef = F54AEAE302F6374901000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F54AEB2702F6785101000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _clock_system.h; + path = ETL/_clock_system.h; + refType = 4; + sourceTree = ""; + }; + F54AEB2802F6785101000102 = { + fileRef = F54AEB2702F6785101000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F54AEB2902F6793801000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _clock_gettimeofday.h; + path = ETL/_clock_gettimeofday.h; + refType = 4; + sourceTree = ""; + }; + F54AEB2A02F6793801000102 = { + fileRef = F54AEB2902F6793801000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F54AEB2B02F6899D01000102 = { + buildPhases = ( + F54AEB2C02F6899D01000102, + F54AEB2D02F6899D01000102, + F54AEB2F02F6899D01000102, + F54AEB3102F6899D01000102, + ); + buildSettings = { + HEADER_SEARCH_PATHS = ETL.pbproj; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "Clock Test"; + REZ_EXECUTABLE = YES; + SECTORDER_FLAGS = ""; + USE_GCC3_PFE_SUPPORT = YES; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + }; + dependencies = ( + F54AEB3402F689A901000102, + ); + isa = PBXToolTarget; + name = "Clock Test"; + productInstallPath = /usr/local/bin; + productName = "Handle Test"; + productReference = F54AEB3202F6899D01000102; + }; + F54AEB2C02F6899D01000102 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F54AEB2D02F6899D01000102 = { + buildActionMask = 2147483647; + files = ( + F54AEB3702F689C801000102, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F54AEB2F02F6899D01000102 = { + buildActionMask = 2147483647; + files = ( + F54AEB3002F6899D01000102, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F54AEB3002F6899D01000102 = { + fileRef = F588A3BD02F0CCE501000102; + isa = PBXBuildFile; + settings = { + }; + }; + F54AEB3102F6899D01000102 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F54AEB3202F6899D01000102 = { + explicitFileType = "compiled.mach-o.executable"; + isa = PBXFileReference; + path = "Clock Test"; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F54AEB3402F689A901000102 = { + isa = PBXTargetDependency; + target = F588A3BC02F0CCE501000102; + targetProxy = A6E2EACF07656757002AF736; + }; + F54AEB3502F689AD01000102 = { + isa = PBXTargetDependency; + target = F54AEB2B02F6899D01000102; + targetProxy = A6E2EAC807656757002AF736; + }; + F54AEB3602F689C801000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = clock.cpp; + path = test/clock.cpp; + refType = 4; + sourceTree = ""; + }; + F54AEB3702F689C801000102 = { + fileRef = F54AEB3602F689C801000102; + isa = PBXBuildFile; + settings = { + }; + }; + F54AEB3802F68F8D01000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _fastangle.h; + path = ETL/_fastangle.h; + refType = 4; + sourceTree = ""; + }; + F54AEB3902F68F8D01000102 = { + fileRef = F54AEB3802F68F8D01000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F550016102F0983D01000102 = { + children = ( + F51305C10325EF93012F4765, + F550017202F0ABE401000102, + F550017302F0ABFA01000102, + F588A3BE02F0CCE501000102, + F550016802F0987601000102, + F550016A02F0987601000102, + F550016B02F0987601000102, + F550016C02F0987601000102, + F550016E02F09B9701000102, + F550017102F0A69401000102, + F588A3B502F0C38001000102, + F513067A03266039012F4765, + F51307F90326A75C012F4765, + ); + isa = PBXGroup; + refType = 4; + sourceTree = ""; + }; + F550016302F0983D01000102 = { + buildSettings = { + COPY_PHASE_STRIP = NO; + DEBUGGING_SYMBOLS = YES; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + OPTIMIZATION_CFLAGS = "-O0"; + PROFILING_CODE = YES; + ZERO_LINK = YES; + }; + isa = PBXBuildStyle; + name = Development; + }; + F550016402F0983D01000102 = { + buildSettings = { + COPY_PHASE_STRIP = YES; + DEBUGGING_SYMBOLS = NO; + OPTIMIZATION_CFLAGS = "-O3 -ffast-math"; + PROFILING_CODE = NO; + }; + isa = PBXBuildStyle; + name = "Deployment (GCC3)"; + }; + F550016502F0983D01000102 = { + buildSettings = { + }; + buildStyles = ( + F550016302F0983D01000102, + F504527502F391C901000102, + F550016402F0983D01000102, + F54A06D5030E4BCE01CC8267, + ); + hasScannedForEncodings = 1; + isa = PBXProject; + mainGroup = F550016102F0983D01000102; + productRefGroup = F588A3BE02F0CCE501000102; + projectDirPath = ""; + targets = ( + F588A3BC02F0CCE501000102, + F5060A4802F37BDD01000102, + F5060A3602F37B5E01000102, + F5060A3C02F37BAC01000102, + F5060A5102F37D8201000102, + F5060A5A02F37D8501000102, + F5060A6702F37DEF01000102, + F54AEB2B02F6899D01000102, + F576CB6D031841EA01A80006, + F5CAA1FE031AD533012F434D, + F513069D032666F8012F4765, + F51307D803269B0F012F4765, + F58D9F85037F146301A80006, + F58D9F8F037F14FE01A80006, + ); + }; + F550016A02F0987601000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + path = INSTALL; + refType = 4; + sourceTree = ""; + }; + F550016B02F0987601000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + path = Makefile.am; + refType = 4; + sourceTree = ""; + }; + F550016C02F0987601000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + path = README; + refType = 4; + sourceTree = ""; + }; + F550016E02F09B9701000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = build.cfg; + path = config/build.cfg; + refType = 4; + sourceTree = ""; + }; + F550017102F0A69401000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = project.spec.in; + path = config/project.spec.in; + refType = 4; + sourceTree = ""; + }; + F550017202F0ABE401000102 = { + children = ( + F5CAA30A031AF0E1012F434D, + F550017402F0AC5701000102, + F55001B702F0B61101000102, + F5060A0302F3337A01000102, + F54A063F030DA3DD01CC8267, + F5060A1C02F342A901000102, + A6E2EADC076567C1002AF736, + A6E2EADD076567C1002AF736, + A6E2EADE076567C1002AF736, + A6E2EADF076567C1002AF736, + F54AEB3802F68F8D01000102, + F5060A1D02F342A901000102, + F5060A1E02F342A901000102, + F5060A1F02F342A901000102, + F5060A2102F342A901000102, + F5060A2202F342A901000102, + F5060A2302F342A901000102, + F51F41EB02FFBD64010001CC, + F5060A2E02F379BC01000102, + F54AEAE202F6374901000102, + F54AEB2702F6785101000102, + F54AEB2902F6793801000102, + F5CAA1EF031AB630012F434D, + F51F41E002FF6A8F010001CC, + F51F41E102FF6A8F010001CC, + F5CAA1F2031AB74F012F434D, + F51F41DF02FF6A8F010001CC, + F51F41E202FF6A8F010001CC, + F51F41E702FF71F6010001CC, + F579DD9A0315B65001682FCB, + F579DD9E0315C9F001682FCB, + F5CAA1F4031AB947012F434D, + F5CAA1F9031AD342012F434D, + F51307D2032699F1012F4765, + F50AFD3D0370620B01A80006, + F50AFD3E0370620B01A80006, + F50AFD490373BEC801A80006, + F58D9F76037F141A01A80006, + F58D9F77037F141A01A80006, + F58D9F78037F141A01A80006, + F5D51DF00399C74801A80006, + A64F6D24052A9DCC00140006, + A63F3B3E054DA00200140006, + A64F6D25052A9DCC00140006, + F5D51DF10399C74801A80006, + F5060A2402F342A901000102, + F588A3D202F0CDCC01000102, + F588A3D302F0CDCC01000102, + F5060A0502F3366801000102, + F5060A0602F3366801000102, + F5060A2F02F379BC01000102, + F54AEAE302F6374901000102, + F51F41E802FF71F6010001CC, + F54A06CF030DE8A501CC8267, + F579DD9B0315B65001682FCB, + F5CAA1ED031AB61C012F434D, + F5CAA1F5031AB947012F434D, + F5CAA1FB031AD4E7012F434D, + F51307D3032699F1012F4765, + F5EDFAE8032D514001A80082, + F50AFD3F0370620B01A80006, + F50AFD4A0373BEC801A80006, + F58D9F79037F141A01A80006, + F58D9F7A037F141A01A80006, + F58D9F7B037F141A01A80006, + A63F3B3F054DA00200140006, + ); + isa = PBXGroup; + name = "ETL Source"; + refType = 4; + sourceTree = ""; + }; + F550017302F0ABFA01000102 = { + children = ( + F550017502F0AC6D01000102, + F588A3D602F0CF9101000102, + F5627F1902F0D1F801000102, + F5060A4B02F37D3301000102, + F5060A4C02F37D3301000102, + F5060A4D02F37D3301000102, + F54AEB3602F689C801000102, + F576CB6B0318419101A80006, + F5CAA208031AD56B012F434D, + F51307D603269AA2012F4765, + F58D9F98037F154401A80006, + ); + isa = PBXGroup; + name = "Test Sources"; + path = ""; + refType = 4; + sourceTree = ""; + }; + F550017402F0AC5701000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = Makefile.am; + path = ETL/Makefile.am; + refType = 4; + sourceTree = ""; + }; + F550017502F0AC6D01000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = Makefile.am; + path = test/Makefile.am; + refType = 4; + sourceTree = ""; + }; + F55001B702F0B61101000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = etl_config.h; + path = ETL/etl_config.h; + refType = 4; + sourceTree = ""; + }; + F5627F1902F0D1F801000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = angle.cpp; + path = test/angle.cpp; + refType = 4; + sourceTree = ""; + }; + F576CB6B0318419101A80006 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = hermite.cpp; + path = test/hermite.cpp; + refType = 4; + sourceTree = ""; + }; + F576CB6D031841EA01A80006 = { + buildPhases = ( + F576CB6F031841EA01A80006, + F576CB70031841EA01A80006, + F576CB72031841EA01A80006, + F576CB74031841EA01A80006, + ); + buildSettings = { + HEADER_SEARCH_PATHS = "ETL.pbproj include"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "Hermite Test"; + REZ_EXECUTABLE = YES; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + }; + dependencies = ( + F576CB6E031841EA01A80006, + ); + isa = PBXToolTarget; + name = "Hermite Test"; + productInstallPath = /usr/local/bin; + productName = "Handle Test"; + productReference = F576CB75031841EA01A80006; + }; + F576CB6E031841EA01A80006 = { + isa = PBXTargetDependency; + target = F588A3BC02F0CCE501000102; + targetProxy = A6E2EACC07656757002AF736; + }; + F576CB6F031841EA01A80006 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F576CB70031841EA01A80006 = { + buildActionMask = 2147483647; + files = ( + F576CB780318421D01A80006, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F576CB72031841EA01A80006 = { + buildActionMask = 2147483647; + files = ( + F576CB73031841EA01A80006, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F576CB73031841EA01A80006 = { + fileRef = F588A3BD02F0CCE501000102; + isa = PBXBuildFile; + settings = { + }; + }; + F576CB74031841EA01A80006 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F576CB75031841EA01A80006 = { + explicitFileType = "compiled.mach-o.executable"; + isa = PBXFileReference; + path = "Hermite Test"; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F576CB780318421D01A80006 = { + fileRef = F576CB6B0318419101A80006; + isa = PBXBuildFile; + settings = { + }; + }; + F579DD9A0315B65001682FCB = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _hermite.h; + path = ETL/_hermite.h; + refType = 4; + sourceTree = ""; + }; + F579DD9B0315B65001682FCB = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = hermite; + path = ETL/hermite; + refType = 4; + sourceTree = ""; + }; + F579DD9C0315B65001682FCB = { + fileRef = F579DD9A0315B65001682FCB; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F579DD9D0315B65001682FCB = { + fileRef = F579DD9B0315B65001682FCB; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F579DD9E0315C9F001682FCB = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _curve_func.h; + path = ETL/_curve_func.h; + refType = 4; + sourceTree = ""; + }; + F579DD9F0315C9F001682FCB = { + fileRef = F579DD9E0315C9F001682FCB; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F588A3B502F0C38001000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = configure.ac; + path = config/configure.ac; + refType = 4; + sourceTree = ""; + }; + F588A3B702F0CCE501000102 = { + buildActionMask = 2147483647; + files = ( + F588A3D402F0CDCC01000102, + F5060A0702F3366801000102, + F5060A0802F3366801000102, + F588A3D502F0CDCC01000102, + F5060A2D02F342A901000102, + F5060A3102F379BC01000102, + F54AEAE502F6374901000102, + F51F41EA02FF71F6010001CC, + F54A06D0030DE8A501CC8267, + F579DD9D0315B65001682FCB, + F5CAA1F1031AB64F012F434D, + F5CAA1F8031AB957012F434D, + F5CAA1FD031AD509012F434D, + F51307E403269DA6012F4765, + F5EDFAEA032D516D01A80082, + F50AFD420370620B01A80006, + F50AFD4D0373BEE001A80006, + F58D9F82037F144701A80006, + F58D9F83037F144901A80006, + F58D9F84037F144C01A80006, + F5D51DF40399C7C201A80006, + A64F6D28052A9DFF00140006, + A63F3B42054DA02500140006, + F588A3C502F0CCF701000102, + F5060A0402F3337A01000102, + F5060A2502F342A901000102, + F5060A2602F342A901000102, + F5060A2702F342A901000102, + F5060A2802F342A901000102, + F5060A2A02F342A901000102, + F5060A2B02F342A901000102, + F5060A2C02F342A901000102, + F5060A3002F379BC01000102, + F54AEAE402F6374901000102, + F54AEB2802F6785101000102, + F54AEB2A02F6793801000102, + F54AEB3902F68F8D01000102, + F51F41E302FF6A8F010001CC, + F51F41E402FF6A8F010001CC, + F51F41E502FF6A8F010001CC, + F51F41E602FF6A8F010001CC, + F51F41E902FF71F6010001CC, + F51F41EC02FFBD64010001CC, + F54A0640030DA3DD01CC8267, + F579DD9C0315B65001682FCB, + F579DD9F0315C9F001682FCB, + F5CAA1F0031AB630012F434D, + F5CAA1F3031AB74F012F434D, + F5CAA1F6031AB947012F434D, + F5CAA1FA031AD342012F434D, + F51307D4032699F1012F4765, + F50AFD400370620B01A80006, + F50AFD410370620B01A80006, + F50AFD4B0373BEC801A80006, + F58D9F7C037F141A01A80006, + F58D9F7D037F141A01A80006, + F58D9F7E037F141A01A80006, + F5D51DF20399C74801A80006, + A64F6D26052A9DCC00140006, + A63F3B40054DA00200140006, + A6E2EAE0076567C1002AF736, + A6E2EAE1076567C1002AF736, + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F588A3B802F0CCE501000102 = { + buildActionMask = 2147483647; + files = ( + F51307FA0326A75C012F4765, + F5D988CE03325BFC01A80006, + F5D988CF03325BFC01A80006, + F5D988D003325BFC01A80006, + A6E2EAE2076567C1002AF736, + A6E2EAE3076567C1002AF736, + ); + isa = PBXResourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F588A3B902F0CCE501000102 = { + buildActionMask = 2147483647; + files = ( + F5CAA30B031AF0E1012F434D, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F588A3BA02F0CCE501000102 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F588A3BB02F0CCE501000102 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F588A3BC02F0CCE501000102 = { + buildPhases = ( + F519539B0332717E01A80006, + F588A3B702F0CCE501000102, + F588A3B802F0CCE501000102, + F588A3B902F0CCE501000102, + F588A3BA02F0CCE501000102, + F588A3BB02F0CCE501000102, + ); + buildSettings = { + DEBUGGING_SYMBOLS = NO; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_VERSION = A; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOL_FLAGS = "-static"; + OTHER_REZFLAGS = ""; + PRINCIPAL_CLASS = ""; + PRODUCT_NAME = ETL; + SECTORDER_FLAGS = ""; + USE_GCC3_PFE_SUPPORT = YES; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + WRAPPER_EXTENSION = framework; + }; + dependencies = ( + ); + isa = PBXFrameworkTarget; + name = "ETL Framework"; + productInstallPath = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + productName = ETL; + productReference = F588A3BD02F0CCE501000102; + productSettingsXML = " + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + + CFBundleGetInfoString + + CFBundleIconFile + + CFBundleIdentifier + + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + + CFBundlePackageType + FMWK + CFBundleShortVersionString + + CFBundleSignature + ???? + CFBundleVersion + 0.0.1d1 + + +"; + }; + F588A3BD02F0CCE501000102 = { + explicitFileType = wrapper.framework; + isa = PBXFileReference; + path = ETL.framework; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F588A3BE02F0CCE501000102 = { + children = ( + F513069E032666F8012F4765, + F588A3BD02F0CCE501000102, + F5060A3702F37B5E01000102, + F5060A4302F37BAC01000102, + F5060A5802F37D8201000102, + F5060A6102F37D8501000102, + F5060A6E02F37DEF01000102, + F54AEB3202F6899D01000102, + F576CB75031841EA01A80006, + F5CAA206031AD533012F434D, + F51307E003269B0F012F4765, + F58D9F8D037F146301A80006, + F58D9F96037F14FE01A80006, + ); + isa = PBXGroup; + name = Products; + path = ""; + refType = 4; + sourceTree = ""; + }; + F588A3C502F0CCF701000102 = { + fileRef = F55001B702F0B61101000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F588A3D202F0CDCC01000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = angle; + path = ETL/angle; + refType = 4; + sourceTree = ""; + }; + F588A3D302F0CDCC01000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = handle; + path = ETL/handle; + refType = 4; + sourceTree = ""; + }; + F588A3D402F0CDCC01000102 = { + fileRef = F588A3D202F0CDCC01000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F588A3D502F0CDCC01000102 = { + fileRef = F588A3D302F0CDCC01000102; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F588A3D602F0CF9101000102 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = handle.cpp; + path = test/handle.cpp; + refType = 4; + sourceTree = ""; + }; + F58D9F76037F141A01A80006 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _boxblur.h; + path = ETL/_boxblur.h; + refType = 4; + sourceTree = ""; + }; + F58D9F77037F141A01A80006 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _gaussian.h; + path = ETL/_gaussian.h; + refType = 4; + sourceTree = ""; + }; + F58D9F78037F141A01A80006 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _pen.h; + path = ETL/_pen.h; + refType = 4; + sourceTree = ""; + }; + F58D9F79037F141A01A80006 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = boxblur; + path = ETL/boxblur; + refType = 4; + sourceTree = ""; + }; + F58D9F7A037F141A01A80006 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = gaussian; + path = ETL/gaussian; + refType = 4; + sourceTree = ""; + }; + F58D9F7B037F141A01A80006 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = pen; + path = ETL/pen; + refType = 4; + sourceTree = ""; + }; + F58D9F7C037F141A01A80006 = { + fileRef = F58D9F76037F141A01A80006; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + Private, + ); + }; + }; + F58D9F7D037F141A01A80006 = { + fileRef = F58D9F77037F141A01A80006; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + Private, + ); + }; + }; + F58D9F7E037F141A01A80006 = { + fileRef = F58D9F78037F141A01A80006; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + Private, + ); + }; + }; + F58D9F82037F144701A80006 = { + fileRef = F58D9F79037F141A01A80006; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F58D9F83037F144901A80006 = { + fileRef = F58D9F7A037F141A01A80006; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F58D9F84037F144C01A80006 = { + fileRef = F58D9F7B037F141A01A80006; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F58D9F85037F146301A80006 = { + buildPhases = ( + F58D9F87037F146301A80006, + F58D9F88037F146301A80006, + F58D9F8A037F146301A80006, + F58D9F8C037F146301A80006, + ); + buildSettings = { + HEADER_SEARCH_PATHS = "ETL.pbproj include"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "Pen Test"; + REZ_EXECUTABLE = YES; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + }; + dependencies = ( + F58D9F86037F146301A80006, + ); + isa = PBXToolTarget; + name = "Pen Test"; + productInstallPath = /usr/local/bin; + productName = "Handle Test"; + productReference = F58D9F8D037F146301A80006; + }; + F58D9F86037F146301A80006 = { + isa = PBXTargetDependency; + target = F588A3BC02F0CCE501000102; + targetProxy = A6E2EACE07656757002AF736; + }; + F58D9F87037F146301A80006 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F58D9F88037F146301A80006 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F58D9F8A037F146301A80006 = { + buildActionMask = 2147483647; + files = ( + F58D9F8B037F146301A80006, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F58D9F8B037F146301A80006 = { + fileRef = F588A3BD02F0CCE501000102; + isa = PBXBuildFile; + settings = { + }; + }; + F58D9F8C037F146301A80006 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F58D9F8D037F146301A80006 = { + explicitFileType = "compiled.mach-o.executable"; + isa = PBXFileReference; + path = "Pen Test"; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F58D9F8F037F14FE01A80006 = { + buildPhases = ( + F58D9F91037F14FE01A80006, + F58D9F92037F14FE01A80006, + F58D9F93037F14FE01A80006, + F58D9F95037F14FE01A80006, + ); + buildSettings = { + HEADER_SEARCH_PATHS = "ETL.pbproj include"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "Surface Test"; + REZ_EXECUTABLE = YES; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + }; + dependencies = ( + F58D9F90037F14FE01A80006, + ); + isa = PBXToolTarget; + name = "Surface Test"; + productInstallPath = /usr/local/bin; + productName = "Handle Test"; + productReference = F58D9F96037F14FE01A80006; + }; + F58D9F90037F14FE01A80006 = { + isa = PBXTargetDependency; + target = F588A3BC02F0CCE501000102; + targetProxy = A6E2EAD207656757002AF736; + }; + F58D9F91037F14FE01A80006 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F58D9F92037F14FE01A80006 = { + buildActionMask = 2147483647; + files = ( + F58D9F9A037F154D01A80006, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F58D9F93037F14FE01A80006 = { + buildActionMask = 2147483647; + files = ( + F58D9F94037F14FE01A80006, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F58D9F94037F14FE01A80006 = { + fileRef = F588A3BD02F0CCE501000102; + isa = PBXBuildFile; + settings = { + }; + }; + F58D9F95037F14FE01A80006 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F58D9F96037F14FE01A80006 = { + explicitFileType = "compiled.mach-o.executable"; + isa = PBXFileReference; + path = "Surface Test"; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F58D9F98037F154401A80006 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = surface.cpp; + path = test/surface.cpp; + refType = 4; + sourceTree = ""; + }; + F58D9F9A037F154D01A80006 = { + fileRef = F58D9F98037F154401A80006; + isa = PBXBuildFile; + settings = { + }; + }; + F5C1EE4903BCE00701A80006 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXShellScriptBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "rm -fr ETL-devel.pkg"; + }; + F5CAA1ED031AB61C012F434D = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = smach; + path = ETL/smach; + refType = 4; + sourceTree = ""; + }; + F5CAA1EF031AB630012F434D = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _clock_win32hpcount.h; + path = ETL/_clock_win32hpcount.h; + refType = 4; + sourceTree = ""; + }; + F5CAA1F0031AB630012F434D = { + fileRef = F5CAA1EF031AB630012F434D; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F5CAA1F1031AB64F012F434D = { + fileRef = F5CAA1ED031AB61C012F434D; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F5CAA1F2031AB74F012F434D = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _mutex_null.h; + path = ETL/_mutex_null.h; + refType = 4; + sourceTree = ""; + }; + F5CAA1F3031AB74F012F434D = { + fileRef = F5CAA1F2031AB74F012F434D; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F5CAA1F4031AB947012F434D = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _calculus.h; + path = ETL/_calculus.h; + refType = 4; + sourceTree = ""; + }; + F5CAA1F5031AB947012F434D = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = calculus; + path = ETL/calculus; + refType = 4; + sourceTree = ""; + }; + F5CAA1F6031AB947012F434D = { + fileRef = F5CAA1F4031AB947012F434D; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F5CAA1F8031AB957012F434D = { + fileRef = F5CAA1F5031AB947012F434D; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F5CAA1F9031AD342012F434D = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _bspline.h; + path = ETL/_bspline.h; + refType = 4; + sourceTree = ""; + }; + F5CAA1FA031AD342012F434D = { + fileRef = F5CAA1F9031AD342012F434D; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Private, + Public, + ); + }; + }; + F5CAA1FB031AD4E7012F434D = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = spline; + path = ETL/spline; + refType = 4; + sourceTree = ""; + }; + F5CAA1FD031AD509012F434D = { + fileRef = F5CAA1FB031AD4E7012F434D; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F5CAA1FE031AD533012F434D = { + buildPhases = ( + F5CAA200031AD533012F434D, + F5CAA201031AD533012F434D, + F5CAA203031AD533012F434D, + F5CAA205031AD533012F434D, + ); + buildSettings = { + HEADER_SEARCH_PATHS = "ETL.pbproj include"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "Spline Test"; + REZ_EXECUTABLE = YES; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + }; + dependencies = ( + F5CAA1FF031AD533012F434D, + ); + isa = PBXToolTarget; + name = "Spline Test"; + productInstallPath = /usr/local/bin; + productName = "Handle Test"; + productReference = F5CAA206031AD533012F434D; + }; + F5CAA1FF031AD533012F434D = { + isa = PBXTargetDependency; + target = F588A3BC02F0CCE501000102; + targetProxy = A6E2EAC007656757002AF736; + }; + F5CAA200031AD533012F434D = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5CAA201031AD533012F434D = { + buildActionMask = 2147483647; + files = ( + F5CAA209031AD56B012F434D, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5CAA203031AD533012F434D = { + buildActionMask = 2147483647; + files = ( + F5CAA204031AD533012F434D, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5CAA204031AD533012F434D = { + fileRef = F588A3BD02F0CCE501000102; + isa = PBXBuildFile; + settings = { + }; + }; + F5CAA205031AD533012F434D = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + F5CAA206031AD533012F434D = { + explicitFileType = "compiled.mach-o.executable"; + isa = PBXFileReference; + path = "Spline Test"; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F5CAA208031AD56B012F434D = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = spline.cpp; + path = test/spline.cpp; + refType = 4; + sourceTree = ""; + }; + F5CAA209031AD56B012F434D = { + fileRef = F5CAA208031AD56B012F434D; + isa = PBXBuildFile; + settings = { + }; + }; + F5CAA305031AEFBC012F434D = { + isa = PBXTargetDependency; + target = F5CAA1FE031AD533012F434D; + targetProxy = A6E2EAC907656757002AF736; + }; + F5CAA306031AEFC1012F434D = { + isa = PBXTargetDependency; + target = F576CB6D031841EA01A80006; + targetProxy = A6E2EAC707656757002AF736; + }; + F5CAA30A031AF0E1012F434D = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.cpp; + name = frameworkfix.cpp; + path = ETL.pbproj/frameworkfix.cpp; + refType = 4; + sourceTree = ""; + }; + F5CAA30B031AF0E1012F434D = { + fileRef = F5CAA30A031AF0E1012F434D; + isa = PBXBuildFile; + settings = { + }; + }; + F5D51DF00399C74801A80006 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = _smart_ptr.h; + path = ETL/_smart_ptr.h; + refType = 4; + sourceTree = ""; + }; + F5D51DF10399C74801A80006 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = smart_ptr; + path = ETL/smart_ptr; + refType = 4; + sourceTree = ""; + }; + F5D51DF20399C74801A80006 = { + fileRef = F5D51DF00399C74801A80006; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + Private, + ); + }; + }; + F5D51DF40399C7C201A80006 = { + fileRef = F5D51DF10399C74801A80006; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + F5D988CB03325BFC01A80006 = { + isa = PBXFileReference; + lastKnownFileType = text.rtf; + path = License.rtf; + refType = 4; + sourceTree = ""; + }; + F5D988CC03325BFC01A80006 = { + isa = PBXFileReference; + lastKnownFileType = text.rtf; + path = ReadMe.rtf; + refType = 4; + sourceTree = ""; + }; + F5D988CD03325BFC01A80006 = { + isa = PBXFileReference; + lastKnownFileType = text.rtf; + path = Welcome.rtf; + refType = 4; + sourceTree = ""; + }; + F5D988CE03325BFC01A80006 = { + fileRef = F5D988CB03325BFC01A80006; + isa = PBXBuildFile; + settings = { + }; + }; + F5D988CF03325BFC01A80006 = { + fileRef = F5D988CC03325BFC01A80006; + isa = PBXBuildFile; + settings = { + }; + }; + F5D988D003325BFC01A80006 = { + fileRef = F5D988CD03325BFC01A80006; + isa = PBXBuildFile; + settings = { + }; + }; + F5D988D403325CD801A80006 = { + fileRef = F5D988CD03325BFC01A80006; + isa = PBXBuildFile; + settings = { + }; + }; + F5D988D503325CDB01A80006 = { + fileRef = F5D988CC03325BFC01A80006; + isa = PBXBuildFile; + settings = { + }; + }; + F5D988D603325CDE01A80006 = { + fileRef = F5D988CB03325BFC01A80006; + isa = PBXBuildFile; + settings = { + }; + }; + F5EDFAE8032D514001A80082 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text; + name = trivial; + path = ETL/trivial; + refType = 4; + sourceTree = ""; + }; + F5EDFAEA032D516D01A80082 = { + fileRef = F5EDFAE8032D514001A80082; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Public, + ); + }; + }; + }; + rootObject = F550016502F0983D01000102; +} diff --git a/ETL/ETL.pc.in b/ETL/ETL.pc.in new file mode 100644 index 0000000..93c32bf --- /dev/null +++ b/ETL/ETL.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: @PACKAGE_TARNAME@ +Description: @PACKAGE_NAME@ +Requires: +Version: @VERSION@ +Libs: @LIBS@ +Cflags: -I${includedir} diff --git a/ETL/ETL.prj b/ETL/ETL.prj new file mode 100644 index 0000000..f7fd779 --- /dev/null +++ b/ETL/ETL.prj @@ -0,0 +1,169 @@ +# Anjuta Version 1.2.0 +Compatibility Level: 1 + + +Extended Template library + + + + + + + + + + + + + + + + + + + +props.file.type=project + +anjuta.version=1.2.0 +anjuta.compatibility.level=1 + +project.name=ETL +project.type=GENERIC +project.target.type=EXECUTABLE +project.version=0.99 +project.author=Robert Quattlebaum +project.source.target=unknown +project.has.gettext=0 +project.gui.command= +project.programming.language=C++ +project.excluded.modules=intl + +project.config.extra.modules.before= +project.config.extra.modules.after= +project.config.blocked=1 +project.config.disable.overwriting=1 1 1 1 1 1 1 1 1 + +project.menu.entry=ETL Version 0.99 +project.menu.group=Application +project.menu.comment=ETL Version 0.99 +project.menu.icon= +project.menu.need.terminal=0 + +project.configure.options= +anjuta.program.arguments= +preferences.build.option.jobs=0 +preferences.build.option.silent=0 +preferences.build.option.autosave=0 +preferences.anjuta.make.options=-k +preferences.make=make +preferences.build.option.keep.going=1 +preferences.build.option.warn.undef=0 +preferences.autoformat.custom.style= -i8 -sc -bli0 -bl0 -cbi0 -ss +preferences.indent.opening=0 +preferences.autoformat.disable=1 +preferences.indent.automatic=1 +preferences.use.tabs=1 +preferences.indent.size=4 +preferences.tabsize=4 +preferences.indent.closing=0 + +module.include.name=. +module.include.type= +module.include.files=\ + ETL/_bit_rotate.h\ + ETL/_bezier.h\ + ETL/_fastangle_tables.h\ + ETL/_boxblur.h\ + ETL/_clock_system.h\ + ETL/_gaussian.h\ + ETL/_rwlock.h\ + ETL/_stringf.h\ + ETL/_status.h\ + ETL/_smart_ptr.h\ + ETL/_thread.h\ + ETL/_curve_func.h\ + ETL/etl_profile_.h\ + ETL/_curve.h\ + ETL/_calculus.h\ + ETL/_trivial.h\ + ETL/etl_profile.h\ + ETL/_pen.h\ + ETL/_misc.h\ + ETL/_mutex_win32.h\ + ETL/_clock_gettimeofday.h\ + ETL/_ref_count.h\ + ETL/_bezier_angle.h\ + ETL/_clock_base.h\ + ETL/_bspline.h\ + ETL/_smach.h\ + ETL/_fixed.h\ + ETL/_condition.h\ + ETL/_mutex_null.h\ + ETL/_surface.h\ + ETL/_fastangle.h\ + ETL/_mutex_pthreads.h\ + ETL/_hermite.h\ + ETL/_handle.h\ + ETL/_random.h\ + ETL/_angle.h\ + ETL/_clock_win32hpcount.h\ + ETL/etl_config.h\ + ETL.pbproj/etl_profile.h + +module.source.name=. +module.source.type= +module.source.files=\ + test/surface.cpp\ + test/random.cpp\ + test/smach.cpp\ + test/smart_ptr.cpp\ + test/benchmark.cpp\ + test/spline.cpp\ + test/handle.cpp\ + test/stringf.cpp\ + test/clock.cpp\ + test/angle.cpp\ + test/hermite.cpp\ + test/fixed.cpp\ + test/pen.cpp\ + ETL.pbproj/frameworkfix.cpp + +module.pixmap.name=. +module.pixmap.type= +module.pixmap.files= + +module.data.name=. +module.data.type= +module.data.files= + +module.help.name=. +module.help.type= +module.help.files= + +module.doc.name=. +module.doc.type= +module.doc.files=\ + README\ + INSTALL\ + ChangeLog + +module.po.files= + +compiler.options.supports= +compiler.options.include.paths=\ + .\ + .. +compiler.options.library.paths= +compiler.options.libraries= +compiler.options.libraries.selected= +compiler.options.defines=\ + HAVE_CONFIG_H +compiler.options.defines.selected= +compiler.options.warning.buttons=0 0 1 1 0 1 0 0 0 0 0 0 0 1 0 0 +compiler.options.optimize.buttons=0 0 1 0 +compiler.options.other.buttons=1 0 +compiler.options.other.c.flags= +compiler.options.other.l.flags= +compiler.options.other.l.libs= + +project.src.paths= diff --git a/ETL/ETL/Makefile.am b/ETL/ETL/Makefile.am new file mode 100644 index 0000000..b08fdcf --- /dev/null +++ b/ETL/ETL/Makefile.am @@ -0,0 +1,86 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +CLEANFILES = \ + $(top_builddir)/ETL/etl_profile.h + + +etldir = $(includedir)/ETL + +etl_HEADERS = \ + value \ + _value.h \ + rect \ + _rect.h \ + misc \ + _misc.h \ + ref_count \ + _ref_count.h \ + angle \ + fastangle \ + handle \ + ipc \ + thread \ + fixed \ + random \ + clock \ + hermite \ + calculus \ + stringf \ + trivial \ + spline \ + _stringf.h \ + _bspline.h \ + _calculus.h \ + _mutex_null.h \ + _hermite.h \ + _curve_func.h \ + _clock_base.h \ + _clock_system.h \ + _clock_gettimeofday.h \ + _random.h \ + _angle.h \ + _fastangle.h \ + _curve.h \ + _handle.h \ + _thread.h \ + _mutex_pthreads.h \ + _mutex_win32.h \ + _condition.h \ + _rwlock.h \ + smach \ + _smach.h \ + _trivial.h \ + _fixed.h \ + etl_config.h \ + $(top_builddir)/ETL/etl_profile.h \ + _fastangle_tables.h \ + bezier \ + _bezier.h \ + _bezier_angle.h \ + _status.h \ + status \ + pen \ + _pen.h \ + boxblur \ + _boxblur.h \ + gaussian \ + _gaussian.h \ + surface \ + _surface.h \ + smart_ptr \ + _smart_ptr.h \ + _clock_win32hpcount.h \ + mutex \ + _mutex_pthreads_simple.h + + +$(top_builddir)/ETL/etl_profile.h:$(top_builddir)/ETL/etl_profile_.h + sed "s/PACKAGE/ETL/g;" < $(top_builddir)/ETL/etl_profile_.h > $(top_builddir)/ETL/etl_profile.h + + +# FIXME: figure out why this is in SVN, but isn't installed +EXTRA_DIST = \ + _bit_rotate.h diff --git a/ETL/ETL/_angle.h b/ETL/ETL/_angle.h new file mode 100644 index 0000000..2ea3720 --- /dev/null +++ b/ETL/ETL/_angle.h @@ -0,0 +1,516 @@ +/* ======================================================================== +** Extended Template and Library +** Angle Abstraction Class Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__ANGLE_H +#define __ETL__ANGLE_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +#ifndef PI +# define PI (3.1415926535897932384626433832795029L) +# define HALF_PI (PI/2) +#endif + +#define ANGLE_EPSILON (1.0e-6) + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +// ======================================================================== +/*! \class angle _angle.h ETL/angle +** \brief Abstraction of the concept of an angle +** \see angle::deg, angle::rad, angle::rot, angle::sin, angle::cos, angle::tan, fastangle +** \writeme +*/ +class angle +{ +public: + typedef float value_type; + +protected: + typedef value_type unit; + + unit v; //! Stored in radians; positive values indicate counter-clockwise. + +public: + + /* + ** Arithmetic Operators + */ + + const angle & + operator+=(const angle &rhs) + { v+=rhs.v; return *this; } + + const angle & + operator-=(const angle &rhs) + { v-=rhs.v; return *this; } + + const angle & + operator*=(const unit &rhs) + { v*=rhs; return *this; } + + const angle & + operator/=(const unit &rhs) + { v/=rhs; return *this; } + + //! Angle Addition Operator + angle + operator+(const angle &rhs)const + { return angle(*this)+=rhs; } + + //! Angle Subtraction Operator + /*! \sa angle dist(const angle &) */ + angle + operator-(const angle &rhs)const + { return angle(*this)-=rhs; } + + //! Angle Scalar Multiplication Operator + /*! This operator will multiply the given + angle by the given scalar value. */ + angle + operator*(const unit &rhs)const + { return angle(*this)*=rhs; } + + angle + operator/(const unit &rhs)const + { return angle(*this)/=rhs; } + + //! Angle Negation + angle + operator-()const + { + angle ret; + ret.v=-v; + return ret; + } + +#ifdef ETL_NOT_USED + //! 180 degree rotation operator + /*! Returns the angle directly opposite of + the given angle, and will yield a result + between 0 and 2PI */ + angle + operator~()const + { + angle ret; + ret.v = v+PI; + return ret.mod(); + } +#endif // ETL_NOT_USED + +#ifdef ETL_WRAP_ANGLES + /*! Returns true if the shortest + angle from the left-hand to the + right-hand side is counter-clockwise */ + bool + operator<(const angle &rhs)const + { return dist(rhs).v<(value_type)0.0; } + + /*! Returns true if the shortest + angle from the left-hand to the + right-hand side is clockwise */ + bool + operator>(const angle &rhs)const + { return dist(rhs).v>(value_type)0.0; } + + /*! Returns true if the shortest + angle from the left-hand to the + right-hand side is counter-clockwise, + or if the angles are refer to the same + point on the unit circle. */ + bool + operator<=(const angle &rhs)const + { return dist(rhs).v<=(value_type)0.0; } + + /*! Returns true if the shortest + angle from the left-hand to the + right-hand side is clockwise, + or if the angles are refer to the same + point on the unit circle. */ + bool + operator>=(const angle &rhs)const + { return dist(rhs).v>=(value_type)0.0; } + + /*! Returns true if the angles + are refer to the same point + on the unit circle. */ + bool + operator==(const angle &rhs)const + { return std::abs(dist(rhs).v)ANGLE_EPSILON; } +#else // ETL_WRAP_ANGLES + /*! Returns true if the left-hand + side is less than the + right-hand side */ + bool + operator<(const angle &rhs)const + { return v < rhs.v; } + + /*! Returns true if the left-hand + side is greater than the + right-hand side */ + bool + operator>(const angle &rhs)const + { return v > rhs.v; } + + /*! Returns true if the left-hand + side is less or equal to the + right-hand side */ + bool + operator<=(const angle &rhs)const + { return v <= rhs.v; } + + /*! Returns true if the left-hand + side is greater than or equal + to the right-hand side */ + bool + operator>=(const angle &rhs)const + { return v >= rhs.v; } + + /*! Returns true if the angles + are the same, or close */ + bool + operator==(const angle &rhs)const + { return std::abs(v - rhs.v)ANGLE_EPSILON; } +#endif // ETL_WRAP_ANGLES + + //! Absolute Angle Function + /*! This function will return the + absolute value of the angle. */ + angle + abs()const + { + angle ret; + ret.v=std::abs(v); + return ret; + } + +#ifdef ETL_WRAP_ANGLES + //! Angle Difference Function + /*! This function will return the + shortest physical distance between + two angles, from -PI/2 to PI/2 + \sa angle operator-(const angle &) */ + angle + dist(const angle &rhs)const + { + angle ret; + ret.v=v-rhs.v; + ret.v-=rot_floor(ret.v+PI); + return ret; + } + + //! Rotation Modulus + /*! This function will return the + value of the angle between 0 and 2PI */ + angle + mod()const + { + angle ret(*this); + ret.v-=rot_floor(ret.v); + return ret; + } +#else // ETL_WRAP_ANGLES + //! Angle Difference Function + /*! This function will return the + difference between + two angles, just like + \sa angle operator-(const angle &) */ + angle + dist(const angle &rhs)const + { return angle(*this)-=rhs; } + + //! Rotation Modulus + /*! This function will return the + value of the angle */ + angle + mod()const + { + angle ret(*this); + return ret; + } +#endif // ETL_WRAP_ANGLES + + //! Zero Rotation (0 degrees) + static angle + zero() + { + angle ret; + ret.v=0; + return ret; + } + + //! One Complete Rotation (360 degrees) + static angle + one() + { + angle ret; + ret.v=PI*2; + return ret; + } + + //! One Half Rotation (180 degrees) + static angle + half() + { + angle ret; + ret.v=PI; + return ret; + } + + bool operator!()const { return std::abs(mod().v) < ANGLE_EPSILON; } + +private: + +#ifdef ETL_WRAP_ANGLES + static value_type rot_floor(value_type x) + { return static_cast(std::floor(x/(PI*2))*PI*2); } +#endif // ETL_WRAP_ANGLES + +public: + /* + ** Conversion Classes + */ + + class rad; + class deg; + class rot; + + /* + ** Trigonometric Classes + */ + + class sin; + class cos; + class tan; + + /* + ** Friend classes + */ + + friend class rad; + friend class deg; + friend class rot; + friend class sin; + friend class cos; + friend class tan; + + /* + ** Deprecated + */ + +#ifndef ETL_NO_DEPRECATED + typedef rad radians; + typedef deg degrees; + typedef rot rotations; +#endif +}; // END of class angle + +// ======================================================================== +/*! \class angle::rad _angle.h ETL/angle +** \brief Angle representation in radians +** \see angle +** \writeme +*/ +class angle::rad : public angle +{ +public: + explicit rad(const value_type &x) { v=x; } + rad(const angle &a):angle(a) { } + rad mod()const { return angle::mod(); } + rad dist(const angle &rhs)const { return angle::dist(rhs); } + value_type get()const { return v; } +#ifndef ETL_NO_DEPRECATED + // operator value_type()const ETL_DEPRECATED_FUNCTION; +#endif +}; // END of class angle::radians +// inline angle::rad::operator angle::value_type()const { return get(); } + +// ======================================================================== +/*! \class angle::deg _angle.h ETL/angle +** \brief Angle representation in degrees +** \see angle +** \writeme +*/ +class angle::deg : public angle +{ +public: + explicit deg(const value_type &x) { v=x*((PI*2)/360); } + deg(const angle &a):angle(a) { } + deg mod()const { return angle::mod(); } + deg dist(const angle &rhs)const { return angle::dist(rhs); } + value_type get()const { return v*360/(PI*2); } +#ifndef ETL_NO_DEPRECATED + // operator value_type()const ETL_DEPRECATED_FUNCTION; +#endif +}; // END of class angle::degrees +// inline angle::deg::operator angle::value_type()const { return get(); } + +// ======================================================================== +/*! \class angle::rot _angle.h ETL/angle +** \brief Angle representation in rotations +** \see angle +** \writeme +*/ +class angle::rot : public angle +{ +public: + explicit rot(const value_type &x) { v=x*(PI*2); } + rot(const angle &a):angle(a) { } + rot mod()const { return angle::mod(); } + rot dist(const angle &rhs)const { return angle::dist(rhs); } + value_type get()const { return v/(PI*2); } +#ifndef ETL_NO_DEPRECATED + // operator value_type()const ETL_DEPRECATED_FUNCTION; +#endif +}; // END of class angle::rotations +// inline angle::rot::operator angle::value_type()const { return get(); } + +// ======================================================================== +/*! \class angle::sin _angle.h ETL/angle +** \brief Angle representation as a sine function +** \see angle +** \writeme +*/ +class angle::sin : public angle +{ +public: + explicit sin(const value_type &x) { v=static_cast(std::asin(x)); } + sin(const angle &a):angle(a) { } + sin mod()const { return angle::mod(); } + sin dist(const angle &rhs)const { return angle::dist(rhs); } + value_type get()const { return static_cast(std::sin(v)); } +#ifndef ETL_NO_DEPRECATED + // operator value_type()const ETL_DEPRECATED_FUNCTION; +#endif +}; // END of class angle::sin +// inline angle::sin::operator angle::value_type()const { return get(); } + +// ======================================================================== +/*! \class angle::cos _angle.h ETL/angle +** \brief Angle representation as a cosine function +** \see angle +** \writeme +*/ +class angle::cos : public angle +{ +public: + explicit cos(const value_type &x) { v=(value_type)(std::acos(x)); } + cos(const angle &a):angle(a) { } + cos mod()const { return angle::mod(); } + cos dist(const angle &rhs)const { return angle::dist(rhs); } + value_type get()const { return (value_type)std::cos(v); } +#ifndef ETL_NO_DEPRECATED + // operator value_type()const ETL_DEPRECATED_FUNCTION; +#endif +}; // END of class angle::cos +// inline angle::cos::operator angle::value_type()const { return get(); } + +// ======================================================================== +/*! \class angle::tan _angle.h ETL/angle +** \brief Angle representation as a tangent function +** \see angle +** \writeme +*/ +class angle::tan : public angle +{ +public: + explicit tan(const value_type &x) { v=(value_type)(std::atan(x)); } + tan(const value_type &y,const value_type &x) { v=(value_type)(std::atan2(y,x)); } + tan(const angle &a):angle(a) { } + tan mod()const { return angle::mod(); } + tan dist(const angle &rhs)const { return angle::dist(rhs); } + value_type get()const { return (value_type)std::tan(v); } +#ifndef ETL_NO_DEPRECATED + // operator value_type()const ETL_DEPRECATED_FUNCTION; +#endif +}; // END of class angle::tan +// inline angle::tan::operator angle::value_type()const { return get(); } + +_ETL_END_NAMESPACE + +//#include + +template +struct affine_combo +{ + typedef T time_type; + + //affine_combo() { std::cerr<<"affine_combo: I was created!"<: I was DELETED!"< +struct distance_func : public std::binary_function +{ + etl::angle operator()(const etl::angle &a,const etl::angle &b)const + { + etl::angle delta=b.dist(a); + //if(delta // for ldexp +// #include // not used + +/* === M A C R O S ========================================================= */ + +#define MAXDEPTH 64 /* Maximum depth for recursion */ + +/* take binary sign of a, either -1, or 1 if >= 0 */ +#define SGN(a) (((a)<0) ? -1 : 1) + +/* find minimum of a and b */ +#ifndef MIN +#define MIN(a,b) (((a)<(b))?(a):(b)) +#endif + +/* find maximum of a and b */ +#ifndef MAX +#define MAX(a,b) (((a)>(b))?(a):(b)) +#endif + +#define BEZIER_EPSILON (ldexp(1.0,-MAXDEPTH-1)) /*Flatness control value */ +//#define BEZIER_EPSILON 0.00005 /*Flatness control value */ +#define DEGREE 3 /* Cubic Bezier curve */ +#define W_DEGREE 5 /* Degree of eqn to find roots of */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +template class bezier; + +//! Cubic Bezier Curve Base Class +// This generic implementation uses the DeCasteljau algorithm. +// Works for just about anything that has an affine combination function +template +class bezier_base : public std::unary_function +{ +public: + typedef V value_type; + typedef T time_type; + +private: + value_type a,b,c,d; + time_type r,s; + +protected: + affine_combo affine_func; + +public: + bezier_base():r(0.0),s(1.0) { } + bezier_base( + const value_type &a, const value_type &b, const value_type &c, const value_type &d, + const time_type &r=0.0, const time_type &s=1.0): + a(a),b(b),c(c),d(d),r(r),s(s) { sync(); } + + void sync() + { + } + + value_type + operator()(time_type t)const + { + t=(t-r)/(s-r); + return + affine_func( + affine_func( + affine_func(a,b,t), + affine_func(b,c,t) + ,t), + affine_func( + affine_func(b,c,t), + affine_func(c,d,t) + ,t) + ,t); + } + + /* + void evaluate(time_type t, value_type &f, value_type &df) const + { + t=(t-r)/(s-r); + + value_type p1 = affine_func( + affine_func(a,b,t), + affine_func(b,c,t) + ,t); + value_type p2 = affine_func( + affine_func(b,c,t), + affine_func(c,d,t) + ,t); + + f = affine_func(p1,p2,t); + df = (p2-p1)*3; + } + */ + + void set_rs(time_type new_r, time_type new_s) { r=new_r; s=new_s; } + void set_r(time_type new_r) { r=new_r; } + void set_s(time_type new_s) { s=new_s; } + const time_type &get_r()const { return r; } + const time_type &get_s()const { return s; } + time_type get_dt()const { return s-r; } + + bool intersect_hull(const bezier_base &x)const + { + return 0; + } + + //! Bezier curve intersection function + /*! Calculates the time of intersection + ** for the calling curve. + ** + ** I still have not figured out a good generic + ** method of doing this for a bi-infinite + ** cubic bezier curve calculated with the DeCasteljau + ** algorithm. + ** + ** One method, although it does not work for the + ** entire bi-infinite curve, is to iteratively + ** intersect the hulls. However, we would only detect + ** intersections that occur between R and S. + ** + ** It is entirely possible that a new construct similar + ** to the affine combination function will be necessary + ** for this to work properly. + ** + ** For now, this function is BROKEN. (although it works + ** for the floating-point specializations, using newton's method) + */ + time_type intersect(const bezier_base &x, time_type near=0.0)const + { + return 0; + } + + /* subdivide at some time t into 2 separate curves left and right + + b0 l1 + * 0+1 l2 + b1 * 1+2*1+2 l3 + * 1+2 * 0+3*1+3*2+3 l4,r1 + b2 * 1+2*2+2 r2 * + * 2+3 r3 * + b3 r4 * + * + + 0.1 2.3 -> 0.1 2 3 4 5.6 + */ +/* void subdivide(bezier_base *left, bezier_base *right, const time_type &time = (time_type)0.5) const + { + time_type t = (time-r)/(s-r); + bezier_base lt,rt; + + value_type temp; + + //1st stage points to keep + lt.a = a; + rt.d = d; + + //2nd stage calc + lt.b = affine_func(a,b,t); + temp = affine_func(b,c,t); + rt.c = affine_func(c,d,t); + + //3rd stage calc + lt.c = affine_func(lt.b,temp,t); + rt.b = affine_func(temp,rt.c,t); + + //last stage calc + lt.d = rt.a = affine_func(lt.c,rt.b,t); + + //set the time range for l,r (the inside values should be 1, 0 respectively) + lt.r = r; + rt.s = s; + + //give back the curves + if(left) *left = lt; + if(right) *right = rt; + } + */ + value_type & + operator[](int i) + { return (&a)[i]; } + + const value_type & + operator[](int i) const + { return (&a)[i]; } +}; + + +#if 1 +// Fast float implementation of a cubic bezier curve +template <> +class bezier_base : public std::unary_function +{ +public: + typedef float value_type; + typedef float time_type; +private: + affine_combo affine_func; + value_type a,b,c,d; + time_type r,s; + + value_type _coeff[4]; + time_type drs; // reciprocal of (s-r) +public: + bezier_base():r(0.0),s(1.0),drs(1.0) { } + bezier_base( + const value_type &a, const value_type &b, const value_type &c, const value_type &d, + const time_type &r=0.0, const time_type &s=1.0): + a(a),b(b),c(c),d(d),r(r),s(s),drs(1.0/(s-r)) { sync(); } + + void sync() + { +// drs=1.0/(s-r); + _coeff[0]= a; + _coeff[1]= b*3 - a*3; + _coeff[2]= c*3 - b*6 + a*3; + _coeff[3]= d - c*3 + b*3 - a; + } + + // Cost Summary: 4 products, 3 sums, and 1 difference. + inline value_type + operator()(time_type t)const + { t-=r; t*=drs; return _coeff[0]+(_coeff[1]+(_coeff[2]+(_coeff[3])*t)*t)*t; } + + void set_rs(time_type new_r, time_type new_s) { r=new_r; s=new_s; drs=1.0/(s-r); } + void set_r(time_type new_r) { r=new_r; drs=1.0/(s-r); } + void set_s(time_type new_s) { s=new_s; drs=1.0/(s-r); } + const time_type &get_r()const { return r; } + const time_type &get_s()const { return s; } + time_type get_dt()const { return s-r; } + + //! Bezier curve intersection function + /*! Calculates the time of intersection + ** for the calling curve. + */ + time_type intersect(const bezier_base &x, time_type t=0.0,int i=15)const + { + //BROKEN - the time values of the 2 curves should be independent + value_type system[4]; + system[0]=_coeff[0]-x._coeff[0]; + system[1]=_coeff[1]-x._coeff[1]; + system[2]=_coeff[2]-x._coeff[2]; + system[3]=_coeff[3]-x._coeff[3]; + + t-=r; + t*=drs; + + // Newton's method + // Inner loop cost summary: 7 products, 5 sums, 1 difference + for(;i;i--) + t-= (system[0]+(system[1]+(system[2]+(system[3])*t)*t)*t)/ + (system[1]+(system[2]*2+(system[3]*3)*t)*t); + + t*=(s-r); + t+=r; + + return t; + } + + value_type & + operator[](int i) + { return (&a)[i]; } + + const value_type & + operator[](int i) const + { return (&a)[i]; } +}; + + +// Fast double implementation of a cubic bezier curve +template <> +class bezier_base : public std::unary_function +{ +public: + typedef double value_type; + typedef float time_type; +private: + affine_combo affine_func; + value_type a,b,c,d; + time_type r,s; + + value_type _coeff[4]; + time_type drs; // reciprocal of (s-r) +public: + bezier_base():r(0.0),s(1.0),drs(1.0) { } + bezier_base( + const value_type &a, const value_type &b, const value_type &c, const value_type &d, + const time_type &r=0.0, const time_type &s=1.0): + a(a),b(b),c(c),d(d),r(r),s(s),drs(1.0/(s-r)) { sync(); } + + void sync() + { +// drs=1.0/(s-r); + _coeff[0]= a; + _coeff[1]= b*3 - a*3; + _coeff[2]= c*3 - b*6 + a*3; + _coeff[3]= d - c*3 + b*3 - a; + } + + // 4 products, 3 sums, and 1 difference. + inline value_type + operator()(time_type t)const + { t-=r; t*=drs; return _coeff[0]+(_coeff[1]+(_coeff[2]+(_coeff[3])*t)*t)*t; } + + void set_rs(time_type new_r, time_type new_s) { r=new_r; s=new_s; drs=1.0/(s-r); } + void set_r(time_type new_r) { r=new_r; drs=1.0/(s-r); } + void set_s(time_type new_s) { s=new_s; drs=1.0/(s-r); } + const time_type &get_r()const { return r; } + const time_type &get_s()const { return s; } + time_type get_dt()const { return s-r; } + + //! Bezier curve intersection function + /*! Calculates the time of intersection + ** for the calling curve. + */ + time_type intersect(const bezier_base &x, time_type t=0.0,int i=15)const + { + //BROKEN - the time values of the 2 curves should be independent + value_type system[4]; + system[0]=_coeff[0]-x._coeff[0]; + system[1]=_coeff[1]-x._coeff[1]; + system[2]=_coeff[2]-x._coeff[2]; + system[3]=_coeff[3]-x._coeff[3]; + + t-=r; + t*=drs; + + // Newton's method + // Inner loop: 7 products, 5 sums, 1 difference + for(;i;i--) + t-= (system[0]+(system[1]+(system[2]+(system[3])*t)*t)*t)/ + (system[1]+(system[2]*2+(system[3]*3)*t)*t); + + t*=(s-r); + t+=r; + + return t; + } + + value_type & + operator[](int i) + { return (&a)[i]; } + + const value_type & + operator[](int i) const + { return (&a)[i]; } +}; + +//#ifdef __FIXED__ + +// Fast double implementation of a cubic bezier curve +/* +template <> +template +class bezier_base > : std::unary_function,fixed_base > +{ +public: + typedef fixed_base value_type; + typedef fixed_base time_type; + +private: + affine_combo affine_func; + value_type a,b,c,d; + time_type r,s; + + value_type _coeff[4]; + time_type drs; // reciprocal of (s-r) +public: + bezier_base():r(0.0),s(1.0),drs(1.0) { } + bezier_base( + const value_type &a, const value_type &b, const value_type &c, const value_type &d, + const time_type &r=0, const time_type &s=1): + a(a),b(b),c(c),d(d),r(r),s(s),drs(1.0/(s-r)) { sync(); } + + void sync() + { + drs=time_type(1)/(s-r); + _coeff[0]= a; + _coeff[1]= b*3 - a*3; + _coeff[2]= c*3 - b*6 + a*3; + _coeff[3]= d - c*3 + b*3 - a; + } + + // 4 products, 3 sums, and 1 difference. + inline value_type + operator()(time_type t)const + { t-=r; t*=drs; return _coeff[0]+(_coeff[1]+(_coeff[2]+(_coeff[3])*t)*t)*t; } + + void set_rs(time_type new_r, time_type new_s) { r=new_r; s=new_s; drs=time_type(1)/(s-r); } + void set_r(time_type new_r) { r=new_r; drs=time_type(1)/(s-r); } + void set_s(time_type new_s) { s=new_s; drs=time_type(1)/(s-r); } + const time_type &get_r()const { return r; } + const time_type &get_s()const { return s; } + time_type get_dt()const { return s-r; } + + //! Bezier curve intersection function + //! Calculates the time of intersection + // for the calling curve. + // + time_type intersect(const bezier_base &x, time_type t=0,int i=15)const + { + value_type system[4]; + system[0]=_coeff[0]-x._coeff[0]; + system[1]=_coeff[1]-x._coeff[1]; + system[2]=_coeff[2]-x._coeff[2]; + system[3]=_coeff[3]-x._coeff[3]; + + t-=r; + t*=drs; + + // Newton's method + // Inner loop: 7 products, 5 sums, 1 difference + for(;i;i--) + t-=(time_type) ( (system[0]+(system[1]+(system[2]+(system[3])*t)*t)*t)/ + (system[1]+(system[2]*2+(system[3]*3)*t)*t) ); + + t*=(s-r); + t+=r; + + return t; + } + + value_type & + operator[](int i) + { return (&a)[i]; } + + const value_type & + operator[](int i) const + { return (&a)[i]; } +}; +*/ +//#endif + +#endif + + + +template +class bezier_iterator +{ +public: + + struct iterator_category {}; + typedef V value_type; + typedef T difference_type; + typedef V reference; + +private: + difference_type t; + difference_type dt; + bezier_base curve; + +public: + +/* + reference + operator*(void)const { return curve(t); } + const surface_iterator& + + operator++(void) + { t+=dt; return &this; } + + const surface_iterator& + operator++(int) + { hermite_iterator _tmp=*this; t+=dt; return _tmp; } + + const surface_iterator& + operator--(void) + { t-=dt; return &this; } + + const surface_iterator& + operator--(int) + { hermite_iterator _tmp=*this; t-=dt; return _tmp; } + + + surface_iterator + operator+(difference_type __n) const + { return surface_iterator(data+__n[0]+__n[1]*pitch,pitch); } + + surface_iterator + operator-(difference_type __n) const + { return surface_iterator(data-__n[0]-__n[1]*pitch,pitch); } +*/ + +}; + +template +class bezier : public bezier_base +{ +public: + typedef V value_type; + typedef T time_type; + typedef float distance_type; + typedef bezier_iterator iterator; + typedef bezier_iterator const_iterator; + + distance_func dist; + + using bezier_base::get_r; + using bezier_base::get_s; + using bezier_base::get_dt; + +public: + bezier() { } + bezier(const value_type &a, const value_type &b, const value_type &c, const value_type &d): + bezier_base(a,b,c,d) { } + + + const_iterator begin()const; + const_iterator end()const; + + time_type find_closest(bool fast, const value_type& x, int i=7)const + { + if (!fast) + { + value_type array[4] = { + bezier::operator[](0), + bezier::operator[](1), + bezier::operator[](2), + bezier::operator[](3)}; + return NearestPointOnCurve(x, array); + } + else + { + time_type r(0), s(1); + float t((r+s)*0.5); /* half way between r and s */ + + for(;i;i--) + { + // compare 33% of the way between r and s with 67% of the way between r and s + if(dist(operator()((s-r)*(1.0/3.0)+r), x) < + dist(operator()((s-r)*(2.0/3.0)+r), x)) + s=t; + else + r=t; + t=((r+s)*0.5); + } + return t; + } + } + + distance_type find_distance(time_type r, time_type s, int steps=7)const + { + const time_type inc((s-r)/steps); + if (!inc) return 0; + distance_type ret(0); + value_type last(operator()(r)); + + for(r+=inc;r 0.1 2 3 4 5.6 + */ + void subdivide(bezier *left, bezier *right, const time_type &time = (time_type)0.5) const + { + time_type t=(time-get_r())/get_dt(); + bezier lt,rt; + + value_type temp; + const value_type& a((*this)[0]); + const value_type& b((*this)[1]); + const value_type& c((*this)[2]); + const value_type& d((*this)[3]); + + //1st stage points to keep + lt[0] = a; + rt[3] = d; + + //2nd stage calc + lt[1] = affine_func(a,b,t); + temp = affine_func(b,c,t); + rt[2] = affine_func(c,d,t); + + //3rd stage calc + lt[2] = affine_func(lt[1],temp,t); + rt[1] = affine_func(temp,rt[2],t); + + //last stage calc + lt[3] = rt[0] = affine_func(lt[2],rt[1],t); + + //set the time range for l,r (the inside values should be 1, 0 respectively) + lt.set_r(get_r()); + rt.set_s(get_s()); + + lt.sync(); + rt.sync(); + + //give back the curves + if(left) *left = lt; + if(right) *right = rt; + } + + + void evaluate(time_type t, value_type &f, value_type &df) const + { + t=(t-get_r())/get_dt(); + + const value_type& a((*this)[0]); + const value_type& b((*this)[1]); + const value_type& c((*this)[2]); + const value_type& d((*this)[3]); + + const value_type p1 = affine_func( + affine_func(a,b,t), + affine_func(b,c,t) + ,t); + const value_type p2 = affine_func( + affine_func(b,c,t), + affine_func(c,d,t) + ,t); + + f = affine_func(p1,p2,t); + df = (p2-p1)*3; + } + +private: + /* + * Bezier : + * Evaluate a Bezier curve at a particular parameter value + * Fill in control points for resulting sub-curves if "Left" and + * "Right" are non-null. + * + * int degree; Degree of bezier curve + * value_type *VT; Control pts + * time_type t; Parameter value + * value_type *Left; RETURN left half ctl pts + * value_type *Right; RETURN right half ctl pts + */ + static value_type Bezier(value_type *VT, int degree, time_type t, value_type *Left, value_type *Right) + { + int i, j; /* Index variables */ + value_type Vtemp[W_DEGREE+1][W_DEGREE+1]; + + /* Copy control points */ + for (j = 0; j <= degree; j++) + Vtemp[0][j] = VT[j]; + + /* Triangle computation */ + for (i = 1; i <= degree; i++) + for (j =0 ; j <= degree - i; j++) + { + Vtemp[i][j][0] = (1.0 - t) * Vtemp[i-1][j][0] + t * Vtemp[i-1][j+1][0]; + Vtemp[i][j][1] = (1.0 - t) * Vtemp[i-1][j][1] + t * Vtemp[i-1][j+1][1]; + } + + if (Left != NULL) + for (j = 0; j <= degree; j++) + Left[j] = Vtemp[j][0]; + + if (Right != NULL) + for (j = 0; j <= degree; j++) + Right[j] = Vtemp[degree-j][j]; + + return (Vtemp[degree][0]); + } + + /* + * CrossingCount : + * Count the number of times a Bezier control polygon + * crosses the 0-axis. This number is >= the number of roots. + * + * value_type *VT; Control pts of Bezier curve + */ + static int CrossingCount(value_type *VT) + { + int i; + int n_crossings = 0; /* Number of zero-crossings */ + int sign, old_sign; /* Sign of coefficients */ + + sign = old_sign = SGN(VT[0][1]); + for (i = 1; i <= W_DEGREE; i++) + { + sign = SGN(VT[i][1]); + if (sign != old_sign) n_crossings++; + old_sign = sign; + } + + return n_crossings; + } + + /* + * ControlPolygonFlatEnough : + * Check if the control polygon of a Bezier curve is flat enough + * for recursive subdivision to bottom out. + * + * value_type *VT; Control points + */ + static int ControlPolygonFlatEnough(value_type *VT) + { + int i; /* Index variable */ + distance_type distance[W_DEGREE]; /* Distances from pts to line */ + distance_type max_distance_above; /* maximum of these */ + distance_type max_distance_below; + time_type intercept_1, intercept_2, left_intercept, right_intercept; + distance_type a, b, c; /* Coefficients of implicit */ + /* eqn for line from VT[0]-VT[deg] */ + /* Find the perpendicular distance */ + /* from each interior control point to */ + /* line connecting VT[0] and VT[W_DEGREE] */ + { + distance_type abSquared; + + /* Derive the implicit equation for line connecting first * + * and last control points */ + a = VT[0][1] - VT[W_DEGREE][1]; + b = VT[W_DEGREE][0] - VT[0][0]; + c = VT[0][0] * VT[W_DEGREE][1] - VT[W_DEGREE][0] * VT[0][1]; + + abSquared = (a * a) + (b * b); + + for (i = 1; i < W_DEGREE; i++) + { + /* Compute distance from each of the points to that line */ + distance[i] = a * VT[i][0] + b * VT[i][1] + c; + if (distance[i] > 0.0) distance[i] = (distance[i] * distance[i]) / abSquared; + if (distance[i] < 0.0) distance[i] = -(distance[i] * distance[i]) / abSquared; + } + } + + /* Find the largest distance */ + max_distance_above = max_distance_below = 0.0; + + for (i = 1; i < W_DEGREE; i++) + { + if (distance[i] < 0.0) max_distance_below = MIN(max_distance_below, distance[i]); + if (distance[i] > 0.0) max_distance_above = MAX(max_distance_above, distance[i]); + } + + /* Implicit equation for "above" line */ + intercept_1 = -(c + max_distance_above)/a; + + /* Implicit equation for "below" line */ + intercept_2 = -(c + max_distance_below)/a; + + /* Compute intercepts of bounding box */ + left_intercept = MIN(intercept_1, intercept_2); + right_intercept = MAX(intercept_1, intercept_2); + + return 0.5 * (right_intercept-left_intercept) < BEZIER_EPSILON ? 1 : 0; + } + + /* + * ComputeXIntercept : + * Compute intersection of chord from first control point to last + * with 0-axis. + * + * value_type *VT; Control points + */ + static time_type ComputeXIntercept(value_type *VT) + { + distance_type YNM = VT[W_DEGREE][1] - VT[0][1]; + return (YNM*VT[0][0] - (VT[W_DEGREE][0] - VT[0][0])*VT[0][1]) / YNM; + } + + /* + * FindRoots : + * Given a 5th-degree equation in Bernstein-Bezier form, find + * all of the roots in the interval [0, 1]. Return the number + * of roots found. + * + * value_type *w; The control points + * time_type *t; RETURN candidate t-values + * int depth; The depth of the recursion + */ + static int FindRoots(value_type *w, time_type *t, int depth) + { + int i; + value_type Left[W_DEGREE+1]; /* New left and right */ + value_type Right[W_DEGREE+1]; /* control polygons */ + int left_count; /* Solution count from */ + int right_count; /* children */ + time_type left_t[W_DEGREE+1]; /* Solutions from kids */ + time_type right_t[W_DEGREE+1]; + + switch (CrossingCount(w)) + { + case 0 : + { /* No solutions here */ + return 0; + } + case 1 : + { /* Unique solution */ + /* Stop recursion when the tree is deep enough */ + /* if deep enough, return 1 solution at midpoint */ + if (depth >= MAXDEPTH) + { + t[0] = (w[0][0] + w[W_DEGREE][0]) / 2.0; + return 1; + } + if (ControlPolygonFlatEnough(w)) + { + t[0] = ComputeXIntercept(w); + return 1; + } + break; + } + } + + /* Otherwise, solve recursively after */ + /* subdividing control polygon */ + Bezier(w, W_DEGREE, 0.5, Left, Right); + left_count = FindRoots(Left, left_t, depth+1); + right_count = FindRoots(Right, right_t, depth+1); + + /* Gather solutions together */ + for (i = 0; i < left_count; i++) t[i] = left_t[i]; + for (i = 0; i < right_count; i++) t[i+left_count] = right_t[i]; + + /* Send back total number of solutions */ + return (left_count+right_count); + } + + /* + * ConvertToBezierForm : + * Given a point and a Bezier curve, generate a 5th-degree + * Bezier-format equation whose solution finds the point on the + * curve nearest the user-defined point. + * + * value_type& P; The point to find t for + * value_type *VT; The control points + */ + static void ConvertToBezierForm(const value_type& P, value_type *VT, value_type w[W_DEGREE+1]) + { + int i, j, k, m, n, ub, lb; + int row, column; /* Table indices */ + value_type c[DEGREE+1]; /* VT(i)'s - P */ + value_type d[DEGREE]; /* VT(i+1) - VT(i) */ + distance_type cdTable[3][4]; /* Dot product of c, d */ + static distance_type z[3][4] = { /* Precomputed "z" for cubics */ + {1.0, 0.6, 0.3, 0.1}, + {0.4, 0.6, 0.6, 0.4}, + {0.1, 0.3, 0.6, 1.0}}; + + /* Determine the c's -- these are vectors created by subtracting */ + /* point P from each of the control points */ + for (i = 0; i <= DEGREE; i++) + c[i] = VT[i] - P; + + /* Determine the d's -- these are vectors created by subtracting */ + /* each control point from the next */ + for (i = 0; i <= DEGREE - 1; i++) + d[i] = (VT[i+1] - VT[i]) * 3.0; + + /* Create the c,d table -- this is a table of dot products of the */ + /* c's and d's */ + for (row = 0; row <= DEGREE - 1; row++) + for (column = 0; column <= DEGREE; column++) + cdTable[row][column] = d[row] * c[column]; + + /* Now, apply the z's to the dot products, on the skew diagonal */ + /* Also, set up the x-values, making these "points" */ + for (i = 0; i <= W_DEGREE; i++) + { + w[i][0] = (distance_type)(i) / W_DEGREE; + w[i][1] = 0.0; + } + + n = DEGREE; + m = DEGREE-1; + for (k = 0; k <= n + m; k++) + { + lb = MAX(0, k - m); + ub = MIN(k, n); + for (i = lb; i <= ub; i++) + { + j = k - i; + w[i+j][1] += cdTable[j][i] * z[j][i]; + } + } + } + + /* + * NearestPointOnCurve : + * Compute the parameter value of the point on a Bezier + * curve segment closest to some arbitrary, user-input point. + * Return the point on the curve at that parameter value. + * + * value_type& P; The user-supplied point + * value_type *VT; Control points of cubic Bezier + */ + static time_type NearestPointOnCurve(const value_type& P, value_type VT[4]) + { + value_type w[W_DEGREE+1]; /* Ctl pts of 5th-degree curve */ + time_type t_candidate[W_DEGREE]; /* Possible roots */ + int n_solutions; /* Number of roots found */ + time_type t; /* Parameter value of closest pt */ + + /* Convert problem to 5th-degree Bezier form */ + ConvertToBezierForm(P, VT, w); + + /* Find all possible roots of 5th-degree equation */ + n_solutions = FindRoots(w, t_candidate, 0); + + /* Compare distances of P to all candidates, and to t=0, and t=1 */ + { + distance_type dist, new_dist; + value_type p, v; + int i; + + /* Check distance to beginning of curve, where t = 0 */ + dist = (P - VT[0]).mag_squared(); + t = 0.0; + + /* Find distances for candidate points */ + for (i = 0; i < n_solutions; i++) + { + p = Bezier(VT, DEGREE, t_candidate[i], (value_type *)NULL, (value_type *)NULL); + new_dist = (P - p).mag_squared(); + if (new_dist < dist) + { + dist = new_dist; + t = t_candidate[i]; + } + } + + /* Finally, look at distance to end point, where t = 1.0 */ + new_dist = (P - VT[DEGREE]).mag_squared(); + if (new_dist < dist) + { + dist = new_dist; + t = 1.0; + } + } + + /* Return the point on the curve at parameter value t */ + return t; + } +}; + +_ETL_END_NAMESPACE + +/* === E X T E R N S ======================================================= */ + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_bezier_angle.h b/ETL/ETL/_bezier_angle.h new file mode 100644 index 0000000..9a747bb --- /dev/null +++ b/ETL/ETL/_bezier_angle.h @@ -0,0 +1,107 @@ +/*! ======================================================================== +** Extended Template Library +** Bezier Template Class Implementation (Angle Specialization) +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__BEZIER_ANGLE_H +#define __ETL__BEZIER_ANGLE_H + +/* === H E A D E R S ======================================================= */ + +#include "_curve_func.h" +#include "angle" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +/* +template <> +class bezier_base : std::unary_function +{ +public: + typedef angle value_type; + typedef float time_type; +private: + affine_combo affine_func; + value_type a,b,c,d; + time_type r,s; + +public: + bezier_base():r(0.0),s(1.0) { } + bezier_base( + const value_type &a, const value_type &b, const value_type &c, const value_type &d, + const time_type &r=0.0, const time_type &s=1.0): + a(a),b(b),c(c),d(d),r(r),s(s) { sync(); } + + void sync(void) + { + } + + value_type + operator()(time_type t)const + { + t=(t-r)/(s-r); + return + affine_func( + affine_func( + affine_func(a,b,t), + affine_func(b,c,t) + ,t), + affine_func( + affine_func(b,c,t), + affine_func(c,d,t) + ,t) + ,t); + } + + void set_rs(time_type new_r, time_type new_s) { r=new_r; s=new_s; } + void set_r(time_type new_r) { r=new_r; } + void set_s(time_type new_s) { s=new_s; } + const time_type &get_r(void)const { return r; } + const time_type &get_s(void)const { return s; } + time_type get_dt(void)const { return s-r; } + + value_type & + operator[](int i) + { return (&a)[i]; } + + const value_type & + operator[](int i) const + { return (&a)[i]; } +}; +*/ + +_ETL_END_NAMESPACE + +/* === E X T E R N S ======================================================= */ + +/* === E N D =============================================================== */ + +#endif + diff --git a/ETL/ETL/_bit_rotate.h b/ETL/ETL/_bit_rotate.h new file mode 100644 index 0000000..3fcbee0 --- /dev/null +++ b/ETL/ETL/_bit_rotate.h @@ -0,0 +1,62 @@ +/*! ======================================================================== +** Extended Template Library +** Bit Rotation Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** These template functions have not yet been throughly tested, +** and may be inaccurate or just plain wrong. You have been warned. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__BIT_ROTATE_H +#define __ETL__BIT_ROTATE_H + +/* === H E A D E R S ======================================================= */ + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +template T +rot_left(const T &val, const int &bits=1) +{ + return (T)( ((unsigned)val<>(sizeof(T)*8-bits)) ); +} + +template T +rot_right(const T &val, const int &bits=1) +{ + return (T)( ((unsigned)val>>bits)+((unsigned)val<<(sizeof(T)*8-bits)) ); +} + +_ETL_END_NAMESPACE + +/* === E X T E R N S ======================================================= */ + +/* === E N D =============================================================== */ + +#endif + diff --git a/ETL/ETL/_boxblur.h b/ETL/ETL/_boxblur.h new file mode 100644 index 0000000..c043dc3 --- /dev/null +++ b/ETL/ETL/_boxblur.h @@ -0,0 +1,246 @@ +/*! ======================================================================== +** Extended Template Library +** Box Blur Template Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__BOXBLUR_H +#define __ETL__BOXBLUR_H + +/* === H E A D E R S ======================================================= */ + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +template void +hbox_blur(T1 pen,int w, int h, int length, T2 outpen) +{ + int x,y; + typename T1::iterator_x iter, end; + + length=std::min(w,length); + const float divisor(1.0f/(length*2+1)); + + for(y=0;ylength) ? iter[-length-1] : *pen.x(); + tot += ((x+length) void +vbox_blur(T1 pen,const int w, const int h, int length, T2 outpen) +{ + int x,y; + typename T1::iterator_y iter, end; + + length=std::min(h,length); + const float divisor(1.0f/(length*2+1)); + + for(x=0;xlength) ? iter[-length-1] : *pen.y(); + tot += ((y+length) void +vbox_blur(T1 pen,int w, int h, int length,T2 outpen) +{ + int x,y; + typename T1::iterator_y iter, end, biter,eiter; + + //print out the info I need to figure out if this is somehow a buffer overrun... + /*char *beginptr=0,*endptr=0; + { + T1 ypen = pen; + T1 endpen = pen; + endpen.move(w,h); + ypen.inc_y(); + + T2 open = outpen, + oepen = outpen; + oepen.move(w,h); + printf("V Blur (%d,%d,s-%d) in(%p,%p,st %d) out(%p,%p)\n", + w,h,length,(char*)pen.x(),(char*)endpen.x(),(char*)ypen.x()-(char*)pen.x(), + (char*)open.x(),(char*)oepen.x()); + }*/ + length=min(h-1,length); + + const float divisor(1.0f/(length*2+1)); + //const int div = (length*2+1); + + //since the filter range is 2*length+1 we need h-1 + for(x=0;x%.3f),",y,&iter[y],iter[y],tot); + } + iter=pen.y(); + + //printf(" tot=%.3f\n",tot); + + biter = iter+(-length-1); //get the first one... + eiter = iter+length; + + //y will always be > length + //T2 open = outpen; + for (y=0;ylength) + { + typename T1::value_type &v = *biter; + /*if( (char*)&v < beginptr || + (char*)&v >= endptr) + printf("crap! %d (%p off %p)\n",y,(char*)&v,(char*)&*iter);*/ + tot -= v; + //printf("[%.3f,",v); + } + else + { + tot -= bval; + //printf("[%.3f,",bval); + } + + if (y+length= endptr) + printf("crap! %d (%p off %p)\n",y,(char*)&v,(char*)&*iter);*/ + tot += v; + //printf("%.3f]",v); + } + else + { + tot += eval; + //printf("%.3f]",eval); + } + + //test handled in the previous case... + //tot -= (y>length) ? *biter : bval; + //tot += (y+length void +box_blur(T1 pen,int w, int h, int blur_w, int blur_h, T2 outpen) + { hbox_blur(pen,w,h,blur_w,outpen); vbox_blur(pen,w,h,blur_h,outpen); } + +template void +box_blur(T1 pen,int w, int h, int size, T2 outpen) + { hbox_blur(pen,w,h,size,outpen); vbox_blur(pen,w,h,size,outpen); } + +template void +hbox_blur(T1 begin,T1 end, int len,T2 outpen) +{ + typename T1::difference_type size(end-begin); + hbox_blur(begin,size.x,size.y,len,outpen); +} + +template void +vbox_blur(T1 begin,T1 end, int len,T2 outpen) +{ + typename T1::difference_type size(end-begin); + vbox_blur(begin,size.x,size.y,len,outpen); +} + +template void +box_blur(T1 begin,T1 end, int blur_w, int blur_h,T2 outpen) +{ + typename T1::difference_type size(end-begin); + hbox_blur(begin,size.x,size.y,blur_w,outpen); vbox_blur(begin,size.x,size.y,blur_h,outpen); +} + +template void +box_blur(T1 begin,T1 end, int blursize,T2 outpen) +{ + typename T1::difference_type size(end-begin); + hbox_blur(begin,size.x,size.y,blursize,outpen); vbox_blur(begin,size.x,size.y,blursize,outpen); +} + +_ETL_END_NAMESPACE + +/* === E X T E R N S ======================================================= */ + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_bspline.h b/ETL/ETL/_bspline.h new file mode 100644 index 0000000..edc00a7 --- /dev/null +++ b/ETL/ETL/_bspline.h @@ -0,0 +1,237 @@ +/*! ======================================================================== +** Extended Template and Library +** B-Spline Class Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__BSPLINE_H +#define __ETL__BSPLINE_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include "_curve_func.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +template , class D=distance_func > +class bspline : public std::unary_function +{ +public: + typedef T value_type; + typedef K knot_type; + typedef std::vector knot_container; + typedef std::vector cpoint_container; + typedef typename knot_container::iterator knot_iterator; + typedef typename cpoint_container::iterator cpoint_iterator; + + typedef C affine_func_type; + typedef D distance_func_type; + +protected: + affine_func_type affine_func; + distance_func_type distance_func; + +private: + int m; + knot_container _knots; + cpoint_container _cpoints; + bool _loop; + +public: + bspline():m(2),_loop(false) { } + + int get_m()const { return m-1; }; + int set_m(int new_m) { m=new_m+1; return m-1; }; + + bool set_loop(bool x) { _loop=x; reset_knots(); return _loop; } + + knot_container & knots() { return _knots; }; + cpoint_container & cpoints() { return _cpoints; }; + + const knot_container & knots()const { return _knots; }; + const cpoint_container & cpoints()const { return _cpoints; }; + + void reset_knots() + { + int i; + + if(!_loop) + { + _knots.clear(); + if(!_cpoints.size()) + return; + while(m>(signed)_cpoints.size()) + m--; + for(i=0;i(signed)_cpoints.size()) + m--; + for(i=0;i<=(signed)_cpoints.size()-m+1;i++) + *_knots.insert(_knots.end())=i; + } + } + + int calc_curve_segment(knot_type t)const + { + int k; + if(t<0) + t=0; + if(t>=_knots.back()) + t=_knots.back()-0.0001; + for(k=0;_knots[k]>t || _knots[k+1]<=t;k++) + ; + + return k; + } + + knot_container get_segment_knots(int i)const + { + if(i+1=(signed)_knots.size()) + { + knot_container ret(_knots.begin()+i-m+1,_knots.end()); + return ret; + } + return knot_container(_knots.begin()+i-m+1, _knots.begin()+i+m); + } + + cpoint_container get_segment_cpoints(int i)const + { + if(i+1=(signed)_knots.size()) + { + return cpoint_container(); + } + return cpoint_container(_cpoints.begin()+i-m+1, _cpoints.begin()+i+1); + } + + cpoint_container calc_shell(knot_type t, int level)const + { + int + i=calc_curve_segment(t), + j,k; + + knot_container u=get_segment_knots(i); + + cpoint_container d=get_segment_cpoints(i); + + if(!d.size()) + return cpoint_container(); + + for(j=0;d.size()>1 && j1;d.pop_back(),j++) + { + for(k=0;k<(signed)d.size()-1;k++) + { + d[k]=affine_func(d[k],d[k+1],((t-u[j+k+1])/(u[m+k]-u[j+k+1]))); + } + } + return d.front(); + } + + cpoint_iterator find_closest_cpoint(const value_type &point, typename distance_func_type::result_type max) + { + cpoint_iterator i=_cpoints.begin(); + cpoint_iterator ret=i; + typename distance_func_type::result_type dist=distance_func(point,_cpoints[0]); + + // The distance function returns "cooked" (ie: squared) + // distances, so we need to cook our max distance for + // the comparison to work correctly. + max=distance_func.cook(max); + + for(++i;i<_cpoints.end();i++) + { + typename distance_func_type::result_type thisdist=distance_func(point,*i); + + if(thisdist + +#include "hermite" + +/* === M A C R O S ========================================================= */ + +//#ifndef _EPSILON +//#define _EPSILON 0.0000001 +//#endif + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +template +class derivative : public std::unary_function +{ + T func; + typename T::argument_type epsilon; +public: + explicit derivative(const T &x, const typename T::argument_type &epsilon=0.000001):func(x),epsilon(epsilon) { } + + typename T::result_type + operator()(const typename T::argument_type &x)const + { + return (func(x+epsilon)-func(x))/epsilon; + } +}; + +template +class derivative > : public std::unary_function::argument_type,typename hermite::result_type> +{ + hermite func; +public: + explicit derivative(const hermite &x):func(x) { } + + typename hermite::result_type + operator()(const typename hermite::argument_type &x)const + { + T a = func[0], b = func[1], c = func[2], d = func[3]; + typename hermite::argument_type y(1-x); + return ((b-a)*y*y + (c-b)*x*y*2 + (d-c)*x*x) * 3; + } +}; + +template +class integral : public std::binary_function +{ + T func; + int samples; +public: + explicit integral(const T &x, const int &samples=500):func(x),samples(samples) { } + + typename T::result_type + operator()(typename T::argument_type x,typename T::argument_type y)const + { + typename T::result_type ret=0; + int i=samples; + const typename T::argument_type increment=(y-x)/i; + + for(;i;i--,x+=increment) + ret+=(func(x)+func(x+increment))*increment/2; + return ret; + } +}; + +_ETL_END_NAMESPACE + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_clock_base.h b/ETL/ETL/_clock_base.h new file mode 100644 index 0000000..32d8742 --- /dev/null +++ b/ETL/ETL/_clock_base.h @@ -0,0 +1,133 @@ +/*! ======================================================================== +** Extended Template and Library +** Clock Abstraction Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__CLOCK_H +#define __ETL__CLOCK_H + +/* === H E A D E R S ======================================================= */ + +#ifndef WIN32 +#include +#else +inline void sleep(int i) { Sleep(i*1000); } +#endif + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +inline void yield() { sleep(0); } + +/*! ======================================================================== +** \class clock_base +** \brief clock abstraction +** +** A more detailed description needs to be written. +*/ +template +class clock_base : public DESC +{ +public: + typedef typename DESC::value_type value_type; + +private: + typedef clock_base _clock; + typedef typename DESC::timestamp timestamp; + + timestamp base_time; + + using DESC::get_current_time; + using DESC::realtime; + using DESC::one_second; +public: + + clock_base() { reset(); } + + void reset() + { get_current_time(base_time); } + + value_type operator()()const + { return timestamp_to_seconds(get_current_time()-base_time); } + + value_type pop_time() + { + // Grab the old base time + timestamp old_time=base_time; + + // Put the current time into base_time + get_current_time(base_time); + + return timestamp_to_seconds(base_time-old_time); + } + + static void + sleep(const value_type &length) + { + if(!realtime()) + ::sleep((int)(length+0.5)); + else + { + _clock timer; + timer.reset(); + value_type val; + for(val=timer();one_second() +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +class clock_desc_gettimeofday +{ +public: + typedef double value_type; + + inline static bool realtime() + { return true; } + + inline static bool proctime() + { return false; } + + inline static value_type + one_second() + { return 1.0f; } + + inline static value_type precision() + { return one_second()/(value_type)1000000.0f; } + + inline static const char *description() + { return "UNIX gettimeofday()"; }; + +protected: + class timestamp : public timeval + { + timestamp(int sec, int usec) + { tv_sec=sec; tv_usec=usec; } + + friend class clock_desc_gettimeofday; + public: + timestamp() { } + + + inline timestamp operator-(const timestamp &rhs)const + { + timestamp ret; + ret.tv_usec=tv_usec-rhs.tv_usec; + + if(ret.tv_usec<0) + { + ret.tv_sec=tv_sec-rhs.tv_sec-1; + ret.tv_usec+=1000000; + } + else + ret.tv_sec=tv_sec-rhs.tv_sec; + return ret; + } + + inline timestamp operator+(timestamp rhs)const + { + rhs.tv_usec+=tv_usec; + + if(rhs.tv_usec>1000000) + { + rhs.tv_sec+=tv_sec+1; + rhs.tv_usec-=1000000; + } + else + rhs.tv_sec+=tv_sec; + return rhs; + } + + inline bool operator<(const timestamp &rhs)const + { return tv_sec +# define __sys_clock ::clock +# define __sys_time ::time +#else +# ifdef __GNUG__ +# include +# define __sys_clock ::clock +# define __sys_time ::time +# else +typedef int clock_t; +typedef int time_t; +extern clock_t _clock(); +extern time_t _time(time_t *); +# define CLOCKS_PER_SEC 1000 +# define __sys_clock _clock +# define __sys_time _time +# endif +#endif + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +class clock_desc_sys_clock +{ +public: + typedef float value_type; + + inline static bool realtime() + { return false; } + + inline static bool proctime() + { return true; } + + inline static value_type + one_second() + { return 1.0f; } + + inline static value_type precision() + { return one_second()/(value_type)CLOCKS_PER_SEC; } + + inline static const char *description() + { return "ANSI C clock()"; }; + +protected: + typedef clock_t timestamp; + + static void + get_current_time(timestamp &time) + { time=__sys_clock(); } + + static timestamp + get_current_time() + { return __sys_clock(); } + + static value_type + timestamp_to_seconds(const timestamp &x) + { return precision()*x; } + + static timestamp + seconds_to_timestamp(const value_type &x) + { return (timestamp)(x*(value_type)CLOCKS_PER_SEC+0.5); } + +}; + +class clock_desc_sys_time +{ +public: + typedef float value_type; + + inline static bool realtime() + { return true; } + + inline static bool proctime() + { return false; } + + inline static value_type + one_second() + { return 1.0f; } + + inline static value_type precision() + { return one_second(); } + + inline static const char *description() + { return "ANSI C time()"; }; + +protected: + typedef time_t timestamp; + + static void + get_current_time(timestamp &time) + { __sys_time(&time); } + + static timestamp + get_current_time() + { return __sys_time(NULL); } + + static value_type + timestamp_to_seconds(const timestamp &x) + { return (value_type)x; } + + static timestamp + seconds_to_timestamp(const value_type &x) + { return (timestamp)(x+(value_type)0.5f); } +}; + +_ETL_END_NAMESPACE + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_clock_win32hpcount.h b/ETL/ETL/_clock_win32hpcount.h new file mode 100644 index 0000000..561a9d4 --- /dev/null +++ b/ETL/ETL/_clock_win32hpcount.h @@ -0,0 +1,98 @@ +/*! ======================================================================== +** Extended Template and Library +** Win32 Clock Description Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__CLOCK_WIN32HPCOUNT_H +#define __ETL__CLOCK_WIN32HPCOUNT_H + +/* === H E A D E R S ======================================================= */ + +#define WIN32_LEAN_AND_MEAN +#include + +/* === M A C R O S ========================================================= */ + +#if defined(__GNUG__) && defined(__int64) +#undef __int64 +#define __int64 long long int +#endif + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +class clock_desc_win32hpcount +{ +public: + typedef double value_type; + + static bool realtime() + { return true; } + + static bool proctime() + { return false; } + + static value_type + one_second() + { return 1.0f; } + + static value_type precision() + { + __int64 freq; + QueryPerformanceFrequency((LARGE_INTEGER*)&freq); + return one_second()/(value_type)freq; + } + + static const char *description() + { return "Win32 QueryPerformanceCounter()"; }; + +protected: + typedef __int64 timestamp; + + static void + get_current_time(timestamp &x) + { QueryPerformanceCounter((LARGE_INTEGER*)&x);} + + static timestamp + get_current_time() + { timestamp ret; QueryPerformanceCounter((LARGE_INTEGER*)&ret); return ret; } + + static value_type + timestamp_to_seconds(const timestamp &x) + { return precision()*x; } + + static timestamp + seconds_to_timestamp(const value_type &x) + { return (timestamp)(x/precision()); } +}; + +_ETL_END_NAMESPACE + +/* === E N D =============================================================== */ + +#endif + diff --git a/ETL/ETL/_condition.h b/ETL/ETL/_condition.h new file mode 100644 index 0000000..26a4d2d --- /dev/null +++ b/ETL/ETL/_condition.h @@ -0,0 +1,70 @@ +/*! ======================================================================== +** Extended Template and Library +** Mutex Abstraction Class Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__CONDITION_H_ +#define __ETL__CONDITION_H_ + +/* === H E A D E R S ======================================================= */ + +/* === M A C R O S ========================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +class condition : private mutex +{ + bool flag; +public: + condition() + { flag=false; } + ~condition() + { } + void operator()() + { flag=true; } + void wait() + { + mutex::lock lock(*this); + + while(!flag)Yield(); + flag=false; + } + void wait_next() + { + mutex::lock lock(*this); + + flag=false; + while(!flag)Yield(); + } +}; + +_ETL_END_NAMESPACE + +/* === E X T E R N S ======================================================= */ + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_curve.h b/ETL/ETL/_curve.h new file mode 100644 index 0000000..e6ddbd3 --- /dev/null +++ b/ETL/ETL/_curve.h @@ -0,0 +1,80 @@ +/*! ======================================================================== +** Extended Template Library +** Curve Class Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__CURVE_H +#define __ETL__CURVE_H + +/* === H E A D E R S ======================================================= */ + +#include "_hermite.h" +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE +/* +#ifdef AUTO +#undef AUTO +#endif +#ifdef LINEAR +#undef LINEAR +#endif +#ifdef ABSOLUTE +#undef ABSOLUTE +#endif +#ifdef FAST_TO_SLOW +#undef FAST_TO_SLOW +#endif + +template +class curve +{ +public: + typedef T value_type; +private: + enum interpolate_type + { + AUTO, + LINEAR, + ABSOLUTE, + FAST_TO_SLOW, + + }; +public: +}; +*/ +_ETL_END_NAMESPACE + +/* === E X T E R N S ======================================================= */ + +/* === E N D =============================================================== */ + +#endif + diff --git a/ETL/ETL/_curve_func.h b/ETL/ETL/_curve_func.h new file mode 100644 index 0000000..b2898aa --- /dev/null +++ b/ETL/ETL/_curve_func.h @@ -0,0 +1,68 @@ +/*! ======================================================================== +** Extended Template and Library +** Utility Curve Template Class Implementations +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__CURVE_FUNC_H +#define __ETL__CURVE_FUNC_H + +/* === H E A D E R S ======================================================= */ + +#include + +/* -- C L A S S E S --------------------------------------------------------- */ + +template +struct affine_combo +{ + // from (a) to (x) : x = a(1-t) + b(t) + T operator()(const T &a,const T &b,const K &t)const + { + return T( (b-a)*t+a ); + } + + // from (x) to (a) : a = (x-b(t)) / (1-t) + T reverse(const T &x, const T &b, const K &t)const + { + return T( (x-t*b)*(static_cast(1)/(static_cast(1)-t)) ); + } +}; + +template +struct distance_func : public std::binary_function +{ + K operator()(const T &a,const T &b)const + { + T delta=b-a; + return static_cast(delta*delta); + } + + K cook(const K &x)const { return x*x; } + K uncook(const K &x)const { return sqrt(x); } + +}; + +/* -- E N D ----------------------------------------------------------------- */ + +#endif diff --git a/ETL/ETL/_fastangle.h b/ETL/ETL/_fastangle.h new file mode 100644 index 0000000..322a8cd --- /dev/null +++ b/ETL/ETL/_fastangle.h @@ -0,0 +1,461 @@ +/*! ======================================================================== +** Extended Template and Library +** Fast fastangle Abstraction Class Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__FASTANGLE_H +#define __ETL__FASTANGLE_H + +/* === H E A D E R S ======================================================= */ + +#include +#include + +#include "_fastangle_tables.h" + +/* === M A C R O S ========================================================= */ + +#ifndef PI +# define PI (3.1415926535897932384626433832795029L) +#endif + +#define ETL_FASTANGLE_INIT() + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +/*! ======================================================================== +** \class fastangle +** \brief Optimized abstraction of the concept of an angle +** +** A more detailed description needs to be written. +*/ +class fastangle +{ +public: + typedef double value_type; + +protected: + typedef fixed_base unit; + + unit v; //! Stored in rotations + +public: + + /* + ** Arithmetic Operators + */ + + //! fastangle Addition Operator + fastangle + operator+(const fastangle &rhs)const + { + fastangle ret; + ret.v=v+rhs.v; + return ret; + } + + //! fastangle Subtraction Operator + /*! \sa fastangle dist(const fastangle &) */ + fastangle + operator-(const fastangle &rhs)const + { + fastangle ret; + ret.v=v-rhs.v; + return ret; + } + + //! fastangle Scalar Multiplication Operator + /*! This operator will multiply the given + fastangle by the given scalar value. */ + fastangle + operator*(const unit &rhs)const + { + fastangle ret; + ret.v=v*rhs; + return ret; + } + + fastangle + operator/(const unit &rhs)const + { + fastangle ret; + ret.v=v/rhs; + return ret; + } + + const fastangle & + operator+=(const fastangle &rhs) + { + v+=rhs.v; + return *this; + } + + const fastangle & + operator-=(const fastangle &rhs) + { + v-=rhs.v; + return *this; + } + + const fastangle & + operator*=(const unit &rhs) + { + v*=rhs; + return *this; + } + + const fastangle & + operator/=(const unit &rhs) + { + v/=rhs; + return *this; + } + + //! fastangle Negation + fastangle + operator-()const + { + fastangle ret; + ret.v=-v; + return ret; + } + + //! 180 degree rotation operator + /*! Returns the fastangle directly opposite of + the given fastangle, and will yield a result + between 0 and 2PI */ + fastangle + operator~()const + { + fastangle ret; + ret.v=(unit)std::floor(v+0.5f); + return ret; + } + + /*! Returns true if the shortest + fastangle between the left-hand and + right-hand side is clockwise */ + bool + operator<(const fastangle &rhs)const + { return v(const fastangle &rhs)const + { return v>rhs.v; } +// { return dist(rhs).v>(value_type)0.0; } + + /*! Returns true if the shortest + fastangle between the left-hand and + right-hand side is clockwise, + or if the angles are refer to the same + point on the unit circle. */ + bool + operator<=(const fastangle &rhs)const + { return v<=rhs.v; } +// { return dist(rhs).v<=(value_type)0.0; } + + /*! Returns true if the shortest + fastangle between the left-hand and + right-hand side is counter-clockwise, + or if the angles are refer to the same + point on the unit circle. */ + bool + operator>=(const fastangle &rhs)const + { return v>=rhs.v; } +// { return dist(rhs).v>=(value_type)0.0; } + + /*! Returns true if the angles + are refer to the same point + on the unit circle. */ + bool + operator==(const fastangle &rhs)const + { return v==rhs.v; } +// { return dist(rhs).v==(value_type)0.0; } + + /*! Returns false if the angles + are refer to the same point + on the unit circle. */ + bool + operator!=(const fastangle &rhs)const + { return v!=rhs.v; } +// { return dist(rhs).v!=(value_type)0.0; } + + //! fastangle Difference Function + /*! This function will return the + shortest physical distance between + two angles, from -PI/2 to PI/2 + \warning Not yet tested + \sa fastangle operator-(const fastangle &) */ + fastangle + dist(const fastangle &rhs)const + { + fastangle ret; + ret.v=v-rhs.v; + ret.v-=(unit)std::floor(ret.v+0.5f); + return ret; + } + + //! Rotation Modulus + /*! This function will return the + value of the fastangle between 0 and 2PI */ + fastangle + mod()const + { + fastangle ret(*this); + ret.v-=(unit)std::floor(ret.v); + return ret; + } + + static fastangle + zero() + { + fastangle ret; + ret.v=0; + return ret; + } + + bool operator!()const { return v==unit(0); } + + /* + ** Conversion Classes + */ + + class radians; + class degrees; + class rotations; + + /* + ** Trigonometric Classes + */ + + class sin; + class cos; + class tan; + + /* + ** Friend classes + */ + + friend class radians; + friend class degrees; + friend class rotations; + friend class sin; + friend class cos; + friend class tan; + + /* + ** Bleh... + */ + + typedef radians rad; + typedef degrees deg; + typedef rotations rot; + +}; // END of class fastangle + +/*! ======================================================================== +** \class fastangle::radians +** \brief fastangle representation in radians +** +** A more detailed description needs to be written. +*/ +class fastangle::radians : public fastangle +{ +public: + radians(const value_type &x) { v=x/((value_type)PI*2.0f); } + radians(const fastangle &a):fastangle(a) { } + radians mod()const { return fastangle::mod(); } + radians dist(const fastangle &rhs)const { return fastangle::dist(rhs); } + operator value_type()const { return get(); } + value_type get()const { return (value_type)v*(value_type)PI*2.0f; } +}; // END of class fastangle::radians + +/*! ======================================================================== +** \class fastangle::degrees +** \brief fastangle representation in degrees +** +** A more detailed description needs to be written. +*/ +class fastangle::degrees : public fastangle +{ +public: + degrees(const value_type &x) { v=x/360; } + degrees(const fastangle &a):fastangle(a) { } + degrees mod()const { return fastangle::mod(); } + degrees dist(const fastangle &rhs)const { return fastangle::dist(rhs); } + operator value_type()const { return get(); } + value_type get()const { return v*360/*(value_type)(v-::floor(v))*360*/; } +}; // END of class fastangle::degrees + +/*! ======================================================================== +** \class fastangle::rotations +** \brief fastangle representation in rotations +** +** A more detailed description needs to be written. +*/ +class fastangle::rotations : public fastangle +{ +public: + rotations(const value_type &x) { v=x; } + rotations(const fastangle &a):fastangle(a) { } + rotations mod()const { return fastangle::mod(); } + rotations dist(const fastangle &rhs)const { return fastangle::dist(rhs); } + operator value_type()const { return get(); } + value_type get()const { return v; } +}; // END of class fastangle::rotations + +/*! ======================================================================== +** \class fastangle::sin +** \brief fastangle representation as a sine function +** +** A more detailed description needs to be written. +*/ +class fastangle::sin : public fastangle +{ +public: + sin(const value_type &x) { v.data()=_fastangle_asin_table[(int)((x+1)*(value_type)(1<<(ETL_FASTANGLE_LOOKUP_RES-1)))]; } + sin(const fastangle &a):fastangle(a) { } + sin mod()const { return fastangle::mod(); } + sin dist(const fastangle &rhs)const { return fastangle::dist(rhs); } + operator value_type()const { return get(); } + value_type get()const { return (value_type)_fastangle_sin_table[v.data()&( (1<1) + v.data()=(1<<(ETL_FASTANGLE_LOOKUP_RES-2))-_fastangle_atan_table[(int)(((1.0/x)+1)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]; + else if(x<-1) + v.data()=-(1<<(ETL_FASTANGLE_LOOKUP_RES-1)) + (1<<(ETL_FASTANGLE_LOOKUP_RES-2)) - _fastangle_atan_table[(int)(((1.0/x)+1)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]; + else + v.data()=_fastangle_atan_table[(int)((x+1)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]; + } + + tan(const value_type &y,const value_type &x) + { + if(x>=0 && y>=0) // First quadrant + { + if(y>x) + v.data()=(1<<(ETL_FASTANGLE_LOOKUP_RES-2))-_fastangle_atan_table[(int)(((x/y)+1)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]; + else + v.data()=_fastangle_atan_table[(int)(((y/x)+1)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]; + } + else if(x>=0 && y<0) // Fourth quadrant + { + if(-y>x) + v.data()=-(1<<(ETL_FASTANGLE_LOOKUP_RES-1)) + (1<<(ETL_FASTANGLE_LOOKUP_RES-2))-_fastangle_atan_table[(int)(((x/y)+1.0)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]; + else + v.data()=_fastangle_atan_table[(int)(((y/x)+1.0)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]; + } + else if(x<0 && y>=0) // Second quadrant + { + if(y>-x) + v.data()=(1<<(ETL_FASTANGLE_LOOKUP_RES-2))-_fastangle_atan_table[(int)(((x/y)+1.0)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]; + else + v.data()=_fastangle_atan_table[(int)(((y/x)+1.0)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]+(1<<(ETL_FASTANGLE_LOOKUP_RES-1)); + } + else if(x<0 && y<0) // Third Quadrant + { + if(-y>-x) + v.data()=(1<<(ETL_FASTANGLE_LOOKUP_RES-2))-_fastangle_atan_table[(int)(((x/y)+1.0)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))] - (1<<(ETL_FASTANGLE_LOOKUP_RES-1)); + else + v.data()=_fastangle_atan_table[(int)(((y/x)+1.0)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]-(1<<(ETL_FASTANGLE_LOOKUP_RES-1)); + } + else v.data()=0; + } + tan(const fastangle &a):fastangle(a) { } + tan mod()const { return fastangle::mod(); } + tan dist(const fastangle &rhs)const { return fastangle::dist(rhs); } + operator value_type()const { return get(); } + value_type get()const { return (value_type)_fastangle_tan_table[v.data()&( (1< +struct affine_combo +{ + etl::fastangle operator()(const etl::fastangle &a,const etl::fastangle &b,const float &t)const + { + return b.dist(a)*t+a; + } + + etl::fastangle reverse(const etl::fastangle &x, const etl::fastangle &b, const float &t)const + { + return x.dist(b*t)*((float)1/((float)1-t)); + } +}; + +template <> +struct distance_func : public std::binary_function +{ + etl::fastangle operator()(const etl::fastangle &a,const etl::fastangle &b)const + { + etl::fastangle delta=b.dist(a); + if(delta + +/* === M A C R O S ========================================================= */ + +// the "+0.5" code was commented out - maybe to make thing run faster? +// it can be re-enabled by uncommenting this next line: +// #define ROUND_TO_NEAREST_INTEGER + +#ifndef ETL_FIXED_TYPE +# define ETL_FIXED_TYPE int +#endif + +#ifndef ETL_FIXED_BITS +#define ETL_FIXED_BITS 12 +#endif + +#ifndef ETL_FIXED_EPSILON +#define ETL_FIXED_EPSILON _EPSILON() +#endif + +#ifdef __GNUC___ +#define ETL_ATTRIB_CONST __attribute__ ((const)) +#define ETL_ATTRIB_PURE __attribute__ ((pure)) +#define ETL_ATTRIB_INLINE __attribute__ ((always_inline)) +#else +#define ETL_ATTRIB_CONST +#define ETL_ATTRIB_PURE +#define ETL_ATTRIB_INLINE +#endif + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +// Forward declarations +template class fixed_base; +//template<> class fixed_base; + +_ETL_END_NAMESPACE + +_STD_BEGIN_NAMESPACE +template _ETL::fixed_base abs(const _ETL::fixed_base&); +template _ETL::fixed_base cos(const _ETL::fixed_base&); +template _ETL::fixed_base cosh(const _ETL::fixed_base&); +template _ETL::fixed_base exp(const _ETL::fixed_base&); +template _ETL::fixed_base log(const _ETL::fixed_base&); +template _ETL::fixed_base log10(const _ETL::fixed_base&); +template _ETL::fixed_base pow(const _ETL::fixed_base&, int); +template _ETL::fixed_base pow(const _ETL::fixed_base&, const T&); +template _ETL::fixed_base pow(const _ETL::fixed_base&, + const _ETL::fixed_base&); +template _ETL::fixed_base pow(const _ETL::fixed_base&, const _ETL::fixed_base&); +template _ETL::fixed_base sin(const _ETL::fixed_base&); +template _ETL::fixed_base sinh(const _ETL::fixed_base&); +template _ETL::fixed_base sqrt(const _ETL::fixed_base&); +template _ETL::fixed_base tan(const _ETL::fixed_base&); +template _ETL::fixed_base tanh(const _ETL::fixed_base&); +_STD_END_NAMESPACE +_ETL_BEGIN_NAMESPACE + +/*! ======================================================================== +** \class fixed_base +** \brief Fixed-point template base class +** +** A more detailed description needs to be written. +*/ +template +class fixed_base +{ +public: + typedef T value_type; +private: + T _data; + + typedef fixed_base _fixed; + typedef fixed_base self_type; + + inline static bool _TYPE_SMALLER_THAN_INT() ETL_ATTRIB_CONST ETL_ATTRIB_INLINE; + inline static bool _USING_ALL_BITS() ETL_ATTRIB_CONST ETL_ATTRIB_INLINE; + inline static value_type _ONE() ETL_ATTRIB_CONST ETL_ATTRIB_INLINE; + inline static value_type _F_MASK() ETL_ATTRIB_CONST ETL_ATTRIB_INLINE; + inline static float _EPSILON() ETL_ATTRIB_CONST ETL_ATTRIB_INLINE; + + class raw { }; +public: + fixed_base()ETL_ATTRIB_INLINE; + fixed_base(const float &f)ETL_ATTRIB_INLINE; + fixed_base(const double &f)ETL_ATTRIB_INLINE; + fixed_base(const long double &f)ETL_ATTRIB_INLINE; + fixed_base(const int &i)ETL_ATTRIB_INLINE; + fixed_base(const int &n,const int &d)ETL_ATTRIB_INLINE; //!< Fraction constructor + fixed_base(const _fixed &x)ETL_ATTRIB_INLINE; + fixed_base(value_type x,raw)ETL_ATTRIB_INLINE; + + T &data() ETL_ATTRIB_PURE ETL_ATTRIB_INLINE; + const T &data()const ETL_ATTRIB_PURE ETL_ATTRIB_INLINE; + + const _fixed& operator+=(const _fixed &rhs) ETL_ATTRIB_INLINE; + const _fixed& operator-=(const _fixed &rhs) ETL_ATTRIB_INLINE; + template const _fixed& operator*=(const U &rhs) ETL_ATTRIB_INLINE; + template const _fixed& operator/=(const U &rhs) ETL_ATTRIB_INLINE; + const _fixed& operator*=(const _fixed &rhs) ETL_ATTRIB_INLINE; + const _fixed& operator/=(const _fixed &rhs) ETL_ATTRIB_INLINE; + const _fixed& operator*=(const int &rhs) ETL_ATTRIB_INLINE; + const _fixed& operator/=(const int &rhs) ETL_ATTRIB_INLINE; + + + template _fixed operator+(const U &rhs)const ETL_ATTRIB_INLINE; + template _fixed operator-(const U &rhs)const ETL_ATTRIB_INLINE; + template _fixed operator*(const U &rhs)const ETL_ATTRIB_INLINE; + template _fixed operator/(const U &rhs)const ETL_ATTRIB_INLINE; + _fixed operator+(const _fixed &rhs)const ETL_ATTRIB_INLINE; + _fixed operator-(const _fixed &rhs)const ETL_ATTRIB_INLINE; + _fixed operator*(const _fixed &rhs)const ETL_ATTRIB_INLINE; + _fixed operator/(const _fixed &rhs)const ETL_ATTRIB_INLINE; + _fixed operator*(const int &rhs)const ETL_ATTRIB_INLINE; + _fixed operator/(const int &rhs)const ETL_ATTRIB_INLINE; + _fixed operator*(const float &rhs)const ETL_ATTRIB_INLINE; + _fixed operator*(const double &rhs)const ETL_ATTRIB_INLINE; + + // Negation Operator + _fixed operator-()const ETL_ATTRIB_INLINE; + + // Casting Operators + inline operator float()const ETL_ATTRIB_INLINE; + inline operator double()const ETL_ATTRIB_INLINE; + inline operator long double()const ETL_ATTRIB_INLINE; + inline operator int()const ETL_ATTRIB_INLINE; + inline operator bool()const ETL_ATTRIB_INLINE; + + _fixed floor()const; + _fixed ceil()const; + _fixed round()const; + + bool operator==(const _fixed &rhs)const { return data()==rhs.data(); } + bool operator!=(const _fixed &rhs)const { return data()!=rhs.data(); } + bool operator<(const _fixed &rhs)const { return data()(const _fixed &rhs)const { return data()>rhs.data(); } + bool operator<=(const _fixed &rhs)const { return data()<=rhs.data(); } + bool operator>=(const _fixed &rhs)const { return data()>=rhs.data(); } +}; + + +template +fixed_base::fixed_base() +{} + +template +fixed_base::fixed_base(const _fixed &x):_data(x._data) +{} + +template +fixed_base::fixed_base(const float &f):_data(static_cast(f*_ONE() +#ifdef ROUND_TO_NEAREST_INTEGER + +0.5f +#endif + )) {} + +template +fixed_base::fixed_base(const double &f):_data(static_cast(f*_ONE() +#ifdef ROUND_TO_NEAREST_INTEGER + +0.5 +#endif + )) {} + +template +fixed_base::fixed_base(const long double &f):_data(static_cast(f*_ONE() +#ifdef ROUND_TO_NEAREST_INTEGER + +0.5 +#endif + )) {} + +template +fixed_base::fixed_base(const int &i):_data(i< +fixed_base::fixed_base(value_type x,raw):_data(x) { } + +template +fixed_base::fixed_base(const int &n,const int &d):_data((n< inline bool +fixed_base::_TYPE_SMALLER_THAN_INT() +{ + return sizeof(T) inline bool +fixed_base::_USING_ALL_BITS() +{ + return sizeof(T)*8==FIXED_BITS; +} + +template inline T +fixed_base::_ONE() +{ + return static_cast((_USING_ALL_BITS()?~T(0):1< inline T +fixed_base::_F_MASK() +{ + return static_cast(_USING_ALL_BITS()?~T(0):_ONE()-1); +} + +template inline float +fixed_base::_EPSILON() +{ + return 1.0f/((float)_ONE()*2); +} + + +template T & +fixed_base::data() +{ + return _data; +} + +template const T & +fixed_base::data()const +{ + return _data; +} + +//! fixed+=fixed +template const fixed_base & +fixed_base::operator+=(const _fixed &rhs) +{ + _data+=rhs._data; + return *this; +} + +//! fixed-=fixed +template const fixed_base & +fixed_base::operator-=(const _fixed &rhs) +{ + _data-=rhs._data; + return *this; +} + +//! fixed*=fixed +template const fixed_base & +fixed_base::operator*=(const _fixed &rhs) +{ + if(_TYPE_SMALLER_THAN_INT()) + _data=static_cast((int)_data*(int)rhs._data>>FIXED_BITS); + else + { + _data*=rhs._data; + _data>>=FIXED_BITS; + } + + return *this; +} + +//! fixed/=fixed +template const fixed_base & +fixed_base::operator/=(const _fixed &rhs) +{ + if(_TYPE_SMALLER_THAN_INT()) + _data=static_cast((int)_data/(int)rhs._data< template const fixed_base & +fixed_base::operator*=(const U &rhs) +{ + return operator*=(fixed_base(rhs)); +} + +template template const fixed_base & +fixed_base::operator/=(const U &rhs) +{ + return operator/=(fixed_base(rhs)); +} + +//! fixed*=int +template const fixed_base & +fixed_base::operator*=(const int &rhs) +{ + _data*=rhs; return *this; +} + +//! fixed/=int +template const fixed_base & +fixed_base::operator/=(const int &rhs) +{ + _data/=rhs; return *this; +} + + + + + + + +//! fixed + fixed +template fixed_base +fixed_base::operator+(const _fixed &rhs)const +{ + _fixed ret; + ret._data=_data+rhs._data; + return ret; +} + +//! fixed - fixed +template fixed_base +fixed_base::operator-(const _fixed &rhs)const +{ + _fixed ret; + ret._data=_data-rhs._data; + return ret; +} + +//! fixed * fixed +template fixed_base +fixed_base::operator*(const _fixed &rhs)const +{ + _fixed ret; + ret._data=((_data*rhs._data)>>FIXED_BITS); + return ret; + //return reinterpret_cast<_fixed>((_data*rhs._data)>>FIXED_BITS); +} + +//! fixed / fixed +template fixed_base +fixed_base::operator/(const _fixed &rhs)const +{ + _fixed ret; + ret._data=((_data/rhs._data)<((_data/rhs._data)< template fixed_base +fixed_base::operator+(const U &rhs) const +{ + return operator+(fixed_base(rhs)); +} + +//! fixed - ... +template template fixed_base +fixed_base::operator-(const U &rhs) const +{ + return operator-(fixed_base(rhs)); +} + +//! fixed * ... +template template fixed_base +fixed_base::operator*(const U &rhs) const +{ + return operator*(fixed_base(rhs)); +} + +//! fixed / ... +template template fixed_base +fixed_base::operator/(const U &rhs) const +{ + return operator/(fixed_base(rhs)); +} + +//! fixed * int +template fixed_base +fixed_base::operator*(const int &rhs)const +{ + _fixed ret; + ret._data=_data*rhs; + return ret; + //return reinterpret_cast<_fixed>(_data*rhs); +} + +//! fixed * float +template fixed_base +fixed_base::operator*(const float &rhs)const +{ + return (*this)*_fixed(rhs); +} + +//! fixed * double +template fixed_base +fixed_base::operator*(const double &rhs)const +{ + return (*this)*_fixed(rhs); +} + + +//! fixed / int +template fixed_base +fixed_base::operator/(const int &rhs)const +{ + _fixed ret; + ret._data=_data/rhs; + return ret; + //return reinterpret_cast<_fixed>(_data/rhs); +} + +//! float * fixed +template fixed_base +operator*(const float& lhs, const fixed_base &rhs) +{ + return rhs*lhs; +} + +//! double * fixed +template fixed_base +operator*(const double& lhs, const fixed_base &rhs) +{ + return rhs*lhs; +} + + + + + + +// Negation Operator +template fixed_base +fixed_base::operator-()const +{ + _fixed ret; ret._data=-_data; return ret; +} + +// Casting Operators +template +fixed_base::operator float()const +{ + return static_cast(_data)/static_cast(_ONE()); +} + +template +fixed_base::operator double()const +{ + return static_cast(_data)/static_cast(_ONE()); +} + +template +fixed_base::operator long double()const +{ + return static_cast(_data)/static_cast(_ONE()); +} + +template +fixed_base::operator int()const +{ + return static_cast(_data>>FIXED_BITS); +} + +template +fixed_base::operator bool()const +{ + return static_cast(_data); +} + + +template fixed_base +fixed_base::floor()const +{ + _fixed ret(*this); + ret._data&=~_F_MASK(); + return ret; +} + +template fixed_base +fixed_base::ceil()const +{ + _fixed ret(*this); + if(ret._data&_F_MASK()) + ret._data=(ret._data&~_F_MASK()) + _ONE(); + else + ret._data&=~_F_MASK(); + return ret; +} + +template fixed_base +fixed_base::round()const +{ + _fixed ret(*this); + ret._data+=_ONE()>>1; + ret._data&=~_F_MASK(); + return ret; +} + + + + + + + + + + + + + + + + + + + + + + + + + + +typedef fixed_base fixed; + +_ETL_END_NAMESPACE + +_STD_BEGIN_NAMESPACE + +template +inline _ETL::fixed_base +ceil(const _ETL::fixed_base &rhs) +{ return rhs.ceil(); } + +template +_ETL::fixed_base +floor(const _ETL::fixed_base &rhs) +{ return rhs.floor(); } + +template +_ETL::fixed_base +round(const _ETL::fixed_base &rhs) +{ return rhs.round(); } + +template +_ETL::fixed_base +abs(const _ETL::fixed_base &rhs) +{ return rhs<_ETL::fixed_base(0)?-rhs:rhs; } + +_STD_END_NAMESPACE + +/* +template bool +operator==(const _ETL::fixed_base& lhs, const _ETL::fixed_base& rhs) +{ return lhs.data()==rhs.data(); } + +template bool +operator!=(const _ETL::fixed_base& lhs, const _ETL::fixed_base& rhs) +{ return lhs.data()!=rhs.data(); } + +template bool +operator>(const _ETL::fixed_base& lhs, const _ETL::fixed_base& rhs) +{ return lhs.data()>rhs.data(); } + +template bool +operator<(const _ETL::fixed_base& lhs, const _ETL::fixed_base& rhs) +{ return lhs.data() bool +operator>=(const _ETL::fixed_base& lhs, const _ETL::fixed_base& rhs) +{ return lhs.data()>=rhs.data(); } + +template bool +operator<=(const _ETL::fixed_base& lhs, const _ETL::fixed_base& rhs) +{ return lhs.data()<=rhs.data(); } +*/ + + +#if defined(__GNUC__) && __GNUC__ == 3 +template U +operator*(const U &a,const _ETL::fixed_base &b) + { return a*static_cast(b); } + +template U +operator/(const U &a,const _ETL::fixed_base &b) + { return a/static_cast(b); } + +template U +operator+(const U &a,const _ETL::fixed_base &b) + { return a+static_cast(b); } + +template U +operator-(const U &a,const _ETL::fixed_base &b) + { return a-static_cast(b); } + + +/* +inline const float & +operator*=(float &a,const _ETL::fixed &b) + { a*=(float)b; return a; } + +inline const float & +operator/=(float &a,const _ETL::fixed &b) + { a/=(float)b; return a; } + +inline const float & +operator-=(float &a,const _ETL::fixed &b) + { a-=(float)b; return a; } + +inline const float & +operator+=(float &a,const _ETL::fixed &b) + { a+=(float)b; return a; } +*/ +#endif + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_gaussian.h b/ETL/ETL/_gaussian.h new file mode 100644 index 0000000..781b1ab --- /dev/null +++ b/ETL/ETL/_gaussian.h @@ -0,0 +1,315 @@ +/*! ======================================================================== +** Extended Template Library +** Gaussian Blur Template Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__GAUSSIAN_H +#define __ETL__GAUSSIAN_H + +/* === H E A D E R S ======================================================= */ + +#include // for memset() +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +template void +gaussian_blur_5x5_(T pen,int w, int h, +typename T::pointer SC0, +typename T::pointer SC1, +typename T::pointer SC2, +typename T::pointer SC3) +{ + int x,y; + typename T::value_type Tmp1,Tmp2,SR0,SR1,SR2,SR3; + + //typename T::iterator_x iter; + + // Setup the row buffers + for(x=0;x=h) + {yadj=(h-y)-1; SR0=pen.y()[yadj]*1.35;} + else + {yadj=0; SR0=pen.get_value()*1.35; } + + SR1=SR2=SR3=typename T::value_type(); + for(x=0;x=w) + Tmp1=pen[yadj][(w-x)-1]; + else + Tmp1=*pen[yadj]; + + Tmp2=SR0+Tmp1; + SR0=Tmp1; + Tmp1=SR1+Tmp2; + SR1=Tmp2; + Tmp2=SR2+Tmp1; + SR2=Tmp1; + Tmp1=SR3+Tmp2; + SR3=Tmp2; + + // Column Machine + Tmp2=SC0[x]+Tmp1; + SC0[x]=Tmp1; + Tmp1=SC1[x]+Tmp2; + SC1[x]=Tmp2; + Tmp2=SC2[x]+Tmp1; + SC2[x]=Tmp1; + if(y>1&&x>1) + pen[-2][-2]=(SC3[x]+Tmp2)/256; + SC3[x]=Tmp2; + } + pen.dec_x(x); + } + +} + +template void +gaussian_blur_5x5(T pen, int w, int h) +{ + typename T::pointer SC0=new typename T::value_type[w+2]; + typename T::pointer SC1=new typename T::value_type[w+2]; + typename T::pointer SC2=new typename T::value_type[w+2]; + typename T::pointer SC3=new typename T::value_type[w+2]; + + gaussian_blur_5x5_(pen,w,h,SC0,SC1,SC2,SC3); + + delete [] SC0; + delete [] SC1; + delete [] SC2; + delete [] SC3; +} + +template void +gaussian_blur_5x5(T begin, T end) +{ + typename T::difference_type size(end-begin); + + typename T::pointer SC0=new typename T::value_type[size.x+2]; + typename T::pointer SC1=new typename T::value_type[size.x+2]; + typename T::pointer SC2=new typename T::value_type[size.x+2]; + typename T::pointer SC3=new typename T::value_type[size.x+2]; + + gaussian_blur_5x5_(begin,size.x,size.y,SC0,SC1,SC2,SC3); + + delete [] SC0; + delete [] SC1; + delete [] SC2; + delete [] SC3; +} + +template void +gaussian_blur_3x3(T pen,int w, int h) +{ + int x,y; + typename T::value_type Tmp1,Tmp2,SR0,SR1; + +// typename T::iterator_x iter; + + typename T::pointer SC0=new typename T::value_type[w+1]; + typename T::pointer SC1=new typename T::value_type[w+1]; + + // Setup the row buffers + for(x=0;x=h) + {yadj=-1; SR1=SR0=pen.y()[yadj];} + else + {yadj=0; SR1=SR0=pen.get_value(); } + + for(x=0;x=w) + Tmp1=pen[yadj][(w-x)-2]; + else + Tmp1=*pen[yadj]; + + Tmp2=SR0+Tmp1; + SR0=Tmp1; + Tmp1=SR1+Tmp2; + SR1=Tmp2; + + Tmp2=SC0[x]+Tmp1; + SC0[x]=Tmp1; + if(y&&x) + pen[-1][-1]=(SC1[x]+Tmp2)/16; + SC1[x]=Tmp2; + } + pen.dec_x(x); + } + + delete [] SC0; + delete [] SC1; +} + +//! 2D 3x3 pixel gaussian blur +template void +gaussian_blur_3x3(_PEN begin, _PEN end) +{ + typename _PEN::difference_type size(end-begin); + gaussian_blur_3x3(begin,size.x,size.y); +} + +//! 1D 3 pixel gaussian blur +template void +gaussian_blur_3(I begin, I end, bool endpts = true) +{ +// typedef typename I _itertype; +// int i; + typename std::iterator_traits::value_type Tmp1,Tmp2,SR0,SR1; + + SR0=SR1=*begin; + I iter,prev=begin; + for(iter=begin;iter!=end;prev=iter++) + { + Tmp1=*iter; + Tmp2=SR0+Tmp1; + SR0=Tmp1; + Tmp1=SR1+Tmp2; + SR1=Tmp2; + if(iter!=begin && ( endpts || (prev != begin) )) + *prev=(Tmp1)/4; + } + + if(endpts) + { + Tmp1=*prev; + Tmp2=SR0+Tmp1; + SR0=Tmp1; + Tmp1=SR1+Tmp2; + SR1=Tmp2; + *prev=(Tmp1)/4; + } +} + +//! 2D 3x1 pixel gaussian blur +template void +gaussian_blur_3x1(_PEN begin, _PEN end) +{ + typename _PEN::difference_type size=end-begin; + for(;size.y>0;size.y--, begin.inc_y()) + gaussian_blur_3(begin.x(),begin.x()+size.x); +} + +//! 2D 1x3 pixel gaussian blur +template void +gaussian_blur_1x3(_PEN begin, _PEN end) +{ + typename _PEN::difference_type size=end-begin; + for(;size.x>0;size.x--,begin.inc_x()) + gaussian_blur_3(begin.y(),begin.y()+size.y); +} + +template void +gaussian_blur(T pen, int w, int h, int blur_x, int blur_y) +{ + typename T::pointer SC0=new typename T::value_type[w+2]; + typename T::pointer SC1=new typename T::value_type[w+2]; + typename T::pointer SC2=new typename T::value_type[w+2]; + typename T::pointer SC3=new typename T::value_type[w+2]; + + blur_x--; + blur_y--; + + while(blur_x&&blur_y) + { + if(blur_x>=4 && blur_y>=4) + { + gaussian_blur_5x5_(pen,w,h,SC0,SC1,SC2,SC3); + blur_x-=4,blur_y-=4; + } + else if(blur_x>=2 && blur_y>=2) + { + gaussian_blur_3x3(pen,w,h); + blur_x-=2,blur_y-=2; + } + else + blur_x--,blur_y--; + } + while(blur_x) + { + if(blur_x>=2) + { + gaussian_blur_3x1(pen,T(pen).move(w,h)); + blur_x-=2; + } + else + blur_x--; + } + while(blur_y) + { + if(blur_y>=2) + { + gaussian_blur_1x3(pen,T(pen).move(w,h)); + blur_y-=2; + } + else + blur_y--; + } + + delete [] SC0; + delete [] SC1; + delete [] SC2; + delete [] SC3; +} + +template void +gaussian_blur(T begin, T end,int w, int h) +{ + typename T::difference_type size(end-begin); + gaussian_blur(begin,size.x,size.y,w,h); +} + +template void +gaussian_blur(T begin, T end,int w) +{ + typename T::difference_type size(end-begin); + gaussian_blur(begin,size.x,size.y,w,w); +} + +_ETL_END_NAMESPACE + +/* === E X T E R N S ======================================================= */ + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_handle.h b/ETL/ETL/_handle.h new file mode 100644 index 0000000..393894c --- /dev/null +++ b/ETL/ETL/_handle.h @@ -0,0 +1,826 @@ +/* === E T L =============================================================== */ +/*! \file _handle.h +** $Id$ +** \brief Template Object Handle Implementation +** \internal +** +** \legal +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** \note +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__HANDLE_H +#define __ETL__HANDLE_H + +/* === H E A D E R S ======================================================= */ + +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +#define ETL_SELF_DELETING_SHARED_OBJECT + +/* === C L A S S E S & S T R U C T S ======================================= */ + +#ifdef NDEBUG +#define assert_cast static_cast +#else +#define assert_cast dynamic_cast +#endif + + +_ETL_BEGIN_NAMESPACE + +// Forward Declarations +template class handle; +template class loose_handle; +template class rhandle; + + +// ======================================================================== +/*! \class shared_object _handle.h ETL/handle +** \brief Shared Object Base Class +** \see handle, loose_handle +** \writeme +*/ +class shared_object +{ +private: + mutable int refcount; +#ifdef ETL_LOCK_REFCOUNTS + mutable etl::mutex mtx; +#endif + +protected: + shared_object():refcount(0) { } + +#ifdef ETL_SELF_DELETING_SHARED_OBJECT + virtual ~shared_object() { } +#else + ~shared_object() { } +#endif + +public: + void ref()const + { +#ifdef ETL_LOCK_REFCOUNTS + etl::mutex::lock lock(mtx); +#endif + assert(refcount>=0); + refcount++; + } + + //! Returns \c false if object needs to be deleted + bool unref()const + { + bool ret = true; + { +#ifdef ETL_LOCK_REFCOUNTS + etl::mutex::lock lock(mtx); +#endif + assert(refcount>0); + + refcount--; + + if(refcount==0) { + ret = false; +#ifdef ETL_SELF_DELETING_SHARED_OBJECT + refcount=-666; +#endif + } + } + +#ifdef ETL_SELF_DELETING_SHARED_OBJECT + if (!ret) + delete this; +#endif + return ret; + } + + int count()const { return refcount; } + +}; // END of class shared_object + +// ======================================================================== +/*! \class virtual_shared_object _handle.h ETL/handle +** \brief Virtual Shared Object Base Class +** \see handle, loose_handle +** \writeme +*/ +class virtual_shared_object +{ +protected: + virtual_shared_object() { } +public: + virtual ~virtual_shared_object()=0; + virtual void ref()const=0; + virtual bool unref()const=0; + virtual int count()const=0; + virtual virtual_shared_object *clone()=0; +}; // END of class virtual_shared_object + +// ======================================================================== +/*! \class handle _handle.h ETL/handle +** \brief Object Handle +** \see shared_object, loose_handle +** \writeme +*/ +template +class handle +{ +public: + + typedef T value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T* pointer; + typedef const T* const_pointer; + typedef int count_type; + typedef int size_type; + +protected: +#ifdef _DEBUG +public: +#endif + value_type *obj; //!< Pointer to object + +public: + + //! Default constructor - empty handle + handle():obj(NULL) {} + + //! Constructor that constructs from a pointer to new object + handle(pointer x):obj(x) + { + if(obj) + obj->ref(); + } + + //! Default copy constructor + handle(const handle &x):obj(x.get()) + { + if(obj) + obj->ref(); + } + + //! Handle is released on deletion + ~handle() { detach(); } + + //! Template Assignment operator + /*! \note This class may not be necessary, and may be removed + ** at some point in the future. + */ + /* + template handle & + operator=(const handle &x) + { + if(x.get()==obj) + return *this; + + detach(); + + obj=static_cast(x.get()); + if(obj)obj->ref(); + return *this; + } + */ + + //! Assignment operator + handle & + operator=(const handle &x) + { + if(x.get()==obj) + return *this; + + detach(); + + obj=x.get(); + if(obj)obj->ref(); + return *this; + } + + //! Swaps the values of two handles without reference counts + handle & + swap(handle &x) + { + pointer ptr=x.obj; + x.obj=obj; + obj=ptr; + return *this; + } + + //! Handle detach procedure + /*! unref()'s the object and sets the internal object pointer to \c NULL */ + void + detach() + { + pointer xobj(obj); + obj=0; +#ifdef ETL_SELF_DELETING_SHARED_OBJECT + if(xobj) + xobj->unref(); +#else + if(xobj && !xobj->unref()) + delete xobj; +#endif + } + + // This will be reintroduced with a new function + //void release() { detach(); } + + void reset() { detach(); } + + bool empty()const { return obj==0; } + + //! Creates a new instance of a T object and puts it in the handle. + /*! Uses the default constructor */ + void spawn() { operator=(handle(new T())); } + + handle clone()const { assert(obj); return static_cast(obj->clone()); } + + //! Returns a constant handle to our object + handle constant()const { assert(obj); return *this; } + + //! Returns number of instances + count_type + count()const + { return obj?obj->count():0; } + + //! Returns true if there is only one instance of the object + bool + unique()const + { assert(obj); return count()==1; } + + reference + operator*()const + { assert(obj); return *obj; } + + pointer + operator->()const + { assert(obj); return obj; } + + //! More explicit bool cast + operator bool()const + { return obj!=NULL; } + + operator handle()const + { return handle(static_cast(obj)); } + + //! static_cast\<\> wrapper + template static handle cast_static (const handle &x) { return handle(static_cast (x.get())); } + //! dynamic_cast\<\> wrapper + template static handle cast_dynamic (const handle &x) { return handle(dynamic_cast (x.get())); } + //! const_cast\<\> wrapper + template static handle cast_const (const handle &x) { return handle(const_cast (x.get())); } + //! reinterpret_cast\<\> wrapper + template static handle cast_reinterpret(const handle &x) { return handle(reinterpret_cast(x.get())); } + + template static handle cast_static (const loose_handle &x); + template static handle cast_dynamic (const loose_handle &x); + template static handle cast_const (const loose_handle &x); + template static handle cast_reinterpret(const loose_handle &x); + + template static handle cast_static (const rhandle &x); + template static handle cast_dynamic (const rhandle &x); + template static handle cast_const (const rhandle &x); + template static handle cast_reinterpret(const rhandle &x); + + template static handle cast_static (U* x); + template static handle cast_dynamic (U* x); + template static handle cast_const (U* x); + template static handle cast_reinterpret(U* x); + + //! Returns pointer to the object that is being wrapped + pointer get()const { return obj; } + + bool + operator!()const + { return !obj; } + + //! static_cast<> overload -- Useful for implicit casts + template + operator handle()const + { return handle(static_cast(obj)); } +}; // END of template class handle + +// ======================================================================== +/*! \class rshared_object _handle.h ETL/handle +** \brief Replaceable Shared Object Base Class +** \see rhandle +** \writeme +*/ +class rshared_object : public shared_object +{ +private: + mutable int rrefcount; + +public: + void *front_; + void *back_; + +protected: + rshared_object():rrefcount(0),front_(0),back_(0) { } + +public: + void rref()const + { rrefcount++; } + + void runref()const + { + assert(rrefcount>0); + rrefcount--; + } + + int rcount()const + { return rrefcount; } +}; // END of class rshared_object + +// ======================================================================== +/*! \class rhandle _handle.h ETL/handle +** \brief Replaceable Object Handle +** \see rshared_object, handle, loose_handle +** \writeme +*/ +template +class rhandle : public handle +{ + friend class rshared_object; +public: + + typedef T value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T* pointer; + typedef const T* const_pointer; + typedef int count_type; + typedef int size_type; + + + using handle::count; + using handle::unique; + using handle::operator bool; + using handle::get; + using handle::operator*; + using handle::operator->; + + /* + operator const handle&()const + { return *this; } + */ + +private: + using handle::obj; + + rhandle *prev_; + rhandle *next_; + + void add_to_rlist() + { +// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing + + assert(obj); + obj->rref(); + + // If this is the first reversible handle + if(!obj->front_) + { + obj->front_=obj->back_=this; + prev_=next_=0; + return; + } + + prev_=reinterpret_cast*>(obj->back_); + next_=0; + prev_->next_=this; + obj->back_=this; + } + + void del_from_rlist() + { +// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing + assert(obj); + obj->runref(); + + // If this is the last reversible handle + if(obj->front_==obj->back_) + { + obj->front_=obj->back_=0; + prev_=next_=0; + return; + } + + if(!prev_) + obj->front_=(void*)next_; + else + prev_->next_=next_; + + if(!next_) + obj->back_=(void*)prev_; + else + next_->prev_=prev_; + } + +public: + + //! Default constructor - empty handle + rhandle() {} + + //! Constructor that constructs from a pointer to new object + rhandle(pointer x):handle(x) + { +// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing + if(obj)add_to_rlist(); + } + + rhandle(const handle &x):handle(x) + { +// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing + if(obj)add_to_rlist(); + } + + //! Default copy constructor + rhandle(const rhandle &x):handle(x) + { +// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing + if(obj)add_to_rlist(); + } + + //! Handle is released on deletion + ~rhandle() { detach(); } + + //! Template Assignment operator + /*! \note This class may not be necessary, and may be removed + ** at some point in the future. + */ + /* + template const handle & + operator=(const handle &x) + { + if(x.get()==obj) + return *this; + + detach(); + + obj=static_cast(x.get()); + if(obj) + { + obj->ref(); + add_to_rlist(); + } + return *this; + } + */ + + //! Assignment operator + rhandle & + operator=(const rhandle &x) + { +// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing + if(x.get()==obj) + return *this; + + detach(); + + obj=x.get(); + if(obj) + { + obj->ref(); + add_to_rlist(); + } + return *this; + } + + rhandle& + operator=(const handle &x) + { +// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing + if(x.get()==obj) + return *this; + + detach(); + + obj=x.get(); + if(obj) + { + obj->ref(); + add_to_rlist(); + } + return *this; + } + + rhandle& + operator=(value_type* x) + { +// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing + if(x==obj) + return *this; + + detach(); + + obj=x; + if(obj) + { + obj->ref(); + add_to_rlist(); + } + return *this; + } + + //! Handle release procedure + /*! unref()'s the object and sets the internal object pointer to \c NULL */ + void + detach() + { +// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing + if(obj)del_from_rlist(); + handle::detach(); + obj=0; + } + + // This will be reintroduced with a new function + //void release() { detach(); } + + void reset() { detach(); } + + //! Creates a new instance of a T object and puts it in the handle. + /*! Uses the default constructor */ + void spawn() { operator=(handle(new T())); } + + //! Returns number of reversible instances + count_type + rcount()const + { +// value_type*const& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing + return obj?obj->rcount():0; + } + + //! Returns true if there is only one instance of the object + bool + runique()const + { +// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing + assert(obj); return obj->front_==obj->back_; + } + + //! \writeme + int replace(const handle &x) + { +// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing + assert(obj); + assert(x.get()!=obj); + + if(x.get()==obj) + return 0; + + rhandle *iter; + rhandle *next; + + iter=reinterpret_cast*>(obj->front_); + + assert(iter); + + next=iter->next_; + + int i=0; + #ifndef NDEBUG + pointer obj_=obj; + #endif + + for(;iter;iter=next,next=iter?iter->next_:0,i++) + { + assert(iter->get()==obj_); + (*iter)=x; + } + + assert(obj==x.get()); + + return i; + } + + //! Swaps the values of two handles without reference counts + /*! \warning not yet implemented. \writeme */ + handle & + swap(handle &x); + /* + { + assert(0); + pointer ptr=x.obj; + x.obj=obj; + obj=ptr; + return *this; + } + */ +}; // END of template class rhandle + + +// ======================================================================== +/*! \class loose_handle _handle.h ETL/handle +** \brief Loose Object Handle +** \see shared_object, handle +** \writeme +*/ +template +class loose_handle +{ +public: + + typedef T value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T* pointer; + typedef const T* const_pointer; + typedef int count_type; + typedef int size_type; + +protected: +#ifdef _DEBUG +public: +#endif + value_type *obj; //!< Pointer to object + +public: + + //! Default constructor - empty handle + loose_handle():obj(0) {} + + //! Constructor that constructs from a pointer to new object + loose_handle(pointer x):obj(x) { } + + //! Default copy constructor + loose_handle(const loose_handle &x):obj(x.get()) { } + + loose_handle(const handle &x):obj(x.get()) { } + + template const loose_handle & + operator=(const handle &x) + { + if(x.get()==obj) + return *this; + + obj=static_cast(x.get()); + return *this; + } + + template const loose_handle & + operator=(const loose_handle &x) + { + if(x.get()==obj) + return *this; + + obj=static_cast(x.get()); + return *this; + } + + //! Assignment operator + const loose_handle & + operator=(const loose_handle &x) + { + if(x.get()==obj) + return *this; + + obj=x.get(); + return *this; + } + + //! Swaps the values of two handles without reference counts + loose_handle & + swap(loose_handle &x) + { + pointer ptr=x.obj; + x.obj=obj; + obj=ptr; + return *this; + } + + //! Handle release procedure + void detach() { obj=0; } + + // This will be reintroduced with a new function + //void release() { detach(); } + + void reset() { detach(); } + + bool empty()const { return obj==0; } + + handle clone()const { assert(obj); return obj->clone(); } + + //! Returns a constant handle to our object + loose_handle constant()const { return *this; } + + //! Returns number of instances + count_type + count()const + { return obj?obj->count():0; } + + reference + operator*()const + { assert(obj); return *obj; } + + pointer + operator->()const + { assert(obj); return obj; } + + //! static_cast<> overload + //template + //operator loose_handle()const + //{ return loose_handle(static_cast(obj)); } + + //! static_cast<> overload (for consts) + operator loose_handle()const + { return loose_handle(static_cast(obj)); } + + operator handle()const + { return handle(obj); } + + operator rhandle()const + { return rhandle(obj); } + + //! Returns pointer to the object that is being wrapped + pointer get()const { return obj; } + + //! More explicit bool cast + operator bool()const + { return obj!=0; } + + bool + operator!()const + { return !obj; } + + void ref() { if(obj)obj->ref(); } + + bool unref() { if(obj && !obj->unref()){ obj=0; return false; } return true; } +}; // END of template class loose_handle + +// cast loose_handle<> -> handle<> +template template handle handle::cast_static (const loose_handle& x) { return handle(static_cast (x.get())); } +template template handle handle::cast_dynamic (const loose_handle& x) { return handle(dynamic_cast (x.get())); } +template template handle handle::cast_const (const loose_handle& x) { return handle(const_cast (x.get())); } +template template handle handle::cast_reinterpret(const loose_handle& x) { return handle(reinterpret_cast(x.get())); } + +// cast rhandle_handle<> -> handle<> +template template handle handle::cast_static (const rhandle& x) { return handle(static_cast (x.get())); } +template template handle handle::cast_dynamic (const rhandle& x) { return handle(dynamic_cast (x.get())); } +template template handle handle::cast_const (const rhandle& x) { return handle(const_cast (x.get())); } +template template handle handle::cast_reinterpret(const rhandle& x) { return handle(reinterpret_cast(x.get())); } + +// cast U* -> handle<> +template template handle handle::cast_static (U* x) { return handle(static_cast (x)); } +template template handle handle::cast_dynamic (U* x) { return handle(dynamic_cast (x)); } +template template handle handle::cast_const (U* x) { return handle(const_cast (x)); } +template template handle handle::cast_reinterpret(U* x) { return handle(reinterpret_cast(x)); } + +// operator== for handle<>, loose_handle<> and T* +template bool operator==(const handle & lhs,const handle & rhs) { return (lhs.get()==rhs.get()); } +template bool operator==(const loose_handle& lhs,const loose_handle& rhs) { return (lhs.get()==rhs.get()); } +template bool operator==(const handle & lhs,const loose_handle& rhs) { return (lhs.get()==rhs.get()); } +template bool operator==(const loose_handle& lhs,const handle & rhs) { return (lhs.get()==rhs.get()); } +template bool operator==(const handle& lhs,const T* rhs) { return (lhs.get()==rhs); } +template bool operator==(const loose_handle& lhs,const T* rhs) { return (lhs.get()==rhs); } +template bool operator==(const T* lhs,const handle& rhs) { return (lhs ==rhs.get()); } +template bool operator==(const T* lhs,const loose_handle& rhs) { return (lhs ==rhs.get()); } + +// operator!= for handle<>, loose_handle<> and T* +template bool operator!=(const handle & lhs,const handle & rhs) { return (lhs.get()!=rhs.get()); } +template bool operator!=(const loose_handle& lhs,const loose_handle& rhs) { return (lhs.get()!=rhs.get()); } +template bool operator!=(const handle & lhs,const loose_handle& rhs) { return (lhs.get()!=rhs.get()); } +template bool operator!=(const loose_handle& lhs,const handle & rhs) { return (lhs.get()!=rhs.get()); } +template bool operator!=(const handle& lhs,const T* rhs) { return (lhs.get()!=rhs); } +template bool operator!=(const loose_handle& lhs,const T* rhs) { return (lhs.get()!=rhs); } +template bool operator!=(const T* lhs,const handle& rhs) { return (lhs !=rhs.get()); } +template bool operator!=(const T* lhs,const loose_handle& rhs) { return (lhs !=rhs.get()); } + +// operator< for handle<>, loose_handle<> and T* +template bool operator<(const handle& lhs,const handle& rhs) { return (lhs.get() bool operator<(const loose_handle& lhs,const loose_handle& rhs) { return (lhs.get() bool operator<(const handle& lhs,const loose_handle& rhs) { return (lhs.get() bool operator<(const loose_handle& lhs,const handle& rhs) { return (lhs.get() bool operator<(const handle& lhs,const T* rhs) { return (lhs.get() bool operator<(const loose_handle& lhs,const T* rhs) { return (lhs.get() bool operator<(const T* lhs,const handle& rhs) { return (lhs bool operator<(const T* lhs,const loose_handle& rhs) { return (lhs +class hermite_base : std::unary_function +{ +public: + typedef T value_type; + typedef float time_type; +private: + affine_combo affine_func; + value_type a,b,c,d; + time_type r,s; + + value_type _coeff[3]; + time_type drs; // reciprocal of (s-r) +public: + hermite_base():r(0.0),s(1.0) { drs=1.0/(s-r); } + hermite_base( + const value_type &a, const value_type &b, const value_type &c, const value_type &d, + const time_type &r=0.0, const time_type &s=1.0): + a(a),b(b),c(c),d(d),r(r),s(s) { sync(); } + + void sync(void) + { + drs=1.0/(s-r); + _coeff[0]= c; + _coeff[1]=-d*1 - c*2 + b*3 - a*3; + _coeff[2]= d*1 + c*1 - b*2 + a*2; + } + + inline value_type + operator()(time_type t)const + { t-=r; t*=drs; return a + (_coeff[0]+(_coeff[1]+(_coeff[2])*t)*t)*t; } + + void set_rs(time_type new_r, time_type new_s) { r=new_r; s=new_s; drs=1.0/(s-r); } + void set_r(time_type new_r) { r=new_r; drs=1.0/(s-r); } + void set_s(time_type new_s) { s=new_s; drs=1.0/(s-r); } + const time_type &get_r(void)const { return r; } + const time_type &get_s(void)const { return s; } + time_type get_dt(void)const { return s-r; } + + value_type & + operator[](int i) + { return (&a)[i]; } + + const value_type & + operator[](int i) const + { return (&a)[i]; } +}; + + +template +class hermite : public hermite_base +{ +public: + typedef T value_type; + typedef float time_type; + + + +public: + hermite() { } + hermite(const value_type &p1, const value_type &p2, const value_type &t1, const value_type &t2): + P1(p1),P2(p2),T1(t1),T2(t2) { sync(); } + hermite(const value_type &p1, const value_type &p2): + P1(p1),P2(p2),T1(p2-p1),T2(p2-p1) { sync(); } + + value_type P1,P2,T1,T2; + + value_type &p1(void) { return P1; } + value_type &p2(void) { return P2; } + value_type &t1(void) { return T1; } + value_type &t2(void) { return T2; } + + void sync(void) + { +// hermite_base::operator[](0)=P1; +// bezier::operator[](1)=P1+T1/3; +// bezier::operator[](2)=P2-T2/3; +// bezier::operator[](3)=P2; + + hermite_base::operator[](0)=P1; + hermite_base::operator[](1)=P2; + hermite_base::operator[](2)=T1; + hermite_base::operator[](3)=T2; + + hermite_base::sync(); + } + +}; + +*/ + +template +class hermite : public bezier +{ +public: + typedef V value_type; + typedef T time_type; + + + +public: + hermite() { } + hermite(const value_type &p1, const value_type &p2, const value_type &t1, const value_type &t2): + P1(p1),P2(p2),T1(t1),T2(t2) { sync(); } + hermite(const value_type &p1, const value_type &p2): + P1(p1),P2(p2),T1(p2-p1),T2(p2-p1) { sync(); } + + value_type P1,P2,T1,T2; + + value_type &p1() { return P1; } + value_type &p2() { return P2; } + value_type &t1() { return T1; } + value_type &t2() { return T2; } + + void sync() + { + bezier::operator[](0)=P1; + bezier::operator[](1)=P1+T1/3; + bezier::operator[](2)=P2-T2/3; + bezier::operator[](3)=P2; + + bezier::sync(); + } +}; + +_ETL_END_NAMESPACE + +/* === E X T E R N S ======================================================= */ + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_misc.h b/ETL/ETL/_misc.h new file mode 100644 index 0000000..6c84265 --- /dev/null +++ b/ETL/ETL/_misc.h @@ -0,0 +1,103 @@ +/*! ======================================================================== +** Extended Template and Library +** Misc +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__MISC_H_ +#define __ETL__MISC_H_ + +/* === H E A D E R S ======================================================= */ +#include + +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +template inline I +binary_find(I begin, I end, const T& value) +{ +#if 1 + I iter(begin+(end-begin)/2); + + while(end-begin>1 && !(*iter==value)) + { + ((*iter1 && !(*iter==value)) + { + ((*iter(x+0.5f); // <-- (a) fast, but rounds -1.333 to 0! + // return static_cast(rintf(x)); // <-- (b) slow, but correct + if (x>=0) return static_cast(x + 0.5); // <-- slower than (a), but correct, and faster than (b) + else return static_cast(x - 0.5); +} +inline int round_to_int(const double x) { + // return static_cast(x+0.5); + // return static_cast(rint(x)); + if (x>=0) return static_cast(x + 0.5); + else return static_cast(x - 0.5); +} + +inline int ceil_to_int(const float x) { return static_cast(ceil(x)); } +inline int ceil_to_int(const double x) { return static_cast(ceil(x)); } + +inline int floor_to_int(const float x) { return static_cast(x); } +inline int floor_to_int(const double x) { return static_cast(x); } + +_ETL_END_NAMESPACE + +/* === E X T E R N S ======================================================= */ + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_mutex_null.h b/ETL/ETL/_mutex_null.h new file mode 100644 index 0000000..6c0d21e --- /dev/null +++ b/ETL/ETL/_mutex_null.h @@ -0,0 +1,71 @@ +/*! ======================================================================== +** Extended Template and Library +** NULL Mutex Abstraction Class Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__MUTEX_NULL_H_ +#define __ETL__MUTEX_NULL_H_ + +/* === H E A D E R S ======================================================= */ +/* === M A C R O S ========================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +class mutex_null +{ +public: + + mutex_null(){} + ~mutex_null(){} + //! Exception-safe mutex lock class +/* + class lock + { + mutex *_mtx; + public: + lock(mutex &x):_mtx(&x) { _mtx->lock_mutex(); } + ~lock() { _mtx->unlock_mutex(); } + mutex &get() { return *_mtx; } + }; +*/ + class lock + { + public: + lock(mutex_null &/*x*/) { } + }; + + void lock_mutex(){} + bool try_lock_mutex(){return true;} + void unlock_mutex(){} +}; + +_ETL_END_NAMESPACE + +/* === E X T E R N S ======================================================= */ + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_mutex_pthreads.h b/ETL/ETL/_mutex_pthreads.h new file mode 100644 index 0000000..aed6766 --- /dev/null +++ b/ETL/ETL/_mutex_pthreads.h @@ -0,0 +1,116 @@ +/*! ======================================================================== +** Extended Template and Library +** Mutex Abstraction Class Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__MUTEX_PTHREADS_H_ +#define __ETL__MUTEX_PTHREADS_H_ + +/* === H E A D E R S ======================================================= */ + +#define __USE_GNU + +#include + +#ifdef HAVE_SCHED_H +# include +#endif + +/* === M A C R O S ========================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +class mutex +{ + pthread_mutex_t mtx; + pthread_t locker; + int depth; +public: + + mutex() + { + pthread_mutexattr_t attr; + pthread_mutexattr_init(&attr); + //#ifdef PTHREAD_PRIO_INHERIT + //pthread_mutexattr_setprioceiling(&attr,PTHREAD_PRIO_INHERIT); + //#endif + #ifdef PTHREAD_MUTEX_RECURSIVE + pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); + #endif + pthread_mutex_init(&mtx,&attr); + pthread_mutexattr_destroy(&attr); + locker=0; + depth=0; + } + + ~mutex() + { pthread_mutex_destroy(&mtx); } + + + //! Exception-safe mutex lock class + class lock + { + mutex *_mtx; + public: + lock(mutex &x):_mtx(&x) { _mtx->lock_mutex(); } + ~lock() { _mtx->unlock_mutex(); } + mutex &get() { return *_mtx; } + }; + + void lock_mutex(void) + { + if(!locker || locker!=pthread_self()) + { + pthread_mutex_lock(&mtx); + locker=pthread_self(); + depth=0; + return; + } + depth++; + } + + bool try_lock_mutex(void) + { return !(bool) pthread_mutex_trylock(&mtx); } + + void unlock_mutex(void) + { + if(depth) + { + depth--; + return; + } + pthread_mutex_unlock(&mtx); + locker=0; + } +}; + +_ETL_END_NAMESPACE + +/* === E X T E R N S ======================================================= */ + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_mutex_pthreads_simple.h b/ETL/ETL/_mutex_pthreads_simple.h new file mode 100644 index 0000000..d95b327 --- /dev/null +++ b/ETL/ETL/_mutex_pthreads_simple.h @@ -0,0 +1,64 @@ +/*! ======================================================================== +** Extended Template and Library +** Mutex Abstraction Class Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__MUTEX_PTHREADS_SIMPLE_H_ +#define __ETL__MUTEX_PTHREADS_SIMPLE_H_ + +/* === H E A D E R S ======================================================= */ + +#include + +/* === M A C R O S ========================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +class mutex +{ + pthread_mutex_t mtx; +public: + mutex() { pthread_mutex_init(&mtx,NULL); } + ~mutex() { pthread_mutex_destroy(&mtx); } + void lock_mutex() { pthread_mutex_lock(&mtx); } + void unlock_mutex() { pthread_mutex_unlock(&mtx); } + + //! Exception-safe mutex lock class + class lock + { + mutex *_mtx; + public: + lock(mutex &x):_mtx(&x) { _mtx->lock_mutex(); } + ~lock() { _mtx->unlock_mutex(); } + }; +}; + +_ETL_END_NAMESPACE + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_mutex_win32.h b/ETL/ETL/_mutex_win32.h new file mode 100644 index 0000000..b7dda75 --- /dev/null +++ b/ETL/ETL/_mutex_win32.h @@ -0,0 +1,82 @@ +/*! ======================================================================== +** Extended Template and Library +** Mutex Abstraction Class Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__MUTEX_WIN32_H_ +#define __ETL__MUTEX_WIN32_H_ + +/* === H E A D E R S ======================================================= */ + +#include +// extern HANDLE CreateMutex(NULL, FALSE, NULL); +// extern CloseHandle(handle); +// extern WaitForSingleObject(handle, INFINITE); +// extern ReleaseMutex(handle); + +/* === M A C R O S ========================================================= */ + + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +class mutex +{ + HANDLE handle; +public: + + mutex() + { handle = CreateMutex(NULL, FALSE, NULL); } + + ~mutex() + { CloseHandle(handle); } + + //! Exception-safe mutex lock class + class lock + { + mutex *_mtx; + public: + lock(mutex &x):_mtx(&x) { _mtx->lock_mutex(); } + ~lock() { _mtx->unlock_mutex(); } + mutex &get() { return *_mtx; } + }; + + void lock_mutex(void) + { WaitForSingleObject(handle, INFINITE); } + + bool try_lock_mutex(void) + { return WaitForSingleObject(handle, INFINITE)==WAIT_FAILED; } + + void unlock_mutex(void) + { ReleaseMutex(handle); } +}; + +_ETL_END_NAMESPACE + +/* === E X T E R N S ======================================================= */ + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_pen.h b/ETL/ETL/_pen.h new file mode 100644 index 0000000..096570a --- /dev/null +++ b/ETL/ETL/_pen.h @@ -0,0 +1,405 @@ +/*! ======================================================================== +** Extended Template Library +** Pen Template Class Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__PEN_H +#define __ETL__PEN_H + +/* === H E A D E R S ======================================================= */ + +#include "_curve_func.h" +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +template +class generic_pen_row_iterator +{ +public: + struct iterator_category : public std::random_access_iterator_tag {}; + typedef T value_type; + typedef int difference_type; + typedef value_type* pointer; + typedef value_type& reference; + + typedef generic_pen_row_iterator self_type; + + pointer data_; + int pitch_; + + reference operator[](int i)const { assert(data_); return *(pointer)( (char*)data_+pitch_*i ); } + reference operator*()const { assert(data_); return *data_; } + pointer operator->() const { assert(data_); return &(operator*()); } + + void inc() { assert(data_); data_ = (pointer)((char*)data_ + pitch_); } + void inc(int n) { assert(data_); data_ = (pointer)((char*)data_ + n*pitch_); } + + void dec() { assert(data_); data_ = (pointer)((char*)data_ - pitch_); } + void dec(int n) { assert(data_); data_ = (pointer)((char*)data_ - n*pitch_); } + + const self_type &operator++() { assert(data_); inc(); return *this; } + const self_type &operator--() { assert(data_); dec(); return *this; } + + self_type operator++(int) + { assert(data_); self_type ret(*this); inc(); return ret; } + self_type operator--(int) + { assert(data_); self_type ret(*this); dec(); return ret; } + + bool operator==(const self_type &rhs)const + { return data_==rhs.data_; } + + bool operator!=(const self_type &rhs)const + { return data_!=rhs.data_; } + + difference_type operator-(const self_type &rhs)const + { assert(data_); return ((char*)data_-(char*)rhs.data_-1)/pitch_+1; } + + self_type operator+(const difference_type &rhs)const + { + assert(data_); + self_type ret(*this); + ret.inc(rhs); + return ret; + } + + self_type operator-(const difference_type &rhs)const + { + assert(data_); + self_type ret(*this); + ret.dec(rhs); + return ret; + } + + operator const generic_pen_row_iterator()const + { + return generic_pen_row_iterator(data_,pitch_); + } + + operator bool()const { return (bool)data_; } + bool operator!()const { return !data_; } + + generic_pen_row_iterator(pointer data, int pitch):data_(data),pitch_(pitch) { } + generic_pen_row_iterator():data_(NULL) { } +}; + +template +class generic_pen +{ +public: + typedef T value_type; + typedef AT accumulator_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + + typedef pointer iterator_x; + typedef const_pointer const_iterator_x; + + typedef generic_pen_row_iterator iterator_y; + typedef generic_pen_row_iterator const_iterator_y; + + struct difference_type + { + typedef int value_type; + value_type x,y; + difference_type(value_type x, value_type y):x(x),y(y) { } + value_type &operator[](int i)const { return i?y:x; } + }; + +protected: + int x_,y_; + int w_,h_; +private: + int pitch_; + value_type value_; + value_type *data_; + + typedef generic_pen self_type; + + void addptr(int nbytes) + { + data_ = (pointer)((char*)data_ + nbytes); + } + + void subptr(int nbytes) + { + data_ = (pointer)((char*)data_ - nbytes); + } + +public: + + generic_pen(value_type *data, int w, int h, int pitch): + x_(0), + y_(0), + w_(w), + h_(h), + pitch_(pitch), + data_(data) + { + } + + generic_pen(value_type *data, int w, int h): + x_(0), + y_(0), + w_(w), + h_(h), + pitch_(sizeof(value_type)*w), + data_(data) + { + } + + generic_pen():data_(NULL) { } + + self_type& move(int a, int b) + { + assert(data_); + x_ += a, y_ += b; + addptr(b*pitch_ + a*sizeof(value_type)); + return *this; + } + self_type& move_to(int x, int y) { assert(data_); return move(x - x_,y - y_);} + void set_value(const value_type &v) { value_=v; } + + void inc_x() { assert(data_); x_++; data_++; } + void dec_x() { assert(data_); x_--; data_--; } + void inc_y() { assert(data_); y_++; addptr(pitch_); } + void dec_y() { assert(data_); y_--; subptr(pitch_); } + + void inc_x(int n) { assert(data_); x_+=n; data_+=n; } + void dec_x(int n) { assert(data_); x_-=n; data_-=n; } + void inc_y(int n) { assert(data_); y_+=n; data_ = (pointer)((char*)data_ + pitch_*n); } + void dec_y(int n) { assert(data_); y_-=n; data_ = (pointer)((char*)data_ - pitch_*n); } + + void put_value(const value_type &v)const { assert(data_); *data_=v; } + void put_value()const { assert(data_); put_value(value_); } + + void put_value_clip(const value_type &v)const + { if(!clipped()) put_value(v); } + void put_value_clip()const { put_value_clip(value_); } + + const_reference get_value()const { assert(data_); return *data_; } + + const_reference get_value_at(int x, int y)const { assert(data_); return ((pointer)(((char*)data_)+y*pitch_))[x]; } + + const_reference get_value_clip_at(int x, int y)const { assert(data_); if(clipped(x,y))return value_type(); return ((pointer)(((char*)data_)+y*pitch_))[x]; } + + const value_type get_value_clip()const { assert(data_); if(clipped())return value_type(); return *data_; } + + const value_type get_pen_value()const { return value_; } + + void put_hline(int l,const value_type &v) + {for(;l>0;l--,inc_x())put_value(v);} + + void put_hline(int l) {put_hline(l,value_);} + + void put_hline_clip(int l, const value_type &v) + {l=std::min(l,w_-x_);for(;l>0;l--,inc_x())put_value_clip(v);} + + void put_hline_clip(int l) {put_hline_clip(l,value_);} + + //the put_block functions do not modify the pen + void put_block(int h, int w, const value_type &v) + { + self_type row(*this); + for(;h>0;h--,row.inc_y()) + { + self_type col(row); + col.put_hline(w,v); + } + } + + void put_block(int h, int w) { put_block(h,w,value_); } + + void put_block_clip(int h, int w, const value_type &v) + { + self_type row(*this); + + //clip start position + if(row.x_ < 0) { w+=row.x_; row.inc_x(-row.x_); } + if(row.y_ < 0) { h+=row.y_; row.inc_y(-row.y_); } + + //clip width and height of copy rect + h = std::min(h,h_-y_); + w = std::min(w,w_-x_); + + //copy rect + for(;h>0;h--,row.inc_y()) + { + self_type col(row); + col.put_hline(w,v); //already clipped + } + } + + void put_block_clip(int h, int w) { put_block(h,w,value_); } + + + iterator_x operator[](int i)const { assert(data_); return (pointer)(((char*)data_)+i*pitch_); } + + iterator_x x() { assert(data_); return data_; } + iterator_x begin_x() { assert(data_); return data_-x_; } + iterator_x end_x() { assert(data_); return data_-x_+w_; } + + iterator_y y() { assert(data_); return iterator_y(data_,pitch_); } + iterator_y begin_y() { assert(data_); return iterator_y((pointer)((char*)data_ - y_*pitch_),pitch_); } + iterator_y end_y() { assert(data_); return iterator_y((pointer)((char*)data_ + (h_-y_)*pitch_),pitch_); } + + operator bool()const { return (bool)data_; } + bool operator!()const { return !data_; } + bool operator==(const self_type &rhs)const { return data_==rhs.data_; } + bool operator!=(const self_type &rhs)const { return data_!=rhs.data_; } + bool clipped(int x, int y)const { return !(x_+x>=0 && y_+y>=0 && x_+x=0 && y_>=0 && x_ +> +class alpha_pen : public PEN_ +{ +public: + typedef A_ alpha_type; + typedef AFFINE_ affine_func_type; + + typedef typename PEN_::value_type value_type; + typedef alpha_pen self_type; + +private: + alpha_type alpha_; + +protected: + affine_func_type affine_func_; + +public: + using PEN_::get_value; + using PEN_::get_pen_value; + using PEN_::inc_x; + using PEN_::dec_x; + using PEN_::inc_y; + using PEN_::dec_y; + using PEN_::clipped; + using PEN_::w_; + using PEN_::h_; + using PEN_::x_; + using PEN_::y_; + + alpha_pen(const alpha_type &a = 1, const affine_func_type &func = affine_func_type()):alpha_(a),affine_func_(func) { } + alpha_pen(const PEN_ &x, const alpha_type &a=1, const affine_func_type &func=affine_func_type()) + :PEN_(x),alpha_(a),affine_func_(func) { } + + const alpha_type& get_alpha()const { return alpha_; } + void get_alpha(alpha_type &a) const { a=alpha_; } + void set_alpha(alpha_type a) { alpha_=a; } + + void put_value(const value_type &v, alpha_type a=1)const + { PEN_::put_value(affine_func_(get_value(),v,alpha_*a)); } + void put_value()const { put_value(get_pen_value()); } + void put_value_alpha(alpha_type a)const { put_value(get_pen_value(),a); } + void put_hline(int l, const alpha_type &a = 1){for(;l>0;l--,inc_x())put_value_alpha(a);} + + void put_value_clip(const value_type &v, alpha_type a=1)const + { if(!clipped())PEN_::put_value(affine_func_(get_value(),v,alpha_*a)); } + void put_value_clip()const { put_value_clip(get_pen_value()); } + void put_value_clip_alpha(alpha_type a)const { put_value_clip(get_pen_value(),a); } + void put_hline_clip(int l, const alpha_type &a = 1){l=std::min(l,w_-x_);for(;l>0;l--,inc_x())put_value_clip_alpha(a);} + + //the put_block functions do not modify the pen + void put_block(int h, int w, const alpha_type &a = 1) + { + self_type row(*this); + for(;h>0;h--,row.inc_y()) + { + self_type col(row); + col.put_hline(w,a); + } + } + + void put_block_clip(int h, int w, const alpha_type &a = 1) + { + self_type row(*this); + + //clip start position + if(row.x_ < 0) { w+=row.x_; row.inc_x(-row.x_); } + if(row.y_ < 0) { h+=row.y_; row.inc_y(-row.y_); } + + //clip width and height of copy rect + h = std::min(h,h_-y_); + w = std::min(w,w_-x_); + + //copy rect + for(;h>0;h--,row.inc_y()) + { + self_type col(row); + col.put_hline(w,a); //already clipped + } + } +}; + +_ETL_END_NAMESPACE + +/* === E X T E R N S ======================================================= */ + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_random.h b/ETL/ETL/_random.h new file mode 100644 index 0000000..c358dfc --- /dev/null +++ b/ETL/ETL/_random.h @@ -0,0 +1,138 @@ +/*! ======================================================================== +** Extended Template and Library +** Random Number Generator Class Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__RANDOM_H +#define __ETL__RANDOM_H + +/* === H E A D E R S ======================================================= */ + +/* === M A C R O S ========================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +/* +class rand_source_xor +{ +public: + typedef int seed_type; + typedef short value_type; + +private: + short entropy_pool[256]; + int pool_index; + +public: + random() + { + seed(0); + mod=offset=0; + } + + void seed(const seed_type &x) + { pool_index=0; } + + void add_entropy(value_type entropy) + { + int i; + for(i=0;iPOOL_SIZE) + pool_index=0; + if(mod) + return entropy_pool[pool_index++]%mod+offset; + return entropy_pool[pool_index++]; + } +}; +*/ + +template +class random +{ +public: + typedef T value_type; + typedef int seed_type; + +private: + value_type entropy_pool[POOL_SIZE]; + int pool_index; + + value_type mod,offset; + +public: + random() + { + seed(0); + mod=offset=0; + } + + void seed(const seed_type &x __attribute__ ((unused))) + { pool_index=0; } + + void set_range(const value_type &floor,const value_type &ceil) + { mod=ceil-floor; offset=floor; } + + void set_range(const value_type &ceil) + { mod=ceil; } + + void add_entropy(value_type entropy) + { + int i; + for(i=0;iPOOL_SIZE) + pool_index=0; + if(mod) + return entropy_pool[pool_index++]%mod+offset; + return entropy_pool[pool_index++]; + } +}; + +/* === T Y P E D E F S ===================================================== */ + +_ETL_END_NAMESPACE + +/* === E N D =============================================================== */ + +#endif + diff --git a/ETL/ETL/_rect.h b/ETL/ETL/_rect.h new file mode 100644 index 0000000..6f506a5 --- /dev/null +++ b/ETL/ETL/_rect.h @@ -0,0 +1,171 @@ +/*! ======================================================================== +** Extended Template Library +** Rectangle Basic Class Implementation +** $Id$ +** +** Copyright (c) 2002 Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__RECT_H +#define __ETL__RECT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +template < typename T > +class rect +{ +public: //type niceties + typedef T value_type; + +public: //representation + + value_type minx,maxx,miny,maxy; + +public: //interface + + rect() {} + + rect(const value_type &x1,const value_type &y1) + { + set_point(x1,y1); + } + + rect(const value_type &x1,const value_type &y1, + const value_type &x2,const value_type &y2) + { + set_point(x1,y1); + expand(x2,y2); + } + + rect(const rect &o) + :minx(o.minx),maxx(o.maxx),miny(o.miny),maxy(o.maxy) + {} + + template < typename U > + rect(const rect &o) + :minx(o.minx),maxx(o.maxx),miny(o.miny),maxy(o.maxy) + {} + + void set_point(const value_type &x1,const value_type &y1) + { + minx = maxx = x1; + miny = maxy = y1; + } + + void expand(const value_type &x1,const value_type &y1) + { + minx = std::min(minx,x1); + maxx = std::max(maxx,x1); + miny = std::min(miny,y1); + maxy = std::max(maxy,y1); + } + + void set(const value_type &x1,const value_type &y1, + const value_type &x2,const value_type &y2) + { + minx = x1; maxx = x2; + miny = y1; maxy = y2; + } + + //HACK HACK HACK (stupid compiler doesn't like default arguments of any type) + bool valid() const + { + return valid(std::less()); + } + + template < typename F > + bool valid(const F & func) const + { + return func(minx,maxx) && func(miny,maxy); + } +}; + +template < typename T, typename F > +inline bool intersect(const rect &r1, const rect &r2, const F & func) +{ + /* We wan to do the edge compare test + |-----| + |------| intersecting + + |-----| + |-----| not intersecting + + So we want to compare the mins of the one against the maxs of the other, and + visa versa + + by default (exclude edge sharing) less will not be true if they are equal... + */ + + return func(r1.minx,r2.maxx) && + func(r2.minx,r1.maxx) && + func(r1.miny,r2.maxy) && + func(r2.miny,r1.maxy); +} + +template < typename T > +inline bool intersect(const rect &r1, const rect &r2) +{ + return intersect(r1,r2,std::less()); +} + +template < typename T > +void set_intersect(rect &rout, const rect &r1, const rect &r2) +{ + //takes the intersection of the two rectangles + rout.minx = std::max(r1.minx,r2.minx); + rout.miny = std::max(r1.miny,r2.miny); + rout.maxx = std::min(r1.maxx,r2.maxx); + rout.maxy = std::min(r1.maxy,r2.maxy); +} + +template < typename T > +void set_union(rect &rout, const rect &r1, const rect &r2) +{ + //takes the union of the two rectangles (bounds both... will contain extra info, but that's ok) + rout.set( + std::min(r1.minx,r2.minx), + std::min(r1.miny,r2.miny), + std::max(r1.maxx,r2.maxx), + std::max(r1.maxy,r2.maxy)); + /*rect local = r1; + rout.expand(r2.minx,r2.miny); + rout.expand(r2.maxx,r2.maxy); + rout = local;*/ +} + +_ETL_END_NAMESPACE + +/* === E X T E R N S ======================================================= */ + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_ref_count.h b/ETL/ETL/_ref_count.h new file mode 100644 index 0000000..c036f8d --- /dev/null +++ b/ETL/ETL/_ref_count.h @@ -0,0 +1,158 @@ +/*! ======================================================================== +** Extended Template Library +** +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__REF_COUNT_H +#define __ETL__REF_COUNT_H + +/* === H E A D E R S ======================================================= */ + +#include "_curve_func.h" +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +class weak_reference_counter; + +// ======================================================================== +/*! \class reference_counter _ref_count.h ETL/ref_count +** \brief Reference counter +** \see weak_reference_counter +** \writeme +*/ +class reference_counter +{ + friend class weak_reference_counter; +private: + int* counter_; +public: + + reference_counter(const bool &x=true):counter_(x?new int(1):0) { } + + reference_counter(const reference_counter &x):counter_(x.counter_) + { if(counter_) (*counter_)++; } + + reference_counter(const weak_reference_counter &x); + + ~reference_counter() { detach(); } + + reference_counter& operator=(const reference_counter &rhs) + { + detach(); + counter_=rhs.counter_; + if(counter_) + { + assert(*counter_>0); + (*counter_)++; + } + return *this; + } + + void detach() + { + if(counter_) + { + assert(*counter_>0); + if(!--(*counter_)) + delete counter_; + counter_=0; + } + } + + void reset() + { + detach(); + counter_=new int(1); + } + + int count()const { return counter_?*counter_:0; } + + bool unique()const { return counter_?*counter_==1:0; } + + operator int()const { return count(); } +}; // END of class reference_counter + +// ======================================================================== +/*! \class weak_reference_counter _ref_count.h ETL/ref_count +** \brief Weak Reference counter +** \see reference_counter +** \writeme +*/ +class weak_reference_counter +{ + friend class reference_counter; +private: + int* counter_; +public: + weak_reference_counter():counter_(0) { } + + weak_reference_counter(const weak_reference_counter &x):counter_(x.counter_) { } + + weak_reference_counter(const reference_counter &x):counter_(x.counter_) { } + + ~weak_reference_counter() { } + + weak_reference_counter& operator=(const reference_counter &rhs) + { + counter_=rhs.counter_; + assert(*counter_>0); + return *this; + } + + weak_reference_counter& operator=(const weak_reference_counter &rhs) + { + counter_=rhs.counter_; + assert(*counter_>0); + return *this; + } + + void detach() { counter_=0; } + + int count()const { return counter_?*counter_:0; } + + bool unique()const { return counter_?*counter_==1:0; } + + operator int()const { return count(); } +}; // END of class weak_reference_counter + +inline reference_counter::reference_counter(const weak_reference_counter &x): + counter_(x.counter_) +{ + if(counter_) (*counter_)++; +} + +_ETL_END_NAMESPACE + +/* === E X T E R N S ======================================================= */ + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_rwlock.h b/ETL/ETL/_rwlock.h new file mode 100644 index 0000000..930db26 --- /dev/null +++ b/ETL/ETL/_rwlock.h @@ -0,0 +1,93 @@ +/*! ======================================================================== +** Extended Template and Library +** Mutex Abstraction Class Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__RWLOCK_H_ +#define __ETL__RWLOCK_H_ + +/* === H E A D E R S ======================================================= */ + +/* === M A C R O S ========================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +class read_write_lock : private Mutex +{ +public: + + read_write_lock() + { } + + ~read_write_lock() + { } + + //! Exception-safe read-lock class + class read_lock + { + read_write_lock *_mtx; + public: + read_lock(read_write_lock &x):_mtx(&x) { _mtx->lock_read(); } + ~read_lock() { _mtx->unlock_read(); } + read_write_lock &get() { return *_mtx; } + }; + + //! Exception-safe write-lock class + class write_lock + { + read_write_lock *_mtx; + public: + write_lock(read_write_lock &x):_mtx(&x) { _mtx->lock_write(); } + ~read_lock() { _mtx->unlock_write(); } + read_write_lock &get() { return *_mtx; } + }; + + void lock_read(void) + { lock_mutex(); } + + void lock_write(void) + { lock_mutex(); } + + bool try_lock_read(void) + { return try_lock_mutex(); } + + bool try_lock_write(void) + { return try_lock_mutex(); } + + void unlock_write(void) + { unlock_mutex(); } + + void unlock_read(void) + { unlock_mutex(); } +}; + +_ETL_END_NAMESPACE + +/* === E X T E R N S ======================================================= */ + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_smach.h b/ETL/ETL/_smach.h new file mode 100644 index 0000000..99a7320 --- /dev/null +++ b/ETL/ETL/_smach.h @@ -0,0 +1,598 @@ +/*! ======================================================================== +** Extended Template and Library +** State Machine Abstraction Class Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__SMACH_H_ +#define __ETL__SMACH_H_ + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include "_mutex_null.h" +#include "_misc.h" + +/* === M A C R O S ========================================================= */ + +#define SMACH_STATE_STACK_SIZE (32) + +#ifdef _MSC_VER +#pragma warning (disable:4786) +#pragma warning (disable:4290) // MSVC6 doesn't like function declarations with exception specs +#endif + +//#define ETL_MUTEX_LOCK() _mutex::lock lock(mutex) +#define ETL_MUTEX_LOCK() + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +/*! ======================================================================== +** \class smach +** \brief Templatized State Machine +** +** A more detailed description needs to be written. +*/ +template +class smach +{ +public: + + typedef K event_key; + typedef M _mutex; + typedef CON context_type; + + + struct egress_exception { }; + struct pop_exception { }; + + + //! Result type for event processing + enum event_result + { + // These values are returned by the event + // handlers cast to state pointers. + RESULT_ERROR, //!< General error or malfunction + RESULT_OK, //!< Event has been processed + RESULT_ACCEPT, //!< The event has been explicitly accepted. + RESULT_REJECT, //!< The event has been explicitly rejected. + + RESULT_END //!< Not a valid result + }; + + //template class state; + + //! Event base class + struct event + { + event_key key; + + event() { } + event(const event_key& key):key(key) { } + + operator event_key()const { return key; } + }; + + //! Event definition class + template + class event_def_internal + { + // List our friends + friend class smach; + //friend class state; + + public: + typedef T state_context_type; + + //! Event function type + typedef event_result (T::*funcptr)(const event&); + + //private: + + event_key id; // + class state : public state_base + { + // Our parent is our friend + friend class smach; + + public: + typedef event_def_internal event_def; + typedef T state_context_type; + + + private: + + std::vector event_list; + + smach *nested; //! Nested machine + event_key low,high; //! Lowest and Highest event values + const char *name; //! Name of the state + typename event_def::funcptr default_handler; //! Default handler for unknown key + + public: + + //! Constructor + state(const char *n, smach* nest=0): + nested(nest),name(n),default_handler(NULL) + { } + + virtual ~state() { } + + //! Setup a nested state machine + /*! A more detailed explanation needs to be written */ + void set_nested_machine(smach *sm) { nested=sm; } + + //! Sets the default handler + void set_default_handler(const typename event_def::funcptr &x) { default_handler=x; } + + //! Returns given the name of the state + virtual const char *get_name() const { return name; } + + state_context_type& get_context(smach& machine) + { + state_context_type *context(dynamic_cast(machine.state_context)); + if(context) + return context; + + } + + //! Adds an event_def onto the list and then make sure it is sorted correctly. + void + insert(const event_def &x) + { + // If this is our first event_def, + // setup the high and low values. + if(!event_list.size()) + low=high=x.id; + + // Sort the event_def onto the list + event_list.push_back(x); + sort(event_list.begin(),event_list.end()); + + // Update the low and high markers + if(x.id::iterator find(const event_key &x) { return binary_find(event_list.begin(),event_list.end(),x); } + typename std::vector::const_iterator find(const event_key &x)const { return binary_find(event_list.begin(),event_list.end(),x); } + + protected: + + virtual void* enter_state(context_type* machine_context)const + { + return new state_context_type(machine_context); + } + + virtual bool leave_state(void* x)const + { + state_context_type* state_context(reinterpret_cast(x)); + delete state_context; + return true; + } + + virtual event_result + process_event(void* x,const event& id)const + { + state_context_type* state_context(reinterpret_cast(x)); + + // Check for nested machine in state + if(nested) + { + const event_result ret(nested->process_event(id)); + if(ret!=RESULT_OK) + return ret; + } + + // Quick test to make sure that the + // given event is in the state + if(id.key::const_iterator iter(find(id.key)); + + // If search results were negative, fail. + if(iter->id!=id.key) + return RESULT_OK; + + // Execute event function + event_result ret((state_context->*(iter->handler))(id)); + + if(ret==RESULT_OK && default_handler) + ret=(state_context->*(default_handler))(id); + + return ret; + } + }; + +private: + + // Machine data + const state_base* curr_state; //!< Current state of the machine + smach* child; //!< Child machine + +public: // this really should be private + void* state_context; //!< State Context +private: + + context_type* machine_context; //!< Machine Context + + const state_base* default_state; + void* default_context; + +#ifdef ETL_MUTEX_LOCK + _mutex mutex; +#endif + + //! State stack data + const state_base* state_stack[SMACH_STATE_STACK_SIZE]; + void* state_context_stack[SMACH_STATE_STACK_SIZE]; + int states_on_stack; + +public: + + //! Gets the name of the currently active state + const char * + get_state_name()const + { +#ifdef ETL_MUTEX_LOCK + ETL_MUTEX_LOCK(); +#endif + if(curr_state) + return curr_state->get_name(); + if(default_state) + return default_state->get_name(); + return 0; + } + + //! Determines if a given event result is an error + /*! This function allows us to quickly see + if an event_result contained an error */ + static bool + event_error(const event_result &rhs) + { return rhs<=RESULT_ERROR; } + + bool + set_default_state(const state_base *nextstate) + { +#ifdef ETL_MUTEX_LOCK + ETL_MUTEX_LOCK(); +#endif + // Keep track of the current state unless + // the state switch fails + const state_base *prev_state=default_state; + + // If we are already in a state, leave it and + // collapse the state stack + if(default_state) + default_state->leave_state(default_context); + + // Set this as our current state + default_state=nextstate; + default_context=0; + + // Attempt to enter the state + if(default_state) + { + default_context=default_state->enter_state(machine_context); + if(default_context) + return true; + } + else + return true; + + // We failed, so attempt to return to previous state + default_state=prev_state; + + // If we had a previous state, enter it + if(default_state) + default_context=default_state->enter_state(machine_context); + + // At this point we are not in the + // requested state, so return failure + return false; + } + + //! Leaves the current state + /*! Effectively makes the state_depth() function return zero. */ + bool + egress() + { +#ifdef ETL_MUTEX_LOCK + ETL_MUTEX_LOCK(); +#endif + + // Pop all states off the state stack + while(states_on_stack) pop_state(); + + // If we are not in a state, then I guess + // we were successful. + if(!curr_state) + return true; + + // Grab the return value from the exit function + bool ret=true; + + const state_base* old_state=curr_state; + void *old_context=state_context; + + // Clear out the current state and its state_context + curr_state=0;state_context=0; + + // Leave the state + return old_state->leave_state(old_context); + + return ret; + } + + //! State entry function + /*! Attempts to enter the given state, + popping off all states on the stack + in the process. */ + bool + enter(const state_base *nextstate) + { +#ifdef ETL_MUTEX_LOCK + ETL_MUTEX_LOCK(); +#endif + + // Keep track of the current state unless + // the state switch fails + const state_base *prev_state=curr_state; + + // If we are already in a state, leave it and + // collapse the state stack + if(curr_state) + egress(); + + // Set this as our current state + curr_state=nextstate; + state_context=0; + + // Attempt to enter the state + state_context=curr_state->enter_state(machine_context); + if(state_context) + return true; + + // We failed, so attempt to return to previous state + curr_state=prev_state; + + // If we had a previous state, enter it + if(curr_state) + state_context=curr_state->enter_state(machine_context); + + // At this point we are not in the + // requested state, so return failure + return false; + } + + //! Pushes state onto state stack + /*! This allows you to enter a state without + leaving your current state. + \param nextstate Pointer to the state to enter + \sa pop_state() + */ + bool + push_state(const state_base *nextstate) + { +#ifdef ETL_MUTEX_LOCK + ETL_MUTEX_LOCK(); +#endif + + // If there are not enough slots, then throw something. + if(states_on_stack==SMACH_STATE_STACK_SIZE) + throw(std::overflow_error("smach<>::push_state(): state stack overflow!")); + + // If there is no current state, nor anything on stack, + // just go ahead and enter the given state. + if(!curr_state && !states_on_stack) + return enter(nextstate); + + // Push the current state onto the stack + state_stack[states_on_stack]=curr_state; + state_context_stack[states_on_stack++]=state_context; + + // Make the next state the current state + curr_state=nextstate; + + // Try to enter the next state + state_context=curr_state->enter_state(machine_context); + if(state_context) + return true; + + // Unable to push state, return to old one + curr_state=state_stack[--states_on_stack]; + state_context=state_context_stack[states_on_stack]; + return false; + } + + //! Pops state off of state stack + /*! Decreases state depth */ + void + pop_state() + { +#ifdef ETL_MUTEX_LOCK + ETL_MUTEX_LOCK(); +#endif + + // If we aren't in a state, then there is nothing + // to do. + if(!curr_state) + throw(std::underflow_error("smach<>::pop_state(): stack is empty!")); + + if(states_on_stack) + { + const state_base* old_state=curr_state; + void *old_context=state_context; + + // Pop previous state off of stack + --states_on_stack; + curr_state=state_stack[states_on_stack]; + state_context=state_context_stack[states_on_stack]; + + old_state->leave_state(old_context); + } + else // If there are no states on stack, just egress + egress(); + } + + //! State Machine Constructor + /*! A more detailed description needs to be written */ + smach(context_type* machine_context=0): + curr_state(0), + child(0), + state_context(0), + machine_context(machine_context), + default_state(0), + default_context(0), + states_on_stack(0) + { } + + //! The destructor + ~smach() + { + egress(); + + if(default_state) + default_state->leave_state(default_context); + } + + //! Sets up a child state machine + /*! A child state machine runs in parallel with + its parent, and gets event priority. This + mechanism is useful in cases where an inherited + object has its own state machine. */ + void set_child(smach *x) + { +#ifdef ETL_MUTEX_LOCK + ETL_MUTEX_LOCK(); +#endif + child=x; + } + + //! Returns the number states currently active + int + state_depth() + { return curr_state?states_on_stack+1:0; } + + event_result + process_event(const event_key& id) { return process_event(event(id)); } + + //! Process an event + event_result + process_event(const event& id) + { +#ifdef ETL_MUTEX_LOCK + ETL_MUTEX_LOCK(); +#endif + + event_result ret(RESULT_OK); + + // Check for child machine + if(child) + { + ret=child->process_event(id); + if(ret!=RESULT_OK) + return ret; + } + + try + { + if(curr_state) + ret=curr_state->process_event(state_context,id); + + if(ret==RESULT_OK) + return default_state->process_event(default_context,id); + + return ret; + } + catch(egress_exception) { return egress()?RESULT_ACCEPT:RESULT_ERROR; } + catch(pop_exception) { pop_state(); return RESULT_ACCEPT; } + catch(const state_base* state) { return enter(state)?RESULT_ACCEPT:RESULT_ERROR; } + } + +}; // END of template class smach + +_ETL_END_NAMESPACE + +/* === E X T E R N S ======================================================= */ + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_smart_ptr.h b/ETL/ETL/_smart_ptr.h new file mode 100644 index 0000000..a34b8dd --- /dev/null +++ b/ETL/ETL/_smart_ptr.h @@ -0,0 +1,363 @@ +/* ======================================================================== +** Extended Template and Library +** Template Smart Pointer Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__SMART_PTR_H +#define __ETL__SMART_PTR_H + +/* === H E A D E R S ======================================================= */ + +#include +#include "_ref_count.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +template +struct generic_deleter +{ + void operator()(T* x)const { delete x; } +}; + +template +struct array_deleter +{ + void operator()(T* x)const { delete [] x; } +}; + +// ======================================================================== +/*! \class smart_ptr _smart_ptr.h ETL/smart_ptr +** \brief Object Smart Pointer +** \see loose_smart_ptr +** \writeme +*/ +template > +class smart_ptr +{ +public: + + typedef T value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T* pointer; + typedef const T* const_pointer; + typedef int count_type; + typedef int size_type; + typedef D destructor_type; + +#ifdef DOXYGEN_SHOULD_SKIP_THIS // #ifdef is not a typo +private: +#endif + value_type *obj; //!< \internal Pointer to object + reference_counter refcount; + +public: + // Private constructor for convenience + smart_ptr(value_type* obj,reference_counter refcount):obj(obj),refcount(refcount) { } + + //! Default constructor - empty smart_ptr + smart_ptr():obj(0),refcount(false) {} + + //! Constructor that constructs from a pointer to new object + /*! A new smart_ptr is created with a pointer + to a newly allocated object. We need + to be explicit with this so we don't + accidently have two smart_ptrs for one + object -- that would be bad. */ + explicit smart_ptr(value_type* x):obj(x),refcount(x?true:false) { } + + //! Template copy constructor + /*! This template constructor allows us to cast + smart_ptrs much like we would pointers. */ +#ifdef _WIN32 + template + smart_ptr(const smart_ptr &x):obj((pointer)&*x.obj),refcount(x.refcount()) + { } +#endif + + //! Default copy constructor + /*! The template above is not good enough + for all compilers. We need to explicitly + define the copy constructor for this + class to work on those compilers. */ + smart_ptr(const smart_ptr &x):obj(x.obj),refcount(x.refcount) { } + + explicit smart_ptr(const value_type &x):obj(new value_type(x)) { } + + //! smart_ptr is released on deletion + ~smart_ptr() { if(refcount.unique()) destructor_type()(obj); } + + //! Template Assignment operator + template const smart_ptr & + operator=(const smart_ptr &x) + { + if(x.get()==obj) + return *this; + + reset(); + + if(x.obj) + { + obj=(pointer)x.get(); + refcount=x.refcount; + } + + return *this; + } + + //! Assignment operator + const smart_ptr & + operator=(const smart_ptr &x) + { + if(x.get()==obj) + return *this; + + reset(); + + if(x.obj) + { + + obj=(pointer)x.get(); + refcount=x.refcount; + } + + return *this; + } + + //! smart_ptr reset procedure + void + reset() + { + if(obj) + { + if(refcount.unique()) destructor_type()(obj); + refcount.detach(); + obj=0; + } + } + + void spawn() { operator=(smart_ptr(new T)); } + + //! Returns number of instances + const count_type& count()const { return refcount; } + + //! Returns true if there is only one instance of the object + bool unique()const { return refcount.unique(); } + + //! Returns a constant handle to our object + smart_ptr constant() { return *this; } + + reference operator*()const { assert(obj); return *obj; } + + pointer operator->()const { assert(obj); return obj; } + + + operator smart_ptr()const + { return smart_ptr(static_cast(obj)); } + + //! static_cast<> wrapper + template static + smart_ptr cast_static(const smart_ptr &x) + { if(!x)return NULL; return smart_ptr(static_cast(x.get()),x.refcount); } + + //! dynamic_cast<> wrapper + template static + smart_ptr cast_dynamic(const smart_ptr &x) + { if(!x)return 0; return smart_ptr(dynamic_cast(x.get()),x.refcount); } + + //! const_cast<> wrapper + template static + smart_ptr cast_const(const smart_ptr &x) + { if(!x)return 0; return smart_ptr(const_cast(x.get()),x.refcount); } + + pointer get()const { return obj; } + + //! More explicit bool cast + operator bool()const { return obj!=0; } + + bool operator!()const { return !obj; } + + //! Overloaded cast operator -- useful for implicit casts + template + operator smart_ptr() + { + // This next line should provide a syntax check + // to make sure that this cast makes sense. + // If it doesn't, this should have a compiler error. + // Otherwise, it should get optimized right out + // of the code. + //(U*)obj; + + return *reinterpret_cast*>(this); + } + +}; // END of template class smart_ptr + +// ======================================================================== +/*! \class loose_smart_ptr _smart_ptr.h ETL/smart_ptr +** \brief Loose Object Smart Pointer +** \see smart_ptr +** \writeme +*/ +template +class loose_smart_ptr +{ +public: + + typedef T value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T* pointer; + typedef const T* const_pointer; + typedef int count_type; + typedef int size_type; + +private: + value_type *obj; //!< \internal Pointer to object + weak_reference_counter refcount; //!< \internal Pointer to object's reference counter + +public: + + //! Default constructor - empty smart_ptr + loose_smart_ptr():obj(0),refcount(0) {} + + //! Default copy constructor + loose_smart_ptr(const loose_smart_ptr &x):obj(x.get()),refcount(x.refcount) { } + + loose_smart_ptr(const smart_ptr &x):obj(x.get()),refcount(x.refcount) { } + + void reset() { obj=0,refcount=0; } + + operator smart_ptr() + { + return smart_ptr(static_cast(obj),refcount); + } + + operator smart_ptr() + { + return smart_ptr(static_cast(obj),refcount); + } + + //! Returns number of instances + const count_type& count()const { return refcount; } + + bool unique()const { return refcount.unique(); } + + reference operator*()const { assert(obj); return *obj; } + + pointer operator->()const { assert(obj); return obj; } + + pointer get()const { return obj; } + + bool operator!()const { return !obj; } +}; + +template bool +operator==(const smart_ptr &lhs,const smart_ptr &rhs) + { return (lhs.get()==rhs.get()); } +template bool +operator==(const loose_smart_ptr &lhs,const loose_smart_ptr &rhs) + { return (lhs.get()==rhs.get()); } +template bool +operator==(const smart_ptr &lhs,const loose_smart_ptr &rhs) + { return (lhs.get()==rhs.get()); } +template bool +operator==(const loose_smart_ptr &lhs,const smart_ptr &rhs) + { return (lhs.get()==rhs.get()); } +template bool +operator==(const smart_ptr &lhs,const T *rhs) + { return (lhs.get()==rhs); } +template bool +operator==(const loose_smart_ptr &lhs,const T *rhs) + { return (lhs.get()==rhs); } +template bool +operator==(const T *lhs,const smart_ptr &rhs) + { return (lhs==rhs.get()); } +template bool +operator==(const T *lhs,const loose_smart_ptr &rhs) + { return (lhs==rhs.get()); } + + +template bool +operator!=(const smart_ptr &lhs,const smart_ptr &rhs) + { return (lhs.get()!=rhs.get()); } +template bool +operator!=(const loose_smart_ptr &lhs,const loose_smart_ptr &rhs) + { return (lhs.get()!=rhs.get()); } +template bool +operator!=(const smart_ptr &lhs,const loose_smart_ptr &rhs) + { return (lhs.get()!=rhs.get()); } +template bool +operator!=(const loose_smart_ptr &lhs,const smart_ptr &rhs) + { return (lhs.get()!=rhs.get()); } +template bool +operator!=(const smart_ptr &lhs,const T *rhs) + { return (lhs.get()!=rhs); } +template bool +operator!=(const loose_smart_ptr &lhs,const T *rhs) + { return (lhs.get()!=rhs); } +template bool +operator!=(const T *lhs,const smart_ptr &rhs) + { return (lhs!=rhs.get()); } +template bool +operator!=(const T *lhs,const loose_smart_ptr &rhs) + { return (lhs!=rhs.get()); } + + +template bool +operator<(const smart_ptr &lhs,const smart_ptr &rhs) + { return (lhs.get() bool +operator<(const loose_smart_ptr &lhs,const loose_smart_ptr &rhs) + { return (lhs.get() bool +operator<(const smart_ptr &lhs,const loose_smart_ptr &rhs) + { return (lhs.get() bool +operator<(const loose_smart_ptr &lhs,const smart_ptr &rhs) + { return (lhs.get() bool +operator<(const smart_ptr &lhs,const T *rhs) + { return (lhs.get() bool +operator<(const loose_smart_ptr &lhs,const T *rhs) + { return (lhs.get() bool +operator<(const T *lhs,const smart_ptr &rhs) + { return (lhs bool +operator<(const T *lhs,const loose_smart_ptr &rhs) + { return (lhs +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +#ifndef ETL_STRPRINTF_MAX_LENGTH +#define ETL_STRPRINTF_MAX_LENGTH (800) +#endif + +#ifdef WIN32 +#define POPEN_BINARY_READ_TYPE "rb" +#define POPEN_BINARY_WRITE_TYPE "wb" +#else +#define POPEN_BINARY_READ_TYPE "r" +#define POPEN_BINARY_WRITE_TYPE "w" +#endif + +/* === T Y P E D E F S ===================================================== */ + +_ETL_BEGIN_CDECLS + +#if defined(__APPLE__) || defined(__CYGWIN__) || defined(_WIN32) +#define ETL_NO_THROW +#else +#define ETL_NO_THROW throw() +#endif + +// Prefer prototypes from glibc headers, since defining them ourselves +// works around glibc security mechanisms + +#ifdef HAVE_VASPRINTF // This is the preferred method + #ifndef __GLIBC__ + extern int vasprintf(char **,const char *,va_list)ETL_NO_THROW; + #endif +#else + +# ifdef HAVE_VSNPRINTF // This is the secondary method + #ifndef __GLIBC__ + extern int vsnprintf(char *,size_t,const char*,va_list)ETL_NO_THROW; + #endif +# endif + +#endif + +#ifdef HAVE_VSSCANF + #ifndef __GLIBC__ + extern int vsscanf(const char *,const char *,va_list)ETL_NO_THROW; + #endif +#else +#define ETL_NO_VSTRSCANF +#ifdef HAVE_SSCANF + #ifndef __GLIBC__ + extern int sscanf(const char *buf, const char *format, ...)ETL_NO_THROW; + #endif +#endif +#endif + +#include + +_ETL_END_CDECLS + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +inline std::string +vstrprintf(const char *format, va_list args) +{ +#ifdef HAVE_VASPRINTF // This is the preferred method (and safest) + char *buffer; + std::string ret; + int i=vasprintf(&buffer,format,args); + if (i>-1) + { + ret=buffer; + free(buffer); + } + return ret; +#else +#ifdef HAVE_VSNPRINTF // This is the secondary method (Safe, but bulky) +#warning etl::vstrprintf() has a maximum size of ETL_STRPRINTF_MAX_LENGTH in this configuration. +#ifdef ETL_THREAD_SAFE + char buffer[ETL_STRPRINTF_MAX_LENGTH]; +#else + static char buffer[ETL_STRPRINTF_MAX_LENGTH]; +#endif + vsnprintf(buffer,sizeof(buffer),format,args); + return buffer; +#else // This is the worst method (UNSAFE, but "works") +#warning Potential for Buffer-overflow bug using vsprintf +#define ETL_UNSAFE_STRPRINTF (true) +// Here, we are doubling the size of the buffer to make this case +// slightly more safe. +#ifdef ETL_THREAD_SAFE + char buffer[ETL_STRPRINTF_MAX_LENGTH*2]; +#else + static char buffer[ETL_STRPRINTF_MAX_LENGTH*2]; +#endif + vsprintf(buffer,format,args); + return buffer; +#endif +#endif +} + +inline std::string +strprintf(const char *format, ...) +{ + va_list args; + va_start(args,format); + return vstrprintf(format,args); +} + +#ifndef ETL_NO_VSTRSCANF +inline int +vstrscanf(const std::string &data, const char*format, va_list args) +{ + return vsscanf(data.c_str(),format,args); +} + +inline int +strscanf(const std::string &data, const char*format, ...) +{ + va_list args; + va_start(args,format); + return vstrscanf(data, format,args); +} +#else + +#if defined (HAVE_SSCANF) && defined (__GNUC__) +#define strscanf(data,format,...) sscanf(data.c_str(),format,__VA_ARGS__) +#endif +#endif + + +#define stratof(X) (atof((X).c_str())) +#define stratoi(X) (atoi((X).c_str())) + +inline std::string +basename(const std::string &str) +{ + std::string::const_iterator iter; + + if(str.size() == 1 && str[0] == ETL_DIRECTORY_SEPARATOR) + return str; + + if(str.end()[-1]==ETL_DIRECTORY_SEPARATOR) + iter=str.end()-2; + else + iter=str.end()-1; + + for(;iter!=str.begin();iter--) + if(*iter==ETL_DIRECTORY_SEPARATOR) + break; + + if (*iter==ETL_DIRECTORY_SEPARATOR) + iter++; + + if(str.end()[-1]==ETL_DIRECTORY_SEPARATOR) + return std::string(iter,str.end()-1); + + return std::string(iter,str.end()); +} + +inline std::string +dirname(const std::string &str) +{ + std::string::const_iterator iter; + + if(str.size() == 1 && str[0] == ETL_DIRECTORY_SEPARATOR) + return str; + + if(str.end()[-1]==ETL_DIRECTORY_SEPARATOR) + iter=str.end()-2; + else + iter=str.end()-1; + + for(;iter!=str.begin();iter--) + if(*iter==ETL_DIRECTORY_SEPARATOR) + break; + + if(iter==str.begin()) + { + if (*iter==ETL_DIRECTORY_SEPARATOR) + return "/"; + else + return "."; + } + + return std::string(str.begin(),iter); +} + +// filename_extension("/f.e/d.c") => ".c" +inline std::string +filename_extension(const std::string &str) +{ + std::string base = basename(str); + std::string::size_type pos = base.find_last_of('.'); + if (pos == std::string::npos) return std::string(); + return base.substr(pos); +} + +// filename_sans_extension("/f.e/d.c") => "/f.e/d" +inline std::string +filename_sans_extension(const std::string &str) +{ + std::string base = basename(str); + std::string::size_type pos = base.find_last_of('.'); + if (pos == std::string::npos) return str; + std::string dir = dirname(str); + if (dir == ".") return base.substr(0,pos); + return dir + ETL_DIRECTORY_SEPARATOR + base.substr(0,pos); +} + +inline bool +is_absolute_path(const std::string &path) +{ +#ifdef WIN32 + if(path.size()>=3 && path[1]==':' && (path[2]=='\\' || path[2]=='/')) + return true; +#endif + if(!path.empty() && path[0]==ETL_DIRECTORY_SEPARATOR) + return true; + return false; +} + +inline std::string +unix_to_local_path(const std::string &path) +{ + std::string ret; + std::string::const_iterator iter; + for(iter=path.begin();iter!=path.end();iter++) + switch(*iter) + { + case '/': + ret+=ETL_DIRECTORY_SEPARATOR; + break; + case '~': + ret+='~'; + break; + default: + ret+=*iter; + break; + } + return ret; +} + +inline std::string +current_working_directory() +{ + char dir[256]; + std::string ret(getcwd(dir,sizeof(dir))); + return ret; +} + +inline std::string +get_root_from_path(std::string path) +{ + std::string ret; + std::string::const_iterator iter; + + for(iter=path.begin();iter!=path.end();++iter) + { + if(*iter==ETL_DIRECTORY_SEPARATOR) + break; + ret+=*iter; + } + //if(iter!=path.end()) + ret+=ETL_DIRECTORY_SEPARATOR; + return ret; +} + +inline std::string +remove_root_from_path(std::string path) +{ + while(!path.empty()) + { + if(path[0]==ETL_DIRECTORY_SEPARATOR) + { + path.erase(path.begin()); + return path; + } + path.erase(path.begin()); + } + return path; +} + +inline std::string +cleanup_path(std::string path) +{ + std::string ret; + + while(basename(path)=="."&&path.size()!=1)path=dirname(path); + + while(!path.empty()) + { + std::string dir(get_root_from_path(path)); + if((dir=="../" || dir=="..\\") && ret.size()) + { + ret=dirname(ret); + if (*(ret.end()-1)!=ETL_DIRECTORY_SEPARATOR) + ret+=ETL_DIRECTORY_SEPARATOR; + } + else if((dir!="./" && dir!=".\\") && dir!=".") + ret+=dir; + path=remove_root_from_path(path); + } + if (ret.size()==0)ret+='.'; + + // Remove any trailing directory separators + if(ret.size() && ret[ret.size()-1]==ETL_DIRECTORY_SEPARATOR) + ret.erase(ret.begin()+ret.size()-1); + return ret; +} + +inline std::string +absolute_path(std::string path) +{ + std::string ret(current_working_directory()); + + if(path.empty()) + return cleanup_path(ret); + if(is_absolute_path(path)) + return cleanup_path(path); + return cleanup_path(ret+ETL_DIRECTORY_SEPARATOR+path); +} + +inline std::string +relative_path(std::string curr_path,std::string dest_path) +{ + // If dest_path is already a relative path, + // then there is no need to do anything. + if(!is_absolute_path(dest_path)) + dest_path=absolute_path(dest_path); + else + dest_path=cleanup_path(dest_path); + + if(!is_absolute_path(curr_path)) + curr_path=absolute_path(curr_path); + else + curr_path=cleanup_path(curr_path); + +#ifdef WIN32 + // If we are on windows and the dest path is on a different drive, + // then there is no way to make a relative path to it. + if(dest_path.size()>=3 && dest_path[1]==':' && dest_path[0]!=curr_path[0]) + return dest_path; +#endif + + if(curr_path==dirname(dest_path)) + return basename(dest_path); + + while(!dest_path.empty() && !curr_path.empty() && get_root_from_path(dest_path)==get_root_from_path(curr_path)) + { + dest_path=remove_root_from_path(dest_path); + curr_path=remove_root_from_path(curr_path); + } + + while(!curr_path.empty()) + { + dest_path=std::string("..")+ETL_DIRECTORY_SEPARATOR+dest_path; + curr_path=remove_root_from_path(curr_path); + } + + return dest_path; +} + +_ETL_END_NAMESPACE + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_surface.h b/ETL/ETL/_surface.h new file mode 100644 index 0000000..d5a32a5 --- /dev/null +++ b/ETL/ETL/_surface.h @@ -0,0 +1,649 @@ +/*! ======================================================================== +** Extended Template and Library +** Surface Class Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__SURFACE_H +#define __ETL__SURFACE_H + +/* === H E A D E R S ======================================================= */ + +#include "_pen.h" +#include "_misc.h" +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +template +class value_prep +{ +public: + typedef T value_type; + typedef AT accumulator_type; + + accumulator_type cook(const value_type& x)const { return (accumulator_type)x; } + value_type uncook(const accumulator_type& x)const { return (value_type)x; } +}; + +template > +class surface +{ +public: + typedef T value_type; + typedef AT accumulator_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef generic_pen pen; + typedef generic_pen const_pen; + typedef VP value_prep_type; + + typedef alpha_pen const_alpha_pen; + typedef alpha_pen non_const_alpha_pen; + + typedef typename pen::difference_type size_type; + typedef typename pen::difference_type difference_type; + + typedef typename pen::iterator_x iterator_x; + typedef typename pen::iterator_y iterator_y; + typedef typename pen::const_iterator_x const_iterator_x; + typedef typename pen::const_iterator_y const_iterator_y; + +private: + value_type *data_; + value_type *zero_pos_; + typename difference_type::value_type pitch_; + int w_, h_; + bool deletable_; + + value_prep_type cooker_; + + void swap(const surface &x) + { + std::swap(data_,x.data_); + std::swap(zero_pos_,x.zero_pos_); + std::swap(pitch_,x.pitch_); + std::swap(w_,x.w_); + std::swap(h_,x.h_); + std::swap(deletable_,x.deletable_); + } + +public: + surface(): + data_(0), + zero_pos_(data_), + pitch_(0), + w_(0),h_(0), + deletable_(false) { } + + surface(value_type* data, int w, int h, bool deletable=false): + data_(data), + zero_pos_(data), + pitch_(sizeof(value_type)*w), + w_(w),h_(h), + deletable_(deletable) { } + + surface(const typename size_type::value_type &w, const typename size_type::value_type &h): + data_(new value_type[w*h]), + zero_pos_(data_), + pitch_(sizeof(value_type)*w), + w_(w),h_(h), + deletable_(true) { } + + surface(const size_type &s): + data_(new value_type[s.x*s.y]), + zero_pos_(data_), + pitch_(sizeof(value_type)*s.x), + w_(s.x),h_(s.y), + deletable_(true) { } + + template + surface(const _pen &_begin, const _pen &_end) + { + typename _pen::difference_type size=_end-_begin; + + data_=new value_type[size.x*size.y]; + w_=size.x; + h_=size.y; + zero_pos_=data_; + pitch_=sizeof(value_type)*w_; + deletable_=true; + + int x,y; + + for(y=0;y void + fill(value_type v, _pen& PEN, int w, int h) + { + assert(data_); + if(w<=0 || h<=0)return; + int y; + PEN.set_value(v); + for(y=0;y void blit_to(_pen &pen) + { return blit_to(pen,0,0, get_w(),get_h()); } + + template void + blit_to(_pen &DEST_PEN, + int x, int y, int w, int h) //src param + { + if(x>=w_ || y>=h_) + return; + + //clip source origin + if(x<0) + { + w+=x; //decrease + x=0; + } + + if(y<0) + { + h+=y; //decrease + y=0; + } + + //clip width against dest width + w = std::min((long)w,(long)(DEST_PEN.end_x()-DEST_PEN.x())); + h = std::min((long)h,(long)(DEST_PEN.end_y()-DEST_PEN.y())); + + //clip width against src width + w = std::min(w,w_-x); + h = std::min(h,h_-y); + + if(w<=0 || h<=0) + return; + + pen SOURCE_PEN(get_pen(x,y)); + + for(; h>0; h--,DEST_PEN.inc_y(),SOURCE_PEN.inc_y()) + { + int i; + for(i=0; i0 + && h_>0 + && pitch_!=0 + ; + } + + operator bool()const { return is_valid(); } + + pen begin() { assert(data_); return pen(data_,w_,h_,pitch_); } + pen get_pen(int x, int y) { assert(data_); return begin().move(x,y); } + pen end() { assert(data_); return get_pen(w_,h_); } + + const_pen begin()const { assert(data_); return const_pen(data_,w_,h_,pitch_); } + const_pen get_pen(int x, int y)const { assert(data_); return begin().move(x,y); } + const_pen end()const { assert(data_); return get_pen(w_,h_); } + + //! Linear sample + value_type linear_sample(const float x, const float y)const + { + int u(floor_to_int(x)), v(floor_to_int(y)); + float a, b; + static const float epsilon(1.0e-6); + + if(x<0.0f)u=0,a=0.0f; + else if(x>w_-1)u=w_-1,a=0.0f; + else a=x-u; + + if(y<0.0f)v=0,b=0.0f; + else if(y>h_-1)v=h_-1,b=0.0f; + else b=y-v; + + const float + c(1.0f-a), d(1.0f-b), + e(a*d),f(c*b),g(a*b); + + accumulator_type ret(cooker_.cook((*this)[v][u])*(c*d)); + if(e>=epsilon)ret+=cooker_.cook((*this)[v][u+1])*e; + if(f>=epsilon)ret+=cooker_.cook((*this)[v+1][u])*f; + if(g>=epsilon)ret+=cooker_.cook((*this)[v+1][u+1])*g; + return cooker_.uncook(ret); + } + + //! Cosine sample + value_type cosine_sample(const float x, const float y)const + { + int u(floor_to_int(x)), v(floor_to_int(y)); + float a, b; + static const float epsilon(1.0e-6); + + if(x<0.0f)u=0,a=0.0f; + else if(x>w_-1)u=w_-1,a=0.0f; + else a=x-u; + + if(y<0.0f)v=0,b=0.0f; + else if(y>h_-1)v=h_-1,b=0.0f; + else b=y-v; + + a=(1.0f-cos(a*3.1415927f))*0.5f; + b=(1.0f-cos(b*3.1415927f))*0.5f; + + const float + c(1.0f-a), d(1.0f-b), + e(a*d),f(c*b),g(a*b); + + accumulator_type ret(cooker_.cook((*this)[v][u])*(c*d)); + if(e>=epsilon)ret+=cooker_.cook((*this)[v][u+1])*e; + if(f>=epsilon)ret+=cooker_.cook((*this)[v+1][u])*f; + if(g>=epsilon)ret+=cooker_.cook((*this)[v+1][u+1])*g; + + return cooker_.uncook(ret); + } + + //! Cubic sample + value_type cubic_sample(float x, float y)const + { + #if 0 + #define P(x) (((x)>=0)?((x)*(x)*(x)):0.0f) + #define R(x) ( P(x+2) - 4.0f*P(x+1) + 6.0f*P(x) - 4.0f*P(x-1) )*(1.0f/6.0f) + #define F(i,j) (cooker_.cook((*this)[max(min(j+v,h_-1),0)][max(min(i+u,w_-1),0)])*(R((i)-a)*R(b-(j)))) + #define Z(i,j) ret+=F(i,j) + #define X(i,j) // placeholder... To make box more symmetric + + int u(floor_to_int(x)), v(floor_to_int(y)); + float a, b; + + // Clamp X + if(x<0.0f)u=0,a=0.0f; + else if(u>w_-1)u=w_-1,a=0.0f; + else a=x-u; + + // Clamp Y + if(y<0.0f)v=0,b=0.0f; + else if(v>h_-1)v=h_-1,b=0.0f; + else b=y-v; + + // Interpolate + accumulator_type ret(F(0,0)); + Z(-1,-1); Z(-1, 0); Z(-1, 1); Z(-1, 2); + Z( 0,-1); X( 0, 0); Z( 0, 1); Z( 0, 2); + Z( 1,-1); Z( 1, 0); Z( 1, 1); Z( 1, 2); + Z( 2,-1); Z( 2, 0); Z( 2, 1); Z( 2, 2); + + return cooker_.uncook(ret); + + #undef X + #undef Z + #undef F + #undef P + #undef R + #else + + #define f(j,i) (cooker_.cook((*this)[j][i])) + //Using catmull rom interpolation because it doesn't blur at all + //bezier curve with intermediate ctrl pts: 0.5/3(p(i+1) - p(i-1)) and similar + accumulator_type xfa [4]; + + //precalculate indices (all clamped) and offset + const int xi = x > 0 ? (x < w_ ? (int)floor(x) : w_-1) : 0; + const int xa[] = {std::max(0,xi-1),xi,std::min(w_-1,xi+1),std::min(w_-1,xi+2)}; + + const int yi = y > 0 ? (y < h_ ? (int)floor(y) : h_-1) : 0; + const int ya[] = {std::max(0,yi-1),yi,std::min(h_-1,yi+1),std::min(h_-1,yi+2)}; + + const float xf = x-xi; + const float yf = y-yi; + + //figure polynomials for each point + const float txf[] = + { + 0.5*xf*(xf*(xf*(-1) + 2) - 1), //-t + 2t^2 -t^3 + 0.5*(xf*(xf*(3*xf - 5)) + 2), //2 - 5t^2 + 3t^3 + 0.5*xf*(xf*(-3*xf + 4) + 1), //t + 4t^2 - 3t^3 + 0.5*xf*xf*(xf-1) //-t^2 + t^3 + }; + + const float tyf[] = + { + 0.5*yf*(yf*(yf*(-1) + 2) - 1), //-t + 2t^2 -t^3 + 0.5*(yf*(yf*(3*yf - 5)) + 2), //2 - 5t^2 + 3t^3 + 0.5*yf*(yf*(-3*yf + 4) + 1), //t + 4t^2 - 3t^3 + 0.5*yf*yf*(yf-1) //-t^2 + t^3 + }; + + //evaluate polynomial for each row + for(int i = 0; i < 4; ++i) + { + xfa[i] = f(ya[i],xa[0])*txf[0] + f(ya[i],xa[1])*txf[1] + f(ya[i],xa[2])*txf[2] + f(ya[i],xa[3])*txf[3]; + } + + //return the cumulative column evaluation + return cooker_.uncook(xfa[0]*tyf[0] + xfa[1]*tyf[1] + xfa[2]*tyf[2] + xfa[3]*tyf[3]); +#undef f +#endif + } + + value_type sample_rect(float x0,float y0,float x1,float y1) const + { + const surface &s = *this; + + //assumes it's clamped to the boundary of the image + //force min max relationship for x0,x1 and y0,y1 + if(x0 > x1) std::swap(x0,x1); + if(y0 > y1) std::swap(y0,y1); + + //local variable madness + //all things that want to inter-operate should provide a default value constructor for = 0 + accumulator_type acum = 0; + int xi=0,yi=0; + + int xib=(int)floor(x0), + xie=(int)floor(x1); + + int yib=(int)floor(y0), + yie=(int)floor(y1); + + //the weight for the pixel should remain the same... + float weight = (y1-y0)*(x1-x0); + assert(weight != 0); + + float ylast = y0, xlastb = x0; + const_pen pen_ = s.get_pen(xib,yib); + + for(yi = yib; yi < yie; ylast = ++yi, pen_.inc_y()) + { + const float yweight = yi+1 - ylast; + + float xlast = xlastb; + for(xi = xib; xi < xie; xlast = ++xi, pen_.inc_x()) + { + const float w = yweight*(xi+1 - xlast); + acum += cooker_.cook(pen_.get_value())*w; + } + + //post... with next being fractional... + const float w = yweight*(x1 - xlast); + acum += cooker_.cook(pen_.get_value())*w; + + pen_.dec_x(xie-xib); + } + + //post in y direction... must have all x... + { + const float yweight = y1 - ylast; + + float xlast = xlastb; + for(xi = xib; xi < xie; xlast = ++xi) + { + const float w = yweight*(xi+1 - xlast); + + acum += cooker_.cook(pen_.get_value())*w; + } + + //post... with next being fractional... + const float w = yweight*(x1 - xlast); + acum += cooker_.cook(pen_.get_value())*w; + } + + acum *= 1/weight; + return cooker_.uncook(acum); + } + + value_type sample_rect_clip(float x0,float y0,float x1,float y1) const + { + const surface &s = *this; + + //assumes it's clamped to the boundary of the image + //force min max relationship for x0,x1 and y0,y1 + if(x0 > x1) std::swap(x0,x1); + if(y0 > y1) std::swap(y0,y1); + + //local variable madness + //all things that want to inter-operate should provide a default value constructor for = 0 + accumulator_type acum = 0; + int xi=0,yi=0; + + int xib=(int)floor(x0), + xie=(int)floor(x1); + + int yib=(int)floor(y0), + yie=(int)floor(y1); + + //the weight for the pixel should remain the same... + float weight = (y1-y0)*(x1-x0); + + assert(weight != 0); + + //clip to the input region + if(x0 >= s.get_w() || x1 <= 0) return acum; + if(y0 >= s.get_h() || y1 <= 0) return acum; + + if(x0 < 0) { x0 = 0; xib = 0; } + if(x1 >= s.get_w()) + { + x1 = s.get_w(); //want to be just below the last pixel... + xie = s.get_w()-1; + } + + if(y0 < 0) { y0 = 0; yib = 0; } + if(y1 >= s.get_h()) + { + y1 = s.get_h(); //want to be just below the last pixel... + yie = s.get_h()-1; + } + + float ylast = y0, xlastb = x0; + const_pen pen = s.get_pen(xib,yib); + + for(yi = yib; yi < yie; ylast = ++yi, pen.inc_y()) + { + const float yweight = yi+1 - ylast; + + float xlast = xlastb; + for(xi = xib; xi < xie; xlast = ++xi, pen.inc_x()) + { + const float w = yweight*(xi+1 - xlast); + acum += cooker_.cook(pen.get_value())*w; + } + + //post... with next being fractional... + const float w = yweight*(x1 - xlast); + acum += cooker_.cook(pen.get_value())*w; + + pen.dec_x(xie-xib); + } + + //post in y direction... must have all x... + { + const float yweight = y1 - ylast; + + float xlast = xlastb; + for(xi = xib; xi < xie; xlast = ++xi) + { + const float w = yweight*(xi+1 - xlast); + + acum += cooker_.cook(pen.get_value())*w; + } + + //post... with next being fractional... + const float w = yweight*(x1 - xlast); + acum += cooker_.cook(pen.get_value())*w; + } + + acum *= 1/weight; + return cooker_.uncook(acum); + } +}; + +_ETL_END_NAMESPACE + +/* === T Y P E D E F S ===================================================== */ + + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_thread.h b/ETL/ETL/_thread.h new file mode 100644 index 0000000..8f70be8 --- /dev/null +++ b/ETL/ETL/_thread.h @@ -0,0 +1,515 @@ +/*! ======================================================================== +** Extended Template and Library +** Thread Abstraction Class Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__THREAD_H_ +#define __ETL__THREAD_H_ + +/* === H E A D E R S ======================================================= */ + +#define __USE_GNU + +#ifdef HAVE_PTHREAD_H +# include +#endif + +#ifdef HAVE_SCHED_H +# include +#endif + +#ifdef HAVE_CREATETHREAD +# include +#endif + +/* === M A C R O S ========================================================= */ + +#if ( defined (HAVE_PTHREAD_CREATE) || defined (HAVE_CLONE) || defined (HAVE_CREATETHREAD) ) && !defined (NO_THREADS) +# define CALLISTO_THREADS +#endif + +#define THREAD_ENTRYPOINT + +/* === C L A S S E S & S T R U C T S ======================================= */ + +#if defined(CALLISTO_THREADS) && defined(HAVE_PTHREAD_CREATE) +static inline void Yield(void) +{ + sched_yield(); + pthread_testcancel(); +} +#else +#ifdef Yield + #undef Yield +#endif +inline void Yield(void) { } +#endif + +#ifdef CALLISTO_THREADS + +#ifdef HAVE_PTHREAD_CREATE + +class Thread +{ +public: + typedef void* entrypoint_return; +private: + + pthread_t thread; + int *references; + entrypoint_return (*entrypoint)(void *); + void *context; +public: + Thread(void *(*ep)(void *)=NULL,void *context=NULL): + references(NULL),entrypoint(ep),context(context) { } + Thread(const Thread &t) + { + thread=t.thread; + references=t.references; + entrypoint=t.entrypoint; + context=t.context; + if(references) + (*references)++; + } + const Thread &operator=(const Thread &rhs) + { + if(references) + { + (*references)--; + if(*references==0) + stop(); + } + thread=rhs.thread; + references=rhs.references; + entrypoint=rhs.entrypoint; + context=rhs.context; + if(references) + (*references)++; + return *this; + } + + void start(void) + { + references = new int; + *references = 1; + pthread_create(&thread,NULL,entrypoint,context); +// pthread_detach(thread); + } + + void stop(void) + { + delete references; + references=NULL; + void *exit_status; + pthread_cancel(thread); + pthread_join(thread,&exit_status); + } + + static void TestStop() + { + pthread_testcancel(); + } + + static void SyncStop() + { + int i; + pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,&i); + } + + static void AsyncStop() + { + int i; + pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS,&i); + } + + ~Thread() + { + if(references) + { + (*references)--; + if(*references==0) + stop(); + } + } +}; + +class Mutex +{ + pthread_mutex_t mutex; + pthread_t locker; + int depth; +public: + + Mutex() + { + pthread_mutexattr_t attr; + pthread_mutexattr_init(&attr); + //#ifdef PTHREAD_PRIO_INHERIT + //pthread_mutexattr_setprioceiling(&attr,PTHREAD_PRIO_INHERIT); + //#endif + #ifdef PTHREAD_MUTEX_RECURSIVE + pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); + #endif + pthread_mutex_init(&mutex,&attr); + pthread_mutexattr_destroy(&attr); + locker=0; + depth=0; + } + + ~Mutex() + { pthread_mutex_destroy(&mutex); } + + void Lock(void) + { + if(!locker || locker!=pthread_self()) + { + pthread_mutex_lock(&mutex); + locker=pthread_self(); + depth=0; + return; + } + depth++; + } + + bool TryLock(void) + { return !(bool) pthread_mutex_trylock(&mutex); } + + void UnLock(void) + { + if(depth) + { + depth--; + return; + } + pthread_mutex_unlock(&mutex); + locker=0; + } +}; + +#ifdef HAVE_PTHREAD_RW_LOCK_INIT +class ReadWriteLock +{ + pthread_rwlock_t rwlock; +public: + + ReadWriteLock() + { pthread_rwlock_init(&rwlock,NULL); } + + ~ReadWriteLock() + { pthread_rwlock_destroy(&rwlock); } + + void LockRead(void) + { pthread_rwlock_rdlock(&rwlock); } + + void LockWrite(void) + { pthread_rwlock_wrlock(&rwlock); } + + bool TryLockRead(void) + { return !(bool)pthread_rwlock_tryrdlock(&rwlock); } + + bool TryLockWrite(void) + { return !(bool)pthread_rwlock_trywrlock(&rwlock); } + + void UnLockWrite(void) + { pthread_rwlock_unlock(&rwlock); } + + void UnLockRead(void) + { pthread_rwlock_unlock(&rwlock); } +}; +#else +//* +class ReadWriteLock : public Mutex +{ +public: + + ReadWriteLock() + { } + + ~ReadWriteLock() + { } + + void LockRead(void) + { Lock(); } + + void LockWrite(void) + { Lock(); } + + bool TryLockRead(void) + { return TryLock(); } + + bool TryLockWrite(void) + { return TryLock(); } + + void UnLockWrite(void) + { UnLock(); } + + void UnLockRead(void) + { UnLock(); } +}; +#endif + +/* +class Condition +{ + pthread_cond_t cond; + pthread_mutex_t mutex; +public: + Condition() + { pthread_cond_init(&cond,NULL); pthread_mutex_init(&mutex,NULL); } + ~Condition() + { pthread_cond_destroy(&cond); pthread_mutex_destroy(&mutex);} + void operator()(void) + { pthread_cond_signal(&cond); } + void Wait(void) + { + pthread_mutex_lock(&mutex); + pthread_cond_wait(&cond,&mutex); + pthread_mutex_unlock(&mutex); + } +}; +*/ + +#else // if defined HAVE_PTHREAD +#ifdef HAVE_CREATETHREAD + + +#ifdef THREAD_ENTRYPOINT +#undef THREAD_ENTRYPOINT +#endif +#define THREAD_ENTRYPOINT __stdcall +class Thread +{ +public: + typedef unsigned long entrypoint_return; +private: + + unsigned long thread; + HANDLE handle; + int *references; + + entrypoint_return (THREAD_ENTRYPOINT *entrypoint)(void *); + + void *context; + + HDC hdc; + HGLRC hglrc; + + static entrypoint_return THREAD_ENTRYPOINT thread_prefix(void*data) + { + Thread *thread=(Thread *)data; + + if(thread->hglrc) + wglMakeCurrent(thread->hdc, thread->hglrc); + + return thread->entrypoint(thread->context); + } + +public: + Thread(entrypoint_return (THREAD_ENTRYPOINT *ep)(void *)=NULL,void *context=NULL): + references(NULL),entrypoint(ep),context(context) { } + Thread(const Thread &t) + { + thread=t.thread; + handle=t.handle; + references=t.references; + entrypoint=t.entrypoint; + context=t.context; + handle=NULL; + if(references) + (*references)++; + } + const Thread &operator=(const Thread &rhs) + { + if(references) + { + (*references)--; + if(*references==0) + stop(); + } + thread=rhs.thread; + handle=rhs.handle; + references=rhs.references; + entrypoint=rhs.entrypoint; + context=rhs.context; + if(references) + (*references)++; + return *this; + } + + void start(void) + { + references = new int; + *references = 1; + + hglrc=wglGetCurrentContext(); + hdc=wglGetCurrentDC(); + + handle=CreateThread( + NULL, // Security stuff + 0, // STACK + thread_prefix, // thread function + (void*)this, // thread argument + 0, // creation option + &thread // thread identifier + ); + } + + void stop(void) + { + delete references; + references=NULL; + + TerminateThread(handle, FALSE); + } + + int wait(void) + { + if(handle) + { + WaitForSingleObject(handle, INFINITE); + CloseHandle(handle); + } + return 0; + } + + static void TestStop() + { + } + + static void SyncStop() + { + } + + static void AsyncStop() + { + } + + ~Thread() + { + if(references) + { + (*references)--; + if(*references==0) + stop(); + } + } +}; + +class Mutex +{ + HANDLE handle; +public: + + Mutex() + { + handle = CreateMutex(NULL, FALSE, NULL); + } + + ~Mutex() + { + CloseHandle(handle); + } + + void Lock(void) + { + WaitForSingleObject(handle, INFINITE); + } + + bool TryLock(void) + { + return WaitForSingleObject(handle, INFINITE)==WAIT_FAILED; + } + + void UnLock(void) + { + ReleaseMutex(handle); + } +}; + + +#endif // if defined HAVE_CREATETHREAD +#endif // if defined HAVE_PTHREAD_CREATE +#endif // if defined CALLISTO_THREADS + + +#if !defined(CALLISTO_THREADS) +// Dummy object used when not threading +class ReadWriteLock +{ +public: + + ReadWriteLock() {} + ~ReadWriteLock() {} + void LockRead(void) {} + void LockWrite(void) {} + bool TryLockRead(void) {return true;} + bool TryLockWrite(void) {return true;} + void UnLockRead(void) {} + void UnLockWrite(void) {} +}; + +class Mutex +{ +public: + + Mutex(){} + ~Mutex(){} + void Lock(void){} + bool TryLock(void){return true;} + void UnLock(void){} +}; + +#endif + +class Condition : private Mutex +{ + bool flag; +public: + Condition() + { flag=false; } + ~Condition() + { } + void operator()(void) + { flag=true; } + void Wait(void) + { + Lock(); + while(!flag)Yield(); + flag=false; + UnLock(); + } + void WaitNext(void) + { + Lock(); + flag=false; + while(!flag)Yield(); + UnLock(); + } +}; + +/* === E X T E R N S ======================================================= */ + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_trivial.h b/ETL/ETL/_trivial.h new file mode 100644 index 0000000..a819c1d --- /dev/null +++ b/ETL/ETL/_trivial.h @@ -0,0 +1,164 @@ +/*! ======================================================================== +** Extended Template Library +** Trivializing Template Class Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__TRIVIAL_H +#define __ETL__TRIVIAL_H + +/* === H E A D E R S ======================================================= */ + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +_ETL_BEGIN_NAMESPACE + +/*! ======================================================================== +** \class Trivial +** \brief Trivializes the constructor of a given class +** +** This class makes the given type 'trivial', +** effectively disabling the constructor and +** destructor. (This is useful for unions) +** Some extra casting may be necessary to get +** it to work properly. +*/ +template +class trivial +{ + typedef T value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T* pointer; + typedef const T* const_pointer; + + char data[sizeof(T)]; +public: + operator reference() + { return *reinterpret_cast(data); } + + // HACK - Rather dangerous + //operator reference()const + //{ return *reinterpret_cast(const_cast(data)); } + + operator const_reference()const + { return *reinterpret_cast(data); } + + reference get() + { return *reinterpret_cast(data); } + + const_reference get()const + { return *reinterpret_cast(data); } + + void construct() + { new(&get()) value_type(); } + + void destruct() + { get().~value_type(); } + + void destroy() { destruct(); } + + template reference + operator=(const U &rhs) + { return get()=rhs; } + + templatereference + operator=(const trivial &rhs) + { return get()=rhs.get(); } + + template reference + operator+=(const U &rhs) + { return get()+=rhs; } + + template reference + operator-=(const U &rhs) + { return get()-=rhs; } + + template reference + operator*=(const U &rhs) + { return get()*=rhs; } + + template reference + operator/=(const U &rhs) + { return get()/=rhs; } + + template reference + operator%=(const U &rhs) + { return get()%=rhs; } + + template reference + operator^=(const U &rhs) + { return get()^=rhs; } + + template reference + operator&=(const U &rhs) + { return get()&=rhs; } + + template reference + operator>>=(const U &rhs) + { return get()>>=rhs; } + + template reference + operator<<=(const U &rhs) + { return get()<<=rhs; } + + operator bool()const + { return get(); } + + bool operator!()const + { return !get(); } +}; // END of template class trivial + +_ETL_END_NAMESPACE + +//#include + +/* +template std::basic_istream<_CharT, _Traits>& +operator>>(std::basic_istream<_CharT, _Traits>& s, etl::trivial& rhs) +{ return s>>(T)(rhs); } + +template std::basic_ostream<_CharT, _Traits>& +operator<<(std::basic_ostream<_CharT, _Traits>& s, const etl::trivial& rhs) +{ return s<<(T)(rhs); } +*/ + +/* +template std::istream& +operator>>(std::istream& s, etl::trivial& rhs) +{ return s>>(T)(rhs); } + +template std::ostream& +operator<<(std::ostream& s, const etl::trivial& rhs) +{ return s<<(T)(rhs); } +*/ + +/* === E X T E R N S ======================================================= */ + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/_value.h b/ETL/ETL/_value.h new file mode 100644 index 0000000..adf7816 --- /dev/null +++ b/ETL/ETL/_value.h @@ -0,0 +1,237 @@ +/* ======================================================================== +** Extended Template and Library +** Abstraction for a Generic Value Type +** $Id$ +** +** Copyright (c) 2002 Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** This is an internal header file, included by other ETL headers. +** You should not attempt to use it directly. +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__VALUE_H +#define __ETL__VALUE_H + +/* === H E A D E R S ======================================================= */ +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +/*! \note This class may be specialized to support binary compatibility + for desired objects (e.g. point3,vector3,float[3]). + However it MUST be declared within scope that you are using the + values.... + + \warning If you specialize this class for something that isn't binary + compatible, then your values could easily report belonging to + the wrong types. +*/ +template < typename T > +class value_store_type +{ +public: + typedef T value_type; +}; + +_ETL_BEGIN_NAMESPACE + +/*! \class value _value.h ETL/value + \brief Abstraction of the concept of a generic value + + Modified from ideas for the boost::any type. Added binary compatibility + structure +*/ +class value +{ + struct contentholder + { + virtual ~contentholder() {} + virtual contentholder *clone() const = 0; + virtual const std::type_info &type() const = 0; + }; + + contentholder *content; + +public: //constructor interface + value() + :content(0) + { + } + + value(const value &v) + :content( v.content ? v.content->clone() : 0 ) + { + } + + /* Copies the object passed to it + */ + template < typename T > + value(const T &v) + :content( new holder< typename value_store_type::value_type > + (reinterpret_cast::value_type &>(v)) ) + { + } + +public: //modifier interface + + value & swap(value & rhs) + { + std::swap(content, rhs.content); + return *this; + } + + template + value & operator=(const ValueType & rhs) + { + value(rhs).swap(*this); + return *this; + } + + value & operator=(const value & rhs) + { + value(rhs).swap(*this); + return *this; + } + +public: //query interface + + bool empty() const + { + return content == 0; + } + + const std::type_info & type() const + { + return content ? content->type() : typeid(void); + } + +private: //implementation interface + + template < typename T > + class holder : public contentholder + { + public: //representation + T obj; + + public: //constructor interface + + holder(const T &o) + :obj(o) + { + } + + holder(const holder &h) + :obj(h.obj) + { + } + + public: //accessor interface + virtual contentholder *clone() const + { + return new holder(*this); + } + + virtual const std::type_info &type() const + { + return typeid(T); + } + + public: //allocation interface + void *operator new(unsigned int size) + { + assert(size == sizeof(holder)); + + //use pool allocation at some point + return malloc(size); + } + + void operator delete(void *p) + { + assert(p); + //use pool allocation at some point + return free(p); + } + }; + + template < typename ValueType > + friend ValueType *value_cast(value *v); +}; + +/*! Is thrown for bad value_casts (when using a reference...) +*/ +class bad_value_cast : public std::bad_cast +{ +public: + virtual const char * what() const throw() + { + return "etl::bad_value_cast: " "failed conversion using boost::value_cast"; + } +}; + +/*! Returns a pointer to the desired value type if the value_type and the internal + binary format agree (mediated by using the value_store_type class), otherwise + it returns 0. + + \see value_store_type +*/ +template < typename ValueType > +ValueType *value_cast(value *v) +{ + assert(v); + + return ( typeid(typename value_store_type::value_type) == v->type() ) + ? &static_cast *>(v->content)->obj + : 0; +} + +/*! Same as above except tweaked to allow const cast (possibly for purposes involving + type agreement... if const impacts a typeid call I do not know...) +*/ +template < typename ValueType > +const ValueType * value_cast(const value *v) +{ + return value_cast(const_cast(v)); +} + +/*! Extract a copy of the internal object and will throw a bad_value_cast exception + if the types do not agree. + + \note I'm not sure why boost::any didn't use a reference here... there must be a reason... + + \see bad_value_cast +*/ +template < typename ValueType > +ValueType value_cast(const value &v) +{ + const ValueType * result = value_cast(&v); + if(!result) + throw bad_value_cast(); + return *result; +} + +_ETL_END_NAMESPACE + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/angle b/ETL/ETL/angle new file mode 100644 index 0000000..9a0f2bb --- /dev/null +++ b/ETL/ETL/angle @@ -0,0 +1,48 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Angle Abstraction Class Implementation +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__ANGLE__ +#define __ETL__ANGLE__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" +#include "_curve_func.h" + +#ifdef ETL_FASTANGLE +#include "_fastangle.h" +_ETL_BEGIN_NAMESPACE +typedef fastangle angle; +_ETL_END_NAMESPACE +#else +# include "_angle.h" +#endif + +#ifdef __BEZIER__ +#include "_bezier_angle.h" +#endif + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/bezier b/ETL/ETL/bezier new file mode 100644 index 0000000..a341031 --- /dev/null +++ b/ETL/ETL/bezier @@ -0,0 +1,40 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Bezier Curve Class +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__BEZIER__ +#define __ETL__BEZIER__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_bezier.h" + +#ifdef __ETL_ANGLE__ +#include "_bezier_angle.h" +#endif + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/boxblur b/ETL/ETL/boxblur new file mode 100644 index 0000000..5364c23 --- /dev/null +++ b/ETL/ETL/boxblur @@ -0,0 +1,36 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Box Blur Template +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__BOXBLUR__ +#define __ETL__BOXBLUR__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_boxblur.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/calculus b/ETL/ETL/calculus new file mode 100644 index 0000000..e527557 --- /dev/null +++ b/ETL/ETL/calculus @@ -0,0 +1,36 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Calculus Functional Classes +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__CALCULUS__ +#define __ETL__CALCULUS__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_calculus.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/clock b/ETL/ETL/clock new file mode 100644 index 0000000..2457b6c --- /dev/null +++ b/ETL/ETL/clock @@ -0,0 +1,104 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Clock Abstraction +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__CLOCK__ +#define __ETL__CLOCK__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#ifdef HAVE_GETTIMEOFDAY +#include "_clock_gettimeofday.h" +#ifndef ETL_CLOCK_DEFAULT_DESC_CLASS +#define ETL_CLOCK_DEFAULT_DESC_CLASS _ETL::clock_desc_gettimeofday +#endif +#ifndef ETL_CLOCK_REALTIME_DESC_CLASS +#define ETL_CLOCK_REALTIME_DESC_CLASS _ETL::clock_desc_gettimeofday +#endif +#endif + +#ifdef _WIN32 +#include "_clock_win32hpcount.h" +#ifndef ETL_CLOCK_DEFAULT_DESC_CLASS +#define ETL_CLOCK_DEFAULT_DESC_CLASS _ETL::clock_desc_win32hpcount +#endif +#ifndef ETL_CLOCK_REALTIME_DESC_CLASS +#define ETL_CLOCK_REALTIME_DESC_CLASS _ETL::clock_desc_win32hpcount +#endif +#endif + +// If we could not find ourselves a better +// clock description, go ahead and use the +// standard clock() implementation. +// (Better than nothing...) +#include "_clock_system.h" +#ifndef ETL_CLOCK_DEFAULT_DESC_CLASS +#define ETL_CLOCK_DEFAULT_DESC_CLASS _ETL::clock_desc_sys_clock +#endif +#ifndef ETL_CLOCK_PROCTIME_DESC_CLASS +#define ETL_CLOCK_PROCTIME_DESC_CLASS _ETL::clock_desc_sys_clock +#endif +#ifndef ETL_CLOCK_REALTIME_DESC_CLASS +#define ETL_CLOCK_REALTIME_DESC_CLASS _ETL::clock_desc_sys_time +#endif + +#include "_clock_base.h" + +_ETL_BEGIN_NAMESPACE + +#if 0 + typedef _ETL::clock_base clock; + #ifdef ETL_CLOCK_PROCTIME_DESC_CLASS + #define ETL_CLOCK_PROCTIME + typedef clock_base clock_proctime; + #endif + #ifdef ETL_CLOCK_REALTIME_DESC_CLASS + #define ETL_CLOCK_REALTIME + typedef clock_base clock_realtime; + #else + #warning No realtime clock description found. + #endif + +#else + class clock : public _ETL::clock_base { }; + #ifdef ETL_CLOCK_PROCTIME_DESC_CLASS + #define ETL_CLOCK_PROCTIME + class clock_proctime : public _ETL::clock_base { }; + #endif + #ifdef ETL_CLOCK_REALTIME_DESC_CLASS + #define ETL_CLOCK_REALTIME + class clock_realtime : public _ETL::clock_base { }; + #else + #warning No realtime clock description found. + #endif +#endif + +_ETL_END_NAMESPACE + +//using etl::clock; + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/etl_config.h b/ETL/ETL/etl_config.h new file mode 100644 index 0000000..94b4056 --- /dev/null +++ b/ETL/ETL/etl_config.h @@ -0,0 +1,66 @@ + + +#ifndef __ETL_CONFIG_H +#define __ETL_CONFIG_H + +#include "etl_profile.h" +#include + +#ifndef ETL_NAMESPACE +# define ETL_NAMESPACE etl +#endif + +#ifdef WIN32 +#define ETL_DIRECTORY_SEPARATOR '\\' +#else +#define ETL_DIRECTORY_SEPARATOR '/' +#endif + +#ifndef ETL_FLAG_NONAMESPACE +# define _ETL ETL_NAMESPACE +# define _ETL_BEGIN_NAMESPACE namespace _ETL { +# define _ETL_END_NAMESPACE }; +# define _STD_BEGIN_NAMESPACE namespace std { +# define _STD_END_NAMESPACE }; +#else +# define _ETL +# define _ETL_BEGIN_NAMESPACE +# define _ETL_END_NAMESPACE +# define _STD_BEGIN_NAMESPACE +# define _STD_END_NAMESPACE +#endif + +#define _ETL_BEGIN_CDECLS extern "C" { +#define _ETL_END_CDECLS } + +#ifdef _REENTRANT +#define ETL_REENTRANT 1 +#endif + +/* If __FUNC__ is not defined, +** try to define it. If we cannot, +** then just leave it undefined. +*/ +#ifndef __FUNC__ +/* + * # if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4) +# define __FUNC__ __PRETTY_FUNCTION__ +# else +# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L +# define __FUNC__ __func__ +# endif +# endif +*/ +#endif + +#ifdef __GNUG__ +#define ETL_DEPRECATED_FUNCTION __attribute__ ((deprecated)) +#else +#define ETL_DEPRECATED_FUNCTION +#endif + +#ifndef NULL +#define NULL 0 +#endif + +#endif diff --git a/ETL/ETL/fastangle b/ETL/ETL/fastangle new file mode 100644 index 0000000..c874f7a --- /dev/null +++ b/ETL/ETL/fastangle @@ -0,0 +1,36 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Fast Angle Abstraction Class +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__FASTANGLE__ +#define __ETL__FASTANGLE__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_fastangle.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/fixed b/ETL/ETL/fixed new file mode 100644 index 0000000..58d99e4 --- /dev/null +++ b/ETL/ETL/fixed @@ -0,0 +1,36 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Fixed-Point Math Class +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__FIXED__ +#define __ETL__FIXED__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_fixed.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/gaussian b/ETL/ETL/gaussian new file mode 100644 index 0000000..745306c --- /dev/null +++ b/ETL/ETL/gaussian @@ -0,0 +1,36 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Gaussian Blur Template +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__GAUSSIAN__ +#define __ETL__GAUSSIAN__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_gaussian.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/handle b/ETL/ETL/handle new file mode 100644 index 0000000..76508bc --- /dev/null +++ b/ETL/ETL/handle @@ -0,0 +1,49 @@ +// -*- C++ -*- +/* === E T L =============================================================== */ +/*! \file handle +** $Id$ +** \brief Template Object Handle +** +** \legal +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__HANDLE__ +#define __ETL__HANDLE__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +// include the next line in an attempt to increase stability +// it seems to make things much *less* stable on MS Windows +#ifndef _WIN32 +#ifdef HAVE_LIBPTHREAD +#define ETL_LOCK_REFCOUNTS +#endif +#endif + +#ifdef ETL_LOCK_REFCOUNTS +# include "mutex" +#endif + +#include "_handle.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/hermite b/ETL/ETL/hermite new file mode 100644 index 0000000..66b2fcb --- /dev/null +++ b/ETL/ETL/hermite @@ -0,0 +1,36 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Hermite Curve Class +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__HERMITE__ +#define __ETL__HERMITE__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_hermite.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/ipc b/ETL/ETL/ipc new file mode 100644 index 0000000..5c31519 --- /dev/null +++ b/ETL/ETL/ipc @@ -0,0 +1,41 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Inter-Process Commumnication Classes +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__IPC__ +#define __ETL__IPC__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_mutex_null.h" + +#include "_mutex_pthreads.h" + +#include "_condition.h" +#include "_rwlock.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/misc b/ETL/ETL/misc new file mode 100644 index 0000000..571968b --- /dev/null +++ b/ETL/ETL/misc @@ -0,0 +1,36 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Misc +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__MISC__ +#define __ETL__MISC__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_misc.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/mutex b/ETL/ETL/mutex new file mode 100644 index 0000000..f4d1263 --- /dev/null +++ b/ETL/ETL/mutex @@ -0,0 +1,42 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Mutex Classes +** $Id$ +** +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__MUTEX__ +#define __ETL__MUTEX__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#ifdef HAVE_LIBPTHREAD +# include "_mutex_pthreads_simple.h" +#else +#ifdef _WIN32 +# include "_mutex_win32.h" +#endif +#endif + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/pen b/ETL/ETL/pen new file mode 100644 index 0000000..822137e --- /dev/null +++ b/ETL/ETL/pen @@ -0,0 +1,36 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Pen Template Class +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__PEN__ +#define __ETL__PEN__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_pen.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/random b/ETL/ETL/random new file mode 100644 index 0000000..0b2815c --- /dev/null +++ b/ETL/ETL/random @@ -0,0 +1,36 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Random Number Generator Class +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__RANDOM__ +#define __ETL__RANDOM__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_random.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/rect b/ETL/ETL/rect new file mode 100644 index 0000000..3e8be9f --- /dev/null +++ b/ETL/ETL/rect @@ -0,0 +1,36 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Rect +** $Id$ +** +** Copyright (c) 2002 Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__RECT__ +#define __ETL__RECT__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_rect.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/ref_count b/ETL/ETL/ref_count new file mode 100644 index 0000000..0ed146f --- /dev/null +++ b/ETL/ETL/ref_count @@ -0,0 +1,36 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__REF_COUNT__ +#define __ETL__REF_COUNT__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_ref_count.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/smach b/ETL/ETL/smach new file mode 100644 index 0000000..7299702 --- /dev/null +++ b/ETL/ETL/smach @@ -0,0 +1,36 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** State Machine Abstraction Class +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__SMACH__ +#define __ETL__SMACH__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_smach.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/smart_ptr b/ETL/ETL/smart_ptr new file mode 100644 index 0000000..c58514f --- /dev/null +++ b/ETL/ETL/smart_ptr @@ -0,0 +1,36 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Template Smart Pointer +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__SMART_PTR__ +#define __ETL__SMART_PTR__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_smart_ptr.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/spline b/ETL/ETL/spline new file mode 100644 index 0000000..aa34136 --- /dev/null +++ b/ETL/ETL/spline @@ -0,0 +1,37 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Spline Class +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__SPLINE__ +#define __ETL__SPLINE__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_bspline.h" +#include "_curve.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/status b/ETL/ETL/status new file mode 100644 index 0000000..c1e687c --- /dev/null +++ b/ETL/ETL/status @@ -0,0 +1,38 @@ +#ifdef THIS_CODE_IS_NOT_USED +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Status Callback Class +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__STATUS__ +#define __ETL__STATUS__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_status.h" + +/* === E N D =============================================================== */ + +#endif +#endif /* THIS_CODE_IS_NOT_USED */ diff --git a/ETL/ETL/stringf b/ETL/ETL/stringf new file mode 100644 index 0000000..d196f7d --- /dev/null +++ b/ETL/ETL/stringf @@ -0,0 +1,36 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** stringf Procedure +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__STRINGF__ +#define __ETL__STRINGF__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_stringf.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/surface b/ETL/ETL/surface new file mode 100644 index 0000000..afc313e --- /dev/null +++ b/ETL/ETL/surface @@ -0,0 +1,36 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Surface Abstraction Class +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__SURFACE__ +#define __ETL__SURFACE__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_surface.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/thread b/ETL/ETL/thread new file mode 100644 index 0000000..500f496 --- /dev/null +++ b/ETL/ETL/thread @@ -0,0 +1,36 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Thread Abstraction Class +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__THREAD__ +#define __ETL__THREAD__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_thread.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/trivial b/ETL/ETL/trivial new file mode 100644 index 0000000..1f3d1bc --- /dev/null +++ b/ETL/ETL/trivial @@ -0,0 +1,36 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Trivial Template Class +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__TRIVIAL__ +#define __ETL__TRIVIAL__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_trivial.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/ETL/value b/ETL/ETL/value new file mode 100644 index 0000000..b97e102 --- /dev/null +++ b/ETL/ETL/value @@ -0,0 +1,36 @@ +// -*- C++ -*- +/*! ======================================================================== +** Extended Template and Library +** Generic Value Template +** $Id$ +** +** Copyright (c) 2002 Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __ETL__VALUE__ +#define __ETL__VALUE__ + +/* === H E A D E R S ======================================================= */ + +#include "etl_config.h" + +#include "_value.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/ETL/Makefile.am b/ETL/Makefile.am new file mode 100644 index 0000000..48447b7 --- /dev/null +++ b/ETL/Makefile.am @@ -0,0 +1,116 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + COPYING \ + INSTALL \ + config/config.guess \ + config/config.sub \ + config/ltmain.sh \ + config/install-sh \ + config/mkinstalldirs \ + config/aclocal.m4 \ + config/missing \ + config/texinfo.tex \ + config/depcomp \ + aclocal.m4 \ + config.h.in \ + configure \ + stamp-h.in \ + Makefile.in \ + config.log \ + config.status \ + .doc_stamp \ + .DS_Store \ + include/etl_profile.h.in \ + doxygen.cfg + + +SUBDIRS = \ + ETL \ + test + + +# Install the pkg-config file: +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = ETL.pc + +#Install the -config/m4 alternative to pkg-config: +bin_SCRIPTS = ETL-config + +aclocaldir = $(prefix)/share/aclocal +ACLOCAL_AMFLAGS = -I m4 + +EXTRA_DIST = \ + COPYING \ + m4/subs.m4 \ + config/depcomp \ + m4/cxx_macros.m4 \ + ETL.pbproj/project.pbxproj \ + ETL.pbproj/etl_profile.h \ + ETL.pbproj/frameworkfix.cpp \ + ETL-config.in \ + m4/ETL.m4 \ + doxygen.cfg.in \ + doxygen.cfg \ + ETL.pc.in + + +SVN=svn +TAG=@PACKAGE_TARNAME@_@VERSION_MAJ@_@VERSION_MIN@_@VERSION_REV@ + +GREP=grep + +PRINTF=printf + +SH=sh + +DOXYGEN=doxygen + +stats: + -@echo + -@echo -- Stats + -@echo + -@$(PRINTF) "Total lines: " + -@wc -l $(shell find $(top_srcdir)/ETL -name '*.[ch]*') | $(GREP) total + -@$(PRINTF) "Total size: " + -@du -hcs $(shell find $(top_srcdir)/ETL -name '*.[ch]*') | $(GREP) total + -@echo + +tagstable: + -$(SVN) delete $(SVN_REPOSITORY)/tags/stable -m "Stable Tag: Removing old tag" + $(SVN) copy $(top_srcdir) $(SVN_REPOSITORY)/tags/stable -m "Stable Tag: Copying everything over" + +tagrelease: + $(SVN) copy $(top_srcdir) $(SVN_REPOSITORY)/tags/$(TAG) -m "Release $(TAG)" + +ChangeLog: + -svn update + svn2cl --include-rev || touch ChangeLog + +listfixmes: + -@echo + -@echo -- List of pending FIXMEs + -@echo + -@$(GREP) FIXME -n $(shell find $(top_srcdir) -name '*.[ch]*') + -@echo + +listhacks: + -@echo + -@echo -- List of pending HACKs + -@echo + -@$(GREP) HACK -n $(shell find $(top_srcdir) -name '*.[ch]*') + -@echo + +run: check + +.doc_stamp: doxygen.cfg + $(DOXYGEN) doxygen.cfg + touch .doc_stamp + +html: .doc_stamp + +rtf: .doc_stamp + +docs: html + +.PHONY: stats tagstable tagrelease listfixmes listhacks check docs pdf html rtf diff --git a/ETL/NEWS b/ETL/NEWS new file mode 100644 index 0000000..da8dea4 --- /dev/null +++ b/ETL/NEWS @@ -0,0 +1,50 @@ + ETL releases + +More detailed notes are available on the releases page: + +http://synfig.org/Releases + + 0.04.12 (SVN 2112) - October 21, 2008 - Bug fixes + + * Improve the derivative class for hermites. + * Update configure.ac as suggested by autoupdate. + + 0.04.11 (SVN 1837) - March 3, 2008 - Bug fixes + + * Update the website URL to synfig.org instead of synfig.com + * Removed the 'bootstrap' script for building. Use autoreconf instead + * Fixed errors and warnings detected by a pre-release version of GCC 4.3 + * Make ETL-config a wrapper around pkg-config. + * Wrap the refcounting stuff in mutexes + * Don't wrap angles by 360 degrees + * Minor cleanups and typo fixes + + 0.04.10 (SVN 878) - October 10, 2007 - Bug fixes + + * Fix dirname for absolute paths (#1793306) + * Fix minor issues and typos + * Various changes to the 'angle' code. 89+360 < 90; 90 == 90+360, !360 is true, etc. + * Resolve confusion about whether angles are clockwise, and whether they're stored in radians. + * Fix 'make check' for 'fixed' so that it doesn't fail. Tidy the output, too. + + 0.04.09 (SVN 530) - June 20, 2006 - Bug fixes + + * Fix amd64 issue + * Some tests fixes + * Misc bug fixes + * Add better code for finding closest point to a bezier (#1672033) + + 0.04.08 (SVN 139) - February 27, 2006 - Bug fixes + + * Update doxygen configuration + * Misc bug fixes + + 0.04.07 (SVN 52) - November 6, 2005 - Bug fixes + + * Add ./configure options for debug, warnings, optimisation, profiling + * Misc bug fixes + + 0.04.06 - November 3, 2005 - First release! + + * First release! + diff --git a/ETL/README b/ETL/README new file mode 100644 index 0000000..9186837 --- /dev/null +++ b/ETL/README @@ -0,0 +1,37 @@ + ETL -- Extended Template Library + +ETL is a multi-platform class and template library designed to add +new datatypes and functions which combine well with the existing +types and functions from the C++ Standard Template Library (STL). + +Web: http://synfig.org/ +Code: http://synfig.org/Source_code +Proj: http://sf.net/projects/synfig/ +IRC: irc://irc.freenode.net/synfig + +Please use the IRC channel and the sf.net tracker to get support and +report bugs, request features and submit patches. + +Copyright + +Copyright 2002 Robert B. Quattlebaum Jr. +Copyright 2002 Adrian Bentley +Copyright 2007-2008 Chris Moore +Copyright 2008 Paul Wise + +Licence + +This package is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of +the License, or (at your option) any later version. + +This package is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +or visit http://www.gnu.org/licenses/gpl.html diff --git a/ETL/config/pkg-support/ETL-devel.info b/ETL/config/pkg-support/ETL-devel.info new file mode 100755 index 0000000..4ba67fd --- /dev/null +++ b/ETL/config/pkg-support/ETL-devel.info @@ -0,0 +1,14 @@ +Title @_PACKAGE_@ @_VERSION_@ +Version @_RELEASE_@ +Description @_PACKAGE_NAME_@ +DefaultLocation /Library/Frameworks +DeleteWarning +NeedsAuthorization YES +DisableStop NO +UseUserMask YES +Application NO +Relocatable YES +Required NO +InstallOnly NO +RequiresReboot NO +InstallFat NO diff --git a/ETL/config/pkg-support/devel-resources/License.rtf b/ETL/config/pkg-support/devel-resources/License.rtf new file mode 100755 index 0000000..52701d7 --- /dev/null +++ b/ETL/config/pkg-support/devel-resources/License.rtf @@ -0,0 +1,10 @@ +{\rtf1\mac\ansicpg10000\cocoartf102 +{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\vieww9000\viewh9000\viewkind0 +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural + +\f0\b\fs36 \cf0 This will be the license. +\f1\b0\fs24 \ +\ +I intend to licence this software under the LGPL. } \ No newline at end of file diff --git a/ETL/config/pkg-support/devel-resources/ReadMe.rtf b/ETL/config/pkg-support/devel-resources/ReadMe.rtf new file mode 100755 index 0000000..17874b1 --- /dev/null +++ b/ETL/config/pkg-support/devel-resources/ReadMe.rtf @@ -0,0 +1,7 @@ +{\rtf1\mac\ansicpg10000\cocoartf102 +{\fonttbl\f0\fswiss\fcharset77 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\margl1440\margr1440\vieww9000\viewh9000\viewkind0 +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural + +\f0\fs24 \cf0 This is the readme.} \ No newline at end of file diff --git a/ETL/config/pkg-support/devel-resources/Welcome.rtf b/ETL/config/pkg-support/devel-resources/Welcome.rtf new file mode 100755 index 0000000..50c42a5 --- /dev/null +++ b/ETL/config/pkg-support/devel-resources/Welcome.rtf @@ -0,0 +1,6 @@ +{\rtf1\mac\ansicpg10000\cocoartf102 +{\fonttbl\f0\fswiss\fcharset77 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural + +\f0\fs24 \cf0 This is the welcome file.} \ No newline at end of file diff --git a/ETL/config/pkg-support/devel-resources/install.sh b/ETL/config/pkg-support/devel-resources/install.sh new file mode 100755 index 0000000..7cb2058 --- /dev/null +++ b/ETL/config/pkg-support/devel-resources/install.sh @@ -0,0 +1,48 @@ +#!/bin/sh +# finish up the installation +# this script should be executed using the sudo command +# this file is copied to ETL-devel.post_install and ETL-devel.post_upgrade +# inside the .pkg bundle +echo "Running post-install script" +umask 022 +sleep 1 + +RESOURCE_DIR=`dirname $0` + +cd RESOURCE_DIR + +echo "Creating ETL-config script" +sleep 1 +[ -d /usr/local ] || mkdir /usr/local +[ -d /usr/local/bin ] || mkdir /usr/local/bin +[ -d /usr/local/include ] || mkdir /usr/local/include +[ -d /usr/local/lib ] || mkdir /usr/local/lib +[ -d /usr/local/sbin ] || mkdir /usr/local/sbin + +# If we already have a directory called ETL in our include directory, nuke it +[ -d /usr/local/include/ETL ] && rm -fr /usr/local/include/ETL + +ln -s /usr/local/include/ETL /Library/Frameworks/ETL.framework/Headers +sed ' +s:@exec_prefix@:/usr/local:g; +s:@prefix@:/usr/local:g; +s:@bindir@:$exec_prefix/bin:g; +s:@libdir@:$exec_prefix/lib:g; +s:@includedir@:$prefix/include:g; +s:@VERSION@:@_VERSION_@:g; +s:@PACKAGE@:@_PACKAGE_@:g; +s:@LIBS@::g; +' < $RESOURCE_DIR/ETL-config.in > /usr/local/bin/ETL-config +chmod 775 /usr/local/bin/ETL-config + +echo "Done with shell script" +sleep 1 + +exit 0 + + +#echo "Precompiling Headers" +#/usr/bin/cc -precomp ~/Library/Frameworks/SDL.framework/Headers/SDL.h -o ~/Library/Frameworks/SDL.framework/Headers/SDL.p + +# open up the README file +#open ~/"Readme SDL Developer.txt" diff --git a/ETL/configure.ac b/ETL/configure.ac new file mode 100644 index 0000000..63f5e96 --- /dev/null +++ b/ETL/configure.ac @@ -0,0 +1,94 @@ +# $Id$ + +# -- I N I T -------------------------------------------------- + +AC_INIT([Extended Template Library],[0.04.12],[http://synfig.org/Bugs],[ETL]) +AC_REVISION + +AC_CONFIG_AUX_DIR(config) +AC_CONFIG_HEADERS([ETL/etl_profile_.h]) +AC_CANONICAL_HOST +AC_CANONICAL_TARGET + +AM_INIT_AUTOMAKE([ no-define ]) +AM_MAINTAINER_MODE + +# -- V A R I A B L E S ---------------------------------------- + +debug="no" + +SVN_REPOSITORY=https://synfig.svn.sourceforge.net/svnroot/synfig/ETL +AC_SUBST(SVN_REPOSITORY) + +# -- A R G U M E N T S ---------------------------------------- + + +# -- P R O G R A M S ------------------------------------------ + +AC_PROG_CC +AC_PROG_CXX +AC_PROG_INSTALL +AC_PROG_RANLIB + +AC_LANG([C++]) + +AC_ARG_WARNINGS +AC_ARG_DEBUG +AC_ARG_OPTIMIZATION +AC_ARG_PROFILING + +AC_WIN32_QUIRKS + +# -- L I B R A R I E S ---------------------------------------- + +# -- H E A D E R S -------------------------------------------- + +AH_TOP([ +// We want to be autoconf/autoheader friendly, so +// if the developer has already included an +// autoheader-generated configuration script, +// we can assume that the user knew what they +// were doing and let them use their own config.h. +//#ifndef PACKAGE_TARNAME +]) + +AH_BOTTOM([ +//#endif // ifndef PACKAGE_TARNAME +]) + + +# -- T Y P E S & S T R U C T S -------------------------------- + +# -- F U N C T I O N S ---------------------------------------- + +ETL_DEPS + +# -- O U T P U T ---------------------------------------------- + +AC_SUBST(CFLAGS) +AC_SUBST(CPPFLAGS) +AC_SUBST(LDFLAGS) + +AC_CONFIG_FILES([ETL-config +Makefile +ETL/Makefile +test/Makefile +ETL.pc +doxygen.cfg +]) +AC_OUTPUT + +# -- S U M M A R Y -------------------------------------------- + +echo " +$PACKAGE_NAME v.$VERSION +Configuration Summary +- - - - - - + +Install Prefix -------------------> $prefix +Target Platform ------------------> $host +Debug Mode -----------------------> $debug + +"'$'"CXX ------------------------------> '$CXX' +"'$'"CXXFLAGS -------------------------> '$CXXFLAGS' +" diff --git a/ETL/doxygen.cfg.in b/ETL/doxygen.cfg.in new file mode 100644 index 0000000..3ac5c4e --- /dev/null +++ b/ETL/doxygen.cfg.in @@ -0,0 +1,1220 @@ +# Doxyfile 1.4.6 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = @PACKAGE@ + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = @VERSION@ + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = doc + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, +# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, +# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, +# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, +# Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explicit @brief command for a brief description. + +JAVADOC_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = "legal=\if legal" \ + endlegal=\endif \ + "writeme=\todo This needs to be documented" \ + "stub=\todo this is a stub" + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to +# include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = YES + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = NO + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = ETL + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py + +FILE_PATTERNS = *.cpp \ + *.h \ + *.cxx \ + *.hxx \ + *.hpp + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = ETL_NO_DEPRECATED \ + DOXYGEN_SHOULD_SKIP_THIS \ + DOXYGEN_IS_RUNNING + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = gif + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that a graph may be further truncated if the graph's +# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH +# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), +# the graph is not depth-constrained. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, which results in a white background. +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO diff --git a/ETL/m4/ETL.m4 b/ETL/m4/ETL.m4 new file mode 100644 index 0000000..c2dc7a4 --- /dev/null +++ b/ETL/m4/ETL.m4 @@ -0,0 +1,69 @@ +# ETL M4 Macro +# For GNU Autotools +# $Id$ +# +# By Robert B. Quattlebaum Jr. +# + +AC_DEFUN([ETL_DEPS], +[ + AC_CHECK_LIB(user32, main) + AC_CHECK_LIB([kernel32], [CreateMutex]) + AC_CHECK_LIB([pthread], [pthread_mutex_init]) + + AC_HEADER_STDC + + AC_CHECK_HEADERS(pthread.h) + AC_CHECK_HEADERS(sched.h) + AC_CHECK_HEADERS(sys/time.h) + AC_CHECK_HEADERS(unistd.h) + AC_CHECK_HEADERS(windows.h) + AC_CHECK_FUNCS([pthread_create]) + AC_CHECK_FUNCS([pthread_rwlock_init]) + AC_CHECK_FUNCS([sched_yield]) + AC_CHECK_FUNCS([CreateThread]) + AC_CHECK_FUNCS([QueryPerformanceCounter]) + + AC_CHECK_FUNCS([gettimeofday]) + AC_CHECK_FUNCS([sscanf]) + AC_CHECK_FUNCS([vsscanf]) + AC_CHECK_FUNCS([vsprintf]) + AC_CHECK_FUNCS([vasprintf]) + AC_CHECK_FUNCS([vsnprintf],[],[ + AC_CHECK_FUNC([_vsnprintf],[ + AC_DEFINE(vsnprintf,_vsnprintf,[define if the vsnprintf function is mangled]) + AC_DEFINE(HAVE_VSNPRINTF,1) + ]) + ]) +]) + +AC_DEFUN([USING_ETL], +[ + AC_ARG_WITH(ETL-includes, + [ --with-ETL-includes Specify location of ETL headers],[ + CXXFLAGS="$CXXFLAGS -I$withval" + ]) + + AC_PATH_PROG(ETL_CONFIG,ETL-config,no) + + if test "$ETL_CONFIG" = "no"; then + no_ETL_config="yes" + $2 + else + AC_MSG_CHECKING([if $ETL_CONFIG works]) + if $ETL_CONFIG --libs >/dev/null 2>&1; then + ETL_VERSION="`$ETL_CONFIG --version`" + AC_MSG_RESULT([yes, $ETL_VERSION]) + CXXFLAGS="$CXXFLAGS `$ETL_CONFIG --cxxflags`" + $1 + else + AC_MSG_RESULT(no) + no_ETL_config="yes" + $2 + fi + fi + + ETL_DEPS +]) + + diff --git a/ETL/m4/cxx_macros.m4 b/ETL/m4/cxx_macros.m4 new file mode 100644 index 0000000..8fc247a --- /dev/null +++ b/ETL/m4/cxx_macros.m4 @@ -0,0 +1,88 @@ +AC_DEFUN([AC_CXX_FUNCTION_NONTYPE_PARAMETERS], +[AC_CACHE_CHECK(whether the compiler supports function templates with non-type parameters, +ac_cv_cxx_function_nontype_parameters, +[AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([ +template class A {}; +template int f(const A& x) { return 0; } +],[A z; return f(z);], + ac_cv_cxx_function_nontype_parameters=yes, ac_cv_cxx_function_nontype_parameters=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_function_nontype_parameters" = yes; then + AC_DEFINE(HAVE_FUNCTION_NONTYPE_PARAMETERS,, + [define if the compiler supports function templates with non-type parameters]) +fi +]) + +AC_DEFUN([AC_CXX_NAMESPACES], +[AC_CACHE_CHECK(whether the compiler implements namespaces, +ac_cv_cxx_namespaces, +[AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], + [using namespace Outer::Inner; return i;], + ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_namespaces" = yes; then + AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) +fi +]) + +AC_DEFUN([AC_CXX_HAVE_COMPLEX], +[AC_CACHE_CHECK(whether the compiler has complex, +ac_cv_cxx_have_complex, +[AC_REQUIRE([AC_CXX_NAMESPACES]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif],[complex a; complex b; return 0;], + ac_cv_cxx_have_complex=yes, ac_cv_cxx_have_complex=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_have_complex" = yes; then + AC_DEFINE(HAVE_COMPLEX,,[define if the compiler has complex]) +fi +]) + +AC_DEFUN([AC_CXX_HAVE_SSTREAM], +[AC_CACHE_CHECK(whether the compiler has stringstream, +ac_cv_cxx_have_sstream, +[AC_REQUIRE([AC_CXX_NAMESPACES]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif],[stringstream message; message << "Hello"; return 0;], + ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_have_sstream" = yes; then + AC_DEFINE(HAVE_SSTREAM,,[define if the compiler has stringstream]) +fi +]) + +AC_DEFUN([AC_CXX_MUTABLE], +[AC_CACHE_CHECK(whether the compiler supports the mutable keyword, +ac_cv_cxx_mutable, +[AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([ +class A { mutable int i; + public: + int f (int n) const { i = n; return i; } + }; +],[A a; return a.f (1);], + ac_cv_cxx_mutable=yes, ac_cv_cxx_mutable=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_mutable" = yes; then + AC_DEFINE(HAVE_MUTABLE,,[define if the compiler supports the mutable keyword]) +fi +]) + diff --git a/ETL/m4/subs.m4 b/ETL/m4/subs.m4 new file mode 100644 index 0000000..f4dfcf9 --- /dev/null +++ b/ETL/m4/subs.m4 @@ -0,0 +1,244 @@ + +## AC_ARG_WARNINGS() +## +## Provide the --enable-warnings configure argument, set to 'minimum' +## by default. +## +AC_DEFUN([AC_ARG_WARNINGS], +[ + AC_ARG_ENABLE([warnings], + [ --enable-warnings=[[none|minimum|maximum|hardcore]] + Control compiler pickyness. [[default=maximum]]], + [gtkmm_enable_warnings="$enableval"], + gtkmm_enable_warnings="maximum") + + AC_MSG_CHECKING([for compiler warning flags to use]) + + gtkmm_warning_flags='' + + case "$gtkmm_enable_warnings" in + none|no) gtkmm_warning_flags='';; + minimum|yes) gtkmm_warning_flags='-Wall -Wno-unused-parameter';; + maximum) gtkmm_warning_flags='-W -Wall';; + hardcore) gtkmm_warning_flags='-W -Wall -Werror';; + esac + + gtkmm_use_flags='' + + if test "x$gtkmm_warning_flags" != "x" + then + echo 'int foo() { return 0; }' > conftest.cc + + for flag in $gtkmm_warning_flags + do + # Test whether the compiler accepts the flag. GCC doesn't bail + # out when given an unsupported flag but prints a warning, so + # check the compiler output instead. + gtkmm_cxx_out="`$CXX $flag -c conftest.cc 2>&1`" + rm -f conftest.$OBJEXT + test "x${gtkmm_cxx_out}" = "x" && \ + gtkmm_use_flags="${gtkmm_use_flags:+$gtkmm_use_flags }$flag" + done + + rm -f conftest.cc + gtkmm_cxx_out='' + fi + + if test "x$gtkmm_use_flags" != "x" + then + for flag in $gtkmm_use_flags + do + case " $CXXFLAGS " in + *" $flag "*) ;; # don't add flags twice + *) CXXFLAGS="${CXXFLAGS:+$CXXFLAGS }$flag";; + esac + done + else + gtkmm_use_flags='none' + fi + + AC_MSG_RESULT([$gtkmm_use_flags]) +]) + + + + +AC_DEFUN([AC_ARG_DEBUG], +[ + AC_MSG_CHECKING([for debug flags]) + + AC_ARG_ENABLE(debug,[ --enable-debug Build in debugging mode],[ + debug=$enableval + ],[ + debug="no" + ]) + debug_flags='' + + case "$debug" in + yes) + debug_flags="-D_DEBUG -g" + ;; + half) + debug_flags="-DNDEBUG -g" + ;; + no|*) + debug_flags="-DNDEBUG" + ;; + esac + + + CXXFLAGS="`echo $CXXFLAGS | sed s:-g::` $debug_flags" + CFLAGS="`echo $CFLAGS | sed s:-g::` $debug_flags" + + AC_MSG_RESULT([$debug_flags]) +]) + + + + +AC_DEFUN([AC_ARG_OPTIMIZATION], +[ + AC_MSG_CHECKING([for optimization flags]) + + AC_ARG_ENABLE(optimization,[ --enable-optimization=[[0,1,2,3,4]] Select optimization level (default=2)],[ + optimization=$enableval + ],[ + optimization="2" + ]) + optimization_flags='' + case "$optimization" in + 0|no) optimization_flags="-O0";; + 1) optimization_flags="-O1";; + 2|yes) optimization_flags="-O2";; + pass1) optimization_flags="-O2 -fprofile-arcs";; + pass2) optimization_flags="-O2 -fbranch-probabilities";; + 3) optimization_flags="-O3";; + *) optimization_flags="-O4";; + esac + CXXFLAGS="`echo $CXXFLAGS | sed 's:-O.::g'` $optimization_flags" + CFLAGS="`echo $CFLAGS | sed 's:-O.::g'` $optimization_flags" + AC_MSG_RESULT([$optimization_flags]) +]) + +AC_DEFUN([AC_ARG_PROFILE_ARCS], +[ + AC_MSG_CHECKING([for arc profiling]) + + AC_ARG_ENABLE(profile-arcs,[ --enable-profile-arcs Enable arc profiling],[ + profile_arcs=$enableval + ],[ + profile_arcs=no + ]) + + if test $profile_arcs = "yes" ; then { + CXXFLAGS="$CXXFLAGS -fprofile-arcs"; + CFLAGS="$CFLAGS -fprofile-arcs"; + } ; fi + + AC_MSG_RESULT([$profile_arcs]) +]) + +AC_DEFUN([AC_ARG_BRANCH_PROBABILITIES], +[ + AC_MSG_CHECKING([for branch-probabilities]) + + AC_ARG_ENABLE(branch-probabilities,[ --enable-branch-probabilities Enable branch-probabilities],[ + branch_probabilities=$enableval + ],[ + branch_probabilities=no + ]) + + if test $branch_probabilities = "yes" ; then { + CXXFLAGS="$CXXFLAGS -fbranch-probabilities"; + CFLAGS="$CFLAGS -fbranch-probabilities"; + } ; fi + + AC_MSG_RESULT([$branch_probabilities]) +]) + +AC_DEFUN([AC_ARG_PROFILING], +[ + AC_MSG_CHECKING([for profiling]) + + AC_ARG_ENABLE(profiling,[ --enable-profiling Enable profiling using gprof],[ + profiling=$enableval + ],[ + profiling=no + ]) + + if test $profiling = "yes" ; then { + CFLAGS="$CFLAGS -pg"; + CXXFLAGS="$CXXFLAGS -pg"; + LDFLAGS="$LDFLAGS -pg"; + LIBS="$LIBS"; + } ; fi + + AC_MSG_RESULT([$profiling]) +]) + +MINGW_FLAGS="-mno-cygwin" + + +AC_DEFUN([AC_WIN32_QUIRKS], +[ + +case "$host" in + *mingw*) + AC_MSG_CHECKING([the flavor of the compiler]) + if ( $CC --version | grep -q mingw ) ; then { + AC_MSG_RESULT([compiler is mingw special]) + LIBTOOL_PATCH_SED=" + s/dir=\"\$absdir\"/dir=\`cygpath -d -m \"\$absdir\"\`/; + s/absdir=\`cd \"\$dir\" && pwd\`/absdir=\`cygpath -d -m \"\$dir\"\`/; + s/# We need an absolute path/dir=\`cygpath -d -m \"\$dir\"\` # We need an absolute path/; + s- /usr/lib- C:/mingw/lib-g; + s-\"/lib -\"C:/mingw/lib -g; + s- /lib/ - -g; + "; + sys_lib_dlsearch_path_spec="C:/mingw/lib" + ac_default_prefix=`cygpath -d -m "$ac_default_prefix"`; + } else { + AC_MSG_RESULT([compiler is cygwin stock, adding -mno-cygwin]) + CPP="$CPP $MINGW_FLAGS" + CC="$CC $MINGW_FLAGS" + CXX="$CXX $MINGW_FLAGS -L/usr/$host/lib -I/usr/include/c++/3.3.3/$host" + CXXCPP="$CXXCPP $MINGW_FLAGS" + + +} ; fi + + LTCC="gcc" + CXXFLAGS="$CXXFLAGS -LC:/GTK/lib" + CFLAGS="$CFLAGS -LC:/GTK/lib" + LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols -Wl,--subsystem=console -Wl,--enable-runtime-pseudo-reloc" +dnl LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--subsystem=console -Wl,--enable-runtime-pseudo-reloc" + ;; + *cygwin*) + LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols" +dnl LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--subsystem=console" + CXXFLAGS="$CXXFLAGS -I/target/include" + CFLAGS="$CFLAGS -I/target/include" + ;; + powerpc-apple*) + echo Adding mac-specific optimization flags. . . + CXXFLAGS="$CXXFLAGS $G5OPTFLAGS" + ;; +esac + + +]) + +AC_DEFUN([AC_LIBTOOL_PATCH], +[ + +if [[ "$LIBTOOL_PATCH_SED""x" != "x" ]] ; then { + printf "Patching libtool... " + cat libtool | sed "$LIBTOOL_PATCH_SED" > libtool2 + rm libtool + mv libtool2 libtool + chmod +x libtool + AC_MSG_RESULT([patched]) +} fi ; + + +]) diff --git a/ETL/test/Makefile.am b/ETL/test/Makefile.am new file mode 100644 index 0000000..2b1b6e9 --- /dev/null +++ b/ETL/test/Makefile.am @@ -0,0 +1,64 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +AM_CXXFLAGS = \ + @CXXFLAGS@ \ + -I$(top_srcdir) \ + -I$(top_builddir)/ETL + +DEFAULT_INCLUDES = \ + -I$(top_srcdir) \ + -I$(top_builddir)/ETL + +TESTS = \ + fixed \ + clock \ + handle \ + angle \ + random \ + hermite \ + stringf \ + pen \ + surface \ + smart_ptr \ + benchmark +# spline \ +# value + +check_PROGRAMS = \ + fixed \ + handle \ + clock \ + angle \ + random \ + hermite \ + stringf \ + pen \ + surface \ + smart_ptr \ + benchmark \ + smach +# spline \ +# value + +benchmark_SOURCES=benchmark.cpp +smart_ptr_SOURCES=smart_ptr.cpp +surface_SOURCES=surface.cpp +pen_SOURCES=pen.cpp +handle_SOURCES=handle.cpp +angle_SOURCES=angle.cpp +random_SOURCES=random.cpp +fixed_SOURCES=fixed.cpp +smach_SOURCES=smach.cpp +clock_SOURCES=clock.cpp +hermite_SOURCES=hermite.cpp +#spline_SOURCES=spline.cpp +stringf_SOURCES=stringf.cpp +#value_SOURCES=value.cpp + +# FIXME: fix compiler errors for the spline and value tests. +EXTRA_DIST = \ + spline.cpp \ + value.cpp diff --git a/ETL/test/angle.cpp b/ETL/test/angle.cpp new file mode 100644 index 0000000..a0ecac6 --- /dev/null +++ b/ETL/test/angle.cpp @@ -0,0 +1,528 @@ +/*! ======================================================================== +** Extended Template and Library Test Suite +** Angle Class Test +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +ETL_FASTANGLE_INIT(); + +using namespace std; +using namespace etl; + +/* === C L A S S E S ======================================================= */ + +int fastangle_test(void) +{ + int ret=0; + float largest_error; + + { + angle theta; + fastangle theta2; + float error; + largest_error=0.0f; + + for( + theta=angle::degrees(0),theta2=fastangle::degrees(0); + theta<=angle::degrees(360); + theta+=angle::degrees(10),theta2+=fastangle::degrees(10) + ) + { + error=(float)angle::sin(theta).get() -(float)fastangle::sin(theta2).get(); + /* + fprintf(stderr,"angle: sin(%d)=%f ;\tfastangle: sin(%d)=%f ;\t diff: %f\n", + (int)angle::degrees(theta), + (float)angle::sin(theta), + (int)fastangle::degrees(theta2), + (float)fastangle::sin(theta2), + error + ); + */ + if(error > largest_error) + largest_error=error; + if(error < -largest_error) + largest_error=-error; + + } + } + printf("fastangle: Largest SIN error: (+/-)%f\n",largest_error); + if(largest_error>0.075)ret++; + + { + angle theta; + fastangle theta2; + float error; + largest_error=0.0f; + + for( + theta=angle::degrees(0),theta2=fastangle::degrees(0); + theta<=angle::degrees(360); + theta+=angle::degrees(10),theta2+=fastangle::degrees(10) + ) + { + error=(float)angle::cos(theta).get() -(float)fastangle::cos(theta2).get(); + /* + fprintf(stderr,"angle: cos(%d)=%f ;\tfastangle: cos(%d)=%f ;\t diff: %f\n", + (int)angle::degrees(theta), + (float)angle::cos(theta), + (int)fastangle::degrees(theta2), + (float)fastangle::cos(theta2), + error + ); + */ + if(error > largest_error) + largest_error=error; + if(error < -largest_error) + largest_error=-error; + + } + } + printf("fastangle: Largest COS error: (+/-)%f\n",largest_error); + if(largest_error>0.075)ret++; + + { + double val; + float error; + largest_error=0.0f; + + for( + val=-1.0f; + val<1.0f; + val+=0.01 + ) + { + error=angle::radians(angle::sin(val)).get() -fastangle::radians(fastangle::sin(val)).get(); + /* + fprintf(stderr,"angle: asin(%f)=%frad ;\tfastangle: asin(%f)=%frad ;\t diff: %f\n", + val, + (float)(angle::radians)angle::sin(val), + val, + (float)(fastangle::radians)fastangle::sin(val), + error + ); + */ + if(error > largest_error) + largest_error=error; + if(error < -largest_error) + largest_error=-error; + + } + } + printf("fastangle: Largest ASIN error: (+/-)%frad\n",largest_error); + if(largest_error>0.075)ret++; + + + { + double val; + float error; + largest_error=0.0f; + + for( + val=-1.0f; + val<1.0f; + val+=0.01 + ) + { + error=angle::radians(angle::cos(val)).get() -fastangle::radians(fastangle::cos(val)).get(); + /* + fprintf(stderr,"angle: acos(%f)=%frad ;\tfastangle: acos(%f)=%frad ;\t diff: %f\n", + val, + (float)(angle::radians)angle::cos(val), + val, + (float)(fastangle::radians)fastangle::cos(val), + error + ); + */ + if(error > largest_error) + largest_error=error; + if(error < -largest_error) + largest_error=-error; + + } + } + printf("fastangle: Largest ACOS error: (+/-)%frad\n",largest_error); + if(largest_error>0.075)ret++; + + + { + angle theta; + fastangle theta2; + float error; + largest_error=0.0f; + + for( + theta=angle::degrees(0),theta2=fastangle::degrees(0); + theta largest_error) + largest_error=error; + if(error < -largest_error) + largest_error=-error; + + } + } + printf("fastangle: Largest TAN error: (+/-)%f\n",largest_error); + if(largest_error>0.75)ret++; + + { + double val; + float error; + largest_error=0.0f; + + for( + val=-4.0f; + val<4.0f; + val+=0.1 + ) + { + error=angle::radians(angle::tan(val)).get() -fastangle::radians(fastangle::tan(val)).get(); + /* + fprintf(stderr,"angle: atan(%f)=%frad ;\tfastangle: atan(%f)=%frad ;\t diff: %f\n", + val, + (float)(angle::radians)angle::tan(val), + val, + (float)(fastangle::radians)fastangle::tan(val), + error + ); + */ + if(error > largest_error) + largest_error=error; + if(error < -largest_error) + largest_error=-error; + + } + } + printf("fastangle: Largest ATAN error: (+/-)%frad\n",largest_error); + if(largest_error>0.075)ret++; + + + { + angle theta; + float error; + largest_error=0.0f; + + for( + theta=angle::degrees(-179); + theta largest_error) + largest_error=error; + if(error < -largest_error) + largest_error=-error; + + } + } + printf("fastangle: Largest ATAN2 error: (+/-)%frad\n",largest_error); + if(largest_error>0.075)ret++; + + printf("constant tests: %f==%f\n", + (float)angle::degrees(angle::tan(1.01)).get(), + (float)fastangle::degrees(fastangle::tan(1.01)).get()); + printf("constant tests: %f==%f\n", + (float)angle::degrees(angle::tan(-1.0)).get(), + (float)fastangle::degrees(fastangle::tan(-1.0)).get()); + + return ret; +} + +template +void angle_cos_speed_test(void) +{ + Angle a,b,c,d; + float tmp,tmp2; + + for(tmp=-1.0;tmp<1.0;tmp+=0.000002) + { + a=(typename Angle::cos)(tmp); + b=(typename Angle::cos)(tmp); + c=(typename Angle::cos)(tmp); + d=(typename Angle::cos)(tmp); + tmp2=((typename Angle::cos)(a)).get(); + tmp2=((typename Angle::cos)(b)).get(); + tmp2=((typename Angle::cos)(c)).get(); + tmp2=((typename Angle::cos)(d)).get(); + } +} +template +void angle_sin_speed_test(void) +{ + Angle a,b,c,d; + float tmp,tmp2; + + for(tmp=-1.0;tmp<1.0;tmp+=0.000002) + { + a=(typename Angle::sin)(tmp); + b=(typename Angle::sin)(tmp); + c=(typename Angle::sin)(tmp); + d=(typename Angle::sin)(tmp); + tmp2=((typename Angle::sin)(a)).get(); + tmp2=((typename Angle::sin)(b)).get(); + tmp2=((typename Angle::sin)(c)).get(); + tmp2=((typename Angle::sin)(d)).get(); + } +} +template +void angle_tan_speed_test(void) +{ + Angle a,b,c,d; + float tmp,tmp2; + + for(tmp=-1.0;tmp<1.0;tmp+=0.000002) + { + a=(typename Angle::tan)(tmp); + b=(typename Angle::tan)(tmp); + c=(typename Angle::tan)(tmp); + d=(typename Angle::tan)(tmp); + tmp2=((typename Angle::tan)(a)).get(); + tmp2=((typename Angle::tan)(b)).get(); + tmp2=((typename Angle::tan)(c)).get(); + tmp2=((typename Angle::tan)(d)).get(); + } +} +template +void angle_atan2_speed_test(void) +{ + Angle a,b,c; + float x,y; + + for(y=-10.0;y<10.0;y+=0.05) + for(x=-10.0;x<10.0;x+=0.05) + { + a=mytan(y,x); + a=mytan(x,y); + b=mytan(y,x); + b=mytan(x,y); + c=mytan(y,x); + c=mytan(x,y); + a=mytan(y,x); + a=mytan(x,y); + b=mytan(y,x); + b=mytan(x,y); + c=mytan(y,x); + c=mytan(x,y); + } +} + +int fastangle_speed_test(void) +{ + int ret=0; + float + angle_cos_time, + fastangle_cos_time, + angle_tan_time, + fastangle_tan_time, + angle_atan2_time, + fastangle_atan2_time, + angle_sin_time, + fastangle_sin_time ; + + etl::clock MyTimer; + + MyTimer.reset(); + angle_cos_speed_test(); + angle_cos_time=MyTimer(); + printf("angle: Cosine test: %f seconds\n",angle_cos_time); + + MyTimer.reset(); + angle_cos_speed_test(); + fastangle_cos_time=MyTimer(); + printf("fastangle: Cosine test: %f seconds\n",fastangle_cos_time); + printf("fastangle is %.02f%% faster\n",(angle_cos_time/fastangle_cos_time)*100.0-100.0); + + MyTimer.reset(); + angle_sin_speed_test(); + angle_sin_time=MyTimer(); + printf("angle: Sine test: %f seconds\n",angle_sin_time); + + MyTimer.reset(); + angle_sin_speed_test(); + fastangle_sin_time=MyTimer(); + printf("fastangle: Sine test: %f seconds\n",fastangle_sin_time); + printf("fastangle is %.02f%% faster\n",(angle_sin_time/fastangle_sin_time)*100.0-100.0); + + MyTimer.reset(); + angle_tan_speed_test(); + angle_tan_time=MyTimer(); + printf("angle: Tangent test: %f seconds\n",angle_tan_time); + + MyTimer.reset(); + angle_tan_speed_test(); + fastangle_tan_time=MyTimer(); + printf("fastangle: Tangent test: %f seconds\n",fastangle_tan_time); + printf("fastangle is %.02f%% faster\n",(angle_tan_time/fastangle_tan_time)*100.0-100.0); + + MyTimer.reset(); + angle_atan2_speed_test(); + angle_atan2_time=MyTimer(); + printf("angle: arcTangent2 test: %f seconds\n",angle_atan2_time); + + MyTimer.reset(); + angle_atan2_speed_test(); + fastangle_atan2_time=MyTimer(); + printf("fastangle: arcTangent2 test: %f seconds\n",fastangle_atan2_time); + printf("fastangle is %.02f%% faster\n",(angle_atan2_time/fastangle_atan2_time)*100.0-100.0); + + return ret; +} + +int angle_test() +{ + int ret=0; + float dist; + + dist=angle::deg(angle::deg(330).dist(angle::deg(30))).get(); + printf("angle: angular difference between 330deg and 30deg is %0.1fdeg\n",dist); + if(floor(dist+0.5)!=300) + { + printf("angle: error: should be 300deg!\n"); + ret++; + } + + dist=angle::deg(angle::deg(30).dist(angle::deg(330))).get(); + printf("angle: angular difference between 30deg and 330deg is %0.1fdeg\n",dist); + if(floor(dist+0.5)!=-300) + { + printf("angle: error: should be -300deg!\n"); + ret++; + } + + dist=angle::deg(angle::deg(30).dist(angle::deg(-30))).get(); + printf("angle: angular difference between 30deg and -30deg is %0.1fdeg\n",dist); + if(floor(dist+0.5)!=60) + { + printf("angle: error: should be 60deg!\n"); + ret++; + } + + dist=angle::deg(angle::deg(-30).dist(angle::deg(30))).get(); + printf("angle: angular difference between -30deg and 30deg is %0.1fdeg\n",dist); + if(floor(dist+0.5)!=-60) + { + printf("angle: error: should be -60deg!\n"); + ret++; + } + + dist=angle::deg(angle::deg(20).dist(angle::deg(195))).get(); + printf("angle: angular difference between 20deg and 195deg is %0.1fdeg\n",dist); + if(floor(dist+0.5)!=-175) + { + printf("angle: error: should be -175deg!\n"); + ret++; + } + + dist=angle::deg(angle::deg(20).dist(angle::deg(205))).get(); + printf("angle: angular difference between 20deg and 205deg is %0.1fdeg\n",dist); + if(floor(dist+0.5)!=-185) + { + printf("angle: error: should be -185deg!\n"); + ret++; + } + + int i; + + for(i=-1000;i<1000;i++) + { + dist=angle::deg(angle::deg(20+i+360).dist(angle::deg(205+i-360))).get(); + if(floor(dist+0.5)!=535) + { + printf("angle: error: Badness at %d!\n",i); + ret++; + } + + } + + for(i=-1000;i<1000;i++) + { + dist=angle::deg(angle::deg(20+i-360).dist(angle::deg(195+i+360))).get(); + if(floor(dist+0.5)!=-895) + { + printf("angle: error: Badness at %d!\n",i); + ret++; + } + + } + + + + { + float f; + angle a(angle::deg(-2005)); + angle b(angle::deg(200)); + + affine_combo combo; + + hermite hermie(a,b,b.dist(a),b.dist(a)); + + for(f=0;f<1.001;f+=0.1) + { + printf("@%f--affine_combo: %f hermie: %f\n",angle::deg(f).get(),angle::deg(combo(a,b,f)).get(),angle::deg(hermie(f)).get()); + } + + } + + return ret; +} + +/* === E N T R Y P O I N T ================================================= */ + +int main() +{ + int error=0; + + error+=fastangle_test(); + error+=fastangle_speed_test(); + error+=angle_test(); + + return error; +} diff --git a/ETL/test/benchmark.cpp b/ETL/test/benchmark.cpp new file mode 100644 index 0000000..e453186 --- /dev/null +++ b/ETL/test/benchmark.cpp @@ -0,0 +1,475 @@ +/*! ======================================================================== +** Extended Template and Library Test Suite +** Hermite Curve Test +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +using namespace etl; +//using namespace std; + +#define HERMITE_TEST_ITERATIONS (100000) + +/* === C L A S S E S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +template +void angle_cos_speed_test(void) +{ + Angle a,b,c,d; + float tmp,tmp2; + + for(tmp=-1;tmp<1;tmp+=0.000002f) + { + a=(typename Angle::cos)(tmp); + b=(typename Angle::cos)(tmp); + c=(typename Angle::cos)(tmp); + d=(typename Angle::cos)(tmp); + tmp2=((typename Angle::cos)(a)).get(); + tmp2=((typename Angle::cos)(b)).get(); + tmp2=((typename Angle::cos)(c)).get(); + tmp2=((typename Angle::cos)(d)).get(); + } +} +template +void angle_sin_speed_test(void) +{ + Angle a,b,c,d; + float tmp,tmp2; + + for(tmp=-1.0;tmp<1.0;tmp+=0.000002f) + { + a=(typename Angle::sin)(tmp); + b=(typename Angle::sin)(tmp); + c=(typename Angle::sin)(tmp); + d=(typename Angle::sin)(tmp); + tmp2=((typename Angle::sin)(a)).get(); + tmp2=((typename Angle::sin)(b)).get(); + tmp2=((typename Angle::sin)(c)).get(); + tmp2=((typename Angle::sin)(d)).get(); + } +} +template +void angle_tan_speed_test(void) +{ + Angle a,b,c,d; + float tmp,tmp2; + + for(tmp=-1;tmp<1;tmp+=0.000002f) + { + a=(typename Angle::tan)(tmp); + b=(typename Angle::tan)(tmp); + c=(typename Angle::tan)(tmp); + d=(typename Angle::tan)(tmp); + tmp2=((typename Angle::tan)(a)).get(); + tmp2=((typename Angle::tan)(b)).get(); + tmp2=((typename Angle::tan)(c)).get(); + tmp2=((typename Angle::tan)(d)).get(); + } +} +template +void angle_atan2_speed_test(void) +{ + Angle a,b,c; + float x,y; + + for(y=-10;y<10;y+=0.05f) + for(x=-10;x<10;x+=0.05f) + { + a=mytan(y,x); + a=mytan(x,y); + b=mytan(y,x); + b=mytan(x,y); + c=mytan(y,x); + c=mytan(x,y); + a=mytan(y,x); + a=mytan(x,y); + b=mytan(y,x); + b=mytan(x,y); + c=mytan(y,x); + c=mytan(x,y); + } +} + +int fastangle_speed_test(void) +{ + int ret=0; + float + angle_cos_time, + fastangle_cos_time, + angle_tan_time, + fastangle_tan_time, + angle_atan2_time, + fastangle_atan2_time, + angle_sin_time, + fastangle_sin_time ; + + etl::clock MyTimer; + + MyTimer.reset(); + angle_cos_speed_test(); + angle_cos_time=MyTimer(); + printf("angle: Cosine test: %f seconds\n",angle_cos_time); + + MyTimer.reset(); + angle_cos_speed_test(); + fastangle_cos_time=MyTimer(); + printf("fastangle: Cosine test: %f seconds\n",fastangle_cos_time); + printf("fastangle is %.02f%% faster\n",(angle_cos_time/fastangle_cos_time)*100.0-100.0); + + MyTimer.reset(); + angle_sin_speed_test(); + angle_sin_time=MyTimer(); + printf("angle: Sine test: %f seconds\n",angle_sin_time); + + MyTimer.reset(); + angle_sin_speed_test(); + fastangle_sin_time=MyTimer(); + printf("fastangle: Sine test: %f seconds\n",fastangle_sin_time); + printf("fastangle is %.02f%% faster\n",(angle_sin_time/fastangle_sin_time)*100.0-100.0); + + MyTimer.reset(); + angle_tan_speed_test(); + angle_tan_time=MyTimer(); + printf("angle: Tangent test: %f seconds\n",angle_tan_time); + + MyTimer.reset(); + angle_tan_speed_test(); + fastangle_tan_time=MyTimer(); + printf("fastangle: Tangent test: %f seconds\n",fastangle_tan_time); + printf("fastangle is %.02f%% faster\n",(angle_tan_time/fastangle_tan_time)*100.0-100.0); + + MyTimer.reset(); + angle_atan2_speed_test(); + angle_atan2_time=MyTimer(); + printf("angle: arcTangent2 test: %f seconds\n",angle_atan2_time); + + MyTimer.reset(); + angle_atan2_speed_test(); + fastangle_atan2_time=MyTimer(); + printf("fastangle: arcTangent2 test: %f seconds\n",fastangle_atan2_time); + printf("fastangle is %.02f%% faster\n",(angle_atan2_time/fastangle_atan2_time)*100.0-100.0); + + return ret; +} + +int surface_and_gaussian_blur_test() +{ + int ret=0; + etl::clock MyTimer; + float endtime; + + { + surface my_surface(1000,1000); + + MyTimer.reset(); + gaussian_blur(my_surface.begin(),my_surface.end(),30,30); + endtime=MyTimer(); + printf("surface_and_gaussian_blur_test: %f seconds\n",endtime); + } + + { + surface my_surface(1000,1000); + + MyTimer.reset(); + gaussian_blur(my_surface.begin(),my_surface.end(),30,30); + endtime=MyTimer(); + printf("surface_and_gaussian_blur_test: %f seconds\n",endtime); + } + + { + surface my_surface(1000,1000); + + MyTimer.reset(); + gaussian_blur(my_surface.begin(),my_surface.end(),30,30); + endtime=MyTimer(); + printf("surface_and_gaussian_blur_test: %f seconds\n",endtime); + } + + return ret; +} + +int hermite_int_test() +{ + int ret=0; + hermite Hermie; + hermite::time_type f; + int i; + + etl::clock timer; + etl::clock::value_type t; + + Hermie.p1()=0; + Hermie.t1()=40000; + Hermie.p2()=0; + Hermie.t2()=40000; + + Hermie.sync(); + + {float t; + for(f=0.0f,i=0,timer.reset();i:time=%f milliseconds\n",t*1000); + return ret; +} + +int hermite_float_test(void) +{ + int ret=0; + float f; int i; + + hermite Hermie; + etl::clock timer; + double t; + + Hermie.p1()=0; + Hermie.t1()=1; + Hermie.p2()=0; + Hermie.t2()=1; + + Hermie.sync(); + + {float t; + for(f=0.0f,i=0,timer.reset();i:time=%f milliseconds\n",t*1000); + return ret; +} + +int hermite_double_test(void) +{ + int ret=0,i; + float f; + + hermite Hermie; + etl::clock timer; + double t; + + Hermie.p1()=0; + Hermie.t1()=1; + Hermie.p2()=0; + Hermie.t2()=1; + + Hermie.sync(); + + for(f=0.0f,i=0,timer.reset();i:time=%f milliseconds\n",t*1000); + return ret; +} + +int hermite_fixed_test(void) +{ + int ret=0; + int i; + hermite Hermie; + hermite::time_type f; + hermite::time_type inc(0.0005f), inc2(1.10); + fixed sum(0); + + etl::clock timer; + double t; + + Hermie.p1()=0; + Hermie.t1()=1; + Hermie.p2()=0; + Hermie.t2()=1; + + Hermie.sync(); + + {fixed t; + for(i=0,f=0,timer.reset();i:time=%f milliseconds\n",t*1000); + return ret; +} + +int hermite_angle_test(void) +{ + int ret=0,i; + float f; + + hermite Hermie; + etl::clock timer; + angle tmp; + double t; + + Hermie.p1()=angle::degrees(0); + Hermie.t1()=angle::degrees(45); + + Hermie.p2()=angle::degrees(-45); + Hermie.t2()=angle::degrees(180); + + Hermie.sync(); + + for(f=0.0f,i=0,timer.reset();i:time=%f milliseconds\n",t*1000); + + return ret; +} + +int hermite_fastangle_test(void) +{ + int ret=0,i; + hermite Hermie; + hermite::time_type f; + + etl::clock timer; + fastangle tmp; + double t; + + Hermie.p1()=fastangle::degrees(0); + Hermie.t1()=fastangle::degrees(45); + + Hermie.p2()=fastangle::degrees(-45); + Hermie.t2()=fastangle::degrees(180); + + Hermie.sync(); + + for(f=0.0f,i=0,timer.reset();i:time=%f milliseconds\n",t*1000); + + return ret; +} + +/* === E N T R Y P O I N T ================================================= */ + +int main() +{ + int error=0; + + error+=fastangle_speed_test(); + error+=surface_and_gaussian_blur_test(); + error+=hermite_float_test(); + error+=hermite_double_test(); + error+=hermite_int_test(); + error+=hermite_fixed_test(); + error+=hermite_angle_test(); + error+=hermite_fastangle_test(); + + return error; +} diff --git a/ETL/test/clock.cpp b/ETL/test/clock.cpp new file mode 100644 index 0000000..652644b --- /dev/null +++ b/ETL/test/clock.cpp @@ -0,0 +1,79 @@ +/*! ======================================================================== +** Extended Template and Library Test Suite +** Clock Test +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#include +#include + +/* === M A C R O S ========================================================= */ + +using namespace etl; + +/* === C L A S S E S ======================================================= */ + + +/* === P R O C E D U R E S ================================================= */ + +int basic_test(void) +{ + int ret=0; + fprintf(stderr,"default etl::clock precision: %0.8f\n",etl::clock::precision()); + fprintf(stderr,"realtime etl::clock precision: %0.8f\n",etl::clock_realtime::precision()); + fprintf(stderr,"proctime etl::clock precision: %0.8f\n",etl::clock_proctime::precision()); + + etl::clock_realtime timer; + etl::clock::value_type amount,total; + + for(amount=3.0;amount>=0.00015;amount/=2.0) + { + if(amount*1000000.0<1000.0f) + fprintf(stderr,"waiting %f microseconds...\n",amount*1000000.0); + else if(amount*1000.0<400.0f) + fprintf(stderr,"waiting %f milliseconds...\n",amount*1000.0); + else + fprintf(stderr,"waiting %f seconds...\n",amount); + + timer.reset(); + etl::clock::sleep(amount); + total=timer(); + if((total-amount)*1000000.0<1000.0f) + fprintf(stderr," ** I waited %f seconds, error of %f microseconds\n",total,(total-amount)*1000000); + else if((total-amount)*1000.0<400.0f) + fprintf(stderr," ** I waited %f seconds, error of %f milliseconds\n",total,(total-amount)*1000); + else + fprintf(stderr," ** I waited %f seconds, error of %f seconds\n",total,total-amount); + + } + return ret; +} + +/* === E N T R Y P O I N T ================================================= */ + +int main() +{ + int error=0; + + error+=basic_test(); + + return error; +} + diff --git a/ETL/test/fixed.cpp b/ETL/test/fixed.cpp new file mode 100644 index 0000000..965a8d3 --- /dev/null +++ b/ETL/test/fixed.cpp @@ -0,0 +1,294 @@ +/*! ======================================================================== +** Extended Template and Library Test Suite +** Fixed-Point Math Test +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define ETL_FIXED_BITS 12 + +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +#ifndef PI +# define PI (3.1415926535897932384626433832795029L) +#endif + +#define ADD_SUB_TEST 20000000 +#define MUL_TEST 10000000 +#define DIV_TEST 1048573 // at 1048573, fixed point numbers wrap around to zero +using namespace etl; + +/* === C L A S S E S ======================================================= */ + +template +struct speed_test +{ + double add_sub_test(void) + { + value_type a=1; + value_type b=2; + value_type c=3; + int i; + etl::clock MyTimer; + MyTimer.reset(); + for(i=0;i(1.5)); + int i; + etl::clock MyTimer; + MyTimer.reset(); + for(i=1;i0.0005) + { + fprintf(stderr,"fixed: Failed test on line %d in "__FILE__".\n",__LINE__); + ret++; + } + + a=1043;d=1043; + a/=27;d/=27; + a+=10.42;d+=10.42; + a/=6;d/=6; + a*=PI;d*=PI; + d-=(double)a; + fprintf(stderr,"fixed: ( 1043 / 27 + 10.42 ) / 6 * PI --- Difference: %f\n",d); + if(d<0.0)d=-d; +#ifdef ROUND_TO_NEAREST_INTEGER + if( d>0.0005) +#else + if( d>0.0025) +#endif + { + fprintf(stderr,"fixed: Failed test on line %d in "__FILE__".\n",__LINE__); + ret++; + } + + return ret; +} + +int char_test(void) +{ + int ret=0; + + fixed_base fix; + double flt; + + if(sizeof(fix)!=sizeof(unsigned char)) + { + ret++; + fprintf(stderr,"fixed: Size of fixed_base is wrong!\n"); + } + + flt=1.0; + fix=1.0; + fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt); + + flt*=0.7; + fix*=0.7; + fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt); + + flt*=0.7; + fix*=0.7; + fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt); + + flt*=0.7; + fix*=0.7; + fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt); + + flt*=0.7; + fix*=0.7; + fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt); + + flt*=0.7; + fix*=0.7; + fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt); + + //flt/=0.7; + //fix/=0.7; + //fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt); + + flt+=0.3; + fix+=0.3; + fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt); + + flt*=2; + fix*=2; + fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt); + + + return ret; +} + +/* === E N T R Y P O I N T ================================================= */ + +int main() +{ + int error=0; + + error+=basic_test(); + error+=char_test(); + + speed_test float_test; + speed_test int_test; + speed_test fixed_test; + + { + double flt,fix,inte; + fprintf(stderr,"\nAddition/subtraction test...\n"); + + fprintf(stderr," calculating float....."); + flt=float_test.add_sub_test(); + fprintf(stderr," float time: %f sec\n",flt); + + fprintf(stderr," calculating fixed....."); + fix=fixed_test.add_sub_test(); + fprintf(stderr," fixed time: %f sec\n",fix); + + fprintf(stderr," calculating integer..."); + inte=int_test.add_sub_test(); + fprintf(stderr," integer time: %f sec\n",inte); + + if(flt>fix) + fprintf(stderr,"Fixed point wins by %f seconds! (%f%% faster)\n",flt-fix,flt/fix*100.0f-100.0f); + else + fprintf(stderr,"Floating point wins by %f seconds! (%f%% faster)\n",fix-flt,fix/flt*100.0f-100.0f); + + } + + { + double flt,fix,inte; + fprintf(stderr,"\nProduct test...\n"); + fprintf(stderr," calculating float....."); + flt=float_test.mul_test(); + fprintf(stderr," float time: %f sec\n",flt); + fprintf(stderr," calculating fixed....."); + fix=fixed_test.mul_test(); + fprintf(stderr," fixed time: %f sec\n",fix); + fprintf(stderr," calculating integer..."); + inte=int_test.mul_test(); + fprintf(stderr," integer time: %f sec\n",inte); + if(flt>fix) + fprintf(stderr,"Fixed point wins by %f seconds! (%f%% faster)\n",flt-fix,flt/fix*100.0f-100.0f); + else + fprintf(stderr,"Floating point wins by %f seconds! (%f%% faster)\n",fix-flt,fix/flt*100.0f-100.0f); + } + + { + double flt,fix,inte; + fprintf(stderr,"\nDivision test...\n"); + fprintf(stderr," calculating float....."); + flt=float_test.div_test(); + fprintf(stderr," float time: %f sec\n",flt); + fprintf(stderr," calculating fixed....."); + fix=fixed_test.div_test(); + fprintf(stderr," fixed time: %f sec\n",fix); + fprintf(stderr," calculating integer..."); + inte=int_test.div_test(); + fprintf(stderr," integer time: %f sec\n",inte); + if(flt>fix) + fprintf(stderr,"Fixed point wins by %f seconds! (%f%% faster)\n",flt-fix,flt/fix*100.0f-100.0f); + else + fprintf(stderr,"Floating point wins by %f seconds! (%f%% faster)\n",fix-flt,fix/flt*100.0f-100.0f); + fprintf(stderr,"\n"); + } + + return error; +} diff --git a/ETL/test/handle.cpp b/ETL/test/handle.cpp new file mode 100644 index 0000000..7d2ca11 --- /dev/null +++ b/ETL/test/handle.cpp @@ -0,0 +1,504 @@ +/*! ======================================================================== +** Extended Template and Library Test Suite +** Handle Template Class Test +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +#define NUMBER_OF_OBJECTS 40000 +using namespace std; + +/* === C L A S S E S ======================================================= */ + +struct my_test_obj : public etl::rshared_object +{ + static int instance_count; + int my_id; + my_test_obj(int my_id=0):my_id(my_id) + { + instance_count++; + } + + virtual ~my_test_obj() + { + if(instance_count==0) + printf("Error, instance count is going past zero!\n"); + instance_count--; + } + + bool operator<(const my_test_obj &rhs)const + { + return my_id obj_handle; +typedef etl::rhandle robj_handle; +typedef etl::handle other_obj_handle; +typedef list< obj_handle > obj_list; +typedef list< other_obj_handle > other_obj_list; +typedef list< robj_handle > robj_list; + +int handle_basic_test() +{ + printf("handle: Size of a handle: %u\n",(unsigned int)sizeof(etl::handle)); + printf("handle: Size of a loose_handle: %u\n",(unsigned int)sizeof(etl::loose_handle)); + printf("handle: Size of a rhandle: %u\n",(unsigned int)sizeof(etl::rhandle)); + printf("handle: Size of a shared_object: %u\n",(unsigned int)sizeof(etl::shared_object)); + printf("handle: Size of a rshared_object: %u\n",(unsigned int)sizeof(etl::rshared_object)); + + printf("handle: Basic test: "); + my_test_obj::instance_count=0; + + { + etl::handle obj_handle(new my_test_obj(rand())); + } + + if(my_test_obj::instance_count!=0) + { + printf("FAILED!\n"); + printf(__FILE__":%d: on create/destroy, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count); + return 1; + } + + { + map > my_map; + etl::handle obj_handle(new my_test_obj(rand())); + my_map["bleh"]=obj_handle; + } + + if(my_test_obj::instance_count!=0) + { + printf("FAILED!\n"); + printf(__FILE__":%d: on create/destroy, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count); + return 1; + } + + etl::handle obj_handle(new my_test_obj(rand())); + + if(obj_handle != obj_handle.constant()) + { + printf("FAILED!\n"); + printf(__FILE__":%d: on call to handle<>::constant().\n",__LINE__); + return 1; + } + + printf("PASSED\n"); + + return 0; +} + +int handle_general_use_test(void) +{ + printf("handle: General-use test: "); + my_test_obj::instance_count=0; + + obj_list my_list, my_other_list; + int i; + + for(i=0;imy_id != 42 || b->my_id != 27) + { + printf("FAILED!\n"); + printf(__FILE__":%d: On swap (27,42) gave (%d,%d), should be (42,27).\n",__LINE__,a->my_id,b->my_id); + return 1; + } + } + + my_other_list.clear(); + if(my_test_obj::instance_count) + { + printf("FAILED!\n"); + printf(__FILE__":%d: On clear, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count); + return 1; + } + + printf("PASSED\n"); + + return 0; +} + + struct ListItem + { + robj_handle obj; + int bleh; + int blah; + ListItem(robj_handle obj,int bleh=1, int blah=2): + obj(obj),bleh(bleh),blah(blah) { } + }; + +int rhandle_general_use_test(void) +{ + + + printf("rhandle: General-use test: "); + my_test_obj::instance_count=0; + + robj_list my_list; + int i; + + robj_handle obj= new my_test_obj(rand()); + for(i=0;i my_item_list; + for(i=0;i=2); + my_item_list.erase(my_item_list.begin()+src); + assert(tmp.obj.rcount()>=1); + my_item_list.insert(my_item_list.begin()+dest,tmp); + assert(tmp.obj.rcount()>=2); + } + + my_item_list.clear(); + + if(my_test_obj::instance_count) + { + printf("FAILED!\n"); + printf(__FILE__":%d: On clear, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count); + return 1; + } + + printf("PASSED\n"); + + return 0; +} + +int handle_inheritance_test(void) +{ + printf("handle: Inheritance test: "); + my_test_obj::instance_count=0; + my_other_test_obj::instance_count=0; + + other_obj_list my_other_list; + int i; + + for(i=0;i handle) +{ + if(handle) { int i=handle.count(); i++; } +} + +int loose_handle_test(void) +{ + printf("handle: loose_handle test: "); + my_test_obj::instance_count=0; + + etl::loose_handle obj_handle_loose; + etl::handle obj_handle2; + + { + etl::handle obj_handle(new my_test_obj(rand())); + if(my_test_obj::instance_count!=1) + { + printf("FAILED!\n"); + printf(__FILE__":%d: on handle assignment from new object, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count); + return 1; + } + + obj_handle_loose=obj_handle; + if(obj_handle!=obj_handle_loose) + { + printf("FAILED!\n"); + printf(__FILE__":%d: on loose_handle assignment\n",__LINE__); + return 1; + } + + obj_handle2=obj_handle_loose; + if(my_test_obj::instance_count!=1) + { + printf("FAILED!\n"); + printf(__FILE__":%d: on handle assignment from loose_handle, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count); + return 1; + } + + test_func(obj_handle_loose); + if(my_test_obj::instance_count!=1) + { + printf("FAILED!\n"); + printf(__FILE__":%d: on handle assignment from loose_handle, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count); + return 1; + } + } + + { + etl::loose_handle a(new my_test_obj(27)), b(new my_test_obj(42)); + a.swap(b); + if (a->my_id != 42 || b->my_id != 27) + { + printf("FAILED!\n"); + printf(__FILE__":%d: on loose_handle swap (27,42) gave (%d,%d), should be (42,27).\n",__LINE__,a->my_id,b->my_id); + return 1; + } + } + + if(my_test_obj::instance_count!=3) + { + printf("FAILED!\n"); + printf(__FILE__":%d: on create/destroy, instance count=%d, should be 3.\n",__LINE__,my_test_obj::instance_count); + return 1; + } + + printf("PASSED\n"); + return 0; +} + +int handle_cast_test() +{ + printf("handle: casting test: "); + + etl::handle obj; + etl::handle other_obj; + etl::loose_handle loose_obj; + + other_obj.spawn(); + loose_obj=other_obj; + + obj=etl::handle::cast_dynamic(loose_obj); + + if(obj!=other_obj) + { + printf("FAILED!\n"); + printf(__FILE__":%d: on handle assignment from loose_handle.\n",__LINE__); + return 1; + } + + printf("PASSED\n"); + return 0; +} + +/* === E N T R Y P O I N T ================================================= */ + +int main() +{ + int error=0; + + error+=handle_basic_test(); + error+=handle_cast_test(); + error+=handle_general_use_test(); + error+=handle_inheritance_test(); + error+=loose_handle_test(); + error+=rhandle_general_use_test(); + + return error; +} diff --git a/ETL/test/hermite.cpp b/ETL/test/hermite.cpp new file mode 100644 index 0000000..25a6278 --- /dev/null +++ b/ETL/test/hermite.cpp @@ -0,0 +1,248 @@ +/*! ======================================================================== +** Extended Template and Library Test Suite +** Hermite Curve Test +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +using namespace etl; + +/* === C L A S S E S ======================================================= */ + + +/* === P R O C E D U R E S ================================================= */ + +int basic_test(void) +{ + int ret=0; + float f; + + hermite Hermie; + etl::clock timer; + double t; + + Hermie.p1()=0; + Hermie.t1()=1; + Hermie.p2()=0; + Hermie.t2()=1; + + Hermie.sync(); + + integral > inte(Hermie); + + + fprintf(stderr,"integral of curve() on [0,1] = %f\n",inte(0,1.0)); + fprintf(stderr,"integral of curve() on [-1,3] = %f\n",inte(-1.0,3.0)); + Hermie.set_rs(-1.0,7.0); + inte=integral >(Hermie); + fprintf(stderr,"integral of curve()[%f,%f] on [-1,7] = %f\n",Hermie.get_r(),Hermie.get_s(),inte(-1.0,7.0)); + fprintf(stderr,"integral of curve()[%f,%f] on [0,1] = %f\n",Hermie.get_r(),Hermie.get_s(),inte(0,1.0)); + Hermie.set_rs(0.0,1.0); + + + for(f=0.0f,timer.reset();f<1.001f;f+=0.000005f) + { + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + } + t=timer(); + + fprintf(stderr,"time=%f milliseconds\n",t*1000); + return ret; +} + +int angle_test(void) +{ + int ret=0; + float f; + + hermite Hermie; + etl::clock timer; + angle tmp; + double t; + + Hermie.p1()=angle::degrees(0); + Hermie.t1()=angle::degrees(45); + + Hermie.p2()=angle::degrees(-45); + Hermie.t2()=angle::degrees(180); + + Hermie.sync(); + + + for(f=0.0f,timer.reset();f<1.001f;f+=0.000005f) + { + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + } + t=timer(); + + fprintf(stderr,"angle time=%f milliseconds\n",t*1000); + + return ret; +} + +int fixed_test(void) +{ + int ret=0; + float f; + + hermite Hermie; + etl::clock timer; + double t; + + Hermie.p1()=0; + Hermie.t1()=1; + Hermie.p2()=0; + Hermie.t2()=1; + + Hermie.sync(); + + + + for(f=0.0f,timer.reset();f<1.001f;f+=0.005f) + { + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + t+=Hermie(f)+Hermie(f+0.1f); + } + t=timer(); + + fprintf(stderr,"time=%f milliseconds\n",t*1000); + return ret; +} + + +int anglefixed_test(void) +{ + int ret=0; + float f; + + hermite Hermie; + etl::clock timer; + angle tmp; + double t; + + Hermie.p1()=angle::degrees(0); + Hermie.t1()=angle::degrees(45); + + Hermie.p2()=angle::degrees(-45); + Hermie.t2()=angle::degrees(180); + + Hermie.sync(); + + + for(f=0.0f,timer.reset();f<1.001f;f+=0.0005f) + { + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + tmp+=Hermie(f)+Hermie(f+0.1f); + } + t=timer(); + + fprintf(stderr,"angle fixed time=%f milliseconds\n",t*1000); + + return ret; +} + +int float_intersection_test() +{ + int ret=0; + + hermite curve1(0,1,0,1); + hermite curve2(-1,2,-1,-2); + double t1,t2; + float d; + + t1=curve1.intersect(curve2); + t2=curve2.intersect(curve1); + + d=curve1(t1)-curve2(t2); + + fprintf(stderr,"float:Intersection difference: %f (t1=%f, t2=%f)\n",d,t1,t2); + + if(d>0.01) + { + fprintf(stderr,"float:FAILED INTERSECTION TEST.\n"); + ret++; + } + + return ret; +} + +/* === E N T R Y P O I N T ================================================= */ + +int main() +{ + int error=0; + + error+=basic_test(); + error+=angle_test(); + error+=fixed_test(); + error+=float_intersection_test(); + return error; +} diff --git a/ETL/test/pen.cpp b/ETL/test/pen.cpp new file mode 100644 index 0000000..ef6eaee --- /dev/null +++ b/ETL/test/pen.cpp @@ -0,0 +1,548 @@ +/*! ======================================================================== +** Extended Template and Library Test Suite +** Handle Template Class Test +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include +#include + +/* === M A C R O S ========================================================= */ + +using namespace std; +using namespace etl; + +/* === C L A S S E S ======================================================= */ + +int generic_pen_test(int w, int h) +{ + printf("generic_pen(w:%d,h:%d): ",w,h); + + auto_ptr data(new float[w*h]); + if(!data.get()) + { + printf("Um..... malloc failure on line %d of "__FILE__"...\n",__LINE__); + abort(); + } + + generic_pen pen(data.get(),w,h); + generic_pen pen2; + + if(!pen) + { + printf("FAILURE! "__FILE__"@%d: On pen bool test\n",__LINE__); + return 1; + } + + if(&pen.x()[2]!=&pen[0][2]) + { + printf("FAILURE! "__FILE__"@%d: On request for horizontal iterator\n",__LINE__); + return 1; + } + + if(&pen.y()[2]!=&pen[2][0]) + { + printf("FAILURE! "__FILE__"@%d: On request for vertical iterator\n",__LINE__); + return 1; + } + + pen.move(1,1); + pen2=pen; + + if(pen!=pen2) + { + printf("FAILURE! "__FILE__"@%d: On pen assignment or pen comparison\n",__LINE__); + return 1; + } + + pen2.move(w,h); + generic_pen::difference_type diff(pen2-pen); + + if(diff.x!=w || diff.y!=h) + { + printf("FAILURE! "__FILE__"@%d: pen difference inconsistency ([%d,%d]!=[%d,%d])\n",__LINE__,diff.x,diff.y,w,h); + return 1; + } + + if(pen.end_x()-pen.x()!=w-1) + { + printf("FAILURE! "__FILE__"@%d: iterator_x inconsistency (%ld!=%d)\n",__LINE__,pen.end_x()-pen.x(),w); + return 1; + } + + if(pen.end_y()-pen.y()!=h-1) + { + printf("FAILURE! "__FILE__"@%d: iterator_y inconsistency (%d!=%d)\n",__LINE__,pen.end_y()-pen.y(),h); + return 1; + } + + if(&pen.end_y()[-1]!=&pen.y()[(h-2)]) + { + printf("FAILURE! "__FILE__"@%d: iterator_y inconsistency\n",__LINE__); + return 1; + } + + if(&pen.end_x()[-1]!=&pen.x()[(w-2)]) + { + printf("FAILURE! "__FILE__"@%d: iterator_x inconsistency\n",__LINE__); + return 1; + } + + printf("PASSED\n"); + + return 0; +} + +int alpha_pen_test(void) +{ + printf("alpha_pen: "); + printf("SKIPPED\n"); + + return 0; +} + +int bbox_pen_test(void) +{ + printf("bbox_pen: "); + + + + printf("SKIPPED\n"); + + return 0; +} + +int display_pen(generic_pen pen, int w, int h) +{ + int ret=0; + int x, y; + // print out the after pic + for(y=0;y=2.0f) + printf("#"); + else if(pen.get_value()>=1.0f) + printf("@"); + else if(pen.get_value()>=0.8f) + printf("%%"); + else if(pen.get_value()>=0.6f) + printf("O"); + else if(pen.get_value()>=0.4f) + printf(":"); + else if(pen.get_value()>=0.2f) + printf("."); + else if(pen.get_value()>=-0.0001f) + printf(" "); + else + printf("X"),ret++; + } + pen.dec_x(x); + printf("|\n"); + } + pen.dec_y(y); + return ret; +} + +int display_pen(generic_pen pen, int w, int h) +{ + int ret=0; + int x, y; + // print out the after pic + for(y=0;y=2.0f) + printf("#"); + else if(pen.get_value()>=1.0f) + printf("@"); + else if(pen.get_value()>=0.8f) + printf("%%"); + else if(pen.get_value()>=0.6f) + printf("O"); + else if(pen.get_value()>=0.4f) + printf(":"); + else if(pen.get_value()>=0.2f) + printf("."); + else if(pen.get_value()>=-0.0001f) + printf(" "); + else + printf("X"),ret++; + } + pen.dec_x(x); + printf("|\n"); + } + pen.dec_y(y); + return ret; +} + +void emptyfunction(int v) +{ + static int stupid = 0; + stupid = v; + //printf("Called... %d\n",v); +} + +int box_blur_test(void) +{ + typedef float boxblur_float; + + printf("box_blur: "); + + int w=25,h=25; + + auto_ptr data(new boxblur_float[w*h]); + auto_ptr data2(new boxblur_float[w*h]); + if(!data.get()) + { + printf("Um..... malloc failure on line %d of "__FILE__"...\n",__LINE__); + abort(); + } + + generic_pen pen(data.get(),w,h); + generic_pen pen2; + + generic_pen pen3(data2.get(),w,h); + int x,y; + + for(y=0;y= h) iy = h-1; + + for(int ox=-2; ox <= 2; ++ox) + { + int ix = x+ox; + if(ix < 0) ix = 0; + if(ix >= w) ix = w-1; + + if( (ix-iy<=1 && iy-ix<=1) || iy==h/2 || ix==w/2) + f += 2; + } + } + + //print out if the relative error is high + /*f /= 25; + float rf = pen.get_value() - f/25; + if(f && rf > 0.3) + { + printf("pixel (%d,%d) off by %f\n",x,y,rf); + }*/ + boxblur_float diff = fabs(pen.get_value() - f/25); + if(diff > max) max = diff; + pen.put_value(f/25); //if length = 2 then dim = 5.. area = 25 + } + pen.dec_x(x); + } + pen.dec_y(y); + + /*if(max) + { + for(y=0;y data(new float[w*h]); + if(!data.get()) + { + printf("Um..... malloc failure on line %d of "__FILE__"...\n",__LINE__); + abort(); + } + + generic_pen pen(data.get(),w,h); + generic_pen pen2; + int x,y; + + for(y=0;y=2.0f) + printf("#"); + else if(pen.get_value()>=1.0f) + printf("@"); + else if(pen.get_value()>=0.8f) + printf("%%"); + else if(pen.get_value()>=0.6f) + printf("O"); + else if(pen.get_value()>=0.4f) + printf(":"); + else if(pen.get_value()>=0.2f) + printf("."); + else if(pen.get_value()>=0.0f) + printf(" "); + else + printf("X"),bad_values++; + } + pen.dec_x(x); + printf("|\n"); + } + pen.dec_y(y); + + // Pen 2 will be the end + pen2=pen; + pen2.move(w,h); + +#if 0 + gaussian_blur_5x5(pen,pen2); + gaussian_blur_5x5(pen,pen2); + gaussian_blur_5x5(pen,pen2); +#endif + +#if 0 + gaussian_blur_3x3(pen,pen2); + gaussian_blur_3x3(pen,pen2); + gaussian_blur_3x3(pen,pen2); + gaussian_blur_3x3(pen,pen2); + gaussian_blur_3x3(pen,pen2); +#endif + +// gaussian_blur(pen,pen2,15); + gaussian_blur(pen,pen2,10,10); + + printf("\nAFTER GAUSSIAN BLUR:\n"); + + // print out the after pic + for(y=0;y=2.0f) + printf("#"); + else if(pen.get_value()>=1.0f) + printf("@"); + else if(pen.get_value()>=0.8f) + printf("%%"); + else if(pen.get_value()>=0.6f) + printf("O"); + else if(pen.get_value()>=0.4f) + printf(":"); + else if(pen.get_value()>=0.2f) + printf("."); + else if(pen.get_value()>=0.0f) + printf(" "); + else + printf("X"),bad_values++; + } + pen.dec_x(x); + printf("|\n"); + } + pen.dec_y(y); + + if(bad_values) + { + printf("FAILURE! "__FILE__"@%d: blur result contained bad values\n",__LINE__); + return 1; + } +#endif + printf("PASSED\n"); + + return 0; +} + +/* === E N T R Y P O I N T ================================================= */ + +int main() +{ + int error=0; + + error+=generic_pen_test(40,40); + error+=generic_pen_test(10,40); + error+=generic_pen_test(40,10); + if(error)return error; + error+=alpha_pen_test(); + error+=bbox_pen_test(); + error+=box_blur_test(); + if(error)return error; + error+=gaussian_blur_test(); + + return error; +} diff --git a/ETL/test/random.cpp b/ETL/test/random.cpp new file mode 100644 index 0000000..d5bfaea --- /dev/null +++ b/ETL/test/random.cpp @@ -0,0 +1,48 @@ +/*! ======================================================================== +** Extended Template and Library Test Suite +** Angle Class Test +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#include + +/* === M A C R O S ========================================================= */ + +using namespace etl; + +/* === C L A S S E S ======================================================= */ + +int random_basic_test(void) +{ + int ret=0; + random Rand; + + return ret; +} + +/* === E N T R Y P O I N T ================================================= */ + +int main() +{ + int error=0; + + + return error; +} diff --git a/ETL/test/smach.cpp b/ETL/test/smach.cpp new file mode 100644 index 0000000..bb5f48d --- /dev/null +++ b/ETL/test/smach.cpp @@ -0,0 +1,207 @@ +/*! ======================================================================== +** Extended Template and Library Test Suite +** Angle Class Test +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#include +#include + +/* === M A C R O S ========================================================= */ + +using namespace std; +using namespace etl; + +/* === C L A S S E S ======================================================= */ + +enum EventKey +{ + EVENT_1, + EVENT_2, + EVENT_3, + EVENT_4 +}; + + + +struct MachineContext +{ + smach machine; + + MachineContext():machine(this) + { + } +}; + +typedef smach Smach; + +class Event1 : public Smach::event +{ +public: + Event1():Smach::event(EVENT_1) { } +}; + + +class DefaultStateContext +{ + MachineContext *context; +public: + DefaultStateContext(MachineContext *context):context(context) { printf("Entered Default State\n"); } + ~DefaultStateContext() { printf("Left Default State\n"); } + + Smach::event_result event1_handler(const Smach::event& x __attribute__ ((unused))) + { + printf("DEFAULT STATE: Received Event 1\n"); + return Smach::RESULT_ACCEPT; + } +}; + +class DefaultState : public Smach::state +{ +public: + DefaultState():Smach::state("DefaultState") + { + insert(event_def(EVENT_1,&DefaultStateContext::event1_handler)); + } + +} default_state; + + + + + + + +class State1Context +{ + MachineContext *context; +public: + State1Context(MachineContext *context):context(context) { printf("Entered State 1\n"); } + ~State1Context() { printf("Left State 1\n"); } + + Smach::event_result event1_handler(const Smach::event& x __attribute__ ((unused))) + { + printf("STATE1: Received Event 1\n"); + return Smach::RESULT_OK; + } + + Smach::event_result event3_handler(const Smach::event& x); +}; + +class State1 : public Smach::state +{ +public: + State1():Smach::state("State1") + { + insert(event_def(EVENT_1,&State1Context::event1_handler)); + insert(event_def(EVENT_3,&State1Context::event3_handler)); + } + +} state_1; + + +class State2Context +{ + MachineContext *context; +public: + State2Context(MachineContext *context):context(context) { printf("Entered State 2\n"); } + ~State2Context() { printf("Left State 2\n"); } + + Smach::event_result event1_handler(const Smach::event& x __attribute__ ((unused))) + { + printf("STATE2: Received Event 1\n"); + return Smach::RESULT_OK; + } + + Smach::event_result event2_handler(const Smach::event& x __attribute__ ((unused))) + { + printf("STATE2: Received Event 2\n"); + return Smach::RESULT_OK; + } + + Smach::event_result event3_handler(const Smach::event& x __attribute__ ((unused))) + { + printf("STATE2: Received Event 3\n"); + return Smach::RESULT_OK; + } +}; + +class State2 : public Smach::state +{ +public: + State2():Smach::state("State2") + { + insert(event_def(EVENT_1,&State2Context::event1_handler)); + insert(event_def(EVENT_2,&State2Context::event2_handler)); + insert(event_def(EVENT_3,&State2Context::event3_handler)); + } + +} state_2; + +Smach::event_result +State1Context::event3_handler(const Smach::event& x __attribute__ ((unused))) +{ + printf("STATE1: Received Event 3, throwing state to change to...\n"); + + throw &state_2; +// context->machine.enter(&state_2); +// return Smach::RESULT_ACCEPT; +} + +/* === G L O B A L S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +int main() +{ + int error=0; + + MachineContext context; + try + { + Smach& state_machine(context.machine); + + state_machine.set_default_state(&default_state); + + state_machine.enter(&state_1); + + state_machine.process_event(Event1()); + state_machine.process_event(EVENT_1); + state_machine.process_event(EVENT_2); + state_machine.process_event(EVENT_3); + + state_machine.process_event(Event1()); + state_machine.process_event(EVENT_1); + state_machine.process_event(EVENT_2); + state_machine.process_event(EVENT_3); + + state_machine.process_event(Event1()); + state_machine.process_event(EVENT_1); + state_machine.process_event(EVENT_2); + state_machine.process_event(EVENT_3); + } + catch(...) + { + printf("Uncaught exception\n"); + error++; + } + + return error; +} diff --git a/ETL/test/smart_ptr.cpp b/ETL/test/smart_ptr.cpp new file mode 100644 index 0000000..663d882 --- /dev/null +++ b/ETL/test/smart_ptr.cpp @@ -0,0 +1,319 @@ +/*! ======================================================================== +** Extended Template and Library Test Suite +** Smart Pointer Template Class Test +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +//#define DEBUGPOINT() fprintf(stderr,__FILE__":%d: DEBUGPOINT\n",__LINE__) +#define DEBUGPOINT() + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +#define NUMBER_OF_OBJECTS 40000 +using namespace std; + + +/* === C L A S S E S ======================================================= */ + +struct my_test_obj +{ + static int instance_count; + int my_id; + my_test_obj(int my_id=0):my_id(my_id) + { + instance_count++; + } + + virtual ~my_test_obj() + { + if(instance_count==0) + printf("Error, instance count is going past zero!\n"); + instance_count--; + } + + bool operator<(const my_test_obj &rhs)const + { + return my_id obj_smart_ptr; +typedef etl::smart_ptr other_obj_smart_ptr; +typedef list< obj_smart_ptr > obj_list; +typedef list< other_obj_smart_ptr > other_obj_list; + +int smart_ptr_basic_test(void) +{ + printf("smart_ptr: Size of a smart_ptr: %u\n",(unsigned int)sizeof(obj_smart_ptr)); + printf("smart_ptr: Size of a reference_counter: %u\n",(unsigned int)sizeof(etl::reference_counter)); + + + printf("smart_ptr: Basic test: "); + my_test_obj::instance_count=0; + + { + etl::smart_ptr obj_smart_ptr(new my_test_obj(rand())); + } + + if(my_test_obj::instance_count!=0) + { + printf("FAILED!\n"); + printf(__FILE__":%d: on create/destroy, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count); + return 1; + } + + { + DEBUGPOINT(); + map > my_map; + DEBUGPOINT(); + //etl::smart_ptr obj_smart_ptr(new my_test_obj(rand())); + etl::smart_ptr temp; + temp.spawn(); + DEBUGPOINT(); + temp.reset(); + DEBUGPOINT(); + my_map["bleh"]=temp; + DEBUGPOINT(); + } + + if(my_test_obj::instance_count!=0) + { + printf("FAILED!\n"); + printf(__FILE__":%d: on create/destroy, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count); + return 1; + } + + etl::smart_ptr obj_smart_ptr(new my_test_obj(rand())); + + if(obj_smart_ptr != obj_smart_ptr.constant()) + { + printf("FAILED!\n"); + printf(__FILE__":%d: on call to smart_ptr<>::constant().\n",__LINE__); + return 1; + } + + printf("PASSED\n"); + + return 0; +} + +int smart_ptr_general_use_test(void) +{ + printf("smart_ptr: General-use test: "); + my_test_obj::instance_count=0; + + obj_list my_list, my_other_list; + int i; + + for(i=0;i smart_ptr __attribute__ ((unused))) +{ +} + +int loose_smart_ptr_test(void) +{ + printf("smart_ptr: loose_smart_ptr test: "); + my_test_obj::instance_count=0; + + etl::loose_smart_ptr obj_smart_ptr_loose; + etl::smart_ptr obj_smart_ptr2; + + { + etl::smart_ptr obj_smart_ptr(new my_test_obj(rand())); + if(my_test_obj::instance_count!=1) + { + printf("FAILED!\n"); + printf(__FILE__":%d: on smart_ptr assignment from new object, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count); + return 1; + } + + obj_smart_ptr_loose=obj_smart_ptr; + if(obj_smart_ptr!=obj_smart_ptr_loose) + { + printf("FAILED!\n"); + printf(__FILE__":%d: on loose_smart_ptr assignment\n",__LINE__); + return 1; + } + + obj_smart_ptr2=obj_smart_ptr_loose; + if(my_test_obj::instance_count!=1) + { + printf("FAILED!\n"); + printf(__FILE__":%d: on smart_ptr assignment from loose_smart_ptr, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count); + return 1; + } + + test_func(obj_smart_ptr_loose); + if(my_test_obj::instance_count!=1) + { + printf("FAILED!\n"); + printf(__FILE__":%d: on smart_ptr assignment from loose_smart_ptr, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count); + return 1; + } + } + + if(my_test_obj::instance_count!=1) + { + printf("FAILED!\n"); + printf(__FILE__":%d: on create/destroy, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count); + return 1; + } + + printf("PASSED\n"); + return 0; +} + +/* === E N T R Y P O I N T ================================================= */ + +int main() +{ + int error=0; + + error+=smart_ptr_basic_test(); + error+=smart_ptr_general_use_test(); + error+=smart_ptr_inheritance_test(); + error+=loose_smart_ptr_test(); + + return error; +} diff --git a/ETL/test/spline.cpp b/ETL/test/spline.cpp new file mode 100644 index 0000000..eaae237 --- /dev/null +++ b/ETL/test/spline.cpp @@ -0,0 +1,99 @@ +/*! ======================================================================== +** Extended Template and Library Test Suite +** Spline Curve Test +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +using namespace etl; + +/* === C L A S S E S ======================================================= */ + + +/* === P R O C E D U R E S ================================================= */ + +int bspline_basic_test(void) +{ + int ret=0; + float f; + + bspline BSpline; + etl::clock timer; + double t; + + *BSpline.cpoints().insert(BSpline.cpoints().end())=0; + *BSpline.cpoints().insert(BSpline.cpoints().end())=-1; + *BSpline.cpoints().insert(BSpline.cpoints().end())=0; + *BSpline.cpoints().insert(BSpline.cpoints().end())=1; + *BSpline.cpoints().insert(BSpline.cpoints().end())=0; + + BSpline.set_m(4); + BSpline.reset_knots(); + + integral > inte(BSpline); + + + /* + for(f=0.0;f<1.001;f+=0.05) + fprintf(stderr,"BSpline(%f)= %f\n",f,BSpline(f)); + */ + + fprintf(stderr,"integral of BSpline() on [0,1] = %f\n",inte(0,1.0)); + + + for(f=0.0f,timer.reset();f<1.001f;f+=0.000005f) + { + t+=BSpline(f)+BSpline(f+0.1f); + t+=BSpline(f)+BSpline(f+0.1f); + t+=BSpline(f)+BSpline(f+0.1f); + t+=BSpline(f)+BSpline(f+0.1f); + t+=BSpline(f)+BSpline(f+0.1f); + t+=BSpline(f)+BSpline(f+0.1f); + t+=BSpline(f)+BSpline(f+0.1f); + t+=BSpline(f)+BSpline(f+0.1f); + t+=BSpline(f)+BSpline(f+0.1f); + t+=BSpline(f)+BSpline(f+0.1f); + t+=BSpline(f)+BSpline(f+0.1f); + t+=BSpline(f)+BSpline(f+0.1f); + } + t=timer(); + + fprintf(stderr,"BSpline time=%f milliseconds\n",t*1000); + return ret; +} + +/* === E N T R Y P O I N T ================================================= */ + +int main() +{ + int error=0; + + error+=bspline_basic_test(); + + return error; +} + diff --git a/ETL/test/stringf.cpp b/ETL/test/stringf.cpp new file mode 100644 index 0000000..7c8346d --- /dev/null +++ b/ETL/test/stringf.cpp @@ -0,0 +1,152 @@ +/*! ======================================================================== +** Extended Template and Library Test Suite +** stringf Procedure Test +** $Id$ +** +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +using namespace etl; +using namespace std; + +/* === C L A S S E S ======================================================= */ + + +/* === P R O C E D U R E S ================================================= */ + +int basic_test(void) +{ + int ret=0; + char mystring[80]="My formatted string!"; + string myotherstring="my other string!"; + + cout<>%s<<.",mystring)< "< "< "< "< "< "< "< "< "<=2.0f) + printf("#"); + else if(pen.get_value()>=1.0f) + printf("@"); + else if(pen.get_value()>=0.8f) + printf("%%"); + else if(pen.get_value()>=0.6f) + printf("O"); + else if(pen.get_value()>=0.4f) + printf(":"); + else if(pen.get_value()>=0.2f) + printf("."); + else if(pen.get_value()>=-0.1f) + printf(" "); + else + printf("X"),ret++; + } + pen.dec_x(x); + printf("|\n"); + } + pen.dec_y(y); + return ret; +} + +void make_pattern(generic_pen pen, int w, int h) +{ + int x,y; + for(y=0;y my_surface(100,100); + + gaussian_blur(my_surface.begin(),my_surface.end(),10,10); + + surface my_surface2(my_surface); + + my_surface2.fill(0.5); + my_surface2.clear(); + + my_surface2=my_surface; + + my_surface2.fill(0.5); + my_surface2.clear(); + + my_surface.fill(0.5); + my_surface.clear(); + + surface my_surface3; + my_surface3.mirror(my_surface2); + + my_surface3.fill(0.5); + my_surface3.clear(); + + my_surface3=my_surface; + + my_surface3.mirror(my_surface); + + printf("Surface:basic_test(): %d errors.\n",ret); + + return ret; +} + +int linear_sample_test() +{ + printf("Surface:linear_sample_test(): Running...\n"); + + int ret=0; + + surface my_surface(16,16); + + my_surface.fill(0.0f); + + make_pattern(my_surface.begin(),my_surface.get_w(),my_surface.get_h()); + + int extra(5); + surface dest(18+extra*2,18+extra*2); + + int x,y; + for(x=-extra;x my_surface(16,16); + + my_surface.fill(0.0f); + + make_pattern(my_surface.begin(),my_surface.get_w(),my_surface.get_h()); + + { + surface dest(24,24); + + int x,y; + for(x=0;x dest(16,16); + + int x,y; + for(x=0;x +#include + +/* === M A C R O S ========================================================= */ + +using namespace etl; + +/* === C L A S S E S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +struct stupidv +{ + float x,y; + + stupidv(float xin=0, float yin=0) :x(xin),y(yin) {} + void print() const + { + printf("(x=%f,y=%f)\n",x,y); + } +}; + +struct stupidp +{ + float z,w; + + stupidp(float zin=0, float win=0) :z(zin),w(win) {} + + void print() const + { + printf("(z=%f,w=%f)\n",z,w); + } +}; + +template <> +class etl::value_store_type +{ + typedef stupidv value_type; +}; + +int main() +{ + try + { + value v(10.0); //construction + value v2; //default construct... + + //get type... + printf("type of 10.0: %s\n", v.type().name()); + + v2 = 1; //assignment + printf("type of 1: %s\n", v2.type().name()); + + //extract int test + + int *pi = value_cast(&v2); + printf("v2 is an int(%p)\n", pi); + printf(" %d\n", value_cast(v2)); + + printf(" const version: %d\n", value_cast(value(5))); + + v = 'c'; //assignment again... + printf("type of c: %s\n", v.type().name()); + + v2 = v; //value assignment + printf("type of v2 , v: %s , %s\n", v2.type().name(), v.type().name()); + + //random type test + v = stupidv(0,1); + printf("type of vec: %s\n", v.type().name()); + + //type cast with binary change test + value_cast(&v)->print(); + value_cast(stupidp(5,10)).print(); //copy test + + printf("type of v: %s\n", v.type().name()); + printf("type of v2: %s\n", v2.type().name()); + v.swap(v2); + printf("type of v: %s\n", v.type().name()); + printf("type of v2: %s\n", v2.type().name()); + + // test the exception throwing... + value_cast(stupidp(6,66)); + + }catch(const etl::bad_value_cast &e) + { + printf(" Exploded: %s\n",e.what()); + }catch(...) + { + printf(" Exploded\n"); + } + + return 0; +} diff --git a/ETL/trunk/AUTHORS b/ETL/trunk/AUTHORS deleted file mode 100644 index 83446da..0000000 --- a/ETL/trunk/AUTHORS +++ /dev/null @@ -1,12 +0,0 @@ -Developers: - -Robert B. Quattlebaum Jr (darco) -Adrian Bentley - -Contributors: - -Paul Wise (pabs) -Andreas Jochens -Chris Moore (dooglus) -Martin Michlmayr -Ralf Corsepius diff --git a/ETL/trunk/ETL-config.in b/ETL/trunk/ETL-config.in deleted file mode 100644 index 61bce4f..0000000 --- a/ETL/trunk/ETL-config.in +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh - -VERSION=@VERSION@ -PACKAGE=@PACKAGE@ - -usage() -{ - cat < - - - - ActivePerspectiveName - Project - AllowedModules - - - BundleLoadPath - - MaxInstances - n - Module - PBXSmartGroupTreeModule - Name - Groups and Files Outline View - - - BundleLoadPath - - MaxInstances - n - Module - PBXNavigatorGroup - Name - Editor - - - BundleLoadPath - - MaxInstances - n - Module - XCTaskListModule - Name - Task List - - - BundleLoadPath - - MaxInstances - n - Module - XCDetailModule - Name - File and Smart Group Detail Viewer - - - BundleLoadPath - - MaxInstances - 1 - Module - PBXBuildResultsModule - Name - Detailed Build Results Viewer - - - BundleLoadPath - - MaxInstances - 1 - Module - PBXProjectFindModule - Name - Project Batch Find Tool - - - BundleLoadPath - - MaxInstances - n - Module - PBXRunSessionModule - Name - Run Log - - - BundleLoadPath - - MaxInstances - n - Module - PBXBookmarksModule - Name - Bookmarks Tool - - - BundleLoadPath - - MaxInstances - n - Module - PBXClassBrowserModule - Name - Class Browser - - - BundleLoadPath - - MaxInstances - n - Module - PBXCVSModule - Name - Source Code Control Tool - - - BundleLoadPath - - MaxInstances - n - Module - PBXDebugBreakpointsModule - Name - Debug Breakpoints Tool - - - BundleLoadPath - - MaxInstances - n - Module - XCDockableInspector - Name - Inspector - - - BundleLoadPath - - MaxInstances - n - Module - PBXOpenQuicklyModule - Name - Open Quickly Tool - - - BundleLoadPath - - MaxInstances - 1 - Module - PBXDebugSessionModule - Name - Debugger - - - BundleLoadPath - - MaxInstances - 1 - Module - PBXDebugCLIModule - Name - Debug Console - - - Description - This workspace mimics that found in Xcode 1.2, with various minor improvements such as including attached editors to the build results window and the project find window. - DockingSystemVisible - - Extension - mode1 - FirstTimeWindowDisplayed - - Identifier - com.apple.perspectives.project.mode1 - MajorVersion - 31 - MinorVersion - 0 - Name - Default Workspace - Notifications - - OpenEditors - - Perspectives - - - ChosenToolbarItems - - active-target-popup - action - NSToolbarFlexibleSpaceItem - buildOrClean - build-and-runOrDebug - clean-target - com.apple.ide.PBXToolbarStopButton - get-info - toggle-editor - NSToolbarFlexibleSpaceItem - com.apple.pbx.toolbar.searchfield - - ControllerClassBaseName - - IconName - WindowOfProject - Identifier - perspective.project - IsVertical - - Layout - - - BecomeActive - - ContentConfiguration - - PBXBottomSmartGroupGIDs - - 1C37FBAC04509CD000000102 - 1C37FAAC04509CD000000102 - 1C08E77C0454961000C914BD - 1C37FABC05509CD000000102 - 1C37FABC05539CD112110102 - E2644B35053B69B200211256 - 1C37FABC04509CD000100104 - - PBXProjectModuleGUID - 1CE0B1FE06471DED0097A5F4 - PBXProjectModuleLabel - Files - PBXProjectStructureProvided - yes - PBXSmartGroupTreeModuleColumnData - - PBXSmartGroupTreeModuleColumnWidthsKey - - 265 - - PBXSmartGroupTreeModuleColumnsKey_v4 - - MainColumn - - - PBXSmartGroupTreeModuleOutlineStateKey_v7 - - PBXSmartGroupTreeModuleOutlineStateExpansionKey - - F550016102F0983D01000102 - F550017202F0ABE401000102 - 1C37FABC05509CD000000102 - - PBXSmartGroupTreeModuleOutlineStateSelectionKey - - - 0 - - - PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 1044}, {265, 435}} - - PBXTopSmartGroupGIDs - - - GeometryConfiguration - - Frame - {{0, 0}, {282, 453}} - GroupTreeTableConfiguration - - MainColumn - 265 - - RubberWindowFrame - 46 184 812 495 0 0 1152 848 - - Module - PBXSmartGroupTreeModule - Proportion - 282pt - - - Dock - - - ContentConfiguration - - PBXProjectModuleGUID - 1CE0B20306471E060097A5F4 - PBXProjectModuleLabel - _angle.h - PBXSplitModuleInNavigatorKey - - Split0 - - PBXProjectModuleGUID - 1CE0B20406471E060097A5F4 - PBXProjectModuleLabel - _angle.h - bookmark - A6E2EB1707656ADC002AF736 - history - - A6E2EAF207656836002AF736 - - - SplitCount - 1 - - StatusBarVisibility - - - GeometryConfiguration - - Frame - {{0, 0}, {524, 0}} - RubberWindowFrame - 46 184 812 495 0 0 1152 848 - - Module - PBXNavigatorGroup - Proportion - 0pt - - - ContentConfiguration - - PBXProjectModuleGUID - 1CE0B20506471E060097A5F4 - PBXProjectModuleLabel - Targets - - GeometryConfiguration - - Frame - {{0, 7}, {524, 446}} - RubberWindowFrame - 46 184 812 495 0 0 1152 848 - - Module - XCDetailModule - Proportion - 446pt - - - Proportion - 524pt - - - Name - Project - ServiceClasses - - XCModuleDock - PBXSmartGroupTreeModule - XCModuleDock - PBXNavigatorGroup - XCDetailModule - - TableOfContents - - A6E2EAF407656836002AF736 - 1CE0B1FE06471DED0097A5F4 - A6E2EAF507656836002AF736 - 1CE0B20306471E060097A5F4 - 1CE0B20506471E060097A5F4 - - ToolbarConfiguration - xcode.toolbar.config.default - - - PerspectivesBarVisible - - StatusbarIsVisible - - TimeStamp - 0.0 - ToolbarDisplayMode - 1 - ToolbarIsVisible - - ToolbarSizeMode - 1 - Type - Perspectives - UpdateMessage - - WindowJustification - 5 - WindowOrderList - - A6E2EAFD076568E5002AF736 - A6E2EAFB076568E5002AF736 - /Users/darco/Projects/Voria/ETL/ETL.pbproj - - WindowString - 46 184 812 495 0 0 1152 848 - WindowTools - - - FirstTimeWindowDisplayed - - Identifier - windowTool.build - Layout - - - Dock - - - ContentConfiguration - - PBXProjectModuleGUID - 1CD0528F0623707200166675 - PBXProjectModuleLabel - <No Editor> - PBXSplitModuleInNavigatorKey - - Split0 - - PBXProjectModuleGUID - 1CD052900623707200166675 - - SplitCount - 1 - - StatusBarVisibility - - - GeometryConfiguration - - Frame - {{0, 0}, {500, 66}} - RubberWindowFrame - 377 21 500 500 0 0 1152 848 - - Module - PBXNavigatorGroup - Proportion - 66pt - - - BecomeActive - - ContentConfiguration - - PBXProjectModuleGUID - XCMainBuildResultsModuleGUID - PBXProjectModuleLabel - Build - XCBuildResultsTrigger_Collapse - 1021 - XCBuildResultsTrigger_Open - 1011 - - GeometryConfiguration - - Frame - {{0, 73}, {500, 385}} - RubberWindowFrame - 377 21 500 500 0 0 1152 848 - - Module - PBXBuildResultsModule - Proportion - 385pt - - - Proportion - 458pt - - - Name - Build Results - ServiceClasses - - PBXBuildResultsModule - - StatusbarIsVisible - - TableOfContents - - A6E2EAFB076568E5002AF736 - A6E2EAFC076568E5002AF736 - 1CD0528F0623707200166675 - XCMainBuildResultsModuleGUID - - ToolbarConfiguration - xcode.toolbar.config.build - WindowString - 377 21 500 500 0 0 1152 848 - WindowToolGUID - A6E2EAFB076568E5002AF736 - WindowToolIsVisible - - - - Identifier - windowTool.debugger - Layout - - - Dock - - - ContentConfiguration - - Debugger - - HorizontalSplitView - - _collapsingFrameDimension - 0.0 - _indexOfCollapsedView - 0 - _percentageOfCollapsedView - 0.0 - isCollapsed - yes - sizes - - {{0, 0}, {317, 164}} - {{317, 0}, {377, 164}} - - - VerticalSplitView - - _collapsingFrameDimension - 0.0 - _indexOfCollapsedView - 0 - _percentageOfCollapsedView - 0.0 - isCollapsed - yes - sizes - - {{0, 0}, {694, 164}} - {{0, 164}, {694, 216}} - - - - LauncherConfigVersion - 8 - PBXProjectModuleGUID - 1C162984064C10D400B95A72 - PBXProjectModuleLabel - Debug - GLUTExamples (Underwater) - - GeometryConfiguration - - DebugConsoleDrawerSize - {100, 120} - DebugConsoleVisible - None - DebugConsoleWindowFrame - {{200, 200}, {500, 300}} - DebugSTDIOWindowFrame - {{200, 200}, {500, 300}} - Frame - {{0, 0}, {694, 380}} - RubberWindowFrame - 321 238 694 422 0 0 1440 878 - - Module - PBXDebugSessionModule - Proportion - 380pt - - - Proportion - 380pt - - - Name - Debugger - ServiceClasses - - PBXDebugSessionModule - - StatusbarIsVisible - - TableOfContents - - 1CD10A99069EF8BA00B06720 - 1C0AD2AB069F1E9B00FABCE6 - 1C162984064C10D400B95A72 - 1C0AD2AC069F1E9B00FABCE6 - - ToolbarConfiguration - xcode.toolbar.config.debug - WindowString - 321 238 694 422 0 0 1440 878 - WindowToolGUID - 1CD10A99069EF8BA00B06720 - WindowToolIsVisible - - - - Identifier - windowTool.find - Layout - - - Dock - - - Dock - - - ContentConfiguration - - PBXProjectModuleGUID - 1CDD528C0622207200134675 - PBXProjectModuleLabel - <No Editor> - PBXSplitModuleInNavigatorKey - - Split0 - - PBXProjectModuleGUID - 1CD0528D0623707200166675 - - SplitCount - 1 - - StatusBarVisibility - - - GeometryConfiguration - - Frame - {{0, 0}, {781, 167}} - RubberWindowFrame - 62 385 781 470 0 0 1440 878 - - Module - PBXNavigatorGroup - Proportion - 781pt - - - Proportion - 50% - - - BecomeActive - - ContentConfiguration - - PBXProjectModuleGUID - 1CD0528E0623707200166675 - PBXProjectModuleLabel - Project Find - - GeometryConfiguration - - Frame - {{8, 0}, {773, 254}} - RubberWindowFrame - 62 385 781 470 0 0 1440 878 - - Module - PBXProjectFindModule - Proportion - 50% - - - Proportion - 428pt - - - Name - Project Find - ServiceClasses - - PBXProjectFindModule - - StatusbarIsVisible - - TableOfContents - - 1C530D57069F1CE1000CFCEE - 1C530D58069F1CE1000CFCEE - 1C530D59069F1CE1000CFCEE - 1CDD528C0622207200134675 - 1C530D5A069F1CE1000CFCEE - 1CE0B1FE06471DED0097A5F4 - 1CD0528E0623707200166675 - - WindowString - 62 385 781 470 0 0 1440 878 - WindowToolGUID - 1C530D57069F1CE1000CFCEE - WindowToolIsVisible - - - - Identifier - MENUSEPARATOR - - - Identifier - windowTool.debuggerConsole - Layout - - - Dock - - - BecomeActive - - ContentConfiguration - - PBXProjectModuleGUID - 1C78EAAC065D492600B07095 - PBXProjectModuleLabel - Debugger Console - - GeometryConfiguration - - Frame - {{0, 0}, {440, 358}} - RubberWindowFrame - 650 41 440 400 0 0 1280 1002 - - Module - PBXDebugCLIModule - Proportion - 358pt - - - Proportion - 358pt - - - Name - Debugger Console - ServiceClasses - - PBXDebugCLIModule - - StatusbarIsVisible - - TableOfContents - - 1C78EAAD065D492600B07095 - 1C78EAAE065D492600B07095 - 1C78EAAC065D492600B07095 - - WindowString - 650 41 440 400 0 0 1280 1002 - - - FirstTimeWindowDisplayed - - Identifier - windowTool.run - Layout - - - Dock - - - ContentConfiguration - - LauncherConfigVersion - 3 - PBXProjectModuleGUID - 1CD0528B0623707200166675 - PBXProjectModuleLabel - Run - Runner - - HorizontalSplitView - - _collapsingFrameDimension - 0.0 - _indexOfCollapsedView - 0 - _percentageOfCollapsedView - 0.0 - isCollapsed - yes - sizes - - {{0, 0}, {493, 167}} - {{0, 176}, {493, 267}} - - - VerticalSplitView - - _collapsingFrameDimension - 0.0 - _indexOfCollapsedView - 0 - _percentageOfCollapsedView - 0.0 - isCollapsed - yes - sizes - - {{0, 0}, {405, 443}} - {{414, 0}, {514, 443}} - - - - - GeometryConfiguration - - Frame - {{0, 0}, {458, 143}} - RubberWindowFrame - 653 537 458 185 0 0 1152 848 - - Module - PBXRunSessionModule - Proportion - 143pt - - - Proportion - 143pt - - - Name - Run Log - ServiceClasses - - PBXRunSessionModule - - StatusbarIsVisible - - TableOfContents - - A6E2EAFD076568E5002AF736 - A6E2EAFE076568E5002AF736 - 1CD0528B0623707200166675 - A6E2EAFF076568E5002AF736 - - ToolbarConfiguration - xcode.toolbar.config.run - WindowString - 653 537 458 185 0 0 1152 848 - WindowToolGUID - A6E2EAFD076568E5002AF736 - WindowToolIsVisible - - - - Identifier - windowTool.scm - Layout - - - Dock - - - ContentConfiguration - - PBXProjectModuleGUID - 1C78EAB2065D492600B07095 - PBXProjectModuleLabel - <No Editor> - PBXSplitModuleInNavigatorKey - - Split0 - - PBXProjectModuleGUID - 1C78EAB3065D492600B07095 - - SplitCount - 1 - - StatusBarVisibility - - - GeometryConfiguration - - Frame - {{0, 0}, {452, 0}} - RubberWindowFrame - 743 379 452 308 0 0 1280 1002 - - Module - PBXNavigatorGroup - Proportion - 0pt - - - BecomeActive - - ContentConfiguration - - PBXProjectModuleGUID - 1CD052920623707200166675 - PBXProjectModuleLabel - SCM - - GeometryConfiguration - - ConsoleFrame - {{0, 259}, {452, 0}} - Frame - {{0, 7}, {452, 259}} - RubberWindowFrame - 743 379 452 308 0 0 1280 1002 - TableConfiguration - - Status - 30 - FileName - 199 - Path - 197.09500122070312 - - TableFrame - {{0, 0}, {452, 250}} - - Module - PBXCVSModule - Proportion - 259pt - - - Proportion - 266pt - - - Name - SCM - ServiceClasses - - PBXCVSModule - - StatusbarIsVisible - - TableOfContents - - 1C78EAB4065D492600B07095 - 1C78EAB5065D492600B07095 - 1C78EAB2065D492600B07095 - 1CD052920623707200166675 - - WindowString - 743 379 452 308 0 0 1280 1002 - - - Identifier - windowTool.breakpoints - Layout - - - Dock - - - BecomeActive - - ContentConfiguration - - PBXProjectModuleGUID - 1CD052930623707200166675 - PBXProjectModuleLabel - Breakpoints - - GeometryConfiguration - - BreakpointsTreeTableConfiguration - - enabledColumn - 16 - breakpointColumn - 201.5830078125 - - Frame - {{0, 0}, {240, 195}} - RubberWindowFrame - 342 421 240 216 0 0 1440 878 - - Module - PBXDebugBreakpointsModule - Proportion - 195pt - - - Proportion - 195pt - - - Name - Breakpoints - ServiceClasses - - PBXDebugBreakpointsModule - - StatusbarIsVisible - - TableOfContents - - 1C0AD2AD069F1E9B00FABCE6 - 1C0AD2AE069F1E9B00FABCE6 - 1CD052930623707200166675 - - WindowString - 342 421 240 216 0 0 1440 878 - WindowToolGUID - 1C0AD2AD069F1E9B00FABCE6 - WindowToolIsVisible - - - - Identifier - windowTool.bookmarks - Layout - - - Dock - - - Module - PBXBookmarksModule - Proportion - 166pt - - - Proportion - 166pt - - - Name - Bookmarks - ServiceClasses - - PBXBookmarksModule - - StatusbarIsVisible - - WindowString - 538 42 401 187 0 0 1280 1002 - - - Identifier - windowTool.classBrowser - Layout - - - Dock - - - BecomeActive - - ContentConfiguration - - OptionsSetName - Hierarchy, all classes - PBXProjectModuleGUID - 1CA6456E063B45B4001379D8 - PBXProjectModuleLabel - Class Browser - NSObject - - GeometryConfiguration - - ClassesFrame - {{0, 0}, {374, 96}} - ClassesTreeTableConfiguration - - PBXClassNameColumnIdentifier - 208 - PBXClassBookColumnIdentifier - 22 - - Frame - {{0, 0}, {630, 331}} - MembersFrame - {{0, 105}, {374, 395}} - MembersTreeTableConfiguration - - PBXMemberTypeIconColumnIdentifier - 22 - PBXMemberNameColumnIdentifier - 216 - PBXMemberTypeColumnIdentifier - 97 - PBXMemberBookColumnIdentifier - 22 - - PBXModuleWindowStatusBarHidden2 - - RubberWindowFrame - 385 179 630 352 0 0 1440 878 - - Module - PBXClassBrowserModule - Proportion - 331pt - - - Proportion - 331pt - - - Name - Class Browser - ServiceClasses - - PBXClassBrowserModule - - StatusbarIsVisible - - TableOfContents - - 1C0AD2AF069F1E9B00FABCE6 - 1C0AD2B0069F1E9B00FABCE6 - 1CA6456E063B45B4001379D8 - - ToolbarConfiguration - xcode.toolbar.config.classbrowser - WindowString - 385 179 630 352 0 0 1440 878 - WindowToolGUID - 1C0AD2AF069F1E9B00FABCE6 - WindowToolIsVisible - - - - - diff --git a/ETL/trunk/ETL.pbproj/darco.pbxuser b/ETL/trunk/ETL.pbproj/darco.pbxuser deleted file mode 100755 index 63eaae6..0000000 --- a/ETL/trunk/ETL.pbproj/darco.pbxuser +++ /dev/null @@ -1,859 +0,0 @@ -// !$*UTF8*$! -{ - A6E2EADA07656777002AF736 = { - fallbackIsa = XCSourceControlManager; - isSCMEnabled = 0; - isa = PBXSourceControlManager; - scmConfiguration = { - }; - scmType = ""; - }; - A6E2EADB07656777002AF736 = { - indexTemplatePath = ""; - isa = PBXCodeSenseManager; - usesDefaults = 1; - wantsCodeCompletion = 1; - wantsCodeCompletionAutoSuggestions = 0; - wantsCodeCompletionCaseSensitivity = 1; - wantsCodeCompletionListAlways = 1; - wantsCodeCompletionOnlyMatchingItems = 1; - wantsCodeCompletionParametersIncluded = 1; - wantsCodeCompletionPlaceholdersInserted = 1; - wantsCodeCompletionTabCompletes = 1; - wantsIndex = 1; - }; - A6E2EAF207656836002AF736 = { - fRef = F5060A1C02F342A901000102; - isa = PBXBookmark; - }; - A6E2EB1707656ADC002AF736 = { - fRef = F5060A1C02F342A901000102; - isa = PBXTextBookmark; - name = "_angle.h: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 0; - vrLoc = 0; - }; - F5060A1C02F342A901000102 = { - uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {608, 6187}}"; - sepNavSelRange = "{0, 0}"; - sepNavVisRect = "{{0, 0}, {0, 0}}"; - }; - }; - F5060A3602F37B5E01000102 = { - activeExec = 0; - executables = ( - F5060A3802F37B5E01000102, - ); - }; - F5060A3802F37B5E01000102 = { - activeArgIndex = 2147483647; - activeArgIndices = ( - ); - argumentStrings = ( - ); - configStateDict = { - }; - cppStopOnCatchEnabled = 0; - cppStopOnThrowEnabled = 0; - customDataFormattersEnabled = 1; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - dylibVariantSuffix = ""; - enableDebugStr = 1; - environmentEntries = ( - ); - isa = PBXExecutable; - libgmallocEnabled = 0; - name = "Handle Test"; - shlibInfoDictList = ( - ); - sourceDirectories = ( - ); - }; - F5060A3C02F37BAC01000102 = { - activeExec = 0; - executables = ( - F5060A4402F37BAC01000102, - ); - }; - F5060A4402F37BAC01000102 = { - activeArgIndex = 2147483647; - activeArgIndices = ( - ); - argumentStrings = ( - ); - configStateDict = { - }; - cppStopOnCatchEnabled = 0; - cppStopOnThrowEnabled = 0; - customDataFormattersEnabled = 1; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - dylibVariantSuffix = ""; - enableDebugStr = 1; - environmentEntries = ( - ); - isa = PBXExecutable; - libgmallocEnabled = 0; - name = "Angle Test"; - shlibInfoDictList = ( - ); - sourceDirectories = ( - ); - }; - F5060A4802F37BDD01000102 = { - activeExec = 0; - }; - F5060A5102F37D8201000102 = { - activeExec = 0; - executables = ( - F5060A5902F37D8201000102, - ); - }; - F5060A5902F37D8201000102 = { - activeArgIndex = 2147483647; - activeArgIndices = ( - ); - argumentStrings = ( - ); - configStateDict = { - }; - cppStopOnCatchEnabled = 0; - cppStopOnThrowEnabled = 0; - customDataFormattersEnabled = 1; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - dylibVariantSuffix = ""; - enableDebugStr = 1; - environmentEntries = ( - ); - isa = PBXExecutable; - libgmallocEnabled = 0; - name = "Smach Test"; - shlibInfoDictList = ( - ); - sourceDirectories = ( - ); - }; - F5060A5A02F37D8501000102 = { - activeExec = 0; - executables = ( - F5060A6202F37D8501000102, - ); - }; - F5060A6202F37D8501000102 = { - activeArgIndex = 2147483647; - activeArgIndices = ( - ); - argumentStrings = ( - ); - configStateDict = { - }; - cppStopOnCatchEnabled = 0; - cppStopOnThrowEnabled = 0; - customDataFormattersEnabled = 1; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - dylibVariantSuffix = ""; - enableDebugStr = 1; - environmentEntries = ( - ); - isa = PBXExecutable; - libgmallocEnabled = 0; - name = "Random Test"; - shlibInfoDictList = ( - ); - sourceDirectories = ( - ); - }; - F5060A6702F37DEF01000102 = { - activeExec = 0; - executables = ( - F5060A6F02F37DEF01000102, - ); - }; - F5060A6F02F37DEF01000102 = { - activeArgIndex = 2147483647; - activeArgIndices = ( - ); - argumentStrings = ( - ); - configStateDict = { - }; - cppStopOnCatchEnabled = 0; - cppStopOnThrowEnabled = 0; - customDataFormattersEnabled = 1; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - dylibVariantSuffix = ""; - enableDebugStr = 1; - environmentEntries = ( - ); - isa = PBXExecutable; - libgmallocEnabled = 0; - name = "Fixed Test"; - shlibInfoDictList = ( - ); - sourceDirectories = ( - ); - }; - F513069D032666F8012F4765 = { - activeExec = 0; - }; - F51307D803269B0F012F4765 = { - activeExec = 0; - executables = ( - F51307E103269B0F012F4765, - ); - }; - F51307E103269B0F012F4765 = { - activeArgIndex = 2147483647; - activeArgIndices = ( - ); - argumentStrings = ( - ); - configStateDict = { - }; - cppStopOnCatchEnabled = 0; - cppStopOnThrowEnabled = 0; - customDataFormattersEnabled = 1; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - dylibVariantSuffix = ""; - enableDebugStr = 1; - environmentEntries = ( - ); - isa = PBXExecutable; - libgmallocEnabled = 0; - name = "Stringf Test"; - shlibInfoDictList = ( - ); - sourceDirectories = ( - ); - }; - F54AEB2B02F6899D01000102 = { - activeExec = 0; - executables = ( - F54AEB3302F6899D01000102, - ); - }; - F54AEB3302F6899D01000102 = { - activeArgIndex = 2147483647; - activeArgIndices = ( - ); - argumentStrings = ( - ); - configStateDict = { - }; - cppStopOnCatchEnabled = 0; - cppStopOnThrowEnabled = 0; - customDataFormattersEnabled = 1; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - dylibVariantSuffix = ""; - enableDebugStr = 1; - environmentEntries = ( - ); - isa = PBXExecutable; - libgmallocEnabled = 0; - name = "Clock Test"; - shlibInfoDictList = ( - ); - sourceDirectories = ( - ); - }; - F550016502F0983D01000102 = { - activeBuildStyle = F550016402F0983D01000102; - activeExecutable = F5060A5902F37D8201000102; - activeTarget = F513069D032666F8012F4765; - addToTargets = ( - F588A3BC02F0CCE501000102, - ); - breakpoints = ( - F5AD1D3D03098DA401B5FFC8, - ); - codeSenseManager = A6E2EADB07656777002AF736; - executables = ( - F5060A3802F37B5E01000102, - F5060A4402F37BAC01000102, - F5060A5902F37D8201000102, - F5060A6202F37D8501000102, - F5060A6F02F37DEF01000102, - F54AEB3302F6899D01000102, - F576CB76031841EA01A80006, - F5CAA207031AD533012F434D, - F51307E103269B0F012F4765, - F58D9F8E037F146301A80006, - F58D9F97037F14FE01A80006, - ); - perUserDictionary = { - PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { - PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; - PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; - PBXFileTableDataSourceColumnWidthsKey = ( - 20, - 279, - 20, - 54, - 43, - 43, - 20, - ); - PBXFileTableDataSourceColumnsKey = ( - PBXFileDataSource_FiletypeID, - PBXFileDataSource_Filename_ColumnID, - PBXFileDataSource_Built_ColumnID, - PBXFileDataSource_ObjectSize_ColumnID, - PBXFileDataSource_Errors_ColumnID, - PBXFileDataSource_Warnings_ColumnID, - PBXFileDataSource_Target_ColumnID, - ); - }; - PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { - PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; - PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; - PBXFileTableDataSourceColumnWidthsKey = ( - 20, - 241, - 62, - 20, - 56, - 43, - 43, - ); - PBXFileTableDataSourceColumnsKey = ( - PBXFileDataSource_FiletypeID, - PBXFileDataSource_Filename_ColumnID, - PBXTargetDataSource_PrimaryAttribute, - PBXFileDataSource_Built_ColumnID, - PBXFileDataSource_ObjectSize_ColumnID, - PBXFileDataSource_Errors_ColumnID, - PBXFileDataSource_Warnings_ColumnID, - ); - }; - PBXPerProjectTemplateStateSaveDate = 124086103; - PBXPrepackagedSmartGroups_v2 = ( - { - PBXTransientLocationAtTop = bottom; - absolutePathToBundle = ""; - activationKey = OldTargetSmartGroup; - clz = PBXTargetSmartGroup; - description = "Displays all targets of the project."; - globalID = 1C37FABC04509CD000000102; - name = Targets; - preferences = { - image = Targets; - }; - }, - { - PBXTransientLocationAtTop = bottom; - absolutePathToBundle = ""; - clz = PBXTargetSmartGroup2; - description = "Displays all targets of the project as well as nested build phases."; - globalID = 1C37FBAC04509CD000000102; - name = Targets; - preferences = { - image = Targets; - }; - }, - { - PBXTransientLocationAtTop = bottom; - absolutePathToBundle = ""; - clz = PBXExecutablesSmartGroup; - description = "Displays all executables of the project."; - globalID = 1C37FAAC04509CD000000102; - name = Executables; - preferences = { - image = Executable; - }; - }, - { - " PBXTransientLocationAtTop " = bottom; - absolutePathToBundle = ""; - clz = PBXErrorsWarningsSmartGroup; - description = "Displays files with errors or warnings."; - globalID = 1C08E77C0454961000C914BD; - name = "Errors and Warnings"; - preferences = { - fnmatch = ""; - image = WarningsErrors; - recursive = 1; - regex = ""; - root = ""; - }; - }, - { - PBXTransientLocationAtTop = bottom; - absolutePathToBundle = ""; - clz = PBXFilenameSmartGroup; - description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter."; - globalID = 1CC0EA4004350EF90044410B; - name = "Implementation Files"; - preferences = { - canSave = 1; - fnmatch = ""; - image = SmartFolder; - isLeaf = 0; - recursive = 1; - regex = "?*\\.[mcMC]"; - root = ""; - }; - }, - { - PBXTransientLocationAtTop = bottom; - absolutePathToBundle = ""; - clz = PBXFilenameSmartGroup; - description = "This group displays Interface Builder NIB Files."; - globalID = 1CC0EA4004350EF90041110B; - name = "NIB Files"; - preferences = { - canSave = 1; - fnmatch = "*.nib"; - image = SmartFolder; - isLeaf = 0; - recursive = 1; - regex = ""; - root = ""; - }; - }, - { - PBXTransientLocationAtTop = no; - absolutePathToBundle = ""; - clz = PBXFindSmartGroup; - description = "Displays Find Results."; - globalID = 1C37FABC05509CD000000102; - name = "Find Results"; - preferences = { - image = spyglass; - }; - }, - { - PBXTransientLocationAtTop = no; - absolutePathToBundle = ""; - clz = PBXBookmarksSmartGroup; - description = "Displays Project Bookmarks."; - globalID = 1C37FABC05539CD112110102; - name = Bookmarks; - preferences = { - image = Bookmarks; - }; - }, - { - PBXTransientLocationAtTop = bottom; - absolutePathToBundle = ""; - clz = XCSCMSmartGroup; - description = "Displays files with interesting SCM status."; - globalID = E2644B35053B69B200211256; - name = SCM; - preferences = { - image = PBXRepository; - isLeaf = 0; - }; - }, - { - PBXTransientLocationAtTop = bottom; - absolutePathToBundle = ""; - clz = PBXSymbolsSmartGroup; - description = "Displays all symbols for the project."; - globalID = 1C37FABC04509CD000100104; - name = "Project Symbols"; - preferences = { - image = ProjectSymbols; - isLeaf = 1; - }; - }, - { - PBXTransientLocationAtTop = bottom; - absolutePathToBundle = ""; - clz = PBXFilenameSmartGroup; - description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter."; - globalID = PBXTemplateMarker; - name = "Simple Filter SmartGroup"; - preferences = { - canSave = 1; - fnmatch = "*.nib"; - image = SmartFolder; - isLeaf = 0; - recursive = 1; - regex = ""; - root = ""; - }; - }, - { - PBXTransientLocationAtTop = bottom; - absolutePathToBundle = ""; - clz = PBXFilenameSmartGroup; - description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter."; - globalID = PBXTemplateMarker; - name = "Simple Regular Expression SmartGroup"; - preferences = { - canSave = 1; - fnmatch = ""; - image = SmartFolder; - isLeaf = 0; - recursive = 1; - regex = "?*\\.[mcMC]"; - root = ""; - }; - }, - { - PBXTransientLocationAtTop = bottom; - clz = XDDesignSmartGroup; - description = "Displays Xdesign models"; - globalID = 2E4A936305E6979E00701470; - name = Design; - preferences = { - image = Design; - isLeaf = 0; - }; - }, - ); - PBXWorkspaceContents = ( - { - LeftSlideOut = { - Split0 = { - Split0 = { - NavContent0 = { - bookmark = A6FEFDFB05DF3B2E00140006; - history = ( - F530FB0803650921012F4ADF, - F5429FB903A918AB01A80006, - F5429FBA03A918AB01A80006, - F5C1F0ED03BCE61101A80006, - A64F6F3B052BE34900140006, - A64F6F3C052BE34900140006, - A64F6F3D052BE34900140006, - A64F6F3E052BE34900140006, - A63F3B810551700E00140006, - A63F3B820551700E00140006, - A64EF6BF05A73A8F00140006, - ); - prevStack = ( - F5429FBC03A918AB01A80006, - F5429FBD03A918AB01A80006, - F5429FBE03A918AB01A80006, - F5C1F0EF03BCE61101A80006, - A64F6F41052BE34900140006, - A64F6F42052BE34900140006, - A64F6F43052BE34900140006, - A64F6F44052BE34900140006, - A64F6F45052BE34900140006, - A64F6F46052BE34900140006, - A63F3B830551700E00140006, - A63F3B840551700E00140006, - ); - }; - NavCount = 1; - NavGeometry0 = { - Frame = "{{0, 0}, {992, 458}}"; - NavBarVisible = YES; - }; - NavSplitVertical = NO; - }; - SplitCount = 1; - Tab1 = { - Debugger = { - Split0 = { - SplitCount = 2; - }; - SplitCount = 1; - TabCount = 2; - }; - LauncherConfigVersion = 7; - }; - Tab2 = { - LauncherConfigVersion = 3; - Runner = { - }; - }; - TabCount = 5; - }; - SplitCount = 1; - Tab1 = { - OptionsSetName = "Hierarchy, all classes"; - }; - TabCount = 5; - }; - }, - ); - PBXWorkspaceGeometries = ( - { - ContentSize = "{1276, 770}"; - LeftSlideOut = { - ActiveTab = 0; - ActiveTabName = PBXGroupTreeModule; - Collapsed = NO; - Frame = "{{0, 23}, {1276, 747}}"; - Split0 = { - ActiveTab = 2; - ActiveTabName = PBXBuildResultsModule; - Collapsed = NO; - Frame = "{{284, 0}, {992, 747}}"; - Split0 = { - Frame = "{{0, 289}, {992, 458}}"; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {572, 214}}"; - }; - Tab1 = { - Debugger = { - Collapsed = NO; - Frame = "{{0, 0}, {992, 150}}"; - Split0 = { - Frame = "{{0, 24}, {992, 126}}"; - Split0 = { - Frame = "{{0, 0}, {488, 126}}"; - }; - Split1 = { - DebugVariablesTableConfiguration = ( - Name, - 123, - Value, - 85, - Summary, - 261.123, - ); - Frame = "{{497, 0}, {495, 126}}"; - }; - SplitCount = 2; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - Tab1 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - TabCount = 2; - TabsVisible = YES; - }; - Frame = "{{0, 0}, {992, 125}}"; - LauncherConfigVersion = 7; - }; - Tab2 = { - Frame = "{{0, 0}, {992, 254}}"; - LauncherConfigVersion = 3; - Runner = { - Frame = "{{0, 0}, {992, 254}}"; - }; - }; - Tab3 = { - BuildMessageFrame = "{{0, 0}, {994, 232}}"; - BuildTranscriptFrame = "{{0, 241}, {994, 2}}"; - BuildTranscriptFrameExpanded = YES; - Frame = "{{0, 0}, {992, 265}}"; - }; - Tab4 = { - Frame = "{{0, 0}, {612, 295}}"; - }; - TabCount = 5; - TabsVisible = YES; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {260, 747}}"; - GroupTreeTableConfiguration = ( - TargetStatusColumn, - 18, - MainColumn, - 205, - SCMStatusColumn, - 22, - ); - }; - Tab1 = { - ClassesFrame = "{{0, 0}, {247, 330}}"; - ClassesTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXClassColumnIdentifier, - 204, - ); - Frame = "{{0, 0}, {245, 549}}"; - MembersFrame = "{{0, 339}, {247, 210}}"; - MembersTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXMethodColumnIdentifier, - 203, - ); - }; - Tab2 = { - Frame = "{{0, 0}, {226, 549}}"; - }; - Tab3 = { - Frame = "{{0, 0}, {191, 747}}"; - TargetTableConfiguration = ( - ActiveObject, - 16, - ObjectNames, - 202.296, - ); - }; - Tab4 = { - BreakpointsTreeTableConfiguration = ( - breakpointColumn, - 138, - enabledColumn, - 31, - ); - Frame = "{{0, 0}, {191, 549}}"; - }; - TabCount = 5; - TabsVisible = YES; - }; - NavBarShownByDefault = YES; - StatusViewVisible = YES; - Template = F5F68CF101725D4C0D7A8F4C; - ToolbarVisible = YES; - WindowLocation = "{4, 0}"; - }, - ); - PBXWorkspaceStateSaveDate = 124086103; - }; - perUserProjectItems = { - A6E2EAF207656836002AF736 = A6E2EAF207656836002AF736; - A6E2EB1707656ADC002AF736 = A6E2EB1707656ADC002AF736; - }; - sourceControlManager = A6E2EADA07656777002AF736; - userBuildSettings = { - }; - }; - F576CB6D031841EA01A80006 = { - activeExec = 0; - executables = ( - F576CB76031841EA01A80006, - ); - }; - F576CB76031841EA01A80006 = { - activeArgIndex = 2147483647; - activeArgIndices = ( - ); - argumentStrings = ( - ); - configStateDict = { - }; - cppStopOnCatchEnabled = 0; - cppStopOnThrowEnabled = 0; - customDataFormattersEnabled = 1; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - dylibVariantSuffix = ""; - enableDebugStr = 1; - environmentEntries = ( - ); - isa = PBXExecutable; - libgmallocEnabled = 0; - name = "Hermite Test"; - shlibInfoDictList = ( - ); - sourceDirectories = ( - ); - }; - F588A3BC02F0CCE501000102 = { - activeExec = 0; - }; - F58D9F85037F146301A80006 = { - activeExec = 0; - executables = ( - F58D9F8E037F146301A80006, - ); - }; - F58D9F8E037F146301A80006 = { - activeArgIndex = 2147483647; - activeArgIndices = ( - ); - argumentStrings = ( - ); - configStateDict = { - }; - cppStopOnCatchEnabled = 0; - cppStopOnThrowEnabled = 0; - customDataFormattersEnabled = 1; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - enableDebugStr = 1; - environmentEntries = ( - ); - isa = PBXExecutable; - libgmallocEnabled = 0; - name = "Pen Test"; - shlibInfoDictList = ( - ); - sourceDirectories = ( - ); - }; - F58D9F8F037F14FE01A80006 = { - activeExec = 0; - executables = ( - F58D9F97037F14FE01A80006, - ); - }; - F58D9F97037F14FE01A80006 = { - activeArgIndex = 2147483647; - activeArgIndices = ( - ); - argumentStrings = ( - ); - configStateDict = { - }; - cppStopOnCatchEnabled = 0; - cppStopOnThrowEnabled = 0; - customDataFormattersEnabled = 1; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - dylibVariantSuffix = ""; - enableDebugStr = 1; - environmentEntries = ( - ); - isa = PBXExecutable; - libgmallocEnabled = 0; - name = "Surface Test"; - shlibInfoDictList = ( - ); - sourceDirectories = ( - ); - }; - F5AD1D3D03098DA401B5FFC8 = { - fileReference = F5060A1E02F342A901000102; - isa = PBXFileBreakpoint; - lineNumber = 5; - state = 2; - }; - F5CAA1FE031AD533012F434D = { - activeExec = 0; - executables = ( - F5CAA207031AD533012F434D, - ); - }; - F5CAA207031AD533012F434D = { - activeArgIndex = 2147483647; - activeArgIndices = ( - ); - argumentStrings = ( - ); - configStateDict = { - }; - cppStopOnCatchEnabled = 0; - cppStopOnThrowEnabled = 0; - customDataFormattersEnabled = 1; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - dylibVariantSuffix = ""; - enableDebugStr = 1; - environmentEntries = ( - ); - isa = PBXExecutable; - libgmallocEnabled = 0; - name = "Spline Test"; - shlibInfoDictList = ( - ); - sourceDirectories = ( - ); - }; -} diff --git a/ETL/trunk/ETL.pbproj/etl_profile.h b/ETL/trunk/ETL.pbproj/etl_profile.h deleted file mode 100644 index e63e0fe..0000000 --- a/ETL/trunk/ETL.pbproj/etl_profile.h +++ /dev/null @@ -1,40 +0,0 @@ -/* include/etl_profile.h. Generated by configure. */ -/* include/etl_profile.h.in. Generated from configure.in by autoheader. */ - - -#ifndef __VETL_PROFILE_H -#define __VETL_PROFILE_H - -/* define if target is big endian */ -#define WORDS_BIGENDIAN - -#ifndef HAVE_GETTIMEOFDAY -#define HAVE_GETTIMEOFDAY -#endif - -#ifndef HAVE_PTHREAD_H -#define HAVE_PTHREAD_H -#endif - -#ifndef HAVE_SCHED_H -#define HAVE_SCHED_H -#endif - -#ifndef HAVE_PTHREAD_CREATE -#define HAVE_PTHREAD_CREATE -#endif - -#ifndef HAVE_VASPRINTF -#define HAVE_VASPRINTF -#endif - -#ifndef HAVE_VSNPRINTF -#define HAVE_VSNPRINTF -#endif - -#ifndef HAVE_VSPRINTF -#define HAVE_VSPRINTF -#endif - -#endif // __VETL_CONFIG_H - diff --git a/ETL/trunk/ETL.pbproj/frameworkfix.cpp b/ETL/trunk/ETL.pbproj/frameworkfix.cpp deleted file mode 100644 index 0aee6e8..0000000 --- a/ETL/trunk/ETL.pbproj/frameworkfix.cpp +++ /dev/null @@ -1,8 +0,0 @@ -/* - * untitled.cpp - * ETL - * - * Created by Robert Quattlebaum on Mon Aug 26 2002. - * - */ - diff --git a/ETL/trunk/ETL.pbproj/project.pbxproj b/ETL/trunk/ETL.pbproj/project.pbxproj deleted file mode 100755 index 1be00a6..0000000 --- a/ETL/trunk/ETL.pbproj/project.pbxproj +++ /dev/null @@ -1,3111 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 39; - objects = { - A63F3B3E054DA00200140006 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _misc.h; - path = ETL/_misc.h; - refType = 4; - sourceTree = ""; - }; - A63F3B3F054DA00200140006 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = misc; - path = ETL/misc; - refType = 4; - sourceTree = ""; - }; - A63F3B40054DA00200140006 = { - fileRef = A63F3B3E054DA00200140006; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - Private, - ); - }; - }; - A63F3B42054DA02500140006 = { - fileRef = A63F3B3F054DA00200140006; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - A64F6D24052A9DCC00140006 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _ref_count.h; - path = ETL/_ref_count.h; - refType = 4; - sourceTree = ""; - }; - A64F6D25052A9DCC00140006 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = ref_count; - path = ETL/ref_count; - refType = 4; - sourceTree = ""; - }; - A64F6D26052A9DCC00140006 = { - fileRef = A64F6D24052A9DCC00140006; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - Private, - ); - }; - }; - A64F6D28052A9DFF00140006 = { - fileRef = A64F6D25052A9DCC00140006; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - A6E2EAC007656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F588A3BC02F0CCE501000102; - remoteInfo = "ETL Framework"; - }; - A6E2EAC107656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F51307D803269B0F012F4765; - remoteInfo = "Stringf Test"; - }; - A6E2EAC207656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F5060A6702F37DEF01000102; - remoteInfo = "Fixed Test"; - }; - A6E2EAC307656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F5060A5A02F37D8501000102; - remoteInfo = "Random Test"; - }; - A6E2EAC407656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F5060A5102F37D8201000102; - remoteInfo = "Smach Test"; - }; - A6E2EAC507656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F5060A3C02F37BAC01000102; - remoteInfo = "Angle Test"; - }; - A6E2EAC607656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F5060A3602F37B5E01000102; - remoteInfo = "Handle Test"; - }; - A6E2EAC707656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F576CB6D031841EA01A80006; - remoteInfo = "Hermite Test"; - }; - A6E2EAC807656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F54AEB2B02F6899D01000102; - remoteInfo = "Clock Test"; - }; - A6E2EAC907656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F5CAA1FE031AD533012F434D; - remoteInfo = "Spline Test"; - }; - A6E2EACA07656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F588A3BC02F0CCE501000102; - remoteInfo = "ETL Framework"; - }; - A6E2EACB07656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F588A3BC02F0CCE501000102; - remoteInfo = "ETL Framework"; - }; - A6E2EACC07656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F588A3BC02F0CCE501000102; - remoteInfo = "ETL Framework"; - }; - A6E2EACD07656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F588A3BC02F0CCE501000102; - remoteInfo = "ETL Framework"; - }; - A6E2EACE07656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F588A3BC02F0CCE501000102; - remoteInfo = "ETL Framework"; - }; - A6E2EACF07656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F588A3BC02F0CCE501000102; - remoteInfo = "ETL Framework"; - }; - A6E2EAD007656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F588A3BC02F0CCE501000102; - remoteInfo = "ETL Framework"; - }; - A6E2EAD107656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F588A3BC02F0CCE501000102; - remoteInfo = "ETL Framework"; - }; - A6E2EAD207656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F588A3BC02F0CCE501000102; - remoteInfo = "ETL Framework"; - }; - A6E2EAD307656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F588A3BC02F0CCE501000102; - remoteInfo = "ETL Framework"; - }; - A6E2EAD407656757002AF736 = { - containerPortal = F550016502F0983D01000102; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = F588A3BC02F0CCE501000102; - remoteInfo = "ETL Framework"; - }; - A6E2EADC076567C1002AF736 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _rect.h; - path = ETL/_rect.h; - refType = 4; - sourceTree = ""; - }; - A6E2EADD076567C1002AF736 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _value.h; - path = ETL/_value.h; - refType = 4; - sourceTree = ""; - }; - A6E2EADE076567C1002AF736 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = rect; - path = ETL/rect; - refType = 4; - sourceTree = ""; - }; - A6E2EADF076567C1002AF736 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = value; - path = ETL/value; - refType = 4; - sourceTree = ""; - }; - A6E2EAE0076567C1002AF736 = { - fileRef = A6E2EADC076567C1002AF736; - isa = PBXBuildFile; - settings = { - }; - }; - A6E2EAE1076567C1002AF736 = { - fileRef = A6E2EADD076567C1002AF736; - isa = PBXBuildFile; - settings = { - }; - }; - A6E2EAE2076567C1002AF736 = { - fileRef = A6E2EADE076567C1002AF736; - isa = PBXBuildFile; - settings = { - }; - }; - A6E2EAE3076567C1002AF736 = { - fileRef = A6E2EADF076567C1002AF736; - isa = PBXBuildFile; - settings = { - }; - }; -//A60 -//A61 -//A62 -//A63 -//A64 -//F50 -//F51 -//F52 -//F53 -//F54 - F504527502F391C901000102 = { - buildSettings = { - COPY_PHASE_STRIP = NO; - DEBUGGING_SYMBOLS = YES; - OPTIMIZATION_CFLAGS = "-O0"; - PROFILING_CODE = YES; - }; - isa = PBXBuildStyle; - name = "Development (GCC3)"; - }; - F5060A0302F3337A01000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = etl_profile.h; - path = ETL.pbproj/etl_profile.h; - refType = 4; - sourceTree = ""; - }; - F5060A0402F3337A01000102 = { - fileRef = F5060A0302F3337A01000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F5060A0502F3366801000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = ipc; - path = ETL/ipc; - refType = 4; - sourceTree = ""; - }; - F5060A0602F3366801000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = thread; - path = ETL/thread; - refType = 4; - sourceTree = ""; - }; - F5060A0702F3366801000102 = { - fileRef = F5060A0502F3366801000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F5060A0802F3366801000102 = { - fileRef = F5060A0602F3366801000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F5060A1C02F342A901000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _angle.h; - path = ETL/_angle.h; - refType = 4; - sourceTree = ""; - }; - F5060A1D02F342A901000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _curve.h; - path = ETL/_curve.h; - refType = 4; - sourceTree = ""; - }; - F5060A1E02F342A901000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _fixed.h; - path = ETL/_fixed.h; - refType = 4; - sourceTree = ""; - }; - F5060A1F02F342A901000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _handle.h; - path = ETL/_handle.h; - refType = 4; - sourceTree = ""; - }; - F5060A2102F342A901000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _smach.h; - path = ETL/_smach.h; - refType = 4; - sourceTree = ""; - }; - F5060A2202F342A901000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _thread.h; - path = ETL/_thread.h; - refType = 4; - sourceTree = ""; - }; - F5060A2302F342A901000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _trivial.h; - path = ETL/_trivial.h; - refType = 4; - sourceTree = ""; - }; - F5060A2402F342A901000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = fixed; - path = ETL/fixed; - refType = 4; - sourceTree = ""; - }; - F5060A2502F342A901000102 = { - fileRef = F5060A1C02F342A901000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F5060A2602F342A901000102 = { - fileRef = F5060A1D02F342A901000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F5060A2702F342A901000102 = { - fileRef = F5060A1E02F342A901000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F5060A2802F342A901000102 = { - fileRef = F5060A1F02F342A901000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F5060A2A02F342A901000102 = { - fileRef = F5060A2102F342A901000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F5060A2B02F342A901000102 = { - fileRef = F5060A2202F342A901000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F5060A2C02F342A901000102 = { - fileRef = F5060A2302F342A901000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F5060A2D02F342A901000102 = { - fileRef = F5060A2402F342A901000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F5060A2E02F379BC01000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _random.h; - path = ETL/_random.h; - refType = 4; - sourceTree = ""; - }; - F5060A2F02F379BC01000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = random; - path = ETL/random; - refType = 4; - sourceTree = ""; - }; - F5060A3002F379BC01000102 = { - fileRef = F5060A2E02F379BC01000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F5060A3102F379BC01000102 = { - fileRef = F5060A2F02F379BC01000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F5060A3202F37B5E01000102 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXHeadersBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A3302F37B5E01000102 = { - buildActionMask = 2147483647; - files = ( - F5060A3B02F37BA101000102, - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A3402F37B5E01000102 = { - buildActionMask = 2147483647; - files = ( - F5060A3A02F37B6E01000102, - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A3502F37B5E01000102 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXRezBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A3602F37B5E01000102 = { - buildPhases = ( - F5060A3202F37B5E01000102, - F5060A3302F37B5E01000102, - F5060A3402F37B5E01000102, - F5060A3502F37B5E01000102, - ); - buildSettings = { - HEADER_SEARCH_PATHS = build/ETL.framework/Versions/A/Headers; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "Handle Test"; - REZ_EXECUTABLE = YES; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - }; - dependencies = ( - F5060A4602F37BCA01000102, - ); - isa = PBXToolTarget; - name = "Handle Test"; - productInstallPath = /usr/local/bin; - productName = "Handle Test"; - productReference = F5060A3702F37B5E01000102; - }; - F5060A3702F37B5E01000102 = { - explicitFileType = "compiled.mach-o.executable"; - isa = PBXFileReference; - path = "Handle Test"; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F5060A3A02F37B6E01000102 = { - fileRef = F588A3BD02F0CCE501000102; - isa = PBXBuildFile; - settings = { - }; - }; - F5060A3B02F37BA101000102 = { - fileRef = F588A3D602F0CF9101000102; - isa = PBXBuildFile; - settings = { - }; - }; - F5060A3C02F37BAC01000102 = { - buildPhases = ( - F5060A3D02F37BAC01000102, - F5060A3E02F37BAC01000102, - F5060A4002F37BAC01000102, - F5060A4202F37BAC01000102, - ); - buildSettings = { - DEBUGGING_SYMBOLS = NO; - HEADER_SEARCH_PATHS = ETL.pbproj; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "Angle Test"; - PROFILING_CODE = YES; - REZ_EXECUTABLE = YES; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - }; - dependencies = ( - F5060A4702F37BCD01000102, - ); - isa = PBXToolTarget; - name = "Angle Test"; - productInstallPath = /usr/local/bin; - productName = "Handle Test"; - productReference = F5060A4302F37BAC01000102; - }; - F5060A3D02F37BAC01000102 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXHeadersBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A3E02F37BAC01000102 = { - buildActionMask = 2147483647; - files = ( - F5060A4502F37BBA01000102, - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A4002F37BAC01000102 = { - buildActionMask = 2147483647; - files = ( - F5060A4102F37BAC01000102, - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A4102F37BAC01000102 = { - fileRef = F588A3BD02F0CCE501000102; - isa = PBXBuildFile; - settings = { - }; - }; - F5060A4202F37BAC01000102 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXRezBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A4302F37BAC01000102 = { - explicitFileType = "compiled.mach-o.executable"; - isa = PBXFileReference; - path = "Angle Test"; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F5060A4502F37BBA01000102 = { - fileRef = F5627F1902F0D1F801000102; - isa = PBXBuildFile; - settings = { - }; - }; - F5060A4602F37BCA01000102 = { - isa = PBXTargetDependency; - target = F588A3BC02F0CCE501000102; - targetProxy = A6E2EAD407656757002AF736; - }; - F5060A4702F37BCD01000102 = { - isa = PBXTargetDependency; - target = F588A3BC02F0CCE501000102; - targetProxy = A6E2EACB07656757002AF736; - }; - F5060A4802F37BDD01000102 = { - buildPhases = ( - ); - buildSettings = { - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "All Tests"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - }; - dependencies = ( - F51307E203269B1E012F4765, - F5CAA305031AEFBC012F434D, - F54AEB3502F689AD01000102, - F5CAA306031AEFC1012F434D, - F5060A4A02F37BF601000102, - F5060A4902F37BF401000102, - F5060A6502F37DD001000102, - F5060A6602F37DD201000102, - F5060A7402F37E3401000102, - ); - isa = PBXAggregateTarget; - name = "All Tests"; - productName = "All Tests"; - }; - F5060A4902F37BF401000102 = { - isa = PBXTargetDependency; - target = F5060A3C02F37BAC01000102; - targetProxy = A6E2EAC507656757002AF736; - }; - F5060A4A02F37BF601000102 = { - isa = PBXTargetDependency; - target = F5060A3602F37B5E01000102; - targetProxy = A6E2EAC607656757002AF736; - }; - F5060A4B02F37D3301000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = fixed.cpp; - path = test/fixed.cpp; - refType = 4; - sourceTree = ""; - }; - F5060A4C02F37D3301000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = random.cpp; - path = test/random.cpp; - refType = 4; - sourceTree = ""; - }; - F5060A4D02F37D3301000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = smach.cpp; - path = test/smach.cpp; - refType = 4; - sourceTree = ""; - }; - F5060A5102F37D8201000102 = { - buildPhases = ( - F5060A5202F37D8201000102, - F5060A5302F37D8201000102, - F5060A5502F37D8201000102, - F5060A5702F37D8201000102, - ); - buildSettings = { - HEADER_SEARCH_PATHS = build/ETL.framework/Versions/A/Headers; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "Smach Test"; - REZ_EXECUTABLE = YES; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - }; - dependencies = ( - F5060A7102F37E2601000102, - ); - isa = PBXToolTarget; - name = "Smach Test"; - productInstallPath = /usr/local/bin; - productName = "Handle Test"; - productReference = F5060A5802F37D8201000102; - }; - F5060A5202F37D8201000102 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXHeadersBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A5302F37D8201000102 = { - buildActionMask = 2147483647; - files = ( - F5060A6302F37DB001000102, - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A5502F37D8201000102 = { - buildActionMask = 2147483647; - files = ( - F5060A5602F37D8201000102, - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A5602F37D8201000102 = { - fileRef = F588A3BD02F0CCE501000102; - isa = PBXBuildFile; - settings = { - }; - }; - F5060A5702F37D8201000102 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXRezBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A5802F37D8201000102 = { - explicitFileType = "compiled.mach-o.executable"; - isa = PBXFileReference; - path = "Smach Test"; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F5060A5A02F37D8501000102 = { - buildPhases = ( - F5060A5B02F37D8501000102, - F5060A5C02F37D8501000102, - F5060A5E02F37D8501000102, - F5060A6002F37D8501000102, - ); - buildSettings = { - HEADER_SEARCH_PATHS = "ETL.pbproj include"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "Random Test"; - REZ_EXECUTABLE = YES; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - }; - dependencies = ( - F5060A7202F37E2901000102, - ); - isa = PBXToolTarget; - name = "Random Test"; - productInstallPath = /usr/local/bin; - productName = "Handle Test"; - productReference = F5060A6102F37D8501000102; - }; - F5060A5B02F37D8501000102 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXHeadersBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A5C02F37D8501000102 = { - buildActionMask = 2147483647; - files = ( - F5060A6402F37DB501000102, - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A5E02F37D8501000102 = { - buildActionMask = 2147483647; - files = ( - F5060A5F02F37D8501000102, - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A5F02F37D8501000102 = { - fileRef = F588A3BD02F0CCE501000102; - isa = PBXBuildFile; - settings = { - }; - }; - F5060A6002F37D8501000102 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXRezBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A6102F37D8501000102 = { - explicitFileType = "compiled.mach-o.executable"; - isa = PBXFileReference; - path = "Random Test"; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F5060A6302F37DB001000102 = { - fileRef = F5060A4D02F37D3301000102; - isa = PBXBuildFile; - settings = { - }; - }; - F5060A6402F37DB501000102 = { - fileRef = F5060A4C02F37D3301000102; - isa = PBXBuildFile; - settings = { - }; - }; - F5060A6502F37DD001000102 = { - isa = PBXTargetDependency; - target = F5060A5102F37D8201000102; - targetProxy = A6E2EAC407656757002AF736; - }; - F5060A6602F37DD201000102 = { - isa = PBXTargetDependency; - target = F5060A5A02F37D8501000102; - targetProxy = A6E2EAC307656757002AF736; - }; - F5060A6702F37DEF01000102 = { - buildPhases = ( - F5060A6802F37DEF01000102, - F5060A6902F37DEF01000102, - F5060A6B02F37DEF01000102, - F5060A6D02F37DEF01000102, - ); - buildSettings = { - HEADER_SEARCH_PATHS = "ETL.pbproj include"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "Fixed Test"; - REZ_EXECUTABLE = YES; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - }; - dependencies = ( - F5060A7302F37E2B01000102, - ); - isa = PBXToolTarget; - name = "Fixed Test"; - productInstallPath = /usr/local/bin; - productName = "Handle Test"; - productReference = F5060A6E02F37DEF01000102; - }; - F5060A6802F37DEF01000102 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXHeadersBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A6902F37DEF01000102 = { - buildActionMask = 2147483647; - files = ( - F5060A7002F37E0001000102, - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A6B02F37DEF01000102 = { - buildActionMask = 2147483647; - files = ( - F5060A6C02F37DEF01000102, - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A6C02F37DEF01000102 = { - fileRef = F588A3BD02F0CCE501000102; - isa = PBXBuildFile; - settings = { - }; - }; - F5060A6D02F37DEF01000102 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXRezBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5060A6E02F37DEF01000102 = { - explicitFileType = "compiled.mach-o.executable"; - isa = PBXFileReference; - path = "Fixed Test"; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F5060A7002F37E0001000102 = { - fileRef = F5060A4B02F37D3301000102; - isa = PBXBuildFile; - settings = { - }; - }; - F5060A7102F37E2601000102 = { - isa = PBXTargetDependency; - target = F588A3BC02F0CCE501000102; - targetProxy = A6E2EAD307656757002AF736; - }; - F5060A7202F37E2901000102 = { - isa = PBXTargetDependency; - target = F588A3BC02F0CCE501000102; - targetProxy = A6E2EACD07656757002AF736; - }; - F5060A7302F37E2B01000102 = { - isa = PBXTargetDependency; - target = F588A3BC02F0CCE501000102; - targetProxy = A6E2EACA07656757002AF736; - }; - F5060A7402F37E3401000102 = { - isa = PBXTargetDependency; - target = F5060A6702F37DEF01000102; - targetProxy = A6E2EAC207656757002AF736; - }; - F50AFD3D0370620B01A80006 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _bezier_angle.h; - path = ETL/_bezier_angle.h; - refType = 4; - sourceTree = ""; - }; - F50AFD3E0370620B01A80006 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _bezier.h; - path = ETL/_bezier.h; - refType = 4; - sourceTree = ""; - }; - F50AFD3F0370620B01A80006 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = bezier; - path = ETL/bezier; - refType = 4; - sourceTree = ""; - }; - F50AFD400370620B01A80006 = { - fileRef = F50AFD3D0370620B01A80006; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - Private, - ); - }; - }; - F50AFD410370620B01A80006 = { - fileRef = F50AFD3E0370620B01A80006; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - Private, - ); - }; - }; - F50AFD420370620B01A80006 = { - fileRef = F50AFD3F0370620B01A80006; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F50AFD490373BEC801A80006 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _status.h; - path = ETL/_status.h; - refType = 4; - sourceTree = ""; - }; - F50AFD4A0373BEC801A80006 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = status; - path = ETL/status; - refType = 4; - sourceTree = ""; - }; - F50AFD4B0373BEC801A80006 = { - fileRef = F50AFD490373BEC801A80006; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - Private, - ); - }; - }; - F50AFD4D0373BEE001A80006 = { - fileRef = F50AFD4A0373BEC801A80006; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F51305C10325EF93012F4765 = { - children = ( - F51305C20325EFB8012F4765, - F51305C70325EFB8012F4765, - ); - isa = PBXGroup; - name = "Package Files"; - refType = 4; - sourceTree = ""; - }; - F51305C20325EFB8012F4765 = { - children = ( - F51305C40325EFB8012F4765, - F5D988CB03325BFC01A80006, - F5D988CC03325BFC01A80006, - F5D988CD03325BFC01A80006, - ); - isa = PBXGroup; - name = "devel-resources"; - path = "config/pkg-support/devel-resources"; - refType = 4; - sourceTree = ""; - }; - F51305C40325EFB8012F4765 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.script.sh; - path = install.sh; - refType = 4; - sourceTree = ""; - }; - F51305C70325EFB8012F4765 = { - isa = PBXFileReference; - lastKnownFileType = text; - name = "ETL-devel.info"; - path = "config/pkg-support/ETL-devel.info"; - refType = 4; - sourceTree = ""; - }; - F513067A03266039012F4765 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.script.sh; - path = "ETL-config.in"; - refType = 4; - sourceTree = ""; - }; - F5130699032666F8012F4765 = { - buildActionMask = 2147483647; - files = ( - F51306A2032668FA012F4765, - F51306A6032668FF012F4765, - F5D988D503325CDB01A80006, - F5D988D603325CDE01A80006, - F5D988D403325CD801A80006, - ); - isa = PBXResourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F513069D032666F8012F4765 = { - buildPhases = ( - F5C1EE4903BCE00701A80006, - F513069F03266806012F4765, - F51306A00326682D012F4765, - F5130699032666F8012F4765, - F51306D203266E6A012F4765, - ); - buildSettings = { - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "ETL-devel"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - WRAPPER_EXTENSION = pkg; - }; - dependencies = ( - F51306B303266DAC012F4765, - ); - isa = PBXBundleTarget; - name = "Devel Package"; - productInstallPath = "$(USER_LIBRARY_DIR)/Bundles"; - productName = Untitled; - productReference = F513069E032666F8012F4765; - productSettingsXML = " - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - - CFBundleGetInfoString - - CFBundleIconFile - - CFBundleIdentifier - - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - - CFBundlePackageType - PKG - CFBundleShortVersionString - - CFBundleSignature - ???? - CFBundleVersion - 0.0.1d1 - - -"; - }; - F513069E032666F8012F4765 = { - explicitFileType = wrapper.cfbundle; - isa = PBXFileReference; - path = "ETL-devel.pkg"; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F513069F03266806012F4765 = { - buildActionMask = 2147483647; - dstPath = "pkg-tmp"; - dstSubfolderSpec = 16; - files = ( - F51306A1032668E7012F4765, - ); - isa = PBXCopyFilesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F51306A00326682D012F4765 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXShellScriptBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = ". config/build.cfg\n\nset -x\n\n# clean up the framework, remove extra files\nrm -rf build/pkg-tmp/ETL.framework/Resources/pbdevelopment.plist\n\n# remove the .DS_Store file to keep tool from crapping out\nrm -rf pkg-support/devel-resources/.DS_Store\n\nsed \"\ns:@_VERSION_@:$VERSION:;\ns:@_PACKAGE_@:$PACKAGE:;\ns:@_RELEASE_@:$RELEASE:;\ns:@_PACKAGE_NAME_@:$PACKAGE_NAME:;\n\" < config/pkg-support/ETL-devel.info > build/ETL-devel.info\n\n# create the .pkg\npackage build/pkg-tmp build/ETL-devel.info -d build \n\n# remove temporary files\nrm -rf build/pkg-tmp build/ETL-devel.info\n\n# compress\n(cd build; sleep 1; tar -zcvf ETL-devel.pkg.tar.gz ETL-devel.pkg)"; - }; - F51306A1032668E7012F4765 = { - fileRef = F588A3BD02F0CCE501000102; - isa = PBXBuildFile; - settings = { - }; - }; - F51306A2032668FA012F4765 = { - fileRef = F51305C40325EFB8012F4765; - isa = PBXBuildFile; - settings = { - }; - }; - F51306A6032668FF012F4765 = { - fileRef = F513067A03266039012F4765; - isa = PBXBuildFile; - settings = { - }; - }; - F51306B303266DAC012F4765 = { - isa = PBXTargetDependency; - target = F588A3BC02F0CCE501000102; - targetProxy = A6E2EAD007656757002AF736; - }; - F51306D203266E6A012F4765 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXShellScriptBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = ". config/build.cfg\n\nDIR=build/ETL-devel.pkg/Contents/Resources\n\nsed \"\ns:@_VERSION_@:$VERSION:;\ns:@_PACKAGE_@:$PACKAGE:;\ns:@_RELEASE_@:$RELEASE:;\ns:@_PACKAGE_NAME_@:$PACKAGE_NAME:;\n\" < $DIR/install.sh > $DIR/ETL-devel.post_install\ncp $DIR/ETL-devel.post_install $DIR/ETL-devel.post_upgrade\n\nrm $DIR/install.sh\n\n# add execute flag to scripts\nchmod 755 $DIR/ETL-devel.post_install $DIR/ETL-devel.post_upgrade\n"; - }; - F51307D2032699F1012F4765 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _stringf.h; - path = ETL/_stringf.h; - refType = 4; - sourceTree = ""; - }; - F51307D3032699F1012F4765 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = stringf; - path = ETL/stringf; - refType = 4; - sourceTree = ""; - }; - F51307D4032699F1012F4765 = { - fileRef = F51307D2032699F1012F4765; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - Private, - ); - }; - }; - F51307D603269AA2012F4765 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = stringf.cpp; - path = test/stringf.cpp; - refType = 4; - sourceTree = ""; - }; - F51307D803269B0F012F4765 = { - buildPhases = ( - F51307DA03269B0F012F4765, - F51307DB03269B0F012F4765, - F51307DD03269B0F012F4765, - F51307DF03269B0F012F4765, - ); - buildSettings = { - HEADER_SEARCH_PATHS = "ETL.pbproj include"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "Stringf Test"; - REZ_EXECUTABLE = YES; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - }; - dependencies = ( - F51307D903269B0F012F4765, - ); - isa = PBXToolTarget; - name = "Stringf Test"; - productInstallPath = /usr/local/bin; - productName = "Handle Test"; - productReference = F51307E003269B0F012F4765; - }; - F51307D903269B0F012F4765 = { - isa = PBXTargetDependency; - target = F588A3BC02F0CCE501000102; - targetProxy = A6E2EAD107656757002AF736; - }; - F51307DA03269B0F012F4765 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXHeadersBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F51307DB03269B0F012F4765 = { - buildActionMask = 2147483647; - files = ( - F51307E503269DBE012F4765, - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F51307DD03269B0F012F4765 = { - buildActionMask = 2147483647; - files = ( - F51307DE03269B0F012F4765, - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F51307DE03269B0F012F4765 = { - fileRef = F588A3BD02F0CCE501000102; - isa = PBXBuildFile; - settings = { - }; - }; - F51307DF03269B0F012F4765 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXRezBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F51307E003269B0F012F4765 = { - explicitFileType = "compiled.mach-o.executable"; - isa = PBXFileReference; - path = "Stringf Test"; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F51307E203269B1E012F4765 = { - isa = PBXTargetDependency; - target = F51307D803269B0F012F4765; - targetProxy = A6E2EAC107656757002AF736; - }; - F51307E403269DA6012F4765 = { - fileRef = F51307D3032699F1012F4765; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F51307E503269DBE012F4765 = { - fileRef = F51307D603269AA2012F4765; - isa = PBXBuildFile; - settings = { - }; - }; - F51307F90326A75C012F4765 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = ETL.m4; - path = config/ETL.m4; - refType = 4; - sourceTree = ""; - }; - F51307FA0326A75C012F4765 = { - fileRef = F51307F90326A75C012F4765; - isa = PBXBuildFile; - settings = { - }; - }; - F519539B0332717E01A80006 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXShellScriptBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/bash; - shellScript = ". config/build.cfg\nset -x\nexport FRAMEWORK_VERSION=$VERSION\n"; - }; - F51F41DF02FF6A8F010001CC = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _condition.h; - path = ETL/_condition.h; - refType = 4; - sourceTree = ""; - }; - F51F41E002FF6A8F010001CC = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _mutex_pthreads.h; - path = ETL/_mutex_pthreads.h; - refType = 4; - sourceTree = ""; - }; - F51F41E102FF6A8F010001CC = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _mutex_win32.h; - path = ETL/_mutex_win32.h; - refType = 4; - sourceTree = ""; - }; - F51F41E202FF6A8F010001CC = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _rwlock.h; - path = ETL/_rwlock.h; - refType = 4; - sourceTree = ""; - }; - F51F41E302FF6A8F010001CC = { - fileRef = F51F41DF02FF6A8F010001CC; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F51F41E402FF6A8F010001CC = { - fileRef = F51F41E002FF6A8F010001CC; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F51F41E502FF6A8F010001CC = { - fileRef = F51F41E102FF6A8F010001CC; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F51F41E602FF6A8F010001CC = { - fileRef = F51F41E202FF6A8F010001CC; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F51F41E702FF71F6010001CC = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _surface.h; - path = ETL/_surface.h; - refType = 4; - sourceTree = ""; - }; - F51F41E802FF71F6010001CC = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = surface; - path = ETL/surface; - refType = 4; - sourceTree = ""; - }; - F51F41E902FF71F6010001CC = { - fileRef = F51F41E702FF71F6010001CC; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F51F41EA02FF71F6010001CC = { - fileRef = F51F41E802FF71F6010001CC; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F51F41EB02FFBD64010001CC = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _bit_rotate.h; - path = ETL/_bit_rotate.h; - refType = 4; - sourceTree = ""; - }; - F51F41EC02FFBD64010001CC = { - fileRef = F51F41EB02FFBD64010001CC; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F54A063F030DA3DD01CC8267 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _fastangle_tables.h; - path = ETL/_fastangle_tables.h; - refType = 4; - sourceTree = ""; - }; - F54A0640030DA3DD01CC8267 = { - fileRef = F54A063F030DA3DD01CC8267; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F54A06CF030DE8A501CC8267 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = fastangle; - path = ETL/fastangle; - refType = 4; - sourceTree = ""; - }; - F54A06D0030DE8A501CC8267 = { - fileRef = F54A06CF030DE8A501CC8267; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F54A06D5030E4BCE01CC8267 = { - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O1"; - PROFILING_CODE = NO; - }; - isa = PBXBuildStyle; - name = "Slight Optimization"; - }; - F54AEAE202F6374901000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _clock_base.h; - path = ETL/_clock_base.h; - refType = 4; - sourceTree = ""; - }; - F54AEAE302F6374901000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = clock; - path = ETL/clock; - refType = 4; - sourceTree = ""; - }; - F54AEAE402F6374901000102 = { - fileRef = F54AEAE202F6374901000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F54AEAE502F6374901000102 = { - fileRef = F54AEAE302F6374901000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F54AEB2702F6785101000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _clock_system.h; - path = ETL/_clock_system.h; - refType = 4; - sourceTree = ""; - }; - F54AEB2802F6785101000102 = { - fileRef = F54AEB2702F6785101000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F54AEB2902F6793801000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _clock_gettimeofday.h; - path = ETL/_clock_gettimeofday.h; - refType = 4; - sourceTree = ""; - }; - F54AEB2A02F6793801000102 = { - fileRef = F54AEB2902F6793801000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F54AEB2B02F6899D01000102 = { - buildPhases = ( - F54AEB2C02F6899D01000102, - F54AEB2D02F6899D01000102, - F54AEB2F02F6899D01000102, - F54AEB3102F6899D01000102, - ); - buildSettings = { - HEADER_SEARCH_PATHS = ETL.pbproj; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "Clock Test"; - REZ_EXECUTABLE = YES; - SECTORDER_FLAGS = ""; - USE_GCC3_PFE_SUPPORT = YES; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - }; - dependencies = ( - F54AEB3402F689A901000102, - ); - isa = PBXToolTarget; - name = "Clock Test"; - productInstallPath = /usr/local/bin; - productName = "Handle Test"; - productReference = F54AEB3202F6899D01000102; - }; - F54AEB2C02F6899D01000102 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXHeadersBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F54AEB2D02F6899D01000102 = { - buildActionMask = 2147483647; - files = ( - F54AEB3702F689C801000102, - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F54AEB2F02F6899D01000102 = { - buildActionMask = 2147483647; - files = ( - F54AEB3002F6899D01000102, - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F54AEB3002F6899D01000102 = { - fileRef = F588A3BD02F0CCE501000102; - isa = PBXBuildFile; - settings = { - }; - }; - F54AEB3102F6899D01000102 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXRezBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F54AEB3202F6899D01000102 = { - explicitFileType = "compiled.mach-o.executable"; - isa = PBXFileReference; - path = "Clock Test"; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F54AEB3402F689A901000102 = { - isa = PBXTargetDependency; - target = F588A3BC02F0CCE501000102; - targetProxy = A6E2EACF07656757002AF736; - }; - F54AEB3502F689AD01000102 = { - isa = PBXTargetDependency; - target = F54AEB2B02F6899D01000102; - targetProxy = A6E2EAC807656757002AF736; - }; - F54AEB3602F689C801000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = clock.cpp; - path = test/clock.cpp; - refType = 4; - sourceTree = ""; - }; - F54AEB3702F689C801000102 = { - fileRef = F54AEB3602F689C801000102; - isa = PBXBuildFile; - settings = { - }; - }; - F54AEB3802F68F8D01000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _fastangle.h; - path = ETL/_fastangle.h; - refType = 4; - sourceTree = ""; - }; - F54AEB3902F68F8D01000102 = { - fileRef = F54AEB3802F68F8D01000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F550016102F0983D01000102 = { - children = ( - F51305C10325EF93012F4765, - F550017202F0ABE401000102, - F550017302F0ABFA01000102, - F588A3BE02F0CCE501000102, - F550016802F0987601000102, - F550016A02F0987601000102, - F550016B02F0987601000102, - F550016C02F0987601000102, - F550016E02F09B9701000102, - F550017102F0A69401000102, - F588A3B502F0C38001000102, - F513067A03266039012F4765, - F51307F90326A75C012F4765, - ); - isa = PBXGroup; - refType = 4; - sourceTree = ""; - }; - F550016302F0983D01000102 = { - buildSettings = { - COPY_PHASE_STRIP = NO; - DEBUGGING_SYMBOLS = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - OPTIMIZATION_CFLAGS = "-O0"; - PROFILING_CODE = YES; - ZERO_LINK = YES; - }; - isa = PBXBuildStyle; - name = Development; - }; - F550016402F0983D01000102 = { - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O3 -ffast-math"; - PROFILING_CODE = NO; - }; - isa = PBXBuildStyle; - name = "Deployment (GCC3)"; - }; - F550016502F0983D01000102 = { - buildSettings = { - }; - buildStyles = ( - F550016302F0983D01000102, - F504527502F391C901000102, - F550016402F0983D01000102, - F54A06D5030E4BCE01CC8267, - ); - hasScannedForEncodings = 1; - isa = PBXProject; - mainGroup = F550016102F0983D01000102; - productRefGroup = F588A3BE02F0CCE501000102; - projectDirPath = ""; - targets = ( - F588A3BC02F0CCE501000102, - F5060A4802F37BDD01000102, - F5060A3602F37B5E01000102, - F5060A3C02F37BAC01000102, - F5060A5102F37D8201000102, - F5060A5A02F37D8501000102, - F5060A6702F37DEF01000102, - F54AEB2B02F6899D01000102, - F576CB6D031841EA01A80006, - F5CAA1FE031AD533012F434D, - F513069D032666F8012F4765, - F51307D803269B0F012F4765, - F58D9F85037F146301A80006, - F58D9F8F037F14FE01A80006, - ); - }; - F550016A02F0987601000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - path = INSTALL; - refType = 4; - sourceTree = ""; - }; - F550016B02F0987601000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - path = Makefile.am; - refType = 4; - sourceTree = ""; - }; - F550016C02F0987601000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - path = README; - refType = 4; - sourceTree = ""; - }; - F550016E02F09B9701000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = build.cfg; - path = config/build.cfg; - refType = 4; - sourceTree = ""; - }; - F550017102F0A69401000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = project.spec.in; - path = config/project.spec.in; - refType = 4; - sourceTree = ""; - }; - F550017202F0ABE401000102 = { - children = ( - F5CAA30A031AF0E1012F434D, - F550017402F0AC5701000102, - F55001B702F0B61101000102, - F5060A0302F3337A01000102, - F54A063F030DA3DD01CC8267, - F5060A1C02F342A901000102, - A6E2EADC076567C1002AF736, - A6E2EADD076567C1002AF736, - A6E2EADE076567C1002AF736, - A6E2EADF076567C1002AF736, - F54AEB3802F68F8D01000102, - F5060A1D02F342A901000102, - F5060A1E02F342A901000102, - F5060A1F02F342A901000102, - F5060A2102F342A901000102, - F5060A2202F342A901000102, - F5060A2302F342A901000102, - F51F41EB02FFBD64010001CC, - F5060A2E02F379BC01000102, - F54AEAE202F6374901000102, - F54AEB2702F6785101000102, - F54AEB2902F6793801000102, - F5CAA1EF031AB630012F434D, - F51F41E002FF6A8F010001CC, - F51F41E102FF6A8F010001CC, - F5CAA1F2031AB74F012F434D, - F51F41DF02FF6A8F010001CC, - F51F41E202FF6A8F010001CC, - F51F41E702FF71F6010001CC, - F579DD9A0315B65001682FCB, - F579DD9E0315C9F001682FCB, - F5CAA1F4031AB947012F434D, - F5CAA1F9031AD342012F434D, - F51307D2032699F1012F4765, - F50AFD3D0370620B01A80006, - F50AFD3E0370620B01A80006, - F50AFD490373BEC801A80006, - F58D9F76037F141A01A80006, - F58D9F77037F141A01A80006, - F58D9F78037F141A01A80006, - F5D51DF00399C74801A80006, - A64F6D24052A9DCC00140006, - A63F3B3E054DA00200140006, - A64F6D25052A9DCC00140006, - F5D51DF10399C74801A80006, - F5060A2402F342A901000102, - F588A3D202F0CDCC01000102, - F588A3D302F0CDCC01000102, - F5060A0502F3366801000102, - F5060A0602F3366801000102, - F5060A2F02F379BC01000102, - F54AEAE302F6374901000102, - F51F41E802FF71F6010001CC, - F54A06CF030DE8A501CC8267, - F579DD9B0315B65001682FCB, - F5CAA1ED031AB61C012F434D, - F5CAA1F5031AB947012F434D, - F5CAA1FB031AD4E7012F434D, - F51307D3032699F1012F4765, - F5EDFAE8032D514001A80082, - F50AFD3F0370620B01A80006, - F50AFD4A0373BEC801A80006, - F58D9F79037F141A01A80006, - F58D9F7A037F141A01A80006, - F58D9F7B037F141A01A80006, - A63F3B3F054DA00200140006, - ); - isa = PBXGroup; - name = "ETL Source"; - refType = 4; - sourceTree = ""; - }; - F550017302F0ABFA01000102 = { - children = ( - F550017502F0AC6D01000102, - F588A3D602F0CF9101000102, - F5627F1902F0D1F801000102, - F5060A4B02F37D3301000102, - F5060A4C02F37D3301000102, - F5060A4D02F37D3301000102, - F54AEB3602F689C801000102, - F576CB6B0318419101A80006, - F5CAA208031AD56B012F434D, - F51307D603269AA2012F4765, - F58D9F98037F154401A80006, - ); - isa = PBXGroup; - name = "Test Sources"; - path = ""; - refType = 4; - sourceTree = ""; - }; - F550017402F0AC5701000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = Makefile.am; - path = ETL/Makefile.am; - refType = 4; - sourceTree = ""; - }; - F550017502F0AC6D01000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = Makefile.am; - path = test/Makefile.am; - refType = 4; - sourceTree = ""; - }; - F55001B702F0B61101000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = etl_config.h; - path = ETL/etl_config.h; - refType = 4; - sourceTree = ""; - }; - F5627F1902F0D1F801000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = angle.cpp; - path = test/angle.cpp; - refType = 4; - sourceTree = ""; - }; - F576CB6B0318419101A80006 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = hermite.cpp; - path = test/hermite.cpp; - refType = 4; - sourceTree = ""; - }; - F576CB6D031841EA01A80006 = { - buildPhases = ( - F576CB6F031841EA01A80006, - F576CB70031841EA01A80006, - F576CB72031841EA01A80006, - F576CB74031841EA01A80006, - ); - buildSettings = { - HEADER_SEARCH_PATHS = "ETL.pbproj include"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "Hermite Test"; - REZ_EXECUTABLE = YES; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - }; - dependencies = ( - F576CB6E031841EA01A80006, - ); - isa = PBXToolTarget; - name = "Hermite Test"; - productInstallPath = /usr/local/bin; - productName = "Handle Test"; - productReference = F576CB75031841EA01A80006; - }; - F576CB6E031841EA01A80006 = { - isa = PBXTargetDependency; - target = F588A3BC02F0CCE501000102; - targetProxy = A6E2EACC07656757002AF736; - }; - F576CB6F031841EA01A80006 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXHeadersBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F576CB70031841EA01A80006 = { - buildActionMask = 2147483647; - files = ( - F576CB780318421D01A80006, - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F576CB72031841EA01A80006 = { - buildActionMask = 2147483647; - files = ( - F576CB73031841EA01A80006, - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F576CB73031841EA01A80006 = { - fileRef = F588A3BD02F0CCE501000102; - isa = PBXBuildFile; - settings = { - }; - }; - F576CB74031841EA01A80006 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXRezBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F576CB75031841EA01A80006 = { - explicitFileType = "compiled.mach-o.executable"; - isa = PBXFileReference; - path = "Hermite Test"; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F576CB780318421D01A80006 = { - fileRef = F576CB6B0318419101A80006; - isa = PBXBuildFile; - settings = { - }; - }; - F579DD9A0315B65001682FCB = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _hermite.h; - path = ETL/_hermite.h; - refType = 4; - sourceTree = ""; - }; - F579DD9B0315B65001682FCB = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = hermite; - path = ETL/hermite; - refType = 4; - sourceTree = ""; - }; - F579DD9C0315B65001682FCB = { - fileRef = F579DD9A0315B65001682FCB; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F579DD9D0315B65001682FCB = { - fileRef = F579DD9B0315B65001682FCB; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F579DD9E0315C9F001682FCB = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _curve_func.h; - path = ETL/_curve_func.h; - refType = 4; - sourceTree = ""; - }; - F579DD9F0315C9F001682FCB = { - fileRef = F579DD9E0315C9F001682FCB; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F588A3B502F0C38001000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = configure.ac; - path = config/configure.ac; - refType = 4; - sourceTree = ""; - }; - F588A3B702F0CCE501000102 = { - buildActionMask = 2147483647; - files = ( - F588A3D402F0CDCC01000102, - F5060A0702F3366801000102, - F5060A0802F3366801000102, - F588A3D502F0CDCC01000102, - F5060A2D02F342A901000102, - F5060A3102F379BC01000102, - F54AEAE502F6374901000102, - F51F41EA02FF71F6010001CC, - F54A06D0030DE8A501CC8267, - F579DD9D0315B65001682FCB, - F5CAA1F1031AB64F012F434D, - F5CAA1F8031AB957012F434D, - F5CAA1FD031AD509012F434D, - F51307E403269DA6012F4765, - F5EDFAEA032D516D01A80082, - F50AFD420370620B01A80006, - F50AFD4D0373BEE001A80006, - F58D9F82037F144701A80006, - F58D9F83037F144901A80006, - F58D9F84037F144C01A80006, - F5D51DF40399C7C201A80006, - A64F6D28052A9DFF00140006, - A63F3B42054DA02500140006, - F588A3C502F0CCF701000102, - F5060A0402F3337A01000102, - F5060A2502F342A901000102, - F5060A2602F342A901000102, - F5060A2702F342A901000102, - F5060A2802F342A901000102, - F5060A2A02F342A901000102, - F5060A2B02F342A901000102, - F5060A2C02F342A901000102, - F5060A3002F379BC01000102, - F54AEAE402F6374901000102, - F54AEB2802F6785101000102, - F54AEB2A02F6793801000102, - F54AEB3902F68F8D01000102, - F51F41E302FF6A8F010001CC, - F51F41E402FF6A8F010001CC, - F51F41E502FF6A8F010001CC, - F51F41E602FF6A8F010001CC, - F51F41E902FF71F6010001CC, - F51F41EC02FFBD64010001CC, - F54A0640030DA3DD01CC8267, - F579DD9C0315B65001682FCB, - F579DD9F0315C9F001682FCB, - F5CAA1F0031AB630012F434D, - F5CAA1F3031AB74F012F434D, - F5CAA1F6031AB947012F434D, - F5CAA1FA031AD342012F434D, - F51307D4032699F1012F4765, - F50AFD400370620B01A80006, - F50AFD410370620B01A80006, - F50AFD4B0373BEC801A80006, - F58D9F7C037F141A01A80006, - F58D9F7D037F141A01A80006, - F58D9F7E037F141A01A80006, - F5D51DF20399C74801A80006, - A64F6D26052A9DCC00140006, - A63F3B40054DA00200140006, - A6E2EAE0076567C1002AF736, - A6E2EAE1076567C1002AF736, - ); - isa = PBXHeadersBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F588A3B802F0CCE501000102 = { - buildActionMask = 2147483647; - files = ( - F51307FA0326A75C012F4765, - F5D988CE03325BFC01A80006, - F5D988CF03325BFC01A80006, - F5D988D003325BFC01A80006, - A6E2EAE2076567C1002AF736, - A6E2EAE3076567C1002AF736, - ); - isa = PBXResourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F588A3B902F0CCE501000102 = { - buildActionMask = 2147483647; - files = ( - F5CAA30B031AF0E1012F434D, - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F588A3BA02F0CCE501000102 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F588A3BB02F0CCE501000102 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXRezBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F588A3BC02F0CCE501000102 = { - buildPhases = ( - F519539B0332717E01A80006, - F588A3B702F0CCE501000102, - F588A3B802F0CCE501000102, - F588A3B902F0CCE501000102, - F588A3BA02F0CCE501000102, - F588A3BB02F0CCE501000102, - ); - buildSettings = { - DEBUGGING_SYMBOLS = NO; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - FRAMEWORK_VERSION = A; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOL_FLAGS = "-static"; - OTHER_REZFLAGS = ""; - PRINCIPAL_CLASS = ""; - PRODUCT_NAME = ETL; - SECTORDER_FLAGS = ""; - USE_GCC3_PFE_SUPPORT = YES; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - WRAPPER_EXTENSION = framework; - }; - dependencies = ( - ); - isa = PBXFrameworkTarget; - name = "ETL Framework"; - productInstallPath = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - productName = ETL; - productReference = F588A3BD02F0CCE501000102; - productSettingsXML = " - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - - CFBundleGetInfoString - - CFBundleIconFile - - CFBundleIdentifier - - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - - CFBundlePackageType - FMWK - CFBundleShortVersionString - - CFBundleSignature - ???? - CFBundleVersion - 0.0.1d1 - - -"; - }; - F588A3BD02F0CCE501000102 = { - explicitFileType = wrapper.framework; - isa = PBXFileReference; - path = ETL.framework; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F588A3BE02F0CCE501000102 = { - children = ( - F513069E032666F8012F4765, - F588A3BD02F0CCE501000102, - F5060A3702F37B5E01000102, - F5060A4302F37BAC01000102, - F5060A5802F37D8201000102, - F5060A6102F37D8501000102, - F5060A6E02F37DEF01000102, - F54AEB3202F6899D01000102, - F576CB75031841EA01A80006, - F5CAA206031AD533012F434D, - F51307E003269B0F012F4765, - F58D9F8D037F146301A80006, - F58D9F96037F14FE01A80006, - ); - isa = PBXGroup; - name = Products; - path = ""; - refType = 4; - sourceTree = ""; - }; - F588A3C502F0CCF701000102 = { - fileRef = F55001B702F0B61101000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F588A3D202F0CDCC01000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = angle; - path = ETL/angle; - refType = 4; - sourceTree = ""; - }; - F588A3D302F0CDCC01000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = handle; - path = ETL/handle; - refType = 4; - sourceTree = ""; - }; - F588A3D402F0CDCC01000102 = { - fileRef = F588A3D202F0CDCC01000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F588A3D502F0CDCC01000102 = { - fileRef = F588A3D302F0CDCC01000102; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F588A3D602F0CF9101000102 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = handle.cpp; - path = test/handle.cpp; - refType = 4; - sourceTree = ""; - }; - F58D9F76037F141A01A80006 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _boxblur.h; - path = ETL/_boxblur.h; - refType = 4; - sourceTree = ""; - }; - F58D9F77037F141A01A80006 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _gaussian.h; - path = ETL/_gaussian.h; - refType = 4; - sourceTree = ""; - }; - F58D9F78037F141A01A80006 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _pen.h; - path = ETL/_pen.h; - refType = 4; - sourceTree = ""; - }; - F58D9F79037F141A01A80006 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = boxblur; - path = ETL/boxblur; - refType = 4; - sourceTree = ""; - }; - F58D9F7A037F141A01A80006 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = gaussian; - path = ETL/gaussian; - refType = 4; - sourceTree = ""; - }; - F58D9F7B037F141A01A80006 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = pen; - path = ETL/pen; - refType = 4; - sourceTree = ""; - }; - F58D9F7C037F141A01A80006 = { - fileRef = F58D9F76037F141A01A80006; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - Private, - ); - }; - }; - F58D9F7D037F141A01A80006 = { - fileRef = F58D9F77037F141A01A80006; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - Private, - ); - }; - }; - F58D9F7E037F141A01A80006 = { - fileRef = F58D9F78037F141A01A80006; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - Private, - ); - }; - }; - F58D9F82037F144701A80006 = { - fileRef = F58D9F79037F141A01A80006; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F58D9F83037F144901A80006 = { - fileRef = F58D9F7A037F141A01A80006; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F58D9F84037F144C01A80006 = { - fileRef = F58D9F7B037F141A01A80006; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F58D9F85037F146301A80006 = { - buildPhases = ( - F58D9F87037F146301A80006, - F58D9F88037F146301A80006, - F58D9F8A037F146301A80006, - F58D9F8C037F146301A80006, - ); - buildSettings = { - HEADER_SEARCH_PATHS = "ETL.pbproj include"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "Pen Test"; - REZ_EXECUTABLE = YES; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - }; - dependencies = ( - F58D9F86037F146301A80006, - ); - isa = PBXToolTarget; - name = "Pen Test"; - productInstallPath = /usr/local/bin; - productName = "Handle Test"; - productReference = F58D9F8D037F146301A80006; - }; - F58D9F86037F146301A80006 = { - isa = PBXTargetDependency; - target = F588A3BC02F0CCE501000102; - targetProxy = A6E2EACE07656757002AF736; - }; - F58D9F87037F146301A80006 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXHeadersBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F58D9F88037F146301A80006 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F58D9F8A037F146301A80006 = { - buildActionMask = 2147483647; - files = ( - F58D9F8B037F146301A80006, - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F58D9F8B037F146301A80006 = { - fileRef = F588A3BD02F0CCE501000102; - isa = PBXBuildFile; - settings = { - }; - }; - F58D9F8C037F146301A80006 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXRezBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F58D9F8D037F146301A80006 = { - explicitFileType = "compiled.mach-o.executable"; - isa = PBXFileReference; - path = "Pen Test"; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F58D9F8F037F14FE01A80006 = { - buildPhases = ( - F58D9F91037F14FE01A80006, - F58D9F92037F14FE01A80006, - F58D9F93037F14FE01A80006, - F58D9F95037F14FE01A80006, - ); - buildSettings = { - HEADER_SEARCH_PATHS = "ETL.pbproj include"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "Surface Test"; - REZ_EXECUTABLE = YES; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - }; - dependencies = ( - F58D9F90037F14FE01A80006, - ); - isa = PBXToolTarget; - name = "Surface Test"; - productInstallPath = /usr/local/bin; - productName = "Handle Test"; - productReference = F58D9F96037F14FE01A80006; - }; - F58D9F90037F14FE01A80006 = { - isa = PBXTargetDependency; - target = F588A3BC02F0CCE501000102; - targetProxy = A6E2EAD207656757002AF736; - }; - F58D9F91037F14FE01A80006 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXHeadersBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F58D9F92037F14FE01A80006 = { - buildActionMask = 2147483647; - files = ( - F58D9F9A037F154D01A80006, - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F58D9F93037F14FE01A80006 = { - buildActionMask = 2147483647; - files = ( - F58D9F94037F14FE01A80006, - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F58D9F94037F14FE01A80006 = { - fileRef = F588A3BD02F0CCE501000102; - isa = PBXBuildFile; - settings = { - }; - }; - F58D9F95037F14FE01A80006 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXRezBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F58D9F96037F14FE01A80006 = { - explicitFileType = "compiled.mach-o.executable"; - isa = PBXFileReference; - path = "Surface Test"; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F58D9F98037F154401A80006 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = surface.cpp; - path = test/surface.cpp; - refType = 4; - sourceTree = ""; - }; - F58D9F9A037F154D01A80006 = { - fileRef = F58D9F98037F154401A80006; - isa = PBXBuildFile; - settings = { - }; - }; - F5C1EE4903BCE00701A80006 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXShellScriptBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "rm -fr ETL-devel.pkg"; - }; - F5CAA1ED031AB61C012F434D = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = smach; - path = ETL/smach; - refType = 4; - sourceTree = ""; - }; - F5CAA1EF031AB630012F434D = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _clock_win32hpcount.h; - path = ETL/_clock_win32hpcount.h; - refType = 4; - sourceTree = ""; - }; - F5CAA1F0031AB630012F434D = { - fileRef = F5CAA1EF031AB630012F434D; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F5CAA1F1031AB64F012F434D = { - fileRef = F5CAA1ED031AB61C012F434D; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F5CAA1F2031AB74F012F434D = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _mutex_null.h; - path = ETL/_mutex_null.h; - refType = 4; - sourceTree = ""; - }; - F5CAA1F3031AB74F012F434D = { - fileRef = F5CAA1F2031AB74F012F434D; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F5CAA1F4031AB947012F434D = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _calculus.h; - path = ETL/_calculus.h; - refType = 4; - sourceTree = ""; - }; - F5CAA1F5031AB947012F434D = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = calculus; - path = ETL/calculus; - refType = 4; - sourceTree = ""; - }; - F5CAA1F6031AB947012F434D = { - fileRef = F5CAA1F4031AB947012F434D; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F5CAA1F8031AB957012F434D = { - fileRef = F5CAA1F5031AB947012F434D; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F5CAA1F9031AD342012F434D = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _bspline.h; - path = ETL/_bspline.h; - refType = 4; - sourceTree = ""; - }; - F5CAA1FA031AD342012F434D = { - fileRef = F5CAA1F9031AD342012F434D; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Private, - Public, - ); - }; - }; - F5CAA1FB031AD4E7012F434D = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = spline; - path = ETL/spline; - refType = 4; - sourceTree = ""; - }; - F5CAA1FD031AD509012F434D = { - fileRef = F5CAA1FB031AD4E7012F434D; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F5CAA1FE031AD533012F434D = { - buildPhases = ( - F5CAA200031AD533012F434D, - F5CAA201031AD533012F434D, - F5CAA203031AD533012F434D, - F5CAA205031AD533012F434D, - ); - buildSettings = { - HEADER_SEARCH_PATHS = "ETL.pbproj include"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "Spline Test"; - REZ_EXECUTABLE = YES; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - }; - dependencies = ( - F5CAA1FF031AD533012F434D, - ); - isa = PBXToolTarget; - name = "Spline Test"; - productInstallPath = /usr/local/bin; - productName = "Handle Test"; - productReference = F5CAA206031AD533012F434D; - }; - F5CAA1FF031AD533012F434D = { - isa = PBXTargetDependency; - target = F588A3BC02F0CCE501000102; - targetProxy = A6E2EAC007656757002AF736; - }; - F5CAA200031AD533012F434D = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXHeadersBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5CAA201031AD533012F434D = { - buildActionMask = 2147483647; - files = ( - F5CAA209031AD56B012F434D, - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5CAA203031AD533012F434D = { - buildActionMask = 2147483647; - files = ( - F5CAA204031AD533012F434D, - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5CAA204031AD533012F434D = { - fileRef = F588A3BD02F0CCE501000102; - isa = PBXBuildFile; - settings = { - }; - }; - F5CAA205031AD533012F434D = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXRezBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - F5CAA206031AD533012F434D = { - explicitFileType = "compiled.mach-o.executable"; - isa = PBXFileReference; - path = "Spline Test"; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - F5CAA208031AD56B012F434D = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = spline.cpp; - path = test/spline.cpp; - refType = 4; - sourceTree = ""; - }; - F5CAA209031AD56B012F434D = { - fileRef = F5CAA208031AD56B012F434D; - isa = PBXBuildFile; - settings = { - }; - }; - F5CAA305031AEFBC012F434D = { - isa = PBXTargetDependency; - target = F5CAA1FE031AD533012F434D; - targetProxy = A6E2EAC907656757002AF736; - }; - F5CAA306031AEFC1012F434D = { - isa = PBXTargetDependency; - target = F576CB6D031841EA01A80006; - targetProxy = A6E2EAC707656757002AF736; - }; - F5CAA30A031AF0E1012F434D = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = frameworkfix.cpp; - path = ETL.pbproj/frameworkfix.cpp; - refType = 4; - sourceTree = ""; - }; - F5CAA30B031AF0E1012F434D = { - fileRef = F5CAA30A031AF0E1012F434D; - isa = PBXBuildFile; - settings = { - }; - }; - F5D51DF00399C74801A80006 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = _smart_ptr.h; - path = ETL/_smart_ptr.h; - refType = 4; - sourceTree = ""; - }; - F5D51DF10399C74801A80006 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = smart_ptr; - path = ETL/smart_ptr; - refType = 4; - sourceTree = ""; - }; - F5D51DF20399C74801A80006 = { - fileRef = F5D51DF00399C74801A80006; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - Private, - ); - }; - }; - F5D51DF40399C7C201A80006 = { - fileRef = F5D51DF10399C74801A80006; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - F5D988CB03325BFC01A80006 = { - isa = PBXFileReference; - lastKnownFileType = text.rtf; - path = License.rtf; - refType = 4; - sourceTree = ""; - }; - F5D988CC03325BFC01A80006 = { - isa = PBXFileReference; - lastKnownFileType = text.rtf; - path = ReadMe.rtf; - refType = 4; - sourceTree = ""; - }; - F5D988CD03325BFC01A80006 = { - isa = PBXFileReference; - lastKnownFileType = text.rtf; - path = Welcome.rtf; - refType = 4; - sourceTree = ""; - }; - F5D988CE03325BFC01A80006 = { - fileRef = F5D988CB03325BFC01A80006; - isa = PBXBuildFile; - settings = { - }; - }; - F5D988CF03325BFC01A80006 = { - fileRef = F5D988CC03325BFC01A80006; - isa = PBXBuildFile; - settings = { - }; - }; - F5D988D003325BFC01A80006 = { - fileRef = F5D988CD03325BFC01A80006; - isa = PBXBuildFile; - settings = { - }; - }; - F5D988D403325CD801A80006 = { - fileRef = F5D988CD03325BFC01A80006; - isa = PBXBuildFile; - settings = { - }; - }; - F5D988D503325CDB01A80006 = { - fileRef = F5D988CC03325BFC01A80006; - isa = PBXBuildFile; - settings = { - }; - }; - F5D988D603325CDE01A80006 = { - fileRef = F5D988CB03325BFC01A80006; - isa = PBXBuildFile; - settings = { - }; - }; - F5EDFAE8032D514001A80082 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text; - name = trivial; - path = ETL/trivial; - refType = 4; - sourceTree = ""; - }; - F5EDFAEA032D516D01A80082 = { - fileRef = F5EDFAE8032D514001A80082; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Public, - ); - }; - }; - }; - rootObject = F550016502F0983D01000102; -} diff --git a/ETL/trunk/ETL.pc.in b/ETL/trunk/ETL.pc.in deleted file mode 100644 index 93c32bf..0000000 --- a/ETL/trunk/ETL.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: @PACKAGE_TARNAME@ -Description: @PACKAGE_NAME@ -Requires: -Version: @VERSION@ -Libs: @LIBS@ -Cflags: -I${includedir} diff --git a/ETL/trunk/ETL.prj b/ETL/trunk/ETL.prj deleted file mode 100644 index f7fd779..0000000 --- a/ETL/trunk/ETL.prj +++ /dev/null @@ -1,169 +0,0 @@ -# Anjuta Version 1.2.0 -Compatibility Level: 1 - - -Extended Template library - - - - - - - - - - - - - - - - - - - -props.file.type=project - -anjuta.version=1.2.0 -anjuta.compatibility.level=1 - -project.name=ETL -project.type=GENERIC -project.target.type=EXECUTABLE -project.version=0.99 -project.author=Robert Quattlebaum -project.source.target=unknown -project.has.gettext=0 -project.gui.command= -project.programming.language=C++ -project.excluded.modules=intl - -project.config.extra.modules.before= -project.config.extra.modules.after= -project.config.blocked=1 -project.config.disable.overwriting=1 1 1 1 1 1 1 1 1 - -project.menu.entry=ETL Version 0.99 -project.menu.group=Application -project.menu.comment=ETL Version 0.99 -project.menu.icon= -project.menu.need.terminal=0 - -project.configure.options= -anjuta.program.arguments= -preferences.build.option.jobs=0 -preferences.build.option.silent=0 -preferences.build.option.autosave=0 -preferences.anjuta.make.options=-k -preferences.make=make -preferences.build.option.keep.going=1 -preferences.build.option.warn.undef=0 -preferences.autoformat.custom.style= -i8 -sc -bli0 -bl0 -cbi0 -ss -preferences.indent.opening=0 -preferences.autoformat.disable=1 -preferences.indent.automatic=1 -preferences.use.tabs=1 -preferences.indent.size=4 -preferences.tabsize=4 -preferences.indent.closing=0 - -module.include.name=. -module.include.type= -module.include.files=\ - ETL/_bit_rotate.h\ - ETL/_bezier.h\ - ETL/_fastangle_tables.h\ - ETL/_boxblur.h\ - ETL/_clock_system.h\ - ETL/_gaussian.h\ - ETL/_rwlock.h\ - ETL/_stringf.h\ - ETL/_status.h\ - ETL/_smart_ptr.h\ - ETL/_thread.h\ - ETL/_curve_func.h\ - ETL/etl_profile_.h\ - ETL/_curve.h\ - ETL/_calculus.h\ - ETL/_trivial.h\ - ETL/etl_profile.h\ - ETL/_pen.h\ - ETL/_misc.h\ - ETL/_mutex_win32.h\ - ETL/_clock_gettimeofday.h\ - ETL/_ref_count.h\ - ETL/_bezier_angle.h\ - ETL/_clock_base.h\ - ETL/_bspline.h\ - ETL/_smach.h\ - ETL/_fixed.h\ - ETL/_condition.h\ - ETL/_mutex_null.h\ - ETL/_surface.h\ - ETL/_fastangle.h\ - ETL/_mutex_pthreads.h\ - ETL/_hermite.h\ - ETL/_handle.h\ - ETL/_random.h\ - ETL/_angle.h\ - ETL/_clock_win32hpcount.h\ - ETL/etl_config.h\ - ETL.pbproj/etl_profile.h - -module.source.name=. -module.source.type= -module.source.files=\ - test/surface.cpp\ - test/random.cpp\ - test/smach.cpp\ - test/smart_ptr.cpp\ - test/benchmark.cpp\ - test/spline.cpp\ - test/handle.cpp\ - test/stringf.cpp\ - test/clock.cpp\ - test/angle.cpp\ - test/hermite.cpp\ - test/fixed.cpp\ - test/pen.cpp\ - ETL.pbproj/frameworkfix.cpp - -module.pixmap.name=. -module.pixmap.type= -module.pixmap.files= - -module.data.name=. -module.data.type= -module.data.files= - -module.help.name=. -module.help.type= -module.help.files= - -module.doc.name=. -module.doc.type= -module.doc.files=\ - README\ - INSTALL\ - ChangeLog - -module.po.files= - -compiler.options.supports= -compiler.options.include.paths=\ - .\ - .. -compiler.options.library.paths= -compiler.options.libraries= -compiler.options.libraries.selected= -compiler.options.defines=\ - HAVE_CONFIG_H -compiler.options.defines.selected= -compiler.options.warning.buttons=0 0 1 1 0 1 0 0 0 0 0 0 0 1 0 0 -compiler.options.optimize.buttons=0 0 1 0 -compiler.options.other.buttons=1 0 -compiler.options.other.c.flags= -compiler.options.other.l.flags= -compiler.options.other.l.libs= - -project.src.paths= diff --git a/ETL/trunk/ETL/Makefile.am b/ETL/trunk/ETL/Makefile.am deleted file mode 100644 index b08fdcf..0000000 --- a/ETL/trunk/ETL/Makefile.am +++ /dev/null @@ -1,86 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -CLEANFILES = \ - $(top_builddir)/ETL/etl_profile.h - - -etldir = $(includedir)/ETL - -etl_HEADERS = \ - value \ - _value.h \ - rect \ - _rect.h \ - misc \ - _misc.h \ - ref_count \ - _ref_count.h \ - angle \ - fastangle \ - handle \ - ipc \ - thread \ - fixed \ - random \ - clock \ - hermite \ - calculus \ - stringf \ - trivial \ - spline \ - _stringf.h \ - _bspline.h \ - _calculus.h \ - _mutex_null.h \ - _hermite.h \ - _curve_func.h \ - _clock_base.h \ - _clock_system.h \ - _clock_gettimeofday.h \ - _random.h \ - _angle.h \ - _fastangle.h \ - _curve.h \ - _handle.h \ - _thread.h \ - _mutex_pthreads.h \ - _mutex_win32.h \ - _condition.h \ - _rwlock.h \ - smach \ - _smach.h \ - _trivial.h \ - _fixed.h \ - etl_config.h \ - $(top_builddir)/ETL/etl_profile.h \ - _fastangle_tables.h \ - bezier \ - _bezier.h \ - _bezier_angle.h \ - _status.h \ - status \ - pen \ - _pen.h \ - boxblur \ - _boxblur.h \ - gaussian \ - _gaussian.h \ - surface \ - _surface.h \ - smart_ptr \ - _smart_ptr.h \ - _clock_win32hpcount.h \ - mutex \ - _mutex_pthreads_simple.h - - -$(top_builddir)/ETL/etl_profile.h:$(top_builddir)/ETL/etl_profile_.h - sed "s/PACKAGE/ETL/g;" < $(top_builddir)/ETL/etl_profile_.h > $(top_builddir)/ETL/etl_profile.h - - -# FIXME: figure out why this is in SVN, but isn't installed -EXTRA_DIST = \ - _bit_rotate.h diff --git a/ETL/trunk/ETL/_angle.h b/ETL/trunk/ETL/_angle.h deleted file mode 100644 index 2ea3720..0000000 --- a/ETL/trunk/ETL/_angle.h +++ /dev/null @@ -1,516 +0,0 @@ -/* ======================================================================== -** Extended Template and Library -** Angle Abstraction Class Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__ANGLE_H -#define __ETL__ANGLE_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -#ifndef PI -# define PI (3.1415926535897932384626433832795029L) -# define HALF_PI (PI/2) -#endif - -#define ANGLE_EPSILON (1.0e-6) - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -// ======================================================================== -/*! \class angle _angle.h ETL/angle -** \brief Abstraction of the concept of an angle -** \see angle::deg, angle::rad, angle::rot, angle::sin, angle::cos, angle::tan, fastangle -** \writeme -*/ -class angle -{ -public: - typedef float value_type; - -protected: - typedef value_type unit; - - unit v; //! Stored in radians; positive values indicate counter-clockwise. - -public: - - /* - ** Arithmetic Operators - */ - - const angle & - operator+=(const angle &rhs) - { v+=rhs.v; return *this; } - - const angle & - operator-=(const angle &rhs) - { v-=rhs.v; return *this; } - - const angle & - operator*=(const unit &rhs) - { v*=rhs; return *this; } - - const angle & - operator/=(const unit &rhs) - { v/=rhs; return *this; } - - //! Angle Addition Operator - angle - operator+(const angle &rhs)const - { return angle(*this)+=rhs; } - - //! Angle Subtraction Operator - /*! \sa angle dist(const angle &) */ - angle - operator-(const angle &rhs)const - { return angle(*this)-=rhs; } - - //! Angle Scalar Multiplication Operator - /*! This operator will multiply the given - angle by the given scalar value. */ - angle - operator*(const unit &rhs)const - { return angle(*this)*=rhs; } - - angle - operator/(const unit &rhs)const - { return angle(*this)/=rhs; } - - //! Angle Negation - angle - operator-()const - { - angle ret; - ret.v=-v; - return ret; - } - -#ifdef ETL_NOT_USED - //! 180 degree rotation operator - /*! Returns the angle directly opposite of - the given angle, and will yield a result - between 0 and 2PI */ - angle - operator~()const - { - angle ret; - ret.v = v+PI; - return ret.mod(); - } -#endif // ETL_NOT_USED - -#ifdef ETL_WRAP_ANGLES - /*! Returns true if the shortest - angle from the left-hand to the - right-hand side is counter-clockwise */ - bool - operator<(const angle &rhs)const - { return dist(rhs).v<(value_type)0.0; } - - /*! Returns true if the shortest - angle from the left-hand to the - right-hand side is clockwise */ - bool - operator>(const angle &rhs)const - { return dist(rhs).v>(value_type)0.0; } - - /*! Returns true if the shortest - angle from the left-hand to the - right-hand side is counter-clockwise, - or if the angles are refer to the same - point on the unit circle. */ - bool - operator<=(const angle &rhs)const - { return dist(rhs).v<=(value_type)0.0; } - - /*! Returns true if the shortest - angle from the left-hand to the - right-hand side is clockwise, - or if the angles are refer to the same - point on the unit circle. */ - bool - operator>=(const angle &rhs)const - { return dist(rhs).v>=(value_type)0.0; } - - /*! Returns true if the angles - are refer to the same point - on the unit circle. */ - bool - operator==(const angle &rhs)const - { return std::abs(dist(rhs).v)ANGLE_EPSILON; } -#else // ETL_WRAP_ANGLES - /*! Returns true if the left-hand - side is less than the - right-hand side */ - bool - operator<(const angle &rhs)const - { return v < rhs.v; } - - /*! Returns true if the left-hand - side is greater than the - right-hand side */ - bool - operator>(const angle &rhs)const - { return v > rhs.v; } - - /*! Returns true if the left-hand - side is less or equal to the - right-hand side */ - bool - operator<=(const angle &rhs)const - { return v <= rhs.v; } - - /*! Returns true if the left-hand - side is greater than or equal - to the right-hand side */ - bool - operator>=(const angle &rhs)const - { return v >= rhs.v; } - - /*! Returns true if the angles - are the same, or close */ - bool - operator==(const angle &rhs)const - { return std::abs(v - rhs.v)ANGLE_EPSILON; } -#endif // ETL_WRAP_ANGLES - - //! Absolute Angle Function - /*! This function will return the - absolute value of the angle. */ - angle - abs()const - { - angle ret; - ret.v=std::abs(v); - return ret; - } - -#ifdef ETL_WRAP_ANGLES - //! Angle Difference Function - /*! This function will return the - shortest physical distance between - two angles, from -PI/2 to PI/2 - \sa angle operator-(const angle &) */ - angle - dist(const angle &rhs)const - { - angle ret; - ret.v=v-rhs.v; - ret.v-=rot_floor(ret.v+PI); - return ret; - } - - //! Rotation Modulus - /*! This function will return the - value of the angle between 0 and 2PI */ - angle - mod()const - { - angle ret(*this); - ret.v-=rot_floor(ret.v); - return ret; - } -#else // ETL_WRAP_ANGLES - //! Angle Difference Function - /*! This function will return the - difference between - two angles, just like - \sa angle operator-(const angle &) */ - angle - dist(const angle &rhs)const - { return angle(*this)-=rhs; } - - //! Rotation Modulus - /*! This function will return the - value of the angle */ - angle - mod()const - { - angle ret(*this); - return ret; - } -#endif // ETL_WRAP_ANGLES - - //! Zero Rotation (0 degrees) - static angle - zero() - { - angle ret; - ret.v=0; - return ret; - } - - //! One Complete Rotation (360 degrees) - static angle - one() - { - angle ret; - ret.v=PI*2; - return ret; - } - - //! One Half Rotation (180 degrees) - static angle - half() - { - angle ret; - ret.v=PI; - return ret; - } - - bool operator!()const { return std::abs(mod().v) < ANGLE_EPSILON; } - -private: - -#ifdef ETL_WRAP_ANGLES - static value_type rot_floor(value_type x) - { return static_cast(std::floor(x/(PI*2))*PI*2); } -#endif // ETL_WRAP_ANGLES - -public: - /* - ** Conversion Classes - */ - - class rad; - class deg; - class rot; - - /* - ** Trigonometric Classes - */ - - class sin; - class cos; - class tan; - - /* - ** Friend classes - */ - - friend class rad; - friend class deg; - friend class rot; - friend class sin; - friend class cos; - friend class tan; - - /* - ** Deprecated - */ - -#ifndef ETL_NO_DEPRECATED - typedef rad radians; - typedef deg degrees; - typedef rot rotations; -#endif -}; // END of class angle - -// ======================================================================== -/*! \class angle::rad _angle.h ETL/angle -** \brief Angle representation in radians -** \see angle -** \writeme -*/ -class angle::rad : public angle -{ -public: - explicit rad(const value_type &x) { v=x; } - rad(const angle &a):angle(a) { } - rad mod()const { return angle::mod(); } - rad dist(const angle &rhs)const { return angle::dist(rhs); } - value_type get()const { return v; } -#ifndef ETL_NO_DEPRECATED - // operator value_type()const ETL_DEPRECATED_FUNCTION; -#endif -}; // END of class angle::radians -// inline angle::rad::operator angle::value_type()const { return get(); } - -// ======================================================================== -/*! \class angle::deg _angle.h ETL/angle -** \brief Angle representation in degrees -** \see angle -** \writeme -*/ -class angle::deg : public angle -{ -public: - explicit deg(const value_type &x) { v=x*((PI*2)/360); } - deg(const angle &a):angle(a) { } - deg mod()const { return angle::mod(); } - deg dist(const angle &rhs)const { return angle::dist(rhs); } - value_type get()const { return v*360/(PI*2); } -#ifndef ETL_NO_DEPRECATED - // operator value_type()const ETL_DEPRECATED_FUNCTION; -#endif -}; // END of class angle::degrees -// inline angle::deg::operator angle::value_type()const { return get(); } - -// ======================================================================== -/*! \class angle::rot _angle.h ETL/angle -** \brief Angle representation in rotations -** \see angle -** \writeme -*/ -class angle::rot : public angle -{ -public: - explicit rot(const value_type &x) { v=x*(PI*2); } - rot(const angle &a):angle(a) { } - rot mod()const { return angle::mod(); } - rot dist(const angle &rhs)const { return angle::dist(rhs); } - value_type get()const { return v/(PI*2); } -#ifndef ETL_NO_DEPRECATED - // operator value_type()const ETL_DEPRECATED_FUNCTION; -#endif -}; // END of class angle::rotations -// inline angle::rot::operator angle::value_type()const { return get(); } - -// ======================================================================== -/*! \class angle::sin _angle.h ETL/angle -** \brief Angle representation as a sine function -** \see angle -** \writeme -*/ -class angle::sin : public angle -{ -public: - explicit sin(const value_type &x) { v=static_cast(std::asin(x)); } - sin(const angle &a):angle(a) { } - sin mod()const { return angle::mod(); } - sin dist(const angle &rhs)const { return angle::dist(rhs); } - value_type get()const { return static_cast(std::sin(v)); } -#ifndef ETL_NO_DEPRECATED - // operator value_type()const ETL_DEPRECATED_FUNCTION; -#endif -}; // END of class angle::sin -// inline angle::sin::operator angle::value_type()const { return get(); } - -// ======================================================================== -/*! \class angle::cos _angle.h ETL/angle -** \brief Angle representation as a cosine function -** \see angle -** \writeme -*/ -class angle::cos : public angle -{ -public: - explicit cos(const value_type &x) { v=(value_type)(std::acos(x)); } - cos(const angle &a):angle(a) { } - cos mod()const { return angle::mod(); } - cos dist(const angle &rhs)const { return angle::dist(rhs); } - value_type get()const { return (value_type)std::cos(v); } -#ifndef ETL_NO_DEPRECATED - // operator value_type()const ETL_DEPRECATED_FUNCTION; -#endif -}; // END of class angle::cos -// inline angle::cos::operator angle::value_type()const { return get(); } - -// ======================================================================== -/*! \class angle::tan _angle.h ETL/angle -** \brief Angle representation as a tangent function -** \see angle -** \writeme -*/ -class angle::tan : public angle -{ -public: - explicit tan(const value_type &x) { v=(value_type)(std::atan(x)); } - tan(const value_type &y,const value_type &x) { v=(value_type)(std::atan2(y,x)); } - tan(const angle &a):angle(a) { } - tan mod()const { return angle::mod(); } - tan dist(const angle &rhs)const { return angle::dist(rhs); } - value_type get()const { return (value_type)std::tan(v); } -#ifndef ETL_NO_DEPRECATED - // operator value_type()const ETL_DEPRECATED_FUNCTION; -#endif -}; // END of class angle::tan -// inline angle::tan::operator angle::value_type()const { return get(); } - -_ETL_END_NAMESPACE - -//#include - -template -struct affine_combo -{ - typedef T time_type; - - //affine_combo() { std::cerr<<"affine_combo: I was created!"<: I was DELETED!"< -struct distance_func : public std::binary_function -{ - etl::angle operator()(const etl::angle &a,const etl::angle &b)const - { - etl::angle delta=b.dist(a); - //if(delta // for ldexp -// #include // not used - -/* === M A C R O S ========================================================= */ - -#define MAXDEPTH 64 /* Maximum depth for recursion */ - -/* take binary sign of a, either -1, or 1 if >= 0 */ -#define SGN(a) (((a)<0) ? -1 : 1) - -/* find minimum of a and b */ -#ifndef MIN -#define MIN(a,b) (((a)<(b))?(a):(b)) -#endif - -/* find maximum of a and b */ -#ifndef MAX -#define MAX(a,b) (((a)>(b))?(a):(b)) -#endif - -#define BEZIER_EPSILON (ldexp(1.0,-MAXDEPTH-1)) /*Flatness control value */ -//#define BEZIER_EPSILON 0.00005 /*Flatness control value */ -#define DEGREE 3 /* Cubic Bezier curve */ -#define W_DEGREE 5 /* Degree of eqn to find roots of */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -template class bezier; - -//! Cubic Bezier Curve Base Class -// This generic implementation uses the DeCasteljau algorithm. -// Works for just about anything that has an affine combination function -template -class bezier_base : public std::unary_function -{ -public: - typedef V value_type; - typedef T time_type; - -private: - value_type a,b,c,d; - time_type r,s; - -protected: - affine_combo affine_func; - -public: - bezier_base():r(0.0),s(1.0) { } - bezier_base( - const value_type &a, const value_type &b, const value_type &c, const value_type &d, - const time_type &r=0.0, const time_type &s=1.0): - a(a),b(b),c(c),d(d),r(r),s(s) { sync(); } - - void sync() - { - } - - value_type - operator()(time_type t)const - { - t=(t-r)/(s-r); - return - affine_func( - affine_func( - affine_func(a,b,t), - affine_func(b,c,t) - ,t), - affine_func( - affine_func(b,c,t), - affine_func(c,d,t) - ,t) - ,t); - } - - /* - void evaluate(time_type t, value_type &f, value_type &df) const - { - t=(t-r)/(s-r); - - value_type p1 = affine_func( - affine_func(a,b,t), - affine_func(b,c,t) - ,t); - value_type p2 = affine_func( - affine_func(b,c,t), - affine_func(c,d,t) - ,t); - - f = affine_func(p1,p2,t); - df = (p2-p1)*3; - } - */ - - void set_rs(time_type new_r, time_type new_s) { r=new_r; s=new_s; } - void set_r(time_type new_r) { r=new_r; } - void set_s(time_type new_s) { s=new_s; } - const time_type &get_r()const { return r; } - const time_type &get_s()const { return s; } - time_type get_dt()const { return s-r; } - - bool intersect_hull(const bezier_base &x)const - { - return 0; - } - - //! Bezier curve intersection function - /*! Calculates the time of intersection - ** for the calling curve. - ** - ** I still have not figured out a good generic - ** method of doing this for a bi-infinite - ** cubic bezier curve calculated with the DeCasteljau - ** algorithm. - ** - ** One method, although it does not work for the - ** entire bi-infinite curve, is to iteratively - ** intersect the hulls. However, we would only detect - ** intersections that occur between R and S. - ** - ** It is entirely possible that a new construct similar - ** to the affine combination function will be necessary - ** for this to work properly. - ** - ** For now, this function is BROKEN. (although it works - ** for the floating-point specializations, using newton's method) - */ - time_type intersect(const bezier_base &x, time_type near=0.0)const - { - return 0; - } - - /* subdivide at some time t into 2 separate curves left and right - - b0 l1 - * 0+1 l2 - b1 * 1+2*1+2 l3 - * 1+2 * 0+3*1+3*2+3 l4,r1 - b2 * 1+2*2+2 r2 * - * 2+3 r3 * - b3 r4 * - * - - 0.1 2.3 -> 0.1 2 3 4 5.6 - */ -/* void subdivide(bezier_base *left, bezier_base *right, const time_type &time = (time_type)0.5) const - { - time_type t = (time-r)/(s-r); - bezier_base lt,rt; - - value_type temp; - - //1st stage points to keep - lt.a = a; - rt.d = d; - - //2nd stage calc - lt.b = affine_func(a,b,t); - temp = affine_func(b,c,t); - rt.c = affine_func(c,d,t); - - //3rd stage calc - lt.c = affine_func(lt.b,temp,t); - rt.b = affine_func(temp,rt.c,t); - - //last stage calc - lt.d = rt.a = affine_func(lt.c,rt.b,t); - - //set the time range for l,r (the inside values should be 1, 0 respectively) - lt.r = r; - rt.s = s; - - //give back the curves - if(left) *left = lt; - if(right) *right = rt; - } - */ - value_type & - operator[](int i) - { return (&a)[i]; } - - const value_type & - operator[](int i) const - { return (&a)[i]; } -}; - - -#if 1 -// Fast float implementation of a cubic bezier curve -template <> -class bezier_base : public std::unary_function -{ -public: - typedef float value_type; - typedef float time_type; -private: - affine_combo affine_func; - value_type a,b,c,d; - time_type r,s; - - value_type _coeff[4]; - time_type drs; // reciprocal of (s-r) -public: - bezier_base():r(0.0),s(1.0),drs(1.0) { } - bezier_base( - const value_type &a, const value_type &b, const value_type &c, const value_type &d, - const time_type &r=0.0, const time_type &s=1.0): - a(a),b(b),c(c),d(d),r(r),s(s),drs(1.0/(s-r)) { sync(); } - - void sync() - { -// drs=1.0/(s-r); - _coeff[0]= a; - _coeff[1]= b*3 - a*3; - _coeff[2]= c*3 - b*6 + a*3; - _coeff[3]= d - c*3 + b*3 - a; - } - - // Cost Summary: 4 products, 3 sums, and 1 difference. - inline value_type - operator()(time_type t)const - { t-=r; t*=drs; return _coeff[0]+(_coeff[1]+(_coeff[2]+(_coeff[3])*t)*t)*t; } - - void set_rs(time_type new_r, time_type new_s) { r=new_r; s=new_s; drs=1.0/(s-r); } - void set_r(time_type new_r) { r=new_r; drs=1.0/(s-r); } - void set_s(time_type new_s) { s=new_s; drs=1.0/(s-r); } - const time_type &get_r()const { return r; } - const time_type &get_s()const { return s; } - time_type get_dt()const { return s-r; } - - //! Bezier curve intersection function - /*! Calculates the time of intersection - ** for the calling curve. - */ - time_type intersect(const bezier_base &x, time_type t=0.0,int i=15)const - { - //BROKEN - the time values of the 2 curves should be independent - value_type system[4]; - system[0]=_coeff[0]-x._coeff[0]; - system[1]=_coeff[1]-x._coeff[1]; - system[2]=_coeff[2]-x._coeff[2]; - system[3]=_coeff[3]-x._coeff[3]; - - t-=r; - t*=drs; - - // Newton's method - // Inner loop cost summary: 7 products, 5 sums, 1 difference - for(;i;i--) - t-= (system[0]+(system[1]+(system[2]+(system[3])*t)*t)*t)/ - (system[1]+(system[2]*2+(system[3]*3)*t)*t); - - t*=(s-r); - t+=r; - - return t; - } - - value_type & - operator[](int i) - { return (&a)[i]; } - - const value_type & - operator[](int i) const - { return (&a)[i]; } -}; - - -// Fast double implementation of a cubic bezier curve -template <> -class bezier_base : public std::unary_function -{ -public: - typedef double value_type; - typedef float time_type; -private: - affine_combo affine_func; - value_type a,b,c,d; - time_type r,s; - - value_type _coeff[4]; - time_type drs; // reciprocal of (s-r) -public: - bezier_base():r(0.0),s(1.0),drs(1.0) { } - bezier_base( - const value_type &a, const value_type &b, const value_type &c, const value_type &d, - const time_type &r=0.0, const time_type &s=1.0): - a(a),b(b),c(c),d(d),r(r),s(s),drs(1.0/(s-r)) { sync(); } - - void sync() - { -// drs=1.0/(s-r); - _coeff[0]= a; - _coeff[1]= b*3 - a*3; - _coeff[2]= c*3 - b*6 + a*3; - _coeff[3]= d - c*3 + b*3 - a; - } - - // 4 products, 3 sums, and 1 difference. - inline value_type - operator()(time_type t)const - { t-=r; t*=drs; return _coeff[0]+(_coeff[1]+(_coeff[2]+(_coeff[3])*t)*t)*t; } - - void set_rs(time_type new_r, time_type new_s) { r=new_r; s=new_s; drs=1.0/(s-r); } - void set_r(time_type new_r) { r=new_r; drs=1.0/(s-r); } - void set_s(time_type new_s) { s=new_s; drs=1.0/(s-r); } - const time_type &get_r()const { return r; } - const time_type &get_s()const { return s; } - time_type get_dt()const { return s-r; } - - //! Bezier curve intersection function - /*! Calculates the time of intersection - ** for the calling curve. - */ - time_type intersect(const bezier_base &x, time_type t=0.0,int i=15)const - { - //BROKEN - the time values of the 2 curves should be independent - value_type system[4]; - system[0]=_coeff[0]-x._coeff[0]; - system[1]=_coeff[1]-x._coeff[1]; - system[2]=_coeff[2]-x._coeff[2]; - system[3]=_coeff[3]-x._coeff[3]; - - t-=r; - t*=drs; - - // Newton's method - // Inner loop: 7 products, 5 sums, 1 difference - for(;i;i--) - t-= (system[0]+(system[1]+(system[2]+(system[3])*t)*t)*t)/ - (system[1]+(system[2]*2+(system[3]*3)*t)*t); - - t*=(s-r); - t+=r; - - return t; - } - - value_type & - operator[](int i) - { return (&a)[i]; } - - const value_type & - operator[](int i) const - { return (&a)[i]; } -}; - -//#ifdef __FIXED__ - -// Fast double implementation of a cubic bezier curve -/* -template <> -template -class bezier_base > : std::unary_function,fixed_base > -{ -public: - typedef fixed_base value_type; - typedef fixed_base time_type; - -private: - affine_combo affine_func; - value_type a,b,c,d; - time_type r,s; - - value_type _coeff[4]; - time_type drs; // reciprocal of (s-r) -public: - bezier_base():r(0.0),s(1.0),drs(1.0) { } - bezier_base( - const value_type &a, const value_type &b, const value_type &c, const value_type &d, - const time_type &r=0, const time_type &s=1): - a(a),b(b),c(c),d(d),r(r),s(s),drs(1.0/(s-r)) { sync(); } - - void sync() - { - drs=time_type(1)/(s-r); - _coeff[0]= a; - _coeff[1]= b*3 - a*3; - _coeff[2]= c*3 - b*6 + a*3; - _coeff[3]= d - c*3 + b*3 - a; - } - - // 4 products, 3 sums, and 1 difference. - inline value_type - operator()(time_type t)const - { t-=r; t*=drs; return _coeff[0]+(_coeff[1]+(_coeff[2]+(_coeff[3])*t)*t)*t; } - - void set_rs(time_type new_r, time_type new_s) { r=new_r; s=new_s; drs=time_type(1)/(s-r); } - void set_r(time_type new_r) { r=new_r; drs=time_type(1)/(s-r); } - void set_s(time_type new_s) { s=new_s; drs=time_type(1)/(s-r); } - const time_type &get_r()const { return r; } - const time_type &get_s()const { return s; } - time_type get_dt()const { return s-r; } - - //! Bezier curve intersection function - //! Calculates the time of intersection - // for the calling curve. - // - time_type intersect(const bezier_base &x, time_type t=0,int i=15)const - { - value_type system[4]; - system[0]=_coeff[0]-x._coeff[0]; - system[1]=_coeff[1]-x._coeff[1]; - system[2]=_coeff[2]-x._coeff[2]; - system[3]=_coeff[3]-x._coeff[3]; - - t-=r; - t*=drs; - - // Newton's method - // Inner loop: 7 products, 5 sums, 1 difference - for(;i;i--) - t-=(time_type) ( (system[0]+(system[1]+(system[2]+(system[3])*t)*t)*t)/ - (system[1]+(system[2]*2+(system[3]*3)*t)*t) ); - - t*=(s-r); - t+=r; - - return t; - } - - value_type & - operator[](int i) - { return (&a)[i]; } - - const value_type & - operator[](int i) const - { return (&a)[i]; } -}; -*/ -//#endif - -#endif - - - -template -class bezier_iterator -{ -public: - - struct iterator_category {}; - typedef V value_type; - typedef T difference_type; - typedef V reference; - -private: - difference_type t; - difference_type dt; - bezier_base curve; - -public: - -/* - reference - operator*(void)const { return curve(t); } - const surface_iterator& - - operator++(void) - { t+=dt; return &this; } - - const surface_iterator& - operator++(int) - { hermite_iterator _tmp=*this; t+=dt; return _tmp; } - - const surface_iterator& - operator--(void) - { t-=dt; return &this; } - - const surface_iterator& - operator--(int) - { hermite_iterator _tmp=*this; t-=dt; return _tmp; } - - - surface_iterator - operator+(difference_type __n) const - { return surface_iterator(data+__n[0]+__n[1]*pitch,pitch); } - - surface_iterator - operator-(difference_type __n) const - { return surface_iterator(data-__n[0]-__n[1]*pitch,pitch); } -*/ - -}; - -template -class bezier : public bezier_base -{ -public: - typedef V value_type; - typedef T time_type; - typedef float distance_type; - typedef bezier_iterator iterator; - typedef bezier_iterator const_iterator; - - distance_func dist; - - using bezier_base::get_r; - using bezier_base::get_s; - using bezier_base::get_dt; - -public: - bezier() { } - bezier(const value_type &a, const value_type &b, const value_type &c, const value_type &d): - bezier_base(a,b,c,d) { } - - - const_iterator begin()const; - const_iterator end()const; - - time_type find_closest(bool fast, const value_type& x, int i=7)const - { - if (!fast) - { - value_type array[4] = { - bezier::operator[](0), - bezier::operator[](1), - bezier::operator[](2), - bezier::operator[](3)}; - return NearestPointOnCurve(x, array); - } - else - { - time_type r(0), s(1); - float t((r+s)*0.5); /* half way between r and s */ - - for(;i;i--) - { - // compare 33% of the way between r and s with 67% of the way between r and s - if(dist(operator()((s-r)*(1.0/3.0)+r), x) < - dist(operator()((s-r)*(2.0/3.0)+r), x)) - s=t; - else - r=t; - t=((r+s)*0.5); - } - return t; - } - } - - distance_type find_distance(time_type r, time_type s, int steps=7)const - { - const time_type inc((s-r)/steps); - if (!inc) return 0; - distance_type ret(0); - value_type last(operator()(r)); - - for(r+=inc;r 0.1 2 3 4 5.6 - */ - void subdivide(bezier *left, bezier *right, const time_type &time = (time_type)0.5) const - { - time_type t=(time-get_r())/get_dt(); - bezier lt,rt; - - value_type temp; - const value_type& a((*this)[0]); - const value_type& b((*this)[1]); - const value_type& c((*this)[2]); - const value_type& d((*this)[3]); - - //1st stage points to keep - lt[0] = a; - rt[3] = d; - - //2nd stage calc - lt[1] = affine_func(a,b,t); - temp = affine_func(b,c,t); - rt[2] = affine_func(c,d,t); - - //3rd stage calc - lt[2] = affine_func(lt[1],temp,t); - rt[1] = affine_func(temp,rt[2],t); - - //last stage calc - lt[3] = rt[0] = affine_func(lt[2],rt[1],t); - - //set the time range for l,r (the inside values should be 1, 0 respectively) - lt.set_r(get_r()); - rt.set_s(get_s()); - - lt.sync(); - rt.sync(); - - //give back the curves - if(left) *left = lt; - if(right) *right = rt; - } - - - void evaluate(time_type t, value_type &f, value_type &df) const - { - t=(t-get_r())/get_dt(); - - const value_type& a((*this)[0]); - const value_type& b((*this)[1]); - const value_type& c((*this)[2]); - const value_type& d((*this)[3]); - - const value_type p1 = affine_func( - affine_func(a,b,t), - affine_func(b,c,t) - ,t); - const value_type p2 = affine_func( - affine_func(b,c,t), - affine_func(c,d,t) - ,t); - - f = affine_func(p1,p2,t); - df = (p2-p1)*3; - } - -private: - /* - * Bezier : - * Evaluate a Bezier curve at a particular parameter value - * Fill in control points for resulting sub-curves if "Left" and - * "Right" are non-null. - * - * int degree; Degree of bezier curve - * value_type *VT; Control pts - * time_type t; Parameter value - * value_type *Left; RETURN left half ctl pts - * value_type *Right; RETURN right half ctl pts - */ - static value_type Bezier(value_type *VT, int degree, time_type t, value_type *Left, value_type *Right) - { - int i, j; /* Index variables */ - value_type Vtemp[W_DEGREE+1][W_DEGREE+1]; - - /* Copy control points */ - for (j = 0; j <= degree; j++) - Vtemp[0][j] = VT[j]; - - /* Triangle computation */ - for (i = 1; i <= degree; i++) - for (j =0 ; j <= degree - i; j++) - { - Vtemp[i][j][0] = (1.0 - t) * Vtemp[i-1][j][0] + t * Vtemp[i-1][j+1][0]; - Vtemp[i][j][1] = (1.0 - t) * Vtemp[i-1][j][1] + t * Vtemp[i-1][j+1][1]; - } - - if (Left != NULL) - for (j = 0; j <= degree; j++) - Left[j] = Vtemp[j][0]; - - if (Right != NULL) - for (j = 0; j <= degree; j++) - Right[j] = Vtemp[degree-j][j]; - - return (Vtemp[degree][0]); - } - - /* - * CrossingCount : - * Count the number of times a Bezier control polygon - * crosses the 0-axis. This number is >= the number of roots. - * - * value_type *VT; Control pts of Bezier curve - */ - static int CrossingCount(value_type *VT) - { - int i; - int n_crossings = 0; /* Number of zero-crossings */ - int sign, old_sign; /* Sign of coefficients */ - - sign = old_sign = SGN(VT[0][1]); - for (i = 1; i <= W_DEGREE; i++) - { - sign = SGN(VT[i][1]); - if (sign != old_sign) n_crossings++; - old_sign = sign; - } - - return n_crossings; - } - - /* - * ControlPolygonFlatEnough : - * Check if the control polygon of a Bezier curve is flat enough - * for recursive subdivision to bottom out. - * - * value_type *VT; Control points - */ - static int ControlPolygonFlatEnough(value_type *VT) - { - int i; /* Index variable */ - distance_type distance[W_DEGREE]; /* Distances from pts to line */ - distance_type max_distance_above; /* maximum of these */ - distance_type max_distance_below; - time_type intercept_1, intercept_2, left_intercept, right_intercept; - distance_type a, b, c; /* Coefficients of implicit */ - /* eqn for line from VT[0]-VT[deg] */ - /* Find the perpendicular distance */ - /* from each interior control point to */ - /* line connecting VT[0] and VT[W_DEGREE] */ - { - distance_type abSquared; - - /* Derive the implicit equation for line connecting first * - * and last control points */ - a = VT[0][1] - VT[W_DEGREE][1]; - b = VT[W_DEGREE][0] - VT[0][0]; - c = VT[0][0] * VT[W_DEGREE][1] - VT[W_DEGREE][0] * VT[0][1]; - - abSquared = (a * a) + (b * b); - - for (i = 1; i < W_DEGREE; i++) - { - /* Compute distance from each of the points to that line */ - distance[i] = a * VT[i][0] + b * VT[i][1] + c; - if (distance[i] > 0.0) distance[i] = (distance[i] * distance[i]) / abSquared; - if (distance[i] < 0.0) distance[i] = -(distance[i] * distance[i]) / abSquared; - } - } - - /* Find the largest distance */ - max_distance_above = max_distance_below = 0.0; - - for (i = 1; i < W_DEGREE; i++) - { - if (distance[i] < 0.0) max_distance_below = MIN(max_distance_below, distance[i]); - if (distance[i] > 0.0) max_distance_above = MAX(max_distance_above, distance[i]); - } - - /* Implicit equation for "above" line */ - intercept_1 = -(c + max_distance_above)/a; - - /* Implicit equation for "below" line */ - intercept_2 = -(c + max_distance_below)/a; - - /* Compute intercepts of bounding box */ - left_intercept = MIN(intercept_1, intercept_2); - right_intercept = MAX(intercept_1, intercept_2); - - return 0.5 * (right_intercept-left_intercept) < BEZIER_EPSILON ? 1 : 0; - } - - /* - * ComputeXIntercept : - * Compute intersection of chord from first control point to last - * with 0-axis. - * - * value_type *VT; Control points - */ - static time_type ComputeXIntercept(value_type *VT) - { - distance_type YNM = VT[W_DEGREE][1] - VT[0][1]; - return (YNM*VT[0][0] - (VT[W_DEGREE][0] - VT[0][0])*VT[0][1]) / YNM; - } - - /* - * FindRoots : - * Given a 5th-degree equation in Bernstein-Bezier form, find - * all of the roots in the interval [0, 1]. Return the number - * of roots found. - * - * value_type *w; The control points - * time_type *t; RETURN candidate t-values - * int depth; The depth of the recursion - */ - static int FindRoots(value_type *w, time_type *t, int depth) - { - int i; - value_type Left[W_DEGREE+1]; /* New left and right */ - value_type Right[W_DEGREE+1]; /* control polygons */ - int left_count; /* Solution count from */ - int right_count; /* children */ - time_type left_t[W_DEGREE+1]; /* Solutions from kids */ - time_type right_t[W_DEGREE+1]; - - switch (CrossingCount(w)) - { - case 0 : - { /* No solutions here */ - return 0; - } - case 1 : - { /* Unique solution */ - /* Stop recursion when the tree is deep enough */ - /* if deep enough, return 1 solution at midpoint */ - if (depth >= MAXDEPTH) - { - t[0] = (w[0][0] + w[W_DEGREE][0]) / 2.0; - return 1; - } - if (ControlPolygonFlatEnough(w)) - { - t[0] = ComputeXIntercept(w); - return 1; - } - break; - } - } - - /* Otherwise, solve recursively after */ - /* subdividing control polygon */ - Bezier(w, W_DEGREE, 0.5, Left, Right); - left_count = FindRoots(Left, left_t, depth+1); - right_count = FindRoots(Right, right_t, depth+1); - - /* Gather solutions together */ - for (i = 0; i < left_count; i++) t[i] = left_t[i]; - for (i = 0; i < right_count; i++) t[i+left_count] = right_t[i]; - - /* Send back total number of solutions */ - return (left_count+right_count); - } - - /* - * ConvertToBezierForm : - * Given a point and a Bezier curve, generate a 5th-degree - * Bezier-format equation whose solution finds the point on the - * curve nearest the user-defined point. - * - * value_type& P; The point to find t for - * value_type *VT; The control points - */ - static void ConvertToBezierForm(const value_type& P, value_type *VT, value_type w[W_DEGREE+1]) - { - int i, j, k, m, n, ub, lb; - int row, column; /* Table indices */ - value_type c[DEGREE+1]; /* VT(i)'s - P */ - value_type d[DEGREE]; /* VT(i+1) - VT(i) */ - distance_type cdTable[3][4]; /* Dot product of c, d */ - static distance_type z[3][4] = { /* Precomputed "z" for cubics */ - {1.0, 0.6, 0.3, 0.1}, - {0.4, 0.6, 0.6, 0.4}, - {0.1, 0.3, 0.6, 1.0}}; - - /* Determine the c's -- these are vectors created by subtracting */ - /* point P from each of the control points */ - for (i = 0; i <= DEGREE; i++) - c[i] = VT[i] - P; - - /* Determine the d's -- these are vectors created by subtracting */ - /* each control point from the next */ - for (i = 0; i <= DEGREE - 1; i++) - d[i] = (VT[i+1] - VT[i]) * 3.0; - - /* Create the c,d table -- this is a table of dot products of the */ - /* c's and d's */ - for (row = 0; row <= DEGREE - 1; row++) - for (column = 0; column <= DEGREE; column++) - cdTable[row][column] = d[row] * c[column]; - - /* Now, apply the z's to the dot products, on the skew diagonal */ - /* Also, set up the x-values, making these "points" */ - for (i = 0; i <= W_DEGREE; i++) - { - w[i][0] = (distance_type)(i) / W_DEGREE; - w[i][1] = 0.0; - } - - n = DEGREE; - m = DEGREE-1; - for (k = 0; k <= n + m; k++) - { - lb = MAX(0, k - m); - ub = MIN(k, n); - for (i = lb; i <= ub; i++) - { - j = k - i; - w[i+j][1] += cdTable[j][i] * z[j][i]; - } - } - } - - /* - * NearestPointOnCurve : - * Compute the parameter value of the point on a Bezier - * curve segment closest to some arbitrary, user-input point. - * Return the point on the curve at that parameter value. - * - * value_type& P; The user-supplied point - * value_type *VT; Control points of cubic Bezier - */ - static time_type NearestPointOnCurve(const value_type& P, value_type VT[4]) - { - value_type w[W_DEGREE+1]; /* Ctl pts of 5th-degree curve */ - time_type t_candidate[W_DEGREE]; /* Possible roots */ - int n_solutions; /* Number of roots found */ - time_type t; /* Parameter value of closest pt */ - - /* Convert problem to 5th-degree Bezier form */ - ConvertToBezierForm(P, VT, w); - - /* Find all possible roots of 5th-degree equation */ - n_solutions = FindRoots(w, t_candidate, 0); - - /* Compare distances of P to all candidates, and to t=0, and t=1 */ - { - distance_type dist, new_dist; - value_type p, v; - int i; - - /* Check distance to beginning of curve, where t = 0 */ - dist = (P - VT[0]).mag_squared(); - t = 0.0; - - /* Find distances for candidate points */ - for (i = 0; i < n_solutions; i++) - { - p = Bezier(VT, DEGREE, t_candidate[i], (value_type *)NULL, (value_type *)NULL); - new_dist = (P - p).mag_squared(); - if (new_dist < dist) - { - dist = new_dist; - t = t_candidate[i]; - } - } - - /* Finally, look at distance to end point, where t = 1.0 */ - new_dist = (P - VT[DEGREE]).mag_squared(); - if (new_dist < dist) - { - dist = new_dist; - t = 1.0; - } - } - - /* Return the point on the curve at parameter value t */ - return t; - } -}; - -_ETL_END_NAMESPACE - -/* === E X T E R N S ======================================================= */ - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_bezier_angle.h b/ETL/trunk/ETL/_bezier_angle.h deleted file mode 100644 index 9a747bb..0000000 --- a/ETL/trunk/ETL/_bezier_angle.h +++ /dev/null @@ -1,107 +0,0 @@ -/*! ======================================================================== -** Extended Template Library -** Bezier Template Class Implementation (Angle Specialization) -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__BEZIER_ANGLE_H -#define __ETL__BEZIER_ANGLE_H - -/* === H E A D E R S ======================================================= */ - -#include "_curve_func.h" -#include "angle" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -/* -template <> -class bezier_base : std::unary_function -{ -public: - typedef angle value_type; - typedef float time_type; -private: - affine_combo affine_func; - value_type a,b,c,d; - time_type r,s; - -public: - bezier_base():r(0.0),s(1.0) { } - bezier_base( - const value_type &a, const value_type &b, const value_type &c, const value_type &d, - const time_type &r=0.0, const time_type &s=1.0): - a(a),b(b),c(c),d(d),r(r),s(s) { sync(); } - - void sync(void) - { - } - - value_type - operator()(time_type t)const - { - t=(t-r)/(s-r); - return - affine_func( - affine_func( - affine_func(a,b,t), - affine_func(b,c,t) - ,t), - affine_func( - affine_func(b,c,t), - affine_func(c,d,t) - ,t) - ,t); - } - - void set_rs(time_type new_r, time_type new_s) { r=new_r; s=new_s; } - void set_r(time_type new_r) { r=new_r; } - void set_s(time_type new_s) { s=new_s; } - const time_type &get_r(void)const { return r; } - const time_type &get_s(void)const { return s; } - time_type get_dt(void)const { return s-r; } - - value_type & - operator[](int i) - { return (&a)[i]; } - - const value_type & - operator[](int i) const - { return (&a)[i]; } -}; -*/ - -_ETL_END_NAMESPACE - -/* === E X T E R N S ======================================================= */ - -/* === E N D =============================================================== */ - -#endif - diff --git a/ETL/trunk/ETL/_bit_rotate.h b/ETL/trunk/ETL/_bit_rotate.h deleted file mode 100644 index 3fcbee0..0000000 --- a/ETL/trunk/ETL/_bit_rotate.h +++ /dev/null @@ -1,62 +0,0 @@ -/*! ======================================================================== -** Extended Template Library -** Bit Rotation Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** These template functions have not yet been throughly tested, -** and may be inaccurate or just plain wrong. You have been warned. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__BIT_ROTATE_H -#define __ETL__BIT_ROTATE_H - -/* === H E A D E R S ======================================================= */ - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -template T -rot_left(const T &val, const int &bits=1) -{ - return (T)( ((unsigned)val<>(sizeof(T)*8-bits)) ); -} - -template T -rot_right(const T &val, const int &bits=1) -{ - return (T)( ((unsigned)val>>bits)+((unsigned)val<<(sizeof(T)*8-bits)) ); -} - -_ETL_END_NAMESPACE - -/* === E X T E R N S ======================================================= */ - -/* === E N D =============================================================== */ - -#endif - diff --git a/ETL/trunk/ETL/_boxblur.h b/ETL/trunk/ETL/_boxblur.h deleted file mode 100644 index c043dc3..0000000 --- a/ETL/trunk/ETL/_boxblur.h +++ /dev/null @@ -1,246 +0,0 @@ -/*! ======================================================================== -** Extended Template Library -** Box Blur Template Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__BOXBLUR_H -#define __ETL__BOXBLUR_H - -/* === H E A D E R S ======================================================= */ - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -template void -hbox_blur(T1 pen,int w, int h, int length, T2 outpen) -{ - int x,y; - typename T1::iterator_x iter, end; - - length=std::min(w,length); - const float divisor(1.0f/(length*2+1)); - - for(y=0;ylength) ? iter[-length-1] : *pen.x(); - tot += ((x+length) void -vbox_blur(T1 pen,const int w, const int h, int length, T2 outpen) -{ - int x,y; - typename T1::iterator_y iter, end; - - length=std::min(h,length); - const float divisor(1.0f/(length*2+1)); - - for(x=0;xlength) ? iter[-length-1] : *pen.y(); - tot += ((y+length) void -vbox_blur(T1 pen,int w, int h, int length,T2 outpen) -{ - int x,y; - typename T1::iterator_y iter, end, biter,eiter; - - //print out the info I need to figure out if this is somehow a buffer overrun... - /*char *beginptr=0,*endptr=0; - { - T1 ypen = pen; - T1 endpen = pen; - endpen.move(w,h); - ypen.inc_y(); - - T2 open = outpen, - oepen = outpen; - oepen.move(w,h); - printf("V Blur (%d,%d,s-%d) in(%p,%p,st %d) out(%p,%p)\n", - w,h,length,(char*)pen.x(),(char*)endpen.x(),(char*)ypen.x()-(char*)pen.x(), - (char*)open.x(),(char*)oepen.x()); - }*/ - length=min(h-1,length); - - const float divisor(1.0f/(length*2+1)); - //const int div = (length*2+1); - - //since the filter range is 2*length+1 we need h-1 - for(x=0;x%.3f),",y,&iter[y],iter[y],tot); - } - iter=pen.y(); - - //printf(" tot=%.3f\n",tot); - - biter = iter+(-length-1); //get the first one... - eiter = iter+length; - - //y will always be > length - //T2 open = outpen; - for (y=0;ylength) - { - typename T1::value_type &v = *biter; - /*if( (char*)&v < beginptr || - (char*)&v >= endptr) - printf("crap! %d (%p off %p)\n",y,(char*)&v,(char*)&*iter);*/ - tot -= v; - //printf("[%.3f,",v); - } - else - { - tot -= bval; - //printf("[%.3f,",bval); - } - - if (y+length= endptr) - printf("crap! %d (%p off %p)\n",y,(char*)&v,(char*)&*iter);*/ - tot += v; - //printf("%.3f]",v); - } - else - { - tot += eval; - //printf("%.3f]",eval); - } - - //test handled in the previous case... - //tot -= (y>length) ? *biter : bval; - //tot += (y+length void -box_blur(T1 pen,int w, int h, int blur_w, int blur_h, T2 outpen) - { hbox_blur(pen,w,h,blur_w,outpen); vbox_blur(pen,w,h,blur_h,outpen); } - -template void -box_blur(T1 pen,int w, int h, int size, T2 outpen) - { hbox_blur(pen,w,h,size,outpen); vbox_blur(pen,w,h,size,outpen); } - -template void -hbox_blur(T1 begin,T1 end, int len,T2 outpen) -{ - typename T1::difference_type size(end-begin); - hbox_blur(begin,size.x,size.y,len,outpen); -} - -template void -vbox_blur(T1 begin,T1 end, int len,T2 outpen) -{ - typename T1::difference_type size(end-begin); - vbox_blur(begin,size.x,size.y,len,outpen); -} - -template void -box_blur(T1 begin,T1 end, int blur_w, int blur_h,T2 outpen) -{ - typename T1::difference_type size(end-begin); - hbox_blur(begin,size.x,size.y,blur_w,outpen); vbox_blur(begin,size.x,size.y,blur_h,outpen); -} - -template void -box_blur(T1 begin,T1 end, int blursize,T2 outpen) -{ - typename T1::difference_type size(end-begin); - hbox_blur(begin,size.x,size.y,blursize,outpen); vbox_blur(begin,size.x,size.y,blursize,outpen); -} - -_ETL_END_NAMESPACE - -/* === E X T E R N S ======================================================= */ - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_bspline.h b/ETL/trunk/ETL/_bspline.h deleted file mode 100644 index edc00a7..0000000 --- a/ETL/trunk/ETL/_bspline.h +++ /dev/null @@ -1,237 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library -** B-Spline Class Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__BSPLINE_H -#define __ETL__BSPLINE_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include "_curve_func.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -template , class D=distance_func > -class bspline : public std::unary_function -{ -public: - typedef T value_type; - typedef K knot_type; - typedef std::vector knot_container; - typedef std::vector cpoint_container; - typedef typename knot_container::iterator knot_iterator; - typedef typename cpoint_container::iterator cpoint_iterator; - - typedef C affine_func_type; - typedef D distance_func_type; - -protected: - affine_func_type affine_func; - distance_func_type distance_func; - -private: - int m; - knot_container _knots; - cpoint_container _cpoints; - bool _loop; - -public: - bspline():m(2),_loop(false) { } - - int get_m()const { return m-1; }; - int set_m(int new_m) { m=new_m+1; return m-1; }; - - bool set_loop(bool x) { _loop=x; reset_knots(); return _loop; } - - knot_container & knots() { return _knots; }; - cpoint_container & cpoints() { return _cpoints; }; - - const knot_container & knots()const { return _knots; }; - const cpoint_container & cpoints()const { return _cpoints; }; - - void reset_knots() - { - int i; - - if(!_loop) - { - _knots.clear(); - if(!_cpoints.size()) - return; - while(m>(signed)_cpoints.size()) - m--; - for(i=0;i(signed)_cpoints.size()) - m--; - for(i=0;i<=(signed)_cpoints.size()-m+1;i++) - *_knots.insert(_knots.end())=i; - } - } - - int calc_curve_segment(knot_type t)const - { - int k; - if(t<0) - t=0; - if(t>=_knots.back()) - t=_knots.back()-0.0001; - for(k=0;_knots[k]>t || _knots[k+1]<=t;k++) - ; - - return k; - } - - knot_container get_segment_knots(int i)const - { - if(i+1=(signed)_knots.size()) - { - knot_container ret(_knots.begin()+i-m+1,_knots.end()); - return ret; - } - return knot_container(_knots.begin()+i-m+1, _knots.begin()+i+m); - } - - cpoint_container get_segment_cpoints(int i)const - { - if(i+1=(signed)_knots.size()) - { - return cpoint_container(); - } - return cpoint_container(_cpoints.begin()+i-m+1, _cpoints.begin()+i+1); - } - - cpoint_container calc_shell(knot_type t, int level)const - { - int - i=calc_curve_segment(t), - j,k; - - knot_container u=get_segment_knots(i); - - cpoint_container d=get_segment_cpoints(i); - - if(!d.size()) - return cpoint_container(); - - for(j=0;d.size()>1 && j1;d.pop_back(),j++) - { - for(k=0;k<(signed)d.size()-1;k++) - { - d[k]=affine_func(d[k],d[k+1],((t-u[j+k+1])/(u[m+k]-u[j+k+1]))); - } - } - return d.front(); - } - - cpoint_iterator find_closest_cpoint(const value_type &point, typename distance_func_type::result_type max) - { - cpoint_iterator i=_cpoints.begin(); - cpoint_iterator ret=i; - typename distance_func_type::result_type dist=distance_func(point,_cpoints[0]); - - // The distance function returns "cooked" (ie: squared) - // distances, so we need to cook our max distance for - // the comparison to work correctly. - max=distance_func.cook(max); - - for(++i;i<_cpoints.end();i++) - { - typename distance_func_type::result_type thisdist=distance_func(point,*i); - - if(thisdist - -#include "hermite" - -/* === M A C R O S ========================================================= */ - -//#ifndef _EPSILON -//#define _EPSILON 0.0000001 -//#endif - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -template -class derivative : public std::unary_function -{ - T func; - typename T::argument_type epsilon; -public: - explicit derivative(const T &x, const typename T::argument_type &epsilon=0.000001):func(x),epsilon(epsilon) { } - - typename T::result_type - operator()(const typename T::argument_type &x)const - { - return (func(x+epsilon)-func(x))/epsilon; - } -}; - -template -class derivative > : public std::unary_function::argument_type,typename hermite::result_type> -{ - hermite func; -public: - explicit derivative(const hermite &x):func(x) { } - - typename hermite::result_type - operator()(const typename hermite::argument_type &x)const - { - T a = func[0], b = func[1], c = func[2], d = func[3]; - typename hermite::argument_type y(1-x); - return ((b-a)*y*y + (c-b)*x*y*2 + (d-c)*x*x) * 3; - } -}; - -template -class integral : public std::binary_function -{ - T func; - int samples; -public: - explicit integral(const T &x, const int &samples=500):func(x),samples(samples) { } - - typename T::result_type - operator()(typename T::argument_type x,typename T::argument_type y)const - { - typename T::result_type ret=0; - int i=samples; - const typename T::argument_type increment=(y-x)/i; - - for(;i;i--,x+=increment) - ret+=(func(x)+func(x+increment))*increment/2; - return ret; - } -}; - -_ETL_END_NAMESPACE - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_clock_base.h b/ETL/trunk/ETL/_clock_base.h deleted file mode 100644 index 32d8742..0000000 --- a/ETL/trunk/ETL/_clock_base.h +++ /dev/null @@ -1,133 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library -** Clock Abstraction Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__CLOCK_H -#define __ETL__CLOCK_H - -/* === H E A D E R S ======================================================= */ - -#ifndef WIN32 -#include -#else -inline void sleep(int i) { Sleep(i*1000); } -#endif - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -inline void yield() { sleep(0); } - -/*! ======================================================================== -** \class clock_base -** \brief clock abstraction -** -** A more detailed description needs to be written. -*/ -template -class clock_base : public DESC -{ -public: - typedef typename DESC::value_type value_type; - -private: - typedef clock_base _clock; - typedef typename DESC::timestamp timestamp; - - timestamp base_time; - - using DESC::get_current_time; - using DESC::realtime; - using DESC::one_second; -public: - - clock_base() { reset(); } - - void reset() - { get_current_time(base_time); } - - value_type operator()()const - { return timestamp_to_seconds(get_current_time()-base_time); } - - value_type pop_time() - { - // Grab the old base time - timestamp old_time=base_time; - - // Put the current time into base_time - get_current_time(base_time); - - return timestamp_to_seconds(base_time-old_time); - } - - static void - sleep(const value_type &length) - { - if(!realtime()) - ::sleep((int)(length+0.5)); - else - { - _clock timer; - timer.reset(); - value_type val; - for(val=timer();one_second() -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -class clock_desc_gettimeofday -{ -public: - typedef double value_type; - - inline static bool realtime() - { return true; } - - inline static bool proctime() - { return false; } - - inline static value_type - one_second() - { return 1.0f; } - - inline static value_type precision() - { return one_second()/(value_type)1000000.0f; } - - inline static const char *description() - { return "UNIX gettimeofday()"; }; - -protected: - class timestamp : public timeval - { - timestamp(int sec, int usec) - { tv_sec=sec; tv_usec=usec; } - - friend class clock_desc_gettimeofday; - public: - timestamp() { } - - - inline timestamp operator-(const timestamp &rhs)const - { - timestamp ret; - ret.tv_usec=tv_usec-rhs.tv_usec; - - if(ret.tv_usec<0) - { - ret.tv_sec=tv_sec-rhs.tv_sec-1; - ret.tv_usec+=1000000; - } - else - ret.tv_sec=tv_sec-rhs.tv_sec; - return ret; - } - - inline timestamp operator+(timestamp rhs)const - { - rhs.tv_usec+=tv_usec; - - if(rhs.tv_usec>1000000) - { - rhs.tv_sec+=tv_sec+1; - rhs.tv_usec-=1000000; - } - else - rhs.tv_sec+=tv_sec; - return rhs; - } - - inline bool operator<(const timestamp &rhs)const - { return tv_sec -# define __sys_clock ::clock -# define __sys_time ::time -#else -# ifdef __GNUG__ -# include -# define __sys_clock ::clock -# define __sys_time ::time -# else -typedef int clock_t; -typedef int time_t; -extern clock_t _clock(); -extern time_t _time(time_t *); -# define CLOCKS_PER_SEC 1000 -# define __sys_clock _clock -# define __sys_time _time -# endif -#endif - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -class clock_desc_sys_clock -{ -public: - typedef float value_type; - - inline static bool realtime() - { return false; } - - inline static bool proctime() - { return true; } - - inline static value_type - one_second() - { return 1.0f; } - - inline static value_type precision() - { return one_second()/(value_type)CLOCKS_PER_SEC; } - - inline static const char *description() - { return "ANSI C clock()"; }; - -protected: - typedef clock_t timestamp; - - static void - get_current_time(timestamp &time) - { time=__sys_clock(); } - - static timestamp - get_current_time() - { return __sys_clock(); } - - static value_type - timestamp_to_seconds(const timestamp &x) - { return precision()*x; } - - static timestamp - seconds_to_timestamp(const value_type &x) - { return (timestamp)(x*(value_type)CLOCKS_PER_SEC+0.5); } - -}; - -class clock_desc_sys_time -{ -public: - typedef float value_type; - - inline static bool realtime() - { return true; } - - inline static bool proctime() - { return false; } - - inline static value_type - one_second() - { return 1.0f; } - - inline static value_type precision() - { return one_second(); } - - inline static const char *description() - { return "ANSI C time()"; }; - -protected: - typedef time_t timestamp; - - static void - get_current_time(timestamp &time) - { __sys_time(&time); } - - static timestamp - get_current_time() - { return __sys_time(NULL); } - - static value_type - timestamp_to_seconds(const timestamp &x) - { return (value_type)x; } - - static timestamp - seconds_to_timestamp(const value_type &x) - { return (timestamp)(x+(value_type)0.5f); } -}; - -_ETL_END_NAMESPACE - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_clock_win32hpcount.h b/ETL/trunk/ETL/_clock_win32hpcount.h deleted file mode 100644 index 561a9d4..0000000 --- a/ETL/trunk/ETL/_clock_win32hpcount.h +++ /dev/null @@ -1,98 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library -** Win32 Clock Description Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__CLOCK_WIN32HPCOUNT_H -#define __ETL__CLOCK_WIN32HPCOUNT_H - -/* === H E A D E R S ======================================================= */ - -#define WIN32_LEAN_AND_MEAN -#include - -/* === M A C R O S ========================================================= */ - -#if defined(__GNUG__) && defined(__int64) -#undef __int64 -#define __int64 long long int -#endif - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -class clock_desc_win32hpcount -{ -public: - typedef double value_type; - - static bool realtime() - { return true; } - - static bool proctime() - { return false; } - - static value_type - one_second() - { return 1.0f; } - - static value_type precision() - { - __int64 freq; - QueryPerformanceFrequency((LARGE_INTEGER*)&freq); - return one_second()/(value_type)freq; - } - - static const char *description() - { return "Win32 QueryPerformanceCounter()"; }; - -protected: - typedef __int64 timestamp; - - static void - get_current_time(timestamp &x) - { QueryPerformanceCounter((LARGE_INTEGER*)&x);} - - static timestamp - get_current_time() - { timestamp ret; QueryPerformanceCounter((LARGE_INTEGER*)&ret); return ret; } - - static value_type - timestamp_to_seconds(const timestamp &x) - { return precision()*x; } - - static timestamp - seconds_to_timestamp(const value_type &x) - { return (timestamp)(x/precision()); } -}; - -_ETL_END_NAMESPACE - -/* === E N D =============================================================== */ - -#endif - diff --git a/ETL/trunk/ETL/_condition.h b/ETL/trunk/ETL/_condition.h deleted file mode 100644 index 26a4d2d..0000000 --- a/ETL/trunk/ETL/_condition.h +++ /dev/null @@ -1,70 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library -** Mutex Abstraction Class Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__CONDITION_H_ -#define __ETL__CONDITION_H_ - -/* === H E A D E R S ======================================================= */ - -/* === M A C R O S ========================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -class condition : private mutex -{ - bool flag; -public: - condition() - { flag=false; } - ~condition() - { } - void operator()() - { flag=true; } - void wait() - { - mutex::lock lock(*this); - - while(!flag)Yield(); - flag=false; - } - void wait_next() - { - mutex::lock lock(*this); - - flag=false; - while(!flag)Yield(); - } -}; - -_ETL_END_NAMESPACE - -/* === E X T E R N S ======================================================= */ - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_curve.h b/ETL/trunk/ETL/_curve.h deleted file mode 100644 index e6ddbd3..0000000 --- a/ETL/trunk/ETL/_curve.h +++ /dev/null @@ -1,80 +0,0 @@ -/*! ======================================================================== -** Extended Template Library -** Curve Class Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__CURVE_H -#define __ETL__CURVE_H - -/* === H E A D E R S ======================================================= */ - -#include "_hermite.h" -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE -/* -#ifdef AUTO -#undef AUTO -#endif -#ifdef LINEAR -#undef LINEAR -#endif -#ifdef ABSOLUTE -#undef ABSOLUTE -#endif -#ifdef FAST_TO_SLOW -#undef FAST_TO_SLOW -#endif - -template -class curve -{ -public: - typedef T value_type; -private: - enum interpolate_type - { - AUTO, - LINEAR, - ABSOLUTE, - FAST_TO_SLOW, - - }; -public: -}; -*/ -_ETL_END_NAMESPACE - -/* === E X T E R N S ======================================================= */ - -/* === E N D =============================================================== */ - -#endif - diff --git a/ETL/trunk/ETL/_curve_func.h b/ETL/trunk/ETL/_curve_func.h deleted file mode 100644 index b2898aa..0000000 --- a/ETL/trunk/ETL/_curve_func.h +++ /dev/null @@ -1,68 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library -** Utility Curve Template Class Implementations -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__CURVE_FUNC_H -#define __ETL__CURVE_FUNC_H - -/* === H E A D E R S ======================================================= */ - -#include - -/* -- C L A S S E S --------------------------------------------------------- */ - -template -struct affine_combo -{ - // from (a) to (x) : x = a(1-t) + b(t) - T operator()(const T &a,const T &b,const K &t)const - { - return T( (b-a)*t+a ); - } - - // from (x) to (a) : a = (x-b(t)) / (1-t) - T reverse(const T &x, const T &b, const K &t)const - { - return T( (x-t*b)*(static_cast(1)/(static_cast(1)-t)) ); - } -}; - -template -struct distance_func : public std::binary_function -{ - K operator()(const T &a,const T &b)const - { - T delta=b-a; - return static_cast(delta*delta); - } - - K cook(const K &x)const { return x*x; } - K uncook(const K &x)const { return sqrt(x); } - -}; - -/* -- E N D ----------------------------------------------------------------- */ - -#endif diff --git a/ETL/trunk/ETL/_fastangle.h b/ETL/trunk/ETL/_fastangle.h deleted file mode 100644 index 322a8cd..0000000 --- a/ETL/trunk/ETL/_fastangle.h +++ /dev/null @@ -1,461 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library -** Fast fastangle Abstraction Class Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__FASTANGLE_H -#define __ETL__FASTANGLE_H - -/* === H E A D E R S ======================================================= */ - -#include -#include - -#include "_fastangle_tables.h" - -/* === M A C R O S ========================================================= */ - -#ifndef PI -# define PI (3.1415926535897932384626433832795029L) -#endif - -#define ETL_FASTANGLE_INIT() - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -/*! ======================================================================== -** \class fastangle -** \brief Optimized abstraction of the concept of an angle -** -** A more detailed description needs to be written. -*/ -class fastangle -{ -public: - typedef double value_type; - -protected: - typedef fixed_base unit; - - unit v; //! Stored in rotations - -public: - - /* - ** Arithmetic Operators - */ - - //! fastangle Addition Operator - fastangle - operator+(const fastangle &rhs)const - { - fastangle ret; - ret.v=v+rhs.v; - return ret; - } - - //! fastangle Subtraction Operator - /*! \sa fastangle dist(const fastangle &) */ - fastangle - operator-(const fastangle &rhs)const - { - fastangle ret; - ret.v=v-rhs.v; - return ret; - } - - //! fastangle Scalar Multiplication Operator - /*! This operator will multiply the given - fastangle by the given scalar value. */ - fastangle - operator*(const unit &rhs)const - { - fastangle ret; - ret.v=v*rhs; - return ret; - } - - fastangle - operator/(const unit &rhs)const - { - fastangle ret; - ret.v=v/rhs; - return ret; - } - - const fastangle & - operator+=(const fastangle &rhs) - { - v+=rhs.v; - return *this; - } - - const fastangle & - operator-=(const fastangle &rhs) - { - v-=rhs.v; - return *this; - } - - const fastangle & - operator*=(const unit &rhs) - { - v*=rhs; - return *this; - } - - const fastangle & - operator/=(const unit &rhs) - { - v/=rhs; - return *this; - } - - //! fastangle Negation - fastangle - operator-()const - { - fastangle ret; - ret.v=-v; - return ret; - } - - //! 180 degree rotation operator - /*! Returns the fastangle directly opposite of - the given fastangle, and will yield a result - between 0 and 2PI */ - fastangle - operator~()const - { - fastangle ret; - ret.v=(unit)std::floor(v+0.5f); - return ret; - } - - /*! Returns true if the shortest - fastangle between the left-hand and - right-hand side is clockwise */ - bool - operator<(const fastangle &rhs)const - { return v(const fastangle &rhs)const - { return v>rhs.v; } -// { return dist(rhs).v>(value_type)0.0; } - - /*! Returns true if the shortest - fastangle between the left-hand and - right-hand side is clockwise, - or if the angles are refer to the same - point on the unit circle. */ - bool - operator<=(const fastangle &rhs)const - { return v<=rhs.v; } -// { return dist(rhs).v<=(value_type)0.0; } - - /*! Returns true if the shortest - fastangle between the left-hand and - right-hand side is counter-clockwise, - or if the angles are refer to the same - point on the unit circle. */ - bool - operator>=(const fastangle &rhs)const - { return v>=rhs.v; } -// { return dist(rhs).v>=(value_type)0.0; } - - /*! Returns true if the angles - are refer to the same point - on the unit circle. */ - bool - operator==(const fastangle &rhs)const - { return v==rhs.v; } -// { return dist(rhs).v==(value_type)0.0; } - - /*! Returns false if the angles - are refer to the same point - on the unit circle. */ - bool - operator!=(const fastangle &rhs)const - { return v!=rhs.v; } -// { return dist(rhs).v!=(value_type)0.0; } - - //! fastangle Difference Function - /*! This function will return the - shortest physical distance between - two angles, from -PI/2 to PI/2 - \warning Not yet tested - \sa fastangle operator-(const fastangle &) */ - fastangle - dist(const fastangle &rhs)const - { - fastangle ret; - ret.v=v-rhs.v; - ret.v-=(unit)std::floor(ret.v+0.5f); - return ret; - } - - //! Rotation Modulus - /*! This function will return the - value of the fastangle between 0 and 2PI */ - fastangle - mod()const - { - fastangle ret(*this); - ret.v-=(unit)std::floor(ret.v); - return ret; - } - - static fastangle - zero() - { - fastangle ret; - ret.v=0; - return ret; - } - - bool operator!()const { return v==unit(0); } - - /* - ** Conversion Classes - */ - - class radians; - class degrees; - class rotations; - - /* - ** Trigonometric Classes - */ - - class sin; - class cos; - class tan; - - /* - ** Friend classes - */ - - friend class radians; - friend class degrees; - friend class rotations; - friend class sin; - friend class cos; - friend class tan; - - /* - ** Bleh... - */ - - typedef radians rad; - typedef degrees deg; - typedef rotations rot; - -}; // END of class fastangle - -/*! ======================================================================== -** \class fastangle::radians -** \brief fastangle representation in radians -** -** A more detailed description needs to be written. -*/ -class fastangle::radians : public fastangle -{ -public: - radians(const value_type &x) { v=x/((value_type)PI*2.0f); } - radians(const fastangle &a):fastangle(a) { } - radians mod()const { return fastangle::mod(); } - radians dist(const fastangle &rhs)const { return fastangle::dist(rhs); } - operator value_type()const { return get(); } - value_type get()const { return (value_type)v*(value_type)PI*2.0f; } -}; // END of class fastangle::radians - -/*! ======================================================================== -** \class fastangle::degrees -** \brief fastangle representation in degrees -** -** A more detailed description needs to be written. -*/ -class fastangle::degrees : public fastangle -{ -public: - degrees(const value_type &x) { v=x/360; } - degrees(const fastangle &a):fastangle(a) { } - degrees mod()const { return fastangle::mod(); } - degrees dist(const fastangle &rhs)const { return fastangle::dist(rhs); } - operator value_type()const { return get(); } - value_type get()const { return v*360/*(value_type)(v-::floor(v))*360*/; } -}; // END of class fastangle::degrees - -/*! ======================================================================== -** \class fastangle::rotations -** \brief fastangle representation in rotations -** -** A more detailed description needs to be written. -*/ -class fastangle::rotations : public fastangle -{ -public: - rotations(const value_type &x) { v=x; } - rotations(const fastangle &a):fastangle(a) { } - rotations mod()const { return fastangle::mod(); } - rotations dist(const fastangle &rhs)const { return fastangle::dist(rhs); } - operator value_type()const { return get(); } - value_type get()const { return v; } -}; // END of class fastangle::rotations - -/*! ======================================================================== -** \class fastangle::sin -** \brief fastangle representation as a sine function -** -** A more detailed description needs to be written. -*/ -class fastangle::sin : public fastangle -{ -public: - sin(const value_type &x) { v.data()=_fastangle_asin_table[(int)((x+1)*(value_type)(1<<(ETL_FASTANGLE_LOOKUP_RES-1)))]; } - sin(const fastangle &a):fastangle(a) { } - sin mod()const { return fastangle::mod(); } - sin dist(const fastangle &rhs)const { return fastangle::dist(rhs); } - operator value_type()const { return get(); } - value_type get()const { return (value_type)_fastangle_sin_table[v.data()&( (1<1) - v.data()=(1<<(ETL_FASTANGLE_LOOKUP_RES-2))-_fastangle_atan_table[(int)(((1.0/x)+1)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]; - else if(x<-1) - v.data()=-(1<<(ETL_FASTANGLE_LOOKUP_RES-1)) + (1<<(ETL_FASTANGLE_LOOKUP_RES-2)) - _fastangle_atan_table[(int)(((1.0/x)+1)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]; - else - v.data()=_fastangle_atan_table[(int)((x+1)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]; - } - - tan(const value_type &y,const value_type &x) - { - if(x>=0 && y>=0) // First quadrant - { - if(y>x) - v.data()=(1<<(ETL_FASTANGLE_LOOKUP_RES-2))-_fastangle_atan_table[(int)(((x/y)+1)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]; - else - v.data()=_fastangle_atan_table[(int)(((y/x)+1)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]; - } - else if(x>=0 && y<0) // Fourth quadrant - { - if(-y>x) - v.data()=-(1<<(ETL_FASTANGLE_LOOKUP_RES-1)) + (1<<(ETL_FASTANGLE_LOOKUP_RES-2))-_fastangle_atan_table[(int)(((x/y)+1.0)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]; - else - v.data()=_fastangle_atan_table[(int)(((y/x)+1.0)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]; - } - else if(x<0 && y>=0) // Second quadrant - { - if(y>-x) - v.data()=(1<<(ETL_FASTANGLE_LOOKUP_RES-2))-_fastangle_atan_table[(int)(((x/y)+1.0)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]; - else - v.data()=_fastangle_atan_table[(int)(((y/x)+1.0)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]+(1<<(ETL_FASTANGLE_LOOKUP_RES-1)); - } - else if(x<0 && y<0) // Third Quadrant - { - if(-y>-x) - v.data()=(1<<(ETL_FASTANGLE_LOOKUP_RES-2))-_fastangle_atan_table[(int)(((x/y)+1.0)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))] - (1<<(ETL_FASTANGLE_LOOKUP_RES-1)); - else - v.data()=_fastangle_atan_table[(int)(((y/x)+1.0)*(value_type)((1<<(ETL_FASTANGLE_LOOKUP_RES-1))-1))]-(1<<(ETL_FASTANGLE_LOOKUP_RES-1)); - } - else v.data()=0; - } - tan(const fastangle &a):fastangle(a) { } - tan mod()const { return fastangle::mod(); } - tan dist(const fastangle &rhs)const { return fastangle::dist(rhs); } - operator value_type()const { return get(); } - value_type get()const { return (value_type)_fastangle_tan_table[v.data()&( (1< -struct affine_combo -{ - etl::fastangle operator()(const etl::fastangle &a,const etl::fastangle &b,const float &t)const - { - return b.dist(a)*t+a; - } - - etl::fastangle reverse(const etl::fastangle &x, const etl::fastangle &b, const float &t)const - { - return x.dist(b*t)*((float)1/((float)1-t)); - } -}; - -template <> -struct distance_func : public std::binary_function -{ - etl::fastangle operator()(const etl::fastangle &a,const etl::fastangle &b)const - { - etl::fastangle delta=b.dist(a); - if(delta - -/* === M A C R O S ========================================================= */ - -// the "+0.5" code was commented out - maybe to make thing run faster? -// it can be re-enabled by uncommenting this next line: -// #define ROUND_TO_NEAREST_INTEGER - -#ifndef ETL_FIXED_TYPE -# define ETL_FIXED_TYPE int -#endif - -#ifndef ETL_FIXED_BITS -#define ETL_FIXED_BITS 12 -#endif - -#ifndef ETL_FIXED_EPSILON -#define ETL_FIXED_EPSILON _EPSILON() -#endif - -#ifdef __GNUC___ -#define ETL_ATTRIB_CONST __attribute__ ((const)) -#define ETL_ATTRIB_PURE __attribute__ ((pure)) -#define ETL_ATTRIB_INLINE __attribute__ ((always_inline)) -#else -#define ETL_ATTRIB_CONST -#define ETL_ATTRIB_PURE -#define ETL_ATTRIB_INLINE -#endif - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -// Forward declarations -template class fixed_base; -//template<> class fixed_base; - -_ETL_END_NAMESPACE - -_STD_BEGIN_NAMESPACE -template _ETL::fixed_base abs(const _ETL::fixed_base&); -template _ETL::fixed_base cos(const _ETL::fixed_base&); -template _ETL::fixed_base cosh(const _ETL::fixed_base&); -template _ETL::fixed_base exp(const _ETL::fixed_base&); -template _ETL::fixed_base log(const _ETL::fixed_base&); -template _ETL::fixed_base log10(const _ETL::fixed_base&); -template _ETL::fixed_base pow(const _ETL::fixed_base&, int); -template _ETL::fixed_base pow(const _ETL::fixed_base&, const T&); -template _ETL::fixed_base pow(const _ETL::fixed_base&, - const _ETL::fixed_base&); -template _ETL::fixed_base pow(const _ETL::fixed_base&, const _ETL::fixed_base&); -template _ETL::fixed_base sin(const _ETL::fixed_base&); -template _ETL::fixed_base sinh(const _ETL::fixed_base&); -template _ETL::fixed_base sqrt(const _ETL::fixed_base&); -template _ETL::fixed_base tan(const _ETL::fixed_base&); -template _ETL::fixed_base tanh(const _ETL::fixed_base&); -_STD_END_NAMESPACE -_ETL_BEGIN_NAMESPACE - -/*! ======================================================================== -** \class fixed_base -** \brief Fixed-point template base class -** -** A more detailed description needs to be written. -*/ -template -class fixed_base -{ -public: - typedef T value_type; -private: - T _data; - - typedef fixed_base _fixed; - typedef fixed_base self_type; - - inline static bool _TYPE_SMALLER_THAN_INT() ETL_ATTRIB_CONST ETL_ATTRIB_INLINE; - inline static bool _USING_ALL_BITS() ETL_ATTRIB_CONST ETL_ATTRIB_INLINE; - inline static value_type _ONE() ETL_ATTRIB_CONST ETL_ATTRIB_INLINE; - inline static value_type _F_MASK() ETL_ATTRIB_CONST ETL_ATTRIB_INLINE; - inline static float _EPSILON() ETL_ATTRIB_CONST ETL_ATTRIB_INLINE; - - class raw { }; -public: - fixed_base()ETL_ATTRIB_INLINE; - fixed_base(const float &f)ETL_ATTRIB_INLINE; - fixed_base(const double &f)ETL_ATTRIB_INLINE; - fixed_base(const long double &f)ETL_ATTRIB_INLINE; - fixed_base(const int &i)ETL_ATTRIB_INLINE; - fixed_base(const int &n,const int &d)ETL_ATTRIB_INLINE; //!< Fraction constructor - fixed_base(const _fixed &x)ETL_ATTRIB_INLINE; - fixed_base(value_type x,raw)ETL_ATTRIB_INLINE; - - T &data() ETL_ATTRIB_PURE ETL_ATTRIB_INLINE; - const T &data()const ETL_ATTRIB_PURE ETL_ATTRIB_INLINE; - - const _fixed& operator+=(const _fixed &rhs) ETL_ATTRIB_INLINE; - const _fixed& operator-=(const _fixed &rhs) ETL_ATTRIB_INLINE; - template const _fixed& operator*=(const U &rhs) ETL_ATTRIB_INLINE; - template const _fixed& operator/=(const U &rhs) ETL_ATTRIB_INLINE; - const _fixed& operator*=(const _fixed &rhs) ETL_ATTRIB_INLINE; - const _fixed& operator/=(const _fixed &rhs) ETL_ATTRIB_INLINE; - const _fixed& operator*=(const int &rhs) ETL_ATTRIB_INLINE; - const _fixed& operator/=(const int &rhs) ETL_ATTRIB_INLINE; - - - template _fixed operator+(const U &rhs)const ETL_ATTRIB_INLINE; - template _fixed operator-(const U &rhs)const ETL_ATTRIB_INLINE; - template _fixed operator*(const U &rhs)const ETL_ATTRIB_INLINE; - template _fixed operator/(const U &rhs)const ETL_ATTRIB_INLINE; - _fixed operator+(const _fixed &rhs)const ETL_ATTRIB_INLINE; - _fixed operator-(const _fixed &rhs)const ETL_ATTRIB_INLINE; - _fixed operator*(const _fixed &rhs)const ETL_ATTRIB_INLINE; - _fixed operator/(const _fixed &rhs)const ETL_ATTRIB_INLINE; - _fixed operator*(const int &rhs)const ETL_ATTRIB_INLINE; - _fixed operator/(const int &rhs)const ETL_ATTRIB_INLINE; - _fixed operator*(const float &rhs)const ETL_ATTRIB_INLINE; - _fixed operator*(const double &rhs)const ETL_ATTRIB_INLINE; - - // Negation Operator - _fixed operator-()const ETL_ATTRIB_INLINE; - - // Casting Operators - inline operator float()const ETL_ATTRIB_INLINE; - inline operator double()const ETL_ATTRIB_INLINE; - inline operator long double()const ETL_ATTRIB_INLINE; - inline operator int()const ETL_ATTRIB_INLINE; - inline operator bool()const ETL_ATTRIB_INLINE; - - _fixed floor()const; - _fixed ceil()const; - _fixed round()const; - - bool operator==(const _fixed &rhs)const { return data()==rhs.data(); } - bool operator!=(const _fixed &rhs)const { return data()!=rhs.data(); } - bool operator<(const _fixed &rhs)const { return data()(const _fixed &rhs)const { return data()>rhs.data(); } - bool operator<=(const _fixed &rhs)const { return data()<=rhs.data(); } - bool operator>=(const _fixed &rhs)const { return data()>=rhs.data(); } -}; - - -template -fixed_base::fixed_base() -{} - -template -fixed_base::fixed_base(const _fixed &x):_data(x._data) -{} - -template -fixed_base::fixed_base(const float &f):_data(static_cast(f*_ONE() -#ifdef ROUND_TO_NEAREST_INTEGER - +0.5f -#endif - )) {} - -template -fixed_base::fixed_base(const double &f):_data(static_cast(f*_ONE() -#ifdef ROUND_TO_NEAREST_INTEGER - +0.5 -#endif - )) {} - -template -fixed_base::fixed_base(const long double &f):_data(static_cast(f*_ONE() -#ifdef ROUND_TO_NEAREST_INTEGER - +0.5 -#endif - )) {} - -template -fixed_base::fixed_base(const int &i):_data(i< -fixed_base::fixed_base(value_type x,raw):_data(x) { } - -template -fixed_base::fixed_base(const int &n,const int &d):_data((n< inline bool -fixed_base::_TYPE_SMALLER_THAN_INT() -{ - return sizeof(T) inline bool -fixed_base::_USING_ALL_BITS() -{ - return sizeof(T)*8==FIXED_BITS; -} - -template inline T -fixed_base::_ONE() -{ - return static_cast((_USING_ALL_BITS()?~T(0):1< inline T -fixed_base::_F_MASK() -{ - return static_cast(_USING_ALL_BITS()?~T(0):_ONE()-1); -} - -template inline float -fixed_base::_EPSILON() -{ - return 1.0f/((float)_ONE()*2); -} - - -template T & -fixed_base::data() -{ - return _data; -} - -template const T & -fixed_base::data()const -{ - return _data; -} - -//! fixed+=fixed -template const fixed_base & -fixed_base::operator+=(const _fixed &rhs) -{ - _data+=rhs._data; - return *this; -} - -//! fixed-=fixed -template const fixed_base & -fixed_base::operator-=(const _fixed &rhs) -{ - _data-=rhs._data; - return *this; -} - -//! fixed*=fixed -template const fixed_base & -fixed_base::operator*=(const _fixed &rhs) -{ - if(_TYPE_SMALLER_THAN_INT()) - _data=static_cast((int)_data*(int)rhs._data>>FIXED_BITS); - else - { - _data*=rhs._data; - _data>>=FIXED_BITS; - } - - return *this; -} - -//! fixed/=fixed -template const fixed_base & -fixed_base::operator/=(const _fixed &rhs) -{ - if(_TYPE_SMALLER_THAN_INT()) - _data=static_cast((int)_data/(int)rhs._data< template const fixed_base & -fixed_base::operator*=(const U &rhs) -{ - return operator*=(fixed_base(rhs)); -} - -template template const fixed_base & -fixed_base::operator/=(const U &rhs) -{ - return operator/=(fixed_base(rhs)); -} - -//! fixed*=int -template const fixed_base & -fixed_base::operator*=(const int &rhs) -{ - _data*=rhs; return *this; -} - -//! fixed/=int -template const fixed_base & -fixed_base::operator/=(const int &rhs) -{ - _data/=rhs; return *this; -} - - - - - - - -//! fixed + fixed -template fixed_base -fixed_base::operator+(const _fixed &rhs)const -{ - _fixed ret; - ret._data=_data+rhs._data; - return ret; -} - -//! fixed - fixed -template fixed_base -fixed_base::operator-(const _fixed &rhs)const -{ - _fixed ret; - ret._data=_data-rhs._data; - return ret; -} - -//! fixed * fixed -template fixed_base -fixed_base::operator*(const _fixed &rhs)const -{ - _fixed ret; - ret._data=((_data*rhs._data)>>FIXED_BITS); - return ret; - //return reinterpret_cast<_fixed>((_data*rhs._data)>>FIXED_BITS); -} - -//! fixed / fixed -template fixed_base -fixed_base::operator/(const _fixed &rhs)const -{ - _fixed ret; - ret._data=((_data/rhs._data)<((_data/rhs._data)< template fixed_base -fixed_base::operator+(const U &rhs) const -{ - return operator+(fixed_base(rhs)); -} - -//! fixed - ... -template template fixed_base -fixed_base::operator-(const U &rhs) const -{ - return operator-(fixed_base(rhs)); -} - -//! fixed * ... -template template fixed_base -fixed_base::operator*(const U &rhs) const -{ - return operator*(fixed_base(rhs)); -} - -//! fixed / ... -template template fixed_base -fixed_base::operator/(const U &rhs) const -{ - return operator/(fixed_base(rhs)); -} - -//! fixed * int -template fixed_base -fixed_base::operator*(const int &rhs)const -{ - _fixed ret; - ret._data=_data*rhs; - return ret; - //return reinterpret_cast<_fixed>(_data*rhs); -} - -//! fixed * float -template fixed_base -fixed_base::operator*(const float &rhs)const -{ - return (*this)*_fixed(rhs); -} - -//! fixed * double -template fixed_base -fixed_base::operator*(const double &rhs)const -{ - return (*this)*_fixed(rhs); -} - - -//! fixed / int -template fixed_base -fixed_base::operator/(const int &rhs)const -{ - _fixed ret; - ret._data=_data/rhs; - return ret; - //return reinterpret_cast<_fixed>(_data/rhs); -} - -//! float * fixed -template fixed_base -operator*(const float& lhs, const fixed_base &rhs) -{ - return rhs*lhs; -} - -//! double * fixed -template fixed_base -operator*(const double& lhs, const fixed_base &rhs) -{ - return rhs*lhs; -} - - - - - - -// Negation Operator -template fixed_base -fixed_base::operator-()const -{ - _fixed ret; ret._data=-_data; return ret; -} - -// Casting Operators -template -fixed_base::operator float()const -{ - return static_cast(_data)/static_cast(_ONE()); -} - -template -fixed_base::operator double()const -{ - return static_cast(_data)/static_cast(_ONE()); -} - -template -fixed_base::operator long double()const -{ - return static_cast(_data)/static_cast(_ONE()); -} - -template -fixed_base::operator int()const -{ - return static_cast(_data>>FIXED_BITS); -} - -template -fixed_base::operator bool()const -{ - return static_cast(_data); -} - - -template fixed_base -fixed_base::floor()const -{ - _fixed ret(*this); - ret._data&=~_F_MASK(); - return ret; -} - -template fixed_base -fixed_base::ceil()const -{ - _fixed ret(*this); - if(ret._data&_F_MASK()) - ret._data=(ret._data&~_F_MASK()) + _ONE(); - else - ret._data&=~_F_MASK(); - return ret; -} - -template fixed_base -fixed_base::round()const -{ - _fixed ret(*this); - ret._data+=_ONE()>>1; - ret._data&=~_F_MASK(); - return ret; -} - - - - - - - - - - - - - - - - - - - - - - - - - - -typedef fixed_base fixed; - -_ETL_END_NAMESPACE - -_STD_BEGIN_NAMESPACE - -template -inline _ETL::fixed_base -ceil(const _ETL::fixed_base &rhs) -{ return rhs.ceil(); } - -template -_ETL::fixed_base -floor(const _ETL::fixed_base &rhs) -{ return rhs.floor(); } - -template -_ETL::fixed_base -round(const _ETL::fixed_base &rhs) -{ return rhs.round(); } - -template -_ETL::fixed_base -abs(const _ETL::fixed_base &rhs) -{ return rhs<_ETL::fixed_base(0)?-rhs:rhs; } - -_STD_END_NAMESPACE - -/* -template bool -operator==(const _ETL::fixed_base& lhs, const _ETL::fixed_base& rhs) -{ return lhs.data()==rhs.data(); } - -template bool -operator!=(const _ETL::fixed_base& lhs, const _ETL::fixed_base& rhs) -{ return lhs.data()!=rhs.data(); } - -template bool -operator>(const _ETL::fixed_base& lhs, const _ETL::fixed_base& rhs) -{ return lhs.data()>rhs.data(); } - -template bool -operator<(const _ETL::fixed_base& lhs, const _ETL::fixed_base& rhs) -{ return lhs.data() bool -operator>=(const _ETL::fixed_base& lhs, const _ETL::fixed_base& rhs) -{ return lhs.data()>=rhs.data(); } - -template bool -operator<=(const _ETL::fixed_base& lhs, const _ETL::fixed_base& rhs) -{ return lhs.data()<=rhs.data(); } -*/ - - -#if defined(__GNUC__) && __GNUC__ == 3 -template U -operator*(const U &a,const _ETL::fixed_base &b) - { return a*static_cast(b); } - -template U -operator/(const U &a,const _ETL::fixed_base &b) - { return a/static_cast(b); } - -template U -operator+(const U &a,const _ETL::fixed_base &b) - { return a+static_cast(b); } - -template U -operator-(const U &a,const _ETL::fixed_base &b) - { return a-static_cast(b); } - - -/* -inline const float & -operator*=(float &a,const _ETL::fixed &b) - { a*=(float)b; return a; } - -inline const float & -operator/=(float &a,const _ETL::fixed &b) - { a/=(float)b; return a; } - -inline const float & -operator-=(float &a,const _ETL::fixed &b) - { a-=(float)b; return a; } - -inline const float & -operator+=(float &a,const _ETL::fixed &b) - { a+=(float)b; return a; } -*/ -#endif - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_gaussian.h b/ETL/trunk/ETL/_gaussian.h deleted file mode 100644 index 781b1ab..0000000 --- a/ETL/trunk/ETL/_gaussian.h +++ /dev/null @@ -1,315 +0,0 @@ -/*! ======================================================================== -** Extended Template Library -** Gaussian Blur Template Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__GAUSSIAN_H -#define __ETL__GAUSSIAN_H - -/* === H E A D E R S ======================================================= */ - -#include // for memset() -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -template void -gaussian_blur_5x5_(T pen,int w, int h, -typename T::pointer SC0, -typename T::pointer SC1, -typename T::pointer SC2, -typename T::pointer SC3) -{ - int x,y; - typename T::value_type Tmp1,Tmp2,SR0,SR1,SR2,SR3; - - //typename T::iterator_x iter; - - // Setup the row buffers - for(x=0;x=h) - {yadj=(h-y)-1; SR0=pen.y()[yadj]*1.35;} - else - {yadj=0; SR0=pen.get_value()*1.35; } - - SR1=SR2=SR3=typename T::value_type(); - for(x=0;x=w) - Tmp1=pen[yadj][(w-x)-1]; - else - Tmp1=*pen[yadj]; - - Tmp2=SR0+Tmp1; - SR0=Tmp1; - Tmp1=SR1+Tmp2; - SR1=Tmp2; - Tmp2=SR2+Tmp1; - SR2=Tmp1; - Tmp1=SR3+Tmp2; - SR3=Tmp2; - - // Column Machine - Tmp2=SC0[x]+Tmp1; - SC0[x]=Tmp1; - Tmp1=SC1[x]+Tmp2; - SC1[x]=Tmp2; - Tmp2=SC2[x]+Tmp1; - SC2[x]=Tmp1; - if(y>1&&x>1) - pen[-2][-2]=(SC3[x]+Tmp2)/256; - SC3[x]=Tmp2; - } - pen.dec_x(x); - } - -} - -template void -gaussian_blur_5x5(T pen, int w, int h) -{ - typename T::pointer SC0=new typename T::value_type[w+2]; - typename T::pointer SC1=new typename T::value_type[w+2]; - typename T::pointer SC2=new typename T::value_type[w+2]; - typename T::pointer SC3=new typename T::value_type[w+2]; - - gaussian_blur_5x5_(pen,w,h,SC0,SC1,SC2,SC3); - - delete [] SC0; - delete [] SC1; - delete [] SC2; - delete [] SC3; -} - -template void -gaussian_blur_5x5(T begin, T end) -{ - typename T::difference_type size(end-begin); - - typename T::pointer SC0=new typename T::value_type[size.x+2]; - typename T::pointer SC1=new typename T::value_type[size.x+2]; - typename T::pointer SC2=new typename T::value_type[size.x+2]; - typename T::pointer SC3=new typename T::value_type[size.x+2]; - - gaussian_blur_5x5_(begin,size.x,size.y,SC0,SC1,SC2,SC3); - - delete [] SC0; - delete [] SC1; - delete [] SC2; - delete [] SC3; -} - -template void -gaussian_blur_3x3(T pen,int w, int h) -{ - int x,y; - typename T::value_type Tmp1,Tmp2,SR0,SR1; - -// typename T::iterator_x iter; - - typename T::pointer SC0=new typename T::value_type[w+1]; - typename T::pointer SC1=new typename T::value_type[w+1]; - - // Setup the row buffers - for(x=0;x=h) - {yadj=-1; SR1=SR0=pen.y()[yadj];} - else - {yadj=0; SR1=SR0=pen.get_value(); } - - for(x=0;x=w) - Tmp1=pen[yadj][(w-x)-2]; - else - Tmp1=*pen[yadj]; - - Tmp2=SR0+Tmp1; - SR0=Tmp1; - Tmp1=SR1+Tmp2; - SR1=Tmp2; - - Tmp2=SC0[x]+Tmp1; - SC0[x]=Tmp1; - if(y&&x) - pen[-1][-1]=(SC1[x]+Tmp2)/16; - SC1[x]=Tmp2; - } - pen.dec_x(x); - } - - delete [] SC0; - delete [] SC1; -} - -//! 2D 3x3 pixel gaussian blur -template void -gaussian_blur_3x3(_PEN begin, _PEN end) -{ - typename _PEN::difference_type size(end-begin); - gaussian_blur_3x3(begin,size.x,size.y); -} - -//! 1D 3 pixel gaussian blur -template void -gaussian_blur_3(I begin, I end, bool endpts = true) -{ -// typedef typename I _itertype; -// int i; - typename std::iterator_traits::value_type Tmp1,Tmp2,SR0,SR1; - - SR0=SR1=*begin; - I iter,prev=begin; - for(iter=begin;iter!=end;prev=iter++) - { - Tmp1=*iter; - Tmp2=SR0+Tmp1; - SR0=Tmp1; - Tmp1=SR1+Tmp2; - SR1=Tmp2; - if(iter!=begin && ( endpts || (prev != begin) )) - *prev=(Tmp1)/4; - } - - if(endpts) - { - Tmp1=*prev; - Tmp2=SR0+Tmp1; - SR0=Tmp1; - Tmp1=SR1+Tmp2; - SR1=Tmp2; - *prev=(Tmp1)/4; - } -} - -//! 2D 3x1 pixel gaussian blur -template void -gaussian_blur_3x1(_PEN begin, _PEN end) -{ - typename _PEN::difference_type size=end-begin; - for(;size.y>0;size.y--, begin.inc_y()) - gaussian_blur_3(begin.x(),begin.x()+size.x); -} - -//! 2D 1x3 pixel gaussian blur -template void -gaussian_blur_1x3(_PEN begin, _PEN end) -{ - typename _PEN::difference_type size=end-begin; - for(;size.x>0;size.x--,begin.inc_x()) - gaussian_blur_3(begin.y(),begin.y()+size.y); -} - -template void -gaussian_blur(T pen, int w, int h, int blur_x, int blur_y) -{ - typename T::pointer SC0=new typename T::value_type[w+2]; - typename T::pointer SC1=new typename T::value_type[w+2]; - typename T::pointer SC2=new typename T::value_type[w+2]; - typename T::pointer SC3=new typename T::value_type[w+2]; - - blur_x--; - blur_y--; - - while(blur_x&&blur_y) - { - if(blur_x>=4 && blur_y>=4) - { - gaussian_blur_5x5_(pen,w,h,SC0,SC1,SC2,SC3); - blur_x-=4,blur_y-=4; - } - else if(blur_x>=2 && blur_y>=2) - { - gaussian_blur_3x3(pen,w,h); - blur_x-=2,blur_y-=2; - } - else - blur_x--,blur_y--; - } - while(blur_x) - { - if(blur_x>=2) - { - gaussian_blur_3x1(pen,T(pen).move(w,h)); - blur_x-=2; - } - else - blur_x--; - } - while(blur_y) - { - if(blur_y>=2) - { - gaussian_blur_1x3(pen,T(pen).move(w,h)); - blur_y-=2; - } - else - blur_y--; - } - - delete [] SC0; - delete [] SC1; - delete [] SC2; - delete [] SC3; -} - -template void -gaussian_blur(T begin, T end,int w, int h) -{ - typename T::difference_type size(end-begin); - gaussian_blur(begin,size.x,size.y,w,h); -} - -template void -gaussian_blur(T begin, T end,int w) -{ - typename T::difference_type size(end-begin); - gaussian_blur(begin,size.x,size.y,w,w); -} - -_ETL_END_NAMESPACE - -/* === E X T E R N S ======================================================= */ - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_handle.h b/ETL/trunk/ETL/_handle.h deleted file mode 100644 index 393894c..0000000 --- a/ETL/trunk/ETL/_handle.h +++ /dev/null @@ -1,826 +0,0 @@ -/* === E T L =============================================================== */ -/*! \file _handle.h -** $Id$ -** \brief Template Object Handle Implementation -** \internal -** -** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** \note -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__HANDLE_H -#define __ETL__HANDLE_H - -/* === H E A D E R S ======================================================= */ - -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -#define ETL_SELF_DELETING_SHARED_OBJECT - -/* === C L A S S E S & S T R U C T S ======================================= */ - -#ifdef NDEBUG -#define assert_cast static_cast -#else -#define assert_cast dynamic_cast -#endif - - -_ETL_BEGIN_NAMESPACE - -// Forward Declarations -template class handle; -template class loose_handle; -template class rhandle; - - -// ======================================================================== -/*! \class shared_object _handle.h ETL/handle -** \brief Shared Object Base Class -** \see handle, loose_handle -** \writeme -*/ -class shared_object -{ -private: - mutable int refcount; -#ifdef ETL_LOCK_REFCOUNTS - mutable etl::mutex mtx; -#endif - -protected: - shared_object():refcount(0) { } - -#ifdef ETL_SELF_DELETING_SHARED_OBJECT - virtual ~shared_object() { } -#else - ~shared_object() { } -#endif - -public: - void ref()const - { -#ifdef ETL_LOCK_REFCOUNTS - etl::mutex::lock lock(mtx); -#endif - assert(refcount>=0); - refcount++; - } - - //! Returns \c false if object needs to be deleted - bool unref()const - { - bool ret = true; - { -#ifdef ETL_LOCK_REFCOUNTS - etl::mutex::lock lock(mtx); -#endif - assert(refcount>0); - - refcount--; - - if(refcount==0) { - ret = false; -#ifdef ETL_SELF_DELETING_SHARED_OBJECT - refcount=-666; -#endif - } - } - -#ifdef ETL_SELF_DELETING_SHARED_OBJECT - if (!ret) - delete this; -#endif - return ret; - } - - int count()const { return refcount; } - -}; // END of class shared_object - -// ======================================================================== -/*! \class virtual_shared_object _handle.h ETL/handle -** \brief Virtual Shared Object Base Class -** \see handle, loose_handle -** \writeme -*/ -class virtual_shared_object -{ -protected: - virtual_shared_object() { } -public: - virtual ~virtual_shared_object()=0; - virtual void ref()const=0; - virtual bool unref()const=0; - virtual int count()const=0; - virtual virtual_shared_object *clone()=0; -}; // END of class virtual_shared_object - -// ======================================================================== -/*! \class handle _handle.h ETL/handle -** \brief Object Handle -** \see shared_object, loose_handle -** \writeme -*/ -template -class handle -{ -public: - - typedef T value_type; - typedef T& reference; - typedef const T& const_reference; - typedef T* pointer; - typedef const T* const_pointer; - typedef int count_type; - typedef int size_type; - -protected: -#ifdef _DEBUG -public: -#endif - value_type *obj; //!< Pointer to object - -public: - - //! Default constructor - empty handle - handle():obj(NULL) {} - - //! Constructor that constructs from a pointer to new object - handle(pointer x):obj(x) - { - if(obj) - obj->ref(); - } - - //! Default copy constructor - handle(const handle &x):obj(x.get()) - { - if(obj) - obj->ref(); - } - - //! Handle is released on deletion - ~handle() { detach(); } - - //! Template Assignment operator - /*! \note This class may not be necessary, and may be removed - ** at some point in the future. - */ - /* - template handle & - operator=(const handle &x) - { - if(x.get()==obj) - return *this; - - detach(); - - obj=static_cast(x.get()); - if(obj)obj->ref(); - return *this; - } - */ - - //! Assignment operator - handle & - operator=(const handle &x) - { - if(x.get()==obj) - return *this; - - detach(); - - obj=x.get(); - if(obj)obj->ref(); - return *this; - } - - //! Swaps the values of two handles without reference counts - handle & - swap(handle &x) - { - pointer ptr=x.obj; - x.obj=obj; - obj=ptr; - return *this; - } - - //! Handle detach procedure - /*! unref()'s the object and sets the internal object pointer to \c NULL */ - void - detach() - { - pointer xobj(obj); - obj=0; -#ifdef ETL_SELF_DELETING_SHARED_OBJECT - if(xobj) - xobj->unref(); -#else - if(xobj && !xobj->unref()) - delete xobj; -#endif - } - - // This will be reintroduced with a new function - //void release() { detach(); } - - void reset() { detach(); } - - bool empty()const { return obj==0; } - - //! Creates a new instance of a T object and puts it in the handle. - /*! Uses the default constructor */ - void spawn() { operator=(handle(new T())); } - - handle clone()const { assert(obj); return static_cast(obj->clone()); } - - //! Returns a constant handle to our object - handle constant()const { assert(obj); return *this; } - - //! Returns number of instances - count_type - count()const - { return obj?obj->count():0; } - - //! Returns true if there is only one instance of the object - bool - unique()const - { assert(obj); return count()==1; } - - reference - operator*()const - { assert(obj); return *obj; } - - pointer - operator->()const - { assert(obj); return obj; } - - //! More explicit bool cast - operator bool()const - { return obj!=NULL; } - - operator handle()const - { return handle(static_cast(obj)); } - - //! static_cast\<\> wrapper - template static handle cast_static (const handle &x) { return handle(static_cast (x.get())); } - //! dynamic_cast\<\> wrapper - template static handle cast_dynamic (const handle &x) { return handle(dynamic_cast (x.get())); } - //! const_cast\<\> wrapper - template static handle cast_const (const handle &x) { return handle(const_cast (x.get())); } - //! reinterpret_cast\<\> wrapper - template static handle cast_reinterpret(const handle &x) { return handle(reinterpret_cast(x.get())); } - - template static handle cast_static (const loose_handle &x); - template static handle cast_dynamic (const loose_handle &x); - template static handle cast_const (const loose_handle &x); - template static handle cast_reinterpret(const loose_handle &x); - - template static handle cast_static (const rhandle &x); - template static handle cast_dynamic (const rhandle &x); - template static handle cast_const (const rhandle &x); - template static handle cast_reinterpret(const rhandle &x); - - template static handle cast_static (U* x); - template static handle cast_dynamic (U* x); - template static handle cast_const (U* x); - template static handle cast_reinterpret(U* x); - - //! Returns pointer to the object that is being wrapped - pointer get()const { return obj; } - - bool - operator!()const - { return !obj; } - - //! static_cast<> overload -- Useful for implicit casts - template - operator handle()const - { return handle(static_cast(obj)); } -}; // END of template class handle - -// ======================================================================== -/*! \class rshared_object _handle.h ETL/handle -** \brief Replaceable Shared Object Base Class -** \see rhandle -** \writeme -*/ -class rshared_object : public shared_object -{ -private: - mutable int rrefcount; - -public: - void *front_; - void *back_; - -protected: - rshared_object():rrefcount(0),front_(0),back_(0) { } - -public: - void rref()const - { rrefcount++; } - - void runref()const - { - assert(rrefcount>0); - rrefcount--; - } - - int rcount()const - { return rrefcount; } -}; // END of class rshared_object - -// ======================================================================== -/*! \class rhandle _handle.h ETL/handle -** \brief Replaceable Object Handle -** \see rshared_object, handle, loose_handle -** \writeme -*/ -template -class rhandle : public handle -{ - friend class rshared_object; -public: - - typedef T value_type; - typedef T& reference; - typedef const T& const_reference; - typedef T* pointer; - typedef const T* const_pointer; - typedef int count_type; - typedef int size_type; - - - using handle::count; - using handle::unique; - using handle::operator bool; - using handle::get; - using handle::operator*; - using handle::operator->; - - /* - operator const handle&()const - { return *this; } - */ - -private: - using handle::obj; - - rhandle *prev_; - rhandle *next_; - - void add_to_rlist() - { -// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing - - assert(obj); - obj->rref(); - - // If this is the first reversible handle - if(!obj->front_) - { - obj->front_=obj->back_=this; - prev_=next_=0; - return; - } - - prev_=reinterpret_cast*>(obj->back_); - next_=0; - prev_->next_=this; - obj->back_=this; - } - - void del_from_rlist() - { -// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing - assert(obj); - obj->runref(); - - // If this is the last reversible handle - if(obj->front_==obj->back_) - { - obj->front_=obj->back_=0; - prev_=next_=0; - return; - } - - if(!prev_) - obj->front_=(void*)next_; - else - prev_->next_=next_; - - if(!next_) - obj->back_=(void*)prev_; - else - next_->prev_=prev_; - } - -public: - - //! Default constructor - empty handle - rhandle() {} - - //! Constructor that constructs from a pointer to new object - rhandle(pointer x):handle(x) - { -// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing - if(obj)add_to_rlist(); - } - - rhandle(const handle &x):handle(x) - { -// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing - if(obj)add_to_rlist(); - } - - //! Default copy constructor - rhandle(const rhandle &x):handle(x) - { -// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing - if(obj)add_to_rlist(); - } - - //! Handle is released on deletion - ~rhandle() { detach(); } - - //! Template Assignment operator - /*! \note This class may not be necessary, and may be removed - ** at some point in the future. - */ - /* - template const handle & - operator=(const handle &x) - { - if(x.get()==obj) - return *this; - - detach(); - - obj=static_cast(x.get()); - if(obj) - { - obj->ref(); - add_to_rlist(); - } - return *this; - } - */ - - //! Assignment operator - rhandle & - operator=(const rhandle &x) - { -// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing - if(x.get()==obj) - return *this; - - detach(); - - obj=x.get(); - if(obj) - { - obj->ref(); - add_to_rlist(); - } - return *this; - } - - rhandle& - operator=(const handle &x) - { -// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing - if(x.get()==obj) - return *this; - - detach(); - - obj=x.get(); - if(obj) - { - obj->ref(); - add_to_rlist(); - } - return *this; - } - - rhandle& - operator=(value_type* x) - { -// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing - if(x==obj) - return *this; - - detach(); - - obj=x; - if(obj) - { - obj->ref(); - add_to_rlist(); - } - return *this; - } - - //! Handle release procedure - /*! unref()'s the object and sets the internal object pointer to \c NULL */ - void - detach() - { -// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing - if(obj)del_from_rlist(); - handle::detach(); - obj=0; - } - - // This will be reintroduced with a new function - //void release() { detach(); } - - void reset() { detach(); } - - //! Creates a new instance of a T object and puts it in the handle. - /*! Uses the default constructor */ - void spawn() { operator=(handle(new T())); } - - //! Returns number of reversible instances - count_type - rcount()const - { -// value_type*const& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing - return obj?obj->rcount():0; - } - - //! Returns true if there is only one instance of the object - bool - runique()const - { -// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing - assert(obj); return obj->front_==obj->back_; - } - - //! \writeme - int replace(const handle &x) - { -// value_type*& obj(handle::obj); // Required to keep gcc 3.4.2 from barfing - assert(obj); - assert(x.get()!=obj); - - if(x.get()==obj) - return 0; - - rhandle *iter; - rhandle *next; - - iter=reinterpret_cast*>(obj->front_); - - assert(iter); - - next=iter->next_; - - int i=0; - #ifndef NDEBUG - pointer obj_=obj; - #endif - - for(;iter;iter=next,next=iter?iter->next_:0,i++) - { - assert(iter->get()==obj_); - (*iter)=x; - } - - assert(obj==x.get()); - - return i; - } - - //! Swaps the values of two handles without reference counts - /*! \warning not yet implemented. \writeme */ - handle & - swap(handle &x); - /* - { - assert(0); - pointer ptr=x.obj; - x.obj=obj; - obj=ptr; - return *this; - } - */ -}; // END of template class rhandle - - -// ======================================================================== -/*! \class loose_handle _handle.h ETL/handle -** \brief Loose Object Handle -** \see shared_object, handle -** \writeme -*/ -template -class loose_handle -{ -public: - - typedef T value_type; - typedef T& reference; - typedef const T& const_reference; - typedef T* pointer; - typedef const T* const_pointer; - typedef int count_type; - typedef int size_type; - -protected: -#ifdef _DEBUG -public: -#endif - value_type *obj; //!< Pointer to object - -public: - - //! Default constructor - empty handle - loose_handle():obj(0) {} - - //! Constructor that constructs from a pointer to new object - loose_handle(pointer x):obj(x) { } - - //! Default copy constructor - loose_handle(const loose_handle &x):obj(x.get()) { } - - loose_handle(const handle &x):obj(x.get()) { } - - template const loose_handle & - operator=(const handle &x) - { - if(x.get()==obj) - return *this; - - obj=static_cast(x.get()); - return *this; - } - - template const loose_handle & - operator=(const loose_handle &x) - { - if(x.get()==obj) - return *this; - - obj=static_cast(x.get()); - return *this; - } - - //! Assignment operator - const loose_handle & - operator=(const loose_handle &x) - { - if(x.get()==obj) - return *this; - - obj=x.get(); - return *this; - } - - //! Swaps the values of two handles without reference counts - loose_handle & - swap(loose_handle &x) - { - pointer ptr=x.obj; - x.obj=obj; - obj=ptr; - return *this; - } - - //! Handle release procedure - void detach() { obj=0; } - - // This will be reintroduced with a new function - //void release() { detach(); } - - void reset() { detach(); } - - bool empty()const { return obj==0; } - - handle clone()const { assert(obj); return obj->clone(); } - - //! Returns a constant handle to our object - loose_handle constant()const { return *this; } - - //! Returns number of instances - count_type - count()const - { return obj?obj->count():0; } - - reference - operator*()const - { assert(obj); return *obj; } - - pointer - operator->()const - { assert(obj); return obj; } - - //! static_cast<> overload - //template - //operator loose_handle()const - //{ return loose_handle(static_cast(obj)); } - - //! static_cast<> overload (for consts) - operator loose_handle()const - { return loose_handle(static_cast(obj)); } - - operator handle()const - { return handle(obj); } - - operator rhandle()const - { return rhandle(obj); } - - //! Returns pointer to the object that is being wrapped - pointer get()const { return obj; } - - //! More explicit bool cast - operator bool()const - { return obj!=0; } - - bool - operator!()const - { return !obj; } - - void ref() { if(obj)obj->ref(); } - - bool unref() { if(obj && !obj->unref()){ obj=0; return false; } return true; } -}; // END of template class loose_handle - -// cast loose_handle<> -> handle<> -template template handle handle::cast_static (const loose_handle& x) { return handle(static_cast (x.get())); } -template template handle handle::cast_dynamic (const loose_handle& x) { return handle(dynamic_cast (x.get())); } -template template handle handle::cast_const (const loose_handle& x) { return handle(const_cast (x.get())); } -template template handle handle::cast_reinterpret(const loose_handle& x) { return handle(reinterpret_cast(x.get())); } - -// cast rhandle_handle<> -> handle<> -template template handle handle::cast_static (const rhandle& x) { return handle(static_cast (x.get())); } -template template handle handle::cast_dynamic (const rhandle& x) { return handle(dynamic_cast (x.get())); } -template template handle handle::cast_const (const rhandle& x) { return handle(const_cast (x.get())); } -template template handle handle::cast_reinterpret(const rhandle& x) { return handle(reinterpret_cast(x.get())); } - -// cast U* -> handle<> -template template handle handle::cast_static (U* x) { return handle(static_cast (x)); } -template template handle handle::cast_dynamic (U* x) { return handle(dynamic_cast (x)); } -template template handle handle::cast_const (U* x) { return handle(const_cast (x)); } -template template handle handle::cast_reinterpret(U* x) { return handle(reinterpret_cast(x)); } - -// operator== for handle<>, loose_handle<> and T* -template bool operator==(const handle & lhs,const handle & rhs) { return (lhs.get()==rhs.get()); } -template bool operator==(const loose_handle& lhs,const loose_handle& rhs) { return (lhs.get()==rhs.get()); } -template bool operator==(const handle & lhs,const loose_handle& rhs) { return (lhs.get()==rhs.get()); } -template bool operator==(const loose_handle& lhs,const handle & rhs) { return (lhs.get()==rhs.get()); } -template bool operator==(const handle& lhs,const T* rhs) { return (lhs.get()==rhs); } -template bool operator==(const loose_handle& lhs,const T* rhs) { return (lhs.get()==rhs); } -template bool operator==(const T* lhs,const handle& rhs) { return (lhs ==rhs.get()); } -template bool operator==(const T* lhs,const loose_handle& rhs) { return (lhs ==rhs.get()); } - -// operator!= for handle<>, loose_handle<> and T* -template bool operator!=(const handle & lhs,const handle & rhs) { return (lhs.get()!=rhs.get()); } -template bool operator!=(const loose_handle& lhs,const loose_handle& rhs) { return (lhs.get()!=rhs.get()); } -template bool operator!=(const handle & lhs,const loose_handle& rhs) { return (lhs.get()!=rhs.get()); } -template bool operator!=(const loose_handle& lhs,const handle & rhs) { return (lhs.get()!=rhs.get()); } -template bool operator!=(const handle& lhs,const T* rhs) { return (lhs.get()!=rhs); } -template bool operator!=(const loose_handle& lhs,const T* rhs) { return (lhs.get()!=rhs); } -template bool operator!=(const T* lhs,const handle& rhs) { return (lhs !=rhs.get()); } -template bool operator!=(const T* lhs,const loose_handle& rhs) { return (lhs !=rhs.get()); } - -// operator< for handle<>, loose_handle<> and T* -template bool operator<(const handle& lhs,const handle& rhs) { return (lhs.get() bool operator<(const loose_handle& lhs,const loose_handle& rhs) { return (lhs.get() bool operator<(const handle& lhs,const loose_handle& rhs) { return (lhs.get() bool operator<(const loose_handle& lhs,const handle& rhs) { return (lhs.get() bool operator<(const handle& lhs,const T* rhs) { return (lhs.get() bool operator<(const loose_handle& lhs,const T* rhs) { return (lhs.get() bool operator<(const T* lhs,const handle& rhs) { return (lhs bool operator<(const T* lhs,const loose_handle& rhs) { return (lhs -class hermite_base : std::unary_function -{ -public: - typedef T value_type; - typedef float time_type; -private: - affine_combo affine_func; - value_type a,b,c,d; - time_type r,s; - - value_type _coeff[3]; - time_type drs; // reciprocal of (s-r) -public: - hermite_base():r(0.0),s(1.0) { drs=1.0/(s-r); } - hermite_base( - const value_type &a, const value_type &b, const value_type &c, const value_type &d, - const time_type &r=0.0, const time_type &s=1.0): - a(a),b(b),c(c),d(d),r(r),s(s) { sync(); } - - void sync(void) - { - drs=1.0/(s-r); - _coeff[0]= c; - _coeff[1]=-d*1 - c*2 + b*3 - a*3; - _coeff[2]= d*1 + c*1 - b*2 + a*2; - } - - inline value_type - operator()(time_type t)const - { t-=r; t*=drs; return a + (_coeff[0]+(_coeff[1]+(_coeff[2])*t)*t)*t; } - - void set_rs(time_type new_r, time_type new_s) { r=new_r; s=new_s; drs=1.0/(s-r); } - void set_r(time_type new_r) { r=new_r; drs=1.0/(s-r); } - void set_s(time_type new_s) { s=new_s; drs=1.0/(s-r); } - const time_type &get_r(void)const { return r; } - const time_type &get_s(void)const { return s; } - time_type get_dt(void)const { return s-r; } - - value_type & - operator[](int i) - { return (&a)[i]; } - - const value_type & - operator[](int i) const - { return (&a)[i]; } -}; - - -template -class hermite : public hermite_base -{ -public: - typedef T value_type; - typedef float time_type; - - - -public: - hermite() { } - hermite(const value_type &p1, const value_type &p2, const value_type &t1, const value_type &t2): - P1(p1),P2(p2),T1(t1),T2(t2) { sync(); } - hermite(const value_type &p1, const value_type &p2): - P1(p1),P2(p2),T1(p2-p1),T2(p2-p1) { sync(); } - - value_type P1,P2,T1,T2; - - value_type &p1(void) { return P1; } - value_type &p2(void) { return P2; } - value_type &t1(void) { return T1; } - value_type &t2(void) { return T2; } - - void sync(void) - { -// hermite_base::operator[](0)=P1; -// bezier::operator[](1)=P1+T1/3; -// bezier::operator[](2)=P2-T2/3; -// bezier::operator[](3)=P2; - - hermite_base::operator[](0)=P1; - hermite_base::operator[](1)=P2; - hermite_base::operator[](2)=T1; - hermite_base::operator[](3)=T2; - - hermite_base::sync(); - } - -}; - -*/ - -template -class hermite : public bezier -{ -public: - typedef V value_type; - typedef T time_type; - - - -public: - hermite() { } - hermite(const value_type &p1, const value_type &p2, const value_type &t1, const value_type &t2): - P1(p1),P2(p2),T1(t1),T2(t2) { sync(); } - hermite(const value_type &p1, const value_type &p2): - P1(p1),P2(p2),T1(p2-p1),T2(p2-p1) { sync(); } - - value_type P1,P2,T1,T2; - - value_type &p1() { return P1; } - value_type &p2() { return P2; } - value_type &t1() { return T1; } - value_type &t2() { return T2; } - - void sync() - { - bezier::operator[](0)=P1; - bezier::operator[](1)=P1+T1/3; - bezier::operator[](2)=P2-T2/3; - bezier::operator[](3)=P2; - - bezier::sync(); - } -}; - -_ETL_END_NAMESPACE - -/* === E X T E R N S ======================================================= */ - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_misc.h b/ETL/trunk/ETL/_misc.h deleted file mode 100644 index 6c84265..0000000 --- a/ETL/trunk/ETL/_misc.h +++ /dev/null @@ -1,103 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library -** Misc -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__MISC_H_ -#define __ETL__MISC_H_ - -/* === H E A D E R S ======================================================= */ -#include - -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -template inline I -binary_find(I begin, I end, const T& value) -{ -#if 1 - I iter(begin+(end-begin)/2); - - while(end-begin>1 && !(*iter==value)) - { - ((*iter1 && !(*iter==value)) - { - ((*iter(x+0.5f); // <-- (a) fast, but rounds -1.333 to 0! - // return static_cast(rintf(x)); // <-- (b) slow, but correct - if (x>=0) return static_cast(x + 0.5); // <-- slower than (a), but correct, and faster than (b) - else return static_cast(x - 0.5); -} -inline int round_to_int(const double x) { - // return static_cast(x+0.5); - // return static_cast(rint(x)); - if (x>=0) return static_cast(x + 0.5); - else return static_cast(x - 0.5); -} - -inline int ceil_to_int(const float x) { return static_cast(ceil(x)); } -inline int ceil_to_int(const double x) { return static_cast(ceil(x)); } - -inline int floor_to_int(const float x) { return static_cast(x); } -inline int floor_to_int(const double x) { return static_cast(x); } - -_ETL_END_NAMESPACE - -/* === E X T E R N S ======================================================= */ - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_mutex_null.h b/ETL/trunk/ETL/_mutex_null.h deleted file mode 100644 index 6c0d21e..0000000 --- a/ETL/trunk/ETL/_mutex_null.h +++ /dev/null @@ -1,71 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library -** NULL Mutex Abstraction Class Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__MUTEX_NULL_H_ -#define __ETL__MUTEX_NULL_H_ - -/* === H E A D E R S ======================================================= */ -/* === M A C R O S ========================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -class mutex_null -{ -public: - - mutex_null(){} - ~mutex_null(){} - //! Exception-safe mutex lock class -/* - class lock - { - mutex *_mtx; - public: - lock(mutex &x):_mtx(&x) { _mtx->lock_mutex(); } - ~lock() { _mtx->unlock_mutex(); } - mutex &get() { return *_mtx; } - }; -*/ - class lock - { - public: - lock(mutex_null &/*x*/) { } - }; - - void lock_mutex(){} - bool try_lock_mutex(){return true;} - void unlock_mutex(){} -}; - -_ETL_END_NAMESPACE - -/* === E X T E R N S ======================================================= */ - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_mutex_pthreads.h b/ETL/trunk/ETL/_mutex_pthreads.h deleted file mode 100644 index aed6766..0000000 --- a/ETL/trunk/ETL/_mutex_pthreads.h +++ /dev/null @@ -1,116 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library -** Mutex Abstraction Class Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__MUTEX_PTHREADS_H_ -#define __ETL__MUTEX_PTHREADS_H_ - -/* === H E A D E R S ======================================================= */ - -#define __USE_GNU - -#include - -#ifdef HAVE_SCHED_H -# include -#endif - -/* === M A C R O S ========================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -class mutex -{ - pthread_mutex_t mtx; - pthread_t locker; - int depth; -public: - - mutex() - { - pthread_mutexattr_t attr; - pthread_mutexattr_init(&attr); - //#ifdef PTHREAD_PRIO_INHERIT - //pthread_mutexattr_setprioceiling(&attr,PTHREAD_PRIO_INHERIT); - //#endif - #ifdef PTHREAD_MUTEX_RECURSIVE - pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); - #endif - pthread_mutex_init(&mtx,&attr); - pthread_mutexattr_destroy(&attr); - locker=0; - depth=0; - } - - ~mutex() - { pthread_mutex_destroy(&mtx); } - - - //! Exception-safe mutex lock class - class lock - { - mutex *_mtx; - public: - lock(mutex &x):_mtx(&x) { _mtx->lock_mutex(); } - ~lock() { _mtx->unlock_mutex(); } - mutex &get() { return *_mtx; } - }; - - void lock_mutex(void) - { - if(!locker || locker!=pthread_self()) - { - pthread_mutex_lock(&mtx); - locker=pthread_self(); - depth=0; - return; - } - depth++; - } - - bool try_lock_mutex(void) - { return !(bool) pthread_mutex_trylock(&mtx); } - - void unlock_mutex(void) - { - if(depth) - { - depth--; - return; - } - pthread_mutex_unlock(&mtx); - locker=0; - } -}; - -_ETL_END_NAMESPACE - -/* === E X T E R N S ======================================================= */ - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_mutex_pthreads_simple.h b/ETL/trunk/ETL/_mutex_pthreads_simple.h deleted file mode 100644 index d95b327..0000000 --- a/ETL/trunk/ETL/_mutex_pthreads_simple.h +++ /dev/null @@ -1,64 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library -** Mutex Abstraction Class Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__MUTEX_PTHREADS_SIMPLE_H_ -#define __ETL__MUTEX_PTHREADS_SIMPLE_H_ - -/* === H E A D E R S ======================================================= */ - -#include - -/* === M A C R O S ========================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -class mutex -{ - pthread_mutex_t mtx; -public: - mutex() { pthread_mutex_init(&mtx,NULL); } - ~mutex() { pthread_mutex_destroy(&mtx); } - void lock_mutex() { pthread_mutex_lock(&mtx); } - void unlock_mutex() { pthread_mutex_unlock(&mtx); } - - //! Exception-safe mutex lock class - class lock - { - mutex *_mtx; - public: - lock(mutex &x):_mtx(&x) { _mtx->lock_mutex(); } - ~lock() { _mtx->unlock_mutex(); } - }; -}; - -_ETL_END_NAMESPACE - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_mutex_win32.h b/ETL/trunk/ETL/_mutex_win32.h deleted file mode 100644 index b7dda75..0000000 --- a/ETL/trunk/ETL/_mutex_win32.h +++ /dev/null @@ -1,82 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library -** Mutex Abstraction Class Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__MUTEX_WIN32_H_ -#define __ETL__MUTEX_WIN32_H_ - -/* === H E A D E R S ======================================================= */ - -#include -// extern HANDLE CreateMutex(NULL, FALSE, NULL); -// extern CloseHandle(handle); -// extern WaitForSingleObject(handle, INFINITE); -// extern ReleaseMutex(handle); - -/* === M A C R O S ========================================================= */ - - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -class mutex -{ - HANDLE handle; -public: - - mutex() - { handle = CreateMutex(NULL, FALSE, NULL); } - - ~mutex() - { CloseHandle(handle); } - - //! Exception-safe mutex lock class - class lock - { - mutex *_mtx; - public: - lock(mutex &x):_mtx(&x) { _mtx->lock_mutex(); } - ~lock() { _mtx->unlock_mutex(); } - mutex &get() { return *_mtx; } - }; - - void lock_mutex(void) - { WaitForSingleObject(handle, INFINITE); } - - bool try_lock_mutex(void) - { return WaitForSingleObject(handle, INFINITE)==WAIT_FAILED; } - - void unlock_mutex(void) - { ReleaseMutex(handle); } -}; - -_ETL_END_NAMESPACE - -/* === E X T E R N S ======================================================= */ - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_pen.h b/ETL/trunk/ETL/_pen.h deleted file mode 100644 index 096570a..0000000 --- a/ETL/trunk/ETL/_pen.h +++ /dev/null @@ -1,405 +0,0 @@ -/*! ======================================================================== -** Extended Template Library -** Pen Template Class Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__PEN_H -#define __ETL__PEN_H - -/* === H E A D E R S ======================================================= */ - -#include "_curve_func.h" -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -template -class generic_pen_row_iterator -{ -public: - struct iterator_category : public std::random_access_iterator_tag {}; - typedef T value_type; - typedef int difference_type; - typedef value_type* pointer; - typedef value_type& reference; - - typedef generic_pen_row_iterator self_type; - - pointer data_; - int pitch_; - - reference operator[](int i)const { assert(data_); return *(pointer)( (char*)data_+pitch_*i ); } - reference operator*()const { assert(data_); return *data_; } - pointer operator->() const { assert(data_); return &(operator*()); } - - void inc() { assert(data_); data_ = (pointer)((char*)data_ + pitch_); } - void inc(int n) { assert(data_); data_ = (pointer)((char*)data_ + n*pitch_); } - - void dec() { assert(data_); data_ = (pointer)((char*)data_ - pitch_); } - void dec(int n) { assert(data_); data_ = (pointer)((char*)data_ - n*pitch_); } - - const self_type &operator++() { assert(data_); inc(); return *this; } - const self_type &operator--() { assert(data_); dec(); return *this; } - - self_type operator++(int) - { assert(data_); self_type ret(*this); inc(); return ret; } - self_type operator--(int) - { assert(data_); self_type ret(*this); dec(); return ret; } - - bool operator==(const self_type &rhs)const - { return data_==rhs.data_; } - - bool operator!=(const self_type &rhs)const - { return data_!=rhs.data_; } - - difference_type operator-(const self_type &rhs)const - { assert(data_); return ((char*)data_-(char*)rhs.data_-1)/pitch_+1; } - - self_type operator+(const difference_type &rhs)const - { - assert(data_); - self_type ret(*this); - ret.inc(rhs); - return ret; - } - - self_type operator-(const difference_type &rhs)const - { - assert(data_); - self_type ret(*this); - ret.dec(rhs); - return ret; - } - - operator const generic_pen_row_iterator()const - { - return generic_pen_row_iterator(data_,pitch_); - } - - operator bool()const { return (bool)data_; } - bool operator!()const { return !data_; } - - generic_pen_row_iterator(pointer data, int pitch):data_(data),pitch_(pitch) { } - generic_pen_row_iterator():data_(NULL) { } -}; - -template -class generic_pen -{ -public: - typedef T value_type; - typedef AT accumulator_type; - typedef value_type* pointer; - typedef const value_type* const_pointer; - typedef value_type& reference; - typedef const value_type& const_reference; - - typedef pointer iterator_x; - typedef const_pointer const_iterator_x; - - typedef generic_pen_row_iterator iterator_y; - typedef generic_pen_row_iterator const_iterator_y; - - struct difference_type - { - typedef int value_type; - value_type x,y; - difference_type(value_type x, value_type y):x(x),y(y) { } - value_type &operator[](int i)const { return i?y:x; } - }; - -protected: - int x_,y_; - int w_,h_; -private: - int pitch_; - value_type value_; - value_type *data_; - - typedef generic_pen self_type; - - void addptr(int nbytes) - { - data_ = (pointer)((char*)data_ + nbytes); - } - - void subptr(int nbytes) - { - data_ = (pointer)((char*)data_ - nbytes); - } - -public: - - generic_pen(value_type *data, int w, int h, int pitch): - x_(0), - y_(0), - w_(w), - h_(h), - pitch_(pitch), - data_(data) - { - } - - generic_pen(value_type *data, int w, int h): - x_(0), - y_(0), - w_(w), - h_(h), - pitch_(sizeof(value_type)*w), - data_(data) - { - } - - generic_pen():data_(NULL) { } - - self_type& move(int a, int b) - { - assert(data_); - x_ += a, y_ += b; - addptr(b*pitch_ + a*sizeof(value_type)); - return *this; - } - self_type& move_to(int x, int y) { assert(data_); return move(x - x_,y - y_);} - void set_value(const value_type &v) { value_=v; } - - void inc_x() { assert(data_); x_++; data_++; } - void dec_x() { assert(data_); x_--; data_--; } - void inc_y() { assert(data_); y_++; addptr(pitch_); } - void dec_y() { assert(data_); y_--; subptr(pitch_); } - - void inc_x(int n) { assert(data_); x_+=n; data_+=n; } - void dec_x(int n) { assert(data_); x_-=n; data_-=n; } - void inc_y(int n) { assert(data_); y_+=n; data_ = (pointer)((char*)data_ + pitch_*n); } - void dec_y(int n) { assert(data_); y_-=n; data_ = (pointer)((char*)data_ - pitch_*n); } - - void put_value(const value_type &v)const { assert(data_); *data_=v; } - void put_value()const { assert(data_); put_value(value_); } - - void put_value_clip(const value_type &v)const - { if(!clipped()) put_value(v); } - void put_value_clip()const { put_value_clip(value_); } - - const_reference get_value()const { assert(data_); return *data_; } - - const_reference get_value_at(int x, int y)const { assert(data_); return ((pointer)(((char*)data_)+y*pitch_))[x]; } - - const_reference get_value_clip_at(int x, int y)const { assert(data_); if(clipped(x,y))return value_type(); return ((pointer)(((char*)data_)+y*pitch_))[x]; } - - const value_type get_value_clip()const { assert(data_); if(clipped())return value_type(); return *data_; } - - const value_type get_pen_value()const { return value_; } - - void put_hline(int l,const value_type &v) - {for(;l>0;l--,inc_x())put_value(v);} - - void put_hline(int l) {put_hline(l,value_);} - - void put_hline_clip(int l, const value_type &v) - {l=std::min(l,w_-x_);for(;l>0;l--,inc_x())put_value_clip(v);} - - void put_hline_clip(int l) {put_hline_clip(l,value_);} - - //the put_block functions do not modify the pen - void put_block(int h, int w, const value_type &v) - { - self_type row(*this); - for(;h>0;h--,row.inc_y()) - { - self_type col(row); - col.put_hline(w,v); - } - } - - void put_block(int h, int w) { put_block(h,w,value_); } - - void put_block_clip(int h, int w, const value_type &v) - { - self_type row(*this); - - //clip start position - if(row.x_ < 0) { w+=row.x_; row.inc_x(-row.x_); } - if(row.y_ < 0) { h+=row.y_; row.inc_y(-row.y_); } - - //clip width and height of copy rect - h = std::min(h,h_-y_); - w = std::min(w,w_-x_); - - //copy rect - for(;h>0;h--,row.inc_y()) - { - self_type col(row); - col.put_hline(w,v); //already clipped - } - } - - void put_block_clip(int h, int w) { put_block(h,w,value_); } - - - iterator_x operator[](int i)const { assert(data_); return (pointer)(((char*)data_)+i*pitch_); } - - iterator_x x() { assert(data_); return data_; } - iterator_x begin_x() { assert(data_); return data_-x_; } - iterator_x end_x() { assert(data_); return data_-x_+w_; } - - iterator_y y() { assert(data_); return iterator_y(data_,pitch_); } - iterator_y begin_y() { assert(data_); return iterator_y((pointer)((char*)data_ - y_*pitch_),pitch_); } - iterator_y end_y() { assert(data_); return iterator_y((pointer)((char*)data_ + (h_-y_)*pitch_),pitch_); } - - operator bool()const { return (bool)data_; } - bool operator!()const { return !data_; } - bool operator==(const self_type &rhs)const { return data_==rhs.data_; } - bool operator!=(const self_type &rhs)const { return data_!=rhs.data_; } - bool clipped(int x, int y)const { return !(x_+x>=0 && y_+y>=0 && x_+x=0 && y_>=0 && x_ -> -class alpha_pen : public PEN_ -{ -public: - typedef A_ alpha_type; - typedef AFFINE_ affine_func_type; - - typedef typename PEN_::value_type value_type; - typedef alpha_pen self_type; - -private: - alpha_type alpha_; - -protected: - affine_func_type affine_func_; - -public: - using PEN_::get_value; - using PEN_::get_pen_value; - using PEN_::inc_x; - using PEN_::dec_x; - using PEN_::inc_y; - using PEN_::dec_y; - using PEN_::clipped; - using PEN_::w_; - using PEN_::h_; - using PEN_::x_; - using PEN_::y_; - - alpha_pen(const alpha_type &a = 1, const affine_func_type &func = affine_func_type()):alpha_(a),affine_func_(func) { } - alpha_pen(const PEN_ &x, const alpha_type &a=1, const affine_func_type &func=affine_func_type()) - :PEN_(x),alpha_(a),affine_func_(func) { } - - const alpha_type& get_alpha()const { return alpha_; } - void get_alpha(alpha_type &a) const { a=alpha_; } - void set_alpha(alpha_type a) { alpha_=a; } - - void put_value(const value_type &v, alpha_type a=1)const - { PEN_::put_value(affine_func_(get_value(),v,alpha_*a)); } - void put_value()const { put_value(get_pen_value()); } - void put_value_alpha(alpha_type a)const { put_value(get_pen_value(),a); } - void put_hline(int l, const alpha_type &a = 1){for(;l>0;l--,inc_x())put_value_alpha(a);} - - void put_value_clip(const value_type &v, alpha_type a=1)const - { if(!clipped())PEN_::put_value(affine_func_(get_value(),v,alpha_*a)); } - void put_value_clip()const { put_value_clip(get_pen_value()); } - void put_value_clip_alpha(alpha_type a)const { put_value_clip(get_pen_value(),a); } - void put_hline_clip(int l, const alpha_type &a = 1){l=std::min(l,w_-x_);for(;l>0;l--,inc_x())put_value_clip_alpha(a);} - - //the put_block functions do not modify the pen - void put_block(int h, int w, const alpha_type &a = 1) - { - self_type row(*this); - for(;h>0;h--,row.inc_y()) - { - self_type col(row); - col.put_hline(w,a); - } - } - - void put_block_clip(int h, int w, const alpha_type &a = 1) - { - self_type row(*this); - - //clip start position - if(row.x_ < 0) { w+=row.x_; row.inc_x(-row.x_); } - if(row.y_ < 0) { h+=row.y_; row.inc_y(-row.y_); } - - //clip width and height of copy rect - h = std::min(h,h_-y_); - w = std::min(w,w_-x_); - - //copy rect - for(;h>0;h--,row.inc_y()) - { - self_type col(row); - col.put_hline(w,a); //already clipped - } - } -}; - -_ETL_END_NAMESPACE - -/* === E X T E R N S ======================================================= */ - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_random.h b/ETL/trunk/ETL/_random.h deleted file mode 100644 index c358dfc..0000000 --- a/ETL/trunk/ETL/_random.h +++ /dev/null @@ -1,138 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library -** Random Number Generator Class Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__RANDOM_H -#define __ETL__RANDOM_H - -/* === H E A D E R S ======================================================= */ - -/* === M A C R O S ========================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -/* -class rand_source_xor -{ -public: - typedef int seed_type; - typedef short value_type; - -private: - short entropy_pool[256]; - int pool_index; - -public: - random() - { - seed(0); - mod=offset=0; - } - - void seed(const seed_type &x) - { pool_index=0; } - - void add_entropy(value_type entropy) - { - int i; - for(i=0;iPOOL_SIZE) - pool_index=0; - if(mod) - return entropy_pool[pool_index++]%mod+offset; - return entropy_pool[pool_index++]; - } -}; -*/ - -template -class random -{ -public: - typedef T value_type; - typedef int seed_type; - -private: - value_type entropy_pool[POOL_SIZE]; - int pool_index; - - value_type mod,offset; - -public: - random() - { - seed(0); - mod=offset=0; - } - - void seed(const seed_type &x __attribute__ ((unused))) - { pool_index=0; } - - void set_range(const value_type &floor,const value_type &ceil) - { mod=ceil-floor; offset=floor; } - - void set_range(const value_type &ceil) - { mod=ceil; } - - void add_entropy(value_type entropy) - { - int i; - for(i=0;iPOOL_SIZE) - pool_index=0; - if(mod) - return entropy_pool[pool_index++]%mod+offset; - return entropy_pool[pool_index++]; - } -}; - -/* === T Y P E D E F S ===================================================== */ - -_ETL_END_NAMESPACE - -/* === E N D =============================================================== */ - -#endif - diff --git a/ETL/trunk/ETL/_rect.h b/ETL/trunk/ETL/_rect.h deleted file mode 100644 index 6f506a5..0000000 --- a/ETL/trunk/ETL/_rect.h +++ /dev/null @@ -1,171 +0,0 @@ -/*! ======================================================================== -** Extended Template Library -** Rectangle Basic Class Implementation -** $Id$ -** -** Copyright (c) 2002 Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__RECT_H -#define __ETL__RECT_H - -/* === H E A D E R S ======================================================= */ - -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -template < typename T > -class rect -{ -public: //type niceties - typedef T value_type; - -public: //representation - - value_type minx,maxx,miny,maxy; - -public: //interface - - rect() {} - - rect(const value_type &x1,const value_type &y1) - { - set_point(x1,y1); - } - - rect(const value_type &x1,const value_type &y1, - const value_type &x2,const value_type &y2) - { - set_point(x1,y1); - expand(x2,y2); - } - - rect(const rect &o) - :minx(o.minx),maxx(o.maxx),miny(o.miny),maxy(o.maxy) - {} - - template < typename U > - rect(const rect &o) - :minx(o.minx),maxx(o.maxx),miny(o.miny),maxy(o.maxy) - {} - - void set_point(const value_type &x1,const value_type &y1) - { - minx = maxx = x1; - miny = maxy = y1; - } - - void expand(const value_type &x1,const value_type &y1) - { - minx = std::min(minx,x1); - maxx = std::max(maxx,x1); - miny = std::min(miny,y1); - maxy = std::max(maxy,y1); - } - - void set(const value_type &x1,const value_type &y1, - const value_type &x2,const value_type &y2) - { - minx = x1; maxx = x2; - miny = y1; maxy = y2; - } - - //HACK HACK HACK (stupid compiler doesn't like default arguments of any type) - bool valid() const - { - return valid(std::less()); - } - - template < typename F > - bool valid(const F & func) const - { - return func(minx,maxx) && func(miny,maxy); - } -}; - -template < typename T, typename F > -inline bool intersect(const rect &r1, const rect &r2, const F & func) -{ - /* We wan to do the edge compare test - |-----| - |------| intersecting - - |-----| - |-----| not intersecting - - So we want to compare the mins of the one against the maxs of the other, and - visa versa - - by default (exclude edge sharing) less will not be true if they are equal... - */ - - return func(r1.minx,r2.maxx) && - func(r2.minx,r1.maxx) && - func(r1.miny,r2.maxy) && - func(r2.miny,r1.maxy); -} - -template < typename T > -inline bool intersect(const rect &r1, const rect &r2) -{ - return intersect(r1,r2,std::less()); -} - -template < typename T > -void set_intersect(rect &rout, const rect &r1, const rect &r2) -{ - //takes the intersection of the two rectangles - rout.minx = std::max(r1.minx,r2.minx); - rout.miny = std::max(r1.miny,r2.miny); - rout.maxx = std::min(r1.maxx,r2.maxx); - rout.maxy = std::min(r1.maxy,r2.maxy); -} - -template < typename T > -void set_union(rect &rout, const rect &r1, const rect &r2) -{ - //takes the union of the two rectangles (bounds both... will contain extra info, but that's ok) - rout.set( - std::min(r1.minx,r2.minx), - std::min(r1.miny,r2.miny), - std::max(r1.maxx,r2.maxx), - std::max(r1.maxy,r2.maxy)); - /*rect local = r1; - rout.expand(r2.minx,r2.miny); - rout.expand(r2.maxx,r2.maxy); - rout = local;*/ -} - -_ETL_END_NAMESPACE - -/* === E X T E R N S ======================================================= */ - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_ref_count.h b/ETL/trunk/ETL/_ref_count.h deleted file mode 100644 index c036f8d..0000000 --- a/ETL/trunk/ETL/_ref_count.h +++ /dev/null @@ -1,158 +0,0 @@ -/*! ======================================================================== -** Extended Template Library -** -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__REF_COUNT_H -#define __ETL__REF_COUNT_H - -/* === H E A D E R S ======================================================= */ - -#include "_curve_func.h" -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -class weak_reference_counter; - -// ======================================================================== -/*! \class reference_counter _ref_count.h ETL/ref_count -** \brief Reference counter -** \see weak_reference_counter -** \writeme -*/ -class reference_counter -{ - friend class weak_reference_counter; -private: - int* counter_; -public: - - reference_counter(const bool &x=true):counter_(x?new int(1):0) { } - - reference_counter(const reference_counter &x):counter_(x.counter_) - { if(counter_) (*counter_)++; } - - reference_counter(const weak_reference_counter &x); - - ~reference_counter() { detach(); } - - reference_counter& operator=(const reference_counter &rhs) - { - detach(); - counter_=rhs.counter_; - if(counter_) - { - assert(*counter_>0); - (*counter_)++; - } - return *this; - } - - void detach() - { - if(counter_) - { - assert(*counter_>0); - if(!--(*counter_)) - delete counter_; - counter_=0; - } - } - - void reset() - { - detach(); - counter_=new int(1); - } - - int count()const { return counter_?*counter_:0; } - - bool unique()const { return counter_?*counter_==1:0; } - - operator int()const { return count(); } -}; // END of class reference_counter - -// ======================================================================== -/*! \class weak_reference_counter _ref_count.h ETL/ref_count -** \brief Weak Reference counter -** \see reference_counter -** \writeme -*/ -class weak_reference_counter -{ - friend class reference_counter; -private: - int* counter_; -public: - weak_reference_counter():counter_(0) { } - - weak_reference_counter(const weak_reference_counter &x):counter_(x.counter_) { } - - weak_reference_counter(const reference_counter &x):counter_(x.counter_) { } - - ~weak_reference_counter() { } - - weak_reference_counter& operator=(const reference_counter &rhs) - { - counter_=rhs.counter_; - assert(*counter_>0); - return *this; - } - - weak_reference_counter& operator=(const weak_reference_counter &rhs) - { - counter_=rhs.counter_; - assert(*counter_>0); - return *this; - } - - void detach() { counter_=0; } - - int count()const { return counter_?*counter_:0; } - - bool unique()const { return counter_?*counter_==1:0; } - - operator int()const { return count(); } -}; // END of class weak_reference_counter - -inline reference_counter::reference_counter(const weak_reference_counter &x): - counter_(x.counter_) -{ - if(counter_) (*counter_)++; -} - -_ETL_END_NAMESPACE - -/* === E X T E R N S ======================================================= */ - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_rwlock.h b/ETL/trunk/ETL/_rwlock.h deleted file mode 100644 index 930db26..0000000 --- a/ETL/trunk/ETL/_rwlock.h +++ /dev/null @@ -1,93 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library -** Mutex Abstraction Class Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__RWLOCK_H_ -#define __ETL__RWLOCK_H_ - -/* === H E A D E R S ======================================================= */ - -/* === M A C R O S ========================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -class read_write_lock : private Mutex -{ -public: - - read_write_lock() - { } - - ~read_write_lock() - { } - - //! Exception-safe read-lock class - class read_lock - { - read_write_lock *_mtx; - public: - read_lock(read_write_lock &x):_mtx(&x) { _mtx->lock_read(); } - ~read_lock() { _mtx->unlock_read(); } - read_write_lock &get() { return *_mtx; } - }; - - //! Exception-safe write-lock class - class write_lock - { - read_write_lock *_mtx; - public: - write_lock(read_write_lock &x):_mtx(&x) { _mtx->lock_write(); } - ~read_lock() { _mtx->unlock_write(); } - read_write_lock &get() { return *_mtx; } - }; - - void lock_read(void) - { lock_mutex(); } - - void lock_write(void) - { lock_mutex(); } - - bool try_lock_read(void) - { return try_lock_mutex(); } - - bool try_lock_write(void) - { return try_lock_mutex(); } - - void unlock_write(void) - { unlock_mutex(); } - - void unlock_read(void) - { unlock_mutex(); } -}; - -_ETL_END_NAMESPACE - -/* === E X T E R N S ======================================================= */ - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_smach.h b/ETL/trunk/ETL/_smach.h deleted file mode 100644 index 99a7320..0000000 --- a/ETL/trunk/ETL/_smach.h +++ /dev/null @@ -1,598 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library -** State Machine Abstraction Class Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__SMACH_H_ -#define __ETL__SMACH_H_ - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include "_mutex_null.h" -#include "_misc.h" - -/* === M A C R O S ========================================================= */ - -#define SMACH_STATE_STACK_SIZE (32) - -#ifdef _MSC_VER -#pragma warning (disable:4786) -#pragma warning (disable:4290) // MSVC6 doesn't like function declarations with exception specs -#endif - -//#define ETL_MUTEX_LOCK() _mutex::lock lock(mutex) -#define ETL_MUTEX_LOCK() - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -/*! ======================================================================== -** \class smach -** \brief Templatized State Machine -** -** A more detailed description needs to be written. -*/ -template -class smach -{ -public: - - typedef K event_key; - typedef M _mutex; - typedef CON context_type; - - - struct egress_exception { }; - struct pop_exception { }; - - - //! Result type for event processing - enum event_result - { - // These values are returned by the event - // handlers cast to state pointers. - RESULT_ERROR, //!< General error or malfunction - RESULT_OK, //!< Event has been processed - RESULT_ACCEPT, //!< The event has been explicitly accepted. - RESULT_REJECT, //!< The event has been explicitly rejected. - - RESULT_END //!< Not a valid result - }; - - //template class state; - - //! Event base class - struct event - { - event_key key; - - event() { } - event(const event_key& key):key(key) { } - - operator event_key()const { return key; } - }; - - //! Event definition class - template - class event_def_internal - { - // List our friends - friend class smach; - //friend class state; - - public: - typedef T state_context_type; - - //! Event function type - typedef event_result (T::*funcptr)(const event&); - - //private: - - event_key id; // - class state : public state_base - { - // Our parent is our friend - friend class smach; - - public: - typedef event_def_internal event_def; - typedef T state_context_type; - - - private: - - std::vector event_list; - - smach *nested; //! Nested machine - event_key low,high; //! Lowest and Highest event values - const char *name; //! Name of the state - typename event_def::funcptr default_handler; //! Default handler for unknown key - - public: - - //! Constructor - state(const char *n, smach* nest=0): - nested(nest),name(n),default_handler(NULL) - { } - - virtual ~state() { } - - //! Setup a nested state machine - /*! A more detailed explanation needs to be written */ - void set_nested_machine(smach *sm) { nested=sm; } - - //! Sets the default handler - void set_default_handler(const typename event_def::funcptr &x) { default_handler=x; } - - //! Returns given the name of the state - virtual const char *get_name() const { return name; } - - state_context_type& get_context(smach& machine) - { - state_context_type *context(dynamic_cast(machine.state_context)); - if(context) - return context; - - } - - //! Adds an event_def onto the list and then make sure it is sorted correctly. - void - insert(const event_def &x) - { - // If this is our first event_def, - // setup the high and low values. - if(!event_list.size()) - low=high=x.id; - - // Sort the event_def onto the list - event_list.push_back(x); - sort(event_list.begin(),event_list.end()); - - // Update the low and high markers - if(x.id::iterator find(const event_key &x) { return binary_find(event_list.begin(),event_list.end(),x); } - typename std::vector::const_iterator find(const event_key &x)const { return binary_find(event_list.begin(),event_list.end(),x); } - - protected: - - virtual void* enter_state(context_type* machine_context)const - { - return new state_context_type(machine_context); - } - - virtual bool leave_state(void* x)const - { - state_context_type* state_context(reinterpret_cast(x)); - delete state_context; - return true; - } - - virtual event_result - process_event(void* x,const event& id)const - { - state_context_type* state_context(reinterpret_cast(x)); - - // Check for nested machine in state - if(nested) - { - const event_result ret(nested->process_event(id)); - if(ret!=RESULT_OK) - return ret; - } - - // Quick test to make sure that the - // given event is in the state - if(id.key::const_iterator iter(find(id.key)); - - // If search results were negative, fail. - if(iter->id!=id.key) - return RESULT_OK; - - // Execute event function - event_result ret((state_context->*(iter->handler))(id)); - - if(ret==RESULT_OK && default_handler) - ret=(state_context->*(default_handler))(id); - - return ret; - } - }; - -private: - - // Machine data - const state_base* curr_state; //!< Current state of the machine - smach* child; //!< Child machine - -public: // this really should be private - void* state_context; //!< State Context -private: - - context_type* machine_context; //!< Machine Context - - const state_base* default_state; - void* default_context; - -#ifdef ETL_MUTEX_LOCK - _mutex mutex; -#endif - - //! State stack data - const state_base* state_stack[SMACH_STATE_STACK_SIZE]; - void* state_context_stack[SMACH_STATE_STACK_SIZE]; - int states_on_stack; - -public: - - //! Gets the name of the currently active state - const char * - get_state_name()const - { -#ifdef ETL_MUTEX_LOCK - ETL_MUTEX_LOCK(); -#endif - if(curr_state) - return curr_state->get_name(); - if(default_state) - return default_state->get_name(); - return 0; - } - - //! Determines if a given event result is an error - /*! This function allows us to quickly see - if an event_result contained an error */ - static bool - event_error(const event_result &rhs) - { return rhs<=RESULT_ERROR; } - - bool - set_default_state(const state_base *nextstate) - { -#ifdef ETL_MUTEX_LOCK - ETL_MUTEX_LOCK(); -#endif - // Keep track of the current state unless - // the state switch fails - const state_base *prev_state=default_state; - - // If we are already in a state, leave it and - // collapse the state stack - if(default_state) - default_state->leave_state(default_context); - - // Set this as our current state - default_state=nextstate; - default_context=0; - - // Attempt to enter the state - if(default_state) - { - default_context=default_state->enter_state(machine_context); - if(default_context) - return true; - } - else - return true; - - // We failed, so attempt to return to previous state - default_state=prev_state; - - // If we had a previous state, enter it - if(default_state) - default_context=default_state->enter_state(machine_context); - - // At this point we are not in the - // requested state, so return failure - return false; - } - - //! Leaves the current state - /*! Effectively makes the state_depth() function return zero. */ - bool - egress() - { -#ifdef ETL_MUTEX_LOCK - ETL_MUTEX_LOCK(); -#endif - - // Pop all states off the state stack - while(states_on_stack) pop_state(); - - // If we are not in a state, then I guess - // we were successful. - if(!curr_state) - return true; - - // Grab the return value from the exit function - bool ret=true; - - const state_base* old_state=curr_state; - void *old_context=state_context; - - // Clear out the current state and its state_context - curr_state=0;state_context=0; - - // Leave the state - return old_state->leave_state(old_context); - - return ret; - } - - //! State entry function - /*! Attempts to enter the given state, - popping off all states on the stack - in the process. */ - bool - enter(const state_base *nextstate) - { -#ifdef ETL_MUTEX_LOCK - ETL_MUTEX_LOCK(); -#endif - - // Keep track of the current state unless - // the state switch fails - const state_base *prev_state=curr_state; - - // If we are already in a state, leave it and - // collapse the state stack - if(curr_state) - egress(); - - // Set this as our current state - curr_state=nextstate; - state_context=0; - - // Attempt to enter the state - state_context=curr_state->enter_state(machine_context); - if(state_context) - return true; - - // We failed, so attempt to return to previous state - curr_state=prev_state; - - // If we had a previous state, enter it - if(curr_state) - state_context=curr_state->enter_state(machine_context); - - // At this point we are not in the - // requested state, so return failure - return false; - } - - //! Pushes state onto state stack - /*! This allows you to enter a state without - leaving your current state. - \param nextstate Pointer to the state to enter - \sa pop_state() - */ - bool - push_state(const state_base *nextstate) - { -#ifdef ETL_MUTEX_LOCK - ETL_MUTEX_LOCK(); -#endif - - // If there are not enough slots, then throw something. - if(states_on_stack==SMACH_STATE_STACK_SIZE) - throw(std::overflow_error("smach<>::push_state(): state stack overflow!")); - - // If there is no current state, nor anything on stack, - // just go ahead and enter the given state. - if(!curr_state && !states_on_stack) - return enter(nextstate); - - // Push the current state onto the stack - state_stack[states_on_stack]=curr_state; - state_context_stack[states_on_stack++]=state_context; - - // Make the next state the current state - curr_state=nextstate; - - // Try to enter the next state - state_context=curr_state->enter_state(machine_context); - if(state_context) - return true; - - // Unable to push state, return to old one - curr_state=state_stack[--states_on_stack]; - state_context=state_context_stack[states_on_stack]; - return false; - } - - //! Pops state off of state stack - /*! Decreases state depth */ - void - pop_state() - { -#ifdef ETL_MUTEX_LOCK - ETL_MUTEX_LOCK(); -#endif - - // If we aren't in a state, then there is nothing - // to do. - if(!curr_state) - throw(std::underflow_error("smach<>::pop_state(): stack is empty!")); - - if(states_on_stack) - { - const state_base* old_state=curr_state; - void *old_context=state_context; - - // Pop previous state off of stack - --states_on_stack; - curr_state=state_stack[states_on_stack]; - state_context=state_context_stack[states_on_stack]; - - old_state->leave_state(old_context); - } - else // If there are no states on stack, just egress - egress(); - } - - //! State Machine Constructor - /*! A more detailed description needs to be written */ - smach(context_type* machine_context=0): - curr_state(0), - child(0), - state_context(0), - machine_context(machine_context), - default_state(0), - default_context(0), - states_on_stack(0) - { } - - //! The destructor - ~smach() - { - egress(); - - if(default_state) - default_state->leave_state(default_context); - } - - //! Sets up a child state machine - /*! A child state machine runs in parallel with - its parent, and gets event priority. This - mechanism is useful in cases where an inherited - object has its own state machine. */ - void set_child(smach *x) - { -#ifdef ETL_MUTEX_LOCK - ETL_MUTEX_LOCK(); -#endif - child=x; - } - - //! Returns the number states currently active - int - state_depth() - { return curr_state?states_on_stack+1:0; } - - event_result - process_event(const event_key& id) { return process_event(event(id)); } - - //! Process an event - event_result - process_event(const event& id) - { -#ifdef ETL_MUTEX_LOCK - ETL_MUTEX_LOCK(); -#endif - - event_result ret(RESULT_OK); - - // Check for child machine - if(child) - { - ret=child->process_event(id); - if(ret!=RESULT_OK) - return ret; - } - - try - { - if(curr_state) - ret=curr_state->process_event(state_context,id); - - if(ret==RESULT_OK) - return default_state->process_event(default_context,id); - - return ret; - } - catch(egress_exception) { return egress()?RESULT_ACCEPT:RESULT_ERROR; } - catch(pop_exception) { pop_state(); return RESULT_ACCEPT; } - catch(const state_base* state) { return enter(state)?RESULT_ACCEPT:RESULT_ERROR; } - } - -}; // END of template class smach - -_ETL_END_NAMESPACE - -/* === E X T E R N S ======================================================= */ - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_smart_ptr.h b/ETL/trunk/ETL/_smart_ptr.h deleted file mode 100644 index a34b8dd..0000000 --- a/ETL/trunk/ETL/_smart_ptr.h +++ /dev/null @@ -1,363 +0,0 @@ -/* ======================================================================== -** Extended Template and Library -** Template Smart Pointer Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__SMART_PTR_H -#define __ETL__SMART_PTR_H - -/* === H E A D E R S ======================================================= */ - -#include -#include "_ref_count.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -template -struct generic_deleter -{ - void operator()(T* x)const { delete x; } -}; - -template -struct array_deleter -{ - void operator()(T* x)const { delete [] x; } -}; - -// ======================================================================== -/*! \class smart_ptr _smart_ptr.h ETL/smart_ptr -** \brief Object Smart Pointer -** \see loose_smart_ptr -** \writeme -*/ -template > -class smart_ptr -{ -public: - - typedef T value_type; - typedef T& reference; - typedef const T& const_reference; - typedef T* pointer; - typedef const T* const_pointer; - typedef int count_type; - typedef int size_type; - typedef D destructor_type; - -#ifdef DOXYGEN_SHOULD_SKIP_THIS // #ifdef is not a typo -private: -#endif - value_type *obj; //!< \internal Pointer to object - reference_counter refcount; - -public: - // Private constructor for convenience - smart_ptr(value_type* obj,reference_counter refcount):obj(obj),refcount(refcount) { } - - //! Default constructor - empty smart_ptr - smart_ptr():obj(0),refcount(false) {} - - //! Constructor that constructs from a pointer to new object - /*! A new smart_ptr is created with a pointer - to a newly allocated object. We need - to be explicit with this so we don't - accidently have two smart_ptrs for one - object -- that would be bad. */ - explicit smart_ptr(value_type* x):obj(x),refcount(x?true:false) { } - - //! Template copy constructor - /*! This template constructor allows us to cast - smart_ptrs much like we would pointers. */ -#ifdef _WIN32 - template - smart_ptr(const smart_ptr &x):obj((pointer)&*x.obj),refcount(x.refcount()) - { } -#endif - - //! Default copy constructor - /*! The template above is not good enough - for all compilers. We need to explicitly - define the copy constructor for this - class to work on those compilers. */ - smart_ptr(const smart_ptr &x):obj(x.obj),refcount(x.refcount) { } - - explicit smart_ptr(const value_type &x):obj(new value_type(x)) { } - - //! smart_ptr is released on deletion - ~smart_ptr() { if(refcount.unique()) destructor_type()(obj); } - - //! Template Assignment operator - template const smart_ptr & - operator=(const smart_ptr &x) - { - if(x.get()==obj) - return *this; - - reset(); - - if(x.obj) - { - obj=(pointer)x.get(); - refcount=x.refcount; - } - - return *this; - } - - //! Assignment operator - const smart_ptr & - operator=(const smart_ptr &x) - { - if(x.get()==obj) - return *this; - - reset(); - - if(x.obj) - { - - obj=(pointer)x.get(); - refcount=x.refcount; - } - - return *this; - } - - //! smart_ptr reset procedure - void - reset() - { - if(obj) - { - if(refcount.unique()) destructor_type()(obj); - refcount.detach(); - obj=0; - } - } - - void spawn() { operator=(smart_ptr(new T)); } - - //! Returns number of instances - const count_type& count()const { return refcount; } - - //! Returns true if there is only one instance of the object - bool unique()const { return refcount.unique(); } - - //! Returns a constant handle to our object - smart_ptr constant() { return *this; } - - reference operator*()const { assert(obj); return *obj; } - - pointer operator->()const { assert(obj); return obj; } - - - operator smart_ptr()const - { return smart_ptr(static_cast(obj)); } - - //! static_cast<> wrapper - template static - smart_ptr cast_static(const smart_ptr &x) - { if(!x)return NULL; return smart_ptr(static_cast(x.get()),x.refcount); } - - //! dynamic_cast<> wrapper - template static - smart_ptr cast_dynamic(const smart_ptr &x) - { if(!x)return 0; return smart_ptr(dynamic_cast(x.get()),x.refcount); } - - //! const_cast<> wrapper - template static - smart_ptr cast_const(const smart_ptr &x) - { if(!x)return 0; return smart_ptr(const_cast(x.get()),x.refcount); } - - pointer get()const { return obj; } - - //! More explicit bool cast - operator bool()const { return obj!=0; } - - bool operator!()const { return !obj; } - - //! Overloaded cast operator -- useful for implicit casts - template - operator smart_ptr() - { - // This next line should provide a syntax check - // to make sure that this cast makes sense. - // If it doesn't, this should have a compiler error. - // Otherwise, it should get optimized right out - // of the code. - //(U*)obj; - - return *reinterpret_cast*>(this); - } - -}; // END of template class smart_ptr - -// ======================================================================== -/*! \class loose_smart_ptr _smart_ptr.h ETL/smart_ptr -** \brief Loose Object Smart Pointer -** \see smart_ptr -** \writeme -*/ -template -class loose_smart_ptr -{ -public: - - typedef T value_type; - typedef T& reference; - typedef const T& const_reference; - typedef T* pointer; - typedef const T* const_pointer; - typedef int count_type; - typedef int size_type; - -private: - value_type *obj; //!< \internal Pointer to object - weak_reference_counter refcount; //!< \internal Pointer to object's reference counter - -public: - - //! Default constructor - empty smart_ptr - loose_smart_ptr():obj(0),refcount(0) {} - - //! Default copy constructor - loose_smart_ptr(const loose_smart_ptr &x):obj(x.get()),refcount(x.refcount) { } - - loose_smart_ptr(const smart_ptr &x):obj(x.get()),refcount(x.refcount) { } - - void reset() { obj=0,refcount=0; } - - operator smart_ptr() - { - return smart_ptr(static_cast(obj),refcount); - } - - operator smart_ptr() - { - return smart_ptr(static_cast(obj),refcount); - } - - //! Returns number of instances - const count_type& count()const { return refcount; } - - bool unique()const { return refcount.unique(); } - - reference operator*()const { assert(obj); return *obj; } - - pointer operator->()const { assert(obj); return obj; } - - pointer get()const { return obj; } - - bool operator!()const { return !obj; } -}; - -template bool -operator==(const smart_ptr &lhs,const smart_ptr &rhs) - { return (lhs.get()==rhs.get()); } -template bool -operator==(const loose_smart_ptr &lhs,const loose_smart_ptr &rhs) - { return (lhs.get()==rhs.get()); } -template bool -operator==(const smart_ptr &lhs,const loose_smart_ptr &rhs) - { return (lhs.get()==rhs.get()); } -template bool -operator==(const loose_smart_ptr &lhs,const smart_ptr &rhs) - { return (lhs.get()==rhs.get()); } -template bool -operator==(const smart_ptr &lhs,const T *rhs) - { return (lhs.get()==rhs); } -template bool -operator==(const loose_smart_ptr &lhs,const T *rhs) - { return (lhs.get()==rhs); } -template bool -operator==(const T *lhs,const smart_ptr &rhs) - { return (lhs==rhs.get()); } -template bool -operator==(const T *lhs,const loose_smart_ptr &rhs) - { return (lhs==rhs.get()); } - - -template bool -operator!=(const smart_ptr &lhs,const smart_ptr &rhs) - { return (lhs.get()!=rhs.get()); } -template bool -operator!=(const loose_smart_ptr &lhs,const loose_smart_ptr &rhs) - { return (lhs.get()!=rhs.get()); } -template bool -operator!=(const smart_ptr &lhs,const loose_smart_ptr &rhs) - { return (lhs.get()!=rhs.get()); } -template bool -operator!=(const loose_smart_ptr &lhs,const smart_ptr &rhs) - { return (lhs.get()!=rhs.get()); } -template bool -operator!=(const smart_ptr &lhs,const T *rhs) - { return (lhs.get()!=rhs); } -template bool -operator!=(const loose_smart_ptr &lhs,const T *rhs) - { return (lhs.get()!=rhs); } -template bool -operator!=(const T *lhs,const smart_ptr &rhs) - { return (lhs!=rhs.get()); } -template bool -operator!=(const T *lhs,const loose_smart_ptr &rhs) - { return (lhs!=rhs.get()); } - - -template bool -operator<(const smart_ptr &lhs,const smart_ptr &rhs) - { return (lhs.get() bool -operator<(const loose_smart_ptr &lhs,const loose_smart_ptr &rhs) - { return (lhs.get() bool -operator<(const smart_ptr &lhs,const loose_smart_ptr &rhs) - { return (lhs.get() bool -operator<(const loose_smart_ptr &lhs,const smart_ptr &rhs) - { return (lhs.get() bool -operator<(const smart_ptr &lhs,const T *rhs) - { return (lhs.get() bool -operator<(const loose_smart_ptr &lhs,const T *rhs) - { return (lhs.get() bool -operator<(const T *lhs,const smart_ptr &rhs) - { return (lhs bool -operator<(const T *lhs,const loose_smart_ptr &rhs) - { return (lhs -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -#ifndef ETL_STRPRINTF_MAX_LENGTH -#define ETL_STRPRINTF_MAX_LENGTH (800) -#endif - -#ifdef WIN32 -#define POPEN_BINARY_READ_TYPE "rb" -#define POPEN_BINARY_WRITE_TYPE "wb" -#else -#define POPEN_BINARY_READ_TYPE "r" -#define POPEN_BINARY_WRITE_TYPE "w" -#endif - -/* === T Y P E D E F S ===================================================== */ - -_ETL_BEGIN_CDECLS - -#if defined(__APPLE__) || defined(__CYGWIN__) || defined(_WIN32) -#define ETL_NO_THROW -#else -#define ETL_NO_THROW throw() -#endif - -// Prefer prototypes from glibc headers, since defining them ourselves -// works around glibc security mechanisms - -#ifdef HAVE_VASPRINTF // This is the preferred method - #ifndef __GLIBC__ - extern int vasprintf(char **,const char *,va_list)ETL_NO_THROW; - #endif -#else - -# ifdef HAVE_VSNPRINTF // This is the secondary method - #ifndef __GLIBC__ - extern int vsnprintf(char *,size_t,const char*,va_list)ETL_NO_THROW; - #endif -# endif - -#endif - -#ifdef HAVE_VSSCANF - #ifndef __GLIBC__ - extern int vsscanf(const char *,const char *,va_list)ETL_NO_THROW; - #endif -#else -#define ETL_NO_VSTRSCANF -#ifdef HAVE_SSCANF - #ifndef __GLIBC__ - extern int sscanf(const char *buf, const char *format, ...)ETL_NO_THROW; - #endif -#endif -#endif - -#include - -_ETL_END_CDECLS - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -inline std::string -vstrprintf(const char *format, va_list args) -{ -#ifdef HAVE_VASPRINTF // This is the preferred method (and safest) - char *buffer; - std::string ret; - int i=vasprintf(&buffer,format,args); - if (i>-1) - { - ret=buffer; - free(buffer); - } - return ret; -#else -#ifdef HAVE_VSNPRINTF // This is the secondary method (Safe, but bulky) -#warning etl::vstrprintf() has a maximum size of ETL_STRPRINTF_MAX_LENGTH in this configuration. -#ifdef ETL_THREAD_SAFE - char buffer[ETL_STRPRINTF_MAX_LENGTH]; -#else - static char buffer[ETL_STRPRINTF_MAX_LENGTH]; -#endif - vsnprintf(buffer,sizeof(buffer),format,args); - return buffer; -#else // This is the worst method (UNSAFE, but "works") -#warning Potential for Buffer-overflow bug using vsprintf -#define ETL_UNSAFE_STRPRINTF (true) -// Here, we are doubling the size of the buffer to make this case -// slightly more safe. -#ifdef ETL_THREAD_SAFE - char buffer[ETL_STRPRINTF_MAX_LENGTH*2]; -#else - static char buffer[ETL_STRPRINTF_MAX_LENGTH*2]; -#endif - vsprintf(buffer,format,args); - return buffer; -#endif -#endif -} - -inline std::string -strprintf(const char *format, ...) -{ - va_list args; - va_start(args,format); - return vstrprintf(format,args); -} - -#ifndef ETL_NO_VSTRSCANF -inline int -vstrscanf(const std::string &data, const char*format, va_list args) -{ - return vsscanf(data.c_str(),format,args); -} - -inline int -strscanf(const std::string &data, const char*format, ...) -{ - va_list args; - va_start(args,format); - return vstrscanf(data, format,args); -} -#else - -#if defined (HAVE_SSCANF) && defined (__GNUC__) -#define strscanf(data,format,...) sscanf(data.c_str(),format,__VA_ARGS__) -#endif -#endif - - -#define stratof(X) (atof((X).c_str())) -#define stratoi(X) (atoi((X).c_str())) - -inline std::string -basename(const std::string &str) -{ - std::string::const_iterator iter; - - if(str.size() == 1 && str[0] == ETL_DIRECTORY_SEPARATOR) - return str; - - if(str.end()[-1]==ETL_DIRECTORY_SEPARATOR) - iter=str.end()-2; - else - iter=str.end()-1; - - for(;iter!=str.begin();iter--) - if(*iter==ETL_DIRECTORY_SEPARATOR) - break; - - if (*iter==ETL_DIRECTORY_SEPARATOR) - iter++; - - if(str.end()[-1]==ETL_DIRECTORY_SEPARATOR) - return std::string(iter,str.end()-1); - - return std::string(iter,str.end()); -} - -inline std::string -dirname(const std::string &str) -{ - std::string::const_iterator iter; - - if(str.size() == 1 && str[0] == ETL_DIRECTORY_SEPARATOR) - return str; - - if(str.end()[-1]==ETL_DIRECTORY_SEPARATOR) - iter=str.end()-2; - else - iter=str.end()-1; - - for(;iter!=str.begin();iter--) - if(*iter==ETL_DIRECTORY_SEPARATOR) - break; - - if(iter==str.begin()) - { - if (*iter==ETL_DIRECTORY_SEPARATOR) - return "/"; - else - return "."; - } - - return std::string(str.begin(),iter); -} - -// filename_extension("/f.e/d.c") => ".c" -inline std::string -filename_extension(const std::string &str) -{ - std::string base = basename(str); - std::string::size_type pos = base.find_last_of('.'); - if (pos == std::string::npos) return std::string(); - return base.substr(pos); -} - -// filename_sans_extension("/f.e/d.c") => "/f.e/d" -inline std::string -filename_sans_extension(const std::string &str) -{ - std::string base = basename(str); - std::string::size_type pos = base.find_last_of('.'); - if (pos == std::string::npos) return str; - std::string dir = dirname(str); - if (dir == ".") return base.substr(0,pos); - return dir + ETL_DIRECTORY_SEPARATOR + base.substr(0,pos); -} - -inline bool -is_absolute_path(const std::string &path) -{ -#ifdef WIN32 - if(path.size()>=3 && path[1]==':' && (path[2]=='\\' || path[2]=='/')) - return true; -#endif - if(!path.empty() && path[0]==ETL_DIRECTORY_SEPARATOR) - return true; - return false; -} - -inline std::string -unix_to_local_path(const std::string &path) -{ - std::string ret; - std::string::const_iterator iter; - for(iter=path.begin();iter!=path.end();iter++) - switch(*iter) - { - case '/': - ret+=ETL_DIRECTORY_SEPARATOR; - break; - case '~': - ret+='~'; - break; - default: - ret+=*iter; - break; - } - return ret; -} - -inline std::string -current_working_directory() -{ - char dir[256]; - std::string ret(getcwd(dir,sizeof(dir))); - return ret; -} - -inline std::string -get_root_from_path(std::string path) -{ - std::string ret; - std::string::const_iterator iter; - - for(iter=path.begin();iter!=path.end();++iter) - { - if(*iter==ETL_DIRECTORY_SEPARATOR) - break; - ret+=*iter; - } - //if(iter!=path.end()) - ret+=ETL_DIRECTORY_SEPARATOR; - return ret; -} - -inline std::string -remove_root_from_path(std::string path) -{ - while(!path.empty()) - { - if(path[0]==ETL_DIRECTORY_SEPARATOR) - { - path.erase(path.begin()); - return path; - } - path.erase(path.begin()); - } - return path; -} - -inline std::string -cleanup_path(std::string path) -{ - std::string ret; - - while(basename(path)=="."&&path.size()!=1)path=dirname(path); - - while(!path.empty()) - { - std::string dir(get_root_from_path(path)); - if((dir=="../" || dir=="..\\") && ret.size()) - { - ret=dirname(ret); - if (*(ret.end()-1)!=ETL_DIRECTORY_SEPARATOR) - ret+=ETL_DIRECTORY_SEPARATOR; - } - else if((dir!="./" && dir!=".\\") && dir!=".") - ret+=dir; - path=remove_root_from_path(path); - } - if (ret.size()==0)ret+='.'; - - // Remove any trailing directory separators - if(ret.size() && ret[ret.size()-1]==ETL_DIRECTORY_SEPARATOR) - ret.erase(ret.begin()+ret.size()-1); - return ret; -} - -inline std::string -absolute_path(std::string path) -{ - std::string ret(current_working_directory()); - - if(path.empty()) - return cleanup_path(ret); - if(is_absolute_path(path)) - return cleanup_path(path); - return cleanup_path(ret+ETL_DIRECTORY_SEPARATOR+path); -} - -inline std::string -relative_path(std::string curr_path,std::string dest_path) -{ - // If dest_path is already a relative path, - // then there is no need to do anything. - if(!is_absolute_path(dest_path)) - dest_path=absolute_path(dest_path); - else - dest_path=cleanup_path(dest_path); - - if(!is_absolute_path(curr_path)) - curr_path=absolute_path(curr_path); - else - curr_path=cleanup_path(curr_path); - -#ifdef WIN32 - // If we are on windows and the dest path is on a different drive, - // then there is no way to make a relative path to it. - if(dest_path.size()>=3 && dest_path[1]==':' && dest_path[0]!=curr_path[0]) - return dest_path; -#endif - - if(curr_path==dirname(dest_path)) - return basename(dest_path); - - while(!dest_path.empty() && !curr_path.empty() && get_root_from_path(dest_path)==get_root_from_path(curr_path)) - { - dest_path=remove_root_from_path(dest_path); - curr_path=remove_root_from_path(curr_path); - } - - while(!curr_path.empty()) - { - dest_path=std::string("..")+ETL_DIRECTORY_SEPARATOR+dest_path; - curr_path=remove_root_from_path(curr_path); - } - - return dest_path; -} - -_ETL_END_NAMESPACE - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_surface.h b/ETL/trunk/ETL/_surface.h deleted file mode 100644 index d5a32a5..0000000 --- a/ETL/trunk/ETL/_surface.h +++ /dev/null @@ -1,649 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library -** Surface Class Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__SURFACE_H -#define __ETL__SURFACE_H - -/* === H E A D E R S ======================================================= */ - -#include "_pen.h" -#include "_misc.h" -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -template -class value_prep -{ -public: - typedef T value_type; - typedef AT accumulator_type; - - accumulator_type cook(const value_type& x)const { return (accumulator_type)x; } - value_type uncook(const accumulator_type& x)const { return (value_type)x; } -}; - -template > -class surface -{ -public: - typedef T value_type; - typedef AT accumulator_type; - typedef value_type* pointer; - typedef const value_type* const_pointer; - typedef value_type& reference; - typedef generic_pen pen; - typedef generic_pen const_pen; - typedef VP value_prep_type; - - typedef alpha_pen const_alpha_pen; - typedef alpha_pen non_const_alpha_pen; - - typedef typename pen::difference_type size_type; - typedef typename pen::difference_type difference_type; - - typedef typename pen::iterator_x iterator_x; - typedef typename pen::iterator_y iterator_y; - typedef typename pen::const_iterator_x const_iterator_x; - typedef typename pen::const_iterator_y const_iterator_y; - -private: - value_type *data_; - value_type *zero_pos_; - typename difference_type::value_type pitch_; - int w_, h_; - bool deletable_; - - value_prep_type cooker_; - - void swap(const surface &x) - { - std::swap(data_,x.data_); - std::swap(zero_pos_,x.zero_pos_); - std::swap(pitch_,x.pitch_); - std::swap(w_,x.w_); - std::swap(h_,x.h_); - std::swap(deletable_,x.deletable_); - } - -public: - surface(): - data_(0), - zero_pos_(data_), - pitch_(0), - w_(0),h_(0), - deletable_(false) { } - - surface(value_type* data, int w, int h, bool deletable=false): - data_(data), - zero_pos_(data), - pitch_(sizeof(value_type)*w), - w_(w),h_(h), - deletable_(deletable) { } - - surface(const typename size_type::value_type &w, const typename size_type::value_type &h): - data_(new value_type[w*h]), - zero_pos_(data_), - pitch_(sizeof(value_type)*w), - w_(w),h_(h), - deletable_(true) { } - - surface(const size_type &s): - data_(new value_type[s.x*s.y]), - zero_pos_(data_), - pitch_(sizeof(value_type)*s.x), - w_(s.x),h_(s.y), - deletable_(true) { } - - template - surface(const _pen &_begin, const _pen &_end) - { - typename _pen::difference_type size=_end-_begin; - - data_=new value_type[size.x*size.y]; - w_=size.x; - h_=size.y; - zero_pos_=data_; - pitch_=sizeof(value_type)*w_; - deletable_=true; - - int x,y; - - for(y=0;y void - fill(value_type v, _pen& PEN, int w, int h) - { - assert(data_); - if(w<=0 || h<=0)return; - int y; - PEN.set_value(v); - for(y=0;y void blit_to(_pen &pen) - { return blit_to(pen,0,0, get_w(),get_h()); } - - template void - blit_to(_pen &DEST_PEN, - int x, int y, int w, int h) //src param - { - if(x>=w_ || y>=h_) - return; - - //clip source origin - if(x<0) - { - w+=x; //decrease - x=0; - } - - if(y<0) - { - h+=y; //decrease - y=0; - } - - //clip width against dest width - w = std::min((long)w,(long)(DEST_PEN.end_x()-DEST_PEN.x())); - h = std::min((long)h,(long)(DEST_PEN.end_y()-DEST_PEN.y())); - - //clip width against src width - w = std::min(w,w_-x); - h = std::min(h,h_-y); - - if(w<=0 || h<=0) - return; - - pen SOURCE_PEN(get_pen(x,y)); - - for(; h>0; h--,DEST_PEN.inc_y(),SOURCE_PEN.inc_y()) - { - int i; - for(i=0; i0 - && h_>0 - && pitch_!=0 - ; - } - - operator bool()const { return is_valid(); } - - pen begin() { assert(data_); return pen(data_,w_,h_,pitch_); } - pen get_pen(int x, int y) { assert(data_); return begin().move(x,y); } - pen end() { assert(data_); return get_pen(w_,h_); } - - const_pen begin()const { assert(data_); return const_pen(data_,w_,h_,pitch_); } - const_pen get_pen(int x, int y)const { assert(data_); return begin().move(x,y); } - const_pen end()const { assert(data_); return get_pen(w_,h_); } - - //! Linear sample - value_type linear_sample(const float x, const float y)const - { - int u(floor_to_int(x)), v(floor_to_int(y)); - float a, b; - static const float epsilon(1.0e-6); - - if(x<0.0f)u=0,a=0.0f; - else if(x>w_-1)u=w_-1,a=0.0f; - else a=x-u; - - if(y<0.0f)v=0,b=0.0f; - else if(y>h_-1)v=h_-1,b=0.0f; - else b=y-v; - - const float - c(1.0f-a), d(1.0f-b), - e(a*d),f(c*b),g(a*b); - - accumulator_type ret(cooker_.cook((*this)[v][u])*(c*d)); - if(e>=epsilon)ret+=cooker_.cook((*this)[v][u+1])*e; - if(f>=epsilon)ret+=cooker_.cook((*this)[v+1][u])*f; - if(g>=epsilon)ret+=cooker_.cook((*this)[v+1][u+1])*g; - return cooker_.uncook(ret); - } - - //! Cosine sample - value_type cosine_sample(const float x, const float y)const - { - int u(floor_to_int(x)), v(floor_to_int(y)); - float a, b; - static const float epsilon(1.0e-6); - - if(x<0.0f)u=0,a=0.0f; - else if(x>w_-1)u=w_-1,a=0.0f; - else a=x-u; - - if(y<0.0f)v=0,b=0.0f; - else if(y>h_-1)v=h_-1,b=0.0f; - else b=y-v; - - a=(1.0f-cos(a*3.1415927f))*0.5f; - b=(1.0f-cos(b*3.1415927f))*0.5f; - - const float - c(1.0f-a), d(1.0f-b), - e(a*d),f(c*b),g(a*b); - - accumulator_type ret(cooker_.cook((*this)[v][u])*(c*d)); - if(e>=epsilon)ret+=cooker_.cook((*this)[v][u+1])*e; - if(f>=epsilon)ret+=cooker_.cook((*this)[v+1][u])*f; - if(g>=epsilon)ret+=cooker_.cook((*this)[v+1][u+1])*g; - - return cooker_.uncook(ret); - } - - //! Cubic sample - value_type cubic_sample(float x, float y)const - { - #if 0 - #define P(x) (((x)>=0)?((x)*(x)*(x)):0.0f) - #define R(x) ( P(x+2) - 4.0f*P(x+1) + 6.0f*P(x) - 4.0f*P(x-1) )*(1.0f/6.0f) - #define F(i,j) (cooker_.cook((*this)[max(min(j+v,h_-1),0)][max(min(i+u,w_-1),0)])*(R((i)-a)*R(b-(j)))) - #define Z(i,j) ret+=F(i,j) - #define X(i,j) // placeholder... To make box more symmetric - - int u(floor_to_int(x)), v(floor_to_int(y)); - float a, b; - - // Clamp X - if(x<0.0f)u=0,a=0.0f; - else if(u>w_-1)u=w_-1,a=0.0f; - else a=x-u; - - // Clamp Y - if(y<0.0f)v=0,b=0.0f; - else if(v>h_-1)v=h_-1,b=0.0f; - else b=y-v; - - // Interpolate - accumulator_type ret(F(0,0)); - Z(-1,-1); Z(-1, 0); Z(-1, 1); Z(-1, 2); - Z( 0,-1); X( 0, 0); Z( 0, 1); Z( 0, 2); - Z( 1,-1); Z( 1, 0); Z( 1, 1); Z( 1, 2); - Z( 2,-1); Z( 2, 0); Z( 2, 1); Z( 2, 2); - - return cooker_.uncook(ret); - - #undef X - #undef Z - #undef F - #undef P - #undef R - #else - - #define f(j,i) (cooker_.cook((*this)[j][i])) - //Using catmull rom interpolation because it doesn't blur at all - //bezier curve with intermediate ctrl pts: 0.5/3(p(i+1) - p(i-1)) and similar - accumulator_type xfa [4]; - - //precalculate indices (all clamped) and offset - const int xi = x > 0 ? (x < w_ ? (int)floor(x) : w_-1) : 0; - const int xa[] = {std::max(0,xi-1),xi,std::min(w_-1,xi+1),std::min(w_-1,xi+2)}; - - const int yi = y > 0 ? (y < h_ ? (int)floor(y) : h_-1) : 0; - const int ya[] = {std::max(0,yi-1),yi,std::min(h_-1,yi+1),std::min(h_-1,yi+2)}; - - const float xf = x-xi; - const float yf = y-yi; - - //figure polynomials for each point - const float txf[] = - { - 0.5*xf*(xf*(xf*(-1) + 2) - 1), //-t + 2t^2 -t^3 - 0.5*(xf*(xf*(3*xf - 5)) + 2), //2 - 5t^2 + 3t^3 - 0.5*xf*(xf*(-3*xf + 4) + 1), //t + 4t^2 - 3t^3 - 0.5*xf*xf*(xf-1) //-t^2 + t^3 - }; - - const float tyf[] = - { - 0.5*yf*(yf*(yf*(-1) + 2) - 1), //-t + 2t^2 -t^3 - 0.5*(yf*(yf*(3*yf - 5)) + 2), //2 - 5t^2 + 3t^3 - 0.5*yf*(yf*(-3*yf + 4) + 1), //t + 4t^2 - 3t^3 - 0.5*yf*yf*(yf-1) //-t^2 + t^3 - }; - - //evaluate polynomial for each row - for(int i = 0; i < 4; ++i) - { - xfa[i] = f(ya[i],xa[0])*txf[0] + f(ya[i],xa[1])*txf[1] + f(ya[i],xa[2])*txf[2] + f(ya[i],xa[3])*txf[3]; - } - - //return the cumulative column evaluation - return cooker_.uncook(xfa[0]*tyf[0] + xfa[1]*tyf[1] + xfa[2]*tyf[2] + xfa[3]*tyf[3]); -#undef f -#endif - } - - value_type sample_rect(float x0,float y0,float x1,float y1) const - { - const surface &s = *this; - - //assumes it's clamped to the boundary of the image - //force min max relationship for x0,x1 and y0,y1 - if(x0 > x1) std::swap(x0,x1); - if(y0 > y1) std::swap(y0,y1); - - //local variable madness - //all things that want to inter-operate should provide a default value constructor for = 0 - accumulator_type acum = 0; - int xi=0,yi=0; - - int xib=(int)floor(x0), - xie=(int)floor(x1); - - int yib=(int)floor(y0), - yie=(int)floor(y1); - - //the weight for the pixel should remain the same... - float weight = (y1-y0)*(x1-x0); - assert(weight != 0); - - float ylast = y0, xlastb = x0; - const_pen pen_ = s.get_pen(xib,yib); - - for(yi = yib; yi < yie; ylast = ++yi, pen_.inc_y()) - { - const float yweight = yi+1 - ylast; - - float xlast = xlastb; - for(xi = xib; xi < xie; xlast = ++xi, pen_.inc_x()) - { - const float w = yweight*(xi+1 - xlast); - acum += cooker_.cook(pen_.get_value())*w; - } - - //post... with next being fractional... - const float w = yweight*(x1 - xlast); - acum += cooker_.cook(pen_.get_value())*w; - - pen_.dec_x(xie-xib); - } - - //post in y direction... must have all x... - { - const float yweight = y1 - ylast; - - float xlast = xlastb; - for(xi = xib; xi < xie; xlast = ++xi) - { - const float w = yweight*(xi+1 - xlast); - - acum += cooker_.cook(pen_.get_value())*w; - } - - //post... with next being fractional... - const float w = yweight*(x1 - xlast); - acum += cooker_.cook(pen_.get_value())*w; - } - - acum *= 1/weight; - return cooker_.uncook(acum); - } - - value_type sample_rect_clip(float x0,float y0,float x1,float y1) const - { - const surface &s = *this; - - //assumes it's clamped to the boundary of the image - //force min max relationship for x0,x1 and y0,y1 - if(x0 > x1) std::swap(x0,x1); - if(y0 > y1) std::swap(y0,y1); - - //local variable madness - //all things that want to inter-operate should provide a default value constructor for = 0 - accumulator_type acum = 0; - int xi=0,yi=0; - - int xib=(int)floor(x0), - xie=(int)floor(x1); - - int yib=(int)floor(y0), - yie=(int)floor(y1); - - //the weight for the pixel should remain the same... - float weight = (y1-y0)*(x1-x0); - - assert(weight != 0); - - //clip to the input region - if(x0 >= s.get_w() || x1 <= 0) return acum; - if(y0 >= s.get_h() || y1 <= 0) return acum; - - if(x0 < 0) { x0 = 0; xib = 0; } - if(x1 >= s.get_w()) - { - x1 = s.get_w(); //want to be just below the last pixel... - xie = s.get_w()-1; - } - - if(y0 < 0) { y0 = 0; yib = 0; } - if(y1 >= s.get_h()) - { - y1 = s.get_h(); //want to be just below the last pixel... - yie = s.get_h()-1; - } - - float ylast = y0, xlastb = x0; - const_pen pen = s.get_pen(xib,yib); - - for(yi = yib; yi < yie; ylast = ++yi, pen.inc_y()) - { - const float yweight = yi+1 - ylast; - - float xlast = xlastb; - for(xi = xib; xi < xie; xlast = ++xi, pen.inc_x()) - { - const float w = yweight*(xi+1 - xlast); - acum += cooker_.cook(pen.get_value())*w; - } - - //post... with next being fractional... - const float w = yweight*(x1 - xlast); - acum += cooker_.cook(pen.get_value())*w; - - pen.dec_x(xie-xib); - } - - //post in y direction... must have all x... - { - const float yweight = y1 - ylast; - - float xlast = xlastb; - for(xi = xib; xi < xie; xlast = ++xi) - { - const float w = yweight*(xi+1 - xlast); - - acum += cooker_.cook(pen.get_value())*w; - } - - //post... with next being fractional... - const float w = yweight*(x1 - xlast); - acum += cooker_.cook(pen.get_value())*w; - } - - acum *= 1/weight; - return cooker_.uncook(acum); - } -}; - -_ETL_END_NAMESPACE - -/* === T Y P E D E F S ===================================================== */ - - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_thread.h b/ETL/trunk/ETL/_thread.h deleted file mode 100644 index 8f70be8..0000000 --- a/ETL/trunk/ETL/_thread.h +++ /dev/null @@ -1,515 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library -** Thread Abstraction Class Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__THREAD_H_ -#define __ETL__THREAD_H_ - -/* === H E A D E R S ======================================================= */ - -#define __USE_GNU - -#ifdef HAVE_PTHREAD_H -# include -#endif - -#ifdef HAVE_SCHED_H -# include -#endif - -#ifdef HAVE_CREATETHREAD -# include -#endif - -/* === M A C R O S ========================================================= */ - -#if ( defined (HAVE_PTHREAD_CREATE) || defined (HAVE_CLONE) || defined (HAVE_CREATETHREAD) ) && !defined (NO_THREADS) -# define CALLISTO_THREADS -#endif - -#define THREAD_ENTRYPOINT - -/* === C L A S S E S & S T R U C T S ======================================= */ - -#if defined(CALLISTO_THREADS) && defined(HAVE_PTHREAD_CREATE) -static inline void Yield(void) -{ - sched_yield(); - pthread_testcancel(); -} -#else -#ifdef Yield - #undef Yield -#endif -inline void Yield(void) { } -#endif - -#ifdef CALLISTO_THREADS - -#ifdef HAVE_PTHREAD_CREATE - -class Thread -{ -public: - typedef void* entrypoint_return; -private: - - pthread_t thread; - int *references; - entrypoint_return (*entrypoint)(void *); - void *context; -public: - Thread(void *(*ep)(void *)=NULL,void *context=NULL): - references(NULL),entrypoint(ep),context(context) { } - Thread(const Thread &t) - { - thread=t.thread; - references=t.references; - entrypoint=t.entrypoint; - context=t.context; - if(references) - (*references)++; - } - const Thread &operator=(const Thread &rhs) - { - if(references) - { - (*references)--; - if(*references==0) - stop(); - } - thread=rhs.thread; - references=rhs.references; - entrypoint=rhs.entrypoint; - context=rhs.context; - if(references) - (*references)++; - return *this; - } - - void start(void) - { - references = new int; - *references = 1; - pthread_create(&thread,NULL,entrypoint,context); -// pthread_detach(thread); - } - - void stop(void) - { - delete references; - references=NULL; - void *exit_status; - pthread_cancel(thread); - pthread_join(thread,&exit_status); - } - - static void TestStop() - { - pthread_testcancel(); - } - - static void SyncStop() - { - int i; - pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,&i); - } - - static void AsyncStop() - { - int i; - pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS,&i); - } - - ~Thread() - { - if(references) - { - (*references)--; - if(*references==0) - stop(); - } - } -}; - -class Mutex -{ - pthread_mutex_t mutex; - pthread_t locker; - int depth; -public: - - Mutex() - { - pthread_mutexattr_t attr; - pthread_mutexattr_init(&attr); - //#ifdef PTHREAD_PRIO_INHERIT - //pthread_mutexattr_setprioceiling(&attr,PTHREAD_PRIO_INHERIT); - //#endif - #ifdef PTHREAD_MUTEX_RECURSIVE - pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); - #endif - pthread_mutex_init(&mutex,&attr); - pthread_mutexattr_destroy(&attr); - locker=0; - depth=0; - } - - ~Mutex() - { pthread_mutex_destroy(&mutex); } - - void Lock(void) - { - if(!locker || locker!=pthread_self()) - { - pthread_mutex_lock(&mutex); - locker=pthread_self(); - depth=0; - return; - } - depth++; - } - - bool TryLock(void) - { return !(bool) pthread_mutex_trylock(&mutex); } - - void UnLock(void) - { - if(depth) - { - depth--; - return; - } - pthread_mutex_unlock(&mutex); - locker=0; - } -}; - -#ifdef HAVE_PTHREAD_RW_LOCK_INIT -class ReadWriteLock -{ - pthread_rwlock_t rwlock; -public: - - ReadWriteLock() - { pthread_rwlock_init(&rwlock,NULL); } - - ~ReadWriteLock() - { pthread_rwlock_destroy(&rwlock); } - - void LockRead(void) - { pthread_rwlock_rdlock(&rwlock); } - - void LockWrite(void) - { pthread_rwlock_wrlock(&rwlock); } - - bool TryLockRead(void) - { return !(bool)pthread_rwlock_tryrdlock(&rwlock); } - - bool TryLockWrite(void) - { return !(bool)pthread_rwlock_trywrlock(&rwlock); } - - void UnLockWrite(void) - { pthread_rwlock_unlock(&rwlock); } - - void UnLockRead(void) - { pthread_rwlock_unlock(&rwlock); } -}; -#else -//* -class ReadWriteLock : public Mutex -{ -public: - - ReadWriteLock() - { } - - ~ReadWriteLock() - { } - - void LockRead(void) - { Lock(); } - - void LockWrite(void) - { Lock(); } - - bool TryLockRead(void) - { return TryLock(); } - - bool TryLockWrite(void) - { return TryLock(); } - - void UnLockWrite(void) - { UnLock(); } - - void UnLockRead(void) - { UnLock(); } -}; -#endif - -/* -class Condition -{ - pthread_cond_t cond; - pthread_mutex_t mutex; -public: - Condition() - { pthread_cond_init(&cond,NULL); pthread_mutex_init(&mutex,NULL); } - ~Condition() - { pthread_cond_destroy(&cond); pthread_mutex_destroy(&mutex);} - void operator()(void) - { pthread_cond_signal(&cond); } - void Wait(void) - { - pthread_mutex_lock(&mutex); - pthread_cond_wait(&cond,&mutex); - pthread_mutex_unlock(&mutex); - } -}; -*/ - -#else // if defined HAVE_PTHREAD -#ifdef HAVE_CREATETHREAD - - -#ifdef THREAD_ENTRYPOINT -#undef THREAD_ENTRYPOINT -#endif -#define THREAD_ENTRYPOINT __stdcall -class Thread -{ -public: - typedef unsigned long entrypoint_return; -private: - - unsigned long thread; - HANDLE handle; - int *references; - - entrypoint_return (THREAD_ENTRYPOINT *entrypoint)(void *); - - void *context; - - HDC hdc; - HGLRC hglrc; - - static entrypoint_return THREAD_ENTRYPOINT thread_prefix(void*data) - { - Thread *thread=(Thread *)data; - - if(thread->hglrc) - wglMakeCurrent(thread->hdc, thread->hglrc); - - return thread->entrypoint(thread->context); - } - -public: - Thread(entrypoint_return (THREAD_ENTRYPOINT *ep)(void *)=NULL,void *context=NULL): - references(NULL),entrypoint(ep),context(context) { } - Thread(const Thread &t) - { - thread=t.thread; - handle=t.handle; - references=t.references; - entrypoint=t.entrypoint; - context=t.context; - handle=NULL; - if(references) - (*references)++; - } - const Thread &operator=(const Thread &rhs) - { - if(references) - { - (*references)--; - if(*references==0) - stop(); - } - thread=rhs.thread; - handle=rhs.handle; - references=rhs.references; - entrypoint=rhs.entrypoint; - context=rhs.context; - if(references) - (*references)++; - return *this; - } - - void start(void) - { - references = new int; - *references = 1; - - hglrc=wglGetCurrentContext(); - hdc=wglGetCurrentDC(); - - handle=CreateThread( - NULL, // Security stuff - 0, // STACK - thread_prefix, // thread function - (void*)this, // thread argument - 0, // creation option - &thread // thread identifier - ); - } - - void stop(void) - { - delete references; - references=NULL; - - TerminateThread(handle, FALSE); - } - - int wait(void) - { - if(handle) - { - WaitForSingleObject(handle, INFINITE); - CloseHandle(handle); - } - return 0; - } - - static void TestStop() - { - } - - static void SyncStop() - { - } - - static void AsyncStop() - { - } - - ~Thread() - { - if(references) - { - (*references)--; - if(*references==0) - stop(); - } - } -}; - -class Mutex -{ - HANDLE handle; -public: - - Mutex() - { - handle = CreateMutex(NULL, FALSE, NULL); - } - - ~Mutex() - { - CloseHandle(handle); - } - - void Lock(void) - { - WaitForSingleObject(handle, INFINITE); - } - - bool TryLock(void) - { - return WaitForSingleObject(handle, INFINITE)==WAIT_FAILED; - } - - void UnLock(void) - { - ReleaseMutex(handle); - } -}; - - -#endif // if defined HAVE_CREATETHREAD -#endif // if defined HAVE_PTHREAD_CREATE -#endif // if defined CALLISTO_THREADS - - -#if !defined(CALLISTO_THREADS) -// Dummy object used when not threading -class ReadWriteLock -{ -public: - - ReadWriteLock() {} - ~ReadWriteLock() {} - void LockRead(void) {} - void LockWrite(void) {} - bool TryLockRead(void) {return true;} - bool TryLockWrite(void) {return true;} - void UnLockRead(void) {} - void UnLockWrite(void) {} -}; - -class Mutex -{ -public: - - Mutex(){} - ~Mutex(){} - void Lock(void){} - bool TryLock(void){return true;} - void UnLock(void){} -}; - -#endif - -class Condition : private Mutex -{ - bool flag; -public: - Condition() - { flag=false; } - ~Condition() - { } - void operator()(void) - { flag=true; } - void Wait(void) - { - Lock(); - while(!flag)Yield(); - flag=false; - UnLock(); - } - void WaitNext(void) - { - Lock(); - flag=false; - while(!flag)Yield(); - UnLock(); - } -}; - -/* === E X T E R N S ======================================================= */ - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_trivial.h b/ETL/trunk/ETL/_trivial.h deleted file mode 100644 index a819c1d..0000000 --- a/ETL/trunk/ETL/_trivial.h +++ /dev/null @@ -1,164 +0,0 @@ -/*! ======================================================================== -** Extended Template Library -** Trivializing Template Class Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__TRIVIAL_H -#define __ETL__TRIVIAL_H - -/* === H E A D E R S ======================================================= */ - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -_ETL_BEGIN_NAMESPACE - -/*! ======================================================================== -** \class Trivial -** \brief Trivializes the constructor of a given class -** -** This class makes the given type 'trivial', -** effectively disabling the constructor and -** destructor. (This is useful for unions) -** Some extra casting may be necessary to get -** it to work properly. -*/ -template -class trivial -{ - typedef T value_type; - typedef T& reference; - typedef const T& const_reference; - typedef T* pointer; - typedef const T* const_pointer; - - char data[sizeof(T)]; -public: - operator reference() - { return *reinterpret_cast(data); } - - // HACK - Rather dangerous - //operator reference()const - //{ return *reinterpret_cast(const_cast(data)); } - - operator const_reference()const - { return *reinterpret_cast(data); } - - reference get() - { return *reinterpret_cast(data); } - - const_reference get()const - { return *reinterpret_cast(data); } - - void construct() - { new(&get()) value_type(); } - - void destruct() - { get().~value_type(); } - - void destroy() { destruct(); } - - template reference - operator=(const U &rhs) - { return get()=rhs; } - - templatereference - operator=(const trivial &rhs) - { return get()=rhs.get(); } - - template reference - operator+=(const U &rhs) - { return get()+=rhs; } - - template reference - operator-=(const U &rhs) - { return get()-=rhs; } - - template reference - operator*=(const U &rhs) - { return get()*=rhs; } - - template reference - operator/=(const U &rhs) - { return get()/=rhs; } - - template reference - operator%=(const U &rhs) - { return get()%=rhs; } - - template reference - operator^=(const U &rhs) - { return get()^=rhs; } - - template reference - operator&=(const U &rhs) - { return get()&=rhs; } - - template reference - operator>>=(const U &rhs) - { return get()>>=rhs; } - - template reference - operator<<=(const U &rhs) - { return get()<<=rhs; } - - operator bool()const - { return get(); } - - bool operator!()const - { return !get(); } -}; // END of template class trivial - -_ETL_END_NAMESPACE - -//#include - -/* -template std::basic_istream<_CharT, _Traits>& -operator>>(std::basic_istream<_CharT, _Traits>& s, etl::trivial& rhs) -{ return s>>(T)(rhs); } - -template std::basic_ostream<_CharT, _Traits>& -operator<<(std::basic_ostream<_CharT, _Traits>& s, const etl::trivial& rhs) -{ return s<<(T)(rhs); } -*/ - -/* -template std::istream& -operator>>(std::istream& s, etl::trivial& rhs) -{ return s>>(T)(rhs); } - -template std::ostream& -operator<<(std::ostream& s, const etl::trivial& rhs) -{ return s<<(T)(rhs); } -*/ - -/* === E X T E R N S ======================================================= */ - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/_value.h b/ETL/trunk/ETL/_value.h deleted file mode 100644 index adf7816..0000000 --- a/ETL/trunk/ETL/_value.h +++ /dev/null @@ -1,237 +0,0 @@ -/* ======================================================================== -** Extended Template and Library -** Abstraction for a Generic Value Type -** $Id$ -** -** Copyright (c) 2002 Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** This is an internal header file, included by other ETL headers. -** You should not attempt to use it directly. -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__VALUE_H -#define __ETL__VALUE_H - -/* === H E A D E R S ======================================================= */ -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -/*! \note This class may be specialized to support binary compatibility - for desired objects (e.g. point3,vector3,float[3]). - However it MUST be declared within scope that you are using the - values.... - - \warning If you specialize this class for something that isn't binary - compatible, then your values could easily report belonging to - the wrong types. -*/ -template < typename T > -class value_store_type -{ -public: - typedef T value_type; -}; - -_ETL_BEGIN_NAMESPACE - -/*! \class value _value.h ETL/value - \brief Abstraction of the concept of a generic value - - Modified from ideas for the boost::any type. Added binary compatibility - structure -*/ -class value -{ - struct contentholder - { - virtual ~contentholder() {} - virtual contentholder *clone() const = 0; - virtual const std::type_info &type() const = 0; - }; - - contentholder *content; - -public: //constructor interface - value() - :content(0) - { - } - - value(const value &v) - :content( v.content ? v.content->clone() : 0 ) - { - } - - /* Copies the object passed to it - */ - template < typename T > - value(const T &v) - :content( new holder< typename value_store_type::value_type > - (reinterpret_cast::value_type &>(v)) ) - { - } - -public: //modifier interface - - value & swap(value & rhs) - { - std::swap(content, rhs.content); - return *this; - } - - template - value & operator=(const ValueType & rhs) - { - value(rhs).swap(*this); - return *this; - } - - value & operator=(const value & rhs) - { - value(rhs).swap(*this); - return *this; - } - -public: //query interface - - bool empty() const - { - return content == 0; - } - - const std::type_info & type() const - { - return content ? content->type() : typeid(void); - } - -private: //implementation interface - - template < typename T > - class holder : public contentholder - { - public: //representation - T obj; - - public: //constructor interface - - holder(const T &o) - :obj(o) - { - } - - holder(const holder &h) - :obj(h.obj) - { - } - - public: //accessor interface - virtual contentholder *clone() const - { - return new holder(*this); - } - - virtual const std::type_info &type() const - { - return typeid(T); - } - - public: //allocation interface - void *operator new(unsigned int size) - { - assert(size == sizeof(holder)); - - //use pool allocation at some point - return malloc(size); - } - - void operator delete(void *p) - { - assert(p); - //use pool allocation at some point - return free(p); - } - }; - - template < typename ValueType > - friend ValueType *value_cast(value *v); -}; - -/*! Is thrown for bad value_casts (when using a reference...) -*/ -class bad_value_cast : public std::bad_cast -{ -public: - virtual const char * what() const throw() - { - return "etl::bad_value_cast: " "failed conversion using boost::value_cast"; - } -}; - -/*! Returns a pointer to the desired value type if the value_type and the internal - binary format agree (mediated by using the value_store_type class), otherwise - it returns 0. - - \see value_store_type -*/ -template < typename ValueType > -ValueType *value_cast(value *v) -{ - assert(v); - - return ( typeid(typename value_store_type::value_type) == v->type() ) - ? &static_cast *>(v->content)->obj - : 0; -} - -/*! Same as above except tweaked to allow const cast (possibly for purposes involving - type agreement... if const impacts a typeid call I do not know...) -*/ -template < typename ValueType > -const ValueType * value_cast(const value *v) -{ - return value_cast(const_cast(v)); -} - -/*! Extract a copy of the internal object and will throw a bad_value_cast exception - if the types do not agree. - - \note I'm not sure why boost::any didn't use a reference here... there must be a reason... - - \see bad_value_cast -*/ -template < typename ValueType > -ValueType value_cast(const value &v) -{ - const ValueType * result = value_cast(&v); - if(!result) - throw bad_value_cast(); - return *result; -} - -_ETL_END_NAMESPACE - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/angle b/ETL/trunk/ETL/angle deleted file mode 100644 index 9a0f2bb..0000000 --- a/ETL/trunk/ETL/angle +++ /dev/null @@ -1,48 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Angle Abstraction Class Implementation -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__ANGLE__ -#define __ETL__ANGLE__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" -#include "_curve_func.h" - -#ifdef ETL_FASTANGLE -#include "_fastangle.h" -_ETL_BEGIN_NAMESPACE -typedef fastangle angle; -_ETL_END_NAMESPACE -#else -# include "_angle.h" -#endif - -#ifdef __BEZIER__ -#include "_bezier_angle.h" -#endif - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/bezier b/ETL/trunk/ETL/bezier deleted file mode 100644 index a341031..0000000 --- a/ETL/trunk/ETL/bezier +++ /dev/null @@ -1,40 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Bezier Curve Class -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__BEZIER__ -#define __ETL__BEZIER__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_bezier.h" - -#ifdef __ETL_ANGLE__ -#include "_bezier_angle.h" -#endif - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/boxblur b/ETL/trunk/ETL/boxblur deleted file mode 100644 index 5364c23..0000000 --- a/ETL/trunk/ETL/boxblur +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Box Blur Template -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__BOXBLUR__ -#define __ETL__BOXBLUR__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_boxblur.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/calculus b/ETL/trunk/ETL/calculus deleted file mode 100644 index e527557..0000000 --- a/ETL/trunk/ETL/calculus +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Calculus Functional Classes -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__CALCULUS__ -#define __ETL__CALCULUS__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_calculus.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/clock b/ETL/trunk/ETL/clock deleted file mode 100644 index 2457b6c..0000000 --- a/ETL/trunk/ETL/clock +++ /dev/null @@ -1,104 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Clock Abstraction -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__CLOCK__ -#define __ETL__CLOCK__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#ifdef HAVE_GETTIMEOFDAY -#include "_clock_gettimeofday.h" -#ifndef ETL_CLOCK_DEFAULT_DESC_CLASS -#define ETL_CLOCK_DEFAULT_DESC_CLASS _ETL::clock_desc_gettimeofday -#endif -#ifndef ETL_CLOCK_REALTIME_DESC_CLASS -#define ETL_CLOCK_REALTIME_DESC_CLASS _ETL::clock_desc_gettimeofday -#endif -#endif - -#ifdef _WIN32 -#include "_clock_win32hpcount.h" -#ifndef ETL_CLOCK_DEFAULT_DESC_CLASS -#define ETL_CLOCK_DEFAULT_DESC_CLASS _ETL::clock_desc_win32hpcount -#endif -#ifndef ETL_CLOCK_REALTIME_DESC_CLASS -#define ETL_CLOCK_REALTIME_DESC_CLASS _ETL::clock_desc_win32hpcount -#endif -#endif - -// If we could not find ourselves a better -// clock description, go ahead and use the -// standard clock() implementation. -// (Better than nothing...) -#include "_clock_system.h" -#ifndef ETL_CLOCK_DEFAULT_DESC_CLASS -#define ETL_CLOCK_DEFAULT_DESC_CLASS _ETL::clock_desc_sys_clock -#endif -#ifndef ETL_CLOCK_PROCTIME_DESC_CLASS -#define ETL_CLOCK_PROCTIME_DESC_CLASS _ETL::clock_desc_sys_clock -#endif -#ifndef ETL_CLOCK_REALTIME_DESC_CLASS -#define ETL_CLOCK_REALTIME_DESC_CLASS _ETL::clock_desc_sys_time -#endif - -#include "_clock_base.h" - -_ETL_BEGIN_NAMESPACE - -#if 0 - typedef _ETL::clock_base clock; - #ifdef ETL_CLOCK_PROCTIME_DESC_CLASS - #define ETL_CLOCK_PROCTIME - typedef clock_base clock_proctime; - #endif - #ifdef ETL_CLOCK_REALTIME_DESC_CLASS - #define ETL_CLOCK_REALTIME - typedef clock_base clock_realtime; - #else - #warning No realtime clock description found. - #endif - -#else - class clock : public _ETL::clock_base { }; - #ifdef ETL_CLOCK_PROCTIME_DESC_CLASS - #define ETL_CLOCK_PROCTIME - class clock_proctime : public _ETL::clock_base { }; - #endif - #ifdef ETL_CLOCK_REALTIME_DESC_CLASS - #define ETL_CLOCK_REALTIME - class clock_realtime : public _ETL::clock_base { }; - #else - #warning No realtime clock description found. - #endif -#endif - -_ETL_END_NAMESPACE - -//using etl::clock; - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/etl_config.h b/ETL/trunk/ETL/etl_config.h deleted file mode 100644 index 94b4056..0000000 --- a/ETL/trunk/ETL/etl_config.h +++ /dev/null @@ -1,66 +0,0 @@ - - -#ifndef __ETL_CONFIG_H -#define __ETL_CONFIG_H - -#include "etl_profile.h" -#include - -#ifndef ETL_NAMESPACE -# define ETL_NAMESPACE etl -#endif - -#ifdef WIN32 -#define ETL_DIRECTORY_SEPARATOR '\\' -#else -#define ETL_DIRECTORY_SEPARATOR '/' -#endif - -#ifndef ETL_FLAG_NONAMESPACE -# define _ETL ETL_NAMESPACE -# define _ETL_BEGIN_NAMESPACE namespace _ETL { -# define _ETL_END_NAMESPACE }; -# define _STD_BEGIN_NAMESPACE namespace std { -# define _STD_END_NAMESPACE }; -#else -# define _ETL -# define _ETL_BEGIN_NAMESPACE -# define _ETL_END_NAMESPACE -# define _STD_BEGIN_NAMESPACE -# define _STD_END_NAMESPACE -#endif - -#define _ETL_BEGIN_CDECLS extern "C" { -#define _ETL_END_CDECLS } - -#ifdef _REENTRANT -#define ETL_REENTRANT 1 -#endif - -/* If __FUNC__ is not defined, -** try to define it. If we cannot, -** then just leave it undefined. -*/ -#ifndef __FUNC__ -/* - * # if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4) -# define __FUNC__ __PRETTY_FUNCTION__ -# else -# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L -# define __FUNC__ __func__ -# endif -# endif -*/ -#endif - -#ifdef __GNUG__ -#define ETL_DEPRECATED_FUNCTION __attribute__ ((deprecated)) -#else -#define ETL_DEPRECATED_FUNCTION -#endif - -#ifndef NULL -#define NULL 0 -#endif - -#endif diff --git a/ETL/trunk/ETL/fastangle b/ETL/trunk/ETL/fastangle deleted file mode 100644 index c874f7a..0000000 --- a/ETL/trunk/ETL/fastangle +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Fast Angle Abstraction Class -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__FASTANGLE__ -#define __ETL__FASTANGLE__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_fastangle.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/fixed b/ETL/trunk/ETL/fixed deleted file mode 100644 index 58d99e4..0000000 --- a/ETL/trunk/ETL/fixed +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Fixed-Point Math Class -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__FIXED__ -#define __ETL__FIXED__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_fixed.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/gaussian b/ETL/trunk/ETL/gaussian deleted file mode 100644 index 745306c..0000000 --- a/ETL/trunk/ETL/gaussian +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Gaussian Blur Template -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__GAUSSIAN__ -#define __ETL__GAUSSIAN__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_gaussian.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/handle b/ETL/trunk/ETL/handle deleted file mode 100644 index 76508bc..0000000 --- a/ETL/trunk/ETL/handle +++ /dev/null @@ -1,49 +0,0 @@ -// -*- C++ -*- -/* === E T L =============================================================== */ -/*! \file handle -** $Id$ -** \brief Template Object Handle -** -** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__HANDLE__ -#define __ETL__HANDLE__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -// include the next line in an attempt to increase stability -// it seems to make things much *less* stable on MS Windows -#ifndef _WIN32 -#ifdef HAVE_LIBPTHREAD -#define ETL_LOCK_REFCOUNTS -#endif -#endif - -#ifdef ETL_LOCK_REFCOUNTS -# include "mutex" -#endif - -#include "_handle.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/hermite b/ETL/trunk/ETL/hermite deleted file mode 100644 index 66b2fcb..0000000 --- a/ETL/trunk/ETL/hermite +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Hermite Curve Class -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__HERMITE__ -#define __ETL__HERMITE__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_hermite.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/ipc b/ETL/trunk/ETL/ipc deleted file mode 100644 index 5c31519..0000000 --- a/ETL/trunk/ETL/ipc +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Inter-Process Commumnication Classes -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__IPC__ -#define __ETL__IPC__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_mutex_null.h" - -#include "_mutex_pthreads.h" - -#include "_condition.h" -#include "_rwlock.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/misc b/ETL/trunk/ETL/misc deleted file mode 100644 index 571968b..0000000 --- a/ETL/trunk/ETL/misc +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Misc -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__MISC__ -#define __ETL__MISC__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_misc.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/mutex b/ETL/trunk/ETL/mutex deleted file mode 100644 index f4d1263..0000000 --- a/ETL/trunk/ETL/mutex +++ /dev/null @@ -1,42 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Mutex Classes -** $Id$ -** -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__MUTEX__ -#define __ETL__MUTEX__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#ifdef HAVE_LIBPTHREAD -# include "_mutex_pthreads_simple.h" -#else -#ifdef _WIN32 -# include "_mutex_win32.h" -#endif -#endif - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/pen b/ETL/trunk/ETL/pen deleted file mode 100644 index 822137e..0000000 --- a/ETL/trunk/ETL/pen +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Pen Template Class -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__PEN__ -#define __ETL__PEN__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_pen.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/random b/ETL/trunk/ETL/random deleted file mode 100644 index 0b2815c..0000000 --- a/ETL/trunk/ETL/random +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Random Number Generator Class -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__RANDOM__ -#define __ETL__RANDOM__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_random.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/rect b/ETL/trunk/ETL/rect deleted file mode 100644 index 3e8be9f..0000000 --- a/ETL/trunk/ETL/rect +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Rect -** $Id$ -** -** Copyright (c) 2002 Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__RECT__ -#define __ETL__RECT__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_rect.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/ref_count b/ETL/trunk/ETL/ref_count deleted file mode 100644 index 0ed146f..0000000 --- a/ETL/trunk/ETL/ref_count +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__REF_COUNT__ -#define __ETL__REF_COUNT__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_ref_count.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/smach b/ETL/trunk/ETL/smach deleted file mode 100644 index 7299702..0000000 --- a/ETL/trunk/ETL/smach +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** State Machine Abstraction Class -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__SMACH__ -#define __ETL__SMACH__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_smach.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/smart_ptr b/ETL/trunk/ETL/smart_ptr deleted file mode 100644 index c58514f..0000000 --- a/ETL/trunk/ETL/smart_ptr +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Template Smart Pointer -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__SMART_PTR__ -#define __ETL__SMART_PTR__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_smart_ptr.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/spline b/ETL/trunk/ETL/spline deleted file mode 100644 index aa34136..0000000 --- a/ETL/trunk/ETL/spline +++ /dev/null @@ -1,37 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Spline Class -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__SPLINE__ -#define __ETL__SPLINE__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_bspline.h" -#include "_curve.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/status b/ETL/trunk/ETL/status deleted file mode 100644 index c1e687c..0000000 --- a/ETL/trunk/ETL/status +++ /dev/null @@ -1,38 +0,0 @@ -#ifdef THIS_CODE_IS_NOT_USED -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Status Callback Class -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__STATUS__ -#define __ETL__STATUS__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_status.h" - -/* === E N D =============================================================== */ - -#endif -#endif /* THIS_CODE_IS_NOT_USED */ diff --git a/ETL/trunk/ETL/stringf b/ETL/trunk/ETL/stringf deleted file mode 100644 index d196f7d..0000000 --- a/ETL/trunk/ETL/stringf +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** stringf Procedure -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__STRINGF__ -#define __ETL__STRINGF__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_stringf.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/surface b/ETL/trunk/ETL/surface deleted file mode 100644 index afc313e..0000000 --- a/ETL/trunk/ETL/surface +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Surface Abstraction Class -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__SURFACE__ -#define __ETL__SURFACE__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_surface.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/thread b/ETL/trunk/ETL/thread deleted file mode 100644 index 500f496..0000000 --- a/ETL/trunk/ETL/thread +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Thread Abstraction Class -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__THREAD__ -#define __ETL__THREAD__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_thread.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/trivial b/ETL/trunk/ETL/trivial deleted file mode 100644 index 1f3d1bc..0000000 --- a/ETL/trunk/ETL/trivial +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Trivial Template Class -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__TRIVIAL__ -#define __ETL__TRIVIAL__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_trivial.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/ETL/value b/ETL/trunk/ETL/value deleted file mode 100644 index b97e102..0000000 --- a/ETL/trunk/ETL/value +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -/*! ======================================================================== -** Extended Template and Library -** Generic Value Template -** $Id$ -** -** Copyright (c) 2002 Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __ETL__VALUE__ -#define __ETL__VALUE__ - -/* === H E A D E R S ======================================================= */ - -#include "etl_config.h" - -#include "_value.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/ETL/trunk/Makefile.am b/ETL/trunk/Makefile.am deleted file mode 100644 index 48447b7..0000000 --- a/ETL/trunk/Makefile.am +++ /dev/null @@ -1,116 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - COPYING \ - INSTALL \ - config/config.guess \ - config/config.sub \ - config/ltmain.sh \ - config/install-sh \ - config/mkinstalldirs \ - config/aclocal.m4 \ - config/missing \ - config/texinfo.tex \ - config/depcomp \ - aclocal.m4 \ - config.h.in \ - configure \ - stamp-h.in \ - Makefile.in \ - config.log \ - config.status \ - .doc_stamp \ - .DS_Store \ - include/etl_profile.h.in \ - doxygen.cfg - - -SUBDIRS = \ - ETL \ - test - - -# Install the pkg-config file: -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = ETL.pc - -#Install the -config/m4 alternative to pkg-config: -bin_SCRIPTS = ETL-config - -aclocaldir = $(prefix)/share/aclocal -ACLOCAL_AMFLAGS = -I m4 - -EXTRA_DIST = \ - COPYING \ - m4/subs.m4 \ - config/depcomp \ - m4/cxx_macros.m4 \ - ETL.pbproj/project.pbxproj \ - ETL.pbproj/etl_profile.h \ - ETL.pbproj/frameworkfix.cpp \ - ETL-config.in \ - m4/ETL.m4 \ - doxygen.cfg.in \ - doxygen.cfg \ - ETL.pc.in - - -SVN=svn -TAG=@PACKAGE_TARNAME@_@VERSION_MAJ@_@VERSION_MIN@_@VERSION_REV@ - -GREP=grep - -PRINTF=printf - -SH=sh - -DOXYGEN=doxygen - -stats: - -@echo - -@echo -- Stats - -@echo - -@$(PRINTF) "Total lines: " - -@wc -l $(shell find $(top_srcdir)/ETL -name '*.[ch]*') | $(GREP) total - -@$(PRINTF) "Total size: " - -@du -hcs $(shell find $(top_srcdir)/ETL -name '*.[ch]*') | $(GREP) total - -@echo - -tagstable: - -$(SVN) delete $(SVN_REPOSITORY)/tags/stable -m "Stable Tag: Removing old tag" - $(SVN) copy $(top_srcdir) $(SVN_REPOSITORY)/tags/stable -m "Stable Tag: Copying everything over" - -tagrelease: - $(SVN) copy $(top_srcdir) $(SVN_REPOSITORY)/tags/$(TAG) -m "Release $(TAG)" - -ChangeLog: - -svn update - svn2cl --include-rev || touch ChangeLog - -listfixmes: - -@echo - -@echo -- List of pending FIXMEs - -@echo - -@$(GREP) FIXME -n $(shell find $(top_srcdir) -name '*.[ch]*') - -@echo - -listhacks: - -@echo - -@echo -- List of pending HACKs - -@echo - -@$(GREP) HACK -n $(shell find $(top_srcdir) -name '*.[ch]*') - -@echo - -run: check - -.doc_stamp: doxygen.cfg - $(DOXYGEN) doxygen.cfg - touch .doc_stamp - -html: .doc_stamp - -rtf: .doc_stamp - -docs: html - -.PHONY: stats tagstable tagrelease listfixmes listhacks check docs pdf html rtf diff --git a/ETL/trunk/NEWS b/ETL/trunk/NEWS deleted file mode 100644 index da8dea4..0000000 --- a/ETL/trunk/NEWS +++ /dev/null @@ -1,50 +0,0 @@ - ETL releases - -More detailed notes are available on the releases page: - -http://synfig.org/Releases - - 0.04.12 (SVN 2112) - October 21, 2008 - Bug fixes - - * Improve the derivative class for hermites. - * Update configure.ac as suggested by autoupdate. - - 0.04.11 (SVN 1837) - March 3, 2008 - Bug fixes - - * Update the website URL to synfig.org instead of synfig.com - * Removed the 'bootstrap' script for building. Use autoreconf instead - * Fixed errors and warnings detected by a pre-release version of GCC 4.3 - * Make ETL-config a wrapper around pkg-config. - * Wrap the refcounting stuff in mutexes - * Don't wrap angles by 360 degrees - * Minor cleanups and typo fixes - - 0.04.10 (SVN 878) - October 10, 2007 - Bug fixes - - * Fix dirname for absolute paths (#1793306) - * Fix minor issues and typos - * Various changes to the 'angle' code. 89+360 < 90; 90 == 90+360, !360 is true, etc. - * Resolve confusion about whether angles are clockwise, and whether they're stored in radians. - * Fix 'make check' for 'fixed' so that it doesn't fail. Tidy the output, too. - - 0.04.09 (SVN 530) - June 20, 2006 - Bug fixes - - * Fix amd64 issue - * Some tests fixes - * Misc bug fixes - * Add better code for finding closest point to a bezier (#1672033) - - 0.04.08 (SVN 139) - February 27, 2006 - Bug fixes - - * Update doxygen configuration - * Misc bug fixes - - 0.04.07 (SVN 52) - November 6, 2005 - Bug fixes - - * Add ./configure options for debug, warnings, optimisation, profiling - * Misc bug fixes - - 0.04.06 - November 3, 2005 - First release! - - * First release! - diff --git a/ETL/trunk/README b/ETL/trunk/README deleted file mode 100644 index 9186837..0000000 --- a/ETL/trunk/README +++ /dev/null @@ -1,37 +0,0 @@ - ETL -- Extended Template Library - -ETL is a multi-platform class and template library designed to add -new datatypes and functions which combine well with the existing -types and functions from the C++ Standard Template Library (STL). - -Web: http://synfig.org/ -Code: http://synfig.org/Source_code -Proj: http://sf.net/projects/synfig/ -IRC: irc://irc.freenode.net/synfig - -Please use the IRC channel and the sf.net tracker to get support and -report bugs, request features and submit patches. - -Copyright - -Copyright 2002 Robert B. Quattlebaum Jr. -Copyright 2002 Adrian Bentley -Copyright 2007-2008 Chris Moore -Copyright 2008 Paul Wise - -Licence - -This package is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of -the License, or (at your option) any later version. - -This package is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -or visit http://www.gnu.org/licenses/gpl.html diff --git a/ETL/trunk/config/pkg-support/ETL-devel.info b/ETL/trunk/config/pkg-support/ETL-devel.info deleted file mode 100755 index 4ba67fd..0000000 --- a/ETL/trunk/config/pkg-support/ETL-devel.info +++ /dev/null @@ -1,14 +0,0 @@ -Title @_PACKAGE_@ @_VERSION_@ -Version @_RELEASE_@ -Description @_PACKAGE_NAME_@ -DefaultLocation /Library/Frameworks -DeleteWarning -NeedsAuthorization YES -DisableStop NO -UseUserMask YES -Application NO -Relocatable YES -Required NO -InstallOnly NO -RequiresReboot NO -InstallFat NO diff --git a/ETL/trunk/config/pkg-support/devel-resources/License.rtf b/ETL/trunk/config/pkg-support/devel-resources/License.rtf deleted file mode 100755 index 52701d7..0000000 --- a/ETL/trunk/config/pkg-support/devel-resources/License.rtf +++ /dev/null @@ -1,10 +0,0 @@ -{\rtf1\mac\ansicpg10000\cocoartf102 -{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\vieww9000\viewh9000\viewkind0 -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural - -\f0\b\fs36 \cf0 This will be the license. -\f1\b0\fs24 \ -\ -I intend to licence this software under the LGPL. } \ No newline at end of file diff --git a/ETL/trunk/config/pkg-support/devel-resources/ReadMe.rtf b/ETL/trunk/config/pkg-support/devel-resources/ReadMe.rtf deleted file mode 100755 index 17874b1..0000000 --- a/ETL/trunk/config/pkg-support/devel-resources/ReadMe.rtf +++ /dev/null @@ -1,7 +0,0 @@ -{\rtf1\mac\ansicpg10000\cocoartf102 -{\fonttbl\f0\fswiss\fcharset77 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\margl1440\margr1440\vieww9000\viewh9000\viewkind0 -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural - -\f0\fs24 \cf0 This is the readme.} \ No newline at end of file diff --git a/ETL/trunk/config/pkg-support/devel-resources/Welcome.rtf b/ETL/trunk/config/pkg-support/devel-resources/Welcome.rtf deleted file mode 100755 index 50c42a5..0000000 --- a/ETL/trunk/config/pkg-support/devel-resources/Welcome.rtf +++ /dev/null @@ -1,6 +0,0 @@ -{\rtf1\mac\ansicpg10000\cocoartf102 -{\fonttbl\f0\fswiss\fcharset77 Helvetica;} -{\colortbl;\red255\green255\blue255;} -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural - -\f0\fs24 \cf0 This is the welcome file.} \ No newline at end of file diff --git a/ETL/trunk/config/pkg-support/devel-resources/install.sh b/ETL/trunk/config/pkg-support/devel-resources/install.sh deleted file mode 100755 index 7cb2058..0000000 --- a/ETL/trunk/config/pkg-support/devel-resources/install.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# finish up the installation -# this script should be executed using the sudo command -# this file is copied to ETL-devel.post_install and ETL-devel.post_upgrade -# inside the .pkg bundle -echo "Running post-install script" -umask 022 -sleep 1 - -RESOURCE_DIR=`dirname $0` - -cd RESOURCE_DIR - -echo "Creating ETL-config script" -sleep 1 -[ -d /usr/local ] || mkdir /usr/local -[ -d /usr/local/bin ] || mkdir /usr/local/bin -[ -d /usr/local/include ] || mkdir /usr/local/include -[ -d /usr/local/lib ] || mkdir /usr/local/lib -[ -d /usr/local/sbin ] || mkdir /usr/local/sbin - -# If we already have a directory called ETL in our include directory, nuke it -[ -d /usr/local/include/ETL ] && rm -fr /usr/local/include/ETL - -ln -s /usr/local/include/ETL /Library/Frameworks/ETL.framework/Headers -sed ' -s:@exec_prefix@:/usr/local:g; -s:@prefix@:/usr/local:g; -s:@bindir@:$exec_prefix/bin:g; -s:@libdir@:$exec_prefix/lib:g; -s:@includedir@:$prefix/include:g; -s:@VERSION@:@_VERSION_@:g; -s:@PACKAGE@:@_PACKAGE_@:g; -s:@LIBS@::g; -' < $RESOURCE_DIR/ETL-config.in > /usr/local/bin/ETL-config -chmod 775 /usr/local/bin/ETL-config - -echo "Done with shell script" -sleep 1 - -exit 0 - - -#echo "Precompiling Headers" -#/usr/bin/cc -precomp ~/Library/Frameworks/SDL.framework/Headers/SDL.h -o ~/Library/Frameworks/SDL.framework/Headers/SDL.p - -# open up the README file -#open ~/"Readme SDL Developer.txt" diff --git a/ETL/trunk/configure.ac b/ETL/trunk/configure.ac deleted file mode 100644 index 63f5e96..0000000 --- a/ETL/trunk/configure.ac +++ /dev/null @@ -1,94 +0,0 @@ -# $Id$ - -# -- I N I T -------------------------------------------------- - -AC_INIT([Extended Template Library],[0.04.12],[http://synfig.org/Bugs],[ETL]) -AC_REVISION - -AC_CONFIG_AUX_DIR(config) -AC_CONFIG_HEADERS([ETL/etl_profile_.h]) -AC_CANONICAL_HOST -AC_CANONICAL_TARGET - -AM_INIT_AUTOMAKE([ no-define ]) -AM_MAINTAINER_MODE - -# -- V A R I A B L E S ---------------------------------------- - -debug="no" - -SVN_REPOSITORY=https://synfig.svn.sourceforge.net/svnroot/synfig/ETL -AC_SUBST(SVN_REPOSITORY) - -# -- A R G U M E N T S ---------------------------------------- - - -# -- P R O G R A M S ------------------------------------------ - -AC_PROG_CC -AC_PROG_CXX -AC_PROG_INSTALL -AC_PROG_RANLIB - -AC_LANG([C++]) - -AC_ARG_WARNINGS -AC_ARG_DEBUG -AC_ARG_OPTIMIZATION -AC_ARG_PROFILING - -AC_WIN32_QUIRKS - -# -- L I B R A R I E S ---------------------------------------- - -# -- H E A D E R S -------------------------------------------- - -AH_TOP([ -// We want to be autoconf/autoheader friendly, so -// if the developer has already included an -// autoheader-generated configuration script, -// we can assume that the user knew what they -// were doing and let them use their own config.h. -//#ifndef PACKAGE_TARNAME -]) - -AH_BOTTOM([ -//#endif // ifndef PACKAGE_TARNAME -]) - - -# -- T Y P E S & S T R U C T S -------------------------------- - -# -- F U N C T I O N S ---------------------------------------- - -ETL_DEPS - -# -- O U T P U T ---------------------------------------------- - -AC_SUBST(CFLAGS) -AC_SUBST(CPPFLAGS) -AC_SUBST(LDFLAGS) - -AC_CONFIG_FILES([ETL-config -Makefile -ETL/Makefile -test/Makefile -ETL.pc -doxygen.cfg -]) -AC_OUTPUT - -# -- S U M M A R Y -------------------------------------------- - -echo " -$PACKAGE_NAME v.$VERSION -Configuration Summary -- - - - - - - -Install Prefix -------------------> $prefix -Target Platform ------------------> $host -Debug Mode -----------------------> $debug - -"'$'"CXX ------------------------------> '$CXX' -"'$'"CXXFLAGS -------------------------> '$CXXFLAGS' -" diff --git a/ETL/trunk/doxygen.cfg.in b/ETL/trunk/doxygen.cfg.in deleted file mode 100644 index 3ac5c4e..0000000 --- a/ETL/trunk/doxygen.cfg.in +++ /dev/null @@ -1,1220 +0,0 @@ -# Doxyfile 1.4.6 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = @PACKAGE@ - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = @VERSION@ - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = doc - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, -# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, -# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, -# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, -# Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = "legal=\if legal" \ - endlegal=\endif \ - "writeme=\todo This needs to be documented" \ - "stub=\todo this is a stub" - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to -# include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = YES - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = NO - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from the -# version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = YES - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = ETL - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py - -FILE_PATTERNS = *.cpp \ - *.h \ - *.cxx \ - *.hxx \ - *.hpp - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = YES - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = YES - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = ETL_NO_DEPRECATED \ - DOXYGEN_SHOULD_SKIP_THIS \ - DOXYGEN_IS_RUNNING - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = gif - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that a graph may be further truncated if the graph's -# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH -# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), -# the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to -# read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/ETL/trunk/m4/ETL.m4 b/ETL/trunk/m4/ETL.m4 deleted file mode 100644 index c2dc7a4..0000000 --- a/ETL/trunk/m4/ETL.m4 +++ /dev/null @@ -1,69 +0,0 @@ -# ETL M4 Macro -# For GNU Autotools -# $Id$ -# -# By Robert B. Quattlebaum Jr. -# - -AC_DEFUN([ETL_DEPS], -[ - AC_CHECK_LIB(user32, main) - AC_CHECK_LIB([kernel32], [CreateMutex]) - AC_CHECK_LIB([pthread], [pthread_mutex_init]) - - AC_HEADER_STDC - - AC_CHECK_HEADERS(pthread.h) - AC_CHECK_HEADERS(sched.h) - AC_CHECK_HEADERS(sys/time.h) - AC_CHECK_HEADERS(unistd.h) - AC_CHECK_HEADERS(windows.h) - AC_CHECK_FUNCS([pthread_create]) - AC_CHECK_FUNCS([pthread_rwlock_init]) - AC_CHECK_FUNCS([sched_yield]) - AC_CHECK_FUNCS([CreateThread]) - AC_CHECK_FUNCS([QueryPerformanceCounter]) - - AC_CHECK_FUNCS([gettimeofday]) - AC_CHECK_FUNCS([sscanf]) - AC_CHECK_FUNCS([vsscanf]) - AC_CHECK_FUNCS([vsprintf]) - AC_CHECK_FUNCS([vasprintf]) - AC_CHECK_FUNCS([vsnprintf],[],[ - AC_CHECK_FUNC([_vsnprintf],[ - AC_DEFINE(vsnprintf,_vsnprintf,[define if the vsnprintf function is mangled]) - AC_DEFINE(HAVE_VSNPRINTF,1) - ]) - ]) -]) - -AC_DEFUN([USING_ETL], -[ - AC_ARG_WITH(ETL-includes, - [ --with-ETL-includes Specify location of ETL headers],[ - CXXFLAGS="$CXXFLAGS -I$withval" - ]) - - AC_PATH_PROG(ETL_CONFIG,ETL-config,no) - - if test "$ETL_CONFIG" = "no"; then - no_ETL_config="yes" - $2 - else - AC_MSG_CHECKING([if $ETL_CONFIG works]) - if $ETL_CONFIG --libs >/dev/null 2>&1; then - ETL_VERSION="`$ETL_CONFIG --version`" - AC_MSG_RESULT([yes, $ETL_VERSION]) - CXXFLAGS="$CXXFLAGS `$ETL_CONFIG --cxxflags`" - $1 - else - AC_MSG_RESULT(no) - no_ETL_config="yes" - $2 - fi - fi - - ETL_DEPS -]) - - diff --git a/ETL/trunk/m4/cxx_macros.m4 b/ETL/trunk/m4/cxx_macros.m4 deleted file mode 100644 index 8fc247a..0000000 --- a/ETL/trunk/m4/cxx_macros.m4 +++ /dev/null @@ -1,88 +0,0 @@ -AC_DEFUN([AC_CXX_FUNCTION_NONTYPE_PARAMETERS], -[AC_CACHE_CHECK(whether the compiler supports function templates with non-type parameters, -ac_cv_cxx_function_nontype_parameters, -[AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([ -template class A {}; -template int f(const A& x) { return 0; } -],[A z; return f(z);], - ac_cv_cxx_function_nontype_parameters=yes, ac_cv_cxx_function_nontype_parameters=no) - AC_LANG_RESTORE -]) -if test "$ac_cv_cxx_function_nontype_parameters" = yes; then - AC_DEFINE(HAVE_FUNCTION_NONTYPE_PARAMETERS,, - [define if the compiler supports function templates with non-type parameters]) -fi -]) - -AC_DEFUN([AC_CXX_NAMESPACES], -[AC_CACHE_CHECK(whether the compiler implements namespaces, -ac_cv_cxx_namespaces, -[AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], - [using namespace Outer::Inner; return i;], - ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no) - AC_LANG_RESTORE -]) -if test "$ac_cv_cxx_namespaces" = yes; then - AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) -fi -]) - -AC_DEFUN([AC_CXX_HAVE_COMPLEX], -[AC_CACHE_CHECK(whether the compiler has complex, -ac_cv_cxx_have_complex, -[AC_REQUIRE([AC_CXX_NAMESPACES]) - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([#include -#ifdef HAVE_NAMESPACES -using namespace std; -#endif],[complex a; complex b; return 0;], - ac_cv_cxx_have_complex=yes, ac_cv_cxx_have_complex=no) - AC_LANG_RESTORE -]) -if test "$ac_cv_cxx_have_complex" = yes; then - AC_DEFINE(HAVE_COMPLEX,,[define if the compiler has complex]) -fi -]) - -AC_DEFUN([AC_CXX_HAVE_SSTREAM], -[AC_CACHE_CHECK(whether the compiler has stringstream, -ac_cv_cxx_have_sstream, -[AC_REQUIRE([AC_CXX_NAMESPACES]) - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([#include -#ifdef HAVE_NAMESPACES -using namespace std; -#endif],[stringstream message; message << "Hello"; return 0;], - ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no) - AC_LANG_RESTORE -]) -if test "$ac_cv_cxx_have_sstream" = yes; then - AC_DEFINE(HAVE_SSTREAM,,[define if the compiler has stringstream]) -fi -]) - -AC_DEFUN([AC_CXX_MUTABLE], -[AC_CACHE_CHECK(whether the compiler supports the mutable keyword, -ac_cv_cxx_mutable, -[AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([ -class A { mutable int i; - public: - int f (int n) const { i = n; return i; } - }; -],[A a; return a.f (1);], - ac_cv_cxx_mutable=yes, ac_cv_cxx_mutable=no) - AC_LANG_RESTORE -]) -if test "$ac_cv_cxx_mutable" = yes; then - AC_DEFINE(HAVE_MUTABLE,,[define if the compiler supports the mutable keyword]) -fi -]) - diff --git a/ETL/trunk/m4/subs.m4 b/ETL/trunk/m4/subs.m4 deleted file mode 100644 index f4dfcf9..0000000 --- a/ETL/trunk/m4/subs.m4 +++ /dev/null @@ -1,244 +0,0 @@ - -## AC_ARG_WARNINGS() -## -## Provide the --enable-warnings configure argument, set to 'minimum' -## by default. -## -AC_DEFUN([AC_ARG_WARNINGS], -[ - AC_ARG_ENABLE([warnings], - [ --enable-warnings=[[none|minimum|maximum|hardcore]] - Control compiler pickyness. [[default=maximum]]], - [gtkmm_enable_warnings="$enableval"], - gtkmm_enable_warnings="maximum") - - AC_MSG_CHECKING([for compiler warning flags to use]) - - gtkmm_warning_flags='' - - case "$gtkmm_enable_warnings" in - none|no) gtkmm_warning_flags='';; - minimum|yes) gtkmm_warning_flags='-Wall -Wno-unused-parameter';; - maximum) gtkmm_warning_flags='-W -Wall';; - hardcore) gtkmm_warning_flags='-W -Wall -Werror';; - esac - - gtkmm_use_flags='' - - if test "x$gtkmm_warning_flags" != "x" - then - echo 'int foo() { return 0; }' > conftest.cc - - for flag in $gtkmm_warning_flags - do - # Test whether the compiler accepts the flag. GCC doesn't bail - # out when given an unsupported flag but prints a warning, so - # check the compiler output instead. - gtkmm_cxx_out="`$CXX $flag -c conftest.cc 2>&1`" - rm -f conftest.$OBJEXT - test "x${gtkmm_cxx_out}" = "x" && \ - gtkmm_use_flags="${gtkmm_use_flags:+$gtkmm_use_flags }$flag" - done - - rm -f conftest.cc - gtkmm_cxx_out='' - fi - - if test "x$gtkmm_use_flags" != "x" - then - for flag in $gtkmm_use_flags - do - case " $CXXFLAGS " in - *" $flag "*) ;; # don't add flags twice - *) CXXFLAGS="${CXXFLAGS:+$CXXFLAGS }$flag";; - esac - done - else - gtkmm_use_flags='none' - fi - - AC_MSG_RESULT([$gtkmm_use_flags]) -]) - - - - -AC_DEFUN([AC_ARG_DEBUG], -[ - AC_MSG_CHECKING([for debug flags]) - - AC_ARG_ENABLE(debug,[ --enable-debug Build in debugging mode],[ - debug=$enableval - ],[ - debug="no" - ]) - debug_flags='' - - case "$debug" in - yes) - debug_flags="-D_DEBUG -g" - ;; - half) - debug_flags="-DNDEBUG -g" - ;; - no|*) - debug_flags="-DNDEBUG" - ;; - esac - - - CXXFLAGS="`echo $CXXFLAGS | sed s:-g::` $debug_flags" - CFLAGS="`echo $CFLAGS | sed s:-g::` $debug_flags" - - AC_MSG_RESULT([$debug_flags]) -]) - - - - -AC_DEFUN([AC_ARG_OPTIMIZATION], -[ - AC_MSG_CHECKING([for optimization flags]) - - AC_ARG_ENABLE(optimization,[ --enable-optimization=[[0,1,2,3,4]] Select optimization level (default=2)],[ - optimization=$enableval - ],[ - optimization="2" - ]) - optimization_flags='' - case "$optimization" in - 0|no) optimization_flags="-O0";; - 1) optimization_flags="-O1";; - 2|yes) optimization_flags="-O2";; - pass1) optimization_flags="-O2 -fprofile-arcs";; - pass2) optimization_flags="-O2 -fbranch-probabilities";; - 3) optimization_flags="-O3";; - *) optimization_flags="-O4";; - esac - CXXFLAGS="`echo $CXXFLAGS | sed 's:-O.::g'` $optimization_flags" - CFLAGS="`echo $CFLAGS | sed 's:-O.::g'` $optimization_flags" - AC_MSG_RESULT([$optimization_flags]) -]) - -AC_DEFUN([AC_ARG_PROFILE_ARCS], -[ - AC_MSG_CHECKING([for arc profiling]) - - AC_ARG_ENABLE(profile-arcs,[ --enable-profile-arcs Enable arc profiling],[ - profile_arcs=$enableval - ],[ - profile_arcs=no - ]) - - if test $profile_arcs = "yes" ; then { - CXXFLAGS="$CXXFLAGS -fprofile-arcs"; - CFLAGS="$CFLAGS -fprofile-arcs"; - } ; fi - - AC_MSG_RESULT([$profile_arcs]) -]) - -AC_DEFUN([AC_ARG_BRANCH_PROBABILITIES], -[ - AC_MSG_CHECKING([for branch-probabilities]) - - AC_ARG_ENABLE(branch-probabilities,[ --enable-branch-probabilities Enable branch-probabilities],[ - branch_probabilities=$enableval - ],[ - branch_probabilities=no - ]) - - if test $branch_probabilities = "yes" ; then { - CXXFLAGS="$CXXFLAGS -fbranch-probabilities"; - CFLAGS="$CFLAGS -fbranch-probabilities"; - } ; fi - - AC_MSG_RESULT([$branch_probabilities]) -]) - -AC_DEFUN([AC_ARG_PROFILING], -[ - AC_MSG_CHECKING([for profiling]) - - AC_ARG_ENABLE(profiling,[ --enable-profiling Enable profiling using gprof],[ - profiling=$enableval - ],[ - profiling=no - ]) - - if test $profiling = "yes" ; then { - CFLAGS="$CFLAGS -pg"; - CXXFLAGS="$CXXFLAGS -pg"; - LDFLAGS="$LDFLAGS -pg"; - LIBS="$LIBS"; - } ; fi - - AC_MSG_RESULT([$profiling]) -]) - -MINGW_FLAGS="-mno-cygwin" - - -AC_DEFUN([AC_WIN32_QUIRKS], -[ - -case "$host" in - *mingw*) - AC_MSG_CHECKING([the flavor of the compiler]) - if ( $CC --version | grep -q mingw ) ; then { - AC_MSG_RESULT([compiler is mingw special]) - LIBTOOL_PATCH_SED=" - s/dir=\"\$absdir\"/dir=\`cygpath -d -m \"\$absdir\"\`/; - s/absdir=\`cd \"\$dir\" && pwd\`/absdir=\`cygpath -d -m \"\$dir\"\`/; - s/# We need an absolute path/dir=\`cygpath -d -m \"\$dir\"\` # We need an absolute path/; - s- /usr/lib- C:/mingw/lib-g; - s-\"/lib -\"C:/mingw/lib -g; - s- /lib/ - -g; - "; - sys_lib_dlsearch_path_spec="C:/mingw/lib" - ac_default_prefix=`cygpath -d -m "$ac_default_prefix"`; - } else { - AC_MSG_RESULT([compiler is cygwin stock, adding -mno-cygwin]) - CPP="$CPP $MINGW_FLAGS" - CC="$CC $MINGW_FLAGS" - CXX="$CXX $MINGW_FLAGS -L/usr/$host/lib -I/usr/include/c++/3.3.3/$host" - CXXCPP="$CXXCPP $MINGW_FLAGS" - - -} ; fi - - LTCC="gcc" - CXXFLAGS="$CXXFLAGS -LC:/GTK/lib" - CFLAGS="$CFLAGS -LC:/GTK/lib" - LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols -Wl,--subsystem=console -Wl,--enable-runtime-pseudo-reloc" -dnl LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--subsystem=console -Wl,--enable-runtime-pseudo-reloc" - ;; - *cygwin*) - LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols" -dnl LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--subsystem=console" - CXXFLAGS="$CXXFLAGS -I/target/include" - CFLAGS="$CFLAGS -I/target/include" - ;; - powerpc-apple*) - echo Adding mac-specific optimization flags. . . - CXXFLAGS="$CXXFLAGS $G5OPTFLAGS" - ;; -esac - - -]) - -AC_DEFUN([AC_LIBTOOL_PATCH], -[ - -if [[ "$LIBTOOL_PATCH_SED""x" != "x" ]] ; then { - printf "Patching libtool... " - cat libtool | sed "$LIBTOOL_PATCH_SED" > libtool2 - rm libtool - mv libtool2 libtool - chmod +x libtool - AC_MSG_RESULT([patched]) -} fi ; - - -]) diff --git a/ETL/trunk/test/Makefile.am b/ETL/trunk/test/Makefile.am deleted file mode 100644 index 2b1b6e9..0000000 --- a/ETL/trunk/test/Makefile.am +++ /dev/null @@ -1,64 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -AM_CXXFLAGS = \ - @CXXFLAGS@ \ - -I$(top_srcdir) \ - -I$(top_builddir)/ETL - -DEFAULT_INCLUDES = \ - -I$(top_srcdir) \ - -I$(top_builddir)/ETL - -TESTS = \ - fixed \ - clock \ - handle \ - angle \ - random \ - hermite \ - stringf \ - pen \ - surface \ - smart_ptr \ - benchmark -# spline \ -# value - -check_PROGRAMS = \ - fixed \ - handle \ - clock \ - angle \ - random \ - hermite \ - stringf \ - pen \ - surface \ - smart_ptr \ - benchmark \ - smach -# spline \ -# value - -benchmark_SOURCES=benchmark.cpp -smart_ptr_SOURCES=smart_ptr.cpp -surface_SOURCES=surface.cpp -pen_SOURCES=pen.cpp -handle_SOURCES=handle.cpp -angle_SOURCES=angle.cpp -random_SOURCES=random.cpp -fixed_SOURCES=fixed.cpp -smach_SOURCES=smach.cpp -clock_SOURCES=clock.cpp -hermite_SOURCES=hermite.cpp -#spline_SOURCES=spline.cpp -stringf_SOURCES=stringf.cpp -#value_SOURCES=value.cpp - -# FIXME: fix compiler errors for the spline and value tests. -EXTRA_DIST = \ - spline.cpp \ - value.cpp diff --git a/ETL/trunk/test/angle.cpp b/ETL/trunk/test/angle.cpp deleted file mode 100644 index a0ecac6..0000000 --- a/ETL/trunk/test/angle.cpp +++ /dev/null @@ -1,528 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library Test Suite -** Angle Class Test -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -ETL_FASTANGLE_INIT(); - -using namespace std; -using namespace etl; - -/* === C L A S S E S ======================================================= */ - -int fastangle_test(void) -{ - int ret=0; - float largest_error; - - { - angle theta; - fastangle theta2; - float error; - largest_error=0.0f; - - for( - theta=angle::degrees(0),theta2=fastangle::degrees(0); - theta<=angle::degrees(360); - theta+=angle::degrees(10),theta2+=fastangle::degrees(10) - ) - { - error=(float)angle::sin(theta).get() -(float)fastangle::sin(theta2).get(); - /* - fprintf(stderr,"angle: sin(%d)=%f ;\tfastangle: sin(%d)=%f ;\t diff: %f\n", - (int)angle::degrees(theta), - (float)angle::sin(theta), - (int)fastangle::degrees(theta2), - (float)fastangle::sin(theta2), - error - ); - */ - if(error > largest_error) - largest_error=error; - if(error < -largest_error) - largest_error=-error; - - } - } - printf("fastangle: Largest SIN error: (+/-)%f\n",largest_error); - if(largest_error>0.075)ret++; - - { - angle theta; - fastangle theta2; - float error; - largest_error=0.0f; - - for( - theta=angle::degrees(0),theta2=fastangle::degrees(0); - theta<=angle::degrees(360); - theta+=angle::degrees(10),theta2+=fastangle::degrees(10) - ) - { - error=(float)angle::cos(theta).get() -(float)fastangle::cos(theta2).get(); - /* - fprintf(stderr,"angle: cos(%d)=%f ;\tfastangle: cos(%d)=%f ;\t diff: %f\n", - (int)angle::degrees(theta), - (float)angle::cos(theta), - (int)fastangle::degrees(theta2), - (float)fastangle::cos(theta2), - error - ); - */ - if(error > largest_error) - largest_error=error; - if(error < -largest_error) - largest_error=-error; - - } - } - printf("fastangle: Largest COS error: (+/-)%f\n",largest_error); - if(largest_error>0.075)ret++; - - { - double val; - float error; - largest_error=0.0f; - - for( - val=-1.0f; - val<1.0f; - val+=0.01 - ) - { - error=angle::radians(angle::sin(val)).get() -fastangle::radians(fastangle::sin(val)).get(); - /* - fprintf(stderr,"angle: asin(%f)=%frad ;\tfastangle: asin(%f)=%frad ;\t diff: %f\n", - val, - (float)(angle::radians)angle::sin(val), - val, - (float)(fastangle::radians)fastangle::sin(val), - error - ); - */ - if(error > largest_error) - largest_error=error; - if(error < -largest_error) - largest_error=-error; - - } - } - printf("fastangle: Largest ASIN error: (+/-)%frad\n",largest_error); - if(largest_error>0.075)ret++; - - - { - double val; - float error; - largest_error=0.0f; - - for( - val=-1.0f; - val<1.0f; - val+=0.01 - ) - { - error=angle::radians(angle::cos(val)).get() -fastangle::radians(fastangle::cos(val)).get(); - /* - fprintf(stderr,"angle: acos(%f)=%frad ;\tfastangle: acos(%f)=%frad ;\t diff: %f\n", - val, - (float)(angle::radians)angle::cos(val), - val, - (float)(fastangle::radians)fastangle::cos(val), - error - ); - */ - if(error > largest_error) - largest_error=error; - if(error < -largest_error) - largest_error=-error; - - } - } - printf("fastangle: Largest ACOS error: (+/-)%frad\n",largest_error); - if(largest_error>0.075)ret++; - - - { - angle theta; - fastangle theta2; - float error; - largest_error=0.0f; - - for( - theta=angle::degrees(0),theta2=fastangle::degrees(0); - theta largest_error) - largest_error=error; - if(error < -largest_error) - largest_error=-error; - - } - } - printf("fastangle: Largest TAN error: (+/-)%f\n",largest_error); - if(largest_error>0.75)ret++; - - { - double val; - float error; - largest_error=0.0f; - - for( - val=-4.0f; - val<4.0f; - val+=0.1 - ) - { - error=angle::radians(angle::tan(val)).get() -fastangle::radians(fastangle::tan(val)).get(); - /* - fprintf(stderr,"angle: atan(%f)=%frad ;\tfastangle: atan(%f)=%frad ;\t diff: %f\n", - val, - (float)(angle::radians)angle::tan(val), - val, - (float)(fastangle::radians)fastangle::tan(val), - error - ); - */ - if(error > largest_error) - largest_error=error; - if(error < -largest_error) - largest_error=-error; - - } - } - printf("fastangle: Largest ATAN error: (+/-)%frad\n",largest_error); - if(largest_error>0.075)ret++; - - - { - angle theta; - float error; - largest_error=0.0f; - - for( - theta=angle::degrees(-179); - theta largest_error) - largest_error=error; - if(error < -largest_error) - largest_error=-error; - - } - } - printf("fastangle: Largest ATAN2 error: (+/-)%frad\n",largest_error); - if(largest_error>0.075)ret++; - - printf("constant tests: %f==%f\n", - (float)angle::degrees(angle::tan(1.01)).get(), - (float)fastangle::degrees(fastangle::tan(1.01)).get()); - printf("constant tests: %f==%f\n", - (float)angle::degrees(angle::tan(-1.0)).get(), - (float)fastangle::degrees(fastangle::tan(-1.0)).get()); - - return ret; -} - -template -void angle_cos_speed_test(void) -{ - Angle a,b,c,d; - float tmp,tmp2; - - for(tmp=-1.0;tmp<1.0;tmp+=0.000002) - { - a=(typename Angle::cos)(tmp); - b=(typename Angle::cos)(tmp); - c=(typename Angle::cos)(tmp); - d=(typename Angle::cos)(tmp); - tmp2=((typename Angle::cos)(a)).get(); - tmp2=((typename Angle::cos)(b)).get(); - tmp2=((typename Angle::cos)(c)).get(); - tmp2=((typename Angle::cos)(d)).get(); - } -} -template -void angle_sin_speed_test(void) -{ - Angle a,b,c,d; - float tmp,tmp2; - - for(tmp=-1.0;tmp<1.0;tmp+=0.000002) - { - a=(typename Angle::sin)(tmp); - b=(typename Angle::sin)(tmp); - c=(typename Angle::sin)(tmp); - d=(typename Angle::sin)(tmp); - tmp2=((typename Angle::sin)(a)).get(); - tmp2=((typename Angle::sin)(b)).get(); - tmp2=((typename Angle::sin)(c)).get(); - tmp2=((typename Angle::sin)(d)).get(); - } -} -template -void angle_tan_speed_test(void) -{ - Angle a,b,c,d; - float tmp,tmp2; - - for(tmp=-1.0;tmp<1.0;tmp+=0.000002) - { - a=(typename Angle::tan)(tmp); - b=(typename Angle::tan)(tmp); - c=(typename Angle::tan)(tmp); - d=(typename Angle::tan)(tmp); - tmp2=((typename Angle::tan)(a)).get(); - tmp2=((typename Angle::tan)(b)).get(); - tmp2=((typename Angle::tan)(c)).get(); - tmp2=((typename Angle::tan)(d)).get(); - } -} -template -void angle_atan2_speed_test(void) -{ - Angle a,b,c; - float x,y; - - for(y=-10.0;y<10.0;y+=0.05) - for(x=-10.0;x<10.0;x+=0.05) - { - a=mytan(y,x); - a=mytan(x,y); - b=mytan(y,x); - b=mytan(x,y); - c=mytan(y,x); - c=mytan(x,y); - a=mytan(y,x); - a=mytan(x,y); - b=mytan(y,x); - b=mytan(x,y); - c=mytan(y,x); - c=mytan(x,y); - } -} - -int fastangle_speed_test(void) -{ - int ret=0; - float - angle_cos_time, - fastangle_cos_time, - angle_tan_time, - fastangle_tan_time, - angle_atan2_time, - fastangle_atan2_time, - angle_sin_time, - fastangle_sin_time ; - - etl::clock MyTimer; - - MyTimer.reset(); - angle_cos_speed_test(); - angle_cos_time=MyTimer(); - printf("angle: Cosine test: %f seconds\n",angle_cos_time); - - MyTimer.reset(); - angle_cos_speed_test(); - fastangle_cos_time=MyTimer(); - printf("fastangle: Cosine test: %f seconds\n",fastangle_cos_time); - printf("fastangle is %.02f%% faster\n",(angle_cos_time/fastangle_cos_time)*100.0-100.0); - - MyTimer.reset(); - angle_sin_speed_test(); - angle_sin_time=MyTimer(); - printf("angle: Sine test: %f seconds\n",angle_sin_time); - - MyTimer.reset(); - angle_sin_speed_test(); - fastangle_sin_time=MyTimer(); - printf("fastangle: Sine test: %f seconds\n",fastangle_sin_time); - printf("fastangle is %.02f%% faster\n",(angle_sin_time/fastangle_sin_time)*100.0-100.0); - - MyTimer.reset(); - angle_tan_speed_test(); - angle_tan_time=MyTimer(); - printf("angle: Tangent test: %f seconds\n",angle_tan_time); - - MyTimer.reset(); - angle_tan_speed_test(); - fastangle_tan_time=MyTimer(); - printf("fastangle: Tangent test: %f seconds\n",fastangle_tan_time); - printf("fastangle is %.02f%% faster\n",(angle_tan_time/fastangle_tan_time)*100.0-100.0); - - MyTimer.reset(); - angle_atan2_speed_test(); - angle_atan2_time=MyTimer(); - printf("angle: arcTangent2 test: %f seconds\n",angle_atan2_time); - - MyTimer.reset(); - angle_atan2_speed_test(); - fastangle_atan2_time=MyTimer(); - printf("fastangle: arcTangent2 test: %f seconds\n",fastangle_atan2_time); - printf("fastangle is %.02f%% faster\n",(angle_atan2_time/fastangle_atan2_time)*100.0-100.0); - - return ret; -} - -int angle_test() -{ - int ret=0; - float dist; - - dist=angle::deg(angle::deg(330).dist(angle::deg(30))).get(); - printf("angle: angular difference between 330deg and 30deg is %0.1fdeg\n",dist); - if(floor(dist+0.5)!=300) - { - printf("angle: error: should be 300deg!\n"); - ret++; - } - - dist=angle::deg(angle::deg(30).dist(angle::deg(330))).get(); - printf("angle: angular difference between 30deg and 330deg is %0.1fdeg\n",dist); - if(floor(dist+0.5)!=-300) - { - printf("angle: error: should be -300deg!\n"); - ret++; - } - - dist=angle::deg(angle::deg(30).dist(angle::deg(-30))).get(); - printf("angle: angular difference between 30deg and -30deg is %0.1fdeg\n",dist); - if(floor(dist+0.5)!=60) - { - printf("angle: error: should be 60deg!\n"); - ret++; - } - - dist=angle::deg(angle::deg(-30).dist(angle::deg(30))).get(); - printf("angle: angular difference between -30deg and 30deg is %0.1fdeg\n",dist); - if(floor(dist+0.5)!=-60) - { - printf("angle: error: should be -60deg!\n"); - ret++; - } - - dist=angle::deg(angle::deg(20).dist(angle::deg(195))).get(); - printf("angle: angular difference between 20deg and 195deg is %0.1fdeg\n",dist); - if(floor(dist+0.5)!=-175) - { - printf("angle: error: should be -175deg!\n"); - ret++; - } - - dist=angle::deg(angle::deg(20).dist(angle::deg(205))).get(); - printf("angle: angular difference between 20deg and 205deg is %0.1fdeg\n",dist); - if(floor(dist+0.5)!=-185) - { - printf("angle: error: should be -185deg!\n"); - ret++; - } - - int i; - - for(i=-1000;i<1000;i++) - { - dist=angle::deg(angle::deg(20+i+360).dist(angle::deg(205+i-360))).get(); - if(floor(dist+0.5)!=535) - { - printf("angle: error: Badness at %d!\n",i); - ret++; - } - - } - - for(i=-1000;i<1000;i++) - { - dist=angle::deg(angle::deg(20+i-360).dist(angle::deg(195+i+360))).get(); - if(floor(dist+0.5)!=-895) - { - printf("angle: error: Badness at %d!\n",i); - ret++; - } - - } - - - - { - float f; - angle a(angle::deg(-2005)); - angle b(angle::deg(200)); - - affine_combo combo; - - hermite hermie(a,b,b.dist(a),b.dist(a)); - - for(f=0;f<1.001;f+=0.1) - { - printf("@%f--affine_combo: %f hermie: %f\n",angle::deg(f).get(),angle::deg(combo(a,b,f)).get(),angle::deg(hermie(f)).get()); - } - - } - - return ret; -} - -/* === E N T R Y P O I N T ================================================= */ - -int main() -{ - int error=0; - - error+=fastangle_test(); - error+=fastangle_speed_test(); - error+=angle_test(); - - return error; -} diff --git a/ETL/trunk/test/benchmark.cpp b/ETL/trunk/test/benchmark.cpp deleted file mode 100644 index e453186..0000000 --- a/ETL/trunk/test/benchmark.cpp +++ /dev/null @@ -1,475 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library Test Suite -** Hermite Curve Test -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -using namespace etl; -//using namespace std; - -#define HERMITE_TEST_ITERATIONS (100000) - -/* === C L A S S E S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -template -void angle_cos_speed_test(void) -{ - Angle a,b,c,d; - float tmp,tmp2; - - for(tmp=-1;tmp<1;tmp+=0.000002f) - { - a=(typename Angle::cos)(tmp); - b=(typename Angle::cos)(tmp); - c=(typename Angle::cos)(tmp); - d=(typename Angle::cos)(tmp); - tmp2=((typename Angle::cos)(a)).get(); - tmp2=((typename Angle::cos)(b)).get(); - tmp2=((typename Angle::cos)(c)).get(); - tmp2=((typename Angle::cos)(d)).get(); - } -} -template -void angle_sin_speed_test(void) -{ - Angle a,b,c,d; - float tmp,tmp2; - - for(tmp=-1.0;tmp<1.0;tmp+=0.000002f) - { - a=(typename Angle::sin)(tmp); - b=(typename Angle::sin)(tmp); - c=(typename Angle::sin)(tmp); - d=(typename Angle::sin)(tmp); - tmp2=((typename Angle::sin)(a)).get(); - tmp2=((typename Angle::sin)(b)).get(); - tmp2=((typename Angle::sin)(c)).get(); - tmp2=((typename Angle::sin)(d)).get(); - } -} -template -void angle_tan_speed_test(void) -{ - Angle a,b,c,d; - float tmp,tmp2; - - for(tmp=-1;tmp<1;tmp+=0.000002f) - { - a=(typename Angle::tan)(tmp); - b=(typename Angle::tan)(tmp); - c=(typename Angle::tan)(tmp); - d=(typename Angle::tan)(tmp); - tmp2=((typename Angle::tan)(a)).get(); - tmp2=((typename Angle::tan)(b)).get(); - tmp2=((typename Angle::tan)(c)).get(); - tmp2=((typename Angle::tan)(d)).get(); - } -} -template -void angle_atan2_speed_test(void) -{ - Angle a,b,c; - float x,y; - - for(y=-10;y<10;y+=0.05f) - for(x=-10;x<10;x+=0.05f) - { - a=mytan(y,x); - a=mytan(x,y); - b=mytan(y,x); - b=mytan(x,y); - c=mytan(y,x); - c=mytan(x,y); - a=mytan(y,x); - a=mytan(x,y); - b=mytan(y,x); - b=mytan(x,y); - c=mytan(y,x); - c=mytan(x,y); - } -} - -int fastangle_speed_test(void) -{ - int ret=0; - float - angle_cos_time, - fastangle_cos_time, - angle_tan_time, - fastangle_tan_time, - angle_atan2_time, - fastangle_atan2_time, - angle_sin_time, - fastangle_sin_time ; - - etl::clock MyTimer; - - MyTimer.reset(); - angle_cos_speed_test(); - angle_cos_time=MyTimer(); - printf("angle: Cosine test: %f seconds\n",angle_cos_time); - - MyTimer.reset(); - angle_cos_speed_test(); - fastangle_cos_time=MyTimer(); - printf("fastangle: Cosine test: %f seconds\n",fastangle_cos_time); - printf("fastangle is %.02f%% faster\n",(angle_cos_time/fastangle_cos_time)*100.0-100.0); - - MyTimer.reset(); - angle_sin_speed_test(); - angle_sin_time=MyTimer(); - printf("angle: Sine test: %f seconds\n",angle_sin_time); - - MyTimer.reset(); - angle_sin_speed_test(); - fastangle_sin_time=MyTimer(); - printf("fastangle: Sine test: %f seconds\n",fastangle_sin_time); - printf("fastangle is %.02f%% faster\n",(angle_sin_time/fastangle_sin_time)*100.0-100.0); - - MyTimer.reset(); - angle_tan_speed_test(); - angle_tan_time=MyTimer(); - printf("angle: Tangent test: %f seconds\n",angle_tan_time); - - MyTimer.reset(); - angle_tan_speed_test(); - fastangle_tan_time=MyTimer(); - printf("fastangle: Tangent test: %f seconds\n",fastangle_tan_time); - printf("fastangle is %.02f%% faster\n",(angle_tan_time/fastangle_tan_time)*100.0-100.0); - - MyTimer.reset(); - angle_atan2_speed_test(); - angle_atan2_time=MyTimer(); - printf("angle: arcTangent2 test: %f seconds\n",angle_atan2_time); - - MyTimer.reset(); - angle_atan2_speed_test(); - fastangle_atan2_time=MyTimer(); - printf("fastangle: arcTangent2 test: %f seconds\n",fastangle_atan2_time); - printf("fastangle is %.02f%% faster\n",(angle_atan2_time/fastangle_atan2_time)*100.0-100.0); - - return ret; -} - -int surface_and_gaussian_blur_test() -{ - int ret=0; - etl::clock MyTimer; - float endtime; - - { - surface my_surface(1000,1000); - - MyTimer.reset(); - gaussian_blur(my_surface.begin(),my_surface.end(),30,30); - endtime=MyTimer(); - printf("surface_and_gaussian_blur_test: %f seconds\n",endtime); - } - - { - surface my_surface(1000,1000); - - MyTimer.reset(); - gaussian_blur(my_surface.begin(),my_surface.end(),30,30); - endtime=MyTimer(); - printf("surface_and_gaussian_blur_test: %f seconds\n",endtime); - } - - { - surface my_surface(1000,1000); - - MyTimer.reset(); - gaussian_blur(my_surface.begin(),my_surface.end(),30,30); - endtime=MyTimer(); - printf("surface_and_gaussian_blur_test: %f seconds\n",endtime); - } - - return ret; -} - -int hermite_int_test() -{ - int ret=0; - hermite Hermie; - hermite::time_type f; - int i; - - etl::clock timer; - etl::clock::value_type t; - - Hermie.p1()=0; - Hermie.t1()=40000; - Hermie.p2()=0; - Hermie.t2()=40000; - - Hermie.sync(); - - {float t; - for(f=0.0f,i=0,timer.reset();i:time=%f milliseconds\n",t*1000); - return ret; -} - -int hermite_float_test(void) -{ - int ret=0; - float f; int i; - - hermite Hermie; - etl::clock timer; - double t; - - Hermie.p1()=0; - Hermie.t1()=1; - Hermie.p2()=0; - Hermie.t2()=1; - - Hermie.sync(); - - {float t; - for(f=0.0f,i=0,timer.reset();i:time=%f milliseconds\n",t*1000); - return ret; -} - -int hermite_double_test(void) -{ - int ret=0,i; - float f; - - hermite Hermie; - etl::clock timer; - double t; - - Hermie.p1()=0; - Hermie.t1()=1; - Hermie.p2()=0; - Hermie.t2()=1; - - Hermie.sync(); - - for(f=0.0f,i=0,timer.reset();i:time=%f milliseconds\n",t*1000); - return ret; -} - -int hermite_fixed_test(void) -{ - int ret=0; - int i; - hermite Hermie; - hermite::time_type f; - hermite::time_type inc(0.0005f), inc2(1.10); - fixed sum(0); - - etl::clock timer; - double t; - - Hermie.p1()=0; - Hermie.t1()=1; - Hermie.p2()=0; - Hermie.t2()=1; - - Hermie.sync(); - - {fixed t; - for(i=0,f=0,timer.reset();i:time=%f milliseconds\n",t*1000); - return ret; -} - -int hermite_angle_test(void) -{ - int ret=0,i; - float f; - - hermite Hermie; - etl::clock timer; - angle tmp; - double t; - - Hermie.p1()=angle::degrees(0); - Hermie.t1()=angle::degrees(45); - - Hermie.p2()=angle::degrees(-45); - Hermie.t2()=angle::degrees(180); - - Hermie.sync(); - - for(f=0.0f,i=0,timer.reset();i:time=%f milliseconds\n",t*1000); - - return ret; -} - -int hermite_fastangle_test(void) -{ - int ret=0,i; - hermite Hermie; - hermite::time_type f; - - etl::clock timer; - fastangle tmp; - double t; - - Hermie.p1()=fastangle::degrees(0); - Hermie.t1()=fastangle::degrees(45); - - Hermie.p2()=fastangle::degrees(-45); - Hermie.t2()=fastangle::degrees(180); - - Hermie.sync(); - - for(f=0.0f,i=0,timer.reset();i:time=%f milliseconds\n",t*1000); - - return ret; -} - -/* === E N T R Y P O I N T ================================================= */ - -int main() -{ - int error=0; - - error+=fastangle_speed_test(); - error+=surface_and_gaussian_blur_test(); - error+=hermite_float_test(); - error+=hermite_double_test(); - error+=hermite_int_test(); - error+=hermite_fixed_test(); - error+=hermite_angle_test(); - error+=hermite_fastangle_test(); - - return error; -} diff --git a/ETL/trunk/test/clock.cpp b/ETL/trunk/test/clock.cpp deleted file mode 100644 index 652644b..0000000 --- a/ETL/trunk/test/clock.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library Test Suite -** Clock Test -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#include -#include - -/* === M A C R O S ========================================================= */ - -using namespace etl; - -/* === C L A S S E S ======================================================= */ - - -/* === P R O C E D U R E S ================================================= */ - -int basic_test(void) -{ - int ret=0; - fprintf(stderr,"default etl::clock precision: %0.8f\n",etl::clock::precision()); - fprintf(stderr,"realtime etl::clock precision: %0.8f\n",etl::clock_realtime::precision()); - fprintf(stderr,"proctime etl::clock precision: %0.8f\n",etl::clock_proctime::precision()); - - etl::clock_realtime timer; - etl::clock::value_type amount,total; - - for(amount=3.0;amount>=0.00015;amount/=2.0) - { - if(amount*1000000.0<1000.0f) - fprintf(stderr,"waiting %f microseconds...\n",amount*1000000.0); - else if(amount*1000.0<400.0f) - fprintf(stderr,"waiting %f milliseconds...\n",amount*1000.0); - else - fprintf(stderr,"waiting %f seconds...\n",amount); - - timer.reset(); - etl::clock::sleep(amount); - total=timer(); - if((total-amount)*1000000.0<1000.0f) - fprintf(stderr," ** I waited %f seconds, error of %f microseconds\n",total,(total-amount)*1000000); - else if((total-amount)*1000.0<400.0f) - fprintf(stderr," ** I waited %f seconds, error of %f milliseconds\n",total,(total-amount)*1000); - else - fprintf(stderr," ** I waited %f seconds, error of %f seconds\n",total,total-amount); - - } - return ret; -} - -/* === E N T R Y P O I N T ================================================= */ - -int main() -{ - int error=0; - - error+=basic_test(); - - return error; -} - diff --git a/ETL/trunk/test/fixed.cpp b/ETL/trunk/test/fixed.cpp deleted file mode 100644 index 965a8d3..0000000 --- a/ETL/trunk/test/fixed.cpp +++ /dev/null @@ -1,294 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library Test Suite -** Fixed-Point Math Test -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define ETL_FIXED_BITS 12 - -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -#ifndef PI -# define PI (3.1415926535897932384626433832795029L) -#endif - -#define ADD_SUB_TEST 20000000 -#define MUL_TEST 10000000 -#define DIV_TEST 1048573 // at 1048573, fixed point numbers wrap around to zero -using namespace etl; - -/* === C L A S S E S ======================================================= */ - -template -struct speed_test -{ - double add_sub_test(void) - { - value_type a=1; - value_type b=2; - value_type c=3; - int i; - etl::clock MyTimer; - MyTimer.reset(); - for(i=0;i(1.5)); - int i; - etl::clock MyTimer; - MyTimer.reset(); - for(i=1;i0.0005) - { - fprintf(stderr,"fixed: Failed test on line %d in "__FILE__".\n",__LINE__); - ret++; - } - - a=1043;d=1043; - a/=27;d/=27; - a+=10.42;d+=10.42; - a/=6;d/=6; - a*=PI;d*=PI; - d-=(double)a; - fprintf(stderr,"fixed: ( 1043 / 27 + 10.42 ) / 6 * PI --- Difference: %f\n",d); - if(d<0.0)d=-d; -#ifdef ROUND_TO_NEAREST_INTEGER - if( d>0.0005) -#else - if( d>0.0025) -#endif - { - fprintf(stderr,"fixed: Failed test on line %d in "__FILE__".\n",__LINE__); - ret++; - } - - return ret; -} - -int char_test(void) -{ - int ret=0; - - fixed_base fix; - double flt; - - if(sizeof(fix)!=sizeof(unsigned char)) - { - ret++; - fprintf(stderr,"fixed: Size of fixed_base is wrong!\n"); - } - - flt=1.0; - fix=1.0; - fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt); - - flt*=0.7; - fix*=0.7; - fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt); - - flt*=0.7; - fix*=0.7; - fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt); - - flt*=0.7; - fix*=0.7; - fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt); - - flt*=0.7; - fix*=0.7; - fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt); - - flt*=0.7; - fix*=0.7; - fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt); - - //flt/=0.7; - //fix/=0.7; - //fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt); - - flt+=0.3; - fix+=0.3; - fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt); - - flt*=2; - fix*=2; - fprintf(stderr,"fixed: value=%f, data=%d, shouldbe=%f, error=%f\n",(float)fix,fix.data(),flt,(float)fix-flt); - - - return ret; -} - -/* === E N T R Y P O I N T ================================================= */ - -int main() -{ - int error=0; - - error+=basic_test(); - error+=char_test(); - - speed_test float_test; - speed_test int_test; - speed_test fixed_test; - - { - double flt,fix,inte; - fprintf(stderr,"\nAddition/subtraction test...\n"); - - fprintf(stderr," calculating float....."); - flt=float_test.add_sub_test(); - fprintf(stderr," float time: %f sec\n",flt); - - fprintf(stderr," calculating fixed....."); - fix=fixed_test.add_sub_test(); - fprintf(stderr," fixed time: %f sec\n",fix); - - fprintf(stderr," calculating integer..."); - inte=int_test.add_sub_test(); - fprintf(stderr," integer time: %f sec\n",inte); - - if(flt>fix) - fprintf(stderr,"Fixed point wins by %f seconds! (%f%% faster)\n",flt-fix,flt/fix*100.0f-100.0f); - else - fprintf(stderr,"Floating point wins by %f seconds! (%f%% faster)\n",fix-flt,fix/flt*100.0f-100.0f); - - } - - { - double flt,fix,inte; - fprintf(stderr,"\nProduct test...\n"); - fprintf(stderr," calculating float....."); - flt=float_test.mul_test(); - fprintf(stderr," float time: %f sec\n",flt); - fprintf(stderr," calculating fixed....."); - fix=fixed_test.mul_test(); - fprintf(stderr," fixed time: %f sec\n",fix); - fprintf(stderr," calculating integer..."); - inte=int_test.mul_test(); - fprintf(stderr," integer time: %f sec\n",inte); - if(flt>fix) - fprintf(stderr,"Fixed point wins by %f seconds! (%f%% faster)\n",flt-fix,flt/fix*100.0f-100.0f); - else - fprintf(stderr,"Floating point wins by %f seconds! (%f%% faster)\n",fix-flt,fix/flt*100.0f-100.0f); - } - - { - double flt,fix,inte; - fprintf(stderr,"\nDivision test...\n"); - fprintf(stderr," calculating float....."); - flt=float_test.div_test(); - fprintf(stderr," float time: %f sec\n",flt); - fprintf(stderr," calculating fixed....."); - fix=fixed_test.div_test(); - fprintf(stderr," fixed time: %f sec\n",fix); - fprintf(stderr," calculating integer..."); - inte=int_test.div_test(); - fprintf(stderr," integer time: %f sec\n",inte); - if(flt>fix) - fprintf(stderr,"Fixed point wins by %f seconds! (%f%% faster)\n",flt-fix,flt/fix*100.0f-100.0f); - else - fprintf(stderr,"Floating point wins by %f seconds! (%f%% faster)\n",fix-flt,fix/flt*100.0f-100.0f); - fprintf(stderr,"\n"); - } - - return error; -} diff --git a/ETL/trunk/test/handle.cpp b/ETL/trunk/test/handle.cpp deleted file mode 100644 index 7d2ca11..0000000 --- a/ETL/trunk/test/handle.cpp +++ /dev/null @@ -1,504 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library Test Suite -** Handle Template Class Test -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -#define NUMBER_OF_OBJECTS 40000 -using namespace std; - -/* === C L A S S E S ======================================================= */ - -struct my_test_obj : public etl::rshared_object -{ - static int instance_count; - int my_id; - my_test_obj(int my_id=0):my_id(my_id) - { - instance_count++; - } - - virtual ~my_test_obj() - { - if(instance_count==0) - printf("Error, instance count is going past zero!\n"); - instance_count--; - } - - bool operator<(const my_test_obj &rhs)const - { - return my_id obj_handle; -typedef etl::rhandle robj_handle; -typedef etl::handle other_obj_handle; -typedef list< obj_handle > obj_list; -typedef list< other_obj_handle > other_obj_list; -typedef list< robj_handle > robj_list; - -int handle_basic_test() -{ - printf("handle: Size of a handle: %u\n",(unsigned int)sizeof(etl::handle)); - printf("handle: Size of a loose_handle: %u\n",(unsigned int)sizeof(etl::loose_handle)); - printf("handle: Size of a rhandle: %u\n",(unsigned int)sizeof(etl::rhandle)); - printf("handle: Size of a shared_object: %u\n",(unsigned int)sizeof(etl::shared_object)); - printf("handle: Size of a rshared_object: %u\n",(unsigned int)sizeof(etl::rshared_object)); - - printf("handle: Basic test: "); - my_test_obj::instance_count=0; - - { - etl::handle obj_handle(new my_test_obj(rand())); - } - - if(my_test_obj::instance_count!=0) - { - printf("FAILED!\n"); - printf(__FILE__":%d: on create/destroy, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count); - return 1; - } - - { - map > my_map; - etl::handle obj_handle(new my_test_obj(rand())); - my_map["bleh"]=obj_handle; - } - - if(my_test_obj::instance_count!=0) - { - printf("FAILED!\n"); - printf(__FILE__":%d: on create/destroy, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count); - return 1; - } - - etl::handle obj_handle(new my_test_obj(rand())); - - if(obj_handle != obj_handle.constant()) - { - printf("FAILED!\n"); - printf(__FILE__":%d: on call to handle<>::constant().\n",__LINE__); - return 1; - } - - printf("PASSED\n"); - - return 0; -} - -int handle_general_use_test(void) -{ - printf("handle: General-use test: "); - my_test_obj::instance_count=0; - - obj_list my_list, my_other_list; - int i; - - for(i=0;imy_id != 42 || b->my_id != 27) - { - printf("FAILED!\n"); - printf(__FILE__":%d: On swap (27,42) gave (%d,%d), should be (42,27).\n",__LINE__,a->my_id,b->my_id); - return 1; - } - } - - my_other_list.clear(); - if(my_test_obj::instance_count) - { - printf("FAILED!\n"); - printf(__FILE__":%d: On clear, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count); - return 1; - } - - printf("PASSED\n"); - - return 0; -} - - struct ListItem - { - robj_handle obj; - int bleh; - int blah; - ListItem(robj_handle obj,int bleh=1, int blah=2): - obj(obj),bleh(bleh),blah(blah) { } - }; - -int rhandle_general_use_test(void) -{ - - - printf("rhandle: General-use test: "); - my_test_obj::instance_count=0; - - robj_list my_list; - int i; - - robj_handle obj= new my_test_obj(rand()); - for(i=0;i my_item_list; - for(i=0;i=2); - my_item_list.erase(my_item_list.begin()+src); - assert(tmp.obj.rcount()>=1); - my_item_list.insert(my_item_list.begin()+dest,tmp); - assert(tmp.obj.rcount()>=2); - } - - my_item_list.clear(); - - if(my_test_obj::instance_count) - { - printf("FAILED!\n"); - printf(__FILE__":%d: On clear, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count); - return 1; - } - - printf("PASSED\n"); - - return 0; -} - -int handle_inheritance_test(void) -{ - printf("handle: Inheritance test: "); - my_test_obj::instance_count=0; - my_other_test_obj::instance_count=0; - - other_obj_list my_other_list; - int i; - - for(i=0;i handle) -{ - if(handle) { int i=handle.count(); i++; } -} - -int loose_handle_test(void) -{ - printf("handle: loose_handle test: "); - my_test_obj::instance_count=0; - - etl::loose_handle obj_handle_loose; - etl::handle obj_handle2; - - { - etl::handle obj_handle(new my_test_obj(rand())); - if(my_test_obj::instance_count!=1) - { - printf("FAILED!\n"); - printf(__FILE__":%d: on handle assignment from new object, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count); - return 1; - } - - obj_handle_loose=obj_handle; - if(obj_handle!=obj_handle_loose) - { - printf("FAILED!\n"); - printf(__FILE__":%d: on loose_handle assignment\n",__LINE__); - return 1; - } - - obj_handle2=obj_handle_loose; - if(my_test_obj::instance_count!=1) - { - printf("FAILED!\n"); - printf(__FILE__":%d: on handle assignment from loose_handle, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count); - return 1; - } - - test_func(obj_handle_loose); - if(my_test_obj::instance_count!=1) - { - printf("FAILED!\n"); - printf(__FILE__":%d: on handle assignment from loose_handle, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count); - return 1; - } - } - - { - etl::loose_handle a(new my_test_obj(27)), b(new my_test_obj(42)); - a.swap(b); - if (a->my_id != 42 || b->my_id != 27) - { - printf("FAILED!\n"); - printf(__FILE__":%d: on loose_handle swap (27,42) gave (%d,%d), should be (42,27).\n",__LINE__,a->my_id,b->my_id); - return 1; - } - } - - if(my_test_obj::instance_count!=3) - { - printf("FAILED!\n"); - printf(__FILE__":%d: on create/destroy, instance count=%d, should be 3.\n",__LINE__,my_test_obj::instance_count); - return 1; - } - - printf("PASSED\n"); - return 0; -} - -int handle_cast_test() -{ - printf("handle: casting test: "); - - etl::handle obj; - etl::handle other_obj; - etl::loose_handle loose_obj; - - other_obj.spawn(); - loose_obj=other_obj; - - obj=etl::handle::cast_dynamic(loose_obj); - - if(obj!=other_obj) - { - printf("FAILED!\n"); - printf(__FILE__":%d: on handle assignment from loose_handle.\n",__LINE__); - return 1; - } - - printf("PASSED\n"); - return 0; -} - -/* === E N T R Y P O I N T ================================================= */ - -int main() -{ - int error=0; - - error+=handle_basic_test(); - error+=handle_cast_test(); - error+=handle_general_use_test(); - error+=handle_inheritance_test(); - error+=loose_handle_test(); - error+=rhandle_general_use_test(); - - return error; -} diff --git a/ETL/trunk/test/hermite.cpp b/ETL/trunk/test/hermite.cpp deleted file mode 100644 index 25a6278..0000000 --- a/ETL/trunk/test/hermite.cpp +++ /dev/null @@ -1,248 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library Test Suite -** Hermite Curve Test -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -using namespace etl; - -/* === C L A S S E S ======================================================= */ - - -/* === P R O C E D U R E S ================================================= */ - -int basic_test(void) -{ - int ret=0; - float f; - - hermite Hermie; - etl::clock timer; - double t; - - Hermie.p1()=0; - Hermie.t1()=1; - Hermie.p2()=0; - Hermie.t2()=1; - - Hermie.sync(); - - integral > inte(Hermie); - - - fprintf(stderr,"integral of curve() on [0,1] = %f\n",inte(0,1.0)); - fprintf(stderr,"integral of curve() on [-1,3] = %f\n",inte(-1.0,3.0)); - Hermie.set_rs(-1.0,7.0); - inte=integral >(Hermie); - fprintf(stderr,"integral of curve()[%f,%f] on [-1,7] = %f\n",Hermie.get_r(),Hermie.get_s(),inte(-1.0,7.0)); - fprintf(stderr,"integral of curve()[%f,%f] on [0,1] = %f\n",Hermie.get_r(),Hermie.get_s(),inte(0,1.0)); - Hermie.set_rs(0.0,1.0); - - - for(f=0.0f,timer.reset();f<1.001f;f+=0.000005f) - { - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - } - t=timer(); - - fprintf(stderr,"time=%f milliseconds\n",t*1000); - return ret; -} - -int angle_test(void) -{ - int ret=0; - float f; - - hermite Hermie; - etl::clock timer; - angle tmp; - double t; - - Hermie.p1()=angle::degrees(0); - Hermie.t1()=angle::degrees(45); - - Hermie.p2()=angle::degrees(-45); - Hermie.t2()=angle::degrees(180); - - Hermie.sync(); - - - for(f=0.0f,timer.reset();f<1.001f;f+=0.000005f) - { - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - } - t=timer(); - - fprintf(stderr,"angle time=%f milliseconds\n",t*1000); - - return ret; -} - -int fixed_test(void) -{ - int ret=0; - float f; - - hermite Hermie; - etl::clock timer; - double t; - - Hermie.p1()=0; - Hermie.t1()=1; - Hermie.p2()=0; - Hermie.t2()=1; - - Hermie.sync(); - - - - for(f=0.0f,timer.reset();f<1.001f;f+=0.005f) - { - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - t+=Hermie(f)+Hermie(f+0.1f); - } - t=timer(); - - fprintf(stderr,"time=%f milliseconds\n",t*1000); - return ret; -} - - -int anglefixed_test(void) -{ - int ret=0; - float f; - - hermite Hermie; - etl::clock timer; - angle tmp; - double t; - - Hermie.p1()=angle::degrees(0); - Hermie.t1()=angle::degrees(45); - - Hermie.p2()=angle::degrees(-45); - Hermie.t2()=angle::degrees(180); - - Hermie.sync(); - - - for(f=0.0f,timer.reset();f<1.001f;f+=0.0005f) - { - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - tmp+=Hermie(f)+Hermie(f+0.1f); - } - t=timer(); - - fprintf(stderr,"angle fixed time=%f milliseconds\n",t*1000); - - return ret; -} - -int float_intersection_test() -{ - int ret=0; - - hermite curve1(0,1,0,1); - hermite curve2(-1,2,-1,-2); - double t1,t2; - float d; - - t1=curve1.intersect(curve2); - t2=curve2.intersect(curve1); - - d=curve1(t1)-curve2(t2); - - fprintf(stderr,"float:Intersection difference: %f (t1=%f, t2=%f)\n",d,t1,t2); - - if(d>0.01) - { - fprintf(stderr,"float:FAILED INTERSECTION TEST.\n"); - ret++; - } - - return ret; -} - -/* === E N T R Y P O I N T ================================================= */ - -int main() -{ - int error=0; - - error+=basic_test(); - error+=angle_test(); - error+=fixed_test(); - error+=float_intersection_test(); - return error; -} diff --git a/ETL/trunk/test/pen.cpp b/ETL/trunk/test/pen.cpp deleted file mode 100644 index ef6eaee..0000000 --- a/ETL/trunk/test/pen.cpp +++ /dev/null @@ -1,548 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library Test Suite -** Handle Template Class Test -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -//#include -#include - -/* === M A C R O S ========================================================= */ - -using namespace std; -using namespace etl; - -/* === C L A S S E S ======================================================= */ - -int generic_pen_test(int w, int h) -{ - printf("generic_pen(w:%d,h:%d): ",w,h); - - auto_ptr data(new float[w*h]); - if(!data.get()) - { - printf("Um..... malloc failure on line %d of "__FILE__"...\n",__LINE__); - abort(); - } - - generic_pen pen(data.get(),w,h); - generic_pen pen2; - - if(!pen) - { - printf("FAILURE! "__FILE__"@%d: On pen bool test\n",__LINE__); - return 1; - } - - if(&pen.x()[2]!=&pen[0][2]) - { - printf("FAILURE! "__FILE__"@%d: On request for horizontal iterator\n",__LINE__); - return 1; - } - - if(&pen.y()[2]!=&pen[2][0]) - { - printf("FAILURE! "__FILE__"@%d: On request for vertical iterator\n",__LINE__); - return 1; - } - - pen.move(1,1); - pen2=pen; - - if(pen!=pen2) - { - printf("FAILURE! "__FILE__"@%d: On pen assignment or pen comparison\n",__LINE__); - return 1; - } - - pen2.move(w,h); - generic_pen::difference_type diff(pen2-pen); - - if(diff.x!=w || diff.y!=h) - { - printf("FAILURE! "__FILE__"@%d: pen difference inconsistency ([%d,%d]!=[%d,%d])\n",__LINE__,diff.x,diff.y,w,h); - return 1; - } - - if(pen.end_x()-pen.x()!=w-1) - { - printf("FAILURE! "__FILE__"@%d: iterator_x inconsistency (%ld!=%d)\n",__LINE__,pen.end_x()-pen.x(),w); - return 1; - } - - if(pen.end_y()-pen.y()!=h-1) - { - printf("FAILURE! "__FILE__"@%d: iterator_y inconsistency (%d!=%d)\n",__LINE__,pen.end_y()-pen.y(),h); - return 1; - } - - if(&pen.end_y()[-1]!=&pen.y()[(h-2)]) - { - printf("FAILURE! "__FILE__"@%d: iterator_y inconsistency\n",__LINE__); - return 1; - } - - if(&pen.end_x()[-1]!=&pen.x()[(w-2)]) - { - printf("FAILURE! "__FILE__"@%d: iterator_x inconsistency\n",__LINE__); - return 1; - } - - printf("PASSED\n"); - - return 0; -} - -int alpha_pen_test(void) -{ - printf("alpha_pen: "); - printf("SKIPPED\n"); - - return 0; -} - -int bbox_pen_test(void) -{ - printf("bbox_pen: "); - - - - printf("SKIPPED\n"); - - return 0; -} - -int display_pen(generic_pen pen, int w, int h) -{ - int ret=0; - int x, y; - // print out the after pic - for(y=0;y=2.0f) - printf("#"); - else if(pen.get_value()>=1.0f) - printf("@"); - else if(pen.get_value()>=0.8f) - printf("%%"); - else if(pen.get_value()>=0.6f) - printf("O"); - else if(pen.get_value()>=0.4f) - printf(":"); - else if(pen.get_value()>=0.2f) - printf("."); - else if(pen.get_value()>=-0.0001f) - printf(" "); - else - printf("X"),ret++; - } - pen.dec_x(x); - printf("|\n"); - } - pen.dec_y(y); - return ret; -} - -int display_pen(generic_pen pen, int w, int h) -{ - int ret=0; - int x, y; - // print out the after pic - for(y=0;y=2.0f) - printf("#"); - else if(pen.get_value()>=1.0f) - printf("@"); - else if(pen.get_value()>=0.8f) - printf("%%"); - else if(pen.get_value()>=0.6f) - printf("O"); - else if(pen.get_value()>=0.4f) - printf(":"); - else if(pen.get_value()>=0.2f) - printf("."); - else if(pen.get_value()>=-0.0001f) - printf(" "); - else - printf("X"),ret++; - } - pen.dec_x(x); - printf("|\n"); - } - pen.dec_y(y); - return ret; -} - -void emptyfunction(int v) -{ - static int stupid = 0; - stupid = v; - //printf("Called... %d\n",v); -} - -int box_blur_test(void) -{ - typedef float boxblur_float; - - printf("box_blur: "); - - int w=25,h=25; - - auto_ptr data(new boxblur_float[w*h]); - auto_ptr data2(new boxblur_float[w*h]); - if(!data.get()) - { - printf("Um..... malloc failure on line %d of "__FILE__"...\n",__LINE__); - abort(); - } - - generic_pen pen(data.get(),w,h); - generic_pen pen2; - - generic_pen pen3(data2.get(),w,h); - int x,y; - - for(y=0;y= h) iy = h-1; - - for(int ox=-2; ox <= 2; ++ox) - { - int ix = x+ox; - if(ix < 0) ix = 0; - if(ix >= w) ix = w-1; - - if( (ix-iy<=1 && iy-ix<=1) || iy==h/2 || ix==w/2) - f += 2; - } - } - - //print out if the relative error is high - /*f /= 25; - float rf = pen.get_value() - f/25; - if(f && rf > 0.3) - { - printf("pixel (%d,%d) off by %f\n",x,y,rf); - }*/ - boxblur_float diff = fabs(pen.get_value() - f/25); - if(diff > max) max = diff; - pen.put_value(f/25); //if length = 2 then dim = 5.. area = 25 - } - pen.dec_x(x); - } - pen.dec_y(y); - - /*if(max) - { - for(y=0;y data(new float[w*h]); - if(!data.get()) - { - printf("Um..... malloc failure on line %d of "__FILE__"...\n",__LINE__); - abort(); - } - - generic_pen pen(data.get(),w,h); - generic_pen pen2; - int x,y; - - for(y=0;y=2.0f) - printf("#"); - else if(pen.get_value()>=1.0f) - printf("@"); - else if(pen.get_value()>=0.8f) - printf("%%"); - else if(pen.get_value()>=0.6f) - printf("O"); - else if(pen.get_value()>=0.4f) - printf(":"); - else if(pen.get_value()>=0.2f) - printf("."); - else if(pen.get_value()>=0.0f) - printf(" "); - else - printf("X"),bad_values++; - } - pen.dec_x(x); - printf("|\n"); - } - pen.dec_y(y); - - // Pen 2 will be the end - pen2=pen; - pen2.move(w,h); - -#if 0 - gaussian_blur_5x5(pen,pen2); - gaussian_blur_5x5(pen,pen2); - gaussian_blur_5x5(pen,pen2); -#endif - -#if 0 - gaussian_blur_3x3(pen,pen2); - gaussian_blur_3x3(pen,pen2); - gaussian_blur_3x3(pen,pen2); - gaussian_blur_3x3(pen,pen2); - gaussian_blur_3x3(pen,pen2); -#endif - -// gaussian_blur(pen,pen2,15); - gaussian_blur(pen,pen2,10,10); - - printf("\nAFTER GAUSSIAN BLUR:\n"); - - // print out the after pic - for(y=0;y=2.0f) - printf("#"); - else if(pen.get_value()>=1.0f) - printf("@"); - else if(pen.get_value()>=0.8f) - printf("%%"); - else if(pen.get_value()>=0.6f) - printf("O"); - else if(pen.get_value()>=0.4f) - printf(":"); - else if(pen.get_value()>=0.2f) - printf("."); - else if(pen.get_value()>=0.0f) - printf(" "); - else - printf("X"),bad_values++; - } - pen.dec_x(x); - printf("|\n"); - } - pen.dec_y(y); - - if(bad_values) - { - printf("FAILURE! "__FILE__"@%d: blur result contained bad values\n",__LINE__); - return 1; - } -#endif - printf("PASSED\n"); - - return 0; -} - -/* === E N T R Y P O I N T ================================================= */ - -int main() -{ - int error=0; - - error+=generic_pen_test(40,40); - error+=generic_pen_test(10,40); - error+=generic_pen_test(40,10); - if(error)return error; - error+=alpha_pen_test(); - error+=bbox_pen_test(); - error+=box_blur_test(); - if(error)return error; - error+=gaussian_blur_test(); - - return error; -} diff --git a/ETL/trunk/test/random.cpp b/ETL/trunk/test/random.cpp deleted file mode 100644 index d5bfaea..0000000 --- a/ETL/trunk/test/random.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library Test Suite -** Angle Class Test -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#include - -/* === M A C R O S ========================================================= */ - -using namespace etl; - -/* === C L A S S E S ======================================================= */ - -int random_basic_test(void) -{ - int ret=0; - random Rand; - - return ret; -} - -/* === E N T R Y P O I N T ================================================= */ - -int main() -{ - int error=0; - - - return error; -} diff --git a/ETL/trunk/test/smach.cpp b/ETL/trunk/test/smach.cpp deleted file mode 100644 index bb5f48d..0000000 --- a/ETL/trunk/test/smach.cpp +++ /dev/null @@ -1,207 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library Test Suite -** Angle Class Test -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#include -#include - -/* === M A C R O S ========================================================= */ - -using namespace std; -using namespace etl; - -/* === C L A S S E S ======================================================= */ - -enum EventKey -{ - EVENT_1, - EVENT_2, - EVENT_3, - EVENT_4 -}; - - - -struct MachineContext -{ - smach machine; - - MachineContext():machine(this) - { - } -}; - -typedef smach Smach; - -class Event1 : public Smach::event -{ -public: - Event1():Smach::event(EVENT_1) { } -}; - - -class DefaultStateContext -{ - MachineContext *context; -public: - DefaultStateContext(MachineContext *context):context(context) { printf("Entered Default State\n"); } - ~DefaultStateContext() { printf("Left Default State\n"); } - - Smach::event_result event1_handler(const Smach::event& x __attribute__ ((unused))) - { - printf("DEFAULT STATE: Received Event 1\n"); - return Smach::RESULT_ACCEPT; - } -}; - -class DefaultState : public Smach::state -{ -public: - DefaultState():Smach::state("DefaultState") - { - insert(event_def(EVENT_1,&DefaultStateContext::event1_handler)); - } - -} default_state; - - - - - - - -class State1Context -{ - MachineContext *context; -public: - State1Context(MachineContext *context):context(context) { printf("Entered State 1\n"); } - ~State1Context() { printf("Left State 1\n"); } - - Smach::event_result event1_handler(const Smach::event& x __attribute__ ((unused))) - { - printf("STATE1: Received Event 1\n"); - return Smach::RESULT_OK; - } - - Smach::event_result event3_handler(const Smach::event& x); -}; - -class State1 : public Smach::state -{ -public: - State1():Smach::state("State1") - { - insert(event_def(EVENT_1,&State1Context::event1_handler)); - insert(event_def(EVENT_3,&State1Context::event3_handler)); - } - -} state_1; - - -class State2Context -{ - MachineContext *context; -public: - State2Context(MachineContext *context):context(context) { printf("Entered State 2\n"); } - ~State2Context() { printf("Left State 2\n"); } - - Smach::event_result event1_handler(const Smach::event& x __attribute__ ((unused))) - { - printf("STATE2: Received Event 1\n"); - return Smach::RESULT_OK; - } - - Smach::event_result event2_handler(const Smach::event& x __attribute__ ((unused))) - { - printf("STATE2: Received Event 2\n"); - return Smach::RESULT_OK; - } - - Smach::event_result event3_handler(const Smach::event& x __attribute__ ((unused))) - { - printf("STATE2: Received Event 3\n"); - return Smach::RESULT_OK; - } -}; - -class State2 : public Smach::state -{ -public: - State2():Smach::state("State2") - { - insert(event_def(EVENT_1,&State2Context::event1_handler)); - insert(event_def(EVENT_2,&State2Context::event2_handler)); - insert(event_def(EVENT_3,&State2Context::event3_handler)); - } - -} state_2; - -Smach::event_result -State1Context::event3_handler(const Smach::event& x __attribute__ ((unused))) -{ - printf("STATE1: Received Event 3, throwing state to change to...\n"); - - throw &state_2; -// context->machine.enter(&state_2); -// return Smach::RESULT_ACCEPT; -} - -/* === G L O B A L S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -int main() -{ - int error=0; - - MachineContext context; - try - { - Smach& state_machine(context.machine); - - state_machine.set_default_state(&default_state); - - state_machine.enter(&state_1); - - state_machine.process_event(Event1()); - state_machine.process_event(EVENT_1); - state_machine.process_event(EVENT_2); - state_machine.process_event(EVENT_3); - - state_machine.process_event(Event1()); - state_machine.process_event(EVENT_1); - state_machine.process_event(EVENT_2); - state_machine.process_event(EVENT_3); - - state_machine.process_event(Event1()); - state_machine.process_event(EVENT_1); - state_machine.process_event(EVENT_2); - state_machine.process_event(EVENT_3); - } - catch(...) - { - printf("Uncaught exception\n"); - error++; - } - - return error; -} diff --git a/ETL/trunk/test/smart_ptr.cpp b/ETL/trunk/test/smart_ptr.cpp deleted file mode 100644 index 663d882..0000000 --- a/ETL/trunk/test/smart_ptr.cpp +++ /dev/null @@ -1,319 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library Test Suite -** Smart Pointer Template Class Test -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -//#define DEBUGPOINT() fprintf(stderr,__FILE__":%d: DEBUGPOINT\n",__LINE__) -#define DEBUGPOINT() - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -#define NUMBER_OF_OBJECTS 40000 -using namespace std; - - -/* === C L A S S E S ======================================================= */ - -struct my_test_obj -{ - static int instance_count; - int my_id; - my_test_obj(int my_id=0):my_id(my_id) - { - instance_count++; - } - - virtual ~my_test_obj() - { - if(instance_count==0) - printf("Error, instance count is going past zero!\n"); - instance_count--; - } - - bool operator<(const my_test_obj &rhs)const - { - return my_id obj_smart_ptr; -typedef etl::smart_ptr other_obj_smart_ptr; -typedef list< obj_smart_ptr > obj_list; -typedef list< other_obj_smart_ptr > other_obj_list; - -int smart_ptr_basic_test(void) -{ - printf("smart_ptr: Size of a smart_ptr: %u\n",(unsigned int)sizeof(obj_smart_ptr)); - printf("smart_ptr: Size of a reference_counter: %u\n",(unsigned int)sizeof(etl::reference_counter)); - - - printf("smart_ptr: Basic test: "); - my_test_obj::instance_count=0; - - { - etl::smart_ptr obj_smart_ptr(new my_test_obj(rand())); - } - - if(my_test_obj::instance_count!=0) - { - printf("FAILED!\n"); - printf(__FILE__":%d: on create/destroy, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count); - return 1; - } - - { - DEBUGPOINT(); - map > my_map; - DEBUGPOINT(); - //etl::smart_ptr obj_smart_ptr(new my_test_obj(rand())); - etl::smart_ptr temp; - temp.spawn(); - DEBUGPOINT(); - temp.reset(); - DEBUGPOINT(); - my_map["bleh"]=temp; - DEBUGPOINT(); - } - - if(my_test_obj::instance_count!=0) - { - printf("FAILED!\n"); - printf(__FILE__":%d: on create/destroy, instance count=%d, should be zero.\n",__LINE__,my_test_obj::instance_count); - return 1; - } - - etl::smart_ptr obj_smart_ptr(new my_test_obj(rand())); - - if(obj_smart_ptr != obj_smart_ptr.constant()) - { - printf("FAILED!\n"); - printf(__FILE__":%d: on call to smart_ptr<>::constant().\n",__LINE__); - return 1; - } - - printf("PASSED\n"); - - return 0; -} - -int smart_ptr_general_use_test(void) -{ - printf("smart_ptr: General-use test: "); - my_test_obj::instance_count=0; - - obj_list my_list, my_other_list; - int i; - - for(i=0;i smart_ptr __attribute__ ((unused))) -{ -} - -int loose_smart_ptr_test(void) -{ - printf("smart_ptr: loose_smart_ptr test: "); - my_test_obj::instance_count=0; - - etl::loose_smart_ptr obj_smart_ptr_loose; - etl::smart_ptr obj_smart_ptr2; - - { - etl::smart_ptr obj_smart_ptr(new my_test_obj(rand())); - if(my_test_obj::instance_count!=1) - { - printf("FAILED!\n"); - printf(__FILE__":%d: on smart_ptr assignment from new object, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count); - return 1; - } - - obj_smart_ptr_loose=obj_smart_ptr; - if(obj_smart_ptr!=obj_smart_ptr_loose) - { - printf("FAILED!\n"); - printf(__FILE__":%d: on loose_smart_ptr assignment\n",__LINE__); - return 1; - } - - obj_smart_ptr2=obj_smart_ptr_loose; - if(my_test_obj::instance_count!=1) - { - printf("FAILED!\n"); - printf(__FILE__":%d: on smart_ptr assignment from loose_smart_ptr, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count); - return 1; - } - - test_func(obj_smart_ptr_loose); - if(my_test_obj::instance_count!=1) - { - printf("FAILED!\n"); - printf(__FILE__":%d: on smart_ptr assignment from loose_smart_ptr, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count); - return 1; - } - } - - if(my_test_obj::instance_count!=1) - { - printf("FAILED!\n"); - printf(__FILE__":%d: on create/destroy, instance count=%d, should be 1.\n",__LINE__,my_test_obj::instance_count); - return 1; - } - - printf("PASSED\n"); - return 0; -} - -/* === E N T R Y P O I N T ================================================= */ - -int main() -{ - int error=0; - - error+=smart_ptr_basic_test(); - error+=smart_ptr_general_use_test(); - error+=smart_ptr_inheritance_test(); - error+=loose_smart_ptr_test(); - - return error; -} diff --git a/ETL/trunk/test/spline.cpp b/ETL/trunk/test/spline.cpp deleted file mode 100644 index eaae237..0000000 --- a/ETL/trunk/test/spline.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library Test Suite -** Spline Curve Test -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -using namespace etl; - -/* === C L A S S E S ======================================================= */ - - -/* === P R O C E D U R E S ================================================= */ - -int bspline_basic_test(void) -{ - int ret=0; - float f; - - bspline BSpline; - etl::clock timer; - double t; - - *BSpline.cpoints().insert(BSpline.cpoints().end())=0; - *BSpline.cpoints().insert(BSpline.cpoints().end())=-1; - *BSpline.cpoints().insert(BSpline.cpoints().end())=0; - *BSpline.cpoints().insert(BSpline.cpoints().end())=1; - *BSpline.cpoints().insert(BSpline.cpoints().end())=0; - - BSpline.set_m(4); - BSpline.reset_knots(); - - integral > inte(BSpline); - - - /* - for(f=0.0;f<1.001;f+=0.05) - fprintf(stderr,"BSpline(%f)= %f\n",f,BSpline(f)); - */ - - fprintf(stderr,"integral of BSpline() on [0,1] = %f\n",inte(0,1.0)); - - - for(f=0.0f,timer.reset();f<1.001f;f+=0.000005f) - { - t+=BSpline(f)+BSpline(f+0.1f); - t+=BSpline(f)+BSpline(f+0.1f); - t+=BSpline(f)+BSpline(f+0.1f); - t+=BSpline(f)+BSpline(f+0.1f); - t+=BSpline(f)+BSpline(f+0.1f); - t+=BSpline(f)+BSpline(f+0.1f); - t+=BSpline(f)+BSpline(f+0.1f); - t+=BSpline(f)+BSpline(f+0.1f); - t+=BSpline(f)+BSpline(f+0.1f); - t+=BSpline(f)+BSpline(f+0.1f); - t+=BSpline(f)+BSpline(f+0.1f); - t+=BSpline(f)+BSpline(f+0.1f); - } - t=timer(); - - fprintf(stderr,"BSpline time=%f milliseconds\n",t*1000); - return ret; -} - -/* === E N T R Y P O I N T ================================================= */ - -int main() -{ - int error=0; - - error+=bspline_basic_test(); - - return error; -} - diff --git a/ETL/trunk/test/stringf.cpp b/ETL/trunk/test/stringf.cpp deleted file mode 100644 index 7c8346d..0000000 --- a/ETL/trunk/test/stringf.cpp +++ /dev/null @@ -1,152 +0,0 @@ -/*! ======================================================================== -** Extended Template and Library Test Suite -** stringf Procedure Test -** $Id$ -** -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -using namespace etl; -using namespace std; - -/* === C L A S S E S ======================================================= */ - - -/* === P R O C E D U R E S ================================================= */ - -int basic_test(void) -{ - int ret=0; - char mystring[80]="My formatted string!"; - string myotherstring="my other string!"; - - cout<>%s<<.",mystring)< "< "< "< "< "< "< "< "< "<=2.0f) - printf("#"); - else if(pen.get_value()>=1.0f) - printf("@"); - else if(pen.get_value()>=0.8f) - printf("%%"); - else if(pen.get_value()>=0.6f) - printf("O"); - else if(pen.get_value()>=0.4f) - printf(":"); - else if(pen.get_value()>=0.2f) - printf("."); - else if(pen.get_value()>=-0.1f) - printf(" "); - else - printf("X"),ret++; - } - pen.dec_x(x); - printf("|\n"); - } - pen.dec_y(y); - return ret; -} - -void make_pattern(generic_pen pen, int w, int h) -{ - int x,y; - for(y=0;y my_surface(100,100); - - gaussian_blur(my_surface.begin(),my_surface.end(),10,10); - - surface my_surface2(my_surface); - - my_surface2.fill(0.5); - my_surface2.clear(); - - my_surface2=my_surface; - - my_surface2.fill(0.5); - my_surface2.clear(); - - my_surface.fill(0.5); - my_surface.clear(); - - surface my_surface3; - my_surface3.mirror(my_surface2); - - my_surface3.fill(0.5); - my_surface3.clear(); - - my_surface3=my_surface; - - my_surface3.mirror(my_surface); - - printf("Surface:basic_test(): %d errors.\n",ret); - - return ret; -} - -int linear_sample_test() -{ - printf("Surface:linear_sample_test(): Running...\n"); - - int ret=0; - - surface my_surface(16,16); - - my_surface.fill(0.0f); - - make_pattern(my_surface.begin(),my_surface.get_w(),my_surface.get_h()); - - int extra(5); - surface dest(18+extra*2,18+extra*2); - - int x,y; - for(x=-extra;x my_surface(16,16); - - my_surface.fill(0.0f); - - make_pattern(my_surface.begin(),my_surface.get_w(),my_surface.get_h()); - - { - surface dest(24,24); - - int x,y; - for(x=0;x dest(16,16); - - int x,y; - for(x=0;x -#include - -/* === M A C R O S ========================================================= */ - -using namespace etl; - -/* === C L A S S E S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -struct stupidv -{ - float x,y; - - stupidv(float xin=0, float yin=0) :x(xin),y(yin) {} - void print() const - { - printf("(x=%f,y=%f)\n",x,y); - } -}; - -struct stupidp -{ - float z,w; - - stupidp(float zin=0, float win=0) :z(zin),w(win) {} - - void print() const - { - printf("(z=%f,w=%f)\n",z,w); - } -}; - -template <> -class etl::value_store_type -{ - typedef stupidv value_type; -}; - -int main() -{ - try - { - value v(10.0); //construction - value v2; //default construct... - - //get type... - printf("type of 10.0: %s\n", v.type().name()); - - v2 = 1; //assignment - printf("type of 1: %s\n", v2.type().name()); - - //extract int test - - int *pi = value_cast(&v2); - printf("v2 is an int(%p)\n", pi); - printf(" %d\n", value_cast(v2)); - - printf(" const version: %d\n", value_cast(value(5))); - - v = 'c'; //assignment again... - printf("type of c: %s\n", v.type().name()); - - v2 = v; //value assignment - printf("type of v2 , v: %s , %s\n", v2.type().name(), v.type().name()); - - //random type test - v = stupidv(0,1); - printf("type of vec: %s\n", v.type().name()); - - //type cast with binary change test - value_cast(&v)->print(); - value_cast(stupidp(5,10)).print(); //copy test - - printf("type of v: %s\n", v.type().name()); - printf("type of v2: %s\n", v2.type().name()); - v.swap(v2); - printf("type of v: %s\n", v.type().name()); - printf("type of v2: %s\n", v2.type().name()); - - // test the exception throwing... - value_cast(stupidp(6,66)); - - }catch(const etl::bad_value_cast &e) - { - printf(" Exploded: %s\n",e.what()); - }catch(...) - { - printf(" Exploded\n"); - } - - return 0; -} diff --git a/autobuild/Makefile b/autobuild/Makefile new file mode 100644 index 0000000..c0f2f6d --- /dev/null +++ b/autobuild/Makefile @@ -0,0 +1,92 @@ + +VERSION=0.61.03 + +COREDIR=synfig-core +STUDIODIR=synfig-studio +ETLDIR=etl + +OUTPUTDIR=output + +SRCPKG=Synfig.mpkg +OUTPKG=$(OUTPUTDIR)/Synfig-$(VERSION).mpkg +PKGDIR=$(OUTPKG)/Contents/Packages + +SSH_USER=darco@www.bridgetone.com +SSH_DIR=~/voria/files + +all: src osx package + +publish: + cd $(OUTPUTDIR) && tar c *.gz *.zip *.exe *.bz2 | ssh $(SSH_USER) "cd $(SSH_DIR) && tar xv" + +osx-pkg: + rm -fr $(OUTPKG) + rm -fr $(OUTPKG).zip + cp -R $(SRCPKG) $(OUTPKG) + cp -r $(OUTPUTDIR)/*.pkg $(PKGDIR) + cd $(OUTPUTDIR) && zip -r Synfig-$(VERSION).mpkg.zip *.mpkg + +core-osx: + [ -d $(OUTPUTDIR) ] || mkdir $(OUTPUTDIR) + rm -fr $(COREDIR) + svn export https://svn.voria.com/code/synfig-core/trunk $(COREDIR) || exit 2 + cd $(COREDIR) && ./macosxbuild.sh + cp -r $(COREDIR)/macosxbuild/*.pkg $(OUTPUTDIR) + +studio-osx: + [ -d $(OUTPUTDIR) ] || mkdir $(OUTPUTDIR) + rm -fr $(STUDIODIR) + svn export https://svn.voria.com/code/synfig-studio/trunk $(STUDIODIR) || exit 2 + cd $(STUDIODIR) && ./macosxbuild.sh + cp -r $(STUDIODIR)/macosxbuild/*.pkg $(OUTPUTDIR) + +core-w32: + [ -d $(OUTPUTDIR) ] || mkdir $(OUTPUTDIR) + rm -fr $(COREDIR) + svn export https://svn.voria.com/code/synfig-core/trunk $(COREDIR) || exit 2 + cd $(COREDIR) && ./win32build.sh + cp -r $(COREDIR)/win32build/*.exe $(OUTPUTDIR) + +studio-w32: + [ -d $(OUTPUTDIR) ] || mkdir $(OUTPUTDIR) + rm -fr $(STUDIODIR) + svn export https://svn.voria.com/code/synfig-studio/trunk $(STUDIODIR) || exit 2 + cd $(STUDIODIR) && ./win32build.sh + cp -r $(STUDIODIR)/win32build/*.exe $(OUTPUTDIR) + +core-src: + [ -d $(OUTPUTDIR) ] || mkdir $(OUTPUTDIR) + rm -fr $(COREDIR) + svn export https://svn.voria.com/code/synfig-core/trunk $(COREDIR) || exit 2 + cd $(COREDIR) && libtoolize --ltdl --copy --force && autoreconf --force --install && ./configure + make -C $(COREDIR) dist + cp -r $(COREDIR)/*.gz $(OUTPUTDIR) + +studio-src: + [ -d $(OUTPUTDIR) ] || mkdir $(OUTPUTDIR) + rm -fr $(STUDIODIR) + svn export https://svn.voria.com/code/synfig-studio/trunk $(STUDIODIR) || exit 2 + cd $(STUDIODIR) && autoreconf --force --install && ./configure + make -C $(STUDIODIR) dist + cp -r $(STUDIODIR)/*.gz $(OUTPUTDIR) + +etl-src: + [ -d $(OUTPUTDIR) ] || mkdir $(OUTPUTDIR) + rm -fr $(ETLDIR) + svn export https://svn.voria.com/code/ETL/trunk $(ETLDIR) || exit 2 + cd $(ETLDIR) && autoreconf --force --install && ./configure + make -C $(ETLDIR) dist + cp -r $(ETLDIR)/*.gz $(OUTPUTDIR) + +src: etl-src core-src studio-src + +osx: core-osx studio-osx + +w32: core-w32 studio-w32 + +clean: + rm -fr $(COREDIR) + rm -fr $(STUDIODIR) + rm -fr $(ETLDIR) + rm -fr $(OUTPUTDIR) + diff --git a/autobuild/trunk/Makefile b/autobuild/trunk/Makefile deleted file mode 100644 index c0f2f6d..0000000 --- a/autobuild/trunk/Makefile +++ /dev/null @@ -1,92 +0,0 @@ - -VERSION=0.61.03 - -COREDIR=synfig-core -STUDIODIR=synfig-studio -ETLDIR=etl - -OUTPUTDIR=output - -SRCPKG=Synfig.mpkg -OUTPKG=$(OUTPUTDIR)/Synfig-$(VERSION).mpkg -PKGDIR=$(OUTPKG)/Contents/Packages - -SSH_USER=darco@www.bridgetone.com -SSH_DIR=~/voria/files - -all: src osx package - -publish: - cd $(OUTPUTDIR) && tar c *.gz *.zip *.exe *.bz2 | ssh $(SSH_USER) "cd $(SSH_DIR) && tar xv" - -osx-pkg: - rm -fr $(OUTPKG) - rm -fr $(OUTPKG).zip - cp -R $(SRCPKG) $(OUTPKG) - cp -r $(OUTPUTDIR)/*.pkg $(PKGDIR) - cd $(OUTPUTDIR) && zip -r Synfig-$(VERSION).mpkg.zip *.mpkg - -core-osx: - [ -d $(OUTPUTDIR) ] || mkdir $(OUTPUTDIR) - rm -fr $(COREDIR) - svn export https://svn.voria.com/code/synfig-core/trunk $(COREDIR) || exit 2 - cd $(COREDIR) && ./macosxbuild.sh - cp -r $(COREDIR)/macosxbuild/*.pkg $(OUTPUTDIR) - -studio-osx: - [ -d $(OUTPUTDIR) ] || mkdir $(OUTPUTDIR) - rm -fr $(STUDIODIR) - svn export https://svn.voria.com/code/synfig-studio/trunk $(STUDIODIR) || exit 2 - cd $(STUDIODIR) && ./macosxbuild.sh - cp -r $(STUDIODIR)/macosxbuild/*.pkg $(OUTPUTDIR) - -core-w32: - [ -d $(OUTPUTDIR) ] || mkdir $(OUTPUTDIR) - rm -fr $(COREDIR) - svn export https://svn.voria.com/code/synfig-core/trunk $(COREDIR) || exit 2 - cd $(COREDIR) && ./win32build.sh - cp -r $(COREDIR)/win32build/*.exe $(OUTPUTDIR) - -studio-w32: - [ -d $(OUTPUTDIR) ] || mkdir $(OUTPUTDIR) - rm -fr $(STUDIODIR) - svn export https://svn.voria.com/code/synfig-studio/trunk $(STUDIODIR) || exit 2 - cd $(STUDIODIR) && ./win32build.sh - cp -r $(STUDIODIR)/win32build/*.exe $(OUTPUTDIR) - -core-src: - [ -d $(OUTPUTDIR) ] || mkdir $(OUTPUTDIR) - rm -fr $(COREDIR) - svn export https://svn.voria.com/code/synfig-core/trunk $(COREDIR) || exit 2 - cd $(COREDIR) && libtoolize --ltdl --copy --force && autoreconf --force --install && ./configure - make -C $(COREDIR) dist - cp -r $(COREDIR)/*.gz $(OUTPUTDIR) - -studio-src: - [ -d $(OUTPUTDIR) ] || mkdir $(OUTPUTDIR) - rm -fr $(STUDIODIR) - svn export https://svn.voria.com/code/synfig-studio/trunk $(STUDIODIR) || exit 2 - cd $(STUDIODIR) && autoreconf --force --install && ./configure - make -C $(STUDIODIR) dist - cp -r $(STUDIODIR)/*.gz $(OUTPUTDIR) - -etl-src: - [ -d $(OUTPUTDIR) ] || mkdir $(OUTPUTDIR) - rm -fr $(ETLDIR) - svn export https://svn.voria.com/code/ETL/trunk $(ETLDIR) || exit 2 - cd $(ETLDIR) && autoreconf --force --install && ./configure - make -C $(ETLDIR) dist - cp -r $(ETLDIR)/*.gz $(OUTPUTDIR) - -src: etl-src core-src studio-src - -osx: core-osx studio-osx - -w32: core-w32 studio-w32 - -clean: - rm -fr $(COREDIR) - rm -fr $(STUDIODIR) - rm -fr $(ETLDIR) - rm -fr $(OUTPUTDIR) - diff --git a/gtkmm-osx/Makefile b/gtkmm-osx/Makefile new file mode 100644 index 0000000..6337551 --- /dev/null +++ b/gtkmm-osx/Makefile @@ -0,0 +1,602 @@ +#export + + +# Directories +#ROOT_DIR=/Users/darco/Projects/GTK +ROOT_DIR=$(shell pwd) +PREFIX_DIR=$(ROOT_DIR)/output +#PREFIX_DIR=/Applications/SynfigStudio.app/Contents/synfig +PACKAGETMP_DIR=$(ROOT_DIR)/pkg_out +#PREFIX_DIR=/usr/local + +GETTEXT_VER=0.14.5 +GETTEXT_DIR=$(ROOT_DIR)/gettext-$(GETTEXT_VER) +GETTEXT_DL=http://mirrors.kernel.org/gnu/gettext/gettext-$(GETTEXT_VER).tar.gz + +LIBICONV_VER=1.9.1 +LIBICONV_DIR=$(ROOT_DIR)/libiconv-$(LIBICONV_VER) +LIBICONV_DL=http://mirrors.kernel.org/gnu/libiconv/libiconv-$(GETTEXT_VER).tar.gz + +GLIB_VER=2.4.7 +GLIB_VER=2.8.6 +GLIB_DIR=$(ROOT_DIR)/glib-$(GLIB_VER) +GLIB_DL=ftp://ftp.gtk.org/pub/gtk/v2.8/glib-$(GLIB_VER).tar.bz2 + +PANGO_VER=1.4.1 +PANGO_VER=1.10.4 +PANGO_DIR=$(ROOT_DIR)/pango-$(PANGO_VER) +PANGO_DL=http://ftp.gtk.org/pub/gtk/v2.8/pango-$(PANGO_VER).tar.bz2 + +CAIRO_VER=1.0.2 +CAIRO_DIR=$(ROOT_DIR)/cairo-$(CAIRO_VER) +CAIRO_DL=http://cairographics.org/releases/cairo-$(CAIRO_VER).tar.gz + +ATK_VER=1.6.1 +ATK_VER=1.10.3 +ATK_DIR=$(ROOT_DIR)/atk-$(ATK_VER) +ATK_DL=http://ftp.gtk.org/pub/gtk/v2.8/atk-$(ATK_VER).tar.bz2 + +GTK_VER=2.4.13 +GTK_VER=2.8.13 +GTK_DIR=$(ROOT_DIR)/gtk+-$(GTK_VER) +GTK_DL=http://ftp.gtk.org/pub/gtk/v2.8/gtk+-$(GTK_VER).tar.bz2 + +LIBPNG_VER=1.2.10 +LIBPNG_DIR=$(ROOT_DIR)/libpng-$(LIBPNG_VER) +LIBPNG_DL=ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-$(LIBPNG_VER).tar.bz2 + +LIBJPEG_VER=6b +LIBJPEG_DIR=$(ROOT_DIR)/jpeg-$(LIBJPEG_VER) + +LIBTIFF_VER=3.5.7 +LIBTIFF_DIR=$(ROOT_DIR)/tiff-v$(LIBTIFF_VER) + +LIBSIGC_DIR=$(ROOT_DIR)/libsigc++-1.2.4 +#LIBSIGC2_DIR=$(ROOT_DIR)/libsigc++-2.0.5 + +LIBSIGC2_VER=2.0.16 +LIBSIGC2_DIR=$(ROOT_DIR)/libsigc++-$(LIBSIGC2_VER) +LIBSIGC2_DL=http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.0/libsigc++-$(LIBSIGC2_VER).tar.gz + + +GLIBMM_VER=2.4.5 +GLIBMM_VER=2.8.5 +GLIBMM_DIR=$(ROOT_DIR)/glibmm-$(GLIBMM_VER) +GLIBMM_DL=http://ftp.gnome.org/pub/GNOME/sources/glibmm/2.8/glibmm-$(GLIBMM_VER).tar.gz + +GTKMM_VER=2.4.7 +GTKMM_VER=2.8.3 +GTKMM_DIR=$(ROOT_DIR)/gtkmm-$(GTKMM_VER) +GTKMM_DL=http://ftp.gnome.org/pub/GNOME/sources/gtkmm/2.8/gtkmm-$(GTKMM_VER).tar.gz + +LIBXML2_VER=2.6.23 +LIBXML2_DIR=$(ROOT_DIR)/libxml2-$(LIBXML2_VER) + +LIBXMLPP_VER=1.0.4 +LIBXMLPP_DIR=$(ROOT_DIR)/libxml++-$(LIBXMLPP_VER) +LIBXMLPP_DL=http://ftp.gnome.org/pub/GNOME/sources/libxml++/1.0/libxml++-$(LIBXMLPP_VER).tar.gz + + +FONTCONFIG_VER=2.2.96 +FONTCONFIG_DIR=$(ROOT_DIR)/fontconfig-$(FONTCONFIG_VER) + +INSTALL_PREFIX=/usr/local + +# Other +prefix="$(PREFIX_DIR)" +TEMP_FILE=$(ROOT_DIR)/tempfile.xxx +PKG_CONFIG_PATH="$(PREFIX_DIR)"/lib/pkgconfig:/usr/X11R6/lib/pkgconfig:/usr/lib/pkgconfig +PREFIX_SYMBOL=@PREFIX@ + +#export DYLD_LIBRARY_PATH="$(PREFIX_DIR)"/lib:/lib:/usr/local/lib:/lib:/usr/lib +export LD_PREBIND=1 +export LD_PREBIND_ALLOW_OVERLAP=1 +export LD_PREBIND_ALL_TWOLEVEL_MODULES=1 +export MACOSX_DEPLOYMENT_TARGET=10.4 +export CPP=gcc -E + +# Programs +#MAKE=export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET) && make +MAKE=make -j2 +CP=cp +MV=mv +MKDIR=mkdir +GREP=grep +STRIP=strip +FIND=find +CHMOD=chmod +PRINTF=printf +SED=/sw/bin/sed +PACKAGE=./package +CURL=curl -f +UNTARZ=tar xvzf +UNTARJ=tar xvjf +CAT=cat + +OFLAGS= +ARCHFLAGS=-arch i386 -arch ppc + +#ARCHFLAGS=-arch i386 + +#OFLAGS=-faltivec -maltivec +#ARCHFLAGS=-arch ppc + +CFLAGS=-I"$(PREFIX_DIR)"/include -no-cpp-precomp $(OFLAGS) $(ARCHFLAGS) +CC=gcc $(CFLAGS) +CC3=gcc $(CFLAGS) +CXXFLAGS=$(CFLAGS) +CXX=g++ $(CXXFLAGS) +CXXCPP=g++ -E +CPP=gcc -E +LDFLAGS=$(ARCHFLAGS) -L"$(PREFIX_DIR)"/lib -prebind_all_twolevel_modules -twolevel_namespace -bind_at_load -undefined dynamic_lookup +LFLAGS=$(LDFLAGS) + + +DESTDIR_FIX=for filename in `$(FIND) . | $(GREP) Makefile | $(GREP) -v -e Makefile.am -e Makefile.in` ; do { echo Patching $$filename ... && sed 's:LIBDIR=\\"$$(libdir)\\":LIBDIR=\\"$(INSTALL_PREFIX)/lib\\":g;s:DATA_PREFIX=\\"$$(prefix)\\":DATA_PREFIX=\\"$(INSTALL_PREFIX)\\":g; s:LOCALEDIR=\\"$$(localedir)\\":LOCALEDIR=\\"$(INSTALL_PREFIX)/share/locale\\":g; s:LOCALE_ALIAS_PATH=\\"$$(aliaspath)\\":LOCALE_ALIAS_PATH=\\"$(INSTALL_PREFIX)/share/locale\\":g;s:SYSCONFDIR=\\"$$(sysconfdir)\\":SYSCONFDIR=\\"$(INSTALL_PREFIX)/etc\\":g;' < $$filename > $(TEMP_FILE) && cp $(TEMP_FILE) $$filename ; } ; done ; + +ENDIAN_FIX=$(PRINTF) "\#ifdef __BIG_ENDIAN__\n\ +\#define WORDS_BIGENDIAN\n\ +\#endif\n\ +\#undef G_ATOMIC_I486\n\ +\#undef G_ATOMIC_POWERPC\n\ +\#ifdef __i386__\n\ +\#define G_ATOMIC_I486\n\ +\#endif\n\ +\#ifdef __ppc__\n\ +\#define G_ATOMIC_POWERPC\n\ +\#endif\n\ +" >> config.h + +ENVIRONMENT="ARCHFLAGS=$(ARCHFLAGS)" "CC=$(CC)" "CXX=$(CXX)" "CXXCPP=$(CXXCPP)" "CPP=$(CPP)" "PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)" "LDFLAGS=$(LDFLAGS)" "MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET)" + +# Flags +CONFIG_FLAGS=--prefix="$(PREFIX_DIR)" --disable-static --enable-shared $(ENVIRONMENT) + +# Targets +all: gettext glib libpng libjpeg cairo pango atk gtk libsigc2 glibmm gtkmm libxmlpp + +packages: gettext-pkg glib-pkg pango-pkg atk-pkg libpng-pkg libjpeg-pkg cairo-pkg gtk-pkg libsigc2-pkg glibmm-pkg gtkmm-pkg libxmlpp-pkg +clean: gettext-clean glib-clean libpng-clean libjpeg-clean cairo-clean pango-clean atk-clean gtk-clean libsigc2-clean glibmm-clean gtkmm-clean libxmlpp-clean + $(RM) -r gtkmm.pkg + +clean-all: clean + $(RM) -r output + +strip: + $(STRIP) "$(PREFIX_DIR)"/lib/*.dylib + +setup-uninstall: + $(PRINTF) "\ +#!/bin/bash\n\ +cd @PREFIX@\n\ +sudo for file in "'`'"cat bin/uninstall_gtk_list.txt"'`'"\n\ +do\n\ + printf .\n\ + rm $$file\n\ +done\n\ +" > "$(PREFIX_DIR)"/bin/uninstall_gtk + $(CHMOD) +x "$(PREFIX_DIR)"/bin/uninstall_gtk + cd "$(PREFIX_DIR)" && find . | tac > bin/uninstall_gtk_list.txt + +#PACKAGE_PREP="for filename in `find . | $(GREP) -e '\.la' -e '\.pc' -e '[-]config' -e '\.loaders' -e '\.immodules'` ; do [ -d $$filename ] || { $(GREP) -l '$(ROOT_DIR)' $$filename && $(SED) 's;"$(PREFIX_DIR)";@PREFIX@;g;s:-L$(ROOT_DIR)/gettext-0.11.5/intl::g;' < $$filename > $(TEMP_FILE) && $(CP) $(TEMP_FILE) $$filename ;} ; done; $(RM) $(TEMP_FILE)" + +PACKAGE_PREP=for filename in `find | $(GREP) -e '\.la' -e '\.pc' -e '[-]config' -e '\.loaders' -e '\.immodules'` ; do [ -d $$filename ] || { $(SED) 's;$(PACKAGETMP_DIR);@PREFIX@;g;s;"$(PREFIX_DIR)";@PREFIX@;g;s:-L$(ROOT_DIR)/gettext-0.11.5/intl::g;' < $$filename > $(TEMP_FILE) && $(CP) $(TEMP_FILE) $$filename && echo $$filename ;} ; done; $(RM) $(TEMP_FILE) ; $(RM) -R share/doc + +package-prep: setup-uninstall + -cd "$(PREFIX_DIR)" && $(PACKAGE_PREP) +# -cd "$(PREFIX_DIR)" && for filename in `$(CAT) "$(PREFIX_DIR)"/bin/uninstall_gtk_list.txt | $(GREP) -e "\.la" -e "\.pc" -e -config -e "\.loaders" -e "\.immodules"` ;\ +# do [ -d $$filename ] || { \ +# $(GREP) -l "$(ROOT_DIR)" $$filename && \ +# $(SED) "s;"$(PREFIX_DIR)";@PREFIX@;g;s:-L$(ROOT_DIR)/gettext-0.11.5/intl::g;" \ +# < $$filename > $(TEMP_FILE) && \ +# $(CP) $(TEMP_FILE) $$filename \ +# ;} ; done +# $(RM) $(TEMP_FILE) + + +package: + $(PACKAGE) "$(PREFIX_DIR)" gtkmm.info -r PkgResource -bzip +# -[ -d gtkmm.xpm ] && mv gtkmm.xpm gtkmm.pkg + +gettext: gettext-$(GETTEXT_VER) + cd $(GETTEXT_DIR) && ./configure $(CONFIG_FLAGS) "LDFLAGS=$(LDFLAGS) -L$(GETTEXT_DIR)/intl" --with-libiconv-prefix=/usr/lib + cd $(GETTEXT_DIR) && $(ENDIAN_FIX) +# $(SED) "s/__USER_LABEL_PREFIX__/_/g;" < $(GETTEXT_DIR)/intl/libgnuintl.h > $(TEMP_FILE) +# $(CP) $(TEMP_FILE) $(GETTEXT_DIR)/intl/libgnuintl.h +# $(RM) $(TEMPFILE) +#cd $(GETTEXT_DIR) && $(DESTDIR_FIX) + $(MAKE) -C $(GETTEXT_DIR) + $(MAKE) -C $(GETTEXT_DIR) install + +gettext-pkg: + $(RM) -r $(ROOT_DIR)/pkg_out + $(MAKE) -C $(GETTEXT_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out + -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) + $(SED) "s/@PACKAGE@/gettext/g;s/@VERSION@/$(GETTEXT_VER)/;" < package.info > gettext.info + $(PACKAGE) $(ROOT_DIR)/pkg_out gettext.info -r PkgResource -bzip + $(RM) -r $(ROOT_DIR)/pkg_out + mv $(ROOT_DIR)/gettext.pkg packages + +gettext-clean: + $(MAKE) -C $(GETTEXT_DIR) clean + +gettext-$(GETTEXT_VER): + $(CURL) $(GETTEXT_DL) -o gettext-$(GETTEXT_VER).tar.gz + $(UNTARZ) gettext-$(GETTEXT_VER).tar.gz + +libiconv: + cd $(LIBICONV_DIR) && ./configure $(CONFIG_FLAGS) + cd $(LIBICONV_DIR) && $(ENDIAN_FIX) + cd $(LIBICONV_DIR) && $(DESTDIR_FIX) + $(MAKE) -C $(LIBICONV_DIR) + $(MAKE) -C $(LIBICONV_DIR) install + +libiconv-clean: + $(MAKE) -C $(LIBICONV_DIR) clean + +glib: glib-$(GLIB_VER) + cd $(GLIB_DIR) && ./configure $(CONFIG_FLAGS) + cd $(GLIB_DIR) && $(ENDIAN_FIX) + cd $(GLIB_DIR) && $(DESTDIR_FIX) + $(MAKE) -C $(GLIB_DIR) + $(MAKE) -C $(GLIB_DIR) install-strip + +glib-pkg: + $(RM) -r $(ROOT_DIR)/pkg_out + $(MAKE) -C $(GLIB_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out + -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) + $(SED) "s/@PACKAGE@/glib/g;s/@VERSION@/$(GLIB_VER)/;" < package.info > glib.info + $(PACKAGE) $(ROOT_DIR)/pkg_out glib.info -r PkgResource -bzip + $(RM) -r $(ROOT_DIR)/pkg_out + mv $(ROOT_DIR)/glib.pkg packages + +glib-clean: + $(MAKE) -C $(GLIB_DIR) clean + +glib-$(GLIB_VER): + $(CURL) $(GLIB_DL) -o glib-$(GLIB_VER).tar.bz2 +# $(UNTARZ) glib-$(GLIB_VER).tar.gz + $(UNTARJ) glib-$(GLIB_VER).tar.bz2 + + + + +cairo: cairo-$(CAIRO_VER) + cd $(CAIRO_DIR) && ./configure $(CONFIG_FLAGS) + cd $(CAIRO_DIR) && $(ENDIAN_FIX) + cd $(CAIRO_DIR) && $(DESTDIR_FIX) + $(MAKE) -C $(CAIRO_DIR) + $(MAKE) -C $(CAIRO_DIR) install-strip + +cairo-pkg: + $(RM) -r $(ROOT_DIR)/pkg_out + $(MAKE) -C $(CAIRO_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out + -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) + $(SED) "s/@PACKAGE@/cairo/g;s/@VERSION@/$(CAIRO_VER)/;" < package.info > cairo.info + $(PACKAGE) $(ROOT_DIR)/pkg_out cairo.info -r PkgResource -bzip + $(RM) -r $(ROOT_DIR)/pkg_out + mv $(ROOT_DIR)/cairo.pkg packages + +cairo-clean: + $(MAKE) -C $(CAIRO_DIR) clean + +cairo-$(CAIRO_VER): + $(CURL) $(CAIRO_DL) -o cairo-$(CAIRO_VER).tar.gz + $(UNTARZ) cairo-$(CAIRO_VER).tar.gz + + + + +pango: pango-$(PANGO_VER) + cd $(PANGO_DIR) && ./configure $(CONFIG_FLAGS) + cd $(PANGO_DIR) && $(ENDIAN_FIX) + cd $(PANGO_DIR) && $(DESTDIR_FIX) + $(MAKE) -C $(PANGO_DIR) + $(MAKE) -C $(PANGO_DIR) install-strip + +pango-pkg: + $(RM) -r $(ROOT_DIR)/pkg_out + $(MAKE) -C $(PANGO_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out + -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) + $(SED) "s/@PACKAGE@/pango/g;s/@VERSION@/$(PANGO_VER)/;" < package.info > pango.info + $(PACKAGE) $(ROOT_DIR)/pkg_out pango.info -r PkgResource -bzip + $(RM) -r $(ROOT_DIR)/pkg_out + mv $(ROOT_DIR)/pango.pkg packages + +pango-clean: + $(MAKE) -C $(PANGO_DIR) clean + +pango-$(PANGO_VER): + $(CURL) $(PANGO_DL) -o pango-$(PANGO_VER).tar.bz2 + $(UNTARJ) pango-$(PANGO_VER).tar.bz2 + +atk: atk-$(ATK_VER) + cd $(ATK_DIR) && ./configure $(CONFIG_FLAGS) + cd $(ATK_DIR) && $(ENDIAN_FIX) + cd $(ATK_DIR) && $(DESTDIR_FIX) + $(MAKE) -C $(ATK_DIR) + $(MAKE) -C $(ATK_DIR) install-strip + +atk-pkg: + $(RM) -r $(ROOT_DIR)/pkg_out + $(MAKE) -C $(ATK_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out + -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) + $(SED) "s/@PACKAGE@/atk/g;s/@VERSION@/$(ATK_VER)/;" < package.info > atk.info + $(PACKAGE) $(ROOT_DIR)/pkg_out atk.info -r PkgResource -bzip + $(RM) -r $(ROOT_DIR)/pkg_out + mv $(ROOT_DIR)/atk.pkg packages + +atk-clean: + $(MAKE) -C $(ATK_DIR) clean + +atk-$(ATK_VER): + $(CURL) $(ATK_DL) -o atk-$(ATK_VER).tar.bz2 + $(UNTARJ) atk-$(ATK_VER).tar.bz2 + +libpng: libpng-$(LIBPNG_VER) + cd $(LIBPNG_DIR) && ./configure $(CONFIG_FLAGS) + cd $(LIBPNG_DIR) && $(ENDIAN_FIX) + cd $(LIBPNG_DIR) && $(DESTDIR_FIX) + $(MAKE) -C $(LIBPNG_DIR) + $(MAKE) -C $(LIBPNG_DIR) install-strip +# $(MAKE) -C $(LIBPNG_DIR) -f makefile.macosx prefix="$(PREFIX_DIR)" $(ENVIRONMENT) +# $(MAKE) -C $(LIBPNG_DIR) -f makefile.macosx install prefix="$(PREFIX_DIR)" $(ENVIRONMENT) +# $(MAKE) -C $(LIBPNG_DIR) -f makefile.macosx shared prefix="$(PREFIX_DIR)" $(ENVIRONMENT) +# $(MAKE) -C $(LIBPNG_DIR) -f makefile.macosx install-shared prefix="$(PREFIX_DIR)" $(ENVIRONMENT) +# $(MV) "$(PREFIX_DIR)"/lib/libpng.dylib "$(PREFIX_DIR)"/lib/libpng.dylib.xxx + +libpng-pkg: + $(RM) -r $(ROOT_DIR)/pkg_out + $(MKDIR) $(ROOT_DIR)/pkg_out + $(MAKE) -C $(LIBPNG_DIR) -f makefile.macosx install prefix=$(ROOT_DIR)/pkg_out + -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) + $(SED) "s/@PACKAGE@/libpng/g;s/@VERSION@/$(LIBPNG_VER)/;" < package.info > libpng.info + $(PACKAGE) $(ROOT_DIR)/pkg_out libpng.info -r PkgResource -bzip + $(RM) -r $(ROOT_DIR)/pkg_out + mv $(ROOT_DIR)/libpng.pkg packages + +libpng-clean: + $(MAKE) -C $(LIBPNG_DIR) clean + +libpng-$(LIBPNG_VER): + $(CURL) $(LIBPNG_DL) -o libpng-$(LIBPNG_VER).tar.bz2 + $(UNTARJ) libpng-$(LIBPNG_VER).tar.bz2 + + +gtk: gtk+-$(GTK_VER) + -$(MV) "$(PREFIX_DIR)"/lib/libjpeg.dylib.xxx "$(PREFIX_DIR)"/lib/libjpeg.dylib + -$(MV) "$(PREFIX_DIR)"/lib/libpng.dylib.xxx "$(PREFIX_DIR)"/lib/libpng.dylib + $(SED) -ibak "s/ libjpeg.dylib//" "$(PREFIX_DIR)"/lib/libjpeg.la + cd $(GTK_DIR) && ./configure $(CONFIG_FLAGS) LIBS="-L/usr/X11R6/lib -lfontconfig -lxinerama" --without-libtiff + cd $(GTK_DIR) && $(ENDIAN_FIX) + -$(MV) "$(PREFIX_DIR)"/lib/libjpeg.dylib "$(PREFIX_DIR)"/lib/libjpeg.dylib.xxx + -$(MV) "$(PREFIX_DIR)"/lib/libpng.dylib "$(PREFIX_DIR)"/lib/libpng.dylib.xxx + cd $(GTK_DIR) && $(DESTDIR_FIX) + $(MAKE) -C $(GTK_DIR) + $(MAKE) -C $(GTK_DIR) install-strip + $(SED) -ibak "s:dependency_libs='':dependency_libs='-L/usr/X11R6/lib -lX11 -lXinerama':" "$(PREFIX_DIR)"/lib/libgdk-x11-2.0.la + +gtk-pkg: + $(RM) -r $(ROOT_DIR)/pkg_out + $(MAKE) -C $(GTK_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out + -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) + $(SED) "s/@PACKAGE@/gtk/g;s/@VERSION@/$(GTK_VER)/;" < package.info > gtk.info + $(PACKAGE) $(ROOT_DIR)/pkg_out gtk.info -r PkgResource -bzip + #$(RM) -r $(ROOT_DIR)/pkg_out + mv $(ROOT_DIR)/gtk.pkg packages + +gtk-clean: + $(MAKE) -C $(GTK_DIR) clean + +gtk+-$(GTK_VER): + $(CURL) $(GTK_DL) -o gtk+-$(GTK_VER).tar.bz2 + $(UNTARJ) gtk+-$(GTK_VER).tar.bz2 + +libjpeg: + cd $(LIBJPEG_DIR) && ./configure $(CONFIG_FLAGS) + $(CP) $(GLIB_DIR)/libtool $(LIBJPEG_DIR) + $(MAKE) -C $(LIBJPEG_DIR) + $(MAKE) -C $(LIBJPEG_DIR) install + $(MV) "$(PREFIX_DIR)"/lib/libjpeg.dylib "$(PREFIX_DIR)"/lib/libjpeg.dylib.xxx +# $(RM) "$(PREFIX_DIR)"/lib/libjpeg.dylib + +libjpeg-pkg: + $(RM) -r $(ROOT_DIR)/pkg_out + $(MKDIR) $(ROOT_DIR)/pkg_out + $(MKDIR) $(ROOT_DIR)/pkg_out/include + $(MKDIR) $(ROOT_DIR)/pkg_out/lib + $(MKDIR) $(ROOT_DIR)/pkg_out/bin + $(MKDIR) $(ROOT_DIR)/pkg_out/man + $(MKDIR) $(ROOT_DIR)/pkg_out/man/man1 + $(MKDIR) $(ROOT_DIR)/pkg_out/share + $(MAKE) -C $(LIBJPEG_DIR) install prefix=$(ROOT_DIR)/pkg_out + -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) + $(SED) "s/@PACKAGE@/libjpeg/g;s/@VERSION@/$(LIBJPEG_VER)/;" < package.info > libjpeg.info + $(PACKAGE) $(ROOT_DIR)/pkg_out libjpeg.info -r PkgResource -bzip + $(RM) -r $(ROOT_DIR)/pkg_out + mv $(ROOT_DIR)/libjpeg.pkg packages + +libjpeg-clean: + $(MAKE) -C $(LIBJPEG_DIR) clean + + +libtiff: + MAKE=make && cd $(LIBTIFF_DIR) && ./configure --prefix="$(PREFIX_DIR)" --noninteractive --with-CC="$(CC3)" --with-CFLAGS="$(CFLAGS)" + $(MAKE) -C $(LIBTIFF_DIR) -e + $(MAKE) -C $(LIBTIFF_DIR) install + +libtiff-pkg: + $(RM) -r $(ROOT_DIR)/pkg_out + $(MAKE) -C $(LIBTIFF_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out + -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) + $(SED) "s/@PACKAGE@/libtiff/g;s/@VERSION@/$(LIBTIFF_VER)/;" < package.info > libtiff.info + $(PACKAGE) $(ROOT_DIR)/pkg_out libtiff.info -r PkgResource -bzip + $(RM) -r $(ROOT_DIR)/pkg_out + mv $(ROOT_DIR)/libtiff.pkg packages + +libtiff-clean: + $(MAKE) -C $(LIBTIFF_DIR) clean + +#LDFLAGS=-L"$(PREFIX_DIR)"/lib -prebind -flat_namespace # -fcoalesce-templates + +libsigc: + #cd $(LIBSIGC_DIR) && ./configure $(CONFIG_FLAGS) LDFLAGS="$(LDFLAGS) -lstdc++ -lsupc++" "CC=g++ $(CFLAGS)" + cd $(LIBSIGC_DIR) && ./configure $(CONFIG_FLAGS) LDFLAGS="$(LDFLAGS) -lstdc++" "CC=g++ $(CFLAGS)" + cd $(LIBSIGC_DIR) && $(ENDIAN_FIX) + $(MAKE) -C $(LIBSIGC_DIR) + $(MAKE) -C $(LIBSIGC_DIR) install-strip + +libsigc-pkg: + $(RM) -r $(ROOT_DIR)/pkg_out + $(MAKE) -C $(LIBSIGC_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out + -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) + $(SED) "s/@PACKAGE@/libsigc/g;s/@VERSION@/$(LIBSIGC_VER)/;" < package.info > libsigc.info + $(PACKAGE) $(ROOT_DIR)/pkg_out libsigc.info -r PkgResource -bzip + $(RM) -r $(ROOT_DIR)/pkg_out + mv $(ROOT_DIR)/libsigc.pkg packages + +libsigc-clean: + $(MAKE) -C $(LIBSIGC_DIR) clean + + +glibmm: glibmm-$(GLIBMM_VER) + #cd $(GLIBMM_DIR) && ./configure $(CONFIG_FLAGS) "LDFLAGS=$(LDFLAGS) -L/usr/X11R6/lib -lXinerama -lstdc++ -lsupc++" "CC=g++ $(CFLAGS)" + cd $(GLIBMM_DIR) && ./configure $(CONFIG_FLAGS) "LDFLAGS=$(LDFLAGS) -L/usr/X11R6/lib -lXinerama -lstdc++" "CC=g++ $(CFLAGS)" + cd $(GLIBMM_DIR) && $(ENDIAN_FIX) + cd $(GLIBMM_DIR) && $(DESTDIR_FIX) + $(MAKE) -C $(GLIBMM_DIR) + $(MAKE) -C $(GLIBMM_DIR) install-strip + +glibmm-pkg: + $(RM) -r $(ROOT_DIR)/pkg_out + $(MAKE) -C $(GLIBMM_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out + -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) + $(SED) "s/@PACKAGE@/glibmm/g;s/@VERSION@/$(GLIBMM_VER)/;" < package.info > glibmm.info + $(PACKAGE) $(ROOT_DIR)/pkg_out glibmm.info -r PkgResource -bzip + $(RM) -r $(ROOT_DIR)/pkg_out + mv $(ROOT_DIR)/glibmm.pkg packages + +gibmm-clean: + $(MAKE) -C $(GLIBMM_DIR) clean + +glibmm-$(GLIBMM_VER): + $(CURL) $(GLIBMM_DL) -o glibmm-$(GLIBMM_VER).tar.gz + $(UNTARZ) glibmm-$(GLIBMM_VER).tar.gz + + +gtkmm: gtkmm-$(GTKMM_VER) + #cd $(GTKMM_DIR) && ./configure $(CONFIG_FLAGS) "LDFLAGS=$(LDFLAGS) -L/usr/X11R6/lib -lXinerama -lstdc++ -lsupc++" "CC=g++ $(CFLAGS)" --enable-examples=no --enable-demos=no --enable-docs=no + cd $(GTKMM_DIR) && ./configure $(CONFIG_FLAGS) "LDFLAGS=$(LDFLAGS) -L/usr/X11R6/lib -lXinerama -lstdc++" "CC=g++ $(CFLAGS)" + cd $(GTKMM_DIR) && $(DESTDIR_FIX) + $(MAKE) -C $(GTKMM_DIR) + $(MAKE) -C $(GTKMM_DIR) install-strip + +gtkmm-pkg: + $(RM) -r $(ROOT_DIR)/pkg_out + $(MAKE) -C $(GTKMM_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out + -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) + $(SED) "s/@PACKAGE@/gtkmm/g;s/@VERSION@/$(GTKMM_VER)/;" < package.info > gtkmm.info + $(PACKAGE) $(ROOT_DIR)/pkg_out gtkmm.info -r PkgResource -bzip + $(RM) -r $(ROOT_DIR)/pkg_out + mv $(ROOT_DIR)/gtkmm.pkg packages + +gtkmm-clean: + $(MAKE) -C $(GTKMM_DIR) clean + +gtkmm-$(GTKMM_VER): + $(CURL) $(GTKMM_DL) -o gtkmm-$(GTKMM_VER).tar.gz + $(UNTARZ) gtkmm-$(GTKMM_VER).tar.gz + + +libsigc2: libsigc++-$(LIBSIGC2_VER) + #cd $(LIBSIGC2_DIR) && ./configure $(CONFIG_FLAGS) LDFLAGS="$(LDFLAGS) -lstdc++ -lsupc++" "CC=g++ $(CFLAGS)" + cd $(LIBSIGC2_DIR) && ./configure $(CONFIG_FLAGS) LDFLAGS="$(LDFLAGS) -lstdc++" "CC=g++ $(CFLAGS)" + cd $(LIBSIGC2_DIR) && $(ENDIAN_FIX) + $(MAKE) -C $(LIBSIGC2_DIR) + $(MAKE) -C $(LIBSIGC2_DIR) install-strip + +libsigc2-pkg: + $(RM) -r $(ROOT_DIR)/pkg_out + $(MAKE) -C $(LIBSIGC2_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out + -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) + $(SED) "s/@PACKAGE@/libsigc2/g;s/@VERSION@/$(LIBSIGC2_VER)/;" < package.info > libsigc2.info + $(PACKAGE) $(ROOT_DIR)/pkg_out libsigc2.info -r PkgResource -bzip + $(RM) -r $(ROOT_DIR)/pkg_out + mv $(ROOT_DIR)/libsigc2.pkg packages + +libsigc2-clean: + $(MAKE) -C $(LIBSIGC2_DIR) clean + +libsigc++-$(LIBSIGC2_VER): + $(CURL) $(LIBSIGC2_DL) -o libsigc2-$(LIBSIGC2_VER).tar.gz + $(UNTARZ) libsigc2-$(LIBSIGC2_VER).tar.gz + +LDFLAGS=-L"$(PREFIX_DIR)"/lib -prebind -prebind_all_twolevel_modules -twolevel_namespace -bind_at_load +CONFIG_FLAGS=--prefix="$(PREFIX_DIR)" --disable-static --enable-shared "CC=$(CC)" "CXX=$(CXX)" "CXXCPP=$(CXXCPP)" "PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)" "LDFLAGS=$(LDFLAGS)" "MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET)" + +libxml2: + cd $(LIBXML2_DIR) && ./configure $(CONFIG_FLAGS) + cd $(LIBXML2_DIR) && $(ENDIAN_FIX) + cd $(LIBXML2_DIR) && $(DESTDIR_FIX) + $(MAKE) -C $(LIBXML2_DIR) + $(MAKE) -C $(LIBXML2_DIR) install-strip + +libxml2-pkg: + $(RM) -r $(ROOT_DIR)/pkg_out + $(MAKE) -C $(LIBXML2_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out + -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) + $(SED) "s/@PACKAGE@/libxml2/g;s/@VERSION@/$(LIBXML2_VER)/;" < package.info > libxml2.info + $(PACKAGE) $(ROOT_DIR)/pkg_out libxml2.info -r PkgResource -bzip + $(RM) -r $(ROOT_DIR)/pkg_out + mv $(ROOT_DIR)/libxml2.pkg packages + +libxml2-clean: + $(MAKE) -C $(LIBXML2_DIR) clean + + +fontconfig: + cd $(FONTCONFIG_DIR) && ./configure $(CONFIG_FLAGS) --disable-docs --without-docdir HASDOCBOOK=no + cd $(FONTCONFIG_DIR) && $(ENDIAN_FIX) + cd $(FONTCONFIG_DIR) && $(DESTDIR_FIX) + $(MAKE) -C $(FONTCONFIG_DIR) + $(MAKE) -C $(FONTCONFIG_DIR) install-strip + +fontconfig-pkg: + $(RM) -r $(ROOT_DIR)/pkg_out + $(MAKE) -C $(FONTCONFIG_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out + -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) + $(SED) "s/@PACKAGE@/fontconfig/g;s/@VERSION@/$(FONTCONFIG_VER)/;" < package.info > fontconfig.info + $(PACKAGE) $(ROOT_DIR)/pkg_out fontconfig.info -r PkgResource -bzip + $(RM) -r $(ROOT_DIR)/pkg_out + mv $(ROOT_DIR)/fontconfig.pkg packages + +fontconfig-clean: + $(MAKE) -C $(FONTCONFIG_DIR) clean + +LDFLAGS=-L"$(PREFIX_DIR)"/lib -prebind -prebind_all_twolevel_modules -twolevel_namespace -bind_at_load +CONFIG_FLAGS=--prefix="$(PREFIX_DIR)" --disable-static --enable-shared "CC=$(CC)" "CXX=$(CXX)" "CXXCPP=$(CXXCPP)" "PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)" "LDFLAGS=$(LDFLAGS)" "MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET)" + +libxmlpp: $(LIBXMLPP_DIR) + cd $(LIBXMLPP_DIR) && ./configure $(CONFIG_FLAGS) + cd $(LIBXMLPP_DIR) && $(ENDIAN_FIX) + cd $(LIBXMLPP_DIR) && $(DESTDIR_FIX) + $(MAKE) -C $(LIBXMLPP_DIR) + $(MAKE) -C $(LIBXMLPP_DIR) install-strip + +libxmlpp-pkg: + $(RM) -r $(ROOT_DIR)/pkg_out + $(MAKE) -C $(LIBXMLPP_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out + -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) + $(SED) "s/@PACKAGE@/libxmlpp/g;s/@VERSION@/$(LIBXMLPP_VER)/;" < package.info > libxmlpp.info + $(PACKAGE) $(ROOT_DIR)/pkg_out libxmlpp.info -r PkgResource -bzip + $(RM) -r $(ROOT_DIR)/pkg_out + mv $(ROOT_DIR)/libxmlpp.pkg packages + +libxmlpp-clean: + $(MAKE) -C $(LIBXMLPP_DIR) clean + +$(LIBXMLPP_DIR): + $(CURL) $(LIBXMLPP_DL) -o libxmlpp-$(LIBXMLPP_VER).tar.gz + $(UNTARZ) libxmlpp-$(LIBXMLPP_VER).tar.gz + +.PHONY: package diff --git a/gtkmm-osx/Packages b/gtkmm-osx/Packages new file mode 120000 index 0000000..b592020 --- /dev/null +++ b/gtkmm-osx/Packages @@ -0,0 +1 @@ +gtkmm-meta.mpkg/Contents/Packages \ No newline at end of file diff --git a/gtkmm-osx/PkgResource/License.txt b/gtkmm-osx/PkgResource/License.txt new file mode 100644 index 0000000..d60c31a --- /dev/null +++ b/gtkmm-osx/PkgResource/License.txt @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/gtkmm-osx/PkgResource/ReadMe.txt b/gtkmm-osx/PkgResource/ReadMe.txt new file mode 100644 index 0000000..737ac3a --- /dev/null +++ b/gtkmm-osx/PkgResource/ReadMe.txt @@ -0,0 +1,3 @@ +This package was created for use with Synfig Studio, but you should be able to use it with other programs as well. + +Everything in here was created with the stock distributions without any modifications to the source code. You can find/download the source to all of the included packages by searching around on freshmeat.net. diff --git a/gtkmm-osx/PkgResource/postflight b/gtkmm-osx/PkgResource/postflight new file mode 100755 index 0000000..00a0936 --- /dev/null +++ b/gtkmm-osx/PkgResource/postflight @@ -0,0 +1,40 @@ +#!/bin/sh + +echo Start of post_install script. + + +PREFIX=$2 + +LIST_FILE=$PREFIX/bin/uninstall_gtk_list.txt +TEMP_FILE=tempfile.xxx + +echo ARG1=$1 +echo ARG2=$2 +echo ARG3=$3 +echo ARG4=$4 +echo RESOURCE_DIR=$RESOURCE_DIR +echo PREFIX=$PREFIX +echo LIST_FILE=$LIST_FILE +echo TEMP_FILE=$TEMP_FILE +sleep 1 + +#[ -e $LIST_FILE ] || { echo Unable to find $LIST_FILE ; sleep 1; exit 1; } +cd $PREFIX +for filename in `find . | grep -e "\.la" -e "\.pc" -e -config -e "\.loaders" -e "\.immodules"` ; do { + grep -l @PREFIX@ $filename && sed " +s;@PREFIX@;$PREFIX;g; +" < $filename > $TEMP_FILE && + cp $TEMP_FILE $filename && echo $filename; +} ; done + +rm $TEMP_FILE + +mkdir -p $PREFIX/etc/pango +[ -e $PREFIX/bin/pango-querymodules ] && $PREFIX/bin/pango-querymodules > $PREFIX/etc/pango/pango.modules + +echo "Done with shell script" + +exit 0 + + + diff --git a/gtkmm-osx/gtkmm-meta.mpkg/Contents/Info.plist b/gtkmm-osx/gtkmm-meta.mpkg/Contents/Info.plist new file mode 100644 index 0000000..6b562fe --- /dev/null +++ b/gtkmm-osx/gtkmm-meta.mpkg/Contents/Info.plist @@ -0,0 +1,89 @@ + + + + + IFPkgFlagBackgroundAlignment + left + IFPkgFlagBackgroundScaling + none + IFPkgFlagComponentDirectory + ./Contents/Packages + IFPkgFlagPackageList + + + IFPkgFlagPackageLocation + gettext.pkg + IFPkgFlagPackageSelection + selected + + + IFPkgFlagPackageLocation + libpng.pkg + IFPkgFlagPackageSelection + selected + + + IFPkgFlagPackageLocation + libjpeg.pkg + IFPkgFlagPackageSelection + selected + + + IFPkgFlagPackageLocation + glib.pkg + IFPkgFlagPackageSelection + selected + + + IFPkgFlagPackageLocation + pango.pkg + IFPkgFlagPackageSelection + selected + + + IFPkgFlagPackageLocation + atk.pkg + IFPkgFlagPackageSelection + selected + + + IFPkgFlagPackageLocation + gtk.pkg + IFPkgFlagPackageSelection + selected + + + IFPkgFlagPackageLocation + libsigc2.pkg + IFPkgFlagPackageSelection + selected + + + IFPkgFlagPackageLocation + glibmm.pkg + IFPkgFlagPackageSelection + selected + + + IFPkgFlagPackageLocation + gtkmm.pkg + IFPkgFlagPackageSelection + selected + + + IFPkgFlagPackageLocation + libxml2.pkg + IFPkgFlagPackageSelection + selected + + + IFPkgFlagPackageLocation + libxmlpp.pkg + IFPkgFlagPackageSelection + selected + + + IFPkgFormatVersion + 0.10000000149011612 + + diff --git a/gtkmm-osx/gtkmm-meta.mpkg/Contents/PkgInfo b/gtkmm-osx/gtkmm-meta.mpkg/Contents/PkgInfo new file mode 100644 index 0000000..4cd3119 --- /dev/null +++ b/gtkmm-osx/gtkmm-meta.mpkg/Contents/PkgInfo @@ -0,0 +1 @@ +pmkrpkg1 \ No newline at end of file diff --git a/gtkmm-osx/gtkmm-meta.mpkg/Contents/Resources/English.lproj/Description.plist b/gtkmm-osx/gtkmm-meta.mpkg/Contents/Resources/English.lproj/Description.plist new file mode 100644 index 0000000..7dbd0f8 --- /dev/null +++ b/gtkmm-osx/gtkmm-meta.mpkg/Contents/Resources/English.lproj/Description.plist @@ -0,0 +1,10 @@ + + + + + IFPkgDescriptionDescription + + IFPkgDescriptionTitle + GTKMM 2.4.7 + + diff --git a/gtkmm-osx/gtkmm-meta.mpkg/Contents/Resources/English.lproj/background.tif b/gtkmm-osx/gtkmm-meta.mpkg/Contents/Resources/English.lproj/background.tif new file mode 100755 index 0000000000000000000000000000000000000000..43cf472c2a0e3217f612575200030ad84e79e280 GIT binary patch literal 40132 zcmeFZ3p|ut_c*?vxf|C(u7h#EUkcjFqFkx+yvkqS`?l~h8iA)%-! zNu?U4q9lsa1^;JsKkqr`eb4*-e&5gc|NWh(=9#tEUVH7e)?Uxr`&oN7dwZY+0KfqO zFb7aD1i>HH4Y}}@1H;f)I17dm3ouLv2|&oNcr;wXe1#D(O!&sfZ3bHO6~EBpE6m~} z_>IP5KO_QR4y-OAaY*z#EC&(4(z9w5e&VkI;9h_jj8%m+7hrxEwu6j*qH+4s7SYV& zEwBit@l3O2!CD3Y2*#ubev@HeVR{t60>EJd!17v{H_IMh{^38<0FdVaU%yR#!n}M* zjsaoRu&98raFV$*$)4gJ7|JRFpsB8|ZJ?oHprJ?7&^FN0Fj%4w3{B#~Dc&1>sU$C7 z|G-cq`Pb(z%98?pjO5+4?bYqW&3yv`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(Q(p zEI(t<&6?pmk0CETJMRZ$9rh)_K&==Fu>A^$YNM{+ugaAsm!{}7o{e|d^2n0Hk6>1s zOuLT9n`q=pI9+i>lewdHY@ctqK6&qkP6kMRBo=6H*4z#-)D~8x=kCdAqD1~PKVcZm}LN-#V)_5;s0s1Q`Os}h_76t^7pOQ?z_D2yozm6 zP4A@vgW7cy@?ev#znf5Jp(=AV7##dsPsGMMrPRL9d-G3yRK5=c&c-p!Uo?vD>YjR) zGZZZzdDV~(JM8t%-uyiur;8BfJ&7@R#s5+8{`rmm~Xu*TMl7z#oVdbonUOO!N z4&h>U^QE2eqOeUTixAnINsYw0wZ7AL6KmM!G$3Ge*G+HHmKp>LsDj{#6>$KFGxF*6 zozUxD9xt$dUk@egW08fsRIGC;lZ*E=ePfK>JF3w_(XC}Hkvgj68FL-Hj-qOX)rpux zhy&cnr{5nep{lF};{XMR%_4?RDa#di-EQz!r1cH#WI7_nO|btN(mJMwE0rm}*&SImu-M(m?Y>u?92McR0AwjDq!L9I6v9TV_ zIN@TYdQUzqqt=L-I7sqYt8Q$2VW8TJH2yFFDFdsqvT1dt@>pfYsoY)VLnkymO&Y#U zJHw2>1mxHeRV%zK)WEZ=hu>!QDOxr)g; zfct6 wrote the original ansi2knr and +continues to maintain the current version; most of the code in the current +version is his work. ansi2knr also includes contributions by Francois +Pinard and Jim Avera . diff --git a/gtkmm-osx/jpeg-6b/ansi2knr.c b/gtkmm-osx/jpeg-6b/ansi2knr.c new file mode 100644 index 0000000..4e05fc2 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/ansi2knr.c @@ -0,0 +1,693 @@ +/* ansi2knr.c */ +/* Convert ANSI C function definitions to K&R ("traditional C") syntax */ + +/* +ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY. No author or distributor accepts responsibility to anyone for the +consequences of using it or for whether it serves any particular purpose or +works at all, unless he says so in writing. Refer to the GNU General Public +License (the "GPL") for full details. + +Everyone is granted permission to copy, modify and redistribute ansi2knr, +but only under the conditions described in the GPL. A copy of this license +is supposed to have been given to you along with ansi2knr so you can know +your rights and responsibilities. It should be in a file named COPYLEFT. +[In the IJG distribution, the GPL appears below, not in a separate file.] +Among other things, the copyright notice and this notice must be preserved +on all copies. + +We explicitly state here what we believe is already implied by the GPL: if +the ansi2knr program is distributed as a separate set of sources and a +separate executable file which are aggregated on a storage medium together +with another program, this in itself does not bring the other program under +the GPL, nor does the mere fact that such a program or the procedures for +constructing it invoke the ansi2knr executable bring any other part of the +program under the GPL. +*/ + +/* +---------- Here is the GNU GPL file COPYLEFT, referred to above ---------- +----- These terms do NOT apply to the JPEG software itself; see README ------ + + GHOSTSCRIPT GENERAL PUBLIC LICENSE + (Clarified 11 Feb 1988) + + Copyright (C) 1988 Richard M. Stallman + Everyone is permitted to copy and distribute verbatim copies of this + license, but changing it is not allowed. You can also use this wording + to make the terms for other programs. + + The license agreements of most software companies keep you at the +mercy of those companies. By contrast, our general public license is +intended to give everyone the right to share Ghostscript. To make sure +that you get the rights we want you to have, we need to make +restrictions that forbid anyone to deny you these rights or to ask you +to surrender the rights. Hence this license agreement. + + Specifically, we want to make sure that you have the right to give +away copies of Ghostscript, that you receive source code or else can get +it if you want it, that you can change Ghostscript or use pieces of it +in new free programs, and that you know you can do these things. + + To make sure that everyone has such rights, we have to forbid you to +deprive anyone else of these rights. For example, if you distribute +copies of Ghostscript, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must tell them their rights. + + Also, for our own protection, we must make certain that everyone finds +out that there is no warranty for Ghostscript. If Ghostscript is +modified by someone else and passed on, we want its recipients to know +that what they have is not what we distributed, so that any problems +introduced by others will not reflect on our reputation. + + Therefore we (Richard M. Stallman and the Free Software Foundation, +Inc.) make the following terms which say what you must do to be allowed +to distribute or change Ghostscript. + + + COPYING POLICIES + + 1. You may copy and distribute verbatim copies of Ghostscript source +code as you receive it, in any medium, provided that you conspicuously +and appropriately publish on each copy a valid copyright and license +notice "Copyright (C) 1989 Aladdin Enterprises. All rights reserved. +Distributed by Free Software Foundation, Inc." (or with whatever year is +appropriate); keep intact the notices on all files that refer to this +License Agreement and to the absence of any warranty; and give any other +recipients of the Ghostscript program a copy of this License Agreement +along with the program. You may charge a distribution fee for the +physical act of transferring a copy. + + 2. You may modify your copy or copies of Ghostscript or any portion of +it, and copy and distribute such modifications under the terms of +Paragraph 1 above, provided that you also do the following: + + a) cause the modified files to carry prominent notices stating + that you changed the files and the date of any change; and + + b) cause the whole of any work that you distribute or publish, + that in whole or in part contains or is a derivative of Ghostscript + or any part thereof, to be licensed at no charge to all third + parties on terms identical to those contained in this License + Agreement (except that you may choose to grant more extensive + warranty protection to some or all third parties, at your option). + + c) You may charge a distribution fee for the physical act of + transferring a copy, and you may at your option offer warranty + protection in exchange for a fee. + +Mere aggregation of another unrelated program with this program (or its +derivative) on a volume of a storage or distribution medium does not bring +the other program under the scope of these terms. + + 3. You may copy and distribute Ghostscript (or a portion or derivative +of it, under Paragraph 2) in object code or executable form under the +terms of Paragraphs 1 and 2 above provided that you also do one of the +following: + + a) accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Paragraphs 1 and 2 above; or, + + b) accompany it with a written offer, valid for at least three + years, to give any third party free (except for a nominal + shipping charge) a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of + Paragraphs 1 and 2 above; or, + + c) accompany it with the information you received as to where the + corresponding source code may be obtained. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form alone.) + +For an executable file, complete source code means all the source code for +all modules it contains; but, as a special exception, it need not include +source code for modules which are standard libraries that accompany the +operating system on which the executable file runs. + + 4. You may not copy, sublicense, distribute or transfer Ghostscript +except as expressly provided under this License Agreement. Any attempt +otherwise to copy, sublicense, distribute or transfer Ghostscript is +void and your rights to use the program under this License agreement +shall be automatically terminated. However, parties who have received +computer software programs from you with this License Agreement will not +have their licenses terminated so long as such parties remain in full +compliance. + + 5. If you wish to incorporate parts of Ghostscript into other free +programs whose distribution conditions are different, write to the Free +Software Foundation at 675 Mass Ave, Cambridge, MA 02139. We have not +yet worked out a simple rule that can be stated here, but we will often +permit this. We will be guided by the two goals of preserving the free +status of all derivatives of our free software and of promoting the +sharing and reuse of software. + +Your comments and suggestions about our licensing policies and our +software are welcome! Please contact the Free Software Foundation, +Inc., 675 Mass Ave, Cambridge, MA 02139, or call (617) 876-3296. + + NO WARRANTY + + BECAUSE GHOSTSCRIPT IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY +NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT +WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC, RICHARD +M. STALLMAN, ALADDIN ENTERPRISES, L. PETER DEUTSCH, AND/OR OTHER PARTIES +PROVIDE GHOSTSCRIPT "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER +EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE +ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF GHOSTSCRIPT IS WITH +YOU. SHOULD GHOSTSCRIPT PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL +NECESSARY SERVICING, REPAIR OR CORRECTION. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M. +STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., L. PETER DEUTSCH, ALADDIN +ENTERPRISES, AND/OR ANY OTHER PARTY WHO MAY MODIFY AND REDISTRIBUTE +GHOSTSCRIPT AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING +ANY LOST PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE +(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED +INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A FAILURE OF THE +PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) GHOSTSCRIPT, EVEN IF YOU +HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM +BY ANY OTHER PARTY. + +-------------------- End of file COPYLEFT ------------------------------ +*/ + +/* + * Usage: + ansi2knr input_file [output_file] + * If no output_file is supplied, output goes to stdout. + * There are no error messages. + * + * ansi2knr recognizes function definitions by seeing a non-keyword + * identifier at the left margin, followed by a left parenthesis, + * with a right parenthesis as the last character on the line, + * and with a left brace as the first token on the following line + * (ignoring possible intervening comments). + * It will recognize a multi-line header provided that no intervening + * line ends with a left or right brace or a semicolon. + * These algorithms ignore whitespace and comments, except that + * the function name must be the first thing on the line. + * The following constructs will confuse it: + * - Any other construct that starts at the left margin and + * follows the above syntax (such as a macro or function call). + * - Some macros that tinker with the syntax of the function header. + */ + +/* + * The original and principal author of ansi2knr is L. Peter Deutsch + * . Other authors are noted in the change history + * that follows (in reverse chronological order): + lpd 96-01-21 added code to cope with not HAVE_CONFIG_H and with + compilers that don't understand void, as suggested by + Tom Lane + lpd 96-01-15 changed to require that the first non-comment token + on the line following a function header be a left brace, + to reduce sensitivity to macros, as suggested by Tom Lane + + lpd 95-06-22 removed #ifndefs whose sole purpose was to define + undefined preprocessor symbols as 0; changed all #ifdefs + for configuration symbols to #ifs + lpd 95-04-05 changed copyright notice to make it clear that + including ansi2knr in a program does not bring the entire + program under the GPL + lpd 94-12-18 added conditionals for systems where ctype macros + don't handle 8-bit characters properly, suggested by + Francois Pinard ; + removed --varargs switch (this is now the default) + lpd 94-10-10 removed CONFIG_BROKETS conditional + lpd 94-07-16 added some conditionals to help GNU `configure', + suggested by Francois Pinard ; + properly erase prototype args in function parameters, + contributed by Jim Avera ; + correct error in writeblanks (it shouldn't erase EOLs) + lpd 89-xx-xx original version + */ + +/* Most of the conditionals here are to make ansi2knr work with */ +/* or without the GNU configure machinery. */ + +#if HAVE_CONFIG_H +# include +#endif + +#include +#include + +#if HAVE_CONFIG_H + +/* + For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h). + This will define HAVE_CONFIG_H and so, activate the following lines. + */ + +# if STDC_HEADERS || HAVE_STRING_H +# include +# else +# include +# endif + +#else /* not HAVE_CONFIG_H */ + +/* Otherwise do it the hard way */ + +# ifdef BSD +# include +# else +# ifdef VMS + extern int strlen(), strncmp(); +# else +# include +# endif +# endif + +#endif /* not HAVE_CONFIG_H */ + +#if STDC_HEADERS +# include +#else +/* + malloc and free should be declared in stdlib.h, + but if you've got a K&R compiler, they probably aren't. + */ +# ifdef MSDOS +# include +# else +# ifdef VMS + extern char *malloc(); + extern void free(); +# else + extern char *malloc(); + extern int free(); +# endif +# endif + +#endif + +/* + * The ctype macros don't always handle 8-bit characters correctly. + * Compensate for this here. + */ +#ifdef isascii +# undef HAVE_ISASCII /* just in case */ +# define HAVE_ISASCII 1 +#else +#endif +#if STDC_HEADERS || !HAVE_ISASCII +# define is_ascii(c) 1 +#else +# define is_ascii(c) isascii(c) +#endif + +#define is_space(c) (is_ascii(c) && isspace(c)) +#define is_alpha(c) (is_ascii(c) && isalpha(c)) +#define is_alnum(c) (is_ascii(c) && isalnum(c)) + +/* Scanning macros */ +#define isidchar(ch) (is_alnum(ch) || (ch) == '_') +#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_') + +/* Forward references */ +char *skipspace(); +int writeblanks(); +int test1(); +int convert1(); + +/* The main program */ +int +main(argc, argv) + int argc; + char *argv[]; +{ FILE *in, *out; +#define bufsize 5000 /* arbitrary size */ + char *buf; + char *line; + char *more; + /* + * In previous versions, ansi2knr recognized a --varargs switch. + * If this switch was supplied, ansi2knr would attempt to convert + * a ... argument to va_alist and va_dcl; if this switch was not + * supplied, ansi2knr would simply drop any such arguments. + * Now, ansi2knr always does this conversion, and we only + * check for this switch for backward compatibility. + */ + int convert_varargs = 1; + + if ( argc > 1 && argv[1][0] == '-' ) + { if ( !strcmp(argv[1], "--varargs") ) + { convert_varargs = 1; + argc--; + argv++; + } + else + { fprintf(stderr, "Unrecognized switch: %s\n", argv[1]); + exit(1); + } + } + switch ( argc ) + { + default: + printf("Usage: ansi2knr input_file [output_file]\n"); + exit(0); + case 2: + out = stdout; + break; + case 3: + out = fopen(argv[2], "w"); + if ( out == NULL ) + { fprintf(stderr, "Cannot open output file %s\n", argv[2]); + exit(1); + } + } + in = fopen(argv[1], "r"); + if ( in == NULL ) + { fprintf(stderr, "Cannot open input file %s\n", argv[1]); + exit(1); + } + fprintf(out, "#line 1 \"%s\"\n", argv[1]); + buf = malloc(bufsize); + line = buf; + while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL ) + { +test: line += strlen(line); + switch ( test1(buf) ) + { + case 2: /* a function header */ + convert1(buf, out, 1, convert_varargs); + break; + case 1: /* a function */ + /* Check for a { at the start of the next line. */ + more = ++line; +f: if ( line >= buf + (bufsize - 1) ) /* overflow check */ + goto wl; + if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL ) + goto wl; + switch ( *skipspace(more, 1) ) + { + case '{': + /* Definitely a function header. */ + convert1(buf, out, 0, convert_varargs); + fputs(more, out); + break; + case 0: + /* The next line was blank or a comment: */ + /* keep scanning for a non-comment. */ + line += strlen(line); + goto f; + default: + /* buf isn't a function header, but */ + /* more might be. */ + fputs(buf, out); + strcpy(buf, more); + line = buf; + goto test; + } + break; + case -1: /* maybe the start of a function */ + if ( line != buf + (bufsize - 1) ) /* overflow check */ + continue; + /* falls through */ + default: /* not a function */ +wl: fputs(buf, out); + break; + } + line = buf; + } + if ( line != buf ) + fputs(buf, out); + free(buf); + fclose(out); + fclose(in); + return 0; +} + +/* Skip over space and comments, in either direction. */ +char * +skipspace(p, dir) + register char *p; + register int dir; /* 1 for forward, -1 for backward */ +{ for ( ; ; ) + { while ( is_space(*p) ) + p += dir; + if ( !(*p == '/' && p[dir] == '*') ) + break; + p += dir; p += dir; + while ( !(*p == '*' && p[dir] == '/') ) + { if ( *p == 0 ) + return p; /* multi-line comment?? */ + p += dir; + } + p += dir; p += dir; + } + return p; +} + +/* + * Write blanks over part of a string. + * Don't overwrite end-of-line characters. + */ +int +writeblanks(start, end) + char *start; + char *end; +{ char *p; + for ( p = start; p < end; p++ ) + if ( *p != '\r' && *p != '\n' ) + *p = ' '; + return 0; +} + +/* + * Test whether the string in buf is a function definition. + * The string may contain and/or end with a newline. + * Return as follows: + * 0 - definitely not a function definition; + * 1 - definitely a function definition; + * 2 - definitely a function prototype (NOT USED); + * -1 - may be the beginning of a function definition, + * append another line and look again. + * The reason we don't attempt to convert function prototypes is that + * Ghostscript's declaration-generating macros look too much like + * prototypes, and confuse the algorithms. + */ +int +test1(buf) + char *buf; +{ register char *p = buf; + char *bend; + char *endfn; + int contin; + + if ( !isidfirstchar(*p) ) + return 0; /* no name at left margin */ + bend = skipspace(buf + strlen(buf) - 1, -1); + switch ( *bend ) + { + case ';': contin = 0 /*2*/; break; + case ')': contin = 1; break; + case '{': return 0; /* not a function */ + case '}': return 0; /* not a function */ + default: contin = -1; + } + while ( isidchar(*p) ) + p++; + endfn = p; + p = skipspace(p, 1); + if ( *p++ != '(' ) + return 0; /* not a function */ + p = skipspace(p, 1); + if ( *p == ')' ) + return 0; /* no parameters */ + /* Check that the apparent function name isn't a keyword. */ + /* We only need to check for keywords that could be followed */ + /* by a left parenthesis (which, unfortunately, is most of them). */ + { static char *words[] = + { "asm", "auto", "case", "char", "const", "double", + "extern", "float", "for", "if", "int", "long", + "register", "return", "short", "signed", "sizeof", + "static", "switch", "typedef", "unsigned", + "void", "volatile", "while", 0 + }; + char **key = words; + char *kp; + int len = endfn - buf; + + while ( (kp = *key) != 0 ) + { if ( strlen(kp) == len && !strncmp(kp, buf, len) ) + return 0; /* name is a keyword */ + key++; + } + } + return contin; +} + +/* Convert a recognized function definition or header to K&R syntax. */ +int +convert1(buf, out, header, convert_varargs) + char *buf; + FILE *out; + int header; /* Boolean */ + int convert_varargs; /* Boolean */ +{ char *endfn; + register char *p; + char **breaks; + unsigned num_breaks = 2; /* for testing */ + char **btop; + char **bp; + char **ap; + char *vararg = 0; + + /* Pre-ANSI implementations don't agree on whether strchr */ + /* is called strchr or index, so we open-code it here. */ + for ( endfn = buf; *(endfn++) != '('; ) + ; +top: p = endfn; + breaks = (char **)malloc(sizeof(char *) * num_breaks * 2); + if ( breaks == 0 ) + { /* Couldn't allocate break table, give up */ + fprintf(stderr, "Unable to allocate break table!\n"); + fputs(buf, out); + return -1; + } + btop = breaks + num_breaks * 2 - 2; + bp = breaks; + /* Parse the argument list */ + do + { int level = 0; + char *lp = NULL; + char *rp; + char *end = NULL; + + if ( bp >= btop ) + { /* Filled up break table. */ + /* Allocate a bigger one and start over. */ + free((char *)breaks); + num_breaks <<= 1; + goto top; + } + *bp++ = p; + /* Find the end of the argument */ + for ( ; end == NULL; p++ ) + { switch(*p) + { + case ',': + if ( !level ) end = p; + break; + case '(': + if ( !level ) lp = p; + level++; + break; + case ')': + if ( --level < 0 ) end = p; + else rp = p; + break; + case '/': + p = skipspace(p, 1) - 1; + break; + default: + ; + } + } + /* Erase any embedded prototype parameters. */ + if ( lp ) + writeblanks(lp + 1, rp); + p--; /* back up over terminator */ + /* Find the name being declared. */ + /* This is complicated because of procedure and */ + /* array modifiers. */ + for ( ; ; ) + { p = skipspace(p - 1, -1); + switch ( *p ) + { + case ']': /* skip array dimension(s) */ + case ')': /* skip procedure args OR name */ + { int level = 1; + while ( level ) + switch ( *--p ) + { + case ']': case ')': level++; break; + case '[': case '(': level--; break; + case '/': p = skipspace(p, -1) + 1; break; + default: ; + } + } + if ( *p == '(' && *skipspace(p + 1, 1) == '*' ) + { /* We found the name being declared */ + while ( !isidfirstchar(*p) ) + p = skipspace(p, 1) + 1; + goto found; + } + break; + default: + goto found; + } + } +found: if ( *p == '.' && p[-1] == '.' && p[-2] == '.' ) + { if ( convert_varargs ) + { *bp++ = "va_alist"; + vararg = p-2; + } + else + { p++; + if ( bp == breaks + 1 ) /* sole argument */ + writeblanks(breaks[0], p); + else + writeblanks(bp[-1] - 1, p); + bp--; + } + } + else + { while ( isidchar(*p) ) p--; + *bp++ = p+1; + } + p = end; + } + while ( *p++ == ',' ); + *bp = p; + /* Make a special check for 'void' arglist */ + if ( bp == breaks+2 ) + { p = skipspace(breaks[0], 1); + if ( !strncmp(p, "void", 4) ) + { p = skipspace(p+4, 1); + if ( p == breaks[2] - 1 ) + { bp = breaks; /* yup, pretend arglist is empty */ + writeblanks(breaks[0], p + 1); + } + } + } + /* Put out the function name and left parenthesis. */ + p = buf; + while ( p != endfn ) putc(*p, out), p++; + /* Put out the declaration. */ + if ( header ) + { fputs(");", out); + for ( p = breaks[0]; *p; p++ ) + if ( *p == '\r' || *p == '\n' ) + putc(*p, out); + } + else + { for ( ap = breaks+1; ap < bp; ap += 2 ) + { p = *ap; + while ( isidchar(*p) ) + putc(*p, out), p++; + if ( ap < bp - 1 ) + fputs(", ", out); + } + fputs(") ", out); + /* Put out the argument declarations */ + for ( ap = breaks+2; ap <= bp; ap += 2 ) + (*ap)[-1] = ';'; + if ( vararg != 0 ) + { *vararg = 0; + fputs(breaks[0], out); /* any prior args */ + fputs("va_dcl", out); /* the final arg */ + fputs(bp[0], out); + } + else + fputs(breaks[0], out); + } + free((char *)breaks); + return 0; +} diff --git a/gtkmm-osx/jpeg-6b/cderror.h b/gtkmm-osx/jpeg-6b/cderror.h new file mode 100644 index 0000000..70435e1 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/cderror.h @@ -0,0 +1,132 @@ +/* + * cderror.h + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the error and message codes for the cjpeg/djpeg + * applications. These strings are not needed as part of the JPEG library + * proper. + * Edit this file to add new codes, or to translate the message strings to + * some other language. + */ + +/* + * To define the enum list of message codes, include this file without + * defining macro JMESSAGE. To create a message string table, include it + * again with a suitable JMESSAGE definition (see jerror.c for an example). + */ +#ifndef JMESSAGE +#ifndef CDERROR_H +#define CDERROR_H +/* First time through, define the enum list */ +#define JMAKE_ENUM_LIST +#else +/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ +#define JMESSAGE(code,string) +#endif /* CDERROR_H */ +#endif /* JMESSAGE */ + +#ifdef JMAKE_ENUM_LIST + +typedef enum { + +#define JMESSAGE(code,string) code , + +#endif /* JMAKE_ENUM_LIST */ + +JMESSAGE(JMSG_FIRSTADDONCODE=1000, NULL) /* Must be first entry! */ + +#ifdef BMP_SUPPORTED +JMESSAGE(JERR_BMP_BADCMAP, "Unsupported BMP colormap format") +JMESSAGE(JERR_BMP_BADDEPTH, "Only 8- and 24-bit BMP files are supported") +JMESSAGE(JERR_BMP_BADHEADER, "Invalid BMP file: bad header length") +JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1") +JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB") +JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported") +JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM") +JMESSAGE(JTRC_BMP, "%ux%u 24-bit BMP image") +JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image") +JMESSAGE(JTRC_BMP_OS2, "%ux%u 24-bit OS2 BMP image") +JMESSAGE(JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image") +#endif /* BMP_SUPPORTED */ + +#ifdef GIF_SUPPORTED +JMESSAGE(JERR_GIF_BUG, "GIF output got confused") +JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d") +JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB") +JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file") +JMESSAGE(JERR_GIF_NOT, "Not a GIF file") +JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image") +JMESSAGE(JTRC_GIF_BADVERSION, + "Warning: unexpected GIF version number '%c%c%c'") +JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x") +JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input") +JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file") +JMESSAGE(JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring") +JMESSAGE(JWRN_GIF_ENDCODE, "Premature end of GIF image") +JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits") +#endif /* GIF_SUPPORTED */ + +#ifdef PPM_SUPPORTED +JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB") +JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file") +JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM file") +JMESSAGE(JTRC_PGM, "%ux%u PGM image") +JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image") +JMESSAGE(JTRC_PPM, "%ux%u PPM image") +JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image") +#endif /* PPM_SUPPORTED */ + +#ifdef RLE_SUPPORTED +JMESSAGE(JERR_RLE_BADERROR, "Bogus error code from RLE library") +JMESSAGE(JERR_RLE_COLORSPACE, "RLE output must be grayscale or RGB") +JMESSAGE(JERR_RLE_DIMENSIONS, "Image dimensions (%ux%u) too large for RLE") +JMESSAGE(JERR_RLE_EMPTY, "Empty RLE file") +JMESSAGE(JERR_RLE_EOF, "Premature EOF in RLE header") +JMESSAGE(JERR_RLE_MEM, "Insufficient memory for RLE header") +JMESSAGE(JERR_RLE_NOT, "Not an RLE file") +JMESSAGE(JERR_RLE_TOOMANYCHANNELS, "Cannot handle %d output channels for RLE") +JMESSAGE(JERR_RLE_UNSUPPORTED, "Cannot handle this RLE setup") +JMESSAGE(JTRC_RLE, "%ux%u full-color RLE file") +JMESSAGE(JTRC_RLE_FULLMAP, "%ux%u full-color RLE file with map of length %d") +JMESSAGE(JTRC_RLE_GRAY, "%ux%u grayscale RLE file") +JMESSAGE(JTRC_RLE_MAPGRAY, "%ux%u grayscale RLE file with map of length %d") +JMESSAGE(JTRC_RLE_MAPPED, "%ux%u colormapped RLE file with map of length %d") +#endif /* RLE_SUPPORTED */ + +#ifdef TARGA_SUPPORTED +JMESSAGE(JERR_TGA_BADCMAP, "Unsupported Targa colormap format") +JMESSAGE(JERR_TGA_BADPARMS, "Invalid or unsupported Targa file") +JMESSAGE(JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB") +JMESSAGE(JTRC_TGA, "%ux%u RGB Targa image") +JMESSAGE(JTRC_TGA_GRAY, "%ux%u grayscale Targa image") +JMESSAGE(JTRC_TGA_MAPPED, "%ux%u colormapped Targa image") +#else +JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled") +#endif /* TARGA_SUPPORTED */ + +JMESSAGE(JERR_BAD_CMAP_FILE, + "Color map file is invalid or of unsupported format") +JMESSAGE(JERR_TOO_MANY_COLORS, + "Output file format cannot handle %d colormap entries") +JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed") +#ifdef TARGA_SUPPORTED +JMESSAGE(JERR_UNKNOWN_FORMAT, + "Unrecognized input file format --- perhaps you need -targa") +#else +JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format") +#endif +JMESSAGE(JERR_UNSUPPORTED_FORMAT, "Unsupported output file format") + +#ifdef JMAKE_ENUM_LIST + + JMSG_LASTADDONCODE +} ADDON_MESSAGE_CODE; + +#undef JMAKE_ENUM_LIST +#endif /* JMAKE_ENUM_LIST */ + +/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ +#undef JMESSAGE diff --git a/gtkmm-osx/jpeg-6b/cdjpeg.c b/gtkmm-osx/jpeg-6b/cdjpeg.c new file mode 100644 index 0000000..b6250ff --- /dev/null +++ b/gtkmm-osx/jpeg-6b/cdjpeg.c @@ -0,0 +1,181 @@ +/* + * cdjpeg.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains common support routines used by the IJG application + * programs (cjpeg, djpeg, jpegtran). + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ +#include /* to declare isupper(), tolower() */ +#ifdef NEED_SIGNAL_CATCHER +#include /* to declare signal() */ +#endif +#ifdef USE_SETMODE +#include /* to declare setmode()'s parameter macros */ +/* If you have setmode() but not , just delete this line: */ +#include /* to declare setmode() */ +#endif + + +/* + * Signal catcher to ensure that temporary files are removed before aborting. + * NB: for Amiga Manx C this is actually a global routine named _abort(); + * we put "#define signal_catcher _abort" in jconfig.h. Talk about bogus... + */ + +#ifdef NEED_SIGNAL_CATCHER + +static j_common_ptr sig_cinfo; + +void /* must be global for Manx C */ +signal_catcher (int signum) +{ + if (sig_cinfo != NULL) { + if (sig_cinfo->err != NULL) /* turn off trace output */ + sig_cinfo->err->trace_level = 0; + jpeg_destroy(sig_cinfo); /* clean up memory allocation & temp files */ + } + exit(EXIT_FAILURE); +} + + +GLOBAL(void) +enable_signal_catcher (j_common_ptr cinfo) +{ + sig_cinfo = cinfo; +#ifdef SIGINT /* not all systems have SIGINT */ + signal(SIGINT, signal_catcher); +#endif +#ifdef SIGTERM /* not all systems have SIGTERM */ + signal(SIGTERM, signal_catcher); +#endif +} + +#endif + + +/* + * Optional progress monitor: display a percent-done figure on stderr. + */ + +#ifdef PROGRESS_REPORT + +METHODDEF(void) +progress_monitor (j_common_ptr cinfo) +{ + cd_progress_ptr prog = (cd_progress_ptr) cinfo->progress; + int total_passes = prog->pub.total_passes + prog->total_extra_passes; + int percent_done = (int) (prog->pub.pass_counter*100L/prog->pub.pass_limit); + + if (percent_done != prog->percent_done) { + prog->percent_done = percent_done; + if (total_passes > 1) { + fprintf(stderr, "\rPass %d/%d: %3d%% ", + prog->pub.completed_passes + prog->completed_extra_passes + 1, + total_passes, percent_done); + } else { + fprintf(stderr, "\r %3d%% ", percent_done); + } + fflush(stderr); + } +} + + +GLOBAL(void) +start_progress_monitor (j_common_ptr cinfo, cd_progress_ptr progress) +{ + /* Enable progress display, unless trace output is on */ + if (cinfo->err->trace_level == 0) { + progress->pub.progress_monitor = progress_monitor; + progress->completed_extra_passes = 0; + progress->total_extra_passes = 0; + progress->percent_done = -1; + cinfo->progress = &progress->pub; + } +} + + +GLOBAL(void) +end_progress_monitor (j_common_ptr cinfo) +{ + /* Clear away progress display */ + if (cinfo->err->trace_level == 0) { + fprintf(stderr, "\r \r"); + fflush(stderr); + } +} + +#endif + + +/* + * Case-insensitive matching of possibly-abbreviated keyword switches. + * keyword is the constant keyword (must be lower case already), + * minchars is length of minimum legal abbreviation. + */ + +GLOBAL(boolean) +keymatch (char * arg, const char * keyword, int minchars) +{ + register int ca, ck; + register int nmatched = 0; + + while ((ca = *arg++) != '\0') { + if ((ck = *keyword++) == '\0') + return FALSE; /* arg longer than keyword, no good */ + if (isupper(ca)) /* force arg to lcase (assume ck is already) */ + ca = tolower(ca); + if (ca != ck) + return FALSE; /* no good */ + nmatched++; /* count matched characters */ + } + /* reached end of argument; fail if it's too short for unique abbrev */ + if (nmatched < minchars) + return FALSE; + return TRUE; /* A-OK */ +} + + +/* + * Routines to establish binary I/O mode for stdin and stdout. + * Non-Unix systems often require some hacking to get out of text mode. + */ + +GLOBAL(FILE *) +read_stdin (void) +{ + FILE * input_file = stdin; + +#ifdef USE_SETMODE /* need to hack file mode? */ + setmode(fileno(stdin), O_BINARY); +#endif +#ifdef USE_FDOPEN /* need to re-open in binary mode? */ + if ((input_file = fdopen(fileno(stdin), READ_BINARY)) == NULL) { + fprintf(stderr, "Cannot reopen stdin\n"); + exit(EXIT_FAILURE); + } +#endif + return input_file; +} + + +GLOBAL(FILE *) +write_stdout (void) +{ + FILE * output_file = stdout; + +#ifdef USE_SETMODE /* need to hack file mode? */ + setmode(fileno(stdout), O_BINARY); +#endif +#ifdef USE_FDOPEN /* need to re-open in binary mode? */ + if ((output_file = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) { + fprintf(stderr, "Cannot reopen stdout\n"); + exit(EXIT_FAILURE); + } +#endif + return output_file; +} diff --git a/gtkmm-osx/jpeg-6b/cdjpeg.h b/gtkmm-osx/jpeg-6b/cdjpeg.h new file mode 100644 index 0000000..2b387b6 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/cdjpeg.h @@ -0,0 +1,184 @@ +/* + * cdjpeg.h + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains common declarations for the sample applications + * cjpeg and djpeg. It is NOT used by the core JPEG library. + */ + +#define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */ +#define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jerror.h" /* get library error codes too */ +#include "cderror.h" /* get application-specific error codes */ + + +/* + * Object interface for cjpeg's source file decoding modules + */ + +typedef struct cjpeg_source_struct * cjpeg_source_ptr; + +struct cjpeg_source_struct { + JMETHOD(void, start_input, (j_compress_ptr cinfo, + cjpeg_source_ptr sinfo)); + JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo, + cjpeg_source_ptr sinfo)); + JMETHOD(void, finish_input, (j_compress_ptr cinfo, + cjpeg_source_ptr sinfo)); + + FILE *input_file; + + JSAMPARRAY buffer; + JDIMENSION buffer_height; +}; + + +/* + * Object interface for djpeg's output file encoding modules + */ + +typedef struct djpeg_dest_struct * djpeg_dest_ptr; + +struct djpeg_dest_struct { + /* start_output is called after jpeg_start_decompress finishes. + * The color map will be ready at this time, if one is needed. + */ + JMETHOD(void, start_output, (j_decompress_ptr cinfo, + djpeg_dest_ptr dinfo)); + /* Emit the specified number of pixel rows from the buffer. */ + JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo, + djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied)); + /* Finish up at the end of the image. */ + JMETHOD(void, finish_output, (j_decompress_ptr cinfo, + djpeg_dest_ptr dinfo)); + + /* Target file spec; filled in by djpeg.c after object is created. */ + FILE * output_file; + + /* Output pixel-row buffer. Created by module init or start_output. + * Width is cinfo->output_width * cinfo->output_components; + * height is buffer_height. + */ + JSAMPARRAY buffer; + JDIMENSION buffer_height; +}; + + +/* + * cjpeg/djpeg may need to perform extra passes to convert to or from + * the source/destination file format. The JPEG library does not know + * about these passes, but we'd like them to be counted by the progress + * monitor. We use an expanded progress monitor object to hold the + * additional pass count. + */ + +struct cdjpeg_progress_mgr { + struct jpeg_progress_mgr pub; /* fields known to JPEG library */ + int completed_extra_passes; /* extra passes completed */ + int total_extra_passes; /* total extra */ + /* last printed percentage stored here to avoid multiple printouts */ + int percent_done; +}; + +typedef struct cdjpeg_progress_mgr * cd_progress_ptr; + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jinit_read_bmp jIRdBMP +#define jinit_write_bmp jIWrBMP +#define jinit_read_gif jIRdGIF +#define jinit_write_gif jIWrGIF +#define jinit_read_ppm jIRdPPM +#define jinit_write_ppm jIWrPPM +#define jinit_read_rle jIRdRLE +#define jinit_write_rle jIWrRLE +#define jinit_read_targa jIRdTarga +#define jinit_write_targa jIWrTarga +#define read_quant_tables RdQTables +#define read_scan_script RdScnScript +#define set_quant_slots SetQSlots +#define set_sample_factors SetSFacts +#define read_color_map RdCMap +#define enable_signal_catcher EnSigCatcher +#define start_progress_monitor StProgMon +#define end_progress_monitor EnProgMon +#define read_stdin RdStdin +#define write_stdout WrStdout +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + +/* Module selection routines for I/O modules. */ + +EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo, + boolean is_os2)); +EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo)); +EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo)); +EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo)); +EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo)); + +/* cjpeg support routines (in rdswitch.c) */ + +EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename, + int scale_factor, boolean force_baseline)); +EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename)); +EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg)); +EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg)); + +/* djpeg support routines (in rdcolmap.c) */ + +EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile)); + +/* common support routines (in cdjpeg.c) */ + +EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo)); +EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo, + cd_progress_ptr progress)); +EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo)); +EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars)); +EXTERN(FILE *) read_stdin JPP((void)); +EXTERN(FILE *) write_stdout JPP((void)); + +/* miscellaneous useful macros */ + +#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ +#define READ_BINARY "r" +#define WRITE_BINARY "w" +#else +#ifdef VMS /* VMS is very nonstandard */ +#define READ_BINARY "rb", "ctx=stm" +#define WRITE_BINARY "wb", "ctx=stm" +#else /* standard ANSI-compliant case */ +#define READ_BINARY "rb" +#define WRITE_BINARY "wb" +#endif +#endif + +#ifndef EXIT_FAILURE /* define exit() codes if not provided */ +#define EXIT_FAILURE 1 +#endif +#ifndef EXIT_SUCCESS +#ifdef VMS +#define EXIT_SUCCESS 1 /* VMS is very nonstandard */ +#else +#define EXIT_SUCCESS 0 +#endif +#endif +#ifndef EXIT_WARNING +#ifdef VMS +#define EXIT_WARNING 1 /* VMS is very nonstandard */ +#else +#define EXIT_WARNING 2 +#endif +#endif diff --git a/gtkmm-osx/jpeg-6b/change.log b/gtkmm-osx/jpeg-6b/change.log new file mode 100644 index 0000000..74102c0 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/change.log @@ -0,0 +1,217 @@ +CHANGE LOG for Independent JPEG Group's JPEG software + + +Version 6b 27-Mar-1998 +----------------------- + +jpegtran has new features for lossless image transformations (rotation +and flipping) as well as "lossless" reduction to grayscale. + +jpegtran now copies comments by default; it has a -copy switch to enable +copying all APPn blocks as well, or to suppress comments. (Formerly it +always suppressed comments and APPn blocks.) jpegtran now also preserves +JFIF version and resolution information. + +New decompressor library feature: COM and APPn markers found in the input +file can be saved in memory for later use by the application. (Before, +you had to code this up yourself with a custom marker processor.) + +There is an unused field "void * client_data" now in compress and decompress +parameter structs; this may be useful in some applications. + +JFIF version number information is now saved by the decoder and accepted by +the encoder. jpegtran uses this to copy the source file's version number, +to ensure "jpegtran -copy all" won't create bogus files that contain JFXX +extensions but claim to be version 1.01. Applications that generate their +own JFXX extension markers also (finally) have a supported way to cause the +encoder to emit JFIF version number 1.02. + +djpeg's trace mode reports JFIF 1.02 thumbnail images as such, rather +than as unknown APP0 markers. + +In -verbose mode, djpeg and rdjpgcom will try to print the contents of +APP12 markers as text. Some digital cameras store useful text information +in APP12 markers. + +Handling of truncated data streams is more robust: blocks beyond the one in +which the error occurs will be output as uniform gray, or left unchanged +if decoding a progressive JPEG. The appearance no longer depends on the +Huffman tables being used. + +Huffman tables are checked for validity much more carefully than before. + +To avoid the Unisys LZW patent, djpeg's GIF output capability has been +changed to produce "uncompressed GIFs", and cjpeg's GIF input capability +has been removed altogether. We're not happy about it either, but there +seems to be no good alternative. + +The configure script now supports building libjpeg as a shared library +on many flavors of Unix (all the ones that GNU libtool knows how to +build shared libraries for). Use "./configure --enable-shared" to +try this out. + +New jconfig file and makefiles for Microsoft Visual C++ and Developer Studio. +Also, a jconfig file and a build script for Metrowerks CodeWarrior +on Apple Macintosh. makefile.dj has been updated for DJGPP v2, and there +are miscellaneous other minor improvements in the makefiles. + +jmemmac.c now knows how to create temporary files following Mac System 7 +conventions. + +djpeg's -map switch is now able to read raw-format PPM files reliably. + +cjpeg -progressive -restart no longer generates any unnecessary DRI markers. + +Multiple calls to jpeg_simple_progression for a single JPEG object +no longer leak memory. + + +Version 6a 7-Feb-96 +-------------------- + +Library initialization sequence modified to detect version mismatches +and struct field packing mismatches between library and calling application. +This change requires applications to be recompiled, but does not require +any application source code change. + +All routine declarations changed to the style "GLOBAL(type) name ...", +that is, GLOBAL, LOCAL, METHODDEF, EXTERN are now macros taking the +routine's return type as an argument. This makes it possible to add +Microsoft-style linkage keywords to all the routines by changing just +these macros. Note that any application code that was using these macros +will have to be changed. + +DCT coefficient quantization tables are now stored in normal array order +rather than zigzag order. Application code that calls jpeg_add_quant_table, +or otherwise manipulates quantization tables directly, will need to be +changed. If you need to make such code work with either older or newer +versions of the library, a test like "#if JPEG_LIB_VERSION >= 61" is +recommended. + +djpeg's trace capability now dumps DQT tables in natural order, not zigzag +order. This allows the trace output to be made into a "-qtables" file +more easily. + +New system-dependent memory manager module for use on Apple Macintosh. + +Fix bug in cjpeg's -smooth option: last one or two scanlines would be +duplicates of the prior line unless the image height mod 16 was 1 or 2. + +Repair minor problems in VMS, BCC, MC6 makefiles. + +New configure script based on latest GNU Autoconf. + +Correct the list of include files needed by MetroWerks C for ccommand(). + +Numerous small documentation updates. + + +Version 6 2-Aug-95 +------------------- + +Progressive JPEG support: library can read and write full progressive JPEG +files. A "buffered image" mode supports incremental decoding for on-the-fly +display of progressive images. Simply recompiling an existing IJG-v5-based +decoder with v6 should allow it to read progressive files, though of course +without any special progressive display. + +New "jpegtran" application performs lossless transcoding between different +JPEG formats; primarily, it can be used to convert baseline to progressive +JPEG and vice versa. In support of jpegtran, the library now allows lossless +reading and writing of JPEG files as DCT coefficient arrays. This ability +may be of use in other applications. + +Notes for programmers: +* We changed jpeg_start_decompress() to be able to suspend; this makes all +decoding modes available to suspending-input applications. However, +existing applications that use suspending input will need to be changed +to check the return value from jpeg_start_decompress(). You don't need to +do anything if you don't use a suspending data source. +* We changed the interface to the virtual array routines: access_virt_array +routines now take a count of the number of rows to access this time. The +last parameter to request_virt_array routines is now interpreted as the +maximum number of rows that may be accessed at once, but not necessarily +the height of every access. + + +Version 5b 15-Mar-95 +--------------------- + +Correct bugs with grayscale images having v_samp_factor > 1. + +jpeg_write_raw_data() now supports output suspension. + +Correct bugs in "configure" script for case of compiling in +a directory other than the one containing the source files. + +Repair bug in jquant1.c: sometimes didn't use as many colors as it could. + +Borland C makefile and jconfig file work under either MS-DOS or OS/2. + +Miscellaneous improvements to documentation. + + +Version 5a 7-Dec-94 +-------------------- + +Changed color conversion roundoff behavior so that grayscale values are +represented exactly. (This causes test image files to change.) + +Make ordered dither use 16x16 instead of 4x4 pattern for a small quality +improvement. + +New configure script based on latest GNU Autoconf. +Fix configure script to handle CFLAGS correctly. +Rename *.auto files to *.cfg, so that configure script still works if +file names have been truncated for DOS. + +Fix bug in rdbmp.c: didn't allow for extra data between header and image. + +Modify rdppm.c/wrppm.c to handle 2-byte raw PPM/PGM formats for 12-bit data. + +Fix several bugs in rdrle.c. + +NEED_SHORT_EXTERNAL_NAMES option was broken. + +Revise jerror.h/jerror.c for more flexibility in message table. + +Repair oversight in jmemname.c NO_MKTEMP case: file could be there +but unreadable. + + +Version 5 24-Sep-94 +-------------------- + +Version 5 represents a nearly complete redesign and rewrite of the IJG +software. Major user-visible changes include: + * Automatic configuration simplifies installation for most Unix systems. + * A range of speed vs. image quality tradeoffs are supported. + This includes resizing of an image during decompression: scaling down + by a factor of 1/2, 1/4, or 1/8 is handled very efficiently. + * New programs rdjpgcom and wrjpgcom allow insertion and extraction + of text comments in a JPEG file. + +The application programmer's interface to the library has changed completely. +Notable improvements include: + * We have eliminated the use of callback routines for handling the + uncompressed image data. The application now sees the library as a + set of routines that it calls to read or write image data on a + scanline-by-scanline basis. + * The application image data is represented in a conventional interleaved- + pixel format, rather than as a separate array for each color channel. + This can save a copying step in many programs. + * The handling of compressed data has been cleaned up: the application can + supply routines to source or sink the compressed data. It is possible to + suspend processing on source/sink buffer overrun, although this is not + supported in all operating modes. + * All static state has been eliminated from the library, so that multiple + instances of compression or decompression can be active concurrently. + * JPEG abbreviated datastream formats are supported, ie, quantization and + Huffman tables can be stored separately from the image data. + * And not only that, but the documentation of the library has improved + considerably! + + +The last widely used release before the version 5 rewrite was version 4A of +18-Feb-93. Change logs before that point have been discarded, since they +are not of much interest after the rewrite. diff --git a/gtkmm-osx/jpeg-6b/cjpeg.1 b/gtkmm-osx/jpeg-6b/cjpeg.1 new file mode 100644 index 0000000..d175a96 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/cjpeg.1 @@ -0,0 +1,292 @@ +.TH CJPEG 1 "20 March 1998" +.SH NAME +cjpeg \- compress an image file to a JPEG file +.SH SYNOPSIS +.B cjpeg +[ +.I options +] +[ +.I filename +] +.LP +.SH DESCRIPTION +.LP +.B cjpeg +compresses the named image file, or the standard input if no file is +named, and produces a JPEG/JFIF file on the standard output. +The currently supported input file formats are: PPM (PBMPLUS color +format), PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster +Toolkit format). (RLE is supported only if the URT library is available.) +.SH OPTIONS +All switch names may be abbreviated; for example, +.B \-grayscale +may be written +.B \-gray +or +.BR \-gr . +Most of the "basic" switches can be abbreviated to as little as one letter. +Upper and lower case are equivalent (thus +.B \-BMP +is the same as +.BR \-bmp ). +British spellings are also accepted (e.g., +.BR \-greyscale ), +though for brevity these are not mentioned below. +.PP +The basic switches are: +.TP +.BI \-quality " N" +Scale quantization tables to adjust image quality. Quality is 0 (worst) to +100 (best); default is 75. (See below for more info.) +.TP +.B \-grayscale +Create monochrome JPEG file from color input. Be sure to use this switch when +compressing a grayscale BMP file, because +.B cjpeg +isn't bright enough to notice whether a BMP file uses only shades of gray. +By saying +.BR \-grayscale , +you'll get a smaller JPEG file that takes less time to process. +.TP +.B \-optimize +Perform optimization of entropy encoding parameters. Without this, default +encoding parameters are used. +.B \-optimize +usually makes the JPEG file a little smaller, but +.B cjpeg +runs somewhat slower and needs much more memory. Image quality and speed of +decompression are unaffected by +.BR \-optimize . +.TP +.B \-progressive +Create progressive JPEG file (see below). +.TP +.B \-targa +Input file is Targa format. Targa files that contain an "identification" +field will not be automatically recognized by +.BR cjpeg ; +for such files you must specify +.B \-targa +to make +.B cjpeg +treat the input as Targa format. +For most Targa files, you won't need this switch. +.PP +The +.B \-quality +switch lets you trade off compressed file size against quality of the +reconstructed image: the higher the quality setting, the larger the JPEG file, +and the closer the output image will be to the original input. Normally you +want to use the lowest quality setting (smallest file) that decompresses into +something visually indistinguishable from the original image. For this +purpose the quality setting should be between 50 and 95; the default of 75 is +often about right. If you see defects at +.B \-quality +75, then go up 5 or 10 counts at a time until you are happy with the output +image. (The optimal setting will vary from one image to another.) +.PP +.B \-quality +100 will generate a quantization table of all 1's, minimizing loss in the +quantization step (but there is still information loss in subsampling, as well +as roundoff error). This setting is mainly of interest for experimental +purposes. Quality values above about 95 are +.B not +recommended for normal use; the compressed file size goes up dramatically for +hardly any gain in output image quality. +.PP +In the other direction, quality values below 50 will produce very small files +of low image quality. Settings around 5 to 10 might be useful in preparing an +index of a large image library, for example. Try +.B \-quality +2 (or so) for some amusing Cubist effects. (Note: quality +values below about 25 generate 2-byte quantization tables, which are +considered optional in the JPEG standard. +.B cjpeg +emits a warning message when you give such a quality value, because some +other JPEG programs may be unable to decode the resulting file. Use +.B \-baseline +if you need to ensure compatibility at low quality values.) +.PP +The +.B \-progressive +switch creates a "progressive JPEG" file. In this type of JPEG file, the data +is stored in multiple scans of increasing quality. If the file is being +transmitted over a slow communications link, the decoder can use the first +scan to display a low-quality image very quickly, and can then improve the +display with each subsequent scan. The final image is exactly equivalent to a +standard JPEG file of the same quality setting, and the total file size is +about the same --- often a little smaller. +.B Caution: +progressive JPEG is not yet widely implemented, so many decoders will be +unable to view a progressive JPEG file at all. +.PP +Switches for advanced users: +.TP +.B \-dct int +Use integer DCT method (default). +.TP +.B \-dct fast +Use fast integer DCT (less accurate). +.TP +.B \-dct float +Use floating-point DCT method. +The float method is very slightly more accurate than the int method, but is +much slower unless your machine has very fast floating-point hardware. Also +note that results of the floating-point method may vary slightly across +machines, while the integer methods should give the same results everywhere. +The fast integer method is much less accurate than the other two. +.TP +.BI \-restart " N" +Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is +attached to the number. +.B \-restart 0 +(the default) means no restart markers. +.TP +.BI \-smooth " N" +Smooth the input image to eliminate dithering noise. N, ranging from 1 to +100, indicates the strength of smoothing. 0 (the default) means no smoothing. +.TP +.BI \-maxmemory " N" +Set limit for amount of memory to use in processing large images. Value is +in thousands of bytes, or millions of bytes if "M" is attached to the +number. For example, +.B \-max 4m +selects 4000000 bytes. If more space is needed, temporary files will be used. +.TP +.BI \-outfile " name" +Send output image to the named file, not to standard output. +.TP +.B \-verbose +Enable debug printout. More +.BR \-v 's +give more output. Also, version information is printed at startup. +.TP +.B \-debug +Same as +.BR \-verbose . +.PP +The +.B \-restart +option inserts extra markers that allow a JPEG decoder to resynchronize after +a transmission error. Without restart markers, any damage to a compressed +file will usually ruin the image from the point of the error to the end of the +image; with restart markers, the damage is usually confined to the portion of +the image up to the next restart marker. Of course, the restart markers +occupy extra space. We recommend +.B \-restart 1 +for images that will be transmitted across unreliable networks such as Usenet. +.PP +The +.B \-smooth +option filters the input to eliminate fine-scale noise. This is often useful +when converting dithered images to JPEG: a moderate smoothing factor of 10 to +50 gets rid of dithering patterns in the input file, resulting in a smaller +JPEG file and a better-looking image. Too large a smoothing factor will +visibly blur the image, however. +.PP +Switches for wizards: +.TP +.B \-baseline +Force baseline-compatible quantization tables to be generated. This clamps +quantization values to 8 bits even at low quality settings. (This switch is +poorly named, since it does not ensure that the output is actually baseline +JPEG. For example, you can use +.B \-baseline +and +.B \-progressive +together.) +.TP +.BI \-qtables " file" +Use the quantization tables given in the specified text file. +.TP +.BI \-qslots " N[,...]" +Select which quantization table to use for each color component. +.TP +.BI \-sample " HxV[,...]" +Set JPEG sampling factors for each color component. +.TP +.BI \-scans " file" +Use the scan script given in the specified text file. +.PP +The "wizard" switches are intended for experimentation with JPEG. If you +don't know what you are doing, \fBdon't use them\fR. These switches are +documented further in the file wizard.doc. +.SH EXAMPLES +.LP +This example compresses the PPM file foo.ppm with a quality factor of +60 and saves the output as foo.jpg: +.IP +.B cjpeg \-quality +.I 60 foo.ppm +.B > +.I foo.jpg +.SH HINTS +Color GIF files are not the ideal input for JPEG; JPEG is really intended for +compressing full-color (24-bit) images. In particular, don't try to convert +cartoons, line drawings, and other images that have only a few distinct +colors. GIF works great on these, JPEG does not. If you want to convert a +GIF to JPEG, you should experiment with +.BR cjpeg 's +.B \-quality +and +.B \-smooth +options to get a satisfactory conversion. +.B \-smooth 10 +or so is often helpful. +.PP +Avoid running an image through a series of JPEG compression/decompression +cycles. Image quality loss will accumulate; after ten or so cycles the image +may be noticeably worse than it was after one cycle. It's best to use a +lossless format while manipulating an image, then convert to JPEG format when +you are ready to file the image away. +.PP +The +.B \-optimize +option to +.B cjpeg +is worth using when you are making a "final" version for posting or archiving. +It's also a win when you are using low quality settings to make very small +JPEG files; the percentage improvement is often a lot more than it is on +larger files. (At present, +.B \-optimize +mode is always selected when generating progressive JPEG files.) +.SH ENVIRONMENT +.TP +.B JPEGMEM +If this environment variable is set, its value is the default memory limit. +The value is specified as described for the +.B \-maxmemory +switch. +.B JPEGMEM +overrides the default value specified when the program was compiled, and +itself is overridden by an explicit +.BR \-maxmemory . +.SH SEE ALSO +.BR djpeg (1), +.BR jpegtran (1), +.BR rdjpgcom (1), +.BR wrjpgcom (1) +.br +.BR ppm (5), +.BR pgm (5) +.br +Wallace, Gregory K. "The JPEG Still Picture Compression Standard", +Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. +.SH AUTHOR +Independent JPEG Group +.SH BUGS +Arithmetic coding is not supported for legal reasons. +.PP +GIF input files are no longer supported, to avoid the Unisys LZW patent. +Use a Unisys-licensed program if you need to read a GIF file. (Conversion +of GIF files to JPEG is usually a bad idea anyway.) +.PP +Not all variants of BMP and Targa file formats are supported. +.PP +The +.B \-targa +switch is not a bug, it's a feature. (It would be a bug if the Targa format +designers had not been clueless.) +.PP +Still not as fast as we'd like. diff --git a/gtkmm-osx/jpeg-6b/cjpeg.c b/gtkmm-osx/jpeg-6b/cjpeg.c new file mode 100644 index 0000000..f2a929f --- /dev/null +++ b/gtkmm-osx/jpeg-6b/cjpeg.c @@ -0,0 +1,606 @@ +/* + * cjpeg.c + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a command-line user interface for the JPEG compressor. + * It should work on any system with Unix- or MS-DOS-style command lines. + * + * Two different command line styles are permitted, depending on the + * compile-time switch TWO_FILE_COMMANDLINE: + * cjpeg [options] inputfile outputfile + * cjpeg [options] [inputfile] + * In the second style, output is always to standard output, which you'd + * normally redirect to a file or pipe to some other program. Input is + * either from a named file or from standard input (typically redirected). + * The second style is convenient on Unix but is unhelpful on systems that + * don't support pipes. Also, you MUST use the first style if your system + * doesn't do binary I/O to stdin/stdout. + * To simplify script writing, the "-outfile" switch is provided. The syntax + * cjpeg [options] -outfile outputfile inputfile + * works regardless of which command line style is used. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ +#include "jversion.h" /* for version message */ + +#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ +#ifdef __MWERKS__ +#include /* Metrowerks needs this */ +#include /* ... and this */ +#endif +#ifdef THINK_C +#include /* Think declares it here */ +#endif +#endif + + +/* Create the add-on message string table. */ + +#define JMESSAGE(code,string) string , + +static const char * const cdjpeg_message_table[] = { +#include "cderror.h" + NULL +}; + + +/* + * This routine determines what format the input file is, + * and selects the appropriate input-reading module. + * + * To determine which family of input formats the file belongs to, + * we may look only at the first byte of the file, since C does not + * guarantee that more than one character can be pushed back with ungetc. + * Looking at additional bytes would require one of these approaches: + * 1) assume we can fseek() the input file (fails for piped input); + * 2) assume we can push back more than one character (works in + * some C implementations, but unportable); + * 3) provide our own buffering (breaks input readers that want to use + * stdio directly, such as the RLE library); + * or 4) don't put back the data, and modify the input_init methods to assume + * they start reading after the start of file (also breaks RLE library). + * #1 is attractive for MS-DOS but is untenable on Unix. + * + * The most portable solution for file types that can't be identified by their + * first byte is to make the user tell us what they are. This is also the + * only approach for "raw" file types that contain only arbitrary values. + * We presently apply this method for Targa files. Most of the time Targa + * files start with 0x00, so we recognize that case. Potentially, however, + * a Targa file could start with any byte value (byte 0 is the length of the + * seldom-used ID field), so we provide a switch to force Targa input mode. + */ + +static boolean is_targa; /* records user -targa switch */ + + +LOCAL(cjpeg_source_ptr) +select_file_type (j_compress_ptr cinfo, FILE * infile) +{ + int c; + + if (is_targa) { +#ifdef TARGA_SUPPORTED + return jinit_read_targa(cinfo); +#else + ERREXIT(cinfo, JERR_TGA_NOTCOMP); +#endif + } + + if ((c = getc(infile)) == EOF) + ERREXIT(cinfo, JERR_INPUT_EMPTY); + if (ungetc(c, infile) == EOF) + ERREXIT(cinfo, JERR_UNGETC_FAILED); + + switch (c) { +#ifdef BMP_SUPPORTED + case 'B': + return jinit_read_bmp(cinfo); +#endif +#ifdef GIF_SUPPORTED + case 'G': + return jinit_read_gif(cinfo); +#endif +#ifdef PPM_SUPPORTED + case 'P': + return jinit_read_ppm(cinfo); +#endif +#ifdef RLE_SUPPORTED + case 'R': + return jinit_read_rle(cinfo); +#endif +#ifdef TARGA_SUPPORTED + case 0x00: + return jinit_read_targa(cinfo); +#endif + default: + ERREXIT(cinfo, JERR_UNKNOWN_FORMAT); + break; + } + + return NULL; /* suppress compiler warnings */ +} + + +/* + * Argument-parsing code. + * The switch parser is designed to be useful with DOS-style command line + * syntax, ie, intermixed switches and file names, where only the switches + * to the left of a given file name affect processing of that file. + * The main program in this file doesn't actually use this capability... + */ + + +static const char * progname; /* program name for error messages */ +static char * outfilename; /* for -outfile switch */ + + +LOCAL(void) +usage (void) +/* complain about bad command line */ +{ + fprintf(stderr, "usage: %s [switches] ", progname); +#ifdef TWO_FILE_COMMANDLINE + fprintf(stderr, "inputfile outputfile\n"); +#else + fprintf(stderr, "[inputfile]\n"); +#endif + + fprintf(stderr, "Switches (names may be abbreviated):\n"); + fprintf(stderr, " -quality N Compression quality (0..100; 5-95 is useful range)\n"); + fprintf(stderr, " -grayscale Create monochrome JPEG file\n"); +#ifdef ENTROPY_OPT_SUPPORTED + fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n"); +#endif +#ifdef C_PROGRESSIVE_SUPPORTED + fprintf(stderr, " -progressive Create progressive JPEG file\n"); +#endif +#ifdef TARGA_SUPPORTED + fprintf(stderr, " -targa Input file is Targa format (usually not needed)\n"); +#endif + fprintf(stderr, "Switches for advanced users:\n"); +#ifdef DCT_ISLOW_SUPPORTED + fprintf(stderr, " -dct int Use integer DCT method%s\n", + (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : "")); +#endif +#ifdef DCT_IFAST_SUPPORTED + fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n", + (JDCT_DEFAULT == JDCT_IFAST ? " (default)" : "")); +#endif +#ifdef DCT_FLOAT_SUPPORTED + fprintf(stderr, " -dct float Use floating-point DCT method%s\n", + (JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : "")); +#endif + fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n"); +#ifdef INPUT_SMOOTHING_SUPPORTED + fprintf(stderr, " -smooth N Smooth dithered input (N=1..100 is strength)\n"); +#endif + fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); + fprintf(stderr, " -outfile name Specify name for output file\n"); + fprintf(stderr, " -verbose or -debug Emit debug output\n"); + fprintf(stderr, "Switches for wizards:\n"); +#ifdef C_ARITH_CODING_SUPPORTED + fprintf(stderr, " -arithmetic Use arithmetic coding\n"); +#endif + fprintf(stderr, " -baseline Force baseline quantization tables\n"); + fprintf(stderr, " -qtables file Use quantization tables given in file\n"); + fprintf(stderr, " -qslots N[,...] Set component quantization tables\n"); + fprintf(stderr, " -sample HxV[,...] Set component sampling factors\n"); +#ifdef C_MULTISCAN_FILES_SUPPORTED + fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n"); +#endif + exit(EXIT_FAILURE); +} + + +LOCAL(int) +parse_switches (j_compress_ptr cinfo, int argc, char **argv, + int last_file_arg_seen, boolean for_real) +/* Parse optional switches. + * Returns argv[] index of first file-name argument (== argc if none). + * Any file names with indexes <= last_file_arg_seen are ignored; + * they have presumably been processed in a previous iteration. + * (Pass 0 for last_file_arg_seen on the first or only iteration.) + * for_real is FALSE on the first (dummy) pass; we may skip any expensive + * processing. + */ +{ + int argn; + char * arg; + int quality; /* -quality parameter */ + int q_scale_factor; /* scaling percentage for -qtables */ + boolean force_baseline; + boolean simple_progressive; + char * qtablefile = NULL; /* saves -qtables filename if any */ + char * qslotsarg = NULL; /* saves -qslots parm if any */ + char * samplearg = NULL; /* saves -sample parm if any */ + char * scansarg = NULL; /* saves -scans parm if any */ + + /* Set up default JPEG parameters. */ + /* Note that default -quality level need not, and does not, + * match the default scaling for an explicit -qtables argument. + */ + quality = 75; /* default -quality value */ + q_scale_factor = 100; /* default to no scaling for -qtables */ + force_baseline = FALSE; /* by default, allow 16-bit quantizers */ + simple_progressive = FALSE; + is_targa = FALSE; + outfilename = NULL; + cinfo->err->trace_level = 0; + + /* Scan command line options, adjust parameters */ + + for (argn = 1; argn < argc; argn++) { + arg = argv[argn]; + if (*arg != '-') { + /* Not a switch, must be a file name argument */ + if (argn <= last_file_arg_seen) { + outfilename = NULL; /* -outfile applies to just one input file */ + continue; /* ignore this name if previously processed */ + } + break; /* else done parsing switches */ + } + arg++; /* advance past switch marker character */ + + if (keymatch(arg, "arithmetic", 1)) { + /* Use arithmetic coding. */ +#ifdef C_ARITH_CODING_SUPPORTED + cinfo->arith_code = TRUE; +#else + fprintf(stderr, "%s: sorry, arithmetic coding not supported\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else if (keymatch(arg, "baseline", 1)) { + /* Force baseline-compatible output (8-bit quantizer values). */ + force_baseline = TRUE; + + } else if (keymatch(arg, "dct", 2)) { + /* Select DCT algorithm. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + if (keymatch(argv[argn], "int", 1)) { + cinfo->dct_method = JDCT_ISLOW; + } else if (keymatch(argv[argn], "fast", 2)) { + cinfo->dct_method = JDCT_IFAST; + } else if (keymatch(argv[argn], "float", 2)) { + cinfo->dct_method = JDCT_FLOAT; + } else + usage(); + + } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) { + /* Enable debug printouts. */ + /* On first -d, print version identification */ + static boolean printed_version = FALSE; + + if (! printed_version) { + fprintf(stderr, "Independent JPEG Group's CJPEG, version %s\n%s\n", + JVERSION, JCOPYRIGHT); + printed_version = TRUE; + } + cinfo->err->trace_level++; + + } else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) { + /* Force a monochrome JPEG file to be generated. */ + jpeg_set_colorspace(cinfo, JCS_GRAYSCALE); + + } else if (keymatch(arg, "maxmemory", 3)) { + /* Maximum memory in Kb (or Mb with 'm'). */ + long lval; + char ch = 'x'; + + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) + usage(); + if (ch == 'm' || ch == 'M') + lval *= 1000L; + cinfo->mem->max_memory_to_use = lval * 1000L; + + } else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) { + /* Enable entropy parm optimization. */ +#ifdef ENTROPY_OPT_SUPPORTED + cinfo->optimize_coding = TRUE; +#else + fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else if (keymatch(arg, "outfile", 4)) { + /* Set output file name. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + outfilename = argv[argn]; /* save it away for later use */ + + } else if (keymatch(arg, "progressive", 1)) { + /* Select simple progressive mode. */ +#ifdef C_PROGRESSIVE_SUPPORTED + simple_progressive = TRUE; + /* We must postpone execution until num_components is known. */ +#else + fprintf(stderr, "%s: sorry, progressive output was not compiled\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else if (keymatch(arg, "quality", 1)) { + /* Quality factor (quantization table scaling factor). */ + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%d", &quality) != 1) + usage(); + /* Change scale factor in case -qtables is present. */ + q_scale_factor = jpeg_quality_scaling(quality); + + } else if (keymatch(arg, "qslots", 2)) { + /* Quantization table slot numbers. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + qslotsarg = argv[argn]; + /* Must delay setting qslots until after we have processed any + * colorspace-determining switches, since jpeg_set_colorspace sets + * default quant table numbers. + */ + + } else if (keymatch(arg, "qtables", 2)) { + /* Quantization tables fetched from file. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + qtablefile = argv[argn]; + /* We postpone actually reading the file in case -quality comes later. */ + + } else if (keymatch(arg, "restart", 1)) { + /* Restart interval in MCU rows (or in MCUs with 'b'). */ + long lval; + char ch = 'x'; + + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) + usage(); + if (lval < 0 || lval > 65535L) + usage(); + if (ch == 'b' || ch == 'B') { + cinfo->restart_interval = (unsigned int) lval; + cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */ + } else { + cinfo->restart_in_rows = (int) lval; + /* restart_interval will be computed during startup */ + } + + } else if (keymatch(arg, "sample", 2)) { + /* Set sampling factors. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + samplearg = argv[argn]; + /* Must delay setting sample factors until after we have processed any + * colorspace-determining switches, since jpeg_set_colorspace sets + * default sampling factors. + */ + + } else if (keymatch(arg, "scans", 2)) { + /* Set scan script. */ +#ifdef C_MULTISCAN_FILES_SUPPORTED + if (++argn >= argc) /* advance to next argument */ + usage(); + scansarg = argv[argn]; + /* We must postpone reading the file in case -progressive appears. */ +#else + fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else if (keymatch(arg, "smooth", 2)) { + /* Set input smoothing factor. */ + int val; + + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%d", &val) != 1) + usage(); + if (val < 0 || val > 100) + usage(); + cinfo->smoothing_factor = val; + + } else if (keymatch(arg, "targa", 1)) { + /* Input file is Targa format. */ + is_targa = TRUE; + + } else { + usage(); /* bogus switch */ + } + } + + /* Post-switch-scanning cleanup */ + + if (for_real) { + + /* Set quantization tables for selected quality. */ + /* Some or all may be overridden if -qtables is present. */ + jpeg_set_quality(cinfo, quality, force_baseline); + + if (qtablefile != NULL) /* process -qtables if it was present */ + if (! read_quant_tables(cinfo, qtablefile, + q_scale_factor, force_baseline)) + usage(); + + if (qslotsarg != NULL) /* process -qslots if it was present */ + if (! set_quant_slots(cinfo, qslotsarg)) + usage(); + + if (samplearg != NULL) /* process -sample if it was present */ + if (! set_sample_factors(cinfo, samplearg)) + usage(); + +#ifdef C_PROGRESSIVE_SUPPORTED + if (simple_progressive) /* process -progressive; -scans can override */ + jpeg_simple_progression(cinfo); +#endif + +#ifdef C_MULTISCAN_FILES_SUPPORTED + if (scansarg != NULL) /* process -scans if it was present */ + if (! read_scan_script(cinfo, scansarg)) + usage(); +#endif + } + + return argn; /* return index of next arg (file name) */ +} + + +/* + * The main program. + */ + +int +main (int argc, char **argv) +{ + struct jpeg_compress_struct cinfo; + struct jpeg_error_mgr jerr; +#ifdef PROGRESS_REPORT + struct cdjpeg_progress_mgr progress; +#endif + int file_index; + cjpeg_source_ptr src_mgr; + FILE * input_file; + FILE * output_file; + JDIMENSION num_scanlines; + + /* On Mac, fetch a command line. */ +#ifdef USE_CCOMMAND + argc = ccommand(&argv); +#endif + + progname = argv[0]; + if (progname == NULL || progname[0] == 0) + progname = "cjpeg"; /* in case C library doesn't provide it */ + + /* Initialize the JPEG compression object with default error handling. */ + cinfo.err = jpeg_std_error(&jerr); + jpeg_create_compress(&cinfo); + /* Add some application-specific error messages (from cderror.h) */ + jerr.addon_message_table = cdjpeg_message_table; + jerr.first_addon_message = JMSG_FIRSTADDONCODE; + jerr.last_addon_message = JMSG_LASTADDONCODE; + + /* Now safe to enable signal catcher. */ +#ifdef NEED_SIGNAL_CATCHER + enable_signal_catcher((j_common_ptr) &cinfo); +#endif + + /* Initialize JPEG parameters. + * Much of this may be overridden later. + * In particular, we don't yet know the input file's color space, + * but we need to provide some value for jpeg_set_defaults() to work. + */ + + cinfo.in_color_space = JCS_RGB; /* arbitrary guess */ + jpeg_set_defaults(&cinfo); + + /* Scan command line to find file names. + * It is convenient to use just one switch-parsing routine, but the switch + * values read here are ignored; we will rescan the switches after opening + * the input file. + */ + + file_index = parse_switches(&cinfo, argc, argv, 0, FALSE); + +#ifdef TWO_FILE_COMMANDLINE + /* Must have either -outfile switch or explicit output file name */ + if (outfilename == NULL) { + if (file_index != argc-2) { + fprintf(stderr, "%s: must name one input and one output file\n", + progname); + usage(); + } + outfilename = argv[file_index+1]; + } else { + if (file_index != argc-1) { + fprintf(stderr, "%s: must name one input and one output file\n", + progname); + usage(); + } + } +#else + /* Unix style: expect zero or one file name */ + if (file_index < argc-1) { + fprintf(stderr, "%s: only one input file\n", progname); + usage(); + } +#endif /* TWO_FILE_COMMANDLINE */ + + /* Open the input file. */ + if (file_index < argc) { + if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]); + exit(EXIT_FAILURE); + } + } else { + /* default input file is stdin */ + input_file = read_stdin(); + } + + /* Open the output file. */ + if (outfilename != NULL) { + if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, outfilename); + exit(EXIT_FAILURE); + } + } else { + /* default output file is stdout */ + output_file = write_stdout(); + } + +#ifdef PROGRESS_REPORT + start_progress_monitor((j_common_ptr) &cinfo, &progress); +#endif + + /* Figure out the input file format, and set up to read it. */ + src_mgr = select_file_type(&cinfo, input_file); + src_mgr->input_file = input_file; + + /* Read the input file header to obtain file size & colorspace. */ + (*src_mgr->start_input) (&cinfo, src_mgr); + + /* Now that we know input colorspace, fix colorspace-dependent defaults */ + jpeg_default_colorspace(&cinfo); + + /* Adjust default compression parameters by re-parsing the options */ + file_index = parse_switches(&cinfo, argc, argv, 0, TRUE); + + /* Specify data destination for compression */ + jpeg_stdio_dest(&cinfo, output_file); + + /* Start compressor */ + jpeg_start_compress(&cinfo, TRUE); + + /* Process data */ + while (cinfo.next_scanline < cinfo.image_height) { + num_scanlines = (*src_mgr->get_pixel_rows) (&cinfo, src_mgr); + (void) jpeg_write_scanlines(&cinfo, src_mgr->buffer, num_scanlines); + } + + /* Finish compression and release memory */ + (*src_mgr->finish_input) (&cinfo, src_mgr); + jpeg_finish_compress(&cinfo); + jpeg_destroy_compress(&cinfo); + + /* Close files, if we opened them */ + if (input_file != stdin) + fclose(input_file); + if (output_file != stdout) + fclose(output_file); + +#ifdef PROGRESS_REPORT + end_progress_monitor((j_common_ptr) &cinfo); +#endif + + /* All done. */ + exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS); + return 0; /* suppress no-return-value warnings */ +} diff --git a/gtkmm-osx/jpeg-6b/ckconfig.c b/gtkmm-osx/jpeg-6b/ckconfig.c new file mode 100644 index 0000000..34baf79 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/ckconfig.c @@ -0,0 +1,402 @@ +/* + * ckconfig.c + * + * Copyright (C) 1991-1994, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + */ + +/* + * This program is intended to help you determine how to configure the JPEG + * software for installation on a particular system. The idea is to try to + * compile and execute this program. If your compiler fails to compile the + * program, make changes as indicated in the comments below. Once you can + * compile the program, run it, and it will produce a "jconfig.h" file for + * your system. + * + * As a general rule, each time you try to compile this program, + * pay attention only to the *first* error message you get from the compiler. + * Many C compilers will issue lots of spurious error messages once they + * have gotten confused. Go to the line indicated in the first error message, + * and read the comments preceding that line to see what to change. + * + * Almost all of the edits you may need to make to this program consist of + * changing a line that reads "#define SOME_SYMBOL" to "#undef SOME_SYMBOL", + * or vice versa. This is called defining or undefining that symbol. + */ + + +/* First we must see if your system has the include files we need. + * We start out with the assumption that your system has all the ANSI-standard + * include files. If you get any error trying to include one of these files, + * undefine the corresponding HAVE_xxx symbol. + */ + +#define HAVE_STDDEF_H /* replace 'define' by 'undef' if error here */ +#ifdef HAVE_STDDEF_H /* next line will be skipped if you undef... */ +#include +#endif + +#define HAVE_STDLIB_H /* same thing for stdlib.h */ +#ifdef HAVE_STDLIB_H +#include +#endif + +#include /* If you ain't got this, you ain't got C. */ + +/* We have to see if your string functions are defined by + * strings.h (old BSD convention) or string.h (everybody else). + * We try the non-BSD convention first; define NEED_BSD_STRINGS + * if the compiler says it can't find string.h. + */ + +#undef NEED_BSD_STRINGS + +#ifdef NEED_BSD_STRINGS +#include +#else +#include +#endif + +/* On some systems (especially older Unix machines), type size_t is + * defined only in the include file . If you get a failure + * on the size_t test below, try defining NEED_SYS_TYPES_H. + */ + +#undef NEED_SYS_TYPES_H /* start by assuming we don't need it */ +#ifdef NEED_SYS_TYPES_H +#include +#endif + + +/* Usually type size_t is defined in one of the include files we've included + * above. If not, you'll get an error on the "typedef size_t my_size_t;" line. + * In that case, first try defining NEED_SYS_TYPES_H just above. + * If that doesn't work, you'll have to search through your system library + * to figure out which include file defines "size_t". Look for a line that + * says "typedef something-or-other size_t;". Then, change the line below + * that says "#include " to instead include the file + * you found size_t in, and define NEED_SPECIAL_INCLUDE. If you can't find + * type size_t anywhere, try replacing "#include " with + * "typedef unsigned int size_t;". + */ + +#undef NEED_SPECIAL_INCLUDE /* assume we DON'T need it, for starters */ + +#ifdef NEED_SPECIAL_INCLUDE +#include +#endif + +typedef size_t my_size_t; /* The payoff: do we have size_t now? */ + + +/* The next question is whether your compiler supports ANSI-style function + * prototypes. You need to know this in order to choose between using + * makefile.ansi and using makefile.unix. + * The #define line below is set to assume you have ANSI function prototypes. + * If you get an error in this group of lines, undefine HAVE_PROTOTYPES. + */ + +#define HAVE_PROTOTYPES + +#ifdef HAVE_PROTOTYPES +int testfunction (int arg1, int * arg2); /* check prototypes */ + +struct methods_struct { /* check method-pointer declarations */ + int (*error_exit) (char *msgtext); + int (*trace_message) (char *msgtext); + int (*another_method) (void); +}; + +int testfunction (int arg1, int * arg2) /* check definitions */ +{ + return arg2[arg1]; +} + +int test2function (void) /* check void arg list */ +{ + return 0; +} +#endif + + +/* Now we want to find out if your compiler knows what "unsigned char" means. + * If you get an error on the "unsigned char un_char;" line, + * then undefine HAVE_UNSIGNED_CHAR. + */ + +#define HAVE_UNSIGNED_CHAR + +#ifdef HAVE_UNSIGNED_CHAR +unsigned char un_char; +#endif + + +/* Now we want to find out if your compiler knows what "unsigned short" means. + * If you get an error on the "unsigned short un_short;" line, + * then undefine HAVE_UNSIGNED_SHORT. + */ + +#define HAVE_UNSIGNED_SHORT + +#ifdef HAVE_UNSIGNED_SHORT +unsigned short un_short; +#endif + + +/* Now we want to find out if your compiler understands type "void". + * If you get an error anywhere in here, undefine HAVE_VOID. + */ + +#define HAVE_VOID + +#ifdef HAVE_VOID +/* Caution: a C++ compiler will insist on complete prototypes */ +typedef void * void_ptr; /* check void * */ +#ifdef HAVE_PROTOTYPES /* check ptr to function returning void */ +typedef void (*void_func) (int a, int b); +#else +typedef void (*void_func) (); +#endif + +#ifdef HAVE_PROTOTYPES /* check void function result */ +void test3function (void_ptr arg1, void_func arg2) +#else +void test3function (arg1, arg2) + void_ptr arg1; + void_func arg2; +#endif +{ + char * locptr = (char *) arg1; /* check casting to and from void * */ + arg1 = (void *) locptr; + (*arg2) (1, 2); /* check call of fcn returning void */ +} +#endif + + +/* Now we want to find out if your compiler knows what "const" means. + * If you get an error here, undefine HAVE_CONST. + */ + +#define HAVE_CONST + +#ifdef HAVE_CONST +static const int carray[3] = {1, 2, 3}; + +#ifdef HAVE_PROTOTYPES +int test4function (const int arg1) +#else +int test4function (arg1) + const int arg1; +#endif +{ + return carray[arg1]; +} +#endif + + +/* If you get an error or warning about this structure definition, + * define INCOMPLETE_TYPES_BROKEN. + */ + +#undef INCOMPLETE_TYPES_BROKEN + +#ifndef INCOMPLETE_TYPES_BROKEN +typedef struct undefined_structure * undef_struct_ptr; +#endif + + +/* If you get an error about duplicate names, + * define NEED_SHORT_EXTERNAL_NAMES. + */ + +#undef NEED_SHORT_EXTERNAL_NAMES + +#ifndef NEED_SHORT_EXTERNAL_NAMES + +int possibly_duplicate_function () +{ + return 0; +} + +int possibly_dupli_function () +{ + return 1; +} + +#endif + + + +/************************************************************************ + * OK, that's it. You should not have to change anything beyond this + * point in order to compile and execute this program. (You might get + * some warnings, but you can ignore them.) + * When you run the program, it will make a couple more tests that it + * can do automatically, and then it will create jconfig.h and print out + * any additional suggestions it has. + ************************************************************************ + */ + + +#ifdef HAVE_PROTOTYPES +int is_char_signed (int arg) +#else +int is_char_signed (arg) + int arg; +#endif +{ + if (arg == 189) { /* expected result for unsigned char */ + return 0; /* type char is unsigned */ + } + else if (arg != -67) { /* expected result for signed char */ + printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n"); + printf("I fear the JPEG software will not work at all.\n\n"); + } + return 1; /* assume char is signed otherwise */ +} + + +#ifdef HAVE_PROTOTYPES +int is_shifting_signed (long arg) +#else +int is_shifting_signed (arg) + long arg; +#endif +/* See whether right-shift on a long is signed or not. */ +{ + long res = arg >> 4; + + if (res == -0x7F7E80CL) { /* expected result for signed shift */ + return 1; /* right shift is signed */ + } + /* see if unsigned-shift hack will fix it. */ + /* we can't just test exact value since it depends on width of long... */ + res |= (~0L) << (32-4); + if (res == -0x7F7E80CL) { /* expected result now? */ + return 0; /* right shift is unsigned */ + } + printf("Right shift isn't acting as I expect it to.\n"); + printf("I fear the JPEG software will not work at all.\n\n"); + return 0; /* try it with unsigned anyway */ +} + + +#ifdef HAVE_PROTOTYPES +int main (int argc, char ** argv) +#else +int main (argc, argv) + int argc; + char ** argv; +#endif +{ + char signed_char_check = (char) (-67); + FILE *outfile; + + /* Attempt to write jconfig.h */ + if ((outfile = fopen("jconfig.h", "w")) == NULL) { + printf("Failed to write jconfig.h\n"); + return 1; + } + + /* Write out all the info */ + fprintf(outfile, "/* jconfig.h --- generated by ckconfig.c */\n"); + fprintf(outfile, "/* see jconfig.doc for explanations */\n\n"); +#ifdef HAVE_PROTOTYPES + fprintf(outfile, "#define HAVE_PROTOTYPES\n"); +#else + fprintf(outfile, "#undef HAVE_PROTOTYPES\n"); +#endif +#ifdef HAVE_UNSIGNED_CHAR + fprintf(outfile, "#define HAVE_UNSIGNED_CHAR\n"); +#else + fprintf(outfile, "#undef HAVE_UNSIGNED_CHAR\n"); +#endif +#ifdef HAVE_UNSIGNED_SHORT + fprintf(outfile, "#define HAVE_UNSIGNED_SHORT\n"); +#else + fprintf(outfile, "#undef HAVE_UNSIGNED_SHORT\n"); +#endif +#ifdef HAVE_VOID + fprintf(outfile, "/* #define void char */\n"); +#else + fprintf(outfile, "#define void char\n"); +#endif +#ifdef HAVE_CONST + fprintf(outfile, "/* #define const */\n"); +#else + fprintf(outfile, "#define const\n"); +#endif + if (is_char_signed((int) signed_char_check)) + fprintf(outfile, "#undef CHAR_IS_UNSIGNED\n"); + else + fprintf(outfile, "#define CHAR_IS_UNSIGNED\n"); +#ifdef HAVE_STDDEF_H + fprintf(outfile, "#define HAVE_STDDEF_H\n"); +#else + fprintf(outfile, "#undef HAVE_STDDEF_H\n"); +#endif +#ifdef HAVE_STDLIB_H + fprintf(outfile, "#define HAVE_STDLIB_H\n"); +#else + fprintf(outfile, "#undef HAVE_STDLIB_H\n"); +#endif +#ifdef NEED_BSD_STRINGS + fprintf(outfile, "#define NEED_BSD_STRINGS\n"); +#else + fprintf(outfile, "#undef NEED_BSD_STRINGS\n"); +#endif +#ifdef NEED_SYS_TYPES_H + fprintf(outfile, "#define NEED_SYS_TYPES_H\n"); +#else + fprintf(outfile, "#undef NEED_SYS_TYPES_H\n"); +#endif + fprintf(outfile, "#undef NEED_FAR_POINTERS\n"); +#ifdef NEED_SHORT_EXTERNAL_NAMES + fprintf(outfile, "#define NEED_SHORT_EXTERNAL_NAMES\n"); +#else + fprintf(outfile, "#undef NEED_SHORT_EXTERNAL_NAMES\n"); +#endif +#ifdef INCOMPLETE_TYPES_BROKEN + fprintf(outfile, "#define INCOMPLETE_TYPES_BROKEN\n"); +#else + fprintf(outfile, "#undef INCOMPLETE_TYPES_BROKEN\n"); +#endif + fprintf(outfile, "\n#ifdef JPEG_INTERNALS\n\n"); + if (is_shifting_signed(-0x7F7E80B1L)) + fprintf(outfile, "#undef RIGHT_SHIFT_IS_UNSIGNED\n"); + else + fprintf(outfile, "#define RIGHT_SHIFT_IS_UNSIGNED\n"); + fprintf(outfile, "\n#endif /* JPEG_INTERNALS */\n"); + fprintf(outfile, "\n#ifdef JPEG_CJPEG_DJPEG\n\n"); + fprintf(outfile, "#define BMP_SUPPORTED /* BMP image file format */\n"); + fprintf(outfile, "#define GIF_SUPPORTED /* GIF image file format */\n"); + fprintf(outfile, "#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */\n"); + fprintf(outfile, "#undef RLE_SUPPORTED /* Utah RLE image file format */\n"); + fprintf(outfile, "#define TARGA_SUPPORTED /* Targa image file format */\n\n"); + fprintf(outfile, "#undef TWO_FILE_COMMANDLINE /* You may need this on non-Unix systems */\n"); + fprintf(outfile, "#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */\n"); + fprintf(outfile, "#undef DONT_USE_B_MODE\n"); + fprintf(outfile, "/* #define PROGRESS_REPORT */ /* optional */\n"); + fprintf(outfile, "\n#endif /* JPEG_CJPEG_DJPEG */\n"); + + /* Close the jconfig.h file */ + fclose(outfile); + + /* User report */ + printf("Configuration check for Independent JPEG Group's software done.\n"); + printf("\nI have written the jconfig.h file for you.\n\n"); +#ifdef HAVE_PROTOTYPES + printf("You should use makefile.ansi as the starting point for your Makefile.\n"); +#else + printf("You should use makefile.unix as the starting point for your Makefile.\n"); +#endif + +#ifdef NEED_SPECIAL_INCLUDE + printf("\nYou'll need to change jconfig.h to include the system include file\n"); + printf("that you found type size_t in, or add a direct definition of type\n"); + printf("size_t if that's what you used. Just add it to the end.\n"); +#endif + + return 0; +} diff --git a/gtkmm-osx/jpeg-6b/coderules.doc b/gtkmm-osx/jpeg-6b/coderules.doc new file mode 100644 index 0000000..0ab5d9b --- /dev/null +++ b/gtkmm-osx/jpeg-6b/coderules.doc @@ -0,0 +1,118 @@ +IJG JPEG LIBRARY: CODING RULES + +Copyright (C) 1991-1996, Thomas G. Lane. +This file is part of the Independent JPEG Group's software. +For conditions of distribution and use, see the accompanying README file. + + +Since numerous people will be contributing code and bug fixes, it's important +to establish a common coding style. The goal of using similar coding styles +is much more important than the details of just what that style is. + +In general we follow the recommendations of "Recommended C Style and Coding +Standards" revision 6.1 (Cannon et al. as modified by Spencer, Keppel and +Brader). This document is available in the IJG FTP archive (see +jpeg/doc/cstyle.ms.tbl.Z, or cstyle.txt.Z for those without nroff/tbl). + +Block comments should be laid out thusly: + +/* + * Block comments in this style. + */ + +We indent statements in K&R style, e.g., + if (test) { + then-part; + } else { + else-part; + } +with two spaces per indentation level. (This indentation convention is +handled automatically by GNU Emacs and many other text editors.) + +Multi-word names should be written in lower case with underscores, e.g., +multi_word_name (not multiWordName). Preprocessor symbols and enum constants +are similar but upper case (MULTI_WORD_NAME). Names should be unique within +the first fifteen characters. (On some older systems, global names must be +unique within six characters. We accommodate this without cluttering the +source code by using macros to substitute shorter names.) + +We use function prototypes everywhere; we rely on automatic source code +transformation to feed prototype-less C compilers. Transformation is done +by the simple and portable tool 'ansi2knr.c' (courtesy of Ghostscript). +ansi2knr is not very bright, so it imposes a format requirement on function +declarations: the function name MUST BEGIN IN COLUMN 1. Thus all functions +should be written in the following style: + +LOCAL(int *) +function_name (int a, char *b) +{ + code... +} + +Note that each function definition must begin with GLOBAL(type), LOCAL(type), +or METHODDEF(type). These macros expand to "static type" or just "type" as +appropriate. They provide a readable indication of the routine's usage and +can readily be changed for special needs. (For instance, special linkage +keywords can be inserted for use in Windows DLLs.) + +ansi2knr does not transform method declarations (function pointers in +structs). We handle these with a macro JMETHOD, defined as + #ifdef HAVE_PROTOTYPES + #define JMETHOD(type,methodname,arglist) type (*methodname) arglist + #else + #define JMETHOD(type,methodname,arglist) type (*methodname) () + #endif +which is used like this: + struct function_pointers { + JMETHOD(void, init_entropy_encoder, (int somearg, jparms *jp)); + JMETHOD(void, term_entropy_encoder, (void)); + }; +Note the set of parentheses surrounding the parameter list. + +A similar solution is used for forward and external function declarations +(see the EXTERN and JPP macros). + +If the code is to work on non-ANSI compilers, we cannot rely on a prototype +declaration to coerce actual parameters into the right types. Therefore, use +explicit casts on actual parameters whenever the actual parameter type is not +identical to the formal parameter. Beware of implicit conversions to "int". + +It seems there are some non-ANSI compilers in which the sizeof() operator +is defined to return int, yet size_t is defined as long. Needless to say, +this is brain-damaged. Always use the SIZEOF() macro in place of sizeof(), +so that the result is guaranteed to be of type size_t. + + +The JPEG library is intended to be used within larger programs. Furthermore, +we want it to be reentrant so that it can be used by applications that process +multiple images concurrently. The following rules support these requirements: + +1. Avoid direct use of file I/O, "malloc", error report printouts, etc; +pass these through the common routines provided. + +2. Minimize global namespace pollution. Functions should be declared static +wherever possible. (Note that our method-based calling conventions help this +a lot: in many modules only the initialization function will ever need to be +called directly, so only that function need be externally visible.) All +global function names should begin with "jpeg_", and should have an +abbreviated name (unique in the first six characters) substituted by macro +when NEED_SHORT_EXTERNAL_NAMES is set. + +3. Don't use global variables; anything that must be used in another module +should be in the common data structures. + +4. Don't use static variables except for read-only constant tables. Variables +that should be private to a module can be placed into private structures (see +the system architecture document, structure.doc). + +5. Source file names should begin with "j" for files that are part of the +library proper; source files that are not part of the library, such as cjpeg.c +and djpeg.c, do not begin with "j". Keep source file names to eight +characters (plus ".c" or ".h", etc) to make life easy for MS-DOSers. Keep +compression and decompression code in separate source files --- some +applications may want only one half of the library. + +Note: these rules (particularly #4) are not followed religiously in the +modules that are used in cjpeg/djpeg but are not part of the JPEG library +proper. Those modules are not really intended to be used in other +applications. diff --git a/gtkmm-osx/jpeg-6b/config.guess b/gtkmm-osx/jpeg-6b/config.guess new file mode 100755 index 0000000..ba66165 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/config.guess @@ -0,0 +1,1371 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-04-20' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Written by Per Bothner . +# Please send patches to . +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + + +dummy=dummy-$$ +trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int dummy(){}" > $dummy.c + for c in cc gcc c89 ; do + ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 + if test $? = 0 ; then + CC_FOR_BUILD="$c"; break + fi + done + rm -f $dummy.c $dummy.o $dummy.rel + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 8/24/94.) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # Netbsd (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # Determine the machine/vendor (is the vendor relevant). + case "${UNAME_MACHINE}" in + amiga) machine=m68k-unknown ;; + arm32) machine=arm-unknown ;; + atari*) machine=m68k-atari ;; + sun3*) machine=m68k-sun ;; + mac68k) machine=m68k-apple ;; + macppc) machine=powerpc-apple ;; + hp3[0-9][05]) machine=m68k-hp ;; + ibmrt|romp-ibm) machine=romp-ibm ;; + *) machine=${UNAME_MACHINE}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE}" in + i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main +main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + case `./$dummy` in + 0-0) + UNAME_MACHINE="alpha" + ;; + 1-0) + UNAME_MACHINE="alphaev5" + ;; + 1-1) + UNAME_MACHINE="alphaev56" + ;; + 1-101) + UNAME_MACHINE="alphapca56" + ;; + 2-303) + UNAME_MACHINE="alphaev6" + ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; + esac + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hkmips:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy \ + && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + case "${HPUX_REV}" in + 11.[0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + esac ;; + esac + fi ;; + esac + if [ "${HP_ARCH}" = "" ]; then + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi + rm -f $dummy.c $dummy + fi ;; + esac + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + hppa*:OpenBSD:*:*) + echo hppa-unknown-openbsd + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*X-MP:*:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3D:*:*:*) + echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i386-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + cat >$dummy.c < /* for printf() prototype */ +int main (int argc, char *argv[]) { +#else +int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __MIPSEB__ + printf ("%s-unknown-linux-gnu\n", argv[1]); +#endif +#ifdef __MIPSEL__ + printf ("%sel-unknown-linux-gnu\n", argv[1]); +#endif + return 0; +} +EOF + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + ;; + ppc:Linux:*:*) + # Determine Lib Version + cat >$dummy.c < +#if defined(__GLIBC__) +extern char __libc_version[]; +extern char __libc_release[]; +#endif +main(argc, argv) + int argc; + char *argv[]; +{ +#if defined(__GLIBC__) + printf("%s %s\n", __libc_version, __libc_release); +#else + printf("unknown\n"); +#endif + return 0; +} +EOF + LIBC="" + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null + if test "$?" = 0 ; then + ./$dummy | grep 1\.99 > /dev/null + if test "$?" = 0 ; then LIBC="libc1" ; fi + fi + rm -f $dummy.c $dummy + echo powerpc-unknown-linux-gnu${LIBC} + exit 0 ;; + alpha:Linux:*:*) + cat <$dummy.s + .data + \$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + .text + .globl main + .align 4 + .ent main + main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + LIBC="" + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + case `./$dummy` in + 0-0) UNAME_MACHINE="alpha" ;; + 1-0) UNAME_MACHINE="alphaev5" ;; + 1-1) UNAME_MACHINE="alphaev56" ;; + 1-101) UNAME_MACHINE="alphapca56" ;; + 2-303) UNAME_MACHINE="alphaev6" ;; + 2-307) UNAME_MACHINE="alphaev67" ;; + esac + objdump --private-headers $dummy | \ + grep ld.so.1 > /dev/null + if test "$?" = 0 ; then + LIBC="libc1" + fi + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + ld_supported_emulations=`cd /; ld --help 2>&1 \ + | sed -ne '/supported emulations:/!d + s/[ ][ ]*/ /g + s/.*supported emulations: *// + s/ .*// + p'` + case "$ld_supported_emulations" in + i*86linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 + ;; + elf_i*86) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + i*86coff) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 + ;; + esac + # Either a pre-BFD a.out linker (linux-gnuoldld) + # or one that does not give us useful --help. + # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. + # If ld does not provide *any* "supported emulations:" + # that means it is gnuoldld. + test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 + case "${UNAME_MACHINE}" in + i*86) + VENDOR=pc; + ;; + *) + VENDOR=unknown; + ;; + esac + # Determine whether the default compiler is a.out or elf + cat >$dummy.c < +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __ELF__ +# ifdef __GLIBC__ +# if __GLIBC__ >= 2 + printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +#else + printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); +#endif + return 0; +} +EOF + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; +# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions +# are messed up and put the nodename in both sysname and nodename. + i*86:DYNIX/ptx:4*:*) + echo i386-sequent-sysv4 + exit 0 ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i*86:*:5:7*) + # Fixed at (any) Pentium or better + UNAME_MACHINE=i586 + if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then + echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + fi + exit 0 ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + echo `uname -p`-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_MACHINE=pc + fi + echo `uname -p`-${UNAME_MACHINE}-nto-qnx + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[KW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 +rm -f $dummy.c $dummy + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/gtkmm-osx/jpeg-6b/config.sub b/gtkmm-osx/jpeg-6b/config.sub new file mode 100755 index 0000000..213a6d4 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/config.sub @@ -0,0 +1,954 @@ +#! /bin/sh +# Configuration validation subroutine script, version 1.1. +# Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +if [ x$1 = x ] +then + echo Configuration name missing. 1>&2 + echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 + echo "or $0 ALIAS" 1>&2 + echo where ALIAS is a recognized configuration type. 1>&2 + exit 1 +fi + +# First pass through any local machine types. +case $1 in + *local*) + echo $1 + exit 0 + ;; + *) + ;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + linux-gnu*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple) + os= + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ + | arme[lb] | pyramid | mn10200 | mn10300 \ + | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ + | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ + | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ + | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ + | mipstx39 | mipstx39el \ + | sparc | sparclet | sparclite | sparc64 | v850) + basic_machine=$basic_machine-unknown + ;; + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i[3456]86) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ + | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \ + | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ + | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ + | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparc64-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mipstx39-* | mipstx39el-* \ + | f301-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-cbm + ;; + amigaos | amigados) + basic_machine=m68k-cbm + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-cbm + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [ctj]90-cray) + basic_machine=c90-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + os=-mvs + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i[3456]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i[3456]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i[3456]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i[3456]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + miniframe) + basic_machine=m68000-convergent + ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + np1) + basic_machine=np1-gould + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5) + basic_machine=i586-intel + ;; + pentiumpro | p6) + basic_machine=i686-intel + ;; + pentium-* | p5-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + k5) + # We don't have specific support for AMD's K5 yet, so just call it a Pentium + basic_machine=i586-amd + ;; + nexen) + # We don't have specific support for Nexgen yet, so just call it a Pentium + basic_machine=i586-nexgen + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=rs6000-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + mips) + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sparc) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -xenix) + os=-xenix + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-semi) + os=-aout + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-ibm) + os=-aix + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f301-fujitsu) + os=-uxpv + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -hpux*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os diff --git a/gtkmm-osx/jpeg-6b/configure b/gtkmm-osx/jpeg-6b/configure new file mode 100755 index 0000000..35c9db5 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/configure @@ -0,0 +1,2011 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.12 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help + --enable-shared build shared library using GNU libtool" +ac_help="$ac_help + --enable-static build static library using GNU libtool" +ac_help="$ac_help + --enable-maxmem[=N] enable use of temp files, set max mem usage to N MB" +ac_help="$ac_help +" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.12" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *=*) + varname=`echo "$ac_option"|sed -e 's/=.*//'` + # Reject names that aren't valid shell variable names. + if test -n "`echo $varname| sed 's/[a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $varname: invalid shell variable name" 1>&2; exit 1; } + fi + val="`echo "$ac_option"|sed 's/[^=]*=//'`" + test -n "$verbose" && echo " setting shell variable $varname to $val" + eval "$varname='$val'" + eval "export $varname" ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=jcmaster.c + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:538: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:567: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + ac_prog_rejected=no + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:615: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:649: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:654: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes + test "${CFLAGS+set}" = set || CFLAGS="-O2" +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-O" +fi + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:681: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +echo $ac_n "checking for function prototypes""... $ac_c" 1>&6 +echo "configure:742: checking for function prototypes" >&5 +if eval "test \"`echo '$''{'ijg_cv_have_prototypes'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ijg_cv_have_prototypes=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ijg_cv_have_prototypes=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ijg_cv_have_prototypes" 1>&6 +if test $ijg_cv_have_prototypes = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PROTOTYPES +EOF + +else + echo Your compiler does not seem to know about function prototypes. + echo Perhaps it needs a special switch to enable ANSI C mode. + echo If so, we recommend running configure like this: + echo " ./configure CC='cc -switch'" + echo where -switch is the proper switch. +fi +ac_safe=`echo "stddef.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for stddef.h""... $ac_c" 1>&6 +echo "configure:792: checking for stddef.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_STDDEF_H +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6 +echo "configure:828: checking for stdlib.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_STDLIB_H +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for string.h""... $ac_c" 1>&6 +echo "configure:864: checking for string.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +cat >> confdefs.h <<\EOF +#define NEED_BSD_STRINGS +EOF + +fi + +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +echo "configure:900: checking for size_t" >&5 +cat > conftest.$ac_ext < +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#include +#ifdef NEED_BSD_STRINGS +#include +#else +#include +#endif +typedef size_t my_size_t; + +int main() { + my_size_t foovar; +; return 0; } +EOF +if { (eval echo configure:923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ijg_size_t_ok=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ijg_size_t_ok="not ANSI, perhaps it is in sys/types.h" +fi +rm -f conftest* +echo "$ac_t""$ijg_size_t_ok" 1>&6 +if test "$ijg_size_t_ok" != yes; then +ac_safe=`echo "sys/types.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for sys/types.h""... $ac_c" 1>&6 +echo "configure:937: checking for sys/types.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define NEED_SYS_TYPES_H +EOF + +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "size_t" >/dev/null 2>&1; then + rm -rf conftest* + ijg_size_t_ok="size_t is in sys/types.h" +else + rm -rf conftest* + ijg_size_t_ok=no +fi +rm -f conftest* + +else + echo "$ac_t""no" 1>&6 +ijg_size_t_ok=no +fi + +echo "$ac_t""$ijg_size_t_ok" 1>&6 +if test "$ijg_size_t_ok" = no; then + echo Type size_t is not defined in any of the usual places. + echo Try putting '"typedef unsigned int size_t;"' in jconfig.h. +fi +fi +echo $ac_n "checking for type unsigned char""... $ac_c" 1>&6 +echo "configure:994: checking for type unsigned char" >&5 +cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 +cat >> confdefs.h <<\EOF +#define HAVE_UNSIGNED_CHAR +EOF + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* +echo $ac_n "checking for type unsigned short""... $ac_c" 1>&6 +echo "configure:1018: checking for type unsigned short" >&5 +cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 +cat >> confdefs.h <<\EOF +#define HAVE_UNSIGNED_SHORT +EOF + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* +echo $ac_n "checking for type void""... $ac_c" 1>&6 +echo "configure:1042: checking for type void" >&5 +cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 +cat >> confdefs.h <<\EOF +#define void char +EOF + +fi +rm -f conftest* + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:1088: checking for working const" >&5 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:1142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + +echo $ac_n "checking for inline""... $ac_c" 1>&6 +echo "configure:1163: checking for inline" >&5 +ijg_cv_inline="" +cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ijg_cv_inline="__inline__" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ijg_cv_inline="__inline" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ijg_cv_inline="inline" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* +echo "$ac_t""$ijg_cv_inline" 1>&6 +cat >> confdefs.h <&6 +echo "configure:1224: checking for broken incomplete types" >&5 +cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""ok" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""broken" 1>&6 +cat >> confdefs.h <<\EOF +#define INCOMPLETE_TYPES_BROKEN +EOF + +fi +rm -f conftest* +echo $ac_n "checking for short external names""... $ac_c" 1>&6 +echo "configure:1248: checking for short external names" >&5 +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + echo "$ac_t""ok" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""short" 1>&6 +cat >> confdefs.h <<\EOF +#define NEED_SHORT_EXTERNAL_NAMES +EOF + +fi +rm -f conftest* +echo $ac_n "checking to see if char is signed""... $ac_c" 1>&6 +echo "configure:1275: checking to see if char is signed" >&5 +if test "$cross_compiling" = yes; then + echo Assuming that char is signed on target machine. +echo If it is unsigned, this will be a little bit inefficient. + +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + echo "$ac_t""no" 1>&6 +cat >> confdefs.h <<\EOF +#define CHAR_IS_UNSIGNED +EOF + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + echo "$ac_t""yes" 1>&6 +fi +rm -fr conftest* +fi + +echo $ac_n "checking to see if right shift is signed""... $ac_c" 1>&6 +echo "configure:1323: checking to see if right shift is signed" >&5 +if test "$cross_compiling" = yes; then + echo "$ac_t""Assuming that right shift is signed on target machine." 1>&6 +else + cat > conftest.$ac_ext <> 4; + + if (res == -0x7F7E80CL) { /* expected result for signed shift */ + return 1; /* right shift is signed */ + } + /* see if unsigned-shift hack will fix it. */ + /* we can't just test exact value since it depends on width of long... */ + res |= (~0L) << (32-4); + if (res == -0x7F7E80CL) { /* expected result now? */ + return 0; /* right shift is unsigned */ + } + printf("Right shift isn't acting as I expect it to.\n"); + printf("I fear the JPEG software will not work at all.\n\n"); + return 0; /* try it with unsigned anyway */ +} +main() { + exit(is_shifting_signed(-0x7F7E80B1L)); +} +EOF +if { (eval echo configure:1358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + echo "$ac_t""no" 1>&6 +cat >> confdefs.h <<\EOF +#define RIGHT_SHIFT_IS_UNSIGNED +EOF + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + echo "$ac_t""yes" 1>&6 +fi +rm -fr conftest* +fi + +echo $ac_n "checking to see if fopen accepts b spec""... $ac_c" 1>&6 +echo "configure:1375: checking to see if fopen accepts b spec" >&5 +if test "$cross_compiling" = yes; then + echo "$ac_t""Assuming that it does." 1>&6 +else + cat > conftest.$ac_ext < +main() { + if (fopen("conftestdata", "wb") != NULL) + exit(0); + exit(1); +} +EOF +if { (eval echo configure:1390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + echo "$ac_t""no" 1>&6 +cat >> confdefs.h <<\EOF +#define DONT_USE_B_MODE +EOF + +fi +rm -fr conftest* +fi + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:1436: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + for ac_prog in ginstall installbsd scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + # OSF/1 installbsd also uses dspmsg, but is usable. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1488: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +# Decide whether to use libtool, +# and if so whether to build shared, static, or both flavors of library. +LTSHARED="no" +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + LTSHARED="$enableval" +fi + +LTSTATIC="no" +# Check whether --enable-static or --disable-static was given. +if test "${enable_static+set}" = set; then + enableval="$enable_static" + LTSTATIC="$enableval" +fi + +if test "x$LTSHARED" != xno -o "x$LTSTATIC" != xno; then + USELIBTOOL="yes" + LIBTOOL="./libtool" + O="lo" + A="la" + LN='$(LIBTOOL) --mode=link $(CC)' + INSTALL_LIB='$(LIBTOOL) --mode=install ${INSTALL}' + INSTALL_PROGRAM="\$(LIBTOOL) --mode=install $INSTALL_PROGRAM" +else + USELIBTOOL="no" + LIBTOOL="" + O="o" + A="a" + LN='$(CC)' + INSTALL_LIB="$INSTALL_DATA" +fi + + + + + + +# Configure libtool if needed. +if test $USELIBTOOL = yes; then + disable_shared= + disable_static= + if test "x$LTSHARED" = xno; then + disable_shared="--disable-shared" + fi + if test "x$LTSTATIC" = xno; then + disable_static="--disable-static" + fi + $srcdir/ltconfig $disable_shared $disable_static $srcdir/ltmain.sh +fi + +# Select memory manager depending on user input. +# If no "-enable-maxmem", use jmemnobs +MEMORYMGR='jmemnobs.$(O)' +MAXMEM="no" +# Check whether --enable-maxmem or --disable-maxmem was given. +if test "${enable_maxmem+set}" = set; then + enableval="$enable_maxmem" + MAXMEM="$enableval" +fi + +# support --with-maxmem for backwards compatibility with IJG V5. +# Check whether --with-maxmem or --without-maxmem was given. +if test "${with_maxmem+set}" = set; then + withval="$with_maxmem" + MAXMEM="$withval" +fi + +if test "x$MAXMEM" = xyes; then + MAXMEM=1 +fi +if test "x$MAXMEM" != xno; then + if test -n "`echo $MAXMEM | sed 's/[0-9]//g'`"; then + { echo "configure: error: non-numeric argument to --enable-maxmem" 1>&2; exit 1; } + fi + DEFAULTMAXMEM=`expr $MAXMEM \* 1048576` +cat >> confdefs.h <&6 +echo "configure:1596: checking for 'tmpfile()'" >&5 +cat > conftest.$ac_ext < +int main() { + FILE * tfile = tmpfile(); +; return 0; } +EOF +if { (eval echo configure:1605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 +MEMORYMGR='jmemansi.$(O)' +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 +MEMORYMGR='jmemname.$(O)' +cat >> confdefs.h <<\EOF +#define NEED_SIGNAL_CATCHER +EOF + +echo $ac_n "checking for 'mktemp()'""... $ac_c" 1>&6 +echo "configure:1620: checking for 'mktemp()'" >&5 +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 +cat >> confdefs.h <<\EOF +#define NO_MKTEMP +EOF + +fi +rm -f conftest* +fi +rm -f conftest* +fi + + +# Extract the library version ID from jpeglib.h. +echo $ac_n "checking libjpeg version number""... $ac_c" 1>&6 +echo "configure:1650: checking libjpeg version number" >&5 +JPEG_LIB_VERSION=`sed -e '/^#define JPEG_LIB_VERSION/!d' -e 's/^[^0-9]*\([0-9][0-9]*\).*$/\1/' $srcdir/jpeglib.h` +echo "$ac_t""$JPEG_LIB_VERSION" 1>&6 + + +# Prepare to massage makefile.cfg correctly. +if test $ijg_cv_have_prototypes = yes; then + A2K_DEPS="" + COM_A2K="# " +else + A2K_DEPS="ansi2knr" + COM_A2K="" +fi + + +# ansi2knr needs -DBSD if string.h is missing +if test $ac_cv_header_string_h = no; then + ANSI2KNRFLAGS="-DBSD" +else + ANSI2KNRFLAGS="" +fi + +# Substitutions to enable or disable libtool-related stuff +if test $USELIBTOOL = yes -a $ijg_cv_have_prototypes = yes; then + COM_LT="" +else + COM_LT="# " +fi + +if test "x$LTSHARED" != xno; then + FORCE_INSTALL_LIB="install-lib" +else + FORCE_INSTALL_LIB="" +fi + +# Set up -I directives +if test "x$srcdir" = x.; then + INCLUDEFLAGS='-I$(srcdir)' +else + INCLUDEFLAGS='-I. -I$(srcdir)' +fi + +trap '' 1 2 15 + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS </dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.12" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir +ac_given_INSTALL="$INSTALL" + +trap 'rm -fr `echo "Makefile:makefile.cfg jconfig.h:jconfig.cfg" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@CC@%$CC%g +s%@CPP@%$CPP%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@RANLIB@%$RANLIB%g +s%@LIBTOOL@%$LIBTOOL%g +s%@O@%$O%g +s%@A@%$A%g +s%@LN@%$LN%g +s%@INSTALL_LIB@%$INSTALL_LIB%g +s%@MEMORYMGR@%$MEMORYMGR%g +s%@JPEG_LIB_VERSION@%$JPEG_LIB_VERSION%g +s%@A2K_DEPS@%$A2K_DEPS%g +s%@COM_A2K@%$COM_A2K%g +s%@ANSI2KNRFLAGS@%$ANSI2KNRFLAGS%g +s%@COM_LT@%$COM_LT%g +s%@FORCE_INSTALL_LIB@%$FORCE_INSTALL_LIB%g +s%@INCLUDEFLAGS@%$INCLUDEFLAGS%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + case "$ac_given_INSTALL" in + [/$]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +fi +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff --git a/gtkmm-osx/jpeg-6b/djpeg.1 b/gtkmm-osx/jpeg-6b/djpeg.1 new file mode 100644 index 0000000..11beb6a --- /dev/null +++ b/gtkmm-osx/jpeg-6b/djpeg.1 @@ -0,0 +1,253 @@ +.TH DJPEG 1 "22 August 1997" +.SH NAME +djpeg \- decompress a JPEG file to an image file +.SH SYNOPSIS +.B djpeg +[ +.I options +] +[ +.I filename +] +.LP +.SH DESCRIPTION +.LP +.B djpeg +decompresses the named JPEG file, or the standard input if no file is named, +and produces an image file on the standard output. PBMPLUS (PPM/PGM), BMP, +GIF, Targa, or RLE (Utah Raster Toolkit) output format can be selected. +(RLE is supported only if the URT library is available.) +.SH OPTIONS +All switch names may be abbreviated; for example, +.B \-grayscale +may be written +.B \-gray +or +.BR \-gr . +Most of the "basic" switches can be abbreviated to as little as one letter. +Upper and lower case are equivalent (thus +.B \-BMP +is the same as +.BR \-bmp ). +British spellings are also accepted (e.g., +.BR \-greyscale ), +though for brevity these are not mentioned below. +.PP +The basic switches are: +.TP +.BI \-colors " N" +Reduce image to at most N colors. This reduces the number of colors used in +the output image, so that it can be displayed on a colormapped display or +stored in a colormapped file format. For example, if you have an 8-bit +display, you'd need to reduce to 256 or fewer colors. +.TP +.BI \-quantize " N" +Same as +.BR \-colors . +.B \-colors +is the recommended name, +.B \-quantize +is provided only for backwards compatibility. +.TP +.B \-fast +Select recommended processing options for fast, low quality output. (The +default options are chosen for highest quality output.) Currently, this is +equivalent to \fB\-dct fast \-nosmooth \-onepass \-dither ordered\fR. +.TP +.B \-grayscale +Force gray-scale output even if JPEG file is color. Useful for viewing on +monochrome displays; also, +.B djpeg +runs noticeably faster in this mode. +.TP +.BI \-scale " M/N" +Scale the output image by a factor M/N. Currently the scale factor must be +1/1, 1/2, 1/4, or 1/8. Scaling is handy if the image is larger than your +screen; also, +.B djpeg +runs much faster when scaling down the output. +.TP +.B \-bmp +Select BMP output format (Windows flavor). 8-bit colormapped format is +emitted if +.B \-colors +or +.B \-grayscale +is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color +format is emitted. +.TP +.B \-gif +Select GIF output format. Since GIF does not support more than 256 colors, +.B \-colors 256 +is assumed (unless you specify a smaller number of colors). +.TP +.B \-os2 +Select BMP output format (OS/2 1.x flavor). 8-bit colormapped format is +emitted if +.B \-colors +or +.B \-grayscale +is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color +format is emitted. +.TP +.B \-pnm +Select PBMPLUS (PPM/PGM) output format (this is the default format). +PGM is emitted if the JPEG file is gray-scale or if +.B \-grayscale +is specified; otherwise PPM is emitted. +.TP +.B \-rle +Select RLE output format. (Requires URT library.) +.TP +.B \-targa +Select Targa output format. Gray-scale format is emitted if the JPEG file is +gray-scale or if +.B \-grayscale +is specified; otherwise, colormapped format is emitted if +.B \-colors +is specified; otherwise, 24-bit full-color format is emitted. +.PP +Switches for advanced users: +.TP +.B \-dct int +Use integer DCT method (default). +.TP +.B \-dct fast +Use fast integer DCT (less accurate). +.TP +.B \-dct float +Use floating-point DCT method. +The float method is very slightly more accurate than the int method, but is +much slower unless your machine has very fast floating-point hardware. Also +note that results of the floating-point method may vary slightly across +machines, while the integer methods should give the same results everywhere. +The fast integer method is much less accurate than the other two. +.TP +.B \-dither fs +Use Floyd-Steinberg dithering in color quantization. +.TP +.B \-dither ordered +Use ordered dithering in color quantization. +.TP +.B \-dither none +Do not use dithering in color quantization. +By default, Floyd-Steinberg dithering is applied when quantizing colors; this +is slow but usually produces the best results. Ordered dither is a compromise +between speed and quality; no dithering is fast but usually looks awful. Note +that these switches have no effect unless color quantization is being done. +Ordered dither is only available in +.B \-onepass +mode. +.TP +.BI \-map " file" +Quantize to the colors used in the specified image file. This is useful for +producing multiple files with identical color maps, or for forcing a +predefined set of colors to be used. The +.I file +must be a GIF or PPM file. This option overrides +.B \-colors +and +.BR \-onepass . +.TP +.B \-nosmooth +Use a faster, lower-quality upsampling routine. +.TP +.B \-onepass +Use one-pass instead of two-pass color quantization. The one-pass method is +faster and needs less memory, but it produces a lower-quality image. +.B \-onepass +is ignored unless you also say +.B \-colors +.IR N . +Also, the one-pass method is always used for gray-scale output (the two-pass +method is no improvement then). +.TP +.BI \-maxmemory " N" +Set limit for amount of memory to use in processing large images. Value is +in thousands of bytes, or millions of bytes if "M" is attached to the +number. For example, +.B \-max 4m +selects 4000000 bytes. If more space is needed, temporary files will be used. +.TP +.BI \-outfile " name" +Send output image to the named file, not to standard output. +.TP +.B \-verbose +Enable debug printout. More +.BR \-v 's +give more output. Also, version information is printed at startup. +.TP +.B \-debug +Same as +.BR \-verbose . +.SH EXAMPLES +.LP +This example decompresses the JPEG file foo.jpg, quantizes it to +256 colors, and saves the output in 8-bit BMP format in foo.bmp: +.IP +.B djpeg \-colors 256 \-bmp +.I foo.jpg +.B > +.I foo.bmp +.SH HINTS +To get a quick preview of an image, use the +.B \-grayscale +and/or +.B \-scale +switches. +.B \-grayscale \-scale 1/8 +is the fastest case. +.PP +Several options are available that trade off image quality to gain speed. +.B \-fast +turns on the recommended settings. +.PP +.B \-dct fast +and/or +.B \-nosmooth +gain speed at a small sacrifice in quality. +When producing a color-quantized image, +.B \-onepass \-dither ordered +is fast but much lower quality than the default behavior. +.B \-dither none +may give acceptable results in two-pass mode, but is seldom tolerable in +one-pass mode. +.PP +If you are fortunate enough to have very fast floating point hardware, +\fB\-dct float\fR may be even faster than \fB\-dct fast\fR. But on most +machines \fB\-dct float\fR is slower than \fB\-dct int\fR; in this case it is +not worth using, because its theoretical accuracy advantage is too small to be +significant in practice. +.SH ENVIRONMENT +.TP +.B JPEGMEM +If this environment variable is set, its value is the default memory limit. +The value is specified as described for the +.B \-maxmemory +switch. +.B JPEGMEM +overrides the default value specified when the program was compiled, and +itself is overridden by an explicit +.BR \-maxmemory . +.SH SEE ALSO +.BR cjpeg (1), +.BR jpegtran (1), +.BR rdjpgcom (1), +.BR wrjpgcom (1) +.br +.BR ppm (5), +.BR pgm (5) +.br +Wallace, Gregory K. "The JPEG Still Picture Compression Standard", +Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. +.SH AUTHOR +Independent JPEG Group +.SH BUGS +Arithmetic coding is not supported for legal reasons. +.PP +To avoid the Unisys LZW patent, +.B djpeg +produces uncompressed GIF files. These are larger than they should be, but +are readable by standard GIF decoders. +.PP +Still not as fast as we'd like. diff --git a/gtkmm-osx/jpeg-6b/djpeg.c b/gtkmm-osx/jpeg-6b/djpeg.c new file mode 100644 index 0000000..e099e90 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/djpeg.c @@ -0,0 +1,616 @@ +/* + * djpeg.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a command-line user interface for the JPEG decompressor. + * It should work on any system with Unix- or MS-DOS-style command lines. + * + * Two different command line styles are permitted, depending on the + * compile-time switch TWO_FILE_COMMANDLINE: + * djpeg [options] inputfile outputfile + * djpeg [options] [inputfile] + * In the second style, output is always to standard output, which you'd + * normally redirect to a file or pipe to some other program. Input is + * either from a named file or from standard input (typically redirected). + * The second style is convenient on Unix but is unhelpful on systems that + * don't support pipes. Also, you MUST use the first style if your system + * doesn't do binary I/O to stdin/stdout. + * To simplify script writing, the "-outfile" switch is provided. The syntax + * djpeg [options] -outfile outputfile inputfile + * works regardless of which command line style is used. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ +#include "jversion.h" /* for version message */ + +#include /* to declare isprint() */ + +#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ +#ifdef __MWERKS__ +#include /* Metrowerks needs this */ +#include /* ... and this */ +#endif +#ifdef THINK_C +#include /* Think declares it here */ +#endif +#endif + + +/* Create the add-on message string table. */ + +#define JMESSAGE(code,string) string , + +static const char * const cdjpeg_message_table[] = { +#include "cderror.h" + NULL +}; + + +/* + * This list defines the known output image formats + * (not all of which need be supported by a given version). + * You can change the default output format by defining DEFAULT_FMT; + * indeed, you had better do so if you undefine PPM_SUPPORTED. + */ + +typedef enum { + FMT_BMP, /* BMP format (Windows flavor) */ + FMT_GIF, /* GIF format */ + FMT_OS2, /* BMP format (OS/2 flavor) */ + FMT_PPM, /* PPM/PGM (PBMPLUS formats) */ + FMT_RLE, /* RLE format */ + FMT_TARGA, /* Targa format */ + FMT_TIFF /* TIFF format */ +} IMAGE_FORMATS; + +#ifndef DEFAULT_FMT /* so can override from CFLAGS in Makefile */ +#define DEFAULT_FMT FMT_PPM +#endif + +static IMAGE_FORMATS requested_fmt; + + +/* + * Argument-parsing code. + * The switch parser is designed to be useful with DOS-style command line + * syntax, ie, intermixed switches and file names, where only the switches + * to the left of a given file name affect processing of that file. + * The main program in this file doesn't actually use this capability... + */ + + +static const char * progname; /* program name for error messages */ +static char * outfilename; /* for -outfile switch */ + + +LOCAL(void) +usage (void) +/* complain about bad command line */ +{ + fprintf(stderr, "usage: %s [switches] ", progname); +#ifdef TWO_FILE_COMMANDLINE + fprintf(stderr, "inputfile outputfile\n"); +#else + fprintf(stderr, "[inputfile]\n"); +#endif + + fprintf(stderr, "Switches (names may be abbreviated):\n"); + fprintf(stderr, " -colors N Reduce image to no more than N colors\n"); + fprintf(stderr, " -fast Fast, low-quality processing\n"); + fprintf(stderr, " -grayscale Force grayscale output\n"); +#ifdef IDCT_SCALING_SUPPORTED + fprintf(stderr, " -scale M/N Scale output image by fraction M/N, eg, 1/8\n"); +#endif +#ifdef BMP_SUPPORTED + fprintf(stderr, " -bmp Select BMP output format (Windows style)%s\n", + (DEFAULT_FMT == FMT_BMP ? " (default)" : "")); +#endif +#ifdef GIF_SUPPORTED + fprintf(stderr, " -gif Select GIF output format%s\n", + (DEFAULT_FMT == FMT_GIF ? " (default)" : "")); +#endif +#ifdef BMP_SUPPORTED + fprintf(stderr, " -os2 Select BMP output format (OS/2 style)%s\n", + (DEFAULT_FMT == FMT_OS2 ? " (default)" : "")); +#endif +#ifdef PPM_SUPPORTED + fprintf(stderr, " -pnm Select PBMPLUS (PPM/PGM) output format%s\n", + (DEFAULT_FMT == FMT_PPM ? " (default)" : "")); +#endif +#ifdef RLE_SUPPORTED + fprintf(stderr, " -rle Select Utah RLE output format%s\n", + (DEFAULT_FMT == FMT_RLE ? " (default)" : "")); +#endif +#ifdef TARGA_SUPPORTED + fprintf(stderr, " -targa Select Targa output format%s\n", + (DEFAULT_FMT == FMT_TARGA ? " (default)" : "")); +#endif + fprintf(stderr, "Switches for advanced users:\n"); +#ifdef DCT_ISLOW_SUPPORTED + fprintf(stderr, " -dct int Use integer DCT method%s\n", + (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : "")); +#endif +#ifdef DCT_IFAST_SUPPORTED + fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n", + (JDCT_DEFAULT == JDCT_IFAST ? " (default)" : "")); +#endif +#ifdef DCT_FLOAT_SUPPORTED + fprintf(stderr, " -dct float Use floating-point DCT method%s\n", + (JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : "")); +#endif + fprintf(stderr, " -dither fs Use F-S dithering (default)\n"); + fprintf(stderr, " -dither none Don't use dithering in quantization\n"); + fprintf(stderr, " -dither ordered Use ordered dither (medium speed, quality)\n"); +#ifdef QUANT_2PASS_SUPPORTED + fprintf(stderr, " -map FILE Map to colors used in named image file\n"); +#endif + fprintf(stderr, " -nosmooth Don't use high-quality upsampling\n"); +#ifdef QUANT_1PASS_SUPPORTED + fprintf(stderr, " -onepass Use 1-pass quantization (fast, low quality)\n"); +#endif + fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); + fprintf(stderr, " -outfile name Specify name for output file\n"); + fprintf(stderr, " -verbose or -debug Emit debug output\n"); + exit(EXIT_FAILURE); +} + + +LOCAL(int) +parse_switches (j_decompress_ptr cinfo, int argc, char **argv, + int last_file_arg_seen, boolean for_real) +/* Parse optional switches. + * Returns argv[] index of first file-name argument (== argc if none). + * Any file names with indexes <= last_file_arg_seen are ignored; + * they have presumably been processed in a previous iteration. + * (Pass 0 for last_file_arg_seen on the first or only iteration.) + * for_real is FALSE on the first (dummy) pass; we may skip any expensive + * processing. + */ +{ + int argn; + char * arg; + + /* Set up default JPEG parameters. */ + requested_fmt = DEFAULT_FMT; /* set default output file format */ + outfilename = NULL; + cinfo->err->trace_level = 0; + + /* Scan command line options, adjust parameters */ + + for (argn = 1; argn < argc; argn++) { + arg = argv[argn]; + if (*arg != '-') { + /* Not a switch, must be a file name argument */ + if (argn <= last_file_arg_seen) { + outfilename = NULL; /* -outfile applies to just one input file */ + continue; /* ignore this name if previously processed */ + } + break; /* else done parsing switches */ + } + arg++; /* advance past switch marker character */ + + if (keymatch(arg, "bmp", 1)) { + /* BMP output format. */ + requested_fmt = FMT_BMP; + + } else if (keymatch(arg, "colors", 1) || keymatch(arg, "colours", 1) || + keymatch(arg, "quantize", 1) || keymatch(arg, "quantise", 1)) { + /* Do color quantization. */ + int val; + + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%d", &val) != 1) + usage(); + cinfo->desired_number_of_colors = val; + cinfo->quantize_colors = TRUE; + + } else if (keymatch(arg, "dct", 2)) { + /* Select IDCT algorithm. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + if (keymatch(argv[argn], "int", 1)) { + cinfo->dct_method = JDCT_ISLOW; + } else if (keymatch(argv[argn], "fast", 2)) { + cinfo->dct_method = JDCT_IFAST; + } else if (keymatch(argv[argn], "float", 2)) { + cinfo->dct_method = JDCT_FLOAT; + } else + usage(); + + } else if (keymatch(arg, "dither", 2)) { + /* Select dithering algorithm. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + if (keymatch(argv[argn], "fs", 2)) { + cinfo->dither_mode = JDITHER_FS; + } else if (keymatch(argv[argn], "none", 2)) { + cinfo->dither_mode = JDITHER_NONE; + } else if (keymatch(argv[argn], "ordered", 2)) { + cinfo->dither_mode = JDITHER_ORDERED; + } else + usage(); + + } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) { + /* Enable debug printouts. */ + /* On first -d, print version identification */ + static boolean printed_version = FALSE; + + if (! printed_version) { + fprintf(stderr, "Independent JPEG Group's DJPEG, version %s\n%s\n", + JVERSION, JCOPYRIGHT); + printed_version = TRUE; + } + cinfo->err->trace_level++; + + } else if (keymatch(arg, "fast", 1)) { + /* Select recommended processing options for quick-and-dirty output. */ + cinfo->two_pass_quantize = FALSE; + cinfo->dither_mode = JDITHER_ORDERED; + if (! cinfo->quantize_colors) /* don't override an earlier -colors */ + cinfo->desired_number_of_colors = 216; + cinfo->dct_method = JDCT_FASTEST; + cinfo->do_fancy_upsampling = FALSE; + + } else if (keymatch(arg, "gif", 1)) { + /* GIF output format. */ + requested_fmt = FMT_GIF; + + } else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) { + /* Force monochrome output. */ + cinfo->out_color_space = JCS_GRAYSCALE; + + } else if (keymatch(arg, "map", 3)) { + /* Quantize to a color map taken from an input file. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + if (for_real) { /* too expensive to do twice! */ +#ifdef QUANT_2PASS_SUPPORTED /* otherwise can't quantize to supplied map */ + FILE * mapfile; + + if ((mapfile = fopen(argv[argn], READ_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); + exit(EXIT_FAILURE); + } + read_color_map(cinfo, mapfile); + fclose(mapfile); + cinfo->quantize_colors = TRUE; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } + + } else if (keymatch(arg, "maxmemory", 3)) { + /* Maximum memory in Kb (or Mb with 'm'). */ + long lval; + char ch = 'x'; + + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) + usage(); + if (ch == 'm' || ch == 'M') + lval *= 1000L; + cinfo->mem->max_memory_to_use = lval * 1000L; + + } else if (keymatch(arg, "nosmooth", 3)) { + /* Suppress fancy upsampling */ + cinfo->do_fancy_upsampling = FALSE; + + } else if (keymatch(arg, "onepass", 3)) { + /* Use fast one-pass quantization. */ + cinfo->two_pass_quantize = FALSE; + + } else if (keymatch(arg, "os2", 3)) { + /* BMP output format (OS/2 flavor). */ + requested_fmt = FMT_OS2; + + } else if (keymatch(arg, "outfile", 4)) { + /* Set output file name. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + outfilename = argv[argn]; /* save it away for later use */ + + } else if (keymatch(arg, "pnm", 1) || keymatch(arg, "ppm", 1)) { + /* PPM/PGM output format. */ + requested_fmt = FMT_PPM; + + } else if (keymatch(arg, "rle", 1)) { + /* RLE output format. */ + requested_fmt = FMT_RLE; + + } else if (keymatch(arg, "scale", 1)) { + /* Scale the output image by a fraction M/N. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%d/%d", + &cinfo->scale_num, &cinfo->scale_denom) != 2) + usage(); + + } else if (keymatch(arg, "targa", 1)) { + /* Targa output format. */ + requested_fmt = FMT_TARGA; + + } else { + usage(); /* bogus switch */ + } + } + + return argn; /* return index of next arg (file name) */ +} + + +/* + * Marker processor for COM and interesting APPn markers. + * This replaces the library's built-in processor, which just skips the marker. + * We want to print out the marker as text, to the extent possible. + * Note this code relies on a non-suspending data source. + */ + +LOCAL(unsigned int) +jpeg_getc (j_decompress_ptr cinfo) +/* Read next byte */ +{ + struct jpeg_source_mgr * datasrc = cinfo->src; + + if (datasrc->bytes_in_buffer == 0) { + if (! (*datasrc->fill_input_buffer) (cinfo)) + ERREXIT(cinfo, JERR_CANT_SUSPEND); + } + datasrc->bytes_in_buffer--; + return GETJOCTET(*datasrc->next_input_byte++); +} + + +METHODDEF(boolean) +print_text_marker (j_decompress_ptr cinfo) +{ + boolean traceit = (cinfo->err->trace_level >= 1); + INT32 length; + unsigned int ch; + unsigned int lastch = 0; + + length = jpeg_getc(cinfo) << 8; + length += jpeg_getc(cinfo); + length -= 2; /* discount the length word itself */ + + if (traceit) { + if (cinfo->unread_marker == JPEG_COM) + fprintf(stderr, "Comment, length %ld:\n", (long) length); + else /* assume it is an APPn otherwise */ + fprintf(stderr, "APP%d, length %ld:\n", + cinfo->unread_marker - JPEG_APP0, (long) length); + } + + while (--length >= 0) { + ch = jpeg_getc(cinfo); + if (traceit) { + /* Emit the character in a readable form. + * Nonprintables are converted to \nnn form, + * while \ is converted to \\. + * Newlines in CR, CR/LF, or LF form will be printed as one newline. + */ + if (ch == '\r') { + fprintf(stderr, "\n"); + } else if (ch == '\n') { + if (lastch != '\r') + fprintf(stderr, "\n"); + } else if (ch == '\\') { + fprintf(stderr, "\\\\"); + } else if (isprint(ch)) { + putc(ch, stderr); + } else { + fprintf(stderr, "\\%03o", ch); + } + lastch = ch; + } + } + + if (traceit) + fprintf(stderr, "\n"); + + return TRUE; +} + + +/* + * The main program. + */ + +int +main (int argc, char **argv) +{ + struct jpeg_decompress_struct cinfo; + struct jpeg_error_mgr jerr; +#ifdef PROGRESS_REPORT + struct cdjpeg_progress_mgr progress; +#endif + int file_index; + djpeg_dest_ptr dest_mgr = NULL; + FILE * input_file; + FILE * output_file; + JDIMENSION num_scanlines; + + /* On Mac, fetch a command line. */ +#ifdef USE_CCOMMAND + argc = ccommand(&argv); +#endif + + progname = argv[0]; + if (progname == NULL || progname[0] == 0) + progname = "djpeg"; /* in case C library doesn't provide it */ + + /* Initialize the JPEG decompression object with default error handling. */ + cinfo.err = jpeg_std_error(&jerr); + jpeg_create_decompress(&cinfo); + /* Add some application-specific error messages (from cderror.h) */ + jerr.addon_message_table = cdjpeg_message_table; + jerr.first_addon_message = JMSG_FIRSTADDONCODE; + jerr.last_addon_message = JMSG_LASTADDONCODE; + + /* Insert custom marker processor for COM and APP12. + * APP12 is used by some digital camera makers for textual info, + * so we provide the ability to display it as text. + * If you like, additional APPn marker types can be selected for display, + * but don't try to override APP0 or APP14 this way (see libjpeg.doc). + */ + jpeg_set_marker_processor(&cinfo, JPEG_COM, print_text_marker); + jpeg_set_marker_processor(&cinfo, JPEG_APP0+12, print_text_marker); + + /* Now safe to enable signal catcher. */ +#ifdef NEED_SIGNAL_CATCHER + enable_signal_catcher((j_common_ptr) &cinfo); +#endif + + /* Scan command line to find file names. */ + /* It is convenient to use just one switch-parsing routine, but the switch + * values read here are ignored; we will rescan the switches after opening + * the input file. + * (Exception: tracing level set here controls verbosity for COM markers + * found during jpeg_read_header...) + */ + + file_index = parse_switches(&cinfo, argc, argv, 0, FALSE); + +#ifdef TWO_FILE_COMMANDLINE + /* Must have either -outfile switch or explicit output file name */ + if (outfilename == NULL) { + if (file_index != argc-2) { + fprintf(stderr, "%s: must name one input and one output file\n", + progname); + usage(); + } + outfilename = argv[file_index+1]; + } else { + if (file_index != argc-1) { + fprintf(stderr, "%s: must name one input and one output file\n", + progname); + usage(); + } + } +#else + /* Unix style: expect zero or one file name */ + if (file_index < argc-1) { + fprintf(stderr, "%s: only one input file\n", progname); + usage(); + } +#endif /* TWO_FILE_COMMANDLINE */ + + /* Open the input file. */ + if (file_index < argc) { + if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]); + exit(EXIT_FAILURE); + } + } else { + /* default input file is stdin */ + input_file = read_stdin(); + } + + /* Open the output file. */ + if (outfilename != NULL) { + if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, outfilename); + exit(EXIT_FAILURE); + } + } else { + /* default output file is stdout */ + output_file = write_stdout(); + } + +#ifdef PROGRESS_REPORT + start_progress_monitor((j_common_ptr) &cinfo, &progress); +#endif + + /* Specify data source for decompression */ + jpeg_stdio_src(&cinfo, input_file); + + /* Read file header, set default decompression parameters */ + (void) jpeg_read_header(&cinfo, TRUE); + + /* Adjust default decompression parameters by re-parsing the options */ + file_index = parse_switches(&cinfo, argc, argv, 0, TRUE); + + /* Initialize the output module now to let it override any crucial + * option settings (for instance, GIF wants to force color quantization). + */ + switch (requested_fmt) { +#ifdef BMP_SUPPORTED + case FMT_BMP: + dest_mgr = jinit_write_bmp(&cinfo, FALSE); + break; + case FMT_OS2: + dest_mgr = jinit_write_bmp(&cinfo, TRUE); + break; +#endif +#ifdef GIF_SUPPORTED + case FMT_GIF: + dest_mgr = jinit_write_gif(&cinfo); + break; +#endif +#ifdef PPM_SUPPORTED + case FMT_PPM: + dest_mgr = jinit_write_ppm(&cinfo); + break; +#endif +#ifdef RLE_SUPPORTED + case FMT_RLE: + dest_mgr = jinit_write_rle(&cinfo); + break; +#endif +#ifdef TARGA_SUPPORTED + case FMT_TARGA: + dest_mgr = jinit_write_targa(&cinfo); + break; +#endif + default: + ERREXIT(&cinfo, JERR_UNSUPPORTED_FORMAT); + break; + } + dest_mgr->output_file = output_file; + + /* Start decompressor */ + (void) jpeg_start_decompress(&cinfo); + + /* Write output file header */ + (*dest_mgr->start_output) (&cinfo, dest_mgr); + + /* Process data */ + while (cinfo.output_scanline < cinfo.output_height) { + num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer, + dest_mgr->buffer_height); + (*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines); + } + +#ifdef PROGRESS_REPORT + /* Hack: count final pass as done in case finish_output does an extra pass. + * The library won't have updated completed_passes. + */ + progress.pub.completed_passes = progress.pub.total_passes; +#endif + + /* Finish decompression and release memory. + * I must do it in this order because output module has allocated memory + * of lifespan JPOOL_IMAGE; it needs to finish before releasing memory. + */ + (*dest_mgr->finish_output) (&cinfo, dest_mgr); + (void) jpeg_finish_decompress(&cinfo); + jpeg_destroy_decompress(&cinfo); + + /* Close files, if we opened them */ + if (input_file != stdin) + fclose(input_file); + if (output_file != stdout) + fclose(output_file); + +#ifdef PROGRESS_REPORT + end_progress_monitor((j_common_ptr) &cinfo); +#endif + + /* All done. */ + exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS); + return 0; /* suppress no-return-value warnings */ +} diff --git a/gtkmm-osx/jpeg-6b/example.c b/gtkmm-osx/jpeg-6b/example.c new file mode 100644 index 0000000..7fc354f --- /dev/null +++ b/gtkmm-osx/jpeg-6b/example.c @@ -0,0 +1,433 @@ +/* + * example.c + * + * This file illustrates how to use the IJG code as a subroutine library + * to read or write JPEG image files. You should look at this code in + * conjunction with the documentation file libjpeg.doc. + * + * This code will not do anything useful as-is, but it may be helpful as a + * skeleton for constructing routines that call the JPEG library. + * + * We present these routines in the same coding style used in the JPEG code + * (ANSI function definitions, etc); but you are of course free to code your + * routines in a different style if you prefer. + */ + +#include + +/* + * Include file for users of JPEG library. + * You will need to have included system headers that define at least + * the typedefs FILE and size_t before you can include jpeglib.h. + * (stdio.h is sufficient on ANSI-conforming systems.) + * You may also wish to include "jerror.h". + */ + +#include "jpeglib.h" + +/* + * is used for the optional error recovery mechanism shown in + * the second part of the example. + */ + +#include + + + +/******************** JPEG COMPRESSION SAMPLE INTERFACE *******************/ + +/* This half of the example shows how to feed data into the JPEG compressor. + * We present a minimal version that does not worry about refinements such + * as error recovery (the JPEG code will just exit() if it gets an error). + */ + + +/* + * IMAGE DATA FORMATS: + * + * The standard input image format is a rectangular array of pixels, with + * each pixel having the same number of "component" values (color channels). + * Each pixel row is an array of JSAMPLEs (which typically are unsigned chars). + * If you are working with color data, then the color values for each pixel + * must be adjacent in the row; for example, R,G,B,R,G,B,R,G,B,... for 24-bit + * RGB color. + * + * For this example, we'll assume that this data structure matches the way + * our application has stored the image in memory, so we can just pass a + * pointer to our image buffer. In particular, let's say that the image is + * RGB color and is described by: + */ + +extern JSAMPLE * image_buffer; /* Points to large array of R,G,B-order data */ +extern int image_height; /* Number of rows in image */ +extern int image_width; /* Number of columns in image */ + + +/* + * Sample routine for JPEG compression. We assume that the target file name + * and a compression quality factor are passed in. + */ + +GLOBAL(void) +write_JPEG_file (char * filename, int quality) +{ + /* This struct contains the JPEG compression parameters and pointers to + * working space (which is allocated as needed by the JPEG library). + * It is possible to have several such structures, representing multiple + * compression/decompression processes, in existence at once. We refer + * to any one struct (and its associated working data) as a "JPEG object". + */ + struct jpeg_compress_struct cinfo; + /* This struct represents a JPEG error handler. It is declared separately + * because applications often want to supply a specialized error handler + * (see the second half of this file for an example). But here we just + * take the easy way out and use the standard error handler, which will + * print a message on stderr and call exit() if compression fails. + * Note that this struct must live as long as the main JPEG parameter + * struct, to avoid dangling-pointer problems. + */ + struct jpeg_error_mgr jerr; + /* More stuff */ + FILE * outfile; /* target file */ + JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */ + int row_stride; /* physical row width in image buffer */ + + /* Step 1: allocate and initialize JPEG compression object */ + + /* We have to set up the error handler first, in case the initialization + * step fails. (Unlikely, but it could happen if you are out of memory.) + * This routine fills in the contents of struct jerr, and returns jerr's + * address which we place into the link field in cinfo. + */ + cinfo.err = jpeg_std_error(&jerr); + /* Now we can initialize the JPEG compression object. */ + jpeg_create_compress(&cinfo); + + /* Step 2: specify data destination (eg, a file) */ + /* Note: steps 2 and 3 can be done in either order. */ + + /* Here we use the library-supplied code to send compressed data to a + * stdio stream. You can also write your own code to do something else. + * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that + * requires it in order to write binary files. + */ + if ((outfile = fopen(filename, "wb")) == NULL) { + fprintf(stderr, "can't open %s\n", filename); + exit(1); + } + jpeg_stdio_dest(&cinfo, outfile); + + /* Step 3: set parameters for compression */ + + /* First we supply a description of the input image. + * Four fields of the cinfo struct must be filled in: + */ + cinfo.image_width = image_width; /* image width and height, in pixels */ + cinfo.image_height = image_height; + cinfo.input_components = 3; /* # of color components per pixel */ + cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ + /* Now use the library's routine to set default compression parameters. + * (You must set at least cinfo.in_color_space before calling this, + * since the defaults depend on the source color space.) + */ + jpeg_set_defaults(&cinfo); + /* Now you can set any non-default parameters you wish to. + * Here we just illustrate the use of quality (quantization table) scaling: + */ + jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */); + + /* Step 4: Start compressor */ + + /* TRUE ensures that we will write a complete interchange-JPEG file. + * Pass TRUE unless you are very sure of what you're doing. + */ + jpeg_start_compress(&cinfo, TRUE); + + /* Step 5: while (scan lines remain to be written) */ + /* jpeg_write_scanlines(...); */ + + /* Here we use the library's state variable cinfo.next_scanline as the + * loop counter, so that we don't have to keep track ourselves. + * To keep things simple, we pass one scanline per call; you can pass + * more if you wish, though. + */ + row_stride = image_width * 3; /* JSAMPLEs per row in image_buffer */ + + while (cinfo.next_scanline < cinfo.image_height) { + /* jpeg_write_scanlines expects an array of pointers to scanlines. + * Here the array is only one element long, but you could pass + * more than one scanline at a time if that's more convenient. + */ + row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride]; + (void) jpeg_write_scanlines(&cinfo, row_pointer, 1); + } + + /* Step 6: Finish compression */ + + jpeg_finish_compress(&cinfo); + /* After finish_compress, we can close the output file. */ + fclose(outfile); + + /* Step 7: release JPEG compression object */ + + /* This is an important step since it will release a good deal of memory. */ + jpeg_destroy_compress(&cinfo); + + /* And we're done! */ +} + + +/* + * SOME FINE POINTS: + * + * In the above loop, we ignored the return value of jpeg_write_scanlines, + * which is the number of scanlines actually written. We could get away + * with this because we were only relying on the value of cinfo.next_scanline, + * which will be incremented correctly. If you maintain additional loop + * variables then you should be careful to increment them properly. + * Actually, for output to a stdio stream you needn't worry, because + * then jpeg_write_scanlines will write all the lines passed (or else exit + * with a fatal error). Partial writes can only occur if you use a data + * destination module that can demand suspension of the compressor. + * (If you don't know what that's for, you don't need it.) + * + * If the compressor requires full-image buffers (for entropy-coding + * optimization or a multi-scan JPEG file), it will create temporary + * files for anything that doesn't fit within the maximum-memory setting. + * (Note that temp files are NOT needed if you use the default parameters.) + * On some systems you may need to set up a signal handler to ensure that + * temporary files are deleted if the program is interrupted. See libjpeg.doc. + * + * Scanlines MUST be supplied in top-to-bottom order if you want your JPEG + * files to be compatible with everyone else's. If you cannot readily read + * your data in that order, you'll need an intermediate array to hold the + * image. See rdtarga.c or rdbmp.c for examples of handling bottom-to-top + * source data using the JPEG code's internal virtual-array mechanisms. + */ + + + +/******************** JPEG DECOMPRESSION SAMPLE INTERFACE *******************/ + +/* This half of the example shows how to read data from the JPEG decompressor. + * It's a bit more refined than the above, in that we show: + * (a) how to modify the JPEG library's standard error-reporting behavior; + * (b) how to allocate workspace using the library's memory manager. + * + * Just to make this example a little different from the first one, we'll + * assume that we do not intend to put the whole image into an in-memory + * buffer, but to send it line-by-line someplace else. We need a one- + * scanline-high JSAMPLE array as a work buffer, and we will let the JPEG + * memory manager allocate it for us. This approach is actually quite useful + * because we don't need to remember to deallocate the buffer separately: it + * will go away automatically when the JPEG object is cleaned up. + */ + + +/* + * ERROR HANDLING: + * + * The JPEG library's standard error handler (jerror.c) is divided into + * several "methods" which you can override individually. This lets you + * adjust the behavior without duplicating a lot of code, which you might + * have to update with each future release. + * + * Our example here shows how to override the "error_exit" method so that + * control is returned to the library's caller when a fatal error occurs, + * rather than calling exit() as the standard error_exit method does. + * + * We use C's setjmp/longjmp facility to return control. This means that the + * routine which calls the JPEG library must first execute a setjmp() call to + * establish the return point. We want the replacement error_exit to do a + * longjmp(). But we need to make the setjmp buffer accessible to the + * error_exit routine. To do this, we make a private extension of the + * standard JPEG error handler object. (If we were using C++, we'd say we + * were making a subclass of the regular error handler.) + * + * Here's the extended error handler struct: + */ + +struct my_error_mgr { + struct jpeg_error_mgr pub; /* "public" fields */ + + jmp_buf setjmp_buffer; /* for return to caller */ +}; + +typedef struct my_error_mgr * my_error_ptr; + +/* + * Here's the routine that will replace the standard error_exit method: + */ + +METHODDEF(void) +my_error_exit (j_common_ptr cinfo) +{ + /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */ + my_error_ptr myerr = (my_error_ptr) cinfo->err; + + /* Always display the message. */ + /* We could postpone this until after returning, if we chose. */ + (*cinfo->err->output_message) (cinfo); + + /* Return control to the setjmp point */ + longjmp(myerr->setjmp_buffer, 1); +} + + +/* + * Sample routine for JPEG decompression. We assume that the source file name + * is passed in. We want to return 1 on success, 0 on error. + */ + + +GLOBAL(int) +read_JPEG_file (char * filename) +{ + /* This struct contains the JPEG decompression parameters and pointers to + * working space (which is allocated as needed by the JPEG library). + */ + struct jpeg_decompress_struct cinfo; + /* We use our private extension JPEG error handler. + * Note that this struct must live as long as the main JPEG parameter + * struct, to avoid dangling-pointer problems. + */ + struct my_error_mgr jerr; + /* More stuff */ + FILE * infile; /* source file */ + JSAMPARRAY buffer; /* Output row buffer */ + int row_stride; /* physical row width in output buffer */ + + /* In this example we want to open the input file before doing anything else, + * so that the setjmp() error recovery below can assume the file is open. + * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that + * requires it in order to read binary files. + */ + + if ((infile = fopen(filename, "rb")) == NULL) { + fprintf(stderr, "can't open %s\n", filename); + return 0; + } + + /* Step 1: allocate and initialize JPEG decompression object */ + + /* We set up the normal JPEG error routines, then override error_exit. */ + cinfo.err = jpeg_std_error(&jerr.pub); + jerr.pub.error_exit = my_error_exit; + /* Establish the setjmp return context for my_error_exit to use. */ + if (setjmp(jerr.setjmp_buffer)) { + /* If we get here, the JPEG code has signaled an error. + * We need to clean up the JPEG object, close the input file, and return. + */ + jpeg_destroy_decompress(&cinfo); + fclose(infile); + return 0; + } + /* Now we can initialize the JPEG decompression object. */ + jpeg_create_decompress(&cinfo); + + /* Step 2: specify data source (eg, a file) */ + + jpeg_stdio_src(&cinfo, infile); + + /* Step 3: read file parameters with jpeg_read_header() */ + + (void) jpeg_read_header(&cinfo, TRUE); + /* We can ignore the return value from jpeg_read_header since + * (a) suspension is not possible with the stdio data source, and + * (b) we passed TRUE to reject a tables-only JPEG file as an error. + * See libjpeg.doc for more info. + */ + + /* Step 4: set parameters for decompression */ + + /* In this example, we don't need to change any of the defaults set by + * jpeg_read_header(), so we do nothing here. + */ + + /* Step 5: Start decompressor */ + + (void) jpeg_start_decompress(&cinfo); + /* We can ignore the return value since suspension is not possible + * with the stdio data source. + */ + + /* We may need to do some setup of our own at this point before reading + * the data. After jpeg_start_decompress() we have the correct scaled + * output image dimensions available, as well as the output colormap + * if we asked for color quantization. + * In this example, we need to make an output work buffer of the right size. + */ + /* JSAMPLEs per row in output buffer */ + row_stride = cinfo.output_width * cinfo.output_components; + /* Make a one-row-high sample array that will go away when done with image */ + buffer = (*cinfo.mem->alloc_sarray) + ((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1); + + /* Step 6: while (scan lines remain to be read) */ + /* jpeg_read_scanlines(...); */ + + /* Here we use the library's state variable cinfo.output_scanline as the + * loop counter, so that we don't have to keep track ourselves. + */ + while (cinfo.output_scanline < cinfo.output_height) { + /* jpeg_read_scanlines expects an array of pointers to scanlines. + * Here the array is only one element long, but you could ask for + * more than one scanline at a time if that's more convenient. + */ + (void) jpeg_read_scanlines(&cinfo, buffer, 1); + /* Assume put_scanline_someplace wants a pointer and sample count. */ + put_scanline_someplace(buffer[0], row_stride); + } + + /* Step 7: Finish decompression */ + + (void) jpeg_finish_decompress(&cinfo); + /* We can ignore the return value since suspension is not possible + * with the stdio data source. + */ + + /* Step 8: Release JPEG decompression object */ + + /* This is an important step since it will release a good deal of memory. */ + jpeg_destroy_decompress(&cinfo); + + /* After finish_decompress, we can close the input file. + * Here we postpone it until after no more JPEG errors are possible, + * so as to simplify the setjmp error logic above. (Actually, I don't + * think that jpeg_destroy can do an error exit, but why assume anything...) + */ + fclose(infile); + + /* At this point you may want to check to see whether any corrupt-data + * warnings occurred (test whether jerr.pub.num_warnings is nonzero). + */ + + /* And we're done! */ + return 1; +} + + +/* + * SOME FINE POINTS: + * + * In the above code, we ignored the return value of jpeg_read_scanlines, + * which is the number of scanlines actually read. We could get away with + * this because we asked for only one line at a time and we weren't using + * a suspending data source. See libjpeg.doc for more info. + * + * We cheated a bit by calling alloc_sarray() after jpeg_start_decompress(); + * we should have done it beforehand to ensure that the space would be + * counted against the JPEG max_memory setting. In some systems the above + * code would risk an out-of-memory error. However, in general we don't + * know the output image dimensions before jpeg_start_decompress(), unless we + * call jpeg_calc_output_dimensions(). See libjpeg.doc for more about this. + * + * Scanlines are returned in the same order as they appear in the JPEG file, + * which is standardly top-to-bottom. If you must emit data bottom-to-top, + * you can use one of the virtual arrays provided by the JPEG memory manager + * to invert the data. See wrbmp.c for an example. + * + * As with compression, some operating modes may require temporary files. + * On some systems you may need to set up a signal handler to ensure that + * temporary files are deleted if the program is interrupted. See libjpeg.doc. + */ diff --git a/gtkmm-osx/jpeg-6b/filelist.doc b/gtkmm-osx/jpeg-6b/filelist.doc new file mode 100644 index 0000000..e14982c --- /dev/null +++ b/gtkmm-osx/jpeg-6b/filelist.doc @@ -0,0 +1,210 @@ +IJG JPEG LIBRARY: FILE LIST + +Copyright (C) 1994-1998, Thomas G. Lane. +This file is part of the Independent JPEG Group's software. +For conditions of distribution and use, see the accompanying README file. + + +Here is a road map to the files in the IJG JPEG distribution. The +distribution includes the JPEG library proper, plus two application +programs ("cjpeg" and "djpeg") which use the library to convert JPEG +files to and from some other popular image formats. A third application +"jpegtran" uses the library to do lossless conversion between different +variants of JPEG. There are also two stand-alone applications, +"rdjpgcom" and "wrjpgcom". + + +THE JPEG LIBRARY +================ + +Include files: + +jpeglib.h JPEG library's exported data and function declarations. +jconfig.h Configuration declarations. Note: this file is not present + in the distribution; it is generated during installation. +jmorecfg.h Additional configuration declarations; need not be changed + for a standard installation. +jerror.h Declares JPEG library's error and trace message codes. +jinclude.h Central include file used by all IJG .c files to reference + system include files. +jpegint.h JPEG library's internal data structures. +jchuff.h Private declarations for Huffman encoder modules. +jdhuff.h Private declarations for Huffman decoder modules. +jdct.h Private declarations for forward & reverse DCT subsystems. +jmemsys.h Private declarations for memory management subsystem. +jversion.h Version information. + +Applications using the library should include jpeglib.h (which in turn +includes jconfig.h and jmorecfg.h). Optionally, jerror.h may be included +if the application needs to reference individual JPEG error codes. The +other include files are intended for internal use and would not normally +be included by an application program. (cjpeg/djpeg/etc do use jinclude.h, +since its function is to improve portability of the whole IJG distribution. +Most other applications will directly include the system include files they +want, and hence won't need jinclude.h.) + + +C source code files: + +These files contain most of the functions intended to be called directly by +an application program: + +jcapimin.c Application program interface: core routines for compression. +jcapistd.c Application program interface: standard compression. +jdapimin.c Application program interface: core routines for decompression. +jdapistd.c Application program interface: standard decompression. +jcomapi.c Application program interface routines common to compression + and decompression. +jcparam.c Compression parameter setting helper routines. +jctrans.c API and library routines for transcoding compression. +jdtrans.c API and library routines for transcoding decompression. + +Compression side of the library: + +jcinit.c Initialization: determines which other modules to use. +jcmaster.c Master control: setup and inter-pass sequencing logic. +jcmainct.c Main buffer controller (preprocessor => JPEG compressor). +jcprepct.c Preprocessor buffer controller. +jccoefct.c Buffer controller for DCT coefficient buffer. +jccolor.c Color space conversion. +jcsample.c Downsampling. +jcdctmgr.c DCT manager (DCT implementation selection & control). +jfdctint.c Forward DCT using slow-but-accurate integer method. +jfdctfst.c Forward DCT using faster, less accurate integer method. +jfdctflt.c Forward DCT using floating-point arithmetic. +jchuff.c Huffman entropy coding for sequential JPEG. +jcphuff.c Huffman entropy coding for progressive JPEG. +jcmarker.c JPEG marker writing. +jdatadst.c Data destination manager for stdio output. + +Decompression side of the library: + +jdmaster.c Master control: determines which other modules to use. +jdinput.c Input controller: controls input processing modules. +jdmainct.c Main buffer controller (JPEG decompressor => postprocessor). +jdcoefct.c Buffer controller for DCT coefficient buffer. +jdpostct.c Postprocessor buffer controller. +jdmarker.c JPEG marker reading. +jdhuff.c Huffman entropy decoding for sequential JPEG. +jdphuff.c Huffman entropy decoding for progressive JPEG. +jddctmgr.c IDCT manager (IDCT implementation selection & control). +jidctint.c Inverse DCT using slow-but-accurate integer method. +jidctfst.c Inverse DCT using faster, less accurate integer method. +jidctflt.c Inverse DCT using floating-point arithmetic. +jidctred.c Inverse DCTs with reduced-size outputs. +jdsample.c Upsampling. +jdcolor.c Color space conversion. +jdmerge.c Merged upsampling/color conversion (faster, lower quality). +jquant1.c One-pass color quantization using a fixed-spacing colormap. +jquant2.c Two-pass color quantization using a custom-generated colormap. + Also handles one-pass quantization to an externally given map. +jdatasrc.c Data source manager for stdio input. + +Support files for both compression and decompression: + +jerror.c Standard error handling routines (application replaceable). +jmemmgr.c System-independent (more or less) memory management code. +jutils.c Miscellaneous utility routines. + +jmemmgr.c relies on a system-dependent memory management module. The IJG +distribution includes the following implementations of the system-dependent +module: + +jmemnobs.c "No backing store": assumes adequate virtual memory exists. +jmemansi.c Makes temporary files with ANSI-standard routine tmpfile(). +jmemname.c Makes temporary files with program-generated file names. +jmemdos.c Custom implementation for MS-DOS (16-bit environment only): + can use extended and expanded memory as well as temp files. +jmemmac.c Custom implementation for Apple Macintosh. + +Exactly one of the system-dependent modules should be configured into an +installed JPEG library (see install.doc for hints about which one to use). +On unusual systems you may find it worthwhile to make a special +system-dependent memory manager. + + +Non-C source code files: + +jmemdosa.asm 80x86 assembly code support for jmemdos.c; used only in + MS-DOS-specific configurations of the JPEG library. + + +CJPEG/DJPEG/JPEGTRAN +==================== + +Include files: + +cdjpeg.h Declarations shared by cjpeg/djpeg/jpegtran modules. +cderror.h Additional error and trace message codes for cjpeg et al. +transupp.h Declarations for jpegtran support routines in transupp.c. + +C source code files: + +cjpeg.c Main program for cjpeg. +djpeg.c Main program for djpeg. +jpegtran.c Main program for jpegtran. +cdjpeg.c Utility routines used by all three programs. +rdcolmap.c Code to read a colormap file for djpeg's "-map" switch. +rdswitch.c Code to process some of cjpeg's more complex switches. + Also used by jpegtran. +transupp.c Support code for jpegtran: lossless image manipulations. + +Image file reader modules for cjpeg: + +rdbmp.c BMP file input. +rdgif.c GIF file input (now just a stub). +rdppm.c PPM/PGM file input. +rdrle.c Utah RLE file input. +rdtarga.c Targa file input. + +Image file writer modules for djpeg: + +wrbmp.c BMP file output. +wrgif.c GIF file output (a mere shadow of its former self). +wrppm.c PPM/PGM file output. +wrrle.c Utah RLE file output. +wrtarga.c Targa file output. + + +RDJPGCOM/WRJPGCOM +================= + +C source code files: + +rdjpgcom.c Stand-alone rdjpgcom application. +wrjpgcom.c Stand-alone wrjpgcom application. + +These programs do not depend on the IJG library. They do use +jconfig.h and jinclude.h, only to improve portability. + + +ADDITIONAL FILES +================ + +Documentation (see README for a guide to the documentation files): + +README Master documentation file. +*.doc Other documentation files. +*.1 Documentation in Unix man page format. +change.log Version-to-version change highlights. +example.c Sample code for calling JPEG library. + +Configuration/installation files and programs (see install.doc for more info): + +configure Unix shell script to perform automatic configuration. +ltconfig Support scripts for configure (from GNU libtool). +ltmain.sh +config.guess +config.sub +install-sh Install shell script for those Unix systems lacking one. +ckconfig.c Program to generate jconfig.h on non-Unix systems. +jconfig.doc Template for making jconfig.h by hand. +makefile.* Sample makefiles for particular systems. +jconfig.* Sample jconfig.h for particular systems. +ansi2knr.c De-ANSIfier for pre-ANSI C compilers (courtesy of + L. Peter Deutsch and Aladdin Enterprises). + +Test files (see install.doc for test procedure): + +test*.* Source and comparison files for confidence test. + These are binary image files, NOT text files. diff --git a/gtkmm-osx/jpeg-6b/install-sh b/gtkmm-osx/jpeg-6b/install-sh new file mode 100755 index 0000000..e843669 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/install-sh @@ -0,0 +1,250 @@ +#!/bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/gtkmm-osx/jpeg-6b/install.doc b/gtkmm-osx/jpeg-6b/install.doc new file mode 100644 index 0000000..3702b98 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/install.doc @@ -0,0 +1,1063 @@ +INSTALLATION INSTRUCTIONS for the Independent JPEG Group's JPEG software + +Copyright (C) 1991-1998, Thomas G. Lane. +This file is part of the Independent JPEG Group's software. +For conditions of distribution and use, see the accompanying README file. + + +This file explains how to configure and install the IJG software. We have +tried to make this software extremely portable and flexible, so that it can be +adapted to almost any environment. The downside of this decision is that the +installation process is complicated. We have provided shortcuts to simplify +the task on common systems. But in any case, you will need at least a little +familiarity with C programming and program build procedures for your system. + +If you are only using this software as part of a larger program, the larger +program's installation procedure may take care of configuring the IJG code. +For example, Ghostscript's installation script will configure the IJG code. +You don't need to read this file if you just want to compile Ghostscript. + +If you are on a Unix machine, you may not need to read this file at all. +Try doing + ./configure + make + make test +If that doesn't complain, do + make install +(better do "make -n install" first to see if the makefile will put the files +where you want them). Read further if you run into snags or want to customize +the code for your system. + + +TABLE OF CONTENTS +----------------- + +Before you start +Configuring the software: + using the automatic "configure" script + using one of the supplied jconfig and makefile files + by hand +Building the software +Testing the software +Installing the software +Optional stuff +Optimization +Hints for specific systems + + +BEFORE YOU START +================ + +Before installing the software you must unpack the distributed source code. +Since you are reading this file, you have probably already succeeded in this +task. However, there is a potential for error if you needed to convert the +files to the local standard text file format (for example, if you are on +MS-DOS you may have converted LF end-of-line to CR/LF). You must apply +such conversion to all the files EXCEPT those whose names begin with "test". +The test files contain binary data; if you change them in any way then the +self-test will give bad results. + +Please check the last section of this file to see if there are hints for the +specific machine or compiler you are using. + + +CONFIGURING THE SOFTWARE +======================== + +To configure the IJG code for your system, you need to create two files: + * jconfig.h: contains values for system-dependent #define symbols. + * Makefile: controls the compilation process. +(On a non-Unix machine, you may create "project files" or some other +substitute for a Makefile. jconfig.h is needed in any environment.) + +We provide three different ways to generate these files: + * On a Unix system, you can just run the "configure" script. + * We provide sample jconfig files and makefiles for popular machines; + if your machine matches one of the samples, just copy the right sample + files to jconfig.h and Makefile. + * If all else fails, read the instructions below and make your own files. + + +Configuring the software using the automatic "configure" script +--------------------------------------------------------------- + +If you are on a Unix machine, you can just type + ./configure +and let the configure script construct appropriate configuration files. +If you're using "csh" on an old version of System V, you might need to type + sh configure +instead to prevent csh from trying to execute configure itself. +Expect configure to run for a few minutes, particularly on slower machines; +it works by compiling a series of test programs. + +Configure was created with GNU Autoconf and it follows the usual conventions +for GNU configure scripts. It makes a few assumptions that you may want to +override. You can do this by providing optional switches to configure: + +* If you want to build libjpeg as a shared library, say + ./configure --enable-shared +To get both shared and static libraries, say + ./configure --enable-shared --enable-static +Note that these switches invoke GNU libtool to take care of system-dependent +shared library building methods. If things don't work this way, please try +running configure without either switch; that should build a static library +without using libtool. If that works, your problem is probably with libtool +not with the IJG code. libtool is fairly new and doesn't support all flavors +of Unix yet. (You might be able to find a newer version of libtool than the +one included with libjpeg; see ftp.gnu.org. Report libtool problems to +bug-libtool@gnu.org.) + +* Configure will use gcc (GNU C compiler) if it's available, otherwise cc. +To force a particular compiler to be selected, use the CC option, for example + ./configure CC='cc' +The same method can be used to include any unusual compiler switches. +For example, on HP-UX you probably want to say + ./configure CC='cc -Aa' +to get HP's compiler to run in ANSI mode. + +* The default CFLAGS setting is "-O" for non-gcc compilers, "-O2" for gcc. +You can override this by saying, for example, + ./configure CFLAGS='-g' +if you want to compile with debugging support. + +* Configure will set up the makefile so that "make install" will install files +into /usr/local/bin, /usr/local/man, etc. You can specify an installation +prefix other than "/usr/local" by giving configure the option "--prefix=PATH". + +* If you don't have a lot of swap space, you may need to enable the IJG +software's internal virtual memory mechanism. To do this, give the option +"--enable-maxmem=N" where N is the default maxmemory limit in megabytes. +This is discussed in more detail under "Selecting a memory manager", below. +You probably don't need to worry about this on reasonably-sized Unix machines, +unless you plan to process very large images. + +Configure has some other features that are useful if you are cross-compiling +or working in a network of multiple machine types; but if you need those +features, you probably already know how to use them. + + +Configuring the software using one of the supplied jconfig and makefile files +----------------------------------------------------------------------------- + +If you have one of these systems, you can just use the provided configuration +files: + +Makefile jconfig file System and/or compiler + +makefile.manx jconfig.manx Amiga, Manx Aztec C +makefile.sas jconfig.sas Amiga, SAS C +makeproj.mac jconfig.mac Apple Macintosh, Metrowerks CodeWarrior +mak*jpeg.st jconfig.st Atari ST/STE/TT, Pure C or Turbo C +makefile.bcc jconfig.bcc MS-DOS or OS/2, Borland C +makefile.dj jconfig.dj MS-DOS, DJGPP (Delorie's port of GNU C) +makefile.mc6 jconfig.mc6 MS-DOS, Microsoft C (16-bit only) +makefile.wat jconfig.wat MS-DOS, OS/2, or Windows NT, Watcom C +makefile.vc jconfig.vc Windows NT/95, MS Visual C++ +make*.ds jconfig.vc Windows NT/95, MS Developer Studio +makefile.mms jconfig.vms Digital VMS, with MMS software +makefile.vms jconfig.vms Digital VMS, without MMS software + +Copy the proper jconfig file to jconfig.h and the makefile to Makefile (or +whatever your system uses as the standard makefile name). For more info see +the appropriate system-specific hints section near the end of this file. + + +Configuring the software by hand +-------------------------------- + +First, generate a jconfig.h file. If you are moderately familiar with C, +the comments in jconfig.doc should be enough information to do this; just +copy jconfig.doc to jconfig.h and edit it appropriately. Otherwise, you may +prefer to use the ckconfig.c program. You will need to compile and execute +ckconfig.c by hand --- we hope you know at least enough to do that. +ckconfig.c may not compile the first try (in fact, the whole idea is for it +to fail if anything is going to). If you get compile errors, fix them by +editing ckconfig.c according to the directions given in ckconfig.c. Once +you get it to run, it will write a suitable jconfig.h file, and will also +print out some advice about which makefile to use. + +You may also want to look at the canned jconfig files, if there is one for a +system similar to yours. + +Second, select a makefile and copy it to Makefile (or whatever your system +uses as the standard makefile name). The most generic makefiles we provide +are + makefile.ansi: if your C compiler supports function prototypes + makefile.unix: if not. +(You have function prototypes if ckconfig.c put "#define HAVE_PROTOTYPES" +in jconfig.h.) You may want to start from one of the other makefiles if +there is one for a system similar to yours. + +Look over the selected Makefile and adjust options as needed. In particular +you may want to change the CC and CFLAGS definitions. For instance, if you +are using GCC, set CC=gcc. If you had to use any compiler switches to get +ckconfig.c to work, make sure the same switches are in CFLAGS. + +If you are on a system that doesn't use makefiles, you'll need to set up +project files (or whatever you do use) to compile all the source files and +link them into executable files cjpeg, djpeg, jpegtran, rdjpgcom, and wrjpgcom. +See the file lists in any of the makefiles to find out which files go into +each program. Note that the provided makefiles all make a "library" file +libjpeg first, but you don't have to do that if you don't want to; the file +lists identify which source files are actually needed for compression, +decompression, or both. As a last resort, you can make a batch script that +just compiles everything and links it all together; makefile.vms is an example +of this (it's for VMS systems that have no make-like utility). + +Here are comments about some specific configuration decisions you'll +need to make: + +Command line style +------------------ + +These programs can use a Unix-like command line style which supports +redirection and piping, like this: + cjpeg inputfile >outputfile + cjpeg outputfile + source program | cjpeg >outputfile +The simpler "two file" command line style is just + cjpeg inputfile outputfile +You may prefer the two-file style, particularly if you don't have pipes. + +You MUST use two-file style on any system that doesn't cope well with binary +data fed through stdin/stdout; this is true for some MS-DOS compilers, for +example. If you're not on a Unix system, it's safest to assume you need +two-file style. (But if your compiler provides either the Posix-standard +fdopen() library routine or a Microsoft-compatible setmode() routine, you +can safely use the Unix command line style, by defining USE_FDOPEN or +USE_SETMODE respectively.) + +To use the two-file style, make jconfig.h say "#define TWO_FILE_COMMANDLINE". + +Selecting a memory manager +-------------------------- + +The IJG code is capable of working on images that are too big to fit in main +memory; data is swapped out to temporary files as necessary. However, the +code to do this is rather system-dependent. We provide five different +memory managers: + +* jmemansi.c This version uses the ANSI-standard library routine tmpfile(), + which not all non-ANSI systems have. On some systems + tmpfile() may put the temporary file in a non-optimal + location; if you don't like what it does, use jmemname.c. + +* jmemname.c This version creates named temporary files. For anything + except a Unix machine, you'll need to configure the + select_file_name() routine appropriately; see the comments + near the head of jmemname.c. If you use this version, define + NEED_SIGNAL_CATCHER in jconfig.h to make sure the temp files + are removed if the program is aborted. + +* jmemnobs.c (That stands for No Backing Store :-).) This will compile on + almost any system, but it assumes you have enough main memory + or virtual memory to hold the biggest images you work with. + +* jmemdos.c This should be used with most 16-bit MS-DOS compilers. + See the system-specific notes about MS-DOS for more info. + IMPORTANT: if you use this, define USE_MSDOS_MEMMGR in + jconfig.h, and include the assembly file jmemdosa.asm in the + programs. The supplied makefiles and jconfig files for + 16-bit MS-DOS compilers already do both. + +* jmemmac.c Custom version for Apple Macintosh; see the system-specific + notes for Macintosh for more info. + +To use a particular memory manager, change the SYSDEPMEM variable in your +makefile to equal the corresponding object file name (for example, jmemansi.o +or jmemansi.obj for jmemansi.c). + +If you have plenty of (real or virtual) main memory, just use jmemnobs.c. +"Plenty" means about ten bytes for every pixel in the largest images +you plan to process, so a lot of systems don't meet this criterion. +If yours doesn't, try jmemansi.c first. If that doesn't compile, you'll have +to use jmemname.c; be sure to adjust select_file_name() for local conditions. +You may also need to change unlink() to remove() in close_backing_store(). + +Except with jmemnobs.c or jmemmac.c, you need to adjust the DEFAULT_MAX_MEM +setting to a reasonable value for your system (either by adding a #define for +DEFAULT_MAX_MEM to jconfig.h, or by adding a -D switch to the Makefile). +This value limits the amount of data space the program will attempt to +allocate. Code and static data space isn't counted, so the actual memory +needs for cjpeg or djpeg are typically 100 to 150Kb more than the max-memory +setting. Larger max-memory settings reduce the amount of I/O needed to +process a large image, but too large a value can result in "insufficient +memory" failures. On most Unix machines (and other systems with virtual +memory), just set DEFAULT_MAX_MEM to several million and forget it. At the +other end of the spectrum, for MS-DOS machines you probably can't go much +above 300K to 400K. (On MS-DOS the value refers to conventional memory only. +Extended/expanded memory is handled separately by jmemdos.c.) + + +BUILDING THE SOFTWARE +===================== + +Now you should be able to compile the software. Just say "make" (or +whatever's necessary to start the compilation). Have a cup of coffee. + +Here are some things that could go wrong: + +If your compiler complains about undefined structures, you should be able to +shut it up by putting "#define INCOMPLETE_TYPES_BROKEN" in jconfig.h. + +If you have trouble with missing system include files or inclusion of the +wrong ones, read jinclude.h. This shouldn't happen if you used configure +or ckconfig.c to set up jconfig.h. + +There are a fair number of routines that do not use all of their parameters; +some compilers will issue warnings about this, which you can ignore. There +are also a few configuration checks that may give "unreachable code" warnings. +Any other warning deserves investigation. + +If you don't have a getenv() library routine, define NO_GETENV. + +Also see the system-specific hints, below. + + +TESTING THE SOFTWARE +==================== + +As a quick test of functionality we've included a small sample image in +several forms: + testorig.jpg Starting point for the djpeg tests. + testimg.ppm The output of djpeg testorig.jpg + testimg.bmp The output of djpeg -bmp -colors 256 testorig.jpg + testimg.jpg The output of cjpeg testimg.ppm + testprog.jpg Progressive-mode equivalent of testorig.jpg. + testimgp.jpg The output of cjpeg -progressive -optimize testimg.ppm +(The first- and second-generation .jpg files aren't identical since JPEG is +lossy.) If you can generate duplicates of the testimg* files then you +probably have working programs. + +With most of the makefiles, "make test" will perform the necessary +comparisons. + +If you're using a makefile that doesn't provide the test option, run djpeg +and cjpeg by hand and compare the output files to testimg* with whatever +binary file comparison tool you have. The files should be bit-for-bit +identical. + +If the programs complain "MAX_ALLOC_CHUNK is wrong, please fix", then you +need to reduce MAX_ALLOC_CHUNK to a value that fits in type size_t. +Try adding "#define MAX_ALLOC_CHUNK 65520L" to jconfig.h. A less likely +configuration error is "ALIGN_TYPE is wrong, please fix": defining ALIGN_TYPE +as long should take care of that one. + +If the cjpeg test run fails with "Missing Huffman code table entry", it's a +good bet that you needed to define RIGHT_SHIFT_IS_UNSIGNED. Go back to the +configuration step and run ckconfig.c. (This is a good plan for any other +test failure, too.) + +If you are using Unix (one-file) command line style on a non-Unix system, +it's a good idea to check that binary I/O through stdin/stdout actually +works. You should get the same results from "djpeg out.ppm" +as from "djpeg -outfile out.ppm testorig.jpg". Note that the makefiles all +use the latter style and therefore do not exercise stdin/stdout! If this +check fails, try recompiling with USE_SETMODE or USE_FDOPEN defined. +If it still doesn't work, better use two-file style. + +If you chose a memory manager other than jmemnobs.c, you should test that +temporary-file usage works. Try "djpeg -bmp -colors 256 -max 0 testorig.jpg" +and make sure its output matches testimg.bmp. If you have any really large +images handy, try compressing them with -optimize and/or decompressing with +-colors 256 to make sure your DEFAULT_MAX_MEM setting is not too large. + +NOTE: this is far from an exhaustive test of the JPEG software; some modules, +such as 1-pass color quantization, are not exercised at all. It's just a +quick test to give you some confidence that you haven't missed something +major. + + +INSTALLING THE SOFTWARE +======================= + +Once you're done with the above steps, you can install the software by +copying the executable files (cjpeg, djpeg, jpegtran, rdjpgcom, and wrjpgcom) +to wherever you normally install programs. On Unix systems, you'll also want +to put the man pages (cjpeg.1, djpeg.1, jpegtran.1, rdjpgcom.1, wrjpgcom.1) +in the man-page directory. The pre-fab makefiles don't support this step +since there's such a wide variety of installation procedures on different +systems. + +If you generated a Makefile with the "configure" script, you can just say + make install +to install the programs and their man pages into the standard places. +(You'll probably need to be root to do this.) We recommend first saying + make -n install +to see where configure thought the files should go. You may need to edit +the Makefile, particularly if your system's conventions for man page +filenames don't match what configure expects. + +If you want to install the IJG library itself, for use in compiling other +programs besides ours, then you need to put the four include files + jpeglib.h jerror.h jconfig.h jmorecfg.h +into your include-file directory, and put the library file libjpeg.a +(extension may vary depending on system) wherever library files go. +If you generated a Makefile with "configure", it will do what it thinks +is the right thing if you say + make install-lib + + +OPTIONAL STUFF +============== + +Progress monitor: + +If you like, you can #define PROGRESS_REPORT (in jconfig.h) to enable display +of percent-done progress reports. The routine provided in cdjpeg.c merely +prints percentages to stderr, but you can customize it to do something +fancier. + +Utah RLE file format support: + +We distribute the software with support for RLE image files (Utah Raster +Toolkit format) disabled, because the RLE support won't compile without the +Utah library. If you have URT version 3.1 or later, you can enable RLE +support as follows: + 1. #define RLE_SUPPORTED in jconfig.h. + 2. Add a -I option to CFLAGS in the Makefile for the directory + containing the URT .h files (typically the "include" + subdirectory of the URT distribution). + 3. Add -L... -lrle to LDLIBS in the Makefile, where ... specifies + the directory containing the URT "librle.a" file (typically the + "lib" subdirectory of the URT distribution). + +Support for 12-bit-deep pixel data: + +The JPEG standard allows either 8-bit or 12-bit data precision. (For color, +this means 8 or 12 bits per channel, of course.) If you need to work with +deeper than 8-bit data, you can compile the IJG code for 12-bit operation. +To do so: + 1. In jmorecfg.h, define BITS_IN_JSAMPLE as 12 rather than 8. + 2. In jconfig.h, undefine BMP_SUPPORTED, RLE_SUPPORTED, and TARGA_SUPPORTED, + because the code for those formats doesn't handle 12-bit data and won't + even compile. (The PPM code does work, as explained below. The GIF + code works too; it scales 8-bit GIF data to and from 12-bit depth + automatically.) + 3. Compile. Don't expect "make test" to pass, since the supplied test + files are for 8-bit data. + +Currently, 12-bit support does not work on 16-bit-int machines. + +Note that a 12-bit version will not read 8-bit JPEG files, nor vice versa; +so you'll want to keep around a regular 8-bit compilation as well. +(Run-time selection of data depth, to allow a single copy that does both, +is possible but would probably slow things down considerably; it's very low +on our to-do list.) + +The PPM reader (rdppm.c) can read 12-bit data from either text-format or +binary-format PPM and PGM files. Binary-format PPM/PGM files which have a +maxval greater than 255 are assumed to use 2 bytes per sample, LSB first +(little-endian order). As of early 1995, 2-byte binary format is not +officially supported by the PBMPLUS library, but it is expected that a +future release of PBMPLUS will support it. Note that the PPM reader will +read files of any maxval regardless of the BITS_IN_JSAMPLE setting; incoming +data is automatically rescaled to either maxval=255 or maxval=4095 as +appropriate for the cjpeg bit depth. + +The PPM writer (wrppm.c) will normally write 2-byte binary PPM or PGM +format, maxval 4095, when compiled with BITS_IN_JSAMPLE=12. Since this +format is not yet widely supported, you can disable it by compiling wrppm.c +with PPM_NORAWWORD defined; then the data is scaled down to 8 bits to make a +standard 1-byte/sample PPM or PGM file. (Yes, this means still another copy +of djpeg to keep around. But hopefully you won't need it for very long. +Poskanzer's supposed to get that new PBMPLUS release out Real Soon Now.) + +Of course, if you are working with 12-bit data, you probably have it stored +in some other, nonstandard format. In that case you'll probably want to +write your own I/O modules to read and write your format. + +Note that a 12-bit version of cjpeg always runs in "-optimize" mode, in +order to generate valid Huffman tables. This is necessary because our +default Huffman tables only cover 8-bit data. + +Removing code: + +If you need to make a smaller version of the JPEG software, some optional +functions can be removed at compile time. See the xxx_SUPPORTED #defines in +jconfig.h and jmorecfg.h. If at all possible, we recommend that you leave in +decoder support for all valid JPEG files, to ensure that you can read anyone's +output. Taking out support for image file formats that you don't use is the +most painless way to make the programs smaller. Another possibility is to +remove some of the DCT methods: in particular, the "IFAST" method may not be +enough faster than the others to be worth keeping on your machine. (If you +do remove ISLOW or IFAST, be sure to redefine JDCT_DEFAULT or JDCT_FASTEST +to a supported method, by adding a #define in jconfig.h.) + + +OPTIMIZATION +============ + +Unless you own a Cray, you'll probably be interested in making the JPEG +software go as fast as possible. This section covers some machine-dependent +optimizations you may want to try. We suggest that before trying any of +this, you first get the basic installation to pass the self-test step. +Repeat the self-test after any optimization to make sure that you haven't +broken anything. + +The integer DCT routines perform a lot of multiplications. These +multiplications must yield 32-bit results, but none of their input values +are more than 16 bits wide. On many machines, notably the 680x0 and 80x86 +CPUs, a 16x16=>32 bit multiply instruction is faster than a full 32x32=>32 +bit multiply. Unfortunately there is no portable way to specify such a +multiplication in C, but some compilers can generate one when you use the +right combination of casts. See the MULTIPLYxxx macro definitions in +jdct.h. If your compiler makes "int" be 32 bits and "short" be 16 bits, +defining SHORTxSHORT_32 is fairly likely to work. When experimenting with +alternate definitions, be sure to test not only whether the code still works +(use the self-test), but also whether it is actually faster --- on some +compilers, alternate definitions may compute the right answer, yet be slower +than the default. Timing cjpeg on a large PGM (grayscale) input file is the +best way to check this, as the DCT will be the largest fraction of the runtime +in that mode. (Note: some of the distributed compiler-specific jconfig files +already contain #define switches to select appropriate MULTIPLYxxx +definitions.) + +If your machine has sufficiently fast floating point hardware, you may find +that the float DCT method is faster than the integer DCT methods, even +after tweaking the integer multiply macros. In that case you may want to +make the float DCT be the default method. (The only objection to this is +that float DCT results may vary slightly across machines.) To do that, add +"#define JDCT_DEFAULT JDCT_FLOAT" to jconfig.h. Even if you don't change +the default, you should redefine JDCT_FASTEST, which is the method selected +by djpeg's -fast switch. Don't forget to update the documentation files +(usage.doc and/or cjpeg.1, djpeg.1) to agree with what you've done. + +If access to "short" arrays is slow on your machine, it may be a win to +define type JCOEF as int rather than short. This will cost a good deal of +memory though, particularly in some multi-pass modes, so don't do it unless +you have memory to burn and short is REALLY slow. + +If your compiler can compile function calls in-line, make sure the INLINE +macro in jmorecfg.h is defined as the keyword that marks a function +inline-able. Some compilers have a switch that tells the compiler to inline +any function it thinks is profitable (e.g., -finline-functions for gcc). +Enabling such a switch is likely to make the compiled code bigger but faster. + +In general, it's worth trying the maximum optimization level of your compiler, +and experimenting with any optional optimizations such as loop unrolling. +(Unfortunately, far too many compilers have optimizer bugs ... be prepared to +back off if the code fails self-test.) If you do any experimentation along +these lines, please report the optimal settings to jpeg-info@uunet.uu.net so +we can mention them in future releases. Be sure to specify your machine and +compiler version. + + +HINTS FOR SPECIFIC SYSTEMS +========================== + +We welcome reports on changes needed for systems not mentioned here. Submit +'em to jpeg-info@uunet.uu.net. Also, if configure or ckconfig.c is wrong +about how to configure the JPEG software for your system, please let us know. + + +Acorn RISC OS: + +(Thanks to Simon Middleton for these hints on compiling with Desktop C.) +After renaming the files according to Acorn conventions, take a copy of +makefile.ansi, change all occurrences of 'libjpeg.a' to 'libjpeg.o' and +change these definitions as indicated: + +CFLAGS= -throwback -IC: -Wn +LDLIBS=C:o.Stubs +SYSDEPMEM=jmemansi.o +LN=Link +AR=LibFile -c -o + +Also add a new line '.c.o:; $(cc) $< $(cflags) -c -o $@'. Remove the +lines '$(RM) libjpeg.o' and '$(AR2) libjpeg.o' and the 'jconfig.h' +dependency section. + +Copy jconfig.doc to jconfig.h. Edit jconfig.h to define TWO_FILE_COMMANDLINE +and CHAR_IS_UNSIGNED. + +Run the makefile using !AMU not !Make. If you want to use the 'clean' and +'test' makefile entries then you will have to fiddle with the syntax a bit +and rename the test files. + + +Amiga: + +SAS C 6.50 reportedly is too buggy to compile the IJG code properly. +A patch to update to 6.51 is available from SAS or AmiNet FTP sites. + +The supplied config files are set up to use jmemname.c as the memory +manager, with temporary files being created on the device named by +"JPEGTMP:". + + +Atari ST/STE/TT: + +Copy the project files makcjpeg.st, makdjpeg.st, maktjpeg.st, and makljpeg.st +to cjpeg.prj, djpeg.prj, jpegtran.prj, and libjpeg.prj respectively. The +project files should work as-is with Pure C. For Turbo C, change library +filenames "pc..." to "tc..." in each project file. Note that libjpeg.prj +selects jmemansi.c as the recommended memory manager. You'll probably want to +adjust the DEFAULT_MAX_MEM setting --- you want it to be a couple hundred K +less than your normal free memory. Put "#define DEFAULT_MAX_MEM nnnn" into +jconfig.h to do this. + +To use the 68881/68882 coprocessor for the floating point DCT, add the +compiler option "-8" to the project files and replace pcfltlib.lib with +pc881lib.lib in cjpeg.prj and djpeg.prj. Or if you don't have a +coprocessor, you may prefer to remove the float DCT code by undefining +DCT_FLOAT_SUPPORTED in jmorecfg.h (since without a coprocessor, the float +code will be too slow to be useful). In that case, you can delete +pcfltlib.lib from the project files. + +Note that you must make libjpeg.lib before making cjpeg.ttp, djpeg.ttp, +or jpegtran.ttp. You'll have to perform the self-test by hand. + +We haven't bothered to include project files for rdjpgcom and wrjpgcom. +Those source files should just be compiled by themselves; they don't +depend on the JPEG library. + +There is a bug in some older versions of the Turbo C library which causes the +space used by temporary files created with "tmpfile()" not to be freed after +an abnormal program exit. If you check your disk afterwards, you will find +cluster chains that are allocated but not used by a file. This should not +happen in cjpeg/djpeg/jpegtran, since we enable a signal catcher to explicitly +close temp files before exiting. But if you use the JPEG library with your +own code, be sure to supply a signal catcher, or else use a different +system-dependent memory manager. + + +Cray: + +Should you be so fortunate as to be running JPEG on a Cray YMP, there is a +compiler bug in old versions of Cray's Standard C (prior to 3.1). If you +still have an old compiler, you'll need to insert a line reading +"#pragma novector" just before the loop + for (i = 1; i <= (int) htbl->bits[l]; i++) + huffsize[p++] = (char) l; +in fix_huff_tbl (in V5beta1, line 204 of jchuff.c and line 176 of jdhuff.c). +[This bug may or may not still occur with the current IJG code, but it's +probably a dead issue anyway...] + + +HP-UX: + +If you have HP-UX 7.05 or later with the "software development" C compiler, +you should run the compiler in ANSI mode. If using the configure script, +say + ./configure CC='cc -Aa' +(or -Ae if you prefer). If configuring by hand, use makefile.ansi and add +"-Aa" to the CFLAGS line in the makefile. + +If you have a pre-7.05 system, or if you are using the non-ANSI C compiler +delivered with a minimum HP-UX system, then you must use makefile.unix +(and do NOT add -Aa); or just run configure without the CC option. + +On HP 9000 series 800 machines, the HP C compiler is buggy in revisions prior +to A.08.07. If you get complaints about "not a typedef name", you'll have to +use makefile.unix, or run configure without the CC option. + + +Macintosh, generic comments: + +The supplied user-interface files (cjpeg.c, djpeg.c, etc) are set up to +provide a Unix-style command line interface. You can use this interface on +the Mac by means of the ccommand() library routine provided by Metrowerks +CodeWarrior or Think C. This is only appropriate for testing the library, +however; to make a user-friendly equivalent of cjpeg/djpeg you'd really want +to develop a Mac-style user interface. There isn't a complete example +available at the moment, but there are some helpful starting points: +1. Sam Bushell's free "To JPEG" applet provides drag-and-drop conversion to +JPEG under System 7 and later. This only illustrates how to use the +compression half of the library, but it does a very nice job of that part. +The CodeWarrior source code is available from http://www.pobox.com/~jsam. +2. Jim Brunner prepared a Mac-style user interface for both compression and +decompression. Unfortunately, it hasn't been updated since IJG v4, and +the library's API has changed considerably since then. Still it may be of +some help, particularly as a guide to compiling the IJG code under Think C. +Jim's code is available from the Info-Mac archives, at sumex-aim.stanford.edu +or mirrors thereof; see file /info-mac/dev/src/jpeg-convert-c.hqx. + +jmemmac.c is the recommended memory manager back end for Macintosh. It uses +NewPtr/DisposePtr instead of malloc/free, and has a Mac-specific +implementation of jpeg_mem_available(). It also creates temporary files that +follow Mac conventions. (That part of the code relies on System-7-or-later OS +functions. See the comments in jmemmac.c if you need to run it on System 6.) +NOTE that USE_MAC_MEMMGR must be defined in jconfig.h to use jmemmac.c. + +You can also use jmemnobs.c, if you don't care about handling images larger +than available memory. If you use any memory manager back end other than +jmemmac.c, we recommend replacing "malloc" and "free" by "NewPtr" and +"DisposePtr", because Mac C libraries often have peculiar implementations of +malloc/free. (For instance, free() may not return the freed space to the +Mac Memory Manager. This is undesirable for the IJG code because jmemmgr.c +already clumps space requests.) + + +Macintosh, Metrowerks CodeWarrior: + +The Unix-command-line-style interface can be used by defining USE_CCOMMAND. +You'll also need to define TWO_FILE_COMMANDLINE to avoid stdin/stdout. +This means that when using the cjpeg/djpeg programs, you'll have to type the +input and output file names in the "Arguments" text-edit box, rather than +using the file radio buttons. (Perhaps USE_FDOPEN or USE_SETMODE would +eliminate the problem, but I haven't heard from anyone who's tried it.) + +On 680x0 Macs, Metrowerks defines type "double" as a 10-byte IEEE extended +float. jmemmgr.c won't like this: it wants sizeof(ALIGN_TYPE) to be a power +of 2. Add "#define ALIGN_TYPE long" to jconfig.h to eliminate the complaint. + +The supplied configuration file jconfig.mac can be used for your jconfig.h; +it includes all the recommended symbol definitions. If you have AppleScript +installed, you can run the supplied script makeproj.mac to create CodeWarrior +project files for the library and the testbed applications, then build the +library and applications. (Thanks to Dan Sears and Don Agro for this nifty +hack, which saves us from trying to maintain CodeWarrior project files as part +of the IJG distribution...) + + +Macintosh, Think C: + +The documentation in Jim Brunner's "JPEG Convert" source code (see above) +includes detailed build instructions for Think C; it's probably somewhat +out of date for the current release, but may be helpful. + +If you want to build the minimal command line version, proceed as follows. +You'll have to prepare project files for the programs; we don't include any +in the distribution since they are not text files. Use the file lists in +any of the supplied makefiles as a guide. Also add the ANSI and Unix C +libraries in a separate segment. You may need to divide the JPEG files into +more than one segment; we recommend dividing compression and decompression +modules. Define USE_CCOMMAND in jconfig.h so that the ccommand() routine is +called. You must also define TWO_FILE_COMMANDLINE because stdin/stdout +don't handle binary data correctly. + +On 680x0 Macs, Think C defines type "double" as a 12-byte IEEE extended float. +jmemmgr.c won't like this: it wants sizeof(ALIGN_TYPE) to be a power of 2. +Add "#define ALIGN_TYPE long" to jconfig.h to eliminate the complaint. + +jconfig.mac should work as a jconfig.h configuration file for Think C, +but the makeproj.mac AppleScript script is specific to CodeWarrior. Sorry. + + +MIPS R3000: + +MIPS's cc version 1.31 has a rather nasty optimization bug. Don't use -O +if you have that compiler version. (Use "cc -V" to check the version.) +Note that the R3000 chip is found in workstations from DEC and others. + + +MS-DOS, generic comments for 16-bit compilers: + +The IJG code is designed to work well in 80x86 "small" or "medium" memory +models (i.e., data pointers are 16 bits unless explicitly declared "far"; +code pointers can be either size). You may be able to use small model to +compile cjpeg or djpeg by itself, but you will probably have to use medium +model for any larger application. This won't make much difference in +performance. You *will* take a noticeable performance hit if you use a +large-data memory model, and you should avoid "huge" model if at all +possible. Be sure that NEED_FAR_POINTERS is defined in jconfig.h if you use +a small-data memory model; be sure it is NOT defined if you use a large-data +model. (The supplied makefiles and jconfig files for Borland and Microsoft C +compile in medium model and define NEED_FAR_POINTERS.) + +The DOS-specific memory manager, jmemdos.c, should be used if possible. +It needs some assembly-code routines which are in jmemdosa.asm; make sure +your makefile assembles that file and includes it in the library. If you +don't have a suitable assembler, you can get pre-assembled object files for +jmemdosa by FTP from ftp.uu.net:/graphics/jpeg/jdosaobj.zip. (DOS-oriented +distributions of the IJG source code often include these object files.) + +When using jmemdos.c, jconfig.h must define USE_MSDOS_MEMMGR and must set +MAX_ALLOC_CHUNK to less than 64K (65520L is a typical value). If your +C library's far-heap malloc() can't allocate blocks that large, reduce +MAX_ALLOC_CHUNK to whatever it can handle. + +If you can't use jmemdos.c for some reason --- for example, because you +don't have an assembler to assemble jmemdosa.asm --- you'll have to fall +back to jmemansi.c or jmemname.c. You'll probably still need to set +MAX_ALLOC_CHUNK in jconfig.h, because most DOS C libraries won't malloc() +more than 64K at a time. IMPORTANT: if you use jmemansi.c or jmemname.c, +you will have to compile in a large-data memory model in order to get the +right stdio library. Too bad. + +wrjpgcom needs to be compiled in large model, because it malloc()s a 64KB +work area to hold the comment text. If your C library's malloc can't +handle that, reduce MAX_COM_LENGTH as necessary in wrjpgcom.c. + +Most MS-DOS compilers treat stdin/stdout as text files, so you must use +two-file command line style. But if your compiler has either fdopen() or +setmode(), you can use one-file style if you like. To do this, define +USE_SETMODE or USE_FDOPEN so that stdin/stdout will be set to binary mode. +(USE_SETMODE seems to work with more DOS compilers than USE_FDOPEN.) You +should test that I/O through stdin/stdout produces the same results as I/O +to explicitly named files... the "make test" procedures in the supplied +makefiles do NOT use stdin/stdout. + + +MS-DOS, generic comments for 32-bit compilers: + +None of the above comments about memory models apply if you are using a +32-bit flat-memory-space environment, such as DJGPP or Watcom C. (And you +should use one if you have it, as performance will be much better than +8086-compatible code!) For flat-memory-space compilers, do NOT define +NEED_FAR_POINTERS, and do NOT use jmemdos.c. Use jmemnobs.c if the +environment supplies adequate virtual memory, otherwise use jmemansi.c or +jmemname.c. + +You'll still need to be careful about binary I/O through stdin/stdout. +See the last paragraph of the previous section. + + +MS-DOS, Borland C: + +Be sure to convert all the source files to DOS text format (CR/LF newlines). +Although Borland C will often work OK with unmodified Unix (LF newlines) +source files, sometimes it will give bogus compile errors. +"Illegal character '#'" is the most common such error. (This is true with +Borland C 3.1, but perhaps is fixed in newer releases.) + +If you want one-file command line style, just undefine TWO_FILE_COMMANDLINE. +jconfig.bcc already includes #define USE_SETMODE to make this work. +(fdopen does not work correctly.) + + +MS-DOS, Microsoft C: + +makefile.mc6 works with Microsoft C, DOS Visual C++, etc. It should only +be used if you want to build a 16-bit (small or medium memory model) program. + +If you want one-file command line style, just undefine TWO_FILE_COMMANDLINE. +jconfig.mc6 already includes #define USE_SETMODE to make this work. +(fdopen does not work correctly.) + +Note that this makefile assumes that the working copy of itself is called +"makefile". If you want to call it something else, say "makefile.mak", +be sure to adjust the dependency line that reads "$(RFILE) : makefile". +Otherwise the make will fail because it doesn't know how to create "makefile". +Worse, some releases of Microsoft's make utilities give an incorrect error +message in this situation. + +Old versions of MS C fail with an "out of macro expansion space" error +because they can't cope with the macro TRACEMS8 (defined in jerror.h). +If this happens to you, the easiest solution is to change TRACEMS8 to +expand to nothing. You'll lose the ability to dump out JPEG coefficient +tables with djpeg -debug -debug, but at least you can compile. + +Original MS C 6.0 is very buggy; it compiles incorrect code unless you turn +off optimization entirely (remove -O from CFLAGS). 6.00A is better, but it +still generates bad code if you enable loop optimizations (-Ol or -Ox). + +MS C 8.0 crashes when compiling jquant1.c with optimization switch /Oo ... +which is on by default. To work around this bug, compile that one file +with /Oo-. + + +Microsoft Windows (all versions), generic comments: + +Some Windows system include files define typedef boolean as "unsigned char". +The IJG code also defines typedef boolean, but we make it "int" by default. +This doesn't affect the IJG programs because we don't import those Windows +include files. But if you use the JPEG library in your own program, and some +of your program's files import one definition of boolean while some import the +other, you can get all sorts of mysterious problems. A good preventive step +is to make the IJG library use "unsigned char" for boolean. To do that, +add something like this to your jconfig.h file: + /* Define "boolean" as unsigned char, not int, per Windows custom */ + #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ + typedef unsigned char boolean; + #endif + #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ +(This is already in jconfig.vc, by the way.) + +windef.h contains the declarations + #define far + #define FAR far +Since jmorecfg.h tries to define FAR as empty, you may get a compiler +warning if you include both jpeglib.h and windef.h (which windows.h +includes). To suppress the warning, you can put "#ifndef FAR"/"#endif" +around the line "#define FAR" in jmorecfg.h. + +When using the library in a Windows application, you will almost certainly +want to modify or replace the error handler module jerror.c, since our +default error handler does a couple of inappropriate things: + 1. it tries to write error and warning messages on stderr; + 2. in event of a fatal error, it exits by calling exit(). + +A simple stopgap solution for problem 1 is to replace the line + fprintf(stderr, "%s\n", buffer); +(in output_message in jerror.c) with + MessageBox(GetActiveWindow(),buffer,"JPEG Error",MB_OK|MB_ICONERROR); +It's highly recommended that you at least do that much, since otherwise +error messages will disappear into nowhere. (Beginning with IJG v6b, this +code is already present in jerror.c; just define USE_WINDOWS_MESSAGEBOX in +jconfig.h to enable it.) + +The proper solution for problem 2 is to return control to your calling +application after a library error. This can be done with the setjmp/longjmp +technique discussed in libjpeg.doc and illustrated in example.c. (NOTE: +some older Windows C compilers provide versions of setjmp/longjmp that +don't actually work under Windows. You may need to use the Windows system +functions Catch and Throw instead.) + +The recommended memory manager under Windows is jmemnobs.c; in other words, +let Windows do any virtual memory management needed. You should NOT use +jmemdos.c nor jmemdosa.asm under Windows. + +For Windows 3.1, we recommend compiling in medium or large memory model; +for newer Windows versions, use a 32-bit flat memory model. (See the MS-DOS +sections above for more info about memory models.) In the 16-bit memory +models only, you'll need to put + #define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */ +into jconfig.h to limit allocation chunks to 64Kb. (Without that, you'd +have to use huge memory model, which slows things down unnecessarily.) +jmemnobs.c works without modification in large or flat memory models, but to +use medium model, you need to modify its jpeg_get_large and jpeg_free_large +routines to allocate far memory. In any case, you might like to replace +its calls to malloc and free with direct calls on Windows memory allocation +functions. + +You may also want to modify jdatasrc.c and jdatadst.c to use Windows file +operations rather than fread/fwrite. This is only necessary if your C +compiler doesn't provide a competent implementation of C stdio functions. + +You might want to tweak the RGB_xxx macros in jmorecfg.h so that the library +will accept or deliver color pixels in BGR sample order, not RGB; BGR order +is usually more convenient under Windows. Note that this change will break +the sample applications cjpeg/djpeg, but the library itself works fine. + + +Many people want to convert the IJG library into a DLL. This is reasonably +straightforward, but watch out for the following: + + 1. Don't try to compile as a DLL in small or medium memory model; use +large model, or even better, 32-bit flat model. Many places in the IJG code +assume the address of a local variable is an ordinary (not FAR) pointer; +that isn't true in a medium-model DLL. + + 2. Microsoft C cannot pass file pointers between applications and DLLs. +(See Microsoft Knowledge Base, PSS ID Number Q50336.) So jdatasrc.c and +jdatadst.c don't work if you open a file in your application and then pass +the pointer to the DLL. One workaround is to make jdatasrc.c/jdatadst.c +part of your main application rather than part of the DLL. + + 3. You'll probably need to modify the macros GLOBAL() and EXTERN() to +attach suitable linkage keywords to the exported routine names. Similarly, +you'll want to modify METHODDEF() and JMETHOD() to ensure function pointers +are declared in a way that lets application routines be called back through +the function pointers. These macros are in jmorecfg.h. Typical definitions +for a 16-bit DLL are: + #define GLOBAL(type) type _far _pascal _loadds _export + #define EXTERN(type) extern type _far _pascal _loadds + #define METHODDEF(type) static type _far _pascal + #define JMETHOD(type,methodname,arglist) \ + type (_far _pascal *methodname) arglist +For a 32-bit DLL you may want something like + #define GLOBAL(type) __declspec(dllexport) type + #define EXTERN(type) extern __declspec(dllexport) type +Although not all the GLOBAL routines are actually intended to be called by +the application, the performance cost of making them all DLL entry points is +negligible. + +The unmodified IJG library presents a very C-specific application interface, +so the resulting DLL is only usable from C or C++ applications. There has +been some talk of writing wrapper code that would present a simpler interface +usable from other languages, such as Visual Basic. This is on our to-do list +but hasn't been very high priority --- any volunteers out there? + + +Microsoft Windows, Borland C: + +The provided jconfig.bcc should work OK in a 32-bit Windows environment, +but you'll need to tweak it in a 16-bit environment (you'd need to define +NEED_FAR_POINTERS and MAX_ALLOC_CHUNK). Beware that makefile.bcc will need +alteration if you want to use it for Windows --- in particular, you should +use jmemnobs.c not jmemdos.c under Windows. + +Borland C++ 4.5 fails with an internal compiler error when trying to compile +jdmerge.c in 32-bit mode. If enough people complain, perhaps Borland will fix +it. In the meantime, the simplest known workaround is to add a redundant +definition of the variable range_limit in h2v1_merged_upsample(), at the head +of the block that handles odd image width (about line 268 in v6 jdmerge.c): + /* If image width is odd, do the last output column separately */ + if (cinfo->output_width & 1) { + register JSAMPLE * range_limit = cinfo->sample_range_limit; /* ADD THIS */ + cb = GETJSAMPLE(*inptr1); +Pretty bizarre, especially since the very similar routine h2v2_merged_upsample +doesn't trigger the bug. +Recent reports suggest that this bug does not occur with "bcc32a" (the +Pentium-optimized version of the compiler). + +Another report from a user of Borland C 4.5 was that incorrect code (leading +to a color shift in processed images) was produced if any of the following +optimization switch combinations were used: + -Ot -Og + -Ot -Op + -Ot -Om +So try backing off on optimization if you see such a problem. (Are there +several different releases all numbered "4.5"??) + + +Microsoft Windows, Microsoft Visual C++: + +jconfig.vc should work OK with any Microsoft compiler for a 32-bit memory +model. makefile.vc is intended for command-line use. (If you are using +the Developer Studio environment, you may prefer the DevStudio project +files; see below.) + +Some users feel that it's easier to call the library from C++ code if you +force VC++ to treat the library as C++ code, which you can do by renaming +all the *.c files to *.cpp (and adjusting the makefile to match). This +avoids the need to put extern "C" { ... } around #include "jpeglib.h" in +your C++ application. + + +Microsoft Windows, Microsoft Developer Studio: + +We include makefiles that should work as project files in DevStudio 4.2 or +later. There is a library makefile that builds the IJG library as a static +Win32 library, and an application makefile that builds the sample applications +as Win32 console applications. (Even if you only want the library, we +recommend building the applications so that you can run the self-test.) + +To use: +1. Copy jconfig.vc to jconfig.h, makelib.ds to jpeg.mak, and + makeapps.ds to apps.mak. (Note that the renaming is critical!) +2. Click on the .mak files to construct project workspaces. + (If you are using DevStudio more recent than 4.2, you'll probably + get a message saying that the makefiles are being updated.) +3. Build the library project, then the applications project. +4. Move the application .exe files from `app`\Release to an + appropriate location on your path. +5. To perform the self-test, execute the command line + NMAKE /f makefile.vc test + + +OS/2, Borland C++: + +Watch out for optimization bugs in older Borland compilers; you may need +to back off the optimization switch settings. See the comments in +makefile.bcc. + + +SGI: + +On some SGI systems, you may need to set "AR2= ar -ts" in the Makefile. +If you are using configure, you can do this by saying + ./configure RANLIB='ar -ts' +This change is not needed on all SGIs. Use it only if the make fails at the +stage of linking the completed programs. + +On the MIPS R4000 architecture (Indy, etc.), the compiler option "-mips2" +reportedly speeds up the float DCT method substantially, enough to make it +faster than the default int method (but still slower than the fast int +method). If you use -mips2, you may want to alter the default DCT method to +be float. To do this, put "#define JDCT_DEFAULT JDCT_FLOAT" in jconfig.h. + + +VMS: + +On an Alpha/VMS system with MMS, be sure to use the "/Marco=Alpha=1" +qualifier with MMS when building the JPEG package. + +VAX/VMS v5.5-1 may have problems with the test step of the build procedure +reporting differences when it compares the original and test images. If the +error points to the last block of the files, it is most likely bogus and may +be safely ignored. It seems to be because the files are Stream_LF and +Backup/Compare has difficulty with the (presumably) null padded files. +This problem was not observed on VAX/VMS v6.1 or AXP/VMS v6.1. diff --git a/gtkmm-osx/jpeg-6b/jcapimin.c b/gtkmm-osx/jpeg-6b/jcapimin.c new file mode 100644 index 0000000..54fb8c5 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jcapimin.c @@ -0,0 +1,280 @@ +/* + * jcapimin.c + * + * Copyright (C) 1994-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface code for the compression half + * of the JPEG library. These are the "minimum" API routines that may be + * needed in either the normal full-compression case or the transcoding-only + * case. + * + * Most of the routines intended to be called directly by an application + * are in this file or in jcapistd.c. But also see jcparam.c for + * parameter-setup helper routines, jcomapi.c for routines shared by + * compression and decompression, and jctrans.c for the transcoding case. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Initialization of a JPEG compression object. + * The error manager must already be set up (in case memory manager fails). + */ + +GLOBAL(void) +jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize) +{ + int i; + + /* Guard against version mismatches between library and caller. */ + cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */ + if (version != JPEG_LIB_VERSION) + ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version); + if (structsize != SIZEOF(struct jpeg_compress_struct)) + ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, + (int) SIZEOF(struct jpeg_compress_struct), (int) structsize); + + /* For debugging purposes, we zero the whole master structure. + * But the application has already set the err pointer, and may have set + * client_data, so we have to save and restore those fields. + * Note: if application hasn't set client_data, tools like Purify may + * complain here. + */ + { + struct jpeg_error_mgr * err = cinfo->err; + void * client_data = cinfo->client_data; /* ignore Purify complaint here */ + MEMZERO(cinfo, SIZEOF(struct jpeg_compress_struct)); + cinfo->err = err; + cinfo->client_data = client_data; + } + cinfo->is_decompressor = FALSE; + + /* Initialize a memory manager instance for this object */ + jinit_memory_mgr((j_common_ptr) cinfo); + + /* Zero out pointers to permanent structures. */ + cinfo->progress = NULL; + cinfo->dest = NULL; + + cinfo->comp_info = NULL; + + for (i = 0; i < NUM_QUANT_TBLS; i++) + cinfo->quant_tbl_ptrs[i] = NULL; + + for (i = 0; i < NUM_HUFF_TBLS; i++) { + cinfo->dc_huff_tbl_ptrs[i] = NULL; + cinfo->ac_huff_tbl_ptrs[i] = NULL; + } + + cinfo->script_space = NULL; + + cinfo->input_gamma = 1.0; /* in case application forgets */ + + /* OK, I'm ready */ + cinfo->global_state = CSTATE_START; +} + + +/* + * Destruction of a JPEG compression object + */ + +GLOBAL(void) +jpeg_destroy_compress (j_compress_ptr cinfo) +{ + jpeg_destroy((j_common_ptr) cinfo); /* use common routine */ +} + + +/* + * Abort processing of a JPEG compression operation, + * but don't destroy the object itself. + */ + +GLOBAL(void) +jpeg_abort_compress (j_compress_ptr cinfo) +{ + jpeg_abort((j_common_ptr) cinfo); /* use common routine */ +} + + +/* + * Forcibly suppress or un-suppress all quantization and Huffman tables. + * Marks all currently defined tables as already written (if suppress) + * or not written (if !suppress). This will control whether they get emitted + * by a subsequent jpeg_start_compress call. + * + * This routine is exported for use by applications that want to produce + * abbreviated JPEG datastreams. It logically belongs in jcparam.c, but + * since it is called by jpeg_start_compress, we put it here --- otherwise + * jcparam.o would be linked whether the application used it or not. + */ + +GLOBAL(void) +jpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress) +{ + int i; + JQUANT_TBL * qtbl; + JHUFF_TBL * htbl; + + for (i = 0; i < NUM_QUANT_TBLS; i++) { + if ((qtbl = cinfo->quant_tbl_ptrs[i]) != NULL) + qtbl->sent_table = suppress; + } + + for (i = 0; i < NUM_HUFF_TBLS; i++) { + if ((htbl = cinfo->dc_huff_tbl_ptrs[i]) != NULL) + htbl->sent_table = suppress; + if ((htbl = cinfo->ac_huff_tbl_ptrs[i]) != NULL) + htbl->sent_table = suppress; + } +} + + +/* + * Finish JPEG compression. + * + * If a multipass operating mode was selected, this may do a great deal of + * work including most of the actual output. + */ + +GLOBAL(void) +jpeg_finish_compress (j_compress_ptr cinfo) +{ + JDIMENSION iMCU_row; + + if (cinfo->global_state == CSTATE_SCANNING || + cinfo->global_state == CSTATE_RAW_OK) { + /* Terminate first pass */ + if (cinfo->next_scanline < cinfo->image_height) + ERREXIT(cinfo, JERR_TOO_LITTLE_DATA); + (*cinfo->master->finish_pass) (cinfo); + } else if (cinfo->global_state != CSTATE_WRCOEFS) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + /* Perform any remaining passes */ + while (! cinfo->master->is_last_pass) { + (*cinfo->master->prepare_for_pass) (cinfo); + for (iMCU_row = 0; iMCU_row < cinfo->total_iMCU_rows; iMCU_row++) { + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) iMCU_row; + cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + /* We bypass the main controller and invoke coef controller directly; + * all work is being done from the coefficient buffer. + */ + if (! (*cinfo->coef->compress_data) (cinfo, (JSAMPIMAGE) NULL)) + ERREXIT(cinfo, JERR_CANT_SUSPEND); + } + (*cinfo->master->finish_pass) (cinfo); + } + /* Write EOI, do final cleanup */ + (*cinfo->marker->write_file_trailer) (cinfo); + (*cinfo->dest->term_destination) (cinfo); + /* We can use jpeg_abort to release memory and reset global_state */ + jpeg_abort((j_common_ptr) cinfo); +} + + +/* + * Write a special marker. + * This is only recommended for writing COM or APPn markers. + * Must be called after jpeg_start_compress() and before + * first call to jpeg_write_scanlines() or jpeg_write_raw_data(). + */ + +GLOBAL(void) +jpeg_write_marker (j_compress_ptr cinfo, int marker, + const JOCTET *dataptr, unsigned int datalen) +{ + JMETHOD(void, write_marker_byte, (j_compress_ptr info, int val)); + + if (cinfo->next_scanline != 0 || + (cinfo->global_state != CSTATE_SCANNING && + cinfo->global_state != CSTATE_RAW_OK && + cinfo->global_state != CSTATE_WRCOEFS)) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + (*cinfo->marker->write_marker_header) (cinfo, marker, datalen); + write_marker_byte = cinfo->marker->write_marker_byte; /* copy for speed */ + while (datalen--) { + (*write_marker_byte) (cinfo, *dataptr); + dataptr++; + } +} + +/* Same, but piecemeal. */ + +GLOBAL(void) +jpeg_write_m_header (j_compress_ptr cinfo, int marker, unsigned int datalen) +{ + if (cinfo->next_scanline != 0 || + (cinfo->global_state != CSTATE_SCANNING && + cinfo->global_state != CSTATE_RAW_OK && + cinfo->global_state != CSTATE_WRCOEFS)) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + (*cinfo->marker->write_marker_header) (cinfo, marker, datalen); +} + +GLOBAL(void) +jpeg_write_m_byte (j_compress_ptr cinfo, int val) +{ + (*cinfo->marker->write_marker_byte) (cinfo, val); +} + + +/* + * Alternate compression function: just write an abbreviated table file. + * Before calling this, all parameters and a data destination must be set up. + * + * To produce a pair of files containing abbreviated tables and abbreviated + * image data, one would proceed as follows: + * + * initialize JPEG object + * set JPEG parameters + * set destination to table file + * jpeg_write_tables(cinfo); + * set destination to image file + * jpeg_start_compress(cinfo, FALSE); + * write data... + * jpeg_finish_compress(cinfo); + * + * jpeg_write_tables has the side effect of marking all tables written + * (same as jpeg_suppress_tables(..., TRUE)). Thus a subsequent start_compress + * will not re-emit the tables unless it is passed write_all_tables=TRUE. + */ + +GLOBAL(void) +jpeg_write_tables (j_compress_ptr cinfo) +{ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + /* (Re)initialize error mgr and destination modules */ + (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); + (*cinfo->dest->init_destination) (cinfo); + /* Initialize the marker writer ... bit of a crock to do it here. */ + jinit_marker_writer(cinfo); + /* Write them tables! */ + (*cinfo->marker->write_tables_only) (cinfo); + /* And clean up. */ + (*cinfo->dest->term_destination) (cinfo); + /* + * In library releases up through v6a, we called jpeg_abort() here to free + * any working memory allocated by the destination manager and marker + * writer. Some applications had a problem with that: they allocated space + * of their own from the library memory manager, and didn't want it to go + * away during write_tables. So now we do nothing. This will cause a + * memory leak if an app calls write_tables repeatedly without doing a full + * compression cycle or otherwise resetting the JPEG object. However, that + * seems less bad than unexpectedly freeing memory in the normal case. + * An app that prefers the old behavior can call jpeg_abort for itself after + * each call to jpeg_write_tables(). + */ +} diff --git a/gtkmm-osx/jpeg-6b/jcapistd.c b/gtkmm-osx/jpeg-6b/jcapistd.c new file mode 100644 index 0000000..c0320b1 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jcapistd.c @@ -0,0 +1,161 @@ +/* + * jcapistd.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface code for the compression half + * of the JPEG library. These are the "standard" API routines that are + * used in the normal full-compression case. They are not used by a + * transcoding-only application. Note that if an application links in + * jpeg_start_compress, it will end up linking in the entire compressor. + * We thus must separate this file from jcapimin.c to avoid linking the + * whole compression library into a transcoder. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Compression initialization. + * Before calling this, all parameters and a data destination must be set up. + * + * We require a write_all_tables parameter as a failsafe check when writing + * multiple datastreams from the same compression object. Since prior runs + * will have left all the tables marked sent_table=TRUE, a subsequent run + * would emit an abbreviated stream (no tables) by default. This may be what + * is wanted, but for safety's sake it should not be the default behavior: + * programmers should have to make a deliberate choice to emit abbreviated + * images. Therefore the documentation and examples should encourage people + * to pass write_all_tables=TRUE; then it will take active thought to do the + * wrong thing. + */ + +GLOBAL(void) +jpeg_start_compress (j_compress_ptr cinfo, boolean write_all_tables) +{ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + if (write_all_tables) + jpeg_suppress_tables(cinfo, FALSE); /* mark all tables to be written */ + + /* (Re)initialize error mgr and destination modules */ + (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); + (*cinfo->dest->init_destination) (cinfo); + /* Perform master selection of active modules */ + jinit_compress_master(cinfo); + /* Set up for the first pass */ + (*cinfo->master->prepare_for_pass) (cinfo); + /* Ready for application to drive first pass through jpeg_write_scanlines + * or jpeg_write_raw_data. + */ + cinfo->next_scanline = 0; + cinfo->global_state = (cinfo->raw_data_in ? CSTATE_RAW_OK : CSTATE_SCANNING); +} + + +/* + * Write some scanlines of data to the JPEG compressor. + * + * The return value will be the number of lines actually written. + * This should be less than the supplied num_lines only in case that + * the data destination module has requested suspension of the compressor, + * or if more than image_height scanlines are passed in. + * + * Note: we warn about excess calls to jpeg_write_scanlines() since + * this likely signals an application programmer error. However, + * excess scanlines passed in the last valid call are *silently* ignored, + * so that the application need not adjust num_lines for end-of-image + * when using a multiple-scanline buffer. + */ + +GLOBAL(JDIMENSION) +jpeg_write_scanlines (j_compress_ptr cinfo, JSAMPARRAY scanlines, + JDIMENSION num_lines) +{ + JDIMENSION row_ctr, rows_left; + + if (cinfo->global_state != CSTATE_SCANNING) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + if (cinfo->next_scanline >= cinfo->image_height) + WARNMS(cinfo, JWRN_TOO_MUCH_DATA); + + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->next_scanline; + cinfo->progress->pass_limit = (long) cinfo->image_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + + /* Give master control module another chance if this is first call to + * jpeg_write_scanlines. This lets output of the frame/scan headers be + * delayed so that application can write COM, etc, markers between + * jpeg_start_compress and jpeg_write_scanlines. + */ + if (cinfo->master->call_pass_startup) + (*cinfo->master->pass_startup) (cinfo); + + /* Ignore any extra scanlines at bottom of image. */ + rows_left = cinfo->image_height - cinfo->next_scanline; + if (num_lines > rows_left) + num_lines = rows_left; + + row_ctr = 0; + (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, num_lines); + cinfo->next_scanline += row_ctr; + return row_ctr; +} + + +/* + * Alternate entry point to write raw data. + * Processes exactly one iMCU row per call, unless suspended. + */ + +GLOBAL(JDIMENSION) +jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data, + JDIMENSION num_lines) +{ + JDIMENSION lines_per_iMCU_row; + + if (cinfo->global_state != CSTATE_RAW_OK) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + if (cinfo->next_scanline >= cinfo->image_height) { + WARNMS(cinfo, JWRN_TOO_MUCH_DATA); + return 0; + } + + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->next_scanline; + cinfo->progress->pass_limit = (long) cinfo->image_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + + /* Give master control module another chance if this is first call to + * jpeg_write_raw_data. This lets output of the frame/scan headers be + * delayed so that application can write COM, etc, markers between + * jpeg_start_compress and jpeg_write_raw_data. + */ + if (cinfo->master->call_pass_startup) + (*cinfo->master->pass_startup) (cinfo); + + /* Verify that at least one iMCU row has been passed. */ + lines_per_iMCU_row = cinfo->max_v_samp_factor * DCTSIZE; + if (num_lines < lines_per_iMCU_row) + ERREXIT(cinfo, JERR_BUFFER_SIZE); + + /* Directly compress the row. */ + if (! (*cinfo->coef->compress_data) (cinfo, data)) { + /* If compressor did not consume the whole row, suspend processing. */ + return 0; + } + + /* OK, we processed one iMCU row. */ + cinfo->next_scanline += lines_per_iMCU_row; + return lines_per_iMCU_row; +} diff --git a/gtkmm-osx/jpeg-6b/jccoefct.c b/gtkmm-osx/jpeg-6b/jccoefct.c new file mode 100644 index 0000000..1963ddb --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jccoefct.c @@ -0,0 +1,449 @@ +/* + * jccoefct.c + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the coefficient buffer controller for compression. + * This controller is the top level of the JPEG compressor proper. + * The coefficient buffer lies between forward-DCT and entropy encoding steps. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* We use a full-image coefficient buffer when doing Huffman optimization, + * and also for writing multiple-scan JPEG files. In all cases, the DCT + * step is run during the first pass, and subsequent passes need only read + * the buffered coefficients. + */ +#ifdef ENTROPY_OPT_SUPPORTED +#define FULL_COEF_BUFFER_SUPPORTED +#else +#ifdef C_MULTISCAN_FILES_SUPPORTED +#define FULL_COEF_BUFFER_SUPPORTED +#endif +#endif + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_c_coef_controller pub; /* public fields */ + + JDIMENSION iMCU_row_num; /* iMCU row # within image */ + JDIMENSION mcu_ctr; /* counts MCUs processed in current row */ + int MCU_vert_offset; /* counts MCU rows within iMCU row */ + int MCU_rows_per_iMCU_row; /* number of such rows needed */ + + /* For single-pass compression, it's sufficient to buffer just one MCU + * (although this may prove a bit slow in practice). We allocate a + * workspace of C_MAX_BLOCKS_IN_MCU coefficient blocks, and reuse it for each + * MCU constructed and sent. (On 80x86, the workspace is FAR even though + * it's not really very big; this is to keep the module interfaces unchanged + * when a large coefficient buffer is necessary.) + * In multi-pass modes, this array points to the current MCU's blocks + * within the virtual arrays. + */ + JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU]; + + /* In multi-pass modes, we need a virtual block array for each component. */ + jvirt_barray_ptr whole_image[MAX_COMPONENTS]; +} my_coef_controller; + +typedef my_coef_controller * my_coef_ptr; + + +/* Forward declarations */ +METHODDEF(boolean) compress_data + JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf)); +#ifdef FULL_COEF_BUFFER_SUPPORTED +METHODDEF(boolean) compress_first_pass + JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf)); +METHODDEF(boolean) compress_output + JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf)); +#endif + + +LOCAL(void) +start_iMCU_row (j_compress_ptr cinfo) +/* Reset within-iMCU-row counters for a new row */ +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + /* In an interleaved scan, an MCU row is the same as an iMCU row. + * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows. + * But at the bottom of the image, process only what's left. + */ + if (cinfo->comps_in_scan > 1) { + coef->MCU_rows_per_iMCU_row = 1; + } else { + if (coef->iMCU_row_num < (cinfo->total_iMCU_rows-1)) + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor; + else + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height; + } + + coef->mcu_ctr = 0; + coef->MCU_vert_offset = 0; +} + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + coef->iMCU_row_num = 0; + start_iMCU_row(cinfo); + + switch (pass_mode) { + case JBUF_PASS_THRU: + if (coef->whole_image[0] != NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + coef->pub.compress_data = compress_data; + break; +#ifdef FULL_COEF_BUFFER_SUPPORTED + case JBUF_SAVE_AND_PASS: + if (coef->whole_image[0] == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + coef->pub.compress_data = compress_first_pass; + break; + case JBUF_CRANK_DEST: + if (coef->whole_image[0] == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + coef->pub.compress_data = compress_output; + break; +#endif + default: + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + break; + } +} + + +/* + * Process some data in the single-pass case. + * We process the equivalent of one fully interleaved MCU row ("iMCU" row) + * per call, ie, v_samp_factor block rows for each component in the image. + * Returns TRUE if the iMCU row is completed, FALSE if suspended. + * + * NB: input_buf contains a plane for each component in image, + * which we index according to the component's SOF position. + */ + +METHODDEF(boolean) +compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + int blkn, bi, ci, yindex, yoffset, blockcnt; + JDIMENSION ypos, xpos; + jpeg_component_info *compptr; + + /* Loop to write as much as one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->mcu_ctr; MCU_col_num <= last_MCU_col; + MCU_col_num++) { + /* Determine where data comes from in input_buf and do the DCT thing. + * Each call on forward_DCT processes a horizontal row of DCT blocks + * as wide as an MCU; we rely on having allocated the MCU_buffer[] blocks + * sequentially. Dummy blocks at the right or bottom edge are filled in + * specially. The data in them does not matter for image reconstruction, + * so we fill them with values that will encode to the smallest amount of + * data, viz: all zeroes in the AC entries, DC entries equal to previous + * block's DC value. (Thanks to Thomas Kinsman for this idea.) + */ + blkn = 0; + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width + : compptr->last_col_width; + xpos = MCU_col_num * compptr->MCU_sample_width; + ypos = yoffset * DCTSIZE; /* ypos == (yoffset+yindex) * DCTSIZE */ + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + if (coef->iMCU_row_num < last_iMCU_row || + yoffset+yindex < compptr->last_row_height) { + (*cinfo->fdct->forward_DCT) (cinfo, compptr, + input_buf[compptr->component_index], + coef->MCU_buffer[blkn], + ypos, xpos, (JDIMENSION) blockcnt); + if (blockcnt < compptr->MCU_width) { + /* Create some dummy blocks at the right edge of the image. */ + jzero_far((void FAR *) coef->MCU_buffer[blkn + blockcnt], + (compptr->MCU_width - blockcnt) * SIZEOF(JBLOCK)); + for (bi = blockcnt; bi < compptr->MCU_width; bi++) { + coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn+bi-1][0][0]; + } + } + } else { + /* Create a row of dummy blocks at the bottom of the image. */ + jzero_far((void FAR *) coef->MCU_buffer[blkn], + compptr->MCU_width * SIZEOF(JBLOCK)); + for (bi = 0; bi < compptr->MCU_width; bi++) { + coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn-1][0][0]; + } + } + blkn += compptr->MCU_width; + ypos += DCTSIZE; + } + } + /* Try to write the MCU. In event of a suspension failure, we will + * re-DCT the MCU on restart (a bit inefficient, could be fixed...) + */ + if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->mcu_ctr = MCU_col_num; + return FALSE; + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->mcu_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + coef->iMCU_row_num++; + start_iMCU_row(cinfo); + return TRUE; +} + + +#ifdef FULL_COEF_BUFFER_SUPPORTED + +/* + * Process some data in the first pass of a multi-pass case. + * We process the equivalent of one fully interleaved MCU row ("iMCU" row) + * per call, ie, v_samp_factor block rows for each component in the image. + * This amount of data is read from the source buffer, DCT'd and quantized, + * and saved into the virtual arrays. We also generate suitable dummy blocks + * as needed at the right and lower edges. (The dummy blocks are constructed + * in the virtual arrays, which have been padded appropriately.) This makes + * it possible for subsequent passes not to worry about real vs. dummy blocks. + * + * We must also emit the data to the entropy encoder. This is conveniently + * done by calling compress_output() after we've loaded the current strip + * of the virtual arrays. + * + * NB: input_buf contains a plane for each component in image. All + * components are DCT'd and loaded into the virtual arrays in this pass. + * However, it may be that only a subset of the components are emitted to + * the entropy encoder during this first pass; be careful about looking + * at the scan-dependent variables (MCU dimensions, etc). + */ + +METHODDEF(boolean) +compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + JDIMENSION blocks_across, MCUs_across, MCUindex; + int bi, ci, h_samp_factor, block_row, block_rows, ndummy; + JCOEF lastDC; + jpeg_component_info *compptr; + JBLOCKARRAY buffer; + JBLOCKROW thisblockrow, lastblockrow; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Align the virtual buffer for this component. */ + buffer = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[ci], + coef->iMCU_row_num * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, TRUE); + /* Count non-dummy DCT block rows in this iMCU row. */ + if (coef->iMCU_row_num < last_iMCU_row) + block_rows = compptr->v_samp_factor; + else { + /* NB: can't use last_row_height here, since may not be set! */ + block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (block_rows == 0) block_rows = compptr->v_samp_factor; + } + blocks_across = compptr->width_in_blocks; + h_samp_factor = compptr->h_samp_factor; + /* Count number of dummy blocks to be added at the right margin. */ + ndummy = (int) (blocks_across % h_samp_factor); + if (ndummy > 0) + ndummy = h_samp_factor - ndummy; + /* Perform DCT for all non-dummy blocks in this iMCU row. Each call + * on forward_DCT processes a complete horizontal row of DCT blocks. + */ + for (block_row = 0; block_row < block_rows; block_row++) { + thisblockrow = buffer[block_row]; + (*cinfo->fdct->forward_DCT) (cinfo, compptr, + input_buf[ci], thisblockrow, + (JDIMENSION) (block_row * DCTSIZE), + (JDIMENSION) 0, blocks_across); + if (ndummy > 0) { + /* Create dummy blocks at the right edge of the image. */ + thisblockrow += blocks_across; /* => first dummy block */ + jzero_far((void FAR *) thisblockrow, ndummy * SIZEOF(JBLOCK)); + lastDC = thisblockrow[-1][0]; + for (bi = 0; bi < ndummy; bi++) { + thisblockrow[bi][0] = lastDC; + } + } + } + /* If at end of image, create dummy block rows as needed. + * The tricky part here is that within each MCU, we want the DC values + * of the dummy blocks to match the last real block's DC value. + * This squeezes a few more bytes out of the resulting file... + */ + if (coef->iMCU_row_num == last_iMCU_row) { + blocks_across += ndummy; /* include lower right corner */ + MCUs_across = blocks_across / h_samp_factor; + for (block_row = block_rows; block_row < compptr->v_samp_factor; + block_row++) { + thisblockrow = buffer[block_row]; + lastblockrow = buffer[block_row-1]; + jzero_far((void FAR *) thisblockrow, + (size_t) (blocks_across * SIZEOF(JBLOCK))); + for (MCUindex = 0; MCUindex < MCUs_across; MCUindex++) { + lastDC = lastblockrow[h_samp_factor-1][0]; + for (bi = 0; bi < h_samp_factor; bi++) { + thisblockrow[bi][0] = lastDC; + } + thisblockrow += h_samp_factor; /* advance to next MCU in row */ + lastblockrow += h_samp_factor; + } + } + } + } + /* NB: compress_output will increment iMCU_row_num if successful. + * A suspension return will result in redoing all the work above next time. + */ + + /* Emit data to the entropy encoder, sharing code with subsequent passes */ + return compress_output(cinfo, input_buf); +} + + +/* + * Process some data in subsequent passes of a multi-pass case. + * We process the equivalent of one fully interleaved MCU row ("iMCU" row) + * per call, ie, v_samp_factor block rows for each component in the scan. + * The data is obtained from the virtual arrays and fed to the entropy coder. + * Returns TRUE if the iMCU row is completed, FALSE if suspended. + * + * NB: input_buf is ignored; it is likely to be a NULL pointer. + */ + +METHODDEF(boolean) +compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + int blkn, ci, xindex, yindex, yoffset; + JDIMENSION start_col; + JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN]; + JBLOCKROW buffer_ptr; + jpeg_component_info *compptr; + + /* Align the virtual buffers for the components used in this scan. + * NB: during first pass, this is safe only because the buffers will + * already be aligned properly, so jmemmgr.c won't need to do any I/O. + */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + buffer[ci] = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index], + coef->iMCU_row_num * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } + + /* Loop to process one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->mcu_ctr; MCU_col_num < cinfo->MCUs_per_row; + MCU_col_num++) { + /* Construct list of pointers to DCT blocks belonging to this MCU */ + blkn = 0; /* index of current DCT block within MCU */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + start_col = MCU_col_num * compptr->MCU_width; + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + buffer_ptr = buffer[ci][yindex+yoffset] + start_col; + for (xindex = 0; xindex < compptr->MCU_width; xindex++) { + coef->MCU_buffer[blkn++] = buffer_ptr++; + } + } + } + /* Try to write the MCU. */ + if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->mcu_ctr = MCU_col_num; + return FALSE; + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->mcu_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + coef->iMCU_row_num++; + start_iMCU_row(cinfo); + return TRUE; +} + +#endif /* FULL_COEF_BUFFER_SUPPORTED */ + + +/* + * Initialize coefficient buffer controller. + */ + +GLOBAL(void) +jinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer) +{ + my_coef_ptr coef; + + coef = (my_coef_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_coef_controller)); + cinfo->coef = (struct jpeg_c_coef_controller *) coef; + coef->pub.start_pass = start_pass_coef; + + /* Create the coefficient buffer. */ + if (need_full_buffer) { +#ifdef FULL_COEF_BUFFER_SUPPORTED + /* Allocate a full-image virtual array for each component, */ + /* padded to a multiple of samp_factor DCT blocks in each direction. */ + int ci; + jpeg_component_info *compptr; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + coef->whole_image[ci] = (*cinfo->mem->request_virt_barray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + (JDIMENSION) jround_up((long) compptr->width_in_blocks, + (long) compptr->h_samp_factor), + (JDIMENSION) jround_up((long) compptr->height_in_blocks, + (long) compptr->v_samp_factor), + (JDIMENSION) compptr->v_samp_factor); + } +#else + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); +#endif + } else { + /* We only need a single-MCU buffer. */ + JBLOCKROW buffer; + int i; + + buffer = (JBLOCKROW) + (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, + C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); + for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) { + coef->MCU_buffer[i] = buffer + i; + } + coef->whole_image[0] = NULL; /* flag for no virtual arrays */ + } +} diff --git a/gtkmm-osx/jpeg-6b/jccolor.c b/gtkmm-osx/jpeg-6b/jccolor.c new file mode 100644 index 0000000..0a8a4b5 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jccolor.c @@ -0,0 +1,459 @@ +/* + * jccolor.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains input colorspace conversion routines. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private subobject */ + +typedef struct { + struct jpeg_color_converter pub; /* public fields */ + + /* Private state for RGB->YCC conversion */ + INT32 * rgb_ycc_tab; /* => table for RGB to YCbCr conversion */ +} my_color_converter; + +typedef my_color_converter * my_cconvert_ptr; + + +/**************** RGB -> YCbCr conversion: most common case **************/ + +/* + * YCbCr is defined per CCIR 601-1, except that Cb and Cr are + * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5. + * The conversion equations to be implemented are therefore + * Y = 0.29900 * R + 0.58700 * G + 0.11400 * B + * Cb = -0.16874 * R - 0.33126 * G + 0.50000 * B + CENTERJSAMPLE + * Cr = 0.50000 * R - 0.41869 * G - 0.08131 * B + CENTERJSAMPLE + * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.) + * Note: older versions of the IJG code used a zero offset of MAXJSAMPLE/2, + * rather than CENTERJSAMPLE, for Cb and Cr. This gave equal positive and + * negative swings for Cb/Cr, but meant that grayscale values (Cb=Cr=0) + * were not represented exactly. Now we sacrifice exact representation of + * maximum red and maximum blue in order to get exact grayscales. + * + * To avoid floating-point arithmetic, we represent the fractional constants + * as integers scaled up by 2^16 (about 4 digits precision); we have to divide + * the products by 2^16, with appropriate rounding, to get the correct answer. + * + * For even more speed, we avoid doing any multiplications in the inner loop + * by precalculating the constants times R,G,B for all possible values. + * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table); + * for 12-bit samples it is still acceptable. It's not very reasonable for + * 16-bit samples, but if you want lossless storage you shouldn't be changing + * colorspace anyway. + * The CENTERJSAMPLE offsets and the rounding fudge-factor of 0.5 are included + * in the tables to save adding them separately in the inner loop. + */ + +#define SCALEBITS 16 /* speediest right-shift on some machines */ +#define CBCR_OFFSET ((INT32) CENTERJSAMPLE << SCALEBITS) +#define ONE_HALF ((INT32) 1 << (SCALEBITS-1)) +#define FIX(x) ((INT32) ((x) * (1L< Y section */ +#define G_Y_OFF (1*(MAXJSAMPLE+1)) /* offset to G => Y section */ +#define B_Y_OFF (2*(MAXJSAMPLE+1)) /* etc. */ +#define R_CB_OFF (3*(MAXJSAMPLE+1)) +#define G_CB_OFF (4*(MAXJSAMPLE+1)) +#define B_CB_OFF (5*(MAXJSAMPLE+1)) +#define R_CR_OFF B_CB_OFF /* B=>Cb, R=>Cr are the same */ +#define G_CR_OFF (6*(MAXJSAMPLE+1)) +#define B_CR_OFF (7*(MAXJSAMPLE+1)) +#define TABLE_SIZE (8*(MAXJSAMPLE+1)) + + +/* + * Initialize for RGB->YCC colorspace conversion. + */ + +METHODDEF(void) +rgb_ycc_start (j_compress_ptr cinfo) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + INT32 * rgb_ycc_tab; + INT32 i; + + /* Allocate and fill in the conversion tables. */ + cconvert->rgb_ycc_tab = rgb_ycc_tab = (INT32 *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (TABLE_SIZE * SIZEOF(INT32))); + + for (i = 0; i <= MAXJSAMPLE; i++) { + rgb_ycc_tab[i+R_Y_OFF] = FIX(0.29900) * i; + rgb_ycc_tab[i+G_Y_OFF] = FIX(0.58700) * i; + rgb_ycc_tab[i+B_Y_OFF] = FIX(0.11400) * i + ONE_HALF; + rgb_ycc_tab[i+R_CB_OFF] = (-FIX(0.16874)) * i; + rgb_ycc_tab[i+G_CB_OFF] = (-FIX(0.33126)) * i; + /* We use a rounding fudge-factor of 0.5-epsilon for Cb and Cr. + * This ensures that the maximum output will round to MAXJSAMPLE + * not MAXJSAMPLE+1, and thus that we don't have to range-limit. + */ + rgb_ycc_tab[i+B_CB_OFF] = FIX(0.50000) * i + CBCR_OFFSET + ONE_HALF-1; +/* B=>Cb and R=>Cr tables are the same + rgb_ycc_tab[i+R_CR_OFF] = FIX(0.50000) * i + CBCR_OFFSET + ONE_HALF-1; +*/ + rgb_ycc_tab[i+G_CR_OFF] = (-FIX(0.41869)) * i; + rgb_ycc_tab[i+B_CR_OFF] = (-FIX(0.08131)) * i; + } +} + + +/* + * Convert some rows of samples to the JPEG colorspace. + * + * Note that we change from the application's interleaved-pixel format + * to our internal noninterleaved, one-plane-per-component format. + * The input buffer is therefore three times as wide as the output buffer. + * + * A starting row offset is provided only for the output buffer. The caller + * can easily adjust the passed input_buf value to accommodate any row + * offset required on that side. + */ + +METHODDEF(void) +rgb_ycc_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int r, g, b; + register INT32 * ctab = cconvert->rgb_ycc_tab; + register JSAMPROW inptr; + register JSAMPROW outptr0, outptr1, outptr2; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { + inptr = *input_buf++; + outptr0 = output_buf[0][output_row]; + outptr1 = output_buf[1][output_row]; + outptr2 = output_buf[2][output_row]; + output_row++; + for (col = 0; col < num_cols; col++) { + r = GETJSAMPLE(inptr[RGB_RED]); + g = GETJSAMPLE(inptr[RGB_GREEN]); + b = GETJSAMPLE(inptr[RGB_BLUE]); + inptr += RGB_PIXELSIZE; + /* If the inputs are 0..MAXJSAMPLE, the outputs of these equations + * must be too; we do not need an explicit range-limiting operation. + * Hence the value being shifted is never negative, and we don't + * need the general RIGHT_SHIFT macro. + */ + /* Y */ + outptr0[col] = (JSAMPLE) + ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) + >> SCALEBITS); + /* Cb */ + outptr1[col] = (JSAMPLE) + ((ctab[r+R_CB_OFF] + ctab[g+G_CB_OFF] + ctab[b+B_CB_OFF]) + >> SCALEBITS); + /* Cr */ + outptr2[col] = (JSAMPLE) + ((ctab[r+R_CR_OFF] + ctab[g+G_CR_OFF] + ctab[b+B_CR_OFF]) + >> SCALEBITS); + } + } +} + + +/**************** Cases other than RGB -> YCbCr **************/ + + +/* + * Convert some rows of samples to the JPEG colorspace. + * This version handles RGB->grayscale conversion, which is the same + * as the RGB->Y portion of RGB->YCbCr. + * We assume rgb_ycc_start has been called (we only use the Y tables). + */ + +METHODDEF(void) +rgb_gray_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int r, g, b; + register INT32 * ctab = cconvert->rgb_ycc_tab; + register JSAMPROW inptr; + register JSAMPROW outptr; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { + inptr = *input_buf++; + outptr = output_buf[0][output_row]; + output_row++; + for (col = 0; col < num_cols; col++) { + r = GETJSAMPLE(inptr[RGB_RED]); + g = GETJSAMPLE(inptr[RGB_GREEN]); + b = GETJSAMPLE(inptr[RGB_BLUE]); + inptr += RGB_PIXELSIZE; + /* Y */ + outptr[col] = (JSAMPLE) + ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) + >> SCALEBITS); + } + } +} + + +/* + * Convert some rows of samples to the JPEG colorspace. + * This version handles Adobe-style CMYK->YCCK conversion, + * where we convert R=1-C, G=1-M, and B=1-Y to YCbCr using the same + * conversion as above, while passing K (black) unchanged. + * We assume rgb_ycc_start has been called. + */ + +METHODDEF(void) +cmyk_ycck_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int r, g, b; + register INT32 * ctab = cconvert->rgb_ycc_tab; + register JSAMPROW inptr; + register JSAMPROW outptr0, outptr1, outptr2, outptr3; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { + inptr = *input_buf++; + outptr0 = output_buf[0][output_row]; + outptr1 = output_buf[1][output_row]; + outptr2 = output_buf[2][output_row]; + outptr3 = output_buf[3][output_row]; + output_row++; + for (col = 0; col < num_cols; col++) { + r = MAXJSAMPLE - GETJSAMPLE(inptr[0]); + g = MAXJSAMPLE - GETJSAMPLE(inptr[1]); + b = MAXJSAMPLE - GETJSAMPLE(inptr[2]); + /* K passes through as-is */ + outptr3[col] = inptr[3]; /* don't need GETJSAMPLE here */ + inptr += 4; + /* If the inputs are 0..MAXJSAMPLE, the outputs of these equations + * must be too; we do not need an explicit range-limiting operation. + * Hence the value being shifted is never negative, and we don't + * need the general RIGHT_SHIFT macro. + */ + /* Y */ + outptr0[col] = (JSAMPLE) + ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) + >> SCALEBITS); + /* Cb */ + outptr1[col] = (JSAMPLE) + ((ctab[r+R_CB_OFF] + ctab[g+G_CB_OFF] + ctab[b+B_CB_OFF]) + >> SCALEBITS); + /* Cr */ + outptr2[col] = (JSAMPLE) + ((ctab[r+R_CR_OFF] + ctab[g+G_CR_OFF] + ctab[b+B_CR_OFF]) + >> SCALEBITS); + } + } +} + + +/* + * Convert some rows of samples to the JPEG colorspace. + * This version handles grayscale output with no conversion. + * The source can be either plain grayscale or YCbCr (since Y == gray). + */ + +METHODDEF(void) +grayscale_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + register JSAMPROW inptr; + register JSAMPROW outptr; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + int instride = cinfo->input_components; + + while (--num_rows >= 0) { + inptr = *input_buf++; + outptr = output_buf[0][output_row]; + output_row++; + for (col = 0; col < num_cols; col++) { + outptr[col] = inptr[0]; /* don't need GETJSAMPLE() here */ + inptr += instride; + } + } +} + + +/* + * Convert some rows of samples to the JPEG colorspace. + * This version handles multi-component colorspaces without conversion. + * We assume input_components == num_components. + */ + +METHODDEF(void) +null_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + register JSAMPROW inptr; + register JSAMPROW outptr; + register JDIMENSION col; + register int ci; + int nc = cinfo->num_components; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { + /* It seems fastest to make a separate pass for each component. */ + for (ci = 0; ci < nc; ci++) { + inptr = *input_buf; + outptr = output_buf[ci][output_row]; + for (col = 0; col < num_cols; col++) { + outptr[col] = inptr[ci]; /* don't need GETJSAMPLE() here */ + inptr += nc; + } + } + input_buf++; + output_row++; + } +} + + +/* + * Empty method for start_pass. + */ + +METHODDEF(void) +null_method (j_compress_ptr cinfo) +{ + /* no work needed */ +} + + +/* + * Module initialization routine for input colorspace conversion. + */ + +GLOBAL(void) +jinit_color_converter (j_compress_ptr cinfo) +{ + my_cconvert_ptr cconvert; + + cconvert = (my_cconvert_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_color_converter)); + cinfo->cconvert = (struct jpeg_color_converter *) cconvert; + /* set start_pass to null method until we find out differently */ + cconvert->pub.start_pass = null_method; + + /* Make sure input_components agrees with in_color_space */ + switch (cinfo->in_color_space) { + case JCS_GRAYSCALE: + if (cinfo->input_components != 1) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + break; + + case JCS_RGB: +#if RGB_PIXELSIZE != 3 + if (cinfo->input_components != RGB_PIXELSIZE) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + break; +#endif /* else share code with YCbCr */ + + case JCS_YCbCr: + if (cinfo->input_components != 3) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + break; + + case JCS_CMYK: + case JCS_YCCK: + if (cinfo->input_components != 4) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + break; + + default: /* JCS_UNKNOWN can be anything */ + if (cinfo->input_components < 1) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + break; + } + + /* Check num_components, set conversion method based on requested space */ + switch (cinfo->jpeg_color_space) { + case JCS_GRAYSCALE: + if (cinfo->num_components != 1) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + if (cinfo->in_color_space == JCS_GRAYSCALE) + cconvert->pub.color_convert = grayscale_convert; + else if (cinfo->in_color_space == JCS_RGB) { + cconvert->pub.start_pass = rgb_ycc_start; + cconvert->pub.color_convert = rgb_gray_convert; + } else if (cinfo->in_color_space == JCS_YCbCr) + cconvert->pub.color_convert = grayscale_convert; + else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + case JCS_RGB: + if (cinfo->num_components != 3) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + if (cinfo->in_color_space == JCS_RGB && RGB_PIXELSIZE == 3) + cconvert->pub.color_convert = null_convert; + else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + case JCS_YCbCr: + if (cinfo->num_components != 3) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + if (cinfo->in_color_space == JCS_RGB) { + cconvert->pub.start_pass = rgb_ycc_start; + cconvert->pub.color_convert = rgb_ycc_convert; + } else if (cinfo->in_color_space == JCS_YCbCr) + cconvert->pub.color_convert = null_convert; + else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + case JCS_CMYK: + if (cinfo->num_components != 4) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + if (cinfo->in_color_space == JCS_CMYK) + cconvert->pub.color_convert = null_convert; + else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + case JCS_YCCK: + if (cinfo->num_components != 4) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + if (cinfo->in_color_space == JCS_CMYK) { + cconvert->pub.start_pass = rgb_ycc_start; + cconvert->pub.color_convert = cmyk_ycck_convert; + } else if (cinfo->in_color_space == JCS_YCCK) + cconvert->pub.color_convert = null_convert; + else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + default: /* allow null conversion of JCS_UNKNOWN */ + if (cinfo->jpeg_color_space != cinfo->in_color_space || + cinfo->num_components != cinfo->input_components) + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + cconvert->pub.color_convert = null_convert; + break; + } +} diff --git a/gtkmm-osx/jpeg-6b/jcdctmgr.c b/gtkmm-osx/jpeg-6b/jcdctmgr.c new file mode 100644 index 0000000..61fa79b --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jcdctmgr.c @@ -0,0 +1,387 @@ +/* + * jcdctmgr.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the forward-DCT management logic. + * This code selects a particular DCT implementation to be used, + * and it performs related housekeeping chores including coefficient + * quantization. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + + +/* Private subobject for this module */ + +typedef struct { + struct jpeg_forward_dct pub; /* public fields */ + + /* Pointer to the DCT routine actually in use */ + forward_DCT_method_ptr do_dct; + + /* The actual post-DCT divisors --- not identical to the quant table + * entries, because of scaling (especially for an unnormalized DCT). + * Each table is given in normal array order. + */ + DCTELEM * divisors[NUM_QUANT_TBLS]; + +#ifdef DCT_FLOAT_SUPPORTED + /* Same as above for the floating-point case. */ + float_DCT_method_ptr do_float_dct; + FAST_FLOAT * float_divisors[NUM_QUANT_TBLS]; +#endif +} my_fdct_controller; + +typedef my_fdct_controller * my_fdct_ptr; + + +/* + * Initialize for a processing pass. + * Verify that all referenced Q-tables are present, and set up + * the divisor table for each one. + * In the current implementation, DCT of all components is done during + * the first pass, even if only some components will be output in the + * first scan. Hence all components should be examined here. + */ + +METHODDEF(void) +start_pass_fdctmgr (j_compress_ptr cinfo) +{ + my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; + int ci, qtblno, i; + jpeg_component_info *compptr; + JQUANT_TBL * qtbl; + DCTELEM * dtbl; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + qtblno = compptr->quant_tbl_no; + /* Make sure specified quantization table is present */ + if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS || + cinfo->quant_tbl_ptrs[qtblno] == NULL) + ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno); + qtbl = cinfo->quant_tbl_ptrs[qtblno]; + /* Compute divisors for this quant table */ + /* We may do this more than once for same table, but it's not a big deal */ + switch (cinfo->dct_method) { +#ifdef DCT_ISLOW_SUPPORTED + case JDCT_ISLOW: + /* For LL&M IDCT method, divisors are equal to raw quantization + * coefficients multiplied by 8 (to counteract scaling). + */ + if (fdct->divisors[qtblno] == NULL) { + fdct->divisors[qtblno] = (DCTELEM *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + DCTSIZE2 * SIZEOF(DCTELEM)); + } + dtbl = fdct->divisors[qtblno]; + for (i = 0; i < DCTSIZE2; i++) { + dtbl[i] = ((DCTELEM) qtbl->quantval[i]) << 3; + } + break; +#endif +#ifdef DCT_IFAST_SUPPORTED + case JDCT_IFAST: + { + /* For AA&N IDCT method, divisors are equal to quantization + * coefficients scaled by scalefactor[row]*scalefactor[col], where + * scalefactor[0] = 1 + * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 + * We apply a further scale factor of 8. + */ +#define CONST_BITS 14 + static const INT16 aanscales[DCTSIZE2] = { + /* precomputed values scaled up by 14 bits */ + 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, + 22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270, + 21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906, + 19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315, + 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, + 12873, 17855, 16819, 15137, 12873, 10114, 6967, 3552, + 8867, 12299, 11585, 10426, 8867, 6967, 4799, 2446, + 4520, 6270, 5906, 5315, 4520, 3552, 2446, 1247 + }; + SHIFT_TEMPS + + if (fdct->divisors[qtblno] == NULL) { + fdct->divisors[qtblno] = (DCTELEM *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + DCTSIZE2 * SIZEOF(DCTELEM)); + } + dtbl = fdct->divisors[qtblno]; + for (i = 0; i < DCTSIZE2; i++) { + dtbl[i] = (DCTELEM) + DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i], + (INT32) aanscales[i]), + CONST_BITS-3); + } + } + break; +#endif +#ifdef DCT_FLOAT_SUPPORTED + case JDCT_FLOAT: + { + /* For float AA&N IDCT method, divisors are equal to quantization + * coefficients scaled by scalefactor[row]*scalefactor[col], where + * scalefactor[0] = 1 + * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 + * We apply a further scale factor of 8. + * What's actually stored is 1/divisor so that the inner loop can + * use a multiplication rather than a division. + */ + FAST_FLOAT * fdtbl; + int row, col; + static const double aanscalefactor[DCTSIZE] = { + 1.0, 1.387039845, 1.306562965, 1.175875602, + 1.0, 0.785694958, 0.541196100, 0.275899379 + }; + + if (fdct->float_divisors[qtblno] == NULL) { + fdct->float_divisors[qtblno] = (FAST_FLOAT *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + DCTSIZE2 * SIZEOF(FAST_FLOAT)); + } + fdtbl = fdct->float_divisors[qtblno]; + i = 0; + for (row = 0; row < DCTSIZE; row++) { + for (col = 0; col < DCTSIZE; col++) { + fdtbl[i] = (FAST_FLOAT) + (1.0 / (((double) qtbl->quantval[i] * + aanscalefactor[row] * aanscalefactor[col] * 8.0))); + i++; + } + } + } + break; +#endif + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + break; + } + } +} + + +/* + * Perform forward DCT on one or more blocks of a component. + * + * The input samples are taken from the sample_data[] array starting at + * position start_row/start_col, and moving to the right for any additional + * blocks. The quantized coefficients are returned in coef_blocks[]. + */ + +METHODDEF(void) +forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY sample_data, JBLOCKROW coef_blocks, + JDIMENSION start_row, JDIMENSION start_col, + JDIMENSION num_blocks) +/* This version is used for integer DCT implementations. */ +{ + /* This routine is heavily used, so it's worth coding it tightly. */ + my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; + forward_DCT_method_ptr do_dct = fdct->do_dct; + DCTELEM * divisors = fdct->divisors[compptr->quant_tbl_no]; + DCTELEM workspace[DCTSIZE2]; /* work area for FDCT subroutine */ + JDIMENSION bi; + + sample_data += start_row; /* fold in the vertical offset once */ + + for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) { + /* Load data into workspace, applying unsigned->signed conversion */ + { register DCTELEM *workspaceptr; + register JSAMPROW elemptr; + register int elemr; + + workspaceptr = workspace; + for (elemr = 0; elemr < DCTSIZE; elemr++) { + elemptr = sample_data[elemr] + start_col; +#if DCTSIZE == 8 /* unroll the inner loop */ + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; +#else + { register int elemc; + for (elemc = DCTSIZE; elemc > 0; elemc--) { + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + } + } +#endif + } + } + + /* Perform the DCT */ + (*do_dct) (workspace); + + /* Quantize/descale the coefficients, and store into coef_blocks[] */ + { register DCTELEM temp, qval; + register int i; + register JCOEFPTR output_ptr = coef_blocks[bi]; + + for (i = 0; i < DCTSIZE2; i++) { + qval = divisors[i]; + temp = workspace[i]; + /* Divide the coefficient value by qval, ensuring proper rounding. + * Since C does not specify the direction of rounding for negative + * quotients, we have to force the dividend positive for portability. + * + * In most files, at least half of the output values will be zero + * (at default quantization settings, more like three-quarters...) + * so we should ensure that this case is fast. On many machines, + * a comparison is enough cheaper than a divide to make a special test + * a win. Since both inputs will be nonnegative, we need only test + * for a < b to discover whether a/b is 0. + * If your machine's division is fast enough, define FAST_DIVIDE. + */ +#ifdef FAST_DIVIDE +#define DIVIDE_BY(a,b) a /= b +#else +#define DIVIDE_BY(a,b) if (a >= b) a /= b; else a = 0 +#endif + if (temp < 0) { + temp = -temp; + temp += qval>>1; /* for rounding */ + DIVIDE_BY(temp, qval); + temp = -temp; + } else { + temp += qval>>1; /* for rounding */ + DIVIDE_BY(temp, qval); + } + output_ptr[i] = (JCOEF) temp; + } + } + } +} + + +#ifdef DCT_FLOAT_SUPPORTED + +METHODDEF(void) +forward_DCT_float (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY sample_data, JBLOCKROW coef_blocks, + JDIMENSION start_row, JDIMENSION start_col, + JDIMENSION num_blocks) +/* This version is used for floating-point DCT implementations. */ +{ + /* This routine is heavily used, so it's worth coding it tightly. */ + my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; + float_DCT_method_ptr do_dct = fdct->do_float_dct; + FAST_FLOAT * divisors = fdct->float_divisors[compptr->quant_tbl_no]; + FAST_FLOAT workspace[DCTSIZE2]; /* work area for FDCT subroutine */ + JDIMENSION bi; + + sample_data += start_row; /* fold in the vertical offset once */ + + for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) { + /* Load data into workspace, applying unsigned->signed conversion */ + { register FAST_FLOAT *workspaceptr; + register JSAMPROW elemptr; + register int elemr; + + workspaceptr = workspace; + for (elemr = 0; elemr < DCTSIZE; elemr++) { + elemptr = sample_data[elemr] + start_col; +#if DCTSIZE == 8 /* unroll the inner loop */ + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); +#else + { register int elemc; + for (elemc = DCTSIZE; elemc > 0; elemc--) { + *workspaceptr++ = (FAST_FLOAT) + (GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + } + } +#endif + } + } + + /* Perform the DCT */ + (*do_dct) (workspace); + + /* Quantize/descale the coefficients, and store into coef_blocks[] */ + { register FAST_FLOAT temp; + register int i; + register JCOEFPTR output_ptr = coef_blocks[bi]; + + for (i = 0; i < DCTSIZE2; i++) { + /* Apply the quantization and scaling factor */ + temp = workspace[i] * divisors[i]; + /* Round to nearest integer. + * Since C does not specify the direction of rounding for negative + * quotients, we have to force the dividend positive for portability. + * The maximum coefficient size is +-16K (for 12-bit data), so this + * code should work for either 16-bit or 32-bit ints. + */ + output_ptr[i] = (JCOEF) ((int) (temp + (FAST_FLOAT) 16384.5) - 16384); + } + } + } +} + +#endif /* DCT_FLOAT_SUPPORTED */ + + +/* + * Initialize FDCT manager. + */ + +GLOBAL(void) +jinit_forward_dct (j_compress_ptr cinfo) +{ + my_fdct_ptr fdct; + int i; + + fdct = (my_fdct_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_fdct_controller)); + cinfo->fdct = (struct jpeg_forward_dct *) fdct; + fdct->pub.start_pass = start_pass_fdctmgr; + + switch (cinfo->dct_method) { +#ifdef DCT_ISLOW_SUPPORTED + case JDCT_ISLOW: + fdct->pub.forward_DCT = forward_DCT; + fdct->do_dct = jpeg_fdct_islow; + break; +#endif +#ifdef DCT_IFAST_SUPPORTED + case JDCT_IFAST: + fdct->pub.forward_DCT = forward_DCT; + fdct->do_dct = jpeg_fdct_ifast; + break; +#endif +#ifdef DCT_FLOAT_SUPPORTED + case JDCT_FLOAT: + fdct->pub.forward_DCT = forward_DCT_float; + fdct->do_float_dct = jpeg_fdct_float; + break; +#endif + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + break; + } + + /* Mark divisor tables unallocated */ + for (i = 0; i < NUM_QUANT_TBLS; i++) { + fdct->divisors[i] = NULL; +#ifdef DCT_FLOAT_SUPPORTED + fdct->float_divisors[i] = NULL; +#endif + } +} diff --git a/gtkmm-osx/jpeg-6b/jchuff.c b/gtkmm-osx/jpeg-6b/jchuff.c new file mode 100644 index 0000000..f235250 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jchuff.c @@ -0,0 +1,909 @@ +/* + * jchuff.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains Huffman entropy encoding routines. + * + * Much of the complexity here has to do with supporting output suspension. + * If the data destination module demands suspension, we want to be able to + * back up to the start of the current MCU. To do this, we copy state + * variables into local working storage, and update them back to the + * permanent JPEG objects only upon successful completion of an MCU. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jchuff.h" /* Declarations shared with jcphuff.c */ + + +/* Expanded entropy encoder object for Huffman encoding. + * + * The savable_state subrecord contains fields that change within an MCU, + * but must not be updated permanently until we complete the MCU. + */ + +typedef struct { + INT32 put_buffer; /* current bit-accumulation buffer */ + int put_bits; /* # of bits now in it */ + int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ +} savable_state; + +/* This macro is to work around compilers with missing or broken + * structure assignment. You'll need to fix this code if you have + * such a compiler and you change MAX_COMPS_IN_SCAN. + */ + +#ifndef NO_STRUCT_ASSIGN +#define ASSIGN_STATE(dest,src) ((dest) = (src)) +#else +#if MAX_COMPS_IN_SCAN == 4 +#define ASSIGN_STATE(dest,src) \ + ((dest).put_buffer = (src).put_buffer, \ + (dest).put_bits = (src).put_bits, \ + (dest).last_dc_val[0] = (src).last_dc_val[0], \ + (dest).last_dc_val[1] = (src).last_dc_val[1], \ + (dest).last_dc_val[2] = (src).last_dc_val[2], \ + (dest).last_dc_val[3] = (src).last_dc_val[3]) +#endif +#endif + + +typedef struct { + struct jpeg_entropy_encoder pub; /* public fields */ + + savable_state saved; /* Bit buffer & DC state at start of MCU */ + + /* These fields are NOT loaded into local working state. */ + unsigned int restarts_to_go; /* MCUs left in this restart interval */ + int next_restart_num; /* next restart number to write (0-7) */ + + /* Pointers to derived tables (these workspaces have image lifespan) */ + c_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS]; + c_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS]; + +#ifdef ENTROPY_OPT_SUPPORTED /* Statistics tables for optimization */ + long * dc_count_ptrs[NUM_HUFF_TBLS]; + long * ac_count_ptrs[NUM_HUFF_TBLS]; +#endif +} huff_entropy_encoder; + +typedef huff_entropy_encoder * huff_entropy_ptr; + +/* Working state while writing an MCU. + * This struct contains all the fields that are needed by subroutines. + */ + +typedef struct { + JOCTET * next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + savable_state cur; /* Current bit buffer & DC state */ + j_compress_ptr cinfo; /* dump_buffer needs access to this */ +} working_state; + + +/* Forward declarations */ +METHODDEF(boolean) encode_mcu_huff JPP((j_compress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(void) finish_pass_huff JPP((j_compress_ptr cinfo)); +#ifdef ENTROPY_OPT_SUPPORTED +METHODDEF(boolean) encode_mcu_gather JPP((j_compress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(void) finish_pass_gather JPP((j_compress_ptr cinfo)); +#endif + + +/* + * Initialize for a Huffman-compressed scan. + * If gather_statistics is TRUE, we do not output anything during the scan, + * just count the Huffman symbols used and generate Huffman code tables. + */ + +METHODDEF(void) +start_pass_huff (j_compress_ptr cinfo, boolean gather_statistics) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int ci, dctbl, actbl; + jpeg_component_info * compptr; + + if (gather_statistics) { +#ifdef ENTROPY_OPT_SUPPORTED + entropy->pub.encode_mcu = encode_mcu_gather; + entropy->pub.finish_pass = finish_pass_gather; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + entropy->pub.encode_mcu = encode_mcu_huff; + entropy->pub.finish_pass = finish_pass_huff; + } + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + dctbl = compptr->dc_tbl_no; + actbl = compptr->ac_tbl_no; + if (gather_statistics) { +#ifdef ENTROPY_OPT_SUPPORTED + /* Check for invalid table indexes */ + /* (make_c_derived_tbl does this in the other path) */ + if (dctbl < 0 || dctbl >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, dctbl); + if (actbl < 0 || actbl >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, actbl); + /* Allocate and zero the statistics tables */ + /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */ + if (entropy->dc_count_ptrs[dctbl] == NULL) + entropy->dc_count_ptrs[dctbl] = (long *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + 257 * SIZEOF(long)); + MEMZERO(entropy->dc_count_ptrs[dctbl], 257 * SIZEOF(long)); + if (entropy->ac_count_ptrs[actbl] == NULL) + entropy->ac_count_ptrs[actbl] = (long *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + 257 * SIZEOF(long)); + MEMZERO(entropy->ac_count_ptrs[actbl], 257 * SIZEOF(long)); +#endif + } else { + /* Compute derived values for Huffman tables */ + /* We may do this more than once for a table, but it's not expensive */ + jpeg_make_c_derived_tbl(cinfo, TRUE, dctbl, + & entropy->dc_derived_tbls[dctbl]); + jpeg_make_c_derived_tbl(cinfo, FALSE, actbl, + & entropy->ac_derived_tbls[actbl]); + } + /* Initialize DC predictions to 0 */ + entropy->saved.last_dc_val[ci] = 0; + } + + /* Initialize bit buffer to empty */ + entropy->saved.put_buffer = 0; + entropy->saved.put_bits = 0; + + /* Initialize restart stuff */ + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num = 0; +} + + +/* + * Compute the derived values for a Huffman table. + * This routine also performs some validation checks on the table. + * + * Note this is also used by jcphuff.c. + */ + +GLOBAL(void) +jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno, + c_derived_tbl ** pdtbl) +{ + JHUFF_TBL *htbl; + c_derived_tbl *dtbl; + int p, i, l, lastp, si, maxsymbol; + char huffsize[257]; + unsigned int huffcode[257]; + unsigned int code; + + /* Note that huffsize[] and huffcode[] are filled in code-length order, + * paralleling the order of the symbols themselves in htbl->huffval[]. + */ + + /* Find the input Huffman table */ + if (tblno < 0 || tblno >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno); + htbl = + isDC ? cinfo->dc_huff_tbl_ptrs[tblno] : cinfo->ac_huff_tbl_ptrs[tblno]; + if (htbl == NULL) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno); + + /* Allocate a workspace if we haven't already done so. */ + if (*pdtbl == NULL) + *pdtbl = (c_derived_tbl *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(c_derived_tbl)); + dtbl = *pdtbl; + + /* Figure C.1: make table of Huffman code length for each symbol */ + + p = 0; + for (l = 1; l <= 16; l++) { + i = (int) htbl->bits[l]; + if (i < 0 || p + i > 256) /* protect against table overrun */ + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + while (i--) + huffsize[p++] = (char) l; + } + huffsize[p] = 0; + lastp = p; + + /* Figure C.2: generate the codes themselves */ + /* We also validate that the counts represent a legal Huffman code tree. */ + + code = 0; + si = huffsize[0]; + p = 0; + while (huffsize[p]) { + while (((int) huffsize[p]) == si) { + huffcode[p++] = code; + code++; + } + /* code is now 1 more than the last code used for codelength si; but + * it must still fit in si bits, since no code is allowed to be all ones. + */ + if (((INT32) code) >= (((INT32) 1) << si)) + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + code <<= 1; + si++; + } + + /* Figure C.3: generate encoding tables */ + /* These are code and size indexed by symbol value */ + + /* Set all codeless symbols to have code length 0; + * this lets us detect duplicate VAL entries here, and later + * allows emit_bits to detect any attempt to emit such symbols. + */ + MEMZERO(dtbl->ehufsi, SIZEOF(dtbl->ehufsi)); + + /* This is also a convenient place to check for out-of-range + * and duplicated VAL entries. We allow 0..255 for AC symbols + * but only 0..15 for DC. (We could constrain them further + * based on data depth and mode, but this seems enough.) + */ + maxsymbol = isDC ? 15 : 255; + + for (p = 0; p < lastp; p++) { + i = htbl->huffval[p]; + if (i < 0 || i > maxsymbol || dtbl->ehufsi[i]) + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + dtbl->ehufco[i] = huffcode[p]; + dtbl->ehufsi[i] = huffsize[p]; + } +} + + +/* Outputting bytes to the file */ + +/* Emit a byte, taking 'action' if must suspend. */ +#define emit_byte(state,val,action) \ + { *(state)->next_output_byte++ = (JOCTET) (val); \ + if (--(state)->free_in_buffer == 0) \ + if (! dump_buffer(state)) \ + { action; } } + + +LOCAL(boolean) +dump_buffer (working_state * state) +/* Empty the output buffer; return TRUE if successful, FALSE if must suspend */ +{ + struct jpeg_destination_mgr * dest = state->cinfo->dest; + + if (! (*dest->empty_output_buffer) (state->cinfo)) + return FALSE; + /* After a successful buffer dump, must reset buffer pointers */ + state->next_output_byte = dest->next_output_byte; + state->free_in_buffer = dest->free_in_buffer; + return TRUE; +} + + +/* Outputting bits to the file */ + +/* Only the right 24 bits of put_buffer are used; the valid bits are + * left-justified in this part. At most 16 bits can be passed to emit_bits + * in one call, and we never retain more than 7 bits in put_buffer + * between calls, so 24 bits are sufficient. + */ + +INLINE +LOCAL(boolean) +emit_bits (working_state * state, unsigned int code, int size) +/* Emit some bits; return TRUE if successful, FALSE if must suspend */ +{ + /* This routine is heavily used, so it's worth coding tightly. */ + register INT32 put_buffer = (INT32) code; + register int put_bits = state->cur.put_bits; + + /* if size is 0, caller used an invalid Huffman table entry */ + if (size == 0) + ERREXIT(state->cinfo, JERR_HUFF_MISSING_CODE); + + put_buffer &= (((INT32) 1)<cur.put_buffer; /* and merge with old buffer contents */ + + while (put_bits >= 8) { + int c = (int) ((put_buffer >> 16) & 0xFF); + + emit_byte(state, c, return FALSE); + if (c == 0xFF) { /* need to stuff a zero byte? */ + emit_byte(state, 0, return FALSE); + } + put_buffer <<= 8; + put_bits -= 8; + } + + state->cur.put_buffer = put_buffer; /* update state variables */ + state->cur.put_bits = put_bits; + + return TRUE; +} + + +LOCAL(boolean) +flush_bits (working_state * state) +{ + if (! emit_bits(state, 0x7F, 7)) /* fill any partial byte with ones */ + return FALSE; + state->cur.put_buffer = 0; /* and reset bit-buffer to empty */ + state->cur.put_bits = 0; + return TRUE; +} + + +/* Encode a single block's worth of coefficients */ + +LOCAL(boolean) +encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val, + c_derived_tbl *dctbl, c_derived_tbl *actbl) +{ + register int temp, temp2; + register int nbits; + register int k, r, i; + + /* Encode the DC coefficient difference per section F.1.2.1 */ + + temp = temp2 = block[0] - last_dc_val; + + if (temp < 0) { + temp = -temp; /* temp is abs value of input */ + /* For a negative input, want temp2 = bitwise complement of abs(input) */ + /* This code assumes we are on a two's complement machine */ + temp2--; + } + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 0; + while (temp) { + nbits++; + temp >>= 1; + } + /* Check for out-of-range coefficient values. + * Since we're encoding a difference, the range limit is twice as much. + */ + if (nbits > MAX_COEF_BITS+1) + ERREXIT(state->cinfo, JERR_BAD_DCT_COEF); + + /* Emit the Huffman-coded symbol for the number of bits */ + if (! emit_bits(state, dctbl->ehufco[nbits], dctbl->ehufsi[nbits])) + return FALSE; + + /* Emit that number of bits of the value, if positive, */ + /* or the complement of its magnitude, if negative. */ + if (nbits) /* emit_bits rejects calls with size 0 */ + if (! emit_bits(state, (unsigned int) temp2, nbits)) + return FALSE; + + /* Encode the AC coefficients per section F.1.2.2 */ + + r = 0; /* r = run length of zeros */ + + for (k = 1; k < DCTSIZE2; k++) { + if ((temp = block[jpeg_natural_order[k]]) == 0) { + r++; + } else { + /* if run length > 15, must emit special run-length-16 codes (0xF0) */ + while (r > 15) { + if (! emit_bits(state, actbl->ehufco[0xF0], actbl->ehufsi[0xF0])) + return FALSE; + r -= 16; + } + + temp2 = temp; + if (temp < 0) { + temp = -temp; /* temp is abs value of input */ + /* This code assumes we are on a two's complement machine */ + temp2--; + } + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 1; /* there must be at least one 1 bit */ + while ((temp >>= 1)) + nbits++; + /* Check for out-of-range coefficient values */ + if (nbits > MAX_COEF_BITS) + ERREXIT(state->cinfo, JERR_BAD_DCT_COEF); + + /* Emit Huffman symbol for run length / number of bits */ + i = (r << 4) + nbits; + if (! emit_bits(state, actbl->ehufco[i], actbl->ehufsi[i])) + return FALSE; + + /* Emit that number of bits of the value, if positive, */ + /* or the complement of its magnitude, if negative. */ + if (! emit_bits(state, (unsigned int) temp2, nbits)) + return FALSE; + + r = 0; + } + } + + /* If the last coef(s) were zero, emit an end-of-block code */ + if (r > 0) + if (! emit_bits(state, actbl->ehufco[0], actbl->ehufsi[0])) + return FALSE; + + return TRUE; +} + + +/* + * Emit a restart marker & resynchronize predictions. + */ + +LOCAL(boolean) +emit_restart (working_state * state, int restart_num) +{ + int ci; + + if (! flush_bits(state)) + return FALSE; + + emit_byte(state, 0xFF, return FALSE); + emit_byte(state, JPEG_RST0 + restart_num, return FALSE); + + /* Re-initialize DC predictions to 0 */ + for (ci = 0; ci < state->cinfo->comps_in_scan; ci++) + state->cur.last_dc_val[ci] = 0; + + /* The restart counter is not updated until we successfully write the MCU. */ + + return TRUE; +} + + +/* + * Encode and output one MCU's worth of Huffman-compressed coefficients. + */ + +METHODDEF(boolean) +encode_mcu_huff (j_compress_ptr cinfo, JBLOCKROW *MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + working_state state; + int blkn, ci; + jpeg_component_info * compptr; + + /* Load up working state */ + state.next_output_byte = cinfo->dest->next_output_byte; + state.free_in_buffer = cinfo->dest->free_in_buffer; + ASSIGN_STATE(state.cur, entropy->saved); + state.cinfo = cinfo; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! emit_restart(&state, entropy->next_restart_num)) + return FALSE; + } + + /* Encode the MCU data blocks */ + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + if (! encode_one_block(&state, + MCU_data[blkn][0], state.cur.last_dc_val[ci], + entropy->dc_derived_tbls[compptr->dc_tbl_no], + entropy->ac_derived_tbls[compptr->ac_tbl_no])) + return FALSE; + /* Update last_dc_val */ + state.cur.last_dc_val[ci] = MCU_data[blkn][0][0]; + } + + /* Completed MCU, so update state */ + cinfo->dest->next_output_byte = state.next_output_byte; + cinfo->dest->free_in_buffer = state.free_in_buffer; + ASSIGN_STATE(entropy->saved, state.cur); + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* + * Finish up at the end of a Huffman-compressed scan. + */ + +METHODDEF(void) +finish_pass_huff (j_compress_ptr cinfo) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + working_state state; + + /* Load up working state ... flush_bits needs it */ + state.next_output_byte = cinfo->dest->next_output_byte; + state.free_in_buffer = cinfo->dest->free_in_buffer; + ASSIGN_STATE(state.cur, entropy->saved); + state.cinfo = cinfo; + + /* Flush out the last data */ + if (! flush_bits(&state)) + ERREXIT(cinfo, JERR_CANT_SUSPEND); + + /* Update state */ + cinfo->dest->next_output_byte = state.next_output_byte; + cinfo->dest->free_in_buffer = state.free_in_buffer; + ASSIGN_STATE(entropy->saved, state.cur); +} + + +/* + * Huffman coding optimization. + * + * We first scan the supplied data and count the number of uses of each symbol + * that is to be Huffman-coded. (This process MUST agree with the code above.) + * Then we build a Huffman coding tree for the observed counts. + * Symbols which are not needed at all for the particular image are not + * assigned any code, which saves space in the DHT marker as well as in + * the compressed data. + */ + +#ifdef ENTROPY_OPT_SUPPORTED + + +/* Process a single block's worth of coefficients */ + +LOCAL(void) +htest_one_block (j_compress_ptr cinfo, JCOEFPTR block, int last_dc_val, + long dc_counts[], long ac_counts[]) +{ + register int temp; + register int nbits; + register int k, r; + + /* Encode the DC coefficient difference per section F.1.2.1 */ + + temp = block[0] - last_dc_val; + if (temp < 0) + temp = -temp; + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 0; + while (temp) { + nbits++; + temp >>= 1; + } + /* Check for out-of-range coefficient values. + * Since we're encoding a difference, the range limit is twice as much. + */ + if (nbits > MAX_COEF_BITS+1) + ERREXIT(cinfo, JERR_BAD_DCT_COEF); + + /* Count the Huffman symbol for the number of bits */ + dc_counts[nbits]++; + + /* Encode the AC coefficients per section F.1.2.2 */ + + r = 0; /* r = run length of zeros */ + + for (k = 1; k < DCTSIZE2; k++) { + if ((temp = block[jpeg_natural_order[k]]) == 0) { + r++; + } else { + /* if run length > 15, must emit special run-length-16 codes (0xF0) */ + while (r > 15) { + ac_counts[0xF0]++; + r -= 16; + } + + /* Find the number of bits needed for the magnitude of the coefficient */ + if (temp < 0) + temp = -temp; + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 1; /* there must be at least one 1 bit */ + while ((temp >>= 1)) + nbits++; + /* Check for out-of-range coefficient values */ + if (nbits > MAX_COEF_BITS) + ERREXIT(cinfo, JERR_BAD_DCT_COEF); + + /* Count Huffman symbol for run length / number of bits */ + ac_counts[(r << 4) + nbits]++; + + r = 0; + } + } + + /* If the last coef(s) were zero, emit an end-of-block code */ + if (r > 0) + ac_counts[0]++; +} + + +/* + * Trial-encode one MCU's worth of Huffman-compressed coefficients. + * No data is actually output, so no suspension return is possible. + */ + +METHODDEF(boolean) +encode_mcu_gather (j_compress_ptr cinfo, JBLOCKROW *MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int blkn, ci; + jpeg_component_info * compptr; + + /* Take care of restart intervals if needed */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + /* Re-initialize DC predictions to 0 */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) + entropy->saved.last_dc_val[ci] = 0; + /* Update restart state */ + entropy->restarts_to_go = cinfo->restart_interval; + } + entropy->restarts_to_go--; + } + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + htest_one_block(cinfo, MCU_data[blkn][0], entropy->saved.last_dc_val[ci], + entropy->dc_count_ptrs[compptr->dc_tbl_no], + entropy->ac_count_ptrs[compptr->ac_tbl_no]); + entropy->saved.last_dc_val[ci] = MCU_data[blkn][0][0]; + } + + return TRUE; +} + + +/* + * Generate the best Huffman code table for the given counts, fill htbl. + * Note this is also used by jcphuff.c. + * + * The JPEG standard requires that no symbol be assigned a codeword of all + * one bits (so that padding bits added at the end of a compressed segment + * can't look like a valid code). Because of the canonical ordering of + * codewords, this just means that there must be an unused slot in the + * longest codeword length category. Section K.2 of the JPEG spec suggests + * reserving such a slot by pretending that symbol 256 is a valid symbol + * with count 1. In theory that's not optimal; giving it count zero but + * including it in the symbol set anyway should give a better Huffman code. + * But the theoretically better code actually seems to come out worse in + * practice, because it produces more all-ones bytes (which incur stuffed + * zero bytes in the final file). In any case the difference is tiny. + * + * The JPEG standard requires Huffman codes to be no more than 16 bits long. + * If some symbols have a very small but nonzero probability, the Huffman tree + * must be adjusted to meet the code length restriction. We currently use + * the adjustment method suggested in JPEG section K.2. This method is *not* + * optimal; it may not choose the best possible limited-length code. But + * typically only very-low-frequency symbols will be given less-than-optimal + * lengths, so the code is almost optimal. Experimental comparisons against + * an optimal limited-length-code algorithm indicate that the difference is + * microscopic --- usually less than a hundredth of a percent of total size. + * So the extra complexity of an optimal algorithm doesn't seem worthwhile. + */ + +GLOBAL(void) +jpeg_gen_optimal_table (j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[]) +{ +#define MAX_CLEN 32 /* assumed maximum initial code length */ + UINT8 bits[MAX_CLEN+1]; /* bits[k] = # of symbols with code length k */ + int codesize[257]; /* codesize[k] = code length of symbol k */ + int others[257]; /* next symbol in current branch of tree */ + int c1, c2; + int p, i, j; + long v; + + /* This algorithm is explained in section K.2 of the JPEG standard */ + + MEMZERO(bits, SIZEOF(bits)); + MEMZERO(codesize, SIZEOF(codesize)); + for (i = 0; i < 257; i++) + others[i] = -1; /* init links to empty */ + + freq[256] = 1; /* make sure 256 has a nonzero count */ + /* Including the pseudo-symbol 256 in the Huffman procedure guarantees + * that no real symbol is given code-value of all ones, because 256 + * will be placed last in the largest codeword category. + */ + + /* Huffman's basic algorithm to assign optimal code lengths to symbols */ + + for (;;) { + /* Find the smallest nonzero frequency, set c1 = its symbol */ + /* In case of ties, take the larger symbol number */ + c1 = -1; + v = 1000000000L; + for (i = 0; i <= 256; i++) { + if (freq[i] && freq[i] <= v) { + v = freq[i]; + c1 = i; + } + } + + /* Find the next smallest nonzero frequency, set c2 = its symbol */ + /* In case of ties, take the larger symbol number */ + c2 = -1; + v = 1000000000L; + for (i = 0; i <= 256; i++) { + if (freq[i] && freq[i] <= v && i != c1) { + v = freq[i]; + c2 = i; + } + } + + /* Done if we've merged everything into one frequency */ + if (c2 < 0) + break; + + /* Else merge the two counts/trees */ + freq[c1] += freq[c2]; + freq[c2] = 0; + + /* Increment the codesize of everything in c1's tree branch */ + codesize[c1]++; + while (others[c1] >= 0) { + c1 = others[c1]; + codesize[c1]++; + } + + others[c1] = c2; /* chain c2 onto c1's tree branch */ + + /* Increment the codesize of everything in c2's tree branch */ + codesize[c2]++; + while (others[c2] >= 0) { + c2 = others[c2]; + codesize[c2]++; + } + } + + /* Now count the number of symbols of each code length */ + for (i = 0; i <= 256; i++) { + if (codesize[i]) { + /* The JPEG standard seems to think that this can't happen, */ + /* but I'm paranoid... */ + if (codesize[i] > MAX_CLEN) + ERREXIT(cinfo, JERR_HUFF_CLEN_OVERFLOW); + + bits[codesize[i]]++; + } + } + + /* JPEG doesn't allow symbols with code lengths over 16 bits, so if the pure + * Huffman procedure assigned any such lengths, we must adjust the coding. + * Here is what the JPEG spec says about how this next bit works: + * Since symbols are paired for the longest Huffman code, the symbols are + * removed from this length category two at a time. The prefix for the pair + * (which is one bit shorter) is allocated to one of the pair; then, + * skipping the BITS entry for that prefix length, a code word from the next + * shortest nonzero BITS entry is converted into a prefix for two code words + * one bit longer. + */ + + for (i = MAX_CLEN; i > 16; i--) { + while (bits[i] > 0) { + j = i - 2; /* find length of new prefix to be used */ + while (bits[j] == 0) + j--; + + bits[i] -= 2; /* remove two symbols */ + bits[i-1]++; /* one goes in this length */ + bits[j+1] += 2; /* two new symbols in this length */ + bits[j]--; /* symbol of this length is now a prefix */ + } + } + + /* Remove the count for the pseudo-symbol 256 from the largest codelength */ + while (bits[i] == 0) /* find largest codelength still in use */ + i--; + bits[i]--; + + /* Return final symbol counts (only for lengths 0..16) */ + MEMCOPY(htbl->bits, bits, SIZEOF(htbl->bits)); + + /* Return a list of the symbols sorted by code length */ + /* It's not real clear to me why we don't need to consider the codelength + * changes made above, but the JPEG spec seems to think this works. + */ + p = 0; + for (i = 1; i <= MAX_CLEN; i++) { + for (j = 0; j <= 255; j++) { + if (codesize[j] == i) { + htbl->huffval[p] = (UINT8) j; + p++; + } + } + } + + /* Set sent_table FALSE so updated table will be written to JPEG file. */ + htbl->sent_table = FALSE; +} + + +/* + * Finish up a statistics-gathering pass and create the new Huffman tables. + */ + +METHODDEF(void) +finish_pass_gather (j_compress_ptr cinfo) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int ci, dctbl, actbl; + jpeg_component_info * compptr; + JHUFF_TBL **htblptr; + boolean did_dc[NUM_HUFF_TBLS]; + boolean did_ac[NUM_HUFF_TBLS]; + + /* It's important not to apply jpeg_gen_optimal_table more than once + * per table, because it clobbers the input frequency counts! + */ + MEMZERO(did_dc, SIZEOF(did_dc)); + MEMZERO(did_ac, SIZEOF(did_ac)); + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + dctbl = compptr->dc_tbl_no; + actbl = compptr->ac_tbl_no; + if (! did_dc[dctbl]) { + htblptr = & cinfo->dc_huff_tbl_ptrs[dctbl]; + if (*htblptr == NULL) + *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); + jpeg_gen_optimal_table(cinfo, *htblptr, entropy->dc_count_ptrs[dctbl]); + did_dc[dctbl] = TRUE; + } + if (! did_ac[actbl]) { + htblptr = & cinfo->ac_huff_tbl_ptrs[actbl]; + if (*htblptr == NULL) + *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); + jpeg_gen_optimal_table(cinfo, *htblptr, entropy->ac_count_ptrs[actbl]); + did_ac[actbl] = TRUE; + } + } +} + + +#endif /* ENTROPY_OPT_SUPPORTED */ + + +/* + * Module initialization routine for Huffman entropy encoding. + */ + +GLOBAL(void) +jinit_huff_encoder (j_compress_ptr cinfo) +{ + huff_entropy_ptr entropy; + int i; + + entropy = (huff_entropy_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(huff_entropy_encoder)); + cinfo->entropy = (struct jpeg_entropy_encoder *) entropy; + entropy->pub.start_pass = start_pass_huff; + + /* Mark tables unallocated */ + for (i = 0; i < NUM_HUFF_TBLS; i++) { + entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL; +#ifdef ENTROPY_OPT_SUPPORTED + entropy->dc_count_ptrs[i] = entropy->ac_count_ptrs[i] = NULL; +#endif + } +} diff --git a/gtkmm-osx/jpeg-6b/jchuff.h b/gtkmm-osx/jpeg-6b/jchuff.h new file mode 100644 index 0000000..a9599fc --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jchuff.h @@ -0,0 +1,47 @@ +/* + * jchuff.h + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains declarations for Huffman entropy encoding routines + * that are shared between the sequential encoder (jchuff.c) and the + * progressive encoder (jcphuff.c). No other modules need to see these. + */ + +/* The legal range of a DCT coefficient is + * -1024 .. +1023 for 8-bit data; + * -16384 .. +16383 for 12-bit data. + * Hence the magnitude should always fit in 10 or 14 bits respectively. + */ + +#if BITS_IN_JSAMPLE == 8 +#define MAX_COEF_BITS 10 +#else +#define MAX_COEF_BITS 14 +#endif + +/* Derived data constructed for each Huffman table */ + +typedef struct { + unsigned int ehufco[256]; /* code for each symbol */ + char ehufsi[256]; /* length of code for each symbol */ + /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */ +} c_derived_tbl; + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_make_c_derived_tbl jMkCDerived +#define jpeg_gen_optimal_table jGenOptTbl +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + +/* Expand a Huffman table definition into the derived format */ +EXTERN(void) jpeg_make_c_derived_tbl + JPP((j_compress_ptr cinfo, boolean isDC, int tblno, + c_derived_tbl ** pdtbl)); + +/* Generate an optimal table definition given the specified counts */ +EXTERN(void) jpeg_gen_optimal_table + JPP((j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[])); diff --git a/gtkmm-osx/jpeg-6b/jcinit.c b/gtkmm-osx/jpeg-6b/jcinit.c new file mode 100644 index 0000000..5efffe3 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jcinit.c @@ -0,0 +1,72 @@ +/* + * jcinit.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains initialization logic for the JPEG compressor. + * This routine is in charge of selecting the modules to be executed and + * making an initialization call to each one. + * + * Logically, this code belongs in jcmaster.c. It's split out because + * linking this routine implies linking the entire compression library. + * For a transcoding-only application, we want to be able to use jcmaster.c + * without linking in the whole library. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Master selection of compression modules. + * This is done once at the start of processing an image. We determine + * which modules will be used and give them appropriate initialization calls. + */ + +GLOBAL(void) +jinit_compress_master (j_compress_ptr cinfo) +{ + /* Initialize master control (includes parameter checking/processing) */ + jinit_c_master_control(cinfo, FALSE /* full compression */); + + /* Preprocessing */ + if (! cinfo->raw_data_in) { + jinit_color_converter(cinfo); + jinit_downsampler(cinfo); + jinit_c_prep_controller(cinfo, FALSE /* never need full buffer here */); + } + /* Forward DCT */ + jinit_forward_dct(cinfo); + /* Entropy encoding: either Huffman or arithmetic coding. */ + if (cinfo->arith_code) { + ERREXIT(cinfo, JERR_ARITH_NOTIMPL); + } else { + if (cinfo->progressive_mode) { +#ifdef C_PROGRESSIVE_SUPPORTED + jinit_phuff_encoder(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else + jinit_huff_encoder(cinfo); + } + + /* Need a full-image coefficient buffer in any multi-pass mode. */ + jinit_c_coef_controller(cinfo, + (boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding)); + jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */); + + jinit_marker_writer(cinfo); + + /* We can now tell the memory manager to allocate virtual arrays. */ + (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); + + /* Write the datastream header (SOI) immediately. + * Frame and scan headers are postponed till later. + * This lets application insert special markers after the SOI. + */ + (*cinfo->marker->write_file_header) (cinfo); +} diff --git a/gtkmm-osx/jpeg-6b/jcmainct.c b/gtkmm-osx/jpeg-6b/jcmainct.c new file mode 100644 index 0000000..e0279a7 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jcmainct.c @@ -0,0 +1,293 @@ +/* + * jcmainct.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the main buffer controller for compression. + * The main buffer lies between the pre-processor and the JPEG + * compressor proper; it holds downsampled data in the JPEG colorspace. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Note: currently, there is no operating mode in which a full-image buffer + * is needed at this step. If there were, that mode could not be used with + * "raw data" input, since this module is bypassed in that case. However, + * we've left the code here for possible use in special applications. + */ +#undef FULL_MAIN_BUFFER_SUPPORTED + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_c_main_controller pub; /* public fields */ + + JDIMENSION cur_iMCU_row; /* number of current iMCU row */ + JDIMENSION rowgroup_ctr; /* counts row groups received in iMCU row */ + boolean suspended; /* remember if we suspended output */ + J_BUF_MODE pass_mode; /* current operating mode */ + + /* If using just a strip buffer, this points to the entire set of buffers + * (we allocate one for each component). In the full-image case, this + * points to the currently accessible strips of the virtual arrays. + */ + JSAMPARRAY buffer[MAX_COMPONENTS]; + +#ifdef FULL_MAIN_BUFFER_SUPPORTED + /* If using full-image storage, this array holds pointers to virtual-array + * control blocks for each component. Unused if not full-image storage. + */ + jvirt_sarray_ptr whole_image[MAX_COMPONENTS]; +#endif +} my_main_controller; + +typedef my_main_controller * my_main_ptr; + + +/* Forward declarations */ +METHODDEF(void) process_data_simple_main + JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf, + JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail)); +#ifdef FULL_MAIN_BUFFER_SUPPORTED +METHODDEF(void) process_data_buffer_main + JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf, + JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail)); +#endif + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_main (j_compress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + + /* Do nothing in raw-data mode. */ + if (cinfo->raw_data_in) + return; + + main->cur_iMCU_row = 0; /* initialize counters */ + main->rowgroup_ctr = 0; + main->suspended = FALSE; + main->pass_mode = pass_mode; /* save mode for use by process_data */ + + switch (pass_mode) { + case JBUF_PASS_THRU: +#ifdef FULL_MAIN_BUFFER_SUPPORTED + if (main->whole_image[0] != NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); +#endif + main->pub.process_data = process_data_simple_main; + break; +#ifdef FULL_MAIN_BUFFER_SUPPORTED + case JBUF_SAVE_SOURCE: + case JBUF_CRANK_DEST: + case JBUF_SAVE_AND_PASS: + if (main->whole_image[0] == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + main->pub.process_data = process_data_buffer_main; + break; +#endif + default: + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + break; + } +} + + +/* + * Process some data. + * This routine handles the simple pass-through mode, + * where we have only a strip buffer. + */ + +METHODDEF(void) +process_data_simple_main (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail) +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + + while (main->cur_iMCU_row < cinfo->total_iMCU_rows) { + /* Read input data if we haven't filled the main buffer yet */ + if (main->rowgroup_ctr < DCTSIZE) + (*cinfo->prep->pre_process_data) (cinfo, + input_buf, in_row_ctr, in_rows_avail, + main->buffer, &main->rowgroup_ctr, + (JDIMENSION) DCTSIZE); + + /* If we don't have a full iMCU row buffered, return to application for + * more data. Note that preprocessor will always pad to fill the iMCU row + * at the bottom of the image. + */ + if (main->rowgroup_ctr != DCTSIZE) + return; + + /* Send the completed row to the compressor */ + if (! (*cinfo->coef->compress_data) (cinfo, main->buffer)) { + /* If compressor did not consume the whole row, then we must need to + * suspend processing and return to the application. In this situation + * we pretend we didn't yet consume the last input row; otherwise, if + * it happened to be the last row of the image, the application would + * think we were done. + */ + if (! main->suspended) { + (*in_row_ctr)--; + main->suspended = TRUE; + } + return; + } + /* We did finish the row. Undo our little suspension hack if a previous + * call suspended; then mark the main buffer empty. + */ + if (main->suspended) { + (*in_row_ctr)++; + main->suspended = FALSE; + } + main->rowgroup_ctr = 0; + main->cur_iMCU_row++; + } +} + + +#ifdef FULL_MAIN_BUFFER_SUPPORTED + +/* + * Process some data. + * This routine handles all of the modes that use a full-size buffer. + */ + +METHODDEF(void) +process_data_buffer_main (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail) +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + int ci; + jpeg_component_info *compptr; + boolean writing = (main->pass_mode != JBUF_CRANK_DEST); + + while (main->cur_iMCU_row < cinfo->total_iMCU_rows) { + /* Realign the virtual buffers if at the start of an iMCU row. */ + if (main->rowgroup_ctr == 0) { + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + main->buffer[ci] = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, main->whole_image[ci], + main->cur_iMCU_row * (compptr->v_samp_factor * DCTSIZE), + (JDIMENSION) (compptr->v_samp_factor * DCTSIZE), writing); + } + /* In a read pass, pretend we just read some source data. */ + if (! writing) { + *in_row_ctr += cinfo->max_v_samp_factor * DCTSIZE; + main->rowgroup_ctr = DCTSIZE; + } + } + + /* If a write pass, read input data until the current iMCU row is full. */ + /* Note: preprocessor will pad if necessary to fill the last iMCU row. */ + if (writing) { + (*cinfo->prep->pre_process_data) (cinfo, + input_buf, in_row_ctr, in_rows_avail, + main->buffer, &main->rowgroup_ctr, + (JDIMENSION) DCTSIZE); + /* Return to application if we need more data to fill the iMCU row. */ + if (main->rowgroup_ctr < DCTSIZE) + return; + } + + /* Emit data, unless this is a sink-only pass. */ + if (main->pass_mode != JBUF_SAVE_SOURCE) { + if (! (*cinfo->coef->compress_data) (cinfo, main->buffer)) { + /* If compressor did not consume the whole row, then we must need to + * suspend processing and return to the application. In this situation + * we pretend we didn't yet consume the last input row; otherwise, if + * it happened to be the last row of the image, the application would + * think we were done. + */ + if (! main->suspended) { + (*in_row_ctr)--; + main->suspended = TRUE; + } + return; + } + /* We did finish the row. Undo our little suspension hack if a previous + * call suspended; then mark the main buffer empty. + */ + if (main->suspended) { + (*in_row_ctr)++; + main->suspended = FALSE; + } + } + + /* If get here, we are done with this iMCU row. Mark buffer empty. */ + main->rowgroup_ctr = 0; + main->cur_iMCU_row++; + } +} + +#endif /* FULL_MAIN_BUFFER_SUPPORTED */ + + +/* + * Initialize main buffer controller. + */ + +GLOBAL(void) +jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer) +{ + my_main_ptr main; + int ci; + jpeg_component_info *compptr; + + main = (my_main_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_main_controller)); + cinfo->main = (struct jpeg_c_main_controller *) main; + main->pub.start_pass = start_pass_main; + + /* We don't need to create a buffer in raw-data mode. */ + if (cinfo->raw_data_in) + return; + + /* Create the buffer. It holds downsampled data, so each component + * may be of a different size. + */ + if (need_full_buffer) { +#ifdef FULL_MAIN_BUFFER_SUPPORTED + /* Allocate a full-image virtual array for each component */ + /* Note we pad the bottom to a multiple of the iMCU height */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + main->whole_image[ci] = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + compptr->width_in_blocks * DCTSIZE, + (JDIMENSION) jround_up((long) compptr->height_in_blocks, + (long) compptr->v_samp_factor) * DCTSIZE, + (JDIMENSION) (compptr->v_samp_factor * DCTSIZE)); + } +#else + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); +#endif + } else { +#ifdef FULL_MAIN_BUFFER_SUPPORTED + main->whole_image[0] = NULL; /* flag for no virtual arrays */ +#endif + /* Allocate a strip buffer for each component */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + main->buffer[ci] = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + compptr->width_in_blocks * DCTSIZE, + (JDIMENSION) (compptr->v_samp_factor * DCTSIZE)); + } + } +} diff --git a/gtkmm-osx/jpeg-6b/jcmarker.c b/gtkmm-osx/jpeg-6b/jcmarker.c new file mode 100644 index 0000000..3d1e6c6 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jcmarker.c @@ -0,0 +1,664 @@ +/* + * jcmarker.c + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to write JPEG datastream markers. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +typedef enum { /* JPEG marker codes */ + M_SOF0 = 0xc0, + M_SOF1 = 0xc1, + M_SOF2 = 0xc2, + M_SOF3 = 0xc3, + + M_SOF5 = 0xc5, + M_SOF6 = 0xc6, + M_SOF7 = 0xc7, + + M_JPG = 0xc8, + M_SOF9 = 0xc9, + M_SOF10 = 0xca, + M_SOF11 = 0xcb, + + M_SOF13 = 0xcd, + M_SOF14 = 0xce, + M_SOF15 = 0xcf, + + M_DHT = 0xc4, + + M_DAC = 0xcc, + + M_RST0 = 0xd0, + M_RST1 = 0xd1, + M_RST2 = 0xd2, + M_RST3 = 0xd3, + M_RST4 = 0xd4, + M_RST5 = 0xd5, + M_RST6 = 0xd6, + M_RST7 = 0xd7, + + M_SOI = 0xd8, + M_EOI = 0xd9, + M_SOS = 0xda, + M_DQT = 0xdb, + M_DNL = 0xdc, + M_DRI = 0xdd, + M_DHP = 0xde, + M_EXP = 0xdf, + + M_APP0 = 0xe0, + M_APP1 = 0xe1, + M_APP2 = 0xe2, + M_APP3 = 0xe3, + M_APP4 = 0xe4, + M_APP5 = 0xe5, + M_APP6 = 0xe6, + M_APP7 = 0xe7, + M_APP8 = 0xe8, + M_APP9 = 0xe9, + M_APP10 = 0xea, + M_APP11 = 0xeb, + M_APP12 = 0xec, + M_APP13 = 0xed, + M_APP14 = 0xee, + M_APP15 = 0xef, + + M_JPG0 = 0xf0, + M_JPG13 = 0xfd, + M_COM = 0xfe, + + M_TEM = 0x01, + + M_ERROR = 0x100 +} JPEG_MARKER; + + +/* Private state */ + +typedef struct { + struct jpeg_marker_writer pub; /* public fields */ + + unsigned int last_restart_interval; /* last DRI value emitted; 0 after SOI */ +} my_marker_writer; + +typedef my_marker_writer * my_marker_ptr; + + +/* + * Basic output routines. + * + * Note that we do not support suspension while writing a marker. + * Therefore, an application using suspension must ensure that there is + * enough buffer space for the initial markers (typ. 600-700 bytes) before + * calling jpeg_start_compress, and enough space to write the trailing EOI + * (a few bytes) before calling jpeg_finish_compress. Multipass compression + * modes are not supported at all with suspension, so those two are the only + * points where markers will be written. + */ + +LOCAL(void) +emit_byte (j_compress_ptr cinfo, int val) +/* Emit a byte */ +{ + struct jpeg_destination_mgr * dest = cinfo->dest; + + *(dest->next_output_byte)++ = (JOCTET) val; + if (--dest->free_in_buffer == 0) { + if (! (*dest->empty_output_buffer) (cinfo)) + ERREXIT(cinfo, JERR_CANT_SUSPEND); + } +} + + +LOCAL(void) +emit_marker (j_compress_ptr cinfo, JPEG_MARKER mark) +/* Emit a marker code */ +{ + emit_byte(cinfo, 0xFF); + emit_byte(cinfo, (int) mark); +} + + +LOCAL(void) +emit_2bytes (j_compress_ptr cinfo, int value) +/* Emit a 2-byte integer; these are always MSB first in JPEG files */ +{ + emit_byte(cinfo, (value >> 8) & 0xFF); + emit_byte(cinfo, value & 0xFF); +} + + +/* + * Routines to write specific marker types. + */ + +LOCAL(int) +emit_dqt (j_compress_ptr cinfo, int index) +/* Emit a DQT marker */ +/* Returns the precision used (0 = 8bits, 1 = 16bits) for baseline checking */ +{ + JQUANT_TBL * qtbl = cinfo->quant_tbl_ptrs[index]; + int prec; + int i; + + if (qtbl == NULL) + ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, index); + + prec = 0; + for (i = 0; i < DCTSIZE2; i++) { + if (qtbl->quantval[i] > 255) + prec = 1; + } + + if (! qtbl->sent_table) { + emit_marker(cinfo, M_DQT); + + emit_2bytes(cinfo, prec ? DCTSIZE2*2 + 1 + 2 : DCTSIZE2 + 1 + 2); + + emit_byte(cinfo, index + (prec<<4)); + + for (i = 0; i < DCTSIZE2; i++) { + /* The table entries must be emitted in zigzag order. */ + unsigned int qval = qtbl->quantval[jpeg_natural_order[i]]; + if (prec) + emit_byte(cinfo, (int) (qval >> 8)); + emit_byte(cinfo, (int) (qval & 0xFF)); + } + + qtbl->sent_table = TRUE; + } + + return prec; +} + + +LOCAL(void) +emit_dht (j_compress_ptr cinfo, int index, boolean is_ac) +/* Emit a DHT marker */ +{ + JHUFF_TBL * htbl; + int length, i; + + if (is_ac) { + htbl = cinfo->ac_huff_tbl_ptrs[index]; + index += 0x10; /* output index has AC bit set */ + } else { + htbl = cinfo->dc_huff_tbl_ptrs[index]; + } + + if (htbl == NULL) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, index); + + if (! htbl->sent_table) { + emit_marker(cinfo, M_DHT); + + length = 0; + for (i = 1; i <= 16; i++) + length += htbl->bits[i]; + + emit_2bytes(cinfo, length + 2 + 1 + 16); + emit_byte(cinfo, index); + + for (i = 1; i <= 16; i++) + emit_byte(cinfo, htbl->bits[i]); + + for (i = 0; i < length; i++) + emit_byte(cinfo, htbl->huffval[i]); + + htbl->sent_table = TRUE; + } +} + + +LOCAL(void) +emit_dac (j_compress_ptr cinfo) +/* Emit a DAC marker */ +/* Since the useful info is so small, we want to emit all the tables in */ +/* one DAC marker. Therefore this routine does its own scan of the table. */ +{ +#ifdef C_ARITH_CODING_SUPPORTED + char dc_in_use[NUM_ARITH_TBLS]; + char ac_in_use[NUM_ARITH_TBLS]; + int length, i; + jpeg_component_info *compptr; + + for (i = 0; i < NUM_ARITH_TBLS; i++) + dc_in_use[i] = ac_in_use[i] = 0; + + for (i = 0; i < cinfo->comps_in_scan; i++) { + compptr = cinfo->cur_comp_info[i]; + dc_in_use[compptr->dc_tbl_no] = 1; + ac_in_use[compptr->ac_tbl_no] = 1; + } + + length = 0; + for (i = 0; i < NUM_ARITH_TBLS; i++) + length += dc_in_use[i] + ac_in_use[i]; + + emit_marker(cinfo, M_DAC); + + emit_2bytes(cinfo, length*2 + 2); + + for (i = 0; i < NUM_ARITH_TBLS; i++) { + if (dc_in_use[i]) { + emit_byte(cinfo, i); + emit_byte(cinfo, cinfo->arith_dc_L[i] + (cinfo->arith_dc_U[i]<<4)); + } + if (ac_in_use[i]) { + emit_byte(cinfo, i + 0x10); + emit_byte(cinfo, cinfo->arith_ac_K[i]); + } + } +#endif /* C_ARITH_CODING_SUPPORTED */ +} + + +LOCAL(void) +emit_dri (j_compress_ptr cinfo) +/* Emit a DRI marker */ +{ + emit_marker(cinfo, M_DRI); + + emit_2bytes(cinfo, 4); /* fixed length */ + + emit_2bytes(cinfo, (int) cinfo->restart_interval); +} + + +LOCAL(void) +emit_sof (j_compress_ptr cinfo, JPEG_MARKER code) +/* Emit a SOF marker */ +{ + int ci; + jpeg_component_info *compptr; + + emit_marker(cinfo, code); + + emit_2bytes(cinfo, 3 * cinfo->num_components + 2 + 5 + 1); /* length */ + + /* Make sure image isn't bigger than SOF field can handle */ + if ((long) cinfo->image_height > 65535L || + (long) cinfo->image_width > 65535L) + ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) 65535); + + emit_byte(cinfo, cinfo->data_precision); + emit_2bytes(cinfo, (int) cinfo->image_height); + emit_2bytes(cinfo, (int) cinfo->image_width); + + emit_byte(cinfo, cinfo->num_components); + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + emit_byte(cinfo, compptr->component_id); + emit_byte(cinfo, (compptr->h_samp_factor << 4) + compptr->v_samp_factor); + emit_byte(cinfo, compptr->quant_tbl_no); + } +} + + +LOCAL(void) +emit_sos (j_compress_ptr cinfo) +/* Emit a SOS marker */ +{ + int i, td, ta; + jpeg_component_info *compptr; + + emit_marker(cinfo, M_SOS); + + emit_2bytes(cinfo, 2 * cinfo->comps_in_scan + 2 + 1 + 3); /* length */ + + emit_byte(cinfo, cinfo->comps_in_scan); + + for (i = 0; i < cinfo->comps_in_scan; i++) { + compptr = cinfo->cur_comp_info[i]; + emit_byte(cinfo, compptr->component_id); + td = compptr->dc_tbl_no; + ta = compptr->ac_tbl_no; + if (cinfo->progressive_mode) { + /* Progressive mode: only DC or only AC tables are used in one scan; + * furthermore, Huffman coding of DC refinement uses no table at all. + * We emit 0 for unused field(s); this is recommended by the P&M text + * but does not seem to be specified in the standard. + */ + if (cinfo->Ss == 0) { + ta = 0; /* DC scan */ + if (cinfo->Ah != 0 && !cinfo->arith_code) + td = 0; /* no DC table either */ + } else { + td = 0; /* AC scan */ + } + } + emit_byte(cinfo, (td << 4) + ta); + } + + emit_byte(cinfo, cinfo->Ss); + emit_byte(cinfo, cinfo->Se); + emit_byte(cinfo, (cinfo->Ah << 4) + cinfo->Al); +} + + +LOCAL(void) +emit_jfif_app0 (j_compress_ptr cinfo) +/* Emit a JFIF-compliant APP0 marker */ +{ + /* + * Length of APP0 block (2 bytes) + * Block ID (4 bytes - ASCII "JFIF") + * Zero byte (1 byte to terminate the ID string) + * Version Major, Minor (2 bytes - major first) + * Units (1 byte - 0x00 = none, 0x01 = inch, 0x02 = cm) + * Xdpu (2 bytes - dots per unit horizontal) + * Ydpu (2 bytes - dots per unit vertical) + * Thumbnail X size (1 byte) + * Thumbnail Y size (1 byte) + */ + + emit_marker(cinfo, M_APP0); + + emit_2bytes(cinfo, 2 + 4 + 1 + 2 + 1 + 2 + 2 + 1 + 1); /* length */ + + emit_byte(cinfo, 0x4A); /* Identifier: ASCII "JFIF" */ + emit_byte(cinfo, 0x46); + emit_byte(cinfo, 0x49); + emit_byte(cinfo, 0x46); + emit_byte(cinfo, 0); + emit_byte(cinfo, cinfo->JFIF_major_version); /* Version fields */ + emit_byte(cinfo, cinfo->JFIF_minor_version); + emit_byte(cinfo, cinfo->density_unit); /* Pixel size information */ + emit_2bytes(cinfo, (int) cinfo->X_density); + emit_2bytes(cinfo, (int) cinfo->Y_density); + emit_byte(cinfo, 0); /* No thumbnail image */ + emit_byte(cinfo, 0); +} + + +LOCAL(void) +emit_adobe_app14 (j_compress_ptr cinfo) +/* Emit an Adobe APP14 marker */ +{ + /* + * Length of APP14 block (2 bytes) + * Block ID (5 bytes - ASCII "Adobe") + * Version Number (2 bytes - currently 100) + * Flags0 (2 bytes - currently 0) + * Flags1 (2 bytes - currently 0) + * Color transform (1 byte) + * + * Although Adobe TN 5116 mentions Version = 101, all the Adobe files + * now in circulation seem to use Version = 100, so that's what we write. + * + * We write the color transform byte as 1 if the JPEG color space is + * YCbCr, 2 if it's YCCK, 0 otherwise. Adobe's definition has to do with + * whether the encoder performed a transformation, which is pretty useless. + */ + + emit_marker(cinfo, M_APP14); + + emit_2bytes(cinfo, 2 + 5 + 2 + 2 + 2 + 1); /* length */ + + emit_byte(cinfo, 0x41); /* Identifier: ASCII "Adobe" */ + emit_byte(cinfo, 0x64); + emit_byte(cinfo, 0x6F); + emit_byte(cinfo, 0x62); + emit_byte(cinfo, 0x65); + emit_2bytes(cinfo, 100); /* Version */ + emit_2bytes(cinfo, 0); /* Flags0 */ + emit_2bytes(cinfo, 0); /* Flags1 */ + switch (cinfo->jpeg_color_space) { + case JCS_YCbCr: + emit_byte(cinfo, 1); /* Color transform = 1 */ + break; + case JCS_YCCK: + emit_byte(cinfo, 2); /* Color transform = 2 */ + break; + default: + emit_byte(cinfo, 0); /* Color transform = 0 */ + break; + } +} + + +/* + * These routines allow writing an arbitrary marker with parameters. + * The only intended use is to emit COM or APPn markers after calling + * write_file_header and before calling write_frame_header. + * Other uses are not guaranteed to produce desirable results. + * Counting the parameter bytes properly is the caller's responsibility. + */ + +METHODDEF(void) +write_marker_header (j_compress_ptr cinfo, int marker, unsigned int datalen) +/* Emit an arbitrary marker header */ +{ + if (datalen > (unsigned int) 65533) /* safety check */ + ERREXIT(cinfo, JERR_BAD_LENGTH); + + emit_marker(cinfo, (JPEG_MARKER) marker); + + emit_2bytes(cinfo, (int) (datalen + 2)); /* total length */ +} + +METHODDEF(void) +write_marker_byte (j_compress_ptr cinfo, int val) +/* Emit one byte of marker parameters following write_marker_header */ +{ + emit_byte(cinfo, val); +} + + +/* + * Write datastream header. + * This consists of an SOI and optional APPn markers. + * We recommend use of the JFIF marker, but not the Adobe marker, + * when using YCbCr or grayscale data. The JFIF marker should NOT + * be used for any other JPEG colorspace. The Adobe marker is helpful + * to distinguish RGB, CMYK, and YCCK colorspaces. + * Note that an application can write additional header markers after + * jpeg_start_compress returns. + */ + +METHODDEF(void) +write_file_header (j_compress_ptr cinfo) +{ + my_marker_ptr marker = (my_marker_ptr) cinfo->marker; + + emit_marker(cinfo, M_SOI); /* first the SOI */ + + /* SOI is defined to reset restart interval to 0 */ + marker->last_restart_interval = 0; + + if (cinfo->write_JFIF_header) /* next an optional JFIF APP0 */ + emit_jfif_app0(cinfo); + if (cinfo->write_Adobe_marker) /* next an optional Adobe APP14 */ + emit_adobe_app14(cinfo); +} + + +/* + * Write frame header. + * This consists of DQT and SOFn markers. + * Note that we do not emit the SOF until we have emitted the DQT(s). + * This avoids compatibility problems with incorrect implementations that + * try to error-check the quant table numbers as soon as they see the SOF. + */ + +METHODDEF(void) +write_frame_header (j_compress_ptr cinfo) +{ + int ci, prec; + boolean is_baseline; + jpeg_component_info *compptr; + + /* Emit DQT for each quantization table. + * Note that emit_dqt() suppresses any duplicate tables. + */ + prec = 0; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + prec += emit_dqt(cinfo, compptr->quant_tbl_no); + } + /* now prec is nonzero iff there are any 16-bit quant tables. */ + + /* Check for a non-baseline specification. + * Note we assume that Huffman table numbers won't be changed later. + */ + if (cinfo->arith_code || cinfo->progressive_mode || + cinfo->data_precision != 8) { + is_baseline = FALSE; + } else { + is_baseline = TRUE; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (compptr->dc_tbl_no > 1 || compptr->ac_tbl_no > 1) + is_baseline = FALSE; + } + if (prec && is_baseline) { + is_baseline = FALSE; + /* If it's baseline except for quantizer size, warn the user */ + TRACEMS(cinfo, 0, JTRC_16BIT_TABLES); + } + } + + /* Emit the proper SOF marker */ + if (cinfo->arith_code) { + emit_sof(cinfo, M_SOF9); /* SOF code for arithmetic coding */ + } else { + if (cinfo->progressive_mode) + emit_sof(cinfo, M_SOF2); /* SOF code for progressive Huffman */ + else if (is_baseline) + emit_sof(cinfo, M_SOF0); /* SOF code for baseline implementation */ + else + emit_sof(cinfo, M_SOF1); /* SOF code for non-baseline Huffman file */ + } +} + + +/* + * Write scan header. + * This consists of DHT or DAC markers, optional DRI, and SOS. + * Compressed data will be written following the SOS. + */ + +METHODDEF(void) +write_scan_header (j_compress_ptr cinfo) +{ + my_marker_ptr marker = (my_marker_ptr) cinfo->marker; + int i; + jpeg_component_info *compptr; + + if (cinfo->arith_code) { + /* Emit arith conditioning info. We may have some duplication + * if the file has multiple scans, but it's so small it's hardly + * worth worrying about. + */ + emit_dac(cinfo); + } else { + /* Emit Huffman tables. + * Note that emit_dht() suppresses any duplicate tables. + */ + for (i = 0; i < cinfo->comps_in_scan; i++) { + compptr = cinfo->cur_comp_info[i]; + if (cinfo->progressive_mode) { + /* Progressive mode: only DC or only AC tables are used in one scan */ + if (cinfo->Ss == 0) { + if (cinfo->Ah == 0) /* DC needs no table for refinement scan */ + emit_dht(cinfo, compptr->dc_tbl_no, FALSE); + } else { + emit_dht(cinfo, compptr->ac_tbl_no, TRUE); + } + } else { + /* Sequential mode: need both DC and AC tables */ + emit_dht(cinfo, compptr->dc_tbl_no, FALSE); + emit_dht(cinfo, compptr->ac_tbl_no, TRUE); + } + } + } + + /* Emit DRI if required --- note that DRI value could change for each scan. + * We avoid wasting space with unnecessary DRIs, however. + */ + if (cinfo->restart_interval != marker->last_restart_interval) { + emit_dri(cinfo); + marker->last_restart_interval = cinfo->restart_interval; + } + + emit_sos(cinfo); +} + + +/* + * Write datastream trailer. + */ + +METHODDEF(void) +write_file_trailer (j_compress_ptr cinfo) +{ + emit_marker(cinfo, M_EOI); +} + + +/* + * Write an abbreviated table-specification datastream. + * This consists of SOI, DQT and DHT tables, and EOI. + * Any table that is defined and not marked sent_table = TRUE will be + * emitted. Note that all tables will be marked sent_table = TRUE at exit. + */ + +METHODDEF(void) +write_tables_only (j_compress_ptr cinfo) +{ + int i; + + emit_marker(cinfo, M_SOI); + + for (i = 0; i < NUM_QUANT_TBLS; i++) { + if (cinfo->quant_tbl_ptrs[i] != NULL) + (void) emit_dqt(cinfo, i); + } + + if (! cinfo->arith_code) { + for (i = 0; i < NUM_HUFF_TBLS; i++) { + if (cinfo->dc_huff_tbl_ptrs[i] != NULL) + emit_dht(cinfo, i, FALSE); + if (cinfo->ac_huff_tbl_ptrs[i] != NULL) + emit_dht(cinfo, i, TRUE); + } + } + + emit_marker(cinfo, M_EOI); +} + + +/* + * Initialize the marker writer module. + */ + +GLOBAL(void) +jinit_marker_writer (j_compress_ptr cinfo) +{ + my_marker_ptr marker; + + /* Create the subobject */ + marker = (my_marker_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_marker_writer)); + cinfo->marker = (struct jpeg_marker_writer *) marker; + /* Initialize method pointers */ + marker->pub.write_file_header = write_file_header; + marker->pub.write_frame_header = write_frame_header; + marker->pub.write_scan_header = write_scan_header; + marker->pub.write_file_trailer = write_file_trailer; + marker->pub.write_tables_only = write_tables_only; + marker->pub.write_marker_header = write_marker_header; + marker->pub.write_marker_byte = write_marker_byte; + /* Initialize private state */ + marker->last_restart_interval = 0; +} diff --git a/gtkmm-osx/jpeg-6b/jcmaster.c b/gtkmm-osx/jpeg-6b/jcmaster.c new file mode 100644 index 0000000..aab4020 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jcmaster.c @@ -0,0 +1,590 @@ +/* + * jcmaster.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains master control logic for the JPEG compressor. + * These routines are concerned with parameter validation, initial setup, + * and inter-pass control (determining the number of passes and the work + * to be done in each pass). + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private state */ + +typedef enum { + main_pass, /* input data, also do first output step */ + huff_opt_pass, /* Huffman code optimization pass */ + output_pass /* data output pass */ +} c_pass_type; + +typedef struct { + struct jpeg_comp_master pub; /* public fields */ + + c_pass_type pass_type; /* the type of the current pass */ + + int pass_number; /* # of passes completed */ + int total_passes; /* total # of passes needed */ + + int scan_number; /* current index in scan_info[] */ +} my_comp_master; + +typedef my_comp_master * my_master_ptr; + + +/* + * Support routines that do various essential calculations. + */ + +LOCAL(void) +initial_setup (j_compress_ptr cinfo) +/* Do computations that are needed before master selection phase */ +{ + int ci; + jpeg_component_info *compptr; + long samplesperrow; + JDIMENSION jd_samplesperrow; + + /* Sanity check on image dimensions */ + if (cinfo->image_height <= 0 || cinfo->image_width <= 0 + || cinfo->num_components <= 0 || cinfo->input_components <= 0) + ERREXIT(cinfo, JERR_EMPTY_IMAGE); + + /* Make sure image isn't bigger than I can handle */ + if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION || + (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION) + ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION); + + /* Width of an input scanline must be representable as JDIMENSION. */ + samplesperrow = (long) cinfo->image_width * (long) cinfo->input_components; + jd_samplesperrow = (JDIMENSION) samplesperrow; + if ((long) jd_samplesperrow != samplesperrow) + ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); + + /* For now, precision must match compiled-in value... */ + if (cinfo->data_precision != BITS_IN_JSAMPLE) + ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision); + + /* Check that number of components won't exceed internal array sizes */ + if (cinfo->num_components > MAX_COMPONENTS) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, + MAX_COMPONENTS); + + /* Compute maximum sampling factors; check factor validity */ + cinfo->max_h_samp_factor = 1; + cinfo->max_v_samp_factor = 1; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR || + compptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR) + ERREXIT(cinfo, JERR_BAD_SAMPLING); + cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor, + compptr->h_samp_factor); + cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor, + compptr->v_samp_factor); + } + + /* Compute dimensions of components */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Fill in the correct component_index value; don't rely on application */ + compptr->component_index = ci; + /* For compression, we never do DCT scaling. */ + compptr->DCT_scaled_size = DCTSIZE; + /* Size in DCT blocks */ + compptr->width_in_blocks = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, + (long) (cinfo->max_h_samp_factor * DCTSIZE)); + compptr->height_in_blocks = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, + (long) (cinfo->max_v_samp_factor * DCTSIZE)); + /* Size in samples */ + compptr->downsampled_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, + (long) cinfo->max_h_samp_factor); + compptr->downsampled_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, + (long) cinfo->max_v_samp_factor); + /* Mark component needed (this flag isn't actually used for compression) */ + compptr->component_needed = TRUE; + } + + /* Compute number of fully interleaved MCU rows (number of times that + * main controller will call coefficient controller). + */ + cinfo->total_iMCU_rows = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, + (long) (cinfo->max_v_samp_factor*DCTSIZE)); +} + + +#ifdef C_MULTISCAN_FILES_SUPPORTED + +LOCAL(void) +validate_script (j_compress_ptr cinfo) +/* Verify that the scan script in cinfo->scan_info[] is valid; also + * determine whether it uses progressive JPEG, and set cinfo->progressive_mode. + */ +{ + const jpeg_scan_info * scanptr; + int scanno, ncomps, ci, coefi, thisi; + int Ss, Se, Ah, Al; + boolean component_sent[MAX_COMPONENTS]; +#ifdef C_PROGRESSIVE_SUPPORTED + int * last_bitpos_ptr; + int last_bitpos[MAX_COMPONENTS][DCTSIZE2]; + /* -1 until that coefficient has been seen; then last Al for it */ +#endif + + if (cinfo->num_scans <= 0) + ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, 0); + + /* For sequential JPEG, all scans must have Ss=0, Se=DCTSIZE2-1; + * for progressive JPEG, no scan can have this. + */ + scanptr = cinfo->scan_info; + if (scanptr->Ss != 0 || scanptr->Se != DCTSIZE2-1) { +#ifdef C_PROGRESSIVE_SUPPORTED + cinfo->progressive_mode = TRUE; + last_bitpos_ptr = & last_bitpos[0][0]; + for (ci = 0; ci < cinfo->num_components; ci++) + for (coefi = 0; coefi < DCTSIZE2; coefi++) + *last_bitpos_ptr++ = -1; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + cinfo->progressive_mode = FALSE; + for (ci = 0; ci < cinfo->num_components; ci++) + component_sent[ci] = FALSE; + } + + for (scanno = 1; scanno <= cinfo->num_scans; scanptr++, scanno++) { + /* Validate component indexes */ + ncomps = scanptr->comps_in_scan; + if (ncomps <= 0 || ncomps > MAX_COMPS_IN_SCAN) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, ncomps, MAX_COMPS_IN_SCAN); + for (ci = 0; ci < ncomps; ci++) { + thisi = scanptr->component_index[ci]; + if (thisi < 0 || thisi >= cinfo->num_components) + ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno); + /* Components must appear in SOF order within each scan */ + if (ci > 0 && thisi <= scanptr->component_index[ci-1]) + ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno); + } + /* Validate progression parameters */ + Ss = scanptr->Ss; + Se = scanptr->Se; + Ah = scanptr->Ah; + Al = scanptr->Al; + if (cinfo->progressive_mode) { +#ifdef C_PROGRESSIVE_SUPPORTED + /* The JPEG spec simply gives the ranges 0..13 for Ah and Al, but that + * seems wrong: the upper bound ought to depend on data precision. + * Perhaps they really meant 0..N+1 for N-bit precision. + * Here we allow 0..10 for 8-bit data; Al larger than 10 results in + * out-of-range reconstructed DC values during the first DC scan, + * which might cause problems for some decoders. + */ +#if BITS_IN_JSAMPLE == 8 +#define MAX_AH_AL 10 +#else +#define MAX_AH_AL 13 +#endif + if (Ss < 0 || Ss >= DCTSIZE2 || Se < Ss || Se >= DCTSIZE2 || + Ah < 0 || Ah > MAX_AH_AL || Al < 0 || Al > MAX_AH_AL) + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + if (Ss == 0) { + if (Se != 0) /* DC and AC together not OK */ + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + } else { + if (ncomps != 1) /* AC scans must be for only one component */ + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + } + for (ci = 0; ci < ncomps; ci++) { + last_bitpos_ptr = & last_bitpos[scanptr->component_index[ci]][0]; + if (Ss != 0 && last_bitpos_ptr[0] < 0) /* AC without prior DC scan */ + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + for (coefi = Ss; coefi <= Se; coefi++) { + if (last_bitpos_ptr[coefi] < 0) { + /* first scan of this coefficient */ + if (Ah != 0) + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + } else { + /* not first scan */ + if (Ah != last_bitpos_ptr[coefi] || Al != Ah-1) + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + } + last_bitpos_ptr[coefi] = Al; + } + } +#endif + } else { + /* For sequential JPEG, all progression parameters must be these: */ + if (Ss != 0 || Se != DCTSIZE2-1 || Ah != 0 || Al != 0) + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + /* Make sure components are not sent twice */ + for (ci = 0; ci < ncomps; ci++) { + thisi = scanptr->component_index[ci]; + if (component_sent[thisi]) + ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno); + component_sent[thisi] = TRUE; + } + } + } + + /* Now verify that everything got sent. */ + if (cinfo->progressive_mode) { +#ifdef C_PROGRESSIVE_SUPPORTED + /* For progressive mode, we only check that at least some DC data + * got sent for each component; the spec does not require that all bits + * of all coefficients be transmitted. Would it be wiser to enforce + * transmission of all coefficient bits?? + */ + for (ci = 0; ci < cinfo->num_components; ci++) { + if (last_bitpos[ci][0] < 0) + ERREXIT(cinfo, JERR_MISSING_DATA); + } +#endif + } else { + for (ci = 0; ci < cinfo->num_components; ci++) { + if (! component_sent[ci]) + ERREXIT(cinfo, JERR_MISSING_DATA); + } + } +} + +#endif /* C_MULTISCAN_FILES_SUPPORTED */ + + +LOCAL(void) +select_scan_parameters (j_compress_ptr cinfo) +/* Set up the scan parameters for the current scan */ +{ + int ci; + +#ifdef C_MULTISCAN_FILES_SUPPORTED + if (cinfo->scan_info != NULL) { + /* Prepare for current scan --- the script is already validated */ + my_master_ptr master = (my_master_ptr) cinfo->master; + const jpeg_scan_info * scanptr = cinfo->scan_info + master->scan_number; + + cinfo->comps_in_scan = scanptr->comps_in_scan; + for (ci = 0; ci < scanptr->comps_in_scan; ci++) { + cinfo->cur_comp_info[ci] = + &cinfo->comp_info[scanptr->component_index[ci]]; + } + cinfo->Ss = scanptr->Ss; + cinfo->Se = scanptr->Se; + cinfo->Ah = scanptr->Ah; + cinfo->Al = scanptr->Al; + } + else +#endif + { + /* Prepare for single sequential-JPEG scan containing all components */ + if (cinfo->num_components > MAX_COMPS_IN_SCAN) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, + MAX_COMPS_IN_SCAN); + cinfo->comps_in_scan = cinfo->num_components; + for (ci = 0; ci < cinfo->num_components; ci++) { + cinfo->cur_comp_info[ci] = &cinfo->comp_info[ci]; + } + cinfo->Ss = 0; + cinfo->Se = DCTSIZE2-1; + cinfo->Ah = 0; + cinfo->Al = 0; + } +} + + +LOCAL(void) +per_scan_setup (j_compress_ptr cinfo) +/* Do computations that are needed before processing a JPEG scan */ +/* cinfo->comps_in_scan and cinfo->cur_comp_info[] are already set */ +{ + int ci, mcublks, tmp; + jpeg_component_info *compptr; + + if (cinfo->comps_in_scan == 1) { + + /* Noninterleaved (single-component) scan */ + compptr = cinfo->cur_comp_info[0]; + + /* Overall image size in MCUs */ + cinfo->MCUs_per_row = compptr->width_in_blocks; + cinfo->MCU_rows_in_scan = compptr->height_in_blocks; + + /* For noninterleaved scan, always one block per MCU */ + compptr->MCU_width = 1; + compptr->MCU_height = 1; + compptr->MCU_blocks = 1; + compptr->MCU_sample_width = DCTSIZE; + compptr->last_col_width = 1; + /* For noninterleaved scans, it is convenient to define last_row_height + * as the number of block rows present in the last iMCU row. + */ + tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (tmp == 0) tmp = compptr->v_samp_factor; + compptr->last_row_height = tmp; + + /* Prepare array describing MCU composition */ + cinfo->blocks_in_MCU = 1; + cinfo->MCU_membership[0] = 0; + + } else { + + /* Interleaved (multi-component) scan */ + if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan, + MAX_COMPS_IN_SCAN); + + /* Overall image size in MCUs */ + cinfo->MCUs_per_row = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width, + (long) (cinfo->max_h_samp_factor*DCTSIZE)); + cinfo->MCU_rows_in_scan = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, + (long) (cinfo->max_v_samp_factor*DCTSIZE)); + + cinfo->blocks_in_MCU = 0; + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Sampling factors give # of blocks of component in each MCU */ + compptr->MCU_width = compptr->h_samp_factor; + compptr->MCU_height = compptr->v_samp_factor; + compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height; + compptr->MCU_sample_width = compptr->MCU_width * DCTSIZE; + /* Figure number of non-dummy blocks in last MCU column & row */ + tmp = (int) (compptr->width_in_blocks % compptr->MCU_width); + if (tmp == 0) tmp = compptr->MCU_width; + compptr->last_col_width = tmp; + tmp = (int) (compptr->height_in_blocks % compptr->MCU_height); + if (tmp == 0) tmp = compptr->MCU_height; + compptr->last_row_height = tmp; + /* Prepare array describing MCU composition */ + mcublks = compptr->MCU_blocks; + if (cinfo->blocks_in_MCU + mcublks > C_MAX_BLOCKS_IN_MCU) + ERREXIT(cinfo, JERR_BAD_MCU_SIZE); + while (mcublks-- > 0) { + cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci; + } + } + + } + + /* Convert restart specified in rows to actual MCU count. */ + /* Note that count must fit in 16 bits, so we provide limiting. */ + if (cinfo->restart_in_rows > 0) { + long nominal = (long) cinfo->restart_in_rows * (long) cinfo->MCUs_per_row; + cinfo->restart_interval = (unsigned int) MIN(nominal, 65535L); + } +} + + +/* + * Per-pass setup. + * This is called at the beginning of each pass. We determine which modules + * will be active during this pass and give them appropriate start_pass calls. + * We also set is_last_pass to indicate whether any more passes will be + * required. + */ + +METHODDEF(void) +prepare_for_pass (j_compress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + switch (master->pass_type) { + case main_pass: + /* Initial pass: will collect input data, and do either Huffman + * optimization or data output for the first scan. + */ + select_scan_parameters(cinfo); + per_scan_setup(cinfo); + if (! cinfo->raw_data_in) { + (*cinfo->cconvert->start_pass) (cinfo); + (*cinfo->downsample->start_pass) (cinfo); + (*cinfo->prep->start_pass) (cinfo, JBUF_PASS_THRU); + } + (*cinfo->fdct->start_pass) (cinfo); + (*cinfo->entropy->start_pass) (cinfo, cinfo->optimize_coding); + (*cinfo->coef->start_pass) (cinfo, + (master->total_passes > 1 ? + JBUF_SAVE_AND_PASS : JBUF_PASS_THRU)); + (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU); + if (cinfo->optimize_coding) { + /* No immediate data output; postpone writing frame/scan headers */ + master->pub.call_pass_startup = FALSE; + } else { + /* Will write frame/scan headers at first jpeg_write_scanlines call */ + master->pub.call_pass_startup = TRUE; + } + break; +#ifdef ENTROPY_OPT_SUPPORTED + case huff_opt_pass: + /* Do Huffman optimization for a scan after the first one. */ + select_scan_parameters(cinfo); + per_scan_setup(cinfo); + if (cinfo->Ss != 0 || cinfo->Ah == 0 || cinfo->arith_code) { + (*cinfo->entropy->start_pass) (cinfo, TRUE); + (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST); + master->pub.call_pass_startup = FALSE; + break; + } + /* Special case: Huffman DC refinement scans need no Huffman table + * and therefore we can skip the optimization pass for them. + */ + master->pass_type = output_pass; + master->pass_number++; + /*FALLTHROUGH*/ +#endif + case output_pass: + /* Do a data-output pass. */ + /* We need not repeat per-scan setup if prior optimization pass did it. */ + if (! cinfo->optimize_coding) { + select_scan_parameters(cinfo); + per_scan_setup(cinfo); + } + (*cinfo->entropy->start_pass) (cinfo, FALSE); + (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST); + /* We emit frame/scan headers now */ + if (master->scan_number == 0) + (*cinfo->marker->write_frame_header) (cinfo); + (*cinfo->marker->write_scan_header) (cinfo); + master->pub.call_pass_startup = FALSE; + break; + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + } + + master->pub.is_last_pass = (master->pass_number == master->total_passes-1); + + /* Set up progress monitor's pass info if present */ + if (cinfo->progress != NULL) { + cinfo->progress->completed_passes = master->pass_number; + cinfo->progress->total_passes = master->total_passes; + } +} + + +/* + * Special start-of-pass hook. + * This is called by jpeg_write_scanlines if call_pass_startup is TRUE. + * In single-pass processing, we need this hook because we don't want to + * write frame/scan headers during jpeg_start_compress; we want to let the + * application write COM markers etc. between jpeg_start_compress and the + * jpeg_write_scanlines loop. + * In multi-pass processing, this routine is not used. + */ + +METHODDEF(void) +pass_startup (j_compress_ptr cinfo) +{ + cinfo->master->call_pass_startup = FALSE; /* reset flag so call only once */ + + (*cinfo->marker->write_frame_header) (cinfo); + (*cinfo->marker->write_scan_header) (cinfo); +} + + +/* + * Finish up at end of pass. + */ + +METHODDEF(void) +finish_pass_master (j_compress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + /* The entropy coder always needs an end-of-pass call, + * either to analyze statistics or to flush its output buffer. + */ + (*cinfo->entropy->finish_pass) (cinfo); + + /* Update state for next pass */ + switch (master->pass_type) { + case main_pass: + /* next pass is either output of scan 0 (after optimization) + * or output of scan 1 (if no optimization). + */ + master->pass_type = output_pass; + if (! cinfo->optimize_coding) + master->scan_number++; + break; + case huff_opt_pass: + /* next pass is always output of current scan */ + master->pass_type = output_pass; + break; + case output_pass: + /* next pass is either optimization or output of next scan */ + if (cinfo->optimize_coding) + master->pass_type = huff_opt_pass; + master->scan_number++; + break; + } + + master->pass_number++; +} + + +/* + * Initialize master compression control. + */ + +GLOBAL(void) +jinit_c_master_control (j_compress_ptr cinfo, boolean transcode_only) +{ + my_master_ptr master; + + master = (my_master_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_comp_master)); + cinfo->master = (struct jpeg_comp_master *) master; + master->pub.prepare_for_pass = prepare_for_pass; + master->pub.pass_startup = pass_startup; + master->pub.finish_pass = finish_pass_master; + master->pub.is_last_pass = FALSE; + + /* Validate parameters, determine derived values */ + initial_setup(cinfo); + + if (cinfo->scan_info != NULL) { +#ifdef C_MULTISCAN_FILES_SUPPORTED + validate_script(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + cinfo->progressive_mode = FALSE; + cinfo->num_scans = 1; + } + + if (cinfo->progressive_mode) /* TEMPORARY HACK ??? */ + cinfo->optimize_coding = TRUE; /* assume default tables no good for progressive mode */ + + /* Initialize my private state */ + if (transcode_only) { + /* no main pass in transcoding */ + if (cinfo->optimize_coding) + master->pass_type = huff_opt_pass; + else + master->pass_type = output_pass; + } else { + /* for normal compression, first pass is always this type: */ + master->pass_type = main_pass; + } + master->scan_number = 0; + master->pass_number = 0; + if (cinfo->optimize_coding) + master->total_passes = cinfo->num_scans * 2; + else + master->total_passes = cinfo->num_scans; +} diff --git a/gtkmm-osx/jpeg-6b/jcomapi.c b/gtkmm-osx/jpeg-6b/jcomapi.c new file mode 100644 index 0000000..9b1fa75 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jcomapi.c @@ -0,0 +1,106 @@ +/* + * jcomapi.c + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface routines that are used for both + * compression and decompression. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Abort processing of a JPEG compression or decompression operation, + * but don't destroy the object itself. + * + * For this, we merely clean up all the nonpermanent memory pools. + * Note that temp files (virtual arrays) are not allowed to belong to + * the permanent pool, so we will be able to close all temp files here. + * Closing a data source or destination, if necessary, is the application's + * responsibility. + */ + +GLOBAL(void) +jpeg_abort (j_common_ptr cinfo) +{ + int pool; + + /* Do nothing if called on a not-initialized or destroyed JPEG object. */ + if (cinfo->mem == NULL) + return; + + /* Releasing pools in reverse order might help avoid fragmentation + * with some (brain-damaged) malloc libraries. + */ + for (pool = JPOOL_NUMPOOLS-1; pool > JPOOL_PERMANENT; pool--) { + (*cinfo->mem->free_pool) (cinfo, pool); + } + + /* Reset overall state for possible reuse of object */ + if (cinfo->is_decompressor) { + cinfo->global_state = DSTATE_START; + /* Try to keep application from accessing now-deleted marker list. + * A bit kludgy to do it here, but this is the most central place. + */ + ((j_decompress_ptr) cinfo)->marker_list = NULL; + } else { + cinfo->global_state = CSTATE_START; + } +} + + +/* + * Destruction of a JPEG object. + * + * Everything gets deallocated except the master jpeg_compress_struct itself + * and the error manager struct. Both of these are supplied by the application + * and must be freed, if necessary, by the application. (Often they are on + * the stack and so don't need to be freed anyway.) + * Closing a data source or destination, if necessary, is the application's + * responsibility. + */ + +GLOBAL(void) +jpeg_destroy (j_common_ptr cinfo) +{ + /* We need only tell the memory manager to release everything. */ + /* NB: mem pointer is NULL if memory mgr failed to initialize. */ + if (cinfo->mem != NULL) + (*cinfo->mem->self_destruct) (cinfo); + cinfo->mem = NULL; /* be safe if jpeg_destroy is called twice */ + cinfo->global_state = 0; /* mark it destroyed */ +} + + +/* + * Convenience routines for allocating quantization and Huffman tables. + * (Would jutils.c be a more reasonable place to put these?) + */ + +GLOBAL(JQUANT_TBL *) +jpeg_alloc_quant_table (j_common_ptr cinfo) +{ + JQUANT_TBL *tbl; + + tbl = (JQUANT_TBL *) + (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JQUANT_TBL)); + tbl->sent_table = FALSE; /* make sure this is false in any new table */ + return tbl; +} + + +GLOBAL(JHUFF_TBL *) +jpeg_alloc_huff_table (j_common_ptr cinfo) +{ + JHUFF_TBL *tbl; + + tbl = (JHUFF_TBL *) + (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JHUFF_TBL)); + tbl->sent_table = FALSE; /* make sure this is false in any new table */ + return tbl; +} diff --git a/gtkmm-osx/jpeg-6b/jconfig.bcc b/gtkmm-osx/jpeg-6b/jconfig.bcc new file mode 100644 index 0000000..c6c53ff --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jconfig.bcc @@ -0,0 +1,48 @@ +/* jconfig.bcc --- jconfig.h for Borland C (Turbo C) on MS-DOS or OS/2. */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#ifdef __MSDOS__ +#define NEED_FAR_POINTERS /* for small or medium memory model */ +#endif +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN /* this assumes you have -w-stu in CFLAGS */ + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#ifdef __MSDOS__ +#define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */ +#define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */ +#define USE_FMEM /* Borland has _fmemcpy() and _fmemset() */ +#endif + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#define TWO_FILE_COMMANDLINE +#define USE_SETMODE /* Borland has setmode() */ +#ifdef __MSDOS__ +#define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */ +#endif +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/jpeg-6b/jconfig.cfg b/gtkmm-osx/jpeg-6b/jconfig.cfg new file mode 100644 index 0000000..36a04fa --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jconfig.cfg @@ -0,0 +1,44 @@ +/* jconfig.cfg --- source file edited by configure script */ +/* see jconfig.doc for explanations */ + +#undef HAVE_PROTOTYPES +#undef HAVE_UNSIGNED_CHAR +#undef HAVE_UNSIGNED_SHORT +#undef void +#undef const +#undef CHAR_IS_UNSIGNED +#undef HAVE_STDDEF_H +#undef HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS +#undef NEED_SHORT_EXTERNAL_NAMES +/* Define this if you get warnings about undefined structures. */ +#undef INCOMPLETE_TYPES_BROKEN + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED +#undef INLINE +/* These are for configuring the JPEG memory manager. */ +#undef DEFAULT_MAX_MEM +#undef NO_MKTEMP + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#undef TWO_FILE_COMMANDLINE +#undef NEED_SIGNAL_CATCHER +#undef DONT_USE_B_MODE + +/* Define this if you want percent-done progress reports from cjpeg/djpeg. */ +#undef PROGRESS_REPORT + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/jpeg-6b/jconfig.dj b/gtkmm-osx/jpeg-6b/jconfig.dj new file mode 100644 index 0000000..f759a9d --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jconfig.dj @@ -0,0 +1,38 @@ +/* jconfig.dj --- jconfig.h for DJGPP (Delorie's GNU C port) on MS-DOS. */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS /* DJGPP uses flat 32-bit addressing */ +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#undef TWO_FILE_COMMANDLINE /* optional */ +#define USE_SETMODE /* Needed to make one-file style work in DJGPP */ +#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */ +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/jpeg-6b/jconfig.doc b/gtkmm-osx/jpeg-6b/jconfig.doc new file mode 100644 index 0000000..c18d1c0 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jconfig.doc @@ -0,0 +1,155 @@ +/* + * jconfig.doc + * + * Copyright (C) 1991-1994, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file documents the configuration options that are required to + * customize the JPEG software for a particular system. + * + * The actual configuration options for a particular installation are stored + * in jconfig.h. On many machines, jconfig.h can be generated automatically + * or copied from one of the "canned" jconfig files that we supply. But if + * you need to generate a jconfig.h file by hand, this file tells you how. + * + * DO NOT EDIT THIS FILE --- IT WON'T ACCOMPLISH ANYTHING. + * EDIT A COPY NAMED JCONFIG.H. + */ + + +/* + * These symbols indicate the properties of your machine or compiler. + * #define the symbol if yes, #undef it if no. + */ + +/* Does your compiler support function prototypes? + * (If not, you also need to use ansi2knr, see install.doc) + */ +#define HAVE_PROTOTYPES + +/* Does your compiler support the declaration "unsigned char" ? + * How about "unsigned short" ? + */ +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT + +/* Define "void" as "char" if your compiler doesn't know about type void. + * NOTE: be sure to define void such that "void *" represents the most general + * pointer type, e.g., that returned by malloc(). + */ +/* #define void char */ + +/* Define "const" as empty if your compiler doesn't know the "const" keyword. + */ +/* #define const */ + +/* Define this if an ordinary "char" type is unsigned. + * If you're not sure, leaving it undefined will work at some cost in speed. + * If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal. + */ +#undef CHAR_IS_UNSIGNED + +/* Define this if your system has an ANSI-conforming file. + */ +#define HAVE_STDDEF_H + +/* Define this if your system has an ANSI-conforming file. + */ +#define HAVE_STDLIB_H + +/* Define this if your system does not have an ANSI/SysV , + * but does have a BSD-style . + */ +#undef NEED_BSD_STRINGS + +/* Define this if your system does not provide typedef size_t in any of the + * ANSI-standard places (stddef.h, stdlib.h, or stdio.h), but places it in + * instead. + */ +#undef NEED_SYS_TYPES_H + +/* For 80x86 machines, you need to define NEED_FAR_POINTERS, + * unless you are using a large-data memory model or 80386 flat-memory mode. + * On less brain-damaged CPUs this symbol must not be defined. + * (Defining this symbol causes large data structures to be referenced through + * "far" pointers and to be allocated with a special version of malloc.) + */ +#undef NEED_FAR_POINTERS + +/* Define this if your linker needs global names to be unique in less + * than the first 15 characters. + */ +#undef NEED_SHORT_EXTERNAL_NAMES + +/* Although a real ANSI C compiler can deal perfectly well with pointers to + * unspecified structures (see "incomplete types" in the spec), a few pre-ANSI + * and pseudo-ANSI compilers get confused. To keep one of these bozos happy, + * define INCOMPLETE_TYPES_BROKEN. This is not recommended unless you + * actually get "missing structure definition" warnings or errors while + * compiling the JPEG code. + */ +#undef INCOMPLETE_TYPES_BROKEN + + +/* + * The following options affect code selection within the JPEG library, + * but they don't need to be visible to applications using the library. + * To minimize application namespace pollution, the symbols won't be + * defined unless JPEG_INTERNALS has been defined. + */ + +#ifdef JPEG_INTERNALS + +/* Define this if your compiler implements ">>" on signed values as a logical + * (unsigned) shift; leave it undefined if ">>" is a signed (arithmetic) shift, + * which is the normal and rational definition. + */ +#undef RIGHT_SHIFT_IS_UNSIGNED + + +#endif /* JPEG_INTERNALS */ + + +/* + * The remaining options do not affect the JPEG library proper, + * but only the sample applications cjpeg/djpeg (see cjpeg.c, djpeg.c). + * Other applications can ignore these. + */ + +#ifdef JPEG_CJPEG_DJPEG + +/* These defines indicate which image (non-JPEG) file formats are allowed. */ + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +/* Define this if you want to name both input and output files on the command + * line, rather than using stdout and optionally stdin. You MUST do this if + * your system can't cope with binary I/O to stdin/stdout. See comments at + * head of cjpeg.c or djpeg.c. + */ +#undef TWO_FILE_COMMANDLINE + +/* Define this if your system needs explicit cleanup of temporary files. + * This is crucial under MS-DOS, where the temporary "files" may be areas + * of extended memory; on most other systems it's not as important. + */ +#undef NEED_SIGNAL_CATCHER + +/* By default, we open image files with fopen(...,"rb") or fopen(...,"wb"). + * This is necessary on systems that distinguish text files from binary files, + * and is harmless on most systems that don't. If you have one of the rare + * systems that complains about the "b" spec, define this symbol. + */ +#undef DONT_USE_B_MODE + +/* Define this if you want percent-done progress reports from cjpeg/djpeg. + */ +#undef PROGRESS_REPORT + + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/jpeg-6b/jconfig.mac b/gtkmm-osx/jpeg-6b/jconfig.mac new file mode 100644 index 0000000..0de3efe --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jconfig.mac @@ -0,0 +1,43 @@ +/* jconfig.mac --- jconfig.h for CodeWarrior on Apple Macintosh */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#define USE_MAC_MEMMGR /* Define this if you use jmemmac.c */ + +#define ALIGN_TYPE long /* Needed for 680x0 Macs */ + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#define USE_CCOMMAND /* Command line reader for Macintosh */ +#define TWO_FILE_COMMANDLINE /* Binary I/O thru stdin/stdout doesn't work */ + +#undef NEED_SIGNAL_CATCHER +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/jpeg-6b/jconfig.manx b/gtkmm-osx/jpeg-6b/jconfig.manx new file mode 100644 index 0000000..6dd0d00 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jconfig.manx @@ -0,0 +1,43 @@ +/* jconfig.manx --- jconfig.h for Amiga systems using Manx Aztec C ver 5.x. */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#define TEMP_DIRECTORY "JPEGTMP:" /* recommended setting for Amiga */ + +#define SHORTxSHORT_32 /* produces better DCT code with Aztec C */ + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#define TWO_FILE_COMMANDLINE +#define NEED_SIGNAL_CATCHER +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#define signal_catcher _abort /* hack for Aztec C naming requirements */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/jpeg-6b/jconfig.mc6 b/gtkmm-osx/jpeg-6b/jconfig.mc6 new file mode 100644 index 0000000..c55082d --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jconfig.mc6 @@ -0,0 +1,52 @@ +/* jconfig.mc6 --- jconfig.h for Microsoft C on MS-DOS, version 6.00A & up. */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#define NEED_FAR_POINTERS /* for small or medium memory model */ +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */ + +#define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */ + +#define USE_FMEM /* Microsoft has _fmemcpy() and _fmemset() */ + +#define NEED_FHEAPMIN /* far heap management routines are broken */ + +#define SHORTxLCONST_32 /* enable compiler-specific DCT optimization */ +/* Note: the above define is known to improve the code with Microsoft C 6.00A. + * I do not know whether it is good for later compiler versions. + * Please report any info on this point to jpeg-info@uunet.uu.net. + */ + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#define TWO_FILE_COMMANDLINE +#define USE_SETMODE /* Microsoft has setmode() */ +#define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */ +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/jpeg-6b/jconfig.sas b/gtkmm-osx/jpeg-6b/jconfig.sas new file mode 100644 index 0000000..efdac22 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jconfig.sas @@ -0,0 +1,43 @@ +/* jconfig.sas --- jconfig.h for Amiga systems using SAS C 6.0 and up. */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#define TEMP_DIRECTORY "JPEGTMP:" /* recommended setting for Amiga */ + +#define NO_MKTEMP /* SAS C doesn't have mktemp() */ + +#define SHORTxSHORT_32 /* produces better DCT code with SAS C */ + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#define TWO_FILE_COMMANDLINE +#define NEED_SIGNAL_CATCHER +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/jpeg-6b/jconfig.st b/gtkmm-osx/jpeg-6b/jconfig.st new file mode 100644 index 0000000..4421b7a --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jconfig.st @@ -0,0 +1,42 @@ +/* jconfig.st --- jconfig.h for Atari ST/STE/TT using Pure C or Turbo C. */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS +#undef NEED_SHORT_EXTERNAL_NAMES +#define INCOMPLETE_TYPES_BROKEN /* suppress undefined-structure warnings */ + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#define ALIGN_TYPE long /* apparently double is a weird size? */ + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#define TWO_FILE_COMMANDLINE /* optional -- undef if you like Unix style */ +/* Note: if you undef TWO_FILE_COMMANDLINE, you may need to define + * USE_SETMODE. Some Atari compilers require it, some do not. + */ +#define NEED_SIGNAL_CATCHER /* needed if you use jmemname.c */ +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/jpeg-6b/jconfig.vc b/gtkmm-osx/jpeg-6b/jconfig.vc new file mode 100644 index 0000000..7e291c7 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jconfig.vc @@ -0,0 +1,45 @@ +/* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */ +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN + +/* Define "boolean" as unsigned char, not int, per Windows custom */ +#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ +typedef unsigned char boolean; +#endif +#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ + + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#define TWO_FILE_COMMANDLINE /* optional */ +#define USE_SETMODE /* Microsoft has setmode() */ +#undef NEED_SIGNAL_CATCHER +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/jpeg-6b/jconfig.vms b/gtkmm-osx/jpeg-6b/jconfig.vms new file mode 100644 index 0000000..55a6ffb --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jconfig.vms @@ -0,0 +1,37 @@ +/* jconfig.vms --- jconfig.h for use on Digital VMS. */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#define TWO_FILE_COMMANDLINE /* Needed on VMS */ +#undef NEED_SIGNAL_CATCHER +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/jpeg-6b/jconfig.wat b/gtkmm-osx/jpeg-6b/jconfig.wat new file mode 100644 index 0000000..6cc545b --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jconfig.wat @@ -0,0 +1,38 @@ +/* jconfig.wat --- jconfig.h for Watcom C/C++ on MS-DOS or OS/2. */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#define CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS /* Watcom uses flat 32-bit addressing */ +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#undef TWO_FILE_COMMANDLINE /* optional */ +#define USE_SETMODE /* Needed to make one-file style work in Watcom */ +#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */ +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/jpeg-6b/jcparam.c b/gtkmm-osx/jpeg-6b/jcparam.c new file mode 100644 index 0000000..6fc48f5 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jcparam.c @@ -0,0 +1,610 @@ +/* + * jcparam.c + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains optional default-setting code for the JPEG compressor. + * Applications do not have to use this file, but those that don't use it + * must know a lot more about the innards of the JPEG code. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Quantization table setup routines + */ + +GLOBAL(void) +jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl, + const unsigned int *basic_table, + int scale_factor, boolean force_baseline) +/* Define a quantization table equal to the basic_table times + * a scale factor (given as a percentage). + * If force_baseline is TRUE, the computed quantization table entries + * are limited to 1..255 for JPEG baseline compatibility. + */ +{ + JQUANT_TBL ** qtblptr; + int i; + long temp; + + /* Safety check to ensure start_compress not called yet. */ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + if (which_tbl < 0 || which_tbl >= NUM_QUANT_TBLS) + ERREXIT1(cinfo, JERR_DQT_INDEX, which_tbl); + + qtblptr = & cinfo->quant_tbl_ptrs[which_tbl]; + + if (*qtblptr == NULL) + *qtblptr = jpeg_alloc_quant_table((j_common_ptr) cinfo); + + for (i = 0; i < DCTSIZE2; i++) { + temp = ((long) basic_table[i] * scale_factor + 50L) / 100L; + /* limit the values to the valid range */ + if (temp <= 0L) temp = 1L; + if (temp > 32767L) temp = 32767L; /* max quantizer needed for 12 bits */ + if (force_baseline && temp > 255L) + temp = 255L; /* limit to baseline range if requested */ + (*qtblptr)->quantval[i] = (UINT16) temp; + } + + /* Initialize sent_table FALSE so table will be written to JPEG file. */ + (*qtblptr)->sent_table = FALSE; +} + + +GLOBAL(void) +jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor, + boolean force_baseline) +/* Set or change the 'quality' (quantization) setting, using default tables + * and a straight percentage-scaling quality scale. In most cases it's better + * to use jpeg_set_quality (below); this entry point is provided for + * applications that insist on a linear percentage scaling. + */ +{ + /* These are the sample quantization tables given in JPEG spec section K.1. + * The spec says that the values given produce "good" quality, and + * when divided by 2, "very good" quality. + */ + static const unsigned int std_luminance_quant_tbl[DCTSIZE2] = { + 16, 11, 10, 16, 24, 40, 51, 61, + 12, 12, 14, 19, 26, 58, 60, 55, + 14, 13, 16, 24, 40, 57, 69, 56, + 14, 17, 22, 29, 51, 87, 80, 62, + 18, 22, 37, 56, 68, 109, 103, 77, + 24, 35, 55, 64, 81, 104, 113, 92, + 49, 64, 78, 87, 103, 121, 120, 101, + 72, 92, 95, 98, 112, 100, 103, 99 + }; + static const unsigned int std_chrominance_quant_tbl[DCTSIZE2] = { + 17, 18, 24, 47, 99, 99, 99, 99, + 18, 21, 26, 66, 99, 99, 99, 99, + 24, 26, 56, 99, 99, 99, 99, 99, + 47, 66, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99 + }; + + /* Set up two quantization tables using the specified scaling */ + jpeg_add_quant_table(cinfo, 0, std_luminance_quant_tbl, + scale_factor, force_baseline); + jpeg_add_quant_table(cinfo, 1, std_chrominance_quant_tbl, + scale_factor, force_baseline); +} + + +GLOBAL(int) +jpeg_quality_scaling (int quality) +/* Convert a user-specified quality rating to a percentage scaling factor + * for an underlying quantization table, using our recommended scaling curve. + * The input 'quality' factor should be 0 (terrible) to 100 (very good). + */ +{ + /* Safety limit on quality factor. Convert 0 to 1 to avoid zero divide. */ + if (quality <= 0) quality = 1; + if (quality > 100) quality = 100; + + /* The basic table is used as-is (scaling 100) for a quality of 50. + * Qualities 50..100 are converted to scaling percentage 200 - 2*Q; + * note that at Q=100 the scaling is 0, which will cause jpeg_add_quant_table + * to make all the table entries 1 (hence, minimum quantization loss). + * Qualities 1..50 are converted to scaling percentage 5000/Q. + */ + if (quality < 50) + quality = 5000 / quality; + else + quality = 200 - quality*2; + + return quality; +} + + +GLOBAL(void) +jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline) +/* Set or change the 'quality' (quantization) setting, using default tables. + * This is the standard quality-adjusting entry point for typical user + * interfaces; only those who want detailed control over quantization tables + * would use the preceding three routines directly. + */ +{ + /* Convert user 0-100 rating to percentage scaling */ + quality = jpeg_quality_scaling(quality); + + /* Set up standard quality tables */ + jpeg_set_linear_quality(cinfo, quality, force_baseline); +} + + +/* + * Huffman table setup routines + */ + +LOCAL(void) +add_huff_table (j_compress_ptr cinfo, + JHUFF_TBL **htblptr, const UINT8 *bits, const UINT8 *val) +/* Define a Huffman table */ +{ + int nsymbols, len; + + if (*htblptr == NULL) + *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); + + /* Copy the number-of-symbols-of-each-code-length counts */ + MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits)); + + /* Validate the counts. We do this here mainly so we can copy the right + * number of symbols from the val[] array, without risking marching off + * the end of memory. jchuff.c will do a more thorough test later. + */ + nsymbols = 0; + for (len = 1; len <= 16; len++) + nsymbols += bits[len]; + if (nsymbols < 1 || nsymbols > 256) + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + + MEMCOPY((*htblptr)->huffval, val, nsymbols * SIZEOF(UINT8)); + + /* Initialize sent_table FALSE so table will be written to JPEG file. */ + (*htblptr)->sent_table = FALSE; +} + + +LOCAL(void) +std_huff_tables (j_compress_ptr cinfo) +/* Set up the standard Huffman tables (cf. JPEG standard section K.3) */ +/* IMPORTANT: these are only valid for 8-bit data precision! */ +{ + static const UINT8 bits_dc_luminance[17] = + { /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }; + static const UINT8 val_dc_luminance[] = + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + + static const UINT8 bits_dc_chrominance[17] = + { /* 0-base */ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; + static const UINT8 val_dc_chrominance[] = + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + + static const UINT8 bits_ac_luminance[17] = + { /* 0-base */ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d }; + static const UINT8 val_ac_luminance[] = + { 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, + 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, + 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08, + 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0, + 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16, + 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28, + 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, + 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, + 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, + 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, + 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, + 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, + 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, + 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, + 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, + 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2, + 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, + 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, + 0xf9, 0xfa }; + + static const UINT8 bits_ac_chrominance[17] = + { /* 0-base */ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 }; + static const UINT8 val_ac_chrominance[] = + { 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, + 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, + 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, + 0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0, + 0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34, + 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26, + 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38, + 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, + 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, + 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, + 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, + 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, + 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, + 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, + 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, + 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, + 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, + 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, + 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, + 0xf9, 0xfa }; + + add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[0], + bits_dc_luminance, val_dc_luminance); + add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[0], + bits_ac_luminance, val_ac_luminance); + add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[1], + bits_dc_chrominance, val_dc_chrominance); + add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[1], + bits_ac_chrominance, val_ac_chrominance); +} + + +/* + * Default parameter setup for compression. + * + * Applications that don't choose to use this routine must do their + * own setup of all these parameters. Alternately, you can call this + * to establish defaults and then alter parameters selectively. This + * is the recommended approach since, if we add any new parameters, + * your code will still work (they'll be set to reasonable defaults). + */ + +GLOBAL(void) +jpeg_set_defaults (j_compress_ptr cinfo) +{ + int i; + + /* Safety check to ensure start_compress not called yet. */ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + /* Allocate comp_info array large enough for maximum component count. + * Array is made permanent in case application wants to compress + * multiple images at same param settings. + */ + if (cinfo->comp_info == NULL) + cinfo->comp_info = (jpeg_component_info *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + MAX_COMPONENTS * SIZEOF(jpeg_component_info)); + + /* Initialize everything not dependent on the color space */ + + cinfo->data_precision = BITS_IN_JSAMPLE; + /* Set up two quantization tables using default quality of 75 */ + jpeg_set_quality(cinfo, 75, TRUE); + /* Set up two Huffman tables */ + std_huff_tables(cinfo); + + /* Initialize default arithmetic coding conditioning */ + for (i = 0; i < NUM_ARITH_TBLS; i++) { + cinfo->arith_dc_L[i] = 0; + cinfo->arith_dc_U[i] = 1; + cinfo->arith_ac_K[i] = 5; + } + + /* Default is no multiple-scan output */ + cinfo->scan_info = NULL; + cinfo->num_scans = 0; + + /* Expect normal source image, not raw downsampled data */ + cinfo->raw_data_in = FALSE; + + /* Use Huffman coding, not arithmetic coding, by default */ + cinfo->arith_code = FALSE; + + /* By default, don't do extra passes to optimize entropy coding */ + cinfo->optimize_coding = FALSE; + /* The standard Huffman tables are only valid for 8-bit data precision. + * If the precision is higher, force optimization on so that usable + * tables will be computed. This test can be removed if default tables + * are supplied that are valid for the desired precision. + */ + if (cinfo->data_precision > 8) + cinfo->optimize_coding = TRUE; + + /* By default, use the simpler non-cosited sampling alignment */ + cinfo->CCIR601_sampling = FALSE; + + /* No input smoothing */ + cinfo->smoothing_factor = 0; + + /* DCT algorithm preference */ + cinfo->dct_method = JDCT_DEFAULT; + + /* No restart markers */ + cinfo->restart_interval = 0; + cinfo->restart_in_rows = 0; + + /* Fill in default JFIF marker parameters. Note that whether the marker + * will actually be written is determined by jpeg_set_colorspace. + * + * By default, the library emits JFIF version code 1.01. + * An application that wants to emit JFIF 1.02 extension markers should set + * JFIF_minor_version to 2. We could probably get away with just defaulting + * to 1.02, but there may still be some decoders in use that will complain + * about that; saying 1.01 should minimize compatibility problems. + */ + cinfo->JFIF_major_version = 1; /* Default JFIF version = 1.01 */ + cinfo->JFIF_minor_version = 1; + cinfo->density_unit = 0; /* Pixel size is unknown by default */ + cinfo->X_density = 1; /* Pixel aspect ratio is square by default */ + cinfo->Y_density = 1; + + /* Choose JPEG colorspace based on input space, set defaults accordingly */ + + jpeg_default_colorspace(cinfo); +} + + +/* + * Select an appropriate JPEG colorspace for in_color_space. + */ + +GLOBAL(void) +jpeg_default_colorspace (j_compress_ptr cinfo) +{ + switch (cinfo->in_color_space) { + case JCS_GRAYSCALE: + jpeg_set_colorspace(cinfo, JCS_GRAYSCALE); + break; + case JCS_RGB: + jpeg_set_colorspace(cinfo, JCS_YCbCr); + break; + case JCS_YCbCr: + jpeg_set_colorspace(cinfo, JCS_YCbCr); + break; + case JCS_CMYK: + jpeg_set_colorspace(cinfo, JCS_CMYK); /* By default, no translation */ + break; + case JCS_YCCK: + jpeg_set_colorspace(cinfo, JCS_YCCK); + break; + case JCS_UNKNOWN: + jpeg_set_colorspace(cinfo, JCS_UNKNOWN); + break; + default: + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + } +} + + +/* + * Set the JPEG colorspace, and choose colorspace-dependent default values. + */ + +GLOBAL(void) +jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace) +{ + jpeg_component_info * compptr; + int ci; + +#define SET_COMP(index,id,hsamp,vsamp,quant,dctbl,actbl) \ + (compptr = &cinfo->comp_info[index], \ + compptr->component_id = (id), \ + compptr->h_samp_factor = (hsamp), \ + compptr->v_samp_factor = (vsamp), \ + compptr->quant_tbl_no = (quant), \ + compptr->dc_tbl_no = (dctbl), \ + compptr->ac_tbl_no = (actbl) ) + + /* Safety check to ensure start_compress not called yet. */ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + /* For all colorspaces, we use Q and Huff tables 0 for luminance components, + * tables 1 for chrominance components. + */ + + cinfo->jpeg_color_space = colorspace; + + cinfo->write_JFIF_header = FALSE; /* No marker for non-JFIF colorspaces */ + cinfo->write_Adobe_marker = FALSE; /* write no Adobe marker by default */ + + switch (colorspace) { + case JCS_GRAYSCALE: + cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */ + cinfo->num_components = 1; + /* JFIF specifies component ID 1 */ + SET_COMP(0, 1, 1,1, 0, 0,0); + break; + case JCS_RGB: + cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag RGB */ + cinfo->num_components = 3; + SET_COMP(0, 0x52 /* 'R' */, 1,1, 0, 0,0); + SET_COMP(1, 0x47 /* 'G' */, 1,1, 0, 0,0); + SET_COMP(2, 0x42 /* 'B' */, 1,1, 0, 0,0); + break; + case JCS_YCbCr: + cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */ + cinfo->num_components = 3; + /* JFIF specifies component IDs 1,2,3 */ + /* We default to 2x2 subsamples of chrominance */ + SET_COMP(0, 1, 2,2, 0, 0,0); + SET_COMP(1, 2, 1,1, 1, 1,1); + SET_COMP(2, 3, 1,1, 1, 1,1); + break; + case JCS_CMYK: + cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag CMYK */ + cinfo->num_components = 4; + SET_COMP(0, 0x43 /* 'C' */, 1,1, 0, 0,0); + SET_COMP(1, 0x4D /* 'M' */, 1,1, 0, 0,0); + SET_COMP(2, 0x59 /* 'Y' */, 1,1, 0, 0,0); + SET_COMP(3, 0x4B /* 'K' */, 1,1, 0, 0,0); + break; + case JCS_YCCK: + cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag YCCK */ + cinfo->num_components = 4; + SET_COMP(0, 1, 2,2, 0, 0,0); + SET_COMP(1, 2, 1,1, 1, 1,1); + SET_COMP(2, 3, 1,1, 1, 1,1); + SET_COMP(3, 4, 2,2, 0, 0,0); + break; + case JCS_UNKNOWN: + cinfo->num_components = cinfo->input_components; + if (cinfo->num_components < 1 || cinfo->num_components > MAX_COMPONENTS) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, + MAX_COMPONENTS); + for (ci = 0; ci < cinfo->num_components; ci++) { + SET_COMP(ci, ci, 1,1, 0, 0,0); + } + break; + default: + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + } +} + + +#ifdef C_PROGRESSIVE_SUPPORTED + +LOCAL(jpeg_scan_info *) +fill_a_scan (jpeg_scan_info * scanptr, int ci, + int Ss, int Se, int Ah, int Al) +/* Support routine: generate one scan for specified component */ +{ + scanptr->comps_in_scan = 1; + scanptr->component_index[0] = ci; + scanptr->Ss = Ss; + scanptr->Se = Se; + scanptr->Ah = Ah; + scanptr->Al = Al; + scanptr++; + return scanptr; +} + +LOCAL(jpeg_scan_info *) +fill_scans (jpeg_scan_info * scanptr, int ncomps, + int Ss, int Se, int Ah, int Al) +/* Support routine: generate one scan for each component */ +{ + int ci; + + for (ci = 0; ci < ncomps; ci++) { + scanptr->comps_in_scan = 1; + scanptr->component_index[0] = ci; + scanptr->Ss = Ss; + scanptr->Se = Se; + scanptr->Ah = Ah; + scanptr->Al = Al; + scanptr++; + } + return scanptr; +} + +LOCAL(jpeg_scan_info *) +fill_dc_scans (jpeg_scan_info * scanptr, int ncomps, int Ah, int Al) +/* Support routine: generate interleaved DC scan if possible, else N scans */ +{ + int ci; + + if (ncomps <= MAX_COMPS_IN_SCAN) { + /* Single interleaved DC scan */ + scanptr->comps_in_scan = ncomps; + for (ci = 0; ci < ncomps; ci++) + scanptr->component_index[ci] = ci; + scanptr->Ss = scanptr->Se = 0; + scanptr->Ah = Ah; + scanptr->Al = Al; + scanptr++; + } else { + /* Noninterleaved DC scan for each component */ + scanptr = fill_scans(scanptr, ncomps, 0, 0, Ah, Al); + } + return scanptr; +} + + +/* + * Create a recommended progressive-JPEG script. + * cinfo->num_components and cinfo->jpeg_color_space must be correct. + */ + +GLOBAL(void) +jpeg_simple_progression (j_compress_ptr cinfo) +{ + int ncomps = cinfo->num_components; + int nscans; + jpeg_scan_info * scanptr; + + /* Safety check to ensure start_compress not called yet. */ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + /* Figure space needed for script. Calculation must match code below! */ + if (ncomps == 3 && cinfo->jpeg_color_space == JCS_YCbCr) { + /* Custom script for YCbCr color images. */ + nscans = 10; + } else { + /* All-purpose script for other color spaces. */ + if (ncomps > MAX_COMPS_IN_SCAN) + nscans = 6 * ncomps; /* 2 DC + 4 AC scans per component */ + else + nscans = 2 + 4 * ncomps; /* 2 DC scans; 4 AC scans per component */ + } + + /* Allocate space for script. + * We need to put it in the permanent pool in case the application performs + * multiple compressions without changing the settings. To avoid a memory + * leak if jpeg_simple_progression is called repeatedly for the same JPEG + * object, we try to re-use previously allocated space, and we allocate + * enough space to handle YCbCr even if initially asked for grayscale. + */ + if (cinfo->script_space == NULL || cinfo->script_space_size < nscans) { + cinfo->script_space_size = MAX(nscans, 10); + cinfo->script_space = (jpeg_scan_info *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + cinfo->script_space_size * SIZEOF(jpeg_scan_info)); + } + scanptr = cinfo->script_space; + cinfo->scan_info = scanptr; + cinfo->num_scans = nscans; + + if (ncomps == 3 && cinfo->jpeg_color_space == JCS_YCbCr) { + /* Custom script for YCbCr color images. */ + /* Initial DC scan */ + scanptr = fill_dc_scans(scanptr, ncomps, 0, 1); + /* Initial AC scan: get some luma data out in a hurry */ + scanptr = fill_a_scan(scanptr, 0, 1, 5, 0, 2); + /* Chroma data is too small to be worth expending many scans on */ + scanptr = fill_a_scan(scanptr, 2, 1, 63, 0, 1); + scanptr = fill_a_scan(scanptr, 1, 1, 63, 0, 1); + /* Complete spectral selection for luma AC */ + scanptr = fill_a_scan(scanptr, 0, 6, 63, 0, 2); + /* Refine next bit of luma AC */ + scanptr = fill_a_scan(scanptr, 0, 1, 63, 2, 1); + /* Finish DC successive approximation */ + scanptr = fill_dc_scans(scanptr, ncomps, 1, 0); + /* Finish AC successive approximation */ + scanptr = fill_a_scan(scanptr, 2, 1, 63, 1, 0); + scanptr = fill_a_scan(scanptr, 1, 1, 63, 1, 0); + /* Luma bottom bit comes last since it's usually largest scan */ + scanptr = fill_a_scan(scanptr, 0, 1, 63, 1, 0); + } else { + /* All-purpose script for other color spaces. */ + /* Successive approximation first pass */ + scanptr = fill_dc_scans(scanptr, ncomps, 0, 1); + scanptr = fill_scans(scanptr, ncomps, 1, 5, 0, 2); + scanptr = fill_scans(scanptr, ncomps, 6, 63, 0, 2); + /* Successive approximation second pass */ + scanptr = fill_scans(scanptr, ncomps, 1, 63, 2, 1); + /* Successive approximation final pass */ + scanptr = fill_dc_scans(scanptr, ncomps, 1, 0); + scanptr = fill_scans(scanptr, ncomps, 1, 63, 1, 0); + } +} + +#endif /* C_PROGRESSIVE_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/jcphuff.c b/gtkmm-osx/jpeg-6b/jcphuff.c new file mode 100644 index 0000000..07f9178 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jcphuff.c @@ -0,0 +1,833 @@ +/* + * jcphuff.c + * + * Copyright (C) 1995-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains Huffman entropy encoding routines for progressive JPEG. + * + * We do not support output suspension in this module, since the library + * currently does not allow multiple-scan files to be written with output + * suspension. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jchuff.h" /* Declarations shared with jchuff.c */ + +#ifdef C_PROGRESSIVE_SUPPORTED + +/* Expanded entropy encoder object for progressive Huffman encoding. */ + +typedef struct { + struct jpeg_entropy_encoder pub; /* public fields */ + + /* Mode flag: TRUE for optimization, FALSE for actual data output */ + boolean gather_statistics; + + /* Bit-level coding status. + * next_output_byte/free_in_buffer are local copies of cinfo->dest fields. + */ + JOCTET * next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + INT32 put_buffer; /* current bit-accumulation buffer */ + int put_bits; /* # of bits now in it */ + j_compress_ptr cinfo; /* link to cinfo (needed for dump_buffer) */ + + /* Coding status for DC components */ + int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ + + /* Coding status for AC components */ + int ac_tbl_no; /* the table number of the single component */ + unsigned int EOBRUN; /* run length of EOBs */ + unsigned int BE; /* # of buffered correction bits before MCU */ + char * bit_buffer; /* buffer for correction bits (1 per char) */ + /* packing correction bits tightly would save some space but cost time... */ + + unsigned int restarts_to_go; /* MCUs left in this restart interval */ + int next_restart_num; /* next restart number to write (0-7) */ + + /* Pointers to derived tables (these workspaces have image lifespan). + * Since any one scan codes only DC or only AC, we only need one set + * of tables, not one for DC and one for AC. + */ + c_derived_tbl * derived_tbls[NUM_HUFF_TBLS]; + + /* Statistics tables for optimization; again, one set is enough */ + long * count_ptrs[NUM_HUFF_TBLS]; +} phuff_entropy_encoder; + +typedef phuff_entropy_encoder * phuff_entropy_ptr; + +/* MAX_CORR_BITS is the number of bits the AC refinement correction-bit + * buffer can hold. Larger sizes may slightly improve compression, but + * 1000 is already well into the realm of overkill. + * The minimum safe size is 64 bits. + */ + +#define MAX_CORR_BITS 1000 /* Max # of correction bits I can buffer */ + +/* IRIGHT_SHIFT is like RIGHT_SHIFT, but works on int rather than INT32. + * We assume that int right shift is unsigned if INT32 right shift is, + * which should be safe. + */ + +#ifdef RIGHT_SHIFT_IS_UNSIGNED +#define ISHIFT_TEMPS int ishift_temp; +#define IRIGHT_SHIFT(x,shft) \ + ((ishift_temp = (x)) < 0 ? \ + (ishift_temp >> (shft)) | ((~0) << (16-(shft))) : \ + (ishift_temp >> (shft))) +#else +#define ISHIFT_TEMPS +#define IRIGHT_SHIFT(x,shft) ((x) >> (shft)) +#endif + +/* Forward declarations */ +METHODDEF(boolean) encode_mcu_DC_first JPP((j_compress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(boolean) encode_mcu_AC_first JPP((j_compress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(boolean) encode_mcu_DC_refine JPP((j_compress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(boolean) encode_mcu_AC_refine JPP((j_compress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(void) finish_pass_phuff JPP((j_compress_ptr cinfo)); +METHODDEF(void) finish_pass_gather_phuff JPP((j_compress_ptr cinfo)); + + +/* + * Initialize for a Huffman-compressed scan using progressive JPEG. + */ + +METHODDEF(void) +start_pass_phuff (j_compress_ptr cinfo, boolean gather_statistics) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + boolean is_DC_band; + int ci, tbl; + jpeg_component_info * compptr; + + entropy->cinfo = cinfo; + entropy->gather_statistics = gather_statistics; + + is_DC_band = (cinfo->Ss == 0); + + /* We assume jcmaster.c already validated the scan parameters. */ + + /* Select execution routines */ + if (cinfo->Ah == 0) { + if (is_DC_band) + entropy->pub.encode_mcu = encode_mcu_DC_first; + else + entropy->pub.encode_mcu = encode_mcu_AC_first; + } else { + if (is_DC_band) + entropy->pub.encode_mcu = encode_mcu_DC_refine; + else { + entropy->pub.encode_mcu = encode_mcu_AC_refine; + /* AC refinement needs a correction bit buffer */ + if (entropy->bit_buffer == NULL) + entropy->bit_buffer = (char *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + MAX_CORR_BITS * SIZEOF(char)); + } + } + if (gather_statistics) + entropy->pub.finish_pass = finish_pass_gather_phuff; + else + entropy->pub.finish_pass = finish_pass_phuff; + + /* Only DC coefficients may be interleaved, so cinfo->comps_in_scan = 1 + * for AC coefficients. + */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Initialize DC predictions to 0 */ + entropy->last_dc_val[ci] = 0; + /* Get table index */ + if (is_DC_band) { + if (cinfo->Ah != 0) /* DC refinement needs no table */ + continue; + tbl = compptr->dc_tbl_no; + } else { + entropy->ac_tbl_no = tbl = compptr->ac_tbl_no; + } + if (gather_statistics) { + /* Check for invalid table index */ + /* (make_c_derived_tbl does this in the other path) */ + if (tbl < 0 || tbl >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tbl); + /* Allocate and zero the statistics tables */ + /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */ + if (entropy->count_ptrs[tbl] == NULL) + entropy->count_ptrs[tbl] = (long *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + 257 * SIZEOF(long)); + MEMZERO(entropy->count_ptrs[tbl], 257 * SIZEOF(long)); + } else { + /* Compute derived values for Huffman table */ + /* We may do this more than once for a table, but it's not expensive */ + jpeg_make_c_derived_tbl(cinfo, is_DC_band, tbl, + & entropy->derived_tbls[tbl]); + } + } + + /* Initialize AC stuff */ + entropy->EOBRUN = 0; + entropy->BE = 0; + + /* Initialize bit buffer to empty */ + entropy->put_buffer = 0; + entropy->put_bits = 0; + + /* Initialize restart stuff */ + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num = 0; +} + + +/* Outputting bytes to the file. + * NB: these must be called only when actually outputting, + * that is, entropy->gather_statistics == FALSE. + */ + +/* Emit a byte */ +#define emit_byte(entropy,val) \ + { *(entropy)->next_output_byte++ = (JOCTET) (val); \ + if (--(entropy)->free_in_buffer == 0) \ + dump_buffer(entropy); } + + +LOCAL(void) +dump_buffer (phuff_entropy_ptr entropy) +/* Empty the output buffer; we do not support suspension in this module. */ +{ + struct jpeg_destination_mgr * dest = entropy->cinfo->dest; + + if (! (*dest->empty_output_buffer) (entropy->cinfo)) + ERREXIT(entropy->cinfo, JERR_CANT_SUSPEND); + /* After a successful buffer dump, must reset buffer pointers */ + entropy->next_output_byte = dest->next_output_byte; + entropy->free_in_buffer = dest->free_in_buffer; +} + + +/* Outputting bits to the file */ + +/* Only the right 24 bits of put_buffer are used; the valid bits are + * left-justified in this part. At most 16 bits can be passed to emit_bits + * in one call, and we never retain more than 7 bits in put_buffer + * between calls, so 24 bits are sufficient. + */ + +INLINE +LOCAL(void) +emit_bits (phuff_entropy_ptr entropy, unsigned int code, int size) +/* Emit some bits, unless we are in gather mode */ +{ + /* This routine is heavily used, so it's worth coding tightly. */ + register INT32 put_buffer = (INT32) code; + register int put_bits = entropy->put_bits; + + /* if size is 0, caller used an invalid Huffman table entry */ + if (size == 0) + ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE); + + if (entropy->gather_statistics) + return; /* do nothing if we're only getting stats */ + + put_buffer &= (((INT32) 1)<put_buffer; /* and merge with old buffer contents */ + + while (put_bits >= 8) { + int c = (int) ((put_buffer >> 16) & 0xFF); + + emit_byte(entropy, c); + if (c == 0xFF) { /* need to stuff a zero byte? */ + emit_byte(entropy, 0); + } + put_buffer <<= 8; + put_bits -= 8; + } + + entropy->put_buffer = put_buffer; /* update variables */ + entropy->put_bits = put_bits; +} + + +LOCAL(void) +flush_bits (phuff_entropy_ptr entropy) +{ + emit_bits(entropy, 0x7F, 7); /* fill any partial byte with ones */ + entropy->put_buffer = 0; /* and reset bit-buffer to empty */ + entropy->put_bits = 0; +} + + +/* + * Emit (or just count) a Huffman symbol. + */ + +INLINE +LOCAL(void) +emit_symbol (phuff_entropy_ptr entropy, int tbl_no, int symbol) +{ + if (entropy->gather_statistics) + entropy->count_ptrs[tbl_no][symbol]++; + else { + c_derived_tbl * tbl = entropy->derived_tbls[tbl_no]; + emit_bits(entropy, tbl->ehufco[symbol], tbl->ehufsi[symbol]); + } +} + + +/* + * Emit bits from a correction bit buffer. + */ + +LOCAL(void) +emit_buffered_bits (phuff_entropy_ptr entropy, char * bufstart, + unsigned int nbits) +{ + if (entropy->gather_statistics) + return; /* no real work */ + + while (nbits > 0) { + emit_bits(entropy, (unsigned int) (*bufstart), 1); + bufstart++; + nbits--; + } +} + + +/* + * Emit any pending EOBRUN symbol. + */ + +LOCAL(void) +emit_eobrun (phuff_entropy_ptr entropy) +{ + register int temp, nbits; + + if (entropy->EOBRUN > 0) { /* if there is any pending EOBRUN */ + temp = entropy->EOBRUN; + nbits = 0; + while ((temp >>= 1)) + nbits++; + /* safety check: shouldn't happen given limited correction-bit buffer */ + if (nbits > 14) + ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE); + + emit_symbol(entropy, entropy->ac_tbl_no, nbits << 4); + if (nbits) + emit_bits(entropy, entropy->EOBRUN, nbits); + + entropy->EOBRUN = 0; + + /* Emit any buffered correction bits */ + emit_buffered_bits(entropy, entropy->bit_buffer, entropy->BE); + entropy->BE = 0; + } +} + + +/* + * Emit a restart marker & resynchronize predictions. + */ + +LOCAL(void) +emit_restart (phuff_entropy_ptr entropy, int restart_num) +{ + int ci; + + emit_eobrun(entropy); + + if (! entropy->gather_statistics) { + flush_bits(entropy); + emit_byte(entropy, 0xFF); + emit_byte(entropy, JPEG_RST0 + restart_num); + } + + if (entropy->cinfo->Ss == 0) { + /* Re-initialize DC predictions to 0 */ + for (ci = 0; ci < entropy->cinfo->comps_in_scan; ci++) + entropy->last_dc_val[ci] = 0; + } else { + /* Re-initialize all AC-related fields to 0 */ + entropy->EOBRUN = 0; + entropy->BE = 0; + } +} + + +/* + * MCU encoding for DC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(boolean) +encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + register int temp, temp2; + register int nbits; + int blkn, ci; + int Al = cinfo->Al; + JBLOCKROW block; + jpeg_component_info * compptr; + ISHIFT_TEMPS + + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) + if (entropy->restarts_to_go == 0) + emit_restart(entropy, entropy->next_restart_num); + + /* Encode the MCU data blocks */ + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + block = MCU_data[blkn]; + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + + /* Compute the DC value after the required point transform by Al. + * This is simply an arithmetic right shift. + */ + temp2 = IRIGHT_SHIFT((int) ((*block)[0]), Al); + + /* DC differences are figured on the point-transformed values. */ + temp = temp2 - entropy->last_dc_val[ci]; + entropy->last_dc_val[ci] = temp2; + + /* Encode the DC coefficient difference per section G.1.2.1 */ + temp2 = temp; + if (temp < 0) { + temp = -temp; /* temp is abs value of input */ + /* For a negative input, want temp2 = bitwise complement of abs(input) */ + /* This code assumes we are on a two's complement machine */ + temp2--; + } + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 0; + while (temp) { + nbits++; + temp >>= 1; + } + /* Check for out-of-range coefficient values. + * Since we're encoding a difference, the range limit is twice as much. + */ + if (nbits > MAX_COEF_BITS+1) + ERREXIT(cinfo, JERR_BAD_DCT_COEF); + + /* Count/emit the Huffman-coded symbol for the number of bits */ + emit_symbol(entropy, compptr->dc_tbl_no, nbits); + + /* Emit that number of bits of the value, if positive, */ + /* or the complement of its magnitude, if negative. */ + if (nbits) /* emit_bits rejects calls with size 0 */ + emit_bits(entropy, (unsigned int) temp2, nbits); + } + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* + * MCU encoding for AC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(boolean) +encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + register int temp, temp2; + register int nbits; + register int r, k; + int Se = cinfo->Se; + int Al = cinfo->Al; + JBLOCKROW block; + + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) + if (entropy->restarts_to_go == 0) + emit_restart(entropy, entropy->next_restart_num); + + /* Encode the MCU data block */ + block = MCU_data[0]; + + /* Encode the AC coefficients per section G.1.2.2, fig. G.3 */ + + r = 0; /* r = run length of zeros */ + + for (k = cinfo->Ss; k <= Se; k++) { + if ((temp = (*block)[jpeg_natural_order[k]]) == 0) { + r++; + continue; + } + /* We must apply the point transform by Al. For AC coefficients this + * is an integer division with rounding towards 0. To do this portably + * in C, we shift after obtaining the absolute value; so the code is + * interwoven with finding the abs value (temp) and output bits (temp2). + */ + if (temp < 0) { + temp = -temp; /* temp is abs value of input */ + temp >>= Al; /* apply the point transform */ + /* For a negative coef, want temp2 = bitwise complement of abs(coef) */ + temp2 = ~temp; + } else { + temp >>= Al; /* apply the point transform */ + temp2 = temp; + } + /* Watch out for case that nonzero coef is zero after point transform */ + if (temp == 0) { + r++; + continue; + } + + /* Emit any pending EOBRUN */ + if (entropy->EOBRUN > 0) + emit_eobrun(entropy); + /* if run length > 15, must emit special run-length-16 codes (0xF0) */ + while (r > 15) { + emit_symbol(entropy, entropy->ac_tbl_no, 0xF0); + r -= 16; + } + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 1; /* there must be at least one 1 bit */ + while ((temp >>= 1)) + nbits++; + /* Check for out-of-range coefficient values */ + if (nbits > MAX_COEF_BITS) + ERREXIT(cinfo, JERR_BAD_DCT_COEF); + + /* Count/emit Huffman symbol for run length / number of bits */ + emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + nbits); + + /* Emit that number of bits of the value, if positive, */ + /* or the complement of its magnitude, if negative. */ + emit_bits(entropy, (unsigned int) temp2, nbits); + + r = 0; /* reset zero run length */ + } + + if (r > 0) { /* If there are trailing zeroes, */ + entropy->EOBRUN++; /* count an EOB */ + if (entropy->EOBRUN == 0x7FFF) + emit_eobrun(entropy); /* force it out to avoid overflow */ + } + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* + * MCU encoding for DC successive approximation refinement scan. + * Note: we assume such scans can be multi-component, although the spec + * is not very clear on the point. + */ + +METHODDEF(boolean) +encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + register int temp; + int blkn; + int Al = cinfo->Al; + JBLOCKROW block; + + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) + if (entropy->restarts_to_go == 0) + emit_restart(entropy, entropy->next_restart_num); + + /* Encode the MCU data blocks */ + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + block = MCU_data[blkn]; + + /* We simply emit the Al'th bit of the DC coefficient value. */ + temp = (*block)[0]; + emit_bits(entropy, (unsigned int) (temp >> Al), 1); + } + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* + * MCU encoding for AC successive approximation refinement scan. + */ + +METHODDEF(boolean) +encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + register int temp; + register int r, k; + int EOB; + char *BR_buffer; + unsigned int BR; + int Se = cinfo->Se; + int Al = cinfo->Al; + JBLOCKROW block; + int absvalues[DCTSIZE2]; + + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) + if (entropy->restarts_to_go == 0) + emit_restart(entropy, entropy->next_restart_num); + + /* Encode the MCU data block */ + block = MCU_data[0]; + + /* It is convenient to make a pre-pass to determine the transformed + * coefficients' absolute values and the EOB position. + */ + EOB = 0; + for (k = cinfo->Ss; k <= Se; k++) { + temp = (*block)[jpeg_natural_order[k]]; + /* We must apply the point transform by Al. For AC coefficients this + * is an integer division with rounding towards 0. To do this portably + * in C, we shift after obtaining the absolute value. + */ + if (temp < 0) + temp = -temp; /* temp is abs value of input */ + temp >>= Al; /* apply the point transform */ + absvalues[k] = temp; /* save abs value for main pass */ + if (temp == 1) + EOB = k; /* EOB = index of last newly-nonzero coef */ + } + + /* Encode the AC coefficients per section G.1.2.3, fig. G.7 */ + + r = 0; /* r = run length of zeros */ + BR = 0; /* BR = count of buffered bits added now */ + BR_buffer = entropy->bit_buffer + entropy->BE; /* Append bits to buffer */ + + for (k = cinfo->Ss; k <= Se; k++) { + if ((temp = absvalues[k]) == 0) { + r++; + continue; + } + + /* Emit any required ZRLs, but not if they can be folded into EOB */ + while (r > 15 && k <= EOB) { + /* emit any pending EOBRUN and the BE correction bits */ + emit_eobrun(entropy); + /* Emit ZRL */ + emit_symbol(entropy, entropy->ac_tbl_no, 0xF0); + r -= 16; + /* Emit buffered correction bits that must be associated with ZRL */ + emit_buffered_bits(entropy, BR_buffer, BR); + BR_buffer = entropy->bit_buffer; /* BE bits are gone now */ + BR = 0; + } + + /* If the coef was previously nonzero, it only needs a correction bit. + * NOTE: a straight translation of the spec's figure G.7 would suggest + * that we also need to test r > 15. But if r > 15, we can only get here + * if k > EOB, which implies that this coefficient is not 1. + */ + if (temp > 1) { + /* The correction bit is the next bit of the absolute value. */ + BR_buffer[BR++] = (char) (temp & 1); + continue; + } + + /* Emit any pending EOBRUN and the BE correction bits */ + emit_eobrun(entropy); + + /* Count/emit Huffman symbol for run length / number of bits */ + emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + 1); + + /* Emit output bit for newly-nonzero coef */ + temp = ((*block)[jpeg_natural_order[k]] < 0) ? 0 : 1; + emit_bits(entropy, (unsigned int) temp, 1); + + /* Emit buffered correction bits that must be associated with this code */ + emit_buffered_bits(entropy, BR_buffer, BR); + BR_buffer = entropy->bit_buffer; /* BE bits are gone now */ + BR = 0; + r = 0; /* reset zero run length */ + } + + if (r > 0 || BR > 0) { /* If there are trailing zeroes, */ + entropy->EOBRUN++; /* count an EOB */ + entropy->BE += BR; /* concat my correction bits to older ones */ + /* We force out the EOB if we risk either: + * 1. overflow of the EOB counter; + * 2. overflow of the correction bit buffer during the next MCU. + */ + if (entropy->EOBRUN == 0x7FFF || entropy->BE > (MAX_CORR_BITS-DCTSIZE2+1)) + emit_eobrun(entropy); + } + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* + * Finish up at the end of a Huffman-compressed progressive scan. + */ + +METHODDEF(void) +finish_pass_phuff (j_compress_ptr cinfo) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Flush out any buffered data */ + emit_eobrun(entropy); + flush_bits(entropy); + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; +} + + +/* + * Finish up a statistics-gathering pass and create the new Huffman tables. + */ + +METHODDEF(void) +finish_pass_gather_phuff (j_compress_ptr cinfo) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + boolean is_DC_band; + int ci, tbl; + jpeg_component_info * compptr; + JHUFF_TBL **htblptr; + boolean did[NUM_HUFF_TBLS]; + + /* Flush out buffered data (all we care about is counting the EOB symbol) */ + emit_eobrun(entropy); + + is_DC_band = (cinfo->Ss == 0); + + /* It's important not to apply jpeg_gen_optimal_table more than once + * per table, because it clobbers the input frequency counts! + */ + MEMZERO(did, SIZEOF(did)); + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + if (is_DC_band) { + if (cinfo->Ah != 0) /* DC refinement needs no table */ + continue; + tbl = compptr->dc_tbl_no; + } else { + tbl = compptr->ac_tbl_no; + } + if (! did[tbl]) { + if (is_DC_band) + htblptr = & cinfo->dc_huff_tbl_ptrs[tbl]; + else + htblptr = & cinfo->ac_huff_tbl_ptrs[tbl]; + if (*htblptr == NULL) + *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); + jpeg_gen_optimal_table(cinfo, *htblptr, entropy->count_ptrs[tbl]); + did[tbl] = TRUE; + } + } +} + + +/* + * Module initialization routine for progressive Huffman entropy encoding. + */ + +GLOBAL(void) +jinit_phuff_encoder (j_compress_ptr cinfo) +{ + phuff_entropy_ptr entropy; + int i; + + entropy = (phuff_entropy_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(phuff_entropy_encoder)); + cinfo->entropy = (struct jpeg_entropy_encoder *) entropy; + entropy->pub.start_pass = start_pass_phuff; + + /* Mark tables unallocated */ + for (i = 0; i < NUM_HUFF_TBLS; i++) { + entropy->derived_tbls[i] = NULL; + entropy->count_ptrs[i] = NULL; + } + entropy->bit_buffer = NULL; /* needed only in AC refinement scan */ +} + +#endif /* C_PROGRESSIVE_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/jcprepct.c b/gtkmm-osx/jpeg-6b/jcprepct.c new file mode 100644 index 0000000..fa93333 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jcprepct.c @@ -0,0 +1,354 @@ +/* + * jcprepct.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the compression preprocessing controller. + * This controller manages the color conversion, downsampling, + * and edge expansion steps. + * + * Most of the complexity here is associated with buffering input rows + * as required by the downsampler. See the comments at the head of + * jcsample.c for the downsampler's needs. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* At present, jcsample.c can request context rows only for smoothing. + * In the future, we might also need context rows for CCIR601 sampling + * or other more-complex downsampling procedures. The code to support + * context rows should be compiled only if needed. + */ +#ifdef INPUT_SMOOTHING_SUPPORTED +#define CONTEXT_ROWS_SUPPORTED +#endif + + +/* + * For the simple (no-context-row) case, we just need to buffer one + * row group's worth of pixels for the downsampling step. At the bottom of + * the image, we pad to a full row group by replicating the last pixel row. + * The downsampler's last output row is then replicated if needed to pad + * out to a full iMCU row. + * + * When providing context rows, we must buffer three row groups' worth of + * pixels. Three row groups are physically allocated, but the row pointer + * arrays are made five row groups high, with the extra pointers above and + * below "wrapping around" to point to the last and first real row groups. + * This allows the downsampler to access the proper context rows. + * At the top and bottom of the image, we create dummy context rows by + * copying the first or last real pixel row. This copying could be avoided + * by pointer hacking as is done in jdmainct.c, but it doesn't seem worth the + * trouble on the compression side. + */ + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_c_prep_controller pub; /* public fields */ + + /* Downsampling input buffer. This buffer holds color-converted data + * until we have enough to do a downsample step. + */ + JSAMPARRAY color_buf[MAX_COMPONENTS]; + + JDIMENSION rows_to_go; /* counts rows remaining in source image */ + int next_buf_row; /* index of next row to store in color_buf */ + +#ifdef CONTEXT_ROWS_SUPPORTED /* only needed for context case */ + int this_row_group; /* starting row index of group to process */ + int next_buf_stop; /* downsample when we reach this index */ +#endif +} my_prep_controller; + +typedef my_prep_controller * my_prep_ptr; + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_prep (j_compress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_prep_ptr prep = (my_prep_ptr) cinfo->prep; + + if (pass_mode != JBUF_PASS_THRU) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + + /* Initialize total-height counter for detecting bottom of image */ + prep->rows_to_go = cinfo->image_height; + /* Mark the conversion buffer empty */ + prep->next_buf_row = 0; +#ifdef CONTEXT_ROWS_SUPPORTED + /* Preset additional state variables for context mode. + * These aren't used in non-context mode, so we needn't test which mode. + */ + prep->this_row_group = 0; + /* Set next_buf_stop to stop after two row groups have been read in. */ + prep->next_buf_stop = 2 * cinfo->max_v_samp_factor; +#endif +} + + +/* + * Expand an image vertically from height input_rows to height output_rows, + * by duplicating the bottom row. + */ + +LOCAL(void) +expand_bottom_edge (JSAMPARRAY image_data, JDIMENSION num_cols, + int input_rows, int output_rows) +{ + register int row; + + for (row = input_rows; row < output_rows; row++) { + jcopy_sample_rows(image_data, input_rows-1, image_data, row, + 1, num_cols); + } +} + + +/* + * Process some data in the simple no-context case. + * + * Preprocessor output data is counted in "row groups". A row group + * is defined to be v_samp_factor sample rows of each component. + * Downsampling will produce this much data from each max_v_samp_factor + * input rows. + */ + +METHODDEF(void) +pre_process_data (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail, + JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr, + JDIMENSION out_row_groups_avail) +{ + my_prep_ptr prep = (my_prep_ptr) cinfo->prep; + int numrows, ci; + JDIMENSION inrows; + jpeg_component_info * compptr; + + while (*in_row_ctr < in_rows_avail && + *out_row_group_ctr < out_row_groups_avail) { + /* Do color conversion to fill the conversion buffer. */ + inrows = in_rows_avail - *in_row_ctr; + numrows = cinfo->max_v_samp_factor - prep->next_buf_row; + numrows = (int) MIN((JDIMENSION) numrows, inrows); + (*cinfo->cconvert->color_convert) (cinfo, input_buf + *in_row_ctr, + prep->color_buf, + (JDIMENSION) prep->next_buf_row, + numrows); + *in_row_ctr += numrows; + prep->next_buf_row += numrows; + prep->rows_to_go -= numrows; + /* If at bottom of image, pad to fill the conversion buffer. */ + if (prep->rows_to_go == 0 && + prep->next_buf_row < cinfo->max_v_samp_factor) { + for (ci = 0; ci < cinfo->num_components; ci++) { + expand_bottom_edge(prep->color_buf[ci], cinfo->image_width, + prep->next_buf_row, cinfo->max_v_samp_factor); + } + prep->next_buf_row = cinfo->max_v_samp_factor; + } + /* If we've filled the conversion buffer, empty it. */ + if (prep->next_buf_row == cinfo->max_v_samp_factor) { + (*cinfo->downsample->downsample) (cinfo, + prep->color_buf, (JDIMENSION) 0, + output_buf, *out_row_group_ctr); + prep->next_buf_row = 0; + (*out_row_group_ctr)++; + } + /* If at bottom of image, pad the output to a full iMCU height. + * Note we assume the caller is providing a one-iMCU-height output buffer! + */ + if (prep->rows_to_go == 0 && + *out_row_group_ctr < out_row_groups_avail) { + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + expand_bottom_edge(output_buf[ci], + compptr->width_in_blocks * DCTSIZE, + (int) (*out_row_group_ctr * compptr->v_samp_factor), + (int) (out_row_groups_avail * compptr->v_samp_factor)); + } + *out_row_group_ctr = out_row_groups_avail; + break; /* can exit outer loop without test */ + } + } +} + + +#ifdef CONTEXT_ROWS_SUPPORTED + +/* + * Process some data in the context case. + */ + +METHODDEF(void) +pre_process_context (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail, + JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr, + JDIMENSION out_row_groups_avail) +{ + my_prep_ptr prep = (my_prep_ptr) cinfo->prep; + int numrows, ci; + int buf_height = cinfo->max_v_samp_factor * 3; + JDIMENSION inrows; + + while (*out_row_group_ctr < out_row_groups_avail) { + if (*in_row_ctr < in_rows_avail) { + /* Do color conversion to fill the conversion buffer. */ + inrows = in_rows_avail - *in_row_ctr; + numrows = prep->next_buf_stop - prep->next_buf_row; + numrows = (int) MIN((JDIMENSION) numrows, inrows); + (*cinfo->cconvert->color_convert) (cinfo, input_buf + *in_row_ctr, + prep->color_buf, + (JDIMENSION) prep->next_buf_row, + numrows); + /* Pad at top of image, if first time through */ + if (prep->rows_to_go == cinfo->image_height) { + for (ci = 0; ci < cinfo->num_components; ci++) { + int row; + for (row = 1; row <= cinfo->max_v_samp_factor; row++) { + jcopy_sample_rows(prep->color_buf[ci], 0, + prep->color_buf[ci], -row, + 1, cinfo->image_width); + } + } + } + *in_row_ctr += numrows; + prep->next_buf_row += numrows; + prep->rows_to_go -= numrows; + } else { + /* Return for more data, unless we are at the bottom of the image. */ + if (prep->rows_to_go != 0) + break; + /* When at bottom of image, pad to fill the conversion buffer. */ + if (prep->next_buf_row < prep->next_buf_stop) { + for (ci = 0; ci < cinfo->num_components; ci++) { + expand_bottom_edge(prep->color_buf[ci], cinfo->image_width, + prep->next_buf_row, prep->next_buf_stop); + } + prep->next_buf_row = prep->next_buf_stop; + } + } + /* If we've gotten enough data, downsample a row group. */ + if (prep->next_buf_row == prep->next_buf_stop) { + (*cinfo->downsample->downsample) (cinfo, + prep->color_buf, + (JDIMENSION) prep->this_row_group, + output_buf, *out_row_group_ctr); + (*out_row_group_ctr)++; + /* Advance pointers with wraparound as necessary. */ + prep->this_row_group += cinfo->max_v_samp_factor; + if (prep->this_row_group >= buf_height) + prep->this_row_group = 0; + if (prep->next_buf_row >= buf_height) + prep->next_buf_row = 0; + prep->next_buf_stop = prep->next_buf_row + cinfo->max_v_samp_factor; + } + } +} + + +/* + * Create the wrapped-around downsampling input buffer needed for context mode. + */ + +LOCAL(void) +create_context_buffer (j_compress_ptr cinfo) +{ + my_prep_ptr prep = (my_prep_ptr) cinfo->prep; + int rgroup_height = cinfo->max_v_samp_factor; + int ci, i; + jpeg_component_info * compptr; + JSAMPARRAY true_buffer, fake_buffer; + + /* Grab enough space for fake row pointers for all the components; + * we need five row groups' worth of pointers for each component. + */ + fake_buffer = (JSAMPARRAY) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (cinfo->num_components * 5 * rgroup_height) * + SIZEOF(JSAMPROW)); + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Allocate the actual buffer space (3 row groups) for this component. + * We make the buffer wide enough to allow the downsampler to edge-expand + * horizontally within the buffer, if it so chooses. + */ + true_buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) (((long) compptr->width_in_blocks * DCTSIZE * + cinfo->max_h_samp_factor) / compptr->h_samp_factor), + (JDIMENSION) (3 * rgroup_height)); + /* Copy true buffer row pointers into the middle of the fake row array */ + MEMCOPY(fake_buffer + rgroup_height, true_buffer, + 3 * rgroup_height * SIZEOF(JSAMPROW)); + /* Fill in the above and below wraparound pointers */ + for (i = 0; i < rgroup_height; i++) { + fake_buffer[i] = true_buffer[2 * rgroup_height + i]; + fake_buffer[4 * rgroup_height + i] = true_buffer[i]; + } + prep->color_buf[ci] = fake_buffer + rgroup_height; + fake_buffer += 5 * rgroup_height; /* point to space for next component */ + } +} + +#endif /* CONTEXT_ROWS_SUPPORTED */ + + +/* + * Initialize preprocessing controller. + */ + +GLOBAL(void) +jinit_c_prep_controller (j_compress_ptr cinfo, boolean need_full_buffer) +{ + my_prep_ptr prep; + int ci; + jpeg_component_info * compptr; + + if (need_full_buffer) /* safety check */ + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + + prep = (my_prep_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_prep_controller)); + cinfo->prep = (struct jpeg_c_prep_controller *) prep; + prep->pub.start_pass = start_pass_prep; + + /* Allocate the color conversion buffer. + * We make the buffer wide enough to allow the downsampler to edge-expand + * horizontally within the buffer, if it so chooses. + */ + if (cinfo->downsample->need_context_rows) { + /* Set up to provide context rows */ +#ifdef CONTEXT_ROWS_SUPPORTED + prep->pub.pre_process_data = pre_process_context; + create_context_buffer(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + /* No context, just make it tall enough for one row group */ + prep->pub.pre_process_data = pre_process_data; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + prep->color_buf[ci] = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) (((long) compptr->width_in_blocks * DCTSIZE * + cinfo->max_h_samp_factor) / compptr->h_samp_factor), + (JDIMENSION) cinfo->max_v_samp_factor); + } + } +} diff --git a/gtkmm-osx/jpeg-6b/jcsample.c b/gtkmm-osx/jpeg-6b/jcsample.c new file mode 100644 index 0000000..212ec87 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jcsample.c @@ -0,0 +1,519 @@ +/* + * jcsample.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains downsampling routines. + * + * Downsampling input data is counted in "row groups". A row group + * is defined to be max_v_samp_factor pixel rows of each component, + * from which the downsampler produces v_samp_factor sample rows. + * A single row group is processed in each call to the downsampler module. + * + * The downsampler is responsible for edge-expansion of its output data + * to fill an integral number of DCT blocks horizontally. The source buffer + * may be modified if it is helpful for this purpose (the source buffer is + * allocated wide enough to correspond to the desired output width). + * The caller (the prep controller) is responsible for vertical padding. + * + * The downsampler may request "context rows" by setting need_context_rows + * during startup. In this case, the input arrays will contain at least + * one row group's worth of pixels above and below the passed-in data; + * the caller will create dummy rows at image top and bottom by replicating + * the first or last real pixel row. + * + * An excellent reference for image resampling is + * Digital Image Warping, George Wolberg, 1990. + * Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7. + * + * The downsampling algorithm used here is a simple average of the source + * pixels covered by the output pixel. The hi-falutin sampling literature + * refers to this as a "box filter". In general the characteristics of a box + * filter are not very good, but for the specific cases we normally use (1:1 + * and 2:1 ratios) the box is equivalent to a "triangle filter" which is not + * nearly so bad. If you intend to use other sampling ratios, you'd be well + * advised to improve this code. + * + * A simple input-smoothing capability is provided. This is mainly intended + * for cleaning up color-dithered GIF input files (if you find it inadequate, + * we suggest using an external filtering program such as pnmconvol). When + * enabled, each input pixel P is replaced by a weighted sum of itself and its + * eight neighbors. P's weight is 1-8*SF and each neighbor's weight is SF, + * where SF = (smoothing_factor / 1024). + * Currently, smoothing is only supported for 2h2v sampling factors. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Pointer to routine to downsample a single component */ +typedef JMETHOD(void, downsample1_ptr, + (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data)); + +/* Private subobject */ + +typedef struct { + struct jpeg_downsampler pub; /* public fields */ + + /* Downsampling method pointers, one per component */ + downsample1_ptr methods[MAX_COMPONENTS]; +} my_downsampler; + +typedef my_downsampler * my_downsample_ptr; + + +/* + * Initialize for a downsampling pass. + */ + +METHODDEF(void) +start_pass_downsample (j_compress_ptr cinfo) +{ + /* no work for now */ +} + + +/* + * Expand a component horizontally from width input_cols to width output_cols, + * by duplicating the rightmost samples. + */ + +LOCAL(void) +expand_right_edge (JSAMPARRAY image_data, int num_rows, + JDIMENSION input_cols, JDIMENSION output_cols) +{ + register JSAMPROW ptr; + register JSAMPLE pixval; + register int count; + int row; + int numcols = (int) (output_cols - input_cols); + + if (numcols > 0) { + for (row = 0; row < num_rows; row++) { + ptr = image_data[row] + input_cols; + pixval = ptr[-1]; /* don't need GETJSAMPLE() here */ + for (count = numcols; count > 0; count--) + *ptr++ = pixval; + } + } +} + + +/* + * Do downsampling for a whole row group (all components). + * + * In this version we simply downsample each component independently. + */ + +METHODDEF(void) +sep_downsample (j_compress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_index, + JSAMPIMAGE output_buf, JDIMENSION out_row_group_index) +{ + my_downsample_ptr downsample = (my_downsample_ptr) cinfo->downsample; + int ci; + jpeg_component_info * compptr; + JSAMPARRAY in_ptr, out_ptr; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + in_ptr = input_buf[ci] + in_row_index; + out_ptr = output_buf[ci] + (out_row_group_index * compptr->v_samp_factor); + (*downsample->methods[ci]) (cinfo, compptr, in_ptr, out_ptr); + } +} + + +/* + * Downsample pixel values of a single component. + * One row group is processed per call. + * This version handles arbitrary integral sampling ratios, without smoothing. + * Note that this version is not actually used for customary sampling ratios. + */ + +METHODDEF(void) +int_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + int inrow, outrow, h_expand, v_expand, numpix, numpix2, h, v; + JDIMENSION outcol, outcol_h; /* outcol_h == outcol*h_expand */ + JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; + JSAMPROW inptr, outptr; + INT32 outvalue; + + h_expand = cinfo->max_h_samp_factor / compptr->h_samp_factor; + v_expand = cinfo->max_v_samp_factor / compptr->v_samp_factor; + numpix = h_expand * v_expand; + numpix2 = numpix/2; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data, cinfo->max_v_samp_factor, + cinfo->image_width, output_cols * h_expand); + + inrow = 0; + for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { + outptr = output_data[outrow]; + for (outcol = 0, outcol_h = 0; outcol < output_cols; + outcol++, outcol_h += h_expand) { + outvalue = 0; + for (v = 0; v < v_expand; v++) { + inptr = input_data[inrow+v] + outcol_h; + for (h = 0; h < h_expand; h++) { + outvalue += (INT32) GETJSAMPLE(*inptr++); + } + } + *outptr++ = (JSAMPLE) ((outvalue + numpix2) / numpix); + } + inrow += v_expand; + } +} + + +/* + * Downsample pixel values of a single component. + * This version handles the special case of a full-size component, + * without smoothing. + */ + +METHODDEF(void) +fullsize_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + /* Copy the data */ + jcopy_sample_rows(input_data, 0, output_data, 0, + cinfo->max_v_samp_factor, cinfo->image_width); + /* Edge-expand */ + expand_right_edge(output_data, cinfo->max_v_samp_factor, + cinfo->image_width, compptr->width_in_blocks * DCTSIZE); +} + + +/* + * Downsample pixel values of a single component. + * This version handles the common case of 2:1 horizontal and 1:1 vertical, + * without smoothing. + * + * A note about the "bias" calculations: when rounding fractional values to + * integer, we do not want to always round 0.5 up to the next integer. + * If we did that, we'd introduce a noticeable bias towards larger values. + * Instead, this code is arranged so that 0.5 will be rounded up or down at + * alternate pixel locations (a simple ordered dither pattern). + */ + +METHODDEF(void) +h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + int outrow; + JDIMENSION outcol; + JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; + register JSAMPROW inptr, outptr; + register int bias; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data, cinfo->max_v_samp_factor, + cinfo->image_width, output_cols * 2); + + for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { + outptr = output_data[outrow]; + inptr = input_data[outrow]; + bias = 0; /* bias = 0,1,0,1,... for successive samples */ + for (outcol = 0; outcol < output_cols; outcol++) { + *outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr) + GETJSAMPLE(inptr[1]) + + bias) >> 1); + bias ^= 1; /* 0=>1, 1=>0 */ + inptr += 2; + } + } +} + + +/* + * Downsample pixel values of a single component. + * This version handles the standard case of 2:1 horizontal and 2:1 vertical, + * without smoothing. + */ + +METHODDEF(void) +h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + int inrow, outrow; + JDIMENSION outcol; + JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; + register JSAMPROW inptr0, inptr1, outptr; + register int bias; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data, cinfo->max_v_samp_factor, + cinfo->image_width, output_cols * 2); + + inrow = 0; + for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { + outptr = output_data[outrow]; + inptr0 = input_data[inrow]; + inptr1 = input_data[inrow+1]; + bias = 1; /* bias = 1,2,1,2,... for successive samples */ + for (outcol = 0; outcol < output_cols; outcol++) { + *outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]) + + bias) >> 2); + bias ^= 3; /* 1=>2, 2=>1 */ + inptr0 += 2; inptr1 += 2; + } + inrow += 2; + } +} + + +#ifdef INPUT_SMOOTHING_SUPPORTED + +/* + * Downsample pixel values of a single component. + * This version handles the standard case of 2:1 horizontal and 2:1 vertical, + * with smoothing. One row of context is required. + */ + +METHODDEF(void) +h2v2_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + int inrow, outrow; + JDIMENSION colctr; + JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; + register JSAMPROW inptr0, inptr1, above_ptr, below_ptr, outptr; + INT32 membersum, neighsum, memberscale, neighscale; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data - 1, cinfo->max_v_samp_factor + 2, + cinfo->image_width, output_cols * 2); + + /* We don't bother to form the individual "smoothed" input pixel values; + * we can directly compute the output which is the average of the four + * smoothed values. Each of the four member pixels contributes a fraction + * (1-8*SF) to its own smoothed image and a fraction SF to each of the three + * other smoothed pixels, therefore a total fraction (1-5*SF)/4 to the final + * output. The four corner-adjacent neighbor pixels contribute a fraction + * SF to just one smoothed pixel, or SF/4 to the final output; while the + * eight edge-adjacent neighbors contribute SF to each of two smoothed + * pixels, or SF/2 overall. In order to use integer arithmetic, these + * factors are scaled by 2^16 = 65536. + * Also recall that SF = smoothing_factor / 1024. + */ + + memberscale = 16384 - cinfo->smoothing_factor * 80; /* scaled (1-5*SF)/4 */ + neighscale = cinfo->smoothing_factor * 16; /* scaled SF/4 */ + + inrow = 0; + for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { + outptr = output_data[outrow]; + inptr0 = input_data[inrow]; + inptr1 = input_data[inrow+1]; + above_ptr = input_data[inrow-1]; + below_ptr = input_data[inrow+2]; + + /* Special case for first column: pretend column -1 is same as column 0 */ + membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]); + neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) + + GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) + + GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[2]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[2]); + neighsum += neighsum; + neighsum += GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[2]) + + GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[2]); + membersum = membersum * memberscale + neighsum * neighscale; + *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); + inptr0 += 2; inptr1 += 2; above_ptr += 2; below_ptr += 2; + + for (colctr = output_cols - 2; colctr > 0; colctr--) { + /* sum of pixels directly mapped to this output element */ + membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]); + /* sum of edge-neighbor pixels */ + neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) + + GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) + + GETJSAMPLE(inptr0[-1]) + GETJSAMPLE(inptr0[2]) + + GETJSAMPLE(inptr1[-1]) + GETJSAMPLE(inptr1[2]); + /* The edge-neighbors count twice as much as corner-neighbors */ + neighsum += neighsum; + /* Add in the corner-neighbors */ + neighsum += GETJSAMPLE(above_ptr[-1]) + GETJSAMPLE(above_ptr[2]) + + GETJSAMPLE(below_ptr[-1]) + GETJSAMPLE(below_ptr[2]); + /* form final output scaled up by 2^16 */ + membersum = membersum * memberscale + neighsum * neighscale; + /* round, descale and output it */ + *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); + inptr0 += 2; inptr1 += 2; above_ptr += 2; below_ptr += 2; + } + + /* Special case for last column */ + membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]); + neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) + + GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) + + GETJSAMPLE(inptr0[-1]) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(inptr1[-1]) + GETJSAMPLE(inptr1[1]); + neighsum += neighsum; + neighsum += GETJSAMPLE(above_ptr[-1]) + GETJSAMPLE(above_ptr[1]) + + GETJSAMPLE(below_ptr[-1]) + GETJSAMPLE(below_ptr[1]); + membersum = membersum * memberscale + neighsum * neighscale; + *outptr = (JSAMPLE) ((membersum + 32768) >> 16); + + inrow += 2; + } +} + + +/* + * Downsample pixel values of a single component. + * This version handles the special case of a full-size component, + * with smoothing. One row of context is required. + */ + +METHODDEF(void) +fullsize_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info *compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + int outrow; + JDIMENSION colctr; + JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; + register JSAMPROW inptr, above_ptr, below_ptr, outptr; + INT32 membersum, neighsum, memberscale, neighscale; + int colsum, lastcolsum, nextcolsum; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data - 1, cinfo->max_v_samp_factor + 2, + cinfo->image_width, output_cols); + + /* Each of the eight neighbor pixels contributes a fraction SF to the + * smoothed pixel, while the main pixel contributes (1-8*SF). In order + * to use integer arithmetic, these factors are multiplied by 2^16 = 65536. + * Also recall that SF = smoothing_factor / 1024. + */ + + memberscale = 65536L - cinfo->smoothing_factor * 512L; /* scaled 1-8*SF */ + neighscale = cinfo->smoothing_factor * 64; /* scaled SF */ + + for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { + outptr = output_data[outrow]; + inptr = input_data[outrow]; + above_ptr = input_data[outrow-1]; + below_ptr = input_data[outrow+1]; + + /* Special case for first column */ + colsum = GETJSAMPLE(*above_ptr++) + GETJSAMPLE(*below_ptr++) + + GETJSAMPLE(*inptr); + membersum = GETJSAMPLE(*inptr++); + nextcolsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(*below_ptr) + + GETJSAMPLE(*inptr); + neighsum = colsum + (colsum - membersum) + nextcolsum; + membersum = membersum * memberscale + neighsum * neighscale; + *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); + lastcolsum = colsum; colsum = nextcolsum; + + for (colctr = output_cols - 2; colctr > 0; colctr--) { + membersum = GETJSAMPLE(*inptr++); + above_ptr++; below_ptr++; + nextcolsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(*below_ptr) + + GETJSAMPLE(*inptr); + neighsum = lastcolsum + (colsum - membersum) + nextcolsum; + membersum = membersum * memberscale + neighsum * neighscale; + *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); + lastcolsum = colsum; colsum = nextcolsum; + } + + /* Special case for last column */ + membersum = GETJSAMPLE(*inptr); + neighsum = lastcolsum + (colsum - membersum) + colsum; + membersum = membersum * memberscale + neighsum * neighscale; + *outptr = (JSAMPLE) ((membersum + 32768) >> 16); + + } +} + +#endif /* INPUT_SMOOTHING_SUPPORTED */ + + +/* + * Module initialization routine for downsampling. + * Note that we must select a routine for each component. + */ + +GLOBAL(void) +jinit_downsampler (j_compress_ptr cinfo) +{ + my_downsample_ptr downsample; + int ci; + jpeg_component_info * compptr; + boolean smoothok = TRUE; + + downsample = (my_downsample_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_downsampler)); + cinfo->downsample = (struct jpeg_downsampler *) downsample; + downsample->pub.start_pass = start_pass_downsample; + downsample->pub.downsample = sep_downsample; + downsample->pub.need_context_rows = FALSE; + + if (cinfo->CCIR601_sampling) + ERREXIT(cinfo, JERR_CCIR601_NOTIMPL); + + /* Verify we can handle the sampling factors, and set up method pointers */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (compptr->h_samp_factor == cinfo->max_h_samp_factor && + compptr->v_samp_factor == cinfo->max_v_samp_factor) { +#ifdef INPUT_SMOOTHING_SUPPORTED + if (cinfo->smoothing_factor) { + downsample->methods[ci] = fullsize_smooth_downsample; + downsample->pub.need_context_rows = TRUE; + } else +#endif + downsample->methods[ci] = fullsize_downsample; + } else if (compptr->h_samp_factor * 2 == cinfo->max_h_samp_factor && + compptr->v_samp_factor == cinfo->max_v_samp_factor) { + smoothok = FALSE; + downsample->methods[ci] = h2v1_downsample; + } else if (compptr->h_samp_factor * 2 == cinfo->max_h_samp_factor && + compptr->v_samp_factor * 2 == cinfo->max_v_samp_factor) { +#ifdef INPUT_SMOOTHING_SUPPORTED + if (cinfo->smoothing_factor) { + downsample->methods[ci] = h2v2_smooth_downsample; + downsample->pub.need_context_rows = TRUE; + } else +#endif + downsample->methods[ci] = h2v2_downsample; + } else if ((cinfo->max_h_samp_factor % compptr->h_samp_factor) == 0 && + (cinfo->max_v_samp_factor % compptr->v_samp_factor) == 0) { + smoothok = FALSE; + downsample->methods[ci] = int_downsample; + } else + ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL); + } + +#ifdef INPUT_SMOOTHING_SUPPORTED + if (cinfo->smoothing_factor && !smoothok) + TRACEMS(cinfo, 0, JTRC_SMOOTH_NOTIMPL); +#endif +} diff --git a/gtkmm-osx/jpeg-6b/jctrans.c b/gtkmm-osx/jpeg-6b/jctrans.c new file mode 100644 index 0000000..0e6d707 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jctrans.c @@ -0,0 +1,388 @@ +/* + * jctrans.c + * + * Copyright (C) 1995-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains library routines for transcoding compression, + * that is, writing raw DCT coefficient arrays to an output JPEG file. + * The routines in jcapimin.c will also be needed by a transcoder. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Forward declarations */ +LOCAL(void) transencode_master_selection + JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)); +LOCAL(void) transencode_coef_controller + JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)); + + +/* + * Compression initialization for writing raw-coefficient data. + * Before calling this, all parameters and a data destination must be set up. + * Call jpeg_finish_compress() to actually write the data. + * + * The number of passed virtual arrays must match cinfo->num_components. + * Note that the virtual arrays need not be filled or even realized at + * the time write_coefficients is called; indeed, if the virtual arrays + * were requested from this compression object's memory manager, they + * typically will be realized during this routine and filled afterwards. + */ + +GLOBAL(void) +jpeg_write_coefficients (j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays) +{ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + /* Mark all tables to be written */ + jpeg_suppress_tables(cinfo, FALSE); + /* (Re)initialize error mgr and destination modules */ + (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); + (*cinfo->dest->init_destination) (cinfo); + /* Perform master selection of active modules */ + transencode_master_selection(cinfo, coef_arrays); + /* Wait for jpeg_finish_compress() call */ + cinfo->next_scanline = 0; /* so jpeg_write_marker works */ + cinfo->global_state = CSTATE_WRCOEFS; +} + + +/* + * Initialize the compression object with default parameters, + * then copy from the source object all parameters needed for lossless + * transcoding. Parameters that can be varied without loss (such as + * scan script and Huffman optimization) are left in their default states. + */ + +GLOBAL(void) +jpeg_copy_critical_parameters (j_decompress_ptr srcinfo, + j_compress_ptr dstinfo) +{ + JQUANT_TBL ** qtblptr; + jpeg_component_info *incomp, *outcomp; + JQUANT_TBL *c_quant, *slot_quant; + int tblno, ci, coefi; + + /* Safety check to ensure start_compress not called yet. */ + if (dstinfo->global_state != CSTATE_START) + ERREXIT1(dstinfo, JERR_BAD_STATE, dstinfo->global_state); + /* Copy fundamental image dimensions */ + dstinfo->image_width = srcinfo->image_width; + dstinfo->image_height = srcinfo->image_height; + dstinfo->input_components = srcinfo->num_components; + dstinfo->in_color_space = srcinfo->jpeg_color_space; + /* Initialize all parameters to default values */ + jpeg_set_defaults(dstinfo); + /* jpeg_set_defaults may choose wrong colorspace, eg YCbCr if input is RGB. + * Fix it to get the right header markers for the image colorspace. + */ + jpeg_set_colorspace(dstinfo, srcinfo->jpeg_color_space); + dstinfo->data_precision = srcinfo->data_precision; + dstinfo->CCIR601_sampling = srcinfo->CCIR601_sampling; + /* Copy the source's quantization tables. */ + for (tblno = 0; tblno < NUM_QUANT_TBLS; tblno++) { + if (srcinfo->quant_tbl_ptrs[tblno] != NULL) { + qtblptr = & dstinfo->quant_tbl_ptrs[tblno]; + if (*qtblptr == NULL) + *qtblptr = jpeg_alloc_quant_table((j_common_ptr) dstinfo); + MEMCOPY((*qtblptr)->quantval, + srcinfo->quant_tbl_ptrs[tblno]->quantval, + SIZEOF((*qtblptr)->quantval)); + (*qtblptr)->sent_table = FALSE; + } + } + /* Copy the source's per-component info. + * Note we assume jpeg_set_defaults has allocated the dest comp_info array. + */ + dstinfo->num_components = srcinfo->num_components; + if (dstinfo->num_components < 1 || dstinfo->num_components > MAX_COMPONENTS) + ERREXIT2(dstinfo, JERR_COMPONENT_COUNT, dstinfo->num_components, + MAX_COMPONENTS); + for (ci = 0, incomp = srcinfo->comp_info, outcomp = dstinfo->comp_info; + ci < dstinfo->num_components; ci++, incomp++, outcomp++) { + outcomp->component_id = incomp->component_id; + outcomp->h_samp_factor = incomp->h_samp_factor; + outcomp->v_samp_factor = incomp->v_samp_factor; + outcomp->quant_tbl_no = incomp->quant_tbl_no; + /* Make sure saved quantization table for component matches the qtable + * slot. If not, the input file re-used this qtable slot. + * IJG encoder currently cannot duplicate this. + */ + tblno = outcomp->quant_tbl_no; + if (tblno < 0 || tblno >= NUM_QUANT_TBLS || + srcinfo->quant_tbl_ptrs[tblno] == NULL) + ERREXIT1(dstinfo, JERR_NO_QUANT_TABLE, tblno); + slot_quant = srcinfo->quant_tbl_ptrs[tblno]; + c_quant = incomp->quant_table; + if (c_quant != NULL) { + for (coefi = 0; coefi < DCTSIZE2; coefi++) { + if (c_quant->quantval[coefi] != slot_quant->quantval[coefi]) + ERREXIT1(dstinfo, JERR_MISMATCHED_QUANT_TABLE, tblno); + } + } + /* Note: we do not copy the source's Huffman table assignments; + * instead we rely on jpeg_set_colorspace to have made a suitable choice. + */ + } + /* Also copy JFIF version and resolution information, if available. + * Strictly speaking this isn't "critical" info, but it's nearly + * always appropriate to copy it if available. In particular, + * if the application chooses to copy JFIF 1.02 extension markers from + * the source file, we need to copy the version to make sure we don't + * emit a file that has 1.02 extensions but a claimed version of 1.01. + * We will *not*, however, copy version info from mislabeled "2.01" files. + */ + if (srcinfo->saw_JFIF_marker) { + if (srcinfo->JFIF_major_version == 1) { + dstinfo->JFIF_major_version = srcinfo->JFIF_major_version; + dstinfo->JFIF_minor_version = srcinfo->JFIF_minor_version; + } + dstinfo->density_unit = srcinfo->density_unit; + dstinfo->X_density = srcinfo->X_density; + dstinfo->Y_density = srcinfo->Y_density; + } +} + + +/* + * Master selection of compression modules for transcoding. + * This substitutes for jcinit.c's initialization of the full compressor. + */ + +LOCAL(void) +transencode_master_selection (j_compress_ptr cinfo, + jvirt_barray_ptr * coef_arrays) +{ + /* Although we don't actually use input_components for transcoding, + * jcmaster.c's initial_setup will complain if input_components is 0. + */ + cinfo->input_components = 1; + /* Initialize master control (includes parameter checking/processing) */ + jinit_c_master_control(cinfo, TRUE /* transcode only */); + + /* Entropy encoding: either Huffman or arithmetic coding. */ + if (cinfo->arith_code) { + ERREXIT(cinfo, JERR_ARITH_NOTIMPL); + } else { + if (cinfo->progressive_mode) { +#ifdef C_PROGRESSIVE_SUPPORTED + jinit_phuff_encoder(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else + jinit_huff_encoder(cinfo); + } + + /* We need a special coefficient buffer controller. */ + transencode_coef_controller(cinfo, coef_arrays); + + jinit_marker_writer(cinfo); + + /* We can now tell the memory manager to allocate virtual arrays. */ + (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); + + /* Write the datastream header (SOI, JFIF) immediately. + * Frame and scan headers are postponed till later. + * This lets application insert special markers after the SOI. + */ + (*cinfo->marker->write_file_header) (cinfo); +} + + +/* + * The rest of this file is a special implementation of the coefficient + * buffer controller. This is similar to jccoefct.c, but it handles only + * output from presupplied virtual arrays. Furthermore, we generate any + * dummy padding blocks on-the-fly rather than expecting them to be present + * in the arrays. + */ + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_c_coef_controller pub; /* public fields */ + + JDIMENSION iMCU_row_num; /* iMCU row # within image */ + JDIMENSION mcu_ctr; /* counts MCUs processed in current row */ + int MCU_vert_offset; /* counts MCU rows within iMCU row */ + int MCU_rows_per_iMCU_row; /* number of such rows needed */ + + /* Virtual block array for each component. */ + jvirt_barray_ptr * whole_image; + + /* Workspace for constructing dummy blocks at right/bottom edges. */ + JBLOCKROW dummy_buffer[C_MAX_BLOCKS_IN_MCU]; +} my_coef_controller; + +typedef my_coef_controller * my_coef_ptr; + + +LOCAL(void) +start_iMCU_row (j_compress_ptr cinfo) +/* Reset within-iMCU-row counters for a new row */ +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + /* In an interleaved scan, an MCU row is the same as an iMCU row. + * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows. + * But at the bottom of the image, process only what's left. + */ + if (cinfo->comps_in_scan > 1) { + coef->MCU_rows_per_iMCU_row = 1; + } else { + if (coef->iMCU_row_num < (cinfo->total_iMCU_rows-1)) + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor; + else + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height; + } + + coef->mcu_ctr = 0; + coef->MCU_vert_offset = 0; +} + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + if (pass_mode != JBUF_CRANK_DEST) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + + coef->iMCU_row_num = 0; + start_iMCU_row(cinfo); +} + + +/* + * Process some data. + * We process the equivalent of one fully interleaved MCU row ("iMCU" row) + * per call, ie, v_samp_factor block rows for each component in the scan. + * The data is obtained from the virtual arrays and fed to the entropy coder. + * Returns TRUE if the iMCU row is completed, FALSE if suspended. + * + * NB: input_buf is ignored; it is likely to be a NULL pointer. + */ + +METHODDEF(boolean) +compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + int blkn, ci, xindex, yindex, yoffset, blockcnt; + JDIMENSION start_col; + JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN]; + JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU]; + JBLOCKROW buffer_ptr; + jpeg_component_info *compptr; + + /* Align the virtual buffers for the components used in this scan. */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + buffer[ci] = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index], + coef->iMCU_row_num * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } + + /* Loop to process one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->mcu_ctr; MCU_col_num < cinfo->MCUs_per_row; + MCU_col_num++) { + /* Construct list of pointers to DCT blocks belonging to this MCU */ + blkn = 0; /* index of current DCT block within MCU */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + start_col = MCU_col_num * compptr->MCU_width; + blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width + : compptr->last_col_width; + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + if (coef->iMCU_row_num < last_iMCU_row || + yindex+yoffset < compptr->last_row_height) { + /* Fill in pointers to real blocks in this row */ + buffer_ptr = buffer[ci][yindex+yoffset] + start_col; + for (xindex = 0; xindex < blockcnt; xindex++) + MCU_buffer[blkn++] = buffer_ptr++; + } else { + /* At bottom of image, need a whole row of dummy blocks */ + xindex = 0; + } + /* Fill in any dummy blocks needed in this row. + * Dummy blocks are filled in the same way as in jccoefct.c: + * all zeroes in the AC entries, DC entries equal to previous + * block's DC value. The init routine has already zeroed the + * AC entries, so we need only set the DC entries correctly. + */ + for (; xindex < compptr->MCU_width; xindex++) { + MCU_buffer[blkn] = coef->dummy_buffer[blkn]; + MCU_buffer[blkn][0][0] = MCU_buffer[blkn-1][0][0]; + blkn++; + } + } + } + /* Try to write the MCU. */ + if (! (*cinfo->entropy->encode_mcu) (cinfo, MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->mcu_ctr = MCU_col_num; + return FALSE; + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->mcu_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + coef->iMCU_row_num++; + start_iMCU_row(cinfo); + return TRUE; +} + + +/* + * Initialize coefficient buffer controller. + * + * Each passed coefficient array must be the right size for that + * coefficient: width_in_blocks wide and height_in_blocks high, + * with unitheight at least v_samp_factor. + */ + +LOCAL(void) +transencode_coef_controller (j_compress_ptr cinfo, + jvirt_barray_ptr * coef_arrays) +{ + my_coef_ptr coef; + JBLOCKROW buffer; + int i; + + coef = (my_coef_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_coef_controller)); + cinfo->coef = (struct jpeg_c_coef_controller *) coef; + coef->pub.start_pass = start_pass_coef; + coef->pub.compress_data = compress_output; + + /* Save pointer to virtual arrays */ + coef->whole_image = coef_arrays; + + /* Allocate and pre-zero space for dummy DCT blocks. */ + buffer = (JBLOCKROW) + (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, + C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); + jzero_far((void FAR *) buffer, C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); + for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) { + coef->dummy_buffer[i] = buffer + i; + } +} diff --git a/gtkmm-osx/jpeg-6b/jdapimin.c b/gtkmm-osx/jpeg-6b/jdapimin.c new file mode 100644 index 0000000..cadb59f --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jdapimin.c @@ -0,0 +1,395 @@ +/* + * jdapimin.c + * + * Copyright (C) 1994-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface code for the decompression half + * of the JPEG library. These are the "minimum" API routines that may be + * needed in either the normal full-decompression case or the + * transcoding-only case. + * + * Most of the routines intended to be called directly by an application + * are in this file or in jdapistd.c. But also see jcomapi.c for routines + * shared by compression and decompression, and jdtrans.c for the transcoding + * case. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Initialization of a JPEG decompression object. + * The error manager must already be set up (in case memory manager fails). + */ + +GLOBAL(void) +jpeg_CreateDecompress (j_decompress_ptr cinfo, int version, size_t structsize) +{ + int i; + + /* Guard against version mismatches between library and caller. */ + cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */ + if (version != JPEG_LIB_VERSION) + ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version); + if (structsize != SIZEOF(struct jpeg_decompress_struct)) + ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, + (int) SIZEOF(struct jpeg_decompress_struct), (int) structsize); + + /* For debugging purposes, we zero the whole master structure. + * But the application has already set the err pointer, and may have set + * client_data, so we have to save and restore those fields. + * Note: if application hasn't set client_data, tools like Purify may + * complain here. + */ + { + struct jpeg_error_mgr * err = cinfo->err; + void * client_data = cinfo->client_data; /* ignore Purify complaint here */ + MEMZERO(cinfo, SIZEOF(struct jpeg_decompress_struct)); + cinfo->err = err; + cinfo->client_data = client_data; + } + cinfo->is_decompressor = TRUE; + + /* Initialize a memory manager instance for this object */ + jinit_memory_mgr((j_common_ptr) cinfo); + + /* Zero out pointers to permanent structures. */ + cinfo->progress = NULL; + cinfo->src = NULL; + + for (i = 0; i < NUM_QUANT_TBLS; i++) + cinfo->quant_tbl_ptrs[i] = NULL; + + for (i = 0; i < NUM_HUFF_TBLS; i++) { + cinfo->dc_huff_tbl_ptrs[i] = NULL; + cinfo->ac_huff_tbl_ptrs[i] = NULL; + } + + /* Initialize marker processor so application can override methods + * for COM, APPn markers before calling jpeg_read_header. + */ + cinfo->marker_list = NULL; + jinit_marker_reader(cinfo); + + /* And initialize the overall input controller. */ + jinit_input_controller(cinfo); + + /* OK, I'm ready */ + cinfo->global_state = DSTATE_START; +} + + +/* + * Destruction of a JPEG decompression object + */ + +GLOBAL(void) +jpeg_destroy_decompress (j_decompress_ptr cinfo) +{ + jpeg_destroy((j_common_ptr) cinfo); /* use common routine */ +} + + +/* + * Abort processing of a JPEG decompression operation, + * but don't destroy the object itself. + */ + +GLOBAL(void) +jpeg_abort_decompress (j_decompress_ptr cinfo) +{ + jpeg_abort((j_common_ptr) cinfo); /* use common routine */ +} + + +/* + * Set default decompression parameters. + */ + +LOCAL(void) +default_decompress_parms (j_decompress_ptr cinfo) +{ + /* Guess the input colorspace, and set output colorspace accordingly. */ + /* (Wish JPEG committee had provided a real way to specify this...) */ + /* Note application may override our guesses. */ + switch (cinfo->num_components) { + case 1: + cinfo->jpeg_color_space = JCS_GRAYSCALE; + cinfo->out_color_space = JCS_GRAYSCALE; + break; + + case 3: + if (cinfo->saw_JFIF_marker) { + cinfo->jpeg_color_space = JCS_YCbCr; /* JFIF implies YCbCr */ + } else if (cinfo->saw_Adobe_marker) { + switch (cinfo->Adobe_transform) { + case 0: + cinfo->jpeg_color_space = JCS_RGB; + break; + case 1: + cinfo->jpeg_color_space = JCS_YCbCr; + break; + default: + WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform); + cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */ + break; + } + } else { + /* Saw no special markers, try to guess from the component IDs */ + int cid0 = cinfo->comp_info[0].component_id; + int cid1 = cinfo->comp_info[1].component_id; + int cid2 = cinfo->comp_info[2].component_id; + + if (cid0 == 1 && cid1 == 2 && cid2 == 3) + cinfo->jpeg_color_space = JCS_YCbCr; /* assume JFIF w/out marker */ + else if (cid0 == 82 && cid1 == 71 && cid2 == 66) + cinfo->jpeg_color_space = JCS_RGB; /* ASCII 'R', 'G', 'B' */ + else { + TRACEMS3(cinfo, 1, JTRC_UNKNOWN_IDS, cid0, cid1, cid2); + cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */ + } + } + /* Always guess RGB is proper output colorspace. */ + cinfo->out_color_space = JCS_RGB; + break; + + case 4: + if (cinfo->saw_Adobe_marker) { + switch (cinfo->Adobe_transform) { + case 0: + cinfo->jpeg_color_space = JCS_CMYK; + break; + case 2: + cinfo->jpeg_color_space = JCS_YCCK; + break; + default: + WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform); + cinfo->jpeg_color_space = JCS_YCCK; /* assume it's YCCK */ + break; + } + } else { + /* No special markers, assume straight CMYK. */ + cinfo->jpeg_color_space = JCS_CMYK; + } + cinfo->out_color_space = JCS_CMYK; + break; + + default: + cinfo->jpeg_color_space = JCS_UNKNOWN; + cinfo->out_color_space = JCS_UNKNOWN; + break; + } + + /* Set defaults for other decompression parameters. */ + cinfo->scale_num = 1; /* 1:1 scaling */ + cinfo->scale_denom = 1; + cinfo->output_gamma = 1.0; + cinfo->buffered_image = FALSE; + cinfo->raw_data_out = FALSE; + cinfo->dct_method = JDCT_DEFAULT; + cinfo->do_fancy_upsampling = TRUE; + cinfo->do_block_smoothing = TRUE; + cinfo->quantize_colors = FALSE; + /* We set these in case application only sets quantize_colors. */ + cinfo->dither_mode = JDITHER_FS; +#ifdef QUANT_2PASS_SUPPORTED + cinfo->two_pass_quantize = TRUE; +#else + cinfo->two_pass_quantize = FALSE; +#endif + cinfo->desired_number_of_colors = 256; + cinfo->colormap = NULL; + /* Initialize for no mode change in buffered-image mode. */ + cinfo->enable_1pass_quant = FALSE; + cinfo->enable_external_quant = FALSE; + cinfo->enable_2pass_quant = FALSE; +} + + +/* + * Decompression startup: read start of JPEG datastream to see what's there. + * Need only initialize JPEG object and supply a data source before calling. + * + * This routine will read as far as the first SOS marker (ie, actual start of + * compressed data), and will save all tables and parameters in the JPEG + * object. It will also initialize the decompression parameters to default + * values, and finally return JPEG_HEADER_OK. On return, the application may + * adjust the decompression parameters and then call jpeg_start_decompress. + * (Or, if the application only wanted to determine the image parameters, + * the data need not be decompressed. In that case, call jpeg_abort or + * jpeg_destroy to release any temporary space.) + * If an abbreviated (tables only) datastream is presented, the routine will + * return JPEG_HEADER_TABLES_ONLY upon reaching EOI. The application may then + * re-use the JPEG object to read the abbreviated image datastream(s). + * It is unnecessary (but OK) to call jpeg_abort in this case. + * The JPEG_SUSPENDED return code only occurs if the data source module + * requests suspension of the decompressor. In this case the application + * should load more source data and then re-call jpeg_read_header to resume + * processing. + * If a non-suspending data source is used and require_image is TRUE, then the + * return code need not be inspected since only JPEG_HEADER_OK is possible. + * + * This routine is now just a front end to jpeg_consume_input, with some + * extra error checking. + */ + +GLOBAL(int) +jpeg_read_header (j_decompress_ptr cinfo, boolean require_image) +{ + int retcode; + + if (cinfo->global_state != DSTATE_START && + cinfo->global_state != DSTATE_INHEADER) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + retcode = jpeg_consume_input(cinfo); + + switch (retcode) { + case JPEG_REACHED_SOS: + retcode = JPEG_HEADER_OK; + break; + case JPEG_REACHED_EOI: + if (require_image) /* Complain if application wanted an image */ + ERREXIT(cinfo, JERR_NO_IMAGE); + /* Reset to start state; it would be safer to require the application to + * call jpeg_abort, but we can't change it now for compatibility reasons. + * A side effect is to free any temporary memory (there shouldn't be any). + */ + jpeg_abort((j_common_ptr) cinfo); /* sets state = DSTATE_START */ + retcode = JPEG_HEADER_TABLES_ONLY; + break; + case JPEG_SUSPENDED: + /* no work */ + break; + } + + return retcode; +} + + +/* + * Consume data in advance of what the decompressor requires. + * This can be called at any time once the decompressor object has + * been created and a data source has been set up. + * + * This routine is essentially a state machine that handles a couple + * of critical state-transition actions, namely initial setup and + * transition from header scanning to ready-for-start_decompress. + * All the actual input is done via the input controller's consume_input + * method. + */ + +GLOBAL(int) +jpeg_consume_input (j_decompress_ptr cinfo) +{ + int retcode = JPEG_SUSPENDED; + + /* NB: every possible DSTATE value should be listed in this switch */ + switch (cinfo->global_state) { + case DSTATE_START: + /* Start-of-datastream actions: reset appropriate modules */ + (*cinfo->inputctl->reset_input_controller) (cinfo); + /* Initialize application's data source module */ + (*cinfo->src->init_source) (cinfo); + cinfo->global_state = DSTATE_INHEADER; + /*FALLTHROUGH*/ + case DSTATE_INHEADER: + retcode = (*cinfo->inputctl->consume_input) (cinfo); + if (retcode == JPEG_REACHED_SOS) { /* Found SOS, prepare to decompress */ + /* Set up default parameters based on header data */ + default_decompress_parms(cinfo); + /* Set global state: ready for start_decompress */ + cinfo->global_state = DSTATE_READY; + } + break; + case DSTATE_READY: + /* Can't advance past first SOS until start_decompress is called */ + retcode = JPEG_REACHED_SOS; + break; + case DSTATE_PRELOAD: + case DSTATE_PRESCAN: + case DSTATE_SCANNING: + case DSTATE_RAW_OK: + case DSTATE_BUFIMAGE: + case DSTATE_BUFPOST: + case DSTATE_STOPPING: + retcode = (*cinfo->inputctl->consume_input) (cinfo); + break; + default: + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + } + return retcode; +} + + +/* + * Have we finished reading the input file? + */ + +GLOBAL(boolean) +jpeg_input_complete (j_decompress_ptr cinfo) +{ + /* Check for valid jpeg object */ + if (cinfo->global_state < DSTATE_START || + cinfo->global_state > DSTATE_STOPPING) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + return cinfo->inputctl->eoi_reached; +} + + +/* + * Is there more than one scan? + */ + +GLOBAL(boolean) +jpeg_has_multiple_scans (j_decompress_ptr cinfo) +{ + /* Only valid after jpeg_read_header completes */ + if (cinfo->global_state < DSTATE_READY || + cinfo->global_state > DSTATE_STOPPING) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + return cinfo->inputctl->has_multiple_scans; +} + + +/* + * Finish JPEG decompression. + * + * This will normally just verify the file trailer and release temp storage. + * + * Returns FALSE if suspended. The return value need be inspected only if + * a suspending data source is used. + */ + +GLOBAL(boolean) +jpeg_finish_decompress (j_decompress_ptr cinfo) +{ + if ((cinfo->global_state == DSTATE_SCANNING || + cinfo->global_state == DSTATE_RAW_OK) && ! cinfo->buffered_image) { + /* Terminate final pass of non-buffered mode */ + if (cinfo->output_scanline < cinfo->output_height) + ERREXIT(cinfo, JERR_TOO_LITTLE_DATA); + (*cinfo->master->finish_output_pass) (cinfo); + cinfo->global_state = DSTATE_STOPPING; + } else if (cinfo->global_state == DSTATE_BUFIMAGE) { + /* Finishing after a buffered-image operation */ + cinfo->global_state = DSTATE_STOPPING; + } else if (cinfo->global_state != DSTATE_STOPPING) { + /* STOPPING = repeat call after a suspension, anything else is error */ + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + } + /* Read until EOI */ + while (! cinfo->inputctl->eoi_reached) { + if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED) + return FALSE; /* Suspend, come back later */ + } + /* Do final cleanup */ + (*cinfo->src->term_source) (cinfo); + /* We can use jpeg_abort to release memory and reset global_state */ + jpeg_abort((j_common_ptr) cinfo); + return TRUE; +} diff --git a/gtkmm-osx/jpeg-6b/jdapistd.c b/gtkmm-osx/jpeg-6b/jdapistd.c new file mode 100644 index 0000000..c8e3fa0 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jdapistd.c @@ -0,0 +1,275 @@ +/* + * jdapistd.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface code for the decompression half + * of the JPEG library. These are the "standard" API routines that are + * used in the normal full-decompression case. They are not used by a + * transcoding-only application. Note that if an application links in + * jpeg_start_decompress, it will end up linking in the entire decompressor. + * We thus must separate this file from jdapimin.c to avoid linking the + * whole decompression library into a transcoder. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Forward declarations */ +LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo)); + + +/* + * Decompression initialization. + * jpeg_read_header must be completed before calling this. + * + * If a multipass operating mode was selected, this will do all but the + * last pass, and thus may take a great deal of time. + * + * Returns FALSE if suspended. The return value need be inspected only if + * a suspending data source is used. + */ + +GLOBAL(boolean) +jpeg_start_decompress (j_decompress_ptr cinfo) +{ + if (cinfo->global_state == DSTATE_READY) { + /* First call: initialize master control, select active modules */ + jinit_master_decompress(cinfo); + if (cinfo->buffered_image) { + /* No more work here; expecting jpeg_start_output next */ + cinfo->global_state = DSTATE_BUFIMAGE; + return TRUE; + } + cinfo->global_state = DSTATE_PRELOAD; + } + if (cinfo->global_state == DSTATE_PRELOAD) { + /* If file has multiple scans, absorb them all into the coef buffer */ + if (cinfo->inputctl->has_multiple_scans) { +#ifdef D_MULTISCAN_FILES_SUPPORTED + for (;;) { + int retcode; + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + /* Absorb some more input */ + retcode = (*cinfo->inputctl->consume_input) (cinfo); + if (retcode == JPEG_SUSPENDED) + return FALSE; + if (retcode == JPEG_REACHED_EOI) + break; + /* Advance progress counter if appropriate */ + if (cinfo->progress != NULL && + (retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) { + if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) { + /* jdmaster underestimated number of scans; ratchet up one scan */ + cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows; + } + } + } +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif /* D_MULTISCAN_FILES_SUPPORTED */ + } + cinfo->output_scan_number = cinfo->input_scan_number; + } else if (cinfo->global_state != DSTATE_PRESCAN) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + /* Perform any dummy output passes, and set up for the final pass */ + return output_pass_setup(cinfo); +} + + +/* + * Set up for an output pass, and perform any dummy pass(es) needed. + * Common subroutine for jpeg_start_decompress and jpeg_start_output. + * Entry: global_state = DSTATE_PRESCAN only if previously suspended. + * Exit: If done, returns TRUE and sets global_state for proper output mode. + * If suspended, returns FALSE and sets global_state = DSTATE_PRESCAN. + */ + +LOCAL(boolean) +output_pass_setup (j_decompress_ptr cinfo) +{ + if (cinfo->global_state != DSTATE_PRESCAN) { + /* First call: do pass setup */ + (*cinfo->master->prepare_for_output_pass) (cinfo); + cinfo->output_scanline = 0; + cinfo->global_state = DSTATE_PRESCAN; + } + /* Loop over any required dummy passes */ + while (cinfo->master->is_dummy_pass) { +#ifdef QUANT_2PASS_SUPPORTED + /* Crank through the dummy pass */ + while (cinfo->output_scanline < cinfo->output_height) { + JDIMENSION last_scanline; + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->output_scanline; + cinfo->progress->pass_limit = (long) cinfo->output_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + /* Process some data */ + last_scanline = cinfo->output_scanline; + (*cinfo->main->process_data) (cinfo, (JSAMPARRAY) NULL, + &cinfo->output_scanline, (JDIMENSION) 0); + if (cinfo->output_scanline == last_scanline) + return FALSE; /* No progress made, must suspend */ + } + /* Finish up dummy pass, and set up for another one */ + (*cinfo->master->finish_output_pass) (cinfo); + (*cinfo->master->prepare_for_output_pass) (cinfo); + cinfo->output_scanline = 0; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif /* QUANT_2PASS_SUPPORTED */ + } + /* Ready for application to drive output pass through + * jpeg_read_scanlines or jpeg_read_raw_data. + */ + cinfo->global_state = cinfo->raw_data_out ? DSTATE_RAW_OK : DSTATE_SCANNING; + return TRUE; +} + + +/* + * Read some scanlines of data from the JPEG decompressor. + * + * The return value will be the number of lines actually read. + * This may be less than the number requested in several cases, + * including bottom of image, data source suspension, and operating + * modes that emit multiple scanlines at a time. + * + * Note: we warn about excess calls to jpeg_read_scanlines() since + * this likely signals an application programmer error. However, + * an oversize buffer (max_lines > scanlines remaining) is not an error. + */ + +GLOBAL(JDIMENSION) +jpeg_read_scanlines (j_decompress_ptr cinfo, JSAMPARRAY scanlines, + JDIMENSION max_lines) +{ + JDIMENSION row_ctr; + + if (cinfo->global_state != DSTATE_SCANNING) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + if (cinfo->output_scanline >= cinfo->output_height) { + WARNMS(cinfo, JWRN_TOO_MUCH_DATA); + return 0; + } + + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->output_scanline; + cinfo->progress->pass_limit = (long) cinfo->output_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + + /* Process some data */ + row_ctr = 0; + (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, max_lines); + cinfo->output_scanline += row_ctr; + return row_ctr; +} + + +/* + * Alternate entry point to read raw data. + * Processes exactly one iMCU row per call, unless suspended. + */ + +GLOBAL(JDIMENSION) +jpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data, + JDIMENSION max_lines) +{ + JDIMENSION lines_per_iMCU_row; + + if (cinfo->global_state != DSTATE_RAW_OK) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + if (cinfo->output_scanline >= cinfo->output_height) { + WARNMS(cinfo, JWRN_TOO_MUCH_DATA); + return 0; + } + + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->output_scanline; + cinfo->progress->pass_limit = (long) cinfo->output_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + + /* Verify that at least one iMCU row can be returned. */ + lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size; + if (max_lines < lines_per_iMCU_row) + ERREXIT(cinfo, JERR_BUFFER_SIZE); + + /* Decompress directly into user's buffer. */ + if (! (*cinfo->coef->decompress_data) (cinfo, data)) + return 0; /* suspension forced, can do nothing more */ + + /* OK, we processed one iMCU row. */ + cinfo->output_scanline += lines_per_iMCU_row; + return lines_per_iMCU_row; +} + + +/* Additional entry points for buffered-image mode. */ + +#ifdef D_MULTISCAN_FILES_SUPPORTED + +/* + * Initialize for an output pass in buffered-image mode. + */ + +GLOBAL(boolean) +jpeg_start_output (j_decompress_ptr cinfo, int scan_number) +{ + if (cinfo->global_state != DSTATE_BUFIMAGE && + cinfo->global_state != DSTATE_PRESCAN) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + /* Limit scan number to valid range */ + if (scan_number <= 0) + scan_number = 1; + if (cinfo->inputctl->eoi_reached && + scan_number > cinfo->input_scan_number) + scan_number = cinfo->input_scan_number; + cinfo->output_scan_number = scan_number; + /* Perform any dummy output passes, and set up for the real pass */ + return output_pass_setup(cinfo); +} + + +/* + * Finish up after an output pass in buffered-image mode. + * + * Returns FALSE if suspended. The return value need be inspected only if + * a suspending data source is used. + */ + +GLOBAL(boolean) +jpeg_finish_output (j_decompress_ptr cinfo) +{ + if ((cinfo->global_state == DSTATE_SCANNING || + cinfo->global_state == DSTATE_RAW_OK) && cinfo->buffered_image) { + /* Terminate this pass. */ + /* We do not require the whole pass to have been completed. */ + (*cinfo->master->finish_output_pass) (cinfo); + cinfo->global_state = DSTATE_BUFPOST; + } else if (cinfo->global_state != DSTATE_BUFPOST) { + /* BUFPOST = repeat call after a suspension, anything else is error */ + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + } + /* Read markers looking for SOS or EOI */ + while (cinfo->input_scan_number <= cinfo->output_scan_number && + ! cinfo->inputctl->eoi_reached) { + if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED) + return FALSE; /* Suspend, come back later */ + } + cinfo->global_state = DSTATE_BUFIMAGE; + return TRUE; +} + +#endif /* D_MULTISCAN_FILES_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/jdatadst.c b/gtkmm-osx/jpeg-6b/jdatadst.c new file mode 100644 index 0000000..a8f6fb0 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jdatadst.c @@ -0,0 +1,151 @@ +/* + * jdatadst.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains compression data destination routines for the case of + * emitting JPEG data to a file (or any stdio stream). While these routines + * are sufficient for most applications, some will want to use a different + * destination manager. + * IMPORTANT: we assume that fwrite() will correctly transcribe an array of + * JOCTETs into 8-bit-wide elements on external storage. If char is wider + * than 8 bits on your machine, you may need to do some tweaking. + */ + +/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jerror.h" + + +/* Expanded data destination object for stdio output */ + +typedef struct { + struct jpeg_destination_mgr pub; /* public fields */ + + FILE * outfile; /* target stream */ + JOCTET * buffer; /* start of buffer */ +} my_destination_mgr; + +typedef my_destination_mgr * my_dest_ptr; + +#define OUTPUT_BUF_SIZE 4096 /* choose an efficiently fwrite'able size */ + + +/* + * Initialize destination --- called by jpeg_start_compress + * before any data is actually written. + */ + +METHODDEF(void) +init_destination (j_compress_ptr cinfo) +{ + my_dest_ptr dest = (my_dest_ptr) cinfo->dest; + + /* Allocate the output buffer --- it will be released when done with image */ + dest->buffer = (JOCTET *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + OUTPUT_BUF_SIZE * SIZEOF(JOCTET)); + + dest->pub.next_output_byte = dest->buffer; + dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; +} + + +/* + * Empty the output buffer --- called whenever buffer fills up. + * + * In typical applications, this should write the entire output buffer + * (ignoring the current state of next_output_byte & free_in_buffer), + * reset the pointer & count to the start of the buffer, and return TRUE + * indicating that the buffer has been dumped. + * + * In applications that need to be able to suspend compression due to output + * overrun, a FALSE return indicates that the buffer cannot be emptied now. + * In this situation, the compressor will return to its caller (possibly with + * an indication that it has not accepted all the supplied scanlines). The + * application should resume compression after it has made more room in the + * output buffer. Note that there are substantial restrictions on the use of + * suspension --- see the documentation. + * + * When suspending, the compressor will back up to a convenient restart point + * (typically the start of the current MCU). next_output_byte & free_in_buffer + * indicate where the restart point will be if the current call returns FALSE. + * Data beyond this point will be regenerated after resumption, so do not + * write it out when emptying the buffer externally. + */ + +METHODDEF(boolean) +empty_output_buffer (j_compress_ptr cinfo) +{ + my_dest_ptr dest = (my_dest_ptr) cinfo->dest; + + if (JFWRITE(dest->outfile, dest->buffer, OUTPUT_BUF_SIZE) != + (size_t) OUTPUT_BUF_SIZE) + ERREXIT(cinfo, JERR_FILE_WRITE); + + dest->pub.next_output_byte = dest->buffer; + dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; + + return TRUE; +} + + +/* + * Terminate destination --- called by jpeg_finish_compress + * after all data has been written. Usually needs to flush buffer. + * + * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding + * application must deal with any cleanup that should happen even + * for error exit. + */ + +METHODDEF(void) +term_destination (j_compress_ptr cinfo) +{ + my_dest_ptr dest = (my_dest_ptr) cinfo->dest; + size_t datacount = OUTPUT_BUF_SIZE - dest->pub.free_in_buffer; + + /* Write any data remaining in the buffer */ + if (datacount > 0) { + if (JFWRITE(dest->outfile, dest->buffer, datacount) != datacount) + ERREXIT(cinfo, JERR_FILE_WRITE); + } + fflush(dest->outfile); + /* Make sure we wrote the output file OK */ + if (ferror(dest->outfile)) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * Prepare for output to a stdio stream. + * The caller must have already opened the stream, and is responsible + * for closing it after finishing compression. + */ + +GLOBAL(void) +jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile) +{ + my_dest_ptr dest; + + /* The destination object is made permanent so that multiple JPEG images + * can be written to the same file without re-executing jpeg_stdio_dest. + * This makes it dangerous to use this manager and a different destination + * manager serially with the same JPEG object, because their private object + * sizes may be different. Caveat programmer. + */ + if (cinfo->dest == NULL) { /* first time for this JPEG object? */ + cinfo->dest = (struct jpeg_destination_mgr *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + SIZEOF(my_destination_mgr)); + } + + dest = (my_dest_ptr) cinfo->dest; + dest->pub.init_destination = init_destination; + dest->pub.empty_output_buffer = empty_output_buffer; + dest->pub.term_destination = term_destination; + dest->outfile = outfile; +} diff --git a/gtkmm-osx/jpeg-6b/jdatasrc.c b/gtkmm-osx/jpeg-6b/jdatasrc.c new file mode 100644 index 0000000..edc752b --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jdatasrc.c @@ -0,0 +1,212 @@ +/* + * jdatasrc.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains decompression data source routines for the case of + * reading JPEG data from a file (or any stdio stream). While these routines + * are sufficient for most applications, some will want to use a different + * source manager. + * IMPORTANT: we assume that fread() will correctly transcribe an array of + * JOCTETs from 8-bit-wide elements on external storage. If char is wider + * than 8 bits on your machine, you may need to do some tweaking. + */ + +/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jerror.h" + + +/* Expanded data source object for stdio input */ + +typedef struct { + struct jpeg_source_mgr pub; /* public fields */ + + FILE * infile; /* source stream */ + JOCTET * buffer; /* start of buffer */ + boolean start_of_file; /* have we gotten any data yet? */ +} my_source_mgr; + +typedef my_source_mgr * my_src_ptr; + +#define INPUT_BUF_SIZE 4096 /* choose an efficiently fread'able size */ + + +/* + * Initialize source --- called by jpeg_read_header + * before any data is actually read. + */ + +METHODDEF(void) +init_source (j_decompress_ptr cinfo) +{ + my_src_ptr src = (my_src_ptr) cinfo->src; + + /* We reset the empty-input-file flag for each image, + * but we don't clear the input buffer. + * This is correct behavior for reading a series of images from one source. + */ + src->start_of_file = TRUE; +} + + +/* + * Fill the input buffer --- called whenever buffer is emptied. + * + * In typical applications, this should read fresh data into the buffer + * (ignoring the current state of next_input_byte & bytes_in_buffer), + * reset the pointer & count to the start of the buffer, and return TRUE + * indicating that the buffer has been reloaded. It is not necessary to + * fill the buffer entirely, only to obtain at least one more byte. + * + * There is no such thing as an EOF return. If the end of the file has been + * reached, the routine has a choice of ERREXIT() or inserting fake data into + * the buffer. In most cases, generating a warning message and inserting a + * fake EOI marker is the best course of action --- this will allow the + * decompressor to output however much of the image is there. However, + * the resulting error message is misleading if the real problem is an empty + * input file, so we handle that case specially. + * + * In applications that need to be able to suspend compression due to input + * not being available yet, a FALSE return indicates that no more data can be + * obtained right now, but more may be forthcoming later. In this situation, + * the decompressor will return to its caller (with an indication of the + * number of scanlines it has read, if any). The application should resume + * decompression after it has loaded more data into the input buffer. Note + * that there are substantial restrictions on the use of suspension --- see + * the documentation. + * + * When suspending, the decompressor will back up to a convenient restart point + * (typically the start of the current MCU). next_input_byte & bytes_in_buffer + * indicate where the restart point will be if the current call returns FALSE. + * Data beyond this point must be rescanned after resumption, so move it to + * the front of the buffer rather than discarding it. + */ + +METHODDEF(boolean) +fill_input_buffer (j_decompress_ptr cinfo) +{ + my_src_ptr src = (my_src_ptr) cinfo->src; + size_t nbytes; + + nbytes = JFREAD(src->infile, src->buffer, INPUT_BUF_SIZE); + + if (nbytes <= 0) { + if (src->start_of_file) /* Treat empty input file as fatal error */ + ERREXIT(cinfo, JERR_INPUT_EMPTY); + WARNMS(cinfo, JWRN_JPEG_EOF); + /* Insert a fake EOI marker */ + src->buffer[0] = (JOCTET) 0xFF; + src->buffer[1] = (JOCTET) JPEG_EOI; + nbytes = 2; + } + + src->pub.next_input_byte = src->buffer; + src->pub.bytes_in_buffer = nbytes; + src->start_of_file = FALSE; + + return TRUE; +} + + +/* + * Skip data --- used to skip over a potentially large amount of + * uninteresting data (such as an APPn marker). + * + * Writers of suspendable-input applications must note that skip_input_data + * is not granted the right to give a suspension return. If the skip extends + * beyond the data currently in the buffer, the buffer can be marked empty so + * that the next read will cause a fill_input_buffer call that can suspend. + * Arranging for additional bytes to be discarded before reloading the input + * buffer is the application writer's problem. + */ + +METHODDEF(void) +skip_input_data (j_decompress_ptr cinfo, long num_bytes) +{ + my_src_ptr src = (my_src_ptr) cinfo->src; + + /* Just a dumb implementation for now. Could use fseek() except + * it doesn't work on pipes. Not clear that being smart is worth + * any trouble anyway --- large skips are infrequent. + */ + if (num_bytes > 0) { + while (num_bytes > (long) src->pub.bytes_in_buffer) { + num_bytes -= (long) src->pub.bytes_in_buffer; + (void) fill_input_buffer(cinfo); + /* note we assume that fill_input_buffer will never return FALSE, + * so suspension need not be handled. + */ + } + src->pub.next_input_byte += (size_t) num_bytes; + src->pub.bytes_in_buffer -= (size_t) num_bytes; + } +} + + +/* + * An additional method that can be provided by data source modules is the + * resync_to_restart method for error recovery in the presence of RST markers. + * For the moment, this source module just uses the default resync method + * provided by the JPEG library. That method assumes that no backtracking + * is possible. + */ + + +/* + * Terminate source --- called by jpeg_finish_decompress + * after all data has been read. Often a no-op. + * + * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding + * application must deal with any cleanup that should happen even + * for error exit. + */ + +METHODDEF(void) +term_source (j_decompress_ptr cinfo) +{ + /* no work necessary here */ +} + + +/* + * Prepare for input from a stdio stream. + * The caller must have already opened the stream, and is responsible + * for closing it after finishing decompression. + */ + +GLOBAL(void) +jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile) +{ + my_src_ptr src; + + /* The source object and input buffer are made permanent so that a series + * of JPEG images can be read from the same file by calling jpeg_stdio_src + * only before the first one. (If we discarded the buffer at the end of + * one image, we'd likely lose the start of the next one.) + * This makes it unsafe to use this manager and a different source + * manager serially with the same JPEG object. Caveat programmer. + */ + if (cinfo->src == NULL) { /* first time for this JPEG object? */ + cinfo->src = (struct jpeg_source_mgr *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + SIZEOF(my_source_mgr)); + src = (my_src_ptr) cinfo->src; + src->buffer = (JOCTET *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + INPUT_BUF_SIZE * SIZEOF(JOCTET)); + } + + src = (my_src_ptr) cinfo->src; + src->pub.init_source = init_source; + src->pub.fill_input_buffer = fill_input_buffer; + src->pub.skip_input_data = skip_input_data; + src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */ + src->pub.term_source = term_source; + src->infile = infile; + src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */ + src->pub.next_input_byte = NULL; /* until buffer loaded */ +} diff --git a/gtkmm-osx/jpeg-6b/jdcoefct.c b/gtkmm-osx/jpeg-6b/jdcoefct.c new file mode 100644 index 0000000..4938d20 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jdcoefct.c @@ -0,0 +1,736 @@ +/* + * jdcoefct.c + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the coefficient buffer controller for decompression. + * This controller is the top level of the JPEG decompressor proper. + * The coefficient buffer lies between entropy decoding and inverse-DCT steps. + * + * In buffered-image mode, this controller is the interface between + * input-oriented processing and output-oriented processing. + * Also, the input side (only) is used when reading a file for transcoding. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +/* Block smoothing is only applicable for progressive JPEG, so: */ +#ifndef D_PROGRESSIVE_SUPPORTED +#undef BLOCK_SMOOTHING_SUPPORTED +#endif + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_d_coef_controller pub; /* public fields */ + + /* These variables keep track of the current location of the input side. */ + /* cinfo->input_iMCU_row is also used for this. */ + JDIMENSION MCU_ctr; /* counts MCUs processed in current row */ + int MCU_vert_offset; /* counts MCU rows within iMCU row */ + int MCU_rows_per_iMCU_row; /* number of such rows needed */ + + /* The output side's location is represented by cinfo->output_iMCU_row. */ + + /* In single-pass modes, it's sufficient to buffer just one MCU. + * We allocate a workspace of D_MAX_BLOCKS_IN_MCU coefficient blocks, + * and let the entropy decoder write into that workspace each time. + * (On 80x86, the workspace is FAR even though it's not really very big; + * this is to keep the module interfaces unchanged when a large coefficient + * buffer is necessary.) + * In multi-pass modes, this array points to the current MCU's blocks + * within the virtual arrays; it is used only by the input side. + */ + JBLOCKROW MCU_buffer[D_MAX_BLOCKS_IN_MCU]; + +#ifdef D_MULTISCAN_FILES_SUPPORTED + /* In multi-pass modes, we need a virtual block array for each component. */ + jvirt_barray_ptr whole_image[MAX_COMPONENTS]; +#endif + +#ifdef BLOCK_SMOOTHING_SUPPORTED + /* When doing block smoothing, we latch coefficient Al values here */ + int * coef_bits_latch; +#define SAVED_COEFS 6 /* we save coef_bits[0..5] */ +#endif +} my_coef_controller; + +typedef my_coef_controller * my_coef_ptr; + +/* Forward declarations */ +METHODDEF(int) decompress_onepass + JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); +#ifdef D_MULTISCAN_FILES_SUPPORTED +METHODDEF(int) decompress_data + JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); +#endif +#ifdef BLOCK_SMOOTHING_SUPPORTED +LOCAL(boolean) smoothing_ok JPP((j_decompress_ptr cinfo)); +METHODDEF(int) decompress_smooth_data + JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); +#endif + + +LOCAL(void) +start_iMCU_row (j_decompress_ptr cinfo) +/* Reset within-iMCU-row counters for a new row (input side) */ +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + /* In an interleaved scan, an MCU row is the same as an iMCU row. + * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows. + * But at the bottom of the image, process only what's left. + */ + if (cinfo->comps_in_scan > 1) { + coef->MCU_rows_per_iMCU_row = 1; + } else { + if (cinfo->input_iMCU_row < (cinfo->total_iMCU_rows-1)) + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor; + else + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height; + } + + coef->MCU_ctr = 0; + coef->MCU_vert_offset = 0; +} + + +/* + * Initialize for an input processing pass. + */ + +METHODDEF(void) +start_input_pass (j_decompress_ptr cinfo) +{ + cinfo->input_iMCU_row = 0; + start_iMCU_row(cinfo); +} + + +/* + * Initialize for an output processing pass. + */ + +METHODDEF(void) +start_output_pass (j_decompress_ptr cinfo) +{ +#ifdef BLOCK_SMOOTHING_SUPPORTED + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + /* If multipass, check to see whether to use block smoothing on this pass */ + if (coef->pub.coef_arrays != NULL) { + if (cinfo->do_block_smoothing && smoothing_ok(cinfo)) + coef->pub.decompress_data = decompress_smooth_data; + else + coef->pub.decompress_data = decompress_data; + } +#endif + cinfo->output_iMCU_row = 0; +} + + +/* + * Decompress and return some data in the single-pass case. + * Always attempts to emit one fully interleaved MCU row ("iMCU" row). + * Input and output must run in lockstep since we have only a one-MCU buffer. + * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. + * + * NB: output_buf contains a plane for each component in image, + * which we index according to the component's SOF position. + */ + +METHODDEF(int) +decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + int blkn, ci, xindex, yindex, yoffset, useful_width; + JSAMPARRAY output_ptr; + JDIMENSION start_col, output_col; + jpeg_component_info *compptr; + inverse_DCT_method_ptr inverse_DCT; + + /* Loop to process as much as one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->MCU_ctr; MCU_col_num <= last_MCU_col; + MCU_col_num++) { + /* Try to fetch an MCU. Entropy decoder expects buffer to be zeroed. */ + jzero_far((void FAR *) coef->MCU_buffer[0], + (size_t) (cinfo->blocks_in_MCU * SIZEOF(JBLOCK))); + if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->MCU_ctr = MCU_col_num; + return JPEG_SUSPENDED; + } + /* Determine where data should go in output_buf and do the IDCT thing. + * We skip dummy blocks at the right and bottom edges (but blkn gets + * incremented past them!). Note the inner loop relies on having + * allocated the MCU_buffer[] blocks sequentially. + */ + blkn = 0; /* index of current DCT block within MCU */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Don't bother to IDCT an uninteresting component. */ + if (! compptr->component_needed) { + blkn += compptr->MCU_blocks; + continue; + } + inverse_DCT = cinfo->idct->inverse_DCT[compptr->component_index]; + useful_width = (MCU_col_num < last_MCU_col) ? compptr->MCU_width + : compptr->last_col_width; + output_ptr = output_buf[compptr->component_index] + + yoffset * compptr->DCT_scaled_size; + start_col = MCU_col_num * compptr->MCU_sample_width; + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + if (cinfo->input_iMCU_row < last_iMCU_row || + yoffset+yindex < compptr->last_row_height) { + output_col = start_col; + for (xindex = 0; xindex < useful_width; xindex++) { + (*inverse_DCT) (cinfo, compptr, + (JCOEFPTR) coef->MCU_buffer[blkn+xindex], + output_ptr, output_col); + output_col += compptr->DCT_scaled_size; + } + } + blkn += compptr->MCU_width; + output_ptr += compptr->DCT_scaled_size; + } + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->MCU_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + cinfo->output_iMCU_row++; + if (++(cinfo->input_iMCU_row) < cinfo->total_iMCU_rows) { + start_iMCU_row(cinfo); + return JPEG_ROW_COMPLETED; + } + /* Completed the scan */ + (*cinfo->inputctl->finish_input_pass) (cinfo); + return JPEG_SCAN_COMPLETED; +} + + +/* + * Dummy consume-input routine for single-pass operation. + */ + +METHODDEF(int) +dummy_consume_data (j_decompress_ptr cinfo) +{ + return JPEG_SUSPENDED; /* Always indicate nothing was done */ +} + + +#ifdef D_MULTISCAN_FILES_SUPPORTED + +/* + * Consume input data and store it in the full-image coefficient buffer. + * We read as much as one fully interleaved MCU row ("iMCU" row) per call, + * ie, v_samp_factor block rows for each component in the scan. + * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. + */ + +METHODDEF(int) +consume_data (j_decompress_ptr cinfo) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + int blkn, ci, xindex, yindex, yoffset; + JDIMENSION start_col; + JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN]; + JBLOCKROW buffer_ptr; + jpeg_component_info *compptr; + + /* Align the virtual buffers for the components used in this scan. */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + buffer[ci] = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index], + cinfo->input_iMCU_row * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, TRUE); + /* Note: entropy decoder expects buffer to be zeroed, + * but this is handled automatically by the memory manager + * because we requested a pre-zeroed array. + */ + } + + /* Loop to process one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->MCU_ctr; MCU_col_num < cinfo->MCUs_per_row; + MCU_col_num++) { + /* Construct list of pointers to DCT blocks belonging to this MCU */ + blkn = 0; /* index of current DCT block within MCU */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + start_col = MCU_col_num * compptr->MCU_width; + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + buffer_ptr = buffer[ci][yindex+yoffset] + start_col; + for (xindex = 0; xindex < compptr->MCU_width; xindex++) { + coef->MCU_buffer[blkn++] = buffer_ptr++; + } + } + } + /* Try to fetch the MCU. */ + if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->MCU_ctr = MCU_col_num; + return JPEG_SUSPENDED; + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->MCU_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + if (++(cinfo->input_iMCU_row) < cinfo->total_iMCU_rows) { + start_iMCU_row(cinfo); + return JPEG_ROW_COMPLETED; + } + /* Completed the scan */ + (*cinfo->inputctl->finish_input_pass) (cinfo); + return JPEG_SCAN_COMPLETED; +} + + +/* + * Decompress and return some data in the multi-pass case. + * Always attempts to emit one fully interleaved MCU row ("iMCU" row). + * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. + * + * NB: output_buf contains a plane for each component in image. + */ + +METHODDEF(int) +decompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + JDIMENSION block_num; + int ci, block_row, block_rows; + JBLOCKARRAY buffer; + JBLOCKROW buffer_ptr; + JSAMPARRAY output_ptr; + JDIMENSION output_col; + jpeg_component_info *compptr; + inverse_DCT_method_ptr inverse_DCT; + + /* Force some input to be done if we are getting ahead of the input. */ + while (cinfo->input_scan_number < cinfo->output_scan_number || + (cinfo->input_scan_number == cinfo->output_scan_number && + cinfo->input_iMCU_row <= cinfo->output_iMCU_row)) { + if ((*cinfo->inputctl->consume_input)(cinfo) == JPEG_SUSPENDED) + return JPEG_SUSPENDED; + } + + /* OK, output from the virtual arrays. */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Don't bother to IDCT an uninteresting component. */ + if (! compptr->component_needed) + continue; + /* Align the virtual buffer for this component. */ + buffer = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[ci], + cinfo->output_iMCU_row * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, FALSE); + /* Count non-dummy DCT block rows in this iMCU row. */ + if (cinfo->output_iMCU_row < last_iMCU_row) + block_rows = compptr->v_samp_factor; + else { + /* NB: can't use last_row_height here; it is input-side-dependent! */ + block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (block_rows == 0) block_rows = compptr->v_samp_factor; + } + inverse_DCT = cinfo->idct->inverse_DCT[ci]; + output_ptr = output_buf[ci]; + /* Loop over all DCT blocks to be processed. */ + for (block_row = 0; block_row < block_rows; block_row++) { + buffer_ptr = buffer[block_row]; + output_col = 0; + for (block_num = 0; block_num < compptr->width_in_blocks; block_num++) { + (*inverse_DCT) (cinfo, compptr, (JCOEFPTR) buffer_ptr, + output_ptr, output_col); + buffer_ptr++; + output_col += compptr->DCT_scaled_size; + } + output_ptr += compptr->DCT_scaled_size; + } + } + + if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows) + return JPEG_ROW_COMPLETED; + return JPEG_SCAN_COMPLETED; +} + +#endif /* D_MULTISCAN_FILES_SUPPORTED */ + + +#ifdef BLOCK_SMOOTHING_SUPPORTED + +/* + * This code applies interblock smoothing as described by section K.8 + * of the JPEG standard: the first 5 AC coefficients are estimated from + * the DC values of a DCT block and its 8 neighboring blocks. + * We apply smoothing only for progressive JPEG decoding, and only if + * the coefficients it can estimate are not yet known to full precision. + */ + +/* Natural-order array positions of the first 5 zigzag-order coefficients */ +#define Q01_POS 1 +#define Q10_POS 8 +#define Q20_POS 16 +#define Q11_POS 9 +#define Q02_POS 2 + +/* + * Determine whether block smoothing is applicable and safe. + * We also latch the current states of the coef_bits[] entries for the + * AC coefficients; otherwise, if the input side of the decompressor + * advances into a new scan, we might think the coefficients are known + * more accurately than they really are. + */ + +LOCAL(boolean) +smoothing_ok (j_decompress_ptr cinfo) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + boolean smoothing_useful = FALSE; + int ci, coefi; + jpeg_component_info *compptr; + JQUANT_TBL * qtable; + int * coef_bits; + int * coef_bits_latch; + + if (! cinfo->progressive_mode || cinfo->coef_bits == NULL) + return FALSE; + + /* Allocate latch area if not already done */ + if (coef->coef_bits_latch == NULL) + coef->coef_bits_latch = (int *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->num_components * + (SAVED_COEFS * SIZEOF(int))); + coef_bits_latch = coef->coef_bits_latch; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* All components' quantization values must already be latched. */ + if ((qtable = compptr->quant_table) == NULL) + return FALSE; + /* Verify DC & first 5 AC quantizers are nonzero to avoid zero-divide. */ + if (qtable->quantval[0] == 0 || + qtable->quantval[Q01_POS] == 0 || + qtable->quantval[Q10_POS] == 0 || + qtable->quantval[Q20_POS] == 0 || + qtable->quantval[Q11_POS] == 0 || + qtable->quantval[Q02_POS] == 0) + return FALSE; + /* DC values must be at least partly known for all components. */ + coef_bits = cinfo->coef_bits[ci]; + if (coef_bits[0] < 0) + return FALSE; + /* Block smoothing is helpful if some AC coefficients remain inaccurate. */ + for (coefi = 1; coefi <= 5; coefi++) { + coef_bits_latch[coefi] = coef_bits[coefi]; + if (coef_bits[coefi] != 0) + smoothing_useful = TRUE; + } + coef_bits_latch += SAVED_COEFS; + } + + return smoothing_useful; +} + + +/* + * Variant of decompress_data for use when doing block smoothing. + */ + +METHODDEF(int) +decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + JDIMENSION block_num, last_block_column; + int ci, block_row, block_rows, access_rows; + JBLOCKARRAY buffer; + JBLOCKROW buffer_ptr, prev_block_row, next_block_row; + JSAMPARRAY output_ptr; + JDIMENSION output_col; + jpeg_component_info *compptr; + inverse_DCT_method_ptr inverse_DCT; + boolean first_row, last_row; + JBLOCK workspace; + int *coef_bits; + JQUANT_TBL *quanttbl; + INT32 Q00,Q01,Q02,Q10,Q11,Q20, num; + int DC1,DC2,DC3,DC4,DC5,DC6,DC7,DC8,DC9; + int Al, pred; + + /* Force some input to be done if we are getting ahead of the input. */ + while (cinfo->input_scan_number <= cinfo->output_scan_number && + ! cinfo->inputctl->eoi_reached) { + if (cinfo->input_scan_number == cinfo->output_scan_number) { + /* If input is working on current scan, we ordinarily want it to + * have completed the current row. But if input scan is DC, + * we want it to keep one row ahead so that next block row's DC + * values are up to date. + */ + JDIMENSION delta = (cinfo->Ss == 0) ? 1 : 0; + if (cinfo->input_iMCU_row > cinfo->output_iMCU_row+delta) + break; + } + if ((*cinfo->inputctl->consume_input)(cinfo) == JPEG_SUSPENDED) + return JPEG_SUSPENDED; + } + + /* OK, output from the virtual arrays. */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Don't bother to IDCT an uninteresting component. */ + if (! compptr->component_needed) + continue; + /* Count non-dummy DCT block rows in this iMCU row. */ + if (cinfo->output_iMCU_row < last_iMCU_row) { + block_rows = compptr->v_samp_factor; + access_rows = block_rows * 2; /* this and next iMCU row */ + last_row = FALSE; + } else { + /* NB: can't use last_row_height here; it is input-side-dependent! */ + block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (block_rows == 0) block_rows = compptr->v_samp_factor; + access_rows = block_rows; /* this iMCU row only */ + last_row = TRUE; + } + /* Align the virtual buffer for this component. */ + if (cinfo->output_iMCU_row > 0) { + access_rows += compptr->v_samp_factor; /* prior iMCU row too */ + buffer = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[ci], + (cinfo->output_iMCU_row - 1) * compptr->v_samp_factor, + (JDIMENSION) access_rows, FALSE); + buffer += compptr->v_samp_factor; /* point to current iMCU row */ + first_row = FALSE; + } else { + buffer = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[ci], + (JDIMENSION) 0, (JDIMENSION) access_rows, FALSE); + first_row = TRUE; + } + /* Fetch component-dependent info */ + coef_bits = coef->coef_bits_latch + (ci * SAVED_COEFS); + quanttbl = compptr->quant_table; + Q00 = quanttbl->quantval[0]; + Q01 = quanttbl->quantval[Q01_POS]; + Q10 = quanttbl->quantval[Q10_POS]; + Q20 = quanttbl->quantval[Q20_POS]; + Q11 = quanttbl->quantval[Q11_POS]; + Q02 = quanttbl->quantval[Q02_POS]; + inverse_DCT = cinfo->idct->inverse_DCT[ci]; + output_ptr = output_buf[ci]; + /* Loop over all DCT blocks to be processed. */ + for (block_row = 0; block_row < block_rows; block_row++) { + buffer_ptr = buffer[block_row]; + if (first_row && block_row == 0) + prev_block_row = buffer_ptr; + else + prev_block_row = buffer[block_row-1]; + if (last_row && block_row == block_rows-1) + next_block_row = buffer_ptr; + else + next_block_row = buffer[block_row+1]; + /* We fetch the surrounding DC values using a sliding-register approach. + * Initialize all nine here so as to do the right thing on narrow pics. + */ + DC1 = DC2 = DC3 = (int) prev_block_row[0][0]; + DC4 = DC5 = DC6 = (int) buffer_ptr[0][0]; + DC7 = DC8 = DC9 = (int) next_block_row[0][0]; + output_col = 0; + last_block_column = compptr->width_in_blocks - 1; + for (block_num = 0; block_num <= last_block_column; block_num++) { + /* Fetch current DCT block into workspace so we can modify it. */ + jcopy_block_row(buffer_ptr, (JBLOCKROW) workspace, (JDIMENSION) 1); + /* Update DC values */ + if (block_num < last_block_column) { + DC3 = (int) prev_block_row[1][0]; + DC6 = (int) buffer_ptr[1][0]; + DC9 = (int) next_block_row[1][0]; + } + /* Compute coefficient estimates per K.8. + * An estimate is applied only if coefficient is still zero, + * and is not known to be fully accurate. + */ + /* AC01 */ + if ((Al=coef_bits[1]) != 0 && workspace[1] == 0) { + num = 36 * Q00 * (DC4 - DC6); + if (num >= 0) { + pred = (int) (((Q01<<7) + num) / (Q01<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { + pred = (int) (((Q10<<7) + num) / (Q10<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { + pred = (int) (((Q20<<7) + num) / (Q20<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { + pred = (int) (((Q11<<7) + num) / (Q11<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { + pred = (int) (((Q02<<7) + num) / (Q02<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<DCT_scaled_size; + } + output_ptr += compptr->DCT_scaled_size; + } + } + + if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows) + return JPEG_ROW_COMPLETED; + return JPEG_SCAN_COMPLETED; +} + +#endif /* BLOCK_SMOOTHING_SUPPORTED */ + + +/* + * Initialize coefficient buffer controller. + */ + +GLOBAL(void) +jinit_d_coef_controller (j_decompress_ptr cinfo, boolean need_full_buffer) +{ + my_coef_ptr coef; + + coef = (my_coef_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_coef_controller)); + cinfo->coef = (struct jpeg_d_coef_controller *) coef; + coef->pub.start_input_pass = start_input_pass; + coef->pub.start_output_pass = start_output_pass; +#ifdef BLOCK_SMOOTHING_SUPPORTED + coef->coef_bits_latch = NULL; +#endif + + /* Create the coefficient buffer. */ + if (need_full_buffer) { +#ifdef D_MULTISCAN_FILES_SUPPORTED + /* Allocate a full-image virtual array for each component, */ + /* padded to a multiple of samp_factor DCT blocks in each direction. */ + /* Note we ask for a pre-zeroed array. */ + int ci, access_rows; + jpeg_component_info *compptr; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + access_rows = compptr->v_samp_factor; +#ifdef BLOCK_SMOOTHING_SUPPORTED + /* If block smoothing could be used, need a bigger window */ + if (cinfo->progressive_mode) + access_rows *= 3; +#endif + coef->whole_image[ci] = (*cinfo->mem->request_virt_barray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, TRUE, + (JDIMENSION) jround_up((long) compptr->width_in_blocks, + (long) compptr->h_samp_factor), + (JDIMENSION) jround_up((long) compptr->height_in_blocks, + (long) compptr->v_samp_factor), + (JDIMENSION) access_rows); + } + coef->pub.consume_data = consume_data; + coef->pub.decompress_data = decompress_data; + coef->pub.coef_arrays = coef->whole_image; /* link to virtual arrays */ +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + /* We only need a single-MCU buffer. */ + JBLOCKROW buffer; + int i; + + buffer = (JBLOCKROW) + (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, + D_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); + for (i = 0; i < D_MAX_BLOCKS_IN_MCU; i++) { + coef->MCU_buffer[i] = buffer + i; + } + coef->pub.consume_data = dummy_consume_data; + coef->pub.decompress_data = decompress_onepass; + coef->pub.coef_arrays = NULL; /* flag for no virtual arrays */ + } +} diff --git a/gtkmm-osx/jpeg-6b/jdcolor.c b/gtkmm-osx/jpeg-6b/jdcolor.c new file mode 100644 index 0000000..6c04dfe --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jdcolor.c @@ -0,0 +1,396 @@ +/* + * jdcolor.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains output colorspace conversion routines. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private subobject */ + +typedef struct { + struct jpeg_color_deconverter pub; /* public fields */ + + /* Private state for YCC->RGB conversion */ + int * Cr_r_tab; /* => table for Cr to R conversion */ + int * Cb_b_tab; /* => table for Cb to B conversion */ + INT32 * Cr_g_tab; /* => table for Cr to G conversion */ + INT32 * Cb_g_tab; /* => table for Cb to G conversion */ +} my_color_deconverter; + +typedef my_color_deconverter * my_cconvert_ptr; + + +/**************** YCbCr -> RGB conversion: most common case **************/ + +/* + * YCbCr is defined per CCIR 601-1, except that Cb and Cr are + * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5. + * The conversion equations to be implemented are therefore + * R = Y + 1.40200 * Cr + * G = Y - 0.34414 * Cb - 0.71414 * Cr + * B = Y + 1.77200 * Cb + * where Cb and Cr represent the incoming values less CENTERJSAMPLE. + * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.) + * + * To avoid floating-point arithmetic, we represent the fractional constants + * as integers scaled up by 2^16 (about 4 digits precision); we have to divide + * the products by 2^16, with appropriate rounding, to get the correct answer. + * Notice that Y, being an integral input, does not contribute any fraction + * so it need not participate in the rounding. + * + * For even more speed, we avoid doing any multiplications in the inner loop + * by precalculating the constants times Cb and Cr for all possible values. + * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table); + * for 12-bit samples it is still acceptable. It's not very reasonable for + * 16-bit samples, but if you want lossless storage you shouldn't be changing + * colorspace anyway. + * The Cr=>R and Cb=>B values can be rounded to integers in advance; the + * values for the G calculation are left scaled up, since we must add them + * together before rounding. + */ + +#define SCALEBITS 16 /* speediest right-shift on some machines */ +#define ONE_HALF ((INT32) 1 << (SCALEBITS-1)) +#define FIX(x) ((INT32) ((x) * (1L<RGB colorspace conversion. + */ + +LOCAL(void) +build_ycc_rgb_table (j_decompress_ptr cinfo) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + int i; + INT32 x; + SHIFT_TEMPS + + cconvert->Cr_r_tab = (int *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(int)); + cconvert->Cb_b_tab = (int *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(int)); + cconvert->Cr_g_tab = (INT32 *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(INT32)); + cconvert->Cb_g_tab = (INT32 *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(INT32)); + + for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) { + /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */ + /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */ + /* Cr=>R value is nearest int to 1.40200 * x */ + cconvert->Cr_r_tab[i] = (int) + RIGHT_SHIFT(FIX(1.40200) * x + ONE_HALF, SCALEBITS); + /* Cb=>B value is nearest int to 1.77200 * x */ + cconvert->Cb_b_tab[i] = (int) + RIGHT_SHIFT(FIX(1.77200) * x + ONE_HALF, SCALEBITS); + /* Cr=>G value is scaled-up -0.71414 * x */ + cconvert->Cr_g_tab[i] = (- FIX(0.71414)) * x; + /* Cb=>G value is scaled-up -0.34414 * x */ + /* We also add in ONE_HALF so that need not do it in inner loop */ + cconvert->Cb_g_tab[i] = (- FIX(0.34414)) * x + ONE_HALF; + } +} + + +/* + * Convert some rows of samples to the output colorspace. + * + * Note that we change from noninterleaved, one-plane-per-component format + * to interleaved-pixel format. The output buffer is therefore three times + * as wide as the input buffer. + * A starting row offset is provided only for the input buffer. The caller + * can easily adjust the passed output_buf value to accommodate any row + * offset required on that side. + */ + +METHODDEF(void) +ycc_rgb_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int y, cb, cr; + register JSAMPROW outptr; + register JSAMPROW inptr0, inptr1, inptr2; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->output_width; + /* copy these pointers into registers if possible */ + register JSAMPLE * range_limit = cinfo->sample_range_limit; + register int * Crrtab = cconvert->Cr_r_tab; + register int * Cbbtab = cconvert->Cb_b_tab; + register INT32 * Crgtab = cconvert->Cr_g_tab; + register INT32 * Cbgtab = cconvert->Cb_g_tab; + SHIFT_TEMPS + + while (--num_rows >= 0) { + inptr0 = input_buf[0][input_row]; + inptr1 = input_buf[1][input_row]; + inptr2 = input_buf[2][input_row]; + input_row++; + outptr = *output_buf++; + for (col = 0; col < num_cols; col++) { + y = GETJSAMPLE(inptr0[col]); + cb = GETJSAMPLE(inptr1[col]); + cr = GETJSAMPLE(inptr2[col]); + /* Range-limiting is essential due to noise introduced by DCT losses. */ + outptr[RGB_RED] = range_limit[y + Crrtab[cr]]; + outptr[RGB_GREEN] = range_limit[y + + ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], + SCALEBITS))]; + outptr[RGB_BLUE] = range_limit[y + Cbbtab[cb]]; + outptr += RGB_PIXELSIZE; + } + } +} + + +/**************** Cases other than YCbCr -> RGB **************/ + + +/* + * Color conversion for no colorspace change: just copy the data, + * converting from separate-planes to interleaved representation. + */ + +METHODDEF(void) +null_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + register JSAMPROW inptr, outptr; + register JDIMENSION count; + register int num_components = cinfo->num_components; + JDIMENSION num_cols = cinfo->output_width; + int ci; + + while (--num_rows >= 0) { + for (ci = 0; ci < num_components; ci++) { + inptr = input_buf[ci][input_row]; + outptr = output_buf[0] + ci; + for (count = num_cols; count > 0; count--) { + *outptr = *inptr++; /* needn't bother with GETJSAMPLE() here */ + outptr += num_components; + } + } + input_row++; + output_buf++; + } +} + + +/* + * Color conversion for grayscale: just copy the data. + * This also works for YCbCr -> grayscale conversion, in which + * we just copy the Y (luminance) component and ignore chrominance. + */ + +METHODDEF(void) +grayscale_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + jcopy_sample_rows(input_buf[0], (int) input_row, output_buf, 0, + num_rows, cinfo->output_width); +} + + +/* + * Convert grayscale to RGB: just duplicate the graylevel three times. + * This is provided to support applications that don't want to cope + * with grayscale as a separate case. + */ + +METHODDEF(void) +gray_rgb_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + register JSAMPROW inptr, outptr; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->output_width; + + while (--num_rows >= 0) { + inptr = input_buf[0][input_row++]; + outptr = *output_buf++; + for (col = 0; col < num_cols; col++) { + /* We can dispense with GETJSAMPLE() here */ + outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col]; + outptr += RGB_PIXELSIZE; + } + } +} + + +/* + * Adobe-style YCCK->CMYK conversion. + * We convert YCbCr to R=1-C, G=1-M, and B=1-Y using the same + * conversion as above, while passing K (black) unchanged. + * We assume build_ycc_rgb_table has been called. + */ + +METHODDEF(void) +ycck_cmyk_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int y, cb, cr; + register JSAMPROW outptr; + register JSAMPROW inptr0, inptr1, inptr2, inptr3; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->output_width; + /* copy these pointers into registers if possible */ + register JSAMPLE * range_limit = cinfo->sample_range_limit; + register int * Crrtab = cconvert->Cr_r_tab; + register int * Cbbtab = cconvert->Cb_b_tab; + register INT32 * Crgtab = cconvert->Cr_g_tab; + register INT32 * Cbgtab = cconvert->Cb_g_tab; + SHIFT_TEMPS + + while (--num_rows >= 0) { + inptr0 = input_buf[0][input_row]; + inptr1 = input_buf[1][input_row]; + inptr2 = input_buf[2][input_row]; + inptr3 = input_buf[3][input_row]; + input_row++; + outptr = *output_buf++; + for (col = 0; col < num_cols; col++) { + y = GETJSAMPLE(inptr0[col]); + cb = GETJSAMPLE(inptr1[col]); + cr = GETJSAMPLE(inptr2[col]); + /* Range-limiting is essential due to noise introduced by DCT losses. */ + outptr[0] = range_limit[MAXJSAMPLE - (y + Crrtab[cr])]; /* red */ + outptr[1] = range_limit[MAXJSAMPLE - (y + /* green */ + ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], + SCALEBITS)))]; + outptr[2] = range_limit[MAXJSAMPLE - (y + Cbbtab[cb])]; /* blue */ + /* K passes through unchanged */ + outptr[3] = inptr3[col]; /* don't need GETJSAMPLE here */ + outptr += 4; + } + } +} + + +/* + * Empty method for start_pass. + */ + +METHODDEF(void) +start_pass_dcolor (j_decompress_ptr cinfo) +{ + /* no work needed */ +} + + +/* + * Module initialization routine for output colorspace conversion. + */ + +GLOBAL(void) +jinit_color_deconverter (j_decompress_ptr cinfo) +{ + my_cconvert_ptr cconvert; + int ci; + + cconvert = (my_cconvert_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_color_deconverter)); + cinfo->cconvert = (struct jpeg_color_deconverter *) cconvert; + cconvert->pub.start_pass = start_pass_dcolor; + + /* Make sure num_components agrees with jpeg_color_space */ + switch (cinfo->jpeg_color_space) { + case JCS_GRAYSCALE: + if (cinfo->num_components != 1) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + break; + + case JCS_RGB: + case JCS_YCbCr: + if (cinfo->num_components != 3) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + break; + + case JCS_CMYK: + case JCS_YCCK: + if (cinfo->num_components != 4) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + break; + + default: /* JCS_UNKNOWN can be anything */ + if (cinfo->num_components < 1) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + break; + } + + /* Set out_color_components and conversion method based on requested space. + * Also clear the component_needed flags for any unused components, + * so that earlier pipeline stages can avoid useless computation. + */ + + switch (cinfo->out_color_space) { + case JCS_GRAYSCALE: + cinfo->out_color_components = 1; + if (cinfo->jpeg_color_space == JCS_GRAYSCALE || + cinfo->jpeg_color_space == JCS_YCbCr) { + cconvert->pub.color_convert = grayscale_convert; + /* For color->grayscale conversion, only the Y (0) component is needed */ + for (ci = 1; ci < cinfo->num_components; ci++) + cinfo->comp_info[ci].component_needed = FALSE; + } else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + case JCS_RGB: + cinfo->out_color_components = RGB_PIXELSIZE; + if (cinfo->jpeg_color_space == JCS_YCbCr) { + cconvert->pub.color_convert = ycc_rgb_convert; + build_ycc_rgb_table(cinfo); + } else if (cinfo->jpeg_color_space == JCS_GRAYSCALE) { + cconvert->pub.color_convert = gray_rgb_convert; + } else if (cinfo->jpeg_color_space == JCS_RGB && RGB_PIXELSIZE == 3) { + cconvert->pub.color_convert = null_convert; + } else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + case JCS_CMYK: + cinfo->out_color_components = 4; + if (cinfo->jpeg_color_space == JCS_YCCK) { + cconvert->pub.color_convert = ycck_cmyk_convert; + build_ycc_rgb_table(cinfo); + } else if (cinfo->jpeg_color_space == JCS_CMYK) { + cconvert->pub.color_convert = null_convert; + } else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + default: + /* Permit null conversion to same output space */ + if (cinfo->out_color_space == cinfo->jpeg_color_space) { + cinfo->out_color_components = cinfo->num_components; + cconvert->pub.color_convert = null_convert; + } else /* unsupported non-null conversion */ + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + } + + if (cinfo->quantize_colors) + cinfo->output_components = 1; /* single colormapped output component */ + else + cinfo->output_components = cinfo->out_color_components; +} diff --git a/gtkmm-osx/jpeg-6b/jdct.h b/gtkmm-osx/jpeg-6b/jdct.h new file mode 100644 index 0000000..31054a8 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jdct.h @@ -0,0 +1,176 @@ +/* + * jdct.h + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This include file contains common declarations for the forward and + * inverse DCT modules. These declarations are private to the DCT managers + * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms. + * The individual DCT algorithms are kept in separate files to ease + * machine-dependent tuning (e.g., assembly coding). + */ + + +/* + * A forward DCT routine is given a pointer to a work area of type DCTELEM[]; + * the DCT is to be performed in-place in that buffer. Type DCTELEM is int + * for 8-bit samples, INT32 for 12-bit samples. (NOTE: Floating-point DCT + * implementations use an array of type FAST_FLOAT, instead.) + * The DCT inputs are expected to be signed (range +-CENTERJSAMPLE). + * The DCT outputs are returned scaled up by a factor of 8; they therefore + * have a range of +-8K for 8-bit data, +-128K for 12-bit data. This + * convention improves accuracy in integer implementations and saves some + * work in floating-point ones. + * Quantization of the output coefficients is done by jcdctmgr.c. + */ + +#if BITS_IN_JSAMPLE == 8 +typedef int DCTELEM; /* 16 or 32 bits is fine */ +#else +typedef INT32 DCTELEM; /* must have 32 bits */ +#endif + +typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data)); +typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data)); + + +/* + * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer + * to an output sample array. The routine must dequantize the input data as + * well as perform the IDCT; for dequantization, it uses the multiplier table + * pointed to by compptr->dct_table. The output data is to be placed into the + * sample array starting at a specified column. (Any row offset needed will + * be applied to the array pointer before it is passed to the IDCT code.) + * Note that the number of samples emitted by the IDCT routine is + * DCT_scaled_size * DCT_scaled_size. + */ + +/* typedef inverse_DCT_method_ptr is declared in jpegint.h */ + +/* + * Each IDCT routine has its own ideas about the best dct_table element type. + */ + +typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */ +#if BITS_IN_JSAMPLE == 8 +typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */ +#define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */ +#else +typedef INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */ +#define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */ +#endif +typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */ + + +/* + * Each IDCT routine is responsible for range-limiting its results and + * converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could + * be quite far out of range if the input data is corrupt, so a bulletproof + * range-limiting step is required. We use a mask-and-table-lookup method + * to do the combined operations quickly. See the comments with + * prepare_range_limit_table (in jdmaster.c) for more info. + */ + +#define IDCT_range_limit(cinfo) ((cinfo)->sample_range_limit + CENTERJSAMPLE) + +#define RANGE_MASK (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */ + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_fdct_islow jFDislow +#define jpeg_fdct_ifast jFDifast +#define jpeg_fdct_float jFDfloat +#define jpeg_idct_islow jRDislow +#define jpeg_idct_ifast jRDifast +#define jpeg_idct_float jRDfloat +#define jpeg_idct_4x4 jRD4x4 +#define jpeg_idct_2x2 jRD2x2 +#define jpeg_idct_1x1 jRD1x1 +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + +/* Extern declarations for the forward and inverse DCT routines. */ + +EXTERN(void) jpeg_fdct_islow JPP((DCTELEM * data)); +EXTERN(void) jpeg_fdct_ifast JPP((DCTELEM * data)); +EXTERN(void) jpeg_fdct_float JPP((FAST_FLOAT * data)); + +EXTERN(void) jpeg_idct_islow + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_ifast + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_float + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_4x4 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_2x2 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_1x1 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); + + +/* + * Macros for handling fixed-point arithmetic; these are used by many + * but not all of the DCT/IDCT modules. + * + * All values are expected to be of type INT32. + * Fractional constants are scaled left by CONST_BITS bits. + * CONST_BITS is defined within each module using these macros, + * and may differ from one module to the next. + */ + +#define ONE ((INT32) 1) +#define CONST_SCALE (ONE << CONST_BITS) + +/* Convert a positive real constant to an integer scaled by CONST_SCALE. + * Caution: some C compilers fail to reduce "FIX(constant)" at compile time, + * thus causing a lot of useless floating-point operations at run time. + */ + +#define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5)) + +/* Descale and correctly round an INT32 value that's scaled by N bits. + * We assume RIGHT_SHIFT rounds towards minus infinity, so adding + * the fudge factor is correct for either sign of X. + */ + +#define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n) + +/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. + * This macro is used only when the two inputs will actually be no more than + * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a + * full 32x32 multiply. This provides a useful speedup on many machines. + * Unfortunately there is no way to specify a 16x16->32 multiply portably + * in C, but some C compilers will do the right thing if you provide the + * correct combination of casts. + */ + +#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ +#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT16) (const))) +#endif +#ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */ +#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT32) (const))) +#endif + +#ifndef MULTIPLY16C16 /* default definition */ +#define MULTIPLY16C16(var,const) ((var) * (const)) +#endif + +/* Same except both inputs are variables. */ + +#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ +#define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2))) +#endif + +#ifndef MULTIPLY16V16 /* default definition */ +#define MULTIPLY16V16(var1,var2) ((var1) * (var2)) +#endif diff --git a/gtkmm-osx/jpeg-6b/jddctmgr.c b/gtkmm-osx/jpeg-6b/jddctmgr.c new file mode 100644 index 0000000..bbf8d0e --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jddctmgr.c @@ -0,0 +1,269 @@ +/* + * jddctmgr.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the inverse-DCT management logic. + * This code selects a particular IDCT implementation to be used, + * and it performs related housekeeping chores. No code in this file + * is executed per IDCT step, only during output pass setup. + * + * Note that the IDCT routines are responsible for performing coefficient + * dequantization as well as the IDCT proper. This module sets up the + * dequantization multiplier table needed by the IDCT routine. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + + +/* + * The decompressor input side (jdinput.c) saves away the appropriate + * quantization table for each component at the start of the first scan + * involving that component. (This is necessary in order to correctly + * decode files that reuse Q-table slots.) + * When we are ready to make an output pass, the saved Q-table is converted + * to a multiplier table that will actually be used by the IDCT routine. + * The multiplier table contents are IDCT-method-dependent. To support + * application changes in IDCT method between scans, we can remake the + * multiplier tables if necessary. + * In buffered-image mode, the first output pass may occur before any data + * has been seen for some components, and thus before their Q-tables have + * been saved away. To handle this case, multiplier tables are preset + * to zeroes; the result of the IDCT will be a neutral gray level. + */ + + +/* Private subobject for this module */ + +typedef struct { + struct jpeg_inverse_dct pub; /* public fields */ + + /* This array contains the IDCT method code that each multiplier table + * is currently set up for, or -1 if it's not yet set up. + * The actual multiplier tables are pointed to by dct_table in the + * per-component comp_info structures. + */ + int cur_method[MAX_COMPONENTS]; +} my_idct_controller; + +typedef my_idct_controller * my_idct_ptr; + + +/* Allocated multiplier tables: big enough for any supported variant */ + +typedef union { + ISLOW_MULT_TYPE islow_array[DCTSIZE2]; +#ifdef DCT_IFAST_SUPPORTED + IFAST_MULT_TYPE ifast_array[DCTSIZE2]; +#endif +#ifdef DCT_FLOAT_SUPPORTED + FLOAT_MULT_TYPE float_array[DCTSIZE2]; +#endif +} multiplier_table; + + +/* The current scaled-IDCT routines require ISLOW-style multiplier tables, + * so be sure to compile that code if either ISLOW or SCALING is requested. + */ +#ifdef DCT_ISLOW_SUPPORTED +#define PROVIDE_ISLOW_TABLES +#else +#ifdef IDCT_SCALING_SUPPORTED +#define PROVIDE_ISLOW_TABLES +#endif +#endif + + +/* + * Prepare for an output pass. + * Here we select the proper IDCT routine for each component and build + * a matching multiplier table. + */ + +METHODDEF(void) +start_pass (j_decompress_ptr cinfo) +{ + my_idct_ptr idct = (my_idct_ptr) cinfo->idct; + int ci, i; + jpeg_component_info *compptr; + int method = 0; + inverse_DCT_method_ptr method_ptr = NULL; + JQUANT_TBL * qtbl; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Select the proper IDCT routine for this component's scaling */ + switch (compptr->DCT_scaled_size) { +#ifdef IDCT_SCALING_SUPPORTED + case 1: + method_ptr = jpeg_idct_1x1; + method = JDCT_ISLOW; /* jidctred uses islow-style table */ + break; + case 2: + method_ptr = jpeg_idct_2x2; + method = JDCT_ISLOW; /* jidctred uses islow-style table */ + break; + case 4: + method_ptr = jpeg_idct_4x4; + method = JDCT_ISLOW; /* jidctred uses islow-style table */ + break; +#endif + case DCTSIZE: + switch (cinfo->dct_method) { +#ifdef DCT_ISLOW_SUPPORTED + case JDCT_ISLOW: + method_ptr = jpeg_idct_islow; + method = JDCT_ISLOW; + break; +#endif +#ifdef DCT_IFAST_SUPPORTED + case JDCT_IFAST: + method_ptr = jpeg_idct_ifast; + method = JDCT_IFAST; + break; +#endif +#ifdef DCT_FLOAT_SUPPORTED + case JDCT_FLOAT: + method_ptr = jpeg_idct_float; + method = JDCT_FLOAT; + break; +#endif + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + break; + } + break; + default: + ERREXIT1(cinfo, JERR_BAD_DCTSIZE, compptr->DCT_scaled_size); + break; + } + idct->pub.inverse_DCT[ci] = method_ptr; + /* Create multiplier table from quant table. + * However, we can skip this if the component is uninteresting + * or if we already built the table. Also, if no quant table + * has yet been saved for the component, we leave the + * multiplier table all-zero; we'll be reading zeroes from the + * coefficient controller's buffer anyway. + */ + if (! compptr->component_needed || idct->cur_method[ci] == method) + continue; + qtbl = compptr->quant_table; + if (qtbl == NULL) /* happens if no data yet for component */ + continue; + idct->cur_method[ci] = method; + switch (method) { +#ifdef PROVIDE_ISLOW_TABLES + case JDCT_ISLOW: + { + /* For LL&M IDCT method, multipliers are equal to raw quantization + * coefficients, but are stored as ints to ensure access efficiency. + */ + ISLOW_MULT_TYPE * ismtbl = (ISLOW_MULT_TYPE *) compptr->dct_table; + for (i = 0; i < DCTSIZE2; i++) { + ismtbl[i] = (ISLOW_MULT_TYPE) qtbl->quantval[i]; + } + } + break; +#endif +#ifdef DCT_IFAST_SUPPORTED + case JDCT_IFAST: + { + /* For AA&N IDCT method, multipliers are equal to quantization + * coefficients scaled by scalefactor[row]*scalefactor[col], where + * scalefactor[0] = 1 + * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 + * For integer operation, the multiplier table is to be scaled by + * IFAST_SCALE_BITS. + */ + IFAST_MULT_TYPE * ifmtbl = (IFAST_MULT_TYPE *) compptr->dct_table; +#define CONST_BITS 14 + static const INT16 aanscales[DCTSIZE2] = { + /* precomputed values scaled up by 14 bits */ + 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, + 22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270, + 21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906, + 19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315, + 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, + 12873, 17855, 16819, 15137, 12873, 10114, 6967, 3552, + 8867, 12299, 11585, 10426, 8867, 6967, 4799, 2446, + 4520, 6270, 5906, 5315, 4520, 3552, 2446, 1247 + }; + SHIFT_TEMPS + + for (i = 0; i < DCTSIZE2; i++) { + ifmtbl[i] = (IFAST_MULT_TYPE) + DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i], + (INT32) aanscales[i]), + CONST_BITS-IFAST_SCALE_BITS); + } + } + break; +#endif +#ifdef DCT_FLOAT_SUPPORTED + case JDCT_FLOAT: + { + /* For float AA&N IDCT method, multipliers are equal to quantization + * coefficients scaled by scalefactor[row]*scalefactor[col], where + * scalefactor[0] = 1 + * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 + */ + FLOAT_MULT_TYPE * fmtbl = (FLOAT_MULT_TYPE *) compptr->dct_table; + int row, col; + static const double aanscalefactor[DCTSIZE] = { + 1.0, 1.387039845, 1.306562965, 1.175875602, + 1.0, 0.785694958, 0.541196100, 0.275899379 + }; + + i = 0; + for (row = 0; row < DCTSIZE; row++) { + for (col = 0; col < DCTSIZE; col++) { + fmtbl[i] = (FLOAT_MULT_TYPE) + ((double) qtbl->quantval[i] * + aanscalefactor[row] * aanscalefactor[col]); + i++; + } + } + } + break; +#endif + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + break; + } + } +} + + +/* + * Initialize IDCT manager. + */ + +GLOBAL(void) +jinit_inverse_dct (j_decompress_ptr cinfo) +{ + my_idct_ptr idct; + int ci; + jpeg_component_info *compptr; + + idct = (my_idct_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_idct_controller)); + cinfo->idct = (struct jpeg_inverse_dct *) idct; + idct->pub.start_pass = start_pass; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Allocate and pre-zero a multiplier table for each component */ + compptr->dct_table = + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(multiplier_table)); + MEMZERO(compptr->dct_table, SIZEOF(multiplier_table)); + /* Mark multiplier table not yet set up for any method */ + idct->cur_method[ci] = -1; + } +} diff --git a/gtkmm-osx/jpeg-6b/jdhuff.c b/gtkmm-osx/jpeg-6b/jdhuff.c new file mode 100644 index 0000000..b5ba39f --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jdhuff.c @@ -0,0 +1,651 @@ +/* + * jdhuff.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains Huffman entropy decoding routines. + * + * Much of the complexity here has to do with supporting input suspension. + * If the data source module demands suspension, we want to be able to back + * up to the start of the current MCU. To do this, we copy state variables + * into local working storage, and update them back to the permanent + * storage only upon successful completion of an MCU. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdhuff.h" /* Declarations shared with jdphuff.c */ + + +/* + * Expanded entropy decoder object for Huffman decoding. + * + * The savable_state subrecord contains fields that change within an MCU, + * but must not be updated permanently until we complete the MCU. + */ + +typedef struct { + int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ +} savable_state; + +/* This macro is to work around compilers with missing or broken + * structure assignment. You'll need to fix this code if you have + * such a compiler and you change MAX_COMPS_IN_SCAN. + */ + +#ifndef NO_STRUCT_ASSIGN +#define ASSIGN_STATE(dest,src) ((dest) = (src)) +#else +#if MAX_COMPS_IN_SCAN == 4 +#define ASSIGN_STATE(dest,src) \ + ((dest).last_dc_val[0] = (src).last_dc_val[0], \ + (dest).last_dc_val[1] = (src).last_dc_val[1], \ + (dest).last_dc_val[2] = (src).last_dc_val[2], \ + (dest).last_dc_val[3] = (src).last_dc_val[3]) +#endif +#endif + + +typedef struct { + struct jpeg_entropy_decoder pub; /* public fields */ + + /* These fields are loaded into local variables at start of each MCU. + * In case of suspension, we exit WITHOUT updating them. + */ + bitread_perm_state bitstate; /* Bit buffer at start of MCU */ + savable_state saved; /* Other state at start of MCU */ + + /* These fields are NOT loaded into local working state. */ + unsigned int restarts_to_go; /* MCUs left in this restart interval */ + + /* Pointers to derived tables (these workspaces have image lifespan) */ + d_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS]; + d_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS]; + + /* Precalculated info set up by start_pass for use in decode_mcu: */ + + /* Pointers to derived tables to be used for each block within an MCU */ + d_derived_tbl * dc_cur_tbls[D_MAX_BLOCKS_IN_MCU]; + d_derived_tbl * ac_cur_tbls[D_MAX_BLOCKS_IN_MCU]; + /* Whether we care about the DC and AC coefficient values for each block */ + boolean dc_needed[D_MAX_BLOCKS_IN_MCU]; + boolean ac_needed[D_MAX_BLOCKS_IN_MCU]; +} huff_entropy_decoder; + +typedef huff_entropy_decoder * huff_entropy_ptr; + + +/* + * Initialize for a Huffman-compressed scan. + */ + +METHODDEF(void) +start_pass_huff_decoder (j_decompress_ptr cinfo) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int ci, blkn, dctbl, actbl; + jpeg_component_info * compptr; + + /* Check that the scan parameters Ss, Se, Ah/Al are OK for sequential JPEG. + * This ought to be an error condition, but we make it a warning because + * there are some baseline files out there with all zeroes in these bytes. + */ + if (cinfo->Ss != 0 || cinfo->Se != DCTSIZE2-1 || + cinfo->Ah != 0 || cinfo->Al != 0) + WARNMS(cinfo, JWRN_NOT_SEQUENTIAL); + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + dctbl = compptr->dc_tbl_no; + actbl = compptr->ac_tbl_no; + /* Compute derived values for Huffman tables */ + /* We may do this more than once for a table, but it's not expensive */ + jpeg_make_d_derived_tbl(cinfo, TRUE, dctbl, + & entropy->dc_derived_tbls[dctbl]); + jpeg_make_d_derived_tbl(cinfo, FALSE, actbl, + & entropy->ac_derived_tbls[actbl]); + /* Initialize DC predictions to 0 */ + entropy->saved.last_dc_val[ci] = 0; + } + + /* Precalculate decoding info for each block in an MCU of this scan */ + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + /* Precalculate which table to use for each block */ + entropy->dc_cur_tbls[blkn] = entropy->dc_derived_tbls[compptr->dc_tbl_no]; + entropy->ac_cur_tbls[blkn] = entropy->ac_derived_tbls[compptr->ac_tbl_no]; + /* Decide whether we really care about the coefficient values */ + if (compptr->component_needed) { + entropy->dc_needed[blkn] = TRUE; + /* we don't need the ACs if producing a 1/8th-size image */ + entropy->ac_needed[blkn] = (compptr->DCT_scaled_size > 1); + } else { + entropy->dc_needed[blkn] = entropy->ac_needed[blkn] = FALSE; + } + } + + /* Initialize bitread state variables */ + entropy->bitstate.bits_left = 0; + entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */ + entropy->pub.insufficient_data = FALSE; + + /* Initialize restart counter */ + entropy->restarts_to_go = cinfo->restart_interval; +} + + +/* + * Compute the derived values for a Huffman table. + * This routine also performs some validation checks on the table. + * + * Note this is also used by jdphuff.c. + */ + +GLOBAL(void) +jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno, + d_derived_tbl ** pdtbl) +{ + JHUFF_TBL *htbl; + d_derived_tbl *dtbl; + int p, i, l, si, numsymbols; + int lookbits, ctr; + char huffsize[257]; + unsigned int huffcode[257]; + unsigned int code; + + /* Note that huffsize[] and huffcode[] are filled in code-length order, + * paralleling the order of the symbols themselves in htbl->huffval[]. + */ + + /* Find the input Huffman table */ + if (tblno < 0 || tblno >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno); + htbl = + isDC ? cinfo->dc_huff_tbl_ptrs[tblno] : cinfo->ac_huff_tbl_ptrs[tblno]; + if (htbl == NULL) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno); + + /* Allocate a workspace if we haven't already done so. */ + if (*pdtbl == NULL) + *pdtbl = (d_derived_tbl *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(d_derived_tbl)); + dtbl = *pdtbl; + dtbl->pub = htbl; /* fill in back link */ + + /* Figure C.1: make table of Huffman code length for each symbol */ + + p = 0; + for (l = 1; l <= 16; l++) { + i = (int) htbl->bits[l]; + if (i < 0 || p + i > 256) /* protect against table overrun */ + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + while (i--) + huffsize[p++] = (char) l; + } + huffsize[p] = 0; + numsymbols = p; + + /* Figure C.2: generate the codes themselves */ + /* We also validate that the counts represent a legal Huffman code tree. */ + + code = 0; + si = huffsize[0]; + p = 0; + while (huffsize[p]) { + while (((int) huffsize[p]) == si) { + huffcode[p++] = code; + code++; + } + /* code is now 1 more than the last code used for codelength si; but + * it must still fit in si bits, since no code is allowed to be all ones. + */ + if (((INT32) code) >= (((INT32) 1) << si)) + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + code <<= 1; + si++; + } + + /* Figure F.15: generate decoding tables for bit-sequential decoding */ + + p = 0; + for (l = 1; l <= 16; l++) { + if (htbl->bits[l]) { + /* valoffset[l] = huffval[] index of 1st symbol of code length l, + * minus the minimum code of length l + */ + dtbl->valoffset[l] = (INT32) p - (INT32) huffcode[p]; + p += htbl->bits[l]; + dtbl->maxcode[l] = huffcode[p-1]; /* maximum code of length l */ + } else { + dtbl->maxcode[l] = -1; /* -1 if no codes of this length */ + } + } + dtbl->maxcode[17] = 0xFFFFFL; /* ensures jpeg_huff_decode terminates */ + + /* Compute lookahead tables to speed up decoding. + * First we set all the table entries to 0, indicating "too long"; + * then we iterate through the Huffman codes that are short enough and + * fill in all the entries that correspond to bit sequences starting + * with that code. + */ + + MEMZERO(dtbl->look_nbits, SIZEOF(dtbl->look_nbits)); + + p = 0; + for (l = 1; l <= HUFF_LOOKAHEAD; l++) { + for (i = 1; i <= (int) htbl->bits[l]; i++, p++) { + /* l = current code's length, p = its index in huffcode[] & huffval[]. */ + /* Generate left-justified code followed by all possible bit sequences */ + lookbits = huffcode[p] << (HUFF_LOOKAHEAD-l); + for (ctr = 1 << (HUFF_LOOKAHEAD-l); ctr > 0; ctr--) { + dtbl->look_nbits[lookbits] = l; + dtbl->look_sym[lookbits] = htbl->huffval[p]; + lookbits++; + } + } + } + + /* Validate symbols as being reasonable. + * For AC tables, we make no check, but accept all byte values 0..255. + * For DC tables, we require the symbols to be in range 0..15. + * (Tighter bounds could be applied depending on the data depth and mode, + * but this is sufficient to ensure safe decoding.) + */ + if (isDC) { + for (i = 0; i < numsymbols; i++) { + int sym = htbl->huffval[i]; + if (sym < 0 || sym > 15) + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + } + } +} + + +/* + * Out-of-line code for bit fetching (shared with jdphuff.c). + * See jdhuff.h for info about usage. + * Note: current values of get_buffer and bits_left are passed as parameters, + * but are returned in the corresponding fields of the state struct. + * + * On most machines MIN_GET_BITS should be 25 to allow the full 32-bit width + * of get_buffer to be used. (On machines with wider words, an even larger + * buffer could be used.) However, on some machines 32-bit shifts are + * quite slow and take time proportional to the number of places shifted. + * (This is true with most PC compilers, for instance.) In this case it may + * be a win to set MIN_GET_BITS to the minimum value of 15. This reduces the + * average shift distance at the cost of more calls to jpeg_fill_bit_buffer. + */ + +#ifdef SLOW_SHIFT_32 +#define MIN_GET_BITS 15 /* minimum allowable value */ +#else +#define MIN_GET_BITS (BIT_BUF_SIZE-7) +#endif + + +GLOBAL(boolean) +jpeg_fill_bit_buffer (bitread_working_state * state, + register bit_buf_type get_buffer, register int bits_left, + int nbits) +/* Load up the bit buffer to a depth of at least nbits */ +{ + /* Copy heavily used state fields into locals (hopefully registers) */ + register const JOCTET * next_input_byte = state->next_input_byte; + register size_t bytes_in_buffer = state->bytes_in_buffer; + j_decompress_ptr cinfo = state->cinfo; + + /* Attempt to load at least MIN_GET_BITS bits into get_buffer. */ + /* (It is assumed that no request will be for more than that many bits.) */ + /* We fail to do so only if we hit a marker or are forced to suspend. */ + + if (cinfo->unread_marker == 0) { /* cannot advance past a marker */ + while (bits_left < MIN_GET_BITS) { + register int c; + + /* Attempt to read a byte */ + if (bytes_in_buffer == 0) { + if (! (*cinfo->src->fill_input_buffer) (cinfo)) + return FALSE; + next_input_byte = cinfo->src->next_input_byte; + bytes_in_buffer = cinfo->src->bytes_in_buffer; + } + bytes_in_buffer--; + c = GETJOCTET(*next_input_byte++); + + /* If it's 0xFF, check and discard stuffed zero byte */ + if (c == 0xFF) { + /* Loop here to discard any padding FF's on terminating marker, + * so that we can save a valid unread_marker value. NOTE: we will + * accept multiple FF's followed by a 0 as meaning a single FF data + * byte. This data pattern is not valid according to the standard. + */ + do { + if (bytes_in_buffer == 0) { + if (! (*cinfo->src->fill_input_buffer) (cinfo)) + return FALSE; + next_input_byte = cinfo->src->next_input_byte; + bytes_in_buffer = cinfo->src->bytes_in_buffer; + } + bytes_in_buffer--; + c = GETJOCTET(*next_input_byte++); + } while (c == 0xFF); + + if (c == 0) { + /* Found FF/00, which represents an FF data byte */ + c = 0xFF; + } else { + /* Oops, it's actually a marker indicating end of compressed data. + * Save the marker code for later use. + * Fine point: it might appear that we should save the marker into + * bitread working state, not straight into permanent state. But + * once we have hit a marker, we cannot need to suspend within the + * current MCU, because we will read no more bytes from the data + * source. So it is OK to update permanent state right away. + */ + cinfo->unread_marker = c; + /* See if we need to insert some fake zero bits. */ + goto no_more_bytes; + } + } + + /* OK, load c into get_buffer */ + get_buffer = (get_buffer << 8) | c; + bits_left += 8; + } /* end while */ + } else { + no_more_bytes: + /* We get here if we've read the marker that terminates the compressed + * data segment. There should be enough bits in the buffer register + * to satisfy the request; if so, no problem. + */ + if (nbits > bits_left) { + /* Uh-oh. Report corrupted data to user and stuff zeroes into + * the data stream, so that we can produce some kind of image. + * We use a nonvolatile flag to ensure that only one warning message + * appears per data segment. + */ + if (! cinfo->entropy->insufficient_data) { + WARNMS(cinfo, JWRN_HIT_MARKER); + cinfo->entropy->insufficient_data = TRUE; + } + /* Fill the buffer with zero bits */ + get_buffer <<= MIN_GET_BITS - bits_left; + bits_left = MIN_GET_BITS; + } + } + + /* Unload the local registers */ + state->next_input_byte = next_input_byte; + state->bytes_in_buffer = bytes_in_buffer; + state->get_buffer = get_buffer; + state->bits_left = bits_left; + + return TRUE; +} + + +/* + * Out-of-line code for Huffman code decoding. + * See jdhuff.h for info about usage. + */ + +GLOBAL(int) +jpeg_huff_decode (bitread_working_state * state, + register bit_buf_type get_buffer, register int bits_left, + d_derived_tbl * htbl, int min_bits) +{ + register int l = min_bits; + register INT32 code; + + /* HUFF_DECODE has determined that the code is at least min_bits */ + /* bits long, so fetch that many bits in one swoop. */ + + CHECK_BIT_BUFFER(*state, l, return -1); + code = GET_BITS(l); + + /* Collect the rest of the Huffman code one bit at a time. */ + /* This is per Figure F.16 in the JPEG spec. */ + + while (code > htbl->maxcode[l]) { + code <<= 1; + CHECK_BIT_BUFFER(*state, 1, return -1); + code |= GET_BITS(1); + l++; + } + + /* Unload the local registers */ + state->get_buffer = get_buffer; + state->bits_left = bits_left; + + /* With garbage input we may reach the sentinel value l = 17. */ + + if (l > 16) { + WARNMS(state->cinfo, JWRN_HUFF_BAD_CODE); + return 0; /* fake a zero as the safest result */ + } + + return htbl->pub->huffval[ (int) (code + htbl->valoffset[l]) ]; +} + + +/* + * Figure F.12: extend sign bit. + * On some machines, a shift and add will be faster than a table lookup. + */ + +#ifdef AVOID_TABLES + +#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x)) + +#else + +#define HUFF_EXTEND(x,s) ((x) < extend_test[s] ? (x) + extend_offset[s] : (x)) + +static const int extend_test[16] = /* entry n is 2**(n-1) */ + { 0, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, + 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 }; + +static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */ + { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1, + ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1, + ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1, + ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 }; + +#endif /* AVOID_TABLES */ + + +/* + * Check for a restart marker & resynchronize decoder. + * Returns FALSE if must suspend. + */ + +LOCAL(boolean) +process_restart (j_decompress_ptr cinfo) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int ci; + + /* Throw away any unused bits remaining in bit buffer; */ + /* include any full bytes in next_marker's count of discarded bytes */ + cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8; + entropy->bitstate.bits_left = 0; + + /* Advance past the RSTn marker */ + if (! (*cinfo->marker->read_restart_marker) (cinfo)) + return FALSE; + + /* Re-initialize DC predictions to 0 */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) + entropy->saved.last_dc_val[ci] = 0; + + /* Reset restart counter */ + entropy->restarts_to_go = cinfo->restart_interval; + + /* Reset out-of-data flag, unless read_restart_marker left us smack up + * against a marker. In that case we will end up treating the next data + * segment as empty, and we can avoid producing bogus output pixels by + * leaving the flag set. + */ + if (cinfo->unread_marker == 0) + entropy->pub.insufficient_data = FALSE; + + return TRUE; +} + + +/* + * Decode and return one MCU's worth of Huffman-compressed coefficients. + * The coefficients are reordered from zigzag order into natural array order, + * but are not dequantized. + * + * The i'th block of the MCU is stored into the block pointed to by + * MCU_data[i]. WE ASSUME THIS AREA HAS BEEN ZEROED BY THE CALLER. + * (Wholesale zeroing is usually a little faster than retail...) + * + * Returns FALSE if data source requested suspension. In that case no + * changes have been made to permanent state. (Exception: some output + * coefficients may already have been assigned. This is harmless for + * this module, since we'll just re-assign them on the next call.) + */ + +METHODDEF(boolean) +decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int blkn; + BITREAD_STATE_VARS; + savable_state state; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* If we've run out of data, just leave the MCU set to zeroes. + * This way, we return uniform gray for the remainder of the segment. + */ + if (! entropy->pub.insufficient_data) { + + /* Load up working state */ + BITREAD_LOAD_STATE(cinfo,entropy->bitstate); + ASSIGN_STATE(state, entropy->saved); + + /* Outer loop handles each block in the MCU */ + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + JBLOCKROW block = MCU_data[blkn]; + d_derived_tbl * dctbl = entropy->dc_cur_tbls[blkn]; + d_derived_tbl * actbl = entropy->ac_cur_tbls[blkn]; + register int s, k, r; + + /* Decode a single block's worth of coefficients */ + + /* Section F.2.2.1: decode the DC coefficient difference */ + HUFF_DECODE(s, br_state, dctbl, return FALSE, label1); + if (s) { + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + } + + if (entropy->dc_needed[blkn]) { + /* Convert DC difference to actual value, update last_dc_val */ + int ci = cinfo->MCU_membership[blkn]; + s += state.last_dc_val[ci]; + state.last_dc_val[ci] = s; + /* Output the DC coefficient (assumes jpeg_natural_order[0] = 0) */ + (*block)[0] = (JCOEF) s; + } + + if (entropy->ac_needed[blkn]) { + + /* Section F.2.2.2: decode the AC coefficients */ + /* Since zeroes are skipped, output area must be cleared beforehand */ + for (k = 1; k < DCTSIZE2; k++) { + HUFF_DECODE(s, br_state, actbl, return FALSE, label2); + + r = s >> 4; + s &= 15; + + if (s) { + k += r; + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + /* Output coefficient in natural (dezigzagged) order. + * Note: the extra entries in jpeg_natural_order[] will save us + * if k >= DCTSIZE2, which could happen if the data is corrupted. + */ + (*block)[jpeg_natural_order[k]] = (JCOEF) s; + } else { + if (r != 15) + break; + k += 15; + } + } + + } else { + + /* Section F.2.2.2: decode the AC coefficients */ + /* In this path we just discard the values */ + for (k = 1; k < DCTSIZE2; k++) { + HUFF_DECODE(s, br_state, actbl, return FALSE, label3); + + r = s >> 4; + s &= 15; + + if (s) { + k += r; + CHECK_BIT_BUFFER(br_state, s, return FALSE); + DROP_BITS(s); + } else { + if (r != 15) + break; + k += 15; + } + } + + } + } + + /* Completed MCU, so update state */ + BITREAD_SAVE_STATE(cinfo,entropy->bitstate); + ASSIGN_STATE(entropy->saved, state); + } + + /* Account for restart interval (no-op if not using restarts) */ + entropy->restarts_to_go--; + + return TRUE; +} + + +/* + * Module initialization routine for Huffman entropy decoding. + */ + +GLOBAL(void) +jinit_huff_decoder (j_decompress_ptr cinfo) +{ + huff_entropy_ptr entropy; + int i; + + entropy = (huff_entropy_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(huff_entropy_decoder)); + cinfo->entropy = (struct jpeg_entropy_decoder *) entropy; + entropy->pub.start_pass = start_pass_huff_decoder; + entropy->pub.decode_mcu = decode_mcu; + + /* Mark tables unallocated */ + for (i = 0; i < NUM_HUFF_TBLS; i++) { + entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL; + } +} diff --git a/gtkmm-osx/jpeg-6b/jdhuff.h b/gtkmm-osx/jpeg-6b/jdhuff.h new file mode 100644 index 0000000..ae19b6c --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jdhuff.h @@ -0,0 +1,201 @@ +/* + * jdhuff.h + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains declarations for Huffman entropy decoding routines + * that are shared between the sequential decoder (jdhuff.c) and the + * progressive decoder (jdphuff.c). No other modules need to see these. + */ + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_make_d_derived_tbl jMkDDerived +#define jpeg_fill_bit_buffer jFilBitBuf +#define jpeg_huff_decode jHufDecode +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* Derived data constructed for each Huffman table */ + +#define HUFF_LOOKAHEAD 8 /* # of bits of lookahead */ + +typedef struct { + /* Basic tables: (element [0] of each array is unused) */ + INT32 maxcode[18]; /* largest code of length k (-1 if none) */ + /* (maxcode[17] is a sentinel to ensure jpeg_huff_decode terminates) */ + INT32 valoffset[17]; /* huffval[] offset for codes of length k */ + /* valoffset[k] = huffval[] index of 1st symbol of code length k, less + * the smallest code of length k; so given a code of length k, the + * corresponding symbol is huffval[code + valoffset[k]] + */ + + /* Link to public Huffman table (needed only in jpeg_huff_decode) */ + JHUFF_TBL *pub; + + /* Lookahead tables: indexed by the next HUFF_LOOKAHEAD bits of + * the input data stream. If the next Huffman code is no more + * than HUFF_LOOKAHEAD bits long, we can obtain its length and + * the corresponding symbol directly from these tables. + */ + int look_nbits[1< 32 bits on your machine, and shifting/masking longs is + * reasonably fast, making bit_buf_type be long and setting BIT_BUF_SIZE + * appropriately should be a win. Unfortunately we can't define the size + * with something like #define BIT_BUF_SIZE (sizeof(bit_buf_type)*8) + * because not all machines measure sizeof in 8-bit bytes. + */ + +typedef struct { /* Bitreading state saved across MCUs */ + bit_buf_type get_buffer; /* current bit-extraction buffer */ + int bits_left; /* # of unused bits in it */ +} bitread_perm_state; + +typedef struct { /* Bitreading working state within an MCU */ + /* Current data source location */ + /* We need a copy, rather than munging the original, in case of suspension */ + const JOCTET * next_input_byte; /* => next byte to read from source */ + size_t bytes_in_buffer; /* # of bytes remaining in source buffer */ + /* Bit input buffer --- note these values are kept in register variables, + * not in this struct, inside the inner loops. + */ + bit_buf_type get_buffer; /* current bit-extraction buffer */ + int bits_left; /* # of unused bits in it */ + /* Pointer needed by jpeg_fill_bit_buffer. */ + j_decompress_ptr cinfo; /* back link to decompress master record */ +} bitread_working_state; + +/* Macros to declare and load/save bitread local variables. */ +#define BITREAD_STATE_VARS \ + register bit_buf_type get_buffer; \ + register int bits_left; \ + bitread_working_state br_state + +#define BITREAD_LOAD_STATE(cinfop,permstate) \ + br_state.cinfo = cinfop; \ + br_state.next_input_byte = cinfop->src->next_input_byte; \ + br_state.bytes_in_buffer = cinfop->src->bytes_in_buffer; \ + get_buffer = permstate.get_buffer; \ + bits_left = permstate.bits_left; + +#define BITREAD_SAVE_STATE(cinfop,permstate) \ + cinfop->src->next_input_byte = br_state.next_input_byte; \ + cinfop->src->bytes_in_buffer = br_state.bytes_in_buffer; \ + permstate.get_buffer = get_buffer; \ + permstate.bits_left = bits_left + +/* + * These macros provide the in-line portion of bit fetching. + * Use CHECK_BIT_BUFFER to ensure there are N bits in get_buffer + * before using GET_BITS, PEEK_BITS, or DROP_BITS. + * The variables get_buffer and bits_left are assumed to be locals, + * but the state struct might not be (jpeg_huff_decode needs this). + * CHECK_BIT_BUFFER(state,n,action); + * Ensure there are N bits in get_buffer; if suspend, take action. + * val = GET_BITS(n); + * Fetch next N bits. + * val = PEEK_BITS(n); + * Fetch next N bits without removing them from the buffer. + * DROP_BITS(n); + * Discard next N bits. + * The value N should be a simple variable, not an expression, because it + * is evaluated multiple times. + */ + +#define CHECK_BIT_BUFFER(state,nbits,action) \ + { if (bits_left < (nbits)) { \ + if (! jpeg_fill_bit_buffer(&(state),get_buffer,bits_left,nbits)) \ + { action; } \ + get_buffer = (state).get_buffer; bits_left = (state).bits_left; } } + +#define GET_BITS(nbits) \ + (((int) (get_buffer >> (bits_left -= (nbits)))) & ((1<<(nbits))-1)) + +#define PEEK_BITS(nbits) \ + (((int) (get_buffer >> (bits_left - (nbits)))) & ((1<<(nbits))-1)) + +#define DROP_BITS(nbits) \ + (bits_left -= (nbits)) + +/* Load up the bit buffer to a depth of at least nbits */ +EXTERN(boolean) jpeg_fill_bit_buffer + JPP((bitread_working_state * state, register bit_buf_type get_buffer, + register int bits_left, int nbits)); + + +/* + * Code for extracting next Huffman-coded symbol from input bit stream. + * Again, this is time-critical and we make the main paths be macros. + * + * We use a lookahead table to process codes of up to HUFF_LOOKAHEAD bits + * without looping. Usually, more than 95% of the Huffman codes will be 8 + * or fewer bits long. The few overlength codes are handled with a loop, + * which need not be inline code. + * + * Notes about the HUFF_DECODE macro: + * 1. Near the end of the data segment, we may fail to get enough bits + * for a lookahead. In that case, we do it the hard way. + * 2. If the lookahead table contains no entry, the next code must be + * more than HUFF_LOOKAHEAD bits long. + * 3. jpeg_huff_decode returns -1 if forced to suspend. + */ + +#define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \ +{ register int nb, look; \ + if (bits_left < HUFF_LOOKAHEAD) { \ + if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \ + get_buffer = state.get_buffer; bits_left = state.bits_left; \ + if (bits_left < HUFF_LOOKAHEAD) { \ + nb = 1; goto slowlabel; \ + } \ + } \ + look = PEEK_BITS(HUFF_LOOKAHEAD); \ + if ((nb = htbl->look_nbits[look]) != 0) { \ + DROP_BITS(nb); \ + result = htbl->look_sym[look]; \ + } else { \ + nb = HUFF_LOOKAHEAD+1; \ +slowlabel: \ + if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \ + { failaction; } \ + get_buffer = state.get_buffer; bits_left = state.bits_left; \ + } \ +} + +/* Out-of-line case for Huffman code fetching */ +EXTERN(int) jpeg_huff_decode + JPP((bitread_working_state * state, register bit_buf_type get_buffer, + register int bits_left, d_derived_tbl * htbl, int min_bits)); diff --git a/gtkmm-osx/jpeg-6b/jdinput.c b/gtkmm-osx/jpeg-6b/jdinput.c new file mode 100644 index 0000000..0c2ac8f --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jdinput.c @@ -0,0 +1,381 @@ +/* + * jdinput.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains input control logic for the JPEG decompressor. + * These routines are concerned with controlling the decompressor's input + * processing (marker reading and coefficient decoding). The actual input + * reading is done in jdmarker.c, jdhuff.c, and jdphuff.c. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private state */ + +typedef struct { + struct jpeg_input_controller pub; /* public fields */ + + boolean inheaders; /* TRUE until first SOS is reached */ +} my_input_controller; + +typedef my_input_controller * my_inputctl_ptr; + + +/* Forward declarations */ +METHODDEF(int) consume_markers JPP((j_decompress_ptr cinfo)); + + +/* + * Routines to calculate various quantities related to the size of the image. + */ + +LOCAL(void) +initial_setup (j_decompress_ptr cinfo) +/* Called once, when first SOS marker is reached */ +{ + int ci; + jpeg_component_info *compptr; + + /* Make sure image isn't bigger than I can handle */ + if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION || + (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION) + ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION); + + /* For now, precision must match compiled-in value... */ + if (cinfo->data_precision != BITS_IN_JSAMPLE) + ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision); + + /* Check that number of components won't exceed internal array sizes */ + if (cinfo->num_components > MAX_COMPONENTS) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, + MAX_COMPONENTS); + + /* Compute maximum sampling factors; check factor validity */ + cinfo->max_h_samp_factor = 1; + cinfo->max_v_samp_factor = 1; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR || + compptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR) + ERREXIT(cinfo, JERR_BAD_SAMPLING); + cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor, + compptr->h_samp_factor); + cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor, + compptr->v_samp_factor); + } + + /* We initialize DCT_scaled_size and min_DCT_scaled_size to DCTSIZE. + * In the full decompressor, this will be overridden by jdmaster.c; + * but in the transcoder, jdmaster.c is not used, so we must do it here. + */ + cinfo->min_DCT_scaled_size = DCTSIZE; + + /* Compute dimensions of components */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + compptr->DCT_scaled_size = DCTSIZE; + /* Size in DCT blocks */ + compptr->width_in_blocks = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, + (long) (cinfo->max_h_samp_factor * DCTSIZE)); + compptr->height_in_blocks = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, + (long) (cinfo->max_v_samp_factor * DCTSIZE)); + /* downsampled_width and downsampled_height will also be overridden by + * jdmaster.c if we are doing full decompression. The transcoder library + * doesn't use these values, but the calling application might. + */ + /* Size in samples */ + compptr->downsampled_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, + (long) cinfo->max_h_samp_factor); + compptr->downsampled_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, + (long) cinfo->max_v_samp_factor); + /* Mark component needed, until color conversion says otherwise */ + compptr->component_needed = TRUE; + /* Mark no quantization table yet saved for component */ + compptr->quant_table = NULL; + } + + /* Compute number of fully interleaved MCU rows. */ + cinfo->total_iMCU_rows = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, + (long) (cinfo->max_v_samp_factor*DCTSIZE)); + + /* Decide whether file contains multiple scans */ + if (cinfo->comps_in_scan < cinfo->num_components || cinfo->progressive_mode) + cinfo->inputctl->has_multiple_scans = TRUE; + else + cinfo->inputctl->has_multiple_scans = FALSE; +} + + +LOCAL(void) +per_scan_setup (j_decompress_ptr cinfo) +/* Do computations that are needed before processing a JPEG scan */ +/* cinfo->comps_in_scan and cinfo->cur_comp_info[] were set from SOS marker */ +{ + int ci, mcublks, tmp; + jpeg_component_info *compptr; + + if (cinfo->comps_in_scan == 1) { + + /* Noninterleaved (single-component) scan */ + compptr = cinfo->cur_comp_info[0]; + + /* Overall image size in MCUs */ + cinfo->MCUs_per_row = compptr->width_in_blocks; + cinfo->MCU_rows_in_scan = compptr->height_in_blocks; + + /* For noninterleaved scan, always one block per MCU */ + compptr->MCU_width = 1; + compptr->MCU_height = 1; + compptr->MCU_blocks = 1; + compptr->MCU_sample_width = compptr->DCT_scaled_size; + compptr->last_col_width = 1; + /* For noninterleaved scans, it is convenient to define last_row_height + * as the number of block rows present in the last iMCU row. + */ + tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (tmp == 0) tmp = compptr->v_samp_factor; + compptr->last_row_height = tmp; + + /* Prepare array describing MCU composition */ + cinfo->blocks_in_MCU = 1; + cinfo->MCU_membership[0] = 0; + + } else { + + /* Interleaved (multi-component) scan */ + if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan, + MAX_COMPS_IN_SCAN); + + /* Overall image size in MCUs */ + cinfo->MCUs_per_row = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width, + (long) (cinfo->max_h_samp_factor*DCTSIZE)); + cinfo->MCU_rows_in_scan = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, + (long) (cinfo->max_v_samp_factor*DCTSIZE)); + + cinfo->blocks_in_MCU = 0; + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Sampling factors give # of blocks of component in each MCU */ + compptr->MCU_width = compptr->h_samp_factor; + compptr->MCU_height = compptr->v_samp_factor; + compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height; + compptr->MCU_sample_width = compptr->MCU_width * compptr->DCT_scaled_size; + /* Figure number of non-dummy blocks in last MCU column & row */ + tmp = (int) (compptr->width_in_blocks % compptr->MCU_width); + if (tmp == 0) tmp = compptr->MCU_width; + compptr->last_col_width = tmp; + tmp = (int) (compptr->height_in_blocks % compptr->MCU_height); + if (tmp == 0) tmp = compptr->MCU_height; + compptr->last_row_height = tmp; + /* Prepare array describing MCU composition */ + mcublks = compptr->MCU_blocks; + if (cinfo->blocks_in_MCU + mcublks > D_MAX_BLOCKS_IN_MCU) + ERREXIT(cinfo, JERR_BAD_MCU_SIZE); + while (mcublks-- > 0) { + cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci; + } + } + + } +} + + +/* + * Save away a copy of the Q-table referenced by each component present + * in the current scan, unless already saved during a prior scan. + * + * In a multiple-scan JPEG file, the encoder could assign different components + * the same Q-table slot number, but change table definitions between scans + * so that each component uses a different Q-table. (The IJG encoder is not + * currently capable of doing this, but other encoders might.) Since we want + * to be able to dequantize all the components at the end of the file, this + * means that we have to save away the table actually used for each component. + * We do this by copying the table at the start of the first scan containing + * the component. + * The JPEG spec prohibits the encoder from changing the contents of a Q-table + * slot between scans of a component using that slot. If the encoder does so + * anyway, this decoder will simply use the Q-table values that were current + * at the start of the first scan for the component. + * + * The decompressor output side looks only at the saved quant tables, + * not at the current Q-table slots. + */ + +LOCAL(void) +latch_quant_tables (j_decompress_ptr cinfo) +{ + int ci, qtblno; + jpeg_component_info *compptr; + JQUANT_TBL * qtbl; + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* No work if we already saved Q-table for this component */ + if (compptr->quant_table != NULL) + continue; + /* Make sure specified quantization table is present */ + qtblno = compptr->quant_tbl_no; + if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS || + cinfo->quant_tbl_ptrs[qtblno] == NULL) + ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno); + /* OK, save away the quantization table */ + qtbl = (JQUANT_TBL *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(JQUANT_TBL)); + MEMCOPY(qtbl, cinfo->quant_tbl_ptrs[qtblno], SIZEOF(JQUANT_TBL)); + compptr->quant_table = qtbl; + } +} + + +/* + * Initialize the input modules to read a scan of compressed data. + * The first call to this is done by jdmaster.c after initializing + * the entire decompressor (during jpeg_start_decompress). + * Subsequent calls come from consume_markers, below. + */ + +METHODDEF(void) +start_input_pass (j_decompress_ptr cinfo) +{ + per_scan_setup(cinfo); + latch_quant_tables(cinfo); + (*cinfo->entropy->start_pass) (cinfo); + (*cinfo->coef->start_input_pass) (cinfo); + cinfo->inputctl->consume_input = cinfo->coef->consume_data; +} + + +/* + * Finish up after inputting a compressed-data scan. + * This is called by the coefficient controller after it's read all + * the expected data of the scan. + */ + +METHODDEF(void) +finish_input_pass (j_decompress_ptr cinfo) +{ + cinfo->inputctl->consume_input = consume_markers; +} + + +/* + * Read JPEG markers before, between, or after compressed-data scans. + * Change state as necessary when a new scan is reached. + * Return value is JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. + * + * The consume_input method pointer points either here or to the + * coefficient controller's consume_data routine, depending on whether + * we are reading a compressed data segment or inter-segment markers. + */ + +METHODDEF(int) +consume_markers (j_decompress_ptr cinfo) +{ + my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl; + int val; + + if (inputctl->pub.eoi_reached) /* After hitting EOI, read no further */ + return JPEG_REACHED_EOI; + + val = (*cinfo->marker->read_markers) (cinfo); + + switch (val) { + case JPEG_REACHED_SOS: /* Found SOS */ + if (inputctl->inheaders) { /* 1st SOS */ + initial_setup(cinfo); + inputctl->inheaders = FALSE; + /* Note: start_input_pass must be called by jdmaster.c + * before any more input can be consumed. jdapimin.c is + * responsible for enforcing this sequencing. + */ + } else { /* 2nd or later SOS marker */ + if (! inputctl->pub.has_multiple_scans) + ERREXIT(cinfo, JERR_EOI_EXPECTED); /* Oops, I wasn't expecting this! */ + start_input_pass(cinfo); + } + break; + case JPEG_REACHED_EOI: /* Found EOI */ + inputctl->pub.eoi_reached = TRUE; + if (inputctl->inheaders) { /* Tables-only datastream, apparently */ + if (cinfo->marker->saw_SOF) + ERREXIT(cinfo, JERR_SOF_NO_SOS); + } else { + /* Prevent infinite loop in coef ctlr's decompress_data routine + * if user set output_scan_number larger than number of scans. + */ + if (cinfo->output_scan_number > cinfo->input_scan_number) + cinfo->output_scan_number = cinfo->input_scan_number; + } + break; + case JPEG_SUSPENDED: + break; + } + + return val; +} + + +/* + * Reset state to begin a fresh datastream. + */ + +METHODDEF(void) +reset_input_controller (j_decompress_ptr cinfo) +{ + my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl; + + inputctl->pub.consume_input = consume_markers; + inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */ + inputctl->pub.eoi_reached = FALSE; + inputctl->inheaders = TRUE; + /* Reset other modules */ + (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); + (*cinfo->marker->reset_marker_reader) (cinfo); + /* Reset progression state -- would be cleaner if entropy decoder did this */ + cinfo->coef_bits = NULL; +} + + +/* + * Initialize the input controller module. + * This is called only once, when the decompression object is created. + */ + +GLOBAL(void) +jinit_input_controller (j_decompress_ptr cinfo) +{ + my_inputctl_ptr inputctl; + + /* Create subobject in permanent pool */ + inputctl = (my_inputctl_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + SIZEOF(my_input_controller)); + cinfo->inputctl = (struct jpeg_input_controller *) inputctl; + /* Initialize method pointers */ + inputctl->pub.consume_input = consume_markers; + inputctl->pub.reset_input_controller = reset_input_controller; + inputctl->pub.start_input_pass = start_input_pass; + inputctl->pub.finish_input_pass = finish_input_pass; + /* Initialize state: can't use reset_input_controller since we don't + * want to try to reset other modules yet. + */ + inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */ + inputctl->pub.eoi_reached = FALSE; + inputctl->inheaders = TRUE; +} diff --git a/gtkmm-osx/jpeg-6b/jdmainct.c b/gtkmm-osx/jpeg-6b/jdmainct.c new file mode 100644 index 0000000..13c956f --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jdmainct.c @@ -0,0 +1,512 @@ +/* + * jdmainct.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the main buffer controller for decompression. + * The main buffer lies between the JPEG decompressor proper and the + * post-processor; it holds downsampled data in the JPEG colorspace. + * + * Note that this code is bypassed in raw-data mode, since the application + * supplies the equivalent of the main buffer in that case. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * In the current system design, the main buffer need never be a full-image + * buffer; any full-height buffers will be found inside the coefficient or + * postprocessing controllers. Nonetheless, the main controller is not + * trivial. Its responsibility is to provide context rows for upsampling/ + * rescaling, and doing this in an efficient fashion is a bit tricky. + * + * Postprocessor input data is counted in "row groups". A row group + * is defined to be (v_samp_factor * DCT_scaled_size / min_DCT_scaled_size) + * sample rows of each component. (We require DCT_scaled_size values to be + * chosen such that these numbers are integers. In practice DCT_scaled_size + * values will likely be powers of two, so we actually have the stronger + * condition that DCT_scaled_size / min_DCT_scaled_size is an integer.) + * Upsampling will typically produce max_v_samp_factor pixel rows from each + * row group (times any additional scale factor that the upsampler is + * applying). + * + * The coefficient controller will deliver data to us one iMCU row at a time; + * each iMCU row contains v_samp_factor * DCT_scaled_size sample rows, or + * exactly min_DCT_scaled_size row groups. (This amount of data corresponds + * to one row of MCUs when the image is fully interleaved.) Note that the + * number of sample rows varies across components, but the number of row + * groups does not. Some garbage sample rows may be included in the last iMCU + * row at the bottom of the image. + * + * Depending on the vertical scaling algorithm used, the upsampler may need + * access to the sample row(s) above and below its current input row group. + * The upsampler is required to set need_context_rows TRUE at global selection + * time if so. When need_context_rows is FALSE, this controller can simply + * obtain one iMCU row at a time from the coefficient controller and dole it + * out as row groups to the postprocessor. + * + * When need_context_rows is TRUE, this controller guarantees that the buffer + * passed to postprocessing contains at least one row group's worth of samples + * above and below the row group(s) being processed. Note that the context + * rows "above" the first passed row group appear at negative row offsets in + * the passed buffer. At the top and bottom of the image, the required + * context rows are manufactured by duplicating the first or last real sample + * row; this avoids having special cases in the upsampling inner loops. + * + * The amount of context is fixed at one row group just because that's a + * convenient number for this controller to work with. The existing + * upsamplers really only need one sample row of context. An upsampler + * supporting arbitrary output rescaling might wish for more than one row + * group of context when shrinking the image; tough, we don't handle that. + * (This is justified by the assumption that downsizing will be handled mostly + * by adjusting the DCT_scaled_size values, so that the actual scale factor at + * the upsample step needn't be much less than one.) + * + * To provide the desired context, we have to retain the last two row groups + * of one iMCU row while reading in the next iMCU row. (The last row group + * can't be processed until we have another row group for its below-context, + * and so we have to save the next-to-last group too for its above-context.) + * We could do this most simply by copying data around in our buffer, but + * that'd be very slow. We can avoid copying any data by creating a rather + * strange pointer structure. Here's how it works. We allocate a workspace + * consisting of M+2 row groups (where M = min_DCT_scaled_size is the number + * of row groups per iMCU row). We create two sets of redundant pointers to + * the workspace. Labeling the physical row groups 0 to M+1, the synthesized + * pointer lists look like this: + * M+1 M-1 + * master pointer --> 0 master pointer --> 0 + * 1 1 + * ... ... + * M-3 M-3 + * M-2 M + * M-1 M+1 + * M M-2 + * M+1 M-1 + * 0 0 + * We read alternate iMCU rows using each master pointer; thus the last two + * row groups of the previous iMCU row remain un-overwritten in the workspace. + * The pointer lists are set up so that the required context rows appear to + * be adjacent to the proper places when we pass the pointer lists to the + * upsampler. + * + * The above pictures describe the normal state of the pointer lists. + * At top and bottom of the image, we diddle the pointer lists to duplicate + * the first or last sample row as necessary (this is cheaper than copying + * sample rows around). + * + * This scheme breaks down if M < 2, ie, min_DCT_scaled_size is 1. In that + * situation each iMCU row provides only one row group so the buffering logic + * must be different (eg, we must read two iMCU rows before we can emit the + * first row group). For now, we simply do not support providing context + * rows when min_DCT_scaled_size is 1. That combination seems unlikely to + * be worth providing --- if someone wants a 1/8th-size preview, they probably + * want it quick and dirty, so a context-free upsampler is sufficient. + */ + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_d_main_controller pub; /* public fields */ + + /* Pointer to allocated workspace (M or M+2 row groups). */ + JSAMPARRAY buffer[MAX_COMPONENTS]; + + boolean buffer_full; /* Have we gotten an iMCU row from decoder? */ + JDIMENSION rowgroup_ctr; /* counts row groups output to postprocessor */ + + /* Remaining fields are only used in the context case. */ + + /* These are the master pointers to the funny-order pointer lists. */ + JSAMPIMAGE xbuffer[2]; /* pointers to weird pointer lists */ + + int whichptr; /* indicates which pointer set is now in use */ + int context_state; /* process_data state machine status */ + JDIMENSION rowgroups_avail; /* row groups available to postprocessor */ + JDIMENSION iMCU_row_ctr; /* counts iMCU rows to detect image top/bot */ +} my_main_controller; + +typedef my_main_controller * my_main_ptr; + +/* context_state values: */ +#define CTX_PREPARE_FOR_IMCU 0 /* need to prepare for MCU row */ +#define CTX_PROCESS_IMCU 1 /* feeding iMCU to postprocessor */ +#define CTX_POSTPONED_ROW 2 /* feeding postponed row group */ + + +/* Forward declarations */ +METHODDEF(void) process_data_simple_main + JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)); +METHODDEF(void) process_data_context_main + JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)); +#ifdef QUANT_2PASS_SUPPORTED +METHODDEF(void) process_data_crank_post + JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)); +#endif + + +LOCAL(void) +alloc_funny_pointers (j_decompress_ptr cinfo) +/* Allocate space for the funny pointer lists. + * This is done only once, not once per pass. + */ +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + int ci, rgroup; + int M = cinfo->min_DCT_scaled_size; + jpeg_component_info *compptr; + JSAMPARRAY xbuf; + + /* Get top-level space for component array pointers. + * We alloc both arrays with one call to save a few cycles. + */ + main->xbuffer[0] = (JSAMPIMAGE) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->num_components * 2 * SIZEOF(JSAMPARRAY)); + main->xbuffer[1] = main->xbuffer[0] + cinfo->num_components; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / + cinfo->min_DCT_scaled_size; /* height of a row group of component */ + /* Get space for pointer lists --- M+4 row groups in each list. + * We alloc both pointer lists with one call to save a few cycles. + */ + xbuf = (JSAMPARRAY) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + 2 * (rgroup * (M + 4)) * SIZEOF(JSAMPROW)); + xbuf += rgroup; /* want one row group at negative offsets */ + main->xbuffer[0][ci] = xbuf; + xbuf += rgroup * (M + 4); + main->xbuffer[1][ci] = xbuf; + } +} + + +LOCAL(void) +make_funny_pointers (j_decompress_ptr cinfo) +/* Create the funny pointer lists discussed in the comments above. + * The actual workspace is already allocated (in main->buffer), + * and the space for the pointer lists is allocated too. + * This routine just fills in the curiously ordered lists. + * This will be repeated at the beginning of each pass. + */ +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + int ci, i, rgroup; + int M = cinfo->min_DCT_scaled_size; + jpeg_component_info *compptr; + JSAMPARRAY buf, xbuf0, xbuf1; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / + cinfo->min_DCT_scaled_size; /* height of a row group of component */ + xbuf0 = main->xbuffer[0][ci]; + xbuf1 = main->xbuffer[1][ci]; + /* First copy the workspace pointers as-is */ + buf = main->buffer[ci]; + for (i = 0; i < rgroup * (M + 2); i++) { + xbuf0[i] = xbuf1[i] = buf[i]; + } + /* In the second list, put the last four row groups in swapped order */ + for (i = 0; i < rgroup * 2; i++) { + xbuf1[rgroup*(M-2) + i] = buf[rgroup*M + i]; + xbuf1[rgroup*M + i] = buf[rgroup*(M-2) + i]; + } + /* The wraparound pointers at top and bottom will be filled later + * (see set_wraparound_pointers, below). Initially we want the "above" + * pointers to duplicate the first actual data line. This only needs + * to happen in xbuffer[0]. + */ + for (i = 0; i < rgroup; i++) { + xbuf0[i - rgroup] = xbuf0[0]; + } + } +} + + +LOCAL(void) +set_wraparound_pointers (j_decompress_ptr cinfo) +/* Set up the "wraparound" pointers at top and bottom of the pointer lists. + * This changes the pointer list state from top-of-image to the normal state. + */ +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + int ci, i, rgroup; + int M = cinfo->min_DCT_scaled_size; + jpeg_component_info *compptr; + JSAMPARRAY xbuf0, xbuf1; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / + cinfo->min_DCT_scaled_size; /* height of a row group of component */ + xbuf0 = main->xbuffer[0][ci]; + xbuf1 = main->xbuffer[1][ci]; + for (i = 0; i < rgroup; i++) { + xbuf0[i - rgroup] = xbuf0[rgroup*(M+1) + i]; + xbuf1[i - rgroup] = xbuf1[rgroup*(M+1) + i]; + xbuf0[rgroup*(M+2) + i] = xbuf0[i]; + xbuf1[rgroup*(M+2) + i] = xbuf1[i]; + } + } +} + + +LOCAL(void) +set_bottom_pointers (j_decompress_ptr cinfo) +/* Change the pointer lists to duplicate the last sample row at the bottom + * of the image. whichptr indicates which xbuffer holds the final iMCU row. + * Also sets rowgroups_avail to indicate number of nondummy row groups in row. + */ +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + int ci, i, rgroup, iMCUheight, rows_left; + jpeg_component_info *compptr; + JSAMPARRAY xbuf; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Count sample rows in one iMCU row and in one row group */ + iMCUheight = compptr->v_samp_factor * compptr->DCT_scaled_size; + rgroup = iMCUheight / cinfo->min_DCT_scaled_size; + /* Count nondummy sample rows remaining for this component */ + rows_left = (int) (compptr->downsampled_height % (JDIMENSION) iMCUheight); + if (rows_left == 0) rows_left = iMCUheight; + /* Count nondummy row groups. Should get same answer for each component, + * so we need only do it once. + */ + if (ci == 0) { + main->rowgroups_avail = (JDIMENSION) ((rows_left-1) / rgroup + 1); + } + /* Duplicate the last real sample row rgroup*2 times; this pads out the + * last partial rowgroup and ensures at least one full rowgroup of context. + */ + xbuf = main->xbuffer[main->whichptr][ci]; + for (i = 0; i < rgroup * 2; i++) { + xbuf[rows_left + i] = xbuf[rows_left-1]; + } + } +} + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_main (j_decompress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + + switch (pass_mode) { + case JBUF_PASS_THRU: + if (cinfo->upsample->need_context_rows) { + main->pub.process_data = process_data_context_main; + make_funny_pointers(cinfo); /* Create the xbuffer[] lists */ + main->whichptr = 0; /* Read first iMCU row into xbuffer[0] */ + main->context_state = CTX_PREPARE_FOR_IMCU; + main->iMCU_row_ctr = 0; + } else { + /* Simple case with no context needed */ + main->pub.process_data = process_data_simple_main; + } + main->buffer_full = FALSE; /* Mark buffer empty */ + main->rowgroup_ctr = 0; + break; +#ifdef QUANT_2PASS_SUPPORTED + case JBUF_CRANK_DEST: + /* For last pass of 2-pass quantization, just crank the postprocessor */ + main->pub.process_data = process_data_crank_post; + break; +#endif + default: + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + break; + } +} + + +/* + * Process some data. + * This handles the simple case where no context is required. + */ + +METHODDEF(void) +process_data_simple_main (j_decompress_ptr cinfo, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + JDIMENSION rowgroups_avail; + + /* Read input data if we haven't filled the main buffer yet */ + if (! main->buffer_full) { + if (! (*cinfo->coef->decompress_data) (cinfo, main->buffer)) + return; /* suspension forced, can do nothing more */ + main->buffer_full = TRUE; /* OK, we have an iMCU row to work with */ + } + + /* There are always min_DCT_scaled_size row groups in an iMCU row. */ + rowgroups_avail = (JDIMENSION) cinfo->min_DCT_scaled_size; + /* Note: at the bottom of the image, we may pass extra garbage row groups + * to the postprocessor. The postprocessor has to check for bottom + * of image anyway (at row resolution), so no point in us doing it too. + */ + + /* Feed the postprocessor */ + (*cinfo->post->post_process_data) (cinfo, main->buffer, + &main->rowgroup_ctr, rowgroups_avail, + output_buf, out_row_ctr, out_rows_avail); + + /* Has postprocessor consumed all the data yet? If so, mark buffer empty */ + if (main->rowgroup_ctr >= rowgroups_avail) { + main->buffer_full = FALSE; + main->rowgroup_ctr = 0; + } +} + + +/* + * Process some data. + * This handles the case where context rows must be provided. + */ + +METHODDEF(void) +process_data_context_main (j_decompress_ptr cinfo, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + + /* Read input data if we haven't filled the main buffer yet */ + if (! main->buffer_full) { + if (! (*cinfo->coef->decompress_data) (cinfo, + main->xbuffer[main->whichptr])) + return; /* suspension forced, can do nothing more */ + main->buffer_full = TRUE; /* OK, we have an iMCU row to work with */ + main->iMCU_row_ctr++; /* count rows received */ + } + + /* Postprocessor typically will not swallow all the input data it is handed + * in one call (due to filling the output buffer first). Must be prepared + * to exit and restart. This switch lets us keep track of how far we got. + * Note that each case falls through to the next on successful completion. + */ + switch (main->context_state) { + case CTX_POSTPONED_ROW: + /* Call postprocessor using previously set pointers for postponed row */ + (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr], + &main->rowgroup_ctr, main->rowgroups_avail, + output_buf, out_row_ctr, out_rows_avail); + if (main->rowgroup_ctr < main->rowgroups_avail) + return; /* Need to suspend */ + main->context_state = CTX_PREPARE_FOR_IMCU; + if (*out_row_ctr >= out_rows_avail) + return; /* Postprocessor exactly filled output buf */ + /*FALLTHROUGH*/ + case CTX_PREPARE_FOR_IMCU: + /* Prepare to process first M-1 row groups of this iMCU row */ + main->rowgroup_ctr = 0; + main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_scaled_size - 1); + /* Check for bottom of image: if so, tweak pointers to "duplicate" + * the last sample row, and adjust rowgroups_avail to ignore padding rows. + */ + if (main->iMCU_row_ctr == cinfo->total_iMCU_rows) + set_bottom_pointers(cinfo); + main->context_state = CTX_PROCESS_IMCU; + /*FALLTHROUGH*/ + case CTX_PROCESS_IMCU: + /* Call postprocessor using previously set pointers */ + (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr], + &main->rowgroup_ctr, main->rowgroups_avail, + output_buf, out_row_ctr, out_rows_avail); + if (main->rowgroup_ctr < main->rowgroups_avail) + return; /* Need to suspend */ + /* After the first iMCU, change wraparound pointers to normal state */ + if (main->iMCU_row_ctr == 1) + set_wraparound_pointers(cinfo); + /* Prepare to load new iMCU row using other xbuffer list */ + main->whichptr ^= 1; /* 0=>1 or 1=>0 */ + main->buffer_full = FALSE; + /* Still need to process last row group of this iMCU row, */ + /* which is saved at index M+1 of the other xbuffer */ + main->rowgroup_ctr = (JDIMENSION) (cinfo->min_DCT_scaled_size + 1); + main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_scaled_size + 2); + main->context_state = CTX_POSTPONED_ROW; + } +} + + +/* + * Process some data. + * Final pass of two-pass quantization: just call the postprocessor. + * Source data will be the postprocessor controller's internal buffer. + */ + +#ifdef QUANT_2PASS_SUPPORTED + +METHODDEF(void) +process_data_crank_post (j_decompress_ptr cinfo, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + (*cinfo->post->post_process_data) (cinfo, (JSAMPIMAGE) NULL, + (JDIMENSION *) NULL, (JDIMENSION) 0, + output_buf, out_row_ctr, out_rows_avail); +} + +#endif /* QUANT_2PASS_SUPPORTED */ + + +/* + * Initialize main buffer controller. + */ + +GLOBAL(void) +jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer) +{ + my_main_ptr main; + int ci, rgroup, ngroups; + jpeg_component_info *compptr; + + main = (my_main_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_main_controller)); + cinfo->main = (struct jpeg_d_main_controller *) main; + main->pub.start_pass = start_pass_main; + + if (need_full_buffer) /* shouldn't happen */ + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + + /* Allocate the workspace. + * ngroups is the number of row groups we need. + */ + if (cinfo->upsample->need_context_rows) { + if (cinfo->min_DCT_scaled_size < 2) /* unsupported, see comments above */ + ERREXIT(cinfo, JERR_NOTIMPL); + alloc_funny_pointers(cinfo); /* Alloc space for xbuffer[] lists */ + ngroups = cinfo->min_DCT_scaled_size + 2; + } else { + ngroups = cinfo->min_DCT_scaled_size; + } + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / + cinfo->min_DCT_scaled_size; /* height of a row group of component */ + main->buffer[ci] = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + compptr->width_in_blocks * compptr->DCT_scaled_size, + (JDIMENSION) (rgroup * ngroups)); + } +} diff --git a/gtkmm-osx/jpeg-6b/jdmarker.c b/gtkmm-osx/jpeg-6b/jdmarker.c new file mode 100644 index 0000000..f4cca8c --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jdmarker.c @@ -0,0 +1,1360 @@ +/* + * jdmarker.c + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to decode JPEG datastream markers. + * Most of the complexity arises from our desire to support input + * suspension: if not all of the data for a marker is available, + * we must exit back to the application. On resumption, we reprocess + * the marker. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +typedef enum { /* JPEG marker codes */ + M_SOF0 = 0xc0, + M_SOF1 = 0xc1, + M_SOF2 = 0xc2, + M_SOF3 = 0xc3, + + M_SOF5 = 0xc5, + M_SOF6 = 0xc6, + M_SOF7 = 0xc7, + + M_JPG = 0xc8, + M_SOF9 = 0xc9, + M_SOF10 = 0xca, + M_SOF11 = 0xcb, + + M_SOF13 = 0xcd, + M_SOF14 = 0xce, + M_SOF15 = 0xcf, + + M_DHT = 0xc4, + + M_DAC = 0xcc, + + M_RST0 = 0xd0, + M_RST1 = 0xd1, + M_RST2 = 0xd2, + M_RST3 = 0xd3, + M_RST4 = 0xd4, + M_RST5 = 0xd5, + M_RST6 = 0xd6, + M_RST7 = 0xd7, + + M_SOI = 0xd8, + M_EOI = 0xd9, + M_SOS = 0xda, + M_DQT = 0xdb, + M_DNL = 0xdc, + M_DRI = 0xdd, + M_DHP = 0xde, + M_EXP = 0xdf, + + M_APP0 = 0xe0, + M_APP1 = 0xe1, + M_APP2 = 0xe2, + M_APP3 = 0xe3, + M_APP4 = 0xe4, + M_APP5 = 0xe5, + M_APP6 = 0xe6, + M_APP7 = 0xe7, + M_APP8 = 0xe8, + M_APP9 = 0xe9, + M_APP10 = 0xea, + M_APP11 = 0xeb, + M_APP12 = 0xec, + M_APP13 = 0xed, + M_APP14 = 0xee, + M_APP15 = 0xef, + + M_JPG0 = 0xf0, + M_JPG13 = 0xfd, + M_COM = 0xfe, + + M_TEM = 0x01, + + M_ERROR = 0x100 +} JPEG_MARKER; + + +/* Private state */ + +typedef struct { + struct jpeg_marker_reader pub; /* public fields */ + + /* Application-overridable marker processing methods */ + jpeg_marker_parser_method process_COM; + jpeg_marker_parser_method process_APPn[16]; + + /* Limit on marker data length to save for each marker type */ + unsigned int length_limit_COM; + unsigned int length_limit_APPn[16]; + + /* Status of COM/APPn marker saving */ + jpeg_saved_marker_ptr cur_marker; /* NULL if not processing a marker */ + unsigned int bytes_read; /* data bytes read so far in marker */ + /* Note: cur_marker is not linked into marker_list until it's all read. */ +} my_marker_reader; + +typedef my_marker_reader * my_marker_ptr; + + +/* + * Macros for fetching data from the data source module. + * + * At all times, cinfo->src->next_input_byte and ->bytes_in_buffer reflect + * the current restart point; we update them only when we have reached a + * suitable place to restart if a suspension occurs. + */ + +/* Declare and initialize local copies of input pointer/count */ +#define INPUT_VARS(cinfo) \ + struct jpeg_source_mgr * datasrc = (cinfo)->src; \ + const JOCTET * next_input_byte = datasrc->next_input_byte; \ + size_t bytes_in_buffer = datasrc->bytes_in_buffer + +/* Unload the local copies --- do this only at a restart boundary */ +#define INPUT_SYNC(cinfo) \ + ( datasrc->next_input_byte = next_input_byte, \ + datasrc->bytes_in_buffer = bytes_in_buffer ) + +/* Reload the local copies --- used only in MAKE_BYTE_AVAIL */ +#define INPUT_RELOAD(cinfo) \ + ( next_input_byte = datasrc->next_input_byte, \ + bytes_in_buffer = datasrc->bytes_in_buffer ) + +/* Internal macro for INPUT_BYTE and INPUT_2BYTES: make a byte available. + * Note we do *not* do INPUT_SYNC before calling fill_input_buffer, + * but we must reload the local copies after a successful fill. + */ +#define MAKE_BYTE_AVAIL(cinfo,action) \ + if (bytes_in_buffer == 0) { \ + if (! (*datasrc->fill_input_buffer) (cinfo)) \ + { action; } \ + INPUT_RELOAD(cinfo); \ + } + +/* Read a byte into variable V. + * If must suspend, take the specified action (typically "return FALSE"). + */ +#define INPUT_BYTE(cinfo,V,action) \ + MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \ + bytes_in_buffer--; \ + V = GETJOCTET(*next_input_byte++); ) + +/* As above, but read two bytes interpreted as an unsigned 16-bit integer. + * V should be declared unsigned int or perhaps INT32. + */ +#define INPUT_2BYTES(cinfo,V,action) \ + MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \ + bytes_in_buffer--; \ + V = ((unsigned int) GETJOCTET(*next_input_byte++)) << 8; \ + MAKE_BYTE_AVAIL(cinfo,action); \ + bytes_in_buffer--; \ + V += GETJOCTET(*next_input_byte++); ) + + +/* + * Routines to process JPEG markers. + * + * Entry condition: JPEG marker itself has been read and its code saved + * in cinfo->unread_marker; input restart point is just after the marker. + * + * Exit: if return TRUE, have read and processed any parameters, and have + * updated the restart point to point after the parameters. + * If return FALSE, was forced to suspend before reaching end of + * marker parameters; restart point has not been moved. Same routine + * will be called again after application supplies more input data. + * + * This approach to suspension assumes that all of a marker's parameters + * can fit into a single input bufferload. This should hold for "normal" + * markers. Some COM/APPn markers might have large parameter segments + * that might not fit. If we are simply dropping such a marker, we use + * skip_input_data to get past it, and thereby put the problem on the + * source manager's shoulders. If we are saving the marker's contents + * into memory, we use a slightly different convention: when forced to + * suspend, the marker processor updates the restart point to the end of + * what it's consumed (ie, the end of the buffer) before returning FALSE. + * On resumption, cinfo->unread_marker still contains the marker code, + * but the data source will point to the next chunk of marker data. + * The marker processor must retain internal state to deal with this. + * + * Note that we don't bother to avoid duplicate trace messages if a + * suspension occurs within marker parameters. Other side effects + * require more care. + */ + + +LOCAL(boolean) +get_soi (j_decompress_ptr cinfo) +/* Process an SOI marker */ +{ + int i; + + TRACEMS(cinfo, 1, JTRC_SOI); + + if (cinfo->marker->saw_SOI) + ERREXIT(cinfo, JERR_SOI_DUPLICATE); + + /* Reset all parameters that are defined to be reset by SOI */ + + for (i = 0; i < NUM_ARITH_TBLS; i++) { + cinfo->arith_dc_L[i] = 0; + cinfo->arith_dc_U[i] = 1; + cinfo->arith_ac_K[i] = 5; + } + cinfo->restart_interval = 0; + + /* Set initial assumptions for colorspace etc */ + + cinfo->jpeg_color_space = JCS_UNKNOWN; + cinfo->CCIR601_sampling = FALSE; /* Assume non-CCIR sampling??? */ + + cinfo->saw_JFIF_marker = FALSE; + cinfo->JFIF_major_version = 1; /* set default JFIF APP0 values */ + cinfo->JFIF_minor_version = 1; + cinfo->density_unit = 0; + cinfo->X_density = 1; + cinfo->Y_density = 1; + cinfo->saw_Adobe_marker = FALSE; + cinfo->Adobe_transform = 0; + + cinfo->marker->saw_SOI = TRUE; + + return TRUE; +} + + +LOCAL(boolean) +get_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith) +/* Process a SOFn marker */ +{ + INT32 length; + int c, ci; + jpeg_component_info * compptr; + INPUT_VARS(cinfo); + + cinfo->progressive_mode = is_prog; + cinfo->arith_code = is_arith; + + INPUT_2BYTES(cinfo, length, return FALSE); + + INPUT_BYTE(cinfo, cinfo->data_precision, return FALSE); + INPUT_2BYTES(cinfo, cinfo->image_height, return FALSE); + INPUT_2BYTES(cinfo, cinfo->image_width, return FALSE); + INPUT_BYTE(cinfo, cinfo->num_components, return FALSE); + + length -= 8; + + TRACEMS4(cinfo, 1, JTRC_SOF, cinfo->unread_marker, + (int) cinfo->image_width, (int) cinfo->image_height, + cinfo->num_components); + + if (cinfo->marker->saw_SOF) + ERREXIT(cinfo, JERR_SOF_DUPLICATE); + + /* We don't support files in which the image height is initially specified */ + /* as 0 and is later redefined by DNL. As long as we have to check that, */ + /* might as well have a general sanity check. */ + if (cinfo->image_height <= 0 || cinfo->image_width <= 0 + || cinfo->num_components <= 0) + ERREXIT(cinfo, JERR_EMPTY_IMAGE); + + if (length != (cinfo->num_components * 3)) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + if (cinfo->comp_info == NULL) /* do only once, even if suspend */ + cinfo->comp_info = (jpeg_component_info *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->num_components * SIZEOF(jpeg_component_info)); + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + compptr->component_index = ci; + INPUT_BYTE(cinfo, compptr->component_id, return FALSE); + INPUT_BYTE(cinfo, c, return FALSE); + compptr->h_samp_factor = (c >> 4) & 15; + compptr->v_samp_factor = (c ) & 15; + INPUT_BYTE(cinfo, compptr->quant_tbl_no, return FALSE); + + TRACEMS4(cinfo, 1, JTRC_SOF_COMPONENT, + compptr->component_id, compptr->h_samp_factor, + compptr->v_samp_factor, compptr->quant_tbl_no); + } + + cinfo->marker->saw_SOF = TRUE; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +LOCAL(boolean) +get_sos (j_decompress_ptr cinfo) +/* Process a SOS marker */ +{ + INT32 length; + int i, ci, n, c, cc; + jpeg_component_info * compptr; + INPUT_VARS(cinfo); + + if (! cinfo->marker->saw_SOF) + ERREXIT(cinfo, JERR_SOS_NO_SOF); + + INPUT_2BYTES(cinfo, length, return FALSE); + + INPUT_BYTE(cinfo, n, return FALSE); /* Number of components */ + + TRACEMS1(cinfo, 1, JTRC_SOS, n); + + if (length != (n * 2 + 6) || n < 1 || n > MAX_COMPS_IN_SCAN) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + cinfo->comps_in_scan = n; + + /* Collect the component-spec parameters */ + + for (i = 0; i < n; i++) { + INPUT_BYTE(cinfo, cc, return FALSE); + INPUT_BYTE(cinfo, c, return FALSE); + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (cc == compptr->component_id) + goto id_found; + } + + ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc); + + id_found: + + cinfo->cur_comp_info[i] = compptr; + compptr->dc_tbl_no = (c >> 4) & 15; + compptr->ac_tbl_no = (c ) & 15; + + TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc, + compptr->dc_tbl_no, compptr->ac_tbl_no); + } + + /* Collect the additional scan parameters Ss, Se, Ah/Al. */ + INPUT_BYTE(cinfo, c, return FALSE); + cinfo->Ss = c; + INPUT_BYTE(cinfo, c, return FALSE); + cinfo->Se = c; + INPUT_BYTE(cinfo, c, return FALSE); + cinfo->Ah = (c >> 4) & 15; + cinfo->Al = (c ) & 15; + + TRACEMS4(cinfo, 1, JTRC_SOS_PARAMS, cinfo->Ss, cinfo->Se, + cinfo->Ah, cinfo->Al); + + /* Prepare to scan data & restart markers */ + cinfo->marker->next_restart_num = 0; + + /* Count another SOS marker */ + cinfo->input_scan_number++; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +#ifdef D_ARITH_CODING_SUPPORTED + +LOCAL(boolean) +get_dac (j_decompress_ptr cinfo) +/* Process a DAC marker */ +{ + INT32 length; + int index, val; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + while (length > 0) { + INPUT_BYTE(cinfo, index, return FALSE); + INPUT_BYTE(cinfo, val, return FALSE); + + length -= 2; + + TRACEMS2(cinfo, 1, JTRC_DAC, index, val); + + if (index < 0 || index >= (2*NUM_ARITH_TBLS)) + ERREXIT1(cinfo, JERR_DAC_INDEX, index); + + if (index >= NUM_ARITH_TBLS) { /* define AC table */ + cinfo->arith_ac_K[index-NUM_ARITH_TBLS] = (UINT8) val; + } else { /* define DC table */ + cinfo->arith_dc_L[index] = (UINT8) (val & 0x0F); + cinfo->arith_dc_U[index] = (UINT8) (val >> 4); + if (cinfo->arith_dc_L[index] > cinfo->arith_dc_U[index]) + ERREXIT1(cinfo, JERR_DAC_VALUE, val); + } + } + + if (length != 0) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + INPUT_SYNC(cinfo); + return TRUE; +} + +#else /* ! D_ARITH_CODING_SUPPORTED */ + +#define get_dac(cinfo) skip_variable(cinfo) + +#endif /* D_ARITH_CODING_SUPPORTED */ + + +LOCAL(boolean) +get_dht (j_decompress_ptr cinfo) +/* Process a DHT marker */ +{ + INT32 length; + UINT8 bits[17]; + UINT8 huffval[256]; + int i, index, count; + JHUFF_TBL **htblptr; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + while (length > 16) { + INPUT_BYTE(cinfo, index, return FALSE); + + TRACEMS1(cinfo, 1, JTRC_DHT, index); + + bits[0] = 0; + count = 0; + for (i = 1; i <= 16; i++) { + INPUT_BYTE(cinfo, bits[i], return FALSE); + count += bits[i]; + } + + length -= 1 + 16; + + TRACEMS8(cinfo, 2, JTRC_HUFFBITS, + bits[1], bits[2], bits[3], bits[4], + bits[5], bits[6], bits[7], bits[8]); + TRACEMS8(cinfo, 2, JTRC_HUFFBITS, + bits[9], bits[10], bits[11], bits[12], + bits[13], bits[14], bits[15], bits[16]); + + /* Here we just do minimal validation of the counts to avoid walking + * off the end of our table space. jdhuff.c will check more carefully. + */ + if (count > 256 || ((INT32) count) > length) + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + + for (i = 0; i < count; i++) + INPUT_BYTE(cinfo, huffval[i], return FALSE); + + length -= count; + + if (index & 0x10) { /* AC table definition */ + index -= 0x10; + htblptr = &cinfo->ac_huff_tbl_ptrs[index]; + } else { /* DC table definition */ + htblptr = &cinfo->dc_huff_tbl_ptrs[index]; + } + + if (index < 0 || index >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_DHT_INDEX, index); + + if (*htblptr == NULL) + *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); + + MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits)); + MEMCOPY((*htblptr)->huffval, huffval, SIZEOF((*htblptr)->huffval)); + } + + if (length != 0) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + INPUT_SYNC(cinfo); + return TRUE; +} + + +LOCAL(boolean) +get_dqt (j_decompress_ptr cinfo) +/* Process a DQT marker */ +{ + INT32 length; + int n, i, prec; + unsigned int tmp; + JQUANT_TBL *quant_ptr; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + while (length > 0) { + INPUT_BYTE(cinfo, n, return FALSE); + prec = n >> 4; + n &= 0x0F; + + TRACEMS2(cinfo, 1, JTRC_DQT, n, prec); + + if (n >= NUM_QUANT_TBLS) + ERREXIT1(cinfo, JERR_DQT_INDEX, n); + + if (cinfo->quant_tbl_ptrs[n] == NULL) + cinfo->quant_tbl_ptrs[n] = jpeg_alloc_quant_table((j_common_ptr) cinfo); + quant_ptr = cinfo->quant_tbl_ptrs[n]; + + for (i = 0; i < DCTSIZE2; i++) { + if (prec) + INPUT_2BYTES(cinfo, tmp, return FALSE); + else + INPUT_BYTE(cinfo, tmp, return FALSE); + /* We convert the zigzag-order table to natural array order. */ + quant_ptr->quantval[jpeg_natural_order[i]] = (UINT16) tmp; + } + + if (cinfo->err->trace_level >= 2) { + for (i = 0; i < DCTSIZE2; i += 8) { + TRACEMS8(cinfo, 2, JTRC_QUANTVALS, + quant_ptr->quantval[i], quant_ptr->quantval[i+1], + quant_ptr->quantval[i+2], quant_ptr->quantval[i+3], + quant_ptr->quantval[i+4], quant_ptr->quantval[i+5], + quant_ptr->quantval[i+6], quant_ptr->quantval[i+7]); + } + } + + length -= DCTSIZE2+1; + if (prec) length -= DCTSIZE2; + } + + if (length != 0) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + INPUT_SYNC(cinfo); + return TRUE; +} + + +LOCAL(boolean) +get_dri (j_decompress_ptr cinfo) +/* Process a DRI marker */ +{ + INT32 length; + unsigned int tmp; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + + if (length != 4) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + INPUT_2BYTES(cinfo, tmp, return FALSE); + + TRACEMS1(cinfo, 1, JTRC_DRI, tmp); + + cinfo->restart_interval = tmp; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +/* + * Routines for processing APPn and COM markers. + * These are either saved in memory or discarded, per application request. + * APP0 and APP14 are specially checked to see if they are + * JFIF and Adobe markers, respectively. + */ + +#define APP0_DATA_LEN 14 /* Length of interesting data in APP0 */ +#define APP14_DATA_LEN 12 /* Length of interesting data in APP14 */ +#define APPN_DATA_LEN 14 /* Must be the largest of the above!! */ + + +LOCAL(void) +examine_app0 (j_decompress_ptr cinfo, JOCTET FAR * data, + unsigned int datalen, INT32 remaining) +/* Examine first few bytes from an APP0. + * Take appropriate action if it is a JFIF marker. + * datalen is # of bytes at data[], remaining is length of rest of marker data. + */ +{ + INT32 totallen = (INT32) datalen + remaining; + + if (datalen >= APP0_DATA_LEN && + GETJOCTET(data[0]) == 0x4A && + GETJOCTET(data[1]) == 0x46 && + GETJOCTET(data[2]) == 0x49 && + GETJOCTET(data[3]) == 0x46 && + GETJOCTET(data[4]) == 0) { + /* Found JFIF APP0 marker: save info */ + cinfo->saw_JFIF_marker = TRUE; + cinfo->JFIF_major_version = GETJOCTET(data[5]); + cinfo->JFIF_minor_version = GETJOCTET(data[6]); + cinfo->density_unit = GETJOCTET(data[7]); + cinfo->X_density = (GETJOCTET(data[8]) << 8) + GETJOCTET(data[9]); + cinfo->Y_density = (GETJOCTET(data[10]) << 8) + GETJOCTET(data[11]); + /* Check version. + * Major version must be 1, anything else signals an incompatible change. + * (We used to treat this as an error, but now it's a nonfatal warning, + * because some bozo at Hijaak couldn't read the spec.) + * Minor version should be 0..2, but process anyway if newer. + */ + if (cinfo->JFIF_major_version != 1) + WARNMS2(cinfo, JWRN_JFIF_MAJOR, + cinfo->JFIF_major_version, cinfo->JFIF_minor_version); + /* Generate trace messages */ + TRACEMS5(cinfo, 1, JTRC_JFIF, + cinfo->JFIF_major_version, cinfo->JFIF_minor_version, + cinfo->X_density, cinfo->Y_density, cinfo->density_unit); + /* Validate thumbnail dimensions and issue appropriate messages */ + if (GETJOCTET(data[12]) | GETJOCTET(data[13])) + TRACEMS2(cinfo, 1, JTRC_JFIF_THUMBNAIL, + GETJOCTET(data[12]), GETJOCTET(data[13])); + totallen -= APP0_DATA_LEN; + if (totallen != + ((INT32)GETJOCTET(data[12]) * (INT32)GETJOCTET(data[13]) * (INT32) 3)) + TRACEMS1(cinfo, 1, JTRC_JFIF_BADTHUMBNAILSIZE, (int) totallen); + } else if (datalen >= 6 && + GETJOCTET(data[0]) == 0x4A && + GETJOCTET(data[1]) == 0x46 && + GETJOCTET(data[2]) == 0x58 && + GETJOCTET(data[3]) == 0x58 && + GETJOCTET(data[4]) == 0) { + /* Found JFIF "JFXX" extension APP0 marker */ + /* The library doesn't actually do anything with these, + * but we try to produce a helpful trace message. + */ + switch (GETJOCTET(data[5])) { + case 0x10: + TRACEMS1(cinfo, 1, JTRC_THUMB_JPEG, (int) totallen); + break; + case 0x11: + TRACEMS1(cinfo, 1, JTRC_THUMB_PALETTE, (int) totallen); + break; + case 0x13: + TRACEMS1(cinfo, 1, JTRC_THUMB_RGB, (int) totallen); + break; + default: + TRACEMS2(cinfo, 1, JTRC_JFIF_EXTENSION, + GETJOCTET(data[5]), (int) totallen); + break; + } + } else { + /* Start of APP0 does not match "JFIF" or "JFXX", or too short */ + TRACEMS1(cinfo, 1, JTRC_APP0, (int) totallen); + } +} + + +LOCAL(void) +examine_app14 (j_decompress_ptr cinfo, JOCTET FAR * data, + unsigned int datalen, INT32 remaining) +/* Examine first few bytes from an APP14. + * Take appropriate action if it is an Adobe marker. + * datalen is # of bytes at data[], remaining is length of rest of marker data. + */ +{ + unsigned int version, flags0, flags1, transform; + + if (datalen >= APP14_DATA_LEN && + GETJOCTET(data[0]) == 0x41 && + GETJOCTET(data[1]) == 0x64 && + GETJOCTET(data[2]) == 0x6F && + GETJOCTET(data[3]) == 0x62 && + GETJOCTET(data[4]) == 0x65) { + /* Found Adobe APP14 marker */ + version = (GETJOCTET(data[5]) << 8) + GETJOCTET(data[6]); + flags0 = (GETJOCTET(data[7]) << 8) + GETJOCTET(data[8]); + flags1 = (GETJOCTET(data[9]) << 8) + GETJOCTET(data[10]); + transform = GETJOCTET(data[11]); + TRACEMS4(cinfo, 1, JTRC_ADOBE, version, flags0, flags1, transform); + cinfo->saw_Adobe_marker = TRUE; + cinfo->Adobe_transform = (UINT8) transform; + } else { + /* Start of APP14 does not match "Adobe", or too short */ + TRACEMS1(cinfo, 1, JTRC_APP14, (int) (datalen + remaining)); + } +} + + +METHODDEF(boolean) +get_interesting_appn (j_decompress_ptr cinfo) +/* Process an APP0 or APP14 marker without saving it */ +{ + INT32 length; + JOCTET b[APPN_DATA_LEN]; + unsigned int i, numtoread; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + /* get the interesting part of the marker data */ + if (length >= APPN_DATA_LEN) + numtoread = APPN_DATA_LEN; + else if (length > 0) + numtoread = (unsigned int) length; + else + numtoread = 0; + for (i = 0; i < numtoread; i++) + INPUT_BYTE(cinfo, b[i], return FALSE); + length -= numtoread; + + /* process it */ + switch (cinfo->unread_marker) { + case M_APP0: + examine_app0(cinfo, (JOCTET FAR *) b, numtoread, length); + break; + case M_APP14: + examine_app14(cinfo, (JOCTET FAR *) b, numtoread, length); + break; + default: + /* can't get here unless jpeg_save_markers chooses wrong processor */ + ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker); + break; + } + + /* skip any remaining data -- could be lots */ + INPUT_SYNC(cinfo); + if (length > 0) + (*cinfo->src->skip_input_data) (cinfo, (long) length); + + return TRUE; +} + + +#ifdef SAVE_MARKERS_SUPPORTED + +METHODDEF(boolean) +save_marker (j_decompress_ptr cinfo) +/* Save an APPn or COM marker into the marker list */ +{ + my_marker_ptr marker = (my_marker_ptr) cinfo->marker; + jpeg_saved_marker_ptr cur_marker = marker->cur_marker; + unsigned int bytes_read, data_length; + JOCTET FAR * data; + INT32 length = 0; + INPUT_VARS(cinfo); + + if (cur_marker == NULL) { + /* begin reading a marker */ + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + if (length >= 0) { /* watch out for bogus length word */ + /* figure out how much we want to save */ + unsigned int limit; + if (cinfo->unread_marker == (int) M_COM) + limit = marker->length_limit_COM; + else + limit = marker->length_limit_APPn[cinfo->unread_marker - (int) M_APP0]; + if ((unsigned int) length < limit) + limit = (unsigned int) length; + /* allocate and initialize the marker item */ + cur_marker = (jpeg_saved_marker_ptr) + (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(struct jpeg_marker_struct) + limit); + cur_marker->next = NULL; + cur_marker->marker = (UINT8) cinfo->unread_marker; + cur_marker->original_length = (unsigned int) length; + cur_marker->data_length = limit; + /* data area is just beyond the jpeg_marker_struct */ + data = cur_marker->data = (JOCTET FAR *) (cur_marker + 1); + marker->cur_marker = cur_marker; + marker->bytes_read = 0; + bytes_read = 0; + data_length = limit; + } else { + /* deal with bogus length word */ + bytes_read = data_length = 0; + data = NULL; + } + } else { + /* resume reading a marker */ + bytes_read = marker->bytes_read; + data_length = cur_marker->data_length; + data = cur_marker->data + bytes_read; + } + + while (bytes_read < data_length) { + INPUT_SYNC(cinfo); /* move the restart point to here */ + marker->bytes_read = bytes_read; + /* If there's not at least one byte in buffer, suspend */ + MAKE_BYTE_AVAIL(cinfo, return FALSE); + /* Copy bytes with reasonable rapidity */ + while (bytes_read < data_length && bytes_in_buffer > 0) { + *data++ = *next_input_byte++; + bytes_in_buffer--; + bytes_read++; + } + } + + /* Done reading what we want to read */ + if (cur_marker != NULL) { /* will be NULL if bogus length word */ + /* Add new marker to end of list */ + if (cinfo->marker_list == NULL) { + cinfo->marker_list = cur_marker; + } else { + jpeg_saved_marker_ptr prev = cinfo->marker_list; + while (prev->next != NULL) + prev = prev->next; + prev->next = cur_marker; + } + /* Reset pointer & calc remaining data length */ + data = cur_marker->data; + length = cur_marker->original_length - data_length; + } + /* Reset to initial state for next marker */ + marker->cur_marker = NULL; + + /* Process the marker if interesting; else just make a generic trace msg */ + switch (cinfo->unread_marker) { + case M_APP0: + examine_app0(cinfo, data, data_length, length); + break; + case M_APP14: + examine_app14(cinfo, data, data_length, length); + break; + default: + TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo->unread_marker, + (int) (data_length + length)); + break; + } + + /* skip any remaining data -- could be lots */ + INPUT_SYNC(cinfo); /* do before skip_input_data */ + if (length > 0) + (*cinfo->src->skip_input_data) (cinfo, (long) length); + + return TRUE; +} + +#endif /* SAVE_MARKERS_SUPPORTED */ + + +METHODDEF(boolean) +skip_variable (j_decompress_ptr cinfo) +/* Skip over an unknown or uninteresting variable-length marker */ +{ + INT32 length; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo->unread_marker, (int) length); + + INPUT_SYNC(cinfo); /* do before skip_input_data */ + if (length > 0) + (*cinfo->src->skip_input_data) (cinfo, (long) length); + + return TRUE; +} + + +/* + * Find the next JPEG marker, save it in cinfo->unread_marker. + * Returns FALSE if had to suspend before reaching a marker; + * in that case cinfo->unread_marker is unchanged. + * + * Note that the result might not be a valid marker code, + * but it will never be 0 or FF. + */ + +LOCAL(boolean) +next_marker (j_decompress_ptr cinfo) +{ + int c; + INPUT_VARS(cinfo); + + for (;;) { + INPUT_BYTE(cinfo, c, return FALSE); + /* Skip any non-FF bytes. + * This may look a bit inefficient, but it will not occur in a valid file. + * We sync after each discarded byte so that a suspending data source + * can discard the byte from its buffer. + */ + while (c != 0xFF) { + cinfo->marker->discarded_bytes++; + INPUT_SYNC(cinfo); + INPUT_BYTE(cinfo, c, return FALSE); + } + /* This loop swallows any duplicate FF bytes. Extra FFs are legal as + * pad bytes, so don't count them in discarded_bytes. We assume there + * will not be so many consecutive FF bytes as to overflow a suspending + * data source's input buffer. + */ + do { + INPUT_BYTE(cinfo, c, return FALSE); + } while (c == 0xFF); + if (c != 0) + break; /* found a valid marker, exit loop */ + /* Reach here if we found a stuffed-zero data sequence (FF/00). + * Discard it and loop back to try again. + */ + cinfo->marker->discarded_bytes += 2; + INPUT_SYNC(cinfo); + } + + if (cinfo->marker->discarded_bytes != 0) { + WARNMS2(cinfo, JWRN_EXTRANEOUS_DATA, cinfo->marker->discarded_bytes, c); + cinfo->marker->discarded_bytes = 0; + } + + cinfo->unread_marker = c; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +LOCAL(boolean) +first_marker (j_decompress_ptr cinfo) +/* Like next_marker, but used to obtain the initial SOI marker. */ +/* For this marker, we do not allow preceding garbage or fill; otherwise, + * we might well scan an entire input file before realizing it ain't JPEG. + * If an application wants to process non-JFIF files, it must seek to the + * SOI before calling the JPEG library. + */ +{ + int c, c2; + INPUT_VARS(cinfo); + + INPUT_BYTE(cinfo, c, return FALSE); + INPUT_BYTE(cinfo, c2, return FALSE); + if (c != 0xFF || c2 != (int) M_SOI) + ERREXIT2(cinfo, JERR_NO_SOI, c, c2); + + cinfo->unread_marker = c2; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +/* + * Read markers until SOS or EOI. + * + * Returns same codes as are defined for jpeg_consume_input: + * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. + */ + +METHODDEF(int) +read_markers (j_decompress_ptr cinfo) +{ + /* Outer loop repeats once for each marker. */ + for (;;) { + /* Collect the marker proper, unless we already did. */ + /* NB: first_marker() enforces the requirement that SOI appear first. */ + if (cinfo->unread_marker == 0) { + if (! cinfo->marker->saw_SOI) { + if (! first_marker(cinfo)) + return JPEG_SUSPENDED; + } else { + if (! next_marker(cinfo)) + return JPEG_SUSPENDED; + } + } + /* At this point cinfo->unread_marker contains the marker code and the + * input point is just past the marker proper, but before any parameters. + * A suspension will cause us to return with this state still true. + */ + switch (cinfo->unread_marker) { + case M_SOI: + if (! get_soi(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_SOF0: /* Baseline */ + case M_SOF1: /* Extended sequential, Huffman */ + if (! get_sof(cinfo, FALSE, FALSE)) + return JPEG_SUSPENDED; + break; + + case M_SOF2: /* Progressive, Huffman */ + if (! get_sof(cinfo, TRUE, FALSE)) + return JPEG_SUSPENDED; + break; + + case M_SOF9: /* Extended sequential, arithmetic */ + if (! get_sof(cinfo, FALSE, TRUE)) + return JPEG_SUSPENDED; + break; + + case M_SOF10: /* Progressive, arithmetic */ + if (! get_sof(cinfo, TRUE, TRUE)) + return JPEG_SUSPENDED; + break; + + /* Currently unsupported SOFn types */ + case M_SOF3: /* Lossless, Huffman */ + case M_SOF5: /* Differential sequential, Huffman */ + case M_SOF6: /* Differential progressive, Huffman */ + case M_SOF7: /* Differential lossless, Huffman */ + case M_JPG: /* Reserved for JPEG extensions */ + case M_SOF11: /* Lossless, arithmetic */ + case M_SOF13: /* Differential sequential, arithmetic */ + case M_SOF14: /* Differential progressive, arithmetic */ + case M_SOF15: /* Differential lossless, arithmetic */ + ERREXIT1(cinfo, JERR_SOF_UNSUPPORTED, cinfo->unread_marker); + break; + + case M_SOS: + if (! get_sos(cinfo)) + return JPEG_SUSPENDED; + cinfo->unread_marker = 0; /* processed the marker */ + return JPEG_REACHED_SOS; + + case M_EOI: + TRACEMS(cinfo, 1, JTRC_EOI); + cinfo->unread_marker = 0; /* processed the marker */ + return JPEG_REACHED_EOI; + + case M_DAC: + if (! get_dac(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_DHT: + if (! get_dht(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_DQT: + if (! get_dqt(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_DRI: + if (! get_dri(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_APP0: + case M_APP1: + case M_APP2: + case M_APP3: + case M_APP4: + case M_APP5: + case M_APP6: + case M_APP7: + case M_APP8: + case M_APP9: + case M_APP10: + case M_APP11: + case M_APP12: + case M_APP13: + case M_APP14: + case M_APP15: + if (! (*((my_marker_ptr) cinfo->marker)->process_APPn[ + cinfo->unread_marker - (int) M_APP0]) (cinfo)) + return JPEG_SUSPENDED; + break; + + case M_COM: + if (! (*((my_marker_ptr) cinfo->marker)->process_COM) (cinfo)) + return JPEG_SUSPENDED; + break; + + case M_RST0: /* these are all parameterless */ + case M_RST1: + case M_RST2: + case M_RST3: + case M_RST4: + case M_RST5: + case M_RST6: + case M_RST7: + case M_TEM: + TRACEMS1(cinfo, 1, JTRC_PARMLESS_MARKER, cinfo->unread_marker); + break; + + case M_DNL: /* Ignore DNL ... perhaps the wrong thing */ + if (! skip_variable(cinfo)) + return JPEG_SUSPENDED; + break; + + default: /* must be DHP, EXP, JPGn, or RESn */ + /* For now, we treat the reserved markers as fatal errors since they are + * likely to be used to signal incompatible JPEG Part 3 extensions. + * Once the JPEG 3 version-number marker is well defined, this code + * ought to change! + */ + ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker); + break; + } + /* Successfully processed marker, so reset state variable */ + cinfo->unread_marker = 0; + } /* end loop */ +} + + +/* + * Read a restart marker, which is expected to appear next in the datastream; + * if the marker is not there, take appropriate recovery action. + * Returns FALSE if suspension is required. + * + * This is called by the entropy decoder after it has read an appropriate + * number of MCUs. cinfo->unread_marker may be nonzero if the entropy decoder + * has already read a marker from the data source. Under normal conditions + * cinfo->unread_marker will be reset to 0 before returning; if not reset, + * it holds a marker which the decoder will be unable to read past. + */ + +METHODDEF(boolean) +read_restart_marker (j_decompress_ptr cinfo) +{ + /* Obtain a marker unless we already did. */ + /* Note that next_marker will complain if it skips any data. */ + if (cinfo->unread_marker == 0) { + if (! next_marker(cinfo)) + return FALSE; + } + + if (cinfo->unread_marker == + ((int) M_RST0 + cinfo->marker->next_restart_num)) { + /* Normal case --- swallow the marker and let entropy decoder continue */ + TRACEMS1(cinfo, 3, JTRC_RST, cinfo->marker->next_restart_num); + cinfo->unread_marker = 0; + } else { + /* Uh-oh, the restart markers have been messed up. */ + /* Let the data source manager determine how to resync. */ + if (! (*cinfo->src->resync_to_restart) (cinfo, + cinfo->marker->next_restart_num)) + return FALSE; + } + + /* Update next-restart state */ + cinfo->marker->next_restart_num = (cinfo->marker->next_restart_num + 1) & 7; + + return TRUE; +} + + +/* + * This is the default resync_to_restart method for data source managers + * to use if they don't have any better approach. Some data source managers + * may be able to back up, or may have additional knowledge about the data + * which permits a more intelligent recovery strategy; such managers would + * presumably supply their own resync method. + * + * read_restart_marker calls resync_to_restart if it finds a marker other than + * the restart marker it was expecting. (This code is *not* used unless + * a nonzero restart interval has been declared.) cinfo->unread_marker is + * the marker code actually found (might be anything, except 0 or FF). + * The desired restart marker number (0..7) is passed as a parameter. + * This routine is supposed to apply whatever error recovery strategy seems + * appropriate in order to position the input stream to the next data segment. + * Note that cinfo->unread_marker is treated as a marker appearing before + * the current data-source input point; usually it should be reset to zero + * before returning. + * Returns FALSE if suspension is required. + * + * This implementation is substantially constrained by wanting to treat the + * input as a data stream; this means we can't back up. Therefore, we have + * only the following actions to work with: + * 1. Simply discard the marker and let the entropy decoder resume at next + * byte of file. + * 2. Read forward until we find another marker, discarding intervening + * data. (In theory we could look ahead within the current bufferload, + * without having to discard data if we don't find the desired marker. + * This idea is not implemented here, in part because it makes behavior + * dependent on buffer size and chance buffer-boundary positions.) + * 3. Leave the marker unread (by failing to zero cinfo->unread_marker). + * This will cause the entropy decoder to process an empty data segment, + * inserting dummy zeroes, and then we will reprocess the marker. + * + * #2 is appropriate if we think the desired marker lies ahead, while #3 is + * appropriate if the found marker is a future restart marker (indicating + * that we have missed the desired restart marker, probably because it got + * corrupted). + * We apply #2 or #3 if the found marker is a restart marker no more than + * two counts behind or ahead of the expected one. We also apply #2 if the + * found marker is not a legal JPEG marker code (it's certainly bogus data). + * If the found marker is a restart marker more than 2 counts away, we do #1 + * (too much risk that the marker is erroneous; with luck we will be able to + * resync at some future point). + * For any valid non-restart JPEG marker, we apply #3. This keeps us from + * overrunning the end of a scan. An implementation limited to single-scan + * files might find it better to apply #2 for markers other than EOI, since + * any other marker would have to be bogus data in that case. + */ + +GLOBAL(boolean) +jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired) +{ + int marker = cinfo->unread_marker; + int action = 1; + + /* Always put up a warning. */ + WARNMS2(cinfo, JWRN_MUST_RESYNC, marker, desired); + + /* Outer loop handles repeated decision after scanning forward. */ + for (;;) { + if (marker < (int) M_SOF0) + action = 2; /* invalid marker */ + else if (marker < (int) M_RST0 || marker > (int) M_RST7) + action = 3; /* valid non-restart marker */ + else { + if (marker == ((int) M_RST0 + ((desired+1) & 7)) || + marker == ((int) M_RST0 + ((desired+2) & 7))) + action = 3; /* one of the next two expected restarts */ + else if (marker == ((int) M_RST0 + ((desired-1) & 7)) || + marker == ((int) M_RST0 + ((desired-2) & 7))) + action = 2; /* a prior restart, so advance */ + else + action = 1; /* desired restart or too far away */ + } + TRACEMS2(cinfo, 4, JTRC_RECOVERY_ACTION, marker, action); + switch (action) { + case 1: + /* Discard marker and let entropy decoder resume processing. */ + cinfo->unread_marker = 0; + return TRUE; + case 2: + /* Scan to the next marker, and repeat the decision loop. */ + if (! next_marker(cinfo)) + return FALSE; + marker = cinfo->unread_marker; + break; + case 3: + /* Return without advancing past this marker. */ + /* Entropy decoder will be forced to process an empty segment. */ + return TRUE; + } + } /* end loop */ +} + + +/* + * Reset marker processing state to begin a fresh datastream. + */ + +METHODDEF(void) +reset_marker_reader (j_decompress_ptr cinfo) +{ + my_marker_ptr marker = (my_marker_ptr) cinfo->marker; + + cinfo->comp_info = NULL; /* until allocated by get_sof */ + cinfo->input_scan_number = 0; /* no SOS seen yet */ + cinfo->unread_marker = 0; /* no pending marker */ + marker->pub.saw_SOI = FALSE; /* set internal state too */ + marker->pub.saw_SOF = FALSE; + marker->pub.discarded_bytes = 0; + marker->cur_marker = NULL; +} + + +/* + * Initialize the marker reader module. + * This is called only once, when the decompression object is created. + */ + +GLOBAL(void) +jinit_marker_reader (j_decompress_ptr cinfo) +{ + my_marker_ptr marker; + int i; + + /* Create subobject in permanent pool */ + marker = (my_marker_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + SIZEOF(my_marker_reader)); + cinfo->marker = (struct jpeg_marker_reader *) marker; + /* Initialize public method pointers */ + marker->pub.reset_marker_reader = reset_marker_reader; + marker->pub.read_markers = read_markers; + marker->pub.read_restart_marker = read_restart_marker; + /* Initialize COM/APPn processing. + * By default, we examine and then discard APP0 and APP14, + * but simply discard COM and all other APPn. + */ + marker->process_COM = skip_variable; + marker->length_limit_COM = 0; + for (i = 0; i < 16; i++) { + marker->process_APPn[i] = skip_variable; + marker->length_limit_APPn[i] = 0; + } + marker->process_APPn[0] = get_interesting_appn; + marker->process_APPn[14] = get_interesting_appn; + /* Reset marker processing state */ + reset_marker_reader(cinfo); +} + + +/* + * Control saving of COM and APPn markers into marker_list. + */ + +#ifdef SAVE_MARKERS_SUPPORTED + +GLOBAL(void) +jpeg_save_markers (j_decompress_ptr cinfo, int marker_code, + unsigned int length_limit) +{ + my_marker_ptr marker = (my_marker_ptr) cinfo->marker; + long maxlength; + jpeg_marker_parser_method processor; + + /* Length limit mustn't be larger than what we can allocate + * (should only be a concern in a 16-bit environment). + */ + maxlength = cinfo->mem->max_alloc_chunk - SIZEOF(struct jpeg_marker_struct); + if (((long) length_limit) > maxlength) + length_limit = (unsigned int) maxlength; + + /* Choose processor routine to use. + * APP0/APP14 have special requirements. + */ + if (length_limit) { + processor = save_marker; + /* If saving APP0/APP14, save at least enough for our internal use. */ + if (marker_code == (int) M_APP0 && length_limit < APP0_DATA_LEN) + length_limit = APP0_DATA_LEN; + else if (marker_code == (int) M_APP14 && length_limit < APP14_DATA_LEN) + length_limit = APP14_DATA_LEN; + } else { + processor = skip_variable; + /* If discarding APP0/APP14, use our regular on-the-fly processor. */ + if (marker_code == (int) M_APP0 || marker_code == (int) M_APP14) + processor = get_interesting_appn; + } + + if (marker_code == (int) M_COM) { + marker->process_COM = processor; + marker->length_limit_COM = length_limit; + } else if (marker_code >= (int) M_APP0 && marker_code <= (int) M_APP15) { + marker->process_APPn[marker_code - (int) M_APP0] = processor; + marker->length_limit_APPn[marker_code - (int) M_APP0] = length_limit; + } else + ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code); +} + +#endif /* SAVE_MARKERS_SUPPORTED */ + + +/* + * Install a special processing method for COM or APPn markers. + */ + +GLOBAL(void) +jpeg_set_marker_processor (j_decompress_ptr cinfo, int marker_code, + jpeg_marker_parser_method routine) +{ + my_marker_ptr marker = (my_marker_ptr) cinfo->marker; + + if (marker_code == (int) M_COM) + marker->process_COM = routine; + else if (marker_code >= (int) M_APP0 && marker_code <= (int) M_APP15) + marker->process_APPn[marker_code - (int) M_APP0] = routine; + else + ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code); +} diff --git a/gtkmm-osx/jpeg-6b/jdmaster.c b/gtkmm-osx/jpeg-6b/jdmaster.c new file mode 100644 index 0000000..2802c5b --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jdmaster.c @@ -0,0 +1,557 @@ +/* + * jdmaster.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains master control logic for the JPEG decompressor. + * These routines are concerned with selecting the modules to be executed + * and with determining the number of passes and the work to be done in each + * pass. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private state */ + +typedef struct { + struct jpeg_decomp_master pub; /* public fields */ + + int pass_number; /* # of passes completed */ + + boolean using_merged_upsample; /* TRUE if using merged upsample/cconvert */ + + /* Saved references to initialized quantizer modules, + * in case we need to switch modes. + */ + struct jpeg_color_quantizer * quantizer_1pass; + struct jpeg_color_quantizer * quantizer_2pass; +} my_decomp_master; + +typedef my_decomp_master * my_master_ptr; + + +/* + * Determine whether merged upsample/color conversion should be used. + * CRUCIAL: this must match the actual capabilities of jdmerge.c! + */ + +LOCAL(boolean) +use_merged_upsample (j_decompress_ptr cinfo) +{ +#ifdef UPSAMPLE_MERGING_SUPPORTED + /* Merging is the equivalent of plain box-filter upsampling */ + if (cinfo->do_fancy_upsampling || cinfo->CCIR601_sampling) + return FALSE; + /* jdmerge.c only supports YCC=>RGB color conversion */ + if (cinfo->jpeg_color_space != JCS_YCbCr || cinfo->num_components != 3 || + cinfo->out_color_space != JCS_RGB || + cinfo->out_color_components != RGB_PIXELSIZE) + return FALSE; + /* and it only handles 2h1v or 2h2v sampling ratios */ + if (cinfo->comp_info[0].h_samp_factor != 2 || + cinfo->comp_info[1].h_samp_factor != 1 || + cinfo->comp_info[2].h_samp_factor != 1 || + cinfo->comp_info[0].v_samp_factor > 2 || + cinfo->comp_info[1].v_samp_factor != 1 || + cinfo->comp_info[2].v_samp_factor != 1) + return FALSE; + /* furthermore, it doesn't work if we've scaled the IDCTs differently */ + if (cinfo->comp_info[0].DCT_scaled_size != cinfo->min_DCT_scaled_size || + cinfo->comp_info[1].DCT_scaled_size != cinfo->min_DCT_scaled_size || + cinfo->comp_info[2].DCT_scaled_size != cinfo->min_DCT_scaled_size) + return FALSE; + /* ??? also need to test for upsample-time rescaling, when & if supported */ + return TRUE; /* by golly, it'll work... */ +#else + return FALSE; +#endif +} + + +/* + * Compute output image dimensions and related values. + * NOTE: this is exported for possible use by application. + * Hence it mustn't do anything that can't be done twice. + * Also note that it may be called before the master module is initialized! + */ + +GLOBAL(void) +jpeg_calc_output_dimensions (j_decompress_ptr cinfo) +/* Do computations that are needed before master selection phase */ +{ +#ifdef IDCT_SCALING_SUPPORTED + int ci; + jpeg_component_info *compptr; +#endif + + /* Prevent application from calling me at wrong times */ + if (cinfo->global_state != DSTATE_READY) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + +#ifdef IDCT_SCALING_SUPPORTED + + /* Compute actual output image dimensions and DCT scaling choices. */ + if (cinfo->scale_num * 8 <= cinfo->scale_denom) { + /* Provide 1/8 scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width, 8L); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, 8L); + cinfo->min_DCT_scaled_size = 1; + } else if (cinfo->scale_num * 4 <= cinfo->scale_denom) { + /* Provide 1/4 scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width, 4L); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, 4L); + cinfo->min_DCT_scaled_size = 2; + } else if (cinfo->scale_num * 2 <= cinfo->scale_denom) { + /* Provide 1/2 scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width, 2L); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, 2L); + cinfo->min_DCT_scaled_size = 4; + } else { + /* Provide 1/1 scaling */ + cinfo->output_width = cinfo->image_width; + cinfo->output_height = cinfo->image_height; + cinfo->min_DCT_scaled_size = DCTSIZE; + } + /* In selecting the actual DCT scaling for each component, we try to + * scale up the chroma components via IDCT scaling rather than upsampling. + * This saves time if the upsampler gets to use 1:1 scaling. + * Note this code assumes that the supported DCT scalings are powers of 2. + */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + int ssize = cinfo->min_DCT_scaled_size; + while (ssize < DCTSIZE && + (compptr->h_samp_factor * ssize * 2 <= + cinfo->max_h_samp_factor * cinfo->min_DCT_scaled_size) && + (compptr->v_samp_factor * ssize * 2 <= + cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size)) { + ssize = ssize * 2; + } + compptr->DCT_scaled_size = ssize; + } + + /* Recompute downsampled dimensions of components; + * application needs to know these if using raw downsampled data. + */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Size in samples, after IDCT scaling */ + compptr->downsampled_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * + (long) (compptr->h_samp_factor * compptr->DCT_scaled_size), + (long) (cinfo->max_h_samp_factor * DCTSIZE)); + compptr->downsampled_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * + (long) (compptr->v_samp_factor * compptr->DCT_scaled_size), + (long) (cinfo->max_v_samp_factor * DCTSIZE)); + } + +#else /* !IDCT_SCALING_SUPPORTED */ + + /* Hardwire it to "no scaling" */ + cinfo->output_width = cinfo->image_width; + cinfo->output_height = cinfo->image_height; + /* jdinput.c has already initialized DCT_scaled_size to DCTSIZE, + * and has computed unscaled downsampled_width and downsampled_height. + */ + +#endif /* IDCT_SCALING_SUPPORTED */ + + /* Report number of components in selected colorspace. */ + /* Probably this should be in the color conversion module... */ + switch (cinfo->out_color_space) { + case JCS_GRAYSCALE: + cinfo->out_color_components = 1; + break; + case JCS_RGB: +#if RGB_PIXELSIZE != 3 + cinfo->out_color_components = RGB_PIXELSIZE; + break; +#endif /* else share code with YCbCr */ + case JCS_YCbCr: + cinfo->out_color_components = 3; + break; + case JCS_CMYK: + case JCS_YCCK: + cinfo->out_color_components = 4; + break; + default: /* else must be same colorspace as in file */ + cinfo->out_color_components = cinfo->num_components; + break; + } + cinfo->output_components = (cinfo->quantize_colors ? 1 : + cinfo->out_color_components); + + /* See if upsampler will want to emit more than one row at a time */ + if (use_merged_upsample(cinfo)) + cinfo->rec_outbuf_height = cinfo->max_v_samp_factor; + else + cinfo->rec_outbuf_height = 1; +} + + +/* + * Several decompression processes need to range-limit values to the range + * 0..MAXJSAMPLE; the input value may fall somewhat outside this range + * due to noise introduced by quantization, roundoff error, etc. These + * processes are inner loops and need to be as fast as possible. On most + * machines, particularly CPUs with pipelines or instruction prefetch, + * a (subscript-check-less) C table lookup + * x = sample_range_limit[x]; + * is faster than explicit tests + * if (x < 0) x = 0; + * else if (x > MAXJSAMPLE) x = MAXJSAMPLE; + * These processes all use a common table prepared by the routine below. + * + * For most steps we can mathematically guarantee that the initial value + * of x is within MAXJSAMPLE+1 of the legal range, so a table running from + * -(MAXJSAMPLE+1) to 2*MAXJSAMPLE+1 is sufficient. But for the initial + * limiting step (just after the IDCT), a wildly out-of-range value is + * possible if the input data is corrupt. To avoid any chance of indexing + * off the end of memory and getting a bad-pointer trap, we perform the + * post-IDCT limiting thus: + * x = range_limit[x & MASK]; + * where MASK is 2 bits wider than legal sample data, ie 10 bits for 8-bit + * samples. Under normal circumstances this is more than enough range and + * a correct output will be generated; with bogus input data the mask will + * cause wraparound, and we will safely generate a bogus-but-in-range output. + * For the post-IDCT step, we want to convert the data from signed to unsigned + * representation by adding CENTERJSAMPLE at the same time that we limit it. + * So the post-IDCT limiting table ends up looking like this: + * CENTERJSAMPLE,CENTERJSAMPLE+1,...,MAXJSAMPLE, + * MAXJSAMPLE (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times), + * 0 (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times), + * 0,1,...,CENTERJSAMPLE-1 + * Negative inputs select values from the upper half of the table after + * masking. + * + * We can save some space by overlapping the start of the post-IDCT table + * with the simpler range limiting table. The post-IDCT table begins at + * sample_range_limit + CENTERJSAMPLE. + * + * Note that the table is allocated in near data space on PCs; it's small + * enough and used often enough to justify this. + */ + +LOCAL(void) +prepare_range_limit_table (j_decompress_ptr cinfo) +/* Allocate and fill in the sample_range_limit table */ +{ + JSAMPLE * table; + int i; + + table = (JSAMPLE *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (5 * (MAXJSAMPLE+1) + CENTERJSAMPLE) * SIZEOF(JSAMPLE)); + table += (MAXJSAMPLE+1); /* allow negative subscripts of simple table */ + cinfo->sample_range_limit = table; + /* First segment of "simple" table: limit[x] = 0 for x < 0 */ + MEMZERO(table - (MAXJSAMPLE+1), (MAXJSAMPLE+1) * SIZEOF(JSAMPLE)); + /* Main part of "simple" table: limit[x] = x */ + for (i = 0; i <= MAXJSAMPLE; i++) + table[i] = (JSAMPLE) i; + table += CENTERJSAMPLE; /* Point to where post-IDCT table starts */ + /* End of simple table, rest of first half of post-IDCT table */ + for (i = CENTERJSAMPLE; i < 2*(MAXJSAMPLE+1); i++) + table[i] = MAXJSAMPLE; + /* Second half of post-IDCT table */ + MEMZERO(table + (2 * (MAXJSAMPLE+1)), + (2 * (MAXJSAMPLE+1) - CENTERJSAMPLE) * SIZEOF(JSAMPLE)); + MEMCOPY(table + (4 * (MAXJSAMPLE+1) - CENTERJSAMPLE), + cinfo->sample_range_limit, CENTERJSAMPLE * SIZEOF(JSAMPLE)); +} + + +/* + * Master selection of decompression modules. + * This is done once at jpeg_start_decompress time. We determine + * which modules will be used and give them appropriate initialization calls. + * We also initialize the decompressor input side to begin consuming data. + * + * Since jpeg_read_header has finished, we know what is in the SOF + * and (first) SOS markers. We also have all the application parameter + * settings. + */ + +LOCAL(void) +master_selection (j_decompress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + boolean use_c_buffer; + long samplesperrow; + JDIMENSION jd_samplesperrow; + + /* Initialize dimensions and other stuff */ + jpeg_calc_output_dimensions(cinfo); + prepare_range_limit_table(cinfo); + + /* Width of an output scanline must be representable as JDIMENSION. */ + samplesperrow = (long) cinfo->output_width * (long) cinfo->out_color_components; + jd_samplesperrow = (JDIMENSION) samplesperrow; + if ((long) jd_samplesperrow != samplesperrow) + ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); + + /* Initialize my private state */ + master->pass_number = 0; + master->using_merged_upsample = use_merged_upsample(cinfo); + + /* Color quantizer selection */ + master->quantizer_1pass = NULL; + master->quantizer_2pass = NULL; + /* No mode changes if not using buffered-image mode. */ + if (! cinfo->quantize_colors || ! cinfo->buffered_image) { + cinfo->enable_1pass_quant = FALSE; + cinfo->enable_external_quant = FALSE; + cinfo->enable_2pass_quant = FALSE; + } + if (cinfo->quantize_colors) { + if (cinfo->raw_data_out) + ERREXIT(cinfo, JERR_NOTIMPL); + /* 2-pass quantizer only works in 3-component color space. */ + if (cinfo->out_color_components != 3) { + cinfo->enable_1pass_quant = TRUE; + cinfo->enable_external_quant = FALSE; + cinfo->enable_2pass_quant = FALSE; + cinfo->colormap = NULL; + } else if (cinfo->colormap != NULL) { + cinfo->enable_external_quant = TRUE; + } else if (cinfo->two_pass_quantize) { + cinfo->enable_2pass_quant = TRUE; + } else { + cinfo->enable_1pass_quant = TRUE; + } + + if (cinfo->enable_1pass_quant) { +#ifdef QUANT_1PASS_SUPPORTED + jinit_1pass_quantizer(cinfo); + master->quantizer_1pass = cinfo->cquantize; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } + + /* We use the 2-pass code to map to external colormaps. */ + if (cinfo->enable_2pass_quant || cinfo->enable_external_quant) { +#ifdef QUANT_2PASS_SUPPORTED + jinit_2pass_quantizer(cinfo); + master->quantizer_2pass = cinfo->cquantize; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } + /* If both quantizers are initialized, the 2-pass one is left active; + * this is necessary for starting with quantization to an external map. + */ + } + + /* Post-processing: in particular, color conversion first */ + if (! cinfo->raw_data_out) { + if (master->using_merged_upsample) { +#ifdef UPSAMPLE_MERGING_SUPPORTED + jinit_merged_upsampler(cinfo); /* does color conversion too */ +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + jinit_color_deconverter(cinfo); + jinit_upsampler(cinfo); + } + jinit_d_post_controller(cinfo, cinfo->enable_2pass_quant); + } + /* Inverse DCT */ + jinit_inverse_dct(cinfo); + /* Entropy decoding: either Huffman or arithmetic coding. */ + if (cinfo->arith_code) { + ERREXIT(cinfo, JERR_ARITH_NOTIMPL); + } else { + if (cinfo->progressive_mode) { +#ifdef D_PROGRESSIVE_SUPPORTED + jinit_phuff_decoder(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else + jinit_huff_decoder(cinfo); + } + + /* Initialize principal buffer controllers. */ + use_c_buffer = cinfo->inputctl->has_multiple_scans || cinfo->buffered_image; + jinit_d_coef_controller(cinfo, use_c_buffer); + + if (! cinfo->raw_data_out) + jinit_d_main_controller(cinfo, FALSE /* never need full buffer here */); + + /* We can now tell the memory manager to allocate virtual arrays. */ + (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); + + /* Initialize input side of decompressor to consume first scan. */ + (*cinfo->inputctl->start_input_pass) (cinfo); + +#ifdef D_MULTISCAN_FILES_SUPPORTED + /* If jpeg_start_decompress will read the whole file, initialize + * progress monitoring appropriately. The input step is counted + * as one pass. + */ + if (cinfo->progress != NULL && ! cinfo->buffered_image && + cinfo->inputctl->has_multiple_scans) { + int nscans; + /* Estimate number of scans to set pass_limit. */ + if (cinfo->progressive_mode) { + /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */ + nscans = 2 + 3 * cinfo->num_components; + } else { + /* For a nonprogressive multiscan file, estimate 1 scan per component. */ + nscans = cinfo->num_components; + } + cinfo->progress->pass_counter = 0L; + cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans; + cinfo->progress->completed_passes = 0; + cinfo->progress->total_passes = (cinfo->enable_2pass_quant ? 3 : 2); + /* Count the input pass as done */ + master->pass_number++; + } +#endif /* D_MULTISCAN_FILES_SUPPORTED */ +} + + +/* + * Per-pass setup. + * This is called at the beginning of each output pass. We determine which + * modules will be active during this pass and give them appropriate + * start_pass calls. We also set is_dummy_pass to indicate whether this + * is a "real" output pass or a dummy pass for color quantization. + * (In the latter case, jdapistd.c will crank the pass to completion.) + */ + +METHODDEF(void) +prepare_for_output_pass (j_decompress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + if (master->pub.is_dummy_pass) { +#ifdef QUANT_2PASS_SUPPORTED + /* Final pass of 2-pass quantization */ + master->pub.is_dummy_pass = FALSE; + (*cinfo->cquantize->start_pass) (cinfo, FALSE); + (*cinfo->post->start_pass) (cinfo, JBUF_CRANK_DEST); + (*cinfo->main->start_pass) (cinfo, JBUF_CRANK_DEST); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif /* QUANT_2PASS_SUPPORTED */ + } else { + if (cinfo->quantize_colors && cinfo->colormap == NULL) { + /* Select new quantization method */ + if (cinfo->two_pass_quantize && cinfo->enable_2pass_quant) { + cinfo->cquantize = master->quantizer_2pass; + master->pub.is_dummy_pass = TRUE; + } else if (cinfo->enable_1pass_quant) { + cinfo->cquantize = master->quantizer_1pass; + } else { + ERREXIT(cinfo, JERR_MODE_CHANGE); + } + } + (*cinfo->idct->start_pass) (cinfo); + (*cinfo->coef->start_output_pass) (cinfo); + if (! cinfo->raw_data_out) { + if (! master->using_merged_upsample) + (*cinfo->cconvert->start_pass) (cinfo); + (*cinfo->upsample->start_pass) (cinfo); + if (cinfo->quantize_colors) + (*cinfo->cquantize->start_pass) (cinfo, master->pub.is_dummy_pass); + (*cinfo->post->start_pass) (cinfo, + (master->pub.is_dummy_pass ? JBUF_SAVE_AND_PASS : JBUF_PASS_THRU)); + (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU); + } + } + + /* Set up progress monitor's pass info if present */ + if (cinfo->progress != NULL) { + cinfo->progress->completed_passes = master->pass_number; + cinfo->progress->total_passes = master->pass_number + + (master->pub.is_dummy_pass ? 2 : 1); + /* In buffered-image mode, we assume one more output pass if EOI not + * yet reached, but no more passes if EOI has been reached. + */ + if (cinfo->buffered_image && ! cinfo->inputctl->eoi_reached) { + cinfo->progress->total_passes += (cinfo->enable_2pass_quant ? 2 : 1); + } + } +} + + +/* + * Finish up at end of an output pass. + */ + +METHODDEF(void) +finish_output_pass (j_decompress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + if (cinfo->quantize_colors) + (*cinfo->cquantize->finish_pass) (cinfo); + master->pass_number++; +} + + +#ifdef D_MULTISCAN_FILES_SUPPORTED + +/* + * Switch to a new external colormap between output passes. + */ + +GLOBAL(void) +jpeg_new_colormap (j_decompress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + /* Prevent application from calling me at wrong times */ + if (cinfo->global_state != DSTATE_BUFIMAGE) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + if (cinfo->quantize_colors && cinfo->enable_external_quant && + cinfo->colormap != NULL) { + /* Select 2-pass quantizer for external colormap use */ + cinfo->cquantize = master->quantizer_2pass; + /* Notify quantizer of colormap change */ + (*cinfo->cquantize->new_color_map) (cinfo); + master->pub.is_dummy_pass = FALSE; /* just in case */ + } else + ERREXIT(cinfo, JERR_MODE_CHANGE); +} + +#endif /* D_MULTISCAN_FILES_SUPPORTED */ + + +/* + * Initialize master decompression control and select active modules. + * This is performed at the start of jpeg_start_decompress. + */ + +GLOBAL(void) +jinit_master_decompress (j_decompress_ptr cinfo) +{ + my_master_ptr master; + + master = (my_master_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_decomp_master)); + cinfo->master = (struct jpeg_decomp_master *) master; + master->pub.prepare_for_output_pass = prepare_for_output_pass; + master->pub.finish_output_pass = finish_output_pass; + + master->pub.is_dummy_pass = FALSE; + + master_selection(cinfo); +} diff --git a/gtkmm-osx/jpeg-6b/jdmerge.c b/gtkmm-osx/jpeg-6b/jdmerge.c new file mode 100644 index 0000000..3744446 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jdmerge.c @@ -0,0 +1,400 @@ +/* + * jdmerge.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains code for merged upsampling/color conversion. + * + * This file combines functions from jdsample.c and jdcolor.c; + * read those files first to understand what's going on. + * + * When the chroma components are to be upsampled by simple replication + * (ie, box filtering), we can save some work in color conversion by + * calculating all the output pixels corresponding to a pair of chroma + * samples at one time. In the conversion equations + * R = Y + K1 * Cr + * G = Y + K2 * Cb + K3 * Cr + * B = Y + K4 * Cb + * only the Y term varies among the group of pixels corresponding to a pair + * of chroma samples, so the rest of the terms can be calculated just once. + * At typical sampling ratios, this eliminates half or three-quarters of the + * multiplications needed for color conversion. + * + * This file currently provides implementations for the following cases: + * YCbCr => RGB color conversion only. + * Sampling ratios of 2h1v or 2h2v. + * No scaling needed at upsample time. + * Corner-aligned (non-CCIR601) sampling alignment. + * Other special cases could be added, but in most applications these are + * the only common cases. (For uncommon cases we fall back on the more + * general code in jdsample.c and jdcolor.c.) + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +#ifdef UPSAMPLE_MERGING_SUPPORTED + + +/* Private subobject */ + +typedef struct { + struct jpeg_upsampler pub; /* public fields */ + + /* Pointer to routine to do actual upsampling/conversion of one row group */ + JMETHOD(void, upmethod, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, + JSAMPARRAY output_buf)); + + /* Private state for YCC->RGB conversion */ + int * Cr_r_tab; /* => table for Cr to R conversion */ + int * Cb_b_tab; /* => table for Cb to B conversion */ + INT32 * Cr_g_tab; /* => table for Cr to G conversion */ + INT32 * Cb_g_tab; /* => table for Cb to G conversion */ + + /* For 2:1 vertical sampling, we produce two output rows at a time. + * We need a "spare" row buffer to hold the second output row if the + * application provides just a one-row buffer; we also use the spare + * to discard the dummy last row if the image height is odd. + */ + JSAMPROW spare_row; + boolean spare_full; /* T if spare buffer is occupied */ + + JDIMENSION out_row_width; /* samples per output row */ + JDIMENSION rows_to_go; /* counts rows remaining in image */ +} my_upsampler; + +typedef my_upsampler * my_upsample_ptr; + +#define SCALEBITS 16 /* speediest right-shift on some machines */ +#define ONE_HALF ((INT32) 1 << (SCALEBITS-1)) +#define FIX(x) ((INT32) ((x) * (1L<RGB colorspace conversion. + * This is taken directly from jdcolor.c; see that file for more info. + */ + +LOCAL(void) +build_ycc_rgb_table (j_decompress_ptr cinfo) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + int i; + INT32 x; + SHIFT_TEMPS + + upsample->Cr_r_tab = (int *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(int)); + upsample->Cb_b_tab = (int *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(int)); + upsample->Cr_g_tab = (INT32 *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(INT32)); + upsample->Cb_g_tab = (INT32 *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(INT32)); + + for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) { + /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */ + /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */ + /* Cr=>R value is nearest int to 1.40200 * x */ + upsample->Cr_r_tab[i] = (int) + RIGHT_SHIFT(FIX(1.40200) * x + ONE_HALF, SCALEBITS); + /* Cb=>B value is nearest int to 1.77200 * x */ + upsample->Cb_b_tab[i] = (int) + RIGHT_SHIFT(FIX(1.77200) * x + ONE_HALF, SCALEBITS); + /* Cr=>G value is scaled-up -0.71414 * x */ + upsample->Cr_g_tab[i] = (- FIX(0.71414)) * x; + /* Cb=>G value is scaled-up -0.34414 * x */ + /* We also add in ONE_HALF so that need not do it in inner loop */ + upsample->Cb_g_tab[i] = (- FIX(0.34414)) * x + ONE_HALF; + } +} + + +/* + * Initialize for an upsampling pass. + */ + +METHODDEF(void) +start_pass_merged_upsample (j_decompress_ptr cinfo) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + + /* Mark the spare buffer empty */ + upsample->spare_full = FALSE; + /* Initialize total-height counter for detecting bottom of image */ + upsample->rows_to_go = cinfo->output_height; +} + + +/* + * Control routine to do upsampling (and color conversion). + * + * The control routine just handles the row buffering considerations. + */ + +METHODDEF(void) +merged_2v_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +/* 2:1 vertical sampling case: may need a spare row. */ +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + JSAMPROW work_ptrs[2]; + JDIMENSION num_rows; /* number of rows returned to caller */ + + if (upsample->spare_full) { + /* If we have a spare row saved from a previous cycle, just return it. */ + jcopy_sample_rows(& upsample->spare_row, 0, output_buf + *out_row_ctr, 0, + 1, upsample->out_row_width); + num_rows = 1; + upsample->spare_full = FALSE; + } else { + /* Figure number of rows to return to caller. */ + num_rows = 2; + /* Not more than the distance to the end of the image. */ + if (num_rows > upsample->rows_to_go) + num_rows = upsample->rows_to_go; + /* And not more than what the client can accept: */ + out_rows_avail -= *out_row_ctr; + if (num_rows > out_rows_avail) + num_rows = out_rows_avail; + /* Create output pointer array for upsampler. */ + work_ptrs[0] = output_buf[*out_row_ctr]; + if (num_rows > 1) { + work_ptrs[1] = output_buf[*out_row_ctr + 1]; + } else { + work_ptrs[1] = upsample->spare_row; + upsample->spare_full = TRUE; + } + /* Now do the upsampling. */ + (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr, work_ptrs); + } + + /* Adjust counts */ + *out_row_ctr += num_rows; + upsample->rows_to_go -= num_rows; + /* When the buffer is emptied, declare this input row group consumed */ + if (! upsample->spare_full) + (*in_row_group_ctr)++; +} + + +METHODDEF(void) +merged_1v_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +/* 1:1 vertical sampling case: much easier, never need a spare row. */ +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + + /* Just do the upsampling. */ + (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr, + output_buf + *out_row_ctr); + /* Adjust counts */ + (*out_row_ctr)++; + (*in_row_group_ctr)++; +} + + +/* + * These are the routines invoked by the control routines to do + * the actual upsampling/conversion. One row group is processed per call. + * + * Note: since we may be writing directly into application-supplied buffers, + * we have to be honest about the output width; we can't assume the buffer + * has been rounded up to an even width. + */ + + +/* + * Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical. + */ + +METHODDEF(void) +h2v1_merged_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, + JSAMPARRAY output_buf) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + register int y, cred, cgreen, cblue; + int cb, cr; + register JSAMPROW outptr; + JSAMPROW inptr0, inptr1, inptr2; + JDIMENSION col; + /* copy these pointers into registers if possible */ + register JSAMPLE * range_limit = cinfo->sample_range_limit; + int * Crrtab = upsample->Cr_r_tab; + int * Cbbtab = upsample->Cb_b_tab; + INT32 * Crgtab = upsample->Cr_g_tab; + INT32 * Cbgtab = upsample->Cb_g_tab; + SHIFT_TEMPS + + inptr0 = input_buf[0][in_row_group_ctr]; + inptr1 = input_buf[1][in_row_group_ctr]; + inptr2 = input_buf[2][in_row_group_ctr]; + outptr = output_buf[0]; + /* Loop for each pair of output pixels */ + for (col = cinfo->output_width >> 1; col > 0; col--) { + /* Do the chroma part of the calculation */ + cb = GETJSAMPLE(*inptr1++); + cr = GETJSAMPLE(*inptr2++); + cred = Crrtab[cr]; + cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); + cblue = Cbbtab[cb]; + /* Fetch 2 Y values and emit 2 pixels */ + y = GETJSAMPLE(*inptr0++); + outptr[RGB_RED] = range_limit[y + cred]; + outptr[RGB_GREEN] = range_limit[y + cgreen]; + outptr[RGB_BLUE] = range_limit[y + cblue]; + outptr += RGB_PIXELSIZE; + y = GETJSAMPLE(*inptr0++); + outptr[RGB_RED] = range_limit[y + cred]; + outptr[RGB_GREEN] = range_limit[y + cgreen]; + outptr[RGB_BLUE] = range_limit[y + cblue]; + outptr += RGB_PIXELSIZE; + } + /* If image width is odd, do the last output column separately */ + if (cinfo->output_width & 1) { + cb = GETJSAMPLE(*inptr1); + cr = GETJSAMPLE(*inptr2); + cred = Crrtab[cr]; + cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); + cblue = Cbbtab[cb]; + y = GETJSAMPLE(*inptr0); + outptr[RGB_RED] = range_limit[y + cred]; + outptr[RGB_GREEN] = range_limit[y + cgreen]; + outptr[RGB_BLUE] = range_limit[y + cblue]; + } +} + + +/* + * Upsample and color convert for the case of 2:1 horizontal and 2:1 vertical. + */ + +METHODDEF(void) +h2v2_merged_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, + JSAMPARRAY output_buf) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + register int y, cred, cgreen, cblue; + int cb, cr; + register JSAMPROW outptr0, outptr1; + JSAMPROW inptr00, inptr01, inptr1, inptr2; + JDIMENSION col; + /* copy these pointers into registers if possible */ + register JSAMPLE * range_limit = cinfo->sample_range_limit; + int * Crrtab = upsample->Cr_r_tab; + int * Cbbtab = upsample->Cb_b_tab; + INT32 * Crgtab = upsample->Cr_g_tab; + INT32 * Cbgtab = upsample->Cb_g_tab; + SHIFT_TEMPS + + inptr00 = input_buf[0][in_row_group_ctr*2]; + inptr01 = input_buf[0][in_row_group_ctr*2 + 1]; + inptr1 = input_buf[1][in_row_group_ctr]; + inptr2 = input_buf[2][in_row_group_ctr]; + outptr0 = output_buf[0]; + outptr1 = output_buf[1]; + /* Loop for each group of output pixels */ + for (col = cinfo->output_width >> 1; col > 0; col--) { + /* Do the chroma part of the calculation */ + cb = GETJSAMPLE(*inptr1++); + cr = GETJSAMPLE(*inptr2++); + cred = Crrtab[cr]; + cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); + cblue = Cbbtab[cb]; + /* Fetch 4 Y values and emit 4 pixels */ + y = GETJSAMPLE(*inptr00++); + outptr0[RGB_RED] = range_limit[y + cred]; + outptr0[RGB_GREEN] = range_limit[y + cgreen]; + outptr0[RGB_BLUE] = range_limit[y + cblue]; + outptr0 += RGB_PIXELSIZE; + y = GETJSAMPLE(*inptr00++); + outptr0[RGB_RED] = range_limit[y + cred]; + outptr0[RGB_GREEN] = range_limit[y + cgreen]; + outptr0[RGB_BLUE] = range_limit[y + cblue]; + outptr0 += RGB_PIXELSIZE; + y = GETJSAMPLE(*inptr01++); + outptr1[RGB_RED] = range_limit[y + cred]; + outptr1[RGB_GREEN] = range_limit[y + cgreen]; + outptr1[RGB_BLUE] = range_limit[y + cblue]; + outptr1 += RGB_PIXELSIZE; + y = GETJSAMPLE(*inptr01++); + outptr1[RGB_RED] = range_limit[y + cred]; + outptr1[RGB_GREEN] = range_limit[y + cgreen]; + outptr1[RGB_BLUE] = range_limit[y + cblue]; + outptr1 += RGB_PIXELSIZE; + } + /* If image width is odd, do the last output column separately */ + if (cinfo->output_width & 1) { + cb = GETJSAMPLE(*inptr1); + cr = GETJSAMPLE(*inptr2); + cred = Crrtab[cr]; + cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); + cblue = Cbbtab[cb]; + y = GETJSAMPLE(*inptr00); + outptr0[RGB_RED] = range_limit[y + cred]; + outptr0[RGB_GREEN] = range_limit[y + cgreen]; + outptr0[RGB_BLUE] = range_limit[y + cblue]; + y = GETJSAMPLE(*inptr01); + outptr1[RGB_RED] = range_limit[y + cred]; + outptr1[RGB_GREEN] = range_limit[y + cgreen]; + outptr1[RGB_BLUE] = range_limit[y + cblue]; + } +} + + +/* + * Module initialization routine for merged upsampling/color conversion. + * + * NB: this is called under the conditions determined by use_merged_upsample() + * in jdmaster.c. That routine MUST correspond to the actual capabilities + * of this module; no safety checks are made here. + */ + +GLOBAL(void) +jinit_merged_upsampler (j_decompress_ptr cinfo) +{ + my_upsample_ptr upsample; + + upsample = (my_upsample_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_upsampler)); + cinfo->upsample = (struct jpeg_upsampler *) upsample; + upsample->pub.start_pass = start_pass_merged_upsample; + upsample->pub.need_context_rows = FALSE; + + upsample->out_row_width = cinfo->output_width * cinfo->out_color_components; + + if (cinfo->max_v_samp_factor == 2) { + upsample->pub.upsample = merged_2v_upsample; + upsample->upmethod = h2v2_merged_upsample; + /* Allocate a spare row buffer */ + upsample->spare_row = (JSAMPROW) + (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (size_t) (upsample->out_row_width * SIZEOF(JSAMPLE))); + } else { + upsample->pub.upsample = merged_1v_upsample; + upsample->upmethod = h2v1_merged_upsample; + /* No spare row needed */ + upsample->spare_row = NULL; + } + + build_ycc_rgb_table(cinfo); +} + +#endif /* UPSAMPLE_MERGING_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/jdphuff.c b/gtkmm-osx/jpeg-6b/jdphuff.c new file mode 100644 index 0000000..2267809 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jdphuff.c @@ -0,0 +1,668 @@ +/* + * jdphuff.c + * + * Copyright (C) 1995-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains Huffman entropy decoding routines for progressive JPEG. + * + * Much of the complexity here has to do with supporting input suspension. + * If the data source module demands suspension, we want to be able to back + * up to the start of the current MCU. To do this, we copy state variables + * into local working storage, and update them back to the permanent + * storage only upon successful completion of an MCU. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdhuff.h" /* Declarations shared with jdhuff.c */ + + +#ifdef D_PROGRESSIVE_SUPPORTED + +/* + * Expanded entropy decoder object for progressive Huffman decoding. + * + * The savable_state subrecord contains fields that change within an MCU, + * but must not be updated permanently until we complete the MCU. + */ + +typedef struct { + unsigned int EOBRUN; /* remaining EOBs in EOBRUN */ + int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ +} savable_state; + +/* This macro is to work around compilers with missing or broken + * structure assignment. You'll need to fix this code if you have + * such a compiler and you change MAX_COMPS_IN_SCAN. + */ + +#ifndef NO_STRUCT_ASSIGN +#define ASSIGN_STATE(dest,src) ((dest) = (src)) +#else +#if MAX_COMPS_IN_SCAN == 4 +#define ASSIGN_STATE(dest,src) \ + ((dest).EOBRUN = (src).EOBRUN, \ + (dest).last_dc_val[0] = (src).last_dc_val[0], \ + (dest).last_dc_val[1] = (src).last_dc_val[1], \ + (dest).last_dc_val[2] = (src).last_dc_val[2], \ + (dest).last_dc_val[3] = (src).last_dc_val[3]) +#endif +#endif + + +typedef struct { + struct jpeg_entropy_decoder pub; /* public fields */ + + /* These fields are loaded into local variables at start of each MCU. + * In case of suspension, we exit WITHOUT updating them. + */ + bitread_perm_state bitstate; /* Bit buffer at start of MCU */ + savable_state saved; /* Other state at start of MCU */ + + /* These fields are NOT loaded into local working state. */ + unsigned int restarts_to_go; /* MCUs left in this restart interval */ + + /* Pointers to derived tables (these workspaces have image lifespan) */ + d_derived_tbl * derived_tbls[NUM_HUFF_TBLS]; + + d_derived_tbl * ac_derived_tbl; /* active table during an AC scan */ +} phuff_entropy_decoder; + +typedef phuff_entropy_decoder * phuff_entropy_ptr; + +/* Forward declarations */ +METHODDEF(boolean) decode_mcu_DC_first JPP((j_decompress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(boolean) decode_mcu_AC_first JPP((j_decompress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(boolean) decode_mcu_DC_refine JPP((j_decompress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(boolean) decode_mcu_AC_refine JPP((j_decompress_ptr cinfo, + JBLOCKROW *MCU_data)); + + +/* + * Initialize for a Huffman-compressed scan. + */ + +METHODDEF(void) +start_pass_phuff_decoder (j_decompress_ptr cinfo) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + boolean is_DC_band, bad; + int ci, coefi, tbl; + int *coef_bit_ptr; + jpeg_component_info * compptr; + + is_DC_band = (cinfo->Ss == 0); + + /* Validate scan parameters */ + bad = FALSE; + if (is_DC_band) { + if (cinfo->Se != 0) + bad = TRUE; + } else { + /* need not check Ss/Se < 0 since they came from unsigned bytes */ + if (cinfo->Ss > cinfo->Se || cinfo->Se >= DCTSIZE2) + bad = TRUE; + /* AC scans may have only one component */ + if (cinfo->comps_in_scan != 1) + bad = TRUE; + } + if (cinfo->Ah != 0) { + /* Successive approximation refinement scan: must have Al = Ah-1. */ + if (cinfo->Al != cinfo->Ah-1) + bad = TRUE; + } + if (cinfo->Al > 13) /* need not check for < 0 */ + bad = TRUE; + /* Arguably the maximum Al value should be less than 13 for 8-bit precision, + * but the spec doesn't say so, and we try to be liberal about what we + * accept. Note: large Al values could result in out-of-range DC + * coefficients during early scans, leading to bizarre displays due to + * overflows in the IDCT math. But we won't crash. + */ + if (bad) + ERREXIT4(cinfo, JERR_BAD_PROGRESSION, + cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al); + /* Update progression status, and verify that scan order is legal. + * Note that inter-scan inconsistencies are treated as warnings + * not fatal errors ... not clear if this is right way to behave. + */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + int cindex = cinfo->cur_comp_info[ci]->component_index; + coef_bit_ptr = & cinfo->coef_bits[cindex][0]; + if (!is_DC_band && coef_bit_ptr[0] < 0) /* AC without prior DC scan */ + WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, 0); + for (coefi = cinfo->Ss; coefi <= cinfo->Se; coefi++) { + int expected = (coef_bit_ptr[coefi] < 0) ? 0 : coef_bit_ptr[coefi]; + if (cinfo->Ah != expected) + WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, coefi); + coef_bit_ptr[coefi] = cinfo->Al; + } + } + + /* Select MCU decoding routine */ + if (cinfo->Ah == 0) { + if (is_DC_band) + entropy->pub.decode_mcu = decode_mcu_DC_first; + else + entropy->pub.decode_mcu = decode_mcu_AC_first; + } else { + if (is_DC_band) + entropy->pub.decode_mcu = decode_mcu_DC_refine; + else + entropy->pub.decode_mcu = decode_mcu_AC_refine; + } + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Make sure requested tables are present, and compute derived tables. + * We may build same derived table more than once, but it's not expensive. + */ + if (is_DC_band) { + if (cinfo->Ah == 0) { /* DC refinement needs no table */ + tbl = compptr->dc_tbl_no; + jpeg_make_d_derived_tbl(cinfo, TRUE, tbl, + & entropy->derived_tbls[tbl]); + } + } else { + tbl = compptr->ac_tbl_no; + jpeg_make_d_derived_tbl(cinfo, FALSE, tbl, + & entropy->derived_tbls[tbl]); + /* remember the single active table */ + entropy->ac_derived_tbl = entropy->derived_tbls[tbl]; + } + /* Initialize DC predictions to 0 */ + entropy->saved.last_dc_val[ci] = 0; + } + + /* Initialize bitread state variables */ + entropy->bitstate.bits_left = 0; + entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */ + entropy->pub.insufficient_data = FALSE; + + /* Initialize private state variables */ + entropy->saved.EOBRUN = 0; + + /* Initialize restart counter */ + entropy->restarts_to_go = cinfo->restart_interval; +} + + +/* + * Figure F.12: extend sign bit. + * On some machines, a shift and add will be faster than a table lookup. + */ + +#ifdef AVOID_TABLES + +#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x)) + +#else + +#define HUFF_EXTEND(x,s) ((x) < extend_test[s] ? (x) + extend_offset[s] : (x)) + +static const int extend_test[16] = /* entry n is 2**(n-1) */ + { 0, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, + 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 }; + +static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */ + { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1, + ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1, + ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1, + ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 }; + +#endif /* AVOID_TABLES */ + + +/* + * Check for a restart marker & resynchronize decoder. + * Returns FALSE if must suspend. + */ + +LOCAL(boolean) +process_restart (j_decompress_ptr cinfo) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + int ci; + + /* Throw away any unused bits remaining in bit buffer; */ + /* include any full bytes in next_marker's count of discarded bytes */ + cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8; + entropy->bitstate.bits_left = 0; + + /* Advance past the RSTn marker */ + if (! (*cinfo->marker->read_restart_marker) (cinfo)) + return FALSE; + + /* Re-initialize DC predictions to 0 */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) + entropy->saved.last_dc_val[ci] = 0; + /* Re-init EOB run count, too */ + entropy->saved.EOBRUN = 0; + + /* Reset restart counter */ + entropy->restarts_to_go = cinfo->restart_interval; + + /* Reset out-of-data flag, unless read_restart_marker left us smack up + * against a marker. In that case we will end up treating the next data + * segment as empty, and we can avoid producing bogus output pixels by + * leaving the flag set. + */ + if (cinfo->unread_marker == 0) + entropy->pub.insufficient_data = FALSE; + + return TRUE; +} + + +/* + * Huffman MCU decoding. + * Each of these routines decodes and returns one MCU's worth of + * Huffman-compressed coefficients. + * The coefficients are reordered from zigzag order into natural array order, + * but are not dequantized. + * + * The i'th block of the MCU is stored into the block pointed to by + * MCU_data[i]. WE ASSUME THIS AREA IS INITIALLY ZEROED BY THE CALLER. + * + * We return FALSE if data source requested suspension. In that case no + * changes have been made to permanent state. (Exception: some output + * coefficients may already have been assigned. This is harmless for + * spectral selection, since we'll just re-assign them on the next call. + * Successive approximation AC refinement has to be more careful, however.) + */ + +/* + * MCU decoding for DC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(boolean) +decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + int Al = cinfo->Al; + register int s, r; + int blkn, ci; + JBLOCKROW block; + BITREAD_STATE_VARS; + savable_state state; + d_derived_tbl * tbl; + jpeg_component_info * compptr; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* If we've run out of data, just leave the MCU set to zeroes. + * This way, we return uniform gray for the remainder of the segment. + */ + if (! entropy->pub.insufficient_data) { + + /* Load up working state */ + BITREAD_LOAD_STATE(cinfo,entropy->bitstate); + ASSIGN_STATE(state, entropy->saved); + + /* Outer loop handles each block in the MCU */ + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + block = MCU_data[blkn]; + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + tbl = entropy->derived_tbls[compptr->dc_tbl_no]; + + /* Decode a single block's worth of coefficients */ + + /* Section F.2.2.1: decode the DC coefficient difference */ + HUFF_DECODE(s, br_state, tbl, return FALSE, label1); + if (s) { + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + } + + /* Convert DC difference to actual value, update last_dc_val */ + s += state.last_dc_val[ci]; + state.last_dc_val[ci] = s; + /* Scale and output the coefficient (assumes jpeg_natural_order[0]=0) */ + (*block)[0] = (JCOEF) (s << Al); + } + + /* Completed MCU, so update state */ + BITREAD_SAVE_STATE(cinfo,entropy->bitstate); + ASSIGN_STATE(entropy->saved, state); + } + + /* Account for restart interval (no-op if not using restarts) */ + entropy->restarts_to_go--; + + return TRUE; +} + + +/* + * MCU decoding for AC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(boolean) +decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + int Se = cinfo->Se; + int Al = cinfo->Al; + register int s, k, r; + unsigned int EOBRUN; + JBLOCKROW block; + BITREAD_STATE_VARS; + d_derived_tbl * tbl; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* If we've run out of data, just leave the MCU set to zeroes. + * This way, we return uniform gray for the remainder of the segment. + */ + if (! entropy->pub.insufficient_data) { + + /* Load up working state. + * We can avoid loading/saving bitread state if in an EOB run. + */ + EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */ + + /* There is always only one block per MCU */ + + if (EOBRUN > 0) /* if it's a band of zeroes... */ + EOBRUN--; /* ...process it now (we do nothing) */ + else { + BITREAD_LOAD_STATE(cinfo,entropy->bitstate); + block = MCU_data[0]; + tbl = entropy->ac_derived_tbl; + + for (k = cinfo->Ss; k <= Se; k++) { + HUFF_DECODE(s, br_state, tbl, return FALSE, label2); + r = s >> 4; + s &= 15; + if (s) { + k += r; + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + /* Scale and output coefficient in natural (dezigzagged) order */ + (*block)[jpeg_natural_order[k]] = (JCOEF) (s << Al); + } else { + if (r == 15) { /* ZRL */ + k += 15; /* skip 15 zeroes in band */ + } else { /* EOBr, run length is 2^r + appended bits */ + EOBRUN = 1 << r; + if (r) { /* EOBr, r > 0 */ + CHECK_BIT_BUFFER(br_state, r, return FALSE); + r = GET_BITS(r); + EOBRUN += r; + } + EOBRUN--; /* this band is processed at this moment */ + break; /* force end-of-band */ + } + } + } + + BITREAD_SAVE_STATE(cinfo,entropy->bitstate); + } + + /* Completed MCU, so update state */ + entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */ + } + + /* Account for restart interval (no-op if not using restarts) */ + entropy->restarts_to_go--; + + return TRUE; +} + + +/* + * MCU decoding for DC successive approximation refinement scan. + * Note: we assume such scans can be multi-component, although the spec + * is not very clear on the point. + */ + +METHODDEF(boolean) +decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ + int blkn; + JBLOCKROW block; + BITREAD_STATE_VARS; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* Not worth the cycles to check insufficient_data here, + * since we will not change the data anyway if we read zeroes. + */ + + /* Load up working state */ + BITREAD_LOAD_STATE(cinfo,entropy->bitstate); + + /* Outer loop handles each block in the MCU */ + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + block = MCU_data[blkn]; + + /* Encoded data is simply the next bit of the two's-complement DC value */ + CHECK_BIT_BUFFER(br_state, 1, return FALSE); + if (GET_BITS(1)) + (*block)[0] |= p1; + /* Note: since we use |=, repeating the assignment later is safe */ + } + + /* Completed MCU, so update state */ + BITREAD_SAVE_STATE(cinfo,entropy->bitstate); + + /* Account for restart interval (no-op if not using restarts) */ + entropy->restarts_to_go--; + + return TRUE; +} + + +/* + * MCU decoding for AC successive approximation refinement scan. + */ + +METHODDEF(boolean) +decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + int Se = cinfo->Se; + int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ + int m1 = (-1) << cinfo->Al; /* -1 in the bit position being coded */ + register int s, k, r; + unsigned int EOBRUN; + JBLOCKROW block; + JCOEFPTR thiscoef; + BITREAD_STATE_VARS; + d_derived_tbl * tbl; + int num_newnz; + int newnz_pos[DCTSIZE2]; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* If we've run out of data, don't modify the MCU. + */ + if (! entropy->pub.insufficient_data) { + + /* Load up working state */ + BITREAD_LOAD_STATE(cinfo,entropy->bitstate); + EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */ + + /* There is always only one block per MCU */ + block = MCU_data[0]; + tbl = entropy->ac_derived_tbl; + + /* If we are forced to suspend, we must undo the assignments to any newly + * nonzero coefficients in the block, because otherwise we'd get confused + * next time about which coefficients were already nonzero. + * But we need not undo addition of bits to already-nonzero coefficients; + * instead, we can test the current bit to see if we already did it. + */ + num_newnz = 0; + + /* initialize coefficient loop counter to start of band */ + k = cinfo->Ss; + + if (EOBRUN == 0) { + for (; k <= Se; k++) { + HUFF_DECODE(s, br_state, tbl, goto undoit, label3); + r = s >> 4; + s &= 15; + if (s) { + if (s != 1) /* size of new coef should always be 1 */ + WARNMS(cinfo, JWRN_HUFF_BAD_CODE); + CHECK_BIT_BUFFER(br_state, 1, goto undoit); + if (GET_BITS(1)) + s = p1; /* newly nonzero coef is positive */ + else + s = m1; /* newly nonzero coef is negative */ + } else { + if (r != 15) { + EOBRUN = 1 << r; /* EOBr, run length is 2^r + appended bits */ + if (r) { + CHECK_BIT_BUFFER(br_state, r, goto undoit); + r = GET_BITS(r); + EOBRUN += r; + } + break; /* rest of block is handled by EOB logic */ + } + /* note s = 0 for processing ZRL */ + } + /* Advance over already-nonzero coefs and r still-zero coefs, + * appending correction bits to the nonzeroes. A correction bit is 1 + * if the absolute value of the coefficient must be increased. + */ + do { + thiscoef = *block + jpeg_natural_order[k]; + if (*thiscoef != 0) { + CHECK_BIT_BUFFER(br_state, 1, goto undoit); + if (GET_BITS(1)) { + if ((*thiscoef & p1) == 0) { /* do nothing if already set it */ + if (*thiscoef >= 0) + *thiscoef += p1; + else + *thiscoef += m1; + } + } + } else { + if (--r < 0) + break; /* reached target zero coefficient */ + } + k++; + } while (k <= Se); + if (s) { + int pos = jpeg_natural_order[k]; + /* Output newly nonzero coefficient */ + (*block)[pos] = (JCOEF) s; + /* Remember its position in case we have to suspend */ + newnz_pos[num_newnz++] = pos; + } + } + } + + if (EOBRUN > 0) { + /* Scan any remaining coefficient positions after the end-of-band + * (the last newly nonzero coefficient, if any). Append a correction + * bit to each already-nonzero coefficient. A correction bit is 1 + * if the absolute value of the coefficient must be increased. + */ + for (; k <= Se; k++) { + thiscoef = *block + jpeg_natural_order[k]; + if (*thiscoef != 0) { + CHECK_BIT_BUFFER(br_state, 1, goto undoit); + if (GET_BITS(1)) { + if ((*thiscoef & p1) == 0) { /* do nothing if already changed it */ + if (*thiscoef >= 0) + *thiscoef += p1; + else + *thiscoef += m1; + } + } + } + } + /* Count one block completed in EOB run */ + EOBRUN--; + } + + /* Completed MCU, so update state */ + BITREAD_SAVE_STATE(cinfo,entropy->bitstate); + entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */ + } + + /* Account for restart interval (no-op if not using restarts) */ + entropy->restarts_to_go--; + + return TRUE; + +undoit: + /* Re-zero any output coefficients that we made newly nonzero */ + while (num_newnz > 0) + (*block)[newnz_pos[--num_newnz]] = 0; + + return FALSE; +} + + +/* + * Module initialization routine for progressive Huffman entropy decoding. + */ + +GLOBAL(void) +jinit_phuff_decoder (j_decompress_ptr cinfo) +{ + phuff_entropy_ptr entropy; + int *coef_bit_ptr; + int ci, i; + + entropy = (phuff_entropy_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(phuff_entropy_decoder)); + cinfo->entropy = (struct jpeg_entropy_decoder *) entropy; + entropy->pub.start_pass = start_pass_phuff_decoder; + + /* Mark derived tables unallocated */ + for (i = 0; i < NUM_HUFF_TBLS; i++) { + entropy->derived_tbls[i] = NULL; + } + + /* Create progression status table */ + cinfo->coef_bits = (int (*)[DCTSIZE2]) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->num_components*DCTSIZE2*SIZEOF(int)); + coef_bit_ptr = & cinfo->coef_bits[0][0]; + for (ci = 0; ci < cinfo->num_components; ci++) + for (i = 0; i < DCTSIZE2; i++) + *coef_bit_ptr++ = -1; +} + +#endif /* D_PROGRESSIVE_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/jdpostct.c b/gtkmm-osx/jpeg-6b/jdpostct.c new file mode 100644 index 0000000..571563d --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jdpostct.c @@ -0,0 +1,290 @@ +/* + * jdpostct.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the decompression postprocessing controller. + * This controller manages the upsampling, color conversion, and color + * quantization/reduction steps; specifically, it controls the buffering + * between upsample/color conversion and color quantization/reduction. + * + * If no color quantization/reduction is required, then this module has no + * work to do, and it just hands off to the upsample/color conversion code. + * An integrated upsample/convert/quantize process would replace this module + * entirely. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_d_post_controller pub; /* public fields */ + + /* Color quantization source buffer: this holds output data from + * the upsample/color conversion step to be passed to the quantizer. + * For two-pass color quantization, we need a full-image buffer; + * for one-pass operation, a strip buffer is sufficient. + */ + jvirt_sarray_ptr whole_image; /* virtual array, or NULL if one-pass */ + JSAMPARRAY buffer; /* strip buffer, or current strip of virtual */ + JDIMENSION strip_height; /* buffer size in rows */ + /* for two-pass mode only: */ + JDIMENSION starting_row; /* row # of first row in current strip */ + JDIMENSION next_row; /* index of next row to fill/empty in strip */ +} my_post_controller; + +typedef my_post_controller * my_post_ptr; + + +/* Forward declarations */ +METHODDEF(void) post_process_1pass + JPP((j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +#ifdef QUANT_2PASS_SUPPORTED +METHODDEF(void) post_process_prepass + JPP((j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +METHODDEF(void) post_process_2pass + JPP((j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +#endif + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_dpost (j_decompress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_post_ptr post = (my_post_ptr) cinfo->post; + + switch (pass_mode) { + case JBUF_PASS_THRU: + if (cinfo->quantize_colors) { + /* Single-pass processing with color quantization. */ + post->pub.post_process_data = post_process_1pass; + /* We could be doing buffered-image output before starting a 2-pass + * color quantization; in that case, jinit_d_post_controller did not + * allocate a strip buffer. Use the virtual-array buffer as workspace. + */ + if (post->buffer == NULL) { + post->buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, post->whole_image, + (JDIMENSION) 0, post->strip_height, TRUE); + } + } else { + /* For single-pass processing without color quantization, + * I have no work to do; just call the upsampler directly. + */ + post->pub.post_process_data = cinfo->upsample->upsample; + } + break; +#ifdef QUANT_2PASS_SUPPORTED + case JBUF_SAVE_AND_PASS: + /* First pass of 2-pass quantization */ + if (post->whole_image == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + post->pub.post_process_data = post_process_prepass; + break; + case JBUF_CRANK_DEST: + /* Second pass of 2-pass quantization */ + if (post->whole_image == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + post->pub.post_process_data = post_process_2pass; + break; +#endif /* QUANT_2PASS_SUPPORTED */ + default: + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + break; + } + post->starting_row = post->next_row = 0; +} + + +/* + * Process some data in the one-pass (strip buffer) case. + * This is used for color precision reduction as well as one-pass quantization. + */ + +METHODDEF(void) +post_process_1pass (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_post_ptr post = (my_post_ptr) cinfo->post; + JDIMENSION num_rows, max_rows; + + /* Fill the buffer, but not more than what we can dump out in one go. */ + /* Note we rely on the upsampler to detect bottom of image. */ + max_rows = out_rows_avail - *out_row_ctr; + if (max_rows > post->strip_height) + max_rows = post->strip_height; + num_rows = 0; + (*cinfo->upsample->upsample) (cinfo, + input_buf, in_row_group_ctr, in_row_groups_avail, + post->buffer, &num_rows, max_rows); + /* Quantize and emit data. */ + (*cinfo->cquantize->color_quantize) (cinfo, + post->buffer, output_buf + *out_row_ctr, (int) num_rows); + *out_row_ctr += num_rows; +} + + +#ifdef QUANT_2PASS_SUPPORTED + +/* + * Process some data in the first pass of 2-pass quantization. + */ + +METHODDEF(void) +post_process_prepass (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_post_ptr post = (my_post_ptr) cinfo->post; + JDIMENSION old_next_row, num_rows; + + /* Reposition virtual buffer if at start of strip. */ + if (post->next_row == 0) { + post->buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, post->whole_image, + post->starting_row, post->strip_height, TRUE); + } + + /* Upsample some data (up to a strip height's worth). */ + old_next_row = post->next_row; + (*cinfo->upsample->upsample) (cinfo, + input_buf, in_row_group_ctr, in_row_groups_avail, + post->buffer, &post->next_row, post->strip_height); + + /* Allow quantizer to scan new data. No data is emitted, */ + /* but we advance out_row_ctr so outer loop can tell when we're done. */ + if (post->next_row > old_next_row) { + num_rows = post->next_row - old_next_row; + (*cinfo->cquantize->color_quantize) (cinfo, post->buffer + old_next_row, + (JSAMPARRAY) NULL, (int) num_rows); + *out_row_ctr += num_rows; + } + + /* Advance if we filled the strip. */ + if (post->next_row >= post->strip_height) { + post->starting_row += post->strip_height; + post->next_row = 0; + } +} + + +/* + * Process some data in the second pass of 2-pass quantization. + */ + +METHODDEF(void) +post_process_2pass (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_post_ptr post = (my_post_ptr) cinfo->post; + JDIMENSION num_rows, max_rows; + + /* Reposition virtual buffer if at start of strip. */ + if (post->next_row == 0) { + post->buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, post->whole_image, + post->starting_row, post->strip_height, FALSE); + } + + /* Determine number of rows to emit. */ + num_rows = post->strip_height - post->next_row; /* available in strip */ + max_rows = out_rows_avail - *out_row_ctr; /* available in output area */ + if (num_rows > max_rows) + num_rows = max_rows; + /* We have to check bottom of image here, can't depend on upsampler. */ + max_rows = cinfo->output_height - post->starting_row; + if (num_rows > max_rows) + num_rows = max_rows; + + /* Quantize and emit data. */ + (*cinfo->cquantize->color_quantize) (cinfo, + post->buffer + post->next_row, output_buf + *out_row_ctr, + (int) num_rows); + *out_row_ctr += num_rows; + + /* Advance if we filled the strip. */ + post->next_row += num_rows; + if (post->next_row >= post->strip_height) { + post->starting_row += post->strip_height; + post->next_row = 0; + } +} + +#endif /* QUANT_2PASS_SUPPORTED */ + + +/* + * Initialize postprocessing controller. + */ + +GLOBAL(void) +jinit_d_post_controller (j_decompress_ptr cinfo, boolean need_full_buffer) +{ + my_post_ptr post; + + post = (my_post_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_post_controller)); + cinfo->post = (struct jpeg_d_post_controller *) post; + post->pub.start_pass = start_pass_dpost; + post->whole_image = NULL; /* flag for no virtual arrays */ + post->buffer = NULL; /* flag for no strip buffer */ + + /* Create the quantization buffer, if needed */ + if (cinfo->quantize_colors) { + /* The buffer strip height is max_v_samp_factor, which is typically + * an efficient number of rows for upsampling to return. + * (In the presence of output rescaling, we might want to be smarter?) + */ + post->strip_height = (JDIMENSION) cinfo->max_v_samp_factor; + if (need_full_buffer) { + /* Two-pass color quantization: need full-image storage. */ + /* We round up the number of rows to a multiple of the strip height. */ +#ifdef QUANT_2PASS_SUPPORTED + post->whole_image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + cinfo->output_width * cinfo->out_color_components, + (JDIMENSION) jround_up((long) cinfo->output_height, + (long) post->strip_height), + post->strip_height); +#else + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); +#endif /* QUANT_2PASS_SUPPORTED */ + } else { + /* One-pass color quantization: just make a strip buffer. */ + post->buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->output_width * cinfo->out_color_components, + post->strip_height); + } + } +} diff --git a/gtkmm-osx/jpeg-6b/jdsample.c b/gtkmm-osx/jpeg-6b/jdsample.c new file mode 100644 index 0000000..80ffefb --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jdsample.c @@ -0,0 +1,478 @@ +/* + * jdsample.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains upsampling routines. + * + * Upsampling input data is counted in "row groups". A row group + * is defined to be (v_samp_factor * DCT_scaled_size / min_DCT_scaled_size) + * sample rows of each component. Upsampling will normally produce + * max_v_samp_factor pixel rows from each row group (but this could vary + * if the upsampler is applying a scale factor of its own). + * + * An excellent reference for image resampling is + * Digital Image Warping, George Wolberg, 1990. + * Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Pointer to routine to upsample a single component */ +typedef JMETHOD(void, upsample1_ptr, + (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)); + +/* Private subobject */ + +typedef struct { + struct jpeg_upsampler pub; /* public fields */ + + /* Color conversion buffer. When using separate upsampling and color + * conversion steps, this buffer holds one upsampled row group until it + * has been color converted and output. + * Note: we do not allocate any storage for component(s) which are full-size, + * ie do not need rescaling. The corresponding entry of color_buf[] is + * simply set to point to the input data array, thereby avoiding copying. + */ + JSAMPARRAY color_buf[MAX_COMPONENTS]; + + /* Per-component upsampling method pointers */ + upsample1_ptr methods[MAX_COMPONENTS]; + + int next_row_out; /* counts rows emitted from color_buf */ + JDIMENSION rows_to_go; /* counts rows remaining in image */ + + /* Height of an input row group for each component. */ + int rowgroup_height[MAX_COMPONENTS]; + + /* These arrays save pixel expansion factors so that int_expand need not + * recompute them each time. They are unused for other upsampling methods. + */ + UINT8 h_expand[MAX_COMPONENTS]; + UINT8 v_expand[MAX_COMPONENTS]; +} my_upsampler; + +typedef my_upsampler * my_upsample_ptr; + + +/* + * Initialize for an upsampling pass. + */ + +METHODDEF(void) +start_pass_upsample (j_decompress_ptr cinfo) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + + /* Mark the conversion buffer empty */ + upsample->next_row_out = cinfo->max_v_samp_factor; + /* Initialize total-height counter for detecting bottom of image */ + upsample->rows_to_go = cinfo->output_height; +} + + +/* + * Control routine to do upsampling (and color conversion). + * + * In this version we upsample each component independently. + * We upsample one row group into the conversion buffer, then apply + * color conversion a row at a time. + */ + +METHODDEF(void) +sep_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + int ci; + jpeg_component_info * compptr; + JDIMENSION num_rows; + + /* Fill the conversion buffer, if it's empty */ + if (upsample->next_row_out >= cinfo->max_v_samp_factor) { + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Invoke per-component upsample method. Notice we pass a POINTER + * to color_buf[ci], so that fullsize_upsample can change it. + */ + (*upsample->methods[ci]) (cinfo, compptr, + input_buf[ci] + (*in_row_group_ctr * upsample->rowgroup_height[ci]), + upsample->color_buf + ci); + } + upsample->next_row_out = 0; + } + + /* Color-convert and emit rows */ + + /* How many we have in the buffer: */ + num_rows = (JDIMENSION) (cinfo->max_v_samp_factor - upsample->next_row_out); + /* Not more than the distance to the end of the image. Need this test + * in case the image height is not a multiple of max_v_samp_factor: + */ + if (num_rows > upsample->rows_to_go) + num_rows = upsample->rows_to_go; + /* And not more than what the client can accept: */ + out_rows_avail -= *out_row_ctr; + if (num_rows > out_rows_avail) + num_rows = out_rows_avail; + + (*cinfo->cconvert->color_convert) (cinfo, upsample->color_buf, + (JDIMENSION) upsample->next_row_out, + output_buf + *out_row_ctr, + (int) num_rows); + + /* Adjust counts */ + *out_row_ctr += num_rows; + upsample->rows_to_go -= num_rows; + upsample->next_row_out += num_rows; + /* When the buffer is emptied, declare this input row group consumed */ + if (upsample->next_row_out >= cinfo->max_v_samp_factor) + (*in_row_group_ctr)++; +} + + +/* + * These are the routines invoked by sep_upsample to upsample pixel values + * of a single component. One row group is processed per call. + */ + + +/* + * For full-size components, we just make color_buf[ci] point at the + * input buffer, and thus avoid copying any data. Note that this is + * safe only because sep_upsample doesn't declare the input row group + * "consumed" until we are done color converting and emitting it. + */ + +METHODDEF(void) +fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + *output_data_ptr = input_data; +} + + +/* + * This is a no-op version used for "uninteresting" components. + * These components will not be referenced by color conversion. + */ + +METHODDEF(void) +noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + *output_data_ptr = NULL; /* safety check */ +} + + +/* + * This version handles any integral sampling ratios. + * This is not used for typical JPEG files, so it need not be fast. + * Nor, for that matter, is it particularly accurate: the algorithm is + * simple replication of the input pixel onto the corresponding output + * pixels. The hi-falutin sampling literature refers to this as a + * "box filter". A box filter tends to introduce visible artifacts, + * so if you are actually going to use 3:1 or 4:1 sampling ratios + * you would be well advised to improve this code. + */ + +METHODDEF(void) +int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr, outptr; + register JSAMPLE invalue; + register int h; + JSAMPROW outend; + int h_expand, v_expand; + int inrow, outrow; + + h_expand = upsample->h_expand[compptr->component_index]; + v_expand = upsample->v_expand[compptr->component_index]; + + inrow = outrow = 0; + while (outrow < cinfo->max_v_samp_factor) { + /* Generate one output row with proper horizontal expansion */ + inptr = input_data[inrow]; + outptr = output_data[outrow]; + outend = outptr + cinfo->output_width; + while (outptr < outend) { + invalue = *inptr++; /* don't need GETJSAMPLE() here */ + for (h = h_expand; h > 0; h--) { + *outptr++ = invalue; + } + } + /* Generate any additional output rows by duplicating the first one */ + if (v_expand > 1) { + jcopy_sample_rows(output_data, outrow, output_data, outrow+1, + v_expand-1, cinfo->output_width); + } + inrow++; + outrow += v_expand; + } +} + + +/* + * Fast processing for the common case of 2:1 horizontal and 1:1 vertical. + * It's still a box filter. + */ + +METHODDEF(void) +h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr, outptr; + register JSAMPLE invalue; + JSAMPROW outend; + int inrow; + + for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) { + inptr = input_data[inrow]; + outptr = output_data[inrow]; + outend = outptr + cinfo->output_width; + while (outptr < outend) { + invalue = *inptr++; /* don't need GETJSAMPLE() here */ + *outptr++ = invalue; + *outptr++ = invalue; + } + } +} + + +/* + * Fast processing for the common case of 2:1 horizontal and 2:1 vertical. + * It's still a box filter. + */ + +METHODDEF(void) +h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr, outptr; + register JSAMPLE invalue; + JSAMPROW outend; + int inrow, outrow; + + inrow = outrow = 0; + while (outrow < cinfo->max_v_samp_factor) { + inptr = input_data[inrow]; + outptr = output_data[outrow]; + outend = outptr + cinfo->output_width; + while (outptr < outend) { + invalue = *inptr++; /* don't need GETJSAMPLE() here */ + *outptr++ = invalue; + *outptr++ = invalue; + } + jcopy_sample_rows(output_data, outrow, output_data, outrow+1, + 1, cinfo->output_width); + inrow++; + outrow += 2; + } +} + + +/* + * Fancy processing for the common case of 2:1 horizontal and 1:1 vertical. + * + * The upsampling algorithm is linear interpolation between pixel centers, + * also known as a "triangle filter". This is a good compromise between + * speed and visual quality. The centers of the output pixels are 1/4 and 3/4 + * of the way between input pixel centers. + * + * A note about the "bias" calculations: when rounding fractional values to + * integer, we do not want to always round 0.5 up to the next integer. + * If we did that, we'd introduce a noticeable bias towards larger values. + * Instead, this code is arranged so that 0.5 will be rounded up or down at + * alternate pixel locations (a simple ordered dither pattern). + */ + +METHODDEF(void) +h2v1_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr, outptr; + register int invalue; + register JDIMENSION colctr; + int inrow; + + for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) { + inptr = input_data[inrow]; + outptr = output_data[inrow]; + /* Special case for first column */ + invalue = GETJSAMPLE(*inptr++); + *outptr++ = (JSAMPLE) invalue; + *outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(*inptr) + 2) >> 2); + + for (colctr = compptr->downsampled_width - 2; colctr > 0; colctr--) { + /* General case: 3/4 * nearer pixel + 1/4 * further pixel */ + invalue = GETJSAMPLE(*inptr++) * 3; + *outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(inptr[-2]) + 1) >> 2); + *outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(*inptr) + 2) >> 2); + } + + /* Special case for last column */ + invalue = GETJSAMPLE(*inptr); + *outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(inptr[-1]) + 1) >> 2); + *outptr++ = (JSAMPLE) invalue; + } +} + + +/* + * Fancy processing for the common case of 2:1 horizontal and 2:1 vertical. + * Again a triangle filter; see comments for h2v1 case, above. + * + * It is OK for us to reference the adjacent input rows because we demanded + * context from the main buffer controller (see initialization code). + */ + +METHODDEF(void) +h2v2_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr0, inptr1, outptr; +#if BITS_IN_JSAMPLE == 8 + register int thiscolsum, lastcolsum, nextcolsum; +#else + register INT32 thiscolsum, lastcolsum, nextcolsum; +#endif + register JDIMENSION colctr; + int inrow, outrow, v; + + inrow = outrow = 0; + while (outrow < cinfo->max_v_samp_factor) { + for (v = 0; v < 2; v++) { + /* inptr0 points to nearest input row, inptr1 points to next nearest */ + inptr0 = input_data[inrow]; + if (v == 0) /* next nearest is row above */ + inptr1 = input_data[inrow-1]; + else /* next nearest is row below */ + inptr1 = input_data[inrow+1]; + outptr = output_data[outrow++]; + + /* Special case for first column */ + thiscolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++); + nextcolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++); + *outptr++ = (JSAMPLE) ((thiscolsum * 4 + 8) >> 4); + *outptr++ = (JSAMPLE) ((thiscolsum * 3 + nextcolsum + 7) >> 4); + lastcolsum = thiscolsum; thiscolsum = nextcolsum; + + for (colctr = compptr->downsampled_width - 2; colctr > 0; colctr--) { + /* General case: 3/4 * nearer pixel + 1/4 * further pixel in each */ + /* dimension, thus 9/16, 3/16, 3/16, 1/16 overall */ + nextcolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++); + *outptr++ = (JSAMPLE) ((thiscolsum * 3 + lastcolsum + 8) >> 4); + *outptr++ = (JSAMPLE) ((thiscolsum * 3 + nextcolsum + 7) >> 4); + lastcolsum = thiscolsum; thiscolsum = nextcolsum; + } + + /* Special case for last column */ + *outptr++ = (JSAMPLE) ((thiscolsum * 3 + lastcolsum + 8) >> 4); + *outptr++ = (JSAMPLE) ((thiscolsum * 4 + 7) >> 4); + } + inrow++; + } +} + + +/* + * Module initialization routine for upsampling. + */ + +GLOBAL(void) +jinit_upsampler (j_decompress_ptr cinfo) +{ + my_upsample_ptr upsample; + int ci; + jpeg_component_info * compptr; + boolean need_buffer, do_fancy; + int h_in_group, v_in_group, h_out_group, v_out_group; + + upsample = (my_upsample_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_upsampler)); + cinfo->upsample = (struct jpeg_upsampler *) upsample; + upsample->pub.start_pass = start_pass_upsample; + upsample->pub.upsample = sep_upsample; + upsample->pub.need_context_rows = FALSE; /* until we find out differently */ + + if (cinfo->CCIR601_sampling) /* this isn't supported */ + ERREXIT(cinfo, JERR_CCIR601_NOTIMPL); + + /* jdmainct.c doesn't support context rows when min_DCT_scaled_size = 1, + * so don't ask for it. + */ + do_fancy = cinfo->do_fancy_upsampling && cinfo->min_DCT_scaled_size > 1; + + /* Verify we can handle the sampling factors, select per-component methods, + * and create storage as needed. + */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Compute size of an "input group" after IDCT scaling. This many samples + * are to be converted to max_h_samp_factor * max_v_samp_factor pixels. + */ + h_in_group = (compptr->h_samp_factor * compptr->DCT_scaled_size) / + cinfo->min_DCT_scaled_size; + v_in_group = (compptr->v_samp_factor * compptr->DCT_scaled_size) / + cinfo->min_DCT_scaled_size; + h_out_group = cinfo->max_h_samp_factor; + v_out_group = cinfo->max_v_samp_factor; + upsample->rowgroup_height[ci] = v_in_group; /* save for use later */ + need_buffer = TRUE; + if (! compptr->component_needed) { + /* Don't bother to upsample an uninteresting component. */ + upsample->methods[ci] = noop_upsample; + need_buffer = FALSE; + } else if (h_in_group == h_out_group && v_in_group == v_out_group) { + /* Fullsize components can be processed without any work. */ + upsample->methods[ci] = fullsize_upsample; + need_buffer = FALSE; + } else if (h_in_group * 2 == h_out_group && + v_in_group == v_out_group) { + /* Special cases for 2h1v upsampling */ + if (do_fancy && compptr->downsampled_width > 2) + upsample->methods[ci] = h2v1_fancy_upsample; + else + upsample->methods[ci] = h2v1_upsample; + } else if (h_in_group * 2 == h_out_group && + v_in_group * 2 == v_out_group) { + /* Special cases for 2h2v upsampling */ + if (do_fancy && compptr->downsampled_width > 2) { + upsample->methods[ci] = h2v2_fancy_upsample; + upsample->pub.need_context_rows = TRUE; + } else + upsample->methods[ci] = h2v2_upsample; + } else if ((h_out_group % h_in_group) == 0 && + (v_out_group % v_in_group) == 0) { + /* Generic integral-factors upsampling method */ + upsample->methods[ci] = int_upsample; + upsample->h_expand[ci] = (UINT8) (h_out_group / h_in_group); + upsample->v_expand[ci] = (UINT8) (v_out_group / v_in_group); + } else + ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL); + if (need_buffer) { + upsample->color_buf[ci] = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) jround_up((long) cinfo->output_width, + (long) cinfo->max_h_samp_factor), + (JDIMENSION) cinfo->max_v_samp_factor); + } + } +} diff --git a/gtkmm-osx/jpeg-6b/jdtrans.c b/gtkmm-osx/jpeg-6b/jdtrans.c new file mode 100644 index 0000000..6c0ab71 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jdtrans.c @@ -0,0 +1,143 @@ +/* + * jdtrans.c + * + * Copyright (C) 1995-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains library routines for transcoding decompression, + * that is, reading raw DCT coefficient arrays from an input JPEG file. + * The routines in jdapimin.c will also be needed by a transcoder. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Forward declarations */ +LOCAL(void) transdecode_master_selection JPP((j_decompress_ptr cinfo)); + + +/* + * Read the coefficient arrays from a JPEG file. + * jpeg_read_header must be completed before calling this. + * + * The entire image is read into a set of virtual coefficient-block arrays, + * one per component. The return value is a pointer to the array of + * virtual-array descriptors. These can be manipulated directly via the + * JPEG memory manager, or handed off to jpeg_write_coefficients(). + * To release the memory occupied by the virtual arrays, call + * jpeg_finish_decompress() when done with the data. + * + * An alternative usage is to simply obtain access to the coefficient arrays + * during a buffered-image-mode decompression operation. This is allowed + * after any jpeg_finish_output() call. The arrays can be accessed until + * jpeg_finish_decompress() is called. (Note that any call to the library + * may reposition the arrays, so don't rely on access_virt_barray() results + * to stay valid across library calls.) + * + * Returns NULL if suspended. This case need be checked only if + * a suspending data source is used. + */ + +GLOBAL(jvirt_barray_ptr *) +jpeg_read_coefficients (j_decompress_ptr cinfo) +{ + if (cinfo->global_state == DSTATE_READY) { + /* First call: initialize active modules */ + transdecode_master_selection(cinfo); + cinfo->global_state = DSTATE_RDCOEFS; + } + if (cinfo->global_state == DSTATE_RDCOEFS) { + /* Absorb whole file into the coef buffer */ + for (;;) { + int retcode; + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + /* Absorb some more input */ + retcode = (*cinfo->inputctl->consume_input) (cinfo); + if (retcode == JPEG_SUSPENDED) + return NULL; + if (retcode == JPEG_REACHED_EOI) + break; + /* Advance progress counter if appropriate */ + if (cinfo->progress != NULL && + (retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) { + if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) { + /* startup underestimated number of scans; ratchet up one scan */ + cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows; + } + } + } + /* Set state so that jpeg_finish_decompress does the right thing */ + cinfo->global_state = DSTATE_STOPPING; + } + /* At this point we should be in state DSTATE_STOPPING if being used + * standalone, or in state DSTATE_BUFIMAGE if being invoked to get access + * to the coefficients during a full buffered-image-mode decompression. + */ + if ((cinfo->global_state == DSTATE_STOPPING || + cinfo->global_state == DSTATE_BUFIMAGE) && cinfo->buffered_image) { + return cinfo->coef->coef_arrays; + } + /* Oops, improper usage */ + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + return NULL; /* keep compiler happy */ +} + + +/* + * Master selection of decompression modules for transcoding. + * This substitutes for jdmaster.c's initialization of the full decompressor. + */ + +LOCAL(void) +transdecode_master_selection (j_decompress_ptr cinfo) +{ + /* This is effectively a buffered-image operation. */ + cinfo->buffered_image = TRUE; + + /* Entropy decoding: either Huffman or arithmetic coding. */ + if (cinfo->arith_code) { + ERREXIT(cinfo, JERR_ARITH_NOTIMPL); + } else { + if (cinfo->progressive_mode) { +#ifdef D_PROGRESSIVE_SUPPORTED + jinit_phuff_decoder(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else + jinit_huff_decoder(cinfo); + } + + /* Always get a full-image coefficient buffer. */ + jinit_d_coef_controller(cinfo, TRUE); + + /* We can now tell the memory manager to allocate virtual arrays. */ + (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); + + /* Initialize input side of decompressor to consume first scan. */ + (*cinfo->inputctl->start_input_pass) (cinfo); + + /* Initialize progress monitoring. */ + if (cinfo->progress != NULL) { + int nscans; + /* Estimate number of scans to set pass_limit. */ + if (cinfo->progressive_mode) { + /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */ + nscans = 2 + 3 * cinfo->num_components; + } else if (cinfo->inputctl->has_multiple_scans) { + /* For a nonprogressive multiscan file, estimate 1 scan per component. */ + nscans = cinfo->num_components; + } else { + nscans = 1; + } + cinfo->progress->pass_counter = 0L; + cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans; + cinfo->progress->completed_passes = 0; + cinfo->progress->total_passes = 1; + } +} diff --git a/gtkmm-osx/jpeg-6b/jerror.c b/gtkmm-osx/jpeg-6b/jerror.c new file mode 100644 index 0000000..3da7be8 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jerror.c @@ -0,0 +1,252 @@ +/* + * jerror.c + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains simple error-reporting and trace-message routines. + * These are suitable for Unix-like systems and others where writing to + * stderr is the right thing to do. Many applications will want to replace + * some or all of these routines. + * + * If you define USE_WINDOWS_MESSAGEBOX in jconfig.h or in the makefile, + * you get a Windows-specific hack to display error messages in a dialog box. + * It ain't much, but it beats dropping error messages into the bit bucket, + * which is what happens to output to stderr under most Windows C compilers. + * + * These routines are used by both the compression and decompression code. + */ + +/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jversion.h" +#include "jerror.h" + +#ifdef USE_WINDOWS_MESSAGEBOX +#include +#endif + +#ifndef EXIT_FAILURE /* define exit() codes if not provided */ +#define EXIT_FAILURE 1 +#endif + + +/* + * Create the message string table. + * We do this from the master message list in jerror.h by re-reading + * jerror.h with a suitable definition for macro JMESSAGE. + * The message table is made an external symbol just in case any applications + * want to refer to it directly. + */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_std_message_table jMsgTable +#endif + +#define JMESSAGE(code,string) string , + +const char * const jpeg_std_message_table[] = { +#include "jerror.h" + NULL +}; + + +/* + * Error exit handler: must not return to caller. + * + * Applications may override this if they want to get control back after + * an error. Typically one would longjmp somewhere instead of exiting. + * The setjmp buffer can be made a private field within an expanded error + * handler object. Note that the info needed to generate an error message + * is stored in the error object, so you can generate the message now or + * later, at your convenience. + * You should make sure that the JPEG object is cleaned up (with jpeg_abort + * or jpeg_destroy) at some point. + */ + +METHODDEF(void) +error_exit (j_common_ptr cinfo) +{ + /* Always display the message */ + (*cinfo->err->output_message) (cinfo); + + /* Let the memory manager delete any temp files before we die */ + jpeg_destroy(cinfo); + + exit(EXIT_FAILURE); +} + + +/* + * Actual output of an error or trace message. + * Applications may override this method to send JPEG messages somewhere + * other than stderr. + * + * On Windows, printing to stderr is generally completely useless, + * so we provide optional code to produce an error-dialog popup. + * Most Windows applications will still prefer to override this routine, + * but if they don't, it'll do something at least marginally useful. + * + * NOTE: to use the library in an environment that doesn't support the + * C stdio library, you may have to delete the call to fprintf() entirely, + * not just not use this routine. + */ + +METHODDEF(void) +output_message (j_common_ptr cinfo) +{ + char buffer[JMSG_LENGTH_MAX]; + + /* Create the message */ + (*cinfo->err->format_message) (cinfo, buffer); + +#ifdef USE_WINDOWS_MESSAGEBOX + /* Display it in a message dialog box */ + MessageBox(GetActiveWindow(), buffer, "JPEG Library Error", + MB_OK | MB_ICONERROR); +#else + /* Send it to stderr, adding a newline */ + fprintf(stderr, "%s\n", buffer); +#endif +} + + +/* + * Decide whether to emit a trace or warning message. + * msg_level is one of: + * -1: recoverable corrupt-data warning, may want to abort. + * 0: important advisory messages (always display to user). + * 1: first level of tracing detail. + * 2,3,...: successively more detailed tracing messages. + * An application might override this method if it wanted to abort on warnings + * or change the policy about which messages to display. + */ + +METHODDEF(void) +emit_message (j_common_ptr cinfo, int msg_level) +{ + struct jpeg_error_mgr * err = cinfo->err; + + if (msg_level < 0) { + /* It's a warning message. Since corrupt files may generate many warnings, + * the policy implemented here is to show only the first warning, + * unless trace_level >= 3. + */ + if (err->num_warnings == 0 || err->trace_level >= 3) + (*err->output_message) (cinfo); + /* Always count warnings in num_warnings. */ + err->num_warnings++; + } else { + /* It's a trace message. Show it if trace_level >= msg_level. */ + if (err->trace_level >= msg_level) + (*err->output_message) (cinfo); + } +} + + +/* + * Format a message string for the most recent JPEG error or message. + * The message is stored into buffer, which should be at least JMSG_LENGTH_MAX + * characters. Note that no '\n' character is added to the string. + * Few applications should need to override this method. + */ + +METHODDEF(void) +format_message (j_common_ptr cinfo, char * buffer) +{ + struct jpeg_error_mgr * err = cinfo->err; + int msg_code = err->msg_code; + const char * msgtext = NULL; + const char * msgptr; + char ch; + boolean isstring; + + /* Look up message string in proper table */ + if (msg_code > 0 && msg_code <= err->last_jpeg_message) { + msgtext = err->jpeg_message_table[msg_code]; + } else if (err->addon_message_table != NULL && + msg_code >= err->first_addon_message && + msg_code <= err->last_addon_message) { + msgtext = err->addon_message_table[msg_code - err->first_addon_message]; + } + + /* Defend against bogus message number */ + if (msgtext == NULL) { + err->msg_parm.i[0] = msg_code; + msgtext = err->jpeg_message_table[0]; + } + + /* Check for string parameter, as indicated by %s in the message text */ + isstring = FALSE; + msgptr = msgtext; + while ((ch = *msgptr++) != '\0') { + if (ch == '%') { + if (*msgptr == 's') isstring = TRUE; + break; + } + } + + /* Format the message into the passed buffer */ + if (isstring) + sprintf(buffer, msgtext, err->msg_parm.s); + else + sprintf(buffer, msgtext, + err->msg_parm.i[0], err->msg_parm.i[1], + err->msg_parm.i[2], err->msg_parm.i[3], + err->msg_parm.i[4], err->msg_parm.i[5], + err->msg_parm.i[6], err->msg_parm.i[7]); +} + + +/* + * Reset error state variables at start of a new image. + * This is called during compression startup to reset trace/error + * processing to default state, without losing any application-specific + * method pointers. An application might possibly want to override + * this method if it has additional error processing state. + */ + +METHODDEF(void) +reset_error_mgr (j_common_ptr cinfo) +{ + cinfo->err->num_warnings = 0; + /* trace_level is not reset since it is an application-supplied parameter */ + cinfo->err->msg_code = 0; /* may be useful as a flag for "no error" */ +} + + +/* + * Fill in the standard error-handling methods in a jpeg_error_mgr object. + * Typical call is: + * struct jpeg_compress_struct cinfo; + * struct jpeg_error_mgr err; + * + * cinfo.err = jpeg_std_error(&err); + * after which the application may override some of the methods. + */ + +GLOBAL(struct jpeg_error_mgr *) +jpeg_std_error (struct jpeg_error_mgr * err) +{ + err->error_exit = error_exit; + err->emit_message = emit_message; + err->output_message = output_message; + err->format_message = format_message; + err->reset_error_mgr = reset_error_mgr; + + err->trace_level = 0; /* default = no tracing */ + err->num_warnings = 0; /* no warnings emitted yet */ + err->msg_code = 0; /* may be useful as a flag for "no error" */ + + /* Initialize message table pointers */ + err->jpeg_message_table = jpeg_std_message_table; + err->last_jpeg_message = (int) JMSG_LASTMSGCODE - 1; + + err->addon_message_table = NULL; + err->first_addon_message = 0; /* for safety */ + err->last_addon_message = 0; + + return err; +} diff --git a/gtkmm-osx/jpeg-6b/jerror.h b/gtkmm-osx/jpeg-6b/jerror.h new file mode 100644 index 0000000..fc2fffe --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jerror.h @@ -0,0 +1,291 @@ +/* + * jerror.h + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the error and message codes for the JPEG library. + * Edit this file to add new codes, or to translate the message strings to + * some other language. + * A set of error-reporting macros are defined too. Some applications using + * the JPEG library may wish to include this file to get the error codes + * and/or the macros. + */ + +/* + * To define the enum list of message codes, include this file without + * defining macro JMESSAGE. To create a message string table, include it + * again with a suitable JMESSAGE definition (see jerror.c for an example). + */ +#ifndef JMESSAGE +#ifndef JERROR_H +/* First time through, define the enum list */ +#define JMAKE_ENUM_LIST +#else +/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ +#define JMESSAGE(code,string) +#endif /* JERROR_H */ +#endif /* JMESSAGE */ + +#ifdef JMAKE_ENUM_LIST + +typedef enum { + +#define JMESSAGE(code,string) code , + +#endif /* JMAKE_ENUM_LIST */ + +JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */ + +/* For maintenance convenience, list is alphabetical by message code name */ +JMESSAGE(JERR_ARITH_NOTIMPL, + "Sorry, there are legal restrictions on arithmetic coding") +JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") +JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") +JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode") +JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") +JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range") +JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported") +JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition") +JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace") +JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") +JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length") +JMESSAGE(JERR_BAD_LIB_VERSION, + "Wrong JPEG library version: library is %d, caller expects %d") +JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") +JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") +JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") +JMESSAGE(JERR_BAD_PROGRESSION, + "Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d") +JMESSAGE(JERR_BAD_PROG_SCRIPT, + "Invalid progressive parameters at scan script entry %d") +JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors") +JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d") +JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d") +JMESSAGE(JERR_BAD_STRUCT_SIZE, + "JPEG parameter struct mismatch: library thinks size is %u, caller expects %u") +JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access") +JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small") +JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here") +JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet") +JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d") +JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request") +JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d") +JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x") +JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d") +JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d") +JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)") +JMESSAGE(JERR_EMS_READ, "Read from EMS failed") +JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed") +JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan") +JMESSAGE(JERR_FILE_READ, "Input file read error") +JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?") +JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet") +JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow") +JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry") +JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels") +JMESSAGE(JERR_INPUT_EMPTY, "Empty input file") +JMESSAGE(JERR_INPUT_EOF, "Premature end of input file") +JMESSAGE(JERR_MISMATCHED_QUANT_TABLE, + "Cannot transcode due to multiple use of quantization table %d") +JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data") +JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") +JMESSAGE(JERR_NOTIMPL, "Not implemented yet") +JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") +JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported") +JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined") +JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image") +JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined") +JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x") +JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)") +JMESSAGE(JERR_QUANT_COMPONENTS, + "Cannot quantize more than %d color components") +JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors") +JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors") +JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers") +JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker") +JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x") +JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers") +JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF") +JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s") +JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file") +JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file") +JMESSAGE(JERR_TFILE_WRITE, + "Write failed on temporary file --- out of disk space?") +JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines") +JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x") +JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up") +JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation") +JMESSAGE(JERR_XMS_READ, "Read from XMS failed") +JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed") +JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT) +JMESSAGE(JMSG_VERSION, JVERSION) +JMESSAGE(JTRC_16BIT_TABLES, + "Caution: quantization tables are too coarse for baseline JPEG") +JMESSAGE(JTRC_ADOBE, + "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d") +JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u") +JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u") +JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x") +JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x") +JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d") +JMESSAGE(JTRC_DRI, "Define Restart Interval %u") +JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u") +JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u") +JMESSAGE(JTRC_EOI, "End Of Image") +JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d") +JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d") +JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE, + "Warning: thumbnail image size does not match data length %u") +JMESSAGE(JTRC_JFIF_EXTENSION, + "JFIF extension marker: type 0x%02x, length %u") +JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image") +JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u") +JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x") +JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u") +JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors") +JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors") +JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization") +JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d") +JMESSAGE(JTRC_RST, "RST%d") +JMESSAGE(JTRC_SMOOTH_NOTIMPL, + "Smoothing not supported with nonstandard sampling ratios") +JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d") +JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d") +JMESSAGE(JTRC_SOI, "Start of Image") +JMESSAGE(JTRC_SOS, "Start Of Scan: %d components") +JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d") +JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d") +JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s") +JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s") +JMESSAGE(JTRC_THUMB_JPEG, + "JFIF extension marker: JPEG-compressed thumbnail image, length %u") +JMESSAGE(JTRC_THUMB_PALETTE, + "JFIF extension marker: palette thumbnail image, length %u") +JMESSAGE(JTRC_THUMB_RGB, + "JFIF extension marker: RGB thumbnail image, length %u") +JMESSAGE(JTRC_UNKNOWN_IDS, + "Unrecognized component IDs %d %d %d, assuming YCbCr") +JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") +JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") +JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") +JMESSAGE(JWRN_BOGUS_PROGRESSION, + "Inconsistent progression sequence for component %d coefficient %d") +JMESSAGE(JWRN_EXTRANEOUS_DATA, + "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") +JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment") +JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code") +JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d") +JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file") +JMESSAGE(JWRN_MUST_RESYNC, + "Corrupt JPEG data: found marker 0x%02x instead of RST%d") +JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG") +JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") + +#ifdef JMAKE_ENUM_LIST + + JMSG_LASTMSGCODE +} J_MESSAGE_CODE; + +#undef JMAKE_ENUM_LIST +#endif /* JMAKE_ENUM_LIST */ + +/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ +#undef JMESSAGE + + +#ifndef JERROR_H +#define JERROR_H + +/* Macros to simplify using the error and trace message stuff */ +/* The first parameter is either type of cinfo pointer */ + +/* Fatal errors (print message and exit) */ +#define ERREXIT(cinfo,code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT1(cinfo,code,p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT2(cinfo,code,p1,p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT3(cinfo,code,p1,p2,p3) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT4(cinfo,code,p1,p2,p3,p4) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (cinfo)->err->msg_parm.i[3] = (p4), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXITS(cinfo,code,str) \ + ((cinfo)->err->msg_code = (code), \ + strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) + +#define MAKESTMT(stuff) do { stuff } while (0) + +/* Nonfatal errors (we can keep going, but the data is probably corrupt) */ +#define WARNMS(cinfo,code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) +#define WARNMS1(cinfo,code,p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) +#define WARNMS2(cinfo,code,p1,p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) + +/* Informational/debugging messages */ +#define TRACEMS(cinfo,lvl,code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS1(cinfo,lvl,code,p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS2(cinfo,lvl,code,p1,p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS3(cinfo,lvl,code,p1,p2,p3) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + _mp[4] = (p5); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMSS(cinfo,lvl,code,str) \ + ((cinfo)->err->msg_code = (code), \ + strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) + +#endif /* JERROR_H */ diff --git a/gtkmm-osx/jpeg-6b/jfdctflt.c b/gtkmm-osx/jpeg-6b/jfdctflt.c new file mode 100644 index 0000000..79d7a00 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jfdctflt.c @@ -0,0 +1,168 @@ +/* + * jfdctflt.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a floating-point implementation of the + * forward DCT (Discrete Cosine Transform). + * + * This implementation should be more accurate than either of the integer + * DCT implementations. However, it may not give the same results on all + * machines because of differences in roundoff behavior. Speed will depend + * on the hardware's floating point capacity. + * + * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT + * on each column. Direct algorithms are also available, but they are + * much more complex and seem not to be any faster when reduced to code. + * + * This implementation is based on Arai, Agui, and Nakajima's algorithm for + * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in + * Japanese, but the algorithm is described in the Pennebaker & Mitchell + * JPEG textbook (see REFERENCES section in file README). The following code + * is based directly on figure 4-8 in P&M. + * While an 8-point DCT cannot be done in less than 11 multiplies, it is + * possible to arrange the computation so that many of the multiplies are + * simple scalings of the final outputs. These multiplies can then be + * folded into the multiplications or divisions by the JPEG quantization + * table entries. The AA&N method leaves only 5 multiplies and 29 adds + * to be done in the DCT itself. + * The primary disadvantage of this method is that with a fixed-point + * implementation, accuracy is lost due to imprecise representation of the + * scaled quantization values. However, that problem does not arise if + * we use floating point arithmetic. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_FLOAT_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* + * Perform the forward DCT on one block of samples. + */ + +GLOBAL(void) +jpeg_fdct_float (FAST_FLOAT * data) +{ + FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + FAST_FLOAT tmp10, tmp11, tmp12, tmp13; + FAST_FLOAT z1, z2, z3, z4, z5, z11, z13; + FAST_FLOAT *dataptr; + int ctr; + + /* Pass 1: process rows. */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[0] + dataptr[7]; + tmp7 = dataptr[0] - dataptr[7]; + tmp1 = dataptr[1] + dataptr[6]; + tmp6 = dataptr[1] - dataptr[6]; + tmp2 = dataptr[2] + dataptr[5]; + tmp5 = dataptr[2] - dataptr[5]; + tmp3 = dataptr[3] + dataptr[4]; + tmp4 = dataptr[3] - dataptr[4]; + + /* Even part */ + + tmp10 = tmp0 + tmp3; /* phase 2 */ + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[0] = tmp10 + tmp11; /* phase 3 */ + dataptr[4] = tmp10 - tmp11; + + z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */ + dataptr[2] = tmp13 + z1; /* phase 5 */ + dataptr[6] = tmp13 - z1; + + /* Odd part */ + + tmp10 = tmp4 + tmp5; /* phase 2 */ + tmp11 = tmp5 + tmp6; + tmp12 = tmp6 + tmp7; + + /* The rotator is modified from fig 4-8 to avoid extra negations. */ + z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */ + z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */ + z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */ + z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */ + + z11 = tmp7 + z3; /* phase 5 */ + z13 = tmp7 - z3; + + dataptr[5] = z13 + z2; /* phase 6 */ + dataptr[3] = z13 - z2; + dataptr[1] = z11 + z4; + dataptr[7] = z11 - z4; + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; + tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; + tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; + tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; + tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; + + /* Even part */ + + tmp10 = tmp0 + tmp3; /* phase 2 */ + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */ + dataptr[DCTSIZE*4] = tmp10 - tmp11; + + z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */ + dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */ + dataptr[DCTSIZE*6] = tmp13 - z1; + + /* Odd part */ + + tmp10 = tmp4 + tmp5; /* phase 2 */ + tmp11 = tmp5 + tmp6; + tmp12 = tmp6 + tmp7; + + /* The rotator is modified from fig 4-8 to avoid extra negations. */ + z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */ + z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */ + z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */ + z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */ + + z11 = tmp7 + z3; /* phase 5 */ + z13 = tmp7 - z3; + + dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */ + dataptr[DCTSIZE*3] = z13 - z2; + dataptr[DCTSIZE*1] = z11 + z4; + dataptr[DCTSIZE*7] = z11 - z4; + + dataptr++; /* advance pointer to next column */ + } +} + +#endif /* DCT_FLOAT_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/jfdctfst.c b/gtkmm-osx/jpeg-6b/jfdctfst.c new file mode 100644 index 0000000..ccb378a --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jfdctfst.c @@ -0,0 +1,224 @@ +/* + * jfdctfst.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a fast, not so accurate integer implementation of the + * forward DCT (Discrete Cosine Transform). + * + * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT + * on each column. Direct algorithms are also available, but they are + * much more complex and seem not to be any faster when reduced to code. + * + * This implementation is based on Arai, Agui, and Nakajima's algorithm for + * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in + * Japanese, but the algorithm is described in the Pennebaker & Mitchell + * JPEG textbook (see REFERENCES section in file README). The following code + * is based directly on figure 4-8 in P&M. + * While an 8-point DCT cannot be done in less than 11 multiplies, it is + * possible to arrange the computation so that many of the multiplies are + * simple scalings of the final outputs. These multiplies can then be + * folded into the multiplications or divisions by the JPEG quantization + * table entries. The AA&N method leaves only 5 multiplies and 29 adds + * to be done in the DCT itself. + * The primary disadvantage of this method is that with fixed-point math, + * accuracy is lost due to imprecise representation of the scaled + * quantization values. The smaller the quantization table entry, the less + * precise the scaled value, so this implementation does worse with high- + * quality-setting files than with low-quality ones. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_IFAST_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* Scaling decisions are generally the same as in the LL&M algorithm; + * see jfdctint.c for more details. However, we choose to descale + * (right shift) multiplication products as soon as they are formed, + * rather than carrying additional fractional bits into subsequent additions. + * This compromises accuracy slightly, but it lets us save a few shifts. + * More importantly, 16-bit arithmetic is then adequate (for 8-bit samples) + * everywhere except in the multiplications proper; this saves a good deal + * of work on 16-bit-int machines. + * + * Again to save a few shifts, the intermediate results between pass 1 and + * pass 2 are not upscaled, but are represented only to integral precision. + * + * A final compromise is to represent the multiplicative constants to only + * 8 fractional bits, rather than 13. This saves some shifting work on some + * machines, and may also reduce the cost of multiplication (since there + * are fewer one-bits in the constants). + */ + +#define CONST_BITS 8 + + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 8 +#define FIX_0_382683433 ((INT32) 98) /* FIX(0.382683433) */ +#define FIX_0_541196100 ((INT32) 139) /* FIX(0.541196100) */ +#define FIX_0_707106781 ((INT32) 181) /* FIX(0.707106781) */ +#define FIX_1_306562965 ((INT32) 334) /* FIX(1.306562965) */ +#else +#define FIX_0_382683433 FIX(0.382683433) +#define FIX_0_541196100 FIX(0.541196100) +#define FIX_0_707106781 FIX(0.707106781) +#define FIX_1_306562965 FIX(1.306562965) +#endif + + +/* We can gain a little more speed, with a further compromise in accuracy, + * by omitting the addition in a descaling shift. This yields an incorrectly + * rounded result half the time... + */ + +#ifndef USE_ACCURATE_ROUNDING +#undef DESCALE +#define DESCALE(x,n) RIGHT_SHIFT(x, n) +#endif + + +/* Multiply a DCTELEM variable by an INT32 constant, and immediately + * descale to yield a DCTELEM result. + */ + +#define MULTIPLY(var,const) ((DCTELEM) DESCALE((var) * (const), CONST_BITS)) + + +/* + * Perform the forward DCT on one block of samples. + */ + +GLOBAL(void) +jpeg_fdct_ifast (DCTELEM * data) +{ + DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + DCTELEM tmp10, tmp11, tmp12, tmp13; + DCTELEM z1, z2, z3, z4, z5, z11, z13; + DCTELEM *dataptr; + int ctr; + SHIFT_TEMPS + + /* Pass 1: process rows. */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[0] + dataptr[7]; + tmp7 = dataptr[0] - dataptr[7]; + tmp1 = dataptr[1] + dataptr[6]; + tmp6 = dataptr[1] - dataptr[6]; + tmp2 = dataptr[2] + dataptr[5]; + tmp5 = dataptr[2] - dataptr[5]; + tmp3 = dataptr[3] + dataptr[4]; + tmp4 = dataptr[3] - dataptr[4]; + + /* Even part */ + + tmp10 = tmp0 + tmp3; /* phase 2 */ + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[0] = tmp10 + tmp11; /* phase 3 */ + dataptr[4] = tmp10 - tmp11; + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */ + dataptr[2] = tmp13 + z1; /* phase 5 */ + dataptr[6] = tmp13 - z1; + + /* Odd part */ + + tmp10 = tmp4 + tmp5; /* phase 2 */ + tmp11 = tmp5 + tmp6; + tmp12 = tmp6 + tmp7; + + /* The rotator is modified from fig 4-8 to avoid extra negations. */ + z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */ + z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */ + z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */ + z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */ + + z11 = tmp7 + z3; /* phase 5 */ + z13 = tmp7 - z3; + + dataptr[5] = z13 + z2; /* phase 6 */ + dataptr[3] = z13 - z2; + dataptr[1] = z11 + z4; + dataptr[7] = z11 - z4; + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; + tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; + tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; + tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; + tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; + + /* Even part */ + + tmp10 = tmp0 + tmp3; /* phase 2 */ + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */ + dataptr[DCTSIZE*4] = tmp10 - tmp11; + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */ + dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */ + dataptr[DCTSIZE*6] = tmp13 - z1; + + /* Odd part */ + + tmp10 = tmp4 + tmp5; /* phase 2 */ + tmp11 = tmp5 + tmp6; + tmp12 = tmp6 + tmp7; + + /* The rotator is modified from fig 4-8 to avoid extra negations. */ + z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */ + z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */ + z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */ + z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */ + + z11 = tmp7 + z3; /* phase 5 */ + z13 = tmp7 - z3; + + dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */ + dataptr[DCTSIZE*3] = z13 - z2; + dataptr[DCTSIZE*1] = z11 + z4; + dataptr[DCTSIZE*7] = z11 - z4; + + dataptr++; /* advance pointer to next column */ + } +} + +#endif /* DCT_IFAST_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/jfdctint.c b/gtkmm-osx/jpeg-6b/jfdctint.c new file mode 100644 index 0000000..0a78b64 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jfdctint.c @@ -0,0 +1,283 @@ +/* + * jfdctint.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a slow-but-accurate integer implementation of the + * forward DCT (Discrete Cosine Transform). + * + * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT + * on each column. Direct algorithms are also available, but they are + * much more complex and seem not to be any faster when reduced to code. + * + * This implementation is based on an algorithm described in + * C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT + * Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics, + * Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991. + * The primary algorithm described there uses 11 multiplies and 29 adds. + * We use their alternate method with 12 multiplies and 32 adds. + * The advantage of this method is that no data path contains more than one + * multiplication; this allows a very simple and accurate implementation in + * scaled fixed-point arithmetic, with a minimal number of shifts. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_ISLOW_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* + * The poop on this scaling stuff is as follows: + * + * Each 1-D DCT step produces outputs which are a factor of sqrt(N) + * larger than the true DCT outputs. The final outputs are therefore + * a factor of N larger than desired; since N=8 this can be cured by + * a simple right shift at the end of the algorithm. The advantage of + * this arrangement is that we save two multiplications per 1-D DCT, + * because the y0 and y4 outputs need not be divided by sqrt(N). + * In the IJG code, this factor of 8 is removed by the quantization step + * (in jcdctmgr.c), NOT in this module. + * + * We have to do addition and subtraction of the integer inputs, which + * is no problem, and multiplication by fractional constants, which is + * a problem to do in integer arithmetic. We multiply all the constants + * by CONST_SCALE and convert them to integer constants (thus retaining + * CONST_BITS bits of precision in the constants). After doing a + * multiplication we have to divide the product by CONST_SCALE, with proper + * rounding, to produce the correct output. This division can be done + * cheaply as a right shift of CONST_BITS bits. We postpone shifting + * as long as possible so that partial sums can be added together with + * full fractional precision. + * + * The outputs of the first pass are scaled up by PASS1_BITS bits so that + * they are represented to better-than-integral precision. These outputs + * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word + * with the recommended scaling. (For 12-bit sample data, the intermediate + * array is INT32 anyway.) + * + * To avoid overflow of the 32-bit intermediate results in pass 2, we must + * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26. Error analysis + * shows that the values given below are the most effective. + */ + +#if BITS_IN_JSAMPLE == 8 +#define CONST_BITS 13 +#define PASS1_BITS 2 +#else +#define CONST_BITS 13 +#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ +#endif + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 13 +#define FIX_0_298631336 ((INT32) 2446) /* FIX(0.298631336) */ +#define FIX_0_390180644 ((INT32) 3196) /* FIX(0.390180644) */ +#define FIX_0_541196100 ((INT32) 4433) /* FIX(0.541196100) */ +#define FIX_0_765366865 ((INT32) 6270) /* FIX(0.765366865) */ +#define FIX_0_899976223 ((INT32) 7373) /* FIX(0.899976223) */ +#define FIX_1_175875602 ((INT32) 9633) /* FIX(1.175875602) */ +#define FIX_1_501321110 ((INT32) 12299) /* FIX(1.501321110) */ +#define FIX_1_847759065 ((INT32) 15137) /* FIX(1.847759065) */ +#define FIX_1_961570560 ((INT32) 16069) /* FIX(1.961570560) */ +#define FIX_2_053119869 ((INT32) 16819) /* FIX(2.053119869) */ +#define FIX_2_562915447 ((INT32) 20995) /* FIX(2.562915447) */ +#define FIX_3_072711026 ((INT32) 25172) /* FIX(3.072711026) */ +#else +#define FIX_0_298631336 FIX(0.298631336) +#define FIX_0_390180644 FIX(0.390180644) +#define FIX_0_541196100 FIX(0.541196100) +#define FIX_0_765366865 FIX(0.765366865) +#define FIX_0_899976223 FIX(0.899976223) +#define FIX_1_175875602 FIX(1.175875602) +#define FIX_1_501321110 FIX(1.501321110) +#define FIX_1_847759065 FIX(1.847759065) +#define FIX_1_961570560 FIX(1.961570560) +#define FIX_2_053119869 FIX(2.053119869) +#define FIX_2_562915447 FIX(2.562915447) +#define FIX_3_072711026 FIX(3.072711026) +#endif + + +/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. + * For 8-bit samples with the recommended scaling, all the variable + * and constant values involved are no more than 16 bits wide, so a + * 16x16->32 bit multiply can be used instead of a full 32x32 multiply. + * For 12-bit samples, a full 32-bit multiplication will be needed. + */ + +#if BITS_IN_JSAMPLE == 8 +#define MULTIPLY(var,const) MULTIPLY16C16(var,const) +#else +#define MULTIPLY(var,const) ((var) * (const)) +#endif + + +/* + * Perform the forward DCT on one block of samples. + */ + +GLOBAL(void) +jpeg_fdct_islow (DCTELEM * data) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + INT32 tmp10, tmp11, tmp12, tmp13; + INT32 z1, z2, z3, z4, z5; + DCTELEM *dataptr; + int ctr; + SHIFT_TEMPS + + /* Pass 1: process rows. */ + /* Note results are scaled up by sqrt(8) compared to a true DCT; */ + /* furthermore, we scale the results by 2**PASS1_BITS. */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[0] + dataptr[7]; + tmp7 = dataptr[0] - dataptr[7]; + tmp1 = dataptr[1] + dataptr[6]; + tmp6 = dataptr[1] - dataptr[6]; + tmp2 = dataptr[2] + dataptr[5]; + tmp5 = dataptr[2] - dataptr[5]; + tmp3 = dataptr[3] + dataptr[4]; + tmp4 = dataptr[3] - dataptr[4]; + + /* Even part per LL&M figure 1 --- note that published figure is faulty; + * rotator "sqrt(2)*c1" should be "sqrt(2)*c6". + */ + + tmp10 = tmp0 + tmp3; + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[0] = (DCTELEM) ((tmp10 + tmp11) << PASS1_BITS); + dataptr[4] = (DCTELEM) ((tmp10 - tmp11) << PASS1_BITS); + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); + dataptr[2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865), + CONST_BITS-PASS1_BITS); + dataptr[6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065), + CONST_BITS-PASS1_BITS); + + /* Odd part per figure 8 --- note paper omits factor of sqrt(2). + * cK represents cos(K*pi/16). + * i0..i3 in the paper are tmp4..tmp7 here. + */ + + z1 = tmp4 + tmp7; + z2 = tmp5 + tmp6; + z3 = tmp4 + tmp6; + z4 = tmp5 + tmp7; + z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ + + tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ + tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ + tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ + tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ + z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ + z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ + z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ + z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ + + z3 += z5; + z4 += z5; + + dataptr[7] = (DCTELEM) DESCALE(tmp4 + z1 + z3, CONST_BITS-PASS1_BITS); + dataptr[5] = (DCTELEM) DESCALE(tmp5 + z2 + z4, CONST_BITS-PASS1_BITS); + dataptr[3] = (DCTELEM) DESCALE(tmp6 + z2 + z3, CONST_BITS-PASS1_BITS); + dataptr[1] = (DCTELEM) DESCALE(tmp7 + z1 + z4, CONST_BITS-PASS1_BITS); + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; + tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; + tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; + tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; + tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; + + /* Even part per LL&M figure 1 --- note that published figure is faulty; + * rotator "sqrt(2)*c1" should be "sqrt(2)*c6". + */ + + tmp10 = tmp0 + tmp3; + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[DCTSIZE*0] = (DCTELEM) DESCALE(tmp10 + tmp11, PASS1_BITS); + dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp10 - tmp11, PASS1_BITS); + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); + dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865), + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065), + CONST_BITS+PASS1_BITS); + + /* Odd part per figure 8 --- note paper omits factor of sqrt(2). + * cK represents cos(K*pi/16). + * i0..i3 in the paper are tmp4..tmp7 here. + */ + + z1 = tmp4 + tmp7; + z2 = tmp5 + tmp6; + z3 = tmp4 + tmp6; + z4 = tmp5 + tmp7; + z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ + + tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ + tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ + tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ + tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ + z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ + z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ + z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ + z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ + + z3 += z5; + z4 += z5; + + dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp4 + z1 + z3, + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp5 + z2 + z4, + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp6 + z2 + z3, + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp7 + z1 + z4, + CONST_BITS+PASS1_BITS); + + dataptr++; /* advance pointer to next column */ + } +} + +#endif /* DCT_ISLOW_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/jidctflt.c b/gtkmm-osx/jpeg-6b/jidctflt.c new file mode 100644 index 0000000..0188ce3 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jidctflt.c @@ -0,0 +1,242 @@ +/* + * jidctflt.c + * + * Copyright (C) 1994-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a floating-point implementation of the + * inverse DCT (Discrete Cosine Transform). In the IJG code, this routine + * must also perform dequantization of the input coefficients. + * + * This implementation should be more accurate than either of the integer + * IDCT implementations. However, it may not give the same results on all + * machines because of differences in roundoff behavior. Speed will depend + * on the hardware's floating point capacity. + * + * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT + * on each row (or vice versa, but it's more convenient to emit a row at + * a time). Direct algorithms are also available, but they are much more + * complex and seem not to be any faster when reduced to code. + * + * This implementation is based on Arai, Agui, and Nakajima's algorithm for + * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in + * Japanese, but the algorithm is described in the Pennebaker & Mitchell + * JPEG textbook (see REFERENCES section in file README). The following code + * is based directly on figure 4-8 in P&M. + * While an 8-point DCT cannot be done in less than 11 multiplies, it is + * possible to arrange the computation so that many of the multiplies are + * simple scalings of the final outputs. These multiplies can then be + * folded into the multiplications or divisions by the JPEG quantization + * table entries. The AA&N method leaves only 5 multiplies and 29 adds + * to be done in the DCT itself. + * The primary disadvantage of this method is that with a fixed-point + * implementation, accuracy is lost due to imprecise representation of the + * scaled quantization values. However, that problem does not arise if + * we use floating point arithmetic. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_FLOAT_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* Dequantize a coefficient by multiplying it by the multiplier-table + * entry; produce a float result. + */ + +#define DEQUANTIZE(coef,quantval) (((FAST_FLOAT) (coef)) * (quantval)) + + +/* + * Perform dequantization and inverse DCT on one block of coefficients. + */ + +GLOBAL(void) +jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + FAST_FLOAT tmp10, tmp11, tmp12, tmp13; + FAST_FLOAT z5, z10, z11, z12, z13; + JCOEFPTR inptr; + FLOAT_MULT_TYPE * quantptr; + FAST_FLOAT * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + FAST_FLOAT workspace[DCTSIZE2]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (FLOAT_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = DCTSIZE; ctr > 0; ctr--) { + /* Due to quantization, we will usually find that many of the input + * coefficients are zero, especially the AC terms. We can exploit this + * by short-circuiting the IDCT calculation for any column in which all + * the AC terms are zero. In that case each output is equal to the + * DC coefficient (with scale factor as needed). + * With typical images and quantization tables, half or more of the + * column DCT calculations can be simplified this way. + */ + + if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && + inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && + inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && + inptr[DCTSIZE*7] == 0) { + /* AC terms all zero */ + FAST_FLOAT dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + + wsptr[DCTSIZE*0] = dcval; + wsptr[DCTSIZE*1] = dcval; + wsptr[DCTSIZE*2] = dcval; + wsptr[DCTSIZE*3] = dcval; + wsptr[DCTSIZE*4] = dcval; + wsptr[DCTSIZE*5] = dcval; + wsptr[DCTSIZE*6] = dcval; + wsptr[DCTSIZE*7] = dcval; + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + continue; + } + + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + tmp3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + tmp10 = tmp0 + tmp2; /* phase 3 */ + tmp11 = tmp0 - tmp2; + + tmp13 = tmp1 + tmp3; /* phases 5-3 */ + tmp12 = (tmp1 - tmp3) * ((FAST_FLOAT) 1.414213562) - tmp13; /* 2*c4 */ + + tmp0 = tmp10 + tmp13; /* phase 2 */ + tmp3 = tmp10 - tmp13; + tmp1 = tmp11 + tmp12; + tmp2 = tmp11 - tmp12; + + /* Odd part */ + + tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + tmp5 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + tmp6 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp7 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + + z13 = tmp6 + tmp5; /* phase 6 */ + z10 = tmp6 - tmp5; + z11 = tmp4 + tmp7; + z12 = tmp4 - tmp7; + + tmp7 = z11 + z13; /* phase 5 */ + tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562); /* 2*c4 */ + + z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */ + tmp10 = ((FAST_FLOAT) 1.082392200) * z12 - z5; /* 2*(c2-c6) */ + tmp12 = ((FAST_FLOAT) -2.613125930) * z10 + z5; /* -2*(c2+c6) */ + + tmp6 = tmp12 - tmp7; /* phase 2 */ + tmp5 = tmp11 - tmp6; + tmp4 = tmp10 + tmp5; + + wsptr[DCTSIZE*0] = tmp0 + tmp7; + wsptr[DCTSIZE*7] = tmp0 - tmp7; + wsptr[DCTSIZE*1] = tmp1 + tmp6; + wsptr[DCTSIZE*6] = tmp1 - tmp6; + wsptr[DCTSIZE*2] = tmp2 + tmp5; + wsptr[DCTSIZE*5] = tmp2 - tmp5; + wsptr[DCTSIZE*4] = tmp3 + tmp4; + wsptr[DCTSIZE*3] = tmp3 - tmp4; + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + } + + /* Pass 2: process rows from work array, store into output array. */ + /* Note that we must descale the results by a factor of 8 == 2**3. */ + + wsptr = workspace; + for (ctr = 0; ctr < DCTSIZE; ctr++) { + outptr = output_buf[ctr] + output_col; + /* Rows of zeroes can be exploited in the same way as we did with columns. + * However, the column calculation has created many nonzero AC terms, so + * the simplification applies less often (typically 5% to 10% of the time). + * And testing floats for zero is relatively expensive, so we don't bother. + */ + + /* Even part */ + + tmp10 = wsptr[0] + wsptr[4]; + tmp11 = wsptr[0] - wsptr[4]; + + tmp13 = wsptr[2] + wsptr[6]; + tmp12 = (wsptr[2] - wsptr[6]) * ((FAST_FLOAT) 1.414213562) - tmp13; + + tmp0 = tmp10 + tmp13; + tmp3 = tmp10 - tmp13; + tmp1 = tmp11 + tmp12; + tmp2 = tmp11 - tmp12; + + /* Odd part */ + + z13 = wsptr[5] + wsptr[3]; + z10 = wsptr[5] - wsptr[3]; + z11 = wsptr[1] + wsptr[7]; + z12 = wsptr[1] - wsptr[7]; + + tmp7 = z11 + z13; + tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562); + + z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */ + tmp10 = ((FAST_FLOAT) 1.082392200) * z12 - z5; /* 2*(c2-c6) */ + tmp12 = ((FAST_FLOAT) -2.613125930) * z10 + z5; /* -2*(c2+c6) */ + + tmp6 = tmp12 - tmp7; + tmp5 = tmp11 - tmp6; + tmp4 = tmp10 + tmp5; + + /* Final output stage: scale down by a factor of 8 and range-limit */ + + outptr[0] = range_limit[(int) DESCALE((INT32) (tmp0 + tmp7), 3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) DESCALE((INT32) (tmp0 - tmp7), 3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) DESCALE((INT32) (tmp1 + tmp6), 3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) DESCALE((INT32) (tmp1 - tmp6), 3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) DESCALE((INT32) (tmp2 + tmp5), 3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) DESCALE((INT32) (tmp2 - tmp5), 3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) DESCALE((INT32) (tmp3 + tmp4), 3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) DESCALE((INT32) (tmp3 - tmp4), 3) + & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + +#endif /* DCT_FLOAT_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/jidctfst.c b/gtkmm-osx/jpeg-6b/jidctfst.c new file mode 100644 index 0000000..dba4216 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jidctfst.c @@ -0,0 +1,368 @@ +/* + * jidctfst.c + * + * Copyright (C) 1994-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a fast, not so accurate integer implementation of the + * inverse DCT (Discrete Cosine Transform). In the IJG code, this routine + * must also perform dequantization of the input coefficients. + * + * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT + * on each row (or vice versa, but it's more convenient to emit a row at + * a time). Direct algorithms are also available, but they are much more + * complex and seem not to be any faster when reduced to code. + * + * This implementation is based on Arai, Agui, and Nakajima's algorithm for + * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in + * Japanese, but the algorithm is described in the Pennebaker & Mitchell + * JPEG textbook (see REFERENCES section in file README). The following code + * is based directly on figure 4-8 in P&M. + * While an 8-point DCT cannot be done in less than 11 multiplies, it is + * possible to arrange the computation so that many of the multiplies are + * simple scalings of the final outputs. These multiplies can then be + * folded into the multiplications or divisions by the JPEG quantization + * table entries. The AA&N method leaves only 5 multiplies and 29 adds + * to be done in the DCT itself. + * The primary disadvantage of this method is that with fixed-point math, + * accuracy is lost due to imprecise representation of the scaled + * quantization values. The smaller the quantization table entry, the less + * precise the scaled value, so this implementation does worse with high- + * quality-setting files than with low-quality ones. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_IFAST_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* Scaling decisions are generally the same as in the LL&M algorithm; + * see jidctint.c for more details. However, we choose to descale + * (right shift) multiplication products as soon as they are formed, + * rather than carrying additional fractional bits into subsequent additions. + * This compromises accuracy slightly, but it lets us save a few shifts. + * More importantly, 16-bit arithmetic is then adequate (for 8-bit samples) + * everywhere except in the multiplications proper; this saves a good deal + * of work on 16-bit-int machines. + * + * The dequantized coefficients are not integers because the AA&N scaling + * factors have been incorporated. We represent them scaled up by PASS1_BITS, + * so that the first and second IDCT rounds have the same input scaling. + * For 8-bit JSAMPLEs, we choose IFAST_SCALE_BITS = PASS1_BITS so as to + * avoid a descaling shift; this compromises accuracy rather drastically + * for small quantization table entries, but it saves a lot of shifts. + * For 12-bit JSAMPLEs, there's no hope of using 16x16 multiplies anyway, + * so we use a much larger scaling factor to preserve accuracy. + * + * A final compromise is to represent the multiplicative constants to only + * 8 fractional bits, rather than 13. This saves some shifting work on some + * machines, and may also reduce the cost of multiplication (since there + * are fewer one-bits in the constants). + */ + +#if BITS_IN_JSAMPLE == 8 +#define CONST_BITS 8 +#define PASS1_BITS 2 +#else +#define CONST_BITS 8 +#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ +#endif + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 8 +#define FIX_1_082392200 ((INT32) 277) /* FIX(1.082392200) */ +#define FIX_1_414213562 ((INT32) 362) /* FIX(1.414213562) */ +#define FIX_1_847759065 ((INT32) 473) /* FIX(1.847759065) */ +#define FIX_2_613125930 ((INT32) 669) /* FIX(2.613125930) */ +#else +#define FIX_1_082392200 FIX(1.082392200) +#define FIX_1_414213562 FIX(1.414213562) +#define FIX_1_847759065 FIX(1.847759065) +#define FIX_2_613125930 FIX(2.613125930) +#endif + + +/* We can gain a little more speed, with a further compromise in accuracy, + * by omitting the addition in a descaling shift. This yields an incorrectly + * rounded result half the time... + */ + +#ifndef USE_ACCURATE_ROUNDING +#undef DESCALE +#define DESCALE(x,n) RIGHT_SHIFT(x, n) +#endif + + +/* Multiply a DCTELEM variable by an INT32 constant, and immediately + * descale to yield a DCTELEM result. + */ + +#define MULTIPLY(var,const) ((DCTELEM) DESCALE((var) * (const), CONST_BITS)) + + +/* Dequantize a coefficient by multiplying it by the multiplier-table + * entry; produce a DCTELEM result. For 8-bit data a 16x16->16 + * multiplication will do. For 12-bit data, the multiplier table is + * declared INT32, so a 32-bit multiply will be used. + */ + +#if BITS_IN_JSAMPLE == 8 +#define DEQUANTIZE(coef,quantval) (((IFAST_MULT_TYPE) (coef)) * (quantval)) +#else +#define DEQUANTIZE(coef,quantval) \ + DESCALE((coef)*(quantval), IFAST_SCALE_BITS-PASS1_BITS) +#endif + + +/* Like DESCALE, but applies to a DCTELEM and produces an int. + * We assume that int right shift is unsigned if INT32 right shift is. + */ + +#ifdef RIGHT_SHIFT_IS_UNSIGNED +#define ISHIFT_TEMPS DCTELEM ishift_temp; +#if BITS_IN_JSAMPLE == 8 +#define DCTELEMBITS 16 /* DCTELEM may be 16 or 32 bits */ +#else +#define DCTELEMBITS 32 /* DCTELEM must be 32 bits */ +#endif +#define IRIGHT_SHIFT(x,shft) \ + ((ishift_temp = (x)) < 0 ? \ + (ishift_temp >> (shft)) | ((~((DCTELEM) 0)) << (DCTELEMBITS-(shft))) : \ + (ishift_temp >> (shft))) +#else +#define ISHIFT_TEMPS +#define IRIGHT_SHIFT(x,shft) ((x) >> (shft)) +#endif + +#ifdef USE_ACCURATE_ROUNDING +#define IDESCALE(x,n) ((int) IRIGHT_SHIFT((x) + (1 << ((n)-1)), n)) +#else +#define IDESCALE(x,n) ((int) IRIGHT_SHIFT(x, n)) +#endif + + +/* + * Perform dequantization and inverse DCT on one block of coefficients. + */ + +GLOBAL(void) +jpeg_idct_ifast (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + DCTELEM tmp10, tmp11, tmp12, tmp13; + DCTELEM z5, z10, z11, z12, z13; + JCOEFPTR inptr; + IFAST_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[DCTSIZE2]; /* buffers data between passes */ + SHIFT_TEMPS /* for DESCALE */ + ISHIFT_TEMPS /* for IDESCALE */ + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (IFAST_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = DCTSIZE; ctr > 0; ctr--) { + /* Due to quantization, we will usually find that many of the input + * coefficients are zero, especially the AC terms. We can exploit this + * by short-circuiting the IDCT calculation for any column in which all + * the AC terms are zero. In that case each output is equal to the + * DC coefficient (with scale factor as needed). + * With typical images and quantization tables, half or more of the + * column DCT calculations can be simplified this way. + */ + + if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && + inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && + inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && + inptr[DCTSIZE*7] == 0) { + /* AC terms all zero */ + int dcval = (int) DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + + wsptr[DCTSIZE*0] = dcval; + wsptr[DCTSIZE*1] = dcval; + wsptr[DCTSIZE*2] = dcval; + wsptr[DCTSIZE*3] = dcval; + wsptr[DCTSIZE*4] = dcval; + wsptr[DCTSIZE*5] = dcval; + wsptr[DCTSIZE*6] = dcval; + wsptr[DCTSIZE*7] = dcval; + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + continue; + } + + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + tmp3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + tmp10 = tmp0 + tmp2; /* phase 3 */ + tmp11 = tmp0 - tmp2; + + tmp13 = tmp1 + tmp3; /* phases 5-3 */ + tmp12 = MULTIPLY(tmp1 - tmp3, FIX_1_414213562) - tmp13; /* 2*c4 */ + + tmp0 = tmp10 + tmp13; /* phase 2 */ + tmp3 = tmp10 - tmp13; + tmp1 = tmp11 + tmp12; + tmp2 = tmp11 - tmp12; + + /* Odd part */ + + tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + tmp5 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + tmp6 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp7 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + + z13 = tmp6 + tmp5; /* phase 6 */ + z10 = tmp6 - tmp5; + z11 = tmp4 + tmp7; + z12 = tmp4 - tmp7; + + tmp7 = z11 + z13; /* phase 5 */ + tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */ + + z5 = MULTIPLY(z10 + z12, FIX_1_847759065); /* 2*c2 */ + tmp10 = MULTIPLY(z12, FIX_1_082392200) - z5; /* 2*(c2-c6) */ + tmp12 = MULTIPLY(z10, - FIX_2_613125930) + z5; /* -2*(c2+c6) */ + + tmp6 = tmp12 - tmp7; /* phase 2 */ + tmp5 = tmp11 - tmp6; + tmp4 = tmp10 + tmp5; + + wsptr[DCTSIZE*0] = (int) (tmp0 + tmp7); + wsptr[DCTSIZE*7] = (int) (tmp0 - tmp7); + wsptr[DCTSIZE*1] = (int) (tmp1 + tmp6); + wsptr[DCTSIZE*6] = (int) (tmp1 - tmp6); + wsptr[DCTSIZE*2] = (int) (tmp2 + tmp5); + wsptr[DCTSIZE*5] = (int) (tmp2 - tmp5); + wsptr[DCTSIZE*4] = (int) (tmp3 + tmp4); + wsptr[DCTSIZE*3] = (int) (tmp3 - tmp4); + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + } + + /* Pass 2: process rows from work array, store into output array. */ + /* Note that we must descale the results by a factor of 8 == 2**3, */ + /* and also undo the PASS1_BITS scaling. */ + + wsptr = workspace; + for (ctr = 0; ctr < DCTSIZE; ctr++) { + outptr = output_buf[ctr] + output_col; + /* Rows of zeroes can be exploited in the same way as we did with columns. + * However, the column calculation has created many nonzero AC terms, so + * the simplification applies less often (typically 5% to 10% of the time). + * On machines with very fast multiplication, it's possible that the + * test takes more time than it's worth. In that case this section + * may be commented out. + */ + +#ifndef NO_ZERO_ROW_TEST + if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && wsptr[4] == 0 && + wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) { + /* AC terms all zero */ + JSAMPLE dcval = range_limit[IDESCALE(wsptr[0], PASS1_BITS+3) + & RANGE_MASK]; + + outptr[0] = dcval; + outptr[1] = dcval; + outptr[2] = dcval; + outptr[3] = dcval; + outptr[4] = dcval; + outptr[5] = dcval; + outptr[6] = dcval; + outptr[7] = dcval; + + wsptr += DCTSIZE; /* advance pointer to next row */ + continue; + } +#endif + + /* Even part */ + + tmp10 = ((DCTELEM) wsptr[0] + (DCTELEM) wsptr[4]); + tmp11 = ((DCTELEM) wsptr[0] - (DCTELEM) wsptr[4]); + + tmp13 = ((DCTELEM) wsptr[2] + (DCTELEM) wsptr[6]); + tmp12 = MULTIPLY((DCTELEM) wsptr[2] - (DCTELEM) wsptr[6], FIX_1_414213562) + - tmp13; + + tmp0 = tmp10 + tmp13; + tmp3 = tmp10 - tmp13; + tmp1 = tmp11 + tmp12; + tmp2 = tmp11 - tmp12; + + /* Odd part */ + + z13 = (DCTELEM) wsptr[5] + (DCTELEM) wsptr[3]; + z10 = (DCTELEM) wsptr[5] - (DCTELEM) wsptr[3]; + z11 = (DCTELEM) wsptr[1] + (DCTELEM) wsptr[7]; + z12 = (DCTELEM) wsptr[1] - (DCTELEM) wsptr[7]; + + tmp7 = z11 + z13; /* phase 5 */ + tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */ + + z5 = MULTIPLY(z10 + z12, FIX_1_847759065); /* 2*c2 */ + tmp10 = MULTIPLY(z12, FIX_1_082392200) - z5; /* 2*(c2-c6) */ + tmp12 = MULTIPLY(z10, - FIX_2_613125930) + z5; /* -2*(c2+c6) */ + + tmp6 = tmp12 - tmp7; /* phase 2 */ + tmp5 = tmp11 - tmp6; + tmp4 = tmp10 + tmp5; + + /* Final output stage: scale down by a factor of 8 and range-limit */ + + outptr[0] = range_limit[IDESCALE(tmp0 + tmp7, PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[IDESCALE(tmp0 - tmp7, PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[IDESCALE(tmp1 + tmp6, PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[IDESCALE(tmp1 - tmp6, PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[IDESCALE(tmp2 + tmp5, PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[IDESCALE(tmp2 - tmp5, PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[IDESCALE(tmp3 + tmp4, PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[IDESCALE(tmp3 - tmp4, PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + +#endif /* DCT_IFAST_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/jidctint.c b/gtkmm-osx/jpeg-6b/jidctint.c new file mode 100644 index 0000000..a72b320 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jidctint.c @@ -0,0 +1,389 @@ +/* + * jidctint.c + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a slow-but-accurate integer implementation of the + * inverse DCT (Discrete Cosine Transform). In the IJG code, this routine + * must also perform dequantization of the input coefficients. + * + * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT + * on each row (or vice versa, but it's more convenient to emit a row at + * a time). Direct algorithms are also available, but they are much more + * complex and seem not to be any faster when reduced to code. + * + * This implementation is based on an algorithm described in + * C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT + * Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics, + * Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991. + * The primary algorithm described there uses 11 multiplies and 29 adds. + * We use their alternate method with 12 multiplies and 32 adds. + * The advantage of this method is that no data path contains more than one + * multiplication; this allows a very simple and accurate implementation in + * scaled fixed-point arithmetic, with a minimal number of shifts. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_ISLOW_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* + * The poop on this scaling stuff is as follows: + * + * Each 1-D IDCT step produces outputs which are a factor of sqrt(N) + * larger than the true IDCT outputs. The final outputs are therefore + * a factor of N larger than desired; since N=8 this can be cured by + * a simple right shift at the end of the algorithm. The advantage of + * this arrangement is that we save two multiplications per 1-D IDCT, + * because the y0 and y4 inputs need not be divided by sqrt(N). + * + * We have to do addition and subtraction of the integer inputs, which + * is no problem, and multiplication by fractional constants, which is + * a problem to do in integer arithmetic. We multiply all the constants + * by CONST_SCALE and convert them to integer constants (thus retaining + * CONST_BITS bits of precision in the constants). After doing a + * multiplication we have to divide the product by CONST_SCALE, with proper + * rounding, to produce the correct output. This division can be done + * cheaply as a right shift of CONST_BITS bits. We postpone shifting + * as long as possible so that partial sums can be added together with + * full fractional precision. + * + * The outputs of the first pass are scaled up by PASS1_BITS bits so that + * they are represented to better-than-integral precision. These outputs + * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word + * with the recommended scaling. (To scale up 12-bit sample data further, an + * intermediate INT32 array would be needed.) + * + * To avoid overflow of the 32-bit intermediate results in pass 2, we must + * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26. Error analysis + * shows that the values given below are the most effective. + */ + +#if BITS_IN_JSAMPLE == 8 +#define CONST_BITS 13 +#define PASS1_BITS 2 +#else +#define CONST_BITS 13 +#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ +#endif + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 13 +#define FIX_0_298631336 ((INT32) 2446) /* FIX(0.298631336) */ +#define FIX_0_390180644 ((INT32) 3196) /* FIX(0.390180644) */ +#define FIX_0_541196100 ((INT32) 4433) /* FIX(0.541196100) */ +#define FIX_0_765366865 ((INT32) 6270) /* FIX(0.765366865) */ +#define FIX_0_899976223 ((INT32) 7373) /* FIX(0.899976223) */ +#define FIX_1_175875602 ((INT32) 9633) /* FIX(1.175875602) */ +#define FIX_1_501321110 ((INT32) 12299) /* FIX(1.501321110) */ +#define FIX_1_847759065 ((INT32) 15137) /* FIX(1.847759065) */ +#define FIX_1_961570560 ((INT32) 16069) /* FIX(1.961570560) */ +#define FIX_2_053119869 ((INT32) 16819) /* FIX(2.053119869) */ +#define FIX_2_562915447 ((INT32) 20995) /* FIX(2.562915447) */ +#define FIX_3_072711026 ((INT32) 25172) /* FIX(3.072711026) */ +#else +#define FIX_0_298631336 FIX(0.298631336) +#define FIX_0_390180644 FIX(0.390180644) +#define FIX_0_541196100 FIX(0.541196100) +#define FIX_0_765366865 FIX(0.765366865) +#define FIX_0_899976223 FIX(0.899976223) +#define FIX_1_175875602 FIX(1.175875602) +#define FIX_1_501321110 FIX(1.501321110) +#define FIX_1_847759065 FIX(1.847759065) +#define FIX_1_961570560 FIX(1.961570560) +#define FIX_2_053119869 FIX(2.053119869) +#define FIX_2_562915447 FIX(2.562915447) +#define FIX_3_072711026 FIX(3.072711026) +#endif + + +/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. + * For 8-bit samples with the recommended scaling, all the variable + * and constant values involved are no more than 16 bits wide, so a + * 16x16->32 bit multiply can be used instead of a full 32x32 multiply. + * For 12-bit samples, a full 32-bit multiplication will be needed. + */ + +#if BITS_IN_JSAMPLE == 8 +#define MULTIPLY(var,const) MULTIPLY16C16(var,const) +#else +#define MULTIPLY(var,const) ((var) * (const)) +#endif + + +/* Dequantize a coefficient by multiplying it by the multiplier-table + * entry; produce an int result. In this module, both inputs and result + * are 16 bits or less, so either int or short multiply will work. + */ + +#define DEQUANTIZE(coef,quantval) (((ISLOW_MULT_TYPE) (coef)) * (quantval)) + + +/* + * Perform dequantization and inverse DCT on one block of coefficients. + */ + +GLOBAL(void) +jpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3; + INT32 tmp10, tmp11, tmp12, tmp13; + INT32 z1, z2, z3, z4, z5; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[DCTSIZE2]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + /* Note results are scaled up by sqrt(8) compared to a true IDCT; */ + /* furthermore, we scale the results by 2**PASS1_BITS. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = DCTSIZE; ctr > 0; ctr--) { + /* Due to quantization, we will usually find that many of the input + * coefficients are zero, especially the AC terms. We can exploit this + * by short-circuiting the IDCT calculation for any column in which all + * the AC terms are zero. In that case each output is equal to the + * DC coefficient (with scale factor as needed). + * With typical images and quantization tables, half or more of the + * column DCT calculations can be simplified this way. + */ + + if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && + inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && + inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && + inptr[DCTSIZE*7] == 0) { + /* AC terms all zero */ + int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS; + + wsptr[DCTSIZE*0] = dcval; + wsptr[DCTSIZE*1] = dcval; + wsptr[DCTSIZE*2] = dcval; + wsptr[DCTSIZE*3] = dcval; + wsptr[DCTSIZE*4] = dcval; + wsptr[DCTSIZE*5] = dcval; + wsptr[DCTSIZE*6] = dcval; + wsptr[DCTSIZE*7] = dcval; + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + continue; + } + + /* Even part: reverse the even part of the forward DCT. */ + /* The rotator is sqrt(2)*c(-6). */ + + z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); + tmp2 = z1 + MULTIPLY(z3, - FIX_1_847759065); + tmp3 = z1 + MULTIPLY(z2, FIX_0_765366865); + + z2 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + + tmp0 = (z2 + z3) << CONST_BITS; + tmp1 = (z2 - z3) << CONST_BITS; + + tmp10 = tmp0 + tmp3; + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + /* Odd part per figure 8; the matrix is unitary and hence its + * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. + */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + tmp1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + tmp3 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + + z1 = tmp0 + tmp3; + z2 = tmp1 + tmp2; + z3 = tmp0 + tmp2; + z4 = tmp1 + tmp3; + z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ + + tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ + tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ + tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ + tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ + z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ + z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ + z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ + z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ + + z3 += z5; + z4 += z5; + + tmp0 += z1 + z3; + tmp1 += z2 + z4; + tmp2 += z2 + z3; + tmp3 += z1 + z4; + + /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ + + wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp3, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*7] = (int) DESCALE(tmp10 - tmp3, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*1] = (int) DESCALE(tmp11 + tmp2, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*6] = (int) DESCALE(tmp11 - tmp2, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*2] = (int) DESCALE(tmp12 + tmp1, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*5] = (int) DESCALE(tmp12 - tmp1, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*3] = (int) DESCALE(tmp13 + tmp0, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*4] = (int) DESCALE(tmp13 - tmp0, CONST_BITS-PASS1_BITS); + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + } + + /* Pass 2: process rows from work array, store into output array. */ + /* Note that we must descale the results by a factor of 8 == 2**3, */ + /* and also undo the PASS1_BITS scaling. */ + + wsptr = workspace; + for (ctr = 0; ctr < DCTSIZE; ctr++) { + outptr = output_buf[ctr] + output_col; + /* Rows of zeroes can be exploited in the same way as we did with columns. + * However, the column calculation has created many nonzero AC terms, so + * the simplification applies less often (typically 5% to 10% of the time). + * On machines with very fast multiplication, it's possible that the + * test takes more time than it's worth. In that case this section + * may be commented out. + */ + +#ifndef NO_ZERO_ROW_TEST + if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && wsptr[4] == 0 && + wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) { + /* AC terms all zero */ + JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3) + & RANGE_MASK]; + + outptr[0] = dcval; + outptr[1] = dcval; + outptr[2] = dcval; + outptr[3] = dcval; + outptr[4] = dcval; + outptr[5] = dcval; + outptr[6] = dcval; + outptr[7] = dcval; + + wsptr += DCTSIZE; /* advance pointer to next row */ + continue; + } +#endif + + /* Even part: reverse the even part of the forward DCT. */ + /* The rotator is sqrt(2)*c(-6). */ + + z2 = (INT32) wsptr[2]; + z3 = (INT32) wsptr[6]; + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); + tmp2 = z1 + MULTIPLY(z3, - FIX_1_847759065); + tmp3 = z1 + MULTIPLY(z2, FIX_0_765366865); + + tmp0 = ((INT32) wsptr[0] + (INT32) wsptr[4]) << CONST_BITS; + tmp1 = ((INT32) wsptr[0] - (INT32) wsptr[4]) << CONST_BITS; + + tmp10 = tmp0 + tmp3; + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + /* Odd part per figure 8; the matrix is unitary and hence its + * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. + */ + + tmp0 = (INT32) wsptr[7]; + tmp1 = (INT32) wsptr[5]; + tmp2 = (INT32) wsptr[3]; + tmp3 = (INT32) wsptr[1]; + + z1 = tmp0 + tmp3; + z2 = tmp1 + tmp2; + z3 = tmp0 + tmp2; + z4 = tmp1 + tmp3; + z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ + + tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ + tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ + tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ + tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ + z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ + z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ + z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ + z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ + + z3 += z5; + z4 += z5; + + tmp0 += z1 + z3; + tmp1 += z2 + z4; + tmp2 += z2 + z3; + tmp3 += z1 + z4; + + /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ + + outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp3, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) DESCALE(tmp10 - tmp3, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) DESCALE(tmp11 + tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) DESCALE(tmp11 - tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) DESCALE(tmp12 + tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) DESCALE(tmp12 - tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) DESCALE(tmp13 + tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) DESCALE(tmp13 - tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + +#endif /* DCT_ISLOW_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/jidctred.c b/gtkmm-osx/jpeg-6b/jidctred.c new file mode 100644 index 0000000..421f3c7 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jidctred.c @@ -0,0 +1,398 @@ +/* + * jidctred.c + * + * Copyright (C) 1994-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains inverse-DCT routines that produce reduced-size output: + * either 4x4, 2x2, or 1x1 pixels from an 8x8 DCT block. + * + * The implementation is based on the Loeffler, Ligtenberg and Moschytz (LL&M) + * algorithm used in jidctint.c. We simply replace each 8-to-8 1-D IDCT step + * with an 8-to-4 step that produces the four averages of two adjacent outputs + * (or an 8-to-2 step producing two averages of four outputs, for 2x2 output). + * These steps were derived by computing the corresponding values at the end + * of the normal LL&M code, then simplifying as much as possible. + * + * 1x1 is trivial: just take the DC coefficient divided by 8. + * + * See jidctint.c for additional comments. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef IDCT_SCALING_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* Scaling is the same as in jidctint.c. */ + +#if BITS_IN_JSAMPLE == 8 +#define CONST_BITS 13 +#define PASS1_BITS 2 +#else +#define CONST_BITS 13 +#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ +#endif + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 13 +#define FIX_0_211164243 ((INT32) 1730) /* FIX(0.211164243) */ +#define FIX_0_509795579 ((INT32) 4176) /* FIX(0.509795579) */ +#define FIX_0_601344887 ((INT32) 4926) /* FIX(0.601344887) */ +#define FIX_0_720959822 ((INT32) 5906) /* FIX(0.720959822) */ +#define FIX_0_765366865 ((INT32) 6270) /* FIX(0.765366865) */ +#define FIX_0_850430095 ((INT32) 6967) /* FIX(0.850430095) */ +#define FIX_0_899976223 ((INT32) 7373) /* FIX(0.899976223) */ +#define FIX_1_061594337 ((INT32) 8697) /* FIX(1.061594337) */ +#define FIX_1_272758580 ((INT32) 10426) /* FIX(1.272758580) */ +#define FIX_1_451774981 ((INT32) 11893) /* FIX(1.451774981) */ +#define FIX_1_847759065 ((INT32) 15137) /* FIX(1.847759065) */ +#define FIX_2_172734803 ((INT32) 17799) /* FIX(2.172734803) */ +#define FIX_2_562915447 ((INT32) 20995) /* FIX(2.562915447) */ +#define FIX_3_624509785 ((INT32) 29692) /* FIX(3.624509785) */ +#else +#define FIX_0_211164243 FIX(0.211164243) +#define FIX_0_509795579 FIX(0.509795579) +#define FIX_0_601344887 FIX(0.601344887) +#define FIX_0_720959822 FIX(0.720959822) +#define FIX_0_765366865 FIX(0.765366865) +#define FIX_0_850430095 FIX(0.850430095) +#define FIX_0_899976223 FIX(0.899976223) +#define FIX_1_061594337 FIX(1.061594337) +#define FIX_1_272758580 FIX(1.272758580) +#define FIX_1_451774981 FIX(1.451774981) +#define FIX_1_847759065 FIX(1.847759065) +#define FIX_2_172734803 FIX(2.172734803) +#define FIX_2_562915447 FIX(2.562915447) +#define FIX_3_624509785 FIX(3.624509785) +#endif + + +/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. + * For 8-bit samples with the recommended scaling, all the variable + * and constant values involved are no more than 16 bits wide, so a + * 16x16->32 bit multiply can be used instead of a full 32x32 multiply. + * For 12-bit samples, a full 32-bit multiplication will be needed. + */ + +#if BITS_IN_JSAMPLE == 8 +#define MULTIPLY(var,const) MULTIPLY16C16(var,const) +#else +#define MULTIPLY(var,const) ((var) * (const)) +#endif + + +/* Dequantize a coefficient by multiplying it by the multiplier-table + * entry; produce an int result. In this module, both inputs and result + * are 16 bits or less, so either int or short multiply will work. + */ + +#define DEQUANTIZE(coef,quantval) (((ISLOW_MULT_TYPE) (coef)) * (quantval)) + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a reduced-size 4x4 output block. + */ + +GLOBAL(void) +jpeg_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp2, tmp10, tmp12; + INT32 z1, z2, z3, z4; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[DCTSIZE*4]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = DCTSIZE; ctr > 0; inptr++, quantptr++, wsptr++, ctr--) { + /* Don't bother to process column 4, because second pass won't use it */ + if (ctr == DCTSIZE-4) + continue; + if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && + inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*5] == 0 && + inptr[DCTSIZE*6] == 0 && inptr[DCTSIZE*7] == 0) { + /* AC terms all zero; we need not examine term 4 for 4x4 output */ + int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS; + + wsptr[DCTSIZE*0] = dcval; + wsptr[DCTSIZE*1] = dcval; + wsptr[DCTSIZE*2] = dcval; + wsptr[DCTSIZE*3] = dcval; + + continue; + } + + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp0 <<= (CONST_BITS+1); + + z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + tmp2 = MULTIPLY(z2, FIX_1_847759065) + MULTIPLY(z3, - FIX_0_765366865); + + tmp10 = tmp0 + tmp2; + tmp12 = tmp0 - tmp2; + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + z2 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + + tmp0 = MULTIPLY(z1, - FIX_0_211164243) /* sqrt(2) * (c3-c1) */ + + MULTIPLY(z2, FIX_1_451774981) /* sqrt(2) * (c3+c7) */ + + MULTIPLY(z3, - FIX_2_172734803) /* sqrt(2) * (-c1-c5) */ + + MULTIPLY(z4, FIX_1_061594337); /* sqrt(2) * (c5+c7) */ + + tmp2 = MULTIPLY(z1, - FIX_0_509795579) /* sqrt(2) * (c7-c5) */ + + MULTIPLY(z2, - FIX_0_601344887) /* sqrt(2) * (c5-c1) */ + + MULTIPLY(z3, FIX_0_899976223) /* sqrt(2) * (c3-c7) */ + + MULTIPLY(z4, FIX_2_562915447); /* sqrt(2) * (c1+c3) */ + + /* Final output stage */ + + wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp2, CONST_BITS-PASS1_BITS+1); + wsptr[DCTSIZE*3] = (int) DESCALE(tmp10 - tmp2, CONST_BITS-PASS1_BITS+1); + wsptr[DCTSIZE*1] = (int) DESCALE(tmp12 + tmp0, CONST_BITS-PASS1_BITS+1); + wsptr[DCTSIZE*2] = (int) DESCALE(tmp12 - tmp0, CONST_BITS-PASS1_BITS+1); + } + + /* Pass 2: process 4 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 4; ctr++) { + outptr = output_buf[ctr] + output_col; + /* It's not clear whether a zero row test is worthwhile here ... */ + +#ifndef NO_ZERO_ROW_TEST + if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && + wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) { + /* AC terms all zero */ + JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3) + & RANGE_MASK]; + + outptr[0] = dcval; + outptr[1] = dcval; + outptr[2] = dcval; + outptr[3] = dcval; + + wsptr += DCTSIZE; /* advance pointer to next row */ + continue; + } +#endif + + /* Even part */ + + tmp0 = ((INT32) wsptr[0]) << (CONST_BITS+1); + + tmp2 = MULTIPLY((INT32) wsptr[2], FIX_1_847759065) + + MULTIPLY((INT32) wsptr[6], - FIX_0_765366865); + + tmp10 = tmp0 + tmp2; + tmp12 = tmp0 - tmp2; + + /* Odd part */ + + z1 = (INT32) wsptr[7]; + z2 = (INT32) wsptr[5]; + z3 = (INT32) wsptr[3]; + z4 = (INT32) wsptr[1]; + + tmp0 = MULTIPLY(z1, - FIX_0_211164243) /* sqrt(2) * (c3-c1) */ + + MULTIPLY(z2, FIX_1_451774981) /* sqrt(2) * (c3+c7) */ + + MULTIPLY(z3, - FIX_2_172734803) /* sqrt(2) * (-c1-c5) */ + + MULTIPLY(z4, FIX_1_061594337); /* sqrt(2) * (c5+c7) */ + + tmp2 = MULTIPLY(z1, - FIX_0_509795579) /* sqrt(2) * (c7-c5) */ + + MULTIPLY(z2, - FIX_0_601344887) /* sqrt(2) * (c5-c1) */ + + MULTIPLY(z3, FIX_0_899976223) /* sqrt(2) * (c3-c7) */ + + MULTIPLY(z4, FIX_2_562915447); /* sqrt(2) * (c1+c3) */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp2, + CONST_BITS+PASS1_BITS+3+1) + & RANGE_MASK]; + outptr[3] = range_limit[(int) DESCALE(tmp10 - tmp2, + CONST_BITS+PASS1_BITS+3+1) + & RANGE_MASK]; + outptr[1] = range_limit[(int) DESCALE(tmp12 + tmp0, + CONST_BITS+PASS1_BITS+3+1) + & RANGE_MASK]; + outptr[2] = range_limit[(int) DESCALE(tmp12 - tmp0, + CONST_BITS+PASS1_BITS+3+1) + & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a reduced-size 2x2 output block. + */ + +GLOBAL(void) +jpeg_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp10, z1; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[DCTSIZE*2]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = DCTSIZE; ctr > 0; inptr++, quantptr++, wsptr++, ctr--) { + /* Don't bother to process columns 2,4,6 */ + if (ctr == DCTSIZE-2 || ctr == DCTSIZE-4 || ctr == DCTSIZE-6) + continue; + if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*3] == 0 && + inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*7] == 0) { + /* AC terms all zero; we need not examine terms 2,4,6 for 2x2 output */ + int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS; + + wsptr[DCTSIZE*0] = dcval; + wsptr[DCTSIZE*1] = dcval; + + continue; + } + + /* Even part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp10 = z1 << (CONST_BITS+2); + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + tmp0 = MULTIPLY(z1, - FIX_0_720959822); /* sqrt(2) * (c7-c5+c3-c1) */ + z1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp0 += MULTIPLY(z1, FIX_0_850430095); /* sqrt(2) * (-c1+c3+c5+c7) */ + z1 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + tmp0 += MULTIPLY(z1, - FIX_1_272758580); /* sqrt(2) * (-c1+c3-c5-c7) */ + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + tmp0 += MULTIPLY(z1, FIX_3_624509785); /* sqrt(2) * (c1+c3+c5+c7) */ + + /* Final output stage */ + + wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp0, CONST_BITS-PASS1_BITS+2); + wsptr[DCTSIZE*1] = (int) DESCALE(tmp10 - tmp0, CONST_BITS-PASS1_BITS+2); + } + + /* Pass 2: process 2 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 2; ctr++) { + outptr = output_buf[ctr] + output_col; + /* It's not clear whether a zero row test is worthwhile here ... */ + +#ifndef NO_ZERO_ROW_TEST + if (wsptr[1] == 0 && wsptr[3] == 0 && wsptr[5] == 0 && wsptr[7] == 0) { + /* AC terms all zero */ + JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3) + & RANGE_MASK]; + + outptr[0] = dcval; + outptr[1] = dcval; + + wsptr += DCTSIZE; /* advance pointer to next row */ + continue; + } +#endif + + /* Even part */ + + tmp10 = ((INT32) wsptr[0]) << (CONST_BITS+2); + + /* Odd part */ + + tmp0 = MULTIPLY((INT32) wsptr[7], - FIX_0_720959822) /* sqrt(2) * (c7-c5+c3-c1) */ + + MULTIPLY((INT32) wsptr[5], FIX_0_850430095) /* sqrt(2) * (-c1+c3+c5+c7) */ + + MULTIPLY((INT32) wsptr[3], - FIX_1_272758580) /* sqrt(2) * (-c1+c3-c5-c7) */ + + MULTIPLY((INT32) wsptr[1], FIX_3_624509785); /* sqrt(2) * (c1+c3+c5+c7) */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp0, + CONST_BITS+PASS1_BITS+3+2) + & RANGE_MASK]; + outptr[1] = range_limit[(int) DESCALE(tmp10 - tmp0, + CONST_BITS+PASS1_BITS+3+2) + & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a reduced-size 1x1 output block. + */ + +GLOBAL(void) +jpeg_idct_1x1 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + int dcval; + ISLOW_MULT_TYPE * quantptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + SHIFT_TEMPS + + /* We hardly need an inverse DCT routine for this: just take the + * average pixel value, which is one-eighth of the DC coefficient. + */ + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + dcval = DEQUANTIZE(coef_block[0], quantptr[0]); + dcval = (int) DESCALE((INT32) dcval, 3); + + output_buf[0][output_col] = range_limit[dcval & RANGE_MASK]; +} + +#endif /* IDCT_SCALING_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/jinclude.h b/gtkmm-osx/jpeg-6b/jinclude.h new file mode 100644 index 0000000..0a4f151 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jinclude.h @@ -0,0 +1,91 @@ +/* + * jinclude.h + * + * Copyright (C) 1991-1994, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file exists to provide a single place to fix any problems with + * including the wrong system include files. (Common problems are taken + * care of by the standard jconfig symbols, but on really weird systems + * you may have to edit this file.) + * + * NOTE: this file is NOT intended to be included by applications using the + * JPEG library. Most applications need only include jpeglib.h. + */ + + +/* Include auto-config file to find out which system include files we need. */ + +#include "jconfig.h" /* auto configuration options */ +#define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */ + +/* + * We need the NULL macro and size_t typedef. + * On an ANSI-conforming system it is sufficient to include . + * Otherwise, we get them from or ; we may have to + * pull in as well. + * Note that the core JPEG library does not require ; + * only the default error handler and data source/destination modules do. + * But we must pull it in because of the references to FILE in jpeglib.h. + * You can remove those references if you want to compile without . + */ + +#ifdef HAVE_STDDEF_H +#include +#endif + +#ifdef HAVE_STDLIB_H +#include +#endif + +#ifdef NEED_SYS_TYPES_H +#include +#endif + +#include + +/* + * We need memory copying and zeroing functions, plus strncpy(). + * ANSI and System V implementations declare these in . + * BSD doesn't have the mem() functions, but it does have bcopy()/bzero(). + * Some systems may declare memset and memcpy in . + * + * NOTE: we assume the size parameters to these functions are of type size_t. + * Change the casts in these macros if not! + */ + +#ifdef NEED_BSD_STRINGS + +#include +#define MEMZERO(target,size) bzero((void *)(target), (size_t)(size)) +#define MEMCOPY(dest,src,size) bcopy((const void *)(src), (void *)(dest), (size_t)(size)) + +#else /* not BSD, assume ANSI/SysV string lib */ + +#include +#define MEMZERO(target,size) memset((void *)(target), 0, (size_t)(size)) +#define MEMCOPY(dest,src,size) memcpy((void *)(dest), (const void *)(src), (size_t)(size)) + +#endif + +/* + * In ANSI C, and indeed any rational implementation, size_t is also the + * type returned by sizeof(). However, it seems there are some irrational + * implementations out there, in which sizeof() returns an int even though + * size_t is defined as long or unsigned long. To ensure consistent results + * we always use this SIZEOF() macro in place of using sizeof() directly. + */ + +#define SIZEOF(object) ((size_t) sizeof(object)) + +/* + * The modules that use fread() and fwrite() always invoke them through + * these macros. On some systems you may need to twiddle the argument casts. + * CAUTION: argument order is different from underlying functions! + */ + +#define JFREAD(file,buf,sizeofbuf) \ + ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) +#define JFWRITE(file,buf,sizeofbuf) \ + ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) diff --git a/gtkmm-osx/jpeg-6b/jmemansi.c b/gtkmm-osx/jpeg-6b/jmemansi.c new file mode 100644 index 0000000..2d93e49 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jmemansi.c @@ -0,0 +1,167 @@ +/* + * jmemansi.c + * + * Copyright (C) 1992-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file provides a simple generic implementation of the system- + * dependent portion of the JPEG memory manager. This implementation + * assumes that you have the ANSI-standard library routine tmpfile(). + * Also, the problem of determining the amount of memory available + * is shoved onto the user. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ +extern void * malloc JPP((size_t size)); +extern void free JPP((void *ptr)); +#endif + +#ifndef SEEK_SET /* pre-ANSI systems may not define this; */ +#define SEEK_SET 0 /* if not, assume 0 is correct */ +#endif + + +/* + * Memory allocation and freeing are controlled by the regular library + * routines malloc() and free(). + */ + +GLOBAL(void *) +jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * "Large" objects are treated the same as "small" ones. + * NB: although we include FAR keywords in the routine declarations, + * this file won't actually work in 80x86 small/medium model; at least, + * you probably won't be able to process useful-size images in only 64KB. + */ + +GLOBAL(void FAR *) +jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void FAR *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * This routine computes the total memory space available for allocation. + * It's impossible to do this in a portable way; our current solution is + * to make the user tell us (with a default value set at compile time). + * If you can actually get the available space, it's a good idea to subtract + * a slop factor of 5% or so. + */ + +#ifndef DEFAULT_MAX_MEM /* so can override from makefile */ +#define DEFAULT_MAX_MEM 1000000L /* default: one megabyte */ +#endif + +GLOBAL(long) +jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, + long max_bytes_needed, long already_allocated) +{ + return cinfo->mem->max_memory_to_use - already_allocated; +} + + +/* + * Backing store (temporary file) management. + * Backing store objects are only used when the value returned by + * jpeg_mem_available is less than the total space needed. You can dispense + * with these routines if you have plenty of virtual memory; see jmemnobs.c. + */ + + +METHODDEF(void) +read_backing_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (fseek(info->temp_file, file_offset, SEEK_SET)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + if (JFREAD(info->temp_file, buffer_address, byte_count) + != (size_t) byte_count) + ERREXIT(cinfo, JERR_TFILE_READ); +} + + +METHODDEF(void) +write_backing_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (fseek(info->temp_file, file_offset, SEEK_SET)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + if (JFWRITE(info->temp_file, buffer_address, byte_count) + != (size_t) byte_count) + ERREXIT(cinfo, JERR_TFILE_WRITE); +} + + +METHODDEF(void) +close_backing_store (j_common_ptr cinfo, backing_store_ptr info) +{ + fclose(info->temp_file); + /* Since this implementation uses tmpfile() to create the file, + * no explicit file deletion is needed. + */ +} + + +/* + * Initial opening of a backing-store object. + * + * This version uses tmpfile(), which constructs a suitable file name + * behind the scenes. We don't have to use info->temp_name[] at all; + * indeed, we can't even find out the actual name of the temp file. + */ + +GLOBAL(void) +jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + if ((info->temp_file = tmpfile()) == NULL) + ERREXITS(cinfo, JERR_TFILE_CREATE, ""); + info->read_backing_store = read_backing_store; + info->write_backing_store = write_backing_store; + info->close_backing_store = close_backing_store; +} + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. + */ + +GLOBAL(long) +jpeg_mem_init (j_common_ptr cinfo) +{ + return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ +} + +GLOBAL(void) +jpeg_mem_term (j_common_ptr cinfo) +{ + /* no work */ +} diff --git a/gtkmm-osx/jpeg-6b/jmemdos.c b/gtkmm-osx/jpeg-6b/jmemdos.c new file mode 100644 index 0000000..60b45c6 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jmemdos.c @@ -0,0 +1,638 @@ +/* + * jmemdos.c + * + * Copyright (C) 1992-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file provides an MS-DOS-compatible implementation of the system- + * dependent portion of the JPEG memory manager. Temporary data can be + * stored in extended or expanded memory as well as in regular DOS files. + * + * If you use this file, you must be sure that NEED_FAR_POINTERS is defined + * if you compile in a small-data memory model; it should NOT be defined if + * you use a large-data memory model. This file is not recommended if you + * are using a flat-memory-space 386 environment such as DJGCC or Watcom C. + * Also, this code will NOT work if struct fields are aligned on greater than + * 2-byte boundaries. + * + * Based on code contributed by Ge' Weijers. + */ + +/* + * If you have both extended and expanded memory, you may want to change the + * order in which they are tried in jopen_backing_store. On a 286 machine + * expanded memory is usually faster, since extended memory access involves + * an expensive protected-mode-and-back switch. On 386 and better, extended + * memory is usually faster. As distributed, the code tries extended memory + * first (what? not everyone has a 386? :-). + * + * You can disable use of extended/expanded memory entirely by altering these + * definitions or overriding them from the Makefile (eg, -DEMS_SUPPORTED=0). + */ + +#ifndef XMS_SUPPORTED +#define XMS_SUPPORTED 1 +#endif +#ifndef EMS_SUPPORTED +#define EMS_SUPPORTED 1 +#endif + + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#ifndef HAVE_STDLIB_H /* should declare these */ +extern void * malloc JPP((size_t size)); +extern void free JPP((void *ptr)); +extern char * getenv JPP((const char * name)); +#endif + +#ifdef NEED_FAR_POINTERS + +#ifdef __TURBOC__ +/* These definitions work for Borland C (Turbo C) */ +#include /* need farmalloc(), farfree() */ +#define far_malloc(x) farmalloc(x) +#define far_free(x) farfree(x) +#else +/* These definitions work for Microsoft C and compatible compilers */ +#include /* need _fmalloc(), _ffree() */ +#define far_malloc(x) _fmalloc(x) +#define far_free(x) _ffree(x) +#endif + +#else /* not NEED_FAR_POINTERS */ + +#define far_malloc(x) malloc(x) +#define far_free(x) free(x) + +#endif /* NEED_FAR_POINTERS */ + +#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ +#define READ_BINARY "r" +#else +#define READ_BINARY "rb" +#endif + +#ifndef USE_MSDOS_MEMMGR /* make sure user got configuration right */ + You forgot to define USE_MSDOS_MEMMGR in jconfig.h. /* deliberate syntax error */ +#endif + +#if MAX_ALLOC_CHUNK >= 65535L /* make sure jconfig.h got this right */ + MAX_ALLOC_CHUNK should be less than 64K. /* deliberate syntax error */ +#endif + + +/* + * Declarations for assembly-language support routines (see jmemdosa.asm). + * + * The functions are declared "far" as are all their pointer arguments; + * this ensures the assembly source code will work regardless of the + * compiler memory model. We assume "short" is 16 bits, "long" is 32. + */ + +typedef void far * XMSDRIVER; /* actually a pointer to code */ +typedef struct { /* registers for calling XMS driver */ + unsigned short ax, dx, bx; + void far * ds_si; + } XMScontext; +typedef struct { /* registers for calling EMS driver */ + unsigned short ax, dx, bx; + void far * ds_si; + } EMScontext; + +extern short far jdos_open JPP((short far * handle, char far * filename)); +extern short far jdos_close JPP((short handle)); +extern short far jdos_seek JPP((short handle, long offset)); +extern short far jdos_read JPP((short handle, void far * buffer, + unsigned short count)); +extern short far jdos_write JPP((short handle, void far * buffer, + unsigned short count)); +extern void far jxms_getdriver JPP((XMSDRIVER far *)); +extern void far jxms_calldriver JPP((XMSDRIVER, XMScontext far *)); +extern short far jems_available JPP((void)); +extern void far jems_calldriver JPP((EMScontext far *)); + + +/* + * Selection of a file name for a temporary file. + * This is highly system-dependent, and you may want to customize it. + */ + +static int next_file_num; /* to distinguish among several temp files */ + +LOCAL(void) +select_file_name (char * fname) +{ + const char * env; + char * ptr; + FILE * tfile; + + /* Keep generating file names till we find one that's not in use */ + for (;;) { + /* Get temp directory name from environment TMP or TEMP variable; + * if none, use "." + */ + if ((env = (const char *) getenv("TMP")) == NULL) + if ((env = (const char *) getenv("TEMP")) == NULL) + env = "."; + if (*env == '\0') /* null string means "." */ + env = "."; + ptr = fname; /* copy name to fname */ + while (*env != '\0') + *ptr++ = *env++; + if (ptr[-1] != '\\' && ptr[-1] != '/') + *ptr++ = '\\'; /* append backslash if not in env variable */ + /* Append a suitable file name */ + next_file_num++; /* advance counter */ + sprintf(ptr, "JPG%03d.TMP", next_file_num); + /* Probe to see if file name is already in use */ + if ((tfile = fopen(fname, READ_BINARY)) == NULL) + break; + fclose(tfile); /* oops, it's there; close tfile & try again */ + } +} + + +/* + * Near-memory allocation and freeing are controlled by the regular library + * routines malloc() and free(). + */ + +GLOBAL(void *) +jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * "Large" objects are allocated in far memory, if possible + */ + +GLOBAL(void FAR *) +jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void FAR *) far_malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) +{ + far_free(object); +} + + +/* + * This routine computes the total memory space available for allocation. + * It's impossible to do this in a portable way; our current solution is + * to make the user tell us (with a default value set at compile time). + * If you can actually get the available space, it's a good idea to subtract + * a slop factor of 5% or so. + */ + +#ifndef DEFAULT_MAX_MEM /* so can override from makefile */ +#define DEFAULT_MAX_MEM 300000L /* for total usage about 450K */ +#endif + +GLOBAL(long) +jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, + long max_bytes_needed, long already_allocated) +{ + return cinfo->mem->max_memory_to_use - already_allocated; +} + + +/* + * Backing store (temporary file) management. + * Backing store objects are only used when the value returned by + * jpeg_mem_available is less than the total space needed. You can dispense + * with these routines if you have plenty of virtual memory; see jmemnobs.c. + */ + +/* + * For MS-DOS we support three types of backing storage: + * 1. Conventional DOS files. We access these by direct DOS calls rather + * than via the stdio package. This provides a bit better performance, + * but the real reason is that the buffers to be read or written are FAR. + * The stdio library for small-data memory models can't cope with that. + * 2. Extended memory, accessed per the XMS V2.0 specification. + * 3. Expanded memory, accessed per the LIM/EMS 4.0 specification. + * You'll need copies of those specs to make sense of the related code. + * The specs are available by Internet FTP from the SIMTEL archives + * (oak.oakland.edu and its various mirror sites). See files + * pub/msdos/microsoft/xms20.arc and pub/msdos/info/limems41.zip. + */ + + +/* + * Access methods for a DOS file. + */ + + +METHODDEF(void) +read_file_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (jdos_seek(info->handle.file_handle, file_offset)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + /* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */ + if (byte_count > 65535L) /* safety check */ + ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK); + if (jdos_read(info->handle.file_handle, buffer_address, + (unsigned short) byte_count)) + ERREXIT(cinfo, JERR_TFILE_READ); +} + + +METHODDEF(void) +write_file_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (jdos_seek(info->handle.file_handle, file_offset)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + /* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */ + if (byte_count > 65535L) /* safety check */ + ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK); + if (jdos_write(info->handle.file_handle, buffer_address, + (unsigned short) byte_count)) + ERREXIT(cinfo, JERR_TFILE_WRITE); +} + + +METHODDEF(void) +close_file_store (j_common_ptr cinfo, backing_store_ptr info) +{ + jdos_close(info->handle.file_handle); /* close the file */ + remove(info->temp_name); /* delete the file */ +/* If your system doesn't have remove(), try unlink() instead. + * remove() is the ANSI-standard name for this function, but + * unlink() was more common in pre-ANSI systems. + */ + TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name); +} + + +LOCAL(boolean) +open_file_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + short handle; + + select_file_name(info->temp_name); + if (jdos_open((short far *) & handle, (char far *) info->temp_name)) { + /* might as well exit since jpeg_open_backing_store will fail anyway */ + ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); + return FALSE; + } + info->handle.file_handle = handle; + info->read_backing_store = read_file_store; + info->write_backing_store = write_file_store; + info->close_backing_store = close_file_store; + TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name); + return TRUE; /* succeeded */ +} + + +/* + * Access methods for extended memory. + */ + +#if XMS_SUPPORTED + +static XMSDRIVER xms_driver; /* saved address of XMS driver */ + +typedef union { /* either long offset or real-mode pointer */ + long offset; + void far * ptr; + } XMSPTR; + +typedef struct { /* XMS move specification structure */ + long length; + XMSH src_handle; + XMSPTR src; + XMSH dst_handle; + XMSPTR dst; + } XMSspec; + +#define ODD(X) (((X) & 1L) != 0) + + +METHODDEF(void) +read_xms_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + XMScontext ctx; + XMSspec spec; + char endbuffer[2]; + + /* The XMS driver can't cope with an odd length, so handle the last byte + * specially if byte_count is odd. We don't expect this to be common. + */ + + spec.length = byte_count & (~ 1L); + spec.src_handle = info->handle.xms_handle; + spec.src.offset = file_offset; + spec.dst_handle = 0; + spec.dst.ptr = buffer_address; + + ctx.ds_si = (void far *) & spec; + ctx.ax = 0x0b00; /* EMB move */ + jxms_calldriver(xms_driver, (XMScontext far *) & ctx); + if (ctx.ax != 1) + ERREXIT(cinfo, JERR_XMS_READ); + + if (ODD(byte_count)) { + read_xms_store(cinfo, info, (void FAR *) endbuffer, + file_offset + byte_count - 1L, 2L); + ((char FAR *) buffer_address)[byte_count - 1L] = endbuffer[0]; + } +} + + +METHODDEF(void) +write_xms_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + XMScontext ctx; + XMSspec spec; + char endbuffer[2]; + + /* The XMS driver can't cope with an odd length, so handle the last byte + * specially if byte_count is odd. We don't expect this to be common. + */ + + spec.length = byte_count & (~ 1L); + spec.src_handle = 0; + spec.src.ptr = buffer_address; + spec.dst_handle = info->handle.xms_handle; + spec.dst.offset = file_offset; + + ctx.ds_si = (void far *) & spec; + ctx.ax = 0x0b00; /* EMB move */ + jxms_calldriver(xms_driver, (XMScontext far *) & ctx); + if (ctx.ax != 1) + ERREXIT(cinfo, JERR_XMS_WRITE); + + if (ODD(byte_count)) { + read_xms_store(cinfo, info, (void FAR *) endbuffer, + file_offset + byte_count - 1L, 2L); + endbuffer[0] = ((char FAR *) buffer_address)[byte_count - 1L]; + write_xms_store(cinfo, info, (void FAR *) endbuffer, + file_offset + byte_count - 1L, 2L); + } +} + + +METHODDEF(void) +close_xms_store (j_common_ptr cinfo, backing_store_ptr info) +{ + XMScontext ctx; + + ctx.dx = info->handle.xms_handle; + ctx.ax = 0x0a00; + jxms_calldriver(xms_driver, (XMScontext far *) & ctx); + TRACEMS1(cinfo, 1, JTRC_XMS_CLOSE, info->handle.xms_handle); + /* we ignore any error return from the driver */ +} + + +LOCAL(boolean) +open_xms_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + XMScontext ctx; + + /* Get address of XMS driver */ + jxms_getdriver((XMSDRIVER far *) & xms_driver); + if (xms_driver == NULL) + return FALSE; /* no driver to be had */ + + /* Get version number, must be >= 2.00 */ + ctx.ax = 0x0000; + jxms_calldriver(xms_driver, (XMScontext far *) & ctx); + if (ctx.ax < (unsigned short) 0x0200) + return FALSE; + + /* Try to get space (expressed in kilobytes) */ + ctx.dx = (unsigned short) ((total_bytes_needed + 1023L) >> 10); + ctx.ax = 0x0900; + jxms_calldriver(xms_driver, (XMScontext far *) & ctx); + if (ctx.ax != 1) + return FALSE; + + /* Succeeded, save the handle and away we go */ + info->handle.xms_handle = ctx.dx; + info->read_backing_store = read_xms_store; + info->write_backing_store = write_xms_store; + info->close_backing_store = close_xms_store; + TRACEMS1(cinfo, 1, JTRC_XMS_OPEN, ctx.dx); + return TRUE; /* succeeded */ +} + +#endif /* XMS_SUPPORTED */ + + +/* + * Access methods for expanded memory. + */ + +#if EMS_SUPPORTED + +/* The EMS move specification structure requires word and long fields aligned + * at odd byte boundaries. Some compilers will align struct fields at even + * byte boundaries. While it's usually possible to force byte alignment, + * that causes an overall performance penalty and may pose problems in merging + * JPEG into a larger application. Instead we accept some rather dirty code + * here. Note this code would fail if the hardware did not allow odd-byte + * word & long accesses, but all 80x86 CPUs do. + */ + +typedef void far * EMSPTR; + +typedef union { /* EMS move specification structure */ + long length; /* It's easy to access first 4 bytes */ + char bytes[18]; /* Misaligned fields in here! */ + } EMSspec; + +/* Macros for accessing misaligned fields */ +#define FIELD_AT(spec,offset,type) (*((type *) &(spec.bytes[offset]))) +#define SRC_TYPE(spec) FIELD_AT(spec,4,char) +#define SRC_HANDLE(spec) FIELD_AT(spec,5,EMSH) +#define SRC_OFFSET(spec) FIELD_AT(spec,7,unsigned short) +#define SRC_PAGE(spec) FIELD_AT(spec,9,unsigned short) +#define SRC_PTR(spec) FIELD_AT(spec,7,EMSPTR) +#define DST_TYPE(spec) FIELD_AT(spec,11,char) +#define DST_HANDLE(spec) FIELD_AT(spec,12,EMSH) +#define DST_OFFSET(spec) FIELD_AT(spec,14,unsigned short) +#define DST_PAGE(spec) FIELD_AT(spec,16,unsigned short) +#define DST_PTR(spec) FIELD_AT(spec,14,EMSPTR) + +#define EMSPAGESIZE 16384L /* gospel, see the EMS specs */ + +#define HIBYTE(W) (((W) >> 8) & 0xFF) +#define LOBYTE(W) ((W) & 0xFF) + + +METHODDEF(void) +read_ems_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + EMScontext ctx; + EMSspec spec; + + spec.length = byte_count; + SRC_TYPE(spec) = 1; + SRC_HANDLE(spec) = info->handle.ems_handle; + SRC_PAGE(spec) = (unsigned short) (file_offset / EMSPAGESIZE); + SRC_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE); + DST_TYPE(spec) = 0; + DST_HANDLE(spec) = 0; + DST_PTR(spec) = buffer_address; + + ctx.ds_si = (void far *) & spec; + ctx.ax = 0x5700; /* move memory region */ + jems_calldriver((EMScontext far *) & ctx); + if (HIBYTE(ctx.ax) != 0) + ERREXIT(cinfo, JERR_EMS_READ); +} + + +METHODDEF(void) +write_ems_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + EMScontext ctx; + EMSspec spec; + + spec.length = byte_count; + SRC_TYPE(spec) = 0; + SRC_HANDLE(spec) = 0; + SRC_PTR(spec) = buffer_address; + DST_TYPE(spec) = 1; + DST_HANDLE(spec) = info->handle.ems_handle; + DST_PAGE(spec) = (unsigned short) (file_offset / EMSPAGESIZE); + DST_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE); + + ctx.ds_si = (void far *) & spec; + ctx.ax = 0x5700; /* move memory region */ + jems_calldriver((EMScontext far *) & ctx); + if (HIBYTE(ctx.ax) != 0) + ERREXIT(cinfo, JERR_EMS_WRITE); +} + + +METHODDEF(void) +close_ems_store (j_common_ptr cinfo, backing_store_ptr info) +{ + EMScontext ctx; + + ctx.ax = 0x4500; + ctx.dx = info->handle.ems_handle; + jems_calldriver((EMScontext far *) & ctx); + TRACEMS1(cinfo, 1, JTRC_EMS_CLOSE, info->handle.ems_handle); + /* we ignore any error return from the driver */ +} + + +LOCAL(boolean) +open_ems_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + EMScontext ctx; + + /* Is EMS driver there? */ + if (! jems_available()) + return FALSE; + + /* Get status, make sure EMS is OK */ + ctx.ax = 0x4000; + jems_calldriver((EMScontext far *) & ctx); + if (HIBYTE(ctx.ax) != 0) + return FALSE; + + /* Get version, must be >= 4.0 */ + ctx.ax = 0x4600; + jems_calldriver((EMScontext far *) & ctx); + if (HIBYTE(ctx.ax) != 0 || LOBYTE(ctx.ax) < 0x40) + return FALSE; + + /* Try to allocate requested space */ + ctx.ax = 0x4300; + ctx.bx = (unsigned short) ((total_bytes_needed + EMSPAGESIZE-1L) / EMSPAGESIZE); + jems_calldriver((EMScontext far *) & ctx); + if (HIBYTE(ctx.ax) != 0) + return FALSE; + + /* Succeeded, save the handle and away we go */ + info->handle.ems_handle = ctx.dx; + info->read_backing_store = read_ems_store; + info->write_backing_store = write_ems_store; + info->close_backing_store = close_ems_store; + TRACEMS1(cinfo, 1, JTRC_EMS_OPEN, ctx.dx); + return TRUE; /* succeeded */ +} + +#endif /* EMS_SUPPORTED */ + + +/* + * Initial opening of a backing-store object. + */ + +GLOBAL(void) +jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + /* Try extended memory, then expanded memory, then regular file. */ +#if XMS_SUPPORTED + if (open_xms_store(cinfo, info, total_bytes_needed)) + return; +#endif +#if EMS_SUPPORTED + if (open_ems_store(cinfo, info, total_bytes_needed)) + return; +#endif + if (open_file_store(cinfo, info, total_bytes_needed)) + return; + ERREXITS(cinfo, JERR_TFILE_CREATE, ""); +} + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. + */ + +GLOBAL(long) +jpeg_mem_init (j_common_ptr cinfo) +{ + next_file_num = 0; /* initialize temp file name generator */ + return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ +} + +GLOBAL(void) +jpeg_mem_term (j_common_ptr cinfo) +{ + /* Microsoft C, at least in v6.00A, will not successfully reclaim freed + * blocks of size > 32Kbytes unless we give it a kick in the rear, like so: + */ +#ifdef NEED_FHEAPMIN + _fheapmin(); +#endif +} diff --git a/gtkmm-osx/jpeg-6b/jmemdosa.asm b/gtkmm-osx/jpeg-6b/jmemdosa.asm new file mode 100644 index 0000000..ecd4372 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jmemdosa.asm @@ -0,0 +1,379 @@ +; +; jmemdosa.asm +; +; Copyright (C) 1992, Thomas G. Lane. +; This file is part of the Independent JPEG Group's software. +; For conditions of distribution and use, see the accompanying README file. +; +; This file contains low-level interface routines to support the MS-DOS +; backing store manager (jmemdos.c). Routines are provided to access disk +; files through direct DOS calls, and to access XMS and EMS drivers. +; +; This file should assemble with Microsoft's MASM or any compatible +; assembler (including Borland's Turbo Assembler). If you haven't got +; a compatible assembler, better fall back to jmemansi.c or jmemname.c. +; +; To minimize dependence on the C compiler's register usage conventions, +; we save and restore all 8086 registers, even though most compilers only +; require SI,DI,DS to be preserved. Also, we use only 16-bit-wide return +; values, which everybody returns in AX. +; +; Based on code contributed by Ge' Weijers. +; + +JMEMDOSA_TXT segment byte public 'CODE' + + assume cs:JMEMDOSA_TXT + + public _jdos_open + public _jdos_close + public _jdos_seek + public _jdos_read + public _jdos_write + public _jxms_getdriver + public _jxms_calldriver + public _jems_available + public _jems_calldriver + +; +; short far jdos_open (short far * handle, char far * filename) +; +; Create and open a temporary file +; +_jdos_open proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov cx,0 ; normal file attributes + lds dx,dword ptr [bp+10] ; get filename pointer + mov ah,3ch ; create file + int 21h + jc open_err ; if failed, return error code + lds bx,dword ptr [bp+6] ; get handle pointer + mov word ptr [bx],ax ; save the handle + xor ax,ax ; return zero for OK +open_err: pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jdos_open endp + + +; +; short far jdos_close (short handle) +; +; Close the file handle +; +_jdos_close proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov bx,word ptr [bp+6] ; file handle + mov ah,3eh ; close file + int 21h + jc close_err ; if failed, return error code + xor ax,ax ; return zero for OK +close_err: pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jdos_close endp + + +; +; short far jdos_seek (short handle, long offset) +; +; Set file position +; +_jdos_seek proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov bx,word ptr [bp+6] ; file handle + mov dx,word ptr [bp+8] ; LS offset + mov cx,word ptr [bp+10] ; MS offset + mov ax,4200h ; absolute seek + int 21h + jc seek_err ; if failed, return error code + xor ax,ax ; return zero for OK +seek_err: pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jdos_seek endp + + +; +; short far jdos_read (short handle, void far * buffer, unsigned short count) +; +; Read from file +; +_jdos_read proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov bx,word ptr [bp+6] ; file handle + lds dx,dword ptr [bp+8] ; buffer address + mov cx,word ptr [bp+12] ; number of bytes + mov ah,3fh ; read file + int 21h + jc read_err ; if failed, return error code + cmp ax,word ptr [bp+12] ; make sure all bytes were read + je read_ok + mov ax,1 ; else return 1 for not OK + jmp short read_err +read_ok: xor ax,ax ; return zero for OK +read_err: pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jdos_read endp + + +; +; short far jdos_write (short handle, void far * buffer, unsigned short count) +; +; Write to file +; +_jdos_write proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov bx,word ptr [bp+6] ; file handle + lds dx,dword ptr [bp+8] ; buffer address + mov cx,word ptr [bp+12] ; number of bytes + mov ah,40h ; write file + int 21h + jc write_err ; if failed, return error code + cmp ax,word ptr [bp+12] ; make sure all bytes written + je write_ok + mov ax,1 ; else return 1 for not OK + jmp short write_err +write_ok: xor ax,ax ; return zero for OK +write_err: pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jdos_write endp + + +; +; void far jxms_getdriver (XMSDRIVER far *) +; +; Get the address of the XMS driver, or NULL if not available +; +_jxms_getdriver proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov ax,4300h ; call multiplex interrupt with + int 2fh ; a magic cookie, hex 4300 + cmp al,80h ; AL should contain hex 80 + je xmsavail + xor dx,dx ; no XMS driver available + xor ax,ax ; return a nil pointer + jmp short xmsavail_done +xmsavail: mov ax,4310h ; fetch driver address with + int 2fh ; another magic cookie + mov dx,es ; copy address to dx:ax + mov ax,bx +xmsavail_done: les bx,dword ptr [bp+6] ; get pointer to return value + mov word ptr es:[bx],ax + mov word ptr es:[bx+2],dx + pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jxms_getdriver endp + + +; +; void far jxms_calldriver (XMSDRIVER, XMScontext far *) +; +; The XMScontext structure contains values for the AX,DX,BX,SI,DS registers. +; These are loaded, the XMS call is performed, and the new values of the +; AX,DX,BX registers are written back to the context structure. +; +_jxms_calldriver proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + les bx,dword ptr [bp+10] ; get XMScontext pointer + mov ax,word ptr es:[bx] ; load registers + mov dx,word ptr es:[bx+2] + mov si,word ptr es:[bx+6] + mov ds,word ptr es:[bx+8] + mov bx,word ptr es:[bx+4] + call dword ptr [bp+6] ; call the driver + mov cx,bx ; save returned BX for a sec + les bx,dword ptr [bp+10] ; get XMScontext pointer + mov word ptr es:[bx],ax ; put back ax,dx,bx + mov word ptr es:[bx+2],dx + mov word ptr es:[bx+4],cx + pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jxms_calldriver endp + + +; +; short far jems_available (void) +; +; Have we got an EMS driver? (this comes straight from the EMS 4.0 specs) +; +_jems_available proc far + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov ax,3567h ; get interrupt vector 67h + int 21h + push cs + pop ds + mov di,000ah ; check offs 10 in returned seg + lea si,ASCII_device_name ; against literal string + mov cx,8 + cld + repe cmpsb + jne no_ems + mov ax,1 ; match, it's there + jmp short avail_done +no_ems: xor ax,ax ; it's not there +avail_done: pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + ret + +ASCII_device_name db "EMMXXXX0" + +_jems_available endp + + +; +; void far jems_calldriver (EMScontext far *) +; +; The EMScontext structure contains values for the AX,DX,BX,SI,DS registers. +; These are loaded, the EMS trap is performed, and the new values of the +; AX,DX,BX registers are written back to the context structure. +; +_jems_calldriver proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + les bx,dword ptr [bp+6] ; get EMScontext pointer + mov ax,word ptr es:[bx] ; load registers + mov dx,word ptr es:[bx+2] + mov si,word ptr es:[bx+6] + mov ds,word ptr es:[bx+8] + mov bx,word ptr es:[bx+4] + int 67h ; call the EMS driver + mov cx,bx ; save returned BX for a sec + les bx,dword ptr [bp+6] ; get EMScontext pointer + mov word ptr es:[bx],ax ; put back ax,dx,bx + mov word ptr es:[bx+2],dx + mov word ptr es:[bx+4],cx + pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jems_calldriver endp + +JMEMDOSA_TXT ends + + end diff --git a/gtkmm-osx/jpeg-6b/jmemmac.c b/gtkmm-osx/jpeg-6b/jmemmac.c new file mode 100644 index 0000000..106f9be --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jmemmac.c @@ -0,0 +1,289 @@ +/* + * jmemmac.c + * + * Copyright (C) 1992-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * jmemmac.c provides an Apple Macintosh implementation of the system- + * dependent portion of the JPEG memory manager. + * + * If you use jmemmac.c, then you must define USE_MAC_MEMMGR in the + * JPEG_INTERNALS part of jconfig.h. + * + * jmemmac.c uses the Macintosh toolbox routines NewPtr and DisposePtr + * instead of malloc and free. It accurately determines the amount of + * memory available by using CompactMem. Notice that if left to its + * own devices, this code can chew up all available space in the + * application's zone, with the exception of the rather small "slop" + * factor computed in jpeg_mem_available(). The application can ensure + * that more space is left over by reducing max_memory_to_use. + * + * Large images are swapped to disk using temporary files and System 7.0+'s + * temporary folder functionality. + * + * Note that jmemmac.c depends on two features of MacOS that were first + * introduced in System 7: FindFolder and the FSSpec-based calls. + * If your application uses jmemmac.c and is run under System 6 or earlier, + * and the jpeg library decides it needs a temporary file, it will abort, + * printing error messages about requiring System 7. (If no temporary files + * are created, it will run fine.) + * + * If you want to use jmemmac.c in an application that might be used with + * System 6 or earlier, then you should remove dependencies on FindFolder + * and the FSSpec calls. You will need to replace FindFolder with some + * other mechanism for finding a place to put temporary files, and you + * should replace the FSSpec calls with their HFS equivalents: + * + * FSpDelete -> HDelete + * FSpGetFInfo -> HGetFInfo + * FSpCreate -> HCreate + * FSpOpenDF -> HOpen *** Note: not HOpenDF *** + * FSMakeFSSpec -> (fill in spec by hand.) + * + * (Use HOpen instead of HOpenDF. HOpen is just a glue-interface to PBHOpen, + * which is on all HFS macs. HOpenDF is a System 7 addition which avoids the + * ages-old problem of names starting with a period.) + * + * Contributed by Sam Bushell (jsam@iagu.on.net) and + * Dan Gildor (gyld@in-touch.com). + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#ifndef USE_MAC_MEMMGR /* make sure user got configuration right */ + You forgot to define USE_MAC_MEMMGR in jconfig.h. /* deliberate syntax error */ +#endif + +#include /* we use the MacOS memory manager */ +#include /* we use the MacOS File stuff */ +#include /* we use the MacOS HFS stuff */ +#include /* for smSystemScript */ +#include /* we use Gestalt to test for specific functionality */ + +#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */ +#define TEMP_FILE_NAME "JPG%03d.TMP" +#endif + +static int next_file_num; /* to distinguish among several temp files */ + + +/* + * Memory allocation and freeing are controlled by the MacOS library + * routines NewPtr() and DisposePtr(), which allocate fixed-address + * storage. Unfortunately, the IJG library isn't smart enough to cope + * with relocatable storage. + */ + +GLOBAL(void *) +jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void *) NewPtr(sizeofobject); +} + +GLOBAL(void) +jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) +{ + DisposePtr((Ptr) object); +} + + +/* + * "Large" objects are treated the same as "small" ones. + * NB: we include FAR keywords in the routine declarations simply for + * consistency with the rest of the IJG code; FAR should expand to empty + * on rational architectures like the Mac. + */ + +GLOBAL(void FAR *) +jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void FAR *) NewPtr(sizeofobject); +} + +GLOBAL(void) +jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) +{ + DisposePtr((Ptr) object); +} + + +/* + * This routine computes the total memory space available for allocation. + */ + +GLOBAL(long) +jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, + long max_bytes_needed, long already_allocated) +{ + long limit = cinfo->mem->max_memory_to_use - already_allocated; + long slop, mem; + + /* Don't ask for more than what application has told us we may use */ + if (max_bytes_needed > limit && limit > 0) + max_bytes_needed = limit; + /* Find whether there's a big enough free block in the heap. + * CompactMem tries to create a contiguous block of the requested size, + * and then returns the size of the largest free block (which could be + * much more or much less than we asked for). + * We add some slop to ensure we don't use up all available memory. + */ + slop = max_bytes_needed / 16 + 32768L; + mem = CompactMem(max_bytes_needed + slop) - slop; + if (mem < 0) + mem = 0; /* sigh, couldn't even get the slop */ + /* Don't take more than the application says we can have */ + if (mem > limit && limit > 0) + mem = limit; + return mem; +} + + +/* + * Backing store (temporary file) management. + * Backing store objects are only used when the value returned by + * jpeg_mem_available is less than the total space needed. You can dispense + * with these routines if you have plenty of virtual memory; see jmemnobs.c. + */ + + +METHODDEF(void) +read_backing_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + long bytes = byte_count; + long retVal; + + if ( SetFPos ( info->temp_file, fsFromStart, file_offset ) != noErr ) + ERREXIT(cinfo, JERR_TFILE_SEEK); + + retVal = FSRead ( info->temp_file, &bytes, + (unsigned char *) buffer_address ); + if ( retVal != noErr || bytes != byte_count ) + ERREXIT(cinfo, JERR_TFILE_READ); +} + + +METHODDEF(void) +write_backing_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + long bytes = byte_count; + long retVal; + + if ( SetFPos ( info->temp_file, fsFromStart, file_offset ) != noErr ) + ERREXIT(cinfo, JERR_TFILE_SEEK); + + retVal = FSWrite ( info->temp_file, &bytes, + (unsigned char *) buffer_address ); + if ( retVal != noErr || bytes != byte_count ) + ERREXIT(cinfo, JERR_TFILE_WRITE); +} + + +METHODDEF(void) +close_backing_store (j_common_ptr cinfo, backing_store_ptr info) +{ + FSClose ( info->temp_file ); + FSpDelete ( &(info->tempSpec) ); +} + + +/* + * Initial opening of a backing-store object. + * + * This version uses FindFolder to find the Temporary Items folder, + * and puts the temporary file in there. + */ + +GLOBAL(void) +jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + short tmpRef, vRefNum; + long dirID; + FInfo finderInfo; + FSSpec theSpec; + Str255 fName; + OSErr osErr; + long gestaltResponse = 0; + + /* Check that FSSpec calls are available. */ + osErr = Gestalt( gestaltFSAttr, &gestaltResponse ); + if ( ( osErr != noErr ) + || !( gestaltResponse & (1<temp_name, TEMP_FILE_NAME, next_file_num); + strcpy ( (Ptr)fName+1, info->temp_name ); + *fName = strlen (info->temp_name); + osErr = FSMakeFSSpec ( vRefNum, dirID, fName, &theSpec ); + + if ( (osErr = FSpGetFInfo ( &theSpec, &finderInfo ) ) != noErr ) + break; + } + + osErr = FSpCreate ( &theSpec, '????', '????', smSystemScript ); + if ( osErr != noErr ) + ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); + + osErr = FSpOpenDF ( &theSpec, fsRdWrPerm, &(info->temp_file) ); + if ( osErr != noErr ) + ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); + + info->tempSpec = theSpec; + + info->read_backing_store = read_backing_store; + info->write_backing_store = write_backing_store; + info->close_backing_store = close_backing_store; + TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name); +} + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. + */ + +GLOBAL(long) +jpeg_mem_init (j_common_ptr cinfo) +{ + next_file_num = 0; + + /* max_memory_to_use will be initialized to FreeMem()'s result; + * the calling application might later reduce it, for example + * to leave room to invoke multiple JPEG objects. + * Note that FreeMem returns the total number of free bytes; + * it may not be possible to allocate a single block of this size. + */ + return FreeMem(); +} + +GLOBAL(void) +jpeg_mem_term (j_common_ptr cinfo) +{ + /* no work */ +} diff --git a/gtkmm-osx/jpeg-6b/jmemmgr.c b/gtkmm-osx/jpeg-6b/jmemmgr.c new file mode 100644 index 0000000..d801b32 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jmemmgr.c @@ -0,0 +1,1118 @@ +/* + * jmemmgr.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the JPEG system-independent memory management + * routines. This code is usable across a wide variety of machines; most + * of the system dependencies have been isolated in a separate file. + * The major functions provided here are: + * * pool-based allocation and freeing of memory; + * * policy decisions about how to divide available memory among the + * virtual arrays; + * * control logic for swapping virtual arrays between main memory and + * backing storage. + * The separate system-dependent file provides the actual backing-storage + * access code, and it contains the policy decision about how much total + * main memory to use. + * This file is system-dependent in the sense that some of its functions + * are unnecessary in some systems. For example, if there is enough virtual + * memory so that backing storage will never be used, much of the virtual + * array control logic could be removed. (Of course, if you have that much + * memory then you shouldn't care about a little bit of unused code...) + */ + +#define JPEG_INTERNALS +#define AM_MEMORY_MANAGER /* we define jvirt_Xarray_control structs */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#ifndef NO_GETENV +#ifndef HAVE_STDLIB_H /* should declare getenv() */ +extern char * getenv JPP((const char * name)); +#endif +#endif + + +/* + * Some important notes: + * The allocation routines provided here must never return NULL. + * They should exit to error_exit if unsuccessful. + * + * It's not a good idea to try to merge the sarray and barray routines, + * even though they are textually almost the same, because samples are + * usually stored as bytes while coefficients are shorts or ints. Thus, + * in machines where byte pointers have a different representation from + * word pointers, the resulting machine code could not be the same. + */ + + +/* + * Many machines require storage alignment: longs must start on 4-byte + * boundaries, doubles on 8-byte boundaries, etc. On such machines, malloc() + * always returns pointers that are multiples of the worst-case alignment + * requirement, and we had better do so too. + * There isn't any really portable way to determine the worst-case alignment + * requirement. This module assumes that the alignment requirement is + * multiples of sizeof(ALIGN_TYPE). + * By default, we define ALIGN_TYPE as double. This is necessary on some + * workstations (where doubles really do need 8-byte alignment) and will work + * fine on nearly everything. If your machine has lesser alignment needs, + * you can save a few bytes by making ALIGN_TYPE smaller. + * The only place I know of where this will NOT work is certain Macintosh + * 680x0 compilers that define double as a 10-byte IEEE extended float. + * Doing 10-byte alignment is counterproductive because longwords won't be + * aligned well. Put "#define ALIGN_TYPE long" in jconfig.h if you have + * such a compiler. + */ + +#ifndef ALIGN_TYPE /* so can override from jconfig.h */ +#define ALIGN_TYPE double +#endif + + +/* + * We allocate objects from "pools", where each pool is gotten with a single + * request to jpeg_get_small() or jpeg_get_large(). There is no per-object + * overhead within a pool, except for alignment padding. Each pool has a + * header with a link to the next pool of the same class. + * Small and large pool headers are identical except that the latter's + * link pointer must be FAR on 80x86 machines. + * Notice that the "real" header fields are union'ed with a dummy ALIGN_TYPE + * field. This forces the compiler to make SIZEOF(small_pool_hdr) a multiple + * of the alignment requirement of ALIGN_TYPE. + */ + +typedef union small_pool_struct * small_pool_ptr; + +typedef union small_pool_struct { + struct { + small_pool_ptr next; /* next in list of pools */ + size_t bytes_used; /* how many bytes already used within pool */ + size_t bytes_left; /* bytes still available in this pool */ + } hdr; + ALIGN_TYPE dummy; /* included in union to ensure alignment */ +} small_pool_hdr; + +typedef union large_pool_struct FAR * large_pool_ptr; + +typedef union large_pool_struct { + struct { + large_pool_ptr next; /* next in list of pools */ + size_t bytes_used; /* how many bytes already used within pool */ + size_t bytes_left; /* bytes still available in this pool */ + } hdr; + ALIGN_TYPE dummy; /* included in union to ensure alignment */ +} large_pool_hdr; + + +/* + * Here is the full definition of a memory manager object. + */ + +typedef struct { + struct jpeg_memory_mgr pub; /* public fields */ + + /* Each pool identifier (lifetime class) names a linked list of pools. */ + small_pool_ptr small_list[JPOOL_NUMPOOLS]; + large_pool_ptr large_list[JPOOL_NUMPOOLS]; + + /* Since we only have one lifetime class of virtual arrays, only one + * linked list is necessary (for each datatype). Note that the virtual + * array control blocks being linked together are actually stored somewhere + * in the small-pool list. + */ + jvirt_sarray_ptr virt_sarray_list; + jvirt_barray_ptr virt_barray_list; + + /* This counts total space obtained from jpeg_get_small/large */ + long total_space_allocated; + + /* alloc_sarray and alloc_barray set this value for use by virtual + * array routines. + */ + JDIMENSION last_rowsperchunk; /* from most recent alloc_sarray/barray */ +} my_memory_mgr; + +typedef my_memory_mgr * my_mem_ptr; + + +/* + * The control blocks for virtual arrays. + * Note that these blocks are allocated in the "small" pool area. + * System-dependent info for the associated backing store (if any) is hidden + * inside the backing_store_info struct. + */ + +struct jvirt_sarray_control { + JSAMPARRAY mem_buffer; /* => the in-memory buffer */ + JDIMENSION rows_in_array; /* total virtual array height */ + JDIMENSION samplesperrow; /* width of array (and of memory buffer) */ + JDIMENSION maxaccess; /* max rows accessed by access_virt_sarray */ + JDIMENSION rows_in_mem; /* height of memory buffer */ + JDIMENSION rowsperchunk; /* allocation chunk size in mem_buffer */ + JDIMENSION cur_start_row; /* first logical row # in the buffer */ + JDIMENSION first_undef_row; /* row # of first uninitialized row */ + boolean pre_zero; /* pre-zero mode requested? */ + boolean dirty; /* do current buffer contents need written? */ + boolean b_s_open; /* is backing-store data valid? */ + jvirt_sarray_ptr next; /* link to next virtual sarray control block */ + backing_store_info b_s_info; /* System-dependent control info */ +}; + +struct jvirt_barray_control { + JBLOCKARRAY mem_buffer; /* => the in-memory buffer */ + JDIMENSION rows_in_array; /* total virtual array height */ + JDIMENSION blocksperrow; /* width of array (and of memory buffer) */ + JDIMENSION maxaccess; /* max rows accessed by access_virt_barray */ + JDIMENSION rows_in_mem; /* height of memory buffer */ + JDIMENSION rowsperchunk; /* allocation chunk size in mem_buffer */ + JDIMENSION cur_start_row; /* first logical row # in the buffer */ + JDIMENSION first_undef_row; /* row # of first uninitialized row */ + boolean pre_zero; /* pre-zero mode requested? */ + boolean dirty; /* do current buffer contents need written? */ + boolean b_s_open; /* is backing-store data valid? */ + jvirt_barray_ptr next; /* link to next virtual barray control block */ + backing_store_info b_s_info; /* System-dependent control info */ +}; + + +#ifdef MEM_STATS /* optional extra stuff for statistics */ + +LOCAL(void) +print_mem_stats (j_common_ptr cinfo, int pool_id) +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + small_pool_ptr shdr_ptr; + large_pool_ptr lhdr_ptr; + + /* Since this is only a debugging stub, we can cheat a little by using + * fprintf directly rather than going through the trace message code. + * This is helpful because message parm array can't handle longs. + */ + fprintf(stderr, "Freeing pool %d, total space = %ld\n", + pool_id, mem->total_space_allocated); + + for (lhdr_ptr = mem->large_list[pool_id]; lhdr_ptr != NULL; + lhdr_ptr = lhdr_ptr->hdr.next) { + fprintf(stderr, " Large chunk used %ld\n", + (long) lhdr_ptr->hdr.bytes_used); + } + + for (shdr_ptr = mem->small_list[pool_id]; shdr_ptr != NULL; + shdr_ptr = shdr_ptr->hdr.next) { + fprintf(stderr, " Small chunk used %ld free %ld\n", + (long) shdr_ptr->hdr.bytes_used, + (long) shdr_ptr->hdr.bytes_left); + } +} + +#endif /* MEM_STATS */ + + +LOCAL(void) +out_of_memory (j_common_ptr cinfo, int which) +/* Report an out-of-memory error and stop execution */ +/* If we compiled MEM_STATS support, report alloc requests before dying */ +{ +#ifdef MEM_STATS + cinfo->err->trace_level = 2; /* force self_destruct to report stats */ +#endif + ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, which); +} + + +/* + * Allocation of "small" objects. + * + * For these, we use pooled storage. When a new pool must be created, + * we try to get enough space for the current request plus a "slop" factor, + * where the slop will be the amount of leftover space in the new pool. + * The speed vs. space tradeoff is largely determined by the slop values. + * A different slop value is provided for each pool class (lifetime), + * and we also distinguish the first pool of a class from later ones. + * NOTE: the values given work fairly well on both 16- and 32-bit-int + * machines, but may be too small if longs are 64 bits or more. + */ + +static const size_t first_pool_slop[JPOOL_NUMPOOLS] = +{ + 1600, /* first PERMANENT pool */ + 16000 /* first IMAGE pool */ +}; + +static const size_t extra_pool_slop[JPOOL_NUMPOOLS] = +{ + 0, /* additional PERMANENT pools */ + 5000 /* additional IMAGE pools */ +}; + +#define MIN_SLOP 50 /* greater than 0 to avoid futile looping */ + + +METHODDEF(void *) +alloc_small (j_common_ptr cinfo, int pool_id, size_t sizeofobject) +/* Allocate a "small" object */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + small_pool_ptr hdr_ptr, prev_hdr_ptr; + char * data_ptr; + size_t odd_bytes, min_request, slop; + + /* Check for unsatisfiable request (do now to ensure no overflow below) */ + if (sizeofobject > (size_t) (MAX_ALLOC_CHUNK-SIZEOF(small_pool_hdr))) + out_of_memory(cinfo, 1); /* request exceeds malloc's ability */ + + /* Round up the requested size to a multiple of SIZEOF(ALIGN_TYPE) */ + odd_bytes = sizeofobject % SIZEOF(ALIGN_TYPE); + if (odd_bytes > 0) + sizeofobject += SIZEOF(ALIGN_TYPE) - odd_bytes; + + /* See if space is available in any existing pool */ + if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + prev_hdr_ptr = NULL; + hdr_ptr = mem->small_list[pool_id]; + while (hdr_ptr != NULL) { + if (hdr_ptr->hdr.bytes_left >= sizeofobject) + break; /* found pool with enough space */ + prev_hdr_ptr = hdr_ptr; + hdr_ptr = hdr_ptr->hdr.next; + } + + /* Time to make a new pool? */ + if (hdr_ptr == NULL) { + /* min_request is what we need now, slop is what will be leftover */ + min_request = sizeofobject + SIZEOF(small_pool_hdr); + if (prev_hdr_ptr == NULL) /* first pool in class? */ + slop = first_pool_slop[pool_id]; + else + slop = extra_pool_slop[pool_id]; + /* Don't ask for more than MAX_ALLOC_CHUNK */ + if (slop > (size_t) (MAX_ALLOC_CHUNK-min_request)) + slop = (size_t) (MAX_ALLOC_CHUNK-min_request); + /* Try to get space, if fail reduce slop and try again */ + for (;;) { + hdr_ptr = (small_pool_ptr) jpeg_get_small(cinfo, min_request + slop); + if (hdr_ptr != NULL) + break; + slop /= 2; + if (slop < MIN_SLOP) /* give up when it gets real small */ + out_of_memory(cinfo, 2); /* jpeg_get_small failed */ + } + mem->total_space_allocated += min_request + slop; + /* Success, initialize the new pool header and add to end of list */ + hdr_ptr->hdr.next = NULL; + hdr_ptr->hdr.bytes_used = 0; + hdr_ptr->hdr.bytes_left = sizeofobject + slop; + if (prev_hdr_ptr == NULL) /* first pool in class? */ + mem->small_list[pool_id] = hdr_ptr; + else + prev_hdr_ptr->hdr.next = hdr_ptr; + } + + /* OK, allocate the object from the current pool */ + data_ptr = (char *) (hdr_ptr + 1); /* point to first data byte in pool */ + data_ptr += hdr_ptr->hdr.bytes_used; /* point to place for object */ + hdr_ptr->hdr.bytes_used += sizeofobject; + hdr_ptr->hdr.bytes_left -= sizeofobject; + + return (void *) data_ptr; +} + + +/* + * Allocation of "large" objects. + * + * The external semantics of these are the same as "small" objects, + * except that FAR pointers are used on 80x86. However the pool + * management heuristics are quite different. We assume that each + * request is large enough that it may as well be passed directly to + * jpeg_get_large; the pool management just links everything together + * so that we can free it all on demand. + * Note: the major use of "large" objects is in JSAMPARRAY and JBLOCKARRAY + * structures. The routines that create these structures (see below) + * deliberately bunch rows together to ensure a large request size. + */ + +METHODDEF(void FAR *) +alloc_large (j_common_ptr cinfo, int pool_id, size_t sizeofobject) +/* Allocate a "large" object */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + large_pool_ptr hdr_ptr; + size_t odd_bytes; + + /* Check for unsatisfiable request (do now to ensure no overflow below) */ + if (sizeofobject > (size_t) (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr))) + out_of_memory(cinfo, 3); /* request exceeds malloc's ability */ + + /* Round up the requested size to a multiple of SIZEOF(ALIGN_TYPE) */ + odd_bytes = sizeofobject % SIZEOF(ALIGN_TYPE); + if (odd_bytes > 0) + sizeofobject += SIZEOF(ALIGN_TYPE) - odd_bytes; + + /* Always make a new pool */ + if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + + hdr_ptr = (large_pool_ptr) jpeg_get_large(cinfo, sizeofobject + + SIZEOF(large_pool_hdr)); + if (hdr_ptr == NULL) + out_of_memory(cinfo, 4); /* jpeg_get_large failed */ + mem->total_space_allocated += sizeofobject + SIZEOF(large_pool_hdr); + + /* Success, initialize the new pool header and add to list */ + hdr_ptr->hdr.next = mem->large_list[pool_id]; + /* We maintain space counts in each pool header for statistical purposes, + * even though they are not needed for allocation. + */ + hdr_ptr->hdr.bytes_used = sizeofobject; + hdr_ptr->hdr.bytes_left = 0; + mem->large_list[pool_id] = hdr_ptr; + + return (void FAR *) (hdr_ptr + 1); /* point to first data byte in pool */ +} + + +/* + * Creation of 2-D sample arrays. + * The pointers are in near heap, the samples themselves in FAR heap. + * + * To minimize allocation overhead and to allow I/O of large contiguous + * blocks, we allocate the sample rows in groups of as many rows as possible + * without exceeding MAX_ALLOC_CHUNK total bytes per allocation request. + * NB: the virtual array control routines, later in this file, know about + * this chunking of rows. The rowsperchunk value is left in the mem manager + * object so that it can be saved away if this sarray is the workspace for + * a virtual array. + */ + +METHODDEF(JSAMPARRAY) +alloc_sarray (j_common_ptr cinfo, int pool_id, + JDIMENSION samplesperrow, JDIMENSION numrows) +/* Allocate a 2-D sample array */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + JSAMPARRAY result; + JSAMPROW workspace; + JDIMENSION rowsperchunk, currow, i; + long ltemp; + + /* Calculate max # of rows allowed in one allocation chunk */ + ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) / + ((long) samplesperrow * SIZEOF(JSAMPLE)); + if (ltemp <= 0) + ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); + if (ltemp < (long) numrows) + rowsperchunk = (JDIMENSION) ltemp; + else + rowsperchunk = numrows; + mem->last_rowsperchunk = rowsperchunk; + + /* Get space for row pointers (small object) */ + result = (JSAMPARRAY) alloc_small(cinfo, pool_id, + (size_t) (numrows * SIZEOF(JSAMPROW))); + + /* Get the rows themselves (large objects) */ + currow = 0; + while (currow < numrows) { + rowsperchunk = MIN(rowsperchunk, numrows - currow); + workspace = (JSAMPROW) alloc_large(cinfo, pool_id, + (size_t) ((size_t) rowsperchunk * (size_t) samplesperrow + * SIZEOF(JSAMPLE))); + for (i = rowsperchunk; i > 0; i--) { + result[currow++] = workspace; + workspace += samplesperrow; + } + } + + return result; +} + + +/* + * Creation of 2-D coefficient-block arrays. + * This is essentially the same as the code for sample arrays, above. + */ + +METHODDEF(JBLOCKARRAY) +alloc_barray (j_common_ptr cinfo, int pool_id, + JDIMENSION blocksperrow, JDIMENSION numrows) +/* Allocate a 2-D coefficient-block array */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + JBLOCKARRAY result; + JBLOCKROW workspace; + JDIMENSION rowsperchunk, currow, i; + long ltemp; + + /* Calculate max # of rows allowed in one allocation chunk */ + ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) / + ((long) blocksperrow * SIZEOF(JBLOCK)); + if (ltemp <= 0) + ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); + if (ltemp < (long) numrows) + rowsperchunk = (JDIMENSION) ltemp; + else + rowsperchunk = numrows; + mem->last_rowsperchunk = rowsperchunk; + + /* Get space for row pointers (small object) */ + result = (JBLOCKARRAY) alloc_small(cinfo, pool_id, + (size_t) (numrows * SIZEOF(JBLOCKROW))); + + /* Get the rows themselves (large objects) */ + currow = 0; + while (currow < numrows) { + rowsperchunk = MIN(rowsperchunk, numrows - currow); + workspace = (JBLOCKROW) alloc_large(cinfo, pool_id, + (size_t) ((size_t) rowsperchunk * (size_t) blocksperrow + * SIZEOF(JBLOCK))); + for (i = rowsperchunk; i > 0; i--) { + result[currow++] = workspace; + workspace += blocksperrow; + } + } + + return result; +} + + +/* + * About virtual array management: + * + * The above "normal" array routines are only used to allocate strip buffers + * (as wide as the image, but just a few rows high). Full-image-sized buffers + * are handled as "virtual" arrays. The array is still accessed a strip at a + * time, but the memory manager must save the whole array for repeated + * accesses. The intended implementation is that there is a strip buffer in + * memory (as high as is possible given the desired memory limit), plus a + * backing file that holds the rest of the array. + * + * The request_virt_array routines are told the total size of the image and + * the maximum number of rows that will be accessed at once. The in-memory + * buffer must be at least as large as the maxaccess value. + * + * The request routines create control blocks but not the in-memory buffers. + * That is postponed until realize_virt_arrays is called. At that time the + * total amount of space needed is known (approximately, anyway), so free + * memory can be divided up fairly. + * + * The access_virt_array routines are responsible for making a specific strip + * area accessible (after reading or writing the backing file, if necessary). + * Note that the access routines are told whether the caller intends to modify + * the accessed strip; during a read-only pass this saves having to rewrite + * data to disk. The access routines are also responsible for pre-zeroing + * any newly accessed rows, if pre-zeroing was requested. + * + * In current usage, the access requests are usually for nonoverlapping + * strips; that is, successive access start_row numbers differ by exactly + * num_rows = maxaccess. This means we can get good performance with simple + * buffer dump/reload logic, by making the in-memory buffer be a multiple + * of the access height; then there will never be accesses across bufferload + * boundaries. The code will still work with overlapping access requests, + * but it doesn't handle bufferload overlaps very efficiently. + */ + + +METHODDEF(jvirt_sarray_ptr) +request_virt_sarray (j_common_ptr cinfo, int pool_id, boolean pre_zero, + JDIMENSION samplesperrow, JDIMENSION numrows, + JDIMENSION maxaccess) +/* Request a virtual 2-D sample array */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + jvirt_sarray_ptr result; + + /* Only IMAGE-lifetime virtual arrays are currently supported */ + if (pool_id != JPOOL_IMAGE) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + + /* get control block */ + result = (jvirt_sarray_ptr) alloc_small(cinfo, pool_id, + SIZEOF(struct jvirt_sarray_control)); + + result->mem_buffer = NULL; /* marks array not yet realized */ + result->rows_in_array = numrows; + result->samplesperrow = samplesperrow; + result->maxaccess = maxaccess; + result->pre_zero = pre_zero; + result->b_s_open = FALSE; /* no associated backing-store object */ + result->next = mem->virt_sarray_list; /* add to list of virtual arrays */ + mem->virt_sarray_list = result; + + return result; +} + + +METHODDEF(jvirt_barray_ptr) +request_virt_barray (j_common_ptr cinfo, int pool_id, boolean pre_zero, + JDIMENSION blocksperrow, JDIMENSION numrows, + JDIMENSION maxaccess) +/* Request a virtual 2-D coefficient-block array */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + jvirt_barray_ptr result; + + /* Only IMAGE-lifetime virtual arrays are currently supported */ + if (pool_id != JPOOL_IMAGE) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + + /* get control block */ + result = (jvirt_barray_ptr) alloc_small(cinfo, pool_id, + SIZEOF(struct jvirt_barray_control)); + + result->mem_buffer = NULL; /* marks array not yet realized */ + result->rows_in_array = numrows; + result->blocksperrow = blocksperrow; + result->maxaccess = maxaccess; + result->pre_zero = pre_zero; + result->b_s_open = FALSE; /* no associated backing-store object */ + result->next = mem->virt_barray_list; /* add to list of virtual arrays */ + mem->virt_barray_list = result; + + return result; +} + + +METHODDEF(void) +realize_virt_arrays (j_common_ptr cinfo) +/* Allocate the in-memory buffers for any unrealized virtual arrays */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + long space_per_minheight, maximum_space, avail_mem; + long minheights, max_minheights; + jvirt_sarray_ptr sptr; + jvirt_barray_ptr bptr; + + /* Compute the minimum space needed (maxaccess rows in each buffer) + * and the maximum space needed (full image height in each buffer). + * These may be of use to the system-dependent jpeg_mem_available routine. + */ + space_per_minheight = 0; + maximum_space = 0; + for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { + if (sptr->mem_buffer == NULL) { /* if not realized yet */ + space_per_minheight += (long) sptr->maxaccess * + (long) sptr->samplesperrow * SIZEOF(JSAMPLE); + maximum_space += (long) sptr->rows_in_array * + (long) sptr->samplesperrow * SIZEOF(JSAMPLE); + } + } + for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { + if (bptr->mem_buffer == NULL) { /* if not realized yet */ + space_per_minheight += (long) bptr->maxaccess * + (long) bptr->blocksperrow * SIZEOF(JBLOCK); + maximum_space += (long) bptr->rows_in_array * + (long) bptr->blocksperrow * SIZEOF(JBLOCK); + } + } + + if (space_per_minheight <= 0) + return; /* no unrealized arrays, no work */ + + /* Determine amount of memory to actually use; this is system-dependent. */ + avail_mem = jpeg_mem_available(cinfo, space_per_minheight, maximum_space, + mem->total_space_allocated); + + /* If the maximum space needed is available, make all the buffers full + * height; otherwise parcel it out with the same number of minheights + * in each buffer. + */ + if (avail_mem >= maximum_space) + max_minheights = 1000000000L; + else { + max_minheights = avail_mem / space_per_minheight; + /* If there doesn't seem to be enough space, try to get the minimum + * anyway. This allows a "stub" implementation of jpeg_mem_available(). + */ + if (max_minheights <= 0) + max_minheights = 1; + } + + /* Allocate the in-memory buffers and initialize backing store as needed. */ + + for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { + if (sptr->mem_buffer == NULL) { /* if not realized yet */ + minheights = ((long) sptr->rows_in_array - 1L) / sptr->maxaccess + 1L; + if (minheights <= max_minheights) { + /* This buffer fits in memory */ + sptr->rows_in_mem = sptr->rows_in_array; + } else { + /* It doesn't fit in memory, create backing store. */ + sptr->rows_in_mem = (JDIMENSION) (max_minheights * sptr->maxaccess); + jpeg_open_backing_store(cinfo, & sptr->b_s_info, + (long) sptr->rows_in_array * + (long) sptr->samplesperrow * + (long) SIZEOF(JSAMPLE)); + sptr->b_s_open = TRUE; + } + sptr->mem_buffer = alloc_sarray(cinfo, JPOOL_IMAGE, + sptr->samplesperrow, sptr->rows_in_mem); + sptr->rowsperchunk = mem->last_rowsperchunk; + sptr->cur_start_row = 0; + sptr->first_undef_row = 0; + sptr->dirty = FALSE; + } + } + + for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { + if (bptr->mem_buffer == NULL) { /* if not realized yet */ + minheights = ((long) bptr->rows_in_array - 1L) / bptr->maxaccess + 1L; + if (minheights <= max_minheights) { + /* This buffer fits in memory */ + bptr->rows_in_mem = bptr->rows_in_array; + } else { + /* It doesn't fit in memory, create backing store. */ + bptr->rows_in_mem = (JDIMENSION) (max_minheights * bptr->maxaccess); + jpeg_open_backing_store(cinfo, & bptr->b_s_info, + (long) bptr->rows_in_array * + (long) bptr->blocksperrow * + (long) SIZEOF(JBLOCK)); + bptr->b_s_open = TRUE; + } + bptr->mem_buffer = alloc_barray(cinfo, JPOOL_IMAGE, + bptr->blocksperrow, bptr->rows_in_mem); + bptr->rowsperchunk = mem->last_rowsperchunk; + bptr->cur_start_row = 0; + bptr->first_undef_row = 0; + bptr->dirty = FALSE; + } + } +} + + +LOCAL(void) +do_sarray_io (j_common_ptr cinfo, jvirt_sarray_ptr ptr, boolean writing) +/* Do backing store read or write of a virtual sample array */ +{ + long bytesperrow, file_offset, byte_count, rows, thisrow, i; + + bytesperrow = (long) ptr->samplesperrow * SIZEOF(JSAMPLE); + file_offset = ptr->cur_start_row * bytesperrow; + /* Loop to read or write each allocation chunk in mem_buffer */ + for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) { + /* One chunk, but check for short chunk at end of buffer */ + rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i); + /* Transfer no more than is currently defined */ + thisrow = (long) ptr->cur_start_row + i; + rows = MIN(rows, (long) ptr->first_undef_row - thisrow); + /* Transfer no more than fits in file */ + rows = MIN(rows, (long) ptr->rows_in_array - thisrow); + if (rows <= 0) /* this chunk might be past end of file! */ + break; + byte_count = rows * bytesperrow; + if (writing) + (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info, + (void FAR *) ptr->mem_buffer[i], + file_offset, byte_count); + else + (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info, + (void FAR *) ptr->mem_buffer[i], + file_offset, byte_count); + file_offset += byte_count; + } +} + + +LOCAL(void) +do_barray_io (j_common_ptr cinfo, jvirt_barray_ptr ptr, boolean writing) +/* Do backing store read or write of a virtual coefficient-block array */ +{ + long bytesperrow, file_offset, byte_count, rows, thisrow, i; + + bytesperrow = (long) ptr->blocksperrow * SIZEOF(JBLOCK); + file_offset = ptr->cur_start_row * bytesperrow; + /* Loop to read or write each allocation chunk in mem_buffer */ + for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) { + /* One chunk, but check for short chunk at end of buffer */ + rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i); + /* Transfer no more than is currently defined */ + thisrow = (long) ptr->cur_start_row + i; + rows = MIN(rows, (long) ptr->first_undef_row - thisrow); + /* Transfer no more than fits in file */ + rows = MIN(rows, (long) ptr->rows_in_array - thisrow); + if (rows <= 0) /* this chunk might be past end of file! */ + break; + byte_count = rows * bytesperrow; + if (writing) + (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info, + (void FAR *) ptr->mem_buffer[i], + file_offset, byte_count); + else + (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info, + (void FAR *) ptr->mem_buffer[i], + file_offset, byte_count); + file_offset += byte_count; + } +} + + +METHODDEF(JSAMPARRAY) +access_virt_sarray (j_common_ptr cinfo, jvirt_sarray_ptr ptr, + JDIMENSION start_row, JDIMENSION num_rows, + boolean writable) +/* Access the part of a virtual sample array starting at start_row */ +/* and extending for num_rows rows. writable is true if */ +/* caller intends to modify the accessed area. */ +{ + JDIMENSION end_row = start_row + num_rows; + JDIMENSION undef_row; + + /* debugging check */ + if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess || + ptr->mem_buffer == NULL) + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + + /* Make the desired part of the virtual array accessible */ + if (start_row < ptr->cur_start_row || + end_row > ptr->cur_start_row+ptr->rows_in_mem) { + if (! ptr->b_s_open) + ERREXIT(cinfo, JERR_VIRTUAL_BUG); + /* Flush old buffer contents if necessary */ + if (ptr->dirty) { + do_sarray_io(cinfo, ptr, TRUE); + ptr->dirty = FALSE; + } + /* Decide what part of virtual array to access. + * Algorithm: if target address > current window, assume forward scan, + * load starting at target address. If target address < current window, + * assume backward scan, load so that target area is top of window. + * Note that when switching from forward write to forward read, will have + * start_row = 0, so the limiting case applies and we load from 0 anyway. + */ + if (start_row > ptr->cur_start_row) { + ptr->cur_start_row = start_row; + } else { + /* use long arithmetic here to avoid overflow & unsigned problems */ + long ltemp; + + ltemp = (long) end_row - (long) ptr->rows_in_mem; + if (ltemp < 0) + ltemp = 0; /* don't fall off front end of file */ + ptr->cur_start_row = (JDIMENSION) ltemp; + } + /* Read in the selected part of the array. + * During the initial write pass, we will do no actual read + * because the selected part is all undefined. + */ + do_sarray_io(cinfo, ptr, FALSE); + } + /* Ensure the accessed part of the array is defined; prezero if needed. + * To improve locality of access, we only prezero the part of the array + * that the caller is about to access, not the entire in-memory array. + */ + if (ptr->first_undef_row < end_row) { + if (ptr->first_undef_row < start_row) { + if (writable) /* writer skipped over a section of array */ + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + undef_row = start_row; /* but reader is allowed to read ahead */ + } else { + undef_row = ptr->first_undef_row; + } + if (writable) + ptr->first_undef_row = end_row; + if (ptr->pre_zero) { + size_t bytesperrow = (size_t) ptr->samplesperrow * SIZEOF(JSAMPLE); + undef_row -= ptr->cur_start_row; /* make indexes relative to buffer */ + end_row -= ptr->cur_start_row; + while (undef_row < end_row) { + jzero_far((void FAR *) ptr->mem_buffer[undef_row], bytesperrow); + undef_row++; + } + } else { + if (! writable) /* reader looking at undefined data */ + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + } + } + /* Flag the buffer dirty if caller will write in it */ + if (writable) + ptr->dirty = TRUE; + /* Return address of proper part of the buffer */ + return ptr->mem_buffer + (start_row - ptr->cur_start_row); +} + + +METHODDEF(JBLOCKARRAY) +access_virt_barray (j_common_ptr cinfo, jvirt_barray_ptr ptr, + JDIMENSION start_row, JDIMENSION num_rows, + boolean writable) +/* Access the part of a virtual block array starting at start_row */ +/* and extending for num_rows rows. writable is true if */ +/* caller intends to modify the accessed area. */ +{ + JDIMENSION end_row = start_row + num_rows; + JDIMENSION undef_row; + + /* debugging check */ + if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess || + ptr->mem_buffer == NULL) + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + + /* Make the desired part of the virtual array accessible */ + if (start_row < ptr->cur_start_row || + end_row > ptr->cur_start_row+ptr->rows_in_mem) { + if (! ptr->b_s_open) + ERREXIT(cinfo, JERR_VIRTUAL_BUG); + /* Flush old buffer contents if necessary */ + if (ptr->dirty) { + do_barray_io(cinfo, ptr, TRUE); + ptr->dirty = FALSE; + } + /* Decide what part of virtual array to access. + * Algorithm: if target address > current window, assume forward scan, + * load starting at target address. If target address < current window, + * assume backward scan, load so that target area is top of window. + * Note that when switching from forward write to forward read, will have + * start_row = 0, so the limiting case applies and we load from 0 anyway. + */ + if (start_row > ptr->cur_start_row) { + ptr->cur_start_row = start_row; + } else { + /* use long arithmetic here to avoid overflow & unsigned problems */ + long ltemp; + + ltemp = (long) end_row - (long) ptr->rows_in_mem; + if (ltemp < 0) + ltemp = 0; /* don't fall off front end of file */ + ptr->cur_start_row = (JDIMENSION) ltemp; + } + /* Read in the selected part of the array. + * During the initial write pass, we will do no actual read + * because the selected part is all undefined. + */ + do_barray_io(cinfo, ptr, FALSE); + } + /* Ensure the accessed part of the array is defined; prezero if needed. + * To improve locality of access, we only prezero the part of the array + * that the caller is about to access, not the entire in-memory array. + */ + if (ptr->first_undef_row < end_row) { + if (ptr->first_undef_row < start_row) { + if (writable) /* writer skipped over a section of array */ + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + undef_row = start_row; /* but reader is allowed to read ahead */ + } else { + undef_row = ptr->first_undef_row; + } + if (writable) + ptr->first_undef_row = end_row; + if (ptr->pre_zero) { + size_t bytesperrow = (size_t) ptr->blocksperrow * SIZEOF(JBLOCK); + undef_row -= ptr->cur_start_row; /* make indexes relative to buffer */ + end_row -= ptr->cur_start_row; + while (undef_row < end_row) { + jzero_far((void FAR *) ptr->mem_buffer[undef_row], bytesperrow); + undef_row++; + } + } else { + if (! writable) /* reader looking at undefined data */ + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + } + } + /* Flag the buffer dirty if caller will write in it */ + if (writable) + ptr->dirty = TRUE; + /* Return address of proper part of the buffer */ + return ptr->mem_buffer + (start_row - ptr->cur_start_row); +} + + +/* + * Release all objects belonging to a specified pool. + */ + +METHODDEF(void) +free_pool (j_common_ptr cinfo, int pool_id) +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + small_pool_ptr shdr_ptr; + large_pool_ptr lhdr_ptr; + size_t space_freed; + + if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + +#ifdef MEM_STATS + if (cinfo->err->trace_level > 1) + print_mem_stats(cinfo, pool_id); /* print pool's memory usage statistics */ +#endif + + /* If freeing IMAGE pool, close any virtual arrays first */ + if (pool_id == JPOOL_IMAGE) { + jvirt_sarray_ptr sptr; + jvirt_barray_ptr bptr; + + for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { + if (sptr->b_s_open) { /* there may be no backing store */ + sptr->b_s_open = FALSE; /* prevent recursive close if error */ + (*sptr->b_s_info.close_backing_store) (cinfo, & sptr->b_s_info); + } + } + mem->virt_sarray_list = NULL; + for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { + if (bptr->b_s_open) { /* there may be no backing store */ + bptr->b_s_open = FALSE; /* prevent recursive close if error */ + (*bptr->b_s_info.close_backing_store) (cinfo, & bptr->b_s_info); + } + } + mem->virt_barray_list = NULL; + } + + /* Release large objects */ + lhdr_ptr = mem->large_list[pool_id]; + mem->large_list[pool_id] = NULL; + + while (lhdr_ptr != NULL) { + large_pool_ptr next_lhdr_ptr = lhdr_ptr->hdr.next; + space_freed = lhdr_ptr->hdr.bytes_used + + lhdr_ptr->hdr.bytes_left + + SIZEOF(large_pool_hdr); + jpeg_free_large(cinfo, (void FAR *) lhdr_ptr, space_freed); + mem->total_space_allocated -= space_freed; + lhdr_ptr = next_lhdr_ptr; + } + + /* Release small objects */ + shdr_ptr = mem->small_list[pool_id]; + mem->small_list[pool_id] = NULL; + + while (shdr_ptr != NULL) { + small_pool_ptr next_shdr_ptr = shdr_ptr->hdr.next; + space_freed = shdr_ptr->hdr.bytes_used + + shdr_ptr->hdr.bytes_left + + SIZEOF(small_pool_hdr); + jpeg_free_small(cinfo, (void *) shdr_ptr, space_freed); + mem->total_space_allocated -= space_freed; + shdr_ptr = next_shdr_ptr; + } +} + + +/* + * Close up shop entirely. + * Note that this cannot be called unless cinfo->mem is non-NULL. + */ + +METHODDEF(void) +self_destruct (j_common_ptr cinfo) +{ + int pool; + + /* Close all backing store, release all memory. + * Releasing pools in reverse order might help avoid fragmentation + * with some (brain-damaged) malloc libraries. + */ + for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) { + free_pool(cinfo, pool); + } + + /* Release the memory manager control block too. */ + jpeg_free_small(cinfo, (void *) cinfo->mem, SIZEOF(my_memory_mgr)); + cinfo->mem = NULL; /* ensures I will be called only once */ + + jpeg_mem_term(cinfo); /* system-dependent cleanup */ +} + + +/* + * Memory manager initialization. + * When this is called, only the error manager pointer is valid in cinfo! + */ + +GLOBAL(void) +jinit_memory_mgr (j_common_ptr cinfo) +{ + my_mem_ptr mem; + long max_to_use; + int pool; + size_t test_mac; + + cinfo->mem = NULL; /* for safety if init fails */ + + /* Check for configuration errors. + * SIZEOF(ALIGN_TYPE) should be a power of 2; otherwise, it probably + * doesn't reflect any real hardware alignment requirement. + * The test is a little tricky: for X>0, X and X-1 have no one-bits + * in common if and only if X is a power of 2, ie has only one one-bit. + * Some compilers may give an "unreachable code" warning here; ignore it. + */ + if ((SIZEOF(ALIGN_TYPE) & (SIZEOF(ALIGN_TYPE)-1)) != 0) + ERREXIT(cinfo, JERR_BAD_ALIGN_TYPE); + /* MAX_ALLOC_CHUNK must be representable as type size_t, and must be + * a multiple of SIZEOF(ALIGN_TYPE). + * Again, an "unreachable code" warning may be ignored here. + * But a "constant too large" warning means you need to fix MAX_ALLOC_CHUNK. + */ + test_mac = (size_t) MAX_ALLOC_CHUNK; + if ((long) test_mac != MAX_ALLOC_CHUNK || + (MAX_ALLOC_CHUNK % SIZEOF(ALIGN_TYPE)) != 0) + ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK); + + max_to_use = jpeg_mem_init(cinfo); /* system-dependent initialization */ + + /* Attempt to allocate memory manager's control block */ + mem = (my_mem_ptr) jpeg_get_small(cinfo, SIZEOF(my_memory_mgr)); + + if (mem == NULL) { + jpeg_mem_term(cinfo); /* system-dependent cleanup */ + ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 0); + } + + /* OK, fill in the method pointers */ + mem->pub.alloc_small = alloc_small; + mem->pub.alloc_large = alloc_large; + mem->pub.alloc_sarray = alloc_sarray; + mem->pub.alloc_barray = alloc_barray; + mem->pub.request_virt_sarray = request_virt_sarray; + mem->pub.request_virt_barray = request_virt_barray; + mem->pub.realize_virt_arrays = realize_virt_arrays; + mem->pub.access_virt_sarray = access_virt_sarray; + mem->pub.access_virt_barray = access_virt_barray; + mem->pub.free_pool = free_pool; + mem->pub.self_destruct = self_destruct; + + /* Make MAX_ALLOC_CHUNK accessible to other modules */ + mem->pub.max_alloc_chunk = MAX_ALLOC_CHUNK; + + /* Initialize working state */ + mem->pub.max_memory_to_use = max_to_use; + + for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) { + mem->small_list[pool] = NULL; + mem->large_list[pool] = NULL; + } + mem->virt_sarray_list = NULL; + mem->virt_barray_list = NULL; + + mem->total_space_allocated = SIZEOF(my_memory_mgr); + + /* Declare ourselves open for business */ + cinfo->mem = & mem->pub; + + /* Check for an environment variable JPEGMEM; if found, override the + * default max_memory setting from jpeg_mem_init. Note that the + * surrounding application may again override this value. + * If your system doesn't support getenv(), define NO_GETENV to disable + * this feature. + */ +#ifndef NO_GETENV + { char * memenv; + + if ((memenv = getenv("JPEGMEM")) != NULL) { + char ch = 'x'; + + if (sscanf(memenv, "%ld%c", &max_to_use, &ch) > 0) { + if (ch == 'm' || ch == 'M') + max_to_use *= 1000L; + mem->pub.max_memory_to_use = max_to_use * 1000L; + } + } + } +#endif + +} diff --git a/gtkmm-osx/jpeg-6b/jmemname.c b/gtkmm-osx/jpeg-6b/jmemname.c new file mode 100644 index 0000000..ed96dee --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jmemname.c @@ -0,0 +1,276 @@ +/* + * jmemname.c + * + * Copyright (C) 1992-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file provides a generic implementation of the system-dependent + * portion of the JPEG memory manager. This implementation assumes that + * you must explicitly construct a name for each temp file. + * Also, the problem of determining the amount of memory available + * is shoved onto the user. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ +extern void * malloc JPP((size_t size)); +extern void free JPP((void *ptr)); +#endif + +#ifndef SEEK_SET /* pre-ANSI systems may not define this; */ +#define SEEK_SET 0 /* if not, assume 0 is correct */ +#endif + +#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ +#define READ_BINARY "r" +#define RW_BINARY "w+" +#else +#ifdef VMS /* VMS is very nonstandard */ +#define READ_BINARY "rb", "ctx=stm" +#define RW_BINARY "w+b", "ctx=stm" +#else /* standard ANSI-compliant case */ +#define READ_BINARY "rb" +#define RW_BINARY "w+b" +#endif +#endif + + +/* + * Selection of a file name for a temporary file. + * This is system-dependent! + * + * The code as given is suitable for most Unix systems, and it is easily + * modified for most non-Unix systems. Some notes: + * 1. The temp file is created in the directory named by TEMP_DIRECTORY. + * The default value is /usr/tmp, which is the conventional place for + * creating large temp files on Unix. On other systems you'll probably + * want to change the file location. You can do this by editing the + * #define, or (preferred) by defining TEMP_DIRECTORY in jconfig.h. + * + * 2. If you need to change the file name as well as its location, + * you can override the TEMP_FILE_NAME macro. (Note that this is + * actually a printf format string; it must contain %s and %d.) + * Few people should need to do this. + * + * 3. mktemp() is used to ensure that multiple processes running + * simultaneously won't select the same file names. If your system + * doesn't have mktemp(), define NO_MKTEMP to do it the hard way. + * (If you don't have , also define NO_ERRNO_H.) + * + * 4. You probably want to define NEED_SIGNAL_CATCHER so that cjpeg.c/djpeg.c + * will cause the temp files to be removed if you stop the program early. + */ + +#ifndef TEMP_DIRECTORY /* can override from jconfig.h or Makefile */ +#define TEMP_DIRECTORY "/usr/tmp/" /* recommended setting for Unix */ +#endif + +static int next_file_num; /* to distinguish among several temp files */ + +#ifdef NO_MKTEMP + +#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */ +#define TEMP_FILE_NAME "%sJPG%03d.TMP" +#endif + +#ifndef NO_ERRNO_H +#include /* to define ENOENT */ +#endif + +/* ANSI C specifies that errno is a macro, but on older systems it's more + * likely to be a plain int variable. And not all versions of errno.h + * bother to declare it, so we have to in order to be most portable. Thus: + */ +#ifndef errno +extern int errno; +#endif + + +LOCAL(void) +select_file_name (char * fname) +{ + FILE * tfile; + + /* Keep generating file names till we find one that's not in use */ + for (;;) { + next_file_num++; /* advance counter */ + sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num); + if ((tfile = fopen(fname, READ_BINARY)) == NULL) { + /* fopen could have failed for a reason other than the file not + * being there; for example, file there but unreadable. + * If isn't available, then we cannot test the cause. + */ +#ifdef ENOENT + if (errno != ENOENT) + continue; +#endif + break; + } + fclose(tfile); /* oops, it's there; close tfile & try again */ + } +} + +#else /* ! NO_MKTEMP */ + +/* Note that mktemp() requires the initial filename to end in six X's */ +#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */ +#define TEMP_FILE_NAME "%sJPG%dXXXXXX" +#endif + +LOCAL(void) +select_file_name (char * fname) +{ + next_file_num++; /* advance counter */ + sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num); + mktemp(fname); /* make sure file name is unique */ + /* mktemp replaces the trailing XXXXXX with a unique string of characters */ +} + +#endif /* NO_MKTEMP */ + + +/* + * Memory allocation and freeing are controlled by the regular library + * routines malloc() and free(). + */ + +GLOBAL(void *) +jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * "Large" objects are treated the same as "small" ones. + * NB: although we include FAR keywords in the routine declarations, + * this file won't actually work in 80x86 small/medium model; at least, + * you probably won't be able to process useful-size images in only 64KB. + */ + +GLOBAL(void FAR *) +jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void FAR *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * This routine computes the total memory space available for allocation. + * It's impossible to do this in a portable way; our current solution is + * to make the user tell us (with a default value set at compile time). + * If you can actually get the available space, it's a good idea to subtract + * a slop factor of 5% or so. + */ + +#ifndef DEFAULT_MAX_MEM /* so can override from makefile */ +#define DEFAULT_MAX_MEM 1000000L /* default: one megabyte */ +#endif + +GLOBAL(long) +jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, + long max_bytes_needed, long already_allocated) +{ + return cinfo->mem->max_memory_to_use - already_allocated; +} + + +/* + * Backing store (temporary file) management. + * Backing store objects are only used when the value returned by + * jpeg_mem_available is less than the total space needed. You can dispense + * with these routines if you have plenty of virtual memory; see jmemnobs.c. + */ + + +METHODDEF(void) +read_backing_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (fseek(info->temp_file, file_offset, SEEK_SET)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + if (JFREAD(info->temp_file, buffer_address, byte_count) + != (size_t) byte_count) + ERREXIT(cinfo, JERR_TFILE_READ); +} + + +METHODDEF(void) +write_backing_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (fseek(info->temp_file, file_offset, SEEK_SET)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + if (JFWRITE(info->temp_file, buffer_address, byte_count) + != (size_t) byte_count) + ERREXIT(cinfo, JERR_TFILE_WRITE); +} + + +METHODDEF(void) +close_backing_store (j_common_ptr cinfo, backing_store_ptr info) +{ + fclose(info->temp_file); /* close the file */ + unlink(info->temp_name); /* delete the file */ +/* If your system doesn't have unlink(), use remove() instead. + * remove() is the ANSI-standard name for this function, but if + * your system was ANSI you'd be using jmemansi.c, right? + */ + TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name); +} + + +/* + * Initial opening of a backing-store object. + */ + +GLOBAL(void) +jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + select_file_name(info->temp_name); + if ((info->temp_file = fopen(info->temp_name, RW_BINARY)) == NULL) + ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); + info->read_backing_store = read_backing_store; + info->write_backing_store = write_backing_store; + info->close_backing_store = close_backing_store; + TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name); +} + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. + */ + +GLOBAL(long) +jpeg_mem_init (j_common_ptr cinfo) +{ + next_file_num = 0; /* initialize temp file name generator */ + return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ +} + +GLOBAL(void) +jpeg_mem_term (j_common_ptr cinfo) +{ + /* no work */ +} diff --git a/gtkmm-osx/jpeg-6b/jmemnobs.c b/gtkmm-osx/jpeg-6b/jmemnobs.c new file mode 100644 index 0000000..eb8c337 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jmemnobs.c @@ -0,0 +1,109 @@ +/* + * jmemnobs.c + * + * Copyright (C) 1992-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file provides a really simple implementation of the system- + * dependent portion of the JPEG memory manager. This implementation + * assumes that no backing-store files are needed: all required space + * can be obtained from malloc(). + * This is very portable in the sense that it'll compile on almost anything, + * but you'd better have lots of main memory (or virtual memory) if you want + * to process big images. + * Note that the max_memory_to_use option is ignored by this implementation. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ +extern void * malloc JPP((size_t size)); +extern void free JPP((void *ptr)); +#endif + + +/* + * Memory allocation and freeing are controlled by the regular library + * routines malloc() and free(). + */ + +GLOBAL(void *) +jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * "Large" objects are treated the same as "small" ones. + * NB: although we include FAR keywords in the routine declarations, + * this file won't actually work in 80x86 small/medium model; at least, + * you probably won't be able to process useful-size images in only 64KB. + */ + +GLOBAL(void FAR *) +jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void FAR *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * This routine computes the total memory space available for allocation. + * Here we always say, "we got all you want bud!" + */ + +GLOBAL(long) +jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, + long max_bytes_needed, long already_allocated) +{ + return max_bytes_needed; +} + + +/* + * Backing store (temporary file) management. + * Since jpeg_mem_available always promised the moon, + * this should never be called and we can just error out. + */ + +GLOBAL(void) +jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + ERREXIT(cinfo, JERR_NO_BACKING_STORE); +} + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. Here, there isn't any. + */ + +GLOBAL(long) +jpeg_mem_init (j_common_ptr cinfo) +{ + return 0; /* just set max_memory_to_use to 0 */ +} + +GLOBAL(void) +jpeg_mem_term (j_common_ptr cinfo) +{ + /* no work */ +} diff --git a/gtkmm-osx/jpeg-6b/jmemsys.h b/gtkmm-osx/jpeg-6b/jmemsys.h new file mode 100644 index 0000000..6c3c6d3 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jmemsys.h @@ -0,0 +1,198 @@ +/* + * jmemsys.h + * + * Copyright (C) 1992-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This include file defines the interface between the system-independent + * and system-dependent portions of the JPEG memory manager. No other + * modules need include it. (The system-independent portion is jmemmgr.c; + * there are several different versions of the system-dependent portion.) + * + * This file works as-is for the system-dependent memory managers supplied + * in the IJG distribution. You may need to modify it if you write a + * custom memory manager. If system-dependent changes are needed in + * this file, the best method is to #ifdef them based on a configuration + * symbol supplied in jconfig.h, as we have done with USE_MSDOS_MEMMGR + * and USE_MAC_MEMMGR. + */ + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_get_small jGetSmall +#define jpeg_free_small jFreeSmall +#define jpeg_get_large jGetLarge +#define jpeg_free_large jFreeLarge +#define jpeg_mem_available jMemAvail +#define jpeg_open_backing_store jOpenBackStore +#define jpeg_mem_init jMemInit +#define jpeg_mem_term jMemTerm +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* + * These two functions are used to allocate and release small chunks of + * memory. (Typically the total amount requested through jpeg_get_small is + * no more than 20K or so; this will be requested in chunks of a few K each.) + * Behavior should be the same as for the standard library functions malloc + * and free; in particular, jpeg_get_small must return NULL on failure. + * On most systems, these ARE malloc and free. jpeg_free_small is passed the + * size of the object being freed, just in case it's needed. + * On an 80x86 machine using small-data memory model, these manage near heap. + */ + +EXTERN(void *) jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject)); +EXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object, + size_t sizeofobject)); + +/* + * These two functions are used to allocate and release large chunks of + * memory (up to the total free space designated by jpeg_mem_available). + * The interface is the same as above, except that on an 80x86 machine, + * far pointers are used. On most other machines these are identical to + * the jpeg_get/free_small routines; but we keep them separate anyway, + * in case a different allocation strategy is desirable for large chunks. + */ + +EXTERN(void FAR *) jpeg_get_large JPP((j_common_ptr cinfo, + size_t sizeofobject)); +EXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object, + size_t sizeofobject)); + +/* + * The macro MAX_ALLOC_CHUNK designates the maximum number of bytes that may + * be requested in a single call to jpeg_get_large (and jpeg_get_small for that + * matter, but that case should never come into play). This macro is needed + * to model the 64Kb-segment-size limit of far addressing on 80x86 machines. + * On those machines, we expect that jconfig.h will provide a proper value. + * On machines with 32-bit flat address spaces, any large constant may be used. + * + * NB: jmemmgr.c expects that MAX_ALLOC_CHUNK will be representable as type + * size_t and will be a multiple of sizeof(align_type). + */ + +#ifndef MAX_ALLOC_CHUNK /* may be overridden in jconfig.h */ +#define MAX_ALLOC_CHUNK 1000000000L +#endif + +/* + * This routine computes the total space still available for allocation by + * jpeg_get_large. If more space than this is needed, backing store will be + * used. NOTE: any memory already allocated must not be counted. + * + * There is a minimum space requirement, corresponding to the minimum + * feasible buffer sizes; jmemmgr.c will request that much space even if + * jpeg_mem_available returns zero. The maximum space needed, enough to hold + * all working storage in memory, is also passed in case it is useful. + * Finally, the total space already allocated is passed. If no better + * method is available, cinfo->mem->max_memory_to_use - already_allocated + * is often a suitable calculation. + * + * It is OK for jpeg_mem_available to underestimate the space available + * (that'll just lead to more backing-store access than is really necessary). + * However, an overestimate will lead to failure. Hence it's wise to subtract + * a slop factor from the true available space. 5% should be enough. + * + * On machines with lots of virtual memory, any large constant may be returned. + * Conversely, zero may be returned to always use the minimum amount of memory. + */ + +EXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo, + long min_bytes_needed, + long max_bytes_needed, + long already_allocated)); + + +/* + * This structure holds whatever state is needed to access a single + * backing-store object. The read/write/close method pointers are called + * by jmemmgr.c to manipulate the backing-store object; all other fields + * are private to the system-dependent backing store routines. + */ + +#define TEMP_NAME_LENGTH 64 /* max length of a temporary file's name */ + + +#ifdef USE_MSDOS_MEMMGR /* DOS-specific junk */ + +typedef unsigned short XMSH; /* type of extended-memory handles */ +typedef unsigned short EMSH; /* type of expanded-memory handles */ + +typedef union { + short file_handle; /* DOS file handle if it's a temp file */ + XMSH xms_handle; /* handle if it's a chunk of XMS */ + EMSH ems_handle; /* handle if it's a chunk of EMS */ +} handle_union; + +#endif /* USE_MSDOS_MEMMGR */ + +#ifdef USE_MAC_MEMMGR /* Mac-specific junk */ +#include +#endif /* USE_MAC_MEMMGR */ + + +typedef struct backing_store_struct * backing_store_ptr; + +typedef struct backing_store_struct { + /* Methods for reading/writing/closing this backing-store object */ + JMETHOD(void, read_backing_store, (j_common_ptr cinfo, + backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count)); + JMETHOD(void, write_backing_store, (j_common_ptr cinfo, + backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count)); + JMETHOD(void, close_backing_store, (j_common_ptr cinfo, + backing_store_ptr info)); + + /* Private fields for system-dependent backing-store management */ +#ifdef USE_MSDOS_MEMMGR + /* For the MS-DOS manager (jmemdos.c), we need: */ + handle_union handle; /* reference to backing-store storage object */ + char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ +#else +#ifdef USE_MAC_MEMMGR + /* For the Mac manager (jmemmac.c), we need: */ + short temp_file; /* file reference number to temp file */ + FSSpec tempSpec; /* the FSSpec for the temp file */ + char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ +#else + /* For a typical implementation with temp files, we need: */ + FILE * temp_file; /* stdio reference to temp file */ + char temp_name[TEMP_NAME_LENGTH]; /* name of temp file */ +#endif +#endif +} backing_store_info; + + +/* + * Initial opening of a backing-store object. This must fill in the + * read/write/close pointers in the object. The read/write routines + * may take an error exit if the specified maximum file size is exceeded. + * (If jpeg_mem_available always returns a large value, this routine can + * just take an error exit.) + */ + +EXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo, + backing_store_ptr info, + long total_bytes_needed)); + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. jpeg_mem_init will be called before anything is + * allocated (and, therefore, nothing in cinfo is of use except the error + * manager pointer). It should return a suitable default value for + * max_memory_to_use; this may subsequently be overridden by the surrounding + * application. (Note that max_memory_to_use is only important if + * jpeg_mem_available chooses to consult it ... no one else will.) + * jpeg_mem_term may assume that all requested memory has been freed and that + * all opened backing-store objects have been closed. + */ + +EXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo)); +EXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo)); diff --git a/gtkmm-osx/jpeg-6b/jmorecfg.h b/gtkmm-osx/jpeg-6b/jmorecfg.h new file mode 100644 index 0000000..54a7d1c --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jmorecfg.h @@ -0,0 +1,363 @@ +/* + * jmorecfg.h + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains additional configuration options that customize the + * JPEG software for special applications or support machine-dependent + * optimizations. Most users will not need to touch this file. + */ + + +/* + * Define BITS_IN_JSAMPLE as either + * 8 for 8-bit sample values (the usual setting) + * 12 for 12-bit sample values + * Only 8 and 12 are legal data precisions for lossy JPEG according to the + * JPEG standard, and the IJG code does not support anything else! + * We do not support run-time selection of data precision, sorry. + */ + +#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ + + +/* + * Maximum number of components (color channels) allowed in JPEG image. + * To meet the letter of the JPEG spec, set this to 255. However, darn + * few applications need more than 4 channels (maybe 5 for CMYK + alpha + * mask). We recommend 10 as a reasonable compromise; use 4 if you are + * really short on memory. (Each allowed component costs a hundred or so + * bytes of storage, whether actually used in an image or not.) + */ + +#define MAX_COMPONENTS 10 /* maximum number of image components */ + + +/* + * Basic data types. + * You may need to change these if you have a machine with unusual data + * type sizes; for example, "char" not 8 bits, "short" not 16 bits, + * or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, + * but it had better be at least 16. + */ + +/* Representation of a single sample (pixel element value). + * We frequently allocate large arrays of these, so it's important to keep + * them small. But if you have memory to burn and access to char or short + * arrays is very slow on your hardware, you might want to change these. + */ + +#if BITS_IN_JSAMPLE == 8 +/* JSAMPLE should be the smallest type that will hold the values 0..255. + * You can use a signed char by having GETJSAMPLE mask it with 0xFF. + */ + +#ifdef HAVE_UNSIGNED_CHAR + +typedef unsigned char JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#else /* not HAVE_UNSIGNED_CHAR */ + +typedef char JSAMPLE; +#ifdef CHAR_IS_UNSIGNED +#define GETJSAMPLE(value) ((int) (value)) +#else +#define GETJSAMPLE(value) ((int) (value) & 0xFF) +#endif /* CHAR_IS_UNSIGNED */ + +#endif /* HAVE_UNSIGNED_CHAR */ + +#define MAXJSAMPLE 255 +#define CENTERJSAMPLE 128 + +#endif /* BITS_IN_JSAMPLE == 8 */ + + +#if BITS_IN_JSAMPLE == 12 +/* JSAMPLE should be the smallest type that will hold the values 0..4095. + * On nearly all machines "short" will do nicely. + */ + +typedef short JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#define MAXJSAMPLE 4095 +#define CENTERJSAMPLE 2048 + +#endif /* BITS_IN_JSAMPLE == 12 */ + + +/* Representation of a DCT frequency coefficient. + * This should be a signed value of at least 16 bits; "short" is usually OK. + * Again, we allocate large arrays of these, but you can change to int + * if you have memory to burn and "short" is really slow. + */ + +typedef short JCOEF; + + +/* Compressed datastreams are represented as arrays of JOCTET. + * These must be EXACTLY 8 bits wide, at least once they are written to + * external storage. Note that when using the stdio data source/destination + * managers, this is also the data type passed to fread/fwrite. + */ + +#ifdef HAVE_UNSIGNED_CHAR + +typedef unsigned char JOCTET; +#define GETJOCTET(value) (value) + +#else /* not HAVE_UNSIGNED_CHAR */ + +typedef char JOCTET; +#ifdef CHAR_IS_UNSIGNED +#define GETJOCTET(value) (value) +#else +#define GETJOCTET(value) ((value) & 0xFF) +#endif /* CHAR_IS_UNSIGNED */ + +#endif /* HAVE_UNSIGNED_CHAR */ + + +/* These typedefs are used for various table entries and so forth. + * They must be at least as wide as specified; but making them too big + * won't cost a huge amount of memory, so we don't provide special + * extraction code like we did for JSAMPLE. (In other words, these + * typedefs live at a different point on the speed/space tradeoff curve.) + */ + +/* UINT8 must hold at least the values 0..255. */ + +#ifdef HAVE_UNSIGNED_CHAR +typedef unsigned char UINT8; +#else /* not HAVE_UNSIGNED_CHAR */ +#ifdef CHAR_IS_UNSIGNED +typedef char UINT8; +#else /* not CHAR_IS_UNSIGNED */ +typedef short UINT8; +#endif /* CHAR_IS_UNSIGNED */ +#endif /* HAVE_UNSIGNED_CHAR */ + +/* UINT16 must hold at least the values 0..65535. */ + +#ifdef HAVE_UNSIGNED_SHORT +typedef unsigned short UINT16; +#else /* not HAVE_UNSIGNED_SHORT */ +typedef unsigned int UINT16; +#endif /* HAVE_UNSIGNED_SHORT */ + +/* INT16 must hold at least the values -32768..32767. */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ +typedef short INT16; +#endif + +/* INT32 must hold at least signed 32-bit values. */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ +typedef long INT32; +#endif + +/* Datatype used for image dimensions. The JPEG standard only supports + * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore + * "unsigned int" is sufficient on all machines. However, if you need to + * handle larger images and you don't mind deviating from the spec, you + * can change this datatype. + */ + +typedef unsigned int JDIMENSION; + +#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ + + +/* These macros are used in all function definitions and extern declarations. + * You could modify them if you need to change function linkage conventions; + * in particular, you'll need to do that to make the library a Windows DLL. + * Another application is to make all functions global for use with debuggers + * or code profilers that require it. + */ + +/* a function called through method pointers: */ +#define METHODDEF(type) static type +/* a function used only in its module: */ +#define LOCAL(type) static type +/* a function referenced thru EXTERNs: */ +#define GLOBAL(type) type +/* a reference to a GLOBAL function: */ +#define EXTERN(type) extern type + + +/* This macro is used to declare a "method", that is, a function pointer. + * We want to supply prototype parameters if the compiler can cope. + * Note that the arglist parameter must be parenthesized! + * Again, you can customize this if you need special linkage keywords. + */ + +#ifdef HAVE_PROTOTYPES +#define JMETHOD(type,methodname,arglist) type (*methodname) arglist +#else +#define JMETHOD(type,methodname,arglist) type (*methodname) () +#endif + + +/* Here is the pseudo-keyword for declaring pointers that must be "far" + * on 80x86 machines. Most of the specialized coding for 80x86 is handled + * by just saying "FAR *" where such a pointer is needed. In a few places + * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol. + */ + +#ifdef NEED_FAR_POINTERS +#define FAR far +#else +#define FAR +#endif + + +/* + * On a few systems, type boolean and/or its values FALSE, TRUE may appear + * in standard header files. Or you may have conflicts with application- + * specific header files that you want to include together with these files. + * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. + */ + +#ifndef HAVE_BOOLEAN +typedef int boolean; +#endif +#ifndef FALSE /* in case these macros already exist */ +#define FALSE 0 /* values of boolean */ +#endif +#ifndef TRUE +#define TRUE 1 +#endif + + +/* + * The remaining options affect code selection within the JPEG library, + * but they don't need to be visible to most applications using the library. + * To minimize application namespace pollution, the symbols won't be + * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined. + */ + +#ifdef JPEG_INTERNALS +#define JPEG_INTERNAL_OPTIONS +#endif + +#ifdef JPEG_INTERNAL_OPTIONS + + +/* + * These defines indicate whether to include various optional functions. + * Undefining some of these symbols will produce a smaller but less capable + * library. Note that you can leave certain source files out of the + * compilation/linking process if you've #undef'd the corresponding symbols. + * (You may HAVE to do that if your compiler doesn't like null source files.) + */ + +/* Arithmetic coding is unsupported for legal reasons. Complaints to IBM. */ + +/* Capability options common to encoder and decoder: */ + +#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */ +#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */ +#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */ + +/* Encoder capability options: */ + +#undef C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ +#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ +#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ +/* Note: if you selected 12-bit data precision, it is dangerous to turn off + * ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit + * precision, so jchuff.c normally uses entropy optimization to compute + * usable tables for higher precision. If you don't want to do optimization, + * you'll have to supply different default Huffman tables. + * The exact same statements apply for progressive JPEG: the default tables + * don't work for progressive mode. (This may get fixed, however.) + */ +#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */ + +/* Decoder capability options: */ + +#undef D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ +#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ +#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */ +#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */ +#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */ +#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */ +#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */ +#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */ +#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */ + +/* more capability options later, no doubt */ + + +/* + * Ordering of RGB data in scanlines passed to or from the application. + * If your application wants to deal with data in the order B,G,R, just + * change these macros. You can also deal with formats such as R,G,B,X + * (one extra byte per pixel) by changing RGB_PIXELSIZE. Note that changing + * the offsets will also change the order in which colormap data is organized. + * RESTRICTIONS: + * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats. + * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not + * useful if you are using JPEG color spaces other than YCbCr or grayscale. + * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE + * is not 3 (they don't understand about dummy color components!). So you + * can't use color quantization if you change that value. + */ + +#define RGB_RED 0 /* Offset of Red in an RGB scanline element */ +#define RGB_GREEN 1 /* Offset of Green */ +#define RGB_BLUE 2 /* Offset of Blue */ +#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ + + +/* Definitions for speed-related optimizations. */ + + +/* If your compiler supports inline functions, define INLINE + * as the inline keyword; otherwise define it as empty. + */ + +#ifndef INLINE +#ifdef __GNUC__ /* for instance, GNU C knows about inline */ +#define INLINE __inline__ +#endif +#ifndef INLINE +#define INLINE /* default is to define it as empty */ +#endif +#endif + + +/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying + * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER + * as short on such a machine. MULTIPLIER must be at least 16 bits wide. + */ + +#ifndef MULTIPLIER +#define MULTIPLIER int /* type for fastest integer multiply */ +#endif + + +/* FAST_FLOAT should be either float or double, whichever is done faster + * by your compiler. (Note that this type is only used in the floating point + * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.) + * Typically, float is faster in ANSI C compilers, while double is faster in + * pre-ANSI compilers (because they insist on converting to double anyway). + * The code below therefore chooses float if we have ANSI-style prototypes. + */ + +#ifndef FAST_FLOAT +#ifdef HAVE_PROTOTYPES +#define FAST_FLOAT float +#else +#define FAST_FLOAT double +#endif +#endif + +#endif /* JPEG_INTERNAL_OPTIONS */ diff --git a/gtkmm-osx/jpeg-6b/jpegint.h b/gtkmm-osx/jpeg-6b/jpegint.h new file mode 100644 index 0000000..95b00d4 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jpegint.h @@ -0,0 +1,392 @@ +/* + * jpegint.h + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file provides common declarations for the various JPEG modules. + * These declarations are considered internal to the JPEG library; most + * applications using the library shouldn't need to include this file. + */ + + +/* Declarations for both compression & decompression */ + +typedef enum { /* Operating modes for buffer controllers */ + JBUF_PASS_THRU, /* Plain stripwise operation */ + /* Remaining modes require a full-image buffer to have been created */ + JBUF_SAVE_SOURCE, /* Run source subobject only, save output */ + JBUF_CRANK_DEST, /* Run dest subobject only, using saved data */ + JBUF_SAVE_AND_PASS /* Run both subobjects, save output */ +} J_BUF_MODE; + +/* Values of global_state field (jdapi.c has some dependencies on ordering!) */ +#define CSTATE_START 100 /* after create_compress */ +#define CSTATE_SCANNING 101 /* start_compress done, write_scanlines OK */ +#define CSTATE_RAW_OK 102 /* start_compress done, write_raw_data OK */ +#define CSTATE_WRCOEFS 103 /* jpeg_write_coefficients done */ +#define DSTATE_START 200 /* after create_decompress */ +#define DSTATE_INHEADER 201 /* reading header markers, no SOS yet */ +#define DSTATE_READY 202 /* found SOS, ready for start_decompress */ +#define DSTATE_PRELOAD 203 /* reading multiscan file in start_decompress*/ +#define DSTATE_PRESCAN 204 /* performing dummy pass for 2-pass quant */ +#define DSTATE_SCANNING 205 /* start_decompress done, read_scanlines OK */ +#define DSTATE_RAW_OK 206 /* start_decompress done, read_raw_data OK */ +#define DSTATE_BUFIMAGE 207 /* expecting jpeg_start_output */ +#define DSTATE_BUFPOST 208 /* looking for SOS/EOI in jpeg_finish_output */ +#define DSTATE_RDCOEFS 209 /* reading file in jpeg_read_coefficients */ +#define DSTATE_STOPPING 210 /* looking for EOI in jpeg_finish_decompress */ + + +/* Declarations for compression modules */ + +/* Master control module */ +struct jpeg_comp_master { + JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo)); + JMETHOD(void, pass_startup, (j_compress_ptr cinfo)); + JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); + + /* State variables made visible to other modules */ + boolean call_pass_startup; /* True if pass_startup must be called */ + boolean is_last_pass; /* True during last pass */ +}; + +/* Main buffer control (downsampled-data buffer) */ +struct jpeg_c_main_controller { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, process_data, (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail)); +}; + +/* Compression preprocessing (downsampling input buffer control) */ +struct jpeg_c_prep_controller { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, pre_process_data, (j_compress_ptr cinfo, + JSAMPARRAY input_buf, + JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail, + JSAMPIMAGE output_buf, + JDIMENSION *out_row_group_ctr, + JDIMENSION out_row_groups_avail)); +}; + +/* Coefficient buffer control */ +struct jpeg_c_coef_controller { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(boolean, compress_data, (j_compress_ptr cinfo, + JSAMPIMAGE input_buf)); +}; + +/* Colorspace conversion */ +struct jpeg_color_converter { + JMETHOD(void, start_pass, (j_compress_ptr cinfo)); + JMETHOD(void, color_convert, (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows)); +}; + +/* Downsampling */ +struct jpeg_downsampler { + JMETHOD(void, start_pass, (j_compress_ptr cinfo)); + JMETHOD(void, downsample, (j_compress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_index, + JSAMPIMAGE output_buf, + JDIMENSION out_row_group_index)); + + boolean need_context_rows; /* TRUE if need rows above & below */ +}; + +/* Forward DCT (also controls coefficient quantization) */ +struct jpeg_forward_dct { + JMETHOD(void, start_pass, (j_compress_ptr cinfo)); + /* perhaps this should be an array??? */ + JMETHOD(void, forward_DCT, (j_compress_ptr cinfo, + jpeg_component_info * compptr, + JSAMPARRAY sample_data, JBLOCKROW coef_blocks, + JDIMENSION start_row, JDIMENSION start_col, + JDIMENSION num_blocks)); +}; + +/* Entropy encoding */ +struct jpeg_entropy_encoder { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics)); + JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data)); + JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); +}; + +/* Marker writing */ +struct jpeg_marker_writer { + JMETHOD(void, write_file_header, (j_compress_ptr cinfo)); + JMETHOD(void, write_frame_header, (j_compress_ptr cinfo)); + JMETHOD(void, write_scan_header, (j_compress_ptr cinfo)); + JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo)); + JMETHOD(void, write_tables_only, (j_compress_ptr cinfo)); + /* These routines are exported to allow insertion of extra markers */ + /* Probably only COM and APPn markers should be written this way */ + JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker, + unsigned int datalen)); + JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val)); +}; + + +/* Declarations for decompression modules */ + +/* Master control module */ +struct jpeg_decomp_master { + JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo)); + + /* State variables made visible to other modules */ + boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */ +}; + +/* Input control module */ +struct jpeg_input_controller { + JMETHOD(int, consume_input, (j_decompress_ptr cinfo)); + JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo)); + JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo)); + + /* State variables made visible to other modules */ + boolean has_multiple_scans; /* True if file has multiple scans */ + boolean eoi_reached; /* True when EOI has been consumed */ +}; + +/* Main buffer control (downsampled-data buffer) */ +struct jpeg_d_main_controller { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, process_data, (j_decompress_ptr cinfo, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +}; + +/* Coefficient buffer control */ +struct jpeg_d_coef_controller { + JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); + JMETHOD(int, consume_data, (j_decompress_ptr cinfo)); + JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo)); + JMETHOD(int, decompress_data, (j_decompress_ptr cinfo, + JSAMPIMAGE output_buf)); + /* Pointer to array of coefficient virtual arrays, or NULL if none */ + jvirt_barray_ptr *coef_arrays; +}; + +/* Decompression postprocessing (color quantization buffer control) */ +struct jpeg_d_post_controller { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, post_process_data, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, + JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +}; + +/* Marker reading & parsing */ +struct jpeg_marker_reader { + JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo)); + /* Read markers until SOS or EOI. + * Returns same codes as are defined for jpeg_consume_input: + * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. + */ + JMETHOD(int, read_markers, (j_decompress_ptr cinfo)); + /* Read a restart marker --- exported for use by entropy decoder only */ + jpeg_marker_parser_method read_restart_marker; + + /* State of marker reader --- nominally internal, but applications + * supplying COM or APPn handlers might like to know the state. + */ + boolean saw_SOI; /* found SOI? */ + boolean saw_SOF; /* found SOF? */ + int next_restart_num; /* next restart number expected (0-7) */ + unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */ +}; + +/* Entropy decoding */ +struct jpeg_entropy_decoder { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo, + JBLOCKROW *MCU_data)); + + /* This is here to share code between baseline and progressive decoders; */ + /* other modules probably should not use it */ + boolean insufficient_data; /* set TRUE after emitting warning */ +}; + +/* Inverse DCT (also performs dequantization) */ +typedef JMETHOD(void, inverse_DCT_method_ptr, + (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col)); + +struct jpeg_inverse_dct { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + /* It is useful to allow each component to have a separate IDCT method. */ + inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS]; +}; + +/* Upsampling (note that upsampler must also call color converter) */ +struct jpeg_upsampler { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, upsample, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, + JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); + + boolean need_context_rows; /* TRUE if need rows above & below */ +}; + +/* Colorspace conversion */ +struct jpeg_color_deconverter { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, color_convert, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows)); +}; + +/* Color quantization or color precision reduction */ +struct jpeg_color_quantizer { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan)); + JMETHOD(void, color_quantize, (j_decompress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPARRAY output_buf, + int num_rows)); + JMETHOD(void, finish_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, new_color_map, (j_decompress_ptr cinfo)); +}; + + +/* Miscellaneous useful macros */ + +#undef MAX +#define MAX(a,b) ((a) > (b) ? (a) : (b)) +#undef MIN +#define MIN(a,b) ((a) < (b) ? (a) : (b)) + + +/* We assume that right shift corresponds to signed division by 2 with + * rounding towards minus infinity. This is correct for typical "arithmetic + * shift" instructions that shift in copies of the sign bit. But some + * C compilers implement >> with an unsigned shift. For these machines you + * must define RIGHT_SHIFT_IS_UNSIGNED. + * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity. + * It is only applied with constant shift counts. SHIFT_TEMPS must be + * included in the variables of any routine using RIGHT_SHIFT. + */ + +#ifdef RIGHT_SHIFT_IS_UNSIGNED +#define SHIFT_TEMPS INT32 shift_temp; +#define RIGHT_SHIFT(x,shft) \ + ((shift_temp = (x)) < 0 ? \ + (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \ + (shift_temp >> (shft))) +#else +#define SHIFT_TEMPS +#define RIGHT_SHIFT(x,shft) ((x) >> (shft)) +#endif + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jinit_compress_master jICompress +#define jinit_c_master_control jICMaster +#define jinit_c_main_controller jICMainC +#define jinit_c_prep_controller jICPrepC +#define jinit_c_coef_controller jICCoefC +#define jinit_color_converter jICColor +#define jinit_downsampler jIDownsampler +#define jinit_forward_dct jIFDCT +#define jinit_huff_encoder jIHEncoder +#define jinit_phuff_encoder jIPHEncoder +#define jinit_marker_writer jIMWriter +#define jinit_master_decompress jIDMaster +#define jinit_d_main_controller jIDMainC +#define jinit_d_coef_controller jIDCoefC +#define jinit_d_post_controller jIDPostC +#define jinit_input_controller jIInCtlr +#define jinit_marker_reader jIMReader +#define jinit_huff_decoder jIHDecoder +#define jinit_phuff_decoder jIPHDecoder +#define jinit_inverse_dct jIIDCT +#define jinit_upsampler jIUpsampler +#define jinit_color_deconverter jIDColor +#define jinit_1pass_quantizer jI1Quant +#define jinit_2pass_quantizer jI2Quant +#define jinit_merged_upsampler jIMUpsampler +#define jinit_memory_mgr jIMemMgr +#define jdiv_round_up jDivRound +#define jround_up jRound +#define jcopy_sample_rows jCopySamples +#define jcopy_block_row jCopyBlocks +#define jzero_far jZeroFar +#define jpeg_zigzag_order jZIGTable +#define jpeg_natural_order jZAGTable +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* Compression module initialization routines */ +EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo, + boolean transcode_only)); +EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_phuff_encoder JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo)); +/* Decompression module initialization routines */ +EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_phuff_decoder JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo)); +/* Memory manager initialization */ +EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo)); + +/* Utility routines in jutils.c */ +EXTERN(long) jdiv_round_up JPP((long a, long b)); +EXTERN(long) jround_up JPP((long a, long b)); +EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row, + JSAMPARRAY output_array, int dest_row, + int num_rows, JDIMENSION num_cols)); +EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row, + JDIMENSION num_blocks)); +EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero)); +/* Constant tables in jutils.c */ +#if 0 /* This table is not actually needed in v6a */ +extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */ +#endif +extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */ + +/* Suppress undefined-structure complaints if necessary. */ + +#ifdef INCOMPLETE_TYPES_BROKEN +#ifndef AM_MEMORY_MANAGER /* only jmemmgr.c defines these */ +struct jvirt_sarray_control { long dummy; }; +struct jvirt_barray_control { long dummy; }; +#endif +#endif /* INCOMPLETE_TYPES_BROKEN */ diff --git a/gtkmm-osx/jpeg-6b/jpeglib.h b/gtkmm-osx/jpeg-6b/jpeglib.h new file mode 100644 index 0000000..31569a2 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jpeglib.h @@ -0,0 +1,1096 @@ +/* + * jpeglib.h + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the application interface for the JPEG library. + * Most applications using the library need only include this file, + * and perhaps jerror.h if they want to know the exact error codes. + */ + +#ifndef JPEGLIB_H +#define JPEGLIB_H + +/* + * First we include the configuration files that record how this + * installation of the JPEG library is set up. jconfig.h can be + * generated automatically for many systems. jmorecfg.h contains + * manual configuration options that most people need not worry about. + */ + +#ifndef JCONFIG_INCLUDED /* in case jinclude.h already did */ +#include "jconfig.h" /* widely used configuration options */ +#endif +#include "jmorecfg.h" /* seldom changed options */ + + +/* Version ID for the JPEG library. + * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60". + */ + +#define JPEG_LIB_VERSION 62 /* Version 6b */ + + +/* Various constants determining the sizes of things. + * All of these are specified by the JPEG standard, so don't change them + * if you want to be compatible. + */ + +#define DCTSIZE 8 /* The basic DCT block is 8x8 samples */ +#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ +#define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */ +#define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */ +#define NUM_ARITH_TBLS 16 /* Arith-coding tables are numbered 0..15 */ +#define MAX_COMPS_IN_SCAN 4 /* JPEG limit on # of components in one scan */ +#define MAX_SAMP_FACTOR 4 /* JPEG limit on sampling factors */ +/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard; + * the PostScript DCT filter can emit files with many more than 10 blocks/MCU. + * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU + * to handle it. We even let you do this from the jconfig.h file. However, + * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe + * sometimes emits noncompliant files doesn't mean you should too. + */ +#define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on blocks per MCU */ +#ifndef D_MAX_BLOCKS_IN_MCU +#define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on blocks per MCU */ +#endif + + +/* Data structures for images (arrays of samples and of DCT coefficients). + * On 80x86 machines, the image arrays are too big for near pointers, + * but the pointer arrays can fit in near memory. + */ + +typedef JSAMPLE FAR *JSAMPROW; /* ptr to one image row of pixel samples. */ +typedef JSAMPROW *JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */ +typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */ + +typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */ +typedef JBLOCK FAR *JBLOCKROW; /* pointer to one row of coefficient blocks */ +typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */ +typedef JBLOCKARRAY *JBLOCKIMAGE; /* a 3-D array of coefficient blocks */ + +typedef JCOEF FAR *JCOEFPTR; /* useful in a couple of places */ + + +/* Types for JPEG compression parameters and working tables. */ + + +/* DCT coefficient quantization tables. */ + +typedef struct { + /* This array gives the coefficient quantizers in natural array order + * (not the zigzag order in which they are stored in a JPEG DQT marker). + * CAUTION: IJG versions prior to v6a kept this array in zigzag order. + */ + UINT16 quantval[DCTSIZE2]; /* quantization step for each coefficient */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + boolean sent_table; /* TRUE when table has been output */ +} JQUANT_TBL; + + +/* Huffman coding tables. */ + +typedef struct { + /* These two fields directly represent the contents of a JPEG DHT marker */ + UINT8 bits[17]; /* bits[k] = # of symbols with codes of */ + /* length k bits; bits[0] is unused */ + UINT8 huffval[256]; /* The symbols, in order of incr code length */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + boolean sent_table; /* TRUE when table has been output */ +} JHUFF_TBL; + + +/* Basic info about one component (color channel). */ + +typedef struct { + /* These values are fixed over the whole image. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOF marker. */ + int component_id; /* identifier for this component (0..255) */ + int component_index; /* its index in SOF or cinfo->comp_info[] */ + int h_samp_factor; /* horizontal sampling factor (1..4) */ + int v_samp_factor; /* vertical sampling factor (1..4) */ + int quant_tbl_no; /* quantization table selector (0..3) */ + /* These values may vary between scans. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOS marker. */ + /* The decompressor output side may not use these variables. */ + int dc_tbl_no; /* DC entropy table selector (0..3) */ + int ac_tbl_no; /* AC entropy table selector (0..3) */ + + /* Remaining fields should be treated as private by applications. */ + + /* These values are computed during compression or decompression startup: */ + /* Component's size in DCT blocks. + * Any dummy blocks added to complete an MCU are not counted; therefore + * these values do not depend on whether a scan is interleaved or not. + */ + JDIMENSION width_in_blocks; + JDIMENSION height_in_blocks; + /* Size of a DCT block in samples. Always DCTSIZE for compression. + * For decompression this is the size of the output from one DCT block, + * reflecting any scaling we choose to apply during the IDCT step. + * Values of 1,2,4,8 are likely to be supported. Note that different + * components may receive different IDCT scalings. + */ + int DCT_scaled_size; + /* The downsampled dimensions are the component's actual, unpadded number + * of samples at the main buffer (preprocessing/compression interface), thus + * downsampled_width = ceil(image_width * Hi/Hmax) + * and similarly for height. For decompression, IDCT scaling is included, so + * downsampled_width = ceil(image_width * Hi/Hmax * DCT_scaled_size/DCTSIZE) + */ + JDIMENSION downsampled_width; /* actual width in samples */ + JDIMENSION downsampled_height; /* actual height in samples */ + /* This flag is used only for decompression. In cases where some of the + * components will be ignored (eg grayscale output from YCbCr image), + * we can skip most computations for the unused components. + */ + boolean component_needed; /* do we need the value of this component? */ + + /* These values are computed before starting a scan of the component. */ + /* The decompressor output side may not use these variables. */ + int MCU_width; /* number of blocks per MCU, horizontally */ + int MCU_height; /* number of blocks per MCU, vertically */ + int MCU_blocks; /* MCU_width * MCU_height */ + int MCU_sample_width; /* MCU width in samples, MCU_width*DCT_scaled_size */ + int last_col_width; /* # of non-dummy blocks across in last MCU */ + int last_row_height; /* # of non-dummy blocks down in last MCU */ + + /* Saved quantization table for component; NULL if none yet saved. + * See jdinput.c comments about the need for this information. + * This field is currently used only for decompression. + */ + JQUANT_TBL * quant_table; + + /* Private per-component storage for DCT or IDCT subsystem. */ + void * dct_table; +} jpeg_component_info; + + +/* The script for encoding a multiple-scan file is an array of these: */ + +typedef struct { + int comps_in_scan; /* number of components encoded in this scan */ + int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */ + int Ss, Se; /* progressive JPEG spectral selection parms */ + int Ah, Al; /* progressive JPEG successive approx. parms */ +} jpeg_scan_info; + +/* The decompressor can save APPn and COM markers in a list of these: */ + +typedef struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr; + +struct jpeg_marker_struct { + jpeg_saved_marker_ptr next; /* next in list, or NULL */ + UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */ + unsigned int original_length; /* # bytes of data in the file */ + unsigned int data_length; /* # bytes of data saved at data[] */ + JOCTET FAR * data; /* the data contained in the marker */ + /* the marker length word is not counted in data_length or original_length */ +}; + +/* Known color spaces. */ + +typedef enum { + JCS_UNKNOWN, /* error/unspecified */ + JCS_GRAYSCALE, /* monochrome */ + JCS_RGB, /* red/green/blue */ + JCS_YCbCr, /* Y/Cb/Cr (also known as YUV) */ + JCS_CMYK, /* C/M/Y/K */ + JCS_YCCK /* Y/Cb/Cr/K */ +} J_COLOR_SPACE; + +/* DCT/IDCT algorithm options. */ + +typedef enum { + JDCT_ISLOW, /* slow but accurate integer algorithm */ + JDCT_IFAST, /* faster, less accurate integer method */ + JDCT_FLOAT /* floating-point: accurate, fast on fast HW */ +} J_DCT_METHOD; + +#ifndef JDCT_DEFAULT /* may be overridden in jconfig.h */ +#define JDCT_DEFAULT JDCT_ISLOW +#endif +#ifndef JDCT_FASTEST /* may be overridden in jconfig.h */ +#define JDCT_FASTEST JDCT_IFAST +#endif + +/* Dithering options for decompression. */ + +typedef enum { + JDITHER_NONE, /* no dithering */ + JDITHER_ORDERED, /* simple ordered dither */ + JDITHER_FS /* Floyd-Steinberg error diffusion dither */ +} J_DITHER_MODE; + + +/* Common fields between JPEG compression and decompression master structs. */ + +#define jpeg_common_fields \ + struct jpeg_error_mgr * err; /* Error handler module */\ + struct jpeg_memory_mgr * mem; /* Memory manager module */\ + struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\ + void * client_data; /* Available for use by application */\ + boolean is_decompressor; /* So common code can tell which is which */\ + int global_state /* For checking call sequence validity */ + +/* Routines that are to be used by both halves of the library are declared + * to receive a pointer to this structure. There are no actual instances of + * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct. + */ +struct jpeg_common_struct { + jpeg_common_fields; /* Fields common to both master struct types */ + /* Additional fields follow in an actual jpeg_compress_struct or + * jpeg_decompress_struct. All three structs must agree on these + * initial fields! (This would be a lot cleaner in C++.) + */ +}; + +typedef struct jpeg_common_struct * j_common_ptr; +typedef struct jpeg_compress_struct * j_compress_ptr; +typedef struct jpeg_decompress_struct * j_decompress_ptr; + + +/* Master record for a compression instance */ + +struct jpeg_compress_struct { + jpeg_common_fields; /* Fields shared with jpeg_decompress_struct */ + + /* Destination for compressed data */ + struct jpeg_destination_mgr * dest; + + /* Description of source image --- these fields must be filled in by + * outer application before starting compression. in_color_space must + * be correct before you can even call jpeg_set_defaults(). + */ + + JDIMENSION image_width; /* input image width */ + JDIMENSION image_height; /* input image height */ + int input_components; /* # of color components in input image */ + J_COLOR_SPACE in_color_space; /* colorspace of input image */ + + double input_gamma; /* image gamma of input image */ + + /* Compression parameters --- these fields must be set before calling + * jpeg_start_compress(). We recommend calling jpeg_set_defaults() to + * initialize everything to reasonable defaults, then changing anything + * the application specifically wants to change. That way you won't get + * burnt when new parameters are added. Also note that there are several + * helper routines to simplify changing parameters. + */ + + int data_precision; /* bits of precision in image data */ + + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + jpeg_component_info * comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + + JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; + /* ptrs to coefficient quantization tables, or NULL if not defined */ + + JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + int num_scans; /* # of entries in scan_info array */ + const jpeg_scan_info * scan_info; /* script for multi-scan file, or NULL */ + /* The default value of scan_info is NULL, which causes a single-scan + * sequential JPEG file to be emitted. To create a multi-scan file, + * set num_scans and scan_info to point to an array of scan definitions. + */ + + boolean raw_data_in; /* TRUE=caller supplies downsampled data */ + boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + boolean optimize_coding; /* TRUE=optimize entropy encoding parms */ + boolean CCIR601_sampling; /* TRUE=first samples are cosited */ + int smoothing_factor; /* 1..100, or 0 for no input smoothing */ + J_DCT_METHOD dct_method; /* DCT algorithm selector */ + + /* The restart interval can be specified in absolute MCUs by setting + * restart_interval, or in MCU rows by setting restart_in_rows + * (in which case the correct restart_interval will be figured + * for each scan). + */ + unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */ + int restart_in_rows; /* if > 0, MCU rows per restart interval */ + + /* Parameters controlling emission of special markers. */ + + boolean write_JFIF_header; /* should a JFIF marker be written? */ + UINT8 JFIF_major_version; /* What to write for the JFIF version number */ + UINT8 JFIF_minor_version; + /* These three values are not used by the JPEG code, merely copied */ + /* into the JFIF APP0 marker. density_unit can be 0 for unknown, */ + /* 1 for dots/inch, or 2 for dots/cm. Note that the pixel aspect */ + /* ratio is defined by X_density/Y_density even when density_unit=0. */ + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + boolean write_Adobe_marker; /* should an Adobe marker be written? */ + + /* State variable: index of next scanline to be written to + * jpeg_write_scanlines(). Application may use this to control its + * processing loop, e.g., "while (next_scanline < image_height)". + */ + + JDIMENSION next_scanline; /* 0 .. image_height-1 */ + + /* Remaining fields are known throughout compressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during compression startup + */ + boolean progressive_mode; /* TRUE if scan script uses progressive mode */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + + JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coef ctlr */ + /* The coefficient controller receives data in units of MCU rows as defined + * for fully interleaved scans (whether the JPEG file is interleaved or not). + * There are v_samp_factor * DCTSIZE sample rows of each component in an + * "iMCU" (interleaved MCU) row. + */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of DCT blocks per MCU */ + int MCU_membership[C_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th block in an MCU */ + + int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + + /* + * Links to compression subobjects (methods and private variables of modules) + */ + struct jpeg_comp_master * master; + struct jpeg_c_main_controller * main; + struct jpeg_c_prep_controller * prep; + struct jpeg_c_coef_controller * coef; + struct jpeg_marker_writer * marker; + struct jpeg_color_converter * cconvert; + struct jpeg_downsampler * downsample; + struct jpeg_forward_dct * fdct; + struct jpeg_entropy_encoder * entropy; + jpeg_scan_info * script_space; /* workspace for jpeg_simple_progression */ + int script_space_size; +}; + + +/* Master record for a decompression instance */ + +struct jpeg_decompress_struct { + jpeg_common_fields; /* Fields shared with jpeg_compress_struct */ + + /* Source of compressed data */ + struct jpeg_source_mgr * src; + + /* Basic description of image --- filled in by jpeg_read_header(). */ + /* Application may inspect these values to decide how to process image. */ + + JDIMENSION image_width; /* nominal image width (from SOF marker) */ + JDIMENSION image_height; /* nominal image height */ + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + /* Decompression processing parameters --- these fields must be set before + * calling jpeg_start_decompress(). Note that jpeg_read_header() initializes + * them to default values. + */ + + J_COLOR_SPACE out_color_space; /* colorspace for output */ + + unsigned int scale_num, scale_denom; /* fraction by which to scale image */ + + double output_gamma; /* image gamma wanted in output */ + + boolean buffered_image; /* TRUE=multiple output passes */ + boolean raw_data_out; /* TRUE=downsampled data wanted */ + + J_DCT_METHOD dct_method; /* IDCT algorithm selector */ + boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */ + boolean do_block_smoothing; /* TRUE=apply interblock smoothing */ + + boolean quantize_colors; /* TRUE=colormapped output wanted */ + /* the following are ignored if not quantize_colors: */ + J_DITHER_MODE dither_mode; /* type of color dithering to use */ + boolean two_pass_quantize; /* TRUE=use two-pass color quantization */ + int desired_number_of_colors; /* max # colors to use in created colormap */ + /* these are significant only in buffered-image mode: */ + boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */ + boolean enable_external_quant;/* enable future use of external colormap */ + boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */ + + /* Description of actual output image that will be returned to application. + * These fields are computed by jpeg_start_decompress(). + * You can also use jpeg_calc_output_dimensions() to determine these values + * in advance of calling jpeg_start_decompress(). + */ + + JDIMENSION output_width; /* scaled image width */ + JDIMENSION output_height; /* scaled image height */ + int out_color_components; /* # of color components in out_color_space */ + int output_components; /* # of color components returned */ + /* output_components is 1 (a colormap index) when quantizing colors; + * otherwise it equals out_color_components. + */ + int rec_outbuf_height; /* min recommended height of scanline buffer */ + /* If the buffer passed to jpeg_read_scanlines() is less than this many rows + * high, space and time will be wasted due to unnecessary data copying. + * Usually rec_outbuf_height will be 1 or 2, at most 4. + */ + + /* When quantizing colors, the output colormap is described by these fields. + * The application can supply a colormap by setting colormap non-NULL before + * calling jpeg_start_decompress; otherwise a colormap is created during + * jpeg_start_decompress or jpeg_start_output. + * The map has out_color_components rows and actual_number_of_colors columns. + */ + int actual_number_of_colors; /* number of entries in use */ + JSAMPARRAY colormap; /* The color map as a 2-D pixel array */ + + /* State variables: these variables indicate the progress of decompression. + * The application may examine these but must not modify them. + */ + + /* Row index of next scanline to be read from jpeg_read_scanlines(). + * Application may use this to control its processing loop, e.g., + * "while (output_scanline < output_height)". + */ + JDIMENSION output_scanline; /* 0 .. output_height-1 */ + + /* Current input scan number and number of iMCU rows completed in scan. + * These indicate the progress of the decompressor input side. + */ + int input_scan_number; /* Number of SOS markers seen so far */ + JDIMENSION input_iMCU_row; /* Number of iMCU rows completed */ + + /* The "output scan number" is the notional scan being displayed by the + * output side. The decompressor will not allow output scan/row number + * to get ahead of input scan/row, but it can fall arbitrarily far behind. + */ + int output_scan_number; /* Nominal scan number being displayed */ + JDIMENSION output_iMCU_row; /* Number of iMCU rows read */ + + /* Current progression status. coef_bits[c][i] indicates the precision + * with which component c's DCT coefficient i (in zigzag order) is known. + * It is -1 when no data has yet been received, otherwise it is the point + * transform (shift) value for the most recent scan of the coefficient + * (thus, 0 at completion of the progression). + * This pointer is NULL when reading a non-progressive file. + */ + int (*coef_bits)[DCTSIZE2]; /* -1 or current Al value for each coef */ + + /* Internal JPEG parameters --- the application usually need not look at + * these fields. Note that the decompressor output side may not use + * any parameters that can change between scans. + */ + + /* Quantization and Huffman tables are carried forward across input + * datastreams when processing abbreviated JPEG datastreams. + */ + + JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; + /* ptrs to coefficient quantization tables, or NULL if not defined */ + + JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + /* These parameters are never carried across datastreams, since they + * are given in SOF/SOS markers or defined to be reset by SOI. + */ + + int data_precision; /* bits of precision in image data */ + + jpeg_component_info * comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + + boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */ + boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */ + + /* These fields record data obtained from optional markers recognized by + * the JPEG library. + */ + boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */ + /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */ + UINT8 JFIF_major_version; /* JFIF version number */ + UINT8 JFIF_minor_version; + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */ + UINT8 Adobe_transform; /* Color transform code from Adobe marker */ + + boolean CCIR601_sampling; /* TRUE=first samples are cosited */ + + /* Aside from the specific data retained from APPn markers known to the + * library, the uninterpreted contents of any or all APPn and COM markers + * can be saved in a list for examination by the application. + */ + jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */ + + /* Remaining fields are known throughout decompressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during decompression startup + */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + + int min_DCT_scaled_size; /* smallest DCT_scaled_size of any component */ + + JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */ + /* The coefficient controller's input and output progress is measured in + * units of "iMCU" (interleaved MCU) rows. These are the same as MCU rows + * in fully interleaved JPEG scans, but are used whether the scan is + * interleaved or not. We define an iMCU row as v_samp_factor DCT block + * rows of each component. Therefore, the IDCT output contains + * v_samp_factor*DCT_scaled_size sample rows of a component per iMCU row. + */ + + JSAMPLE * sample_range_limit; /* table for fast range-limiting */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + * Note that the decompressor output side must not use these fields. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of DCT blocks per MCU */ + int MCU_membership[D_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th block in an MCU */ + + int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + + /* This field is shared between entropy decoder and marker parser. + * It is either zero or the code of a JPEG marker that has been + * read from the data source, but has not yet been processed. + */ + int unread_marker; + + /* + * Links to decompression subobjects (methods, private variables of modules) + */ + struct jpeg_decomp_master * master; + struct jpeg_d_main_controller * main; + struct jpeg_d_coef_controller * coef; + struct jpeg_d_post_controller * post; + struct jpeg_input_controller * inputctl; + struct jpeg_marker_reader * marker; + struct jpeg_entropy_decoder * entropy; + struct jpeg_inverse_dct * idct; + struct jpeg_upsampler * upsample; + struct jpeg_color_deconverter * cconvert; + struct jpeg_color_quantizer * cquantize; +}; + + +/* "Object" declarations for JPEG modules that may be supplied or called + * directly by the surrounding application. + * As with all objects in the JPEG library, these structs only define the + * publicly visible methods and state variables of a module. Additional + * private fields may exist after the public ones. + */ + + +/* Error handler object */ + +struct jpeg_error_mgr { + /* Error exit handler: does not return to caller */ + JMETHOD(void, error_exit, (j_common_ptr cinfo)); + /* Conditionally emit a trace or warning message */ + JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level)); + /* Routine that actually outputs a trace or error message */ + JMETHOD(void, output_message, (j_common_ptr cinfo)); + /* Format a message string for the most recent JPEG error or message */ + JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer)); +#define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */ + /* Reset error state variables at start of a new image */ + JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo)); + + /* The message ID code and any parameters are saved here. + * A message can have one string parameter or up to 8 int parameters. + */ + int msg_code; +#define JMSG_STR_PARM_MAX 80 + union { + int i[8]; + char s[JMSG_STR_PARM_MAX]; + } msg_parm; + + /* Standard state variables for error facility */ + + int trace_level; /* max msg_level that will be displayed */ + + /* For recoverable corrupt-data errors, we emit a warning message, + * but keep going unless emit_message chooses to abort. emit_message + * should count warnings in num_warnings. The surrounding application + * can check for bad data by seeing if num_warnings is nonzero at the + * end of processing. + */ + long num_warnings; /* number of corrupt-data warnings */ + + /* These fields point to the table(s) of error message strings. + * An application can change the table pointer to switch to a different + * message list (typically, to change the language in which errors are + * reported). Some applications may wish to add additional error codes + * that will be handled by the JPEG library error mechanism; the second + * table pointer is used for this purpose. + * + * First table includes all errors generated by JPEG library itself. + * Error code 0 is reserved for a "no such error string" message. + */ + const char * const * jpeg_message_table; /* Library errors */ + int last_jpeg_message; /* Table contains strings 0..last_jpeg_message */ + /* Second table can be added by application (see cjpeg/djpeg for example). + * It contains strings numbered first_addon_message..last_addon_message. + */ + const char * const * addon_message_table; /* Non-library errors */ + int first_addon_message; /* code for first string in addon table */ + int last_addon_message; /* code for last string in addon table */ +}; + + +/* Progress monitor object */ + +struct jpeg_progress_mgr { + JMETHOD(void, progress_monitor, (j_common_ptr cinfo)); + + long pass_counter; /* work units completed in this pass */ + long pass_limit; /* total number of work units in this pass */ + int completed_passes; /* passes completed so far */ + int total_passes; /* total number of passes expected */ +}; + + +/* Data destination object for compression */ + +struct jpeg_destination_mgr { + JOCTET * next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + + JMETHOD(void, init_destination, (j_compress_ptr cinfo)); + JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo)); + JMETHOD(void, term_destination, (j_compress_ptr cinfo)); +}; + + +/* Data source object for decompression */ + +struct jpeg_source_mgr { + const JOCTET * next_input_byte; /* => next byte to read from buffer */ + size_t bytes_in_buffer; /* # of bytes remaining in buffer */ + + JMETHOD(void, init_source, (j_decompress_ptr cinfo)); + JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo)); + JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes)); + JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired)); + JMETHOD(void, term_source, (j_decompress_ptr cinfo)); +}; + + +/* Memory manager object. + * Allocates "small" objects (a few K total), "large" objects (tens of K), + * and "really big" objects (virtual arrays with backing store if needed). + * The memory manager does not allow individual objects to be freed; rather, + * each created object is assigned to a pool, and whole pools can be freed + * at once. This is faster and more convenient than remembering exactly what + * to free, especially where malloc()/free() are not too speedy. + * NB: alloc routines never return NULL. They exit to error_exit if not + * successful. + */ + +#define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */ +#define JPOOL_IMAGE 1 /* lasts until done with image/datastream */ +#define JPOOL_NUMPOOLS 2 + +typedef struct jvirt_sarray_control * jvirt_sarray_ptr; +typedef struct jvirt_barray_control * jvirt_barray_ptr; + + +struct jpeg_memory_mgr { + /* Method pointers */ + JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id, + size_t sizeofobject)); + JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id, + size_t sizeofobject)); + JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id, + JDIMENSION samplesperrow, + JDIMENSION numrows)); + JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id, + JDIMENSION blocksperrow, + JDIMENSION numrows)); + JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo, + int pool_id, + boolean pre_zero, + JDIMENSION samplesperrow, + JDIMENSION numrows, + JDIMENSION maxaccess)); + JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo, + int pool_id, + boolean pre_zero, + JDIMENSION blocksperrow, + JDIMENSION numrows, + JDIMENSION maxaccess)); + JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo)); + JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo, + jvirt_sarray_ptr ptr, + JDIMENSION start_row, + JDIMENSION num_rows, + boolean writable)); + JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo, + jvirt_barray_ptr ptr, + JDIMENSION start_row, + JDIMENSION num_rows, + boolean writable)); + JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id)); + JMETHOD(void, self_destruct, (j_common_ptr cinfo)); + + /* Limit on memory allocation for this JPEG object. (Note that this is + * merely advisory, not a guaranteed maximum; it only affects the space + * used for virtual-array buffers.) May be changed by outer application + * after creating the JPEG object. + */ + long max_memory_to_use; + + /* Maximum allocation request accepted by alloc_large. */ + long max_alloc_chunk; +}; + + +/* Routine signature for application-supplied marker processing methods. + * Need not pass marker code since it is stored in cinfo->unread_marker. + */ +typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo)); + + +/* Declarations for routines called by application. + * The JPP macro hides prototype parameters from compilers that can't cope. + * Note JPP requires double parentheses. + */ + +#ifdef HAVE_PROTOTYPES +#define JPP(arglist) arglist +#else +#define JPP(arglist) () +#endif + + +/* Short forms of external names for systems with brain-damaged linkers. + * We shorten external names to be unique in the first six letters, which + * is good enough for all known systems. + * (If your compiler itself needs names to be unique in less than 15 + * characters, you are out of luck. Get a better compiler.) + */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_std_error jStdError +#define jpeg_CreateCompress jCreaCompress +#define jpeg_CreateDecompress jCreaDecompress +#define jpeg_destroy_compress jDestCompress +#define jpeg_destroy_decompress jDestDecompress +#define jpeg_stdio_dest jStdDest +#define jpeg_stdio_src jStdSrc +#define jpeg_set_defaults jSetDefaults +#define jpeg_set_colorspace jSetColorspace +#define jpeg_default_colorspace jDefColorspace +#define jpeg_set_quality jSetQuality +#define jpeg_set_linear_quality jSetLQuality +#define jpeg_add_quant_table jAddQuantTable +#define jpeg_quality_scaling jQualityScaling +#define jpeg_simple_progression jSimProgress +#define jpeg_suppress_tables jSuppressTables +#define jpeg_alloc_quant_table jAlcQTable +#define jpeg_alloc_huff_table jAlcHTable +#define jpeg_start_compress jStrtCompress +#define jpeg_write_scanlines jWrtScanlines +#define jpeg_finish_compress jFinCompress +#define jpeg_write_raw_data jWrtRawData +#define jpeg_write_marker jWrtMarker +#define jpeg_write_m_header jWrtMHeader +#define jpeg_write_m_byte jWrtMByte +#define jpeg_write_tables jWrtTables +#define jpeg_read_header jReadHeader +#define jpeg_start_decompress jStrtDecompress +#define jpeg_read_scanlines jReadScanlines +#define jpeg_finish_decompress jFinDecompress +#define jpeg_read_raw_data jReadRawData +#define jpeg_has_multiple_scans jHasMultScn +#define jpeg_start_output jStrtOutput +#define jpeg_finish_output jFinOutput +#define jpeg_input_complete jInComplete +#define jpeg_new_colormap jNewCMap +#define jpeg_consume_input jConsumeInput +#define jpeg_calc_output_dimensions jCalcDimensions +#define jpeg_save_markers jSaveMarkers +#define jpeg_set_marker_processor jSetMarker +#define jpeg_read_coefficients jReadCoefs +#define jpeg_write_coefficients jWrtCoefs +#define jpeg_copy_critical_parameters jCopyCrit +#define jpeg_abort_compress jAbrtCompress +#define jpeg_abort_decompress jAbrtDecompress +#define jpeg_abort jAbort +#define jpeg_destroy jDestroy +#define jpeg_resync_to_restart jResyncRestart +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* Default error-management setup */ +EXTERN(struct jpeg_error_mgr *) jpeg_std_error + JPP((struct jpeg_error_mgr * err)); + +/* Initialization of JPEG compression objects. + * jpeg_create_compress() and jpeg_create_decompress() are the exported + * names that applications should call. These expand to calls on + * jpeg_CreateCompress and jpeg_CreateDecompress with additional information + * passed for version mismatch checking. + * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx. + */ +#define jpeg_create_compress(cinfo) \ + jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \ + (size_t) sizeof(struct jpeg_compress_struct)) +#define jpeg_create_decompress(cinfo) \ + jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \ + (size_t) sizeof(struct jpeg_decompress_struct)) +EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo, + int version, size_t structsize)); +EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo, + int version, size_t structsize)); +/* Destruction of JPEG compression objects */ +EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo)); + +/* Standard data source and destination managers: stdio streams. */ +/* Caller is responsible for opening the file before and closing after. */ +EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile)); +EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile)); + +/* Default parameter setup for compression */ +EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo)); +/* Compression parameter setup aids */ +EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo, + J_COLOR_SPACE colorspace)); +EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality, + boolean force_baseline)); +EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo, + int scale_factor, + boolean force_baseline)); +EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl, + const unsigned int *basic_table, + int scale_factor, + boolean force_baseline)); +EXTERN(int) jpeg_quality_scaling JPP((int quality)); +EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo, + boolean suppress)); +EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo)); +EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo)); + +/* Main entry points for compression */ +EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo, + boolean write_all_tables)); +EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo, + JSAMPARRAY scanlines, + JDIMENSION num_lines)); +EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo)); + +/* Replaces jpeg_write_scanlines when writing raw downsampled data. */ +EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo, + JSAMPIMAGE data, + JDIMENSION num_lines)); + +/* Write a special marker. See libjpeg.doc concerning safe usage. */ +EXTERN(void) jpeg_write_marker + JPP((j_compress_ptr cinfo, int marker, + const JOCTET * dataptr, unsigned int datalen)); +/* Same, but piecemeal. */ +EXTERN(void) jpeg_write_m_header + JPP((j_compress_ptr cinfo, int marker, unsigned int datalen)); +EXTERN(void) jpeg_write_m_byte + JPP((j_compress_ptr cinfo, int val)); + +/* Alternate compression function: just write an abbreviated table file */ +EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo)); + +/* Decompression startup: read start of JPEG datastream to see what's there */ +EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo, + boolean require_image)); +/* Return value is one of: */ +#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */ +#define JPEG_HEADER_OK 1 /* Found valid image datastream */ +#define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream */ +/* If you pass require_image = TRUE (normal case), you need not check for + * a TABLES_ONLY return code; an abbreviated file will cause an error exit. + * JPEG_SUSPENDED is only possible if you use a data source module that can + * give a suspension return (the stdio source module doesn't). + */ + +/* Main entry points for decompression */ +EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo)); +EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo, + JSAMPARRAY scanlines, + JDIMENSION max_lines)); +EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo)); + +/* Replaces jpeg_read_scanlines when reading raw downsampled data. */ +EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo, + JSAMPIMAGE data, + JDIMENSION max_lines)); + +/* Additional entry points for buffered-image mode. */ +EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo)); +EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo, + int scan_number)); +EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo)); +EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo)); +EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo)); +EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo)); +/* Return value is one of: */ +/* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */ +#define JPEG_REACHED_SOS 1 /* Reached start of new scan */ +#define JPEG_REACHED_EOI 2 /* Reached end of image */ +#define JPEG_ROW_COMPLETED 3 /* Completed one iMCU row */ +#define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */ + +/* Precalculate output dimensions for current decompression parameters. */ +EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo)); + +/* Control saving of COM and APPn markers into marker_list. */ +EXTERN(void) jpeg_save_markers + JPP((j_decompress_ptr cinfo, int marker_code, + unsigned int length_limit)); + +/* Install a special processing method for COM or APPn markers. */ +EXTERN(void) jpeg_set_marker_processor + JPP((j_decompress_ptr cinfo, int marker_code, + jpeg_marker_parser_method routine)); + +/* Read or write raw DCT coefficients --- useful for lossless transcoding. */ +EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo)); +EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo, + jvirt_barray_ptr * coef_arrays)); +EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo, + j_compress_ptr dstinfo)); + +/* If you choose to abort compression or decompression before completing + * jpeg_finish_(de)compress, then you need to clean up to release memory, + * temporary files, etc. You can just call jpeg_destroy_(de)compress + * if you're done with the JPEG object, but if you want to clean it up and + * reuse it, call this: + */ +EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo)); + +/* Generic versions of jpeg_abort and jpeg_destroy that work on either + * flavor of JPEG object. These may be more convenient in some places. + */ +EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo)); +EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo)); + +/* Default restart-marker-resync procedure for use by data source modules */ +EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo, + int desired)); + + +/* These marker codes are exported since applications and data source modules + * are likely to want to use them. + */ + +#define JPEG_RST0 0xD0 /* RST0 marker code */ +#define JPEG_EOI 0xD9 /* EOI marker code */ +#define JPEG_APP0 0xE0 /* APP0 marker code */ +#define JPEG_COM 0xFE /* COM marker code */ + + +/* If we have a brain-damaged compiler that emits warnings (or worse, errors) + * for structure definitions that are never filled in, keep it quiet by + * supplying dummy definitions for the various substructures. + */ + +#ifdef INCOMPLETE_TYPES_BROKEN +#ifndef JPEG_INTERNALS /* will be defined in jpegint.h */ +struct jvirt_sarray_control { long dummy; }; +struct jvirt_barray_control { long dummy; }; +struct jpeg_comp_master { long dummy; }; +struct jpeg_c_main_controller { long dummy; }; +struct jpeg_c_prep_controller { long dummy; }; +struct jpeg_c_coef_controller { long dummy; }; +struct jpeg_marker_writer { long dummy; }; +struct jpeg_color_converter { long dummy; }; +struct jpeg_downsampler { long dummy; }; +struct jpeg_forward_dct { long dummy; }; +struct jpeg_entropy_encoder { long dummy; }; +struct jpeg_decomp_master { long dummy; }; +struct jpeg_d_main_controller { long dummy; }; +struct jpeg_d_coef_controller { long dummy; }; +struct jpeg_d_post_controller { long dummy; }; +struct jpeg_input_controller { long dummy; }; +struct jpeg_marker_reader { long dummy; }; +struct jpeg_entropy_decoder { long dummy; }; +struct jpeg_inverse_dct { long dummy; }; +struct jpeg_upsampler { long dummy; }; +struct jpeg_color_deconverter { long dummy; }; +struct jpeg_color_quantizer { long dummy; }; +#endif /* JPEG_INTERNALS */ +#endif /* INCOMPLETE_TYPES_BROKEN */ + + +/* + * The JPEG library modules define JPEG_INTERNALS before including this file. + * The internal structure declarations are read only when that is true. + * Applications using the library should not include jpegint.h, but may wish + * to include jerror.h. + */ + +#ifdef JPEG_INTERNALS +#include "jpegint.h" /* fetch private declarations */ +#include "jerror.h" /* fetch error codes too */ +#endif + +#endif /* JPEGLIB_H */ diff --git a/gtkmm-osx/jpeg-6b/jpegtran.1 b/gtkmm-osx/jpeg-6b/jpegtran.1 new file mode 100644 index 0000000..6de18e2 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jpegtran.1 @@ -0,0 +1,238 @@ +.TH JPEGTRAN 1 "3 August 1997" +.SH NAME +jpegtran \- lossless transformation of JPEG files +.SH SYNOPSIS +.B jpegtran +[ +.I options +] +[ +.I filename +] +.LP +.SH DESCRIPTION +.LP +.B jpegtran +performs various useful transformations of JPEG files. +It can translate the coded representation from one variant of JPEG to another, +for example from baseline JPEG to progressive JPEG or vice versa. It can also +perform some rearrangements of the image data, for example turning an image +from landscape to portrait format by rotation. +.PP +.B jpegtran +works by rearranging the compressed data (DCT coefficients), without +ever fully decoding the image. Therefore, its transformations are lossless: +there is no image degradation at all, which would not be true if you used +.B djpeg +followed by +.B cjpeg +to accomplish the same conversion. But by the same token, +.B jpegtran +cannot perform lossy operations such as changing the image quality. +.PP +.B jpegtran +reads the named JPEG/JFIF file, or the standard input if no file is +named, and produces a JPEG/JFIF file on the standard output. +.SH OPTIONS +All switch names may be abbreviated; for example, +.B \-optimize +may be written +.B \-opt +or +.BR \-o . +Upper and lower case are equivalent. +British spellings are also accepted (e.g., +.BR \-optimise ), +though for brevity these are not mentioned below. +.PP +To specify the coded JPEG representation used in the output file, +.B jpegtran +accepts a subset of the switches recognized by +.BR cjpeg : +.TP +.B \-optimize +Perform optimization of entropy encoding parameters. +.TP +.B \-progressive +Create progressive JPEG file. +.TP +.BI \-restart " N" +Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is +attached to the number. +.TP +.BI \-scans " file" +Use the scan script given in the specified text file. +.PP +See +.BR cjpeg (1) +for more details about these switches. +If you specify none of these switches, you get a plain baseline-JPEG output +file. The quality setting and so forth are determined by the input file. +.PP +The image can be losslessly transformed by giving one of these switches: +.TP +.B \-flip horizontal +Mirror image horizontally (left-right). +.TP +.B \-flip vertical +Mirror image vertically (top-bottom). +.TP +.B \-rotate 90 +Rotate image 90 degrees clockwise. +.TP +.B \-rotate 180 +Rotate image 180 degrees. +.TP +.B \-rotate 270 +Rotate image 270 degrees clockwise (or 90 ccw). +.TP +.B \-transpose +Transpose image (across UL-to-LR axis). +.TP +.B \-transverse +Transverse transpose (across UR-to-LL axis). +.PP +The transpose transformation has no restrictions regarding image dimensions. +The other transformations operate rather oddly if the image dimensions are not +a multiple of the iMCU size (usually 8 or 16 pixels), because they can only +transform complete blocks of DCT coefficient data in the desired way. +.PP +.BR jpegtran 's +default behavior when transforming an odd-size image is designed +to preserve exact reversibility and mathematical consistency of the +transformation set. As stated, transpose is able to flip the entire image +area. Horizontal mirroring leaves any partial iMCU column at the right edge +untouched, but is able to flip all rows of the image. Similarly, vertical +mirroring leaves any partial iMCU row at the bottom edge untouched, but is +able to flip all columns. The other transforms can be built up as sequences +of transpose and flip operations; for consistency, their actions on edge +pixels are defined to be the same as the end result of the corresponding +transpose-and-flip sequence. +.PP +For practical use, you may prefer to discard any untransformable edge pixels +rather than having a strange-looking strip along the right and/or bottom edges +of a transformed image. To do this, add the +.B \-trim +switch: +.TP +.B \-trim +Drop non-transformable edge blocks. +.PP +Obviously, a transformation with +.B \-trim +is not reversible, so strictly speaking +.B jpegtran +with this switch is not lossless. Also, the expected mathematical +equivalences between the transformations no longer hold. For example, +.B \-rot 270 -trim +trims only the bottom edge, but +.B \-rot 90 -trim +followed by +.B \-rot 180 -trim +trims both edges. +.PP +Another not-strictly-lossless transformation switch is: +.TP +.B \-grayscale +Force grayscale output. +.PP +This option discards the chrominance channels if the input image is YCbCr +(ie, a standard color JPEG), resulting in a grayscale JPEG file. The +luminance channel is preserved exactly, so this is a better method of reducing +to grayscale than decompression, conversion, and recompression. This switch +is particularly handy for fixing a monochrome picture that was mistakenly +encoded as a color JPEG. (In such a case, the space savings from getting rid +of the near-empty chroma channels won't be large; but the decoding time for +a grayscale JPEG is substantially less than that for a color JPEG.) +.PP +.B jpegtran +also recognizes these switches that control what to do with "extra" markers, +such as comment blocks: +.TP +.B \-copy none +Copy no extra markers from source file. This setting suppresses all +comments and other excess baggage present in the source file. +.TP +.B \-copy comments +Copy only comment markers. This setting copies comments from the source file, +but discards any other inessential data. +.TP +.B \-copy all +Copy all extra markers. This setting preserves miscellaneous markers +found in the source file, such as JFIF thumbnails and Photoshop settings. +In some files these extra markers can be sizable. +.PP +The default behavior is +.BR "\-copy comments" . +(Note: in IJG releases v6 and v6a, +.B jpegtran +always did the equivalent of +.BR "\-copy none" .) +.PP +Additional switches recognized by jpegtran are: +.TP +.BI \-maxmemory " N" +Set limit for amount of memory to use in processing large images. Value is +in thousands of bytes, or millions of bytes if "M" is attached to the +number. For example, +.B \-max 4m +selects 4000000 bytes. If more space is needed, temporary files will be used. +.TP +.BI \-outfile " name" +Send output image to the named file, not to standard output. +.TP +.B \-verbose +Enable debug printout. More +.BR \-v 's +give more output. Also, version information is printed at startup. +.TP +.B \-debug +Same as +.BR \-verbose . +.SH EXAMPLES +.LP +This example converts a baseline JPEG file to progressive form: +.IP +.B jpegtran \-progressive +.I foo.jpg +.B > +.I fooprog.jpg +.PP +This example rotates an image 90 degrees clockwise, discarding any +unrotatable edge pixels: +.IP +.B jpegtran \-rot 90 -trim +.I foo.jpg +.B > +.I foo90.jpg +.SH ENVIRONMENT +.TP +.B JPEGMEM +If this environment variable is set, its value is the default memory limit. +The value is specified as described for the +.B \-maxmemory +switch. +.B JPEGMEM +overrides the default value specified when the program was compiled, and +itself is overridden by an explicit +.BR \-maxmemory . +.SH SEE ALSO +.BR cjpeg (1), +.BR djpeg (1), +.BR rdjpgcom (1), +.BR wrjpgcom (1) +.br +Wallace, Gregory K. "The JPEG Still Picture Compression Standard", +Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. +.SH AUTHOR +Independent JPEG Group +.SH BUGS +Arithmetic coding is not supported for legal reasons. +.PP +The transform options can't transform odd-size images perfectly. Use +.B \-trim +if you don't like the results without it. +.PP +The entire image is read into memory and then written out again, even in +cases where this isn't really necessary. Expect swapping on large images, +especially when using the more complex transform options. diff --git a/gtkmm-osx/jpeg-6b/jpegtran.c b/gtkmm-osx/jpeg-6b/jpegtran.c new file mode 100644 index 0000000..20ef111 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jpegtran.c @@ -0,0 +1,504 @@ +/* + * jpegtran.c + * + * Copyright (C) 1995-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a command-line user interface for JPEG transcoding. + * It is very similar to cjpeg.c, but provides lossless transcoding between + * different JPEG file formats. It also provides some lossless and sort-of- + * lossless transformations of JPEG data. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ +#include "transupp.h" /* Support routines for jpegtran */ +#include "jversion.h" /* for version message */ + +#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ +#ifdef __MWERKS__ +#include /* Metrowerks needs this */ +#include /* ... and this */ +#endif +#ifdef THINK_C +#include /* Think declares it here */ +#endif +#endif + + +/* + * Argument-parsing code. + * The switch parser is designed to be useful with DOS-style command line + * syntax, ie, intermixed switches and file names, where only the switches + * to the left of a given file name affect processing of that file. + * The main program in this file doesn't actually use this capability... + */ + + +static const char * progname; /* program name for error messages */ +static char * outfilename; /* for -outfile switch */ +static JCOPY_OPTION copyoption; /* -copy switch */ +static jpeg_transform_info transformoption; /* image transformation options */ + + +LOCAL(void) +usage (void) +/* complain about bad command line */ +{ + fprintf(stderr, "usage: %s [switches] ", progname); +#ifdef TWO_FILE_COMMANDLINE + fprintf(stderr, "inputfile outputfile\n"); +#else + fprintf(stderr, "[inputfile]\n"); +#endif + + fprintf(stderr, "Switches (names may be abbreviated):\n"); + fprintf(stderr, " -copy none Copy no extra markers from source file\n"); + fprintf(stderr, " -copy comments Copy only comment markers (default)\n"); + fprintf(stderr, " -copy all Copy all extra markers\n"); +#ifdef ENTROPY_OPT_SUPPORTED + fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n"); +#endif +#ifdef C_PROGRESSIVE_SUPPORTED + fprintf(stderr, " -progressive Create progressive JPEG file\n"); +#endif +#if TRANSFORMS_SUPPORTED + fprintf(stderr, "Switches for modifying the image:\n"); + fprintf(stderr, " -grayscale Reduce to grayscale (omit color data)\n"); + fprintf(stderr, " -flip [horizontal|vertical] Mirror image (left-right or top-bottom)\n"); + fprintf(stderr, " -rotate [90|180|270] Rotate image (degrees clockwise)\n"); + fprintf(stderr, " -transpose Transpose image\n"); + fprintf(stderr, " -transverse Transverse transpose image\n"); + fprintf(stderr, " -trim Drop non-transformable edge blocks\n"); +#endif /* TRANSFORMS_SUPPORTED */ + fprintf(stderr, "Switches for advanced users:\n"); + fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n"); + fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); + fprintf(stderr, " -outfile name Specify name for output file\n"); + fprintf(stderr, " -verbose or -debug Emit debug output\n"); + fprintf(stderr, "Switches for wizards:\n"); +#ifdef C_ARITH_CODING_SUPPORTED + fprintf(stderr, " -arithmetic Use arithmetic coding\n"); +#endif +#ifdef C_MULTISCAN_FILES_SUPPORTED + fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n"); +#endif + exit(EXIT_FAILURE); +} + + +LOCAL(void) +select_transform (JXFORM_CODE transform) +/* Silly little routine to detect multiple transform options, + * which we can't handle. + */ +{ +#if TRANSFORMS_SUPPORTED + if (transformoption.transform == JXFORM_NONE || + transformoption.transform == transform) { + transformoption.transform = transform; + } else { + fprintf(stderr, "%s: can only do one image transformation at a time\n", + progname); + usage(); + } +#else + fprintf(stderr, "%s: sorry, image transformation was not compiled\n", + progname); + exit(EXIT_FAILURE); +#endif +} + + +LOCAL(int) +parse_switches (j_compress_ptr cinfo, int argc, char **argv, + int last_file_arg_seen, boolean for_real) +/* Parse optional switches. + * Returns argv[] index of first file-name argument (== argc if none). + * Any file names with indexes <= last_file_arg_seen are ignored; + * they have presumably been processed in a previous iteration. + * (Pass 0 for last_file_arg_seen on the first or only iteration.) + * for_real is FALSE on the first (dummy) pass; we may skip any expensive + * processing. + */ +{ + int argn; + char * arg; + boolean simple_progressive; + char * scansarg = NULL; /* saves -scans parm if any */ + + /* Set up default JPEG parameters. */ + simple_progressive = FALSE; + outfilename = NULL; + copyoption = JCOPYOPT_DEFAULT; + transformoption.transform = JXFORM_NONE; + transformoption.trim = FALSE; + transformoption.force_grayscale = FALSE; + cinfo->err->trace_level = 0; + + /* Scan command line options, adjust parameters */ + + for (argn = 1; argn < argc; argn++) { + arg = argv[argn]; + if (*arg != '-') { + /* Not a switch, must be a file name argument */ + if (argn <= last_file_arg_seen) { + outfilename = NULL; /* -outfile applies to just one input file */ + continue; /* ignore this name if previously processed */ + } + break; /* else done parsing switches */ + } + arg++; /* advance past switch marker character */ + + if (keymatch(arg, "arithmetic", 1)) { + /* Use arithmetic coding. */ +#ifdef C_ARITH_CODING_SUPPORTED + cinfo->arith_code = TRUE; +#else + fprintf(stderr, "%s: sorry, arithmetic coding not supported\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else if (keymatch(arg, "copy", 1)) { + /* Select which extra markers to copy. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + if (keymatch(argv[argn], "none", 1)) { + copyoption = JCOPYOPT_NONE; + } else if (keymatch(argv[argn], "comments", 1)) { + copyoption = JCOPYOPT_COMMENTS; + } else if (keymatch(argv[argn], "all", 1)) { + copyoption = JCOPYOPT_ALL; + } else + usage(); + + } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) { + /* Enable debug printouts. */ + /* On first -d, print version identification */ + static boolean printed_version = FALSE; + + if (! printed_version) { + fprintf(stderr, "Independent JPEG Group's JPEGTRAN, version %s\n%s\n", + JVERSION, JCOPYRIGHT); + printed_version = TRUE; + } + cinfo->err->trace_level++; + + } else if (keymatch(arg, "flip", 1)) { + /* Mirror left-right or top-bottom. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + if (keymatch(argv[argn], "horizontal", 1)) + select_transform(JXFORM_FLIP_H); + else if (keymatch(argv[argn], "vertical", 1)) + select_transform(JXFORM_FLIP_V); + else + usage(); + + } else if (keymatch(arg, "grayscale", 1) || keymatch(arg, "greyscale",1)) { + /* Force to grayscale. */ +#if TRANSFORMS_SUPPORTED + transformoption.force_grayscale = TRUE; +#else + select_transform(JXFORM_NONE); /* force an error */ +#endif + + } else if (keymatch(arg, "maxmemory", 3)) { + /* Maximum memory in Kb (or Mb with 'm'). */ + long lval; + char ch = 'x'; + + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) + usage(); + if (ch == 'm' || ch == 'M') + lval *= 1000L; + cinfo->mem->max_memory_to_use = lval * 1000L; + + } else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) { + /* Enable entropy parm optimization. */ +#ifdef ENTROPY_OPT_SUPPORTED + cinfo->optimize_coding = TRUE; +#else + fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else if (keymatch(arg, "outfile", 4)) { + /* Set output file name. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + outfilename = argv[argn]; /* save it away for later use */ + + } else if (keymatch(arg, "progressive", 1)) { + /* Select simple progressive mode. */ +#ifdef C_PROGRESSIVE_SUPPORTED + simple_progressive = TRUE; + /* We must postpone execution until num_components is known. */ +#else + fprintf(stderr, "%s: sorry, progressive output was not compiled\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else if (keymatch(arg, "restart", 1)) { + /* Restart interval in MCU rows (or in MCUs with 'b'). */ + long lval; + char ch = 'x'; + + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) + usage(); + if (lval < 0 || lval > 65535L) + usage(); + if (ch == 'b' || ch == 'B') { + cinfo->restart_interval = (unsigned int) lval; + cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */ + } else { + cinfo->restart_in_rows = (int) lval; + /* restart_interval will be computed during startup */ + } + + } else if (keymatch(arg, "rotate", 2)) { + /* Rotate 90, 180, or 270 degrees (measured clockwise). */ + if (++argn >= argc) /* advance to next argument */ + usage(); + if (keymatch(argv[argn], "90", 2)) + select_transform(JXFORM_ROT_90); + else if (keymatch(argv[argn], "180", 3)) + select_transform(JXFORM_ROT_180); + else if (keymatch(argv[argn], "270", 3)) + select_transform(JXFORM_ROT_270); + else + usage(); + + } else if (keymatch(arg, "scans", 1)) { + /* Set scan script. */ +#ifdef C_MULTISCAN_FILES_SUPPORTED + if (++argn >= argc) /* advance to next argument */ + usage(); + scansarg = argv[argn]; + /* We must postpone reading the file in case -progressive appears. */ +#else + fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else if (keymatch(arg, "transpose", 1)) { + /* Transpose (across UL-to-LR axis). */ + select_transform(JXFORM_TRANSPOSE); + + } else if (keymatch(arg, "transverse", 6)) { + /* Transverse transpose (across UR-to-LL axis). */ + select_transform(JXFORM_TRANSVERSE); + + } else if (keymatch(arg, "trim", 3)) { + /* Trim off any partial edge MCUs that the transform can't handle. */ + transformoption.trim = TRUE; + + } else { + usage(); /* bogus switch */ + } + } + + /* Post-switch-scanning cleanup */ + + if (for_real) { + +#ifdef C_PROGRESSIVE_SUPPORTED + if (simple_progressive) /* process -progressive; -scans can override */ + jpeg_simple_progression(cinfo); +#endif + +#ifdef C_MULTISCAN_FILES_SUPPORTED + if (scansarg != NULL) /* process -scans if it was present */ + if (! read_scan_script(cinfo, scansarg)) + usage(); +#endif + } + + return argn; /* return index of next arg (file name) */ +} + + +/* + * The main program. + */ + +int +main (int argc, char **argv) +{ + struct jpeg_decompress_struct srcinfo; + struct jpeg_compress_struct dstinfo; + struct jpeg_error_mgr jsrcerr, jdsterr; +#ifdef PROGRESS_REPORT + struct cdjpeg_progress_mgr progress; +#endif + jvirt_barray_ptr * src_coef_arrays; + jvirt_barray_ptr * dst_coef_arrays; + int file_index; + FILE * input_file; + FILE * output_file; + + /* On Mac, fetch a command line. */ +#ifdef USE_CCOMMAND + argc = ccommand(&argv); +#endif + + progname = argv[0]; + if (progname == NULL || progname[0] == 0) + progname = "jpegtran"; /* in case C library doesn't provide it */ + + /* Initialize the JPEG decompression object with default error handling. */ + srcinfo.err = jpeg_std_error(&jsrcerr); + jpeg_create_decompress(&srcinfo); + /* Initialize the JPEG compression object with default error handling. */ + dstinfo.err = jpeg_std_error(&jdsterr); + jpeg_create_compress(&dstinfo); + + /* Now safe to enable signal catcher. + * Note: we assume only the decompression object will have virtual arrays. + */ +#ifdef NEED_SIGNAL_CATCHER + enable_signal_catcher((j_common_ptr) &srcinfo); +#endif + + /* Scan command line to find file names. + * It is convenient to use just one switch-parsing routine, but the switch + * values read here are mostly ignored; we will rescan the switches after + * opening the input file. Also note that most of the switches affect the + * destination JPEG object, so we parse into that and then copy over what + * needs to affects the source too. + */ + + file_index = parse_switches(&dstinfo, argc, argv, 0, FALSE); + jsrcerr.trace_level = jdsterr.trace_level; + srcinfo.mem->max_memory_to_use = dstinfo.mem->max_memory_to_use; + +#ifdef TWO_FILE_COMMANDLINE + /* Must have either -outfile switch or explicit output file name */ + if (outfilename == NULL) { + if (file_index != argc-2) { + fprintf(stderr, "%s: must name one input and one output file\n", + progname); + usage(); + } + outfilename = argv[file_index+1]; + } else { + if (file_index != argc-1) { + fprintf(stderr, "%s: must name one input and one output file\n", + progname); + usage(); + } + } +#else + /* Unix style: expect zero or one file name */ + if (file_index < argc-1) { + fprintf(stderr, "%s: only one input file\n", progname); + usage(); + } +#endif /* TWO_FILE_COMMANDLINE */ + + /* Open the input file. */ + if (file_index < argc) { + if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]); + exit(EXIT_FAILURE); + } + } else { + /* default input file is stdin */ + input_file = read_stdin(); + } + + /* Open the output file. */ + if (outfilename != NULL) { + if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, outfilename); + exit(EXIT_FAILURE); + } + } else { + /* default output file is stdout */ + output_file = write_stdout(); + } + +#ifdef PROGRESS_REPORT + start_progress_monitor((j_common_ptr) &dstinfo, &progress); +#endif + + /* Specify data source for decompression */ + jpeg_stdio_src(&srcinfo, input_file); + + /* Enable saving of extra markers that we want to copy */ + jcopy_markers_setup(&srcinfo, copyoption); + + /* Read file header */ + (void) jpeg_read_header(&srcinfo, TRUE); + + /* Any space needed by a transform option must be requested before + * jpeg_read_coefficients so that memory allocation will be done right. + */ +#if TRANSFORMS_SUPPORTED + jtransform_request_workspace(&srcinfo, &transformoption); +#endif + + /* Read source file as DCT coefficients */ + src_coef_arrays = jpeg_read_coefficients(&srcinfo); + + /* Initialize destination compression parameters from source values */ + jpeg_copy_critical_parameters(&srcinfo, &dstinfo); + + /* Adjust destination parameters if required by transform options; + * also find out which set of coefficient arrays will hold the output. + */ +#if TRANSFORMS_SUPPORTED + dst_coef_arrays = jtransform_adjust_parameters(&srcinfo, &dstinfo, + src_coef_arrays, + &transformoption); +#else + dst_coef_arrays = src_coef_arrays; +#endif + + /* Adjust default compression parameters by re-parsing the options */ + file_index = parse_switches(&dstinfo, argc, argv, 0, TRUE); + + /* Specify data destination for compression */ + jpeg_stdio_dest(&dstinfo, output_file); + + /* Start compressor (note no image data is actually written here) */ + jpeg_write_coefficients(&dstinfo, dst_coef_arrays); + + /* Copy to the output file any extra markers that we want to preserve */ + jcopy_markers_execute(&srcinfo, &dstinfo, copyoption); + + /* Execute image transformation, if any */ +#if TRANSFORMS_SUPPORTED + jtransform_execute_transformation(&srcinfo, &dstinfo, + src_coef_arrays, + &transformoption); +#endif + + /* Finish compression and release memory */ + jpeg_finish_compress(&dstinfo); + jpeg_destroy_compress(&dstinfo); + (void) jpeg_finish_decompress(&srcinfo); + jpeg_destroy_decompress(&srcinfo); + + /* Close files, if we opened them */ + if (input_file != stdin) + fclose(input_file); + if (output_file != stdout) + fclose(output_file); + +#ifdef PROGRESS_REPORT + end_progress_monitor((j_common_ptr) &dstinfo); +#endif + + /* All done. */ + exit(jsrcerr.num_warnings + jdsterr.num_warnings ?EXIT_WARNING:EXIT_SUCCESS); + return 0; /* suppress no-return-value warnings */ +} diff --git a/gtkmm-osx/jpeg-6b/jquant1.c b/gtkmm-osx/jpeg-6b/jquant1.c new file mode 100644 index 0000000..b2f96aa --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jquant1.c @@ -0,0 +1,856 @@ +/* + * jquant1.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains 1-pass color quantization (color mapping) routines. + * These routines provide mapping to a fixed color map using equally spaced + * color values. Optional Floyd-Steinberg or ordered dithering is available. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +#ifdef QUANT_1PASS_SUPPORTED + + +/* + * The main purpose of 1-pass quantization is to provide a fast, if not very + * high quality, colormapped output capability. A 2-pass quantizer usually + * gives better visual quality; however, for quantized grayscale output this + * quantizer is perfectly adequate. Dithering is highly recommended with this + * quantizer, though you can turn it off if you really want to. + * + * In 1-pass quantization the colormap must be chosen in advance of seeing the + * image. We use a map consisting of all combinations of Ncolors[i] color + * values for the i'th component. The Ncolors[] values are chosen so that + * their product, the total number of colors, is no more than that requested. + * (In most cases, the product will be somewhat less.) + * + * Since the colormap is orthogonal, the representative value for each color + * component can be determined without considering the other components; + * then these indexes can be combined into a colormap index by a standard + * N-dimensional-array-subscript calculation. Most of the arithmetic involved + * can be precalculated and stored in the lookup table colorindex[]. + * colorindex[i][j] maps pixel value j in component i to the nearest + * representative value (grid plane) for that component; this index is + * multiplied by the array stride for component i, so that the + * index of the colormap entry closest to a given pixel value is just + * sum( colorindex[component-number][pixel-component-value] ) + * Aside from being fast, this scheme allows for variable spacing between + * representative values with no additional lookup cost. + * + * If gamma correction has been applied in color conversion, it might be wise + * to adjust the color grid spacing so that the representative colors are + * equidistant in linear space. At this writing, gamma correction is not + * implemented by jdcolor, so nothing is done here. + */ + + +/* Declarations for ordered dithering. + * + * We use a standard 16x16 ordered dither array. The basic concept of ordered + * dithering is described in many references, for instance Dale Schumacher's + * chapter II.2 of Graphics Gems II (James Arvo, ed. Academic Press, 1991). + * In place of Schumacher's comparisons against a "threshold" value, we add a + * "dither" value to the input pixel and then round the result to the nearest + * output value. The dither value is equivalent to (0.5 - threshold) times + * the distance between output values. For ordered dithering, we assume that + * the output colors are equally spaced; if not, results will probably be + * worse, since the dither may be too much or too little at a given point. + * + * The normal calculation would be to form pixel value + dither, range-limit + * this to 0..MAXJSAMPLE, and then index into the colorindex table as usual. + * We can skip the separate range-limiting step by extending the colorindex + * table in both directions. + */ + +#define ODITHER_SIZE 16 /* dimension of dither matrix */ +/* NB: if ODITHER_SIZE is not a power of 2, ODITHER_MASK uses will break */ +#define ODITHER_CELLS (ODITHER_SIZE*ODITHER_SIZE) /* # cells in matrix */ +#define ODITHER_MASK (ODITHER_SIZE-1) /* mask for wrapping around counters */ + +typedef int ODITHER_MATRIX[ODITHER_SIZE][ODITHER_SIZE]; +typedef int (*ODITHER_MATRIX_PTR)[ODITHER_SIZE]; + +static const UINT8 base_dither_matrix[ODITHER_SIZE][ODITHER_SIZE] = { + /* Bayer's order-4 dither array. Generated by the code given in + * Stephen Hawley's article "Ordered Dithering" in Graphics Gems I. + * The values in this array must range from 0 to ODITHER_CELLS-1. + */ + { 0,192, 48,240, 12,204, 60,252, 3,195, 51,243, 15,207, 63,255 }, + { 128, 64,176,112,140, 76,188,124,131, 67,179,115,143, 79,191,127 }, + { 32,224, 16,208, 44,236, 28,220, 35,227, 19,211, 47,239, 31,223 }, + { 160, 96,144, 80,172,108,156, 92,163, 99,147, 83,175,111,159, 95 }, + { 8,200, 56,248, 4,196, 52,244, 11,203, 59,251, 7,199, 55,247 }, + { 136, 72,184,120,132, 68,180,116,139, 75,187,123,135, 71,183,119 }, + { 40,232, 24,216, 36,228, 20,212, 43,235, 27,219, 39,231, 23,215 }, + { 168,104,152, 88,164,100,148, 84,171,107,155, 91,167,103,151, 87 }, + { 2,194, 50,242, 14,206, 62,254, 1,193, 49,241, 13,205, 61,253 }, + { 130, 66,178,114,142, 78,190,126,129, 65,177,113,141, 77,189,125 }, + { 34,226, 18,210, 46,238, 30,222, 33,225, 17,209, 45,237, 29,221 }, + { 162, 98,146, 82,174,110,158, 94,161, 97,145, 81,173,109,157, 93 }, + { 10,202, 58,250, 6,198, 54,246, 9,201, 57,249, 5,197, 53,245 }, + { 138, 74,186,122,134, 70,182,118,137, 73,185,121,133, 69,181,117 }, + { 42,234, 26,218, 38,230, 22,214, 41,233, 25,217, 37,229, 21,213 }, + { 170,106,154, 90,166,102,150, 86,169,105,153, 89,165,101,149, 85 } +}; + + +/* Declarations for Floyd-Steinberg dithering. + * + * Errors are accumulated into the array fserrors[], at a resolution of + * 1/16th of a pixel count. The error at a given pixel is propagated + * to its not-yet-processed neighbors using the standard F-S fractions, + * ... (here) 7/16 + * 3/16 5/16 1/16 + * We work left-to-right on even rows, right-to-left on odd rows. + * + * We can get away with a single array (holding one row's worth of errors) + * by using it to store the current row's errors at pixel columns not yet + * processed, but the next row's errors at columns already processed. We + * need only a few extra variables to hold the errors immediately around the + * current column. (If we are lucky, those variables are in registers, but + * even if not, they're probably cheaper to access than array elements are.) + * + * The fserrors[] array is indexed [component#][position]. + * We provide (#columns + 2) entries per component; the extra entry at each + * end saves us from special-casing the first and last pixels. + * + * Note: on a wide image, we might not have enough room in a PC's near data + * segment to hold the error array; so it is allocated with alloc_large. + */ + +#if BITS_IN_JSAMPLE == 8 +typedef INT16 FSERROR; /* 16 bits should be enough */ +typedef int LOCFSERROR; /* use 'int' for calculation temps */ +#else +typedef INT32 FSERROR; /* may need more than 16 bits */ +typedef INT32 LOCFSERROR; /* be sure calculation temps are big enough */ +#endif + +typedef FSERROR FAR *FSERRPTR; /* pointer to error array (in FAR storage!) */ + + +/* Private subobject */ + +#define MAX_Q_COMPS 4 /* max components I can handle */ + +typedef struct { + struct jpeg_color_quantizer pub; /* public fields */ + + /* Initially allocated colormap is saved here */ + JSAMPARRAY sv_colormap; /* The color map as a 2-D pixel array */ + int sv_actual; /* number of entries in use */ + + JSAMPARRAY colorindex; /* Precomputed mapping for speed */ + /* colorindex[i][j] = index of color closest to pixel value j in component i, + * premultiplied as described above. Since colormap indexes must fit into + * JSAMPLEs, the entries of this array will too. + */ + boolean is_padded; /* is the colorindex padded for odither? */ + + int Ncolors[MAX_Q_COMPS]; /* # of values alloced to each component */ + + /* Variables for ordered dithering */ + int row_index; /* cur row's vertical index in dither matrix */ + ODITHER_MATRIX_PTR odither[MAX_Q_COMPS]; /* one dither array per component */ + + /* Variables for Floyd-Steinberg dithering */ + FSERRPTR fserrors[MAX_Q_COMPS]; /* accumulated errors */ + boolean on_odd_row; /* flag to remember which row we are on */ +} my_cquantizer; + +typedef my_cquantizer * my_cquantize_ptr; + + +/* + * Policy-making subroutines for create_colormap and create_colorindex. + * These routines determine the colormap to be used. The rest of the module + * only assumes that the colormap is orthogonal. + * + * * select_ncolors decides how to divvy up the available colors + * among the components. + * * output_value defines the set of representative values for a component. + * * largest_input_value defines the mapping from input values to + * representative values for a component. + * Note that the latter two routines may impose different policies for + * different components, though this is not currently done. + */ + + +LOCAL(int) +select_ncolors (j_decompress_ptr cinfo, int Ncolors[]) +/* Determine allocation of desired colors to components, */ +/* and fill in Ncolors[] array to indicate choice. */ +/* Return value is total number of colors (product of Ncolors[] values). */ +{ + int nc = cinfo->out_color_components; /* number of color components */ + int max_colors = cinfo->desired_number_of_colors; + int total_colors, iroot, i, j; + boolean changed; + long temp; + static const int RGB_order[3] = { RGB_GREEN, RGB_RED, RGB_BLUE }; + + /* We can allocate at least the nc'th root of max_colors per component. */ + /* Compute floor(nc'th root of max_colors). */ + iroot = 1; + do { + iroot++; + temp = iroot; /* set temp = iroot ** nc */ + for (i = 1; i < nc; i++) + temp *= iroot; + } while (temp <= (long) max_colors); /* repeat till iroot exceeds root */ + iroot--; /* now iroot = floor(root) */ + + /* Must have at least 2 color values per component */ + if (iroot < 2) + ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, (int) temp); + + /* Initialize to iroot color values for each component */ + total_colors = 1; + for (i = 0; i < nc; i++) { + Ncolors[i] = iroot; + total_colors *= iroot; + } + /* We may be able to increment the count for one or more components without + * exceeding max_colors, though we know not all can be incremented. + * Sometimes, the first component can be incremented more than once! + * (Example: for 16 colors, we start at 2*2*2, go to 3*2*2, then 4*2*2.) + * In RGB colorspace, try to increment G first, then R, then B. + */ + do { + changed = FALSE; + for (i = 0; i < nc; i++) { + j = (cinfo->out_color_space == JCS_RGB ? RGB_order[i] : i); + /* calculate new total_colors if Ncolors[j] is incremented */ + temp = total_colors / Ncolors[j]; + temp *= Ncolors[j]+1; /* done in long arith to avoid oflo */ + if (temp > (long) max_colors) + break; /* won't fit, done with this pass */ + Ncolors[j]++; /* OK, apply the increment */ + total_colors = (int) temp; + changed = TRUE; + } + } while (changed); + + return total_colors; +} + + +LOCAL(int) +output_value (j_decompress_ptr cinfo, int ci, int j, int maxj) +/* Return j'th output value, where j will range from 0 to maxj */ +/* The output values must fall in 0..MAXJSAMPLE in increasing order */ +{ + /* We always provide values 0 and MAXJSAMPLE for each component; + * any additional values are equally spaced between these limits. + * (Forcing the upper and lower values to the limits ensures that + * dithering can't produce a color outside the selected gamut.) + */ + return (int) (((INT32) j * MAXJSAMPLE + maxj/2) / maxj); +} + + +LOCAL(int) +largest_input_value (j_decompress_ptr cinfo, int ci, int j, int maxj) +/* Return largest input value that should map to j'th output value */ +/* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */ +{ + /* Breakpoints are halfway between values returned by output_value */ + return (int) (((INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj)); +} + + +/* + * Create the colormap. + */ + +LOCAL(void) +create_colormap (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + JSAMPARRAY colormap; /* Created colormap */ + int total_colors; /* Number of distinct output colors */ + int i,j,k, nci, blksize, blkdist, ptr, val; + + /* Select number of colors for each component */ + total_colors = select_ncolors(cinfo, cquantize->Ncolors); + + /* Report selected color counts */ + if (cinfo->out_color_components == 3) + TRACEMS4(cinfo, 1, JTRC_QUANT_3_NCOLORS, + total_colors, cquantize->Ncolors[0], + cquantize->Ncolors[1], cquantize->Ncolors[2]); + else + TRACEMS1(cinfo, 1, JTRC_QUANT_NCOLORS, total_colors); + + /* Allocate and fill in the colormap. */ + /* The colors are ordered in the map in standard row-major order, */ + /* i.e. rightmost (highest-indexed) color changes most rapidly. */ + + colormap = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) total_colors, (JDIMENSION) cinfo->out_color_components); + + /* blksize is number of adjacent repeated entries for a component */ + /* blkdist is distance between groups of identical entries for a component */ + blkdist = total_colors; + + for (i = 0; i < cinfo->out_color_components; i++) { + /* fill in colormap entries for i'th color component */ + nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ + blksize = blkdist / nci; + for (j = 0; j < nci; j++) { + /* Compute j'th output value (out of nci) for component */ + val = output_value(cinfo, i, j, nci-1); + /* Fill in all colormap entries that have this value of this component */ + for (ptr = j * blksize; ptr < total_colors; ptr += blkdist) { + /* fill in blksize entries beginning at ptr */ + for (k = 0; k < blksize; k++) + colormap[i][ptr+k] = (JSAMPLE) val; + } + } + blkdist = blksize; /* blksize of this color is blkdist of next */ + } + + /* Save the colormap in private storage, + * where it will survive color quantization mode changes. + */ + cquantize->sv_colormap = colormap; + cquantize->sv_actual = total_colors; +} + + +/* + * Create the color index table. + */ + +LOCAL(void) +create_colorindex (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + JSAMPROW indexptr; + int i,j,k, nci, blksize, val, pad; + + /* For ordered dither, we pad the color index tables by MAXJSAMPLE in + * each direction (input index values can be -MAXJSAMPLE .. 2*MAXJSAMPLE). + * This is not necessary in the other dithering modes. However, we + * flag whether it was done in case user changes dithering mode. + */ + if (cinfo->dither_mode == JDITHER_ORDERED) { + pad = MAXJSAMPLE*2; + cquantize->is_padded = TRUE; + } else { + pad = 0; + cquantize->is_padded = FALSE; + } + + cquantize->colorindex = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) (MAXJSAMPLE+1 + pad), + (JDIMENSION) cinfo->out_color_components); + + /* blksize is number of adjacent repeated entries for a component */ + blksize = cquantize->sv_actual; + + for (i = 0; i < cinfo->out_color_components; i++) { + /* fill in colorindex entries for i'th color component */ + nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ + blksize = blksize / nci; + + /* adjust colorindex pointers to provide padding at negative indexes. */ + if (pad) + cquantize->colorindex[i] += MAXJSAMPLE; + + /* in loop, val = index of current output value, */ + /* and k = largest j that maps to current val */ + indexptr = cquantize->colorindex[i]; + val = 0; + k = largest_input_value(cinfo, i, 0, nci-1); + for (j = 0; j <= MAXJSAMPLE; j++) { + while (j > k) /* advance val if past boundary */ + k = largest_input_value(cinfo, i, ++val, nci-1); + /* premultiply so that no multiplication needed in main processing */ + indexptr[j] = (JSAMPLE) (val * blksize); + } + /* Pad at both ends if necessary */ + if (pad) + for (j = 1; j <= MAXJSAMPLE; j++) { + indexptr[-j] = indexptr[0]; + indexptr[MAXJSAMPLE+j] = indexptr[MAXJSAMPLE]; + } + } +} + + +/* + * Create an ordered-dither array for a component having ncolors + * distinct output values. + */ + +LOCAL(ODITHER_MATRIX_PTR) +make_odither_array (j_decompress_ptr cinfo, int ncolors) +{ + ODITHER_MATRIX_PTR odither; + int j,k; + INT32 num,den; + + odither = (ODITHER_MATRIX_PTR) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(ODITHER_MATRIX)); + /* The inter-value distance for this color is MAXJSAMPLE/(ncolors-1). + * Hence the dither value for the matrix cell with fill order f + * (f=0..N-1) should be (N-1-2*f)/(2*N) * MAXJSAMPLE/(ncolors-1). + * On 16-bit-int machine, be careful to avoid overflow. + */ + den = 2 * ODITHER_CELLS * ((INT32) (ncolors - 1)); + for (j = 0; j < ODITHER_SIZE; j++) { + for (k = 0; k < ODITHER_SIZE; k++) { + num = ((INT32) (ODITHER_CELLS-1 - 2*((int)base_dither_matrix[j][k]))) + * MAXJSAMPLE; + /* Ensure round towards zero despite C's lack of consistency + * about rounding negative values in integer division... + */ + odither[j][k] = (int) (num<0 ? -((-num)/den) : num/den); + } + } + return odither; +} + + +/* + * Create the ordered-dither tables. + * Components having the same number of representative colors may + * share a dither table. + */ + +LOCAL(void) +create_odither_tables (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + ODITHER_MATRIX_PTR odither; + int i, j, nci; + + for (i = 0; i < cinfo->out_color_components; i++) { + nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ + odither = NULL; /* search for matching prior component */ + for (j = 0; j < i; j++) { + if (nci == cquantize->Ncolors[j]) { + odither = cquantize->odither[j]; + break; + } + } + if (odither == NULL) /* need a new table? */ + odither = make_odither_array(cinfo, nci); + cquantize->odither[i] = odither; + } +} + + +/* + * Map some rows of pixels to the output colormapped representation. + */ + +METHODDEF(void) +color_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* General case, no dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + JSAMPARRAY colorindex = cquantize->colorindex; + register int pixcode, ci; + register JSAMPROW ptrin, ptrout; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + register int nc = cinfo->out_color_components; + + for (row = 0; row < num_rows; row++) { + ptrin = input_buf[row]; + ptrout = output_buf[row]; + for (col = width; col > 0; col--) { + pixcode = 0; + for (ci = 0; ci < nc; ci++) { + pixcode += GETJSAMPLE(colorindex[ci][GETJSAMPLE(*ptrin++)]); + } + *ptrout++ = (JSAMPLE) pixcode; + } + } +} + + +METHODDEF(void) +color_quantize3 (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* Fast path for out_color_components==3, no dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + register int pixcode; + register JSAMPROW ptrin, ptrout; + JSAMPROW colorindex0 = cquantize->colorindex[0]; + JSAMPROW colorindex1 = cquantize->colorindex[1]; + JSAMPROW colorindex2 = cquantize->colorindex[2]; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + ptrin = input_buf[row]; + ptrout = output_buf[row]; + for (col = width; col > 0; col--) { + pixcode = GETJSAMPLE(colorindex0[GETJSAMPLE(*ptrin++)]); + pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*ptrin++)]); + pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*ptrin++)]); + *ptrout++ = (JSAMPLE) pixcode; + } + } +} + + +METHODDEF(void) +quantize_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* General case, with ordered dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + register JSAMPROW input_ptr; + register JSAMPROW output_ptr; + JSAMPROW colorindex_ci; + int * dither; /* points to active row of dither matrix */ + int row_index, col_index; /* current indexes into dither matrix */ + int nc = cinfo->out_color_components; + int ci; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + /* Initialize output values to 0 so can process components separately */ + jzero_far((void FAR *) output_buf[row], + (size_t) (width * SIZEOF(JSAMPLE))); + row_index = cquantize->row_index; + for (ci = 0; ci < nc; ci++) { + input_ptr = input_buf[row] + ci; + output_ptr = output_buf[row]; + colorindex_ci = cquantize->colorindex[ci]; + dither = cquantize->odither[ci][row_index]; + col_index = 0; + + for (col = width; col > 0; col--) { + /* Form pixel value + dither, range-limit to 0..MAXJSAMPLE, + * select output value, accumulate into output code for this pixel. + * Range-limiting need not be done explicitly, as we have extended + * the colorindex table to produce the right answers for out-of-range + * inputs. The maximum dither is +- MAXJSAMPLE; this sets the + * required amount of padding. + */ + *output_ptr += colorindex_ci[GETJSAMPLE(*input_ptr)+dither[col_index]]; + input_ptr += nc; + output_ptr++; + col_index = (col_index + 1) & ODITHER_MASK; + } + } + /* Advance row index for next row */ + row_index = (row_index + 1) & ODITHER_MASK; + cquantize->row_index = row_index; + } +} + + +METHODDEF(void) +quantize3_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* Fast path for out_color_components==3, with ordered dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + register int pixcode; + register JSAMPROW input_ptr; + register JSAMPROW output_ptr; + JSAMPROW colorindex0 = cquantize->colorindex[0]; + JSAMPROW colorindex1 = cquantize->colorindex[1]; + JSAMPROW colorindex2 = cquantize->colorindex[2]; + int * dither0; /* points to active row of dither matrix */ + int * dither1; + int * dither2; + int row_index, col_index; /* current indexes into dither matrix */ + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + row_index = cquantize->row_index; + input_ptr = input_buf[row]; + output_ptr = output_buf[row]; + dither0 = cquantize->odither[0][row_index]; + dither1 = cquantize->odither[1][row_index]; + dither2 = cquantize->odither[2][row_index]; + col_index = 0; + + for (col = width; col > 0; col--) { + pixcode = GETJSAMPLE(colorindex0[GETJSAMPLE(*input_ptr++) + + dither0[col_index]]); + pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*input_ptr++) + + dither1[col_index]]); + pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*input_ptr++) + + dither2[col_index]]); + *output_ptr++ = (JSAMPLE) pixcode; + col_index = (col_index + 1) & ODITHER_MASK; + } + row_index = (row_index + 1) & ODITHER_MASK; + cquantize->row_index = row_index; + } +} + + +METHODDEF(void) +quantize_fs_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* General case, with Floyd-Steinberg dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + register LOCFSERROR cur; /* current error or pixel value */ + LOCFSERROR belowerr; /* error for pixel below cur */ + LOCFSERROR bpreverr; /* error for below/prev col */ + LOCFSERROR bnexterr; /* error for below/next col */ + LOCFSERROR delta; + register FSERRPTR errorptr; /* => fserrors[] at column before current */ + register JSAMPROW input_ptr; + register JSAMPROW output_ptr; + JSAMPROW colorindex_ci; + JSAMPROW colormap_ci; + int pixcode; + int nc = cinfo->out_color_components; + int dir; /* 1 for left-to-right, -1 for right-to-left */ + int dirnc; /* dir * nc */ + int ci; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + JSAMPLE *range_limit = cinfo->sample_range_limit; + SHIFT_TEMPS + + for (row = 0; row < num_rows; row++) { + /* Initialize output values to 0 so can process components separately */ + jzero_far((void FAR *) output_buf[row], + (size_t) (width * SIZEOF(JSAMPLE))); + for (ci = 0; ci < nc; ci++) { + input_ptr = input_buf[row] + ci; + output_ptr = output_buf[row]; + if (cquantize->on_odd_row) { + /* work right to left in this row */ + input_ptr += (width-1) * nc; /* so point to rightmost pixel */ + output_ptr += width-1; + dir = -1; + dirnc = -nc; + errorptr = cquantize->fserrors[ci] + (width+1); /* => entry after last column */ + } else { + /* work left to right in this row */ + dir = 1; + dirnc = nc; + errorptr = cquantize->fserrors[ci]; /* => entry before first column */ + } + colorindex_ci = cquantize->colorindex[ci]; + colormap_ci = cquantize->sv_colormap[ci]; + /* Preset error values: no error propagated to first pixel from left */ + cur = 0; + /* and no error propagated to row below yet */ + belowerr = bpreverr = 0; + + for (col = width; col > 0; col--) { + /* cur holds the error propagated from the previous pixel on the + * current line. Add the error propagated from the previous line + * to form the complete error correction term for this pixel, and + * round the error term (which is expressed * 16) to an integer. + * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct + * for either sign of the error value. + * Note: errorptr points to *previous* column's array entry. + */ + cur = RIGHT_SHIFT(cur + errorptr[dir] + 8, 4); + /* Form pixel value + error, and range-limit to 0..MAXJSAMPLE. + * The maximum error is +- MAXJSAMPLE; this sets the required size + * of the range_limit array. + */ + cur += GETJSAMPLE(*input_ptr); + cur = GETJSAMPLE(range_limit[cur]); + /* Select output value, accumulate into output code for this pixel */ + pixcode = GETJSAMPLE(colorindex_ci[cur]); + *output_ptr += (JSAMPLE) pixcode; + /* Compute actual representation error at this pixel */ + /* Note: we can do this even though we don't have the final */ + /* pixel code, because the colormap is orthogonal. */ + cur -= GETJSAMPLE(colormap_ci[pixcode]); + /* Compute error fractions to be propagated to adjacent pixels. + * Add these into the running sums, and simultaneously shift the + * next-line error sums left by 1 column. + */ + bnexterr = cur; + delta = cur * 2; + cur += delta; /* form error * 3 */ + errorptr[0] = (FSERROR) (bpreverr + cur); + cur += delta; /* form error * 5 */ + bpreverr = belowerr + cur; + belowerr = bnexterr; + cur += delta; /* form error * 7 */ + /* At this point cur contains the 7/16 error value to be propagated + * to the next pixel on the current line, and all the errors for the + * next line have been shifted over. We are therefore ready to move on. + */ + input_ptr += dirnc; /* advance input ptr to next column */ + output_ptr += dir; /* advance output ptr to next column */ + errorptr += dir; /* advance errorptr to current column */ + } + /* Post-loop cleanup: we must unload the final error value into the + * final fserrors[] entry. Note we need not unload belowerr because + * it is for the dummy column before or after the actual array. + */ + errorptr[0] = (FSERROR) bpreverr; /* unload prev err into array */ + } + cquantize->on_odd_row = (cquantize->on_odd_row ? FALSE : TRUE); + } +} + + +/* + * Allocate workspace for Floyd-Steinberg errors. + */ + +LOCAL(void) +alloc_fs_workspace (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + size_t arraysize; + int i; + + arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR)); + for (i = 0; i < cinfo->out_color_components; i++) { + cquantize->fserrors[i] = (FSERRPTR) + (*cinfo->mem->alloc_large)((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize); + } +} + + +/* + * Initialize for one-pass color quantization. + */ + +METHODDEF(void) +start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + size_t arraysize; + int i; + + /* Install my colormap. */ + cinfo->colormap = cquantize->sv_colormap; + cinfo->actual_number_of_colors = cquantize->sv_actual; + + /* Initialize for desired dithering mode. */ + switch (cinfo->dither_mode) { + case JDITHER_NONE: + if (cinfo->out_color_components == 3) + cquantize->pub.color_quantize = color_quantize3; + else + cquantize->pub.color_quantize = color_quantize; + break; + case JDITHER_ORDERED: + if (cinfo->out_color_components == 3) + cquantize->pub.color_quantize = quantize3_ord_dither; + else + cquantize->pub.color_quantize = quantize_ord_dither; + cquantize->row_index = 0; /* initialize state for ordered dither */ + /* If user changed to ordered dither from another mode, + * we must recreate the color index table with padding. + * This will cost extra space, but probably isn't very likely. + */ + if (! cquantize->is_padded) + create_colorindex(cinfo); + /* Create ordered-dither tables if we didn't already. */ + if (cquantize->odither[0] == NULL) + create_odither_tables(cinfo); + break; + case JDITHER_FS: + cquantize->pub.color_quantize = quantize_fs_dither; + cquantize->on_odd_row = FALSE; /* initialize state for F-S dither */ + /* Allocate Floyd-Steinberg workspace if didn't already. */ + if (cquantize->fserrors[0] == NULL) + alloc_fs_workspace(cinfo); + /* Initialize the propagated errors to zero. */ + arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR)); + for (i = 0; i < cinfo->out_color_components; i++) + jzero_far((void FAR *) cquantize->fserrors[i], arraysize); + break; + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + break; + } +} + + +/* + * Finish up at the end of the pass. + */ + +METHODDEF(void) +finish_pass_1_quant (j_decompress_ptr cinfo) +{ + /* no work in 1-pass case */ +} + + +/* + * Switch to a new external colormap between output passes. + * Shouldn't get to this module! + */ + +METHODDEF(void) +new_color_map_1_quant (j_decompress_ptr cinfo) +{ + ERREXIT(cinfo, JERR_MODE_CHANGE); +} + + +/* + * Module initialization routine for 1-pass color quantization. + */ + +GLOBAL(void) +jinit_1pass_quantizer (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize; + + cquantize = (my_cquantize_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_cquantizer)); + cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize; + cquantize->pub.start_pass = start_pass_1_quant; + cquantize->pub.finish_pass = finish_pass_1_quant; + cquantize->pub.new_color_map = new_color_map_1_quant; + cquantize->fserrors[0] = NULL; /* Flag FS workspace not allocated */ + cquantize->odither[0] = NULL; /* Also flag odither arrays not allocated */ + + /* Make sure my internal arrays won't overflow */ + if (cinfo->out_color_components > MAX_Q_COMPS) + ERREXIT1(cinfo, JERR_QUANT_COMPONENTS, MAX_Q_COMPS); + /* Make sure colormap indexes can be represented by JSAMPLEs */ + if (cinfo->desired_number_of_colors > (MAXJSAMPLE+1)) + ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXJSAMPLE+1); + + /* Create the colormap and color index table. */ + create_colormap(cinfo); + create_colorindex(cinfo); + + /* Allocate Floyd-Steinberg workspace now if requested. + * We do this now since it is FAR storage and may affect the memory + * manager's space calculations. If the user changes to FS dither + * mode in a later pass, we will allocate the space then, and will + * possibly overrun the max_memory_to_use setting. + */ + if (cinfo->dither_mode == JDITHER_FS) + alloc_fs_workspace(cinfo); +} + +#endif /* QUANT_1PASS_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/jquant2.c b/gtkmm-osx/jpeg-6b/jquant2.c new file mode 100644 index 0000000..af601e3 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jquant2.c @@ -0,0 +1,1310 @@ +/* + * jquant2.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains 2-pass color quantization (color mapping) routines. + * These routines provide selection of a custom color map for an image, + * followed by mapping of the image to that color map, with optional + * Floyd-Steinberg dithering. + * It is also possible to use just the second pass to map to an arbitrary + * externally-given color map. + * + * Note: ordered dithering is not supported, since there isn't any fast + * way to compute intercolor distances; it's unclear that ordered dither's + * fundamental assumptions even hold with an irregularly spaced color map. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +#ifdef QUANT_2PASS_SUPPORTED + + +/* + * This module implements the well-known Heckbert paradigm for color + * quantization. Most of the ideas used here can be traced back to + * Heckbert's seminal paper + * Heckbert, Paul. "Color Image Quantization for Frame Buffer Display", + * Proc. SIGGRAPH '82, Computer Graphics v.16 #3 (July 1982), pp 297-304. + * + * In the first pass over the image, we accumulate a histogram showing the + * usage count of each possible color. To keep the histogram to a reasonable + * size, we reduce the precision of the input; typical practice is to retain + * 5 or 6 bits per color, so that 8 or 4 different input values are counted + * in the same histogram cell. + * + * Next, the color-selection step begins with a box representing the whole + * color space, and repeatedly splits the "largest" remaining box until we + * have as many boxes as desired colors. Then the mean color in each + * remaining box becomes one of the possible output colors. + * + * The second pass over the image maps each input pixel to the closest output + * color (optionally after applying a Floyd-Steinberg dithering correction). + * This mapping is logically trivial, but making it go fast enough requires + * considerable care. + * + * Heckbert-style quantizers vary a good deal in their policies for choosing + * the "largest" box and deciding where to cut it. The particular policies + * used here have proved out well in experimental comparisons, but better ones + * may yet be found. + * + * In earlier versions of the IJG code, this module quantized in YCbCr color + * space, processing the raw upsampled data without a color conversion step. + * This allowed the color conversion math to be done only once per colormap + * entry, not once per pixel. However, that optimization precluded other + * useful optimizations (such as merging color conversion with upsampling) + * and it also interfered with desired capabilities such as quantizing to an + * externally-supplied colormap. We have therefore abandoned that approach. + * The present code works in the post-conversion color space, typically RGB. + * + * To improve the visual quality of the results, we actually work in scaled + * RGB space, giving G distances more weight than R, and R in turn more than + * B. To do everything in integer math, we must use integer scale factors. + * The 2/3/1 scale factors used here correspond loosely to the relative + * weights of the colors in the NTSC grayscale equation. + * If you want to use this code to quantize a non-RGB color space, you'll + * probably need to change these scale factors. + */ + +#define R_SCALE 2 /* scale R distances by this much */ +#define G_SCALE 3 /* scale G distances by this much */ +#define B_SCALE 1 /* and B by this much */ + +/* Relabel R/G/B as components 0/1/2, respecting the RGB ordering defined + * in jmorecfg.h. As the code stands, it will do the right thing for R,G,B + * and B,G,R orders. If you define some other weird order in jmorecfg.h, + * you'll get compile errors until you extend this logic. In that case + * you'll probably want to tweak the histogram sizes too. + */ + +#if RGB_RED == 0 +#define C0_SCALE R_SCALE +#endif +#if RGB_BLUE == 0 +#define C0_SCALE B_SCALE +#endif +#if RGB_GREEN == 1 +#define C1_SCALE G_SCALE +#endif +#if RGB_RED == 2 +#define C2_SCALE R_SCALE +#endif +#if RGB_BLUE == 2 +#define C2_SCALE B_SCALE +#endif + + +/* + * First we have the histogram data structure and routines for creating it. + * + * The number of bits of precision can be adjusted by changing these symbols. + * We recommend keeping 6 bits for G and 5 each for R and B. + * If you have plenty of memory and cycles, 6 bits all around gives marginally + * better results; if you are short of memory, 5 bits all around will save + * some space but degrade the results. + * To maintain a fully accurate histogram, we'd need to allocate a "long" + * (preferably unsigned long) for each cell. In practice this is overkill; + * we can get by with 16 bits per cell. Few of the cell counts will overflow, + * and clamping those that do overflow to the maximum value will give close- + * enough results. This reduces the recommended histogram size from 256Kb + * to 128Kb, which is a useful savings on PC-class machines. + * (In the second pass the histogram space is re-used for pixel mapping data; + * in that capacity, each cell must be able to store zero to the number of + * desired colors. 16 bits/cell is plenty for that too.) + * Since the JPEG code is intended to run in small memory model on 80x86 + * machines, we can't just allocate the histogram in one chunk. Instead + * of a true 3-D array, we use a row of pointers to 2-D arrays. Each + * pointer corresponds to a C0 value (typically 2^5 = 32 pointers) and + * each 2-D array has 2^6*2^5 = 2048 or 2^6*2^6 = 4096 entries. Note that + * on 80x86 machines, the pointer row is in near memory but the actual + * arrays are in far memory (same arrangement as we use for image arrays). + */ + +#define MAXNUMCOLORS (MAXJSAMPLE+1) /* maximum size of colormap */ + +/* These will do the right thing for either R,G,B or B,G,R color order, + * but you may not like the results for other color orders. + */ +#define HIST_C0_BITS 5 /* bits of precision in R/B histogram */ +#define HIST_C1_BITS 6 /* bits of precision in G histogram */ +#define HIST_C2_BITS 5 /* bits of precision in B/R histogram */ + +/* Number of elements along histogram axes. */ +#define HIST_C0_ELEMS (1<cquantize; + register JSAMPROW ptr; + register histptr histp; + register hist3d histogram = cquantize->histogram; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + ptr = input_buf[row]; + for (col = width; col > 0; col--) { + /* get pixel value and index into the histogram */ + histp = & histogram[GETJSAMPLE(ptr[0]) >> C0_SHIFT] + [GETJSAMPLE(ptr[1]) >> C1_SHIFT] + [GETJSAMPLE(ptr[2]) >> C2_SHIFT]; + /* increment, check for overflow and undo increment if so. */ + if (++(*histp) <= 0) + (*histp)--; + ptr += 3; + } + } +} + + +/* + * Next we have the really interesting routines: selection of a colormap + * given the completed histogram. + * These routines work with a list of "boxes", each representing a rectangular + * subset of the input color space (to histogram precision). + */ + +typedef struct { + /* The bounds of the box (inclusive); expressed as histogram indexes */ + int c0min, c0max; + int c1min, c1max; + int c2min, c2max; + /* The volume (actually 2-norm) of the box */ + INT32 volume; + /* The number of nonzero histogram cells within this box */ + long colorcount; +} box; + +typedef box * boxptr; + + +LOCAL(boxptr) +find_biggest_color_pop (boxptr boxlist, int numboxes) +/* Find the splittable box with the largest color population */ +/* Returns NULL if no splittable boxes remain */ +{ + register boxptr boxp; + register int i; + register long maxc = 0; + boxptr which = NULL; + + for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { + if (boxp->colorcount > maxc && boxp->volume > 0) { + which = boxp; + maxc = boxp->colorcount; + } + } + return which; +} + + +LOCAL(boxptr) +find_biggest_volume (boxptr boxlist, int numboxes) +/* Find the splittable box with the largest (scaled) volume */ +/* Returns NULL if no splittable boxes remain */ +{ + register boxptr boxp; + register int i; + register INT32 maxv = 0; + boxptr which = NULL; + + for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { + if (boxp->volume > maxv) { + which = boxp; + maxv = boxp->volume; + } + } + return which; +} + + +LOCAL(void) +update_box (j_decompress_ptr cinfo, boxptr boxp) +/* Shrink the min/max bounds of a box to enclose only nonzero elements, */ +/* and recompute its volume and population */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + histptr histp; + int c0,c1,c2; + int c0min,c0max,c1min,c1max,c2min,c2max; + INT32 dist0,dist1,dist2; + long ccount; + + c0min = boxp->c0min; c0max = boxp->c0max; + c1min = boxp->c1min; c1max = boxp->c1max; + c2min = boxp->c2min; c2max = boxp->c2max; + + if (c0max > c0min) + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c0min = c0min = c0; + goto have_c0min; + } + } + have_c0min: + if (c0max > c0min) + for (c0 = c0max; c0 >= c0min; c0--) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c0max = c0max = c0; + goto have_c0max; + } + } + have_c0max: + if (c1max > c1min) + for (c1 = c1min; c1 <= c1max; c1++) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c1min = c1min = c1; + goto have_c1min; + } + } + have_c1min: + if (c1max > c1min) + for (c1 = c1max; c1 >= c1min; c1--) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c1max = c1max = c1; + goto have_c1max; + } + } + have_c1max: + if (c2max > c2min) + for (c2 = c2min; c2 <= c2max; c2++) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1min][c2]; + for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) + if (*histp != 0) { + boxp->c2min = c2min = c2; + goto have_c2min; + } + } + have_c2min: + if (c2max > c2min) + for (c2 = c2max; c2 >= c2min; c2--) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1min][c2]; + for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) + if (*histp != 0) { + boxp->c2max = c2max = c2; + goto have_c2max; + } + } + have_c2max: + + /* Update box volume. + * We use 2-norm rather than real volume here; this biases the method + * against making long narrow boxes, and it has the side benefit that + * a box is splittable iff norm > 0. + * Since the differences are expressed in histogram-cell units, + * we have to shift back to JSAMPLE units to get consistent distances; + * after which, we scale according to the selected distance scale factors. + */ + dist0 = ((c0max - c0min) << C0_SHIFT) * C0_SCALE; + dist1 = ((c1max - c1min) << C1_SHIFT) * C1_SCALE; + dist2 = ((c2max - c2min) << C2_SHIFT) * C2_SCALE; + boxp->volume = dist0*dist0 + dist1*dist1 + dist2*dist2; + + /* Now scan remaining volume of box and compute population */ + ccount = 0; + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++, histp++) + if (*histp != 0) { + ccount++; + } + } + boxp->colorcount = ccount; +} + + +LOCAL(int) +median_cut (j_decompress_ptr cinfo, boxptr boxlist, int numboxes, + int desired_colors) +/* Repeatedly select and split the largest box until we have enough boxes */ +{ + int n,lb; + int c0,c1,c2,cmax; + register boxptr b1,b2; + + while (numboxes < desired_colors) { + /* Select box to split. + * Current algorithm: by population for first half, then by volume. + */ + if (numboxes*2 <= desired_colors) { + b1 = find_biggest_color_pop(boxlist, numboxes); + } else { + b1 = find_biggest_volume(boxlist, numboxes); + } + if (b1 == NULL) /* no splittable boxes left! */ + break; + b2 = &boxlist[numboxes]; /* where new box will go */ + /* Copy the color bounds to the new box. */ + b2->c0max = b1->c0max; b2->c1max = b1->c1max; b2->c2max = b1->c2max; + b2->c0min = b1->c0min; b2->c1min = b1->c1min; b2->c2min = b1->c2min; + /* Choose which axis to split the box on. + * Current algorithm: longest scaled axis. + * See notes in update_box about scaling distances. + */ + c0 = ((b1->c0max - b1->c0min) << C0_SHIFT) * C0_SCALE; + c1 = ((b1->c1max - b1->c1min) << C1_SHIFT) * C1_SCALE; + c2 = ((b1->c2max - b1->c2min) << C2_SHIFT) * C2_SCALE; + /* We want to break any ties in favor of green, then red, blue last. + * This code does the right thing for R,G,B or B,G,R color orders only. + */ +#if RGB_RED == 0 + cmax = c1; n = 1; + if (c0 > cmax) { cmax = c0; n = 0; } + if (c2 > cmax) { n = 2; } +#else + cmax = c1; n = 1; + if (c2 > cmax) { cmax = c2; n = 2; } + if (c0 > cmax) { n = 0; } +#endif + /* Choose split point along selected axis, and update box bounds. + * Current algorithm: split at halfway point. + * (Since the box has been shrunk to minimum volume, + * any split will produce two nonempty subboxes.) + * Note that lb value is max for lower box, so must be < old max. + */ + switch (n) { + case 0: + lb = (b1->c0max + b1->c0min) / 2; + b1->c0max = lb; + b2->c0min = lb+1; + break; + case 1: + lb = (b1->c1max + b1->c1min) / 2; + b1->c1max = lb; + b2->c1min = lb+1; + break; + case 2: + lb = (b1->c2max + b1->c2min) / 2; + b1->c2max = lb; + b2->c2min = lb+1; + break; + } + /* Update stats for boxes */ + update_box(cinfo, b1); + update_box(cinfo, b2); + numboxes++; + } + return numboxes; +} + + +LOCAL(void) +compute_color (j_decompress_ptr cinfo, boxptr boxp, int icolor) +/* Compute representative color for a box, put it in colormap[icolor] */ +{ + /* Current algorithm: mean weighted by pixels (not colors) */ + /* Note it is important to get the rounding correct! */ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + histptr histp; + int c0,c1,c2; + int c0min,c0max,c1min,c1max,c2min,c2max; + long count; + long total = 0; + long c0total = 0; + long c1total = 0; + long c2total = 0; + + c0min = boxp->c0min; c0max = boxp->c0max; + c1min = boxp->c1min; c1max = boxp->c1max; + c2min = boxp->c2min; c2max = boxp->c2max; + + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) { + if ((count = *histp++) != 0) { + total += count; + c0total += ((c0 << C0_SHIFT) + ((1<>1)) * count; + c1total += ((c1 << C1_SHIFT) + ((1<>1)) * count; + c2total += ((c2 << C2_SHIFT) + ((1<>1)) * count; + } + } + } + + cinfo->colormap[0][icolor] = (JSAMPLE) ((c0total + (total>>1)) / total); + cinfo->colormap[1][icolor] = (JSAMPLE) ((c1total + (total>>1)) / total); + cinfo->colormap[2][icolor] = (JSAMPLE) ((c2total + (total>>1)) / total); +} + + +LOCAL(void) +select_colors (j_decompress_ptr cinfo, int desired_colors) +/* Master routine for color selection */ +{ + boxptr boxlist; + int numboxes; + int i; + + /* Allocate workspace for box list */ + boxlist = (boxptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, desired_colors * SIZEOF(box)); + /* Initialize one box containing whole space */ + numboxes = 1; + boxlist[0].c0min = 0; + boxlist[0].c0max = MAXJSAMPLE >> C0_SHIFT; + boxlist[0].c1min = 0; + boxlist[0].c1max = MAXJSAMPLE >> C1_SHIFT; + boxlist[0].c2min = 0; + boxlist[0].c2max = MAXJSAMPLE >> C2_SHIFT; + /* Shrink it to actually-used volume and set its statistics */ + update_box(cinfo, & boxlist[0]); + /* Perform median-cut to produce final box list */ + numboxes = median_cut(cinfo, boxlist, numboxes, desired_colors); + /* Compute the representative color for each box, fill colormap */ + for (i = 0; i < numboxes; i++) + compute_color(cinfo, & boxlist[i], i); + cinfo->actual_number_of_colors = numboxes; + TRACEMS1(cinfo, 1, JTRC_QUANT_SELECTED, numboxes); +} + + +/* + * These routines are concerned with the time-critical task of mapping input + * colors to the nearest color in the selected colormap. + * + * We re-use the histogram space as an "inverse color map", essentially a + * cache for the results of nearest-color searches. All colors within a + * histogram cell will be mapped to the same colormap entry, namely the one + * closest to the cell's center. This may not be quite the closest entry to + * the actual input color, but it's almost as good. A zero in the cache + * indicates we haven't found the nearest color for that cell yet; the array + * is cleared to zeroes before starting the mapping pass. When we find the + * nearest color for a cell, its colormap index plus one is recorded in the + * cache for future use. The pass2 scanning routines call fill_inverse_cmap + * when they need to use an unfilled entry in the cache. + * + * Our method of efficiently finding nearest colors is based on the "locally + * sorted search" idea described by Heckbert and on the incremental distance + * calculation described by Spencer W. Thomas in chapter III.1 of Graphics + * Gems II (James Arvo, ed. Academic Press, 1991). Thomas points out that + * the distances from a given colormap entry to each cell of the histogram can + * be computed quickly using an incremental method: the differences between + * distances to adjacent cells themselves differ by a constant. This allows a + * fairly fast implementation of the "brute force" approach of computing the + * distance from every colormap entry to every histogram cell. Unfortunately, + * it needs a work array to hold the best-distance-so-far for each histogram + * cell (because the inner loop has to be over cells, not colormap entries). + * The work array elements have to be INT32s, so the work array would need + * 256Kb at our recommended precision. This is not feasible in DOS machines. + * + * To get around these problems, we apply Thomas' method to compute the + * nearest colors for only the cells within a small subbox of the histogram. + * The work array need be only as big as the subbox, so the memory usage + * problem is solved. Furthermore, we need not fill subboxes that are never + * referenced in pass2; many images use only part of the color gamut, so a + * fair amount of work is saved. An additional advantage of this + * approach is that we can apply Heckbert's locality criterion to quickly + * eliminate colormap entries that are far away from the subbox; typically + * three-fourths of the colormap entries are rejected by Heckbert's criterion, + * and we need not compute their distances to individual cells in the subbox. + * The speed of this approach is heavily influenced by the subbox size: too + * small means too much overhead, too big loses because Heckbert's criterion + * can't eliminate as many colormap entries. Empirically the best subbox + * size seems to be about 1/512th of the histogram (1/8th in each direction). + * + * Thomas' article also describes a refined method which is asymptotically + * faster than the brute-force method, but it is also far more complex and + * cannot efficiently be applied to small subboxes. It is therefore not + * useful for programs intended to be portable to DOS machines. On machines + * with plenty of memory, filling the whole histogram in one shot with Thomas' + * refined method might be faster than the present code --- but then again, + * it might not be any faster, and it's certainly more complicated. + */ + + +/* log2(histogram cells in update box) for each axis; this can be adjusted */ +#define BOX_C0_LOG (HIST_C0_BITS-3) +#define BOX_C1_LOG (HIST_C1_BITS-3) +#define BOX_C2_LOG (HIST_C2_BITS-3) + +#define BOX_C0_ELEMS (1<actual_number_of_colors; + int maxc0, maxc1, maxc2; + int centerc0, centerc1, centerc2; + int i, x, ncolors; + INT32 minmaxdist, min_dist, max_dist, tdist; + INT32 mindist[MAXNUMCOLORS]; /* min distance to colormap entry i */ + + /* Compute true coordinates of update box's upper corner and center. + * Actually we compute the coordinates of the center of the upper-corner + * histogram cell, which are the upper bounds of the volume we care about. + * Note that since ">>" rounds down, the "center" values may be closer to + * min than to max; hence comparisons to them must be "<=", not "<". + */ + maxc0 = minc0 + ((1 << BOX_C0_SHIFT) - (1 << C0_SHIFT)); + centerc0 = (minc0 + maxc0) >> 1; + maxc1 = minc1 + ((1 << BOX_C1_SHIFT) - (1 << C1_SHIFT)); + centerc1 = (minc1 + maxc1) >> 1; + maxc2 = minc2 + ((1 << BOX_C2_SHIFT) - (1 << C2_SHIFT)); + centerc2 = (minc2 + maxc2) >> 1; + + /* For each color in colormap, find: + * 1. its minimum squared-distance to any point in the update box + * (zero if color is within update box); + * 2. its maximum squared-distance to any point in the update box. + * Both of these can be found by considering only the corners of the box. + * We save the minimum distance for each color in mindist[]; + * only the smallest maximum distance is of interest. + */ + minmaxdist = 0x7FFFFFFFL; + + for (i = 0; i < numcolors; i++) { + /* We compute the squared-c0-distance term, then add in the other two. */ + x = GETJSAMPLE(cinfo->colormap[0][i]); + if (x < minc0) { + tdist = (x - minc0) * C0_SCALE; + min_dist = tdist*tdist; + tdist = (x - maxc0) * C0_SCALE; + max_dist = tdist*tdist; + } else if (x > maxc0) { + tdist = (x - maxc0) * C0_SCALE; + min_dist = tdist*tdist; + tdist = (x - minc0) * C0_SCALE; + max_dist = tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + min_dist = 0; + if (x <= centerc0) { + tdist = (x - maxc0) * C0_SCALE; + max_dist = tdist*tdist; + } else { + tdist = (x - minc0) * C0_SCALE; + max_dist = tdist*tdist; + } + } + + x = GETJSAMPLE(cinfo->colormap[1][i]); + if (x < minc1) { + tdist = (x - minc1) * C1_SCALE; + min_dist += tdist*tdist; + tdist = (x - maxc1) * C1_SCALE; + max_dist += tdist*tdist; + } else if (x > maxc1) { + tdist = (x - maxc1) * C1_SCALE; + min_dist += tdist*tdist; + tdist = (x - minc1) * C1_SCALE; + max_dist += tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + if (x <= centerc1) { + tdist = (x - maxc1) * C1_SCALE; + max_dist += tdist*tdist; + } else { + tdist = (x - minc1) * C1_SCALE; + max_dist += tdist*tdist; + } + } + + x = GETJSAMPLE(cinfo->colormap[2][i]); + if (x < minc2) { + tdist = (x - minc2) * C2_SCALE; + min_dist += tdist*tdist; + tdist = (x - maxc2) * C2_SCALE; + max_dist += tdist*tdist; + } else if (x > maxc2) { + tdist = (x - maxc2) * C2_SCALE; + min_dist += tdist*tdist; + tdist = (x - minc2) * C2_SCALE; + max_dist += tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + if (x <= centerc2) { + tdist = (x - maxc2) * C2_SCALE; + max_dist += tdist*tdist; + } else { + tdist = (x - minc2) * C2_SCALE; + max_dist += tdist*tdist; + } + } + + mindist[i] = min_dist; /* save away the results */ + if (max_dist < minmaxdist) + minmaxdist = max_dist; + } + + /* Now we know that no cell in the update box is more than minmaxdist + * away from some colormap entry. Therefore, only colors that are + * within minmaxdist of some part of the box need be considered. + */ + ncolors = 0; + for (i = 0; i < numcolors; i++) { + if (mindist[i] <= minmaxdist) + colorlist[ncolors++] = (JSAMPLE) i; + } + return ncolors; +} + + +LOCAL(void) +find_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2, + int numcolors, JSAMPLE colorlist[], JSAMPLE bestcolor[]) +/* Find the closest colormap entry for each cell in the update box, + * given the list of candidate colors prepared by find_nearby_colors. + * Return the indexes of the closest entries in the bestcolor[] array. + * This routine uses Thomas' incremental distance calculation method to + * find the distance from a colormap entry to successive cells in the box. + */ +{ + int ic0, ic1, ic2; + int i, icolor; + register INT32 * bptr; /* pointer into bestdist[] array */ + JSAMPLE * cptr; /* pointer into bestcolor[] array */ + INT32 dist0, dist1; /* initial distance values */ + register INT32 dist2; /* current distance in inner loop */ + INT32 xx0, xx1; /* distance increments */ + register INT32 xx2; + INT32 inc0, inc1, inc2; /* initial values for increments */ + /* This array holds the distance to the nearest-so-far color for each cell */ + INT32 bestdist[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; + + /* Initialize best-distance for each cell of the update box */ + bptr = bestdist; + for (i = BOX_C0_ELEMS*BOX_C1_ELEMS*BOX_C2_ELEMS-1; i >= 0; i--) + *bptr++ = 0x7FFFFFFFL; + + /* For each color selected by find_nearby_colors, + * compute its distance to the center of each cell in the box. + * If that's less than best-so-far, update best distance and color number. + */ + + /* Nominal steps between cell centers ("x" in Thomas article) */ +#define STEP_C0 ((1 << C0_SHIFT) * C0_SCALE) +#define STEP_C1 ((1 << C1_SHIFT) * C1_SCALE) +#define STEP_C2 ((1 << C2_SHIFT) * C2_SCALE) + + for (i = 0; i < numcolors; i++) { + icolor = GETJSAMPLE(colorlist[i]); + /* Compute (square of) distance from minc0/c1/c2 to this color */ + inc0 = (minc0 - GETJSAMPLE(cinfo->colormap[0][icolor])) * C0_SCALE; + dist0 = inc0*inc0; + inc1 = (minc1 - GETJSAMPLE(cinfo->colormap[1][icolor])) * C1_SCALE; + dist0 += inc1*inc1; + inc2 = (minc2 - GETJSAMPLE(cinfo->colormap[2][icolor])) * C2_SCALE; + dist0 += inc2*inc2; + /* Form the initial difference increments */ + inc0 = inc0 * (2 * STEP_C0) + STEP_C0 * STEP_C0; + inc1 = inc1 * (2 * STEP_C1) + STEP_C1 * STEP_C1; + inc2 = inc2 * (2 * STEP_C2) + STEP_C2 * STEP_C2; + /* Now loop over all cells in box, updating distance per Thomas method */ + bptr = bestdist; + cptr = bestcolor; + xx0 = inc0; + for (ic0 = BOX_C0_ELEMS-1; ic0 >= 0; ic0--) { + dist1 = dist0; + xx1 = inc1; + for (ic1 = BOX_C1_ELEMS-1; ic1 >= 0; ic1--) { + dist2 = dist1; + xx2 = inc2; + for (ic2 = BOX_C2_ELEMS-1; ic2 >= 0; ic2--) { + if (dist2 < *bptr) { + *bptr = dist2; + *cptr = (JSAMPLE) icolor; + } + dist2 += xx2; + xx2 += 2 * STEP_C2 * STEP_C2; + bptr++; + cptr++; + } + dist1 += xx1; + xx1 += 2 * STEP_C1 * STEP_C1; + } + dist0 += xx0; + xx0 += 2 * STEP_C0 * STEP_C0; + } + } +} + + +LOCAL(void) +fill_inverse_cmap (j_decompress_ptr cinfo, int c0, int c1, int c2) +/* Fill the inverse-colormap entries in the update box that contains */ +/* histogram cell c0/c1/c2. (Only that one cell MUST be filled, but */ +/* we can fill as many others as we wish.) */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + int minc0, minc1, minc2; /* lower left corner of update box */ + int ic0, ic1, ic2; + register JSAMPLE * cptr; /* pointer into bestcolor[] array */ + register histptr cachep; /* pointer into main cache array */ + /* This array lists the candidate colormap indexes. */ + JSAMPLE colorlist[MAXNUMCOLORS]; + int numcolors; /* number of candidate colors */ + /* This array holds the actually closest colormap index for each cell. */ + JSAMPLE bestcolor[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; + + /* Convert cell coordinates to update box ID */ + c0 >>= BOX_C0_LOG; + c1 >>= BOX_C1_LOG; + c2 >>= BOX_C2_LOG; + + /* Compute true coordinates of update box's origin corner. + * Actually we compute the coordinates of the center of the corner + * histogram cell, which are the lower bounds of the volume we care about. + */ + minc0 = (c0 << BOX_C0_SHIFT) + ((1 << C0_SHIFT) >> 1); + minc1 = (c1 << BOX_C1_SHIFT) + ((1 << C1_SHIFT) >> 1); + minc2 = (c2 << BOX_C2_SHIFT) + ((1 << C2_SHIFT) >> 1); + + /* Determine which colormap entries are close enough to be candidates + * for the nearest entry to some cell in the update box. + */ + numcolors = find_nearby_colors(cinfo, minc0, minc1, minc2, colorlist); + + /* Determine the actually nearest colors. */ + find_best_colors(cinfo, minc0, minc1, minc2, numcolors, colorlist, + bestcolor); + + /* Save the best color numbers (plus 1) in the main cache array */ + c0 <<= BOX_C0_LOG; /* convert ID back to base cell indexes */ + c1 <<= BOX_C1_LOG; + c2 <<= BOX_C2_LOG; + cptr = bestcolor; + for (ic0 = 0; ic0 < BOX_C0_ELEMS; ic0++) { + for (ic1 = 0; ic1 < BOX_C1_ELEMS; ic1++) { + cachep = & histogram[c0+ic0][c1+ic1][c2]; + for (ic2 = 0; ic2 < BOX_C2_ELEMS; ic2++) { + *cachep++ = (histcell) (GETJSAMPLE(*cptr++) + 1); + } + } + } +} + + +/* + * Map some rows of pixels to the output colormapped representation. + */ + +METHODDEF(void) +pass2_no_dither (j_decompress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows) +/* This version performs no dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + register JSAMPROW inptr, outptr; + register histptr cachep; + register int c0, c1, c2; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + inptr = input_buf[row]; + outptr = output_buf[row]; + for (col = width; col > 0; col--) { + /* get pixel value and index into the cache */ + c0 = GETJSAMPLE(*inptr++) >> C0_SHIFT; + c1 = GETJSAMPLE(*inptr++) >> C1_SHIFT; + c2 = GETJSAMPLE(*inptr++) >> C2_SHIFT; + cachep = & histogram[c0][c1][c2]; + /* If we have not seen this color before, find nearest colormap entry */ + /* and update the cache */ + if (*cachep == 0) + fill_inverse_cmap(cinfo, c0,c1,c2); + /* Now emit the colormap index for this cell */ + *outptr++ = (JSAMPLE) (*cachep - 1); + } + } +} + + +METHODDEF(void) +pass2_fs_dither (j_decompress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows) +/* This version performs Floyd-Steinberg dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + register LOCFSERROR cur0, cur1, cur2; /* current error or pixel value */ + LOCFSERROR belowerr0, belowerr1, belowerr2; /* error for pixel below cur */ + LOCFSERROR bpreverr0, bpreverr1, bpreverr2; /* error for below/prev col */ + register FSERRPTR errorptr; /* => fserrors[] at column before current */ + JSAMPROW inptr; /* => current input pixel */ + JSAMPROW outptr; /* => current output pixel */ + histptr cachep; + int dir; /* +1 or -1 depending on direction */ + int dir3; /* 3*dir, for advancing inptr & errorptr */ + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + JSAMPLE *range_limit = cinfo->sample_range_limit; + int *error_limit = cquantize->error_limiter; + JSAMPROW colormap0 = cinfo->colormap[0]; + JSAMPROW colormap1 = cinfo->colormap[1]; + JSAMPROW colormap2 = cinfo->colormap[2]; + SHIFT_TEMPS + + for (row = 0; row < num_rows; row++) { + inptr = input_buf[row]; + outptr = output_buf[row]; + if (cquantize->on_odd_row) { + /* work right to left in this row */ + inptr += (width-1) * 3; /* so point to rightmost pixel */ + outptr += width-1; + dir = -1; + dir3 = -3; + errorptr = cquantize->fserrors + (width+1)*3; /* => entry after last column */ + cquantize->on_odd_row = FALSE; /* flip for next time */ + } else { + /* work left to right in this row */ + dir = 1; + dir3 = 3; + errorptr = cquantize->fserrors; /* => entry before first real column */ + cquantize->on_odd_row = TRUE; /* flip for next time */ + } + /* Preset error values: no error propagated to first pixel from left */ + cur0 = cur1 = cur2 = 0; + /* and no error propagated to row below yet */ + belowerr0 = belowerr1 = belowerr2 = 0; + bpreverr0 = bpreverr1 = bpreverr2 = 0; + + for (col = width; col > 0; col--) { + /* curN holds the error propagated from the previous pixel on the + * current line. Add the error propagated from the previous line + * to form the complete error correction term for this pixel, and + * round the error term (which is expressed * 16) to an integer. + * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct + * for either sign of the error value. + * Note: errorptr points to *previous* column's array entry. + */ + cur0 = RIGHT_SHIFT(cur0 + errorptr[dir3+0] + 8, 4); + cur1 = RIGHT_SHIFT(cur1 + errorptr[dir3+1] + 8, 4); + cur2 = RIGHT_SHIFT(cur2 + errorptr[dir3+2] + 8, 4); + /* Limit the error using transfer function set by init_error_limit. + * See comments with init_error_limit for rationale. + */ + cur0 = error_limit[cur0]; + cur1 = error_limit[cur1]; + cur2 = error_limit[cur2]; + /* Form pixel value + error, and range-limit to 0..MAXJSAMPLE. + * The maximum error is +- MAXJSAMPLE (or less with error limiting); + * this sets the required size of the range_limit array. + */ + cur0 += GETJSAMPLE(inptr[0]); + cur1 += GETJSAMPLE(inptr[1]); + cur2 += GETJSAMPLE(inptr[2]); + cur0 = GETJSAMPLE(range_limit[cur0]); + cur1 = GETJSAMPLE(range_limit[cur1]); + cur2 = GETJSAMPLE(range_limit[cur2]); + /* Index into the cache with adjusted pixel value */ + cachep = & histogram[cur0>>C0_SHIFT][cur1>>C1_SHIFT][cur2>>C2_SHIFT]; + /* If we have not seen this color before, find nearest colormap */ + /* entry and update the cache */ + if (*cachep == 0) + fill_inverse_cmap(cinfo, cur0>>C0_SHIFT,cur1>>C1_SHIFT,cur2>>C2_SHIFT); + /* Now emit the colormap index for this cell */ + { register int pixcode = *cachep - 1; + *outptr = (JSAMPLE) pixcode; + /* Compute representation error for this pixel */ + cur0 -= GETJSAMPLE(colormap0[pixcode]); + cur1 -= GETJSAMPLE(colormap1[pixcode]); + cur2 -= GETJSAMPLE(colormap2[pixcode]); + } + /* Compute error fractions to be propagated to adjacent pixels. + * Add these into the running sums, and simultaneously shift the + * next-line error sums left by 1 column. + */ + { register LOCFSERROR bnexterr, delta; + + bnexterr = cur0; /* Process component 0 */ + delta = cur0 * 2; + cur0 += delta; /* form error * 3 */ + errorptr[0] = (FSERROR) (bpreverr0 + cur0); + cur0 += delta; /* form error * 5 */ + bpreverr0 = belowerr0 + cur0; + belowerr0 = bnexterr; + cur0 += delta; /* form error * 7 */ + bnexterr = cur1; /* Process component 1 */ + delta = cur1 * 2; + cur1 += delta; /* form error * 3 */ + errorptr[1] = (FSERROR) (bpreverr1 + cur1); + cur1 += delta; /* form error * 5 */ + bpreverr1 = belowerr1 + cur1; + belowerr1 = bnexterr; + cur1 += delta; /* form error * 7 */ + bnexterr = cur2; /* Process component 2 */ + delta = cur2 * 2; + cur2 += delta; /* form error * 3 */ + errorptr[2] = (FSERROR) (bpreverr2 + cur2); + cur2 += delta; /* form error * 5 */ + bpreverr2 = belowerr2 + cur2; + belowerr2 = bnexterr; + cur2 += delta; /* form error * 7 */ + } + /* At this point curN contains the 7/16 error value to be propagated + * to the next pixel on the current line, and all the errors for the + * next line have been shifted over. We are therefore ready to move on. + */ + inptr += dir3; /* Advance pixel pointers to next column */ + outptr += dir; + errorptr += dir3; /* advance errorptr to current column */ + } + /* Post-loop cleanup: we must unload the final error values into the + * final fserrors[] entry. Note we need not unload belowerrN because + * it is for the dummy column before or after the actual array. + */ + errorptr[0] = (FSERROR) bpreverr0; /* unload prev errs into array */ + errorptr[1] = (FSERROR) bpreverr1; + errorptr[2] = (FSERROR) bpreverr2; + } +} + + +/* + * Initialize the error-limiting transfer function (lookup table). + * The raw F-S error computation can potentially compute error values of up to + * +- MAXJSAMPLE. But we want the maximum correction applied to a pixel to be + * much less, otherwise obviously wrong pixels will be created. (Typical + * effects include weird fringes at color-area boundaries, isolated bright + * pixels in a dark area, etc.) The standard advice for avoiding this problem + * is to ensure that the "corners" of the color cube are allocated as output + * colors; then repeated errors in the same direction cannot cause cascading + * error buildup. However, that only prevents the error from getting + * completely out of hand; Aaron Giles reports that error limiting improves + * the results even with corner colors allocated. + * A simple clamping of the error values to about +- MAXJSAMPLE/8 works pretty + * well, but the smoother transfer function used below is even better. Thanks + * to Aaron Giles for this idea. + */ + +LOCAL(void) +init_error_limit (j_decompress_ptr cinfo) +/* Allocate and fill in the error_limiter table */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + int * table; + int in, out; + + table = (int *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE*2+1) * SIZEOF(int)); + table += MAXJSAMPLE; /* so can index -MAXJSAMPLE .. +MAXJSAMPLE */ + cquantize->error_limiter = table; + +#define STEPSIZE ((MAXJSAMPLE+1)/16) + /* Map errors 1:1 up to +- MAXJSAMPLE/16 */ + out = 0; + for (in = 0; in < STEPSIZE; in++, out++) { + table[in] = out; table[-in] = -out; + } + /* Map errors 1:2 up to +- 3*MAXJSAMPLE/16 */ + for (; in < STEPSIZE*3; in++, out += (in&1) ? 0 : 1) { + table[in] = out; table[-in] = -out; + } + /* Clamp the rest to final out value (which is (MAXJSAMPLE+1)/8) */ + for (; in <= MAXJSAMPLE; in++) { + table[in] = out; table[-in] = -out; + } +#undef STEPSIZE +} + + +/* + * Finish up at the end of each pass. + */ + +METHODDEF(void) +finish_pass1 (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + + /* Select the representative colors and fill in cinfo->colormap */ + cinfo->colormap = cquantize->sv_colormap; + select_colors(cinfo, cquantize->desired); + /* Force next pass to zero the color index table */ + cquantize->needs_zeroed = TRUE; +} + + +METHODDEF(void) +finish_pass2 (j_decompress_ptr cinfo) +{ + /* no work */ +} + + +/* + * Initialize for each processing pass. + */ + +METHODDEF(void) +start_pass_2_quant (j_decompress_ptr cinfo, boolean is_pre_scan) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + int i; + + /* Only F-S dithering or no dithering is supported. */ + /* If user asks for ordered dither, give him F-S. */ + if (cinfo->dither_mode != JDITHER_NONE) + cinfo->dither_mode = JDITHER_FS; + + if (is_pre_scan) { + /* Set up method pointers */ + cquantize->pub.color_quantize = prescan_quantize; + cquantize->pub.finish_pass = finish_pass1; + cquantize->needs_zeroed = TRUE; /* Always zero histogram */ + } else { + /* Set up method pointers */ + if (cinfo->dither_mode == JDITHER_FS) + cquantize->pub.color_quantize = pass2_fs_dither; + else + cquantize->pub.color_quantize = pass2_no_dither; + cquantize->pub.finish_pass = finish_pass2; + + /* Make sure color count is acceptable */ + i = cinfo->actual_number_of_colors; + if (i < 1) + ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 1); + if (i > MAXNUMCOLORS) + ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS); + + if (cinfo->dither_mode == JDITHER_FS) { + size_t arraysize = (size_t) ((cinfo->output_width + 2) * + (3 * SIZEOF(FSERROR))); + /* Allocate Floyd-Steinberg workspace if we didn't already. */ + if (cquantize->fserrors == NULL) + cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize); + /* Initialize the propagated errors to zero. */ + jzero_far((void FAR *) cquantize->fserrors, arraysize); + /* Make the error-limit table if we didn't already. */ + if (cquantize->error_limiter == NULL) + init_error_limit(cinfo); + cquantize->on_odd_row = FALSE; + } + + } + /* Zero the histogram or inverse color map, if necessary */ + if (cquantize->needs_zeroed) { + for (i = 0; i < HIST_C0_ELEMS; i++) { + jzero_far((void FAR *) histogram[i], + HIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell)); + } + cquantize->needs_zeroed = FALSE; + } +} + + +/* + * Switch to a new external colormap between output passes. + */ + +METHODDEF(void) +new_color_map_2_quant (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + + /* Reset the inverse color map */ + cquantize->needs_zeroed = TRUE; +} + + +/* + * Module initialization routine for 2-pass color quantization. + */ + +GLOBAL(void) +jinit_2pass_quantizer (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize; + int i; + + cquantize = (my_cquantize_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_cquantizer)); + cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize; + cquantize->pub.start_pass = start_pass_2_quant; + cquantize->pub.new_color_map = new_color_map_2_quant; + cquantize->fserrors = NULL; /* flag optional arrays not allocated */ + cquantize->error_limiter = NULL; + + /* Make sure jdmaster didn't give me a case I can't handle */ + if (cinfo->out_color_components != 3) + ERREXIT(cinfo, JERR_NOTIMPL); + + /* Allocate the histogram/inverse colormap storage */ + cquantize->histogram = (hist3d) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, HIST_C0_ELEMS * SIZEOF(hist2d)); + for (i = 0; i < HIST_C0_ELEMS; i++) { + cquantize->histogram[i] = (hist2d) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + HIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell)); + } + cquantize->needs_zeroed = TRUE; /* histogram is garbage now */ + + /* Allocate storage for the completed colormap, if required. + * We do this now since it is FAR storage and may affect + * the memory manager's space calculations. + */ + if (cinfo->enable_2pass_quant) { + /* Make sure color count is acceptable */ + int desired = cinfo->desired_number_of_colors; + /* Lower bound on # of colors ... somewhat arbitrary as long as > 0 */ + if (desired < 8) + ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 8); + /* Make sure colormap indexes can be represented by JSAMPLEs */ + if (desired > MAXNUMCOLORS) + ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS); + cquantize->sv_colormap = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo,JPOOL_IMAGE, (JDIMENSION) desired, (JDIMENSION) 3); + cquantize->desired = desired; + } else + cquantize->sv_colormap = NULL; + + /* Only F-S dithering or no dithering is supported. */ + /* If user asks for ordered dither, give him F-S. */ + if (cinfo->dither_mode != JDITHER_NONE) + cinfo->dither_mode = JDITHER_FS; + + /* Allocate Floyd-Steinberg workspace if necessary. + * This isn't really needed until pass 2, but again it is FAR storage. + * Although we will cope with a later change in dither_mode, + * we do not promise to honor max_memory_to_use if dither_mode changes. + */ + if (cinfo->dither_mode == JDITHER_FS) { + cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (size_t) ((cinfo->output_width + 2) * (3 * SIZEOF(FSERROR)))); + /* Might as well create the error-limiting table too. */ + init_error_limit(cinfo); + } +} + +#endif /* QUANT_2PASS_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/jutils.c b/gtkmm-osx/jpeg-6b/jutils.c new file mode 100644 index 0000000..d18a955 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jutils.c @@ -0,0 +1,179 @@ +/* + * jutils.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains tables and miscellaneous utility routines needed + * for both compression and decompression. + * Note we prefix all global names with "j" to minimize conflicts with + * a surrounding application. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * jpeg_zigzag_order[i] is the zigzag-order position of the i'th element + * of a DCT block read in natural order (left to right, top to bottom). + */ + +#if 0 /* This table is not actually needed in v6a */ + +const int jpeg_zigzag_order[DCTSIZE2] = { + 0, 1, 5, 6, 14, 15, 27, 28, + 2, 4, 7, 13, 16, 26, 29, 42, + 3, 8, 12, 17, 25, 30, 41, 43, + 9, 11, 18, 24, 31, 40, 44, 53, + 10, 19, 23, 32, 39, 45, 52, 54, + 20, 22, 33, 38, 46, 51, 55, 60, + 21, 34, 37, 47, 50, 56, 59, 61, + 35, 36, 48, 49, 57, 58, 62, 63 +}; + +#endif + +/* + * jpeg_natural_order[i] is the natural-order position of the i'th element + * of zigzag order. + * + * When reading corrupted data, the Huffman decoders could attempt + * to reference an entry beyond the end of this array (if the decoded + * zero run length reaches past the end of the block). To prevent + * wild stores without adding an inner-loop test, we put some extra + * "63"s after the real entries. This will cause the extra coefficient + * to be stored in location 63 of the block, not somewhere random. + * The worst case would be a run-length of 15, which means we need 16 + * fake entries. + */ + +const int jpeg_natural_order[DCTSIZE2+16] = { + 0, 1, 8, 16, 9, 2, 3, 10, + 17, 24, 32, 25, 18, 11, 4, 5, + 12, 19, 26, 33, 40, 48, 41, 34, + 27, 20, 13, 6, 7, 14, 21, 28, + 35, 42, 49, 56, 57, 50, 43, 36, + 29, 22, 15, 23, 30, 37, 44, 51, + 58, 59, 52, 45, 38, 31, 39, 46, + 53, 60, 61, 54, 47, 55, 62, 63, + 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ + 63, 63, 63, 63, 63, 63, 63, 63 +}; + + +/* + * Arithmetic utilities + */ + +GLOBAL(long) +jdiv_round_up (long a, long b) +/* Compute a/b rounded up to next integer, ie, ceil(a/b) */ +/* Assumes a >= 0, b > 0 */ +{ + return (a + b - 1L) / b; +} + + +GLOBAL(long) +jround_up (long a, long b) +/* Compute a rounded up to next multiple of b, ie, ceil(a/b)*b */ +/* Assumes a >= 0, b > 0 */ +{ + a += b - 1L; + return a - (a % b); +} + + +/* On normal machines we can apply MEMCOPY() and MEMZERO() to sample arrays + * and coefficient-block arrays. This won't work on 80x86 because the arrays + * are FAR and we're assuming a small-pointer memory model. However, some + * DOS compilers provide far-pointer versions of memcpy() and memset() even + * in the small-model libraries. These will be used if USE_FMEM is defined. + * Otherwise, the routines below do it the hard way. (The performance cost + * is not all that great, because these routines aren't very heavily used.) + */ + +#ifndef NEED_FAR_POINTERS /* normal case, same as regular macros */ +#define FMEMCOPY(dest,src,size) MEMCOPY(dest,src,size) +#define FMEMZERO(target,size) MEMZERO(target,size) +#else /* 80x86 case, define if we can */ +#ifdef USE_FMEM +#define FMEMCOPY(dest,src,size) _fmemcpy((void FAR *)(dest), (const void FAR *)(src), (size_t)(size)) +#define FMEMZERO(target,size) _fmemset((void FAR *)(target), 0, (size_t)(size)) +#endif +#endif + + +GLOBAL(void) +jcopy_sample_rows (JSAMPARRAY input_array, int source_row, + JSAMPARRAY output_array, int dest_row, + int num_rows, JDIMENSION num_cols) +/* Copy some rows of samples from one place to another. + * num_rows rows are copied from input_array[source_row++] + * to output_array[dest_row++]; these areas may overlap for duplication. + * The source and destination arrays must be at least as wide as num_cols. + */ +{ + register JSAMPROW inptr, outptr; +#ifdef FMEMCOPY + register size_t count = (size_t) (num_cols * SIZEOF(JSAMPLE)); +#else + register JDIMENSION count; +#endif + register int row; + + input_array += source_row; + output_array += dest_row; + + for (row = num_rows; row > 0; row--) { + inptr = *input_array++; + outptr = *output_array++; +#ifdef FMEMCOPY + FMEMCOPY(outptr, inptr, count); +#else + for (count = num_cols; count > 0; count--) + *outptr++ = *inptr++; /* needn't bother with GETJSAMPLE() here */ +#endif + } +} + + +GLOBAL(void) +jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row, + JDIMENSION num_blocks) +/* Copy a row of coefficient blocks from one place to another. */ +{ +#ifdef FMEMCOPY + FMEMCOPY(output_row, input_row, num_blocks * (DCTSIZE2 * SIZEOF(JCOEF))); +#else + register JCOEFPTR inptr, outptr; + register long count; + + inptr = (JCOEFPTR) input_row; + outptr = (JCOEFPTR) output_row; + for (count = (long) num_blocks * DCTSIZE2; count > 0; count--) { + *outptr++ = *inptr++; + } +#endif +} + + +GLOBAL(void) +jzero_far (void FAR * target, size_t bytestozero) +/* Zero out a chunk of FAR memory. */ +/* This might be sample-array data, block-array data, or alloc_large data. */ +{ +#ifdef FMEMZERO + FMEMZERO(target, bytestozero); +#else + register char FAR * ptr = (char FAR *) target; + register size_t count; + + for (count = bytestozero; count > 0; count--) { + *ptr++ = 0; + } +#endif +} diff --git a/gtkmm-osx/jpeg-6b/jversion.h b/gtkmm-osx/jpeg-6b/jversion.h new file mode 100644 index 0000000..6472c58 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/jversion.h @@ -0,0 +1,14 @@ +/* + * jversion.h + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains software version identification. + */ + + +#define JVERSION "6b 27-Mar-1998" + +#define JCOPYRIGHT "Copyright (C) 1998, Thomas G. Lane" diff --git a/gtkmm-osx/jpeg-6b/libjpeg.doc b/gtkmm-osx/jpeg-6b/libjpeg.doc new file mode 100644 index 0000000..689b206 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/libjpeg.doc @@ -0,0 +1,3006 @@ +USING THE IJG JPEG LIBRARY + +Copyright (C) 1994-1998, Thomas G. Lane. +This file is part of the Independent JPEG Group's software. +For conditions of distribution and use, see the accompanying README file. + + +This file describes how to use the IJG JPEG library within an application +program. Read it if you want to write a program that uses the library. + +The file example.c provides heavily commented skeleton code for calling the +JPEG library. Also see jpeglib.h (the include file to be used by application +programs) for full details about data structures and function parameter lists. +The library source code, of course, is the ultimate reference. + +Note that there have been *major* changes from the application interface +presented by IJG version 4 and earlier versions. The old design had several +inherent limitations, and it had accumulated a lot of cruft as we added +features while trying to minimize application-interface changes. We have +sacrificed backward compatibility in the version 5 rewrite, but we think the +improvements justify this. + + +TABLE OF CONTENTS +----------------- + +Overview: + Functions provided by the library + Outline of typical usage +Basic library usage: + Data formats + Compression details + Decompression details + Mechanics of usage: include files, linking, etc +Advanced features: + Compression parameter selection + Decompression parameter selection + Special color spaces + Error handling + Compressed data handling (source and destination managers) + I/O suspension + Progressive JPEG support + Buffered-image mode + Abbreviated datastreams and multiple images + Special markers + Raw (downsampled) image data + Really raw data: DCT coefficients + Progress monitoring + Memory management + Memory usage + Library compile-time options + Portability considerations + Notes for MS-DOS implementors + +You should read at least the overview and basic usage sections before trying +to program with the library. The sections on advanced features can be read +if and when you need them. + + +OVERVIEW +======== + +Functions provided by the library +--------------------------------- + +The IJG JPEG library provides C code to read and write JPEG-compressed image +files. The surrounding application program receives or supplies image data a +scanline at a time, using a straightforward uncompressed image format. All +details of color conversion and other preprocessing/postprocessing can be +handled by the library. + +The library includes a substantial amount of code that is not covered by the +JPEG standard but is necessary for typical applications of JPEG. These +functions preprocess the image before JPEG compression or postprocess it after +decompression. They include colorspace conversion, downsampling/upsampling, +and color quantization. The application indirectly selects use of this code +by specifying the format in which it wishes to supply or receive image data. +For example, if colormapped output is requested, then the decompression +library automatically invokes color quantization. + +A wide range of quality vs. speed tradeoffs are possible in JPEG processing, +and even more so in decompression postprocessing. The decompression library +provides multiple implementations that cover most of the useful tradeoffs, +ranging from very-high-quality down to fast-preview operation. On the +compression side we have generally not provided low-quality choices, since +compression is normally less time-critical. It should be understood that the +low-quality modes may not meet the JPEG standard's accuracy requirements; +nonetheless, they are useful for viewers. + +A word about functions *not* provided by the library. We handle a subset of +the ISO JPEG standard; most baseline, extended-sequential, and progressive +JPEG processes are supported. (Our subset includes all features now in common +use.) Unsupported ISO options include: + * Hierarchical storage + * Lossless JPEG + * Arithmetic entropy coding (unsupported for legal reasons) + * DNL marker + * Nonintegral subsampling ratios +We support both 8- and 12-bit data precision, but this is a compile-time +choice rather than a run-time choice; hence it is difficult to use both +precisions in a single application. + +By itself, the library handles only interchange JPEG datastreams --- in +particular the widely used JFIF file format. The library can be used by +surrounding code to process interchange or abbreviated JPEG datastreams that +are embedded in more complex file formats. (For example, this library is +used by the free LIBTIFF library to support JPEG compression in TIFF.) + + +Outline of typical usage +------------------------ + +The rough outline of a JPEG compression operation is: + + Allocate and initialize a JPEG compression object + Specify the destination for the compressed data (eg, a file) + Set parameters for compression, including image size & colorspace + jpeg_start_compress(...); + while (scan lines remain to be written) + jpeg_write_scanlines(...); + jpeg_finish_compress(...); + Release the JPEG compression object + +A JPEG compression object holds parameters and working state for the JPEG +library. We make creation/destruction of the object separate from starting +or finishing compression of an image; the same object can be re-used for a +series of image compression operations. This makes it easy to re-use the +same parameter settings for a sequence of images. Re-use of a JPEG object +also has important implications for processing abbreviated JPEG datastreams, +as discussed later. + +The image data to be compressed is supplied to jpeg_write_scanlines() from +in-memory buffers. If the application is doing file-to-file compression, +reading image data from the source file is the application's responsibility. +The library emits compressed data by calling a "data destination manager", +which typically will write the data into a file; but the application can +provide its own destination manager to do something else. + +Similarly, the rough outline of a JPEG decompression operation is: + + Allocate and initialize a JPEG decompression object + Specify the source of the compressed data (eg, a file) + Call jpeg_read_header() to obtain image info + Set parameters for decompression + jpeg_start_decompress(...); + while (scan lines remain to be read) + jpeg_read_scanlines(...); + jpeg_finish_decompress(...); + Release the JPEG decompression object + +This is comparable to the compression outline except that reading the +datastream header is a separate step. This is helpful because information +about the image's size, colorspace, etc is available when the application +selects decompression parameters. For example, the application can choose an +output scaling ratio that will fit the image into the available screen size. + +The decompression library obtains compressed data by calling a data source +manager, which typically will read the data from a file; but other behaviors +can be obtained with a custom source manager. Decompressed data is delivered +into in-memory buffers passed to jpeg_read_scanlines(). + +It is possible to abort an incomplete compression or decompression operation +by calling jpeg_abort(); or, if you do not need to retain the JPEG object, +simply release it by calling jpeg_destroy(). + +JPEG compression and decompression objects are two separate struct types. +However, they share some common fields, and certain routines such as +jpeg_destroy() can work on either type of object. + +The JPEG library has no static variables: all state is in the compression +or decompression object. Therefore it is possible to process multiple +compression and decompression operations concurrently, using multiple JPEG +objects. + +Both compression and decompression can be done in an incremental memory-to- +memory fashion, if suitable source/destination managers are used. See the +section on "I/O suspension" for more details. + + +BASIC LIBRARY USAGE +=================== + +Data formats +------------ + +Before diving into procedural details, it is helpful to understand the +image data format that the JPEG library expects or returns. + +The standard input image format is a rectangular array of pixels, with each +pixel having the same number of "component" or "sample" values (color +channels). You must specify how many components there are and the colorspace +interpretation of the components. Most applications will use RGB data +(three components per pixel) or grayscale data (one component per pixel). +PLEASE NOTE THAT RGB DATA IS THREE SAMPLES PER PIXEL, GRAYSCALE ONLY ONE. +A remarkable number of people manage to miss this, only to find that their +programs don't work with grayscale JPEG files. + +There is no provision for colormapped input. JPEG files are always full-color +or full grayscale (or sometimes another colorspace such as CMYK). You can +feed in a colormapped image by expanding it to full-color format. However +JPEG often doesn't work very well with source data that has been colormapped, +because of dithering noise. This is discussed in more detail in the JPEG FAQ +and the other references mentioned in the README file. + +Pixels are stored by scanlines, with each scanline running from left to +right. The component values for each pixel are adjacent in the row; for +example, R,G,B,R,G,B,R,G,B,... for 24-bit RGB color. Each scanline is an +array of data type JSAMPLE --- which is typically "unsigned char", unless +you've changed jmorecfg.h. (You can also change the RGB pixel layout, say +to B,G,R order, by modifying jmorecfg.h. But see the restrictions listed in +that file before doing so.) + +A 2-D array of pixels is formed by making a list of pointers to the starts of +scanlines; so the scanlines need not be physically adjacent in memory. Even +if you process just one scanline at a time, you must make a one-element +pointer array to conform to this structure. Pointers to JSAMPLE rows are of +type JSAMPROW, and the pointer to the pointer array is of type JSAMPARRAY. + +The library accepts or supplies one or more complete scanlines per call. +It is not possible to process part of a row at a time. Scanlines are always +processed top-to-bottom. You can process an entire image in one call if you +have it all in memory, but usually it's simplest to process one scanline at +a time. + +For best results, source data values should have the precision specified by +BITS_IN_JSAMPLE (normally 8 bits). For instance, if you choose to compress +data that's only 6 bits/channel, you should left-justify each value in a +byte before passing it to the compressor. If you need to compress data +that has more than 8 bits/channel, compile with BITS_IN_JSAMPLE = 12. +(See "Library compile-time options", later.) + + +The data format returned by the decompressor is the same in all details, +except that colormapped output is supported. (Again, a JPEG file is never +colormapped. But you can ask the decompressor to perform on-the-fly color +quantization to deliver colormapped output.) If you request colormapped +output then the returned data array contains a single JSAMPLE per pixel; +its value is an index into a color map. The color map is represented as +a 2-D JSAMPARRAY in which each row holds the values of one color component, +that is, colormap[i][j] is the value of the i'th color component for pixel +value (map index) j. Note that since the colormap indexes are stored in +JSAMPLEs, the maximum number of colors is limited by the size of JSAMPLE +(ie, at most 256 colors for an 8-bit JPEG library). + + +Compression details +------------------- + +Here we revisit the JPEG compression outline given in the overview. + +1. Allocate and initialize a JPEG compression object. + +A JPEG compression object is a "struct jpeg_compress_struct". (It also has +a bunch of subsidiary structures which are allocated via malloc(), but the +application doesn't control those directly.) This struct can be just a local +variable in the calling routine, if a single routine is going to execute the +whole JPEG compression sequence. Otherwise it can be static or allocated +from malloc(). + +You will also need a structure representing a JPEG error handler. The part +of this that the library cares about is a "struct jpeg_error_mgr". If you +are providing your own error handler, you'll typically want to embed the +jpeg_error_mgr struct in a larger structure; this is discussed later under +"Error handling". For now we'll assume you are just using the default error +handler. The default error handler will print JPEG error/warning messages +on stderr, and it will call exit() if a fatal error occurs. + +You must initialize the error handler structure, store a pointer to it into +the JPEG object's "err" field, and then call jpeg_create_compress() to +initialize the rest of the JPEG object. + +Typical code for this step, if you are using the default error handler, is + + struct jpeg_compress_struct cinfo; + struct jpeg_error_mgr jerr; + ... + cinfo.err = jpeg_std_error(&jerr); + jpeg_create_compress(&cinfo); + +jpeg_create_compress allocates a small amount of memory, so it could fail +if you are out of memory. In that case it will exit via the error handler; +that's why the error handler must be initialized first. + + +2. Specify the destination for the compressed data (eg, a file). + +As previously mentioned, the JPEG library delivers compressed data to a +"data destination" module. The library includes one data destination +module which knows how to write to a stdio stream. You can use your own +destination module if you want to do something else, as discussed later. + +If you use the standard destination module, you must open the target stdio +stream beforehand. Typical code for this step looks like: + + FILE * outfile; + ... + if ((outfile = fopen(filename, "wb")) == NULL) { + fprintf(stderr, "can't open %s\n", filename); + exit(1); + } + jpeg_stdio_dest(&cinfo, outfile); + +where the last line invokes the standard destination module. + +WARNING: it is critical that the binary compressed data be delivered to the +output file unchanged. On non-Unix systems the stdio library may perform +newline translation or otherwise corrupt binary data. To suppress this +behavior, you may need to use a "b" option to fopen (as shown above), or use +setmode() or another routine to put the stdio stream in binary mode. See +cjpeg.c and djpeg.c for code that has been found to work on many systems. + +You can select the data destination after setting other parameters (step 3), +if that's more convenient. You may not change the destination between +calling jpeg_start_compress() and jpeg_finish_compress(). + + +3. Set parameters for compression, including image size & colorspace. + +You must supply information about the source image by setting the following +fields in the JPEG object (cinfo structure): + + image_width Width of image, in pixels + image_height Height of image, in pixels + input_components Number of color channels (samples per pixel) + in_color_space Color space of source image + +The image dimensions are, hopefully, obvious. JPEG supports image dimensions +of 1 to 64K pixels in either direction. The input color space is typically +RGB or grayscale, and input_components is 3 or 1 accordingly. (See "Special +color spaces", later, for more info.) The in_color_space field must be +assigned one of the J_COLOR_SPACE enum constants, typically JCS_RGB or +JCS_GRAYSCALE. + +JPEG has a large number of compression parameters that determine how the +image is encoded. Most applications don't need or want to know about all +these parameters. You can set all the parameters to reasonable defaults by +calling jpeg_set_defaults(); then, if there are particular values you want +to change, you can do so after that. The "Compression parameter selection" +section tells about all the parameters. + +You must set in_color_space correctly before calling jpeg_set_defaults(), +because the defaults depend on the source image colorspace. However the +other three source image parameters need not be valid until you call +jpeg_start_compress(). There's no harm in calling jpeg_set_defaults() more +than once, if that happens to be convenient. + +Typical code for a 24-bit RGB source image is + + cinfo.image_width = Width; /* image width and height, in pixels */ + cinfo.image_height = Height; + cinfo.input_components = 3; /* # of color components per pixel */ + cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ + + jpeg_set_defaults(&cinfo); + /* Make optional parameter settings here */ + + +4. jpeg_start_compress(...); + +After you have established the data destination and set all the necessary +source image info and other parameters, call jpeg_start_compress() to begin +a compression cycle. This will initialize internal state, allocate working +storage, and emit the first few bytes of the JPEG datastream header. + +Typical code: + + jpeg_start_compress(&cinfo, TRUE); + +The "TRUE" parameter ensures that a complete JPEG interchange datastream +will be written. This is appropriate in most cases. If you think you might +want to use an abbreviated datastream, read the section on abbreviated +datastreams, below. + +Once you have called jpeg_start_compress(), you may not alter any JPEG +parameters or other fields of the JPEG object until you have completed +the compression cycle. + + +5. while (scan lines remain to be written) + jpeg_write_scanlines(...); + +Now write all the required image data by calling jpeg_write_scanlines() +one or more times. You can pass one or more scanlines in each call, up +to the total image height. In most applications it is convenient to pass +just one or a few scanlines at a time. The expected format for the passed +data is discussed under "Data formats", above. + +Image data should be written in top-to-bottom scanline order. The JPEG spec +contains some weasel wording about how top and bottom are application-defined +terms (a curious interpretation of the English language...) but if you want +your files to be compatible with everyone else's, you WILL use top-to-bottom +order. If the source data must be read in bottom-to-top order, you can use +the JPEG library's virtual array mechanism to invert the data efficiently. +Examples of this can be found in the sample application cjpeg. + +The library maintains a count of the number of scanlines written so far +in the next_scanline field of the JPEG object. Usually you can just use +this variable as the loop counter, so that the loop test looks like +"while (cinfo.next_scanline < cinfo.image_height)". + +Code for this step depends heavily on the way that you store the source data. +example.c shows the following code for the case of a full-size 2-D source +array containing 3-byte RGB pixels: + + JSAMPROW row_pointer[1]; /* pointer to a single row */ + int row_stride; /* physical row width in buffer */ + + row_stride = image_width * 3; /* JSAMPLEs per row in image_buffer */ + + while (cinfo.next_scanline < cinfo.image_height) { + row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride]; + jpeg_write_scanlines(&cinfo, row_pointer, 1); + } + +jpeg_write_scanlines() returns the number of scanlines actually written. +This will normally be equal to the number passed in, so you can usually +ignore the return value. It is different in just two cases: + * If you try to write more scanlines than the declared image height, + the additional scanlines are ignored. + * If you use a suspending data destination manager, output buffer overrun + will cause the compressor to return before accepting all the passed lines. + This feature is discussed under "I/O suspension", below. The normal + stdio destination manager will NOT cause this to happen. +In any case, the return value is the same as the change in the value of +next_scanline. + + +6. jpeg_finish_compress(...); + +After all the image data has been written, call jpeg_finish_compress() to +complete the compression cycle. This step is ESSENTIAL to ensure that the +last bufferload of data is written to the data destination. +jpeg_finish_compress() also releases working memory associated with the JPEG +object. + +Typical code: + + jpeg_finish_compress(&cinfo); + +If using the stdio destination manager, don't forget to close the output +stdio stream (if necessary) afterwards. + +If you have requested a multi-pass operating mode, such as Huffman code +optimization, jpeg_finish_compress() will perform the additional passes using +data buffered by the first pass. In this case jpeg_finish_compress() may take +quite a while to complete. With the default compression parameters, this will +not happen. + +It is an error to call jpeg_finish_compress() before writing the necessary +total number of scanlines. If you wish to abort compression, call +jpeg_abort() as discussed below. + +After completing a compression cycle, you may dispose of the JPEG object +as discussed next, or you may use it to compress another image. In that case +return to step 2, 3, or 4 as appropriate. If you do not change the +destination manager, the new datastream will be written to the same target. +If you do not change any JPEG parameters, the new datastream will be written +with the same parameters as before. Note that you can change the input image +dimensions freely between cycles, but if you change the input colorspace, you +should call jpeg_set_defaults() to adjust for the new colorspace; and then +you'll need to repeat all of step 3. + + +7. Release the JPEG compression object. + +When you are done with a JPEG compression object, destroy it by calling +jpeg_destroy_compress(). This will free all subsidiary memory (regardless of +the previous state of the object). Or you can call jpeg_destroy(), which +works for either compression or decompression objects --- this may be more +convenient if you are sharing code between compression and decompression +cases. (Actually, these routines are equivalent except for the declared type +of the passed pointer. To avoid gripes from ANSI C compilers, jpeg_destroy() +should be passed a j_common_ptr.) + +If you allocated the jpeg_compress_struct structure from malloc(), freeing +it is your responsibility --- jpeg_destroy() won't. Ditto for the error +handler structure. + +Typical code: + + jpeg_destroy_compress(&cinfo); + + +8. Aborting. + +If you decide to abort a compression cycle before finishing, you can clean up +in either of two ways: + +* If you don't need the JPEG object any more, just call + jpeg_destroy_compress() or jpeg_destroy() to release memory. This is + legitimate at any point after calling jpeg_create_compress() --- in fact, + it's safe even if jpeg_create_compress() fails. + +* If you want to re-use the JPEG object, call jpeg_abort_compress(), or call + jpeg_abort() which works on both compression and decompression objects. + This will return the object to an idle state, releasing any working memory. + jpeg_abort() is allowed at any time after successful object creation. + +Note that cleaning up the data destination, if required, is your +responsibility; neither of these routines will call term_destination(). +(See "Compressed data handling", below, for more about that.) + +jpeg_destroy() and jpeg_abort() are the only safe calls to make on a JPEG +object that has reported an error by calling error_exit (see "Error handling" +for more info). The internal state of such an object is likely to be out of +whack. Either of these two routines will return the object to a known state. + + +Decompression details +--------------------- + +Here we revisit the JPEG decompression outline given in the overview. + +1. Allocate and initialize a JPEG decompression object. + +This is just like initialization for compression, as discussed above, +except that the object is a "struct jpeg_decompress_struct" and you +call jpeg_create_decompress(). Error handling is exactly the same. + +Typical code: + + struct jpeg_decompress_struct cinfo; + struct jpeg_error_mgr jerr; + ... + cinfo.err = jpeg_std_error(&jerr); + jpeg_create_decompress(&cinfo); + +(Both here and in the IJG code, we usually use variable name "cinfo" for +both compression and decompression objects.) + + +2. Specify the source of the compressed data (eg, a file). + +As previously mentioned, the JPEG library reads compressed data from a "data +source" module. The library includes one data source module which knows how +to read from a stdio stream. You can use your own source module if you want +to do something else, as discussed later. + +If you use the standard source module, you must open the source stdio stream +beforehand. Typical code for this step looks like: + + FILE * infile; + ... + if ((infile = fopen(filename, "rb")) == NULL) { + fprintf(stderr, "can't open %s\n", filename); + exit(1); + } + jpeg_stdio_src(&cinfo, infile); + +where the last line invokes the standard source module. + +WARNING: it is critical that the binary compressed data be read unchanged. +On non-Unix systems the stdio library may perform newline translation or +otherwise corrupt binary data. To suppress this behavior, you may need to use +a "b" option to fopen (as shown above), or use setmode() or another routine to +put the stdio stream in binary mode. See cjpeg.c and djpeg.c for code that +has been found to work on many systems. + +You may not change the data source between calling jpeg_read_header() and +jpeg_finish_decompress(). If you wish to read a series of JPEG images from +a single source file, you should repeat the jpeg_read_header() to +jpeg_finish_decompress() sequence without reinitializing either the JPEG +object or the data source module; this prevents buffered input data from +being discarded. + + +3. Call jpeg_read_header() to obtain image info. + +Typical code for this step is just + + jpeg_read_header(&cinfo, TRUE); + +This will read the source datastream header markers, up to the beginning +of the compressed data proper. On return, the image dimensions and other +info have been stored in the JPEG object. The application may wish to +consult this information before selecting decompression parameters. + +More complex code is necessary if + * A suspending data source is used --- in that case jpeg_read_header() + may return before it has read all the header data. See "I/O suspension", + below. The normal stdio source manager will NOT cause this to happen. + * Abbreviated JPEG files are to be processed --- see the section on + abbreviated datastreams. Standard applications that deal only in + interchange JPEG files need not be concerned with this case either. + +It is permissible to stop at this point if you just wanted to find out the +image dimensions and other header info for a JPEG file. In that case, +call jpeg_destroy() when you are done with the JPEG object, or call +jpeg_abort() to return it to an idle state before selecting a new data +source and reading another header. + + +4. Set parameters for decompression. + +jpeg_read_header() sets appropriate default decompression parameters based on +the properties of the image (in particular, its colorspace). However, you +may well want to alter these defaults before beginning the decompression. +For example, the default is to produce full color output from a color file. +If you want colormapped output you must ask for it. Other options allow the +returned image to be scaled and allow various speed/quality tradeoffs to be +selected. "Decompression parameter selection", below, gives details. + +If the defaults are appropriate, nothing need be done at this step. + +Note that all default values are set by each call to jpeg_read_header(). +If you reuse a decompression object, you cannot expect your parameter +settings to be preserved across cycles, as you can for compression. +You must set desired parameter values each time. + + +5. jpeg_start_decompress(...); + +Once the parameter values are satisfactory, call jpeg_start_decompress() to +begin decompression. This will initialize internal state, allocate working +memory, and prepare for returning data. + +Typical code is just + + jpeg_start_decompress(&cinfo); + +If you have requested a multi-pass operating mode, such as 2-pass color +quantization, jpeg_start_decompress() will do everything needed before data +output can begin. In this case jpeg_start_decompress() may take quite a while +to complete. With a single-scan (non progressive) JPEG file and default +decompression parameters, this will not happen; jpeg_start_decompress() will +return quickly. + +After this call, the final output image dimensions, including any requested +scaling, are available in the JPEG object; so is the selected colormap, if +colormapped output has been requested. Useful fields include + + output_width image width and height, as scaled + output_height + out_color_components # of color components in out_color_space + output_components # of color components returned per pixel + colormap the selected colormap, if any + actual_number_of_colors number of entries in colormap + +output_components is 1 (a colormap index) when quantizing colors; otherwise it +equals out_color_components. It is the number of JSAMPLE values that will be +emitted per pixel in the output arrays. + +Typically you will need to allocate data buffers to hold the incoming image. +You will need output_width * output_components JSAMPLEs per scanline in your +output buffer, and a total of output_height scanlines will be returned. + +Note: if you are using the JPEG library's internal memory manager to allocate +data buffers (as djpeg does), then the manager's protocol requires that you +request large buffers *before* calling jpeg_start_decompress(). This is a +little tricky since the output_XXX fields are not normally valid then. You +can make them valid by calling jpeg_calc_output_dimensions() after setting the +relevant parameters (scaling, output color space, and quantization flag). + + +6. while (scan lines remain to be read) + jpeg_read_scanlines(...); + +Now you can read the decompressed image data by calling jpeg_read_scanlines() +one or more times. At each call, you pass in the maximum number of scanlines +to be read (ie, the height of your working buffer); jpeg_read_scanlines() +will return up to that many lines. The return value is the number of lines +actually read. The format of the returned data is discussed under "Data +formats", above. Don't forget that grayscale and color JPEGs will return +different data formats! + +Image data is returned in top-to-bottom scanline order. If you must write +out the image in bottom-to-top order, you can use the JPEG library's virtual +array mechanism to invert the data efficiently. Examples of this can be +found in the sample application djpeg. + +The library maintains a count of the number of scanlines returned so far +in the output_scanline field of the JPEG object. Usually you can just use +this variable as the loop counter, so that the loop test looks like +"while (cinfo.output_scanline < cinfo.output_height)". (Note that the test +should NOT be against image_height, unless you never use scaling. The +image_height field is the height of the original unscaled image.) +The return value always equals the change in the value of output_scanline. + +If you don't use a suspending data source, it is safe to assume that +jpeg_read_scanlines() reads at least one scanline per call, until the +bottom of the image has been reached. + +If you use a buffer larger than one scanline, it is NOT safe to assume that +jpeg_read_scanlines() fills it. (The current implementation returns only a +few scanlines per call, no matter how large a buffer you pass.) So you must +always provide a loop that calls jpeg_read_scanlines() repeatedly until the +whole image has been read. + + +7. jpeg_finish_decompress(...); + +After all the image data has been read, call jpeg_finish_decompress() to +complete the decompression cycle. This causes working memory associated +with the JPEG object to be released. + +Typical code: + + jpeg_finish_decompress(&cinfo); + +If using the stdio source manager, don't forget to close the source stdio +stream if necessary. + +It is an error to call jpeg_finish_decompress() before reading the correct +total number of scanlines. If you wish to abort decompression, call +jpeg_abort() as discussed below. + +After completing a decompression cycle, you may dispose of the JPEG object as +discussed next, or you may use it to decompress another image. In that case +return to step 2 or 3 as appropriate. If you do not change the source +manager, the next image will be read from the same source. + + +8. Release the JPEG decompression object. + +When you are done with a JPEG decompression object, destroy it by calling +jpeg_destroy_decompress() or jpeg_destroy(). The previous discussion of +destroying compression objects applies here too. + +Typical code: + + jpeg_destroy_decompress(&cinfo); + + +9. Aborting. + +You can abort a decompression cycle by calling jpeg_destroy_decompress() or +jpeg_destroy() if you don't need the JPEG object any more, or +jpeg_abort_decompress() or jpeg_abort() if you want to reuse the object. +The previous discussion of aborting compression cycles applies here too. + + +Mechanics of usage: include files, linking, etc +----------------------------------------------- + +Applications using the JPEG library should include the header file jpeglib.h +to obtain declarations of data types and routines. Before including +jpeglib.h, include system headers that define at least the typedefs FILE and +size_t. On ANSI-conforming systems, including is sufficient; on +older Unix systems, you may need to define size_t. + +If the application needs to refer to individual JPEG library error codes, also +include jerror.h to define those symbols. + +jpeglib.h indirectly includes the files jconfig.h and jmorecfg.h. If you are +installing the JPEG header files in a system directory, you will want to +install all four files: jpeglib.h, jerror.h, jconfig.h, jmorecfg.h. + +The most convenient way to include the JPEG code into your executable program +is to prepare a library file ("libjpeg.a", or a corresponding name on non-Unix +machines) and reference it at your link step. If you use only half of the +library (only compression or only decompression), only that much code will be +included from the library, unless your linker is hopelessly brain-damaged. +The supplied makefiles build libjpeg.a automatically (see install.doc). + +While you can build the JPEG library as a shared library if the whim strikes +you, we don't really recommend it. The trouble with shared libraries is that +at some point you'll probably try to substitute a new version of the library +without recompiling the calling applications. That generally doesn't work +because the parameter struct declarations usually change with each new +version. In other words, the library's API is *not* guaranteed binary +compatible across versions; we only try to ensure source-code compatibility. +(In hindsight, it might have been smarter to hide the parameter structs from +applications and introduce a ton of access functions instead. Too late now, +however.) + +On some systems your application may need to set up a signal handler to ensure +that temporary files are deleted if the program is interrupted. This is most +critical if you are on MS-DOS and use the jmemdos.c memory manager back end; +it will try to grab extended memory for temp files, and that space will NOT be +freed automatically. See cjpeg.c or djpeg.c for an example signal handler. + +It may be worth pointing out that the core JPEG library does not actually +require the stdio library: only the default source/destination managers and +error handler need it. You can use the library in a stdio-less environment +if you replace those modules and use jmemnobs.c (or another memory manager of +your own devising). More info about the minimum system library requirements +may be found in jinclude.h. + + +ADVANCED FEATURES +================= + +Compression parameter selection +------------------------------- + +This section describes all the optional parameters you can set for JPEG +compression, as well as the "helper" routines provided to assist in this +task. Proper setting of some parameters requires detailed understanding +of the JPEG standard; if you don't know what a parameter is for, it's best +not to mess with it! See REFERENCES in the README file for pointers to +more info about JPEG. + +It's a good idea to call jpeg_set_defaults() first, even if you plan to set +all the parameters; that way your code is more likely to work with future JPEG +libraries that have additional parameters. For the same reason, we recommend +you use a helper routine where one is provided, in preference to twiddling +cinfo fields directly. + +The helper routines are: + +jpeg_set_defaults (j_compress_ptr cinfo) + This routine sets all JPEG parameters to reasonable defaults, using + only the input image's color space (field in_color_space, which must + already be set in cinfo). Many applications will only need to use + this routine and perhaps jpeg_set_quality(). + +jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace) + Sets the JPEG file's colorspace (field jpeg_color_space) as specified, + and sets other color-space-dependent parameters appropriately. See + "Special color spaces", below, before using this. A large number of + parameters, including all per-component parameters, are set by this + routine; if you want to twiddle individual parameters you should call + jpeg_set_colorspace() before rather than after. + +jpeg_default_colorspace (j_compress_ptr cinfo) + Selects an appropriate JPEG colorspace based on cinfo->in_color_space, + and calls jpeg_set_colorspace(). This is actually a subroutine of + jpeg_set_defaults(). It's broken out in case you want to change + just the colorspace-dependent JPEG parameters. + +jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline) + Constructs JPEG quantization tables appropriate for the indicated + quality setting. The quality value is expressed on the 0..100 scale + recommended by IJG (cjpeg's "-quality" switch uses this routine). + Note that the exact mapping from quality values to tables may change + in future IJG releases as more is learned about DCT quantization. + If the force_baseline parameter is TRUE, then the quantization table + entries are constrained to the range 1..255 for full JPEG baseline + compatibility. In the current implementation, this only makes a + difference for quality settings below 25, and it effectively prevents + very small/low quality files from being generated. The IJG decoder + is capable of reading the non-baseline files generated at low quality + settings when force_baseline is FALSE, but other decoders may not be. + +jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor, + boolean force_baseline) + Same as jpeg_set_quality() except that the generated tables are the + sample tables given in the JPEC spec section K.1, multiplied by the + specified scale factor (which is expressed as a percentage; thus + scale_factor = 100 reproduces the spec's tables). Note that larger + scale factors give lower quality. This entry point is useful for + conforming to the Adobe PostScript DCT conventions, but we do not + recommend linear scaling as a user-visible quality scale otherwise. + force_baseline again constrains the computed table entries to 1..255. + +int jpeg_quality_scaling (int quality) + Converts a value on the IJG-recommended quality scale to a linear + scaling percentage. Note that this routine may change or go away + in future releases --- IJG may choose to adopt a scaling method that + can't be expressed as a simple scalar multiplier, in which case the + premise of this routine collapses. Caveat user. + +jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl, + const unsigned int *basic_table, + int scale_factor, boolean force_baseline) + Allows an arbitrary quantization table to be created. which_tbl + indicates which table slot to fill. basic_table points to an array + of 64 unsigned ints given in normal array order. These values are + multiplied by scale_factor/100 and then clamped to the range 1..65535 + (or to 1..255 if force_baseline is TRUE). + CAUTION: prior to library version 6a, jpeg_add_quant_table expected + the basic table to be given in JPEG zigzag order. If you need to + write code that works with either older or newer versions of this + routine, you must check the library version number. Something like + "#if JPEG_LIB_VERSION >= 61" is the right test. + +jpeg_simple_progression (j_compress_ptr cinfo) + Generates a default scan script for writing a progressive-JPEG file. + This is the recommended method of creating a progressive file, + unless you want to make a custom scan sequence. You must ensure that + the JPEG color space is set correctly before calling this routine. + + +Compression parameters (cinfo fields) include: + +J_DCT_METHOD dct_method + Selects the algorithm used for the DCT step. Choices are: + JDCT_ISLOW: slow but accurate integer algorithm + JDCT_IFAST: faster, less accurate integer method + JDCT_FLOAT: floating-point method + JDCT_DEFAULT: default method (normally JDCT_ISLOW) + JDCT_FASTEST: fastest method (normally JDCT_IFAST) + The FLOAT method is very slightly more accurate than the ISLOW method, + but may give different results on different machines due to varying + roundoff behavior. The integer methods should give the same results + on all machines. On machines with sufficiently fast FP hardware, the + floating-point method may also be the fastest. The IFAST method is + considerably less accurate than the other two; its use is not + recommended if high quality is a concern. JDCT_DEFAULT and + JDCT_FASTEST are macros configurable by each installation. + +J_COLOR_SPACE jpeg_color_space +int num_components + The JPEG color space and corresponding number of components; see + "Special color spaces", below, for more info. We recommend using + jpeg_set_color_space() if you want to change these. + +boolean optimize_coding + TRUE causes the compressor to compute optimal Huffman coding tables + for the image. This requires an extra pass over the data and + therefore costs a good deal of space and time. The default is + FALSE, which tells the compressor to use the supplied or default + Huffman tables. In most cases optimal tables save only a few percent + of file size compared to the default tables. Note that when this is + TRUE, you need not supply Huffman tables at all, and any you do + supply will be overwritten. + +unsigned int restart_interval +int restart_in_rows + To emit restart markers in the JPEG file, set one of these nonzero. + Set restart_interval to specify the exact interval in MCU blocks. + Set restart_in_rows to specify the interval in MCU rows. (If + restart_in_rows is not 0, then restart_interval is set after the + image width in MCUs is computed.) Defaults are zero (no restarts). + One restart marker per MCU row is often a good choice. + NOTE: the overhead of restart markers is higher in grayscale JPEG + files than in color files, and MUCH higher in progressive JPEGs. + If you use restarts, you may want to use larger intervals in those + cases. + +const jpeg_scan_info * scan_info +int num_scans + By default, scan_info is NULL; this causes the compressor to write a + single-scan sequential JPEG file. If not NULL, scan_info points to + an array of scan definition records of length num_scans. The + compressor will then write a JPEG file having one scan for each scan + definition record. This is used to generate noninterleaved or + progressive JPEG files. The library checks that the scan array + defines a valid JPEG scan sequence. (jpeg_simple_progression creates + a suitable scan definition array for progressive JPEG.) This is + discussed further under "Progressive JPEG support". + +int smoothing_factor + If non-zero, the input image is smoothed; the value should be 1 for + minimal smoothing to 100 for maximum smoothing. Consult jcsample.c + for details of the smoothing algorithm. The default is zero. + +boolean write_JFIF_header + If TRUE, a JFIF APP0 marker is emitted. jpeg_set_defaults() and + jpeg_set_colorspace() set this TRUE if a JFIF-legal JPEG color space + (ie, YCbCr or grayscale) is selected, otherwise FALSE. + +UINT8 JFIF_major_version +UINT8 JFIF_minor_version + The version number to be written into the JFIF marker. + jpeg_set_defaults() initializes the version to 1.01 (major=minor=1). + You should set it to 1.02 (major=1, minor=2) if you plan to write + any JFIF 1.02 extension markers. + +UINT8 density_unit +UINT16 X_density +UINT16 Y_density + The resolution information to be written into the JFIF marker; + not used otherwise. density_unit may be 0 for unknown, + 1 for dots/inch, or 2 for dots/cm. The default values are 0,1,1 + indicating square pixels of unknown size. + +boolean write_Adobe_marker + If TRUE, an Adobe APP14 marker is emitted. jpeg_set_defaults() and + jpeg_set_colorspace() set this TRUE if JPEG color space RGB, CMYK, + or YCCK is selected, otherwise FALSE. It is generally a bad idea + to set both write_JFIF_header and write_Adobe_marker. In fact, + you probably shouldn't change the default settings at all --- the + default behavior ensures that the JPEG file's color space can be + recognized by the decoder. + +JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS] + Pointers to coefficient quantization tables, one per table slot, + or NULL if no table is defined for a slot. Usually these should + be set via one of the above helper routines; jpeg_add_quant_table() + is general enough to define any quantization table. The other + routines will set up table slot 0 for luminance quality and table + slot 1 for chrominance. + +JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS] +JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS] + Pointers to Huffman coding tables, one per table slot, or NULL if + no table is defined for a slot. Slots 0 and 1 are filled with the + JPEG sample tables by jpeg_set_defaults(). If you need to allocate + more table structures, jpeg_alloc_huff_table() may be used. + Note that optimal Huffman tables can be computed for an image + by setting optimize_coding, as discussed above; there's seldom + any need to mess with providing your own Huffman tables. + +There are some additional cinfo fields which are not documented here +because you currently can't change them; for example, you can't set +arith_code TRUE because arithmetic coding is unsupported. + + +Per-component parameters are stored in the struct cinfo.comp_info[i] for +component number i. Note that components here refer to components of the +JPEG color space, *not* the source image color space. A suitably large +comp_info[] array is allocated by jpeg_set_defaults(); if you choose not +to use that routine, it's up to you to allocate the array. + +int component_id + The one-byte identifier code to be recorded in the JPEG file for + this component. For the standard color spaces, we recommend you + leave the default values alone. + +int h_samp_factor +int v_samp_factor + Horizontal and vertical sampling factors for the component; must + be 1..4 according to the JPEG standard. Note that larger sampling + factors indicate a higher-resolution component; many people find + this behavior quite unintuitive. The default values are 2,2 for + luminance components and 1,1 for chrominance components, except + for grayscale where 1,1 is used. + +int quant_tbl_no + Quantization table number for component. The default value is + 0 for luminance components and 1 for chrominance components. + +int dc_tbl_no +int ac_tbl_no + DC and AC entropy coding table numbers. The default values are + 0 for luminance components and 1 for chrominance components. + +int component_index + Must equal the component's index in comp_info[]. (Beginning in + release v6, the compressor library will fill this in automatically; + you don't have to.) + + +Decompression parameter selection +--------------------------------- + +Decompression parameter selection is somewhat simpler than compression +parameter selection, since all of the JPEG internal parameters are +recorded in the source file and need not be supplied by the application. +(Unless you are working with abbreviated files, in which case see +"Abbreviated datastreams", below.) Decompression parameters control +the postprocessing done on the image to deliver it in a format suitable +for the application's use. Many of the parameters control speed/quality +tradeoffs, in which faster decompression may be obtained at the price of +a poorer-quality image. The defaults select the highest quality (slowest) +processing. + +The following fields in the JPEG object are set by jpeg_read_header() and +may be useful to the application in choosing decompression parameters: + +JDIMENSION image_width Width and height of image +JDIMENSION image_height +int num_components Number of color components +J_COLOR_SPACE jpeg_color_space Colorspace of image +boolean saw_JFIF_marker TRUE if a JFIF APP0 marker was seen + UINT8 JFIF_major_version Version information from JFIF marker + UINT8 JFIF_minor_version + UINT8 density_unit Resolution data from JFIF marker + UINT16 X_density + UINT16 Y_density +boolean saw_Adobe_marker TRUE if an Adobe APP14 marker was seen + UINT8 Adobe_transform Color transform code from Adobe marker + +The JPEG color space, unfortunately, is something of a guess since the JPEG +standard proper does not provide a way to record it. In practice most files +adhere to the JFIF or Adobe conventions, and the decoder will recognize these +correctly. See "Special color spaces", below, for more info. + + +The decompression parameters that determine the basic properties of the +returned image are: + +J_COLOR_SPACE out_color_space + Output color space. jpeg_read_header() sets an appropriate default + based on jpeg_color_space; typically it will be RGB or grayscale. + The application can change this field to request output in a different + colorspace. For example, set it to JCS_GRAYSCALE to get grayscale + output from a color file. (This is useful for previewing: grayscale + output is faster than full color since the color components need not + be processed.) Note that not all possible color space transforms are + currently implemented; you may need to extend jdcolor.c if you want an + unusual conversion. + +unsigned int scale_num, scale_denom + Scale the image by the fraction scale_num/scale_denom. Default is + 1/1, or no scaling. Currently, the only supported scaling ratios + are 1/1, 1/2, 1/4, and 1/8. (The library design allows for arbitrary + scaling ratios but this is not likely to be implemented any time soon.) + Smaller scaling ratios permit significantly faster decoding since + fewer pixels need be processed and a simpler IDCT method can be used. + +boolean quantize_colors + If set TRUE, colormapped output will be delivered. Default is FALSE, + meaning that full-color output will be delivered. + +The next three parameters are relevant only if quantize_colors is TRUE. + +int desired_number_of_colors + Maximum number of colors to use in generating a library-supplied color + map (the actual number of colors is returned in a different field). + Default 256. Ignored when the application supplies its own color map. + +boolean two_pass_quantize + If TRUE, an extra pass over the image is made to select a custom color + map for the image. This usually looks a lot better than the one-size- + fits-all colormap that is used otherwise. Default is TRUE. Ignored + when the application supplies its own color map. + +J_DITHER_MODE dither_mode + Selects color dithering method. Supported values are: + JDITHER_NONE no dithering: fast, very low quality + JDITHER_ORDERED ordered dither: moderate speed and quality + JDITHER_FS Floyd-Steinberg dither: slow, high quality + Default is JDITHER_FS. (At present, ordered dither is implemented + only in the single-pass, standard-colormap case. If you ask for + ordered dither when two_pass_quantize is TRUE or when you supply + an external color map, you'll get F-S dithering.) + +When quantize_colors is TRUE, the target color map is described by the next +two fields. colormap is set to NULL by jpeg_read_header(). The application +can supply a color map by setting colormap non-NULL and setting +actual_number_of_colors to the map size. Otherwise, jpeg_start_decompress() +selects a suitable color map and sets these two fields itself. +[Implementation restriction: at present, an externally supplied colormap is +only accepted for 3-component output color spaces.] + +JSAMPARRAY colormap + The color map, represented as a 2-D pixel array of out_color_components + rows and actual_number_of_colors columns. Ignored if not quantizing. + CAUTION: if the JPEG library creates its own colormap, the storage + pointed to by this field is released by jpeg_finish_decompress(). + Copy the colormap somewhere else first, if you want to save it. + +int actual_number_of_colors + The number of colors in the color map. + +Additional decompression parameters that the application may set include: + +J_DCT_METHOD dct_method + Selects the algorithm used for the DCT step. Choices are the same + as described above for compression. + +boolean do_fancy_upsampling + If TRUE, do careful upsampling of chroma components. If FALSE, + a faster but sloppier method is used. Default is TRUE. The visual + impact of the sloppier method is often very small. + +boolean do_block_smoothing + If TRUE, interblock smoothing is applied in early stages of decoding + progressive JPEG files; if FALSE, not. Default is TRUE. Early + progression stages look "fuzzy" with smoothing, "blocky" without. + In any case, block smoothing ceases to be applied after the first few + AC coefficients are known to full accuracy, so it is relevant only + when using buffered-image mode for progressive images. + +boolean enable_1pass_quant +boolean enable_external_quant +boolean enable_2pass_quant + These are significant only in buffered-image mode, which is + described in its own section below. + + +The output image dimensions are given by the following fields. These are +computed from the source image dimensions and the decompression parameters +by jpeg_start_decompress(). You can also call jpeg_calc_output_dimensions() +to obtain the values that will result from the current parameter settings. +This can be useful if you are trying to pick a scaling ratio that will get +close to a desired target size. It's also important if you are using the +JPEG library's memory manager to allocate output buffer space, because you +are supposed to request such buffers *before* jpeg_start_decompress(). + +JDIMENSION output_width Actual dimensions of output image. +JDIMENSION output_height +int out_color_components Number of color components in out_color_space. +int output_components Number of color components returned. +int rec_outbuf_height Recommended height of scanline buffer. + +When quantizing colors, output_components is 1, indicating a single color map +index per pixel. Otherwise it equals out_color_components. The output arrays +are required to be output_width * output_components JSAMPLEs wide. + +rec_outbuf_height is the recommended minimum height (in scanlines) of the +buffer passed to jpeg_read_scanlines(). If the buffer is smaller, the +library will still work, but time will be wasted due to unnecessary data +copying. In high-quality modes, rec_outbuf_height is always 1, but some +faster, lower-quality modes set it to larger values (typically 2 to 4). +If you are going to ask for a high-speed processing mode, you may as well +go to the trouble of honoring rec_outbuf_height so as to avoid data copying. +(An output buffer larger than rec_outbuf_height lines is OK, but won't +provide any material speed improvement over that height.) + + +Special color spaces +-------------------- + +The JPEG standard itself is "color blind" and doesn't specify any particular +color space. It is customary to convert color data to a luminance/chrominance +color space before compressing, since this permits greater compression. The +existing de-facto JPEG file format standards specify YCbCr or grayscale data +(JFIF), or grayscale, RGB, YCbCr, CMYK, or YCCK (Adobe). For special +applications such as multispectral images, other color spaces can be used, +but it must be understood that such files will be unportable. + +The JPEG library can handle the most common colorspace conversions (namely +RGB <=> YCbCr and CMYK <=> YCCK). It can also deal with data of an unknown +color space, passing it through without conversion. If you deal extensively +with an unusual color space, you can easily extend the library to understand +additional color spaces and perform appropriate conversions. + +For compression, the source data's color space is specified by field +in_color_space. This is transformed to the JPEG file's color space given +by jpeg_color_space. jpeg_set_defaults() chooses a reasonable JPEG color +space depending on in_color_space, but you can override this by calling +jpeg_set_colorspace(). Of course you must select a supported transformation. +jccolor.c currently supports the following transformations: + RGB => YCbCr + RGB => GRAYSCALE + YCbCr => GRAYSCALE + CMYK => YCCK +plus the null transforms: GRAYSCALE => GRAYSCALE, RGB => RGB, +YCbCr => YCbCr, CMYK => CMYK, YCCK => YCCK, and UNKNOWN => UNKNOWN. + +The de-facto file format standards (JFIF and Adobe) specify APPn markers that +indicate the color space of the JPEG file. It is important to ensure that +these are written correctly, or omitted if the JPEG file's color space is not +one of the ones supported by the de-facto standards. jpeg_set_colorspace() +will set the compression parameters to include or omit the APPn markers +properly, so long as it is told the truth about the JPEG color space. +For example, if you are writing some random 3-component color space without +conversion, don't try to fake out the library by setting in_color_space and +jpeg_color_space to JCS_YCbCr; use JCS_UNKNOWN. You may want to write an +APPn marker of your own devising to identify the colorspace --- see "Special +markers", below. + +When told that the color space is UNKNOWN, the library will default to using +luminance-quality compression parameters for all color components. You may +well want to change these parameters. See the source code for +jpeg_set_colorspace(), in jcparam.c, for details. + +For decompression, the JPEG file's color space is given in jpeg_color_space, +and this is transformed to the output color space out_color_space. +jpeg_read_header's setting of jpeg_color_space can be relied on if the file +conforms to JFIF or Adobe conventions, but otherwise it is no better than a +guess. If you know the JPEG file's color space for certain, you can override +jpeg_read_header's guess by setting jpeg_color_space. jpeg_read_header also +selects a default output color space based on (its guess of) jpeg_color_space; +set out_color_space to override this. Again, you must select a supported +transformation. jdcolor.c currently supports + YCbCr => GRAYSCALE + YCbCr => RGB + GRAYSCALE => RGB + YCCK => CMYK +as well as the null transforms. (Since GRAYSCALE=>RGB is provided, an +application can force grayscale JPEGs to look like color JPEGs if it only +wants to handle one case.) + +The two-pass color quantizer, jquant2.c, is specialized to handle RGB data +(it weights distances appropriately for RGB colors). You'll need to modify +the code if you want to use it for non-RGB output color spaces. Note that +jquant2.c is used to map to an application-supplied colormap as well as for +the normal two-pass colormap selection process. + +CAUTION: it appears that Adobe Photoshop writes inverted data in CMYK JPEG +files: 0 represents 100% ink coverage, rather than 0% ink as you'd expect. +This is arguably a bug in Photoshop, but if you need to work with Photoshop +CMYK files, you will have to deal with it in your application. We cannot +"fix" this in the library by inverting the data during the CMYK<=>YCCK +transform, because that would break other applications, notably Ghostscript. +Photoshop versions prior to 3.0 write EPS files containing JPEG-encoded CMYK +data in the same inverted-YCCK representation used in bare JPEG files, but +the surrounding PostScript code performs an inversion using the PS image +operator. I am told that Photoshop 3.0 will write uninverted YCCK in +EPS/JPEG files, and will omit the PS-level inversion. (But the data +polarity used in bare JPEG files will not change in 3.0.) In either case, +the JPEG library must not invert the data itself, or else Ghostscript would +read these EPS files incorrectly. + + +Error handling +-------------- + +When the default error handler is used, any error detected inside the JPEG +routines will cause a message to be printed on stderr, followed by exit(). +You can supply your own error handling routines to override this behavior +and to control the treatment of nonfatal warnings and trace/debug messages. +The file example.c illustrates the most common case, which is to have the +application regain control after an error rather than exiting. + +The JPEG library never writes any message directly; it always goes through +the error handling routines. Three classes of messages are recognized: + * Fatal errors: the library cannot continue. + * Warnings: the library can continue, but the data is corrupt, and a + damaged output image is likely to result. + * Trace/informational messages. These come with a trace level indicating + the importance of the message; you can control the verbosity of the + program by adjusting the maximum trace level that will be displayed. + +You may, if you wish, simply replace the entire JPEG error handling module +(jerror.c) with your own code. However, you can avoid code duplication by +only replacing some of the routines depending on the behavior you need. +This is accomplished by calling jpeg_std_error() as usual, but then overriding +some of the method pointers in the jpeg_error_mgr struct, as illustrated by +example.c. + +All of the error handling routines will receive a pointer to the JPEG object +(a j_common_ptr which points to either a jpeg_compress_struct or a +jpeg_decompress_struct; if you need to tell which, test the is_decompressor +field). This struct includes a pointer to the error manager struct in its +"err" field. Frequently, custom error handler routines will need to access +additional data which is not known to the JPEG library or the standard error +handler. The most convenient way to do this is to embed either the JPEG +object or the jpeg_error_mgr struct in a larger structure that contains +additional fields; then casting the passed pointer provides access to the +additional fields. Again, see example.c for one way to do it. (Beginning +with IJG version 6b, there is also a void pointer "client_data" in each +JPEG object, which the application can also use to find related data. +The library does not touch client_data at all.) + +The individual methods that you might wish to override are: + +error_exit (j_common_ptr cinfo) + Receives control for a fatal error. Information sufficient to + generate the error message has been stored in cinfo->err; call + output_message to display it. Control must NOT return to the caller; + generally this routine will exit() or longjmp() somewhere. + Typically you would override this routine to get rid of the exit() + default behavior. Note that if you continue processing, you should + clean up the JPEG object with jpeg_abort() or jpeg_destroy(). + +output_message (j_common_ptr cinfo) + Actual output of any JPEG message. Override this to send messages + somewhere other than stderr. Note that this method does not know + how to generate a message, only where to send it. + +format_message (j_common_ptr cinfo, char * buffer) + Constructs a readable error message string based on the error info + stored in cinfo->err. This method is called by output_message. Few + applications should need to override this method. One possible + reason for doing so is to implement dynamic switching of error message + language. + +emit_message (j_common_ptr cinfo, int msg_level) + Decide whether or not to emit a warning or trace message; if so, + calls output_message. The main reason for overriding this method + would be to abort on warnings. msg_level is -1 for warnings, + 0 and up for trace messages. + +Only error_exit() and emit_message() are called from the rest of the JPEG +library; the other two are internal to the error handler. + +The actual message texts are stored in an array of strings which is pointed to +by the field err->jpeg_message_table. The messages are numbered from 0 to +err->last_jpeg_message, and it is these code numbers that are used in the +JPEG library code. You could replace the message texts (for instance, with +messages in French or German) by changing the message table pointer. See +jerror.h for the default texts. CAUTION: this table will almost certainly +change or grow from one library version to the next. + +It may be useful for an application to add its own message texts that are +handled by the same mechanism. The error handler supports a second "add-on" +message table for this purpose. To define an addon table, set the pointer +err->addon_message_table and the message numbers err->first_addon_message and +err->last_addon_message. If you number the addon messages beginning at 1000 +or so, you won't have to worry about conflicts with the library's built-in +messages. See the sample applications cjpeg/djpeg for an example of using +addon messages (the addon messages are defined in cderror.h). + +Actual invocation of the error handler is done via macros defined in jerror.h: + ERREXITn(...) for fatal errors + WARNMSn(...) for corrupt-data warnings + TRACEMSn(...) for trace and informational messages. +These macros store the message code and any additional parameters into the +error handler struct, then invoke the error_exit() or emit_message() method. +The variants of each macro are for varying numbers of additional parameters. +The additional parameters are inserted into the generated message using +standard printf() format codes. + +See jerror.h and jerror.c for further details. + + +Compressed data handling (source and destination managers) +---------------------------------------------------------- + +The JPEG compression library sends its compressed data to a "destination +manager" module. The default destination manager just writes the data to a +stdio stream, but you can provide your own manager to do something else. +Similarly, the decompression library calls a "source manager" to obtain the +compressed data; you can provide your own source manager if you want the data +to come from somewhere other than a stdio stream. + +In both cases, compressed data is processed a bufferload at a time: the +destination or source manager provides a work buffer, and the library invokes +the manager only when the buffer is filled or emptied. (You could define a +one-character buffer to force the manager to be invoked for each byte, but +that would be rather inefficient.) The buffer's size and location are +controlled by the manager, not by the library. For example, if you desired to +decompress a JPEG datastream that was all in memory, you could just make the +buffer pointer and length point to the original data in memory. Then the +buffer-reload procedure would be invoked only if the decompressor ran off the +end of the datastream, which would indicate an erroneous datastream. + +The work buffer is defined as an array of datatype JOCTET, which is generally +"char" or "unsigned char". On a machine where char is not exactly 8 bits +wide, you must define JOCTET as a wider data type and then modify the data +source and destination modules to transcribe the work arrays into 8-bit units +on external storage. + +A data destination manager struct contains a pointer and count defining the +next byte to write in the work buffer and the remaining free space: + + JOCTET * next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + +The library increments the pointer and decrements the count until the buffer +is filled. The manager's empty_output_buffer method must reset the pointer +and count. The manager is expected to remember the buffer's starting address +and total size in private fields not visible to the library. + +A data destination manager provides three methods: + +init_destination (j_compress_ptr cinfo) + Initialize destination. This is called by jpeg_start_compress() + before any data is actually written. It must initialize + next_output_byte and free_in_buffer. free_in_buffer must be + initialized to a positive value. + +empty_output_buffer (j_compress_ptr cinfo) + This is called whenever the buffer has filled (free_in_buffer + reaches zero). In typical applications, it should write out the + *entire* buffer (use the saved start address and buffer length; + ignore the current state of next_output_byte and free_in_buffer). + Then reset the pointer & count to the start of the buffer, and + return TRUE indicating that the buffer has been dumped. + free_in_buffer must be set to a positive value when TRUE is + returned. A FALSE return should only be used when I/O suspension is + desired (this operating mode is discussed in the next section). + +term_destination (j_compress_ptr cinfo) + Terminate destination --- called by jpeg_finish_compress() after all + data has been written. In most applications, this must flush any + data remaining in the buffer. Use either next_output_byte or + free_in_buffer to determine how much data is in the buffer. + +term_destination() is NOT called by jpeg_abort() or jpeg_destroy(). If you +want the destination manager to be cleaned up during an abort, you must do it +yourself. + +You will also need code to create a jpeg_destination_mgr struct, fill in its +method pointers, and insert a pointer to the struct into the "dest" field of +the JPEG compression object. This can be done in-line in your setup code if +you like, but it's probably cleaner to provide a separate routine similar to +the jpeg_stdio_dest() routine of the supplied destination manager. + +Decompression source managers follow a parallel design, but with some +additional frammishes. The source manager struct contains a pointer and count +defining the next byte to read from the work buffer and the number of bytes +remaining: + + const JOCTET * next_input_byte; /* => next byte to read from buffer */ + size_t bytes_in_buffer; /* # of bytes remaining in buffer */ + +The library increments the pointer and decrements the count until the buffer +is emptied. The manager's fill_input_buffer method must reset the pointer and +count. In most applications, the manager must remember the buffer's starting +address and total size in private fields not visible to the library. + +A data source manager provides five methods: + +init_source (j_decompress_ptr cinfo) + Initialize source. This is called by jpeg_read_header() before any + data is actually read. Unlike init_destination(), it may leave + bytes_in_buffer set to 0 (in which case a fill_input_buffer() call + will occur immediately). + +fill_input_buffer (j_decompress_ptr cinfo) + This is called whenever bytes_in_buffer has reached zero and more + data is wanted. In typical applications, it should read fresh data + into the buffer (ignoring the current state of next_input_byte and + bytes_in_buffer), reset the pointer & count to the start of the + buffer, and return TRUE indicating that the buffer has been reloaded. + It is not necessary to fill the buffer entirely, only to obtain at + least one more byte. bytes_in_buffer MUST be set to a positive value + if TRUE is returned. A FALSE return should only be used when I/O + suspension is desired (this mode is discussed in the next section). + +skip_input_data (j_decompress_ptr cinfo, long num_bytes) + Skip num_bytes worth of data. The buffer pointer and count should + be advanced over num_bytes input bytes, refilling the buffer as + needed. This is used to skip over a potentially large amount of + uninteresting data (such as an APPn marker). In some applications + it may be possible to optimize away the reading of the skipped data, + but it's not clear that being smart is worth much trouble; large + skips are uncommon. bytes_in_buffer may be zero on return. + A zero or negative skip count should be treated as a no-op. + +resync_to_restart (j_decompress_ptr cinfo, int desired) + This routine is called only when the decompressor has failed to find + a restart (RSTn) marker where one is expected. Its mission is to + find a suitable point for resuming decompression. For most + applications, we recommend that you just use the default resync + procedure, jpeg_resync_to_restart(). However, if you are able to back + up in the input data stream, or if you have a-priori knowledge about + the likely location of restart markers, you may be able to do better. + Read the read_restart_marker() and jpeg_resync_to_restart() routines + in jdmarker.c if you think you'd like to implement your own resync + procedure. + +term_source (j_decompress_ptr cinfo) + Terminate source --- called by jpeg_finish_decompress() after all + data has been read. Often a no-op. + +For both fill_input_buffer() and skip_input_data(), there is no such thing +as an EOF return. If the end of the file has been reached, the routine has +a choice of exiting via ERREXIT() or inserting fake data into the buffer. +In most cases, generating a warning message and inserting a fake EOI marker +is the best course of action --- this will allow the decompressor to output +however much of the image is there. In pathological cases, the decompressor +may swallow the EOI and again demand data ... just keep feeding it fake EOIs. +jdatasrc.c illustrates the recommended error recovery behavior. + +term_source() is NOT called by jpeg_abort() or jpeg_destroy(). If you want +the source manager to be cleaned up during an abort, you must do it yourself. + +You will also need code to create a jpeg_source_mgr struct, fill in its method +pointers, and insert a pointer to the struct into the "src" field of the JPEG +decompression object. This can be done in-line in your setup code if you +like, but it's probably cleaner to provide a separate routine similar to the +jpeg_stdio_src() routine of the supplied source manager. + +For more information, consult the stdio source and destination managers +in jdatasrc.c and jdatadst.c. + + +I/O suspension +-------------- + +Some applications need to use the JPEG library as an incremental memory-to- +memory filter: when the compressed data buffer is filled or emptied, they want +control to return to the outer loop, rather than expecting that the buffer can +be emptied or reloaded within the data source/destination manager subroutine. +The library supports this need by providing an "I/O suspension" mode, which we +describe in this section. + +The I/O suspension mode is not a panacea: nothing is guaranteed about the +maximum amount of time spent in any one call to the library, so it will not +eliminate response-time problems in single-threaded applications. If you +need guaranteed response time, we suggest you "bite the bullet" and implement +a real multi-tasking capability. + +To use I/O suspension, cooperation is needed between the calling application +and the data source or destination manager; you will always need a custom +source/destination manager. (Please read the previous section if you haven't +already.) The basic idea is that the empty_output_buffer() or +fill_input_buffer() routine is a no-op, merely returning FALSE to indicate +that it has done nothing. Upon seeing this, the JPEG library suspends +operation and returns to its caller. The surrounding application is +responsible for emptying or refilling the work buffer before calling the +JPEG library again. + +Compression suspension: + +For compression suspension, use an empty_output_buffer() routine that returns +FALSE; typically it will not do anything else. This will cause the +compressor to return to the caller of jpeg_write_scanlines(), with the return +value indicating that not all the supplied scanlines have been accepted. +The application must make more room in the output buffer, adjust the output +buffer pointer/count appropriately, and then call jpeg_write_scanlines() +again, pointing to the first unconsumed scanline. + +When forced to suspend, the compressor will backtrack to a convenient stopping +point (usually the start of the current MCU); it will regenerate some output +data when restarted. Therefore, although empty_output_buffer() is only +called when the buffer is filled, you should NOT write out the entire buffer +after a suspension. Write only the data up to the current position of +next_output_byte/free_in_buffer. The data beyond that point will be +regenerated after resumption. + +Because of the backtracking behavior, a good-size output buffer is essential +for efficiency; you don't want the compressor to suspend often. (In fact, an +overly small buffer could lead to infinite looping, if a single MCU required +more data than would fit in the buffer.) We recommend a buffer of at least +several Kbytes. You may want to insert explicit code to ensure that you don't +call jpeg_write_scanlines() unless there is a reasonable amount of space in +the output buffer; in other words, flush the buffer before trying to compress +more data. + +The compressor does not allow suspension while it is trying to write JPEG +markers at the beginning and end of the file. This means that: + * At the beginning of a compression operation, there must be enough free + space in the output buffer to hold the header markers (typically 600 or + so bytes). The recommended buffer size is bigger than this anyway, so + this is not a problem as long as you start with an empty buffer. However, + this restriction might catch you if you insert large special markers, such + as a JFIF thumbnail image, without flushing the buffer afterwards. + * When you call jpeg_finish_compress(), there must be enough space in the + output buffer to emit any buffered data and the final EOI marker. In the + current implementation, half a dozen bytes should suffice for this, but + for safety's sake we recommend ensuring that at least 100 bytes are free + before calling jpeg_finish_compress(). + +A more significant restriction is that jpeg_finish_compress() cannot suspend. +This means you cannot use suspension with multi-pass operating modes, namely +Huffman code optimization and multiple-scan output. Those modes write the +whole file during jpeg_finish_compress(), which will certainly result in +buffer overrun. (Note that this restriction applies only to compression, +not decompression. The decompressor supports input suspension in all of its +operating modes.) + +Decompression suspension: + +For decompression suspension, use a fill_input_buffer() routine that simply +returns FALSE (except perhaps during error recovery, as discussed below). +This will cause the decompressor to return to its caller with an indication +that suspension has occurred. This can happen at four places: + * jpeg_read_header(): will return JPEG_SUSPENDED. + * jpeg_start_decompress(): will return FALSE, rather than its usual TRUE. + * jpeg_read_scanlines(): will return the number of scanlines already + completed (possibly 0). + * jpeg_finish_decompress(): will return FALSE, rather than its usual TRUE. +The surrounding application must recognize these cases, load more data into +the input buffer, and repeat the call. In the case of jpeg_read_scanlines(), +increment the passed pointers past any scanlines successfully read. + +Just as with compression, the decompressor will typically backtrack to a +convenient restart point before suspending. When fill_input_buffer() is +called, next_input_byte/bytes_in_buffer point to the current restart point, +which is where the decompressor will backtrack to if FALSE is returned. +The data beyond that position must NOT be discarded if you suspend; it needs +to be re-read upon resumption. In most implementations, you'll need to shift +this data down to the start of your work buffer and then load more data after +it. Again, this behavior means that a several-Kbyte work buffer is essential +for decent performance; furthermore, you should load a reasonable amount of +new data before resuming decompression. (If you loaded, say, only one new +byte each time around, you could waste a LOT of cycles.) + +The skip_input_data() source manager routine requires special care in a +suspension scenario. This routine is NOT granted the ability to suspend the +decompressor; it can decrement bytes_in_buffer to zero, but no more. If the +requested skip distance exceeds the amount of data currently in the input +buffer, then skip_input_data() must set bytes_in_buffer to zero and record the +additional skip distance somewhere else. The decompressor will immediately +call fill_input_buffer(), which should return FALSE, which will cause a +suspension return. The surrounding application must then arrange to discard +the recorded number of bytes before it resumes loading the input buffer. +(Yes, this design is rather baroque, but it avoids complexity in the far more +common case where a non-suspending source manager is used.) + +If the input data has been exhausted, we recommend that you emit a warning +and insert dummy EOI markers just as a non-suspending data source manager +would do. This can be handled either in the surrounding application logic or +within fill_input_buffer(); the latter is probably more efficient. If +fill_input_buffer() knows that no more data is available, it can set the +pointer/count to point to a dummy EOI marker and then return TRUE just as +though it had read more data in a non-suspending situation. + +The decompressor does not attempt to suspend within standard JPEG markers; +instead it will backtrack to the start of the marker and reprocess the whole +marker next time. Hence the input buffer must be large enough to hold the +longest standard marker in the file. Standard JPEG markers should normally +not exceed a few hundred bytes each (DHT tables are typically the longest). +We recommend at least a 2K buffer for performance reasons, which is much +larger than any correct marker is likely to be. For robustness against +damaged marker length counts, you may wish to insert a test in your +application for the case that the input buffer is completely full and yet +the decoder has suspended without consuming any data --- otherwise, if this +situation did occur, it would lead to an endless loop. (The library can't +provide this test since it has no idea whether "the buffer is full", or +even whether there is a fixed-size input buffer.) + +The input buffer would need to be 64K to allow for arbitrary COM or APPn +markers, but these are handled specially: they are either saved into allocated +memory, or skipped over by calling skip_input_data(). In the former case, +suspension is handled correctly, and in the latter case, the problem of +buffer overrun is placed on skip_input_data's shoulders, as explained above. +Note that if you provide your own marker handling routine for large markers, +you should consider how to deal with buffer overflow. + +Multiple-buffer management: + +In some applications it is desirable to store the compressed data in a linked +list of buffer areas, so as to avoid data copying. This can be handled by +having empty_output_buffer() or fill_input_buffer() set the pointer and count +to reference the next available buffer; FALSE is returned only if no more +buffers are available. Although seemingly straightforward, there is a +pitfall in this approach: the backtrack that occurs when FALSE is returned +could back up into an earlier buffer. For example, when fill_input_buffer() +is called, the current pointer & count indicate the backtrack restart point. +Since fill_input_buffer() will set the pointer and count to refer to a new +buffer, the restart position must be saved somewhere else. Suppose a second +call to fill_input_buffer() occurs in the same library call, and no +additional input data is available, so fill_input_buffer must return FALSE. +If the JPEG library has not moved the pointer/count forward in the current +buffer, then *the correct restart point is the saved position in the prior +buffer*. Prior buffers may be discarded only after the library establishes +a restart point within a later buffer. Similar remarks apply for output into +a chain of buffers. + +The library will never attempt to backtrack over a skip_input_data() call, +so any skipped data can be permanently discarded. You still have to deal +with the case of skipping not-yet-received data, however. + +It's much simpler to use only a single buffer; when fill_input_buffer() is +called, move any unconsumed data (beyond the current pointer/count) down to +the beginning of this buffer and then load new data into the remaining buffer +space. This approach requires a little more data copying but is far easier +to get right. + + +Progressive JPEG support +------------------------ + +Progressive JPEG rearranges the stored data into a series of scans of +increasing quality. In situations where a JPEG file is transmitted across a +slow communications link, a decoder can generate a low-quality image very +quickly from the first scan, then gradually improve the displayed quality as +more scans are received. The final image after all scans are complete is +identical to that of a regular (sequential) JPEG file of the same quality +setting. Progressive JPEG files are often slightly smaller than equivalent +sequential JPEG files, but the possibility of incremental display is the main +reason for using progressive JPEG. + +The IJG encoder library generates progressive JPEG files when given a +suitable "scan script" defining how to divide the data into scans. +Creation of progressive JPEG files is otherwise transparent to the encoder. +Progressive JPEG files can also be read transparently by the decoder library. +If the decoding application simply uses the library as defined above, it +will receive a final decoded image without any indication that the file was +progressive. Of course, this approach does not allow incremental display. +To perform incremental display, an application needs to use the decoder +library's "buffered-image" mode, in which it receives a decoded image +multiple times. + +Each displayed scan requires about as much work to decode as a full JPEG +image of the same size, so the decoder must be fairly fast in relation to the +data transmission rate in order to make incremental display useful. However, +it is possible to skip displaying the image and simply add the incoming bits +to the decoder's coefficient buffer. This is fast because only Huffman +decoding need be done, not IDCT, upsampling, colorspace conversion, etc. +The IJG decoder library allows the application to switch dynamically between +displaying the image and simply absorbing the incoming bits. A properly +coded application can automatically adapt the number of display passes to +suit the time available as the image is received. Also, a final +higher-quality display cycle can be performed from the buffered data after +the end of the file is reached. + +Progressive compression: + +To create a progressive JPEG file (or a multiple-scan sequential JPEG file), +set the scan_info cinfo field to point to an array of scan descriptors, and +perform compression as usual. Instead of constructing your own scan list, +you can call the jpeg_simple_progression() helper routine to create a +recommended progression sequence; this method should be used by all +applications that don't want to get involved in the nitty-gritty of +progressive scan sequence design. (If you want to provide user control of +scan sequences, you may wish to borrow the scan script reading code found +in rdswitch.c, so that you can read scan script files just like cjpeg's.) +When scan_info is not NULL, the compression library will store DCT'd data +into a buffer array as jpeg_write_scanlines() is called, and will emit all +the requested scans during jpeg_finish_compress(). This implies that +multiple-scan output cannot be created with a suspending data destination +manager, since jpeg_finish_compress() does not support suspension. We +should also note that the compressor currently forces Huffman optimization +mode when creating a progressive JPEG file, because the default Huffman +tables are unsuitable for progressive files. + +Progressive decompression: + +When buffered-image mode is not used, the decoder library will read all of +a multi-scan file during jpeg_start_decompress(), so that it can provide a +final decoded image. (Here "multi-scan" means either progressive or +multi-scan sequential.) This makes multi-scan files transparent to the +decoding application. However, existing applications that used suspending +input with version 5 of the IJG library will need to be modified to check +for a suspension return from jpeg_start_decompress(). + +To perform incremental display, an application must use the library's +buffered-image mode. This is described in the next section. + + +Buffered-image mode +------------------- + +In buffered-image mode, the library stores the partially decoded image in a +coefficient buffer, from which it can be read out as many times as desired. +This mode is typically used for incremental display of progressive JPEG files, +but it can be used with any JPEG file. Each scan of a progressive JPEG file +adds more data (more detail) to the buffered image. The application can +display in lockstep with the source file (one display pass per input scan), +or it can allow input processing to outrun display processing. By making +input and display processing run independently, it is possible for the +application to adapt progressive display to a wide range of data transmission +rates. + +The basic control flow for buffered-image decoding is + + jpeg_create_decompress() + set data source + jpeg_read_header() + set overall decompression parameters + cinfo.buffered_image = TRUE; /* select buffered-image mode */ + jpeg_start_decompress() + for (each output pass) { + adjust output decompression parameters if required + jpeg_start_output() /* start a new output pass */ + for (all scanlines in image) { + jpeg_read_scanlines() + display scanlines + } + jpeg_finish_output() /* terminate output pass */ + } + jpeg_finish_decompress() + jpeg_destroy_decompress() + +This differs from ordinary unbuffered decoding in that there is an additional +level of looping. The application can choose how many output passes to make +and how to display each pass. + +The simplest approach to displaying progressive images is to do one display +pass for each scan appearing in the input file. In this case the outer loop +condition is typically + while (! jpeg_input_complete(&cinfo)) +and the start-output call should read + jpeg_start_output(&cinfo, cinfo.input_scan_number); +The second parameter to jpeg_start_output() indicates which scan of the input +file is to be displayed; the scans are numbered starting at 1 for this +purpose. (You can use a loop counter starting at 1 if you like, but using +the library's input scan counter is easier.) The library automatically reads +data as necessary to complete each requested scan, and jpeg_finish_output() +advances to the next scan or end-of-image marker (hence input_scan_number +will be incremented by the time control arrives back at jpeg_start_output()). +With this technique, data is read from the input file only as needed, and +input and output processing run in lockstep. + +After reading the final scan and reaching the end of the input file, the +buffered image remains available; it can be read additional times by +repeating the jpeg_start_output()/jpeg_read_scanlines()/jpeg_finish_output() +sequence. For example, a useful technique is to use fast one-pass color +quantization for display passes made while the image is arriving, followed by +a final display pass using two-pass quantization for highest quality. This +is done by changing the library parameters before the final output pass. +Changing parameters between passes is discussed in detail below. + +In general the last scan of a progressive file cannot be recognized as such +until after it is read, so a post-input display pass is the best approach if +you want special processing in the final pass. + +When done with the image, be sure to call jpeg_finish_decompress() to release +the buffered image (or just use jpeg_destroy_decompress()). + +If input data arrives faster than it can be displayed, the application can +cause the library to decode input data in advance of what's needed to produce +output. This is done by calling the routine jpeg_consume_input(). +The return value is one of the following: + JPEG_REACHED_SOS: reached an SOS marker (the start of a new scan) + JPEG_REACHED_EOI: reached the EOI marker (end of image) + JPEG_ROW_COMPLETED: completed reading one MCU row of compressed data + JPEG_SCAN_COMPLETED: completed reading last MCU row of current scan + JPEG_SUSPENDED: suspended before completing any of the above +(JPEG_SUSPENDED can occur only if a suspending data source is used.) This +routine can be called at any time after initializing the JPEG object. It +reads some additional data and returns when one of the indicated significant +events occurs. (If called after the EOI marker is reached, it will +immediately return JPEG_REACHED_EOI without attempting to read more data.) + +The library's output processing will automatically call jpeg_consume_input() +whenever the output processing overtakes the input; thus, simple lockstep +display requires no direct calls to jpeg_consume_input(). But by adding +calls to jpeg_consume_input(), you can absorb data in advance of what is +being displayed. This has two benefits: + * You can limit buildup of unprocessed data in your input buffer. + * You can eliminate extra display passes by paying attention to the + state of the library's input processing. + +The first of these benefits only requires interspersing calls to +jpeg_consume_input() with your display operations and any other processing +you may be doing. To avoid wasting cycles due to backtracking, it's best to +call jpeg_consume_input() only after a hundred or so new bytes have arrived. +This is discussed further under "I/O suspension", above. (Note: the JPEG +library currently is not thread-safe. You must not call jpeg_consume_input() +from one thread of control if a different library routine is working on the +same JPEG object in another thread.) + +When input arrives fast enough that more than one new scan is available +before you start a new output pass, you may as well skip the output pass +corresponding to the completed scan. This occurs for free if you pass +cinfo.input_scan_number as the target scan number to jpeg_start_output(). +The input_scan_number field is simply the index of the scan currently being +consumed by the input processor. You can ensure that this is up-to-date by +emptying the input buffer just before calling jpeg_start_output(): call +jpeg_consume_input() repeatedly until it returns JPEG_SUSPENDED or +JPEG_REACHED_EOI. + +The target scan number passed to jpeg_start_output() is saved in the +cinfo.output_scan_number field. The library's output processing calls +jpeg_consume_input() whenever the current input scan number and row within +that scan is less than or equal to the current output scan number and row. +Thus, input processing can "get ahead" of the output processing but is not +allowed to "fall behind". You can achieve several different effects by +manipulating this interlock rule. For example, if you pass a target scan +number greater than the current input scan number, the output processor will +wait until that scan starts to arrive before producing any output. (To avoid +an infinite loop, the target scan number is automatically reset to the last +scan number when the end of image is reached. Thus, if you specify a large +target scan number, the library will just absorb the entire input file and +then perform an output pass. This is effectively the same as what +jpeg_start_decompress() does when you don't select buffered-image mode.) +When you pass a target scan number equal to the current input scan number, +the image is displayed no faster than the current input scan arrives. The +final possibility is to pass a target scan number less than the current input +scan number; this disables the input/output interlock and causes the output +processor to simply display whatever it finds in the image buffer, without +waiting for input. (However, the library will not accept a target scan +number less than one, so you can't avoid waiting for the first scan.) + +When data is arriving faster than the output display processing can advance +through the image, jpeg_consume_input() will store data into the buffered +image beyond the point at which the output processing is reading data out +again. If the input arrives fast enough, it may "wrap around" the buffer to +the point where the input is more than one whole scan ahead of the output. +If the output processing simply proceeds through its display pass without +paying attention to the input, the effect seen on-screen is that the lower +part of the image is one or more scans better in quality than the upper part. +Then, when the next output scan is started, you have a choice of what target +scan number to use. The recommended choice is to use the current input scan +number at that time, which implies that you've skipped the output scans +corresponding to the input scans that were completed while you processed the +previous output scan. In this way, the decoder automatically adapts its +speed to the arriving data, by skipping output scans as necessary to keep up +with the arriving data. + +When using this strategy, you'll want to be sure that you perform a final +output pass after receiving all the data; otherwise your last display may not +be full quality across the whole screen. So the right outer loop logic is +something like this: + do { + absorb any waiting input by calling jpeg_consume_input() + final_pass = jpeg_input_complete(&cinfo); + adjust output decompression parameters if required + jpeg_start_output(&cinfo, cinfo.input_scan_number); + ... + jpeg_finish_output() + } while (! final_pass); +rather than quitting as soon as jpeg_input_complete() returns TRUE. This +arrangement makes it simple to use higher-quality decoding parameters +for the final pass. But if you don't want to use special parameters for +the final pass, the right loop logic is like this: + for (;;) { + absorb any waiting input by calling jpeg_consume_input() + jpeg_start_output(&cinfo, cinfo.input_scan_number); + ... + jpeg_finish_output() + if (jpeg_input_complete(&cinfo) && + cinfo.input_scan_number == cinfo.output_scan_number) + break; + } +In this case you don't need to know in advance whether an output pass is to +be the last one, so it's not necessary to have reached EOF before starting +the final output pass; rather, what you want to test is whether the output +pass was performed in sync with the final input scan. This form of the loop +will avoid an extra output pass whenever the decoder is able (or nearly able) +to keep up with the incoming data. + +When the data transmission speed is high, you might begin a display pass, +then find that much or all of the file has arrived before you can complete +the pass. (You can detect this by noting the JPEG_REACHED_EOI return code +from jpeg_consume_input(), or equivalently by testing jpeg_input_complete().) +In this situation you may wish to abort the current display pass and start a +new one using the newly arrived information. To do so, just call +jpeg_finish_output() and then start a new pass with jpeg_start_output(). + +A variant strategy is to abort and restart display if more than one complete +scan arrives during an output pass; this can be detected by noting +JPEG_REACHED_SOS returns and/or examining cinfo.input_scan_number. This +idea should be employed with caution, however, since the display process +might never get to the bottom of the image before being aborted, resulting +in the lower part of the screen being several passes worse than the upper. +In most cases it's probably best to abort an output pass only if the whole +file has arrived and you want to begin the final output pass immediately. + +When receiving data across a communication link, we recommend always using +the current input scan number for the output target scan number; if a +higher-quality final pass is to be done, it should be started (aborting any +incomplete output pass) as soon as the end of file is received. However, +many other strategies are possible. For example, the application can examine +the parameters of the current input scan and decide whether to display it or +not. If the scan contains only chroma data, one might choose not to use it +as the target scan, expecting that the scan will be small and will arrive +quickly. To skip to the next scan, call jpeg_consume_input() until it +returns JPEG_REACHED_SOS or JPEG_REACHED_EOI. Or just use the next higher +number as the target scan for jpeg_start_output(); but that method doesn't +let you inspect the next scan's parameters before deciding to display it. + + +In buffered-image mode, jpeg_start_decompress() never performs input and +thus never suspends. An application that uses input suspension with +buffered-image mode must be prepared for suspension returns from these +routines: +* jpeg_start_output() performs input only if you request 2-pass quantization + and the target scan isn't fully read yet. (This is discussed below.) +* jpeg_read_scanlines(), as always, returns the number of scanlines that it + was able to produce before suspending. +* jpeg_finish_output() will read any markers following the target scan, + up to the end of the file or the SOS marker that begins another scan. + (But it reads no input if jpeg_consume_input() has already reached the + end of the file or a SOS marker beyond the target output scan.) +* jpeg_finish_decompress() will read until the end of file, and thus can + suspend if the end hasn't already been reached (as can be tested by + calling jpeg_input_complete()). +jpeg_start_output(), jpeg_finish_output(), and jpeg_finish_decompress() +all return TRUE if they completed their tasks, FALSE if they had to suspend. +In the event of a FALSE return, the application must load more input data +and repeat the call. Applications that use non-suspending data sources need +not check the return values of these three routines. + + +It is possible to change decoding parameters between output passes in the +buffered-image mode. The decoder library currently supports only very +limited changes of parameters. ONLY THE FOLLOWING parameter changes are +allowed after jpeg_start_decompress() is called: +* dct_method can be changed before each call to jpeg_start_output(). + For example, one could use a fast DCT method for early scans, changing + to a higher quality method for the final scan. +* dither_mode can be changed before each call to jpeg_start_output(); + of course this has no impact if not using color quantization. Typically + one would use ordered dither for initial passes, then switch to + Floyd-Steinberg dither for the final pass. Caution: changing dither mode + can cause more memory to be allocated by the library. Although the amount + of memory involved is not large (a scanline or so), it may cause the + initial max_memory_to_use specification to be exceeded, which in the worst + case would result in an out-of-memory failure. +* do_block_smoothing can be changed before each call to jpeg_start_output(). + This setting is relevant only when decoding a progressive JPEG image. + During the first DC-only scan, block smoothing provides a very "fuzzy" look + instead of the very "blocky" look seen without it; which is better seems a + matter of personal taste. But block smoothing is nearly always a win + during later stages, especially when decoding a successive-approximation + image: smoothing helps to hide the slight blockiness that otherwise shows + up on smooth gradients until the lowest coefficient bits are sent. +* Color quantization mode can be changed under the rules described below. + You *cannot* change between full-color and quantized output (because that + would alter the required I/O buffer sizes), but you can change which + quantization method is used. + +When generating color-quantized output, changing quantization method is a +very useful way of switching between high-speed and high-quality display. +The library allows you to change among its three quantization methods: +1. Single-pass quantization to a fixed color cube. + Selected by cinfo.two_pass_quantize = FALSE and cinfo.colormap = NULL. +2. Single-pass quantization to an application-supplied colormap. + Selected by setting cinfo.colormap to point to the colormap (the value of + two_pass_quantize is ignored); also set cinfo.actual_number_of_colors. +3. Two-pass quantization to a colormap chosen specifically for the image. + Selected by cinfo.two_pass_quantize = TRUE and cinfo.colormap = NULL. + (This is the default setting selected by jpeg_read_header, but it is + probably NOT what you want for the first pass of progressive display!) +These methods offer successively better quality and lesser speed. However, +only the first method is available for quantizing in non-RGB color spaces. + +IMPORTANT: because the different quantizer methods have very different +working-storage requirements, the library requires you to indicate which +one(s) you intend to use before you call jpeg_start_decompress(). (If we did +not require this, the max_memory_to_use setting would be a complete fiction.) +You do this by setting one or more of these three cinfo fields to TRUE: + enable_1pass_quant Fixed color cube colormap + enable_external_quant Externally-supplied colormap + enable_2pass_quant Two-pass custom colormap +All three are initialized FALSE by jpeg_read_header(). But +jpeg_start_decompress() automatically sets TRUE the one selected by the +current two_pass_quantize and colormap settings, so you only need to set the +enable flags for any other quantization methods you plan to change to later. + +After setting the enable flags correctly at jpeg_start_decompress() time, you +can change to any enabled quantization method by setting two_pass_quantize +and colormap properly just before calling jpeg_start_output(). The following +special rules apply: +1. You must explicitly set cinfo.colormap to NULL when switching to 1-pass + or 2-pass mode from a different mode, or when you want the 2-pass + quantizer to be re-run to generate a new colormap. +2. To switch to an external colormap, or to change to a different external + colormap than was used on the prior pass, you must call + jpeg_new_colormap() after setting cinfo.colormap. +NOTE: if you want to use the same colormap as was used in the prior pass, +you should not do either of these things. This will save some nontrivial +switchover costs. +(These requirements exist because cinfo.colormap will always be non-NULL +after completing a prior output pass, since both the 1-pass and 2-pass +quantizers set it to point to their output colormaps. Thus you have to +do one of these two things to notify the library that something has changed. +Yup, it's a bit klugy, but it's necessary to do it this way for backwards +compatibility.) + +Note that in buffered-image mode, the library generates any requested colormap +during jpeg_start_output(), not during jpeg_start_decompress(). + +When using two-pass quantization, jpeg_start_output() makes a pass over the +buffered image to determine the optimum color map; it therefore may take a +significant amount of time, whereas ordinarily it does little work. The +progress monitor hook is called during this pass, if defined. It is also +important to realize that if the specified target scan number is greater than +or equal to the current input scan number, jpeg_start_output() will attempt +to consume input as it makes this pass. If you use a suspending data source, +you need to check for a FALSE return from jpeg_start_output() under these +conditions. The combination of 2-pass quantization and a not-yet-fully-read +target scan is the only case in which jpeg_start_output() will consume input. + + +Application authors who support buffered-image mode may be tempted to use it +for all JPEG images, even single-scan ones. This will work, but it is +inefficient: there is no need to create an image-sized coefficient buffer for +single-scan images. Requesting buffered-image mode for such an image wastes +memory. Worse, it can cost time on large images, since the buffered data has +to be swapped out or written to a temporary file. If you are concerned about +maximum performance on baseline JPEG files, you should use buffered-image +mode only when the incoming file actually has multiple scans. This can be +tested by calling jpeg_has_multiple_scans(), which will return a correct +result at any time after jpeg_read_header() completes. + +It is also worth noting that when you use jpeg_consume_input() to let input +processing get ahead of output processing, the resulting pattern of access to +the coefficient buffer is quite nonsequential. It's best to use the memory +manager jmemnobs.c if you can (ie, if you have enough real or virtual main +memory). If not, at least make sure that max_memory_to_use is set as high as +possible. If the JPEG memory manager has to use a temporary file, you will +probably see a lot of disk traffic and poor performance. (This could be +improved with additional work on the memory manager, but we haven't gotten +around to it yet.) + +In some applications it may be convenient to use jpeg_consume_input() for all +input processing, including reading the initial markers; that is, you may +wish to call jpeg_consume_input() instead of jpeg_read_header() during +startup. This works, but note that you must check for JPEG_REACHED_SOS and +JPEG_REACHED_EOI return codes as the equivalent of jpeg_read_header's codes. +Once the first SOS marker has been reached, you must call +jpeg_start_decompress() before jpeg_consume_input() will consume more input; +it'll just keep returning JPEG_REACHED_SOS until you do. If you read a +tables-only file this way, jpeg_consume_input() will return JPEG_REACHED_EOI +without ever returning JPEG_REACHED_SOS; be sure to check for this case. +If this happens, the decompressor will not read any more input until you call +jpeg_abort() to reset it. It is OK to call jpeg_consume_input() even when not +using buffered-image mode, but in that case it's basically a no-op after the +initial markers have been read: it will just return JPEG_SUSPENDED. + + +Abbreviated datastreams and multiple images +------------------------------------------- + +A JPEG compression or decompression object can be reused to process multiple +images. This saves a small amount of time per image by eliminating the +"create" and "destroy" operations, but that isn't the real purpose of the +feature. Rather, reuse of an object provides support for abbreviated JPEG +datastreams. Object reuse can also simplify processing a series of images in +a single input or output file. This section explains these features. + +A JPEG file normally contains several hundred bytes worth of quantization +and Huffman tables. In a situation where many images will be stored or +transmitted with identical tables, this may represent an annoying overhead. +The JPEG standard therefore permits tables to be omitted. The standard +defines three classes of JPEG datastreams: + * "Interchange" datastreams contain an image and all tables needed to decode + the image. These are the usual kind of JPEG file. + * "Abbreviated image" datastreams contain an image, but are missing some or + all of the tables needed to decode that image. + * "Abbreviated table specification" (henceforth "tables-only") datastreams + contain only table specifications. +To decode an abbreviated image, it is necessary to load the missing table(s) +into the decoder beforehand. This can be accomplished by reading a separate +tables-only file. A variant scheme uses a series of images in which the first +image is an interchange (complete) datastream, while subsequent ones are +abbreviated and rely on the tables loaded by the first image. It is assumed +that once the decoder has read a table, it will remember that table until a +new definition for the same table number is encountered. + +It is the application designer's responsibility to figure out how to associate +the correct tables with an abbreviated image. While abbreviated datastreams +can be useful in a closed environment, their use is strongly discouraged in +any situation where data exchange with other applications might be needed. +Caveat designer. + +The JPEG library provides support for reading and writing any combination of +tables-only datastreams and abbreviated images. In both compression and +decompression objects, a quantization or Huffman table will be retained for +the lifetime of the object, unless it is overwritten by a new table definition. + + +To create abbreviated image datastreams, it is only necessary to tell the +compressor not to emit some or all of the tables it is using. Each +quantization and Huffman table struct contains a boolean field "sent_table", +which normally is initialized to FALSE. For each table used by the image, the +header-writing process emits the table and sets sent_table = TRUE unless it is +already TRUE. (In normal usage, this prevents outputting the same table +definition multiple times, as would otherwise occur because the chroma +components typically share tables.) Thus, setting this field to TRUE before +calling jpeg_start_compress() will prevent the table from being written at +all. + +If you want to create a "pure" abbreviated image file containing no tables, +just call "jpeg_suppress_tables(&cinfo, TRUE)" after constructing all the +tables. If you want to emit some but not all tables, you'll need to set the +individual sent_table fields directly. + +To create an abbreviated image, you must also call jpeg_start_compress() +with a second parameter of FALSE, not TRUE. Otherwise jpeg_start_compress() +will force all the sent_table fields to FALSE. (This is a safety feature to +prevent abbreviated images from being created accidentally.) + +To create a tables-only file, perform the same parameter setup that you +normally would, but instead of calling jpeg_start_compress() and so on, call +jpeg_write_tables(&cinfo). This will write an abbreviated datastream +containing only SOI, DQT and/or DHT markers, and EOI. All the quantization +and Huffman tables that are currently defined in the compression object will +be emitted unless their sent_tables flag is already TRUE, and then all the +sent_tables flags will be set TRUE. + +A sure-fire way to create matching tables-only and abbreviated image files +is to proceed as follows: + + create JPEG compression object + set JPEG parameters + set destination to tables-only file + jpeg_write_tables(&cinfo); + set destination to image file + jpeg_start_compress(&cinfo, FALSE); + write data... + jpeg_finish_compress(&cinfo); + +Since the JPEG parameters are not altered between writing the table file and +the abbreviated image file, the same tables are sure to be used. Of course, +you can repeat the jpeg_start_compress() ... jpeg_finish_compress() sequence +many times to produce many abbreviated image files matching the table file. + +You cannot suppress output of the computed Huffman tables when Huffman +optimization is selected. (If you could, there'd be no way to decode the +image...) Generally, you don't want to set optimize_coding = TRUE when +you are trying to produce abbreviated files. + +In some cases you might want to compress an image using tables which are +not stored in the application, but are defined in an interchange or +tables-only file readable by the application. This can be done by setting up +a JPEG decompression object to read the specification file, then copying the +tables into your compression object. See jpeg_copy_critical_parameters() +for an example of copying quantization tables. + + +To read abbreviated image files, you simply need to load the proper tables +into the decompression object before trying to read the abbreviated image. +If the proper tables are stored in the application program, you can just +allocate the table structs and fill in their contents directly. For example, +to load a fixed quantization table into table slot "n": + + if (cinfo.quant_tbl_ptrs[n] == NULL) + cinfo.quant_tbl_ptrs[n] = jpeg_alloc_quant_table((j_common_ptr) &cinfo); + quant_ptr = cinfo.quant_tbl_ptrs[n]; /* quant_ptr is JQUANT_TBL* */ + for (i = 0; i < 64; i++) { + /* Qtable[] is desired quantization table, in natural array order */ + quant_ptr->quantval[i] = Qtable[i]; + } + +Code to load a fixed Huffman table is typically (for AC table "n"): + + if (cinfo.ac_huff_tbl_ptrs[n] == NULL) + cinfo.ac_huff_tbl_ptrs[n] = jpeg_alloc_huff_table((j_common_ptr) &cinfo); + huff_ptr = cinfo.ac_huff_tbl_ptrs[n]; /* huff_ptr is JHUFF_TBL* */ + for (i = 1; i <= 16; i++) { + /* counts[i] is number of Huffman codes of length i bits, i=1..16 */ + huff_ptr->bits[i] = counts[i]; + } + for (i = 0; i < 256; i++) { + /* symbols[] is the list of Huffman symbols, in code-length order */ + huff_ptr->huffval[i] = symbols[i]; + } + +(Note that trying to set cinfo.quant_tbl_ptrs[n] to point directly at a +constant JQUANT_TBL object is not safe. If the incoming file happened to +contain a quantization table definition, your master table would get +overwritten! Instead allocate a working table copy and copy the master table +into it, as illustrated above. Ditto for Huffman tables, of course.) + +You might want to read the tables from a tables-only file, rather than +hard-wiring them into your application. The jpeg_read_header() call is +sufficient to read a tables-only file. You must pass a second parameter of +FALSE to indicate that you do not require an image to be present. Thus, the +typical scenario is + + create JPEG decompression object + set source to tables-only file + jpeg_read_header(&cinfo, FALSE); + set source to abbreviated image file + jpeg_read_header(&cinfo, TRUE); + set decompression parameters + jpeg_start_decompress(&cinfo); + read data... + jpeg_finish_decompress(&cinfo); + +In some cases, you may want to read a file without knowing whether it contains +an image or just tables. In that case, pass FALSE and check the return value +from jpeg_read_header(): it will be JPEG_HEADER_OK if an image was found, +JPEG_HEADER_TABLES_ONLY if only tables were found. (A third return value, +JPEG_SUSPENDED, is possible when using a suspending data source manager.) +Note that jpeg_read_header() will not complain if you read an abbreviated +image for which you haven't loaded the missing tables; the missing-table check +occurs later, in jpeg_start_decompress(). + + +It is possible to read a series of images from a single source file by +repeating the jpeg_read_header() ... jpeg_finish_decompress() sequence, +without releasing/recreating the JPEG object or the data source module. +(If you did reinitialize, any partial bufferload left in the data source +buffer at the end of one image would be discarded, causing you to lose the +start of the next image.) When you use this method, stored tables are +automatically carried forward, so some of the images can be abbreviated images +that depend on tables from earlier images. + +If you intend to write a series of images into a single destination file, +you might want to make a specialized data destination module that doesn't +flush the output buffer at term_destination() time. This would speed things +up by some trifling amount. Of course, you'd need to remember to flush the +buffer after the last image. You can make the later images be abbreviated +ones by passing FALSE to jpeg_start_compress(). + + +Special markers +--------------- + +Some applications may need to insert or extract special data in the JPEG +datastream. The JPEG standard provides marker types "COM" (comment) and +"APP0" through "APP15" (application) to hold application-specific data. +Unfortunately, the use of these markers is not specified by the standard. +COM markers are fairly widely used to hold user-supplied text. The JFIF file +format spec uses APP0 markers with specified initial strings to hold certain +data. Adobe applications use APP14 markers beginning with the string "Adobe" +for miscellaneous data. Other APPn markers are rarely seen, but might +contain almost anything. + +If you wish to store user-supplied text, we recommend you use COM markers +and place readable 7-bit ASCII text in them. Newline conventions are not +standardized --- expect to find LF (Unix style), CR/LF (DOS style), or CR +(Mac style). A robust COM reader should be able to cope with random binary +garbage, including nulls, since some applications generate COM markers +containing non-ASCII junk. (But yours should not be one of them.) + +For program-supplied data, use an APPn marker, and be sure to begin it with an +identifying string so that you can tell whether the marker is actually yours. +It's probably best to avoid using APP0 or APP14 for any private markers. +(NOTE: the upcoming SPIFF standard will use APP8 markers; we recommend you +not use APP8 markers for any private purposes, either.) + +Keep in mind that at most 65533 bytes can be put into one marker, but you +can have as many markers as you like. + +By default, the IJG compression library will write a JFIF APP0 marker if the +selected JPEG colorspace is grayscale or YCbCr, or an Adobe APP14 marker if +the selected colorspace is RGB, CMYK, or YCCK. You can disable this, but +we don't recommend it. The decompression library will recognize JFIF and +Adobe markers and will set the JPEG colorspace properly when one is found. + + +You can write special markers immediately following the datastream header by +calling jpeg_write_marker() after jpeg_start_compress() and before the first +call to jpeg_write_scanlines(). When you do this, the markers appear after +the SOI and the JFIF APP0 and Adobe APP14 markers (if written), but before +all else. Specify the marker type parameter as "JPEG_COM" for COM or +"JPEG_APP0 + n" for APPn. (Actually, jpeg_write_marker will let you write +any marker type, but we don't recommend writing any other kinds of marker.) +For example, to write a user comment string pointed to by comment_text: + jpeg_write_marker(cinfo, JPEG_COM, comment_text, strlen(comment_text)); + +If it's not convenient to store all the marker data in memory at once, +you can instead call jpeg_write_m_header() followed by multiple calls to +jpeg_write_m_byte(). If you do it this way, it's your responsibility to +call jpeg_write_m_byte() exactly the number of times given in the length +parameter to jpeg_write_m_header(). (This method lets you empty the +output buffer partway through a marker, which might be important when +using a suspending data destination module. In any case, if you are using +a suspending destination, you should flush its buffer after inserting +any special markers. See "I/O suspension".) + +Or, if you prefer to synthesize the marker byte sequence yourself, +you can just cram it straight into the data destination module. + +If you are writing JFIF 1.02 extension markers (thumbnail images), don't +forget to set cinfo.JFIF_minor_version = 2 so that the encoder will write the +correct JFIF version number in the JFIF header marker. The library's default +is to write version 1.01, but that's wrong if you insert any 1.02 extension +markers. (We could probably get away with just defaulting to 1.02, but there +used to be broken decoders that would complain about unknown minor version +numbers. To reduce compatibility risks it's safest not to write 1.02 unless +you are actually using 1.02 extensions.) + + +When reading, two methods of handling special markers are available: +1. You can ask the library to save the contents of COM and/or APPn markers +into memory, and then examine them at your leisure afterwards. +2. You can supply your own routine to process COM and/or APPn markers +on-the-fly as they are read. +The first method is simpler to use, especially if you are using a suspending +data source; writing a marker processor that copes with input suspension is +not easy (consider what happens if the marker is longer than your available +input buffer). However, the second method conserves memory since the marker +data need not be kept around after it's been processed. + +For either method, you'd normally set up marker handling after creating a +decompression object and before calling jpeg_read_header(), because the +markers of interest will typically be near the head of the file and so will +be scanned by jpeg_read_header. Once you've established a marker handling +method, it will be used for the life of that decompression object +(potentially many datastreams), unless you change it. Marker handling is +determined separately for COM markers and for each APPn marker code. + + +To save the contents of special markers in memory, call + jpeg_save_markers(cinfo, marker_code, length_limit) +where marker_code is the marker type to save, JPEG_COM or JPEG_APP0+n. +(To arrange to save all the special marker types, you need to call this +routine 17 times, for COM and APP0-APP15.) If the incoming marker is longer +than length_limit data bytes, only length_limit bytes will be saved; this +parameter allows you to avoid chewing up memory when you only need to see the +first few bytes of a potentially large marker. If you want to save all the +data, set length_limit to 0xFFFF; that is enough since marker lengths are only +16 bits. As a special case, setting length_limit to 0 prevents that marker +type from being saved at all. (That is the default behavior, in fact.) + +After jpeg_read_header() completes, you can examine the special markers by +following the cinfo->marker_list pointer chain. All the special markers in +the file appear in this list, in order of their occurrence in the file (but +omitting any markers of types you didn't ask for). Both the original data +length and the saved data length are recorded for each list entry; the latter +will not exceed length_limit for the particular marker type. Note that these +lengths exclude the marker length word, whereas the stored representation +within the JPEG file includes it. (Hence the maximum data length is really +only 65533.) + +It is possible that additional special markers appear in the file beyond the +SOS marker at which jpeg_read_header stops; if so, the marker list will be +extended during reading of the rest of the file. This is not expected to be +common, however. If you are short on memory you may want to reset the length +limit to zero for all marker types after finishing jpeg_read_header, to +ensure that the max_memory_to_use setting cannot be exceeded due to addition +of later markers. + +The marker list remains stored until you call jpeg_finish_decompress or +jpeg_abort, at which point the memory is freed and the list is set to empty. +(jpeg_destroy also releases the storage, of course.) + +Note that the library is internally interested in APP0 and APP14 markers; +if you try to set a small nonzero length limit on these types, the library +will silently force the length up to the minimum it wants. (But you can set +a zero length limit to prevent them from being saved at all.) Also, in a +16-bit environment, the maximum length limit may be constrained to less than +65533 by malloc() limitations. It is therefore best not to assume that the +effective length limit is exactly what you set it to be. + + +If you want to supply your own marker-reading routine, you do it by calling +jpeg_set_marker_processor(). A marker processor routine must have the +signature + boolean jpeg_marker_parser_method (j_decompress_ptr cinfo) +Although the marker code is not explicitly passed, the routine can find it +in cinfo->unread_marker. At the time of call, the marker proper has been +read from the data source module. The processor routine is responsible for +reading the marker length word and the remaining parameter bytes, if any. +Return TRUE to indicate success. (FALSE should be returned only if you are +using a suspending data source and it tells you to suspend. See the standard +marker processors in jdmarker.c for appropriate coding methods if you need to +use a suspending data source.) + +If you override the default APP0 or APP14 processors, it is up to you to +recognize JFIF and Adobe markers if you want colorspace recognition to occur +properly. We recommend copying and extending the default processors if you +want to do that. (A better idea is to save these marker types for later +examination by calling jpeg_save_markers(); that method doesn't interfere +with the library's own processing of these markers.) + +jpeg_set_marker_processor() and jpeg_save_markers() are mutually exclusive +--- if you call one it overrides any previous call to the other, for the +particular marker type specified. + +A simple example of an external COM processor can be found in djpeg.c. +Also, see jpegtran.c for an example of using jpeg_save_markers. + + +Raw (downsampled) image data +---------------------------- + +Some applications need to supply already-downsampled image data to the JPEG +compressor, or to receive raw downsampled data from the decompressor. The +library supports this requirement by allowing the application to write or +read raw data, bypassing the normal preprocessing or postprocessing steps. +The interface is different from the standard one and is somewhat harder to +use. If your interest is merely in bypassing color conversion, we recommend +that you use the standard interface and simply set jpeg_color_space = +in_color_space (or jpeg_color_space = out_color_space for decompression). +The mechanism described in this section is necessary only to supply or +receive downsampled image data, in which not all components have the same +dimensions. + + +To compress raw data, you must supply the data in the colorspace to be used +in the JPEG file (please read the earlier section on Special color spaces) +and downsampled to the sampling factors specified in the JPEG parameters. +You must supply the data in the format used internally by the JPEG library, +namely a JSAMPIMAGE array. This is an array of pointers to two-dimensional +arrays, each of type JSAMPARRAY. Each 2-D array holds the values for one +color component. This structure is necessary since the components are of +different sizes. If the image dimensions are not a multiple of the MCU size, +you must also pad the data correctly (usually, this is done by replicating +the last column and/or row). The data must be padded to a multiple of a DCT +block in each component: that is, each downsampled row must contain a +multiple of 8 valid samples, and there must be a multiple of 8 sample rows +for each component. (For applications such as conversion of digital TV +images, the standard image size is usually a multiple of the DCT block size, +so that no padding need actually be done.) + +The procedure for compression of raw data is basically the same as normal +compression, except that you call jpeg_write_raw_data() in place of +jpeg_write_scanlines(). Before calling jpeg_start_compress(), you must do +the following: + * Set cinfo->raw_data_in to TRUE. (It is set FALSE by jpeg_set_defaults().) + This notifies the library that you will be supplying raw data. + * Ensure jpeg_color_space is correct --- an explicit jpeg_set_colorspace() + call is a good idea. Note that since color conversion is bypassed, + in_color_space is ignored, except that jpeg_set_defaults() uses it to + choose the default jpeg_color_space setting. + * Ensure the sampling factors, cinfo->comp_info[i].h_samp_factor and + cinfo->comp_info[i].v_samp_factor, are correct. Since these indicate the + dimensions of the data you are supplying, it's wise to set them + explicitly, rather than assuming the library's defaults are what you want. + +To pass raw data to the library, call jpeg_write_raw_data() in place of +jpeg_write_scanlines(). The two routines work similarly except that +jpeg_write_raw_data takes a JSAMPIMAGE data array rather than JSAMPARRAY. +The scanlines count passed to and returned from jpeg_write_raw_data is +measured in terms of the component with the largest v_samp_factor. + +jpeg_write_raw_data() processes one MCU row per call, which is to say +v_samp_factor*DCTSIZE sample rows of each component. The passed num_lines +value must be at least max_v_samp_factor*DCTSIZE, and the return value will +be exactly that amount (or possibly some multiple of that amount, in future +library versions). This is true even on the last call at the bottom of the +image; don't forget to pad your data as necessary. + +The required dimensions of the supplied data can be computed for each +component as + cinfo->comp_info[i].width_in_blocks*DCTSIZE samples per row + cinfo->comp_info[i].height_in_blocks*DCTSIZE rows in image +after jpeg_start_compress() has initialized those fields. If the valid data +is smaller than this, it must be padded appropriately. For some sampling +factors and image sizes, additional dummy DCT blocks are inserted to make +the image a multiple of the MCU dimensions. The library creates such dummy +blocks itself; it does not read them from your supplied data. Therefore you +need never pad by more than DCTSIZE samples. An example may help here. +Assume 2h2v downsampling of YCbCr data, that is + cinfo->comp_info[0].h_samp_factor = 2 for Y + cinfo->comp_info[0].v_samp_factor = 2 + cinfo->comp_info[1].h_samp_factor = 1 for Cb + cinfo->comp_info[1].v_samp_factor = 1 + cinfo->comp_info[2].h_samp_factor = 1 for Cr + cinfo->comp_info[2].v_samp_factor = 1 +and suppose that the nominal image dimensions (cinfo->image_width and +cinfo->image_height) are 101x101 pixels. Then jpeg_start_compress() will +compute downsampled_width = 101 and width_in_blocks = 13 for Y, +downsampled_width = 51 and width_in_blocks = 7 for Cb and Cr (and the same +for the height fields). You must pad the Y data to at least 13*8 = 104 +columns and rows, the Cb/Cr data to at least 7*8 = 56 columns and rows. The +MCU height is max_v_samp_factor = 2 DCT rows so you must pass at least 16 +scanlines on each call to jpeg_write_raw_data(), which is to say 16 actual +sample rows of Y and 8 each of Cb and Cr. A total of 7 MCU rows are needed, +so you must pass a total of 7*16 = 112 "scanlines". The last DCT block row +of Y data is dummy, so it doesn't matter what you pass for it in the data +arrays, but the scanlines count must total up to 112 so that all of the Cb +and Cr data gets passed. + +Output suspension is supported with raw-data compression: if the data +destination module suspends, jpeg_write_raw_data() will return 0. +In this case the same data rows must be passed again on the next call. + + +Decompression with raw data output implies bypassing all postprocessing: +you cannot ask for rescaling or color quantization, for instance. More +seriously, you must deal with the color space and sampling factors present in +the incoming file. If your application only handles, say, 2h1v YCbCr data, +you must check for and fail on other color spaces or other sampling factors. +The library will not convert to a different color space for you. + +To obtain raw data output, set cinfo->raw_data_out = TRUE before +jpeg_start_decompress() (it is set FALSE by jpeg_read_header()). Be sure to +verify that the color space and sampling factors are ones you can handle. +Then call jpeg_read_raw_data() in place of jpeg_read_scanlines(). The +decompression process is otherwise the same as usual. + +jpeg_read_raw_data() returns one MCU row per call, and thus you must pass a +buffer of at least max_v_samp_factor*DCTSIZE scanlines (scanline counting is +the same as for raw-data compression). The buffer you pass must be large +enough to hold the actual data plus padding to DCT-block boundaries. As with +compression, any entirely dummy DCT blocks are not processed so you need not +allocate space for them, but the total scanline count includes them. The +above example of computing buffer dimensions for raw-data compression is +equally valid for decompression. + +Input suspension is supported with raw-data decompression: if the data source +module suspends, jpeg_read_raw_data() will return 0. You can also use +buffered-image mode to read raw data in multiple passes. + + +Really raw data: DCT coefficients +--------------------------------- + +It is possible to read or write the contents of a JPEG file as raw DCT +coefficients. This facility is mainly intended for use in lossless +transcoding between different JPEG file formats. Other possible applications +include lossless cropping of a JPEG image, lossless reassembly of a +multi-strip or multi-tile TIFF/JPEG file into a single JPEG datastream, etc. + +To read the contents of a JPEG file as DCT coefficients, open the file and do +jpeg_read_header() as usual. But instead of calling jpeg_start_decompress() +and jpeg_read_scanlines(), call jpeg_read_coefficients(). This will read the +entire image into a set of virtual coefficient-block arrays, one array per +component. The return value is a pointer to an array of virtual-array +descriptors. Each virtual array can be accessed directly using the JPEG +memory manager's access_virt_barray method (see Memory management, below, +and also read structure.doc's discussion of virtual array handling). Or, +for simple transcoding to a different JPEG file format, the array list can +just be handed directly to jpeg_write_coefficients(). + +Each block in the block arrays contains quantized coefficient values in +normal array order (not JPEG zigzag order). The block arrays contain only +DCT blocks containing real data; any entirely-dummy blocks added to fill out +interleaved MCUs at the right or bottom edges of the image are discarded +during reading and are not stored in the block arrays. (The size of each +block array can be determined from the width_in_blocks and height_in_blocks +fields of the component's comp_info entry.) This is also the data format +expected by jpeg_write_coefficients(). + +When you are done using the virtual arrays, call jpeg_finish_decompress() +to release the array storage and return the decompression object to an idle +state; or just call jpeg_destroy() if you don't need to reuse the object. + +If you use a suspending data source, jpeg_read_coefficients() will return +NULL if it is forced to suspend; a non-NULL return value indicates successful +completion. You need not test for a NULL return value when using a +non-suspending data source. + +It is also possible to call jpeg_read_coefficients() to obtain access to the +decoder's coefficient arrays during a normal decode cycle in buffered-image +mode. This frammish might be useful for progressively displaying an incoming +image and then re-encoding it without loss. To do this, decode in buffered- +image mode as discussed previously, then call jpeg_read_coefficients() after +the last jpeg_finish_output() call. The arrays will be available for your use +until you call jpeg_finish_decompress(). + + +To write the contents of a JPEG file as DCT coefficients, you must provide +the DCT coefficients stored in virtual block arrays. You can either pass +block arrays read from an input JPEG file by jpeg_read_coefficients(), or +allocate virtual arrays from the JPEG compression object and fill them +yourself. In either case, jpeg_write_coefficients() is substituted for +jpeg_start_compress() and jpeg_write_scanlines(). Thus the sequence is + * Create compression object + * Set all compression parameters as necessary + * Request virtual arrays if needed + * jpeg_write_coefficients() + * jpeg_finish_compress() + * Destroy or re-use compression object +jpeg_write_coefficients() is passed a pointer to an array of virtual block +array descriptors; the number of arrays is equal to cinfo.num_components. + +The virtual arrays need only have been requested, not realized, before +jpeg_write_coefficients() is called. A side-effect of +jpeg_write_coefficients() is to realize any virtual arrays that have been +requested from the compression object's memory manager. Thus, when obtaining +the virtual arrays from the compression object, you should fill the arrays +after calling jpeg_write_coefficients(). The data is actually written out +when you call jpeg_finish_compress(); jpeg_write_coefficients() only writes +the file header. + +When writing raw DCT coefficients, it is crucial that the JPEG quantization +tables and sampling factors match the way the data was encoded, or the +resulting file will be invalid. For transcoding from an existing JPEG file, +we recommend using jpeg_copy_critical_parameters(). This routine initializes +all the compression parameters to default values (like jpeg_set_defaults()), +then copies the critical information from a source decompression object. +The decompression object should have just been used to read the entire +JPEG input file --- that is, it should be awaiting jpeg_finish_decompress(). + +jpeg_write_coefficients() marks all tables stored in the compression object +as needing to be written to the output file (thus, it acts like +jpeg_start_compress(cinfo, TRUE)). This is for safety's sake, to avoid +emitting abbreviated JPEG files by accident. If you really want to emit an +abbreviated JPEG file, call jpeg_suppress_tables(), or set the tables' +individual sent_table flags, between calling jpeg_write_coefficients() and +jpeg_finish_compress(). + + +Progress monitoring +------------------- + +Some applications may need to regain control from the JPEG library every so +often. The typical use of this feature is to produce a percent-done bar or +other progress display. (For a simple example, see cjpeg.c or djpeg.c.) +Although you do get control back frequently during the data-transferring pass +(the jpeg_read_scanlines or jpeg_write_scanlines loop), any additional passes +will occur inside jpeg_finish_compress or jpeg_start_decompress; those +routines may take a long time to execute, and you don't get control back +until they are done. + +You can define a progress-monitor routine which will be called periodically +by the library. No guarantees are made about how often this call will occur, +so we don't recommend you use it for mouse tracking or anything like that. +At present, a call will occur once per MCU row, scanline, or sample row +group, whichever unit is convenient for the current processing mode; so the +wider the image, the longer the time between calls. During the data +transferring pass, only one call occurs per call of jpeg_read_scanlines or +jpeg_write_scanlines, so don't pass a large number of scanlines at once if +you want fine resolution in the progress count. (If you really need to use +the callback mechanism for time-critical tasks like mouse tracking, you could +insert additional calls inside some of the library's inner loops.) + +To establish a progress-monitor callback, create a struct jpeg_progress_mgr, +fill in its progress_monitor field with a pointer to your callback routine, +and set cinfo->progress to point to the struct. The callback will be called +whenever cinfo->progress is non-NULL. (This pointer is set to NULL by +jpeg_create_compress or jpeg_create_decompress; the library will not change +it thereafter. So if you allocate dynamic storage for the progress struct, +make sure it will live as long as the JPEG object does. Allocating from the +JPEG memory manager with lifetime JPOOL_PERMANENT will work nicely.) You +can use the same callback routine for both compression and decompression. + +The jpeg_progress_mgr struct contains four fields which are set by the library: + long pass_counter; /* work units completed in this pass */ + long pass_limit; /* total number of work units in this pass */ + int completed_passes; /* passes completed so far */ + int total_passes; /* total number of passes expected */ +During any one pass, pass_counter increases from 0 up to (not including) +pass_limit; the step size is usually but not necessarily 1. The pass_limit +value may change from one pass to another. The expected total number of +passes is in total_passes, and the number of passes already completed is in +completed_passes. Thus the fraction of work completed may be estimated as + completed_passes + (pass_counter/pass_limit) + -------------------------------------------- + total_passes +ignoring the fact that the passes may not be equal amounts of work. + +When decompressing, pass_limit can even change within a pass, because it +depends on the number of scans in the JPEG file, which isn't always known in +advance. The computed fraction-of-work-done may jump suddenly (if the library +discovers it has overestimated the number of scans) or even decrease (in the +opposite case). It is not wise to put great faith in the work estimate. + +When using the decompressor's buffered-image mode, the progress monitor work +estimate is likely to be completely unhelpful, because the library has no way +to know how many output passes will be demanded of it. Currently, the library +sets total_passes based on the assumption that there will be one more output +pass if the input file end hasn't yet been read (jpeg_input_complete() isn't +TRUE), but no more output passes if the file end has been reached when the +output pass is started. This means that total_passes will rise as additional +output passes are requested. If you have a way of determining the input file +size, estimating progress based on the fraction of the file that's been read +will probably be more useful than using the library's value. + + +Memory management +----------------- + +This section covers some key facts about the JPEG library's built-in memory +manager. For more info, please read structure.doc's section about the memory +manager, and consult the source code if necessary. + +All memory and temporary file allocation within the library is done via the +memory manager. If necessary, you can replace the "back end" of the memory +manager to control allocation yourself (for example, if you don't want the +library to use malloc() and free() for some reason). + +Some data is allocated "permanently" and will not be freed until the JPEG +object is destroyed. Most data is allocated "per image" and is freed by +jpeg_finish_compress, jpeg_finish_decompress, or jpeg_abort. You can call the +memory manager yourself to allocate structures that will automatically be +freed at these times. Typical code for this is + ptr = (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, size); +Use JPOOL_PERMANENT to get storage that lasts as long as the JPEG object. +Use alloc_large instead of alloc_small for anything bigger than a few Kbytes. +There are also alloc_sarray and alloc_barray routines that automatically +build 2-D sample or block arrays. + +The library's minimum space requirements to process an image depend on the +image's width, but not on its height, because the library ordinarily works +with "strip" buffers that are as wide as the image but just a few rows high. +Some operating modes (eg, two-pass color quantization) require full-image +buffers. Such buffers are treated as "virtual arrays": only the current strip +need be in memory, and the rest can be swapped out to a temporary file. + +If you use the simplest memory manager back end (jmemnobs.c), then no +temporary files are used; virtual arrays are simply malloc()'d. Images bigger +than memory can be processed only if your system supports virtual memory. +The other memory manager back ends support temporary files of various flavors +and thus work in machines without virtual memory. They may also be useful on +Unix machines if you need to process images that exceed available swap space. + +When using temporary files, the library will make the in-memory buffers for +its virtual arrays just big enough to stay within a "maximum memory" setting. +Your application can set this limit by setting cinfo->mem->max_memory_to_use +after creating the JPEG object. (Of course, there is still a minimum size for +the buffers, so the max-memory setting is effective only if it is bigger than +the minimum space needed.) If you allocate any large structures yourself, you +must allocate them before jpeg_start_compress() or jpeg_start_decompress() in +order to have them counted against the max memory limit. Also keep in mind +that space allocated with alloc_small() is ignored, on the assumption that +it's too small to be worth worrying about; so a reasonable safety margin +should be left when setting max_memory_to_use. + +If you use the jmemname.c or jmemdos.c memory manager back end, it is +important to clean up the JPEG object properly to ensure that the temporary +files get deleted. (This is especially crucial with jmemdos.c, where the +"temporary files" may be extended-memory segments; if they are not freed, +DOS will require a reboot to recover the memory.) Thus, with these memory +managers, it's a good idea to provide a signal handler that will trap any +early exit from your program. The handler should call either jpeg_abort() +or jpeg_destroy() for any active JPEG objects. A handler is not needed with +jmemnobs.c, and shouldn't be necessary with jmemansi.c or jmemmac.c either, +since the C library is supposed to take care of deleting files made with +tmpfile(). + + +Memory usage +------------ + +Working memory requirements while performing compression or decompression +depend on image dimensions, image characteristics (such as colorspace and +JPEG process), and operating mode (application-selected options). + +As of v6b, the decompressor requires: + 1. About 24K in more-or-less-fixed-size data. This varies a bit depending + on operating mode and image characteristics (particularly color vs. + grayscale), but it doesn't depend on image dimensions. + 2. Strip buffers (of size proportional to the image width) for IDCT and + upsampling results. The worst case for commonly used sampling factors + is about 34 bytes * width in pixels for a color image. A grayscale image + only needs about 8 bytes per pixel column. + 3. A full-image DCT coefficient buffer is needed to decode a multi-scan JPEG + file (including progressive JPEGs), or whenever you select buffered-image + mode. This takes 2 bytes/coefficient. At typical 2x2 sampling, that's + 3 bytes per pixel for a color image. Worst case (1x1 sampling) requires + 6 bytes/pixel. For grayscale, figure 2 bytes/pixel. + 4. To perform 2-pass color quantization, the decompressor also needs a + 128K color lookup table and a full-image pixel buffer (3 bytes/pixel). +This does not count any memory allocated by the application, such as a +buffer to hold the final output image. + +The above figures are valid for 8-bit JPEG data precision and a machine with +32-bit ints. For 12-bit JPEG data, double the size of the strip buffers and +quantization pixel buffer. The "fixed-size" data will be somewhat smaller +with 16-bit ints, larger with 64-bit ints. Also, CMYK or other unusual +color spaces will require different amounts of space. + +The full-image coefficient and pixel buffers, if needed at all, do not +have to be fully RAM resident; you can have the library use temporary +files instead when the total memory usage would exceed a limit you set. +(But if your OS supports virtual memory, it's probably better to just use +jmemnobs and let the OS do the swapping.) + +The compressor's memory requirements are similar, except that it has no need +for color quantization. Also, it needs a full-image DCT coefficient buffer +if Huffman-table optimization is asked for, even if progressive mode is not +requested. + +If you need more detailed information about memory usage in a particular +situation, you can enable the MEM_STATS code in jmemmgr.c. + + +Library compile-time options +---------------------------- + +A number of compile-time options are available by modifying jmorecfg.h. + +The JPEG standard provides for both the baseline 8-bit DCT process and +a 12-bit DCT process. The IJG code supports 12-bit lossy JPEG if you define +BITS_IN_JSAMPLE as 12 rather than 8. Note that this causes JSAMPLE to be +larger than a char, so it affects the surrounding application's image data. +The sample applications cjpeg and djpeg can support 12-bit mode only for PPM +and GIF file formats; you must disable the other file formats to compile a +12-bit cjpeg or djpeg. (install.doc has more information about that.) +At present, a 12-bit library can handle *only* 12-bit images, not both +precisions. (If you need to include both 8- and 12-bit libraries in a single +application, you could probably do it by defining NEED_SHORT_EXTERNAL_NAMES +for just one of the copies. You'd have to access the 8-bit and 12-bit copies +from separate application source files. This is untested ... if you try it, +we'd like to hear whether it works!) + +Note that a 12-bit library always compresses in Huffman optimization mode, +in order to generate valid Huffman tables. This is necessary because our +default Huffman tables only cover 8-bit data. If you need to output 12-bit +files in one pass, you'll have to supply suitable default Huffman tables. +You may also want to supply your own DCT quantization tables; the existing +quality-scaling code has been developed for 8-bit use, and probably doesn't +generate especially good tables for 12-bit. + +The maximum number of components (color channels) in the image is determined +by MAX_COMPONENTS. The JPEG standard allows up to 255 components, but we +expect that few applications will need more than four or so. + +On machines with unusual data type sizes, you may be able to improve +performance or reduce memory space by tweaking the various typedefs in +jmorecfg.h. In particular, on some RISC CPUs, access to arrays of "short"s +is quite slow; consider trading memory for speed by making JCOEF, INT16, and +UINT16 be "int" or "unsigned int". UINT8 is also a candidate to become int. +You probably don't want to make JSAMPLE be int unless you have lots of memory +to burn. + +You can reduce the size of the library by compiling out various optional +functions. To do this, undefine xxx_SUPPORTED symbols as necessary. + +You can also save a few K by not having text error messages in the library; +the standard error message table occupies about 5Kb. This is particularly +reasonable for embedded applications where there's no good way to display +a message anyway. To do this, remove the creation of the message table +(jpeg_std_message_table[]) from jerror.c, and alter format_message to do +something reasonable without it. You could output the numeric value of the +message code number, for example. If you do this, you can also save a couple +more K by modifying the TRACEMSn() macros in jerror.h to expand to nothing; +you don't need trace capability anyway, right? + + +Portability considerations +-------------------------- + +The JPEG library has been written to be extremely portable; the sample +applications cjpeg and djpeg are slightly less so. This section summarizes +the design goals in this area. (If you encounter any bugs that cause the +library to be less portable than is claimed here, we'd appreciate hearing +about them.) + +The code works fine on ANSI C, C++, and pre-ANSI C compilers, using any of +the popular system include file setups, and some not-so-popular ones too. +See install.doc for configuration procedures. + +The code is not dependent on the exact sizes of the C data types. As +distributed, we make the assumptions that + char is at least 8 bits wide + short is at least 16 bits wide + int is at least 16 bits wide + long is at least 32 bits wide +(These are the minimum requirements of the ANSI C standard.) Wider types will +work fine, although memory may be used inefficiently if char is much larger +than 8 bits or short is much bigger than 16 bits. The code should work +equally well with 16- or 32-bit ints. + +In a system where these assumptions are not met, you may be able to make the +code work by modifying the typedefs in jmorecfg.h. However, you will probably +have difficulty if int is less than 16 bits wide, since references to plain +int abound in the code. + +char can be either signed or unsigned, although the code runs faster if an +unsigned char type is available. If char is wider than 8 bits, you will need +to redefine JOCTET and/or provide custom data source/destination managers so +that JOCTET represents exactly 8 bits of data on external storage. + +The JPEG library proper does not assume ASCII representation of characters. +But some of the image file I/O modules in cjpeg/djpeg do have ASCII +dependencies in file-header manipulation; so does cjpeg's select_file_type() +routine. + +The JPEG library does not rely heavily on the C library. In particular, C +stdio is used only by the data source/destination modules and the error +handler, all of which are application-replaceable. (cjpeg/djpeg are more +heavily dependent on stdio.) malloc and free are called only from the memory +manager "back end" module, so you can use a different memory allocator by +replacing that one file. + +The code generally assumes that C names must be unique in the first 15 +characters. However, global function names can be made unique in the +first 6 characters by defining NEED_SHORT_EXTERNAL_NAMES. + +More info about porting the code may be gleaned by reading jconfig.doc, +jmorecfg.h, and jinclude.h. + + +Notes for MS-DOS implementors +----------------------------- + +The IJG code is designed to work efficiently in 80x86 "small" or "medium" +memory models (i.e., data pointers are 16 bits unless explicitly declared +"far"; code pointers can be either size). You may be able to use small +model to compile cjpeg or djpeg by itself, but you will probably have to use +medium model for any larger application. This won't make much difference in +performance. You *will* take a noticeable performance hit if you use a +large-data memory model (perhaps 10%-25%), and you should avoid "huge" model +if at all possible. + +The JPEG library typically needs 2Kb-3Kb of stack space. It will also +malloc about 20K-30K of near heap space while executing (and lots of far +heap, but that doesn't count in this calculation). This figure will vary +depending on selected operating mode, and to a lesser extent on image size. +There is also about 5Kb-6Kb of constant data which will be allocated in the +near data segment (about 4Kb of this is the error message table). +Thus you have perhaps 20K available for other modules' static data and near +heap space before you need to go to a larger memory model. The C library's +static data will account for several K of this, but that still leaves a good +deal for your needs. (If you are tight on space, you could reduce the sizes +of the I/O buffers allocated by jdatasrc.c and jdatadst.c, say from 4K to +1K. Another possibility is to move the error message table to far memory; +this should be doable with only localized hacking on jerror.c.) + +About 2K of the near heap space is "permanent" memory that will not be +released until you destroy the JPEG object. This is only an issue if you +save a JPEG object between compression or decompression operations. + +Far data space may also be a tight resource when you are dealing with large +images. The most memory-intensive case is decompression with two-pass color +quantization, or single-pass quantization to an externally supplied color +map. This requires a 128Kb color lookup table plus strip buffers amounting +to about 40 bytes per column for typical sampling ratios (eg, about 25600 +bytes for a 640-pixel-wide image). You may not be able to process wide +images if you have large data structures of your own. + +Of course, all of these concerns vanish if you use a 32-bit flat-memory-model +compiler, such as DJGPP or Watcom C. We highly recommend flat model if you +can use it; the JPEG library is significantly faster in flat model. diff --git a/gtkmm-osx/jpeg-6b/ltconfig b/gtkmm-osx/jpeg-6b/ltconfig new file mode 100755 index 0000000..2347e69 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/ltconfig @@ -0,0 +1,1512 @@ +#! /bin/sh + +# ltconfig - Create a system-specific libtool. +# Copyright (C) 1996-1998 Free Software Foundation, Inc. +# Gordon Matzigkeit , 1996 +# +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A lot of this script is taken from autoconf-2.10. + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi + +echo=echo +if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then : +else + # The Solaris and AIX default echo program unquotes backslashes. + # This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # So, we emulate echo with printf '%s\n' + echo="printf %s\\n" + if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then : + else + # Oops. We have no working printf. Try to find a not-so-buggy echo. + echo=echo + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" + for dir in $PATH /usr/ucb; do + if test -f $dir/echo && test "X`$dir/echo '\t'`" = 'X\t'; then + echo="$dir/echo" + break + fi + done + IFS="$save_ifs" + fi +fi + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e s/^X//' +sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + +# The name of this program. +progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` + +# Constants: +PROGRAM=ltconfig +PACKAGE=libtool +VERSION=1.2 +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5' +rm="rm -f" + +help="Try \`$progname --help' for more information." + +# Global variables: +can_build_shared=yes +enable_shared=yes +# All known linkers require a `.a' archive for static linking. +enable_static=yes +ltmain= +silent= +srcdir= +ac_config_guess= +ac_config_sub= +host= +nonopt= +verify_host=yes +with_gcc=no +with_gnu_ld=no + +old_AR="$AR" +old_CC="$CC" +old_CFLAGS="$CFLAGS" +old_CPPFLAGS="$CPPFLAGS" +old_LD="$LD" +old_LN_S="$LN_S" +old_NM="$NM" +old_RANLIB="$RANLIB" + +# Parse the command line options. +args= +prev= +for option +do + case "$option" in + -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + eval "$prev=\$option" + prev= + continue + fi + + case "$option" in + --help) cat <&2 + echo "$help" 1>&2 + exit 1 + ;; + + *) + if test -z "$ltmain"; then + ltmain="$option" + elif test -z "$host"; then +# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 +# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then +# echo "$progname: warning \`$option' is not a valid host type" 1>&2 +# fi + host="$option" + else + echo "$progname: too many arguments" 1>&2 + echo "$help" 1>&2 + exit 1 + fi ;; + esac +done + +if test -z "$ltmain"; then + echo "$progname: you must specify a LTMAIN file" 1>&2 + echo "$help" 1>&2 + exit 1 +fi + +if test -f "$ltmain"; then : +else + echo "$progname: \`$ltmain' does not exist" 1>&2 + echo "$help" 1>&2 + exit 1 +fi + +# Quote any args containing shell metacharacters. +ltconfig_args= +for arg +do + case "$arg" in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ltconfig_args="$ltconfig_args '$arg'" ;; + *) ltconfig_args="$ltconfig_args $arg" ;; + esac +done + +# A relevant subset of AC_INIT. + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 5 compiler messages saved in config.log +# 6 checking for... messages and results +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>>./config.log + +# NLS nuisances. +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LANG+set}" = set; then LANG=C; export LANG; fi + +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + +if test -z "$srcdir"; then + # Assume the source directory is the same one as the path to ltmain.sh. + srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'` + test "$srcdir" = "$ltmain" && srcdir=. +fi + +trap "$rm conftest*; exit 1" 1 2 15 +if test "$verify_host" = yes; then + # Check for config.guess and config.sub. + ac_aux_dir= + for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/config.guess; then + ac_aux_dir=$ac_dir + break + fi + done + if test -z "$ac_aux_dir"; then + echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2 + echo "$help" 1>&2 + exit 1 + fi + ac_config_guess=$ac_aux_dir/config.guess + ac_config_sub=$ac_aux_dir/config.sub + + # Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else + echo "$progname: cannot run $ac_config_sub" 1>&2 + echo "$help" 1>&2 + exit 1 + fi + + echo $ac_n "checking host system type""... $ac_c" 1>&6 + + host_alias=$host + case "$host_alias" in + "") + if host_alias=`$ac_config_guess`; then : + else + echo "$progname: cannot guess host type; you must specify one" 1>&2 + echo "$help" 1>&2 + exit 1 + fi ;; + esac + host=`$ac_config_sub $host_alias` + echo "$ac_t$host" 1>&6 + + # Make sure the host verified. + test -z "$host" && exit 1 + +elif test -z "$host"; then + echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 + echo "$help" 1>&2 + exit 1 +else + host_alias=$host +fi + +# Transform linux* to *-*-linux-gnu*, to support old configure scripts. +case "$host_os" in +linux-gnu*) ;; +linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` +esac + +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +case "$host_os" in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "${COLLECT_NAMES+set}" != set; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR cru $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +# Set a sane default for `AR'. +test -z "$AR" && AR=ar + +# If RANLIB is not set, then run the test. +if test "${RANLIB+set}" != "set"; then + result=no + + echo $ac_n "checking for ranlib... $ac_c" 1>&6 + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" + for dir in $PATH; do + test -z "$dir" && dir=. + if test -f $dir/ranlib; then + RANLIB="ranlib" + result="ranlib" + break + fi + done + IFS="$save_ifs" + + echo "$ac_t$result" 1>&6 +fi + +if test -n "$RANLIB"; then + old_archive_cmds="$old_archive_cmds;\$RANLIB \$oldlib" + old_postinstall_cmds="\$RANLIB \$oldlib;$old_postinstall_cmds" +fi + +# Check to see if we are using GCC. +if test "$with_gcc" != yes || test -z "$CC"; then + # If CC is not set, then try to find GCC or a usable CC. + if test -z "$CC"; then + echo $ac_n "checking for gcc... $ac_c" 1>&6 + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" + for dir in $PATH; do + IFS="$save_ifs" + test -z "$dir" && dir=. + if test -f $dir/gcc; then + CC="gcc" + break + fi + done + IFS="$save_ifs" + + if test -n "$CC"; then + echo "$ac_t$CC" 1>&6 + else + echo "$ac_t"no 1>&6 + fi + fi + + # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". + if test -z "$CC"; then + echo $ac_n "checking for cc... $ac_c" 1>&6 + IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" + cc_rejected=no + for dir in $PATH; do + test -z "$dir" && dir=. + if test -f $dir/cc; then + if test "$dir/cc" = "/usr/ucb/cc"; then + cc_rejected=yes + continue + fi + CC="cc" + break + fi + done + IFS="$save_ifs" + if test $cc_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same name, so the bogon will be chosen + # first if we set CC to just the name; use the full file name. + shift + set dummy "$dir/cc" "$@" + shift + CC="$@" + fi + fi + + if test -n "$CC"; then + echo "$ac_t$CC" 1>&6 + else + echo "$ac_t"no 1>&6 + fi + + if test -z "$CC"; then + echo "$progname: error: no acceptable cc found in \$PATH" 1>&2 + exit 1 + fi + fi + + # Now see if the compiler is really GCC. + with_gcc=no + echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 + echo "$progname:424: checking whether we are using GNU C" >&5 + + $rm conftest.c + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + with_gcc=yes + fi + $rm conftest.c + echo "$ac_t$with_gcc" 1>&6 +fi + +# Allow CC to be a program name with arguments. +set dummy $CC +compiler="$2" + +echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 +pic_flag= +special_shlib_compile_flags= +wl= +link_static_flag= +no_builtin_flag= + +if test "$with_gcc" = yes; then + wl='-Wl,' + link_static_flag='-static' + no_builtin_flag=' -fno-builtin' + + case "$host_os" in + aix3* | aix4* | irix5* | irix6* | osf3* | osf4*) + # PIC is the default for these OSes. + ;; + os2*) + # We can build DLLs from non-PIC. + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + pic_flag='-m68020 -resident32 -malways-restore-a4' + ;; + *) + pic_flag='-fPIC' + ;; + esac +else + # PORTME Check for PIC flags for the system compiler. + case "$host_os" in + aix3* | aix4*) + # All AIX code is PIC. + link_static_flag='-bnso -bI:/lib/syscalls.exp' + ;; + + hpux9* | hpux10*) + # Is there a better link_static_flag that works with the bundled CC? + wl='-Wl,' + link_static_flag="${wl}-a ${wl}archive" + pic_flag='+Z' + ;; + + irix5* | irix6*) + wl='-Wl,' + link_static_flag='-non_shared' + # PIC (with -KPIC) is the default. + ;; + + os2*) + # We can build DLLs from non-PIC. + ;; + + osf3* | osf4*) + # All OSF/1 code is PIC. + wl='-Wl,' + link_static_flag='-non_shared' + ;; + + sco3.2v5*) + pic_flag='-Kpic' + link_static_flag='-dn' + special_shlib_compile_flags='-belf' + ;; + + solaris2*) + pic_flag='-KPIC' + link_static_flag='-Bstatic' + wl='-Wl,' + ;; + + sunos4*) + pic_flag='-PIC' + link_static_flag='-Bstatic' + wl='-Qoption ld ' + ;; + + sysv4.2uw2*) + pic_flag='-KPIC' + link_static_flag='-Bstatic' + wl='-Wl,' + ;; + + uts4*) + pic_flag='-pic' + link_static_flag='-Bstatic' + ;; + + *) + can_build_shared=no + ;; + esac +fi + +if test -n "$pic_flag"; then + echo "$ac_t$pic_flag" 1>&6 + + # Check to make sure the pic_flag actually works. + echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6 + $rm conftest* + echo > conftest.c + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $pic_flag -DPIC" + echo "$progname:547: checking if $compiler PIC flag $pic_flag works" >&5 + if { (eval echo $progname:548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then + # Append any warnings to the config.log. + cat conftest.err 1>&5 + + # On HP-UX, both CC and GCC only warn that PIC is supported... then they + # create non-PIC objects. So, if there were any warnings, we assume that + # PIC is not supported. + if test -s conftest.err; then + echo "$ac_t"no 1>&6 + can_build_shared=no + pic_flag= + else + echo "$ac_t"yes 1>&6 + pic_flag=" $pic_flag" + fi + else + # Append any errors to the config.log. + cat conftest.err 1>&5 + can_build_shared=no + pic_flag= + echo "$ac_t"no 1>&6 + fi + CFLAGS="$save_CFLAGS" + $rm conftest* +else + echo "$ac_t"none 1>&6 +fi + +# Check for any special shared library compilation flags. +if test -n "$special_shlib_compile_flags"; then + echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2 + if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then : + else + echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2 + can_build_shared=no + fi +fi + +echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6 +$rm conftest* +echo 'main(){return(0);}' > conftest.c +save_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS $link_static_flag" +echo "$progname:591: checking if $compiler static flag $link_static_flag works" >&5 +if { (eval echo $progname:592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + echo "$ac_t$link_static_flag" 1>&6 +else + echo "$ac_t"none 1>&6 + link_static_flag= +fi +LDFLAGS="$save_LDFLAGS" +$rm conftest* + +if test -z "$LN_S"; then + # Check to see if we can use ln -s, or we need hard links. + echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 + $rm conftestdata + if ln -s X conftestdata 2>/dev/null; then + $rm conftestdata + LN_S="ln -s" + else + LN_S=ln + fi + if test "$LN_S" = "ln -s"; then + echo "$ac_t"yes 1>&6 + else + echo "$ac_t"no 1>&6 + fi +fi + +# Make sure LD is an absolute path. +if test -z "$LD"; then + ac_prog=ld + if test "$with_gcc" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 + echo "$progname:624: checking for ld used by GCC" >&5 + ac_prog=`($CC -print-prog-name=ld) 2>&5` + case "$ac_prog" in + # Accept absolute paths. + /* | [A-Za-z]:\\*) + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we are not using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac + elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld... $ac_c" 1>&6 + echo "$progname:642: checking for GNU ld" >&5 + else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 + echo "$progname:645: checking for non-GNU ld" >&5 + fi + + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog"; then + LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" + fi + + if test -n "$LD"; then + echo "$ac_t$LD" 1>&6 + else + echo "$ac_t"no 1>&6 + fi + + if test -z "$LD"; then + echo "$progname: error: no acceptable ld found in \$PATH" 1>&2 + exit 1 + fi +fi + +# Check to see if it really is or is not GNU ld. +echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 +# I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + with_gnu_ld=yes +else + with_gnu_ld=no +fi +echo "$ac_t$with_gnu_ld" 1>&6 + +# See if the linker supports building shared libraries. +echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 + +allow_undefined_flag= +no_undefined_flag= +archive_cmds= +old_archive_from_new_cmds= +export_dynamic_flag_spec= +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no +hardcode_shlibpath_var=unsupported +runpath_var= + +case "$host_os" in +amigaos* | sunos4*) + # On these operating systems, we should treat GNU ld like the system ld. + gnu_ld_acts_native=yes + ;; +*) + gnu_ld_acts_native=no + ;; +esac + +ld_shlibs=yes +if test "$with_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then + + # See if GNU ld supports shared libraries. + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs' + runpath_var=LD_RUN_PATH + ld_shlibs=yes + else + ld_shlibs=no + fi + + if test "$ld_shlibs" = yes; then + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + fi +else + # PORTME fill in a description of your system's linker (not GNU ld) + case "$host_os" in + aix3*) + allow_undefined_flag=unsupported + archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR cru $lib $objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$with_gcc" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix4*) + allow_undefined_flag=unsupported + archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR cru $lib $objdir/$soname' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + + amigaos*) + archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib$libobjs /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib$libobjs' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3, at last, uses gcc -shared to do shared libraries. + freebsd3*) + archive_cmds='$CC -shared -o $lib$libobjs' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs;mv $objdir/$soname $lib' + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10*) + archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs' + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + irix5* | irix6*) + archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + ;; + + netbsd*) + # Tested with NetBSD 1.2 ld + archive_cmds='$LD -Bshareable -o $lib$libobjs' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + openbsd*) + archive_cmds='$LD -Bshareable -o $lib$libobjs' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;$echo DATA >> $objdir/$libname.def;$echo " SINGLE NONSHARED" >> $objdir/$libname.def;$echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' + ;; + + osf3* | osf4*) + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + sco3.2v5*) + archive_cmds='$LD -G -o $lib$libobjs' + hardcode_direct=yes + ;; + + solaris2*) + no_undefined_flag=' -z text' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib$libobjs' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + + # Solaris 2 before 2.5 hardcodes -L paths. + case "$host_os" in + solaris2.[0-4]*) + hardcode_minus_L=yes + ;; + esac + ;; + + sunos4*) + if test "$with_gcc" = yes; then + archive_cmds='$CC -shared -o $lib$libobjs' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs' + fi + + if test "$with_gnu_ld" = yes; then + export_dynamic_flag_spec='${wl}-export-dynamic' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib$libobjs' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + can_build_shared=no + ;; + esac +fi +echo "$ac_t$ld_shlibs" 1>&6 + +if test -z "$NM"; then + echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 + case "$NM" in + /* | [A-Za-z]:\\*) ;; # Let the user override the test with a path. + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/nm; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + NM="$ac_dir/nm -B" + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + NM="$ac_dir/nm -p" + else + NM="$ac_dir/nm" + fi + break + fi + done + IFS="$ac_save_ifs" + test -z "$NM" && NM=nm + ;; + esac + echo "$ac_t$NM" 1>&6 +fi + +# Check for command to grab the raw symbol name followed by C symbol from nm. +echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRSTU]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Transform the above into a raw symbol and a C symbol. +symxfrm='\1 \1' + +# Define system-specific variables. +case "$host_os" in +aix*) + symcode='[BCDTU]' + ;; +irix*) + # Cannot use undefined symbols on IRIX because inlined functions mess us up. + symcode='[BCDEGRST]' + ;; +solaris2*) + symcode='[BDTU]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then + symcode='[ABCDGISTUW]' +fi + +# Write the raw and C identifiers. +global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'" + +# Check to see that the pipe works correctly. +pipe_works=no +$rm conftest* +cat > conftest.c <&5 +if { (eval echo $progname:972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then + # Now try to grab the symbols. + nlist=conftest.nm + if { echo "$progname:975: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then + + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + wcout=`wc "$nlist" 2>/dev/null` + count=`$echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'` + (test "$count" -ge 0) 2>/dev/null || count=-1 + else + rm -f "$nlist"T + count=-1 + fi + + # Make sure that we snagged all the symbols we need. + if egrep ' nm_test_var$' "$nlist" >/dev/null; then + if egrep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.c +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c + + cat <> conftest.c +#if defined (__STDC__) && __STDC__ +# define __ptr_t void * +#else +# define __ptr_t char * +#endif + +/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */ +int dld_preloaded_symbol_count = $count; + +/* The mapping between symbol names and symbols. */ +struct { + char *name; + __ptr_t address; +} +dld_preloaded_symbols[] = +{ +EOF + sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> conftest.c + cat <<\EOF >> conftest.c + {0, (__ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.o conftestm.o + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS='conftestm.o' + CFLAGS="$CFLAGS$no_builtin_flag" + if { (eval echo $progname:1033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + pipe_works=yes + else + echo "$progname: failed program was:" >&5 + cat conftest.c >&5 + fi + LIBS="$save_LIBS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $global_symbol_pipe" >&5 + fi +else + echo "$progname: failed program was:" >&5 + cat conftest.c >&5 +fi +$rm conftest* + +# Do not use the global_symbol_pipe unless it works. +echo "$ac_t$pipe_works" 1>&6 +test "$pipe_works" = yes || global_symbol_pipe= + +# Check hardcoding attributes. +echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var"; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct" != no && \ + test "$hardcode_minus_L" != no && \ + test "$hardcode_shlibpath_var" != no; then + + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +elif test "$hardcode_direct" != yes && \ + test "$hardcode_minus_L" != yes && \ + test "$hardcode_shlibpath_var" != yes; then + # We cannot hardcode anything. + hardcode_action=unsupported +else + # We can only hardcode existing directories. + hardcode_action=relink +fi +echo "$ac_t$hardcode_action" 1>&6 +test "$hardcode_action" = unsupported && can_build_shared=no + + +reload_flag= +reload_cmds='$LD$reload_flag -o $output$reload_objs' +echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6 +# PORTME Some linker may need a different reload flag. +reload_flag='-r' +echo "$ac_t$reload_flag" +test -n "$reload_flag" && reload_flag=" $reload_flag" + +# PORTME Fill in your ld.so characteristics +library_names_spec= +libname_spec='lib$name' +soname_spec= +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +version_type=none +dynamic_linker="$host_os ld.so" + +echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 +case "$host_os" in +aix3* | aix4*) + version_type=linux + library_names_spec='${libname}${release}.so.$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}.so.$major' + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' + ;; + +freebsd2* | freebsd3*) + version_type=sunos + library_names_spec='${libname}${release}.so.$versuffix $libname.so' + finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + ;; + +gnu*) + version_type=sunos + library_names_spec='${libname}${release}.so.$versuffix' + shlibpath_var=LD_LIBRARY_PATH + ;; + +hpux9* | hpux10*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + dynamic_linker="$host_os dld.sl" + version_type=sunos + shlibpath_var=SHLIB_PATH + library_names_spec='${libname}${release}.sl.$versuffix ${libname}${release}.sl.$major $libname.sl' + soname_spec='${libname}${release}.sl.$major' + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +irix5* | irix6*) + version_type=osf + soname_spec='${libname}${release}.so' + library_names_spec='${libname}${release}.so.$versuffix $libname.so' + shlibpath_var=LD_LIBRARY_PATH + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux-gnu*) + version_type=linux + library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' + soname_spec='${libname}${release}.so.$major' + finish_cmds='PATH="$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + + if test -f /lib/ld.so.1; then + dynamic_linker='GNU ld.so' + else + # Only the GNU ld.so supports shared libraries on MkLinux. + case "$host_cpu" in + powerpc*) dynamic_linker=no ;; + *) dynamic_linker='Linux ld.so' ;; + esac + fi + ;; + +netbsd* | openbsd*) + version_type=sunos + library_names_spec='${libname}${release}.so.$versuffix' + finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + ;; + +os2*) + libname_spec='$name' + library_names_spec='$libname.dll $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4*) + version_type=osf + soname_spec='${libname}${release}.so' + library_names_spec='${libname}${release}.so.$versuffix $libname.so' + shlibpath_var=LD_LIBRARY_PATH + ;; + +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}.so.$major' + library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris2*) + version_type=linux + library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' + soname_spec='${libname}${release}.so.$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}.so.$versuffix' + finish_cmds='PATH="$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + ;; + +sysv4.2uw2*) + version_type=linux + library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' + soname_spec='${libname}${release}.so.$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' + soname_spec='${libname}${release}.so.$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$ac_t$dynamic_linker" +test "$dynamic_linker" = no && can_build_shared=no + +# Report the final consequences. +echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 + +echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case "$host_os" in +aix*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds;\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; +esac + +echo "$ac_t$enable_shared" 1>&6 + +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes + +echo "checking whether to build static libraries... $enable_static" 1>&6 + +echo $ac_n "checking for objdir... $ac_c" 1>&6 +rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + objdir=_libs +fi +rmdir .libs 2>/dev/null +echo "$ac_t$objdir" 1>&6 + +# Copy echo and quote the copy, instead of the original, because it is +# used later. +ltecho="$echo" + +# Now quote all the things that may contain metacharacters. +for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \ + old_LN_S AR CC LD LN_S NM reload_flag reload_cmds wl pic_flag \ + link_static_flag no_builtin_flag export_dynamic_flag_spec \ + libname_spec library_names_spec soname_spec RANLIB \ + old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ + old_postuninstall_cmds archive_cmds postinstall_cmds postuninstall_cmds \ + allow_undefined_flag no_undefined_flag \ + finish_cmds finish_eval global_symbol_pipe \ + hardcode_libdir_flag_spec hardcode_libdir_separator; do + + case "$var" in + reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | archive_cmds | \ + postinstall_cmds | postuninstall_cmds | finish_cmds) + # Double-quote double-evaled strings. + eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`" + ;; + *) + eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`" + ;; + esac +done + +ofile=libtool +trap "$rm $ofile; exit 1" 1 2 15 +echo creating $ofile +$rm $ofile +cat < $ofile +#! /bin/sh + +# libtool - Provide generalized library-building support services. +# Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION +# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. +# +# Copyright (C) 1996-1998 Free Software Foundation, Inc. +# Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This program was configured as follows, +# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# +# CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\ +# LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\ +# $0$ltconfig_args +# +# Compiler and other test output produced by $progname, useful for +# debugging $progname, is in ./config.log if it exists. + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="sed -e s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi + +# An echo program that does not interpret backslashes. +echo="$ltecho" + +# The version of $progname that generated this script. +LTCONFIG_VERSION="$VERSION" + +# Shell to use when invoking shell scripts. +SHELL=${CONFIG_SHELL-/bin/sh} + +# Whether or not to build libtool libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build old-style libraries. +build_old_libs=$enable_static + +# The host system. +host_alias="$host_alias" +host="$host" + +# The archiver. +AR="$AR" + +# The default C compiler. +CC="$CC" + +# The linker used to build libraries. +LD="$LD" + +# Whether we need hard or soft links. +LN_S="$LN_S" + +# A BSD-compatible nm program. +NM="$NM" + +# The name of the directory that contains temporary libtool files. +objdir="$objdir" + +# How to create reloadable object files. +reload_flag="$reload_flag" +reload_cmds="$reload_cmds" + +# How to pass a linker flag through the compiler. +wl="$wl" + +# Additional compiler flags for building library objects. +pic_flag="$pic_flag" + +# Compiler flag to prevent dynamic linking. +link_static_flag="$link_static_flag" + +# Compiler flag to turn off builtin functions. +no_builtin_flag="$no_builtin_flag" + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec="$export_dynamic_flag_spec" + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec="$libname_spec" + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec="$library_names_spec" + +# The coded name of the library, if different from the real name. +soname_spec="$soname_spec" + +# Commands used to build and install an old-style archive. +RANLIB="$RANLIB" +old_archive_cmds="$old_archive_cmds" +old_postinstall_cmds="$old_postinstall_cmds" +old_postuninstall_cmds="$old_postuninstall_cmds" + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds="$old_archive_from_new_cmds" + +# Commands used to build and install a shared archive. +archive_cmds="$archive_cmds" +postinstall_cmds="$postinstall_cmds" +postuninstall_cmds="$postuninstall_cmds" + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag="$allow_undefined_flag" + +# Flag that forces no undefined symbols. +no_undefined_flag="$no_undefined_flag" + +# Commands used to finish a libtool library installation in a directory. +finish_cmds="$finish_cmds" + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval="$finish_eval" + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe="$global_symbol_pipe" + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec="$hardcode_libdir_flag_spec" + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator="$hardcode_libdir_separator" + +# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +EOF + +case "$host_os" in +aix3*) + cat <<\EOF >> $ofile +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "${COLLECT_NAMES+set}" != set; then + COLLECT_NAMES= + export COLLECT_NAMES +fi + +EOF + ;; +esac + +# Append the ltmain.sh script. +cat "$ltmain" >> $ofile || (rm -f $ofile; exit 1) + +chmod +x $ofile +exit 0 + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/gtkmm-osx/jpeg-6b/ltmain.sh b/gtkmm-osx/jpeg-6b/ltmain.sh new file mode 100644 index 0000000..e9350b3 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/ltmain.sh @@ -0,0 +1,2453 @@ +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun ltconfig. +# +# Copyright (C) 1996-1998 Free Software Foundation, Inc. +# Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# The name of this program. +progname=`$echo "$0" | sed 's%^.*/%%'` +modename="$progname" + +# Constants. +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION=1.2 + +default_mode= +help="Try \`$progname --help' for more information." +magic="%%%MAGIC variable%%%" +mkdir="mkdir" +mv="mv -f" +rm="rm -f" + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e s/^X//' +sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' + +# NLS nuisances. +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LANG+set}" = set; then LANG=C; export LANG; fi + +if test "$LTCONFIG_VERSION" != "$VERSION"; then + echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2 + echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 +fi + +if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + echo "$modename: not configured to build any kind of library" 1>&2 + echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= + +# Parse our command line options once, thoroughly. +while test $# -gt 0 +do + arg="$1" + shift + + case "$arg" in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case "$prev" in + execute_dlfiles) + eval "$prev=\"\$$prev \$arg\"" + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case "$arg" in + --help) + show_help=yes + ;; + + --version) + echo "$PROGRAM (GNU $PACKAGE) $VERSION" + exit 0 + ;; + + --dry-run | -n) + run=: + ;; + + --features) + echo "host: $host" + if test "$build_libtool_libs" = yes; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + exit 0 + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --quiet | --silent) + show=: + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 +fi + +if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + case "$nonopt" in + *cc | *++ | gcc* | *-gcc*) + mode=link + for arg + do + case "$arg" in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi + fi + ;; + esac + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case "$mode" in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + lastarg= + srcfile="$nonopt" + suppress_output= + + for arg + do + # Accept any command-line options. + case "$arg" in + -o) + $echo "$modename: you cannot specify the output filename with \`-o'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + + -static) + build_libtool_libs=no + build_old_libs=yes + continue + ;; + esac + + # Accept the current argument as the source file. + lastarg="$srcfile" + srcfile="$arg" + + # Aesthetically quote the previous argument. + + # Backslashify any backslashes, double quotes, and dollar signs. + # These are the only characters that are still specially + # interpreted inside of double-quoted scrings. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly in scan + # sets, so we specify it separately. + case "$lastarg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + lastarg="\"$lastarg\"" + ;; + esac + + # Add the previous argument to base_compile. + if test -z "$base_compile"; then + base_compile="$lastarg" + else + base_compile="$base_compile $lastarg" + fi + done + + # Get the name of the library object. + libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + + # Recognize several different file suffixes. + xform='[cCFSfms]' + case "$libobj" in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.f90) xform=f90 ;; + *.for) xform=for ;; + esac + + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + + case "$libobj" in + *.lo) obj=`$echo "X$libobj" | $Xsed -e 's/\.lo$/.o/'` ;; + *) + $echo "$modename: cannot determine name of library object from \`$srcfile'" 1>&2 + exit 1 + ;; + esac + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + $run $rm $obj $libobj + trap "$run $rm $obj $libobj; exit 1" 1 2 15 + else + $run $rm $libobj + trap "$run $rm $libobj; exit 1" 1 2 15 + fi + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + # All platforms use -DPIC, to notify preprocessed assembler code. + $show "$base_compile$pic_flag -DPIC $srcfile" + if $run eval "$base_compile\$pic_flag -DPIC \$srcfile"; then : + else + test -n "$obj" && $run $rm $obj + exit 1 + fi + + # If we have no pic_flag, then copy the object into place and finish. + if test -z "$pic_flag"; then + $show "$LN_S $obj $libobj" + $run $LN_S $obj $libobj + exit $? + fi + + # Just move the object, then go on to compile the next one + $show "$mv $obj $libobj" + $run $mv $obj $libobj || exit 1 + + # Allow error messages only from the first compilation. + suppress_output=' >/dev/null 2>&1' + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + # Suppress compiler output if we already did a PIC compilation. + $show "$base_compile $srcfile$suppress_output" + if $run eval "$base_compile \$srcfile$suppress_output"; then : + else + $run $rm $obj $libobj + exit 1 + fi + fi + + # Create an invalid libtool object if no PIC, so that we do not + # accidentally link it into a program. + if test "$build_libtool_libs" != yes; then + $show "echo timestamp > $libobj" + $run eval "echo timestamp > \$libobj" || exit $? + fi + + exit 0 + ;; + + # libtool link mode + link) + modename="$modename: link" + CC="$nonopt" + allow_undefined=yes + compile_command="$CC" + finalize_command="$CC" + + compile_shlibpath= + finalize_shlibpath= + deplibs= + dlfiles= + dlprefiles= + export_dynamic=no + hardcode_libdirs= + libobjs= + link_against_libtool_libs= + ltlibs= + objs= + prev= + prevarg= + release= + rpath= + perm_rpath= + temp_rpath= + vinfo= + + # We need to know -static, to get the right output filenames. + for arg + do + case "$arg" in + -all-static | -static) + if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 + fi + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + for arg + do + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case "$prev" in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac + + case "$prev" in + dlfiles|dlprefiles) + case "$arg" in + *.la | *.lo) ;; # We handle these cases below. + *) + dlprefiles="$dlprefiles $arg" + test "$prev" = dlfiles && dlfiles="$dlfiles $arg" + prev= + ;; + esac + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath) + rpath="$rpath $arg" + prev= + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi + + prevarg="$arg" + + case "$arg" in + -all-static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + if test "$export_dynamic" != yes; then + export_dynamic=yes + if test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + else + arg= + fi + + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$finalize_command @SYMFILE@" + fi + ;; + + -L*) + dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'` + case "$dir" in + /* | [A-Za-z]:\\*) + # Add the corresponding hardcode_libdir_flag, if it is not identical. + ;; + *) + $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2 + exit 1 + ;; + esac + deplibs="$deplibs $arg" + ;; + + -l*) deplibs="$deplibs $arg" ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -o) prev=output ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -static) + # If we have no pic_flag, then this is the same as -all-static. + if test -z "$pic_flag" && test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + ;; + + *.o | *.a) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A library object. + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + if test "$build_libtool_libs" = yes; then + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e 's/\.lo$/\.o/'` + prev= + fi + libobjs="$libobjs $arg" + ;; + + *.la) + # A libtool-controlled library. + + dlname= + libdir= + library_names= + old_library= + + # Check to see that this really is a libtool archive. + if (sed -e '2q' $arg | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then : + else + $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2 + exit 1 + fi + + # If there is no directory component, then add one. + case "$arg" in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$libdir"; then + $echo "$modename: \`$arg' contains no -rpath information" 1>&2 + exit 1 + fi + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + + if test -z "$linklib"; then + $echo "$modename: cannot find name of link library for \`$arg'" 1>&2 + exit 1 + fi + + # Find the relevant object directory and library name. + name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'` + dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$arg"; then + dir="$objdir" + else + dir="$dir/$objdir" + fi + + # This library was specified with -dlopen. + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + if test -z "$dlname"; then + # If there is no dlname, we need to preload. + prev=dlprefiles + else + # We should not create a dependency on this library, but we + # may need any libraries it requires. + compile_command="$compile_command$dependency_libs" + finalize_command="$finalize_command$dependency_libs" + prev= + continue + fi + fi + + # The library was specified with -dlpreopen. + if test "$prev" = dlprefiles; then + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + dlprefiles="$dlprefiles $dir/$old_library" + else + dlprefiles="$dlprefiles $dir/$linklib" + fi + prev= + fi + + if test "$build_libtool_libs" = yes && test -n "$library_names"; then + link_against_libtool_libs="$link_against_libtool_libs $arg" + if test -n "$shlibpath_var"; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath " in + *" $dir "*) ;; + *) temp_rpath="$temp_rpath $dir" ;; + esac + fi + + # This is the magic to use -rpath. + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + # Put the magic libdir with the hardcode flag. + hardcode_libdirs="$libdir" + libdir="@HARDCODE_LIBDIRS@" + else + # Just accumulate the unique libdirs. + case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + libdir= + fi + fi + + if test -n "$libdir"; then + eval flag=\"$hardcode_libdir_flag_spec\" + + compile_command="$compile_command $flag" + finalize_command="$finalize_command $flag" + fi + elif test -n "$runpath_var"; then + # Do the same for the permanent run path. + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + + + case "$hardcode_action" in + immediate) + if test "$hardcode_direct" = no; then + compile_command="$compile_command $dir/$linklib" + elif test "$hardcode_minus_L" = no; then + compile_command="$compile_command -L$dir -l$name" + elif test "$hardcode_shlibpath_var" = no; then + compile_shlibpath="$compile_shlibpath$dir:" + compile_command="$compile_command -l$name" + fi + ;; + + relink) + # We need an absolute path. + case "$dir" in + /* | [A-Za-z]:\\*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + exit 1 + fi + dir="$absdir" + ;; + esac + + if test "$hardcode_direct" = yes; then + compile_command="$compile_command $dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + compile_command="$compile_command -L$dir -l$name" + elif test "$hardcode_shlibpath_var" = yes; then + compile_shlibpath="$compile_shlibpath$dir:" + compile_command="$compile_command -l$name" + fi + ;; + + *) + $echo "$modename: \`$hardcode_action' is an unknown hardcode action" 1>&2 + exit 1 + ;; + esac + + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes; then + finalize_command="$finalize_command $libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + finalize_command="$finalize_command -L$libdir -l$name" + elif test "$hardcode_shlibpath_var" = yes; then + finalize_shlibpath="$finalize_shlibpath$libdir:" + finalize_command="$finalize_command -l$name" + else + # We cannot seem to hardcode it, guess we'll fake it. + finalize_command="$finalize_command -L$libdir -l$name" + fi + else + # Transform directly to old archives if we don't build new libraries. + if test -n "$pic_flag" && test -z "$old_library"; then + $echo "$modename: cannot find static library for \`$arg'" 1>&2 + exit 1 + fi + + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_command="$compile_command $dir/$linklib" + finalize_command="$finalize_command $dir/$linklib" + else + compile_command="$compile_command -L$dir -l$name" + finalize_command="$finalize_command -L$dir -l$name" + fi + fi + + # Add in any libraries that this one depends upon. + compile_command="$compile_command$dependency_libs" + finalize_command="$finalize_command$dependency_libs" + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + ;; + esac + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test -n "$vinfo" && test -n "$release"; then + $echo "$modename: you cannot specify both \`-version-info' and \`-release'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + oldlib= + oldobjs= + case "$output" in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + + */* | *\\*) + $echo "$modename: output file \`$output' must have no directory components" 1>&2 + exit 1 + ;; + + *.a) + # Now set the variables for building old libraries. + build_libtool_libs=no + build_old_libs=yes + oldlib="$output" + $show "$rm $oldlib" + $run $rm $oldlib + ;; + + *.la) + # Make sure we only generate libraries of the form `libNAME.la'. + case "$output" in + lib*) ;; + *) + $echo "$modename: libtool library \`$arg' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + esac + + name=`$echo "X$output" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval libname=\"$libname_spec\" + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + current=0 + revision=0 + age=0 + + if test -n "$objs"; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1 + exit 1 + fi + + # How the heck are we supposed to write a wrapper for a shared library? + if test -n "$link_against_libtool_libs"; then + $echo "$modename: libtool library \`$output' may not depend on uninstalled libraries:$link_against_libtool_libs" 1>&2 + exit 1 + fi + + if test -n "$dlfiles$dlprefiles"; then + $echo "$modename: warning: \`-dlopen' is ignored while creating libtool libraries" 1>&2 + # Nullify the symbol file. + compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi + + if test -z "$rpath"; then + $echo "$modename: you must specify an installation directory with \`-rpath'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + set dummy $rpath + if test $# -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" + + # Parse the version information argument. + IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' + set dummy $vinfo + IFS="$save_ifs" + + if test -n "$5"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + test -n "$2" && current="$2" + test -n "$3" && revision="$3" + test -n "$4" && age="$4" + + # Check that each of the things are valid numbers. + case "$current" in + 0 | [1-9] | [1-9][0-9]*) ;; + *) + $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + case "$revision" in + 0 | [1-9] | [1-9][0-9]*) ;; + *) + $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + case "$age" in + 0 | [1-9] | [1-9][0-9]*) ;; + *) + $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + ;; + esac + + if test $age -gt $current; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit 1 + fi + + # Calculate the version variables. + version_vars="version_type current age revision" + case "$version_type" in + none) ;; + + linux) + version_vars="$version_vars major versuffix" + major=`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + version_vars="$version_vars versuffix verstring" + major=`expr $current - $age` + versuffix="$current.$age.$revision" + verstring="$versuffix" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test $loop != 0; do + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + version_vars="$version_vars major versuffix" + major="$current" + versuffix="$current.$revision" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit 1 + ;; + esac + + # Create the output directory, or remove our outputs if we need to. + if test -d $objdir; then + $show "$rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*" + $run $rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.* + else + $show "$mkdir $objdir" + $run $mkdir $objdir + status=$? + if test $status -eq 0 || test -d $objdir; then : + else + exit $status + fi + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + # Add libc to deplibs on all systems. + dependency_libs="$deplibs" + deplibs="$deplibs -lc" + + if test "$build_libtool_libs" = yes; then + # Get the real and link names of the library. + eval library_names=\"$library_names_spec\" + set dummy $library_names + realname="$2" + shift; shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + lib="$objdir/$realname" + for link + do + linknames="$linknames $link" + done + + # Use standard objects if they are PIC. + test -z "$pic_flag" && libobjs=`$echo "X$libobjs " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//g'` + + # Do each of the archive commands. + eval cmds=\"$archive_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Create links to the real library. + for linkname in $linknames; do + $show "(cd $objdir && $LN_S $realname $linkname)" + $run eval '(cd $objdir && $LN_S $realname $linkname)' || exit $? + done + + # If -export-dynamic was specified, set the dlname. + if test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + + # Now set the variables for building old libraries. + oldlib="$objdir/$libname.a" + ;; + + *.lo | *.o) + if test -n "$link_against_libtool_libs"; then + $echo "$modename: error: cannot link libtool libraries into reloadable objects" 1>&2 + exit 1 + fi + + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored while creating objects" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles"; then + $echo "$modename: warning: \`-dlopen' is ignored while creating objects" 1>&2 + # Nullify the symbol file. + compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored while creating objects" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored while creating objects" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2 + fi + + case "$output" in + *.lo) + if test -n "$objs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit 1 + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e 's/\.lo$/.o/'` + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $run $rm $obj $libobj + + # Create the old-style object. + reload_objs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'` + + output="$obj" + eval cmds=\"$reload_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Exit if we aren't doing a library object file. + test -z "$libobj" && exit 0 + + if test "$build_libtool_libs" != yes; then + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + $show "echo timestamp > $libobj" + $run eval "echo timestamp > $libobj" || exit $? + exit 0 + fi + + if test -n "$pic_flag"; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs" + output="$libobj" + eval cmds=\"$reload_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + else + # Just create a symlink. + $show "$LN_S $obj $libobj" + $run $LN_S $obj $libobj || exit 1 + fi + + exit 0 + ;; + + *) + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored while linking programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2 + fi + + if test -n "$rpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + # Put the magic libdir with the hardcode flag. + hardcode_libdirs="$libdir" + libdir="@HARDCODE_LIBDIRS@" + else + # Just accumulate the unique libdirs. + case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + libdir= + fi + fi + + if test -n "$libdir"; then + eval flag=\"$hardcode_libdir_flag_spec\" + + compile_command="$compile_command $flag" + finalize_command="$finalize_command $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + fi + + # Substitute the hardcoded libdirs into the compile commands. + if test -n "$hardcode_libdir_separator"; then + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"` + fi + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$echo "X$compile_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'` + finalize_command=`$echo "X$finalize_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'` + fi + + if test "$export_dynamic" = yes && test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${output}S.c" + else + dlsyms= + fi + + if test -n "$dlsyms"; then + # Add our own program objects to the preloaded list. + dlprefiles=`$echo "X$objs$dlprefiles " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'` + + # Discover the nlist of each of the dlfiles. + nlist="$objdir/${output}.nm" + + if test -d $objdir; then + $show "$rm $nlist ${nlist}T" + $run $rm "$nlist" "${nlist}T" + else + $show "$mkdir $objdir" + $run $mkdir $objdir + status=$? + if test $status -eq 0 || test -d $objdir; then : + else + exit $status + fi + fi + + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + # Parse the name list into a source file. + $show "creating $objdir/$dlsyms" + if test -z "$run"; then + # Make sure we at least have an empty file. + test -f "$nlist" || : > "$nlist" + + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + wcout=`wc "$nlist" 2>/dev/null` + count=`echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'` + (test "$count" -ge 0) 2>/dev/null || count=-1 + else + $rm "$nlist"T + count=-1 + fi + + case "$dlsyms" in + "") ;; + *.c) + $echo > "$objdir/$dlsyms" "\ +/* $dlsyms - symbol resolution table for \`$output' dlsym emulation. */ +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* Prevent the only kind of declaration conflicts we can make. */ +#define dld_preloaded_symbol_count some_other_symbol +#define dld_preloaded_symbols some_other_symbol + +/* External symbol declarations for the compiler. */\ +" + + if test -f "$nlist"; then + sed -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$objdir/$dlsyms" + else + echo '/* NONE */' >> "$objdir/$dlsyms" + fi + + $echo >> "$objdir/$dlsyms" "\ + +#undef dld_preloaded_symbol_count +#undef dld_preloaded_symbols + +#if defined (__STDC__) && __STDC__ +# define __ptr_t void * +#else +# define __ptr_t char * +#endif + +/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */ +int dld_preloaded_symbol_count = $count; + +/* The mapping between symbol names and symbols. */ +struct { + char *name; + __ptr_t address; +} +dld_preloaded_symbols[] = +{\ +" + + if test -f "$nlist"; then + sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> "$objdir/$dlsyms" + fi + + $echo >> "$objdir/$dlsyms" "\ + {0, (__ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif\ +" + ;; + + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit 1 + ;; + esac + fi + + # Now compile the dynamic symbol file. + $show "(cd $objdir && $CC -c$no_builtin_flag \"$dlsyms\")" + $run eval '(cd $objdir && $CC -c$no_builtin_flag "$dlsyms")' || exit $? + + # Transform the symbol file into the correct name. + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"` + elif test "$export_dynamic" != yes; then + test -n "$dlfiles$dlprefiles" && $echo "$modename: warning: \`-dlopen' and \`-dlpreopen' are ignored without \`-export-dynamic'" 1>&2 + else + # We keep going just in case the user didn't refer to + # dld_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + + # Nullify the symbol file. + compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi + + if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + + # We have no uninstalled library dependencies, so finalize right now. + $show "$compile_command" + $run eval "$compile_command" + exit $? + fi + + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'%g'` + finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'T%g'` + + # Create the binary in the object directory, then wrap it. + if test -d $objdir; then : + else + $show "$mkdir $objdir" + $run $mkdir $objdir + status=$? + if test $status -eq 0 || test -d $objdir; then : + else + exit $status + fi + fi + + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case "$dir" in + /* | [A-Za-z]:\\*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + fi + + # Delete the old output file. + $run $rm $output + + if test -n "$compile_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_command="$runpath_var=\"$rpath\$$runpath_var\" $compile_command" + finalize_command="$runpath_var=\"$rpath\$$runpath_var\" $finalize_command" + fi + + case "$hardcode_action" in + relink) + # AGH! Flame the AIX and HP-UX people for me, will ya? + $echo "$modename: warning: using a buggy system linker" 1>&2 + $echo "$modename: relinking will be required before \`$output' can be installed" 1>&2 + ;; + esac + + $show "$compile_command" + $run eval "$compile_command" || exit $? + + # Now create the wrapper script. + $show "creating $output" + + # Quote the finalize command for shipping. + finalize_command=`$echo "X$finalize_command" | $Xsed -e "$sed_quote_subst"` + + # Quote $echo for shipping. + qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + + # Only actually do things if our run command is non-null. + if test -z "$run"; then + $rm $output + trap "$rm $output; exit 1" 1 2 15 + + $echo > $output "\ +#! /bin/sh + +# $output - temporary wrapper script for $objdir/$output +# Generated by ltmain.sh - GNU $PACKAGE $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of \``pwd`'. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e s/^X//' +sed_quote_subst='$sed_quote_subst' + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + link_against_libtool_libs='$link_against_libtool_libs' + finalize_command=\"$finalize_command\" +else + # When we are sourced in execute mode, \$file and \$echo are already set. + if test \"\$libtool_execute_magic\" = \"$magic\"; then : + else + echo=\"$qecho\" + file=\"\$0\" + fi\ +" + $echo >> $output "\ + + # Find the directory that this script lives in. + thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + /* | [A-Za-z]:\\*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` + done + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" + + progdir=\"\$thisdir/$objdir\" + program='$output' + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $echo >> $output "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/:*\$//'\` + + export $shlibpath_var +" + fi + + $echo >> $output "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. + + # Export the path to the program. + PATH=\"\$progdir:\$PATH\" + export PATH + + exec \$program \${1+\"\$@\"} + + \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" + exit 1 + fi + else + # The program doesn't exist. + \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 + \$echo \"This script is just a wrapper for \$program.\" 1>&2 + echo \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" + chmod +x $output + fi + exit 0 + ;; + esac + + # See if we need to build an old-fashioned archive. + if test "$build_old_libs" = "yes"; then + # Transform .lo files to .o files. + oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'` + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + eval cmds=\"$old_archive_from_new_cmds\" + else + eval cmds=\"$old_archive_cmds\" + fi + IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Now create the libtool archive. + case "$output" in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.a" + + $show "creating $output" + + # Only create the output if not a dry run. + if test -z "$run"; then + $echo > $output "\ +# $output - a libtool library file +# Generated by ltmain.sh - GNU $PACKAGE $VERSION + +# The name that we can dlopen(3). +dlname='$dlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Directory that this library needs to be installed in: +libdir='$install_libdir'\ +" + fi + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $objdir && $LN_S ../$output $output)" + $run eval "(cd $objdir && $LN_S ../$output $output)" || exit 1 + ;; + esac + exit 0 + ;; + + # libtool install mode + install) + modename="$modename: install" + + # There may be an optional /bin/sh argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL"; then + # Aesthetically quote it. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg="$nonopt" + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir= + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest="$arg" + continue + fi + + case "$arg" in + -d) isdir=yes ;; + -f) prev="-f" ;; + -g) prev="-g" ;; + -m) prev="-m" ;; + -o) prev="-o" ;; + -s) + stripme=" -s" + continue + ;; + -*) ;; + + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest="$arg" + continue + fi + ;; + esac + + # Aesthetically quote the argument. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case "$arg" in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit 1 + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test -n "$isdir"; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test $# -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + fi + case "$destdir" in + /* | [A-Za-z]:\\*) ;; + *) + for file in $files; do + case "$file" in + *.lo) ;; + *) + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case "$file" in + *.a) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + library_names= + old_library= + # If there is no directory component, then add one. + case "$file" in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/" + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" + + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift + + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$realname $destdir/$realname" + $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $? + test "X$dlname" = "X$realname" && dlname= + + if test $# -gt 0; then + # Delete the old symlinks. + rmcmd="$rm" + for linkname + do + rmcmd="$rmcmd $destdir/$linkname" + done + $show "$rmcmd" + $run $rmcmd + + # ... and create new ones. + for linkname + do + test "X$dlname" = "X$linkname" && dlname= + $show "(cd $destdir && $LN_S $realname $linkname)" + $run eval "(cd $destdir && $LN_S $realname $linkname)" + done + fi + + if test -n "$dlname"; then + # Install the dynamically-loadable library. + $show "$install_prog $dir/$dlname $destdir/$dlname" + $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $? + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + eval cmds=\"$postinstall_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + $show "$install_prog $file $destdir/$name" + $run eval "$install_prog $file $destdir/$name" || exit $? + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case "$destfile" in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e 's/\.lo$/\.o/'` + ;; + *.o) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; + esac + + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e 's/\.lo$/\.o/'` + + $show "$install_prog $staticobj $staticdest" + $run eval "$install_prog \$staticobj \$staticdest" || exit $? + fi + exit 0 + ;; + + *) + # Do a test to see if this is really a libtool program. + if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then + link_against_libtool_libs= + finalize_command= + + # If there is no directory component, then add one. + case "$file" in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Check the variables that should have been set. + if test -z "$link_against_libtool_libs" || test -z "$finalize_command"; then + $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 + exit 1 + fi + + finalize=yes + for lib in $link_against_libtool_libs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case "$lib" in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`" + if test -z "$libdir"; then + $echo "$modename: warning: \`$lib' contains no -rpath information" 1>&2 + elif test -f "$libfile"; then : + else + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + if test "$hardcode_action" = relink; then + if test "$finalize" = yes; then + $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2 + $show "$finalize_command" + if $run eval "$finalize_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + continue + fi + file="$objdir/$file"T + else + $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2 + fi + else + # Install the binary that we compiled earlier. + file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + $show "$install_prog$stripme $file $dest" + $run eval "$install_prog\$stripme \$file \$dest" || exit $? + ;; + esac + done + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + # Do each command in the postinstall commands. + eval cmds=\"$old_postinstall_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec $SHELL $0 --finish$current_libdirs + exit 1 + fi + + exit 0 + ;; + + # libtool finish mode + finish) + modename="$modename: finish" + libdirs="$nonopt" + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + eval cmds=\"$finish_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" + done + IFS="$save_ifs" + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" + fi + done + fi + + echo "------------------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + echo " $libdir" + done + echo + echo "To link against installed libraries in a given directory, LIBDIR," + echo "you must use the \`-LLIBDIR' flag during linking." + echo + echo " You will also need to do one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + echo " - use the \`$flag' linker flag" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + echo + echo "See any operating system documentation about shared libraries for" + echo "more information, such as the ld(1) and ld.so(8) manual pages." + echo "------------------------------------------------------------------------------" + exit 0 + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit 1 + fi + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test -f "$file"; then : + else + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + dir= + case "$file" in + *.la) + # Check to see that this really is a libtool archive. + if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + # Read the libtool library. + dlname= + library_names= + + # If there is no directory component, then add one. + case "$file" in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit 1 + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case "$file" in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then + # If there is no directory component, then add one. + case "$file" in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + + # Now actually exec the command. + eval "exec \$cmd$args" + + $echo "$modename: cannot exec \$cmd$args" + exit 1 + else + # Display what would be done. + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" + $echo "$cmd$args" + exit 0 + fi + ;; + + # libtool uninstall mode + uninstall) + modename="$modename: uninstall" + rm="$nonopt" + files= + + for arg + do + case "$arg" in + -*) rm="$rm $arg" ;; + *) files="$files $arg" ;; + esac + done + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit 1 + fi + + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + rmfiles="$file" + + case "$name" in + *.la) + # Possibly a libtool archive, so verify it. + if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then + . $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $dir/$n" + test "X$n" = "X$dlname" && dlname= + done + test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname" + test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library" + + $show "$rm $rmfiles" + $run $rm $rmfiles + + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + eval cmds=\"$postuninstall_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" + done + IFS="$save_ifs" + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + eval cmds=\"$old_postuninstall_cmds\" + IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" + done + IFS="$save_ifs" + fi + + # FIXME: should reinstall the best remaining shared library. + fi + ;; + + *.lo) + if test "$build_old_libs" = yes; then + oldobj=`$echo "X$name" | $Xsed -e 's/\.lo$/\.o/'` + rmfiles="$rmfiles $dir/$oldobj" + fi + $show "$rm $rmfiles" + $run $rm $rmfiles + ;; + + *) + $show "$rm $rmfiles" + $run $rm $rmfiles + ;; + esac + done + exit 0 + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit 1 + ;; + esac + + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit 1 +fi # test -z "$show_help" + +# We need to display help for each of the modes. +case "$mode" in +"") $echo \ +"Usage: $modename [OPTION]... [MODE-ARG]... + +Provide generalized library-building support services. + +-n, --dry-run display commands without modifying any files + --features display configuration information and exit + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --version print version information + +MODE must be one of the following: + + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for +a more detailed description of MODE." + exit 0 + ;; + +compile) + $echo \ +"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + +execute) + $echo \ +"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + +finish) + $echo \ +"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + +install) + $echo \ +"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + +link) + $echo \ +"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to dld_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -static do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only +library objects (\`.lo' files) may be specified, and \`-rpath' is required. + +If OUTPUT-FILE ends in \`.a', then a standard library is created using \`ar' +and \`ranlib'. + +If OUTPUT-FILE ends in \`.lo' or \`.o', then a reloadable object file is +created, otherwise an executable program is created." + ;; + +uninstall) + $echo +"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + +*) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit 1 + ;; +esac + +echo +$echo "Try \`$modename --help' for more information about other modes." + +exit 0 + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: diff --git a/gtkmm-osx/jpeg-6b/makcjpeg.st b/gtkmm-osx/jpeg-6b/makcjpeg.st new file mode 100644 index 0000000..fc72c89 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/makcjpeg.st @@ -0,0 +1,38 @@ +; Project file for Independent JPEG Group's software +; +; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. +; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de), +; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de), +; and Guido Vollbeding (guivol@esc.de). +; +; To use this file, rename it to cjpeg.prj. +; If you are using Turbo C, change filenames beginning with "pc..." to "tc..." +; Read installation instructions before trying to make the program! +; +; +; * * * Output file * * * +cjpeg.ttp +; +; * * * COMPILER OPTIONS * * * +.C[-P] ; absolute calls +.C[-M] ; and no string merging, folks +.C[-w-cln] ; no "constant is long" warnings +.C[-w-par] ; no "parameter xxxx unused" +.C[-w-rch] ; no "unreachable code" +.C[-wsig] ; warn if significant digits may be lost += +; * * * * List of modules * * * * +pcstart.o +cjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h) +cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +rdppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +rdgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +rdtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +rdbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +rdrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +libjpeg.lib ; built by libjpeg.prj +pcfltlib.lib ; floating point library +; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED +pcstdlib.lib ; standard library +pcextlib.lib ; extended library diff --git a/gtkmm-osx/jpeg-6b/makdjpeg.st b/gtkmm-osx/jpeg-6b/makdjpeg.st new file mode 100644 index 0000000..3226726 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/makdjpeg.st @@ -0,0 +1,38 @@ +; Project file for Independent JPEG Group's software +; +; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. +; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de), +; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de), +; and Guido Vollbeding (guivol@esc.de). +; +; To use this file, rename it to djpeg.prj. +; If you are using Turbo C, change filenames beginning with "pc..." to "tc..." +; Read installation instructions before trying to make the program! +; +; +; * * * Output file * * * +djpeg.ttp +; +; * * * COMPILER OPTIONS * * * +.C[-P] ; absolute calls +.C[-M] ; and no string merging, folks +.C[-w-cln] ; no "constant is long" warnings +.C[-w-par] ; no "parameter xxxx unused" +.C[-w-rch] ; no "unreachable code" +.C[-wsig] ; warn if significant digits may be lost += +; * * * * List of modules * * * * +pcstart.o +djpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h) +cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +rdcolmap.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +wrppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +wrgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +wrtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +wrbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +wrrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +libjpeg.lib ; built by libjpeg.prj +pcfltlib.lib ; floating point library +; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED +pcstdlib.lib ; standard library +pcextlib.lib ; extended library diff --git a/gtkmm-osx/jpeg-6b/makeapps.ds b/gtkmm-osx/jpeg-6b/makeapps.ds new file mode 100644 index 0000000..bedd038 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/makeapps.ds @@ -0,0 +1,828 @@ +# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +!IF "$(CFG)" == "" +CFG=cjpeg - Win32 +!MESSAGE No configuration specified. Defaulting to cjpeg - Win32. +!ENDIF + +!IF "$(CFG)" != "cjpeg - Win32" && "$(CFG)" != "djpeg - Win32" &&\ + "$(CFG)" != "jpegtran - Win32" && "$(CFG)" != "rdjpgcom - Win32" &&\ + "$(CFG)" != "wrjpgcom - Win32" +!MESSAGE Invalid configuration "$(CFG)" specified. +!MESSAGE You can specify a configuration when running NMAKE on this makefile +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "apps.mak" CFG="cjpeg - Win32" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cjpeg - Win32" (based on "Win32 (x86) Console Application") +!MESSAGE "djpeg - Win32" (based on "Win32 (x86) Console Application") +!MESSAGE "jpegtran - Win32" (based on "Win32 (x86) Console Application") +!MESSAGE "rdjpgcom - Win32" (based on "Win32 (x86) Console Application") +!MESSAGE "wrjpgcom - Win32" (based on "Win32 (x86) Console Application") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF +################################################################################ +# Begin Project +# PROP Target_Last_Scanned "cjpeg - Win32" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cjpeg - Win32" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "cjpeg\Release" +# PROP BASE Intermediate_Dir "cjpeg\Release" +# PROP BASE Target_Dir "cjpeg" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "cjpeg\Release" +# PROP Intermediate_Dir "cjpeg\Release" +# PROP Target_Dir "cjpeg" +OUTDIR=.\cjpeg\Release +INTDIR=.\cjpeg\Release + +ALL : "$(OUTDIR)\cjpeg.exe" + +CLEAN : + -@erase "$(INTDIR)\cjpeg.obj" + -@erase "$(INTDIR)\rdppm.obj" + -@erase "$(INTDIR)\rdgif.obj" + -@erase "$(INTDIR)\rdtarga.obj" + -@erase "$(INTDIR)\rdrle.obj" + -@erase "$(INTDIR)\rdbmp.obj" + -@erase "$(INTDIR)\rdswitch.obj" + -@erase "$(INTDIR)\cdjpeg.obj" + -@erase "$(OUTDIR)\cjpeg.exe" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c +CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ + /Fp"$(INTDIR)/cjpeg.pch" /YX /Fo"$(INTDIR)/" /c +CPP_OBJS=.\cjpeg\Release/ +CPP_SBRS=.\. +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +BSC32_FLAGS=/nologo /o"$(OUTDIR)/cjpeg.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ + comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ + odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\ + /pdb:"$(OUTDIR)/cjpeg.pdb" /machine:I386 /out:"$(OUTDIR)/cjpeg.exe" +LINK32_OBJS= \ + "$(INTDIR)\cjpeg.obj" \ + "$(INTDIR)\rdppm.obj" \ + "$(INTDIR)\rdgif.obj" \ + "$(INTDIR)\rdtarga.obj" \ + "$(INTDIR)\rdrle.obj" \ + "$(INTDIR)\rdbmp.obj" \ + "$(INTDIR)\rdswitch.obj" \ + "$(INTDIR)\cdjpeg.obj" \ + + +"$(OUTDIR)\cjpeg.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ELSEIF "$(CFG)" == "djpeg - Win32" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "djpeg\Release" +# PROP BASE Intermediate_Dir "djpeg\Release" +# PROP BASE Target_Dir "djpeg" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "djpeg\Release" +# PROP Intermediate_Dir "djpeg\Release" +# PROP Target_Dir "djpeg" +OUTDIR=.\djpeg\Release +INTDIR=.\djpeg\Release + +ALL : "$(OUTDIR)\djpeg.exe" + +CLEAN : + -@erase "$(INTDIR)\djpeg.obj" + -@erase "$(INTDIR)\wrppm.obj" + -@erase "$(INTDIR)\wrgif.obj" + -@erase "$(INTDIR)\wrtarga.obj" + -@erase "$(INTDIR)\wrrle.obj" + -@erase "$(INTDIR)\wrbmp.obj" + -@erase "$(INTDIR)\rdcolmap.obj" + -@erase "$(INTDIR)\cdjpeg.obj" + -@erase "$(OUTDIR)\djpeg.exe" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c +CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ + /Fp"$(INTDIR)/djpeg.pch" /YX /Fo"$(INTDIR)/" /c +CPP_OBJS=.\djpeg\Release/ +CPP_SBRS=.\. +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +BSC32_FLAGS=/nologo /o"$(OUTDIR)/djpeg.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ + comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ + odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\ + /pdb:"$(OUTDIR)/djpeg.pdb" /machine:I386 /out:"$(OUTDIR)/djpeg.exe" +LINK32_OBJS= \ + "$(INTDIR)\djpeg.obj" \ + "$(INTDIR)\wrppm.obj" \ + "$(INTDIR)\wrgif.obj" \ + "$(INTDIR)\wrtarga.obj" \ + "$(INTDIR)\wrrle.obj" \ + "$(INTDIR)\wrbmp.obj" \ + "$(INTDIR)\rdcolmap.obj" \ + "$(INTDIR)\cdjpeg.obj" \ + + +"$(OUTDIR)\djpeg.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ELSEIF "$(CFG)" == "jpegtran - Win32" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "jpegtran\Release" +# PROP BASE Intermediate_Dir "jpegtran\Release" +# PROP BASE Target_Dir "jpegtran" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "jpegtran\Release" +# PROP Intermediate_Dir "jpegtran\Release" +# PROP Target_Dir "jpegtran" +OUTDIR=.\jpegtran\Release +INTDIR=.\jpegtran\Release + +ALL : "$(OUTDIR)\jpegtran.exe" + +CLEAN : + -@erase "$(INTDIR)\jpegtran.obj" + -@erase "$(INTDIR)\rdswitch.obj" + -@erase "$(INTDIR)\cdjpeg.obj" + -@erase "$(INTDIR)\transupp.obj" + -@erase "$(OUTDIR)\jpegtran.exe" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c +CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ + /Fp"$(INTDIR)/jpegtran.pch" /YX /Fo"$(INTDIR)/" /c +CPP_OBJS=.\jpegtran\Release/ +CPP_SBRS=.\. +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +BSC32_FLAGS=/nologo /o"$(OUTDIR)/jpegtran.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ + comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ + odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\ + /pdb:"$(OUTDIR)/jpegtran.pdb" /machine:I386 /out:"$(OUTDIR)/jpegtran.exe" +LINK32_OBJS= \ + "$(INTDIR)\jpegtran.obj" \ + "$(INTDIR)\rdswitch.obj" \ + "$(INTDIR)\cdjpeg.obj" \ + "$(INTDIR)\transupp.obj" \ + + +"$(OUTDIR)\jpegtran.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ELSEIF "$(CFG)" == "rdjpgcom - Win32" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "rdjpgcom\Release" +# PROP BASE Intermediate_Dir "rdjpgcom\Release" +# PROP BASE Target_Dir "rdjpgcom" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "rdjpgcom\Release" +# PROP Intermediate_Dir "rdjpgcom\Release" +# PROP Target_Dir "rdjpgcom" +OUTDIR=.\rdjpgcom\Release +INTDIR=.\rdjpgcom\Release + +ALL : "$(OUTDIR)\rdjpgcom.exe" + +CLEAN : + -@erase "$(INTDIR)\rdjpgcom.obj" + -@erase "$(OUTDIR)\rdjpgcom.exe" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c +CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ + /Fp"$(INTDIR)/rdjpgcom.pch" /YX /Fo"$(INTDIR)/" /c +CPP_OBJS=.\rdjpgcom\Release/ +CPP_SBRS=.\. +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +BSC32_FLAGS=/nologo /o"$(OUTDIR)/rdjpgcom.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ + comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ + odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\ + /pdb:"$(OUTDIR)/rdjpgcom.pdb" /machine:I386 /out:"$(OUTDIR)/rdjpgcom.exe" +LINK32_OBJS= \ + "$(INTDIR)\rdjpgcom.obj" + +"$(OUTDIR)\rdjpgcom.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ELSEIF "$(CFG)" == "wrjpgcom - Win32" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "wrjpgcom\Release" +# PROP BASE Intermediate_Dir "wrjpgcom\Release" +# PROP BASE Target_Dir "wrjpgcom" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "wrjpgcom\Release" +# PROP Intermediate_Dir "wrjpgcom\Release" +# PROP Target_Dir "wrjpgcom" +OUTDIR=.\wrjpgcom\Release +INTDIR=.\wrjpgcom\Release + +ALL : "$(OUTDIR)\wrjpgcom.exe" + +CLEAN : + -@erase "$(INTDIR)\wrjpgcom.obj" + -@erase "$(OUTDIR)\wrjpgcom.exe" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c +CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ + /Fp"$(INTDIR)/wrjpgcom.pch" /YX /Fo"$(INTDIR)/" /c +CPP_OBJS=.\wrjpgcom\Release/ +CPP_SBRS=.\. +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +BSC32_FLAGS=/nologo /o"$(OUTDIR)/wrjpgcom.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ + comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ + odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\ + /pdb:"$(OUTDIR)/wrjpgcom.pdb" /machine:I386 /out:"$(OUTDIR)/wrjpgcom.exe" +LINK32_OBJS= \ + "$(INTDIR)\wrjpgcom.obj" + +"$(OUTDIR)\wrjpgcom.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ENDIF + +.c{$(CPP_OBJS)}.obj: + $(CPP) $(CPP_PROJ) $< + +.cpp{$(CPP_OBJS)}.obj: + $(CPP) $(CPP_PROJ) $< + +.cxx{$(CPP_OBJS)}.obj: + $(CPP) $(CPP_PROJ) $< + +.c{$(CPP_SBRS)}.sbr: + $(CPP) $(CPP_PROJ) $< + +.cpp{$(CPP_SBRS)}.sbr: + $(CPP) $(CPP_PROJ) $< + +.cxx{$(CPP_SBRS)}.sbr: + $(CPP) $(CPP_PROJ) $< + +################################################################################ +# Begin Target + +# Name "cjpeg - Win32" + +!IF "$(CFG)" == "cjpeg - Win32" + +!ENDIF + +################################################################################ +# Begin Source File + +SOURCE="cjpeg.c" +DEP_CPP_CJPEG=\ + "cdjpeg.h"\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + "cderror.h"\ + "jversion.h"\ + + +"$(INTDIR)\cjpeg.obj" : $(SOURCE) $(DEP_CPP_CJPEG) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="cdjpeg.c" +DEP_CPP_CDJPE=\ + "cdjpeg.h"\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + "cderror.h"\ + + +"$(INTDIR)\cdjpeg.obj" : $(SOURCE) $(DEP_CPP_CDJPE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="rdswitch.c" +DEP_CPP_RDSWI=\ + "cdjpeg.h"\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + "cderror.h"\ + + +"$(INTDIR)\rdswitch.obj" : $(SOURCE) $(DEP_CPP_RDSWI) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="rdppm.c" +DEP_CPP_RDPPM=\ + "cdjpeg.h"\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + "cderror.h"\ + + +"$(INTDIR)\rdppm.obj" : $(SOURCE) $(DEP_CPP_RDPPM) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="rdgif.c" +DEP_CPP_RDGIF=\ + "cdjpeg.h"\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + "cderror.h"\ + + +"$(INTDIR)\rdgif.obj" : $(SOURCE) $(DEP_CPP_RDGIF) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="rdtarga.c" +DEP_CPP_RDTAR=\ + "cdjpeg.h"\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + "cderror.h"\ + + +"$(INTDIR)\rdtarga.obj" : $(SOURCE) $(DEP_CPP_RDTAR) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="rdbmp.c" +DEP_CPP_RDBMP=\ + "cdjpeg.h"\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + "cderror.h"\ + + +"$(INTDIR)\rdbmp.obj" : $(SOURCE) $(DEP_CPP_RDBMP) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="rdrle.c" +DEP_CPP_RDRLE=\ + "cdjpeg.h"\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + "cderror.h"\ + + +"$(INTDIR)\rdrle.obj" : $(SOURCE) $(DEP_CPP_RDRLE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +# End Target +################################################################################ +# Begin Target + +# Name "djpeg - Win32" + +!IF "$(CFG)" == "djpeg - Win32" + +!ENDIF + +################################################################################ +# Begin Source File + +SOURCE="djpeg.c" +DEP_CPP_DJPEG=\ + "cdjpeg.h"\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + "cderror.h"\ + "jversion.h"\ + + +"$(INTDIR)\djpeg.obj" : $(SOURCE) $(DEP_CPP_DJPEG) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="cdjpeg.c" +DEP_CPP_CDJPE=\ + "cdjpeg.h"\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + "cderror.h"\ + + +"$(INTDIR)\cdjpeg.obj" : $(SOURCE) $(DEP_CPP_CDJPE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="rdcolmap.c" +DEP_CPP_RDCOL=\ + "cdjpeg.h"\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + "cderror.h"\ + + +"$(INTDIR)\rdcolmap.obj" : $(SOURCE) $(DEP_CPP_RDCOL) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="wrppm.c" +DEP_CPP_WRPPM=\ + "cdjpeg.h"\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + "cderror.h"\ + + +"$(INTDIR)\wrppm.obj" : $(SOURCE) $(DEP_CPP_WRPPM) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="wrgif.c" +DEP_CPP_WRGIF=\ + "cdjpeg.h"\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + "cderror.h"\ + + +"$(INTDIR)\wrgif.obj" : $(SOURCE) $(DEP_CPP_WRGIF) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="wrtarga.c" +DEP_CPP_WRTAR=\ + "cdjpeg.h"\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + "cderror.h"\ + + +"$(INTDIR)\wrtarga.obj" : $(SOURCE) $(DEP_CPP_WRTAR) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="wrbmp.c" +DEP_CPP_WRBMP=\ + "cdjpeg.h"\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + "cderror.h"\ + + +"$(INTDIR)\wrbmp.obj" : $(SOURCE) $(DEP_CPP_WRBMP) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="wrrle.c" +DEP_CPP_WRRLE=\ + "cdjpeg.h"\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + "cderror.h"\ + + +"$(INTDIR)\wrrle.obj" : $(SOURCE) $(DEP_CPP_WRRLE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +# End Target +################################################################################ +# Begin Target + +# Name "jpegtran - Win32" + +!IF "$(CFG)" == "jpegtran - Win32" + +!ENDIF + +################################################################################ +# Begin Source File + +SOURCE="jpegtran.c" +DEP_CPP_JPEGT=\ + "cdjpeg.h"\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + "cderror.h"\ + "transupp.h"\ + "jversion.h"\ + + +"$(INTDIR)\jpegtran.obj" : $(SOURCE) $(DEP_CPP_JPEGT) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="cdjpeg.c" +DEP_CPP_CDJPE=\ + "cdjpeg.h"\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + "cderror.h"\ + + +"$(INTDIR)\cdjpeg.obj" : $(SOURCE) $(DEP_CPP_CDJPE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="rdswitch.c" +DEP_CPP_RDSWI=\ + "cdjpeg.h"\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + "cderror.h"\ + + +"$(INTDIR)\rdswitch.obj" : $(SOURCE) $(DEP_CPP_RDSWI) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="transupp.c" +DEP_CPP_TRANS=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + "transupp.h"\ + + +"$(INTDIR)\transupp.obj" : $(SOURCE) $(DEP_CPP_TRANS) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +# End Target +################################################################################ +# Begin Target + +# Name "rdjpgcom - Win32" + +!IF "$(CFG)" == "rdjpgcom - Win32" + +!ENDIF + +################################################################################ +# Begin Source File + +SOURCE="rdjpgcom.c" +DEP_CPP_RDJPG=\ + "jinclude.h"\ + "jconfig.h"\ + + +"$(INTDIR)\rdjpgcom.obj" : $(SOURCE) $(DEP_CPP_RDJPG) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +# End Target +################################################################################ +# Begin Target + +# Name "wrjpgcom - Win32" + +!IF "$(CFG)" == "wrjpgcom - Win32" + +!ENDIF + +################################################################################ +# Begin Source File + +SOURCE="wrjpgcom.c" +DEP_CPP_WRJPG=\ + "jinclude.h"\ + "jconfig.h"\ + + +"$(INTDIR)\wrjpgcom.obj" : $(SOURCE) $(DEP_CPP_WRJPG) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +# End Target +# End Project +################################################################################ + diff --git a/gtkmm-osx/jpeg-6b/makefile.ansi b/gtkmm-osx/jpeg-6b/makefile.ansi new file mode 100644 index 0000000..8291913 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/makefile.ansi @@ -0,0 +1,214 @@ +# Makefile for Independent JPEG Group's software + +# This makefile is suitable for Unix-like systems with ANSI-capable compilers. +# If you have a non-ANSI compiler, makefile.unix is a better starting point. + +# Read installation instructions before saying "make" !! + +# The name of your C compiler: +CC= cc + +# You may need to adjust these cc options: +CFLAGS= -O +# Generally, we recommend defining any configuration symbols in jconfig.h, +# NOT via -D switches here. + +# Link-time cc options: +LDFLAGS= + +# To link any special libraries, add the necessary -l commands here. +LDLIBS= + +# Put here the object file name for the correct system-dependent memory +# manager file. For Unix this is usually jmemnobs.o, but you may want +# to use jmemansi.o or jmemname.o if you have limited swap space. +SYSDEPMEM= jmemnobs.o + +# miscellaneous OS-dependent stuff +# linker +LN= $(CC) +# file deletion command +RM= rm -f +# library (.a) file creation command +AR= ar rc +# second step in .a creation (use "touch" if not needed) +AR2= ranlib + +# End of configurable options. + + +# source files: JPEG library proper +LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ + jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ + jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ + jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ + jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ + jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ + jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ + jquant2.c jutils.c jmemmgr.c +# memmgr back ends: compile only one of these into a working library +SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c +# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom +APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ + rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ + rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c +SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) +# files included by source files +INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ + jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h +# documentation, test, and support files +DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ + wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ + coderules.doc filelist.doc change.log +MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ + makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ + makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ + maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ + makvms.opt +CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ + jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ + jconfig.vms +CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh +OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm +TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ + testimgp.jpg +DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ + $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) +# library object files common to compression and decompression +COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) +# compression library object files +CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \ + jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \ + jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \ + jfdctint.o +# decompression library object files +DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \ + jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \ + jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \ + jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o +# These objectfiles are included in libjpeg.a +LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) +# object files for sample applications (excluding library files) +COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ + cdjpeg.o +DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ + cdjpeg.o +TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o + + +all: libjpeg.a cjpeg djpeg jpegtran rdjpgcom wrjpgcom + +libjpeg.a: $(LIBOBJECTS) + $(RM) libjpeg.a + $(AR) libjpeg.a $(LIBOBJECTS) + $(AR2) libjpeg.a + +cjpeg: $(COBJECTS) libjpeg.a + $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.a $(LDLIBS) + +djpeg: $(DOBJECTS) libjpeg.a + $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.a $(LDLIBS) + +jpegtran: $(TROBJECTS) libjpeg.a + $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.a $(LDLIBS) + +rdjpgcom: rdjpgcom.o + $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS) + +wrjpgcom: wrjpgcom.o + $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS) + +jconfig.h: jconfig.doc + echo You must prepare a system-dependent jconfig.h file. + echo Please read the installation directions in install.doc. + exit 1 + +clean: + $(RM) *.o cjpeg djpeg jpegtran libjpeg.a rdjpgcom wrjpgcom + $(RM) core testout* + +test: cjpeg djpeg jpegtran + $(RM) testout* + ./djpeg -dct int -ppm -outfile testout.ppm testorig.jpg + ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg + ./cjpeg -dct int -outfile testout.jpg testimg.ppm + ./djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg + ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm + ./jpegtran -outfile testoutt.jpg testprog.jpg + cmp testimg.ppm testout.ppm + cmp testimg.bmp testout.bmp + cmp testimg.jpg testout.jpg + cmp testimg.ppm testoutp.ppm + cmp testimgp.jpg testoutp.jpg + cmp testorig.jpg testoutt.jpg + + +jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h +jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h +rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h +wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h +cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h +rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/gtkmm-osx/jpeg-6b/makefile.bcc b/gtkmm-osx/jpeg-6b/makefile.bcc new file mode 100644 index 0000000..a1cfcde --- /dev/null +++ b/gtkmm-osx/jpeg-6b/makefile.bcc @@ -0,0 +1,285 @@ +# Makefile for Independent JPEG Group's software + +# This makefile is suitable for Borland C on MS-DOS or OS/2. +# It works with Borland C++ for DOS, revision 3.0 or later, +# and has been tested with Borland C++ for OS/2. +# Watch out for optimization bugs in the OS/2 compilers --- see notes below! +# Thanks to Tom Wright and Ge' Weijers (original DOS) and +# Ken Porter (OS/2) for this file. + +# Read installation instructions before saying "make" !! + +# Are we under DOS or OS/2? +!if !$d(DOS) && !$d(OS2) +!if $d(__OS2__) +OS2=1 +!else +DOS=1 +!endif +!endif + +# The name of your C compiler: +CC= bcc + +# You may need to adjust these cc options: +!if $d(DOS) +CFLAGS= -O2 -mm -w-par -w-stu -w-ccc -w-rch +!else +CFLAGS= -O1 -w-par -w-stu -w-ccc -w-rch +!endif +# -O2 enables full code optimization (for pre-3.0 Borland C++, use -O -G -Z). +# -O2 is buggy in Borland OS/2 C++ revision 2.0, so use -O1 there for now. +# If you have Borland OS/2 C++ revision 1.0, use -O or no optimization at all. +# -mm selects medium memory model (near data, far code pointers; DOS only!) +# -w-par suppresses warnings about unused function parameters +# -w-stu suppresses warnings about incomplete structures +# -w-ccc suppresses warnings about compile-time-constant conditions +# -w-rch suppresses warnings about unreachable code +# Generally, we recommend defining any configuration symbols in jconfig.h, +# NOT via -D switches here. + +# Link-time cc options: +!if $d(DOS) +LDFLAGS= -mm +# memory model option here must match CFLAGS! +!else +LDFLAGS= +# -lai full-screen app +# -lc case-significant link +!endif + +# Put here the object file name for the correct system-dependent memory +# manager file. +# For DOS, we recommend jmemdos.c and jmemdosa.asm. +# For OS/2, we recommend jmemnobs.c (flat memory!) +# SYSDEPMEMLIB must list the same files with "+" signs for the librarian. +!if $d(DOS) +SYSDEPMEM= jmemdos.obj jmemdosa.obj +SYSDEPMEMLIB= +jmemdos.obj +jmemdosa.obj +!else +SYSDEPMEM= jmemnobs.obj +SYSDEPMEMLIB= +jmemnobs.obj +!endif + +# End of configurable options. + + +# source files: JPEG library proper +LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ + jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ + jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ + jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ + jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ + jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ + jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ + jquant2.c jutils.c jmemmgr.c +# memmgr back ends: compile only one of these into a working library +SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c +# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom +APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ + rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ + rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c +SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) +# files included by source files +INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ + jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h +# documentation, test, and support files +DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ + wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ + coderules.doc filelist.doc change.log +MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ + makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ + makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ + maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ + makvms.opt +CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ + jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ + jconfig.vms +CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh +OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm +TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ + testimgp.jpg +DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ + $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) +# library object files common to compression and decompression +COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) +# compression library object files +CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \ + jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \ + jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \ + jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj +# decompression library object files +DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \ + jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \ + jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \ + jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \ + jquant1.obj jquant2.obj jdmerge.obj +# These objectfiles are included in libjpeg.lib +LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) +# object files for sample applications (excluding library files) +COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \ + rdswitch.obj cdjpeg.obj +DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ + rdcolmap.obj cdjpeg.obj +TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj + + +all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe + +libjpeg.lib: $(LIBOBJECTS) + - del libjpeg.lib + tlib libjpeg.lib /E /C @&&| ++jcapimin.obj +jcapistd.obj +jctrans.obj +jcparam.obj +jdatadst.obj & ++jcinit.obj +jcmaster.obj +jcmarker.obj +jcmainct.obj +jcprepct.obj & ++jccoefct.obj +jccolor.obj +jcsample.obj +jchuff.obj +jcphuff.obj & ++jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj +jfdctint.obj +jdapimin.obj & ++jdapistd.obj +jdtrans.obj +jdatasrc.obj +jdmaster.obj +jdinput.obj & ++jdmarker.obj +jdhuff.obj +jdphuff.obj +jdmainct.obj +jdcoefct.obj & ++jdpostct.obj +jddctmgr.obj +jidctfst.obj +jidctflt.obj +jidctint.obj & ++jidctred.obj +jdsample.obj +jdcolor.obj +jquant1.obj +jquant2.obj & ++jdmerge.obj +jcomapi.obj +jutils.obj +jerror.obj +jmemmgr.obj & +$(SYSDEPMEMLIB) +| + +cjpeg.exe: $(COBJECTS) libjpeg.lib + $(CC) $(LDFLAGS) -ecjpeg.exe $(COBJECTS) libjpeg.lib + +djpeg.exe: $(DOBJECTS) libjpeg.lib + $(CC) $(LDFLAGS) -edjpeg.exe $(DOBJECTS) libjpeg.lib + +jpegtran.exe: $(TROBJECTS) libjpeg.lib + $(CC) $(LDFLAGS) -ejpegtran.exe $(TROBJECTS) libjpeg.lib + +rdjpgcom.exe: rdjpgcom.c +!if $d(DOS) + $(CC) -ms -O rdjpgcom.c +!else + $(CC) $(CFLAGS) rdjpgcom.c +!endif + +# On DOS, wrjpgcom needs large model so it can malloc a 64K chunk +wrjpgcom.exe: wrjpgcom.c +!if $d(DOS) + $(CC) -ml -O wrjpgcom.c +!else + $(CC) $(CFLAGS) wrjpgcom.c +!endif + +# This "{}" syntax allows Borland Make to "batch" source files. +# In this way, each run of the compiler can build many modules. +.c.obj: + $(CC) $(CFLAGS) -c{ $<} + +jconfig.h: jconfig.doc + echo You must prepare a system-dependent jconfig.h file. + echo Please read the installation directions in install.doc. + exit 1 + +clean: + - del *.obj + - del libjpeg.lib + - del cjpeg.exe + - del djpeg.exe + - del jpegtran.exe + - del rdjpgcom.exe + - del wrjpgcom.exe + - del testout*.* + +test: cjpeg.exe djpeg.exe jpegtran.exe + - del testout*.* + djpeg -dct int -ppm -outfile testout.ppm testorig.jpg + djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg + cjpeg -dct int -outfile testout.jpg testimg.ppm + djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg + cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm + jpegtran -outfile testoutt.jpg testprog.jpg +!if $d(DOS) + fc /b testimg.ppm testout.ppm + fc /b testimg.bmp testout.bmp + fc /b testimg.jpg testout.jpg + fc /b testimg.ppm testoutp.ppm + fc /b testimgp.jpg testoutp.jpg + fc /b testorig.jpg testoutt.jpg +!else + echo n > n.tmp + comp testimg.ppm testout.ppm < n.tmp + comp testimg.bmp testout.bmp < n.tmp + comp testimg.jpg testout.jpg < n.tmp + comp testimg.ppm testoutp.ppm < n.tmp + comp testimgp.jpg testoutp.jpg < n.tmp + comp testorig.jpg testoutt.jpg < n.tmp + del n.tmp +!endif + + +jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h +jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h +rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h +wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h +cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h +rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +jmemdosa.obj: jmemdosa.asm + tasm /mx jmemdosa.asm diff --git a/gtkmm-osx/jpeg-6b/makefile.cfg b/gtkmm-osx/jpeg-6b/makefile.cfg new file mode 100644 index 0000000..f25e42e --- /dev/null +++ b/gtkmm-osx/jpeg-6b/makefile.cfg @@ -0,0 +1,319 @@ +# Makefile for Independent JPEG Group's software + +# makefile.cfg is edited by configure to produce a custom Makefile. + +# Read installation instructions before saying "make" !! + +# For compiling with source and object files in different directories. +srcdir = @srcdir@ +VPATH = @srcdir@ + +# Where to install the programs and man pages. +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = $(exec_prefix)/bin +libdir = $(exec_prefix)/lib +includedir = $(prefix)/include +binprefix = +manprefix = +manext = 1 +mandir = $(prefix)/man/man$(manext) + +# The name of your C compiler: +CC= @CC@ + +# You may need to adjust these cc options: +CFLAGS= @CFLAGS@ @CPPFLAGS@ @INCLUDEFLAGS@ +# Generally, we recommend defining any configuration symbols in jconfig.h, +# NOT via -D switches here. +# However, any special defines for ansi2knr.c may be included here: +ANSI2KNRFLAGS= @ANSI2KNRFLAGS@ + +# Link-time cc options: +LDFLAGS= @LDFLAGS@ + +# To link any special libraries, add the necessary -l commands here. +LDLIBS= @LIBS@ + +# If using GNU libtool, LIBTOOL references it; if not, LIBTOOL is empty. +LIBTOOL = @LIBTOOL@ +# $(O) expands to "lo" if using libtool, plain "o" if not. +# Similarly, $(A) expands to "la" or "a". +O = @O@ +A = @A@ + +# Library version ID; libtool uses this for the shared library version number. +# Note: we suggest this match the macro of the same name in jpeglib.h. +JPEG_LIB_VERSION = @JPEG_LIB_VERSION@ + +# Put here the object file name for the correct system-dependent memory +# manager file. For Unix this is usually jmemnobs.o, but you may want +# to use jmemansi.o or jmemname.o if you have limited swap space. +SYSDEPMEM= @MEMORYMGR@ + +# miscellaneous OS-dependent stuff +SHELL= /bin/sh +# linker +LN= @LN@ +# file deletion command +RM= rm -f +# directory creation command +MKDIR= mkdir +# library (.a) file creation command +AR= ar rc +# second step in .a creation (use "touch" if not needed) +AR2= @RANLIB@ +# installation program +INSTALL= @INSTALL@ +INSTALL_PROGRAM= @INSTALL_PROGRAM@ +INSTALL_LIB= @INSTALL_LIB@ +INSTALL_DATA= @INSTALL_DATA@ + +# End of configurable options. + + +# source files: JPEG library proper +LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ + jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ + jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ + jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ + jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ + jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ + jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ + jquant2.c jutils.c jmemmgr.c +# memmgr back ends: compile only one of these into a working library +SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c +# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom +APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ + rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ + rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c +SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) +# files included by source files +INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ + jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h +# documentation, test, and support files +DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ + wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ + coderules.doc filelist.doc change.log +MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ + makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ + makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ + maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ + makvms.opt +CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ + jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ + jconfig.vms +CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh +OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm +TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ + testimgp.jpg +DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ + $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) +# library object files common to compression and decompression +COMOBJECTS= jcomapi.$(O) jutils.$(O) jerror.$(O) jmemmgr.$(O) $(SYSDEPMEM) +# compression library object files +CLIBOBJECTS= jcapimin.$(O) jcapistd.$(O) jctrans.$(O) jcparam.$(O) \ + jdatadst.$(O) jcinit.$(O) jcmaster.$(O) jcmarker.$(O) jcmainct.$(O) \ + jcprepct.$(O) jccoefct.$(O) jccolor.$(O) jcsample.$(O) jchuff.$(O) \ + jcphuff.$(O) jcdctmgr.$(O) jfdctfst.$(O) jfdctflt.$(O) \ + jfdctint.$(O) +# decompression library object files +DLIBOBJECTS= jdapimin.$(O) jdapistd.$(O) jdtrans.$(O) jdatasrc.$(O) \ + jdmaster.$(O) jdinput.$(O) jdmarker.$(O) jdhuff.$(O) jdphuff.$(O) \ + jdmainct.$(O) jdcoefct.$(O) jdpostct.$(O) jddctmgr.$(O) \ + jidctfst.$(O) jidctflt.$(O) jidctint.$(O) jidctred.$(O) \ + jdsample.$(O) jdcolor.$(O) jquant1.$(O) jquant2.$(O) jdmerge.$(O) +# These objectfiles are included in libjpeg.a +LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) +# object files for sample applications (excluding library files) +COBJECTS= cjpeg.$(O) rdppm.$(O) rdgif.$(O) rdtarga.$(O) rdrle.$(O) \ + rdbmp.$(O) rdswitch.$(O) cdjpeg.$(O) +DOBJECTS= djpeg.$(O) wrppm.$(O) wrgif.$(O) wrtarga.$(O) wrrle.$(O) \ + wrbmp.$(O) rdcolmap.$(O) cdjpeg.$(O) +TROBJECTS= jpegtran.$(O) rdswitch.$(O) cdjpeg.$(O) transupp.$(O) + + +all: @A2K_DEPS@ libjpeg.$(A) cjpeg djpeg jpegtran rdjpgcom wrjpgcom + +# Special compilation rules to support ansi2knr and libtool. +.SUFFIXES: .lo .la + +# How to compile with libtool. +@COM_LT@.c.lo: +@COM_LT@ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/$*.c + +# How to use ansi2knr, when not using libtool. +@COM_A2K@.c.o: +@COM_A2K@ ./ansi2knr $(srcdir)/$*.c knr/$*.c +@COM_A2K@ $(CC) $(CFLAGS) -c knr/$*.c +@COM_A2K@ $(RM) knr/$*.c + +# How to use ansi2knr AND libtool. +@COM_A2K@.c.lo: +@COM_A2K@ ./ansi2knr $(srcdir)/$*.c knr/$*.c +@COM_A2K@ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c knr/$*.c +@COM_A2K@ $(RM) knr/$*.c + +ansi2knr: ansi2knr.c + $(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr $(srcdir)/ansi2knr.c + $(MKDIR) knr + +# the library: + +# without libtool: +libjpeg.a: @A2K_DEPS@ $(LIBOBJECTS) + $(RM) libjpeg.a + $(AR) libjpeg.a $(LIBOBJECTS) + $(AR2) libjpeg.a + +# with libtool: +libjpeg.la: @A2K_DEPS@ $(LIBOBJECTS) + $(LIBTOOL) --mode=link $(CC) -o libjpeg.la $(LIBOBJECTS) \ + -rpath $(libdir) -version-info $(JPEG_LIB_VERSION) + +# sample programs: + +cjpeg: $(COBJECTS) libjpeg.$(A) + $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.$(A) $(LDLIBS) + +djpeg: $(DOBJECTS) libjpeg.$(A) + $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.$(A) $(LDLIBS) + +jpegtran: $(TROBJECTS) libjpeg.$(A) + $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.$(A) $(LDLIBS) + +rdjpgcom: rdjpgcom.$(O) + $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.$(O) $(LDLIBS) + +wrjpgcom: wrjpgcom.$(O) + $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.$(O) $(LDLIBS) + +# Installation rules: + +install: cjpeg djpeg jpegtran rdjpgcom wrjpgcom @FORCE_INSTALL_LIB@ + $(INSTALL_PROGRAM) cjpeg $(bindir)/$(binprefix)cjpeg + $(INSTALL_PROGRAM) djpeg $(bindir)/$(binprefix)djpeg + $(INSTALL_PROGRAM) jpegtran $(bindir)/$(binprefix)jpegtran + $(INSTALL_PROGRAM) rdjpgcom $(bindir)/$(binprefix)rdjpgcom + $(INSTALL_PROGRAM) wrjpgcom $(bindir)/$(binprefix)wrjpgcom + $(INSTALL_DATA) $(srcdir)/cjpeg.1 $(mandir)/$(manprefix)cjpeg.$(manext) + $(INSTALL_DATA) $(srcdir)/djpeg.1 $(mandir)/$(manprefix)djpeg.$(manext) + $(INSTALL_DATA) $(srcdir)/jpegtran.1 $(mandir)/$(manprefix)jpegtran.$(manext) + $(INSTALL_DATA) $(srcdir)/rdjpgcom.1 $(mandir)/$(manprefix)rdjpgcom.$(manext) + $(INSTALL_DATA) $(srcdir)/wrjpgcom.1 $(mandir)/$(manprefix)wrjpgcom.$(manext) + +install-lib: libjpeg.$(A) install-headers + $(INSTALL_LIB) libjpeg.$(A) $(libdir)/$(binprefix)libjpeg.$(A) + +install-headers: jconfig.h + $(INSTALL_DATA) jconfig.h $(includedir)/jconfig.h + $(INSTALL_DATA) $(srcdir)/jpeglib.h $(includedir)/jpeglib.h + $(INSTALL_DATA) $(srcdir)/jmorecfg.h $(includedir)/jmorecfg.h + $(INSTALL_DATA) $(srcdir)/jerror.h $(includedir)/jerror.h + +clean: + $(RM) *.o *.lo libjpeg.a libjpeg.la + $(RM) cjpeg djpeg jpegtran rdjpgcom wrjpgcom + $(RM) ansi2knr core testout* config.log config.status + $(RM) -r knr .libs _libs + +distclean: clean + $(RM) Makefile jconfig.h libtool config.cache + +test: cjpeg djpeg jpegtran + $(RM) testout* + ./djpeg -dct int -ppm -outfile testout.ppm $(srcdir)/testorig.jpg + ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg + ./cjpeg -dct int -outfile testout.jpg $(srcdir)/testimg.ppm + ./djpeg -dct int -ppm -outfile testoutp.ppm $(srcdir)/testprog.jpg + ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg $(srcdir)/testimg.ppm + ./jpegtran -outfile testoutt.jpg $(srcdir)/testprog.jpg + cmp $(srcdir)/testimg.ppm testout.ppm + cmp $(srcdir)/testimg.bmp testout.bmp + cmp $(srcdir)/testimg.jpg testout.jpg + cmp $(srcdir)/testimg.ppm testoutp.ppm + cmp $(srcdir)/testimgp.jpg testoutp.jpg + cmp $(srcdir)/testorig.jpg testoutt.jpg + +check: test + +# Mistake catcher: + +jconfig.h: jconfig.doc + echo You must prepare a system-dependent jconfig.h file. + echo Please read the installation directions in install.doc. + exit 1 + +# GNU Make likes to know which target names are not really files to be made: +.PHONY: all install install-lib install-headers clean distclean test check + + +jcapimin.$(O): jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcapistd.$(O): jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccoefct.$(O): jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccolor.$(O): jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcdctmgr.$(O): jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jchuff.$(O): jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcinit.$(O): jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmainct.$(O): jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmarker.$(O): jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmaster.$(O): jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcomapi.$(O): jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcparam.$(O): jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcphuff.$(O): jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcprepct.$(O): jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcsample.$(O): jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jctrans.$(O): jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapimin.$(O): jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapistd.$(O): jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdatadst.$(O): jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdatasrc.$(O): jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdcoefct.$(O): jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdcolor.$(O): jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jddctmgr.$(O): jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jdhuff.$(O): jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdinput.$(O): jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmainct.$(O): jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmarker.$(O): jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmaster.$(O): jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmerge.$(O): jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdphuff.$(O): jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdpostct.$(O): jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdsample.$(O): jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdtrans.$(O): jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jerror.$(O): jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h +jfdctflt.$(O): jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctfst.$(O): jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctint.$(O): jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctflt.$(O): jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctfst.$(O): jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctint.$(O): jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctred.$(O): jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jquant1.$(O): jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jquant2.$(O): jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jutils.$(O): jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jmemmgr.$(O): jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemansi.$(O): jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemname.$(O): jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemnobs.$(O): jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemdos.$(O): jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemmac.$(O): jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +cjpeg.$(O): cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +djpeg.$(O): djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +jpegtran.$(O): jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h +rdjpgcom.$(O): rdjpgcom.c jinclude.h jconfig.h +wrjpgcom.$(O): wrjpgcom.c jinclude.h jconfig.h +cdjpeg.$(O): cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdcolmap.$(O): rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdswitch.$(O): rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +transupp.$(O): transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h +rdppm.$(O): rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrppm.$(O): wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdgif.$(O): rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrgif.$(O): wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdtarga.$(O): rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrtarga.$(O): wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdbmp.$(O): rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrbmp.$(O): wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdrle.$(O): rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrrle.$(O): wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/gtkmm-osx/jpeg-6b/makefile.dj b/gtkmm-osx/jpeg-6b/makefile.dj new file mode 100644 index 0000000..f766d25 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/makefile.dj @@ -0,0 +1,220 @@ +# Makefile for Independent JPEG Group's software + +# This makefile is for DJGPP (Delorie's GNU C port on MS-DOS), v2.0 or later. +# Thanks to Frank J. Donahoe for this version. + +# Read installation instructions before saying "make" !! + +# The name of your C compiler: +CC= gcc + +# You may need to adjust these cc options: +CFLAGS= -O2 -Wall -I. +# Generally, we recommend defining any configuration symbols in jconfig.h, +# NOT via -D switches here. + +# Link-time cc options: +LDFLAGS= -s + +# To link any special libraries, add the necessary -l commands here. +LDLIBS= + +# Put here the object file name for the correct system-dependent memory +# manager file. For DJGPP this is usually jmemnobs.o, but you could +# use jmemname.o if you want to use named temp files instead of swap space. +SYSDEPMEM= jmemnobs.o + +# miscellaneous OS-dependent stuff +# linker +LN= $(CC) +# file deletion command +RM= del +# library (.a) file creation command +AR= ar rc +# second step in .a creation (use "touch" if not needed) +AR2= ranlib + +# End of configurable options. + + +# source files: JPEG library proper +LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ + jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ + jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ + jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ + jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ + jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ + jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ + jquant2.c jutils.c jmemmgr.c +# memmgr back ends: compile only one of these into a working library +SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c +# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom +APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ + rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ + rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c +SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) +# files included by source files +INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ + jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h +# documentation, test, and support files +DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ + wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ + coderules.doc filelist.doc change.log +MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ + makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ + makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ + maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ + makvms.opt +CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ + jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ + jconfig.vms +CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh +OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm +TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ + testimgp.jpg +DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ + $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) +# library object files common to compression and decompression +COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) +# compression library object files +CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \ + jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \ + jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \ + jfdctint.o +# decompression library object files +DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \ + jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \ + jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \ + jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o +# These objectfiles are included in libjpeg.a +LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) +# object files for sample applications (excluding library files) +COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ + cdjpeg.o +DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ + cdjpeg.o +TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o + + +all: libjpeg.a cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe + +libjpeg.a: $(LIBOBJECTS) + $(RM) libjpeg.a + $(AR) libjpeg.a $(LIBOBJECTS) + $(AR2) libjpeg.a + +cjpeg.exe: $(COBJECTS) libjpeg.a + $(LN) $(LDFLAGS) -o cjpeg.exe $(COBJECTS) libjpeg.a $(LDLIBS) + +djpeg.exe: $(DOBJECTS) libjpeg.a + $(LN) $(LDFLAGS) -o djpeg.exe $(DOBJECTS) libjpeg.a $(LDLIBS) + +jpegtran.exe: $(TROBJECTS) libjpeg.a + $(LN) $(LDFLAGS) -o jpegtran.exe $(TROBJECTS) libjpeg.a $(LDLIBS) + +rdjpgcom.exe: rdjpgcom.o + $(LN) $(LDFLAGS) -o rdjpgcom.exe rdjpgcom.o $(LDLIBS) + +wrjpgcom.exe: wrjpgcom.o + $(LN) $(LDFLAGS) -o wrjpgcom.exe wrjpgcom.o $(LDLIBS) + +jconfig.h: jconfig.doc + echo You must prepare a system-dependent jconfig.h file. + echo Please read the installation directions in install.doc. + exit 1 + +clean: + $(RM) *.o + $(RM) cjpeg.exe + $(RM) djpeg.exe + $(RM) jpegtran.exe + $(RM) rdjpgcom.exe + $(RM) wrjpgcom.exe + $(RM) libjpeg.a + $(RM) testout*.* + +test: cjpeg.exe djpeg.exe jpegtran.exe + $(RM) testout*.* + ./djpeg -dct int -ppm -outfile testout.ppm testorig.jpg + ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg + ./cjpeg -dct int -outfile testout.jpg testimg.ppm + ./djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg + ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm + ./jpegtran -outfile testoutt.jpg testprog.jpg + fc /b testimg.ppm testout.ppm + fc /b testimg.bmp testout.bmp + fc /b testimg.jpg testout.jpg + fc /b testimg.ppm testoutp.ppm + fc /b testimgp.jpg testoutp.jpg + fc /b testorig.jpg testoutt.jpg + + +jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h +jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h +rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h +wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h +cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h +rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/gtkmm-osx/jpeg-6b/makefile.manx b/gtkmm-osx/jpeg-6b/makefile.manx new file mode 100644 index 0000000..4cb42d1 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/makefile.manx @@ -0,0 +1,214 @@ +# Makefile for Independent JPEG Group's software + +# This makefile is for Amiga systems using Manx Aztec C ver 5.x. +# Thanks to D.J. James (djjames@cup.portal.com) for this version. + +# Read installation instructions before saying "make" !! + +# The name of your C compiler: +CC= cc + +# You may need to adjust these cc options: +# Uncomment for generic 68000 code (will work on any Amiga) +ARCHFLAGS= -sn + +# Uncomment for 68020/68030 code (faster, but won't run on 68000 CPU) +#ARCHFLAGS= -c2 + +CFLAGS= -MC -MD $(ARCHFLAGS) -spfam -r4 + +# Link-time cc options: +LDFLAGS= -g + +# To link any special libraries, add the necessary -l commands here. +LDLIBS= -lml -lcl + +# Put here the object file name for the correct system-dependent memory +# manager file. For Amiga we recommend jmemname.o. +SYSDEPMEM= jmemname.o + +# miscellaneous OS-dependent stuff +# linker +LN= ln +# file deletion command +RM= delete quiet +# library (.lib) file creation command +AR= lb + +# End of configurable options. + + +# source files: JPEG library proper +LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ + jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ + jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ + jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ + jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ + jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ + jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ + jquant2.c jutils.c jmemmgr.c +# memmgr back ends: compile only one of these into a working library +SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c +# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom +APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ + rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ + rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c +SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) +# files included by source files +INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ + jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h +# documentation, test, and support files +DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ + wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ + coderules.doc filelist.doc change.log +MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ + makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ + makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ + maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ + makvms.opt +CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ + jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ + jconfig.vms +CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh +OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm +TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ + testimgp.jpg +DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ + $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) +# library object files common to compression and decompression +COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) +# compression library object files +CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \ + jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \ + jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \ + jfdctint.o +# decompression library object files +DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \ + jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \ + jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \ + jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o +# These objectfiles are included in libjpeg.lib +LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) +# object files for sample applications (excluding library files) +COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ + cdjpeg.o +DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ + cdjpeg.o +TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o + + +all: libjpeg.lib cjpeg djpeg jpegtran rdjpgcom wrjpgcom + +libjpeg.lib: $(LIBOBJECTS) + -$(RM) libjpeg.lib + $(AR) libjpeg.lib $(LIBOBJECTS) + +cjpeg: $(COBJECTS) libjpeg.lib + $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.lib $(LDLIBS) + +djpeg: $(DOBJECTS) libjpeg.lib + $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.lib $(LDLIBS) + +jpegtran: $(TROBJECTS) libjpeg.lib + $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.lib $(LDLIBS) + +rdjpgcom: rdjpgcom.o + $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS) + +wrjpgcom: wrjpgcom.o + $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS) + +jconfig.h: jconfig.doc + echo You must prepare a system-dependent jconfig.h file. + echo Please read the installation directions in install.doc. + exit 1 + +clean: + -$(RM) *.o cjpeg djpeg jpegtran libjpeg.lib rdjpgcom wrjpgcom + -$(RM) core testout*.* + +test: cjpeg djpeg jpegtran + -$(RM) testout*.* + djpeg -dct int -ppm -outfile testout.ppm testorig.jpg + djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg + cjpeg -dct int -outfile testout.jpg testimg.ppm + djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg + cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm + jpegtran -outfile testoutt.jpg testprog.jpg + cmp testimg.ppm testout.ppm + cmp testimg.bmp testout.bmp + cmp testimg.jpg testout.jpg + cmp testimg.ppm testoutp.ppm + cmp testimgp.jpg testoutp.jpg + cmp testorig.jpg testoutt.jpg + + +jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h +jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h +rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h +wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h +cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h +rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/gtkmm-osx/jpeg-6b/makefile.mc6 b/gtkmm-osx/jpeg-6b/makefile.mc6 new file mode 100644 index 0000000..6aff054 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/makefile.mc6 @@ -0,0 +1,249 @@ +# Makefile for Independent JPEG Group's software + +# This makefile is for Microsoft C for MS-DOS, version 6.00A and up. +# Use NMAKE, not Microsoft's brain-damaged MAKE. +# Thanks to Alan Wright and Chris Turner of Olivetti Research Ltd. + +# Read installation instructions before saying "nmake" !! + +# You may need to adjust these compiler options: +CFLAGS = -AM -Oecigt -Gs -W3 +# -AM medium memory model (or use -AS for small model, if you remove features) +# -Oecigt -Gs maximum safe optimisation (-Ol has bugs in MSC 6.00A) +# -W3 warning level 3 +# You might also want to add -G2 if you have an 80286, etc. +# Generally, we recommend defining any configuration symbols in jconfig.h, +# NOT via -D switches here. + +# Jan-Herman Buining suggests the following switches for MS C 8.0 and a 486: +# CFLAGS = /AM /f- /FPi87 /G3 /Gs /Gy /Ob1 /Oc /Oe /Og /Oi /Ol /On /Oo /Ot \ +# /OV4 /W3 +# except for jquant1.c, which must be compiled with /Oo- to avoid a compiler +# crash. + +# Ingar Steinsland suggests the following switches when building +# a 16-bit Windows DLL: +# CFLAGS = -ALw -Gsw -Zpe -W3 -O2 -Zi -Zd + +# Put here the object file name for the correct system-dependent memory +# manager file. For DOS, we recommend jmemdos.c and jmemdosa.asm. +# (But not for Windows; see install.doc if you use this makefile for Windows.) +SYSDEPMEM= jmemdos.obj jmemdosa.obj +# SYSDEPMEMLIB must list the same files with "+" signs for the librarian. +SYSDEPMEMLIB= +jmemdos.obj +jmemdosa.obj + +# End of configurable options. + + +# source files: JPEG library proper +LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ + jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ + jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ + jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ + jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ + jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ + jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ + jquant2.c jutils.c jmemmgr.c +# memmgr back ends: compile only one of these into a working library +SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c +# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom +APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ + rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ + rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c +SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) +# files included by source files +INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ + jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h +# documentation, test, and support files +DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ + wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ + coderules.doc filelist.doc change.log +MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ + makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ + makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ + maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ + makvms.opt +CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ + jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ + jconfig.vms +CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh +OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm +TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ + testimgp.jpg +DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ + $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) +# library object files common to compression and decompression +COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) +# compression library object files +CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \ + jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \ + jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \ + jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj +# decompression library object files +DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \ + jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \ + jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \ + jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \ + jquant1.obj jquant2.obj jdmerge.obj +# These objectfiles are included in libjpeg.lib +LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) +# object files for sample applications (excluding library files) +COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \ + rdswitch.obj cdjpeg.obj +DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ + rdcolmap.obj cdjpeg.obj +TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj + +# need linker response file because file list > 128 chars +RFILE = libjpeg.ans + + +all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe + +libjpeg.lib: $(LIBOBJECTS) $(RFILE) + del libjpeg.lib + lib @$(RFILE) + +# linker response file for building libjpeg.lib +$(RFILE) : makefile + del $(RFILE) + echo libjpeg.lib >$(RFILE) +# silly want-to-create-it prompt: + echo y >>$(RFILE) + echo +jcapimin.obj +jcapistd.obj +jctrans.obj +jcparam.obj & >>$(RFILE) + echo +jdatadst.obj +jcinit.obj +jcmaster.obj +jcmarker.obj & >>$(RFILE) + echo +jcmainct.obj +jcprepct.obj +jccoefct.obj & >>$(RFILE) + echo +jccolor.obj +jcsample.obj +jchuff.obj +jcphuff.obj & >>$(RFILE) + echo +jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj & >>$(RFILE) + echo +jfdctint.obj +jdapimin.obj +jdapistd.obj & >>$(RFILE) + echo +jdtrans.obj +jdatasrc.obj +jdmaster.obj +jdinput.obj & >>$(RFILE) + echo +jdmarker.obj +jdhuff.obj +jdphuff.obj +jdmainct.obj & >>$(RFILE) + echo +jdcoefct.obj +jdpostct.obj +jddctmgr.obj & >>$(RFILE) + echo +jidctfst.obj +jidctflt.obj +jidctint.obj & >>$(RFILE) + echo +jidctred.obj +jdsample.obj +jdcolor.obj +jquant1.obj & >>$(RFILE) + echo +jquant2.obj +jdmerge.obj +jcomapi.obj +jutils.obj & >>$(RFILE) + echo +jerror.obj +jmemmgr.obj & >>$(RFILE) + echo $(SYSDEPMEMLIB) ; >>$(RFILE) + +cjpeg.exe: $(COBJECTS) libjpeg.lib + echo $(COBJECTS) >cjpeg.lst + link /STACK:4096 /EXEPACK @cjpeg.lst, cjpeg.exe, , libjpeg.lib, ; + del cjpeg.lst + +djpeg.exe: $(DOBJECTS) libjpeg.lib + echo $(DOBJECTS) >djpeg.lst + link /STACK:4096 /EXEPACK @djpeg.lst, djpeg.exe, , libjpeg.lib, ; + del djpeg.lst + +jpegtran.exe: $(TROBJECTS) libjpeg.lib + link /STACK:4096 /EXEPACK $(TROBJECTS), jpegtran.exe, , libjpeg.lib, ; + +rdjpgcom.exe: rdjpgcom.c + $(CC) -AS -O -W3 rdjpgcom.c + +# wrjpgcom needs large model so it can malloc a 64K chunk +wrjpgcom.exe: wrjpgcom.c + $(CC) -AL -O -W3 wrjpgcom.c + +jconfig.h: jconfig.doc + echo You must prepare a system-dependent jconfig.h file. + echo Please read the installation directions in install.doc. + exit 1 + +clean: + del *.obj + del libjpeg.lib + del cjpeg.exe + del djpeg.exe + del jpegtran.exe + del rdjpgcom.exe + del wrjpgcom.exe + del testout*.* + +test: cjpeg.exe djpeg.exe jpegtran.exe + del testout*.* + djpeg -dct int -ppm -outfile testout.ppm testorig.jpg + djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg + cjpeg -dct int -outfile testout.jpg testimg.ppm + djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg + cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm + jpegtran -outfile testoutt.jpg testprog.jpg + fc /b testimg.ppm testout.ppm + fc /b testimg.bmp testout.bmp + fc /b testimg.jpg testout.jpg + fc /b testimg.ppm testoutp.ppm + fc /b testimgp.jpg testoutp.jpg + fc /b testorig.jpg testoutt.jpg + + +jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h +jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h +rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h +wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h +cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h +rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +jmemdosa.obj : jmemdosa.asm + masm /mx $*; diff --git a/gtkmm-osx/jpeg-6b/makefile.mms b/gtkmm-osx/jpeg-6b/makefile.mms new file mode 100644 index 0000000..cf130e5 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/makefile.mms @@ -0,0 +1,218 @@ +# Makefile for Independent JPEG Group's software + +# This makefile is for use with MMS on Digital VMS systems. +# Thanks to Rick Dyson (dyson@iowasp.physics.uiowa.edu) +# and Tim Bell (tbell@netcom.com) for their help. + +# Read installation instructions before saying "MMS" !! + +# You may need to adjust these cc options: +CFLAGS= $(CFLAGS) /NoDebug /Optimize +# Generally, we recommend defining any configuration symbols in jconfig.h, +# NOT via /Define switches here. +.ifdef ALPHA +OPT= +.else +OPT= ,Sys$Disk:[]MAKVMS.OPT/Option +.endif + +# Put here the object file name for the correct system-dependent memory +# manager file. For Unix this is usually jmemnobs.o, but you may want +# to use jmemansi.o or jmemname.o if you have limited swap space. +SYSDEPMEM= jmemnobs.obj + +# End of configurable options. + + +# source files: JPEG library proper +LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ + jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ + jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ + jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ + jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ + jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ + jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ + jquant2.c jutils.c jmemmgr.c +# memmgr back ends: compile only one of these into a working library +SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c +# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom +APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ + rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ + rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c +SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) +# files included by source files +INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ + jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h +# documentation, test, and support files +DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ + wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ + coderules.doc filelist.doc change.log +MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ + makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ + makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ + maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ + makvms.opt +CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ + jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ + jconfig.vms +CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh +OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm +TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ + testimgp.jpg +DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ + $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) +# library object files common to compression and decompression +COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) +# compression library object files +CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \ + jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \ + jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \ + jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj +# decompression library object files +DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \ + jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \ + jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \ + jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \ + jquant1.obj jquant2.obj jdmerge.obj +# These objectfiles are included in libjpeg.olb +LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) +# object files for sample applications (excluding library files) +COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \ + rdswitch.obj cdjpeg.obj +DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ + rdcolmap.obj cdjpeg.obj +TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj +# objectfile lists with commas --- what a crock +COBJLIST= cjpeg.obj,rdppm.obj,rdgif.obj,rdtarga.obj,rdrle.obj,rdbmp.obj,\ + rdswitch.obj,cdjpeg.obj +DOBJLIST= djpeg.obj,wrppm.obj,wrgif.obj,wrtarga.obj,wrrle.obj,wrbmp.obj,\ + rdcolmap.obj,cdjpeg.obj +TROBJLIST= jpegtran.obj,rdswitch.obj,cdjpeg.obj,transupp.obj +LIBOBJLIST= jcapimin.obj,jcapistd.obj,jctrans.obj,jcparam.obj,jdatadst.obj,\ + jcinit.obj,jcmaster.obj,jcmarker.obj,jcmainct.obj,jcprepct.obj,\ + jccoefct.obj,jccolor.obj,jcsample.obj,jchuff.obj,jcphuff.obj,\ + jcdctmgr.obj,jfdctfst.obj,jfdctflt.obj,jfdctint.obj,jdapimin.obj,\ + jdapistd.obj,jdtrans.obj,jdatasrc.obj,jdmaster.obj,jdinput.obj,\ + jdmarker.obj,jdhuff.obj,jdphuff.obj,jdmainct.obj,jdcoefct.obj,\ + jdpostct.obj,jddctmgr.obj,jidctfst.obj,jidctflt.obj,jidctint.obj,\ + jidctred.obj,jdsample.obj,jdcolor.obj,jquant1.obj,jquant2.obj,\ + jdmerge.obj,jcomapi.obj,jutils.obj,jerror.obj,jmemmgr.obj,$(SYSDEPMEM) + + +.first + @- Define /NoLog Sys Sys$Library + +ALL : libjpeg.olb cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe + @ Continue + +libjpeg.olb : $(LIBOBJECTS) + Library /Create libjpeg.olb $(LIBOBJLIST) + +cjpeg.exe : $(COBJECTS) libjpeg.olb + $(LINK) $(LFLAGS) /Executable = cjpeg.exe $(COBJLIST),libjpeg.olb/Library$(OPT) + +djpeg.exe : $(DOBJECTS) libjpeg.olb + $(LINK) $(LFLAGS) /Executable = djpeg.exe $(DOBJLIST),libjpeg.olb/Library$(OPT) + +jpegtran.exe : $(TROBJECTS) libjpeg.olb + $(LINK) $(LFLAGS) /Executable = jpegtran.exe $(TROBJLIST),libjpeg.olb/Library$(OPT) + +rdjpgcom.exe : rdjpgcom.obj + $(LINK) $(LFLAGS) /Executable = rdjpgcom.exe rdjpgcom.obj$(OPT) + +wrjpgcom.exe : wrjpgcom.obj + $(LINK) $(LFLAGS) /Executable = wrjpgcom.exe wrjpgcom.obj$(OPT) + +jconfig.h : jconfig.vms + @- Copy jconfig.vms jconfig.h + +clean : + @- Set Protection = Owner:RWED *.*;-1 + @- Set Protection = Owner:RWED *.OBJ + - Purge /NoLog /NoConfirm *.* + - Delete /NoLog /NoConfirm *.OBJ; + +test : cjpeg.exe djpeg.exe jpegtran.exe + mcr sys$disk:[]djpeg -dct int -ppm -outfile testout.ppm testorig.jpg + mcr sys$disk:[]djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg + mcr sys$disk:[]cjpeg -dct int -outfile testout.jpg testimg.ppm + mcr sys$disk:[]djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg + mcr sys$disk:[]cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm + mcr sys$disk:[]jpegtran -outfile testoutt.jpg testprog.jpg + - Backup /Compare/Log testimg.ppm testout.ppm + - Backup /Compare/Log testimg.bmp testout.bmp + - Backup /Compare/Log testimg.jpg testout.jpg + - Backup /Compare/Log testimg.ppm testoutp.ppm + - Backup /Compare/Log testimgp.jpg testoutp.jpg + - Backup /Compare/Log testorig.jpg testoutt.jpg + + +jcapimin.obj : jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcapistd.obj : jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccoefct.obj : jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccolor.obj : jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcdctmgr.obj : jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jchuff.obj : jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcinit.obj : jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmainct.obj : jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmarker.obj : jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmaster.obj : jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcomapi.obj : jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcparam.obj : jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcphuff.obj : jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcprepct.obj : jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcsample.obj : jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jctrans.obj : jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapimin.obj : jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapistd.obj : jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdatadst.obj : jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdatasrc.obj : jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdcoefct.obj : jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdcolor.obj : jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jddctmgr.obj : jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jdhuff.obj : jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdinput.obj : jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmainct.obj : jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmarker.obj : jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmaster.obj : jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmerge.obj : jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdphuff.obj : jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdpostct.obj : jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdsample.obj : jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdtrans.obj : jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jerror.obj : jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h +jfdctflt.obj : jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctfst.obj : jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctint.obj : jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctflt.obj : jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctfst.obj : jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctint.obj : jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctred.obj : jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jquant1.obj : jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jquant2.obj : jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jutils.obj : jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jmemmgr.obj : jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemansi.obj : jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemname.obj : jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemnobs.obj : jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemdos.obj : jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemmac.obj : jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +cjpeg.obj : cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +djpeg.obj : djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +jpegtran.obj : jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h +rdjpgcom.obj : rdjpgcom.c jinclude.h jconfig.h +wrjpgcom.obj : wrjpgcom.c jinclude.h jconfig.h +cdjpeg.obj : cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdcolmap.obj : rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdswitch.obj : rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +transupp.obj : transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h +rdppm.obj : rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrppm.obj : wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdgif.obj : rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrgif.obj : wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdtarga.obj : rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrtarga.obj : wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdbmp.obj : rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrbmp.obj : wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdrle.obj : rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrrle.obj : wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/gtkmm-osx/jpeg-6b/makefile.sas b/gtkmm-osx/jpeg-6b/makefile.sas new file mode 100644 index 0000000..f296faf --- /dev/null +++ b/gtkmm-osx/jpeg-6b/makefile.sas @@ -0,0 +1,252 @@ +# Makefile for Independent JPEG Group's software + +# This makefile is for Amiga systems using SAS C 6.0 and up. +# Thanks to Ed Hanway, Mark Rinfret, and Jim Zepeda. + +# Read installation instructions before saying "make" !! + +# The name of your C compiler: +CC= sc + +# You may need to adjust these cc options: +# Uncomment the following lines for generic 680x0 version +ARCHFLAGS= cpu=any +SUFFIX= + +# Uncomment the following lines for 68030-only version +#ARCHFLAGS= cpu=68030 +#SUFFIX=.030 + +CFLAGS= nostackcheck data=near parms=register optimize $(ARCHFLAGS) \ + ignore=104 ignore=304 ignore=306 +# ignore=104 disables warnings for mismatched const qualifiers +# ignore=304 disables warnings for variables being optimized out +# ignore=306 disables warnings for the inlining of functions +# Generally, we recommend defining any configuration symbols in jconfig.h, +# NOT via define switches here. + +# Link-time cc options: +LDFLAGS= SC SD ND BATCH + +# To link any special libraries, add the necessary commands here. +LDLIBS= LIB:scm.lib LIB:sc.lib + +# Put here the object file name for the correct system-dependent memory +# manager file. For Amiga we recommend jmemname.o. +SYSDEPMEM= jmemname.o + +# miscellaneous OS-dependent stuff +# linker +LN= slink +# file deletion command +RM= delete quiet +# library (.lib) file creation command +AR= oml + +# End of configurable options. + + +# source files: JPEG library proper +LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ + jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ + jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ + jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ + jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ + jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ + jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ + jquant2.c jutils.c jmemmgr.c +# memmgr back ends: compile only one of these into a working library +SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c +# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom +APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ + rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ + rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c +SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) +# files included by source files +INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ + jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h +# documentation, test, and support files +DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ + wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ + coderules.doc filelist.doc change.log +MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ + makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ + makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ + maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ + makvms.opt +CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ + jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ + jconfig.vms +CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh +OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm +TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ + testimgp.jpg +DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ + $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) +# library object files common to compression and decompression +COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) +# compression library object files +CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \ + jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \ + jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \ + jfdctint.o +# decompression library object files +DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \ + jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \ + jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \ + jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o +# These objectfiles are included in libjpeg.lib +LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) +# object files for sample applications (excluding library files) +COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ + cdjpeg.o +DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ + cdjpeg.o +TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o + + +all: libjpeg.lib cjpeg$(SUFFIX) djpeg$(SUFFIX) jpegtran$(SUFFIX) rdjpgcom$(SUFFIX) wrjpgcom$(SUFFIX) + +# note: do several AR steps to avoid command line length limitations + +libjpeg.lib: $(LIBOBJECTS) + -$(RM) libjpeg.lib + $(AR) libjpeg.lib r $(CLIBOBJECTS) + $(AR) libjpeg.lib r $(DLIBOBJECTS) + $(AR) libjpeg.lib r $(COMOBJECTS) + +cjpeg$(SUFFIX): $(COBJECTS) libjpeg.lib + $(LN) + +# You may want to adjust these compiler options: +CFLAGS= $(cflags) $(cdebug) $(cvars) -I. +# Generally, we recommend defining any configuration symbols in jconfig.h, +# NOT via -D switches here. + +# Link-time options: +LDFLAGS= $(ldebug) $(conlflags) + +# To link any special libraries, add the necessary commands here. +LDLIBS= $(conlibs) + +# Put here the object file name for the correct system-dependent memory +# manager file. For NT we suggest jmemnobs.obj, which expects the OS to +# provide adequate virtual memory. +SYSDEPMEM= jmemnobs.obj + +# miscellaneous OS-dependent stuff +# file deletion command +RM= del + +# End of configurable options. + + +# source files: JPEG library proper +LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ + jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ + jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ + jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ + jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ + jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ + jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ + jquant2.c jutils.c jmemmgr.c +# memmgr back ends: compile only one of these into a working library +SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c +# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom +APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ + rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ + rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c +SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) +# files included by source files +INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ + jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h +# documentation, test, and support files +DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ + wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ + coderules.doc filelist.doc change.log +MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ + makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ + makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ + maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ + makvms.opt +CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ + jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ + jconfig.vms +CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh +OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm +TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ + testimgp.jpg +DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ + $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) +# library object files common to compression and decompression +COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) +# compression library object files +CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \ + jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \ + jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \ + jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj +# decompression library object files +DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \ + jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \ + jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \ + jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \ + jquant1.obj jquant2.obj jdmerge.obj +# These objectfiles are included in libjpeg.lib +LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) +# object files for sample applications (excluding library files) +COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \ + rdswitch.obj cdjpeg.obj +DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ + rdcolmap.obj cdjpeg.obj +TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj + +# Template command for compiling .c to .obj +.c.obj: + $(cc) $(CFLAGS) $*.c + + +all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe + +libjpeg.lib: $(LIBOBJECTS) + $(RM) libjpeg.lib + lib -out:libjpeg.lib $(LIBOBJECTS) + +cjpeg.exe: $(COBJECTS) libjpeg.lib + $(link) $(LDFLAGS) -out:cjpeg.exe $(COBJECTS) libjpeg.lib $(LDLIBS) + +djpeg.exe: $(DOBJECTS) libjpeg.lib + $(link) $(LDFLAGS) -out:djpeg.exe $(DOBJECTS) libjpeg.lib $(LDLIBS) + +jpegtran.exe: $(TROBJECTS) libjpeg.lib + $(link) $(LDFLAGS) -out:jpegtran.exe $(TROBJECTS) libjpeg.lib $(LDLIBS) + +rdjpgcom.exe: rdjpgcom.obj + $(link) $(LDFLAGS) -out:rdjpgcom.exe rdjpgcom.obj $(LDLIBS) + +wrjpgcom.exe: wrjpgcom.obj + $(link) $(LDFLAGS) -out:wrjpgcom.exe wrjpgcom.obj $(LDLIBS) + + +clean: + $(RM) *.obj *.exe libjpeg.lib + $(RM) testout* + +test: cjpeg.exe djpeg.exe jpegtran.exe + $(RM) testout* + .\djpeg -dct int -ppm -outfile testout.ppm testorig.jpg + .\djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg + .\cjpeg -dct int -outfile testout.jpg testimg.ppm + .\djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg + .\cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm + .\jpegtran -outfile testoutt.jpg testprog.jpg + fc /b testimg.ppm testout.ppm + fc /b testimg.bmp testout.bmp + fc /b testimg.jpg testout.jpg + fc /b testimg.ppm testoutp.ppm + fc /b testimgp.jpg testoutp.jpg + fc /b testorig.jpg testoutt.jpg + + +jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h +jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h +rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h +wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h +cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h +rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/gtkmm-osx/jpeg-6b/makefile.vms b/gtkmm-osx/jpeg-6b/makefile.vms new file mode 100644 index 0000000..a42358d --- /dev/null +++ b/gtkmm-osx/jpeg-6b/makefile.vms @@ -0,0 +1,142 @@ +$! Makefile for Independent JPEG Group's software +$! +$! This is a command procedure for Digital VMS systems that do not have MMS. +$! It builds the JPEG software by brute force, recompiling everything whether +$! or not it is necessary. It then runs the basic self-test. +$! Thanks to Rick Dyson (dyson@iowasp.physics.uiowa.edu) +$! and Tim Bell (tbell@netcom.com) for their help. +$! +$! Read installation instructions before running this!! +$! +$ If F$Mode () .eqs. "INTERACTIVE" +$ Then +$ VERIFY = F$Verify (0) +$ Else +$ VERIFY = F$Verify (1) +$ EndIf +$ On Control_Y Then GoTo End +$ On Error Then GoTo End +$ +$ If F$GetSyi ("HW_MODEL") .gt. 1023 +$ Then +$ OPT = "" +$ Else +$ OPT = ",Sys$Disk:[]makvms.opt/Option" +$ EndIf +$ +$ DoCompile := CC /NoDebug /Optimize /NoList +$! +$ DoCompile jcapimin.c +$ DoCompile jcapistd.c +$ DoCompile jctrans.c +$ DoCompile jcparam.c +$ DoCompile jdatadst.c +$ DoCompile jcinit.c +$ DoCompile jcmaster.c +$ DoCompile jcmarker.c +$ DoCompile jcmainct.c +$ DoCompile jcprepct.c +$ DoCompile jccoefct.c +$ DoCompile jccolor.c +$ DoCompile jcsample.c +$ DoCompile jchuff.c +$ DoCompile jcphuff.c +$ DoCompile jcdctmgr.c +$ DoCompile jfdctfst.c +$ DoCompile jfdctflt.c +$ DoCompile jfdctint.c +$ DoCompile jdapimin.c +$ DoCompile jdapistd.c +$ DoCompile jdtrans.c +$ DoCompile jdatasrc.c +$ DoCompile jdmaster.c +$ DoCompile jdinput.c +$ DoCompile jdmarker.c +$ DoCompile jdhuff.c +$ DoCompile jdphuff.c +$ DoCompile jdmainct.c +$ DoCompile jdcoefct.c +$ DoCompile jdpostct.c +$ DoCompile jddctmgr.c +$ DoCompile jidctfst.c +$ DoCompile jidctflt.c +$ DoCompile jidctint.c +$ DoCompile jidctred.c +$ DoCompile jdsample.c +$ DoCompile jdcolor.c +$ DoCompile jquant1.c +$ DoCompile jquant2.c +$ DoCompile jdmerge.c +$ DoCompile jcomapi.c +$ DoCompile jutils.c +$ DoCompile jerror.c +$ DoCompile jmemmgr.c +$ DoCompile jmemnobs.c +$! +$ Library /Create libjpeg.olb jcapimin.obj,jcapistd.obj,jctrans.obj, - + jcparam.obj,jdatadst.obj,jcinit.obj,jcmaster.obj,jcmarker.obj, - + jcmainct.obj,jcprepct.obj,jccoefct.obj,jccolor.obj,jcsample.obj, - + jchuff.obj,jcphuff.obj,jcdctmgr.obj,jfdctfst.obj,jfdctflt.obj, - + jfdctint.obj,jdapimin.obj,jdapistd.obj,jdtrans.obj,jdatasrc.obj, - + jdmaster.obj,jdinput.obj,jdmarker.obj,jdhuff.obj,jdphuff.obj, - + jdmainct.obj,jdcoefct.obj,jdpostct.obj,jddctmgr.obj,jidctfst.obj, - + jidctflt.obj,jidctint.obj,jidctred.obj,jdsample.obj,jdcolor.obj, - + jquant1.obj,jquant2.obj,jdmerge.obj,jcomapi.obj,jutils.obj, - + jerror.obj,jmemmgr.obj,jmemnobs.obj +$! +$ DoCompile cjpeg.c +$ DoCompile rdppm.c +$ DoCompile rdgif.c +$ DoCompile rdtarga.c +$ DoCompile rdrle.c +$ DoCompile rdbmp.c +$ DoCompile rdswitch.c +$ DoCompile cdjpeg.c +$! +$ Link /NoMap /Executable = cjpeg.exe cjpeg.obj,rdppm.obj,rdgif.obj, - + rdtarga.obj,rdrle.obj,rdbmp.obj,rdswitch.obj,cdjpeg.obj,libjpeg.olb/Library'OPT' +$! +$ DoCompile djpeg.c +$ DoCompile wrppm.c +$ DoCompile wrgif.c +$ DoCompile wrtarga.c +$ DoCompile wrrle.c +$ DoCompile wrbmp.c +$ DoCompile rdcolmap.c +$ DoCompile cdjpeg.c +$! +$ Link /NoMap /Executable = djpeg.exe djpeg.obj,wrppm.obj,wrgif.obj, - + wrtarga.obj,wrrle.obj,wrbmp.obj,rdcolmap.obj,cdjpeg.obj,libjpeg.olb/Library'OPT' +$! +$ DoCompile jpegtran.c +$ DoCompile rdswitch.c +$ DoCompile cdjpeg.c +$ DoCompile transupp.c +$! +$ Link /NoMap /Executable = jpegtran.exe jpegtran.obj,rdswitch.obj, - + cdjpeg.obj,transupp.obj,libjpeg.olb/Library'OPT' +$! +$ DoCompile rdjpgcom.c +$ Link /NoMap /Executable = rdjpgcom.exe rdjpgcom.obj'OPT' +$! +$ DoCompile wrjpgcom.c +$ Link /NoMap /Executable = wrjpgcom.exe wrjpgcom.obj'OPT' +$! +$! Run the self-test +$! +$ mcr sys$disk:[]djpeg -dct int -ppm -outfile testout.ppm testorig.jpg +$ mcr sys$disk:[]djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg +$ mcr sys$disk:[]cjpeg -dct int -outfile testout.jpg testimg.ppm +$ mcr sys$disk:[]djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg +$ mcr sys$disk:[]cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm +$ mcr sys$disk:[]jpegtran -outfile testoutt.jpg testprog.jpg +$ Backup /Compare/Log testimg.ppm testout.ppm +$ Backup /Compare/Log testimg.bmp testout.bmp +$ Backup /Compare/Log testimg.jpg testout.jpg +$ Backup /Compare/Log testimg.ppm testoutp.ppm +$ Backup /Compare/Log testimgp.jpg testoutp.jpg +$ Backup /Compare/Log testorig.jpg testoutt.jpg +$! +$End: +$ If Verify Then Set Verify +$ Exit diff --git a/gtkmm-osx/jpeg-6b/makefile.wat b/gtkmm-osx/jpeg-6b/makefile.wat new file mode 100644 index 0000000..d953e46 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/makefile.wat @@ -0,0 +1,233 @@ +# Makefile for Independent JPEG Group's software + +# This makefile is suitable for Watcom C/C++ 10.0 on MS-DOS (using +# dos4g extender), OS/2, and Windows NT console mode. +# Thanks to Janos Haide, jhaide@btrvtech.com. + +# Read installation instructions before saying "wmake" !! + +# Uncomment line for desired system +SYSTEM=DOS +#SYSTEM=OS2 +#SYSTEM=NT + +# The name of your C compiler: +CC= wcl386 + +# You may need to adjust these cc options: +CFLAGS= -4r -ort -wx -zq -bt=$(SYSTEM) +# Caution: avoid -ol or -ox; these generate bad code with 10.0 or 10.0a. +# Generally, we recommend defining any configuration symbols in jconfig.h, +# NOT via -D switches here. + +# Link-time cc options: +!ifeq SYSTEM DOS +LDFLAGS= -zq -l=dos4g +!else ifeq SYSTEM OS2 +LDFLAGS= -zq -l=os2v2 +!else ifeq SYSTEM NT +LDFLAGS= -zq -l=nt +!endif + +# Put here the object file name for the correct system-dependent memory +# manager file. jmemnobs should work fine for dos4g or OS/2 environment. +SYSDEPMEM= jmemnobs.obj + +# End of configurable options. + + +# source files: JPEG library proper +LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c & + jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c & + jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c & + jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c & + jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c & + jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c & + jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c & + jquant2.c jutils.c jmemmgr.c +# memmgr back ends: compile only one of these into a working library +SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c +# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom +APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c & + rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c & + rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c +SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) +# files included by source files +INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h & + jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h +# documentation, test, and support files +DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 & + wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc & + coderules.doc filelist.doc change.log +MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc & + makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds & + makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st & + maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms & + makvms.opt +CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat & + jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas & + jconfig.vms +CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh +OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm +TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg & + testimgp.jpg +DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) & + $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) +# library object files common to compression and decompression +COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) +# compression library object files +CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj & + jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj & + jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj & + jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj +# decompression library object files +DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj & + jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj & + jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj & + jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj & + jquant1.obj jquant2.obj jdmerge.obj +# These objectfiles are included in libjpeg.lib +LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) +# object files for sample applications (excluding library files) +COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj & + rdswitch.obj cdjpeg.obj +DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj & + rdcolmap.obj cdjpeg.obj +TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj + + +all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe + +libjpeg.lib: $(LIBOBJECTS) + - del libjpeg.lib + * wlib -n libjpeg.lib $(LIBOBJECTS) + +cjpeg.exe: $(COBJECTS) libjpeg.lib + $(CC) $(LDFLAGS) $(COBJECTS) libjpeg.lib + +djpeg.exe: $(DOBJECTS) libjpeg.lib + $(CC) $(LDFLAGS) $(DOBJECTS) libjpeg.lib + +jpegtran.exe: $(TROBJECTS) libjpeg.lib + $(CC) $(LDFLAGS) $(TROBJECTS) libjpeg.lib + +rdjpgcom.exe: rdjpgcom.c + $(CC) $(CFLAGS) $(LDFLAGS) rdjpgcom.c + +wrjpgcom.exe: wrjpgcom.c + $(CC) $(CFLAGS) $(LDFLAGS) wrjpgcom.c + +.c.obj: + $(CC) $(CFLAGS) -c $< + +jconfig.h: jconfig.doc + echo You must prepare a system-dependent jconfig.h file. + echo Please read the installation directions in install.doc. + exit 1 + +clean: .SYMBOLIC + - del *.obj + - del libjpeg.lib + - del cjpeg.exe + - del djpeg.exe + - del jpegtran.exe + - del rdjpgcom.exe + - del wrjpgcom.exe + - del testout*.* + +test: cjpeg.exe djpeg.exe jpegtran.exe .SYMBOLIC + - del testout*.* + djpeg -dct int -ppm -outfile testout.ppm testorig.jpg + djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg + cjpeg -dct int -outfile testout.jpg testimg.ppm + djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg + cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm + jpegtran -outfile testoutt.jpg testprog.jpg +!ifeq SYSTEM DOS + fc /b testimg.ppm testout.ppm + fc /b testimg.bmp testout.bmp + fc /b testimg.jpg testout.jpg + fc /b testimg.ppm testoutp.ppm + fc /b testimgp.jpg testoutp.jpg + fc /b testorig.jpg testoutt.jpg +!else + echo n > n.tmp + comp testimg.ppm testout.ppm < n.tmp + comp testimg.bmp testout.bmp < n.tmp + comp testimg.jpg testout.jpg < n.tmp + comp testimg.ppm testoutp.ppm < n.tmp + comp testimgp.jpg testoutp.jpg < n.tmp + comp testorig.jpg testoutt.jpg < n.tmp + del n.tmp +!endif + + +jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h +jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h +rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h +wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h +cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h +rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/gtkmm-osx/jpeg-6b/makelib.ds b/gtkmm-osx/jpeg-6b/makelib.ds new file mode 100644 index 0000000..c7ad36d --- /dev/null +++ b/gtkmm-osx/jpeg-6b/makelib.ds @@ -0,0 +1,1046 @@ +# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +!IF "$(CFG)" == "" +CFG=jpeg - Win32 +!MESSAGE No configuration specified. Defaulting to jpeg - Win32. +!ENDIF + +!IF "$(CFG)" != "jpeg - Win32" +!MESSAGE Invalid configuration "$(CFG)" specified. +!MESSAGE You can specify a configuration when running NMAKE on this makefile +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "jpeg.mak" CFG="jpeg - Win32" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "jpeg - Win32" (based on "Win32 (x86) Static Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF +################################################################################ +# Begin Project +# PROP Target_Last_Scanned "jpeg - Win32" +CPP=cl.exe + +!IF "$(CFG)" == "jpeg - Win32" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +OUTDIR=.\Release +INTDIR=.\Release + +ALL : "$(OUTDIR)\jpeg.lib" + +CLEAN : + -@erase "$(INTDIR)\jcapimin.obj" + -@erase "$(INTDIR)\jcapistd.obj" + -@erase "$(INTDIR)\jctrans.obj" + -@erase "$(INTDIR)\jcparam.obj" + -@erase "$(INTDIR)\jdatadst.obj" + -@erase "$(INTDIR)\jcinit.obj" + -@erase "$(INTDIR)\jcmaster.obj" + -@erase "$(INTDIR)\jcmarker.obj" + -@erase "$(INTDIR)\jcmainct.obj" + -@erase "$(INTDIR)\jcprepct.obj" + -@erase "$(INTDIR)\jccoefct.obj" + -@erase "$(INTDIR)\jccolor.obj" + -@erase "$(INTDIR)\jcsample.obj" + -@erase "$(INTDIR)\jchuff.obj" + -@erase "$(INTDIR)\jcphuff.obj" + -@erase "$(INTDIR)\jcdctmgr.obj" + -@erase "$(INTDIR)\jfdctfst.obj" + -@erase "$(INTDIR)\jfdctflt.obj" + -@erase "$(INTDIR)\jfdctint.obj" + -@erase "$(INTDIR)\jdapimin.obj" + -@erase "$(INTDIR)\jdapistd.obj" + -@erase "$(INTDIR)\jdtrans.obj" + -@erase "$(INTDIR)\jdatasrc.obj" + -@erase "$(INTDIR)\jdmaster.obj" + -@erase "$(INTDIR)\jdinput.obj" + -@erase "$(INTDIR)\jdmarker.obj" + -@erase "$(INTDIR)\jdhuff.obj" + -@erase "$(INTDIR)\jdphuff.obj" + -@erase "$(INTDIR)\jdmainct.obj" + -@erase "$(INTDIR)\jdcoefct.obj" + -@erase "$(INTDIR)\jdpostct.obj" + -@erase "$(INTDIR)\jddctmgr.obj" + -@erase "$(INTDIR)\jidctfst.obj" + -@erase "$(INTDIR)\jidctflt.obj" + -@erase "$(INTDIR)\jidctint.obj" + -@erase "$(INTDIR)\jidctred.obj" + -@erase "$(INTDIR)\jdsample.obj" + -@erase "$(INTDIR)\jdcolor.obj" + -@erase "$(INTDIR)\jquant1.obj" + -@erase "$(INTDIR)\jquant2.obj" + -@erase "$(INTDIR)\jdmerge.obj" + -@erase "$(INTDIR)\jcomapi.obj" + -@erase "$(INTDIR)\jutils.obj" + -@erase "$(INTDIR)\jerror.obj" + -@erase "$(INTDIR)\jmemmgr.obj" + -@erase "$(INTDIR)\jmemnobs.obj" + -@erase "$(OUTDIR)\jpeg.lib" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\ + /Fp"$(INTDIR)/jpeg.pch" /YX /Fo"$(INTDIR)/" /c +CPP_OBJS=.\Release/ +CPP_SBRS=.\. +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +BSC32_FLAGS=/nologo /o"$(OUTDIR)/jpeg.bsc" +BSC32_SBRS= \ + +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo +LIB32_FLAGS=/nologo /out:"$(OUTDIR)/jpeg.lib" +LIB32_OBJS= \ + "$(INTDIR)\jcapimin.obj" \ + "$(INTDIR)\jcapistd.obj" \ + "$(INTDIR)\jctrans.obj" \ + "$(INTDIR)\jcparam.obj" \ + "$(INTDIR)\jdatadst.obj" \ + "$(INTDIR)\jcinit.obj" \ + "$(INTDIR)\jcmaster.obj" \ + "$(INTDIR)\jcmarker.obj" \ + "$(INTDIR)\jcmainct.obj" \ + "$(INTDIR)\jcprepct.obj" \ + "$(INTDIR)\jccoefct.obj" \ + "$(INTDIR)\jccolor.obj" \ + "$(INTDIR)\jcsample.obj" \ + "$(INTDIR)\jchuff.obj" \ + "$(INTDIR)\jcphuff.obj" \ + "$(INTDIR)\jcdctmgr.obj" \ + "$(INTDIR)\jfdctfst.obj" \ + "$(INTDIR)\jfdctflt.obj" \ + "$(INTDIR)\jfdctint.obj" \ + "$(INTDIR)\jdapimin.obj" \ + "$(INTDIR)\jdapistd.obj" \ + "$(INTDIR)\jdtrans.obj" \ + "$(INTDIR)\jdatasrc.obj" \ + "$(INTDIR)\jdmaster.obj" \ + "$(INTDIR)\jdinput.obj" \ + "$(INTDIR)\jdmarker.obj" \ + "$(INTDIR)\jdhuff.obj" \ + "$(INTDIR)\jdphuff.obj" \ + "$(INTDIR)\jdmainct.obj" \ + "$(INTDIR)\jdcoefct.obj" \ + "$(INTDIR)\jdpostct.obj" \ + "$(INTDIR)\jddctmgr.obj" \ + "$(INTDIR)\jidctfst.obj" \ + "$(INTDIR)\jidctflt.obj" \ + "$(INTDIR)\jidctint.obj" \ + "$(INTDIR)\jidctred.obj" \ + "$(INTDIR)\jdsample.obj" \ + "$(INTDIR)\jdcolor.obj" \ + "$(INTDIR)\jquant1.obj" \ + "$(INTDIR)\jquant2.obj" \ + "$(INTDIR)\jdmerge.obj" \ + "$(INTDIR)\jcomapi.obj" \ + "$(INTDIR)\jutils.obj" \ + "$(INTDIR)\jerror.obj" \ + "$(INTDIR)\jmemmgr.obj" \ + "$(INTDIR)\jmemnobs.obj" + +"$(OUTDIR)\jpeg.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS) + $(LIB32) @<< + $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) +<< + +!ENDIF + +.c{$(CPP_OBJS)}.obj: + $(CPP) $(CPP_PROJ) $< + +.cpp{$(CPP_OBJS)}.obj: + $(CPP) $(CPP_PROJ) $< + +.cxx{$(CPP_OBJS)}.obj: + $(CPP) $(CPP_PROJ) $< + +.c{$(CPP_SBRS)}.sbr: + $(CPP) $(CPP_PROJ) $< + +.cpp{$(CPP_SBRS)}.sbr: + $(CPP) $(CPP_PROJ) $< + +.cxx{$(CPP_SBRS)}.sbr: + $(CPP) $(CPP_PROJ) $< + +################################################################################ +# Begin Target + +# Name "jpeg - Win32" + +!IF "$(CFG)" == "jpeg - Win32" + +!ENDIF + +################################################################################ +# Begin Source File + +SOURCE="jcapimin.c" +DEP_CPP_JCAPI=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jcapimin.obj" : $(SOURCE) $(DEP_CPP_JCAPI) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jcapistd.c" +DEP_CPP_JCAPIS=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jcapistd.obj" : $(SOURCE) $(DEP_CPP_JCAPIS) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jccoefct.c" +DEP_CPP_JCCOE=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jccoefct.obj" : $(SOURCE) $(DEP_CPP_JCCOE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jccolor.c" +DEP_CPP_JCCOL=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jccolor.obj" : $(SOURCE) $(DEP_CPP_JCCOL) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jcdctmgr.c" +DEP_CPP_JCDCT=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + "jdct.h"\ + + +"$(INTDIR)\jcdctmgr.obj" : $(SOURCE) $(DEP_CPP_JCDCT) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jchuff.c" +DEP_CPP_JCHUF=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + "jchuff.h"\ + + +"$(INTDIR)\jchuff.obj" : $(SOURCE) $(DEP_CPP_JCHUF) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jcinit.c" +DEP_CPP_JCINI=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jcinit.obj" : $(SOURCE) $(DEP_CPP_JCINI) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jcmainct.c" +DEP_CPP_JCMAI=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jcmainct.obj" : $(SOURCE) $(DEP_CPP_JCMAI) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jcmarker.c" +DEP_CPP_JCMAR=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jcmarker.obj" : $(SOURCE) $(DEP_CPP_JCMAR) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jcmaster.c" +DEP_CPP_JCMAS=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jcmaster.obj" : $(SOURCE) $(DEP_CPP_JCMAS) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jcomapi.c" +DEP_CPP_JCOMA=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jcomapi.obj" : $(SOURCE) $(DEP_CPP_JCOMA) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jcparam.c" +DEP_CPP_JCPAR=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jcparam.obj" : $(SOURCE) $(DEP_CPP_JCPAR) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jcphuff.c" +DEP_CPP_JCPHU=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + "jchuff.h"\ + + +"$(INTDIR)\jcphuff.obj" : $(SOURCE) $(DEP_CPP_JCPHU) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jcprepct.c" +DEP_CPP_JCPRE=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jcprepct.obj" : $(SOURCE) $(DEP_CPP_JCPRE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jcsample.c" +DEP_CPP_JCSAM=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jcsample.obj" : $(SOURCE) $(DEP_CPP_JCSAM) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jctrans.c" +DEP_CPP_JCTRA=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jctrans.obj" : $(SOURCE) $(DEP_CPP_JCTRA) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jdapimin.c" +DEP_CPP_JDAPI=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jdapimin.obj" : $(SOURCE) $(DEP_CPP_JDAPI) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jdapistd.c" +DEP_CPP_JDAPIS=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jdapistd.obj" : $(SOURCE) $(DEP_CPP_JDAPIS) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jdatadst.c" +DEP_CPP_JDATA=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + + +"$(INTDIR)\jdatadst.obj" : $(SOURCE) $(DEP_CPP_JDATA) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jdatasrc.c" +DEP_CPP_JDATAS=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jerror.h"\ + + +"$(INTDIR)\jdatasrc.obj" : $(SOURCE) $(DEP_CPP_JDATAS) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jdcoefct.c" +DEP_CPP_JDCOE=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jdcoefct.obj" : $(SOURCE) $(DEP_CPP_JDCOE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jdcolor.c" +DEP_CPP_JDCOL=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jdcolor.obj" : $(SOURCE) $(DEP_CPP_JDCOL) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jddctmgr.c" +DEP_CPP_JDDCT=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + "jdct.h"\ + + +"$(INTDIR)\jddctmgr.obj" : $(SOURCE) $(DEP_CPP_JDDCT) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jdhuff.c" +DEP_CPP_JDHUF=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + "jdhuff.h"\ + + +"$(INTDIR)\jdhuff.obj" : $(SOURCE) $(DEP_CPP_JDHUF) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jdinput.c" +DEP_CPP_JDINP=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jdinput.obj" : $(SOURCE) $(DEP_CPP_JDINP) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jdmainct.c" +DEP_CPP_JDMAI=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jdmainct.obj" : $(SOURCE) $(DEP_CPP_JDMAI) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jdmarker.c" +DEP_CPP_JDMAR=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jdmarker.obj" : $(SOURCE) $(DEP_CPP_JDMAR) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jdmaster.c" +DEP_CPP_JDMAS=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jdmaster.obj" : $(SOURCE) $(DEP_CPP_JDMAS) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jdmerge.c" +DEP_CPP_JDMER=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jdmerge.obj" : $(SOURCE) $(DEP_CPP_JDMER) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jdphuff.c" +DEP_CPP_JDPHU=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + "jdhuff.h"\ + + +"$(INTDIR)\jdphuff.obj" : $(SOURCE) $(DEP_CPP_JDPHU) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jdpostct.c" +DEP_CPP_JDPOS=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jdpostct.obj" : $(SOURCE) $(DEP_CPP_JDPOS) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jdsample.c" +DEP_CPP_JDSAM=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jdsample.obj" : $(SOURCE) $(DEP_CPP_JDSAM) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jdtrans.c" +DEP_CPP_JDTRA=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jdtrans.obj" : $(SOURCE) $(DEP_CPP_JDTRA) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jerror.c" +DEP_CPP_JERRO=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jversion.h"\ + "jerror.h"\ + + +"$(INTDIR)\jerror.obj" : $(SOURCE) $(DEP_CPP_JERRO) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jfdctflt.c" +DEP_CPP_JFDCT=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + "jdct.h"\ + + +"$(INTDIR)\jfdctflt.obj" : $(SOURCE) $(DEP_CPP_JFDCT) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jfdctfst.c" +DEP_CPP_JFDCTF=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + "jdct.h"\ + + +"$(INTDIR)\jfdctfst.obj" : $(SOURCE) $(DEP_CPP_JFDCTF) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jfdctint.c" +DEP_CPP_JFDCTI=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + "jdct.h"\ + + +"$(INTDIR)\jfdctint.obj" : $(SOURCE) $(DEP_CPP_JFDCTI) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jidctflt.c" +DEP_CPP_JIDCT=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + "jdct.h"\ + + +"$(INTDIR)\jidctflt.obj" : $(SOURCE) $(DEP_CPP_JIDCT) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jidctfst.c" +DEP_CPP_JIDCTF=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + "jdct.h"\ + + +"$(INTDIR)\jidctfst.obj" : $(SOURCE) $(DEP_CPP_JIDCTF) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jidctint.c" +DEP_CPP_JIDCTI=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + "jdct.h"\ + + +"$(INTDIR)\jidctint.obj" : $(SOURCE) $(DEP_CPP_JIDCTI) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jidctred.c" +DEP_CPP_JIDCTR=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + "jdct.h"\ + + +"$(INTDIR)\jidctred.obj" : $(SOURCE) $(DEP_CPP_JIDCTR) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jquant1.c" +DEP_CPP_JQUAN=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jquant1.obj" : $(SOURCE) $(DEP_CPP_JQUAN) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jquant2.c" +DEP_CPP_JQUANT=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jquant2.obj" : $(SOURCE) $(DEP_CPP_JQUANT) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jutils.c" +DEP_CPP_JUTIL=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + + +"$(INTDIR)\jutils.obj" : $(SOURCE) $(DEP_CPP_JUTIL) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jmemmgr.c" +DEP_CPP_JMEMM=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + "jmemsys.h"\ + + +"$(INTDIR)\jmemmgr.obj" : $(SOURCE) $(DEP_CPP_JMEMM) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE="jmemnobs.c" +DEP_CPP_JMEMN=\ + "jinclude.h"\ + "jconfig.h"\ + "jpeglib.h"\ + "jmorecfg.h"\ + "jpegint.h"\ + "jerror.h"\ + "jmemsys.h"\ + + +"$(INTDIR)\jmemnobs.obj" : $(SOURCE) $(DEP_CPP_JMEMN) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + + +# End Source File +# End Target +# End Project +################################################################################ + diff --git a/gtkmm-osx/jpeg-6b/makeproj.mac b/gtkmm-osx/jpeg-6b/makeproj.mac new file mode 100644 index 0000000..ed277c8 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/makeproj.mac @@ -0,0 +1,213 @@ +-- +-- makeproj.mac +-- +-- This AppleScript builds Code Warrior PRO Release 2 project files for the +-- libjpeg library as well as the test programs 'cjpeg', 'djpeg', 'jpegtran'. +-- (We'd distribute real project files, except they're not text +-- and would create maintenance headaches.) +-- +-- The script then compiles and links the library and the test programs. +-- NOTE: if you haven't already created a 'jconfig.h' file, the script +-- automatically copies 'jconfig.mac' to 'jconfig.h'. +-- +-- To use this script, you must have AppleScript 1.1 or later installed +-- and a suitable AppleScript editor like Script Editor or Script Debugger +-- (http://www.latenightsw.com). Open this file with your AppleScript +-- editor and execute the "run" command to build the projects. +-- +-- Thanks to Dan Sears and Don Agro for this script. +-- Questions about this script can be addressed to dogpark@interlog.com +-- + +on run + + choose folder with prompt ">>> Select IJG source folder <<<" + set ijg_folder to result + + choose folder with prompt ">>> Select MetroWerks folder <<<" + set cw_folder to result + + -- if jconfig.h doesn't already exist, copy jconfig.mac + + tell application "Finder" + if not (exists file "jconfig.h" of ijg_folder) then + duplicate {file "jconfig.mac" of folder ijg_folder} + select file "jconfig.mac copy" of folder ijg_folder + set name of selection to "jconfig.h" + end if + end tell + + tell application "CodeWarrior IDE 2.1" + with timeout of 10000 seconds + + -- create libjpeg project + + activate + Create Project (ijg_folder as string) & "libjpeg.proj" + Set Preferences of panel "Target Settings" to {Target Name:"libjpeg"} + Set Preferences of panel "PPC Project" to {File Name:"libjpeg"} + Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"} + Set Preferences of panel "PPC Project" to {Project Type:library} + Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true} + Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true} + Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC} + Set Preferences of panel "PPC Linker" to {Generate SYM File:false} + + Add Files (ijg_folder as string) & "jcapimin.c" To Segment 1 + Add Files (ijg_folder as string) & "jcapistd.c" To Segment 1 + Add Files (ijg_folder as string) & "jctrans.c" To Segment 1 + Add Files (ijg_folder as string) & "jcparam.c" To Segment 1 + Add Files (ijg_folder as string) & "jdatadst.c" To Segment 1 + Add Files (ijg_folder as string) & "jcinit.c" To Segment 1 + Add Files (ijg_folder as string) & "jcmaster.c" To Segment 1 + Add Files (ijg_folder as string) & "jcmarker.c" To Segment 1 + Add Files (ijg_folder as string) & "jcmainct.c" To Segment 1 + Add Files (ijg_folder as string) & "jcprepct.c" To Segment 1 + Add Files (ijg_folder as string) & "jccoefct.c" To Segment 1 + Add Files (ijg_folder as string) & "jccolor.c" To Segment 1 + Add Files (ijg_folder as string) & "jcsample.c" To Segment 1 + Add Files (ijg_folder as string) & "jchuff.c" To Segment 1 + Add Files (ijg_folder as string) & "jcphuff.c" To Segment 1 + Add Files (ijg_folder as string) & "jcdctmgr.c" To Segment 1 + Add Files (ijg_folder as string) & "jfdctfst.c" To Segment 1 + Add Files (ijg_folder as string) & "jfdctflt.c" To Segment 1 + Add Files (ijg_folder as string) & "jfdctint.c" To Segment 1 + Add Files (ijg_folder as string) & "jdapimin.c" To Segment 1 + Add Files (ijg_folder as string) & "jdapistd.c" To Segment 1 + Add Files (ijg_folder as string) & "jdtrans.c" To Segment 1 + Add Files (ijg_folder as string) & "jdatasrc.c" To Segment 1 + Add Files (ijg_folder as string) & "jdmaster.c" To Segment 1 + Add Files (ijg_folder as string) & "jdinput.c" To Segment 1 + Add Files (ijg_folder as string) & "jdmarker.c" To Segment 1 + Add Files (ijg_folder as string) & "jdhuff.c" To Segment 1 + Add Files (ijg_folder as string) & "jdphuff.c" To Segment 1 + Add Files (ijg_folder as string) & "jdmainct.c" To Segment 1 + Add Files (ijg_folder as string) & "jdcoefct.c" To Segment 1 + Add Files (ijg_folder as string) & "jdpostct.c" To Segment 1 + Add Files (ijg_folder as string) & "jddctmgr.c" To Segment 1 + Add Files (ijg_folder as string) & "jidctfst.c" To Segment 1 + Add Files (ijg_folder as string) & "jidctflt.c" To Segment 1 + Add Files (ijg_folder as string) & "jidctint.c" To Segment 1 + Add Files (ijg_folder as string) & "jidctred.c" To Segment 1 + Add Files (ijg_folder as string) & "jdsample.c" To Segment 1 + Add Files (ijg_folder as string) & "jdcolor.c" To Segment 1 + Add Files (ijg_folder as string) & "jquant1.c" To Segment 1 + Add Files (ijg_folder as string) & "jquant2.c" To Segment 1 + Add Files (ijg_folder as string) & "jdmerge.c" To Segment 1 + Add Files (ijg_folder as string) & "jcomapi.c" To Segment 1 + Add Files (ijg_folder as string) & "jutils.c" To Segment 1 + Add Files (ijg_folder as string) & "jerror.c" To Segment 1 + Add Files (ijg_folder as string) & "jmemmgr.c" To Segment 1 + Add Files (ijg_folder as string) & "jmemmac.c" To Segment 1 + + -- compile and link the library + + Make Project + Close Project + + -- create cjpeg project + + activate + Create Project (ijg_folder as string) & "cjpeg.proj" + Set Preferences of panel "Target Settings" to {Target Name:"cjpeg"} + Set Preferences of panel "PPC Project" to {File Name:"cjpeg"} + Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"} + Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true} + Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true} + Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC} + Set Preferences of panel "PPC Linker" to {Generate SYM File:false} + + Add Files (ijg_folder as string) & "cjpeg.c" To Segment 1 + Add Files (ijg_folder as string) & "rdppm.c" To Segment 1 + Add Files (ijg_folder as string) & "rdgif.c" To Segment 1 + Add Files (ijg_folder as string) & "rdtarga.c" To Segment 1 + Add Files (ijg_folder as string) & "rdrle.c" To Segment 1 + Add Files (ijg_folder as string) & "rdbmp.c" To Segment 1 + Add Files (ijg_folder as string) & "rdswitch.c" To Segment 1 + Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1 + + Add Files (ijg_folder as string) & "libjpeg" To Segment 2 + + Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3 + Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3 + Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3 + + Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4 + Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4 + + -- compile and link cjpeg + + Make Project + Close Project + + -- create djpeg project + + activate + Create Project (ijg_folder as string) & "djpeg.proj" + Set Preferences of panel "Target Settings" to {Target Name:"djpeg"} + Set Preferences of panel "PPC Project" to {File Name:"djpeg"} + Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"} + Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true} + Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true} + Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC} + Set Preferences of panel "PPC Linker" to {Generate SYM File:false} + + Add Files (ijg_folder as string) & "djpeg.c" To Segment 1 + Add Files (ijg_folder as string) & "wrppm.c" To Segment 1 + Add Files (ijg_folder as string) & "wrgif.c" To Segment 1 + Add Files (ijg_folder as string) & "wrtarga.c" To Segment 1 + Add Files (ijg_folder as string) & "wrrle.c" To Segment 1 + Add Files (ijg_folder as string) & "wrbmp.c" To Segment 1 + Add Files (ijg_folder as string) & "rdcolmap.c" To Segment 1 + Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1 + + Add Files (ijg_folder as string) & "libjpeg" To Segment 2 + + Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3 + Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3 + Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3 + + Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4 + Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4 + + -- compile and link djpeg + + Make Project + Close Project + + -- create jpegtran project + + activate + Create Project (ijg_folder as string) & "jpegtran.proj" + Set Preferences of panel "Target Settings" to {Target Name:"jpegtran"} + Set Preferences of panel "PPC Project" to {File Name:"jpegtran"} + Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"} + Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true} + Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true} + Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC} + Set Preferences of panel "PPC Linker" to {Generate SYM File:false} + + Add Files (ijg_folder as string) & "jpegtran.c" To Segment 1 + Add Files (ijg_folder as string) & "rdswitch.c" To Segment 1 + Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1 + Add Files (ijg_folder as string) & "transupp.c" To Segment 1 + + Add Files (ijg_folder as string) & "libjpeg" To Segment 2 + + Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3 + Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3 + Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3 + + Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4 + Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4 + + -- compile and link jpegtran + + Make Project + Close Project + + quit + + end timeout + end tell +end run diff --git a/gtkmm-osx/jpeg-6b/makljpeg.st b/gtkmm-osx/jpeg-6b/makljpeg.st new file mode 100644 index 0000000..813493e --- /dev/null +++ b/gtkmm-osx/jpeg-6b/makljpeg.st @@ -0,0 +1,70 @@ +; Project file for Independent JPEG Group's software +; +; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. +; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de), +; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de), +; and Guido Vollbeding (guivol@esc.de). +; +; To use this file, rename it to libjpeg.prj. +; Read installation instructions before trying to make the program! +; +; +; * * * Output file * * * +libjpeg.lib +; +; * * * COMPILER OPTIONS * * * +.C[-P] ; absolute calls +.C[-M] ; and no string merging, folks +.C[-w-cln] ; no "constant is long" warnings +.C[-w-par] ; no "parameter xxxx unused" +.C[-w-rch] ; no "unreachable code" +.C[-wsig] ; warn if significant digits may be lost +.L[-J] ; link new Obj-format (so we get a library) += +; * * * * List of modules * * * * +jcapimin.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jcapistd.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jccoefct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jccolor.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jcdctmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) +jchuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jchuff.h) +jcinit.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jcmainct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jcmarker.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jcmaster.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jcomapi.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jcparam.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jcphuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jchuff.h) +jcprepct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jcsample.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jctrans.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdapimin.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdapistd.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdatadst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h) +jdatasrc.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h) +jdcoefct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdcolor.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jddctmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) +jdhuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdhuff.h) +jdinput.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdmainct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdmarker.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdmaster.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdmerge.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdphuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdhuff.h) +jdpostct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdsample.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdtrans.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jerror.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jversion.h,jerror.h) +jfdctflt.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) +jfdctfst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) +jfdctint.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) +jidctflt.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) +jidctfst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) +jidctint.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) +jidctred.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) +jquant1.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jquant2.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jutils.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jmemmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jmemsys.h) +jmemansi.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jmemsys.h) diff --git a/gtkmm-osx/jpeg-6b/maktjpeg.st b/gtkmm-osx/jpeg-6b/maktjpeg.st new file mode 100644 index 0000000..31f4d16 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/maktjpeg.st @@ -0,0 +1,32 @@ +; Project file for Independent JPEG Group's software +; +; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. +; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de), +; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de), +; and Guido Vollbeding (guivol@esc.de). +; +; To use this file, rename it to jpegtran.prj. +; If you are using Turbo C, change filenames beginning with "pc..." to "tc..." +; Read installation instructions before trying to make the program! +; +; +; * * * Output file * * * +jpegtran.ttp +; +; * * * COMPILER OPTIONS * * * +.C[-P] ; absolute calls +.C[-M] ; and no string merging, folks +.C[-w-cln] ; no "constant is long" warnings +.C[-w-par] ; no "parameter xxxx unused" +.C[-w-rch] ; no "unreachable code" +.C[-wsig] ; warn if significant digits may be lost += +; * * * * List of modules * * * * +pcstart.o +jpegtran.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,transupp.h,jversion.h) +cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +transupp.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,transupp.h) +libjpeg.lib ; built by libjpeg.prj +pcstdlib.lib ; standard library +pcextlib.lib ; extended library diff --git a/gtkmm-osx/jpeg-6b/makvms.opt b/gtkmm-osx/jpeg-6b/makvms.opt new file mode 100644 index 0000000..675e8fe --- /dev/null +++ b/gtkmm-osx/jpeg-6b/makvms.opt @@ -0,0 +1,4 @@ +! A pointer to the VAX/VMS C Run-Time Shareable Library. +! This file is needed by makefile.mms and makefile.vms, +! but only for the older VAX C compiler. DEC C does not need it. +Sys$Library:VAXCRTL.EXE /Share diff --git a/gtkmm-osx/jpeg-6b/rdbmp.c b/gtkmm-osx/jpeg-6b/rdbmp.c new file mode 100644 index 0000000..b05fe2a --- /dev/null +++ b/gtkmm-osx/jpeg-6b/rdbmp.c @@ -0,0 +1,439 @@ +/* + * rdbmp.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to read input images in Microsoft "BMP" + * format (MS Windows 3.x, OS/2 1.x, and OS/2 2.x flavors). + * Currently, only 8-bit and 24-bit images are supported, not 1-bit or + * 4-bit (feeding such low-depth images into JPEG would be silly anyway). + * Also, we don't support RLE-compressed files. + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume input from + * an ordinary stdio stream. They further assume that reading begins + * at the start of the file; start_input may need work if the + * user interface has already read some data (e.g., to determine that + * the file is indeed BMP format). + * + * This code contributed by James Arthur Boucher. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef BMP_SUPPORTED + + +/* Macros to deal with unsigned chars as efficiently as compiler allows */ + +#ifdef HAVE_UNSIGNED_CHAR +typedef unsigned char U_CHAR; +#define UCH(x) ((int) (x)) +#else /* !HAVE_UNSIGNED_CHAR */ +#ifdef CHAR_IS_UNSIGNED +typedef char U_CHAR; +#define UCH(x) ((int) (x)) +#else +typedef char U_CHAR; +#define UCH(x) ((int) (x) & 0xFF) +#endif +#endif /* HAVE_UNSIGNED_CHAR */ + + +#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len))) + + +/* Private version of data source object */ + +typedef struct _bmp_source_struct * bmp_source_ptr; + +typedef struct _bmp_source_struct { + struct cjpeg_source_struct pub; /* public fields */ + + j_compress_ptr cinfo; /* back link saves passing separate parm */ + + JSAMPARRAY colormap; /* BMP colormap (converted to my format) */ + + jvirt_sarray_ptr whole_image; /* Needed to reverse row order */ + JDIMENSION source_row; /* Current source row number */ + JDIMENSION row_width; /* Physical width of scanlines in file */ + + int bits_per_pixel; /* remembers 8- or 24-bit format */ +} bmp_source_struct; + + +LOCAL(int) +read_byte (bmp_source_ptr sinfo) +/* Read next byte from BMP file */ +{ + register FILE *infile = sinfo->pub.input_file; + register int c; + + if ((c = getc(infile)) == EOF) + ERREXIT(sinfo->cinfo, JERR_INPUT_EOF); + return c; +} + + +LOCAL(void) +read_colormap (bmp_source_ptr sinfo, int cmaplen, int mapentrysize) +/* Read the colormap from a BMP file */ +{ + int i; + + switch (mapentrysize) { + case 3: + /* BGR format (occurs in OS/2 files) */ + for (i = 0; i < cmaplen; i++) { + sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo); + sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo); + sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo); + } + break; + case 4: + /* BGR0 format (occurs in MS Windows files) */ + for (i = 0; i < cmaplen; i++) { + sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo); + sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo); + sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo); + (void) read_byte(sinfo); + } + break; + default: + ERREXIT(sinfo->cinfo, JERR_BMP_BADCMAP); + break; + } +} + + +/* + * Read one row of pixels. + * The image has been read into the whole_image array, but is otherwise + * unprocessed. We must read it out in top-to-bottom row order, and if + * it is an 8-bit image, we must expand colormapped pixels to 24bit format. + */ + +METHODDEF(JDIMENSION) +get_8bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 8-bit colormap indexes */ +{ + bmp_source_ptr source = (bmp_source_ptr) sinfo; + register JSAMPARRAY colormap = source->colormap; + JSAMPARRAY image_ptr; + register int t; + register JSAMPROW inptr, outptr; + register JDIMENSION col; + + /* Fetch next row from virtual array */ + source->source_row--; + image_ptr = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->whole_image, + source->source_row, (JDIMENSION) 1, FALSE); + + /* Expand the colormap indexes to real data */ + inptr = image_ptr[0]; + outptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + t = GETJSAMPLE(*inptr++); + *outptr++ = colormap[0][t]; /* can omit GETJSAMPLE() safely */ + *outptr++ = colormap[1][t]; + *outptr++ = colormap[2][t]; + } + + return 1; +} + + +METHODDEF(JDIMENSION) +get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 24-bit pixels */ +{ + bmp_source_ptr source = (bmp_source_ptr) sinfo; + JSAMPARRAY image_ptr; + register JSAMPROW inptr, outptr; + register JDIMENSION col; + + /* Fetch next row from virtual array */ + source->source_row--; + image_ptr = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->whole_image, + source->source_row, (JDIMENSION) 1, FALSE); + + /* Transfer data. Note source values are in BGR order + * (even though Microsoft's own documents say the opposite). + */ + inptr = image_ptr[0]; + outptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + outptr[2] = *inptr++; /* can omit GETJSAMPLE() safely */ + outptr[1] = *inptr++; + outptr[0] = *inptr++; + outptr += 3; + } + + return 1; +} + + +/* + * This method loads the image into whole_image during the first call on + * get_pixel_rows. The get_pixel_rows pointer is then adjusted to call + * get_8bit_row or get_24bit_row on subsequent calls. + */ + +METHODDEF(JDIMENSION) +preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + bmp_source_ptr source = (bmp_source_ptr) sinfo; + register FILE *infile = source->pub.input_file; + register int c; + register JSAMPROW out_ptr; + JSAMPARRAY image_ptr; + JDIMENSION row, col; + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + + /* Read the data into a virtual array in input-file row order. */ + for (row = 0; row < cinfo->image_height; row++) { + if (progress != NULL) { + progress->pub.pass_counter = (long) row; + progress->pub.pass_limit = (long) cinfo->image_height; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } + image_ptr = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->whole_image, + row, (JDIMENSION) 1, TRUE); + out_ptr = image_ptr[0]; + for (col = source->row_width; col > 0; col--) { + /* inline copy of read_byte() for speed */ + if ((c = getc(infile)) == EOF) + ERREXIT(cinfo, JERR_INPUT_EOF); + *out_ptr++ = (JSAMPLE) c; + } + } + if (progress != NULL) + progress->completed_extra_passes++; + + /* Set up to read from the virtual array in top-to-bottom order */ + switch (source->bits_per_pixel) { + case 8: + source->pub.get_pixel_rows = get_8bit_row; + break; + case 24: + source->pub.get_pixel_rows = get_24bit_row; + break; + default: + ERREXIT(cinfo, JERR_BMP_BADDEPTH); + } + source->source_row = cinfo->image_height; + + /* And read the first row */ + return (*source->pub.get_pixel_rows) (cinfo, sinfo); +} + + +/* + * Read the file header; return image size and component count. + */ + +METHODDEF(void) +start_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + bmp_source_ptr source = (bmp_source_ptr) sinfo; + U_CHAR bmpfileheader[14]; + U_CHAR bmpinfoheader[64]; +#define GET_2B(array,offset) ((unsigned int) UCH(array[offset]) + \ + (((unsigned int) UCH(array[offset+1])) << 8)) +#define GET_4B(array,offset) ((INT32) UCH(array[offset]) + \ + (((INT32) UCH(array[offset+1])) << 8) + \ + (((INT32) UCH(array[offset+2])) << 16) + \ + (((INT32) UCH(array[offset+3])) << 24)) + INT32 bfOffBits; + INT32 headerSize; + INT32 biWidth = 0; /* initialize to avoid compiler warning */ + INT32 biHeight = 0; + unsigned int biPlanes; + INT32 biCompression; + INT32 biXPelsPerMeter,biYPelsPerMeter; + INT32 biClrUsed = 0; + int mapentrysize = 0; /* 0 indicates no colormap */ + INT32 bPad; + JDIMENSION row_width; + + /* Read and verify the bitmap file header */ + if (! ReadOK(source->pub.input_file, bmpfileheader, 14)) + ERREXIT(cinfo, JERR_INPUT_EOF); + if (GET_2B(bmpfileheader,0) != 0x4D42) /* 'BM' */ + ERREXIT(cinfo, JERR_BMP_NOT); + bfOffBits = (INT32) GET_4B(bmpfileheader,10); + /* We ignore the remaining fileheader fields */ + + /* The infoheader might be 12 bytes (OS/2 1.x), 40 bytes (Windows), + * or 64 bytes (OS/2 2.x). Check the first 4 bytes to find out which. + */ + if (! ReadOK(source->pub.input_file, bmpinfoheader, 4)) + ERREXIT(cinfo, JERR_INPUT_EOF); + headerSize = (INT32) GET_4B(bmpinfoheader,0); + if (headerSize < 12 || headerSize > 64) + ERREXIT(cinfo, JERR_BMP_BADHEADER); + if (! ReadOK(source->pub.input_file, bmpinfoheader+4, headerSize-4)) + ERREXIT(cinfo, JERR_INPUT_EOF); + + switch ((int) headerSize) { + case 12: + /* Decode OS/2 1.x header (Microsoft calls this a BITMAPCOREHEADER) */ + biWidth = (INT32) GET_2B(bmpinfoheader,4); + biHeight = (INT32) GET_2B(bmpinfoheader,6); + biPlanes = GET_2B(bmpinfoheader,8); + source->bits_per_pixel = (int) GET_2B(bmpinfoheader,10); + + switch (source->bits_per_pixel) { + case 8: /* colormapped image */ + mapentrysize = 3; /* OS/2 uses RGBTRIPLE colormap */ + TRACEMS2(cinfo, 1, JTRC_BMP_OS2_MAPPED, (int) biWidth, (int) biHeight); + break; + case 24: /* RGB image */ + TRACEMS2(cinfo, 1, JTRC_BMP_OS2, (int) biWidth, (int) biHeight); + break; + default: + ERREXIT(cinfo, JERR_BMP_BADDEPTH); + break; + } + if (biPlanes != 1) + ERREXIT(cinfo, JERR_BMP_BADPLANES); + break; + case 40: + case 64: + /* Decode Windows 3.x header (Microsoft calls this a BITMAPINFOHEADER) */ + /* or OS/2 2.x header, which has additional fields that we ignore */ + biWidth = GET_4B(bmpinfoheader,4); + biHeight = GET_4B(bmpinfoheader,8); + biPlanes = GET_2B(bmpinfoheader,12); + source->bits_per_pixel = (int) GET_2B(bmpinfoheader,14); + biCompression = GET_4B(bmpinfoheader,16); + biXPelsPerMeter = GET_4B(bmpinfoheader,24); + biYPelsPerMeter = GET_4B(bmpinfoheader,28); + biClrUsed = GET_4B(bmpinfoheader,32); + /* biSizeImage, biClrImportant fields are ignored */ + + switch (source->bits_per_pixel) { + case 8: /* colormapped image */ + mapentrysize = 4; /* Windows uses RGBQUAD colormap */ + TRACEMS2(cinfo, 1, JTRC_BMP_MAPPED, (int) biWidth, (int) biHeight); + break; + case 24: /* RGB image */ + TRACEMS2(cinfo, 1, JTRC_BMP, (int) biWidth, (int) biHeight); + break; + default: + ERREXIT(cinfo, JERR_BMP_BADDEPTH); + break; + } + if (biPlanes != 1) + ERREXIT(cinfo, JERR_BMP_BADPLANES); + if (biCompression != 0) + ERREXIT(cinfo, JERR_BMP_COMPRESSED); + + if (biXPelsPerMeter > 0 && biYPelsPerMeter > 0) { + /* Set JFIF density parameters from the BMP data */ + cinfo->X_density = (UINT16) (biXPelsPerMeter/100); /* 100 cm per meter */ + cinfo->Y_density = (UINT16) (biYPelsPerMeter/100); + cinfo->density_unit = 2; /* dots/cm */ + } + break; + default: + ERREXIT(cinfo, JERR_BMP_BADHEADER); + break; + } + + /* Compute distance to bitmap data --- will adjust for colormap below */ + bPad = bfOffBits - (headerSize + 14); + + /* Read the colormap, if any */ + if (mapentrysize > 0) { + if (biClrUsed <= 0) + biClrUsed = 256; /* assume it's 256 */ + else if (biClrUsed > 256) + ERREXIT(cinfo, JERR_BMP_BADCMAP); + /* Allocate space to store the colormap */ + source->colormap = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) biClrUsed, (JDIMENSION) 3); + /* and read it from the file */ + read_colormap(source, (int) biClrUsed, mapentrysize); + /* account for size of colormap */ + bPad -= biClrUsed * mapentrysize; + } + + /* Skip any remaining pad bytes */ + if (bPad < 0) /* incorrect bfOffBits value? */ + ERREXIT(cinfo, JERR_BMP_BADHEADER); + while (--bPad >= 0) { + (void) read_byte(source); + } + + /* Compute row width in file, including padding to 4-byte boundary */ + if (source->bits_per_pixel == 24) + row_width = (JDIMENSION) (biWidth * 3); + else + row_width = (JDIMENSION) biWidth; + while ((row_width & 3) != 0) row_width++; + source->row_width = row_width; + + /* Allocate space for inversion array, prepare for preload pass */ + source->whole_image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + row_width, (JDIMENSION) biHeight, (JDIMENSION) 1); + source->pub.get_pixel_rows = preload_image; + if (cinfo->progress != NULL) { + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + progress->total_extra_passes++; /* count file input as separate pass */ + } + + /* Allocate one-row buffer for returned data */ + source->pub.buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) (biWidth * 3), (JDIMENSION) 1); + source->pub.buffer_height = 1; + + cinfo->in_color_space = JCS_RGB; + cinfo->input_components = 3; + cinfo->data_precision = 8; + cinfo->image_width = (JDIMENSION) biWidth; + cinfo->image_height = (JDIMENSION) biHeight; +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + /* no work */ +} + + +/* + * The module selection routine for BMP format input. + */ + +GLOBAL(cjpeg_source_ptr) +jinit_read_bmp (j_compress_ptr cinfo) +{ + bmp_source_ptr source; + + /* Create module interface object */ + source = (bmp_source_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(bmp_source_struct)); + source->cinfo = cinfo; /* make back link for subroutines */ + /* Fill in method ptrs, except get_pixel_rows which start_input sets */ + source->pub.start_input = start_input_bmp; + source->pub.finish_input = finish_input_bmp; + + return (cjpeg_source_ptr) source; +} + +#endif /* BMP_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/rdcolmap.c b/gtkmm-osx/jpeg-6b/rdcolmap.c new file mode 100644 index 0000000..42b3437 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/rdcolmap.c @@ -0,0 +1,253 @@ +/* + * rdcolmap.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file implements djpeg's "-map file" switch. It reads a source image + * and constructs a colormap to be supplied to the JPEG decompressor. + * + * Currently, these file formats are supported for the map file: + * GIF: the contents of the GIF's global colormap are used. + * PPM (either text or raw flavor): the entire file is read and + * each unique pixel value is entered in the map. + * Note that reading a large PPM file will be horrendously slow. + * Typically, a PPM-format map file should contain just one pixel + * of each desired color. Such a file can be extracted from an + * ordinary image PPM file with ppmtomap(1). + * + * Rescaling a PPM that has a maxval unequal to MAXJSAMPLE is not + * currently implemented. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef QUANT_2PASS_SUPPORTED /* otherwise can't quantize to supplied map */ + +/* Portions of this code are based on the PBMPLUS library, which is: +** +** Copyright (C) 1988 by Jef Poskanzer. +** +** Permission to use, copy, modify, and distribute this software and its +** documentation for any purpose and without fee is hereby granted, provided +** that the above copyright notice appear in all copies and that both that +** copyright notice and this permission notice appear in supporting +** documentation. This software is provided "as is" without express or +** implied warranty. +*/ + + +/* + * Add a (potentially) new color to the color map. + */ + +LOCAL(void) +add_map_entry (j_decompress_ptr cinfo, int R, int G, int B) +{ + JSAMPROW colormap0 = cinfo->colormap[0]; + JSAMPROW colormap1 = cinfo->colormap[1]; + JSAMPROW colormap2 = cinfo->colormap[2]; + int ncolors = cinfo->actual_number_of_colors; + int index; + + /* Check for duplicate color. */ + for (index = 0; index < ncolors; index++) { + if (GETJSAMPLE(colormap0[index]) == R && + GETJSAMPLE(colormap1[index]) == G && + GETJSAMPLE(colormap2[index]) == B) + return; /* color is already in map */ + } + + /* Check for map overflow. */ + if (ncolors >= (MAXJSAMPLE+1)) + ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, (MAXJSAMPLE+1)); + + /* OK, add color to map. */ + colormap0[ncolors] = (JSAMPLE) R; + colormap1[ncolors] = (JSAMPLE) G; + colormap2[ncolors] = (JSAMPLE) B; + cinfo->actual_number_of_colors++; +} + + +/* + * Extract color map from a GIF file. + */ + +LOCAL(void) +read_gif_map (j_decompress_ptr cinfo, FILE * infile) +{ + int header[13]; + int i, colormaplen; + int R, G, B; + + /* Initial 'G' has already been read by read_color_map */ + /* Read the rest of the GIF header and logical screen descriptor */ + for (i = 1; i < 13; i++) { + if ((header[i] = getc(infile)) == EOF) + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + } + + /* Verify GIF Header */ + if (header[1] != 'I' || header[2] != 'F') + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + + /* There must be a global color map. */ + if ((header[10] & 0x80) == 0) + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + + /* OK, fetch it. */ + colormaplen = 2 << (header[10] & 0x07); + + for (i = 0; i < colormaplen; i++) { + R = getc(infile); + G = getc(infile); + B = getc(infile); + if (R == EOF || G == EOF || B == EOF) + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + add_map_entry(cinfo, + R << (BITS_IN_JSAMPLE-8), + G << (BITS_IN_JSAMPLE-8), + B << (BITS_IN_JSAMPLE-8)); + } +} + + +/* Support routines for reading PPM */ + + +LOCAL(int) +pbm_getc (FILE * infile) +/* Read next char, skipping over any comments */ +/* A comment/newline sequence is returned as a newline */ +{ + register int ch; + + ch = getc(infile); + if (ch == '#') { + do { + ch = getc(infile); + } while (ch != '\n' && ch != EOF); + } + return ch; +} + + +LOCAL(unsigned int) +read_pbm_integer (j_decompress_ptr cinfo, FILE * infile) +/* Read an unsigned decimal integer from the PPM file */ +/* Swallows one trailing character after the integer */ +/* Note that on a 16-bit-int machine, only values up to 64k can be read. */ +/* This should not be a problem in practice. */ +{ + register int ch; + register unsigned int val; + + /* Skip any leading whitespace */ + do { + ch = pbm_getc(infile); + if (ch == EOF) + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'); + + if (ch < '0' || ch > '9') + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + + val = ch - '0'; + while ((ch = pbm_getc(infile)) >= '0' && ch <= '9') { + val *= 10; + val += ch - '0'; + } + return val; +} + + +/* + * Extract color map from a PPM file. + */ + +LOCAL(void) +read_ppm_map (j_decompress_ptr cinfo, FILE * infile) +{ + int c; + unsigned int w, h, maxval, row, col; + int R, G, B; + + /* Initial 'P' has already been read by read_color_map */ + c = getc(infile); /* save format discriminator for a sec */ + + /* while we fetch the remaining header info */ + w = read_pbm_integer(cinfo, infile); + h = read_pbm_integer(cinfo, infile); + maxval = read_pbm_integer(cinfo, infile); + + if (w <= 0 || h <= 0 || maxval <= 0) /* error check */ + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + + /* For now, we don't support rescaling from an unusual maxval. */ + if (maxval != (unsigned int) MAXJSAMPLE) + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + + switch (c) { + case '3': /* it's a text-format PPM file */ + for (row = 0; row < h; row++) { + for (col = 0; col < w; col++) { + R = read_pbm_integer(cinfo, infile); + G = read_pbm_integer(cinfo, infile); + B = read_pbm_integer(cinfo, infile); + add_map_entry(cinfo, R, G, B); + } + } + break; + + case '6': /* it's a raw-format PPM file */ + for (row = 0; row < h; row++) { + for (col = 0; col < w; col++) { + R = getc(infile); + G = getc(infile); + B = getc(infile); + if (R == EOF || G == EOF || B == EOF) + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + add_map_entry(cinfo, R, G, B); + } + } + break; + + default: + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + break; + } +} + + +/* + * Main entry point from djpeg.c. + * Input: opened input file (from file name argument on command line). + * Output: colormap and actual_number_of_colors fields are set in cinfo. + */ + +GLOBAL(void) +read_color_map (j_decompress_ptr cinfo, FILE * infile) +{ + /* Allocate space for a color map of maximum supported size. */ + cinfo->colormap = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) (MAXJSAMPLE+1), (JDIMENSION) 3); + cinfo->actual_number_of_colors = 0; /* initialize map to empty */ + + /* Read first byte to determine file format */ + switch (getc(infile)) { + case 'G': + read_gif_map(cinfo, infile); + break; + case 'P': + read_ppm_map(cinfo, infile); + break; + default: + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + break; + } +} + +#endif /* QUANT_2PASS_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/rdgif.c b/gtkmm-osx/jpeg-6b/rdgif.c new file mode 100644 index 0000000..b27c167 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/rdgif.c @@ -0,0 +1,38 @@ +/* + * rdgif.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to read input images in GIF format. + * + ***************************************************************************** + * NOTE: to avoid entanglements with Unisys' patent on LZW compression, * + * the ability to read GIF files has been removed from the IJG distribution. * + * Sorry about that. * + ***************************************************************************** + * + * We are required to state that + * "The Graphics Interchange Format(c) is the Copyright property of + * CompuServe Incorporated. GIF(sm) is a Service Mark property of + * CompuServe Incorporated." + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef GIF_SUPPORTED + +/* + * The module selection routine for GIF format input. + */ + +GLOBAL(cjpeg_source_ptr) +jinit_read_gif (j_compress_ptr cinfo) +{ + fprintf(stderr, "GIF input is unsupported for legal reasons. Sorry.\n"); + exit(EXIT_FAILURE); + return NULL; /* keep compiler happy */ +} + +#endif /* GIF_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/rdjpgcom.1 b/gtkmm-osx/jpeg-6b/rdjpgcom.1 new file mode 100644 index 0000000..2bba04e --- /dev/null +++ b/gtkmm-osx/jpeg-6b/rdjpgcom.1 @@ -0,0 +1,54 @@ +.TH RDJPGCOM 1 "11 October 1997" +.SH NAME +rdjpgcom \- display text comments from a JPEG file +.SH SYNOPSIS +.B rdjpgcom +[ +.B \-verbose +] +[ +.I filename +] +.LP +.SH DESCRIPTION +.LP +.B rdjpgcom +reads the named JPEG/JFIF file, or the standard input if no file is named, +and prints any text comments found in the file on the standard output. +.PP +The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. +Although the standard doesn't actually define what COM blocks are for, they +are widely used to hold user-supplied text strings. This lets you add +annotations, titles, index terms, etc to your JPEG files, and later retrieve +them as text. COM blocks do not interfere with the image stored in the JPEG +file. The maximum size of a COM block is 64K, but you can have as many of +them as you like in one JPEG file. +.SH OPTIONS +.TP +.B \-verbose +Causes +.B rdjpgcom +to also display the JPEG image dimensions. +.PP +Switch names may be abbreviated, and are not case sensitive. +.SH HINTS +.B rdjpgcom +does not depend on the IJG JPEG library. Its source code is intended as an +illustration of the minimum amount of code required to parse a JPEG file +header correctly. +.PP +In +.B \-verbose +mode, +.B rdjpgcom +will also attempt to print the contents of any "APP12" markers as text. +Some digital cameras produce APP12 markers containing useful textual +information. If you like, you can modify the source code to print +other APPn marker types as well. +.SH SEE ALSO +.BR cjpeg (1), +.BR djpeg (1), +.BR jpegtran (1), +.BR wrjpgcom (1) +.SH AUTHOR +Independent JPEG Group diff --git a/gtkmm-osx/jpeg-6b/rdjpgcom.c b/gtkmm-osx/jpeg-6b/rdjpgcom.c new file mode 100644 index 0000000..ffe6fc6 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/rdjpgcom.c @@ -0,0 +1,496 @@ +/* + * rdjpgcom.c + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a very simple stand-alone application that displays + * the text in COM (comment) markers in a JFIF file. + * This may be useful as an example of the minimum logic needed to parse + * JPEG markers. + */ + +#define JPEG_CJPEG_DJPEG /* to get the command-line config symbols */ +#include "jinclude.h" /* get auto-config symbols, */ + +#include /* to declare isupper(), tolower() */ +#ifdef USE_SETMODE +#include /* to declare setmode()'s parameter macros */ +/* If you have setmode() but not , just delete this line: */ +#include /* to declare setmode() */ +#endif + +#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ +#ifdef __MWERKS__ +#include /* Metrowerks needs this */ +#include /* ... and this */ +#endif +#ifdef THINK_C +#include /* Think declares it here */ +#endif +#endif + +#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ +#define READ_BINARY "r" +#else +#ifdef VMS /* VMS is very nonstandard */ +#define READ_BINARY "rb", "ctx=stm" +#else /* standard ANSI-compliant case */ +#define READ_BINARY "rb" +#endif +#endif + +#ifndef EXIT_FAILURE /* define exit() codes if not provided */ +#define EXIT_FAILURE 1 +#endif +#ifndef EXIT_SUCCESS +#ifdef VMS +#define EXIT_SUCCESS 1 /* VMS is very nonstandard */ +#else +#define EXIT_SUCCESS 0 +#endif +#endif + + +/* + * These macros are used to read the input file. + * To reuse this code in another application, you might need to change these. + */ + +static FILE * infile; /* input JPEG file */ + +/* Return next input byte, or EOF if no more */ +#define NEXTBYTE() getc(infile) + + +/* Error exit handler */ +#define ERREXIT(msg) (fprintf(stderr, "%s\n", msg), exit(EXIT_FAILURE)) + + +/* Read one byte, testing for EOF */ +static int +read_1_byte (void) +{ + int c; + + c = NEXTBYTE(); + if (c == EOF) + ERREXIT("Premature EOF in JPEG file"); + return c; +} + +/* Read 2 bytes, convert to unsigned int */ +/* All 2-byte quantities in JPEG markers are MSB first */ +static unsigned int +read_2_bytes (void) +{ + int c1, c2; + + c1 = NEXTBYTE(); + if (c1 == EOF) + ERREXIT("Premature EOF in JPEG file"); + c2 = NEXTBYTE(); + if (c2 == EOF) + ERREXIT("Premature EOF in JPEG file"); + return (((unsigned int) c1) << 8) + ((unsigned int) c2); +} + + +/* + * JPEG markers consist of one or more 0xFF bytes, followed by a marker + * code byte (which is not an FF). Here are the marker codes of interest + * in this program. (See jdmarker.c for a more complete list.) + */ + +#define M_SOF0 0xC0 /* Start Of Frame N */ +#define M_SOF1 0xC1 /* N indicates which compression process */ +#define M_SOF2 0xC2 /* Only SOF0-SOF2 are now in common use */ +#define M_SOF3 0xC3 +#define M_SOF5 0xC5 /* NB: codes C4 and CC are NOT SOF markers */ +#define M_SOF6 0xC6 +#define M_SOF7 0xC7 +#define M_SOF9 0xC9 +#define M_SOF10 0xCA +#define M_SOF11 0xCB +#define M_SOF13 0xCD +#define M_SOF14 0xCE +#define M_SOF15 0xCF +#define M_SOI 0xD8 /* Start Of Image (beginning of datastream) */ +#define M_EOI 0xD9 /* End Of Image (end of datastream) */ +#define M_SOS 0xDA /* Start Of Scan (begins compressed data) */ +#define M_APP0 0xE0 /* Application-specific marker, type N */ +#define M_APP12 0xEC /* (we don't bother to list all 16 APPn's) */ +#define M_COM 0xFE /* COMment */ + + +/* + * Find the next JPEG marker and return its marker code. + * We expect at least one FF byte, possibly more if the compressor used FFs + * to pad the file. + * There could also be non-FF garbage between markers. The treatment of such + * garbage is unspecified; we choose to skip over it but emit a warning msg. + * NB: this routine must not be used after seeing SOS marker, since it will + * not deal correctly with FF/00 sequences in the compressed image data... + */ + +static int +next_marker (void) +{ + int c; + int discarded_bytes = 0; + + /* Find 0xFF byte; count and skip any non-FFs. */ + c = read_1_byte(); + while (c != 0xFF) { + discarded_bytes++; + c = read_1_byte(); + } + /* Get marker code byte, swallowing any duplicate FF bytes. Extra FFs + * are legal as pad bytes, so don't count them in discarded_bytes. + */ + do { + c = read_1_byte(); + } while (c == 0xFF); + + if (discarded_bytes != 0) { + fprintf(stderr, "Warning: garbage data found in JPEG file\n"); + } + + return c; +} + + +/* + * Read the initial marker, which should be SOI. + * For a JFIF file, the first two bytes of the file should be literally + * 0xFF M_SOI. To be more general, we could use next_marker, but if the + * input file weren't actually JPEG at all, next_marker might read the whole + * file and then return a misleading error message... + */ + +static int +first_marker (void) +{ + int c1, c2; + + c1 = NEXTBYTE(); + c2 = NEXTBYTE(); + if (c1 != 0xFF || c2 != M_SOI) + ERREXIT("Not a JPEG file"); + return c2; +} + + +/* + * Most types of marker are followed by a variable-length parameter segment. + * This routine skips over the parameters for any marker we don't otherwise + * want to process. + * Note that we MUST skip the parameter segment explicitly in order not to + * be fooled by 0xFF bytes that might appear within the parameter segment; + * such bytes do NOT introduce new markers. + */ + +static void +skip_variable (void) +/* Skip over an unknown or uninteresting variable-length marker */ +{ + unsigned int length; + + /* Get the marker parameter length count */ + length = read_2_bytes(); + /* Length includes itself, so must be at least 2 */ + if (length < 2) + ERREXIT("Erroneous JPEG marker length"); + length -= 2; + /* Skip over the remaining bytes */ + while (length > 0) { + (void) read_1_byte(); + length--; + } +} + + +/* + * Process a COM marker. + * We want to print out the marker contents as legible text; + * we must guard against non-text junk and varying newline representations. + */ + +static void +process_COM (void) +{ + unsigned int length; + int ch; + int lastch = 0; + + /* Get the marker parameter length count */ + length = read_2_bytes(); + /* Length includes itself, so must be at least 2 */ + if (length < 2) + ERREXIT("Erroneous JPEG marker length"); + length -= 2; + + while (length > 0) { + ch = read_1_byte(); + /* Emit the character in a readable form. + * Nonprintables are converted to \nnn form, + * while \ is converted to \\. + * Newlines in CR, CR/LF, or LF form will be printed as one newline. + */ + if (ch == '\r') { + printf("\n"); + } else if (ch == '\n') { + if (lastch != '\r') + printf("\n"); + } else if (ch == '\\') { + printf("\\\\"); + } else if (isprint(ch)) { + putc(ch, stdout); + } else { + printf("\\%03o", ch); + } + lastch = ch; + length--; + } + printf("\n"); +} + + +/* + * Process a SOFn marker. + * This code is only needed if you want to know the image dimensions... + */ + +static void +process_SOFn (int marker) +{ + unsigned int length; + unsigned int image_height, image_width; + int data_precision, num_components; + const char * process; + int ci; + + length = read_2_bytes(); /* usual parameter length count */ + + data_precision = read_1_byte(); + image_height = read_2_bytes(); + image_width = read_2_bytes(); + num_components = read_1_byte(); + + switch (marker) { + case M_SOF0: process = "Baseline"; break; + case M_SOF1: process = "Extended sequential"; break; + case M_SOF2: process = "Progressive"; break; + case M_SOF3: process = "Lossless"; break; + case M_SOF5: process = "Differential sequential"; break; + case M_SOF6: process = "Differential progressive"; break; + case M_SOF7: process = "Differential lossless"; break; + case M_SOF9: process = "Extended sequential, arithmetic coding"; break; + case M_SOF10: process = "Progressive, arithmetic coding"; break; + case M_SOF11: process = "Lossless, arithmetic coding"; break; + case M_SOF13: process = "Differential sequential, arithmetic coding"; break; + case M_SOF14: process = "Differential progressive, arithmetic coding"; break; + case M_SOF15: process = "Differential lossless, arithmetic coding"; break; + default: process = "Unknown"; break; + } + + printf("JPEG image is %uw * %uh, %d color components, %d bits per sample\n", + image_width, image_height, num_components, data_precision); + printf("JPEG process: %s\n", process); + + if (length != (unsigned int) (8 + num_components * 3)) + ERREXIT("Bogus SOF marker length"); + + for (ci = 0; ci < num_components; ci++) { + (void) read_1_byte(); /* Component ID code */ + (void) read_1_byte(); /* H, V sampling factors */ + (void) read_1_byte(); /* Quantization table number */ + } +} + + +/* + * Parse the marker stream until SOS or EOI is seen; + * display any COM markers. + * While the companion program wrjpgcom will always insert COM markers before + * SOFn, other implementations might not, so we scan to SOS before stopping. + * If we were only interested in the image dimensions, we would stop at SOFn. + * (Conversely, if we only cared about COM markers, there would be no need + * for special code to handle SOFn; we could treat it like other markers.) + */ + +static int +scan_JPEG_header (int verbose) +{ + int marker; + + /* Expect SOI at start of file */ + if (first_marker() != M_SOI) + ERREXIT("Expected SOI marker first"); + + /* Scan miscellaneous markers until we reach SOS. */ + for (;;) { + marker = next_marker(); + switch (marker) { + /* Note that marker codes 0xC4, 0xC8, 0xCC are not, and must not be, + * treated as SOFn. C4 in particular is actually DHT. + */ + case M_SOF0: /* Baseline */ + case M_SOF1: /* Extended sequential, Huffman */ + case M_SOF2: /* Progressive, Huffman */ + case M_SOF3: /* Lossless, Huffman */ + case M_SOF5: /* Differential sequential, Huffman */ + case M_SOF6: /* Differential progressive, Huffman */ + case M_SOF7: /* Differential lossless, Huffman */ + case M_SOF9: /* Extended sequential, arithmetic */ + case M_SOF10: /* Progressive, arithmetic */ + case M_SOF11: /* Lossless, arithmetic */ + case M_SOF13: /* Differential sequential, arithmetic */ + case M_SOF14: /* Differential progressive, arithmetic */ + case M_SOF15: /* Differential lossless, arithmetic */ + if (verbose) + process_SOFn(marker); + else + skip_variable(); + break; + + case M_SOS: /* stop before hitting compressed data */ + return marker; + + case M_EOI: /* in case it's a tables-only JPEG stream */ + return marker; + + case M_COM: + process_COM(); + break; + + case M_APP12: + /* Some digital camera makers put useful textual information into + * APP12 markers, so we print those out too when in -verbose mode. + */ + if (verbose) { + printf("APP12 contains:\n"); + process_COM(); + } else + skip_variable(); + break; + + default: /* Anything else just gets skipped */ + skip_variable(); /* we assume it has a parameter count... */ + break; + } + } /* end loop */ +} + + +/* Command line parsing code */ + +static const char * progname; /* program name for error messages */ + + +static void +usage (void) +/* complain about bad command line */ +{ + fprintf(stderr, "rdjpgcom displays any textual comments in a JPEG file.\n"); + + fprintf(stderr, "Usage: %s [switches] [inputfile]\n", progname); + + fprintf(stderr, "Switches (names may be abbreviated):\n"); + fprintf(stderr, " -verbose Also display dimensions of JPEG image\n"); + + exit(EXIT_FAILURE); +} + + +static int +keymatch (char * arg, const char * keyword, int minchars) +/* Case-insensitive matching of (possibly abbreviated) keyword switches. */ +/* keyword is the constant keyword (must be lower case already), */ +/* minchars is length of minimum legal abbreviation. */ +{ + register int ca, ck; + register int nmatched = 0; + + while ((ca = *arg++) != '\0') { + if ((ck = *keyword++) == '\0') + return 0; /* arg longer than keyword, no good */ + if (isupper(ca)) /* force arg to lcase (assume ck is already) */ + ca = tolower(ca); + if (ca != ck) + return 0; /* no good */ + nmatched++; /* count matched characters */ + } + /* reached end of argument; fail if it's too short for unique abbrev */ + if (nmatched < minchars) + return 0; + return 1; /* A-OK */ +} + + +/* + * The main program. + */ + +int +main (int argc, char **argv) +{ + int argn; + char * arg; + int verbose = 0; + + /* On Mac, fetch a command line. */ +#ifdef USE_CCOMMAND + argc = ccommand(&argv); +#endif + + progname = argv[0]; + if (progname == NULL || progname[0] == 0) + progname = "rdjpgcom"; /* in case C library doesn't provide it */ + + /* Parse switches, if any */ + for (argn = 1; argn < argc; argn++) { + arg = argv[argn]; + if (arg[0] != '-') + break; /* not switch, must be file name */ + arg++; /* advance over '-' */ + if (keymatch(arg, "verbose", 1)) { + verbose++; + } else + usage(); + } + + /* Open the input file. */ + /* Unix style: expect zero or one file name */ + if (argn < argc-1) { + fprintf(stderr, "%s: only one input file\n", progname); + usage(); + } + if (argn < argc) { + if ((infile = fopen(argv[argn], READ_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); + exit(EXIT_FAILURE); + } + } else { + /* default input file is stdin */ +#ifdef USE_SETMODE /* need to hack file mode? */ + setmode(fileno(stdin), O_BINARY); +#endif +#ifdef USE_FDOPEN /* need to re-open in binary mode? */ + if ((infile = fdopen(fileno(stdin), READ_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open stdin\n", progname); + exit(EXIT_FAILURE); + } +#else + infile = stdin; +#endif + } + + /* Scan the JPEG headers. */ + (void) scan_JPEG_header(verbose); + + /* All done. */ + exit(EXIT_SUCCESS); + return 0; /* suppress no-return-value warnings */ +} diff --git a/gtkmm-osx/jpeg-6b/rdppm.c b/gtkmm-osx/jpeg-6b/rdppm.c new file mode 100644 index 0000000..1df35c1 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/rdppm.c @@ -0,0 +1,458 @@ +/* + * rdppm.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to read input images in PPM/PGM format. + * The extended 2-byte-per-sample raw PPM/PGM formats are supported. + * The PBMPLUS library is NOT required to compile this software + * (but it is highly useful as a set of PPM image manipulation programs). + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume input from + * an ordinary stdio stream. They further assume that reading begins + * at the start of the file; start_input may need work if the + * user interface has already read some data (e.g., to determine that + * the file is indeed PPM format). + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef PPM_SUPPORTED + + +/* Portions of this code are based on the PBMPLUS library, which is: +** +** Copyright (C) 1988 by Jef Poskanzer. +** +** Permission to use, copy, modify, and distribute this software and its +** documentation for any purpose and without fee is hereby granted, provided +** that the above copyright notice appear in all copies and that both that +** copyright notice and this permission notice appear in supporting +** documentation. This software is provided "as is" without express or +** implied warranty. +*/ + + +/* Macros to deal with unsigned chars as efficiently as compiler allows */ + +#ifdef HAVE_UNSIGNED_CHAR +typedef unsigned char U_CHAR; +#define UCH(x) ((int) (x)) +#else /* !HAVE_UNSIGNED_CHAR */ +#ifdef CHAR_IS_UNSIGNED +typedef char U_CHAR; +#define UCH(x) ((int) (x)) +#else +typedef char U_CHAR; +#define UCH(x) ((int) (x) & 0xFF) +#endif +#endif /* HAVE_UNSIGNED_CHAR */ + + +#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len))) + + +/* + * On most systems, reading individual bytes with getc() is drastically less + * efficient than buffering a row at a time with fread(). On PCs, we must + * allocate the buffer in near data space, because we are assuming small-data + * memory model, wherein fread() can't reach far memory. If you need to + * process very wide images on a PC, you might have to compile in large-memory + * model, or else replace fread() with a getc() loop --- which will be much + * slower. + */ + + +/* Private version of data source object */ + +typedef struct { + struct cjpeg_source_struct pub; /* public fields */ + + U_CHAR *iobuffer; /* non-FAR pointer to I/O buffer */ + JSAMPROW pixrow; /* FAR pointer to same */ + size_t buffer_width; /* width of I/O buffer */ + JSAMPLE *rescale; /* => maxval-remapping array, or NULL */ +} ppm_source_struct; + +typedef ppm_source_struct * ppm_source_ptr; + + +LOCAL(int) +pbm_getc (FILE * infile) +/* Read next char, skipping over any comments */ +/* A comment/newline sequence is returned as a newline */ +{ + register int ch; + + ch = getc(infile); + if (ch == '#') { + do { + ch = getc(infile); + } while (ch != '\n' && ch != EOF); + } + return ch; +} + + +LOCAL(unsigned int) +read_pbm_integer (j_compress_ptr cinfo, FILE * infile) +/* Read an unsigned decimal integer from the PPM file */ +/* Swallows one trailing character after the integer */ +/* Note that on a 16-bit-int machine, only values up to 64k can be read. */ +/* This should not be a problem in practice. */ +{ + register int ch; + register unsigned int val; + + /* Skip any leading whitespace */ + do { + ch = pbm_getc(infile); + if (ch == EOF) + ERREXIT(cinfo, JERR_INPUT_EOF); + } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'); + + if (ch < '0' || ch > '9') + ERREXIT(cinfo, JERR_PPM_NONNUMERIC); + + val = ch - '0'; + while ((ch = pbm_getc(infile)) >= '0' && ch <= '9') { + val *= 10; + val += ch - '0'; + } + return val; +} + + +/* + * Read one row of pixels. + * + * We provide several different versions depending on input file format. + * In all cases, input is scaled to the size of JSAMPLE. + * + * A really fast path is provided for reading byte/sample raw files with + * maxval = MAXJSAMPLE, which is the normal case for 8-bit data. + */ + + +METHODDEF(JDIMENSION) +get_text_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading text-format PGM files with any maxval */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + FILE * infile = source->pub.input_file; + register JSAMPROW ptr; + register JSAMPLE *rescale = source->rescale; + JDIMENSION col; + + ptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + *ptr++ = rescale[read_pbm_integer(cinfo, infile)]; + } + return 1; +} + + +METHODDEF(JDIMENSION) +get_text_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading text-format PPM files with any maxval */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + FILE * infile = source->pub.input_file; + register JSAMPROW ptr; + register JSAMPLE *rescale = source->rescale; + JDIMENSION col; + + ptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + *ptr++ = rescale[read_pbm_integer(cinfo, infile)]; + *ptr++ = rescale[read_pbm_integer(cinfo, infile)]; + *ptr++ = rescale[read_pbm_integer(cinfo, infile)]; + } + return 1; +} + + +METHODDEF(JDIMENSION) +get_scaled_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading raw-byte-format PGM files with any maxval */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + register JSAMPROW ptr; + register U_CHAR * bufferptr; + register JSAMPLE *rescale = source->rescale; + JDIMENSION col; + + if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) + ERREXIT(cinfo, JERR_INPUT_EOF); + ptr = source->pub.buffer[0]; + bufferptr = source->iobuffer; + for (col = cinfo->image_width; col > 0; col--) { + *ptr++ = rescale[UCH(*bufferptr++)]; + } + return 1; +} + + +METHODDEF(JDIMENSION) +get_scaled_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading raw-byte-format PPM files with any maxval */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + register JSAMPROW ptr; + register U_CHAR * bufferptr; + register JSAMPLE *rescale = source->rescale; + JDIMENSION col; + + if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) + ERREXIT(cinfo, JERR_INPUT_EOF); + ptr = source->pub.buffer[0]; + bufferptr = source->iobuffer; + for (col = cinfo->image_width; col > 0; col--) { + *ptr++ = rescale[UCH(*bufferptr++)]; + *ptr++ = rescale[UCH(*bufferptr++)]; + *ptr++ = rescale[UCH(*bufferptr++)]; + } + return 1; +} + + +METHODDEF(JDIMENSION) +get_raw_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading raw-byte-format files with maxval = MAXJSAMPLE. + * In this case we just read right into the JSAMPLE buffer! + * Note that same code works for PPM and PGM files. + */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + + if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) + ERREXIT(cinfo, JERR_INPUT_EOF); + return 1; +} + + +METHODDEF(JDIMENSION) +get_word_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading raw-word-format PGM files with any maxval */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + register JSAMPROW ptr; + register U_CHAR * bufferptr; + register JSAMPLE *rescale = source->rescale; + JDIMENSION col; + + if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) + ERREXIT(cinfo, JERR_INPUT_EOF); + ptr = source->pub.buffer[0]; + bufferptr = source->iobuffer; + for (col = cinfo->image_width; col > 0; col--) { + register int temp; + temp = UCH(*bufferptr++); + temp |= UCH(*bufferptr++) << 8; + *ptr++ = rescale[temp]; + } + return 1; +} + + +METHODDEF(JDIMENSION) +get_word_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading raw-word-format PPM files with any maxval */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + register JSAMPROW ptr; + register U_CHAR * bufferptr; + register JSAMPLE *rescale = source->rescale; + JDIMENSION col; + + if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) + ERREXIT(cinfo, JERR_INPUT_EOF); + ptr = source->pub.buffer[0]; + bufferptr = source->iobuffer; + for (col = cinfo->image_width; col > 0; col--) { + register int temp; + temp = UCH(*bufferptr++); + temp |= UCH(*bufferptr++) << 8; + *ptr++ = rescale[temp]; + temp = UCH(*bufferptr++); + temp |= UCH(*bufferptr++) << 8; + *ptr++ = rescale[temp]; + temp = UCH(*bufferptr++); + temp |= UCH(*bufferptr++) << 8; + *ptr++ = rescale[temp]; + } + return 1; +} + + +/* + * Read the file header; return image size and component count. + */ + +METHODDEF(void) +start_input_ppm (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + int c; + unsigned int w, h, maxval; + boolean need_iobuffer, use_raw_buffer, need_rescale; + + if (getc(source->pub.input_file) != 'P') + ERREXIT(cinfo, JERR_PPM_NOT); + + c = getc(source->pub.input_file); /* subformat discriminator character */ + + /* detect unsupported variants (ie, PBM) before trying to read header */ + switch (c) { + case '2': /* it's a text-format PGM file */ + case '3': /* it's a text-format PPM file */ + case '5': /* it's a raw-format PGM file */ + case '6': /* it's a raw-format PPM file */ + break; + default: + ERREXIT(cinfo, JERR_PPM_NOT); + break; + } + + /* fetch the remaining header info */ + w = read_pbm_integer(cinfo, source->pub.input_file); + h = read_pbm_integer(cinfo, source->pub.input_file); + maxval = read_pbm_integer(cinfo, source->pub.input_file); + + if (w <= 0 || h <= 0 || maxval <= 0) /* error check */ + ERREXIT(cinfo, JERR_PPM_NOT); + + cinfo->data_precision = BITS_IN_JSAMPLE; /* we always rescale data to this */ + cinfo->image_width = (JDIMENSION) w; + cinfo->image_height = (JDIMENSION) h; + + /* initialize flags to most common settings */ + need_iobuffer = TRUE; /* do we need an I/O buffer? */ + use_raw_buffer = FALSE; /* do we map input buffer onto I/O buffer? */ + need_rescale = TRUE; /* do we need a rescale array? */ + + switch (c) { + case '2': /* it's a text-format PGM file */ + cinfo->input_components = 1; + cinfo->in_color_space = JCS_GRAYSCALE; + TRACEMS2(cinfo, 1, JTRC_PGM_TEXT, w, h); + source->pub.get_pixel_rows = get_text_gray_row; + need_iobuffer = FALSE; + break; + + case '3': /* it's a text-format PPM file */ + cinfo->input_components = 3; + cinfo->in_color_space = JCS_RGB; + TRACEMS2(cinfo, 1, JTRC_PPM_TEXT, w, h); + source->pub.get_pixel_rows = get_text_rgb_row; + need_iobuffer = FALSE; + break; + + case '5': /* it's a raw-format PGM file */ + cinfo->input_components = 1; + cinfo->in_color_space = JCS_GRAYSCALE; + TRACEMS2(cinfo, 1, JTRC_PGM, w, h); + if (maxval > 255) { + source->pub.get_pixel_rows = get_word_gray_row; + } else if (maxval == MAXJSAMPLE && SIZEOF(JSAMPLE) == SIZEOF(U_CHAR)) { + source->pub.get_pixel_rows = get_raw_row; + use_raw_buffer = TRUE; + need_rescale = FALSE; + } else { + source->pub.get_pixel_rows = get_scaled_gray_row; + } + break; + + case '6': /* it's a raw-format PPM file */ + cinfo->input_components = 3; + cinfo->in_color_space = JCS_RGB; + TRACEMS2(cinfo, 1, JTRC_PPM, w, h); + if (maxval > 255) { + source->pub.get_pixel_rows = get_word_rgb_row; + } else if (maxval == MAXJSAMPLE && SIZEOF(JSAMPLE) == SIZEOF(U_CHAR)) { + source->pub.get_pixel_rows = get_raw_row; + use_raw_buffer = TRUE; + need_rescale = FALSE; + } else { + source->pub.get_pixel_rows = get_scaled_rgb_row; + } + break; + } + + /* Allocate space for I/O buffer: 1 or 3 bytes or words/pixel. */ + if (need_iobuffer) { + source->buffer_width = (size_t) w * cinfo->input_components * + ((maxval<=255) ? SIZEOF(U_CHAR) : (2*SIZEOF(U_CHAR))); + source->iobuffer = (U_CHAR *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + source->buffer_width); + } + + /* Create compressor input buffer. */ + if (use_raw_buffer) { + /* For unscaled raw-input case, we can just map it onto the I/O buffer. */ + /* Synthesize a JSAMPARRAY pointer structure */ + /* Cast here implies near->far pointer conversion on PCs */ + source->pixrow = (JSAMPROW) source->iobuffer; + source->pub.buffer = & source->pixrow; + source->pub.buffer_height = 1; + } else { + /* Need to translate anyway, so make a separate sample buffer. */ + source->pub.buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) w * cinfo->input_components, (JDIMENSION) 1); + source->pub.buffer_height = 1; + } + + /* Compute the rescaling array if required. */ + if (need_rescale) { + INT32 val, half_maxval; + + /* On 16-bit-int machines we have to be careful of maxval = 65535 */ + source->rescale = (JSAMPLE *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (size_t) (((long) maxval + 1L) * SIZEOF(JSAMPLE))); + half_maxval = maxval / 2; + for (val = 0; val <= (INT32) maxval; val++) { + /* The multiplication here must be done in 32 bits to avoid overflow */ + source->rescale[val] = (JSAMPLE) ((val*MAXJSAMPLE + half_maxval)/maxval); + } + } +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_input_ppm (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + /* no work */ +} + + +/* + * The module selection routine for PPM format input. + */ + +GLOBAL(cjpeg_source_ptr) +jinit_read_ppm (j_compress_ptr cinfo) +{ + ppm_source_ptr source; + + /* Create module interface object */ + source = (ppm_source_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(ppm_source_struct)); + /* Fill in method ptrs, except get_pixel_rows which start_input sets */ + source->pub.start_input = start_input_ppm; + source->pub.finish_input = finish_input_ppm; + + return (cjpeg_source_ptr) source; +} + +#endif /* PPM_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/rdrle.c b/gtkmm-osx/jpeg-6b/rdrle.c new file mode 100644 index 0000000..542bc37 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/rdrle.c @@ -0,0 +1,387 @@ +/* + * rdrle.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to read input images in Utah RLE format. + * The Utah Raster Toolkit library is required (version 3.1 or later). + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume input from + * an ordinary stdio stream. They further assume that reading begins + * at the start of the file; start_input may need work if the + * user interface has already read some data (e.g., to determine that + * the file is indeed RLE format). + * + * Based on code contributed by Mike Lijewski, + * with updates from Robert Hutchinson. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef RLE_SUPPORTED + +/* rle.h is provided by the Utah Raster Toolkit. */ + +#include + +/* + * We assume that JSAMPLE has the same representation as rle_pixel, + * to wit, "unsigned char". Hence we can't cope with 12- or 16-bit samples. + */ + +#if BITS_IN_JSAMPLE != 8 + Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ +#endif + +/* + * We support the following types of RLE files: + * + * GRAYSCALE - 8 bits, no colormap + * MAPPEDGRAY - 8 bits, 1 channel colomap + * PSEUDOCOLOR - 8 bits, 3 channel colormap + * TRUECOLOR - 24 bits, 3 channel colormap + * DIRECTCOLOR - 24 bits, no colormap + * + * For now, we ignore any alpha channel in the image. + */ + +typedef enum + { GRAYSCALE, MAPPEDGRAY, PSEUDOCOLOR, TRUECOLOR, DIRECTCOLOR } rle_kind; + + +/* + * Since RLE stores scanlines bottom-to-top, we have to invert the image + * to conform to JPEG's top-to-bottom order. To do this, we read the + * incoming image into a virtual array on the first get_pixel_rows call, + * then fetch the required row from the virtual array on subsequent calls. + */ + +typedef struct _rle_source_struct * rle_source_ptr; + +typedef struct _rle_source_struct { + struct cjpeg_source_struct pub; /* public fields */ + + rle_kind visual; /* actual type of input file */ + jvirt_sarray_ptr image; /* virtual array to hold the image */ + JDIMENSION row; /* current row # in the virtual array */ + rle_hdr header; /* Input file information */ + rle_pixel** rle_row; /* holds a row returned by rle_getrow() */ + +} rle_source_struct; + + +/* + * Read the file header; return image size and component count. + */ + +METHODDEF(void) +start_input_rle (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + rle_source_ptr source = (rle_source_ptr) sinfo; + JDIMENSION width, height; +#ifdef PROGRESS_REPORT + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; +#endif + + /* Use RLE library routine to get the header info */ + source->header = *rle_hdr_init(NULL); + source->header.rle_file = source->pub.input_file; + switch (rle_get_setup(&(source->header))) { + case RLE_SUCCESS: + /* A-OK */ + break; + case RLE_NOT_RLE: + ERREXIT(cinfo, JERR_RLE_NOT); + break; + case RLE_NO_SPACE: + ERREXIT(cinfo, JERR_RLE_MEM); + break; + case RLE_EMPTY: + ERREXIT(cinfo, JERR_RLE_EMPTY); + break; + case RLE_EOF: + ERREXIT(cinfo, JERR_RLE_EOF); + break; + default: + ERREXIT(cinfo, JERR_RLE_BADERROR); + break; + } + + /* Figure out what we have, set private vars and return values accordingly */ + + width = source->header.xmax - source->header.xmin + 1; + height = source->header.ymax - source->header.ymin + 1; + source->header.xmin = 0; /* realign horizontally */ + source->header.xmax = width-1; + + cinfo->image_width = width; + cinfo->image_height = height; + cinfo->data_precision = 8; /* we can only handle 8 bit data */ + + if (source->header.ncolors == 1 && source->header.ncmap == 0) { + source->visual = GRAYSCALE; + TRACEMS2(cinfo, 1, JTRC_RLE_GRAY, width, height); + } else if (source->header.ncolors == 1 && source->header.ncmap == 1) { + source->visual = MAPPEDGRAY; + TRACEMS3(cinfo, 1, JTRC_RLE_MAPGRAY, width, height, + 1 << source->header.cmaplen); + } else if (source->header.ncolors == 1 && source->header.ncmap == 3) { + source->visual = PSEUDOCOLOR; + TRACEMS3(cinfo, 1, JTRC_RLE_MAPPED, width, height, + 1 << source->header.cmaplen); + } else if (source->header.ncolors == 3 && source->header.ncmap == 3) { + source->visual = TRUECOLOR; + TRACEMS3(cinfo, 1, JTRC_RLE_FULLMAP, width, height, + 1 << source->header.cmaplen); + } else if (source->header.ncolors == 3 && source->header.ncmap == 0) { + source->visual = DIRECTCOLOR; + TRACEMS2(cinfo, 1, JTRC_RLE, width, height); + } else + ERREXIT(cinfo, JERR_RLE_UNSUPPORTED); + + if (source->visual == GRAYSCALE || source->visual == MAPPEDGRAY) { + cinfo->in_color_space = JCS_GRAYSCALE; + cinfo->input_components = 1; + } else { + cinfo->in_color_space = JCS_RGB; + cinfo->input_components = 3; + } + + /* + * A place to hold each scanline while it's converted. + * (GRAYSCALE scanlines don't need converting) + */ + if (source->visual != GRAYSCALE) { + source->rle_row = (rle_pixel**) (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) width, (JDIMENSION) cinfo->input_components); + } + + /* request a virtual array to hold the image */ + source->image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + (JDIMENSION) (width * source->header.ncolors), + (JDIMENSION) height, (JDIMENSION) 1); + +#ifdef PROGRESS_REPORT + if (progress != NULL) { + /* count file input as separate pass */ + progress->total_extra_passes++; + } +#endif + + source->pub.buffer_height = 1; +} + + +/* + * Read one row of pixels. + * Called only after load_image has read the image into the virtual array. + * Used for GRAYSCALE, MAPPEDGRAY, TRUECOLOR, and DIRECTCOLOR images. + */ + +METHODDEF(JDIMENSION) +get_rle_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + rle_source_ptr source = (rle_source_ptr) sinfo; + + source->row--; + source->pub.buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE); + + return 1; +} + +/* + * Read one row of pixels. + * Called only after load_image has read the image into the virtual array. + * Used for PSEUDOCOLOR images. + */ + +METHODDEF(JDIMENSION) +get_pseudocolor_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + rle_source_ptr source = (rle_source_ptr) sinfo; + JSAMPROW src_row, dest_row; + JDIMENSION col; + rle_map *colormap; + int val; + + colormap = source->header.cmap; + dest_row = source->pub.buffer[0]; + source->row--; + src_row = * (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE); + + for (col = cinfo->image_width; col > 0; col--) { + val = GETJSAMPLE(*src_row++); + *dest_row++ = (JSAMPLE) (colormap[val ] >> 8); + *dest_row++ = (JSAMPLE) (colormap[val + 256] >> 8); + *dest_row++ = (JSAMPLE) (colormap[val + 512] >> 8); + } + + return 1; +} + + +/* + * Load the image into a virtual array. We have to do this because RLE + * files start at the lower left while the JPEG standard has them starting + * in the upper left. This is called the first time we want to get a row + * of input. What we do is load the RLE data into the array and then call + * the appropriate routine to read one row from the array. Before returning, + * we set source->pub.get_pixel_rows so that subsequent calls go straight to + * the appropriate row-reading routine. + */ + +METHODDEF(JDIMENSION) +load_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + rle_source_ptr source = (rle_source_ptr) sinfo; + JDIMENSION row, col; + JSAMPROW scanline, red_ptr, green_ptr, blue_ptr; + rle_pixel **rle_row; + rle_map *colormap; + char channel; +#ifdef PROGRESS_REPORT + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; +#endif + + colormap = source->header.cmap; + rle_row = source->rle_row; + + /* Read the RLE data into our virtual array. + * We assume here that (a) rle_pixel is represented the same as JSAMPLE, + * and (b) we are not on a machine where FAR pointers differ from regular. + */ + RLE_CLR_BIT(source->header, RLE_ALPHA); /* don't read the alpha channel */ + +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_limit = cinfo->image_height; + progress->pub.pass_counter = 0; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + + switch (source->visual) { + + case GRAYSCALE: + case PSEUDOCOLOR: + for (row = 0; row < cinfo->image_height; row++) { + rle_row = (rle_pixel **) (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); + rle_getrow(&source->header, rle_row); +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_counter++; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + } + break; + + case MAPPEDGRAY: + case TRUECOLOR: + for (row = 0; row < cinfo->image_height; row++) { + scanline = * (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); + rle_row = source->rle_row; + rle_getrow(&source->header, rle_row); + + for (col = 0; col < cinfo->image_width; col++) { + for (channel = 0; channel < source->header.ncolors; channel++) { + *scanline++ = (JSAMPLE) + (colormap[GETJSAMPLE(rle_row[channel][col]) + 256 * channel] >> 8); + } + } + +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_counter++; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + } + break; + + case DIRECTCOLOR: + for (row = 0; row < cinfo->image_height; row++) { + scanline = * (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); + rle_getrow(&source->header, rle_row); + + red_ptr = rle_row[0]; + green_ptr = rle_row[1]; + blue_ptr = rle_row[2]; + + for (col = cinfo->image_width; col > 0; col--) { + *scanline++ = *red_ptr++; + *scanline++ = *green_ptr++; + *scanline++ = *blue_ptr++; + } + +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_counter++; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + } + } + +#ifdef PROGRESS_REPORT + if (progress != NULL) + progress->completed_extra_passes++; +#endif + + /* Set up to call proper row-extraction routine in future */ + if (source->visual == PSEUDOCOLOR) { + source->pub.buffer = source->rle_row; + source->pub.get_pixel_rows = get_pseudocolor_row; + } else { + source->pub.get_pixel_rows = get_rle_row; + } + source->row = cinfo->image_height; + + /* And fetch the topmost (bottommost) row */ + return (*source->pub.get_pixel_rows) (cinfo, sinfo); +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_input_rle (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + /* no work */ +} + + +/* + * The module selection routine for RLE format input. + */ + +GLOBAL(cjpeg_source_ptr) +jinit_read_rle (j_compress_ptr cinfo) +{ + rle_source_ptr source; + + /* Create module interface object */ + source = (rle_source_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(rle_source_struct)); + /* Fill in method ptrs */ + source->pub.start_input = start_input_rle; + source->pub.finish_input = finish_input_rle; + source->pub.get_pixel_rows = load_image; + + return (cjpeg_source_ptr) source; +} + +#endif /* RLE_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/rdswitch.c b/gtkmm-osx/jpeg-6b/rdswitch.c new file mode 100644 index 0000000..4f4bb4f --- /dev/null +++ b/gtkmm-osx/jpeg-6b/rdswitch.c @@ -0,0 +1,332 @@ +/* + * rdswitch.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to process some of cjpeg's more complicated + * command-line switches. Switches processed here are: + * -qtables file Read quantization tables from text file + * -scans file Read scan script from text file + * -qslots N[,N,...] Set component quantization table selectors + * -sample HxV[,HxV,...] Set component sampling factors + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ +#include /* to declare isdigit(), isspace() */ + + +LOCAL(int) +text_getc (FILE * file) +/* Read next char, skipping over any comments (# to end of line) */ +/* A comment/newline sequence is returned as a newline */ +{ + register int ch; + + ch = getc(file); + if (ch == '#') { + do { + ch = getc(file); + } while (ch != '\n' && ch != EOF); + } + return ch; +} + + +LOCAL(boolean) +read_text_integer (FILE * file, long * result, int * termchar) +/* Read an unsigned decimal integer from a file, store it in result */ +/* Reads one trailing character after the integer; returns it in termchar */ +{ + register int ch; + register long val; + + /* Skip any leading whitespace, detect EOF */ + do { + ch = text_getc(file); + if (ch == EOF) { + *termchar = ch; + return FALSE; + } + } while (isspace(ch)); + + if (! isdigit(ch)) { + *termchar = ch; + return FALSE; + } + + val = ch - '0'; + while ((ch = text_getc(file)) != EOF) { + if (! isdigit(ch)) + break; + val *= 10; + val += ch - '0'; + } + *result = val; + *termchar = ch; + return TRUE; +} + + +GLOBAL(boolean) +read_quant_tables (j_compress_ptr cinfo, char * filename, + int scale_factor, boolean force_baseline) +/* Read a set of quantization tables from the specified file. + * The file is plain ASCII text: decimal numbers with whitespace between. + * Comments preceded by '#' may be included in the file. + * There may be one to NUM_QUANT_TBLS tables in the file, each of 64 values. + * The tables are implicitly numbered 0,1,etc. + * NOTE: does not affect the qslots mapping, which will default to selecting + * table 0 for luminance (or primary) components, 1 for chrominance components. + * You must use -qslots if you want a different component->table mapping. + */ +{ + FILE * fp; + int tblno, i, termchar; + long val; + unsigned int table[DCTSIZE2]; + + if ((fp = fopen(filename, "r")) == NULL) { + fprintf(stderr, "Can't open table file %s\n", filename); + return FALSE; + } + tblno = 0; + + while (read_text_integer(fp, &val, &termchar)) { /* read 1st element of table */ + if (tblno >= NUM_QUANT_TBLS) { + fprintf(stderr, "Too many tables in file %s\n", filename); + fclose(fp); + return FALSE; + } + table[0] = (unsigned int) val; + for (i = 1; i < DCTSIZE2; i++) { + if (! read_text_integer(fp, &val, &termchar)) { + fprintf(stderr, "Invalid table data in file %s\n", filename); + fclose(fp); + return FALSE; + } + table[i] = (unsigned int) val; + } + jpeg_add_quant_table(cinfo, tblno, table, scale_factor, force_baseline); + tblno++; + } + + if (termchar != EOF) { + fprintf(stderr, "Non-numeric data in file %s\n", filename); + fclose(fp); + return FALSE; + } + + fclose(fp); + return TRUE; +} + + +#ifdef C_MULTISCAN_FILES_SUPPORTED + +LOCAL(boolean) +read_scan_integer (FILE * file, long * result, int * termchar) +/* Variant of read_text_integer that always looks for a non-space termchar; + * this simplifies parsing of punctuation in scan scripts. + */ +{ + register int ch; + + if (! read_text_integer(file, result, termchar)) + return FALSE; + ch = *termchar; + while (ch != EOF && isspace(ch)) + ch = text_getc(file); + if (isdigit(ch)) { /* oops, put it back */ + if (ungetc(ch, file) == EOF) + return FALSE; + ch = ' '; + } else { + /* Any separators other than ';' and ':' are ignored; + * this allows user to insert commas, etc, if desired. + */ + if (ch != EOF && ch != ';' && ch != ':') + ch = ' '; + } + *termchar = ch; + return TRUE; +} + + +GLOBAL(boolean) +read_scan_script (j_compress_ptr cinfo, char * filename) +/* Read a scan script from the specified text file. + * Each entry in the file defines one scan to be emitted. + * Entries are separated by semicolons ';'. + * An entry contains one to four component indexes, + * optionally followed by a colon ':' and four progressive-JPEG parameters. + * The component indexes denote which component(s) are to be transmitted + * in the current scan. The first component has index 0. + * Sequential JPEG is used if the progressive-JPEG parameters are omitted. + * The file is free format text: any whitespace may appear between numbers + * and the ':' and ';' punctuation marks. Also, other punctuation (such + * as commas or dashes) can be placed between numbers if desired. + * Comments preceded by '#' may be included in the file. + * Note: we do very little validity checking here; + * jcmaster.c will validate the script parameters. + */ +{ + FILE * fp; + int scanno, ncomps, termchar; + long val; + jpeg_scan_info * scanptr; +#define MAX_SCANS 100 /* quite arbitrary limit */ + jpeg_scan_info scans[MAX_SCANS]; + + if ((fp = fopen(filename, "r")) == NULL) { + fprintf(stderr, "Can't open scan definition file %s\n", filename); + return FALSE; + } + scanptr = scans; + scanno = 0; + + while (read_scan_integer(fp, &val, &termchar)) { + if (scanno >= MAX_SCANS) { + fprintf(stderr, "Too many scans defined in file %s\n", filename); + fclose(fp); + return FALSE; + } + scanptr->component_index[0] = (int) val; + ncomps = 1; + while (termchar == ' ') { + if (ncomps >= MAX_COMPS_IN_SCAN) { + fprintf(stderr, "Too many components in one scan in file %s\n", + filename); + fclose(fp); + return FALSE; + } + if (! read_scan_integer(fp, &val, &termchar)) + goto bogus; + scanptr->component_index[ncomps] = (int) val; + ncomps++; + } + scanptr->comps_in_scan = ncomps; + if (termchar == ':') { + if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ') + goto bogus; + scanptr->Ss = (int) val; + if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ') + goto bogus; + scanptr->Se = (int) val; + if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ') + goto bogus; + scanptr->Ah = (int) val; + if (! read_scan_integer(fp, &val, &termchar)) + goto bogus; + scanptr->Al = (int) val; + } else { + /* set non-progressive parameters */ + scanptr->Ss = 0; + scanptr->Se = DCTSIZE2-1; + scanptr->Ah = 0; + scanptr->Al = 0; + } + if (termchar != ';' && termchar != EOF) { +bogus: + fprintf(stderr, "Invalid scan entry format in file %s\n", filename); + fclose(fp); + return FALSE; + } + scanptr++, scanno++; + } + + if (termchar != EOF) { + fprintf(stderr, "Non-numeric data in file %s\n", filename); + fclose(fp); + return FALSE; + } + + if (scanno > 0) { + /* Stash completed scan list in cinfo structure. + * NOTE: for cjpeg's use, JPOOL_IMAGE is the right lifetime for this data, + * but if you want to compress multiple images you'd want JPOOL_PERMANENT. + */ + scanptr = (jpeg_scan_info *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + scanno * SIZEOF(jpeg_scan_info)); + MEMCOPY(scanptr, scans, scanno * SIZEOF(jpeg_scan_info)); + cinfo->scan_info = scanptr; + cinfo->num_scans = scanno; + } + + fclose(fp); + return TRUE; +} + +#endif /* C_MULTISCAN_FILES_SUPPORTED */ + + +GLOBAL(boolean) +set_quant_slots (j_compress_ptr cinfo, char *arg) +/* Process a quantization-table-selectors parameter string, of the form + * N[,N,...] + * If there are more components than parameters, the last value is replicated. + */ +{ + int val = 0; /* default table # */ + int ci; + char ch; + + for (ci = 0; ci < MAX_COMPONENTS; ci++) { + if (*arg) { + ch = ','; /* if not set by sscanf, will be ',' */ + if (sscanf(arg, "%d%c", &val, &ch) < 1) + return FALSE; + if (ch != ',') /* syntax check */ + return FALSE; + if (val < 0 || val >= NUM_QUANT_TBLS) { + fprintf(stderr, "JPEG quantization tables are numbered 0..%d\n", + NUM_QUANT_TBLS-1); + return FALSE; + } + cinfo->comp_info[ci].quant_tbl_no = val; + while (*arg && *arg++ != ',') /* advance to next segment of arg string */ + ; + } else { + /* reached end of parameter, set remaining components to last table */ + cinfo->comp_info[ci].quant_tbl_no = val; + } + } + return TRUE; +} + + +GLOBAL(boolean) +set_sample_factors (j_compress_ptr cinfo, char *arg) +/* Process a sample-factors parameter string, of the form + * HxV[,HxV,...] + * If there are more components than parameters, "1x1" is assumed for the rest. + */ +{ + int ci, val1, val2; + char ch1, ch2; + + for (ci = 0; ci < MAX_COMPONENTS; ci++) { + if (*arg) { + ch2 = ','; /* if not set by sscanf, will be ',' */ + if (sscanf(arg, "%d%c%d%c", &val1, &ch1, &val2, &ch2) < 3) + return FALSE; + if ((ch1 != 'x' && ch1 != 'X') || ch2 != ',') /* syntax check */ + return FALSE; + if (val1 <= 0 || val1 > 4 || val2 <= 0 || val2 > 4) { + fprintf(stderr, "JPEG sampling factors must be 1..4\n"); + return FALSE; + } + cinfo->comp_info[ci].h_samp_factor = val1; + cinfo->comp_info[ci].v_samp_factor = val2; + while (*arg && *arg++ != ',') /* advance to next segment of arg string */ + ; + } else { + /* reached end of parameter, set remaining components to 1x1 sampling */ + cinfo->comp_info[ci].h_samp_factor = 1; + cinfo->comp_info[ci].v_samp_factor = 1; + } + } + return TRUE; +} diff --git a/gtkmm-osx/jpeg-6b/rdtarga.c b/gtkmm-osx/jpeg-6b/rdtarga.c new file mode 100644 index 0000000..4c2cd26 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/rdtarga.c @@ -0,0 +1,500 @@ +/* + * rdtarga.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to read input images in Targa format. + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume input from + * an ordinary stdio stream. They further assume that reading begins + * at the start of the file; start_input may need work if the + * user interface has already read some data (e.g., to determine that + * the file is indeed Targa format). + * + * Based on code contributed by Lee Daniel Crocker. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef TARGA_SUPPORTED + + +/* Macros to deal with unsigned chars as efficiently as compiler allows */ + +#ifdef HAVE_UNSIGNED_CHAR +typedef unsigned char U_CHAR; +#define UCH(x) ((int) (x)) +#else /* !HAVE_UNSIGNED_CHAR */ +#ifdef CHAR_IS_UNSIGNED +typedef char U_CHAR; +#define UCH(x) ((int) (x)) +#else +typedef char U_CHAR; +#define UCH(x) ((int) (x) & 0xFF) +#endif +#endif /* HAVE_UNSIGNED_CHAR */ + + +#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len))) + + +/* Private version of data source object */ + +typedef struct _tga_source_struct * tga_source_ptr; + +typedef struct _tga_source_struct { + struct cjpeg_source_struct pub; /* public fields */ + + j_compress_ptr cinfo; /* back link saves passing separate parm */ + + JSAMPARRAY colormap; /* Targa colormap (converted to my format) */ + + jvirt_sarray_ptr whole_image; /* Needed if funny input row order */ + JDIMENSION current_row; /* Current logical row number to read */ + + /* Pointer to routine to extract next Targa pixel from input file */ + JMETHOD(void, read_pixel, (tga_source_ptr sinfo)); + + /* Result of read_pixel is delivered here: */ + U_CHAR tga_pixel[4]; + + int pixel_size; /* Bytes per Targa pixel (1 to 4) */ + + /* State info for reading RLE-coded pixels; both counts must be init to 0 */ + int block_count; /* # of pixels remaining in RLE block */ + int dup_pixel_count; /* # of times to duplicate previous pixel */ + + /* This saves the correct pixel-row-expansion method for preload_image */ + JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo, + cjpeg_source_ptr sinfo)); +} tga_source_struct; + + +/* For expanding 5-bit pixel values to 8-bit with best rounding */ + +static const UINT8 c5to8bits[32] = { + 0, 8, 16, 25, 33, 41, 49, 58, + 66, 74, 82, 90, 99, 107, 115, 123, + 132, 140, 148, 156, 165, 173, 181, 189, + 197, 206, 214, 222, 230, 239, 247, 255 +}; + + + +LOCAL(int) +read_byte (tga_source_ptr sinfo) +/* Read next byte from Targa file */ +{ + register FILE *infile = sinfo->pub.input_file; + register int c; + + if ((c = getc(infile)) == EOF) + ERREXIT(sinfo->cinfo, JERR_INPUT_EOF); + return c; +} + + +LOCAL(void) +read_colormap (tga_source_ptr sinfo, int cmaplen, int mapentrysize) +/* Read the colormap from a Targa file */ +{ + int i; + + /* Presently only handles 24-bit BGR format */ + if (mapentrysize != 24) + ERREXIT(sinfo->cinfo, JERR_TGA_BADCMAP); + + for (i = 0; i < cmaplen; i++) { + sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo); + sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo); + sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo); + } +} + + +/* + * read_pixel methods: get a single pixel from Targa file into tga_pixel[] + */ + +METHODDEF(void) +read_non_rle_pixel (tga_source_ptr sinfo) +/* Read one Targa pixel from the input file; no RLE expansion */ +{ + register FILE *infile = sinfo->pub.input_file; + register int i; + + for (i = 0; i < sinfo->pixel_size; i++) { + sinfo->tga_pixel[i] = (U_CHAR) getc(infile); + } +} + + +METHODDEF(void) +read_rle_pixel (tga_source_ptr sinfo) +/* Read one Targa pixel from the input file, expanding RLE data as needed */ +{ + register FILE *infile = sinfo->pub.input_file; + register int i; + + /* Duplicate previously read pixel? */ + if (sinfo->dup_pixel_count > 0) { + sinfo->dup_pixel_count--; + return; + } + + /* Time to read RLE block header? */ + if (--sinfo->block_count < 0) { /* decrement pixels remaining in block */ + i = read_byte(sinfo); + if (i & 0x80) { /* Start of duplicate-pixel block? */ + sinfo->dup_pixel_count = i & 0x7F; /* number of dups after this one */ + sinfo->block_count = 0; /* then read new block header */ + } else { + sinfo->block_count = i & 0x7F; /* number of pixels after this one */ + } + } + + /* Read next pixel */ + for (i = 0; i < sinfo->pixel_size; i++) { + sinfo->tga_pixel[i] = (U_CHAR) getc(infile); + } +} + + +/* + * Read one row of pixels. + * + * We provide several different versions depending on input file format. + */ + + +METHODDEF(JDIMENSION) +get_8bit_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 8-bit grayscale pixels */ +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + register JSAMPROW ptr; + register JDIMENSION col; + + ptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ + *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]); + } + return 1; +} + +METHODDEF(JDIMENSION) +get_8bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 8-bit colormap indexes */ +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + register int t; + register JSAMPROW ptr; + register JDIMENSION col; + register JSAMPARRAY colormap = source->colormap; + + ptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ + t = UCH(source->tga_pixel[0]); + *ptr++ = colormap[0][t]; + *ptr++ = colormap[1][t]; + *ptr++ = colormap[2][t]; + } + return 1; +} + +METHODDEF(JDIMENSION) +get_16bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 16-bit pixels */ +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + register int t; + register JSAMPROW ptr; + register JDIMENSION col; + + ptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ + t = UCH(source->tga_pixel[0]); + t += UCH(source->tga_pixel[1]) << 8; + /* We expand 5 bit data to 8 bit sample width. + * The format of the 16-bit (LSB first) input word is + * xRRRRRGGGGGBBBBB + */ + ptr[2] = (JSAMPLE) c5to8bits[t & 0x1F]; + t >>= 5; + ptr[1] = (JSAMPLE) c5to8bits[t & 0x1F]; + t >>= 5; + ptr[0] = (JSAMPLE) c5to8bits[t & 0x1F]; + ptr += 3; + } + return 1; +} + +METHODDEF(JDIMENSION) +get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 24-bit pixels */ +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + register JSAMPROW ptr; + register JDIMENSION col; + + ptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ + *ptr++ = (JSAMPLE) UCH(source->tga_pixel[2]); /* change BGR to RGB order */ + *ptr++ = (JSAMPLE) UCH(source->tga_pixel[1]); + *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]); + } + return 1; +} + +/* + * Targa also defines a 32-bit pixel format with order B,G,R,A. + * We presently ignore the attribute byte, so the code for reading + * these pixels is identical to the 24-bit routine above. + * This works because the actual pixel length is only known to read_pixel. + */ + +#define get_32bit_row get_24bit_row + + +/* + * This method is for re-reading the input data in standard top-down + * row order. The entire image has already been read into whole_image + * with proper conversion of pixel format, but it's in a funny row order. + */ + +METHODDEF(JDIMENSION) +get_memory_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + JDIMENSION source_row; + + /* Compute row of source that maps to current_row of normal order */ + /* For now, assume image is bottom-up and not interlaced. */ + /* NEEDS WORK to support interlaced images! */ + source_row = cinfo->image_height - source->current_row - 1; + + /* Fetch that row from virtual array */ + source->pub.buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->whole_image, + source_row, (JDIMENSION) 1, FALSE); + + source->current_row++; + return 1; +} + + +/* + * This method loads the image into whole_image during the first call on + * get_pixel_rows. The get_pixel_rows pointer is then adjusted to call + * get_memory_row on subsequent calls. + */ + +METHODDEF(JDIMENSION) +preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + JDIMENSION row; + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + + /* Read the data into a virtual array in input-file row order. */ + for (row = 0; row < cinfo->image_height; row++) { + if (progress != NULL) { + progress->pub.pass_counter = (long) row; + progress->pub.pass_limit = (long) cinfo->image_height; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } + source->pub.buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->whole_image, row, (JDIMENSION) 1, TRUE); + (*source->get_pixel_rows) (cinfo, sinfo); + } + if (progress != NULL) + progress->completed_extra_passes++; + + /* Set up to read from the virtual array in unscrambled order */ + source->pub.get_pixel_rows = get_memory_row; + source->current_row = 0; + /* And read the first row */ + return get_memory_row(cinfo, sinfo); +} + + +/* + * Read the file header; return image size and component count. + */ + +METHODDEF(void) +start_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + U_CHAR targaheader[18]; + int idlen, cmaptype, subtype, flags, interlace_type, components; + unsigned int width, height, maplen; + boolean is_bottom_up; + +#define GET_2B(offset) ((unsigned int) UCH(targaheader[offset]) + \ + (((unsigned int) UCH(targaheader[offset+1])) << 8)) + + if (! ReadOK(source->pub.input_file, targaheader, 18)) + ERREXIT(cinfo, JERR_INPUT_EOF); + + /* Pretend "15-bit" pixels are 16-bit --- we ignore attribute bit anyway */ + if (targaheader[16] == 15) + targaheader[16] = 16; + + idlen = UCH(targaheader[0]); + cmaptype = UCH(targaheader[1]); + subtype = UCH(targaheader[2]); + maplen = GET_2B(5); + width = GET_2B(12); + height = GET_2B(14); + source->pixel_size = UCH(targaheader[16]) >> 3; + flags = UCH(targaheader[17]); /* Image Descriptor byte */ + + is_bottom_up = ((flags & 0x20) == 0); /* bit 5 set => top-down */ + interlace_type = flags >> 6; /* bits 6/7 are interlace code */ + + if (cmaptype > 1 || /* cmaptype must be 0 or 1 */ + source->pixel_size < 1 || source->pixel_size > 4 || + (UCH(targaheader[16]) & 7) != 0 || /* bits/pixel must be multiple of 8 */ + interlace_type != 0) /* currently don't allow interlaced image */ + ERREXIT(cinfo, JERR_TGA_BADPARMS); + + if (subtype > 8) { + /* It's an RLE-coded file */ + source->read_pixel = read_rle_pixel; + source->block_count = source->dup_pixel_count = 0; + subtype -= 8; + } else { + /* Non-RLE file */ + source->read_pixel = read_non_rle_pixel; + } + + /* Now should have subtype 1, 2, or 3 */ + components = 3; /* until proven different */ + cinfo->in_color_space = JCS_RGB; + + switch (subtype) { + case 1: /* Colormapped image */ + if (source->pixel_size == 1 && cmaptype == 1) + source->get_pixel_rows = get_8bit_row; + else + ERREXIT(cinfo, JERR_TGA_BADPARMS); + TRACEMS2(cinfo, 1, JTRC_TGA_MAPPED, width, height); + break; + case 2: /* RGB image */ + switch (source->pixel_size) { + case 2: + source->get_pixel_rows = get_16bit_row; + break; + case 3: + source->get_pixel_rows = get_24bit_row; + break; + case 4: + source->get_pixel_rows = get_32bit_row; + break; + default: + ERREXIT(cinfo, JERR_TGA_BADPARMS); + break; + } + TRACEMS2(cinfo, 1, JTRC_TGA, width, height); + break; + case 3: /* Grayscale image */ + components = 1; + cinfo->in_color_space = JCS_GRAYSCALE; + if (source->pixel_size == 1) + source->get_pixel_rows = get_8bit_gray_row; + else + ERREXIT(cinfo, JERR_TGA_BADPARMS); + TRACEMS2(cinfo, 1, JTRC_TGA_GRAY, width, height); + break; + default: + ERREXIT(cinfo, JERR_TGA_BADPARMS); + break; + } + + if (is_bottom_up) { + /* Create a virtual array to buffer the upside-down image. */ + source->whole_image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + (JDIMENSION) width * components, (JDIMENSION) height, (JDIMENSION) 1); + if (cinfo->progress != NULL) { + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + progress->total_extra_passes++; /* count file input as separate pass */ + } + /* source->pub.buffer will point to the virtual array. */ + source->pub.buffer_height = 1; /* in case anyone looks at it */ + source->pub.get_pixel_rows = preload_image; + } else { + /* Don't need a virtual array, but do need a one-row input buffer. */ + source->whole_image = NULL; + source->pub.buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) width * components, (JDIMENSION) 1); + source->pub.buffer_height = 1; + source->pub.get_pixel_rows = source->get_pixel_rows; + } + + while (idlen--) /* Throw away ID field */ + (void) read_byte(source); + + if (maplen > 0) { + if (maplen > 256 || GET_2B(3) != 0) + ERREXIT(cinfo, JERR_TGA_BADCMAP); + /* Allocate space to store the colormap */ + source->colormap = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (JDIMENSION) maplen, (JDIMENSION) 3); + /* and read it from the file */ + read_colormap(source, (int) maplen, UCH(targaheader[7])); + } else { + if (cmaptype) /* but you promised a cmap! */ + ERREXIT(cinfo, JERR_TGA_BADPARMS); + source->colormap = NULL; + } + + cinfo->input_components = components; + cinfo->data_precision = 8; + cinfo->image_width = width; + cinfo->image_height = height; +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + /* no work */ +} + + +/* + * The module selection routine for Targa format input. + */ + +GLOBAL(cjpeg_source_ptr) +jinit_read_targa (j_compress_ptr cinfo) +{ + tga_source_ptr source; + + /* Create module interface object */ + source = (tga_source_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(tga_source_struct)); + source->cinfo = cinfo; /* make back link for subroutines */ + /* Fill in method ptrs, except get_pixel_rows which start_input sets */ + source->pub.start_input = start_input_tga; + source->pub.finish_input = finish_input_tga; + + return (cjpeg_source_ptr) source; +} + +#endif /* TARGA_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/structure.doc b/gtkmm-osx/jpeg-6b/structure.doc new file mode 100644 index 0000000..51c9def --- /dev/null +++ b/gtkmm-osx/jpeg-6b/structure.doc @@ -0,0 +1,948 @@ +IJG JPEG LIBRARY: SYSTEM ARCHITECTURE + +Copyright (C) 1991-1995, Thomas G. Lane. +This file is part of the Independent JPEG Group's software. +For conditions of distribution and use, see the accompanying README file. + + +This file provides an overview of the architecture of the IJG JPEG software; +that is, the functions of the various modules in the system and the interfaces +between modules. For more precise details about any data structure or calling +convention, see the include files and comments in the source code. + +We assume that the reader is already somewhat familiar with the JPEG standard. +The README file includes references for learning about JPEG. The file +libjpeg.doc describes the library from the viewpoint of an application +programmer using the library; it's best to read that file before this one. +Also, the file coderules.doc describes the coding style conventions we use. + +In this document, JPEG-specific terminology follows the JPEG standard: + A "component" means a color channel, e.g., Red or Luminance. + A "sample" is a single component value (i.e., one number in the image data). + A "coefficient" is a frequency coefficient (a DCT transform output number). + A "block" is an 8x8 group of samples or coefficients. + An "MCU" (minimum coded unit) is an interleaved set of blocks of size + determined by the sampling factors, or a single block in a + noninterleaved scan. +We do not use the terms "pixel" and "sample" interchangeably. When we say +pixel, we mean an element of the full-size image, while a sample is an element +of the downsampled image. Thus the number of samples may vary across +components while the number of pixels does not. (This terminology is not used +rigorously throughout the code, but it is used in places where confusion would +otherwise result.) + + +*** System features *** + +The IJG distribution contains two parts: + * A subroutine library for JPEG compression and decompression. + * cjpeg/djpeg, two sample applications that use the library to transform + JFIF JPEG files to and from several other image formats. +cjpeg/djpeg are of no great intellectual complexity: they merely add a simple +command-line user interface and I/O routines for several uncompressed image +formats. This document concentrates on the library itself. + +We desire the library to be capable of supporting all JPEG baseline, extended +sequential, and progressive DCT processes. Hierarchical processes are not +supported. + +The library does not support the lossless (spatial) JPEG process. Lossless +JPEG shares little or no code with lossy JPEG, and would normally be used +without the extensive pre- and post-processing provided by this library. +We feel that lossless JPEG is better handled by a separate library. + +Within these limits, any set of compression parameters allowed by the JPEG +spec should be readable for decompression. (We can be more restrictive about +what formats we can generate.) Although the system design allows for all +parameter values, some uncommon settings are not yet implemented and may +never be; nonintegral sampling ratios are the prime example. Furthermore, +we treat 8-bit vs. 12-bit data precision as a compile-time switch, not a +run-time option, because most machines can store 8-bit pixels much more +compactly than 12-bit. + +For legal reasons, JPEG arithmetic coding is not currently supported, but +extending the library to include it would be straightforward. + +By itself, the library handles only interchange JPEG datastreams --- in +particular the widely used JFIF file format. The library can be used by +surrounding code to process interchange or abbreviated JPEG datastreams that +are embedded in more complex file formats. (For example, libtiff uses this +library to implement JPEG compression within the TIFF file format.) + +The library includes a substantial amount of code that is not covered by the +JPEG standard but is necessary for typical applications of JPEG. These +functions preprocess the image before JPEG compression or postprocess it after +decompression. They include colorspace conversion, downsampling/upsampling, +and color quantization. This code can be omitted if not needed. + +A wide range of quality vs. speed tradeoffs are possible in JPEG processing, +and even more so in decompression postprocessing. The decompression library +provides multiple implementations that cover most of the useful tradeoffs, +ranging from very-high-quality down to fast-preview operation. On the +compression side we have generally not provided low-quality choices, since +compression is normally less time-critical. It should be understood that the +low-quality modes may not meet the JPEG standard's accuracy requirements; +nonetheless, they are useful for viewers. + + +*** Portability issues *** + +Portability is an essential requirement for the library. The key portability +issues that show up at the level of system architecture are: + +1. Memory usage. We want the code to be able to run on PC-class machines +with limited memory. Images should therefore be processed sequentially (in +strips), to avoid holding the whole image in memory at once. Where a +full-image buffer is necessary, we should be able to use either virtual memory +or temporary files. + +2. Near/far pointer distinction. To run efficiently on 80x86 machines, the +code should distinguish "small" objects (kept in near data space) from +"large" ones (kept in far data space). This is an annoying restriction, but +fortunately it does not impact code quality for less brain-damaged machines, +and the source code clutter turns out to be minimal with sufficient use of +pointer typedefs. + +3. Data precision. We assume that "char" is at least 8 bits, "short" and +"int" at least 16, "long" at least 32. The code will work fine with larger +data sizes, although memory may be used inefficiently in some cases. However, +the JPEG compressed datastream must ultimately appear on external storage as a +sequence of 8-bit bytes if it is to conform to the standard. This may pose a +problem on machines where char is wider than 8 bits. The library represents +compressed data as an array of values of typedef JOCTET. If no data type +exactly 8 bits wide is available, custom data source and data destination +modules must be written to unpack and pack the chosen JOCTET datatype into +8-bit external representation. + + +*** System overview *** + +The compressor and decompressor are each divided into two main sections: +the JPEG compressor or decompressor proper, and the preprocessing or +postprocessing functions. The interface between these two sections is the +image data that the official JPEG spec regards as its input or output: this +data is in the colorspace to be used for compression, and it is downsampled +to the sampling factors to be used. The preprocessing and postprocessing +steps are responsible for converting a normal image representation to or from +this form. (Those few applications that want to deal with YCbCr downsampled +data can skip the preprocessing or postprocessing step.) + +Looking more closely, the compressor library contains the following main +elements: + + Preprocessing: + * Color space conversion (e.g., RGB to YCbCr). + * Edge expansion and downsampling. Optionally, this step can do simple + smoothing --- this is often helpful for low-quality source data. + JPEG proper: + * MCU assembly, DCT, quantization. + * Entropy coding (sequential or progressive, Huffman or arithmetic). + +In addition to these modules we need overall control, marker generation, +and support code (memory management & error handling). There is also a +module responsible for physically writing the output data --- typically +this is just an interface to fwrite(), but some applications may need to +do something else with the data. + +The decompressor library contains the following main elements: + + JPEG proper: + * Entropy decoding (sequential or progressive, Huffman or arithmetic). + * Dequantization, inverse DCT, MCU disassembly. + Postprocessing: + * Upsampling. Optionally, this step may be able to do more general + rescaling of the image. + * Color space conversion (e.g., YCbCr to RGB). This step may also + provide gamma adjustment [ currently it does not ]. + * Optional color quantization (e.g., reduction to 256 colors). + * Optional color precision reduction (e.g., 24-bit to 15-bit color). + [This feature is not currently implemented.] + +We also need overall control, marker parsing, and a data source module. +The support code (memory management & error handling) can be shared with +the compression half of the library. + +There may be several implementations of each of these elements, particularly +in the decompressor, where a wide range of speed/quality tradeoffs is very +useful. It must be understood that some of the best speedups involve +merging adjacent steps in the pipeline. For example, upsampling, color space +conversion, and color quantization might all be done at once when using a +low-quality ordered-dither technique. The system architecture is designed to +allow such merging where appropriate. + + +Note: it is convenient to regard edge expansion (padding to block boundaries) +as a preprocessing/postprocessing function, even though the JPEG spec includes +it in compression/decompression. We do this because downsampling/upsampling +can be simplified a little if they work on padded data: it's not necessary to +have special cases at the right and bottom edges. Therefore the interface +buffer is always an integral number of blocks wide and high, and we expect +compression preprocessing to pad the source data properly. Padding will occur +only to the next block (8-sample) boundary. In an interleaved-scan situation, +additional dummy blocks may be used to fill out MCUs, but the MCU assembly and +disassembly logic will create or discard these blocks internally. (This is +advantageous for speed reasons, since we avoid DCTing the dummy blocks. +It also permits a small reduction in file size, because the compressor can +choose dummy block contents so as to minimize their size in compressed form. +Finally, it makes the interface buffer specification independent of whether +the file is actually interleaved or not.) Applications that wish to deal +directly with the downsampled data must provide similar buffering and padding +for odd-sized images. + + +*** Poor man's object-oriented programming *** + +It should be clear by now that we have a lot of quasi-independent processing +steps, many of which have several possible behaviors. To avoid cluttering the +code with lots of switch statements, we use a simple form of object-style +programming to separate out the different possibilities. + +For example, two different color quantization algorithms could be implemented +as two separate modules that present the same external interface; at runtime, +the calling code will access the proper module indirectly through an "object". + +We can get the limited features we need while staying within portable C. +The basic tool is a function pointer. An "object" is just a struct +containing one or more function pointer fields, each of which corresponds to +a method name in real object-oriented languages. During initialization we +fill in the function pointers with references to whichever module we have +determined we need to use in this run. Then invocation of the module is done +by indirecting through a function pointer; on most machines this is no more +expensive than a switch statement, which would be the only other way of +making the required run-time choice. The really significant benefit, of +course, is keeping the source code clean and well structured. + +We can also arrange to have private storage that varies between different +implementations of the same kind of object. We do this by making all the +module-specific object structs be separately allocated entities, which will +be accessed via pointers in the master compression or decompression struct. +The "public" fields or methods for a given kind of object are specified by +a commonly known struct. But a module's initialization code can allocate +a larger struct that contains the common struct as its first member, plus +additional private fields. With appropriate pointer casting, the module's +internal functions can access these private fields. (For a simple example, +see jdatadst.c, which implements the external interface specified by struct +jpeg_destination_mgr, but adds extra fields.) + +(Of course this would all be a lot easier if we were using C++, but we are +not yet prepared to assume that everyone has a C++ compiler.) + +An important benefit of this scheme is that it is easy to provide multiple +versions of any method, each tuned to a particular case. While a lot of +precalculation might be done to select an optimal implementation of a method, +the cost per invocation is constant. For example, the upsampling step might +have a "generic" method, plus one or more "hardwired" methods for the most +popular sampling factors; the hardwired methods would be faster because they'd +use straight-line code instead of for-loops. The cost to determine which +method to use is paid only once, at startup, and the selection criteria are +hidden from the callers of the method. + +This plan differs a little bit from usual object-oriented structures, in that +only one instance of each object class will exist during execution. The +reason for having the class structure is that on different runs we may create +different instances (choose to execute different modules). You can think of +the term "method" as denoting the common interface presented by a particular +set of interchangeable functions, and "object" as denoting a group of related +methods, or the total shared interface behavior of a group of modules. + + +*** Overall control structure *** + +We previously mentioned the need for overall control logic in the compression +and decompression libraries. In IJG implementations prior to v5, overall +control was mostly provided by "pipeline control" modules, which proved to be +large, unwieldy, and hard to understand. To improve the situation, the +control logic has been subdivided into multiple modules. The control modules +consist of: + +1. Master control for module selection and initialization. This has two +responsibilities: + + 1A. Startup initialization at the beginning of image processing. + The individual processing modules to be used in this run are selected + and given initialization calls. + + 1B. Per-pass control. This determines how many passes will be performed + and calls each active processing module to configure itself + appropriately at the beginning of each pass. End-of-pass processing, + where necessary, is also invoked from the master control module. + + Method selection is partially distributed, in that a particular processing + module may contain several possible implementations of a particular method, + which it will select among when given its initialization call. The master + control code need only be concerned with decisions that affect more than + one module. + +2. Data buffering control. A separate control module exists for each + inter-processing-step data buffer. This module is responsible for + invoking the processing steps that write or read that data buffer. + +Each buffer controller sees the world as follows: + +input data => processing step A => buffer => processing step B => output data + | | | + ------------------ controller ------------------ + +The controller knows the dataflow requirements of steps A and B: how much data +they want to accept in one chunk and how much they output in one chunk. Its +function is to manage its buffer and call A and B at the proper times. + +A data buffer control module may itself be viewed as a processing step by a +higher-level control module; thus the control modules form a binary tree with +elementary processing steps at the leaves of the tree. + +The control modules are objects. A considerable amount of flexibility can +be had by replacing implementations of a control module. For example: +* Merging of adjacent steps in the pipeline is done by replacing a control + module and its pair of processing-step modules with a single processing- + step module. (Hence the possible merges are determined by the tree of + control modules.) +* In some processing modes, a given interstep buffer need only be a "strip" + buffer large enough to accommodate the desired data chunk sizes. In other + modes, a full-image buffer is needed and several passes are required. + The control module determines which kind of buffer is used and manipulates + virtual array buffers as needed. One or both processing steps may be + unaware of the multi-pass behavior. + +In theory, we might be able to make all of the data buffer controllers +interchangeable and provide just one set of implementations for all. In +practice, each one contains considerable special-case processing for its +particular job. The buffer controller concept should be regarded as an +overall system structuring principle, not as a complete description of the +task performed by any one controller. + + +*** Compression object structure *** + +Here is a sketch of the logical structure of the JPEG compression library: + + |-- Colorspace conversion + |-- Preprocessing controller --| + | |-- Downsampling +Main controller --| + | |-- Forward DCT, quantize + |-- Coefficient controller --| + |-- Entropy encoding + +This sketch also describes the flow of control (subroutine calls) during +typical image data processing. Each of the components shown in the diagram is +an "object" which may have several different implementations available. One +or more source code files contain the actual implementation(s) of each object. + +The objects shown above are: + +* Main controller: buffer controller for the subsampled-data buffer, which + holds the preprocessed input data. This controller invokes preprocessing to + fill the subsampled-data buffer, and JPEG compression to empty it. There is + usually no need for a full-image buffer here; a strip buffer is adequate. + +* Preprocessing controller: buffer controller for the downsampling input data + buffer, which lies between colorspace conversion and downsampling. Note + that a unified conversion/downsampling module would probably replace this + controller entirely. + +* Colorspace conversion: converts application image data into the desired + JPEG color space; also changes the data from pixel-interleaved layout to + separate component planes. Processes one pixel row at a time. + +* Downsampling: performs reduction of chroma components as required. + Optionally may perform pixel-level smoothing as well. Processes a "row + group" at a time, where a row group is defined as Vmax pixel rows of each + component before downsampling, and Vk sample rows afterwards (remember Vk + differs across components). Some downsampling or smoothing algorithms may + require context rows above and below the current row group; the + preprocessing controller is responsible for supplying these rows via proper + buffering. The downsampler is responsible for edge expansion at the right + edge (i.e., extending each sample row to a multiple of 8 samples); but the + preprocessing controller is responsible for vertical edge expansion (i.e., + duplicating the bottom sample row as needed to make a multiple of 8 rows). + +* Coefficient controller: buffer controller for the DCT-coefficient data. + This controller handles MCU assembly, including insertion of dummy DCT + blocks when needed at the right or bottom edge. When performing + Huffman-code optimization or emitting a multiscan JPEG file, this + controller is responsible for buffering the full image. The equivalent of + one fully interleaved MCU row of subsampled data is processed per call, + even when the JPEG file is noninterleaved. + +* Forward DCT and quantization: Perform DCT, quantize, and emit coefficients. + Works on one or more DCT blocks at a time. (Note: the coefficients are now + emitted in normal array order, which the entropy encoder is expected to + convert to zigzag order as necessary. Prior versions of the IJG code did + the conversion to zigzag order within the quantization step.) + +* Entropy encoding: Perform Huffman or arithmetic entropy coding and emit the + coded data to the data destination module. Works on one MCU per call. + For progressive JPEG, the same DCT blocks are fed to the entropy coder + during each pass, and the coder must emit the appropriate subset of + coefficients. + +In addition to the above objects, the compression library includes these +objects: + +* Master control: determines the number of passes required, controls overall + and per-pass initialization of the other modules. + +* Marker writing: generates JPEG markers (except for RSTn, which is emitted + by the entropy encoder when needed). + +* Data destination manager: writes the output JPEG datastream to its final + destination (e.g., a file). The destination manager supplied with the + library knows how to write to a stdio stream; for other behaviors, the + surrounding application may provide its own destination manager. + +* Memory manager: allocates and releases memory, controls virtual arrays + (with backing store management, where required). + +* Error handler: performs formatting and output of error and trace messages; + determines handling of nonfatal errors. The surrounding application may + override some or all of this object's methods to change error handling. + +* Progress monitor: supports output of "percent-done" progress reports. + This object represents an optional callback to the surrounding application: + if wanted, it must be supplied by the application. + +The error handler, destination manager, and progress monitor objects are +defined as separate objects in order to simplify application-specific +customization of the JPEG library. A surrounding application may override +individual methods or supply its own all-new implementation of one of these +objects. The object interfaces for these objects are therefore treated as +part of the application interface of the library, whereas the other objects +are internal to the library. + +The error handler and memory manager are shared by JPEG compression and +decompression; the progress monitor, if used, may be shared as well. + + +*** Decompression object structure *** + +Here is a sketch of the logical structure of the JPEG decompression library: + + |-- Entropy decoding + |-- Coefficient controller --| + | |-- Dequantize, Inverse DCT +Main controller --| + | |-- Upsampling + |-- Postprocessing controller --| |-- Colorspace conversion + |-- Color quantization + |-- Color precision reduction + +As before, this diagram also represents typical control flow. The objects +shown are: + +* Main controller: buffer controller for the subsampled-data buffer, which + holds the output of JPEG decompression proper. This controller's primary + task is to feed the postprocessing procedure. Some upsampling algorithms + may require context rows above and below the current row group; when this + is true, the main controller is responsible for managing its buffer so as + to make context rows available. In the current design, the main buffer is + always a strip buffer; a full-image buffer is never required. + +* Coefficient controller: buffer controller for the DCT-coefficient data. + This controller handles MCU disassembly, including deletion of any dummy + DCT blocks at the right or bottom edge. When reading a multiscan JPEG + file, this controller is responsible for buffering the full image. + (Buffering DCT coefficients, rather than samples, is necessary to support + progressive JPEG.) The equivalent of one fully interleaved MCU row of + subsampled data is processed per call, even when the source JPEG file is + noninterleaved. + +* Entropy decoding: Read coded data from the data source module and perform + Huffman or arithmetic entropy decoding. Works on one MCU per call. + For progressive JPEG decoding, the coefficient controller supplies the prior + coefficients of each MCU (initially all zeroes), which the entropy decoder + modifies in each scan. + +* Dequantization and inverse DCT: like it says. Note that the coefficients + buffered by the coefficient controller have NOT been dequantized; we + merge dequantization and inverse DCT into a single step for speed reasons. + When scaled-down output is asked for, simplified DCT algorithms may be used + that emit only 1x1, 2x2, or 4x4 samples per DCT block, not the full 8x8. + Works on one DCT block at a time. + +* Postprocessing controller: buffer controller for the color quantization + input buffer, when quantization is in use. (Without quantization, this + controller just calls the upsampler.) For two-pass quantization, this + controller is responsible for buffering the full-image data. + +* Upsampling: restores chroma components to full size. (May support more + general output rescaling, too. Note that if undersized DCT outputs have + been emitted by the DCT module, this module must adjust so that properly + sized outputs are created.) Works on one row group at a time. This module + also calls the color conversion module, so its top level is effectively a + buffer controller for the upsampling->color conversion buffer. However, in + all but the highest-quality operating modes, upsampling and color + conversion are likely to be merged into a single step. + +* Colorspace conversion: convert from JPEG color space to output color space, + and change data layout from separate component planes to pixel-interleaved. + Works on one pixel row at a time. + +* Color quantization: reduce the data to colormapped form, using either an + externally specified colormap or an internally generated one. This module + is not used for full-color output. Works on one pixel row at a time; may + require two passes to generate a color map. Note that the output will + always be a single component representing colormap indexes. In the current + design, the output values are JSAMPLEs, so an 8-bit compilation cannot + quantize to more than 256 colors. This is unlikely to be a problem in + practice. + +* Color reduction: this module handles color precision reduction, e.g., + generating 15-bit color (5 bits/primary) from JPEG's 24-bit output. + Not quite clear yet how this should be handled... should we merge it with + colorspace conversion??? + +Note that some high-speed operating modes might condense the entire +postprocessing sequence to a single module (upsample, color convert, and +quantize in one step). + +In addition to the above objects, the decompression library includes these +objects: + +* Master control: determines the number of passes required, controls overall + and per-pass initialization of the other modules. This is subdivided into + input and output control: jdinput.c controls only input-side processing, + while jdmaster.c handles overall initialization and output-side control. + +* Marker reading: decodes JPEG markers (except for RSTn). + +* Data source manager: supplies the input JPEG datastream. The source + manager supplied with the library knows how to read from a stdio stream; + for other behaviors, the surrounding application may provide its own source + manager. + +* Memory manager: same as for compression library. + +* Error handler: same as for compression library. + +* Progress monitor: same as for compression library. + +As with compression, the data source manager, error handler, and progress +monitor are candidates for replacement by a surrounding application. + + +*** Decompression input and output separation *** + +To support efficient incremental display of progressive JPEG files, the +decompressor is divided into two sections that can run independently: + +1. Data input includes marker parsing, entropy decoding, and input into the + coefficient controller's DCT coefficient buffer. Note that this + processing is relatively cheap and fast. + +2. Data output reads from the DCT coefficient buffer and performs the IDCT + and all postprocessing steps. + +For a progressive JPEG file, the data input processing is allowed to get +arbitrarily far ahead of the data output processing. (This occurs only +if the application calls jpeg_consume_input(); otherwise input and output +run in lockstep, since the input section is called only when the output +section needs more data.) In this way the application can avoid making +extra display passes when data is arriving faster than the display pass +can run. Furthermore, it is possible to abort an output pass without +losing anything, since the coefficient buffer is read-only as far as the +output section is concerned. See libjpeg.doc for more detail. + +A full-image coefficient array is only created if the JPEG file has multiple +scans (or if the application specifies buffered-image mode anyway). When +reading a single-scan file, the coefficient controller normally creates only +a one-MCU buffer, so input and output processing must run in lockstep in this +case. jpeg_consume_input() is effectively a no-op in this situation. + +The main impact of dividing the decompressor in this fashion is that we must +be very careful with shared variables in the cinfo data structure. Each +variable that can change during the course of decompression must be +classified as belonging to data input or data output, and each section must +look only at its own variables. For example, the data output section may not +depend on any of the variables that describe the current scan in the JPEG +file, because these may change as the data input section advances into a new +scan. + +The progress monitor is (somewhat arbitrarily) defined to treat input of the +file as one pass when buffered-image mode is not used, and to ignore data +input work completely when buffered-image mode is used. Note that the +library has no reliable way to predict the number of passes when dealing +with a progressive JPEG file, nor can it predict the number of output passes +in buffered-image mode. So the work estimate is inherently bogus anyway. + +No comparable division is currently made in the compression library, because +there isn't any real need for it. + + +*** Data formats *** + +Arrays of pixel sample values use the following data structure: + + typedef something JSAMPLE; a pixel component value, 0..MAXJSAMPLE + typedef JSAMPLE *JSAMPROW; ptr to a row of samples + typedef JSAMPROW *JSAMPARRAY; ptr to a list of rows + typedef JSAMPARRAY *JSAMPIMAGE; ptr to a list of color-component arrays + +The basic element type JSAMPLE will typically be one of unsigned char, +(signed) char, or short. Short will be used if samples wider than 8 bits are +to be supported (this is a compile-time option). Otherwise, unsigned char is +used if possible. If the compiler only supports signed chars, then it is +necessary to mask off the value when reading. Thus, all reads of JSAMPLE +values must be coded as "GETJSAMPLE(value)", where the macro will be defined +as "((value) & 0xFF)" on signed-char machines and "((int) (value))" elsewhere. + +With these conventions, JSAMPLE values can be assumed to be >= 0. This helps +simplify correct rounding during downsampling, etc. The JPEG standard's +specification that sample values run from -128..127 is accommodated by +subtracting 128 just as the sample value is copied into the source array for +the DCT step (this will be an array of signed ints). Similarly, during +decompression the output of the IDCT step will be immediately shifted back to +0..255. (NB: different values are required when 12-bit samples are in use. +The code is written in terms of MAXJSAMPLE and CENTERJSAMPLE, which will be +defined as 255 and 128 respectively in an 8-bit implementation, and as 4095 +and 2048 in a 12-bit implementation.) + +We use a pointer per row, rather than a two-dimensional JSAMPLE array. This +choice costs only a small amount of memory and has several benefits: +* Code using the data structure doesn't need to know the allocated width of + the rows. This simplifies edge expansion/compression, since we can work + in an array that's wider than the logical picture width. +* Indexing doesn't require multiplication; this is a performance win on many + machines. +* Arrays with more than 64K total elements can be supported even on machines + where malloc() cannot allocate chunks larger than 64K. +* The rows forming a component array may be allocated at different times + without extra copying. This trick allows some speedups in smoothing steps + that need access to the previous and next rows. + +Note that each color component is stored in a separate array; we don't use the +traditional layout in which the components of a pixel are stored together. +This simplifies coding of modules that work on each component independently, +because they don't need to know how many components there are. Furthermore, +we can read or write each component to a temporary file independently, which +is helpful when dealing with noninterleaved JPEG files. + +In general, a specific sample value is accessed by code such as + GETJSAMPLE(image[colorcomponent][row][col]) +where col is measured from the image left edge, but row is measured from the +first sample row currently in memory. Either of the first two indexings can +be precomputed by copying the relevant pointer. + + +Since most image-processing applications prefer to work on images in which +the components of a pixel are stored together, the data passed to or from the +surrounding application uses the traditional convention: a single pixel is +represented by N consecutive JSAMPLE values, and an image row is an array of +(# of color components)*(image width) JSAMPLEs. One or more rows of data can +be represented by a pointer of type JSAMPARRAY in this scheme. This scheme is +converted to component-wise storage inside the JPEG library. (Applications +that want to skip JPEG preprocessing or postprocessing will have to contend +with component-wise storage.) + + +Arrays of DCT-coefficient values use the following data structure: + + typedef short JCOEF; a 16-bit signed integer + typedef JCOEF JBLOCK[DCTSIZE2]; an 8x8 block of coefficients + typedef JBLOCK *JBLOCKROW; ptr to one horizontal row of 8x8 blocks + typedef JBLOCKROW *JBLOCKARRAY; ptr to a list of such rows + typedef JBLOCKARRAY *JBLOCKIMAGE; ptr to a list of color component arrays + +The underlying type is at least a 16-bit signed integer; while "short" is big +enough on all machines of interest, on some machines it is preferable to use +"int" for speed reasons, despite the storage cost. Coefficients are grouped +into 8x8 blocks (but we always use #defines DCTSIZE and DCTSIZE2 rather than +"8" and "64"). + +The contents of a coefficient block may be in either "natural" or zigzagged +order, and may be true values or divided by the quantization coefficients, +depending on where the block is in the processing pipeline. In the current +library, coefficient blocks are kept in natural order everywhere; the entropy +codecs zigzag or dezigzag the data as it is written or read. The blocks +contain quantized coefficients everywhere outside the DCT/IDCT subsystems. +(This latter decision may need to be revisited to support variable +quantization a la JPEG Part 3.) + +Notice that the allocation unit is now a row of 8x8 blocks, corresponding to +eight rows of samples. Otherwise the structure is much the same as for +samples, and for the same reasons. + +On machines where malloc() can't handle a request bigger than 64Kb, this data +structure limits us to rows of less than 512 JBLOCKs, or a picture width of +4000+ pixels. This seems an acceptable restriction. + + +On 80x86 machines, the bottom-level pointer types (JSAMPROW and JBLOCKROW) +must be declared as "far" pointers, but the upper levels can be "near" +(implying that the pointer lists are allocated in the DS segment). +We use a #define symbol FAR, which expands to the "far" keyword when +compiling on 80x86 machines and to nothing elsewhere. + + +*** Suspendable processing *** + +In some applications it is desirable to use the JPEG library as an +incremental, memory-to-memory filter. In this situation the data source or +destination may be a limited-size buffer, and we can't rely on being able to +empty or refill the buffer at arbitrary times. Instead the application would +like to have control return from the library at buffer overflow/underrun, and +then resume compression or decompression at a later time. + +This scenario is supported for simple cases. (For anything more complex, we +recommend that the application "bite the bullet" and develop real multitasking +capability.) The libjpeg.doc file goes into more detail about the usage and +limitations of this capability; here we address the implications for library +structure. + +The essence of the problem is that the entropy codec (coder or decoder) must +be prepared to stop at arbitrary times. In turn, the controllers that call +the entropy codec must be able to stop before having produced or consumed all +the data that they normally would handle in one call. That part is reasonably +straightforward: we make the controller call interfaces include "progress +counters" which indicate the number of data chunks successfully processed, and +we require callers to test the counter rather than just assume all of the data +was processed. + +Rather than trying to restart at an arbitrary point, the current Huffman +codecs are designed to restart at the beginning of the current MCU after a +suspension due to buffer overflow/underrun. At the start of each call, the +codec's internal state is loaded from permanent storage (in the JPEG object +structures) into local variables. On successful completion of the MCU, the +permanent state is updated. (This copying is not very expensive, and may even +lead to *improved* performance if the local variables can be registerized.) +If a suspension occurs, the codec simply returns without updating the state, +thus effectively reverting to the start of the MCU. Note that this implies +leaving some data unprocessed in the source/destination buffer (ie, the +compressed partial MCU). The data source/destination module interfaces are +specified so as to make this possible. This also implies that the data buffer +must be large enough to hold a worst-case compressed MCU; a couple thousand +bytes should be enough. + +In a successive-approximation AC refinement scan, the progressive Huffman +decoder has to be able to undo assignments of newly nonzero coefficients if it +suspends before the MCU is complete, since decoding requires distinguishing +previously-zero and previously-nonzero coefficients. This is a bit tedious +but probably won't have much effect on performance. Other variants of Huffman +decoding need not worry about this, since they will just store the same values +again if forced to repeat the MCU. + +This approach would probably not work for an arithmetic codec, since its +modifiable state is quite large and couldn't be copied cheaply. Instead it +would have to suspend and resume exactly at the point of the buffer end. + +The JPEG marker reader is designed to cope with suspension at an arbitrary +point. It does so by backing up to the start of the marker parameter segment, +so the data buffer must be big enough to hold the largest marker of interest. +Again, a couple KB should be adequate. (A special "skip" convention is used +to bypass COM and APPn markers, so these can be larger than the buffer size +without causing problems; otherwise a 64K buffer would be needed in the worst +case.) + +The JPEG marker writer currently does *not* cope with suspension. I feel that +this is not necessary; it is much easier simply to require the application to +ensure there is enough buffer space before starting. (An empty 2K buffer is +more than sufficient for the header markers; and ensuring there are a dozen or +two bytes available before calling jpeg_finish_compress() will suffice for the +trailer.) This would not work for writing multi-scan JPEG files, but +we simply do not intend to support that capability with suspension. + + +*** Memory manager services *** + +The JPEG library's memory manager controls allocation and deallocation of +memory, and it manages large "virtual" data arrays on machines where the +operating system does not provide virtual memory. Note that the same +memory manager serves both compression and decompression operations. + +In all cases, allocated objects are tied to a particular compression or +decompression master record, and they will be released when that master +record is destroyed. + +The memory manager does not provide explicit deallocation of objects. +Instead, objects are created in "pools" of free storage, and a whole pool +can be freed at once. This approach helps prevent storage-leak bugs, and +it speeds up operations whenever malloc/free are slow (as they often are). +The pools can be regarded as lifetime identifiers for objects. Two +pools/lifetimes are defined: + * JPOOL_PERMANENT lasts until master record is destroyed + * JPOOL_IMAGE lasts until done with image (JPEG datastream) +Permanent lifetime is used for parameters and tables that should be carried +across from one datastream to another; this includes all application-visible +parameters. Image lifetime is used for everything else. (A third lifetime, +JPOOL_PASS = one processing pass, was originally planned. However it was +dropped as not being worthwhile. The actual usage patterns are such that the +peak memory usage would be about the same anyway; and having per-pass storage +substantially complicates the virtual memory allocation rules --- see below.) + +The memory manager deals with three kinds of object: +1. "Small" objects. Typically these require no more than 10K-20K total. +2. "Large" objects. These may require tens to hundreds of K depending on + image size. Semantically they behave the same as small objects, but we + distinguish them for two reasons: + * On MS-DOS machines, large objects are referenced by FAR pointers, + small objects by NEAR pointers. + * Pool allocation heuristics may differ for large and small objects. + Note that individual "large" objects cannot exceed the size allowed by + type size_t, which may be 64K or less on some machines. +3. "Virtual" objects. These are large 2-D arrays of JSAMPLEs or JBLOCKs + (typically large enough for the entire image being processed). The + memory manager provides stripwise access to these arrays. On machines + without virtual memory, the rest of the array may be swapped out to a + temporary file. + +(Note: JSAMPARRAY and JBLOCKARRAY data structures are a combination of large +objects for the data proper and small objects for the row pointers. For +convenience and speed, the memory manager provides single routines to create +these structures. Similarly, virtual arrays include a small control block +and a JSAMPARRAY or JBLOCKARRAY working buffer, all created with one call.) + +In the present implementation, virtual arrays are only permitted to have image +lifespan. (Permanent lifespan would not be reasonable, and pass lifespan is +not very useful since a virtual array's raison d'etre is to store data for +multiple passes through the image.) We also expect that only "small" objects +will be given permanent lifespan, though this restriction is not required by +the memory manager. + +In a non-virtual-memory machine, some performance benefit can be gained by +making the in-memory buffers for virtual arrays be as large as possible. +(For small images, the buffers might fit entirely in memory, so blind +swapping would be very wasteful.) The memory manager will adjust the height +of the buffers to fit within a prespecified maximum memory usage. In order +to do this in a reasonably optimal fashion, the manager needs to allocate all +of the virtual arrays at once. Therefore, there isn't a one-step allocation +routine for virtual arrays; instead, there is a "request" routine that simply +allocates the control block, and a "realize" routine (called just once) that +determines space allocation and creates all of the actual buffers. The +realize routine must allow for space occupied by non-virtual large objects. +(We don't bother to factor in the space needed for small objects, on the +grounds that it isn't worth the trouble.) + +To support all this, we establish the following protocol for doing business +with the memory manager: + 1. Modules must request virtual arrays (which may have only image lifespan) + during the initial setup phase, i.e., in their jinit_xxx routines. + 2. All "large" objects (including JSAMPARRAYs and JBLOCKARRAYs) must also be + allocated during initial setup. + 3. realize_virt_arrays will be called at the completion of initial setup. + The above conventions ensure that sufficient information is available + for it to choose a good size for virtual array buffers. +Small objects of any lifespan may be allocated at any time. We expect that +the total space used for small objects will be small enough to be negligible +in the realize_virt_arrays computation. + +In a virtual-memory machine, we simply pretend that the available space is +infinite, thus causing realize_virt_arrays to decide that it can allocate all +the virtual arrays as full-size in-memory buffers. The overhead of the +virtual-array access protocol is very small when no swapping occurs. + +A virtual array can be specified to be "pre-zeroed"; when this flag is set, +never-yet-written sections of the array are set to zero before being made +available to the caller. If this flag is not set, never-written sections +of the array contain garbage. (This feature exists primarily because the +equivalent logic would otherwise be needed in jdcoefct.c for progressive +JPEG mode; we may as well make it available for possible other uses.) + +The first write pass on a virtual array is required to occur in top-to-bottom +order; read passes, as well as any write passes after the first one, may +access the array in any order. This restriction exists partly to simplify +the virtual array control logic, and partly because some file systems may not +support seeking beyond the current end-of-file in a temporary file. The main +implication of this restriction is that rearrangement of rows (such as +converting top-to-bottom data order to bottom-to-top) must be handled while +reading data out of the virtual array, not while putting it in. + + +*** Memory manager internal structure *** + +To isolate system dependencies as much as possible, we have broken the +memory manager into two parts. There is a reasonably system-independent +"front end" (jmemmgr.c) and a "back end" that contains only the code +likely to change across systems. All of the memory management methods +outlined above are implemented by the front end. The back end provides +the following routines for use by the front end (none of these routines +are known to the rest of the JPEG code): + +jpeg_mem_init, jpeg_mem_term system-dependent initialization/shutdown + +jpeg_get_small, jpeg_free_small interface to malloc and free library routines + (or their equivalents) + +jpeg_get_large, jpeg_free_large interface to FAR malloc/free in MSDOS machines; + else usually the same as + jpeg_get_small/jpeg_free_small + +jpeg_mem_available estimate available memory + +jpeg_open_backing_store create a backing-store object + +read_backing_store, manipulate a backing-store object +write_backing_store, +close_backing_store + +On some systems there will be more than one type of backing-store object +(specifically, in MS-DOS a backing store file might be an area of extended +memory as well as a disk file). jpeg_open_backing_store is responsible for +choosing how to implement a given object. The read/write/close routines +are method pointers in the structure that describes a given object; this +lets them be different for different object types. + +It may be necessary to ensure that backing store objects are explicitly +released upon abnormal program termination. For example, MS-DOS won't free +extended memory by itself. To support this, we will expect the main program +or surrounding application to arrange to call self_destruct (typically via +jpeg_destroy) upon abnormal termination. This may require a SIGINT signal +handler or equivalent. We don't want to have the back end module install its +own signal handler, because that would pre-empt the surrounding application's +ability to control signal handling. + +The IJG distribution includes several memory manager back end implementations. +Usually the same back end should be suitable for all applications on a given +system, but it is possible for an application to supply its own back end at +need. + + +*** Implications of DNL marker *** + +Some JPEG files may use a DNL marker to postpone definition of the image +height (this would be useful for a fax-like scanner's output, for instance). +In these files the SOF marker claims the image height is 0, and you only +find out the true image height at the end of the first scan. + +We could read these files as follows: +1. Upon seeing zero image height, replace it by 65535 (the maximum allowed). +2. When the DNL is found, update the image height in the global image + descriptor. +This implies that control modules must avoid making copies of the image +height, and must re-test for termination after each MCU row. This would +be easy enough to do. + +In cases where image-size data structures are allocated, this approach will +result in very inefficient use of virtual memory or much-larger-than-necessary +temporary files. This seems acceptable for something that probably won't be a +mainstream usage. People might have to forgo use of memory-hogging options +(such as two-pass color quantization or noninterleaved JPEG files) if they +want efficient conversion of such files. (One could improve efficiency by +demanding a user-supplied upper bound for the height, less than 65536; in most +cases it could be much less.) + +The standard also permits the SOF marker to overestimate the image height, +with a DNL to give the true, smaller height at the end of the first scan. +This would solve the space problems if the overestimate wasn't too great. +However, it implies that you don't even know whether DNL will be used. + +This leads to a couple of very serious objections: +1. Testing for a DNL marker must occur in the inner loop of the decompressor's + Huffman decoder; this implies a speed penalty whether the feature is used + or not. +2. There is no way to hide the last-minute change in image height from an + application using the decoder. Thus *every* application using the IJG + library would suffer a complexity penalty whether it cared about DNL or + not. +We currently do not support DNL because of these problems. + +A different approach is to insist that DNL-using files be preprocessed by a +separate program that reads ahead to the DNL, then goes back and fixes the SOF +marker. This is a much simpler solution and is probably far more efficient. +Even if one wants piped input, buffering the first scan of the JPEG file needs +a lot smaller temp file than is implied by the maximum-height method. For +this approach we'd simply treat DNL as a no-op in the decompressor (at most, +check that it matches the SOF image height). + +We will not worry about making the compressor capable of outputting DNL. +Something similar to the first scheme above could be applied if anyone ever +wants to make that work. diff --git a/gtkmm-osx/jpeg-6b/testimg.bmp b/gtkmm-osx/jpeg-6b/testimg.bmp new file mode 100644 index 0000000000000000000000000000000000000000..8603d15484d47f0b90eb4246a2309c566f8adaa7 GIT binary patch literal 35050 zcma)_3tX1<-TyC>J>f74nTlu{hZGOkAIYFla+;t5CY2?gP!NJV4nbH*Qq9cO(pDM; z!M&9_Ivv~Qt&darbb%w{>;N(93 zxHBv7XHI7B(@w~}KJe$ADSu}5{^WsOJ zI*aaj&q=#&u9K8K$JtiC&KVZ*ptI}npPaa{e{tsJr8}`x=Q!~HsR(Vsi< z6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W7(B`x#hwgHKN)n(YWtBI?TG9^wtr#+HRpr6LN)TM-N*8+6);B1>Mi{>`JMJW`PE zMM5Gayc7#K@YLLj{EQm9r|Qxc+J9spZxf4*A-CzGmzFzR?aY6Wd##oY^d*ekc#!WGE|KkYuHrh z^~hFPF~GQTKh8vQD;{BbSXD7Fb)XUT{2@mIOJTInkpEupVdCk|jz@?+gD7`vHh*;6 zcvnV2GO@k7EG;dqU|{$_wyMO>#T-u*@UWqG1*5MCO;vXH~K zSJR0gZ(x=zbmPlQIN!xJR_&Ic^#an8$q;zNrmN|wr@Xh#j5WBzYe*oUT%qZxBk>3+ zSF}Tr9M}$DM4U19qw#EMu*hU&#lq^cn3$N|G5+xb(J@Z(6sE4tm^`E&J`>lT%XInu z4onJgnP*4S3Q;C{K;+;VAE&iosLc#|Bcp^gMC{e{RNU==v`1)TSy7Ca)V{J?Lz2FaP|zF{o$*F`2v zuIxngn5&r4(S)qPSh0T#s_p?v3lF6TX{DuF(&lyJ2iLRB=*t7dSo9i`!zYWgk76_)4V~y38X6_^CLi7Obwz}OhJY#3Nft3ox5-yk`wN1-K|Th zG62(bja78^l6xVB@a>-&($QLnrC~vy1F&PlR54U9uXlg@+YOm3dJK4LH7c%N%~x_g Sa`hccw(kxNXLrXq=l=ug74q5u literal 0 HcmV?d00001 diff --git a/gtkmm-osx/jpeg-6b/testimg.jpg b/gtkmm-osx/jpeg-6b/testimg.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b34ca5d3151840576b6cdf33c3d52d0368172d4c GIT binary patch literal 5756 zcmbW&XHXMPn*i|8tMo_<9YqKNhS0l6fFLE5&=KhbX+c60rK9u!p@Y&}04brP^eVkd zQ96QxpdeC&^Z&j#cQg0t?w+09FZ;~S^P6qg3)iav1~^O`1|T8=0EqrJ!1WS99Y9G= zPC-saNkKtDMMX(X%W{L3hK81%iJ6{-i-U)oivtAW6%-TVpOR857?!O_Xt#TDiA)EDFD9}pNG5g8Tz@>NW7N-8cbJtH%#ps=X8q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?-¯@-­@,ªA,¦A-¢B,Ÿ@*›A)˜@*–A,”>-’?/’?/‘>.‘>,=+’<+’<+”?+”?+”=*”=*”=*•>+–?,–@/–?6•>5—=2Ÿ?1©B3³D3¼D4¿D4¹?0µA2¬F8žH;‡H9oA2T8*C3&=5295495473271160050-50-72/72/72/61.61-50,50,41,//-.0-//-//-0/-0/-2.-2.-5,-4+,4*+3)*7(+=.1E69P:0U?1^A3jC4xD6„E4’E5œC3§C4¯A4µA4¼B7ÀD:ÄE<ÅF=ÍC@áEIçBIèCIêDHíDGïBDó@Cö?Cø;A÷:@ô:?ðÕ@<Ê@6¹>/µ@.´?-´?-´?-²?,°?-¯@-­@,©@+¦A-¡A+Ÿ@*›A)˜@*–A,”>-’?/‘>.‘>.‘>,=+’<+’<+”?+“>*”=*”=*”=*•>+–?,–@/”@5•>5˜>3 >1«A3µD4½C4¿D5»A2·C6¬F8œI;…G:l@3S9*B4)>63:6595484382271161.61.72/72/72/61.61-50,50,41,//-.0-//-//-0/-0/-2.-2.-3--5,-4*+3)*5)+<-0C47N8:d>=vEA†JINLšTV¤aj¥l}rŽ‘{¢†€®…¹{„»ou©[[QHuOCiOFeOG_PH_RN_[Yfnotƒ‡ˆ”™•™ž—š ”™‘ƒ~ojkY][LVSJXSZVRaXQa/.,/.,0/-10.40-40-51.51.72.72.72.72.92,92,92,92,91.80.7/-7/-7/-7/-80.91/80.80.80.80.80.80.80.80.6.,5-+5-+5-+4,*4,*4,*4,*5-+5-+5-+5-+5-+5-+5-+3.*2-'1.'2/(30)30)41*41*52+63,63,63,74-85.96/96/:7.?8.@:.B<0D>2G?4H@5H@3H@3I@1I@1K?1K?1K?/L@0MA1NB2MA1QA1YB2dC2qC3|C2‡B2’A0˜<- :+§;.¯=2µ@6ºD:¿F=ÅD>ÙCEá@FãBGçBFêDFðCEôADø?Dú;@ù:?õ;@ð=@è@@ÜA=Ñ@;Æ@5·=.³@-³@-²?,²?-°?-¯>,­@,ª?-§@-¥@,¡A+A,š?*˜@*•@+”>-‘>.‘>.‘>.=+=+=+=+‘>,‘>,’<+’<+“=,“=,”?+•?.•A6–?5š>3£>2¯A4¹C5¿D5ÁC5ÀD8¸F;®I=™J=G;h@4Q:,B5,?74=77<66:4494183072/72/62/62/62/51.52-41,41,21,.0-,1-.0-.0-//-//-0/-2.-5//4..5,-4*+4*+9-/>24I56[97l?9|E@†IDOM˜[`›fv”mˆŒwžƒ}­}‚¹u~·fm¤TV‰MEvLAkMAeOFcQHcMH^NK\[[eqty…‰ˆ‡Œ†Šˆ…†Š|xzlfiXZ[MVSLZU[ZT`[S`.-+/.,/.,0/-3/,40-40-40-61-61-61-61-81+81+81+81+7/-7/-6.,6.,6.,6.,7/-7/-80.80.80.80.80.80.80.80.5-+5-+5-+4,*4,*4,*3+)3+)6.,6.,6.,6.,6.,6.,6.,4/,30+30)30)41*41*52+52+52+52+52+63,74-85.85.96/96->7-?9-@:.B<0E=2E=2F>1F>1G=1G>/H<.I=/I=/J>.L@0JA0KD2NE4UD4^D3iD2sB1~A/†?-Œ9)”9'9*£<-¬@3³E8¸H<ÁF>ÒDCÚACÞBCâDCçCDìBCó@C÷?Aú;@ù:?õ;@î>@åA@ÚB=Í@9Â@3µ=-°@,°@,°@,¯>,®?,®?,¬?+©@-¦?,£@+ @*œ@+˜@*–@)”?*‘>,‘>.‘>.=-=+=+<*<*=+=+<*<*’<+‘>,”>-’?-•A6–?5œ>2¦@4²B6¼C8ÁC7ÂB7ÂF<ºJ?¬L@—K>|F:b@4L:.A7-@85>96=77<74:5294183083062/62/62/32.52-21,21,12--2.-2./1./1.00.00.10.10.5106005//5,-4+,6,-:01D22T71c;3qA7{E;‚HD‰RU_l‹i‚ƒs˜}y«x}µowµ`f¢QR‹LEyL@pL@hPEgQFfLC^GBVMLZ^^fjnquyxx}wz€vwzokoa`bTWYLTTL]WY]V]]V^------.-+/.,0/-10.3/,40-3/,3/,4/+4/+4/+4/+6/)6/)4/,4/,3.+3.+3.+3.+4/,4/,50-50-50-50-50-50-50-50-3.+3.+2-*2-*2-*1,)1,)1,)4/,4/,4/,4/,4/,4/,4/,4/,41,41,41,41,41,52-52-52-52-52-63.63.74/85096196/<5-=6,?8.@9/B:/C;0C;0C;.D:.D:.F:.G;-H<.I=/J>0I@1JG6MH5RG5YF5bE3jD1uB/}>,‚;)‹:)“:*š=,£B2¬F8²J=»I?ÌGBÔDCØDBÝEBâBBéAAð=@ô<>ù:?ø:<ô<>í?>áB>ÓC:ÅA5¹?0²?-®?,®?,®?,­>-¬>-¬>-ª?-¨>.¤?- ?,ž?+š?,—?+•>*“>*‘>,?.>->->-Ž=,Ž=,Ž=,Ž=,Ž=,Ž=,Ž=,<,>-‘>.?.”B4—A4@1¨@3¶A7¿C9ÅB8ÄA7¾C;·H?¦LCJ@tE;Z>2E9-<5+@93@85?75>63=52<4194083/62/43/43/23.32.12-12-02--2.,2.-2.-2./1./1.00.10.3205105104..2,,4+,7./=/.N5.Y9.e=1n@3sB;yKK€Zeƒg€p—zxªu{·ks´_d¦TT”OGƒLBwNAmNBhMAeJA`GBYGFXKKWMPU]cc`fbbia`f\Z`TW[MUXMXXP^YV`WX`WZ,,,,,,.-+.-+/.,0/-3/,3/,2.+2.+3.*3.*3.*3.*5.(5-*3.+3.+2-*1,)1,)2-*3.+3.+3.+3.+3.+3.+3.+3.+3.+3.+2-*2-*2-*2-*1,)1,)1,)0+(3.+3.+3.+3.+3.+3.+3.+3.+41,41,41,41,41,41,41,41,41,52-52-63.74/85085085.;4,<5+=6,>7-@7.A9.A9.A9.C9/C9-E9-F:.G;/H<.J>0HA1JG6IH6NG5VF6\E3dC2n@0v>-{<+‚;)Œ;*”=,œ@1£F5ªJ:´J=ÄH@ÌEAÑFAÖE@ÞCAä@>ì>?ñ:<÷;<ô:;ð<=é@=ÜC=ÍC8¾@2±>,®?,«@,ª?+ª?+ª?-©>,©>,¨?,¥>-¢?, ?,›>,—?+•>*“>)‘?*>+>->->-Ž=,Ž=,Ž=,<+Ž=,‹<+<+‹<+‹<-Œ=,>/Ž?.”B4—A2 @2¬B5¹C9ÂC:ÅB:ÂA;ºA9±I@£NGNEoG=S?4A;/96-@93A75?74>63<4194083/74/43/43/34/23.23.02-02-.3--3/-3/.3/.3/02/02/11/11/21/32032040/2.-1-,4..8.,G4-O4)X8+`<0e?6mGFyYd‚k…€uŸ||²w|¼nu»dh¯[[¡RMLB~OArL@hI=cH>`HB^ECX@BO;@FBGJDMJJQJJQIIQFKQEOUIVWO^YS`YS`XU++++++,,,---/.,/.,0/-0/-1-*1-*1-*1-*2-)2-)2-)2-)2-*2,,1++1++1++1++2,,2,,1++1++1++1++1++1++1++1++2,,2,,2,,1++1++1++0**0**3--3--3--3--3--3--3--3.+41,41,41,30+30+30+30+30+41,41,52-63.74/74/85085.:3+;4,<5-=6.?6/?6-?6-?7,B8.B8.E8/E9-G;/H<0J>2H@3HE6GF4KE5QD4XC2_B2f?.n=,v=,|:*…9)Œ;*“=.›B2¢F7¬F8»F<ÂF>ÉF>ÐE>ÙD@âC?ê@@ð>>ò::ñ;:ì<<äA<ÖC;ÆD6µ@/ª=)ª?-©@-©@-¨?,¨>.¨>.§=-¥>-£=. ?.ž?-š?-–?,“>*‘?*>)>+>->-Œ=,Œ=.Œ=.‹<-‹<-‹<-Š=-Š;,‰<,Š.‹=0Œ?/’C2˜B1¡A1®B6¼C:ÂC<ÄC=ÀC=¹FA²QJ¥XRXQsRIWI>CC793@72>71=60:5/94.83/63.43.43.34/13.13..3-.3-.3--3/-3/-3/-3/.3/.3/02/02/00.11/22021/0/-/.,2.-4/,?0+D0)K3)T8-Z<4dFFu]jƒs‰€«…„¾~ƒÇtzÆmp½ce¯VSšLC‚K?qI_FB]DBW?AN;?H:BE>HGDMHGQIGQHJRGNVKUXM^ZOaYNaXO++++++,,,,,,.,-/.,0/-0/-1-*1-*1-*1-*2-)2-)2-)2-*2,,1++1++0**0**1++1++2,,0**0**0**0**0**0**0**0**2,,2,,2,,1++1++0**0**0**2,,2,,2,,2,,2,,2,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E9±I>ºG@»D>»EA¸MG´ZR¯f_£qf‘sh~rdjj^V^SIQFLLBJF=B>5<8/95,74+63,33+43.34.14-14-02-/1,,1+,1+-2.-2.-2.-2./1./1./1./1.02/02/11/11/11/11/11/40/4+0;/3A32C4/J;6]OOymy‹…Ÿ“»”–ϐ•Ùƒ‰ÓtzÆjn·_b§Z[”LItHBdA>]>>X?BUAIVLU\U`bbqnn}xv†|rulyoguh_k_W_P]\Hb\Fc]G,-/,-/,-/,-/------.,-.-+/.,.-+0,)0,)/+(/+(/+(/+(.*).*).*).*)/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*0,+0,+0,+1-,1-,1-,1-,1-,1-,1-,1-,1-,1-,0,+0,)1-*2.+3/,3/,2.+2.+2.+2.+2.+2.+3/,40-51.62/80.91.:2/;4.=4/>50>50=4-?4.?4.A4.B5-C6.E80G:2H;3H>5H>5L=6O>6Q=4V;2Z90_7/h70p7.w7-9-‰9.<1–<1›=1¢@3§A3¬B5´D8¾E:ÉF<ÔE=ÛD=ßD@àE@ÞFAÔG>ÄF8²C2¥B-žB-ŸC.žB-Ÿ@.ž?-ž?-ž?-ž>.ž>.š=,™>,–=-”=,=+>+Œ>*Œ=,‹<+Š=+‰<,‰<,‰<,‡;+‡;-…<-†2†@6‡A7ˆB6“G9—E7£G<¯J@¸IB¸GA·LF³TN±d\ªqfŸ~oo|mmseZfZNXMLNAKI=EC7@=4=:188.44,11)23-23-03,/2+/1,.0+.0+.0+/1.-2./1./1./1./1./1./1.02/02/11/11/11/11/11/2015+49-7<23?53H?:^VTxr|Šˆž““¹”—ʐ–Ô„‹ÏyÂqy¸kt­hnž\_€XZqSUjRWjT^hZgmfvvr‚tˆ~’‡ƒ•‰~Žv†yr€qfteZeT[ZE`Z@b\D,-/,-/,-/,-/,-/,.-------.-+.-+.-+-,*/+(.*'.*'.*',+),*+,*+,*++)*+)*+)*+)*-+,-+,-+,-+,-+,-+,-+,-+,,*+,*+-+,-+,-+,.,-.,-.,-.,-.,-.,-/-./-./-./-./.,0,+0,+1-,2.-2.-2.-2.-1-,1-,1-,1-,1-,2.-3/.40/51.80.91.:2/;30=31=4/=4/=4/?40?4.A4.A4.C60D71F93G:4H;5J;6K<7N=6P;6S:5V72[6.c60k6.t5,}7/‡9/;0”<0–<1?3 @4¢@3¨@3±C6ºD8ÅE:ÍD:ÕF@×H@ÔIBÌI?¾E:®C3¡B.œA.B/œA.œ?.›>-›>-›>-›>/›?0˜<-–=-”<.“=.>-Œ=,‹<+Š=+‰<*‰<*‰<,‡;+‡;-…<-„:-ƒ;-„<0‚<0‚<2‚>3ƒ?4…A8‡C:ˆD9”J=—H; H>¬KD²KF³LG²SM®`V­sg¦qŒz‘Ž{‚‰ws€ocqbXcUNRDMN@HI;DD8@@49;.46+/1&01)01)/0*/0*./*./*//-//-//-.0-//-//-//-//-//-//-00.00.00.00.00.00.00.1/26+97+98/4;63HE>_^Yzz|‹š”±’—¿•Ç„ŽÃ}‰»{‰¶|‹²}Œ«}ˆšwƒq~‡n}‚n~~o‚~yŽ…ƒ™‹¡”‘¨˜¥”ˆŠƒ–ƒ|{j{i\hTXX@]Y<_[@-.0-.0-.0-.0-.0-.0.......-+.-+-,*-,*.*'.*'.*'.*),*++)*+)*+)*+)**()*()*(),*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+-+,-+,-+,-+,.,-.,-.,-.,-/-./-./-./+*0,+1-,1-,1-,1-,0,+0,+0,+0,+0,+0,+1-,2.-3/.40/91/:20;31<41=31=31=31=4/>3/>3/@2/@3-A4.C60D71E82F93H94I:5J;6L:6N94Q83T50^72e60o6/x8/‚90Š:/<1”>1™?4›?4›?2Ÿ?1¥A2®B5¸D7¿E:ÇG>ËH@ÊJAÃI>¶F:ªB5žA0™@.™A-™A-˜?-—>,—>,™>,™=.—>.•<,”=,“=.=-Ž=,Š=+Š=-‰<,ˆ;)ˆ;)‡;+‡;+„;,„;,ƒ;-€;,;/€<1€<1>5ƒ@7ƒC:‡D<ˆE<”L@–H<žG>§JC®LI®QL­]Vªj^§€o¡yšš‚›ƒ†•€z‹xm{jbm]SZJQUFKO@EI:@D6;=057,13(01)/0(./).-(.-).-)/.,0/-/.,/.,/.,/.,/.,..,/.,..,0/-//-0/-//-//-//-//-2-17,:6*83-1961HJ?bfX{€z‹““£–°Œ•¶ƒ²¯…™²¤¶’¨³“¨«¤£Œ ž‡ž˜‚™}˜‰œ‹ˆ£”°š˜±›”­—‹£…›„’|k|iXfOSV;ZV9^Z=+/2+/2+/2+/2-.0-.0......------.-+-,*-,*,+),+),+),*+,*+,*++)*+)**()*()*(),*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*++)*+)*+)*,*+-+,-+,.,-.,-/-./-./-./+*0,+0,+0,+0,+0,+/+*.*)/+*/+*/+*/+*0,+1-,3/.40/901:20;31<42=32=31<20<20=20=2.?1.?1.@2/A30B5/C60D63C84D95E:6G96H94K84N50X72_60i70r7/}:1†<1Œ>2>2—@6—?5—?5—?3œ@3£C5«C6³E8ºE;½G=¾H>¹G=°D8¦A5›?0—@/—@-—@-–?.•>-”=,•<,–=/–=/•<.“;-’0->0-?1.@2/A4.?4.@51@72@93A:4B94C84F74H5/Q51X5/a6/l8-u9.€0‹=1“?5•>5“?5“?4•B4šB4 C4¥D4¬B5°D8´E:±E;ªB7¡?4š>1–>0•?.”?+“=,“=,“<+“<+”<.”<.“;-’<-<.;-Š;,‰<,‡;+‡;+†:*†:*…9)ƒ:)ƒ:+9*9-9-€<1<3?6€A8‚C<…F?ˆIBŠICŽJAG>—HCŸNJ§VR§`Z©pe¤ƒrœ”}–¡ƒ¨Šˆ§ˆƒ „~–~yˆup{jdp\]iSR^JJS@BK:>E5:@29<134,22*1.)/,'/))0**1++2,,1++1++1++1++1++0,+0,+0,+1-,1-,1-,1-,/.,/.,/.,2,.8*75(13+(56&EK1\gGu‚d†“yŽ›Š‘ž”Ÿš‹ž˜¥——´ž¢Å¥©Î­¥É­¦Ê°§Ë±¤È¬—¾Ÿ‹³‘ˆ°²Ž²Ž²¬Š„¡‚€™{wŽrdx]Q_ENR7QQ5SR6,03,03,03,03./1./1./1./1/////////////.,/.,.-+.-+/-..,-.,--+,,*++)*+)**()+)*+)*+)*+)*+)*+)*+)*+)*+)*+)*+)**()*()*())'()'(+)*+)*,*+-+,.,-.,-/-./-./+*/+*/+*/+*/+*.*)-)(,('0,+0,+0,+0,+1-,2.-40/40/:12;23;23<34=32<21<21;10<1/<1/>0/=/.>0->0-?1.>3/=60;60;83<94=:5>93@72C60G4.O4+Y4+d5+n8,x:-;.…;.<4‘<5>3@3A2“B1—A2™@0 >1¦@4ªB7ªB9¥@6Ÿ>5—=2•?2’?-’?-‘>,=+‘;*‘;*’<-’<-‘;.‘;.Ž;-;-Š;.ˆ:-†:,„;,…9)…9)ƒ:)‚9(‚9*9*~8,~8,€<1€=4€@7B9„E>…IAˆKFŒMFŒIAŽH@˜JF¡SO¨]X©hb©{n¤Žy™œ’§†‰¬‹‚ªˆ€¡„™€~‹wxnjxadr[ZhQQ]IITCCL;>D60-?1.=2.=4-=6.;819919:29:2;81?6/C2+J1,T2)^3*g7+o9-u=.z2¢B6¡C7žB7™?4–>2”>1”>/“=.=-<,Ž=,Œ=,Œ=.>/Ž<.Ž<.‹2>5€@6‚C:ƒG=…JB‡NE‹OGŒICŽID“PJ˜\Tžg`uiž‡už˜€”¡…ª‰‰¬‹ƒ¨‡€¡„~›zytˆoi}bby]\pUUgOO\HGRAAH8=A388.85.7/,3+)2()2()3)*4*+0*,/+*0*,0**0*,0*,2),2),3*-1+-1+-1+-0,-0,-0,-1+/4)/4*+4-%46!?F%T`8m|Qg‰™tžz¡~ˆ¡zŠ§{‘¶‚›ÄˆŸËŸÉ™žÇÆš˜Á•Œ·Š‚­€…®‚Œµ‰„«‰®…‰©‚~œxvolƒfZnSJZ?GM3FJ1DF./0+.0+/0+01,01,01,12-21-32.43/43/62/51.41,3/,4/,50-50-4/,3.+2,,1-,0,+0,+.,-.,---/--/,,.++-*).))+.)/.)-/(/.)-/)-.)-.*+.*+/+*/+*-,*.-)--+-.)./*./*------.,-/-./.,0/-2.+2.+2-*4,)5-*6.+8/*:1,:1*;2+=4-=4->50>50>50=4/<3.;2-=2.<1-<1/;0.=/.>0/>0/@1.A0)@2);4*77-39-28.56.:3-?-)F*'L)'S*&Z/(`5,d<0k@0yA0@/†A1‹B3@3“=0“;/’8-“;/“=.”A1•B2”C2’A0‘>.‘;,—;0—:2’;1Œ=0ˆ?0„?/‚?.ƒ>.ˆ@1ˆ?0Š>1Š<0‰;/ˆ:.†:-ƒ;-{9+~@3w<.q7)w>-w>-v;-}?2{;/‚@4‡E9‰I?ˆLA†MB„PC‡NE‘KI—SP”bY‘paŒ}j‰‰q‰–|Šž‚¤‡¦‰Ž§Š§Œ‡¤ˆ~Ÿ‚uš{o—uiib„_[zXZsUZnSWeNPWEJK=C?6@93;0.6**3')3'+3'+1&*,*-)+***,*(),'+.(,1(-2'-3(.3(.3(02(00)10)1/*1/*0/)-1++0-(//#5,>5,>5.>5.>5.=4-<3.<3.=2.<1-;0.;0.=/.=/.>0/@1.C0*C0)A2+>4+:6-95,:3-<1-?-+D*)I*(N+'T/)Z5-_:1e>/pA/xA-€A0ˆ@2?4‘=3“:2“;19.‹.Œ@0A1A1ŽA/‘?1•;2•;2<2‹=0†>0ƒ@/?/‚?.…@1†>/‰=0ˆ<.‡;.„;,‚:,€;,x8,x<1s9-n9+s>.s>.r8*u:,}=1ƒA5‰E:‹I=‰K@†NA„PC‡NE‘JH—SR’f]Œwf„†p€“wž„¥†ˆ§ˆ§Š§§Š¤‰Ÿƒwœ}o˜ve’i`‹`Y‚ZY{X\wXZnSSaJNUCFH;C@7<737/-3*+2)*1(+.(*,*+**,+),+),-(,/)-2(02(02(02(02(10)1/*1-*3-*3-*12-12.-0,)--%8:,SXBox]€‹i‡–o†™l†žnˆ£p†¤p„¥pŠ­w“¶€™¹‡–¶„“³Œ®{†«x‚¨w‚¨yƒ¨|ƒ¦|‚¤{x’uqˆnh{eYjWMZHEL<@D5;=/12,12,12,12,23-23-43.43.54/54/85085085074/72.61-80-80-7/,6.+4/,3.+2,,1-,1-./-.0.1/-0--/,,.+*/+)./(/1'//)-/)-/)-/)-.*+.*+0,+0,+/.*/.*/.)0/*0/*0/+//-///0./0./0/-/.,1-*2-*6.+70*90+:1*<1+=3*>4+?5,?6-?6-@7.@7.?6/>5.=4-=4-=2.<1-;0.;0.;0.;0.<1/?1.C2+E0+H/+K--L,/K+.I*/E+.A-,@.*A.(E.(M.)X1*b3-g5,j:,o;-w;0=4‡<6Œ<5:4:4Š<2‡=2†>2…?3†A2‰A3ŒB5C5Ž?2=/Œ>1Š>.‡>/…>,†=.ˆ<,‰;.‰<,ˆ:-†:*ƒ;,<)~=+{<+}=1z<1v:/u;/x@1x@1v<.v;-?5‚B8‰F=‹H?‰JA‡KA‡NCŠNF‘JH˜TQ–f\ve‡…n‚‘t{¤ƒ…¨‡ˆª‰ªŒ©ŒŽ¥‰ˆŸƒš}y˜xi–ma’e\‹a\†`]‚`[|]UrVPhPFYEBP?:D93:2.3,*/)*,)**(0'(1&*1&*1&*0'*1(+0*.0+//*.-+.,+0+,0)-0(-1(-1)-01/23/..*'**"57*PUAmv[|Ši€k~“j™jƒŸn€ n~ m€¥q‡¬x¯|‹­zˆªx„©v§v§u¦w¦y¤y€¢}}›yw‘tp‡mh|cYkUMZHDH9=?299-23-23-34.34.34.45/54/54/650761961:72:72961940940:2/91.91.80-50-4/,4..4..3/03/01/01/20.1..0--/-+.0)02).0*.0*.0*.0*,/+,/+*1-,1-,0/+0/+10+10+10+10,11/1111/010.10.2.+3.+3.*92,92,;2+<3,>4+@6-@6-A7.B8/A8/B90A8/A81@70>5.>5.=2.=2.<1/;0.;0.<1/=20=2.B3.E2.L..R+0V'/U&.P'/I).C/.<1+;2)?2)G0(R/)_.*d/)i9/k;/u<3}<6…;8‰;9Š;7ˆ:6‰>8†@8†B9…B9…C7†B7‡A7‰A5ˆ@1ˆA/‡@.‡@.‡>-ˆ<,ˆ;+‰:+Š8*ˆ9*‡:*ƒ:)<){=(x>(x>*‚>1{7.z7.z<1v;-w=/|A3{@2€B7ƒE:†H=ˆJ?†J@‡MBˆODŠQHŒSJŽ\QŽh[‹tb…g€‹m~–vž|ƒ§ƒ„©‡‡ª‰‹ªŠ‹¦‡‡ ‚ƒš~}˜yq•oi”ifgfŒeg‹gd†e_~_Zw[PhPK^JBP?8D62:/.4*,/(+*%2&&5%(4%(2&(1'(/)+/+,.,-+++*+-*+-(,-(,/',/',/*+-.*+1++0+'.+"88,PUAiqYv„c{Œhyh|–iœl}Ÿmyžkz m¥r‚§t€¥q}£p}£p}¥s~¥v~¥x}¤x|¡x}Ÿzz™wuqn‡je|bWkRN[GDF9?=1:8,45/45/45/560560560761761872872;83<94<94<94<73<73<41<41;30;3083072/61.61.5106216213122011/00./1-.2,04+.4+.4+.2,.2,,2,,2,,3/.3/,3/,3/,21,21,32-32.32032032032051051.61.61-;4.<5/=4-?6-A7.B8/E8/C9/D:1D:1E;2D:1C90B8/@5/@5/>3/>3/=2.=2.=20=20>31>31@51E31M02T,4X)3W(2R)1K,1B30:6-77+:6*B4)M2)X/)^/)f:1j;3s<7z=:‚<:†<;‡;;†::‚;7>8A8B9ƒC:ƒC:…@9„@7‚C2‚C1ƒB0„?/†=.ˆ<.‰:-‹9-‰7+‡8+…9+‚:+~=+x>*v?*x>*9-|/'‚8/„>4w4+s5*}A6}C7E:€G<‚I>ƒJ?„KB†MD‡QG…WJ|aNzjQ€pYu]‚|bƒ†i†“uˆ|ƒ£~§‚‚ª…‚¬†©„¥€{ž}z™wz’pzlxlwŒkumr‰lm„gkd`rX[iRR[HHL=@@4;7,70&5*$6('5''3''1'&.)&+*(++)+-*',('+*)+*)+***,+),+),-)*,#$2*'50*86*BC5UZFfpWn}^tˆeqŠbuex˜iw›ks™htšiwŸkz¢nx lwŸmx ny£s{¥u{¥w|£wyžuzœww–tsŽom†hd{_WkPN[GCC7>:195,560560671671782782872872983:94=:5>;6>;6>;6>95>95?74?74>63=52;63:5294194184184395484373243151240/6-06-.6-06-.4..4..4..4/,40-40-40-51.32-32-43.43.43/431542540841850940:5/=60>7/@7.A8/C90D:0G:1H;2F<3F<3F<3F<3E;2C90B71A60@51@51?40>3/>31?42@53?53@72C52I35P16T/6S.5P05J22C52=90<:-=:+C7)I6(Q3)W2)]2+d3,l50v64}77‚87ƒ77‚66~75}:4}<6}>5€?9ƒ@8†?9…A8€B3€C1B1ƒ@0…=/‡;.ˆ:.‡9-…9,ƒ9,‚:,<,|=,y>,x?,|=,‡5*‹2,¡LE§XQ‹A8|90‚F;€K=yH:zJ<{M>|N?}OBQE‡UJ‚_LrkOosR|uX‡w]yb˜iŸ‹s ”z––z|‹£ˆ¨…§‚€¤~{Ÿy~™vƒ‘p…ŽoƒŽp€pp{ŽpwŒms‡kj~bfv\_hSV[GOM>GA3@6*=0';,'9+(6+'3+(/,',-'+.').().(+-(-,*/+*3)*4(*7'*7'(3($<3,E>4IG8QR@]bKgqVjyZn‚]k„\l‰]p‘bq•eo•do—eršfuŸmrœjq›itžnx¢rz¤vy¢vyŸvvštw™vu”rokj…fc|^UlON\ECC7@91;4,671782782782893893983:94:94;:5>;6?<7?<7?<7@;7@;7B:7B:7A96@85=84=84<73<73<73<74<74<74;639529338308/09/.8/080.80.80.61.61-61-61-52-52-63.63.74/74/540540841952:63<94=84@93@70A8/C90D:0G:1H<0I=1I=1J=4J=4J=4I<3F<3D:1B8/A7.A81@70@72?61?61@72@72A83?74@85B86D97G96H96H96H94E80E8/E9-E9+G9,I9*K9+Q7*Z/&d/'n3-z63ƒ98‰;9‹;:‹=;‹A>‡@:‚=6<3:3‚<4ˆ=7‰@7ƒA5B3‚@2ƒ?2ƒ=1„<0;/€/|>/}>/=/†9/1+¢<8ÍlfÙ~y­ZTŒC<ˆLAN@tJ(+C&+E$+C&(F5-LC4VQ>[YD`bJgmQiwVj{Wl‚[g‚Wf†WlŽ\o”an”an–bršfsko›jo™irœnw ty¢xxžwu›vs—su—vs’rn‹li„cb{[TmMM]CGH:E<5@707827828938938939:4:94:94;:5<;6?<7@=8@=8@=8A<8A<8C;8C;8C;8B:7?:6>95>95=84>95>95>95>95=85<73:51;30:0.:0.91.91.91/91.91.72.61-61-63.63.63.74/74/74/540651952;83<94?:4B;5B;3A8/B:/C9/E;/H<0I=1J>2J>2K>5K>5J=4J=4F<3E;2C90B8/B92B92A83@72@72A83B94A:4?82@93B;5D=7F=6G<6K<5N;4M6.N6,Q6+Q6+Q7*P9+P9)V6'f6*r6,~;3‰@9•D@›HDŸJGŸLF QJ™LDŽD;…;0„7-…7-Œ91=4ˆ>5‡>7†=6…<5…<5=4}=3z>3x@3vA3x@3z>3<3ƒ:3ˆ73‘31˜(&³=;ì|zý•’Åhc–G@‰K@xH:nMhV>lX@t[E`L€hPysQ„wUžt\´l^É__ÓV\ÙQ[×T\äouÙzx̆|À~µ•€«•}£’xŸvœŠrœŠt™u•u‘‘u‹’s†‘s‚‘r|‹ny†ju{amoWgbN_TBUE5R/(9/&7.'6/'81):/)=.+A,+F)+H(+K'+H)'TB4YQ9B?:D?;D?;E@8E>8D=7B;5B;5B;5B;5B:7B;5A:4A:4A83A83A83@72@64>71>71>71<71<71;60:5/85.85.74/74/961961961:70<71=82A:2B;1C:1D<1F<2J>2K?3L@2N@3N@5N@7N@7L?6K>5I<3H;2E;2E;2B90A8/@91?80?80?80@93@93<5/MD=M@:K:3T@9R62O0+a<6\3-`5.`4+^/'^/%f6,m=1q=0‰I=G;—I?ŸKAŸF>›>7š=6žD;¦ND¤PE¨VJ«YK¥OB™A5—;0›>6“98‘98Œ65†52†84„?8|@6r>1rB4oA2q=0v:0‚72Œ43’-1š',ÈHIèbaÅEDÍWUáyv«VO†F<„VFmR=i[AibFjeHj`En^D|dLjT’bL²m]ÑnhÛX]à;Lç-Eò+Hõ0Lö@YìI\ä[eånrâ{|ۀ}ۃ؉‚Ãv½wº„x¶†x²ˆx­Šw¨‹y¥Œxš€o™~m˜xi“oabY„UM{IBxA>u:9:49:49:49:4:;5;<6>=8?>9>=8>=8A>9A>9B?:C@;D?;D?;FA=E@8E>8E>8E>8E>8D=5C<6C<4D;4C:1B92B92B92B92A83A83@93@93>71<71;60;6096/85.74/74/96196/96/:70<71>:1A:0B<0C;0E;/I=1J>0L@2L@2N@3N@3N@5N@7M?6J=4I<3H;2E;2E;2C:1B90@91@91@91@91A:4B92D93I81L/+V.,j76u99{;;…ECƒD?„H@…IA†G>ŽIB™NH¡PL¢OG“D7”B4šB6ŸC8 >3œ7-œ7-Ÿ=0£C5›?0™@0 E3¤G6§F6®H:¶NE´LM¯HL¥@D™9;‘98>:ƒ@8x>3o>0zI;…LA„?8„,+’).³9DÒLWÜKNßMMÊ>=À@?Ð`\³YQ„@5‚TDyaIe[@^]?ihIslOvgJ~dK–cN¼dXÖ_[æUZëANò,Eþ%Dÿ&Hÿ'Iÿ.Nù3Nò6UE8[O5cZ9gaAifEnrOz‚]z‰bt†^r‰_p‰_p‹`qŽ`u’dw”dw”dw”fs’ix–rz—xy–x~˜}ƒ„…‡ƒ›…™ƒz’zr‰om„hhd`y[TmMNaERSAVPBUOC8938938939:4;<6<=7?>9@?:@?:@?:C@;C@;C@;C@;D?;D?;FA;FA;FA;E@:E@:E@:G@8F?7JA:I@9H?8G>5F=6E<3F<3E;1D:1D:1D:1D:1D;4D;4D;4C<4?80?80<71;60:5/:5/94.94.96/96/:5/;7.>7/@9/B90C;0E;1F<0I=1K?1M?2M@0NA1M@0P?5M?4L>3K=2I<3H;2E;1D:0C:1C:1A:0A:0?;2@<3@<3D;4UD—I?–LAœNB¬RJ¾URÌOSÄLK¥@4B0 @0¥?1¥;.£7+¤8+§=/«E6¡>+˜7$:'¥>-¬A/²C2¶D:§02¯:B¹DL½LRºMR­KL–A>‚71{8/v6,x2*„1-œ37¹=GÕGWèM[âFIÏ53Ð:9½31ÈNKÆc]”J?Œ[J}cLj_CgdEtoOpQhJhN°hYäbbõQZôDQö7Iý1Jÿ2Nÿ/Mÿ*Hÿ2Oü0K÷1Jõ5Lò4Mð2Kó3Ló7Pò@XïC[îF]íIaëNcêQeèUhèVkåSjäRiãOiäNiçNlëPoòSsóVuþh…ña|å[tÕUlÍYlÉdr¨R]r-2^&'Y0,W:4Q?5B:-:8)>B1LN9VO3aV6e_?heDquT†e~ŒiwˆdxŒiu‹er‹dr‹cvŒeyhzizj€•v„›~Šž… Š’£—¨–˜©™–¦™‘¢’‡˜†zypƒmg~b^wYTmMPcGSXDXUDYVG7827828939:4;<6=>8@?:A@;BA5G=3F<2E;1D:0D:0E;1E;2D;2E<3E<5E<5@91?80=82<71;60:5/:5/:5/96/96-;7.;7,?8.@:.C;0D0K?/M@0M@0M@/M@0O?2O>4L>3K=2J<3G:1E;1D:0D;2D;2B;1@<1@<3A=4B>5F<3S81[*&‰:?¾T`ÙTeæUfãUcËJOŸ30–:/‘>0™A3®F=ÅIGÕBHÍ>@±B7§F5©B3¬@3¯?3°>3³B4´D6²G5©B/£<)¤;(©<(«:(®6&­3(¶97º9=½7>¼7<¿^õ@aøCfö@fõ?eõ?gø?hüCmÿErÿIsÿOuÿQuþUvòSqçTnåaxÖfv·Wb}15j0/X1*P8,G>/>A.;D/?G/PK._T8g`CokN||`ˆŽr‡‘v}‹qzq|s|szozŠm}Œoƒ’uˆ—z•£Šœ©•£®¦±¡¬´§±¹®°·°«µ­¡«¢” ”ƒ‘‚s„qh|c]tXSlNPdHRZCWYDYZH671671782893:;5<=7?>9@?:BA/K?1M@0M@0NA0O?/O?0O?2N=3N=3J<1I;0G;/D:0D:0D<1D<1B;1@<1A=2A?3B?6K=4\5.w32­LSÛ]iæM_å@Q×6E·&+¨1)7(’:&—<)¬@3ÃD=Ô>?Í;;±?5¨B4ª@2­?2²@5¸C9¼H;»J<¬>/ª?/¨=+¦;)ª9)°:,·;/¼<1ÊFAÎDAÐ>?Ð79Ö7<ÞBEâLNÝROÄC>ÆKCÍTLÔSMÙKJÛ?Bà5>á27Û4.Ú7.Ð1+Ï:4¿84³@9µ[P–UC{N9‚bI†kP„`F’[F­fTËrdçmhêEKò:Dê9Cç=8@?:@?:C@;DAGB>GD=GD=HC=ID>IE2I=1G=1G=1F<0F<0E;1E;1D;2C:1A:0A:0@91@91=82<71;60;60;7.;7.;7,<8-?9-A;/D0L?/M@0NA0NA0O?/O?/O?2N=3M<2L;1I;0G;/F90C9/C;0B<0B;1@<1@>2A?3B?6N;4m84—FEÄY_ÛWbßCQÞ8FÔ3;½++­1'¡8%˜:!—9 ¤;&¶>.Ã:2¾71§7,¢:-¥9-§7,¯:1¸B8ºE;·E:®>2­?0§<,¤6'ª6)¶>0ÃD;ÊG=¾8-Î@6áD?ìBBô=Aó9>ë27Þ.0Û75âGBèSLåNGÜ=9Ù10ã/2ê67Ù1(ÞÒA>ÒGBÝOMëWWíNRïDMð:Gö5F÷2Fø.Dû1Gþ7Nþ8Sý8Tý8Vþ9Wÿ;\ÿ>aÿAeÿCkþ;eýjý?mú>nø>oô=mö:jÿHrÿ;aÿ?dÿKnÿKn÷NmïUoãZnèr‚Âaj˜ILt:8\6-P9+PC2UM:^QAreUˆ|n•‚Ÿ‘¦§Ÿ¡¦Ÿ–œ˜•ž›ž§¤¦¯¬¦¬¨¢§£¦¨£µ´°ÂÁ¼ÌÉÀÑÎÅÕÐÌÕÐÍÔÎÎÕÏÑÑËÏËÆÊ¿½À°²¯˜Ÿ˜€Œ~m~k`t[WnRVjNS`FV`EX`H560560560560671893:94;:5=<7>=8A>9C@;DAHC?HC?GD=HE>ID>ID>JF=JF=MF2@@4P91r1/¨JKÁSV»>D½06Â03Á//º1)©1!£9#œ=!™;›< ¡=#¥;%¤6%ž6) 8-¢6,¥4,­81·@:¸C<²@6±B7­A4¨-Ï>-Ù5+á*&í"%ú%+ÿ*1ÿ.4í)*ç.+á3,ß4,à3,ã2,é0-ç2+Ú2%Ö6&Ð2&Ï7,Å6.½>7È`UÒq¦eSVBŠM:£WIÈf[ßd_çRTèCIõFMí@Dß??Ô@<É@8Æ@7ÑFAãMLïJNô@Kù9Hý7Hü5Hø3E÷6Gú;Mú8Pü7Rû6Rý6Uÿ6Xÿ9]ÿ;aÿkÿ?mÿ@qÿBtÿBuþBuüBtùBpÿFmúAaþEeÿKjþKkÿVtÿ_zõ]tòj~æp~Óow®^aƒCAg6/hB7sUJye\Œ}v£–­£¡²®«¶¶¶²¶¹ª¯³°·½¶½Å½ÁÊÀÃÊÃÂÊÉÆÍÕÎÖÝ×ÛâÚØçÝÛéÝÝæÚÜåØßä×ààÔÞÙÏØÊÅ˺ºº¢§£ˆ’‡t‚qexb\sW[oS[jM\iK]gL561561561560561671872983<;6=<7@=8B?:DAHE>HE>HE2G=1E=2D;2C:1C:3A:2A:4@93?74<73<71>7/>7/<8/=90>:1A:2C<2D=3H@5I?3L@2MA1NA0P@0O@-O@-L?/L>1M=0L;1J91I81E80C90@9/>:/;;/<<0=>0>?1A?0S8-‡<7Ä\[ÊZY®86«.*²1+®.%­2#¬9&¬B*ªF,¦D'£A&£A&¢<#Ÿ9# 9*£;0¦:0¦7.­<4¶C<·E;°@5«=0¨Dá;=Ö<<Í@9Á>4¶8,¹6.Ä94âHHé@Eð;Dö:Hú:Iø8G÷;Iû?NþAUÿ?Vþiÿ>lÿ>oÿ>pý>qú@rø@t÷Aq÷CjÿMmÿSs÷Jhë@`ýTsÿg…ÿe‚÷]wï_xçh{Üp}Æqx§gg^X{ZQ—~wª™’¾°­Ä¼ºÆÂÃÈÇÌÇÇÏÃÃÏËÊØÌÊØÑÊÚ×ÎßßÔäæÛéêàëíãëïåæòèæôèèðäæîáèíàéêÝçäØâÑÊÑÁ¿Â««©‘–z†xl{hbu_`rXbpVboScmT21/320431651875984984984;:5<;6==5??7AA9CC9EE;EE;HH@HH>HHLC4J@4KA5MC9LB8F=4B90E<5C:5@93?74@85?75<74<42C:5B94A96>95?:7>:7?;8@<9B?:D@7G@6J@4L@0O@-O@+L?,G@.F?/I;0K81M53K65J88F;9B?:6904,«=,­<,³=/½C4ÄF8À>1º2&Ç9+Ì8*Ð8+Ö8-Û7-â5.é3/î1-ñ.,ô.-ó0,ñ1,ê5*ã7)Ý:)Û:(Ü9&Ô3Ð3 Ï8'Æ7'¾6(ÂB5ÏSIÈNCÏSKá\Wî]ZðPRí>Cò9?÷?GêAFßCDÕAAÈ?9»<3±;/°HH>HH9H?:F=8B;5D:8A96?74?74@85@85=85;62=4/=4/=52<74=96>:9=<:>=9B?:D?9G@6J@4M@0O@-P?+L@*B?,B?.F<0H:1J65I56F35@65@<9:=6;>5@@4E<-J9)^B4€L>®QB«;- 2#¡6&£:'ž7$ž9%£>*¡;%§<(®?+³@-¶=,·9*¸6(µ7)ª9)¥:*¤9)¥;+¨>.«A1«B/«@.®?,«:(±<+¿E6ÆH9Á?1¼8+À6)Ë7+Ï7,Ð9.Ñ;-Ô8·;1®:-ª<-«=.¶E5ÆL?ÔNEÜGCã?>ï?Bú?Fþ@JøCJ÷CLúDPÿFTýBSù>Sü>XÿBaÿFhÿCiü?iù@jùBpüFvþJzÿK{ÿJzÿHtõKpñQsõ\zù_{ûXwüNqýEkúDlïEiÚKgÈ_p±nukLI~t°–‰Ì²¥äÓÉìãÜëçæêéîêçòíâóöãùûáúÿâýÿçÿÿìÿÿòþÿöþÿùûþú÷ýúõü÷ôúõòøïðôëîñèíïæëæÝàÜÖØÊÆų²®ž¡šŽ“Œ‰…ˆƒ•‡‰€†Œ~/.,0/-10.21/43/540762761:94::2<<4>>6@@6BB8CC9DD:IF=IG;JH;LI8MJ7NL7NL7OL9KI:NKBTRS_^fihxmm…lkŠkhƒ`YiYQ\OGRH@KH>GG=EE93>:1=9083-94.;60<92=:3>;4?<5@<3E>4G?4I?3L@0O?0P?/P?-L?,<;&:=(?<+A;-B71A62>42;30=84B;5H94N2.Y,)l/.‡;= FE£;0¢2$Ÿ1 ¤9'¥<)ž7$ž8"¢<&¤;&ª=)±A-¶A/¹>.»<-¾:-¾-­>-­<,²?-°8(¹>.ËL=ËG:¼6*º2&É9.Ð6,Ô6+Ô8,Ö:.Ø:/Ü8.ã6/è3,ð0-ô.+ô.+ð1)ç2'Ý6&Ô8"Ò7!Ý8$Ü5#Ú9'Ú>/Ó=.È6)Å9,ËA7É<5Í>8ÙEAåKIêJJéCCì?AëCCÞCAÕD?ÍB=Â=4¶:.®8*«:*¬;+¬8)ÀD8ÔNEÝIEà@@è>A÷BIÿHPôAGô@IùCOýGTþEUú@Uû?XþA_ÿDfÿCiÿCkÿFpÿIwÿK{ÿL|ÿJzÿFxÿHwÿKtúNtÿZ|ÿa€ýUvñCdûIkÿTvÜ?\ÍI`Ø{…¸||aC;|n®ŽÕ³§óÛÑûìåúòðù÷ú÷ôýôìûúëÿÿêÿÿìÿÿîÿÿóÿÿ÷ÿÿûÿÿýüÿþûÿýùÿúøÿøöÿõöýóôûðôùðóðçêåßáÓÏξ½¹­®¨¢¥ž£™£—£«žž¦—›£–/.,/.,0/-10,21-32.54/650880991;;3==5??5AA7BB8CC9HEQPL^]bmlzzz’‚¡€‚¨€€¦{u—rkŠe_{YSmTLdMEZG@PB;2?=1@<1?;/A;-F?/H?.K?/M@/O?0O?/P>0L?/@=*?>,@=.?;/?;2>93=:5:94<94D95M51V-+j)-„28ž8C«>C¦7.¥7(¥:(ª?-¨?, 9&¡8#¤;&¥:&«<)³>,¹@/½>/Á=0Å=1Ä>2½?3¶=2²9.®8*¯9+°:,²:,³9*¶;,¹;-ÄB4ËE9È>3¾1'À2(Í9/Ö5+Ø4*Ú6-Û7-Þ7.á6,æ3,ì1*ó0,ô.+ô/)ï0(ä2&Û4$Ò6 Ð5×2Ú0Ú4$Ü<.Ö=/Ð9.Í=2ÒD:Ä5-Å60Ê;5ØD@âMIåKIÞC?Ö=8Ó@9ÎA8Ç>4¾VádtþŸ§ÓŽd92lJ>¥ynÐ¥œõÔËÿéãÿôòÿýÿÿüÿùóÿüïÿÿïÿÿðÿÿòÿÿôÿÿ÷ÿÿûýÿüûÿýúÿüøÿúøÿù÷ÿö÷ÿõöÿôøþó÷öëïìãäÚÕÒÉÆÁº¹´³´¬±´©°¶ª¶¾³°¸­¬´©10,10,0/+0/+10,21,43.54/77/880991;;3==3??5AA7DA8IE:LF:NH:PJ:RK9RM:SL:QK=OJDVTUfdqwx††¨¹“ϐƎ‹À‡ƒ¶{w©pmšid_[~UPnNJaKGXEBM?=B;7895296/85,85,671783891;;1>5L?6K>5F<3B92=82:946;47<59<5>:1H4-Y2-w78”?D¦>E§9<ª;0ª<+«@.¬A/©@-¥<)¦;'«>*§8$­:'µ<+¼=.Á<-Å;.Ê<0Ê=3Å?6¾>3º:/·7,·7,¸8+º8+º8+»7+ÇA5ÍC8Å8.Á1&Æ3)Ë7-Ï5+Û4+ß3)á4-â6,ã5,ç5+ì1*ð/*õ/,ö/*ò/)ì0'â2#Ù4!Ð5Ï4Ö1Ù/Ø2"Ø6)×9-Ô:0Ö?6ØE=ÖF>Í@7É<5Ë@9ÖKDÙNGÒE>Å;1Å=1Â<0ÀCòBLûIUÿJYýFXúCYûC]û@_ûBdÿElÿJsÿNzÿO|ÿLyþIvÿJwÿTÿT}ýJqùImÿStÿVtøNiëD^äF]êXkÿ–¢ÿµ¼óžŽHFk.)¦kc͖óÈÁÿãÞÿñðÿüýÿýÿü÷þþöÿÿöÿÿ÷ÿÿøÿÿúÿÿüÿÿýýÿýúÿüøÿûøÿùøÿø÷ÿöøÿõ÷ÿôøÿôøýñóóéêäÜÚÖÑÍÍÊÃÉÉ¿ÊÊÀÊÍÂÉÐȾȿ·Á¸65143.32.10+10+21,32-43.66.77/880::2<<2>>4@@6B@4JD8ME8OH8RK;TK:TM;SL*F@*G?*H@+IA,IB0IA4HB6HA9G@:K=?ž51§;/ª<+ª?-ª?-©>,©>*¬?+°?-«8%²9(¹:+¿9-Ã9,È:.Í:0Ï<4Ë>5Æ;4Â91Á8.Á8.Â9/Â8.Ã6,Å7-ÑC9Ð@7Ã0&Ã,#Ð7/Ö<4Ó2*à3,ä2(ç2+è3*ê3+í2+ð/*ó-*ö/*õ.)ñ0)ì1(á4$Ú5"Ñ6 Ð5Ø7#Ù3#Ö3$Õ3&Õ5)Ô8,Ô<1Ö?6ìYQáRJÓHAÌC;ÊE<ÌI?ÈE;À>1¼:*¼;(¼:*¹:)·:(¸:+¼>0¿A3ÁA6Á<3Å<6ÏA=×EEÝGHäIMëLPèBFê@CðCIùKTþNYüJZüF\üF_øA_ùBaýEiÿJpÿNwÿOzÿNxÿLvÿQ{ÿRyþOvýOtÿVyÿ]{ÿSoîD^úTlîQd÷dtÿ’žÿ‹•ôƒ‰Ç`d§MMµjgΏŠï¼¸ÿÞÙÿïîÿúùÿüþýûÿýúÿþûÿÿûÿÿûÿÿüÿÿûýÿûûÿûøÿûøÿüùÿûúÿûúÿøúÿöøÿó÷ýñóùíïòææçÝÛßØÒÛ×ÎÝÛÏàÞÒßáÖÜãÛÏØÓÅÎÉ<94;8185052+41*41*52+63,74-85.96/;81=:1?<3A>5C?4JB7MC7PG8SJ;WK;UL=UK?SJCSJK]Wcnl‚‚‚¦‘•Åš ÚŸ¦ê¢©ñ¡¥ïž ë™›å•˜Ý”•Ö‘ʉ‰½‚ƒ±zy¡rq‘fc~XVkPN\IGRFCLCBJ??K==G;:@;9:<94?;/C=-E@,F@*FA+EB/EC4CC7BC;AC>@ACBLCANEEOCHNAIL>HI>GDCHAA=2L:.gF7ƒOAI<Ž?2”8)¥>/©>,«>*¬?+­@,¯@-°?-±<*±8'¶8)½9*Ã9,È8-Ì8.Ò91Ô;5Ï:4Í:3Ë81Ë81Ì92Í:2Ì70Ë6/Ó<5Õ>5Ò91Ì2(Î4*Ø;2Ú<3×3*ä1*é1'ì1*î2)ð1)ò/)ô-(ö,(÷-)ô/)ð1)é3(â5'Ù6%Ò7!Ï7 Ô9%Õ8%Ó6%Ñ4%Ò4(Ó7+Ò8.Ð7/ãNGèXPçZSÚQIÌG>ÄD9¿@7¹>/¹<*¹<&¹<(¹:'¸9(º;*À>0ÃA4ÉD;Æ@7É@:ÑFCÕIHÖHGØGJßIKæFHèBDíDIõLSüQZûO]ûL]ûK`öD^÷DaùFfýIlÿNuÿOxÿOxÿPw÷VxóUvôTvüYxÿ]{ÿZwûQkòI`ýWköUgêM^ö^mâKZæTaåTa×XaÁefȃ~嫧ÿÔÑÿëèÿóòÿøùÿþÿûüÿûüÿûüÿüüþüúýýùúý÷÷ü÷ôÿú÷ÿûøÿüûÿûúÿøøÿóóýîñúëîðáäéÝÝäÙÕâÙÒæßÕëçÛñíáññåìóìÛæâÎÙÕ@=6=:3:7074-52+52+52+63,74-74-96/;81=:1?<3@=4B>3JB7MC7RF8VJ:WK;XL?:6@<1A>/C@/CB0BC3BD7?D=>D@CVCIaLRhU\o\br`dobbjd`afXWaJDlG>ƒSE•XF“J7‘@+™>+¨A.®@/®A-¯@-°A.´A/²=+°7&µ7(¼8+Â8+È8-Í6-Ñ7/Õ81Ø;4Ò72Ð72Ð72Ñ82Ô94Ô94Ó83Ó6/ÞA:Õ8/Ñ3*Ö8/Þ=5Þ=5Ú91Ü5,ç2)ë0'ï0(ñ0)ô/)÷-)÷,(÷,(÷-)ô/)î2)é4)á5'Ú7&Ô7$Ï8#Î7"Ï8%Î7$Ï6&Ð7)Ò9+Ñ7+Î4*Ë4+ãNGód\ë`YÕOFÄA7º;2µ9-¸>)¸>'¹<&¹;%º9&½9*À2ÊD9ÊA9ÎE?ÕKHÓLIÎGDÍEEÖHGãIIæCDèEHòMSøSZùR\÷O^úOaôH^õG`øGdûIiÿNrÿQxÿRyÿTzðUuïZwù^}ý^|ùUpõMgùOiÿYnÿ[mÿctðM^÷TeôO`üUgõL_äR_À^_»vqל˜úÉÅÿåãÿíëÿôôÿÿýüÿÿûÿÿûÿÿûÿþýýýýüúþùöýøõÿøõÿùöÿúùÿúùÿööüððøéìôææëÝÝèÚÙäÙÓèÞÕðèÝùóåÿúìþþòôúöáëêÓÝÜB>5A=4@<3>:1<8/:6-84+73*62)62)73*84+;60>93A<6E>6I@7MC7RF8UI9WJ:XK;ZLA[NHTIMXR`gd|~§’Ê— ãžªö¥°ÿª³ÿ«²ÿ¬´ÿ¬²üª±ùª¯ó¨¬ì©«èŸ¡Ú™šÒÁ±tr¡he’]Z‡XR~XQzYQvVOnMH_C?M?:@?;:B?8>>4@B5BE:?D=:CB>FH?LUDVnQfƒarŽisŽtvx„o€€^lŠ[c’WYžWU¦VM¦M?Ÿ@.œ9$ :$§<(¬=*®?,±@.³@-´?-¶=,¹;,º6'¾6(Ä6*Ë7-Ñ7-Ö8/Ú91Ú83×84Ø95Ù:6Ø93Ø61Ø61Ú83Ý:3æC<à=6Ú70ã@7þ[Rÿlcÿ]Tç?6å3)í2)ñ2*ô/)ô*&õ(%ø(&ø+(÷-+ó0,í2+ã1'Ú0#Ô1"Ô4$Ó:(Ì;&Ê<(Í<)Ï<*Ò:,Ò9+Ò8,Ñ7-Ú@8Ï81ÜGAôc^åXQËB<Å@;·4*·:&¶<$¹<&º<&½:(¿:+Ä<0Æ>2Ç>4ÌC;ÙPJßXRÔOJÃ?:À?:ÏHDÞHGâGEæJKïPTñRWïNVíKXñL\ùRføOf÷Ke÷JfüMlÿQsÿRvýRvôWvîXuõXuû[wÿ\xÿZsÿWnÿVkÿbuýVgÿ\mÿ[lñFXôDXÿQeîVeÆfgªieʏ‹ç¶²øÒÏÿëçýïîüø÷ùýüùÿÿùÿÿúÿþüþýÿþüÿûøþöôþùõÿû÷ÿùöÿöôÿööÿõõöèèæØØãÕÔÞÐÍáÖÐñçÞüôçþøèÿüéÿÿóúÿùèñðØáàC?6B>3A=4?;2=90;7.:6-95,73*73*73*84+:5/=82@;5D=5H?6LB6QE7TH8VI8WJ9YK>ZMEUJNWQ_eby{¤ŠÉ”â›¦õ£®þ«´ÿ¬µÿ®¶ÿ¯·ÿ°·ÿ¯¶ü¯´ø¯²õ©ªë¢£ã˜˜ØŒŠÉ€»uq®ie c^˜`WŽ`Vˆ]TVPtMIbFCTBAIAAC<<:AB=FEACD?A?@DBEOMRWVdch†quš}¢‡}Ÿ’}œ {š¥pŠ¤`u¬Yi¶VaºQU¸HF°@4¬;)¬<&­='¨8$¨7%«8&®9(°8'²9(µ7(¸6(»3%Â4(Ê7-Ó:2Ù<3Þ=5ß<5ß<5á>9ß<7ß<7á>9åB=èC=çB<æA;å@:æB9ä@7Ü8/Õ1(Ø6+ëI>ÿ[Oñ@6î6,ê+#î)#ø-)ÿ/-þ,+ö((ú0.õ4/ï61ç6.Þ3)Ö2&Ô2%Ï6&Ë:'È;'Ê<(Í:(Ï9*Ð7)Ñ5)Ð4(Ó9/Ï5-Ô=6åPJåTQÛLHÍB?·1(¼;(»=&½<'¾;'¾9(À8(Â:,Ä:/È>4ËB8ÕOFÜWPÒRIÃD=¿C;ÌHCÛLHßJFåMLëSRíTWëPVéNVìOZ÷VføUhùSiúRküRmÿSqÿStÿRuòMmøUtÿ\zÿ_{ÿ\vÿUoûRiûReüUf÷RbÿZhÿZhóN^øScþYißS^¶`_—^W¶}Ù©¥îÈÅýáÞùééýøõúüùùÿÿøÿÿ÷ÿýúþýÿÿýÿûûÿ÷õýøôþùõþùõþöóÿ÷öÿõõöêêêÜÛäÖÓÝÐÊßÕÌïåÛüõåÿùçÿýéÿÿïúÿøèñîÛáßEA6EA5C?4A=2?;0=9.<8-;7,84+84+73*84+:5/=82?:4C<4G>5JB7ND8RF6TG6WG7YIBZEJpW]‚cs˜r—¥z§®«²{£¸vœÀp“ÂcƒÀTnÂG\ÐK\ÑHPÄ<<º5.¸9*µ<'°<%°;'°;)²:)´;*·<,»<-À<-Ä<.Ä6*Ë8.Ó<1Ù?5ßA8á>7à<3ß:4Ü71Ù4.Ø3-Þ93æA;ìE?éB<ä=5ã<4Û4,Ø4+Û7-Ô2'Ì, Ö6*éG:õK>ò@6ï4-ð-)ö,*ú,,ü,,ø*,ð*)ì/+è2.ã5.Ü4+Ø1(Õ1'Ñ3'Í7(Ë:)Í:(Ð:)Ò;*Ó:*Ô8+Ô8,Ñ4+Ö<4Õ:5Õ<7åONíYWÙEEÂ3/À;,¿<(À;*¿:)Á9)À8(À8*À8,Æ=3ÇA6ÏJAØUKÒRGÆG>ÀD:ÇG>ÖKDØICÝLIäSPåSTâPSâMSåNWòXdöZhý[pþZrüVnúRlûQlÿQpýGmÿPvÿZ}ÿ[{ÿVrýTkþWkÿ\mûYhøZhûamö`kí]gïfnìfmÉ\_ ]W{OF˜mfÁ˜”ݺ¶ðÔÑôàßÿõôùù÷ùÿýùÿÿ÷ÿýúþýÿÿÿÿýÿÿøùüùôüùòüùôýøôÿùöÿøöùîìïäâåÚÖÛÐÊÜÒÈîäØýöäÿûèÿýçÿÿíúýôêðìÞãßIE9HD8FB6D@4B>3@<1?;0>:/:6-95,95,95,:5/<71>93@;5E>6I@7LD7OF5RE4UE5WG8WI>XMKXNW^Zqpp–€†ºŒ–Ô•¡é©õ¨°ù©±ù­³ý°·ÿ±·ÿ²¹ÿ´¸ÿ´¸ÿ¯±ü«­ø¥§òŸžê—–⌋ׂÍ}yÅum¶pgªf`ž_ZYX„QQuGGcA>Q=5DH8BT=C`@EnCJ€OU–]d«fx¿kÉnšËo˜ÉiÈ`ƒÉWxÆIgÄ;UÆ2HÙAPàEMÑ;<Æ71Ä?0½@,±:$­6"­5$®5$³5&¶7(¼8+Ã;-È/Û?0Ü@3Ü@3Ò6*æLBåJEÎ50ßGFóZ\ßIKÕA?È2ÈF9ÏOBÎPDÆH<¿C7ÁC7ÎH?ÑF?ÕJEÛPKÝROÙMLÚKMÜKPëX`ó[güaqÿauúXmõOgõMgÿNkÿOuÿRyÿUwÿTqüTmý[pÿcuÿjxÿguúboõamídlãflÙhjÎghµfa^TeG<^U©ˆÍ«©åÇÅïÚÙÿóóùøöùýüøÿÿ÷ÿÿûÿÿÿþÿÿüÿÿùúþûöûûóûúõþûöÿýùÿûøþôòøíéêßÙÞÔËÝÓÉíæÖÿøåÿþèÿÿæÿÿëøúïêïèãæßNH:MG9LF8JD6HB6F@4D=3C<2?80>7/=6.=6.=60>71@93?:4C>8EA8KC8NE6QD3RE2VF6VH;ZMGVMR[Whlk‹~‚±Š“Î’Ÿãš¦î¦®÷©¯ù­°ý¯³ý°³ÿ°´þ°³ÿ¯³ý«®û¨«ø¤§ô ¢ïšœé“•âŠŒÙ†…уÉ{u»mk¬dež_a’Y[„RQsNHbWFY_CQmBLEM˜MT¬U]¼[bÊZhÙRpâRußTuÙPlÒJbÍBWÇ8JÅ.?Ô8EãCKæGKØ>>Í>6ÌF:ÃH6¶?+·>-¸=-º<-½>/Ã?0ÊB4ÐD7ÕE:ÙE9ÚB7Û>5Ù;2Ù6-Ù5,Ú3+×3*Ô1*×4-Ú7.Ý90ß80Þ7/Ý6.Ü5,Ö/&Ù5+×7+Ï2#Í1"Ò9)Õ>-Ô;)Ø<-æD7øJAýD?ù64õ*-ö*-÷/2÷67í55â30Ú1,×0*×/,Ù0-Ù0+ã81ä91â:1â;2à<0ß=0Ü?0Ú>1Ñ7+ïWLøaZÓ;6Ñ;:æPQÜFHæPQÏ<4Ê:/Æ8,Å9,Ä:-Ä<.Ã;-À;,¾:-¾<.ÃA3ÇH9ÇI;ÂD6¾@2¼>0ÉF<ÊE<ÎIBÕPI×RMÕNKÓKK×LOéZ`ð^hüfrÿhxü]qòPeóMeýNkÿVzÿTxÿRrøTmö]qûhxûjw÷erüetó_mì`kêkrßruÃjfªd\žla}fVXH9kXJ”|r½ œÞÂÁîÖÖþîïûõõûûûûÿÿùÿÿýþÿÿþÿÿûÿÿúýÿþùûþõûüöÿþùÿÿúÿþúÿûõÿ÷òñèáäÜÑáÙÌðé×ÿúäÿÿæÿþåÿÿê÷ùëíðçèéáQK=PJ1ÃE6ÃE6ÅF7ÉE8ÎF8ÑG:×G<ÚG=Ö>3Õ;1Ö8/Õ4,Ö3*Ø4+Û4,Ú6-Û81Ý<4à=4ß<3Ý90Ü5-Ü5,Û7-Ò.$Ý;0Ú=.Í1"Æ-Î7&Ò=)Í:&Ì9'Ô8)â:/ó=9ÿ@@ÿ<>þ37ó,/ê,.á+*Ø*)Ô+(×/,Þ44ä88é99ï75ð74î73è71ã7-Ü6*×5(Ñ5&Í5(çPEÿmcÛHAÈ42×CCÓ>BêVVÙA<Ò>4Ë8.Æ6+Æ:-Æ/Á=.»9+»<-¾?0ÀA2¿A2½@.¼=.»<-ÃC6ÄD9ÈH?ÐPGÓRLÐOIÒNLÕONé^cîagûitÿnzÿduõVjõQiÿUoÿWvÿVtúXpñ^pônyöw€íksÞXañ`mñ`mìboïs}숊́|ªth™yjskXON:_VGƒqg¯–’ÜÀ¿ïÕØüéëþôõýûüýþÿúþÿþýÿÿýÿÿûÿÿùþÿÿûùÿõúýöÿÿúÿÿúÿÿøÿý÷ÿþöùðçíåÚéáÔôïÜÿûåÿþåÿÿãÿÿèùúêòôçîðåSM=RL4D=3B;3A:2@93A:4A96@;7A@;CC;IE9MG7OG2RF0UF1UH5WK?RHFXR^jg‚}§‰“Ä’žÚ˜¢ç¤§ö¦§ú«©ü«¬þ¬­ÿ­®þ¬®û¬®û¨¬ö¦ªô¤¨ñ£§ð¡¨î §í¤è›¢æ™žâ’šÛ‹“Ò†ÊƒÂ„ˆ·ƒ¨ˆyšmˆšcz©Xi»Q_ÏMYàIRèAIê=Aé=;ã>8ÝC9ÖH:ÎI8ÅF3ÂC0Å@1äTIàG?Ú;7Ø64Ø88Ø:;Ñ98È74À:/¾<.¿;.À:.Â8+Ã7*Æ4'Æ2&Î4*Ð3*Ñ3(Ô3)Ö3*Ù5,Ý6.Ü8/Þ=3Û=2Ü;1Û8/Û7-Ú6,Ø4*×3)Õ3&Ó3%Ð4%Ï6&Ò=)Ñ>*Ê9$À2È:&Ê4%Õ1'ç51ú<<ÿ=@ÿ7=÷37ê-1á-.Ù--×/.Ü43ã9:é;=ð9=ö26ø03ô01í1/ä1*Þ2(Õ1%Ï3$É1$Ñ=1új_äTLÈ95Ð@?Ë:=äRSäJHÜC=Ñ:3É6.Æ8.Å;0Â<0¿=/º;*¼?-½@.¼?-º;*º;(½;+¾<,¼>0¼>2ÀD8ÈLBÌPHÊNFÌLIÐNLèaeìaføhrÿo{ÿhx÷Zk÷UjþZrÿYsû]tîaræjtë}€ñ‡‰èwyÚ_dñgtþm|óeuëlwö‘•ì¢ŸÄ”Š¢|hjUHQSK>PJ>êDFå@DÙ8=Î65ÍB;ÈD8ÉC8ÇA5Æ>2Ã9,Â6)Â2'Æ2(Ë3(Î4*Ó5,Ø5.Ù4.Û4.Û4,äB7Ý=1Ù7,Ú6,ß9-ß9-Û5)Õ1%Ø8(Í2 Ê1!Ï9(Î8'Ç4"Ê7%ÔC0È7&Î8*×6,Þ5.æ3/î53ö:9û?>ÿLKúHFòBBì>=ê<=ç7:å26æ,1ô+1ø)/ô,.ï/.è1+à4*Ù5)Ó7(Æ0!À.ôdYë]SÏ@:ÔDCË;;ßMMêRQàHEÓ;6É6/Æ8.Æ9/Ã;-¾:+¾<,Á@-ÀA.»<)·8%¸9&½<)¾?.µ7)³7+¸>1ÁG:ÅK@ÅIAÈIBËJEåa_æ^`ñdjþnwþkuó]iðXeø]mú^sõbtèdoãlrì~ù‹ö†…éqsøryÿy†õaqàXföˆ‘ÿ´´Ð®¢ ›‡]jPDR9QT?jbU›ˆÚÀ¿òØÙöàãÿô÷ÿúýÿþÿýüÿþüÿÿýÿÿûÿþùýûÿúôÿòòþòùÿôüÿöûýòÿýôÿÿôÿÿóûõç÷ñáþùåÿýçþüãþýáÿÿêÿÿñýýóüüòXO@WP@WN?UN>TK2G?2H>2F@4GC:GE9JG8NI6RJ5UJ4UJ4VK9XNDULMZTbkhƒ{~§‰Ã‘™×˜Ÿç£¤ö¥¢ù¢¢ü¡¢ü ¤ÿ¢¨ÿ£«ÿ¤­ü¡ªõ¡©ñ¡¨ì¥¨íª©ï­©ó±©ö¬©ø ©ø—§ò’¡â–ŸÖ¦£Î¶ž¾¹…œ¸gz¿L]ÑERß>Mç;Gç?ß<=ÝEBÉ:4ÊD9ÊF:º1)ÛJEèJIéCEë>Bè;?æÚ<=Ô<;ÏB;È?7ÊD;ÑMAÍK>¿=0¸6)½9,¿7+Ã6,È5-Ë2*Ñ/*Ô/+Û2/Þ5.çA5ß9+Ù1$Ý3&å9+ç;-ß8&Õ2Ï2Ì4Ê5!Ç4"Ç4"Ê4%Í5'Ï5)Ê0&Ï2)Ñ5)Ò6*Ò4(Õ3&×3'Ü4)à2)æ3.ë52ë33é/2ç-2è-4í.5ö-3ö+/ï+,ì/-ê5.ã9,Ù7(Ð4%Ã-Ä3"çXHéYNË;3ßNIÅ41ÚHHáOPÜJJÔC@Ì;6È80Æ8,Ç9+È<+Å<*Â;(¾9&¼;(»<)º=)º=+·<,´8,µ;0¹=1»?3»?3¾@4À@5ÄA7ïjaõpiêc_ômjûqqìadôgmÿpyÿlzûhxðdoébiëdjîlnîqoîqoûy{ÿ}…ùZlücwßbpû¬¯¶ªš}‘u]rQJY:LR8snZ¥•ˆË·°íÕÓÿîðÿö÷ÿ÷ûýøüüüþþÿÿþÿÿÿþÿûÿþðÿôåþéæûêïÿîøÿöüÿôþÿóÿþñÿýñÿûîÿúêÿùæÿùãÿùáÿùáüúåÿÿõÿÿûÿÿûYPAXO@XO@VM>UL=TKÌLAÁC5¸:,·9+¹7*¿7+Æ6-Ë4-Ñ2.Ø3/á53ä84ä>2á;-Þ6)ß5&á5'á5'Ú5"Ó4Ñ9$Ë9"Ç9%Ç:&É<+Ë<,Ì8,Î4*Õ3.Ö5-Ó7+Ï7)É6&Ç4"Ë4!Ï4"Ø2$Þ2&ã0+æ.,æ,-æ,/æ-2è.3ì+.í,-ì0.è2.à4*Û5'Õ8'Ò9'Õ?.»*ÖD5Ð>1ÙF>ëVPÚB?ØBAçUVâRRÜKHÔC>Í=5É9.È9+Ç8(È;*Ä;(¿:'½<)½>+º?-¹@/¶>.²:,´;0·=0¸>1º?0½?1ÁB3ÅC5ëi\òmdçb[ðkfõolèbañklütxÿq~ÿo|öirí]fêY`ñbf÷qpþzxûvwÿx~ùRdþ[pä]nö¦©©¦“jŒkZtON_;SZ;us\©ÖĸöáÜÿõñÿúúÿúûÿûüüüüúþýûÿþúþÿõÿúíÿóáÿéáýæéÿëóÿñøÿòýÿòÿÿñÿýïÿýíÿúéÿöåûóàúòÝüôßü÷äýúóüüúÿÿý\PB[OA[OAYM?XL>WK=VJDã=?å==åAá>CàBè;?ã9<Ü68Ö66Ñ96Ì;6ÕHAÄ;1¾5+ÅA5ÍK>ÆH:»=/·8)º6)¿7)Ç7,Ï6.×50Þ71æ95é=9×3*×5*Ú6*Ü6*Ý5*Ý7)Ú:*×>,Å4!¿4¹4!¹6"¼8)½8)½3(À-%ã@;å>8Þ=3Õ<.Ì9)È7$È7"Ì7#Ò7%Õ3$×/&Ù.'Û.*Ü.-Û//Ü./Û,)ß0+à5-Ü5,Õ3&Ð4%Ð9&Ñ>*ÔA/Â1 çSEÒ;0ÚA;ÞC?èJIðTUíUTçSQãOMÝJCÖC;Ï<2Ê8+Å6&Ä7&À7%¼7&¹:'¹<*·>-µ=,²=,°:,±;/´<.µ=/·=.¹?0¾C4ÃE7Ü\Qêg]äaYðlgöpmça`ìfgójqàR^ï^kõhqòemñ`gôeiùqqþxwútuÿnuóJ]øRhä[mñœ¡£œŠa€`UoHOd=W`Aww]­¥’áÑÂÿîæÿøñÿüøÿþúþÿúûÿüûÿýûÿýùÿûóÿöèÿîÜþãÚøÞáùáèûåïüèöýëýþìýúéÿúêÿ÷æúñàôèØòçÕöëÙøñáþúñýüøÿþû\PB\PB[OAZN@YM?YM?XL>XL>UI;TH:SG9RF8RF8RF8RF8PF:LE;KGEç=Fã?FÖ:>Ñ?@ÑEDÆA<º61Å>:êZYÝABã@Cæ=@ã:=Û89Ó97Ð<8ÎA8ÏE;Â:.»2(À/¸9(½8)Â9)Ë8.Ò:/Ù80à91è;7ë>8Ø1+Ù2*Ü3,Ý5,à5-ß7.Û9.Ö=/É7(Æ:)Á<+¾<,¿;.Á;0Å<6Î95ëC@í@<ä@7Ù=1Ï9*Ç9%È:&É;%Ï<(Ð7'Ï1%Ñ1%Ô1(Ö3,Ô1,Ñ/*Ó2*Ó5,Ó7+Ð7)Í5'Ê7%Ì;(Ì>*Ì;(Ï<,ô^PàF<Ò3/Ò.,æ@@ûWXÿusÿroÿjgö^YçPGÕA7Ç5(½. Ä8'À8(»8&¸;)·<,µ=-²=,°<-¯;.­<.°.¼B3ÀF7ËMAß`Wâa[ôpløtræ`aä]aæ]dÖHTçYeógrôgoöelükpþsvþvvûpsûenñDXôKbåXk뒖 •ƒ_zYQlCSh?\gEy|_°ª”çÜÊÿõèÿùðÿûñþþôýÿ÷ûÿúùÿúöÿøòüóêûëÚøÞÎóÒÊëÌÏìÎ×îÒàðÖéóÛò÷áöõáûöãüõãõìÛíáÑéÝÍíáÑñèÙüõíü÷ñþùó\PB\PB[OA[OAZN@YM?YM?YM?WK=VJ@Ð@?ÐIE¿>8³2,ÈC<àUPÜDCáACã?@á>?Ú?=Ô@<ÑD;ÏF<Ç=2À8*½5)½9*¿=-¿=-½;+½<)Â:*Ç;*Ï;/Õ;/Û8/à8/ç83é:5æ95ä52ä20æ21ç32æ40Ý2+Ô0'Ë1'Ë7-È:0Ä7.Á4-Ã40Ì:;Ý?@ë8;í76ä71Ø5,Ì4&Æ5"Ä7#Å:%Ë=)Ë8&Ì4&Î5'Ô8,Ô:0Ó9/Ð8-Ð>1Ê;-Å8'Ä7%Æ9'Ç<)Ç<)Ç:(Í>-Í:*Ø>2áC:Ô/-ä::à24ß56×53Ö;6ÞC>åKCêQIêSHèTHäUGË?0Ä?.¾<,¸=-·>-´?.°?/®>0¬<.¬<.¬<.¬=,­<,±=.·A3ºD6ÆLAÞbXâc]ðnlôrrå`cå`eç`g÷kvûoz÷kví`hð_fýlqÿx{ÿy|úmsø^jóAWôC]èUh懍£“ƒg]YtI^uIhwPˆf³²–èâÌÿúéÿýíÿþïýÿòûÿôøÿôôÿñíûêäòáØî×Åèǻ伺޺¿Þ¼ÇàÀÍâÃØæÌãëÓìîØôñÞ÷òßóêÙìàÒèÚÍêÜÏïáÖòèßñèáòéâ[OA[OA[OAZN@ZN@YM?YM?YM?XL>XL>WK=VJQI>QI>SK>UL;XM9XM7YL9XM;WK?ULGYSWe^nnjƒut–~}¥„…±†‰´‡‰¹Š‹Á‹ÈŽÏŽŽÔÕÓ”Ó‹ÊƒˆÀ|¸u|²ov­io«ljœ€lˆ“cy®YvËPoãBdð7Vö4L÷8Hï@EåFBÝJCÛJEáGGèCJò=Nð>LäCI×CCÌA>ÎIDº;4°4,ÉI@ÕLFØBAÚ?=Û;;Ú<;Ø@=ÔE?ÍG<ËG:À8*Á8(À8*¾9(¼9'»8&½:(À;(Ä;)Ê=,Ò<.×;.Ü8.á6.ä6/è50é32è./é,0î02õ47õ77î45æ21Ú.*×4/Õ62Ñ32Ï/1Ò/4Û6=ê:Dí06î02æ3/Ü3,Ñ5)Ê7'È9(É<(Æ8$É6$Î6(Ó:,Ú>2ÝA5ÝA5ØA6ÓG8ÉA1Â;(À9&Ã<)Æ=*Å<*Å8&Ì:+Í7)Í0'æC<Û2/ï?Aã/2Ú*,Õ1/Ò5.Õ81Ö90Ò8.Ì5*Æ2&À1#ÎE5ÆA2¼=.µ:*±9)¯9+«:,ª:,«;/«=0¬>/¬<.«<+­<,²>/µA2ÉSGàg^àc_êjiînoæchðjqõoxúq{ýt~ömuîbködnÿrzÿx~ÿquúipøWfùAYô@[êQfá~ƒ¬—†ykmˆ]o‰ZyŠ`—r¶·˜ßÞÂùôÞüúåÿÿïûÿïõÿïïÿëçúäÜïÙÐãÍÅÞÁ°Ö­¨Ó¦ªÐ§°Ó«¶Ô®¼Ö±ÇÚºÒßÁàæÌèêÔòíÚòéØîâÔìÛÑêÙÏìÛÓéÚÓæÙÑåØÐ[N>[N>[N>[N>ZM=ZM=ZM=ZM=YLUL=XLNÝAEÔFDÈA=ÉHB´:/±7,ÎOFÉB<Î=8Ð64Ï10Ð51Ó>8ÏE;ÈF9ÃD5¾9(Ã:(Â:*¿:'½8%¾9&¿:'Á:&Ä9&Ë:)Ó:,Ù9+Ý7+á5+ä3+ê3-ë*+ñ*-ø-3ü/4ÿ17ÿ37ÿ38ý58ù8;õ8<ò9>ò9Aô9D÷7Fû6Hþ5Eô+5ô-2í12ã4/Ù6-Ð8*Î;+Î=,Ë5&Ñ8*Ù;/ß=2â>4ä=4å>5ßA6ÙJ<ÏG7ÉA1Ä<,Â9)Â9'Æ8*È9)É2'Ó9/á@8ëD>Þ0/à..ë46è66Ø3-Õ7.×90×:1Õ;1Ò;0Í:0É;/ÖL?ÌF:¿@1´9*°6)¬6(«7*©8*¬;-­=/®>0­=/«<+«<+­<.±=0ÀKAÚdZÞc^èkiðosêinõrzüvîfp÷oyùryöjsþlvÿwÿv}ùhoùcn÷RbþB[÷ZM=ZM=ZM=ZM=ZM=YLVJ>XL>YN5É83Ç/,Å*&È/*Í:3ÌC9ÃC6¼>/À;*Ä;)Ã<)Á:'Â;(Ã<)Â;'Ã8%Ä5$Ê7%Ô8)Ù7*Ý5*á3*å3)ê2*õ33ÿ58ÿ8<ÿ4:ÿ-2ÿ(-ÿ(-þ+1ü-3ö)0ò&1÷)6ÿ,?ÿ*Aü 9ó/ö"0ó(.í,1æ0/Ú1,Ô3+Ñ5)Ð6*Ô6+Ý90æ=6ë>7ë:4è71è50â92ßH=×K<ÓE7Ë=/Ä6(Â3%È6)Ï8-Î4*Ô6-æC<ß82à21Ò ì89å63Õ1(Ò4)Ò4)Ï5)Î6+Ê6*È5+Å7+ãYNØRFÊH;¾@2·;/µ;.µ<1µ<1¯9-±;/±=0±=.¯;,­9*­9,®:-±<2ÐYQÜb]ìppôvyîmrõq|ör}ÿzƒÿ‰ÿy€ôhq÷epÿq|ÿuÿktø^jöOaÿA^÷8WéG^Ûntº‹™©„‚žn~šg—hœq¡©‚´º–ÈÍ­ÕܽÌÙ»ÁÔ´²Ì©§ÂŸž¼˜š¶–²Œ±†‰³†µ~¹„•À‹œÂŸÄ‘¨Å™²È¡¾ÎªÉÒµÚÙÄæßÍêÞÒéÖÏáÌÉÛÆÃÔÁ»Î½µÈ·°ZM=ZM=ZM=ZM=ZM=ZM=ZM=ZM=XK;XK;XK;YLYM=WMCWLHXNOZPX]Ub`Yia\rjfokŽsp›vq§{u³ƒ~ÁŠƒÉŠƒÇˆÀŠ~¼ˆy²ƒr¨†r§t«‡l£†\„HL¤B9¶A:ÍC@Þ@?è:;ô<>ÿDE÷><ó=<ì>=ê@AëBIêCMëANãALÐ>>Å@9¾?6·>3°,º7%Á:'Ã<)Â;(À9%Â9&Å:'Ç:(Ë:'Ð9(Ö6(Ø2$Ú."à/%ì7.õ=5õ82÷40÷0-ø**û&(û%'û%'û%'û&*÷!)ø".ÿ'7ÿ(>ÿ!;ÿ6ý1ÿ'8ï#,æ#+ã+-Ý--Ô+(Ò-)Ü41â62è64î66ò65ò12ï./î,,å/,Ü92Ñ:1Ò91ìSK»"Ä+#ßF>È.&Í.(Þ<7èE@â:7Ø/*Ú.*â51å<7ß>4Õ<.Ï5)Ë3&Ì5*Í;.Ë;0Å8.ìbXàZOÈC:¹6,º:/¸8-±3'´6*°0%°2&®2&¯4%°6'²:*´<.³=1°:0ºC;Ö\Wìppñsvöx|ûyƒõq|ÿ|„ýw€út}üs{ÿr~ÿr}ÿmxÿgsü`nôI\ÿ>\ÿ>[äAVÔek´•€’¡zƒm}™f~”c‡—j”Ÿwž¦ ¨ƒœ¨„’£Š£|€Ÿvzšqyšo|r vƒ¤u‚­wƒ³y‹¸‘¼„“¾†—¾‡œ¾Œ¢½§¼“¯½š¾Â§Ï̹ßÓÇãÒÊÜÇÄÔ¿¼Ìº¶Á²«¹ª¥ZM=ZM=ZM=ZM=ZM=ZM=ZM=ZM=XK;XK;XK;YL]P@[OC[NFYNJZPQ\SX_U^_Wfd\tibƒng‘qjxp¬€y¼‡€ÄŠÄ€Á~ºt«Œn¢—q¤¡u¨šjž™W{=Aª5+±5+Â<3Ó@8Ý>8è?:óA=õ=;õ;<ô;@ñ>Bî@IèAIâ@KÚAFÇ<9½=4¶<1±;/«:,®:+½A5ÐJAÚG@ÜA=Ô63Ð51Õ@9ÍC8»9+²5#½8'Â;(Ä=*Ä=*Ä;(Æ;(Ç:(Ê9(Ï9(Ï6&Ô2%Ú2%ã5*ê8.ï80ð91ç1&ç/%ê.%ï,&ö+'û+)þ,+ÿ-.ü*-ú%+ú$.ÿ'7ÿ$;ÿ7ÿ3ü0õ0ö.9õ3<å*1Û(,Ü.0Þ02Û+.ñ:>ô7=÷4:ö26ö/4ø03ù25ô87Û2-Ú;5×82äE?äE?Î/+Ñ2.Á"Ô51á?:èE@à=8Ø3-Ù2,Ý60Ý:1Ô:.Ï9*É5'Ç5(È9+Ê<0Ê<2Æ9/ícYáXNÉ@8º4+Â91Ã:0¿6,Â9/¿5+¾4*½4*»5)¸6)µ5(´6(°6)´;0»B9ÓYTèljïqtöx|þ|„øv€þ|„üyùv~þuÿsÿp}ÿkwüdqý_nöI]ÿ>\ÿ>\éCYÓeh®Žw‰˜oz•bu’\xŽ]cŠ•k˜p‹•p…”mp‡]l‰]h‰\g^k_q•ey›izŸk¬t„±vŠ·|»}¼“¼‚–½†›»‰›µ†¡³‹­¶—¾½¨ÏÆ·ØÇ¿ÖÁ¼Ï¼¸Æ·´º¬©²¤£\L<\L<\L<\L<\L<\L<\L<\Lù:Aö=Eï@GæAHÙ@EÏ@BÀ;6¸90±9+­9*©8(­9*»?3ÏF<ÙD>×96Ù74Ú;7ÜC=ÝOEÎH<µ3#¾9(Á:'Ä;)Æ=+É=,È<+É:)Ì9)Ï7)Ï2#Ó/#ß4*î=3ô?6ñ91é4+à4&ß5&â2%å/$ë,$î+%ñ+(ò+(ó+-ð(+ò&/ø(6þ%:ý7ü3ø3ô%7ò0;ó5Aò8Cð;Dðä,6ð2<ó/;ö.9ö-7õ.3õ.1ó/1í42Ü0,â=9Ú64ß;9ÿmjåCAÑ/-Î/,Ù:7ß@<àA;Û<6Õ7.Ö5-Ö5+Ò6*È6'Ã6%Â6'Ä8)Å;.Æ<1Æ<1Å;1ë`YáTMÉ<3¿0(Ë;3Ñ>6Î;3Ò=6Ø=8×<7Ô=6Ï<2É;1Ã9.¼6*¶6)¹;/¼@6ÏTMãgeíorøz~ÿˆû|ƒû|ƒûyûx€ÿwÿsÿn}ÿgvû`pü[mõG^ÿ\ìFZÎ`až~ev…Zi„Qh…OmƒRt…X{ˆ]}ˆ^x„\q‚X`zM_Pa…UeYn•`uœg} j~£mƒ¬r„²tˆ¶x‹¹y‹¹y¹z‘º~”º“±•¬€›©†©­’ºµ¢Ç¹®Ë¸²È¶´¸¬¬ª¡¢ —š[K;[K;[K;[K;[K;[K;[K;[K;ZJ:ZJ:ZJ:[K;[K;\L<\L<\L<]K=]K=]L<^M=^M;^O<^O<^O<^Q@^Q@]OB[OC\NE[NF\OI]OO^P_bTmdY{i^‰pgœ|t­…{·ˆ{³™…º¥…´¯€ª¸z¡ÆxŸÑuœÌcŒÈMlÜFRßA@ÕA=ÏE;ÌH;ÍG;ÓE9ÞA:î@Aõ0ÎD:Õ<7Õ31à;9åA?áD?èSLßUJ¿:+Á9)¾7$À7%Ä;)É=,Ê=,Ë9*Î8)Í4&Ò2&Ù2)å9/ñ>7õ>6ð5.ä/&à6)Þ6)à4*ã1'ç.)ê-)ì*(ì**ê),è',ë'1ò)9ö&<÷!;û=û%Aû6Hä(6ç.<ÿP\ÿ`lÿP\ò;åGDÛ=:Ú<9Õ:5Ò80Ñ7-Ð6*Í4&Æ3#¾5#¹6$»8&¿;,À9é=9æ?9á@8Ù?5Ð<2È:.Á9-»9,»=1ËNHàc_ìnoú|ÿ„ˆý~…øy€øy€üyÿx‚ÿt‚ÿn}ýetù^n÷VhóE\ý8Vÿ^N>\O?^NA]OB^PE^OJbNYbQdcTqdZ}le‘xr¢w¨ƒv¤”}§¬†«Â‰©Î‚žÚw”ál‰ÛXwÚD_óBTúDPïJPáIHÐE>ËE<ÐF<ÙD>èBBð@Cõ@GõBHíDGßCDÏA=Â?7¿@7µ=/®:+«:*ª9)®8*»;.Ì?6áFAâ=;îBBëAAÞ;6ãJBæXLÕK>È@2À8(¼3#Á8(È<-É:*Ë7)Ð8+Î0%×3)à8/é;4í:5í60ë0+å,'ã0,ã1-ç10ì31ó25ö37÷48÷6;ì-5ê,6í.=ñ0Có-Fö)Gý+Nÿ3Rô9Lå3?ð@Mÿ_lÿlzÿWfõCSõ>Pî3Dí3Aí3>é6<ã99Û83Î4*Ç/$Ë2*Ç.(Ð72òYTö\ZòXVÛA?âHFÜB@Ô<7Î70Í6-Ï8-Ï9+Ê7'Â5#¹8#³9$µ:(¸=-¹;,¶6)¼7.Æ=5ÛNGÙEAÎ50Ð1-á>9ç@:ã81ç51ë20î21ë52ç83á:2Ø:/Ð9.È:.¾6*º8+ÈIBÜ_Yënlû}€ÿ…‰ýƒõv}öw~üyÿx‚ÿsƒÿk}ýdvù^pôSeôF]ý8Vþ=ZïL]ÀTRz_BWhÑC?ÖEBãEFèBDîAEíCFçDEÚEAËB:¿?4»?3±;-©8(¨9(ª9)°8*¼:-Ê;3èIEé??ë=>å78Ú2/ÞA:îZPôh[ÚPCÉA3¾5%Â6'Ç9+È9+Ë7+Ò8,Ñ0&Ú6-æ;4é;4ê40è/,ê-+ë--ó49õ3;ø3=ü3=ÿ1>þ0=ý1=ù1>õ0Aò1Bô4Kõ5Nõ0Nö-Oÿ1Xÿ>_æ3HùO\ÿanÿ_nÿWfûP`ôDXé8JóAQê:GÝ2:Ò/2Ê2-Â8-½;+¼:*Ä:/À2(ÙJBúkcÝLGáPKÏ;9Ï;9àLJÔ@<Ê70Ê7-Î-±9)¯3'º:/ÊD;ÖGAØC=Ô72×2.ç;7ì:6è2.í2-ò,-ô,,ò./ï31è71â:1Ú<1Ò>2Â6)º4)ÅB:×XRçjhú|}ÿ†‰þ€„õv}÷xýz‚ÿx‚ÿqÿi{ûbtø]oòQc÷I`ÿ:Xý?[ðO_ºQNqX:Sf8]uEa|InSv†Y{ˆ]~‹`g‚—l€œl}Ÿm|¤o}¨p€©o‚ªnƒ©l…©lˆ«qˆ®qˆ°r†³r„³oƒµp…·r‰¸t‹µv‰¬tŽ¥wš¨„°´™ÈïØ̾ÚÑÌÂÂÌ«±Á›¡±ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8[L9[L9\M:\M:]L:^K<`J<^K<_L=^M;_N<^O<^O<^O:_P;`O;aP>aP>aP>aPÉ@8¾>3¸>1¯9+¨7'©:)­<*´<,Á=1Ï?7ß=:å99ã03â/2à42Û94æMEülaòh[ÙQCÆÍD>Á63É;7äUQÕF@É91È8-É:,È9(È9(Ä=)±?'¦<&¨;&¬=*«7(¬3(¼=4ÓLFÖGAÝE@Û96Ü30é73ì51ë0+ô1-ý,/ÿ+-ú./ô1/í4/æ81ß;1Ø>2É9.½3(À;2ÏNHáa^÷yzÿˆŠÿƒ‡ùzû|ƒÿ{†ÿx„ÿn~þew÷^põZlëL`õIaü9Wû=YîM]²JGhQ1Qd6\tDf~Nuˆ[Žc„h†’jˆ—n‰žsˆ¤t„¦t§r}¨p¨n©mƒ©l…©l…¨n‡«n…­o…¯o°l€²k‚¶n…·r‡³t‡­t§wœ¬…²¹šÈƯ×νÙÒÌ»¿Ê¤¬¿’š­[J8ZK8[J8ZK8[J8ZK8[J8ZK8[J8ZK8[J8[L9\K9\M:]L:]L:^K<^K<^K<^M=^M=^O<^O<\O<`Q>aR=aR?bQ?bQ?aP>aO;bL>hOKgNRbP\cWkjfuv”}|œx—‘z–«•Æ„’Ú}…ðuzþlmÿY[ýDLþ/Iÿ5Rÿ4½=0µ?1¬;+©8(­<,´?.»@1ÊA7ØC=Ù74á85Þ..â30æ:6Ó0'Ï5)ëUGÿwjë[PÑC7Ê<0Ë;0É7*Í6+Ô:0Ú70ß82å63ç32ê01í12ô36ý4<þ%6ÿ#9ÿ"9ÿ"9ÿ!8ÿ6ý5ø6ï2î9ð%Bï(Gî&Jñ'Mÿ3\ÿEhÿbuÿ`l÷WcñQ]òP]ïMZâ@MÔ2=Ú=FÌ7;»/.®/(¦5'¢;(›?&œ>%ª9'²8+ÒVJ»;2Ä?8¾41½2/ÎC@åWSÕHAÈ91Ä6*Å6(Ä5%Æ5$Ã:(±<(§:&¨7%­9*¬4&¯1%Â?5ÛRJÙIAáHBÞ;6Þ2.ê41í1/ï-+ü22þ,/ý+.ù+-ó++í-*æ1*ß4,Ö8,Ñ=1¿2(¼7.ÈIBÙ\Xówwÿ‰‹ÿ‡Šû€…þ†ÿ}ˆÿv„ÿj|þ_s÷XlöTiêD\õD^õ6Uñ:VàLZ¥HC^K-Mc5Uo?b}JtŒ\€–g‡˜lˆ›nŠ r‹¥vŒ¬z†«wªr~§m|¥i}¥g¥g‚¦i‚¥k‚¨mƒ«m‚¬l®h~°i³j„¶o‰¶s‰¯rŽ¬x™°„­»˜¿Å©ËʵËͶ½Åžªº‹—§]K7\K7]K7\K7]K7\K7]K7\K7^L8]L8^L8]L8^L8]L8^L8]L:]J<]K=^L>\L<\L<[N=]P?^SA`SB_R?`P@bQAcRBdQBdNAdLBjMIhKMdPYf[lnk†w{ž€…­‰ˆ²ƒ©¥‡©¾ˆ Ð‚’ây~ðsqújbÿa^ùJWñ>Që:Lî?NïCQê@Kæ9Ê=4Á;0¸:,§6&¯A0­<,¬6(¿A5ÌF=Ì=5Ð72Ú85Ü71Þ5.Þ6-Þ8*Ý<*×:'Ó6%Ù;0ðSLòZOÙE9Ç8*Í>.ÔB3Ò:-Ô3+ðGBá//î5:ó6=î,7ÿBMñ'3ú&2ÿ)2ÿ(2ù'ý"*ÿ'/þ'/ð&ð)ù+7ê .ì&7ñ-Aç#;ÿXrç-Dÿ]lÿ_iþZcùU\õPWëHMÝ?@Í84Ë>7ÄA7·?1¦7&™2!™6#š;'Ÿ<)§8-®7/ÂE?¿;7½31Ä64Å54ÔDCÛLHÚKEÑD;È:0Ä4)Ç5(Ë4)Å5*¼1¹=3Ö_Yésqÿû„†û‡Šÿ„Œÿxˆÿh}ÿ_wÿ[uÿUoøLføEcñ:Yô;[æ?YÛ]i‹@;VF-L^6YuBg†Mw–]}œcg€¡jƒ¦n‚¨o€§n¦m~¥l}¥i|¤h}£f£e£f¥l¦m«l¬k~­g®f±gƒ³i‡µm‹´r°vŽ®|™´‰§½™±Á¤²Á®¦²°˜žz…‹]K7]K7]K7]K7]K7]K7]K7]K7^L8^L8^L8^L8^L8^L8^L8^K:\K;^L>_M?^N>[N=[N=\Q?^RB_SC]QA]OB_OB`NDbPFcOHeNHiMJgNQeS_g_tnny~¨€‡»‡ŠÁž•Ê£‹»«£¹xÓyƒê|{ôvjöi`ø]aóOZìFRòHSøIVõEPï?Jë;Eä9?à:<Ú::Õ=8Î?7Ç>4À/Ç8(Ê8)Ó;.Þ;4öJFä01ð6;ö6Añ.<ÿ@Nï'4ó$,÷%(û),ý+,ü*+ø((ö((÷+,ï$'í%(ê%,ý;DÙ'ð4CüARØ&6ÿjuÿbjþZaüW]ôOSåBC×<8Ñ>6¾8,¿D5¹H6©>,™/)(’(ž-%°:6ÑTPÎHGÃ54Æ45Ñ==ëWUØGBÖG?ÐA9Ç9/Æ3)Ê6,Ð7/Î70Ç=3Â91Â5.Ã2-É4.Ñ83Ø?9ÞE=äJ@ÞA8Ú6-Ý0*ç0,ò21û03û03ô02ó12ô01ó/0ó0.î1-ç4-ß9-×=1¿3$¾aP@`P@]P?\O>[O?[RC[QE[QG\OG\OI_PMcQOfTTgUUgUUgV\h]nli†sv£|ƒº‚ŠËŠÔ˜‘× ŠÊª‚´¹}ŸÏ€“䄆îvósjûeg÷S\íGQðFOöHR÷EQòAKî=Eä7=à7:Ù99Ô<7Í@7ÅA4¾?0¶>-­>-ª<+«:,¸B6ÇH?À;2»0)Ê:2Í6/Ð6.Õ7,Ø8,Ù7(Ù8&Ü9&à:*Ý4-Û4.âA9éOCÞH:È5%È2#Ù@2â>5õHDè13ò5;ù7@ø4@ÿESø2?ð)0ë#&ì$'ù13õ-/ï''ì&%õ12ë)*ö8:è+1â)1ë3=ÿR^ï=Kÿ[gþ^fñV\îOTðMRêEIÝ:;Õ74Ô?9À6,Á?2¼B5³=1¬7-¥3)¡,#œ' š%©/*ÇECÂ::¼,,È35×ABô^]Ð?:ÒC;ÐA9Ë=3Ì9/Ô=4Ú@8Û@;Û@<Ø=;Ý>;ãA?ä>>à::ã?=ëIDàB9Ý<4Ù5,Ý2+ç1-ð31õ12ø02ô02ô02ô01ó/0ó0.î1-ç4-ß9-Ø>2À4%º8+µ;0Ð[Tízwÿ“’û‡Šúƒ‰ý~‰ÿr‚ÿdyÿ[tÿTqÿNmÿFgû=_ô=\îEbßTg¢AHp;3SH2Qa<]xEf‡Nr“Zu˜^tš_xžc{£g{£gy¢fy¢fy¡cx byŸby a| bz cz¢f{¤h{§h{¨e{©a{©`}«`®`‡²jŠµn‹²s‰¬t†¦w‚žuy“no†lSeYAPM2A>^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^L8`N:aP<`Q>]P?ZN>YOCXPEXOH[QO_UTbXYeX_iYcl\fk^glaildqok‚rtšy~µ†Ê…ŒÚŒŽáŽ‡×Ÿ‹Ó­ŠÄ³€©½yŽÌ{Þzò‚wÿsrÿcgùU\ôMTõGPôCMò>Gï-±=0¼F:ÌRGÇH?º5.º1)È91Í81Ó;0Ù=1Û;-Ù6'Ü6&à8+à5-Û2+à=4ìNBãK=Ò:,Ñ8*àB6ß7.ð>:é/0ð16÷4<ü8BÿNZÿLUý>Eò38â$&í/1ê,,ð22è**ë/.ò::Ñæ37Ý,2è9@ðEMÿXcóMWØ=CÚADáBFá>AÞ9=Ü89Ø88Ó97É83Â91½:2ÀA:ÍNHÖVSÐNNÃC@²72¶95ÏKIÙMLãQRïYZêRQñYVÉ51Î>6ÒB9Ð@7Ó?5ÙB9àC<â@;é?@ç8=ì9=ò?Cï:?è58ì>=öMJÞ93Û60Ú3+Þ3,å4.ì30ò21ô01ô02ö/2ö01õ/0õ/.ð0-é4-à8-Ù?3Â6'·5(³9.ËVOï|yÿ“’üˆ‹ý‰þz‡ýoücwÿXqÿOlÿFhÿ@cû9\ô?^éKdØZh…35g;0WO8WgCa{Kj‰Ps’Yt•\u˜^wby¡ez¢fw dv awŸavž`xŸ`xŸ`{Ÿaz cz¢fz£gz§fz§bz¨`z¨]|«]~­_†²g‹´nŒ³tŠ­s†¦u€qtŽii€dQcUDSL8G@^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M9]K5_M5`P9_P;\O>ZN@XOFXQKYPQ`W\g`hnfsshysg{sg}qh}ol}pq†rw—v}«z‚Á‡Ò„ŠàŠ‹å“ãŒÚ „¿žuŸ l‚¬nq¼vlÒviòsmÿllÿgiþ^`ûRWõFMï3Û=1Ú6*Ü4'â6*à3,â70ä=5åE9âF9ÞB3ÞA2â>2Û0&ê72ì0/ï.1ñ.4ú7?ÿPXÿ]dÿZ_ÿOSá.1ã03à,-÷EEè66Ü,,Û-.ë>@Ü25Ù37ÿbhà=BË*2Ê-4Á&*Õ;=á@EÛ6:Ù37ß9=Ü7;Í/0Ì43Í;;ÕGFÞRSì`cõilôekê^aÄ@>ÆE@å^[øhgÿopÿjjåKK×=;É40Ñ>7×D<ÖC;Õ>5Õ<4Ø:1Ü41î5;ñ-7ð,6ò.8ï,4ë,3ó9<þJKß3/Ü3.Ú3+Ü3,ã5.ê40ï4/ò21ô02ö/2÷/1ö.0õ/.ð0-ê3-â7-Ù?3Æ8*´2%²8-ÃNGï|yÿ’‘ÿˆŒÿ‰ÿw…úl|øatûTnýHgÿ>bÿ:_ú6\óAaàNeÂWap/+_?0[W>^lIe}Mk‰St’\u–_v™_xžcy¡cx buŸ`uŸ`u_vž_wž_xŸ`{Ÿaz¡bz¢d{¥e|¦d|§`y§^y¨Z{ª\}¬^€¬a…¯g‡®m‡ªp…¥sƒ r{•nrŠjexe[k^RbU_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N:^L4_N4`N8^O:[N>YOEZSMZTT_ZahbprmzuŒ{u‘{q“zp“vp’qt“rxšt}¨w¶zƒÄ~†Ï„‰Ú‹ŒÞ–Ü™ŠÍ›…¶¢ƒ£ª„‘«~yŸl[šQ>¼MBÔQIâWRëWUñSRñKMí>Cå4:é9<æ9;à;9Ø=8Ó@8ÊB6ÀA0º?/³9,ºA6«5+£.$¾I?Ùg\ÙdZËUI¸<2¸6)À3)Î:0Ù;0Ú6,Þ3)ä6-ß1*ä71ã;2Ý9/Þ>0ãF5äB3ß9+ß1(é4-ð31ï-.í*.ô17ÿEJÿV[ÿ]bÿ\aâ9<ã9<Õ+,ôJKâ89×//Û57Ì()Ì'+øXZÝ>BÕ9=Ñ6:º#Ä(+Ü<>æAEÝ49Ù,2Þ17Ù05Í(.Ò37äKNöaeûhnùcl÷`iú`løbkÖLLÕNJê\ZêVTçMMãHFÏ42Î3/ÙA<àKDäOHßJCÙ@8×:3×6.Ü.-õ2:û-:ø*7õ'4õ)4ø0:ÿ>CÿJJà1.Þ3,Ü3,Ý5,á4-ç4/í4/ð3/ô02÷/2ù.1ø-0ö..ñ/-ë2-â7-Ù=1É;-³1$±7,ºC=ìyvÿÿˆÿ|ˆÿqöhxö_rùRlûDcÿ9^ÿ6]ú6\ðFcÑN`¢IMe5+VD0[Y@^lIe|NkˆRt‘[w•_x™`{ždz cvž`s›]rœ\s›\tœ]v^wž_{Ÿaz¡by¡bz¤b|§b{¦_x¦[x§Yz©Y{ªZ~ª_ƒ­e…¬k‡©m‰§s‰¥u„s|”ru‰pnlfwe_P=_P=_P=_P=_P=_P=_P=_P=^O<^O<^O<^O<^O<^O<^O<_N:aP6aP6aO9^O<[OA[RK\VV_Zakgvso†}z—‚~¡|¥}w£{u¥xv§sy©s}°x¸{„¿~†Ä„‰ÉŽÎ”“Íš“Ç •½«›µ¼¦²É­©Å¦”ªˆmœfJœE2¯A4¶@4ÂB9ÖHDèNNîJKì?Cë=?é;=ä<;ß=:Ù@8Ð@5È>1Á=0½:0¾?6¯4,§1'»I?ÑcVÖh[ÕeWÃOBº>2º4)Ç7,Ö90Ù5,ß2+ç60â0,ã4/â7/Þ7.à>1åC4ä>0Þ4%æ4*é0+ð3/ð..ï-.ò14ó78öBEöMRüY^éFKöQWØ37ëFJÝ8<æAEÚ7:Î.0Ñ05äHKÒ7;Ð7:¹#%Õ;=Û8;å;>ëÿ0=ú*7ü.:ÿ;EÿCHûABã1/ß4-Ý4-Ý5,â4-æ3,í4/ñ40ô02÷/2ù.1ø-0ö..ñ/-ë2-ã7-Ø:/Í>0µ1%±7,²;5ésqÿŠŠÿ‡ÿv†þi}óató[p÷PjúCbÿ7`ÿ7aù;_ìLf¿O[~86]=0NF1VX@ZeEcxMj…RrŽ[v”^yša{ždxžas›]p˜Yp™WqšXqšXt›\uœ]y_xŸ`x¡_y¢^z¥^y¤\x¤Yx¤Wy¥V{§X©_‚¬d„«h†¨l‡¥o†¢q€šmx‘jq…ij~cbv]_P=_P=_P=_P=_P=_P=_P=_P=^O<^O<^O<^O<^O<^O<^O<_N:cQ9cQ9aP<]P@ZPG\TR_Zaa_mtrŠyx˜€¨ƒ°~~°yy¯yu°wwµw|¾x€Á}…Ä‚ˆÄ…ŠÁ¿—–¾ ¼¬§»¶¬µ¾³±È¸«Ð¾¦ÖÁ¢Ñ»–Ьˆ¯oT®\G¤G5¨>0ÂG?àWQïWVñNOé@Cê=?æ<=â=;ß=:×=5Ñ:1É90Á80Á<5¹:3¸=5ÁOEÇXMÇ]OÑeXÓcUÂL>¼:-Å8.Ò91×4-ß2,ç60æ40á2-à5.ã<3çC7æC4â:-ß3%ê5,æ.&ð0-ï/,ð31ñ54ç-.â24çBF÷X]öW\ÿouåDJëHMà@Æ02Ö:=òHKî9>ð7?ø=Fò7Bè-8ô>Jÿ]gÿmwÿjrÿcn÷]gú^kÿaoÿ]nùYeò\]ãPIâJGÕ74Ò/0Ù54Ò0.Ø95ßD?ãJDâIAÙ@8Ó6/Ö4/Ü71è66ê'/ü0<þ2=÷+6ù0:ÿ>Eý?Aì44â3.à5.Þ6-ß4,á3*è3,ï4/ô41ö01÷/2ù.1ø-0ø..ò/-ë2-ã7-×9.Ñ?2¶0%²6,°61èpoÿ‡ˆÿ†Žÿp‚ücxñ\pôXn÷OiûBbÿ9aÿ`P@`P@_O?_O?_O?aQAbRB_O?]M=]M=aQAcSCbRB`Q>dS?aP>]P@^QI[QPZSZeapsq‰yxšz|¥~€±€¹}ºxz·rs´lo¶twÈv{̀ƒÊ‹Æ–—䤾²°»¼¹´ËƳÓÌ°ÙϬÛϧÜÏ£ÝУ٘٘Ѩˆ¸€g ^FËzgÖue½H?×QN÷ccéKLå?Aâ89ä::â:9Ü75Ù61Ö;6Ë81À5.ÇB;»<3¿I?ÆXK¹OAÎdVÑcTÌXIÅG9Ä:/Í6-Ø7/á6/ã4/ß0-ß2,à70ä=4à<0Ý7)ß5(å7,ä/$ê/&ì/)î1-î20ë40è51â64×79æJNõY]íNS×8=×6<ùX`ÿ~„ÿ~†ÿouÿgoÿipÿflõ\añX[ûZ_ÿUZÿDKü8Bû7Aö2>î+9ì0>ñ=HÿS_ÿ`iÿgrÿepþbmÿcnÿ`oý]gíSSßF@Ö85Ö41×11×/.Ø31Û94áD=ÜB:Ù?7Ö<4×90Û81à93æ66ð7<ó4;ó4;ö4<õ6;ò59ë33ã1/Þ3,Þ5.ß7.à5+ä3+é2,ï2,õ20÷12ø03ú/2ù.1ù//ó0.ì3.å7.à?5Ì8,¿6,¯/&¸;7ÒXWÿ˜šþ{ƒÿm€ÿe|ø\rðPhôGeüCeÿ;dù9`õNlÓRd‰=?P, C;&CG.KM5Y_CZjEcxMqˆZx’bx–`t•\r–Yq˜Yl•Sm–Rn—So˜Tr™Xt›Zuœ]uœ[t›XtWv Xw¡Wv¢Wv¢Uu¡Tt S{¥[{£]zž^u—[m‹Ub~MXrCSj>AW0?U/`P@`P@`P@_O?`P@aQAbRB`P@_O?`P@bRBcSCbRB`P@fVG_QF\OG^TSaZad`omkƒvw–wy¢{}®}¸x|¹quµkp´lo¶nq¾uvÐ|~Չ‰Ó˜˜Î¨§Ç¸¶ÁÉźÓαÛתâÛ¥çÞ¥æÝ¢äÛ¤âØ£ÛÑ ÔǛӼš»œ€©}dŋwÊ}m´VJÒa[örpìZ[çKLã?@ç=>ë>@ç;;â66Û64Ö=8É83Ê?8¹6.¸>3½K@¶H;È]MÝo`Ô`QÆH:½5)Ä0&Ô6-Ü5-Û0)â51å95ä=7à<3Ü8.Û5)ß4*ã5*ì7.í5+í2+ë0+ç0,ã2,á4.Ý52Ö87Ø>@äJLóW[ú^bü\dþ]eÿaiôS[ïNVñQYÿ_gÿjqÿflõZ`óNTí4:ñ,5ô*6÷-9ñ'5å!-æ'6í7CþPZÿZdÿblÿdmÿenÿcmý[hõQZåEEÞ<7Û64Þ63ß55Ü30Ú2/Û62à>9Û>7Ø;4×:3Û81ß82å95ç:6é9;ê7:ë7:î79î79ì65å31ß2,Ü3,Ý6-ß7,â6,å2+ê1,ò1,õ20÷12÷03ú/2ù.1÷//ó0.ì3.å7.ß<3Ô=2Â8.¶1*·74ØZ[ÿ“ûs}ÿfzÿ^vùWo÷OiùFfû?bü^QA^QA^QA^QA_RB`SCaTD`SC_RB`SCaTDaTD`SC^PCbUM\QM[QRcYbkdtqm„vu•y{¤y{¬y~¶x|»nsµei°`g¯jn¸ruÆ}}ׇ„Ý—”Û©§Ø»¹ÏËÊÈÜØ¿åá´éäªíè¦ðé¥íå¤çá§âÛ§×Ï¡Ëܸ¯©››ƒk¨ƒp§o`œRGº]UÝmi÷uuï__äJLå@DëADì>@è8:â66ß=:Ô;6ÔA:Â70·7,·>3®=/¶F8Ûj\ßi[Ù[MÊB6Å2(Ñ4+Ù6-Ù2,Þ52éA>ìGCà=6Õ2)Õ1'Ú2'Þ0%æ4*è1)ç.)æ/)ã2,â7/á=4àB9Æ-(Ê43ÜDCðVXú^b÷ZaóS[ñQ[èFQêHSïOYü\fÿmvÿntôY_ã>Dé.5ô-4û2<ü2>õ+9í'4ö6EÿKW÷ISõPWøW_þ^fÿckÿ`i÷RYéBIÞ97Þ71ã75é<8ë;;æ95á51Ý60Ý:3Ù;2×90×90Ü71á83ç:6é<8ã99ã99å97ç98è88æ74á40Û2+Ú6-Û7-Þ8,â6,ç2)ë0)ó0,÷10õ12õ13ø02÷/1÷//ò0.î3.ç6.Ý90ÜD9Ç80»4.µ/.ä_bÿƒˆølwþbxþWsúPmþLlÿCfö:]ó;_ìIfÔSgDJl;4O>,=<':?(ED/FH0Q\U'B\/E_2Ic6WJ:ZM=\O?^QA]P@^QA_RBaTD`SC`SC`SCaTDaTD`SC_RB\PDZOMZQVbXcjcsqm†vu•xz£z|­w|´sy·mr´bi¯]d¬ag±lr¾x{ʉ‰ß•‘夡䶵áÇÄÙÕÑÎáÝÄçä¹ëæ¯îê­îè¬éâ«ãÛªÚÓ©Ë¡»¶™¥¥›™„“ˆv˜q™rc›bW³i`Ïrmû‹‰õutê[]æLNèCGí@Dìô@?ï=;æ95à72Ý82Ú91Ù80Ù80Ü71ã73è96é:7â:7à;9ã:7æ:8ç:6å84à5.Ú3+Ú6,Û7-Þ8,â6,ç2)ë0)ò/+ö0/ô22ô23÷12ö01ö0/ò0.î3.ç6.Ü8/àF<É91¾3.¶,,îfjÿy€øgtÿbyýTqþKkÿGjÿ>cò6Yë=^ãQhÄXeˆBBgC7[N;GF1AC-JH3EE-LU6Sc>btLlƒUp‹XnRkPiŽKgIhJh‘Kj“Mk”Pm–To–Wp—Vt›Xs›Uq™So—Pj“MgJeŽHdG`‡D]AWy=Rq8Mi6Lf6Ne7Of8Lf7Oi9Sm>UH8WJ:[N>\O?]P@]P@_RBaTD_RB`SCaTDaTD`SC_RB_RB^QIVMR_Xhnf{tp‰xt—xw¡xz«y{´sy·jr³`g­[c«_g°jr»v|ƀ„Γ•àžžä­®ç»½æËÉßÔÓØÝÛÎáßÆåá¾æâ¼äß¹à׶ÚеÎƱ¾µ¦­§›˜šŒŒŽ€‰…yŠ|q‘vk›si¨meºoi扄î~ósrñedñWYðMNîDEì@@ã:7à;7äB=ÞE?Ì<3Æ=3ÄB5¯1#®0"ÇI;ÜXKÖN@Ì=/Î8*Ð6*Ñ3*Ö42õUUÿkhú]XãD>Ü;3ß;2ã80â4-ã2,â1+Ý0)Ô0'Í/$Æ/$Â0#Å9,À4'Á3)Ë:5×CAÛEGÛBGÚ@HàDOëOZòVaòVaú^iÿgoóYaáBGê:<í57í38ï28ñ3=÷9CÿHSÿV_ä6?Ý4;ß6;ëADùJOüIMô;Aé13è51ë95ï<8ò<9ó;9ð:7é73â70ß;2Ü;1Û:0Ü90ß82ä73è64é75æ:8ä;8æ:8è:9è;7æ95á6/Ü3,Û7-Ü8.ß9-á7*å3)é1)ñ0)ô1-ó32ñ33ô22ô01ô1/ò0.î3.ç6.Þ7/àC:Ê70À1-À13÷jpÿqzúftû]túPmÿCfÿ=dÿ9cõ8^æEdÙZm«V[wE>dJ=aYFTO;KI4PI6GE.GP3L\8ZlFf|Nm…SmŠRlŒMhJfŽHgHg‘Ii’Lj“Ol•Sn•Vo–Ut™Vs˜Un•Rj’LfKcŒHaŠF_ˆFZBX|?St;Pn8Ok:Rl=Wn@ZqCUo?Vq>WqARE5UH8XK;ZM=[N>\O?^QA`SC`SCaTDaTDaTD`SC`SCbUEaVP^Vcje|yu}yšzy¡xy©vy°sw´jr³cj°[c«]e®hp¹v~ǁ‡ÑˆŒÓ™Ý£¥à¯³ã»¿åÆÇãÏÎÞÔÓØ×ÖÑÙ×ËÙÖÇ×ÑÅÒÉÀÌþŹ¹´¨¬£šŠ‹†x{tyvquleleogŽa[`[ÀsmØyuð{ü|yÿrpýccöSTðHGïC?ê>:á<6àA;Ñ:1ÓC:ÝTJÂ>2¸6)½9,Â=.È?/ÏB1×C5Ö@1Ñ7-Ð2/êLMú_]òWSßD?Ù:4Û81à70æ93ç92ç92â:1Ú9/Ñ9,Ê8+Ä8)°(¸3"È@2ÓI>ÒD@Ë;:Ì7;Ï:@Ñ7AâHRíV_ðYbõ^g÷`iêU[ÜAEå@>ì?;ñACúGJÿLTÿQYÿT]ÿV^á4:Ú/5Ü/3ç7:ô=Aø;?÷48ó12í42ï95ð86í42ë20ê20ç40á4.ã<4à=4ß<3Þ;2á83ä73è43è43è88ç98è88ë99ë97é75â5/Þ3,Û7-Ü8,Ý:+ß7*ã2(ç0(ï0(ò1,ñ42ð43ó32ó11ó1/ñ1.ì3.ç6.à91Ù<3Ì71Á0-Ñ@CÿnuýkuùbqðRiõHfÿ;aÿ4^ÿ6bû>däNiÊ\i‹GFjF:]L<]VCXQ>RJ7OG4ID.DJ.GU2Sc>^sHgMj‡OjŠKgŒGgŒFfŽGfHgJi’Nk”Rm”Um”Uq•Uo”Qj‘NgŽKcŒH`‰E_ˆF^†G\‚E[~DWxAVr?Uo@YpB]rG^uG[sCYtAXs@NB2QE5UI9WK;XL\P@^RBaUEbVFbVFaUE_SCaUEfZJh]YngwupŽ|x™{y wx¦vw­pu¯jo¯ah¬^f®_g°em¶pxÀ}…͉Ø—Ø™ Ö¡¨Öª±Û´¹ßº¿ßÀÁÝÃÃÛÇÆØÆÃÔÅÁÐÁ»É¼³Ä»°Áµ¨¼¦˜¯–‹œˆ…Œqqqtpopfewhe†nj„_Y•d_›ZT¹f`Ùsnðzvÿ{wÿwsÿhfüZWþRNõHBæ=6çD=Ø;4ÛG=ê\RÅ;0Ä<0½7+¾6(Ç>.ÑD3ÔB3ÔA1×A3Ò86Ø>>ÝCCÜB@Ö=7Õ81Ø7/Þ7/å:3æ93å:3â;3Û>5ÕA5ÑE8ÌG6®-¼;%ÍJ8ÑL=Æ=5»0+À00Ê9>×AJáKTëU`ðZeð]eìYaßLRÔ>@Ï4/Ø7/à;9ê@@òCHõDJñBIî?Fâ5;ß26ã36ï8<õ79ø14û/2ü14ï20ð95ð74ì0.è,*ç0,æ3.à3,ä=5à=4à=4à<3ã:5æ95ê65ì65ì57ì57í57î68î66ë54ä2.Þ1+Þ7.Ý9-Ý:+ß7*á4&æ1&í1(ñ1,ð42î53ñ42ò21ó1/ñ1.ì3.ç6.â;3Ò4+Ò:5Æ20çUXÿpxùcnòZiçI`óEfÿ8bÿ/]ÿ5bÿBhÜLe±PYj5/^G7XK:UN;[P>VI8M@0JC0@F,AO.K[6Xj@bxGfJhˆIf‹FeŠDc‹BcEeŽHgLh‘Oi‘Rk’Sn’RlPhNd‹JaŠH_ˆF_‡H_‡H_…H_‚H]~G]yF]wH`wKcxOczN]uC[vAZu@JC3MF6QH9TK.ÑE6Ë>-Á2"Ê7'ÛE7ÞE?Ó97Ì3.Í50Ô;5×=5Ý<4á=4ä;4ä92Þ5.×4+Ï5)Ê8+Å<,Â?-ÔS>ÈG2½<)¾:-Ã=2Ä;5Â74Â43ÜKNÞMRáPUåTYèY]åVXÜMOÓD@É5+Ñ7+Ø7/Ý52â24å26æ18æ.6ì4>ì3;ó5?û9Bý4>ú+5ÿ(3ÿ/9ø-3ù57ù59ð./ë*+é0.è51â5/ã<4à=4à=4á=4ä;6ç:6ë76î66ì46ë35ì25í34í55ê41ã1-Û0(Þ8,Ý:+Ý:+Þ8(à4&ã3$é3&ì4*î50î52ð42ð3/ò2/ï2,ì4,ç6.ä=4Í/&×>9Ì35ùbgÿoy÷[iðNcêC]ùEhÿ:eÿ0]ÿ6aöGhÉJ]“CFR,#VI8SL:OH6[O?UI9F?-HF1>B'@J(IU1Sd:_rEe}Ig„JeˆHcˆCa‰BbŠCcEeŽHfMhPiQlPkMfJcŠIaˆG`‡F`‡H`†I^G^F_}G`|Ia{Kd{Mf|Nf~N]xC]z@^{CDB6FD8JF;PG>RH>WI>]M>_O?`Q>aR?`SB_VGbYRgb_ojnso~wq“zt |y¨yw©pp¦gg£`a¢\_¤`b­fhµopÀyz̄‚֍‹ß–’眙栞ݡ¡×££Ù¤¤Ú¦£Ø¥¢×¥¡Ô¤ Ó¥žÑ£Í¢šÉ¢™ÈŸ–ٍ»Ž‚°ƒ|žrn}igld^`fZZkYUrWP}WNŒWO•RI¨ZPµXPÁZSØkdìyrù‚|ÿ‹†ùuqÿusí_]ßPLÙEAïZTÌ71Å2*Ä6*Ã7(À7'Ã7&Æ9(Ê;+Ð<.Õ?1Ò8.Ö<2×?4Ó;0Í5(Í3'Ø:/â@5à90á90Þ7.×7+Ï7)É:*Æ?,ÄA/Â=.Æ@4ËE:ÍG<ÌC;Å<4»2,¶+&Ç<7ÐEBÙOLàVSãYVáXRØOIÐC:Ì;*Ó:(Ü8,â5.è./ì*2ð(3ô'6ú->ú+?û*?ý)?ÿ(?ÿ&?ÿ$<ÿ$<ÿ$8ÿ'9ÿ+<þ,9ó+5í.5è45ç;9Ý84Ý:3Þ;4à;5ã:5æ95é73ë54ë35ì46ë54é54ç53â5/Ý5,Û5)Ü8,Û9*Ü9(Þ9&ß8&â7%ã6%æ4&ì5-í4/ð50ñ4.ñ5,í5+ê5*å7,à90Ø7/Õ:6Û?BÿmwÿbsûSjõIcÿKjö6[ÿ6_ÿcçNj¯IV^$"D, ?:'HE4PMC/?G/BH&EK%KS.S]8[kDavKd~NdƒJb†F`ˆBa‰@c‹BeFhJlPm‘Ql‘LiŽHgŒGf‹HfŠJe‰Ic…HaƒGdƒJdIbGc~GdJdHe~Ga}C[{<\=_‚B=?4?A6FC[K>]M=`O;`Q<^SA^VIc[Xhcinlyso†tp•vpžtp¢pm¢gfŸaaŸ]^¡\\¤ed°kjºtrÅ}{φ‚ٍ‰à”Žæ˜“å›–Ùœ˜Õ™Öžš×ž˜Ö—Õœ–Ô›•Ñž–Ñœ”Íœ“Ê›’ÇšÄ“‰»ˆ®‚xtk|mdif]^f[YiZSoWM{UJŠVKšVK°\RºYRÁXRÓfaàqjãvoí~wý‡…ÿ‡…÷usîgdãUSëZUÇ2,Â/%Å7)Ã7&À7%Á8&Ä8'È;*Ï;-Ó=/Õ9,Õ9,Ó:,Ò:,Ñ9+Ñ9+Ô8+Ø8,ß;1à90Ü8.Ö8,Ï9*È9(Á:&¾9&¾6*Á80Æ=5É@8ÊA9È?7Å<4Â91¿4-Ç>6ÑH@ØOGÚQI×NFÌC;Ã7*Ê7%Ó8$Ý7)å4,í//ô+3ù)7ý(:ÿ+@ÿ*Aÿ)Aÿ&Aÿ#@ÿ!<ÿ=ÿ:ÿ:ÿ 9ÿ%;ÿ);÷-9ð19ê7:å;;Ü94Ü:5Þ;4à;5ã:5æ95é73ë52ë35ì46ë54è64ä71ß6/Ü5,Ù5)Û9*Û9*Ü9(Ü9&Þ9&ß8%á8%ã6%ç5+ê3+ë4,ë5*ë5*ê6(ä7)á7*ß;1Õ4,Ó54óTYÿesÿ[põGbÿIhÿAdÿ;`ý3[ù;aòMmÍLb‰8?S*$A5'69(;<,B@1DA0@?-=B.>G,=CKP'\b_„?b‡B69.:<1??7DA:KB;OE/Ô>/Î6(Ë/"Ú:.Ú8-Ù7,Ö8,Ð:+É:)Â9&¾7$½5)À6,Â8.Ä:0Ç=3Ê@6ËA7ÌB8Ç:1Ê@6ÏE;ÐF<ÒH>ÑG=Ê@6Å7+Ì6%Ö6&ß7,ç4/ñ03ö-5û+9ÿ*<ü';ü'=û%=ù#;û!:ú7ü7þ6ÿ8ÿ6ÿ$8ý*;÷2<ñ6=ë8;ä::Ü94Ü:5Þ;4à;5å95ç85é73ë52í36î47í55ê65å61á6/Ü5,Ø4(Ú8)Ù9)Ú9'Û8%Ý8%Þ7$à7$á6%á5'â4)ã5*ã6(ã6(á7(Þ6)Û7+Ý<2Ð1+Ø88ÿkrÿ]nþPiñ<[ÿHlÿ7]ÿ>eù5[î>bæVqª?Qa#(L/);7+07'37&9<)@=*A<(@>)BB&?FXa4s~T€Œdw‡`hSa}La€G`ƒC`…?a‰@cŒ@hŽEjJkMl‘Nn“Mk‘HhHgŒGh‹Kh‹KfˆLd†Je„KdƒJc€FdGf‚Hf‚GeFb€Bc†DeŠEhH25*58-;<4A>7G@:KB;RE.Ñ>.Ë8(Ç/!Ò6)Ó5)Ò4(Ò6)Ñ9+Í<+È=*Ä;)Ä:-Ä:/Æ90Æ9/Ç:1È;1É<3Ë=3ÓD<ÓE;ÐA9Ë=3Ë<4ÏA7Ï@8Î;1Î5'Ù5)â5.ë31ò/5÷+6ù)7ü):ù&9÷&;÷&;ø'<û&<ý%:ÿ$:ÿ#:ÿ"7þ#7ú%7ù,;÷5>ò9?è8:à87Ü94Ü:5Þ;4à;5å95ç85é73ë54î47î47î66ê65æ72á6/Ü5,×5*Ø8*Ø8(Ø8(Ù8&Ú7&Ü7$Ý6$Ý6$Û5%Ü6(Ý7'Ü9(Ü9(Û:(Ù9)×:+×:1Ð3.ëHKÿoyÿVjøD_ø<_ÿAgÿ3\ÿ8bø>cèMlÅOe€0=J C1-11'.6'4=,=B.B@+B<$E>$HE$U\0p~MŸr—¨|ƒ˜mj„W_{J]~E_ƒCa†@bŠAfCkJl‘Lm’Om’Oo”Nl’IiŽIhHiŒLiŒLhŠNg‰Mf…LdƒJdGe‚HgƒHh„If‚Gd‚DgŠHiŽIl‘L-3'36+891<;6B=9G@:MD=QG=SI=SK>UNDZUQa^eigumklkŠjhb`XVˆPP†QQXYš`cªfj´orÁuxÉ|Ђ…Ö†‡Ù‡ˆØŠ‰Ù‹ŠÖ‹ŒÏ‹ŠÌŠ‰Í‰‡Ð‰…ш„ÑŠƒÑ‰‚ÐŒ„Ï‹„ȍ…Á†º†°‡¥~w–m…„Yj€SZnVTc\RZaOZ_HeZDxUB’LD¸TRÐSWÛRYå^dèejãklæuqäunâoh÷~vÿ‚{ÿ‡~ôl`É?2Á8(À;(¿='¿='À<'Â;'Å:'Ç8(Í7)Ø:/Ù8.Ò8,Ï9+Ì:+É:*È9)É7(Ï9+Ñ7+Ò8,Ñ7+Ï7*Ì8*Ë<,Ë>-Ê<0É=0Ê<2É;/È:0Æ8,Å7-Å5*Ð@7Ð@5Í=4É9.Ë80Î;1Í:2Ì5,Ð/%Ù0)ä20ì25ô/8ù-9û+;ü,<ü-?û.?ü/@ü/@þ/Aÿ/?ÿ-?ÿ.@ÿ)9ü)8÷+7õ0:ñ6=í8=ã77Ü43Ü94Ü:5Þ;6â:7å95ç85ê65ì44ñ48ñ48ï56í76æ72á6/Ú6,×5*Ø8*Ö9(Ö9(Ø9&Ø9&Ù8&Ú7&Ù8&Õ8%Õ:&Ö;'Õ=(Ô=(Ô=*Ô=,Ô<.Ñ7/Ú;8ÿ^eÿaqÿPi÷<[ÿAiÿ4_ÿ4`û1YôKlÛYq•>NZ%-C),:2/-0)08+7@/:B+<<"A<UH(`[5{…S£lª¾‹¨¾Ž¥wo‹[aK^F`„DcˆBeDj“Go”Np•Po“So“So”Nl’IiŽIgŒGiŒLiŒLi‹OhŠNf…Je„IdƒHe„Ig…Ih†Hg…Ge…DiŽIi‘Kl”N+1%.4*470893>:7B=:HA;KD1Î8*È4&Ê8)Ë<,É:,È:,É;/É;-Ê:/È9+È5+Ç5(Ê6,Ï;/Ò>4Ó?3Ö?6Õ>3Î7.É,#Ò+%Ü-*ç02ð39ö1;ú0<ý0?ý0?ù0@÷1@÷1@ö0=÷/<÷-9ú,9ú*7ý/<ù/;õ0:ð3:í6;æ69ß55Ù42Ü94Ý:5ß:6â:7å95ç85ê65ì44ò59ò59ð67í76æ74ß6/Ú6-Ö6*Õ7+Ô8)Ô8)Ô9'Õ8'Õ8%×7'Ô9%Ð9$Î<%Ï=&Ï?'Î@(Î@*Ð?.Ò;0Ñ61ëHIÿfrÿOdÿHfû7[ÿAmý/]ÿ7aò4XãPj¼Ufm19E(*E697325406906=-3;#38CCja:…TŸ®w©Á‡µÎ—¯Ç“’®}v”be†Q`‚F`…BcˆBgFm–Jr˜Or—Rq•Up”To”Nl‘KhHf‹Fh‹KiŒLi‹Ni‹Og†Kf…Je„If…IhˆIi‰Hi‡Gf†CjJk“Mn–P(0#+1'/4-350764<85@=8C>8IEù4>ù1>ú0@ø/?ò.<ï/<í/9í07ï-5ï,2ò+2ñ*1õ2:õ3;ò5;ì59å57á55Þ65Ü75Ü86Ý97ß:6ã:7æ87é77ê67ì46ô5:ô5:ñ7:î87æ74à70Ú6-Ô6*Ó7*Ñ8*Ð8*Ð9(Ð9(Ð9&Ñ8(Ð9&Ë9"È:"È>$Ç?%È@(È@*Ì=-Ï;1×96üU\ÿ^qÿGcÿ?aÿ:aÿ7gþ3bû8`íFdÅNa‰@IS12A64@:<:46?56<7179+4="9CSZ.‚‚P¢§q±ÅŠ¯ËŽ°Ì’¦Ã’®}{™egˆQ_E^ƒ@c‰@iDo•Js™Ps˜Sq•Uo“Sn“NkJgŒGeŠEgŠJh‹Ki‹Ni‹NfˆKd†Id†IeˆHgŠJh‹Ii‰Hf‰Ej’Ll–No™Q&.!(0%-2+13.331764:95<;6GD=DD*¾;'¼7$À4#ÑB2ãOAäN@ØB4Ë7)Ë7)Ð>/Ê;+É:*Ç8(Æ7'È6'Ê6(Î8*Ð8+Ó;.Õ;/Õ9-Ò6*Õ7,Ú<1Ý<2Ü71è88ñ8=÷:Aû9Bú4Aõ/<ò,;ï,:í/;ê19ê38ë48í57ñ56ô36ó57ð37ï6;í9<é69â45Ý33ß76à;9Ý86Þ97á96ã:7æ87é77ê67ì46ô5:ô5:ñ7:ì89æ95ß82Ø7/Ó7+Ð8+Í:*Í9+Ì;*Í:*Í:(Í:*Ì;(Å9"Â:"Ã=$Â>%Ã?(Æ?+Ê<.Ï81ß<89?48E26C41=:)>E&FU*bs?›a­½±ËŒ«É‹¦Ã‹º„Ž¬z{™ef‡PZ|@^?a‡>hŽCo•Jr˜Or—Rp”Tn’Rn“NjIf‹Fd‰Df‰Ih‹Ki‹Ni‹NfˆKe‡Jd‡GeˆFgŠHh‹Gh‹GeŠDk“Lm—OpšR(0!'/"(-&).(.0-3317839:4==5?@8DE@JLKORYVXeZ\s]^}YX‚[Y‹^]–ee£nn¶wxȁ؄…⌌ðŠŠì†‡ä‚‚Ü€€Ö‚€Óƒ‚΀ƒÈ„ǃƒË„„ΆƒÐˆƒÓ‹„ÒŒ„ÏŠ€ÅŠ€¼‰€¯‡}Ÿ€xwozkegf]Xm[Qm[Mi\Lf^Kd_IeaHhaGo_FoP;…UA¥]O¿aYÑYXÝQTîS[ø\`ùheæYPÔD<Î70Ñ7/×:1Ö=/Ô;+Ï9(Í:&Ï9(Ñ:)Ô8)Ø8*Ü5,Ü5,Ð/%Í3)Ì8,Ê>/Å@/Á@-¾=*¼9'Â9)¾0"éWJßK?Ã/#Ñ=1Î2Ü<0Ù7,Ú8-â>4ìC<õBEò9?ð2<ö4?ö2@ñ-;í-:í2=ì7>æ5;ä68å78ë99ð:9ñ78ï77ò;=î<<ê::æ87á85ß74Ü75Ü75Þ97á98ã99æ::é9;ì9<í9<ï8<ô7;ó6:ð8:í9:ç;9à;5×90Ï7,Ê8+È9)Ç9+Æ:)Ç:)Ç:(È;*Ç<)Á9#Ä='¾:#¶4¼9%ÉD3Ï?6Ê1,ÿ^eÿVgÿIbÿ<\ø1X÷0Yû6cõBiçYo¬FQo33N3,B?6>C<@78@-1L/3K2.A9&DJ(Zn=~š_ž¸w¨Å‚¬ÊŒŸ¾‚˜¶€”²~‚ nf„RXvBY{?]€>c‡AiDn”Im•Ll”Nk’Ol‘NiŽIfŠDc†Bc†Bf‰Ih‹KfŠLdˆJg‹MhŒNg‹Kf‹HeŠEf‹EjIk“Jq›QržSt U*0")/#).').(-/,130561782;<4>?7AD=HJGOPTSUaXYkZ\u\Z^]‰db”kj¤utº~·‡ß‹ŒéïŒŒð‰‰ë…„ ؀~Ҁς‚Ì…†É†‡È‡ˆË‰ˆÎ‹ˆÏŒ†Î†ÌŽ…ÈŠ€¼‰±†|¡‚x‘{s€tknlb`e]Re`Me^Kf^Kh]Ki\Ij^Hk_Gn^Ew_G[C’YF­ZLÇVPÞRSõQXÿX_ðUSãLEÙ>9Õ60Ù6/Ü90Û9,Ö9(Ó8&Ñ8&Ñ8(Ô8)×7)Ü6*ß4,Ý5,Î0'É5)È9+Æ=-ÄA/Á@-¿<*¾9(Ä8)Ë<.äREÜH<È4(Ì:-È:,Â4&Ê=,Ë<+Ê;*Ê;*Ë:)Ì9)Î8)Ï6(Ó7*Ö8,Ù7,×3)Õ1'Ø1(Þ7.ç<5øDGñ8>í/9ï/:ð0=î.;ë1<ë6?ä5:Ü36Ø22ß:8îEBøIFøDCó?>é:7ç98å97â96á85à85á98á98à87â88å99ç9:é9;ì9<í9<î7;ó6:ò59î68ê88ä;8Ü:5Ó9/Ë7+Æ8*Ã:*Â:*À;*À;*Á<)Á<+Á<)½9$Á?)»:%³5¹:'Á;/Ê:2Ø<=ÿ^gÿPdÿA[ù8Wö6[õ;`ô>dãIe«?Lƒ?>_:2G;/:>08>2F<:R>=N0.S8/VK5ciEx[°pÂ}¡Æš¹}š¹€š¶ƒ©xrŽ^YuETp=\{B_@b†@iCm“Hl”Kk“LiMiMgŒGe‰Cc†Bc†DgŠJiŒLhŒNg‹MiOiMiŽKgŒGgŒFfŽEl’Im•LpœQoRt U-1"-1#,/&,.)//-11/34/45-9;0<>1@B7EHAKMLQRWUUaVWi\Yt^]fdŒpn zx·…ƒÎ‹ßêŽïŽŒíŠ‰ç‡„߁Ó|Ë}ȀƅLjˆÆŠŠÊŒŠÉŒŠÉŒˆÅŒ„¿‹‚·‰€­†|¡€v{p€ujpndbi_Vc]M_aL_aKc^Jg\Jl[In\Ho]Gq]EwaIxX?‡S=£VDÇXOãUSøOTþMSâ><Þ<7Ý84Þ71á6/á6.Ý7+Ú7(Ô7&Ó8$Ó8&Õ8'Ø6)Ý5*à3,Ý5,Ë3(Ä6(Â9)Á<+Â?-Â?-Á<+À8(Ã5'ÜJ=ÚF:ÕA5Îå84â62à72à72à72á85â96ä;8ä;8á77ä88æ8:è8;ë8<ë8<ë8<ì8;ï58î47ì57ç77â:7Ù:4Ï8/Ç7,Â8+¿:+½;+»<+»<+»<)»<+»<)¸9&½@*³9$±6$¶;+µ0'Ã40ìPTÿ[iÿJ`õ:Uð7Vñ@]ïHfçHdÍNa‚89e?6R@2DA09=,57)>6+K9/E-#R=,g]Bˆ_’«t—»{–Áz–¿{”³xœ¸…š´…€šm\uKHb5Nh8[xB_}?cƒ@hŒDl’Gj’Ih’JgLfKd‰Dd‡Cc†DeˆFh‹KkŽNkOjŽNiOiOiMhJgHh’Hl”Ko™Ms¡Vs£Wv¤Y24&04&01)01+12-23.34.46+9;-;>-?A3DF9IJDMONRQWSS]XVd\Zoda~nl”zw¬„‚ÃŒ‰Ö‘ã”‘ꓐ뎋≅قÌ|Ã|¿€~½„‚Á†…Á‰ˆÂŠÃ‹ˆ¿‰…¸‡®…}¤…{€vŽyn~rgmmaak^Vi[Pc\J]`K]aJc^Jh[JmZKqZJtZIv[FsWAxR;ŠQ=ªYFÍ[PãTPðFIñ>AÛ2/Ü5/á51ã60ã5.á5+à6)Û8)Ö7$Ó8$Ñ8&Ô9'Ø6)Ü6*à3,Ú6-È6)½8'¼7&½:(¿>+Â?-Ã;+Ä8)Æ4'éUIÓ<1Ì8,ÑB4¾5%À=+À=+À8(Ä8'Å9(Ç:)È9)Ë7)Ì6(Í3'Ò6*Ô3)Õ2)Û4,ã:3é>7ì?9ì=:è45ì59ï6;î5;ê2:æ39ä7=â<@óUVübbÿmjÿidóVQäA<ß63Ý4/ß61Þ71Þ71ß82á85â96å97æ:8å78æ89è8;é9<ë8<ë8<ë8<ì7<î5:î68ê67å97ß<7Ö<4Ì9/Å9,¾9*º;*¶;)µ<)µ<+´=)³;*³<(³:'·@,­8&­8'³;-«+"Ã54ý`gÿTdúG\ð-=@-@C.DG4IK>MNFQPNRRRVUSYX]a_lkius›€}²ˆ†ÇŒŠÓ•’ᔑ␍܋‡Ó„Ä}º|µ|³~·„º‡„¹‰…·Š„²†¨z›€xs‡znzrfjm_^j[Ti[PjZKfZJb_Lb_Le^Li\Kn[Lr[Kw\K{ZG~UA†R=›RA¶VFÎRHÚG@â88å33Ý1-ß3/â5/ã5.á3,ß3)Ý5(Ü9(Ó8$Ð9$Ï:&Ñ:'Ô8)Ù7*Ý5,Ø7-Ä;+¹:)µ6%·8'½;+Â=.Ç;.Ç7,Ð90õ\TÖ=5É5+ÏA5¸3$·:(¼?+¿:)Ã:*Æ:+È:,Ê;-Ì:-Ï8-Ñ7-Ð3*Ò1)Ö1+Þ71å<7ê>:è;7æ74é75ï;<ðë8>è7=ê7;î7;î79ê7:ä::ß=:Ö=7Ë;2Ã;/º8*µ:*³;*¯<)¯<*¬<(¬;)¬;)ª;(¬=*¦8'§9*ª8-¬/)Ë@CÿhrôM^óH[íDYåH[ÙO^ÉT]·TWœXUdM?OL9LG4JE1FD-?B'=D#>H#KV.\g.==1==3==5;<4;=2;=/?B/@D-CG.FJ3KL:NOAQQIRRHYWJZZN_^\gerqn‰{y¡ƒ€·‡…ďŒÑŒÓŠÏŠ…ǃº~y¯zw¦yv¥{v¬|y®€|®ƒ}©ƒ}£x—|t‹zrvksrffm_\j\Sk[NlZLl[Kk[Ki]Mg^Mi]Mj]Mn]Ms^Mz]MZI“`O›VG§N@¸J=Å@7Ï6.Ø1+Þ1+á51á6/â5.â4-à2)Þ4'Ü6&Ú;(Ñ9$Í;$Ì;&Î;'Ñ:)Õ9*Ù7,Ó9-Á>,´;(°5#²5#»9)Ä<.É;/Ë7-Ù?7ø[TãIAÎ:0Ì@3¸6&¬3 µ<)¼9'¿7'À7'Ã7(Å7)É7*Î7,Ñ7-Ù<3Û:2Þ93å<7ê>:ê=9ç85ã41è96ë<9ì::è8:ì>@øPPÿbcÿppùheâTPÊ=6À1+É40Ö;7ß=:à;7â;5á:2â94á83ã73ä73å55æ66é69é69ê7;ë8<ë8>ê7=è7=é6:ï8<ì89è8:ã;:Ý>:Ó>7É<2À8ÛTXûepîK\ïI]éJ\ÛM[ÉQZ´VV ZRŠ`RPI7HM9NI5H@+;567>O%Lf6lŠTw”\„›e‰šd›f£k”­t˜°|ƒ•mn}\Q`Cg{HiƒFl‹Gm‘Gj“Gf’GbGcŽGhJlMo’Pn“PlMiŽKjJj’Ls›TsUsSržQržOs¢Rw¦Uz«Zv¦Zu¥[s£YRK;RK;RJ=RJ=RJ=RJ=RJ=RK;UNXQ?YR@[TD\UE\UEb[HaZHaYLbYRe][kaiqftuj{zn„|pˆs‹s‰|p„uj{mbre]jc`k`_g_\c_Z^^ZY^YUaZRbZOe[Og[Ki\Kk\Ik\Gm]Fm]Fj^HicMqfTqZJuOB‹WJœ\P£YL¬ZL¥N=¦E4§<,±7(Â8-Ñ80Ü41Ý1-ß6/Þ7.Þ7.Þ7.Þ7.Û7+Ø6)×7)Õ8)Ô8)Ò9)Ò9)Ò9+Ò9+Ô8+Í;,½;+¶>-®9(©1 «2!·9*ÀÔH9Â=,·2#ÝPFØJ@ÔF<ÔD;ÚG?ÞG@àC>à<:à74æ87ì::ì::ç77â64à93Ü=7ÙF>ÏB9Ä:/¼4(·1&¹5)¿;/Ã?3Ã:0É<3Ò?7Ú?:â=;ç;9ì89í9:ç7:å8:å8:å99å97å97å95å95à40á51ä65å76æ89ç9:ç9:ç9;ë;>æ9;ß99Ü=:ÖA=ÍB;ÁA6·?1©:)£<+ =*›<(™:&–:%—8&‘8&A0‹<-‡/#‘/&¼LJämoçloÍVZ½LNµNOªQM¢UO›XO—]R•aTŠjSWZ/:M7FTa)~ŽP›°oŸ¼yœ½x’µs~ah€L\mCYdBT]BHP9?D0:=,@C2<@1:>0]sBgƒHpKo“Kl’Gj’Ii“KgJlPm‘So“Sl“Pm’Mk“Jm–Jm˜IqœLqžMrŸNr¡Pt£Rv§UyªYzª^y¦cm™ZbŽOWN?WN?WN?WN?WN?WN?WN?WN?XO@YPAYPA[RC\SD]TE^UF_VGd[JcZIcYMcYOf[Uj_]nbdpdhreltgpvirvirsfmm`gg[_bXY^[VZZRYVOWTKXTIXTH\VH^WGcZKcZIf[Ig\Hi]Gj^Fk_Gh`IcbMngTv\MSFšVM«VO°RJ·QE¯H9¬C0¬=,±9)¾8,Ë80Õ62Ù40Ý6.Ü8.Ü8.Ü8.Û7-Ú8-Ù7,×7+×7+Õ7+Õ7+Õ7+Ô8+Ô8+Ô8+Î:,¾<.¶>.®9(¦1 §2 ²:)¹>.¾<.Æ:-Ç4*Ë4)Ò;0ÜE:áOBßQCÝOCÛF?Ø@;Ó<5Ò;4Ö=7Ú=8Ü86Ý33ç77ë78î79ë78ç77å97â=9ÛB:ÊA7¿?4¸:,±6'¯5&²8)¸=-¿@1ÅA4Í@6×@7ß=8ã:7é77ï56ñ7:é6:ç6<ç7:æ89æ87å95å95ã:5â92ã:3ã:5ä;6ä;8ä;8å99å99ä:;ã;;ß<=Ù?=ÐA;Ä?6·=2¬;-¥;+ =*œ=+—<)–;(’:&“8%Œ:%€9'€8)‰5*<5¿QP×eeÑ^a·MM¬NL¤TMYP˜\Q—^S—^S˜_VŒfQ`_/Sg*^r3zO™¯n¥¾|™²pˆ bj‚HauBTe;JX7FP7?H59?158-:^tEgƒHqMp”Ln’Hk”Hk“Lh‘Km‘Qn’Tm”Sm”Qk“Lk”Hl—Hm˜HpJpJp Ls¢Qu¦Tx©Xx©Xx¨^m—Xb‹QY‚H]TE]TE]TE]TE]TE]TE]TE]TE[RC\SD]TE^UF_VG`WHaXIaXGe]Je]Hd[Jd[Le[Qf[Uh]Yh][i]]j^^k__k__i^\f[YbWS_VQZVMWTKUQHRNCQMBSOCWQCXRB^WG^WEaYFc[Fg\Hi^Hk`JhbLbaMngUy_PˆXN¢[U±VQ²IE¸E@¹@7¸>1·;/¸8+¼8+Ã9,É;/Ñ:/Ù8.Û7-Û7-Û9.Ú8-Ù7,Ù7,×7+×7+Õ7+Õ7+Ô8+Ô8+Ô8+Ò9+Í;,À>0¶>.­:(£2 £3ª:&³>,¹>.Ä?0Ä8+Å2(È4*Ð<0ØF9ÜM?âNDÙ:6Ø43Ô20Ö42Û97á=<æ<<é;<í9<î5:ë27é26è58å99á<:Ù@:¾8-µ:+±6'®4%­5%°8(µ<+»=.ÈD5ÏC6ÖB8Ü=7â94è64í55ï79ê69é69é69ç77ç77æ95å95å:3ã:3ä;4ä;6ã<6ã;8â:9á99Þ88Ý9:Ü<<Ú@>ÓB=È?9¹:1­7+¥7(¡;,<+™<+”;)“:(9&7%Š9&z6#y6%ˆ9, F=¹SOÀWT¸PO«IF¢MHœSL™YP—^S—aW—aW˜_V‹ePsrFzV“¦n¤¹€«À‡ž³{|[[oaXIaXIaXIaXIaXIaXIaXIaXI_VG`WH`WHaXIbYJcZKd[Ld[Je]Hf^Gf^Ig_Lg^Of\Pf\Rf\Sh]Wh]Wh]Wh^Ug]Te[QdZPc[N]YMZVJVRFRNBPL@PM>TN@UO?WQAYTA[VC]XDaZGd]Jf_LfaMdcQleUv\OŠ[Q©b\¸ZX¶FD¹<:Ã<8Æ;6Ä:0Â8-½8)¼:*¾?.Ç?/Ó9-Ù7,Ú8-Ù9-Ú8-Ø8,Ø8,Õ7+Õ7+Ô8+Ô8+Ô8+Ô8+Ô8+Ò9+Í;,Á?1¶>.¬9'¢3 3¢8"¬=)µ@.¼?-¿:+Ã7*Å5*Ë7+Î:.Îî7<ì38é06æ25å58á77Ú65Î61·5(¯7'®6&¬7&¬7&®9(²:)µ:*ÃA1ÊB4ÔA7Ü?8â;5æ95ë76î87í68ë78ë78ê86ê86è94ç:4æ;4â92á:2ß:4à;7Þ:8Ü:8Û97Ù99Ö<:Õ@<ÒC=ÊA;»;2¯6+¤6'ž7(œ;*˜;)”;)’;(:&8$Œ7#‡9%€=*v5#5'™E:ªPH¬MG©LG¦QLPJ˜UL”ZO”^R•aV•aV—aWgT‰…_™©x­½Ž¦¸ˆ¡ts†YN`8/A->3B%:F.=F3;A3:=2:=4<=599-?@2<>39<1<@29B/?L2PbNK:NK:NK:PMTQ@VS@XWC[ZF]\H^]Kb`Qf^QmWJ†[R¬ic¾c`ÁMMÈBCÐ;=Ô89Ó84Ì70Á9+º=)µC+¼B+Î;+×7)Ø8*×:+Ù9+Ö9*Ö9*Ô8)Ô8)Ô8)Ô8)Ò9)Ò9)Ò9)Ò9)Í;,Á?1¶>0«:(¡6"š4›7 £=&¯B-³;*º;,Â:,Ç9-Ë8.Î:0Ð<0Ù:4é9<ì4<æ39ã28â38á48â38â25é6<é49ç4:ç7:ã9<Û76Ð21À0(´6(­:(­:(«:(«:(«:(¬9&¯7&¸:+Á;/Î>3Ø?7à=8ä;8è96ì87î66î66î66í74ê84è:3ç:3ä<3á:2ß;2ß<5Ü=7Û=:Ù><×=;Ô>=Ï@<ËB<ÅB:¹=5­7-£5(ž7(š:*–;)“<)‘;*:(Š9&‰8%ˆ7$ƒ8%ƒ@-u4"{3%“G:¤QI¡NFžNG¡WN˜UL’XLZN\N]R”`U—aWhW‰f˜¥z©€Žj]kHDS42@&$2-:&0;*5=.9?3?1;=28;0;?18A.>K1PbÜ87Ô70Ç;.¼?+±C*µA(Ê;*Ô7(Õ8)Õ9*Ö9*Õ9*Õ9*Ô8)Ô8)Ò9)Ò9)Ò9)Ò9)Ò9)Ò9)Í;,Á?1µ=/«<)¢9$™6•5›;"§A*²B.¹@/¿;,Ã7*Å2(Ë4+Ò;0ß=8ê5:î3<ë6=é8>ç:>ä;>ã:=â9<ß58á7:â9>á=>Û=>Ñ96Ã2/¶0'¯9+«>*«>*©>*ª=)©<(©:'«8%¯6%¹7)Å;0Ð=3Ù<5ß<7ä;8è;7î87ï75ï75î85ë:4é;4ç<4ä=4â>5à?7ÞA:ÚA;ÙA>ÕA?Ñ@=ÍB?Ã?:»@8³=3ª8-¡5(›5'˜8(•<*‘<(<)Š<(ˆ:&†9'„7%ƒ6$6%}:)t3!~9*—OA£YNœRG•OE˜VJ•YN[MŽZMŒ[MŽ\Q“_T™`W‘gW~xXyƒ^r|ZU`B;E,/;%0;*0<.3=24<16<2?1:<17:/:>07@-=J0Oa;bxIk‡Lu”Qu™Qt˜NqšNršSpšRršQsœPr›Op™Kn™Jp›LsžOv¡Ry¥X{§Zz¨]x¦]qŸWg”O]ŠEX‚B`‡NY€ISzCg^Og^Og^Og^Og^Og^Og^Og^Og^Og^Og^Oh_Ph_Ph_Ph_Pi`OjaPjbOjbOjbOi`Oi`OiaNiaNiaNh`Kh`Kh`Ih`IhaGhaGhaGf_Le^Kb[I\WDWR?PM:LI8IH6IH6GH6GJ9GK:HL;IMì;Aê@CæAEàBCÜ@AÙ??Í12Ð66Ó:<Ñ=;É;9¾71µ4.­4)ª<-¥>+¥>+¥@,¥>+¤>(¦;'©:'ª7%²7'¼8+Å8.Ì70Ô94Ü=9æ>;é:7ì95ì95ë:4é;4è;4å=4â>4àB7ÝC9ÚC<ÕB;ÏA=Ê?<Ç=;¿>9±<3©:/¢8+œ6(˜7'”8)‘:):(‹=)‰<*‡<)ƒ:'‚9(€7&6%}6$x3#x5%…B2˜UEWK”PCPD•ZL“YMZN\Q\Q’[T•\U˜[VŽbUkbEV`=JS4=G,6?*2=,4>35?66=68?8=B;CF=EG/;9*78*=>0:<17:/:>06?,=J0N`:awHk‡Lu”Qu™Qt˜Nr›OršSpšPq›OrNqœMp›LošKrNu¡Ty¥X«`~©az¥]qœUf‘L_‰G]‡E^ˆIb‰PY€ISzCh_Ph_Ph_Ph_Ph_Ph_Ph_Ph_Pg^Oh_Ph_Ph_Ph_Ph_Pi`Qi`QmdUlcTjaRi`Qh_Pg^Og^Mh`MiaNiaLiaLiaLh`Ih`IhaGh`IgaKf_Le^Kb[H\WDUR?PMSQDSPAXLÂYSÙROàDEà::Ü75Õ;3Ê>/º=)µ8"É:)Ï8'Ð9(Ò;*Ò;*Ò;*Ò;*Ò;*Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Ñ:)Í;,Á;0¶:.­<,§>+™9#3“7Ÿ?'£9#°;)À>0Æ<1Ì8.Ð7/Ù<5ã?=ì=Bî?DéCEâDCØ@?Ê;7À50»1.¹/,¼51¾:6»<6³:2ª8.¤8,¡:+¡=-Ÿ>+ ?,¡@-¡@-¡A+£>*¦=*©;*­:(²7(¹5)¿5+É90Ô?9àC>ä=7è;5è;5ç<4å<5ä=4á>5Þ@5ÜD9ØD:ÒC;ÊA9Ä?:¼;6¸85°93¢7-™8(•5'“6'‘:)<*‹:)…8&ˆ=*…<+ƒ<*€<)~:'|8%{6&{6&y1#€8*ŒG8–SC’PB‹L=RE™_S‘WL’YN”[R–]T–]V—\V–YTŒ^QaX;EM(6@8A&>G26BE*;:&78(=>09;069.:>06?,F7GK=IK=AE4KJ6\Q;aE/ƒJ9Àj]Üg`ãUSäFEåA@àA=Õ>5É=0Æ=-Æ4%Ë5&Ì6'Í7(Í7(Î8)Ñ;,Ó=.Ò<-Ò<-Ò<-Ò<-Ñ;,Ñ;,Ñ;,Î<-»2(¶7.±;/¨:)š7"”5•7œ9"®A-³;+º6)Á4*Í6/×<7âC?êHEèDEèEHÝCCÉ:6»61´80®8.©4+«9/©9.¤8. 8-›9,–:+“<+’<+–=+˜=*™>+š?,›@-A, A-£@-¢;*¥:(«7(°6)¶6+¾8-Ä;3Ì<4Ú=6à=6â?8âA7âA9ÞB6Ú@6×@5ØH=ÒE;ÇA8»;2²5/ª3-¦1*Ÿ2+™9-’;*‘9+:*‹:)ˆ;)‡;+…<+€9'}8(|9(|9(|9({8'y6&x3$w- ‹A4—OC“MAŽL@‘QE“UJŽRG˜\R˜\R‘UMTL—ZU•XS”WT“gZ]T5IQ*AK(BK,>H/7@+2=-4?14<1HPCZ^PW[JMO:DF.AA'==%:;)>?1;=2:=2;?14=*;H.PbF7>F7=E6@F8>E5>F1HL5MI0U?'Q:¼sbËcXà_ZëUTçGGâ@>àA=Ø?9Î:0Í9+Î=,Ï=.Ï>-Ï;-Î;+Í9+Í:*Î:,Ð:+Ð:,Ð:+Ð:,Ð:+Ð:,Í;.É?5ÅB:¼B7®=/Ÿ6#–1–1›2¨5#´6(Ã;/ÑA8ÞE?æIDéJFêKHÞCAÛEDÐB>¼<3¯9/©=0¥?1Ÿ=0Ÿ?1œ>2—>0”>/=/Š>.‡@.ˆ?,Ž=*‘;*’<+“=,”?+•>+—>,™>,Ÿ@.¡=-¤:,¨8,¬8+±8-¶:0¼9/Ê<2Ð<2Ó?5ÕA7×C9ÖC9ÔD9ÑE8ÊB6ÃA4¹=3°:0©6/¤5.Ÿ4,™7,’:.Œ=,Š;,ˆ;+†:*„;*ƒ<*<,~;*|;){9)y:)x9(w8'u6'w4$€4'D7˜NC‘K?ŒJ>QD’TIRG“SJ˜XO˜UO—VPœ]X”WRŽSOŠcT]W5Xc9_jBZfBIT66C)4@*0:<19<1<@25>+;H.PbMKD63Å?3ÅA4ÃA3ÁA4¶;,²:,ª8-£7+ž6+›6,˜7.”:/;/ˆ<,‡;-„;,‚:+€;+€;+<,};+z;*z;,w9*v8)u7(t6)v4&ˆ;1”F<–NBŽJ=ˆH<OB‘SH’RI’OI™TO™SQšVSš]Z“YU[Tl[}X~‰^€‹alxRLX46D#=J.LZ@eqYeoW]eMPU>EI0?C(=@#:<$89';<.8:/9<1=A36?,MK4Ñ>4Ò>4Ò>4Ó?5Ó?5Ó?5Ó>7Ó?;ÑB>ËD>ÆF=ÂF<ÃI>ÇM@ÎPDÙSHÝPGâMGäIEäGBâC?àA=ÛB=ÕFBÉD?º?7«=0Ÿ>.šC0•G3”I6F4ŒE3ˆC3…B1€A0}@.zA.|?-‚:,†8,…9+†:,†:,‡;-‡;+ˆ;+‰:+‹:)Ž8)8*•9,™;/=/¢<0ª:/­8.¯9/°:.°:.°:,¯9+®8*¨7)¥7(ž6)›6*•7+’8-‘9/Ž<0ˆ<.…<-ƒ;,9*:*~9*}:*};+|:,z;,y;,w9*s8*q6(r7)u5)ŒD8’H=‘K?ŠH:‡I<‹OD“TK—TL–QL›TP˜QO”SO–\X_Xh^—~j””p…’fu‚WYh?CR+?O*P`B)=A(;='78(:;-79.9<1=A37@-NKB1=I1?G/LG1S>+g=-•ZL­_Sœ>4ž3+¶?9ØXUóigödeëRUæJNèNPÙIAÓF<Í@6Ë>4Î@6ÒD:ÕG=×G>ÚJAÚJAÝJBÝJBÞKCÞKCàKDàKEëSRèTTãSRÜROØSLØSLÛULàUNàLHáIFãEBâC@äB@âC@äEBàFDÙJFÊE@¹>7¬=2¡?2˜B1’E3G4ŒE3ˆC3‡B3ƒ@0?1~?0z?/|>/€:.ƒ9.ƒ9.ƒ9.ƒ;-ƒ;-ƒ;-ƒ;-9*‚9*…9+‡:*‰:+;-<.“;/›;/ž9-Ÿ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G4:F2:C25@/3>-1<,3:33954954928919;.;>-;@*CL/O^7]sDi„Mp“SwŸYy£Yw¡Yq˜Yf‰OZ}CX{A\E]€F]€F^G`ƒI`ƒI`ƒI`ƒI`ƒI_‚H^G]€JV{HJn@Ae7haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlbVj`VjaXkdZkg^upjˆ…€Ÿžš°°®ÃÂÀÓÒÐâáßçæäçãàãÞÚÞÖÓÙÎÈμ²¸¥——‡zym]_YIKL:@E1;D/>J6=H7=F5;C4;>5:;3983880==3C<2N71a84ˆHH¯]_Å`dÊWZÍQSÓNO×MKÛKJÞHGáFDãDAâBBßCDÞDFÞDFÝCEÝCEÜBDÜBBÛCBÚDCØD@ÕD?ÓF?ÒE<ÐF<ÐG=ÔE=Ù@:Ù@:ÑB:ÈC:¼C:¬@4™;/Œ9+‰=/ƒ>.>-€=,<,ƒ;,ƒ;,„<-‚:,‚:,‚:,9+9-9-~8.}9.~:/~:/}:1}:1}:1}:1}:1}:1z:1y:1x90x90w8/t8.s7-r8-t8.s9.r8-q8-r8-p7,p7,p7,o6-o6-n5,n5,m4+l3*k2)i3)g1'k7,h4)e1&h4)b0%f4)zA8MG’MH‘PJŽULˆXNYOxZOr\Nk^N^WGRPAKN=CJ:9B12:+08)17+17-06,/5+/5)08+2:+4<-9D4;F5=H7-.800621622717829;0:<.:?)?H+KY5[qChƒLq“Vwž[w¡YsœVgP^IUx@WzB[~F[~F[~F]€H_‚J_‚J_‚J_‚J^I^I]€H]€JUvIJk@@a6haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlbVpg^ng_lgatqj‡„¡ œ¼¼ºÎÐÏÏÏÏàààòòòúøùû÷ö÷óðñìéðâßèÐÆÝÁµÁ«¢‘}ub^\GKM7CH2AI2AI4@G5BD7AA7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B>ÓB=ÒA<Ó@9ÜA<Û@;Ó@9ËB:¿C;±A6 ;1’8-Œ=0‡>/ƒ>.>-€=,<+<,<,:+9-9-~8,}9.|8-|8-|8-|90|90|90|90z:1{;2{;2z;2w<4u<3u:2s:1r90n8.o6-m7-m7-l8-l8-l8-l8-j8-l8-l8-k6.n70o81n91l7/i4,g2*e3*c1(d4*_/%^.$b2(^.$`0&p>5JE‡RL‡XR~XOrVKdRDQJ:>?/:A16A05@03>04<14<15;17:379477577557246116//6./7,.9+1<.4A08E49H58G44E24B1.8/.5..3--2+23+46+8:-9=,7?(DQ3WlEh‚Ut•`wbp˜YgPY|DWxCTu@Tu@VwBYzEYzEYzE[|G_€K_€K\}H[|G^J^J^{MSnKF_A9R4icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSicSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUmdUmdUneVneVlfZed_y{x—™˜²¶·ÍÑÒäéìôùüúÿÿûÿÿüÿÿýþÿþþþÿþüÿÿûÿÿúÿÿôþüçúùÝïðÑáåÄÒØ´¼ÄŸ ¨ƒ‡‘l`gEQX7DG,DC.JD4LD7KA8I>:C;9SJKia_wvœ’¾³¯ÙÎÈêÜÓþèÝÿóéÿäÛð©£ÃecµBEÇDIÚRVÛUTÑMKÊDAÍCAÔFE×EFØDDÙCDÖ=?×>@Ø@?Ö@?ÖB@ÓB?ÓB=ÔA:Ù@:Ù@:ÒB:ËE<ÀD<²B7¡<2“9.Ž<0‰=0ƒ>/>.=-~<,€=-€=-9-9-~:/}9.}9.|8-{8/{8/}:1}:1{;2{;2{;2{;2z;4x<4t;2q;1r90o9/n8.l8-l6,k7,l8-j8-j8-j8-j8-i9-j8-j8-n91m80m80m80m80i7.f4+c1(d2)a1']-#_0&c4*\-#_0&sD<}PJVP~YQpTI^J?OC7?<-46(2;*0;+1<.2=/4<14<15;17:379479668357257227007/08-.9+0;-2?.6C27E48G48G49F54>33:2/4-,2(/0(13(57*6:)6>'DQ5YmJk„Zw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)gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSkbSkbSlcTlcTmdUmdUmdUmdUmdUneVneVofWpgXpgXng]lnmz‚…“š «µ·ÄÎÐÜæèí÷ùôþÿõþýöÿüúÿúûÿùûþóøúíõöèñôãôýêôýèôüåóùßòöÛéìÍØ×¹ÅÄ¥±°’ŽregOMP;GK:FM=GOBKQG{{sŸš”ž¸ØÎÌßÓÓçÛÛóëéü÷ôðïêüüôÿÿöÿýóÿùïÿóêÿçÞÿ×Ëؓƒ¸eS£J:´TF½WIµF;·@8ÈKEÇC>ÊC?ÌB?ÎC@ÎC>ÎC>ÍD>ÍB=ÑB<ÒC?ÎDAÅD?¸A=ª=8ž;5•<4Ž;3‰<2ƒ=3=2=1~<0=1=/~:/~:/~:/}9.|90{8/{8/{8/|<3{;2{;2z:1y:3x92w81u91n70l7/l7/j8/i7.i7.h6-g7-g7-g7-f7-f7-f7-f7-f7-f7-h70h6/g5.g5.g6/h70g6/f5.a2*e6.^2)\0'`4+a5,i=4uSJXG@E>6<5/95,;8/8:/57,36+69.5;/7:/69.69.58-57,36+28,19,28.19,19.19,19,19,.9+.9+.9+/:,0;+3>.6A17B2ex\umt’lf‰_RwKBh9KkVsCZwG]zJ^{K_|L_|LVsCNg@ÉD=ÈC<ÉB<ÑC?ÐE@ÌEAÂC=³=9¦;5œ;5•<6Œ<3‡=4…<5=4<3~<0=1=1~:/~:/~:/}9.|90{8/{8/{8/{;2{;2y:3x92w81v70v70s7/n70j8/j8/j8/j8/h8.h8.h8.g7-f7-f7-f7-d8-d8-d8-f7-g6/h70i81i81h70i81j;3l=5g80k<4b6-a5,oC:xLCtI@nMDC9056.45/8918;247.14+25,58-58-57,46+46+46+46)37)/7(.9)08+.9).9+.9)08)08)19*08)08+/7*08+19,3;.4<-9B1:C0;B0:A1:<.68*24&/3$29'IU?cu[m„gf„bWyTInE?d8Hg;Li;Nk=Nk=Li;Li;Mj

    UrDYvH[xJ]zL^{M\yKQn@G_;6B4+4/#)%gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSjcSjbUlbVlbVmcWmdUmdUmdUleUmfVngWogZnh\oh^mjekormtzƒŠ¥®³ÃÌÑÕßáæîñôüþôýú÷ýùùþ÷úÿôüÿòüÿñüÿîýþðûøïþúñÿùïÿúíÿùéÿòßïàËÝηÁ²›¢—|ubb_NXZL]cWmwn|†}¦¬¢¾ÀµÚÕÏîäâüîîÿôôÿô÷þôõÿùùûúøûýøüÿúøÿõôüñ÷ýñÿÿñÿùèÿôãÿÌ»½p›QD©SFµSH²C:ÀJ@ÄH@ÇG>ÉF>ÈE=ÇD<ÆC;ÆC;ÍG>ÌG>ÇG>¼C;­>5Ÿ:2—:3‘>6Š=5†=4ƒ=5=4€<3;0;1;1~:/~:/~:1}90|90{8/{8/{8/z:1z:1x92w81v70u6/u6/q6.m80k90j8/j8/i9/i9/i9/h8.g7-f7-g7-f7-f7-f7-f7-f7-f5.j81m;4k:3j92j:0m>4oC8l@5oD;d<2c=2zVJ†dZyWMbLA>:13814927<54:0/5+25,9<336+25*24)03(13(25*46+47,.6),7)/7*-8*/7*/7*/7*/7*19,08+08-/7,/7,/7,08-08+7?09B14*00!''heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjdVjdVjdXldYlcZmeZmeXmfVg`NjeRnkXol]he\feasqr‚†Š“–ž¡«³¶ÃÈËØÝàêîïö÷ùùûúüþýþþüÿÿúýþöúýòùüñúýòûþóùúòúúòùùíüúëþüçù÷ÞéåÊÕÔ¶º¹›˜˜|qtY_dMbkXr}l„‚‘›´¹²ËÌÇãâÞòîë÷óòû÷öýùøüø÷ÿþüþþüþþüýÿúýÿúýÿúýÿúýÿúúü÷ÿÿúÿûöÿêåا £`X›D=µNE¿MCÂF<ÄD9ÊE<ÎI@ÎKAËH@ÇG<ÆG8ÃH8½J8³H8¦E5šB4‘B5‹C5†B5„B6‚@4‚>3‚<2„:1†91†9191~:1|91{80z7/z7/w7.v6-w7.w7.w8/w8/v7.u6-q5+n3+l7/i81i81h70h70g6/g6/g6/f5.g6/i70i81h70g6/e4-e3,h3-j5/m80k90j:0i;.i=0kA3gB2jI:dH:v_O~k\ŠxjŒoRJ=79.4:04:039/39/39/28.28.17-17-36-06,25,/5+14+/5+/4-.5-/4-.5-/4-/4-/4-/4-05./4-/4-.3,.3,/4-/4-/6.1;23=26@58B79D67B45@03>-4?.DQ=WeN[kQPbHEX<@T8BW6Ic>Ke>Kf=Kf=JeOj?UpGYtK\vO]wP]wRWqNHb?;O6&1+&+.$),heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVidQjhSmjWjk[gg_lll~„“š¨¯µ¸ÂÄÑÖÙâçêòóõûüþÿþÿÿþÿþýûÿþúÿÿúþÿùûüôøûòöüò÷ýó÷úñøúïøúí÷úéùûåòõÚßâÃÌЯ´¸—‘–vkqUYaI_kUtoŒ˜Š§œ¿Á¼ÓÓÑççåóóñ÷÷õûûùüüúûûùþþüþþüþþüþþüþþüþþüþþüûÿþõÿÿõÿÿþÿÿÿûúÿíêð¿ºÂ~uŸKA¯M@¹K>ÂL@ÅK>ÃE9¼=4¾?6ÃE9ÄF7ÃJ7½L:³J7¦F6™C2‘C6E7…C7‚B8A7>5‚<4ƒ:3†91„93~92}:2z:1z:1y90x8/v7.v7.u6-v7.t8.t8.t8.r6,o5*m4+l7/i81j81h70i70h70g6/g6/e3,e3,g5.h6/j81j81j81k92k60l71k90k;1k;/j>1j@0iD2gH6kP=gRAufSueŒ…s†ƒrKL<69.39/39/39/28.28.28.17-17-17-17-06,06,/5+/5+/5+/4./4./4./4./4./4./4./4.05//4..3-.3-.3-.3-/4./6/.80/:21=34@66B66B66B45B16C1CP>P]IR`IIW@AO6BP7EU:Jb@Jd?Ke@Ke>Ic6I5&1-',0$)-heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVmhUkiTmjWjk[kkcwww‘’—§¬²¿ÆÌÒÜÞìñô÷üÿþÿÿþÿÿÿþÿÿþÿþýûÿþúÿÿúýþøúûóõøïñ÷ëñ÷ëô÷ìõùëöøêõøåõ÷áîîÔÛÛ¿ÉÊ«°±’“–yuy`kpZt{iˆŸ§œ®µ­ÍÏÊÞÞÜïïíøøöûûùþþüþþüýýûþþüþþüþþüþþüþþüþþüþþüýÿþûÿÿûÿÿÿÿÿÿûùÿúôÿ÷íýÑÆ؞”L=¥RB©L;§@1·G;ÏYMÏUJ¼@4ÄD7ÆH:ÃK=¹I;ªB7?3—@7“E;‰@9„A9A8?6~>5}=4<4}=4z;4x<4w;3w;3u:2t91t91t91r90r90r90r90o9/n8.l6,k5+l7/j81l71j81k60i70i70h6/g5.g5.f5.g6/h70i81k:3k:3l;4j;3i:0h<1k?2jC4iD2fE2fI7lVAjYGujV†m‘Ž{€mEF658-28.28.28.17-17-17-06,17-17-17-06,06,/5+/5+/5+/4./4./4./4./4./4./4./4./4./4..3--2,-2,.3-/4..5.+5-+6.-9//;12>24@46B47D38E3?L:ER>CQ:;I28F->L3DT9J_@Jb@LdBKc?Ia=G`9F_8G`9RkDXpL]uS^vVZqTPgK=T8.A.&1-',0%*.heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVniVljUlkWlm]pqi€‚ž¡¦¹¾ÄÄËÑÛåçõúýûÿÿüýÿüýÿþüýüûùÿþüÿÿûÿþùûüôõöîîñæéïãçíßíñâðôåñôãñôßòñÜêêÐØؼÇÇ«²±•¡¡‰‘“}“€œž‘ª­¢¶»´ÀÅ¿ÜÜÚééçööôûûùýýûÿÿýÿÿýýýûþþüþþüþþüþþüþþüþþüþþüþþþûûýÿþÿÿþÿ÷òïüóìÿüóÿûíÿôäìñ¹p•P@¢O?¸XJ·M?µE9ÀG<ÁA6ÈE;ÅI?½G=¯@9¡<4š=6–A<?;‡@<@:}@;z?9y@9x?8x?8v=4v=4v=4u<3s=3r<2r<2q;1o;0o;0o;0n:/k9.j8-j8-i7.m82n72m61l71l71k60i70i70l:3j92h70f7/f7/f7/h91f:1j?6f>4e=1f>2hC3iE5fG3cG2cJ6hV@i\IskV…‚oŽzpq_9=,47,28.17-17-17-06,06,06,17-17-17-06,06,/5+/5+/5+.3-.3-.3-.3-.3-.3-.3-.3-.3-.3--2,-2,-2,-2,.3--4-*4,)4,*6,+7-.:.1=14@25A36C2:G5N4DX¿@7ÆC;ÅF?¿D=±>;¦:7ž:8™>;‘=;Š?<„@=}@=xA6s>6r=5r=5r=5p>5o=4n>4m=3l<2k;1j;1i:0i:0j:0n72p62p62m61m61l71i70i70l;4k:3h91e90e90e90e:1d<2fB6cA5cC4dD5dG5dI6bI3_I2^L6eV?jbMrmW„ƒo„‡r[`L3:(28,28.17-17-17-06,06,06,17-17-17-06,06,/5+/5+/5+.3-.3-.3-.3-.3-.3-.3-.3--2,-2,,1+,1+,1+,1+-2,,3,,6.+5-*4+*4++5,.8-0;-2=/2=-5@/6A05A-1=)1=)5A-8F/=O5@T8FY=H\@J]?I^=K^>K`?TgG[pQcvZauZYkSJ]G6G4&4%$-*$),"'*heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZlfVjgTkjUlnYorasvm…„Ÿ¤¨¸¿ÇÖßäí÷ùûÿÿûÿÿûüÿþÿÿÿþÿþýûÿÿûÿÿúüüôóõêëíâãçÙÝãÕÜãÑäéÓçìÕéíÖêìÔëëÓèæÏßÚÄÓθÓκÌƶËøÐÉÁ×ÒÎàÛØêæåðïíóòðùù÷ýýûýýûýýûÿÿýþþüüüúþþüþþüþþüþþüþþüþþüþþüÿýüÿûüÿøùÿþýþÿýùÿýôÿøïÿõ÷ÿöð÷çÿÿíÿîÛͧ”¤kX¢[GªWE­L;¹D:ÀD<ÀE>¼E?´A>ª=:¢:9š;9•=<?=…?=}@;wB5o?5o?5o@6n?5m>4k<2h<1h<1h<1l<2o83q62p62p62m61l71j81i81h70g80e90e:1d<2e?4f@5dB6^B4aG8cL:dM;cM8`K6]K3]M4]Q9bX?mhRss[€ƒnv{eFO:4=*39-28.28.28.17-17-17-06,17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,-2,,1++0*+0*+0*+0*,1+,3,.5.,6.*4+*4+*4++5,-7,.9+-8*0;+4?/5@/4?.3?+3>-3@,7F/9K3@O8BT:GW¸J=¹I>¸I@´G@¯D>¥=:œ:7–=9>:ˆ?9€A:xA:tD:pF:pE5j>5n=6o83r73p62p62n72l71j81i81d8/d90c;1d>3d@4cA5cA5_C5ZE4_NnlUtv^|kcmU2>(6B.3;.39/39/39/28.28.28.17-17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,,1+,1++0**/)*/)+0*,1++2+-4-+5-*4,*4,+5,+5,,6+-7,,6+/:,2=/6A17B27B15@04?.2?-4C.:G3=L5AO8DT:JX?L\BTbI\kTcqZ^mXUbPDRA2>0#/%&/,&,,$**heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjdVjdVjcYkdZlc\md[lfZlfVolYmlWjlWgkZflbr{xŽ˜š¨±¸ÊÓØãìñøýÿ÷üÿúûÿþÿÿÿþÿúùõÿÿúýýõøøîðòåéëÝåéØãêØåíÖæìÒéíÒêíÒèèÎèæÏèãÏáÚÈØÐÃØÎÄÝÒÌêßÛøíëÿôöÿõùÿõûÿùüþüýÿÿýÿÿýþþüþþüÿÿýÿÿýýýûþþüþþüþþüþþüþþüþþüþþüÿþúÿýûÿýûýüúùýüøÿÿõÿÿóÿÿíýúóÿûûÿúÿÿôÿöæÿóßÿãÍ×­•©oY¨WD®Q@¬O>¯OA±OB­K@¤C<™<5•>7?6ˆ?8A7{B7uD6qE8qE8p?8q?8s>8q?8q?8q?8q?8p?8sB;qB:o@8m>6l=5j>5m>6o>7o83q73o83m82m82i81h91f:1f;2d>3d@4bB5`C5]A3\@2WB1TG4[S>f^Gi^HbX?ZS9ZS7\W:ZV;XW;kmUsw^u}fUaI&28D03;.4:04:039/39/39/28.28.17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,,1++0*+0**/)*/)+0*+0*,1++2+)3+*4,+5-+5,,6--7.-7,,6+.8-2<16A39D69D47B46A10;+2?-5B09F22=/x=/t?/sB3tD6r=5r=7t=8s>8u@:u@:t?9q?8sA:q@9q@9q@9p?8n?7o>7o>7k92m82l:3l;4l;4h<3g<3c=2c?3^>1dG9cG9T=-N9(M8'@1WQ;PN7KI0OK2]Y>ieJeaDVU7XX<]`CosZz€fdlU=I1-9#2>*4-1=)2>*9E/BN8IU?O[GVbN]hWYdTLWI/u@8s>8u>9u@:t?9o=6p>7sA:q?8p?8p?8n?7o>7m>6n=6m>6k<4l=5m>6k?6j?6gA6eA5bB5dG9[A2^G7^I8N=+F7$G8%>6!LL4GK2DG,DD*MM1\[?baC`aBYY=dgJsw^sy_X`I:D,/;%7C/6>16<26<26<25;15;15;15;15;15;15;14:04:039/39/39/27127127116016016005/05/.3-.3--2,-2,,1+,1++0*+0**1**1*)0))0))0)*1*+2*,3+.5--4,.5-07/4;39A6?F>BJ?;F8:E57B14?.3?+6B.)r>)s@+tD0vE4q?4n<3q<4tB9sA8o?5qA7xH>n>4m>4m>4k?4l=3j>3l=3j>3g?5gA6gA6gC7eC7cC6`C5^D5bK;UB1ZI7`S@RG3C;&E=(FA+AE,BH.AE*<@%?B%NN2_`AijKaaEnqTvzagmSJO94<%4=(=F38>28>48>48>47=37=37=36<28>48>47=37=37=36<26<26<25:449349349338238238227105/05//4..3--2,,1++0*+0*).().().().().(*/)+0*,1+160/4.,1+,1+/4.6;4=BK:4.8/-4--4-,3,gdUgdUheVheVheVheVifWifWifWifWifWifWifWifWifWifWkeWkeWlcZmd[md]mf\mg[jiWkmXimVjoYjs`hthm|wˆ˜˜¦³¹¿ÊÐÓÜãëðööûÿüýÿýÿþÿÿýÿþùþþöýýñúûí÷úçô÷âîóÜåíÕâèÎÛàÀ×Ú»ÖÖ¼Ù×ÂÝ×ÇÞ×ÍåÛÙìààøìðûðöÿõûÿùþÿúýÿûûÿûûÿýüÿþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüýÿüøÿþøÿþûÿþþþþÿüþÿúÿÿùÿÿøþÿúýÿùüÿùùÿýúÿÿøÿÿøûÿõüþðÿÿíÿüéÿñßÿðÝÿïÚñÒ½´z{R>tJ4uH3vI4zM8}P;yL7nA.e7'{M@sD:qB8sD:oC8g;0d8-g=1i?3i?3i?3g?3f>2f>2f>2e?2b@4bB5`C5_C5_C5[D4ZE4WD3XI6OB/\T?oiSc^HMK4IG0IK3>D*?H-@F*48>47=37=37=39?58>48>48>48>48>48>48>47<67<67<66;56;56;55:45:438238216005//4.-2,,1+,1++0*+0**/)*/)+0*,1+-2,-2,05/.3-+0*+0*-2.2718=9;B:@K=@M;@M;=J68E13@,1?(0>'4.:0,6..5.-4-gdUgdUgdUheVheVifWifWifWifWifWifWifWifWifWifWifWkeWldWlcZmd[md]mf\mg[jiWkmXinWiqZgs_drejyt…••£²·½ÈÎÒÛâêïõôùýûüÿýÿþÿÿýÿÿúÿÿøÿÿóþÿñûþë÷úåðõÞæîÖâèÌÙÜ¿ÕÕ¹ÒйÔѾÚÔÈàÙÑêàßôéíþóùÿ÷üÿûÿÿýÿÿþÿÿþüÿþúÿþúþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüýÿþúÿÿúÿÿûÿÿþþþÿýþÿüüÿûüÿûúÿúøÿù÷ÿú÷ÿýøÿÿûÿÿûýÿúýþùùôîÿþöÿýôÿüóÿûîÿ÷çûæÕéÒÀÏ´¡¶š…”uawVCjI6lI6rM;uP>mF7iB3gB2jE5nI9nJ:oK;oK;eA1cB1cB1cB1cB1cB1bC1`C3]F6\G6\G6ZG6ZG6WH5TG4RG3PH3NH2fdM~~frrZVX@JL4GM3A.:>-;>39?59?58>48>47=37=37=38>48>48>48>48>48>48>48>49>89>89>88=78=78=77<67<66;55:449338227105//4./4.-2.-2.,1-+0,+0,,1--2.-2.,1-,1-,1-,1-.210513764;4;G9=L9@O<@O:8F71?2-9-,6--4,,3+fcTfcTgdUheVheVifWjgXjgXifWifWifWifWifWifWifWifWldWldWlcZmd[md]mf\mg[jiWkmXinWiqZgs_bpcgxr‚””£²·ÀËÑÔÝäëðöõúþûüÿýÿþÿÿýÿÿúÿÿøÿÿôÿÿóÿÿïúýèò÷àçðÕâèÌ×Ú½ÑѵÍË´Î˺ÖÏÅÞ×Ñìâã÷îóÿöþÿúÿÿýÿÿþÿÿÿýþÿúþÿùþÿúþÿúþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþþýþÿýþÿýþÿýÿþýÿüþÿúþÿùÿÿ÷ýýóýýõþýøþýùÿþüþþþÿýÿÿþÿþùÿÿüÿÿûüûöóÿøòÿýôÿþñÿýíÿúéÿòà÷äÓçÒ¿Ò»©¹ŸŽŸ„srb|]K}^LtUCaD2W:(Y<*[>,X=*`E2`E2`E2_F2`G3`G3`G3]H3\K7\M:\M:YL9XM9UM8RL6QL6NL5QQ9ikS|€gmqXSY?FL2>G,48>48>48>47=37=38>48>48>48>49?59?5:?9:?9:?9:?99>89>89>88=78=78=77<66;55:4493382382/40.3/-2.,1-+0,+0,+0,+0,+0,,1--10.21/32/32/32-4-3?17F3=L7@O:?N7M:MJ9BC3=@5;A7;A7;A7:@6:@6:@69?58>48>48>49?59?5:@6:@6:@6;@:;@:;@::?9:?99>89>89>8:?9:?99>89>88=78=77<67<6495273162/40-2.,1-+/.+/.,0/,0/-10.21.23.23-12+1-+9*/@-6H2;M7=O7A6>A6>A6=@7=@79?59?59?5:@6:@6:B7:B7:B7;@9;@9;@::?8:?99>79>89>7;@:;@9;@:;@9:?9:?8:?9:?98?87=94;4382160/4..3/.3/.21.21,2.,2.+2++2*,4))6%$6)=!2F+8L1;O6;M5;M5;M58J29K3;M5H&DK*FM+EL*PV4PT3KN/HK,TT8bbFccIZZ@[Y@\ZA][B][B[Y@XV=US:SQ8HF1GD1DA0A?0@>1>>2??5>@5;>59?59?59A69A48C58C58C5:B79A69@88@58?79A69@8:B7:A9:B79@8:B7;B:E=8B:8B:7A88@56>14O<>P::L6@R8EW=FY=DX=@T;5H2+<),6+,3++2*ZgM[hN\hP]iQbjSckTglXhkXghVghVifWifWkeWlfXmeZmgYmgYkhYkg[kg\jf]jf[hfZefVhiWglVfo\erajwnzŠ‰œ«²ºÈÑÐÙàáéìò÷ûøþþùþúúÿøûþóùýïøùë÷øæõôâíìØéæÓåâÏÜ×ÄÒ˹ʿ­Á´¤¹­¡¼¯¦Á¶²ËÁÀÛÐÖæßæûóþý÷ÿþûÿÿþÿþýÿüýÿüýÿüýÿþþþþþþþþþþþþþþþþþþÿþüÿþüÿþüÿþüÿýúÿüùÿüùÿýúÿýùÿþúÿþýÿýüÿüýÿýþÿþÿÿþÿÿýþýûüÿþýÿþûÿüúÿøóøíçòåÝöèßûðêÿúýÿüÿÿýþÿÿýÿÿûýÿüýÿþüýÿýþÿýþÿÿýÿÿþüÿþõÿÿîÿþèÿÿäúöÝýûâäàNj‡lRM0SN0QK+QK+UO/UO/TO1TO1SO2SO2QP4QP4QM2PO3PN5NQ6MO7JP6HM6EM5HQ6EN1BK.?I'BI(FM+JP,KQ-NR/PT1VZ7^bA_bCY\?TWWU>XV=YW>XV=XW;WV:XT9QK3OI3LG4ID1DA2B@3A?3>@5<=59?59?59A67B48C57D37D3:B79A69A68@58@59A69A6:B7:B7:B7:B7:B7;C874>63=40>-3C)9M*BY/Ga1Op;Ln;Li=Fa>BY?F;J@?I>>I9?G8>F7>D8=B;>E>9C;6@74B19I/BV3Pg=XrB^J[}JXuIMhECZ@9O:6G54E2XR6:@6:@69A67B47B46C26C2;C8:B79A69A69A69A6:B7;C8;C8:B7:B7;C8;C8=E:>F;=G<=G?>H=>I9?G8>F7>D8=B;=D=9C;6@74B19I/DX5Ri?[uEZ{FWyFTqEIdA=T:2H3/@.->+6H2@R8L_CReGSgKOcG@W=6I30:/07/-4,YgMZhN\hP^jRblTemVinZjo[mn\lm[mk\mj[nhZnhZoi]oi[liZkhYjfZieZie\ieZig[ghXghVchRajWerao|s{‹ŠŸ¦¢°¹ÁËÔÔÝäéñôòúüôúøñöðíðçèìÞâãÕÚÛÉÒÑ¿ÌɶÉıþ«¿¸¦¼³¢Ê¾®ÓŸÜÐÄæÙÑíâàöìíÿôúÿùÿÿ÷ÿÿúÿÿüÿþýÿýüÿûüþüþýþÿÿþþþþþþþþþþþþþþþþþþÿþüÿþüþýûþýûÿýúÿýúÿýúÿûøÿúöþùõÿýüÿûúýùúþúûþüýÿýþÿþÿÿýþÿüûÿýúÿüúÿøó÷ìæòåÝøêáÿôîÿúýÿüÿÿýþÿÿýÿÿûýÿúýÿþüýÿüýÿýþÿÿþÿÿÿýÿþõÿýìÿûãþúßÿüæÿÿéçâ̌ˆoRL2TO2TM0UN1TN.UO/VQ3VQ3UQ4SO2ON2NM1PL1NM1NL3KN3LN6KQ7KP9JR:LU:IR5JS6OY7SZ9T[9]c?fnG‚’c’¦sŸ±›ª’¡zˆ”pr{\\bFLP7KM5LK6KI4LJ5PK5TN8VP:WQ;VP:SN;QL9LI:IG:GE9CE:=>6:@6:@69A67B47B46C26C2;C8;C8:B79A69A6:B7;C8;C8;C8;C8;C8;C8F;=G<=G?=G<=H8>F7=E6=C7=B;:A:7A95?64B19I/BV3Ne;Uo?Tu@RtAPmAE`=9P6-C.+<*+<)1C-!Vx7}f~W~m!srZw zBt{G3L^(l_(SrEoyyv{%THk-)exCpKTF-j!-@f*B?R%e-&X)jCUCd1k00;yCfEN$o zd=8)q08>-bP*Z_vXlQ6@!E_K71_(VpgoBBhk%fno_X-auH#gr^Nnt*IaRF{_5xHyP zQb;r!%`2>+B9Bs*lt!a|e*{QNOADcgurn~Qqu|_d)c<>&696zUAPcZU3FHS*z<`u6 z;CU~A3jm;?1pfZr{|-tZ1&E58=33s9Knh9#i0XV60HFi|D4>+ki!%47pfY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+1qB0z z_R)#gaJbIfq028^oo$NwXIJLpZ+T>l@Pf^OOFfyEFGzp3WY$+#EGI|UUqxM7&a`BZ zg412Uk2t%Yltvhs`Rg|4gy3dRxp`iXMee?KaBrtANNUUmUMcoo(u=d;9Kc3%Hm_G} z%X<*5QPB<49LiaZHkNL^8JCr&8>yE?No&XSB@x`vR5w-)y$3QO)>Lr>kID{;+Rbw*PAqI_S$ z*Sy=-5iHfMIwvPly6=EVmzBI9Y=aSv^nfUXPjUUX7B6lo7zQ^$tX1}8W&<R^Ck^ zY7s$OVXSu-gi{C=Uer8gtWlK#;7gq>b3EMQR$rli350iho&)0G>36h=-M1g|^pUON z$RdYB*I!#P@LYPp{uN7nPiWUeEeRGWgZvF1J~N@}2ECI}z_a82GNMl|)p$u=hJ6KV zm^uu7bQBY_v!Qh5W*`xBX{N~`8gpCADEPX5HR}WdF%?qZIp>fFSV{q~w$y1VZCkz3 zGA}&4ImT@ARLmLNOjWlKBk;;|7et++tsMF1W?+uAALH{d#TY%Sd4+gi875vsBoM2Z zuykS?H}5=JntNZHel|LD3XwL9+3J;E$Bxx5M`y)Fmjuy53M;JR1b=`#@?7TD$d&uc zmbQl578?_}A*f7OU!KCtDw;_GG)x4sA=U>Glz0)GI-6o|S6VKjezpen8p z7iThx<&QEMOOU=!#>qVhOc;D1pTI^fHn7EQZA^+ SFy0h4Vu|?xbo`-qKJz~|j?X{< literal 0 HcmV?d00001 diff --git a/gtkmm-osx/jpeg-6b/testorig.jpg b/gtkmm-osx/jpeg-6b/testorig.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9816a0c6231a7c5eaafd445368a9eeb1cffc63df GIT binary patch literal 5770 zcmbW(S5y;DmjLjD7OF@IQiAkel%{kP4J8sV5JE?av`~c5K@n7n^ePbPA&}6K-V}sT z6$Ap(MS2lLiZsRb|9yLQ&)KKly>n(BX70IXelrg!N z0e1kjG&CR@YFZEoL`O$U&&bZi$iTqJ#mdIa&dberm6sa=;TM(_;}?_`f|9_4@od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7mh}vEm6d`R@PHKknir(w7GH{YcUR@W6&NOO-MF~dJckQu)LnE}U_{r;`I})_ z#TiaR$#`!ylhS8w4-?12_G(W-cm=K{!A9yAkxYrqFtUa5_}!M|h?dU|zm32t9{UxY zi#1;KXA>O{u0gy>9}xRbJ~H^e@^@17T~{1O(T5s)fEv8)P#;Bi(E~9^Pv8y`kebr9 zVoGXD?v2%4`dP75QJOCGYMml}U6*fkQ*K3GyRRmOZ@Ppsc6}|B>{ktPV9O|EqX#ng9Q(i%9Qn47NBI1q+ zKt&jNMeVq+VK9Cl6e5n7iA`KhB*%NV6vdi^ZHssX<@bX7Vx&)(zx{p1+rRDoonK3> zyH+rI;A7n7@n%pyBnJUycD&g#ZW|QFV59Ic5p^J!I<>uH-JJ2VYXt#?-}EOC8;|+1 zN?SCN)iCj@m~Sd^iEe``MX^QH{?-_3eMfdrKT3X~u~^Dsuv;8( e^;Dd4QS7i5y@D0wT$xcv%Tm0kNlEL^^nU=~nbB7O literal 0 HcmV?d00001 diff --git a/gtkmm-osx/jpeg-6b/testprog.jpg b/gtkmm-osx/jpeg-6b/testprog.jpg new file mode 100644 index 0000000000000000000000000000000000000000..920fee2e32b5a8ab0af796e010ee8a1add3eee63 GIT binary patch literal 5655 zcmb7{cQjmU+s0=`?^D!47`-!$(TOfvln|nKi8@;JPDG8P6J&IW9yPk?L{IeSHIir% zk>KN;^S$&#ty6@|`>s0_)UFDt%00;yCfHxQ5dJ&)qAjHQf zz{evbARr(jA|xiIBqJpuA*F-DC@2}>Om`UJ3=GU{0-Ve&e5?!%Tw>gOLP!(}#l$Hg zBQ7j0Ac7LUeF>0=h=`Pgl$MN)Rv5v65dMGHbq@eS2uK5L-~d?wAP5i#0=(`8&;tM< z9N_Ke{QoB^V#GdhuimXn;{b) zxA>^!0F~>|#=Atb8uQ%#4<8Ve*CP{t`&F6yws-GrC25R0RtHy(444airxDB*!+$yQ zs8Lcfuwya)&$wq?aiG(Wx5u+&x&G|)iW(T*!Is$@T%v3u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A9~-)xlL{~&Nw`iw(p{8zlb#hs9CFYq;vGqJ%{<(K=O z^@464$F=e@WU1>VuE0{kTk5r(7F%AEC9r%YzR|shJo{i9rcA@M6Z9(Nu%Hq!QpQLl z6I1I=)ovp^lcjLj!Qr~`M$>s~eV;FFp7RPitYY*=1tvr9;u5Qj(mR;WNp`_}?S0*NZ!0O17jS5$qW4qOgdqc(E}HrWIl;#kEx#ljhbX~C zsF5pQ1Ii$E;zqw^G$J0cwP$(_Pm4b}xl>l{n=!JQ?H~xAq1vSpBXbRji@5qGIxCp; zTLGcJ8iU;&IZ@!sS}N*QA1sz<9}bJGA;PHO8k-c@8%b@6d17(T%qj7qUYsZ0?6z56+I?~sasnVb9`n?ZjVtZ3B7%oF~GNLhe#LwZ#q;};^oZisv30;4}CYxss%Jin` zJ}ZSZkL0KdZN}0x5OJ4Su%;$1BJvgNy`Pe@RVcB;2Gwk@0U%wNCx0E^V&GL8LmRKu z-sSM6qzFZ{UIIDm+n#|kOp)bT#;B*P(fM$jQr|k)hk>_=uK0@ZWl@L*4 zD2uZ*`|z;_)RsDT;*`4^IDXN**v3#jGDu;n$2hu2e_hm9F0NmR5z)R^LnX>9WdC4L U9#E?5!l?r;*e8trGk!h)KW4JmQUCw| literal 0 HcmV?d00001 diff --git a/gtkmm-osx/jpeg-6b/transupp.c b/gtkmm-osx/jpeg-6b/transupp.c new file mode 100644 index 0000000..e5ec564 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/transupp.c @@ -0,0 +1,928 @@ +/* + * transupp.c + * + * Copyright (C) 1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains image transformation routines and other utility code + * used by the jpegtran sample application. These are NOT part of the core + * JPEG library. But we keep these routines separate from jpegtran.c to + * ease the task of maintaining jpegtran-like programs that have other user + * interfaces. + */ + +/* Although this file really shouldn't have access to the library internals, + * it's helpful to let it call jround_up() and jcopy_block_row(). + */ +#define JPEG_INTERNALS + +#include "jinclude.h" +#include "jpeglib.h" +#include "transupp.h" /* My own external interface */ + + +#if TRANSFORMS_SUPPORTED + +/* + * Lossless image transformation routines. These routines work on DCT + * coefficient arrays and thus do not require any lossy decompression + * or recompression of the image. + * Thanks to Guido Vollbeding for the initial design and code of this feature. + * + * Horizontal flipping is done in-place, using a single top-to-bottom + * pass through the virtual source array. It will thus be much the + * fastest option for images larger than main memory. + * + * The other routines require a set of destination virtual arrays, so they + * need twice as much memory as jpegtran normally does. The destination + * arrays are always written in normal scan order (top to bottom) because + * the virtual array manager expects this. The source arrays will be scanned + * in the corresponding order, which means multiple passes through the source + * arrays for most of the transforms. That could result in much thrashing + * if the image is larger than main memory. + * + * Some notes about the operating environment of the individual transform + * routines: + * 1. Both the source and destination virtual arrays are allocated from the + * source JPEG object, and therefore should be manipulated by calling the + * source's memory manager. + * 2. The destination's component count should be used. It may be smaller + * than the source's when forcing to grayscale. + * 3. Likewise the destination's sampling factors should be used. When + * forcing to grayscale the destination's sampling factors will be all 1, + * and we may as well take that as the effective iMCU size. + * 4. When "trim" is in effect, the destination's dimensions will be the + * trimmed values but the source's will be untrimmed. + * 5. All the routines assume that the source and destination buffers are + * padded out to a full iMCU boundary. This is true, although for the + * source buffer it is an undocumented property of jdcoefct.c. + * Notes 2,3,4 boil down to this: generally we should use the destination's + * dimensions and ignore the source's. + */ + + +LOCAL(void) +do_flip_h (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays) +/* Horizontal flip; done in-place, so no separate dest array is required */ +{ + JDIMENSION MCU_cols, comp_width, blk_x, blk_y; + int ci, k, offset_y; + JBLOCKARRAY buffer; + JCOEFPTR ptr1, ptr2; + JCOEF temp1, temp2; + jpeg_component_info *compptr; + + /* Horizontal mirroring of DCT blocks is accomplished by swapping + * pairs of blocks in-place. Within a DCT block, we perform horizontal + * mirroring by changing the signs of odd-numbered columns. + * Partial iMCUs at the right edge are left untouched. + */ + MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_width = MCU_cols * compptr->h_samp_factor; + for (blk_y = 0; blk_y < compptr->height_in_blocks; + blk_y += compptr->v_samp_factor) { + buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + for (blk_x = 0; blk_x * 2 < comp_width; blk_x++) { + ptr1 = buffer[offset_y][blk_x]; + ptr2 = buffer[offset_y][comp_width - blk_x - 1]; + /* this unrolled loop doesn't need to know which row it's on... */ + for (k = 0; k < DCTSIZE2; k += 2) { + temp1 = *ptr1; /* swap even column */ + temp2 = *ptr2; + *ptr1++ = temp2; + *ptr2++ = temp1; + temp1 = *ptr1; /* swap odd column with sign change */ + temp2 = *ptr2; + *ptr1++ = -temp2; + *ptr2++ = -temp1; + } + } + } + } + } +} + + +LOCAL(void) +do_flip_v (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) +/* Vertical flip */ +{ + JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y; + int ci, i, j, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JBLOCKROW src_row_ptr, dst_row_ptr; + JCOEFPTR src_ptr, dst_ptr; + jpeg_component_info *compptr; + + /* We output into a separate array because we can't touch different + * rows of the source virtual array simultaneously. Otherwise, this + * is a pretty straightforward analog of horizontal flip. + * Within a DCT block, vertical mirroring is done by changing the signs + * of odd-numbered rows. + * Partial iMCUs at the bottom edge are copied verbatim. + */ + MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_height = MCU_rows * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + if (dst_blk_y < comp_height) { + /* Row is within the mirrorable area. */ + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + comp_height - dst_blk_y - (JDIMENSION) compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } else { + /* Bottom-edge blocks will be copied verbatim. */ + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + if (dst_blk_y < comp_height) { + /* Row is within the mirrorable area. */ + dst_row_ptr = dst_buffer[offset_y]; + src_row_ptr = src_buffer[compptr->v_samp_factor - offset_y - 1]; + for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; + dst_blk_x++) { + dst_ptr = dst_row_ptr[dst_blk_x]; + src_ptr = src_row_ptr[dst_blk_x]; + for (i = 0; i < DCTSIZE; i += 2) { + /* copy even row */ + for (j = 0; j < DCTSIZE; j++) + *dst_ptr++ = *src_ptr++; + /* copy odd row with sign change */ + for (j = 0; j < DCTSIZE; j++) + *dst_ptr++ = - *src_ptr++; + } + } + } else { + /* Just copy row verbatim. */ + jcopy_block_row(src_buffer[offset_y], dst_buffer[offset_y], + compptr->width_in_blocks); + } + } + } + } +} + + +LOCAL(void) +do_transpose (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) +/* Transpose source into destination */ +{ + JDIMENSION dst_blk_x, dst_blk_y; + int ci, i, j, offset_x, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JCOEFPTR src_ptr, dst_ptr; + jpeg_component_info *compptr; + + /* Transposing pixels within a block just requires transposing the + * DCT coefficients. + * Partial iMCUs at the edges require no special treatment; we simply + * process all the available DCT blocks for every component. + */ + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; + dst_blk_x += compptr->h_samp_factor) { + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x, + (JDIMENSION) compptr->h_samp_factor, FALSE); + for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { + src_ptr = src_buffer[offset_x][dst_blk_y + offset_y]; + dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; + for (i = 0; i < DCTSIZE; i++) + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + } + } + } + } + } +} + + +LOCAL(void) +do_rot_90 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) +/* 90 degree rotation is equivalent to + * 1. Transposing the image; + * 2. Horizontal mirroring. + * These two steps are merged into a single processing routine. + */ +{ + JDIMENSION MCU_cols, comp_width, dst_blk_x, dst_blk_y; + int ci, i, j, offset_x, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JCOEFPTR src_ptr, dst_ptr; + jpeg_component_info *compptr; + + /* Because of the horizontal mirror step, we can't process partial iMCUs + * at the (output) right edge properly. They just get transposed and + * not mirrored. + */ + MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_width = MCU_cols * compptr->h_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; + dst_blk_x += compptr->h_samp_factor) { + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x, + (JDIMENSION) compptr->h_samp_factor, FALSE); + for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { + src_ptr = src_buffer[offset_x][dst_blk_y + offset_y]; + if (dst_blk_x < comp_width) { + /* Block is within the mirrorable area. */ + dst_ptr = dst_buffer[offset_y] + [comp_width - dst_blk_x - offset_x - 1]; + for (i = 0; i < DCTSIZE; i++) { + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + i++; + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; + } + } else { + /* Edge blocks are transposed but not mirrored. */ + dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; + for (i = 0; i < DCTSIZE; i++) + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + } + } + } + } + } + } +} + + +LOCAL(void) +do_rot_270 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) +/* 270 degree rotation is equivalent to + * 1. Horizontal mirroring; + * 2. Transposing the image. + * These two steps are merged into a single processing routine. + */ +{ + JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y; + int ci, i, j, offset_x, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JCOEFPTR src_ptr, dst_ptr; + jpeg_component_info *compptr; + + /* Because of the horizontal mirror step, we can't process partial iMCUs + * at the (output) bottom edge properly. They just get transposed and + * not mirrored. + */ + MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_height = MCU_rows * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; + dst_blk_x += compptr->h_samp_factor) { + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x, + (JDIMENSION) compptr->h_samp_factor, FALSE); + for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { + dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; + if (dst_blk_y < comp_height) { + /* Block is within the mirrorable area. */ + src_ptr = src_buffer[offset_x] + [comp_height - dst_blk_y - offset_y - 1]; + for (i = 0; i < DCTSIZE; i++) { + for (j = 0; j < DCTSIZE; j++) { + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + j++; + dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; + } + } + } else { + /* Edge blocks are transposed but not mirrored. */ + src_ptr = src_buffer[offset_x][dst_blk_y + offset_y]; + for (i = 0; i < DCTSIZE; i++) + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + } + } + } + } + } + } +} + + +LOCAL(void) +do_rot_180 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) +/* 180 degree rotation is equivalent to + * 1. Vertical mirroring; + * 2. Horizontal mirroring. + * These two steps are merged into a single processing routine. + */ +{ + JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, dst_blk_x, dst_blk_y; + int ci, i, j, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JBLOCKROW src_row_ptr, dst_row_ptr; + JCOEFPTR src_ptr, dst_ptr; + jpeg_component_info *compptr; + + MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE); + MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_width = MCU_cols * compptr->h_samp_factor; + comp_height = MCU_rows * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + if (dst_blk_y < comp_height) { + /* Row is within the vertically mirrorable area. */ + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + comp_height - dst_blk_y - (JDIMENSION) compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } else { + /* Bottom-edge rows are only mirrored horizontally. */ + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + if (dst_blk_y < comp_height) { + /* Row is within the mirrorable area. */ + dst_row_ptr = dst_buffer[offset_y]; + src_row_ptr = src_buffer[compptr->v_samp_factor - offset_y - 1]; + /* Process the blocks that can be mirrored both ways. */ + for (dst_blk_x = 0; dst_blk_x < comp_width; dst_blk_x++) { + dst_ptr = dst_row_ptr[dst_blk_x]; + src_ptr = src_row_ptr[comp_width - dst_blk_x - 1]; + for (i = 0; i < DCTSIZE; i += 2) { + /* For even row, negate every odd column. */ + for (j = 0; j < DCTSIZE; j += 2) { + *dst_ptr++ = *src_ptr++; + *dst_ptr++ = - *src_ptr++; + } + /* For odd row, negate every even column. */ + for (j = 0; j < DCTSIZE; j += 2) { + *dst_ptr++ = - *src_ptr++; + *dst_ptr++ = *src_ptr++; + } + } + } + /* Any remaining right-edge blocks are only mirrored vertically. */ + for (; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { + dst_ptr = dst_row_ptr[dst_blk_x]; + src_ptr = src_row_ptr[dst_blk_x]; + for (i = 0; i < DCTSIZE; i += 2) { + for (j = 0; j < DCTSIZE; j++) + *dst_ptr++ = *src_ptr++; + for (j = 0; j < DCTSIZE; j++) + *dst_ptr++ = - *src_ptr++; + } + } + } else { + /* Remaining rows are just mirrored horizontally. */ + dst_row_ptr = dst_buffer[offset_y]; + src_row_ptr = src_buffer[offset_y]; + /* Process the blocks that can be mirrored. */ + for (dst_blk_x = 0; dst_blk_x < comp_width; dst_blk_x++) { + dst_ptr = dst_row_ptr[dst_blk_x]; + src_ptr = src_row_ptr[comp_width - dst_blk_x - 1]; + for (i = 0; i < DCTSIZE2; i += 2) { + *dst_ptr++ = *src_ptr++; + *dst_ptr++ = - *src_ptr++; + } + } + /* Any remaining right-edge blocks are only copied. */ + for (; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { + dst_ptr = dst_row_ptr[dst_blk_x]; + src_ptr = src_row_ptr[dst_blk_x]; + for (i = 0; i < DCTSIZE2; i++) + *dst_ptr++ = *src_ptr++; + } + } + } + } + } +} + + +LOCAL(void) +do_transverse (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) +/* Transverse transpose is equivalent to + * 1. 180 degree rotation; + * 2. Transposition; + * or + * 1. Horizontal mirroring; + * 2. Transposition; + * 3. Horizontal mirroring. + * These steps are merged into a single processing routine. + */ +{ + JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, dst_blk_x, dst_blk_y; + int ci, i, j, offset_x, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JCOEFPTR src_ptr, dst_ptr; + jpeg_component_info *compptr; + + MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE); + MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_width = MCU_cols * compptr->h_samp_factor; + comp_height = MCU_rows * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; + dst_blk_x += compptr->h_samp_factor) { + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x, + (JDIMENSION) compptr->h_samp_factor, FALSE); + for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { + if (dst_blk_y < comp_height) { + src_ptr = src_buffer[offset_x] + [comp_height - dst_blk_y - offset_y - 1]; + if (dst_blk_x < comp_width) { + /* Block is within the mirrorable area. */ + dst_ptr = dst_buffer[offset_y] + [comp_width - dst_blk_x - offset_x - 1]; + for (i = 0; i < DCTSIZE; i++) { + for (j = 0; j < DCTSIZE; j++) { + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + j++; + dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; + } + i++; + for (j = 0; j < DCTSIZE; j++) { + dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; + j++; + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + } + } + } else { + /* Right-edge blocks are mirrored in y only */ + dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; + for (i = 0; i < DCTSIZE; i++) { + for (j = 0; j < DCTSIZE; j++) { + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + j++; + dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; + } + } + } + } else { + src_ptr = src_buffer[offset_x][dst_blk_y + offset_y]; + if (dst_blk_x < comp_width) { + /* Bottom-edge blocks are mirrored in x only */ + dst_ptr = dst_buffer[offset_y] + [comp_width - dst_blk_x - offset_x - 1]; + for (i = 0; i < DCTSIZE; i++) { + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + i++; + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; + } + } else { + /* At lower right corner, just transpose, no mirroring */ + dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; + for (i = 0; i < DCTSIZE; i++) + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + } + } + } + } + } + } + } +} + + +/* Request any required workspace. + * + * We allocate the workspace virtual arrays from the source decompression + * object, so that all the arrays (both the original data and the workspace) + * will be taken into account while making memory management decisions. + * Hence, this routine must be called after jpeg_read_header (which reads + * the image dimensions) and before jpeg_read_coefficients (which realizes + * the source's virtual arrays). + */ + +GLOBAL(void) +jtransform_request_workspace (j_decompress_ptr srcinfo, + jpeg_transform_info *info) +{ + jvirt_barray_ptr *coef_arrays = NULL; + jpeg_component_info *compptr; + int ci; + + if (info->force_grayscale && + srcinfo->jpeg_color_space == JCS_YCbCr && + srcinfo->num_components == 3) { + /* We'll only process the first component */ + info->num_components = 1; + } else { + /* Process all the components */ + info->num_components = srcinfo->num_components; + } + + switch (info->transform) { + case JXFORM_NONE: + case JXFORM_FLIP_H: + /* Don't need a workspace array */ + break; + case JXFORM_FLIP_V: + case JXFORM_ROT_180: + /* Need workspace arrays having same dimensions as source image. + * Note that we allocate arrays padded out to the next iMCU boundary, + * so that transform routines need not worry about missing edge blocks. + */ + coef_arrays = (jvirt_barray_ptr *) + (*srcinfo->mem->alloc_small) ((j_common_ptr) srcinfo, JPOOL_IMAGE, + SIZEOF(jvirt_barray_ptr) * info->num_components); + for (ci = 0; ci < info->num_components; ci++) { + compptr = srcinfo->comp_info + ci; + coef_arrays[ci] = (*srcinfo->mem->request_virt_barray) + ((j_common_ptr) srcinfo, JPOOL_IMAGE, FALSE, + (JDIMENSION) jround_up((long) compptr->width_in_blocks, + (long) compptr->h_samp_factor), + (JDIMENSION) jround_up((long) compptr->height_in_blocks, + (long) compptr->v_samp_factor), + (JDIMENSION) compptr->v_samp_factor); + } + break; + case JXFORM_TRANSPOSE: + case JXFORM_TRANSVERSE: + case JXFORM_ROT_90: + case JXFORM_ROT_270: + /* Need workspace arrays having transposed dimensions. + * Note that we allocate arrays padded out to the next iMCU boundary, + * so that transform routines need not worry about missing edge blocks. + */ + coef_arrays = (jvirt_barray_ptr *) + (*srcinfo->mem->alloc_small) ((j_common_ptr) srcinfo, JPOOL_IMAGE, + SIZEOF(jvirt_barray_ptr) * info->num_components); + for (ci = 0; ci < info->num_components; ci++) { + compptr = srcinfo->comp_info + ci; + coef_arrays[ci] = (*srcinfo->mem->request_virt_barray) + ((j_common_ptr) srcinfo, JPOOL_IMAGE, FALSE, + (JDIMENSION) jround_up((long) compptr->height_in_blocks, + (long) compptr->v_samp_factor), + (JDIMENSION) jround_up((long) compptr->width_in_blocks, + (long) compptr->h_samp_factor), + (JDIMENSION) compptr->h_samp_factor); + } + break; + } + info->workspace_coef_arrays = coef_arrays; +} + + +/* Transpose destination image parameters */ + +LOCAL(void) +transpose_critical_parameters (j_compress_ptr dstinfo) +{ + int tblno, i, j, ci, itemp; + jpeg_component_info *compptr; + JQUANT_TBL *qtblptr; + JDIMENSION dtemp; + UINT16 qtemp; + + /* Transpose basic image dimensions */ + dtemp = dstinfo->image_width; + dstinfo->image_width = dstinfo->image_height; + dstinfo->image_height = dtemp; + + /* Transpose sampling factors */ + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + itemp = compptr->h_samp_factor; + compptr->h_samp_factor = compptr->v_samp_factor; + compptr->v_samp_factor = itemp; + } + + /* Transpose quantization tables */ + for (tblno = 0; tblno < NUM_QUANT_TBLS; tblno++) { + qtblptr = dstinfo->quant_tbl_ptrs[tblno]; + if (qtblptr != NULL) { + for (i = 0; i < DCTSIZE; i++) { + for (j = 0; j < i; j++) { + qtemp = qtblptr->quantval[i*DCTSIZE+j]; + qtblptr->quantval[i*DCTSIZE+j] = qtblptr->quantval[j*DCTSIZE+i]; + qtblptr->quantval[j*DCTSIZE+i] = qtemp; + } + } + } + } +} + + +/* Trim off any partial iMCUs on the indicated destination edge */ + +LOCAL(void) +trim_right_edge (j_compress_ptr dstinfo) +{ + int ci, max_h_samp_factor; + JDIMENSION MCU_cols; + + /* We have to compute max_h_samp_factor ourselves, + * because it hasn't been set yet in the destination + * (and we don't want to use the source's value). + */ + max_h_samp_factor = 1; + for (ci = 0; ci < dstinfo->num_components; ci++) { + int h_samp_factor = dstinfo->comp_info[ci].h_samp_factor; + max_h_samp_factor = MAX(max_h_samp_factor, h_samp_factor); + } + MCU_cols = dstinfo->image_width / (max_h_samp_factor * DCTSIZE); + if (MCU_cols > 0) /* can't trim to 0 pixels */ + dstinfo->image_width = MCU_cols * (max_h_samp_factor * DCTSIZE); +} + +LOCAL(void) +trim_bottom_edge (j_compress_ptr dstinfo) +{ + int ci, max_v_samp_factor; + JDIMENSION MCU_rows; + + /* We have to compute max_v_samp_factor ourselves, + * because it hasn't been set yet in the destination + * (and we don't want to use the source's value). + */ + max_v_samp_factor = 1; + for (ci = 0; ci < dstinfo->num_components; ci++) { + int v_samp_factor = dstinfo->comp_info[ci].v_samp_factor; + max_v_samp_factor = MAX(max_v_samp_factor, v_samp_factor); + } + MCU_rows = dstinfo->image_height / (max_v_samp_factor * DCTSIZE); + if (MCU_rows > 0) /* can't trim to 0 pixels */ + dstinfo->image_height = MCU_rows * (max_v_samp_factor * DCTSIZE); +} + + +/* Adjust output image parameters as needed. + * + * This must be called after jpeg_copy_critical_parameters() + * and before jpeg_write_coefficients(). + * + * The return value is the set of virtual coefficient arrays to be written + * (either the ones allocated by jtransform_request_workspace, or the + * original source data arrays). The caller will need to pass this value + * to jpeg_write_coefficients(). + */ + +GLOBAL(jvirt_barray_ptr *) +jtransform_adjust_parameters (j_decompress_ptr srcinfo, + j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays, + jpeg_transform_info *info) +{ + /* If force-to-grayscale is requested, adjust destination parameters */ + if (info->force_grayscale) { + /* We use jpeg_set_colorspace to make sure subsidiary settings get fixed + * properly. Among other things, the target h_samp_factor & v_samp_factor + * will get set to 1, which typically won't match the source. + * In fact we do this even if the source is already grayscale; that + * provides an easy way of coercing a grayscale JPEG with funny sampling + * factors to the customary 1,1. (Some decoders fail on other factors.) + */ + if ((dstinfo->jpeg_color_space == JCS_YCbCr && + dstinfo->num_components == 3) || + (dstinfo->jpeg_color_space == JCS_GRAYSCALE && + dstinfo->num_components == 1)) { + /* We have to preserve the source's quantization table number. */ + int sv_quant_tbl_no = dstinfo->comp_info[0].quant_tbl_no; + jpeg_set_colorspace(dstinfo, JCS_GRAYSCALE); + dstinfo->comp_info[0].quant_tbl_no = sv_quant_tbl_no; + } else { + /* Sorry, can't do it */ + ERREXIT(dstinfo, JERR_CONVERSION_NOTIMPL); + } + } + + /* Correct the destination's image dimensions etc if necessary */ + switch (info->transform) { + case JXFORM_NONE: + /* Nothing to do */ + break; + case JXFORM_FLIP_H: + if (info->trim) + trim_right_edge(dstinfo); + break; + case JXFORM_FLIP_V: + if (info->trim) + trim_bottom_edge(dstinfo); + break; + case JXFORM_TRANSPOSE: + transpose_critical_parameters(dstinfo); + /* transpose does NOT have to trim anything */ + break; + case JXFORM_TRANSVERSE: + transpose_critical_parameters(dstinfo); + if (info->trim) { + trim_right_edge(dstinfo); + trim_bottom_edge(dstinfo); + } + break; + case JXFORM_ROT_90: + transpose_critical_parameters(dstinfo); + if (info->trim) + trim_right_edge(dstinfo); + break; + case JXFORM_ROT_180: + if (info->trim) { + trim_right_edge(dstinfo); + trim_bottom_edge(dstinfo); + } + break; + case JXFORM_ROT_270: + transpose_critical_parameters(dstinfo); + if (info->trim) + trim_bottom_edge(dstinfo); + break; + } + + /* Return the appropriate output data set */ + if (info->workspace_coef_arrays != NULL) + return info->workspace_coef_arrays; + return src_coef_arrays; +} + + +/* Execute the actual transformation, if any. + * + * This must be called *after* jpeg_write_coefficients, because it depends + * on jpeg_write_coefficients to have computed subsidiary values such as + * the per-component width and height fields in the destination object. + * + * Note that some transformations will modify the source data arrays! + */ + +GLOBAL(void) +jtransform_execute_transformation (j_decompress_ptr srcinfo, + j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays, + jpeg_transform_info *info) +{ + jvirt_barray_ptr *dst_coef_arrays = info->workspace_coef_arrays; + + switch (info->transform) { + case JXFORM_NONE: + break; + case JXFORM_FLIP_H: + do_flip_h(srcinfo, dstinfo, src_coef_arrays); + break; + case JXFORM_FLIP_V: + do_flip_v(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays); + break; + case JXFORM_TRANSPOSE: + do_transpose(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays); + break; + case JXFORM_TRANSVERSE: + do_transverse(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays); + break; + case JXFORM_ROT_90: + do_rot_90(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays); + break; + case JXFORM_ROT_180: + do_rot_180(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays); + break; + case JXFORM_ROT_270: + do_rot_270(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays); + break; + } +} + +#endif /* TRANSFORMS_SUPPORTED */ + + +/* Setup decompression object to save desired markers in memory. + * This must be called before jpeg_read_header() to have the desired effect. + */ + +GLOBAL(void) +jcopy_markers_setup (j_decompress_ptr srcinfo, JCOPY_OPTION option) +{ +#ifdef SAVE_MARKERS_SUPPORTED + int m; + + /* Save comments except under NONE option */ + if (option != JCOPYOPT_NONE) { + jpeg_save_markers(srcinfo, JPEG_COM, 0xFFFF); + } + /* Save all types of APPn markers iff ALL option */ + if (option == JCOPYOPT_ALL) { + for (m = 0; m < 16; m++) + jpeg_save_markers(srcinfo, JPEG_APP0 + m, 0xFFFF); + } +#endif /* SAVE_MARKERS_SUPPORTED */ +} + +/* Copy markers saved in the given source object to the destination object. + * This should be called just after jpeg_start_compress() or + * jpeg_write_coefficients(). + * Note that those routines will have written the SOI, and also the + * JFIF APP0 or Adobe APP14 markers if selected. + */ + +GLOBAL(void) +jcopy_markers_execute (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JCOPY_OPTION option) +{ + jpeg_saved_marker_ptr marker; + + /* In the current implementation, we don't actually need to examine the + * option flag here; we just copy everything that got saved. + * But to avoid confusion, we do not output JFIF and Adobe APP14 markers + * if the encoder library already wrote one. + */ + for (marker = srcinfo->marker_list; marker != NULL; marker = marker->next) { + if (dstinfo->write_JFIF_header && + marker->marker == JPEG_APP0 && + marker->data_length >= 5 && + GETJOCTET(marker->data[0]) == 0x4A && + GETJOCTET(marker->data[1]) == 0x46 && + GETJOCTET(marker->data[2]) == 0x49 && + GETJOCTET(marker->data[3]) == 0x46 && + GETJOCTET(marker->data[4]) == 0) + continue; /* reject duplicate JFIF */ + if (dstinfo->write_Adobe_marker && + marker->marker == JPEG_APP0+14 && + marker->data_length >= 5 && + GETJOCTET(marker->data[0]) == 0x41 && + GETJOCTET(marker->data[1]) == 0x64 && + GETJOCTET(marker->data[2]) == 0x6F && + GETJOCTET(marker->data[3]) == 0x62 && + GETJOCTET(marker->data[4]) == 0x65) + continue; /* reject duplicate Adobe */ +#ifdef NEED_FAR_POINTERS + /* We could use jpeg_write_marker if the data weren't FAR... */ + { + unsigned int i; + jpeg_write_m_header(dstinfo, marker->marker, marker->data_length); + for (i = 0; i < marker->data_length; i++) + jpeg_write_m_byte(dstinfo, marker->data[i]); + } +#else + jpeg_write_marker(dstinfo, marker->marker, + marker->data, marker->data_length); +#endif + } +} diff --git a/gtkmm-osx/jpeg-6b/transupp.h b/gtkmm-osx/jpeg-6b/transupp.h new file mode 100644 index 0000000..5c2d32a --- /dev/null +++ b/gtkmm-osx/jpeg-6b/transupp.h @@ -0,0 +1,135 @@ +/* + * transupp.h + * + * Copyright (C) 1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains declarations for image transformation routines and + * other utility code used by the jpegtran sample application. These are + * NOT part of the core JPEG library. But we keep these routines separate + * from jpegtran.c to ease the task of maintaining jpegtran-like programs + * that have other user interfaces. + * + * NOTE: all the routines declared here have very specific requirements + * about when they are to be executed during the reading and writing of the + * source and destination files. See the comments in transupp.c, or see + * jpegtran.c for an example of correct usage. + */ + +/* If you happen not to want the image transform support, disable it here */ +#ifndef TRANSFORMS_SUPPORTED +#define TRANSFORMS_SUPPORTED 1 /* 0 disables transform code */ +#endif + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jtransform_request_workspace jTrRequest +#define jtransform_adjust_parameters jTrAdjust +#define jtransform_execute_transformation jTrExec +#define jcopy_markers_setup jCMrkSetup +#define jcopy_markers_execute jCMrkExec +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* + * Codes for supported types of image transformations. + */ + +typedef enum { + JXFORM_NONE, /* no transformation */ + JXFORM_FLIP_H, /* horizontal flip */ + JXFORM_FLIP_V, /* vertical flip */ + JXFORM_TRANSPOSE, /* transpose across UL-to-LR axis */ + JXFORM_TRANSVERSE, /* transpose across UR-to-LL axis */ + JXFORM_ROT_90, /* 90-degree clockwise rotation */ + JXFORM_ROT_180, /* 180-degree rotation */ + JXFORM_ROT_270 /* 270-degree clockwise (or 90 ccw) */ +} JXFORM_CODE; + +/* + * Although rotating and flipping data expressed as DCT coefficients is not + * hard, there is an asymmetry in the JPEG format specification for images + * whose dimensions aren't multiples of the iMCU size. The right and bottom + * image edges are padded out to the next iMCU boundary with junk data; but + * no padding is possible at the top and left edges. If we were to flip + * the whole image including the pad data, then pad garbage would become + * visible at the top and/or left, and real pixels would disappear into the + * pad margins --- perhaps permanently, since encoders & decoders may not + * bother to preserve DCT blocks that appear to be completely outside the + * nominal image area. So, we have to exclude any partial iMCUs from the + * basic transformation. + * + * Transpose is the only transformation that can handle partial iMCUs at the + * right and bottom edges completely cleanly. flip_h can flip partial iMCUs + * at the bottom, but leaves any partial iMCUs at the right edge untouched. + * Similarly flip_v leaves any partial iMCUs at the bottom edge untouched. + * The other transforms are defined as combinations of these basic transforms + * and process edge blocks in a way that preserves the equivalence. + * + * The "trim" option causes untransformable partial iMCUs to be dropped; + * this is not strictly lossless, but it usually gives the best-looking + * result for odd-size images. Note that when this option is active, + * the expected mathematical equivalences between the transforms may not hold. + * (For example, -rot 270 -trim trims only the bottom edge, but -rot 90 -trim + * followed by -rot 180 -trim trims both edges.) + * + * We also offer a "force to grayscale" option, which simply discards the + * chrominance channels of a YCbCr image. This is lossless in the sense that + * the luminance channel is preserved exactly. It's not the same kind of + * thing as the rotate/flip transformations, but it's convenient to handle it + * as part of this package, mainly because the transformation routines have to + * be aware of the option to know how many components to work on. + */ + +typedef struct { + /* Options: set by caller */ + JXFORM_CODE transform; /* image transform operator */ + boolean trim; /* if TRUE, trim partial MCUs as needed */ + boolean force_grayscale; /* if TRUE, convert color image to grayscale */ + + /* Internal workspace: caller should not touch these */ + int num_components; /* # of components in workspace */ + jvirt_barray_ptr * workspace_coef_arrays; /* workspace for transformations */ +} jpeg_transform_info; + + +#if TRANSFORMS_SUPPORTED + +/* Request any required workspace */ +EXTERN(void) jtransform_request_workspace + JPP((j_decompress_ptr srcinfo, jpeg_transform_info *info)); +/* Adjust output image parameters */ +EXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters + JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays, + jpeg_transform_info *info)); +/* Execute the actual transformation, if any */ +EXTERN(void) jtransform_execute_transformation + JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays, + jpeg_transform_info *info)); + +#endif /* TRANSFORMS_SUPPORTED */ + + +/* + * Support for copying optional markers from source to destination file. + */ + +typedef enum { + JCOPYOPT_NONE, /* copy no optional markers */ + JCOPYOPT_COMMENTS, /* copy only comment (COM) markers */ + JCOPYOPT_ALL /* copy all optional markers */ +} JCOPY_OPTION; + +#define JCOPYOPT_DEFAULT JCOPYOPT_COMMENTS /* recommended default */ + +/* Setup decompression object to save desired markers in memory */ +EXTERN(void) jcopy_markers_setup + JPP((j_decompress_ptr srcinfo, JCOPY_OPTION option)); +/* Copy markers saved in the given source object to the destination object */ +EXTERN(void) jcopy_markers_execute + JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JCOPY_OPTION option)); diff --git a/gtkmm-osx/jpeg-6b/usage.doc b/gtkmm-osx/jpeg-6b/usage.doc new file mode 100644 index 0000000..8c4970a --- /dev/null +++ b/gtkmm-osx/jpeg-6b/usage.doc @@ -0,0 +1,562 @@ +USAGE instructions for the Independent JPEG Group's JPEG software +================================================================= + +This file describes usage of the JPEG conversion programs cjpeg and djpeg, +as well as the utility programs jpegtran, rdjpgcom and wrjpgcom. (See +the other documentation files if you wish to use the JPEG library within +your own programs.) + +If you are on a Unix machine you may prefer to read the Unix-style manual +pages in files cjpeg.1, djpeg.1, jpegtran.1, rdjpgcom.1, wrjpgcom.1. + + +INTRODUCTION + +These programs implement JPEG image compression and decompression. JPEG +(pronounced "jay-peg") is a standardized compression method for full-color +and gray-scale images. JPEG is designed to handle "real-world" scenes, +for example scanned photographs. Cartoons, line drawings, and other +non-realistic images are not JPEG's strong suit; on that sort of material +you may get poor image quality and/or little compression. + +JPEG is lossy, meaning that the output image is not necessarily identical to +the input image. Hence you should not use JPEG if you have to have identical +output bits. However, on typical real-world images, very good compression +levels can be obtained with no visible change, and amazingly high compression +is possible if you can tolerate a low-quality image. You can trade off image +quality against file size by adjusting the compressor's "quality" setting. + + +GENERAL USAGE + +We provide two programs, cjpeg to compress an image file into JPEG format, +and djpeg to decompress a JPEG file back into a conventional image format. + +On Unix-like systems, you say: + cjpeg [switches] [imagefile] >jpegfile +or + djpeg [switches] [jpegfile] >imagefile +The programs read the specified input file, or standard input if none is +named. They always write to standard output (with trace/error messages to +standard error). These conventions are handy for piping images between +programs. + +On most non-Unix systems, you say: + cjpeg [switches] imagefile jpegfile +or + djpeg [switches] jpegfile imagefile +i.e., both the input and output files are named on the command line. This +style is a little more foolproof, and it loses no functionality if you don't +have pipes. (You can get this style on Unix too, if you prefer, by defining +TWO_FILE_COMMANDLINE when you compile the programs; see install.doc.) + +You can also say: + cjpeg [switches] -outfile jpegfile imagefile +or + djpeg [switches] -outfile imagefile jpegfile +This syntax works on all systems, so it is useful for scripts. + +The currently supported image file formats are: PPM (PBMPLUS color format), +PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster Toolkit +format). (RLE is supported only if the URT library is available.) +cjpeg recognizes the input image format automatically, with the exception +of some Targa-format files. You have to tell djpeg which format to generate. + +JPEG files are in the defacto standard JFIF file format. There are other, +less widely used JPEG-based file formats, but we don't support them. + +All switch names may be abbreviated; for example, -grayscale may be written +-gray or -gr. Most of the "basic" switches can be abbreviated to as little as +one letter. Upper and lower case are equivalent (-BMP is the same as -bmp). +British spellings are also accepted (e.g., -greyscale), though for brevity +these are not mentioned below. + + +CJPEG DETAILS + +The basic command line switches for cjpeg are: + + -quality N Scale quantization tables to adjust image quality. + Quality is 0 (worst) to 100 (best); default is 75. + (See below for more info.) + + -grayscale Create monochrome JPEG file from color input. + Be sure to use this switch when compressing a grayscale + BMP file, because cjpeg isn't bright enough to notice + whether a BMP file uses only shades of gray. By + saying -grayscale, you'll get a smaller JPEG file that + takes less time to process. + + -optimize Perform optimization of entropy encoding parameters. + Without this, default encoding parameters are used. + -optimize usually makes the JPEG file a little smaller, + but cjpeg runs somewhat slower and needs much more + memory. Image quality and speed of decompression are + unaffected by -optimize. + + -progressive Create progressive JPEG file (see below). + + -targa Input file is Targa format. Targa files that contain + an "identification" field will not be automatically + recognized by cjpeg; for such files you must specify + -targa to make cjpeg treat the input as Targa format. + For most Targa files, you won't need this switch. + +The -quality switch lets you trade off compressed file size against quality of +the reconstructed image: the higher the quality setting, the larger the JPEG +file, and the closer the output image will be to the original input. Normally +you want to use the lowest quality setting (smallest file) that decompresses +into something visually indistinguishable from the original image. For this +purpose the quality setting should be between 50 and 95; the default of 75 is +often about right. If you see defects at -quality 75, then go up 5 or 10 +counts at a time until you are happy with the output image. (The optimal +setting will vary from one image to another.) + +-quality 100 will generate a quantization table of all 1's, minimizing loss +in the quantization step (but there is still information loss in subsampling, +as well as roundoff error). This setting is mainly of interest for +experimental purposes. Quality values above about 95 are NOT recommended for +normal use; the compressed file size goes up dramatically for hardly any gain +in output image quality. + +In the other direction, quality values below 50 will produce very small files +of low image quality. Settings around 5 to 10 might be useful in preparing an +index of a large image library, for example. Try -quality 2 (or so) for some +amusing Cubist effects. (Note: quality values below about 25 generate 2-byte +quantization tables, which are considered optional in the JPEG standard. +cjpeg emits a warning message when you give such a quality value, because some +other JPEG programs may be unable to decode the resulting file. Use -baseline +if you need to ensure compatibility at low quality values.) + +The -progressive switch creates a "progressive JPEG" file. In this type of +JPEG file, the data is stored in multiple scans of increasing quality. If the +file is being transmitted over a slow communications link, the decoder can use +the first scan to display a low-quality image very quickly, and can then +improve the display with each subsequent scan. The final image is exactly +equivalent to a standard JPEG file of the same quality setting, and the total +file size is about the same --- often a little smaller. CAUTION: progressive +JPEG is not yet widely implemented, so many decoders will be unable to view a +progressive JPEG file at all. + +Switches for advanced users: + + -dct int Use integer DCT method (default). + -dct fast Use fast integer DCT (less accurate). + -dct float Use floating-point DCT method. + The float method is very slightly more accurate than + the int method, but is much slower unless your machine + has very fast floating-point hardware. Also note that + results of the floating-point method may vary slightly + across machines, while the integer methods should give + the same results everywhere. The fast integer method + is much less accurate than the other two. + + -restart N Emit a JPEG restart marker every N MCU rows, or every + N MCU blocks if "B" is attached to the number. + -restart 0 (the default) means no restart markers. + + -smooth N Smooth the input image to eliminate dithering noise. + N, ranging from 1 to 100, indicates the strength of + smoothing. 0 (the default) means no smoothing. + + -maxmemory N Set limit for amount of memory to use in processing + large images. Value is in thousands of bytes, or + millions of bytes if "M" is attached to the number. + For example, -max 4m selects 4000000 bytes. If more + space is needed, temporary files will be used. + + -verbose Enable debug printout. More -v's give more printout. + or -debug Also, version information is printed at startup. + +The -restart option inserts extra markers that allow a JPEG decoder to +resynchronize after a transmission error. Without restart markers, any damage +to a compressed file will usually ruin the image from the point of the error +to the end of the image; with restart markers, the damage is usually confined +to the portion of the image up to the next restart marker. Of course, the +restart markers occupy extra space. We recommend -restart 1 for images that +will be transmitted across unreliable networks such as Usenet. + +The -smooth option filters the input to eliminate fine-scale noise. This is +often useful when converting dithered images to JPEG: a moderate smoothing +factor of 10 to 50 gets rid of dithering patterns in the input file, resulting +in a smaller JPEG file and a better-looking image. Too large a smoothing +factor will visibly blur the image, however. + +Switches for wizards: + + -baseline Force baseline-compatible quantization tables to be + generated. This clamps quantization values to 8 bits + even at low quality settings. (This switch is poorly + named, since it does not ensure that the output is + actually baseline JPEG. For example, you can use + -baseline and -progressive together.) + + -qtables file Use the quantization tables given in the specified + text file. + + -qslots N[,...] Select which quantization table to use for each color + component. + + -sample HxV[,...] Set JPEG sampling factors for each color component. + + -scans file Use the scan script given in the specified text file. + +The "wizard" switches are intended for experimentation with JPEG. If you +don't know what you are doing, DON'T USE THEM. These switches are documented +further in the file wizard.doc. + + +DJPEG DETAILS + +The basic command line switches for djpeg are: + + -colors N Reduce image to at most N colors. This reduces the + or -quantize N number of colors used in the output image, so that it + can be displayed on a colormapped display or stored in + a colormapped file format. For example, if you have + an 8-bit display, you'd need to reduce to 256 or fewer + colors. (-colors is the recommended name, -quantize + is provided only for backwards compatibility.) + + -fast Select recommended processing options for fast, low + quality output. (The default options are chosen for + highest quality output.) Currently, this is equivalent + to "-dct fast -nosmooth -onepass -dither ordered". + + -grayscale Force gray-scale output even if JPEG file is color. + Useful for viewing on monochrome displays; also, + djpeg runs noticeably faster in this mode. + + -scale M/N Scale the output image by a factor M/N. Currently + the scale factor must be 1/1, 1/2, 1/4, or 1/8. + Scaling is handy if the image is larger than your + screen; also, djpeg runs much faster when scaling + down the output. + + -bmp Select BMP output format (Windows flavor). 8-bit + colormapped format is emitted if -colors or -grayscale + is specified, or if the JPEG file is gray-scale; + otherwise, 24-bit full-color format is emitted. + + -gif Select GIF output format. Since GIF does not support + more than 256 colors, -colors 256 is assumed (unless + you specify a smaller number of colors). If you + specify -fast, the default number of colors is 216. + + -os2 Select BMP output format (OS/2 1.x flavor). 8-bit + colormapped format is emitted if -colors or -grayscale + is specified, or if the JPEG file is gray-scale; + otherwise, 24-bit full-color format is emitted. + + -pnm Select PBMPLUS (PPM/PGM) output format (this is the + default format). PGM is emitted if the JPEG file is + gray-scale or if -grayscale is specified; otherwise + PPM is emitted. + + -rle Select RLE output format. (Requires URT library.) + + -targa Select Targa output format. Gray-scale format is + emitted if the JPEG file is gray-scale or if + -grayscale is specified; otherwise, colormapped format + is emitted if -colors is specified; otherwise, 24-bit + full-color format is emitted. + +Switches for advanced users: + + -dct int Use integer DCT method (default). + -dct fast Use fast integer DCT (less accurate). + -dct float Use floating-point DCT method. + The float method is very slightly more accurate than + the int method, but is much slower unless your machine + has very fast floating-point hardware. Also note that + results of the floating-point method may vary slightly + across machines, while the integer methods should give + the same results everywhere. The fast integer method + is much less accurate than the other two. + + -dither fs Use Floyd-Steinberg dithering in color quantization. + -dither ordered Use ordered dithering in color quantization. + -dither none Do not use dithering in color quantization. + By default, Floyd-Steinberg dithering is applied when + quantizing colors; this is slow but usually produces + the best results. Ordered dither is a compromise + between speed and quality; no dithering is fast but + usually looks awful. Note that these switches have + no effect unless color quantization is being done. + Ordered dither is only available in -onepass mode. + + -map FILE Quantize to the colors used in the specified image + file. This is useful for producing multiple files + with identical color maps, or for forcing a predefined + set of colors to be used. The FILE must be a GIF + or PPM file. This option overrides -colors and + -onepass. + + -nosmooth Use a faster, lower-quality upsampling routine. + + -onepass Use one-pass instead of two-pass color quantization. + The one-pass method is faster and needs less memory, + but it produces a lower-quality image. -onepass is + ignored unless you also say -colors N. Also, + the one-pass method is always used for gray-scale + output (the two-pass method is no improvement then). + + -maxmemory N Set limit for amount of memory to use in processing + large images. Value is in thousands of bytes, or + millions of bytes if "M" is attached to the number. + For example, -max 4m selects 4000000 bytes. If more + space is needed, temporary files will be used. + + -verbose Enable debug printout. More -v's give more printout. + or -debug Also, version information is printed at startup. + + +HINTS FOR CJPEG + +Color GIF files are not the ideal input for JPEG; JPEG is really intended for +compressing full-color (24-bit) images. In particular, don't try to convert +cartoons, line drawings, and other images that have only a few distinct +colors. GIF works great on these, JPEG does not. If you want to convert a +GIF to JPEG, you should experiment with cjpeg's -quality and -smooth options +to get a satisfactory conversion. -smooth 10 or so is often helpful. + +Avoid running an image through a series of JPEG compression/decompression +cycles. Image quality loss will accumulate; after ten or so cycles the image +may be noticeably worse than it was after one cycle. It's best to use a +lossless format while manipulating an image, then convert to JPEG format when +you are ready to file the image away. + +The -optimize option to cjpeg is worth using when you are making a "final" +version for posting or archiving. It's also a win when you are using low +quality settings to make very small JPEG files; the percentage improvement +is often a lot more than it is on larger files. (At present, -optimize +mode is always selected when generating progressive JPEG files.) + +GIF input files are no longer supported, to avoid the Unisys LZW patent. +Use a Unisys-licensed program if you need to read a GIF file. (Conversion +of GIF files to JPEG is usually a bad idea anyway.) + + +HINTS FOR DJPEG + +To get a quick preview of an image, use the -grayscale and/or -scale switches. +"-grayscale -scale 1/8" is the fastest case. + +Several options are available that trade off image quality to gain speed. +"-fast" turns on the recommended settings. + +"-dct fast" and/or "-nosmooth" gain speed at a small sacrifice in quality. +When producing a color-quantized image, "-onepass -dither ordered" is fast but +much lower quality than the default behavior. "-dither none" may give +acceptable results in two-pass mode, but is seldom tolerable in one-pass mode. + +If you are fortunate enough to have very fast floating point hardware, +"-dct float" may be even faster than "-dct fast". But on most machines +"-dct float" is slower than "-dct int"; in this case it is not worth using, +because its theoretical accuracy advantage is too small to be significant +in practice. + +Two-pass color quantization requires a good deal of memory; on MS-DOS machines +it may run out of memory even with -maxmemory 0. In that case you can still +decompress, with some loss of image quality, by specifying -onepass for +one-pass quantization. + +To avoid the Unisys LZW patent, djpeg produces uncompressed GIF files. These +are larger than they should be, but are readable by standard GIF decoders. + + +HINTS FOR BOTH PROGRAMS + +If more space is needed than will fit in the available main memory (as +determined by -maxmemory), temporary files will be used. (MS-DOS versions +will try to get extended or expanded memory first.) The temporary files are +often rather large: in typical cases they occupy three bytes per pixel, for +example 3*800*600 = 1.44Mb for an 800x600 image. If you don't have enough +free disk space, leave out -progressive and -optimize (for cjpeg) or specify +-onepass (for djpeg). + +On MS-DOS, the temporary files are created in the directory named by the TMP +or TEMP environment variable, or in the current directory if neither of those +exist. Amiga implementations put the temp files in the directory named by +JPEGTMP:, so be sure to assign JPEGTMP: to a disk partition with adequate free +space. + +The default memory usage limit (-maxmemory) is set when the software is +compiled. If you get an "insufficient memory" error, try specifying a smaller +-maxmemory value, even -maxmemory 0 to use the absolute minimum space. You +may want to recompile with a smaller default value if this happens often. + +On machines that have "environment" variables, you can define the environment +variable JPEGMEM to set the default memory limit. The value is specified as +described for the -maxmemory switch. JPEGMEM overrides the default value +specified when the program was compiled, and itself is overridden by an +explicit -maxmemory switch. + +On MS-DOS machines, -maxmemory is the amount of main (conventional) memory to +use. (Extended or expanded memory is also used if available.) Most +DOS-specific versions of this software do their own memory space estimation +and do not need you to specify -maxmemory. + + +JPEGTRAN + +jpegtran performs various useful transformations of JPEG files. +It can translate the coded representation from one variant of JPEG to another, +for example from baseline JPEG to progressive JPEG or vice versa. It can also +perform some rearrangements of the image data, for example turning an image +from landscape to portrait format by rotation. + +jpegtran works by rearranging the compressed data (DCT coefficients), without +ever fully decoding the image. Therefore, its transformations are lossless: +there is no image degradation at all, which would not be true if you used +djpeg followed by cjpeg to accomplish the same conversion. But by the same +token, jpegtran cannot perform lossy operations such as changing the image +quality. + +jpegtran uses a command line syntax similar to cjpeg or djpeg. +On Unix-like systems, you say: + jpegtran [switches] [inputfile] >outputfile +On most non-Unix systems, you say: + jpegtran [switches] inputfile outputfile +where both the input and output files are JPEG files. + +To specify the coded JPEG representation used in the output file, +jpegtran accepts a subset of the switches recognized by cjpeg: + -optimize Perform optimization of entropy encoding parameters. + -progressive Create progressive JPEG file. + -restart N Emit a JPEG restart marker every N MCU rows, or every + N MCU blocks if "B" is attached to the number. + -scans file Use the scan script given in the specified text file. +See the previous discussion of cjpeg for more details about these switches. +If you specify none of these switches, you get a plain baseline-JPEG output +file. The quality setting and so forth are determined by the input file. + +The image can be losslessly transformed by giving one of these switches: + -flip horizontal Mirror image horizontally (left-right). + -flip vertical Mirror image vertically (top-bottom). + -rotate 90 Rotate image 90 degrees clockwise. + -rotate 180 Rotate image 180 degrees. + -rotate 270 Rotate image 270 degrees clockwise (or 90 ccw). + -transpose Transpose image (across UL-to-LR axis). + -transverse Transverse transpose (across UR-to-LL axis). + +The transpose transformation has no restrictions regarding image dimensions. +The other transformations operate rather oddly if the image dimensions are not +a multiple of the iMCU size (usually 8 or 16 pixels), because they can only +transform complete blocks of DCT coefficient data in the desired way. + +jpegtran's default behavior when transforming an odd-size image is designed +to preserve exact reversibility and mathematical consistency of the +transformation set. As stated, transpose is able to flip the entire image +area. Horizontal mirroring leaves any partial iMCU column at the right edge +untouched, but is able to flip all rows of the image. Similarly, vertical +mirroring leaves any partial iMCU row at the bottom edge untouched, but is +able to flip all columns. The other transforms can be built up as sequences +of transpose and flip operations; for consistency, their actions on edge +pixels are defined to be the same as the end result of the corresponding +transpose-and-flip sequence. + +For practical use, you may prefer to discard any untransformable edge pixels +rather than having a strange-looking strip along the right and/or bottom edges +of a transformed image. To do this, add the -trim switch: + -trim Drop non-transformable edge blocks. +Obviously, a transformation with -trim is not reversible, so strictly speaking +jpegtran with this switch is not lossless. Also, the expected mathematical +equivalences between the transformations no longer hold. For example, +"-rot 270 -trim" trims only the bottom edge, but "-rot 90 -trim" followed by +"-rot 180 -trim" trims both edges. + +Another not-strictly-lossless transformation switch is: + -grayscale Force grayscale output. +This option discards the chrominance channels if the input image is YCbCr +(ie, a standard color JPEG), resulting in a grayscale JPEG file. The +luminance channel is preserved exactly, so this is a better method of reducing +to grayscale than decompression, conversion, and recompression. This switch +is particularly handy for fixing a monochrome picture that was mistakenly +encoded as a color JPEG. (In such a case, the space savings from getting rid +of the near-empty chroma channels won't be large; but the decoding time for +a grayscale JPEG is substantially less than that for a color JPEG.) + +jpegtran also recognizes these switches that control what to do with "extra" +markers, such as comment blocks: + -copy none Copy no extra markers from source file. This setting + suppresses all comments and other excess baggage + present in the source file. + -copy comments Copy only comment markers. This setting copies + comments from the source file, but discards + any other inessential data. + -copy all Copy all extra markers. This setting preserves + miscellaneous markers found in the source file, such + as JFIF thumbnails and Photoshop settings. In some + files these extra markers can be sizable. +The default behavior is -copy comments. (Note: in IJG releases v6 and v6a, +jpegtran always did the equivalent of -copy none.) + +Additional switches recognized by jpegtran are: + -outfile filename + -maxmemory N + -verbose + -debug +These work the same as in cjpeg or djpeg. + + +THE COMMENT UTILITIES + +The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. +Although the standard doesn't actually define what COM blocks are for, they +are widely used to hold user-supplied text strings. This lets you add +annotations, titles, index terms, etc to your JPEG files, and later retrieve +them as text. COM blocks do not interfere with the image stored in the JPEG +file. The maximum size of a COM block is 64K, but you can have as many of +them as you like in one JPEG file. + +We provide two utility programs to display COM block contents and add COM +blocks to a JPEG file. + +rdjpgcom searches a JPEG file and prints the contents of any COM blocks on +standard output. The command line syntax is + rdjpgcom [-verbose] [inputfilename] +The switch "-verbose" (or just "-v") causes rdjpgcom to also display the JPEG +image dimensions. If you omit the input file name from the command line, +the JPEG file is read from standard input. (This may not work on some +operating systems, if binary data can't be read from stdin.) + +wrjpgcom adds a COM block, containing text you provide, to a JPEG file. +Ordinarily, the COM block is added after any existing COM blocks, but you +can delete the old COM blocks if you wish. wrjpgcom produces a new JPEG +file; it does not modify the input file. DO NOT try to overwrite the input +file by directing wrjpgcom's output back into it; on most systems this will +just destroy your file. + +The command line syntax for wrjpgcom is similar to cjpeg's. On Unix-like +systems, it is + wrjpgcom [switches] [inputfilename] +The output file is written to standard output. The input file comes from +the named file, or from standard input if no input file is named. + +On most non-Unix systems, the syntax is + wrjpgcom [switches] inputfilename outputfilename +where both input and output file names must be given explicitly. + +wrjpgcom understands three switches: + -replace Delete any existing COM blocks from the file. + -comment "Comment text" Supply new COM text on command line. + -cfile name Read text for new COM block from named file. +(Switch names can be abbreviated.) If you have only one line of comment text +to add, you can provide it on the command line with -comment. The comment +text must be surrounded with quotes so that it is treated as a single +argument. Longer comments can be read from a text file. + +If you give neither -comment nor -cfile, then wrjpgcom will read the comment +text from standard input. (In this case an input image file name MUST be +supplied, so that the source JPEG file comes from somewhere else.) You can +enter multiple lines, up to 64KB worth. Type an end-of-file indicator +(usually control-D or control-Z) to terminate the comment text entry. + +wrjpgcom will not add a COM block if the provided comment string is empty. +Therefore -replace -comment "" can be used to delete all COM blocks from a +file. + +These utility programs do not depend on the IJG JPEG library. In +particular, the source code for rdjpgcom is intended as an illustration of +the minimum amount of code required to parse a JPEG file header correctly. diff --git a/gtkmm-osx/jpeg-6b/wizard.doc b/gtkmm-osx/jpeg-6b/wizard.doc new file mode 100644 index 0000000..54170b2 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/wizard.doc @@ -0,0 +1,211 @@ +Advanced usage instructions for the Independent JPEG Group's JPEG software +========================================================================== + +This file describes cjpeg's "switches for wizards". + +The "wizard" switches are intended for experimentation with JPEG by persons +who are reasonably knowledgeable about the JPEG standard. If you don't know +what you are doing, DON'T USE THESE SWITCHES. You'll likely produce files +with worse image quality and/or poorer compression than you'd get from the +default settings. Furthermore, these switches must be used with caution +when making files intended for general use, because not all JPEG decoders +will support unusual JPEG parameter settings. + + +Quantization Table Adjustment +----------------------------- + +Ordinarily, cjpeg starts with a default set of tables (the same ones given +as examples in the JPEG standard) and scales them up or down according to +the -quality setting. The details of the scaling algorithm can be found in +jcparam.c. At very low quality settings, some quantization table entries +can get scaled up to values exceeding 255. Although 2-byte quantization +values are supported by the IJG software, this feature is not in baseline +JPEG and is not supported by all implementations. If you need to ensure +wide compatibility of low-quality files, you can constrain the scaled +quantization values to no more than 255 by giving the -baseline switch. +Note that use of -baseline will result in poorer quality for the same file +size, since more bits than necessary are expended on higher AC coefficients. + +You can substitute a different set of quantization values by using the +-qtables switch: + + -qtables file Use the quantization tables given in the named file. + +The specified file should be a text file containing decimal quantization +values. The file should contain one to four tables, each of 64 elements. +The tables are implicitly numbered 0,1,etc. in order of appearance. Table +entries appear in normal array order (NOT in the zigzag order in which they +will be stored in the JPEG file). + +Quantization table files are free format, in that arbitrary whitespace can +appear between numbers. Also, comments can be included: a comment starts +with '#' and extends to the end of the line. Here is an example file that +duplicates the default quantization tables: + + # Quantization tables given in JPEG spec, section K.1 + + # This is table 0 (the luminance table): + 16 11 10 16 24 40 51 61 + 12 12 14 19 26 58 60 55 + 14 13 16 24 40 57 69 56 + 14 17 22 29 51 87 80 62 + 18 22 37 56 68 109 103 77 + 24 35 55 64 81 104 113 92 + 49 64 78 87 103 121 120 101 + 72 92 95 98 112 100 103 99 + + # This is table 1 (the chrominance table): + 17 18 24 47 99 99 99 99 + 18 21 26 66 99 99 99 99 + 24 26 56 99 99 99 99 99 + 47 66 99 99 99 99 99 99 + 99 99 99 99 99 99 99 99 + 99 99 99 99 99 99 99 99 + 99 99 99 99 99 99 99 99 + 99 99 99 99 99 99 99 99 + +If the -qtables switch is used without -quality, then the specified tables +are used exactly as-is. If both -qtables and -quality are used, then the +tables taken from the file are scaled in the same fashion that the default +tables would be scaled for that quality setting. If -baseline appears, then +the quantization values are constrained to the range 1-255. + +By default, cjpeg will use quantization table 0 for luminance components and +table 1 for chrominance components. To override this choice, use the -qslots +switch: + + -qslots N[,...] Select which quantization table to use for + each color component. + +The -qslots switch specifies a quantization table number for each color +component, in the order in which the components appear in the JPEG SOF marker. +For example, to create a separate table for each of Y,Cb,Cr, you could +provide a -qtables file that defines three quantization tables and say +"-qslots 0,1,2". If -qslots gives fewer table numbers than there are color +components, then the last table number is repeated as necessary. + + +Sampling Factor Adjustment +-------------------------- + +By default, cjpeg uses 2:1 horizontal and vertical downsampling when +compressing YCbCr data, and no downsampling for all other color spaces. +You can override this default with the -sample switch: + + -sample HxV[,...] Set JPEG sampling factors for each color + component. + +The -sample switch specifies the JPEG sampling factors for each color +component, in the order in which they appear in the JPEG SOF marker. +If you specify fewer HxV pairs than there are components, the remaining +components are set to 1x1 sampling. For example, the default YCbCr setting +is equivalent to "-sample 2x2,1x1,1x1", which can be abbreviated to +"-sample 2x2". + +There are still some JPEG decoders in existence that support only 2x1 +sampling (also called 4:2:2 sampling). Compatibility with such decoders can +be achieved by specifying "-sample 2x1". This is not recommended unless +really necessary, since it increases file size and encoding/decoding time +with very little quality gain. + + +Multiple Scan / Progression Control +----------------------------------- + +By default, cjpeg emits a single-scan sequential JPEG file. The +-progressive switch generates a progressive JPEG file using a default series +of progression parameters. You can create multiple-scan sequential JPEG +files or progressive JPEG files with custom progression parameters by using +the -scans switch: + + -scans file Use the scan sequence given in the named file. + +The specified file should be a text file containing a "scan script". +The script specifies the contents and ordering of the scans to be emitted. +Each entry in the script defines one scan. A scan definition specifies +the components to be included in the scan, and for progressive JPEG it also +specifies the progression parameters Ss,Se,Ah,Al for the scan. Scan +definitions are separated by semicolons (';'). A semicolon after the last +scan definition is optional. + +Each scan definition contains one to four component indexes, optionally +followed by a colon (':') and the four progressive-JPEG parameters. The +component indexes denote which color component(s) are to be transmitted in +the scan. Components are numbered in the order in which they appear in the +JPEG SOF marker, with the first component being numbered 0. (Note that these +indexes are not the "component ID" codes assigned to the components, just +positional indexes.) + +The progression parameters for each scan are: + Ss Zigzag index of first coefficient included in scan + Se Zigzag index of last coefficient included in scan + Ah Zero for first scan of a coefficient, else Al of prior scan + Al Successive approximation low bit position for scan +If the progression parameters are omitted, the values 0,63,0,0 are used, +producing a sequential JPEG file. cjpeg automatically determines whether +the script represents a progressive or sequential file, by observing whether +Ss and Se values other than 0 and 63 appear. (The -progressive switch is +not needed to specify this; in fact, it is ignored when -scans appears.) +The scan script must meet the JPEG restrictions on progression sequences. +(cjpeg checks that the spec's requirements are obeyed.) + +Scan script files are free format, in that arbitrary whitespace can appear +between numbers and around punctuation. Also, comments can be included: a +comment starts with '#' and extends to the end of the line. For additional +legibility, commas or dashes can be placed between values. (Actually, any +single punctuation character other than ':' or ';' can be inserted.) For +example, the following two scan definitions are equivalent: + 0 1 2: 0 63 0 0; + 0,1,2 : 0-63, 0,0 ; + +Here is an example of a scan script that generates a partially interleaved +sequential JPEG file: + + 0; # Y only in first scan + 1 2; # Cb and Cr in second scan + +Here is an example of a progressive scan script using only spectral selection +(no successive approximation): + + # Interleaved DC scan for Y,Cb,Cr: + 0,1,2: 0-0, 0, 0 ; + # AC scans: + 0: 1-2, 0, 0 ; # First two Y AC coefficients + 0: 3-5, 0, 0 ; # Three more + 1: 1-63, 0, 0 ; # All AC coefficients for Cb + 2: 1-63, 0, 0 ; # All AC coefficients for Cr + 0: 6-9, 0, 0 ; # More Y coefficients + 0: 10-63, 0, 0 ; # Remaining Y coefficients + +Here is an example of a successive-approximation script. This is equivalent +to the default script used by "cjpeg -progressive" for YCbCr images: + + # Initial DC scan for Y,Cb,Cr (lowest bit not sent) + 0,1,2: 0-0, 0, 1 ; + # First AC scan: send first 5 Y AC coefficients, minus 2 lowest bits: + 0: 1-5, 0, 2 ; + # Send all Cr,Cb AC coefficients, minus lowest bit: + # (chroma data is usually too small to be worth subdividing further; + # but note we send Cr first since eye is least sensitive to Cb) + 2: 1-63, 0, 1 ; + 1: 1-63, 0, 1 ; + # Send remaining Y AC coefficients, minus 2 lowest bits: + 0: 6-63, 0, 2 ; + # Send next-to-lowest bit of all Y AC coefficients: + 0: 1-63, 2, 1 ; + # At this point we've sent all but the lowest bit of all coefficients. + # Send lowest bit of DC coefficients + 0,1,2: 0-0, 1, 0 ; + # Send lowest bit of AC coefficients + 2: 1-63, 1, 0 ; + 1: 1-63, 1, 0 ; + # Y AC lowest bit scan is last; it's usually the largest scan + 0: 1-63, 1, 0 ; + +It may be worth pointing out that this script is tuned for quality settings +of around 50 to 75. For lower quality settings, you'd probably want to use +a script with fewer stages of successive approximation (otherwise the +initial scans will be really bad). For higher quality settings, you might +want to use more stages of successive approximation (so that the initial +scans are not too large). diff --git a/gtkmm-osx/jpeg-6b/wrbmp.c b/gtkmm-osx/jpeg-6b/wrbmp.c new file mode 100644 index 0000000..3283b0f --- /dev/null +++ b/gtkmm-osx/jpeg-6b/wrbmp.c @@ -0,0 +1,442 @@ +/* + * wrbmp.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to write output images in Microsoft "BMP" + * format (MS Windows 3.x and OS/2 1.x flavors). + * Either 8-bit colormapped or 24-bit full-color format can be written. + * No compression is supported. + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume output to + * an ordinary stdio stream. + * + * This code contributed by James Arthur Boucher. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef BMP_SUPPORTED + + +/* + * To support 12-bit JPEG data, we'd have to scale output down to 8 bits. + * This is not yet implemented. + */ + +#if BITS_IN_JSAMPLE != 8 + Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ +#endif + +/* + * Since BMP stores scanlines bottom-to-top, we have to invert the image + * from JPEG's top-to-bottom order. To do this, we save the outgoing data + * in a virtual array during put_pixel_row calls, then actually emit the + * BMP file during finish_output. The virtual array contains one JSAMPLE per + * pixel if the output is grayscale or colormapped, three if it is full color. + */ + +/* Private version of data destination object */ + +typedef struct { + struct djpeg_dest_struct pub; /* public fields */ + + boolean is_os2; /* saves the OS2 format request flag */ + + jvirt_sarray_ptr whole_image; /* needed to reverse row order */ + JDIMENSION data_width; /* JSAMPLEs per row */ + JDIMENSION row_width; /* physical width of one row in the BMP file */ + int pad_bytes; /* number of padding bytes needed per row */ + JDIMENSION cur_output_row; /* next row# to write to virtual array */ +} bmp_dest_struct; + +typedef bmp_dest_struct * bmp_dest_ptr; + + +/* Forward declarations */ +LOCAL(void) write_colormap + JPP((j_decompress_ptr cinfo, bmp_dest_ptr dest, + int map_colors, int map_entry_size)); + + +/* + * Write some pixel data. + * In this module rows_supplied will always be 1. + */ + +METHODDEF(void) +put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +/* This version is for writing 24-bit pixels */ +{ + bmp_dest_ptr dest = (bmp_dest_ptr) dinfo; + JSAMPARRAY image_ptr; + register JSAMPROW inptr, outptr; + register JDIMENSION col; + int pad; + + /* Access next row in virtual array */ + image_ptr = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, dest->whole_image, + dest->cur_output_row, (JDIMENSION) 1, TRUE); + dest->cur_output_row++; + + /* Transfer data. Note destination values must be in BGR order + * (even though Microsoft's own documents say the opposite). + */ + inptr = dest->pub.buffer[0]; + outptr = image_ptr[0]; + for (col = cinfo->output_width; col > 0; col--) { + outptr[2] = *inptr++; /* can omit GETJSAMPLE() safely */ + outptr[1] = *inptr++; + outptr[0] = *inptr++; + outptr += 3; + } + + /* Zero out the pad bytes. */ + pad = dest->pad_bytes; + while (--pad >= 0) + *outptr++ = 0; +} + +METHODDEF(void) +put_gray_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +/* This version is for grayscale OR quantized color output */ +{ + bmp_dest_ptr dest = (bmp_dest_ptr) dinfo; + JSAMPARRAY image_ptr; + register JSAMPROW inptr, outptr; + register JDIMENSION col; + int pad; + + /* Access next row in virtual array */ + image_ptr = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, dest->whole_image, + dest->cur_output_row, (JDIMENSION) 1, TRUE); + dest->cur_output_row++; + + /* Transfer data. */ + inptr = dest->pub.buffer[0]; + outptr = image_ptr[0]; + for (col = cinfo->output_width; col > 0; col--) { + *outptr++ = *inptr++; /* can omit GETJSAMPLE() safely */ + } + + /* Zero out the pad bytes. */ + pad = dest->pad_bytes; + while (--pad >= 0) + *outptr++ = 0; +} + + +/* + * Startup: normally writes the file header. + * In this module we may as well postpone everything until finish_output. + */ + +METHODDEF(void) +start_output_bmp (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + /* no work here */ +} + + +/* + * Finish up at the end of the file. + * + * Here is where we really output the BMP file. + * + * First, routines to write the Windows and OS/2 variants of the file header. + */ + +LOCAL(void) +write_bmp_header (j_decompress_ptr cinfo, bmp_dest_ptr dest) +/* Write a Windows-style BMP file header, including colormap if needed */ +{ + char bmpfileheader[14]; + char bmpinfoheader[40]; +#define PUT_2B(array,offset,value) \ + (array[offset] = (char) ((value) & 0xFF), \ + array[offset+1] = (char) (((value) >> 8) & 0xFF)) +#define PUT_4B(array,offset,value) \ + (array[offset] = (char) ((value) & 0xFF), \ + array[offset+1] = (char) (((value) >> 8) & 0xFF), \ + array[offset+2] = (char) (((value) >> 16) & 0xFF), \ + array[offset+3] = (char) (((value) >> 24) & 0xFF)) + INT32 headersize, bfSize; + int bits_per_pixel, cmap_entries; + + /* Compute colormap size and total file size */ + if (cinfo->out_color_space == JCS_RGB) { + if (cinfo->quantize_colors) { + /* Colormapped RGB */ + bits_per_pixel = 8; + cmap_entries = 256; + } else { + /* Unquantized, full color RGB */ + bits_per_pixel = 24; + cmap_entries = 0; + } + } else { + /* Grayscale output. We need to fake a 256-entry colormap. */ + bits_per_pixel = 8; + cmap_entries = 256; + } + /* File size */ + headersize = 14 + 40 + cmap_entries * 4; /* Header and colormap */ + bfSize = headersize + (INT32) dest->row_width * (INT32) cinfo->output_height; + + /* Set unused fields of header to 0 */ + MEMZERO(bmpfileheader, SIZEOF(bmpfileheader)); + MEMZERO(bmpinfoheader, SIZEOF(bmpinfoheader)); + + /* Fill the file header */ + bmpfileheader[0] = 0x42; /* first 2 bytes are ASCII 'B', 'M' */ + bmpfileheader[1] = 0x4D; + PUT_4B(bmpfileheader, 2, bfSize); /* bfSize */ + /* we leave bfReserved1 & bfReserved2 = 0 */ + PUT_4B(bmpfileheader, 10, headersize); /* bfOffBits */ + + /* Fill the info header (Microsoft calls this a BITMAPINFOHEADER) */ + PUT_2B(bmpinfoheader, 0, 40); /* biSize */ + PUT_4B(bmpinfoheader, 4, cinfo->output_width); /* biWidth */ + PUT_4B(bmpinfoheader, 8, cinfo->output_height); /* biHeight */ + PUT_2B(bmpinfoheader, 12, 1); /* biPlanes - must be 1 */ + PUT_2B(bmpinfoheader, 14, bits_per_pixel); /* biBitCount */ + /* we leave biCompression = 0, for none */ + /* we leave biSizeImage = 0; this is correct for uncompressed data */ + if (cinfo->density_unit == 2) { /* if have density in dots/cm, then */ + PUT_4B(bmpinfoheader, 24, (INT32) (cinfo->X_density*100)); /* XPels/M */ + PUT_4B(bmpinfoheader, 28, (INT32) (cinfo->Y_density*100)); /* XPels/M */ + } + PUT_2B(bmpinfoheader, 32, cmap_entries); /* biClrUsed */ + /* we leave biClrImportant = 0 */ + + if (JFWRITE(dest->pub.output_file, bmpfileheader, 14) != (size_t) 14) + ERREXIT(cinfo, JERR_FILE_WRITE); + if (JFWRITE(dest->pub.output_file, bmpinfoheader, 40) != (size_t) 40) + ERREXIT(cinfo, JERR_FILE_WRITE); + + if (cmap_entries > 0) + write_colormap(cinfo, dest, cmap_entries, 4); +} + + +LOCAL(void) +write_os2_header (j_decompress_ptr cinfo, bmp_dest_ptr dest) +/* Write an OS2-style BMP file header, including colormap if needed */ +{ + char bmpfileheader[14]; + char bmpcoreheader[12]; + INT32 headersize, bfSize; + int bits_per_pixel, cmap_entries; + + /* Compute colormap size and total file size */ + if (cinfo->out_color_space == JCS_RGB) { + if (cinfo->quantize_colors) { + /* Colormapped RGB */ + bits_per_pixel = 8; + cmap_entries = 256; + } else { + /* Unquantized, full color RGB */ + bits_per_pixel = 24; + cmap_entries = 0; + } + } else { + /* Grayscale output. We need to fake a 256-entry colormap. */ + bits_per_pixel = 8; + cmap_entries = 256; + } + /* File size */ + headersize = 14 + 12 + cmap_entries * 3; /* Header and colormap */ + bfSize = headersize + (INT32) dest->row_width * (INT32) cinfo->output_height; + + /* Set unused fields of header to 0 */ + MEMZERO(bmpfileheader, SIZEOF(bmpfileheader)); + MEMZERO(bmpcoreheader, SIZEOF(bmpcoreheader)); + + /* Fill the file header */ + bmpfileheader[0] = 0x42; /* first 2 bytes are ASCII 'B', 'M' */ + bmpfileheader[1] = 0x4D; + PUT_4B(bmpfileheader, 2, bfSize); /* bfSize */ + /* we leave bfReserved1 & bfReserved2 = 0 */ + PUT_4B(bmpfileheader, 10, headersize); /* bfOffBits */ + + /* Fill the info header (Microsoft calls this a BITMAPCOREHEADER) */ + PUT_2B(bmpcoreheader, 0, 12); /* bcSize */ + PUT_2B(bmpcoreheader, 4, cinfo->output_width); /* bcWidth */ + PUT_2B(bmpcoreheader, 6, cinfo->output_height); /* bcHeight */ + PUT_2B(bmpcoreheader, 8, 1); /* bcPlanes - must be 1 */ + PUT_2B(bmpcoreheader, 10, bits_per_pixel); /* bcBitCount */ + + if (JFWRITE(dest->pub.output_file, bmpfileheader, 14) != (size_t) 14) + ERREXIT(cinfo, JERR_FILE_WRITE); + if (JFWRITE(dest->pub.output_file, bmpcoreheader, 12) != (size_t) 12) + ERREXIT(cinfo, JERR_FILE_WRITE); + + if (cmap_entries > 0) + write_colormap(cinfo, dest, cmap_entries, 3); +} + + +/* + * Write the colormap. + * Windows uses BGR0 map entries; OS/2 uses BGR entries. + */ + +LOCAL(void) +write_colormap (j_decompress_ptr cinfo, bmp_dest_ptr dest, + int map_colors, int map_entry_size) +{ + JSAMPARRAY colormap = cinfo->colormap; + int num_colors = cinfo->actual_number_of_colors; + FILE * outfile = dest->pub.output_file; + int i; + + if (colormap != NULL) { + if (cinfo->out_color_components == 3) { + /* Normal case with RGB colormap */ + for (i = 0; i < num_colors; i++) { + putc(GETJSAMPLE(colormap[2][i]), outfile); + putc(GETJSAMPLE(colormap[1][i]), outfile); + putc(GETJSAMPLE(colormap[0][i]), outfile); + if (map_entry_size == 4) + putc(0, outfile); + } + } else { + /* Grayscale colormap (only happens with grayscale quantization) */ + for (i = 0; i < num_colors; i++) { + putc(GETJSAMPLE(colormap[0][i]), outfile); + putc(GETJSAMPLE(colormap[0][i]), outfile); + putc(GETJSAMPLE(colormap[0][i]), outfile); + if (map_entry_size == 4) + putc(0, outfile); + } + } + } else { + /* If no colormap, must be grayscale data. Generate a linear "map". */ + for (i = 0; i < 256; i++) { + putc(i, outfile); + putc(i, outfile); + putc(i, outfile); + if (map_entry_size == 4) + putc(0, outfile); + } + } + /* Pad colormap with zeros to ensure specified number of colormap entries */ + if (i > map_colors) + ERREXIT1(cinfo, JERR_TOO_MANY_COLORS, i); + for (; i < map_colors; i++) { + putc(0, outfile); + putc(0, outfile); + putc(0, outfile); + if (map_entry_size == 4) + putc(0, outfile); + } +} + + +METHODDEF(void) +finish_output_bmp (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + bmp_dest_ptr dest = (bmp_dest_ptr) dinfo; + register FILE * outfile = dest->pub.output_file; + JSAMPARRAY image_ptr; + register JSAMPROW data_ptr; + JDIMENSION row; + register JDIMENSION col; + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + + /* Write the header and colormap */ + if (dest->is_os2) + write_os2_header(cinfo, dest); + else + write_bmp_header(cinfo, dest); + + /* Write the file body from our virtual array */ + for (row = cinfo->output_height; row > 0; row--) { + if (progress != NULL) { + progress->pub.pass_counter = (long) (cinfo->output_height - row); + progress->pub.pass_limit = (long) cinfo->output_height; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } + image_ptr = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, dest->whole_image, row-1, (JDIMENSION) 1, FALSE); + data_ptr = image_ptr[0]; + for (col = dest->row_width; col > 0; col--) { + putc(GETJSAMPLE(*data_ptr), outfile); + data_ptr++; + } + } + if (progress != NULL) + progress->completed_extra_passes++; + + /* Make sure we wrote the output file OK */ + fflush(outfile); + if (ferror(outfile)) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * The module selection routine for BMP format output. + */ + +GLOBAL(djpeg_dest_ptr) +jinit_write_bmp (j_decompress_ptr cinfo, boolean is_os2) +{ + bmp_dest_ptr dest; + JDIMENSION row_width; + + /* Create module interface object, fill in method pointers */ + dest = (bmp_dest_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(bmp_dest_struct)); + dest->pub.start_output = start_output_bmp; + dest->pub.finish_output = finish_output_bmp; + dest->is_os2 = is_os2; + + if (cinfo->out_color_space == JCS_GRAYSCALE) { + dest->pub.put_pixel_rows = put_gray_rows; + } else if (cinfo->out_color_space == JCS_RGB) { + if (cinfo->quantize_colors) + dest->pub.put_pixel_rows = put_gray_rows; + else + dest->pub.put_pixel_rows = put_pixel_rows; + } else { + ERREXIT(cinfo, JERR_BMP_COLORSPACE); + } + + /* Calculate output image dimensions so we can allocate space */ + jpeg_calc_output_dimensions(cinfo); + + /* Determine width of rows in the BMP file (padded to 4-byte boundary). */ + row_width = cinfo->output_width * cinfo->output_components; + dest->data_width = row_width; + while ((row_width & 3) != 0) row_width++; + dest->row_width = row_width; + dest->pad_bytes = (int) (row_width - dest->data_width); + + /* Allocate space for inversion array, prepare for write pass */ + dest->whole_image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + row_width, cinfo->output_height, (JDIMENSION) 1); + dest->cur_output_row = 0; + if (cinfo->progress != NULL) { + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + progress->total_extra_passes++; /* count file input as separate pass */ + } + + /* Create decompressor output buffer. */ + dest->pub.buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, row_width, (JDIMENSION) 1); + dest->pub.buffer_height = 1; + + return (djpeg_dest_ptr) dest; +} + +#endif /* BMP_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/wrgif.c b/gtkmm-osx/jpeg-6b/wrgif.c new file mode 100644 index 0000000..5fe8328 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/wrgif.c @@ -0,0 +1,399 @@ +/* + * wrgif.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to write output images in GIF format. + * + ************************************************************************** + * NOTE: to avoid entanglements with Unisys' patent on LZW compression, * + * this code has been modified to output "uncompressed GIF" files. * + * There is no trace of the LZW algorithm in this file. * + ************************************************************************** + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume output to + * an ordinary stdio stream. + */ + +/* + * This code is loosely based on ppmtogif from the PBMPLUS distribution + * of Feb. 1991. That file contains the following copyright notice: + * Based on GIFENCODE by David Rowley . + * Lempel-Ziv compression based on "compress" by Spencer W. Thomas et al. + * Copyright (C) 1989 by Jef Poskanzer. + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, provided + * that the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation. This software is provided "as is" without express or + * implied warranty. + * + * We are also required to state that + * "The Graphics Interchange Format(c) is the Copyright property of + * CompuServe Incorporated. GIF(sm) is a Service Mark property of + * CompuServe Incorporated." + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef GIF_SUPPORTED + + +/* Private version of data destination object */ + +typedef struct { + struct djpeg_dest_struct pub; /* public fields */ + + j_decompress_ptr cinfo; /* back link saves passing separate parm */ + + /* State for packing variable-width codes into a bitstream */ + int n_bits; /* current number of bits/code */ + int maxcode; /* maximum code, given n_bits */ + INT32 cur_accum; /* holds bits not yet output */ + int cur_bits; /* # of bits in cur_accum */ + + /* State for GIF code assignment */ + int ClearCode; /* clear code (doesn't change) */ + int EOFCode; /* EOF code (ditto) */ + int code_counter; /* counts output symbols */ + + /* GIF data packet construction buffer */ + int bytesinpkt; /* # of bytes in current packet */ + char packetbuf[256]; /* workspace for accumulating packet */ + +} gif_dest_struct; + +typedef gif_dest_struct * gif_dest_ptr; + +/* Largest value that will fit in N bits */ +#define MAXCODE(n_bits) ((1 << (n_bits)) - 1) + + +/* + * Routines to package finished data bytes into GIF data blocks. + * A data block consists of a count byte (1..255) and that many data bytes. + */ + +LOCAL(void) +flush_packet (gif_dest_ptr dinfo) +/* flush any accumulated data */ +{ + if (dinfo->bytesinpkt > 0) { /* never write zero-length packet */ + dinfo->packetbuf[0] = (char) dinfo->bytesinpkt++; + if (JFWRITE(dinfo->pub.output_file, dinfo->packetbuf, dinfo->bytesinpkt) + != (size_t) dinfo->bytesinpkt) + ERREXIT(dinfo->cinfo, JERR_FILE_WRITE); + dinfo->bytesinpkt = 0; + } +} + + +/* Add a character to current packet; flush to disk if necessary */ +#define CHAR_OUT(dinfo,c) \ + { (dinfo)->packetbuf[++(dinfo)->bytesinpkt] = (char) (c); \ + if ((dinfo)->bytesinpkt >= 255) \ + flush_packet(dinfo); \ + } + + +/* Routine to convert variable-width codes into a byte stream */ + +LOCAL(void) +output (gif_dest_ptr dinfo, int code) +/* Emit a code of n_bits bits */ +/* Uses cur_accum and cur_bits to reblock into 8-bit bytes */ +{ + dinfo->cur_accum |= ((INT32) code) << dinfo->cur_bits; + dinfo->cur_bits += dinfo->n_bits; + + while (dinfo->cur_bits >= 8) { + CHAR_OUT(dinfo, dinfo->cur_accum & 0xFF); + dinfo->cur_accum >>= 8; + dinfo->cur_bits -= 8; + } +} + + +/* The pseudo-compression algorithm. + * + * In this module we simply output each pixel value as a separate symbol; + * thus, no compression occurs. In fact, there is expansion of one bit per + * pixel, because we use a symbol width one bit wider than the pixel width. + * + * GIF ordinarily uses variable-width symbols, and the decoder will expect + * to ratchet up the symbol width after a fixed number of symbols. + * To simplify the logic and keep the expansion penalty down, we emit a + * GIF Clear code to reset the decoder just before the width would ratchet up. + * Thus, all the symbols in the output file will have the same bit width. + * Note that emitting the Clear codes at the right times is a mere matter of + * counting output symbols and is in no way dependent on the LZW patent. + * + * With a small basic pixel width (low color count), Clear codes will be + * needed very frequently, causing the file to expand even more. So this + * simplistic approach wouldn't work too well on bilevel images, for example. + * But for output of JPEG conversions the pixel width will usually be 8 bits + * (129 to 256 colors), so the overhead added by Clear symbols is only about + * one symbol in every 256. + */ + +LOCAL(void) +compress_init (gif_dest_ptr dinfo, int i_bits) +/* Initialize pseudo-compressor */ +{ + /* init all the state variables */ + dinfo->n_bits = i_bits; + dinfo->maxcode = MAXCODE(dinfo->n_bits); + dinfo->ClearCode = (1 << (i_bits - 1)); + dinfo->EOFCode = dinfo->ClearCode + 1; + dinfo->code_counter = dinfo->ClearCode + 2; + /* init output buffering vars */ + dinfo->bytesinpkt = 0; + dinfo->cur_accum = 0; + dinfo->cur_bits = 0; + /* GIF specifies an initial Clear code */ + output(dinfo, dinfo->ClearCode); +} + + +LOCAL(void) +compress_pixel (gif_dest_ptr dinfo, int c) +/* Accept and "compress" one pixel value. + * The given value must be less than n_bits wide. + */ +{ + /* Output the given pixel value as a symbol. */ + output(dinfo, c); + /* Issue Clear codes often enough to keep the reader from ratcheting up + * its symbol size. + */ + if (dinfo->code_counter < dinfo->maxcode) { + dinfo->code_counter++; + } else { + output(dinfo, dinfo->ClearCode); + dinfo->code_counter = dinfo->ClearCode + 2; /* reset the counter */ + } +} + + +LOCAL(void) +compress_term (gif_dest_ptr dinfo) +/* Clean up at end */ +{ + /* Send an EOF code */ + output(dinfo, dinfo->EOFCode); + /* Flush the bit-packing buffer */ + if (dinfo->cur_bits > 0) { + CHAR_OUT(dinfo, dinfo->cur_accum & 0xFF); + } + /* Flush the packet buffer */ + flush_packet(dinfo); +} + + +/* GIF header construction */ + + +LOCAL(void) +put_word (gif_dest_ptr dinfo, unsigned int w) +/* Emit a 16-bit word, LSB first */ +{ + putc(w & 0xFF, dinfo->pub.output_file); + putc((w >> 8) & 0xFF, dinfo->pub.output_file); +} + + +LOCAL(void) +put_3bytes (gif_dest_ptr dinfo, int val) +/* Emit 3 copies of same byte value --- handy subr for colormap construction */ +{ + putc(val, dinfo->pub.output_file); + putc(val, dinfo->pub.output_file); + putc(val, dinfo->pub.output_file); +} + + +LOCAL(void) +emit_header (gif_dest_ptr dinfo, int num_colors, JSAMPARRAY colormap) +/* Output the GIF file header, including color map */ +/* If colormap==NULL, synthesize a gray-scale colormap */ +{ + int BitsPerPixel, ColorMapSize, InitCodeSize, FlagByte; + int cshift = dinfo->cinfo->data_precision - 8; + int i; + + if (num_colors > 256) + ERREXIT1(dinfo->cinfo, JERR_TOO_MANY_COLORS, num_colors); + /* Compute bits/pixel and related values */ + BitsPerPixel = 1; + while (num_colors > (1 << BitsPerPixel)) + BitsPerPixel++; + ColorMapSize = 1 << BitsPerPixel; + if (BitsPerPixel <= 1) + InitCodeSize = 2; + else + InitCodeSize = BitsPerPixel; + /* + * Write the GIF header. + * Note that we generate a plain GIF87 header for maximum compatibility. + */ + putc('G', dinfo->pub.output_file); + putc('I', dinfo->pub.output_file); + putc('F', dinfo->pub.output_file); + putc('8', dinfo->pub.output_file); + putc('7', dinfo->pub.output_file); + putc('a', dinfo->pub.output_file); + /* Write the Logical Screen Descriptor */ + put_word(dinfo, (unsigned int) dinfo->cinfo->output_width); + put_word(dinfo, (unsigned int) dinfo->cinfo->output_height); + FlagByte = 0x80; /* Yes, there is a global color table */ + FlagByte |= (BitsPerPixel-1) << 4; /* color resolution */ + FlagByte |= (BitsPerPixel-1); /* size of global color table */ + putc(FlagByte, dinfo->pub.output_file); + putc(0, dinfo->pub.output_file); /* Background color index */ + putc(0, dinfo->pub.output_file); /* Reserved (aspect ratio in GIF89) */ + /* Write the Global Color Map */ + /* If the color map is more than 8 bits precision, */ + /* we reduce it to 8 bits by shifting */ + for (i=0; i < ColorMapSize; i++) { + if (i < num_colors) { + if (colormap != NULL) { + if (dinfo->cinfo->out_color_space == JCS_RGB) { + /* Normal case: RGB color map */ + putc(GETJSAMPLE(colormap[0][i]) >> cshift, dinfo->pub.output_file); + putc(GETJSAMPLE(colormap[1][i]) >> cshift, dinfo->pub.output_file); + putc(GETJSAMPLE(colormap[2][i]) >> cshift, dinfo->pub.output_file); + } else { + /* Grayscale "color map": possible if quantizing grayscale image */ + put_3bytes(dinfo, GETJSAMPLE(colormap[0][i]) >> cshift); + } + } else { + /* Create a gray-scale map of num_colors values, range 0..255 */ + put_3bytes(dinfo, (i * 255 + (num_colors-1)/2) / (num_colors-1)); + } + } else { + /* fill out the map to a power of 2 */ + put_3bytes(dinfo, 0); + } + } + /* Write image separator and Image Descriptor */ + putc(',', dinfo->pub.output_file); /* separator */ + put_word(dinfo, 0); /* left/top offset */ + put_word(dinfo, 0); + put_word(dinfo, (unsigned int) dinfo->cinfo->output_width); /* image size */ + put_word(dinfo, (unsigned int) dinfo->cinfo->output_height); + /* flag byte: not interlaced, no local color map */ + putc(0x00, dinfo->pub.output_file); + /* Write Initial Code Size byte */ + putc(InitCodeSize, dinfo->pub.output_file); + + /* Initialize for "compression" of image data */ + compress_init(dinfo, InitCodeSize+1); +} + + +/* + * Startup: write the file header. + */ + +METHODDEF(void) +start_output_gif (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + gif_dest_ptr dest = (gif_dest_ptr) dinfo; + + if (cinfo->quantize_colors) + emit_header(dest, cinfo->actual_number_of_colors, cinfo->colormap); + else + emit_header(dest, 256, (JSAMPARRAY) NULL); +} + + +/* + * Write some pixel data. + * In this module rows_supplied will always be 1. + */ + +METHODDEF(void) +put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +{ + gif_dest_ptr dest = (gif_dest_ptr) dinfo; + register JSAMPROW ptr; + register JDIMENSION col; + + ptr = dest->pub.buffer[0]; + for (col = cinfo->output_width; col > 0; col--) { + compress_pixel(dest, GETJSAMPLE(*ptr++)); + } +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_output_gif (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + gif_dest_ptr dest = (gif_dest_ptr) dinfo; + + /* Flush "compression" mechanism */ + compress_term(dest); + /* Write a zero-length data block to end the series */ + putc(0, dest->pub.output_file); + /* Write the GIF terminator mark */ + putc(';', dest->pub.output_file); + /* Make sure we wrote the output file OK */ + fflush(dest->pub.output_file); + if (ferror(dest->pub.output_file)) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * The module selection routine for GIF format output. + */ + +GLOBAL(djpeg_dest_ptr) +jinit_write_gif (j_decompress_ptr cinfo) +{ + gif_dest_ptr dest; + + /* Create module interface object, fill in method pointers */ + dest = (gif_dest_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(gif_dest_struct)); + dest->cinfo = cinfo; /* make back link for subroutines */ + dest->pub.start_output = start_output_gif; + dest->pub.put_pixel_rows = put_pixel_rows; + dest->pub.finish_output = finish_output_gif; + + if (cinfo->out_color_space != JCS_GRAYSCALE && + cinfo->out_color_space != JCS_RGB) + ERREXIT(cinfo, JERR_GIF_COLORSPACE); + + /* Force quantization if color or if > 8 bits input */ + if (cinfo->out_color_space != JCS_GRAYSCALE || cinfo->data_precision > 8) { + /* Force quantization to at most 256 colors */ + cinfo->quantize_colors = TRUE; + if (cinfo->desired_number_of_colors > 256) + cinfo->desired_number_of_colors = 256; + } + + /* Calculate output image dimensions so we can allocate space */ + jpeg_calc_output_dimensions(cinfo); + + if (cinfo->output_components != 1) /* safety check: just one component? */ + ERREXIT(cinfo, JERR_GIF_BUG); + + /* Create decompressor output buffer. */ + dest->pub.buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, cinfo->output_width, (JDIMENSION) 1); + dest->pub.buffer_height = 1; + + return (djpeg_dest_ptr) dest; +} + +#endif /* GIF_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/wrjpgcom.1 b/gtkmm-osx/jpeg-6b/wrjpgcom.1 new file mode 100644 index 0000000..d419a99 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/wrjpgcom.1 @@ -0,0 +1,103 @@ +.TH WRJPGCOM 1 "15 June 1995" +.SH NAME +wrjpgcom \- insert text comments into a JPEG file +.SH SYNOPSIS +.B wrjpgcom +[ +.B \-replace +] +[ +.BI \-comment " text" +] +[ +.BI \-cfile " name" +] +[ +.I filename +] +.LP +.SH DESCRIPTION +.LP +.B wrjpgcom +reads the named JPEG/JFIF file, or the standard input if no file is named, +and generates a new JPEG/JFIF file on standard output. A comment block is +added to the file. +.PP +The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. +Although the standard doesn't actually define what COM blocks are for, they +are widely used to hold user-supplied text strings. This lets you add +annotations, titles, index terms, etc to your JPEG files, and later retrieve +them as text. COM blocks do not interfere with the image stored in the JPEG +file. The maximum size of a COM block is 64K, but you can have as many of +them as you like in one JPEG file. +.PP +.B wrjpgcom +adds a COM block, containing text you provide, to a JPEG file. +Ordinarily, the COM block is added after any existing COM blocks; but you +can delete the old COM blocks if you wish. +.SH OPTIONS +Switch names may be abbreviated, and are not case sensitive. +.TP +.B \-replace +Delete any existing COM blocks from the file. +.TP +.BI \-comment " text" +Supply text for new COM block on command line. +.TP +.BI \-cfile " name" +Read text for new COM block from named file. +.PP +If you have only one line of comment text to add, you can provide it on the +command line with +.BR \-comment . +The comment text must be surrounded with quotes so that it is treated as a +single argument. Longer comments can be read from a text file. +.PP +If you give neither +.B \-comment +nor +.BR \-cfile , +then +.B wrjpgcom +will read the comment text from standard input. (In this case an input image +file name MUST be supplied, so that the source JPEG file comes from somewhere +else.) You can enter multiple lines, up to 64KB worth. Type an end-of-file +indicator (usually control-D) to terminate the comment text entry. +.PP +.B wrjpgcom +will not add a COM block if the provided comment string is empty. Therefore +\fB\-replace \-comment ""\fR can be used to delete all COM blocks from a file. +.SH EXAMPLES +.LP +Add a short comment to in.jpg, producing out.jpg: +.IP +.B wrjpgcom \-c +\fI"View of my back yard" in.jpg +.B > +.I out.jpg +.PP +Attach a long comment previously stored in comment.txt: +.IP +.B wrjpgcom +.I in.jpg +.B < +.I comment.txt +.B > +.I out.jpg +.PP +or equivalently +.IP +.B wrjpgcom +.B -cfile +.I comment.txt +.B < +.I in.jpg +.B > +.I out.jpg +.SH SEE ALSO +.BR cjpeg (1), +.BR djpeg (1), +.BR jpegtran (1), +.BR rdjpgcom (1) +.SH AUTHOR +Independent JPEG Group diff --git a/gtkmm-osx/jpeg-6b/wrjpgcom.c b/gtkmm-osx/jpeg-6b/wrjpgcom.c new file mode 100644 index 0000000..8c04b05 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/wrjpgcom.c @@ -0,0 +1,583 @@ +/* + * wrjpgcom.c + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a very simple stand-alone application that inserts + * user-supplied text as a COM (comment) marker in a JFIF file. + * This may be useful as an example of the minimum logic needed to parse + * JPEG markers. + */ + +#define JPEG_CJPEG_DJPEG /* to get the command-line config symbols */ +#include "jinclude.h" /* get auto-config symbols, */ + +#ifndef HAVE_STDLIB_H /* should declare malloc() */ +extern void * malloc (); +#endif +#include /* to declare isupper(), tolower() */ +#ifdef USE_SETMODE +#include /* to declare setmode()'s parameter macros */ +/* If you have setmode() but not , just delete this line: */ +#include /* to declare setmode() */ +#endif + +#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ +#ifdef __MWERKS__ +#include /* Metrowerks needs this */ +#include /* ... and this */ +#endif +#ifdef THINK_C +#include /* Think declares it here */ +#endif +#endif + +#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ +#define READ_BINARY "r" +#define WRITE_BINARY "w" +#else +#ifdef VMS /* VMS is very nonstandard */ +#define READ_BINARY "rb", "ctx=stm" +#define WRITE_BINARY "wb", "ctx=stm" +#else /* standard ANSI-compliant case */ +#define READ_BINARY "rb" +#define WRITE_BINARY "wb" +#endif +#endif + +#ifndef EXIT_FAILURE /* define exit() codes if not provided */ +#define EXIT_FAILURE 1 +#endif +#ifndef EXIT_SUCCESS +#ifdef VMS +#define EXIT_SUCCESS 1 /* VMS is very nonstandard */ +#else +#define EXIT_SUCCESS 0 +#endif +#endif + +/* Reduce this value if your malloc() can't allocate blocks up to 64K. + * On DOS, compiling in large model is usually a better solution. + */ + +#ifndef MAX_COM_LENGTH +#define MAX_COM_LENGTH 65000L /* must be <= 65533 in any case */ +#endif + + +/* + * These macros are used to read the input file and write the output file. + * To reuse this code in another application, you might need to change these. + */ + +static FILE * infile; /* input JPEG file */ + +/* Return next input byte, or EOF if no more */ +#define NEXTBYTE() getc(infile) + +static FILE * outfile; /* output JPEG file */ + +/* Emit an output byte */ +#define PUTBYTE(x) putc((x), outfile) + + +/* Error exit handler */ +#define ERREXIT(msg) (fprintf(stderr, "%s\n", msg), exit(EXIT_FAILURE)) + + +/* Read one byte, testing for EOF */ +static int +read_1_byte (void) +{ + int c; + + c = NEXTBYTE(); + if (c == EOF) + ERREXIT("Premature EOF in JPEG file"); + return c; +} + +/* Read 2 bytes, convert to unsigned int */ +/* All 2-byte quantities in JPEG markers are MSB first */ +static unsigned int +read_2_bytes (void) +{ + int c1, c2; + + c1 = NEXTBYTE(); + if (c1 == EOF) + ERREXIT("Premature EOF in JPEG file"); + c2 = NEXTBYTE(); + if (c2 == EOF) + ERREXIT("Premature EOF in JPEG file"); + return (((unsigned int) c1) << 8) + ((unsigned int) c2); +} + + +/* Routines to write data to output file */ + +static void +write_1_byte (int c) +{ + PUTBYTE(c); +} + +static void +write_2_bytes (unsigned int val) +{ + PUTBYTE((val >> 8) & 0xFF); + PUTBYTE(val & 0xFF); +} + +static void +write_marker (int marker) +{ + PUTBYTE(0xFF); + PUTBYTE(marker); +} + +static void +copy_rest_of_file (void) +{ + int c; + + while ((c = NEXTBYTE()) != EOF) + PUTBYTE(c); +} + + +/* + * JPEG markers consist of one or more 0xFF bytes, followed by a marker + * code byte (which is not an FF). Here are the marker codes of interest + * in this program. (See jdmarker.c for a more complete list.) + */ + +#define M_SOF0 0xC0 /* Start Of Frame N */ +#define M_SOF1 0xC1 /* N indicates which compression process */ +#define M_SOF2 0xC2 /* Only SOF0-SOF2 are now in common use */ +#define M_SOF3 0xC3 +#define M_SOF5 0xC5 /* NB: codes C4 and CC are NOT SOF markers */ +#define M_SOF6 0xC6 +#define M_SOF7 0xC7 +#define M_SOF9 0xC9 +#define M_SOF10 0xCA +#define M_SOF11 0xCB +#define M_SOF13 0xCD +#define M_SOF14 0xCE +#define M_SOF15 0xCF +#define M_SOI 0xD8 /* Start Of Image (beginning of datastream) */ +#define M_EOI 0xD9 /* End Of Image (end of datastream) */ +#define M_SOS 0xDA /* Start Of Scan (begins compressed data) */ +#define M_COM 0xFE /* COMment */ + + +/* + * Find the next JPEG marker and return its marker code. + * We expect at least one FF byte, possibly more if the compressor used FFs + * to pad the file. (Padding FFs will NOT be replicated in the output file.) + * There could also be non-FF garbage between markers. The treatment of such + * garbage is unspecified; we choose to skip over it but emit a warning msg. + * NB: this routine must not be used after seeing SOS marker, since it will + * not deal correctly with FF/00 sequences in the compressed image data... + */ + +static int +next_marker (void) +{ + int c; + int discarded_bytes = 0; + + /* Find 0xFF byte; count and skip any non-FFs. */ + c = read_1_byte(); + while (c != 0xFF) { + discarded_bytes++; + c = read_1_byte(); + } + /* Get marker code byte, swallowing any duplicate FF bytes. Extra FFs + * are legal as pad bytes, so don't count them in discarded_bytes. + */ + do { + c = read_1_byte(); + } while (c == 0xFF); + + if (discarded_bytes != 0) { + fprintf(stderr, "Warning: garbage data found in JPEG file\n"); + } + + return c; +} + + +/* + * Read the initial marker, which should be SOI. + * For a JFIF file, the first two bytes of the file should be literally + * 0xFF M_SOI. To be more general, we could use next_marker, but if the + * input file weren't actually JPEG at all, next_marker might read the whole + * file and then return a misleading error message... + */ + +static int +first_marker (void) +{ + int c1, c2; + + c1 = NEXTBYTE(); + c2 = NEXTBYTE(); + if (c1 != 0xFF || c2 != M_SOI) + ERREXIT("Not a JPEG file"); + return c2; +} + + +/* + * Most types of marker are followed by a variable-length parameter segment. + * This routine skips over the parameters for any marker we don't otherwise + * want to process. + * Note that we MUST skip the parameter segment explicitly in order not to + * be fooled by 0xFF bytes that might appear within the parameter segment; + * such bytes do NOT introduce new markers. + */ + +static void +copy_variable (void) +/* Copy an unknown or uninteresting variable-length marker */ +{ + unsigned int length; + + /* Get the marker parameter length count */ + length = read_2_bytes(); + write_2_bytes(length); + /* Length includes itself, so must be at least 2 */ + if (length < 2) + ERREXIT("Erroneous JPEG marker length"); + length -= 2; + /* Skip over the remaining bytes */ + while (length > 0) { + write_1_byte(read_1_byte()); + length--; + } +} + +static void +skip_variable (void) +/* Skip over an unknown or uninteresting variable-length marker */ +{ + unsigned int length; + + /* Get the marker parameter length count */ + length = read_2_bytes(); + /* Length includes itself, so must be at least 2 */ + if (length < 2) + ERREXIT("Erroneous JPEG marker length"); + length -= 2; + /* Skip over the remaining bytes */ + while (length > 0) { + (void) read_1_byte(); + length--; + } +} + + +/* + * Parse the marker stream until SOFn or EOI is seen; + * copy data to output, but discard COM markers unless keep_COM is true. + */ + +static int +scan_JPEG_header (int keep_COM) +{ + int marker; + + /* Expect SOI at start of file */ + if (first_marker() != M_SOI) + ERREXIT("Expected SOI marker first"); + write_marker(M_SOI); + + /* Scan miscellaneous markers until we reach SOFn. */ + for (;;) { + marker = next_marker(); + switch (marker) { + /* Note that marker codes 0xC4, 0xC8, 0xCC are not, and must not be, + * treated as SOFn. C4 in particular is actually DHT. + */ + case M_SOF0: /* Baseline */ + case M_SOF1: /* Extended sequential, Huffman */ + case M_SOF2: /* Progressive, Huffman */ + case M_SOF3: /* Lossless, Huffman */ + case M_SOF5: /* Differential sequential, Huffman */ + case M_SOF6: /* Differential progressive, Huffman */ + case M_SOF7: /* Differential lossless, Huffman */ + case M_SOF9: /* Extended sequential, arithmetic */ + case M_SOF10: /* Progressive, arithmetic */ + case M_SOF11: /* Lossless, arithmetic */ + case M_SOF13: /* Differential sequential, arithmetic */ + case M_SOF14: /* Differential progressive, arithmetic */ + case M_SOF15: /* Differential lossless, arithmetic */ + return marker; + + case M_SOS: /* should not see compressed data before SOF */ + ERREXIT("SOS without prior SOFn"); + break; + + case M_EOI: /* in case it's a tables-only JPEG stream */ + return marker; + + case M_COM: /* Existing COM: conditionally discard */ + if (keep_COM) { + write_marker(marker); + copy_variable(); + } else { + skip_variable(); + } + break; + + default: /* Anything else just gets copied */ + write_marker(marker); + copy_variable(); /* we assume it has a parameter count... */ + break; + } + } /* end loop */ +} + + +/* Command line parsing code */ + +static const char * progname; /* program name for error messages */ + + +static void +usage (void) +/* complain about bad command line */ +{ + fprintf(stderr, "wrjpgcom inserts a textual comment in a JPEG file.\n"); + fprintf(stderr, "You can add to or replace any existing comment(s).\n"); + + fprintf(stderr, "Usage: %s [switches] ", progname); +#ifdef TWO_FILE_COMMANDLINE + fprintf(stderr, "inputfile outputfile\n"); +#else + fprintf(stderr, "[inputfile]\n"); +#endif + + fprintf(stderr, "Switches (names may be abbreviated):\n"); + fprintf(stderr, " -replace Delete any existing comments\n"); + fprintf(stderr, " -comment \"text\" Insert comment with given text\n"); + fprintf(stderr, " -cfile name Read comment from named file\n"); + fprintf(stderr, "Notice that you must put quotes around the comment text\n"); + fprintf(stderr, "when you use -comment.\n"); + fprintf(stderr, "If you do not give either -comment or -cfile on the command line,\n"); + fprintf(stderr, "then the comment text is read from standard input.\n"); + fprintf(stderr, "It can be multiple lines, up to %u characters total.\n", + (unsigned int) MAX_COM_LENGTH); +#ifndef TWO_FILE_COMMANDLINE + fprintf(stderr, "You must specify an input JPEG file name when supplying\n"); + fprintf(stderr, "comment text from standard input.\n"); +#endif + + exit(EXIT_FAILURE); +} + + +static int +keymatch (char * arg, const char * keyword, int minchars) +/* Case-insensitive matching of (possibly abbreviated) keyword switches. */ +/* keyword is the constant keyword (must be lower case already), */ +/* minchars is length of minimum legal abbreviation. */ +{ + register int ca, ck; + register int nmatched = 0; + + while ((ca = *arg++) != '\0') { + if ((ck = *keyword++) == '\0') + return 0; /* arg longer than keyword, no good */ + if (isupper(ca)) /* force arg to lcase (assume ck is already) */ + ca = tolower(ca); + if (ca != ck) + return 0; /* no good */ + nmatched++; /* count matched characters */ + } + /* reached end of argument; fail if it's too short for unique abbrev */ + if (nmatched < minchars) + return 0; + return 1; /* A-OK */ +} + + +/* + * The main program. + */ + +int +main (int argc, char **argv) +{ + int argn; + char * arg; + int keep_COM = 1; + char * comment_arg = NULL; + FILE * comment_file = NULL; + unsigned int comment_length = 0; + int marker; + + /* On Mac, fetch a command line. */ +#ifdef USE_CCOMMAND + argc = ccommand(&argv); +#endif + + progname = argv[0]; + if (progname == NULL || progname[0] == 0) + progname = "wrjpgcom"; /* in case C library doesn't provide it */ + + /* Parse switches, if any */ + for (argn = 1; argn < argc; argn++) { + arg = argv[argn]; + if (arg[0] != '-') + break; /* not switch, must be file name */ + arg++; /* advance over '-' */ + if (keymatch(arg, "replace", 1)) { + keep_COM = 0; + } else if (keymatch(arg, "cfile", 2)) { + if (++argn >= argc) usage(); + if ((comment_file = fopen(argv[argn], "r")) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); + exit(EXIT_FAILURE); + } + } else if (keymatch(arg, "comment", 1)) { + if (++argn >= argc) usage(); + comment_arg = argv[argn]; + /* If the comment text starts with '"', then we are probably running + * under MS-DOG and must parse out the quoted string ourselves. Sigh. + */ + if (comment_arg[0] == '"') { + comment_arg = (char *) malloc((size_t) MAX_COM_LENGTH); + if (comment_arg == NULL) + ERREXIT("Insufficient memory"); + strcpy(comment_arg, argv[argn]+1); + for (;;) { + comment_length = (unsigned int) strlen(comment_arg); + if (comment_length > 0 && comment_arg[comment_length-1] == '"') { + comment_arg[comment_length-1] = '\0'; /* zap terminating quote */ + break; + } + if (++argn >= argc) + ERREXIT("Missing ending quote mark"); + strcat(comment_arg, " "); + strcat(comment_arg, argv[argn]); + } + } + comment_length = (unsigned int) strlen(comment_arg); + } else + usage(); + } + + /* Cannot use both -comment and -cfile. */ + if (comment_arg != NULL && comment_file != NULL) + usage(); + /* If there is neither -comment nor -cfile, we will read the comment text + * from stdin; in this case there MUST be an input JPEG file name. + */ + if (comment_arg == NULL && comment_file == NULL && argn >= argc) + usage(); + + /* Open the input file. */ + if (argn < argc) { + if ((infile = fopen(argv[argn], READ_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); + exit(EXIT_FAILURE); + } + } else { + /* default input file is stdin */ +#ifdef USE_SETMODE /* need to hack file mode? */ + setmode(fileno(stdin), O_BINARY); +#endif +#ifdef USE_FDOPEN /* need to re-open in binary mode? */ + if ((infile = fdopen(fileno(stdin), READ_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open stdin\n", progname); + exit(EXIT_FAILURE); + } +#else + infile = stdin; +#endif + } + + /* Open the output file. */ +#ifdef TWO_FILE_COMMANDLINE + /* Must have explicit output file name */ + if (argn != argc-2) { + fprintf(stderr, "%s: must name one input and one output file\n", + progname); + usage(); + } + if ((outfile = fopen(argv[argn+1], WRITE_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, argv[argn+1]); + exit(EXIT_FAILURE); + } +#else + /* Unix style: expect zero or one file name */ + if (argn < argc-1) { + fprintf(stderr, "%s: only one input file\n", progname); + usage(); + } + /* default output file is stdout */ +#ifdef USE_SETMODE /* need to hack file mode? */ + setmode(fileno(stdout), O_BINARY); +#endif +#ifdef USE_FDOPEN /* need to re-open in binary mode? */ + if ((outfile = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open stdout\n", progname); + exit(EXIT_FAILURE); + } +#else + outfile = stdout; +#endif +#endif /* TWO_FILE_COMMANDLINE */ + + /* Collect comment text from comment_file or stdin, if necessary */ + if (comment_arg == NULL) { + FILE * src_file; + int c; + + comment_arg = (char *) malloc((size_t) MAX_COM_LENGTH); + if (comment_arg == NULL) + ERREXIT("Insufficient memory"); + comment_length = 0; + src_file = (comment_file != NULL ? comment_file : stdin); + while ((c = getc(src_file)) != EOF) { + if (comment_length >= (unsigned int) MAX_COM_LENGTH) { + fprintf(stderr, "Comment text may not exceed %u bytes\n", + (unsigned int) MAX_COM_LENGTH); + exit(EXIT_FAILURE); + } + comment_arg[comment_length++] = (char) c; + } + if (comment_file != NULL) + fclose(comment_file); + } + + /* Copy JPEG headers until SOFn marker; + * we will insert the new comment marker just before SOFn. + * This (a) causes the new comment to appear after, rather than before, + * existing comments; and (b) ensures that comments come after any JFIF + * or JFXX markers, as required by the JFIF specification. + */ + marker = scan_JPEG_header(keep_COM); + /* Insert the new COM marker, but only if nonempty text has been supplied */ + if (comment_length > 0) { + write_marker(M_COM); + write_2_bytes(comment_length + 2); + while (comment_length > 0) { + write_1_byte(*comment_arg++); + comment_length--; + } + } + /* Duplicate the remainder of the source file. + * Note that any COM markers occuring after SOF will not be touched. + */ + write_marker(marker); + copy_rest_of_file(); + + /* All done. */ + exit(EXIT_SUCCESS); + return 0; /* suppress no-return-value warnings */ +} diff --git a/gtkmm-osx/jpeg-6b/wrppm.c b/gtkmm-osx/jpeg-6b/wrppm.c new file mode 100644 index 0000000..6c6d908 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/wrppm.c @@ -0,0 +1,268 @@ +/* + * wrppm.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to write output images in PPM/PGM format. + * The extended 2-byte-per-sample raw PPM/PGM formats are supported. + * The PBMPLUS library is NOT required to compile this software + * (but it is highly useful as a set of PPM image manipulation programs). + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume output to + * an ordinary stdio stream. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef PPM_SUPPORTED + + +/* + * For 12-bit JPEG data, we either downscale the values to 8 bits + * (to write standard byte-per-sample PPM/PGM files), or output + * nonstandard word-per-sample PPM/PGM files. Downscaling is done + * if PPM_NORAWWORD is defined (this can be done in the Makefile + * or in jconfig.h). + * (When the core library supports data precision reduction, a cleaner + * implementation will be to ask for that instead.) + */ + +#if BITS_IN_JSAMPLE == 8 +#define PUTPPMSAMPLE(ptr,v) *ptr++ = (char) (v) +#define BYTESPERSAMPLE 1 +#define PPM_MAXVAL 255 +#else +#ifdef PPM_NORAWWORD +#define PUTPPMSAMPLE(ptr,v) *ptr++ = (char) ((v) >> (BITS_IN_JSAMPLE-8)) +#define BYTESPERSAMPLE 1 +#define PPM_MAXVAL 255 +#else +/* The word-per-sample format always puts the LSB first. */ +#define PUTPPMSAMPLE(ptr,v) \ + { register int val_ = v; \ + *ptr++ = (char) (val_ & 0xFF); \ + *ptr++ = (char) ((val_ >> 8) & 0xFF); \ + } +#define BYTESPERSAMPLE 2 +#define PPM_MAXVAL ((1<pub.output_file, dest->iobuffer, dest->buffer_width); +} + + +/* + * This code is used when we have to copy the data and apply a pixel + * format translation. Typically this only happens in 12-bit mode. + */ + +METHODDEF(void) +copy_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +{ + ppm_dest_ptr dest = (ppm_dest_ptr) dinfo; + register char * bufferptr; + register JSAMPROW ptr; + register JDIMENSION col; + + ptr = dest->pub.buffer[0]; + bufferptr = dest->iobuffer; + for (col = dest->samples_per_row; col > 0; col--) { + PUTPPMSAMPLE(bufferptr, GETJSAMPLE(*ptr++)); + } + (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); +} + + +/* + * Write some pixel data when color quantization is in effect. + * We have to demap the color index values to straight data. + */ + +METHODDEF(void) +put_demapped_rgb (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +{ + ppm_dest_ptr dest = (ppm_dest_ptr) dinfo; + register char * bufferptr; + register int pixval; + register JSAMPROW ptr; + register JSAMPROW color_map0 = cinfo->colormap[0]; + register JSAMPROW color_map1 = cinfo->colormap[1]; + register JSAMPROW color_map2 = cinfo->colormap[2]; + register JDIMENSION col; + + ptr = dest->pub.buffer[0]; + bufferptr = dest->iobuffer; + for (col = cinfo->output_width; col > 0; col--) { + pixval = GETJSAMPLE(*ptr++); + PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map0[pixval])); + PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map1[pixval])); + PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map2[pixval])); + } + (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); +} + + +METHODDEF(void) +put_demapped_gray (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +{ + ppm_dest_ptr dest = (ppm_dest_ptr) dinfo; + register char * bufferptr; + register JSAMPROW ptr; + register JSAMPROW color_map = cinfo->colormap[0]; + register JDIMENSION col; + + ptr = dest->pub.buffer[0]; + bufferptr = dest->iobuffer; + for (col = cinfo->output_width; col > 0; col--) { + PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map[GETJSAMPLE(*ptr++)])); + } + (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); +} + + +/* + * Startup: write the file header. + */ + +METHODDEF(void) +start_output_ppm (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + ppm_dest_ptr dest = (ppm_dest_ptr) dinfo; + + /* Emit file header */ + switch (cinfo->out_color_space) { + case JCS_GRAYSCALE: + /* emit header for raw PGM format */ + fprintf(dest->pub.output_file, "P5\n%ld %ld\n%d\n", + (long) cinfo->output_width, (long) cinfo->output_height, + PPM_MAXVAL); + break; + case JCS_RGB: + /* emit header for raw PPM format */ + fprintf(dest->pub.output_file, "P6\n%ld %ld\n%d\n", + (long) cinfo->output_width, (long) cinfo->output_height, + PPM_MAXVAL); + break; + default: + ERREXIT(cinfo, JERR_PPM_COLORSPACE); + } +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_output_ppm (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + /* Make sure we wrote the output file OK */ + fflush(dinfo->output_file); + if (ferror(dinfo->output_file)) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * The module selection routine for PPM format output. + */ + +GLOBAL(djpeg_dest_ptr) +jinit_write_ppm (j_decompress_ptr cinfo) +{ + ppm_dest_ptr dest; + + /* Create module interface object, fill in method pointers */ + dest = (ppm_dest_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(ppm_dest_struct)); + dest->pub.start_output = start_output_ppm; + dest->pub.finish_output = finish_output_ppm; + + /* Calculate output image dimensions so we can allocate space */ + jpeg_calc_output_dimensions(cinfo); + + /* Create physical I/O buffer. Note we make this near on a PC. */ + dest->samples_per_row = cinfo->output_width * cinfo->out_color_components; + dest->buffer_width = dest->samples_per_row * (BYTESPERSAMPLE * SIZEOF(char)); + dest->iobuffer = (char *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, dest->buffer_width); + + if (cinfo->quantize_colors || BITS_IN_JSAMPLE != 8 || + SIZEOF(JSAMPLE) != SIZEOF(char)) { + /* When quantizing, we need an output buffer for colormap indexes + * that's separate from the physical I/O buffer. We also need a + * separate buffer if pixel format translation must take place. + */ + dest->pub.buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->output_width * cinfo->output_components, (JDIMENSION) 1); + dest->pub.buffer_height = 1; + if (! cinfo->quantize_colors) + dest->pub.put_pixel_rows = copy_pixel_rows; + else if (cinfo->out_color_space == JCS_GRAYSCALE) + dest->pub.put_pixel_rows = put_demapped_gray; + else + dest->pub.put_pixel_rows = put_demapped_rgb; + } else { + /* We will fwrite() directly from decompressor output buffer. */ + /* Synthesize a JSAMPARRAY pointer structure */ + /* Cast here implies near->far pointer conversion on PCs */ + dest->pixrow = (JSAMPROW) dest->iobuffer; + dest->pub.buffer = & dest->pixrow; + dest->pub.buffer_height = 1; + dest->pub.put_pixel_rows = put_pixel_rows; + } + + return (djpeg_dest_ptr) dest; +} + +#endif /* PPM_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/wrrle.c b/gtkmm-osx/jpeg-6b/wrrle.c new file mode 100644 index 0000000..a4e7337 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/wrrle.c @@ -0,0 +1,305 @@ +/* + * wrrle.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to write output images in RLE format. + * The Utah Raster Toolkit library is required (version 3.1 or later). + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume output to + * an ordinary stdio stream. + * + * Based on code contributed by Mike Lijewski, + * with updates from Robert Hutchinson. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef RLE_SUPPORTED + +/* rle.h is provided by the Utah Raster Toolkit. */ + +#include + +/* + * We assume that JSAMPLE has the same representation as rle_pixel, + * to wit, "unsigned char". Hence we can't cope with 12- or 16-bit samples. + */ + +#if BITS_IN_JSAMPLE != 8 + Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ +#endif + + +/* + * Since RLE stores scanlines bottom-to-top, we have to invert the image + * from JPEG's top-to-bottom order. To do this, we save the outgoing data + * in a virtual array during put_pixel_row calls, then actually emit the + * RLE file during finish_output. + */ + + +/* + * For now, if we emit an RLE color map then it is always 256 entries long, + * though not all of the entries need be used. + */ + +#define CMAPBITS 8 +#define CMAPLENGTH (1<<(CMAPBITS)) + +typedef struct { + struct djpeg_dest_struct pub; /* public fields */ + + jvirt_sarray_ptr image; /* virtual array to store the output image */ + rle_map *colormap; /* RLE-style color map, or NULL if none */ + rle_pixel **rle_row; /* To pass rows to rle_putrow() */ + +} rle_dest_struct; + +typedef rle_dest_struct * rle_dest_ptr; + +/* Forward declarations */ +METHODDEF(void) rle_put_pixel_rows + JPP((j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied)); + + +/* + * Write the file header. + * + * In this module it's easier to wait till finish_output to write anything. + */ + +METHODDEF(void) +start_output_rle (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + rle_dest_ptr dest = (rle_dest_ptr) dinfo; + size_t cmapsize; + int i, ci; +#ifdef PROGRESS_REPORT + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; +#endif + + /* + * Make sure the image can be stored in RLE format. + * + * - RLE stores image dimensions as *signed* 16 bit integers. JPEG + * uses unsigned, so we have to check the width. + * + * - Colorspace is expected to be grayscale or RGB. + * + * - The number of channels (components) is expected to be 1 (grayscale/ + * pseudocolor) or 3 (truecolor/directcolor). + * (could be 2 or 4 if using an alpha channel, but we aren't) + */ + + if (cinfo->output_width > 32767 || cinfo->output_height > 32767) + ERREXIT2(cinfo, JERR_RLE_DIMENSIONS, cinfo->output_width, + cinfo->output_height); + + if (cinfo->out_color_space != JCS_GRAYSCALE && + cinfo->out_color_space != JCS_RGB) + ERREXIT(cinfo, JERR_RLE_COLORSPACE); + + if (cinfo->output_components != 1 && cinfo->output_components != 3) + ERREXIT1(cinfo, JERR_RLE_TOOMANYCHANNELS, cinfo->num_components); + + /* Convert colormap, if any, to RLE format. */ + + dest->colormap = NULL; + + if (cinfo->quantize_colors) { + /* Allocate storage for RLE-style cmap, zero any extra entries */ + cmapsize = cinfo->out_color_components * CMAPLENGTH * SIZEOF(rle_map); + dest->colormap = (rle_map *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, cmapsize); + MEMZERO(dest->colormap, cmapsize); + + /* Save away data in RLE format --- note 8-bit left shift! */ + /* Shifting would need adjustment for JSAMPLEs wider than 8 bits. */ + for (ci = 0; ci < cinfo->out_color_components; ci++) { + for (i = 0; i < cinfo->actual_number_of_colors; i++) { + dest->colormap[ci * CMAPLENGTH + i] = + GETJSAMPLE(cinfo->colormap[ci][i]) << 8; + } + } + } + + /* Set the output buffer to the first row */ + dest->pub.buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, dest->image, (JDIMENSION) 0, (JDIMENSION) 1, TRUE); + dest->pub.buffer_height = 1; + + dest->pub.put_pixel_rows = rle_put_pixel_rows; + +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->total_extra_passes++; /* count file writing as separate pass */ + } +#endif +} + + +/* + * Write some pixel data. + * + * This routine just saves the data away in a virtual array. + */ + +METHODDEF(void) +rle_put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +{ + rle_dest_ptr dest = (rle_dest_ptr) dinfo; + + if (cinfo->output_scanline < cinfo->output_height) { + dest->pub.buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, dest->image, + cinfo->output_scanline, (JDIMENSION) 1, TRUE); + } +} + +/* + * Finish up at the end of the file. + * + * Here is where we really output the RLE file. + */ + +METHODDEF(void) +finish_output_rle (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + rle_dest_ptr dest = (rle_dest_ptr) dinfo; + rle_hdr header; /* Output file information */ + rle_pixel **rle_row, *red, *green, *blue; + JSAMPROW output_row; + char cmapcomment[80]; + int row, col; + int ci; +#ifdef PROGRESS_REPORT + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; +#endif + + /* Initialize the header info */ + header = *rle_hdr_init(NULL); + header.rle_file = dest->pub.output_file; + header.xmin = 0; + header.xmax = cinfo->output_width - 1; + header.ymin = 0; + header.ymax = cinfo->output_height - 1; + header.alpha = 0; + header.ncolors = cinfo->output_components; + for (ci = 0; ci < cinfo->output_components; ci++) { + RLE_SET_BIT(header, ci); + } + if (cinfo->quantize_colors) { + header.ncmap = cinfo->out_color_components; + header.cmaplen = CMAPBITS; + header.cmap = dest->colormap; + /* Add a comment to the output image with the true colormap length. */ + sprintf(cmapcomment, "color_map_length=%d", cinfo->actual_number_of_colors); + rle_putcom(cmapcomment, &header); + } + + /* Emit the RLE header and color map (if any) */ + rle_put_setup(&header); + + /* Now output the RLE data from our virtual array. + * We assume here that (a) rle_pixel is represented the same as JSAMPLE, + * and (b) we are not on a machine where FAR pointers differ from regular. + */ + +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_limit = cinfo->output_height; + progress->pub.pass_counter = 0; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + + if (cinfo->output_components == 1) { + for (row = cinfo->output_height-1; row >= 0; row--) { + rle_row = (rle_pixel **) (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, dest->image, + (JDIMENSION) row, (JDIMENSION) 1, FALSE); + rle_putrow(rle_row, (int) cinfo->output_width, &header); +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_counter++; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + } + } else { + for (row = cinfo->output_height-1; row >= 0; row--) { + rle_row = (rle_pixel **) dest->rle_row; + output_row = * (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, dest->image, + (JDIMENSION) row, (JDIMENSION) 1, FALSE); + red = rle_row[0]; + green = rle_row[1]; + blue = rle_row[2]; + for (col = cinfo->output_width; col > 0; col--) { + *red++ = GETJSAMPLE(*output_row++); + *green++ = GETJSAMPLE(*output_row++); + *blue++ = GETJSAMPLE(*output_row++); + } + rle_putrow(rle_row, (int) cinfo->output_width, &header); +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_counter++; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + } + } + +#ifdef PROGRESS_REPORT + if (progress != NULL) + progress->completed_extra_passes++; +#endif + + /* Emit file trailer */ + rle_puteof(&header); + fflush(dest->pub.output_file); + if (ferror(dest->pub.output_file)) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * The module selection routine for RLE format output. + */ + +GLOBAL(djpeg_dest_ptr) +jinit_write_rle (j_decompress_ptr cinfo) +{ + rle_dest_ptr dest; + + /* Create module interface object, fill in method pointers */ + dest = (rle_dest_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(rle_dest_struct)); + dest->pub.start_output = start_output_rle; + dest->pub.finish_output = finish_output_rle; + + /* Calculate output image dimensions so we can allocate space */ + jpeg_calc_output_dimensions(cinfo); + + /* Allocate a work array for output to the RLE library. */ + dest->rle_row = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->output_width, (JDIMENSION) cinfo->output_components); + + /* Allocate a virtual array to hold the image. */ + dest->image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + (JDIMENSION) (cinfo->output_width * cinfo->output_components), + cinfo->output_height, (JDIMENSION) 1); + + return (djpeg_dest_ptr) dest; +} + +#endif /* RLE_SUPPORTED */ diff --git a/gtkmm-osx/jpeg-6b/wrtarga.c b/gtkmm-osx/jpeg-6b/wrtarga.c new file mode 100644 index 0000000..cf104d2 --- /dev/null +++ b/gtkmm-osx/jpeg-6b/wrtarga.c @@ -0,0 +1,253 @@ +/* + * wrtarga.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to write output images in Targa format. + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume output to + * an ordinary stdio stream. + * + * Based on code contributed by Lee Daniel Crocker. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef TARGA_SUPPORTED + + +/* + * To support 12-bit JPEG data, we'd have to scale output down to 8 bits. + * This is not yet implemented. + */ + +#if BITS_IN_JSAMPLE != 8 + Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ +#endif + +/* + * The output buffer needs to be writable by fwrite(). On PCs, we must + * allocate the buffer in near data space, because we are assuming small-data + * memory model, wherein fwrite() can't reach far memory. If you need to + * process very wide images on a PC, you might have to compile in large-memory + * model, or else replace fwrite() with a putc() loop --- which will be much + * slower. + */ + + +/* Private version of data destination object */ + +typedef struct { + struct djpeg_dest_struct pub; /* public fields */ + + char *iobuffer; /* physical I/O buffer */ + JDIMENSION buffer_width; /* width of one row */ +} tga_dest_struct; + +typedef tga_dest_struct * tga_dest_ptr; + + +LOCAL(void) +write_header (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, int num_colors) +/* Create and write a Targa header */ +{ + char targaheader[18]; + + /* Set unused fields of header to 0 */ + MEMZERO(targaheader, SIZEOF(targaheader)); + + if (num_colors > 0) { + targaheader[1] = 1; /* color map type 1 */ + targaheader[5] = (char) (num_colors & 0xFF); + targaheader[6] = (char) (num_colors >> 8); + targaheader[7] = 24; /* 24 bits per cmap entry */ + } + + targaheader[12] = (char) (cinfo->output_width & 0xFF); + targaheader[13] = (char) (cinfo->output_width >> 8); + targaheader[14] = (char) (cinfo->output_height & 0xFF); + targaheader[15] = (char) (cinfo->output_height >> 8); + targaheader[17] = 0x20; /* Top-down, non-interlaced */ + + if (cinfo->out_color_space == JCS_GRAYSCALE) { + targaheader[2] = 3; /* image type = uncompressed gray-scale */ + targaheader[16] = 8; /* bits per pixel */ + } else { /* must be RGB */ + if (num_colors > 0) { + targaheader[2] = 1; /* image type = colormapped RGB */ + targaheader[16] = 8; + } else { + targaheader[2] = 2; /* image type = uncompressed RGB */ + targaheader[16] = 24; + } + } + + if (JFWRITE(dinfo->output_file, targaheader, 18) != (size_t) 18) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * Write some pixel data. + * In this module rows_supplied will always be 1. + */ + +METHODDEF(void) +put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +/* used for unquantized full-color output */ +{ + tga_dest_ptr dest = (tga_dest_ptr) dinfo; + register JSAMPROW inptr; + register char * outptr; + register JDIMENSION col; + + inptr = dest->pub.buffer[0]; + outptr = dest->iobuffer; + for (col = cinfo->output_width; col > 0; col--) { + outptr[0] = (char) GETJSAMPLE(inptr[2]); /* RGB to BGR order */ + outptr[1] = (char) GETJSAMPLE(inptr[1]); + outptr[2] = (char) GETJSAMPLE(inptr[0]); + inptr += 3, outptr += 3; + } + (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); +} + +METHODDEF(void) +put_gray_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +/* used for grayscale OR quantized color output */ +{ + tga_dest_ptr dest = (tga_dest_ptr) dinfo; + register JSAMPROW inptr; + register char * outptr; + register JDIMENSION col; + + inptr = dest->pub.buffer[0]; + outptr = dest->iobuffer; + for (col = cinfo->output_width; col > 0; col--) { + *outptr++ = (char) GETJSAMPLE(*inptr++); + } + (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); +} + + +/* + * Write some demapped pixel data when color quantization is in effect. + * For Targa, this is only applied to grayscale data. + */ + +METHODDEF(void) +put_demapped_gray (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +{ + tga_dest_ptr dest = (tga_dest_ptr) dinfo; + register JSAMPROW inptr; + register char * outptr; + register JSAMPROW color_map0 = cinfo->colormap[0]; + register JDIMENSION col; + + inptr = dest->pub.buffer[0]; + outptr = dest->iobuffer; + for (col = cinfo->output_width; col > 0; col--) { + *outptr++ = (char) GETJSAMPLE(color_map0[GETJSAMPLE(*inptr++)]); + } + (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); +} + + +/* + * Startup: write the file header. + */ + +METHODDEF(void) +start_output_tga (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + tga_dest_ptr dest = (tga_dest_ptr) dinfo; + int num_colors, i; + FILE *outfile; + + if (cinfo->out_color_space == JCS_GRAYSCALE) { + /* Targa doesn't have a mapped grayscale format, so we will */ + /* demap quantized gray output. Never emit a colormap. */ + write_header(cinfo, dinfo, 0); + if (cinfo->quantize_colors) + dest->pub.put_pixel_rows = put_demapped_gray; + else + dest->pub.put_pixel_rows = put_gray_rows; + } else if (cinfo->out_color_space == JCS_RGB) { + if (cinfo->quantize_colors) { + /* We only support 8-bit colormap indexes, so only 256 colors */ + num_colors = cinfo->actual_number_of_colors; + if (num_colors > 256) + ERREXIT1(cinfo, JERR_TOO_MANY_COLORS, num_colors); + write_header(cinfo, dinfo, num_colors); + /* Write the colormap. Note Targa uses BGR byte order */ + outfile = dest->pub.output_file; + for (i = 0; i < num_colors; i++) { + putc(GETJSAMPLE(cinfo->colormap[2][i]), outfile); + putc(GETJSAMPLE(cinfo->colormap[1][i]), outfile); + putc(GETJSAMPLE(cinfo->colormap[0][i]), outfile); + } + dest->pub.put_pixel_rows = put_gray_rows; + } else { + write_header(cinfo, dinfo, 0); + dest->pub.put_pixel_rows = put_pixel_rows; + } + } else { + ERREXIT(cinfo, JERR_TGA_COLORSPACE); + } +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_output_tga (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + /* Make sure we wrote the output file OK */ + fflush(dinfo->output_file); + if (ferror(dinfo->output_file)) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * The module selection routine for Targa format output. + */ + +GLOBAL(djpeg_dest_ptr) +jinit_write_targa (j_decompress_ptr cinfo) +{ + tga_dest_ptr dest; + + /* Create module interface object, fill in method pointers */ + dest = (tga_dest_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(tga_dest_struct)); + dest->pub.start_output = start_output_tga; + dest->pub.finish_output = finish_output_tga; + + /* Calculate output image dimensions so we can allocate space */ + jpeg_calc_output_dimensions(cinfo); + + /* Create I/O buffer. Note we make this near on a PC. */ + dest->buffer_width = cinfo->output_width * cinfo->output_components; + dest->iobuffer = (char *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (size_t) (dest->buffer_width * SIZEOF(char))); + + /* Create decompressor output buffer. */ + dest->pub.buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, dest->buffer_width, (JDIMENSION) 1); + dest->pub.buffer_height = 1; + + return (djpeg_dest_ptr) dest; +} + +#endif /* TARGA_SUPPORTED */ diff --git a/gtkmm-osx/libpng-1.2.5/ANNOUNCE b/gtkmm-osx/libpng-1.2.5/ANNOUNCE new file mode 100644 index 0000000..04f46ec --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/ANNOUNCE @@ -0,0 +1,29 @@ + +Libpng 1.2.5 - October 3, 2002 + +This is a public release of libpng, intended for use in production codes. + +Changes since the last public release (1.2.4): + + Revised makefile.cygwin to use DLL number 12 instead of 13. + Added code to contrib/gregbook/readpng2.c to ignore unused chunks. + Replaced toucan.png in contrib/gregbook (it has been corrupt since 1.0.11) + Removed some stray *.o files from contrib/gregbook. + Changed png_error() to png_warning() about "Too much data" in pngpread.c + and about "Extra compressed data" in pngrutil.c. + Prevent png_ptr->pass from exceeding 7 in png_push_finish_row(). + Updated makefile.hggcc + Updated png.c and pnggccrd.c handling of return from png_mmx_support() + Only issue png_warning() about "Too much data" in pngpread.c when avail_in + is nonzero. + Updated makefiles to install a separate libpng.so.3 with its own rpath. + Revised makefiles to not remove previous minor versions of shared libraries. + Revised 13 makefiles to remove "-lz" and "-L$(ZLIBLIB)", etc., from shared + library loader directive. + Revised libpng-config script. + Relocated two misplaced PNGAPI lines in pngtest.c + +Send comments/corrections/commendations to +png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu + +Glenn R-P diff --git a/gtkmm-osx/libpng-1.2.5/CHANGES b/gtkmm-osx/libpng-1.2.5/CHANGES new file mode 100644 index 0000000..d151a41 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/CHANGES @@ -0,0 +1,1184 @@ + +CHANGES - changes for libpng + +version 0.2 + added reader into png.h + fixed small problems in stub file +version 0.3 + added pull reader + split up pngwrite.c to several files + added pnglib.txt + added example.c + cleaned up writer, adding a few new tranformations + fixed some bugs in writer + interfaced with zlib 0.5 + added K&R support + added check for 64 KB blocks for 16 bit machines +version 0.4 + cleaned up code and commented code + simplified time handling into png_time + created png_color_16 and png_color_8 to handle color needs + cleaned up color type defines + fixed various bugs + made various names more consistant + interfaced with zlib 0.71 + cleaned up zTXt reader and writer (using zlib's Reset functions) + split transformations into pngrtran.c and pngwtran.c +version 0.5 + interfaced with zlib 0.8 + fixed many reading and writing bugs + saved using 3 spaces instead of tabs +version 0.6 + added png_large_malloc() and png_large_free() + added png_size_t + cleaned up some compiler warnings + added png_start_read_image() +version 0.7 + cleaned up lots of bugs + finished dithering and other stuff + added test program + changed name from pnglib to libpng +version 0.71 [June, 1995] + changed pngtest.png for zlib 0.93 + fixed error in libpng.txt and example.c +version 0.8 + cleaned up some bugs + added png_set_filler() + split up pngstub.c into pngmem.c, pngio.c, and pngerror.c + added #define's to remove unwanted code + moved png_info_init() to png.c + added old_size into png_realloc() + added functions to manually set filtering and compression info + changed compression parameters based on image type + optimized filter selection code + added version info + changed external functions passing floats to doubles (k&r problems?) + put all the configurable stuff in pngconf.h + enabled png_set_shift to work with paletted images on read + added png_read_update_info() - updates info structure with + transformations +version 0.81 [August, 1995] + incorporated Tim Wegner's medium model code (thanks, Tim) +version 0.82 [September, 1995] + [unspecified changes] +version 0.85 [December, 1995] + added more medium model code (almost everything's a far) + added i/o, error, and memory callback functions + fixed some bugs (16 bit, 4 bit interlaced, etc.) + added first run progressive reader (barely tested) +version 0.86 [January, 1996] + fixed bugs + improved documentation +version 0.87 [January, 1996] + fixed medium model bugs + fixed other bugs introduced in 0.85 and 0.86 + added some minor documentation +version 0.88 [January, 1996] + fixed progressive bugs + replaced tabs with spaces + cleaned up documentation + added callbacks for read/write and warning/error functions +version 0.89 [July, 1996] + added new initialization API to make libpng work better with shared libs + we now have png_create_read_struct(), png_create_write_struct(), + png_create_info_struct(), png_destroy_read_struct(), and + png_destroy_write_struct() instead of the separate calls to + malloc and png_read_init(), png_info_init(), and png_write_init() + changed warning/error callback functions to fix bug - this means you + should use the new initialization API if you were using the old + png_set_message_fn() calls, and that the old API no longer exists + so that people are aware that they need to change their code + changed filter selection API to allow selection of multiple filters + since it didn't work in previous versions of libpng anyways + optimized filter selection code + fixed png_set_background() to allow using an arbitrary RGB color for + paletted images + fixed gamma and background correction for paletted images, so + png_correct_palette is not needed unless you are correcting an + external palette (you will need to #define PNG_CORRECT_PALETTE_SUPPORTED + in pngconf.h) - if nobody uses this, it may disappear in the future. + fixed bug with Borland 64K memory allocation (Alexander Lehmann) + fixed bug in interlace handling (Smarasderagd, I think) + added more error checking for writing and image to reduce invalid files + separated read and write functions so that they won't both be linked + into a binary when only reading or writing functionality is used + new pngtest image also has interlacing and zTXt + updated documentation to reflect new API +version 0.90 [January, 1997] + made CRC errors/warnings on critical and ancillary chunks configurable + libpng will use the zlib CRC routines by (compile-time) default + changed DOS small/medium model memory support - needs zlib 1.04 (Tim Wegner) + added external C++ wrapper statements to png.h (Gilles Dauphin) + allow PNG file to be read when some or all of file signature has already + been read from the beginning of the stream. ****This affects the size + of info_struct and invalidates all programs that use a shared libpng**** + fixed png_filler() declarations + fixed? background color conversions + fixed order of error function pointers to match documentation + current chunk name is now available in png_struct to reduce the number + of nearly identical error messages (will simplify multi-lingual + support when available) + try to get ready for unknown-chunk callback functions: + - previously read critical chunks are flagged, so the chunk handling + routines can determine if the chunk is in the right place + - all chunk handling routines have the same prototypes, so we will + be able to handle all chunks via a callback mechanism + try to fix Linux "setjmp" buffer size problems + removed png_large_malloc, png_large_free, and png_realloc functions. +version 0.95 [March, 1997] + fixed bug in pngwutil.c allocating "up_row" twice and "avg_row" never + fixed bug in PNG file signature compares when start != 0 + changed parameter type of png_set_filler(...filler...) from png_byte + to png_uint_32 + added test for MACOS to ensure that both math.h and fp.h are not #included + added macros for libpng to be compiled as a Windows DLL (Andreas Kupries) + added "packswap" transformation, which changes the endianness of + packed-pixel bytes (Kevin Bracey) + added "strip_alpha" transformation, which removes the alpha channel of + input images without using it (not neccesarily a good idea) + added "swap_alpha" transformation, which puts the alpha channel in front + of the color bytes instead of after + removed all implicit variable tests which assume NULL == 0 (I think) + changed several variables to "png_size_t" to show 16/32-bit limitations + added new pCAL chunk read/write support + added experimental filter selection weighting (Greg Roelofs) + removed old png_set_rgbx() and png_set_xrgb() functions that have been + obsolete for about 2 years now (use png_set_filler() instead) + added macros to read 16- and 32-bit ints directly from buffer, to be + used only on those systems that support it (namely PowerPC and 680x0) + With some testing, this may become the default for MACOS/PPC systems. + only calculate CRC on data if we are going to use it + added macros for zTXt compression type PNG_zTXt_COMPRESSION_??? + added macros for simple libpng debugging output selectable at compile time + removed PNG_READ_END_MODE in progressive reader (Smarasderagd) + more description of info_struct in libpng.txt and png.h + more instructions in example.c + more chunk types tested in pngtest.c + renamed pngrcb.c to pngset.c, and all png_read_ functions to be + png_set_. We now have corresponding png_get_ + functions in pngget.c to get infomation in info_ptr. This isolates + the application from the internal organization of png_info_struct + (good for shared library implementations). +version 0.96 [May, 1997] + fixed serious bug with < 8bpp images introduced in 0.95 + fixed 256-color transparency bug (Greg Roelofs) + fixed up documentation (Greg Roelofs, Laszlo Nyul) + fixed "error" in pngconf.h for Linux setjmp() behaviour + fixed DOS medium model support (Tim Wegner) + fixed png_check_keyword() for case with error in static string text + added read of CRC after IEND chunk for embedded PNGs (Laszlo Nyul) + added typecasts to quiet compiler errors + added more debugging info +version 0.97 [January, 1998] + removed PNG_USE_OWN_CRC capability + relocated png_set_crc_action from pngrutil.c to pngrtran.c + fixed typecasts of "new_key", etc. (Andreas Dilger) + added RFC 1152 [sic] date support + fixed bug in gamma handling of 4-bit grayscale + added 2-bit grayscale gamma handling (Glenn R-P) + added more typecasts. 65536L becomes (png_uint_32)65536L, etc. (Glenn R-P) + minor corrections in libpng.txt + added simple sRGB support (Glenn R-P) + easier conditional compiling, e.g. define PNG_READ/WRITE_NOT_FULLY_SUPPORTED; + all configurable options can be selected from command-line instead + of having to edit pngconf.h (Glenn R-P) + fixed memory leak in pngwrite.c (free info_ptr->text) (Glenn R-P) + added more conditions for png_do_background, to avoid changing + black pixels to background when a background is supplied and + no pixels are transparent + repaired PNG_NO_STDIO behaviour + tested NODIV support and made it default behaviour (Greg Roelofs) + added "-m" option and PNGTEST_DEBUG_MEMORY to pngtest (John Bowler) + regularized version numbering scheme and bumped shared-library major + version number to 2 to avoid problems with libpng 0.89 apps (Greg Roelofs) +version 0.98 [January, 1998] + cleaned up some typos in libpng.txt and in code documentation + fixed memory leaks in pCAL chunk processing (Glenn R-P and John Bowler) + cosmetic change "display_gamma" to "screen_gamma" in pngrtran.c + changed recommendation about file_gamma for PC images to .51 from .45, + in example.c and libpng.txt, added comments to distinguish between + screen_gamma, viewing_gamma, and display_gamma. + changed all references to RFC1152 to read RFC1123 and changed the + PNG_TIME_RFC1152_SUPPORTED macro to PNG_TIME_RFC1123_SUPPORTED + added png_invert_alpha capability (Glenn R-P -- suggestion by Jon Vincent) + changed srgb_intent from png_byte to int to avoid compiler bugs +version 0.99 [January 30, 1998] + free info_ptr->text instead of end_info_ptr->text in pngread.c (John Bowler) + fixed a longstanding "packswap" bug in pngtrans.c + fixed some inconsistencies in pngconf.h that prevented compiling with + PNG_READ_GAMMA_SUPPORTED and PNG_READ_hIST_SUPPORTED undefined + fixed some typos and made other minor rearrangement of libpng.txt (Andreas) + changed recommendation about file_gamma for PC images to .50 from .51 in + example.c and libpng.txt, and changed file_gamma for sRGB images to .45 + added a number of functions to access information from the png structure + png_get_image_height(), etc. (Glenn R-P, suggestion by Brad Pettit) + added TARGET_MACOS similar to zlib-1.0.8 + define PNG_ALWAYS_EXTERN when __MWERKS__ && WIN32 are defined + added type casting to all png_malloc() function calls +version 0.99a [January 31, 1998] + Added type casts and parentheses to all returns that return a value.(Tim W.) +version 0.99b [February 4, 1998] + Added type cast png_uint_32 on malloc function calls where needed. + Changed type of num_hist from png_uint_32 to int (same as num_palette). + Added checks for rowbytes overflow, in case png_size_t is less than 32 bits. + Renamed makefile.elf to makefile.lnx. +version 0.99c [February 7, 1998] + More type casting. Removed erroneous overflow test in pngmem.c. + Added png_buffered_memcpy() and png_buffered_memset(), apply them to rowbytes. + Added UNIX manual pages libpng.3 (incorporating libpng.txt) and png.5. +version 0.99d [February 11, 1998] + Renamed "far_to_near()" "png_far_to_near()" + Revised libpng.3 + Version 99c "buffered" operations didn't work as intended. Replaced them + with png_memcpy_check() and png_memset_check(). + Added many "if (png_ptr == NULL) return" to quell compiler warnings about + unused png_ptr, mostly in pngget.c and pngset.c. + Check for overlength tRNS chunk present when indexed-color PLTE is read. + Cleaned up spelling errors in libpng.3/libpng.txt + Corrected a problem with png_get_tRNS() which returned undefined trans array +version 0.99e [February 28, 1998] + Corrected png_get_tRNS() again. + Add parentheses for easier reading of pngget.c, fixed "||" should be "&&". + Touched up example.c to make more of it compileable, although the entire + file still can't be compiled (Willem van Schaik) + Fixed a bug in png_do_shift() (Bryan Tsai) + Added a space in png.h prototype for png_write_chunk_start() + Replaced pngtest.png with one created with zlib 1.1.1 + Changed pngtest to report PASS even when file size is different (Jean-loup G.) + Corrected some logic errors in png_do_invert_alpha() (Chris Patterson) +version 0.99f [March 5, 1998] + Corrected a bug in pngpread() introduced in version 99c (Kevin Bracey) + Moved makefiles into a "scripts" directory, and added INSTALL instruction file + Added makefile.os2 and pngos2.def (A. Zabolotny) and makefile.s2x (W. Sebok) + Added pointers to "note on libpng versions" in makefile.lnx and README + Added row callback feature when reading and writing nonprogressive rows + and added a test of this feature in pngtest.c + Added user transform callbacks, with test of the feature in pngtest.c +version 0.99g [March 6, 1998, morning] + Minor changes to pngtest.c to suppress compiler warnings. + Removed "beta" language from documentation. +version 0.99h [March 6, 1998, evening] + Minor changes to previous minor changes to pngtest.c + Changed PNG_READ_NOT_FULLY_SUPPORTED to PNG_READ_TRANSFORMS_NOT_SUPPORTED + and added PNG_PROGRESSIVE_READ_NOT_SUPPORTED macro + Added user transform capability +version 1.00 [March 7, 1998] + Changed several typedefs in pngrutil.c + Added makefile.wat (Pawel Mrochen), updated makefile.tc3 (Willem van Schaik) + replaced "while(1)" with "for(;;)" + added PNGARG() to prototypes in pngtest.c and removed some prototypes + updated some of the makefiles (Tom Lane) + changed some typedefs (s_start, etc.) in pngrutil.c + fixed dimensions of "short_months" array in pngwrite.c + Replaced ansi2knr.c with the one from jpeg-v6 +version 1.0.0 [March 8, 1998] + Changed name from 1.00 to 1.0.0 (Adam Costello) + Added smakefile.ppc (with SCOPTIONS.ppc) for Amiga PPC (Andreas Kleinert) +version 1.0.0a [March 9, 1998] + Fixed three bugs in pngrtran.c to make gamma+background handling consistent + (Greg Roelofs) + Changed format of the PNG_LIBPNG_VER integer to xyyzz instead of xyz + for major, minor, and bugfix releases. This is 10001. (Adam Costello, + Tom Lane) + Make months range from 1-12 in png_convert_to_rfc1123 +version 1.0.0b [March 13, 1998] + Quieted compiler complaints about two empty "for" loops in pngrutil.c + Minor changes to makefile.s2x + Removed #ifdef/#endif around a png_free() in pngread.c +version 1.0.1 [March 14, 1998] + Changed makefile.s2x to reduce security risk of using a relative pathname + Fixed some typos in the documentation (Greg). + Fixed a problem with value of "channels" returned by png_read_update_info() +version 1.0.1a [April 21, 1998] + Optimized Paeth calculations by replacing abs() function calls with intrinsics + plus other loop optimizations. Improves avg decoding speed by about 20%. + Commented out i386istic "align" compiler flags in makefile.lnx. + Reduced the default warning level in some makefiles, to make them consistent. + Removed references to IJG and JPEG in the ansi2knr.c copyright statement. + Fixed a bug in png_do_strip_filler with XXRRGGBB => RRGGBB transformation. + Added grayscale and 16-bit capability to png_do_read_filler(). + Fixed a bug in pngset.c, introduced in version 0.99c, that sets rowbytes + too large when writing an image with bit_depth < 8 (Bob Dellaca). + Corrected some bugs in the experimental weighted filtering heuristics. + Moved a misplaced pngrutil code block that truncates tRNS if it has more + than num_palette entries -- test was done before num_palette was defined. + Fixed a png_convert_to_rfc1123() bug that converts day 31 to 0 (Steve Eddins). + Changed compiler flags in makefile.wat for better optimization (Pawel Mrochen). +version 1.0.1b [May 2, 1998] + Relocated png_do_gray_to_rgb() within png_do_read_transformations() (Greg). + Relocated the png_composite macros from pngrtran.c to png.h (Greg). + Added makefile.sco (contributed by Mike Hopkirk). + Fixed two bugs (missing definitions of "istop") introduced in libpng-1.0.1a. + Fixed a bug in pngrtran.c that would set channels=5 under some circumstances. + More work on the Paeth-filtering, achieving imperceptible speedup (A Kleinert). + More work on loop optimization which may help when compiled with C++ compilers. + Added warnings when people try to use transforms they've defined out. + Collapsed 4 "i" and "c" loops into single "i" loops in pngrtran and pngwtran. + Revised paragraph about png_set_expand() in libpng.txt and libpng.3 (Greg) +version 1.0.1c [May 11, 1998] + Fixed a bug in pngrtran.c (introduced in libpng-1.0.1a) where the masks for + filler bytes should have been 0xff instead of 0xf. + Added max_pixel_depth=32 in pngrutil.c when using FILLER with palette images. + Moved PNG_WRITE_WEIGHTED_FILTER_SUPPORTED and PNG_WRITE_FLUSH_SUPPORTED + out of the PNG_WRITE_TRANSFORMS_NOT_SUPPORTED block of pngconf.h + Added "PNG_NO_WRITE_TRANSFORMS" etc., as alternatives for *_NOT_SUPPORTED, + for consistency, in pngconf.h + Added individual "ifndef PNG_NO_[CAPABILITY]" in pngconf.h to make it easier + to remove unwanted capabilities via the compile line + Made some corrections to grammar (which, it's) in documentation (Greg). + Corrected example.c, use of row_pointers in png_write_image(). +version 1.0.1d [May 24, 1998] + Corrected several statements that used side effects illegally in pngrutil.c + and pngtrans.c, that were introduced in version 1.0.1b + Revised png_read_rows() to avoid repeated if-testing for NULL (A Kleinert) + More corrections to example.c, use of row_pointers in png_write_image() + and png_read_rows(). + Added pngdll.mak and pngdef.pas to scripts directory, contributed by + Bob Dellaca, to make a png32bd.dll with Borland C++ 4.5 + Fixed error in example.c with png_set_text: num_text is 3, not 2 (Guido V.) + Changed several loops from count-down to count-up, for consistency. +version 1.0.1e [June 6, 1998] + Revised libpng.txt and libpng.3 description of png_set_read|write_fn(), and + added warnings when people try to set png_read_fn and png_write_fn in + the same structure. + Added a test such that png_do_gamma will be done when num_trans==0 + for truecolor images that have defined a background. This corrects an + error that was introduced in libpng-0.90 that can cause gamma processing + to be skipped. + Added tests in png.h to include "trans" and "trans_values" in structures + when PNG_READ_BACKGROUND_SUPPORTED or PNG_READ_EXPAND_SUPPORTED is defined. + Add png_free(png_ptr->time_buffer) in png_destroy_read_struct() + Moved png_convert_to_rfc_1123() from pngwrite.c to png.c + Added capability for user-provided malloc_fn() and free_fn() functions, + and revised pngtest.c to demonstrate their use, replacing the + PNGTEST_DEBUG_MEM feature. + Added makefile.w32, for Microsoft C++ 4.0 and later (Tim Wegner). +version 1.0.2 [June 14, 1998] + Fixed two bugs in makefile.bor . +version 1.0.2a [December 30, 1998] + Replaced and extended code that was removed from png_set_filler() in 1.0.1a. + Fixed a bug in png_do_filler() that made it fail to write filler bytes in + the left-most pixel of each row (Kevin Bracey). + Changed "static pngcharp tIME_string" to "static char tIME_string[30]" + in pngtest.c (Duncan Simpson). + Fixed a bug in pngtest.c that caused pngtest to try to write a tIME chunk + even when no tIME chunk was present in the source file. + Fixed a problem in pngrutil.c: gray_to_rgb didn't always work with 16-bit. + Fixed a problem in png_read_push_finish_row(), which would not skip some + passes that it should skip, for images that are less than 3 pixels high. + Interchanged the order of calls to png_do_swap() and png_do_shift() + in pngwtran.c (John Cromer). + Added #ifdef PNG_DEBUG/#endif surrounding use of PNG_DEBUG in png.h . + Changed "bad adaptive filter type" from error to warning in pngrutil.c . + Fixed a documentation error about default filtering with 8-bit indexed-color. + Separated the PNG_NO_STDIO macro into PNG_NO_STDIO and PNG_NO_CONSOLE_IO + (L. Peter Deutsch). + Added png_set_rgb_to_gray() and png_get_rgb_to_gray_status() functions. + Added png_get_copyright() and png_get_header_version() functions. + Revised comments on png_set_progressive_read_fn() in libpng.txt and example.c + Added information about debugging in libpng.txt and libpng.3 . + Changed "ln -sf" to "ln -s -f" in makefile.s2x, makefile.lnx, and makefile.sco. + Removed lines after Dynamic Dependencies" in makefile.aco . + Revised makefile.dec to make a shared library (Jeremie Petit). + Removed trailing blanks from all files. +version 1.0.2a [January 6, 1999] + Removed misplaced #endif and #ifdef PNG_NO_EXTERN near the end of png.h + Added "if" tests to silence complaints about unused png_ptr in png.h and png.c + Changed "check_if_png" function in example.c to return true (nonzero) if PNG. + Changed libpng.txt to demonstrate png_sig_cmp() instead of png_check_sig() + which is obsolete. +version 1.0.3 [January 14, 1999] + Added makefile.hux, for Hewlett Packard HPUX 10.20 and 11.00 (Jim Rice) + Added a statement of Y2K compliance in png.h, libpng.3, and Y2KINFO. +version 1.0.3a [August 12, 1999] + Added check for PNG_READ_INTERLACE_SUPPORTED in pngread.c; issue a warning + if an attempt is made to read an interlaced image when it's not supported. + Added check if png_ptr->trans is defined before freeing it in pngread.c + Modified the Y2K statement to include versions back to version 0.71 + Fixed a bug in the check for valid IHDR bit_depth/color_types in pngrutil.c + Modified makefile.wat (added -zp8 flag, ".symbolic", changed some comments) + Replaced leading blanks with tab characters in makefile.hux + Changed "dworkin.wustl.edu" to "ccrc.wustl.edu" in various documents. + Changed (float)red and (float)green to (double)red, (double)green + in png_set_rgb_to_gray() to avoid "promotion" problems in AIX. + Fixed a bug in pngconf.h that omitted when PNG_DEBUG==0 (K Bracey). + Reformatted libpng.3 and libpngpf.3 with proper fonts (script by J. vanZandt). + Updated documentation to refer to the PNG-1.2 specification. + Removed ansi2knr.c and left pointers to the latest source for ansi2knr.c + in makefile.knr, INSTALL, and README (L. Peter Deutsch) + Fixed bugs in calculation of the length of rowbytes when adding alpha + channels to 16-bit images, in pngrtran.c (Chris Nokleberg) + Added function png_set_user_transform_info() to store user_transform_ptr, + user_depth, and user_channels into the png_struct, and a function + png_get_user_transform_ptr() to retrieve the pointer (Chris Nokleberg) + Added function png_set_empty_plte_permitted() to make libpng useable + in MNG applications. + Corrected the typedef for png_free_ptr in png.h (Jesse Jones). + Correct gamma with srgb is 45455 instead of 45000 in pngrutil.c, to be + consistent with PNG-1.2, and allow variance of 500 before complaining. + Added assembler code contributed by Intel in file pngvcrd.c and modified + makefile.w32 to use it (Nirav Chhatrapati, INTEL Corporation, Gilles Vollant) + Changed "ln -s -f" to "ln -f -s" in the makefiles to make Solaris happy. + Added some aliases for png_set_expand() in pngrtran.c, namely + png_set_expand_PLTE(), png_set_expand_depth(), and png_set_expand_tRNS() + (Greg Roelofs, in "PNG: The Definitive Guide"). + Added makefile.beo for BEOS on X86, contributed by Sander Stok. +version 1.0.3b [August 26, 1999] + Replaced 2147483647L several places with PNG_MAX_UINT macro, defined in png.h + Changed leading blanks to tabs in all makefiles. + Define PNG_USE_PNGVCRD in makefile.w32, to get MMX assembler code. + Made alternate versions of png_set_expand() in pngrtran.c, namely + png_set_gray_1_2_4_to_8, png_set_palette_to_rgb, and png_set_tRNS_to_alpha + (Greg Roelofs, in "PNG: The Definitive Guide"). Deleted the 1.0.3a aliases. + Relocated start of 'extern "C"' block in png.h so it doesn't include pngconf.h + Revised calculation of num_blocks in pngmem.c to avoid a potentially + negative shift distance, whose results are undefined in the C language. + Added a check in pngset.c to prevent writing multiple tIME chunks. + Added a check in pngwrite.c to detect invalid small window_bits sizes. +version 1.0.3d [September 4, 1999] + Fixed type casting of igamma in pngrutil.c + Added new png_expand functions to scripts/pngdef.pas and pngos2.def + Added a demo read_user_transform_fn that examines the row filters in pngtest.c +version 1.0.4 [September 24, 1999] + Define PNG_ALWAYS_EXTERN in pngconf.h if __STDC__ is defined + Delete #define PNG_INTERNAL and include "png.h" from pngasmrd.h + Made several minor corrections to pngtest.c + Renamed the makefiles with longer but more user friendly extensions. + Copied the PNG copyright and license to a separate LICENSE file. + Revised documentation, png.h, and example.c to remove reference to + "viewing_gamma" which no longer appears in the PNG specification. + Revised pngvcrd.c to use MMX code for interlacing only on the final pass. + Updated pngvcrd.c to use the faster C filter algorithms from libpng-1.0.1a + Split makefile.win32vc into two versions, makefile.vcawin32 (uses MMX + assembler code) and makefile.vcwin32 (doesn't). + Added a CPU timing report to pngtest.c (enabled by defining PNGTEST_TIMING) + Added a copy of pngnow.png to the distribution. +version 1.0.4a [September 25, 1999] + Increase max_pixel_depth in pngrutil.c if a user transform needs it. + Changed several division operations to right-shifts in pngvcrd.c +version 1.0.4b [September 30, 1999] + Added parentheses in line 3732 of pngvcrd.c + Added a comment in makefile.linux warning about buggy -O3 in pgcc 2.95.1 +version 1.0.4c [October 1, 1999] + Added a "png_check_version" function in png.c and pngtest.c that will generate + a helpful compiler error if an old png.h is found in the search path. + Changed type of png_user_transform_depth|channels from int to png_byte. +version 1.0.4d [October 6, 1999] + Changed 0.45 to 0.45455 in png_set_sRGB() + Removed unused PLTE entries from pngnow.png + Re-enabled some parts of pngvcrd.c (png_combine_row) that work properly. +version 1.0.4e [October 10, 1999] + Fixed sign error in pngvcrd.c (Greg Roelofs) + Replaced some instances of memcpy with simple assignments in pngvcrd (GR-P) +version 1.0.4f [October 15, 1999] + Surrounded example.c code with #if 0 .. #endif to prevent people from + inadvertently trying to compile it. + Changed png_get_header_version() from a function to a macro in png.h + Added type casting mostly in pngrtran.c and pngwtran.c + Removed some pointless "ptr = NULL" in pngmem.c + Added a "contrib" directory containing the source code from Greg's book. +version 1.0.5 [October 15, 1999] + Minor editing of the INSTALL and README files. +version 1.0.5a [October 23, 1999] + Added contrib/pngsuite and contrib/pngminus (Willem van Schaik) + Fixed a typo in the png_set_sRGB() function call in example.c (Jan Nijtmans) + Further optimization and bugfix of pngvcrd.c + Revised pngset.c so that it does not allocate or free memory in the user's + text_ptr structure. Instead, it makes its own copy. + Created separate write_end_info_struct in pngtest.c for a more severe test. + Added code in pngwrite.c to free info_ptr->text[i].key to stop a memory leak. +version 1.0.5b [November 23, 1999] + Moved PNG_FLAG_HAVE_CHUNK_HEADER, PNG_FLAG_BACKGROUND_IS_GRAY and + PNG_FLAG_WROTE_tIME from flags to mode. + Added png_write_info_before_PLTE() function. + Fixed some typecasting in contrib/gregbook/*.c + Updated scripts/makevms.com and added makevms.com to contrib/gregbook + and contrib/pngminus (Martin Zinser) +version 1.0.5c [November 26, 1999] + Moved png_get_header_version from png.h to png.c, to accomodate ansi2knr. + Removed all global arrays (according to PNG_NO_GLOBAL_ARRAYS macro), to + accomodate making DLL's: Moved usr_png_ver from global variable to function + png_get_header_ver() in png.c. Moved png_sig to png_sig_bytes in png.c and + eliminated use of png_sig in pngwutil.c. Moved the various png_CHNK arrays + into pngtypes.h. Eliminated use of global png_pass arrays. Declared the + png_CHNK and png_pass arrays to be "const". Made the global arrays + available to applications (although none are used in libpng itself) when + PNG_NO_GLOBAL_ARRAYS is not defined or when PNG_GLOBAL_ARRAYS is defined. + Removed some extraneous "-I" from contrib/pngminus/makefile.std + Changed the PNG_sRGB_INTENT macros in png.h to be consistent with PNG-1.2. + Change PNG_SRGB_INTENT to PNG_sRGB_INTENT in libpng.txt and libpng.3 +version 1.0.5d [November 29, 1999] + Add type cast (png_const_charp) two places in png.c + Eliminated pngtypes.h; use macros instead to declare PNG_CHNK arrays. + Renamed "PNG_GLOBAL_ARRAYS" to "PNG_USE_GLOBAL_ARRAYS" and made available + to applications a macro "PNG_USE_LOCAL_ARRAYS". + #ifdef out all the new declarations when PNG_USE_GLOBAL_ARRAYS is defined. + Added PNG_EXPORT_VAR macro to accommodate making DLL's. +version 1.0.5e [November 30, 1999] + Added iCCP, iTXt, and sPLT support; added "lang" member to the png_text + structure; refactored the inflate/deflate support to make adding new chunks + with trailing compressed parts easier in the future, and added new functions + png_free_iCCP, png_free_pCAL, png_free_sPLT, png_free_text, png_get_iCCP, + png_get_spalettes, png_set_iCCP, png_set_spalettes (Eric S. Raymond). + NOTE: Applications that write text chunks MUST define png_text->lang + before calling png_set_text(). It must be set to NULL if you want to + write tEXt or zTXt chunks. If you want your application to be able to + run with older versions of libpng, use + + #ifdef PNG_iTXt_SUPPORTED + png_text[i].lang = NULL; + #endif + + Changed png_get_oFFs() and png_set_oFFs() to use signed rather than unsigned + offsets (Eric S. Raymond). + Combined PNG_READ_cHNK_SUPPORTED and PNG_WRITE_cHNK_SUPPORTED macros into + PNG_cHNK_SUPPORTED and combined the three types of PNG_text_SUPPORTED + macros, leaving the separate macros also available. + Removed comments on #endifs at the end of many short, non-nested #if-blocks. +version 1.0.5f [December 6, 1999] + Changed makefile.solaris to issue a warning about potential problems when + the ucb "ld" is in the path ahead of the ccs "ld". + Removed "- [date]" from the "synopsis" line in libpng.3 and libpngpf.3. + Added sCAL chunk support (Eric S. Raymond). +version 1.0.5g [December 7, 1999] + Fixed "png_free_spallettes" typo in png.h + Added code to handle new chunks in pngpread.c + Moved PNG_CHNK string macro definitions outside of PNG_NO_EXTERN block + Added "translated_key" to png_text structure and png_write_iTXt(). + Added code in pngwrite.c to work around a newly discovered zlib bug. +version 1.0.5h [December 10, 1999] + NOTE: regarding the note for version 1.0.5e, the following must also + be included in your code: + png_text[i].translated_key = NULL; + Unknown chunk handling is now supported. + Option to eliminate all floating point support was added. Some new + fixed-point functions such as png_set_gAMA_fixed() were added. + Expanded tabs and removed trailing blanks in source files. +version 1.0.5i [December 13, 1999] + Added some type casts to silence compiler warnings. + Renamed "png_free_spalette" to "png_free_spalettes" for consistency. + Removed leading blanks from a #define in pngvcrd.c + Added some parameters to the new png_set_keep_unknown_chunks() function. + Added a test for up->location != 0 in the first instance of writing + unknown chunks in pngwrite.c + Changed "num" to "i" in png_free_spalettes() and png_free_unknowns() to + prevent recursion. + Added png_free_hIST() function. + Various patches to fix bugs in the sCAL and integer cHRM processing, + and to add some convenience macros for use with sCAL. +version 1.0.5j [December 21, 1999] + Changed "unit" parameter of png_write_sCAL from png_byte to int, to work + around buggy compilers. + Added new type "png_fixed_point" for integers that hold float*100000 values + Restored backward compatibility of tEXt/zTXt chunk processing: + Restored the first four members of png_text to the same order as v.1.0.5d. + Added members "lang_key" and "itxt_length" to png_text struct. Set + text_length=0 when "text" contains iTXt data. Use the "compression" + member to distinguish among tEXt/zTXt/iTXt types. Added + PNG_ITXT_COMPRESSION_NONE (1) and PNG_ITXT_COMPRESSION_zTXt(2) macros. + The "Note" above, about backward incompatibility of libpng-1.0.5e, no + longer applies. + Fixed png_read|write_iTXt() to read|write parameters in the right order, + and to write the iTXt chunk after IDAT if it appears in the end_ptr. + Added pnggccrd.c, version of pngvcrd.c Intel assembler for gcc (Greg Roelofs) + Reversed the order of trying to write floating-point and fixed-point gAMA. +version 1.0.5k [December 27, 1999] + Added many parentheses, e.g., "if (a && b & c)" becomes "if (a && (b & c))" + Added png_handle_as_unknown() function (Glenn) + Added png_free_chunk_list() function and chunk_list and num_chunk_list members + of png_ptr. + Eliminated erroneous warnings about multiple sPLT chunks and sPLT-after-PLTE. + Fixed a libpng-1.0.5h bug in pngrutil.c that was issuing erroneous warnings + about ignoring incorrect gAMA with sRGB (gAMA was in fact not ignored) + Added png_free_tRNS(); png_set_tRNS() now malloc's its own trans array (ESR). + Define png_get_int_32 when oFFs chunk is supported as well as when pCAL is. + Changed type of proflen from png_int_32 to png_uint_32 in png_get_iCCP(). +version 1.0.5l [January 1, 2000] + Added functions png_set_read_user_chunk_fn() and png_get_user_chunk_ptr() + for setting a callback function to handle unknown chunks and for + retrieving the associated user pointer (Glenn). +version 1.0.5m [January 7, 2000] + Added high-level functions png_read_png(), png_write_png(), png_free_pixels(). +version 1.0.5n [January 9, 2000] + Added png_free_PLTE() function, and modified png_set_PLTE() to malloc its + own memory for info_ptr->palette. This makes it safe for the calling + application to free its copy of the palette any time after it calls + png_set_PLTE(). +version 1.0.5o [January 20, 2000] + Cosmetic changes only (removed some trailing blanks and TABs) +version 1.0.5p [January 31, 2000] + Renamed pngdll.mak to makefile.bd32 + Cosmetic changes in pngtest.c +version 1.0.5q [February 5, 2000] + Relocated the makefile.solaris warning about PATH problems. + Fixed pngvcrd.c bug by pushing/popping registers in mmxsupport (Bruce Oberg) + Revised makefile.gcmmx + Added PNG_SETJMP_SUPPORTED, PNG_SETJMP_NOT_SUPPORTED, and PNG_ABORT() macros +version 1.0.5r [February 7, 2000] + Removed superfluous prototype for png_get_itxt from png.h + Fixed a bug in pngrtran.c that improperly expanded the background color. + Return *num_text=0 from png_get_text() when appropriate, and fix documentation + of png_get_text() in libpng.txt/libpng.3. +version 1.0.5s [February 18, 2000] + Added "png_jmp_env()" macro to pngconf.h, to help people migrate to the + new error handler that's planned for the next libpng release, and changed + example.c, pngtest.c, and contrib programs to use this macro. + Revised some of the DLL-export macros in pngconf.h (Greg Roelofs) + Fixed a bug in png_read_png() that caused it to fail to expand some images + that it should have expanded. + Fixed some mistakes in the unused and undocumented INCH_CONVERSIONS functions + in pngget.c + Changed the allocation of palette, history, and trans arrays back to + the version 1.0.5 method (linking instead of copying) which restores + backward compatibility with version 1.0.5. Added some remarks about + that in example.c. Added "free_me" member to info_ptr and png_ptr + and added png_free_data() function. + Updated makefile.linux and makefile.gccmmx to make directories conditionally. + Made cosmetic changes to pngasmrd.h + Added png_set_rows() and png_get_rows(), for use with png_read|write_png(). + Modified png_read_png() to allocate info_ptr->row_pointers only if it + hasn't already been allocated. +version 1.0.5t [March 4, 2000] + Changed png_jmp_env() migration aiding macro to png_jmpbuf(). + Fixed "interlace" typo (should be "interlaced") in contrib/gregbook/read2-x.c + Fixed bug with use of PNG_BEFORE_IHDR bit in png_ptr->mode, introduced when + PNG_FLAG_HAVE_CHUNK_HEADER was moved into png_ptr->mode in version 1.0.5b + Files in contrib/gregbook were revised to use png_jmpbuf() and to select + a 24-bit visual if one is available, and to allow abbreviated options. + Files in contrib/pngminus were revised to use the png_jmpbuf() macro. + Removed spaces in makefile.linux and makefile.gcmmx, introduced in 1.0.5s +version 1.0.5u [March 5, 2000] + Simplified the code that detects old png.h in png.c and pngtest.c + Renamed png_spalette (_p, _pp) to png_sPLT_t (_tp, _tpp) + Increased precision of rgb_to_gray calculations from 8 to 15 bits and + added png_set_rgb_to_gray_fixed() function. + Added makefile.bc32 (32-bit Borland C++, C mode) +version 1.0.5v [March 11, 2000] + Added some parentheses to the png_jmpbuf macro definition. + Updated references to the zlib home page, which has moved to freesoftware.com. + Corrected bugs in documentation regarding png_read_row() and png_write_row(). + Updated documentation of png_rgb_to_gray calculations in libpng.3/libpng.txt. + Renamed makefile.borland,turboc3 back to makefile.bor,tc3 as in version 1.0.3, + revised borland makefiles; added makefile.ibmvac3 and makefile.gcc (Cosmin) +version 1.0.6 [March 20, 2000] + Minor revisions of makefile.bor, libpng.txt, and gregbook/rpng2-win.c + Added makefile.sggcc (SGI IRIX with gcc) +version 1.0.6d [April 7, 2000] + Changed sprintf() to strcpy() in png_write_sCAL_s() to work without STDIO + Added data_length parameter to png_decompress_chunk() function + Revised documentation to remove reference to abandoned png_free_chnk functions + Fixed an error in png_rgb_to_gray_fixed() + Revised example.c, usage of png_destroy_write_struct(). + Renamed makefile.ibmvac3 to makefile.ibmc, added libpng.icc IBM project file + Added a check for info_ptr->free_me&PNG_FREE_TEXT when freeing text in png.c + Simplify png_sig_bytes() function to remove use of non-ISO-C strdup(). +version 1.0.6e [April 9, 2000] + Added png_data_freer() function. + In the code that checks for over-length tRNS chunks, added check of + info_ptr->num_trans as well as png_ptr->num_trans (Matthias Benckmann) + Minor revisions of libpng.txt/libpng.3. + Check for existing data and free it if the free_me flag is set, in png_set_*() + and png_handle_*(). + Only define PNG_WEIGHTED_FILTERS_SUPPORTED when PNG_FLOATING_POINT_SUPPORTED + is defined. + Changed several instances of PNG_NO_CONSOLE_ID to PNG_NO_STDIO in pngrutil.c + and mentioned the purposes of the two macros in libpng.txt/libpng.3. +version 1.0.6f [April 14, 2000] + Revised png_set_iCCP() and png_set_rows() to avoid prematurely freeing data. + Add checks in png_set_text() for NULL members of the input text structure. + Revised libpng.txt/libpng.3. + Removed superfluous prototype for png_set_itxt from png.h + Removed "else" from pngread.c, after png_error(), and changed "0" to "length". + Changed several png_errors about malformed ancillary chunks to png_warnings. +version 1.0.6g [April 24, 2000] + Added png_pass-* arrays to pnggccrd.c when PNG_USE_LOCAL_ARRAYS is defined. + Relocated paragraph about png_set_background() in libpng.3/libpng.txt + and other revisions (Matthias Benckmann) + Relocated info_ptr->free_me, png_ptr->free_me, and other info_ptr and + png_ptr members to restore binary compatibility with libpng-1.0.5 + (breaks compatibility with libpng-1.0.6). +version 1.0.6h [April 24, 2000] + Changed shared library so-number pattern from 2.x.y.z to xy.z (this builds + libpng.so.10 & libpng.so.10.6h instead of libpng.so.2 & libpng.so.2.1.0.6h) + This is a temporary change for test purposes. +version 1.0.6i [May 2, 2000] + Rearranged some members at the end of png_info and png_struct, to put + unknown_chunks_num and free_me within the original size of the png_structs + and free_me, png_read_user_fn, and png_free_fn within the original png_info, + because some old applications allocate the structs directly instead of + using png_create_*(). + Added documentation of user memory functions in libpng.txt/libpng.3 + Modified png_read_png so that it will use user_allocated row_pointers + if present, unless free_me directs that it be freed, and added description + of the use of png_set_rows() and png_get_rows() in libpng.txt/libpng.3. + Added PNG_LEGACY_SUPPORTED macro, and #ifdef out all new (since version + 1.00) members of png_struct and png_info, to regain binary compatibility + when you define this macro. Capabilities lost in this event + are user transforms (new in version 1.0.0),the user transform pointer + (new in version 1.0.2), rgb_to_gray (new in 1.0.5), iCCP, sCAL, sPLT, + the high-level interface, and unknown chunks support (all new in 1.0.6). + This was necessary because of old applications that allocate the structs + directly as authors were instructed to do in libpng-0.88 and earlier, + instead of using png_create_*(). + Added modes PNG_CREATED_READ_STRUCT and PNG_CREATED_WRITE_STRUCT which + can be used to detect codes that directly allocate the structs, and + code to check these modes in png_read_init() and png_write_init() and + generate a libpng error if the modes aren't set and PNG_LEGACY_SUPPORTED + was not defined. + Added makefile.intel and updated makefile.watcom (Pawel Mrochen) +version 1.0.6j [May 3, 2000] + Overloaded png_read_init() and png_write_init() with macros that convert + calls to png_read_init_2() or png_write_init_2() that check the version + and structure sizes. +version 1.0.7beta11 [May 7, 2000] + Removed the new PNG_CREATED_READ_STRUCT and PNG_CREATED_WRITE_STRUCT modes + which are no longer used. + Eliminated the three new members of png_text when PNG_LEGACY_SUPPORTED is + defined or when neither PNG_READ_iTXt_SUPPORTED nor PNG_WRITE_iTXT_SUPPORTED + is defined. + Made PNG_NO_READ|WRITE_iTXt the default setting, to avoid memory + overrun when old applications fill the info_ptr->text structure directly. + Added PNGAPI macro, and added it to the definitions of all exported functions. + Relocated version macro definitions ahead of the includes of zlib.h and + pngconf.h in png.h. +version 1.0.7beta12 [May 12, 2000] + Revised pngset.c to avoid a problem with expanding the png_debug macro. + Deleted some extraneous defines from pngconf.h + Made PNG_NO_CONSOLE_IO the default condition when PNG_BUILD_DLL is defined. + Use MSC _RPTn debugging instead of fprintf if _MSC_VER is defined. + Added png_access_version_number() function. + Check for mask&PNG_FREE_CHNK (for TEXT, SCAL, PCAL) in png_free_data(). + Expanded libpng.3/libpng.txt information about png_data_freer(). +version 1.0.7beta14 [May 17, 2000] (beta13 was not published) + Changed pnggccrd.c and pngvcrd.c to handle bad adaptive filter types as + warnings instead of errors, as pngrutil.c does. + Set the PNG_INFO_IDAT valid flag in png_set_rows() so png_write_png() + will actually write IDATs. + Made the default PNG_USE_LOCAL_ARRAYS depend on PNG_DLL instead of WIN32. + Make png_free_data() ignore its final parameter except when freeing data + that can have multiple instances (text, sPLT, unknowns). + Fixed a new bug in png_set_rows(). + Removed info_ptr->valid tests from png_free_data(), as in version 1.0.5. + Added png_set_invalid() function. + Fixed incorrect illustrations of png_destroy_write_struct() in example.c. +version 1.0.7beta15 [May 30, 2000] + Revised the deliberately erroneous Linux setjmp code in pngconf.h to produce + fewer error messages. + Rearranged checks for Z_OK to check the most likely path first in pngpread.c + and pngwutil.c. + Added checks in pngtest.c for png_create_*() returning NULL, and mentioned + in libpng.txt/libpng.3 the need for applications to check this. + Changed names of png_default_*() functions in pngtest to pngtest_*(). + Changed return type of png_get_x|y_offset_*() from png_uint_32 to png_int_32. + Fixed some bugs in the unused PNG_INCH_CONVERSIONS functions in pngget.c + Set each pointer to NULL after freeing it in png_free_data(). + Worked around a problem in pngconf.h; AIX's strings.h defines an "index" + macro that conflicts with libpng's png_color_16.index. (Dimitri Papadapoulos) + Added "msvc" directory with MSVC++ project files (Simon-Pierre Cadieux). +version 1.0.7beta16 [June 4, 2000] + Revised the workaround of AIX string.h "index" bug. + Added a check for overlength PLTE chunk in pngrutil.c. + Added PNG_NO_POINTER_INDEXING macro to use array-indexing instead of pointer + indexing in pngrutil.c and pngwutil.c to accommodate a buggy compiler. + Added a warning in png_decompress_chunk() when it runs out of data, e.g. + when it tries to read an erroneous PhotoShop iCCP chunk. + Added PNG_USE_DLL macro. + Revised the copyright/disclaimer/license notice. + Added contrib/msvctest directory +version 1.0.7rc1 [June 9, 2000] + Corrected the definition of PNG_TRANSFORM_INVERT_ALPHA (0x0400 not 0x0200) + Added contrib/visupng directory (Willem van Schaik) +version 1.0.7beta18 [June 23, 2000] + Revised PNGAPI definition, and pngvcrd.c to work with __GCC__ + and do not redefine PNGAPI if it is passed in via a compiler directive. + Revised visupng/PngFile.c to remove returns from within the Try block. + Removed leading underscores from "_PNG_H" and "_PNG_SAVE_BSD_SOURCE" macros. + Updated contrib/visupng/cexcept.h to version 1.0.0. + Fixed bugs in pngwrite.c and pngwutil.c that prevented writing iCCP chunks. +version 1.0.7rc2 [June 28, 2000] + Updated license to include disclaimers required by UCITA. + Fixed "DJBPP" typo in pnggccrd.c introduced in beta18. +version 1.0.7 [July 1, 2000] + Revised the definition of "trans_values" in libpng.3/libpng.txt +version 1.0.8beta1 [July 8, 2000] + Added png_free(png_ptr, key) two places in pngpread.c to stop memory leaks. + Changed PNG_NO_STDIO to PNG_NO_CONSOLE_IO, several places in pngrutil.c and + pngwutil.c. + Changed PNG_EXPORT_VAR to use PNG_IMPEXP, in pngconf.h. + Removed unused "#include " from png.c + Added WindowsCE support. + Revised pnggccrd.c to work with gcc-2.95.2 and in the Cygwin environment. +version 1.0.8beta2 [July 10, 2000] + Added project files to the wince directory and made further revisions + of pngtest.c, pngrio.c, and pngwio.c in support of WindowsCE. +version 1.0.8beta3 [July 11, 2000] + Only set the PNG_FLAG_FREE_TRNS or PNG_FREE_TRNS flag in png_handle_tRNS() + for indexed-color input files to avoid potential double-freeing trans array + under some unusual conditions; problem was introduced in version 1.0.6f. + Further revisions to pngtest.c and files in the wince subdirectory. +version 1.0.8beta4 [July 14, 2000] + Added the files pngbar.png and pngbar.jpg to the distribution. + Added makefile.cygwin, and cygwin support in pngconf.h + Added PNG_NO_ZALLOC_ZERO macro (makes png_zalloc skip zeroing memory) +version 1.0.8rc1 [July 16, 2000] + Revised png_debug() macros and statements to eliminate compiler warnings. +version 1.0.8 [July 24, 2000] + Added png_flush() in pngwrite.c, after png_write_IEND(). + Updated makefile.hpux to build a shared library. +version 1.0.9beta1 [November 10, 2000] + Fixed typo in scripts/makefile.hpux + Updated makevms.com in scripts and contrib/* and contrib/* (Martin Zinser) + Fixed seqence-point bug in contrib/pngminus/png2pnm (Martin Zinser) + Changed "cdrom.com" in documentation to "libpng.org" + Revised pnggccrd.c to get it all working, and updated makefile.gcmmx (Greg). + Changed type of "params" from voidp to png_voidp in png_read|write_png(). + Make sure PNGAPI and PNG_IMPEXP are defined in pngconf.h. + Revised the 3 instances of WRITEFILE in pngtest.c. + Relocated "msvc" and "wince" project subdirectories into "dll" subdirectory. + Updated png.rc in dll/msvc project + Revised makefile.dec to define and use LIBPATH and INCPATH + Increased size of global png_libpng_ver[] array from 12 to 18 chars. + Made global png_libpng_ver[], png_sig[] and png_pass_*[] arrays const. + Removed duplicate png_crc_finish() from png_handle_bKGD() function. + Added a warning when application calls png_read_update_info() multiple times. + Revised makefile.cygwin + Fixed bugs in iCCP support in pngrutil.c and pngwutil.c. + Replaced png_set_empty_plte_permitted() with png_permit_mng_features(). +version 1.0.9beta2 [November 19, 2000] + Renamed the "dll" subdirectory "projects". + Added borland project files to "projects" subdirectory. + Set VS_FF_PRERELEASE and VS_FF_PATCHED flags in msvc/png.rc when appropriate. + Add error message in png_set_compression_buffer_size() when malloc fails. +version 1.0.9beta3 [November 23, 2000] + Revised PNG_LIBPNG_BUILD_TYPE macro in png.h, used in the msvc project. + Removed the png_flush() in pngwrite.c that crashes some applications + that don't set png_output_flush_fn. + Added makefile.macosx and makefile.aix to scripts directory. +version 1.0.9beta4 [December 1, 2000] + Change png_chunk_warning to png_warning in png_check_keyword(). + Increased the first part of msg buffer from 16 to 18 in png_chunk_error(). +version 1.0.9beta5 [December 15, 2000] + Added support for filter method 64 (for PNG datastreams embedded in MNG). +version 1.0.9beta6 [December 18, 2000] + Revised png_set_filter() to accept filter method 64 when appropriate. + Added new PNG_HAVE_PNG_SIGNATURE bit to png_ptr->mode and use it to + help prevent applications from using MNG features in PNG datastreams. + Added png_permit_mng_features() function. + Revised libpng.3/libpng.txt. Changed "filter type" to "filter method". +version 1.0.9rc1 [December 23, 2000] + Revised test for PNG_HAVE_PNG_SIGNATURE in pngrutil.c + Fixed error handling of unknown compression type in png_decompress_chunk(). + In pngconf.h, define __cdecl when _MSC_VER is defined. +version 1.0.9beta7 [December 28, 2000] + Changed PNG_TEXT_COMPRESSION_zTXt to PNG_COMPRESSION_TYPE_BASE several places. + Revised memory management in png_set_hIST and png_handle_hIST in a backward + compatible manner. PLTE and tRNS were revised similarly. + Revised the iCCP chunk reader to ignore trailing garbage. +version 1.0.9beta8 [January 12, 2001] + Moved pngasmrd.h into pngconf.h. + Improved handling of out-of-spec garbage iCCP chunks generated by PhotoShop. +version 1.0.9beta9 [January 15, 2001] + Added png_set_invalid, png_permit_mng_features, and png_mmx_supported to + wince and msvc project module definition files. + Minor revision of makefile.cygwin. + Fixed bug with progressive reading of narrow interlaced images in pngpread.c +version 1.0.9beta10 [January 16, 2001] + Do not typedef png_FILE_p in pngconf.h when PNG_NO_STDIO is defined. + Fixed "png_mmx_supported" typo in project definition files. +version 1.0.9beta11 [January 19, 2001] + Updated makefile.sgi to make shared library. + Removed png_mmx_support() function and disabled PNG_MNG_FEATURES_SUPPORTED + by default, for the benefit of DLL forward compatibility. These will + be re-enabled in version 1.2.0. +version 1.0.9rc2 [January 22, 2001] + Revised cygwin support. +version 1.0.9 [January 31, 2001] + Added check of cygwin's ALL_STATIC in pngconf.h + Added "-nommx" parameter to contrib/gregbook/rpng2-win and rpng2-x demos. +version 1.0.10beta1 [March 14, 2001] + Revised makefile.dec, makefile.sgi, and makefile.sggcc; added makefile.hpgcc. + Reformatted libpng.3 to eliminate bad line breaks. + Added checks for _mmx_supported in the read_filter_row function of pnggccrd.c + Added prototype for png_mmx_support() near the top of pnggccrd.c + Moved some error checking from png_handle_IHDR to png_set_IHDR. + Added PNG_NO_READ_SUPPORTED and PNG_NO_WRITE_SUPPORTED macros. + Revised png_mmx_support() function in pnggccrd.c + Restored version 1.0.8 PNG_WRITE_EMPTY_PLTE_SUPPORTED behavior in pngwutil.c + Fixed memory leak in contrib/visupng/PngFile.c + Fixed bugs in png_combine_row() in pnggccrd.c and pngvcrd.c (C version) + Added warnings when retrieving or setting gamma=0. + Increased the first part of msg buffer from 16 to 18 in png_chunk_warning(). +version 1.0.10rc1 [March 23, 2001] + Changed all instances of memcpy, strcpy, and strlen to png_memcpy, png_strcpy, + and png_strlen. + Revised png_mmx_supported() function in pnggccrd.c to return proper value. + Fixed bug in progressive reading (pngpread.c) with small images (height < 8). +version 1.0.10 [March 30, 2001] + Deleted extraneous space (introduced in 1.0.9) from line 42 of makefile.cygwin + Added beos project files (Chris Herborth) +version 1.0.11beta1 [April 3, 2001] + Added type casts on several png_malloc() calls (Dimitri Papadapoulos). + Removed a no-longer needed AIX work-around from pngconf.h + Changed several "//" single-line comments to C-style in pnggccrd.c +version 1.0.11beta2 [April 11, 2001] + Removed PNGAPI from several functions whose prototypes did not have PNGAPI. + Updated scripts/pngos2.def +version 1.0.11beta3 [April 14, 2001] + Added checking the results of many instances of png_malloc() for NULL +version 1.0.11beta4 [April 20, 2001] + Undid the changes from version 1.0.11beta3. Added a check for NULL return + from user's malloc_fn(). + Removed some useless type casts of the NULL pointer. + Added makefile.netbsd +version 1.0.11 [April 27, 2001] + Revised makefile.netbsd +version 1.0.12beta1 [May 14, 2001] + Test for Windows platform in pngconf.h when including malloc.h (Emmanuel Blot) + Updated makefile.cygwin and handling of Cygwin's ALL_STATIC in pngconf.h + Added some never-to-be-executed code in pnggccrd.c to quiet compiler warnings. + Eliminated the png_error about apps using png_read|write_init(). Instead, + libpng will reallocate the png_struct and info_struct if they are too small. + This retains future binary compatibility for old applications written for + libpng-0.88 and earlier. +version 1.2.0beta1 [May 6, 2001] + Bumped DLLNUM to 2. + Re-enabled PNG_MNG_FEATURES_SUPPORTED and enabled PNG_ASSEMBLER_CODE_SUPPORTED + by default. + Added runtime selection of MMX features. + Added png_set_strip_error_numbers function and related macros. +version 1.2.0beta2 [May 7, 2001] + Finished merging 1.2.0beta1 with version 1.0.11 + Added a check for attempts to read or write PLTE in grayscale PNG datastreams. +version 1.2.0beta3 [May 17, 2001] + Enabled user memory function by default. + Modified png_create_struct so it passes user mem_ptr to user memory allocator. + Increased png_mng_features flag from png_byte to png_uint_32. + Bumped shared-library (so-number) and dll-number to 3. +version 1.2.0beta4 [June 23, 2001] + Check for missing profile length field in iCCP chunk and free chunk_data + in case of truncated iCCP chunk. + Bumped shared-library number to 3 in makefile.sgi and makefile.sggcc + Bumped dll-number from 2 to 3 in makefile.cygwin + Revised contrib/gregbook/rpng*-x.c to avoid a memory leak and to exit cleanly + if user attempts to run it on an 8-bit display. + Updated contrib/gregbook + Use png_malloc instead of png_zalloc to allocate palette in pngset.c + Updated makefile.ibmc + Added some typecasts to eliminate gcc 3.0 warnings. Changed prototypes + of png_write_oFFS width and height from png_uint_32 to png_int_32. + Updated example.c + Revised prototypes for png_debug_malloc and png_debug_free in pngtest.c +version 1.2.0beta5 [August 8, 2001] + Revised contrib/gregbook + Revised makefile.gcmmx + Revised pnggccrd.c to conditionally compile some thread-unsafe code only + when PNG_THREAD_UNSAFE_OK is defined. + Added tests to prevent pngwutil.c from writing a bKGD or tRNS chunk with + value exceeding 2^bit_depth-1 + Revised makefile.sgi and makefile.sggcc + Replaced calls to fprintf(stderr,...) with png_warning() in pnggccrd.c + Removed restriction that do_invert_mono only operate on 1-bit opaque files +version 1.2.0 [September 1, 2001] + Changed a png_warning() to png_debug() in pnggccrd.c + Fixed contrib/gregbook/rpng-x.c, rpng2-x.c to avoid crash with XFreeGC(). +version 1.2.1beta1 [October 19, 2001] + Revised makefile.std in contrib/pngminus + Include background_1 in png_struct regardless of gamma support. + Revised makefile.netbsd and makefile.macosx, added makefile.darwin. + Revised example.c to provide more details about using row_callback(). +version 1.2.1beta2 [October 25, 2001] + Added type cast to each NULL appearing in a function call, except for + WINCE functions. + Added makefile.so9. +version 1.2.1beta3 [October 27, 2001] + Removed type casts from all NULLs. + Simplified png_create_struct_2(). +version 1.2.1beta4 [November 7, 2001] + Revised png_create_info_struct() and png_creat_struct_2(). + Added error message if png_write_info() was omitted. + Type cast NULLs appearing in function calls when _NO_PROTO or + PNG_TYPECAST_NULL is defined. +version 1.2.1rc1 [November 24, 2001] + Type cast NULLs appearing in function calls except when PNG_NO_TYPECAST_NULL + is defined. + Changed typecast of "size" argument to png_size_t in pngmem.c calls to + the user malloc_fn, to agree with the prototype in png.h + Added a pop/push operation to pnggccrd.c, to preserve Eflag (Maxim Sobolev) + Updated makefile.sgi to recognize LIBPATH and INCPATH. + Updated various makefiles so "make clean" does not remove previous major + version of the shared library. +version 1.2.1rc2 [December 4, 2001] + Always allocate 256-entry internal palette, hist, and trans arrays, to + avoid out-of-bounds memory reference caused by invalid PNG datastreams. + Added a check for prefix_length > data_length in iCCP chunk handler. +version 1.2.1 [December 7, 2001] + None. +version 1.2.2beta1 [February 22, 2002] + Fixed a bug with reading the length of iCCP profiles (Larry Reeves). + Revised makefile.linux, makefile.gcmmx, and makefile.sgi to generate + libpng.a, libpng12.so (not libpng.so.3), and libpng12/png.h + Revised makefile.darwin to remove "-undefined suppress" option. + Added checks for gamma and chromaticity values over 21474.83, which exceed + the limit for PNG unsigned 32-bit integers when encoded. + Revised calls to png_create_read_struct() and png_create_write_struct() + for simpler debugging. + Revised png_zalloc() so zlib handles errors (uses PNG_FLAG_MALLOC_NULL_MEM_OK) +version 1.2.2beta2 [February 23, 2002] + Check chunk_length and idat_size for invalid (over PNG_MAX_UINT) lengths. + Check for invalid image dimensions in png_get_IHDR. + Added missing "fi;" in the install target of the SGI makefiles. + Added install-static to all makefiles that make shared libraries. + Always do gamma compensation when image is partially transparent. +version 1.2.2beta3 [March 7, 2002] + Compute background.gray and background_1.gray even when color_type is RGB + in case image gets reduced to gray later. + Modified shared-library makefiles to install pkgconfig/libpngNN.pc. + Export (with PNGAPI) png_zalloc, png_zfree, and png_handle_as_unknown + Removed unused png_write_destroy_info prototype from png.h + Eliminated incorrect use of width_mmx from pnggccrd.c in pixel_bytes == 8 case + Added install-shared target to all makefiles that make shared libraries. + Stopped a double free of palette, hist, and trans when not using free_me. + Added makefile.32sunu for Sun Ultra 32 and makefile.64sunu for Sun Ultra 64. +version 1.2.2beta4 [March 8, 2002] + Compute background.gray and background_1.gray even when color_type is RGB + in case image gets reduced to gray later (Jason Summers). + Relocated a misplaced /bin/rm in the "install-shared" makefile targets + Added PNG_1_0_X macro which can be used to build a 1.0.x-compatible library. +version 1.2.2beta5 [March 26, 2002] + Added missing PNGAPI to several function definitions. + Check for invalid bit_depth or color_type in png_get_IHDR(), and + check for missing PLTE or IHDR in png_push_read_chunk() (Matthias Clasen). + Revised iTXt support to accept NULL for lang and lang_key. + Compute gamma for color components of background even when color_type is gray. + Changed "()" to "{}" in scripts/libpng.pc.in. + Revised makefiles to put png.h and pngconf.h only in $prefix/include/libpngNN + Revised makefiles to make symlink to libpng.so.NN in addition to libpngNN.so +version 1.2.2beta6 [March 31, 2002] +version 1.0.13beta1 [March 31, 2002] + Prevent png_zalloc() from trying to memset memory that it failed to acquire. + Add typecasts of PNG_MAX_UINT in pngset_cHRM_fixed() (Matt Holgate). + Ensure that the right function (user or default) is used to free the + png_struct after an error in png_create_read_struct_2(). +version 1.2.2rc1 [April 7, 2002] +version 1.0.13rc1 [April 7, 2002] + Save the ebx register in pnggccrd.c (Sami Farin) + Add "mem_ptr = png_ptr->mem_ptr" in png_destroy_write_struct() (Paul Gardner). + Updated makefiles to put headers in include/libpng and remove old include/*.h. +version 1.2.2 [April 15, 2002] +version 1.0.13 [April 15, 2002] + Revised description of png_set_filter() in libpng.3/libpng.txt. + Revised makefile.netbsd and added makefile.neNNbsd and makefile.freebsd +version 1.0.13patch01 [April 17, 2002] +version 1.2.2patch01 [April 17, 2002] + Changed ${PNGMAJ}.${PNGVER} bug to ${PNGVER} in makefile.sgi and makefile.sggcc + Fixed VER -> PNGVER typo in makefile.macosx and added install-static to install + Added install: target to makefile.32sunu and makefile.64sunu +version 1.0.13patch03 [April 18, 2002] +version 1.2.2patch03 [April 18, 2002] + Revised 15 makefiles to link libpng.a to libpngNN.a and the include libpng + subdirectory to libpngNN subdirectory without the full pathname. + Moved generation of libpng.pc from "install" to "all" in 15 makefiles. +version 1.2.3rc1 [April 28, 2002] + Added install-man target to 15 makefiles (Dimitri Papadopolous-Orfanos). + Added $(DESTDIR) feature to 24 makefiles (Tim Mooney) + Fixed bug with $prefix, should be $(prefix) in makefile.hpux. + Updated cygwin-specific portion of pngconf.h and revised makefile.cygwin + Added a link from libpngNN.pc to libpng.pc in 15 makefiles. + Added links from include/libpngNN/*.h to include/*.h in 24 makefiles. + Revised makefile.darwin to make relative links without full pathname. + Added setjmp() at the end of png_create_*_struct_2() in case user forgets + to put one in their application. + Restored png_zalloc() and png_zfree() prototypes to version 1.2.1 and + removed them from module definition files. +version 1.2.3rc2 [May 1, 2002] + Fixed bug in reporting number of channels in pngget.c and pngset.c, + that was introduced in version 1.2.2beta5. + Exported png_zalloc(), png_zfree(), png_default_read(), png_default_write(), + png_default_flush(), and png_push_fill_buffer() and included them in + module definition files. + Added "libpng.pc" dependency to the "install-shared" target in 15 makefiles. +version 1.2.3rc3 [May 1, 2002] + Revised prototype for png_default_flush() + Remove old libpng.pc and libpngNN.pc before installing new ones. +version 1.2.3rc4 [May 2, 2002] + Typos in *.def files (png_default_read|write -> png_default_read|write_data) + In makefiles, changed rm libpng.NN.pc to rm libpngNN.pc + Added libpng-config and libpngNN-config and modified makefiles to install them. + Changed $(MANPATH) to $(DESTDIR)$(MANPATH) in makefiles + Added "Win32 DLL VB" configuration to projects/msvc/libpng.dsp +version 1.2.3rc5 [May 11, 2002] + Changed "error" and "message" in prototypes to "error_message" and + "warning_message" to avoid namespace conflict. + Revised 15 makefiles to build libpng-config from libpng-config-*.in + Once more restored png_zalloc and png_zfree to regular nonexported form. + Restored png_default_read|write_data, png_default_flush, png_read_fill_buffer + to nonexported form, but with PNGAPI, and removed them from module def files. +version 1.2.3rc6 [May 14, 2002] + Removed "PNGAPI" from png_zalloc() and png_zfree() in png.c + Changed "Gz" to "Gd" in projects/msvc/libpng.dsp and zlib.dsp. + Removed leftover libpng-config "sed" script from four makefiles. + Revised libpng-config creating script in 16 makefiles. +version 1.2.3 [May 22, 2002] + Revised libpng-config target in makefile.cygwin. + Removed description of png_set_mem_fn() from documentation. + Revised makefile.freebsd. + Minor cosmetic changes to 15 makefiles, e.g., $(DI) = $(DESTDIR)/$(INCDIR). + Revised projects/msvc/README.txt + Changed -lpng to -lpngNN in LDFLAGS in several makefiles. +version 1.2.4beta1 [May 24, 2002] + Added libpng.pc and libpng-config to "all:" target in 16 makefiles. + Fixed bug in 16 makefiles: $(DESTDIR)/$(LIBPATH) to $(DESTDIR)$(LIBPATH) + Added missing "\" before closing double quote in makefile.gcmmx. + Plugged various memory leaks; added png_malloc_warn() and png_set_text_2() + functions. +version 1.2.4beta2 [June 25, 2002] + Plugged memory leak of png_ptr->current_text (Matt Holgate). + Check for buffer overflow before reading CRC in pngpread.c (Warwick Allison) + Added -soname to the loader flags in makefile.dec, makefile.sgi, and + makefile.sggcc. + Added "test-installed" target to makefile.linux, makefile.gcmmx, + makefile.sgi, and makefile.sggcc. +version 1.2.4beta3 [June 28, 2002] + Plugged memory leak of row_buf in pngtest.c when there is a png_error(). + Detect buffer overflow in pngpread.c when IDAT is corrupted with extra data. + Added "test-installed" target to makefile.32sunu, makefile.64sunu, + makefile.beos, makefile.darwin, makefile.dec, makefile.macosx, + makefile.solaris, makefile.hpux, makefile.hpgcc, and makefile.so9. +version 1.2.4rc1 and 1.0.14rc1 [July 2, 2002] + Added "test-installed" target to makefile.cygwin and makefile.sco. + Revised pnggccrd.c to be able to back out version 1.0.x via PNG_1_0_X macro. +version 1.2.4 and 1.0.14 [July 8, 2002] + Changed png_warning() to png_error() when width is too large to process. +version 1.2.4patch01 [July 20, 2002] + Revised makefile.cygwin to use DLL number 12 instead of 13. +version 1.2.5beta1 [August 6, 2002] + Added code to contrib/gregbook/readpng2.c to ignore unused chunks. + Replaced toucan.png in contrib/gregbook (it has been corrupt since 1.0.11) + Removed some stray *.o files from contrib/gregbook. + Changed png_error() to png_warning() about "Too much data" in pngpread.c + and about "Extra compressed data" in pngrutil.c. + Prevent png_ptr->pass from exceeding 7 in png_push_finish_row(). + Updated makefile.hpgcc + Updated png.c and pnggccrd.c handling of return from png_mmx_support() +version 1.2.5beta2 [August 15, 2002] + Only issue png_warning() about "Too much data" in pngpread.c when avail_in + is nonzero. + Updated makefiles to install a separate libpng.so.3 with its own rpath. +version 1.2.5rc1 and 1.0.15rc1 [August 24, 2002] + Revised makefiles to not remove previous minor versions of shared libraries. +version 1.2.5rc2 and 1.0.15rc2 [September 16, 2002] + Revised 13 makefiles to remove "-lz" and "-L$(ZLIBLIB)", etc., from shared + library loader directive. + Added missing "$OBJSDLL" line to makefile.gcmmx. + Added missing "; fi" to makefile.32sunu. +version 1.2.5rc3 and 1.0.15rc3 [September 18, 2002] + Revised libpng-config script. +version 1.2.5 and 1.0.15 [October 3, 2002] + Revised makefile.macosx, makefile.darwin, makefile.hpgcc, and makefile.hpux, + and makefile.aix. + Relocated two misplaced PNGAPI lines in pngtest.c + +Send comments/corrections/commendations to +png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu + +Glenn R-P diff --git a/gtkmm-osx/libpng-1.2.5/INSTALL b/gtkmm-osx/libpng-1.2.5/INSTALL new file mode 100644 index 0000000..1d6dfc5 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/INSTALL @@ -0,0 +1,151 @@ + +Installing libpng version 1.2.5 - October 3, 2002 + +Before installing libpng, you must first install zlib. zlib +can usually be found wherever you got libpng. zlib can be +placed in another directory, at the same level as libpng. +Note that your system might already have a preinstalled +zlib, but you will still need to have access to the +zlib.h and zconf.h include files that correspond to the +version of zlib that's installed. + +You can rename the directories that you downloaded (they +might be called "libpng-1.2.5" or "lpng109" and "zlib-1.1.4" +or "zlib114") so that you have directories called "zlib" and "libpng". + +Your directory structure should look like this: + + .. (the parent directory) + libpng (this directory) + INSTALL (this file) + README + *.h + *.c + contrib + gregbook + msvctest + pngminus + pngsuite + visupng + projects + beos + borland + msvc + netware.txt + wince.txt + scripts + makefile.* + libpng*.in + pngtest.png + etc. + zlib + README + *.h + *.c + contrib + etc. + +If the line endings in the files look funny, you may wish to get the other +distribution of libpng. It is available in both tar.gz (UNIX style line +endings) and zip (DOS style line endings) formats. + +If you are building libpng with MSVC, you can enter the libpng\msvc directory +and follow the instructions in msvc\README.txt. + +You can build libpng for WindowsCE by entering the downloading and installing +the libpng\wince directory as instructed in the projects\wince.txt file, and +then following the instructions in the README* files. Similarly, you can +build libpng for Netware as instructed in projects\netware.txt. + +Else enter the zlib directory and follow the instructions in zlib/README, +then come back here and choose the appropriate makefile.sys in the scripts +directory. + +The files that are presently available in the scripts directory +include + + makefile.std => Generic UNIX makefile (cc, creates static libpng.a) + makefile.linux => Linux/ELF makefile (gcc, creates libpng12.so.0.1.2.5) + makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng12.so.0.1.2.5, + uses assembler code tuned for Intel MMX platform) + makefile.gcc => Generic makefile (gcc, creates static libpng.a) + makefile.knr => Archaic UNIX Makefile that converts files with + ansi2knr (Requires ansi2knr.c from + ftp://ftp.cs.wisc.edu/ghost) + makefile.aix => AIX/gcc makefile + makefile.cygwin => Cygwin/gcc makefile + makefile.darwin => Darwin makefile + makefile.dec => DEC Alpha UNIX makefile + makefile.hpgcc => FreeBSD makefile + makefile.hpgcc => HPUX makefile using gcc + makefile.hpux => HPUX (10.20 and 11.00) makefile + makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static) + makefile.intel => Intel C/C++ version 4.0 and later + libpng.icc => Project file for IBM VisualAge/C++ version 4.0 or later + makefile.macosx => MACOS X Makefile + makefile.netbsd => NetBSD/cc makefile, uses PNGGCCRD, makes libpng.so. + makefile.ne0bsd => NetBSD/cc makefile, uses PNGGCCRD, makes libpng0.so + makefile.openbsd => OpenBSD makefile + makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib) + makefile.sggcc => Silicon Graphics (gcc, creates libpng12.so.0.1.2.5) + makefile.sunos => Sun makefile + makefile.solaris => Solaris 2.X makefile (gcc, creates libpng12.so.0.1.2.5) + makefile.so9 => Solaris 9 makefile (gcc, creates libpng12.so.0.1.2.5) + makefile.32sunu => Sun Ultra 32-bit makefile + makefile.64sunu => Sun Ultra 64-bit makefile + makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc + makefile.mips => MIPS makefile + makefile.acorn => Acorn makefile + makefile.amiga => Amiga makefile + smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC compiler + (Requires SCOPTIONS, copied from scripts/SCOPTIONS.ppc) + makefile.atari => Atari makefile + makefile.beos => BEOS makefile for X86 + makefile.bor => Borland makefile (uses bcc) + makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode) + makefile.bd32 => To make a png32bd.dll with Borland C++ 4.5 + makefile.tc3 => Turbo C 3.0 makefile + makefile.dj2 => DJGPP 2 makefile + makefile.msc => Microsoft C makefile + makefile.vcawin32 => makefile for Microsoft Visual C++ 5.0 and later (uses + assembler code tuned for Intel MMX platform) + makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and later (does + not use assembler code) + makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def) + pngos2.def => OS/2 module definition file used by makefile.os2 + makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model + makevms.com => VMS build script + descrip.mms => VMS makefile for MMS or MMK + pngdef.pas => Defines for a png32bd.dll with Borland C++ 4.5 + SCOPTIONS.ppc => Used with smakefile.ppc + +Copy the file (or files) that you need from the +scripts directory into this directory, for example + + MSDOS example: copy scripts\makefile.msc makefile + UNIX example: cp scripts/makefile.std makefile + +Read the makefile to see if you need to change any source or +target directories to match your preferences. + +Then read pngconf.h to see if you want to make any configuration +changes. + +Then just run "make test" which will create the libpng library in +this directory and run a quick test that reads the "pngtest.png" +file and writes a "pngout.png" file that should be identical to it. +Look for "9782 zero samples" in the output of the test. For more +confidence, you can run another test by typing "pngtest pngnow.png" +and looking for "289 zero samples" in the output. Also, you can +run "pngtest -m *.png" in the "contrib/pngsuite" directory and compare +your output with the result shown in contrib/pngsuite/README. + +Most of the makefiles will allow you to run "make install" to +put the library in its final resting place (if you want to +do that, run "make install" in the zlib directory first if necessary). +Some also allow you to run "make test-installed" after you have +run "make install". + +Further information can be found in the README and libpng.txt +files, in the individual makefiles, in png.h, in the README files in +subdirectories of the LIB directory, and the manual pages libpng.3 and png.5. diff --git a/gtkmm-osx/libpng-1.2.5/KNOWNBUG b/gtkmm-osx/libpng-1.2.5/KNOWNBUG new file mode 100644 index 0000000..3b81a6a --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/KNOWNBUG @@ -0,0 +1,11 @@ + +Known bugs in libpng version 1.2.5 + +1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when + reading interlaced PNG files, when assembler code is enabled but running + on a non-MMX i386 platform. + + STATUS: Under investigation. The change to pnggccrd.c in libpng-1.2.1 + fixed a problem under FreeBSD but not the problem with NetBSD, which + still fails as of libpng-1.2.2rc1. + diff --git a/gtkmm-osx/libpng-1.2.5/LICENSE b/gtkmm-osx/libpng-1.2.5/LICENSE new file mode 100644 index 0000000..28b3b66 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/LICENSE @@ -0,0 +1,102 @@ + +This copy of the libpng notices is provided for your convenience. In case of +any discrepancy between this copy and the notices in the file png.h that is +included in the libpng distribution, the latter shall prevail. + +COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: + +If you modify libpng you may insert additional notices immediately following +this sentence. + +libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are +Copyright (c) 2000-2002 Glenn Randers-Pehrson +and are distributed according to the same disclaimer and license as libpng-1.0.6 +with the following individuals added to the list of Contributing Authors + + Simon-Pierre Cadieux + Eric S. Raymond + Gilles Vollant + +and with the following additions to the disclaimer: + + There is no warranty against interference with your enjoyment of the + library or against infringement. There is no warranty that our + efforts or the library will fulfill any of your particular purposes + or needs. This library is provided with all faults, and the entire + risk of satisfactory quality, performance, accuracy, and effort is with + the user. + +libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-0.96, +with the following individuals added to the list of Contributing Authors: + + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik + +libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996, 1997 Andreas Dilger +Distributed according to the same disclaimer and license as libpng-0.88, +with the following individuals added to the list of Contributing Authors: + + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner + +libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. + +For the purposes of this copyright and license, "Contributing Authors" +is defined as the following set of individuals: + + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner + +The PNG Reference Library is supplied "AS IS". The Contributing Authors +and Group 42, Inc. disclaim all warranties, expressed or implied, +including, without limitation, the warranties of merchantability and of +fitness for any purpose. The Contributing Authors and Group 42, Inc. +assume no liability for direct, indirect, incidental, special, exemplary, +or consequential damages, which may result from the use of the PNG +Reference Library, even if advised of the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute this +source code, or portions hereof, for any purpose, without fee, subject +to the following restrictions: + +1. The origin of this source code must not be misrepresented. + +2. Altered versions must be plainly marked as such and must not + be misrepresented as being the original source. + +3. This Copyright notice may not be removed or altered from any + source or altered source distribution. + +The Contributing Authors and Group 42, Inc. specifically permit, without +fee, and encourage the use of this source code as a component to +supporting the PNG file format in commercial products. If you use this +source code in a product, acknowledgment is not required but would be +appreciated. + + +A "png_get_copyright" function is available, for convenient use in "about" +boxes and the like: + + printf("%s",png_get_copyright(NULL)); + +Also, the PNG logo (in PNG format, of course) is supplied in the +files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). + +Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a +certification mark of the Open Source Initiative. + +Glenn Randers-Pehrson +randeg@alum.rpi.edu +October 3, 2002 diff --git a/gtkmm-osx/libpng-1.2.5/README b/gtkmm-osx/libpng-1.2.5/README new file mode 100644 index 0000000..1991908 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/README @@ -0,0 +1,269 @@ +README for libpng 1.2.5 - October 3, 2002 (shared library 12.0) +See the note about version numbers near the top of png.h + +See INSTALL for instructions on how to install libpng. + +Libpng comes in two distribution formats. Get libpng-*.tar.gz if you +want UNIX-style line endings in the text files, or lpng*.zip if you want +DOS-style line endings. + +Version 0.89 was the first official release of libpng. Don't let the +fact that it's the first release fool you. The libpng library has been in +extensive use and testing since mid-1995. By late 1997 it had +finally gotten to the stage where there hadn't been significant +changes to the API in some time, and people have a bad feeling about +libraries with versions < 1.0. Version 1.0.0 was released in +March 1998. + +**** +Note that some of the changes to the png_info structure render this +version of the library binary incompatible with libpng-0.89 or +earlier versions if you are using a shared library. The type of the +"filler" parameter for png_set_filler() has changed from png_byte to +png_uint_32, which will affect shared-library applications that use +this function. + +To avoid problems with changes to the internals of png_info_struct, +new APIs have been made available in 0.95 to avoid direct application +access to info_ptr. These functions are the png_set_ and +png_get_ functions. These functions should be used when +accessing/storing the info_struct data, rather than manipulating it +directly, to avoid such problems in the future. + +It is important to note that the APIs do not make current programs +that access the info struct directly incompatible with the new +library. However, it is strongly suggested that new programs use +the new APIs (as shown in example.c and pngtest.c), and older programs +be converted to the new format, to facilitate upgrades in the future. +**** + +Additions since 0.90 include the ability to compile libpng as a +Windows DLL, and new APIs for accessing data in the info struct. +Experimental functions include the ability to set weighting and cost +factors for row filter selection, direct reads of integers from buffers +on big-endian processors that support misaligned data access, faster +methods of doing alpha composition, and more accurate 16->8 bit color +conversion. + +The additions since 0.89 include the ability to read from a PNG stream +which has had some (or all) of the signature bytes read by the calling +application. This also allows the reading of embedded PNG streams that +do not have the PNG file signature. As well, it is now possible to set +the library action on the detection of chunk CRC errors. It is possible +to set different actions based on whether the CRC error occurred in a +critical or an ancillary chunk. + +The changes made to the library, and bugs fixed are based on discussions +on the PNG implementation mailing list +and not on material submitted privately to Guy, Andreas, or Glenn. They will +forward any good suggestions to the list. + +For a detailed description on using libpng, read libpng.txt. For +examples of libpng in a program, see example.c and pngtest.c. For usage +information and restrictions (what little they are) on libpng, see +png.h. For a description on using zlib (the compression library used by +libpng) and zlib's restrictions, see zlib.h + +I have included a general makefile, as well as several machine and +compiler specific ones, but you may have to modify one for your own needs. + +You should use zlib 1.0.4 or later to run this, but it MAY work with +versions as old as zlib 0.95. Even so, there are bugs in older zlib +versions which can cause the output of invalid compression streams for +some images. You will definitely need zlib 1.0.4 or later if you are +taking advantage of the MS-DOS "far" structure allocation for the small +and medium memory models. You should also note that zlib is a +compression library that is useful for more things than just PNG files. +You can use zlib as a drop-in replacement for fread() and fwrite() if +you are so inclined. + +zlib should be available at the same place that libpng is. +If not, it should be at ftp.uu.net in /graphics/png +Eventually, it will be at ftp.uu.net in /pub/archiving/zip/zlib + +You may also want a copy of the PNG specification. It is available +as an RFC and a W3C Recommendation. Failing +these resources you can try ftp.uu.net in the /graphics/png directory. + +This code is currently being archived at ftp.uu.net in the +/graphics/png directory, and on CompuServe, Lib 20 (PNG SUPPORT) +at GO GRAPHSUP. If you can't find it in any of those places, +e-mail me, and I'll help you find it. + +If you have any code changes, requests, problems, etc., please e-mail +them to me. Also, I'd appreciate any make files or project files, +and any modifications you needed to make to get libpng to compile, +along with a #define variable to tell what compiler/system you are on. +If you needed to add transformations to libpng, or wish libpng would +provide the image in a different way, drop me a note (and code, if +possible), so I can consider supporting the transformation. +Finally, if you get any warning messages when compiling libpng +(note: not zlib), and they are easy to fix, I'd appreciate the +fix. Please mention "libpng" somewhere in the subject line. Thanks. + +This release was created and will be supported by myself (of course +based in a large way on Guy's and Andreas' earlier work), and the PNG group. + +randeg@alum.rpi.edu +png-implement@ccrc.wustl.edu + +You can't reach Guy, the original libpng author, at the addresses +given in previous versions of this document. He and Andreas will read mail +addressed to the png-implement list, however. + +Please do not send general questions about PNG. Send them to +the address in the specification (png-group@w3.org). At the same +time, please do not send libpng questions to that address, send them to me +or to png-implement@ccrc.wustl.edu. I'll +get them in the end anyway. If you have a question about something +in the PNG specification that is related to using libpng, send it +to me. Send me any questions that start with "I was using libpng, +and ...". If in doubt, send questions to me. I'll bounce them +to others, if necessary. + +Please do not send suggestions on how to change PNG. We have +been discussing PNG for three years now, and it is official and +finished. If you have suggestions for libpng, however, I'll +gladly listen. Even if your suggestion is not used for version +1.0, it may be used later. + +Files in this distribution: + + ANNOUNCE => Announcement of this version, with recent changes + CHANGES => Description of changes between libpng versions + KNOWNBUG => List of known bugs and deficiencies + LICENSE => License to use and redistribute libpng + README => This file + TODO => Things not implemented in the current library + Y2KINFO => Statement of Y2K compliance + example.c => Example code for using libpng functions + libpng.3 => manual page for libpng (includes libpng.txt) + libpng.txt => Description of libpng and its functions + libpngpf.3 => manual page for libpng's private functions + png.5 => manual page for the PNG format + png.c => Basic interface functions common to library + png.h => Library function and interface declarations + pngconf.h => System specific library configuration + pngasmrd.h => Header file for assembler-coded functions + pngerror.c => Error/warning message I/O functions + pngget.c => Functions for retrieving info from struct + pngmem.c => Memory handling functions + pngbar.png => PNG logo, 88x31 + pngnow.png => PNG logo, 98x31 + pngpread.c => Progressive reading functions + pngread.c => Read data/helper high-level functions + pngrio.c => Lowest-level data read I/O functions + pngrtran.c => Read data transformation functions + pngrutil.c => Read data utility functions + pngset.c => Functions for storing data into the info_struct + pngtest.c => Library test program + pngtest.png => Library test sample image + pngtrans.c => Common data transformation functions + pngwio.c => Lowest-level write I/O functions + pngwrite.c => High-level write functions + pngwtran.c => Write data transformations + pngwutil.c => Write utility functions + contrib => Contributions + gregbook => source code for PNG reading and writing, from + Greg Roelofs' "PNG: The Definitive Guide", + O'Reilly, 1999 + msvctest => Builds and runs pngtest using a MSVC workspace + pngminus => Simple pnm2png and png2pnm programs + pngsuite => Test images + visupng => Contains a MSVC workspace for VisualPng + projects => Contains project files and workspaces for building DLL + beos => Contains a Beos workspace for building libpng + borland => Contains a Borland workspace for building libpng + and zlib + msvc => Contains a Microsoft Visual C++ (MSVC) workspace + for building libpng and zlib + netware.txt => Contains instructions for downloading a set of + project files for building libpng and zlib on + Netware. + wince.txt => Contains instructions for downloading a Microsoft + Visual C++ (Windows CD Toolkit) workspace for + building libpng and zlib on WindowsCE + scripts => Directory containing scripts for building libpng: + descrip.mms => VMS makefile for MMS or MMK + makefile.std => Generic UNIX makefile (cc, creates static libpng.a) + makefile.linux => Linux/ELF makefile + (gcc, creates libpng12.so.0.1.2.5) + makefile.gcmmx => Linux/ELF makefile (gcc, creates + libpng12.so.0.1.2.5, uses assembler code + tuned for Intel MMX platform) + makefile.gcc => Generic makefile (gcc, creates static libpng.a) + makefile.knr => Archaic UNIX Makefile that converts files with + ansi2knr (Requires ansi2knr.c from + ftp://ftp.cs.wisc.edu/ghost) + makefile.aix => AIX makefile + makefile.cygwin => Cygwin/gcc makefile + makefile.darwin => Darwin makefile + makefile.dec => DEC Alpha UNIX makefile + makefile.freebsd => FreeBSD makefile + makefile.hpgcc => HPUX makefile using gcc + makefile.hpux => HPUX (10.20 and 11.00) makefile + makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static) + makefile.intel => Intel C/C++ version 4.0 and later + libpng.icc => Project file, IBM VisualAge/C++ 4.0 or later + makefile.macosx => MACOS X Makefile + makefile.netbsd => NetBSD/cc makefile, PNGGCCRD, makes libpng.so. + makefile.ne0bsd => NetBSD/cc makefile, PNGGCCRD, makes libpng0.so + makefile.openbsd => OpenBSD makefile + makefile.sgi => Silicon Graphics IRIX (cc, creates static lib) + makefile.sggcc => Silicon Graphics (gcc, creates libpng12.so.0.1.2.5) + makefile.sunos => Sun makefile + makefile.solaris => Solaris 2.X makefile + (gcc, creates libpng12.so.0.1.2.5) + makefile.so9 => Solaris 9 makefile + (gcc, creates libpng12.so.0.1.2.5) + makefile.32sunu => Sun Ultra 32-bit makefile + makefile.64sunu => Sun Ultra 64-bit makefile + makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc + makefile.mips => MIPS makefile + makefile.acorn => Acorn makefile + makefile.amiga => Amiga makefile + smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC + compiler (Requires SCOPTIONS, copied from + scripts/SCOPTIONS.ppc) + makefile.atari => Atari makefile + makefile.beos => BEOS makefile for X86 + makefile.bor => Borland makefile (uses bcc) + makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode) + makefile.bd32 => To make a png32bd.dll with Borland C++ 4.5 + makefile.tc3 => Turbo C 3.0 makefile + makefile.dj2 => DJGPP 2 makefile + makefile.msc => Microsoft C makefile + makefile.vcawin32 => makefile for Microsoft Visual C++ 5.0 and + later (uses assembler code tuned for Intel MMX + platform) + makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and + later (does not use assembler code) + makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def) + pngos2.def => OS/2 module definition file used by makefile.os2 + makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model + makevms.com => VMS build script + pngdef.pas => Defines for a png32bd.dll with Borland C++ 4.5 + SCOPTIONS.ppc => Used with smakefile.ppc + mangle => Directory containing scripts to build libpng12m.so: + mangle.in => Function-decoration macros added to png.h by the + makefiles. + makefile.linux => Linux/ELF makefile + (gcc, creates libpng12m.so.0.1.2.5) + makefile.gcmmx => Linux/ELF makefile (gcc, creates + libpng12.so.0m.1.2.5, uses assembler code + tuned for Intel MMX platform) + makefile.sgi => Silicon Graphics (cc, creates libpng12m.so) + makefile.sggcc => Silicon Graphics (gcc, creates libpng12m.so) + +Good luck, and happy coding. + +-Glenn Randers-Pehrson + Internet: randeg@alum.rpi.edu + +-Andreas Eric Dilger + Internet: adilger@enel.ucalgary.ca + Web: http://www-mddsp.enel.ucalgary.ca/People/adilger/ + +-Guy Eric Schalnat + (formerly of Group 42, Inc) + Internet: gschal@infinet.com diff --git a/gtkmm-osx/libpng-1.2.5/TODO b/gtkmm-osx/libpng-1.2.5/TODO new file mode 100644 index 0000000..a5f6395 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/TODO @@ -0,0 +1,24 @@ +TODO - list of things to do for libpng: + +Final bug fixes. +Improve API by hiding the png_struct and png_info structs. +Finish work on the no-floating-point version (including gamma compensation) +Better C++ wrapper/full C++ implementation? +Fix problem with C++ and EXTERN "C". +cHRM transformation. +Improve setjmp/longjmp usage or remove it in favor of returning error codes. +Add "grayscale->palette" transformation and "palette->grayscale" detection. +Improved dithering. +Multi-lingual error and warning message support. +Complete sRGB transformation (presently it simply uses gamma=0.45455). +Man pages for function calls. +Better documentation. +Better filter selection + (counting huffman bits/precompression? filter inertia? filter costs?). +Histogram creation. +Text conversion between different code pages (Latin-1 -> Mac and DOS). +Should we always malloc 2^bit_depth PLTE/tRNS/hIST entries for safety? +Build gamma tables using fixed point (and do away with floating point entirely). +Use greater precision when changing to linear gamma for compositing against + background and doing rgb-to-gray transformation. +Investigate pre-incremented loop counters and other loop constructions. diff --git a/gtkmm-osx/libpng-1.2.5/Y2KINFO b/gtkmm-osx/libpng-1.2.5/Y2KINFO new file mode 100644 index 0000000..f57e962 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/Y2KINFO @@ -0,0 +1,55 @@ + Y2K compliance in libpng: + ========================= + + October 3, 2002 + + Since the PNG Development group is an ad-hoc body, we can't make + an official declaration. + + This is your unofficial assurance that libpng from version 0.71 and + upward through 1.2.5 are Y2K compliant. It is my belief that earlier + versions were also Y2K compliant. + + Libpng only has three year fields. One is a 2-byte unsigned integer + that will hold years up to 65535. The other two hold the date in text + format, and will hold years up to 9999. + + The integer is + "png_uint_16 year" in png_time_struct. + + The strings are + "png_charp time_buffer" in png_struct and + "near_time_buffer", which is a local character string in png.c. + + There are seven time-related functions: + + png_convert_to_rfc_1123() in png.c + (formerly png_convert_to_rfc_1152() in error) + png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c + png_convert_from_time_t() in pngwrite.c + png_get_tIME() in pngget.c + png_handle_tIME() in pngrutil.c, called in pngread.c + png_set_tIME() in pngset.c + png_write_tIME() in pngwutil.c, called in pngwrite.c + + All appear to handle dates properly in a Y2K environment. The + png_convert_from_time_t() function calls gmtime() to convert from system + clock time, which returns (year - 1900), which we properly convert to + the full 4-digit year. There is a possibility that applications using + libpng are not passing 4-digit years into the png_convert_to_rfc_1123() + function, or that they are incorrectly passing only a 2-digit year + instead of "year - 1900" into the png_convert_from_struct_tm() function, + but this is not under our control. The libpng documentation has always + stated that it works with 4-digit years, and the APIs have been + documented as such. + + The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned + integer to hold the year, and can hold years as large as 65535. + + zlib, upon which libpng depends, is also Y2K compliant. It contains + no date-related code. + + + Glenn Randers-Pehrson + libpng maintainer + PNG Development Group diff --git a/gtkmm-osx/libpng-1.2.5/configure b/gtkmm-osx/libpng-1.2.5/configure new file mode 100755 index 0000000..ca05aca --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/configure @@ -0,0 +1,6 @@ +echo " + There is no \"configure\" script for Libpng-1.2.5. Instead, please + copy the appropriate makefile for your system from the \"scripts\" + directory. Read the INSTALL file for more details. +" + diff --git a/gtkmm-osx/libpng-1.2.5/contrib/gregbook/LICENSE b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/LICENSE new file mode 100644 index 0000000..175ebfd --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/LICENSE @@ -0,0 +1,26 @@ + --------------------------------------------------------------------------- + + Copyright (c) 1998-2001 Greg Roelofs. All rights reserved. + + This software is provided "as is," without warranty of any kind, + express or implied. In no event shall the author or contributors + be held liable for any damages arising in any way from the use of + this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute + it freely, subject to the following restrictions: + + 1. Redistributions of source code must retain the above copyright + notice, disclaimer, and this list of conditions. + 2. Redistributions in binary form must reproduce the above copyright + notice, disclaimer, and this list of conditions in the documenta- + tion and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this + software must display the following acknowledgment: + + This product includes software developed by Greg Roelofs + and contributors for the book, "PNG: The Definitive Guide," + published by O'Reilly and Associates. + + --------------------------------------------------------------------------- diff --git a/gtkmm-osx/libpng-1.2.5/contrib/gregbook/Makefile.sgi b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/Makefile.sgi new file mode 100644 index 0000000..e3ca6ce --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/Makefile.sgi @@ -0,0 +1,104 @@ +# Sample makefile for rpng-x / rpng2-x / wpng for SGI using cc and make. +# Greg Roelofs +# Last modified: 7 March 2002 +# +# The programs built by this makefile are described in the book, +# "PNG: The Definitive Guide," by Greg Roelofs (O'Reilly and +# Associates, 1999). Go buy a copy, eh? Buy some for friends +# and family, too. (Not that this is a blatant plug or anything.) +# +# Invoke this makefile from a shell prompt in the usual way; for example: +# +# make -f Makefile.sgi +# +# This makefile assumes libpng and zlib have already been built or downloaded +# and are both installed in /usr/local/{include,lib} (as indicated by the +# PNG* and Z* macros below). Edit as appropriate--choose only ONE each of +# the PNGINC, PNGLIB, ZINC and ZLIB lines. +# +# This makefile builds dynamically linked executables (against libpng and zlib, +# that is), but that can be changed by uncommenting the appropriate PNGLIB and +# ZLIB lines. + + +# macros -------------------------------------------------------------------- + +PNGINC = -I/usr/local/include/libpng12 +PNGLIB = -L/usr/local/lib -lpng12 # dynamically linked against libpng +#PNGLIB = /usr/local/lib/libpng12.a # statically linked against libpng +# or: +#PNGINC = -I../.. +#PNGLIB = -L../.. -lpng +#PNGLIB = ../../libpng.a + +ZINC = -I/usr/local/include +ZLIB = -L/usr/local/lib -lz # dynamically linked against zlib +#ZLIB = /usr/local/lib/libz.a # statically linked against zlib +#ZINC = -I../zlib +#ZLIB = -L../zlib -lz +#ZLIB = ../../../zlib/libz.a + +XINC = -I/usr/include/X11 # old-style, stock X distributions +XLIB = -L/usr/lib/X11 -lX11 +#XINC = -I/usr/openwin/include # Sun workstations (OpenWindows) +#XLIB = -L/usr/openwin/lib -lX11 +#XINC = -I/usr/X11R6/include # new X distributions (XFree86, etc.) +#XLIB = -L/usr/X11R6/lib -lX11 + +INCS = $(PNGINC) $(ZINC) $(XINC) +RLIBS = $(PNGLIB) $(ZLIB) $(XLIB) -lm +WLIBS = $(PNGLIB) $(ZLIB) + +CC = cc +LD = cc +RM = rm -f +# ABI must be the same as that used to build libpng. +ABI= +CFLAGS = $(ABI) -O -fullwarn $(INCS) +LDFLAGS = $(ABI) +O = .o +E = + +RPNG = rpng-x +RPNG2 = rpng2-x +WPNG = wpng + +ROBJS = $(RPNG)$(O) readpng$(O) +ROBJS2 = $(RPNG2)$(O) readpng2$(O) +WOBJS = $(WPNG)$(O) writepng$(O) + +EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E) + + +# implicit make rules ------------------------------------------------------- + +.c$(O): + $(CC) -c $(CFLAGS) $< + + +# dependencies -------------------------------------------------------------- + +all: $(EXES) + +$(RPNG)$(E): $(ROBJS) + $(LD) $(LDFLAGS) -o $@ $(ROBJS) $(RLIBS) + +$(RPNG2)$(E): $(ROBJS2) + $(LD) $(LDFLAGS) -o $@ $(ROBJS2) $(RLIBS) + +$(WPNG)$(E): $(WOBJS) + $(LD) $(LDFLAGS) -o $@ $(WOBJS) $(WLIBS) + +$(RPNG)$(O): $(RPNG).c readpng.h +$(RPNG2)$(O): $(RPNG2).c readpng2.h +$(WPNG)$(O): $(WPNG).c writepng.h + +readpng$(O): readpng.c readpng.h +readpng2$(O): readpng2.c readpng2.h +writepng$(O): writepng.c writepng.h + + +# maintenance --------------------------------------------------------------- + +clean: + $(RM) $(EXES) $(ROBJS) $(ROBJS2) $(WOBJS) diff --git a/gtkmm-osx/libpng-1.2.5/contrib/gregbook/Makefile.unx b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/Makefile.unx new file mode 100644 index 0000000..c0c3fb1 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/Makefile.unx @@ -0,0 +1,104 @@ +# Sample makefile for rpng-x / rpng2-x / wpng using gcc and make. +# Greg Roelofs +# Last modified: 7 March 2002 +# +# The programs built by this makefile are described in the book, +# "PNG: The Definitive Guide," by Greg Roelofs (O'Reilly and +# Associates, 1999). Go buy a copy, eh? Buy some for friends +# and family, too. (Not that this is a blatant plug or anything.) +# +# Invoke this makefile from a shell prompt in the usual way; for example: +# +# make -f Makefile.unx +# +# This makefile assumes libpng and zlib have already been built or downloaded +# and are both installed in /usr/local/{include,lib} (as indicated by the +# PNG* and Z* macros below). Edit as appropriate--choose only ONE each of +# the PNGINC, PNGLIB, ZINC and ZLIB lines. +# +# This makefile builds statically linked executables (against libpng and zlib, +# that is), but that can be changed by uncommenting the appropriate PNGLIB and +# ZLIB lines. + + +# macros -------------------------------------------------------------------- + +PNGINC = -I/usr/local/include/libpng12 +#PNGLIB = -L/usr/local/lib -lpng12 # dynamically linked against libpng +PNGLIB = /usr/local/lib/libpng12.a # statically linked against libpng +# or: +#PNGINC = -I../libpng +#PNGLIB = -L../libpng -lpng +#PNGLIB = ../libpng/libpng.a + +ZINC = -I/usr/local/include +#ZLIB = -L/usr/local/lib -lz # dynamically linked against zlib +ZLIB = /usr/local/lib/libz.a # statically linked against zlib +#ZINC = -I../zlib +#ZLIB = -L../zlib -lz +#ZLIB = ../zlib/libz.a + +#XINC = -I/usr/include # old-style, stock X distributions +#XLIB = -L/usr/lib/X11 -lX11 +#XINC = -I/usr/openwin/include # Sun workstations (OpenWindows) +#XLIB = -L/usr/openwin/lib -lX11 +XINC = -I/usr/X11R6/include # new X distributions (XFree86, etc.) +XLIB = -L/usr/X11R6/lib -lX11 + +INCS = $(PNGINC) $(ZINC) $(XINC) +RLIBS = $(PNGLIB) $(ZLIB) $(XLIB) -lm +WLIBS = $(PNGLIB) $(ZLIB) + +CC = gcc +LD = gcc +RM = rm -f +CFLAGS = -O -Wall $(INCS) +# [note that -Wall is a gcc-specific compilation flag ("most warnings on")] +# [-ansi, -pedantic and -W can also be used] +LDFLAGS = +O = .o +E = + +RPNG = rpng-x +RPNG2 = rpng2-x +WPNG = wpng + +ROBJS = $(RPNG)$(O) readpng$(O) +ROBJS2 = $(RPNG2)$(O) readpng2$(O) +WOBJS = $(WPNG)$(O) writepng$(O) + +EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E) + + +# implicit make rules ------------------------------------------------------- + +.c$(O): + $(CC) -c $(CFLAGS) $< + + +# dependencies -------------------------------------------------------------- + +all: $(EXES) + +$(RPNG)$(E): $(ROBJS) + $(LD) $(LDFLAGS) -o $@ $(ROBJS) $(RLIBS) + +$(RPNG2)$(E): $(ROBJS2) + $(LD) $(LDFLAGS) -o $@ $(ROBJS2) $(RLIBS) + +$(WPNG)$(E): $(WOBJS) + $(LD) $(LDFLAGS) -o $@ $(WOBJS) $(WLIBS) + +$(RPNG)$(O): $(RPNG).c readpng.h +$(RPNG2)$(O): $(RPNG2).c readpng2.h +$(WPNG)$(O): $(WPNG).c writepng.h + +readpng$(O): readpng.c readpng.h +readpng2$(O): readpng2.c readpng2.h +writepng$(O): writepng.c writepng.h + + +# maintenance --------------------------------------------------------------- + +clean: + $(RM) $(EXES) $(ROBJS) $(ROBJS2) $(WOBJS) diff --git a/gtkmm-osx/libpng-1.2.5/contrib/gregbook/Makefile.w32 b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/Makefile.w32 new file mode 100644 index 0000000..62041cd --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/Makefile.w32 @@ -0,0 +1,112 @@ +# Sample makefile for rpng-win / rpng2-win / wpng using MSVC and NMAKE. +# Greg Roelofs +# Last modified: 16 February 1999 +# +# The programs built by this makefile are described in the book, +# "PNG: The Definitive Guide," by Greg Roelofs (O'Reilly and +# Associates, 1999). Go buy a copy, eh? Buy some for friends +# and family, too. (Not that this is a blatant plug or anything.) +# +# Invoke this makefile from a DOS prompt window via: +# +# %devstudio%\vc\bin\vcvars32.bat +# nmake -nologo -f Makefile.w32 +# +# where %devstudio% is the installation directory for MSVC / DevStudio. If +# you get "environment out of space" errors, create a desktop shortcut with +# "c:\windows\command.com /e:4096" as the program command line and set the +# working directory to this directory. Then double-click to open the new +# DOS-prompt window with a bigger environment and retry the commands above. +# +# This makefile assumes libpng and zlib have already been built or downloaded +# and are in subdirectories at the same level as the current subdirectory +# (as indicated by the PNGPATH and ZPATH macros below). Edit as appropriate. +# +# Note that the names of the dynamic and static libpng and zlib libraries +# used below may change in later releases of the libraries. This makefile +# builds statically linked executables, but that can be changed by uncom- +# menting the appropriate PNGLIB and ZLIB lines. + +!include + + +# macros -------------------------------------------------------------------- + +PNGPATH = ../libpng +PNGINC = -I$(PNGPATH) +#PNGLIB = $(PNGPATH)/pngdll.lib +PNGLIB = $(PNGPATH)/libpng.lib + +ZPATH = ../zlib +ZINC = -I$(ZPATH) +#ZLIB = $(ZPATH)/zlibdll.lib +ZLIB = $(ZPATH)/zlibstat.lib + +WINLIBS = -defaultlib:user32.lib gdi32.lib +# ["real" apps may also need comctl32.lib, comdlg32.lib, winmm.lib, etc.] + +INCS = $(PNGINC) $(ZINC) +RLIBS = $(PNGLIB) $(ZLIB) $(WINLIBS) +WLIBS = $(PNGLIB) $(ZLIB) + +CC = cl +LD = link +RM = del +CFLAGS = -nologo -O -W3 $(INCS) $(cvars) +# [note that -Wall is an MSVC-specific compilation flag ("all warnings on")] +# [see %devstudio%\vc\include\win32.mak for cvars macro definition] +O = .obj +E = .exe + +RLDFLAGS = -nologo -subsystem:windows +WLDFLAGS = -nologo + +RPNG = rpng-win +RPNG2 = rpng2-win +WPNG = wpng + +ROBJS = $(RPNG)$(O) readpng$(O) +ROBJS2 = $(RPNG2)$(O) readpng2$(O) +WOBJS = $(WPNG)$(O) writepng$(O) + +EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E) + + +# implicit make rules ------------------------------------------------------- + +.c$(O): + $(CC) -c $(CFLAGS) $< + + +# dependencies -------------------------------------------------------------- + +all: $(EXES) + +$(RPNG)$(E): $(ROBJS) + $(LD) $(RLDFLAGS) -out:$@ $(ROBJS) $(RLIBS) + +$(RPNG2)$(E): $(ROBJS2) + $(LD) $(RLDFLAGS) -out:$@ $(ROBJS2) $(RLIBS) + +$(WPNG)$(E): $(WOBJS) + $(LD) $(WLDFLAGS) -out:$@ $(WOBJS) $(WLIBS) + +$(RPNG)$(O): $(RPNG).c readpng.h +$(RPNG2)$(O): $(RPNG2).c readpng2.h +$(WPNG)$(O): $(WPNG).c writepng.h + +readpng$(O): readpng.c readpng.h +readpng2$(O): readpng2.c readpng2.h +writepng$(O): writepng.c writepng.h + + +# maintenance --------------------------------------------------------------- + +clean: +# ideally we could just do this: +# $(RM) $(EXES) $(ROBJS) $(ROBJS2) $(WOBJS) +# ...but the Windows "DEL" command is none too bright, so: + $(RM) r*$(E) + $(RM) w*$(E) + $(RM) r*$(O) + $(RM) w*$(O) diff --git a/gtkmm-osx/libpng-1.2.5/contrib/gregbook/README b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/README new file mode 100644 index 0000000..c67045c --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/README @@ -0,0 +1,185 @@ + =========================== + PNG: The Definitive Guide + =========================== + + Source Code + +Chapters 13, 14 and 15 of "PNG: The Definitive Guide" discuss three free, +cross-platform demo programs that show how to use the libpng reference +library: rpng, rpng2 and wpng. rpng and rpng2 are viewers; the first is +a very simple example that that shows how a standard file-viewer might use +libpng, while the second is designed to process streaming data and shows +how a web browser might be written. wpng is a simple command-line program +that reads binary PGM and PPM files (the ``raw'' grayscale and RGB subsets +of PBMPLUS/NetPBM) and converts them to PNG. + +The source code for all three demo programs currently compiles under +Unix, OpenVMS, and 32-bit Windows. (Special thanks to Martin Zinser, +zinser@decus.de, for making the necessary changes for OpenVMS and for +providing an appropriate build script.) Build instructions can be found +below. + +Files: + + README this file + LICENSE terms of distribution and reuse (BSD-like) + + Makefile.unx Unix makefile + Makefile.w32 Windows (MSVC) makefile + makevms.com OpenVMS build script + + rpng-win.c Windows front end for the basic viewer + rpng-x.c X Window System (Unix, OpenVMS) front end + readpng.c generic back end for the basic viewer + readpng.h header file for the basic viewer + + rpng2-win.c Windows front end for the progressive viewer + rpng2-x.c X front end for the progressive viewer + readpng2.c generic back end for the progressive viewer + readpng2.h header file for the progressive viewer + + wpng.c generic (text) front end for the converter + writepng.c generic back end for the converter + writepng.h header file for the converter + + toucan.png transparent PNG for testing (by Stefan Schneider) + +Note that, although the programs are designed to be functional, their +primary purpose is to illustrate how to use libpng to add PNG support to +other programs. As such, their user interfaces are crude and definitely +are not intended for everyday use. + +Please see http://www.libpng.org/pub/png/pngbook.html for further infor- +mation and links to the latest version of the source code, and Chapters +13-15 of the book for detailed discussion of the three programs. + +Greg Roelofs +newt@pobox.com +30 June 2001 + + +BUILD INSTRUCTIONS + + - Prerequisites (in order of compilation): + + - zlib http://www.gzip.org/zlib/ + - libpng http://www.libpng.org/pub/png/libpng.html + - pngbook http://www.libpng.org/pub/png/book/sources.html + + The pngbook demo programs are explicitly designed to demonstrate proper + coding techniques for using the libpng reference library. As a result, + you need to download and build both zlib (on which libpng depends) and + libpng. A common build setup is to place the zlib, libpng and pngbook + subdirectory trees ("folders") in the same parent directory. Then the + libpng build can refer to files in ../zlib (or ..\zlib or [-.zlib]), + and similarly for the pngbook build. + + Note that all three packages are designed to be built from a command + line by default; those who wish to use a graphical or other integrated + development environments are on their own. + + + - Unix: + + Unpack the latest pngbook sources (which should correspond to this + README file) into a directory and change into that directory. + + Copy Makefile.unx to Makefile and edit the PNG* and Z* variables + appropriately (possibly also the X* variables if necessary). + + make + + There is no "install" target, so copy the three executables somewhere + in your path or run them from the current directory. All three will + print a basic usage screen when run without any command-line arguments; + see the book for more details. + + + - Windows: + + Unpack the latest pngbook sources (which should correspond to this + README file) into a folder, open a "DOS shell" or "command prompt" + or equivalent command-line window, and cd into the folder where you + unpacked the source code. + + For MSVC, set up the necessary environment variables by invoking + + %devstudio%\vc\bin\vcvars32.bat + + where where %devstudio% is the installation directory for MSVC / + DevStudio. If you get "environment out of space" errors under 95/98, + create a desktop shortcut with "c:\windows\command.com /e:4096" as + the program command line and set the working directory to the pngbook + directory. Then double-click to open the new DOS-prompt window with + a bigger environment and retry the commands above. + + Copy Makefile.w32 to Makefile and edit the PNGPATH and ZPATH variables + appropriately (possibly also the "INC" and "LIB" variables if needed). + Note that the names of the dynamic and static libpng and zlib libraries + used in the makefile may change in later releases of the libraries. + Also note that, as of libpng version 1.0.5, MSVC DLL builds do not work. + This makefile therefore builds statically linked executables, but if + the DLL problems ever get fixed, uncommenting the appropriate PNGLIB + and ZLIB lines will build dynamically linked executables instead. + + Do the build by typing + + nmake + + The result should be three executables: rpng-win.exe, rpng2-win.exe, + and wpng.exe. Copy them somewhere in your PATH or run them from the + current folder. Like the Unix versions, the two windowed programs + (rpng and rpng2) now display a usage screen in a console window when + invoked without command-line arguments; this is new behavior as of + the June 2001 release. Note that the programs use the Unix-style "-" + character to specify options, instead of the more common DOS/Windows + "/" character. (For example: "rpng2-win -bgpat 4 foo.png", not + "rpng2-win /bgpat 4 foo.png") + + + - OpenVMS: + + Unpack the pngbook sources into a subdirectory and change into that + subdirectory. + + Edit makevms.com appropriately, specifically the zpath and pngpath + variables. + + @makevms + + To run the programs, they probably first need to be set up as "foreign + symbols," with "disk" and "dir" set appropriately: + + $ rpng == "$disk:[dir]rpng-x.exe" + $ rpng2 == "$disk:[dir]rpng2-x.exe" + $ wpng == "$disk:[dir]wpng.exe" + + All three will print a basic usage screen when run without any command- + line arguments; see the book for more details. Note that the options + style is Unix-like, i.e., preceded by "-" rather than "/". + + +RUNNING THE PROGRAMS: (VERY) BRIEF INTRO + + rpng is a simple PNG viewer that can display transparent PNGs with a + specified background color; for example, + + rpng -bgcolor #ff0000 toucan.png + + would display the image with a red background. rpng2 is a progressive + viewer that simulates a web browser in some respects; it can display + images against either a background color or a dynamically generated + background image. For example: + + rpng2 -bgpat 16 toucan.png + + wpng is a purely command-line image converter from binary PBMPLUS/NetPBM + format (.pgm or .ppm) to PNG; for example, + + wpng -time < toucan.ppm > toucan.png + + would convert the specified PPM file (using redirection) to PNG, auto- + matically setting the PNG modification-time chunk. + + All options can be abbreviated to the shortest unique value; for example, + "-bgc" for -bgcolor (versus "-bgp" for -bgpat), or "-g" for -gamma. diff --git a/gtkmm-osx/libpng-1.2.5/contrib/gregbook/makevms.com b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/makevms.com new file mode 100644 index 0000000..bd37dc0 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/makevms.com @@ -0,0 +1,132 @@ +$!------------------------------------------------------------------------------ +$! make "PNG: The Definitive Guide" demo programs (for X) under OpenVMS +$! +$! Script created by Martin Zinser for libpng; modified by Greg Roelofs +$! for standalone pngbook source distribution. +$! +$! +$! Set locations where zlib and libpng sources live. +$! +$ zpath = "" +$ pngpath = "" +$! +$ if f$search("[---.zlib]zlib.h").nes."" then zpath = "[---.zlib]" +$ if f$search("[--]png.h").nes."" then pngpath = "[--]" +$! +$ if f$search("[-.zlib]zlib.h").nes."" then zpath = "[-.zlib]" +$ if f$search("[-.libpng]png.h").nes."" then pngpath = "[-.libpng]" +$! +$ if zpath .eqs. "" +$ then +$ write sys$output "zlib include not found. Exiting..." +$ exit 2 +$ endif +$! +$ if pngpath .eqs. "" +$ then +$ write sys$output "libpng include not found. Exiting..." +$ exit 2 +$ endif +$! +$! Look for the compiler used. +$! +$ ccopt="/include=(''zpath',''pngpath')" +$ if f$getsyi("HW_MODEL").ge.1024 +$ then +$ ccopt = "/prefix=all"+ccopt +$ comp = "__decc__=1" +$ if f$trnlnm("SYS").eqs."" then define sys sys$library: +$ else +$ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs."" +$ then +$ if f$trnlnm("SYS").eqs."" then define sys sys$library: +$ if f$search("SYS$SYSTEM:VAXC.EXE").eqs."" +$ then +$ comp = "__gcc__=1" +$ CC :== GCC +$ else +$ comp = "__vaxc__=1" +$ endif +$ else +$ if f$trnlnm("SYS").eqs."" then define sys decc$library_include: +$ ccopt = "/decc/prefix=all"+ccopt +$ comp = "__decc__=1" +$ endif +$ endif +$ open/write lopt lib.opt +$ write lopt "''pngpath'libpng.olb/lib" +$ write lopt "''zpath'libz.olb/lib" +$ close lopt +$ open/write xopt x11.opt +$ write xopt "sys$library:decw$xlibshr.exe/share" +$ close xopt +$! +$! Build 'em. +$! +$ write sys$output "Compiling PNG book programs ..." +$ CALL MAKE readpng.OBJ "cc ''CCOPT' readpng" - + readpng.c readpng.h +$ CALL MAKE readpng2.OBJ "cc ''CCOPT' readpng2" - + readpng2.c readpng2.h +$ CALL MAKE writepng.OBJ "cc ''CCOPT' writepng" - + writepng.c writepng.h +$ write sys$output "Building rpng-x..." +$ CALL MAKE rpng-x.OBJ "cc ''CCOPT' rpng-x" - + rpng-x.c readpng.h +$ call make rpng-x.exe - + "LINK rpng-x,readpng,lib.opt/opt,x11.opt/opt" - + rpng-x.obj readpng.obj +$ write sys$output "Building rpng2-x..." +$ CALL MAKE rpng2-x.OBJ "cc ''CCOPT' rpng2-x" - + rpng2-x.c readpng2.h +$ call make rpng2-x.exe - + "LINK rpng2-x,readpng2,lib.opt/opt,x11.opt/opt" - + rpng2-x.obj readpng2.obj +$ write sys$output "Building wpng..." +$ CALL MAKE wpng.OBJ "cc ''CCOPT' wpng" - + wpng.c writepng.h +$ call make wpng.exe - + "LINK wpng,writepng,lib.opt/opt" - + wpng.obj writepng.obj +$ exit +$! +$! +$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES +$ V = 'F$Verify(0) +$! P1 = What we are trying to make +$! P2 = Command to make it +$! P3 - P8 What it depends on +$ +$ If F$Search(P1) .Eqs. "" Then Goto Makeit +$ Time = F$CvTime(F$File(P1,"RDT")) +$arg=3 +$Loop: +$ Argument = P'arg +$ If Argument .Eqs. "" Then Goto Exit +$ El=0 +$Loop2: +$ File = F$Element(El," ",Argument) +$ If File .Eqs. " " Then Goto Endl +$ AFile = "" +$Loop3: +$ OFile = AFile +$ AFile = F$Search(File) +$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl +$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit +$ Goto Loop3 +$NextEL: +$ El = El + 1 +$ Goto Loop2 +$EndL: +$ arg=arg+1 +$ If arg .Le. 8 Then Goto Loop +$ Goto Exit +$ +$Makeit: +$ VV=F$VERIFY(0) +$ write sys$output P2 +$ 'P2 +$ VV='F$Verify(VV) +$Exit: +$ If V Then Set Verify +$ENDSUBROUTINE diff --git a/gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng.c b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng.c new file mode 100644 index 0000000..b8e0904 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng.c @@ -0,0 +1,280 @@ +/*--------------------------------------------------------------------------- + + rpng - simple PNG display program readpng.c + + --------------------------------------------------------------------------- + + Copyright (c) 1998-2000 Greg Roelofs. All rights reserved. + + This software is provided "as is," without warranty of any kind, + express or implied. In no event shall the author or contributors + be held liable for any damages arising in any way from the use of + this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute + it freely, subject to the following restrictions: + + 1. Redistributions of source code must retain the above copyright + notice, disclaimer, and this list of conditions. + 2. Redistributions in binary form must reproduce the above copyright + notice, disclaimer, and this list of conditions in the documenta- + tion and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this + software must display the following acknowledgment: + + This product includes software developed by Greg Roelofs + and contributors for the book, "PNG: The Definitive Guide," + published by O'Reilly and Associates. + + ---------------------------------------------------------------------------*/ + +#include +#include + +#include "png.h" /* libpng header; includes zlib.h */ +#include "readpng.h" /* typedefs, common macros, public prototypes */ + +/* future versions of libpng will provide this macro: */ +#ifndef png_jmpbuf +# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) +#endif + + +static png_structp png_ptr = NULL; +static png_infop info_ptr = NULL; + +png_uint_32 width, height; +int bit_depth, color_type; +uch *image_data = NULL; + + +void readpng_version_info(void) +{ + fprintf(stderr, " Compiled with libpng %s; using libpng %s.\n", + PNG_LIBPNG_VER_STRING, png_libpng_ver); + fprintf(stderr, " Compiled with zlib %s; using zlib %s.\n", + ZLIB_VERSION, zlib_version); +} + + +/* return value = 0 for success, 1 for bad sig, 2 for bad IHDR, 4 for no mem */ + +int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight) +{ + uch sig[8]; + + + /* first do a quick check that the file really is a PNG image; could + * have used slightly more general png_sig_cmp() function instead */ + + fread(sig, 1, 8, infile); + if (!png_check_sig(sig, 8)) + return 1; /* bad signature */ + + + /* could pass pointers to user-defined error handlers instead of NULLs: */ + + png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + if (!png_ptr) + return 4; /* out of memory */ + + info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) { + png_destroy_read_struct(&png_ptr, NULL, NULL); + return 4; /* out of memory */ + } + + + /* we could create a second info struct here (end_info), but it's only + * useful if we want to keep pre- and post-IDAT chunk info separated + * (mainly for PNG-aware image editors and converters) */ + + + /* setjmp() must be called in every function that calls a PNG-reading + * libpng function */ + + if (setjmp(png_jmpbuf(png_ptr))) { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return 2; + } + + + png_init_io(png_ptr, infile); + png_set_sig_bytes(png_ptr, 8); /* we already read the 8 signature bytes */ + + png_read_info(png_ptr, info_ptr); /* read all PNG info up to image data */ + + + /* alternatively, could make separate calls to png_get_image_width(), + * etc., but want bit_depth and color_type for later [don't care about + * compression_type and filter_type => NULLs] */ + + png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, + NULL, NULL, NULL); + *pWidth = width; + *pHeight = height; + + + /* OK, that's all we need for now; return happy */ + + return 0; +} + + + + +/* returns 0 if succeeds, 1 if fails due to no bKGD chunk, 2 if libpng error; + * scales values to 8-bit if necessary */ + +int readpng_get_bgcolor(uch *red, uch *green, uch *blue) +{ + png_color_16p pBackground; + + + /* setjmp() must be called in every function that calls a PNG-reading + * libpng function */ + + if (setjmp(png_jmpbuf(png_ptr))) { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return 2; + } + + + if (!png_get_valid(png_ptr, info_ptr, PNG_INFO_bKGD)) + return 1; + + /* it is not obvious from the libpng documentation, but this function + * takes a pointer to a pointer, and it always returns valid red, green + * and blue values, regardless of color_type: */ + + png_get_bKGD(png_ptr, info_ptr, &pBackground); + + + /* however, it always returns the raw bKGD data, regardless of any + * bit-depth transformations, so check depth and adjust if necessary */ + + if (bit_depth == 16) { + *red = pBackground->red >> 8; + *green = pBackground->green >> 8; + *blue = pBackground->blue >> 8; + } else if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { + if (bit_depth == 1) + *red = *green = *blue = pBackground->gray? 255 : 0; + else if (bit_depth == 2) + *red = *green = *blue = (255/3) * pBackground->gray; + else /* bit_depth == 4 */ + *red = *green = *blue = (255/15) * pBackground->gray; + } else { + *red = (uch)pBackground->red; + *green = (uch)pBackground->green; + *blue = (uch)pBackground->blue; + } + + return 0; +} + + + + +/* display_exponent == LUT_exponent * CRT_exponent */ + +uch *readpng_get_image(double display_exponent, int *pChannels, ulg *pRowbytes) +{ + double gamma; + png_uint_32 i, rowbytes; + png_bytepp row_pointers = NULL; + + + /* setjmp() must be called in every function that calls a PNG-reading + * libpng function */ + + if (setjmp(png_jmpbuf(png_ptr))) { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; + } + + + /* expand palette images to RGB, low-bit-depth grayscale images to 8 bits, + * transparency chunks to full alpha channel; strip 16-bit-per-sample + * images to 8 bits per sample; and convert grayscale to RGB[A] */ + + if (color_type == PNG_COLOR_TYPE_PALETTE) + png_set_expand(png_ptr); + if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) + png_set_expand(png_ptr); + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) + png_set_expand(png_ptr); + if (bit_depth == 16) + png_set_strip_16(png_ptr); + if (color_type == PNG_COLOR_TYPE_GRAY || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_gray_to_rgb(png_ptr); + + + /* unlike the example in the libpng documentation, we have *no* idea where + * this file may have come from--so if it doesn't have a file gamma, don't + * do any correction ("do no harm") */ + + if (png_get_gAMA(png_ptr, info_ptr, &gamma)) + png_set_gamma(png_ptr, display_exponent, gamma); + + + /* all transformations have been registered; now update info_ptr data, + * get rowbytes and channels, and allocate image memory */ + + png_read_update_info(png_ptr, info_ptr); + + *pRowbytes = rowbytes = png_get_rowbytes(png_ptr, info_ptr); + *pChannels = (int)png_get_channels(png_ptr, info_ptr); + + if ((image_data = (uch *)malloc(rowbytes*height)) == NULL) { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; + } + if ((row_pointers = (png_bytepp)malloc(height*sizeof(png_bytep))) == NULL) { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + free(image_data); + image_data = NULL; + return NULL; + } + + Trace((stderr, "readpng_get_image: channels = %d, rowbytes = %ld, height = %ld\n", *pChannels, rowbytes, height)); + + + /* set the individual row_pointers to point at the correct offsets */ + + for (i = 0; i < height; ++i) + row_pointers[i] = image_data + i*rowbytes; + + + /* now we can go ahead and just read the whole image */ + + png_read_image(png_ptr, row_pointers); + + + /* and we're done! (png_read_end() can be omitted if no processing of + * post-IDAT text/time/etc. is desired) */ + + free(row_pointers); + row_pointers = NULL; + + png_read_end(png_ptr, NULL); + + return image_data; +} + + +void readpng_cleanup(int free_image_data) +{ + if (free_image_data && image_data) { + free(image_data); + image_data = NULL; + } + + if (png_ptr && info_ptr) { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + png_ptr = NULL; + info_ptr = NULL; + } +} diff --git a/gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng.h b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng.h new file mode 100644 index 0000000..1c19aca --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng.h @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------- + + rpng - simple PNG display program readpng.h + + --------------------------------------------------------------------------- + + Copyright (c) 1998-2000 Greg Roelofs. All rights reserved. + + This software is provided "as is," without warranty of any kind, + express or implied. In no event shall the author or contributors + be held liable for any damages arising in any way from the use of + this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute + it freely, subject to the following restrictions: + + 1. Redistributions of source code must retain the above copyright + notice, disclaimer, and this list of conditions. + 2. Redistributions in binary form must reproduce the above copyright + notice, disclaimer, and this list of conditions in the documenta- + tion and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this + software must display the following acknowledgment: + + This product includes software developed by Greg Roelofs + and contributors for the book, "PNG: The Definitive Guide," + published by O'Reilly and Associates. + + ---------------------------------------------------------------------------*/ + +#ifndef TRUE +# define TRUE 1 +# define FALSE 0 +#endif + +#ifndef MAX +# define MAX(a,b) ((a) > (b)? (a) : (b)) +# define MIN(a,b) ((a) < (b)? (a) : (b)) +#endif + +#ifdef DEBUG +# define Trace(x) {fprintf x ; fflush(stderr); fflush(stdout);} +#else +# define Trace(x) ; +#endif + +typedef unsigned char uch; +typedef unsigned short ush; +typedef unsigned long ulg; + + +/* prototypes for public functions in readpng.c */ + +void readpng_version_info(void); + +int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight); + +int readpng_get_bgcolor(uch *bg_red, uch *bg_green, uch *bg_blue); + +uch *readpng_get_image(double display_exponent, int *pChannels, + ulg *pRowbytes); + +void readpng_cleanup(int free_image_data); diff --git a/gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng2.c b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng2.c new file mode 100644 index 0000000..9e66a0b --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng2.c @@ -0,0 +1,624 @@ +/*--------------------------------------------------------------------------- + + rpng2 - progressive-model PNG display program readpng2.c + + --------------------------------------------------------------------------- + + Changelog: + - 1.01: initial public release + - 1.02: added code to skip unused chunks (GR-P) + + --------------------------------------------------------------------------- + + Copyright (c) 1998-2002 Greg Roelofs. All rights reserved. + + This software is provided "as is," without warranty of any kind, + express or implied. In no event shall the author or contributors + be held liable for any damages arising in any way from the use of + this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute + it freely, subject to the following restrictions: + + 1. Redistributions of source code must retain the above copyright + notice, disclaimer, and this list of conditions. + 2. Redistributions in binary form must reproduce the above copyright + notice, disclaimer, and this list of conditions in the documenta- + tion and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this + software must display the following acknowledgment: + + This product includes software developed by Greg Roelofs + and contributors for the book, "PNG: The Definitive Guide," + published by O'Reilly and Associates. + + ---------------------------------------------------------------------------*/ + + +#include /* for exit() prototype */ + +#include "png.h" /* libpng header; includes zlib.h and setjmp.h */ +#include "readpng2.h" /* typedefs, common macros, public prototypes */ + + +/* local prototypes */ + +static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr); +static void readpng2_row_callback(png_structp png_ptr, png_bytep new_row, + png_uint_32 row_num, int pass); +static void readpng2_end_callback(png_structp png_ptr, png_infop info_ptr); +static void readpng2_error_handler(png_structp png_ptr, png_const_charp msg); + + + + +void readpng2_version_info(void) +{ +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && \ + (defined(__i386__) || defined(_M_IX86)) && \ + defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) + /* + * WARNING: This preprocessor approach means that the following code + * cannot be used with a libpng DLL older than 1.2.0--the + * compiled-in symbols for the new functions will not exist. + * (Could use dlopen() and dlsym() on Unix and corresponding + * calls for Windows, but not portable...) + */ + { + int mmxsupport = png_mmx_support(); + if (mmxsupport < 0) + fprintf(stderr, " Compiled with libpng %s; using libpng %s " + "without MMX support.\n", PNG_LIBPNG_VER_STRING, png_libpng_ver); + else { + int compilerID; + png_uint_32 mmx_mask = png_get_mmx_flagmask( + PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID); + + fprintf(stderr, " Compiled with libpng %s; using libpng %s " + "with MMX support\n (%s version).", PNG_LIBPNG_VER_STRING, + png_libpng_ver, compilerID == 1? "MSVC++" : + (compilerID == 2? "GNU C" : "unknown")); + fprintf(stderr, " Processor %s MMX instructions.\n", + mmxsupport? "supports" : "does not support"); + if (mmxsupport > 0) { + int num_optims = 0; + + fprintf(stderr, + " Potential MMX optimizations supported by libpng:\n"); + if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_SUB) + ++num_optims; + if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_UP) + ++num_optims; + if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_AVG) + ++num_optims; + if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH) + ++num_optims; + if (num_optims) + fprintf(stderr, + " decoding %s row filters (reading)\n", + (num_optims == 4)? "all non-trivial" : "some"); + if (mmx_mask & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) { + fprintf(stderr, " combining rows (reading)\n"); + ++num_optims; + } + if (mmx_mask & PNG_ASM_FLAG_MMX_READ_INTERLACE) { + fprintf(stderr, + " expanding interlacing (reading)\n"); + ++num_optims; + } + mmx_mask &= ~( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \ + | PNG_ASM_FLAG_MMX_READ_INTERLACE \ + | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ + | PNG_ASM_FLAG_MMX_READ_FILTER_UP \ + | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ + | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ); + if (mmx_mask) { + fprintf(stderr, " other (unknown)\n"); + ++num_optims; + } + if (num_optims == 0) + fprintf(stderr, " (none)\n"); + } + } + } +#else + fprintf(stderr, " Compiled with libpng %s; using libpng %s " + "without MMX support.\n", PNG_LIBPNG_VER_STRING, png_libpng_ver); +#endif + + fprintf(stderr, " Compiled with zlib %s; using zlib %s.\n", + ZLIB_VERSION, zlib_version); +} + + + + +int readpng2_check_sig(uch *sig, int num) +{ + return png_check_sig(sig, num); +} + + + + +/* returns 0 for success, 2 for libpng problem, 4 for out of memory */ + +int readpng2_init(mainprog_info *mainprog_ptr) +{ + png_structp png_ptr; /* note: temporary variables! */ + png_infop info_ptr; + + + /* could also replace libpng warning-handler (final NULL), but no need: */ + + png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, mainprog_ptr, + readpng2_error_handler, NULL); + if (!png_ptr) + return 4; /* out of memory */ + + info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) { + png_destroy_read_struct(&png_ptr, NULL, NULL); + return 4; /* out of memory */ + } + + + /* we could create a second info struct here (end_info), but it's only + * useful if we want to keep pre- and post-IDAT chunk info separated + * (mainly for PNG-aware image editors and converters) */ + + + /* setjmp() must be called in every function that calls a PNG-reading + * libpng function, unless an alternate error handler was installed-- + * but compatible error handlers must either use longjmp() themselves + * (as in this program) or exit immediately, so here we are: */ + + if (setjmp(mainprog_ptr->jmpbuf)) { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return 2; + } + + /* prepare the reader to ignore all recognized chunks whose data isn't + * going to be used, i.e., all chunks recognized by libpng except for + * IHDR, PLTE, IDAT, IEND, tRNS, bKGD, gAMA, and sRGB : */ + +#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) + { +#ifndef HANDLE_CHUNK_NEVER +/* prior to libpng-1.2.5, this macro was internal, so we define it here. */ +# define HANDLE_CHUNK_NEVER 1 +#endif + /* these byte strings were copied from png.h. + * If a future libpng version recognizes more chunks, add them + * to this list. If a future version of readpng2.c recognizes + * more chunks, delete them from this list. */ + png_byte png_chunk_types_to_ignore[]= + { 99, 72, 82, 77, '\0', /* cHRM */ + 104, 73, 83, 84, '\0', /* hIST */ + 105, 67, 67, 80, '\0', /* iCCP */ + 105, 84, 88, 116, '\0', /* iTXt */ + 111, 70, 70, 115, '\0', /* oFFs */ + 112, 67, 65, 76, '\0', /* pCAL */ + 115, 67, 65, 76, '\0', /* sCAL */ + 112, 72, 89, 115, '\0', /* pHYs */ + 115, 66, 73, 84, '\0', /* sBIT */ + 115, 80, 76, 84, '\0', /* sPLT */ + 116, 69, 88, 116, '\0', /* tEXt */ + 116, 73, 77, 69, '\0', /* tIME */ + 122, 84, 88, 116, '\0'}; /* zTXt */ +#define NUM_PNG_CHUNK_TYPES_TO_IGNORE 13 + + png_set_keep_unknown_chunks(png_ptr, HANDLE_CHUNK_NEVER, + png_chunk_types_to_ignore, NUM_PNG_CHUNK_TYPES_TO_IGNORE); + } +#endif + + /* instead of doing png_init_io() here, now we set up our callback + * functions for progressive decoding */ + + png_set_progressive_read_fn(png_ptr, mainprog_ptr, + readpng2_info_callback, readpng2_row_callback, readpng2_end_callback); + + + /* + * may as well enable or disable MMX routines here, if supported; + * + * to enable all: mask = png_get_mmx_flagmask ( + * PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID); + * flags = png_get_asm_flags (png_ptr); + * flags |= mask; + * png_set_asm_flags (png_ptr, flags); + * + * to disable all: mask = png_get_mmx_flagmask ( + * PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID); + * flags = png_get_asm_flags (png_ptr); + * flags &= ~mask; + * png_set_asm_flags (png_ptr, flags); + */ + +#if (defined(__i386__) || defined(_M_IX86)) && \ + defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) + /* + * WARNING: This preprocessor approach means that the following code + * cannot be used with a libpng DLL older than 1.2.0--the + * compiled-in symbols for the new functions will not exist. + * (Could use dlopen() and dlsym() on Unix and corresponding + * calls for Windows, but not portable...) + */ + { +#ifdef PNG_ASSEMBLER_CODE_SUPPORTED + png_uint_32 mmx_disable_mask = 0; + png_uint_32 asm_flags, mmx_mask; + int compilerID; + + if (mainprog_ptr->nommxfilters) + mmx_disable_mask |= ( PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ + | PNG_ASM_FLAG_MMX_READ_FILTER_UP \ + | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ + | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ); + if (mainprog_ptr->nommxcombine) + mmx_disable_mask |= PNG_ASM_FLAG_MMX_READ_COMBINE_ROW; + if (mainprog_ptr->nommxinterlace) + mmx_disable_mask |= PNG_ASM_FLAG_MMX_READ_INTERLACE; + asm_flags = png_get_asm_flags(png_ptr); + png_set_asm_flags(png_ptr, asm_flags & ~mmx_disable_mask); + + + /* Now query libpng's asm settings, just for yuks. Note that this + * differs from the querying of its *potential* MMX capabilities + * in readpng2_version_info(); this is true runtime verification. */ + + asm_flags = png_get_asm_flags(png_ptr); + mmx_mask = png_get_mmx_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE, + &compilerID); + if (asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_COMPILED) + fprintf(stderr, + " MMX support (%s version) is compiled into libpng\n", + compilerID == 1? "MSVC++" : + (compilerID == 2? "GNU C" : "unknown")); + else + fprintf(stderr, " MMX support is not compiled into libpng\n"); + fprintf(stderr, " MMX instructions are %ssupported by CPU\n", + (asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU)? "" : "not "); + fprintf(stderr, " MMX read support for combining rows is %sabled\n", + (asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)? "en" : "dis"); + fprintf(stderr, + " MMX read support for expanding interlacing is %sabled\n", + (asm_flags & PNG_ASM_FLAG_MMX_READ_INTERLACE)? "en" : "dis"); + fprintf(stderr, " MMX read support for \"sub\" filter is %sabled\n", + (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "en" : "dis"); + fprintf(stderr, " MMX read support for \"up\" filter is %sabled\n", + (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP)? "en" : "dis"); + fprintf(stderr, " MMX read support for \"avg\" filter is %sabled\n", + (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)? "en" : "dis"); + fprintf(stderr, " MMX read support for \"Paeth\" filter is %sabled\n", + (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)? "en" : "dis"); + asm_flags &= (mmx_mask & ~( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \ + | PNG_ASM_FLAG_MMX_READ_INTERLACE \ + | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ + | PNG_ASM_FLAG_MMX_READ_FILTER_UP \ + | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ + | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH )); + if (asm_flags) + fprintf(stderr, + " additional MMX support is also enabled (0x%02lx)\n", + asm_flags); +#else /* !PNG_ASSEMBLER_CODE_SUPPORTED */ + fprintf(stderr, " MMX querying is disabled in libpng.\n"); +#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */ + } +#endif + + + /* make sure we save our pointers for use in readpng2_decode_data() */ + + mainprog_ptr->png_ptr = png_ptr; + mainprog_ptr->info_ptr = info_ptr; + + + /* and that's all there is to initialization */ + + return 0; +} + + + + +/* returns 0 for success, 2 for libpng (longjmp) problem */ + +int readpng2_decode_data(mainprog_info *mainprog_ptr, uch *rawbuf, ulg length) +{ + png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr; + png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr; + + + /* setjmp() must be called in every function that calls a PNG-reading + * libpng function */ + + if (setjmp(mainprog_ptr->jmpbuf)) { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + mainprog_ptr->png_ptr = NULL; + mainprog_ptr->info_ptr = NULL; + return 2; + } + + + /* hand off the next chunk of input data to libpng for decoding */ + + png_process_data(png_ptr, info_ptr, rawbuf, length); + + return 0; +} + + + + +static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr) +{ + mainprog_info *mainprog_ptr; + int color_type, bit_depth; + double gamma; + + + /* setjmp() doesn't make sense here, because we'd either have to exit(), + * longjmp() ourselves, or return control to libpng, which doesn't want + * to see us again. By not doing anything here, libpng will instead jump + * to readpng2_decode_data(), which can return an error value to the main + * program. */ + + + /* retrieve the pointer to our special-purpose struct, using the png_ptr + * that libpng passed back to us (i.e., not a global this time--there's + * no real difference for a single image, but for a multithreaded browser + * decoding several PNG images at the same time, one needs to avoid mixing + * up different images' structs) */ + + mainprog_ptr = png_get_progressive_ptr(png_ptr); + + if (mainprog_ptr == NULL) { /* we be hosed */ + fprintf(stderr, + "readpng2 error: main struct not recoverable in info_callback.\n"); + fflush(stderr); + return; + /* + * Alternatively, we could call our error-handler just like libpng + * does, which would effectively terminate the program. Since this + * can only happen if png_ptr gets redirected somewhere odd or the + * main PNG struct gets wiped, we're probably toast anyway. (If + * png_ptr itself is NULL, we would not have been called.) + */ + } + + + /* this is just like in the non-progressive case */ + + png_get_IHDR(png_ptr, info_ptr, &mainprog_ptr->width, + &mainprog_ptr->height, &bit_depth, &color_type, NULL, NULL, NULL); + + + /* since we know we've read all of the PNG file's "header" (i.e., up + * to IDAT), we can check for a background color here */ + + if (mainprog_ptr->need_bgcolor && + png_get_valid(png_ptr, info_ptr, PNG_INFO_bKGD)) + { + png_color_16p pBackground; + + /* it is not obvious from the libpng documentation, but this function + * takes a pointer to a pointer, and it always returns valid red, + * green and blue values, regardless of color_type: */ + png_get_bKGD(png_ptr, info_ptr, &pBackground); + + /* however, it always returns the raw bKGD data, regardless of any + * bit-depth transformations, so check depth and adjust if necessary */ + if (bit_depth == 16) { + mainprog_ptr->bg_red = pBackground->red >> 8; + mainprog_ptr->bg_green = pBackground->green >> 8; + mainprog_ptr->bg_blue = pBackground->blue >> 8; + } else if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { + if (bit_depth == 1) + mainprog_ptr->bg_red = mainprog_ptr->bg_green = + mainprog_ptr->bg_blue = pBackground->gray? 255 : 0; + else if (bit_depth == 2) + mainprog_ptr->bg_red = mainprog_ptr->bg_green = + mainprog_ptr->bg_blue = (255/3) * pBackground->gray; + else /* bit_depth == 4 */ + mainprog_ptr->bg_red = mainprog_ptr->bg_green = + mainprog_ptr->bg_blue = (255/15) * pBackground->gray; + } else { + mainprog_ptr->bg_red = (uch)pBackground->red; + mainprog_ptr->bg_green = (uch)pBackground->green; + mainprog_ptr->bg_blue = (uch)pBackground->blue; + } + } + + + /* as before, let libpng expand palette images to RGB, low-bit-depth + * grayscale images to 8 bits, transparency chunks to full alpha channel; + * strip 16-bit-per-sample images to 8 bits per sample; and convert + * grayscale to RGB[A] */ + + if (color_type == PNG_COLOR_TYPE_PALETTE) + png_set_expand(png_ptr); + if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) + png_set_expand(png_ptr); + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) + png_set_expand(png_ptr); + if (bit_depth == 16) + png_set_strip_16(png_ptr); + if (color_type == PNG_COLOR_TYPE_GRAY || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_gray_to_rgb(png_ptr); + + + /* Unlike the basic viewer, which was designed to operate on local files, + * this program is intended to simulate a web browser--even though we + * actually read from a local file, too. But because we are pretending + * that most of the images originate on the Internet, we follow the recom- + * mendation of the sRGB proposal and treat unlabelled images (no gAMA + * chunk) as existing in the sRGB color space. That is, we assume that + * such images have a file gamma of 0.45455, which corresponds to a PC-like + * display system. This change in assumptions will have no effect on a + * PC-like system, but on a Mac, SGI, NeXT or other system with a non- + * identity lookup table, it will darken unlabelled images, which effec- + * tively favors images from PC-like systems over those originating on + * the local platform. Note that mainprog_ptr->display_exponent is the + * "gamma" value for the entire display system, i.e., the product of + * LUT_exponent and CRT_exponent. */ + + if (png_get_gAMA(png_ptr, info_ptr, &gamma)) + png_set_gamma(png_ptr, mainprog_ptr->display_exponent, gamma); + else + png_set_gamma(png_ptr, mainprog_ptr->display_exponent, 0.45455); + + + /* we'll let libpng expand interlaced images, too */ + + mainprog_ptr->passes = png_set_interlace_handling(png_ptr); + + + /* all transformations have been registered; now update info_ptr data and + * then get rowbytes and channels */ + + png_read_update_info(png_ptr, info_ptr); + + mainprog_ptr->rowbytes = (int)png_get_rowbytes(png_ptr, info_ptr); + mainprog_ptr->channels = png_get_channels(png_ptr, info_ptr); + + + /* Call the main program to allocate memory for the image buffer and + * initialize windows and whatnot. (The old-style function-pointer + * invocation is used for compatibility with a few supposedly ANSI + * compilers that nevertheless barf on "fn_ptr()"-style syntax.) */ + + (*mainprog_ptr->mainprog_init)(); + + + /* and that takes care of initialization */ + + return; +} + + + + + +static void readpng2_row_callback(png_structp png_ptr, png_bytep new_row, + png_uint_32 row_num, int pass) +{ + mainprog_info *mainprog_ptr; + + + /* first check whether the row differs from the previous pass; if not, + * nothing to combine or display */ + + if (!new_row) + return; + + + /* retrieve the pointer to our special-purpose struct so we can access + * the old rows and image-display callback function */ + + mainprog_ptr = png_get_progressive_ptr(png_ptr); + + + /* save the pass number for optional use by the front end */ + + mainprog_ptr->pass = pass; + + + /* have libpng either combine the new row data with the existing row data + * from previous passes (if interlaced) or else just copy the new row + * into the main program's image buffer */ + + png_progressive_combine_row(png_ptr, mainprog_ptr->row_pointers[row_num], + new_row); + + + /* finally, call the display routine in the main program with the number + * of the row we just updated */ + + (*mainprog_ptr->mainprog_display_row)(row_num); + + + /* and we're ready for more */ + + return; +} + + + + + +static void readpng2_end_callback(png_structp png_ptr, png_infop info_ptr) +{ + mainprog_info *mainprog_ptr; + + + /* retrieve the pointer to our special-purpose struct */ + + mainprog_ptr = png_get_progressive_ptr(png_ptr); + + + /* let the main program know that it should flush any buffered image + * data to the display now and set a "done" flag or whatever, but note + * that it SHOULD NOT DESTROY THE PNG STRUCTS YET--in other words, do + * NOT call readpng2_cleanup() either here or in the finish_display() + * routine; wait until control returns to the main program via + * readpng2_decode_data() */ + + (*mainprog_ptr->mainprog_finish_display)(); + + + /* all done */ + + return; +} + + + + + +void readpng2_cleanup(mainprog_info *mainprog_ptr) +{ + png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr; + png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr; + + if (png_ptr && info_ptr) + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + + mainprog_ptr->png_ptr = NULL; + mainprog_ptr->info_ptr = NULL; +} + + + + + +static void readpng2_error_handler(png_structp png_ptr, png_const_charp msg) +{ + mainprog_info *mainprog_ptr; + + /* This function, aside from the extra step of retrieving the "error + * pointer" (below) and the fact that it exists within the application + * rather than within libpng, is essentially identical to libpng's + * default error handler. The second point is critical: since both + * setjmp() and longjmp() are called from the same code, they are + * guaranteed to have compatible notions of how big a jmp_buf is, + * regardless of whether _BSD_SOURCE or anything else has (or has not) + * been defined. */ + + fprintf(stderr, "readpng2 libpng error: %s\n", msg); + fflush(stderr); + + mainprog_ptr = png_get_error_ptr(png_ptr); + if (mainprog_ptr == NULL) { /* we are completely hosed now */ + fprintf(stderr, + "readpng2 severe error: jmpbuf not recoverable; terminating.\n"); + fflush(stderr); + exit(99); + } + + longjmp(mainprog_ptr->jmpbuf, 1); +} diff --git a/gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng2.h b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng2.h new file mode 100644 index 0000000..7caa9d9 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/readpng2.h @@ -0,0 +1,91 @@ +/*--------------------------------------------------------------------------- + + rpng2 - progressive-model PNG display program readpng2.h + + --------------------------------------------------------------------------- + + Copyright (c) 1998-2001 Greg Roelofs. All rights reserved. + + This software is provided "as is," without warranty of any kind, + express or implied. In no event shall the author or contributors + be held liable for any damages arising in any way from the use of + this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute + it freely, subject to the following restrictions: + + 1. Redistributions of source code must retain the above copyright + notice, disclaimer, and this list of conditions. + 2. Redistributions in binary form must reproduce the above copyright + notice, disclaimer, and this list of conditions in the documenta- + tion and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this + software must display the following acknowledgment: + + This product includes software developed by Greg Roelofs + and contributors for the book, "PNG: The Definitive Guide," + published by O'Reilly and Associates. + + ---------------------------------------------------------------------------*/ + +#ifndef TRUE +# define TRUE 1 +# define FALSE 0 +#endif + +#ifndef MAX +# define MAX(a,b) ((a) > (b)? (a) : (b)) +# define MIN(a,b) ((a) < (b)? (a) : (b)) +#endif + +#ifdef DEBUG +# define Trace(x) {fprintf x ; fflush(stderr); fflush(stdout);} +#else +# define Trace(x) ; +#endif + +typedef unsigned char uch; +typedef unsigned short ush; +typedef unsigned long ulg; + +typedef struct _mainprog_info { + double display_exponent; + ulg width; + ulg height; + void *png_ptr; + void *info_ptr; + void (*mainprog_init)(void); + void (*mainprog_display_row)(ulg row_num); + void (*mainprog_finish_display)(void); + uch *image_data; + uch **row_pointers; + jmp_buf jmpbuf; + int passes; /* not used */ + int pass; + int rowbytes; + int channels; + int need_bgcolor; +#if (defined(__i386__) || defined(_M_IX86)) + int nommxfilters; + int nommxcombine; + int nommxinterlace; +#endif + int done; + uch bg_red; + uch bg_green; + uch bg_blue; +} mainprog_info; + + +/* prototypes for public functions in readpng2.c */ + +void readpng2_version_info(void); + +int readpng2_check_sig(uch *sig, int num); + +int readpng2_init(mainprog_info *mainprog_ptr); + +int readpng2_decode_data(mainprog_info *mainprog_ptr, uch *rawbuf, ulg length); + +void readpng2_cleanup(mainprog_info *mainprog_ptr); diff --git a/gtkmm-osx/libpng-1.2.5/contrib/gregbook/rpng-win.c b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/rpng-win.c new file mode 100644 index 0000000..b84a7fc --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/rpng-win.c @@ -0,0 +1,642 @@ +/*--------------------------------------------------------------------------- + + rpng - simple PNG display program rpng-win.c + + This program decodes and displays PNG images, with gamma correction and + optionally with a user-specified background color (in case the image has + transparency). It is very nearly the most basic PNG viewer possible. + This version is for 32-bit Windows; it may compile under 16-bit Windows + with a little tweaking (or maybe not). + + to do: + - handle quoted command-line args (especially filenames with spaces) + - have minimum window width: oh well + - use %.1023s to simplify truncation of title-bar string? + + --------------------------------------------------------------------------- + + Changelog: + - 1.00: initial public release + - 1.01: modified to allow abbreviated options; fixed long/ulong mis- + match; switched to png_jmpbuf() macro + - 1.02: added extra set of parentheses to png_jmpbuf() macro; fixed + command-line parsing bug + - 1.10: enabled "message window"/console (thanks to David Geldreich) + + --------------------------------------------------------------------------- + + Copyright (c) 1998-2001 Greg Roelofs. All rights reserved. + + This software is provided "as is," without warranty of any kind, + express or implied. In no event shall the author or contributors + be held liable for any damages arising in any way from the use of + this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute + it freely, subject to the following restrictions: + + 1. Redistributions of source code must retain the above copyright + notice, disclaimer, and this list of conditions. + 2. Redistributions in binary form must reproduce the above copyright + notice, disclaimer, and this list of conditions in the documenta- + tion and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this + software must display the following acknowledgment: + + This product includes software developed by Greg Roelofs + and contributors for the book, "PNG: The Definitive Guide," + published by O'Reilly and Associates. + + ---------------------------------------------------------------------------*/ + +#define PROGNAME "rpng-win" +#define LONGNAME "Simple PNG Viewer for Windows" +#define VERSION "1.20 of 28 May 2001" + +#include +#include +#include +#include +#include +#include /* only for _getch() */ + +/* #define DEBUG : this enables the Trace() macros */ + +#include "readpng.h" /* typedefs, common macros, readpng prototypes */ + + +/* could just include png.h, but this macro is the only thing we need + * (name and typedefs changed to local versions); note that side effects + * only happen with alpha (which could easily be avoided with + * "ush acopy = (alpha);") */ + +#define alpha_composite(composite, fg, alpha, bg) { \ + ush temp = ((ush)(fg)*(ush)(alpha) + \ + (ush)(bg)*(ush)(255 - (ush)(alpha)) + (ush)128); \ + (composite) = (uch)((temp + (temp >> 8)) >> 8); \ +} + + +/* local prototypes */ +static int rpng_win_create_window(HINSTANCE hInst, int showmode); +static int rpng_win_display_image(void); +static void rpng_win_cleanup(void); +LRESULT CALLBACK rpng_win_wndproc(HWND, UINT, WPARAM, LPARAM); + + +static char titlebar[1024], *window_name = titlebar; +static char *progname = PROGNAME; +static char *appname = LONGNAME; +static char *icon_name = PROGNAME; /* GRR: not (yet) used */ +static char *filename; +static FILE *infile; + +static char *bgstr; +static uch bg_red=0, bg_green=0, bg_blue=0; + +static double display_exponent; + +static ulg image_width, image_height, image_rowbytes; +static int image_channels; +static uch *image_data; + +/* Windows-specific variables */ +static ulg wimage_rowbytes; +static uch *dib; +static uch *wimage_data; +static BITMAPINFOHEADER *bmih; + +static HWND global_hwnd; + + + + +int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) +{ + char *args[1024]; /* arbitrary limit, but should suffice */ + char *p, *q, **argv = args; + int argc = 0; + int rc, alen, flen; + int error = 0; + int have_bg = FALSE; + double LUT_exponent; /* just the lookup table */ + double CRT_exponent = 2.2; /* just the monitor */ + double default_display_exponent; /* whole display system */ + MSG msg; + + + filename = (char *)NULL; + + + /* First reenable console output, which normally goes to the bit bucket + * for windowed apps. Closing the console window will terminate the + * app. Thanks to David.Geldreich@realviz.com for supplying the magical + * incantation. */ + + AllocConsole(); + freopen("CONOUT$", "a", stderr); + freopen("CONOUT$", "a", stdout); + + + /* Next set the default value for our display-system exponent, i.e., + * the product of the CRT exponent and the exponent corresponding to + * the frame-buffer's lookup table (LUT), if any. This is not an + * exhaustive list of LUT values (e.g., OpenStep has a lot of weird + * ones), but it should cover 99% of the current possibilities. And + * yes, these ifdefs are completely wasted in a Windows program... */ + +#if defined(NeXT) + LUT_exponent = 1.0 / 2.2; + /* + if (some_next_function_that_returns_gamma(&next_gamma)) + LUT_exponent = 1.0 / next_gamma; + */ +#elif defined(sgi) + LUT_exponent = 1.0 / 1.7; + /* there doesn't seem to be any documented function to get the + * "gamma" value, so we do it the hard way */ + infile = fopen("/etc/config/system.glGammaVal", "r"); + if (infile) { + double sgi_gamma; + + fgets(tmpline, 80, infile); + fclose(infile); + sgi_gamma = atof(tmpline); + if (sgi_gamma > 0.0) + LUT_exponent = 1.0 / sgi_gamma; + } +#elif defined(Macintosh) + LUT_exponent = 1.8 / 2.61; + /* + if (some_mac_function_that_returns_gamma(&mac_gamma)) + LUT_exponent = mac_gamma / 2.61; + */ +#else + LUT_exponent = 1.0; /* assume no LUT: most PCs */ +#endif + + /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */ + default_display_exponent = LUT_exponent * CRT_exponent; + + + /* If the user has set the SCREEN_GAMMA environment variable as suggested + * (somewhat imprecisely) in the libpng documentation, use that; otherwise + * use the default value we just calculated. Either way, the user may + * override this via a command-line option. */ + + if ((p = getenv("SCREEN_GAMMA")) != NULL) + display_exponent = atof(p); + else + display_exponent = default_display_exponent; + + + /* Windows really hates command lines, so we have to set up our own argv. + * Note that we do NOT bother with quoted arguments here, so don't use + * filenames with spaces in 'em! */ + + argv[argc++] = PROGNAME; + p = cmd; + for (;;) { + if (*p == ' ') + while (*++p == ' ') + ; + /* now p points at the first non-space after some spaces */ + if (*p == '\0') + break; /* nothing after the spaces: done */ + argv[argc++] = q = p; + while (*q && *q != ' ') + ++q; + /* now q points at a space or the end of the string */ + if (*q == '\0') + break; /* last argv already terminated; quit */ + *q = '\0'; /* change space to terminator */ + p = q + 1; + } + argv[argc] = NULL; /* terminate the argv array itself */ + + + /* Now parse the command line for options and the PNG filename. */ + + while (*++argv && !error) { + if (!strncmp(*argv, "-gamma", 2)) { + if (!*++argv) + ++error; + else { + display_exponent = atof(*argv); + if (display_exponent <= 0.0) + ++error; + } + } else if (!strncmp(*argv, "-bgcolor", 2)) { + if (!*++argv) + ++error; + else { + bgstr = *argv; + if (strlen(bgstr) != 7 || bgstr[0] != '#') + ++error; + else + have_bg = TRUE; + } + } else { + if (**argv != '-') { + filename = *argv; + if (argv[1]) /* shouldn't be any more args after filename */ + ++error; + } else + ++error; /* not expecting any other options */ + } + } + + if (!filename) { + ++error; + } else if (!(infile = fopen(filename, "rb"))) { + fprintf(stderr, PROGNAME ": can't open PNG file [%s]\n", filename); + ++error; + } else { + if ((rc = readpng_init(infile, &image_width, &image_height)) != 0) { + switch (rc) { + case 1: + fprintf(stderr, PROGNAME + ": [%s] is not a PNG file: incorrect signature\n", + filename); + break; + case 2: + fprintf(stderr, PROGNAME + ": [%s] has bad IHDR (libpng longjmp)\n", + filename); + break; + case 4: + fprintf(stderr, PROGNAME ": insufficient memory\n"); + break; + default: + fprintf(stderr, PROGNAME + ": unknown readpng_init() error\n"); + break; + } + ++error; + } + if (error) + fclose(infile); + } + + + /* usage screen */ + + if (error) { + int ch; + + fprintf(stderr, "\n%s %s: %s\n\n", PROGNAME, VERSION, appname); + readpng_version_info(); + fprintf(stderr, "\n" + "Usage: %s [-gamma exp] [-bgcolor bg] file.png\n" + " exp \ttransfer-function exponent (``gamma'') of the display\n" + "\t\t system in floating-point format (e.g., ``%.1f''); equal\n" + "\t\t to the product of the lookup-table exponent (varies)\n" + "\t\t and the CRT exponent (usually 2.2); must be positive\n" + " bg \tdesired background color in 7-character hex RGB format\n" + "\t\t (e.g., ``#ff7700'' for orange: same as HTML colors);\n" + "\t\t used with transparent images\n" + "\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n" + "Press Q or Esc to quit this usage screen.\n" + "\n", PROGNAME, default_display_exponent); + do + ch = _getch(); + while (ch != 'q' && ch != 'Q' && ch != 0x1B); + exit(1); + } else { + fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, appname); + fprintf(stderr, + "\n [console window: closing this window will terminate %s]\n\n", + PROGNAME); + } + + + /* set the title-bar string, but make sure buffer doesn't overflow */ + + alen = strlen(appname); + flen = strlen(filename); + if (alen + flen + 3 > 1023) + sprintf(titlebar, "%s: ...%s", appname, filename+(alen+flen+6-1023)); + else + sprintf(titlebar, "%s: %s", appname, filename); + + + /* if the user didn't specify a background color on the command line, + * check for one in the PNG file--if not, the initialized values of 0 + * (black) will be used */ + + if (have_bg) + sscanf(bgstr+1, "%2x%2x%2x", &bg_red, &bg_green, &bg_blue); + else if (readpng_get_bgcolor(&bg_red, &bg_green, &bg_blue) > 1) { + readpng_cleanup(TRUE); + fprintf(stderr, PROGNAME + ": libpng error while checking for background color\n"); + exit(2); + } + + + /* do the basic Windows initialization stuff, make the window and fill it + * with the background color */ + + if (rpng_win_create_window(hInst, showmode)) + exit(2); + + + /* decode the image, all at once */ + + Trace((stderr, "calling readpng_get_image()\n")) + image_data = readpng_get_image(display_exponent, &image_channels, + &image_rowbytes); + Trace((stderr, "done with readpng_get_image()\n")) + + + /* done with PNG file, so clean up to minimize memory usage (but do NOT + * nuke image_data!) */ + + readpng_cleanup(FALSE); + fclose(infile); + + if (!image_data) { + fprintf(stderr, PROGNAME ": unable to decode PNG image\n"); + exit(3); + } + + + /* display image (composite with background if requested) */ + + Trace((stderr, "calling rpng_win_display_image()\n")) + if (rpng_win_display_image()) { + free(image_data); + exit(4); + } + Trace((stderr, "done with rpng_win_display_image()\n")) + + + /* wait for the user to tell us when to quit */ + + printf( + "Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n"); + fflush(stdout); + + while (GetMessage(&msg, NULL, 0, 0)) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + + + /* OK, we're done: clean up all image and Windows resources and go away */ + + rpng_win_cleanup(); + + return msg.wParam; +} + + + + + +static int rpng_win_create_window(HINSTANCE hInst, int showmode) +{ + uch *dest; + int extra_width, extra_height; + ulg i, j; + WNDCLASSEX wndclass; + + +/*--------------------------------------------------------------------------- + Allocate memory for the display-specific version of the image (round up + to multiple of 4 for Windows DIB). + ---------------------------------------------------------------------------*/ + + wimage_rowbytes = ((3*image_width + 3L) >> 2) << 2; + + if (!(dib = (uch *)malloc(sizeof(BITMAPINFOHEADER) + + wimage_rowbytes*image_height))) + { + return 4; /* fail */ + } + +/*--------------------------------------------------------------------------- + Initialize the DIB. Negative height means to use top-down BMP ordering + (must be uncompressed, but that's what we want). Bit count of 1, 4 or 8 + implies a colormap of RGBX quads, but 24-bit BMPs just use B,G,R values + directly => wimage_data begins immediately after BMP header. + ---------------------------------------------------------------------------*/ + + memset(dib, 0, sizeof(BITMAPINFOHEADER)); + bmih = (BITMAPINFOHEADER *)dib; + bmih->biSize = sizeof(BITMAPINFOHEADER); + bmih->biWidth = image_width; + bmih->biHeight = -((long)image_height); + bmih->biPlanes = 1; + bmih->biBitCount = 24; + bmih->biCompression = 0; + wimage_data = dib + sizeof(BITMAPINFOHEADER); + +/*--------------------------------------------------------------------------- + Fill in background color (black by default); data are in BGR order. + ---------------------------------------------------------------------------*/ + + for (j = 0; j < image_height; ++j) { + dest = wimage_data + j*wimage_rowbytes; + for (i = image_width; i > 0; --i) { + *dest++ = bg_blue; + *dest++ = bg_green; + *dest++ = bg_red; + } + } + +/*--------------------------------------------------------------------------- + Set the window parameters. + ---------------------------------------------------------------------------*/ + + memset(&wndclass, 0, sizeof(wndclass)); + + wndclass.cbSize = sizeof(wndclass); + wndclass.style = CS_HREDRAW | CS_VREDRAW; + wndclass.lpfnWndProc = rpng_win_wndproc; + wndclass.hInstance = hInst; + wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION); + wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); + wndclass.hbrBackground = (HBRUSH)GetStockObject(DKGRAY_BRUSH); + wndclass.lpszMenuName = NULL; + wndclass.lpszClassName = progname; + wndclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION); + + RegisterClassEx(&wndclass); + +/*--------------------------------------------------------------------------- + Finally, create the window. + ---------------------------------------------------------------------------*/ + + extra_width = 2*(GetSystemMetrics(SM_CXBORDER) + + GetSystemMetrics(SM_CXDLGFRAME)); + extra_height = 2*(GetSystemMetrics(SM_CYBORDER) + + GetSystemMetrics(SM_CYDLGFRAME)) + + GetSystemMetrics(SM_CYCAPTION); + + global_hwnd = CreateWindow(progname, titlebar, WS_OVERLAPPEDWINDOW, + CW_USEDEFAULT, CW_USEDEFAULT, image_width+extra_width, + image_height+extra_height, NULL, NULL, hInst, NULL); + + ShowWindow(global_hwnd, showmode); + UpdateWindow(global_hwnd); + + return 0; + +} /* end function rpng_win_create_window() */ + + + + + +static int rpng_win_display_image() +{ + uch *src, *dest; + uch r, g, b, a; + ulg i, row, lastrow; + RECT rect; + + + Trace((stderr, "beginning display loop (image_channels == %d)\n", + image_channels)) + Trace((stderr, "(width = %ld, rowbytes = %ld, wimage_rowbytes = %d)\n", + image_width, image_rowbytes, wimage_rowbytes)) + + +/*--------------------------------------------------------------------------- + Blast image data to buffer. This whole routine takes place before the + message loop begins, so there's no real point in any pseudo-progressive + display... + ---------------------------------------------------------------------------*/ + + for (lastrow = row = 0; row < image_height; ++row) { + src = image_data + row*image_rowbytes; + dest = wimage_data + row*wimage_rowbytes; + if (image_channels == 3) { + for (i = image_width; i > 0; --i) { + r = *src++; + g = *src++; + b = *src++; + *dest++ = b; + *dest++ = g; /* note reverse order */ + *dest++ = r; + } + } else /* if (image_channels == 4) */ { + for (i = image_width; i > 0; --i) { + r = *src++; + g = *src++; + b = *src++; + a = *src++; + if (a == 255) { + *dest++ = b; + *dest++ = g; + *dest++ = r; + } else if (a == 0) { + *dest++ = bg_blue; + *dest++ = bg_green; + *dest++ = bg_red; + } else { + /* this macro (copied from png.h) composites the + * foreground and background values and puts the + * result into the first argument; there are no + * side effects with the first argument */ + alpha_composite(*dest++, b, a, bg_blue); + alpha_composite(*dest++, g, a, bg_green); + alpha_composite(*dest++, r, a, bg_red); + } + } + } + /* display after every 16 lines */ + if (((row+1) & 0xf) == 0) { + rect.left = 0L; + rect.top = (LONG)lastrow; + rect.right = (LONG)image_width; /* possibly off by one? */ + rect.bottom = (LONG)lastrow + 16L; /* possibly off by one? */ + InvalidateRect(global_hwnd, &rect, FALSE); + UpdateWindow(global_hwnd); /* similar to XFlush() */ + lastrow = row + 1; + } + } + + Trace((stderr, "calling final image-flush routine\n")) + if (lastrow < image_height) { + rect.left = 0L; + rect.top = (LONG)lastrow; + rect.right = (LONG)image_width; /* possibly off by one? */ + rect.bottom = (LONG)image_height; /* possibly off by one? */ + InvalidateRect(global_hwnd, &rect, FALSE); + UpdateWindow(global_hwnd); /* similar to XFlush() */ + } + +/* + last param determines whether or not background is wiped before paint + InvalidateRect(global_hwnd, NULL, TRUE); + UpdateWindow(global_hwnd); + */ + + return 0; +} + + + + + +static void rpng_win_cleanup() +{ + if (image_data) { + free(image_data); + image_data = NULL; + } + + if (dib) { + free(dib); + dib = NULL; + } +} + + + + + +LRESULT CALLBACK rpng_win_wndproc(HWND hwnd, UINT iMsg, WPARAM wP, LPARAM lP) +{ + HDC hdc; + PAINTSTRUCT ps; + int rc; + + switch (iMsg) { + case WM_CREATE: + /* one-time processing here, if any */ + return 0; + + case WM_PAINT: + hdc = BeginPaint(hwnd, &ps); + /* dest */ + rc = StretchDIBits(hdc, 0, 0, image_width, image_height, + /* source */ + 0, 0, image_width, image_height, + wimage_data, (BITMAPINFO *)bmih, + /* iUsage: no clue */ + 0, SRCCOPY); + EndPaint(hwnd, &ps); + return 0; + + /* wait for the user to tell us when to quit */ + case WM_CHAR: + switch (wP) { /* only need one, so ignore repeat count */ + case 'q': + case 'Q': + case 0x1B: /* Esc key */ + PostQuitMessage(0); + } + return 0; + + case WM_LBUTTONDOWN: /* another way of quitting */ + case WM_DESTROY: + PostQuitMessage(0); + return 0; + } + + return DefWindowProc(hwnd, iMsg, wP, lP); +} diff --git a/gtkmm-osx/libpng-1.2.5/contrib/gregbook/rpng-x.c b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/rpng-x.c new file mode 100644 index 0000000..e787ef1 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/rpng-x.c @@ -0,0 +1,858 @@ +/*--------------------------------------------------------------------------- + + rpng - simple PNG display program rpng-x.c + + This program decodes and displays PNG images, with gamma correction and + optionally with a user-specified background color (in case the image has + transparency). It is very nearly the most basic PNG viewer possible. + This version is for the X Window System (tested by author under Unix and + by Martin Zinser under OpenVMS; may work under OS/2 with some tweaking). + + to do: + - 8-bit support + - use %.1023s to simplify truncation of title-bar string? + + --------------------------------------------------------------------------- + + Changelog: + - 1.01: initial public release + - 1.02: modified to allow abbreviated options; fixed long/ulong mis- + match; switched to png_jmpbuf() macro + - 1.10: added support for non-default visuals; fixed X pixel-conversion + - 1.11: added extra set of parentheses to png_jmpbuf() macro; fixed + command-line parsing bug + - 1.12: fixed small X memory leak (thanks to Francois Petitjean) + - 1.13: fixed XFreeGC() crash bug + + --------------------------------------------------------------------------- + + Copyright (c) 1998-2001 Greg Roelofs. All rights reserved. + + This software is provided "as is," without warranty of any kind, + express or implied. In no event shall the author or contributors + be held liable for any damages arising in any way from the use of + this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute + it freely, subject to the following restrictions: + + 1. Redistributions of source code must retain the above copyright + notice, disclaimer, and this list of conditions. + 2. Redistributions in binary form must reproduce the above copyright + notice, disclaimer, and this list of conditions in the documenta- + tion and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this + software must display the following acknowledgment: + + This product includes software developed by Greg Roelofs + and contributors for the book, "PNG: The Definitive Guide," + published by O'Reilly and Associates. + + ---------------------------------------------------------------------------*/ + +#define PROGNAME "rpng-x" +#define LONGNAME "Simple PNG Viewer for X" +#define VERSION "1.13 of 16 August 2001" + +#include +#include +#include +#include +#include +#include +#include +#include + +/* #define DEBUG : this enables the Trace() macros */ + +#include "readpng.h" /* typedefs, common macros, readpng prototypes */ + + +/* could just include png.h, but this macro is the only thing we need + * (name and typedefs changed to local versions); note that side effects + * only happen with alpha (which could easily be avoided with + * "ush acopy = (alpha);") */ + +#define alpha_composite(composite, fg, alpha, bg) { \ + ush temp = ((ush)(fg)*(ush)(alpha) + \ + (ush)(bg)*(ush)(255 - (ush)(alpha)) + (ush)128); \ + (composite) = (uch)((temp + (temp >> 8)) >> 8); \ +} + + +/* local prototypes */ +static int rpng_x_create_window(void); +static int rpng_x_display_image(void); +static void rpng_x_cleanup(void); +static int rpng_x_msb(ulg u32val); + + +static char titlebar[1024], *window_name = titlebar; +static char *appname = LONGNAME; +static char *icon_name = PROGNAME; +static char *filename; +static FILE *infile; + +static char *bgstr; +static uch bg_red=0, bg_green=0, bg_blue=0; + +static double display_exponent; + +static ulg image_width, image_height, image_rowbytes; +static int image_channels; +static uch *image_data; + +/* X-specific variables */ +static char *displayname; +static XImage *ximage; +static Display *display; +static int depth; +static Visual *visual; +static XVisualInfo *visual_list; +static int RShift, GShift, BShift; +static ulg RMask, GMask, BMask; +static Window window; +static GC gc; +static Colormap colormap; + +static int have_nondefault_visual = FALSE; +static int have_colormap = FALSE; +static int have_window = FALSE; +static int have_gc = FALSE; +/* +ulg numcolors=0, pixels[256]; +ush reds[256], greens[256], blues[256]; + */ + + + + +int main(int argc, char **argv) +{ +#ifdef sgi + char tmpline[80]; +#endif + char *p; + int rc, alen, flen; + int error = 0; + int have_bg = FALSE; + double LUT_exponent; /* just the lookup table */ + double CRT_exponent = 2.2; /* just the monitor */ + double default_display_exponent; /* whole display system */ + XEvent e; + KeySym k; + + + displayname = (char *)NULL; + filename = (char *)NULL; + + + /* First set the default value for our display-system exponent, i.e., + * the product of the CRT exponent and the exponent corresponding to + * the frame-buffer's lookup table (LUT), if any. This is not an + * exhaustive list of LUT values (e.g., OpenStep has a lot of weird + * ones), but it should cover 99% of the current possibilities. */ + +#if defined(NeXT) + LUT_exponent = 1.0 / 2.2; + /* + if (some_next_function_that_returns_gamma(&next_gamma)) + LUT_exponent = 1.0 / next_gamma; + */ +#elif defined(sgi) + LUT_exponent = 1.0 / 1.7; + /* there doesn't seem to be any documented function to get the + * "gamma" value, so we do it the hard way */ + infile = fopen("/etc/config/system.glGammaVal", "r"); + if (infile) { + double sgi_gamma; + + fgets(tmpline, 80, infile); + fclose(infile); + sgi_gamma = atof(tmpline); + if (sgi_gamma > 0.0) + LUT_exponent = 1.0 / sgi_gamma; + } +#elif defined(Macintosh) + LUT_exponent = 1.8 / 2.61; + /* + if (some_mac_function_that_returns_gamma(&mac_gamma)) + LUT_exponent = mac_gamma / 2.61; + */ +#else + LUT_exponent = 1.0; /* assume no LUT: most PCs */ +#endif + + /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */ + default_display_exponent = LUT_exponent * CRT_exponent; + + + /* If the user has set the SCREEN_GAMMA environment variable as suggested + * (somewhat imprecisely) in the libpng documentation, use that; otherwise + * use the default value we just calculated. Either way, the user may + * override this via a command-line option. */ + + if ((p = getenv("SCREEN_GAMMA")) != NULL) + display_exponent = atof(p); + else + display_exponent = default_display_exponent; + + + /* Now parse the command line for options and the PNG filename. */ + + while (*++argv && !error) { + if (!strncmp(*argv, "-display", 2)) { + if (!*++argv) + ++error; + else + displayname = *argv; + } else if (!strncmp(*argv, "-gamma", 2)) { + if (!*++argv) + ++error; + else { + display_exponent = atof(*argv); + if (display_exponent <= 0.0) + ++error; + } + } else if (!strncmp(*argv, "-bgcolor", 2)) { + if (!*++argv) + ++error; + else { + bgstr = *argv; + if (strlen(bgstr) != 7 || bgstr[0] != '#') + ++error; + else + have_bg = TRUE; + } + } else { + if (**argv != '-') { + filename = *argv; + if (argv[1]) /* shouldn't be any more args after filename */ + ++error; + } else + ++error; /* not expecting any other options */ + } + } + + if (!filename) { + ++error; + } else if (!(infile = fopen(filename, "rb"))) { + fprintf(stderr, PROGNAME ": can't open PNG file [%s]\n", filename); + ++error; + } else { + if ((rc = readpng_init(infile, &image_width, &image_height)) != 0) { + switch (rc) { + case 1: + fprintf(stderr, PROGNAME + ": [%s] is not a PNG file: incorrect signature\n", + filename); + break; + case 2: + fprintf(stderr, PROGNAME + ": [%s] has bad IHDR (libpng longjmp)\n", + filename); + break; + case 4: + fprintf(stderr, PROGNAME ": insufficient memory\n"); + break; + default: + fprintf(stderr, PROGNAME + ": unknown readpng_init() error\n"); + break; + } + ++error; + } else { + display = XOpenDisplay(displayname); + if (!display) { + readpng_cleanup(TRUE); + fprintf(stderr, PROGNAME ": can't open X display [%s]\n", + displayname? displayname : "default"); + ++error; + } + } + if (error) + fclose(infile); + } + + + /* usage screen */ + + if (error) { + fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, appname); + readpng_version_info(); + fprintf(stderr, "\n" + "Usage: %s [-display xdpy] [-gamma exp] [-bgcolor bg] file.png\n" + " xdpy\tname of the target X display (e.g., ``hostname:0'')\n" + " exp \ttransfer-function exponent (``gamma'') of the display\n" + "\t\t system in floating-point format (e.g., ``%.1f''); equal\n" + "\t\t to the product of the lookup-table exponent (varies)\n" + "\t\t and the CRT exponent (usually 2.2); must be positive\n" + " bg \tdesired background color in 7-character hex RGB format\n" + "\t\t (e.g., ``#ff7700'' for orange: same as HTML colors);\n" + "\t\t used with transparent images\n" + "\nPress Q, Esc or mouse button 1 (within image window, after image\n" + "is displayed) to quit.\n" + "\n", PROGNAME, default_display_exponent); + exit(1); + } + + + /* set the title-bar string, but make sure buffer doesn't overflow */ + + alen = strlen(appname); + flen = strlen(filename); + if (alen + flen + 3 > 1023) + sprintf(titlebar, "%s: ...%s", appname, filename+(alen+flen+6-1023)); + else + sprintf(titlebar, "%s: %s", appname, filename); + + + /* if the user didn't specify a background color on the command line, + * check for one in the PNG file--if not, the initialized values of 0 + * (black) will be used */ + + if (have_bg) { + unsigned r, g, b; /* this approach quiets compiler warnings */ + + sscanf(bgstr+1, "%2x%2x%2x", &r, &g, &b); + bg_red = (uch)r; + bg_green = (uch)g; + bg_blue = (uch)b; + } else if (readpng_get_bgcolor(&bg_red, &bg_green, &bg_blue) > 1) { + readpng_cleanup(TRUE); + fprintf(stderr, PROGNAME + ": libpng error while checking for background color\n"); + exit(2); + } + + + /* do the basic X initialization stuff, make the window and fill it + * with the background color */ + + if (rpng_x_create_window()) + exit(2); + + + /* decode the image, all at once */ + + Trace((stderr, "calling readpng_get_image()\n")) + image_data = readpng_get_image(display_exponent, &image_channels, + &image_rowbytes); + Trace((stderr, "done with readpng_get_image()\n")) + + + /* done with PNG file, so clean up to minimize memory usage (but do NOT + * nuke image_data!) */ + + readpng_cleanup(FALSE); + fclose(infile); + + if (!image_data) { + fprintf(stderr, PROGNAME ": unable to decode PNG image\n"); + exit(3); + } + + + /* display image (composite with background if requested) */ + + Trace((stderr, "calling rpng_x_display_image()\n")) + if (rpng_x_display_image()) { + free(image_data); + exit(4); + } + Trace((stderr, "done with rpng_x_display_image()\n")) + + + /* wait for the user to tell us when to quit */ + + printf( + "Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n"); + fflush(stdout); + + do + XNextEvent(display, &e); + while (!(e.type == ButtonPress && e.xbutton.button == Button1) && + !(e.type == KeyPress && /* v--- or 1 for shifted keys */ + ((k = XLookupKeysym(&e.xkey, 0)) == XK_q || k == XK_Escape) )); + + + /* OK, we're done: clean up all image and X resources and go away */ + + rpng_x_cleanup(); + + return 0; +} + + + + + +static int rpng_x_create_window(void) +{ + uch *xdata; + int need_colormap = FALSE; + int screen, pad; + ulg bg_pixel = 0L; + ulg attrmask; + Window root; + XEvent e; + XGCValues gcvalues; + XSetWindowAttributes attr; + XSizeHints *size_hints; + XTextProperty windowName, *pWindowName = &windowName; + XTextProperty iconName, *pIconName = &iconName; + XVisualInfo visual_info; + XWMHints *wm_hints; + + + screen = DefaultScreen(display); + depth = DisplayPlanes(display, screen); + root = RootWindow(display, screen); + +#ifdef DEBUG + XSynchronize(display, True); +#endif + +#if 0 +/* GRR: add 8-bit support */ + if (/* depth != 8 && */ depth != 16 && depth != 24 && depth != 32) { + fprintf(stderr, + "screen depth %d not supported (only 16-, 24- or 32-bit TrueColor)\n", + depth); + return 2; + } + + XMatchVisualInfo(display, screen, depth, + (depth == 8)? PseudoColor : TrueColor, &visual_info); + visual = visual_info.visual; +#else + if (depth != 16 && depth != 24 && depth != 32) { + int visuals_matched = 0; + + Trace((stderr, "default depth is %d: checking other visuals\n", + depth)) + + /* 24-bit first */ + visual_info.screen = screen; + visual_info.depth = 24; + visual_list = XGetVisualInfo(display, + VisualScreenMask | VisualDepthMask, &visual_info, &visuals_matched); + if (visuals_matched == 0) { +/* GRR: add 15-, 16- and 32-bit TrueColor visuals (also DirectColor?) */ + fprintf(stderr, "default screen depth %d not supported, and no" + " 24-bit visuals found\n", depth); + return 2; + } + Trace((stderr, "XGetVisualInfo() returned %d 24-bit visuals\n", + visuals_matched)) + visual = visual_list[0].visual; + depth = visual_list[0].depth; +/* + colormap_size = visual_list[0].colormap_size; + visual_class = visual->class; + visualID = XVisualIDFromVisual(visual); + */ + have_nondefault_visual = TRUE; + need_colormap = TRUE; + } else { + XMatchVisualInfo(display, screen, depth, TrueColor, &visual_info); + visual = visual_info.visual; + } +#endif + + RMask = visual->red_mask; + GMask = visual->green_mask; + BMask = visual->blue_mask; + +/* GRR: add/check 8-bit support */ + if (depth == 8 || need_colormap) { + colormap = XCreateColormap(display, root, visual, AllocNone); + if (!colormap) { + fprintf(stderr, "XCreateColormap() failed\n"); + return 2; + } + have_colormap = TRUE; + } + if (depth == 15 || depth == 16) { + RShift = 15 - rpng_x_msb(RMask); /* these are right-shifts */ + GShift = 15 - rpng_x_msb(GMask); + BShift = 15 - rpng_x_msb(BMask); + } else if (depth > 16) { +#define NO_24BIT_MASKS +#ifdef NO_24BIT_MASKS + RShift = rpng_x_msb(RMask) - 7; /* these are left-shifts */ + GShift = rpng_x_msb(GMask) - 7; + BShift = rpng_x_msb(BMask) - 7; +#else + RShift = 7 - rpng_x_msb(RMask); /* these are right-shifts, too */ + GShift = 7 - rpng_x_msb(GMask); + BShift = 7 - rpng_x_msb(BMask); +#endif + } + if (depth >= 15 && (RShift < 0 || GShift < 0 || BShift < 0)) { + fprintf(stderr, "rpng internal logic error: negative X shift(s)!\n"); + return 2; + } + +/*--------------------------------------------------------------------------- + Finally, create the window. + ---------------------------------------------------------------------------*/ + + attr.backing_store = Always; + attr.event_mask = ExposureMask | KeyPressMask | ButtonPressMask; + attrmask = CWBackingStore | CWEventMask; + if (have_nondefault_visual) { + attr.colormap = colormap; + attr.background_pixel = 0; + attr.border_pixel = 1; + attrmask |= CWColormap | CWBackPixel | CWBorderPixel; + } + + window = XCreateWindow(display, root, 0, 0, image_width, image_height, 0, + depth, InputOutput, visual, attrmask, &attr); + + if (window == None) { + fprintf(stderr, "XCreateWindow() failed\n"); + return 2; + } else + have_window = TRUE; + + if (depth == 8) + XSetWindowColormap(display, window, colormap); + + if (!XStringListToTextProperty(&window_name, 1, pWindowName)) + pWindowName = NULL; + if (!XStringListToTextProperty(&icon_name, 1, pIconName)) + pIconName = NULL; + + /* OK if either hints allocation fails; XSetWMProperties() allows NULLs */ + + if ((size_hints = XAllocSizeHints()) != NULL) { + /* window will not be resizable */ + size_hints->flags = PMinSize | PMaxSize; + size_hints->min_width = size_hints->max_width = (int)image_width; + size_hints->min_height = size_hints->max_height = (int)image_height; + } + + if ((wm_hints = XAllocWMHints()) != NULL) { + wm_hints->initial_state = NormalState; + wm_hints->input = True; + /* wm_hints->icon_pixmap = icon_pixmap; */ + wm_hints->flags = StateHint | InputHint /* | IconPixmapHint */ ; + } + + XSetWMProperties(display, window, pWindowName, pIconName, NULL, 0, + size_hints, wm_hints, NULL); + + /* various properties and hints no longer needed; free memory */ + if (pWindowName) + XFree(pWindowName->value); + if (pIconName) + XFree(pIconName->value); + if (size_hints) + XFree(size_hints); + if (wm_hints) + XFree(wm_hints); + + XMapWindow(display, window); + + gc = XCreateGC(display, window, 0, &gcvalues); + have_gc = TRUE; + +/*--------------------------------------------------------------------------- + Fill window with the specified background color. + ---------------------------------------------------------------------------*/ + + if (depth == 24 || depth == 32) { + bg_pixel = ((ulg)bg_red << RShift) | + ((ulg)bg_green << GShift) | + ((ulg)bg_blue << BShift); + } else if (depth == 16) { + bg_pixel = ((((ulg)bg_red << 8) >> RShift) & RMask) | + ((((ulg)bg_green << 8) >> GShift) & GMask) | + ((((ulg)bg_blue << 8) >> BShift) & BMask); + } else /* depth == 8 */ { + + /* GRR: add 8-bit support */ + + } + + XSetForeground(display, gc, bg_pixel); + XFillRectangle(display, window, gc, 0, 0, image_width, image_height); + +/*--------------------------------------------------------------------------- + Wait for first Expose event to do any drawing, then flush. + ---------------------------------------------------------------------------*/ + + do + XNextEvent(display, &e); + while (e.type != Expose || e.xexpose.count); + + XFlush(display); + +/*--------------------------------------------------------------------------- + Allocate memory for the X- and display-specific version of the image. + ---------------------------------------------------------------------------*/ + + if (depth == 24 || depth == 32) { + xdata = (uch *)malloc(4*image_width*image_height); + pad = 32; + } else if (depth == 16) { + xdata = (uch *)malloc(2*image_width*image_height); + pad = 16; + } else /* depth == 8 */ { + xdata = (uch *)malloc(image_width*image_height); + pad = 8; + } + + if (!xdata) { + fprintf(stderr, PROGNAME ": unable to allocate image memory\n"); + return 4; + } + + ximage = XCreateImage(display, visual, depth, ZPixmap, 0, + (char *)xdata, image_width, image_height, pad, 0); + + if (!ximage) { + fprintf(stderr, PROGNAME ": XCreateImage() failed\n"); + free(xdata); + return 3; + } + + /* to avoid testing the byte order every pixel (or doubling the size of + * the drawing routine with a giant if-test), we arbitrarily set the byte + * order to MSBFirst and let Xlib worry about inverting things on little- + * endian machines (like Linux/x86, old VAXen, etc.)--this is not the most + * efficient approach (the giant if-test would be better), but in the + * interest of clarity, we take the easy way out... */ + + ximage->byte_order = MSBFirst; + + return 0; + +} /* end function rpng_x_create_window() */ + + + + + +static int rpng_x_display_image(void) +{ + uch *src; + char *dest; + uch r, g, b, a; + ulg i, row, lastrow = 0; + ulg pixel; + int ximage_rowbytes = ximage->bytes_per_line; +/* int bpp = ximage->bits_per_pixel; */ + + + Trace((stderr, "beginning display loop (image_channels == %d)\n", + image_channels)) + Trace((stderr, " (width = %ld, rowbytes = %ld, ximage_rowbytes = %d)\n", + image_width, image_rowbytes, ximage_rowbytes)) + Trace((stderr, " (bpp = %d)\n", ximage->bits_per_pixel)) + Trace((stderr, " (byte_order = %s)\n", ximage->byte_order == MSBFirst? + "MSBFirst" : (ximage->byte_order == LSBFirst? "LSBFirst" : "unknown"))) + + if (depth == 24 || depth == 32) { + ulg red, green, blue; + + for (lastrow = row = 0; row < image_height; ++row) { + src = image_data + row*image_rowbytes; + dest = ximage->data + row*ximage_rowbytes; + if (image_channels == 3) { + for (i = image_width; i > 0; --i) { + red = *src++; + green = *src++; + blue = *src++; +#ifdef NO_24BIT_MASKS + pixel = (red << RShift) | + (green << GShift) | + (blue << BShift); + /* recall that we set ximage->byte_order = MSBFirst above */ + /* GRR BUG: this assumes bpp == 32, but may be 24: */ + *dest++ = (char)((pixel >> 24) & 0xff); + *dest++ = (char)((pixel >> 16) & 0xff); + *dest++ = (char)((pixel >> 8) & 0xff); + *dest++ = (char)( pixel & 0xff); +#else + red = (RShift < 0)? red << (-RShift) : red >> RShift; + green = (GShift < 0)? green << (-GShift) : green >> GShift; + blue = (BShift < 0)? blue << (-BShift) : blue >> BShift; + pixel = (red & RMask) | (green & GMask) | (blue & BMask); + /* recall that we set ximage->byte_order = MSBFirst above */ + *dest++ = (char)((pixel >> 24) & 0xff); + *dest++ = (char)((pixel >> 16) & 0xff); + *dest++ = (char)((pixel >> 8) & 0xff); + *dest++ = (char)( pixel & 0xff); +#endif + } + } else /* if (image_channels == 4) */ { + for (i = image_width; i > 0; --i) { + r = *src++; + g = *src++; + b = *src++; + a = *src++; + if (a == 255) { + red = r; + green = g; + blue = b; + } else if (a == 0) { + red = bg_red; + green = bg_green; + blue = bg_blue; + } else { + /* this macro (from png.h) composites the foreground + * and background values and puts the result into the + * first argument */ + alpha_composite(red, r, a, bg_red); + alpha_composite(green, g, a, bg_green); + alpha_composite(blue, b, a, bg_blue); + } + pixel = (red << RShift) | + (green << GShift) | + (blue << BShift); + /* recall that we set ximage->byte_order = MSBFirst above */ + *dest++ = (char)((pixel >> 24) & 0xff); + *dest++ = (char)((pixel >> 16) & 0xff); + *dest++ = (char)((pixel >> 8) & 0xff); + *dest++ = (char)( pixel & 0xff); + } + } + /* display after every 16 lines */ + if (((row+1) & 0xf) == 0) { + XPutImage(display, window, gc, ximage, 0, (int)lastrow, 0, + (int)lastrow, image_width, 16); + XFlush(display); + lastrow = row + 1; + } + } + + } else if (depth == 16) { + ush red, green, blue; + + for (lastrow = row = 0; row < image_height; ++row) { + src = image_data + row*image_rowbytes; + dest = ximage->data + row*ximage_rowbytes; + if (image_channels == 3) { + for (i = image_width; i > 0; --i) { + red = ((ush)(*src) << 8); + ++src; + green = ((ush)(*src) << 8); + ++src; + blue = ((ush)(*src) << 8); + ++src; + pixel = ((red >> RShift) & RMask) | + ((green >> GShift) & GMask) | + ((blue >> BShift) & BMask); + /* recall that we set ximage->byte_order = MSBFirst above */ + *dest++ = (char)((pixel >> 8) & 0xff); + *dest++ = (char)( pixel & 0xff); + } + } else /* if (image_channels == 4) */ { + for (i = image_width; i > 0; --i) { + r = *src++; + g = *src++; + b = *src++; + a = *src++; + if (a == 255) { + red = ((ush)r << 8); + green = ((ush)g << 8); + blue = ((ush)b << 8); + } else if (a == 0) { + red = ((ush)bg_red << 8); + green = ((ush)bg_green << 8); + blue = ((ush)bg_blue << 8); + } else { + /* this macro (from png.h) composites the foreground + * and background values and puts the result back into + * the first argument (== fg byte here: safe) */ + alpha_composite(r, r, a, bg_red); + alpha_composite(g, g, a, bg_green); + alpha_composite(b, b, a, bg_blue); + red = ((ush)r << 8); + green = ((ush)g << 8); + blue = ((ush)b << 8); + } + pixel = ((red >> RShift) & RMask) | + ((green >> GShift) & GMask) | + ((blue >> BShift) & BMask); + /* recall that we set ximage->byte_order = MSBFirst above */ + *dest++ = (char)((pixel >> 8) & 0xff); + *dest++ = (char)( pixel & 0xff); + } + } + /* display after every 16 lines */ + if (((row+1) & 0xf) == 0) { + XPutImage(display, window, gc, ximage, 0, (int)lastrow, 0, + (int)lastrow, image_width, 16); + XFlush(display); + lastrow = row + 1; + } + } + + } else /* depth == 8 */ { + + /* GRR: add 8-bit support */ + + } + + Trace((stderr, "calling final XPutImage()\n")) + if (lastrow < image_height) { + XPutImage(display, window, gc, ximage, 0, (int)lastrow, 0, + (int)lastrow, image_width, image_height-lastrow); + XFlush(display); + } + + return 0; +} + + + + +static void rpng_x_cleanup(void) +{ + if (image_data) { + free(image_data); + image_data = NULL; + } + + if (ximage) { + if (ximage->data) { + free(ximage->data); /* we allocated it, so we free it */ + ximage->data = (char *)NULL; /* instead of XDestroyImage() */ + } + XDestroyImage(ximage); + ximage = NULL; + } + + if (have_gc) + XFreeGC(display, gc); + + if (have_window) + XDestroyWindow(display, window); + + if (have_colormap) + XFreeColormap(display, colormap); + + if (have_nondefault_visual) + XFree(visual_list); +} + + + + + +static int rpng_x_msb(ulg u32val) +{ + int i; + + for (i = 31; i >= 0; --i) { + if (u32val & 0x80000000L) + break; + u32val <<= 1; + } + return i; +} diff --git a/gtkmm-osx/libpng-1.2.5/contrib/gregbook/rpng2-win.c b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/rpng2-win.c new file mode 100644 index 0000000..0c1a9d1 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/rpng2-win.c @@ -0,0 +1,1166 @@ +/*--------------------------------------------------------------------------- + + rpng2 - progressive-model PNG display program rpng2-win.c + + This program decodes and displays PNG files progressively, as if it were + a web browser (though the front end is only set up to read from files). + It supports gamma correction, user-specified background colors, and user- + specified background patterns (for transparent images). This version is + for 32-bit Windows; it may compile under 16-bit Windows with a little + tweaking (or maybe not). Thanks to Adam Costello and Pieter S. van der + Meulen for the "diamond" and "radial waves" patterns, respectively. + + to do: + - handle quoted command-line args (especially filenames with spaces) + - finish resizable checkerboard-gradient (sizes 4-128?) + - use %.1023s to simplify truncation of title-bar string? + - have minimum window width: oh well + + --------------------------------------------------------------------------- + + Changelog: + - 1.01: initial public release + - 1.02: fixed cut-and-paste error in usage screen (oops...) + - 1.03: modified to allow abbreviated options + - 1.04: removed bogus extra argument from usage fprintf() [Glenn R-P?]; + fixed command-line parsing bug + - 1.10: enabled "message window"/console (thanks to David Geldreich) + - 1.20: added runtime MMX-enabling/disabling and new -mmx* options + - 1.21: made minor tweak to usage screen to fit within 25-line console + + --------------------------------------------------------------------------- + + Copyright (c) 1998-2001 Greg Roelofs. All rights reserved. + + This software is provided "as is," without warranty of any kind, + express or implied. In no event shall the author or contributors + be held liable for any damages arising in any way from the use of + this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute + it freely, subject to the following restrictions: + + 1. Redistributions of source code must retain the above copyright + notice, disclaimer, and this list of conditions. + 2. Redistributions in binary form must reproduce the above copyright + notice, disclaimer, and this list of conditions in the documenta- + tion and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this + software must display the following acknowledgment: + + This product includes software developed by Greg Roelofs + and contributors for the book, "PNG: The Definitive Guide," + published by O'Reilly and Associates. + + ---------------------------------------------------------------------------*/ + +#define PROGNAME "rpng2-win" +#define LONGNAME "Progressive PNG Viewer for Windows" +#define VERSION "1.21 of 29 June 2001" + +#include +#include +#include +#include /* for jmpbuf declaration in readpng2.h */ +#include +#include /* only for PvdM background code */ +#include +#include /* only for _getch() */ + +/* all for PvdM background code: */ +#ifndef PI +# define PI 3.141592653589793238 +#endif +#define PI_2 (PI*0.5) +#define INV_PI_360 (360.0 / PI) +#define MAX(a,b) (a>b?a:b) +#define MIN(a,b) (a> 8)) >> 8); \ +} + + +#define INBUFSIZE 4096 /* with pseudo-timing on (1 sec delay/block), this + * block size corresponds roughly to a download + * speed 10% faster than theoretical 33.6K maximum + * (assuming 8 data bits, 1 stop bit and no other + * overhead) */ + +/* local prototypes */ +static void rpng2_win_init(void); +static int rpng2_win_create_window(void); +static int rpng2_win_load_bg_image(void); +static void rpng2_win_display_row(ulg row); +static void rpng2_win_finish_display(void); +static void rpng2_win_cleanup(void); +LRESULT CALLBACK rpng2_win_wndproc(HWND, UINT, WPARAM, LPARAM); + + +static char titlebar[1024], *window_name = titlebar; +static char *progname = PROGNAME; +static char *appname = LONGNAME; +static char *icon_name = PROGNAME; /* GRR: not (yet) used */ +static char *filename; +static FILE *infile; + +static mainprog_info rpng2_info; + +static uch inbuf[INBUFSIZE]; +static int incount; + +static int pat = 6; /* must be less than num_bgpat */ +static int bg_image = 0; +static int bgscale = 16; +static ulg bg_rowbytes; +static uch *bg_data; + +static struct rgb_color { + uch r, g, b; +} rgb[] = { + { 0, 0, 0}, /* 0: black */ + {255, 255, 255}, /* 1: white */ + {173, 132, 57}, /* 2: tan */ + { 64, 132, 0}, /* 3: medium green */ + {189, 117, 1}, /* 4: gold */ + {253, 249, 1}, /* 5: yellow */ + { 0, 0, 255}, /* 6: blue */ + { 0, 0, 120}, /* 7: medium blue */ + {255, 0, 255}, /* 8: magenta */ + { 64, 0, 64}, /* 9: dark magenta */ + {255, 0, 0}, /* 10: red */ + { 64, 0, 0}, /* 11: dark red */ + {255, 127, 0}, /* 12: orange */ + {192, 96, 0}, /* 13: darker orange */ + { 24, 60, 0}, /* 14: dark green-yellow */ + { 85, 125, 200} /* 15: ice blue */ +}; +/* not used for now, but should be for error-checking: +static int num_rgb = sizeof(rgb) / sizeof(struct rgb_color); + */ + +/* + This whole struct is a fairly cheesy way to keep the number of + command-line options to a minimum. The radial-waves background + type is a particularly poor fit to the integer elements of the + struct...but a few macros and a little fixed-point math will do + wonders for ya. + + type bits: + F E D C B A 9 8 7 6 5 4 3 2 1 0 + | | | | | + | | +-+-+-- 0 = sharp-edged checkerboard + | | 1 = soft diamonds + | | 2 = radial waves + | | 3-7 = undefined + | +-- gradient #2 inverted? + +-- alternating columns inverted? + */ +static struct background_pattern { + ush type; + int rgb1_max, rgb1_min; /* or bg_freq, bg_gray */ + int rgb2_max, rgb2_min; /* or bg_bsat, bg_brot (both scaled by 10)*/ +} bg[] = { + {0+8, 2,0, 1,15}, /* checkered: tan/black vs. white/ice blue */ + {0+24, 2,0, 1,0}, /* checkered: tan/black vs. white/black */ + {0+8, 4,5, 0,2}, /* checkered: gold/yellow vs. black/tan */ + {0+8, 4,5, 0,6}, /* checkered: gold/yellow vs. black/blue */ + {0, 7,0, 8,9}, /* checkered: deep blue/black vs. magenta */ + {0+8, 13,0, 5,14}, /* checkered: orange/black vs. yellow */ + {0+8, 12,0, 10,11}, /* checkered: orange/black vs. red */ + {1, 7,0, 8,0}, /* diamonds: deep blue/black vs. magenta */ + {1, 12,0, 11,0}, /* diamonds: orange vs. dark red */ + {1, 10,0, 7,0}, /* diamonds: red vs. medium blue */ + {1, 4,0, 5,0}, /* diamonds: gold vs. yellow */ + {1, 3,0, 0,0}, /* diamonds: medium green vs. black */ + {2, 16, 100, 20, 0}, /* radial: ~hard radial color-beams */ + {2, 18, 100, 10, 2}, /* radial: soft, curved radial color-beams */ + {2, 16, 256, 100, 250}, /* radial: very tight spiral */ + {2, 10000, 256, 11, 0} /* radial: dipole-moire' (almost fractal) */ +}; +static int num_bgpat = sizeof(bg) / sizeof(struct background_pattern); + + +/* Windows-specific global variables (could go in struct, but messy...) */ +static ulg wimage_rowbytes; +static uch *dib; +static uch *wimage_data; +static BITMAPINFOHEADER *bmih; + +static HWND global_hwnd; +static HINSTANCE global_hInst; +static int global_showmode; + + + + +int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) +{ + char *args[1024]; /* arbitrary limit, but should suffice */ + char **argv = args; + char *p, *q, *bgstr = NULL; + int argc = 0; + int rc, alen, flen; + int error = 0; + int timing = FALSE; + int have_bg = FALSE; + double LUT_exponent; /* just the lookup table */ + double CRT_exponent = 2.2; /* just the monitor */ + double default_display_exponent; /* whole display system */ + MSG msg; + + + /* First initialize a few things, just to be sure--memset takes care of + * default background color (black), booleans (FALSE), pointers (NULL), + * etc. */ + + global_hInst = hInst; + global_showmode = showmode; + filename = (char *)NULL; + memset(&rpng2_info, 0, sizeof(mainprog_info)); + + + /* Next reenable console output, which normally goes to the bit bucket + * for windowed apps. Closing the console window will terminate the + * app. Thanks to David.Geldreich@realviz.com for supplying the magical + * incantation. */ + + AllocConsole(); + freopen("CONOUT$", "a", stderr); + freopen("CONOUT$", "a", stdout); + + + /* Set the default value for our display-system exponent, i.e., the + * product of the CRT exponent and the exponent corresponding to + * the frame-buffer's lookup table (LUT), if any. This is not an + * exhaustive list of LUT values (e.g., OpenStep has a lot of weird + * ones), but it should cover 99% of the current possibilities. And + * yes, these ifdefs are completely wasted in a Windows program... */ + +#if defined(NeXT) + /* third-party utilities can modify the default LUT exponent */ + LUT_exponent = 1.0 / 2.2; + /* + if (some_next_function_that_returns_gamma(&next_gamma)) + LUT_exponent = 1.0 / next_gamma; + */ +#elif defined(sgi) + LUT_exponent = 1.0 / 1.7; + /* there doesn't seem to be any documented function to + * get the "gamma" value, so we do it the hard way */ + infile = fopen("/etc/config/system.glGammaVal", "r"); + if (infile) { + double sgi_gamma; + + fgets(tmpline, 80, infile); + fclose(infile); + sgi_gamma = atof(tmpline); + if (sgi_gamma > 0.0) + LUT_exponent = 1.0 / sgi_gamma; + } +#elif defined(Macintosh) + LUT_exponent = 1.8 / 2.61; + /* + if (some_mac_function_that_returns_gamma(&mac_gamma)) + LUT_exponent = mac_gamma / 2.61; + */ +#else + LUT_exponent = 1.0; /* assume no LUT: most PCs */ +#endif + + /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */ + default_display_exponent = LUT_exponent * CRT_exponent; + + + /* If the user has set the SCREEN_GAMMA environment variable as suggested + * (somewhat imprecisely) in the libpng documentation, use that; otherwise + * use the default value we just calculated. Either way, the user may + * override this via a command-line option. */ + + if ((p = getenv("SCREEN_GAMMA")) != NULL) + rpng2_info.display_exponent = atof(p); + else + rpng2_info.display_exponent = default_display_exponent; + + + /* Windows really hates command lines, so we have to set up our own argv. + * Note that we do NOT bother with quoted arguments here, so don't use + * filenames with spaces in 'em! */ + + argv[argc++] = PROGNAME; + p = cmd; + for (;;) { + if (*p == ' ') + while (*++p == ' ') + ; + /* now p points at the first non-space after some spaces */ + if (*p == '\0') + break; /* nothing after the spaces: done */ + argv[argc++] = q = p; + while (*q && *q != ' ') + ++q; + /* now q points at a space or the end of the string */ + if (*q == '\0') + break; /* last argv already terminated; quit */ + *q = '\0'; /* change space to terminator */ + p = q + 1; + } + argv[argc] = NULL; /* terminate the argv array itself */ + + + /* Now parse the command line for options and the PNG filename. */ + + while (*++argv && !error) { + if (!strncmp(*argv, "-gamma", 2)) { + if (!*++argv) + ++error; + else { + rpng2_info.display_exponent = atof(*argv); + if (rpng2_info.display_exponent <= 0.0) + ++error; + } + } else if (!strncmp(*argv, "-bgcolor", 4)) { + if (!*++argv) + ++error; + else { + bgstr = *argv; + if (strlen(bgstr) != 7 || bgstr[0] != '#') + ++error; + else { + have_bg = TRUE; + bg_image = FALSE; + } + } + } else if (!strncmp(*argv, "-bgpat", 4)) { + if (!*++argv) + ++error; + else { + pat = atoi(*argv) - 1; + if (pat < 0 || pat >= num_bgpat) + ++error; + else { + bg_image = TRUE; + have_bg = FALSE; + } + } + } else if (!strncmp(*argv, "-timing", 2)) { + timing = TRUE; +#if (defined(__i386__) || defined(_M_IX86)) + } else if (!strncmp(*argv, "-nommxfilters", 7)) { + rpng2_info.nommxfilters = TRUE; + } else if (!strncmp(*argv, "-nommxcombine", 7)) { + rpng2_info.nommxcombine = TRUE; + } else if (!strncmp(*argv, "-nommxinterlace", 7)) { + rpng2_info.nommxinterlace = TRUE; + } else if (!strcmp(*argv, "-nommx")) { + rpng2_info.nommxfilters = TRUE; + rpng2_info.nommxcombine = TRUE; + rpng2_info.nommxinterlace = TRUE; +#endif + } else { + if (**argv != '-') { + filename = *argv; + if (argv[1]) /* shouldn't be any more args after filename */ + ++error; + } else + ++error; /* not expecting any other options */ + } + } + + if (!filename) { + ++error; + } else if (!(infile = fopen(filename, "rb"))) { + fprintf(stderr, PROGNAME ": can't open PNG file [%s]\n", filename); + ++error; + } else { + incount = fread(inbuf, 1, INBUFSIZE, infile); + if (incount < 8 || !readpng2_check_sig(inbuf, 8)) { + fprintf(stderr, PROGNAME + ": [%s] is not a PNG file: incorrect signature\n", + filename); + ++error; + } else if ((rc = readpng2_init(&rpng2_info)) != 0) { + switch (rc) { + case 2: + fprintf(stderr, PROGNAME + ": [%s] has bad IHDR (libpng longjmp)\n", + filename); + break; + case 4: + fprintf(stderr, PROGNAME ": insufficient memory\n"); + break; + default: + fprintf(stderr, PROGNAME + ": unknown readpng2_init() error\n"); + break; + } + ++error; + } + if (error) + fclose(infile); + } + + + /* usage screen */ + + if (error) { + int ch; + + fprintf(stderr, "\n%s %s: %s\n\n", PROGNAME, VERSION, appname); + readpng2_version_info(); + fprintf(stderr, "\n" + "Usage: %s [-gamma exp] [-bgcolor bg | -bgpat pat] [-timing]\n" +#if (defined(__i386__) || defined(_M_IX86)) + " %*s [[-nommxfilters] [-nommxcombine] [-nommxinterlace] | -nommx]\n" +#endif + " %*s file.png\n\n" + " exp \ttransfer-function exponent (``gamma'') of the display\n" + "\t\t system in floating-point format (e.g., ``%.1f''); equal\n" + "\t\t to the product of the lookup-table exponent (varies)\n" + "\t\t and the CRT exponent (usually 2.2); must be positive\n" + " bg \tdesired background color in 7-character hex RGB format\n" + "\t\t (e.g., ``#ff7700'' for orange: same as HTML colors);\n" + "\t\t used with transparent images; overrides -bgpat option\n" + " pat \tdesired background pattern number (1-%d); used with\n" + "\t\t transparent images; overrides -bgcolor option\n" + " -timing\tenables delay for every block read, to simulate modem\n" + "\t\t download of image (~36 Kbps)\n" +#if (defined(__i386__) || defined(_M_IX86)) + " -nommx*\tdisable optimized MMX routines for decoding row filters,\n" + "\t\t combining rows, and expanding interlacing, respectively\n" +#endif + "\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n" + "Press Q or Esc to quit this usage screen. ", + PROGNAME, +#if (defined(__i386__) || defined(_M_IX86)) + strlen(PROGNAME), " ", +#endif + strlen(PROGNAME), " ", default_display_exponent, num_bgpat); + fflush(stderr); + do + ch = _getch(); + while (ch != 'q' && ch != 'Q' && ch != 0x1B); + exit(1); + } else { + fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, appname); + fprintf(stderr, + "\n [console window: closing this window will terminate %s]\n\n", + PROGNAME); + fflush(stderr); + } + + + /* set the title-bar string, but make sure buffer doesn't overflow */ + + alen = strlen(appname); + flen = strlen(filename); + if (alen + flen + 3 > 1023) + sprintf(titlebar, "%s: ...%s", appname, filename+(alen+flen+6-1023)); + else + sprintf(titlebar, "%s: %s", appname, filename); + + + /* set some final rpng2_info variables before entering main data loop */ + + if (have_bg) { + unsigned r, g, b; /* this approach quiets compiler warnings */ + + sscanf(bgstr+1, "%2x%2x%2x", &r, &g, &b); + rpng2_info.bg_red = (uch)r; + rpng2_info.bg_green = (uch)g; + rpng2_info.bg_blue = (uch)b; + } else + rpng2_info.need_bgcolor = TRUE; + + rpng2_info.done = FALSE; + rpng2_info.mainprog_init = rpng2_win_init; + rpng2_info.mainprog_display_row = rpng2_win_display_row; + rpng2_info.mainprog_finish_display = rpng2_win_finish_display; + + + /* OK, this is the fun part: call readpng2_decode_data() at the start of + * the loop to deal with our first buffer of data (read in above to verify + * that the file is a PNG image), then loop through the file and continue + * calling the same routine to handle each chunk of data. It in turn + * passes the data to libpng, which will invoke one or more of our call- + * backs as decoded data become available. We optionally call Sleep() for + * one second per iteration to simulate downloading the image via an analog + * modem. */ + + for (;;) { + Trace((stderr, "about to call readpng2_decode_data()\n")) + if (readpng2_decode_data(&rpng2_info, inbuf, incount)) + ++error; + Trace((stderr, "done with readpng2_decode_data()\n")) + if (error || feof(infile) || rpng2_info.done) + break; + if (timing) + Sleep(1000L); + incount = fread(inbuf, 1, INBUFSIZE, infile); + } + + + /* clean up PNG stuff and report any decoding errors */ + + fclose(infile); + Trace((stderr, "about to call readpng2_cleanup()\n")) + readpng2_cleanup(&rpng2_info); + + if (error) { + fprintf(stderr, PROGNAME ": libpng error while decoding PNG image\n"); + exit(3); + } + + + /* wait for the user to tell us when to quit */ + + while (GetMessage(&msg, NULL, 0, 0)) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + + + /* we're done: clean up all image and Windows resources and go away */ + + Trace((stderr, "about to call rpng2_win_cleanup()\n")) + rpng2_win_cleanup(); + + return msg.wParam; +} + + + + + +/* this function is called by readpng2_info_callback() in readpng2.c, which + * in turn is called by libpng after all of the pre-IDAT chunks have been + * read and processed--i.e., we now have enough info to finish initializing */ + +static void rpng2_win_init() +{ + ulg i; + ulg rowbytes = rpng2_info.rowbytes; + + Trace((stderr, "beginning rpng2_win_init()\n")) + Trace((stderr, " rowbytes = %ld\n", rpng2_info.rowbytes)) + Trace((stderr, " width = %ld\n", rpng2_info.width)) + Trace((stderr, " height = %ld\n", rpng2_info.height)) + + rpng2_info.image_data = (uch *)malloc(rowbytes * rpng2_info.height); + if (!rpng2_info.image_data) { + readpng2_cleanup(&rpng2_info); + return; + } + + rpng2_info.row_pointers = (uch **)malloc(rpng2_info.height * sizeof(uch *)); + if (!rpng2_info.row_pointers) { + free(rpng2_info.image_data); + rpng2_info.image_data = NULL; + readpng2_cleanup(&rpng2_info); + return; + } + + for (i = 0; i < rpng2_info.height; ++i) + rpng2_info.row_pointers[i] = rpng2_info.image_data + i*rowbytes; + +/*--------------------------------------------------------------------------- + Do the basic Windows initialization stuff, make the window, and fill it + with the user-specified, file-specified or default background color. + ---------------------------------------------------------------------------*/ + + if (rpng2_win_create_window()) { + readpng2_cleanup(&rpng2_info); + return; + } +} + + + + + +static int rpng2_win_create_window() +{ + uch bg_red = rpng2_info.bg_red; + uch bg_green = rpng2_info.bg_green; + uch bg_blue = rpng2_info.bg_blue; + uch *dest; + int extra_width, extra_height; + ulg i, j; + WNDCLASSEX wndclass; + RECT rect; + + +/*--------------------------------------------------------------------------- + Allocate memory for the display-specific version of the image (round up + to multiple of 4 for Windows DIB). + ---------------------------------------------------------------------------*/ + + wimage_rowbytes = ((3*rpng2_info.width + 3L) >> 2) << 2; + + if (!(dib = (uch *)malloc(sizeof(BITMAPINFOHEADER) + + wimage_rowbytes*rpng2_info.height))) + { + return 4; /* fail */ + } + +/*--------------------------------------------------------------------------- + Initialize the DIB. Negative height means to use top-down BMP ordering + (must be uncompressed, but that's what we want). Bit count of 1, 4 or 8 + implies a colormap of RGBX quads, but 24-bit BMPs just use B,G,R values + directly => wimage_data begins immediately after BMP header. + ---------------------------------------------------------------------------*/ + + memset(dib, 0, sizeof(BITMAPINFOHEADER)); + bmih = (BITMAPINFOHEADER *)dib; + bmih->biSize = sizeof(BITMAPINFOHEADER); + bmih->biWidth = rpng2_info.width; + bmih->biHeight = -((long)rpng2_info.height); + bmih->biPlanes = 1; + bmih->biBitCount = 24; + bmih->biCompression = 0; + wimage_data = dib + sizeof(BITMAPINFOHEADER); + +/*--------------------------------------------------------------------------- + Fill window with the specified background color (default is black), but + defer loading faked "background image" until window is displayed (may be + slow to compute). Data are in BGR order. + ---------------------------------------------------------------------------*/ + + if (bg_image) { /* just fill with black for now */ + memset(wimage_data, 0, wimage_rowbytes*rpng2_info.height); + } else { + for (j = 0; j < rpng2_info.height; ++j) { + dest = wimage_data + j*wimage_rowbytes; + for (i = rpng2_info.width; i > 0; --i) { + *dest++ = bg_blue; + *dest++ = bg_green; + *dest++ = bg_red; + } + } + } + +/*--------------------------------------------------------------------------- + Set the window parameters. + ---------------------------------------------------------------------------*/ + + memset(&wndclass, 0, sizeof(wndclass)); + + wndclass.cbSize = sizeof(wndclass); + wndclass.style = CS_HREDRAW | CS_VREDRAW; + wndclass.lpfnWndProc = rpng2_win_wndproc; + wndclass.hInstance = global_hInst; + wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION); + wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); + wndclass.hbrBackground = (HBRUSH)GetStockObject(DKGRAY_BRUSH); + wndclass.lpszMenuName = NULL; + wndclass.lpszClassName = progname; + wndclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION); + + RegisterClassEx(&wndclass); + +/*--------------------------------------------------------------------------- + Finally, create the window. + ---------------------------------------------------------------------------*/ + + extra_width = 2*(GetSystemMetrics(SM_CXBORDER) + + GetSystemMetrics(SM_CXDLGFRAME)); + extra_height = 2*(GetSystemMetrics(SM_CYBORDER) + + GetSystemMetrics(SM_CYDLGFRAME)) + + GetSystemMetrics(SM_CYCAPTION); + + global_hwnd = CreateWindow(progname, titlebar, WS_OVERLAPPEDWINDOW, + CW_USEDEFAULT, CW_USEDEFAULT, rpng2_info.width+extra_width, + rpng2_info.height+extra_height, NULL, NULL, global_hInst, NULL); + + ShowWindow(global_hwnd, global_showmode); + UpdateWindow(global_hwnd); + +/*--------------------------------------------------------------------------- + Now compute the background image and display it. If it fails (memory + allocation), revert to a plain background color. + ---------------------------------------------------------------------------*/ + + if (bg_image) { + static const char *msg = "Computing background image..."; + int x, y, len = strlen(msg); + HDC hdc = GetDC(global_hwnd); + TEXTMETRIC tm; + + GetTextMetrics(hdc, &tm); + x = (rpng2_info.width - len*tm.tmAveCharWidth)/2; + y = (rpng2_info.height - tm.tmHeight)/2; + SetBkMode(hdc, TRANSPARENT); + SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT)); + /* this can still begin out of bounds even if x is positive (???): */ + TextOut(hdc, ((x < 0)? 0 : x), ((y < 0)? 0 : y), msg, len); + ReleaseDC(global_hwnd, hdc); + + rpng2_win_load_bg_image(); /* resets bg_image if fails */ + } + + if (!bg_image) { + for (j = 0; j < rpng2_info.height; ++j) { + dest = wimage_data + j*wimage_rowbytes; + for (i = rpng2_info.width; i > 0; --i) { + *dest++ = bg_blue; + *dest++ = bg_green; + *dest++ = bg_red; + } + } + } + + rect.left = 0L; + rect.top = 0L; + rect.right = (LONG)rpng2_info.width; /* possibly off by one? */ + rect.bottom = (LONG)rpng2_info.height; /* possibly off by one? */ + InvalidateRect(global_hwnd, &rect, FALSE); + UpdateWindow(global_hwnd); /* similar to XFlush() */ + + return 0; + +} /* end function rpng2_win_create_window() */ + + + + + +static int rpng2_win_load_bg_image() +{ + uch *src, *dest; + uch r1, r2, g1, g2, b1, b2; + uch r1_inv, r2_inv, g1_inv, g2_inv, b1_inv, b2_inv; + int k, hmax, max; + int xidx, yidx, yidx_max = (bgscale-1); + int even_odd_vert, even_odd_horiz, even_odd; + int invert_gradient2 = (bg[pat].type & 0x08); + int invert_column; + ulg i, row; + +/*--------------------------------------------------------------------------- + Allocate buffer for fake background image to be used with transparent + images; if this fails, revert to plain background color. + ---------------------------------------------------------------------------*/ + + bg_rowbytes = 3 * rpng2_info.width; + bg_data = (uch *)malloc(bg_rowbytes * rpng2_info.height); + if (!bg_data) { + fprintf(stderr, PROGNAME + ": unable to allocate memory for background image\n"); + bg_image = 0; + return 1; + } + +/*--------------------------------------------------------------------------- + Vertical gradients (ramps) in NxN squares, alternating direction and + colors (N == bgscale). + ---------------------------------------------------------------------------*/ + + if ((bg[pat].type & 0x07) == 0) { + uch r1_min = rgb[bg[pat].rgb1_min].r; + uch g1_min = rgb[bg[pat].rgb1_min].g; + uch b1_min = rgb[bg[pat].rgb1_min].b; + uch r2_min = rgb[bg[pat].rgb2_min].r; + uch g2_min = rgb[bg[pat].rgb2_min].g; + uch b2_min = rgb[bg[pat].rgb2_min].b; + int r1_diff = rgb[bg[pat].rgb1_max].r - r1_min; + int g1_diff = rgb[bg[pat].rgb1_max].g - g1_min; + int b1_diff = rgb[bg[pat].rgb1_max].b - b1_min; + int r2_diff = rgb[bg[pat].rgb2_max].r - r2_min; + int g2_diff = rgb[bg[pat].rgb2_max].g - g2_min; + int b2_diff = rgb[bg[pat].rgb2_max].b - b2_min; + + for (row = 0; row < rpng2_info.height; ++row) { + yidx = row % bgscale; + even_odd_vert = (row / bgscale) & 1; + + r1 = r1_min + (r1_diff * yidx) / yidx_max; + g1 = g1_min + (g1_diff * yidx) / yidx_max; + b1 = b1_min + (b1_diff * yidx) / yidx_max; + r1_inv = r1_min + (r1_diff * (yidx_max-yidx)) / yidx_max; + g1_inv = g1_min + (g1_diff * (yidx_max-yidx)) / yidx_max; + b1_inv = b1_min + (b1_diff * (yidx_max-yidx)) / yidx_max; + + r2 = r2_min + (r2_diff * yidx) / yidx_max; + g2 = g2_min + (g2_diff * yidx) / yidx_max; + b2 = b2_min + (b2_diff * yidx) / yidx_max; + r2_inv = r2_min + (r2_diff * (yidx_max-yidx)) / yidx_max; + g2_inv = g2_min + (g2_diff * (yidx_max-yidx)) / yidx_max; + b2_inv = b2_min + (b2_diff * (yidx_max-yidx)) / yidx_max; + + dest = bg_data + row*bg_rowbytes; + for (i = 0; i < rpng2_info.width; ++i) { + even_odd_horiz = (i / bgscale) & 1; + even_odd = even_odd_vert ^ even_odd_horiz; + invert_column = + (even_odd_horiz && (bg[pat].type & 0x10)); + if (even_odd == 0) { /* gradient #1 */ + if (invert_column) { + *dest++ = r1_inv; + *dest++ = g1_inv; + *dest++ = b1_inv; + } else { + *dest++ = r1; + *dest++ = g1; + *dest++ = b1; + } + } else { /* gradient #2 */ + if ((invert_column && invert_gradient2) || + (!invert_column && !invert_gradient2)) + { + *dest++ = r2; /* not inverted or */ + *dest++ = g2; /* doubly inverted */ + *dest++ = b2; + } else { + *dest++ = r2_inv; + *dest++ = g2_inv; /* singly inverted */ + *dest++ = b2_inv; + } + } + } + } + +/*--------------------------------------------------------------------------- + Soft gradient-diamonds with scale = bgscale. Code contributed by Adam + M. Costello. + ---------------------------------------------------------------------------*/ + + } else if ((bg[pat].type & 0x07) == 1) { + + hmax = (bgscale-1)/2; /* half the max weight of a color */ + max = 2*hmax; /* the max weight of a color */ + + r1 = rgb[bg[pat].rgb1_max].r; + g1 = rgb[bg[pat].rgb1_max].g; + b1 = rgb[bg[pat].rgb1_max].b; + r2 = rgb[bg[pat].rgb2_max].r; + g2 = rgb[bg[pat].rgb2_max].g; + b2 = rgb[bg[pat].rgb2_max].b; + + for (row = 0; row < rpng2_info.height; ++row) { + yidx = row % bgscale; + if (yidx > hmax) + yidx = bgscale-1 - yidx; + dest = bg_data + row*bg_rowbytes; + for (i = 0; i < rpng2_info.width; ++i) { + xidx = i % bgscale; + if (xidx > hmax) + xidx = bgscale-1 - xidx; + k = xidx + yidx; + *dest++ = (k*r1 + (max-k)*r2) / max; + *dest++ = (k*g1 + (max-k)*g2) / max; + *dest++ = (k*b1 + (max-k)*b2) / max; + } + } + +/*--------------------------------------------------------------------------- + Radial "starburst" with azimuthal sinusoids; [eventually number of sinu- + soids will equal bgscale?]. This one is slow but very cool. Code con- + tributed by Pieter S. van der Meulen (originally in Smalltalk). + ---------------------------------------------------------------------------*/ + + } else if ((bg[pat].type & 0x07) == 2) { + uch ch; + int ii, x, y, hw, hh, grayspot; + double freq, rotate, saturate, gray, intensity; + double angle=0.0, aoffset=0.0, maxDist, dist; + double red=0.0, green=0.0, blue=0.0, hue, s, v, f, p, q, t; + + fprintf(stderr, "%s: computing radial background...", + PROGNAME); + fflush(stderr); + + hh = rpng2_info.height / 2; + hw = rpng2_info.width / 2; + + /* variables for radial waves: + * aoffset: number of degrees to rotate hue [CURRENTLY NOT USED] + * freq: number of color beams originating from the center + * grayspot: size of the graying center area (anti-alias) + * rotate: rotation of the beams as a function of radius + * saturate: saturation of beams' shape azimuthally + */ + angle = CLIP(angle, 0.0, 360.0); + grayspot = CLIP(bg[pat].bg_gray, 1, (hh + hw)); + freq = MAX((double)bg[pat].bg_freq, 0.0); + saturate = (double)bg[pat].bg_bsat * 0.1; + rotate = (double)bg[pat].bg_brot * 0.1; + gray = 0.0; + intensity = 0.0; + maxDist = (double)((hw*hw) + (hh*hh)); + + for (row = 0; row < rpng2_info.height; ++row) { + y = row - hh; + dest = bg_data + row*bg_rowbytes; + for (i = 0; i < rpng2_info.width; ++i) { + x = i - hw; + angle = (x == 0)? PI_2 : atan((double)y / (double)x); + gray = (double)MAX(ABS(y), ABS(x)) / grayspot; + gray = MIN(1.0, gray); + dist = (double)((x*x) + (y*y)) / maxDist; + intensity = cos((angle+(rotate*dist*PI)) * freq) * + gray * saturate; + intensity = (MAX(MIN(intensity,1.0),-1.0) + 1.0) * 0.5; + hue = (angle + PI) * INV_PI_360 + aoffset; + s = gray * ((double)(ABS(x)+ABS(y)) / (double)(hw + hh)); + s = MIN(MAX(s,0.0), 1.0); + v = MIN(MAX(intensity,0.0), 1.0); + + if (s == 0.0) { + ch = (uch)(v * 255.0); + *dest++ = ch; + *dest++ = ch; + *dest++ = ch; + } else { + if ((hue < 0.0) || (hue >= 360.0)) + hue -= (((int)(hue / 360.0)) * 360.0); + hue /= 60.0; + ii = (int)hue; + f = hue - (double)ii; + p = (1.0 - s) * v; + q = (1.0 - (s * f)) * v; + t = (1.0 - (s * (1.0 - f))) * v; + if (ii == 0) { red = v; green = t; blue = p; } + else if (ii == 1) { red = q; green = v; blue = p; } + else if (ii == 2) { red = p; green = v; blue = t; } + else if (ii == 3) { red = p; green = q; blue = v; } + else if (ii == 4) { red = t; green = p; blue = v; } + else if (ii == 5) { red = v; green = p; blue = q; } + *dest++ = (uch)(red * 255.0); + *dest++ = (uch)(green * 255.0); + *dest++ = (uch)(blue * 255.0); + } + } + } + fprintf(stderr, "done.\n"); + fflush(stderr); + } + +/*--------------------------------------------------------------------------- + Blast background image to display buffer before beginning PNG decode; + calling function will handle invalidation and UpdateWindow() call. + ---------------------------------------------------------------------------*/ + + for (row = 0; row < rpng2_info.height; ++row) { + src = bg_data + row*bg_rowbytes; + dest = wimage_data + row*wimage_rowbytes; + for (i = rpng2_info.width; i > 0; --i) { + r1 = *src++; + g1 = *src++; + b1 = *src++; + *dest++ = b1; + *dest++ = g1; /* note reverse order */ + *dest++ = r1; + } + } + + return 0; + +} /* end function rpng2_win_load_bg_image() */ + + + + + +static void rpng2_win_display_row(ulg row) +{ + uch bg_red = rpng2_info.bg_red; + uch bg_green = rpng2_info.bg_green; + uch bg_blue = rpng2_info.bg_blue; + uch *src, *src2=NULL, *dest; + uch r, g, b, a; + ulg i; + static int rows=0; + static ulg firstrow; + +/*--------------------------------------------------------------------------- + rows and firstrow simply track how many rows (and which ones) have not + yet been displayed; alternatively, we could call InvalidateRect() for + every row and not bother with the records-keeping. + ---------------------------------------------------------------------------*/ + + Trace((stderr, "beginning rpng2_win_display_row()\n")) + + if (rows == 0) + firstrow = row; /* first row not yet displayed */ + + ++rows; /* count of rows received but not yet displayed */ + +/*--------------------------------------------------------------------------- + Aside from the use of the rpng2_info struct and the lack of an outer + loop (over rows), this routine is identical to rpng_win_display_image() + in the non-progressive version of the program. + ---------------------------------------------------------------------------*/ + + src = rpng2_info.image_data + row*rpng2_info.rowbytes; + if (bg_image) + src2 = bg_data + row*bg_rowbytes; + dest = wimage_data + row*wimage_rowbytes; + + if (rpng2_info.channels == 3) { + for (i = rpng2_info.width; i > 0; --i) { + r = *src++; + g = *src++; + b = *src++; + *dest++ = b; + *dest++ = g; /* note reverse order */ + *dest++ = r; + } + } else /* if (rpng2_info.channels == 4) */ { + for (i = rpng2_info.width; i > 0; --i) { + r = *src++; + g = *src++; + b = *src++; + a = *src++; + if (bg_image) { + bg_red = *src2++; + bg_green = *src2++; + bg_blue = *src2++; + } + if (a == 255) { + *dest++ = b; + *dest++ = g; + *dest++ = r; + } else if (a == 0) { + *dest++ = bg_blue; + *dest++ = bg_green; + *dest++ = bg_red; + } else { + /* this macro (copied from png.h) composites the + * foreground and background values and puts the + * result into the first argument; there are no + * side effects with the first argument */ + alpha_composite(*dest++, b, a, bg_blue); + alpha_composite(*dest++, g, a, bg_green); + alpha_composite(*dest++, r, a, bg_red); + } + } + } + +/*--------------------------------------------------------------------------- + Display after every 16 rows or when on last row. (Region may include + previously displayed lines due to interlacing--i.e., not contiguous.) + ---------------------------------------------------------------------------*/ + + if ((rows & 0xf) == 0 || row == rpng2_info.height-1) { + RECT rect; + + rect.left = 0L; + rect.top = (LONG)firstrow; + rect.right = (LONG)rpng2_info.width; /* possibly off by one? */ + rect.bottom = (LONG)row + 1L; /* possibly off by one? */ + InvalidateRect(global_hwnd, &rect, FALSE); + UpdateWindow(global_hwnd); /* similar to XFlush() */ + rows = 0; + } + +} /* end function rpng2_win_display_row() */ + + + + + +static void rpng2_win_finish_display() +{ + Trace((stderr, "beginning rpng2_win_finish_display()\n")) + + /* last row has already been displayed by rpng2_win_display_row(), so + * we have nothing to do here except set a flag and let the user know + * that the image is done */ + + rpng2_info.done = TRUE; + printf( + "Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n"); + fflush(stdout); +} + + + + + +static void rpng2_win_cleanup() +{ + if (bg_image && bg_data) { + free(bg_data); + bg_data = NULL; + } + + if (rpng2_info.image_data) { + free(rpng2_info.image_data); + rpng2_info.image_data = NULL; + } + + if (rpng2_info.row_pointers) { + free(rpng2_info.row_pointers); + rpng2_info.row_pointers = NULL; + } + + if (dib) { + free(dib); + dib = NULL; + } +} + + + + + +LRESULT CALLBACK rpng2_win_wndproc(HWND hwnd, UINT iMsg, WPARAM wP, LPARAM lP) +{ + HDC hdc; + PAINTSTRUCT ps; + int rc; + + switch (iMsg) { + case WM_CREATE: + /* one-time processing here, if any */ + return 0; + + case WM_PAINT: + hdc = BeginPaint(hwnd, &ps); + rc = StretchDIBits(hdc, 0, 0, rpng2_info.width, rpng2_info.height, + 0, 0, rpng2_info.width, rpng2_info.height, + wimage_data, (BITMAPINFO *)bmih, + 0, SRCCOPY); + EndPaint(hwnd, &ps); + return 0; + + /* wait for the user to tell us when to quit */ + case WM_CHAR: + switch (wP) { /* only need one, so ignore repeat count */ + case 'q': + case 'Q': + case 0x1B: /* Esc key */ + PostQuitMessage(0); + } + return 0; + + case WM_LBUTTONDOWN: /* another way of quitting */ + case WM_DESTROY: + PostQuitMessage(0); + return 0; + } + + return DefWindowProc(hwnd, iMsg, wP, lP); +} diff --git a/gtkmm-osx/libpng-1.2.5/contrib/gregbook/rpng2-x.c b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/rpng2-x.c new file mode 100644 index 0000000..5fc29ea --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/rpng2-x.c @@ -0,0 +1,1408 @@ +/*--------------------------------------------------------------------------- + + rpng2 - progressive-model PNG display program rpng2-x.c + + This program decodes and displays PNG files progressively, as if it were + a web browser (though the front end is only set up to read from files). + It supports gamma correction, user-specified background colors, and user- + specified background patterns (for transparent images). This version is + for the X Window System (tested by the author under Unix and by Martin + Zinser under OpenVMS; may work under OS/2 with a little tweaking). + + Thanks to Adam Costello and Pieter S. van der Meulen for the "diamond" + and "radial waves" patterns, respectively. + + to do: + - 8-bit support + - finish resizable checkerboard-gradient (sizes 4-128?) + - use %.1023s to simplify truncation of title-bar string? + + --------------------------------------------------------------------------- + + Changelog: + - 1.01: initial public release + - 1.02: modified to allow abbreviated options; fixed char/uchar mismatch + - 1.10: added support for non-default visuals; fixed X pixel-conversion + - 1.11: added -usleep option for demos; fixed command-line parsing bug + - 1.12: added -pause option for demos and testing + - 1.20: added runtime MMX-enabling/disabling and new -mmx* options + - 1.21: fixed small X memory leak (thanks to Francois Petitjean) + - 1.22: fixed XFreeGC() crash bug + + --------------------------------------------------------------------------- + + Copyright (c) 1998-2001 Greg Roelofs. All rights reserved. + + This software is provided "as is," without warranty of any kind, + express or implied. In no event shall the author or contributors + be held liable for any damages arising in any way from the use of + this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute + it freely, subject to the following restrictions: + + 1. Redistributions of source code must retain the above copyright + notice, disclaimer, and this list of conditions. + 2. Redistributions in binary form must reproduce the above copyright + notice, disclaimer, and this list of conditions in the documenta- + tion and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this + software must display the following acknowledgment: + + This product includes software developed by Greg Roelofs + and contributors for the book, "PNG: The Definitive Guide," + published by O'Reilly and Associates. + + ---------------------------------------------------------------------------*/ + +#define PROGNAME "rpng2-x" +#define LONGNAME "Progressive PNG Viewer for X" +#define VERSION "1.22 of 16 August 2001" + +#include +#include +#include +#include /* for jmpbuf declaration in readpng2.h */ +#include +#include /* only for PvdM background code */ +#include +#include +#include +#include /* defines XK_* macros */ + +#ifdef VMS +# include +#endif + +/* all for PvdM background code: */ +#ifndef PI +# define PI 3.141592653589793238 +#endif +#define PI_2 (PI*0.5) +#define INV_PI_360 (360.0 / PI) +#define MAX(a,b) (a>b?a:b) +#define MIN(a,b) (a> 8)) >> 8); \ +} + + +#define INBUFSIZE 4096 /* with pseudo-timing on (1 sec delay/block), this + * block size corresponds roughly to a download + * speed 10% faster than theoretical 33.6K maximum + * (assuming 8 data bits, 1 stop bit and no other + * overhead) */ + +/* local prototypes */ +static void rpng2_x_init(void); +static int rpng2_x_create_window(void); +static int rpng2_x_load_bg_image(void); +static void rpng2_x_display_row(ulg row); +static void rpng2_x_finish_display(void); +static void rpng2_x_cleanup(void); +static int rpng2_x_msb(ulg u32val); + + +static char titlebar[1024], *window_name = titlebar; +static char *appname = LONGNAME; +static char *icon_name = PROGNAME; +static char *filename; +static FILE *infile; + +static mainprog_info rpng2_info; + +static uch inbuf[INBUFSIZE]; +static int incount; + +static int pat = 6; /* must be less than num_bgpat */ +static int bg_image = 0; +static int bgscale = 16; +static ulg bg_rowbytes; +static uch *bg_data; + +int pause_after_pass = FALSE; +int demo_timing = FALSE; +ulg usleep_duration = 0L; + +static struct rgb_color { + uch r, g, b; +} rgb[] = { + { 0, 0, 0}, /* 0: black */ + {255, 255, 255}, /* 1: white */ + {173, 132, 57}, /* 2: tan */ + { 64, 132, 0}, /* 3: medium green */ + {189, 117, 1}, /* 4: gold */ + {253, 249, 1}, /* 5: yellow */ + { 0, 0, 255}, /* 6: blue */ + { 0, 0, 120}, /* 7: medium blue */ + {255, 0, 255}, /* 8: magenta */ + { 64, 0, 64}, /* 9: dark magenta */ + {255, 0, 0}, /* 10: red */ + { 64, 0, 0}, /* 11: dark red */ + {255, 127, 0}, /* 12: orange */ + {192, 96, 0}, /* 13: darker orange */ + { 24, 60, 0}, /* 14: dark green-yellow */ + { 85, 125, 200} /* 15: ice blue */ +}; +/* not used for now, but should be for error-checking: +static int num_rgb = sizeof(rgb) / sizeof(struct rgb_color); + */ + +/* + This whole struct is a fairly cheesy way to keep the number of + command-line options to a minimum. The radial-waves background + type is a particularly poor fit to the integer elements of the + struct...but a few macros and a little fixed-point math will do + wonders for ya. + + type bits: + F E D C B A 9 8 7 6 5 4 3 2 1 0 + | | | | | + | | +-+-+-- 0 = sharp-edged checkerboard + | | 1 = soft diamonds + | | 2 = radial waves + | | 3-7 = undefined + | +-- gradient #2 inverted? + +-- alternating columns inverted? + */ +static struct background_pattern { + ush type; + int rgb1_max, rgb1_min; /* or bg_freq, bg_gray */ + int rgb2_max, rgb2_min; /* or bg_bsat, bg_brot (both scaled by 10)*/ +} bg[] = { + {0+8, 2,0, 1,15}, /* checkered: tan/black vs. white/ice blue */ + {0+24, 2,0, 1,0}, /* checkered: tan/black vs. white/black */ + {0+8, 4,5, 0,2}, /* checkered: gold/yellow vs. black/tan */ + {0+8, 4,5, 0,6}, /* checkered: gold/yellow vs. black/blue */ + {0, 7,0, 8,9}, /* checkered: deep blue/black vs. magenta */ + {0+8, 13,0, 5,14}, /* checkered: orange/black vs. yellow */ + {0+8, 12,0, 10,11}, /* checkered: orange/black vs. red */ + {1, 7,0, 8,0}, /* diamonds: deep blue/black vs. magenta */ + {1, 12,0, 11,0}, /* diamonds: orange vs. dark red */ + {1, 10,0, 7,0}, /* diamonds: red vs. medium blue */ + {1, 4,0, 5,0}, /* diamonds: gold vs. yellow */ + {1, 3,0, 0,0}, /* diamonds: medium green vs. black */ + {2, 16, 100, 20, 0}, /* radial: ~hard radial color-beams */ + {2, 18, 100, 10, 2}, /* radial: soft, curved radial color-beams */ + {2, 16, 256, 100, 250}, /* radial: very tight spiral */ + {2, 10000, 256, 11, 0} /* radial: dipole-moire' (almost fractal) */ +}; +static int num_bgpat = sizeof(bg) / sizeof(struct background_pattern); + + +/* X-specific variables */ +static char *displayname; +static XImage *ximage; +static Display *display; +static int depth; +static Visual *visual; +static XVisualInfo *visual_list; +static int RShift, GShift, BShift; +static ulg RMask, GMask, BMask; +static Window window; +static GC gc; +static Colormap colormap; + +static int have_nondefault_visual = FALSE; +static int have_colormap = FALSE; +static int have_window = FALSE; +static int have_gc = FALSE; + + + + +int main(int argc, char **argv) +{ +#ifdef sgi + char tmpline[80]; +#endif + char *p, *bgstr = NULL; + int rc, alen, flen; + int error = 0; + int timing = FALSE; + int have_bg = FALSE; + double LUT_exponent; /* just the lookup table */ + double CRT_exponent = 2.2; /* just the monitor */ + double default_display_exponent; /* whole display system */ + XEvent e; + KeySym k; + + + /* First initialize a few things, just to be sure--memset takes care of + * default background color (black), booleans (FALSE), pointers (NULL), + * etc. */ + + displayname = (char *)NULL; + filename = (char *)NULL; + memset(&rpng2_info, 0, sizeof(mainprog_info)); + + + /* Set the default value for our display-system exponent, i.e., the + * product of the CRT exponent and the exponent corresponding to + * the frame-buffer's lookup table (LUT), if any. This is not an + * exhaustive list of LUT values (e.g., OpenStep has a lot of weird + * ones), but it should cover 99% of the current possibilities. */ + +#if defined(NeXT) + /* third-party utilities can modify the default LUT exponent */ + LUT_exponent = 1.0 / 2.2; + /* + if (some_next_function_that_returns_gamma(&next_gamma)) + LUT_exponent = 1.0 / next_gamma; + */ +#elif defined(sgi) + LUT_exponent = 1.0 / 1.7; + /* there doesn't seem to be any documented function to + * get the "gamma" value, so we do it the hard way */ + infile = fopen("/etc/config/system.glGammaVal", "r"); + if (infile) { + double sgi_gamma; + + fgets(tmpline, 80, infile); + fclose(infile); + sgi_gamma = atof(tmpline); + if (sgi_gamma > 0.0) + LUT_exponent = 1.0 / sgi_gamma; + } +#elif defined(Macintosh) + LUT_exponent = 1.8 / 2.61; + /* + if (some_mac_function_that_returns_gamma(&mac_gamma)) + LUT_exponent = mac_gamma / 2.61; + */ +#else + LUT_exponent = 1.0; /* assume no LUT: most PCs */ +#endif + + /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */ + default_display_exponent = LUT_exponent * CRT_exponent; + + + /* If the user has set the SCREEN_GAMMA environment variable as suggested + * (somewhat imprecisely) in the libpng documentation, use that; otherwise + * use the default value we just calculated. Either way, the user may + * override this via a command-line option. */ + + if ((p = getenv("SCREEN_GAMMA")) != NULL) + rpng2_info.display_exponent = atof(p); + else + rpng2_info.display_exponent = default_display_exponent; + + + /* Now parse the command line for options and the PNG filename. */ + + while (*++argv && !error) { + if (!strncmp(*argv, "-display", 2)) { + if (!*++argv) + ++error; + else + displayname = *argv; + } else if (!strncmp(*argv, "-gamma", 2)) { + if (!*++argv) + ++error; + else { + rpng2_info.display_exponent = atof(*argv); + if (rpng2_info.display_exponent <= 0.0) + ++error; + } + } else if (!strncmp(*argv, "-bgcolor", 4)) { + if (!*++argv) + ++error; + else { + bgstr = *argv; + if (strlen(bgstr) != 7 || bgstr[0] != '#') + ++error; + else { + have_bg = TRUE; + bg_image = FALSE; + } + } + } else if (!strncmp(*argv, "-bgpat", 4)) { + if (!*++argv) + ++error; + else { + pat = atoi(*argv) - 1; + if (pat < 0 || pat >= num_bgpat) + ++error; + else { + bg_image = TRUE; + have_bg = FALSE; + } + } + } else if (!strncmp(*argv, "-usleep", 2)) { + if (!*++argv) + ++error; + else { + usleep_duration = (ulg)atol(*argv); + demo_timing = TRUE; + } + } else if (!strncmp(*argv, "-pause", 2)) { + pause_after_pass = TRUE; + } else if (!strncmp(*argv, "-timing", 2)) { + timing = TRUE; +#if (defined(__i386__) || defined(_M_IX86)) + } else if (!strncmp(*argv, "-nommxfilters", 7)) { + rpng2_info.nommxfilters = TRUE; + } else if (!strncmp(*argv, "-nommxcombine", 7)) { + rpng2_info.nommxcombine = TRUE; + } else if (!strncmp(*argv, "-nommxinterlace", 7)) { + rpng2_info.nommxinterlace = TRUE; + } else if (!strcmp(*argv, "-nommx")) { + rpng2_info.nommxfilters = TRUE; + rpng2_info.nommxcombine = TRUE; + rpng2_info.nommxinterlace = TRUE; +#endif + } else { + if (**argv != '-') { + filename = *argv; + if (argv[1]) /* shouldn't be any more args after filename */ + ++error; + } else + ++error; /* not expecting any other options */ + } + } + + if (!filename) { + ++error; + } else if (!(infile = fopen(filename, "rb"))) { + fprintf(stderr, PROGNAME ": can't open PNG file [%s]\n", filename); + ++error; + } else { + incount = fread(inbuf, 1, INBUFSIZE, infile); + if (incount < 8 || !readpng2_check_sig(inbuf, 8)) { + fprintf(stderr, PROGNAME + ": [%s] is not a PNG file: incorrect signature\n", + filename); + ++error; + } else if ((rc = readpng2_init(&rpng2_info)) != 0) { + switch (rc) { + case 2: + fprintf(stderr, PROGNAME + ": [%s] has bad IHDR (libpng longjmp)\n", + filename); + break; + case 4: + fprintf(stderr, PROGNAME ": insufficient memory\n"); + break; + default: + fprintf(stderr, PROGNAME + ": unknown readpng2_init() error\n"); + break; + } + ++error; + } else { + display = XOpenDisplay(displayname); + if (!display) { + readpng2_cleanup(&rpng2_info); + fprintf(stderr, PROGNAME ": can't open X display [%s]\n", + displayname? displayname : "default"); + ++error; + } + } + if (error) + fclose(infile); + } + + + /* usage screen */ + + if (error) { + fprintf(stderr, "\n%s %s: %s\n\n", PROGNAME, VERSION, appname); + readpng2_version_info(); + fprintf(stderr, "\n" + "Usage: %s [-display xdpy] [-gamma exp] [-bgcolor bg | -bgpat pat]\n" +#if (defined(__i386__) || defined(_M_IX86)) + " %*s [[-nommxfilters] [-nommxcombine] [-nommxinterlace] | -nommx]\n" +#endif + " %*s [-usleep dur | -timing] [-pause] file.png\n\n" + " xdpy\tname of the target X display (e.g., ``hostname:0'')\n" + " exp \ttransfer-function exponent (``gamma'') of the display\n" + "\t\t system in floating-point format (e.g., ``%.1f''); equal\n" + "\t\t to the product of the lookup-table exponent (varies)\n" + "\t\t and the CRT exponent (usually 2.2); must be positive\n" + " bg \tdesired background color in 7-character hex RGB format\n" + "\t\t (e.g., ``#ff7700'' for orange: same as HTML colors);\n" + "\t\t used with transparent images; overrides -bgpat\n" + " pat \tdesired background pattern number (1-%d); used with\n" + "\t\t transparent images; overrides -bgcolor\n" +#if (defined(__i386__) || defined(_M_IX86)) + " -nommx*\tdisable optimized MMX routines for decoding row filters,\n" + "\t\t combining rows, and expanding interlacing, respectively\n" +#endif + " dur \tduration in microseconds to wait after displaying each\n" + "\t\t row (for demo purposes)\n" + " -timing\tenables delay for every block read, to simulate modem\n" + "\t\t download of image (~36 Kbps)\n" + " -pause\tpauses after displaying each pass until key pressed\n" + "\nPress Q, Esc or mouse button 1 (within image window, after image\n" + "is displayed) to quit.\n" + "\n", PROGNAME, +#if (defined(__i386__) || defined(_M_IX86)) + strlen(PROGNAME), " ", +#endif + strlen(PROGNAME), " ", default_display_exponent, num_bgpat); + exit(1); + } + + + /* set the title-bar string, but make sure buffer doesn't overflow */ + + alen = strlen(appname); + flen = strlen(filename); + if (alen + flen + 3 > 1023) + sprintf(titlebar, "%s: ...%s", appname, filename+(alen+flen+6-1023)); + else + sprintf(titlebar, "%s: %s", appname, filename); + + + /* set some final rpng2_info variables before entering main data loop */ + + if (have_bg) { + unsigned r, g, b; /* this approach quiets compiler warnings */ + + sscanf(bgstr+1, "%2x%2x%2x", &r, &g, &b); + rpng2_info.bg_red = (uch)r; + rpng2_info.bg_green = (uch)g; + rpng2_info.bg_blue = (uch)b; + } else + rpng2_info.need_bgcolor = TRUE; + + rpng2_info.done = FALSE; + rpng2_info.mainprog_init = rpng2_x_init; + rpng2_info.mainprog_display_row = rpng2_x_display_row; + rpng2_info.mainprog_finish_display = rpng2_x_finish_display; + + + /* OK, this is the fun part: call readpng2_decode_data() at the start of + * the loop to deal with our first buffer of data (read in above to verify + * that the file is a PNG image), then loop through the file and continue + * calling the same routine to handle each chunk of data. It in turn + * passes the data to libpng, which will invoke one or more of our call- + * backs as decoded data become available. We optionally call sleep() for + * one second per iteration to simulate downloading the image via an analog + * modem. */ + + for (;;) { + Trace((stderr, "about to call readpng2_decode_data()\n")) + if (readpng2_decode_data(&rpng2_info, inbuf, incount)) + ++error; + Trace((stderr, "done with readpng2_decode_data()\n")) + if (error || feof(infile) || rpng2_info.done) + break; + if (timing) + sleep(1); + incount = fread(inbuf, 1, INBUFSIZE, infile); + } + + + /* clean up PNG stuff and report any decoding errors */ + + fclose(infile); + Trace((stderr, "about to call readpng2_cleanup()\n")) + readpng2_cleanup(&rpng2_info); + + if (error) { + fprintf(stderr, PROGNAME ": libpng error while decoding PNG image\n"); + exit(3); + } + + + /* wait for the user to tell us when to quit */ + + do + XNextEvent(display, &e); + while (!(e.type == ButtonPress && e.xbutton.button == Button1) && + !(e.type == KeyPress && /* v--- or 1 for shifted keys */ + ((k = XLookupKeysym(&e.xkey, 0)) == XK_q || k == XK_Escape) )); + + + /* we're done: clean up all image and X resources and go away */ + + Trace((stderr, "about to call rpng2_x_cleanup()\n")) + rpng2_x_cleanup(); + + return 0; +} + + + + + +/* this function is called by readpng2_info_callback() in readpng2.c, which + * in turn is called by libpng after all of the pre-IDAT chunks have been + * read and processed--i.e., we now have enough info to finish initializing */ + +static void rpng2_x_init(void) +{ + ulg i; + ulg rowbytes = rpng2_info.rowbytes; + + Trace((stderr, "beginning rpng2_x_init()\n")) + Trace((stderr, " rowbytes = %ld\n", rpng2_info.rowbytes)) + Trace((stderr, " width = %ld\n", rpng2_info.width)) + Trace((stderr, " height = %ld\n", rpng2_info.height)) + + rpng2_info.image_data = (uch *)malloc(rowbytes * rpng2_info.height); + if (!rpng2_info.image_data) { + readpng2_cleanup(&rpng2_info); + return; + } + + rpng2_info.row_pointers = (uch **)malloc(rpng2_info.height * sizeof(uch *)); + if (!rpng2_info.row_pointers) { + free(rpng2_info.image_data); + rpng2_info.image_data = NULL; + readpng2_cleanup(&rpng2_info); + return; + } + + for (i = 0; i < rpng2_info.height; ++i) + rpng2_info.row_pointers[i] = rpng2_info.image_data + i*rowbytes; + + + /* do the basic X initialization stuff, make the window, and fill it with + * the user-specified, file-specified or default background color or + * pattern */ + + if (rpng2_x_create_window()) { + + /* GRR TEMPORARY HACK: this is fundamentally no different from cases + * above; libpng should longjmp() back to us when png_ptr goes away. + * If we/it segfault instead, seems like a libpng bug... */ + + /* we're here via libpng callback, so if window fails, clean and bail */ +printf("readpng2_cleanup.\n"); + readpng2_cleanup(&rpng2_info); + rpng2_x_cleanup(); + exit(2); + } +} + + + + + +static int rpng2_x_create_window(void) +{ + ulg bg_red = rpng2_info.bg_red; + ulg bg_green = rpng2_info.bg_green; + ulg bg_blue = rpng2_info.bg_blue; + ulg bg_pixel = 0L; + ulg attrmask; + int need_colormap = FALSE; + int screen, pad; + uch *xdata; + Window root; + XEvent e; + XGCValues gcvalues; + XSetWindowAttributes attr; + XSizeHints *size_hints; + XTextProperty windowName, *pWindowName = &windowName; + XTextProperty iconName, *pIconName = &iconName; + XVisualInfo visual_info; + XWMHints *wm_hints; + + + Trace((stderr, "beginning rpng2_x_create_window()\n")) + + screen = DefaultScreen(display); + depth = DisplayPlanes(display, screen); + root = RootWindow(display, screen); + +#ifdef DEBUG + XSynchronize(display, True); +#endif + + if (depth != 16 && depth != 24 && depth != 32) { + int visuals_matched = 0; + + Trace((stderr, "default depth is %d: checking other visuals\n", + depth)) + + /* 24-bit first */ + visual_info.screen = screen; + visual_info.depth = 24; + visual_list = XGetVisualInfo(display, + VisualScreenMask | VisualDepthMask, &visual_info, &visuals_matched); + if (visuals_matched == 0) { +/* GRR: add 15-, 16- and 32-bit TrueColor visuals (also DirectColor?) */ + fprintf(stderr, "default screen depth %d not supported, and no" + " 24-bit visuals found\n", depth); + return 2; + } + Trace((stderr, "XGetVisualInfo() returned %d 24-bit visuals\n", + visuals_matched)) + visual = visual_list[0].visual; + depth = visual_list[0].depth; +/* + colormap_size = visual_list[0].colormap_size; + visual_class = visual->class; + visualID = XVisualIDFromVisual(visual); + */ + have_nondefault_visual = TRUE; + need_colormap = TRUE; + } else { + XMatchVisualInfo(display, screen, depth, TrueColor, &visual_info); + visual = visual_info.visual; + } + + RMask = visual->red_mask; + GMask = visual->green_mask; + BMask = visual->blue_mask; + +/* GRR: add/check 8-bit support */ + if (depth == 8 || need_colormap) { + colormap = XCreateColormap(display, root, visual, AllocNone); + if (!colormap) { + fprintf(stderr, "XCreateColormap() failed\n"); + return 2; + } + have_colormap = TRUE; + if (depth == 8) + bg_image = FALSE; /* gradient just wastes palette entries */ + } + if (depth == 15 || depth == 16) { + RShift = 15 - rpng2_x_msb(RMask); /* these are right-shifts */ + GShift = 15 - rpng2_x_msb(GMask); + BShift = 15 - rpng2_x_msb(BMask); + } else if (depth > 16) { + RShift = rpng2_x_msb(RMask) - 7; /* these are left-shifts */ + GShift = rpng2_x_msb(GMask) - 7; + BShift = rpng2_x_msb(BMask) - 7; + } + if (depth >= 15 && (RShift < 0 || GShift < 0 || BShift < 0)) { + fprintf(stderr, "rpng2 internal logic error: negative X shift(s)!\n"); + return 2; + } + +/*--------------------------------------------------------------------------- + Finally, create the window. + ---------------------------------------------------------------------------*/ + + attr.backing_store = Always; + attr.event_mask = ExposureMask | KeyPressMask | ButtonPressMask; + attrmask = CWBackingStore | CWEventMask; + if (have_nondefault_visual) { + attr.colormap = colormap; + attr.background_pixel = 0; + attr.border_pixel = 1; + attrmask |= CWColormap | CWBackPixel | CWBorderPixel; + } + + window = XCreateWindow(display, root, 0, 0, rpng2_info.width, + rpng2_info.height, 0, depth, InputOutput, visual, attrmask, &attr); + + if (window == None) { + fprintf(stderr, "XCreateWindow() failed\n"); + return 2; + } else + have_window = TRUE; + + if (depth == 8) + XSetWindowColormap(display, window, colormap); + + if (!XStringListToTextProperty(&window_name, 1, pWindowName)) + pWindowName = NULL; + if (!XStringListToTextProperty(&icon_name, 1, pIconName)) + pIconName = NULL; + + /* OK if either hints allocation fails; XSetWMProperties() allows NULLs */ + + if ((size_hints = XAllocSizeHints()) != NULL) { + /* window will not be resizable */ + size_hints->flags = PMinSize | PMaxSize; + size_hints->min_width = size_hints->max_width = (int)rpng2_info.width; + size_hints->min_height = size_hints->max_height = + (int)rpng2_info.height; + } + + if ((wm_hints = XAllocWMHints()) != NULL) { + wm_hints->initial_state = NormalState; + wm_hints->input = True; + /* wm_hints->icon_pixmap = icon_pixmap; */ + wm_hints->flags = StateHint | InputHint /* | IconPixmapHint */ ; + } + + XSetWMProperties(display, window, pWindowName, pIconName, NULL, 0, + size_hints, wm_hints, NULL); + + /* various properties and hints no longer needed; free memory */ + if (pWindowName) + XFree(pWindowName->value); + if (pIconName) + XFree(pIconName->value); + if (size_hints) + XFree(size_hints); + if (wm_hints) + XFree(wm_hints); + + XMapWindow(display, window); + + gc = XCreateGC(display, window, 0, &gcvalues); + have_gc = TRUE; + +/*--------------------------------------------------------------------------- + Allocate memory for the X- and display-specific version of the image. + ---------------------------------------------------------------------------*/ + + if (depth == 24 || depth == 32) { + xdata = (uch *)malloc(4*rpng2_info.width*rpng2_info.height); + pad = 32; + } else if (depth == 16) { + xdata = (uch *)malloc(2*rpng2_info.width*rpng2_info.height); + pad = 16; + } else /* depth == 8 */ { + xdata = (uch *)malloc(rpng2_info.width*rpng2_info.height); + pad = 8; + } + + if (!xdata) { + fprintf(stderr, PROGNAME ": unable to allocate image memory\n"); + return 4; + } + + ximage = XCreateImage(display, visual, depth, ZPixmap, 0, + (char *)xdata, rpng2_info.width, rpng2_info.height, pad, 0); + + if (!ximage) { + fprintf(stderr, PROGNAME ": XCreateImage() failed\n"); + free(xdata); + return 3; + } + + /* to avoid testing the byte order every pixel (or doubling the size of + * the drawing routine with a giant if-test), we arbitrarily set the byte + * order to MSBFirst and let Xlib worry about inverting things on little- + * endian machines (e.g., Linux/x86, old VAXen, etc.)--this is not the + * most efficient approach (the giant if-test would be better), but in + * the interest of clarity, we'll take the easy way out... */ + + ximage->byte_order = MSBFirst; + +/*--------------------------------------------------------------------------- + Fill window with the specified background color (default is black) or + faked "background image" (but latter is disabled if 8-bit; gradients + just waste palette entries). + ---------------------------------------------------------------------------*/ + + if (bg_image) + rpng2_x_load_bg_image(); /* resets bg_image if fails */ + + if (!bg_image) { + if (depth == 24 || depth == 32) { + bg_pixel = (bg_red << RShift) | + (bg_green << GShift) | + (bg_blue << BShift); + } else if (depth == 16) { + bg_pixel = (((bg_red << 8) >> RShift) & RMask) | + (((bg_green << 8) >> GShift) & GMask) | + (((bg_blue << 8) >> BShift) & BMask); + } else /* depth == 8 */ { + + /* GRR: add 8-bit support */ + + } + XSetForeground(display, gc, bg_pixel); + XFillRectangle(display, window, gc, 0, 0, rpng2_info.width, + rpng2_info.height); + } + +/*--------------------------------------------------------------------------- + Wait for first Expose event to do any drawing, then flush and return. + ---------------------------------------------------------------------------*/ + + do + XNextEvent(display, &e); + while (e.type != Expose || e.xexpose.count); + + XFlush(display); + + return 0; + +} /* end function rpng2_x_create_window() */ + + + + + +static int rpng2_x_load_bg_image(void) +{ + uch *src; + char *dest; + uch r1, r2, g1, g2, b1, b2; + uch r1_inv, r2_inv, g1_inv, g2_inv, b1_inv, b2_inv; + int k, hmax, max; + int xidx, yidx, yidx_max = (bgscale-1); + int even_odd_vert, even_odd_horiz, even_odd; + int invert_gradient2 = (bg[pat].type & 0x08); + int invert_column; + int ximage_rowbytes = ximage->bytes_per_line; + ulg i, row; + ulg pixel; + +/*--------------------------------------------------------------------------- + Allocate buffer for fake background image to be used with transparent + images; if this fails, revert to plain background color. + ---------------------------------------------------------------------------*/ + + bg_rowbytes = 3 * rpng2_info.width; + bg_data = (uch *)malloc(bg_rowbytes * rpng2_info.height); + if (!bg_data) { + fprintf(stderr, PROGNAME + ": unable to allocate memory for background image\n"); + bg_image = 0; + return 1; + } + +/*--------------------------------------------------------------------------- + Vertical gradients (ramps) in NxN squares, alternating direction and + colors (N == bgscale). + ---------------------------------------------------------------------------*/ + + if ((bg[pat].type & 0x07) == 0) { + uch r1_min = rgb[bg[pat].rgb1_min].r; + uch g1_min = rgb[bg[pat].rgb1_min].g; + uch b1_min = rgb[bg[pat].rgb1_min].b; + uch r2_min = rgb[bg[pat].rgb2_min].r; + uch g2_min = rgb[bg[pat].rgb2_min].g; + uch b2_min = rgb[bg[pat].rgb2_min].b; + int r1_diff = rgb[bg[pat].rgb1_max].r - r1_min; + int g1_diff = rgb[bg[pat].rgb1_max].g - g1_min; + int b1_diff = rgb[bg[pat].rgb1_max].b - b1_min; + int r2_diff = rgb[bg[pat].rgb2_max].r - r2_min; + int g2_diff = rgb[bg[pat].rgb2_max].g - g2_min; + int b2_diff = rgb[bg[pat].rgb2_max].b - b2_min; + + for (row = 0; row < rpng2_info.height; ++row) { + yidx = (int)(row % bgscale); + even_odd_vert = (int)((row / bgscale) & 1); + + r1 = r1_min + (r1_diff * yidx) / yidx_max; + g1 = g1_min + (g1_diff * yidx) / yidx_max; + b1 = b1_min + (b1_diff * yidx) / yidx_max; + r1_inv = r1_min + (r1_diff * (yidx_max-yidx)) / yidx_max; + g1_inv = g1_min + (g1_diff * (yidx_max-yidx)) / yidx_max; + b1_inv = b1_min + (b1_diff * (yidx_max-yidx)) / yidx_max; + + r2 = r2_min + (r2_diff * yidx) / yidx_max; + g2 = g2_min + (g2_diff * yidx) / yidx_max; + b2 = b2_min + (b2_diff * yidx) / yidx_max; + r2_inv = r2_min + (r2_diff * (yidx_max-yidx)) / yidx_max; + g2_inv = g2_min + (g2_diff * (yidx_max-yidx)) / yidx_max; + b2_inv = b2_min + (b2_diff * (yidx_max-yidx)) / yidx_max; + + dest = (char *)bg_data + row*bg_rowbytes; + for (i = 0; i < rpng2_info.width; ++i) { + even_odd_horiz = (int)((i / bgscale) & 1); + even_odd = even_odd_vert ^ even_odd_horiz; + invert_column = + (even_odd_horiz && (bg[pat].type & 0x10)); + if (even_odd == 0) { /* gradient #1 */ + if (invert_column) { + *dest++ = r1_inv; + *dest++ = g1_inv; + *dest++ = b1_inv; + } else { + *dest++ = r1; + *dest++ = g1; + *dest++ = b1; + } + } else { /* gradient #2 */ + if ((invert_column && invert_gradient2) || + (!invert_column && !invert_gradient2)) + { + *dest++ = r2; /* not inverted or */ + *dest++ = g2; /* doubly inverted */ + *dest++ = b2; + } else { + *dest++ = r2_inv; + *dest++ = g2_inv; /* singly inverted */ + *dest++ = b2_inv; + } + } + } + } + +/*--------------------------------------------------------------------------- + Soft gradient-diamonds with scale = bgscale. Code contributed by Adam + M. Costello. + ---------------------------------------------------------------------------*/ + + } else if ((bg[pat].type & 0x07) == 1) { + + hmax = (bgscale-1)/2; /* half the max weight of a color */ + max = 2*hmax; /* the max weight of a color */ + + r1 = rgb[bg[pat].rgb1_max].r; + g1 = rgb[bg[pat].rgb1_max].g; + b1 = rgb[bg[pat].rgb1_max].b; + r2 = rgb[bg[pat].rgb2_max].r; + g2 = rgb[bg[pat].rgb2_max].g; + b2 = rgb[bg[pat].rgb2_max].b; + + for (row = 0; row < rpng2_info.height; ++row) { + yidx = (int)(row % bgscale); + if (yidx > hmax) + yidx = bgscale-1 - yidx; + dest = (char *)bg_data + row*bg_rowbytes; + for (i = 0; i < rpng2_info.width; ++i) { + xidx = (int)(i % bgscale); + if (xidx > hmax) + xidx = bgscale-1 - xidx; + k = xidx + yidx; + *dest++ = (k*r1 + (max-k)*r2) / max; + *dest++ = (k*g1 + (max-k)*g2) / max; + *dest++ = (k*b1 + (max-k)*b2) / max; + } + } + +/*--------------------------------------------------------------------------- + Radial "starburst" with azimuthal sinusoids; [eventually number of sinu- + soids will equal bgscale?]. This one is slow but very cool. Code con- + tributed by Pieter S. van der Meulen (originally in Smalltalk). + ---------------------------------------------------------------------------*/ + + } else if ((bg[pat].type & 0x07) == 2) { + uch ch; + int ii, x, y, hw, hh, grayspot; + double freq, rotate, saturate, gray, intensity; + double angle=0.0, aoffset=0.0, maxDist, dist; + double red=0.0, green=0.0, blue=0.0, hue, s, v, f, p, q, t; + + fprintf(stderr, "%s: computing radial background...", + PROGNAME); + fflush(stderr); + + hh = (int)(rpng2_info.height / 2); + hw = (int)(rpng2_info.width / 2); + + /* variables for radial waves: + * aoffset: number of degrees to rotate hue [CURRENTLY NOT USED] + * freq: number of color beams originating from the center + * grayspot: size of the graying center area (anti-alias) + * rotate: rotation of the beams as a function of radius + * saturate: saturation of beams' shape azimuthally + */ + angle = CLIP(angle, 0.0, 360.0); + grayspot = CLIP(bg[pat].bg_gray, 1, (hh + hw)); + freq = MAX((double)bg[pat].bg_freq, 0.0); + saturate = (double)bg[pat].bg_bsat * 0.1; + rotate = (double)bg[pat].bg_brot * 0.1; + gray = 0.0; + intensity = 0.0; + maxDist = (double)((hw*hw) + (hh*hh)); + + for (row = 0; row < rpng2_info.height; ++row) { + y = (int)(row - hh); + dest = (char *)bg_data + row*bg_rowbytes; + for (i = 0; i < rpng2_info.width; ++i) { + x = (int)(i - hw); + angle = (x == 0)? PI_2 : atan((double)y / (double)x); + gray = (double)MAX(ABS(y), ABS(x)) / grayspot; + gray = MIN(1.0, gray); + dist = (double)((x*x) + (y*y)) / maxDist; + intensity = cos((angle+(rotate*dist*PI)) * freq) * + gray * saturate; + intensity = (MAX(MIN(intensity,1.0),-1.0) + 1.0) * 0.5; + hue = (angle + PI) * INV_PI_360 + aoffset; + s = gray * ((double)(ABS(x)+ABS(y)) / (double)(hw + hh)); + s = MIN(MAX(s,0.0), 1.0); + v = MIN(MAX(intensity,0.0), 1.0); + + if (s == 0.0) { + ch = (uch)(v * 255.0); + *dest++ = ch; + *dest++ = ch; + *dest++ = ch; + } else { + if ((hue < 0.0) || (hue >= 360.0)) + hue -= (((int)(hue / 360.0)) * 360.0); + hue /= 60.0; + ii = (int)hue; + f = hue - (double)ii; + p = (1.0 - s) * v; + q = (1.0 - (s * f)) * v; + t = (1.0 - (s * (1.0 - f))) * v; + if (ii == 0) { red = v; green = t; blue = p; } + else if (ii == 1) { red = q; green = v; blue = p; } + else if (ii == 2) { red = p; green = v; blue = t; } + else if (ii == 3) { red = p; green = q; blue = v; } + else if (ii == 4) { red = t; green = p; blue = v; } + else if (ii == 5) { red = v; green = p; blue = q; } + *dest++ = (uch)(red * 255.0); + *dest++ = (uch)(green * 255.0); + *dest++ = (uch)(blue * 255.0); + } + } + } + fprintf(stderr, "done.\n"); + fflush(stderr); + } + +/*--------------------------------------------------------------------------- + Blast background image to display buffer before beginning PNG decode. + ---------------------------------------------------------------------------*/ + + if (depth == 24 || depth == 32) { + ulg red, green, blue; + + for (row = 0; row < rpng2_info.height; ++row) { + src = bg_data + row*bg_rowbytes; + dest = ximage->data + row*ximage_rowbytes; + for (i = rpng2_info.width; i > 0; --i) { + red = *src++; + green = *src++; + blue = *src++; + pixel = (red << RShift) | + (green << GShift) | + (blue << BShift); + /* recall that we set ximage->byte_order = MSBFirst above */ + /* GRR BUG: this assumes bpp == 32, but may be 24: */ + *dest++ = (char)((pixel >> 24) & 0xff); + *dest++ = (char)((pixel >> 16) & 0xff); + *dest++ = (char)((pixel >> 8) & 0xff); + *dest++ = (char)( pixel & 0xff); + } + } + + } else if (depth == 16) { + ush red, green, blue; + + for (row = 0; row < rpng2_info.height; ++row) { + src = bg_data + row*bg_rowbytes; + dest = ximage->data + row*ximage_rowbytes; + for (i = rpng2_info.width; i > 0; --i) { + red = ((ush)(*src) << 8); ++src; + green = ((ush)(*src) << 8); ++src; + blue = ((ush)(*src) << 8); ++src; + pixel = ((red >> RShift) & RMask) | + ((green >> GShift) & GMask) | + ((blue >> BShift) & BMask); + /* recall that we set ximage->byte_order = MSBFirst above */ + *dest++ = (char)((pixel >> 8) & 0xff); + *dest++ = (char)( pixel & 0xff); + } + } + + } else /* depth == 8 */ { + + /* GRR: add 8-bit support */ + + } + + XPutImage(display, window, gc, ximage, 0, 0, 0, 0, rpng2_info.width, + rpng2_info.height); + + return 0; + +} /* end function rpng2_x_load_bg_image() */ + + + + + +static void rpng2_x_display_row(ulg row) +{ + uch bg_red = rpng2_info.bg_red; + uch bg_green = rpng2_info.bg_green; + uch bg_blue = rpng2_info.bg_blue; + uch *src, *src2=NULL; + char *dest; + uch r, g, b, a; + int ximage_rowbytes = ximage->bytes_per_line; + ulg i, pixel; + static int rows=0, prevpass=(-1); + static ulg firstrow; + +/*--------------------------------------------------------------------------- + rows and firstrow simply track how many rows (and which ones) have not + yet been displayed; alternatively, we could call XPutImage() for every + row and not bother with the records-keeping. + ---------------------------------------------------------------------------*/ + + Trace((stderr, "beginning rpng2_x_display_row()\n")) + + if (rpng2_info.pass != prevpass) { + if (pause_after_pass && rpng2_info.pass > 0) { + XEvent e; + KeySym k; + + fprintf(stderr, + "%s: end of pass %d of 7; click in image window to continue\n", + PROGNAME, prevpass + 1); + do + XNextEvent(display, &e); + while (!(e.type == ButtonPress && e.xbutton.button == Button1) + && !(e.type == KeyPress && + ((k = XLookupKeysym(&e.xkey, 0)) == XK_q + || k == XK_Escape) )) ; + } + fprintf(stderr, "%s: pass %d of 7\r", PROGNAME, rpng2_info.pass + 1); + fflush(stderr); + prevpass = rpng2_info.pass; + } + + if (rows == 0) + firstrow = row; /* first row that is not yet displayed */ + + ++rows; /* count of rows received but not yet displayed */ + +/*--------------------------------------------------------------------------- + Aside from the use of the rpng2_info struct, the lack of an outer loop + (over rows) and moving the XPutImage() call outside the "if (depth)" + tests, this routine is identical to rpng_x_display_image() in the non- + progressive version of the program. + ---------------------------------------------------------------------------*/ + + if (depth == 24 || depth == 32) { + ulg red, green, blue; + + src = rpng2_info.image_data + row*rpng2_info.rowbytes; + if (bg_image) + src2 = bg_data + row*bg_rowbytes; + dest = ximage->data + row*ximage_rowbytes; + if (rpng2_info.channels == 3) { + for (i = rpng2_info.width; i > 0; --i) { + red = *src++; + green = *src++; + blue = *src++; + pixel = (red << RShift) | + (green << GShift) | + (blue << BShift); + /* recall that we set ximage->byte_order = MSBFirst above */ + /* GRR BUG: this assumes bpp == 32, but may be 24: */ + *dest++ = (char)((pixel >> 24) & 0xff); + *dest++ = (char)((pixel >> 16) & 0xff); + *dest++ = (char)((pixel >> 8) & 0xff); + *dest++ = (char)( pixel & 0xff); + } + } else /* if (rpng2_info.channels == 4) */ { + for (i = rpng2_info.width; i > 0; --i) { + r = *src++; + g = *src++; + b = *src++; + a = *src++; + if (bg_image) { + bg_red = *src2++; + bg_green = *src2++; + bg_blue = *src2++; + } + if (a == 255) { + red = r; + green = g; + blue = b; + } else if (a == 0) { + red = bg_red; + green = bg_green; + blue = bg_blue; + } else { + /* this macro (from png.h) composites the foreground + * and background values and puts the result into the + * first argument */ + alpha_composite(red, r, a, bg_red); + alpha_composite(green, g, a, bg_green); + alpha_composite(blue, b, a, bg_blue); + } + pixel = (red << RShift) | + (green << GShift) | + (blue << BShift); + /* recall that we set ximage->byte_order = MSBFirst above */ + /* GRR BUG: this assumes bpp == 32, but may be 24: */ + *dest++ = (char)((pixel >> 24) & 0xff); + *dest++ = (char)((pixel >> 16) & 0xff); + *dest++ = (char)((pixel >> 8) & 0xff); + *dest++ = (char)( pixel & 0xff); + } + } + + } else if (depth == 16) { + ush red, green, blue; + + src = rpng2_info.row_pointers[row]; + if (bg_image) + src2 = bg_data + row*bg_rowbytes; + dest = ximage->data + row*ximage_rowbytes; + if (rpng2_info.channels == 3) { + for (i = rpng2_info.width; i > 0; --i) { + red = ((ush)(*src) << 8); + ++src; + green = ((ush)(*src) << 8); + ++src; + blue = ((ush)(*src) << 8); + ++src; + pixel = ((red >> RShift) & RMask) | + ((green >> GShift) & GMask) | + ((blue >> BShift) & BMask); + /* recall that we set ximage->byte_order = MSBFirst above */ + *dest++ = (char)((pixel >> 8) & 0xff); + *dest++ = (char)( pixel & 0xff); + } + } else /* if (rpng2_info.channels == 4) */ { + for (i = rpng2_info.width; i > 0; --i) { + r = *src++; + g = *src++; + b = *src++; + a = *src++; + if (bg_image) { + bg_red = *src2++; + bg_green = *src2++; + bg_blue = *src2++; + } + if (a == 255) { + red = ((ush)r << 8); + green = ((ush)g << 8); + blue = ((ush)b << 8); + } else if (a == 0) { + red = ((ush)bg_red << 8); + green = ((ush)bg_green << 8); + blue = ((ush)bg_blue << 8); + } else { + /* this macro (from png.h) composites the foreground + * and background values and puts the result back into + * the first argument (== fg byte here: safe) */ + alpha_composite(r, r, a, bg_red); + alpha_composite(g, g, a, bg_green); + alpha_composite(b, b, a, bg_blue); + red = ((ush)r << 8); + green = ((ush)g << 8); + blue = ((ush)b << 8); + } + pixel = ((red >> RShift) & RMask) | + ((green >> GShift) & GMask) | + ((blue >> BShift) & BMask); + /* recall that we set ximage->byte_order = MSBFirst above */ + *dest++ = (char)((pixel >> 8) & 0xff); + *dest++ = (char)( pixel & 0xff); + } + } + + } else /* depth == 8 */ { + + /* GRR: add 8-bit support */ + + } + + +/*--------------------------------------------------------------------------- + Display after every 16 rows or when on one of last two rows. (Region + may include previously displayed lines due to interlacing--i.e., not + contiguous. Also, second-to-last row is final one in interlaced images + with odd number of rows.) For demos, flush (and delay) after every 16th + row so "sparse" passes don't go twice as fast. + ---------------------------------------------------------------------------*/ + + if (demo_timing && (row - firstrow >= 16 || row >= rpng2_info.height-2)) { + XPutImage(display, window, gc, ximage, 0, (int)firstrow, 0, + (int)firstrow, rpng2_info.width, row - firstrow + 1); + XFlush(display); + rows = 0; + usleep(usleep_duration); + } else + if (!demo_timing && ((rows & 0xf) == 0 || row >= rpng2_info.height-2)) { + XPutImage(display, window, gc, ximage, 0, (int)firstrow, 0, + (int)firstrow, rpng2_info.width, row - firstrow + 1); + XFlush(display); + rows = 0; + } + +} + + + + + +static void rpng2_x_finish_display(void) +{ + Trace((stderr, "beginning rpng2_x_finish_display()\n")) + + /* last row has already been displayed by rpng2_x_display_row(), so we + * have nothing to do here except set a flag and let the user know that + * the image is done */ + + rpng2_info.done = TRUE; + printf( + "Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n"); + fflush(stdout); +} + + + + + +static void rpng2_x_cleanup(void) +{ + if (bg_image && bg_data) { + free(bg_data); + bg_data = NULL; + } + + if (rpng2_info.image_data) { + free(rpng2_info.image_data); + rpng2_info.image_data = NULL; + } + + if (rpng2_info.row_pointers) { + free(rpng2_info.row_pointers); + rpng2_info.row_pointers = NULL; + } + + if (ximage) { + if (ximage->data) { + free(ximage->data); /* we allocated it, so we free it */ + ximage->data = (char *)NULL; /* instead of XDestroyImage() */ + } + XDestroyImage(ximage); + ximage = NULL; + } + + if (have_gc) + XFreeGC(display, gc); + + if (have_window) + XDestroyWindow(display, window); + + if (have_colormap) + XFreeColormap(display, colormap); + + if (have_nondefault_visual) + XFree(visual_list); +} + + + + + +static int rpng2_x_msb(ulg u32val) +{ + int i; + + for (i = 31; i >= 0; --i) { + if (u32val & 0x80000000L) + break; + u32val <<= 1; + } + return i; +} diff --git a/gtkmm-osx/libpng-1.2.5/contrib/gregbook/toucan.png b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/toucan.png new file mode 100644 index 0000000000000000000000000000000000000000..03960d4939938541ca3f8efee4bf13ffdecbb2f5 GIT binary patch literal 12901 zcma*NWpo@(vMt(@TFlH07Be$5GlRv<%*<@D#mr!V#mp>=(Xz$NEcMklbI#m(>%AXu zud1#cJ2EmWGkdMBijHVyMJYr$JU9RVfG8s^uKIZ``aIKNAOHX`!oF1CrvbDSQ4j%u zMHH|cr5gbN5CCO)b%{^?{|#6GI1B*%zje6(GU5NlRXmX=`N0_(A%xV>KIS3t$)QLv zQPAKaY!jf6!6DFKA+BP;aS(tXOVE|;Uwp<0CBPxek%2QX+9N}6AR78ggv z7y<(tDDvfVZh(LUCaDtRFhN+r_B0_*rDFZ%cgL7s9GZxYKaNytiAy8o< zK4ankJ;1+)_%uHc3!1etPoK|Y|FdGB%Ksn01O8|4J{$jgBVYkwFaQWRFz_wD zcdvi$%1u>K4FFaS4p9LFfgquvVL)(YupoHQKUfBRfZqSbKFR+@Ea>gi5dR;(-VdVC4xLbxrnJC%1@d03#v_s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iWLu~Dw?Oh>ut`A!!_rZ|$ly(JY0I)s2wqK zs4lnwlPS|!tHWJv_E^z8kB}JPNDm0hMdTqBB*hvX9_C3Egx|)B7T~n+-zWR51WFF~ zykOM&Gvu7d%$jn>t}qXVw-0sCx)1l4)Uvd1>qy|xNZ2tzL7cugWy?lA5^(SCVm2*j-lF52V@ z+T%x*`0$QnzCi=sQ)sQE))$@5i!5n_%E;WVC-CQKJ}4QyFA?w54K&f~&R7^d6jIU6 zPj`1xfXC^L*Jscf-{V`m$+~`0;&)~W=mb49C_HNA&mUfMHzy)W1G*D==8R-$N%7Zr zbF6;+e6*#WbR$n3w-0m&PQ^MyQ7YqO`kFbBryEFO%AgS@5>jnOMe3u_t_d?%4X*TH z{5+BTylYAX%v=|+#TsxTno;spmmLhP@5DYGb;_LLVILP@C>fFS;v)~!tu~=`PTn(w z@kq2sccr}peszs_a|jf~@0}a(6)VWFA|VbDn}oBIbW&_Bdy?$OI#a2_7$wSqVNMW8 zQ7moec)LT|o}Km&ELgd(qU71jCs@!EQ?R)buGTAc`(&6qv-!Bwc!oQ3r~BS{UR<7w zzki8DO>^bD?$zuVE?6~FS0Elv9U$D^?!mf^V8)z$rNjVY%ID;{EdFzTiE1K=;e9QkgXl#UrL)nNm{m6wV0io`SMJnp7jViK_}}T?)OW`2<^`_|QGc(qUi8*gRgx z{-!?xiX#CoA7{3v@;VAO`^mfBIAxo(5^u@`?- z)!O(Kd=k9Yde7M2WlPxo!YWbUs9DH}eX_B<*m^qYN+4D&rZb3)BF-KJ&P71fPk}$O zJEdAJIYUf+tAU{x4?>CGnbMGE@jD1gHO+dQh(lR=O z916my +#include +#include +#include /* for jmpbuf declaration in writepng.h */ +#include + +#ifdef DOS_OS2_W32 +# include /* for isatty(), setmode() prototypes */ +# include /* O_BINARY for fdopen() without text translation */ +# ifdef __EMX__ +# ifndef getch +# define getch() _read_kbd(0, 1, 0) /* need getche() */ +# endif +# else /* !__EMX__ */ +# ifdef __GO32__ +# include +# define getch() getkey() /* GRR: need getche() */ +# else +# include /* for getche() console input */ +# endif +# endif /* ?__EMX__ */ +# define FGETS(buf,len,stream) dos_kbd_gets(buf,len) +#else +# include /* for isatty() prototype */ +# define FGETS fgets +#endif + +/* #define DEBUG : this enables the Trace() macros */ + +/* #define FORBID_LATIN1_CTRL : this requires the user to re-enter any + text that includes control characters discouraged by the PNG spec; text + that includes an escape character (27) must be re-entered regardless */ + +#include "writepng.h" /* typedefs, common macros, writepng prototypes */ + + + +/* local prototypes */ + +static int wpng_isvalid_latin1(uch *p, int len); +static void wpng_cleanup(void); + +#ifdef DOS_OS2_W32 + static char *dos_kbd_gets(char *buf, int len); +#endif + + + +static mainprog_info wpng_info; /* lone global */ + + + +int main(int argc, char **argv) +{ +#ifndef DOS_OS2_W32 + FILE *keybd; +#endif +#ifdef sgi + FILE *tmpfile; /* or we could just use keybd, since no overlap */ + char tmpline[80]; +#endif + char *inname = NULL, outname[256]; + char *p, pnmchar, pnmline[256]; + char *bgstr, *textbuf = NULL; + ulg rowbytes; + int rc, len = 0; + int error = 0; + int text = FALSE; + int maxval; + double LUT_exponent; /* just the lookup table */ + double CRT_exponent = 2.2; /* just the monitor */ + double default_display_exponent; /* whole display system */ + double default_gamma = 0.0; + + + wpng_info.infile = NULL; + wpng_info.outfile = NULL; + wpng_info.image_data = NULL; + wpng_info.row_pointers = NULL; + wpng_info.filter = FALSE; + wpng_info.interlaced = FALSE; + wpng_info.have_bg = FALSE; + wpng_info.have_time = FALSE; + wpng_info.have_text = 0; + wpng_info.gamma = 0.0; + + + /* First get the default value for our display-system exponent, i.e., + * the product of the CRT exponent and the exponent corresponding to + * the frame-buffer's lookup table (LUT), if any. If the PNM image + * looks correct on the user's display system, its file gamma is the + * inverse of this value. (Note that this is not an exhaustive list + * of LUT values--e.g., OpenStep has a lot of weird ones--but it should + * cover 99% of the current possibilities. This section must ensure + * that default_display_exponent is positive.) */ + +#if defined(NeXT) + /* third-party utilities can modify the default LUT exponent */ + LUT_exponent = 1.0 / 2.2; + /* + if (some_next_function_that_returns_gamma(&next_gamma)) + LUT_exponent = 1.0 / next_gamma; + */ +#elif defined(sgi) + LUT_exponent = 1.0 / 1.7; + /* there doesn't seem to be any documented function to + * get the "gamma" value, so we do it the hard way */ + tmpfile = fopen("/etc/config/system.glGammaVal", "r"); + if (tmpfile) { + double sgi_gamma; + + fgets(tmpline, 80, tmpfile); + fclose(tmpfile); + sgi_gamma = atof(tmpline); + if (sgi_gamma > 0.0) + LUT_exponent = 1.0 / sgi_gamma; + } +#elif defined(Macintosh) + LUT_exponent = 1.8 / 2.61; + /* + if (some_mac_function_that_returns_gamma(&mac_gamma)) + LUT_exponent = mac_gamma / 2.61; + */ +#else + LUT_exponent = 1.0; /* assume no LUT: most PCs */ +#endif + + /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */ + default_display_exponent = LUT_exponent * CRT_exponent; + + + /* If the user has set the SCREEN_GAMMA environment variable as suggested + * (somewhat imprecisely) in the libpng documentation, use that; otherwise + * use the default value we just calculated. Either way, the user may + * override this via a command-line option. */ + + if ((p = getenv("SCREEN_GAMMA")) != NULL) { + double exponent = atof(p); + + if (exponent > 0.0) + default_gamma = 1.0 / exponent; + } + + if (default_gamma == 0.0) + default_gamma = 1.0 / default_display_exponent; + + + /* Now parse the command line for options and the PNM filename. */ + + while (*++argv && !error) { + if (!strncmp(*argv, "-i", 2)) { + wpng_info.interlaced = TRUE; + } else if (!strncmp(*argv, "-time", 3)) { + wpng_info.modtime = time(NULL); + wpng_info.have_time = TRUE; + } else if (!strncmp(*argv, "-text", 3)) { + text = TRUE; + } else if (!strncmp(*argv, "-gamma", 2)) { + if (!*++argv) + ++error; + else { + wpng_info.gamma = atof(*argv); + if (wpng_info.gamma <= 0.0) + ++error; + else if (wpng_info.gamma > 1.01) + fprintf(stderr, PROGNAME + " warning: file gammas are usually less than 1.0\n"); + } + } else if (!strncmp(*argv, "-bgcolor", 4)) { + if (!*++argv) + ++error; + else { + bgstr = *argv; + if (strlen(bgstr) != 7 || bgstr[0] != '#') + ++error; + else { + unsigned r, g, b; /* this way quiets compiler warnings */ + + sscanf(bgstr+1, "%2x%2x%2x", &r, &g, &b); + wpng_info.bg_red = (uch)r; + wpng_info.bg_green = (uch)g; + wpng_info.bg_blue = (uch)b; + wpng_info.have_bg = TRUE; + } + } + } else { + if (**argv != '-') { + inname = *argv; + if (argv[1]) /* shouldn't be any more args after filename */ + ++error; + } else + ++error; /* not expecting any other options */ + } + } + + + /* open the input and output files, or register an error and abort */ + + if (!inname) { + if (isatty(0)) { + fprintf(stderr, PROGNAME + ": must give input filename or provide image data via stdin\n"); + ++error; + } else { +#ifdef DOS_OS2_W32 + /* some buggy C libraries require BOTH setmode() and fdopen(bin) */ + setmode(fileno(stdin), O_BINARY); + setmode(fileno(stdout), O_BINARY); +#endif + if ((wpng_info.infile = fdopen(fileno(stdin), "rb")) == NULL) { + fprintf(stderr, PROGNAME + ": unable to reopen stdin in binary mode\n"); + ++error; + } else + if ((wpng_info.outfile = fdopen(fileno(stdout), "wb")) == NULL) { + fprintf(stderr, PROGNAME + ": unable to reopen stdout in binary mode\n"); + fclose(wpng_info.infile); + ++error; + } else + wpng_info.filter = TRUE; + } + } else if ((len = strlen(inname)) > 250) { + fprintf(stderr, PROGNAME ": input filename is too long [%d chars]\n", + len); + ++error; + } else if (!(wpng_info.infile = fopen(inname, "rb"))) { + fprintf(stderr, PROGNAME ": can't open input file [%s]\n", inname); + ++error; + } + + if (!error) { + fgets(pnmline, 256, wpng_info.infile); + if (pnmline[0] != 'P' || ((pnmchar = pnmline[1]) != '5' && + pnmchar != '6' && pnmchar != '8')) + { + fprintf(stderr, PROGNAME + ": input file [%s] is not a binary PGM, PPM or PAM file\n", + inname); + ++error; + } else { + wpng_info.pnmtype = (int)(pnmchar - '0'); + if (wpng_info.pnmtype != 8) + wpng_info.have_bg = FALSE; /* no need for bg if opaque */ + do { + fgets(pnmline, 256, wpng_info.infile); /* lose any comments */ + } while (pnmline[0] == '#'); + sscanf(pnmline, "%ld %ld", &wpng_info.width, &wpng_info.height); + do { + fgets(pnmline, 256, wpng_info.infile); /* more comment lines */ + } while (pnmline[0] == '#'); + sscanf(pnmline, "%d", &maxval); + if (wpng_info.width <= 0L || wpng_info.height <= 0L || + maxval != 255) + { + fprintf(stderr, PROGNAME + ": only positive width/height, maxval == 255 allowed \n"); + ++error; + } + wpng_info.sample_depth = 8; /* <==> maxval 255 */ + + if (!wpng_info.filter) { + /* make outname from inname */ + if ((p = strrchr(inname, '.')) == NULL || + (p - inname) != (len - 4)) + { + strcpy(outname, inname); + strcpy(outname+len, ".png"); + } else { + len -= 4; + strncpy(outname, inname, len); + strcpy(outname+len, ".png"); + } + /* check if outname already exists; if not, open */ + if ((wpng_info.outfile = fopen(outname, "rb")) != NULL) { + fprintf(stderr, PROGNAME ": output file exists [%s]\n", + outname); + fclose(wpng_info.outfile); + ++error; + } else if (!(wpng_info.outfile = fopen(outname, "wb"))) { + fprintf(stderr, PROGNAME ": can't open output file [%s]\n", + outname); + ++error; + } + } + } + if (error) { + fclose(wpng_info.infile); + wpng_info.infile = NULL; + if (wpng_info.filter) { + fclose(wpng_info.outfile); + wpng_info.outfile = NULL; + } + } + } + + + /* if we had any errors, print usage and die horrible death...arrr! */ + + if (error) { + fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, APPNAME); + writepng_version_info(); + fprintf(stderr, "\n" +"Usage: %s [-gamma exp] [-bgcolor bg] [-text] [-time] [-interlace] pnmfile\n" +"or: ... | %s [-gamma exp] [-bgcolor bg] [-text] [-time] [-interlace] | ...\n" + " exp \ttransfer-function exponent (``gamma'') of the image in\n" + "\t\t floating-point format (e.g., ``%.5f''); if image looks\n" + "\t\t correct on given display system, image gamma is equal to\n" + "\t\t inverse of display-system exponent, i.e., 1 / (LUT * CRT)\n" + "\t\t (where LUT = lookup-table exponent and CRT = CRT exponent;\n" + "\t\t first varies, second is usually 2.2, all are positive)\n" + " bg \tdesired background color for alpha-channel images, in\n" + "\t\t 7-character hex RGB format (e.g., ``#ff7700'' for orange:\n" + "\t\t same as HTML colors)\n" + " -text\tprompt interactively for text info (tEXt chunks)\n" + " -time\tinclude a tIME chunk (last modification time)\n" + " -interlace\twrite interlaced PNG image\n" + "\n" +"pnmfile or stdin must be a binary PGM (`P5'), PPM (`P6') or (extremely\n" +"unofficial and unsupported!) PAM (`P8') file. Currently it is required\n" +"to have maxval == 255 (i.e., no scaling). If pnmfile is specified, it\n" +"is converted to the corresponding PNG file with the same base name but a\n" +"``.png'' extension; files read from stdin are converted and sent to stdout.\n" +"The conversion is progressive (low memory usage) unless interlacing is\n" +"requested; in that case the whole image will be buffered in memory and\n" +"written in one call.\n" + "\n", PROGNAME, PROGNAME, default_gamma); + exit(1); + } + + + /* prepare the text buffers for libpng's use; note that even though + * PNG's png_text struct includes a length field, we don't have to fill + * it out */ + + if (text && +#ifndef DOS_OS2_W32 + (keybd = fdopen(fileno(stderr), "r")) != NULL && +#endif + (textbuf = (char *)malloc((5 + 9)*75)) != NULL) + { + int i, valid, result; + + fprintf(stderr, + "Enter text info (no more than 72 characters per line);\n"); + fprintf(stderr, "to skip a field, hit the key.\n"); + /* note: just leaves len == 1 */ + + do { + valid = TRUE; + p = textbuf + TEXT_TITLE_OFFSET; + fprintf(stderr, " Title: "); + fflush(stderr); + if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) { + if (p[len-1] == '\n') + p[--len] = '\0'; + wpng_info.title = p; + wpng_info.have_text |= TEXT_TITLE; + if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) { + fprintf(stderr, " " PROGNAME " warning: character code" + " %u is %sdiscouraged by the PNG\n specification " + "[first occurrence was at character position #%d]\n", + (unsigned)p[result], (p[result] == 27)? "strongly " : "", + result+1); + fflush(stderr); +#ifdef FORBID_LATIN1_CTRL + wpng_info.have_text &= ~TEXT_TITLE; + valid = FALSE; +#else + if (p[result] == 27) { /* escape character */ + wpng_info.have_text &= ~TEXT_TITLE; + valid = FALSE; + } +#endif + } + } + } while (!valid); + + do { + valid = TRUE; + p = textbuf + TEXT_AUTHOR_OFFSET; + fprintf(stderr, " Author: "); + fflush(stderr); + if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) { + if (p[len-1] == '\n') + p[--len] = '\0'; + wpng_info.author = p; + wpng_info.have_text |= TEXT_AUTHOR; + if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) { + fprintf(stderr, " " PROGNAME " warning: character code" + " %u is %sdiscouraged by the PNG\n specification " + "[first occurrence was at character position #%d]\n", + (unsigned)p[result], (p[result] == 27)? "strongly " : "", + result+1); + fflush(stderr); +#ifdef FORBID_LATIN1_CTRL + wpng_info.have_text &= ~TEXT_AUTHOR; + valid = FALSE; +#else + if (p[result] == 27) { /* escape character */ + wpng_info.have_text &= ~TEXT_AUTHOR; + valid = FALSE; + } +#endif + } + } + } while (!valid); + + do { + valid = TRUE; + p = textbuf + TEXT_DESC_OFFSET; + fprintf(stderr, " Description (up to 9 lines):\n"); + for (i = 1; i < 10; ++i) { + fprintf(stderr, " [%d] ", i); + fflush(stderr); + if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) + p += len; /* now points at NULL; char before is newline */ + else + break; + } + if ((len = p - (textbuf + TEXT_DESC_OFFSET)) > 1) { + if (p[-1] == '\n') { + p[-1] = '\0'; + --len; + } + wpng_info.desc = textbuf + TEXT_DESC_OFFSET; + wpng_info.have_text |= TEXT_DESC; + p = textbuf + TEXT_DESC_OFFSET; + if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) { + fprintf(stderr, " " PROGNAME " warning: character code" + " %u is %sdiscouraged by the PNG\n specification " + "[first occurrence was at character position #%d]\n", + (unsigned)p[result], (p[result] == 27)? "strongly " : "", + result+1); + fflush(stderr); +#ifdef FORBID_LATIN1_CTRL + wpng_info.have_text &= ~TEXT_DESC; + valid = FALSE; +#else + if (p[result] == 27) { /* escape character */ + wpng_info.have_text &= ~TEXT_DESC; + valid = FALSE; + } +#endif + } + } + } while (!valid); + + do { + valid = TRUE; + p = textbuf + TEXT_COPY_OFFSET; + fprintf(stderr, " Copyright: "); + fflush(stderr); + if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) { + if (p[len-1] == '\n') + p[--len] = '\0'; + wpng_info.copyright = p; + wpng_info.have_text |= TEXT_COPY; + if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) { + fprintf(stderr, " " PROGNAME " warning: character code" + " %u is %sdiscouraged by the PNG\n specification " + "[first occurrence was at character position #%d]\n", + (unsigned)p[result], (p[result] == 27)? "strongly " : "", + result+1); + fflush(stderr); +#ifdef FORBID_LATIN1_CTRL + wpng_info.have_text &= ~TEXT_COPY; + valid = FALSE; +#else + if (p[result] == 27) { /* escape character */ + wpng_info.have_text &= ~TEXT_COPY; + valid = FALSE; + } +#endif + } + } + } while (!valid); + + do { + valid = TRUE; + p = textbuf + TEXT_EMAIL_OFFSET; + fprintf(stderr, " E-mail: "); + fflush(stderr); + if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) { + if (p[len-1] == '\n') + p[--len] = '\0'; + wpng_info.email = p; + wpng_info.have_text |= TEXT_EMAIL; + if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) { + fprintf(stderr, " " PROGNAME " warning: character code" + " %u is %sdiscouraged by the PNG\n specification " + "[first occurrence was at character position #%d]\n", + (unsigned)p[result], (p[result] == 27)? "strongly " : "", + result+1); + fflush(stderr); +#ifdef FORBID_LATIN1_CTRL + wpng_info.have_text &= ~TEXT_EMAIL; + valid = FALSE; +#else + if (p[result] == 27) { /* escape character */ + wpng_info.have_text &= ~TEXT_EMAIL; + valid = FALSE; + } +#endif + } + } + } while (!valid); + + do { + valid = TRUE; + p = textbuf + TEXT_URL_OFFSET; + fprintf(stderr, " URL: "); + fflush(stderr); + if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) { + if (p[len-1] == '\n') + p[--len] = '\0'; + wpng_info.url = p; + wpng_info.have_text |= TEXT_URL; + if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) { + fprintf(stderr, " " PROGNAME " warning: character code" + " %u is %sdiscouraged by the PNG\n specification " + "[first occurrence was at character position #%d]\n", + (unsigned)p[result], (p[result] == 27)? "strongly " : "", + result+1); + fflush(stderr); +#ifdef FORBID_LATIN1_CTRL + wpng_info.have_text &= ~TEXT_URL; + valid = FALSE; +#else + if (p[result] == 27) { /* escape character */ + wpng_info.have_text &= ~TEXT_URL; + valid = FALSE; + } +#endif + } + } + } while (!valid); + +#ifndef DOS_OS2_W32 + fclose(keybd); +#endif + + } else if (text) { + fprintf(stderr, PROGNAME ": unable to allocate memory for text\n"); + text = FALSE; + wpng_info.have_text = 0; + } + + + /* allocate libpng stuff, initialize transformations, write pre-IDAT data */ + + if ((rc = writepng_init(&wpng_info)) != 0) { + switch (rc) { + case 2: + fprintf(stderr, PROGNAME + ": libpng initialization problem (longjmp)\n"); + break; + case 4: + fprintf(stderr, PROGNAME ": insufficient memory\n"); + break; + case 11: + fprintf(stderr, PROGNAME + ": internal logic error (unexpected PNM type)\n"); + break; + default: + fprintf(stderr, PROGNAME + ": unknown writepng_init() error\n"); + break; + } + exit(rc); + } + + + /* free textbuf, since it's a completely local variable and all text info + * has just been written to the PNG file */ + + if (text && textbuf) { + free(textbuf); + textbuf = NULL; + } + + + /* calculate rowbytes on basis of image type; note that this becomes much + * more complicated if we choose to support PBM type, ASCII PNM types, or + * 16-bit-per-sample binary data [currently not an official NetPBM type] */ + + if (wpng_info.pnmtype == 5) + rowbytes = wpng_info.width; + else if (wpng_info.pnmtype == 6) + rowbytes = wpng_info.width * 3; + else /* if (wpng_info.pnmtype == 8) */ + rowbytes = wpng_info.width * 4; + + + /* read and write the image, either in its entirety (if writing interlaced + * PNG) or row by row (if non-interlaced) */ + + fprintf(stderr, "Encoding image data...\n"); + fflush(stderr); + + if (wpng_info.interlaced) { + long i; + ulg bytes; + ulg image_bytes = rowbytes * wpng_info.height; /* overflow? */ + + wpng_info.image_data = (uch *)malloc(image_bytes); + wpng_info.row_pointers = (uch **)malloc(wpng_info.height*sizeof(uch *)); + if (wpng_info.image_data == NULL || wpng_info.row_pointers == NULL) { + fprintf(stderr, PROGNAME ": insufficient memory for image data\n"); + writepng_cleanup(&wpng_info); + wpng_cleanup(); + exit(5); + } + for (i = 0; i < wpng_info.height; ++i) + wpng_info.row_pointers[i] = wpng_info.image_data + i*rowbytes; + bytes = fread(wpng_info.image_data, 1, image_bytes, wpng_info.infile); + if (bytes != image_bytes) { + fprintf(stderr, PROGNAME ": expected %lu bytes, got %lu bytes\n", + image_bytes, bytes); + fprintf(stderr, " (continuing anyway)\n"); + } + if (writepng_encode_image(&wpng_info) != 0) { + fprintf(stderr, PROGNAME + ": libpng problem (longjmp) while writing image data\n"); + writepng_cleanup(&wpng_info); + wpng_cleanup(); + exit(2); + } + + } else /* not interlaced: write progressively (row by row) */ { + long j; + ulg bytes; + + wpng_info.image_data = (uch *)malloc(rowbytes); + if (wpng_info.image_data == NULL) { + fprintf(stderr, PROGNAME ": insufficient memory for row data\n"); + writepng_cleanup(&wpng_info); + wpng_cleanup(); + exit(5); + } + error = 0; + for (j = wpng_info.height; j > 0L; --j) { + bytes = fread(wpng_info.image_data, 1, rowbytes, wpng_info.infile); + if (bytes != rowbytes) { + fprintf(stderr, PROGNAME + ": expected %lu bytes, got %lu bytes (row %ld)\n", rowbytes, + bytes, wpng_info.height-j); + ++error; + break; + } + if (writepng_encode_row(&wpng_info) != 0) { + fprintf(stderr, PROGNAME + ": libpng problem (longjmp) while writing row %ld\n", + wpng_info.height-j); + ++error; + break; + } + } + if (error) { + writepng_cleanup(&wpng_info); + wpng_cleanup(); + exit(2); + } + if (writepng_encode_finish(&wpng_info) != 0) { + fprintf(stderr, PROGNAME ": error on final libpng call\n"); + writepng_cleanup(&wpng_info); + wpng_cleanup(); + exit(2); + } + } + + + /* OK, we're done (successfully): clean up all resources and quit */ + + fprintf(stderr, "Done.\n"); + fflush(stderr); + + writepng_cleanup(&wpng_info); + wpng_cleanup(); + + return 0; +} + + + + + +static int wpng_isvalid_latin1(uch *p, int len) +{ + int i, result = -1; + + for (i = 0; i < len; ++i) { + if (p[i] == 10 || (p[i] > 31 && p[i] < 127) || p[i] > 160) + continue; /* character is completely OK */ + if (result < 0 || (p[result] != 27 && p[i] == 27)) + result = i; /* mark location of first questionable one */ + } /* or of first escape character (bad) */ + + return result; +} + + + + + +static void wpng_cleanup(void) +{ + if (wpng_info.outfile) { + fclose(wpng_info.outfile); + wpng_info.outfile = NULL; + } + + if (wpng_info.infile) { + fclose(wpng_info.infile); + wpng_info.infile = NULL; + } + + if (wpng_info.image_data) { + free(wpng_info.image_data); + wpng_info.image_data = NULL; + } + + if (wpng_info.row_pointers) { + free(wpng_info.row_pointers); + wpng_info.row_pointers = NULL; + } +} + + + + +#ifdef DOS_OS2_W32 + +static char *dos_kbd_gets(char *buf, int len) +{ + int ch, count=0; + + do { + buf[count++] = ch = getche(); + } while (ch != '\r' && count < len-1); + + buf[count--] = '\0'; /* terminate string */ + if (buf[count] == '\r') /* Enter key makes CR, so change to newline */ + buf[count] = '\n'; + + fprintf(stderr, "\n"); /* Enter key does *not* cause a newline */ + fflush(stderr); + + return buf; +} + +#endif /* DOS_OS2_W32 */ diff --git a/gtkmm-osx/libpng-1.2.5/contrib/gregbook/writepng.c b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/writepng.c new file mode 100644 index 0000000..6802b12 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/writepng.c @@ -0,0 +1,368 @@ +/*--------------------------------------------------------------------------- + + wpng - simple PNG-writing program writepng.c + + --------------------------------------------------------------------------- + + Copyright (c) 1998-2000 Greg Roelofs. All rights reserved. + + This software is provided "as is," without warranty of any kind, + express or implied. In no event shall the author or contributors + be held liable for any damages arising in any way from the use of + this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute + it freely, subject to the following restrictions: + + 1. Redistributions of source code must retain the above copyright + notice, disclaimer, and this list of conditions. + 2. Redistributions in binary form must reproduce the above copyright + notice, disclaimer, and this list of conditions in the documenta- + tion and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this + software must display the following acknowledgment: + + This product includes software developed by Greg Roelofs + and contributors for the book, "PNG: The Definitive Guide," + published by O'Reilly and Associates. + + ---------------------------------------------------------------------------*/ + + +#include /* for exit() prototype */ + +#include "png.h" /* libpng header; includes zlib.h and setjmp.h */ +#include "writepng.h" /* typedefs, common macros, public prototypes */ + + +/* local prototype */ + +static void writepng_error_handler(png_structp png_ptr, png_const_charp msg); + + + +void writepng_version_info(void) +{ + fprintf(stderr, " Compiled with libpng %s; using libpng %s.\n", + PNG_LIBPNG_VER_STRING, png_libpng_ver); + fprintf(stderr, " Compiled with zlib %s; using zlib %s.\n", + ZLIB_VERSION, zlib_version); +} + + + + +/* returns 0 for success, 2 for libpng problem, 4 for out of memory, 11 for + * unexpected pnmtype; note that outfile might be stdout */ + +int writepng_init(mainprog_info *mainprog_ptr) +{ + png_structp png_ptr; /* note: temporary variables! */ + png_infop info_ptr; + int color_type, interlace_type; + + + /* could also replace libpng warning-handler (final NULL), but no need: */ + + png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, mainprog_ptr, + writepng_error_handler, NULL); + if (!png_ptr) + return 4; /* out of memory */ + + info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) { + png_destroy_write_struct(&png_ptr, NULL); + return 4; /* out of memory */ + } + + + /* setjmp() must be called in every function that calls a PNG-writing + * libpng function, unless an alternate error handler was installed-- + * but compatible error handlers must either use longjmp() themselves + * (as in this program) or exit immediately, so here we go: */ + + if (setjmp(mainprog_ptr->jmpbuf)) { + png_destroy_write_struct(&png_ptr, &info_ptr); + return 2; + } + + + /* make sure outfile is (re)opened in BINARY mode */ + + png_init_io(png_ptr, mainprog_ptr->outfile); + + + /* set the compression levels--in general, always want to leave filtering + * turned on (except for palette images) and allow all of the filters, + * which is the default; want 32K zlib window, unless entire image buffer + * is 16K or smaller (unknown here)--also the default; usually want max + * compression (NOT the default); and remaining compression flags should + * be left alone */ + + png_set_compression_level(png_ptr, Z_BEST_COMPRESSION); +/* + >> this is default for no filtering; Z_FILTERED is default otherwise: + png_set_compression_strategy(png_ptr, Z_DEFAULT_STRATEGY); + >> these are all defaults: + png_set_compression_mem_level(png_ptr, 8); + png_set_compression_window_bits(png_ptr, 15); + png_set_compression_method(png_ptr, 8); + */ + + + /* set the image parameters appropriately */ + + if (mainprog_ptr->pnmtype == 5) + color_type = PNG_COLOR_TYPE_GRAY; + else if (mainprog_ptr->pnmtype == 6) + color_type = PNG_COLOR_TYPE_RGB; + else if (mainprog_ptr->pnmtype == 8) + color_type = PNG_COLOR_TYPE_RGB_ALPHA; + else { + png_destroy_write_struct(&png_ptr, &info_ptr); + return 11; + } + + interlace_type = mainprog_ptr->interlaced? PNG_INTERLACE_ADAM7 : + PNG_INTERLACE_NONE; + + png_set_IHDR(png_ptr, info_ptr, mainprog_ptr->width, mainprog_ptr->height, + mainprog_ptr->sample_depth, color_type, interlace_type, + PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); + + if (mainprog_ptr->gamma > 0.0) + png_set_gAMA(png_ptr, info_ptr, mainprog_ptr->gamma); + + if (mainprog_ptr->have_bg) { /* we know it's RGBA, not gray+alpha */ + png_color_16 background; + + background.red = mainprog_ptr->bg_red; + background.green = mainprog_ptr->bg_green; + background.blue = mainprog_ptr->bg_blue; + png_set_bKGD(png_ptr, info_ptr, &background); + } + + if (mainprog_ptr->have_time) { + png_time modtime; + + png_convert_from_time_t(&modtime, mainprog_ptr->modtime); + png_set_tIME(png_ptr, info_ptr, &modtime); + } + + if (mainprog_ptr->have_text) { + png_text text[6]; + int num_text = 0; + + if (mainprog_ptr->have_text & TEXT_TITLE) { + text[num_text].compression = PNG_TEXT_COMPRESSION_NONE; + text[num_text].key = "Title"; + text[num_text].text = mainprog_ptr->title; + ++num_text; + } + if (mainprog_ptr->have_text & TEXT_AUTHOR) { + text[num_text].compression = PNG_TEXT_COMPRESSION_NONE; + text[num_text].key = "Author"; + text[num_text].text = mainprog_ptr->author; + ++num_text; + } + if (mainprog_ptr->have_text & TEXT_DESC) { + text[num_text].compression = PNG_TEXT_COMPRESSION_NONE; + text[num_text].key = "Description"; + text[num_text].text = mainprog_ptr->desc; + ++num_text; + } + if (mainprog_ptr->have_text & TEXT_COPY) { + text[num_text].compression = PNG_TEXT_COMPRESSION_NONE; + text[num_text].key = "Copyright"; + text[num_text].text = mainprog_ptr->copyright; + ++num_text; + } + if (mainprog_ptr->have_text & TEXT_EMAIL) { + text[num_text].compression = PNG_TEXT_COMPRESSION_NONE; + text[num_text].key = "E-mail"; + text[num_text].text = mainprog_ptr->email; + ++num_text; + } + if (mainprog_ptr->have_text & TEXT_URL) { + text[num_text].compression = PNG_TEXT_COMPRESSION_NONE; + text[num_text].key = "URL"; + text[num_text].text = mainprog_ptr->url; + ++num_text; + } + png_set_text(png_ptr, info_ptr, text, num_text); + } + + + /* write all chunks up to (but not including) first IDAT */ + + png_write_info(png_ptr, info_ptr); + + + /* if we wanted to write any more text info *after* the image data, we + * would set up text struct(s) here and call png_set_text() again, with + * just the new data; png_set_tIME() could also go here, but it would + * have no effect since we already called it above (only one tIME chunk + * allowed) */ + + + /* set up the transformations: for now, just pack low-bit-depth pixels + * into bytes (one, two or four pixels per byte) */ + + png_set_packing(png_ptr); +/* png_set_shift(png_ptr, &sig_bit); to scale low-bit-depth values */ + + + /* make sure we save our pointers for use in writepng_encode_image() */ + + mainprog_ptr->png_ptr = png_ptr; + mainprog_ptr->info_ptr = info_ptr; + + + /* OK, that's all we need to do for now; return happy */ + + return 0; +} + + + + + +/* returns 0 for success, 2 for libpng (longjmp) problem */ + +int writepng_encode_image(mainprog_info *mainprog_ptr) +{ + png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr; + png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr; + + + /* as always, setjmp() must be called in every function that calls a + * PNG-writing libpng function */ + + if (setjmp(mainprog_ptr->jmpbuf)) { + png_destroy_write_struct(&png_ptr, &info_ptr); + mainprog_ptr->png_ptr = NULL; + mainprog_ptr->info_ptr = NULL; + return 2; + } + + + /* and now we just write the whole image; libpng takes care of interlacing + * for us */ + + png_write_image(png_ptr, mainprog_ptr->row_pointers); + + + /* since that's it, we also close out the end of the PNG file now--if we + * had any text or time info to write after the IDATs, second argument + * would be info_ptr, but we optimize slightly by sending NULL pointer: */ + + png_write_end(png_ptr, NULL); + + return 0; +} + + + + + +/* returns 0 if succeeds, 2 if libpng problem */ + +int writepng_encode_row(mainprog_info *mainprog_ptr) /* NON-interlaced only! */ +{ + png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr; + png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr; + + + /* as always, setjmp() must be called in every function that calls a + * PNG-writing libpng function */ + + if (setjmp(mainprog_ptr->jmpbuf)) { + png_destroy_write_struct(&png_ptr, &info_ptr); + mainprog_ptr->png_ptr = NULL; + mainprog_ptr->info_ptr = NULL; + return 2; + } + + + /* image_data points at our one row of image data */ + + png_write_row(png_ptr, mainprog_ptr->image_data); + + return 0; +} + + + + + +/* returns 0 if succeeds, 2 if libpng problem */ + +int writepng_encode_finish(mainprog_info *mainprog_ptr) /* NON-interlaced! */ +{ + png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr; + png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr; + + + /* as always, setjmp() must be called in every function that calls a + * PNG-writing libpng function */ + + if (setjmp(mainprog_ptr->jmpbuf)) { + png_destroy_write_struct(&png_ptr, &info_ptr); + mainprog_ptr->png_ptr = NULL; + mainprog_ptr->info_ptr = NULL; + return 2; + } + + + /* close out PNG file; if we had any text or time info to write after + * the IDATs, second argument would be info_ptr: */ + + png_write_end(png_ptr, NULL); + + return 0; +} + + + + + +void writepng_cleanup(mainprog_info *mainprog_ptr) +{ + png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr; + png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr; + + if (png_ptr && info_ptr) + png_destroy_write_struct(&png_ptr, &info_ptr); +} + + + + + +static void writepng_error_handler(png_structp png_ptr, png_const_charp msg) +{ + mainprog_info *mainprog_ptr; + + /* This function, aside from the extra step of retrieving the "error + * pointer" (below) and the fact that it exists within the application + * rather than within libpng, is essentially identical to libpng's + * default error handler. The second point is critical: since both + * setjmp() and longjmp() are called from the same code, they are + * guaranteed to have compatible notions of how big a jmp_buf is, + * regardless of whether _BSD_SOURCE or anything else has (or has not) + * been defined. */ + + fprintf(stderr, "writepng libpng error: %s\n", msg); + fflush(stderr); + + mainprog_ptr = png_get_error_ptr(png_ptr); + if (mainprog_ptr == NULL) { /* we are completely hosed now */ + fprintf(stderr, + "writepng severe error: jmpbuf not recoverable; terminating.\n"); + fflush(stderr); + exit(99); + } + + longjmp(mainprog_ptr->jmpbuf, 1); +} diff --git a/gtkmm-osx/libpng-1.2.5/contrib/gregbook/writepng.h b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/writepng.h new file mode 100644 index 0000000..93c3da8 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/gregbook/writepng.h @@ -0,0 +1,109 @@ +/*--------------------------------------------------------------------------- + + wpng - simple PNG-writing program writepng.h + + --------------------------------------------------------------------------- + + Copyright (c) 1998-2000 Greg Roelofs. All rights reserved. + + This software is provided "as is," without warranty of any kind, + express or implied. In no event shall the author or contributors + be held liable for any damages arising in any way from the use of + this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute + it freely, subject to the following restrictions: + + 1. Redistributions of source code must retain the above copyright + notice, disclaimer, and this list of conditions. + 2. Redistributions in binary form must reproduce the above copyright + notice, disclaimer, and this list of conditions in the documenta- + tion and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this + software must display the following acknowledgment: + + This product includes software developed by Greg Roelofs + and contributors for the book, "PNG: The Definitive Guide," + published by O'Reilly and Associates. + + ---------------------------------------------------------------------------*/ + +#ifndef TRUE +# define TRUE 1 +# define FALSE 0 +#endif + +#ifndef MAX +# define MAX(a,b) ((a) > (b)? (a) : (b)) +# define MIN(a,b) ((a) < (b)? (a) : (b)) +#endif + +#ifdef DEBUG +# define Trace(x) {fprintf x ; fflush(stderr); fflush(stdout);} +#else +# define Trace(x) ; +#endif + +#define TEXT_TITLE 0x01 +#define TEXT_AUTHOR 0x02 +#define TEXT_DESC 0x04 +#define TEXT_COPY 0x08 +#define TEXT_EMAIL 0x10 +#define TEXT_URL 0x20 + +#define TEXT_TITLE_OFFSET 0 +#define TEXT_AUTHOR_OFFSET 72 +#define TEXT_COPY_OFFSET (2*72) +#define TEXT_EMAIL_OFFSET (3*72) +#define TEXT_URL_OFFSET (4*72) +#define TEXT_DESC_OFFSET (5*72) + +typedef unsigned char uch; +typedef unsigned short ush; +typedef unsigned long ulg; + +typedef struct _mainprog_info { + double gamma; + long width; + long height; + time_t modtime; + FILE *infile; + FILE *outfile; + void *png_ptr; + void *info_ptr; + uch *image_data; + uch **row_pointers; + char *title; + char *author; + char *desc; + char *copyright; + char *email; + char *url; + int filter; /* command-line-filter flag, not PNG row filter! */ + int pnmtype; + int sample_depth; + int interlaced; + int have_bg; + int have_time; + int have_text; + jmp_buf jmpbuf; + uch bg_red; + uch bg_green; + uch bg_blue; +} mainprog_info; + + +/* prototypes for public functions in writepng.c */ + +void writepng_version_info(void); + +int writepng_init(mainprog_info *mainprog_ptr); + +int writepng_encode_image(mainprog_info *mainprog_ptr); + +int writepng_encode_row(mainprog_info *mainprog_ptr); + +int writepng_encode_finish(mainprog_info *mainprog_ptr); + +void writepng_cleanup(mainprog_info *mainprog_ptr); diff --git a/gtkmm-osx/libpng-1.2.5/contrib/msvctest/README.txt b/gtkmm-osx/libpng-1.2.5/contrib/msvctest/README.txt new file mode 100644 index 0000000..09bffd3 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/msvctest/README.txt @@ -0,0 +1,22 @@ +Microsoft Developer Studio Build File, Format Version 6.00 for +msvctest + +Assumes that libpng DLLs and LIBs are in ..\..\projects\msvc\win32\libpng +Assumes that zlib DLLs and LIBs are in ..\..\projects\msvc\win32\zlib + +To build: + +1) On the main menu Select "Build|Set Active configuration". + Choose the configuration that corresponds to the library you want to test. + This library must have been built using the libpng MS project located in + the "mscv" subdirectory. + +2) Select "Build|Clean" + +3) Select "Build|Rebuild All" + +4) The test results should appear in the "Build" pane of the Output Window. + + +Simon-Pierre Cadieux +Methodex Computer Systems Inc. diff --git a/gtkmm-osx/libpng-1.2.5/contrib/msvctest/msvctest.dsp b/gtkmm-osx/libpng-1.2.5/contrib/msvctest/msvctest.dsp new file mode 100644 index 0000000..afe93a5 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/msvctest/msvctest.dsp @@ -0,0 +1,247 @@ +# Microsoft Developer Studio Project File - Name="msvctest" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=msvctest - Win32 Debug DLL +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "msvctest.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "msvctest.mak" CFG="msvctest - Win32 Debug DLL" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "msvctest - Win32 DLL" (based on "Win32 (x86) Console Application") +!MESSAGE "msvctest - Win32 Debug DLL" (based on "Win32 (x86) Console Application") +!MESSAGE "msvctest - Win32 ASM DLL" (based on "Win32 (x86) Console Application") +!MESSAGE "msvctest - Win32 Debug ASM DLL" (based on "Win32 (x86) Console Application") +!MESSAGE "msvctest - Win32 LIB" (based on "Win32 (x86) Console Application") +!MESSAGE "msvctest - Win32 Debug LIB" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "msvctest - Win32 DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "dll" +# PROP BASE Intermediate_Dir "dll" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "dll" +# PROP Intermediate_Dir "dll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c +# ADD CPP /nologo /MD /W3 /O1 /I "..\..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:console /machine:I386 +# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll\libpng13.lib /nologo /subsystem:console /machine:I386 +# Begin Special Build Tool +OutDir=.\dll +SOURCE="$(InputPath)" +PostBuild_Desc=[Run Test] +PostBuild_Cmds=set path=..\..\projects\msvc\win32\libpng\dll;..\..\projects\msvc\win32\zlib\dll; $(outdir)\msvctest.exe ..\..\pngtest.png +# End Special Build Tool + +!ELSEIF "$(CFG)" == "msvctest - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "dll_dbg" +# PROP BASE Intermediate_Dir "dll_dbg" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "dll_dbg" +# PROP Intermediate_Dir "dll_dbg" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "..\..\..\zlib" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbg\libpng13d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# Begin Special Build Tool +OutDir=.\dll_dbg +SOURCE="$(InputPath)" +PostBuild_Desc=[Run Test] +PostBuild_Cmds=set path=..\..\projects\msvc\win32\libpng\dll_dbg;..\..\projects\msvc\win32\zlib\dll_dbg; $(outdir)\msvctest.exe ..\..\pngtest.png +# End Special Build Tool + +!ELSEIF "$(CFG)" == "msvctest - Win32 ASM DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "dll_asm" +# PROP BASE Intermediate_Dir "dll_asm" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "dll_asm" +# PROP Intermediate_Dir "dll_asm" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c +# ADD CPP /nologo /MD /W3 /O1 /I "..\..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:console /machine:I386 +# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_asm\libpng13a.lib /nologo /subsystem:console /machine:I386 +# Begin Special Build Tool +OutDir=.\dll_asm +SOURCE="$(InputPath)" +PostBuild_Desc=[Run Test] +PostBuild_Cmds=set path=..\..\projects\msvc\win32\libpng\dll_asm;..\..\projects\msvc\win32\zlib\dll_asm; $(outdir)\msvctest.exe ..\..\pngtest.png +# End Special Build Tool + +!ELSEIF "$(CFG)" == "msvctest - Win32 Debug ASM DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "dll_dbga" +# PROP BASE Intermediate_Dir "dll_dbga" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "dll_dbga" +# PROP Intermediate_Dir "dll_dbga" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "..\..\..\zlib" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbga\libpng13b.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# Begin Special Build Tool +OutDir=.\dll_dbga +SOURCE="$(InputPath)" +PostBuild_Desc=[Run Test] +PostBuild_Cmds=set path=..\..\projects\msvc\win32\libpng\dll_dbga;..\..\projects\msvc\win32\zlib\dll_dbga; $(outdir)\msvctest.exe ..\..\pngtest.png +# End Special Build Tool + +!ELSEIF "$(CFG)" == "msvctest - Win32 LIB" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "lib" +# PROP BASE Intermediate_Dir "lib" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "lib" +# PROP Intermediate_Dir "lib" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c +# ADD CPP /nologo /W3 /O1 /I "..\..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:console /machine:I386 +# ADD LINK32 ..\..\projects\msvc\win32\libpng\lib\libpng.lib /nologo /subsystem:console /machine:I386 +# Begin Special Build Tool +OutDir=.\lib +SOURCE="$(InputPath)" +PostBuild_Desc=[Run Test] +PostBuild_Cmds=$(outdir)\msvctest.exe ..\..\pngtest.png +# End Special Build Tool + +!ELSEIF "$(CFG)" == "msvctest - Win32 Debug LIB" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "lib_dbg" +# PROP BASE Intermediate_Dir "lib_dbg" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "lib_dbg" +# PROP Intermediate_Dir "lib_dbg" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Zi /Od /I "..\..\..\zlib" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 ..\..\projects\msvc\win32\libpng\lib_dbg\libpng.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# Begin Special Build Tool +OutDir=.\lib_dbg +SOURCE="$(InputPath)" +PostBuild_Desc=[Run Test] +PostBuild_Cmds=$(outdir)\msvctest.exe ..\..\pngtest.png +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "msvctest - Win32 DLL" +# Name "msvctest - Win32 Debug DLL" +# Name "msvctest - Win32 ASM DLL" +# Name "msvctest - Win32 Debug ASM DLL" +# Name "msvctest - Win32 LIB" +# Name "msvctest - Win32 Debug LIB" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\pngtest.c +# End Source File +# Begin Source File + +SOURCE=.\README.txt +# PROP Exclude_From_Build 1 +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/gtkmm-osx/libpng-1.2.5/contrib/msvctest/msvctest.dsw b/gtkmm-osx/libpng-1.2.5/contrib/msvctest/msvctest.dsw new file mode 100644 index 0000000..a2bb056 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/msvctest/msvctest.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "msvctest"=.\msvctest.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngminus/README b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/README new file mode 100644 index 0000000..8683a59 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/README @@ -0,0 +1,153 @@ +PngMinus +-------- +(copyright Willem van Schaik, 1999) + + +License +------- + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and +that both that copyright notice and this permission notice appear in +supporting documentation. This software is provided "as is" without +express or implied warranty. + + +Some history +------------ +Soon after the creation of PNG in 1995, the need was felt for a set of +pnmtopng / pngtopnm utilities. Independantly Alexander Lehmann and I +(Willem van Schaik) started such a project. Luckily we discovered this +and merged the two together into pnmtopng.tar.gz, which is available +from a/o ftp://swrinde.nde.swri.edu/pub/png/. + +These two utilities have many, many options and make use of most of the +features of PNG, like gamma, alpha, sbit, text-chunks, etc. This makes +the utilities quite complex and by now not anymore very maintainable. +When we wrote these programs, libpng was still in an early stage. +Therefore, lots of the functionality that we put in our software can now +be done using transform-functions in libpng. + +Finally, to compile these programs, you need to have installed and +compiled three libraries: libpng, zlib and netpbm. Especially the latter +makes the whole setup a bit bulky. But that's unavoidable given the many +features of pnmtopng. + + +What now +-------- +At this moment libpng is in a very stable state and can do much of the +work done in pnmtopng. Also, pnmtopng needs to be upgraded to the new +interface of libpng. Hence, it is time for a rewrite from the ground up +of pnmtopng and pngtopnm. This will happen in the near future (stay +tuned). The new package will get a different name to distinguish it from +the old one: PngPlus. + +To experiment a bit with the new interface of libpng, I started off with +a small prototype that contains only the basic functionality. It doesn't +have any of the options to read or write special chunks and it will do +no gamma correction. But this makes it also a simple program that is +quite easy to understand and can serve well as a template for other +software developments. (By now there are of course a couple of programs, +like Greg Roelofs' rpng/wpng, that can be used just as good.) + + +Can and can not +--------------- +As this is the small brother of the future PngPlus, I called this fellow +PngMinus. Because I started this development in good-old Turbo-C, I +avoided the use the netpbm library, which requires DOS extenders. Again, +another reason to call it PngMinus (minus netpbm :-). So, part of the +program are some elementary routines to read / write pgm- and ppm-files. +It does not read b&w pbm-files. + +The downside of this approach is that you can not use them on images +that require blocks of memory bigger than 64k (the DOS version). For +larger images you will get an out-of-memory error. + +As said before, PngMinus doesn't correct for gamma. When reading +png-files you can do this just as well by piping the output of png2pnm +to pnmgamma, one of the standard PbmPlus tools. This same scenario will +most probably also be followed in the full-blown future PngPlus, with +the addition of course of the possibility to create gamma-chunks when +writing png-files. + +On the other hand it supports alpha-channels. When reading a png-image +you can write the alpha-channel into a pgm-file. And when creating an +RGB+A png-image, you just combine a ppm-file with a corresponding +pgm-file containing the alpha-channel. When reading, transparency chunks +are converted into an alpha-channel and from there on treated the same +way. + +Finally you can opt for writing ascii or binary pgm- and ppm-files. When +the bit-depth is 16, the format will always be ascii. + + +Using it +-------- +To distinguish them from pnmtopng and PngPlus, the utilities are named +png2pnm and pnm2png (2 instead of to). The input- and output-files can +be given as parameters or through redirection. Therefore the programs +can be part of a pipe. + +To list the options type "png2pnm -h" or "pnm2png -h". + + +Just like Scandinavian furniture +-------------------------------- +You have to put it together yourself. I did test the software under +MS-DOS with Turbo-C 3.0 and under RedHat Linux 4.2 with gcc. In both +cases I used libpng-1.0.4 and zlib-1.1.3. Later versions should be OK, +however some older libpng versions have a bug in pngmem.c when using +Turbo-C 3.0 (see below). + +You can build it using one of the two makefiles (make -f makefile.###) +or use the batch/script files pngminus.bat / pngminus.sh. This assumes +that you have built the libraries in ../libpng and ../zlib. Using Linux, +make sure that you have built libpng with makefile.std and not +makefile.linux (also called .lnx in earlier versions of libpng). The +latter creates a .so shared-library, while the PngMinus makefile assumes +a normal .a static library. + +If you create a ../pngsuite directory and then store the basn####.png +files from PngSuite (http://www.schaik.com/pngsuite/) in there, you can +test in one go the proper functioning of PngMinus, see png2pnm.bat and +pnm2png.bat (or the .sh versions). + + +Warranty +------- +Please, remember that this was just a small experiment to learn a few +things. It will have many unforeseen features . Who said bugs? Use +it when you are in need for something simple or when you want to start +developing your own stuff. + + +The Turbo bug +------------- +** pngmem.old + hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L); + hptr += 16L; +** pngmem.c + hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L); + hptr = hptr + 16L; +** + +** pngmem.old + png_ptr->offset_table_ptr[i] = (png_bytep)hptr; + hptr += (png_uint_32)65536L; +** pngmem.c + png_ptr->offset_table_ptr[i] = (png_bytep)hptr; + hptr = hptr + 65536L; +** + + +The end +------- +Willem van Schaik +mailto:willem@schaik.com +http://www.schaik.com/png/ +------- +Oct 1999 + diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngminus/makefile.std b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/makefile.std new file mode 100644 index 0000000..2fb061b --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/makefile.std @@ -0,0 +1,65 @@ +# Makefile for PngMinus (png2pnm and pnm2png) +# Linux / Unix + +#CC=cc +CC=gcc +LD=$(CC) + +RM=rm -f + +#PNGPATH = /usr/local +#PNGINC = -I$(PNGPATH)/include/libpng12 +#PNGLIB = -L$(PNGPATH)/lib -lpng12 +#PNGLIBS = $(PNGPATH)/lib/libpng12.a +PNGINC = -I../.. +PNGLIB = -L../.. -lpng +PNGLIBS = ../../libpng.a + +#ZPATH = /usr/local +#ZINC = -I$(ZPATH)/include +#ZLIB = -L$(ZPATH)/lib -lz +#ZLIBS = $(ZPATH)/lib/libz.a +ZINC = -I../../../zlib +ZLIB = -L../../../zlib -lz +ZLIBS = ../../../zlib/libz.a + +CFLAGS=-O3 $(PNGINC) $(ZINC) +LDFLAGS=$(PNGLIB) $(ZLIB) +LDFLAGSS=$(PNGLIBS) $(ZLIBS) +C=.c +O=.o +L=.a +E= + +# dependencies + +#all: png2pnm$(E) pnm2png$(E) +all: png2pnm$(E) pnm2png$(E) png2pnm-static$(E) pnm2png-static$(E) + +png2pnm$(O): png2pnm$(C) + $(CC) -c $(CFLAGS) png2pnm$(C) + +png2pnm$(E): png2pnm$(O) + $(LD) -o png2pnm$(E) png2pnm$(O) $(LDFLAGS) -lm + +png2pnm-static$(E): png2pnm$(O) + $(LD) -o png2pnm-static$(E) png2pnm$(O) $(LDFLAGSS) -lm + +pnm2png$(O): pnm2png$(C) + $(CC) -c $(CFLAGS) pnm2png$(C) + +pnm2png$(E): pnm2png$(O) + $(LD) -o pnm2png$(E) pnm2png$(O) $(LDFLAGS) -lm + +pnm2png-static$(E): pnm2png$(O) + $(LD) -o pnm2png-static$(E) pnm2png$(O) $(LDFLAGSS) -lm + +clean: + $(RM) png2pnm$(O) + $(RM) pnm2png$(O) + $(RM) png2pnm$(E) + $(RM) pnm2png$(E) + $(RM) png2pnm-static$(E) + $(RM) pnm2png-static$(E) + +# End of makefile for png2pnm / pnm2png diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngminus/makefile.tc3 b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/makefile.tc3 new file mode 100644 index 0000000..404f18d --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/makefile.tc3 @@ -0,0 +1,38 @@ +# Makefile for PngMinus (png2pnm and pnm2png) +# TurboC++ 3.0 + +CC=tcc -Ic:\tc3\inc +LD=tcc -Lc:\tc3\lib +LB=tlib +RM=del +CP=copy +MODEL=l +CCFLAGS=-O -m$(MODEL) -I..\libpng -I..\zlib +LDFLAGS=-m$(MODEL) -L..\libpng -L..\zlib +C=.c +O=.obj +L=.lib +E=.exe + +# dependencies + +all: png2pnm$(E) pnm2png$(E) + +png2pnm$(O): png2pnm$(C) + $(CC) -c $(CCFLAGS) png2pnm$(C) + +png2pnm$(E): png2pnm$(O) + $(LD) $(LDFLAGS) png2pnm$(O) libpng$(L) zlib$(L) + +pnm2png$(O): pnm2png$(C) + $(CC) -c $(CCFLAGS) pnm2png$(C) + +pnm2png$(E): pnm2png$(O) + $(LD) $(LDFLAGS) pnm2png$(O) libpng$(L) zlib$(L) + +clean: + $(RM) *$(O) + $(RM) *$(E) + +# End of makefile for png2pnm / pnm2png + diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngminus/makevms.com b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/makevms.com new file mode 100644 index 0000000..00561bc --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/makevms.com @@ -0,0 +1,92 @@ +$!------------------------------------------------------------------------------ +$! make Contrib programs of libpng under OpenVMS +$! +$! +$! Look for the compiler used +$! +$ zlibsrc = "[---.zlib]" +$ ccopt="/include=(''zlibsrc',[--])" +$ if f$getsyi("HW_MODEL").ge.1024 +$ then +$ ccopt = "/prefix=all"+ccopt +$ comp = "__decc__=1" +$ if f$trnlnm("SYS").eqs."" then define sys sys$library: +$ else +$ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs."" +$ then +$ if f$trnlnm("SYS").eqs."" then define sys sys$library: +$ if f$search("SYS$SYSTEM:VAXC.EXE").eqs."" +$ then +$ comp = "__gcc__=1" +$ CC :== GCC +$ else +$ comp = "__vaxc__=1" +$ endif +$ else +$ if f$trnlnm("SYS").eqs."" then define sys decc$library_include: +$ ccopt = "/decc/prefix=all"+ccopt +$ comp = "__decc__=1" +$ endif +$ endif +$ open/write lopt lib.opt +$ write lopt "[--]libpng.olb/lib" +$ write lopt "''zlibsrc'libz.olb/lib" +$ close lopt +$ open/write xopt x11.opt +$ write xopt "sys$library:decw$xlibshr.exe/share" +$ close xopt +$ write sys$output "Compiling PNG contrib programs ..." +$ write sys$output "Building pnm2png..." +$ CALL MAKE pnm2png.OBJ "cc ''CCOPT' pnm2png" - + pnm2png.c +$ call make pnm2png.exe - + "LINK pnm2png,lib.opt/opt" - + pnm2png.obj +$ write sys$output "Building png2pnm..." +$ CALL MAKE png2pnm.OBJ "cc ''CCOPT' png2pnm" - + png2pnm.c +$ call make png2pnm.exe - + "LINK png2pnm,lib.opt/opt" - + png2pnm.obj +$ exit +$! +$! +$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES +$ V = 'F$Verify(0) +$! P1 = What we are trying to make +$! P2 = Command to make it +$! P3 - P8 What it depends on +$ +$ If F$Search(P1) .Eqs. "" Then Goto Makeit +$ Time = F$CvTime(F$File(P1,"RDT")) +$arg=3 +$Loop: +$ Argument = P'arg +$ If Argument .Eqs. "" Then Goto Exit +$ El=0 +$Loop2: +$ File = F$Element(El," ",Argument) +$ If File .Eqs. " " Then Goto Endl +$ AFile = "" +$Loop3: +$ OFile = AFile +$ AFile = F$Search(File) +$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl +$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit +$ Goto Loop3 +$NextEL: +$ El = El + 1 +$ Goto Loop2 +$EndL: +$ arg=arg+1 +$ If arg .Le. 8 Then Goto Loop +$ Goto Exit +$ +$Makeit: +$ VV=F$VERIFY(0) +$ write sys$output P2 +$ 'P2 +$ VV='F$Verify(VV) +$Exit: +$ If V Then Set Verify +$ENDSUBROUTINE diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngminus/png2pnm.bat b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/png2pnm.bat new file mode 100644 index 0000000..449cf36 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/png2pnm.bat @@ -0,0 +1,41 @@ +REM -- grayscale +png2pnm.exe -noraw ..\pngsuite\basn0g01.png basn0g01.pgm +png2pnm.exe -noraw ..\pngsuite\basn0g02.png basn0g02.pgm +png2pnm.exe -noraw ..\pngsuite\basn0g04.png basn0g04.pgm +png2pnm.exe -noraw ..\pngsuite\basn0g08.png basn0g08.pgm +png2pnm.exe -noraw ..\pngsuite\basn0g16.png basn0g16.pgm +REM -- full-color +png2pnm.exe -noraw ..\pngsuite\basn2c08.png basn2c08.ppm +png2pnm.exe -noraw ..\pngsuite\basn2c16.png basn2c16.ppm +REM -- palletted +png2pnm.exe -noraw ..\pngsuite\basn3p01.png basn3p01.ppm +png2pnm.exe -noraw ..\pngsuite\basn3p02.png basn3p02.ppm +png2pnm.exe -noraw ..\pngsuite\basn3p04.png basn3p04.ppm +png2pnm.exe -noraw ..\pngsuite\basn3p08.png basn3p08.ppm +REM -- gray with alpha-channel +png2pnm.exe -noraw ..\pngsuite\basn4a08.png basn4a08.pgm +png2pnm.exe -noraw ..\pngsuite\basn4a16.png basn4a16.pgm +REM -- color with alpha-channel +png2pnm.exe -noraw -alpha basn6a08.pgm ..\pngsuite\basn6a08.png basn6a08.ppm +png2pnm.exe -noraw -alpha basn6a16.pgm ..\pngsuite\basn6a16.png basn6a16.ppm +REM -- grayscale +png2pnm.exe -raw ..\pngsuite\basn0g01.png rawn0g01.pgm +png2pnm.exe -raw ..\pngsuite\basn0g02.png rawn0g02.pgm +png2pnm.exe -raw ..\pngsuite\basn0g04.png rawn0g04.pgm +png2pnm.exe -raw ..\pngsuite\basn0g08.png rawn0g08.pgm +png2pnm.exe -raw ..\pngsuite\basn0g16.png rawn0g16.pgm +REM -- full-color +png2pnm.exe -raw ..\pngsuite\basn2c08.png rawn2c08.ppm +png2pnm.exe -raw ..\pngsuite\basn2c16.png rawn2c16.ppm +REM -- palletted +png2pnm.exe -raw ..\pngsuite\basn3p01.png rawn3p01.ppm +png2pnm.exe -raw ..\pngsuite\basn3p02.png rawn3p02.ppm +png2pnm.exe -raw ..\pngsuite\basn3p04.png rawn3p04.ppm +png2pnm.exe -raw ..\pngsuite\basn3p08.png rawn3p08.ppm +REM -- gray with alpha-channel +png2pnm.exe -raw ..\pngsuite\basn4a08.png rawn4a08.pgm +png2pnm.exe -raw ..\pngsuite\basn4a16.png rawn4a16.pgm +REM -- color with alpha-channel +png2pnm.exe -noraw -alpha rawn6a08.pgm ..\pngsuite\basn6a08.png rawn6a08.ppm +png2pnm.exe -noraw -alpha rawn6a16.pgm ..\pngsuite\basn6a16.png rawn6a16.ppm + diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngminus/png2pnm.c b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/png2pnm.c new file mode 100644 index 0000000..010870a --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/png2pnm.c @@ -0,0 +1,430 @@ +/* + * png2pnm.c --- conversion from PNG-file to PGM/PPM-file + * copyright (C) 1999 by Willem van Schaik + * + * version 1.0 - 1999.10.15 - First version. + * + * Permission to use, copy, modify, and distribute this software and + * its documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear in + * supporting documentation. This software is provided "as is" without + * express or implied warranty. + */ + +#include +#include +#ifdef __TURBOC__ +#include +#include +#endif + +#ifndef BOOL +#define BOOL unsigned char +#endif +#ifndef TRUE +#define TRUE (BOOL) 1 +#endif +#ifndef FALSE +#define FALSE (BOOL) 0 +#endif + +#ifdef __TURBOC__ +#define STDIN 0 +#define STDOUT 1 +#define STDERR 2 +#endif + +/* to make png2pnm verbose so we can find problems (needs to be before png.h) */ +#ifndef PNG_DEBUG +#define PNG_DEBUG 0 +#endif + +#include "png.h" + +/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */ +#ifndef png_jmpbuf +# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) +#endif + +/* function prototypes */ + +int main (int argc, char *argv[]); +void usage (); +BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL alpha); + +/* + * main + */ + +int main(int argc, char *argv[]) +{ + FILE *fp_rd = stdin; + FILE *fp_wr = stdout; + FILE *fp_al = NULL; + BOOL raw = TRUE; + BOOL alpha = FALSE; + int argi; + + for (argi = 1; argi < argc; argi++) + { + if (argv[argi][0] == '-') + { + switch (argv[argi][1]) + { + case 'n': + raw = FALSE; + break; + case 'r': + raw = TRUE; + break; + case 'a': + alpha = TRUE; + argi++; + if ((fp_al = fopen (argv[argi], "wb")) == NULL) + { + fprintf (stderr, "PNM2PNG\n"); + fprintf (stderr, "Error: can not create alpha-channel file %s\n", argv[argi]); + exit (1); + } + break; + case 'h': + case '?': + usage(); + exit(0); + break; + default: + fprintf (stderr, "PNG2PNM\n"); + fprintf (stderr, "Error: unknown option %s\n", argv[argi]); + usage(); + exit(1); + break; + } /* end switch */ + } + else if (fp_rd == stdin) + { + if ((fp_rd = fopen (argv[argi], "rb")) == NULL) + { + fprintf (stderr, "PNG2PNM\n"); + fprintf (stderr, "Error: file %s does not exist\n", argv[argi]); + exit (1); + } + } + else if (fp_wr == stdout) + { + if ((fp_wr = fopen (argv[argi], "wb")) == NULL) + { + fprintf (stderr, "PNG2PNM\n"); + fprintf (stderr, "Error: can not create file %s\n", argv[argi]); + exit (1); + } + } + else + { + fprintf (stderr, "PNG2PNM\n"); + fprintf (stderr, "Error: too many parameters\n"); + usage(); + exit(1); + } + } /* end for */ + +#ifdef __TURBOC__ + /* set stdin/stdout if required to binary */ + if (fp_rd == stdin) + { + setmode (STDIN, O_BINARY); + } + if ((raw) && (fp_wr == stdout)) + { + setmode (STDOUT, O_BINARY); + } +#endif + + /* call the conversion program itself */ + if (png2pnm (fp_rd, fp_wr, fp_al, raw, alpha) == FALSE) + { + fprintf (stderr, "PNG2PNM\n"); + fprintf (stderr, "Error: unsuccessful convertion of PNG-image\n"); + exit(1); + } + + /* close input file */ + fclose (fp_rd); + /* close output file */ + fclose (fp_wr); + /* close alpha file */ + if (alpha) + fclose (fp_al); + + return 0; +} + +/* + * usage + */ + +void usage() +{ + fprintf (stderr, "PNG2PNM\n"); + fprintf (stderr, " by Willem van Schaik, 1999\n"); +#ifdef __TURBOC__ + fprintf (stderr, " for Turbo-C and Borland-C compilers\n"); +#else + fprintf (stderr, " for Linux (and Unix) compilers\n"); +#endif + fprintf (stderr, "Usage: png2pnm [options] .png [.pnm]\n"); + fprintf (stderr, " or: ... | png2pnm [options]\n"); + fprintf (stderr, "Options:\n"); + fprintf (stderr, " -r[aw] write pnm-file in binary format (P4/P5/P6) (default)\n"); + fprintf (stderr, " -n[oraw] write pnm-file in ascii format (P1/P2/P3)\n"); + fprintf (stderr, " -a[lpha] .pgm write PNG alpha channel as pgm-file\n"); + fprintf (stderr, " -h | -? print this help-information\n"); +} + +/* + * png2pnm + */ + +BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL alpha) +{ + png_struct *png_ptr = NULL; + png_info *info_ptr = NULL; + png_byte buf[8]; + png_byte *png_pixels = NULL; + png_byte **row_pointers = NULL; + png_byte *pix_ptr = NULL; + png_uint_32 row_bytes; + + png_uint_32 width; + png_uint_32 height; + int bit_depth; + int channels; + int color_type; + int alpha_present; + int row, col; + int ret; + int i; + long dep_16; + + /* read and check signature in PNG file */ + ret = fread (buf, 1, 8, png_file); + if (ret != 8) + return FALSE; + + ret = png_check_sig (buf, 8); + if (!ret) + return FALSE; + + /* create png and info structures */ + + png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, + NULL, NULL, NULL); + if (!png_ptr) + return FALSE; /* out of memory */ + + info_ptr = png_create_info_struct (png_ptr); + if (!info_ptr) + { + png_destroy_read_struct (&png_ptr, NULL, NULL); + return FALSE; /* out of memory */ + } + + if (setjmp (png_jmpbuf(png_ptr))) + { + png_destroy_read_struct (&png_ptr, &info_ptr, NULL); + return FALSE; + } + + /* set up the input control for C streams */ + png_init_io (png_ptr, png_file); + png_set_sig_bytes (png_ptr, 8); /* we already read the 8 signature bytes */ + + /* read the file information */ + png_read_info (png_ptr, info_ptr); + + /* get size and bit-depth of the PNG-image */ + png_get_IHDR (png_ptr, info_ptr, + &width, &height, &bit_depth, &color_type, + NULL, NULL, NULL); + + /* set-up the transformations */ + + /* transform paletted images into full-color rgb */ + if (color_type == PNG_COLOR_TYPE_PALETTE) + png_set_expand (png_ptr); + /* expand images to bit-depth 8 (only applicable for grayscale images) */ + if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) + png_set_expand (png_ptr); + /* transform transparency maps into full alpha-channel */ + if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) + png_set_expand (png_ptr); + +#ifdef NJET + /* downgrade 16-bit images to 8 bit */ + if (bit_depth == 16) + png_set_strip_16 (png_ptr); + /* transform grayscale images into full-color */ + if (color_type == PNG_COLOR_TYPE_GRAY || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_gray_to_rgb (png_ptr); + /* only if file has a file gamma, we do a correction */ + if (png_get_gAMA (png_ptr, info_ptr, &file_gamma)) + png_set_gamma (png_ptr, (double) 2.2, file_gamma); +#endif + + /* all transformations have been registered; now update info_ptr data, + * get rowbytes and channels, and allocate image memory */ + + png_read_update_info (png_ptr, info_ptr); + + /* get the new color-type and bit-depth (after expansion/stripping) */ + png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, + NULL, NULL, NULL); + + /* check for 16-bit files */ + if (bit_depth == 16) + { + raw = FALSE; +#ifdef __TURBOC__ + pnm_file->flags &= ~((unsigned) _F_BIN); +#endif + } + + /* calculate new number of channels and store alpha-presence */ + if (color_type == PNG_COLOR_TYPE_GRAY) + channels = 1; + else if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + channels = 2; + else if (color_type == PNG_COLOR_TYPE_RGB) + channels = 3; + else if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) + channels = 4; + else + channels = 0; /* should never happen */ + alpha_present = (channels - 1) % 2; + + /* check if alpha is expected to be present in file */ + if (alpha && !alpha_present) + { + fprintf (stderr, "PNG2PNM\n"); + fprintf (stderr, "Error: PNG-file doesn't contain alpha channel\n"); + exit (1); + } + + /* row_bytes is the width x number of channels x (bit-depth / 8) */ + row_bytes = png_get_rowbytes (png_ptr, info_ptr); + + if ((png_pixels = (png_byte *) malloc (row_bytes * height * sizeof (png_byte))) == NULL) { + png_destroy_read_struct (&png_ptr, &info_ptr, NULL); + return FALSE; + } + + if ((row_pointers = (png_byte **) malloc (height * sizeof (png_bytep))) == NULL) + { + png_destroy_read_struct (&png_ptr, &info_ptr, NULL); + free (png_pixels); + png_pixels = NULL; + return FALSE; + } + + /* set the individual row_pointers to point at the correct offsets */ + for (i = 0; i < (height); i++) + row_pointers[i] = png_pixels + i * row_bytes; + + /* now we can go ahead and just read the whole image */ + png_read_image (png_ptr, row_pointers); + + /* read rest of file, and get additional chunks in info_ptr - REQUIRED */ + png_read_end (png_ptr, info_ptr); + + /* clean up after the read, and free any memory allocated - REQUIRED */ + png_destroy_read_struct (&png_ptr, &info_ptr, (png_infopp) NULL); + + /* write header of PNM file */ + + if ((color_type == PNG_COLOR_TYPE_GRAY) || + (color_type == PNG_COLOR_TYPE_GRAY_ALPHA)) + { + fprintf (pnm_file, "%s\n", (raw) ? "P5" : "P2"); + fprintf (pnm_file, "%d %d\n", (int) width, (int) height); + fprintf (pnm_file, "%ld\n", ((1L << (int) bit_depth) - 1L)); + } + else if ((color_type == PNG_COLOR_TYPE_RGB) || + (color_type == PNG_COLOR_TYPE_RGB_ALPHA)) + { + fprintf (pnm_file, "%s\n", (raw) ? "P6" : "P3"); + fprintf (pnm_file, "%d %d\n", (int) width, (int) height); + fprintf (pnm_file, "%ld\n", ((1L << (int) bit_depth) - 1L)); + } + + /* write header of PGM file with alpha channel */ + + if ((alpha) && + ((color_type == PNG_COLOR_TYPE_GRAY_ALPHA) || + (color_type == PNG_COLOR_TYPE_RGB_ALPHA))) + { + fprintf (alpha_file, "%s\n", (raw) ? "P5" : "P2"); + fprintf (alpha_file, "%d %d\n", (int) width, (int) height); + fprintf (alpha_file, "%ld\n", ((1L << (int) bit_depth) - 1L)); + } + + /* write data to PNM file */ + pix_ptr = png_pixels; + + for (row = 0; row < height; row++) + { + for (col = 0; col < width; col++) + { + for (i = 0; i < (channels - alpha_present); i++) + { + if (raw) + fputc ((int) *pix_ptr++ , pnm_file); + else + if (bit_depth == 16){ + dep_16 = (long) *pix_ptr++; + fprintf (pnm_file, "%ld ", (dep_16 << 8) + ((long) *pix_ptr++)); + } + else + fprintf (pnm_file, "%ld ", (long) *pix_ptr++); + } + if (alpha_present) + { + if (!alpha) + { + pix_ptr++; /* alpha */ + if (bit_depth == 16) + pix_ptr++; + } + else /* output alpha-channel as pgm file */ + { + if (raw) + fputc ((int) *pix_ptr++ , alpha_file); + else + if (bit_depth == 16){ + dep_16 = (long) *pix_ptr++; + fprintf (alpha_file, "%ld ", (dep_16 << 8) + (long) *pix_ptr++); + } + else + fprintf (alpha_file, "%ld ", (long) *pix_ptr++); + } + } /* if alpha_present */ + + if (!raw) + if (col % 4 == 3) + fprintf (pnm_file, "\n"); + } /* end for col */ + + if (!raw) + if (col % 4 != 0) + fprintf (pnm_file, "\n"); + } /* end for row */ + + if (row_pointers != (unsigned char**) NULL) + free (row_pointers); + if (png_pixels != (unsigned char*) NULL) + free (png_pixels); + + return TRUE; + +} /* end of source */ + diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngminus/png2pnm.sh b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/png2pnm.sh new file mode 100644 index 0000000..854313b --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/png2pnm.sh @@ -0,0 +1,41 @@ +# -- grayscale +./png2pnm -noraw ../pngsuite/basn0g01.png basn0g01.pgm +./png2pnm -noraw ../pngsuite/basn0g02.png basn0g02.pgm +./png2pnm -noraw ../pngsuite/basn0g04.png basn0g04.pgm +./png2pnm -noraw ../pngsuite/basn0g08.png basn0g08.pgm +./png2pnm -noraw ../pngsuite/basn0g16.png basn0g16.pgm +# -- full-color +./png2pnm -noraw ../pngsuite/basn2c08.png basn2c08.ppm +./png2pnm -noraw ../pngsuite/basn2c16.png basn2c16.ppm +# -- palletted +./png2pnm -noraw ../pngsuite/basn3p01.png basn3p01.ppm +./png2pnm -noraw ../pngsuite/basn3p02.png basn3p02.ppm +./png2pnm -noraw ../pngsuite/basn3p04.png basn3p04.ppm +./png2pnm -noraw ../pngsuite/basn3p08.png basn3p08.ppm +# -- gray with alpha-channel +./png2pnm -noraw ../pngsuite/basn4a08.png basn4a08.pgm +./png2pnm -noraw ../pngsuite/basn4a16.png basn4a16.pgm +# -- color with alpha-channel +./png2pnm -noraw -alpha basn6a08.pgm ../pngsuite/basn6a08.png basn6a08.ppm +./png2pnm -noraw -alpha basn6a16.pgm ../pngsuite/basn6a16.png basn6a16.ppm +# -- grayscale +./png2pnm -raw ../pngsuite/basn0g01.png rawn0g01.pgm +./png2pnm -raw ../pngsuite/basn0g02.png rawn0g02.pgm +./png2pnm -raw ../pngsuite/basn0g04.png rawn0g04.pgm +./png2pnm -raw ../pngsuite/basn0g08.png rawn0g08.pgm +./png2pnm -raw ../pngsuite/basn0g16.png rawn0g16.pgm +# -- full-color +./png2pnm -raw ../pngsuite/basn2c08.png rawn2c08.ppm +./png2pnm -raw ../pngsuite/basn2c16.png rawn2c16.ppm +# -- palletted +./png2pnm -raw ../pngsuite/basn3p01.png rawn3p01.ppm +./png2pnm -raw ../pngsuite/basn3p02.png rawn3p02.ppm +./png2pnm -raw ../pngsuite/basn3p04.png rawn3p04.ppm +./png2pnm -raw ../pngsuite/basn3p08.png rawn3p08.ppm +# -- gray with alpha-channel +./png2pnm -raw ../pngsuite/basn4a08.png rawn4a08.pgm +./png2pnm -raw ../pngsuite/basn4a16.png rawn4a16.pgm +# -- color with alpha-channel +./png2pnm -noraw -alpha rawn6a08.pgm ../pngsuite/basn6a08.png rawn6a08.ppm +./png2pnm -noraw -alpha rawn6a16.pgm ../pngsuite/basn6a16.png rawn6a16.ppm + diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngminus/pngminus.bat b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/pngminus.bat new file mode 100644 index 0000000..911bb8d --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/pngminus.bat @@ -0,0 +1,4 @@ +make -f makefile.tc3 +call png2pnm.bat +call pnm2png.bat + diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngminus/pngminus.sh b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/pngminus.sh new file mode 100644 index 0000000..6b2d8c5 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/pngminus.sh @@ -0,0 +1,4 @@ +make -f makefile.std +sh png2pnm.sh +sh pnm2png.sh + diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngminus/pnm2png.bat b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/pnm2png.bat new file mode 100644 index 0000000..f756cb8 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/pnm2png.bat @@ -0,0 +1,41 @@ +REM -- grayscale +pnm2png.exe basn0g01.pgm basn0g01.png +pnm2png.exe basn0g02.pgm basn0g02.png +pnm2png.exe basn0g04.pgm basn0g04.png +pnm2png.exe basn0g08.pgm basn0g08.png +pnm2png.exe basn0g16.pgm basn0g16.png +REM -- full-color +pnm2png.exe basn2c08.ppm basn2c08.png +pnm2png.exe basn2c16.ppm basn2c16.png +REM -- palletted +pnm2png.exe basn3p01.ppm basn3p01.png +pnm2png.exe basn3p02.ppm basn3p02.png +pnm2png.exe basn3p04.ppm basn3p04.png +pnm2png.exe basn3p08.ppm basn3p08.png +REM -- gray with alpha-channel +pnm2png.exe -alpha basn6a08.pgm basn4a08.pgm basn4a08.png +pnm2png.exe -alpha basn6a16.pgm basn4a16.pgm basn4a16.png +REM -- color with alpha-channel +pnm2png.exe -alpha basn6a08.pgm basn6a08.ppm basn6a08.png +pnm2png.exe -alpha basn6a16.pgm basn6a16.ppm basn6a16.png +REM -- grayscale +pnm2png.exe rawn0g01.pgm rawn0g01.png +pnm2png.exe rawn0g02.pgm rawn0g02.png +pnm2png.exe rawn0g04.pgm rawn0g04.png +pnm2png.exe rawn0g08.pgm rawn0g08.png +pnm2png.exe rawn0g16.pgm rawn0g16.png +REM -- full-color +pnm2png.exe rawn2c08.ppm rawn2c08.png +pnm2png.exe rawn2c16.ppm rawn2c16.png +REM -- palletted +pnm2png.exe rawn3p01.ppm rawn3p01.png +pnm2png.exe rawn3p02.ppm rawn3p02.png +pnm2png.exe rawn3p04.ppm rawn3p04.png +pnm2png.exe rawn3p08.ppm rawn3p08.png +REM -- gray with alpha-channel +pnm2png.exe -alpha rawn6a08.pgm rawn4a08.pgm rawn4a08.png +pnm2png.exe -alpha rawn6a16.pgm rawn4a16.pgm rawn4a16.png +REM -- color with alpha-channel +pnm2png.exe -alpha rawn6a08.pgm rawn6a08.ppm rawn6a08.png +pnm2png.exe -alpha rawn6a16.pgm rawn6a16.ppm rawn6a16.png + diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngminus/pnm2png.c b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/pnm2png.c new file mode 100644 index 0000000..4cdfad8 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/pnm2png.c @@ -0,0 +1,533 @@ +/* + * pnm2png.c --- conversion from PBM/PGM/PPM-file to PNG-file + * copyright (C) 1999 by Willem van Schaik + * + * version 1.0 - 1999.10.15 - First version. + * + * Permission to use, copy, modify, and distribute this software and + * its documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear in + * supporting documentation. This software is provided "as is" without + * express or implied warranty. + */ + +#include +#include +#ifdef __TURBOC__ +#include +#include +#endif + +#ifndef BOOL +#define BOOL unsigned char +#endif +#ifndef TRUE +#define TRUE (BOOL) 1 +#endif +#ifndef FALSE +#define FALSE (BOOL) 0 +#endif + +#define STDIN 0 +#define STDOUT 1 +#define STDERR 2 + +/* to make pnm2png verbose so we can find problems (needs to be before png.h) */ +#ifndef PNG_DEBUG +#define PNG_DEBUG 0 +#endif + +#include "png.h" + +/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */ +#ifndef png_jmpbuf +# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) +#endif + +/* function prototypes */ + +int main (int argc, char *argv[]); +void usage (); +BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace, BOOL alpha); +void get_token(FILE *pnm_file, char *token); +png_uint_32 get_data (FILE *pnm_file, int depth); +png_uint_32 get_value (FILE *pnm_file, int depth); + +/* + * main + */ + +int main(int argc, char *argv[]) +{ + FILE *fp_rd = stdin; + FILE *fp_al = NULL; + FILE *fp_wr = stdout; + BOOL interlace = FALSE; + BOOL alpha = FALSE; + int argi; + + for (argi = 1; argi < argc; argi++) + { + if (argv[argi][0] == '-') + { + switch (argv[argi][1]) + { + case 'i': + interlace = TRUE; + break; + case 'a': + alpha = TRUE; + argi++; + if ((fp_al = fopen (argv[argi], "rb")) == NULL) + { + fprintf (stderr, "PNM2PNG\n"); + fprintf (stderr, "Error: alpha-channel file %s does not exist\n", + argv[argi]); + exit (1); + } + break; + case 'h': + case '?': + usage(); + exit(0); + break; + default: + fprintf (stderr, "PNM2PNG\n"); + fprintf (stderr, "Error: unknown option %s\n", argv[argi]); + usage(); + exit(1); + break; + } /* end switch */ + } + else if (fp_rd == stdin) + { + if ((fp_rd = fopen (argv[argi], "rb")) == NULL) + { + fprintf (stderr, "PNM2PNG\n"); + fprintf (stderr, "Error: file %s does not exist\n", argv[argi]); + exit (1); + } + } + else if (fp_wr == stdout) + { + if ((fp_wr = fopen (argv[argi], "wb")) == NULL) + { + fprintf (stderr, "PNM2PNG\n"); + fprintf (stderr, "Error: can not create PNG-file %s\n", argv[argi]); + exit (1); + } + } + else + { + fprintf (stderr, "PNM2PNG\n"); + fprintf (stderr, "Error: too many parameters\n"); + usage(); + exit (1); + } + } /* end for */ + +#ifdef __TURBOC__ + /* set stdin/stdout to binary, we're reading the PNM always! in binary format */ + if (fp_rd == stdin) + { + setmode (STDIN, O_BINARY); + } + if (fp_wr == stdout) + { + setmode (STDOUT, O_BINARY); + } +#endif + + /* call the conversion program itself */ + if (pnm2png (fp_rd, fp_wr, fp_al, interlace, alpha) == FALSE) + { + fprintf (stderr, "PNM2PNG\n"); + fprintf (stderr, "Error: unsuccessful converting to PNG-image\n"); + exit (1); + } + + /* close input file */ + fclose (fp_rd); + /* close output file */ + fclose (fp_wr); + /* close alpha file */ + if (alpha) + fclose (fp_al); + + return 0; +} + +/* + * usage + */ + +void usage() +{ + fprintf (stderr, "PNM2PNG\n"); + fprintf (stderr, " by Willem van Schaik, 1999\n"); +#ifdef __TURBOC__ + fprintf (stderr, " for Turbo-C and Borland-C compilers\n"); +#else + fprintf (stderr, " for Linux (and Unix) compilers\n"); +#endif + fprintf (stderr, "Usage: pnm2png [options] . [.png]\n"); + fprintf (stderr, " or: ... | pnm2png [options]\n"); + fprintf (stderr, "Options:\n"); + fprintf (stderr, " -i[nterlace] write png-file with interlacing on\n"); + fprintf (stderr, " -a[lpha] .pgm read PNG alpha channel as pgm-file\n"); + fprintf (stderr, " -h | -? print this help-information\n"); +} + +/* + * pnm2png + */ + +BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace, BOOL alpha) +{ + png_struct *png_ptr = NULL; + png_info *info_ptr = NULL; + png_byte *png_pixels = NULL; + png_byte **row_pointers = NULL; + png_byte *pix_ptr = NULL; + png_uint_32 row_bytes; + + char type_token[16]; + char width_token[16]; + char height_token[16]; + char maxval_token[16]; + int color_type; + png_uint_32 width, alpha_width; + png_uint_32 height, alpha_height; + png_uint_32 maxval; + int bit_depth = 0; + int channels; + int alpha_depth = 0; + int alpha_present; + int row, col; + BOOL raw, alpha_raw = FALSE; + png_uint_32 tmp16; + int i; + + /* read header of PNM file */ + + get_token(pnm_file, type_token); + if (type_token[0] != 'P') + { + return FALSE; + } + else if ((type_token[1] == '1') || (type_token[1] == '4')) + { + raw = (type_token[1] == '4'); + color_type = PNG_COLOR_TYPE_GRAY; + bit_depth = 1; + } + else if ((type_token[1] == '2') || (type_token[1] == '5')) + { + raw = (type_token[1] == '5'); + color_type = PNG_COLOR_TYPE_GRAY; + get_token(pnm_file, width_token); + sscanf (width_token, "%lu", &width); + get_token(pnm_file, height_token); + sscanf (height_token, "%lu", &height); + get_token(pnm_file, maxval_token); + sscanf (maxval_token, "%lu", &maxval); + if (maxval <= 1) + bit_depth = 1; + else if (maxval <= 3) + bit_depth = 2; + else if (maxval <= 15) + bit_depth = 4; + else if (maxval <= 255) + bit_depth = 8; + else /* if (maxval <= 65535) */ + bit_depth = 16; + } + else if ((type_token[1] == '3') || (type_token[1] == '6')) + { + raw = (type_token[1] == '6'); + color_type = PNG_COLOR_TYPE_RGB; + get_token(pnm_file, width_token); + sscanf (width_token, "%lu", &width); + get_token(pnm_file, height_token); + sscanf (height_token, "%lu", &height); + get_token(pnm_file, maxval_token); + sscanf (maxval_token, "%lu", &maxval); + if (maxval <= 1) + bit_depth = 1; + else if (maxval <= 3) + bit_depth = 2; + else if (maxval <= 15) + bit_depth = 4; + else if (maxval <= 255) + bit_depth = 8; + else /* if (maxval <= 65535) */ + bit_depth = 16; + } + else + { + return FALSE; + } + + /* read header of PGM file with alpha channel */ + + if (alpha) + { + if (color_type == PNG_COLOR_TYPE_GRAY) + color_type = PNG_COLOR_TYPE_GRAY_ALPHA; + if (color_type == PNG_COLOR_TYPE_RGB) + color_type = PNG_COLOR_TYPE_RGB_ALPHA; + + get_token(alpha_file, type_token); + if (type_token[0] != 'P') + { + return FALSE; + } + else if ((type_token[1] == '2') || (type_token[1] == '5')) + { + alpha_raw = (type_token[1] == '5'); + get_token(alpha_file, width_token); + sscanf (width_token, "%lu", &alpha_width); + if (alpha_width != width) + return FALSE; + get_token(alpha_file, height_token); + sscanf (height_token, "%lu", &alpha_height); + if (alpha_height != height) + return FALSE; + get_token(alpha_file, maxval_token); + sscanf (maxval_token, "%lu", &maxval); + if (maxval <= 1) + alpha_depth = 1; + else if (maxval <= 3) + alpha_depth = 2; + else if (maxval <= 15) + alpha_depth = 4; + else if (maxval <= 255) + alpha_depth = 8; + else /* if (maxval <= 65535) */ + alpha_depth = 16; + if (alpha_depth != bit_depth) + return FALSE; + } + else + { + return FALSE; + } + } /* end if alpha */ + + /* calculate the number of channels and store alpha-presence */ + if (color_type == PNG_COLOR_TYPE_GRAY) + channels = 1; + else if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + channels = 2; + else if (color_type == PNG_COLOR_TYPE_RGB) + channels = 3; + else if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) + channels = 4; + else + channels = 0; /* should not happen */ + + alpha_present = (channels - 1) % 2; + + /* row_bytes is the width x number of channels x (bit-depth / 8) */ + row_bytes = width * channels * ((bit_depth <= 8) ? 1 : 2); + + if ((png_pixels = (png_byte *) malloc (row_bytes * height * sizeof (png_byte))) == NULL) + return FALSE; + + /* read data from PNM file */ + pix_ptr = png_pixels; + + for (row = 0; row < height; row++) + { + for (col = 0; col < width; col++) + { + for (i = 0; i < (channels - alpha_present); i++) + { + if (raw) + *pix_ptr++ = get_data (pnm_file, bit_depth); + else + if (bit_depth <= 8) + *pix_ptr++ = get_value (pnm_file, bit_depth); + else + { + tmp16 = get_value (pnm_file, bit_depth); + *pix_ptr = (png_byte) ((tmp16 >> 8) & 0xFF); + pix_ptr++; + *pix_ptr = (png_byte) (tmp16 & 0xFF); + pix_ptr++; + } + } + + if (alpha) /* read alpha-channel from pgm file */ + { + if (alpha_raw) + *pix_ptr++ = get_data (alpha_file, alpha_depth); + else + if (alpha_depth <= 8) + *pix_ptr++ = get_value (alpha_file, bit_depth); + else + { + tmp16 = get_value (alpha_file, bit_depth); + *pix_ptr++ = (png_byte) ((tmp16 >> 8) & 0xFF); + *pix_ptr++ = (png_byte) (tmp16 & 0xFF); + } + } /* if alpha */ + + } /* end for col */ + } /* end for row */ + + /* prepare the standard PNG structures */ + png_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + if (!png_ptr) + { + return FALSE; + } + info_ptr = png_create_info_struct (png_ptr); + if (!info_ptr) + { + png_destroy_write_struct (&png_ptr, (png_infopp) NULL); + return FALSE; + } + + /* setjmp() must be called in every function that calls a PNG-reading libpng function */ + if (setjmp (png_jmpbuf(png_ptr))) + { + png_destroy_write_struct (&png_ptr, (png_infopp) NULL); + return FALSE; + } + + /* initialize the png structure */ + png_init_io (png_ptr, png_file); + + /* we're going to write more or less the same PNG as the input file */ + png_set_IHDR (png_ptr, info_ptr, width, height, bit_depth, color_type, + (!interlace) ? PNG_INTERLACE_NONE : PNG_INTERLACE_ADAM7, + PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); + + /* write the file header information */ + png_write_info (png_ptr, info_ptr); + + /* if needed we will allocate memory for an new array of row-pointers */ + if (row_pointers == (unsigned char**) NULL) + { + if ((row_pointers = (png_byte **) malloc (height * sizeof (png_bytep))) == NULL) + { + png_destroy_write_struct (&png_ptr, (png_infopp) NULL); + return FALSE; + } + } + + /* set the individual row_pointers to point at the correct offsets */ + for (i = 0; i < (height); i++) + row_pointers[i] = png_pixels + i * row_bytes; + + /* write out the entire image data in one call */ + png_write_image (png_ptr, row_pointers); + + /* write the additional chuncks to the PNG file (not really needed) */ + png_write_end (png_ptr, info_ptr); + + /* clean up after the write, and free any memory allocated */ + png_destroy_write_struct (&png_ptr, (png_infopp) NULL); + + if (row_pointers != (unsigned char**) NULL) + free (row_pointers); + if (png_pixels != (unsigned char*) NULL) + free (png_pixels); + + return TRUE; +} /* end of pnm2png */ + +/* + * get_token() - gets the first string after whitespace + */ + +void get_token(FILE *pnm_file, char *token) +{ + int i = 0; + + /* remove white-space */ + do + { + token[i] = (unsigned char) fgetc (pnm_file); + } + while ((token[i] == '\n') || (token[i] == '\r') || (token[i] == ' ')); + + /* read string */ + do + { + i++; + token[i] = (unsigned char) fgetc (pnm_file); + } + while ((token[i] != '\n') && (token[i] != '\r') && (token[i] != ' ')); + + token[i] = '\0'; + + return; +} + +/* + * get_data() - takes first byte and converts into next pixel value, + * taking as much bits as defined by bit-depth and + * using the bit-depth to fill up a byte (0Ah -> AAh) + */ + +png_uint_32 get_data (FILE *pnm_file, int depth) +{ + static int bits_left = 0; + static int old_value = 0; + static int mask = 0; + int i; + png_uint_32 ret_value; + + if (mask == 0) + for (i = 0; i < depth; i++) + mask = (mask >> 1) | 0x80; + + if (bits_left <= 0) + { + old_value = fgetc (pnm_file); + bits_left = 8; + } + + ret_value = old_value & mask; + for (i = 1; i < (8 / depth); i++) + ret_value = ret_value || (ret_value >> depth); + + old_value = (old_value << depth) & 0xFF; + bits_left -= depth; + + return ret_value; +} + +/* + * get_value() - takes first (numeric) string and converts into number, + * using the bit-depth to fill up a byte (0Ah -> AAh) + */ + +png_uint_32 get_value (FILE *pnm_file, int depth) +{ + static png_uint_32 mask = 0; + png_byte token[16]; + png_uint_32 ret_value; + int i = 0; + + if (mask == 0) + for (i = 0; i < depth; i++) + mask = (mask << 1) | 0x01; + + get_token (pnm_file, (char *) token); + sscanf ((const char *) token, "%lu", &ret_value); + + ret_value &= mask; + + if (depth < 8) + for (i = 0; i < (8 / depth); i++) + ret_value = (ret_value << depth) || ret_value; + + return ret_value; +} + +/* end of source */ + diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngminus/pnm2png.sh b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/pnm2png.sh new file mode 100644 index 0000000..5afda9f --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/pngminus/pnm2png.sh @@ -0,0 +1,41 @@ +# -- grayscale +./pnm2png basn0g01.pgm basn0g01.png +./pnm2png basn0g02.pgm basn0g02.png +./pnm2png basn0g04.pgm basn0g04.png +./pnm2png basn0g08.pgm basn0g08.png +./pnm2png basn0g16.pgm basn0g16.png +# -- full-color +./pnm2png basn2c08.ppm basn2c08.png +./pnm2png basn2c16.ppm basn2c16.png +# -- palletted +./pnm2png basn3p01.ppm basn3p01.png +./pnm2png basn3p02.ppm basn3p02.png +./pnm2png basn3p04.ppm basn3p04.png +./pnm2png basn3p08.ppm basn3p08.png +# -- gray with alpha-channel +./pnm2png -alpha basn6a08.pgm basn4a08.pgm basn4a08.png +./pnm2png -alpha basn6a16.pgm basn4a16.pgm basn4a16.png +# -- color with alpha-channel +./pnm2png -alpha basn6a08.pgm basn6a08.ppm basn6a08.png +./pnm2png -alpha basn6a16.pgm basn6a16.ppm basn6a16.png +# -- grayscale +./pnm2png rawn0g01.pgm rawn0g01.png +./pnm2png rawn0g02.pgm rawn0g02.png +./pnm2png rawn0g04.pgm rawn0g04.png +./pnm2png rawn0g08.pgm rawn0g08.png +./pnm2png rawn0g16.pgm rawn0g16.png +# -- full-color +./pnm2png rawn2c08.ppm rawn2c08.png +./pnm2png rawn2c16.ppm rawn2c16.png +# -- palletted +./pnm2png rawn3p01.ppm rawn3p01.png +./pnm2png rawn3p02.ppm rawn3p02.png +./pnm2png rawn3p04.ppm rawn3p04.png +./pnm2png rawn3p08.ppm rawn3p08.png +# -- gray with alpha-channel +./pnm2png -alpha rawn6a08.pgm rawn4a08.pgm rawn4a08.png +./pnm2png -alpha rawn6a16.pgm rawn4a16.pgm rawn4a16.png +# -- color with alpha-channel +./pnm2png -alpha rawn6a08.pgm rawn6a08.ppm rawn6a08.png +./pnm2png -alpha rawn6a16.pgm rawn6a16.ppm rawn6a16.png + diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/README b/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/README new file mode 100644 index 0000000..714d12c --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/README @@ -0,0 +1,85 @@ + +pngsuite +-------- +(c) Willem van Schaik, 1999 + +Permission to use, copy, and distribute these images for any purpose and +without fee is hereby granted. + +These 15 images are part of the much larger PngSuite test-set of +images, available for developers of PNG supporting software. The +complete set, available at http:/www.schaik.com/pngsuite/, contains +a variety of images to test interlacing, gamma settings, ancillary +chunks, etc. + +The images in this directory represent the basic PNG color-types: +grayscale (1-16 bit deep), full color (8 or 16 bit), paletted +(1-8 bit) and grayscale or color images with alpha channel. You +can use them to test the proper functioning of PNG software. + + filename depth type + ------------ ------ -------------- + basn0g01.png 1-bit grayscale + basn0g02.png 2-bit grayscale + basn0g04.png 4-bit grayscale + basn0g08.png 8-bit grayscale + basn0g16.png 16-bit grayscale + basn2c08.png 8-bit truecolor + basn2c16.png 16-bit truecolor + basn3p01.png 1-bit paletted + basn3p02.png 2-bit paletted + basn3p04.png 4-bit paletted + basn3p08.png 8-bit paletted + basn4a08.png 8-bit gray with alpha + basn4a16.png 16-bit gray with alpha + basn6a08.png 8-bit RGBA + basn6a16.png 16-bit RGBA + +Here is the correct result of typing "pngtest -m *.png" in +this directory: + +Testing basn0g01.png: PASS (524 zero samples) + Filter 0 was used 32 times +Testing basn0g02.png: PASS (448 zero samples) + Filter 0 was used 32 times +Testing basn0g04.png: PASS (520 zero samples) + Filter 0 was used 32 times +Testing basn0g08.png: PASS (3 zero samples) + Filter 1 was used 9 times + Filter 4 was used 23 times +Testing basn0g16.png: PASS (1 zero samples) + Filter 1 was used 1 times + Filter 2 was used 31 times +Testing basn2c08.png: PASS (6 zero samples) + Filter 1 was used 5 times + Filter 4 was used 27 times +Testing basn2c16.png: PASS (592 zero samples) + Filter 1 was used 1 times + Filter 4 was used 31 times +Testing basn3p01.png: PASS (512 zero samples) + Filter 0 was used 32 times +Testing basn3p02.png: PASS (448 zero samples) + Filter 0 was used 32 times +Testing basn3p04.png: PASS (544 zero samples) + Filter 0 was used 32 times +Testing basn3p08.png: PASS (4 zero samples) + Filter 0 was used 32 times +Testing basn4a08.png: PASS (32 zero samples) + Filter 1 was used 1 times + Filter 4 was used 31 times +Testing basn4a16.png: PASS (64 zero samples) + Filter 0 was used 1 times + Filter 1 was used 2 times + Filter 2 was used 1 times + Filter 4 was used 28 times +Testing basn6a08.png: PASS (160 zero samples) + Filter 1 was used 1 times + Filter 4 was used 31 times +Testing basn6a16.png: PASS (1072 zero samples) + Filter 1 was used 4 times + Filter 4 was used 28 times +libpng passes test + +Willem van Schaik + +October 1999 diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn0g01.png b/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn0g01.png new file mode 100644 index 0000000000000000000000000000000000000000..1d722423aa5157fe2b029af4e2bb07f478ebe8bb GIT binary patch literal 164 zcmeAS@N?(olHy`uVBq!ia0vp^3Lwk~Bp9L@-6Me%OS+@4BLidG0>c;6;z7cmE{-7; zb9B#azopr0C;FL=l}o! literal 0 HcmV?d00001 diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn0g02.png b/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn0g02.png new file mode 100644 index 0000000000000000000000000000000000000000..508332418fa86637d39e95268ec1d3658d120cae GIT binary patch literal 104 zcmeAS@N?(olHy`uVBq!ia0vp^3Lwk`Bp75C+I9jdmUKs7M+U~W1%@xC#RK{Bo-U3d z6?2jkIAXub_k1+y2sp$L+}6)%%qgEdVJADoUeEf*ZqCk?AR|0o{an^LB{Ts5miHSU literal 0 HcmV?d00001 diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn0g04.png b/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn0g04.png new file mode 100644 index 0000000000000000000000000000000000000000..0bf3687863d8a1f53bef0aa24b841b21b0e04d9e GIT binary patch literal 145 zcmeAS@N?(olHy`uVBq!ia0vp^3Lwk^Bp4c;6;(>fePZ!6K ziaE(C2`UUC949vOu(I~>b7=nfE^nVuX&@tFa7u7Oddi~87#=p(p8gM~{{27yqy1T- hp#)Io!PL|g7KVVQ{|ZeX-G~HP;_2$=vd$@?2>|oDDeM3M literal 0 HcmV?d00001 diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn0g16.png b/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn0g16.png new file mode 100644 index 0000000000000000000000000000000000000000..e7c82f78eb954be5be51c35bd287e00018c69d82 GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^3Lq>1BpBEle`W(ImUKs7M+U~W1%@xC#RK_qo-U3d z6?3j$GUPg7z~dZf8U4Qg*qsHF4`@^yUDaY)e6!!)qG9=taAD!(1y)T7vK%uR?lygM zIK}cp><*ign#1-5wiApPcd>47oWOZOH-mqPPlA0u`y2l+k{0Ld8N_aQ--utQJ^wn$ N1)i>cF6*2UngAzTID!BG literal 0 HcmV?d00001 diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn2c08.png b/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn2c08.png new file mode 100644 index 0000000000000000000000000000000000000000..db5ad15865f56e48e4bae5b43661d2dbc4e847e3 GIT binary patch literal 145 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1SJ1Ryj={WSkfJR9T^zg78t&m77yfmc)B=- zRLpsM^&lsM0S}Wy>zj#xw-*UpyJ&w|_~YC|?Jc}4)(u=DKV%lXeNyXF;n2v$@6|4U rsD)ibtrx; literal 0 HcmV?d00001 diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn2c16.png b/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn2c16.png new file mode 100644 index 0000000000000000000000000000000000000000..50c1cb91a0171e9f34991b079fe932f5f0bb16d6 GIT binary patch literal 302 zcmV+}0nz@6P)NTxus~-YE?|ew94KIo9tHTv?hhRR zwrA%J^h9UxCeRmyPjW#d?oxNFL9(uFDZ1gBle+D$rIj`J+5;}Xa zfF63WfGT3xy1iYa$zve>zUI)9x>;M1&07*qoM6N<$g8PGj A5dZ)H literal 0 HcmV?d00001 diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn3p01.png b/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn3p01.png new file mode 100644 index 0000000000000000000000000000000000000000..b145c2b8eff1f4298e540bfae5c1351d015a3592 GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0vp^3L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2Ec< zKIiz-xXN3dttqGahAW20Qo6MzgSk7e_{!(?CKyw`*?j|NY=7wG%F`JaWZ(VOm8CUr z$$no_)1uMK%W6)nN!IrL6EB>puUj#i+1xg}<&qUPnY6#j4&NW^MpZNn{t+Cq+^l@L JEAySt{s-!kV`~5a literal 0 HcmV?d00001 diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn4a08.png b/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn4a08.png new file mode 100644 index 0000000000000000000000000000000000000000..3e13052201c9f8b90172ea2491b18d6d121c2786 GIT binary patch literal 126 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE0wix1Z>k4UEa{HEjtq=#3k+XOiwE*eJzX3_ zD&{2rIe*{)W9ys@6GNprI`<_tn04&i_AxF_G>~EoF-$NKa6jCj#n!|2C_^IPFayJV XErr@6uUk(54Pfwe^>bP0l+XkK+-D@M literal 0 HcmV?d00001 diff --git a/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn4a16.png b/gtkmm-osx/libpng-1.2.5/contrib/pngsuite/basn4a16.png new file mode 100644 index 0000000000000000000000000000000000000000..8243644d0743ebd1fdacb7923069fefbb01dab0e GIT binary patch literal 2206 zcmV;P2x0e$P)kEEkx>-b1@Qb$y-ohUek5*oTfx-A#6y^c`Q zE+sS)yU66wLTO83iFXm5i(N>*n3Idp^rFd-7Fe(v0)u8Hg(Rko(t3o_;+1WoY3fR? z;u%**k?mvsIhJ?vei@;3*EJZKPsh^xKJW8B&+`FbWnox{J*QyQf)~!hu>m;#N5~Gr z*+0X@UGUyz_~;4v=U?IOURb{_zjyb_*+);vGZ%Ns|73^cGmZ_&XO3F(9mBeOCxB*U zp=MjTt{LzZp}PWF5dym*a0v7!gx-ecb!ZpC(_mu+I?n=c$cJ>2a^`8!UXW*-DOjHb z_YkaIf>i_R6{x46R)AUxtZXgQHLOFeVC9@tBpY?%Ar~H6|39xka0c+50pEqb_xeL; z>a}V>WX7?rbSB#R07d+ApMY-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3E}OWh-W>ILaJsLbgrl#oy!R;pgf8S|%-aR?`oXYI4tX%;`0Nx>SK z5A?@i&PWMVBYwGAPscrOn;8s|SYTQ3w-xmNc5awbs;SE2ek8T$n-005TvzOw9bbtH zl9hXDCV2zxiM?HD`el1qCmNM8kGyP}smK*0^o3Jru|pMNC@`s%^N<{Ho3LosA>Lifn47S?7fNix$x`(x(%35p98Y6emi)Wf8&Wp zfF{BgSG5bS=|<&#b?%74`Jg|cjQ@x?YMnW^F=;3@v`p%3f4Z>5+e7M(irxs06nKqN zAMg<0vPwSaHyNL?*bB{6;)BcH$`+F}*LwE-b;%`c_2ZVA`RF&>8-Tb#9fA~ur*d#B z>a%m})i41^?(Xc!>vU1#L{7`JtAq<%SMJw>#nQel-jQW3G4rCNdUi~6d>UTM~d)wr)`X#0DdGI0}-A2tW8v5Yan7j?{7s!Zv@(HiY@%kHGP7nEWJd20wnm@QPnoS$AOl1cVuJk zM{h)`k{&jn%5XSoR`um2`CMpVQy?sBfJP7dj(*Pw_rBA**T2&5vV9WtZmMM`-5zfN z+Iv>CAPIU~!jrk8+>X|6!A89uwfrwrq;HO>6_Cl$ak}!Web`Ev%4EUyF0sE!T~HMnmVFEd|128zI!?sqI|)r;q4bxSQ2*OvWaet z5f3aqL23P^%IhdCyV{8~nc8z@e7M(U~>X2cs)3#S;}jkH04XtEsP1a>I`JFHHZ5 AY5)KL literal 0 HcmV?d00001 diff --git a/gtkmm-osx/libpng-1.2.5/contrib/visupng/PngFile.c b/gtkmm-osx/libpng-1.2.5/contrib/visupng/PngFile.c new file mode 100644 index 0000000..959afe9 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/visupng/PngFile.c @@ -0,0 +1,439 @@ +//------------------------------------- +// PNGFILE.C -- Image File Functions +//------------------------------------- + +// Copyright 2000, Willem van Schaik. For conditions of distribution and +// use, see the copyright/license/disclaimer notice in png.h + +#include +#include +#include +#include + +#include "png.h" +#include "pngfile.h" +#include "cexcept.h" + +define_exception_type(const char *); +extern struct exception_context the_exception_context[1]; +struct exception_context the_exception_context[1]; +png_const_charp msg; + +static OPENFILENAME ofn; + +static png_structp png_ptr = NULL; +static png_infop info_ptr = NULL; + + +// cexcept interface + +static void +png_cexcept_error(png_structp png_ptr, png_const_charp msg) +{ + if(png_ptr) + ; +#ifndef PNG_NO_CONSOLE_IO + fprintf(stderr, "libpng error: %s\n", msg); +#endif + { + Throw msg; + } +} + +// Windows open-file functions + +void PngFileInitialize (HWND hwnd) +{ + static TCHAR szFilter[] = TEXT ("PNG Files (*.PNG)\0*.png\0") + TEXT ("All Files (*.*)\0*.*\0\0"); + + ofn.lStructSize = sizeof (OPENFILENAME); + ofn.hwndOwner = hwnd; + ofn.hInstance = NULL; + ofn.lpstrFilter = szFilter; + ofn.lpstrCustomFilter = NULL; + ofn.nMaxCustFilter = 0; + ofn.nFilterIndex = 0; + ofn.lpstrFile = NULL; // Set in Open and Close functions + ofn.nMaxFile = MAX_PATH; + ofn.lpstrFileTitle = NULL; // Set in Open and Close functions + ofn.nMaxFileTitle = MAX_PATH; + ofn.lpstrInitialDir = NULL; + ofn.lpstrTitle = NULL; + ofn.Flags = 0; // Set in Open and Close functions + ofn.nFileOffset = 0; + ofn.nFileExtension = 0; + ofn.lpstrDefExt = TEXT ("png"); + ofn.lCustData = 0; + ofn.lpfnHook = NULL; + ofn.lpTemplateName = NULL; +} + +BOOL PngFileOpenDlg (HWND hwnd, PTSTR pstrFileName, PTSTR pstrTitleName) +{ + ofn.hwndOwner = hwnd; + ofn.lpstrFile = pstrFileName; + ofn.lpstrFileTitle = pstrTitleName; + ofn.Flags = OFN_HIDEREADONLY; + + return GetOpenFileName (&ofn); +} + +BOOL PngFileSaveDlg (HWND hwnd, PTSTR pstrFileName, PTSTR pstrTitleName) +{ + ofn.hwndOwner = hwnd; + ofn.lpstrFile = pstrFileName; + ofn.lpstrFileTitle = pstrTitleName; + ofn.Flags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT; + + return GetSaveFileName (&ofn); +} + +// PNG image handler functions + +BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData, + int *piWidth, int *piHeight, int *piChannels, png_color *pBkgColor) +{ + static FILE *pfFile; + png_byte pbSig[8]; + int iBitDepth; + int iColorType; + double dGamma; + png_color_16 *pBackground; + png_uint_32 ulChannels; + png_uint_32 ulRowBytes; + png_byte *pbImageData = *ppbImageData; + static png_byte **ppbRowPointers = NULL; + int i; + + // open the PNG input file + + if (!pstrFileName) + { + *ppbImageData = pbImageData = NULL; + return FALSE; + } + + if (!(pfFile = fopen(pstrFileName, "rb"))) + { + *ppbImageData = pbImageData = NULL; + return FALSE; + } + + // first check the eight byte PNG signature + + fread(pbSig, 1, 8, pfFile); + if (!png_check_sig(pbSig, 8)) + { + *ppbImageData = pbImageData = NULL; + return FALSE; + } + + // create the two png(-info) structures + + png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, + (png_error_ptr)png_cexcept_error, (png_error_ptr)NULL); + if (!png_ptr) + { + *ppbImageData = pbImageData = NULL; + return FALSE; + } + + info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) + { + png_destroy_read_struct(&png_ptr, NULL, NULL); + *ppbImageData = pbImageData = NULL; + return FALSE; + } + + Try + { + + // initialize the png structure + +#if !defined(PNG_NO_STDIO) + png_init_io(png_ptr, pfFile); +#else + png_set_read_fn(png_ptr, (png_voidp)pfFile, png_read_data); +#endif + + png_set_sig_bytes(png_ptr, 8); + + // read all PNG info up to image data + + png_read_info(png_ptr, info_ptr); + + // get width, height, bit-depth and color-type + + png_get_IHDR(png_ptr, info_ptr, piWidth, piHeight, &iBitDepth, + &iColorType, NULL, NULL, NULL); + + // expand images of all color-type and bit-depth to 3x8 bit RGB images + // let the library process things like alpha, transparency, background + + if (iBitDepth == 16) + png_set_strip_16(png_ptr); + if (iColorType == PNG_COLOR_TYPE_PALETTE) + png_set_expand(png_ptr); + if (iBitDepth < 8) + png_set_expand(png_ptr); + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) + png_set_expand(png_ptr); + if (iColorType == PNG_COLOR_TYPE_GRAY || + iColorType == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_gray_to_rgb(png_ptr); + + // set the background color to draw transparent and alpha images over. + if (png_get_bKGD(png_ptr, info_ptr, &pBackground)) + { + png_set_background(png_ptr, pBackground, PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); + pBkgColor->red = (byte) pBackground->red; + pBkgColor->green = (byte) pBackground->green; + pBkgColor->blue = (byte) pBackground->blue; + } + else + { + pBkgColor = NULL; + } + + // if required set gamma conversion + if (png_get_gAMA(png_ptr, info_ptr, &dGamma)) + png_set_gamma(png_ptr, (double) 2.2, dGamma); + + // after the transformations have been registered update info_ptr data + + png_read_update_info(png_ptr, info_ptr); + + // get again width, height and the new bit-depth and color-type + + png_get_IHDR(png_ptr, info_ptr, piWidth, piHeight, &iBitDepth, + &iColorType, NULL, NULL, NULL); + + + // row_bytes is the width x number of channels + + ulRowBytes = png_get_rowbytes(png_ptr, info_ptr); + ulChannels = png_get_channels(png_ptr, info_ptr); + + *piChannels = ulChannels; + + // now we can allocate memory to store the image + + if (pbImageData) + { + free (pbImageData); + pbImageData = NULL; + } + if ((pbImageData = (png_byte *) malloc(ulRowBytes * (*piHeight) + * sizeof(png_byte))) == NULL) + { + png_error(png_ptr, "Visual PNG: out of memory"); + } + *ppbImageData = pbImageData; + + // and allocate memory for an array of row-pointers + + if ((ppbRowPointers = (png_bytepp) malloc((*piHeight) + * sizeof(png_bytep))) == NULL) + { + png_error(png_ptr, "Visual PNG: out of memory"); + } + + // set the individual row-pointers to point at the correct offsets + + for (i = 0; i < (*piHeight); i++) + ppbRowPointers[i] = pbImageData + i * ulRowBytes; + + // now we can go ahead and just read the whole image + + png_read_image(png_ptr, ppbRowPointers); + + // read the additional chunks in the PNG file (not really needed) + + png_read_end(png_ptr, NULL); + + // and we're done + + free (ppbRowPointers); + ppbRowPointers = NULL; + + // yepp, done + } + + Catch (msg) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + + *ppbImageData = pbImageData = NULL; + + if(ppbRowPointers) + free (ppbRowPointers); + + fclose(pfFile); + + return FALSE; + } + + fclose (pfFile); + + return TRUE; +} + + +BOOL PngSaveImage (PTSTR pstrFileName, png_byte *pDiData, + int iWidth, int iHeight, png_color bkgColor) +{ + const int ciBitDepth = 8; + const int ciChannels = 3; + + static FILE *pfFile; + png_uint_32 ulRowBytes; + static png_byte **ppbRowPointers = NULL; + int i; + + // open the PNG output file + + if (!pstrFileName) + return FALSE; + + if (!(pfFile = fopen(pstrFileName, "wb"))) + return FALSE; + + // prepare the standard PNG structures + + png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, + (png_error_ptr)png_cexcept_error, (png_error_ptr)NULL); + if (!png_ptr) + { + fclose(pfFile); + return FALSE; + } + + info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) { + fclose(pfFile); + png_destroy_write_struct(&png_ptr, (png_infopp) NULL); + return FALSE; + } + + Try + { + // initialize the png structure + +#if !defined(PNG_NO_STDIO) + png_init_io(png_ptr, pfFile); +#else + png_set_write_fn(png_ptr, (png_voidp)pfFile, png_write_data, png_flush); +#endif + + // we're going to write a very simple 3x8 bit RGB image + + png_set_IHDR(png_ptr, info_ptr, iWidth, iHeight, ciBitDepth, + PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, + PNG_FILTER_TYPE_BASE); + + // write the file header information + + png_write_info(png_ptr, info_ptr); + + // swap the BGR pixels in the DiData structure to RGB + + png_set_bgr(png_ptr); + + // row_bytes is the width x number of channels + + ulRowBytes = iWidth * ciChannels; + + // we can allocate memory for an array of row-pointers + + if ((ppbRowPointers = (png_bytepp) malloc(iHeight * sizeof(png_bytep))) == NULL) + Throw "Visualpng: Out of memory"; + + // set the individual row-pointers to point at the correct offsets + + for (i = 0; i < iHeight; i++) + ppbRowPointers[i] = pDiData + i * (((ulRowBytes + 3) >> 2) << 2); + + // write out the entire image data in one call + + png_write_image (png_ptr, ppbRowPointers); + + // write the additional chunks to the PNG file (not really needed) + + png_write_end(png_ptr, info_ptr); + + // and we're done + + free (ppbRowPointers); + ppbRowPointers = NULL; + + // clean up after the write, and free any memory allocated + + png_destroy_write_struct(&png_ptr, (png_infopp) NULL); + + // yepp, done + } + + Catch (msg) + { + png_destroy_write_struct(&png_ptr, (png_infopp) NULL); + + if(ppbRowPointers) + free (ppbRowPointers); + + fclose(pfFile); + + return FALSE; + } + + fclose (pfFile); + + return TRUE; +} + +#ifdef PNG_NO_STDIO + +static void +png_read_data(png_structp png_ptr, png_bytep data, png_size_t length) +{ + png_size_t check; + + /* fread() returns 0 on error, so it is OK to store this in a png_size_t + * instead of an int, which is what fread() actually returns. + */ + check = (png_size_t)fread(data, (png_size_t)1, length, + (FILE *)png_ptr->io_ptr); + + if (check != length) + { + png_error(png_ptr, "Read Error"); + } +} + +static void +png_write_data(png_structp png_ptr, png_bytep data, png_size_t length) +{ + png_uint_32 check; + + check = fwrite(data, 1, length, (FILE *)(png_ptr->io_ptr)); + if (check != length) + { + png_error(png_ptr, "Write Error"); + } +} + +static void +png_flush(png_structp png_ptr) +{ + FILE *io_ptr; + io_ptr = (FILE *)CVT_PTR((png_ptr->io_ptr)); + if (io_ptr != NULL) + fflush(io_ptr); +} + +#endif + +//----------------- +// end of source +//----------------- diff --git a/gtkmm-osx/libpng-1.2.5/contrib/visupng/PngFile.h b/gtkmm-osx/libpng-1.2.5/contrib/visupng/PngFile.h new file mode 100644 index 0000000..18acf55 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/visupng/PngFile.h @@ -0,0 +1,27 @@ +//------------------------------------------ +// PNGFILE.H -- Header File for pngfile.c +//------------------------------------------ + +// Copyright 2000, Willem van Schaik. For conditions of distribution and +// use, see the copyright/license/disclaimer notice in png.h + +#include +#include +#include +#include + +void PngFileInitialize (HWND hwnd) ; +BOOL PngFileOpenDlg (HWND hwnd, PTSTR pstrFileName, PTSTR pstrTitleName) ; +BOOL PngFileSaveDlg (HWND hwnd, PTSTR pstrFileName, PTSTR pstrTitleName) ; + +BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData, + int *piWidth, int *piHeight, int *piChannels, png_color *pBkgColor); +BOOL PngSaveImage (PTSTR pstrFileName, png_byte *pDiData, + int iWidth, int iHeight, png_color BkgColor); + +#if defined(PNG_NO_STDIO) +static void png_read_data(png_structp png_ptr, png_bytep data, png_size_t length); +static void png_write_data(png_structp png_ptr, png_bytep data, png_size_t length); +static void png_flush(png_structp png_ptr); +#endif + diff --git a/gtkmm-osx/libpng-1.2.5/contrib/visupng/README.txt b/gtkmm-osx/libpng-1.2.5/contrib/visupng/README.txt new file mode 100644 index 0000000..5f265cc --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/visupng/README.txt @@ -0,0 +1,58 @@ +Microsoft Developer Studio Build File, Format Version 6.00 for VisualPng +------------------------------------------------------------------------ + +Copyright 2000, Willem van Schaik. For conditions of distribution and +use, see the copyright/license/disclaimer notice in png.h + +As a PNG .dll demo VisualPng is finished. More features would only hinder +the program's objective. However, further extensions (like support for other +graphics formats) are in development. To get these, or for pre-compiled +binaries, go to "http://www.schaik.com/png/visualpng.html". + +------------------------------------------------------------------------ + +Assumes that + + libpng DLLs and LIBs are in ..\..\projects\msvc\win32\libpng + zlib DLLs and LIBs are in ..\..\projects\msvc\win32\zlib + libpng header files are in ..\..\..\libpng + zlib header files are in ..\..\..\zlib + the pngsuite images are in ..\pngsuite + +To build: + +1) On the main menu Select "Build|Set Active configuration". + Choose the configuration that corresponds to the library you want to test. + This library must have been built using the libpng MS project located in + the "..\..\mscv" subdirectory. + +2) Select "Build|Clean" + +3) Select "Build|Rebuild All" + +4) After compiling and linking VisualPng will be started to view an image + from the PngSuite directory. Press Ctrl-N (and Ctrl-V) for other images. + + +To install: + +When distributing VisualPng (or a further development) the following options +are available: + +1) Build the program with the configuration "Win32 LIB" and you only need to + include the executable from the ./lib directory in your distribution. + +2) Build the program with the configuration "Win32 DLL" and you need to put + in your distribution the executable from the ./dll directory and the dll's + libpng1.dll, zlib.dll and msvcrt.dll. These need to be in the user's PATH. + + +Willem van Schaik +Calgary, June 6th 2000 + +P.S. VisualPng was written based on preliminary work of: + + - Simon-Pierre Cadieux + - Glenn Randers-Pehrson + - Greg Roelofs + diff --git a/gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.c b/gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.c new file mode 100644 index 0000000..f2cf6ee --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.c @@ -0,0 +1,961 @@ +//------------------------------------ +// VisualPng.C -- Shows a PNG image +//------------------------------------ + +// Copyright 2000, Willem van Schaik. For conditions of distribution and +// use, see the copyright/license/disclaimer notice in png.h + +// switches + +// defines + +#define PROGNAME "VisualPng" +#define LONGNAME "Win32 Viewer for PNG-files" +#define VERSION "1.0 of 2000 June 07" + +// constants + +#define MARGIN 8 + +// standard includes + +#include +#include +#include +#include + +// application includes + +#include "png.h" +#include "pngfile.h" +#include "resource.h" + +// macros + +// function prototypes + +LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM); +BOOL CALLBACK AboutDlgProc (HWND, UINT, WPARAM, LPARAM) ; + +BOOL CenterAbout (HWND hwndChild, HWND hwndParent); + +BOOL BuildPngList (PTSTR pstrPathName, TCHAR **ppFileList, int *pFileCount, + int *pFileIndex); + +BOOL SearchPngList (TCHAR *pFileList, int FileCount, int *pFileIndex, + PTSTR pstrPrevName, PTSTR pstrNextName); + +BOOL LoadImageFile(HWND hwnd, PTSTR pstrPathName, + png_byte **ppbImage, int *pxImgSize, int *pyImgSize, int *piChannels, + png_color *pBkgColor); + +BOOL DisplayImage (HWND hwnd, BYTE **ppDib, + BYTE **ppDiData, int cxWinSize, int cyWinSize, + BYTE *pbImage, int cxImgSize, int cyImgSize, int cImgChannels, + BOOL bStretched); + +BOOL InitBitmap ( + BYTE *pDiData, int cxWinSize, int cyWinSize); + +BOOL FillBitmap ( + BYTE *pDiData, int cxWinSize, int cyWinSize, + BYTE *pbImage, int cxImgSize, int cyImgSize, int cImgChannels, + BOOL bStretched); + +// a few global variables + +static char *szProgName = PROGNAME; +static char *szAppName = LONGNAME; +static char *szIconName = PROGNAME; +static char szCmdFileName [MAX_PATH]; + +// MAIN routine + +int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, + PSTR szCmdLine, int iCmdShow) +{ + HACCEL hAccel; + HWND hwnd; + MSG msg; + WNDCLASS wndclass; + int ixBorders, iyBorders; + + wndclass.style = CS_HREDRAW | CS_VREDRAW; + wndclass.lpfnWndProc = WndProc; + wndclass.cbClsExtra = 0; + wndclass.cbWndExtra = 0; + wndclass.hInstance = hInstance; + wndclass.hIcon = LoadIcon (hInstance, szIconName) ; + wndclass.hCursor = LoadCursor (NULL, IDC_ARROW); + wndclass.hbrBackground = NULL; // (HBRUSH) GetStockObject (GRAY_BRUSH); + wndclass.lpszMenuName = szProgName; + wndclass.lpszClassName = szProgName; + + if (!RegisterClass (&wndclass)) + { + MessageBox (NULL, TEXT ("Error: this program requires Windows NT!"), + szProgName, MB_ICONERROR); + return 0; + } + + // if filename given on commandline, store it + if ((szCmdLine != NULL) && (*szCmdLine != '\0')) + if (szCmdLine[0] == '"') + strncpy (szCmdFileName, szCmdLine + 1, strlen(szCmdLine) - 2); + else + strcpy (szCmdFileName, szCmdLine); + else + strcpy (szCmdFileName, ""); + + // calculate size of window-borders + ixBorders = 2 * (GetSystemMetrics (SM_CXBORDER) + + GetSystemMetrics (SM_CXDLGFRAME)); + iyBorders = 2 * (GetSystemMetrics (SM_CYBORDER) + + GetSystemMetrics (SM_CYDLGFRAME)) + + GetSystemMetrics (SM_CYCAPTION) + + GetSystemMetrics (SM_CYMENUSIZE) + + 1; /* WvS: don't ask me why? */ + + hwnd = CreateWindow (szProgName, szAppName, + WS_OVERLAPPEDWINDOW, + CW_USEDEFAULT, CW_USEDEFAULT, + 512 + 2 * MARGIN + ixBorders, 384 + 2 * MARGIN + iyBorders, +// CW_USEDEFAULT, CW_USEDEFAULT, + NULL, NULL, hInstance, NULL); + + ShowWindow (hwnd, iCmdShow); + UpdateWindow (hwnd); + + hAccel = LoadAccelerators (hInstance, szProgName); + + while (GetMessage (&msg, NULL, 0, 0)) + { + if (!TranslateAccelerator (hwnd, hAccel, &msg)) + { + TranslateMessage (&msg); + DispatchMessage (&msg); + } + } + return msg.wParam; +} + +LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, + LPARAM lParam) +{ + static HINSTANCE hInstance ; + static HDC hdc; + static PAINTSTRUCT ps; + static HMENU hMenu; + + static BITMAPFILEHEADER *pbmfh; + static BITMAPINFOHEADER *pbmih; + static BYTE *pbImage; + static int cxWinSize, cyWinSize; + static int cxImgSize, cyImgSize; + static int cImgChannels; + static png_color bkgColor = {127, 127, 127}; + + static BOOL bStretched = TRUE; + + static BYTE *pDib = NULL; + static BYTE *pDiData = NULL; + + static TCHAR szImgPathName [MAX_PATH]; + static TCHAR szTitleName [MAX_PATH]; + + static TCHAR *pPngFileList = NULL; + static int iPngFileCount; + static int iPngFileIndex; + + BOOL bOk; + + switch (message) + { + case WM_CREATE: + hInstance = ((LPCREATESTRUCT) lParam)->hInstance ; + PngFileInitialize (hwnd); + + strcpy (szImgPathName, ""); + + // in case we process file given on command-line + + if (szCmdFileName[0] != '\0') + { + strcpy (szImgPathName, szCmdFileName); + + // read the other png-files in the directory for later + // next/previous commands + + BuildPngList (szImgPathName, &pPngFileList, &iPngFileCount, + &iPngFileIndex); + + // load the image from file + + if (!LoadImageFile (hwnd, szImgPathName, + &pbImage, &cxImgSize, &cyImgSize, &cImgChannels, &bkgColor)) + return 0; + + // invalidate the client area for later update + + InvalidateRect (hwnd, NULL, TRUE); + + // display the PNG into the DIBitmap + + DisplayImage (hwnd, &pDib, &pDiData, cxWinSize, cyWinSize, + pbImage, cxImgSize, cyImgSize, cImgChannels, bStretched); + } + + return 0; + + case WM_SIZE: + cxWinSize = LOWORD (lParam); + cyWinSize = HIWORD (lParam); + + // invalidate the client area for later update + + InvalidateRect (hwnd, NULL, TRUE); + + // display the PNG into the DIBitmap + + DisplayImage (hwnd, &pDib, &pDiData, cxWinSize, cyWinSize, + pbImage, cxImgSize, cyImgSize, cImgChannels, bStretched); + + return 0; + + case WM_INITMENUPOPUP: + hMenu = GetMenu (hwnd); + + if (pbImage) + EnableMenuItem (hMenu, IDM_FILE_SAVE, MF_ENABLED); + else + EnableMenuItem (hMenu, IDM_FILE_SAVE, MF_GRAYED); + + return 0; + + case WM_COMMAND: + hMenu = GetMenu (hwnd); + + switch (LOWORD (wParam)) + { + case IDM_FILE_OPEN: + + // show the File Open dialog box + + if (!PngFileOpenDlg (hwnd, szImgPathName, szTitleName)) + return 0; + + // read the other png-files in the directory for later + // next/previous commands + + BuildPngList (szImgPathName, &pPngFileList, &iPngFileCount, + &iPngFileIndex); + + // load the image from file + + if (!LoadImageFile (hwnd, szImgPathName, + &pbImage, &cxImgSize, &cyImgSize, &cImgChannels, &bkgColor)) + return 0; + + // invalidate the client area for later update + + InvalidateRect (hwnd, NULL, TRUE); + + // display the PNG into the DIBitmap + + DisplayImage (hwnd, &pDib, &pDiData, cxWinSize, cyWinSize, + pbImage, cxImgSize, cyImgSize, cImgChannels, bStretched); + + return 0; + + case IDM_FILE_SAVE: + + // show the File Save dialog box + + if (!PngFileSaveDlg (hwnd, szImgPathName, szTitleName)) + return 0; + + // save the PNG to a disk file + + SetCursor (LoadCursor (NULL, IDC_WAIT)); + ShowCursor (TRUE); + + bOk = PngSaveImage (szImgPathName, pDiData, cxWinSize, cyWinSize, + bkgColor); + + ShowCursor (FALSE); + SetCursor (LoadCursor (NULL, IDC_ARROW)); + + if (!bOk) + MessageBox (hwnd, TEXT ("Error in saving the PNG image"), + szProgName, MB_ICONEXCLAMATION | MB_OK); + return 0; + + case IDM_FILE_NEXT: + + // read next entry in the directory + + if (SearchPngList (pPngFileList, iPngFileCount, &iPngFileIndex, + NULL, szImgPathName)) + { + if (strcmp (szImgPathName, "") == 0) + return 0; + + // load the image from file + + if (!LoadImageFile (hwnd, szImgPathName, &pbImage, + &cxImgSize, &cyImgSize, &cImgChannels, &bkgColor)) + return 0; + + // invalidate the client area for later update + + InvalidateRect (hwnd, NULL, TRUE); + + // display the PNG into the DIBitmap + + DisplayImage (hwnd, &pDib, &pDiData, cxWinSize, cyWinSize, + pbImage, cxImgSize, cyImgSize, cImgChannels, bStretched); + } + + return 0; + + case IDM_FILE_PREVIOUS: + + // read previous entry in the directory + + if (SearchPngList (pPngFileList, iPngFileCount, &iPngFileIndex, + szImgPathName, NULL)) + { + + if (strcmp (szImgPathName, "") == 0) + return 0; + + // load the image from file + + if (!LoadImageFile (hwnd, szImgPathName, &pbImage, &cxImgSize, + &cyImgSize, &cImgChannels, &bkgColor)) + return 0; + + // invalidate the client area for later update + + InvalidateRect (hwnd, NULL, TRUE); + + // display the PNG into the DIBitmap + + DisplayImage (hwnd, &pDib, &pDiData, cxWinSize, cyWinSize, + pbImage, cxImgSize, cyImgSize, cImgChannels, bStretched); + } + + return 0; + + case IDM_FILE_EXIT: + + // more cleanup needed... + + // free image buffer + + if (pDib != NULL) + { + free (pDib); + pDib = NULL; + } + + // free file-list + + if (pPngFileList != NULL) + { + free (pPngFileList); + pPngFileList = NULL; + } + + // let's go ... + + exit (0); + + return 0; + + case IDM_OPTIONS_STRETCH: + bStretched = !bStretched; + if (bStretched) + CheckMenuItem (hMenu, IDM_OPTIONS_STRETCH, MF_CHECKED); + else + CheckMenuItem (hMenu, IDM_OPTIONS_STRETCH, MF_UNCHECKED); + + // invalidate the client area for later update + + InvalidateRect (hwnd, NULL, TRUE); + + // display the PNG into the DIBitmap + + DisplayImage (hwnd, &pDib, &pDiData, cxWinSize, cyWinSize, + pbImage, cxImgSize, cyImgSize, cImgChannels, bStretched); + + return 0; + + case IDM_HELP_ABOUT: + DialogBox (hInstance, TEXT ("AboutBox"), hwnd, AboutDlgProc) ; + return 0; + + } // end switch + + break; + + case WM_PAINT: + hdc = BeginPaint (hwnd, &ps); + + if (pDib) + SetDIBitsToDevice (hdc, 0, 0, cxWinSize, cyWinSize, 0, 0, + 0, cyWinSize, pDiData, (BITMAPINFO *) pDib, DIB_RGB_COLORS); + + EndPaint (hwnd, &ps); + return 0; + + case WM_DESTROY: + if (pbmfh) + { + free (pbmfh); + pbmfh = NULL; + } + + PostQuitMessage (0); + return 0; + } + + return DefWindowProc (hwnd, message, wParam, lParam); +} + +BOOL CALLBACK AboutDlgProc (HWND hDlg, UINT message, + WPARAM wParam, LPARAM lParam) +{ + switch (message) + { + case WM_INITDIALOG : + ShowWindow (hDlg, SW_HIDE); + CenterAbout (hDlg, GetWindow (hDlg, GW_OWNER)); + ShowWindow (hDlg, SW_SHOW); + return TRUE ; + + case WM_COMMAND : + switch (LOWORD (wParam)) + { + case IDOK : + case IDCANCEL : + EndDialog (hDlg, 0) ; + return TRUE ; + } + break ; + } + return FALSE ; +} + +//--------------- +// CenterAbout +//--------------- + +BOOL CenterAbout (HWND hwndChild, HWND hwndParent) +{ + RECT rChild, rParent, rWorkArea; + int wChild, hChild, wParent, hParent; + int xNew, yNew; + BOOL bResult; + + // Get the Height and Width of the child window + GetWindowRect (hwndChild, &rChild); + wChild = rChild.right - rChild.left; + hChild = rChild.bottom - rChild.top; + + // Get the Height and Width of the parent window + GetWindowRect (hwndParent, &rParent); + wParent = rParent.right - rParent.left; + hParent = rParent.bottom - rParent.top; + + // Get the limits of the 'workarea' + bResult = SystemParametersInfo( + SPI_GETWORKAREA, // system parameter to query or set + sizeof(RECT), + &rWorkArea, + 0); + if (!bResult) { + rWorkArea.left = rWorkArea.top = 0; + rWorkArea.right = GetSystemMetrics(SM_CXSCREEN); + rWorkArea.bottom = GetSystemMetrics(SM_CYSCREEN); + } + + // Calculate new X position, then adjust for workarea + xNew = rParent.left + ((wParent - wChild) /2); + if (xNew < rWorkArea.left) { + xNew = rWorkArea.left; + } else if ((xNew+wChild) > rWorkArea.right) { + xNew = rWorkArea.right - wChild; + } + + // Calculate new Y position, then adjust for workarea + yNew = rParent.top + ((hParent - hChild) /2); + if (yNew < rWorkArea.top) { + yNew = rWorkArea.top; + } else if ((yNew+hChild) > rWorkArea.bottom) { + yNew = rWorkArea.bottom - hChild; + } + + // Set it, and return + return SetWindowPos (hwndChild, NULL, xNew, yNew, 0, 0, SWP_NOSIZE | + SWP_NOZORDER); +} + +//---------------- +// BuildPngList +//---------------- + +BOOL BuildPngList (PTSTR pstrPathName, TCHAR **ppFileList, int *pFileCount, + int *pFileIndex) +{ + static TCHAR szImgPathName [MAX_PATH]; + static TCHAR szImgFileName [MAX_PATH]; + static TCHAR szImgFindName [MAX_PATH]; + + WIN32_FIND_DATA finddata; + HANDLE hFind; + + static TCHAR szTmp [MAX_PATH]; + BOOL bOk; + int i, ii; + int j, jj; + + // free previous file-list + + if (*ppFileList != NULL) + { + free (*ppFileList); + *ppFileList = NULL; + } + + // extract foldername, filename and search-name + + strcpy (szImgPathName, pstrPathName); + strcpy (szImgFileName, strrchr (pstrPathName, '\\') + 1); + + strcpy (szImgFindName, szImgPathName); + *(strrchr (szImgFindName, '\\') + 1) = '\0'; + strcat (szImgFindName, "*.png"); + + // first cycle: count number of files in directory for memory allocation + + *pFileCount = 0; + + hFind = FindFirstFile(szImgFindName, &finddata); + bOk = (hFind != (HANDLE) -1); + + while (bOk) + { + *pFileCount += 1; + bOk = FindNextFile(hFind, &finddata); + } + FindClose(hFind); + + // allocation memory for file-list + + *ppFileList = (TCHAR *) malloc (*pFileCount * MAX_PATH); + + // second cycle: read directory and store filenames in file-list + + hFind = FindFirstFile(szImgFindName, &finddata); + bOk = (hFind != (HANDLE) -1); + + i = 0; + ii = 0; + while (bOk) + { + strcpy (*ppFileList + ii, szImgPathName); + strcpy (strrchr(*ppFileList + ii, '\\') + 1, finddata.cFileName); + + if (strcmp(pstrPathName, *ppFileList + ii) == 0) + *pFileIndex = i; + + ii += MAX_PATH; + i++; + + bOk = FindNextFile(hFind, &finddata); + } + FindClose(hFind); + + // finally we must sort the file-list + + for (i = 0; i < *pFileCount - 1; i++) + { + ii = i * MAX_PATH; + for (j = i+1; j < *pFileCount; j++) + { + jj = j * MAX_PATH; + if (strcmp (*ppFileList + ii, *ppFileList + jj) > 0) + { + strcpy (szTmp, *ppFileList + jj); + strcpy (*ppFileList + jj, *ppFileList + ii); + strcpy (*ppFileList + ii, szTmp); + + // check if this was the current image that we moved + + if (*pFileIndex == i) + *pFileIndex = j; + else + if (*pFileIndex == j) + *pFileIndex = i; + } + } + } + + return TRUE; +} + +//---------------- +// SearchPngList +//---------------- + +BOOL SearchPngList ( + TCHAR *pFileList, int FileCount, int *pFileIndex, + PTSTR pstrPrevName, PTSTR pstrNextName) +{ + if (FileCount > 0) + { + // get previous entry + + if (pstrPrevName != NULL) + { + if (*pFileIndex > 0) + *pFileIndex -= 1; + else + *pFileIndex = FileCount - 1; + + strcpy (pstrPrevName, pFileList + (*pFileIndex * MAX_PATH)); + } + + // get next entry + + if (pstrNextName != NULL) + { + if (*pFileIndex < FileCount - 1) + *pFileIndex += 1; + else + *pFileIndex = 0; + + strcpy (pstrNextName, pFileList + (*pFileIndex * MAX_PATH)); + } + + return TRUE; + } + else + { + return FALSE; + } +} + +//----------------- +// LoadImageFile +//----------------- + +BOOL LoadImageFile (HWND hwnd, PTSTR pstrPathName, + png_byte **ppbImage, int *pxImgSize, int *pyImgSize, + int *piChannels, png_color *pBkgColor) +{ + static TCHAR szTmp [MAX_PATH]; + + // if there's an existing PNG, free the memory + + if (*ppbImage) + { + free (*ppbImage); + *ppbImage = NULL; + } + + // Load the entire PNG into memory + + SetCursor (LoadCursor (NULL, IDC_WAIT)); + ShowCursor (TRUE); + + PngLoadImage (pstrPathName, ppbImage, pxImgSize, pyImgSize, piChannels, + pBkgColor); + + ShowCursor (FALSE); + SetCursor (LoadCursor (NULL, IDC_ARROW)); + + if (*ppbImage != NULL) + { + sprintf (szTmp, "VisualPng - %s", strrchr(pstrPathName, '\\') + 1); + SetWindowText (hwnd, szTmp); + } + else + { + MessageBox (hwnd, TEXT ("Error in loading the PNG image"), + szProgName, MB_ICONEXCLAMATION | MB_OK); + return FALSE; + } + + return TRUE; +} + +//---------------- +// DisplayImage +//---------------- + +BOOL DisplayImage (HWND hwnd, BYTE **ppDib, + BYTE **ppDiData, int cxWinSize, int cyWinSize, + BYTE *pbImage, int cxImgSize, int cyImgSize, int cImgChannels, + BOOL bStretched) +{ + BYTE *pDib = *ppDib; + BYTE *pDiData = *ppDiData; + // BITMAPFILEHEADER *pbmfh; + BITMAPINFOHEADER *pbmih; + WORD wDIRowBytes; + png_color bkgBlack = {0, 0, 0}; + png_color bkgGray = {127, 127, 127}; + png_color bkgWhite = {255, 255, 255}; + + // allocate memory for the Device Independant bitmap + + wDIRowBytes = (WORD) ((3 * cxWinSize + 3L) >> 2) << 2; + + if (pDib) + { + free (pDib); + pDib = NULL; + } + + if (!(pDib = (BYTE *) malloc (sizeof(BITMAPINFOHEADER) + + wDIRowBytes * cyWinSize))) + { + MessageBox (hwnd, TEXT ("Error in displaying the PNG image"), + szProgName, MB_ICONEXCLAMATION | MB_OK); + *ppDib = pDib = NULL; + return FALSE; + } + *ppDib = pDib; + memset (pDib, 0, sizeof(BITMAPINFOHEADER)); + + // initialize the dib-structure + + pbmih = (BITMAPINFOHEADER *) pDib; + pbmih->biSize = sizeof(BITMAPINFOHEADER); + pbmih->biWidth = cxWinSize; + pbmih->biHeight = -((long) cyWinSize); + pbmih->biPlanes = 1; + pbmih->biBitCount = 24; + pbmih->biCompression = 0; + pDiData = pDib + sizeof(BITMAPINFOHEADER); + *ppDiData = pDiData; + + // first fill bitmap with gray and image border + + InitBitmap (pDiData, cxWinSize, cyWinSize); + + // then fill bitmap with image + + if (pbImage) + { + FillBitmap ( + pDiData, cxWinSize, cyWinSize, + pbImage, cxImgSize, cyImgSize, cImgChannels, + bStretched); + } + + return TRUE; +} + +//-------------- +// InitBitmap +//-------------- + +BOOL InitBitmap (BYTE *pDiData, int cxWinSize, int cyWinSize) +{ + BYTE *dst; + int x, y, col; + + // initialize the background with gray + + dst = pDiData; + for (y = 0; y < cyWinSize; y++) + { + col = 0; + for (x = 0; x < cxWinSize; x++) + { + // fill with GRAY + *dst++ = 127; + *dst++ = 127; + *dst++ = 127; + col += 3; + } + // rows start on 4 byte boundaries + while ((col % 4) != 0) + { + dst++; + col++; + } + } + + return TRUE; +} + +//-------------- +// FillBitmap +//-------------- + +BOOL FillBitmap ( + BYTE *pDiData, int cxWinSize, int cyWinSize, + BYTE *pbImage, int cxImgSize, int cyImgSize, int cImgChannels, + BOOL bStretched) +{ + BYTE *pStretchedImage; + BYTE *pImg; + BYTE *src, *dst; + BYTE r, g, b, a; + const int cDIChannels = 3; + WORD wImgRowBytes; + WORD wDIRowBytes; + int cxNewSize, cyNewSize; + int cxImgPos, cyImgPos; + int xImg, yImg; + int xWin, yWin; + int xOld, yOld; + int xNew, yNew; + + if (bStretched) + { + cxNewSize = cxWinSize - 2 * MARGIN; + cyNewSize = cyWinSize - 2 * MARGIN; + + // stretch the image to it's window determined size + + // the following two are the same, but the first has side-effects + // because of rounding +// if ((cyNewSize / cxNewSize) > (cyImgSize / cxImgSize)) + if ((cyNewSize * cxImgSize) > (cyImgSize * cxNewSize)) + { + cyNewSize = cxNewSize * cyImgSize / cxImgSize; + cxImgPos = MARGIN; + cyImgPos = (cyWinSize - cyNewSize) / 2; + } + else + { + cxNewSize = cyNewSize * cxImgSize / cyImgSize; + cyImgPos = MARGIN; + cxImgPos = (cxWinSize - cxNewSize) / 2; + } + + pStretchedImage = malloc (cImgChannels * cxNewSize * cyNewSize); + pImg = pStretchedImage; + + for (yNew = 0; yNew < cyNewSize; yNew++) + { + yOld = yNew * cyImgSize / cyNewSize; + for (xNew = 0; xNew < cxNewSize; xNew++) + { + xOld = xNew * cxImgSize / cxNewSize; + + r = *(pbImage + cImgChannels * ((yOld * cxImgSize) + xOld) + 0); + g = *(pbImage + cImgChannels * ((yOld * cxImgSize) + xOld) + 1); + b = *(pbImage + cImgChannels * ((yOld * cxImgSize) + xOld) + 2); + *pImg++ = r; + *pImg++ = g; + *pImg++ = b; + if (cImgChannels == 4) + { + a = *(pbImage + cImgChannels * ((yOld * cxImgSize) + xOld) + + 3); + *pImg++ = a; + } + } + } + + // calculate row-bytes + + wImgRowBytes = cImgChannels * cxNewSize; + wDIRowBytes = (WORD) ((cDIChannels * cxWinSize + 3L) >> 2) << 2; + + // copy image to screen + + for (yImg = 0, yWin = cyImgPos; yImg < cyNewSize; yImg++, yWin++) + { + if (yWin >= cyWinSize - cyImgPos) + break; + src = pStretchedImage + yImg * wImgRowBytes; + dst = pDiData + yWin * wDIRowBytes + cxImgPos * cDIChannels; + + for (xImg = 0, xWin = cxImgPos; xImg < cxNewSize; xImg++, xWin++) + { + if (xWin >= cxWinSize - cxImgPos) + break; + r = *src++; + g = *src++; + b = *src++; + *dst++ = b; /* note the reverse order */ + *dst++ = g; + *dst++ = r; + if (cImgChannels == 4) + { + a = *src++; + } + } + } + + // free memory + + if (pStretchedImage != NULL) + { + free (pStretchedImage); + pStretchedImage = NULL; + } + + } + + // process the image not-stretched + + else + { + // calculate the central position + + cxImgPos = (cxWinSize - cxImgSize) / 2; + cyImgPos = (cyWinSize - cyImgSize) / 2; + + // check for image larger than window + + if (cxImgPos < MARGIN) + cxImgPos = MARGIN; + if (cyImgPos < MARGIN) + cyImgPos = MARGIN; + + // calculate both row-bytes + + wImgRowBytes = cImgChannels * cxImgSize; + wDIRowBytes = (WORD) ((cDIChannels * cxWinSize + 3L) >> 2) << 2; + + // copy image to screen + + for (yImg = 0, yWin = cyImgPos; yImg < cyImgSize; yImg++, yWin++) + { + if (yWin >= cyWinSize - MARGIN) + break; + src = pbImage + yImg * wImgRowBytes; + dst = pDiData + yWin * wDIRowBytes + cxImgPos * cDIChannels; + + for (xImg = 0, xWin = cxImgPos; xImg < cxImgSize; xImg++, xWin++) + { + if (xWin >= cxWinSize - MARGIN) + break; + r = *src++; + g = *src++; + b = *src++; + *dst++ = b; /* note the reverse order */ + *dst++ = g; + *dst++ = r; + if (cImgChannels == 4) + { + a = *src++; + } + } + } + } + + return TRUE; +} + +//----------------- +// end of source +//----------------- diff --git a/gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.dsp b/gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.dsp new file mode 100644 index 0000000..0093cbf --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.dsp @@ -0,0 +1,223 @@ +# Microsoft Developer Studio Project File - Name="VisualPng" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 + +# Copyright 2000, Willem van Schaik. For conditions of distribution and +# use, see the copyright/license/disclaimer notice in png.h + +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=VisualPng - Win32 Debug LIB +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "VisualPng.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "VisualPng.mak" CFG="VisualPng - Win32 Debug LIB" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "VisualPng - Win32 DLL" (based on "Win32 (x86) Application") +!MESSAGE "VisualPng - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "VisualPng - Win32 LIB" (based on "Win32 (x86) Application") +!MESSAGE "VisualPng - Win32 Debug LIB" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "VisualPng - Win32 DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "VisualPng___Win32_DLL" +# PROP BASE Intermediate_Dir "VisualPng___Win32_DLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "dll" +# PROP Intermediate_Dir "dll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /I "libpng" /I "zlib" /D "PNG_USE_DLL" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\libpng" /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "PNG_USE_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 libpng13.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"libpng" /libpath:"zlib" +# ADD LINK32 libpng13.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\dll" +# Begin Special Build Tool +OutDir=.\dll +SOURCE="$(InputPath)" +PostBuild_Cmds=set path=..\..\projects\msvc\win32\libpng\dll;..\..\projects\msvc\win32\zlib\dll; $(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png +# End Special Build Tool + +!ELSEIF "$(CFG)" == "VisualPng - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "VisualPng___Win32_Debug_DLL" +# PROP BASE Intermediate_Dir "VisualPng___Win32_Debug_DLL" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "dll_dbg" +# PROP Intermediate_Dir "dll_dbg" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "libpng" /I "zlib" /D "PNG_USE_DLL" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\libpng" /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "PNG_USE_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 libpng13.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"libpng" /libpath:"zlib" +# SUBTRACT BASE LINK32 /nodefaultlib +# ADD LINK32 libpng13d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\dll_dbg" +# SUBTRACT LINK32 /nodefaultlib +# Begin Special Build Tool +OutDir=.\dll_dbg +SOURCE="$(InputPath)" +PostBuild_Cmds=set path=..\..\projects\msvc\win32\libpng\dll_dbg;..\..\projects\msvc\win32\zlib\dll_dbg; $(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png +# End Special Build Tool + +!ELSEIF "$(CFG)" == "VisualPng - Win32 LIB" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "VisualPng___Win32_LIB" +# PROP BASE Intermediate_Dir "VisualPng___Win32_LIB" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "lib" +# PROP Intermediate_Dir "lib" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /I "..\..\..\libpng" /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "PNG_USE_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c +# SUBTRACT BASE CPP /YX +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\libpng" /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 libpng13.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\dll" +# ADD LINK32 libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\lib" +# Begin Special Build Tool +OutDir=.\lib +SOURCE="$(InputPath)" +PostBuild_Cmds=$(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png +# End Special Build Tool + +!ELSEIF "$(CFG)" == "VisualPng - Win32 Debug LIB" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "VisualPng___Win32_Debug_LIB" +# PROP BASE Intermediate_Dir "VisualPng___Win32_Debug_LIB" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "lib_dbg" +# PROP Intermediate_Dir "lib_dbg" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\libpng" /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "PNG_USE_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\libpng" /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 libpng13d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\dll_dbg" +# SUBTRACT BASE LINK32 /nodefaultlib +# ADD LINK32 libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\lib_dbg" +# SUBTRACT LINK32 /nodefaultlib +# Begin Special Build Tool +OutDir=.\lib_dbg +SOURCE="$(InputPath)" +PostBuild_Cmds=$(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png +# End Special Build Tool + +!ENDIF + +# Begin Target + +# Name "VisualPng - Win32 DLL" +# Name "VisualPng - Win32 Debug DLL" +# Name "VisualPng - Win32 LIB" +# Name "VisualPng - Win32 Debug LIB" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\PngFile.c +# End Source File +# Begin Source File + +SOURCE=.\VisualPng.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\cexcept.h +# End Source File +# Begin Source File + +SOURCE=.\PngFile.h +# End Source File +# Begin Source File + +SOURCE=.\resource.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\VisualPng.ico +# End Source File +# Begin Source File + +SOURCE=.\VisualPng.rc +# End Source File +# End Group +# End Target +# End Project diff --git a/gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.dsw b/gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.dsw new file mode 100644 index 0000000..17ad83a --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "VisualPng"=.\VisualPng.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.ico b/gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.ico new file mode 100644 index 0000000000000000000000000000000000000000..68aa3719fb523eccd4c4a706e4198ca1be2b4c62 GIT binary patch literal 766 zcmb_ayGjE=6ul!BJ4Il&5f%%#i;YeE0sqBX?6q(TQ7j^}Bh9<%xts4i6 zkcy&!=Yp>fdCw6P!YMX?g~S3@L(=jS0+)s|NiKlEgL>VOVf)WTfR)85V$RN>JwSV-vWY^X3AQl6o~-A`A21P`H#(L`ua zC6p2|SPTx|B;lEdR<4J97z(@|!YJx7#d!1r3hTe|MU4YoP< Ob-aH+fF44>&V2wPTAUpK literal 0 HcmV?d00001 diff --git a/gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.png b/gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.png new file mode 100644 index 0000000000000000000000000000000000000000..c6aa80a9bfa275137e429498bc785cb2dbcdb382 GIT binary patch literal 208 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnL3?x0byx0z;SkfJR9T^xl_H+M9WCils0(?ST zf%J9`j>RRx2|yNONswPKgTu2MX+Tbfr;B5V#O34!2UcDl9v_~y3Xga?K0NvO|~WI+Z?ismL3#z>)ClO+n69&&Pt@)((moHOva6OfZ2FlX_Z0}8s!jvZ1^ zUz2uRL2<>QLkbEXTG%~o9y17?WOH!($Y?g1Vbg3Ozf`fCd_X%HJYD@<);T3K0RUGo BL5BbU literal 0 HcmV?d00001 diff --git a/gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.rc b/gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.rc new file mode 100644 index 0000000..151c68c --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/visupng/VisualPng.rc @@ -0,0 +1,152 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +VISUALPNG MENU DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Open Image...\tCtrl+O", IDM_FILE_OPEN + MENUITEM "Save &As...", IDM_FILE_SAVE + MENUITEM SEPARATOR + MENUITEM "&Next Image\tCtrl+N", IDM_FILE_NEXT + MENUITEM "Pre&vious Image\tCtrl+V", IDM_FILE_PREVIOUS + MENUITEM SEPARATOR + MENUITEM "E&xit\tAlt+X", IDM_FILE_EXIT + END + POPUP "&Options" + BEGIN + MENUITEM "&Stretch", IDM_OPTIONS_STRETCH, CHECKED + END + POPUP "&Help" + BEGIN + MENUITEM "&About", IDM_HELP_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +VISUALPNG ACCELERATORS DISCARDABLE +BEGIN + "N", IDM_FILE_NEXT, VIRTKEY, CONTROL, NOINVERT + "O", IDM_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT + "P", IDM_FILE_PREVIOUS, VIRTKEY, CONTROL, NOINVERT + "V", IDM_FILE_PREVIOUS, VIRTKEY, CONTROL, NOINVERT + "X", IDM_FILE_EXIT, VIRTKEY, ALT, NOINVERT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +VISUALPNG ICON DISCARDABLE "VisualPng.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +ABOUTBOX DIALOG DISCARDABLE 0, 0, 186, 94 +STYLE DS_MODALFRAME | WS_POPUP +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,68,67,50,14 + CTEXT "VisualPng 1.0 - June 2000",IDC_STATIC,49,14,88,8 + LTEXT "a PNG image viewer",IDC_STATIC,60,30,66,8 + LTEXT "(c) Willem van Schaik, 2000",IDC_STATIC,48,52,90,8 + LTEXT "to demonstrate the use of libpng in Visual C", + IDC_STATIC,25,38,136,8 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + "ABOUTBOX", DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + TOPMARGIN, 7 + BOTTOMMARGIN, 87 + END +END +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/gtkmm-osx/libpng-1.2.5/contrib/visupng/cexcept.h b/gtkmm-osx/libpng-1.2.5/contrib/visupng/cexcept.h new file mode 100644 index 0000000..532b23d --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/visupng/cexcept.h @@ -0,0 +1,244 @@ +/*=== +cexcept.h 1.0.0 (2000-Jun-21-Wed) +Adam M. Costello + +An interface for exception-handling in ANSI C, developed jointly with +Cosmin Truta . + + Copyright (c) 2000 Adam M. Costello and Cosmin Truta. Everyone + is hereby granted permission to do whatever they like with this + file, provided that if they modify it they take reasonable steps to + avoid confusing or misleading people about the authors, version, + and terms of use of the derived file. The copyright holders make + no guarantees about the correctness of this file, and are not + responsible for any damage resulting from its use. + +If this interface is used by multiple .c files, they shouldn't include +this header file directly. Instead, create a wrapper header file that +includes this header file and then invokes the define_exception_type +macro (see below), and let your .c files include that header file. + +The interface consists of one type, one well-known name, and six macros. + + +define_exception_type(type_name); + + This macro is used like an external declaration. It specifies + the type of object that gets copied from the exception thrower to + the exception catcher. The type_name can be any type that can be + assigned to, that is, a non-constant arithmetic type, struct, union, + or pointer. Examples: + + define_exception_type(int); + + enum exception { out_of_memory, bad_arguments, disk_full }; + define_exception_type(enum exception); + + struct exception { int code; const char *msg; }; + define_exception_type(struct exception); + + +struct exception_context; + + This type may be used after the define_exception_type() macro has + been invoked. A struct exception_context must be known to both + the thrower and the catcher. It is expected that there be one + context for each thread that uses exceptions. It would certainly + be dangerous for multiple threads to access the same context. + One thread can use multiple contexts, but that is likely to be + confusing and not typically useful. The application can allocate + this structure in any way it pleases--automatic, static, or dynamic. + The application programmer should pretend not to know the structure + members, which are subject to change. + + +struct exception_context *the_exception_context; + + The Try/Catch and Throw statements (described below) implicitly + refer to a context, using the name the_exception_context. It is + the application's responsibility to make sure that this name yields + the address of a mutable (non-constant) struct exception_context + wherever those statements are used. Subject to that constraint, the + application may declare a variable of this name anywhere it likes + (inside a function, in a parameter list, or externally), and may + use whatever storage class specifiers (static, extern, etc) or type + qualifiers (const, volatile) it likes. Examples: + + static struct exception_context + * const the_exception_context = &foo; + + { struct exception_context *the_exception_context = bar; ... } + + int blah(struct exception_context *the_exception_context, ...); + + extern struct exception_context the_exception_context[1]; + + The last example illustrates a trick that avoids creating a pointer + object separate from the structure object. + + The name could even be a macro, for example: + + struct exception_context ec_array[numthreads]; + #define the_exception_context (ec_array + thread_id) + + Be aware that the_exception_context is used several times by the + Try/Catch/Throw macros, so it shouldn't be expensive or have side + effects. The expansion must be a drop-in replacement for an + identifier, so it's safest to put parentheses around it. + + +void init_exception_context(struct exception_context *ec); + + For context structures allocated statically (by an external + definition or using the "static" keyword), the implicit + initialization to all zeros is sufficient, but contexts allocated + by other means must be initialized using this macro before they + are used by a Try/Catch statement. It does no harm to initialize + a context more than once (by using this macro on a statically + allocated context, or using this macro twice on the same context), + but a context must not be re-initialized after it has been used by a + Try/Catch statement. + + +Try statement +Catch (expression) statement + + The Try/Catch/Throw macros are capitalized in order to avoid + confusion with the C++ keywords, which have subtly different + semantics. + + A Try/Catch statement has a syntax similar to an if/else + statement, except that the parenthesized expression goes after + the second keyword rather than the first. As with if/else, + there are two clauses, each of which may be a simple statement + ending with a semicolon or a brace-enclosed compound statement. + But whereas the else clause is optional, the Catch clause is + required. The expression must be a modifiable lvalue (something + capable of being assigned to) of the exact same type passed to + define_exception_type(). + + If a Throw that uses the same exception context as the Try/Catch is + executed within the Try clause (typically within a function called + by the Try clause), and the exception is not caught by a nested + Try/Catch statement, then a copy of the exception will be assigned + to the expression, and control will jump to the Catch clause. If no + such Throw is executed, then the assignment is not performed, and + the Catch clause is not executed. + + Regardless of whether an exception is caught, the expression is + always evaluated exactly once, which is significant if it has side + effects, for example: + + Try foo(); + Catch (p[++i].e) { ... } + + IMPORTANT: Jumping into or out of a Try clause (for example via + return, break, continue, goto, longjmp) is forbidden--the compiler + will not complain, but bad things will happen at run-time. Jumping + into or out of a Catch clause is okay, and so is jumping around + inside a Try clause. In many cases where one is tempted to return + from a Try clause, it will suffice to use Throw, and then return + from the Catch clause. Another option is to set a flag variable and + use goto to jump to the end of the Try clause, then check the flag + after the Try/Catch statement. + + IMPORTANT: The values of any non-volatile automatic variables + changed within the Try clause are undefined after an exception is + caught. Therefore, variables modified inside the Try block whose + values are needed later outside the Try block must either use static + storage or be declared with the "volatile" type qualifier. + + +Throw expression; + + A Throw statement is very much like a return statement, except that + the expression is required. Whereas return jumps back to the place + where the current function was called, Throw jumps back to the Catch + clause of the innermost enclosing Try clause. The expression must + be compatible with the type passed to define_exception_type(). The + exception must be caught, otherwise the program may crash. + + Slight limitation: If the expression is a comma-expression it must + be enclosed in parentheses. + + +Try statement +Catch_anonymous statement + + When the value of the exception is not needed, a Try/Catch statement + can use Catch_anonymous instead of Catch (expression). + + +Everything below this point is for the benefit of the compiler. The +application programmer should pretend not to know any of it, because it +is subject to change. + +===*/ + + +#ifndef CEXCEPT_H +#define CEXCEPT_H + + +#include + +#define define_exception_type(etype) \ +struct exception__state { \ + etype *exception; \ + jmp_buf env; \ +} + +struct exception_context { \ + struct exception__state *last; \ + int caught; \ +}; + +#define init_exception_context(ec) ((void)((ec)->last = 0)) + +#define Catch(e) exception__catch(&(e)) +#define Catch_anonymous exception__catch(0) + +#define Try \ + { \ + struct exception__state *exception__p, exception__s; \ + int exception__i; \ + exception__p = the_exception_context->last; \ + the_exception_context->last = &exception__s; \ + for (exception__i = 0; ; exception__i = 1) \ + if (exception__i) { \ + if (setjmp(exception__s.env) == 0) { \ + if (&exception__s) + +#define exception__catch(e_addr) \ + else { } \ + the_exception_context->caught = 0; \ + } \ + else the_exception_context->caught = 1; \ + the_exception_context->last = exception__p; \ + break; \ + } \ + else exception__s.exception = e_addr; \ + } \ + if (!the_exception_context->caught) { } \ + else + +/* Try ends with if(), and Catch begins and ends with else. This */ +/* ensures that the Try/Catch syntax is really the same as the */ +/* if/else syntax. */ +/* */ +/* We use &exception__s instead of 1 to appease compilers that */ +/* warn about constant expressions inside if(). Most compilers */ +/* should still recognize that &exception__s is never zero and avoid */ +/* generating test code. */ +/* */ +/* We use the variable exception__i to start the loop at the bottom, */ +/* rather than jump into the loop using a switch statement, to */ +/* appease compilers that warn about jumping into loops. */ + +#define Throw \ + for (;; longjmp(the_exception_context->last->env, 1)) \ + if (the_exception_context->last->exception) \ + *the_exception_context->last->exception = + + +#endif /* CEXCEPT_H */ diff --git a/gtkmm-osx/libpng-1.2.5/contrib/visupng/resource.h b/gtkmm-osx/libpng-1.2.5/contrib/visupng/resource.h new file mode 100644 index 0000000..b62176d --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/contrib/visupng/resource.h @@ -0,0 +1,23 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by VisualPng.rc +// +#define IDM_FILE_OPEN 40001 +#define IDM_FILE_SAVE 40002 +#define IDM_FILE_NEXT 40003 +#define IDM_FILE_PREVIOUS 40004 +#define IDM_FILE_EXIT 40005 +#define IDM_OPTIONS_BACKGROUND 40006 +#define IDM_OPTIONS_STRETCH 40007 +#define IDM_HELP_ABOUT 40008 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 113 +#define _APS_NEXT_COMMAND_VALUE 40009 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/gtkmm-osx/libpng-1.2.5/example.c b/gtkmm-osx/libpng-1.2.5/example.c new file mode 100644 index 0000000..7956cf7 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/example.c @@ -0,0 +1,804 @@ + +#if 0 /* in case someone actually tries to compile this */ + +/* example.c - an example of using libpng */ + +/* This is an example of how to use libpng to read and write PNG files. + * The file libpng.txt is much more verbose then this. If you have not + * read it, do so first. This was designed to be a starting point of an + * implementation. This is not officially part of libpng, is hereby placed + * in the public domain, and therefore does not require a copyright notice. + * + * This file does not currently compile, because it is missing certain + * parts, like allocating memory to hold an image. You will have to + * supply these parts to get it to compile. For an example of a minimal + * working PNG reader/writer, see pngtest.c, included in this distribution; + * see also the programs in the contrib directory. + */ + +#include "png.h" + + /* The png_jmpbuf() macro, used in error handling, became available in + * libpng version 1.0.6. If you want to be able to run your code with older + * versions of libpng, you must define the macro yourself (but only if it + * is not already defined by libpng!). + */ + +#ifndef png_jmpbuf +# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) +#endif + +/* Check to see if a file is a PNG file using png_sig_cmp(). png_sig_cmp() + * returns zero if the image is a PNG and nonzero if it isn't a PNG. + * + * The function check_if_png() shown here, but not used, returns nonzero (true) + * if the file can be opened and is a PNG, 0 (false) otherwise. + * + * If this call is successful, and you are going to keep the file open, + * you should call png_set_sig_bytes(png_ptr, PNG_BYTES_TO_CHECK); once + * you have created the png_ptr, so that libpng knows your application + * has read that many bytes from the start of the file. Make sure you + * don't call png_set_sig_bytes() with more than 8 bytes read or give it + * an incorrect number of bytes read, or you will either have read too + * many bytes (your fault), or you are telling libpng to read the wrong + * number of magic bytes (also your fault). + * + * Many applications already read the first 2 or 4 bytes from the start + * of the image to determine the file type, so it would be easiest just + * to pass the bytes to png_sig_cmp() or even skip that if you know + * you have a PNG file, and call png_set_sig_bytes(). + */ +#define PNG_BYTES_TO_CHECK 4 +int check_if_png(char *file_name, FILE **fp) +{ + char buf[PNG_BYTES_TO_CHECK]; + + /* Open the prospective PNG file. */ + if ((*fp = fopen(file_name, "rb")) == NULL) + return 0; + + /* Read in some of the signature bytes */ + if (fread(buf, 1, PNG_BYTES_TO_CHECK, *fp) != PNG_BYTES_TO_CHECK) + return 0; + + /* Compare the first PNG_BYTES_TO_CHECK bytes of the signature. + Return nonzero (true) if they match */ + + return(!png_sig_cmp(buf, (png_size_t)0, PNG_BYTES_TO_CHECK)); +} + +/* Read a PNG file. You may want to return an error code if the read + * fails (depending upon the failure). There are two "prototypes" given + * here - one where we are given the filename, and we need to open the + * file, and the other where we are given an open file (possibly with + * some or all of the magic bytes read - see comments above). + */ +#ifdef open_file /* prototype 1 */ +void read_png(char *file_name) /* We need to open the file */ +{ + png_structp png_ptr; + png_infop info_ptr; + unsigned int sig_read = 0; + png_uint_32 width, height; + int bit_depth, color_type, interlace_type; + FILE *fp; + + if ((fp = fopen(file_name, "rb")) == NULL) + return (ERROR); +#else no_open_file /* prototype 2 */ +void read_png(FILE *fp, unsigned int sig_read) /* file is already open */ +{ + png_structp png_ptr; + png_infop info_ptr; + png_uint_32 width, height; + int bit_depth, color_type, interlace_type; +#endif no_open_file /* only use one prototype! */ + + /* Create and initialize the png_struct with the desired error handler + * functions. If you want to use the default stderr and longjump method, + * you can supply NULL for the last three parameters. We also supply the + * the compiler header file version, so that we know if the application + * was compiled with a compatible version of the library. REQUIRED + */ + png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, + png_voidp user_error_ptr, user_error_fn, user_warning_fn); + + if (png_ptr == NULL) + { + fclose(fp); + return (ERROR); + } + + /* Allocate/initialize the memory for image information. REQUIRED. */ + info_ptr = png_create_info_struct(png_ptr); + if (info_ptr == NULL) + { + fclose(fp); + png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL); + return (ERROR); + } + + /* Set error handling if you are using the setjmp/longjmp method (this is + * the normal method of doing things with libpng). REQUIRED unless you + * set up your own error handlers in the png_create_read_struct() earlier. + */ + + if (setjmp(png_jmpbuf(png_ptr))) + { + /* Free all of the memory associated with the png_ptr and info_ptr */ + png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); + fclose(fp); + /* If we get here, we had a problem reading the file */ + return (ERROR); + } + + /* One of the following I/O initialization methods is REQUIRED */ +#ifdef streams /* PNG file I/O method 1 */ + /* Set up the input control if you are using standard C streams */ + png_init_io(png_ptr, fp); + +#else no_streams /* PNG file I/O method 2 */ + /* If you are using replacement read functions, instead of calling + * png_init_io() here you would call: + */ + png_set_read_fn(png_ptr, (void *)user_io_ptr, user_read_fn); + /* where user_io_ptr is a structure you want available to the callbacks */ +#endif no_streams /* Use only one I/O method! */ + + /* If we have already read some of the signature */ + png_set_sig_bytes(png_ptr, sig_read); + +#ifdef hilevel + /* + * If you have enough memory to read in the entire image at once, + * and you need to specify only transforms that can be controlled + * with one of the PNG_TRANSFORM_* bits (this presently excludes + * dithering, filling, setting background, and doing gamma + * adjustment), then you can read the entire image (including + * pixels) into the info structure with this call: + */ + png_read_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL); +#else + /* OK, you're doing it the hard way, with the lower-level functions */ + + /* The call to png_read_info() gives us all of the information from the + * PNG file before the first IDAT (image data chunk). REQUIRED + */ + png_read_info(png_ptr, info_ptr); + + png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, + &interlace_type, int_p_NULL, int_p_NULL); + +/* Set up the data transformations you want. Note that these are all + * optional. Only call them if you want/need them. Many of the + * transformations only work on specific types of images, and many + * are mutually exclusive. + */ + + /* tell libpng to strip 16 bit/color files down to 8 bits/color */ + png_set_strip_16(png_ptr); + + /* Strip alpha bytes from the input data without combining with the + * background (not recommended). + */ + png_set_strip_alpha(png_ptr); + + /* Extract multiple pixels with bit depths of 1, 2, and 4 from a single + * byte into separate bytes (useful for paletted and grayscale images). + */ + png_set_packing(png_ptr); + + /* Change the order of packed pixels to least significant bit first + * (not useful if you are using png_set_packing). */ + png_set_packswap(png_ptr); + + /* Expand paletted colors into true RGB triplets */ + if (color_type == PNG_COLOR_TYPE_PALETTE) + png_set_palette_rgb(png_ptr); + + /* Expand grayscale images to the full 8 bits from 1, 2, or 4 bits/pixel */ + if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) + png_set_gray_1_2_4_to_8(png_ptr); + + /* Expand paletted or RGB images with transparency to full alpha channels + * so the data will be available as RGBA quartets. + */ + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) + png_set_tRNS_to_alpha(png_ptr); + + /* Set the background color to draw transparent and alpha images over. + * It is possible to set the red, green, and blue components directly + * for paletted images instead of supplying a palette index. Note that + * even if the PNG file supplies a background, you are not required to + * use it - you should use the (solid) application background if it has one. + */ + + png_color_16 my_background, *image_background; + + if (png_get_bKGD(png_ptr, info_ptr, &image_background)) + png_set_background(png_ptr, image_background, + PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); + else + png_set_background(png_ptr, &my_background, + PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); + + /* Some suggestions as to how to get a screen gamma value */ + + /* Note that screen gamma is the display_exponent, which includes + * the CRT_exponent and any correction for viewing conditions */ + if (/* We have a user-defined screen gamma value */) + { + screen_gamma = user-defined screen_gamma; + } + /* This is one way that applications share the same screen gamma value */ + else if ((gamma_str = getenv("SCREEN_GAMMA")) != NULL) + { + screen_gamma = atof(gamma_str); + } + /* If we don't have another value */ + else + { + screen_gamma = 2.2; /* A good guess for a PC monitors in a dimly + lit room */ + screen_gamma = 1.7 or 1.0; /* A good guess for Mac systems */ + } + + /* Tell libpng to handle the gamma conversion for you. The final call + * is a good guess for PC generated images, but it should be configurable + * by the user at run time by the user. It is strongly suggested that + * your application support gamma correction. + */ + + int intent; + + if (png_get_sRGB(png_ptr, info_ptr, &intent)) + png_set_gamma(png_ptr, screen_gamma, 0.45455); + else + { + double image_gamma; + if (png_get_gAMA(png_ptr, info_ptr, &image_gamma)) + png_set_gamma(png_ptr, screen_gamma, image_gamma); + else + png_set_gamma(png_ptr, screen_gamma, 0.45455); + } + + /* Dither RGB files down to 8 bit palette or reduce palettes + * to the number of colors available on your screen. + */ + if (color_type & PNG_COLOR_MASK_COLOR) + { + int num_palette; + png_colorp palette; + + /* This reduces the image to the application supplied palette */ + if (/* we have our own palette */) + { + /* An array of colors to which the image should be dithered */ + png_color std_color_cube[MAX_SCREEN_COLORS]; + + png_set_dither(png_ptr, std_color_cube, MAX_SCREEN_COLORS, + MAX_SCREEN_COLORS, png_uint_16p_NULL, 0); + } + /* This reduces the image to the palette supplied in the file */ + else if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette)) + { + png_uint_16p histogram = NULL; + + png_get_hIST(png_ptr, info_ptr, &histogram); + + png_set_dither(png_ptr, palette, num_palette, + max_screen_colors, histogram, 0); + } + } + + /* invert monochrome files to have 0 as white and 1 as black */ + png_set_invert_mono(png_ptr); + + /* If you want to shift the pixel values from the range [0,255] or + * [0,65535] to the original [0,7] or [0,31], or whatever range the + * colors were originally in: + */ + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_sBIT)) + { + png_color_8p sig_bit; + + png_get_sBIT(png_ptr, info_ptr, &sig_bit); + png_set_shift(png_ptr, sig_bit); + } + + /* flip the RGB pixels to BGR (or RGBA to BGRA) */ + if (color_type & PNG_COLOR_MASK_COLOR) + png_set_bgr(png_ptr); + + /* swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */ + png_set_swap_alpha(png_ptr); + + /* swap bytes of 16 bit files to least significant byte first */ + png_set_swap(png_ptr); + + /* Add filler (or alpha) byte (before/after each RGB triplet) */ + png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER); + + /* Turn on interlace handling. REQUIRED if you are not using + * png_read_image(). To see how to handle interlacing passes, + * see the png_read_row() method below: + */ + number_passes = png_set_interlace_handling(png_ptr); + + /* Optional call to gamma correct and add the background to the palette + * and update info structure. REQUIRED if you are expecting libpng to + * update the palette for you (ie you selected such a transform above). + */ + png_read_update_info(png_ptr, info_ptr); + + /* Allocate the memory to hold the image using the fields of info_ptr. */ + + /* The easiest way to read the image: */ + png_bytep row_pointers[height]; + + for (row = 0; row < height; row++) + { + row_pointers[row] = png_malloc(png_ptr, png_get_rowbytes(png_ptr, + info_ptr)); + } + + /* Now it's time to read the image. One of these methods is REQUIRED */ +#ifdef entire /* Read the entire image in one go */ + png_read_image(png_ptr, row_pointers); + +#else no_entire /* Read the image one or more scanlines at a time */ + /* The other way to read images - deal with interlacing: */ + + for (pass = 0; pass < number_passes; pass++) + { +#ifdef single /* Read the image a single row at a time */ + for (y = 0; y < height; y++) + { + png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL, 1); + } + +#else no_single /* Read the image several rows at a time */ + for (y = 0; y < height; y += number_of_rows) + { +#ifdef sparkle /* Read the image using the "sparkle" effect. */ + png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL, + number_of_rows); +#else no_sparkle /* Read the image using the "rectangle" effect */ + png_read_rows(png_ptr, png_bytepp_NULL, &row_pointers[y], + number_of_rows); +#endif no_sparkle /* use only one of these two methods */ + } + + /* if you want to display the image after every pass, do + so here */ +#endif no_single /* use only one of these two methods */ + } +#endif no_entire /* use only one of these two methods */ + + /* read rest of file, and get additional chunks in info_ptr - REQUIRED */ + png_read_end(png_ptr, info_ptr); +#endif hilevel + + /* At this point you have read the entire image */ + + /* clean up after the read, and free any memory allocated - REQUIRED */ + png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); + + /* close the file */ + fclose(fp); + + /* that's it */ + return (OK); +} + +/* progressively read a file */ + +int +initialize_png_reader(png_structp *png_ptr, png_infop *info_ptr) +{ + /* Create and initialize the png_struct with the desired error handler + * functions. If you want to use the default stderr and longjump method, + * you can supply NULL for the last three parameters. We also check that + * the library version is compatible in case we are using dynamically + * linked libraries. + */ + *png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, + png_voidp user_error_ptr, user_error_fn, user_warning_fn); + + if (*png_ptr == NULL) + { + *info_ptr = NULL; + return (ERROR); + } + + *info_ptr = png_create_info_struct(png_ptr); + + if (*info_ptr == NULL) + { + png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL); + return (ERROR); + } + + if (setjmp(png_jmpbuf((*png_ptr)))) + { + png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL); + return (ERROR); + } + + /* This one's new. You will need to provide all three + * function callbacks, even if you aren't using them all. + * If you aren't using all functions, you can specify NULL + * parameters. Even when all three functions are NULL, + * you need to call png_set_progressive_read_fn(). + * These functions shouldn't be dependent on global or + * static variables if you are decoding several images + * simultaneously. You should store stream specific data + * in a separate struct, given as the second parameter, + * and retrieve the pointer from inside the callbacks using + * the function png_get_progressive_ptr(png_ptr). + */ + png_set_progressive_read_fn(*png_ptr, (void *)stream_data, + info_callback, row_callback, end_callback); + + return (OK); +} + +int +process_data(png_structp *png_ptr, png_infop *info_ptr, + png_bytep buffer, png_uint_32 length) +{ + if (setjmp(png_jmpbuf((*png_ptr)))) + { + /* Free the png_ptr and info_ptr memory on error */ + png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL); + return (ERROR); + } + + /* This one's new also. Simply give it chunks of data as + * they arrive from the data stream (in order, of course). + * On Segmented machines, don't give it any more than 64K. + * The library seems to run fine with sizes of 4K, although + * you can give it much less if necessary (I assume you can + * give it chunks of 1 byte, but I haven't tried with less + * than 256 bytes yet). When this function returns, you may + * want to display any rows that were generated in the row + * callback, if you aren't already displaying them there. + */ + png_process_data(*png_ptr, *info_ptr, buffer, length); + return (OK); +} + +info_callback(png_structp png_ptr, png_infop info) +{ +/* do any setup here, including setting any of the transformations + * mentioned in the Reading PNG files section. For now, you _must_ + * call either png_start_read_image() or png_read_update_info() + * after all the transformations are set (even if you don't set + * any). You may start getting rows before png_process_data() + * returns, so this is your last chance to prepare for that. + */ +} + +row_callback(png_structp png_ptr, png_bytep new_row, + png_uint_32 row_num, int pass) +{ +/* + * This function is called for every row in the image. If the + * image is interlaced, and you turned on the interlace handler, + * this function will be called for every row in every pass. + * + * In this function you will receive a pointer to new row data from + * libpng called new_row that is to replace a corresponding row (of + * the same data format) in a buffer allocated by your application. + * + * The new row data pointer new_row may be NULL, indicating there is + * no new data to be replaced (in cases of interlace loading). + * + * If new_row is not NULL then you need to call + * png_progressive_combine_row() to replace the corresponding row as + * shown below: + */ + /* Check if row_num is in bounds. */ + if((row_num >= 0) && (row_num < height)) + { + /* Get pointer to corresponding row in our + * PNG read buffer. + */ + png_bytep old_row = ((png_bytep *)our_data)[row_num]; + + /* If both rows are allocated then copy the new row + * data to the corresponding row data. + */ + if((old_row != NULL) && (new_row != NULL)) + png_progressive_combine_row(png_ptr, old_row, new_row); + } +/* + * The rows and passes are called in order, so you don't really + * need the row_num and pass, but I'm supplying them because it + * may make your life easier. + * + * For the non-NULL rows of interlaced images, you must call + * png_progressive_combine_row() passing in the new row and the + * old row, as demonstrated above. You can call this function for + * NULL rows (it will just return) and for non-interlaced images + * (it just does the png_memcpy for you) if it will make the code + * easier. Thus, you can just do this for all cases: + */ + + png_progressive_combine_row(png_ptr, old_row, new_row); + +/* where old_row is what was displayed for previous rows. Note + * that the first pass (pass == 0 really) will completely cover + * the old row, so the rows do not have to be initialized. After + * the first pass (and only for interlaced images), you will have + * to pass the current row as new_row, and the function will combine + * the old row and the new row. + */ +} + +end_callback(png_structp png_ptr, png_infop info) +{ +/* this function is called when the whole image has been read, + * including any chunks after the image (up to and including + * the IEND). You will usually have the same info chunk as you + * had in the header, although some data may have been added + * to the comments and time fields. + * + * Most people won't do much here, perhaps setting a flag that + * marks the image as finished. + */ +} + +/* write a png file */ +void write_png(char *file_name /* , ... other image information ... */) +{ + FILE *fp; + png_structp png_ptr; + png_infop info_ptr; + png_colorp palette; + + /* open the file */ + fp = fopen(file_name, "wb"); + if (fp == NULL) + return (ERROR); + + /* Create and initialize the png_struct with the desired error handler + * functions. If you want to use the default stderr and longjump method, + * you can supply NULL for the last three parameters. We also check that + * the library version is compatible with the one used at compile time, + * in case we are using dynamically linked libraries. REQUIRED. + */ + png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, + png_voidp user_error_ptr, user_error_fn, user_warning_fn); + + if (png_ptr == NULL) + { + fclose(fp); + return (ERROR); + } + + /* Allocate/initialize the image information data. REQUIRED */ + info_ptr = png_create_info_struct(png_ptr); + if (info_ptr == NULL) + { + fclose(fp); + png_destroy_write_struct(&png_ptr, png_infopp_NULL); + return (ERROR); + } + + /* Set error handling. REQUIRED if you aren't supplying your own + * error handling functions in the png_create_write_struct() call. + */ + if (setjmp(png_jmpbuf(png_ptr))) + { + /* If we get here, we had a problem reading the file */ + fclose(fp); + png_destroy_write_struct(&png_ptr, &info_ptr); + return (ERROR); + } + + /* One of the following I/O initialization functions is REQUIRED */ +#ifdef streams /* I/O initialization method 1 */ + /* set up the output control if you are using standard C streams */ + png_init_io(png_ptr, fp); +#else no_streams /* I/O initialization method 2 */ + /* If you are using replacement read functions, instead of calling + * png_init_io() here you would call */ + png_set_write_fn(png_ptr, (void *)user_io_ptr, user_write_fn, + user_IO_flush_function); + /* where user_io_ptr is a structure you want available to the callbacks */ +#endif no_streams /* only use one initialization method */ + +#ifdef hilevel + /* This is the easy way. Use it if you already have all the + * image info living info in the structure. You could "|" many + * PNG_TRANSFORM flags into the png_transforms integer here. + */ + png_write_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL); +#else + /* This is the hard way */ + + /* Set the image information here. Width and height are up to 2^31, + * bit_depth is one of 1, 2, 4, 8, or 16, but valid values also depend on + * the color_type selected. color_type is one of PNG_COLOR_TYPE_GRAY, + * PNG_COLOR_TYPE_GRAY_ALPHA, PNG_COLOR_TYPE_PALETTE, PNG_COLOR_TYPE_RGB, + * or PNG_COLOR_TYPE_RGB_ALPHA. interlace is either PNG_INTERLACE_NONE or + * PNG_INTERLACE_ADAM7, and the compression_type and filter_type MUST + * currently be PNG_COMPRESSION_TYPE_BASE and PNG_FILTER_TYPE_BASE. REQUIRED + */ + png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, PNG_COLOR_TYPE_???, + PNG_INTERLACE_????, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); + + /* set the palette if there is one. REQUIRED for indexed-color images */ + palette = (png_colorp)png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH + * sizeof (png_color)); + /* ... set palette colors ... */ + png_set_PLTE(png_ptr, info_ptr, palette, PNG_MAX_PALETTE_LENGTH); + /* You must not free palette here, because png_set_PLTE only makes a link to + the palette that you malloced. Wait until you are about to destroy + the png structure. */ + + /* optional significant bit chunk */ + /* if we are dealing with a grayscale image then */ + sig_bit.gray = true_bit_depth; + /* otherwise, if we are dealing with a color image then */ + sig_bit.red = true_red_bit_depth; + sig_bit.green = true_green_bit_depth; + sig_bit.blue = true_blue_bit_depth; + /* if the image has an alpha channel then */ + sig_bit.alpha = true_alpha_bit_depth; + png_set_sBIT(png_ptr, info_ptr, sig_bit); + + + /* Optional gamma chunk is strongly suggested if you have any guess + * as to the correct gamma of the image. + */ + png_set_gAMA(png_ptr, info_ptr, gamma); + + /* Optionally write comments into the image */ + text_ptr[0].key = "Title"; + text_ptr[0].text = "Mona Lisa"; + text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE; + text_ptr[1].key = "Author"; + text_ptr[1].text = "Leonardo DaVinci"; + text_ptr[1].compression = PNG_TEXT_COMPRESSION_NONE; + text_ptr[2].key = "Description"; + text_ptr[2].text = ""; + text_ptr[2].compression = PNG_TEXT_COMPRESSION_zTXt; +#ifdef PNG_iTXt_SUPPORTED + text_ptr[0].lang = NULL; + text_ptr[1].lang = NULL; + text_ptr[2].lang = NULL; +#endif + png_set_text(png_ptr, info_ptr, text_ptr, 3); + + /* other optional chunks like cHRM, bKGD, tRNS, tIME, oFFs, pHYs, */ + /* note that if sRGB is present the gAMA and cHRM chunks must be ignored + * on read and must be written in accordance with the sRGB profile */ + + /* Write the file header information. REQUIRED */ + png_write_info(png_ptr, info_ptr); + + /* If you want, you can write the info in two steps, in case you need to + * write your private chunk ahead of PLTE: + * + * png_write_info_before_PLTE(write_ptr, write_info_ptr); + * write_my_chunk(); + * png_write_info(png_ptr, info_ptr); + * + * However, given the level of known- and unknown-chunk support in 1.1.0 + * and up, this should no longer be necessary. + */ + + /* Once we write out the header, the compression type on the text + * chunks gets changed to PNG_TEXT_COMPRESSION_NONE_WR or + * PNG_TEXT_COMPRESSION_zTXt_WR, so it doesn't get written out again + * at the end. + */ + + /* set up the transformations you want. Note that these are + * all optional. Only call them if you want them. + */ + + /* invert monochrome pixels */ + png_set_invert_mono(png_ptr); + + /* Shift the pixels up to a legal bit depth and fill in + * as appropriate to correctly scale the image. + */ + png_set_shift(png_ptr, &sig_bit); + + /* pack pixels into bytes */ + png_set_packing(png_ptr); + + /* swap location of alpha bytes from ARGB to RGBA */ + png_set_swap_alpha(png_ptr); + + /* Get rid of filler (OR ALPHA) bytes, pack XRGB/RGBX/ARGB/RGBA into + * RGB (4 channels -> 3 channels). The second parameter is not used. + */ + png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); + + /* flip BGR pixels to RGB */ + png_set_bgr(png_ptr); + + /* swap bytes of 16-bit files to most significant byte first */ + png_set_swap(png_ptr); + + /* swap bits of 1, 2, 4 bit packed pixel formats */ + png_set_packswap(png_ptr); + + /* turn on interlace handling if you are not using png_write_image() */ + if (interlacing) + number_passes = png_set_interlace_handling(png_ptr); + else + number_passes = 1; + + /* The easiest way to write the image (you may have a different memory + * layout, however, so choose what fits your needs best). You need to + * use the first method if you aren't handling interlacing yourself. + */ + png_uint_32 k, height, width; + png_byte image[height][width*bytes_per_pixel]; + png_bytep row_pointers[height]; + for (k = 0; k < height; k++) + row_pointers[k] = image + k*width*bytes_per_pixel; + + /* One of the following output methods is REQUIRED */ +#ifdef entire /* write out the entire image data in one call */ + png_write_image(png_ptr, row_pointers); + + /* the other way to write the image - deal with interlacing */ + +#else no_entire /* write out the image data by one or more scanlines */ + /* The number of passes is either 1 for non-interlaced images, + * or 7 for interlaced images. + */ + for (pass = 0; pass < number_passes; pass++) + { + /* Write a few rows at a time. */ + png_write_rows(png_ptr, &row_pointers[first_row], number_of_rows); + + /* If you are only writing one row at a time, this works */ + for (y = 0; y < height; y++) + { + png_write_rows(png_ptr, &row_pointers[y], 1); + } + } +#endif no_entire /* use only one output method */ + + /* You can write optional chunks like tEXt, zTXt, and tIME at the end + * as well. Shouldn't be necessary in 1.1.0 and up as all the public + * chunks are supported and you can use png_set_unknown_chunks() to + * register unknown chunks into the info structure to be written out. + */ + + /* It is REQUIRED to call this to finish writing the rest of the file */ + png_write_end(png_ptr, info_ptr); +#endif hilevel + + /* If you png_malloced a palette, free it here (don't free info_ptr->palette, + as recommended in versions 1.0.5m and earlier of this example; if + libpng mallocs info_ptr->palette, libpng will free it). If you + allocated it with malloc() instead of png_malloc(), use free() instead + of png_free(). */ + png_free(png_ptr, palette); + palette=NULL; + + /* Similarly, if you png_malloced any data that you passed in with + png_set_something(), such as a hist or trans array, free it here, + when you can be sure that libpng is through with it. */ + png_free(png_ptr, trans); + trans=NULL; + + /* clean up after the write, and free any memory allocated */ + png_destroy_write_struct(&png_ptr, &info_ptr); + + /* close the file */ + fclose(fp); + + /* that's it */ + return (OK); +} + +#endif /* if 0 */ diff --git a/gtkmm-osx/libpng-1.2.5/libpng-config b/gtkmm-osx/libpng-1.2.5/libpng-config new file mode 100755 index 0000000..04ec9a7 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/libpng-config @@ -0,0 +1,121 @@ +#! /bin/sh + +# libpng-config +# provides configuration info for libpng. + +# Copyright (C) 2002 Glenn Randers-Pehrson +# For conditions of distribution and use, see copyright notice in png.h + +# Modeled after libxml-config. + +version=1.2.5 +prefix="" +libdir="" +libs="" +I_opts="" +L_opts="" +R_opts="" +cppflags="" +ccopts="" +ldopts="" + +prefix="/Users/darco/Projects/GTK/output" +I_opts="-I/Users/darco/Projects/GTK/output/include/libpng12" +L_opts="-L/Users/darco/Projects/GTK/output/lib" +libs="-lpng12 -lz" + +usage() +{ + cat <\fP + +\fI\fB + +\fBpng_uint_32 png_access_version_number \fI(void\fP\fB);\fP + +\fI\fB + +\fBint png_check_sig (png_bytep \fP\fIsig\fP\fB, int \fInum\fP\fB);\fP + +\fI\fB + +\fBvoid png_chunk_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP + +\fI\fB + +\fBvoid png_chunk_warning (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fImessage\fP\fB);\fP + +\fI\fB + +\fBvoid png_convert_from_struct_tm (png_timep \fP\fIptime\fP\fB, struct tm FAR * \fIttime\fP\fB);\fP + +\fI\fB + +\fBvoid png_convert_from_time_t (png_timep \fP\fIptime\fP\fB, time_t \fIttime\fP\fB);\fP + +\fI\fB + +\fBpng_charp png_convert_to_rfc1123 (png_structp \fP\fIpng_ptr\fP\fB, png_timep \fIptime\fP\fB);\fP + +\fI\fB + +\fBpng_infop png_create_info_struct (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_structp png_create_read_struct (png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarn_fn\fP\fB);\fP + +\fI\fB + +\fBpng_structp png_create_read_struct_2(png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP + +\fI\fB + +\fBpng_structp png_create_write_struct (png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarn_fn\fP\fB);\fP + +\fI\fB + +\fBpng_structp png_create_write_struct_2(png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP + +\fI\fB + +\fBint png_debug(int \fP\fIlevel\fP\fB, png_const_charp \fImessage\fP\fB);\fP + +\fI\fB + +\fBint png_debug1(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fIp1\fP\fB);\fP + +\fI\fB + +\fBint png_debug2(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fP\fIp1\fP\fB, \fIp2\fP\fB);\fP + +\fI\fB + +\fBvoid png_destroy_info_struct (png_structp \fP\fIpng_ptr\fP\fB, png_infopp \fIinfo_ptr_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_destroy_read_struct (png_structpp \fP\fIpng_ptr_ptr\fP\fB, png_infopp \fP\fIinfo_ptr_ptr\fP\fB, png_infopp \fIend_info_ptr_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_destroy_write_struct (png_structpp \fP\fIpng_ptr_ptr\fP\fB, png_infopp \fIinfo_ptr_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP + +\fI\fB + +\fBvoid png_free (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fIptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_free_chunk_list (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_free_default(png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fIptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_free_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fInum\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_asm_flags (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_byte png_get_bit_depth (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_16p \fI*background\fP\fB);\fP + +\fI\fB + +\fBpng_byte png_get_channels (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fP\fI*white_x\fP\fB, double \fP\fI*white_y\fP\fB, double \fP\fI*red_x\fP\fB, double \fP\fI*red_y\fP\fB, double \fP\fI*green_x\fP\fB, double \fP\fI*green_y\fP\fB, double \fP\fI*blue_x\fP\fB, double \fI*blue_y\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*white_x\fP\fB, png_uint_32 \fP\fI*white_y\fP\fB, png_uint_32 \fP\fI*red_x\fP\fB, png_uint_32 \fP\fI*red_y\fP\fB, png_uint_32 \fP\fI*green_x\fP\fB, png_uint_32 \fP\fI*green_y\fP\fB, png_uint_32 \fP\fI*blue_x\fP\fB, png_uint_32 \fI*blue_y\fP\fB);\fP + +\fI\fB + +\fBpng_byte png_get_color_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_byte png_get_compression_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_byte png_get_copyright (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_voidp png_get_error_ptr (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_byte png_get_filter_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_gAMA (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fI*file_gamma\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_gAMA_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fI*int_file_gamma\fP\fB);\fP + +\fI\fB + +\fBpng_byte png_get_header_ver (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_byte png_get_header_version (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fI*hist\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charpp \fP\fIname\fP\fB, int \fP\fI*compression_type\fP\fB, png_charpp \fP\fIprofile\fP\fB, png_uint_32 \fI*proflen\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*width\fP\fB, png_uint_32 \fP\fI*height\fP\fB, int \fP\fI*bit_depth\fP\fB, int \fP\fI*color_type\fP\fB, int \fP\fI*interlace_type\fP\fB, int \fP\fI*compression_type\fP\fB, int \fI*filter_type\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_image_height (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_image_width (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_byte png_get_interlace_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_voidp png_get_io_ptr (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_byte png_get_libpng_ver (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_voidp png_get_mem_ptr(png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_byte png_get_mmx_bitdepth_threshold (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_mmx_flagmask (int \fP\fIflag_select\fP\fB, int \fI*compilerID\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_mmx_rowbytes_threshold (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*offset_x\fP\fB, png_uint_32 \fP\fI*offset_y\fP\fB, int \fI*unit_type\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fI*purpose\fP\fB, png_int_32 \fP\fI*X0\fP\fB, png_int_32 \fP\fI*X1\fP\fB, int \fP\fI*type\fP\fB, int \fP\fI*nparams\fP\fB, png_charp \fP\fI*units\fP\fB, png_charpp \fI*params\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*res_x\fP\fB, png_uint_32 \fP\fI*res_y\fP\fB, int \fI*unit_type\fP\fB);\fP + +\fI\fB + +\fBfloat png_get_pixel_aspect_ratio (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_pixels_per_meter (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_voidp png_get_progressive_ptr (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_colorp \fP\fI*palette\fP\fB, int \fI*num_palette\fP\fB);\fP + +\fI\fB + +\fBpng_byte png_get_rgb_to_gray_status (png_structp \fIpng_ptr) + +\fBpng_uint_32 png_get_rowbytes (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_bytepp png_get_rows (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_8p \fI*sig_bit\fP\fB);\fP + +\fI\fB + +\fBpng_bytep png_get_signature (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_spalette_p \fI*splt_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fI*intent\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_text (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fI*text_ptr\fP\fB, int \fI*num_text\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_timep \fI*mod_time\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fI*trans\fP\fB, int \fP\fI*num_trans\fP\fB, png_color_16p \fI*trans_values\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_unknown_chunkpp \fIunknowns\fP\fB);\fP + +\fI\fB + +\fBpng_voidp png_get_user_chunk_ptr (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_voidp png_get_user_transform_ptr (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_valid (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIflag\fP\fB);\fP + +\fI\fB + +\fBpng_int_32 png_get_x_offset_microns (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_int_32 png_get_x_offset_pixels (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_x_pixels_per_meter (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_int_32 png_get_y_offset_microns (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_int_32 png_get_y_offset_pixels (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_y_pixels_per_meter (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_compression_buffer_size (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBint png_handle_as_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP + +\fI\fB + +\fBvoid png_init_io (png_structp \fP\fIpng_ptr\fP\fB, FILE \fI*fp\fP\fB);\fP + +\fI\fB + +\fBDEPRECATED: void png_info_init (png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBDEPRECATED: void png_info_init_2 (png_infopp \fP\fIptr_ptr\fP\fB, png_size_t \fIpng_info_struct_size\fP\fB);\fP + +\fI\fB + +\fBpng_voidp png_malloc (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP + +\fI\fB + +\fBpng_voidp png_malloc_default(png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP + +\fI\fB + +\fBpng_voidp png_malloc_warn (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP + +\fI\fB + +\fBvoidp png_memcpy (png_voidp \fP\fIs1\fP\fB, png_voidp \fP\fIs2\fP\fB, png_size_t \fIsize\fP\fB);\fP + +\fI\fB + +\fBpng_voidp png_memcpy_check (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIs1\fP\fB, png_voidp \fP\fIs2\fP\fB, png_uint_32 \fIsize\fP\fB);\fP + +\fI\fB + +\fBvoidp png_memset (png_voidp \fP\fIs1\fP\fB, int \fP\fIvalue\fP\fB, png_size_t \fIsize\fP\fB);\fP + +\fI\fB + +\fBpng_voidp png_memset_check (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIs1\fP\fB, int \fP\fIvalue\fP\fB, png_uint_32 \fIsize\fP\fB);\fP + +\fI\fB + +\fBint png_mmx_support \fI(void\fP\fB);\fP + +\fI\fB + +\fBDEPRECATED: void png_permit_empty_plte (png_structp \fP\fIpng_ptr\fP\fB, int \fIempty_plte_permitted\fP\fB);\fP + +\fI\fB + +\fBvoid png_process_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_size\fP\fB);\fP + +\fI\fB + +\fBvoid png_progressive_combine_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIold_row\fP\fB, png_bytep \fInew_row\fP\fB);\fP + +\fI\fB + +\fBvoid png_read_destroy (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_infop \fIend_info_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_read_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_read_image (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fIimage\fP\fB);\fP + +\fI\fB + +\fBDEPRECATED: void png_read_init (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBDEPRECATED: void png_read_init_2 (png_structpp \fP\fIptr_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP + +\fI\fB + +\fBvoid png_read_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_read_png (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fItransforms\fP\fB, png_voidp \fIparams\fP\fB);\fP + +\fI\fB + +\fBvoid png_read_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fIdisplay_row\fP\fB);\fP + +\fI\fB + +\fBvoid png_read_rows (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fP\fIrow\fP\fB, png_bytepp \fP\fIdisplay_row\fP\fB, png_uint_32 \fInum_rows\fP\fB);\fP + +\fI\fB + +\fBvoid png_read_update_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_set_asm_flags (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIasm_flags\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_background (png_structp \fP\fIpng_ptr\fP\fB, png_color_16p \fP\fIbackground_color\fP\fB, int \fP\fIbackground_gamma_code\fP\fB, int \fP\fIneed_expand\fP\fB, double \fIbackground_gamma\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_bgr (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_16p \fIbackground\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fP\fIwhite_x\fP\fB, double \fP\fIwhite_y\fP\fB, double \fP\fIred_x\fP\fB, double \fP\fIred_y\fP\fB, double \fP\fIgreen_x\fP\fB, double \fP\fIgreen_y\fP\fB, double \fP\fIblue_x\fP\fB, double \fIblue_y\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIwhite_x\fP\fB, png_uint_32 \fP\fIwhite_y\fP\fB, png_uint_32 \fP\fIred_x\fP\fB, png_uint_32 \fP\fIred_y\fP\fB, png_uint_32 \fP\fIgreen_x\fP\fB, png_uint_32 \fP\fIgreen_y\fP\fB, png_uint_32 \fP\fIblue_x\fP\fB, png_uint_32 \fIblue_y\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_compression_level (png_structp \fP\fIpng_ptr\fP\fB, int \fIlevel\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_compression_mem_level (png_structp \fP\fIpng_ptr\fP\fB, int \fImem_level\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_compression_method (png_structp \fP\fIpng_ptr\fP\fB, int \fImethod\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_compression_strategy (png_structp \fP\fIpng_ptr\fP\fB, int \fIstrategy\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_compression_window_bits (png_structp \fP\fIpng_ptr\fP\fB, int \fIwindow_bits\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_crc_action (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcrit_action\fP\fB, int \fIancil_action\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_dither (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fP\fInum_palette\fP\fB, int \fP\fImaximum_colors\fP\fB, png_uint_16p \fP\fIhistogram\fP\fB, int \fIfull_dither\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_error_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarning_fn\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_expand (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_filler (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, int \fIflags\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_filter (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fImethod\fP\fB, int \fIfilters\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_filter_heuristics (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIheuristic_method\fP\fB, int \fP\fInum_weights\fP\fB, png_doublep \fP\fIfilter_weights\fP\fB, png_doublep \fIfilter_costs\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_flush (png_structp \fP\fIpng_ptr\fP\fB, int \fInrows\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_gamma (png_structp \fP\fIpng_ptr\fP\fB, double \fP\fIscreen_gamma\fP\fB, double \fIdefault_file_gamma\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_gAMA (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fIfile_gamma\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_gAMA_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIfile_gamma\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_gray_1_2_4_to_8(png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_gray_to_rgb (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fIhist\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fIname\fP\fB, int \fP\fIcompression_type\fP\fB, png_charp \fP\fIprofile\fP\fB, png_uint_32 \fIproflen\fP\fB);\fP + +\fI\fB + +\fBint png_set_interlace_handling (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_invalid (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fImask\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_invert_alpha (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_invert_mono (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIwidth\fP\fB, png_uint_32 \fP\fIheight\fP\fB, int \fP\fIbit_depth\fP\fB, int \fP\fIcolor_type\fP\fB, int \fP\fIinterlace_type\fP\fB, int \fP\fIcompression_type\fP\fB, int \fIfilter_type\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_keep_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIkeep\fP\fB, png_bytep \fP\fIchunk_list\fP\fB, int \fInum_chunks\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_mem_fn(png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP + +\fI\fB + +\fBpng_set_mmx_thresholds (png_structp \fP\fIpng_ptr\fP\fB, png_byte \fP\fImmx_bitdepth_threshold\fP\fB, png_uint_32 \fImmx_rowbytes_threshold\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIoffset_x\fP\fB, png_uint_32 \fP\fIoffset_y\fP\fB, int \fIunit_type\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_packing (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_packswap (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_palette_to_rgb(png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fIpurpose\fP\fB, png_int_32 \fP\fIX0\fP\fB, png_int_32 \fP\fIX1\fP\fB, int \fP\fItype\fP\fB, int \fP\fInparams\fP\fB, png_charp \fP\fIunits\fP\fB, png_charpp \fIparams\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIres_x\fP\fB, png_uint_32 \fP\fIres_y\fP\fB, int \fIunit_type\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_progressive_read_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIprogressive_ptr\fP\fB, png_progressive_info_ptr \fP\fIinfo_fn\fP\fB, png_progressive_row_ptr \fP\fIrow_fn\fP\fB, png_progressive_end_ptr \fIend_fn\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fInum_palette\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_read_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIio_ptr\fP\fB, png_rw_ptr \fIread_data_fn\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_read_status_fn (png_structp \fP\fIpng_ptr\fP\fB, png_read_status_ptr \fIread_row_fn\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_read_user_transform_fn (png_structp \fP\fIpng_ptr\fP\fB, png_user_transform_ptr \fIread_user_transform_fn\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_rgb_to_gray (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIerror_action\fP\fB, double \fP\fIred\fP\fB, double \fIgreen\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_rgb_to_gray_fixed (png_structp \fP\fIpng_ptr\fP\fB, int error_action png_fixed_point \fP\fIred\fP\fB, png_fixed_point \fIgreen\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_rows (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytepp \fIrow_pointers\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_8p \fIsig_bit\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fIunit\fP\fB, double \fP\fIwidth\fP\fB, double \fIheight\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_shift (png_structp \fP\fIpng_ptr\fP\fB, png_color_8p \fItrue_bits\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_sig_bytes (png_structp \fP\fIpng_ptr\fP\fB, int \fInum_bytes\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_spalette_p \fP\fIsplt_ptr\fP\fB, int \fInum_spalettes\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fIintent\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_sRGB_gAMA_and_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fIintent\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_strip_16 (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_strip_alpha (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_strip_error_numbers (png_structp \fIpng_ptr, + +\fBpng_uint_32 \fIstrip_mode\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_swap (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_swap_alpha (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_text (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fItext_ptr\fP\fB, int \fInum_text\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_timep \fImod_time\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fItrans\fP\fB, int \fP\fInum_trans\fP\fB, png_color_16p \fItrans_values\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_tRNS_to_alpha(png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_set_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_unknown_chunkp \fP\fIunknowns\fP\fB, int \fP\fInum\fP\fB, int \fIlocation\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_unknown_chunk_location(png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIchunk\fP\fB, int \fIlocation\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_read_user_chunk_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIuser_chunk_ptr\fP\fB, png_user_chunk_ptr \fIread_user_chunk_fn\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_user_transform_info (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIuser_transform_ptr\fP\fB, int \fP\fIuser_transform_depth\fP\fB, int \fIuser_transform_channels\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_write_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIio_ptr\fP\fB, png_rw_ptr \fP\fIwrite_data_fn\fP\fB, png_flush_ptr \fIoutput_flush_fn\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_write_status_fn (png_structp \fP\fIpng_ptr\fP\fB, png_write_status_ptr \fIwrite_row_fn\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_write_user_transform_fn (png_structp \fP\fIpng_ptr\fP\fB, png_user_transform_ptr \fIwrite_user_transform_fn\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_compression_buffer_size(png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP + +\fI\fB + +\fBint png_sig_cmp (png_bytep \fP\fIsig\fP\fB, png_size_t \fP\fIstart\fP\fB, png_size_t \fInum_to_check\fP\fB);\fP + +\fI\fB + +\fBvoid png_start_read_image (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_warning (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fImessage\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_chunk (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIchunk_name\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_chunk_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_chunk_end (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_chunk_start (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIchunk_name\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_destroy (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_flush (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_image (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fIimage\fP\fB);\fP + +\fI\fB + +\fBDEPRECATED: void png_write_init (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBDEPRECATED: void png_write_init_2 (png_structpp \fP\fIptr_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_info_before_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_png (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fItransforms\fP\fB, png_voidp \fIparams\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIrow\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_rows (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fP\fIrow\fP\fB, png_uint_32 \fInum_rows\fP\fB);\fP + +\fI\fB + +.SH DESCRIPTION +The +.I libpng +library supports encoding, decoding, and various manipulations of +the Portable Network Graphics (PNG) format image files. It uses the +.IR zlib(3) +compression library. +Following is a copy of the libpng.txt file that accompanies libpng. +.SH LIBPNG.TXT +libpng.txt - A description on how to use and modify libpng + + libpng version 1.2.5 - October 3, 2002 + Updated and distributed by Glenn Randers-Pehrson + + Copyright (c) 1998-2002 Glenn Randers-Pehrson + For conditions of distribution and use, see copyright + notice in png.h. + + based on: + + libpng 1.0 beta 6 version 0.96 May 28, 1997 + Updated and distributed by Andreas Dilger + Copyright (c) 1996, 1997 Andreas Dilger + + libpng 1.0 beta 2 - version 0.88 January 26, 1996 + For conditions of distribution and use, see copyright + notice in png.h. Copyright (c) 1995, 1996 Guy Eric + Schalnat, Group 42, Inc. + + Updated/rewritten per request in the libpng FAQ + Copyright (c) 1995, 1996 Frank J. T. Wojcik + December 18, 1995 & January 20, 1996 + +.SH I. Introduction + +This file describes how to use and modify the PNG reference library +(known as libpng) for your own use. There are five sections to this +file: introduction, structures, reading, writing, and modification and +configuration notes for various special platforms. In addition to this +file, example.c is a good starting point for using the library, as +it is heavily commented and should include everything most people +will need. We assume that libpng is already installed; see the +INSTALL file for instructions on how to install libpng. + +Libpng was written as a companion to the PNG specification, as a way +of reducing the amount of time and effort it takes to support the PNG +file format in application programs. + +The PNG-1.2 specification is available at +and at . + +The PNG-1.0 specification is available +as RFC 2083 and as a +W3C Recommendation . Some +additional chunks are described in the special-purpose public chunks +documents at . + +Other information +about PNG, and the latest version of libpng, can be found at the PNG home +page, +and at . + +Most users will not have to modify the library significantly; advanced +users may want to modify it more. All attempts were made to make it as +complete as possible, while keeping the code easy to understand. +Currently, this library only supports C. Support for other languages +is being considered. + +Libpng has been designed to handle multiple sessions at one time, +to be easily modifiable, to be portable to the vast majority of +machines (ANSI, K&R, 16-, 32-, and 64-bit) available, and to be easy +to use. The ultimate goal of libpng is to promote the acceptance of +the PNG file format in whatever way possible. While there is still +work to be done (see the TODO file), libpng should cover the +majority of the needs of its users. + +Libpng uses zlib for its compression and decompression of PNG files. +Further information about zlib, and the latest version of zlib, can +be found at the zlib home page, . +The zlib compression utility is a general purpose utility that is +useful for more than PNG files, and can be used without libpng. +See the documentation delivered with zlib for more details. +You can usually find the source files for the zlib utility wherever you +find the libpng source files. + +Libpng is thread safe, provided the threads are using different +instances of the structures. Each thread should have its own +png_struct and png_info instances, and thus its own image. +Libpng does not protect itself against two threads using the +same instance of a structure. Note: thread safety may be defeated +by use of some of the MMX assembler code in pnggccrd.c, which is only +compiled when the user defines PNG_THREAD_UNSAFE_OK. + + +.SH II. Structures + +There are two main structures that are important to libpng, png_struct +and png_info. The first, png_struct, is an internal structure that +will not, for the most part, be used by a user except as the first +variable passed to every libpng function call. + +The png_info structure is designed to provide information about the +PNG file. At one time, the fields of png_info were intended to be +directly accessible to the user. However, this tended to cause problems +with applications using dynamically loaded libraries, and as a result +a set of interface functions for png_info (the png_get_*() and png_set_*() +functions) was developed. The fields of png_info are still available for +older applications, but it is suggested that applications use the new +interfaces if at all possible. + +Applications that do make direct access to the members of png_struct (except +for png_ptr->jmpbuf) must be recompiled whenever the library is updated, +and applications that make direct access to the members of png_info must +be recompiled if they were compiled or loaded with libpng version 1.0.6, +in which the members were in a different order. In version 1.0.7, the +members of the png_info structure reverted to the old order, as they were +in versions 0.97c through 1.0.5. Starting with version 2.0.0, both +structures are going to be hidden, and the contents of the structures will +only be accessible through the png_get/png_set functions. + +The png.h header file is an invaluable reference for programming with libpng. +And while I'm on the topic, make sure you include the libpng header file: + +#include + +.SH III. Reading + +We'll now walk you through the possible functions to call when reading +in a PNG file sequentially, briefly explaining the syntax and purpose +of each one. See example.c and png.h for more detail. While +progressive reading is covered in the next section, you will still +need some of the functions discussed in this section to read a PNG +file. + +.SS Setup + +You will want to do the I/O initialization(*) before you get into libpng, +so if it doesn't work, you don't have much to undo. Of course, you +will also want to insure that you are, in fact, dealing with a PNG +file. Libpng provides a simple check to see if a file is a PNG file. +To use it, pass in the first 1 to 8 bytes of the file to the function +png_sig_cmp(), and it will return 0 if the bytes match the corresponding +bytes of the PNG signature, or nonzero otherwise. Of course, the more bytes +you pass in, the greater the accuracy of the prediction. + +If you are intending to keep the file pointer open for use in libpng, +you must ensure you don't read more than 8 bytes from the beginning +of the file, and you also have to make a call to png_set_sig_bytes_read() +with the number of bytes you read from the beginning. Libpng will +then only check the bytes (if any) that your program didn't read. + +(*): If you are not using the standard I/O functions, you will need +to replace them with custom functions. See the discussion under +Customizing libpng. + + + FILE *fp = fopen(file_name, "rb"); + if (!fp) + { + return (ERROR); + } + fread(header, 1, number, fp); + is_png = !png_sig_cmp(header, 0, number); + if (!is_png) + { + return (NOT_PNG); + } + + +Next, png_struct and png_info need to be allocated and initialized. In +order to ensure that the size of these structures is correct even with a +dynamically linked libpng, there are functions to initialize and +allocate the structures. We also pass the library version, optional +pointers to error handling functions, and a pointer to a data struct for +use by the error functions, if necessary (the pointer and functions can +be NULL if the default error handlers are to be used). See the section +on Changes to Libpng below regarding the old initialization functions. +The structure allocation functions quietly return NULL if they fail to +create the structure, so your application should check for that. + + png_structp png_ptr = png_create_read_struct + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn); + if (!png_ptr) + return (ERROR); + + png_infop info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) + { + png_destroy_read_struct(&png_ptr, + (png_infopp)NULL, (png_infopp)NULL); + return (ERROR); + } + + png_infop end_info = png_create_info_struct(png_ptr); + if (!end_info) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + return (ERROR); + } + +If you want to use your own memory allocation routines, +define PNG_USER_MEM_SUPPORTED and use +png_create_read_struct_2() instead of png_create_read_struct(): + + png_structp png_ptr = png_create_read_struct_2 + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn, (png_voidp) + user_mem_ptr, user_malloc_fn, user_free_fn); + +The error handling routines passed to png_create_read_struct() +and the memory alloc/free routines passed to png_create_struct_2() +are only necessary if you are not using the libpng supplied error +handling and memory alloc/free functions. + +When libpng encounters an error, it expects to longjmp back +to your routine. Therefore, you will need to call setjmp and pass +your png_jmpbuf(png_ptr). If you read the file from different +routines, you will need to update the jmpbuf field every time you enter +a new routine that will call a png_*() function. + +See your documentation of setjmp/longjmp for your compiler for more +information on setjmp/longjmp. See the discussion on libpng error +handling in the Customizing Libpng section below for more information +on the libpng error handling. If an error occurs, and libpng longjmp's +back to your setjmp, you will want to call png_destroy_read_struct() to +free any memory. + + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + &end_info); + fclose(fp); + return (ERROR); + } + +If you would rather avoid the complexity of setjmp/longjmp issues, +you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case +errors will result in a call to PNG_ABORT() which defaults to abort(). + +Now you need to set up the input code. The default for libpng is to +use the C function fread(). If you use this, you will need to pass a +valid FILE * in the function png_init_io(). Be sure that the file is +opened in binary mode. If you wish to handle reading data in another +way, you need not call the png_init_io() function, but you must then +implement the libpng I/O methods discussed in the Customizing Libpng +section below. + + png_init_io(png_ptr, fp); + +If you had previously opened the file and read any of the signature from +the beginning in order to see if this was a PNG file, you need to let +libpng know that there are some bytes missing from the start of the file. + + png_set_sig_bytes(png_ptr, number); + +.SS Setting up callback code + +You can set up a callback function to handle any unknown chunks in the +input stream. You must supply the function + + read_chunk_callback(png_ptr ptr, + png_unknown_chunkp chunk); + { + /* The unknown chunk structure contains your + chunk data: */ + png_byte name[5]; + png_byte *data; + png_size_t size; + /* Note that libpng has already taken care of + the CRC handling */ + + /* put your code here. Return one of the + following: */ + + return (-n); /* chunk had an error */ + return (0); /* did not recognize */ + return (n); /* success */ + } + +(You can give your function another name that you like instead of +"read_chunk_callback") + +To inform libpng about your function, use + + png_set_read_user_chunk_fn(png_ptr, user_chunk_ptr, + read_chunk_callback); + +This names not only the callback function, but also a user pointer that +you can retrieve with + + png_get_user_chunk_ptr(png_ptr); + +At this point, you can set up a callback function that will be +called after each row has been read, which you can use to control +a progress meter or the like. It's demonstrated in pngtest.c. +You must supply a function + + void read_row_callback(png_ptr ptr, png_uint_32 row, + int pass); + { + /* put your code here */ + } + +(You can give it another name that you like instead of "read_row_callback") + +To inform libpng about your function, use + + png_set_read_status_fn(png_ptr, read_row_callback); + +.SS Unknown-chunk handling + +Now you get to set the way the library processes unknown chunks in the +input PNG stream. Both known and unknown chunks will be read. Normal +behavior is that known chunks will be parsed into information in +various info_ptr members; unknown chunks will be discarded. To change +this, you can call: + + png_set_keep_unknown_chunks(png_ptr, info_ptr, keep, + chunk_list, num_chunks); + keep - 0: do not keep + 1: keep only if safe-to-copy + 2: keep even if unsafe-to-copy + chunk_list - list of chunks affected (a byte string, + five bytes per chunk, NULL or '\0' if + num_chunks is 0) + num_chunks - number of chunks affected; if 0, all + unknown chunks are affected + +Unknown chunks declared in this way will be saved as raw data onto a +list of png_unknown_chunk structures. If a chunk that is normally +known to libpng is named in the list, it will be handled as unknown, +according to the "keep" directive. If a chunk is named in successive +instances of png_set_keep_unknown_chunks(), the final instance will +take precedence. + +.SS The high-level read interface + +At this point there are two ways to proceed; through the high-level +read interface, or through a sequence of low-level read operations. +You can use the high-level interface if (a) you are willing to read +the entire image into memory, and (b) the input transformations +you want to do are limited to the following set: + + PNG_TRANSFORM_IDENTITY No transformation + PNG_TRANSFORM_STRIP_16 Strip 16-bit samples to + 8 bits + PNG_TRANSFORM_STRIP_ALPHA Discard the alpha channel + PNG_TRANSFORM_PACKING Expand 1, 2 and 4-bit + samples to bytes + PNG_TRANSFORM_PACKSWAP Change order of packed + pixels to LSB first + PNG_TRANSFORM_EXPAND Perform set_expand() + PNG_TRANSFORM_INVERT_MONO Invert monochrome images + PNG_TRANSFORM_SHIFT Normalize pixels to the + sBIT depth + PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA + to BGRA + PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA + to AG + PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity + to transparency + PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples + +(This excludes setting a background color, doing gamma transformation, +dithering, and setting filler.) If this is the case, simply do this: + + png_read_png(png_ptr, info_ptr, png_transforms, NULL) + +where png_transforms is an integer containing the logical OR of +some set of transformation flags. This call is equivalent to png_read_info(), +followed the set of transformations indicated by the transform mask, +then png_read_image(), and finally png_read_end(). + +(The final parameter of this call is not yet used. Someday it might point +to transformation parameters required by some future input transform.) + +After you have called png_read_png(), you can retrieve the image data +with + + row_pointers = png_get_rows(png_ptr, info_ptr); + +where row_pointers is an array of pointers to the pixel data for each row: + + png_bytep row_pointers[height]; + +If you know your image size and pixel size ahead of time, you can allocate +row_pointers prior to calling png_read_png() with + + row_pointers = png_malloc(png_ptr, + height*sizeof(png_bytep)); + for (int i=0; i) and +png_get_(png_ptr, info_ptr, ...) functions return non-zero if the +data has been read, or zero if it is missing. The parameters to the +png_get_ are set directly if they are simple data types, or a pointer +into the info_ptr is returned for any complex types. + + png_get_PLTE(png_ptr, info_ptr, &palette, + &num_palette); + palette - the palette for the file + (array of png_color) + num_palette - number of entries in the palette + + png_get_gAMA(png_ptr, info_ptr, &gamma); + gamma - the gamma the file is written + at (PNG_INFO_gAMA) + + png_get_sRGB(png_ptr, info_ptr, &srgb_intent); + srgb_intent - the rendering intent (PNG_INFO_sRGB) + The presence of the sRGB chunk + means that the pixel data is in the + sRGB color space. This chunk also + implies specific values of gAMA and + cHRM. + + png_get_iCCP(png_ptr, info_ptr, &name, + &compression_type, &profile, &proflen); + name - The profile name. + compression - The compression type; always + PNG_COMPRESSION_TYPE_BASE for PNG 1.0. + You may give NULL to this argument to + ignore it. + profile - International Color Consortium color + profile data. May contain NULs. + proflen - length of profile data in bytes. + + png_get_sBIT(png_ptr, info_ptr, &sig_bit); + sig_bit - the number of significant bits for + (PNG_INFO_sBIT) each of the gray, + red, green, and blue channels, + whichever are appropriate for the + given color type (png_color_16) + + png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, + &trans_values); + trans - array of transparent entries for + palette (PNG_INFO_tRNS) + trans_values - graylevel or color sample values of + the single transparent color for + non-paletted images (PNG_INFO_tRNS) + num_trans - number of transparent entries + (PNG_INFO_tRNS) + + png_get_hIST(png_ptr, info_ptr, &hist); + (PNG_INFO_hIST) + hist - histogram of palette (array of + png_uint_16) + + png_get_tIME(png_ptr, info_ptr, &mod_time); + mod_time - time image was last modified + (PNG_VALID_tIME) + + png_get_bKGD(png_ptr, info_ptr, &background); + background - background color (PNG_VALID_bKGD) + valid 16-bit red, green and blue + values, regardless of color_type + + num_comments = png_get_text(png_ptr, info_ptr, + &text_ptr, &num_text); + num_comments - number of comments + text_ptr - array of png_text holding image + comments + text_ptr[i].compression - type of compression used + on "text" PNG_TEXT_COMPRESSION_NONE + PNG_TEXT_COMPRESSION_zTXt + PNG_ITXT_COMPRESSION_NONE + PNG_ITXT_COMPRESSION_zTXt + text_ptr[i].key - keyword for comment. Must contain + 1-79 characters. + text_ptr[i].text - text comments for current + keyword. Can be empty. + text_ptr[i].text_length - length of text string, + after decompression, 0 for iTXt + text_ptr[i].itxt_length - length of itxt string, + after decompression, 0 for tEXt/zTXt + text_ptr[i].lang - language of comment (empty + string for unknown). + text_ptr[i].lang_key - keyword in UTF-8 + (empty string for unknown). + num_text - number of comments (same as + num_comments; you can put NULL here + to avoid the duplication) + Note while png_set_text() will accept text, language, + and translated keywords that can be NULL pointers, the + structure returned by png_get_text will always contain + regular zero-terminated C strings. They might be + empty strings but they will never be NULL pointers. + + num_spalettes = png_get_sPLT(png_ptr, info_ptr, + &palette_ptr); + palette_ptr - array of palette structures holding + contents of one or more sPLT chunks + read. + num_spalettes - number of sPLT chunks read. + + png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y, + &unit_type); + offset_x - positive offset from the left edge + of the screen + offset_y - positive offset from the top edge + of the screen + unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER + + png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y, + &unit_type); + res_x - pixels/unit physical resolution in + x direction + res_y - pixels/unit physical resolution in + x direction + unit_type - PNG_RESOLUTION_UNKNOWN, + PNG_RESOLUTION_METER + + png_get_sCAL(png_ptr, info_ptr, &unit, &width, + &height) + unit - physical scale units (an integer) + width - width of a pixel in physical scale units + height - height of a pixel in physical scale units + (width and height are doubles) + + png_get_sCAL_s(png_ptr, info_ptr, &unit, &width, + &height) + unit - physical scale units (an integer) + width - width of a pixel in physical scale units + height - height of a pixel in physical scale units + (width and height are strings like "2.54") + + num_unknown_chunks = png_get_unknown_chunks(png_ptr, + info_ptr, &unknowns) + unknowns - array of png_unknown_chunk + structures holding unknown chunks + unknowns[i].name - name of unknown chunk + unknowns[i].data - data of unknown chunk + unknowns[i].size - size of unknown chunk's data + unknowns[i].location - position of chunk in file + + The value of "i" corresponds to the order in which the + chunks were read from the PNG file or inserted with the + png_set_unknown_chunks() function. + +The data from the pHYs chunk can be retrieved in several convenient +forms: + + res_x = png_get_x_pixels_per_meter(png_ptr, + info_ptr) + res_y = png_get_y_pixels_per_meter(png_ptr, + info_ptr) + res_x_and_y = png_get_pixels_per_meter(png_ptr, + info_ptr) + res_x = png_get_x_pixels_per_inch(png_ptr, + info_ptr) + res_y = png_get_y_pixels_per_inch(png_ptr, + info_ptr) + res_x_and_y = png_get_pixels_per_inch(png_ptr, + info_ptr) + aspect_ratio = png_get_pixel_aspect_ratio(png_ptr, + info_ptr) + + (Each of these returns 0 [signifying "unknown"] if + the data is not present or if res_x is 0; + res_x_and_y is 0 if res_x != res_y) + +The data from the oFFs chunk can be retrieved in several convenient +forms: + + x_offset = png_get_x_offset_microns(png_ptr, info_ptr); + y_offset = png_get_y_offset_microns(png_ptr, info_ptr); + x_offset = png_get_x_offset_inches(png_ptr, info_ptr); + y_offset = png_get_y_offset_inches(png_ptr, info_ptr); + + (Each of these returns 0 [signifying "unknown" if both + x and y are 0] if the data is not present or if the + chunk is present but the unit is the pixel) + +For more information, see the png_info definition in png.h and the +PNG specification for chunk contents. Be careful with trusting +rowbytes, as some of the transformations could increase the space +needed to hold a row (expand, filler, gray_to_rgb, etc.). +See png_read_update_info(), below. + +A quick word about text_ptr and num_text. PNG stores comments in +keyword/text pairs, one pair per chunk, with no limit on the number +of text chunks, and a 2^31 byte limit on their size. While there are +suggested keywords, there is no requirement to restrict the use to these +strings. It is strongly suggested that keywords and text be sensible +to humans (that's the point), so don't use abbreviations. Non-printing +symbols are not allowed. See the PNG specification for more details. +There is also no requirement to have text after the keyword. + +Keywords should be limited to 79 Latin-1 characters without leading or +trailing spaces, but non-consecutive spaces are allowed within the +keyword. It is possible to have the same keyword any number of times. +The text_ptr is an array of png_text structures, each holding a +pointer to a language string, a pointer to a keyword and a pointer to +a text string. The text string, language code, and translated +keyword may be empty or NULL pointers. The keyword/text +pairs are put into the array in the order that they are received. +However, some or all of the text chunks may be after the image, so, to +make sure you have read all the text chunks, don't mess with these +until after you read the stuff after the image. This will be +mentioned again below in the discussion that goes with png_read_end(). + +.SS Input transformations + +After you've read the header information, you can set up the library +to handle any special transformations of the image data. The various +ways to transform the data will be described in the order that they +should occur. This is important, as some of these change the color +type and/or bit depth of the data, and some others only work on +certain color types and bit depths. Even though each transformation +checks to see if it has data that it can do something with, you should +make sure to only enable a transformation if it will be valid for the +data. For example, don't swap red and blue on grayscale data. + +The colors used for the background and transparency values should be +supplied in the same format/depth as the current image data. They +are stored in the same format/depth as the image data in a bKGD or tRNS +chunk, so this is what libpng expects for this data. The colors are +transformed to keep in sync with the image data when an application +calls the png_read_update_info() routine (see below). + +Data will be decoded into the supplied row buffers packed into bytes +unless the library has been told to transform it into another format. +For example, 4 bit/pixel paletted or grayscale data will be returned +2 pixels/byte with the leftmost pixel in the high-order bits of the +byte, unless png_set_packing() is called. 8-bit RGB data will be stored +in RGB RGB RGB format unless png_set_filler() is called to insert filler +bytes, either before or after each RGB triplet. 16-bit RGB data will +be returned RRGGBB RRGGBB, with the most significant byte of the color +value first, unless png_set_strip_16() is called to transform it to +regular RGB RGB triplets, or png_set_filler() is called to insert +filler bytes, either before or after each RRGGBB triplet. Similarly, +8-bit or 16-bit grayscale data can be modified with png_set_filler() +or png_set_strip_16(). + +The following code transforms grayscale images of less than 8 to 8 bits, +changes paletted images to RGB, and adds a full alpha channel if there is +transparency information in a tRNS chunk. This is most useful on +grayscale images with bit depths of 2 or 4 or if there is a multiple-image +viewing application that wishes to treat all images in the same way. + + if (color_type == PNG_COLOR_TYPE_PALETTE) + png_set_palette_to_rgb(png_ptr); + + if (color_type == PNG_COLOR_TYPE_GRAY && + bit_depth < 8) png_set_gray_1_2_4_to_8(png_ptr); + + if (png_get_valid(png_ptr, info_ptr, + PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr); + +These three functions are actually aliases for png_set_expand(), added +in libpng version 1.0.4, with the function names expanded to improve code +readability. In some future version they may actually do different +things. + +PNG can have files with 16 bits per channel. If you only can handle +8 bits per channel, this will strip the pixels down to 8 bit. + + if (bit_depth == 16) + png_set_strip_16(png_ptr); + +If, for some reason, you don't need the alpha channel on an image, +and you want to remove it rather than combining it with the background +(but the image author certainly had in mind that you *would* combine +it with the background, so that's what you should probably do): + + if (color_type & PNG_COLOR_MASK_ALPHA) + png_set_strip_alpha(png_ptr); + +In PNG files, the alpha channel in an image +is the level of opacity. If you need the alpha channel in an image to +be the level of transparency instead of opacity, you can invert the +alpha channel (or the tRNS chunk data) after it's read, so that 0 is +fully opaque and 255 (in 8-bit or paletted images) or 65535 (in 16-bit +images) is fully transparent, with + + png_set_invert_alpha(png_ptr); + +PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as +they can, resulting in, for example, 8 pixels per byte for 1 bit +files. This code expands to 1 pixel per byte without changing the +values of the pixels: + + if (bit_depth < 8) + png_set_packing(png_ptr); + +PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels +stored in a PNG image have been "scaled" or "shifted" up to the next +higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] to +8 bits/sample in the range [0, 255]). However, it is also possible to +convert the PNG pixel data back to the original bit depth of the image. +This call reduces the pixels back down to the original bit depth: + + png_color_8p sig_bit; + + if (png_get_sBIT(png_ptr, info_ptr, &sig_bit)) + png_set_shift(png_ptr, sig_bit); + +PNG files store 3-color pixels in red, green, blue order. This code +changes the storage of the pixels to blue, green, red: + + if (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA) + png_set_bgr(png_ptr); + +PNG files store RGB pixels packed into 3 or 6 bytes. This code expands them +into 4 or 8 bytes for windowing systems that need them in this format: + + if (color_type == PNG_COLOR_TYPE_RGB) + png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE); + +where "filler" is the 8 or 16-bit number to fill with, and the location is +either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether +you want the filler before the RGB or after. This transformation +does not affect images that already have full alpha channels. To add an +opaque alpha channel, use filler=0xff or 0xffff and PNG_FILLER_AFTER which +will generate RGBA pixels. + +If you are reading an image with an alpha channel, and you need the +data as ARGB instead of the normal PNG format RGBA: + + if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) + png_set_swap_alpha(png_ptr); + +For some uses, you may want a grayscale image to be represented as +RGB. This code will do that conversion: + + if (color_type == PNG_COLOR_TYPE_GRAY || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_gray_to_rgb(png_ptr); + +Conversely, you can convert an RGB or RGBA image to grayscale or grayscale +with alpha. + + if (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA) + png_set_rgb_to_gray_fixed(png_ptr, error_action, + int red_weight, int green_weight); + + error_action = 1: silently do the conversion + error_action = 2: issue a warning if the original + image has any pixel where + red != green or red != blue + error_action = 3: issue an error and abort the + conversion if the original + image has any pixel where + red != green or red != blue + + red_weight: weight of red component times 100000 + green_weight: weight of green component times 100000 + If either weight is negative, default + weights (21268, 71514) are used. + +If you have set error_action = 1 or 2, you can +later check whether the image really was gray, after processing +the image rows, with the png_get_rgb_to_gray_status(png_ptr) function. +It will return a png_byte that is zero if the image was gray or +1 if there were any non-gray pixels. bKGD and sBIT data +will be silently converted to grayscale, using the green channel +data, regardless of the error_action setting. + +With red_weight+green_weight<=100000, +the normalized graylevel is computed: + + int rw = red_weight * 65536; + int gw = green_weight * 65536; + int bw = 65536 - (rw + gw); + gray = (rw*red + gw*green + bw*blue)/65536; + +The default values approximate those recommended in the Charles +Poynton's Color FAQ, +Copyright (c) 1998-01-04 Charles Poynton poynton@inforamp.net + + Y = 0.212671 * R + 0.715160 * G + 0.072169 * B + +Libpng approximates this with + + Y = 0.21268 * R + 0.7151 * G + 0.07217 * B + +which can be expressed with integers as + + Y = (6969 * R + 23434 * G + 2365 * B)/32768 + +The calculation is done in a linear colorspace, if the image gamma +is known. + +If you have a grayscale and you are using png_set_expand_depth(), +png_set_expand(), or png_set_gray_to_rgb to change to truecolor or to +a higher bit-depth, you must either supply the background color as a gray +value at the original file bit-depth (need_expand = 1) or else supply the +background color as an RGB triplet at the final, expanded bit depth +(need_expand = 0). Similarly, if you are reading a paletted image, you +must either supply the background color as a palette index (need_expand = 1) +or as an RGB triplet that may or may not be in the palette (need_expand = 0). + + png_color_16 my_background; + png_color_16p image_background; + + if (png_get_bKGD(png_ptr, info_ptr, &image_background)) + png_set_background(png_ptr, image_background, + PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); + else + png_set_background(png_ptr, &my_background, + PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); + +The png_set_background() function tells libpng to composite images +with alpha or simple transparency against the supplied background +color. If the PNG file contains a bKGD chunk (PNG_INFO_bKGD valid), +you may use this color, or supply another color more suitable for +the current display (e.g., the background color from a web page). You +need to tell libpng whether the color is in the gamma space of the +display (PNG_BACKGROUND_GAMMA_SCREEN for colors you supply), the file +(PNG_BACKGROUND_GAMMA_FILE for colors from the bKGD chunk), or one +that is neither of these gammas (PNG_BACKGROUND_GAMMA_UNIQUE - I don't +know why anyone would use this, but it's here). + +To properly display PNG images on any kind of system, the application needs +to know what the display gamma is. Ideally, the user will know this, and +the application will allow them to set it. One method of allowing the user +to set the display gamma separately for each system is to check for a +SCREEN_GAMMA or DISPLAY_GAMMA environment variable, which will hopefully be +correctly set. + +Note that display_gamma is the overall gamma correction required to produce +pleasing results, which depends on the lighting conditions in the surrounding +environment. In a dim or brightly lit room, no compensation other than +the physical gamma exponent of the monitor is needed, while in a dark room +a slightly smaller exponent is better. + + double gamma, screen_gamma; + + if (/* We have a user-defined screen + gamma value */) + { + screen_gamma = user_defined_screen_gamma; + } + /* One way that applications can share the same + screen gamma value */ + else if ((gamma_str = getenv("SCREEN_GAMMA")) + != NULL) + { + screen_gamma = (double)atof(gamma_str); + } + /* If we don't have another value */ + else + { + screen_gamma = 2.2; /* A good guess for a + PC monitor in a bright office or a dim room */ + screen_gamma = 2.0; /* A good guess for a + PC monitor in a dark room */ + screen_gamma = 1.7 or 1.0; /* A good + guess for Mac systems */ + } + +The png_set_gamma() function handles gamma transformations of the data. +Pass both the file gamma and the current screen_gamma. If the file does +not have a gamma value, you can pass one anyway if you have an idea what +it is (usually 0.45455 is a good guess for GIF images on PCs). Note +that file gammas are inverted from screen gammas. See the discussions +on gamma in the PNG specification for an excellent description of what +gamma is, and why all applications should support it. It is strongly +recommended that PNG viewers support gamma correction. + + if (png_get_gAMA(png_ptr, info_ptr, &gamma)) + png_set_gamma(png_ptr, screen_gamma, gamma); + else + png_set_gamma(png_ptr, screen_gamma, 0.45455); + +If you need to reduce an RGB file to a paletted file, or if a paletted +file has more entries then will fit on your screen, png_set_dither() +will do that. Note that this is a simple match dither that merely +finds the closest color available. This should work fairly well with +optimized palettes, and fairly badly with linear color cubes. If you +pass a palette that is larger then maximum_colors, the file will +reduce the number of colors in the palette so it will fit into +maximum_colors. If there is a histogram, it will use it to make +more intelligent choices when reducing the palette. If there is no +histogram, it may not do as good a job. + + if (color_type & PNG_COLOR_MASK_COLOR) + { + if (png_get_valid(png_ptr, info_ptr, + PNG_INFO_PLTE)) + { + png_uint_16p histogram = NULL; + + png_get_hIST(png_ptr, info_ptr, + &histogram); + png_set_dither(png_ptr, palette, num_palette, + max_screen_colors, histogram, 1); + } + else + { + png_color std_color_cube[MAX_SCREEN_COLORS] = + { ... colors ... }; + + png_set_dither(png_ptr, std_color_cube, + MAX_SCREEN_COLORS, MAX_SCREEN_COLORS, + NULL,0); + } + } + +PNG files describe monochrome as black being zero and white being one. +The following code will reverse this (make black be one and white be +zero): + + if (bit_depth == 1 && color_type == PNG_COLOR_TYPE_GRAY) + png_set_invert_mono(png_ptr); + +This function can also be used to invert grayscale and gray-alpha images: + + if (color_type == PNG_COLOR_TYPE_GRAY || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_invert_mono(png_ptr); + +PNG files store 16 bit pixels in network byte order (big-endian, +ie. most significant bits first). This code changes the storage to the +other way (little-endian, i.e. least significant bits first, the +way PCs store them): + + if (bit_depth == 16) + png_set_swap(png_ptr); + +If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you +need to change the order the pixels are packed into bytes, you can use: + + if (bit_depth < 8) + png_set_packswap(png_ptr); + +Finally, you can write your own transformation function if none of +the existing ones meets your needs. This is done by setting a callback +with + + png_set_read_user_transform_fn(png_ptr, + read_transform_fn); + +You must supply the function + + void read_transform_fn(png_ptr ptr, row_info_ptr + row_info, png_bytep data) + +See pngtest.c for a working example. Your function will be called +after all of the other transformations have been processed. + +You can also set up a pointer to a user structure for use by your +callback function, and you can inform libpng that your transform +function will change the number of channels or bit depth with the +function + + png_set_user_transform_info(png_ptr, user_ptr, + user_depth, user_channels); + +The user's application, not libpng, is responsible for allocating and +freeing any memory required for the user structure. + +You can retrieve the pointer via the function +png_get_user_transform_ptr(). For example: + + voidp read_user_transform_ptr = + png_get_user_transform_ptr(png_ptr); + +The last thing to handle is interlacing; this is covered in detail below, +but you must call the function here if you want libpng to handle expansion +of the interlaced image. + + number_of_passes = png_set_interlace_handling(png_ptr); + +After setting the transformations, libpng can update your png_info +structure to reflect any transformations you've requested with this +call. This is most useful to update the info structure's rowbytes +field so you can use it to allocate your image memory. This function +will also update your palette with the correct screen_gamma and +background if these have been given with the calls above. + + png_read_update_info(png_ptr, info_ptr); + +After you call png_read_update_info(), you can allocate any +memory you need to hold the image. The row data is simply +raw byte data for all forms of images. As the actual allocation +varies among applications, no example will be given. If you +are allocating one large chunk, you will need to build an +array of pointers to each row, as it will be needed for some +of the functions below. + +.SS Reading image data + +After you've allocated memory, you can read the image data. +The simplest way to do this is in one function call. If you are +allocating enough memory to hold the whole image, you can just +call png_read_image() and libpng will read in all the image data +and put it in the memory area supplied. You will need to pass in +an array of pointers to each row. + +This function automatically handles interlacing, so you don't need +to call png_set_interlace_handling() or call this function multiple +times, or any of that other stuff necessary with png_read_rows(). + + png_read_image(png_ptr, row_pointers); + +where row_pointers is: + + png_bytep row_pointers[height]; + +You can point to void or char or whatever you use for pixels. + +If you don't want to read in the whole image at once, you can +use png_read_rows() instead. If there is no interlacing (check +interlace_type == PNG_INTERLACE_NONE), this is simple: + + png_read_rows(png_ptr, row_pointers, NULL, + number_of_rows); + +where row_pointers is the same as in the png_read_image() call. + +If you are doing this just one row at a time, you can do this with +a single row_pointer instead of an array of row_pointers: + + png_bytep row_pointer = row; + png_read_row(png_ptr, row_pointer, NULL); + +If the file is interlaced (interlace_type != 0 in the IHDR chunk), things +get somewhat harder. The only current (PNG Specification version 1.2) +interlacing type for PNG is (interlace_type == PNG_INTERLACE_ADAM7) +is a somewhat complicated 2D interlace scheme, known as Adam7, that +breaks down an image into seven smaller images of varying size, based +on an 8x8 grid. + +libpng can fill out those images or it can give them to you "as is". +If you want them filled out, there are two ways to do that. The one +mentioned in the PNG specification is to expand each pixel to cover +those pixels that have not been read yet (the "rectangle" method). +This results in a blocky image for the first pass, which gradually +smooths out as more pixels are read. The other method is the "sparkle" +method, where pixels are drawn only in their final locations, with the +rest of the image remaining whatever colors they were initialized to +before the start of the read. The first method usually looks better, +but tends to be slower, as there are more pixels to put in the rows. + +If you don't want libpng to handle the interlacing details, just call +png_read_rows() seven times to read in all seven images. Each of the +images is a valid image by itself, or they can all be combined on an +8x8 grid to form a single image (although if you intend to combine them +you would be far better off using the libpng interlace handling). + +The first pass will return an image 1/8 as wide as the entire image +(every 8th column starting in column 0) and 1/8 as high as the original +(every 8th row starting in row 0), the second will be 1/8 as wide +(starting in column 4) and 1/8 as high (also starting in row 0). The +third pass will be 1/4 as wide (every 4th pixel starting in column 0) and +1/8 as high (every 8th row starting in row 4), and the fourth pass will +be 1/4 as wide and 1/4 as high (every 4th column starting in column 2, +and every 4th row starting in row 0). The fifth pass will return an +image 1/2 as wide, and 1/4 as high (starting at column 0 and row 2), +while the sixth pass will be 1/2 as wide and 1/2 as high as the original +(starting in column 1 and row 0). The seventh and final pass will be as +wide as the original, and 1/2 as high, containing all of the odd +numbered scanlines. Phew! + +If you want libpng to expand the images, call this before calling +png_start_read_image() or png_read_update_info(): + + if (interlace_type == PNG_INTERLACE_ADAM7) + number_of_passes + = png_set_interlace_handling(png_ptr); + +This will return the number of passes needed. Currently, this +is seven, but may change if another interlace type is added. +This function can be called even if the file is not interlaced, +where it will return one pass. + +If you are not going to display the image after each pass, but are +going to wait until the entire image is read in, use the sparkle +effect. This effect is faster and the end result of either method +is exactly the same. If you are planning on displaying the image +after each pass, the "rectangle" effect is generally considered the +better looking one. + +If you only want the "sparkle" effect, just call png_read_rows() as +normal, with the third parameter NULL. Make sure you make pass over +the image number_of_passes times, and you don't change the data in the +rows between calls. You can change the locations of the data, just +not the data. Each pass only writes the pixels appropriate for that +pass, and assumes the data from previous passes is still valid. + + png_read_rows(png_ptr, row_pointers, NULL, + number_of_rows); + +If you only want the first effect (the rectangles), do the same as +before except pass the row buffer in the third parameter, and leave +the second parameter NULL. + + png_read_rows(png_ptr, NULL, row_pointers, + number_of_rows); + +.SS Finishing a sequential read + +After you are finished reading the image through either the high- or +low-level interfaces, you can finish reading the file. If you are +interested in comments or time, which may be stored either before or +after the image data, you should pass the separate png_info struct if +you want to keep the comments from before and after the image +separate. If you are not interested, you can pass NULL. + + png_read_end(png_ptr, end_info); + +When you are done, you can free all memory allocated by libpng like this: + + png_destroy_read_struct(&png_ptr, &info_ptr, + &end_info); + +It is also possible to individually free the info_ptr members that +point to libpng-allocated storage with the following function: + + png_free_data(png_ptr, info_ptr, mask, seq) + mask - identifies data to be freed, a mask + containing the logical OR of one or + more of + PNG_FREE_PLTE, PNG_FREE_TRNS, + PNG_FREE_HIST, PNG_FREE_ICCP, + PNG_FREE_PCAL, PNG_FREE_ROWS, + PNG_FREE_SCAL, PNG_FREE_SPLT, + PNG_FREE_TEXT, PNG_FREE_UNKN, + or simply PNG_FREE_ALL + seq - sequence number of item to be freed + (-1 for all items) + +This function may be safely called when the relevant storage has +already been freed, or has not yet been allocated, or was allocated +by the user and not by libpng, and will in those +cases do nothing. The "seq" parameter is ignored if only one item +of the selected data type, such as PLTE, is allowed. If "seq" is not +-1, and multiple items are allowed for the data type identified in +the mask, such as text or sPLT, only the n'th item in the structure +is freed, where n is "seq". + +The default behavior is only to free data that was allocated internally +by libpng. This can be changed, so that libpng will not free the data, +or so that it will free data that was allocated by the user with png_malloc() +or png_zalloc() and passed in via a png_set_*() function, with + + png_data_freer(png_ptr, info_ptr, freer, mask) + mask - which data elements are affected + same choices as in png_free_data() + freer - one of + PNG_DESTROY_WILL_FREE_DATA + PNG_SET_WILL_FREE_DATA + PNG_USER_WILL_FREE_DATA + +This function only affects data that has already been allocated. +You can call this function after reading the PNG data but before calling +any png_set_*() functions, to control whether the user or the png_set_*() +function is responsible for freeing any existing data that might be present, +and again after the png_set_*() functions to control whether the user +or png_destroy_*() is supposed to free the data. When the user assumes +responsibility for libpng-allocated data, the application must use +png_free() to free it, and when the user transfers responsibility to libpng +for data that the user has allocated, the user must have used png_malloc() +or png_zalloc() to allocate it. + +If you allocated your row_pointers in a single block, as suggested above in +the description of the high level read interface, you must not transfer +responsibility for freeing it to the png_set_rows or png_read_destroy function, +because they would also try to free the individual row_pointers[i]. + +If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword +separately, do not transfer responsibility for freeing text_ptr to libpng, +because when libpng fills a png_text structure it combines these members with +the key member, and png_free_data() will free only text_ptr.key. Similarly, +if you transfer responsibility for free'ing text_ptr from libpng to your +application, your application must not separately free those members. + +The png_free_data() function will turn off the "valid" flag for anything +it frees. If you need to turn the flag off for a chunk that was freed by your +application instead of by libpng, you can use + + png_set_invalid(png_ptr, info_ptr, mask); + mask - identifies the chunks to be made invalid, + containing the logical OR of one or + more of + PNG_INFO_gAMA, PNG_INFO_sBIT, + PNG_INFO_cHRM, PNG_INFO_PLTE, + PNG_INFO_tRNS, PNG_INFO_bKGD, + PNG_INFO_hIST, PNG_INFO_pHYs, + PNG_INFO_oFFs, PNG_INFO_tIME, + PNG_INFO_pCAL, PNG_INFO_sRGB, + PNG_INFO_iCCP, PNG_INFO_sPLT, + PNG_INFO_sCAL, PNG_INFO_IDAT + +For a more compact example of reading a PNG image, see the file example.c. + +.SS Reading PNG files progressively + +The progressive reader is slightly different then the non-progressive +reader. Instead of calling png_read_info(), png_read_rows(), and +png_read_end(), you make one call to png_process_data(), which calls +callbacks when it has the info, a row, or the end of the image. You +set up these callbacks with png_set_progressive_read_fn(). You don't +have to worry about the input/output functions of libpng, as you are +giving the library the data directly in png_process_data(). I will +assume that you have read the section on reading PNG files above, +so I will only highlight the differences (although I will show +all of the code). + +png_structp png_ptr; +png_infop info_ptr; + + /* An example code fragment of how you would + initialize the progressive reader in your + application. */ + int + initialize_png_reader() + { + png_ptr = png_create_read_struct + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn); + if (!png_ptr) + return (ERROR); + info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) + { + png_destroy_read_struct(&png_ptr, (png_infopp)NULL, + (png_infopp)NULL); + return (ERROR); + } + + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + return (ERROR); + } + + /* This one's new. You can provide functions + to be called when the header info is valid, + when each row is completed, and when the image + is finished. If you aren't using all functions, + you can specify NULL parameters. Even when all + three functions are NULL, you need to call + png_set_progressive_read_fn(). You can use + any struct as the user_ptr (cast to a void pointer + for the function call), and retrieve the pointer + from inside the callbacks using the function + + png_get_progressive_ptr(png_ptr); + + which will return a void pointer, which you have + to cast appropriately. + */ + png_set_progressive_read_fn(png_ptr, (void *)user_ptr, + info_callback, row_callback, end_callback); + + return 0; + } + + /* A code fragment that you call as you receive blocks + of data */ + int + process_data(png_bytep buffer, png_uint_32 length) + { + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + return (ERROR); + } + + /* This one's new also. Simply give it a chunk + of data from the file stream (in order, of + course). On machines with segmented memory + models machines, don't give it any more than + 64K. The library seems to run fine with sizes + of 4K. Although you can give it much less if + necessary (I assume you can give it chunks of + 1 byte, I haven't tried less then 256 bytes + yet). When this function returns, you may + want to display any rows that were generated + in the row callback if you don't already do + so there. + */ + png_process_data(png_ptr, info_ptr, buffer, length); + return 0; + } + + /* This function is called (as set by + png_set_progressive_read_fn() above) when enough data + has been supplied so all of the header has been + read. + */ + void + info_callback(png_structp png_ptr, png_infop info) + { + /* Do any setup here, including setting any of + the transformations mentioned in the Reading + PNG files section. For now, you _must_ call + either png_start_read_image() or + png_read_update_info() after all the + transformations are set (even if you don't set + any). You may start getting rows before + png_process_data() returns, so this is your + last chance to prepare for that. + */ + } + + /* This function is called when each row of image + data is complete */ + void + row_callback(png_structp png_ptr, png_bytep new_row, + png_uint_32 row_num, int pass) + { + /* If the image is interlaced, and you turned + on the interlace handler, this function will + be called for every row in every pass. Some + of these rows will not be changed from the + previous pass. When the row is not changed, + the new_row variable will be NULL. The rows + and passes are called in order, so you don't + really need the row_num and pass, but I'm + supplying them because it may make your life + easier. + + For the non-NULL rows of interlaced images, + you must call png_progressive_combine_row() + passing in the row and the old row. You can + call this function for NULL rows (it will just + return) and for non-interlaced images (it just + does the memcpy for you) if it will make the + code easier. Thus, you can just do this for + all cases: + */ + + png_progressive_combine_row(png_ptr, old_row, + new_row); + + /* where old_row is what was displayed for + previously for the row. Note that the first + pass (pass == 0, really) will completely cover + the old row, so the rows do not have to be + initialized. After the first pass (and only + for interlaced images), you will have to pass + the current row, and the function will combine + the old row and the new row. + */ + } + + void + end_callback(png_structp png_ptr, png_infop info) + { + /* This function is called after the whole image + has been read, including any chunks after the + image (up to and including the IEND). You + will usually have the same info chunk as you + had in the header, although some data may have + been added to the comments and time fields. + + Most people won't do much here, perhaps setting + a flag that marks the image as finished. + */ + } + + + +.SH IV. Writing + +Much of this is very similar to reading. However, everything of +importance is repeated here, so you won't have to constantly look +back up in the reading section to understand writing. + +.SS Setup + +You will want to do the I/O initialization before you get into libpng, +so if it doesn't work, you don't have anything to undo. If you are not +using the standard I/O functions, you will need to replace them with +custom writing functions. See the discussion under Customizing libpng. + + FILE *fp = fopen(file_name, "wb"); + if (!fp) + { + return (ERROR); + } + +Next, png_struct and png_info need to be allocated and initialized. +As these can be both relatively large, you may not want to store these +on the stack, unless you have stack space to spare. Of course, you +will want to check if they return NULL. If you are also reading, +you won't want to name your read structure and your write structure +both "png_ptr"; you can call them anything you like, such as +"read_ptr" and "write_ptr". Look at pngtest.c, for example. + + png_structp png_ptr = png_create_write_struct + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn); + if (!png_ptr) + return (ERROR); + + png_infop info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) + { + png_destroy_write_struct(&png_ptr, + (png_infopp)NULL); + return (ERROR); + } + +If you want to use your own memory allocation routines, +define PNG_USER_MEM_SUPPORTED and use +png_create_write_struct_2() instead of png_create_write_struct(): + + png_structp png_ptr = png_create_write_struct_2 + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn, (png_voidp) + user_mem_ptr, user_malloc_fn, user_free_fn); + +After you have these structures, you will need to set up the +error handling. When libpng encounters an error, it expects to +longjmp() back to your routine. Therefore, you will need to call +setjmp() and pass the png_jmpbuf(png_ptr). If you +write the file from different routines, you will need to update +the png_jmpbuf(png_ptr) every time you enter a new routine that will +call a png_*() function. See your documentation of setjmp/longjmp +for your compiler for more information on setjmp/longjmp. See +the discussion on libpng error handling in the Customizing Libpng +section below for more information on the libpng error handling. + + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_write_struct(&png_ptr, &info_ptr); + fclose(fp); + return (ERROR); + } + ... + return; + +If you would rather avoid the complexity of setjmp/longjmp issues, +you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case +errors will result in a call to PNG_ABORT() which defaults to abort(). + +Now you need to set up the output code. The default for libpng is to +use the C function fwrite(). If you use this, you will need to pass a +valid FILE * in the function png_init_io(). Be sure that the file is +opened in binary mode. Again, if you wish to handle writing data in +another way, see the discussion on libpng I/O handling in the Customizing +Libpng section below. + + png_init_io(png_ptr, fp); + +.SS Write callbacks + +At this point, you can set up a callback function that will be +called after each row has been written, which you can use to control +a progress meter or the like. It's demonstrated in pngtest.c. +You must supply a function + + void write_row_callback(png_ptr, png_uint_32 row, + int pass); + { + /* put your code here */ + } + +(You can give it another name that you like instead of "write_row_callback") + +To inform libpng about your function, use + + png_set_write_status_fn(png_ptr, write_row_callback); + +You now have the option of modifying how the compression library will +run. The following functions are mainly for testing, but may be useful +in some cases, like if you need to write PNG files extremely fast and +are willing to give up some compression, or if you want to get the +maximum possible compression at the expense of slower writing. If you +have no special needs in this area, let the library do what it wants by +not calling this function at all, as it has been tuned to deliver a good +speed/compression ratio. The second parameter to png_set_filter() is +the filter method, for which the only valid values are 0 (as of the +July 1999 PNG specification, version 1.2) or 64 (if you are writing +a PNG datastream that is to be embedded in a MNG datastream). The third +parameter is a flag that indicates which filter type(s) are to be tested +for each scanline. See the PNG specification for details on the specific filter +types. + + + /* turn on or off filtering, and/or choose + specific filters. You can use either a single + PNG_FILTER_VALUE_NAME or the logical OR of one + or more PNG_FILTER_NAME masks. */ + png_set_filter(png_ptr, 0, + PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE | + PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB | + PNG_FILTER_UP | PNG_FILTER_VALUE_UP | + PNG_FILTER_AVE | PNG_FILTER_VALUE_AVE | + PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH| + PNG_ALL_FILTERS); + +If an application +wants to start and stop using particular filters during compression, +it should start out with all of the filters (to ensure that the previous +row of pixels will be stored in case it's needed later), and then add +and remove them after the start of compression. + +If you are writing a PNG datastream that is to be embedded in a MNG +datastream, the second parameter can be either 0 or 64. + +The png_set_compression_*() functions interface to the zlib compression +library, and should mostly be ignored unless you really know what you are +doing. The only generally useful call is png_set_compression_level() +which changes how much time zlib spends on trying to compress the image +data. See the Compression Library (zlib.h and algorithm.txt, distributed +with zlib) for details on the compression levels. + + /* set the zlib compression level */ + png_set_compression_level(png_ptr, + Z_BEST_COMPRESSION); + + /* set other zlib parameters */ + png_set_compression_mem_level(png_ptr, 8); + png_set_compression_strategy(png_ptr, + Z_DEFAULT_STRATEGY); + png_set_compression_window_bits(png_ptr, 15); + png_set_compression_method(png_ptr, 8); + png_set_compression_buffer_size(png_ptr, 8192) + +extern PNG_EXPORT(void,png_set_zbuf_size) + +.SS Setting the contents of info for output + +You now need to fill in the png_info structure with all the data you +wish to write before the actual image. Note that the only thing you +are allowed to write after the image is the text chunks and the time +chunk (as of PNG Specification 1.2, anyway). See png_write_end() and +the latest PNG specification for more information on that. If you +wish to write them before the image, fill them in now, and flag that +data as being valid. If you want to wait until after the data, don't +fill them until png_write_end(). For all the fields in png_info and +their data types, see png.h. For explanations of what the fields +contain, see the PNG specification. + +Some of the more important parts of the png_info are: + + png_set_IHDR(png_ptr, info_ptr, width, height, + bit_depth, color_type, interlace_type, + compression_type, filter_method) + width - holds the width of the image + in pixels (up to 2^31). + height - holds the height of the image + in pixels (up to 2^31). + bit_depth - holds the bit depth of one of the + image channels. + (valid values are 1, 2, 4, 8, 16 + and depend also on the + color_type. See also significant + bits (sBIT) below). + color_type - describes which color/alpha + channels are present. + PNG_COLOR_TYPE_GRAY + (bit depths 1, 2, 4, 8, 16) + PNG_COLOR_TYPE_GRAY_ALPHA + (bit depths 8, 16) + PNG_COLOR_TYPE_PALETTE + (bit depths 1, 2, 4, 8) + PNG_COLOR_TYPE_RGB + (bit_depths 8, 16) + PNG_COLOR_TYPE_RGB_ALPHA + (bit_depths 8, 16) + + PNG_COLOR_MASK_PALETTE + PNG_COLOR_MASK_COLOR + PNG_COLOR_MASK_ALPHA + + interlace_type - PNG_INTERLACE_NONE or + PNG_INTERLACE_ADAM7 + compression_type - (must be + PNG_COMPRESSION_TYPE_DEFAULT) + filter_method - (must be PNG_FILTER_TYPE_DEFAULT + or, if you are writing a PNG to + be embedded in a MNG datastream, + can also be + PNG_INTRAPIXEL_DIFFERENCING) + + png_set_PLTE(png_ptr, info_ptr, palette, + num_palette); + palette - the palette for the file + (array of png_color) + num_palette - number of entries in the palette + + png_set_gAMA(png_ptr, info_ptr, gamma); + gamma - the gamma the image was created + at (PNG_INFO_gAMA) + + png_set_sRGB(png_ptr, info_ptr, srgb_intent); + srgb_intent - the rendering intent + (PNG_INFO_sRGB) The presence of + the sRGB chunk means that the pixel + data is in the sRGB color space. + This chunk also implies specific + values of gAMA and cHRM. Rendering + intent is the CSS-1 property that + has been defined by the International + Color Consortium + (http://www.color.org). + It can be one of + PNG_sRGB_INTENT_SATURATION, + PNG_sRGB_INTENT_PERCEPTUAL, + PNG_sRGB_INTENT_ABSOLUTE, or + PNG_sRGB_INTENT_RELATIVE. + + + png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, + srgb_intent); + srgb_intent - the rendering intent + (PNG_INFO_sRGB) The presence of the + sRGB chunk means that the pixel + data is in the sRGB color space. + This function also causes gAMA and + cHRM chunks with the specific values + that are consistent with sRGB to be + written. + + png_set_iCCP(png_ptr, info_ptr, name, compression_type, + profile, proflen); + name - The profile name. + compression - The compression type; always + PNG_COMPRESSION_TYPE_BASE for PNG 1.0. + You may give NULL to this argument to + ignore it. + profile - International Color Consortium color + profile data. May contain NULs. + proflen - length of profile data in bytes. + + png_set_sBIT(png_ptr, info_ptr, sig_bit); + sig_bit - the number of significant bits for + (PNG_INFO_sBIT) each of the gray, red, + green, and blue channels, whichever are + appropriate for the given color type + (png_color_16) + + png_set_tRNS(png_ptr, info_ptr, trans, num_trans, + trans_values); + trans - array of transparent entries for + palette (PNG_INFO_tRNS) + trans_values - graylevel or color sample values of + the single transparent color for + non-paletted images (PNG_INFO_tRNS) + num_trans - number of transparent entries + (PNG_INFO_tRNS) + + png_set_hIST(png_ptr, info_ptr, hist); + (PNG_INFO_hIST) + hist - histogram of palette (array of + png_uint_16) + + png_set_tIME(png_ptr, info_ptr, mod_time); + mod_time - time image was last modified + (PNG_VALID_tIME) + + png_set_bKGD(png_ptr, info_ptr, background); + background - background color (PNG_VALID_bKGD) + + png_set_text(png_ptr, info_ptr, text_ptr, num_text); + text_ptr - array of png_text holding image + comments + text_ptr[i].compression - type of compression used + on "text" PNG_TEXT_COMPRESSION_NONE + PNG_TEXT_COMPRESSION_zTXt + PNG_ITXT_COMPRESSION_NONE + PNG_ITXT_COMPRESSION_zTXt + text_ptr[i].key - keyword for comment. Must contain + 1-79 characters. + text_ptr[i].text - text comments for current + keyword. Can be NULL or empty. + text_ptr[i].text_length - length of text string, + after decompression, 0 for iTXt + text_ptr[i].itxt_length - length of itxt string, + after decompression, 0 for tEXt/zTXt + text_ptr[i].lang - language of comment (NULL or + empty for unknown). + text_ptr[i].translated_keyword - keyword in UTF-8 (NULL + or empty for unknown). + num_text - number of comments + + png_set_sPLT(png_ptr, info_ptr, &palette_ptr, + num_spalettes); + palette_ptr - array of png_sPLT_struct structures + to be added to the list of palettes + in the info structure. + num_spalettes - number of palette structures to be + added. + + png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y, + unit_type); + offset_x - positive offset from the left + edge of the screen + offset_y - positive offset from the top + edge of the screen + unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER + + png_set_pHYs(png_ptr, info_ptr, res_x, res_y, + unit_type); + res_x - pixels/unit physical resolution + in x direction + res_y - pixels/unit physical resolution + in y direction + unit_type - PNG_RESOLUTION_UNKNOWN, + PNG_RESOLUTION_METER + + png_set_sCAL(png_ptr, info_ptr, unit, width, height) + unit - physical scale units (an integer) + width - width of a pixel in physical scale units + height - height of a pixel in physical scale units + (width and height are doubles) + + png_set_sCAL_s(png_ptr, info_ptr, unit, width, height) + unit - physical scale units (an integer) + width - width of a pixel in physical scale units + height - height of a pixel in physical scale units + (width and height are strings like "2.54") + + png_set_unknown_chunks(png_ptr, info_ptr, &unknowns, + num_unknowns) + unknowns - array of png_unknown_chunk + structures holding unknown chunks + unknowns[i].name - name of unknown chunk + unknowns[i].data - data of unknown chunk + unknowns[i].size - size of unknown chunk's data + unknowns[i].location - position to write chunk in file + 0: do not write chunk + PNG_HAVE_IHDR: before PLTE + PNG_HAVE_PLTE: before IDAT + PNG_AFTER_IDAT: after IDAT + +The "location" member is set automatically according to +what part of the output file has already been written. +You can change its value after calling png_set_unknown_chunks() +as demonstrated in pngtest.c. Within each of the "locations", +the chunks are sequenced according to their position in the +structure (that is, the value of "i", which is the order in which +the chunk was either read from the input file or defined with +png_set_unknown_chunks). + +A quick word about text and num_text. text is an array of png_text +structures. num_text is the number of valid structures in the array. +Each png_text structure holds a language code, a keyword, a text value, +and a compression type. + +The compression types have the same valid numbers as the compression +types of the image data. Currently, the only valid number is zero. +However, you can store text either compressed or uncompressed, unlike +images, which always have to be compressed. So if you don't want the +text compressed, set the compression type to PNG_TEXT_COMPRESSION_NONE. +Because tEXt and zTXt chunks don't have a language field, if you +specify PNG_TEXT_COMPRESSION_NONE or PNG_TEXT_COMPRESSION_zTXt +any language code or translated keyword will not be written out. + +Until text gets around 1000 bytes, it is not worth compressing it. +After the text has been written out to the file, the compression type +is set to PNG_TEXT_COMPRESSION_NONE_WR or PNG_TEXT_COMPRESSION_zTXt_WR, +so that it isn't written out again at the end (in case you are calling +png_write_end() with the same struct. + +The keywords that are given in the PNG Specification are: + + Title Short (one line) title or + caption for image + Author Name of image's creator + Description Description of image (possibly long) + Copyright Copyright notice + Creation Time Time of original image creation + (usually RFC 1123 format, see below) + Software Software used to create the image + Disclaimer Legal disclaimer + Warning Warning of nature of content + Source Device used to create the image + Comment Miscellaneous comment; conversion + from other image format + +The keyword-text pairs work like this. Keywords should be short +simple descriptions of what the comment is about. Some typical +keywords are found in the PNG specification, as is some recommendations +on keywords. You can repeat keywords in a file. You can even write +some text before the image and some after. For example, you may want +to put a description of the image before the image, but leave the +disclaimer until after, so viewers working over modem connections +don't have to wait for the disclaimer to go over the modem before +they start seeing the image. Finally, keywords should be full +words, not abbreviations. Keywords and text are in the ISO 8859-1 +(Latin-1) character set (a superset of regular ASCII) and can not +contain NUL characters, and should not contain control or other +unprintable characters. To make the comments widely readable, stick +with basic ASCII, and avoid machine specific character set extensions +like the IBM-PC character set. The keyword must be present, but +you can leave off the text string on non-compressed pairs. +Compressed pairs must have a text string, as only the text string +is compressed anyway, so the compression would be meaningless. + +PNG supports modification time via the png_time structure. Two +conversion routines are provided, png_convert_from_time_t() for +time_t and png_convert_from_struct_tm() for struct tm. The +time_t routine uses gmtime(). You don't have to use either of +these, but if you wish to fill in the png_time structure directly, +you should provide the time in universal time (GMT) if possible +instead of your local time. Note that the year number is the full +year (e.g. 1998, rather than 98 - PNG is year 2000 compliant!), and +that months start with 1. + +If you want to store the time of the original image creation, you should +use a plain tEXt chunk with the "Creation Time" keyword. This is +necessary because the "creation time" of a PNG image is somewhat vague, +depending on whether you mean the PNG file, the time the image was +created in a non-PNG format, a still photo from which the image was +scanned, or possibly the subject matter itself. In order to facilitate +machine-readable dates, it is recommended that the "Creation Time" +tEXt chunk use RFC 1123 format dates (e.g. "22 May 1997 18:07:10 GMT"), +although this isn't a requirement. Unlike the tIME chunk, the +"Creation Time" tEXt chunk is not expected to be automatically changed +by the software. To facilitate the use of RFC 1123 dates, a function +png_convert_to_rfc1123(png_timep) is provided to convert from PNG +time to an RFC 1123 format string. + +.SS Writing unknown chunks + +You can use the png_set_unknown_chunks function to queue up chunks +for writing. You give it a chunk name, raw data, and a size; that's +all there is to it. The chunks will be written by the next following +png_write_info_before_PLTE, png_write_info, or png_write_end function. +Any chunks previously read into the info structure's unknown-chunk +list will also be written out in a sequence that satisfies the PNG +specification's ordering rules. + +.SS The high-level write interface + +At this point there are two ways to proceed; through the high-level +write interface, or through a sequence of low-level write operations. +You can use the high-level interface if your image data is present +in the info structure. All defined output +transformations are permitted, enabled by the following masks. + + PNG_TRANSFORM_IDENTITY No transformation + PNG_TRANSFORM_PACKING Pack 1, 2 and 4-bit samples + PNG_TRANSFORM_PACKSWAP Change order of packed + pixels to LSB first + PNG_TRANSFORM_INVERT_MONO Invert monochrome images + PNG_TRANSFORM_SHIFT Normalize pixels to the + sBIT depth + PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA + to BGRA + PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA + to AG + PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity + to transparency + PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples + PNG_TRANSFORM_STRIP_FILLER Strip out filler bytes. + +If you have valid image data in the info structure (you can use +png_set_rows() to put image data in the info structure), simply do this: + + png_write_png(png_ptr, info_ptr, png_transforms, NULL) + +where png_transforms is an integer containing the logical OR of some set of +transformation flags. This call is equivalent to png_write_info(), +followed the set of transformations indicated by the transform mask, +then png_write_image(), and finally png_write_end(). + +(The final parameter of this call is not yet used. Someday it might point +to transformation parameters required by some future output transform.) + +.SS The low-level write interface + +If you are going the low-level route instead, you are now ready to +write all the file information up to the actual image data. You do +this with a call to png_write_info(). + + png_write_info(png_ptr, info_ptr); + +Note that there is one transformation you may need to do before +png_write_info(). In PNG files, the alpha channel in an image is the +level of opacity. If your data is supplied as a level of +transparency, you can invert the alpha channel before you write it, so +that 0 is fully transparent and 255 (in 8-bit or paletted images) or +65535 (in 16-bit images) is fully opaque, with + + png_set_invert_alpha(png_ptr); + +This must appear before png_write_info() instead of later with the +other transformations because in the case of paletted images the tRNS +chunk data has to be inverted before the tRNS chunk is written. If +your image is not a paletted image, the tRNS data (which in such cases +represents a single color to be rendered as transparent) won't need to +be changed, and you can safely do this transformation after your +png_write_info() call. + +If you need to write a private chunk that you want to appear before +the PLTE chunk when PLTE is present, you can write the PNG info in +two steps, and insert code to write your own chunk between them: + + png_write_info_before_PLTE(png_ptr, info_ptr); + png_set_unknown_chunks(png_ptr, info_ptr, ...); + png_write_info(png_ptr, info_ptr); + +After you've written the file information, you can set up the library +to handle any special transformations of the image data. The various +ways to transform the data will be described in the order that they +should occur. This is important, as some of these change the color +type and/or bit depth of the data, and some others only work on +certain color types and bit depths. Even though each transformation +checks to see if it has data that it can do something with, you should +make sure to only enable a transformation if it will be valid for the +data. For example, don't swap red and blue on grayscale data. + +PNG files store RGB pixels packed into 3 or 6 bytes. This code tells +the library to strip input data that has 4 or 8 bytes per pixel down +to 3 or 6 bytes (or strip 2 or 4-byte grayscale+filler data to 1 or 2 +bytes per pixel). + + png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); + +where the 0 is unused, and the location is either PNG_FILLER_BEFORE or +PNG_FILLER_AFTER, depending upon whether the filler byte in the pixel +is stored XRGB or RGBX. + +PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as +they can, resulting in, for example, 8 pixels per byte for 1 bit files. +If the data is supplied at 1 pixel per byte, use this code, which will +correctly pack the pixels into a single byte: + + png_set_packing(png_ptr); + +PNG files reduce possible bit depths to 1, 2, 4, 8, and 16. If your +data is of another bit depth, you can write an sBIT chunk into the +file so that decoders can recover the original data if desired. + + /* Set the true bit depth of the image data */ + if (color_type & PNG_COLOR_MASK_COLOR) + { + sig_bit.red = true_bit_depth; + sig_bit.green = true_bit_depth; + sig_bit.blue = true_bit_depth; + } + else + { + sig_bit.gray = true_bit_depth; + } + if (color_type & PNG_COLOR_MASK_ALPHA) + { + sig_bit.alpha = true_bit_depth; + } + + png_set_sBIT(png_ptr, info_ptr, &sig_bit); + +If the data is stored in the row buffer in a bit depth other than +one supported by PNG (e.g. 3 bit data in the range 0-7 for a 4-bit PNG), +this will scale the values to appear to be the correct bit depth as +is required by PNG. + + png_set_shift(png_ptr, &sig_bit); + +PNG files store 16 bit pixels in network byte order (big-endian, +ie. most significant bits first). This code would be used if they are +supplied the other way (little-endian, i.e. least significant bits +first, the way PCs store them): + + if (bit_depth > 8) + png_set_swap(png_ptr); + +If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you +need to change the order the pixels are packed into bytes, you can use: + + if (bit_depth < 8) + png_set_packswap(png_ptr); + +PNG files store 3 color pixels in red, green, blue order. This code +would be used if they are supplied as blue, green, red: + + png_set_bgr(png_ptr); + +PNG files describe monochrome as black being zero and white being +one. This code would be used if the pixels are supplied with this reversed +(black being one and white being zero): + + png_set_invert_mono(png_ptr); + +Finally, you can write your own transformation function if none of +the existing ones meets your needs. This is done by setting a callback +with + + png_set_write_user_transform_fn(png_ptr, + write_transform_fn); + +You must supply the function + + void write_transform_fn(png_ptr ptr, row_info_ptr + row_info, png_bytep data) + +See pngtest.c for a working example. Your function will be called +before any of the other transformations are processed. + +You can also set up a pointer to a user structure for use by your +callback function. + + png_set_user_transform_info(png_ptr, user_ptr, 0, 0); + +The user_channels and user_depth parameters of this function are ignored +when writing; you can set them to zero as shown. + +You can retrieve the pointer via the function png_get_user_transform_ptr(). +For example: + + voidp write_user_transform_ptr = + png_get_user_transform_ptr(png_ptr); + +It is possible to have libpng flush any pending output, either manually, +or automatically after a certain number of lines have been written. To +flush the output stream a single time call: + + png_write_flush(png_ptr); + +and to have libpng flush the output stream periodically after a certain +number of scanlines have been written, call: + + png_set_flush(png_ptr, nrows); + +Note that the distance between rows is from the last time png_write_flush() +was called, or the first row of the image if it has never been called. +So if you write 50 lines, and then png_set_flush 25, it will flush the +output on the next scanline, and every 25 lines thereafter, unless +png_write_flush() is called before 25 more lines have been written. +If nrows is too small (less than about 10 lines for a 640 pixel wide +RGB image) the image compression may decrease noticeably (although this +may be acceptable for real-time applications). Infrequent flushing will +only degrade the compression performance by a few percent over images +that do not use flushing. + +.SS Writing the image data + +That's it for the transformations. Now you can write the image data. +The simplest way to do this is in one function call. If you have the +whole image in memory, you can just call png_write_image() and libpng +will write the image. You will need to pass in an array of pointers to +each row. This function automatically handles interlacing, so you don't +need to call png_set_interlace_handling() or call this function multiple +times, or any of that other stuff necessary with png_write_rows(). + + png_write_image(png_ptr, row_pointers); + +where row_pointers is: + + png_byte *row_pointers[height]; + +You can point to void or char or whatever you use for pixels. + +If you don't want to write the whole image at once, you can +use png_write_rows() instead. If the file is not interlaced, +this is simple: + + png_write_rows(png_ptr, row_pointers, + number_of_rows); + +row_pointers is the same as in the png_write_image() call. + +If you are just writing one row at a time, you can do this with +a single row_pointer instead of an array of row_pointers: + + png_bytep row_pointer = row; + + png_write_row(png_ptr, row_pointer); + +When the file is interlaced, things can get a good deal more +complicated. The only currently (as of the PNG Specification +version 1.2, dated July 1999) defined interlacing scheme for PNG files +is the "Adam7" interlace scheme, that breaks down an +image into seven smaller images of varying size. libpng will build +these images for you, or you can do them yourself. If you want to +build them yourself, see the PNG specification for details of which +pixels to write when. + +If you don't want libpng to handle the interlacing details, just +use png_set_interlace_handling() and call png_write_rows() the +correct number of times to write all seven sub-images. + +If you want libpng to build the sub-images, call this before you start +writing any rows: + + number_of_passes = + png_set_interlace_handling(png_ptr); + +This will return the number of passes needed. Currently, this +is seven, but may change if another interlace type is added. + +Then write the complete image number_of_passes times. + + png_write_rows(png_ptr, row_pointers, + number_of_rows); + +As some of these rows are not used, and thus return immediately, +you may want to read about interlacing in the PNG specification, +and only update the rows that are actually used. + +.SS Finishing a sequential write + +After you are finished writing the image, you should finish writing +the file. If you are interested in writing comments or time, you should +pass an appropriately filled png_info pointer. If you are not interested, +you can pass NULL. + + png_write_end(png_ptr, info_ptr); + +When you are done, you can free all memory used by libpng like this: + + png_destroy_write_struct(&png_ptr, &info_ptr); + +It is also possible to individually free the info_ptr members that +point to libpng-allocated storage with the following function: + + png_free_data(png_ptr, info_ptr, mask, seq) + mask - identifies data to be freed, a mask + containing the logical OR of one or + more of + PNG_FREE_PLTE, PNG_FREE_TRNS, + PNG_FREE_HIST, PNG_FREE_ICCP, + PNG_FREE_PCAL, PNG_FREE_ROWS, + PNG_FREE_SCAL, PNG_FREE_SPLT, + PNG_FREE_TEXT, PNG_FREE_UNKN, + or simply PNG_FREE_ALL + seq - sequence number of item to be freed + (-1 for all items) + +This function may be safely called when the relevant storage has +already been freed, or has not yet been allocated, or was allocated +by the user and not by libpng, and will in those +cases do nothing. The "seq" parameter is ignored if only one item +of the selected data type, such as PLTE, is allowed. If "seq" is not +-1, and multiple items are allowed for the data type identified in +the mask, such as text or sPLT, only the n'th item in the structure +is freed, where n is "seq". + +If you allocated data such as a palette that you passed +in to libpng with png_set_*, you must not free it until just before the call to +png_destroy_write_struct(). + +The default behavior is only to free data that was allocated internally +by libpng. This can be changed, so that libpng will not free the data, +or so that it will free data that was allocated by the user with png_malloc() +or png_zalloc() and passed in via a png_set_*() function, with + + png_data_freer(png_ptr, info_ptr, freer, mask) + mask - which data elements are affected + same choices as in png_free_data() + freer - one of + PNG_DESTROY_WILL_FREE_DATA + PNG_SET_WILL_FREE_DATA + PNG_USER_WILL_FREE_DATA + +For example, to transfer responsibility for some data from a read structure +to a write structure, you could use + + png_data_freer(read_ptr, read_info_ptr, + PNG_USER_WILL_FREE_DATA, + PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST) + png_data_freer(write_ptr, write_info_ptr, + PNG_DESTROY_WILL_FREE_DATA, + PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST) + +thereby briefly reassigning responsibility for freeing to the user but +immediately afterwards reassigning it once more to the write_destroy +function. Having done this, it would then be safe to destroy the read +structure and continue to use the PLTE, tRNS, and hIST data in the write +structure. + +This function only affects data that has already been allocated. +You can call this function before calling after the png_set_*() functions +to control whether the user or png_destroy_*() is supposed to free the data. +When the user assumes responsibility for libpng-allocated data, the +application must use +png_free() to free it, and when the user transfers responsibility to libpng +for data that the user has allocated, the user must have used png_malloc() +or png_zalloc() to allocate it. + +If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword +separately, do not transfer responsibility for freeing text_ptr to libpng, +because when libpng fills a png_text structure it combines these members with +the key member, and png_free_data() will free only text_ptr.key. Similarly, +if you transfer responsibility for free'ing text_ptr from libpng to your +application, your application must not separately free those members. +For a more compact example of writing a PNG image, see the file example.c. + +.SH V. Modifying/Customizing libpng: + +There are three issues here. The first is changing how libpng does +standard things like memory allocation, input/output, and error handling. +The second deals with more complicated things like adding new chunks, +adding new transformations, and generally changing how libpng works. +Both of those are compile-time issues; that is, they are generally +determined at the time the code is written, and there is rarely a need +to provide the user with a means of changing them. The third is a +run-time issue: choosing between and/or tuning one or more alternate +versions of computationally intensive routines; specifically, optimized +assembly-language (and therefore compiler- and platform-dependent) +versions. + +Memory allocation, input/output, and error handling + +All of the memory allocation, input/output, and error handling in libpng +goes through callbacks that are user-settable. The default routines are +in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change +these functions, call the appropriate png_set_*_fn() function. + +Memory allocation is done through the functions png_malloc() +and png_free(). These currently just call the standard C functions. If +your pointers can't access more then 64K at a time, you will want to set +MAXSEG_64K in zlib.h. Since it is unlikely that the method of handling +memory allocation on a platform will change between applications, these +functions must be modified in the library at compile time. If you prefer +to use a different method of allocating and freeing data, you can use +png_create_read_struct_2() or png_create_write_struct_2() to register +your own functions as described above. + +These functions also provide a void pointer that can be retrieved via + + mem_ptr=png_get_mem_ptr(png_ptr); + +Your replacement memory functions must have prototypes as follows: + + png_voidp malloc_fn(png_structp png_ptr, + png_size_t size); + void free_fn(png_structp png_ptr, png_voidp ptr); + +Your malloc_fn() should return NULL in case of failure. The png_malloc() +function will call png_error() if it receives a NULL from the system +memory allocator or from your replacement malloc_fn(). + +Input/Output in libpng is done through png_read() and png_write(), +which currently just call fread() and fwrite(). The FILE * is stored in +png_struct and is initialized via png_init_io(). If you wish to change +the method of I/O, the library supplies callbacks that you can set +through the function png_set_read_fn() and png_set_write_fn() at run +time, instead of calling the png_init_io() function. These functions +also provide a void pointer that can be retrieved via the function +png_get_io_ptr(). For example: + + png_set_read_fn(png_structp read_ptr, + voidp read_io_ptr, png_rw_ptr read_data_fn) + + png_set_write_fn(png_structp write_ptr, + voidp write_io_ptr, png_rw_ptr write_data_fn, + png_flush_ptr output_flush_fn); + + voidp read_io_ptr = png_get_io_ptr(read_ptr); + voidp write_io_ptr = png_get_io_ptr(write_ptr); + +The replacement I/O functions must have prototypes as follows: + + void user_read_data(png_structp png_ptr, + png_bytep data, png_size_t length); + void user_write_data(png_structp png_ptr, + png_bytep data, png_size_t length); + void user_flush_data(png_structp png_ptr); + +Supplying NULL for the read, write, or flush functions sets them back +to using the default C stream functions. It is an error to read from +a write stream, and vice versa. + +Error handling in libpng is done through png_error() and png_warning(). +Errors handled through png_error() are fatal, meaning that png_error() +should never return to its caller. Currently, this is handled via +setjmp() and longjmp() (unless you have compiled libpng with +PNG_SETJMP_NOT_SUPPORTED, in which case it is handled via PNG_ABORT()), +but you could change this to do things like exit() if you should wish. + +On non-fatal errors, png_warning() is called +to print a warning message, and then control returns to the calling code. +By default png_error() and png_warning() print a message on stderr via +fprintf() unless the library is compiled with PNG_NO_CONSOLE_IO defined +(because you don't want the messages) or PNG_NO_STDIO defined (because +fprintf() isn't available). If you wish to change the behavior of the error +functions, you will need to set up your own message callbacks. These +functions are normally supplied at the time that the png_struct is created. +It is also possible to redirect errors and warnings to your own replacement +functions after png_create_*_struct() has been called by calling: + + png_set_error_fn(png_structp png_ptr, + png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warning_fn); + + png_voidp error_ptr = png_get_error_ptr(png_ptr); + +If NULL is supplied for either error_fn or warning_fn, then the libpng +default function will be used, calling fprintf() and/or longjmp() if a +problem is encountered. The replacement error functions should have +parameters as follows: + + void user_error_fn(png_structp png_ptr, + png_const_charp error_msg); + void user_warning_fn(png_structp png_ptr, + png_const_charp warning_msg); + +The motivation behind using setjmp() and longjmp() is the C++ throw and +catch exception handling methods. This makes the code much easier to write, +as there is no need to check every return code of every function call. +However, there are some uncertainties about the status of local variables +after a longjmp, so the user may want to be careful about doing anything after +setjmp returns non-zero besides returning itself. Consult your compiler +documentation for more details. For an alternative approach, you may wish +to use the "cexcept" facility (see http://cexcept.sourceforge.net). + +.SS Custom chunks + +If you need to read or write custom chunks, you may need to get deeper +into the libpng code. The library now has mechanisms for storing +and writing chunks of unknown type; you can even declare callbacks +for custom chunks. Hoewver, this may not be good enough if the +library code itself needs to know about interactions between your +chunk and existing `intrinsic' chunks. + +If you need to write a new intrinsic chunk, first read the PNG +specification. Acquire a first level of +understanding of how it works. Pay particular attention to the +sections that describe chunk names, and look at how other chunks were +designed, so you can do things similarly. Second, check out the +sections of libpng that read and write chunks. Try to find a chunk +that is similar to yours and use it as a template. More details can +be found in the comments inside the code. It is best to handle unknown +chunks in a generic method, via callback functions, instead of by +modifying libpng functions. + +If you wish to write your own transformation for the data, look through +the part of the code that does the transformations, and check out some of +the simpler ones to get an idea of how they work. Try to find a similar +transformation to the one you want to add and copy off of it. More details +can be found in the comments inside the code itself. + +.SS Configuring for 16 bit platforms + +You will want to look into zconf.h to tell zlib (and thus libpng) that +it cannot allocate more then 64K at a time. Even if you can, the memory +won't be accessible. So limit zlib and libpng to 64K by defining MAXSEG_64K. + +.SS Configuring for DOS + +For DOS users who only have access to the lower 640K, you will +have to limit zlib's memory usage via a png_set_compression_mem_level() +call. See zlib.h or zconf.h in the zlib library for more information. + +.SS Configuring for Medium Model + +Libpng's support for medium model has been tested on most of the popular +compilers. Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets +defined, and FAR gets defined to far in pngconf.h, and you should be +all set. Everything in the library (except for zlib's structure) is +expecting far data. You must use the typedefs with the p or pp on +the end for pointers (or at least look at them and be careful). Make +note that the rows of data are defined as png_bytepp, which is an +unsigned char far * far *. + +.SS Configuring for gui/windowing platforms: + +You will need to write new error and warning functions that use the GUI +interface, as described previously, and set them to be the error and +warning functions at the time that png_create_*_struct() is called, +in order to have them available during the structure initialization. +They can be changed later via png_set_error_fn(). On some compilers, +you may also have to change the memory allocators (png_malloc, etc.). + +.SS Configuring for compiler xxx: + +All includes for libpng are in pngconf.h. If you need to add/change/delete +an include, this is the place to do it. The includes that are not +needed outside libpng are protected by the PNG_INTERNAL definition, +which is only defined for those routines inside libpng itself. The +files in libpng proper only include png.h, which includes pngconf.h. + +.SS Configuring zlib: + +There are special functions to configure the compression. Perhaps the +most useful one changes the compression level, which currently uses +input compression values in the range 0 - 9. The library normally +uses the default compression level (Z_DEFAULT_COMPRESSION = 6). Tests +have shown that for a large majority of images, compression values in +the range 3-6 compress nearly as well as higher levels, and do so much +faster. For online applications it may be desirable to have maximum speed +(Z_BEST_SPEED = 1). With versions of zlib after v0.99, you can also +specify no compression (Z_NO_COMPRESSION = 0), but this would create +files larger than just storing the raw bitmap. You can specify the +compression level by calling: + + png_set_compression_level(png_ptr, level); + +Another useful one is to reduce the memory level used by the library. +The memory level defaults to 8, but it can be lowered if you are +short on memory (running DOS, for example, where you only have 640K). +Note that the memory level does have an effect on compression; among +other things, lower levels will result in sections of incompressible +data being emitted in smaller stored blocks, with a correspondingly +larger relative overhead of up to 15% in the worst case. + + png_set_compression_mem_level(png_ptr, level); + +The other functions are for configuring zlib. They are not recommended +for normal use and may result in writing an invalid PNG file. See +zlib.h for more information on what these mean. + + png_set_compression_strategy(png_ptr, + strategy); + png_set_compression_window_bits(png_ptr, + window_bits); + png_set_compression_method(png_ptr, method); + png_set_compression_buffer_size(png_ptr, size); + +.SS Controlling row filtering + +If you want to control whether libpng uses filtering or not, which +filters are used, and how it goes about picking row filters, you +can call one of these functions. The selection and configuration +of row filters can have a significant impact on the size and +encoding speed and a somewhat lesser impact on the decoding speed +of an image. Filtering is enabled by default for RGB and grayscale +images (with and without alpha), but not for paletted images nor +for any images with bit depths less than 8 bits/pixel. + +The 'method' parameter sets the main filtering method, which is +currently only '0' in the PNG 1.2 specification. The 'filters' +parameter sets which filter(s), if any, should be used for each +scanline. Possible values are PNG_ALL_FILTERS and PNG_NO_FILTERS +to turn filtering on and off, respectively. + +Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB, +PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise +ORed together with '|' to specify one or more filters to use. +These filters are described in more detail in the PNG specification. +If you intend to change the filter type during the course of writing +the image, you should start with flags set for all of the filters +you intend to use so that libpng can initialize its internal +structures appropriately for all of the filter types. (Note that this +means the first row must always be adaptively filtered, because libpng +currently does not allocate the filter buffers until png_write_row() +is called for the first time.) + + filters = PNG_FILTER_NONE | PNG_FILTER_SUB + PNG_FILTER_UP | PNG_FILTER_AVE | + PNG_FILTER_PAETH | PNG_ALL_FILTERS; + + png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, + filters); + The second parameter can also be + PNG_INTRAPIXEL_DIFFERENCING if you are + writing a PNG to be embedded in a MNG + datastream. This parameter must be the + same as the value of filter_method used + in png_set_IHDR(). + +It is also possible to influence how libpng chooses from among the +available filters. This is done in one or both of two ways - by +telling it how important it is to keep the same filter for successive +rows, and by telling it the relative computational costs of the filters. + + double weights[3] = {1.5, 1.3, 1.1}, + costs[PNG_FILTER_VALUE_LAST] = + {1.0, 1.3, 1.3, 1.5, 1.7}; + + png_set_filter_heuristics(png_ptr, + PNG_FILTER_HEURISTIC_WEIGHTED, 3, + weights, costs); + +The weights are multiplying factors that indicate to libpng that the +row filter should be the same for successive rows unless another row filter +is that many times better than the previous filter. In the above example, +if the previous 3 filters were SUB, SUB, NONE, the SUB filter could have a +"sum of absolute differences" 1.5 x 1.3 times higher than other filters +and still be chosen, while the NONE filter could have a sum 1.1 times +higher than other filters and still be chosen. Unspecified weights are +taken to be 1.0, and the specified weights should probably be declining +like those above in order to emphasize recent filters over older filters. + +The filter costs specify for each filter type a relative decoding cost +to be considered when selecting row filters. This means that filters +with higher costs are less likely to be chosen over filters with lower +costs, unless their "sum of absolute differences" is that much smaller. +The costs do not necessarily reflect the exact computational speeds of +the various filters, since this would unduly influence the final image +size. + +Note that the numbers above were invented purely for this example and +are given only to help explain the function usage. Little testing has +been done to find optimum values for either the costs or the weights. + +.SS Removing unwanted object code + +There are a bunch of #define's in pngconf.h that control what parts of +libpng are compiled. All the defines end in _SUPPORTED. If you are +never going to use a capability, you can change the #define to #undef +before recompiling libpng and save yourself code and data space, or +you can turn off individual capabilities with defines that begin with +PNG_NO_. + +You can also turn all of the transforms and ancillary chunk capabilities +off en masse with compiler directives that define +PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS, +or all four, +along with directives to turn on any of the capabilities that you do +want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable +the extra transformations but still leave the library fully capable of reading +and writing PNG files with all known public chunks +Use of the PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive +produces a library that is incapable of reading or writing ancillary chunks. +If you are not using the progressive reading capability, you can +turn that off with PNG_NO_PROGRESSIVE_READ (don't confuse +this with the INTERLACING capability, which you'll still have). + +All the reading and writing specific code are in separate files, so the +linker should only grab the files it needs. However, if you want to +make sure, or if you are building a stand alone library, all the +reading files start with pngr and all the writing files start with +pngw. The files that don't match either (like png.c, pngtrans.c, etc.) +are used for both reading and writing, and always need to be included. +The progressive reader is in pngpread.c + +If you are creating or distributing a dynamically linked library (a .so +or DLL file), you should not remove or disable any parts of the library, +as this will cause applications linked with different versions of the +library to fail if they call functions not available in your library. +The size of the library itself should not be an issue, because only +those sections that are actually used will be loaded into memory. + +.SS Requesting debug printout + +The macro definition PNG_DEBUG can be used to request debugging +printout. Set it to an integer value in the range 0 to 3. Higher +numbers result in increasing amounts of debugging information. The +information is printed to the "stderr" file, unless another file +name is specified in the PNG_DEBUG_FILE macro definition. + +When PNG_DEBUG > 0, the following functions (macros) become available: + + png_debug(level, message) + png_debug1(level, message, p1) + png_debug2(level, message, p1, p2) + +in which "level" is compared to PNG_DEBUG to decide whether to print +the message, "message" is the formatted string to be printed, +and p1 and p2 are parameters that are to be embedded in the string +according to printf-style formatting directives. For example, + + png_debug1(2, "foo=%d\n", foo); + +is expanded to + + if(PNG_DEBUG > 2) + fprintf(PNG_DEBUG_FILE, "foo=%d\n", foo); + +When PNG_DEBUG is defined but is zero, the macros aren't defined, but you +can still use PNG_DEBUG to control your own debugging: + + #ifdef PNG_DEBUG + fprintf(stderr, ... + #endif + +When PNG_DEBUG = 1, the macros are defined, but only png_debug statements +having level = 0 will be printed. There aren't any such statements in +this version of libpng, but if you insert some they will be printed. + +.SH VI. Runtime optimization + +A new feature in libpng 1.2.0 is the ability to dynamically switch between +standard and optimized versions of some routines. Currently these are +limited to three computationally intensive tasks when reading PNG files: +decoding row filters, expanding interlacing, and combining interlaced or +transparent row data with previous row data. Currently the optimized +versions are available only for x86 (Intel, AMD, etc.) platforms with +MMX support, though this may change in future versions. (For example, +the non-MMX assembler optimizations for zlib might become similarly +runtime-selectable in future releases, in which case libpng could be +extended to support them. Alternatively, the compile-time choice of +floating-point versus integer routines for gamma correction might become +runtime-selectable.) + +Because such optimizations tend to be very platform- and compiler-dependent, +both in how they are written and in how they perform, the new runtime code +in libpng has been written to allow programs to query, enable, and disable +either specific optimizations or all such optimizations. For example, to +enable all possible optimizations (bearing in mind that some "optimizations" +may actually run more slowly in rare cases): + + #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) + png_uint_32 mask, flags; + + flags = png_get_asm_flags(png_ptr); + mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE); + png_set_asm_flags(png_ptr, flags | mask); + #endif + +To enable only optimizations relevant to reading PNGs, use PNG_SELECT_READ +by itself when calling png_get_asm_flagmask(); similarly for optimizing +only writing. To disable all optimizations: + + #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) + flags = png_get_asm_flags(png_ptr); + mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE); + png_set_asm_flags(png_ptr, flags & ~mask); + #endif + +To enable or disable only MMX-related features, use png_get_mmx_flagmask() +in place of png_get_asm_flagmask(). The mmx version takes one additional +parameter: + + #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) + int selection = PNG_SELECT_READ | PNG_SELECT_WRITE; + int compilerID; + + mask = png_get_mmx_flagmask(selection, &compilerID); + #endif + +On return, compilerID will indicate which version of the MMX assembler +optimizations was compiled. Currently two flavors exist: Microsoft +Visual C++ (compilerID == 1) and GNU C (a.k.a. gcc/gas, compilerID == 2). +On non-x86 platforms or on systems compiled without MMX optimizations, a +value of -1 is used. + +Note that both png_get_asm_flagmask() and png_get_mmx_flagmask() return +all valid, settable optimization bits for the version of the library that's +currently in use. In the case of shared (dynamically linked) libraries, +this may include optimizations that did not exist at the time the code was +written and compiled. It is also possible, of course, to enable only known, +specific optimizations; for example: + + #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) + flags = PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \ + | PNG_ASM_FLAG_MMX_READ_INTERLACE \ + | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ + | PNG_ASM_FLAG_MMX_READ_FILTER_UP \ + | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ + | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ; + png_set_asm_flags(png_ptr, flags); + #endif + +This method would enable only the MMX read-optimizations available at the +time of libpng 1.2.0's release, regardless of whether a later version of +the DLL were actually being used. (Also note that these functions did not +exist in versions older than 1.2.0, so any attempt to run a dynamically +linked app on such an older version would fail.) + +To determine whether the processor supports MMX instructions at all, use +the png_mmx_support() function: + + #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) + mmxsupport = png_mmx_support(); + #endif + +It returns -1 if MMX support is not compiled into libpng, 0 if MMX code +is compiled but MMX is not supported by the processor, or 1 if MMX support +is fully available. Note that png_mmx_support(), png_get_mmx_flagmask(), +and png_get_asm_flagmask() all may be called without allocating and ini- +tializing any PNG structures (for example, as part of a usage screen or +"about" box). + +The following code can be used to prevent an application from using the +thread_unsafe features, even if libpng was built with PNG_THREAD_UNSAFE_OK +defined: + +#if defined(PNG_USE_PNGGCCRD) && defined(PNG_ASSEMBLER_CODE_SUPPORTED) \ + && defined(PNG_THREAD_UNSAFE_OK) + /* Disable thread-unsafe features of pnggccrd */ + if (png_access_version() >= 10200) + { + png_uint_32 mmx_disable_mask = 0; + png_uint_32 asm_flags; + + mmx_disable_mask |= ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \ + | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ + | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ + | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ); + asm_flags = png_get_asm_flags(png_ptr); + png_set_asm_flags(png_ptr, asm_flags & ~mmx_disable_mask); + } +#endif + +For more extensive examples of runtime querying, enabling and disabling +of optimized features, see contrib/gregbook/readpng2.c in the libpng +source-code distribution. + + +.SH VII. MNG support + +The MNG specification (available at http://www.libpng.org/pub/mng) allows +certain extensions to PNG for PNG images that are embedded in MNG datastreams. +Libpng can support some of these extensions. To enable them, use the +png_permit_mng_features() function: + + feature_set = png_permit_mng_features(png_ptr, mask) + mask is a png_uint_32 containing the logical OR of the + features you want to enable. These include + PNG_FLAG_MNG_EMPTY_PLTE + PNG_FLAG_MNG_FILTER_64 + PNG_ALL_MNG_FEATURES + feature_set is a png_32_uint that is the logical AND of + your mask with the set of MNG features that is + supported by the version of libpng that you are using. + +It is an error to use this function when reading or writing a standalone +PNG file with the PNG 8-byte signature. The PNG datastream must be wrapped +in a MNG datastream. As a minimum, it must have the MNG 8-byte signature +and the MHDR and MEND chunks. Libpng does not provide support for these +or any other MNG chunks; your application must provide its own support for +them. You may wish to consider using libmng (available at +http://www.libmng.com) instead. + +.SH VIII. Changes to Libpng from version 0.88 + +It should be noted that versions of libpng later than 0.96 are not +distributed by the original libpng author, Guy Schalnat, nor by +Andreas Dilger, who had taken over from Guy during 1996 and 1997, and +distributed versions 0.89 through 0.96, but rather by another member +of the original PNG Group, Glenn Randers-Pehrson. Guy and Andreas are +still alive and well, but they have moved on to other things. + +The old libpng functions png_read_init(), png_write_init(), +png_info_init(), png_read_destroy(), and png_write_destroy() have been +moved to PNG_INTERNAL in version 0.95 to discourage their use. These +functions will be removed from libpng version 2.0.0. + +The preferred method of creating and initializing the libpng structures is +via the png_create_read_struct(), png_create_write_struct(), and +png_create_info_struct() because they isolate the size of the structures +from the application, allow version error checking, and also allow the +use of custom error handling routines during the initialization, which +the old functions do not. The functions png_read_destroy() and +png_write_destroy() do not actually free the memory that libpng +allocated for these structs, but just reset the data structures, so they +can be used instead of png_destroy_read_struct() and +png_destroy_write_struct() if you feel there is too much system overhead +allocating and freeing the png_struct for each image read. + +Setting the error callbacks via png_set_message_fn() before +png_read_init() as was suggested in libpng-0.88 is no longer supported +because this caused applications that do not use custom error functions +to fail if the png_ptr was not initialized to zero. It is still possible +to set the error callbacks AFTER png_read_init(), or to change them with +png_set_error_fn(), which is essentially the same function, but with a new +name to force compilation errors with applications that try to use the old +method. + +Starting with version 1.0.7, you can find out which version of the library +you are using at run-time: + + png_uint_32 libpng_vn = png_access_version_number(); + +The number libpng_vn is constructed from the major version, minor +version with leading zero, and release number with leading zero, +(e.g., libpng_vn for version 1.0.7 is 10007). + +You can also check which version of png.h you used when compiling your +application: + + png_uint_32 application_vn = PNG_LIBPNG_VER; + +.SH IX. Y2K Compliance in libpng + +October 3, 2002 + +Since the PNG Development group is an ad-hoc body, we can't make +an official declaration. + +This is your unofficial assurance that libpng from version 0.71 and +upward through 1.2.5 are Y2K compliant. It is my belief that earlier +versions were also Y2K compliant. + +Libpng only has three year fields. One is a 2-byte unsigned integer that +will hold years up to 65535. The other two hold the date in text +format, and will hold years up to 9999. + +The integer is + "png_uint_16 year" in png_time_struct. + +The strings are + "png_charp time_buffer" in png_struct and + "near_time_buffer", which is a local character string in png.c. + +There are seven time-related functions: + + png_convert_to_rfc_1123() in png.c + (formerly png_convert_to_rfc_1152() in error) + png_convert_from_struct_tm() in pngwrite.c, called + in pngwrite.c + png_convert_from_time_t() in pngwrite.c + png_get_tIME() in pngget.c + png_handle_tIME() in pngrutil.c, called in pngread.c + png_set_tIME() in pngset.c + png_write_tIME() in pngwutil.c, called in pngwrite.c + +All appear to handle dates properly in a Y2K environment. The +png_convert_from_time_t() function calls gmtime() to convert from system +clock time, which returns (year - 1900), which we properly convert to +the full 4-digit year. There is a possibility that applications using +libpng are not passing 4-digit years into the png_convert_to_rfc_1123() +function, or that they are incorrectly passing only a 2-digit year +instead of "year - 1900" into the png_convert_from_struct_tm() function, +but this is not under our control. The libpng documentation has always +stated that it works with 4-digit years, and the APIs have been +documented as such. + +The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned +integer to hold the year, and can hold years as large as 65535. + +zlib, upon which libpng depends, is also Y2K compliant. It contains +no date-related code. + + + Glenn Randers-Pehrson + libpng maintainer + PNG Development Group + +.SH NOTE + +Note about libpng version numbers: + +Due to various miscommunications, unforeseen code incompatibilities +and occasional factors outside the authors' control, version numbering +on the library has not always been consistent and straightforward. +The following table summarizes matters since version 0.89c, which was +the first widely used release: + + source png.h png.h shared-lib + version string int version + ------- ------ ----- ---------- + 0.89c ("beta 3") 0.89 89 1.0.89 + 0.90 ("beta 4") 0.90 90 0.90 + 0.95 ("beta 5") 0.95 95 0.95 + 0.96 ("beta 6") 0.96 96 0.96 + 0.97b ("beta 7") 1.00.97 97 1.0.1 + 0.97c 0.97 97 2.0.97 + 0.98 0.98 98 2.0.98 + 0.99 0.99 98 2.0.99 + 0.99a-m 0.99 99 2.0.99 + 1.00 1.00 100 2.1.0 + 1.0.0 1.0.0 100 2.1.0 + 1.0.0 (from here on, the 100 2.1.0 + 1.0.1 png.h string is 10001 2.1.0 + 1.0.1a-e identical to the 10002 from here on, the + 1.0.2 source version) 10002 shared library is 2.V + 1.0.2a-b 10003 where V is the source + 1.0.1 10001 code version except as + 1.0.1a-e 10002 2.1.0.1a-e noted. + 1.0.2 10002 2.1.0.2 + 1.0.2a-b 10003 2.1.0.2a-b + 1.0.3 10003 2.1.0.3 + 1.0.3a-d 10004 2.1.0.3a-d + 1.0.4 10004 2.1.0.4 + 1.0.4a-f 10005 2.1.0.4a-f + 1.0.5 (+ 2 patches) 10005 2.1.0.5 + 1.0.5a-d 10006 2.1.0.5a-d + 1.0.5e-r 10100 2.1.0.5e-r + 1.0.5s-v 10006 2.1.0.5s-v + 1.0.6 (+ 3 patches) 10006 2.1.0.6 + 1.0.6d-g 10007 2.1.0.6d-g + 1.0.6h 10007 10.6h + 1.0.6i 10007 10.6i + 1.0.6j 10007 2.1.0.6j + 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 + 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 + 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 + 1.0.7 1 10007 2.1.0.7 + 1.0.8beta1-4 1 10008 2.1.0.8beta1-4 + 1.0.8rc1 1 10008 2.1.0.8rc1 + 1.0.8 1 10008 2.1.0.8 + 1.0.9beta1-6 1 10009 2.1.0.9beta1-6 + 1.0.9rc1 1 10009 2.1.0.9rc1 + 1.0.9beta7-10 1 10009 2.1.0.9beta7-10 + 1.0.9rc2 1 10009 2.1.0.9rc2 + 1.0.9 1 10009 2.1.0.9 + 1.0.10beta1 1 10010 2.1.0.10beta1 + 1.0.10rc1 1 10010 2.1.0.10rc1 + 1.0.10 1 10010 2.1.0.10 + 1.0.11beta1-3 1 10011 2.1.0.11beta1-3 + 1.0.11rc1 1 10011 2.1.0.11rc1 + 1.0.11 1 10011 2.1.0.11 + 1.0.12beta1-2 2 10012 2.1.0.12beta1-2 + 1.0.12rc1 2 10012 2.1.0.12rc1 + 1.0.12 2 10012 2.1.0.12 + 1.1.0a-f - 10100 2.1.1.0a-f abandoned + 1.2.0beta1-2 2 10200 2.1.2.0beta1-2 + 1.2.0beta3-5 3 10200 3.1.2.0beta3-5 + 1.2.0rc1 3 10200 3.1.2.0rc1 + 1.2.0 3 10200 3.1.2.0 + 1.2.1beta-4 3 10201 3.1.2.1beta1-4 + 1.2.1rc1-2 3 10201 3.1.2.1rc1-2 + 1.2.1 3 10201 3.1.2.1 + 1.2.2beta1-6 12 10202 12.so.0.1.2.2beta1-6 + 1.0.13beta1 10 10013 10.so.0.1.0.13beta1 + 1.0.13rc1 10 10013 10.so.0.1.0.13rc1 + 1.2.2rc1 12 10202 12.so.0.1.2.2rc1 + 1.0.13 10 10013 10.so.0.1.0.13 + 1.2.2 12 10202 12.so.0.1.2.2 + 1.2.3rc1-6 12 10203 12.so.0.1.2.3rc1-6 + 1.2.3 12 10203 12.so.0.1.2.3 + 1.2.4beta1-3 13 10204 12.so.0.1.2.4beta1-3 + 1.2.4rc1 13 10204 12.so.0.1.2.4rc1 + 1.0.14 10 10014 10.so.0.1.0.14 + 1.2.4 13 10204 12.so.0.1.2.4 + 1.0.15rc1-3 10 10015 10.so.0.1.0.15rc1-3 + 1.2.5rc1-3 13 10205 12.so.0.1.2.5rc1-3 + 1.0.15 10 10015 10.so.0.1.0.15 + 1.2.5 13 10205 12.so.0.1.2.5 + +Henceforth the source version will match the shared-library minor +and patch numbers; the shared-library major version number will be +used for changes in backward compatibility, as it is intended. The +PNG_PNGLIB_VER macro, which is not used within libpng but is available +for applications, is an unsigned integer of the form xyyzz corresponding +to the source version x.y.z (leading zeros in y and z). Beta versions +were given the previous public release number plus a letter, until +version 1.0.6j; from then on they were given the upcoming public +release number plus "betaNN" or "rcN". + +.SH "SEE ALSO" +libpngpf(3), png(5) +.LP +.IR libpng : +.IP +ftp://ftp.uu.net/graphics/png +http://www.libpng.org/pub/png + +.LP +.IR zlib : +.IP +(generally) at the same location as +.I libpng +or at +.br +ftp://ftp.uu.net/pub/archiving/zip/zlib +.br +ftp://ftp.info-zip.org/pub/infozip/zlib + +.LP +.IR PNG specification: RFC 2083 +.IP +(generally) at the same location as +.I libpng +or at +.br +ftp://ds.internic.net/rfc/rfc2083.txt +.br +or (as a W3C Recommendation) at +.br +http://www.w3.org/TR/REC-png.html + +.LP +In the case of any inconsistency between the PNG specification +and this library, the specification takes precedence. + +.SH AUTHORS +This man page: Glenn Randers-Pehrson + + +The contributing authors would like to thank all those who helped +with testing, bug fixes, and patience. This wouldn't have been +possible without all of you. + +Thanks to Frank J. T. Wojcik for helping with the documentation. + +Libpng version 1.2.5 - October 3, 2002: +Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. +Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu). + +Supported by the PNG development group +.br +(png-implement@ccrc.wustl.edu). + +.SH COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: + +(This copy of the libpng notices is provided for your convenience. In case of +any discrepancy between this copy and the notices in the file png.h that is +included in the libpng distribution, the latter shall prevail.) + +If you modify libpng you may insert additional notices immediately following +this sentence. + +libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are +Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.0.6 +with the following individuals added to the list of Contributing Authors + + Simon-Pierre Cadieux + Eric S. Raymond + Gilles Vollant + +and with the following additions to the disclaimer: + + There is no warranty against interference with your + enjoyment of the library or against infringement. + There is no warranty that our efforts or the library + will fulfill any of your particular purposes or needs. + This library is provided with all faults, and the entire + risk of satisfactory quality, performance, accuracy, and + effort is with the user. + +libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998, 1999 Glenn Randers-Pehrson +Distributed according to the same disclaimer and license as libpng-0.96, +with the following individuals added to the list of Contributing Authors: + + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik + +libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996, 1997 Andreas Dilger +Distributed according to the same disclaimer and license as libpng-0.88, +with the following individuals added to the list of Contributing Authors: + + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner + +libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. + +For the purposes of this copyright and license, "Contributing Authors" +is defined as the following set of individuals: + + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner + +The PNG Reference Library is supplied "AS IS". The Contributing Authors +and Group 42, Inc. disclaim all warranties, expressed or implied, +including, without limitation, the warranties of merchantability and of +fitness for any purpose. The Contributing Authors and Group 42, Inc. +assume no liability for direct, indirect, incidental, special, exemplary, +or consequential damages, which may result from the use of the PNG +Reference Library, even if advised of the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute this +source code, or portions hereof, for any purpose, without fee, subject +to the following restrictions: + +1. The origin of this source code must not be misrepresented. + +2. Altered versions must be plainly marked as such and + must not be misrepresented as being the original source. + +3. This Copyright notice may not be removed or altered from + any source or altered source distribution. + +The Contributing Authors and Group 42, Inc. specifically permit, without +fee, and encourage the use of this source code as a component to +supporting the PNG file format in commercial products. If you use this +source code in a product, acknowledgment is not required but would be +appreciated. + + +A "png_get_copyright" function is available, for convenient use in "about" +boxes and the like: + + printf("%s",png_get_copyright(NULL)); + +Also, the PNG logo (in PNG format, of course) is supplied in the +files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). + +Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a +certification mark of the Open Source Initiative. + +Glenn Randers-Pehrson +randeg@alum.rpi.edu +October 3, 2002 + +.\" end of man page + diff --git a/gtkmm-osx/libpng-1.2.5/libpng.pc b/gtkmm-osx/libpng-1.2.5/libpng.pc new file mode 100644 index 0000000..2407538 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/libpng.pc @@ -0,0 +1,11 @@ + +prefix=/Applications/SynfigStudio.app/Contents/synfig +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${exec_prefix}/include + +Name: libpng12 +Description: Loads and saves PNG files +Version: 1.2.5 +Libs: -L${libdir} -lpng12 -lz +Cflags: -I${includedir}/libpng12 diff --git a/gtkmm-osx/libpng-1.2.5/libpng.txt b/gtkmm-osx/libpng-1.2.5/libpng.txt new file mode 100644 index 0000000..689b564 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/libpng.txt @@ -0,0 +1,2905 @@ +libpng.txt - A description on how to use and modify libpng + + libpng version 1.2.5 - October 3, 2002 + Updated and distributed by Glenn Randers-Pehrson + + Copyright (c) 1998-2002 Glenn Randers-Pehrson + For conditions of distribution and use, see copyright + notice in png.h. + + based on: + + libpng 1.0 beta 6 version 0.96 May 28, 1997 + Updated and distributed by Andreas Dilger + Copyright (c) 1996, 1997 Andreas Dilger + + libpng 1.0 beta 2 - version 0.88 January 26, 1996 + For conditions of distribution and use, see copyright + notice in png.h. Copyright (c) 1995, 1996 Guy Eric + Schalnat, Group 42, Inc. + + Updated/rewritten per request in the libpng FAQ + Copyright (c) 1995, 1996 Frank J. T. Wojcik + December 18, 1995 & January 20, 1996 + +I. Introduction + +This file describes how to use and modify the PNG reference library +(known as libpng) for your own use. There are five sections to this +file: introduction, structures, reading, writing, and modification and +configuration notes for various special platforms. In addition to this +file, example.c is a good starting point for using the library, as +it is heavily commented and should include everything most people +will need. We assume that libpng is already installed; see the +INSTALL file for instructions on how to install libpng. + +Libpng was written as a companion to the PNG specification, as a way +of reducing the amount of time and effort it takes to support the PNG +file format in application programs. + +The PNG-1.2 specification is available at +and at . + +The PNG-1.0 specification is available +as RFC 2083 and as a +W3C Recommendation . Some +additional chunks are described in the special-purpose public chunks +documents at . + +Other information +about PNG, and the latest version of libpng, can be found at the PNG home +page, +and at . + +Most users will not have to modify the library significantly; advanced +users may want to modify it more. All attempts were made to make it as +complete as possible, while keeping the code easy to understand. +Currently, this library only supports C. Support for other languages +is being considered. + +Libpng has been designed to handle multiple sessions at one time, +to be easily modifiable, to be portable to the vast majority of +machines (ANSI, K&R, 16-, 32-, and 64-bit) available, and to be easy +to use. The ultimate goal of libpng is to promote the acceptance of +the PNG file format in whatever way possible. While there is still +work to be done (see the TODO file), libpng should cover the +majority of the needs of its users. + +Libpng uses zlib for its compression and decompression of PNG files. +Further information about zlib, and the latest version of zlib, can +be found at the zlib home page, . +The zlib compression utility is a general purpose utility that is +useful for more than PNG files, and can be used without libpng. +See the documentation delivered with zlib for more details. +You can usually find the source files for the zlib utility wherever you +find the libpng source files. + +Libpng is thread safe, provided the threads are using different +instances of the structures. Each thread should have its own +png_struct and png_info instances, and thus its own image. +Libpng does not protect itself against two threads using the +same instance of a structure. Note: thread safety may be defeated +by use of some of the MMX assembler code in pnggccrd.c, which is only +compiled when the user defines PNG_THREAD_UNSAFE_OK. + + +II. Structures + +There are two main structures that are important to libpng, png_struct +and png_info. The first, png_struct, is an internal structure that +will not, for the most part, be used by a user except as the first +variable passed to every libpng function call. + +The png_info structure is designed to provide information about the +PNG file. At one time, the fields of png_info were intended to be +directly accessible to the user. However, this tended to cause problems +with applications using dynamically loaded libraries, and as a result +a set of interface functions for png_info (the png_get_*() and png_set_*() +functions) was developed. The fields of png_info are still available for +older applications, but it is suggested that applications use the new +interfaces if at all possible. + +Applications that do make direct access to the members of png_struct (except +for png_ptr->jmpbuf) must be recompiled whenever the library is updated, +and applications that make direct access to the members of png_info must +be recompiled if they were compiled or loaded with libpng version 1.0.6, +in which the members were in a different order. In version 1.0.7, the +members of the png_info structure reverted to the old order, as they were +in versions 0.97c through 1.0.5. Starting with version 2.0.0, both +structures are going to be hidden, and the contents of the structures will +only be accessible through the png_get/png_set functions. + +The png.h header file is an invaluable reference for programming with libpng. +And while I'm on the topic, make sure you include the libpng header file: + +#include + +III. Reading + +We'll now walk you through the possible functions to call when reading +in a PNG file sequentially, briefly explaining the syntax and purpose +of each one. See example.c and png.h for more detail. While +progressive reading is covered in the next section, you will still +need some of the functions discussed in this section to read a PNG +file. + +Setup + +You will want to do the I/O initialization(*) before you get into libpng, +so if it doesn't work, you don't have much to undo. Of course, you +will also want to insure that you are, in fact, dealing with a PNG +file. Libpng provides a simple check to see if a file is a PNG file. +To use it, pass in the first 1 to 8 bytes of the file to the function +png_sig_cmp(), and it will return 0 if the bytes match the corresponding +bytes of the PNG signature, or nonzero otherwise. Of course, the more bytes +you pass in, the greater the accuracy of the prediction. + +If you are intending to keep the file pointer open for use in libpng, +you must ensure you don't read more than 8 bytes from the beginning +of the file, and you also have to make a call to png_set_sig_bytes_read() +with the number of bytes you read from the beginning. Libpng will +then only check the bytes (if any) that your program didn't read. + +(*): If you are not using the standard I/O functions, you will need +to replace them with custom functions. See the discussion under +Customizing libpng. + + + FILE *fp = fopen(file_name, "rb"); + if (!fp) + { + return (ERROR); + } + fread(header, 1, number, fp); + is_png = !png_sig_cmp(header, 0, number); + if (!is_png) + { + return (NOT_PNG); + } + + +Next, png_struct and png_info need to be allocated and initialized. In +order to ensure that the size of these structures is correct even with a +dynamically linked libpng, there are functions to initialize and +allocate the structures. We also pass the library version, optional +pointers to error handling functions, and a pointer to a data struct for +use by the error functions, if necessary (the pointer and functions can +be NULL if the default error handlers are to be used). See the section +on Changes to Libpng below regarding the old initialization functions. +The structure allocation functions quietly return NULL if they fail to +create the structure, so your application should check for that. + + png_structp png_ptr = png_create_read_struct + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn); + if (!png_ptr) + return (ERROR); + + png_infop info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) + { + png_destroy_read_struct(&png_ptr, + (png_infopp)NULL, (png_infopp)NULL); + return (ERROR); + } + + png_infop end_info = png_create_info_struct(png_ptr); + if (!end_info) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + return (ERROR); + } + +If you want to use your own memory allocation routines, +define PNG_USER_MEM_SUPPORTED and use +png_create_read_struct_2() instead of png_create_read_struct(): + + png_structp png_ptr = png_create_read_struct_2 + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn, (png_voidp) + user_mem_ptr, user_malloc_fn, user_free_fn); + +The error handling routines passed to png_create_read_struct() +and the memory alloc/free routines passed to png_create_struct_2() +are only necessary if you are not using the libpng supplied error +handling and memory alloc/free functions. + +When libpng encounters an error, it expects to longjmp back +to your routine. Therefore, you will need to call setjmp and pass +your png_jmpbuf(png_ptr). If you read the file from different +routines, you will need to update the jmpbuf field every time you enter +a new routine that will call a png_*() function. + +See your documentation of setjmp/longjmp for your compiler for more +information on setjmp/longjmp. See the discussion on libpng error +handling in the Customizing Libpng section below for more information +on the libpng error handling. If an error occurs, and libpng longjmp's +back to your setjmp, you will want to call png_destroy_read_struct() to +free any memory. + + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + &end_info); + fclose(fp); + return (ERROR); + } + +If you would rather avoid the complexity of setjmp/longjmp issues, +you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case +errors will result in a call to PNG_ABORT() which defaults to abort(). + +Now you need to set up the input code. The default for libpng is to +use the C function fread(). If you use this, you will need to pass a +valid FILE * in the function png_init_io(). Be sure that the file is +opened in binary mode. If you wish to handle reading data in another +way, you need not call the png_init_io() function, but you must then +implement the libpng I/O methods discussed in the Customizing Libpng +section below. + + png_init_io(png_ptr, fp); + +If you had previously opened the file and read any of the signature from +the beginning in order to see if this was a PNG file, you need to let +libpng know that there are some bytes missing from the start of the file. + + png_set_sig_bytes(png_ptr, number); + +Setting up callback code + +You can set up a callback function to handle any unknown chunks in the +input stream. You must supply the function + + read_chunk_callback(png_ptr ptr, + png_unknown_chunkp chunk); + { + /* The unknown chunk structure contains your + chunk data: */ + png_byte name[5]; + png_byte *data; + png_size_t size; + /* Note that libpng has already taken care of + the CRC handling */ + + /* put your code here. Return one of the + following: */ + + return (-n); /* chunk had an error */ + return (0); /* did not recognize */ + return (n); /* success */ + } + +(You can give your function another name that you like instead of +"read_chunk_callback") + +To inform libpng about your function, use + + png_set_read_user_chunk_fn(png_ptr, user_chunk_ptr, + read_chunk_callback); + +This names not only the callback function, but also a user pointer that +you can retrieve with + + png_get_user_chunk_ptr(png_ptr); + +At this point, you can set up a callback function that will be +called after each row has been read, which you can use to control +a progress meter or the like. It's demonstrated in pngtest.c. +You must supply a function + + void read_row_callback(png_ptr ptr, png_uint_32 row, + int pass); + { + /* put your code here */ + } + +(You can give it another name that you like instead of "read_row_callback") + +To inform libpng about your function, use + + png_set_read_status_fn(png_ptr, read_row_callback); + +Unknown-chunk handling + +Now you get to set the way the library processes unknown chunks in the +input PNG stream. Both known and unknown chunks will be read. Normal +behavior is that known chunks will be parsed into information in +various info_ptr members; unknown chunks will be discarded. To change +this, you can call: + + png_set_keep_unknown_chunks(png_ptr, info_ptr, keep, + chunk_list, num_chunks); + keep - 0: do not keep + 1: keep only if safe-to-copy + 2: keep even if unsafe-to-copy + chunk_list - list of chunks affected (a byte string, + five bytes per chunk, NULL or '\0' if + num_chunks is 0) + num_chunks - number of chunks affected; if 0, all + unknown chunks are affected + +Unknown chunks declared in this way will be saved as raw data onto a +list of png_unknown_chunk structures. If a chunk that is normally +known to libpng is named in the list, it will be handled as unknown, +according to the "keep" directive. If a chunk is named in successive +instances of png_set_keep_unknown_chunks(), the final instance will +take precedence. + +The high-level read interface + +At this point there are two ways to proceed; through the high-level +read interface, or through a sequence of low-level read operations. +You can use the high-level interface if (a) you are willing to read +the entire image into memory, and (b) the input transformations +you want to do are limited to the following set: + + PNG_TRANSFORM_IDENTITY No transformation + PNG_TRANSFORM_STRIP_16 Strip 16-bit samples to + 8 bits + PNG_TRANSFORM_STRIP_ALPHA Discard the alpha channel + PNG_TRANSFORM_PACKING Expand 1, 2 and 4-bit + samples to bytes + PNG_TRANSFORM_PACKSWAP Change order of packed + pixels to LSB first + PNG_TRANSFORM_EXPAND Perform set_expand() + PNG_TRANSFORM_INVERT_MONO Invert monochrome images + PNG_TRANSFORM_SHIFT Normalize pixels to the + sBIT depth + PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA + to BGRA + PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA + to AG + PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity + to transparency + PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples + +(This excludes setting a background color, doing gamma transformation, +dithering, and setting filler.) If this is the case, simply do this: + + png_read_png(png_ptr, info_ptr, png_transforms, NULL) + +where png_transforms is an integer containing the logical OR of +some set of transformation flags. This call is equivalent to png_read_info(), +followed the set of transformations indicated by the transform mask, +then png_read_image(), and finally png_read_end(). + +(The final parameter of this call is not yet used. Someday it might point +to transformation parameters required by some future input transform.) + +After you have called png_read_png(), you can retrieve the image data +with + + row_pointers = png_get_rows(png_ptr, info_ptr); + +where row_pointers is an array of pointers to the pixel data for each row: + + png_bytep row_pointers[height]; + +If you know your image size and pixel size ahead of time, you can allocate +row_pointers prior to calling png_read_png() with + + row_pointers = png_malloc(png_ptr, + height*sizeof(png_bytep)); + for (int i=0; i) and +png_get_(png_ptr, info_ptr, ...) functions return non-zero if the +data has been read, or zero if it is missing. The parameters to the +png_get_ are set directly if they are simple data types, or a pointer +into the info_ptr is returned for any complex types. + + png_get_PLTE(png_ptr, info_ptr, &palette, + &num_palette); + palette - the palette for the file + (array of png_color) + num_palette - number of entries in the palette + + png_get_gAMA(png_ptr, info_ptr, &gamma); + gamma - the gamma the file is written + at (PNG_INFO_gAMA) + + png_get_sRGB(png_ptr, info_ptr, &srgb_intent); + srgb_intent - the rendering intent (PNG_INFO_sRGB) + The presence of the sRGB chunk + means that the pixel data is in the + sRGB color space. This chunk also + implies specific values of gAMA and + cHRM. + + png_get_iCCP(png_ptr, info_ptr, &name, + &compression_type, &profile, &proflen); + name - The profile name. + compression - The compression type; always + PNG_COMPRESSION_TYPE_BASE for PNG 1.0. + You may give NULL to this argument to + ignore it. + profile - International Color Consortium color + profile data. May contain NULs. + proflen - length of profile data in bytes. + + png_get_sBIT(png_ptr, info_ptr, &sig_bit); + sig_bit - the number of significant bits for + (PNG_INFO_sBIT) each of the gray, + red, green, and blue channels, + whichever are appropriate for the + given color type (png_color_16) + + png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, + &trans_values); + trans - array of transparent entries for + palette (PNG_INFO_tRNS) + trans_values - graylevel or color sample values of + the single transparent color for + non-paletted images (PNG_INFO_tRNS) + num_trans - number of transparent entries + (PNG_INFO_tRNS) + + png_get_hIST(png_ptr, info_ptr, &hist); + (PNG_INFO_hIST) + hist - histogram of palette (array of + png_uint_16) + + png_get_tIME(png_ptr, info_ptr, &mod_time); + mod_time - time image was last modified + (PNG_VALID_tIME) + + png_get_bKGD(png_ptr, info_ptr, &background); + background - background color (PNG_VALID_bKGD) + valid 16-bit red, green and blue + values, regardless of color_type + + num_comments = png_get_text(png_ptr, info_ptr, + &text_ptr, &num_text); + num_comments - number of comments + text_ptr - array of png_text holding image + comments + text_ptr[i].compression - type of compression used + on "text" PNG_TEXT_COMPRESSION_NONE + PNG_TEXT_COMPRESSION_zTXt + PNG_ITXT_COMPRESSION_NONE + PNG_ITXT_COMPRESSION_zTXt + text_ptr[i].key - keyword for comment. Must contain + 1-79 characters. + text_ptr[i].text - text comments for current + keyword. Can be empty. + text_ptr[i].text_length - length of text string, + after decompression, 0 for iTXt + text_ptr[i].itxt_length - length of itxt string, + after decompression, 0 for tEXt/zTXt + text_ptr[i].lang - language of comment (empty + string for unknown). + text_ptr[i].lang_key - keyword in UTF-8 + (empty string for unknown). + num_text - number of comments (same as + num_comments; you can put NULL here + to avoid the duplication) + Note while png_set_text() will accept text, language, + and translated keywords that can be NULL pointers, the + structure returned by png_get_text will always contain + regular zero-terminated C strings. They might be + empty strings but they will never be NULL pointers. + + num_spalettes = png_get_sPLT(png_ptr, info_ptr, + &palette_ptr); + palette_ptr - array of palette structures holding + contents of one or more sPLT chunks + read. + num_spalettes - number of sPLT chunks read. + + png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y, + &unit_type); + offset_x - positive offset from the left edge + of the screen + offset_y - positive offset from the top edge + of the screen + unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER + + png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y, + &unit_type); + res_x - pixels/unit physical resolution in + x direction + res_y - pixels/unit physical resolution in + x direction + unit_type - PNG_RESOLUTION_UNKNOWN, + PNG_RESOLUTION_METER + + png_get_sCAL(png_ptr, info_ptr, &unit, &width, + &height) + unit - physical scale units (an integer) + width - width of a pixel in physical scale units + height - height of a pixel in physical scale units + (width and height are doubles) + + png_get_sCAL_s(png_ptr, info_ptr, &unit, &width, + &height) + unit - physical scale units (an integer) + width - width of a pixel in physical scale units + height - height of a pixel in physical scale units + (width and height are strings like "2.54") + + num_unknown_chunks = png_get_unknown_chunks(png_ptr, + info_ptr, &unknowns) + unknowns - array of png_unknown_chunk + structures holding unknown chunks + unknowns[i].name - name of unknown chunk + unknowns[i].data - data of unknown chunk + unknowns[i].size - size of unknown chunk's data + unknowns[i].location - position of chunk in file + + The value of "i" corresponds to the order in which the + chunks were read from the PNG file or inserted with the + png_set_unknown_chunks() function. + +The data from the pHYs chunk can be retrieved in several convenient +forms: + + res_x = png_get_x_pixels_per_meter(png_ptr, + info_ptr) + res_y = png_get_y_pixels_per_meter(png_ptr, + info_ptr) + res_x_and_y = png_get_pixels_per_meter(png_ptr, + info_ptr) + res_x = png_get_x_pixels_per_inch(png_ptr, + info_ptr) + res_y = png_get_y_pixels_per_inch(png_ptr, + info_ptr) + res_x_and_y = png_get_pixels_per_inch(png_ptr, + info_ptr) + aspect_ratio = png_get_pixel_aspect_ratio(png_ptr, + info_ptr) + + (Each of these returns 0 [signifying "unknown"] if + the data is not present or if res_x is 0; + res_x_and_y is 0 if res_x != res_y) + +The data from the oFFs chunk can be retrieved in several convenient +forms: + + x_offset = png_get_x_offset_microns(png_ptr, info_ptr); + y_offset = png_get_y_offset_microns(png_ptr, info_ptr); + x_offset = png_get_x_offset_inches(png_ptr, info_ptr); + y_offset = png_get_y_offset_inches(png_ptr, info_ptr); + + (Each of these returns 0 [signifying "unknown" if both + x and y are 0] if the data is not present or if the + chunk is present but the unit is the pixel) + +For more information, see the png_info definition in png.h and the +PNG specification for chunk contents. Be careful with trusting +rowbytes, as some of the transformations could increase the space +needed to hold a row (expand, filler, gray_to_rgb, etc.). +See png_read_update_info(), below. + +A quick word about text_ptr and num_text. PNG stores comments in +keyword/text pairs, one pair per chunk, with no limit on the number +of text chunks, and a 2^31 byte limit on their size. While there are +suggested keywords, there is no requirement to restrict the use to these +strings. It is strongly suggested that keywords and text be sensible +to humans (that's the point), so don't use abbreviations. Non-printing +symbols are not allowed. See the PNG specification for more details. +There is also no requirement to have text after the keyword. + +Keywords should be limited to 79 Latin-1 characters without leading or +trailing spaces, but non-consecutive spaces are allowed within the +keyword. It is possible to have the same keyword any number of times. +The text_ptr is an array of png_text structures, each holding a +pointer to a language string, a pointer to a keyword and a pointer to +a text string. The text string, language code, and translated +keyword may be empty or NULL pointers. The keyword/text +pairs are put into the array in the order that they are received. +However, some or all of the text chunks may be after the image, so, to +make sure you have read all the text chunks, don't mess with these +until after you read the stuff after the image. This will be +mentioned again below in the discussion that goes with png_read_end(). + +Input transformations + +After you've read the header information, you can set up the library +to handle any special transformations of the image data. The various +ways to transform the data will be described in the order that they +should occur. This is important, as some of these change the color +type and/or bit depth of the data, and some others only work on +certain color types and bit depths. Even though each transformation +checks to see if it has data that it can do something with, you should +make sure to only enable a transformation if it will be valid for the +data. For example, don't swap red and blue on grayscale data. + +The colors used for the background and transparency values should be +supplied in the same format/depth as the current image data. They +are stored in the same format/depth as the image data in a bKGD or tRNS +chunk, so this is what libpng expects for this data. The colors are +transformed to keep in sync with the image data when an application +calls the png_read_update_info() routine (see below). + +Data will be decoded into the supplied row buffers packed into bytes +unless the library has been told to transform it into another format. +For example, 4 bit/pixel paletted or grayscale data will be returned +2 pixels/byte with the leftmost pixel in the high-order bits of the +byte, unless png_set_packing() is called. 8-bit RGB data will be stored +in RGB RGB RGB format unless png_set_filler() is called to insert filler +bytes, either before or after each RGB triplet. 16-bit RGB data will +be returned RRGGBB RRGGBB, with the most significant byte of the color +value first, unless png_set_strip_16() is called to transform it to +regular RGB RGB triplets, or png_set_filler() is called to insert +filler bytes, either before or after each RRGGBB triplet. Similarly, +8-bit or 16-bit grayscale data can be modified with png_set_filler() +or png_set_strip_16(). + +The following code transforms grayscale images of less than 8 to 8 bits, +changes paletted images to RGB, and adds a full alpha channel if there is +transparency information in a tRNS chunk. This is most useful on +grayscale images with bit depths of 2 or 4 or if there is a multiple-image +viewing application that wishes to treat all images in the same way. + + if (color_type == PNG_COLOR_TYPE_PALETTE) + png_set_palette_to_rgb(png_ptr); + + if (color_type == PNG_COLOR_TYPE_GRAY && + bit_depth < 8) png_set_gray_1_2_4_to_8(png_ptr); + + if (png_get_valid(png_ptr, info_ptr, + PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr); + +These three functions are actually aliases for png_set_expand(), added +in libpng version 1.0.4, with the function names expanded to improve code +readability. In some future version they may actually do different +things. + +PNG can have files with 16 bits per channel. If you only can handle +8 bits per channel, this will strip the pixels down to 8 bit. + + if (bit_depth == 16) + png_set_strip_16(png_ptr); + +If, for some reason, you don't need the alpha channel on an image, +and you want to remove it rather than combining it with the background +(but the image author certainly had in mind that you *would* combine +it with the background, so that's what you should probably do): + + if (color_type & PNG_COLOR_MASK_ALPHA) + png_set_strip_alpha(png_ptr); + +In PNG files, the alpha channel in an image +is the level of opacity. If you need the alpha channel in an image to +be the level of transparency instead of opacity, you can invert the +alpha channel (or the tRNS chunk data) after it's read, so that 0 is +fully opaque and 255 (in 8-bit or paletted images) or 65535 (in 16-bit +images) is fully transparent, with + + png_set_invert_alpha(png_ptr); + +PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as +they can, resulting in, for example, 8 pixels per byte for 1 bit +files. This code expands to 1 pixel per byte without changing the +values of the pixels: + + if (bit_depth < 8) + png_set_packing(png_ptr); + +PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels +stored in a PNG image have been "scaled" or "shifted" up to the next +higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] to +8 bits/sample in the range [0, 255]). However, it is also possible to +convert the PNG pixel data back to the original bit depth of the image. +This call reduces the pixels back down to the original bit depth: + + png_color_8p sig_bit; + + if (png_get_sBIT(png_ptr, info_ptr, &sig_bit)) + png_set_shift(png_ptr, sig_bit); + +PNG files store 3-color pixels in red, green, blue order. This code +changes the storage of the pixels to blue, green, red: + + if (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA) + png_set_bgr(png_ptr); + +PNG files store RGB pixels packed into 3 or 6 bytes. This code expands them +into 4 or 8 bytes for windowing systems that need them in this format: + + if (color_type == PNG_COLOR_TYPE_RGB) + png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE); + +where "filler" is the 8 or 16-bit number to fill with, and the location is +either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether +you want the filler before the RGB or after. This transformation +does not affect images that already have full alpha channels. To add an +opaque alpha channel, use filler=0xff or 0xffff and PNG_FILLER_AFTER which +will generate RGBA pixels. + +If you are reading an image with an alpha channel, and you need the +data as ARGB instead of the normal PNG format RGBA: + + if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) + png_set_swap_alpha(png_ptr); + +For some uses, you may want a grayscale image to be represented as +RGB. This code will do that conversion: + + if (color_type == PNG_COLOR_TYPE_GRAY || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_gray_to_rgb(png_ptr); + +Conversely, you can convert an RGB or RGBA image to grayscale or grayscale +with alpha. + + if (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA) + png_set_rgb_to_gray_fixed(png_ptr, error_action, + int red_weight, int green_weight); + + error_action = 1: silently do the conversion + error_action = 2: issue a warning if the original + image has any pixel where + red != green or red != blue + error_action = 3: issue an error and abort the + conversion if the original + image has any pixel where + red != green or red != blue + + red_weight: weight of red component times 100000 + green_weight: weight of green component times 100000 + If either weight is negative, default + weights (21268, 71514) are used. + +If you have set error_action = 1 or 2, you can +later check whether the image really was gray, after processing +the image rows, with the png_get_rgb_to_gray_status(png_ptr) function. +It will return a png_byte that is zero if the image was gray or +1 if there were any non-gray pixels. bKGD and sBIT data +will be silently converted to grayscale, using the green channel +data, regardless of the error_action setting. + +With red_weight+green_weight<=100000, +the normalized graylevel is computed: + + int rw = red_weight * 65536; + int gw = green_weight * 65536; + int bw = 65536 - (rw + gw); + gray = (rw*red + gw*green + bw*blue)/65536; + +The default values approximate those recommended in the Charles +Poynton's Color FAQ, +Copyright (c) 1998-01-04 Charles Poynton poynton@inforamp.net + + Y = 0.212671 * R + 0.715160 * G + 0.072169 * B + +Libpng approximates this with + + Y = 0.21268 * R + 0.7151 * G + 0.07217 * B + +which can be expressed with integers as + + Y = (6969 * R + 23434 * G + 2365 * B)/32768 + +The calculation is done in a linear colorspace, if the image gamma +is known. + +If you have a grayscale and you are using png_set_expand_depth(), +png_set_expand(), or png_set_gray_to_rgb to change to truecolor or to +a higher bit-depth, you must either supply the background color as a gray +value at the original file bit-depth (need_expand = 1) or else supply the +background color as an RGB triplet at the final, expanded bit depth +(need_expand = 0). Similarly, if you are reading a paletted image, you +must either supply the background color as a palette index (need_expand = 1) +or as an RGB triplet that may or may not be in the palette (need_expand = 0). + + png_color_16 my_background; + png_color_16p image_background; + + if (png_get_bKGD(png_ptr, info_ptr, &image_background)) + png_set_background(png_ptr, image_background, + PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); + else + png_set_background(png_ptr, &my_background, + PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); + +The png_set_background() function tells libpng to composite images +with alpha or simple transparency against the supplied background +color. If the PNG file contains a bKGD chunk (PNG_INFO_bKGD valid), +you may use this color, or supply another color more suitable for +the current display (e.g., the background color from a web page). You +need to tell libpng whether the color is in the gamma space of the +display (PNG_BACKGROUND_GAMMA_SCREEN for colors you supply), the file +(PNG_BACKGROUND_GAMMA_FILE for colors from the bKGD chunk), or one +that is neither of these gammas (PNG_BACKGROUND_GAMMA_UNIQUE - I don't +know why anyone would use this, but it's here). + +To properly display PNG images on any kind of system, the application needs +to know what the display gamma is. Ideally, the user will know this, and +the application will allow them to set it. One method of allowing the user +to set the display gamma separately for each system is to check for a +SCREEN_GAMMA or DISPLAY_GAMMA environment variable, which will hopefully be +correctly set. + +Note that display_gamma is the overall gamma correction required to produce +pleasing results, which depends on the lighting conditions in the surrounding +environment. In a dim or brightly lit room, no compensation other than +the physical gamma exponent of the monitor is needed, while in a dark room +a slightly smaller exponent is better. + + double gamma, screen_gamma; + + if (/* We have a user-defined screen + gamma value */) + { + screen_gamma = user_defined_screen_gamma; + } + /* One way that applications can share the same + screen gamma value */ + else if ((gamma_str = getenv("SCREEN_GAMMA")) + != NULL) + { + screen_gamma = (double)atof(gamma_str); + } + /* If we don't have another value */ + else + { + screen_gamma = 2.2; /* A good guess for a + PC monitor in a bright office or a dim room */ + screen_gamma = 2.0; /* A good guess for a + PC monitor in a dark room */ + screen_gamma = 1.7 or 1.0; /* A good + guess for Mac systems */ + } + +The png_set_gamma() function handles gamma transformations of the data. +Pass both the file gamma and the current screen_gamma. If the file does +not have a gamma value, you can pass one anyway if you have an idea what +it is (usually 0.45455 is a good guess for GIF images on PCs). Note +that file gammas are inverted from screen gammas. See the discussions +on gamma in the PNG specification for an excellent description of what +gamma is, and why all applications should support it. It is strongly +recommended that PNG viewers support gamma correction. + + if (png_get_gAMA(png_ptr, info_ptr, &gamma)) + png_set_gamma(png_ptr, screen_gamma, gamma); + else + png_set_gamma(png_ptr, screen_gamma, 0.45455); + +If you need to reduce an RGB file to a paletted file, or if a paletted +file has more entries then will fit on your screen, png_set_dither() +will do that. Note that this is a simple match dither that merely +finds the closest color available. This should work fairly well with +optimized palettes, and fairly badly with linear color cubes. If you +pass a palette that is larger then maximum_colors, the file will +reduce the number of colors in the palette so it will fit into +maximum_colors. If there is a histogram, it will use it to make +more intelligent choices when reducing the palette. If there is no +histogram, it may not do as good a job. + + if (color_type & PNG_COLOR_MASK_COLOR) + { + if (png_get_valid(png_ptr, info_ptr, + PNG_INFO_PLTE)) + { + png_uint_16p histogram = NULL; + + png_get_hIST(png_ptr, info_ptr, + &histogram); + png_set_dither(png_ptr, palette, num_palette, + max_screen_colors, histogram, 1); + } + else + { + png_color std_color_cube[MAX_SCREEN_COLORS] = + { ... colors ... }; + + png_set_dither(png_ptr, std_color_cube, + MAX_SCREEN_COLORS, MAX_SCREEN_COLORS, + NULL,0); + } + } + +PNG files describe monochrome as black being zero and white being one. +The following code will reverse this (make black be one and white be +zero): + + if (bit_depth == 1 && color_type == PNG_COLOR_TYPE_GRAY) + png_set_invert_mono(png_ptr); + +This function can also be used to invert grayscale and gray-alpha images: + + if (color_type == PNG_COLOR_TYPE_GRAY || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_invert_mono(png_ptr); + +PNG files store 16 bit pixels in network byte order (big-endian, +ie. most significant bits first). This code changes the storage to the +other way (little-endian, i.e. least significant bits first, the +way PCs store them): + + if (bit_depth == 16) + png_set_swap(png_ptr); + +If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you +need to change the order the pixels are packed into bytes, you can use: + + if (bit_depth < 8) + png_set_packswap(png_ptr); + +Finally, you can write your own transformation function if none of +the existing ones meets your needs. This is done by setting a callback +with + + png_set_read_user_transform_fn(png_ptr, + read_transform_fn); + +You must supply the function + + void read_transform_fn(png_ptr ptr, row_info_ptr + row_info, png_bytep data) + +See pngtest.c for a working example. Your function will be called +after all of the other transformations have been processed. + +You can also set up a pointer to a user structure for use by your +callback function, and you can inform libpng that your transform +function will change the number of channels or bit depth with the +function + + png_set_user_transform_info(png_ptr, user_ptr, + user_depth, user_channels); + +The user's application, not libpng, is responsible for allocating and +freeing any memory required for the user structure. + +You can retrieve the pointer via the function +png_get_user_transform_ptr(). For example: + + voidp read_user_transform_ptr = + png_get_user_transform_ptr(png_ptr); + +The last thing to handle is interlacing; this is covered in detail below, +but you must call the function here if you want libpng to handle expansion +of the interlaced image. + + number_of_passes = png_set_interlace_handling(png_ptr); + +After setting the transformations, libpng can update your png_info +structure to reflect any transformations you've requested with this +call. This is most useful to update the info structure's rowbytes +field so you can use it to allocate your image memory. This function +will also update your palette with the correct screen_gamma and +background if these have been given with the calls above. + + png_read_update_info(png_ptr, info_ptr); + +After you call png_read_update_info(), you can allocate any +memory you need to hold the image. The row data is simply +raw byte data for all forms of images. As the actual allocation +varies among applications, no example will be given. If you +are allocating one large chunk, you will need to build an +array of pointers to each row, as it will be needed for some +of the functions below. + +Reading image data + +After you've allocated memory, you can read the image data. +The simplest way to do this is in one function call. If you are +allocating enough memory to hold the whole image, you can just +call png_read_image() and libpng will read in all the image data +and put it in the memory area supplied. You will need to pass in +an array of pointers to each row. + +This function automatically handles interlacing, so you don't need +to call png_set_interlace_handling() or call this function multiple +times, or any of that other stuff necessary with png_read_rows(). + + png_read_image(png_ptr, row_pointers); + +where row_pointers is: + + png_bytep row_pointers[height]; + +You can point to void or char or whatever you use for pixels. + +If you don't want to read in the whole image at once, you can +use png_read_rows() instead. If there is no interlacing (check +interlace_type == PNG_INTERLACE_NONE), this is simple: + + png_read_rows(png_ptr, row_pointers, NULL, + number_of_rows); + +where row_pointers is the same as in the png_read_image() call. + +If you are doing this just one row at a time, you can do this with +a single row_pointer instead of an array of row_pointers: + + png_bytep row_pointer = row; + png_read_row(png_ptr, row_pointer, NULL); + +If the file is interlaced (interlace_type != 0 in the IHDR chunk), things +get somewhat harder. The only current (PNG Specification version 1.2) +interlacing type for PNG is (interlace_type == PNG_INTERLACE_ADAM7) +is a somewhat complicated 2D interlace scheme, known as Adam7, that +breaks down an image into seven smaller images of varying size, based +on an 8x8 grid. + +libpng can fill out those images or it can give them to you "as is". +If you want them filled out, there are two ways to do that. The one +mentioned in the PNG specification is to expand each pixel to cover +those pixels that have not been read yet (the "rectangle" method). +This results in a blocky image for the first pass, which gradually +smooths out as more pixels are read. The other method is the "sparkle" +method, where pixels are drawn only in their final locations, with the +rest of the image remaining whatever colors they were initialized to +before the start of the read. The first method usually looks better, +but tends to be slower, as there are more pixels to put in the rows. + +If you don't want libpng to handle the interlacing details, just call +png_read_rows() seven times to read in all seven images. Each of the +images is a valid image by itself, or they can all be combined on an +8x8 grid to form a single image (although if you intend to combine them +you would be far better off using the libpng interlace handling). + +The first pass will return an image 1/8 as wide as the entire image +(every 8th column starting in column 0) and 1/8 as high as the original +(every 8th row starting in row 0), the second will be 1/8 as wide +(starting in column 4) and 1/8 as high (also starting in row 0). The +third pass will be 1/4 as wide (every 4th pixel starting in column 0) and +1/8 as high (every 8th row starting in row 4), and the fourth pass will +be 1/4 as wide and 1/4 as high (every 4th column starting in column 2, +and every 4th row starting in row 0). The fifth pass will return an +image 1/2 as wide, and 1/4 as high (starting at column 0 and row 2), +while the sixth pass will be 1/2 as wide and 1/2 as high as the original +(starting in column 1 and row 0). The seventh and final pass will be as +wide as the original, and 1/2 as high, containing all of the odd +numbered scanlines. Phew! + +If you want libpng to expand the images, call this before calling +png_start_read_image() or png_read_update_info(): + + if (interlace_type == PNG_INTERLACE_ADAM7) + number_of_passes + = png_set_interlace_handling(png_ptr); + +This will return the number of passes needed. Currently, this +is seven, but may change if another interlace type is added. +This function can be called even if the file is not interlaced, +where it will return one pass. + +If you are not going to display the image after each pass, but are +going to wait until the entire image is read in, use the sparkle +effect. This effect is faster and the end result of either method +is exactly the same. If you are planning on displaying the image +after each pass, the "rectangle" effect is generally considered the +better looking one. + +If you only want the "sparkle" effect, just call png_read_rows() as +normal, with the third parameter NULL. Make sure you make pass over +the image number_of_passes times, and you don't change the data in the +rows between calls. You can change the locations of the data, just +not the data. Each pass only writes the pixels appropriate for that +pass, and assumes the data from previous passes is still valid. + + png_read_rows(png_ptr, row_pointers, NULL, + number_of_rows); + +If you only want the first effect (the rectangles), do the same as +before except pass the row buffer in the third parameter, and leave +the second parameter NULL. + + png_read_rows(png_ptr, NULL, row_pointers, + number_of_rows); + +Finishing a sequential read + +After you are finished reading the image through either the high- or +low-level interfaces, you can finish reading the file. If you are +interested in comments or time, which may be stored either before or +after the image data, you should pass the separate png_info struct if +you want to keep the comments from before and after the image +separate. If you are not interested, you can pass NULL. + + png_read_end(png_ptr, end_info); + +When you are done, you can free all memory allocated by libpng like this: + + png_destroy_read_struct(&png_ptr, &info_ptr, + &end_info); + +It is also possible to individually free the info_ptr members that +point to libpng-allocated storage with the following function: + + png_free_data(png_ptr, info_ptr, mask, seq) + mask - identifies data to be freed, a mask + containing the logical OR of one or + more of + PNG_FREE_PLTE, PNG_FREE_TRNS, + PNG_FREE_HIST, PNG_FREE_ICCP, + PNG_FREE_PCAL, PNG_FREE_ROWS, + PNG_FREE_SCAL, PNG_FREE_SPLT, + PNG_FREE_TEXT, PNG_FREE_UNKN, + or simply PNG_FREE_ALL + seq - sequence number of item to be freed + (-1 for all items) + +This function may be safely called when the relevant storage has +already been freed, or has not yet been allocated, or was allocated +by the user and not by libpng, and will in those +cases do nothing. The "seq" parameter is ignored if only one item +of the selected data type, such as PLTE, is allowed. If "seq" is not +-1, and multiple items are allowed for the data type identified in +the mask, such as text or sPLT, only the n'th item in the structure +is freed, where n is "seq". + +The default behavior is only to free data that was allocated internally +by libpng. This can be changed, so that libpng will not free the data, +or so that it will free data that was allocated by the user with png_malloc() +or png_zalloc() and passed in via a png_set_*() function, with + + png_data_freer(png_ptr, info_ptr, freer, mask) + mask - which data elements are affected + same choices as in png_free_data() + freer - one of + PNG_DESTROY_WILL_FREE_DATA + PNG_SET_WILL_FREE_DATA + PNG_USER_WILL_FREE_DATA + +This function only affects data that has already been allocated. +You can call this function after reading the PNG data but before calling +any png_set_*() functions, to control whether the user or the png_set_*() +function is responsible for freeing any existing data that might be present, +and again after the png_set_*() functions to control whether the user +or png_destroy_*() is supposed to free the data. When the user assumes +responsibility for libpng-allocated data, the application must use +png_free() to free it, and when the user transfers responsibility to libpng +for data that the user has allocated, the user must have used png_malloc() +or png_zalloc() to allocate it. + +If you allocated your row_pointers in a single block, as suggested above in +the description of the high level read interface, you must not transfer +responsibility for freeing it to the png_set_rows or png_read_destroy function, +because they would also try to free the individual row_pointers[i]. + +If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword +separately, do not transfer responsibility for freeing text_ptr to libpng, +because when libpng fills a png_text structure it combines these members with +the key member, and png_free_data() will free only text_ptr.key. Similarly, +if you transfer responsibility for free'ing text_ptr from libpng to your +application, your application must not separately free those members. + +The png_free_data() function will turn off the "valid" flag for anything +it frees. If you need to turn the flag off for a chunk that was freed by your +application instead of by libpng, you can use + + png_set_invalid(png_ptr, info_ptr, mask); + mask - identifies the chunks to be made invalid, + containing the logical OR of one or + more of + PNG_INFO_gAMA, PNG_INFO_sBIT, + PNG_INFO_cHRM, PNG_INFO_PLTE, + PNG_INFO_tRNS, PNG_INFO_bKGD, + PNG_INFO_hIST, PNG_INFO_pHYs, + PNG_INFO_oFFs, PNG_INFO_tIME, + PNG_INFO_pCAL, PNG_INFO_sRGB, + PNG_INFO_iCCP, PNG_INFO_sPLT, + PNG_INFO_sCAL, PNG_INFO_IDAT + +For a more compact example of reading a PNG image, see the file example.c. + +Reading PNG files progressively + +The progressive reader is slightly different then the non-progressive +reader. Instead of calling png_read_info(), png_read_rows(), and +png_read_end(), you make one call to png_process_data(), which calls +callbacks when it has the info, a row, or the end of the image. You +set up these callbacks with png_set_progressive_read_fn(). You don't +have to worry about the input/output functions of libpng, as you are +giving the library the data directly in png_process_data(). I will +assume that you have read the section on reading PNG files above, +so I will only highlight the differences (although I will show +all of the code). + +png_structp png_ptr; +png_infop info_ptr; + + /* An example code fragment of how you would + initialize the progressive reader in your + application. */ + int + initialize_png_reader() + { + png_ptr = png_create_read_struct + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn); + if (!png_ptr) + return (ERROR); + info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) + { + png_destroy_read_struct(&png_ptr, (png_infopp)NULL, + (png_infopp)NULL); + return (ERROR); + } + + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + return (ERROR); + } + + /* This one's new. You can provide functions + to be called when the header info is valid, + when each row is completed, and when the image + is finished. If you aren't using all functions, + you can specify NULL parameters. Even when all + three functions are NULL, you need to call + png_set_progressive_read_fn(). You can use + any struct as the user_ptr (cast to a void pointer + for the function call), and retrieve the pointer + from inside the callbacks using the function + + png_get_progressive_ptr(png_ptr); + + which will return a void pointer, which you have + to cast appropriately. + */ + png_set_progressive_read_fn(png_ptr, (void *)user_ptr, + info_callback, row_callback, end_callback); + + return 0; + } + + /* A code fragment that you call as you receive blocks + of data */ + int + process_data(png_bytep buffer, png_uint_32 length) + { + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + return (ERROR); + } + + /* This one's new also. Simply give it a chunk + of data from the file stream (in order, of + course). On machines with segmented memory + models machines, don't give it any more than + 64K. The library seems to run fine with sizes + of 4K. Although you can give it much less if + necessary (I assume you can give it chunks of + 1 byte, I haven't tried less then 256 bytes + yet). When this function returns, you may + want to display any rows that were generated + in the row callback if you don't already do + so there. + */ + png_process_data(png_ptr, info_ptr, buffer, length); + return 0; + } + + /* This function is called (as set by + png_set_progressive_read_fn() above) when enough data + has been supplied so all of the header has been + read. + */ + void + info_callback(png_structp png_ptr, png_infop info) + { + /* Do any setup here, including setting any of + the transformations mentioned in the Reading + PNG files section. For now, you _must_ call + either png_start_read_image() or + png_read_update_info() after all the + transformations are set (even if you don't set + any). You may start getting rows before + png_process_data() returns, so this is your + last chance to prepare for that. + */ + } + + /* This function is called when each row of image + data is complete */ + void + row_callback(png_structp png_ptr, png_bytep new_row, + png_uint_32 row_num, int pass) + { + /* If the image is interlaced, and you turned + on the interlace handler, this function will + be called for every row in every pass. Some + of these rows will not be changed from the + previous pass. When the row is not changed, + the new_row variable will be NULL. The rows + and passes are called in order, so you don't + really need the row_num and pass, but I'm + supplying them because it may make your life + easier. + + For the non-NULL rows of interlaced images, + you must call png_progressive_combine_row() + passing in the row and the old row. You can + call this function for NULL rows (it will just + return) and for non-interlaced images (it just + does the memcpy for you) if it will make the + code easier. Thus, you can just do this for + all cases: + */ + + png_progressive_combine_row(png_ptr, old_row, + new_row); + + /* where old_row is what was displayed for + previously for the row. Note that the first + pass (pass == 0, really) will completely cover + the old row, so the rows do not have to be + initialized. After the first pass (and only + for interlaced images), you will have to pass + the current row, and the function will combine + the old row and the new row. + */ + } + + void + end_callback(png_structp png_ptr, png_infop info) + { + /* This function is called after the whole image + has been read, including any chunks after the + image (up to and including the IEND). You + will usually have the same info chunk as you + had in the header, although some data may have + been added to the comments and time fields. + + Most people won't do much here, perhaps setting + a flag that marks the image as finished. + */ + } + + + +IV. Writing + +Much of this is very similar to reading. However, everything of +importance is repeated here, so you won't have to constantly look +back up in the reading section to understand writing. + +Setup + +You will want to do the I/O initialization before you get into libpng, +so if it doesn't work, you don't have anything to undo. If you are not +using the standard I/O functions, you will need to replace them with +custom writing functions. See the discussion under Customizing libpng. + + FILE *fp = fopen(file_name, "wb"); + if (!fp) + { + return (ERROR); + } + +Next, png_struct and png_info need to be allocated and initialized. +As these can be both relatively large, you may not want to store these +on the stack, unless you have stack space to spare. Of course, you +will want to check if they return NULL. If you are also reading, +you won't want to name your read structure and your write structure +both "png_ptr"; you can call them anything you like, such as +"read_ptr" and "write_ptr". Look at pngtest.c, for example. + + png_structp png_ptr = png_create_write_struct + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn); + if (!png_ptr) + return (ERROR); + + png_infop info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) + { + png_destroy_write_struct(&png_ptr, + (png_infopp)NULL); + return (ERROR); + } + +If you want to use your own memory allocation routines, +define PNG_USER_MEM_SUPPORTED and use +png_create_write_struct_2() instead of png_create_write_struct(): + + png_structp png_ptr = png_create_write_struct_2 + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + user_error_fn, user_warning_fn, (png_voidp) + user_mem_ptr, user_malloc_fn, user_free_fn); + +After you have these structures, you will need to set up the +error handling. When libpng encounters an error, it expects to +longjmp() back to your routine. Therefore, you will need to call +setjmp() and pass the png_jmpbuf(png_ptr). If you +write the file from different routines, you will need to update +the png_jmpbuf(png_ptr) every time you enter a new routine that will +call a png_*() function. See your documentation of setjmp/longjmp +for your compiler for more information on setjmp/longjmp. See +the discussion on libpng error handling in the Customizing Libpng +section below for more information on the libpng error handling. + + if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_write_struct(&png_ptr, &info_ptr); + fclose(fp); + return (ERROR); + } + ... + return; + +If you would rather avoid the complexity of setjmp/longjmp issues, +you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case +errors will result in a call to PNG_ABORT() which defaults to abort(). + +Now you need to set up the output code. The default for libpng is to +use the C function fwrite(). If you use this, you will need to pass a +valid FILE * in the function png_init_io(). Be sure that the file is +opened in binary mode. Again, if you wish to handle writing data in +another way, see the discussion on libpng I/O handling in the Customizing +Libpng section below. + + png_init_io(png_ptr, fp); + +Write callbacks + +At this point, you can set up a callback function that will be +called after each row has been written, which you can use to control +a progress meter or the like. It's demonstrated in pngtest.c. +You must supply a function + + void write_row_callback(png_ptr, png_uint_32 row, + int pass); + { + /* put your code here */ + } + +(You can give it another name that you like instead of "write_row_callback") + +To inform libpng about your function, use + + png_set_write_status_fn(png_ptr, write_row_callback); + +You now have the option of modifying how the compression library will +run. The following functions are mainly for testing, but may be useful +in some cases, like if you need to write PNG files extremely fast and +are willing to give up some compression, or if you want to get the +maximum possible compression at the expense of slower writing. If you +have no special needs in this area, let the library do what it wants by +not calling this function at all, as it has been tuned to deliver a good +speed/compression ratio. The second parameter to png_set_filter() is +the filter method, for which the only valid values are 0 (as of the +July 1999 PNG specification, version 1.2) or 64 (if you are writing +a PNG datastream that is to be embedded in a MNG datastream). The third +parameter is a flag that indicates which filter type(s) are to be tested +for each scanline. See the PNG specification for details on the specific filter +types. + + + /* turn on or off filtering, and/or choose + specific filters. You can use either a single + PNG_FILTER_VALUE_NAME or the logical OR of one + or more PNG_FILTER_NAME masks. */ + png_set_filter(png_ptr, 0, + PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE | + PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB | + PNG_FILTER_UP | PNG_FILTER_VALUE_UP | + PNG_FILTER_AVE | PNG_FILTER_VALUE_AVE | + PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH| + PNG_ALL_FILTERS); + +If an application +wants to start and stop using particular filters during compression, +it should start out with all of the filters (to ensure that the previous +row of pixels will be stored in case it's needed later), and then add +and remove them after the start of compression. + +If you are writing a PNG datastream that is to be embedded in a MNG +datastream, the second parameter can be either 0 or 64. + +The png_set_compression_*() functions interface to the zlib compression +library, and should mostly be ignored unless you really know what you are +doing. The only generally useful call is png_set_compression_level() +which changes how much time zlib spends on trying to compress the image +data. See the Compression Library (zlib.h and algorithm.txt, distributed +with zlib) for details on the compression levels. + + /* set the zlib compression level */ + png_set_compression_level(png_ptr, + Z_BEST_COMPRESSION); + + /* set other zlib parameters */ + png_set_compression_mem_level(png_ptr, 8); + png_set_compression_strategy(png_ptr, + Z_DEFAULT_STRATEGY); + png_set_compression_window_bits(png_ptr, 15); + png_set_compression_method(png_ptr, 8); + png_set_compression_buffer_size(png_ptr, 8192) + +extern PNG_EXPORT(void,png_set_zbuf_size) + +Setting the contents of info for output + +You now need to fill in the png_info structure with all the data you +wish to write before the actual image. Note that the only thing you +are allowed to write after the image is the text chunks and the time +chunk (as of PNG Specification 1.2, anyway). See png_write_end() and +the latest PNG specification for more information on that. If you +wish to write them before the image, fill them in now, and flag that +data as being valid. If you want to wait until after the data, don't +fill them until png_write_end(). For all the fields in png_info and +their data types, see png.h. For explanations of what the fields +contain, see the PNG specification. + +Some of the more important parts of the png_info are: + + png_set_IHDR(png_ptr, info_ptr, width, height, + bit_depth, color_type, interlace_type, + compression_type, filter_method) + width - holds the width of the image + in pixels (up to 2^31). + height - holds the height of the image + in pixels (up to 2^31). + bit_depth - holds the bit depth of one of the + image channels. + (valid values are 1, 2, 4, 8, 16 + and depend also on the + color_type. See also significant + bits (sBIT) below). + color_type - describes which color/alpha + channels are present. + PNG_COLOR_TYPE_GRAY + (bit depths 1, 2, 4, 8, 16) + PNG_COLOR_TYPE_GRAY_ALPHA + (bit depths 8, 16) + PNG_COLOR_TYPE_PALETTE + (bit depths 1, 2, 4, 8) + PNG_COLOR_TYPE_RGB + (bit_depths 8, 16) + PNG_COLOR_TYPE_RGB_ALPHA + (bit_depths 8, 16) + + PNG_COLOR_MASK_PALETTE + PNG_COLOR_MASK_COLOR + PNG_COLOR_MASK_ALPHA + + interlace_type - PNG_INTERLACE_NONE or + PNG_INTERLACE_ADAM7 + compression_type - (must be + PNG_COMPRESSION_TYPE_DEFAULT) + filter_method - (must be PNG_FILTER_TYPE_DEFAULT + or, if you are writing a PNG to + be embedded in a MNG datastream, + can also be + PNG_INTRAPIXEL_DIFFERENCING) + + png_set_PLTE(png_ptr, info_ptr, palette, + num_palette); + palette - the palette for the file + (array of png_color) + num_palette - number of entries in the palette + + png_set_gAMA(png_ptr, info_ptr, gamma); + gamma - the gamma the image was created + at (PNG_INFO_gAMA) + + png_set_sRGB(png_ptr, info_ptr, srgb_intent); + srgb_intent - the rendering intent + (PNG_INFO_sRGB) The presence of + the sRGB chunk means that the pixel + data is in the sRGB color space. + This chunk also implies specific + values of gAMA and cHRM. Rendering + intent is the CSS-1 property that + has been defined by the International + Color Consortium + (http://www.color.org). + It can be one of + PNG_sRGB_INTENT_SATURATION, + PNG_sRGB_INTENT_PERCEPTUAL, + PNG_sRGB_INTENT_ABSOLUTE, or + PNG_sRGB_INTENT_RELATIVE. + + + png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, + srgb_intent); + srgb_intent - the rendering intent + (PNG_INFO_sRGB) The presence of the + sRGB chunk means that the pixel + data is in the sRGB color space. + This function also causes gAMA and + cHRM chunks with the specific values + that are consistent with sRGB to be + written. + + png_set_iCCP(png_ptr, info_ptr, name, compression_type, + profile, proflen); + name - The profile name. + compression - The compression type; always + PNG_COMPRESSION_TYPE_BASE for PNG 1.0. + You may give NULL to this argument to + ignore it. + profile - International Color Consortium color + profile data. May contain NULs. + proflen - length of profile data in bytes. + + png_set_sBIT(png_ptr, info_ptr, sig_bit); + sig_bit - the number of significant bits for + (PNG_INFO_sBIT) each of the gray, red, + green, and blue channels, whichever are + appropriate for the given color type + (png_color_16) + + png_set_tRNS(png_ptr, info_ptr, trans, num_trans, + trans_values); + trans - array of transparent entries for + palette (PNG_INFO_tRNS) + trans_values - graylevel or color sample values of + the single transparent color for + non-paletted images (PNG_INFO_tRNS) + num_trans - number of transparent entries + (PNG_INFO_tRNS) + + png_set_hIST(png_ptr, info_ptr, hist); + (PNG_INFO_hIST) + hist - histogram of palette (array of + png_uint_16) + + png_set_tIME(png_ptr, info_ptr, mod_time); + mod_time - time image was last modified + (PNG_VALID_tIME) + + png_set_bKGD(png_ptr, info_ptr, background); + background - background color (PNG_VALID_bKGD) + + png_set_text(png_ptr, info_ptr, text_ptr, num_text); + text_ptr - array of png_text holding image + comments + text_ptr[i].compression - type of compression used + on "text" PNG_TEXT_COMPRESSION_NONE + PNG_TEXT_COMPRESSION_zTXt + PNG_ITXT_COMPRESSION_NONE + PNG_ITXT_COMPRESSION_zTXt + text_ptr[i].key - keyword for comment. Must contain + 1-79 characters. + text_ptr[i].text - text comments for current + keyword. Can be NULL or empty. + text_ptr[i].text_length - length of text string, + after decompression, 0 for iTXt + text_ptr[i].itxt_length - length of itxt string, + after decompression, 0 for tEXt/zTXt + text_ptr[i].lang - language of comment (NULL or + empty for unknown). + text_ptr[i].translated_keyword - keyword in UTF-8 (NULL + or empty for unknown). + num_text - number of comments + + png_set_sPLT(png_ptr, info_ptr, &palette_ptr, + num_spalettes); + palette_ptr - array of png_sPLT_struct structures + to be added to the list of palettes + in the info structure. + num_spalettes - number of palette structures to be + added. + + png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y, + unit_type); + offset_x - positive offset from the left + edge of the screen + offset_y - positive offset from the top + edge of the screen + unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER + + png_set_pHYs(png_ptr, info_ptr, res_x, res_y, + unit_type); + res_x - pixels/unit physical resolution + in x direction + res_y - pixels/unit physical resolution + in y direction + unit_type - PNG_RESOLUTION_UNKNOWN, + PNG_RESOLUTION_METER + + png_set_sCAL(png_ptr, info_ptr, unit, width, height) + unit - physical scale units (an integer) + width - width of a pixel in physical scale units + height - height of a pixel in physical scale units + (width and height are doubles) + + png_set_sCAL_s(png_ptr, info_ptr, unit, width, height) + unit - physical scale units (an integer) + width - width of a pixel in physical scale units + height - height of a pixel in physical scale units + (width and height are strings like "2.54") + + png_set_unknown_chunks(png_ptr, info_ptr, &unknowns, + num_unknowns) + unknowns - array of png_unknown_chunk + structures holding unknown chunks + unknowns[i].name - name of unknown chunk + unknowns[i].data - data of unknown chunk + unknowns[i].size - size of unknown chunk's data + unknowns[i].location - position to write chunk in file + 0: do not write chunk + PNG_HAVE_IHDR: before PLTE + PNG_HAVE_PLTE: before IDAT + PNG_AFTER_IDAT: after IDAT + +The "location" member is set automatically according to +what part of the output file has already been written. +You can change its value after calling png_set_unknown_chunks() +as demonstrated in pngtest.c. Within each of the "locations", +the chunks are sequenced according to their position in the +structure (that is, the value of "i", which is the order in which +the chunk was either read from the input file or defined with +png_set_unknown_chunks). + +A quick word about text and num_text. text is an array of png_text +structures. num_text is the number of valid structures in the array. +Each png_text structure holds a language code, a keyword, a text value, +and a compression type. + +The compression types have the same valid numbers as the compression +types of the image data. Currently, the only valid number is zero. +However, you can store text either compressed or uncompressed, unlike +images, which always have to be compressed. So if you don't want the +text compressed, set the compression type to PNG_TEXT_COMPRESSION_NONE. +Because tEXt and zTXt chunks don't have a language field, if you +specify PNG_TEXT_COMPRESSION_NONE or PNG_TEXT_COMPRESSION_zTXt +any language code or translated keyword will not be written out. + +Until text gets around 1000 bytes, it is not worth compressing it. +After the text has been written out to the file, the compression type +is set to PNG_TEXT_COMPRESSION_NONE_WR or PNG_TEXT_COMPRESSION_zTXt_WR, +so that it isn't written out again at the end (in case you are calling +png_write_end() with the same struct. + +The keywords that are given in the PNG Specification are: + + Title Short (one line) title or + caption for image + Author Name of image's creator + Description Description of image (possibly long) + Copyright Copyright notice + Creation Time Time of original image creation + (usually RFC 1123 format, see below) + Software Software used to create the image + Disclaimer Legal disclaimer + Warning Warning of nature of content + Source Device used to create the image + Comment Miscellaneous comment; conversion + from other image format + +The keyword-text pairs work like this. Keywords should be short +simple descriptions of what the comment is about. Some typical +keywords are found in the PNG specification, as is some recommendations +on keywords. You can repeat keywords in a file. You can even write +some text before the image and some after. For example, you may want +to put a description of the image before the image, but leave the +disclaimer until after, so viewers working over modem connections +don't have to wait for the disclaimer to go over the modem before +they start seeing the image. Finally, keywords should be full +words, not abbreviations. Keywords and text are in the ISO 8859-1 +(Latin-1) character set (a superset of regular ASCII) and can not +contain NUL characters, and should not contain control or other +unprintable characters. To make the comments widely readable, stick +with basic ASCII, and avoid machine specific character set extensions +like the IBM-PC character set. The keyword must be present, but +you can leave off the text string on non-compressed pairs. +Compressed pairs must have a text string, as only the text string +is compressed anyway, so the compression would be meaningless. + +PNG supports modification time via the png_time structure. Two +conversion routines are provided, png_convert_from_time_t() for +time_t and png_convert_from_struct_tm() for struct tm. The +time_t routine uses gmtime(). You don't have to use either of +these, but if you wish to fill in the png_time structure directly, +you should provide the time in universal time (GMT) if possible +instead of your local time. Note that the year number is the full +year (e.g. 1998, rather than 98 - PNG is year 2000 compliant!), and +that months start with 1. + +If you want to store the time of the original image creation, you should +use a plain tEXt chunk with the "Creation Time" keyword. This is +necessary because the "creation time" of a PNG image is somewhat vague, +depending on whether you mean the PNG file, the time the image was +created in a non-PNG format, a still photo from which the image was +scanned, or possibly the subject matter itself. In order to facilitate +machine-readable dates, it is recommended that the "Creation Time" +tEXt chunk use RFC 1123 format dates (e.g. "22 May 1997 18:07:10 GMT"), +although this isn't a requirement. Unlike the tIME chunk, the +"Creation Time" tEXt chunk is not expected to be automatically changed +by the software. To facilitate the use of RFC 1123 dates, a function +png_convert_to_rfc1123(png_timep) is provided to convert from PNG +time to an RFC 1123 format string. + +Writing unknown chunks + +You can use the png_set_unknown_chunks function to queue up chunks +for writing. You give it a chunk name, raw data, and a size; that's +all there is to it. The chunks will be written by the next following +png_write_info_before_PLTE, png_write_info, or png_write_end function. +Any chunks previously read into the info structure's unknown-chunk +list will also be written out in a sequence that satisfies the PNG +specification's ordering rules. + +The high-level write interface + +At this point there are two ways to proceed; through the high-level +write interface, or through a sequence of low-level write operations. +You can use the high-level interface if your image data is present +in the info structure. All defined output +transformations are permitted, enabled by the following masks. + + PNG_TRANSFORM_IDENTITY No transformation + PNG_TRANSFORM_PACKING Pack 1, 2 and 4-bit samples + PNG_TRANSFORM_PACKSWAP Change order of packed + pixels to LSB first + PNG_TRANSFORM_INVERT_MONO Invert monochrome images + PNG_TRANSFORM_SHIFT Normalize pixels to the + sBIT depth + PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA + to BGRA + PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA + to AG + PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity + to transparency + PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples + PNG_TRANSFORM_STRIP_FILLER Strip out filler bytes. + +If you have valid image data in the info structure (you can use +png_set_rows() to put image data in the info structure), simply do this: + + png_write_png(png_ptr, info_ptr, png_transforms, NULL) + +where png_transforms is an integer containing the logical OR of some set of +transformation flags. This call is equivalent to png_write_info(), +followed the set of transformations indicated by the transform mask, +then png_write_image(), and finally png_write_end(). + +(The final parameter of this call is not yet used. Someday it might point +to transformation parameters required by some future output transform.) + +The low-level write interface + +If you are going the low-level route instead, you are now ready to +write all the file information up to the actual image data. You do +this with a call to png_write_info(). + + png_write_info(png_ptr, info_ptr); + +Note that there is one transformation you may need to do before +png_write_info(). In PNG files, the alpha channel in an image is the +level of opacity. If your data is supplied as a level of +transparency, you can invert the alpha channel before you write it, so +that 0 is fully transparent and 255 (in 8-bit or paletted images) or +65535 (in 16-bit images) is fully opaque, with + + png_set_invert_alpha(png_ptr); + +This must appear before png_write_info() instead of later with the +other transformations because in the case of paletted images the tRNS +chunk data has to be inverted before the tRNS chunk is written. If +your image is not a paletted image, the tRNS data (which in such cases +represents a single color to be rendered as transparent) won't need to +be changed, and you can safely do this transformation after your +png_write_info() call. + +If you need to write a private chunk that you want to appear before +the PLTE chunk when PLTE is present, you can write the PNG info in +two steps, and insert code to write your own chunk between them: + + png_write_info_before_PLTE(png_ptr, info_ptr); + png_set_unknown_chunks(png_ptr, info_ptr, ...); + png_write_info(png_ptr, info_ptr); + +After you've written the file information, you can set up the library +to handle any special transformations of the image data. The various +ways to transform the data will be described in the order that they +should occur. This is important, as some of these change the color +type and/or bit depth of the data, and some others only work on +certain color types and bit depths. Even though each transformation +checks to see if it has data that it can do something with, you should +make sure to only enable a transformation if it will be valid for the +data. For example, don't swap red and blue on grayscale data. + +PNG files store RGB pixels packed into 3 or 6 bytes. This code tells +the library to strip input data that has 4 or 8 bytes per pixel down +to 3 or 6 bytes (or strip 2 or 4-byte grayscale+filler data to 1 or 2 +bytes per pixel). + + png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); + +where the 0 is unused, and the location is either PNG_FILLER_BEFORE or +PNG_FILLER_AFTER, depending upon whether the filler byte in the pixel +is stored XRGB or RGBX. + +PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as +they can, resulting in, for example, 8 pixels per byte for 1 bit files. +If the data is supplied at 1 pixel per byte, use this code, which will +correctly pack the pixels into a single byte: + + png_set_packing(png_ptr); + +PNG files reduce possible bit depths to 1, 2, 4, 8, and 16. If your +data is of another bit depth, you can write an sBIT chunk into the +file so that decoders can recover the original data if desired. + + /* Set the true bit depth of the image data */ + if (color_type & PNG_COLOR_MASK_COLOR) + { + sig_bit.red = true_bit_depth; + sig_bit.green = true_bit_depth; + sig_bit.blue = true_bit_depth; + } + else + { + sig_bit.gray = true_bit_depth; + } + if (color_type & PNG_COLOR_MASK_ALPHA) + { + sig_bit.alpha = true_bit_depth; + } + + png_set_sBIT(png_ptr, info_ptr, &sig_bit); + +If the data is stored in the row buffer in a bit depth other than +one supported by PNG (e.g. 3 bit data in the range 0-7 for a 4-bit PNG), +this will scale the values to appear to be the correct bit depth as +is required by PNG. + + png_set_shift(png_ptr, &sig_bit); + +PNG files store 16 bit pixels in network byte order (big-endian, +ie. most significant bits first). This code would be used if they are +supplied the other way (little-endian, i.e. least significant bits +first, the way PCs store them): + + if (bit_depth > 8) + png_set_swap(png_ptr); + +If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you +need to change the order the pixels are packed into bytes, you can use: + + if (bit_depth < 8) + png_set_packswap(png_ptr); + +PNG files store 3 color pixels in red, green, blue order. This code +would be used if they are supplied as blue, green, red: + + png_set_bgr(png_ptr); + +PNG files describe monochrome as black being zero and white being +one. This code would be used if the pixels are supplied with this reversed +(black being one and white being zero): + + png_set_invert_mono(png_ptr); + +Finally, you can write your own transformation function if none of +the existing ones meets your needs. This is done by setting a callback +with + + png_set_write_user_transform_fn(png_ptr, + write_transform_fn); + +You must supply the function + + void write_transform_fn(png_ptr ptr, row_info_ptr + row_info, png_bytep data) + +See pngtest.c for a working example. Your function will be called +before any of the other transformations are processed. + +You can also set up a pointer to a user structure for use by your +callback function. + + png_set_user_transform_info(png_ptr, user_ptr, 0, 0); + +The user_channels and user_depth parameters of this function are ignored +when writing; you can set them to zero as shown. + +You can retrieve the pointer via the function png_get_user_transform_ptr(). +For example: + + voidp write_user_transform_ptr = + png_get_user_transform_ptr(png_ptr); + +It is possible to have libpng flush any pending output, either manually, +or automatically after a certain number of lines have been written. To +flush the output stream a single time call: + + png_write_flush(png_ptr); + +and to have libpng flush the output stream periodically after a certain +number of scanlines have been written, call: + + png_set_flush(png_ptr, nrows); + +Note that the distance between rows is from the last time png_write_flush() +was called, or the first row of the image if it has never been called. +So if you write 50 lines, and then png_set_flush 25, it will flush the +output on the next scanline, and every 25 lines thereafter, unless +png_write_flush() is called before 25 more lines have been written. +If nrows is too small (less than about 10 lines for a 640 pixel wide +RGB image) the image compression may decrease noticeably (although this +may be acceptable for real-time applications). Infrequent flushing will +only degrade the compression performance by a few percent over images +that do not use flushing. + +Writing the image data + +That's it for the transformations. Now you can write the image data. +The simplest way to do this is in one function call. If you have the +whole image in memory, you can just call png_write_image() and libpng +will write the image. You will need to pass in an array of pointers to +each row. This function automatically handles interlacing, so you don't +need to call png_set_interlace_handling() or call this function multiple +times, or any of that other stuff necessary with png_write_rows(). + + png_write_image(png_ptr, row_pointers); + +where row_pointers is: + + png_byte *row_pointers[height]; + +You can point to void or char or whatever you use for pixels. + +If you don't want to write the whole image at once, you can +use png_write_rows() instead. If the file is not interlaced, +this is simple: + + png_write_rows(png_ptr, row_pointers, + number_of_rows); + +row_pointers is the same as in the png_write_image() call. + +If you are just writing one row at a time, you can do this with +a single row_pointer instead of an array of row_pointers: + + png_bytep row_pointer = row; + + png_write_row(png_ptr, row_pointer); + +When the file is interlaced, things can get a good deal more +complicated. The only currently (as of the PNG Specification +version 1.2, dated July 1999) defined interlacing scheme for PNG files +is the "Adam7" interlace scheme, that breaks down an +image into seven smaller images of varying size. libpng will build +these images for you, or you can do them yourself. If you want to +build them yourself, see the PNG specification for details of which +pixels to write when. + +If you don't want libpng to handle the interlacing details, just +use png_set_interlace_handling() and call png_write_rows() the +correct number of times to write all seven sub-images. + +If you want libpng to build the sub-images, call this before you start +writing any rows: + + number_of_passes = + png_set_interlace_handling(png_ptr); + +This will return the number of passes needed. Currently, this +is seven, but may change if another interlace type is added. + +Then write the complete image number_of_passes times. + + png_write_rows(png_ptr, row_pointers, + number_of_rows); + +As some of these rows are not used, and thus return immediately, +you may want to read about interlacing in the PNG specification, +and only update the rows that are actually used. + +Finishing a sequential write + +After you are finished writing the image, you should finish writing +the file. If you are interested in writing comments or time, you should +pass an appropriately filled png_info pointer. If you are not interested, +you can pass NULL. + + png_write_end(png_ptr, info_ptr); + +When you are done, you can free all memory used by libpng like this: + + png_destroy_write_struct(&png_ptr, &info_ptr); + +It is also possible to individually free the info_ptr members that +point to libpng-allocated storage with the following function: + + png_free_data(png_ptr, info_ptr, mask, seq) + mask - identifies data to be freed, a mask + containing the logical OR of one or + more of + PNG_FREE_PLTE, PNG_FREE_TRNS, + PNG_FREE_HIST, PNG_FREE_ICCP, + PNG_FREE_PCAL, PNG_FREE_ROWS, + PNG_FREE_SCAL, PNG_FREE_SPLT, + PNG_FREE_TEXT, PNG_FREE_UNKN, + or simply PNG_FREE_ALL + seq - sequence number of item to be freed + (-1 for all items) + +This function may be safely called when the relevant storage has +already been freed, or has not yet been allocated, or was allocated +by the user and not by libpng, and will in those +cases do nothing. The "seq" parameter is ignored if only one item +of the selected data type, such as PLTE, is allowed. If "seq" is not +-1, and multiple items are allowed for the data type identified in +the mask, such as text or sPLT, only the n'th item in the structure +is freed, where n is "seq". + +If you allocated data such as a palette that you passed +in to libpng with png_set_*, you must not free it until just before the call to +png_destroy_write_struct(). + +The default behavior is only to free data that was allocated internally +by libpng. This can be changed, so that libpng will not free the data, +or so that it will free data that was allocated by the user with png_malloc() +or png_zalloc() and passed in via a png_set_*() function, with + + png_data_freer(png_ptr, info_ptr, freer, mask) + mask - which data elements are affected + same choices as in png_free_data() + freer - one of + PNG_DESTROY_WILL_FREE_DATA + PNG_SET_WILL_FREE_DATA + PNG_USER_WILL_FREE_DATA + +For example, to transfer responsibility for some data from a read structure +to a write structure, you could use + + png_data_freer(read_ptr, read_info_ptr, + PNG_USER_WILL_FREE_DATA, + PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST) + png_data_freer(write_ptr, write_info_ptr, + PNG_DESTROY_WILL_FREE_DATA, + PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST) + +thereby briefly reassigning responsibility for freeing to the user but +immediately afterwards reassigning it once more to the write_destroy +function. Having done this, it would then be safe to destroy the read +structure and continue to use the PLTE, tRNS, and hIST data in the write +structure. + +This function only affects data that has already been allocated. +You can call this function before calling after the png_set_*() functions +to control whether the user or png_destroy_*() is supposed to free the data. +When the user assumes responsibility for libpng-allocated data, the +application must use +png_free() to free it, and when the user transfers responsibility to libpng +for data that the user has allocated, the user must have used png_malloc() +or png_zalloc() to allocate it. + +If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword +separately, do not transfer responsibility for freeing text_ptr to libpng, +because when libpng fills a png_text structure it combines these members with +the key member, and png_free_data() will free only text_ptr.key. Similarly, +if you transfer responsibility for free'ing text_ptr from libpng to your +application, your application must not separately free those members. +For a more compact example of writing a PNG image, see the file example.c. + +V. Modifying/Customizing libpng: + +There are three issues here. The first is changing how libpng does +standard things like memory allocation, input/output, and error handling. +The second deals with more complicated things like adding new chunks, +adding new transformations, and generally changing how libpng works. +Both of those are compile-time issues; that is, they are generally +determined at the time the code is written, and there is rarely a need +to provide the user with a means of changing them. The third is a +run-time issue: choosing between and/or tuning one or more alternate +versions of computationally intensive routines; specifically, optimized +assembly-language (and therefore compiler- and platform-dependent) +versions. + +Memory allocation, input/output, and error handling + +All of the memory allocation, input/output, and error handling in libpng +goes through callbacks that are user-settable. The default routines are +in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change +these functions, call the appropriate png_set_*_fn() function. + +Memory allocation is done through the functions png_malloc() +and png_free(). These currently just call the standard C functions. If +your pointers can't access more then 64K at a time, you will want to set +MAXSEG_64K in zlib.h. Since it is unlikely that the method of handling +memory allocation on a platform will change between applications, these +functions must be modified in the library at compile time. If you prefer +to use a different method of allocating and freeing data, you can use +png_create_read_struct_2() or png_create_write_struct_2() to register +your own functions as described above. + +These functions also provide a void pointer that can be retrieved via + + mem_ptr=png_get_mem_ptr(png_ptr); + +Your replacement memory functions must have prototypes as follows: + + png_voidp malloc_fn(png_structp png_ptr, + png_size_t size); + void free_fn(png_structp png_ptr, png_voidp ptr); + +Your malloc_fn() should return NULL in case of failure. The png_malloc() +function will call png_error() if it receives a NULL from the system +memory allocator or from your replacement malloc_fn(). + +Input/Output in libpng is done through png_read() and png_write(), +which currently just call fread() and fwrite(). The FILE * is stored in +png_struct and is initialized via png_init_io(). If you wish to change +the method of I/O, the library supplies callbacks that you can set +through the function png_set_read_fn() and png_set_write_fn() at run +time, instead of calling the png_init_io() function. These functions +also provide a void pointer that can be retrieved via the function +png_get_io_ptr(). For example: + + png_set_read_fn(png_structp read_ptr, + voidp read_io_ptr, png_rw_ptr read_data_fn) + + png_set_write_fn(png_structp write_ptr, + voidp write_io_ptr, png_rw_ptr write_data_fn, + png_flush_ptr output_flush_fn); + + voidp read_io_ptr = png_get_io_ptr(read_ptr); + voidp write_io_ptr = png_get_io_ptr(write_ptr); + +The replacement I/O functions must have prototypes as follows: + + void user_read_data(png_structp png_ptr, + png_bytep data, png_size_t length); + void user_write_data(png_structp png_ptr, + png_bytep data, png_size_t length); + void user_flush_data(png_structp png_ptr); + +Supplying NULL for the read, write, or flush functions sets them back +to using the default C stream functions. It is an error to read from +a write stream, and vice versa. + +Error handling in libpng is done through png_error() and png_warning(). +Errors handled through png_error() are fatal, meaning that png_error() +should never return to its caller. Currently, this is handled via +setjmp() and longjmp() (unless you have compiled libpng with +PNG_SETJMP_NOT_SUPPORTED, in which case it is handled via PNG_ABORT()), +but you could change this to do things like exit() if you should wish. + +On non-fatal errors, png_warning() is called +to print a warning message, and then control returns to the calling code. +By default png_error() and png_warning() print a message on stderr via +fprintf() unless the library is compiled with PNG_NO_CONSOLE_IO defined +(because you don't want the messages) or PNG_NO_STDIO defined (because +fprintf() isn't available). If you wish to change the behavior of the error +functions, you will need to set up your own message callbacks. These +functions are normally supplied at the time that the png_struct is created. +It is also possible to redirect errors and warnings to your own replacement +functions after png_create_*_struct() has been called by calling: + + png_set_error_fn(png_structp png_ptr, + png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warning_fn); + + png_voidp error_ptr = png_get_error_ptr(png_ptr); + +If NULL is supplied for either error_fn or warning_fn, then the libpng +default function will be used, calling fprintf() and/or longjmp() if a +problem is encountered. The replacement error functions should have +parameters as follows: + + void user_error_fn(png_structp png_ptr, + png_const_charp error_msg); + void user_warning_fn(png_structp png_ptr, + png_const_charp warning_msg); + +The motivation behind using setjmp() and longjmp() is the C++ throw and +catch exception handling methods. This makes the code much easier to write, +as there is no need to check every return code of every function call. +However, there are some uncertainties about the status of local variables +after a longjmp, so the user may want to be careful about doing anything after +setjmp returns non-zero besides returning itself. Consult your compiler +documentation for more details. For an alternative approach, you may wish +to use the "cexcept" facility (see http://cexcept.sourceforge.net). + +Custom chunks + +If you need to read or write custom chunks, you may need to get deeper +into the libpng code. The library now has mechanisms for storing +and writing chunks of unknown type; you can even declare callbacks +for custom chunks. Hoewver, this may not be good enough if the +library code itself needs to know about interactions between your +chunk and existing `intrinsic' chunks. + +If you need to write a new intrinsic chunk, first read the PNG +specification. Acquire a first level of +understanding of how it works. Pay particular attention to the +sections that describe chunk names, and look at how other chunks were +designed, so you can do things similarly. Second, check out the +sections of libpng that read and write chunks. Try to find a chunk +that is similar to yours and use it as a template. More details can +be found in the comments inside the code. It is best to handle unknown +chunks in a generic method, via callback functions, instead of by +modifying libpng functions. + +If you wish to write your own transformation for the data, look through +the part of the code that does the transformations, and check out some of +the simpler ones to get an idea of how they work. Try to find a similar +transformation to the one you want to add and copy off of it. More details +can be found in the comments inside the code itself. + +Configuring for 16 bit platforms + +You will want to look into zconf.h to tell zlib (and thus libpng) that +it cannot allocate more then 64K at a time. Even if you can, the memory +won't be accessible. So limit zlib and libpng to 64K by defining MAXSEG_64K. + +Configuring for DOS + +For DOS users who only have access to the lower 640K, you will +have to limit zlib's memory usage via a png_set_compression_mem_level() +call. See zlib.h or zconf.h in the zlib library for more information. + +Configuring for Medium Model + +Libpng's support for medium model has been tested on most of the popular +compilers. Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets +defined, and FAR gets defined to far in pngconf.h, and you should be +all set. Everything in the library (except for zlib's structure) is +expecting far data. You must use the typedefs with the p or pp on +the end for pointers (or at least look at them and be careful). Make +note that the rows of data are defined as png_bytepp, which is an +unsigned char far * far *. + +Configuring for gui/windowing platforms: + +You will need to write new error and warning functions that use the GUI +interface, as described previously, and set them to be the error and +warning functions at the time that png_create_*_struct() is called, +in order to have them available during the structure initialization. +They can be changed later via png_set_error_fn(). On some compilers, +you may also have to change the memory allocators (png_malloc, etc.). + +Configuring for compiler xxx: + +All includes for libpng are in pngconf.h. If you need to add/change/delete +an include, this is the place to do it. The includes that are not +needed outside libpng are protected by the PNG_INTERNAL definition, +which is only defined for those routines inside libpng itself. The +files in libpng proper only include png.h, which includes pngconf.h. + +Configuring zlib: + +There are special functions to configure the compression. Perhaps the +most useful one changes the compression level, which currently uses +input compression values in the range 0 - 9. The library normally +uses the default compression level (Z_DEFAULT_COMPRESSION = 6). Tests +have shown that for a large majority of images, compression values in +the range 3-6 compress nearly as well as higher levels, and do so much +faster. For online applications it may be desirable to have maximum speed +(Z_BEST_SPEED = 1). With versions of zlib after v0.99, you can also +specify no compression (Z_NO_COMPRESSION = 0), but this would create +files larger than just storing the raw bitmap. You can specify the +compression level by calling: + + png_set_compression_level(png_ptr, level); + +Another useful one is to reduce the memory level used by the library. +The memory level defaults to 8, but it can be lowered if you are +short on memory (running DOS, for example, where you only have 640K). +Note that the memory level does have an effect on compression; among +other things, lower levels will result in sections of incompressible +data being emitted in smaller stored blocks, with a correspondingly +larger relative overhead of up to 15% in the worst case. + + png_set_compression_mem_level(png_ptr, level); + +The other functions are for configuring zlib. They are not recommended +for normal use and may result in writing an invalid PNG file. See +zlib.h for more information on what these mean. + + png_set_compression_strategy(png_ptr, + strategy); + png_set_compression_window_bits(png_ptr, + window_bits); + png_set_compression_method(png_ptr, method); + png_set_compression_buffer_size(png_ptr, size); + +Controlling row filtering + +If you want to control whether libpng uses filtering or not, which +filters are used, and how it goes about picking row filters, you +can call one of these functions. The selection and configuration +of row filters can have a significant impact on the size and +encoding speed and a somewhat lesser impact on the decoding speed +of an image. Filtering is enabled by default for RGB and grayscale +images (with and without alpha), but not for paletted images nor +for any images with bit depths less than 8 bits/pixel. + +The 'method' parameter sets the main filtering method, which is +currently only '0' in the PNG 1.2 specification. The 'filters' +parameter sets which filter(s), if any, should be used for each +scanline. Possible values are PNG_ALL_FILTERS and PNG_NO_FILTERS +to turn filtering on and off, respectively. + +Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB, +PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise +ORed together with '|' to specify one or more filters to use. +These filters are described in more detail in the PNG specification. +If you intend to change the filter type during the course of writing +the image, you should start with flags set for all of the filters +you intend to use so that libpng can initialize its internal +structures appropriately for all of the filter types. (Note that this +means the first row must always be adaptively filtered, because libpng +currently does not allocate the filter buffers until png_write_row() +is called for the first time.) + + filters = PNG_FILTER_NONE | PNG_FILTER_SUB + PNG_FILTER_UP | PNG_FILTER_AVE | + PNG_FILTER_PAETH | PNG_ALL_FILTERS; + + png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, + filters); + The second parameter can also be + PNG_INTRAPIXEL_DIFFERENCING if you are + writing a PNG to be embedded in a MNG + datastream. This parameter must be the + same as the value of filter_method used + in png_set_IHDR(). + +It is also possible to influence how libpng chooses from among the +available filters. This is done in one or both of two ways - by +telling it how important it is to keep the same filter for successive +rows, and by telling it the relative computational costs of the filters. + + double weights[3] = {1.5, 1.3, 1.1}, + costs[PNG_FILTER_VALUE_LAST] = + {1.0, 1.3, 1.3, 1.5, 1.7}; + + png_set_filter_heuristics(png_ptr, + PNG_FILTER_HEURISTIC_WEIGHTED, 3, + weights, costs); + +The weights are multiplying factors that indicate to libpng that the +row filter should be the same for successive rows unless another row filter +is that many times better than the previous filter. In the above example, +if the previous 3 filters were SUB, SUB, NONE, the SUB filter could have a +"sum of absolute differences" 1.5 x 1.3 times higher than other filters +and still be chosen, while the NONE filter could have a sum 1.1 times +higher than other filters and still be chosen. Unspecified weights are +taken to be 1.0, and the specified weights should probably be declining +like those above in order to emphasize recent filters over older filters. + +The filter costs specify for each filter type a relative decoding cost +to be considered when selecting row filters. This means that filters +with higher costs are less likely to be chosen over filters with lower +costs, unless their "sum of absolute differences" is that much smaller. +The costs do not necessarily reflect the exact computational speeds of +the various filters, since this would unduly influence the final image +size. + +Note that the numbers above were invented purely for this example and +are given only to help explain the function usage. Little testing has +been done to find optimum values for either the costs or the weights. + +Removing unwanted object code + +There are a bunch of #define's in pngconf.h that control what parts of +libpng are compiled. All the defines end in _SUPPORTED. If you are +never going to use a capability, you can change the #define to #undef +before recompiling libpng and save yourself code and data space, or +you can turn off individual capabilities with defines that begin with +PNG_NO_. + +You can also turn all of the transforms and ancillary chunk capabilities +off en masse with compiler directives that define +PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS, +or all four, +along with directives to turn on any of the capabilities that you do +want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable +the extra transformations but still leave the library fully capable of reading +and writing PNG files with all known public chunks +Use of the PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive +produces a library that is incapable of reading or writing ancillary chunks. +If you are not using the progressive reading capability, you can +turn that off with PNG_NO_PROGRESSIVE_READ (don't confuse +this with the INTERLACING capability, which you'll still have). + +All the reading and writing specific code are in separate files, so the +linker should only grab the files it needs. However, if you want to +make sure, or if you are building a stand alone library, all the +reading files start with pngr and all the writing files start with +pngw. The files that don't match either (like png.c, pngtrans.c, etc.) +are used for both reading and writing, and always need to be included. +The progressive reader is in pngpread.c + +If you are creating or distributing a dynamically linked library (a .so +or DLL file), you should not remove or disable any parts of the library, +as this will cause applications linked with different versions of the +library to fail if they call functions not available in your library. +The size of the library itself should not be an issue, because only +those sections that are actually used will be loaded into memory. + +Requesting debug printout + +The macro definition PNG_DEBUG can be used to request debugging +printout. Set it to an integer value in the range 0 to 3. Higher +numbers result in increasing amounts of debugging information. The +information is printed to the "stderr" file, unless another file +name is specified in the PNG_DEBUG_FILE macro definition. + +When PNG_DEBUG > 0, the following functions (macros) become available: + + png_debug(level, message) + png_debug1(level, message, p1) + png_debug2(level, message, p1, p2) + +in which "level" is compared to PNG_DEBUG to decide whether to print +the message, "message" is the formatted string to be printed, +and p1 and p2 are parameters that are to be embedded in the string +according to printf-style formatting directives. For example, + + png_debug1(2, "foo=%d\n", foo); + +is expanded to + + if(PNG_DEBUG > 2) + fprintf(PNG_DEBUG_FILE, "foo=%d\n", foo); + +When PNG_DEBUG is defined but is zero, the macros aren't defined, but you +can still use PNG_DEBUG to control your own debugging: + + #ifdef PNG_DEBUG + fprintf(stderr, ... + #endif + +When PNG_DEBUG = 1, the macros are defined, but only png_debug statements +having level = 0 will be printed. There aren't any such statements in +this version of libpng, but if you insert some they will be printed. + +VI. Runtime optimization + +A new feature in libpng 1.2.0 is the ability to dynamically switch between +standard and optimized versions of some routines. Currently these are +limited to three computationally intensive tasks when reading PNG files: +decoding row filters, expanding interlacing, and combining interlaced or +transparent row data with previous row data. Currently the optimized +versions are available only for x86 (Intel, AMD, etc.) platforms with +MMX support, though this may change in future versions. (For example, +the non-MMX assembler optimizations for zlib might become similarly +runtime-selectable in future releases, in which case libpng could be +extended to support them. Alternatively, the compile-time choice of +floating-point versus integer routines for gamma correction might become +runtime-selectable.) + +Because such optimizations tend to be very platform- and compiler-dependent, +both in how they are written and in how they perform, the new runtime code +in libpng has been written to allow programs to query, enable, and disable +either specific optimizations or all such optimizations. For example, to +enable all possible optimizations (bearing in mind that some "optimizations" +may actually run more slowly in rare cases): + + #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) + png_uint_32 mask, flags; + + flags = png_get_asm_flags(png_ptr); + mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE); + png_set_asm_flags(png_ptr, flags | mask); + #endif + +To enable only optimizations relevant to reading PNGs, use PNG_SELECT_READ +by itself when calling png_get_asm_flagmask(); similarly for optimizing +only writing. To disable all optimizations: + + #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) + flags = png_get_asm_flags(png_ptr); + mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE); + png_set_asm_flags(png_ptr, flags & ~mask); + #endif + +To enable or disable only MMX-related features, use png_get_mmx_flagmask() +in place of png_get_asm_flagmask(). The mmx version takes one additional +parameter: + + #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) + int selection = PNG_SELECT_READ | PNG_SELECT_WRITE; + int compilerID; + + mask = png_get_mmx_flagmask(selection, &compilerID); + #endif + +On return, compilerID will indicate which version of the MMX assembler +optimizations was compiled. Currently two flavors exist: Microsoft +Visual C++ (compilerID == 1) and GNU C (a.k.a. gcc/gas, compilerID == 2). +On non-x86 platforms or on systems compiled without MMX optimizations, a +value of -1 is used. + +Note that both png_get_asm_flagmask() and png_get_mmx_flagmask() return +all valid, settable optimization bits for the version of the library that's +currently in use. In the case of shared (dynamically linked) libraries, +this may include optimizations that did not exist at the time the code was +written and compiled. It is also possible, of course, to enable only known, +specific optimizations; for example: + + #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) + flags = PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \ + | PNG_ASM_FLAG_MMX_READ_INTERLACE \ + | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ + | PNG_ASM_FLAG_MMX_READ_FILTER_UP \ + | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ + | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ; + png_set_asm_flags(png_ptr, flags); + #endif + +This method would enable only the MMX read-optimizations available at the +time of libpng 1.2.0's release, regardless of whether a later version of +the DLL were actually being used. (Also note that these functions did not +exist in versions older than 1.2.0, so any attempt to run a dynamically +linked app on such an older version would fail.) + +To determine whether the processor supports MMX instructions at all, use +the png_mmx_support() function: + + #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) + mmxsupport = png_mmx_support(); + #endif + +It returns -1 if MMX support is not compiled into libpng, 0 if MMX code +is compiled but MMX is not supported by the processor, or 1 if MMX support +is fully available. Note that png_mmx_support(), png_get_mmx_flagmask(), +and png_get_asm_flagmask() all may be called without allocating and ini- +tializing any PNG structures (for example, as part of a usage screen or +"about" box). + +The following code can be used to prevent an application from using the +thread_unsafe features, even if libpng was built with PNG_THREAD_UNSAFE_OK +defined: + +#if defined(PNG_USE_PNGGCCRD) && defined(PNG_ASSEMBLER_CODE_SUPPORTED) \ + && defined(PNG_THREAD_UNSAFE_OK) + /* Disable thread-unsafe features of pnggccrd */ + if (png_access_version() >= 10200) + { + png_uint_32 mmx_disable_mask = 0; + png_uint_32 asm_flags; + + mmx_disable_mask |= ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \ + | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ + | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ + | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ); + asm_flags = png_get_asm_flags(png_ptr); + png_set_asm_flags(png_ptr, asm_flags & ~mmx_disable_mask); + } +#endif + +For more extensive examples of runtime querying, enabling and disabling +of optimized features, see contrib/gregbook/readpng2.c in the libpng +source-code distribution. + + +VII. MNG support + +The MNG specification (available at http://www.libpng.org/pub/mng) allows +certain extensions to PNG for PNG images that are embedded in MNG datastreams. +Libpng can support some of these extensions. To enable them, use the +png_permit_mng_features() function: + + feature_set = png_permit_mng_features(png_ptr, mask) + mask is a png_uint_32 containing the logical OR of the + features you want to enable. These include + PNG_FLAG_MNG_EMPTY_PLTE + PNG_FLAG_MNG_FILTER_64 + PNG_ALL_MNG_FEATURES + feature_set is a png_32_uint that is the logical AND of + your mask with the set of MNG features that is + supported by the version of libpng that you are using. + +It is an error to use this function when reading or writing a standalone +PNG file with the PNG 8-byte signature. The PNG datastream must be wrapped +in a MNG datastream. As a minimum, it must have the MNG 8-byte signature +and the MHDR and MEND chunks. Libpng does not provide support for these +or any other MNG chunks; your application must provide its own support for +them. You may wish to consider using libmng (available at +http://www.libmng.com) instead. + +VIII. Changes to Libpng from version 0.88 + +It should be noted that versions of libpng later than 0.96 are not +distributed by the original libpng author, Guy Schalnat, nor by +Andreas Dilger, who had taken over from Guy during 1996 and 1997, and +distributed versions 0.89 through 0.96, but rather by another member +of the original PNG Group, Glenn Randers-Pehrson. Guy and Andreas are +still alive and well, but they have moved on to other things. + +The old libpng functions png_read_init(), png_write_init(), +png_info_init(), png_read_destroy(), and png_write_destroy() have been +moved to PNG_INTERNAL in version 0.95 to discourage their use. These +functions will be removed from libpng version 2.0.0. + +The preferred method of creating and initializing the libpng structures is +via the png_create_read_struct(), png_create_write_struct(), and +png_create_info_struct() because they isolate the size of the structures +from the application, allow version error checking, and also allow the +use of custom error handling routines during the initialization, which +the old functions do not. The functions png_read_destroy() and +png_write_destroy() do not actually free the memory that libpng +allocated for these structs, but just reset the data structures, so they +can be used instead of png_destroy_read_struct() and +png_destroy_write_struct() if you feel there is too much system overhead +allocating and freeing the png_struct for each image read. + +Setting the error callbacks via png_set_message_fn() before +png_read_init() as was suggested in libpng-0.88 is no longer supported +because this caused applications that do not use custom error functions +to fail if the png_ptr was not initialized to zero. It is still possible +to set the error callbacks AFTER png_read_init(), or to change them with +png_set_error_fn(), which is essentially the same function, but with a new +name to force compilation errors with applications that try to use the old +method. + +Starting with version 1.0.7, you can find out which version of the library +you are using at run-time: + + png_uint_32 libpng_vn = png_access_version_number(); + +The number libpng_vn is constructed from the major version, minor +version with leading zero, and release number with leading zero, +(e.g., libpng_vn for version 1.0.7 is 10007). + +You can also check which version of png.h you used when compiling your +application: + + png_uint_32 application_vn = PNG_LIBPNG_VER; + +IX. Y2K Compliance in libpng + +October 3, 2002 + +Since the PNG Development group is an ad-hoc body, we can't make +an official declaration. + +This is your unofficial assurance that libpng from version 0.71 and +upward through 1.2.5 are Y2K compliant. It is my belief that earlier +versions were also Y2K compliant. + +Libpng only has three year fields. One is a 2-byte unsigned integer that +will hold years up to 65535. The other two hold the date in text +format, and will hold years up to 9999. + +The integer is + "png_uint_16 year" in png_time_struct. + +The strings are + "png_charp time_buffer" in png_struct and + "near_time_buffer", which is a local character string in png.c. + +There are seven time-related functions: + + png_convert_to_rfc_1123() in png.c + (formerly png_convert_to_rfc_1152() in error) + png_convert_from_struct_tm() in pngwrite.c, called + in pngwrite.c + png_convert_from_time_t() in pngwrite.c + png_get_tIME() in pngget.c + png_handle_tIME() in pngrutil.c, called in pngread.c + png_set_tIME() in pngset.c + png_write_tIME() in pngwutil.c, called in pngwrite.c + +All appear to handle dates properly in a Y2K environment. The +png_convert_from_time_t() function calls gmtime() to convert from system +clock time, which returns (year - 1900), which we properly convert to +the full 4-digit year. There is a possibility that applications using +libpng are not passing 4-digit years into the png_convert_to_rfc_1123() +function, or that they are incorrectly passing only a 2-digit year +instead of "year - 1900" into the png_convert_from_struct_tm() function, +but this is not under our control. The libpng documentation has always +stated that it works with 4-digit years, and the APIs have been +documented as such. + +The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned +integer to hold the year, and can hold years as large as 65535. + +zlib, upon which libpng depends, is also Y2K compliant. It contains +no date-related code. + + + Glenn Randers-Pehrson + libpng maintainer + PNG Development Group diff --git a/gtkmm-osx/libpng-1.2.5/libpngpf.3 b/gtkmm-osx/libpng-1.2.5/libpngpf.3 new file mode 100644 index 0000000..3c1f379 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/libpngpf.3 @@ -0,0 +1,552 @@ +.TH LIBPNGPF 3 "October 3, 2002" +.SH NAME +libpng \- Portable Network Graphics (PNG) Reference Library 1.2.5 +(private functions) +.SH SYNOPSIS +\fB#include \fP + +\fI\fB + +\fBvoid png_build_gamma_table (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_build_grayscale_palette (int \fP\fIbit_depth\fP\fB, png_colorp \fIpalette\fP\fB);\fP + +\fI\fB + +\fBvoid png_calculate_crc (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIptr\fP\fB, png_size_t \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_check_chunk_name (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP + +\fI\fB + +\fBpng_size_t png_check_keyword (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIkey\fP\fB, png_charpp \fInew_key\fP\fB);\fP + +\fI\fB + +\fBvoid png_combine_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fImask\fP\fB);\fP + +\fI\fB + +\fBvoid png_correct_palette (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fInum_palette\fP\fB);\fP + +\fI\fB + +\fBint png_crc_error (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBint png_crc_finish (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIskip\fP\fB);\fP + +\fI\fB + +\fBvoid png_crc_read (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuf\fP\fB, png_size_t \fIlength\fP\fB);\fP + +\fI\fB + +\fBpng_voidp png_create_struct (int \fItype\fP\fB);\fP + +\fI\fB + +\fBpng_voidp png_create_struct_2 (int \fP\fItype\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_voidp \fImem_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_charp png_decompress_chunk (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcomp_type\fP\fB, png_charp \fP\fIchunkdata\fP\fB, png_size_t \fP\fIchunklength\fP\fB, png_size_t \fP\fIprefix_length\fP\fB, png_size_t \fI*data_length\fP\fB);\fP + +\fI\fB + +\fBvoid png_destroy_struct (png_voidp \fIstruct_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_destroy_struct_2 (png_voidp \fP\fIstruct_ptr\fP\fB, png_free_ptr \fP\fIfree_fn\fP\fB, png_voidp \fImem_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_background (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fP\fItrans_values\fP\fB, png_color_16p \fP\fIbackground\fP\fB, png_color_16p \fP\fIbackground_1\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_bytep \fP\fIgamma_from_1\fP\fB, png_bytep \fP\fIgamma_to_1\fP\fB, png_uint_16pp \fP\fIgamma_16\fP\fB, png_uint_16pp \fP\fIgamma_16_from_1\fP\fB, png_uint_16pp \fP\fIgamma_16_to_1\fP\fB, int \fIgamma_shift\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_bgr (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_chop (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_dither (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIpalette_lookup\fP\fB, png_bytep \fIdither_lookup\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_expand (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fItrans_value\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_expand_palette (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_colorp \fP\fIpalette\fP\fB, png_bytep \fP\fItrans\fP\fB, int \fInum_trans\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_gamma (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_uint_16pp \fP\fIgamma_16_table\fP\fB, int \fIgamma_shift\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_gray_to_rgb (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_invert (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_pack (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fIbit_depth\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_packswap (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_read_filler (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, png_uint_32 \fIflags\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_read_interlace (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fP\fIpass\fP\fB, png_uint_32 \fItransformations\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_read_invert_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_read_swap_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_read_transformations (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBint png_do_rgb_to_gray (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_shift (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_8p \fIbit_depth\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_strip_filler (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fIflags\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_swap (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_unpack (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_unshift (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_8p \fIsig_bits\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_write_interlace (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fIpass\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_write_invert_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_write_swap_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP + +\fI\fB + +\fBvoid png_do_write_transformations (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid *png_far_to_near (png_structp png_ptr,png_voidp \fP\fIptr\fP\fB, int \fIcheck\fP\fB);\fP + +\fI\fB + +\fBvoid png_flush (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBpng_int_32 png_get_int_32 (png_bytep \fIbuf\fP\fB);\fP + +\fI\fB + +\fBpng_uint_16 png_get_uint_16 (png_bytep \fIbuf\fP\fB);\fP + +\fI\fB + +\fBpng_uint_32 png_get_uint_32 (png_bytep \fIbuf\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_gAMA (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_IEND (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_iTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_handle_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_info_destroy (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_init_mmx_flags (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_init_read_transformations (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_process_IDAT_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_length\fP\fB);\fP + +\fI\fB + +\fBvoid png_process_some_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_push_check_crc (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_push_crc_finish (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_push_crc_skip (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_push_fill_buffer (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_push_handle_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_push_handle_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_push_handle_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_push_have_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_push_have_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_push_have_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIrow\fP\fB);\fP + +\fI\fB + +\fBvoid png_push_process_row (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_push_read_chunk (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_push_read_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_push_read_IDAT (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_push_read_sig (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_push_read_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_push_read_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_push_restore_buffer (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_length\fP\fB);\fP + +\fI\fB + +\fBvoid png_push_save_buffer (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_read_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_read_filter_row (png_structp \fP\fIpng_ptr\fP\fB, png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIprev_row\fP\fB, int \fIfilter\fP\fB);\fP + +\fI\fB + +\fBvoid png_read_finish_row (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_read_push_finish_row (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_read_start_row (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_read_transform_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_reset_crc (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_save_int_32 (png_bytep \fP\fIbuf\fP\fB, png_int_32 \fIi\fP\fB);\fP + +\fI\fB + +\fBvoid png_save_uint_16 (png_bytep \fP\fIbuf\fP\fB, unsigned int \fIi\fP\fB);\fP + +\fI\fB + +\fBvoid png_save_uint_32 (png_bytep \fP\fIbuf\fP\fB, png_uint_32 \fIi\fP\fB);\fP + +\fI\fB + +\fBint png_set_text_2 (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fItext_ptr\fP\fB, int \fInum_text)\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_cHRM (png_structp \fP\fIpng_ptr\fP\fB, double \fP\fIwhite_x\fP\fB, double \fP\fIwhite_y\fP\fB, double \fP\fIred_x\fP\fB, double \fP\fIred_y\fP\fB, double \fP\fIgreen_x\fP\fB, double \fP\fIgreen_y\fP\fB, double \fP\fIblue_x\fP\fB, double \fIblue_y\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIwhite_x\fP\fB, png_uint_32 \fP\fIwhite_y\fP\fB, png_uint_32 \fP\fIred_x\fP\fB, png_uint_32 \fP\fIred_y\fP\fB, png_uint_32 \fP\fIgreen_x\fP\fB, png_uint_32 \fP\fIgreen_y\fP\fB, png_uint_32 \fP\fIblue_x\fP\fB, png_uint_32 \fIblue_y\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_filtered_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIfiltered_row\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_find_filter (png_structp \fP\fIpng_ptr\fP\fB, png_row_infop \fIrow_info\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_finish_row (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_gAMA (png_structp \fP\fIpng_ptr\fP\fB, double \fIfile_gamma\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_gAMA_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIint_file_gamma\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_uint_16p \fP\fIhist\fP\fB, int \fInum_hist\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIname\fP\fB, int \fP\fIcompression_type\fP\fB, png_charp \fP\fIprofile\fP\fB, int \fIproflen\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_IDAT (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_IEND (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIwidth\fP\fB, png_uint_32 \fP\fIheight\fP\fB, int \fP\fIbit_depth\fP\fB, int \fP\fIcolor_type\fP\fB, int \fP\fIcompression_type\fP\fB, int \fP\fIfilter_type\fP\fB, int \fIinterlace_type\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_iTXt (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcompression\fP\fB, png_charp \fP\fIkey\fP\fB, png_charp \fP\fIlang\fP\fB, png_charp \fP\fItranslated_key\fP\fB, png_charp \fItext)\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIx_offset\fP\fB, png_uint_32 \fP\fIy_offset\fP\fB, int \fIunit_type\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIpurpose\fP\fB, png_int_32 \fP\fIX0\fP\fB, png_int_32 \fP\fIX1\fP\fB, int \fP\fItype\fP\fB, int \fP\fInparams\fP\fB, png_charp \fP\fIunits\fP\fB, png_charpp \fIparams\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIx_pixels_per_unit\fP\fB, png_uint_32 \fP\fIy_pixels_per_unit\fP\fB, int \fIunit_type\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, png_uint_32 \fInum_pal\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_color_8p \fP\fIsbit\fP\fB, int \fIcolor_type\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIunit\fP\fB, double \fP\fIwidth\fP\fB, double \fIheight\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_sCAL_s (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIunit\fP\fB, png_charp \fP\fIwidth\fP\fB, png_charp \fIheight\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_sig (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_sRGB (png_structp \fP\fIpng_ptr\fP\fB, int \fIintent\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_spalette_p \fIpalette\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_start_row (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIkey\fP\fB, png_charp \fP\fItext\fP\fB, png_size_t \fItext_len\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_timep \fImod_time\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fItrans\fP\fB, png_color_16p \fP\fIvalues\fP\fB, int \fP\fInumber\fP\fB, int \fIcolor_type\fP\fB);\fP + +\fI\fB + +\fBvoid png_write_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIkey\fP\fB, png_charp \fP\fItext\fP\fB, png_size_t \fP\fItext_len\fP\fB, int \fIcompression\fP\fB);\fP + +\fI\fB + +\fBvoidpf png_zalloc (voidpf \fP\fIpng_ptr\fP\fB, uInt \fP\fIitems\fP\fB, uInt \fIsize\fP\fB);\fP + +\fI\fB + +\fBvoid png_zfree (voidpf \fP\fIpng_ptr\fP\fB, voidpf \fIptr\fP\fB);\fP + +\fI\fB + +.SH DESCRIPTION +The functions listed above are used privately by libpng +and are not recommended for use by applications. They are +not "exported" to applications using shared libraries. They +are listed alphabetically here as an aid to libpng maintainers. +See png.h for more information on these functions. + +.SH SEE ALSO +libpng(3), png(5) +.SH AUTHOR +Glenn Randers-Pehrson diff --git a/gtkmm-osx/libpng-1.2.5/makefile.macosx b/gtkmm-osx/libpng-1.2.5/makefile.macosx new file mode 100644 index 0000000..2ea2382 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/makefile.macosx @@ -0,0 +1,198 @@ +# makefile for libpng, MACOS X +# Copyright (C) 2002 Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# Modified by Karin Kosina 20011010: +# build shared library (*.dylib) +# For conditions of distribution and use, see copyright notice in png.h + +# where make install puts libpng.a and png.h +#prefix=/usr/local + +# Where the zlib library and include files are located +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +ZLIBLIB=/usr/lib +ZLIBINC=/usr/include + +CC=cc + +PNGMAJ = 0 +PNGMIN = 1.2.5 +PNGVER = $(PNGMAJ).$(PNGMIN) + +CFLAGS+=-fno-common -I$(ZLIBINC) -O # -g -DPNG_DEBUG=5 +LDFLAGS+=-L. -L$(ZLIBLIB) -lpng -lz + +LIBNAME=libpng12 +SHAREDLIB_POSTFIX=dylib +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +#RANLIB=echo +RANLIB=ranlib + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +all: libpng.a pngtest shared libpng.pc libpng-config + +shared: $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! | \ + sed -e s/-lm// > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo libs=\"-lpng12 -lz\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +libpng.a: $(OBJS) + $(CC) -static -nodefaultlibs -o $@ $(OBJS) +# ar rc $(ARCHFLAGS) $@ $(OBJS) +# $(RANLIB) $@ + +$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX): $(OBJS) + $(CC) -dynamiclib -flat_namespace -undefined suppress -o $@ $(OBJS) + +libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX): $(OBJS) + $(CC) -dynamiclib -compatibility_version 3 -flat_namespace \ + -undefined suppress -o $@ $(OBJS) + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \ + libpng.pc libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f \ + $(DL)/$(LIBNAME).$(PNGVER)*.$(SHAREDLIB_POSTFIX) + -@/bin/rm -f $(DL)/$(LIBNAME).$(SHAREDLIB_POSTFIX) +# -@/bin/rm -f libpng.$(SHAREDLIB_POSTFIX) +# -@/bin/rm -f libpng.3.$(SHAREDLIB_POSTFIX) +# -@/bin/rm -f libpng.3.$(PNGMIN)*.$(SHAREDLIB_POSTFIX) + cp libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) $(DL) + cp $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) $(DL) + chmod 755 $(DL)/$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) + chmod 755 $(DL)/libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) + (cd $(DL); \ + ln -f -s libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) \ + libpng.3.$(SHAREDLIB_POSTFIX); \ + ln -f -s libpng.3.$(SHAREDLIB_POSTFIX) libpng.$(SHAREDLIB_POSTFIX); \ + ln -f -s $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \ + libpng.$(SHAREDLIB_POSTFIX); \ + ln -f -s libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) \ + libpng.3.$(SHAREDLIB_POSTFIX); \ + ln -f -s $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \ + $(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX); \ + ln -f -s $(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX) \ + $(LIBNAME).$(SHAREDLIB_POSTFIX)) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi + -@/bin/rm -f $(DM)/man3/libpng.3 + -@/bin/rm -f $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then mkdir $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. + +test-installed: + $(CC) $(CFLAGS) \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + -L$(ZLIBLIB) \ + -o pngtesti `$(BINPATH)/libpng12-config --ldflags` + ./pngtesti pngtest.png + +clean: + rm -f *.o libpng.a pngtest pngout.png libpng-config \ + $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \ + $(LIBNAME).$(SHAREDLIB_POSTFIX) \ + libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) \ + libpng.pc + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h +pngerror.o: png.h pngconf.h +pngrio.o: png.h pngconf.h +pngwio.o: png.h pngconf.h +pngmem.o: png.h pngconf.h +pngset.o: png.h pngconf.h +pngget.o: png.h pngconf.h +pngread.o: png.h pngconf.h +pngrtran.o: png.h pngconf.h +pngrutil.o: png.h pngconf.h +pngtest.o: png.h pngconf.h +pngtrans.o: png.h pngconf.h +pngwrite.o: png.h pngconf.h +pngwtran.o: png.h pngconf.h +pngwutil.o: png.h pngconf.h +pngpread.o: png.h pngconf.h + diff --git a/gtkmm-osx/libpng-1.2.5/png.5 b/gtkmm-osx/libpng-1.2.5/png.5 new file mode 100644 index 0000000..11ab244 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/png.5 @@ -0,0 +1,60 @@ +.TH PNG 5 "October 3, 2002" +.SH NAME +png \- Portable Network Graphics (PNG) format +.SH DESCRIPTION +PNG (Portable Network Graphics) is an extensible file format for the +lossless, portable, well-compressed storage of raster images. PNG provides +a patent-free replacement for GIF and can also replace many +common uses of TIFF. Indexed-color, grayscale, and truecolor images are +supported, plus an optional alpha channel. Sample depths range from +1 to 16 bits. +.br + +PNG is designed to work well in online viewing applications, such as the +World Wide Web, so it is fully streamable with a progressive display +option. PNG is robust, providing both full file integrity checking and +fast, simple detection of common transmission errors. Also, PNG can store +gamma and chromaticity data for improved color matching on heterogeneous +platforms. + +.SH "SEE ALSO" +.IR libpng(3), zlib(3), deflate(5), and zlib(5) +.LP +PNG 1.2 specification, July 1999: +.IP +.br +http://www.libpng.org/pub/png +.br +or ftp://ftp.uu.net/graphics/png/documents +.LP +PNG 1.0 specification, October 1996: +.IP +.br +RFC 2083 +.IP +.br +ftp://ds.internic.net/rfc/rfc2083.txt +.br +or (as a W3C Recommendation) at +.br +http://www.w3.org/TR/REC-png.html +.SH AUTHORS +This man page: Glenn Randers-Pehrson +.LP +Portable Network Graphics (PNG) Specification Version 1.2 (July 8, 1999): +Glenn Randers-Pehrson and others (png-list@ccrc.wustl.edu). +.LP +Portable Network Graphics (PNG) Specification Version 1.0 (October 1, 1996): +Thomas Boutell and others (png-list@ccrc.wustl.edu). +.LP + + +.SH COPYRIGHT NOTICE +The PNG-1.2 specification is copyright (c) 1999 Glenn Randers-Pehrson. +See the specification for conditions of use and distribution. +.LP +The PNG-1.0 specification is copyright (c) 1996 Massachusetts Institute of +Technology. See the specification for conditions of use and distribution. +.LP +.\" end of man page + diff --git a/gtkmm-osx/libpng-1.2.5/png.c b/gtkmm-osx/libpng-1.2.5/png.c new file mode 100644 index 0000000..2a55ccb --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/png.c @@ -0,0 +1,805 @@ + +/* png.c - location for general purpose libpng functions + * + * libpng version 1.2.5 - October 3, 2002 + * Copyright (c) 1998-2002 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + */ + +#define PNG_INTERNAL +#define PNG_NO_EXTERN +#include "png.h" + +/* Generate a compiler error if there is an old png.h in the search path. */ +typedef version_1_2_5 Your_png_h_is_not_version_1_2_5; + +/* Version information for C files. This had better match the version + * string defined in png.h. */ + +#ifdef PNG_USE_GLOBAL_ARRAYS +/* png_libpng_ver was changed to a function in version 1.0.5c */ +const char png_libpng_ver[18] = "1.2.5"; + +/* png_sig was changed to a function in version 1.0.5c */ +/* Place to hold the signature string for a PNG file. */ +const png_byte FARDATA png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10}; + +/* Invoke global declarations for constant strings for known chunk types */ +PNG_IHDR; +PNG_IDAT; +PNG_IEND; +PNG_PLTE; +PNG_bKGD; +PNG_cHRM; +PNG_gAMA; +PNG_hIST; +PNG_iCCP; +PNG_iTXt; +PNG_oFFs; +PNG_pCAL; +PNG_sCAL; +PNG_pHYs; +PNG_sBIT; +PNG_sPLT; +PNG_sRGB; +PNG_tEXt; +PNG_tIME; +PNG_tRNS; +PNG_zTXt; + +/* arrays to facilitate easy interlacing - use pass (0 - 6) as index */ + +/* start of interlace block */ +const int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; + +/* offset to next interlace block */ +const int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; + +/* start of interlace block in the y direction */ +const int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1}; + +/* offset to next interlace block in the y direction */ +const int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2}; + +/* width of interlace block (used in assembler routines only) */ +#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW +const int FARDATA png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; +#endif + +/* Height of interlace block. This is not currently used - if you need + * it, uncomment it here and in png.h +const int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1}; +*/ + +/* Mask to determine which pixels are valid in a pass */ +const int FARDATA png_pass_mask[] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff}; + +/* Mask to determine which pixels to overwrite while displaying */ +const int FARDATA png_pass_dsp_mask[] + = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff}; + +#endif + +/* Tells libpng that we have already handled the first "num_bytes" bytes + * of the PNG file signature. If the PNG data is embedded into another + * stream we can set num_bytes = 8 so that libpng will not attempt to read + * or write any of the magic bytes before it starts on the IHDR. + */ + +void PNGAPI +png_set_sig_bytes(png_structp png_ptr, int num_bytes) +{ + png_debug(1, "in png_set_sig_bytes\n"); + if (num_bytes > 8) + png_error(png_ptr, "Too many bytes for PNG signature."); + + png_ptr->sig_bytes = (png_byte)(num_bytes < 0 ? 0 : num_bytes); +} + +/* Checks whether the supplied bytes match the PNG signature. We allow + * checking less than the full 8-byte signature so that those apps that + * already read the first few bytes of a file to determine the file type + * can simply check the remaining bytes for extra assurance. Returns + * an integer less than, equal to, or greater than zero if sig is found, + * respectively, to be less than, to match, or be greater than the correct + * PNG signature (this is the same behaviour as strcmp, memcmp, etc). + */ +int PNGAPI +png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check) +{ + png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10}; + if (num_to_check > 8) + num_to_check = 8; + else if (num_to_check < 1) + return (0); + + if (start > 7) + return (0); + + if (start + num_to_check > 8) + num_to_check = 8 - start; + + return ((int)(png_memcmp(&sig[start], &png_signature[start], num_to_check))); +} + +/* (Obsolete) function to check signature bytes. It does not allow one + * to check a partial signature. This function might be removed in the + * future - use png_sig_cmp(). Returns true (nonzero) if the file is a PNG. + */ +int PNGAPI +png_check_sig(png_bytep sig, int num) +{ + return ((int)!png_sig_cmp(sig, (png_size_t)0, (png_size_t)num)); +} + +/* Function to allocate memory for zlib and clear it to 0. */ +#ifdef PNG_1_0_X +voidpf PNGAPI +#else +voidpf /* private */ +#endif +png_zalloc(voidpf png_ptr, uInt items, uInt size) +{ + png_uint_32 num_bytes = (png_uint_32)items * size; + png_voidp ptr; + png_structp p=png_ptr; + png_uint_32 save_flags=p->flags; + + p->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK; + ptr = (png_voidp)png_malloc((png_structp)png_ptr, num_bytes); + p->flags=save_flags; + +#ifndef PNG_NO_ZALLOC_ZERO + if (ptr == NULL) + return ((voidpf)ptr); + + if (num_bytes > (png_uint_32)0x8000L) + { + png_memset(ptr, 0, (png_size_t)0x8000L); + png_memset((png_bytep)ptr + (png_size_t)0x8000L, 0, + (png_size_t)(num_bytes - (png_uint_32)0x8000L)); + } + else + { + png_memset(ptr, 0, (png_size_t)num_bytes); + } +#endif + return ((voidpf)ptr); +} + +/* function to free memory for zlib */ +#ifdef PNG_1_0_X +void PNGAPI +#else +void /* private */ +#endif +png_zfree(voidpf png_ptr, voidpf ptr) +{ + png_free((png_structp)png_ptr, (png_voidp)ptr); +} + +/* Reset the CRC variable to 32 bits of 1's. Care must be taken + * in case CRC is > 32 bits to leave the top bits 0. + */ +void /* PRIVATE */ +png_reset_crc(png_structp png_ptr) +{ + png_ptr->crc = crc32(0, Z_NULL, 0); +} + +/* Calculate the CRC over a section of data. We can only pass as + * much data to this routine as the largest single buffer size. We + * also check that this data will actually be used before going to the + * trouble of calculating it. + */ +void /* PRIVATE */ +png_calculate_crc(png_structp png_ptr, png_bytep ptr, png_size_t length) +{ + int need_crc = 1; + + if (png_ptr->chunk_name[0] & 0x20) /* ancillary */ + { + if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_MASK) == + (PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN)) + need_crc = 0; + } + else /* critical */ + { + if (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE) + need_crc = 0; + } + + if (need_crc) + png_ptr->crc = crc32(png_ptr->crc, ptr, (uInt)length); +} + +/* Allocate the memory for an info_struct for the application. We don't + * really need the png_ptr, but it could potentially be useful in the + * future. This should be used in favour of malloc(sizeof(png_info)) + * and png_info_init() so that applications that want to use a shared + * libpng don't have to be recompiled if png_info changes size. + */ +png_infop PNGAPI +png_create_info_struct(png_structp png_ptr) +{ + png_infop info_ptr; + + png_debug(1, "in png_create_info_struct\n"); + if(png_ptr == NULL) return (NULL); +#ifdef PNG_USER_MEM_SUPPORTED + info_ptr = (png_infop)png_create_struct_2(PNG_STRUCT_INFO, + png_ptr->malloc_fn, png_ptr->mem_ptr); +#else + info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO); +#endif + if (info_ptr != NULL) + png_info_init_3(&info_ptr, sizeof(png_info)); + + return (info_ptr); +} + +/* This function frees the memory associated with a single info struct. + * Normally, one would use either png_destroy_read_struct() or + * png_destroy_write_struct() to free an info struct, but this may be + * useful for some applications. + */ +void PNGAPI +png_destroy_info_struct(png_structp png_ptr, png_infopp info_ptr_ptr) +{ + png_infop info_ptr = NULL; + + png_debug(1, "in png_destroy_info_struct\n"); + if (info_ptr_ptr != NULL) + info_ptr = *info_ptr_ptr; + + if (info_ptr != NULL) + { + png_info_destroy(png_ptr, info_ptr); + +#ifdef PNG_USER_MEM_SUPPORTED + png_destroy_struct_2((png_voidp)info_ptr, png_ptr->free_fn, + png_ptr->mem_ptr); +#else + png_destroy_struct((png_voidp)info_ptr); +#endif + *info_ptr_ptr = NULL; + } +} + +/* Initialize the info structure. This is now an internal function (0.89) + * and applications using it are urged to use png_create_info_struct() + * instead. + */ +#undef png_info_init +void PNGAPI +png_info_init(png_infop info_ptr) +{ + /* We only come here via pre-1.0.12-compiled applications */ + png_info_init_3(&info_ptr, 0); +} + +void PNGAPI +png_info_init_3(png_infopp ptr_ptr, png_size_t png_info_struct_size) +{ + png_infop info_ptr = *ptr_ptr; + + png_debug(1, "in png_info_init_3\n"); + + if(sizeof(png_info) > png_info_struct_size) + { + png_destroy_struct(info_ptr); + info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO); + *ptr_ptr = info_ptr; + } + + /* set everything to 0 */ + png_memset(info_ptr, 0, sizeof (png_info)); +} + +#ifdef PNG_FREE_ME_SUPPORTED +void PNGAPI +png_data_freer(png_structp png_ptr, png_infop info_ptr, + int freer, png_uint_32 mask) +{ + png_debug(1, "in png_data_freer\n"); + if (png_ptr == NULL || info_ptr == NULL) + return; + if(freer == PNG_DESTROY_WILL_FREE_DATA) + info_ptr->free_me |= mask; + else if(freer == PNG_USER_WILL_FREE_DATA) + info_ptr->free_me &= ~mask; + else + png_warning(png_ptr, + "Unknown freer parameter in png_data_freer."); +} +#endif + +void PNGAPI +png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, + int num) +{ + png_debug(1, "in png_free_data\n"); + if (png_ptr == NULL || info_ptr == NULL) + return; + +#if defined(PNG_TEXT_SUPPORTED) +/* free text item num or (if num == -1) all text items */ +#ifdef PNG_FREE_ME_SUPPORTED +if ((mask & PNG_FREE_TEXT) & info_ptr->free_me) +#else +if (mask & PNG_FREE_TEXT) +#endif +{ + if (num != -1) + { + if (info_ptr->text && info_ptr->text[num].key) + { + png_free(png_ptr, info_ptr->text[num].key); + info_ptr->text[num].key = NULL; + } + } + else + { + int i; + for (i = 0; i < info_ptr->num_text; i++) + png_free_data(png_ptr, info_ptr, PNG_FREE_TEXT, i); + png_free(png_ptr, info_ptr->text); + info_ptr->text = NULL; + info_ptr->num_text=0; + } +} +#endif + +#if defined(PNG_tRNS_SUPPORTED) +/* free any tRNS entry */ +#ifdef PNG_FREE_ME_SUPPORTED +if ((mask & PNG_FREE_TRNS) & info_ptr->free_me) +#else +if ((mask & PNG_FREE_TRNS) && (png_ptr->flags & PNG_FLAG_FREE_TRNS)) +#endif +{ + png_free(png_ptr, info_ptr->trans); + info_ptr->valid &= ~PNG_INFO_tRNS; +#ifndef PNG_FREE_ME_SUPPORTED + png_ptr->flags &= ~PNG_FLAG_FREE_TRNS; +#endif + info_ptr->trans = NULL; +} +#endif + +#if defined(PNG_sCAL_SUPPORTED) +/* free any sCAL entry */ +#ifdef PNG_FREE_ME_SUPPORTED +if ((mask & PNG_FREE_SCAL) & info_ptr->free_me) +#else +if (mask & PNG_FREE_SCAL) +#endif +{ +#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED) + png_free(png_ptr, info_ptr->scal_s_width); + png_free(png_ptr, info_ptr->scal_s_height); + info_ptr->scal_s_width = NULL; + info_ptr->scal_s_height = NULL; +#endif + info_ptr->valid &= ~PNG_INFO_sCAL; +} +#endif + +#if defined(PNG_pCAL_SUPPORTED) +/* free any pCAL entry */ +#ifdef PNG_FREE_ME_SUPPORTED +if ((mask & PNG_FREE_PCAL) & info_ptr->free_me) +#else +if (mask & PNG_FREE_PCAL) +#endif +{ + png_free(png_ptr, info_ptr->pcal_purpose); + png_free(png_ptr, info_ptr->pcal_units); + info_ptr->pcal_purpose = NULL; + info_ptr->pcal_units = NULL; + if (info_ptr->pcal_params != NULL) + { + int i; + for (i = 0; i < (int)info_ptr->pcal_nparams; i++) + { + png_free(png_ptr, info_ptr->pcal_params[i]); + info_ptr->pcal_params[i]=NULL; + } + png_free(png_ptr, info_ptr->pcal_params); + info_ptr->pcal_params = NULL; + } + info_ptr->valid &= ~PNG_INFO_pCAL; +} +#endif + +#if defined(PNG_iCCP_SUPPORTED) +/* free any iCCP entry */ +#ifdef PNG_FREE_ME_SUPPORTED +if ((mask & PNG_FREE_ICCP) & info_ptr->free_me) +#else +if (mask & PNG_FREE_ICCP) +#endif +{ + png_free(png_ptr, info_ptr->iccp_name); + png_free(png_ptr, info_ptr->iccp_profile); + info_ptr->iccp_name = NULL; + info_ptr->iccp_profile = NULL; + info_ptr->valid &= ~PNG_INFO_iCCP; +} +#endif + +#if defined(PNG_sPLT_SUPPORTED) +/* free a given sPLT entry, or (if num == -1) all sPLT entries */ +#ifdef PNG_FREE_ME_SUPPORTED +if ((mask & PNG_FREE_SPLT) & info_ptr->free_me) +#else +if (mask & PNG_FREE_SPLT) +#endif +{ + if (num != -1) + { + if(info_ptr->splt_palettes) + { + png_free(png_ptr, info_ptr->splt_palettes[num].name); + png_free(png_ptr, info_ptr->splt_palettes[num].entries); + info_ptr->splt_palettes[num].name = NULL; + info_ptr->splt_palettes[num].entries = NULL; + } + } + else + { + if(info_ptr->splt_palettes_num) + { + int i; + for (i = 0; i < (int)info_ptr->splt_palettes_num; i++) + png_free_data(png_ptr, info_ptr, PNG_FREE_SPLT, i); + + png_free(png_ptr, info_ptr->splt_palettes); + info_ptr->splt_palettes = NULL; + info_ptr->splt_palettes_num = 0; + } + info_ptr->valid &= ~PNG_INFO_sPLT; + } +} +#endif + +#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_FREE_ME_SUPPORTED +if ((mask & PNG_FREE_UNKN) & info_ptr->free_me) +#else +if (mask & PNG_FREE_UNKN) +#endif +{ + if (num != -1) + { + if(info_ptr->unknown_chunks) + { + png_free(png_ptr, info_ptr->unknown_chunks[num].data); + info_ptr->unknown_chunks[num].data = NULL; + } + } + else + { + int i; + + if(info_ptr->unknown_chunks_num) + { + for (i = 0; i < (int)info_ptr->unknown_chunks_num; i++) + png_free_data(png_ptr, info_ptr, PNG_FREE_UNKN, i); + + png_free(png_ptr, info_ptr->unknown_chunks); + info_ptr->unknown_chunks = NULL; + info_ptr->unknown_chunks_num = 0; + } + } +} +#endif + +#if defined(PNG_hIST_SUPPORTED) +/* free any hIST entry */ +#ifdef PNG_FREE_ME_SUPPORTED +if ((mask & PNG_FREE_HIST) & info_ptr->free_me) +#else +if ((mask & PNG_FREE_HIST) && (png_ptr->flags & PNG_FLAG_FREE_HIST)) +#endif +{ + png_free(png_ptr, info_ptr->hist); + info_ptr->hist = NULL; + info_ptr->valid &= ~PNG_INFO_hIST; +#ifndef PNG_FREE_ME_SUPPORTED + png_ptr->flags &= ~PNG_FLAG_FREE_HIST; +#endif +} +#endif + +/* free any PLTE entry that was internally allocated */ +#ifdef PNG_FREE_ME_SUPPORTED +if ((mask & PNG_FREE_PLTE) & info_ptr->free_me) +#else +if ((mask & PNG_FREE_PLTE) && (png_ptr->flags & PNG_FLAG_FREE_PLTE)) +#endif +{ + png_zfree(png_ptr, info_ptr->palette); + info_ptr->palette = NULL; + info_ptr->valid &= ~PNG_INFO_PLTE; +#ifndef PNG_FREE_ME_SUPPORTED + png_ptr->flags &= ~PNG_FLAG_FREE_PLTE; +#endif + info_ptr->num_palette = 0; +} + +#if defined(PNG_INFO_IMAGE_SUPPORTED) +/* free any image bits attached to the info structure */ +#ifdef PNG_FREE_ME_SUPPORTED +if ((mask & PNG_FREE_ROWS) & info_ptr->free_me) +#else +if (mask & PNG_FREE_ROWS) +#endif +{ + if(info_ptr->row_pointers) + { + int row; + for (row = 0; row < (int)info_ptr->height; row++) + { + png_free(png_ptr, info_ptr->row_pointers[row]); + info_ptr->row_pointers[row]=NULL; + } + png_free(png_ptr, info_ptr->row_pointers); + info_ptr->row_pointers=NULL; + } + info_ptr->valid &= ~PNG_INFO_IDAT; +} +#endif + +#ifdef PNG_FREE_ME_SUPPORTED + if(num == -1) + info_ptr->free_me &= ~mask; + else + info_ptr->free_me &= ~(mask & ~PNG_FREE_MUL); +#endif +} + +/* This is an internal routine to free any memory that the info struct is + * pointing to before re-using it or freeing the struct itself. Recall + * that png_free() checks for NULL pointers for us. + */ +void /* PRIVATE */ +png_info_destroy(png_structp png_ptr, png_infop info_ptr) +{ + png_debug(1, "in png_info_destroy\n"); + + png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1); + +#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) + if (png_ptr->num_chunk_list) + { + png_free(png_ptr, png_ptr->chunk_list); + png_ptr->chunk_list=NULL; + png_ptr->num_chunk_list=0; + } +#endif + + png_info_init_3(&info_ptr, sizeof(png_info)); +} + +/* This function returns a pointer to the io_ptr associated with the user + * functions. The application should free any memory associated with this + * pointer before png_write_destroy() or png_read_destroy() are called. + */ +png_voidp PNGAPI +png_get_io_ptr(png_structp png_ptr) +{ + return (png_ptr->io_ptr); +} + +#if !defined(PNG_NO_STDIO) +/* Initialize the default input/output functions for the PNG file. If you + * use your own read or write routines, you can call either png_set_read_fn() + * or png_set_write_fn() instead of png_init_io(). If you have defined + * PNG_NO_STDIO, you must use a function of your own because "FILE *" isn't + * necessarily available. + */ +void PNGAPI +png_init_io(png_structp png_ptr, png_FILE_p fp) +{ + png_debug(1, "in png_init_io\n"); + png_ptr->io_ptr = (png_voidp)fp; +} +#endif + +#if defined(PNG_TIME_RFC1123_SUPPORTED) +/* Convert the supplied time into an RFC 1123 string suitable for use in + * a "Creation Time" or other text-based time string. + */ +png_charp PNGAPI +png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime) +{ + static PNG_CONST char short_months[12][4] = + {"Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; + + if (png_ptr->time_buffer == NULL) + { + png_ptr->time_buffer = (png_charp)png_malloc(png_ptr, (png_uint_32)(29* + sizeof(char))); + } + +#if defined(_WIN32_WCE) + { + wchar_t time_buf[29]; + wsprintf(time_buf, TEXT("%d %S %d %02d:%02d:%02d +0000"), + ptime->day % 32, short_months[(ptime->month - 1) % 12], + ptime->year, ptime->hour % 24, ptime->minute % 60, + ptime->second % 61); + WideCharToMultiByte(CP_ACP, 0, time_buf, -1, png_ptr->time_buffer, 29, + NULL, NULL); + } +#else +#ifdef USE_FAR_KEYWORD + { + char near_time_buf[29]; + sprintf(near_time_buf, "%d %s %d %02d:%02d:%02d +0000", + ptime->day % 32, short_months[(ptime->month - 1) % 12], + ptime->year, ptime->hour % 24, ptime->minute % 60, + ptime->second % 61); + png_memcpy(png_ptr->time_buffer, near_time_buf, + 29*sizeof(char)); + } +#else + sprintf(png_ptr->time_buffer, "%d %s %d %02d:%02d:%02d +0000", + ptime->day % 32, short_months[(ptime->month - 1) % 12], + ptime->year, ptime->hour % 24, ptime->minute % 60, + ptime->second % 61); +#endif +#endif /* _WIN32_WCE */ + return ((png_charp)png_ptr->time_buffer); +} +#endif /* PNG_TIME_RFC1123_SUPPORTED */ + +#if 0 +/* Signature string for a PNG file. */ +png_bytep PNGAPI +png_sig_bytes(void) +{ + return ((png_bytep)"\211\120\116\107\015\012\032\012"); +} +#endif + +png_charp PNGAPI +png_get_copyright(png_structp png_ptr) +{ + if (png_ptr != NULL || png_ptr == NULL) /* silence compiler warning */ + return ((png_charp) "\n libpng version 1.2.5 - October 3, 2002\n\ + Copyright (c) 1998-2002 Glenn Randers-Pehrson\n\ + Copyright (c) 1996-1997 Andreas Dilger\n\ + Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n"); + return ((png_charp) ""); +} + +/* The following return the library version as a short string in the + * format 1.0.0 through 99.99.99zz. To get the version of *.h files used + * with your application, print out PNG_LIBPNG_VER_STRING, which is defined + * in png.h. + */ + +png_charp PNGAPI +png_get_libpng_ver(png_structp png_ptr) +{ + /* Version of *.c files used when building libpng */ + if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */ + return((png_charp) "1.2.5"); + return((png_charp) "1.2.5"); +} + +png_charp PNGAPI +png_get_header_ver(png_structp png_ptr) +{ + /* Version of *.h files used when building libpng */ + if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */ + return((png_charp) PNG_LIBPNG_VER_STRING); + return((png_charp) PNG_LIBPNG_VER_STRING); +} + +png_charp PNGAPI +png_get_header_version(png_structp png_ptr) +{ + /* Returns longer string containing both version and date */ + if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */ + return((png_charp) PNG_HEADER_VERSION_STRING); + return((png_charp) PNG_HEADER_VERSION_STRING); +} + +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED +int PNGAPI +png_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name) +{ + /* check chunk_name and return "keep" value if it's on the list, else 0 */ + int i; + png_bytep p; + if((png_ptr == NULL && chunk_name == NULL) || png_ptr->num_chunk_list<=0) + return 0; + p=png_ptr->chunk_list+png_ptr->num_chunk_list*5-5; + for (i = png_ptr->num_chunk_list; i; i--, p-=5) + if (!png_memcmp(chunk_name, p, 4)) + return ((int)*(p+4)); + return 0; +} +#endif + +/* This function, added to libpng-1.0.6g, is untested. */ +int PNGAPI +png_reset_zstream(png_structp png_ptr) +{ + return (inflateReset(&png_ptr->zstream)); +} + +/* This function was added to libpng-1.0.7 */ +png_uint_32 PNGAPI +png_access_version_number(void) +{ + /* Version of *.c files used when building libpng */ + return((png_uint_32) 10205L); +} + + +#if !defined(PNG_1_0_X) +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) + /* GRR: could add this: && defined(PNG_MMX_CODE_SUPPORTED) */ +/* this INTERNAL function was added to libpng 1.2.0 */ +void /* PRIVATE */ +png_init_mmx_flags (png_structp png_ptr) +{ + png_ptr->mmx_rowbytes_threshold = 0; + png_ptr->mmx_bitdepth_threshold = 0; + +# if (defined(PNG_USE_PNGVCRD) || defined(PNG_USE_PNGGCCRD)) + + png_ptr->asm_flags |= PNG_ASM_FLAG_MMX_SUPPORT_COMPILED; + + if (png_mmx_support() > 0) { + png_ptr->asm_flags |= PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU +# ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW + | PNG_ASM_FLAG_MMX_READ_COMBINE_ROW +# endif +# ifdef PNG_HAVE_ASSEMBLER_READ_INTERLACE + | PNG_ASM_FLAG_MMX_READ_INTERLACE +# endif +# ifndef PNG_HAVE_ASSEMBLER_READ_FILTER_ROW + ; +# else + | PNG_ASM_FLAG_MMX_READ_FILTER_SUB + | PNG_ASM_FLAG_MMX_READ_FILTER_UP + | PNG_ASM_FLAG_MMX_READ_FILTER_AVG + | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ; + + png_ptr->mmx_rowbytes_threshold = PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT; + png_ptr->mmx_bitdepth_threshold = PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT; +# endif + } else { + png_ptr->asm_flags &= ~( PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU + | PNG_MMX_READ_FLAGS + | PNG_MMX_WRITE_FLAGS ); + } + +# else /* !((PNGVCRD || PNGGCCRD) && PNG_ASSEMBLER_CODE_SUPPORTED)) */ + + /* clear all MMX flags; no support is compiled in */ + png_ptr->asm_flags &= ~( PNG_MMX_FLAGS ); + +# endif /* ?(PNGVCRD || PNGGCCRD) */ +} + +#endif /* !(PNG_ASSEMBLER_CODE_SUPPORTED) */ + +/* this function was added to libpng 1.2.0 */ +#if !defined(PNG_USE_PNGGCCRD) && \ + !(defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_USE_PNGVCRD)) +int PNGAPI +png_mmx_support(void) +{ + return -1; +} +#endif +#endif /* PNG_1_0_X */ diff --git a/gtkmm-osx/libpng-1.2.5/png.h b/gtkmm-osx/libpng-1.2.5/png.h new file mode 100644 index 0000000..f059910 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/png.h @@ -0,0 +1,3283 @@ +/* png.h - header file for PNG reference library + * + * libpng version 1.2.5 - October 3, 2002 + * Copyright (c) 1998-2002 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * Authors and maintainers: + * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat + * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger + * libpng versions 0.97, January 1998, through 1.2.5 - October 3, 2002: Glenn + * See also "Contributing Authors", below. + * + * Note about libpng version numbers: + * + * Due to various miscommunications, unforeseen code incompatibilities + * and occasional factors outside the authors' control, version numbering + * on the library has not always been consistent and straightforward. + * The following table summarizes matters since version 0.89c, which was + * the first widely used release: + * + * source png.h png.h shared-lib + * version string int version + * ------- ------ ----- ---------- + * 0.89c "1.0 beta 3" 0.89 89 1.0.89 + * 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90] + * 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95] + * 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96] + * 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97] + * 0.97c 0.97 97 2.0.97 + * 0.98 0.98 98 2.0.98 + * 0.99 0.99 98 2.0.99 + * 0.99a-m 0.99 99 2.0.99 + * 1.00 1.00 100 2.1.0 [100 should be 10000] + * 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000] + * 1.0.1 png.h string is 10001 2.1.0 + * 1.0.1a-e identical to the 10002 from here on, the shared library + * 1.0.2 source version) 10002 is 2.V where V is the source code + * 1.0.2a-b 10003 version, except as noted. + * 1.0.3 10003 + * 1.0.3a-d 10004 + * 1.0.4 10004 + * 1.0.4a-f 10005 + * 1.0.5 (+ 2 patches) 10005 + * 1.0.5a-d 10006 + * 1.0.5e-r 10100 (not source compatible) + * 1.0.5s-v 10006 (not binary compatible) + * 1.0.6 (+ 3 patches) 10006 (still binary incompatible) + * 1.0.6d-f 10007 (still binary incompatible) + * 1.0.6g 10007 + * 1.0.6h 10007 10.6h (testing xy.z so-numbering) + * 1.0.6i 10007 10.6i + * 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0) + * 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible) + * 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible) + * 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible) + * 1.0.7 1 10007 (still compatible) + * 1.0.8beta1-4 1 10008 2.1.0.8beta1-4 + * 1.0.8rc1 1 10008 2.1.0.8rc1 + * 1.0.8 1 10008 2.1.0.8 + * 1.0.9beta1-6 1 10009 2.1.0.9beta1-6 + * 1.0.9rc1 1 10009 2.1.0.9rc1 + * 1.0.9beta7-10 1 10009 2.1.0.9beta7-10 + * 1.0.9rc2 1 10009 2.1.0.9rc2 + * 1.0.9 1 10009 2.1.0.9 + * 1.0.10beta1 1 10010 2.1.0.10beta1 + * 1.0.10rc1 1 10010 2.1.0.10rc1 + * 1.0.10 1 10010 2.1.0.10 + * 1.0.11beta1-3 1 10011 2.1.0.11beta1-3 + * 1.0.11rc1 1 10011 2.1.0.11rc1 + * 1.0.11 1 10011 2.1.0.11 + * 1.0.12beta1-2 2 10012 2.1.0.12beta1-2 + * 1.0.12rc1 2 10012 2.1.0.12rc1 + * 1.0.12 2 10012 2.1.0.12 + * 1.1.0a-f - 10100 2.1.1.0a-f (branch abandoned) + * 1.2.0beta1-2 2 10200 2.1.2.0beta1-2 + * 1.2.0beta3-5 3 10200 3.1.2.0beta3-5 + * 1.2.0rc1 3 10200 3.1.2.0rc1 + * 1.2.0 3 10200 3.1.2.0 + * 1.2.1beta1-4 3 10201 3.1.2.1beta1-4 + * 1.2.1rc1-2 3 10201 3.1.2.1rc1-2 + * 1.2.1 3 10201 3.1.2.1 + * 1.2.2beta1-6 12 10202 12.so.0.1.2.2beta1-6 + * 1.0.13beta1 10 10013 10.so.0.1.0.13beta1 + * 1.0.13rc1 10 10013 10.so.0.1.0.13rc1 + * 1.2.2rc1 12 10202 12.so.0.1.2.2rc1 + * 1.0.13 10 10013 10.so.0.1.0.13 + * 1.2.2 12 10202 12.so.0.1.2.2 + * 1.2.3rc1-6 12 10203 12.so.0.1.2.3rc1-6 + * 1.2.3 12 10203 12.so.0.1.2.3 + * 1.2.4beta1-3 13 10204 12.so.0.1.2.4beta1-3 + * 1.0.14rc1 13 10014 10.so.0.1.0.14rc1 + * 1.2.4rc1 13 10204 12.so.0.1.2.4rc1 + * 1.0.14 10 10014 10.so.0.1.0.14 + * 1.2.4 13 10204 12.so.0.1.2.4 + * 1.2.5beta1-2 13 10205 12.so.0.1.2.5beta1-2 + * 1.0.15rc1-3 10 10015 10.so.0.1.0.15rc1-3 + * 1.2.5rc1-3 13 10205 12.so.0.1.2.5rc1-3 + * 1.0.15 10 10015 10.so.0.1.0.15 + * 1.2.5 13 10205 12.so.0.1.2.5 + * + * Henceforth the source version will match the shared-library major + * and minor numbers; the shared-library major version number will be + * used for changes in backward compatibility, as it is intended. The + * PNG_LIBPNG_VER macro, which is not used within libpng but is available + * for applications, is an unsigned integer of the form xyyzz corresponding + * to the source version x.y.z (leading zeros in y and z). Beta versions + * were given the previous public release number plus a letter, until + * version 1.0.6j; from then on they were given the upcoming public + * release number plus "betaNN" or "rcN". + * + * Binary incompatibility exists only when applications make direct access + * to the info_ptr or png_ptr members through png.h, and the compiled + * application is loaded with a different version of the library. + * + * DLLNUM will change each time there are forward or backward changes + * in binary compatibility (e.g., when a new feature is added). + * + * See libpng.txt or libpng.3 for more information. The PNG specification + * is available as RFC 2083 + * and as a W3C Recommendation + */ + +/* + * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: + * + * If you modify libpng you may insert additional notices immediately following + * this sentence. + * + * libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are + * Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are + * distributed according to the same disclaimer and license as libpng-1.0.6 + * with the following individuals added to the list of Contributing Authors + * + * Simon-Pierre Cadieux + * Eric S. Raymond + * Gilles Vollant + * + * and with the following additions to the disclaimer: + * + * There is no warranty against interference with your enjoyment of the + * library or against infringement. There is no warranty that our + * efforts or the library will fulfill any of your particular purposes + * or needs. This library is provided with all faults, and the entire + * risk of satisfactory quality, performance, accuracy, and effort is with + * the user. + * + * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are + * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson + * Distributed according to the same disclaimer and license as libpng-0.96, + * with the following individuals added to the list of Contributing Authors: + * + * Tom Lane + * Glenn Randers-Pehrson + * Willem van Schaik + * + * libpng versions 0.89, June 1996, through 0.96, May 1997, are + * Copyright (c) 1996, 1997 Andreas Dilger + * Distributed according to the same disclaimer and license as libpng-0.88, + * with the following individuals added to the list of Contributing Authors: + * + * John Bowler + * Kevin Bracey + * Sam Bushell + * Magnus Holmgren + * Greg Roelofs + * Tom Tanner + * + * libpng versions 0.5, May 1995, through 0.88, January 1996, are + * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. + * + * For the purposes of this copyright and license, "Contributing Authors" + * is defined as the following set of individuals: + * + * Andreas Dilger + * Dave Martindale + * Guy Eric Schalnat + * Paul Schmidt + * Tim Wegner + * + * The PNG Reference Library is supplied "AS IS". The Contributing Authors + * and Group 42, Inc. disclaim all warranties, expressed or implied, + * including, without limitation, the warranties of merchantability and of + * fitness for any purpose. The Contributing Authors and Group 42, Inc. + * assume no liability for direct, indirect, incidental, special, exemplary, + * or consequential damages, which may result from the use of the PNG + * Reference Library, even if advised of the possibility of such damage. + * + * Permission is hereby granted to use, copy, modify, and distribute this + * source code, or portions hereof, for any purpose, without fee, subject + * to the following restrictions: + * + * 1. The origin of this source code must not be misrepresented. + * + * 2. Altered versions must be plainly marked as such and + * must not be misrepresented as being the original source. + * + * 3. This Copyright notice may not be removed or altered from + * any source or altered source distribution. + * + * The Contributing Authors and Group 42, Inc. specifically permit, without + * fee, and encourage the use of this source code as a component to + * supporting the PNG file format in commercial products. If you use this + * source code in a product, acknowledgment is not required but would be + * appreciated. + */ + +/* + * A "png_get_copyright" function is available, for convenient use in "about" + * boxes and the like: + * + * printf("%s",png_get_copyright(NULL)); + * + * Also, the PNG logo (in PNG format, of course) is supplied in the + * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). + */ + +/* + * Libpng is OSI Certified Open Source Software. OSI Certified is a + * certification mark of the Open Source Initiative. + */ + +/* + * The contributing authors would like to thank all those who helped + * with testing, bug fixes, and patience. This wouldn't have been + * possible without all of you. + * + * Thanks to Frank J. T. Wojcik for helping with the documentation. + */ + +/* + * Y2K compliance in libpng: + * ========================= + * + * October 3, 2002 + * + * Since the PNG Development group is an ad-hoc body, we can't make + * an official declaration. + * + * This is your unofficial assurance that libpng from version 0.71 and + * upward through 1.2.5 are Y2K compliant. It is my belief that earlier + * versions were also Y2K compliant. + * + * Libpng only has three year fields. One is a 2-byte unsigned integer + * that will hold years up to 65535. The other two hold the date in text + * format, and will hold years up to 9999. + * + * The integer is + * "png_uint_16 year" in png_time_struct. + * + * The strings are + * "png_charp time_buffer" in png_struct and + * "near_time_buffer", which is a local character string in png.c. + * + * There are seven time-related functions: + * png.c: png_convert_to_rfc_1123() in png.c + * (formerly png_convert_to_rfc_1152() in error) + * png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c + * png_convert_from_time_t() in pngwrite.c + * png_get_tIME() in pngget.c + * png_handle_tIME() in pngrutil.c, called in pngread.c + * png_set_tIME() in pngset.c + * png_write_tIME() in pngwutil.c, called in pngwrite.c + * + * All handle dates properly in a Y2K environment. The + * png_convert_from_time_t() function calls gmtime() to convert from system + * clock time, which returns (year - 1900), which we properly convert to + * the full 4-digit year. There is a possibility that applications using + * libpng are not passing 4-digit years into the png_convert_to_rfc_1123() + * function, or that they are incorrectly passing only a 2-digit year + * instead of "year - 1900" into the png_convert_from_struct_tm() function, + * but this is not under our control. The libpng documentation has always + * stated that it works with 4-digit years, and the APIs have been + * documented as such. + * + * The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned + * integer to hold the year, and can hold years as large as 65535. + * + * zlib, upon which libpng depends, is also Y2K compliant. It contains + * no date-related code. + * + * Glenn Randers-Pehrson + * libpng maintainer + * PNG Development Group + */ + +#ifndef PNG_H +#define PNG_H + +/* This is not the place to learn how to use libpng. The file libpng.txt + * describes how to use libpng, and the file example.c summarizes it + * with some code on which to build. This file is useful for looking + * at the actual function definitions and structure components. + */ + +/* Version information for png.h - this should match the version in png.c */ +#define PNG_LIBPNG_VER_STRING "1.2.5" + +#define PNG_LIBPNG_VER_SONUM 0 +#define PNG_LIBPNG_VER_DLLNUM %DLLNUM% + +/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ +#define PNG_LIBPNG_VER_MAJOR 1 +#define PNG_LIBPNG_VER_MINOR 2 +#define PNG_LIBPNG_VER_RELEASE 5 +/* This should match the numeric part of the final component of + * PNG_LIBPNG_VER_STRING, omitting any leading zero: */ + +#define PNG_LIBPNG_VER_BUILD 0 + +#define PNG_LIBPNG_BUILD_ALPHA 1 +#define PNG_LIBPNG_BUILD_BETA 2 +#define PNG_LIBPNG_BUILD_RC 3 +#define PNG_LIBPNG_BUILD_STABLE 4 +#define PNG_LIBPNG_BUILD_TYPEMASK 7 +#define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with STABLE only */ +#define PNG_LIBPNG_BUILD_TYPE 4 + +/* Careful here. At one time, Guy wanted to use 082, but that would be octal. + * We must not include leading zeros. + * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only + * version 1.0.0 was mis-numbered 100 instead of 10000). From + * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */ +#define PNG_LIBPNG_VER 10205 /* 1.2.5 */ + +#ifndef PNG_VERSION_INFO_ONLY + +/* include the compression library's header */ +#include "zlib.h" + +/* include all user configurable info, including optional assembler routines */ +#include "pngconf.h" + +/* Inhibit C++ name-mangling for libpng functions but not for system calls. */ +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* This file is arranged in several sections. The first section contains + * structure and type definitions. The second section contains the external + * library functions, while the third has the internal library functions, + * which applications aren't expected to use directly. + */ + +#ifndef PNG_NO_TYPECAST_NULL +#define int_p_NULL (int *)NULL +#define png_bytep_NULL (png_bytep)NULL +#define png_bytepp_NULL (png_bytepp)NULL +#define png_doublep_NULL (png_doublep)NULL +#define png_error_ptr_NULL (png_error_ptr)NULL +#define png_flush_ptr_NULL (png_flush_ptr)NULL +#define png_free_ptr_NULL (png_free_ptr)NULL +#define png_infopp_NULL (png_infopp)NULL +#define png_malloc_ptr_NULL (png_malloc_ptr)NULL +#define png_read_status_ptr_NULL (png_read_status_ptr)NULL +#define png_rw_ptr_NULL (png_rw_ptr)NULL +#define png_structp_NULL (png_structp)NULL +#define png_uint_16p_NULL (png_uint_16p)NULL +#define png_voidp_NULL (png_voidp)NULL +#define png_write_status_ptr_NULL (png_write_status_ptr)NULL +#else +#define int_p_NULL NULL +#define png_bytep_NULL NULL +#define png_bytepp_NULL NULL +#define png_doublep_NULL NULL +#define png_error_ptr_NULL NULL +#define png_flush_ptr_NULL NULL +#define png_free_ptr_NULL NULL +#define png_infopp_NULL NULL +#define png_malloc_ptr_NULL NULL +#define png_read_status_ptr_NULL NULL +#define png_rw_ptr_NULL NULL +#define png_structp_NULL NULL +#define png_uint_16p_NULL NULL +#define png_voidp_NULL NULL +#define png_write_status_ptr_NULL NULL +#endif + +/* variables declared in png.c - only it needs to define PNG_NO_EXTERN */ +#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN) +/* Version information for C files, stored in png.c. This had better match + * the version above. + */ +#ifdef PNG_USE_GLOBAL_ARRAYS +PNG_EXPORT_VAR (const char) png_libpng_ver[18]; + /* need room for 99.99.99beta99z */ +#else +#define png_libpng_ver png_get_header_ver(NULL) +#endif + +#ifdef PNG_USE_GLOBAL_ARRAYS +/* This was removed in version 1.0.5c */ +/* Structures to facilitate easy interlacing. See png.c for more details */ +PNG_EXPORT_VAR (const int FARDATA) png_pass_start[7]; +PNG_EXPORT_VAR (const int FARDATA) png_pass_inc[7]; +PNG_EXPORT_VAR (const int FARDATA) png_pass_ystart[7]; +PNG_EXPORT_VAR (const int FARDATA) png_pass_yinc[7]; +PNG_EXPORT_VAR (const int FARDATA) png_pass_mask[7]; +PNG_EXPORT_VAR (const int FARDATA) png_pass_dsp_mask[7]; +#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW +PNG_EXPORT_VAR (const int FARDATA) png_pass_width[7]; +#endif +/* This isn't currently used. If you need it, see png.c for more details. +PNG_EXPORT_VAR (const int FARDATA) png_pass_height[7]; +*/ +#endif + +#endif /* PNG_NO_EXTERN */ + +/* Three color definitions. The order of the red, green, and blue, (and the + * exact size) is not important, although the size of the fields need to + * be png_byte or png_uint_16 (as defined below). + */ +typedef struct png_color_struct +{ + png_byte red; + png_byte green; + png_byte blue; +} png_color; +typedef png_color FAR * png_colorp; +typedef png_color FAR * FAR * png_colorpp; + +typedef struct png_color_16_struct +{ + png_byte index; /* used for palette files */ + png_uint_16 red; /* for use in red green blue files */ + png_uint_16 green; + png_uint_16 blue; + png_uint_16 gray; /* for use in grayscale files */ +} png_color_16; +typedef png_color_16 FAR * png_color_16p; +typedef png_color_16 FAR * FAR * png_color_16pp; + +typedef struct png_color_8_struct +{ + png_byte red; /* for use in red green blue files */ + png_byte green; + png_byte blue; + png_byte gray; /* for use in grayscale files */ + png_byte alpha; /* for alpha channel files */ +} png_color_8; +typedef png_color_8 FAR * png_color_8p; +typedef png_color_8 FAR * FAR * png_color_8pp; + +/* + * The following two structures are used for the in-core representation + * of sPLT chunks. + */ +typedef struct png_sPLT_entry_struct +{ + png_uint_16 red; + png_uint_16 green; + png_uint_16 blue; + png_uint_16 alpha; + png_uint_16 frequency; +} png_sPLT_entry; +typedef png_sPLT_entry FAR * png_sPLT_entryp; +typedef png_sPLT_entry FAR * FAR * png_sPLT_entrypp; + +/* When the depth of the sPLT palette is 8 bits, the color and alpha samples + * occupy the LSB of their respective members, and the MSB of each member + * is zero-filled. The frequency member always occupies the full 16 bits. + */ + +typedef struct png_sPLT_struct +{ + png_charp name; /* palette name */ + png_byte depth; /* depth of palette samples */ + png_sPLT_entryp entries; /* palette entries */ + png_int_32 nentries; /* number of palette entries */ +} png_sPLT_t; +typedef png_sPLT_t FAR * png_sPLT_tp; +typedef png_sPLT_t FAR * FAR * png_sPLT_tpp; + +#ifdef PNG_TEXT_SUPPORTED +/* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file, + * and whether that contents is compressed or not. The "key" field + * points to a regular zero-terminated C string. The "text", "lang", and + * "lang_key" fields can be regular C strings, empty strings, or NULL pointers. + * However, the * structure returned by png_get_text() will always contain + * regular zero-terminated C strings (possibly empty), never NULL pointers, + * so they can be safely used in printf() and other string-handling functions. + */ +typedef struct png_text_struct +{ + int compression; /* compression value: + -1: tEXt, none + 0: zTXt, deflate + 1: iTXt, none + 2: iTXt, deflate */ + png_charp key; /* keyword, 1-79 character description of "text" */ + png_charp text; /* comment, may be an empty string (ie "") + or a NULL pointer */ + png_size_t text_length; /* length of the text string */ +#ifdef PNG_iTXt_SUPPORTED + png_size_t itxt_length; /* length of the itxt string */ + png_charp lang; /* language code, 0-79 characters + or a NULL pointer */ + png_charp lang_key; /* keyword translated UTF-8 string, 0 or more + chars or a NULL pointer */ +#endif +} png_text; +typedef png_text FAR * png_textp; +typedef png_text FAR * FAR * png_textpp; +#endif + +/* Supported compression types for text in PNG files (tEXt, and zTXt). + * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. */ +#define PNG_TEXT_COMPRESSION_NONE_WR -3 +#define PNG_TEXT_COMPRESSION_zTXt_WR -2 +#define PNG_TEXT_COMPRESSION_NONE -1 +#define PNG_TEXT_COMPRESSION_zTXt 0 +#define PNG_ITXT_COMPRESSION_NONE 1 +#define PNG_ITXT_COMPRESSION_zTXt 2 +#define PNG_TEXT_COMPRESSION_LAST 3 /* Not a valid value */ + +/* png_time is a way to hold the time in an machine independent way. + * Two conversions are provided, both from time_t and struct tm. There + * is no portable way to convert to either of these structures, as far + * as I know. If you know of a portable way, send it to me. As a side + * note - PNG has always been Year 2000 compliant! + */ +typedef struct png_time_struct +{ + png_uint_16 year; /* full year, as in, 1995 */ + png_byte month; /* month of year, 1 - 12 */ + png_byte day; /* day of month, 1 - 31 */ + png_byte hour; /* hour of day, 0 - 23 */ + png_byte minute; /* minute of hour, 0 - 59 */ + png_byte second; /* second of minute, 0 - 60 (for leap seconds) */ +} png_time; +typedef png_time FAR * png_timep; +typedef png_time FAR * FAR * png_timepp; + +#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) +/* png_unknown_chunk is a structure to hold queued chunks for which there is + * no specific support. The idea is that we can use this to queue + * up private chunks for output even though the library doesn't actually + * know about their semantics. + */ +typedef struct png_unknown_chunk_t +{ + png_byte name[5]; + png_byte *data; + png_size_t size; + + /* libpng-using applications should NOT directly modify this byte. */ + png_byte location; /* mode of operation at read time */ +} +png_unknown_chunk; +typedef png_unknown_chunk FAR * png_unknown_chunkp; +typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp; +#endif + +/* png_info is a structure that holds the information in a PNG file so + * that the application can find out the characteristics of the image. + * If you are reading the file, this structure will tell you what is + * in the PNG file. If you are writing the file, fill in the information + * you want to put into the PNG file, then call png_write_info(). + * The names chosen should be very close to the PNG specification, so + * consult that document for information about the meaning of each field. + * + * With libpng < 0.95, it was only possible to directly set and read the + * the values in the png_info_struct, which meant that the contents and + * order of the values had to remain fixed. With libpng 0.95 and later, + * however, there are now functions that abstract the contents of + * png_info_struct from the application, so this makes it easier to use + * libpng with dynamic libraries, and even makes it possible to use + * libraries that don't have all of the libpng ancillary chunk-handing + * functionality. + * + * In any case, the order of the parameters in png_info_struct should NOT + * be changed for as long as possible to keep compatibility with applications + * that use the old direct-access method with png_info_struct. + * + * The following members may have allocated storage attached that should be + * cleaned up before the structure is discarded: palette, trans, text, + * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile, + * splt_palettes, scal_unit, row_pointers, and unknowns. By default, these + * are automatically freed when the info structure is deallocated, if they were + * allocated internally by libpng. This behavior can be changed by means + * of the png_data_freer() function. + * + * More allocation details: all the chunk-reading functions that + * change these members go through the corresponding png_set_* + * functions. A function to clear these members is available: see + * png_free_data(). The png_set_* functions do not depend on being + * able to point info structure members to any of the storage they are + * passed (they make their own copies), EXCEPT that the png_set_text + * functions use the same storage passed to them in the text_ptr or + * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns + * functions do not make their own copies. + */ +typedef struct png_info_struct +{ + /* the following are necessary for every PNG file */ + png_uint_32 width; /* width of image in pixels (from IHDR) */ + png_uint_32 height; /* height of image in pixels (from IHDR) */ + png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */ + png_uint_32 rowbytes; /* bytes needed to hold an untransformed row */ + png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */ + png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */ + png_uint_16 num_trans; /* number of transparent palette color (tRNS) */ + png_byte bit_depth; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */ + png_byte color_type; /* see PNG_COLOR_TYPE_ below (from IHDR) */ + /* The following three should have been named *_method not *_type */ + png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */ + png_byte filter_type; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */ + png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ + + /* The following is informational only on read, and not used on writes. */ + png_byte channels; /* number of data channels per pixel (1, 2, 3, 4) */ + png_byte pixel_depth; /* number of bits per pixel */ + png_byte spare_byte; /* to align the data, and for future use */ + png_byte signature[8]; /* magic bytes read by libpng from start of file */ + + /* The rest of the data is optional. If you are reading, check the + * valid field to see if the information in these are valid. If you + * are writing, set the valid field to those chunks you want written, + * and initialize the appropriate fields below. + */ + +#if defined(PNG_gAMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED) + /* The gAMA chunk describes the gamma characteristics of the system + * on which the image was created, normally in the range [1.0, 2.5]. + * Data is valid if (valid & PNG_INFO_gAMA) is non-zero. + */ + float gamma; /* gamma value of image, if (valid & PNG_INFO_gAMA) */ +#endif + +#if defined(PNG_sRGB_SUPPORTED) + /* GR-P, 0.96a */ + /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */ + png_byte srgb_intent; /* sRGB rendering intent [0, 1, 2, or 3] */ +#endif + +#if defined(PNG_TEXT_SUPPORTED) + /* The tEXt, and zTXt chunks contain human-readable textual data in + * uncompressed, compressed, and optionally compressed forms, respectively. + * The data in "text" is an array of pointers to uncompressed, + * null-terminated C strings. Each chunk has a keyword that describes the + * textual data contained in that chunk. Keywords are not required to be + * unique, and the text string may be empty. Any number of text chunks may + * be in an image. + */ + int num_text; /* number of comments read/to write */ + int max_text; /* current size of text array */ + png_textp text; /* array of comments read/to write */ +#endif /* PNG_TEXT_SUPPORTED */ + +#if defined(PNG_tIME_SUPPORTED) + /* The tIME chunk holds the last time the displayed image data was + * modified. See the png_time struct for the contents of this struct. + */ + png_time mod_time; +#endif + +#if defined(PNG_sBIT_SUPPORTED) + /* The sBIT chunk specifies the number of significant high-order bits + * in the pixel data. Values are in the range [1, bit_depth], and are + * only specified for the channels in the pixel data. The contents of + * the low-order bits is not specified. Data is valid if + * (valid & PNG_INFO_sBIT) is non-zero. + */ + png_color_8 sig_bit; /* significant bits in color channels */ +#endif + +#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \ +defined(PNG_READ_BACKGROUND_SUPPORTED) + /* The tRNS chunk supplies transparency data for paletted images and + * other image types that don't need a full alpha channel. There are + * "num_trans" transparency values for a paletted image, stored in the + * same order as the palette colors, starting from index 0. Values + * for the data are in the range [0, 255], ranging from fully transparent + * to fully opaque, respectively. For non-paletted images, there is a + * single color specified that should be treated as fully transparent. + * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. + */ + png_bytep trans; /* transparent values for paletted image */ + png_color_16 trans_values; /* transparent color for non-palette image */ +#endif + +#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + /* The bKGD chunk gives the suggested image background color if the + * display program does not have its own background color and the image + * is needs to composited onto a background before display. The colors + * in "background" are normally in the same color space/depth as the + * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero. + */ + png_color_16 background; +#endif + +#if defined(PNG_oFFs_SUPPORTED) + /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards + * and downwards from the top-left corner of the display, page, or other + * application-specific co-ordinate space. See the PNG_OFFSET_ defines + * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero. + */ + png_int_32 x_offset; /* x offset on page */ + png_int_32 y_offset; /* y offset on page */ + png_byte offset_unit_type; /* offset units type */ +#endif + +#if defined(PNG_pHYs_SUPPORTED) + /* The pHYs chunk gives the physical pixel density of the image for + * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_ + * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. + */ + png_uint_32 x_pixels_per_unit; /* horizontal pixel density */ + png_uint_32 y_pixels_per_unit; /* vertical pixel density */ + png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */ +#endif + +#if defined(PNG_hIST_SUPPORTED) + /* The hIST chunk contains the relative frequency or importance of the + * various palette entries, so that a viewer can intelligently select a + * reduced-color palette, if required. Data is an array of "num_palette" + * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST) + * is non-zero. + */ + png_uint_16p hist; +#endif + +#ifdef PNG_cHRM_SUPPORTED + /* The cHRM chunk describes the CIE color characteristics of the monitor + * on which the PNG was created. This data allows the viewer to do gamut + * mapping of the input image to ensure that the viewer sees the same + * colors in the image as the creator. Values are in the range + * [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero. + */ +#ifdef PNG_FLOATING_POINT_SUPPORTED + float x_white; + float y_white; + float x_red; + float y_red; + float x_green; + float y_green; + float x_blue; + float y_blue; +#endif +#endif + +#if defined(PNG_pCAL_SUPPORTED) + /* The pCAL chunk describes a transformation between the stored pixel + * values and original physical data values used to create the image. + * The integer range [0, 2^bit_depth - 1] maps to the floating-point + * range given by [pcal_X0, pcal_X1], and are further transformed by a + * (possibly non-linear) transformation function given by "pcal_type" + * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_ + * defines below, and the PNG-Group's PNG extensions document for a + * complete description of the transformations and how they should be + * implemented, and for a description of the ASCII parameter strings. + * Data values are valid if (valid & PNG_INFO_pCAL) non-zero. + */ + png_charp pcal_purpose; /* pCAL chunk description string */ + png_int_32 pcal_X0; /* minimum value */ + png_int_32 pcal_X1; /* maximum value */ + png_charp pcal_units; /* Latin-1 string giving physical units */ + png_charpp pcal_params; /* ASCII strings containing parameter values */ + png_byte pcal_type; /* equation type (see PNG_EQUATION_ below) */ + png_byte pcal_nparams; /* number of parameters given in pcal_params */ +#endif + +/* New members added in libpng-1.0.6 */ +#ifdef PNG_FREE_ME_SUPPORTED + png_uint_32 free_me; /* flags items libpng is responsible for freeing */ +#endif + +#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) + /* storage for unknown chunks that the library doesn't recognize. */ + png_unknown_chunkp unknown_chunks; + png_size_t unknown_chunks_num; +#endif + +#if defined(PNG_iCCP_SUPPORTED) + /* iCCP chunk data. */ + png_charp iccp_name; /* profile name */ + png_charp iccp_profile; /* International Color Consortium profile data */ + /* Note to maintainer: should be png_bytep */ + png_uint_32 iccp_proflen; /* ICC profile data length */ + png_byte iccp_compression; /* Always zero */ +#endif + +#if defined(PNG_sPLT_SUPPORTED) + /* data on sPLT chunks (there may be more than one). */ + png_sPLT_tp splt_palettes; + png_uint_32 splt_palettes_num; +#endif + +#if defined(PNG_sCAL_SUPPORTED) + /* The sCAL chunk describes the actual physical dimensions of the + * subject matter of the graphic. The chunk contains a unit specification + * a byte value, and two ASCII strings representing floating-point + * values. The values are width and height corresponsing to one pixel + * in the image. This external representation is converted to double + * here. Data values are valid if (valid & PNG_INFO_sCAL) is non-zero. + */ + png_byte scal_unit; /* unit of physical scale */ +#ifdef PNG_FLOATING_POINT_SUPPORTED + double scal_pixel_width; /* width of one pixel */ + double scal_pixel_height; /* height of one pixel */ +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED + png_charp scal_s_width; /* string containing height */ + png_charp scal_s_height; /* string containing width */ +#endif +#endif + +#if defined(PNG_INFO_IMAGE_SUPPORTED) + /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) non-zero */ + /* Data valid if (valid & PNG_INFO_IDAT) non-zero */ + png_bytepp row_pointers; /* the image bits */ +#endif + +#if defined(PNG_FIXED_POINT_SUPPORTED) && defined(PNG_gAMA_SUPPORTED) + png_fixed_point int_gamma; /* gamma of image, if (valid & PNG_INFO_gAMA) */ +#endif + +#if defined(PNG_cHRM_SUPPORTED) && defined(PNG_FIXED_POINT_SUPPORTED) + png_fixed_point int_x_white; + png_fixed_point int_y_white; + png_fixed_point int_x_red; + png_fixed_point int_y_red; + png_fixed_point int_x_green; + png_fixed_point int_y_green; + png_fixed_point int_x_blue; + png_fixed_point int_y_blue; +#endif + +} png_info; + +typedef png_info FAR * png_infop; +typedef png_info FAR * FAR * png_infopp; + +/* Maximum positive integer used in PNG is (2^31)-1 */ +#define PNG_MAX_UINT ((png_uint_32)0x7fffffffL) + +/* These describe the color_type field in png_info. */ +/* color type masks */ +#define PNG_COLOR_MASK_PALETTE 1 +#define PNG_COLOR_MASK_COLOR 2 +#define PNG_COLOR_MASK_ALPHA 4 + +/* color types. Note that not all combinations are legal */ +#define PNG_COLOR_TYPE_GRAY 0 +#define PNG_COLOR_TYPE_PALETTE (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_PALETTE) +#define PNG_COLOR_TYPE_RGB (PNG_COLOR_MASK_COLOR) +#define PNG_COLOR_TYPE_RGB_ALPHA (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA) +#define PNG_COLOR_TYPE_GRAY_ALPHA (PNG_COLOR_MASK_ALPHA) +/* aliases */ +#define PNG_COLOR_TYPE_RGBA PNG_COLOR_TYPE_RGB_ALPHA +#define PNG_COLOR_TYPE_GA PNG_COLOR_TYPE_GRAY_ALPHA + +/* This is for compression type. PNG 1.0-1.2 only define the single type. */ +#define PNG_COMPRESSION_TYPE_BASE 0 /* Deflate method 8, 32K window */ +#define PNG_COMPRESSION_TYPE_DEFAULT PNG_COMPRESSION_TYPE_BASE + +/* This is for filter type. PNG 1.0-1.2 only define the single type. */ +#define PNG_FILTER_TYPE_BASE 0 /* Single row per-byte filtering */ +#define PNG_INTRAPIXEL_DIFFERENCING 64 /* Used only in MNG datastreams */ +#define PNG_FILTER_TYPE_DEFAULT PNG_FILTER_TYPE_BASE + +/* These are for the interlacing type. These values should NOT be changed. */ +#define PNG_INTERLACE_NONE 0 /* Non-interlaced image */ +#define PNG_INTERLACE_ADAM7 1 /* Adam7 interlacing */ +#define PNG_INTERLACE_LAST 2 /* Not a valid value */ + +/* These are for the oFFs chunk. These values should NOT be changed. */ +#define PNG_OFFSET_PIXEL 0 /* Offset in pixels */ +#define PNG_OFFSET_MICROMETER 1 /* Offset in micrometers (1/10^6 meter) */ +#define PNG_OFFSET_LAST 2 /* Not a valid value */ + +/* These are for the pCAL chunk. These values should NOT be changed. */ +#define PNG_EQUATION_LINEAR 0 /* Linear transformation */ +#define PNG_EQUATION_BASE_E 1 /* Exponential base e transform */ +#define PNG_EQUATION_ARBITRARY 2 /* Arbitrary base exponential transform */ +#define PNG_EQUATION_HYPERBOLIC 3 /* Hyperbolic sine transformation */ +#define PNG_EQUATION_LAST 4 /* Not a valid value */ + +/* These are for the sCAL chunk. These values should NOT be changed. */ +#define PNG_SCALE_UNKNOWN 0 /* unknown unit (image scale) */ +#define PNG_SCALE_METER 1 /* meters per pixel */ +#define PNG_SCALE_RADIAN 2 /* radians per pixel */ +#define PNG_SCALE_LAST 3 /* Not a valid value */ + +/* These are for the pHYs chunk. These values should NOT be changed. */ +#define PNG_RESOLUTION_UNKNOWN 0 /* pixels/unknown unit (aspect ratio) */ +#define PNG_RESOLUTION_METER 1 /* pixels/meter */ +#define PNG_RESOLUTION_LAST 2 /* Not a valid value */ + +/* These are for the sRGB chunk. These values should NOT be changed. */ +#define PNG_sRGB_INTENT_PERCEPTUAL 0 +#define PNG_sRGB_INTENT_RELATIVE 1 +#define PNG_sRGB_INTENT_SATURATION 2 +#define PNG_sRGB_INTENT_ABSOLUTE 3 +#define PNG_sRGB_INTENT_LAST 4 /* Not a valid value */ + +/* This is for text chunks */ +#define PNG_KEYWORD_MAX_LENGTH 79 + +/* Maximum number of entries in PLTE/sPLT/tRNS arrays */ +#define PNG_MAX_PALETTE_LENGTH 256 + +/* These determine if an ancillary chunk's data has been successfully read + * from the PNG header, or if the application has filled in the corresponding + * data in the info_struct to be written into the output file. The values + * of the PNG_INFO_ defines should NOT be changed. + */ +#define PNG_INFO_gAMA 0x0001 +#define PNG_INFO_sBIT 0x0002 +#define PNG_INFO_cHRM 0x0004 +#define PNG_INFO_PLTE 0x0008 +#define PNG_INFO_tRNS 0x0010 +#define PNG_INFO_bKGD 0x0020 +#define PNG_INFO_hIST 0x0040 +#define PNG_INFO_pHYs 0x0080 +#define PNG_INFO_oFFs 0x0100 +#define PNG_INFO_tIME 0x0200 +#define PNG_INFO_pCAL 0x0400 +#define PNG_INFO_sRGB 0x0800 /* GR-P, 0.96a */ +#define PNG_INFO_iCCP 0x1000 /* ESR, 1.0.6 */ +#define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */ +#define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */ +#define PNG_INFO_IDAT 0x8000L /* ESR, 1.0.6 */ + +/* This is used for the transformation routines, as some of them + * change these values for the row. It also should enable using + * the routines for other purposes. + */ +typedef struct png_row_info_struct +{ + png_uint_32 width; /* width of row */ + png_uint_32 rowbytes; /* number of bytes in row */ + png_byte color_type; /* color type of row */ + png_byte bit_depth; /* bit depth of row */ + png_byte channels; /* number of channels (1, 2, 3, or 4) */ + png_byte pixel_depth; /* bits per pixel (depth * channels) */ +} png_row_info; + +typedef png_row_info FAR * png_row_infop; +typedef png_row_info FAR * FAR * png_row_infopp; + +/* These are the function types for the I/O functions and for the functions + * that allow the user to override the default I/O functions with his or her + * own. The png_error_ptr type should match that of user-supplied warning + * and error functions, while the png_rw_ptr type should match that of the + * user read/write data functions. + */ +typedef struct png_struct_def png_struct; +typedef png_struct FAR * png_structp; + +typedef void (PNGAPI *png_error_ptr) PNGARG((png_structp, png_const_charp)); +typedef void (PNGAPI *png_rw_ptr) PNGARG((png_structp, png_bytep, png_size_t)); +typedef void (PNGAPI *png_flush_ptr) PNGARG((png_structp)); +typedef void (PNGAPI *png_read_status_ptr) PNGARG((png_structp, png_uint_32, + int)); +typedef void (PNGAPI *png_write_status_ptr) PNGARG((png_structp, png_uint_32, + int)); + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +typedef void (PNGAPI *png_progressive_info_ptr) PNGARG((png_structp, png_infop)); +typedef void (PNGAPI *png_progressive_end_ptr) PNGARG((png_structp, png_infop)); +typedef void (PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep, + png_uint_32, int)); +#endif + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_LEGACY_SUPPORTED) +typedef void (PNGAPI *png_user_transform_ptr) PNGARG((png_structp, + png_row_infop, png_bytep)); +#endif + +#if defined(PNG_USER_CHUNKS_SUPPORTED) +typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, png_unknown_chunkp)); +#endif +#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) +typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp)); +#endif + +/* Transform masks for the high-level interface */ +#define PNG_TRANSFORM_IDENTITY 0x0000 /* read and write */ +#define PNG_TRANSFORM_STRIP_16 0x0001 /* read only */ +#define PNG_TRANSFORM_STRIP_ALPHA 0x0002 /* read only */ +#define PNG_TRANSFORM_PACKING 0x0004 /* read and write */ +#define PNG_TRANSFORM_PACKSWAP 0x0008 /* read and write */ +#define PNG_TRANSFORM_EXPAND 0x0010 /* read only */ +#define PNG_TRANSFORM_INVERT_MONO 0x0020 /* read and write */ +#define PNG_TRANSFORM_SHIFT 0x0040 /* read and write */ +#define PNG_TRANSFORM_BGR 0x0080 /* read and write */ +#define PNG_TRANSFORM_SWAP_ALPHA 0x0100 /* read and write */ +#define PNG_TRANSFORM_SWAP_ENDIAN 0x0200 /* read and write */ +#define PNG_TRANSFORM_INVERT_ALPHA 0x0400 /* read and write */ +#define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* WRITE only */ + +/* Flags for MNG supported features */ +#define PNG_FLAG_MNG_EMPTY_PLTE 0x01 +#define PNG_FLAG_MNG_FILTER_64 0x04 +#define PNG_ALL_MNG_FEATURES 0x05 + +typedef png_voidp (*png_malloc_ptr) PNGARG((png_structp, png_size_t)); +typedef void (*png_free_ptr) PNGARG((png_structp, png_voidp)); + +/* The structure that holds the information to read and write PNG files. + * The only people who need to care about what is inside of this are the + * people who will be modifying the library for their own special needs. + * It should NOT be accessed directly by an application, except to store + * the jmp_buf. + */ + +struct png_struct_def +{ +#ifdef PNG_SETJMP_SUPPORTED + jmp_buf jmpbuf; /* used in png_error */ +#endif + png_error_ptr error_fn; /* function for printing errors and aborting */ + png_error_ptr warning_fn; /* function for printing warnings */ + png_voidp error_ptr; /* user supplied struct for error functions */ + png_rw_ptr write_data_fn; /* function for writing output data */ + png_rw_ptr read_data_fn; /* function for reading input data */ + png_voidp io_ptr; /* ptr to application struct for I/O functions */ + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) + png_user_transform_ptr read_user_transform_fn; /* user read transform */ +#endif + +#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) + png_user_transform_ptr write_user_transform_fn; /* user write transform */ +#endif + +/* These were added in libpng-1.0.2 */ +#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) + png_voidp user_transform_ptr; /* user supplied struct for user transform */ + png_byte user_transform_depth; /* bit depth of user transformed pixels */ + png_byte user_transform_channels; /* channels in user transformed pixels */ +#endif +#endif + + png_uint_32 mode; /* tells us where we are in the PNG file */ + png_uint_32 flags; /* flags indicating various things to libpng */ + png_uint_32 transformations; /* which transformations to perform */ + + z_stream zstream; /* pointer to decompression structure (below) */ + png_bytep zbuf; /* buffer for zlib */ + png_size_t zbuf_size; /* size of zbuf */ + int zlib_level; /* holds zlib compression level */ + int zlib_method; /* holds zlib compression method */ + int zlib_window_bits; /* holds zlib compression window bits */ + int zlib_mem_level; /* holds zlib compression memory level */ + int zlib_strategy; /* holds zlib compression strategy */ + + png_uint_32 width; /* width of image in pixels */ + png_uint_32 height; /* height of image in pixels */ + png_uint_32 num_rows; /* number of rows in current pass */ + png_uint_32 usr_width; /* width of row at start of write */ + png_uint_32 rowbytes; /* size of row in bytes */ + png_uint_32 irowbytes; /* size of current interlaced row in bytes */ + png_uint_32 iwidth; /* width of current interlaced row in pixels */ + png_uint_32 row_number; /* current row in interlace pass */ + png_bytep prev_row; /* buffer to save previous (unfiltered) row */ + png_bytep row_buf; /* buffer to save current (unfiltered) row */ + png_bytep sub_row; /* buffer to save "sub" row when filtering */ + png_bytep up_row; /* buffer to save "up" row when filtering */ + png_bytep avg_row; /* buffer to save "avg" row when filtering */ + png_bytep paeth_row; /* buffer to save "Paeth" row when filtering */ + png_row_info row_info; /* used for transformation routines */ + + png_uint_32 idat_size; /* current IDAT size for read */ + png_uint_32 crc; /* current chunk CRC value */ + png_colorp palette; /* palette from the input file */ + png_uint_16 num_palette; /* number of color entries in palette */ + png_uint_16 num_trans; /* number of transparency values */ + png_byte chunk_name[5]; /* null-terminated name of current chunk */ + png_byte compression; /* file compression type (always 0) */ + png_byte filter; /* file filter type (always 0) */ + png_byte interlaced; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ + png_byte pass; /* current interlace pass (0 - 6) */ + png_byte do_filter; /* row filter flags (see PNG_FILTER_ below ) */ + png_byte color_type; /* color type of file */ + png_byte bit_depth; /* bit depth of file */ + png_byte usr_bit_depth; /* bit depth of users row */ + png_byte pixel_depth; /* number of bits per pixel */ + png_byte channels; /* number of channels in file */ + png_byte usr_channels; /* channels at start of write */ + png_byte sig_bytes; /* magic bytes read/written from start of file */ + +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) +#ifdef PNG_LEGACY_SUPPORTED + png_byte filler; /* filler byte for pixel expansion */ +#else + png_uint_16 filler; /* filler bytes for pixel expansion */ +#endif +#endif + +#if defined(PNG_bKGD_SUPPORTED) + png_byte background_gamma_type; +# ifdef PNG_FLOATING_POINT_SUPPORTED + float background_gamma; +# endif + png_color_16 background; /* background color in screen gamma space */ +#if defined(PNG_READ_GAMMA_SUPPORTED) + png_color_16 background_1; /* background normalized to gamma 1.0 */ +#endif +#endif /* PNG_bKGD_SUPPORTED */ + +#if defined(PNG_WRITE_FLUSH_SUPPORTED) + png_flush_ptr output_flush_fn;/* Function for flushing output */ + png_uint_32 flush_dist; /* how many rows apart to flush, 0 - no flush */ + png_uint_32 flush_rows; /* number of rows written since last flush */ +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + int gamma_shift; /* number of "insignificant" bits 16-bit gamma */ +#ifdef PNG_FLOATING_POINT_SUPPORTED + float gamma; /* file gamma value */ + float screen_gamma; /* screen gamma value (display_exponent) */ +#endif +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + png_bytep gamma_table; /* gamma table for 8-bit depth files */ + png_bytep gamma_from_1; /* converts from 1.0 to screen */ + png_bytep gamma_to_1; /* converts from file to 1.0 */ + png_uint_16pp gamma_16_table; /* gamma table for 16-bit depth files */ + png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */ + png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */ +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED) + png_color_8 sig_bit; /* significant bits in each available channel */ +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) + png_color_8 shift; /* shift for significant bit tranformation */ +#endif + +#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \ + || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + png_bytep trans; /* transparency values for paletted files */ + png_color_16 trans_values; /* transparency values for non-paletted files */ +#endif + + png_read_status_ptr read_row_fn; /* called after each row is decoded */ + png_write_status_ptr write_row_fn; /* called after each row is encoded */ +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED + png_progressive_info_ptr info_fn; /* called after header data fully read */ + png_progressive_row_ptr row_fn; /* called after each prog. row is decoded */ + png_progressive_end_ptr end_fn; /* called after image is complete */ + png_bytep save_buffer_ptr; /* current location in save_buffer */ + png_bytep save_buffer; /* buffer for previously read data */ + png_bytep current_buffer_ptr; /* current location in current_buffer */ + png_bytep current_buffer; /* buffer for recently used data */ + png_uint_32 push_length; /* size of current input chunk */ + png_uint_32 skip_length; /* bytes to skip in input data */ + png_size_t save_buffer_size; /* amount of data now in save_buffer */ + png_size_t save_buffer_max; /* total size of save_buffer */ + png_size_t buffer_size; /* total amount of available input data */ + png_size_t current_buffer_size; /* amount of data now in current_buffer */ + int process_mode; /* what push library is currently doing */ + int cur_palette; /* current push library palette index */ + +# if defined(PNG_TEXT_SUPPORTED) + png_size_t current_text_size; /* current size of text input data */ + png_size_t current_text_left; /* how much text left to read in input */ + png_charp current_text; /* current text chunk buffer */ + png_charp current_text_ptr; /* current location in current_text */ +# endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */ + +#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ + +#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) +/* for the Borland special 64K segment handler */ + png_bytepp offset_table_ptr; + png_bytep offset_table; + png_uint_16 offset_table_number; + png_uint_16 offset_table_count; + png_uint_16 offset_table_count_free; +#endif + +#if defined(PNG_READ_DITHER_SUPPORTED) + png_bytep palette_lookup; /* lookup table for dithering */ + png_bytep dither_index; /* index translation for palette files */ +#endif + +#if defined(PNG_READ_DITHER_SUPPORTED) || defined(PNG_hIST_SUPPORTED) + png_uint_16p hist; /* histogram */ +#endif + +#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) + png_byte heuristic_method; /* heuristic for row filter selection */ + png_byte num_prev_filters; /* number of weights for previous rows */ + png_bytep prev_filters; /* filter type(s) of previous row(s) */ + png_uint_16p filter_weights; /* weight(s) for previous line(s) */ + png_uint_16p inv_filter_weights; /* 1/weight(s) for previous line(s) */ + png_uint_16p filter_costs; /* relative filter calculation cost */ + png_uint_16p inv_filter_costs; /* 1/relative filter calculation cost */ +#endif + +#if defined(PNG_TIME_RFC1123_SUPPORTED) + png_charp time_buffer; /* String to hold RFC 1123 time text */ +#endif + +/* New members added in libpng-1.0.6 */ + +#ifdef PNG_FREE_ME_SUPPORTED + png_uint_32 free_me; /* flags items libpng is responsible for freeing */ +#endif + +#if defined(PNG_USER_CHUNKS_SUPPORTED) + png_voidp user_chunk_ptr; + png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */ +#endif + +#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) + int num_chunk_list; + png_bytep chunk_list; +#endif + +/* New members added in libpng-1.0.3 */ +#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) + png_byte rgb_to_gray_status; + /* These were changed from png_byte in libpng-1.0.6 */ + png_uint_16 rgb_to_gray_red_coeff; + png_uint_16 rgb_to_gray_green_coeff; + png_uint_16 rgb_to_gray_blue_coeff; +#endif + +/* New member added in libpng-1.0.4 (renamed in 1.0.9) */ +#if defined(PNG_MNG_FEATURES_SUPPORTED) || \ + defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ + defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) +/* changed from png_byte to png_uint_32 at version 1.2.0 */ +#ifdef PNG_1_0_X + png_byte mng_features_permitted; +#else + png_uint_32 mng_features_permitted; +#endif /* PNG_1_0_X */ +#endif + +/* New member added in libpng-1.0.7 */ +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + png_fixed_point int_gamma; +#endif + +/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */ +#if defined(PNG_MNG_FEATURES_SUPPORTED) + png_byte filter_type; +#endif + +#if defined(PNG_1_0_X) || (defined(PNG_DEBUG) && defined(PNG_USE_PNGGCCRD)) +/* New member added in libpng-1.0.10, ifdef'ed out in 1.2.0 */ + png_uint_32 row_buf_size; +#endif + +/* New members added in libpng-1.2.0 */ +#if !defined(PNG_1_0_X) && defined(PNG_ASSEMBLER_CODE_SUPPORTED) + png_byte mmx_bitdepth_threshold; + png_uint_32 mmx_rowbytes_threshold; + png_uint_32 asm_flags; +#endif + +/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ +#ifdef PNG_USER_MEM_SUPPORTED + png_voidp mem_ptr; /* user supplied struct for mem functions */ + png_malloc_ptr malloc_fn; /* function for allocating memory */ + png_free_ptr free_fn; /* function for freeing memory */ +#endif + +/* New member added in libpng-1.0.13 and 1.2.0 */ + png_bytep big_row_buf; /* buffer to save current (unfiltered) row */ + +#if defined(PNG_READ_DITHER_SUPPORTED) +/* The following three members were added at version 1.0.14 and 1.2.4 */ + png_bytep dither_sort; /* working sort array */ + png_bytep index_to_palette; /* where the original index currently is */ + /* in the palette */ + png_bytep palette_to_index; /* which original index points to this */ + /* palette color */ +#endif + +}; + + +/* This prevents a compiler error in png.c if png.c and png.h are both at + version 1.2.5 + */ +typedef png_structp version_1_2_5; + +typedef png_struct FAR * FAR * png_structpp; + +/* Here are the function definitions most commonly used. This is not + * the place to find out how to use libpng. See libpng.txt for the + * full explanation, see example.c for the summary. This just provides + * a simple one line description of the use of each function. + */ + +/* Returns the version number of the library */ +extern PNG_EXPORT(png_uint_32,png_access_version_number) PNGARG((void)); + +/* Tell lib we have already handled the first magic bytes. + * Handling more than 8 bytes from the beginning of the file is an error. + */ +extern PNG_EXPORT(void,png_set_sig_bytes) PNGARG((png_structp png_ptr, + int num_bytes)); + +/* Check sig[start] through sig[start + num_to_check - 1] to see if it's a + * PNG file. Returns zero if the supplied bytes match the 8-byte PNG + * signature, and non-zero otherwise. Having num_to_check == 0 or + * start > 7 will always fail (ie return non-zero). + */ +extern PNG_EXPORT(int,png_sig_cmp) PNGARG((png_bytep sig, png_size_t start, + png_size_t num_to_check)); + +/* Simple signature checking function. This is the same as calling + * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n). + */ +extern PNG_EXPORT(int,png_check_sig) PNGARG((png_bytep sig, int num)); + +/* Allocate and initialize png_ptr struct for reading, and any other memory. */ +extern PNG_EXPORT(png_structp,png_create_read_struct) + PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn)); + +/* Allocate and initialize png_ptr struct for writing, and any other memory */ +extern PNG_EXPORT(png_structp,png_create_write_struct) + PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn)); + +extern PNG_EXPORT(png_uint_32,png_get_compression_buffer_size) + PNGARG((png_structp png_ptr)); + +extern PNG_EXPORT(void,png_set_compression_buffer_size) + PNGARG((png_structp png_ptr, png_uint_32 size)); + +/* Reset the compression stream */ +extern PNG_EXPORT(int,png_reset_zstream) PNGARG((png_structp png_ptr)); + +/* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */ +#ifdef PNG_USER_MEM_SUPPORTED +extern PNG_EXPORT(png_structp,png_create_read_struct_2) + PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn)); +extern PNG_EXPORT(png_structp,png_create_write_struct_2) + PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn)); +#endif + +/* Write a PNG chunk - size, type, (optional) data, CRC. */ +extern PNG_EXPORT(void,png_write_chunk) PNGARG((png_structp png_ptr, + png_bytep chunk_name, png_bytep data, png_size_t length)); + +/* Write the start of a PNG chunk - length and chunk name. */ +extern PNG_EXPORT(void,png_write_chunk_start) PNGARG((png_structp png_ptr, + png_bytep chunk_name, png_uint_32 length)); + +/* Write the data of a PNG chunk started with png_write_chunk_start(). */ +extern PNG_EXPORT(void,png_write_chunk_data) PNGARG((png_structp png_ptr, + png_bytep data, png_size_t length)); + +/* Finish a chunk started with png_write_chunk_start() (includes CRC). */ +extern PNG_EXPORT(void,png_write_chunk_end) PNGARG((png_structp png_ptr)); + +/* Allocate and initialize the info structure */ +extern PNG_EXPORT(png_infop,png_create_info_struct) + PNGARG((png_structp png_ptr)); + +/* Initialize the info structure (old interface - DEPRECATED) */ +extern PNG_EXPORT(void,png_info_init) PNGARG((png_infop info_ptr)); +#undef png_info_init +#define png_info_init(info_ptr) png_info_init_3(&info_ptr, sizeof(png_info)); +extern PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr, + png_size_t png_info_struct_size)); + +/* Writes all the PNG information before the image. */ +extern PNG_EXPORT(void,png_write_info_before_PLTE) PNGARG((png_structp png_ptr, + png_infop info_ptr)); +extern PNG_EXPORT(void,png_write_info) PNGARG((png_structp png_ptr, + png_infop info_ptr)); + +/* read the information before the actual image data. */ +extern PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr, + png_infop info_ptr)); + +#if defined(PNG_TIME_RFC1123_SUPPORTED) +extern PNG_EXPORT(png_charp,png_convert_to_rfc1123) + PNGARG((png_structp png_ptr, png_timep ptime)); +#endif + +#if !defined(_WIN32_WCE) +/* "time.h" functions are not supported on WindowsCE */ +#if defined(PNG_WRITE_tIME_SUPPORTED) +/* convert from a struct tm to png_time */ +extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime, + struct tm FAR * ttime)); + +/* convert from time_t to png_time. Uses gmtime() */ +extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime, + time_t ttime)); +#endif /* PNG_WRITE_tIME_SUPPORTED */ +#endif /* _WIN32_WCE */ + +#if defined(PNG_READ_EXPAND_SUPPORTED) +/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */ +extern PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void,png_set_gray_1_2_4_to_8) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void,png_set_palette_to_rgb) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(void,png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr)); +#endif + +#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) +/* Use blue, green, red order for pixels. */ +extern PNG_EXPORT(void,png_set_bgr) PNGARG((png_structp png_ptr)); +#endif + +#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) +/* Expand the grayscale to 24-bit RGB if necessary. */ +extern PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr)); +#endif + +#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) +/* Reduce RGB to grayscale. */ +#ifdef PNG_FLOATING_POINT_SUPPORTED +extern PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr, + int error_action, double red, double green )); +#endif +extern PNG_EXPORT(void,png_set_rgb_to_gray_fixed) PNGARG((png_structp png_ptr, + int error_action, png_fixed_point red, png_fixed_point green )); +extern PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_structp + png_ptr)); +#endif + +extern PNG_EXPORT(void,png_build_grayscale_palette) PNGARG((int bit_depth, + png_colorp palette)); + +#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) +extern PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr)); +#endif + +#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) +extern PNG_EXPORT(void,png_set_swap_alpha) PNGARG((png_structp png_ptr)); +#endif + +#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) +extern PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr)); +#endif + +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) +/* Add a filler byte to 24-bit RGB images. */ +extern PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr, + png_uint_32 filler, int flags)); +/* The values of the PNG_FILLER_ defines should NOT be changed */ +#define PNG_FILLER_BEFORE 0 +#define PNG_FILLER_AFTER 1 +#endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */ + +#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +/* Swap bytes in 16-bit depth files. */ +extern PNG_EXPORT(void,png_set_swap) PNGARG((png_structp png_ptr)); +#endif + +#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) +/* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */ +extern PNG_EXPORT(void,png_set_packing) PNGARG((png_structp png_ptr)); +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED) +/* Swap packing order of pixels in bytes. */ +extern PNG_EXPORT(void,png_set_packswap) PNGARG((png_structp png_ptr)); +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) +/* Converts files to legal bit depths. */ +extern PNG_EXPORT(void,png_set_shift) PNGARG((png_structp png_ptr, + png_color_8p true_bits)); +#endif + +#if defined(PNG_READ_INTERLACING_SUPPORTED) || \ + defined(PNG_WRITE_INTERLACING_SUPPORTED) +/* Have the code handle the interlacing. Returns the number of passes. */ +extern PNG_EXPORT(int,png_set_interlace_handling) PNGARG((png_structp png_ptr)); +#endif + +#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) +/* Invert monochrome files */ +extern PNG_EXPORT(void,png_set_invert_mono) PNGARG((png_structp png_ptr)); +#endif + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) +/* Handle alpha and tRNS by replacing with a background color. */ +#ifdef PNG_FLOATING_POINT_SUPPORTED +extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr, + png_color_16p background_color, int background_gamma_code, + int need_expand, double background_gamma)); +#endif +#define PNG_BACKGROUND_GAMMA_UNKNOWN 0 +#define PNG_BACKGROUND_GAMMA_SCREEN 1 +#define PNG_BACKGROUND_GAMMA_FILE 2 +#define PNG_BACKGROUND_GAMMA_UNIQUE 3 +#endif + +#if defined(PNG_READ_16_TO_8_SUPPORTED) +/* strip the second byte of information from a 16-bit depth file. */ +extern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr)); +#endif + +#if defined(PNG_READ_DITHER_SUPPORTED) +/* Turn on dithering, and reduce the palette to the number of colors available. */ +extern PNG_EXPORT(void,png_set_dither) PNGARG((png_structp png_ptr, + png_colorp palette, int num_palette, int maximum_colors, + png_uint_16p histogram, int full_dither)); +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) +/* Handle gamma correction. Screen_gamma=(display_exponent) */ +#ifdef PNG_FLOATING_POINT_SUPPORTED +extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr, + double screen_gamma, double default_file_gamma)); +#endif +#endif + +#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ + defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) +/* Permit or disallow empty PLTE (0: not permitted, 1: permitted) */ +/* Deprecated and will be removed. Use png_permit_mng_features() instead. */ +extern PNG_EXPORT(void,png_permit_empty_plte) PNGARG((png_structp png_ptr, + int empty_plte_permitted)); +#endif + +#if defined(PNG_WRITE_FLUSH_SUPPORTED) +/* Set how many lines between output flushes - 0 for no flushing */ +extern PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows)); +/* Flush the current PNG output buffer */ +extern PNG_EXPORT(void,png_write_flush) PNGARG((png_structp png_ptr)); +#endif + +/* optional update palette with requested transformations */ +extern PNG_EXPORT(void,png_start_read_image) PNGARG((png_structp png_ptr)); + +/* optional call to update the users info structure */ +extern PNG_EXPORT(void,png_read_update_info) PNGARG((png_structp png_ptr, + png_infop info_ptr)); + +/* read one or more rows of image data. */ +extern PNG_EXPORT(void,png_read_rows) PNGARG((png_structp png_ptr, + png_bytepp row, png_bytepp display_row, png_uint_32 num_rows)); + +/* read a row of data. */ +extern PNG_EXPORT(void,png_read_row) PNGARG((png_structp png_ptr, + png_bytep row, + png_bytep display_row)); + +/* read the whole image into memory at once. */ +extern PNG_EXPORT(void,png_read_image) PNGARG((png_structp png_ptr, + png_bytepp image)); + +/* write a row of image data */ +extern PNG_EXPORT(void,png_write_row) PNGARG((png_structp png_ptr, + png_bytep row)); + +/* write a few rows of image data */ +extern PNG_EXPORT(void,png_write_rows) PNGARG((png_structp png_ptr, + png_bytepp row, png_uint_32 num_rows)); + +/* write the image data */ +extern PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr, + png_bytepp image)); + +/* writes the end of the PNG file. */ +extern PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr, + png_infop info_ptr)); + +/* read the end of the PNG file. */ +extern PNG_EXPORT(void,png_read_end) PNGARG((png_structp png_ptr, + png_infop info_ptr)); + +/* free any memory associated with the png_info_struct */ +extern PNG_EXPORT(void,png_destroy_info_struct) PNGARG((png_structp png_ptr, + png_infopp info_ptr_ptr)); + +/* free any memory associated with the png_struct and the png_info_structs */ +extern PNG_EXPORT(void,png_destroy_read_struct) PNGARG((png_structpp + png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); + +/* free all memory used by the read (old method - NOT DLL EXPORTED) */ +extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr, + png_infop end_info_ptr)); + +/* free any memory associated with the png_struct and the png_info_structs */ +extern PNG_EXPORT(void,png_destroy_write_struct) + PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)); + +/* free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */ +extern void png_write_destroy PNGARG((png_structp png_ptr)); + +/* set the libpng method of handling chunk CRC errors */ +extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr, + int crit_action, int ancil_action)); + +/* Values for png_set_crc_action() to say how to handle CRC errors in + * ancillary and critical chunks, and whether to use the data contained + * therein. Note that it is impossible to "discard" data in a critical + * chunk. For versions prior to 0.90, the action was always error/quit, + * whereas in version 0.90 and later, the action for CRC errors in ancillary + * chunks is warn/discard. These values should NOT be changed. + * + * value action:critical action:ancillary + */ +#define PNG_CRC_DEFAULT 0 /* error/quit warn/discard data */ +#define PNG_CRC_ERROR_QUIT 1 /* error/quit error/quit */ +#define PNG_CRC_WARN_DISCARD 2 /* (INVALID) warn/discard data */ +#define PNG_CRC_WARN_USE 3 /* warn/use data warn/use data */ +#define PNG_CRC_QUIET_USE 4 /* quiet/use data quiet/use data */ +#define PNG_CRC_NO_CHANGE 5 /* use current value use current value */ + +/* These functions give the user control over the scan-line filtering in + * libpng and the compression methods used by zlib. These functions are + * mainly useful for testing, as the defaults should work with most users. + * Those users who are tight on memory or want faster performance at the + * expense of compression can modify them. See the compression library + * header file (zlib.h) for an explination of the compression functions. + */ + +/* set the filtering method(s) used by libpng. Currently, the only valid + * value for "method" is 0. + */ +extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method, + int filters)); + +/* Flags for png_set_filter() to say which filters to use. The flags + * are chosen so that they don't conflict with real filter types + * below, in case they are supplied instead of the #defined constants. + * These values should NOT be changed. + */ +#define PNG_NO_FILTERS 0x00 +#define PNG_FILTER_NONE 0x08 +#define PNG_FILTER_SUB 0x10 +#define PNG_FILTER_UP 0x20 +#define PNG_FILTER_AVG 0x40 +#define PNG_FILTER_PAETH 0x80 +#define PNG_ALL_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | \ + PNG_FILTER_AVG | PNG_FILTER_PAETH) + +/* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now. + * These defines should NOT be changed. + */ +#define PNG_FILTER_VALUE_NONE 0 +#define PNG_FILTER_VALUE_SUB 1 +#define PNG_FILTER_VALUE_UP 2 +#define PNG_FILTER_VALUE_AVG 3 +#define PNG_FILTER_VALUE_PAETH 4 +#define PNG_FILTER_VALUE_LAST 5 + +#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) /* EXPERIMENTAL */ +/* The "heuristic_method" is given by one of the PNG_FILTER_HEURISTIC_ + * defines, either the default (minimum-sum-of-absolute-differences), or + * the experimental method (weighted-minimum-sum-of-absolute-differences). + * + * Weights are factors >= 1.0, indicating how important it is to keep the + * filter type consistent between rows. Larger numbers mean the current + * filter is that many times as likely to be the same as the "num_weights" + * previous filters. This is cumulative for each previous row with a weight. + * There needs to be "num_weights" values in "filter_weights", or it can be + * NULL if the weights aren't being specified. Weights have no influence on + * the selection of the first row filter. Well chosen weights can (in theory) + * improve the compression for a given image. + * + * Costs are factors >= 1.0 indicating the relative decoding costs of a + * filter type. Higher costs indicate more decoding expense, and are + * therefore less likely to be selected over a filter with lower computational + * costs. There needs to be a value in "filter_costs" for each valid filter + * type (given by PNG_FILTER_VALUE_LAST), or it can be NULL if you aren't + * setting the costs. Costs try to improve the speed of decompression without + * unduly increasing the compressed image size. + * + * A negative weight or cost indicates the default value is to be used, and + * values in the range [0.0, 1.0) indicate the value is to remain unchanged. + * The default values for both weights and costs are currently 1.0, but may + * change if good general weighting/cost heuristics can be found. If both + * the weights and costs are set to 1.0, this degenerates the WEIGHTED method + * to the UNWEIGHTED method, but with added encoding time/computation. + */ +#ifdef PNG_FLOATING_POINT_SUPPORTED +extern PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr, + int heuristic_method, int num_weights, png_doublep filter_weights, + png_doublep filter_costs)); +#endif +#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */ + +/* Heuristic used for row filter selection. These defines should NOT be + * changed. + */ +#define PNG_FILTER_HEURISTIC_DEFAULT 0 /* Currently "UNWEIGHTED" */ +#define PNG_FILTER_HEURISTIC_UNWEIGHTED 1 /* Used by libpng < 0.95 */ +#define PNG_FILTER_HEURISTIC_WEIGHTED 2 /* Experimental feature */ +#define PNG_FILTER_HEURISTIC_LAST 3 /* Not a valid value */ + +/* Set the library compression level. Currently, valid values range from + * 0 - 9, corresponding directly to the zlib compression levels 0 - 9 + * (0 - no compression, 9 - "maximal" compression). Note that tests have + * shown that zlib compression levels 3-6 usually perform as well as level 9 + * for PNG images, and do considerably fewer caclulations. In the future, + * these values may not correspond directly to the zlib compression levels. + */ +extern PNG_EXPORT(void,png_set_compression_level) PNGARG((png_structp png_ptr, + int level)); + +extern PNG_EXPORT(void,png_set_compression_mem_level) + PNGARG((png_structp png_ptr, int mem_level)); + +extern PNG_EXPORT(void,png_set_compression_strategy) + PNGARG((png_structp png_ptr, int strategy)); + +extern PNG_EXPORT(void,png_set_compression_window_bits) + PNGARG((png_structp png_ptr, int window_bits)); + +extern PNG_EXPORT(void,png_set_compression_method) PNGARG((png_structp png_ptr, + int method)); + +/* These next functions are called for input/output, memory, and error + * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c, + * and call standard C I/O routines such as fread(), fwrite(), and + * fprintf(). These functions can be made to use other I/O routines + * at run time for those applications that need to handle I/O in a + * different manner by calling png_set_???_fn(). See libpng.txt for + * more information. + */ + +#if !defined(PNG_NO_STDIO) +/* Initialize the input/output for the PNG file to the default functions. */ +extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, png_FILE_p fp)); +#endif + +/* Replace the (error and abort), and warning functions with user + * supplied functions. If no messages are to be printed you must still + * write and use replacement functions. The replacement error_fn should + * still do a longjmp to the last setjmp location if you are using this + * method of error handling. If error_fn or warning_fn is NULL, the + * default function will be used. + */ + +extern PNG_EXPORT(void,png_set_error_fn) PNGARG((png_structp png_ptr, + png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn)); + +/* Return the user pointer associated with the error functions */ +extern PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr)); + +/* Replace the default data output functions with a user supplied one(s). + * If buffered output is not used, then output_flush_fn can be set to NULL. + * If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time + * output_flush_fn will be ignored (and thus can be NULL). + */ +extern PNG_EXPORT(void,png_set_write_fn) PNGARG((png_structp png_ptr, + png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); + +/* Replace the default data input function with a user supplied one. */ +extern PNG_EXPORT(void,png_set_read_fn) PNGARG((png_structp png_ptr, + png_voidp io_ptr, png_rw_ptr read_data_fn)); + +/* Return the user pointer associated with the I/O functions */ +extern PNG_EXPORT(png_voidp,png_get_io_ptr) PNGARG((png_structp png_ptr)); + +extern PNG_EXPORT(void,png_set_read_status_fn) PNGARG((png_structp png_ptr, + png_read_status_ptr read_row_fn)); + +extern PNG_EXPORT(void,png_set_write_status_fn) PNGARG((png_structp png_ptr, + png_write_status_ptr write_row_fn)); + +#ifdef PNG_USER_MEM_SUPPORTED +/* Replace the default memory allocation functions with user supplied one(s). */ +extern PNG_EXPORT(void,png_set_mem_fn) PNGARG((png_structp png_ptr, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn)); +/* Return the user pointer associated with the memory functions */ +extern PNG_EXPORT(png_voidp,png_get_mem_ptr) PNGARG((png_structp png_ptr)); +#endif + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_LEGACY_SUPPORTED) +extern PNG_EXPORT(void,png_set_read_user_transform_fn) PNGARG((png_structp + png_ptr, png_user_transform_ptr read_user_transform_fn)); +#endif + +#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_LEGACY_SUPPORTED) +extern PNG_EXPORT(void,png_set_write_user_transform_fn) PNGARG((png_structp + png_ptr, png_user_transform_ptr write_user_transform_fn)); +#endif + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_LEGACY_SUPPORTED) +extern PNG_EXPORT(void,png_set_user_transform_info) PNGARG((png_structp + png_ptr, png_voidp user_transform_ptr, int user_transform_depth, + int user_transform_channels)); +/* Return the user pointer associated with the user transform functions */ +extern PNG_EXPORT(png_voidp,png_get_user_transform_ptr) + PNGARG((png_structp png_ptr)); +#endif + +#ifdef PNG_USER_CHUNKS_SUPPORTED +extern PNG_EXPORT(void,png_set_read_user_chunk_fn) PNGARG((png_structp png_ptr, + png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)); +extern PNG_EXPORT(png_voidp,png_get_user_chunk_ptr) PNGARG((png_structp + png_ptr)); +#endif + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +/* Sets the function callbacks for the push reader, and a pointer to a + * user-defined structure available to the callback functions. + */ +extern PNG_EXPORT(void,png_set_progressive_read_fn) PNGARG((png_structp png_ptr, + png_voidp progressive_ptr, + png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, + png_progressive_end_ptr end_fn)); + +/* returns the user pointer associated with the push read functions */ +extern PNG_EXPORT(png_voidp,png_get_progressive_ptr) + PNGARG((png_structp png_ptr)); + +/* function to be called when data becomes available */ +extern PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_bytep buffer, png_size_t buffer_size)); + +/* function that combines rows. Not very much different than the + * png_combine_row() call. Is this even used????? + */ +extern PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr, + png_bytep old_row, png_bytep new_row)); +#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ + +extern PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr, + png_uint_32 size)); + +#if defined(PNG_1_0_X) +# define png_malloc_warn png_malloc +#else +/* Added at libpng version 1.2.4 */ +extern PNG_EXPORT(png_voidp,png_malloc_warn) PNGARG((png_structp png_ptr, + png_uint_32 size)); +#endif + +/* frees a pointer allocated by png_malloc() */ +extern PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr)); + +#if defined(PNG_1_0_X) +/* Function to allocate memory for zlib. */ +extern PNG_EXPORT(voidpf,png_zalloc) PNGARG((voidpf png_ptr, uInt items, + uInt size)); + +/* Function to free memory for zlib */ +extern PNG_EXPORT(void,png_zfree) PNGARG((voidpf png_ptr, voidpf ptr)); +#endif + +/* Free data that was allocated internally */ +extern PNG_EXPORT(void,png_free_data) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 free_me, int num)); +#ifdef PNG_FREE_ME_SUPPORTED +/* Reassign responsibility for freeing existing data, whether allocated + * by libpng or by the application */ +extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr, + png_infop info_ptr, int freer, png_uint_32 mask)); +#endif +/* assignments for png_data_freer */ +#define PNG_DESTROY_WILL_FREE_DATA 1 +#define PNG_SET_WILL_FREE_DATA 1 +#define PNG_USER_WILL_FREE_DATA 2 +/* Flags for png_ptr->free_me and info_ptr->free_me */ +#define PNG_FREE_HIST 0x0008 +#define PNG_FREE_ICCP 0x0010 +#define PNG_FREE_SPLT 0x0020 +#define PNG_FREE_ROWS 0x0040 +#define PNG_FREE_PCAL 0x0080 +#define PNG_FREE_SCAL 0x0100 +#define PNG_FREE_UNKN 0x0200 +#define PNG_FREE_LIST 0x0400 +#define PNG_FREE_PLTE 0x1000 +#define PNG_FREE_TRNS 0x2000 +#define PNG_FREE_TEXT 0x4000 +#define PNG_FREE_ALL 0x7fff +#define PNG_FREE_MUL 0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */ + +#ifdef PNG_USER_MEM_SUPPORTED +extern PNG_EXPORT(png_voidp,png_malloc_default) PNGARG((png_structp png_ptr, + png_uint_32 size)); +extern PNG_EXPORT(void,png_free_default) PNGARG((png_structp png_ptr, + png_voidp ptr)); +#endif + +extern PNG_EXPORT(png_voidp,png_memcpy_check) PNGARG((png_structp png_ptr, + png_voidp s1, png_voidp s2, png_uint_32 size)); + +extern PNG_EXPORT(png_voidp,png_memset_check) PNGARG((png_structp png_ptr, + png_voidp s1, int value, png_uint_32 size)); + +#if defined(USE_FAR_KEYWORD) /* memory model conversion function */ +extern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr, + int check)); +#endif /* USE_FAR_KEYWORD */ + +/* Fatal error in PNG image of libpng - can't continue */ +extern PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr, + png_const_charp error_message)); + +/* The same, but the chunk name is prepended to the error string. */ +extern PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr, + png_const_charp error_message)); + +/* Non-fatal error in libpng. Can continue, but may have a problem. */ +extern PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr, + png_const_charp warning_message)); + +/* Non-fatal error in libpng, chunk name is prepended to message. */ +extern PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr, + png_const_charp warning_message)); + +/* The png_set_ functions are for storing values in the png_info_struct. + * Similarly, the png_get_ calls are used to read values from the + * png_info_struct, either storing the parameters in the passed variables, or + * setting pointers into the png_info_struct where the data is stored. The + * png_get_ functions return a non-zero value if the data was available + * in info_ptr, or return zero and do not change any of the parameters if the + * data was not available. + * + * These functions should be used instead of directly accessing png_info + * to avoid problems with future changes in the size and internal layout of + * png_info_struct. + */ +/* Returns "flag" if chunk data is valid in info_ptr. */ +extern PNG_EXPORT(png_uint_32,png_get_valid) PNGARG((png_structp png_ptr, +png_infop info_ptr, png_uint_32 flag)); + +/* Returns number of bytes needed to hold a transformed row. */ +extern PNG_EXPORT(png_uint_32,png_get_rowbytes) PNGARG((png_structp png_ptr, +png_infop info_ptr)); + +#if defined(PNG_INFO_IMAGE_SUPPORTED) +/* Returns row_pointers, which is an array of pointers to scanlines that was +returned from png_read_png(). */ +extern PNG_EXPORT(png_bytepp,png_get_rows) PNGARG((png_structp png_ptr, +png_infop info_ptr)); +/* Set row_pointers, which is an array of pointers to scanlines for use +by png_write_png(). */ +extern PNG_EXPORT(void,png_set_rows) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_bytepp row_pointers)); +#endif + +/* Returns number of color channels in image. */ +extern PNG_EXPORT(png_byte,png_get_channels) PNGARG((png_structp png_ptr, +png_infop info_ptr)); + +#ifdef PNG_EASY_ACCESS_SUPPORTED +/* Returns image width in pixels. */ +extern PNG_EXPORT(png_uint_32, png_get_image_width) PNGARG((png_structp +png_ptr, png_infop info_ptr)); + +/* Returns image height in pixels. */ +extern PNG_EXPORT(png_uint_32, png_get_image_height) PNGARG((png_structp +png_ptr, png_infop info_ptr)); + +/* Returns image bit_depth. */ +extern PNG_EXPORT(png_byte, png_get_bit_depth) PNGARG((png_structp +png_ptr, png_infop info_ptr)); + +/* Returns image color_type. */ +extern PNG_EXPORT(png_byte, png_get_color_type) PNGARG((png_structp +png_ptr, png_infop info_ptr)); + +/* Returns image filter_type. */ +extern PNG_EXPORT(png_byte, png_get_filter_type) PNGARG((png_structp +png_ptr, png_infop info_ptr)); + +/* Returns image interlace_type. */ +extern PNG_EXPORT(png_byte, png_get_interlace_type) PNGARG((png_structp +png_ptr, png_infop info_ptr)); + +/* Returns image compression_type. */ +extern PNG_EXPORT(png_byte, png_get_compression_type) PNGARG((png_structp +png_ptr, png_infop info_ptr)); + +/* Returns image resolution in pixels per meter, from pHYs chunk data. */ +extern PNG_EXPORT(png_uint_32, png_get_pixels_per_meter) PNGARG((png_structp +png_ptr, png_infop info_ptr)); +extern PNG_EXPORT(png_uint_32, png_get_x_pixels_per_meter) PNGARG((png_structp +png_ptr, png_infop info_ptr)); +extern PNG_EXPORT(png_uint_32, png_get_y_pixels_per_meter) PNGARG((png_structp +png_ptr, png_infop info_ptr)); + +/* Returns pixel aspect ratio, computed from pHYs chunk data. */ +#ifdef PNG_FLOATING_POINT_SUPPORTED +extern PNG_EXPORT(float, png_get_pixel_aspect_ratio) PNGARG((png_structp +png_ptr, png_infop info_ptr)); +#endif + +/* Returns image x, y offset in pixels or microns, from oFFs chunk data. */ +extern PNG_EXPORT(png_int_32, png_get_x_offset_pixels) PNGARG((png_structp +png_ptr, png_infop info_ptr)); +extern PNG_EXPORT(png_int_32, png_get_y_offset_pixels) PNGARG((png_structp +png_ptr, png_infop info_ptr)); +extern PNG_EXPORT(png_int_32, png_get_x_offset_microns) PNGARG((png_structp +png_ptr, png_infop info_ptr)); +extern PNG_EXPORT(png_int_32, png_get_y_offset_microns) PNGARG((png_structp +png_ptr, png_infop info_ptr)); + +#endif /* PNG_EASY_ACCESS_SUPPORTED */ + +/* Returns pointer to signature string read from PNG header */ +extern PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_structp png_ptr, +png_infop info_ptr)); + +#if defined(PNG_bKGD_SUPPORTED) +extern PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_color_16p *background)); +#endif + +#if defined(PNG_bKGD_SUPPORTED) +extern PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_color_16p background)); +#endif + +#if defined(PNG_cHRM_SUPPORTED) +#ifdef PNG_FLOATING_POINT_SUPPORTED +extern PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_structp png_ptr, + png_infop info_ptr, double *white_x, double *white_y, double *red_x, + double *red_y, double *green_x, double *green_y, double *blue_x, + double *blue_y)); +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED +extern PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_fixed_point *int_white_x, png_fixed_point + *int_white_y, png_fixed_point *int_red_x, png_fixed_point *int_red_y, + png_fixed_point *int_green_x, png_fixed_point *int_green_y, png_fixed_point + *int_blue_x, png_fixed_point *int_blue_y)); +#endif +#endif + +#if defined(PNG_cHRM_SUPPORTED) +#ifdef PNG_FLOATING_POINT_SUPPORTED +extern PNG_EXPORT(void,png_set_cHRM) PNGARG((png_structp png_ptr, + png_infop info_ptr, double white_x, double white_y, double red_x, + double red_y, double green_x, double green_y, double blue_x, double blue_y)); +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED +extern PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y, + png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point + int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, + png_fixed_point int_blue_y)); +#endif +#endif + +#if defined(PNG_gAMA_SUPPORTED) +#ifdef PNG_FLOATING_POINT_SUPPORTED +extern PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr, + png_infop info_ptr, double *file_gamma)); +#endif +extern PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_fixed_point *int_file_gamma)); +#endif + +#if defined(PNG_gAMA_SUPPORTED) +#ifdef PNG_FLOATING_POINT_SUPPORTED +extern PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr, + png_infop info_ptr, double file_gamma)); +#endif +extern PNG_EXPORT(void,png_set_gAMA_fixed) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_fixed_point int_file_gamma)); +#endif + +#if defined(PNG_hIST_SUPPORTED) +extern PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_16p *hist)); +#endif + +#if defined(PNG_hIST_SUPPORTED) +extern PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_16p hist)); +#endif + +extern PNG_EXPORT(png_uint_32,png_get_IHDR) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, + int *bit_depth, int *color_type, int *interlace_method, + int *compression_method, int *filter_method)); + +extern PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_method, int compression_method, + int filter_method)); + +#if defined(PNG_oFFs_SUPPORTED) +extern PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, + int *unit_type)); +#endif + +#if defined(PNG_oFFs_SUPPORTED) +extern PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y, + int unit_type)); +#endif + +#if defined(PNG_pCAL_SUPPORTED) +extern PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1, + int *type, int *nparams, png_charp *units, png_charpp *params)); +#endif + +#if defined(PNG_pCAL_SUPPORTED) +extern PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, + int type, int nparams, png_charp units, png_charpp params)); +#endif + +#if defined(PNG_pHYs_SUPPORTED) +extern PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); +#endif + +#if defined(PNG_pHYs_SUPPORTED) +extern PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); +#endif + +extern PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_colorp *palette, int *num_palette)); + +extern PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_colorp palette, int num_palette)); + +#if defined(PNG_sBIT_SUPPORTED) +extern PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_color_8p *sig_bit)); +#endif + +#if defined(PNG_sBIT_SUPPORTED) +extern PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_color_8p sig_bit)); +#endif + +#if defined(PNG_sRGB_SUPPORTED) +extern PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr, + png_infop info_ptr, int *intent)); +#endif + +#if defined(PNG_sRGB_SUPPORTED) +extern PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr, + png_infop info_ptr, int intent)); +extern PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr, + png_infop info_ptr, int intent)); +#endif + +#if defined(PNG_iCCP_SUPPORTED) +extern PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_charpp name, int *compression_type, + png_charpp profile, png_uint_32 *proflen)); + /* Note to maintainer: profile should be png_bytepp */ +#endif + +#if defined(PNG_iCCP_SUPPORTED) +extern PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_charp name, int compression_type, + png_charp profile, png_uint_32 proflen)); + /* Note to maintainer: profile should be png_bytep */ +#endif + +#if defined(PNG_sPLT_SUPPORTED) +extern PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_sPLT_tpp entries)); +#endif + +#if defined(PNG_sPLT_SUPPORTED) +extern PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_sPLT_tp entries, int nentries)); +#endif + +#if defined(PNG_TEXT_SUPPORTED) +/* png_get_text also returns the number of text chunks in *num_text */ +extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_textp *text_ptr, int *num_text)); +#endif + +/* + * Note while png_set_text() will accept a structure whose text, + * language, and translated keywords are NULL pointers, the structure + * returned by png_get_text will always contain regular + * zero-terminated C strings. They might be empty strings but + * they will never be NULL pointers. + */ + +#if defined(PNG_TEXT_SUPPORTED) +extern PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_textp text_ptr, int num_text)); +#endif + +#if defined(PNG_tIME_SUPPORTED) +extern PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_timep *mod_time)); +#endif + +#if defined(PNG_tIME_SUPPORTED) +extern PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_timep mod_time)); +#endif + +#if defined(PNG_tRNS_SUPPORTED) +extern PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_bytep *trans, int *num_trans, + png_color_16p *trans_values)); +#endif + +#if defined(PNG_tRNS_SUPPORTED) +extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_bytep trans, int num_trans, + png_color_16p trans_values)); +#endif + +#if defined(PNG_tRNS_SUPPORTED) +#endif + +#if defined(PNG_sCAL_SUPPORTED) +#ifdef PNG_FLOATING_POINT_SUPPORTED +extern PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_structp png_ptr, + png_infop info_ptr, int *unit, double *width, double *height)); +#else +#ifdef PNG_FIXED_POINT_SUPPORTED +extern PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr, + png_infop info_ptr, int *unit, png_charpp swidth, png_charpp sheight)); +#endif +#endif +#endif /* PNG_sCAL_SUPPORTED */ + +#if defined(PNG_sCAL_SUPPORTED) +#ifdef PNG_FLOATING_POINT_SUPPORTED +extern PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr, + png_infop info_ptr, int unit, double width, double height)); +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED +extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr, + png_infop info_ptr, int unit, png_charp swidth, png_charp sheight)); +#endif +#endif /* PNG_sCAL_SUPPORTED || PNG_WRITE_sCAL_SUPPORTED */ + +#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) +/* provide a list of chunks and how they are to be handled, if the built-in + handling or default unknown chunk handling is not desired. Any chunks not + listed will be handled in the default manner. The IHDR and IEND chunks + must not be listed. + keep = 0: follow default behavour + = 1: do not keep + = 2: keep only if safe-to-copy + = 3: keep even if unsafe-to-copy +*/ +extern PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp + png_ptr, int keep, png_bytep chunk_list, int num_chunks)); +extern PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr, + png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)); +extern PNG_EXPORT(void, png_set_unknown_chunk_location) + PNGARG((png_structp png_ptr, png_infop info_ptr, int chunk, int location)); +extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp + png_ptr, png_infop info_ptr, png_unknown_chunkpp entries)); +#endif +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED +PNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep + chunk_name)); +#endif + +/* Png_free_data() will turn off the "valid" flag for anything it frees. + If you need to turn it off for a chunk that your application has freed, + you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK); */ +extern PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr, + png_infop info_ptr, int mask)); + +#if defined(PNG_INFO_IMAGE_SUPPORTED) +/* The "params" pointer is currently not used and is for future expansion. */ +extern PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr, + png_infop info_ptr, + int transforms, + png_voidp params)); +extern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr, + png_infop info_ptr, + int transforms, + png_voidp params)); +#endif + +/* Define PNG_DEBUG at compile time for debugging information. Higher + * numbers for PNG_DEBUG mean more debugging information. This has + * only been added since version 0.95 so it is not implemented throughout + * libpng yet, but more support will be added as needed. + */ +#ifdef PNG_DEBUG +#if (PNG_DEBUG > 0) +#if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER) +#include +#if (PNG_DEBUG > 1) +#define png_debug(l,m) _RPT0(_CRT_WARN,m) +#define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m,p1) +#define png_debug2(l,m,p1,p2) _RPT2(_CRT_WARN,m,p1,p2) +#endif +#else /* PNG_DEBUG_FILE || !_MSC_VER */ +#ifndef PNG_DEBUG_FILE +#define PNG_DEBUG_FILE stderr +#endif /* PNG_DEBUG_FILE */ +#if (PNG_DEBUG > 1) +#define png_debug(l,m) \ +{ \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \ +} +#define png_debug1(l,m,p1) \ +{ \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \ +} +#define png_debug2(l,m,p1,p2) \ +{ \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \ +} +#endif /* (PNG_DEBUG > 1) */ +#endif /* _MSC_VER */ +#endif /* (PNG_DEBUG > 0) */ +#endif /* PNG_DEBUG */ +#ifndef png_debug +#define png_debug(l, m) +#endif +#ifndef png_debug1 +#define png_debug1(l, m, p1) +#endif +#ifndef png_debug2 +#define png_debug2(l, m, p1, p2) +#endif + +extern PNG_EXPORT(png_bytep,png_sig_bytes) PNGARG((void)); + +extern PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr)); + +#ifdef PNG_MNG_FEATURES_SUPPORTED +extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp + png_ptr, png_uint_32 mng_features_permitted)); +#endif + +/* Added to version 1.2.0 */ +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) +#define PNG_ASM_FLAG_MMX_SUPPORT_COMPILED 0x01 /* not user-settable */ +#define PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU 0x02 /* not user-settable */ +#define PNG_ASM_FLAG_MMX_READ_COMBINE_ROW 0x04 +#define PNG_ASM_FLAG_MMX_READ_INTERLACE 0x08 +#define PNG_ASM_FLAG_MMX_READ_FILTER_SUB 0x10 +#define PNG_ASM_FLAG_MMX_READ_FILTER_UP 0x20 +#define PNG_ASM_FLAG_MMX_READ_FILTER_AVG 0x40 +#define PNG_ASM_FLAG_MMX_READ_FILTER_PAETH 0x80 +#define PNG_ASM_FLAGS_INITIALIZED 0x80000000 /* not user-settable */ + +#define PNG_MMX_READ_FLAGS ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \ + | PNG_ASM_FLAG_MMX_READ_INTERLACE \ + | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ + | PNG_ASM_FLAG_MMX_READ_FILTER_UP \ + | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ + | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ) +#define PNG_MMX_WRITE_FLAGS ( 0 ) + +#define PNG_MMX_FLAGS ( PNG_ASM_FLAG_MMX_SUPPORT_COMPILED \ + | PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU \ + | PNG_MMX_READ_FLAGS \ + | PNG_MMX_WRITE_FLAGS ) + +#define PNG_SELECT_READ 1 +#define PNG_SELECT_WRITE 2 + + +#if !defined(PNG_1_0_X) +/* pngget.c */ +extern PNG_EXPORT(png_uint_32,png_get_mmx_flagmask) + PNGARG((int flag_select, int *compilerID)); + +/* pngget.c */ +extern PNG_EXPORT(png_uint_32,png_get_asm_flagmask) + PNGARG((int flag_select)); + +/* pngget.c */ +extern PNG_EXPORT(png_uint_32,png_get_asm_flags) + PNGARG((png_structp png_ptr)); + +/* pngget.c */ +extern PNG_EXPORT(png_byte,png_get_mmx_bitdepth_threshold) + PNGARG((png_structp png_ptr)); + +/* pngget.c */ +extern PNG_EXPORT(png_uint_32,png_get_mmx_rowbytes_threshold) + PNGARG((png_structp png_ptr)); + +/* pngset.c */ +extern PNG_EXPORT(void,png_set_asm_flags) + PNGARG((png_structp png_ptr, png_uint_32 asm_flags)); + +/* pngset.c */ +extern PNG_EXPORT(void,png_set_mmx_thresholds) + PNGARG((png_structp png_ptr, png_byte mmx_bitdepth_threshold, + png_uint_32 mmx_rowbytes_threshold)); + +#endif /* PNG_1_0_X */ +#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ + +#if !defined(PNG_1_0_X) +/* png.c, pnggccrd.c, or pngvcrd.c */ +extern PNG_EXPORT(int,png_mmx_support) PNGARG((void)); + +/* Strip the prepended error numbers ("#nnn ") from error and warning + * messages before passing them to the error or warning handler. */ +#ifdef PNG_ERROR_NUMBERS_SUPPORTED +extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp + png_ptr, png_uint_32 strip_mode)); +#endif +#endif /* PNG_1_0_X */ + +/* Maintainer: Put new public prototypes here ^, in libpng.3, and project defs */ + +#define PNG_HEADER_VERSION_STRING \ + " libpng version 1.2.5 - October 3, 2002 (header)\n" + +#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED +/* With these routines we avoid an integer divide, which will be slower on + * most machines. However, it does take more operations than the corresponding + * divide method, so it may be slower on a few RISC systems. There are two + * shifts (by 8 or 16 bits) and an addition, versus a single integer divide. + * + * Note that the rounding factors are NOT supposed to be the same! 128 and + * 32768 are correct for the NODIV code; 127 and 32767 are correct for the + * standard method. + * + * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ] + */ + + /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ + +# define png_composite(composite, fg, alpha, bg) \ + { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) * (png_uint_16)(alpha) \ + + (png_uint_16)(bg)*(png_uint_16)(255 - \ + (png_uint_16)(alpha)) + (png_uint_16)128); \ + (composite) = (png_byte)((temp + (temp >> 8)) >> 8); } + +# define png_composite_16(composite, fg, alpha, bg) \ + { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) * (png_uint_32)(alpha) \ + + (png_uint_32)(bg)*(png_uint_32)(65535L - \ + (png_uint_32)(alpha)) + (png_uint_32)32768L); \ + (composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); } + +#else /* standard method using integer division */ + +# define png_composite(composite, fg, alpha, bg) \ + (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) + \ + (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \ + (png_uint_16)127) / 255) + +# define png_composite_16(composite, fg, alpha, bg) \ + (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \ + (png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) + \ + (png_uint_32)32767) / (png_uint_32)65535L) + +#endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */ + +/* These next functions are used internally in the code. They generally + * shouldn't be used unless you are writing code to add or replace some + * functionality in libpng. More information about most functions can + * be found in the files where the functions are located. + */ + +#if defined(PNG_INTERNAL) + +/* Various modes of operation. Note that after an init, mode is set to + * zero automatically when the structure is created. + */ +#define PNG_HAVE_IHDR 0x01 +#define PNG_HAVE_PLTE 0x02 +#define PNG_HAVE_IDAT 0x04 +#define PNG_AFTER_IDAT 0x08 +#define PNG_HAVE_IEND 0x10 +#define PNG_HAVE_gAMA 0x20 +#define PNG_HAVE_cHRM 0x40 +#define PNG_HAVE_sRGB 0x80 +#define PNG_HAVE_CHUNK_HEADER 0x100 +#define PNG_WROTE_tIME 0x200 +#define PNG_WROTE_INFO_BEFORE_PLTE 0x400 +#define PNG_BACKGROUND_IS_GRAY 0x800 +#define PNG_HAVE_PNG_SIGNATURE 0x1000 + +/* flags for the transformations the PNG library does on the image data */ +#define PNG_BGR 0x0001 +#define PNG_INTERLACE 0x0002 +#define PNG_PACK 0x0004 +#define PNG_SHIFT 0x0008 +#define PNG_SWAP_BYTES 0x0010 +#define PNG_INVERT_MONO 0x0020 +#define PNG_DITHER 0x0040 +#define PNG_BACKGROUND 0x0080 +#define PNG_BACKGROUND_EXPAND 0x0100 + /* 0x0200 unused */ +#define PNG_16_TO_8 0x0400 +#define PNG_RGBA 0x0800 +#define PNG_EXPAND 0x1000 +#define PNG_GAMMA 0x2000 +#define PNG_GRAY_TO_RGB 0x4000 +#define PNG_FILLER 0x8000L +#define PNG_PACKSWAP 0x10000L +#define PNG_SWAP_ALPHA 0x20000L +#define PNG_STRIP_ALPHA 0x40000L +#define PNG_INVERT_ALPHA 0x80000L +#define PNG_USER_TRANSFORM 0x100000L +#define PNG_RGB_TO_GRAY_ERR 0x200000L +#define PNG_RGB_TO_GRAY_WARN 0x400000L +#define PNG_RGB_TO_GRAY 0x600000L /* two bits, RGB_TO_GRAY_ERR|WARN */ + +/* flags for png_create_struct */ +#define PNG_STRUCT_PNG 0x0001 +#define PNG_STRUCT_INFO 0x0002 + +/* Scaling factor for filter heuristic weighting calculations */ +#define PNG_WEIGHT_SHIFT 8 +#define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT)) +#define PNG_COST_SHIFT 3 +#define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT)) + +/* flags for the png_ptr->flags rather than declaring a byte for each one */ +#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001 +#define PNG_FLAG_ZLIB_CUSTOM_LEVEL 0x0002 +#define PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL 0x0004 +#define PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS 0x0008 +#define PNG_FLAG_ZLIB_CUSTOM_METHOD 0x0010 +#define PNG_FLAG_ZLIB_FINISHED 0x0020 +#define PNG_FLAG_ROW_INIT 0x0040 +#define PNG_FLAG_FILLER_AFTER 0x0080 +#define PNG_FLAG_CRC_ANCILLARY_USE 0x0100 +#define PNG_FLAG_CRC_ANCILLARY_NOWARN 0x0200 +#define PNG_FLAG_CRC_CRITICAL_USE 0x0400 +#define PNG_FLAG_CRC_CRITICAL_IGNORE 0x0800 +#define PNG_FLAG_FREE_PLTE 0x1000 +#define PNG_FLAG_FREE_TRNS 0x2000 +#define PNG_FLAG_FREE_HIST 0x4000 +#define PNG_FLAG_KEEP_UNKNOWN_CHUNKS 0x8000L +#define PNG_FLAG_KEEP_UNSAFE_CHUNKS 0x10000L +#define PNG_FLAG_LIBRARY_MISMATCH 0x20000L +#define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000L +#define PNG_FLAG_STRIP_ERROR_TEXT 0x80000L +#define PNG_FLAG_MALLOC_NULL_MEM_OK 0x100000L + +/* For use in png_set_keep_unknown, png_handle_as_unknown */ +#define HANDLE_CHUNK_AS_DEFAULT 0 +#define HANDLE_CHUNK_NEVER 1 +#define HANDLE_CHUNK_IF_SAFE 2 +#define HANDLE_CHUNK_ALWAYS 3 + +#define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \ + PNG_FLAG_CRC_ANCILLARY_NOWARN) + +#define PNG_FLAG_CRC_CRITICAL_MASK (PNG_FLAG_CRC_CRITICAL_USE | \ + PNG_FLAG_CRC_CRITICAL_IGNORE) + +#define PNG_FLAG_CRC_MASK (PNG_FLAG_CRC_ANCILLARY_MASK | \ + PNG_FLAG_CRC_CRITICAL_MASK) + +/* save typing and make code easier to understand */ +#define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \ + abs((int)((c1).green) - (int)((c2).green)) + \ + abs((int)((c1).blue) - (int)((c2).blue))) + +/* variables declared in png.c - only it needs to define PNG_NO_EXTERN */ +#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN) +/* place to hold the signature string for a PNG file. */ +#ifdef PNG_USE_GLOBAL_ARRAYS + PNG_EXPORT_VAR (const png_byte FARDATA) png_sig[8]; +#else +#define png_sig png_sig_bytes(NULL) +#endif +#endif /* PNG_NO_EXTERN */ + +/* Constant strings for known chunk types. If you need to add a chunk, + * define the name here, and add an invocation of the macro in png.c and + * wherever it's needed. + */ +#define PNG_IHDR const png_byte png_IHDR[5] = { 73, 72, 68, 82, '\0'} +#define PNG_IDAT const png_byte png_IDAT[5] = { 73, 68, 65, 84, '\0'} +#define PNG_IEND const png_byte png_IEND[5] = { 73, 69, 78, 68, '\0'} +#define PNG_PLTE const png_byte png_PLTE[5] = { 80, 76, 84, 69, '\0'} +#define PNG_bKGD const png_byte png_bKGD[5] = { 98, 75, 71, 68, '\0'} +#define PNG_cHRM const png_byte png_cHRM[5] = { 99, 72, 82, 77, '\0'} +#define PNG_gAMA const png_byte png_gAMA[5] = {103, 65, 77, 65, '\0'} +#define PNG_hIST const png_byte png_hIST[5] = {104, 73, 83, 84, '\0'} +#define PNG_iCCP const png_byte png_iCCP[5] = {105, 67, 67, 80, '\0'} +#define PNG_iTXt const png_byte png_iTXt[5] = {105, 84, 88, 116, '\0'} +#define PNG_oFFs const png_byte png_oFFs[5] = {111, 70, 70, 115, '\0'} +#define PNG_pCAL const png_byte png_pCAL[5] = {112, 67, 65, 76, '\0'} +#define PNG_sCAL const png_byte png_sCAL[5] = {115, 67, 65, 76, '\0'} +#define PNG_pHYs const png_byte png_pHYs[5] = {112, 72, 89, 115, '\0'} +#define PNG_sBIT const png_byte png_sBIT[5] = {115, 66, 73, 84, '\0'} +#define PNG_sPLT const png_byte png_sPLT[5] = {115, 80, 76, 84, '\0'} +#define PNG_sRGB const png_byte png_sRGB[5] = {115, 82, 71, 66, '\0'} +#define PNG_tEXt const png_byte png_tEXt[5] = {116, 69, 88, 116, '\0'} +#define PNG_tIME const png_byte png_tIME[5] = {116, 73, 77, 69, '\0'} +#define PNG_tRNS const png_byte png_tRNS[5] = {116, 82, 78, 83, '\0'} +#define PNG_zTXt const png_byte png_zTXt[5] = {122, 84, 88, 116, '\0'} + +#ifdef PNG_USE_GLOBAL_ARRAYS +PNG_EXPORT_VAR (const png_byte FARDATA) png_IHDR[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_IDAT[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_IEND[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_PLTE[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_bKGD[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_cHRM[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_gAMA[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_hIST[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_iCCP[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_iTXt[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_oFFs[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_pCAL[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_sCAL[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_pHYs[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_sBIT[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_sPLT[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_sRGB[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_tEXt[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_tIME[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_tRNS[5]; +PNG_EXPORT_VAR (const png_byte FARDATA) png_zTXt[5]; +#endif /* PNG_USE_GLOBAL_ARRAYS */ + + +/* Inline macros to do direct reads of bytes from the input buffer. These + * require that you are using an architecture that uses PNG byte ordering + * (MSB first) and supports unaligned data storage. I think that PowerPC + * in big-endian mode and 680x0 are the only ones that will support this. + * The x86 line of processors definitely do not. The png_get_int_32() + * routine also assumes we are using two's complement format for negative + * values, which is almost certainly true. + */ +#if defined(PNG_READ_BIG_ENDIAN_SUPPORTED) +# if defined(PNG_pCAL_SUPPORTED) || defined(PNG_oFFs_SUPPORTED) +# define png_get_int_32(buf) ( *((png_int_32p) (buf))) +# endif +# define png_get_uint_32(buf) ( *((png_uint_32p) (buf))) +# define png_get_uint_16(buf) ( *((png_uint_16p) (buf))) +#else +# if defined(PNG_pCAL_SUPPORTED) || defined(PNG_oFFs_SUPPORTED) +PNG_EXTERN png_int_32 png_get_int_32 PNGARG((png_bytep buf)); +# endif +PNG_EXTERN png_uint_32 png_get_uint_32 PNGARG((png_bytep buf)); +PNG_EXTERN png_uint_16 png_get_uint_16 PNGARG((png_bytep buf)); +#endif /* !PNG_READ_BIG_ENDIAN_SUPPORTED */ + +/* Initialize png_ptr struct for reading, and allocate any other memory. + * (old interface - DEPRECATED - use png_create_read_struct instead). + */ +extern PNG_EXPORT(void,png_read_init) PNGARG((png_structp png_ptr)); +#undef png_read_init +#define png_read_init(png_ptr) png_read_init_3(&png_ptr, \ + PNG_LIBPNG_VER_STRING, sizeof(png_struct)); +extern PNG_EXPORT(void,png_read_init_3) PNGARG((png_structpp ptr_ptr, + png_const_charp user_png_ver, png_size_t png_struct_size)); +extern PNG_EXPORT(void,png_read_init_2) PNGARG((png_structp png_ptr, + png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t + png_info_size)); + +/* Initialize png_ptr struct for writing, and allocate any other memory. + * (old interface - DEPRECATED - use png_create_write_struct instead). + */ +extern PNG_EXPORT(void,png_write_init) PNGARG((png_structp png_ptr)); +#undef png_write_init +#define png_write_init(png_ptr) png_write_init_3(&png_ptr, \ + PNG_LIBPNG_VER_STRING, sizeof(png_struct)); +extern PNG_EXPORT(void,png_write_init_3) PNGARG((png_structpp ptr_ptr, + png_const_charp user_png_ver, png_size_t png_struct_size)); +extern PNG_EXPORT(void,png_write_init_2) PNGARG((png_structp png_ptr, + png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t + png_info_size)); + +/* Allocate memory for an internal libpng struct */ +PNG_EXTERN png_voidp png_create_struct PNGARG((int type)); + +/* Free memory from internal libpng struct */ +PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr)); + +PNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr + malloc_fn, png_voidp mem_ptr)); +PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr, + png_free_ptr free_fn, png_voidp mem_ptr)); + +/* Free any memory that info_ptr points to and reset struct. */ +PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr, + png_infop info_ptr)); + +#ifndef PNG_1_0_X +/* Function to allocate memory for zlib. */ +PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, uInt size)); + +/* Function to free memory for zlib */ +PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr)); + +/* Next four functions are used internally as callbacks. PNGAPI is required + * but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3. */ + +PNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr, + png_bytep data, png_size_t length)); + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +PNG_EXTERN void PNGAPI png_push_fill_buffer PNGARG((png_structp png_ptr, + png_bytep buffer, png_size_t length)); +#endif + +PNG_EXTERN void PNGAPI png_default_write_data PNGARG((png_structp png_ptr, + png_bytep data, png_size_t length)); + +#if defined(PNG_WRITE_FLUSH_SUPPORTED) +#if !defined(PNG_NO_STDIO) +PNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr)); +#endif +#endif +#else /* PNG_1_0_X */ +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +PNG_EXTERN void png_push_fill_buffer PNGARG((png_structp png_ptr, + png_bytep buffer, png_size_t length)); +#endif +#endif /* PNG_1_0_X */ + +/* Reset the CRC variable */ +PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr)); + +/* Write the "data" buffer to whatever output you are using. */ +PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data, + png_size_t length)); + +/* Read data from whatever input you are using into the "data" buffer */ +PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data, + png_size_t length)); + +/* Read bytes into buf, and update png_ptr->crc */ +PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf, + png_size_t length)); + +/* Decompress data in a chunk that uses compression */ +#if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \ + defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) +PNG_EXTERN png_charp png_decompress_chunk PNGARG((png_structp png_ptr, + int comp_type, png_charp chunkdata, png_size_t chunklength, + png_size_t prefix_length, png_size_t *data_length)); +#endif + +/* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */ +PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip)); + +/* Read the CRC from the file and compare it to the libpng calculated CRC */ +PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr)); + +/* Calculate the CRC over a section of data. Note that we are only + * passing a maximum of 64K on systems that have this as a memory limit, + * since this is the maximum buffer size we can specify. + */ +PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr, + png_size_t length)); + +#if defined(PNG_WRITE_FLUSH_SUPPORTED) +PNG_EXTERN void png_flush PNGARG((png_structp png_ptr)); +#endif + + +/* Place a 32-bit number into a buffer in PNG byte order (big-endian). + * The only currently known PNG chunks that use signed numbers are + * the ancillary extension chunks, oFFs and pCAL. + */ +PNG_EXTERN void png_save_uint_32 PNGARG((png_bytep buf, png_uint_32 i)); + +#if defined(PNG_WRITE_pCAL_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED) +PNG_EXTERN void png_save_int_32 PNGARG((png_bytep buf, png_int_32 i)); +#endif + +/* Place a 16-bit number into a buffer in PNG byte order. + * The parameter is declared unsigned int, not png_uint_16, + * just to avoid potential problems on pre-ANSI C compilers. + */ +PNG_EXTERN void png_save_uint_16 PNGARG((png_bytep buf, unsigned int i)); + +/* simple function to write the signature */ +PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr)); + +/* write various chunks */ + +/* Write the IHDR chunk, and update the png_struct with the necessary + * information. + */ +PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width, + png_uint_32 height, + int bit_depth, int color_type, int compression_method, int filter_method, + int interlace_method)); + +PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette, + png_uint_32 num_pal)); + +PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data, + png_size_t length)); + +PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr)); + +#if defined(PNG_WRITE_gAMA_SUPPORTED) +#ifdef PNG_FLOATING_POINT_SUPPORTED +PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma)); +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED +PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, png_fixed_point + file_gamma)); +#endif +#endif + +#if defined(PNG_WRITE_sBIT_SUPPORTED) +PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit, + int color_type)); +#endif + +#if defined(PNG_WRITE_cHRM_SUPPORTED) +#ifdef PNG_FLOATING_POINT_SUPPORTED +PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr, + double white_x, double white_y, + double red_x, double red_y, double green_x, double green_y, + double blue_x, double blue_y)); +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED +PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr, + png_fixed_point int_white_x, png_fixed_point int_white_y, + png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point + int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, + png_fixed_point int_blue_y)); +#endif +#endif + +#if defined(PNG_WRITE_sRGB_SUPPORTED) +PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr, + int intent)); +#endif + +#if defined(PNG_WRITE_iCCP_SUPPORTED) +PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr, + png_charp name, int compression_type, + png_charp profile, int proflen)); + /* Note to maintainer: profile should be png_bytep */ +#endif + +#if defined(PNG_WRITE_sPLT_SUPPORTED) +PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr, + png_sPLT_tp palette)); +#endif + +#if defined(PNG_WRITE_tRNS_SUPPORTED) +PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans, + png_color_16p values, int number, int color_type)); +#endif + +#if defined(PNG_WRITE_bKGD_SUPPORTED) +PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr, + png_color_16p values, int color_type)); +#endif + +#if defined(PNG_WRITE_hIST_SUPPORTED) +PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist, + int num_hist)); +#endif + +#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \ + defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) +PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr, + png_charp key, png_charpp new_key)); +#endif + +#if defined(PNG_WRITE_tEXt_SUPPORTED) +PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key, + png_charp text, png_size_t text_len)); +#endif + +#if defined(PNG_WRITE_zTXt_SUPPORTED) +PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key, + png_charp text, png_size_t text_len, int compression)); +#endif + +#if defined(PNG_WRITE_iTXt_SUPPORTED) +PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr, + int compression, png_charp key, png_charp lang, png_charp lang_key, + png_charp text)); +#endif + +#if defined(PNG_TEXT_SUPPORTED) /* Added at version 1.0.14 and 1.2.4 */ +PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr, + png_infop info_ptr, png_textp text_ptr, int num_text)); +#endif + +#if defined(PNG_WRITE_oFFs_SUPPORTED) +PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr, + png_int_32 x_offset, png_int_32 y_offset, int unit_type)); +#endif + +#if defined(PNG_WRITE_pCAL_SUPPORTED) +PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose, + png_int_32 X0, png_int_32 X1, int type, int nparams, + png_charp units, png_charpp params)); +#endif + +#if defined(PNG_WRITE_pHYs_SUPPORTED) +PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr, + png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, + int unit_type)); +#endif + +#if defined(PNG_WRITE_tIME_SUPPORTED) +PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr, + png_timep mod_time)); +#endif + +#if defined(PNG_WRITE_sCAL_SUPPORTED) +#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO) +PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr, + int unit, double width, double height)); +#else +#ifdef PNG_FIXED_POINT_SUPPORTED +PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr, + int unit, png_charp width, png_charp height)); +#endif +#endif +#endif + +/* Called when finished processing a row of data */ +PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr)); + +/* Internal use only. Called before first row of data */ +PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr)); + +#if defined(PNG_READ_GAMMA_SUPPORTED) +PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr)); +#endif + +/* combine a row of data, dealing with alpha, etc. if requested */ +PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row, + int mask)); + +#if defined(PNG_READ_INTERLACING_SUPPORTED) +/* expand an interlaced row */ +/* OLD pre-1.0.9 interface: +PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info, + png_bytep row, int pass, png_uint_32 transformations)); + */ +PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr)); +#endif + +/* GRR TO DO (2.0 or whenever): simplify other internal calling interfaces */ + +#if defined(PNG_WRITE_INTERLACING_SUPPORTED) +/* grab pixels out of a row for an interlaced pass */ +PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info, + png_bytep row, int pass)); +#endif + +/* unfilter a row */ +PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr, + png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter)); + +/* Choose the best filter to use and filter the row data */ +PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr, + png_row_infop row_info)); + +/* Write out the filtered row. */ +PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr, + png_bytep filtered_row)); +/* finish a row while reading, dealing with interlacing passes, etc. */ +PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr)); + +/* initialize the row buffers, etc. */ +PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr)); +/* optional call to update the users info structure */ +PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr, + png_infop info_ptr)); + +/* these are the functions that do the transformations */ +#if defined(PNG_READ_FILLER_SUPPORTED) +PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info, + png_bytep row, png_uint_32 filler, png_uint_32 flags)); +#endif + +#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) +PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) +PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) +PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) +PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#if defined(PNG_WRITE_FILLER_SUPPORTED) || \ + defined(PNG_READ_STRIP_ALPHA_SUPPORTED) +PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info, + png_bytep row, png_uint_32 flags)); +#endif + +#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row)); +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED) +PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row)); +#endif + +#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) +PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop + row_info, png_bytep row)); +#endif + +#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) +PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#if defined(PNG_READ_PACK_SUPPORTED) +PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, png_bytep row)); +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) +PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row, + png_color_8p sig_bits)); +#endif + +#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) +PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, png_bytep row)); +#endif + +#if defined(PNG_READ_16_TO_8_SUPPORTED) +PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, png_bytep row)); +#endif + +#if defined(PNG_READ_DITHER_SUPPORTED) +PNG_EXTERN void png_do_dither PNGARG((png_row_infop row_info, + png_bytep row, png_bytep palette_lookup, png_bytep dither_lookup)); + +# if defined(PNG_CORRECT_PALETTE_SUPPORTED) +PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr, + png_colorp palette, int num_palette)); +# endif +#endif + +#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) +PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, png_bytep row)); +#endif + +#if defined(PNG_WRITE_PACK_SUPPORTED) +PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info, + png_bytep row, png_uint_32 bit_depth)); +#endif + +#if defined(PNG_WRITE_SHIFT_SUPPORTED) +PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row, + png_color_8p bit_depth)); +#endif + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) +#if defined(PNG_READ_GAMMA_SUPPORTED) +PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, + png_color_16p trans_values, png_color_16p background, + png_color_16p background_1, + png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1, + png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1, + png_uint_16pp gamma_16_to_1, int gamma_shift)); +#else +PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, + png_color_16p trans_values, png_color_16p background)); +#endif +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) +PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row, + png_bytep gamma_table, png_uint_16pp gamma_16_table, + int gamma_shift)); +#endif + +#if defined(PNG_READ_EXPAND_SUPPORTED) +PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info, + png_bytep row, png_colorp palette, png_bytep trans, int num_trans)); +PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info, + png_bytep row, png_color_16p trans_value)); +#endif + +/* The following decodes the appropriate chunks, and does error correction, + * then calls the appropriate callback for the chunk if it is valid. + */ + +/* decode the IHDR chunk */ +PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); + +#if defined(PNG_READ_bKGD_SUPPORTED) +PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#if defined(PNG_READ_cHRM_SUPPORTED) +PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#if defined(PNG_READ_gAMA_SUPPORTED) +PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#if defined(PNG_READ_hIST_SUPPORTED) +PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#if defined(PNG_READ_iCCP_SUPPORTED) +extern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif /* PNG_READ_iCCP_SUPPORTED */ + +#if defined(PNG_READ_iTXt_SUPPORTED) +PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#if defined(PNG_READ_oFFs_SUPPORTED) +PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#if defined(PNG_READ_pCAL_SUPPORTED) +PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#if defined(PNG_READ_pHYs_SUPPORTED) +PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#if defined(PNG_READ_sBIT_SUPPORTED) +PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#if defined(PNG_READ_sCAL_SUPPORTED) +PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#if defined(PNG_READ_sPLT_SUPPORTED) +extern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif /* PNG_READ_sPLT_SUPPORTED */ + +#if defined(PNG_READ_sRGB_SUPPORTED) +PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#if defined(PNG_READ_tEXt_SUPPORTED) +PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#if defined(PNG_READ_tIME_SUPPORTED) +PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#if defined(PNG_READ_tRNS_SUPPORTED) +PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +#if defined(PNG_READ_zTXt_SUPPORTED) +PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr, + png_uint_32 length)); +#endif + +PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 length)); + +PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr, + png_bytep chunk_name)); + +/* handle the transformations for reading and writing */ +PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_do_write_transformations PNGARG((png_structp png_ptr)); + +PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr)); + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr, + png_infop info_ptr)); +PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr, + png_infop info_ptr)); +PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr, + png_uint_32 length)); +PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr, + png_bytep buffer, png_size_t buffer_length)); +PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr, + png_bytep buffer, png_size_t buffer_length)); +PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr)); +PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 length)); +PNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr, + png_infop info_ptr)); +PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr, + png_infop info_ptr)); +PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row)); +PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr, + png_infop info_ptr)); +PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr, + png_infop info_ptr)); +PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr)); +#if defined(PNG_READ_tEXt_SUPPORTED) +PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 length)); +PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr, + png_infop info_ptr)); +#endif +#if defined(PNG_READ_zTXt_SUPPORTED) +PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 length)); +PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr, + png_infop info_ptr)); +#endif +#if defined(PNG_READ_iTXt_SUPPORTED) +PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr, + png_infop info_ptr, png_uint_32 length)); +PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr, + png_infop info_ptr)); +#endif + +#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ + +#ifdef PNG_MNG_FEATURES_SUPPORTED +PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info, + png_bytep row)); +PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) +/* png.c */ /* PRIVATE */ +PNG_EXTERN void png_init_mmx_flags PNGARG((png_structp png_ptr)); +#endif +/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */ + +#endif /* PNG_INTERNAL */ + +#ifdef __cplusplus +} +#endif + +#endif /* PNG_VERSION_INFO_ONLY */ +/* do not put anything past this line */ +#endif /* PNG_H */ diff --git a/gtkmm-osx/libpng-1.2.5/pngasmrd.h b/gtkmm-osx/libpng-1.2.5/pngasmrd.h new file mode 100644 index 0000000..d086d8c --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/pngasmrd.h @@ -0,0 +1,11 @@ +/* pngasmrd.h - assembler version of utilities to read a PNG file + * + * libpng 1.2.5 - October 3, 2002 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 2002 Glenn Randers-Pehrson + * + */ + +/* This file is obsolete in libpng-1.0.9 and later; its contents now appear + * at the end of pngconf.h. + */ diff --git a/gtkmm-osx/libpng-1.2.5/pngbar.jpg b/gtkmm-osx/libpng-1.2.5/pngbar.jpg new file mode 100644 index 0000000000000000000000000000000000000000..70ba8d817ce433788c7933dbe3c29c3e384b2b0a GIT binary patch literal 2498 zcmb79cR1UN8veLX-}`>=f8Y0x?_}m=8Q`%n#hU_5OiaM90Zxtq1>=CgTfsNH zyhE`{nwsjeShHXcFRV>~hi`yq2v*YHBRtd~Fu*+^LY^4lCw1}#Lva_%-vvRO=aKPAMFitLB9!@Se7YxRO;(_xakVqs4H@^T1A;613B7T`LfloCM zC>s>YhTw#8BK~ij^a5~J00TIJnM42(oCyqPI(Y@00RRyA^t=CpnFWBbLcymyB_03- z0x_M|W@3T<`-BN}TAvxt!Yd50@*zZ&*pN77LnCW9lz^y8aNMcnEYqn3{J(Y(W-t^0 zvHZ$XfCC^V5CqH&h5jdw2?Phg5ME(JD6^7?wOdfuSH8H0zP}N;;+36~Ie_ET2?Phj z0ewJu_XPOzrM!FkVBFSWa?9PHSVQF9@l6YED#^WWRML1J9VDQieoKN{=G;@B(Vmqw zMZd`y)ni0|7a{dGH#QBu4Xb>^8Ml-38dtbR*{4J6CiE}A`n<^Swi_b~53dp@Oz5&x zqIb>@R2bY|^Eg5Q^oZrcolUy~e~ev4`E;SpK(~nwOpGHYx7IEN6TgtCZ%ql2@{}O= zB=jD|t!NkbZ`gujX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1,1348 @@ +/* pngconf.h - machine configurable file for libpng + * + * libpng 1.2.5 - October 3, 2002 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2002 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + */ + +/* Any machine specific code is near the front of this file, so if you + * are configuring libpng for a machine, you may want to read the section + * starting here down to where it starts to typedef png_color, png_text, + * and png_info. + */ + +#ifndef PNGCONF_H +#define PNGCONF_H + +/* This is the size of the compression buffer, and thus the size of + * an IDAT chunk. Make this whatever size you feel is best for your + * machine. One of these will be allocated per png_struct. When this + * is full, it writes the data to the disk, and does some other + * calculations. Making this an extremely small size will slow + * the library down, but you may want to experiment to determine + * where it becomes significant, if you are concerned with memory + * usage. Note that zlib allocates at least 32Kb also. For readers, + * this describes the size of the buffer available to read the data in. + * Unless this gets smaller than the size of a row (compressed), + * it should not make much difference how big this is. + */ + +#ifndef PNG_ZBUF_SIZE +# define PNG_ZBUF_SIZE 8192 +#endif + +/* Enable if you want a write-only libpng */ + +#ifndef PNG_NO_READ_SUPPORTED +# define PNG_READ_SUPPORTED +#endif + +/* Enable if you want a read-only libpng */ + +#ifndef PNG_NO_WRITE_SUPPORTED +# define PNG_WRITE_SUPPORTED +#endif + +/* Enabled by default in 1.2.0. You can disable this if you don't need to + support PNGs that are embedded in MNG datastreams */ +#if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES) +# ifndef PNG_MNG_FEATURES_SUPPORTED +# define PNG_MNG_FEATURES_SUPPORTED +# endif +#endif + +#ifndef PNG_NO_FLOATING_POINT_SUPPORTED +# ifndef PNG_FLOATING_POINT_SUPPORTED +# define PNG_FLOATING_POINT_SUPPORTED +# endif +#endif + +/* If you are running on a machine where you cannot allocate more + * than 64K of memory at once, uncomment this. While libpng will not + * normally need that much memory in a chunk (unless you load up a very + * large file), zlib needs to know how big of a chunk it can use, and + * libpng thus makes sure to check any memory allocation to verify it + * will fit into memory. +#define PNG_MAX_MALLOC_64K + */ +#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K) +# define PNG_MAX_MALLOC_64K +#endif + +/* Special munging to support doing things the 'cygwin' way: + * 'Normal' png-on-win32 defines/defaults: + * PNG_BUILD_DLL -- building dll + * PNG_USE_DLL -- building an application, linking to dll + * (no define) -- building static library, or building an + * application and linking to the static lib + * 'Cygwin' defines/defaults: + * PNG_BUILD_DLL -- (ignored) building the dll + * (no define) -- (ignored) building an application, linking to the dll + * PNG_STATIC -- (ignored) building the static lib, or building an + * application that links to the static lib. + * ALL_STATIC -- (ignored) building various static libs, or building an + * application that links to the static libs. + * Thus, + * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and + * this bit of #ifdefs will define the 'correct' config variables based on + * that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but + * unnecessary. + * + * Also, the precedence order is: + * ALL_STATIC (since we can't #undef something outside our namespace) + * PNG_BUILD_DLL + * PNG_STATIC + * (nothing) == PNG_USE_DLL + * + * CYGWIN (2002-01-20): The preceding is now obsolete. With the advent + * of auto-import in binutils, we no longer need to worry about + * __declspec(dllexport) / __declspec(dllimport) and friends. Therefore, + * we don't need to worry about PNG_STATIC or ALL_STATIC when it comes + * to __declspec() stuff. However, we DO need to worry about + * PNG_BUILD_DLL and PNG_STATIC because those change some defaults + * such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed. + */ +#if defined(__CYGWIN__) +# if defined(ALL_STATIC) +# if defined(PNG_BUILD_DLL) +# undef PNG_BUILD_DLL +# endif +# if defined(PNG_USE_DLL) +# undef PNG_USE_DLL +# endif +# if defined(PNG_DLL) +# undef PNG_DLL +# endif +# if !defined(PNG_STATIC) +# define PNG_STATIC +# endif +# else +# if defined (PNG_BUILD_DLL) +# if defined(PNG_STATIC) +# undef PNG_STATIC +# endif +# if defined(PNG_USE_DLL) +# undef PNG_USE_DLL +# endif +# if !defined(PNG_DLL) +# define PNG_DLL +# endif +# else +# if defined(PNG_STATIC) +# if defined(PNG_USE_DLL) +# undef PNG_USE_DLL +# endif +# if defined(PNG_DLL) +# undef PNG_DLL +# endif +# else +# if !defined(PNG_USE_DLL) +# define PNG_USE_DLL +# endif +# if !defined(PNG_DLL) +# define PNG_DLL +# endif +# endif +# endif +# endif +#endif + +/* This protects us against compilers that run on a windowing system + * and thus don't have or would rather us not use the stdio types: + * stdin, stdout, and stderr. The only one currently used is stderr + * in png_error() and png_warning(). #defining PNG_NO_CONSOLE_IO will + * prevent these from being compiled and used. #defining PNG_NO_STDIO + * will also prevent these, plus will prevent the entire set of stdio + * macros and functions (FILE *, printf, etc.) from being compiled and used, + * unless (PNG_DEBUG > 0) has been #defined. + * + * #define PNG_NO_CONSOLE_IO + * #define PNG_NO_STDIO + */ + +#if defined(_WIN32_WCE) +# include + /* Console I/O functions are not supported on WindowsCE */ +# define PNG_NO_CONSOLE_IO +# ifdef PNG_DEBUG +# undef PNG_DEBUG +# endif +#endif + +#ifdef PNG_BUILD_DLL +# ifndef PNG_CONSOLE_IO_SUPPORTED +# ifndef PNG_NO_CONSOLE_IO +# define PNG_NO_CONSOLE_IO +# endif +# endif +#endif + +# ifdef PNG_NO_STDIO +# ifndef PNG_NO_CONSOLE_IO +# define PNG_NO_CONSOLE_IO +# endif +# ifdef PNG_DEBUG +# if (PNG_DEBUG > 0) +# include +# endif +# endif +# else +# if !defined(_WIN32_WCE) +/* "stdio.h" functions are not supported on WindowsCE */ +# include +# endif +# endif + +/* This macro protects us against machines that don't have function + * prototypes (ie K&R style headers). If your compiler does not handle + * function prototypes, define this macro and use the included ansi2knr. + * I've always been able to use _NO_PROTO as the indicator, but you may + * need to drag the empty declaration out in front of here, or change the + * ifdef to suit your own needs. + */ +#ifndef PNGARG + +#ifdef OF /* zlib prototype munger */ +# define PNGARG(arglist) OF(arglist) +#else + +#ifdef _NO_PROTO +# define PNGARG(arglist) () +# ifndef PNG_TYPECAST_NULL +# define PNG_TYPECAST_NULL +# endif +#else +# define PNGARG(arglist) arglist +#endif /* _NO_PROTO */ + +#endif /* OF */ + +#endif /* PNGARG */ + +/* Try to determine if we are compiling on a Mac. Note that testing for + * just __MWERKS__ is not good enough, because the Codewarrior is now used + * on non-Mac platforms. + */ +#ifndef MACOS +# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \ + defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC) +# define MACOS +# endif +#endif + +/* enough people need this for various reasons to include it here */ +#if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE) +# include +#endif + +#if !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED) +# define PNG_SETJMP_SUPPORTED +#endif + +#ifdef PNG_SETJMP_SUPPORTED +/* This is an attempt to force a single setjmp behaviour on Linux. If + * the X config stuff didn't define _BSD_SOURCE we wouldn't need this. + */ + +# ifdef __linux__ +# ifdef _BSD_SOURCE +# define PNG_SAVE_BSD_SOURCE +# undef _BSD_SOURCE +# endif +# ifdef _SETJMP_H + __png.h__ already includes setjmp.h; + __dont__ include it again.; +# endif +# endif /* __linux__ */ + + /* include setjmp.h for error handling */ +# include + +# ifdef __linux__ +# ifdef PNG_SAVE_BSD_SOURCE +# define _BSD_SOURCE +# undef PNG_SAVE_BSD_SOURCE +# endif +# endif /* __linux__ */ +#endif /* PNG_SETJMP_SUPPORTED */ + +#ifdef BSD +# include +#else +# include +#endif + +/* Other defines for things like memory and the like can go here. */ +#ifdef PNG_INTERNAL + +#include + +/* The functions exported by PNG_EXTERN are PNG_INTERNAL functions, which + * aren't usually used outside the library (as far as I know), so it is + * debatable if they should be exported at all. In the future, when it is + * possible to have run-time registry of chunk-handling functions, some of + * these will be made available again. +#define PNG_EXTERN extern + */ +#define PNG_EXTERN + +/* Other defines specific to compilers can go here. Try to keep + * them inside an appropriate ifdef/endif pair for portability. + */ + +#if defined(PNG_FLOATING_POINT_SUPPORTED) +# if defined(MACOS) + /* We need to check that hasn't already been included earlier + * as it seems it doesn't agree with , yet we should really use + * if possible. + */ +# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__) +# include +# endif +# else +# include +# endif +# if defined(_AMIGA) && defined(__SASC) && defined(_M68881) + /* Amiga SAS/C: We must include builtin FPU functions when compiling using + * MATH=68881 + */ +# include +# endif +#endif + +/* Codewarrior on NT has linking problems without this. */ +#if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__) +# define PNG_ALWAYS_EXTERN +#endif + +/* For some reason, Borland C++ defines memcmp, etc. in mem.h, not + * stdlib.h like it should (I think). Or perhaps this is a C++ + * "feature"? + */ +#ifdef __TURBOC__ +# include +# include "alloc.h" +#endif + +#if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \ + defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__)) +# include +#endif + +/* This controls how fine the dithering gets. As this allocates + * a largish chunk of memory (32K), those who are not as concerned + * with dithering quality can decrease some or all of these. + */ +#ifndef PNG_DITHER_RED_BITS +# define PNG_DITHER_RED_BITS 5 +#endif +#ifndef PNG_DITHER_GREEN_BITS +# define PNG_DITHER_GREEN_BITS 5 +#endif +#ifndef PNG_DITHER_BLUE_BITS +# define PNG_DITHER_BLUE_BITS 5 +#endif + +/* This controls how fine the gamma correction becomes when you + * are only interested in 8 bits anyway. Increasing this value + * results in more memory being used, and more pow() functions + * being called to fill in the gamma tables. Don't set this value + * less then 8, and even that may not work (I haven't tested it). + */ + +#ifndef PNG_MAX_GAMMA_8 +# define PNG_MAX_GAMMA_8 11 +#endif + +/* This controls how much a difference in gamma we can tolerate before + * we actually start doing gamma conversion. + */ +#ifndef PNG_GAMMA_THRESHOLD +# define PNG_GAMMA_THRESHOLD 0.05 +#endif + +#endif /* PNG_INTERNAL */ + +/* The following uses const char * instead of char * for error + * and warning message functions, so some compilers won't complain. + * If you do not want to use const, define PNG_NO_CONST here. + */ + +#ifndef PNG_NO_CONST +# define PNG_CONST const +#else +# define PNG_CONST +#endif + +/* The following defines give you the ability to remove code from the + * library that you will not be using. I wish I could figure out how to + * automate this, but I can't do that without making it seriously hard + * on the users. So if you are not using an ability, change the #define + * to and #undef, and that part of the library will not be compiled. If + * your linker can't find a function, you may want to make sure the + * ability is defined here. Some of these depend upon some others being + * defined. I haven't figured out all the interactions here, so you may + * have to experiment awhile to get everything to compile. If you are + * creating or using a shared library, you probably shouldn't touch this, + * as it will affect the size of the structures, and this will cause bad + * things to happen if the library and/or application ever change. + */ + +/* Any features you will not be using can be undef'ed here */ + +/* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user + * to turn it off with "*TRANSFORMS_NOT_SUPPORTED" or *PNG_NO_*_TRANSFORMS + * on the compile line, then pick and choose which ones to define without + * having to edit this file. It is safe to use the *TRANSFORMS_NOT_SUPPORTED + * if you only want to have a png-compliant reader/writer but don't need + * any of the extra transformations. This saves about 80 kbytes in a + * typical installation of the library. (PNG_NO_* form added in version + * 1.0.1c, for consistency) + */ + +/* The size of the png_text structure changed in libpng-1.0.6 when + * iTXt is supported. It is turned off by default, to support old apps + * that malloc the png_text structure instead of calling png_set_text() + * and letting libpng malloc it. It will be turned on by default in + * libpng-1.3.0. + */ + +#ifndef PNG_iTXt_SUPPORTED +# if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt) +# define PNG_NO_READ_iTXt +# endif +# if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt) +# define PNG_NO_WRITE_iTXt +# endif +#endif + +/* The following support, added after version 1.0.0, can be turned off here en + * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility + * with old applications that require the length of png_struct and png_info + * to remain unchanged. + */ + +#ifdef PNG_LEGACY_SUPPORTED +# define PNG_NO_FREE_ME +# define PNG_NO_READ_UNKNOWN_CHUNKS +# define PNG_NO_WRITE_UNKNOWN_CHUNKS +# define PNG_NO_READ_USER_CHUNKS +# define PNG_NO_READ_iCCP +# define PNG_NO_WRITE_iCCP +# define PNG_NO_READ_iTXt +# define PNG_NO_WRITE_iTXt +# define PNG_NO_READ_sCAL +# define PNG_NO_WRITE_sCAL +# define PNG_NO_READ_sPLT +# define PNG_NO_WRITE_sPLT +# define PNG_NO_INFO_IMAGE +# define PNG_NO_READ_RGB_TO_GRAY +# define PNG_NO_READ_USER_TRANSFORM +# define PNG_NO_WRITE_USER_TRANSFORM +# define PNG_NO_USER_MEM +# define PNG_NO_READ_EMPTY_PLTE +# define PNG_NO_MNG_FEATURES +# define PNG_NO_FIXED_POINT_SUPPORTED +#endif + +/* Ignore attempt to turn off both floating and fixed point support */ +#if !defined(PNG_FLOATING_POINT_SUPPORTED) || \ + !defined(PNG_NO_FIXED_POINT_SUPPORTED) +# define PNG_FIXED_POINT_SUPPORTED +#endif + +#ifndef PNG_NO_FREE_ME +# define PNG_FREE_ME_SUPPORTED +#endif + +#if defined(PNG_READ_SUPPORTED) + +#if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \ + !defined(PNG_NO_READ_TRANSFORMS) +# define PNG_READ_TRANSFORMS_SUPPORTED +#endif + +#ifdef PNG_READ_TRANSFORMS_SUPPORTED +# ifndef PNG_NO_READ_EXPAND +# define PNG_READ_EXPAND_SUPPORTED +# endif +# ifndef PNG_NO_READ_SHIFT +# define PNG_READ_SHIFT_SUPPORTED +# endif +# ifndef PNG_NO_READ_PACK +# define PNG_READ_PACK_SUPPORTED +# endif +# ifndef PNG_NO_READ_BGR +# define PNG_READ_BGR_SUPPORTED +# endif +# ifndef PNG_NO_READ_SWAP +# define PNG_READ_SWAP_SUPPORTED +# endif +# ifndef PNG_NO_READ_PACKSWAP +# define PNG_READ_PACKSWAP_SUPPORTED +# endif +# ifndef PNG_NO_READ_INVERT +# define PNG_READ_INVERT_SUPPORTED +# endif +# ifndef PNG_NO_READ_DITHER +# define PNG_READ_DITHER_SUPPORTED +# endif +# ifndef PNG_NO_READ_BACKGROUND +# define PNG_READ_BACKGROUND_SUPPORTED +# endif +# ifndef PNG_NO_READ_16_TO_8 +# define PNG_READ_16_TO_8_SUPPORTED +# endif +# ifndef PNG_NO_READ_FILLER +# define PNG_READ_FILLER_SUPPORTED +# endif +# ifndef PNG_NO_READ_GAMMA +# define PNG_READ_GAMMA_SUPPORTED +# endif +# ifndef PNG_NO_READ_GRAY_TO_RGB +# define PNG_READ_GRAY_TO_RGB_SUPPORTED +# endif +# ifndef PNG_NO_READ_SWAP_ALPHA +# define PNG_READ_SWAP_ALPHA_SUPPORTED +# endif +# ifndef PNG_NO_READ_INVERT_ALPHA +# define PNG_READ_INVERT_ALPHA_SUPPORTED +# endif +# ifndef PNG_NO_READ_STRIP_ALPHA +# define PNG_READ_STRIP_ALPHA_SUPPORTED +# endif +# ifndef PNG_NO_READ_USER_TRANSFORM +# define PNG_READ_USER_TRANSFORM_SUPPORTED +# endif +# ifndef PNG_NO_READ_RGB_TO_GRAY +# define PNG_READ_RGB_TO_GRAY_SUPPORTED +# endif +#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ + +#if !defined(PNG_NO_PROGRESSIVE_READ) && \ + !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED) /* if you don't do progressive */ +# define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */ +#endif /* about interlacing capability! You'll */ + /* still have interlacing unless you change the following line: */ + +#define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */ + +#ifndef PNG_NO_READ_COMPOSITE_NODIV +# ifndef PNG_NO_READ_COMPOSITED_NODIV /* libpng-1.0.x misspelling */ +# define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */ +# endif +#endif + +/* Deprecated, will be removed from version 2.0.0. + Use PNG_MNG_FEATURES_SUPPORTED instead. */ +#ifndef PNG_NO_READ_EMPTY_PLTE +# define PNG_READ_EMPTY_PLTE_SUPPORTED +#endif + +#endif /* PNG_READ_SUPPORTED */ + +#if defined(PNG_WRITE_SUPPORTED) + +# if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \ + !defined(PNG_NO_WRITE_TRANSFORMS) +# define PNG_WRITE_TRANSFORMS_SUPPORTED +#endif + +#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED +# ifndef PNG_NO_WRITE_SHIFT +# define PNG_WRITE_SHIFT_SUPPORTED +# endif +# ifndef PNG_NO_WRITE_PACK +# define PNG_WRITE_PACK_SUPPORTED +# endif +# ifndef PNG_NO_WRITE_BGR +# define PNG_WRITE_BGR_SUPPORTED +# endif +# ifndef PNG_NO_WRITE_SWAP +# define PNG_WRITE_SWAP_SUPPORTED +# endif +# ifndef PNG_NO_WRITE_PACKSWAP +# define PNG_WRITE_PACKSWAP_SUPPORTED +# endif +# ifndef PNG_NO_WRITE_INVERT +# define PNG_WRITE_INVERT_SUPPORTED +# endif +# ifndef PNG_NO_WRITE_FILLER +# define PNG_WRITE_FILLER_SUPPORTED /* same as WRITE_STRIP_ALPHA */ +# endif +# ifndef PNG_NO_WRITE_SWAP_ALPHA +# define PNG_WRITE_SWAP_ALPHA_SUPPORTED +# endif +# ifndef PNG_NO_WRITE_INVERT_ALPHA +# define PNG_WRITE_INVERT_ALPHA_SUPPORTED +# endif +# ifndef PNG_NO_WRITE_USER_TRANSFORM +# define PNG_WRITE_USER_TRANSFORM_SUPPORTED +# endif +#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */ + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +# ifndef PNG_NO_USER_TRANSFORM_PTR +# define PNG_USER_TRANSFORM_PTR_SUPPORTED +# endif +#endif + +#define PNG_WRITE_INTERLACING_SUPPORTED /* not required for PNG-compliant + encoders, but can cause trouble + if left undefined */ + +#if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \ + defined(PNG_FLOATING_POINT_SUPPORTED) +# define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED +#endif + +#ifndef PNG_1_0_X +#ifndef PNG_NO_ERROR_NUMBERS +#define PNG_ERROR_NUMBERS_SUPPORTED +#endif +#endif /* PNG_1_0_X */ + +#ifndef PNG_NO_WRITE_FLUSH +# define PNG_WRITE_FLUSH_SUPPORTED +#endif + +/* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */ +#ifndef PNG_NO_WRITE_EMPTY_PLTE +# define PNG_WRITE_EMPTY_PLTE_SUPPORTED +#endif + +#endif /* PNG_WRITE_SUPPORTED */ + +#ifndef PNG_NO_STDIO +# define PNG_TIME_RFC1123_SUPPORTED +#endif + +/* This adds extra functions in pngget.c for accessing data from the + * info pointer (added in version 0.99) + * png_get_image_width() + * png_get_image_height() + * png_get_bit_depth() + * png_get_color_type() + * png_get_compression_type() + * png_get_filter_type() + * png_get_interlace_type() + * png_get_pixel_aspect_ratio() + * png_get_pixels_per_meter() + * png_get_x_offset_pixels() + * png_get_y_offset_pixels() + * png_get_x_offset_microns() + * png_get_y_offset_microns() + */ +#if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED) +# define PNG_EASY_ACCESS_SUPPORTED +#endif + +/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0 + even when PNG_USE_PNGVCRD or PNG_USE_PNGGCCRD is not defined */ +#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE) +# ifndef PNG_ASSEMBLER_CODE_SUPPORTED +# define PNG_ASSEMBLER_CODE_SUPPORTED +# endif +# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) +# define PNG_MMX_CODE_SUPPORTED +# endif +#endif + +/* If you are sure that you don't need thread safety and you are compiling + with PNG_USE_PNGCCRD for an MMX application, you can define this for + faster execution. See pnggccrd.c. +#define PNG_THREAD_UNSAFE_OK +*/ + +#if !defined(PNG_1_0_X) +#if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED) +# define PNG_USER_MEM_SUPPORTED +#endif +#endif /* PNG_1_0_X */ + +/* These are currently experimental features, define them if you want */ + +/* very little testing */ +/* +#ifdef PNG_READ_SUPPORTED +# ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED +# define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED +# endif +#endif +*/ + +/* This is only for PowerPC big-endian and 680x0 systems */ +/* some testing */ +/* +#ifdef PNG_READ_SUPPORTED +# ifndef PNG_PNG_READ_BIG_ENDIAN_SUPPORTED +# define PNG_READ_BIG_ENDIAN_SUPPORTED +# endif +#endif +*/ + +/* Buggy compilers (e.g., gcc 2.7.2.2) need this */ +/* +#define PNG_NO_POINTER_INDEXING +*/ + +/* These functions are turned off by default, as they will be phased out. */ +/* +#define PNG_USELESS_TESTS_SUPPORTED +#define PNG_CORRECT_PALETTE_SUPPORTED +*/ + +/* Any chunks you are not interested in, you can undef here. The + * ones that allocate memory may be expecially important (hIST, + * tEXt, zTXt, tRNS, pCAL). Others will just save time and make png_info + * a bit smaller. + */ + +#if defined(PNG_READ_SUPPORTED) && \ + !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \ + !defined(PNG_NO_READ_ANCILLARY_CHUNKS) +# define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED +#endif + +#if defined(PNG_WRITE_SUPPORTED) && \ + !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \ + !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS) +# define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED +#endif + +#ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED + +#ifdef PNG_NO_READ_TEXT +# define PNG_NO_READ_iTXt +# define PNG_NO_READ_tEXt +# define PNG_NO_READ_zTXt +#endif +#ifndef PNG_NO_READ_bKGD +# define PNG_READ_bKGD_SUPPORTED +# define PNG_bKGD_SUPPORTED +#endif +#ifndef PNG_NO_READ_cHRM +# define PNG_READ_cHRM_SUPPORTED +# define PNG_cHRM_SUPPORTED +#endif +#ifndef PNG_NO_READ_gAMA +# define PNG_READ_gAMA_SUPPORTED +# define PNG_gAMA_SUPPORTED +#endif +#ifndef PNG_NO_READ_hIST +# define PNG_READ_hIST_SUPPORTED +# define PNG_hIST_SUPPORTED +#endif +#ifndef PNG_NO_READ_iCCP +# define PNG_READ_iCCP_SUPPORTED +# define PNG_iCCP_SUPPORTED +#endif +#ifndef PNG_NO_READ_iTXt +# ifndef PNG_READ_iTXt_SUPPORTED +# define PNG_READ_iTXt_SUPPORTED +# endif +# ifndef PNG_iTXt_SUPPORTED +# define PNG_iTXt_SUPPORTED +# endif +#endif +#ifndef PNG_NO_READ_oFFs +# define PNG_READ_oFFs_SUPPORTED +# define PNG_oFFs_SUPPORTED +#endif +#ifndef PNG_NO_READ_pCAL +# define PNG_READ_pCAL_SUPPORTED +# define PNG_pCAL_SUPPORTED +#endif +#ifndef PNG_NO_READ_sCAL +# define PNG_READ_sCAL_SUPPORTED +# define PNG_sCAL_SUPPORTED +#endif +#ifndef PNG_NO_READ_pHYs +# define PNG_READ_pHYs_SUPPORTED +# define PNG_pHYs_SUPPORTED +#endif +#ifndef PNG_NO_READ_sBIT +# define PNG_READ_sBIT_SUPPORTED +# define PNG_sBIT_SUPPORTED +#endif +#ifndef PNG_NO_READ_sPLT +# define PNG_READ_sPLT_SUPPORTED +# define PNG_sPLT_SUPPORTED +#endif +#ifndef PNG_NO_READ_sRGB +# define PNG_READ_sRGB_SUPPORTED +# define PNG_sRGB_SUPPORTED +#endif +#ifndef PNG_NO_READ_tEXt +# define PNG_READ_tEXt_SUPPORTED +# define PNG_tEXt_SUPPORTED +#endif +#ifndef PNG_NO_READ_tIME +# define PNG_READ_tIME_SUPPORTED +# define PNG_tIME_SUPPORTED +#endif +#ifndef PNG_NO_READ_tRNS +# define PNG_READ_tRNS_SUPPORTED +# define PNG_tRNS_SUPPORTED +#endif +#ifndef PNG_NO_READ_zTXt +# define PNG_READ_zTXt_SUPPORTED +# define PNG_zTXt_SUPPORTED +#endif +#ifndef PNG_NO_READ_UNKNOWN_CHUNKS +# define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +# ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED +# define PNG_UNKNOWN_CHUNKS_SUPPORTED +# endif +# ifndef PNG_NO_HANDLE_AS_UNKNOWN +# define PNG_HANDLE_AS_UNKNOWN_SUPPORTED +# endif +#endif +#if !defined(PNG_NO_READ_USER_CHUNKS) && \ + defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) +# define PNG_READ_USER_CHUNKS_SUPPORTED +# define PNG_USER_CHUNKS_SUPPORTED +# ifdef PNG_NO_READ_UNKNOWN_CHUNKS +# undef PNG_NO_READ_UNKNOWN_CHUNKS +# endif +# ifdef PNG_NO_HANDLE_AS_UNKNOWN +# undef PNG_NO_HANDLE_AS_UNKNOWN +# endif +#endif +#ifndef PNG_NO_READ_OPT_PLTE +# define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */ +#endif /* optional PLTE chunk in RGB and RGBA images */ +#if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \ + defined(PNG_READ_zTXt_SUPPORTED) +# define PNG_READ_TEXT_SUPPORTED +# define PNG_TEXT_SUPPORTED +#endif + +#endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */ + +#ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED + +#ifdef PNG_NO_WRITE_TEXT +# define PNG_NO_WRITE_iTXt +# define PNG_NO_WRITE_tEXt +# define PNG_NO_WRITE_zTXt +#endif +#ifndef PNG_NO_WRITE_bKGD +# define PNG_WRITE_bKGD_SUPPORTED +# ifndef PNG_bKGD_SUPPORTED +# define PNG_bKGD_SUPPORTED +# endif +#endif +#ifndef PNG_NO_WRITE_cHRM +# define PNG_WRITE_cHRM_SUPPORTED +# ifndef PNG_cHRM_SUPPORTED +# define PNG_cHRM_SUPPORTED +# endif +#endif +#ifndef PNG_NO_WRITE_gAMA +# define PNG_WRITE_gAMA_SUPPORTED +# ifndef PNG_gAMA_SUPPORTED +# define PNG_gAMA_SUPPORTED +# endif +#endif +#ifndef PNG_NO_WRITE_hIST +# define PNG_WRITE_hIST_SUPPORTED +# ifndef PNG_hIST_SUPPORTED +# define PNG_hIST_SUPPORTED +# endif +#endif +#ifndef PNG_NO_WRITE_iCCP +# define PNG_WRITE_iCCP_SUPPORTED +# ifndef PNG_iCCP_SUPPORTED +# define PNG_iCCP_SUPPORTED +# endif +#endif +#ifndef PNG_NO_WRITE_iTXt +# ifndef PNG_WRITE_iTXt_SUPPORTED +# define PNG_WRITE_iTXt_SUPPORTED +# endif +# ifndef PNG_iTXt_SUPPORTED +# define PNG_iTXt_SUPPORTED +# endif +#endif +#ifndef PNG_NO_WRITE_oFFs +# define PNG_WRITE_oFFs_SUPPORTED +# ifndef PNG_oFFs_SUPPORTED +# define PNG_oFFs_SUPPORTED +# endif +#endif +#ifndef PNG_NO_WRITE_pCAL +# define PNG_WRITE_pCAL_SUPPORTED +# ifndef PNG_pCAL_SUPPORTED +# define PNG_pCAL_SUPPORTED +# endif +#endif +#ifndef PNG_NO_WRITE_sCAL +# define PNG_WRITE_sCAL_SUPPORTED +# ifndef PNG_sCAL_SUPPORTED +# define PNG_sCAL_SUPPORTED +# endif +#endif +#ifndef PNG_NO_WRITE_pHYs +# define PNG_WRITE_pHYs_SUPPORTED +# ifndef PNG_pHYs_SUPPORTED +# define PNG_pHYs_SUPPORTED +# endif +#endif +#ifndef PNG_NO_WRITE_sBIT +# define PNG_WRITE_sBIT_SUPPORTED +# ifndef PNG_sBIT_SUPPORTED +# define PNG_sBIT_SUPPORTED +# endif +#endif +#ifndef PNG_NO_WRITE_sPLT +# define PNG_WRITE_sPLT_SUPPORTED +# ifndef PNG_sPLT_SUPPORTED +# define PNG_sPLT_SUPPORTED +# endif +#endif +#ifndef PNG_NO_WRITE_sRGB +# define PNG_WRITE_sRGB_SUPPORTED +# ifndef PNG_sRGB_SUPPORTED +# define PNG_sRGB_SUPPORTED +# endif +#endif +#ifndef PNG_NO_WRITE_tEXt +# define PNG_WRITE_tEXt_SUPPORTED +# ifndef PNG_tEXt_SUPPORTED +# define PNG_tEXt_SUPPORTED +# endif +#endif +#ifndef PNG_NO_WRITE_tIME +# define PNG_WRITE_tIME_SUPPORTED +# ifndef PNG_tIME_SUPPORTED +# define PNG_tIME_SUPPORTED +# endif +#endif +#ifndef PNG_NO_WRITE_tRNS +# define PNG_WRITE_tRNS_SUPPORTED +# ifndef PNG_tRNS_SUPPORTED +# define PNG_tRNS_SUPPORTED +# endif +#endif +#ifndef PNG_NO_WRITE_zTXt +# define PNG_WRITE_zTXt_SUPPORTED +# ifndef PNG_zTXt_SUPPORTED +# define PNG_zTXt_SUPPORTED +# endif +#endif +#ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS +# define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED +# ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED +# define PNG_UNKNOWN_CHUNKS_SUPPORTED +# endif +# ifndef PNG_NO_HANDLE_AS_UNKNOWN +# ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED +# define PNG_HANDLE_AS_UNKNOWN_SUPPORTED +# endif +# endif +#endif +#if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \ + defined(PNG_WRITE_zTXt_SUPPORTED) +# define PNG_WRITE_TEXT_SUPPORTED +# ifndef PNG_TEXT_SUPPORTED +# define PNG_TEXT_SUPPORTED +# endif +#endif + +#endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */ + +/* Turn this off to disable png_read_png() and + * png_write_png() and leave the row_pointers member + * out of the info structure. + */ +#ifndef PNG_NO_INFO_IMAGE +# define PNG_INFO_IMAGE_SUPPORTED +#endif + +/* need the time information for reading tIME chunks */ +#if defined(PNG_tIME_SUPPORTED) +# if !defined(_WIN32_WCE) + /* "time.h" functions are not supported on WindowsCE */ +# include +# endif +#endif + +/* Some typedefs to get us started. These should be safe on most of the + * common platforms. The typedefs should be at least as large as the + * numbers suggest (a png_uint_32 must be at least 32 bits long), but they + * don't have to be exactly that size. Some compilers dislike passing + * unsigned shorts as function parameters, so you may be better off using + * unsigned int for png_uint_16. Likewise, for 64-bit systems, you may + * want to have unsigned int for png_uint_32 instead of unsigned long. + */ + +typedef unsigned long png_uint_32; +typedef long png_int_32; +typedef unsigned short png_uint_16; +typedef short png_int_16; +typedef unsigned char png_byte; + +/* This is usually size_t. It is typedef'ed just in case you need it to + change (I'm not sure if you will or not, so I thought I'd be safe) */ +typedef size_t png_size_t; + +/* The following is needed for medium model support. It cannot be in the + * PNG_INTERNAL section. Needs modification for other compilers besides + * MSC. Model independent support declares all arrays and pointers to be + * large using the far keyword. The zlib version used must also support + * model independent data. As of version zlib 1.0.4, the necessary changes + * have been made in zlib. The USE_FAR_KEYWORD define triggers other + * changes that are needed. (Tim Wegner) + */ + +/* Separate compiler dependencies (problem here is that zlib.h always + defines FAR. (SJT) */ +#ifdef __BORLANDC__ +# if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__) +# define LDATA 1 +# else +# define LDATA 0 +# endif + /* GRR: why is Cygwin in here? Cygwin is not Borland C... */ +# if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__) +# define PNG_MAX_MALLOC_64K +# if (LDATA != 1) +# ifndef FAR +# define FAR __far +# endif +# define USE_FAR_KEYWORD +# endif /* LDATA != 1 */ + /* Possibly useful for moving data out of default segment. + * Uncomment it if you want. Could also define FARDATA as + * const if your compiler supports it. (SJT) +# define FARDATA FAR + */ +# endif /* __WIN32__, __FLAT__, __CYGWIN__ */ +#endif /* __BORLANDC__ */ + + +/* Suggest testing for specific compiler first before testing for + * FAR. The Watcom compiler defines both __MEDIUM__ and M_I86MM, + * making reliance oncertain keywords suspect. (SJT) + */ + +/* MSC Medium model */ +#if defined(FAR) +# if defined(M_I86MM) +# define USE_FAR_KEYWORD +# define FARDATA FAR +# include +# endif +#endif + +/* SJT: default case */ +#ifndef FAR +# define FAR +#endif + +/* At this point FAR is always defined */ +#ifndef FARDATA +# define FARDATA +#endif + +/* Typedef for floating-point numbers that are converted + to fixed-point with a multiple of 100,000, e.g., int_gamma */ +typedef png_int_32 png_fixed_point; + +/* Add typedefs for pointers */ +typedef void FAR * png_voidp; +typedef png_byte FAR * png_bytep; +typedef png_uint_32 FAR * png_uint_32p; +typedef png_int_32 FAR * png_int_32p; +typedef png_uint_16 FAR * png_uint_16p; +typedef png_int_16 FAR * png_int_16p; +typedef PNG_CONST char FAR * png_const_charp; +typedef char FAR * png_charp; +typedef png_fixed_point FAR * png_fixed_point_p; + +#ifndef PNG_NO_STDIO +#if defined(_WIN32_WCE) +typedef HANDLE png_FILE_p; +#else +typedef FILE * png_FILE_p; +#endif +#endif + +#ifdef PNG_FLOATING_POINT_SUPPORTED +typedef double FAR * png_doublep; +#endif + +/* Pointers to pointers; i.e. arrays */ +typedef png_byte FAR * FAR * png_bytepp; +typedef png_uint_32 FAR * FAR * png_uint_32pp; +typedef png_int_32 FAR * FAR * png_int_32pp; +typedef png_uint_16 FAR * FAR * png_uint_16pp; +typedef png_int_16 FAR * FAR * png_int_16pp; +typedef PNG_CONST char FAR * FAR * png_const_charpp; +typedef char FAR * FAR * png_charpp; +typedef png_fixed_point FAR * FAR * png_fixed_point_pp; +#ifdef PNG_FLOATING_POINT_SUPPORTED +typedef double FAR * FAR * png_doublepp; +#endif + +/* Pointers to pointers to pointers; i.e., pointer to array */ +typedef char FAR * FAR * FAR * png_charppp; + +/* libpng typedefs for types in zlib. If zlib changes + * or another compression library is used, then change these. + * Eliminates need to change all the source files. + */ +typedef charf * png_zcharp; +typedef charf * FAR * png_zcharpp; +typedef z_stream FAR * png_zstreamp; + +/* + * Define PNG_BUILD_DLL if the module being built is a Windows + * LIBPNG DLL. + * + * Define PNG_USE_DLL if you want to *link* to the Windows LIBPNG DLL. + * It is equivalent to Microsoft predefined macro _DLL that is + * automatically defined when you compile using the share + * version of the CRT (C Run-Time library) + * + * The cygwin mods make this behavior a little different: + * Define PNG_BUILD_DLL if you are building a dll for use with cygwin + * Define PNG_STATIC if you are building a static library for use with cygwin, + * -or- if you are building an application that you want to link to the + * static library. + * PNG_USE_DLL is defined by default (no user action needed) unless one of + * the other flags is defined. + */ + +#if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL)) +# define PNG_DLL +#endif +/* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib. + * When building a static lib, default to no GLOBAL ARRAYS, but allow + * command-line override + */ +#if defined(__CYGWIN__) +# if !defined(PNG_STATIC) +# if defined(PNG_USE_GLOBAL_ARRAYS) +# undef PNG_USE_GLOBAL_ARRAYS +# endif +# if !defined(PNG_USE_LOCAL_ARRAYS) +# define PNG_USE_LOCAL_ARRAYS +# endif +# else +# if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS) +# if defined(PNG_USE_GLOBAL_ARRAYS) +# undef PNG_USE_GLOBAL_ARRAYS +# endif +# endif +# endif +# if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS) +# define PNG_USE_LOCAL_ARRAYS +# endif +#endif + +/* Do not use global arrays (helps with building DLL's) + * They are no longer used in libpng itself, since version 1.0.5c, + * but might be required for some pre-1.0.5c applications. + */ +#if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS) +# if defined(PNG_NO_GLOBAL_ARRAYS) || (defined(__GNUC__) && defined(PNG_DLL)) +# define PNG_USE_LOCAL_ARRAYS +# else +# define PNG_USE_GLOBAL_ARRAYS +# endif +#endif + +#if defined(__CYGWIN__) +# undef PNGAPI +# define PNGAPI __cdecl +# undef PNG_IMPEXP +# define PNG_IMPEXP +#endif + +/* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall", + * you may get warnings regarding the linkage of png_zalloc and png_zfree. + * Don't ignore those warnings; you must also reset the default calling + * convention in your compiler to match your PNGAPI, and you must build + * zlib and your applications the same way you build libpng. + */ + +#ifndef PNGAPI + +#if defined(__MINGW32__) && !defined(PNG_MODULEDEF) +# ifndef PNG_NO_MODULEDEF +# define PNG_NO_MODULEDEF +# endif +#endif + +#if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF) +# define PNG_IMPEXP +#endif + +#if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \ + (( defined(_Windows) || defined(_WINDOWS) || \ + defined(WIN32) || defined(_WIN32) || defined(__WIN32__) )) + +# if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800)) +# define PNGAPI __cdecl +# else +# define PNGAPI _cdecl +# endif + +# if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \ + 0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */) +# define PNG_IMPEXP +# endif + +# if !defined(PNG_IMPEXP) + +# define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol +# define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol + + /* Borland/Microsoft */ +# if defined(_MSC_VER) || defined(__BORLANDC__) +# if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500) +# define PNG_EXPORT PNG_EXPORT_TYPE1 +# else +# define PNG_EXPORT PNG_EXPORT_TYPE2 +# if defined(PNG_BUILD_DLL) +# define PNG_IMPEXP __export +# else +# define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in + VC++ */ +# endif /* Exists in Borland C++ for + C++ classes (== huge) */ +# endif +# endif + +# if !defined(PNG_IMPEXP) +# if defined(PNG_BUILD_DLL) +# define PNG_IMPEXP __declspec(dllexport) +# else +# define PNG_IMPEXP __declspec(dllimport) +# endif +# endif +# endif /* PNG_IMPEXP */ +#else /* !(DLL || non-cygwin WINDOWS) */ +# if (defined(__IBMC__) || defined(IBMCPP__)) && defined(__OS2__) +# define PNGAPI _System +# define PNG_IMPEXP +# else +# if 0 /* ... other platforms, with other meanings */ +# else +# define PNGAPI +# define PNG_IMPEXP +# endif +# endif +#endif +#endif + +#ifndef PNGAPI +# define PNGAPI +#endif +#ifndef PNG_IMPEXP +# define PNG_IMPEXP +#endif + +#ifndef PNG_EXPORT +# define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol +#endif + +#ifdef PNG_USE_GLOBAL_ARRAYS +# ifndef PNG_EXPORT_VAR +# define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type +# endif +#endif + +/* User may want to use these so they are not in PNG_INTERNAL. Any library + * functions that are passed far data must be model independent. + */ + +#ifndef PNG_ABORT +# define PNG_ABORT() abort() +#endif + +#ifdef PNG_SETJMP_SUPPORTED +# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) +#else +# define png_jmpbuf(png_ptr) \ + (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED) +#endif + +#if defined(USE_FAR_KEYWORD) /* memory model independent fns */ +/* use this to make far-to-near assignments */ +# define CHECK 1 +# define NOCHECK 0 +# define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK)) +# define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK)) +# define png_strcpy _fstrcpy +# define png_strlen _fstrlen +# define png_memcmp _fmemcmp /* SJT: added */ +# define png_memcpy _fmemcpy +# define png_memset _fmemset +#else /* use the usual functions */ +# define CVT_PTR(ptr) (ptr) +# define CVT_PTR_NOCHECK(ptr) (ptr) +# define png_strcpy strcpy +# define png_strlen strlen +# define png_memcmp memcmp /* SJT: added */ +# define png_memcpy memcpy +# define png_memset memset +#endif +/* End of memory model independent support */ + +/* Just a little check that someone hasn't tried to define something + * contradictory. + */ +#if (PNG_ZBUF_SIZE > 65536) && defined(PNG_MAX_MALLOC_64K) +# undef PNG_ZBUF_SIZE +# define PNG_ZBUF_SIZE 65536 +#endif + +#ifdef PNG_READ_SUPPORTED +/* Prior to libpng-1.0.9, this block was in pngasmrd.h */ +#if defined(PNG_INTERNAL) + +/* These are the default thresholds before the MMX code kicks in; if either + * rowbytes or bitdepth is below the threshold, plain C code is used. These + * can be overridden at runtime via the png_set_mmx_thresholds() call in + * libpng 1.2.0 and later. The values below were chosen by Intel. + */ + +#ifndef PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT +# define PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT 128 /* >= */ +#endif +#ifndef PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT +# define PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT 9 /* >= */ +#endif + +/* Set this in the makefile for VC++ on Pentium, not here. */ +/* Platform must be Pentium. Makefile must assemble and load pngvcrd.c . + * MMX will be detected at run time and used if present. + */ +#ifdef PNG_USE_PNGVCRD +# define PNG_HAVE_ASSEMBLER_COMBINE_ROW +# define PNG_HAVE_ASSEMBLER_READ_INTERLACE +# define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW +#endif + +/* Set this in the makefile for gcc/as on Pentium, not here. */ +/* Platform must be Pentium. Makefile must assemble and load pnggccrd.c . + * MMX will be detected at run time and used if present. + */ +#ifdef PNG_USE_PNGGCCRD +# define PNG_HAVE_ASSEMBLER_COMBINE_ROW +# define PNG_HAVE_ASSEMBLER_READ_INTERLACE +# define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW +#endif +/* - see pnggccrd.c for info about what is currently enabled */ + +#endif /* PNG_INTERNAL */ +#endif /* PNG_READ_SUPPORTED */ + +#endif /* PNGCONF_H */ + diff --git a/gtkmm-osx/libpng-1.2.5/pngerror.c b/gtkmm-osx/libpng-1.2.5/pngerror.c new file mode 100644 index 0000000..fc3c304 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/pngerror.c @@ -0,0 +1,291 @@ + +/* pngerror.c - stub functions for i/o and memory allocation + * + * libpng 1.2.5 - October 3, 2002 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2002 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This file provides a location for all error handling. Users who + * need special error handling are expected to write replacement functions + * and use png_set_error_fn() to use those functions. See the instructions + * at each function. + */ + +#define PNG_INTERNAL +#include "png.h" + +static void /* PRIVATE */ +png_default_error PNGARG((png_structp png_ptr, + png_const_charp error_message)); +static void /* PRIVATE */ +png_default_warning PNGARG((png_structp png_ptr, + png_const_charp warning_message)); + +/* This function is called whenever there is a fatal error. This function + * should not be changed. If there is a need to handle errors differently, + * you should supply a replacement error function and use png_set_error_fn() + * to replace the error function at run-time. + */ +void PNGAPI +png_error(png_structp png_ptr, png_const_charp error_message) +{ +#ifdef PNG_ERROR_NUMBERS_SUPPORTED + char msg[16]; + if (png_ptr->flags&(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT)) + { + int offset = 0; + if (*error_message == '#') + { + for (offset=1; offset<15; offset++) + if (*(error_message+offset) == ' ') + break; + if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT) + { + int i; + for (i=0; iflags&PNG_FLAG_STRIP_ERROR_TEXT) + { + msg[0]='0'; + msg[1]='\0'; + error_message=msg; + } + } + } +#endif + if (png_ptr->error_fn != NULL) + (*(png_ptr->error_fn))(png_ptr, error_message); + + /* if the following returns or doesn't exist, use the default function, + which will not return */ + png_default_error(png_ptr, error_message); +} + +/* This function is called whenever there is a non-fatal error. This function + * should not be changed. If there is a need to handle warnings differently, + * you should supply a replacement warning function and use + * png_set_error_fn() to replace the warning function at run-time. + */ +void PNGAPI +png_warning(png_structp png_ptr, png_const_charp warning_message) +{ + int offset = 0; +#ifdef PNG_ERROR_NUMBERS_SUPPORTED + if (png_ptr->flags&(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT)) +#endif + { + if (*warning_message == '#') + { + for (offset=1; offset<15; offset++) + if (*(warning_message+offset) == ' ') + break; + } + } + if (png_ptr->warning_fn != NULL) + (*(png_ptr->warning_fn))(png_ptr, + (png_const_charp)(warning_message+offset)); + else + png_default_warning(png_ptr, (png_const_charp)(warning_message+offset)); +} + +/* These utilities are used internally to build an error message that relates + * to the current chunk. The chunk name comes from png_ptr->chunk_name, + * this is used to prefix the message. The message is limited in length + * to 63 bytes, the name characters are output as hex digits wrapped in [] + * if the character is invalid. + */ +#define isnonalpha(c) ((c) < 41 || (c) > 122 || ((c) > 90 && (c) < 97)) +static PNG_CONST char png_digit[16] = { + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', + 'F' }; + +static void /* PRIVATE */ +png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp + error_message) +{ + int iout = 0, iin = 0; + + while (iin < 4) + { + int c = png_ptr->chunk_name[iin++]; + if (isnonalpha(c)) + { + buffer[iout++] = '['; + buffer[iout++] = png_digit[(c & 0xf0) >> 4]; + buffer[iout++] = png_digit[c & 0x0f]; + buffer[iout++] = ']'; + } + else + { + buffer[iout++] = (png_byte)c; + } + } + + if (error_message == NULL) + buffer[iout] = 0; + else + { + buffer[iout++] = ':'; + buffer[iout++] = ' '; + png_memcpy(buffer+iout, error_message, 64); + buffer[iout+63] = 0; + } +} + +void PNGAPI +png_chunk_error(png_structp png_ptr, png_const_charp error_message) +{ + char msg[18+64]; + png_format_buffer(png_ptr, msg, error_message); + png_error(png_ptr, msg); +} + +void PNGAPI +png_chunk_warning(png_structp png_ptr, png_const_charp warning_message) +{ + char msg[18+64]; + png_format_buffer(png_ptr, msg, warning_message); + png_warning(png_ptr, msg); +} + +/* This is the default error handling function. Note that replacements for + * this function MUST NOT RETURN, or the program will likely crash. This + * function is used by default, or if the program supplies NULL for the + * error function pointer in png_set_error_fn(). + */ +static void /* PRIVATE */ +png_default_error(png_structp png_ptr, png_const_charp error_message) +{ +#ifndef PNG_NO_CONSOLE_IO +#ifdef PNG_ERROR_NUMBERS_SUPPORTED + if (*error_message == '#') + { + int offset; + char error_number[16]; + for (offset=0; offset<15; offset++) + { + error_number[offset] = *(error_message+offset+1); + if (*(error_message+offset) == ' ') + break; + } + if((offset > 1) && (offset < 15)) + { + error_number[offset-1]='\0'; + fprintf(stderr, "libpng error no. %s: %s\n", error_number, + error_message+offset); + } + else + fprintf(stderr, "libpng error: %s, offset=%d\n", error_message,offset); + } + else +#endif + fprintf(stderr, "libpng error: %s\n", error_message); +#else + if (error_message) + /* make compiler happy */ ; +#endif + +#ifdef PNG_SETJMP_SUPPORTED +# ifdef USE_FAR_KEYWORD + { + jmp_buf jmpbuf; + png_memcpy(jmpbuf,png_ptr->jmpbuf,sizeof(jmp_buf)); + longjmp(jmpbuf, 1); + } +# else + longjmp(png_ptr->jmpbuf, 1); +# endif +#else + if (png_ptr) + /* make compiler happy */ ; + PNG_ABORT(); +#endif +} + +/* This function is called when there is a warning, but the library thinks + * it can continue anyway. Replacement functions don't have to do anything + * here if you don't want them to. In the default configuration, png_ptr is + * not used, but it is passed in case it may be useful. + */ +static void /* PRIVATE */ +png_default_warning(png_structp png_ptr, png_const_charp warning_message) +{ +#ifndef PNG_NO_CONSOLE_IO +# ifdef PNG_ERROR_NUMBERS_SUPPORTED + if (*warning_message == '#') + { + int offset; + char warning_number[16]; + for (offset=0; offset<15; offset++) + { + warning_number[offset]=*(warning_message+offset+1); + if (*(warning_message+offset) == ' ') + break; + } + if((offset > 1) && (offset < 15)) + { + warning_number[offset-1]='\0'; + fprintf(stderr, "libpng warning no. %s: %s\n", warning_number, + warning_message+offset); + } + else + fprintf(stderr, "libpng warning: %s\n", warning_message); + } + else +# endif + fprintf(stderr, "libpng warning: %s\n", warning_message); +#else + if (warning_message) + /* appease compiler */ ; +#endif + if (png_ptr) + return; +} + +/* This function is called when the application wants to use another method + * of handling errors and warnings. Note that the error function MUST NOT + * return to the calling routine or serious problems will occur. The return + * method used in the default routine calls longjmp(png_ptr->jmpbuf, 1) + */ +void PNGAPI +png_set_error_fn(png_structp png_ptr, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warning_fn) +{ + png_ptr->error_ptr = error_ptr; + png_ptr->error_fn = error_fn; + png_ptr->warning_fn = warning_fn; +} + + +/* This function returns a pointer to the error_ptr associated with the user + * functions. The application should free any memory associated with this + * pointer before png_write_destroy and png_read_destroy are called. + */ +png_voidp PNGAPI +png_get_error_ptr(png_structp png_ptr) +{ + return ((png_voidp)png_ptr->error_ptr); +} + + +#ifdef PNG_ERROR_NUMBERS_SUPPORTED +void PNGAPI +png_set_strip_error_numbers(png_structp png_ptr, png_uint_32 strip_mode) +{ + if(png_ptr != NULL) + { + png_ptr->flags &= + ((~(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))&strip_mode); + } +} +#endif diff --git a/gtkmm-osx/libpng-1.2.5/pnggccrd.c b/gtkmm-osx/libpng-1.2.5/pnggccrd.c new file mode 100644 index 0000000..8d81c31 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/pnggccrd.c @@ -0,0 +1,5397 @@ +/* pnggccrd.c - mixed C/assembler version of utilities to read a PNG file + * + * For Intel x86 CPU (Pentium-MMX or later) and GNU C compiler. + * + * See http://www.intel.com/drg/pentiumII/appnotes/916/916.htm + * and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm + * for Intel's performance analysis of the MMX vs. non-MMX code. + * + * libpng version 1.2.5 - October 3, 2002 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2002 Glenn Randers-Pehrson + * Copyright (c) 1998, Intel Corporation + * + * Based on MSVC code contributed by Nirav Chhatrapati, Intel Corp., 1998. + * Interface to libpng contributed by Gilles Vollant, 1999. + * GNU C port by Greg Roelofs, 1999-2001. + * + * Lines 2350-4300 converted in place with intel2gas 1.3.1: + * + * intel2gas -mdI pnggccrd.c.partially-msvc -o pnggccrd.c + * + * and then cleaned up by hand. See http://hermes.terminal.at/intel2gas/ . + * + * NOTE: A sufficiently recent version of GNU as (or as.exe under DOS/Windows) + * is required to assemble the newer MMX instructions such as movq. + * For djgpp, see + * + * ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bnu281b.zip + * + * (or a later version in the same directory). For Linux, check your + * distribution's web site(s) or try these links: + * + * http://rufus.w3.org/linux/RPM/binutils.html + * http://www.debian.org/Packages/stable/devel/binutils.html + * ftp://ftp.slackware.com/pub/linux/slackware/slackware/slakware/d1/ + * binutils.tgz + * + * For other platforms, see the main GNU site: + * + * ftp://ftp.gnu.org/pub/gnu/binutils/ + * + * Version 2.5.2l.15 is definitely too old... + */ + +/* + * TEMPORARY PORTING NOTES AND CHANGELOG (mostly by Greg Roelofs) + * ===================================== + * + * 19991006: + * - fixed sign error in post-MMX cleanup code (16- & 32-bit cases) + * + * 19991007: + * - additional optimizations (possible or definite): + * x [DONE] write MMX code for 64-bit case (pixel_bytes == 8) [not tested] + * - write MMX code for 48-bit case (pixel_bytes == 6) + * - figure out what's up with 24-bit case (pixel_bytes == 3): + * why subtract 8 from width_mmx in the pass 4/5 case? + * (only width_mmx case) (near line 1606) + * x [DONE] replace pixel_bytes within each block with the true + * constant value (or are compilers smart enough to do that?) + * - rewrite all MMX interlacing code so it's aligned with + * the *beginning* of the row buffer, not the end. This + * would not only allow one to eliminate half of the memory + * writes for odd passes (that is, pass == odd), it may also + * eliminate some unaligned-data-access exceptions (assuming + * there's a penalty for not aligning 64-bit accesses on + * 64-bit boundaries). The only catch is that the "leftover" + * pixel(s) at the end of the row would have to be saved, + * but there are enough unused MMX registers in every case, + * so this is not a problem. A further benefit is that the + * post-MMX cleanup code (C code) in at least some of the + * cases could be done within the assembler block. + * x [DONE] the "v3 v2 v1 v0 v7 v6 v5 v4" comments are confusing, + * inconsistent, and don't match the MMX Programmer's Reference + * Manual conventions anyway. They should be changed to + * "b7 b6 b5 b4 b3 b2 b1 b0," where b0 indicates the byte that + * was lowest in memory (e.g., corresponding to a left pixel) + * and b7 is the byte that was highest (e.g., a right pixel). + * + * 19991016: + * - Brennan's Guide notwithstanding, gcc under Linux does *not* + * want globals prefixed by underscores when referencing them-- + * i.e., if the variable is const4, then refer to it as const4, + * not _const4. This seems to be a djgpp-specific requirement. + * Also, such variables apparently *must* be declared outside + * of functions; neither static nor automatic variables work if + * defined within the scope of a single function, but both + * static and truly global (multi-module) variables work fine. + * + * 19991023: + * - fixed png_combine_row() non-MMX replication bug (odd passes only?) + * - switched from string-concatenation-with-macros to cleaner method of + * renaming global variables for djgpp--i.e., always use prefixes in + * inlined assembler code (== strings) and conditionally rename the + * variables, not the other way around. Hence _const4, _mask8_0, etc. + * + * 19991024: + * - fixed mmxsupport()/png_do_read_interlace() first-row bug + * This one was severely weird: even though mmxsupport() doesn't touch + * ebx (where "row" pointer was stored), it nevertheless managed to zero + * the register (even in static/non-fPIC code--see below), which in turn + * caused png_do_read_interlace() to return prematurely on the first row of + * interlaced images (i.e., without expanding the interlaced pixels). + * Inspection of the generated assembly code didn't turn up any clues, + * although it did point at a minor optimization (i.e., get rid of + * mmx_supported_local variable and just use eax). Possibly the CPUID + * instruction is more destructive than it looks? (Not yet checked.) + * - "info gcc" was next to useless, so compared fPIC and non-fPIC assembly + * listings... Apparently register spillage has to do with ebx, since + * it's used to index the global offset table. Commenting it out of the + * input-reg lists in png_combine_row() eliminated compiler barfage, so + * ifdef'd with __PIC__ macro: if defined, use a global for unmask + * + * 19991107: + * - verified CPUID clobberage: 12-char string constant ("GenuineIntel", + * "AuthenticAMD", etc.) placed in ebx:ecx:edx. Still need to polish. + * + * 19991120: + * - made "diff" variable (now "_dif") global to simplify conversion of + * filtering routines (running out of regs, sigh). "diff" is still used + * in interlacing routines, however. + * - fixed up both versions of mmxsupport() (ORIG_THAT_USED_TO_CLOBBER_EBX + * macro determines which is used); original not yet tested. + * + * 20000213: + * - when compiling with gcc, be sure to use -fomit-frame-pointer + * + * 20000319: + * - fixed a register-name typo in png_do_read_interlace(), default (MMX) case, + * pass == 4 or 5, that caused visible corruption of interlaced images + * + * 20000623: + * - Various problems were reported with gcc 2.95.2 in the Cygwin environment, + * many of the form "forbidden register 0 (ax) was spilled for class AREG." + * This is explained at http://gcc.gnu.org/fom_serv/cache/23.html, and + * Chuck Wilson supplied a patch involving dummy output registers. See + * http://sourceforge.net/bugs/?func=detailbug&bug_id=108741&group_id=5624 + * for the original (anonymous) SourceForge bug report. + * + * 20000706: + * - Chuck Wilson passed along these remaining gcc 2.95.2 errors: + * pnggccrd.c: In function `png_combine_row': + * pnggccrd.c:525: more than 10 operands in `asm' + * pnggccrd.c:669: more than 10 operands in `asm' + * pnggccrd.c:828: more than 10 operands in `asm' + * pnggccrd.c:994: more than 10 operands in `asm' + * pnggccrd.c:1177: more than 10 operands in `asm' + * They are all the same problem and can be worked around by using the + * global _unmask variable unconditionally, not just in the -fPIC case. + * Reportedly earlier versions of gcc also have the problem with more than + * 10 operands; they just don't report it. Much strangeness ensues, etc. + * + * 20000729: + * - enabled png_read_filter_row_mmx_up() (shortest remaining unconverted + * MMX routine); began converting png_read_filter_row_mmx_sub() + * - to finish remaining sections: + * - clean up indentation and comments + * - preload local variables + * - add output and input regs (order of former determines numerical + * mapping of latter) + * - avoid all usage of ebx (including bx, bh, bl) register [20000823] + * - remove "$" from addressing of Shift and Mask variables [20000823] + * + * 20000731: + * - global union vars causing segfaults in png_read_filter_row_mmx_sub()? + * + * 20000822: + * - ARGH, stupid png_read_filter_row_mmx_sub() segfault only happens with + * shared-library (-fPIC) version! Code works just fine as part of static + * library. Damn damn damn damn damn, should have tested that sooner. + * ebx is getting clobbered again (explicitly this time); need to save it + * on stack or rewrite asm code to avoid using it altogether. Blargh! + * + * 20000823: + * - first section was trickiest; all remaining sections have ebx -> edx now. + * (-fPIC works again.) Also added missing underscores to various Shift* + * and *Mask* globals and got rid of leading "$" signs. + * + * 20000826: + * - added visual separators to help navigate microscopic printed copies + * (http://pobox.com/~newt/code/gpr-latest.zip, mode 10); started working + * on png_read_filter_row_mmx_avg() + * + * 20000828: + * - finished png_read_filter_row_mmx_avg(): only Paeth left! (930 lines...) + * What the hell, did png_read_filter_row_mmx_paeth(), too. Comments not + * cleaned up/shortened in either routine, but functionality is complete + * and seems to be working fine. + * + * 20000829: + * - ahhh, figured out last(?) bit of gcc/gas asm-fu: if register is listed + * as an input reg (with dummy output variables, etc.), then it *cannot* + * also appear in the clobber list or gcc 2.95.2 will barf. The solution + * is simple enough... + * + * 20000914: + * - bug in png_read_filter_row_mmx_avg(): 16-bit grayscale not handled + * correctly (but 48-bit RGB just fine) + * + * 20000916: + * - fixed bug in png_read_filter_row_mmx_avg(), bpp == 2 case; three errors: + * - "_ShiftBpp.use = 24;" should have been "_ShiftBpp.use = 16;" + * - "_ShiftRem.use = 40;" should have been "_ShiftRem.use = 48;" + * - "psllq _ShiftRem, %%mm2" should have been "psrlq _ShiftRem, %%mm2" + * + * 20010101: + * - added new png_init_mmx_flags() function (here only because it needs to + * call mmxsupport(), which should probably become global png_mmxsupport()); + * modified other MMX routines to run conditionally (png_ptr->asm_flags) + * + * 20010103: + * - renamed mmxsupport() to png_mmx_support(), with auto-set of mmx_supported, + * and made it public; moved png_init_mmx_flags() to png.c as internal func + * + * 20010104: + * - removed dependency on png_read_filter_row_c() (C code already duplicated + * within MMX version of png_read_filter_row()) so no longer necessary to + * compile it into pngrutil.o + * + * 20010310: + * - fixed buffer-overrun bug in png_combine_row() C code (non-MMX) + * + * 20020304: + * - eliminated incorrect use of width_mmx in pixel_bytes == 8 case + * + * STILL TO DO: + * - test png_do_read_interlace() 64-bit case (pixel_bytes == 8) + * - write MMX code for 48-bit case (pixel_bytes == 6) + * - figure out what's up with 24-bit case (pixel_bytes == 3): + * why subtract 8 from width_mmx in the pass 4/5 case? + * (only width_mmx case) (near line 1606) + * - rewrite all MMX interlacing code so it's aligned with beginning + * of the row buffer, not the end (see 19991007 for details) + * x pick one version of mmxsupport() and get rid of the other + * - add error messages to any remaining bogus default cases + * - enable pixel_depth == 8 cases in png_read_filter_row()? (test speed) + * x add support for runtime enable/disable/query of various MMX routines + */ + +#define PNG_INTERNAL +#include "png.h" + +#if defined(PNG_USE_PNGGCCRD) + +int PNGAPI png_mmx_support(void); + +#ifdef PNG_USE_LOCAL_ARRAYS +static const int FARDATA png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; +static const int FARDATA png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; +static const int FARDATA png_pass_width[7] = {8, 4, 4, 2, 2, 1, 1}; +#endif + +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) +/* djgpp, Win32, and Cygwin add their own underscores to global variables, + * so define them without: */ +#if defined(__DJGPP__) || defined(WIN32) || defined(__CYGWIN__) +# define _mmx_supported mmx_supported +# define _const4 const4 +# define _const6 const6 +# define _mask8_0 mask8_0 +# define _mask16_1 mask16_1 +# define _mask16_0 mask16_0 +# define _mask24_2 mask24_2 +# define _mask24_1 mask24_1 +# define _mask24_0 mask24_0 +# define _mask32_3 mask32_3 +# define _mask32_2 mask32_2 +# define _mask32_1 mask32_1 +# define _mask32_0 mask32_0 +# define _mask48_5 mask48_5 +# define _mask48_4 mask48_4 +# define _mask48_3 mask48_3 +# define _mask48_2 mask48_2 +# define _mask48_1 mask48_1 +# define _mask48_0 mask48_0 +# define _LBCarryMask LBCarryMask +# define _HBClearMask HBClearMask +# define _ActiveMask ActiveMask +# define _ActiveMask2 ActiveMask2 +# define _ActiveMaskEnd ActiveMaskEnd +# define _ShiftBpp ShiftBpp +# define _ShiftRem ShiftRem +#ifdef PNG_THREAD_UNSAFE_OK +# define _unmask unmask +# define _FullLength FullLength +# define _MMXLength MMXLength +# define _dif dif +# define _patemp patemp +# define _pbtemp pbtemp +# define _pctemp pctemp +#endif +#endif + + +/* These constants are used in the inlined MMX assembly code. + Ignore gcc's "At top level: defined but not used" warnings. */ + +/* GRR 20000706: originally _unmask was needed only when compiling with -fPIC, + * since that case uses the %ebx register for indexing the Global Offset Table + * and there were no other registers available. But gcc 2.95 and later emit + * "more than 10 operands in `asm'" errors when %ebx is used to preload unmask + * in the non-PIC case, so we'll just use the global unconditionally now. + */ +#ifdef PNG_THREAD_UNSAFE_OK +static int _unmask; +#endif + +static unsigned long long _mask8_0 = 0x0102040810204080LL; + +static unsigned long long _mask16_1 = 0x0101020204040808LL; +static unsigned long long _mask16_0 = 0x1010202040408080LL; + +static unsigned long long _mask24_2 = 0x0101010202020404LL; +static unsigned long long _mask24_1 = 0x0408080810101020LL; +static unsigned long long _mask24_0 = 0x2020404040808080LL; + +static unsigned long long _mask32_3 = 0x0101010102020202LL; +static unsigned long long _mask32_2 = 0x0404040408080808LL; +static unsigned long long _mask32_1 = 0x1010101020202020LL; +static unsigned long long _mask32_0 = 0x4040404080808080LL; + +static unsigned long long _mask48_5 = 0x0101010101010202LL; +static unsigned long long _mask48_4 = 0x0202020204040404LL; +static unsigned long long _mask48_3 = 0x0404080808080808LL; +static unsigned long long _mask48_2 = 0x1010101010102020LL; +static unsigned long long _mask48_1 = 0x2020202040404040LL; +static unsigned long long _mask48_0 = 0x4040808080808080LL; + +static unsigned long long _const4 = 0x0000000000FFFFFFLL; +//static unsigned long long _const5 = 0x000000FFFFFF0000LL; // NOT USED +static unsigned long long _const6 = 0x00000000000000FFLL; + +// These are used in the row-filter routines and should/would be local +// variables if not for gcc addressing limitations. +// WARNING: Their presence probably defeats the thread safety of libpng. + +#ifdef PNG_THREAD_UNSAFE_OK +static png_uint_32 _FullLength; +static png_uint_32 _MMXLength; +static int _dif; +static int _patemp; // temp variables for Paeth routine +static int _pbtemp; +static int _pctemp; +#endif + +void /* PRIVATE */ +png_squelch_warnings(void) +{ +#ifdef PNG_THREAD_UNSAFE_OK + _dif = _dif; + _patemp = _patemp; + _pbtemp = _pbtemp; + _pctemp = _pctemp; + _MMXLength = _MMXLength; +#endif + _const4 = _const4; + _const6 = _const6; + _mask8_0 = _mask8_0; + _mask16_1 = _mask16_1; + _mask16_0 = _mask16_0; + _mask24_2 = _mask24_2; + _mask24_1 = _mask24_1; + _mask24_0 = _mask24_0; + _mask32_3 = _mask32_3; + _mask32_2 = _mask32_2; + _mask32_1 = _mask32_1; + _mask32_0 = _mask32_0; + _mask48_5 = _mask48_5; + _mask48_4 = _mask48_4; + _mask48_3 = _mask48_3; + _mask48_2 = _mask48_2; + _mask48_1 = _mask48_1; + _mask48_0 = _mask48_0; +} +#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ + + +static int _mmx_supported = 2; + +/*===========================================================================*/ +/* */ +/* P N G _ C O M B I N E _ R O W */ +/* */ +/*===========================================================================*/ + +#if defined(PNG_HAVE_ASSEMBLER_COMBINE_ROW) + +#define BPP2 2 +#define BPP3 3 /* bytes per pixel (a.k.a. pixel_bytes) */ +#define BPP4 4 +#define BPP6 6 /* (defined only to help avoid cut-and-paste errors) */ +#define BPP8 8 + +/* Combines the row recently read in with the previous row. + This routine takes care of alpha and transparency if requested. + This routine also handles the two methods of progressive display + of interlaced images, depending on the mask value. + The mask value describes which pixels are to be combined with + the row. The pattern always repeats every 8 pixels, so just 8 + bits are needed. A one indicates the pixel is to be combined; a + zero indicates the pixel is to be skipped. This is in addition + to any alpha or transparency value associated with the pixel. + If you want all pixels to be combined, pass 0xff (255) in mask. */ + +/* Use this routine for the x86 platform - it uses a faster MMX routine + if the machine supports MMX. */ + +void /* PRIVATE */ +png_combine_row(png_structp png_ptr, png_bytep row, int mask) +{ + png_debug(1, "in png_combine_row (pnggccrd.c)\n"); + +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) + if (_mmx_supported == 2) { + /* this should have happened in png_init_mmx_flags() already */ + png_warning(png_ptr, "asm_flags may not have been initialized"); + png_mmx_support(); + } +#endif + + if (mask == 0xff) + { + png_debug(2,"mask == 0xff: doing single png_memcpy()\n"); + png_memcpy(row, png_ptr->row_buf + 1, + (png_size_t)((png_ptr->width * png_ptr->row_info.pixel_depth + 7) >> 3)); + } + else /* (png_combine_row() is never called with mask == 0) */ + { + switch (png_ptr->row_info.pixel_depth) + { + case 1: /* png_ptr->row_info.pixel_depth */ + { + png_bytep sp; + png_bytep dp; + int s_inc, s_start, s_end; + int m; + int shift; + png_uint_32 i; + + sp = png_ptr->row_buf + 1; + dp = row; + m = 0x80; +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + if (png_ptr->transformations & PNG_PACKSWAP) + { + s_start = 0; + s_end = 7; + s_inc = 1; + } + else +#endif + { + s_start = 7; + s_end = 0; + s_inc = -1; + } + + shift = s_start; + + for (i = 0; i < png_ptr->width; i++) + { + if (m & mask) + { + int value; + + value = (*sp >> shift) & 0x1; + *dp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff); + *dp |= (png_byte)(value << shift); + } + + if (shift == s_end) + { + shift = s_start; + sp++; + dp++; + } + else + shift += s_inc; + + if (m == 1) + m = 0x80; + else + m >>= 1; + } + break; + } + + case 2: /* png_ptr->row_info.pixel_depth */ + { + png_bytep sp; + png_bytep dp; + int s_start, s_end, s_inc; + int m; + int shift; + png_uint_32 i; + int value; + + sp = png_ptr->row_buf + 1; + dp = row; + m = 0x80; +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + if (png_ptr->transformations & PNG_PACKSWAP) + { + s_start = 0; + s_end = 6; + s_inc = 2; + } + else +#endif + { + s_start = 6; + s_end = 0; + s_inc = -2; + } + + shift = s_start; + + for (i = 0; i < png_ptr->width; i++) + { + if (m & mask) + { + value = (*sp >> shift) & 0x3; + *dp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); + *dp |= (png_byte)(value << shift); + } + + if (shift == s_end) + { + shift = s_start; + sp++; + dp++; + } + else + shift += s_inc; + if (m == 1) + m = 0x80; + else + m >>= 1; + } + break; + } + + case 4: /* png_ptr->row_info.pixel_depth */ + { + png_bytep sp; + png_bytep dp; + int s_start, s_end, s_inc; + int m; + int shift; + png_uint_32 i; + int value; + + sp = png_ptr->row_buf + 1; + dp = row; + m = 0x80; +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + if (png_ptr->transformations & PNG_PACKSWAP) + { + s_start = 0; + s_end = 4; + s_inc = 4; + } + else +#endif + { + s_start = 4; + s_end = 0; + s_inc = -4; + } + shift = s_start; + + for (i = 0; i < png_ptr->width; i++) + { + if (m & mask) + { + value = (*sp >> shift) & 0xf; + *dp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); + *dp |= (png_byte)(value << shift); + } + + if (shift == s_end) + { + shift = s_start; + sp++; + dp++; + } + else + shift += s_inc; + if (m == 1) + m = 0x80; + else + m >>= 1; + } + break; + } + + case 8: /* png_ptr->row_info.pixel_depth */ + { + png_bytep srcptr; + png_bytep dstptr; + +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) +#if !defined(PNG_1_0_X) + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) + /* && _mmx_supported */ ) +#else + if (_mmx_supported) +#endif + { + png_uint_32 len; + int diff; + int dummy_value_a; // fix 'forbidden register spilled' error + int dummy_value_d; + int dummy_value_c; + int dummy_value_S; + int dummy_value_D; + _unmask = ~mask; // global variable for -fPIC version + srcptr = png_ptr->row_buf + 1; + dstptr = row; + len = png_ptr->width &~7; // reduce to multiple of 8 + diff = (int) (png_ptr->width & 7); // amount lost + + __asm__ __volatile__ ( + "movd _unmask, %%mm7 \n\t" // load bit pattern + "psubb %%mm6, %%mm6 \n\t" // zero mm6 + "punpcklbw %%mm7, %%mm7 \n\t" + "punpcklwd %%mm7, %%mm7 \n\t" + "punpckldq %%mm7, %%mm7 \n\t" // fill reg with 8 masks + + "movq _mask8_0, %%mm0 \n\t" + "pand %%mm7, %%mm0 \n\t" // nonzero if keep byte + "pcmpeqb %%mm6, %%mm0 \n\t" // zeros->1s, v versa + +// preload "movl len, %%ecx \n\t" // load length of line +// preload "movl srcptr, %%esi \n\t" // load source +// preload "movl dstptr, %%edi \n\t" // load dest + + "cmpl $0, %%ecx \n\t" // len == 0 ? + "je mainloop8end \n\t" + + "mainloop8: \n\t" + "movq (%%esi), %%mm4 \n\t" // *srcptr + "pand %%mm0, %%mm4 \n\t" + "movq %%mm0, %%mm6 \n\t" + "pandn (%%edi), %%mm6 \n\t" // *dstptr + "por %%mm6, %%mm4 \n\t" + "movq %%mm4, (%%edi) \n\t" + "addl $8, %%esi \n\t" // inc by 8 bytes processed + "addl $8, %%edi \n\t" + "subl $8, %%ecx \n\t" // dec by 8 pixels processed + "ja mainloop8 \n\t" + + "mainloop8end: \n\t" +// preload "movl diff, %%ecx \n\t" // (diff is in eax) + "movl %%eax, %%ecx \n\t" + "cmpl $0, %%ecx \n\t" + "jz end8 \n\t" +// preload "movl mask, %%edx \n\t" + "sall $24, %%edx \n\t" // make low byte, high byte + + "secondloop8: \n\t" + "sall %%edx \n\t" // move high bit to CF + "jnc skip8 \n\t" // if CF = 0 + "movb (%%esi), %%al \n\t" + "movb %%al, (%%edi) \n\t" + + "skip8: \n\t" + "incl %%esi \n\t" + "incl %%edi \n\t" + "decl %%ecx \n\t" + "jnz secondloop8 \n\t" + + "end8: \n\t" + "EMMS \n\t" // DONE + + : "=a" (dummy_value_a), // output regs (dummy) + "=d" (dummy_value_d), + "=c" (dummy_value_c), + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "3" (srcptr), // esi // input regs + "4" (dstptr), // edi + "0" (diff), // eax +// was (unmask) "b" RESERVED // ebx // Global Offset Table idx + "2" (len), // ecx + "1" (mask) // edx + +#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0", "%mm4", "%mm6", "%mm7" // clobber list +#endif + ); + } + else /* mmx _not supported - Use modified C routine */ +#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ + { + register png_uint_32 i; + png_uint_32 initial_val = png_pass_start[png_ptr->pass]; + /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ + register int stride = png_pass_inc[png_ptr->pass]; + /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ + register int rep_bytes = png_pass_width[png_ptr->pass]; + /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ + png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ + int diff = (int) (png_ptr->width & 7); /* amount lost */ + register png_uint_32 final_val = len; /* GRR bugfix */ + + srcptr = png_ptr->row_buf + 1 + initial_val; + dstptr = row + initial_val; + + for (i = initial_val; i < final_val; i += stride) + { + png_memcpy(dstptr, srcptr, rep_bytes); + srcptr += stride; + dstptr += stride; + } + if (diff) /* number of leftover pixels: 3 for pngtest */ + { + final_val+=diff /* *BPP1 */ ; + for (; i < final_val; i += stride) + { + if (rep_bytes > (int)(final_val-i)) + rep_bytes = (int)(final_val-i); + png_memcpy(dstptr, srcptr, rep_bytes); + srcptr += stride; + dstptr += stride; + } + } + + } /* end of else (_mmx_supported) */ + + break; + } /* end 8 bpp */ + + case 16: /* png_ptr->row_info.pixel_depth */ + { + png_bytep srcptr; + png_bytep dstptr; + +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) +#if !defined(PNG_1_0_X) + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) + /* && _mmx_supported */ ) +#else + if (_mmx_supported) +#endif + { + png_uint_32 len; + int diff; + int dummy_value_a; // fix 'forbidden register spilled' error + int dummy_value_d; + int dummy_value_c; + int dummy_value_S; + int dummy_value_D; + _unmask = ~mask; // global variable for -fPIC version + srcptr = png_ptr->row_buf + 1; + dstptr = row; + len = png_ptr->width &~7; // reduce to multiple of 8 + diff = (int) (png_ptr->width & 7); // amount lost // + + __asm__ __volatile__ ( + "movd _unmask, %%mm7 \n\t" // load bit pattern + "psubb %%mm6, %%mm6 \n\t" // zero mm6 + "punpcklbw %%mm7, %%mm7 \n\t" + "punpcklwd %%mm7, %%mm7 \n\t" + "punpckldq %%mm7, %%mm7 \n\t" // fill reg with 8 masks + + "movq _mask16_0, %%mm0 \n\t" + "movq _mask16_1, %%mm1 \n\t" + + "pand %%mm7, %%mm0 \n\t" + "pand %%mm7, %%mm1 \n\t" + + "pcmpeqb %%mm6, %%mm0 \n\t" + "pcmpeqb %%mm6, %%mm1 \n\t" + +// preload "movl len, %%ecx \n\t" // load length of line +// preload "movl srcptr, %%esi \n\t" // load source +// preload "movl dstptr, %%edi \n\t" // load dest + + "cmpl $0, %%ecx \n\t" + "jz mainloop16end \n\t" + + "mainloop16: \n\t" + "movq (%%esi), %%mm4 \n\t" + "pand %%mm0, %%mm4 \n\t" + "movq %%mm0, %%mm6 \n\t" + "movq (%%edi), %%mm7 \n\t" + "pandn %%mm7, %%mm6 \n\t" + "por %%mm6, %%mm4 \n\t" + "movq %%mm4, (%%edi) \n\t" + + "movq 8(%%esi), %%mm5 \n\t" + "pand %%mm1, %%mm5 \n\t" + "movq %%mm1, %%mm7 \n\t" + "movq 8(%%edi), %%mm6 \n\t" + "pandn %%mm6, %%mm7 \n\t" + "por %%mm7, %%mm5 \n\t" + "movq %%mm5, 8(%%edi) \n\t" + + "addl $16, %%esi \n\t" // inc by 16 bytes processed + "addl $16, %%edi \n\t" + "subl $8, %%ecx \n\t" // dec by 8 pixels processed + "ja mainloop16 \n\t" + + "mainloop16end: \n\t" +// preload "movl diff, %%ecx \n\t" // (diff is in eax) + "movl %%eax, %%ecx \n\t" + "cmpl $0, %%ecx \n\t" + "jz end16 \n\t" +// preload "movl mask, %%edx \n\t" + "sall $24, %%edx \n\t" // make low byte, high byte + + "secondloop16: \n\t" + "sall %%edx \n\t" // move high bit to CF + "jnc skip16 \n\t" // if CF = 0 + "movw (%%esi), %%ax \n\t" + "movw %%ax, (%%edi) \n\t" + + "skip16: \n\t" + "addl $2, %%esi \n\t" + "addl $2, %%edi \n\t" + "decl %%ecx \n\t" + "jnz secondloop16 \n\t" + + "end16: \n\t" + "EMMS \n\t" // DONE + + : "=a" (dummy_value_a), // output regs (dummy) + "=c" (dummy_value_c), + "=d" (dummy_value_d), + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "0" (diff), // eax // input regs +// was (unmask) " " RESERVED // ebx // Global Offset Table idx + "1" (len), // ecx + "2" (mask), // edx + "3" (srcptr), // esi + "4" (dstptr) // edi + +#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0", "%mm1", "%mm4" // clobber list + , "%mm5", "%mm6", "%mm7" +#endif + ); + } + else /* mmx _not supported - Use modified C routine */ +#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ + { + register png_uint_32 i; + png_uint_32 initial_val = BPP2 * png_pass_start[png_ptr->pass]; + /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ + register int stride = BPP2 * png_pass_inc[png_ptr->pass]; + /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ + register int rep_bytes = BPP2 * png_pass_width[png_ptr->pass]; + /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ + png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ + int diff = (int) (png_ptr->width & 7); /* amount lost */ + register png_uint_32 final_val = BPP2 * len; /* GRR bugfix */ + + srcptr = png_ptr->row_buf + 1 + initial_val; + dstptr = row + initial_val; + + for (i = initial_val; i < final_val; i += stride) + { + png_memcpy(dstptr, srcptr, rep_bytes); + srcptr += stride; + dstptr += stride; + } + if (diff) /* number of leftover pixels: 3 for pngtest */ + { + final_val+=diff*BPP2; + for (; i < final_val; i += stride) + { + if (rep_bytes > (int)(final_val-i)) + rep_bytes = (int)(final_val-i); + png_memcpy(dstptr, srcptr, rep_bytes); + srcptr += stride; + dstptr += stride; + } + } + } /* end of else (_mmx_supported) */ + + break; + } /* end 16 bpp */ + + case 24: /* png_ptr->row_info.pixel_depth */ + { + png_bytep srcptr; + png_bytep dstptr; + +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) +#if !defined(PNG_1_0_X) + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) + /* && _mmx_supported */ ) +#else + if (_mmx_supported) +#endif + { + png_uint_32 len; + int diff; + int dummy_value_a; // fix 'forbidden register spilled' error + int dummy_value_d; + int dummy_value_c; + int dummy_value_S; + int dummy_value_D; + _unmask = ~mask; // global variable for -fPIC version + srcptr = png_ptr->row_buf + 1; + dstptr = row; + len = png_ptr->width &~7; // reduce to multiple of 8 + diff = (int) (png_ptr->width & 7); // amount lost // + + __asm__ __volatile__ ( + "movd _unmask, %%mm7 \n\t" // load bit pattern + "psubb %%mm6, %%mm6 \n\t" // zero mm6 + "punpcklbw %%mm7, %%mm7 \n\t" + "punpcklwd %%mm7, %%mm7 \n\t" + "punpckldq %%mm7, %%mm7 \n\t" // fill reg with 8 masks + + "movq _mask24_0, %%mm0 \n\t" + "movq _mask24_1, %%mm1 \n\t" + "movq _mask24_2, %%mm2 \n\t" + + "pand %%mm7, %%mm0 \n\t" + "pand %%mm7, %%mm1 \n\t" + "pand %%mm7, %%mm2 \n\t" + + "pcmpeqb %%mm6, %%mm0 \n\t" + "pcmpeqb %%mm6, %%mm1 \n\t" + "pcmpeqb %%mm6, %%mm2 \n\t" + +// preload "movl len, %%ecx \n\t" // load length of line +// preload "movl srcptr, %%esi \n\t" // load source +// preload "movl dstptr, %%edi \n\t" // load dest + + "cmpl $0, %%ecx \n\t" + "jz mainloop24end \n\t" + + "mainloop24: \n\t" + "movq (%%esi), %%mm4 \n\t" + "pand %%mm0, %%mm4 \n\t" + "movq %%mm0, %%mm6 \n\t" + "movq (%%edi), %%mm7 \n\t" + "pandn %%mm7, %%mm6 \n\t" + "por %%mm6, %%mm4 \n\t" + "movq %%mm4, (%%edi) \n\t" + + "movq 8(%%esi), %%mm5 \n\t" + "pand %%mm1, %%mm5 \n\t" + "movq %%mm1, %%mm7 \n\t" + "movq 8(%%edi), %%mm6 \n\t" + "pandn %%mm6, %%mm7 \n\t" + "por %%mm7, %%mm5 \n\t" + "movq %%mm5, 8(%%edi) \n\t" + + "movq 16(%%esi), %%mm6 \n\t" + "pand %%mm2, %%mm6 \n\t" + "movq %%mm2, %%mm4 \n\t" + "movq 16(%%edi), %%mm7 \n\t" + "pandn %%mm7, %%mm4 \n\t" + "por %%mm4, %%mm6 \n\t" + "movq %%mm6, 16(%%edi) \n\t" + + "addl $24, %%esi \n\t" // inc by 24 bytes processed + "addl $24, %%edi \n\t" + "subl $8, %%ecx \n\t" // dec by 8 pixels processed + + "ja mainloop24 \n\t" + + "mainloop24end: \n\t" +// preload "movl diff, %%ecx \n\t" // (diff is in eax) + "movl %%eax, %%ecx \n\t" + "cmpl $0, %%ecx \n\t" + "jz end24 \n\t" +// preload "movl mask, %%edx \n\t" + "sall $24, %%edx \n\t" // make low byte, high byte + + "secondloop24: \n\t" + "sall %%edx \n\t" // move high bit to CF + "jnc skip24 \n\t" // if CF = 0 + "movw (%%esi), %%ax \n\t" + "movw %%ax, (%%edi) \n\t" + "xorl %%eax, %%eax \n\t" + "movb 2(%%esi), %%al \n\t" + "movb %%al, 2(%%edi) \n\t" + + "skip24: \n\t" + "addl $3, %%esi \n\t" + "addl $3, %%edi \n\t" + "decl %%ecx \n\t" + "jnz secondloop24 \n\t" + + "end24: \n\t" + "EMMS \n\t" // DONE + + : "=a" (dummy_value_a), // output regs (dummy) + "=d" (dummy_value_d), + "=c" (dummy_value_c), + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "3" (srcptr), // esi // input regs + "4" (dstptr), // edi + "0" (diff), // eax +// was (unmask) "b" RESERVED // ebx // Global Offset Table idx + "2" (len), // ecx + "1" (mask) // edx + +#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0", "%mm1", "%mm2" // clobber list + , "%mm4", "%mm5", "%mm6", "%mm7" +#endif + ); + } + else /* mmx _not supported - Use modified C routine */ +#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ + { + register png_uint_32 i; + png_uint_32 initial_val = BPP3 * png_pass_start[png_ptr->pass]; + /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ + register int stride = BPP3 * png_pass_inc[png_ptr->pass]; + /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ + register int rep_bytes = BPP3 * png_pass_width[png_ptr->pass]; + /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ + png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ + int diff = (int) (png_ptr->width & 7); /* amount lost */ + register png_uint_32 final_val = BPP3 * len; /* GRR bugfix */ + + srcptr = png_ptr->row_buf + 1 + initial_val; + dstptr = row + initial_val; + + for (i = initial_val; i < final_val; i += stride) + { + png_memcpy(dstptr, srcptr, rep_bytes); + srcptr += stride; + dstptr += stride; + } + if (diff) /* number of leftover pixels: 3 for pngtest */ + { + final_val+=diff*BPP3; + for (; i < final_val; i += stride) + { + if (rep_bytes > (int)(final_val-i)) + rep_bytes = (int)(final_val-i); + png_memcpy(dstptr, srcptr, rep_bytes); + srcptr += stride; + dstptr += stride; + } + } + } /* end of else (_mmx_supported) */ + + break; + } /* end 24 bpp */ + + case 32: /* png_ptr->row_info.pixel_depth */ + { + png_bytep srcptr; + png_bytep dstptr; + +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) +#if !defined(PNG_1_0_X) + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) + /* && _mmx_supported */ ) +#else + if (_mmx_supported) +#endif + { + png_uint_32 len; + int diff; + int dummy_value_a; // fix 'forbidden register spilled' error + int dummy_value_d; + int dummy_value_c; + int dummy_value_S; + int dummy_value_D; + _unmask = ~mask; // global variable for -fPIC version + srcptr = png_ptr->row_buf + 1; + dstptr = row; + len = png_ptr->width &~7; // reduce to multiple of 8 + diff = (int) (png_ptr->width & 7); // amount lost // + + __asm__ __volatile__ ( + "movd _unmask, %%mm7 \n\t" // load bit pattern + "psubb %%mm6, %%mm6 \n\t" // zero mm6 + "punpcklbw %%mm7, %%mm7 \n\t" + "punpcklwd %%mm7, %%mm7 \n\t" + "punpckldq %%mm7, %%mm7 \n\t" // fill reg with 8 masks + + "movq _mask32_0, %%mm0 \n\t" + "movq _mask32_1, %%mm1 \n\t" + "movq _mask32_2, %%mm2 \n\t" + "movq _mask32_3, %%mm3 \n\t" + + "pand %%mm7, %%mm0 \n\t" + "pand %%mm7, %%mm1 \n\t" + "pand %%mm7, %%mm2 \n\t" + "pand %%mm7, %%mm3 \n\t" + + "pcmpeqb %%mm6, %%mm0 \n\t" + "pcmpeqb %%mm6, %%mm1 \n\t" + "pcmpeqb %%mm6, %%mm2 \n\t" + "pcmpeqb %%mm6, %%mm3 \n\t" + +// preload "movl len, %%ecx \n\t" // load length of line +// preload "movl srcptr, %%esi \n\t" // load source +// preload "movl dstptr, %%edi \n\t" // load dest + + "cmpl $0, %%ecx \n\t" // lcr + "jz mainloop32end \n\t" + + "mainloop32: \n\t" + "movq (%%esi), %%mm4 \n\t" + "pand %%mm0, %%mm4 \n\t" + "movq %%mm0, %%mm6 \n\t" + "movq (%%edi), %%mm7 \n\t" + "pandn %%mm7, %%mm6 \n\t" + "por %%mm6, %%mm4 \n\t" + "movq %%mm4, (%%edi) \n\t" + + "movq 8(%%esi), %%mm5 \n\t" + "pand %%mm1, %%mm5 \n\t" + "movq %%mm1, %%mm7 \n\t" + "movq 8(%%edi), %%mm6 \n\t" + "pandn %%mm6, %%mm7 \n\t" + "por %%mm7, %%mm5 \n\t" + "movq %%mm5, 8(%%edi) \n\t" + + "movq 16(%%esi), %%mm6 \n\t" + "pand %%mm2, %%mm6 \n\t" + "movq %%mm2, %%mm4 \n\t" + "movq 16(%%edi), %%mm7 \n\t" + "pandn %%mm7, %%mm4 \n\t" + "por %%mm4, %%mm6 \n\t" + "movq %%mm6, 16(%%edi) \n\t" + + "movq 24(%%esi), %%mm7 \n\t" + "pand %%mm3, %%mm7 \n\t" + "movq %%mm3, %%mm5 \n\t" + "movq 24(%%edi), %%mm4 \n\t" + "pandn %%mm4, %%mm5 \n\t" + "por %%mm5, %%mm7 \n\t" + "movq %%mm7, 24(%%edi) \n\t" + + "addl $32, %%esi \n\t" // inc by 32 bytes processed + "addl $32, %%edi \n\t" + "subl $8, %%ecx \n\t" // dec by 8 pixels processed + "ja mainloop32 \n\t" + + "mainloop32end: \n\t" +// preload "movl diff, %%ecx \n\t" // (diff is in eax) + "movl %%eax, %%ecx \n\t" + "cmpl $0, %%ecx \n\t" + "jz end32 \n\t" +// preload "movl mask, %%edx \n\t" + "sall $24, %%edx \n\t" // low byte => high byte + + "secondloop32: \n\t" + "sall %%edx \n\t" // move high bit to CF + "jnc skip32 \n\t" // if CF = 0 + "movl (%%esi), %%eax \n\t" + "movl %%eax, (%%edi) \n\t" + + "skip32: \n\t" + "addl $4, %%esi \n\t" + "addl $4, %%edi \n\t" + "decl %%ecx \n\t" + "jnz secondloop32 \n\t" + + "end32: \n\t" + "EMMS \n\t" // DONE + + : "=a" (dummy_value_a), // output regs (dummy) + "=d" (dummy_value_d), + "=c" (dummy_value_c), + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "3" (srcptr), // esi // input regs + "4" (dstptr), // edi + "0" (diff), // eax +// was (unmask) "b" RESERVED // ebx // Global Offset Table idx + "2" (len), // ecx + "1" (mask) // edx + +#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0", "%mm1", "%mm2", "%mm3" // clobber list + , "%mm4", "%mm5", "%mm6", "%mm7" +#endif + ); + } + else /* mmx _not supported - Use modified C routine */ +#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ + { + register png_uint_32 i; + png_uint_32 initial_val = BPP4 * png_pass_start[png_ptr->pass]; + /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ + register int stride = BPP4 * png_pass_inc[png_ptr->pass]; + /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ + register int rep_bytes = BPP4 * png_pass_width[png_ptr->pass]; + /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ + png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ + int diff = (int) (png_ptr->width & 7); /* amount lost */ + register png_uint_32 final_val = BPP4 * len; /* GRR bugfix */ + + srcptr = png_ptr->row_buf + 1 + initial_val; + dstptr = row + initial_val; + + for (i = initial_val; i < final_val; i += stride) + { + png_memcpy(dstptr, srcptr, rep_bytes); + srcptr += stride; + dstptr += stride; + } + if (diff) /* number of leftover pixels: 3 for pngtest */ + { + final_val+=diff*BPP4; + for (; i < final_val; i += stride) + { + if (rep_bytes > (int)(final_val-i)) + rep_bytes = (int)(final_val-i); + png_memcpy(dstptr, srcptr, rep_bytes); + srcptr += stride; + dstptr += stride; + } + } + } /* end of else (_mmx_supported) */ + + break; + } /* end 32 bpp */ + + case 48: /* png_ptr->row_info.pixel_depth */ + { + png_bytep srcptr; + png_bytep dstptr; + +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) +#if !defined(PNG_1_0_X) + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) + /* && _mmx_supported */ ) +#else + if (_mmx_supported) +#endif + { + png_uint_32 len; + int diff; + int dummy_value_a; // fix 'forbidden register spilled' error + int dummy_value_d; + int dummy_value_c; + int dummy_value_S; + int dummy_value_D; + _unmask = ~mask; // global variable for -fPIC version + srcptr = png_ptr->row_buf + 1; + dstptr = row; + len = png_ptr->width &~7; // reduce to multiple of 8 + diff = (int) (png_ptr->width & 7); // amount lost // + + __asm__ __volatile__ ( + "movd _unmask, %%mm7 \n\t" // load bit pattern + "psubb %%mm6, %%mm6 \n\t" // zero mm6 + "punpcklbw %%mm7, %%mm7 \n\t" + "punpcklwd %%mm7, %%mm7 \n\t" + "punpckldq %%mm7, %%mm7 \n\t" // fill reg with 8 masks + + "movq _mask48_0, %%mm0 \n\t" + "movq _mask48_1, %%mm1 \n\t" + "movq _mask48_2, %%mm2 \n\t" + "movq _mask48_3, %%mm3 \n\t" + "movq _mask48_4, %%mm4 \n\t" + "movq _mask48_5, %%mm5 \n\t" + + "pand %%mm7, %%mm0 \n\t" + "pand %%mm7, %%mm1 \n\t" + "pand %%mm7, %%mm2 \n\t" + "pand %%mm7, %%mm3 \n\t" + "pand %%mm7, %%mm4 \n\t" + "pand %%mm7, %%mm5 \n\t" + + "pcmpeqb %%mm6, %%mm0 \n\t" + "pcmpeqb %%mm6, %%mm1 \n\t" + "pcmpeqb %%mm6, %%mm2 \n\t" + "pcmpeqb %%mm6, %%mm3 \n\t" + "pcmpeqb %%mm6, %%mm4 \n\t" + "pcmpeqb %%mm6, %%mm5 \n\t" + +// preload "movl len, %%ecx \n\t" // load length of line +// preload "movl srcptr, %%esi \n\t" // load source +// preload "movl dstptr, %%edi \n\t" // load dest + + "cmpl $0, %%ecx \n\t" + "jz mainloop48end \n\t" + + "mainloop48: \n\t" + "movq (%%esi), %%mm7 \n\t" + "pand %%mm0, %%mm7 \n\t" + "movq %%mm0, %%mm6 \n\t" + "pandn (%%edi), %%mm6 \n\t" + "por %%mm6, %%mm7 \n\t" + "movq %%mm7, (%%edi) \n\t" + + "movq 8(%%esi), %%mm6 \n\t" + "pand %%mm1, %%mm6 \n\t" + "movq %%mm1, %%mm7 \n\t" + "pandn 8(%%edi), %%mm7 \n\t" + "por %%mm7, %%mm6 \n\t" + "movq %%mm6, 8(%%edi) \n\t" + + "movq 16(%%esi), %%mm6 \n\t" + "pand %%mm2, %%mm6 \n\t" + "movq %%mm2, %%mm7 \n\t" + "pandn 16(%%edi), %%mm7 \n\t" + "por %%mm7, %%mm6 \n\t" + "movq %%mm6, 16(%%edi) \n\t" + + "movq 24(%%esi), %%mm7 \n\t" + "pand %%mm3, %%mm7 \n\t" + "movq %%mm3, %%mm6 \n\t" + "pandn 24(%%edi), %%mm6 \n\t" + "por %%mm6, %%mm7 \n\t" + "movq %%mm7, 24(%%edi) \n\t" + + "movq 32(%%esi), %%mm6 \n\t" + "pand %%mm4, %%mm6 \n\t" + "movq %%mm4, %%mm7 \n\t" + "pandn 32(%%edi), %%mm7 \n\t" + "por %%mm7, %%mm6 \n\t" + "movq %%mm6, 32(%%edi) \n\t" + + "movq 40(%%esi), %%mm7 \n\t" + "pand %%mm5, %%mm7 \n\t" + "movq %%mm5, %%mm6 \n\t" + "pandn 40(%%edi), %%mm6 \n\t" + "por %%mm6, %%mm7 \n\t" + "movq %%mm7, 40(%%edi) \n\t" + + "addl $48, %%esi \n\t" // inc by 48 bytes processed + "addl $48, %%edi \n\t" + "subl $8, %%ecx \n\t" // dec by 8 pixels processed + + "ja mainloop48 \n\t" + + "mainloop48end: \n\t" +// preload "movl diff, %%ecx \n\t" // (diff is in eax) + "movl %%eax, %%ecx \n\t" + "cmpl $0, %%ecx \n\t" + "jz end48 \n\t" +// preload "movl mask, %%edx \n\t" + "sall $24, %%edx \n\t" // make low byte, high byte + + "secondloop48: \n\t" + "sall %%edx \n\t" // move high bit to CF + "jnc skip48 \n\t" // if CF = 0 + "movl (%%esi), %%eax \n\t" + "movl %%eax, (%%edi) \n\t" + + "skip48: \n\t" + "addl $4, %%esi \n\t" + "addl $4, %%edi \n\t" + "decl %%ecx \n\t" + "jnz secondloop48 \n\t" + + "end48: \n\t" + "EMMS \n\t" // DONE + + : "=a" (dummy_value_a), // output regs (dummy) + "=d" (dummy_value_d), + "=c" (dummy_value_c), + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "3" (srcptr), // esi // input regs + "4" (dstptr), // edi + "0" (diff), // eax +// was (unmask) "b" RESERVED // ebx // Global Offset Table idx + "2" (len), // ecx + "1" (mask) // edx + +#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0", "%mm1", "%mm2", "%mm3" // clobber list + , "%mm4", "%mm5", "%mm6", "%mm7" +#endif + ); + } + else /* mmx _not supported - Use modified C routine */ +#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ + { + register png_uint_32 i; + png_uint_32 initial_val = BPP6 * png_pass_start[png_ptr->pass]; + /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ + register int stride = BPP6 * png_pass_inc[png_ptr->pass]; + /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ + register int rep_bytes = BPP6 * png_pass_width[png_ptr->pass]; + /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ + png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ + int diff = (int) (png_ptr->width & 7); /* amount lost */ + register png_uint_32 final_val = BPP6 * len; /* GRR bugfix */ + + srcptr = png_ptr->row_buf + 1 + initial_val; + dstptr = row + initial_val; + + for (i = initial_val; i < final_val; i += stride) + { + png_memcpy(dstptr, srcptr, rep_bytes); + srcptr += stride; + dstptr += stride; + } + if (diff) /* number of leftover pixels: 3 for pngtest */ + { + final_val+=diff*BPP6; + for (; i < final_val; i += stride) + { + if (rep_bytes > (int)(final_val-i)) + rep_bytes = (int)(final_val-i); + png_memcpy(dstptr, srcptr, rep_bytes); + srcptr += stride; + dstptr += stride; + } + } + } /* end of else (_mmx_supported) */ + + break; + } /* end 48 bpp */ + + case 64: /* png_ptr->row_info.pixel_depth */ + { + png_bytep srcptr; + png_bytep dstptr; + register png_uint_32 i; + png_uint_32 initial_val = BPP8 * png_pass_start[png_ptr->pass]; + /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ + register int stride = BPP8 * png_pass_inc[png_ptr->pass]; + /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ + register int rep_bytes = BPP8 * png_pass_width[png_ptr->pass]; + /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ + png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ + int diff = (int) (png_ptr->width & 7); /* amount lost */ + register png_uint_32 final_val = BPP8 * len; /* GRR bugfix */ + + srcptr = png_ptr->row_buf + 1 + initial_val; + dstptr = row + initial_val; + + for (i = initial_val; i < final_val; i += stride) + { + png_memcpy(dstptr, srcptr, rep_bytes); + srcptr += stride; + dstptr += stride; + } + if (diff) /* number of leftover pixels: 3 for pngtest */ + { + final_val+=diff*BPP8; + for (; i < final_val; i += stride) + { + if (rep_bytes > (int)(final_val-i)) + rep_bytes = (int)(final_val-i); + png_memcpy(dstptr, srcptr, rep_bytes); + srcptr += stride; + dstptr += stride; + } + } + + break; + } /* end 64 bpp */ + + default: /* png_ptr->row_info.pixel_depth != 1,2,4,8,16,24,32,48,64 */ + { + /* this should never happen */ + png_warning(png_ptr, "Invalid row_info.pixel_depth in pnggccrd"); + break; + } + } /* end switch (png_ptr->row_info.pixel_depth) */ + + } /* end if (non-trivial mask) */ + +} /* end png_combine_row() */ + +#endif /* PNG_HAVE_ASSEMBLER_COMBINE_ROW */ + + + + +/*===========================================================================*/ +/* */ +/* P N G _ D O _ R E A D _ I N T E R L A C E */ +/* */ +/*===========================================================================*/ + +#if defined(PNG_READ_INTERLACING_SUPPORTED) +#if defined(PNG_HAVE_ASSEMBLER_READ_INTERLACE) + +/* png_do_read_interlace() is called after any 16-bit to 8-bit conversion + * has taken place. [GRR: what other steps come before and/or after?] + */ + +void /* PRIVATE */ +png_do_read_interlace(png_structp png_ptr) +{ + png_row_infop row_info = &(png_ptr->row_info); + png_bytep row = png_ptr->row_buf + 1; + int pass = png_ptr->pass; +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + png_uint_32 transformations = png_ptr->transformations; +#endif + + png_debug(1, "in png_do_read_interlace (pnggccrd.c)\n"); + +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) + if (_mmx_supported == 2) { +#if !defined(PNG_1_0_X) + /* this should have happened in png_init_mmx_flags() already */ + png_warning(png_ptr, "asm_flags may not have been initialized"); +#endif + png_mmx_support(); + } +#endif + + if (row != NULL && row_info != NULL) + { + png_uint_32 final_width; + + final_width = row_info->width * png_pass_inc[pass]; + + switch (row_info->pixel_depth) + { + case 1: + { + png_bytep sp, dp; + int sshift, dshift; + int s_start, s_end, s_inc; + png_byte v; + png_uint_32 i; + int j; + + sp = row + (png_size_t)((row_info->width - 1) >> 3); + dp = row + (png_size_t)((final_width - 1) >> 3); +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + if (transformations & PNG_PACKSWAP) + { + sshift = (int)((row_info->width + 7) & 7); + dshift = (int)((final_width + 7) & 7); + s_start = 7; + s_end = 0; + s_inc = -1; + } + else +#endif + { + sshift = 7 - (int)((row_info->width + 7) & 7); + dshift = 7 - (int)((final_width + 7) & 7); + s_start = 0; + s_end = 7; + s_inc = 1; + } + + for (i = row_info->width; i; i--) + { + v = (png_byte)((*sp >> sshift) & 0x1); + for (j = 0; j < png_pass_inc[pass]; j++) + { + *dp &= (png_byte)((0x7f7f >> (7 - dshift)) & 0xff); + *dp |= (png_byte)(v << dshift); + if (dshift == s_end) + { + dshift = s_start; + dp--; + } + else + dshift += s_inc; + } + if (sshift == s_end) + { + sshift = s_start; + sp--; + } + else + sshift += s_inc; + } + break; + } + + case 2: + { + png_bytep sp, dp; + int sshift, dshift; + int s_start, s_end, s_inc; + png_uint_32 i; + + sp = row + (png_size_t)((row_info->width - 1) >> 2); + dp = row + (png_size_t)((final_width - 1) >> 2); +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + if (transformations & PNG_PACKSWAP) + { + sshift = (png_size_t)(((row_info->width + 3) & 3) << 1); + dshift = (png_size_t)(((final_width + 3) & 3) << 1); + s_start = 6; + s_end = 0; + s_inc = -2; + } + else +#endif + { + sshift = (png_size_t)((3 - ((row_info->width + 3) & 3)) << 1); + dshift = (png_size_t)((3 - ((final_width + 3) & 3)) << 1); + s_start = 0; + s_end = 6; + s_inc = 2; + } + + for (i = row_info->width; i; i--) + { + png_byte v; + int j; + + v = (png_byte)((*sp >> sshift) & 0x3); + for (j = 0; j < png_pass_inc[pass]; j++) + { + *dp &= (png_byte)((0x3f3f >> (6 - dshift)) & 0xff); + *dp |= (png_byte)(v << dshift); + if (dshift == s_end) + { + dshift = s_start; + dp--; + } + else + dshift += s_inc; + } + if (sshift == s_end) + { + sshift = s_start; + sp--; + } + else + sshift += s_inc; + } + break; + } + + case 4: + { + png_bytep sp, dp; + int sshift, dshift; + int s_start, s_end, s_inc; + png_uint_32 i; + + sp = row + (png_size_t)((row_info->width - 1) >> 1); + dp = row + (png_size_t)((final_width - 1) >> 1); +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + if (transformations & PNG_PACKSWAP) + { + sshift = (png_size_t)(((row_info->width + 1) & 1) << 2); + dshift = (png_size_t)(((final_width + 1) & 1) << 2); + s_start = 4; + s_end = 0; + s_inc = -4; + } + else +#endif + { + sshift = (png_size_t)((1 - ((row_info->width + 1) & 1)) << 2); + dshift = (png_size_t)((1 - ((final_width + 1) & 1)) << 2); + s_start = 0; + s_end = 4; + s_inc = 4; + } + + for (i = row_info->width; i; i--) + { + png_byte v; + int j; + + v = (png_byte)((*sp >> sshift) & 0xf); + for (j = 0; j < png_pass_inc[pass]; j++) + { + *dp &= (png_byte)((0xf0f >> (4 - dshift)) & 0xff); + *dp |= (png_byte)(v << dshift); + if (dshift == s_end) + { + dshift = s_start; + dp--; + } + else + dshift += s_inc; + } + if (sshift == s_end) + { + sshift = s_start; + sp--; + } + else + sshift += s_inc; + } + break; + } + + /*====================================================================*/ + + default: /* 8-bit or larger (this is where the routine is modified) */ + { +#if 0 +// static unsigned long long _const4 = 0x0000000000FFFFFFLL; no good +// static unsigned long long const4 = 0x0000000000FFFFFFLL; no good +// unsigned long long _const4 = 0x0000000000FFFFFFLL; no good +// unsigned long long const4 = 0x0000000000FFFFFFLL; no good +#endif + png_bytep sptr, dp; + png_uint_32 i; + png_size_t pixel_bytes; + int width = (int)row_info->width; + + pixel_bytes = (row_info->pixel_depth >> 3); + + /* point sptr at the last pixel in the pre-expanded row: */ + sptr = row + (width - 1) * pixel_bytes; + + /* point dp at the last pixel position in the expanded row: */ + dp = row + (final_width - 1) * pixel_bytes; + + /* New code by Nirav Chhatrapati - Intel Corporation */ + +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) +#if !defined(PNG_1_0_X) + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_INTERLACE) + /* && _mmx_supported */ ) +#else + if (_mmx_supported) +#endif + { + //-------------------------------------------------------------- + if (pixel_bytes == 3) + { + if (((pass == 0) || (pass == 1)) && width) + { + int dummy_value_c; // fix 'forbidden register spilled' + int dummy_value_S; + int dummy_value_D; + + __asm__ __volatile__ ( + "subl $21, %%edi \n\t" + // (png_pass_inc[pass] - 1)*pixel_bytes + + ".loop3_pass0: \n\t" + "movd (%%esi), %%mm0 \n\t" // x x x x x 2 1 0 + "pand _const4, %%mm0 \n\t" // z z z z z 2 1 0 + "movq %%mm0, %%mm1 \n\t" // z z z z z 2 1 0 + "psllq $16, %%mm0 \n\t" // z z z 2 1 0 z z + "movq %%mm0, %%mm2 \n\t" // z z z 2 1 0 z z + "psllq $24, %%mm0 \n\t" // 2 1 0 z z z z z + "psrlq $8, %%mm1 \n\t" // z z z z z z 2 1 + "por %%mm2, %%mm0 \n\t" // 2 1 0 2 1 0 z z + "por %%mm1, %%mm0 \n\t" // 2 1 0 2 1 0 2 1 + "movq %%mm0, %%mm3 \n\t" // 2 1 0 2 1 0 2 1 + "psllq $16, %%mm0 \n\t" // 0 2 1 0 2 1 z z + "movq %%mm3, %%mm4 \n\t" // 2 1 0 2 1 0 2 1 + "punpckhdq %%mm0, %%mm3 \n\t" // 0 2 1 0 2 1 0 2 + "movq %%mm4, 16(%%edi) \n\t" + "psrlq $32, %%mm0 \n\t" // z z z z 0 2 1 0 + "movq %%mm3, 8(%%edi) \n\t" + "punpckldq %%mm4, %%mm0 \n\t" // 1 0 2 1 0 2 1 0 + "subl $3, %%esi \n\t" + "movq %%mm0, (%%edi) \n\t" + "subl $24, %%edi \n\t" + "decl %%ecx \n\t" + "jnz .loop3_pass0 \n\t" + "EMMS \n\t" // DONE + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "1" (sptr), // esi // input regs + "2" (dp), // edi + "0" (width) // ecx +// doesn't work "i" (0x0000000000FFFFFFLL) // %1 (a.k.a. _const4) + +#if 0 /* %mm0, ..., %mm4 not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0", "%mm1", "%mm2" // clobber list + , "%mm3", "%mm4" +#endif + ); + } + else if (((pass == 2) || (pass == 3)) && width) + { + int dummy_value_c; // fix 'forbidden register spilled' + int dummy_value_S; + int dummy_value_D; + + __asm__ __volatile__ ( + "subl $9, %%edi \n\t" + // (png_pass_inc[pass] - 1)*pixel_bytes + + ".loop3_pass2: \n\t" + "movd (%%esi), %%mm0 \n\t" // x x x x x 2 1 0 + "pand _const4, %%mm0 \n\t" // z z z z z 2 1 0 + "movq %%mm0, %%mm1 \n\t" // z z z z z 2 1 0 + "psllq $16, %%mm0 \n\t" // z z z 2 1 0 z z + "movq %%mm0, %%mm2 \n\t" // z z z 2 1 0 z z + "psllq $24, %%mm0 \n\t" // 2 1 0 z z z z z + "psrlq $8, %%mm1 \n\t" // z z z z z z 2 1 + "por %%mm2, %%mm0 \n\t" // 2 1 0 2 1 0 z z + "por %%mm1, %%mm0 \n\t" // 2 1 0 2 1 0 2 1 + "movq %%mm0, 4(%%edi) \n\t" + "psrlq $16, %%mm0 \n\t" // z z 2 1 0 2 1 0 + "subl $3, %%esi \n\t" + "movd %%mm0, (%%edi) \n\t" + "subl $12, %%edi \n\t" + "decl %%ecx \n\t" + "jnz .loop3_pass2 \n\t" + "EMMS \n\t" // DONE + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "1" (sptr), // esi // input regs + "2" (dp), // edi + "0" (width) // ecx + +#if 0 /* %mm0, ..., %mm2 not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0", "%mm1", "%mm2" // clobber list +#endif + ); + } + else if (width) /* && ((pass == 4) || (pass == 5)) */ + { + int width_mmx = ((width >> 1) << 1) - 8; // GRR: huh? + if (width_mmx < 0) + width_mmx = 0; + width -= width_mmx; // 8 or 9 pix, 24 or 27 bytes + if (width_mmx) + { + // png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; + // sptr points at last pixel in pre-expanded row + // dp points at last pixel position in expanded row + int dummy_value_c; // fix 'forbidden register spilled' + int dummy_value_S; + int dummy_value_D; + + __asm__ __volatile__ ( + "subl $3, %%esi \n\t" + "subl $9, %%edi \n\t" + // (png_pass_inc[pass] + 1)*pixel_bytes + + ".loop3_pass4: \n\t" + "movq (%%esi), %%mm0 \n\t" // x x 5 4 3 2 1 0 + "movq %%mm0, %%mm1 \n\t" // x x 5 4 3 2 1 0 + "movq %%mm0, %%mm2 \n\t" // x x 5 4 3 2 1 0 + "psllq $24, %%mm0 \n\t" // 4 3 2 1 0 z z z + "pand _const4, %%mm1 \n\t" // z z z z z 2 1 0 + "psrlq $24, %%mm2 \n\t" // z z z x x 5 4 3 + "por %%mm1, %%mm0 \n\t" // 4 3 2 1 0 2 1 0 + "movq %%mm2, %%mm3 \n\t" // z z z x x 5 4 3 + "psllq $8, %%mm2 \n\t" // z z x x 5 4 3 z + "movq %%mm0, (%%edi) \n\t" + "psrlq $16, %%mm3 \n\t" // z z z z z x x 5 + "pand _const6, %%mm3 \n\t" // z z z z z z z 5 + "por %%mm3, %%mm2 \n\t" // z z x x 5 4 3 5 + "subl $6, %%esi \n\t" + "movd %%mm2, 8(%%edi) \n\t" + "subl $12, %%edi \n\t" + "subl $2, %%ecx \n\t" + "jnz .loop3_pass4 \n\t" + "EMMS \n\t" // DONE + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "1" (sptr), // esi // input regs + "2" (dp), // edi + "0" (width_mmx) // ecx + +#if 0 /* %mm0, ..., %mm3 not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0", "%mm1" // clobber list + , "%mm2", "%mm3" +#endif + ); + } + + sptr -= width_mmx*3; + dp -= width_mmx*6; + for (i = width; i; i--) + { + png_byte v[8]; + int j; + + png_memcpy(v, sptr, 3); + for (j = 0; j < png_pass_inc[pass]; j++) + { + png_memcpy(dp, v, 3); + dp -= 3; + } + sptr -= 3; + } + } + } /* end of pixel_bytes == 3 */ + + //-------------------------------------------------------------- + else if (pixel_bytes == 1) + { + if (((pass == 0) || (pass == 1)) && width) + { + int width_mmx = ((width >> 2) << 2); + width -= width_mmx; // 0-3 pixels => 0-3 bytes + if (width_mmx) + { + int dummy_value_c; // fix 'forbidden register spilled' + int dummy_value_S; + int dummy_value_D; + + __asm__ __volatile__ ( + "subl $3, %%esi \n\t" + "subl $31, %%edi \n\t" + + ".loop1_pass0: \n\t" + "movd (%%esi), %%mm0 \n\t" // x x x x 3 2 1 0 + "movq %%mm0, %%mm1 \n\t" // x x x x 3 2 1 0 + "punpcklbw %%mm0, %%mm0 \n\t" // 3 3 2 2 1 1 0 0 + "movq %%mm0, %%mm2 \n\t" // 3 3 2 2 1 1 0 0 + "punpcklwd %%mm0, %%mm0 \n\t" // 1 1 1 1 0 0 0 0 + "movq %%mm0, %%mm3 \n\t" // 1 1 1 1 0 0 0 0 + "punpckldq %%mm0, %%mm0 \n\t" // 0 0 0 0 0 0 0 0 + "punpckhdq %%mm3, %%mm3 \n\t" // 1 1 1 1 1 1 1 1 + "movq %%mm0, (%%edi) \n\t" + "punpckhwd %%mm2, %%mm2 \n\t" // 3 3 3 3 2 2 2 2 + "movq %%mm3, 8(%%edi) \n\t" + "movq %%mm2, %%mm4 \n\t" // 3 3 3 3 2 2 2 2 + "punpckldq %%mm2, %%mm2 \n\t" // 2 2 2 2 2 2 2 2 + "punpckhdq %%mm4, %%mm4 \n\t" // 3 3 3 3 3 3 3 3 + "movq %%mm2, 16(%%edi) \n\t" + "subl $4, %%esi \n\t" + "movq %%mm4, 24(%%edi) \n\t" + "subl $32, %%edi \n\t" + "subl $4, %%ecx \n\t" + "jnz .loop1_pass0 \n\t" + "EMMS \n\t" // DONE + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "1" (sptr), // esi // input regs + "2" (dp), // edi + "0" (width_mmx) // ecx + +#if 0 /* %mm0, ..., %mm4 not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0", "%mm1", "%mm2" // clobber list + , "%mm3", "%mm4" +#endif + ); + } + + sptr -= width_mmx; + dp -= width_mmx*8; + for (i = width; i; i--) + { + int j; + + /* I simplified this part in version 1.0.4e + * here and in several other instances where + * pixel_bytes == 1 -- GR-P + * + * Original code: + * + * png_byte v[8]; + * png_memcpy(v, sptr, pixel_bytes); + * for (j = 0; j < png_pass_inc[pass]; j++) + * { + * png_memcpy(dp, v, pixel_bytes); + * dp -= pixel_bytes; + * } + * sptr -= pixel_bytes; + * + * Replacement code is in the next three lines: + */ + + for (j = 0; j < png_pass_inc[pass]; j++) + { + *dp-- = *sptr; + } + --sptr; + } + } + else if (((pass == 2) || (pass == 3)) && width) + { + int width_mmx = ((width >> 2) << 2); + width -= width_mmx; // 0-3 pixels => 0-3 bytes + if (width_mmx) + { + int dummy_value_c; // fix 'forbidden register spilled' + int dummy_value_S; + int dummy_value_D; + + __asm__ __volatile__ ( + "subl $3, %%esi \n\t" + "subl $15, %%edi \n\t" + + ".loop1_pass2: \n\t" + "movd (%%esi), %%mm0 \n\t" // x x x x 3 2 1 0 + "punpcklbw %%mm0, %%mm0 \n\t" // 3 3 2 2 1 1 0 0 + "movq %%mm0, %%mm1 \n\t" // 3 3 2 2 1 1 0 0 + "punpcklwd %%mm0, %%mm0 \n\t" // 1 1 1 1 0 0 0 0 + "punpckhwd %%mm1, %%mm1 \n\t" // 3 3 3 3 2 2 2 2 + "movq %%mm0, (%%edi) \n\t" + "subl $4, %%esi \n\t" + "movq %%mm1, 8(%%edi) \n\t" + "subl $16, %%edi \n\t" + "subl $4, %%ecx \n\t" + "jnz .loop1_pass2 \n\t" + "EMMS \n\t" // DONE + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "1" (sptr), // esi // input regs + "2" (dp), // edi + "0" (width_mmx) // ecx + +#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0", "%mm1" // clobber list +#endif + ); + } + + sptr -= width_mmx; + dp -= width_mmx*4; + for (i = width; i; i--) + { + int j; + + for (j = 0; j < png_pass_inc[pass]; j++) + { + *dp-- = *sptr; + } + --sptr; + } + } + else if (width) /* && ((pass == 4) || (pass == 5)) */ + { + int width_mmx = ((width >> 3) << 3); + width -= width_mmx; // 0-3 pixels => 0-3 bytes + if (width_mmx) + { + int dummy_value_c; // fix 'forbidden register spilled' + int dummy_value_S; + int dummy_value_D; + + __asm__ __volatile__ ( + "subl $7, %%esi \n\t" + "subl $15, %%edi \n\t" + + ".loop1_pass4: \n\t" + "movq (%%esi), %%mm0 \n\t" // 7 6 5 4 3 2 1 0 + "movq %%mm0, %%mm1 \n\t" // 7 6 5 4 3 2 1 0 + "punpcklbw %%mm0, %%mm0 \n\t" // 3 3 2 2 1 1 0 0 + "punpckhbw %%mm1, %%mm1 \n\t" // 7 7 6 6 5 5 4 4 + "movq %%mm1, 8(%%edi) \n\t" + "subl $8, %%esi \n\t" + "movq %%mm0, (%%edi) \n\t" + "subl $16, %%edi \n\t" + "subl $8, %%ecx \n\t" + "jnz .loop1_pass4 \n\t" + "EMMS \n\t" // DONE + + : "=c" (dummy_value_c), // output regs (none) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "1" (sptr), // esi // input regs + "2" (dp), // edi + "0" (width_mmx) // ecx + +#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0", "%mm1" // clobber list +#endif + ); + } + + sptr -= width_mmx; + dp -= width_mmx*2; + for (i = width; i; i--) + { + int j; + + for (j = 0; j < png_pass_inc[pass]; j++) + { + *dp-- = *sptr; + } + --sptr; + } + } + } /* end of pixel_bytes == 1 */ + + //-------------------------------------------------------------- + else if (pixel_bytes == 2) + { + if (((pass == 0) || (pass == 1)) && width) + { + int width_mmx = ((width >> 1) << 1); + width -= width_mmx; // 0,1 pixels => 0,2 bytes + if (width_mmx) + { + int dummy_value_c; // fix 'forbidden register spilled' + int dummy_value_S; + int dummy_value_D; + + __asm__ __volatile__ ( + "subl $2, %%esi \n\t" + "subl $30, %%edi \n\t" + + ".loop2_pass0: \n\t" + "movd (%%esi), %%mm0 \n\t" // x x x x 3 2 1 0 + "punpcklwd %%mm0, %%mm0 \n\t" // 3 2 3 2 1 0 1 0 + "movq %%mm0, %%mm1 \n\t" // 3 2 3 2 1 0 1 0 + "punpckldq %%mm0, %%mm0 \n\t" // 1 0 1 0 1 0 1 0 + "punpckhdq %%mm1, %%mm1 \n\t" // 3 2 3 2 3 2 3 2 + "movq %%mm0, (%%edi) \n\t" + "movq %%mm0, 8(%%edi) \n\t" + "movq %%mm1, 16(%%edi) \n\t" + "subl $4, %%esi \n\t" + "movq %%mm1, 24(%%edi) \n\t" + "subl $32, %%edi \n\t" + "subl $2, %%ecx \n\t" + "jnz .loop2_pass0 \n\t" + "EMMS \n\t" // DONE + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "1" (sptr), // esi // input regs + "2" (dp), // edi + "0" (width_mmx) // ecx + +#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0", "%mm1" // clobber list +#endif + ); + } + + sptr -= (width_mmx*2 - 2); // sign fixed + dp -= (width_mmx*16 - 2); // sign fixed + for (i = width; i; i--) + { + png_byte v[8]; + int j; + sptr -= 2; + png_memcpy(v, sptr, 2); + for (j = 0; j < png_pass_inc[pass]; j++) + { + dp -= 2; + png_memcpy(dp, v, 2); + } + } + } + else if (((pass == 2) || (pass == 3)) && width) + { + int width_mmx = ((width >> 1) << 1) ; + width -= width_mmx; // 0,1 pixels => 0,2 bytes + if (width_mmx) + { + int dummy_value_c; // fix 'forbidden register spilled' + int dummy_value_S; + int dummy_value_D; + + __asm__ __volatile__ ( + "subl $2, %%esi \n\t" + "subl $14, %%edi \n\t" + + ".loop2_pass2: \n\t" + "movd (%%esi), %%mm0 \n\t" // x x x x 3 2 1 0 + "punpcklwd %%mm0, %%mm0 \n\t" // 3 2 3 2 1 0 1 0 + "movq %%mm0, %%mm1 \n\t" // 3 2 3 2 1 0 1 0 + "punpckldq %%mm0, %%mm0 \n\t" // 1 0 1 0 1 0 1 0 + "punpckhdq %%mm1, %%mm1 \n\t" // 3 2 3 2 3 2 3 2 + "movq %%mm0, (%%edi) \n\t" + "subl $4, %%esi \n\t" + "movq %%mm1, 8(%%edi) \n\t" + "subl $16, %%edi \n\t" + "subl $2, %%ecx \n\t" + "jnz .loop2_pass2 \n\t" + "EMMS \n\t" // DONE + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "1" (sptr), // esi // input regs + "2" (dp), // edi + "0" (width_mmx) // ecx + +#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0", "%mm1" // clobber list +#endif + ); + } + + sptr -= (width_mmx*2 - 2); // sign fixed + dp -= (width_mmx*8 - 2); // sign fixed + for (i = width; i; i--) + { + png_byte v[8]; + int j; + sptr -= 2; + png_memcpy(v, sptr, 2); + for (j = 0; j < png_pass_inc[pass]; j++) + { + dp -= 2; + png_memcpy(dp, v, 2); + } + } + } + else if (width) // pass == 4 or 5 + { + int width_mmx = ((width >> 1) << 1) ; + width -= width_mmx; // 0,1 pixels => 0,2 bytes + if (width_mmx) + { + int dummy_value_c; // fix 'forbidden register spilled' + int dummy_value_S; + int dummy_value_D; + + __asm__ __volatile__ ( + "subl $2, %%esi \n\t" + "subl $6, %%edi \n\t" + + ".loop2_pass4: \n\t" + "movd (%%esi), %%mm0 \n\t" // x x x x 3 2 1 0 + "punpcklwd %%mm0, %%mm0 \n\t" // 3 2 3 2 1 0 1 0 + "subl $4, %%esi \n\t" + "movq %%mm0, (%%edi) \n\t" + "subl $8, %%edi \n\t" + "subl $2, %%ecx \n\t" + "jnz .loop2_pass4 \n\t" + "EMMS \n\t" // DONE + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "1" (sptr), // esi // input regs + "2" (dp), // edi + "0" (width_mmx) // ecx + +#if 0 /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0" // clobber list +#endif + ); + } + + sptr -= (width_mmx*2 - 2); // sign fixed + dp -= (width_mmx*4 - 2); // sign fixed + for (i = width; i; i--) + { + png_byte v[8]; + int j; + sptr -= 2; + png_memcpy(v, sptr, 2); + for (j = 0; j < png_pass_inc[pass]; j++) + { + dp -= 2; + png_memcpy(dp, v, 2); + } + } + } + } /* end of pixel_bytes == 2 */ + + //-------------------------------------------------------------- + else if (pixel_bytes == 4) + { + if (((pass == 0) || (pass == 1)) && width) + { + int width_mmx = ((width >> 1) << 1); + width -= width_mmx; // 0,1 pixels => 0,4 bytes + if (width_mmx) + { + int dummy_value_c; // fix 'forbidden register spilled' + int dummy_value_S; + int dummy_value_D; + + __asm__ __volatile__ ( + "subl $4, %%esi \n\t" + "subl $60, %%edi \n\t" + + ".loop4_pass0: \n\t" + "movq (%%esi), %%mm0 \n\t" // 7 6 5 4 3 2 1 0 + "movq %%mm0, %%mm1 \n\t" // 7 6 5 4 3 2 1 0 + "punpckldq %%mm0, %%mm0 \n\t" // 3 2 1 0 3 2 1 0 + "punpckhdq %%mm1, %%mm1 \n\t" // 7 6 5 4 7 6 5 4 + "movq %%mm0, (%%edi) \n\t" + "movq %%mm0, 8(%%edi) \n\t" + "movq %%mm0, 16(%%edi) \n\t" + "movq %%mm0, 24(%%edi) \n\t" + "movq %%mm1, 32(%%edi) \n\t" + "movq %%mm1, 40(%%edi) \n\t" + "movq %%mm1, 48(%%edi) \n\t" + "subl $8, %%esi \n\t" + "movq %%mm1, 56(%%edi) \n\t" + "subl $64, %%edi \n\t" + "subl $2, %%ecx \n\t" + "jnz .loop4_pass0 \n\t" + "EMMS \n\t" // DONE + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "1" (sptr), // esi // input regs + "2" (dp), // edi + "0" (width_mmx) // ecx + +#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0", "%mm1" // clobber list +#endif + ); + } + + sptr -= (width_mmx*4 - 4); // sign fixed + dp -= (width_mmx*32 - 4); // sign fixed + for (i = width; i; i--) + { + png_byte v[8]; + int j; + sptr -= 4; + png_memcpy(v, sptr, 4); + for (j = 0; j < png_pass_inc[pass]; j++) + { + dp -= 4; + png_memcpy(dp, v, 4); + } + } + } + else if (((pass == 2) || (pass == 3)) && width) + { + int width_mmx = ((width >> 1) << 1); + width -= width_mmx; // 0,1 pixels => 0,4 bytes + if (width_mmx) + { + int dummy_value_c; // fix 'forbidden register spilled' + int dummy_value_S; + int dummy_value_D; + + __asm__ __volatile__ ( + "subl $4, %%esi \n\t" + "subl $28, %%edi \n\t" + + ".loop4_pass2: \n\t" + "movq (%%esi), %%mm0 \n\t" // 7 6 5 4 3 2 1 0 + "movq %%mm0, %%mm1 \n\t" // 7 6 5 4 3 2 1 0 + "punpckldq %%mm0, %%mm0 \n\t" // 3 2 1 0 3 2 1 0 + "punpckhdq %%mm1, %%mm1 \n\t" // 7 6 5 4 7 6 5 4 + "movq %%mm0, (%%edi) \n\t" + "movq %%mm0, 8(%%edi) \n\t" + "movq %%mm1, 16(%%edi) \n\t" + "movq %%mm1, 24(%%edi) \n\t" + "subl $8, %%esi \n\t" + "subl $32, %%edi \n\t" + "subl $2, %%ecx \n\t" + "jnz .loop4_pass2 \n\t" + "EMMS \n\t" // DONE + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "1" (sptr), // esi // input regs + "2" (dp), // edi + "0" (width_mmx) // ecx + +#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0", "%mm1" // clobber list +#endif + ); + } + + sptr -= (width_mmx*4 - 4); // sign fixed + dp -= (width_mmx*16 - 4); // sign fixed + for (i = width; i; i--) + { + png_byte v[8]; + int j; + sptr -= 4; + png_memcpy(v, sptr, 4); + for (j = 0; j < png_pass_inc[pass]; j++) + { + dp -= 4; + png_memcpy(dp, v, 4); + } + } + } + else if (width) // pass == 4 or 5 + { + int width_mmx = ((width >> 1) << 1) ; + width -= width_mmx; // 0,1 pixels => 0,4 bytes + if (width_mmx) + { + int dummy_value_c; // fix 'forbidden register spilled' + int dummy_value_S; + int dummy_value_D; + + __asm__ __volatile__ ( + "subl $4, %%esi \n\t" + "subl $12, %%edi \n\t" + + ".loop4_pass4: \n\t" + "movq (%%esi), %%mm0 \n\t" // 7 6 5 4 3 2 1 0 + "movq %%mm0, %%mm1 \n\t" // 7 6 5 4 3 2 1 0 + "punpckldq %%mm0, %%mm0 \n\t" // 3 2 1 0 3 2 1 0 + "punpckhdq %%mm1, %%mm1 \n\t" // 7 6 5 4 7 6 5 4 + "movq %%mm0, (%%edi) \n\t" + "subl $8, %%esi \n\t" + "movq %%mm1, 8(%%edi) \n\t" + "subl $16, %%edi \n\t" + "subl $2, %%ecx \n\t" + "jnz .loop4_pass4 \n\t" + "EMMS \n\t" // DONE + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "1" (sptr), // esi // input regs + "2" (dp), // edi + "0" (width_mmx) // ecx + +#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0", "%mm1" // clobber list +#endif + ); + } + + sptr -= (width_mmx*4 - 4); // sign fixed + dp -= (width_mmx*8 - 4); // sign fixed + for (i = width; i; i--) + { + png_byte v[8]; + int j; + sptr -= 4; + png_memcpy(v, sptr, 4); + for (j = 0; j < png_pass_inc[pass]; j++) + { + dp -= 4; + png_memcpy(dp, v, 4); + } + } + } + } /* end of pixel_bytes == 4 */ + + //-------------------------------------------------------------- + else if (pixel_bytes == 8) + { +// GRR TEST: should work, but needs testing (special 64-bit version of rpng2?) + // GRR NOTE: no need to combine passes here! + if (((pass == 0) || (pass == 1)) && width) + { + int dummy_value_c; // fix 'forbidden register spilled' + int dummy_value_S; + int dummy_value_D; + + // source is 8-byte RRGGBBAA + // dest is 64-byte RRGGBBAA RRGGBBAA RRGGBBAA RRGGBBAA ... + __asm__ __volatile__ ( + "subl $56, %%edi \n\t" // start of last block + + ".loop8_pass0: \n\t" + "movq (%%esi), %%mm0 \n\t" // 7 6 5 4 3 2 1 0 + "movq %%mm0, (%%edi) \n\t" + "movq %%mm0, 8(%%edi) \n\t" + "movq %%mm0, 16(%%edi) \n\t" + "movq %%mm0, 24(%%edi) \n\t" + "movq %%mm0, 32(%%edi) \n\t" + "movq %%mm0, 40(%%edi) \n\t" + "movq %%mm0, 48(%%edi) \n\t" + "subl $8, %%esi \n\t" + "movq %%mm0, 56(%%edi) \n\t" + "subl $64, %%edi \n\t" + "decl %%ecx \n\t" + "jnz .loop8_pass0 \n\t" + "EMMS \n\t" // DONE + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "1" (sptr), // esi // input regs + "2" (dp), // edi + "0" (width) // ecx + +#if 0 /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0" // clobber list +#endif + ); + } + else if (((pass == 2) || (pass == 3)) && width) + { + // source is 8-byte RRGGBBAA + // dest is 32-byte RRGGBBAA RRGGBBAA RRGGBBAA RRGGBBAA + // (recall that expansion is _in place_: sptr and dp + // both point at locations within same row buffer) + { + int dummy_value_c; // fix 'forbidden register spilled' + int dummy_value_S; + int dummy_value_D; + + __asm__ __volatile__ ( + "subl $24, %%edi \n\t" // start of last block + + ".loop8_pass2: \n\t" + "movq (%%esi), %%mm0 \n\t" // 7 6 5 4 3 2 1 0 + "movq %%mm0, (%%edi) \n\t" + "movq %%mm0, 8(%%edi) \n\t" + "movq %%mm0, 16(%%edi) \n\t" + "subl $8, %%esi \n\t" + "movq %%mm0, 24(%%edi) \n\t" + "subl $32, %%edi \n\t" + "decl %%ecx \n\t" + "jnz .loop8_pass2 \n\t" + "EMMS \n\t" // DONE + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "1" (sptr), // esi // input regs + "2" (dp), // edi + "0" (width) // ecx + +#if 0 /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0" // clobber list +#endif + ); + } + } + else if (width) // pass == 4 or 5 + { + // source is 8-byte RRGGBBAA + // dest is 16-byte RRGGBBAA RRGGBBAA + { + int dummy_value_c; // fix 'forbidden register spilled' + int dummy_value_S; + int dummy_value_D; + + __asm__ __volatile__ ( + "subl $8, %%edi \n\t" // start of last block + + ".loop8_pass4: \n\t" + "movq (%%esi), %%mm0 \n\t" // 7 6 5 4 3 2 1 0 + "movq %%mm0, (%%edi) \n\t" + "subl $8, %%esi \n\t" + "movq %%mm0, 8(%%edi) \n\t" + "subl $16, %%edi \n\t" + "decl %%ecx \n\t" + "jnz .loop8_pass4 \n\t" + "EMMS \n\t" // DONE + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "1" (sptr), // esi // input regs + "2" (dp), // edi + "0" (width) // ecx + +#if 0 /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */ + : "%mm0" // clobber list +#endif + ); + } + } + + } /* end of pixel_bytes == 8 */ + + //-------------------------------------------------------------- + else if (pixel_bytes == 6) + { + for (i = width; i; i--) + { + png_byte v[8]; + int j; + png_memcpy(v, sptr, 6); + for (j = 0; j < png_pass_inc[pass]; j++) + { + png_memcpy(dp, v, 6); + dp -= 6; + } + sptr -= 6; + } + } /* end of pixel_bytes == 6 */ + + //-------------------------------------------------------------- + else + { + for (i = width; i; i--) + { + png_byte v[8]; + int j; + png_memcpy(v, sptr, pixel_bytes); + for (j = 0; j < png_pass_inc[pass]; j++) + { + png_memcpy(dp, v, pixel_bytes); + dp -= pixel_bytes; + } + sptr-= pixel_bytes; + } + } + } // end of _mmx_supported ======================================== + + else /* MMX not supported: use modified C code - takes advantage + * of inlining of png_memcpy for a constant */ + /* GRR 19991007: does it? or should pixel_bytes in each + * block be replaced with immediate value (e.g., 1)? */ + /* GRR 19991017: replaced with constants in each case */ +#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ + { + if (pixel_bytes == 1) + { + for (i = width; i; i--) + { + int j; + for (j = 0; j < png_pass_inc[pass]; j++) + { + *dp-- = *sptr; + } + --sptr; + } + } + else if (pixel_bytes == 3) + { + for (i = width; i; i--) + { + png_byte v[8]; + int j; + png_memcpy(v, sptr, 3); + for (j = 0; j < png_pass_inc[pass]; j++) + { + png_memcpy(dp, v, 3); + dp -= 3; + } + sptr -= 3; + } + } + else if (pixel_bytes == 2) + { + for (i = width; i; i--) + { + png_byte v[8]; + int j; + png_memcpy(v, sptr, 2); + for (j = 0; j < png_pass_inc[pass]; j++) + { + png_memcpy(dp, v, 2); + dp -= 2; + } + sptr -= 2; + } + } + else if (pixel_bytes == 4) + { + for (i = width; i; i--) + { + png_byte v[8]; + int j; + png_memcpy(v, sptr, 4); + for (j = 0; j < png_pass_inc[pass]; j++) + { +#ifdef PNG_DEBUG + if (dp < row || dp+3 > row+png_ptr->row_buf_size) + { + printf("dp out of bounds: row=%d, dp=%d, rp=%d\n", + row, dp, row+png_ptr->row_buf_size); + printf("row_buf=%d\n",png_ptr->row_buf_size); + } +#endif + png_memcpy(dp, v, 4); + dp -= 4; + } + sptr -= 4; + } + } + else if (pixel_bytes == 6) + { + for (i = width; i; i--) + { + png_byte v[8]; + int j; + png_memcpy(v, sptr, 6); + for (j = 0; j < png_pass_inc[pass]; j++) + { + png_memcpy(dp, v, 6); + dp -= 6; + } + sptr -= 6; + } + } + else if (pixel_bytes == 8) + { + for (i = width; i; i--) + { + png_byte v[8]; + int j; + png_memcpy(v, sptr, 8); + for (j = 0; j < png_pass_inc[pass]; j++) + { + png_memcpy(dp, v, 8); + dp -= 8; + } + sptr -= 8; + } + } + else /* GRR: should never be reached */ + { + for (i = width; i; i--) + { + png_byte v[8]; + int j; + png_memcpy(v, sptr, pixel_bytes); + for (j = 0; j < png_pass_inc[pass]; j++) + { + png_memcpy(dp, v, pixel_bytes); + dp -= pixel_bytes; + } + sptr -= pixel_bytes; + } + } + + } /* end if (MMX not supported) */ + break; + } + } /* end switch (row_info->pixel_depth) */ + + row_info->width = final_width; + row_info->rowbytes = ((final_width * + (png_uint_32)row_info->pixel_depth + 7) >> 3); + } + +} /* end png_do_read_interlace() */ + +#endif /* PNG_HAVE_ASSEMBLER_READ_INTERLACE */ +#endif /* PNG_READ_INTERLACING_SUPPORTED */ + + + +#if defined(PNG_HAVE_ASSEMBLER_READ_FILTER_ROW) +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) + +// These variables are utilized in the functions below. They are declared +// globally here to ensure alignment on 8-byte boundaries. + +union uAll { + long long use; + double align; +} _LBCarryMask = {0x0101010101010101LL}, + _HBClearMask = {0x7f7f7f7f7f7f7f7fLL}, + _ActiveMask, _ActiveMask2, _ActiveMaskEnd, _ShiftBpp, _ShiftRem; + +#ifdef PNG_THREAD_UNSAFE_OK +//===========================================================================// +// // +// P N G _ R E A D _ F I L T E R _ R O W _ M M X _ A V G // +// // +//===========================================================================// + +// Optimized code for PNG Average filter decoder + +static void /* PRIVATE */ +png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row, + png_bytep prev_row) +{ + int bpp; + int dummy_value_c; // fix 'forbidden register 2 (cx) was spilled' error + int dummy_value_S; + int dummy_value_D; + + bpp = (row_info->pixel_depth + 7) >> 3; // get # bytes per pixel + _FullLength = row_info->rowbytes; // # of bytes to filter + + __asm__ __volatile__ ( + // initialize address pointers and offset +#ifdef __PIC__ + "pushl %%ebx \n\t" // save index to Global Offset Table +#endif +//pre "movl row, %%edi \n\t" // edi: Avg(x) + "xorl %%ebx, %%ebx \n\t" // ebx: x + "movl %%edi, %%edx \n\t" +//pre "movl prev_row, %%esi \n\t" // esi: Prior(x) +//pre "subl bpp, %%edx \n\t" // (bpp is preloaded into ecx) + "subl %%ecx, %%edx \n\t" // edx: Raw(x-bpp) + + "xorl %%eax,%%eax \n\t" + + // Compute the Raw value for the first bpp bytes + // Raw(x) = Avg(x) + (Prior(x)/2) + "avg_rlp: \n\t" + "movb (%%esi,%%ebx,),%%al \n\t" // load al with Prior(x) + "incl %%ebx \n\t" + "shrb %%al \n\t" // divide by 2 + "addb -1(%%edi,%%ebx,),%%al \n\t" // add Avg(x); -1 to offset inc ebx +//pre "cmpl bpp, %%ebx \n\t" // (bpp is preloaded into ecx) + "cmpl %%ecx, %%ebx \n\t" + "movb %%al,-1(%%edi,%%ebx,) \n\t" // write Raw(x); -1 to offset inc ebx + "jb avg_rlp \n\t" // mov does not affect flags + + // get # of bytes to alignment + "movl %%edi, _dif \n\t" // take start of row + "addl %%ebx, _dif \n\t" // add bpp + "addl $0xf, _dif \n\t" // add 7+8 to incr past alignment bdry + "andl $0xfffffff8, _dif \n\t" // mask to alignment boundary + "subl %%edi, _dif \n\t" // subtract from start => value ebx at + "jz avg_go \n\t" // alignment + + // fix alignment + // Compute the Raw value for the bytes up to the alignment boundary + // Raw(x) = Avg(x) + ((Raw(x-bpp) + Prior(x))/2) + "xorl %%ecx, %%ecx \n\t" + + "avg_lp1: \n\t" + "xorl %%eax, %%eax \n\t" + "movb (%%esi,%%ebx,), %%cl \n\t" // load cl with Prior(x) + "movb (%%edx,%%ebx,), %%al \n\t" // load al with Raw(x-bpp) + "addw %%cx, %%ax \n\t" + "incl %%ebx \n\t" + "shrw %%ax \n\t" // divide by 2 + "addb -1(%%edi,%%ebx,), %%al \n\t" // add Avg(x); -1 to offset inc ebx + "cmpl _dif, %%ebx \n\t" // check if at alignment boundary + "movb %%al, -1(%%edi,%%ebx,) \n\t" // write Raw(x); -1 to offset inc ebx + "jb avg_lp1 \n\t" // repeat until at alignment boundary + + "avg_go: \n\t" + "movl _FullLength, %%eax \n\t" + "movl %%eax, %%ecx \n\t" + "subl %%ebx, %%eax \n\t" // subtract alignment fix + "andl $0x00000007, %%eax \n\t" // calc bytes over mult of 8 + "subl %%eax, %%ecx \n\t" // drop over bytes from original length + "movl %%ecx, _MMXLength \n\t" +#ifdef __PIC__ + "popl %%ebx \n\t" // restore index to Global Offset Table +#endif + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "0" (bpp), // ecx // input regs + "1" (prev_row), // esi + "2" (row) // edi + + : "%eax", "%edx" // clobber list +#ifndef __PIC__ + , "%ebx" +#endif + // GRR: INCLUDE "memory" as clobbered? (_dif, _MMXLength) + // (seems to work fine without...) + ); + + // now do the math for the rest of the row + switch (bpp) + { + case 3: + { + _ActiveMask.use = 0x0000000000ffffffLL; + _ShiftBpp.use = 24; // == 3 * 8 + _ShiftRem.use = 40; // == 64 - 24 + + __asm__ __volatile__ ( + // re-init address pointers and offset + "movq _ActiveMask, %%mm7 \n\t" + "movl _dif, %%ecx \n\t" // ecx: x = offset to + "movq _LBCarryMask, %%mm5 \n\t" // alignment boundary +// preload "movl row, %%edi \n\t" // edi: Avg(x) + "movq _HBClearMask, %%mm4 \n\t" +// preload "movl prev_row, %%esi \n\t" // esi: Prior(x) + + // prime the pump: load the first Raw(x-bpp) data set + "movq -8(%%edi,%%ecx,), %%mm2 \n\t" // load previous aligned 8 bytes + // (correct pos. in loop below) + "avg_3lp: \n\t" + "movq (%%edi,%%ecx,), %%mm0 \n\t" // load mm0 with Avg(x) + "movq %%mm5, %%mm3 \n\t" + "psrlq _ShiftRem, %%mm2 \n\t" // correct position Raw(x-bpp) + // data + "movq (%%esi,%%ecx,), %%mm1 \n\t" // load mm1 with Prior(x) + "movq %%mm7, %%mm6 \n\t" + "pand %%mm1, %%mm3 \n\t" // get lsb for each prev_row byte + "psrlq $1, %%mm1 \n\t" // divide prev_row bytes by 2 + "pand %%mm4, %%mm1 \n\t" // clear invalid bit 7 of each + // byte + "paddb %%mm1, %%mm0 \n\t" // add (Prev_row/2) to Avg for + // each byte + // add 1st active group (Raw(x-bpp)/2) to average with LBCarry + "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting + // LBCarrys + "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte + // where both + // lsb's were == 1 (only valid for active group) + "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 + "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each + // byte + "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2) + // for each byte + "pand %%mm6, %%mm2 \n\t" // leave only Active Group 1 + // bytes to add to Avg + "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to + // Avg for each Active + // byte + // add 2nd active group (Raw(x-bpp)/2) to average with _LBCarry + "psllq _ShiftBpp, %%mm6 \n\t" // shift the mm6 mask to cover + // bytes 3-5 + "movq %%mm0, %%mm2 \n\t" // mov updated Raws to mm2 + "psllq _ShiftBpp, %%mm2 \n\t" // shift data to pos. correctly + "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting + // LBCarrys + "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte + // where both + // lsb's were == 1 (only valid for active group) + "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 + "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each + // byte + "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2) + // for each byte + "pand %%mm6, %%mm2 \n\t" // leave only Active Group 2 + // bytes to add to Avg + "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to + // Avg for each Active + // byte + + // add 3rd active group (Raw(x-bpp)/2) to average with _LBCarry + "psllq _ShiftBpp, %%mm6 \n\t" // shift mm6 mask to cover last + // two + // bytes + "movq %%mm0, %%mm2 \n\t" // mov updated Raws to mm2 + "psllq _ShiftBpp, %%mm2 \n\t" // shift data to pos. correctly + // Data only needs to be shifted once here to + // get the correct x-bpp offset. + "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting + // LBCarrys + "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte + // where both + // lsb's were == 1 (only valid for active group) + "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 + "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each + // byte + "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2) + // for each byte + "pand %%mm6, %%mm2 \n\t" // leave only Active Group 2 + // bytes to add to Avg + "addl $8, %%ecx \n\t" + "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to + // Avg for each Active + // byte + // now ready to write back to memory + "movq %%mm0, -8(%%edi,%%ecx,) \n\t" + // move updated Raw(x) to use as Raw(x-bpp) for next loop + "cmpl _MMXLength, %%ecx \n\t" + "movq %%mm0, %%mm2 \n\t" // mov updated Raw(x) to mm2 + "jb avg_3lp \n\t" + + : "=S" (dummy_value_S), // output regs (dummy) + "=D" (dummy_value_D) + + : "0" (prev_row), // esi // input regs + "1" (row) // edi + + : "%ecx" // clobber list +#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */ + , "%mm0", "%mm1", "%mm2", "%mm3" + , "%mm4", "%mm5", "%mm6", "%mm7" +#endif + ); + } + break; // end 3 bpp + + case 6: + case 4: + //case 7: // who wrote this? PNG doesn't support 5 or 7 bytes/pixel + //case 5: // GRR BOGUS + { + _ActiveMask.use = 0xffffffffffffffffLL; // use shift below to clear + // appropriate inactive bytes + _ShiftBpp.use = bpp << 3; + _ShiftRem.use = 64 - _ShiftBpp.use; + + __asm__ __volatile__ ( + "movq _HBClearMask, %%mm4 \n\t" + + // re-init address pointers and offset + "movl _dif, %%ecx \n\t" // ecx: x = offset to + // alignment boundary + + // load _ActiveMask and clear all bytes except for 1st active group + "movq _ActiveMask, %%mm7 \n\t" +// preload "movl row, %%edi \n\t" // edi: Avg(x) + "psrlq _ShiftRem, %%mm7 \n\t" +// preload "movl prev_row, %%esi \n\t" // esi: Prior(x) + "movq %%mm7, %%mm6 \n\t" + "movq _LBCarryMask, %%mm5 \n\t" + "psllq _ShiftBpp, %%mm6 \n\t" // create mask for 2nd active + // group + + // prime the pump: load the first Raw(x-bpp) data set + "movq -8(%%edi,%%ecx,), %%mm2 \n\t" // load previous aligned 8 bytes + // (we correct pos. in loop below) + "avg_4lp: \n\t" + "movq (%%edi,%%ecx,), %%mm0 \n\t" + "psrlq _ShiftRem, %%mm2 \n\t" // shift data to pos. correctly + "movq (%%esi,%%ecx,), %%mm1 \n\t" + // add (Prev_row/2) to average + "movq %%mm5, %%mm3 \n\t" + "pand %%mm1, %%mm3 \n\t" // get lsb for each prev_row byte + "psrlq $1, %%mm1 \n\t" // divide prev_row bytes by 2 + "pand %%mm4, %%mm1 \n\t" // clear invalid bit 7 of each + // byte + "paddb %%mm1, %%mm0 \n\t" // add (Prev_row/2) to Avg for + // each byte + // add 1st active group (Raw(x-bpp)/2) to average with _LBCarry + "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting + // LBCarrys + "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte + // where both + // lsb's were == 1 (only valid for active group) + "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 + "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each + // byte + "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2) + // for each byte + "pand %%mm7, %%mm2 \n\t" // leave only Active Group 1 + // bytes to add to Avg + "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to Avg + // for each Active + // byte + // add 2nd active group (Raw(x-bpp)/2) to average with _LBCarry + "movq %%mm0, %%mm2 \n\t" // mov updated Raws to mm2 + "psllq _ShiftBpp, %%mm2 \n\t" // shift data to pos. correctly + "addl $8, %%ecx \n\t" + "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting + // LBCarrys + "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte + // where both + // lsb's were == 1 (only valid for active group) + "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 + "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each + // byte + "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2) + // for each byte + "pand %%mm6, %%mm2 \n\t" // leave only Active Group 2 + // bytes to add to Avg + "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to + // Avg for each Active + // byte + "cmpl _MMXLength, %%ecx \n\t" + // now ready to write back to memory + "movq %%mm0, -8(%%edi,%%ecx,) \n\t" + // prep Raw(x-bpp) for next loop + "movq %%mm0, %%mm2 \n\t" // mov updated Raws to mm2 + "jb avg_4lp \n\t" + + : "=S" (dummy_value_S), // output regs (dummy) + "=D" (dummy_value_D) + + : "0" (prev_row), // esi // input regs + "1" (row) // edi + + : "%ecx" // clobber list +#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */ + , "%mm0", "%mm1", "%mm2", "%mm3" + , "%mm4", "%mm5", "%mm6", "%mm7" +#endif + ); + } + break; // end 4,6 bpp + + case 2: + { + _ActiveMask.use = 0x000000000000ffffLL; + _ShiftBpp.use = 16; // == 2 * 8 + _ShiftRem.use = 48; // == 64 - 16 + + __asm__ __volatile__ ( + // load _ActiveMask + "movq _ActiveMask, %%mm7 \n\t" + // re-init address pointers and offset + "movl _dif, %%ecx \n\t" // ecx: x = offset to alignment + // boundary + "movq _LBCarryMask, %%mm5 \n\t" +// preload "movl row, %%edi \n\t" // edi: Avg(x) + "movq _HBClearMask, %%mm4 \n\t" +// preload "movl prev_row, %%esi \n\t" // esi: Prior(x) + + // prime the pump: load the first Raw(x-bpp) data set + "movq -8(%%edi,%%ecx,), %%mm2 \n\t" // load previous aligned 8 bytes + // (we correct pos. in loop below) + "avg_2lp: \n\t" + "movq (%%edi,%%ecx,), %%mm0 \n\t" + "psrlq _ShiftRem, %%mm2 \n\t" // shift data to pos. correctly + "movq (%%esi,%%ecx,), %%mm1 \n\t" // (GRR BUGFIX: was psllq) + // add (Prev_row/2) to average + "movq %%mm5, %%mm3 \n\t" + "pand %%mm1, %%mm3 \n\t" // get lsb for each prev_row byte + "psrlq $1, %%mm1 \n\t" // divide prev_row bytes by 2 + "pand %%mm4, %%mm1 \n\t" // clear invalid bit 7 of each + // byte + "movq %%mm7, %%mm6 \n\t" + "paddb %%mm1, %%mm0 \n\t" // add (Prev_row/2) to Avg for + // each byte + + // add 1st active group (Raw(x-bpp)/2) to average with _LBCarry + "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting + // LBCarrys + "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte + // where both + // lsb's were == 1 (only valid + // for active group) + "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 + "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each + // byte + "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2) + // for each byte + "pand %%mm6, %%mm2 \n\t" // leave only Active Group 1 + // bytes to add to Avg + "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to Avg + // for each Active byte + + // add 2nd active group (Raw(x-bpp)/2) to average with _LBCarry + "psllq _ShiftBpp, %%mm6 \n\t" // shift the mm6 mask to cover + // bytes 2 & 3 + "movq %%mm0, %%mm2 \n\t" // mov updated Raws to mm2 + "psllq _ShiftBpp, %%mm2 \n\t" // shift data to pos. correctly + "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting + // LBCarrys + "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte + // where both + // lsb's were == 1 (only valid + // for active group) + "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 + "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each + // byte + "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2) + // for each byte + "pand %%mm6, %%mm2 \n\t" // leave only Active Group 2 + // bytes to add to Avg + "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to + // Avg for each Active byte + + // add 3rd active group (Raw(x-bpp)/2) to average with _LBCarry + "psllq _ShiftBpp, %%mm6 \n\t" // shift the mm6 mask to cover + // bytes 4 & 5 + "movq %%mm0, %%mm2 \n\t" // mov updated Raws to mm2 + "psllq _ShiftBpp, %%mm2 \n\t" // shift data to pos. correctly + "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting + // LBCarrys + "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte + // where both lsb's were == 1 + // (only valid for active group) + "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 + "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each + // byte + "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2) + // for each byte + "pand %%mm6, %%mm2 \n\t" // leave only Active Group 2 + // bytes to add to Avg + "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to + // Avg for each Active byte + + // add 4th active group (Raw(x-bpp)/2) to average with _LBCarry + "psllq _ShiftBpp, %%mm6 \n\t" // shift the mm6 mask to cover + // bytes 6 & 7 + "movq %%mm0, %%mm2 \n\t" // mov updated Raws to mm2 + "psllq _ShiftBpp, %%mm2 \n\t" // shift data to pos. correctly + "addl $8, %%ecx \n\t" + "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting + // LBCarrys + "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte + // where both + // lsb's were == 1 (only valid + // for active group) + "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 + "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each + // byte + "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2) + // for each byte + "pand %%mm6, %%mm2 \n\t" // leave only Active Group 2 + // bytes to add to Avg + "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to + // Avg for each Active byte + + "cmpl _MMXLength, %%ecx \n\t" + // now ready to write back to memory + "movq %%mm0, -8(%%edi,%%ecx,) \n\t" + // prep Raw(x-bpp) for next loop + "movq %%mm0, %%mm2 \n\t" // mov updated Raws to mm2 + "jb avg_2lp \n\t" + + : "=S" (dummy_value_S), // output regs (dummy) + "=D" (dummy_value_D) + + : "0" (prev_row), // esi // input regs + "1" (row) // edi + + : "%ecx" // clobber list +#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */ + , "%mm0", "%mm1", "%mm2", "%mm3" + , "%mm4", "%mm5", "%mm6", "%mm7" +#endif + ); + } + break; // end 2 bpp + + case 1: + { + __asm__ __volatile__ ( + // re-init address pointers and offset +#ifdef __PIC__ + "pushl %%ebx \n\t" // save Global Offset Table index +#endif + "movl _dif, %%ebx \n\t" // ebx: x = offset to alignment + // boundary +// preload "movl row, %%edi \n\t" // edi: Avg(x) + "cmpl _FullLength, %%ebx \n\t" // test if offset at end of array + "jnb avg_1end \n\t" + // do Paeth decode for remaining bytes +// preload "movl prev_row, %%esi \n\t" // esi: Prior(x) + "movl %%edi, %%edx \n\t" +// preload "subl bpp, %%edx \n\t" // (bpp is preloaded into ecx) + "subl %%ecx, %%edx \n\t" // edx: Raw(x-bpp) + "xorl %%ecx, %%ecx \n\t" // zero ecx before using cl & cx + // in loop below + "avg_1lp: \n\t" + // Raw(x) = Avg(x) + ((Raw(x-bpp) + Prior(x))/2) + "xorl %%eax, %%eax \n\t" + "movb (%%esi,%%ebx,), %%cl \n\t" // load cl with Prior(x) + "movb (%%edx,%%ebx,), %%al \n\t" // load al with Raw(x-bpp) + "addw %%cx, %%ax \n\t" + "incl %%ebx \n\t" + "shrw %%ax \n\t" // divide by 2 + "addb -1(%%edi,%%ebx,), %%al \n\t" // add Avg(x); -1 to offset + // inc ebx + "cmpl _FullLength, %%ebx \n\t" // check if at end of array + "movb %%al, -1(%%edi,%%ebx,) \n\t" // write back Raw(x); + // mov does not affect flags; -1 to offset inc ebx + "jb avg_1lp \n\t" + + "avg_1end: \n\t" +#ifdef __PIC__ + "popl %%ebx \n\t" // Global Offset Table index +#endif + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "0" (bpp), // ecx // input regs + "1" (prev_row), // esi + "2" (row) // edi + + : "%eax", "%edx" // clobber list +#ifndef __PIC__ + , "%ebx" +#endif + ); + } + return; // end 1 bpp + + case 8: + { + __asm__ __volatile__ ( + // re-init address pointers and offset + "movl _dif, %%ecx \n\t" // ecx: x == offset to alignment + "movq _LBCarryMask, %%mm5 \n\t" // boundary +// preload "movl row, %%edi \n\t" // edi: Avg(x) + "movq _HBClearMask, %%mm4 \n\t" +// preload "movl prev_row, %%esi \n\t" // esi: Prior(x) + + // prime the pump: load the first Raw(x-bpp) data set + "movq -8(%%edi,%%ecx,), %%mm2 \n\t" // load previous aligned 8 bytes + // (NO NEED to correct pos. in loop below) + + "avg_8lp: \n\t" + "movq (%%edi,%%ecx,), %%mm0 \n\t" + "movq %%mm5, %%mm3 \n\t" + "movq (%%esi,%%ecx,), %%mm1 \n\t" + "addl $8, %%ecx \n\t" + "pand %%mm1, %%mm3 \n\t" // get lsb for each prev_row byte + "psrlq $1, %%mm1 \n\t" // divide prev_row bytes by 2 + "pand %%mm2, %%mm3 \n\t" // get LBCarrys for each byte + // where both lsb's were == 1 + "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 + "pand %%mm4, %%mm1 \n\t" // clear invalid bit 7, each byte + "paddb %%mm3, %%mm0 \n\t" // add LBCarrys to Avg, each byte + "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7, each byte + "paddb %%mm1, %%mm0 \n\t" // add (Prev_row/2) to Avg, each + "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) to Avg for each + "cmpl _MMXLength, %%ecx \n\t" + "movq %%mm0, -8(%%edi,%%ecx,) \n\t" + "movq %%mm0, %%mm2 \n\t" // reuse as Raw(x-bpp) + "jb avg_8lp \n\t" + + : "=S" (dummy_value_S), // output regs (dummy) + "=D" (dummy_value_D) + + : "0" (prev_row), // esi // input regs + "1" (row) // edi + + : "%ecx" // clobber list +#if 0 /* %mm0, ..., %mm5 not supported by gcc 2.7.2.3 or egcs 1.1 */ + , "%mm0", "%mm1", "%mm2" + , "%mm3", "%mm4", "%mm5" +#endif + ); + } + break; // end 8 bpp + + default: // bpp greater than 8 (!= 1,2,3,4,[5],6,[7],8) + { + +#ifdef PNG_DEBUG + // GRR: PRINT ERROR HERE: SHOULD NEVER BE REACHED + png_debug(1, + "Internal logic error in pnggccrd (png_read_filter_row_mmx_avg())\n"); +#endif + +#if 0 + __asm__ __volatile__ ( + "movq _LBCarryMask, %%mm5 \n\t" + // re-init address pointers and offset + "movl _dif, %%ebx \n\t" // ebx: x = offset to + // alignment boundary + "movl row, %%edi \n\t" // edi: Avg(x) + "movq _HBClearMask, %%mm4 \n\t" + "movl %%edi, %%edx \n\t" + "movl prev_row, %%esi \n\t" // esi: Prior(x) + "subl bpp, %%edx \n\t" // edx: Raw(x-bpp) + "avg_Alp: \n\t" + "movq (%%edi,%%ebx,), %%mm0 \n\t" + "movq %%mm5, %%mm3 \n\t" + "movq (%%esi,%%ebx,), %%mm1 \n\t" + "pand %%mm1, %%mm3 \n\t" // get lsb for each prev_row byte + "movq (%%edx,%%ebx,), %%mm2 \n\t" + "psrlq $1, %%mm1 \n\t" // divide prev_row bytes by 2 + "pand %%mm2, %%mm3 \n\t" // get LBCarrys for each byte + // where both lsb's were == 1 + "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 + "pand %%mm4, %%mm1 \n\t" // clear invalid bit 7 of each + // byte + "paddb %%mm3, %%mm0 \n\t" // add LBCarrys to Avg for each + // byte + "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each + // byte + "paddb %%mm1, %%mm0 \n\t" // add (Prev_row/2) to Avg for + // each byte + "addl $8, %%ebx \n\t" + "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) to Avg for each + // byte + "cmpl _MMXLength, %%ebx \n\t" + "movq %%mm0, -8(%%edi,%%ebx,) \n\t" + "jb avg_Alp \n\t" + + : // FIXASM: output regs/vars go here, e.g.: "=m" (memory_var) + + : // FIXASM: input regs, e.g.: "c" (count), "S" (src), "D" (dest) + + : "%ebx", "%edx", "%edi", "%esi" // CHECKASM: clobber list + ); +#endif /* 0 - NEVER REACHED */ + } + break; + + } // end switch (bpp) + + __asm__ __volatile__ ( + // MMX acceleration complete; now do clean-up + // check if any remaining bytes left to decode +#ifdef __PIC__ + "pushl %%ebx \n\t" // save index to Global Offset Table +#endif + "movl _MMXLength, %%ebx \n\t" // ebx: x == offset bytes after MMX +//pre "movl row, %%edi \n\t" // edi: Avg(x) + "cmpl _FullLength, %%ebx \n\t" // test if offset at end of array + "jnb avg_end \n\t" + + // do Avg decode for remaining bytes +//pre "movl prev_row, %%esi \n\t" // esi: Prior(x) + "movl %%edi, %%edx \n\t" +//pre "subl bpp, %%edx \n\t" // (bpp is preloaded into ecx) + "subl %%ecx, %%edx \n\t" // edx: Raw(x-bpp) + "xorl %%ecx, %%ecx \n\t" // zero ecx before using cl & cx below + + "avg_lp2: \n\t" + // Raw(x) = Avg(x) + ((Raw(x-bpp) + Prior(x))/2) + "xorl %%eax, %%eax \n\t" + "movb (%%esi,%%ebx,), %%cl \n\t" // load cl with Prior(x) + "movb (%%edx,%%ebx,), %%al \n\t" // load al with Raw(x-bpp) + "addw %%cx, %%ax \n\t" + "incl %%ebx \n\t" + "shrw %%ax \n\t" // divide by 2 + "addb -1(%%edi,%%ebx,), %%al \n\t" // add Avg(x); -1 to offset inc ebx + "cmpl _FullLength, %%ebx \n\t" // check if at end of array + "movb %%al, -1(%%edi,%%ebx,) \n\t" // write back Raw(x) [mov does not + "jb avg_lp2 \n\t" // affect flags; -1 to offset inc ebx] + + "avg_end: \n\t" + "EMMS \n\t" // end MMX; prep for poss. FP instrs. +#ifdef __PIC__ + "popl %%ebx \n\t" // restore index to Global Offset Table +#endif + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "0" (bpp), // ecx // input regs + "1" (prev_row), // esi + "2" (row) // edi + + : "%eax", "%edx" // clobber list +#ifndef __PIC__ + , "%ebx" +#endif + ); + +} /* end png_read_filter_row_mmx_avg() */ +#endif + + + +#ifdef PNG_THREAD_UNSAFE_OK +//===========================================================================// +// // +// P N G _ R E A D _ F I L T E R _ R O W _ M M X _ P A E T H // +// // +//===========================================================================// + +// Optimized code for PNG Paeth filter decoder + +static void /* PRIVATE */ +png_read_filter_row_mmx_paeth(png_row_infop row_info, png_bytep row, + png_bytep prev_row) +{ + int bpp; + int dummy_value_c; // fix 'forbidden register 2 (cx) was spilled' error + int dummy_value_S; + int dummy_value_D; + + bpp = (row_info->pixel_depth + 7) >> 3; // Get # bytes per pixel + _FullLength = row_info->rowbytes; // # of bytes to filter + + __asm__ __volatile__ ( +#ifdef __PIC__ + "pushl %%ebx \n\t" // save index to Global Offset Table +#endif + "xorl %%ebx, %%ebx \n\t" // ebx: x offset +//pre "movl row, %%edi \n\t" + "xorl %%edx, %%edx \n\t" // edx: x-bpp offset +//pre "movl prev_row, %%esi \n\t" + "xorl %%eax, %%eax \n\t" + + // Compute the Raw value for the first bpp bytes + // Note: the formula works out to be always + // Paeth(x) = Raw(x) + Prior(x) where x < bpp + "paeth_rlp: \n\t" + "movb (%%edi,%%ebx,), %%al \n\t" + "addb (%%esi,%%ebx,), %%al \n\t" + "incl %%ebx \n\t" +//pre "cmpl bpp, %%ebx \n\t" (bpp is preloaded into ecx) + "cmpl %%ecx, %%ebx \n\t" + "movb %%al, -1(%%edi,%%ebx,) \n\t" + "jb paeth_rlp \n\t" + // get # of bytes to alignment + "movl %%edi, _dif \n\t" // take start of row + "addl %%ebx, _dif \n\t" // add bpp + "xorl %%ecx, %%ecx \n\t" + "addl $0xf, _dif \n\t" // add 7 + 8 to incr past alignment + // boundary + "andl $0xfffffff8, _dif \n\t" // mask to alignment boundary + "subl %%edi, _dif \n\t" // subtract from start ==> value ebx + // at alignment + "jz paeth_go \n\t" + // fix alignment + + "paeth_lp1: \n\t" + "xorl %%eax, %%eax \n\t" + // pav = p - a = (a + b - c) - a = b - c + "movb (%%esi,%%ebx,), %%al \n\t" // load Prior(x) into al + "movb (%%esi,%%edx,), %%cl \n\t" // load Prior(x-bpp) into cl + "subl %%ecx, %%eax \n\t" // subtract Prior(x-bpp) + "movl %%eax, _patemp \n\t" // Save pav for later use + "xorl %%eax, %%eax \n\t" + // pbv = p - b = (a + b - c) - b = a - c + "movb (%%edi,%%edx,), %%al \n\t" // load Raw(x-bpp) into al + "subl %%ecx, %%eax \n\t" // subtract Prior(x-bpp) + "movl %%eax, %%ecx \n\t" + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + "addl _patemp, %%eax \n\t" // pcv = pav + pbv + // pc = abs(pcv) + "testl $0x80000000, %%eax \n\t" + "jz paeth_pca \n\t" + "negl %%eax \n\t" // reverse sign of neg values + + "paeth_pca: \n\t" + "movl %%eax, _pctemp \n\t" // save pc for later use + // pb = abs(pbv) + "testl $0x80000000, %%ecx \n\t" + "jz paeth_pba \n\t" + "negl %%ecx \n\t" // reverse sign of neg values + + "paeth_pba: \n\t" + "movl %%ecx, _pbtemp \n\t" // save pb for later use + // pa = abs(pav) + "movl _patemp, %%eax \n\t" + "testl $0x80000000, %%eax \n\t" + "jz paeth_paa \n\t" + "negl %%eax \n\t" // reverse sign of neg values + + "paeth_paa: \n\t" + "movl %%eax, _patemp \n\t" // save pa for later use + // test if pa <= pb + "cmpl %%ecx, %%eax \n\t" + "jna paeth_abb \n\t" + // pa > pb; now test if pb <= pc + "cmpl _pctemp, %%ecx \n\t" + "jna paeth_bbc \n\t" + // pb > pc; Raw(x) = Paeth(x) + Prior(x-bpp) + "movb (%%esi,%%edx,), %%cl \n\t" // load Prior(x-bpp) into cl + "jmp paeth_paeth \n\t" + + "paeth_bbc: \n\t" + // pb <= pc; Raw(x) = Paeth(x) + Prior(x) + "movb (%%esi,%%ebx,), %%cl \n\t" // load Prior(x) into cl + "jmp paeth_paeth \n\t" + + "paeth_abb: \n\t" + // pa <= pb; now test if pa <= pc + "cmpl _pctemp, %%eax \n\t" + "jna paeth_abc \n\t" + // pa > pc; Raw(x) = Paeth(x) + Prior(x-bpp) + "movb (%%esi,%%edx,), %%cl \n\t" // load Prior(x-bpp) into cl + "jmp paeth_paeth \n\t" + + "paeth_abc: \n\t" + // pa <= pc; Raw(x) = Paeth(x) + Raw(x-bpp) + "movb (%%edi,%%edx,), %%cl \n\t" // load Raw(x-bpp) into cl + + "paeth_paeth: \n\t" + "incl %%ebx \n\t" + "incl %%edx \n\t" + // Raw(x) = (Paeth(x) + Paeth_Predictor( a, b, c )) mod 256 + "addb %%cl, -1(%%edi,%%ebx,) \n\t" + "cmpl _dif, %%ebx \n\t" + "jb paeth_lp1 \n\t" + + "paeth_go: \n\t" + "movl _FullLength, %%ecx \n\t" + "movl %%ecx, %%eax \n\t" + "subl %%ebx, %%eax \n\t" // subtract alignment fix + "andl $0x00000007, %%eax \n\t" // calc bytes over mult of 8 + "subl %%eax, %%ecx \n\t" // drop over bytes from original length + "movl %%ecx, _MMXLength \n\t" +#ifdef __PIC__ + "popl %%ebx \n\t" // restore index to Global Offset Table +#endif + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "0" (bpp), // ecx // input regs + "1" (prev_row), // esi + "2" (row) // edi + + : "%eax", "%edx" // clobber list +#ifndef __PIC__ + , "%ebx" +#endif + ); + + // now do the math for the rest of the row + switch (bpp) + { + case 3: + { + _ActiveMask.use = 0x0000000000ffffffLL; + _ActiveMaskEnd.use = 0xffff000000000000LL; + _ShiftBpp.use = 24; // == bpp(3) * 8 + _ShiftRem.use = 40; // == 64 - 24 + + __asm__ __volatile__ ( + "movl _dif, %%ecx \n\t" +// preload "movl row, %%edi \n\t" +// preload "movl prev_row, %%esi \n\t" + "pxor %%mm0, %%mm0 \n\t" + // prime the pump: load the first Raw(x-bpp) data set + "movq -8(%%edi,%%ecx,), %%mm1 \n\t" + "paeth_3lp: \n\t" + "psrlq _ShiftRem, %%mm1 \n\t" // shift last 3 bytes to 1st + // 3 bytes + "movq (%%esi,%%ecx,), %%mm2 \n\t" // load b=Prior(x) + "punpcklbw %%mm0, %%mm1 \n\t" // unpack High bytes of a + "movq -8(%%esi,%%ecx,), %%mm3 \n\t" // prep c=Prior(x-bpp) bytes + "punpcklbw %%mm0, %%mm2 \n\t" // unpack High bytes of b + "psrlq _ShiftRem, %%mm3 \n\t" // shift last 3 bytes to 1st + // 3 bytes + // pav = p - a = (a + b - c) - a = b - c + "movq %%mm2, %%mm4 \n\t" + "punpcklbw %%mm0, %%mm3 \n\t" // unpack High bytes of c + // pbv = p - b = (a + b - c) - b = a - c + "movq %%mm1, %%mm5 \n\t" + "psubw %%mm3, %%mm4 \n\t" + "pxor %%mm7, %%mm7 \n\t" + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + "movq %%mm4, %%mm6 \n\t" + "psubw %%mm3, %%mm5 \n\t" + + // pa = abs(p-a) = abs(pav) + // pb = abs(p-b) = abs(pbv) + // pc = abs(p-c) = abs(pcv) + "pcmpgtw %%mm4, %%mm0 \n\t" // create mask pav bytes < 0 + "paddw %%mm5, %%mm6 \n\t" + "pand %%mm4, %%mm0 \n\t" // only pav bytes < 0 in mm7 + "pcmpgtw %%mm5, %%mm7 \n\t" // create mask pbv bytes < 0 + "psubw %%mm0, %%mm4 \n\t" + "pand %%mm5, %%mm7 \n\t" // only pbv bytes < 0 in mm0 + "psubw %%mm0, %%mm4 \n\t" + "psubw %%mm7, %%mm5 \n\t" + "pxor %%mm0, %%mm0 \n\t" + "pcmpgtw %%mm6, %%mm0 \n\t" // create mask pcv bytes < 0 + "pand %%mm6, %%mm0 \n\t" // only pav bytes < 0 in mm7 + "psubw %%mm7, %%mm5 \n\t" + "psubw %%mm0, %%mm6 \n\t" + // test pa <= pb + "movq %%mm4, %%mm7 \n\t" + "psubw %%mm0, %%mm6 \n\t" + "pcmpgtw %%mm5, %%mm7 \n\t" // pa > pb? + "movq %%mm7, %%mm0 \n\t" + // use mm7 mask to merge pa & pb + "pand %%mm7, %%mm5 \n\t" + // use mm0 mask copy to merge a & b + "pand %%mm0, %%mm2 \n\t" + "pandn %%mm4, %%mm7 \n\t" + "pandn %%mm1, %%mm0 \n\t" + "paddw %%mm5, %%mm7 \n\t" + "paddw %%mm2, %%mm0 \n\t" + // test ((pa <= pb)? pa:pb) <= pc + "pcmpgtw %%mm6, %%mm7 \n\t" // pab > pc? + "pxor %%mm1, %%mm1 \n\t" + "pand %%mm7, %%mm3 \n\t" + "pandn %%mm0, %%mm7 \n\t" + "paddw %%mm3, %%mm7 \n\t" + "pxor %%mm0, %%mm0 \n\t" + "packuswb %%mm1, %%mm7 \n\t" + "movq (%%esi,%%ecx,), %%mm3 \n\t" // load c=Prior(x-bpp) + "pand _ActiveMask, %%mm7 \n\t" + "movq %%mm3, %%mm2 \n\t" // load b=Prior(x) step 1 + "paddb (%%edi,%%ecx,), %%mm7 \n\t" // add Paeth predictor with Raw(x) + "punpcklbw %%mm0, %%mm3 \n\t" // unpack High bytes of c + "movq %%mm7, (%%edi,%%ecx,) \n\t" // write back updated value + "movq %%mm7, %%mm1 \n\t" // now mm1 will be used as + // Raw(x-bpp) + // now do Paeth for 2nd set of bytes (3-5) + "psrlq _ShiftBpp, %%mm2 \n\t" // load b=Prior(x) step 2 + "punpcklbw %%mm0, %%mm1 \n\t" // unpack High bytes of a + "pxor %%mm7, %%mm7 \n\t" + "punpcklbw %%mm0, %%mm2 \n\t" // unpack High bytes of b + // pbv = p - b = (a + b - c) - b = a - c + "movq %%mm1, %%mm5 \n\t" + // pav = p - a = (a + b - c) - a = b - c + "movq %%mm2, %%mm4 \n\t" + "psubw %%mm3, %%mm5 \n\t" + "psubw %%mm3, %%mm4 \n\t" + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = + // pav + pbv = pbv + pav + "movq %%mm5, %%mm6 \n\t" + "paddw %%mm4, %%mm6 \n\t" + + // pa = abs(p-a) = abs(pav) + // pb = abs(p-b) = abs(pbv) + // pc = abs(p-c) = abs(pcv) + "pcmpgtw %%mm5, %%mm0 \n\t" // create mask pbv bytes < 0 + "pcmpgtw %%mm4, %%mm7 \n\t" // create mask pav bytes < 0 + "pand %%mm5, %%mm0 \n\t" // only pbv bytes < 0 in mm0 + "pand %%mm4, %%mm7 \n\t" // only pav bytes < 0 in mm7 + "psubw %%mm0, %%mm5 \n\t" + "psubw %%mm7, %%mm4 \n\t" + "psubw %%mm0, %%mm5 \n\t" + "psubw %%mm7, %%mm4 \n\t" + "pxor %%mm0, %%mm0 \n\t" + "pcmpgtw %%mm6, %%mm0 \n\t" // create mask pcv bytes < 0 + "pand %%mm6, %%mm0 \n\t" // only pav bytes < 0 in mm7 + "psubw %%mm0, %%mm6 \n\t" + // test pa <= pb + "movq %%mm4, %%mm7 \n\t" + "psubw %%mm0, %%mm6 \n\t" + "pcmpgtw %%mm5, %%mm7 \n\t" // pa > pb? + "movq %%mm7, %%mm0 \n\t" + // use mm7 mask to merge pa & pb + "pand %%mm7, %%mm5 \n\t" + // use mm0 mask copy to merge a & b + "pand %%mm0, %%mm2 \n\t" + "pandn %%mm4, %%mm7 \n\t" + "pandn %%mm1, %%mm0 \n\t" + "paddw %%mm5, %%mm7 \n\t" + "paddw %%mm2, %%mm0 \n\t" + // test ((pa <= pb)? pa:pb) <= pc + "pcmpgtw %%mm6, %%mm7 \n\t" // pab > pc? + "movq (%%esi,%%ecx,), %%mm2 \n\t" // load b=Prior(x) + "pand %%mm7, %%mm3 \n\t" + "pandn %%mm0, %%mm7 \n\t" + "pxor %%mm1, %%mm1 \n\t" + "paddw %%mm3, %%mm7 \n\t" + "pxor %%mm0, %%mm0 \n\t" + "packuswb %%mm1, %%mm7 \n\t" + "movq %%mm2, %%mm3 \n\t" // load c=Prior(x-bpp) step 1 + "pand _ActiveMask, %%mm7 \n\t" + "punpckhbw %%mm0, %%mm2 \n\t" // unpack High bytes of b + "psllq _ShiftBpp, %%mm7 \n\t" // shift bytes to 2nd group of + // 3 bytes + // pav = p - a = (a + b - c) - a = b - c + "movq %%mm2, %%mm4 \n\t" + "paddb (%%edi,%%ecx,), %%mm7 \n\t" // add Paeth predictor with Raw(x) + "psllq _ShiftBpp, %%mm3 \n\t" // load c=Prior(x-bpp) step 2 + "movq %%mm7, (%%edi,%%ecx,) \n\t" // write back updated value + "movq %%mm7, %%mm1 \n\t" + "punpckhbw %%mm0, %%mm3 \n\t" // unpack High bytes of c + "psllq _ShiftBpp, %%mm1 \n\t" // shift bytes + // now mm1 will be used as Raw(x-bpp) + // now do Paeth for 3rd, and final, set of bytes (6-7) + "pxor %%mm7, %%mm7 \n\t" + "punpckhbw %%mm0, %%mm1 \n\t" // unpack High bytes of a + "psubw %%mm3, %%mm4 \n\t" + // pbv = p - b = (a + b - c) - b = a - c + "movq %%mm1, %%mm5 \n\t" + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + "movq %%mm4, %%mm6 \n\t" + "psubw %%mm3, %%mm5 \n\t" + "pxor %%mm0, %%mm0 \n\t" + "paddw %%mm5, %%mm6 \n\t" + + // pa = abs(p-a) = abs(pav) + // pb = abs(p-b) = abs(pbv) + // pc = abs(p-c) = abs(pcv) + "pcmpgtw %%mm4, %%mm0 \n\t" // create mask pav bytes < 0 + "pcmpgtw %%mm5, %%mm7 \n\t" // create mask pbv bytes < 0 + "pand %%mm4, %%mm0 \n\t" // only pav bytes < 0 in mm7 + "pand %%mm5, %%mm7 \n\t" // only pbv bytes < 0 in mm0 + "psubw %%mm0, %%mm4 \n\t" + "psubw %%mm7, %%mm5 \n\t" + "psubw %%mm0, %%mm4 \n\t" + "psubw %%mm7, %%mm5 \n\t" + "pxor %%mm0, %%mm0 \n\t" + "pcmpgtw %%mm6, %%mm0 \n\t" // create mask pcv bytes < 0 + "pand %%mm6, %%mm0 \n\t" // only pav bytes < 0 in mm7 + "psubw %%mm0, %%mm6 \n\t" + // test pa <= pb + "movq %%mm4, %%mm7 \n\t" + "psubw %%mm0, %%mm6 \n\t" + "pcmpgtw %%mm5, %%mm7 \n\t" // pa > pb? + "movq %%mm7, %%mm0 \n\t" + // use mm0 mask copy to merge a & b + "pand %%mm0, %%mm2 \n\t" + // use mm7 mask to merge pa & pb + "pand %%mm7, %%mm5 \n\t" + "pandn %%mm1, %%mm0 \n\t" + "pandn %%mm4, %%mm7 \n\t" + "paddw %%mm2, %%mm0 \n\t" + "paddw %%mm5, %%mm7 \n\t" + // test ((pa <= pb)? pa:pb) <= pc + "pcmpgtw %%mm6, %%mm7 \n\t" // pab > pc? + "pand %%mm7, %%mm3 \n\t" + "pandn %%mm0, %%mm7 \n\t" + "paddw %%mm3, %%mm7 \n\t" + "pxor %%mm1, %%mm1 \n\t" + "packuswb %%mm7, %%mm1 \n\t" + // step ecx to next set of 8 bytes and repeat loop til done + "addl $8, %%ecx \n\t" + "pand _ActiveMaskEnd, %%mm1 \n\t" + "paddb -8(%%edi,%%ecx,), %%mm1 \n\t" // add Paeth predictor with + // Raw(x) + + "cmpl _MMXLength, %%ecx \n\t" + "pxor %%mm0, %%mm0 \n\t" // pxor does not affect flags + "movq %%mm1, -8(%%edi,%%ecx,) \n\t" // write back updated value + // mm1 will be used as Raw(x-bpp) next loop + // mm3 ready to be used as Prior(x-bpp) next loop + "jb paeth_3lp \n\t" + + : "=S" (dummy_value_S), // output regs (dummy) + "=D" (dummy_value_D) + + : "0" (prev_row), // esi // input regs + "1" (row) // edi + + : "%ecx" // clobber list +#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */ + , "%mm0", "%mm1", "%mm2", "%mm3" + , "%mm4", "%mm5", "%mm6", "%mm7" +#endif + ); + } + break; // end 3 bpp + + case 6: + //case 7: // GRR BOGUS + //case 5: // GRR BOGUS + { + _ActiveMask.use = 0x00000000ffffffffLL; + _ActiveMask2.use = 0xffffffff00000000LL; + _ShiftBpp.use = bpp << 3; // == bpp * 8 + _ShiftRem.use = 64 - _ShiftBpp.use; + + __asm__ __volatile__ ( + "movl _dif, %%ecx \n\t" +// preload "movl row, %%edi \n\t" +// preload "movl prev_row, %%esi \n\t" + // prime the pump: load the first Raw(x-bpp) data set + "movq -8(%%edi,%%ecx,), %%mm1 \n\t" + "pxor %%mm0, %%mm0 \n\t" + + "paeth_6lp: \n\t" + // must shift to position Raw(x-bpp) data + "psrlq _ShiftRem, %%mm1 \n\t" + // do first set of 4 bytes + "movq -8(%%esi,%%ecx,), %%mm3 \n\t" // read c=Prior(x-bpp) bytes + "punpcklbw %%mm0, %%mm1 \n\t" // unpack Low bytes of a + "movq (%%esi,%%ecx,), %%mm2 \n\t" // load b=Prior(x) + "punpcklbw %%mm0, %%mm2 \n\t" // unpack Low bytes of b + // must shift to position Prior(x-bpp) data + "psrlq _ShiftRem, %%mm3 \n\t" + // pav = p - a = (a + b - c) - a = b - c + "movq %%mm2, %%mm4 \n\t" + "punpcklbw %%mm0, %%mm3 \n\t" // unpack Low bytes of c + // pbv = p - b = (a + b - c) - b = a - c + "movq %%mm1, %%mm5 \n\t" + "psubw %%mm3, %%mm4 \n\t" + "pxor %%mm7, %%mm7 \n\t" + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + "movq %%mm4, %%mm6 \n\t" + "psubw %%mm3, %%mm5 \n\t" + // pa = abs(p-a) = abs(pav) + // pb = abs(p-b) = abs(pbv) + // pc = abs(p-c) = abs(pcv) + "pcmpgtw %%mm4, %%mm0 \n\t" // create mask pav bytes < 0 + "paddw %%mm5, %%mm6 \n\t" + "pand %%mm4, %%mm0 \n\t" // only pav bytes < 0 in mm7 + "pcmpgtw %%mm5, %%mm7 \n\t" // create mask pbv bytes < 0 + "psubw %%mm0, %%mm4 \n\t" + "pand %%mm5, %%mm7 \n\t" // only pbv bytes < 0 in mm0 + "psubw %%mm0, %%mm4 \n\t" + "psubw %%mm7, %%mm5 \n\t" + "pxor %%mm0, %%mm0 \n\t" + "pcmpgtw %%mm6, %%mm0 \n\t" // create mask pcv bytes < 0 + "pand %%mm6, %%mm0 \n\t" // only pav bytes < 0 in mm7 + "psubw %%mm7, %%mm5 \n\t" + "psubw %%mm0, %%mm6 \n\t" + // test pa <= pb + "movq %%mm4, %%mm7 \n\t" + "psubw %%mm0, %%mm6 \n\t" + "pcmpgtw %%mm5, %%mm7 \n\t" // pa > pb? + "movq %%mm7, %%mm0 \n\t" + // use mm7 mask to merge pa & pb + "pand %%mm7, %%mm5 \n\t" + // use mm0 mask copy to merge a & b + "pand %%mm0, %%mm2 \n\t" + "pandn %%mm4, %%mm7 \n\t" + "pandn %%mm1, %%mm0 \n\t" + "paddw %%mm5, %%mm7 \n\t" + "paddw %%mm2, %%mm0 \n\t" + // test ((pa <= pb)? pa:pb) <= pc + "pcmpgtw %%mm6, %%mm7 \n\t" // pab > pc? + "pxor %%mm1, %%mm1 \n\t" + "pand %%mm7, %%mm3 \n\t" + "pandn %%mm0, %%mm7 \n\t" + "paddw %%mm3, %%mm7 \n\t" + "pxor %%mm0, %%mm0 \n\t" + "packuswb %%mm1, %%mm7 \n\t" + "movq -8(%%esi,%%ecx,), %%mm3 \n\t" // load c=Prior(x-bpp) + "pand _ActiveMask, %%mm7 \n\t" + "psrlq _ShiftRem, %%mm3 \n\t" + "movq (%%esi,%%ecx,), %%mm2 \n\t" // load b=Prior(x) step 1 + "paddb (%%edi,%%ecx,), %%mm7 \n\t" // add Paeth predictor and Raw(x) + "movq %%mm2, %%mm6 \n\t" + "movq %%mm7, (%%edi,%%ecx,) \n\t" // write back updated value + "movq -8(%%edi,%%ecx,), %%mm1 \n\t" + "psllq _ShiftBpp, %%mm6 \n\t" + "movq %%mm7, %%mm5 \n\t" + "psrlq _ShiftRem, %%mm1 \n\t" + "por %%mm6, %%mm3 \n\t" + "psllq _ShiftBpp, %%mm5 \n\t" + "punpckhbw %%mm0, %%mm3 \n\t" // unpack High bytes of c + "por %%mm5, %%mm1 \n\t" + // do second set of 4 bytes + "punpckhbw %%mm0, %%mm2 \n\t" // unpack High bytes of b + "punpckhbw %%mm0, %%mm1 \n\t" // unpack High bytes of a + // pav = p - a = (a + b - c) - a = b - c + "movq %%mm2, %%mm4 \n\t" + // pbv = p - b = (a + b - c) - b = a - c + "movq %%mm1, %%mm5 \n\t" + "psubw %%mm3, %%mm4 \n\t" + "pxor %%mm7, %%mm7 \n\t" + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + "movq %%mm4, %%mm6 \n\t" + "psubw %%mm3, %%mm5 \n\t" + // pa = abs(p-a) = abs(pav) + // pb = abs(p-b) = abs(pbv) + // pc = abs(p-c) = abs(pcv) + "pcmpgtw %%mm4, %%mm0 \n\t" // create mask pav bytes < 0 + "paddw %%mm5, %%mm6 \n\t" + "pand %%mm4, %%mm0 \n\t" // only pav bytes < 0 in mm7 + "pcmpgtw %%mm5, %%mm7 \n\t" // create mask pbv bytes < 0 + "psubw %%mm0, %%mm4 \n\t" + "pand %%mm5, %%mm7 \n\t" // only pbv bytes < 0 in mm0 + "psubw %%mm0, %%mm4 \n\t" + "psubw %%mm7, %%mm5 \n\t" + "pxor %%mm0, %%mm0 \n\t" + "pcmpgtw %%mm6, %%mm0 \n\t" // create mask pcv bytes < 0 + "pand %%mm6, %%mm0 \n\t" // only pav bytes < 0 in mm7 + "psubw %%mm7, %%mm5 \n\t" + "psubw %%mm0, %%mm6 \n\t" + // test pa <= pb + "movq %%mm4, %%mm7 \n\t" + "psubw %%mm0, %%mm6 \n\t" + "pcmpgtw %%mm5, %%mm7 \n\t" // pa > pb? + "movq %%mm7, %%mm0 \n\t" + // use mm7 mask to merge pa & pb + "pand %%mm7, %%mm5 \n\t" + // use mm0 mask copy to merge a & b + "pand %%mm0, %%mm2 \n\t" + "pandn %%mm4, %%mm7 \n\t" + "pandn %%mm1, %%mm0 \n\t" + "paddw %%mm5, %%mm7 \n\t" + "paddw %%mm2, %%mm0 \n\t" + // test ((pa <= pb)? pa:pb) <= pc + "pcmpgtw %%mm6, %%mm7 \n\t" // pab > pc? + "pxor %%mm1, %%mm1 \n\t" + "pand %%mm7, %%mm3 \n\t" + "pandn %%mm0, %%mm7 \n\t" + "pxor %%mm1, %%mm1 \n\t" + "paddw %%mm3, %%mm7 \n\t" + "pxor %%mm0, %%mm0 \n\t" + // step ecx to next set of 8 bytes and repeat loop til done + "addl $8, %%ecx \n\t" + "packuswb %%mm7, %%mm1 \n\t" + "paddb -8(%%edi,%%ecx,), %%mm1 \n\t" // add Paeth predictor with Raw(x) + "cmpl _MMXLength, %%ecx \n\t" + "movq %%mm1, -8(%%edi,%%ecx,) \n\t" // write back updated value + // mm1 will be used as Raw(x-bpp) next loop + "jb paeth_6lp \n\t" + + : "=S" (dummy_value_S), // output regs (dummy) + "=D" (dummy_value_D) + + : "0" (prev_row), // esi // input regs + "1" (row) // edi + + : "%ecx" // clobber list +#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */ + , "%mm0", "%mm1", "%mm2", "%mm3" + , "%mm4", "%mm5", "%mm6", "%mm7" +#endif + ); + } + break; // end 6 bpp + + case 4: + { + _ActiveMask.use = 0x00000000ffffffffLL; + + __asm__ __volatile__ ( + "movl _dif, %%ecx \n\t" +// preload "movl row, %%edi \n\t" +// preload "movl prev_row, %%esi \n\t" + "pxor %%mm0, %%mm0 \n\t" + // prime the pump: load the first Raw(x-bpp) data set + "movq -8(%%edi,%%ecx,), %%mm1 \n\t" // only time should need to read + // a=Raw(x-bpp) bytes + "paeth_4lp: \n\t" + // do first set of 4 bytes + "movq -8(%%esi,%%ecx,), %%mm3 \n\t" // read c=Prior(x-bpp) bytes + "punpckhbw %%mm0, %%mm1 \n\t" // unpack Low bytes of a + "movq (%%esi,%%ecx,), %%mm2 \n\t" // load b=Prior(x) + "punpcklbw %%mm0, %%mm2 \n\t" // unpack High bytes of b + // pav = p - a = (a + b - c) - a = b - c + "movq %%mm2, %%mm4 \n\t" + "punpckhbw %%mm0, %%mm3 \n\t" // unpack High bytes of c + // pbv = p - b = (a + b - c) - b = a - c + "movq %%mm1, %%mm5 \n\t" + "psubw %%mm3, %%mm4 \n\t" + "pxor %%mm7, %%mm7 \n\t" + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + "movq %%mm4, %%mm6 \n\t" + "psubw %%mm3, %%mm5 \n\t" + // pa = abs(p-a) = abs(pav) + // pb = abs(p-b) = abs(pbv) + // pc = abs(p-c) = abs(pcv) + "pcmpgtw %%mm4, %%mm0 \n\t" // create mask pav bytes < 0 + "paddw %%mm5, %%mm6 \n\t" + "pand %%mm4, %%mm0 \n\t" // only pav bytes < 0 in mm7 + "pcmpgtw %%mm5, %%mm7 \n\t" // create mask pbv bytes < 0 + "psubw %%mm0, %%mm4 \n\t" + "pand %%mm5, %%mm7 \n\t" // only pbv bytes < 0 in mm0 + "psubw %%mm0, %%mm4 \n\t" + "psubw %%mm7, %%mm5 \n\t" + "pxor %%mm0, %%mm0 \n\t" + "pcmpgtw %%mm6, %%mm0 \n\t" // create mask pcv bytes < 0 + "pand %%mm6, %%mm0 \n\t" // only pav bytes < 0 in mm7 + "psubw %%mm7, %%mm5 \n\t" + "psubw %%mm0, %%mm6 \n\t" + // test pa <= pb + "movq %%mm4, %%mm7 \n\t" + "psubw %%mm0, %%mm6 \n\t" + "pcmpgtw %%mm5, %%mm7 \n\t" // pa > pb? + "movq %%mm7, %%mm0 \n\t" + // use mm7 mask to merge pa & pb + "pand %%mm7, %%mm5 \n\t" + // use mm0 mask copy to merge a & b + "pand %%mm0, %%mm2 \n\t" + "pandn %%mm4, %%mm7 \n\t" + "pandn %%mm1, %%mm0 \n\t" + "paddw %%mm5, %%mm7 \n\t" + "paddw %%mm2, %%mm0 \n\t" + // test ((pa <= pb)? pa:pb) <= pc + "pcmpgtw %%mm6, %%mm7 \n\t" // pab > pc? + "pxor %%mm1, %%mm1 \n\t" + "pand %%mm7, %%mm3 \n\t" + "pandn %%mm0, %%mm7 \n\t" + "paddw %%mm3, %%mm7 \n\t" + "pxor %%mm0, %%mm0 \n\t" + "packuswb %%mm1, %%mm7 \n\t" + "movq (%%esi,%%ecx,), %%mm3 \n\t" // load c=Prior(x-bpp) + "pand _ActiveMask, %%mm7 \n\t" + "movq %%mm3, %%mm2 \n\t" // load b=Prior(x) step 1 + "paddb (%%edi,%%ecx,), %%mm7 \n\t" // add Paeth predictor with Raw(x) + "punpcklbw %%mm0, %%mm3 \n\t" // unpack High bytes of c + "movq %%mm7, (%%edi,%%ecx,) \n\t" // write back updated value + "movq %%mm7, %%mm1 \n\t" // now mm1 will be used as Raw(x-bpp) + // do second set of 4 bytes + "punpckhbw %%mm0, %%mm2 \n\t" // unpack Low bytes of b + "punpcklbw %%mm0, %%mm1 \n\t" // unpack Low bytes of a + // pav = p - a = (a + b - c) - a = b - c + "movq %%mm2, %%mm4 \n\t" + // pbv = p - b = (a + b - c) - b = a - c + "movq %%mm1, %%mm5 \n\t" + "psubw %%mm3, %%mm4 \n\t" + "pxor %%mm7, %%mm7 \n\t" + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + "movq %%mm4, %%mm6 \n\t" + "psubw %%mm3, %%mm5 \n\t" + // pa = abs(p-a) = abs(pav) + // pb = abs(p-b) = abs(pbv) + // pc = abs(p-c) = abs(pcv) + "pcmpgtw %%mm4, %%mm0 \n\t" // create mask pav bytes < 0 + "paddw %%mm5, %%mm6 \n\t" + "pand %%mm4, %%mm0 \n\t" // only pav bytes < 0 in mm7 + "pcmpgtw %%mm5, %%mm7 \n\t" // create mask pbv bytes < 0 + "psubw %%mm0, %%mm4 \n\t" + "pand %%mm5, %%mm7 \n\t" // only pbv bytes < 0 in mm0 + "psubw %%mm0, %%mm4 \n\t" + "psubw %%mm7, %%mm5 \n\t" + "pxor %%mm0, %%mm0 \n\t" + "pcmpgtw %%mm6, %%mm0 \n\t" // create mask pcv bytes < 0 + "pand %%mm6, %%mm0 \n\t" // only pav bytes < 0 in mm7 + "psubw %%mm7, %%mm5 \n\t" + "psubw %%mm0, %%mm6 \n\t" + // test pa <= pb + "movq %%mm4, %%mm7 \n\t" + "psubw %%mm0, %%mm6 \n\t" + "pcmpgtw %%mm5, %%mm7 \n\t" // pa > pb? + "movq %%mm7, %%mm0 \n\t" + // use mm7 mask to merge pa & pb + "pand %%mm7, %%mm5 \n\t" + // use mm0 mask copy to merge a & b + "pand %%mm0, %%mm2 \n\t" + "pandn %%mm4, %%mm7 \n\t" + "pandn %%mm1, %%mm0 \n\t" + "paddw %%mm5, %%mm7 \n\t" + "paddw %%mm2, %%mm0 \n\t" + // test ((pa <= pb)? pa:pb) <= pc + "pcmpgtw %%mm6, %%mm7 \n\t" // pab > pc? + "pxor %%mm1, %%mm1 \n\t" + "pand %%mm7, %%mm3 \n\t" + "pandn %%mm0, %%mm7 \n\t" + "pxor %%mm1, %%mm1 \n\t" + "paddw %%mm3, %%mm7 \n\t" + "pxor %%mm0, %%mm0 \n\t" + // step ecx to next set of 8 bytes and repeat loop til done + "addl $8, %%ecx \n\t" + "packuswb %%mm7, %%mm1 \n\t" + "paddb -8(%%edi,%%ecx,), %%mm1 \n\t" // add predictor with Raw(x) + "cmpl _MMXLength, %%ecx \n\t" + "movq %%mm1, -8(%%edi,%%ecx,) \n\t" // write back updated value + // mm1 will be used as Raw(x-bpp) next loop + "jb paeth_4lp \n\t" + + : "=S" (dummy_value_S), // output regs (dummy) + "=D" (dummy_value_D) + + : "0" (prev_row), // esi // input regs + "1" (row) // edi + + : "%ecx" // clobber list +#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */ + , "%mm0", "%mm1", "%mm2", "%mm3" + , "%mm4", "%mm5", "%mm6", "%mm7" +#endif + ); + } + break; // end 4 bpp + + case 8: // bpp == 8 + { + _ActiveMask.use = 0x00000000ffffffffLL; + + __asm__ __volatile__ ( + "movl _dif, %%ecx \n\t" +// preload "movl row, %%edi \n\t" +// preload "movl prev_row, %%esi \n\t" + "pxor %%mm0, %%mm0 \n\t" + // prime the pump: load the first Raw(x-bpp) data set + "movq -8(%%edi,%%ecx,), %%mm1 \n\t" // only time should need to read + // a=Raw(x-bpp) bytes + "paeth_8lp: \n\t" + // do first set of 4 bytes + "movq -8(%%esi,%%ecx,), %%mm3 \n\t" // read c=Prior(x-bpp) bytes + "punpcklbw %%mm0, %%mm1 \n\t" // unpack Low bytes of a + "movq (%%esi,%%ecx,), %%mm2 \n\t" // load b=Prior(x) + "punpcklbw %%mm0, %%mm2 \n\t" // unpack Low bytes of b + // pav = p - a = (a + b - c) - a = b - c + "movq %%mm2, %%mm4 \n\t" + "punpcklbw %%mm0, %%mm3 \n\t" // unpack Low bytes of c + // pbv = p - b = (a + b - c) - b = a - c + "movq %%mm1, %%mm5 \n\t" + "psubw %%mm3, %%mm4 \n\t" + "pxor %%mm7, %%mm7 \n\t" + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + "movq %%mm4, %%mm6 \n\t" + "psubw %%mm3, %%mm5 \n\t" + // pa = abs(p-a) = abs(pav) + // pb = abs(p-b) = abs(pbv) + // pc = abs(p-c) = abs(pcv) + "pcmpgtw %%mm4, %%mm0 \n\t" // create mask pav bytes < 0 + "paddw %%mm5, %%mm6 \n\t" + "pand %%mm4, %%mm0 \n\t" // only pav bytes < 0 in mm7 + "pcmpgtw %%mm5, %%mm7 \n\t" // create mask pbv bytes < 0 + "psubw %%mm0, %%mm4 \n\t" + "pand %%mm5, %%mm7 \n\t" // only pbv bytes < 0 in mm0 + "psubw %%mm0, %%mm4 \n\t" + "psubw %%mm7, %%mm5 \n\t" + "pxor %%mm0, %%mm0 \n\t" + "pcmpgtw %%mm6, %%mm0 \n\t" // create mask pcv bytes < 0 + "pand %%mm6, %%mm0 \n\t" // only pav bytes < 0 in mm7 + "psubw %%mm7, %%mm5 \n\t" + "psubw %%mm0, %%mm6 \n\t" + // test pa <= pb + "movq %%mm4, %%mm7 \n\t" + "psubw %%mm0, %%mm6 \n\t" + "pcmpgtw %%mm5, %%mm7 \n\t" // pa > pb? + "movq %%mm7, %%mm0 \n\t" + // use mm7 mask to merge pa & pb + "pand %%mm7, %%mm5 \n\t" + // use mm0 mask copy to merge a & b + "pand %%mm0, %%mm2 \n\t" + "pandn %%mm4, %%mm7 \n\t" + "pandn %%mm1, %%mm0 \n\t" + "paddw %%mm5, %%mm7 \n\t" + "paddw %%mm2, %%mm0 \n\t" + // test ((pa <= pb)? pa:pb) <= pc + "pcmpgtw %%mm6, %%mm7 \n\t" // pab > pc? + "pxor %%mm1, %%mm1 \n\t" + "pand %%mm7, %%mm3 \n\t" + "pandn %%mm0, %%mm7 \n\t" + "paddw %%mm3, %%mm7 \n\t" + "pxor %%mm0, %%mm0 \n\t" + "packuswb %%mm1, %%mm7 \n\t" + "movq -8(%%esi,%%ecx,), %%mm3 \n\t" // read c=Prior(x-bpp) bytes + "pand _ActiveMask, %%mm7 \n\t" + "movq (%%esi,%%ecx,), %%mm2 \n\t" // load b=Prior(x) + "paddb (%%edi,%%ecx,), %%mm7 \n\t" // add Paeth predictor with Raw(x) + "punpckhbw %%mm0, %%mm3 \n\t" // unpack High bytes of c + "movq %%mm7, (%%edi,%%ecx,) \n\t" // write back updated value + "movq -8(%%edi,%%ecx,), %%mm1 \n\t" // read a=Raw(x-bpp) bytes + + // do second set of 4 bytes + "punpckhbw %%mm0, %%mm2 \n\t" // unpack High bytes of b + "punpckhbw %%mm0, %%mm1 \n\t" // unpack High bytes of a + // pav = p - a = (a + b - c) - a = b - c + "movq %%mm2, %%mm4 \n\t" + // pbv = p - b = (a + b - c) - b = a - c + "movq %%mm1, %%mm5 \n\t" + "psubw %%mm3, %%mm4 \n\t" + "pxor %%mm7, %%mm7 \n\t" + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + "movq %%mm4, %%mm6 \n\t" + "psubw %%mm3, %%mm5 \n\t" + // pa = abs(p-a) = abs(pav) + // pb = abs(p-b) = abs(pbv) + // pc = abs(p-c) = abs(pcv) + "pcmpgtw %%mm4, %%mm0 \n\t" // create mask pav bytes < 0 + "paddw %%mm5, %%mm6 \n\t" + "pand %%mm4, %%mm0 \n\t" // only pav bytes < 0 in mm7 + "pcmpgtw %%mm5, %%mm7 \n\t" // create mask pbv bytes < 0 + "psubw %%mm0, %%mm4 \n\t" + "pand %%mm5, %%mm7 \n\t" // only pbv bytes < 0 in mm0 + "psubw %%mm0, %%mm4 \n\t" + "psubw %%mm7, %%mm5 \n\t" + "pxor %%mm0, %%mm0 \n\t" + "pcmpgtw %%mm6, %%mm0 \n\t" // create mask pcv bytes < 0 + "pand %%mm6, %%mm0 \n\t" // only pav bytes < 0 in mm7 + "psubw %%mm7, %%mm5 \n\t" + "psubw %%mm0, %%mm6 \n\t" + // test pa <= pb + "movq %%mm4, %%mm7 \n\t" + "psubw %%mm0, %%mm6 \n\t" + "pcmpgtw %%mm5, %%mm7 \n\t" // pa > pb? + "movq %%mm7, %%mm0 \n\t" + // use mm7 mask to merge pa & pb + "pand %%mm7, %%mm5 \n\t" + // use mm0 mask copy to merge a & b + "pand %%mm0, %%mm2 \n\t" + "pandn %%mm4, %%mm7 \n\t" + "pandn %%mm1, %%mm0 \n\t" + "paddw %%mm5, %%mm7 \n\t" + "paddw %%mm2, %%mm0 \n\t" + // test ((pa <= pb)? pa:pb) <= pc + "pcmpgtw %%mm6, %%mm7 \n\t" // pab > pc? + "pxor %%mm1, %%mm1 \n\t" + "pand %%mm7, %%mm3 \n\t" + "pandn %%mm0, %%mm7 \n\t" + "pxor %%mm1, %%mm1 \n\t" + "paddw %%mm3, %%mm7 \n\t" + "pxor %%mm0, %%mm0 \n\t" + // step ecx to next set of 8 bytes and repeat loop til done + "addl $8, %%ecx \n\t" + "packuswb %%mm7, %%mm1 \n\t" + "paddb -8(%%edi,%%ecx,), %%mm1 \n\t" // add Paeth predictor with Raw(x) + "cmpl _MMXLength, %%ecx \n\t" + "movq %%mm1, -8(%%edi,%%ecx,) \n\t" // write back updated value + // mm1 will be used as Raw(x-bpp) next loop + "jb paeth_8lp \n\t" + + : "=S" (dummy_value_S), // output regs (dummy) + "=D" (dummy_value_D) + + : "0" (prev_row), // esi // input regs + "1" (row) // edi + + : "%ecx" // clobber list +#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */ + , "%mm0", "%mm1", "%mm2", "%mm3" + , "%mm4", "%mm5", "%mm6", "%mm7" +#endif + ); + } + break; // end 8 bpp + + case 1: // bpp = 1 + case 2: // bpp = 2 + default: // bpp > 8 + { + __asm__ __volatile__ ( +#ifdef __PIC__ + "pushl %%ebx \n\t" // save Global Offset Table index +#endif + "movl _dif, %%ebx \n\t" + "cmpl _FullLength, %%ebx \n\t" + "jnb paeth_dend \n\t" + +// preload "movl row, %%edi \n\t" +// preload "movl prev_row, %%esi \n\t" + // do Paeth decode for remaining bytes + "movl %%ebx, %%edx \n\t" +// preload "subl bpp, %%edx \n\t" // (bpp is preloaded into ecx) + "subl %%ecx, %%edx \n\t" // edx = ebx - bpp + "xorl %%ecx, %%ecx \n\t" // zero ecx before using cl & cx + + "paeth_dlp: \n\t" + "xorl %%eax, %%eax \n\t" + // pav = p - a = (a + b - c) - a = b - c + "movb (%%esi,%%ebx,), %%al \n\t" // load Prior(x) into al + "movb (%%esi,%%edx,), %%cl \n\t" // load Prior(x-bpp) into cl + "subl %%ecx, %%eax \n\t" // subtract Prior(x-bpp) + "movl %%eax, _patemp \n\t" // Save pav for later use + "xorl %%eax, %%eax \n\t" + // pbv = p - b = (a + b - c) - b = a - c + "movb (%%edi,%%edx,), %%al \n\t" // load Raw(x-bpp) into al + "subl %%ecx, %%eax \n\t" // subtract Prior(x-bpp) + "movl %%eax, %%ecx \n\t" + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + "addl _patemp, %%eax \n\t" // pcv = pav + pbv + // pc = abs(pcv) + "testl $0x80000000, %%eax \n\t" + "jz paeth_dpca \n\t" + "negl %%eax \n\t" // reverse sign of neg values + + "paeth_dpca: \n\t" + "movl %%eax, _pctemp \n\t" // save pc for later use + // pb = abs(pbv) + "testl $0x80000000, %%ecx \n\t" + "jz paeth_dpba \n\t" + "negl %%ecx \n\t" // reverse sign of neg values + + "paeth_dpba: \n\t" + "movl %%ecx, _pbtemp \n\t" // save pb for later use + // pa = abs(pav) + "movl _patemp, %%eax \n\t" + "testl $0x80000000, %%eax \n\t" + "jz paeth_dpaa \n\t" + "negl %%eax \n\t" // reverse sign of neg values + + "paeth_dpaa: \n\t" + "movl %%eax, _patemp \n\t" // save pa for later use + // test if pa <= pb + "cmpl %%ecx, %%eax \n\t" + "jna paeth_dabb \n\t" + // pa > pb; now test if pb <= pc + "cmpl _pctemp, %%ecx \n\t" + "jna paeth_dbbc \n\t" + // pb > pc; Raw(x) = Paeth(x) + Prior(x-bpp) + "movb (%%esi,%%edx,), %%cl \n\t" // load Prior(x-bpp) into cl + "jmp paeth_dpaeth \n\t" + + "paeth_dbbc: \n\t" + // pb <= pc; Raw(x) = Paeth(x) + Prior(x) + "movb (%%esi,%%ebx,), %%cl \n\t" // load Prior(x) into cl + "jmp paeth_dpaeth \n\t" + + "paeth_dabb: \n\t" + // pa <= pb; now test if pa <= pc + "cmpl _pctemp, %%eax \n\t" + "jna paeth_dabc \n\t" + // pa > pc; Raw(x) = Paeth(x) + Prior(x-bpp) + "movb (%%esi,%%edx,), %%cl \n\t" // load Prior(x-bpp) into cl + "jmp paeth_dpaeth \n\t" + + "paeth_dabc: \n\t" + // pa <= pc; Raw(x) = Paeth(x) + Raw(x-bpp) + "movb (%%edi,%%edx,), %%cl \n\t" // load Raw(x-bpp) into cl + + "paeth_dpaeth: \n\t" + "incl %%ebx \n\t" + "incl %%edx \n\t" + // Raw(x) = (Paeth(x) + Paeth_Predictor( a, b, c )) mod 256 + "addb %%cl, -1(%%edi,%%ebx,) \n\t" + "cmpl _FullLength, %%ebx \n\t" + "jb paeth_dlp \n\t" + + "paeth_dend: \n\t" +#ifdef __PIC__ + "popl %%ebx \n\t" // index to Global Offset Table +#endif + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "0" (bpp), // ecx // input regs + "1" (prev_row), // esi + "2" (row) // edi + + : "%eax", "%edx" // clobber list +#ifndef __PIC__ + , "%ebx" +#endif + ); + } + return; // No need to go further with this one + + } // end switch (bpp) + + __asm__ __volatile__ ( + // MMX acceleration complete; now do clean-up + // check if any remaining bytes left to decode +#ifdef __PIC__ + "pushl %%ebx \n\t" // save index to Global Offset Table +#endif + "movl _MMXLength, %%ebx \n\t" + "cmpl _FullLength, %%ebx \n\t" + "jnb paeth_end \n\t" +//pre "movl row, %%edi \n\t" +//pre "movl prev_row, %%esi \n\t" + // do Paeth decode for remaining bytes + "movl %%ebx, %%edx \n\t" +//pre "subl bpp, %%edx \n\t" // (bpp is preloaded into ecx) + "subl %%ecx, %%edx \n\t" // edx = ebx - bpp + "xorl %%ecx, %%ecx \n\t" // zero ecx before using cl & cx below + + "paeth_lp2: \n\t" + "xorl %%eax, %%eax \n\t" + // pav = p - a = (a + b - c) - a = b - c + "movb (%%esi,%%ebx,), %%al \n\t" // load Prior(x) into al + "movb (%%esi,%%edx,), %%cl \n\t" // load Prior(x-bpp) into cl + "subl %%ecx, %%eax \n\t" // subtract Prior(x-bpp) + "movl %%eax, _patemp \n\t" // Save pav for later use + "xorl %%eax, %%eax \n\t" + // pbv = p - b = (a + b - c) - b = a - c + "movb (%%edi,%%edx,), %%al \n\t" // load Raw(x-bpp) into al + "subl %%ecx, %%eax \n\t" // subtract Prior(x-bpp) + "movl %%eax, %%ecx \n\t" + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + "addl _patemp, %%eax \n\t" // pcv = pav + pbv + // pc = abs(pcv) + "testl $0x80000000, %%eax \n\t" + "jz paeth_pca2 \n\t" + "negl %%eax \n\t" // reverse sign of neg values + + "paeth_pca2: \n\t" + "movl %%eax, _pctemp \n\t" // save pc for later use + // pb = abs(pbv) + "testl $0x80000000, %%ecx \n\t" + "jz paeth_pba2 \n\t" + "negl %%ecx \n\t" // reverse sign of neg values + + "paeth_pba2: \n\t" + "movl %%ecx, _pbtemp \n\t" // save pb for later use + // pa = abs(pav) + "movl _patemp, %%eax \n\t" + "testl $0x80000000, %%eax \n\t" + "jz paeth_paa2 \n\t" + "negl %%eax \n\t" // reverse sign of neg values + + "paeth_paa2: \n\t" + "movl %%eax, _patemp \n\t" // save pa for later use + // test if pa <= pb + "cmpl %%ecx, %%eax \n\t" + "jna paeth_abb2 \n\t" + // pa > pb; now test if pb <= pc + "cmpl _pctemp, %%ecx \n\t" + "jna paeth_bbc2 \n\t" + // pb > pc; Raw(x) = Paeth(x) + Prior(x-bpp) + "movb (%%esi,%%edx,), %%cl \n\t" // load Prior(x-bpp) into cl + "jmp paeth_paeth2 \n\t" + + "paeth_bbc2: \n\t" + // pb <= pc; Raw(x) = Paeth(x) + Prior(x) + "movb (%%esi,%%ebx,), %%cl \n\t" // load Prior(x) into cl + "jmp paeth_paeth2 \n\t" + + "paeth_abb2: \n\t" + // pa <= pb; now test if pa <= pc + "cmpl _pctemp, %%eax \n\t" + "jna paeth_abc2 \n\t" + // pa > pc; Raw(x) = Paeth(x) + Prior(x-bpp) + "movb (%%esi,%%edx,), %%cl \n\t" // load Prior(x-bpp) into cl + "jmp paeth_paeth2 \n\t" + + "paeth_abc2: \n\t" + // pa <= pc; Raw(x) = Paeth(x) + Raw(x-bpp) + "movb (%%edi,%%edx,), %%cl \n\t" // load Raw(x-bpp) into cl + + "paeth_paeth2: \n\t" + "incl %%ebx \n\t" + "incl %%edx \n\t" + // Raw(x) = (Paeth(x) + Paeth_Predictor( a, b, c )) mod 256 + "addb %%cl, -1(%%edi,%%ebx,) \n\t" + "cmpl _FullLength, %%ebx \n\t" + "jb paeth_lp2 \n\t" + + "paeth_end: \n\t" + "EMMS \n\t" // end MMX; prep for poss. FP instrs. +#ifdef __PIC__ + "popl %%ebx \n\t" // restore index to Global Offset Table +#endif + + : "=c" (dummy_value_c), // output regs (dummy) + "=S" (dummy_value_S), + "=D" (dummy_value_D) + + : "0" (bpp), // ecx // input regs + "1" (prev_row), // esi + "2" (row) // edi + + : "%eax", "%edx" // clobber list (no input regs!) +#ifndef __PIC__ + , "%ebx" +#endif + ); + +} /* end png_read_filter_row_mmx_paeth() */ +#endif + + + + +#ifdef PNG_THREAD_UNSAFE_OK +//===========================================================================// +// // +// P N G _ R E A D _ F I L T E R _ R O W _ M M X _ S U B // +// // +//===========================================================================// + +// Optimized code for PNG Sub filter decoder + +static void /* PRIVATE */ +png_read_filter_row_mmx_sub(png_row_infop row_info, png_bytep row) +{ + int bpp; + int dummy_value_a; + int dummy_value_D; + + bpp = (row_info->pixel_depth + 7) >> 3; // calc number of bytes per pixel + _FullLength = row_info->rowbytes - bpp; // number of bytes to filter + + __asm__ __volatile__ ( +//pre "movl row, %%edi \n\t" + "movl %%edi, %%esi \n\t" // lp = row +//pre "movl bpp, %%eax \n\t" + "addl %%eax, %%edi \n\t" // rp = row + bpp +//irr "xorl %%eax, %%eax \n\t" + // get # of bytes to alignment + "movl %%edi, _dif \n\t" // take start of row + "addl $0xf, _dif \n\t" // add 7 + 8 to incr past + // alignment boundary + "xorl %%ecx, %%ecx \n\t" + "andl $0xfffffff8, _dif \n\t" // mask to alignment boundary + "subl %%edi, _dif \n\t" // subtract from start ==> value + "jz sub_go \n\t" // ecx at alignment + + "sub_lp1: \n\t" // fix alignment + "movb (%%esi,%%ecx,), %%al \n\t" + "addb %%al, (%%edi,%%ecx,) \n\t" + "incl %%ecx \n\t" + "cmpl _dif, %%ecx \n\t" + "jb sub_lp1 \n\t" + + "sub_go: \n\t" + "movl _FullLength, %%eax \n\t" + "movl %%eax, %%edx \n\t" + "subl %%ecx, %%edx \n\t" // subtract alignment fix + "andl $0x00000007, %%edx \n\t" // calc bytes over mult of 8 + "subl %%edx, %%eax \n\t" // drop over bytes from length + "movl %%eax, _MMXLength \n\t" + + : "=a" (dummy_value_a), // 0 // output regs (dummy) + "=D" (dummy_value_D) // 1 + + : "0" (bpp), // eax // input regs + "1" (row) // edi + + : "%ebx", "%ecx", "%edx" // clobber list + , "%esi" + +#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ + , "%mm0", "%mm1", "%mm2", "%mm3" + , "%mm4", "%mm5", "%mm6", "%mm7" +#endif + ); + + // now do the math for the rest of the row + switch (bpp) + { + case 3: + { + _ActiveMask.use = 0x0000ffffff000000LL; + _ShiftBpp.use = 24; // == 3 * 8 + _ShiftRem.use = 40; // == 64 - 24 + + __asm__ __volatile__ ( +// preload "movl row, %%edi \n\t" + "movq _ActiveMask, %%mm7 \n\t" // load _ActiveMask for 2nd + // active byte group + "movl %%edi, %%esi \n\t" // lp = row +// preload "movl bpp, %%eax \n\t" + "addl %%eax, %%edi \n\t" // rp = row + bpp + "movq %%mm7, %%mm6 \n\t" + "movl _dif, %%edx \n\t" + "psllq _ShiftBpp, %%mm6 \n\t" // move mask in mm6 to cover + // 3rd active byte group + // prime the pump: load the first Raw(x-bpp) data set + "movq -8(%%edi,%%edx,), %%mm1 \n\t" + + "sub_3lp: \n\t" // shift data for adding first + "psrlq _ShiftRem, %%mm1 \n\t" // bpp bytes (no need for mask; + // shift clears inactive bytes) + // add 1st active group + "movq (%%edi,%%edx,), %%mm0 \n\t" + "paddb %%mm1, %%mm0 \n\t" + + // add 2nd active group + "movq %%mm0, %%mm1 \n\t" // mov updated Raws to mm1 + "psllq _ShiftBpp, %%mm1 \n\t" // shift data to pos. correctly + "pand %%mm7, %%mm1 \n\t" // mask to use 2nd active group + "paddb %%mm1, %%mm0 \n\t" + + // add 3rd active group + "movq %%mm0, %%mm1 \n\t" // mov updated Raws to mm1 + "psllq _ShiftBpp, %%mm1 \n\t" // shift data to pos. correctly + "pand %%mm6, %%mm1 \n\t" // mask to use 3rd active group + "addl $8, %%edx \n\t" + "paddb %%mm1, %%mm0 \n\t" + + "cmpl _MMXLength, %%edx \n\t" + "movq %%mm0, -8(%%edi,%%edx,) \n\t" // write updated Raws to array + "movq %%mm0, %%mm1 \n\t" // prep 1st add at top of loop + "jb sub_3lp \n\t" + + : "=a" (dummy_value_a), // 0 // output regs (dummy) + "=D" (dummy_value_D) // 1 + + : "0" (bpp), // eax // input regs + "1" (row) // edi + + : "%edx", "%esi" // clobber list +#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ + , "%mm0", "%mm1", "%mm6", "%mm7" +#endif + ); + } + break; + + case 1: + { + __asm__ __volatile__ ( + "movl _dif, %%edx \n\t" +// preload "movl row, %%edi \n\t" + "cmpl _FullLength, %%edx \n\t" + "jnb sub_1end \n\t" + "movl %%edi, %%esi \n\t" // lp = row + "xorl %%eax, %%eax \n\t" +// preload "movl bpp, %%eax \n\t" + "addl %%eax, %%edi \n\t" // rp = row + bpp + + "sub_1lp: \n\t" + "movb (%%esi,%%edx,), %%al \n\t" + "addb %%al, (%%edi,%%edx,) \n\t" + "incl %%edx \n\t" + "cmpl _FullLength, %%edx \n\t" + "jb sub_1lp \n\t" + + "sub_1end: \n\t" + + : "=a" (dummy_value_a), // 0 // output regs (dummy) + "=D" (dummy_value_D) // 1 + + : "0" (bpp), // eax // input regs + "1" (row) // edi + + : "%edx", "%esi" // clobber list + ); + } + return; + + case 6: + case 4: + //case 7: // GRR BOGUS + //case 5: // GRR BOGUS + { + _ShiftBpp.use = bpp << 3; + _ShiftRem.use = 64 - _ShiftBpp.use; + + __asm__ __volatile__ ( +// preload "movl row, %%edi \n\t" + "movl _dif, %%edx \n\t" + "movl %%edi, %%esi \n\t" // lp = row +// preload "movl bpp, %%eax \n\t" + "addl %%eax, %%edi \n\t" // rp = row + bpp + + // prime the pump: load the first Raw(x-bpp) data set + "movq -8(%%edi,%%edx,), %%mm1 \n\t" + + "sub_4lp: \n\t" // shift data for adding first + "psrlq _ShiftRem, %%mm1 \n\t" // bpp bytes (no need for mask; + // shift clears inactive bytes) + "movq (%%edi,%%edx,), %%mm0 \n\t" + "paddb %%mm1, %%mm0 \n\t" + + // add 2nd active group + "movq %%mm0, %%mm1 \n\t" // mov updated Raws to mm1 + "psllq _ShiftBpp, %%mm1 \n\t" // shift data to pos. correctly + "addl $8, %%edx \n\t" + "paddb %%mm1, %%mm0 \n\t" + + "cmpl _MMXLength, %%edx \n\t" + "movq %%mm0, -8(%%edi,%%edx,) \n\t" + "movq %%mm0, %%mm1 \n\t" // prep 1st add at top of loop + "jb sub_4lp \n\t" + + : "=a" (dummy_value_a), // 0 // output regs (dummy) + "=D" (dummy_value_D) // 1 + + : "0" (bpp), // eax // input regs + "1" (row) // edi + + : "%edx", "%esi" // clobber list +#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ + , "%mm0", "%mm1" +#endif + ); + } + break; + + case 2: + { + _ActiveMask.use = 0x00000000ffff0000LL; + _ShiftBpp.use = 16; // == 2 * 8 + _ShiftRem.use = 48; // == 64 - 16 + + __asm__ __volatile__ ( + "movq _ActiveMask, %%mm7 \n\t" // load _ActiveMask for 2nd + // active byte group + "movl _dif, %%edx \n\t" + "movq %%mm7, %%mm6 \n\t" +// preload "movl row, %%edi \n\t" + "psllq _ShiftBpp, %%mm6 \n\t" // move mask in mm6 to cover + // 3rd active byte group + "movl %%edi, %%esi \n\t" // lp = row + "movq %%mm6, %%mm5 \n\t" +// preload "movl bpp, %%eax \n\t" + "addl %%eax, %%edi \n\t" // rp = row + bpp + "psllq _ShiftBpp, %%mm5 \n\t" // move mask in mm5 to cover + // 4th active byte group + // prime the pump: load the first Raw(x-bpp) data set + "movq -8(%%edi,%%edx,), %%mm1 \n\t" + + "sub_2lp: \n\t" // shift data for adding first + "psrlq _ShiftRem, %%mm1 \n\t" // bpp bytes (no need for mask; + // shift clears inactive bytes) + // add 1st active group + "movq (%%edi,%%edx,), %%mm0 \n\t" + "paddb %%mm1, %%mm0 \n\t" + + // add 2nd active group + "movq %%mm0, %%mm1 \n\t" // mov updated Raws to mm1 + "psllq _ShiftBpp, %%mm1 \n\t" // shift data to pos. correctly + "pand %%mm7, %%mm1 \n\t" // mask to use 2nd active group + "paddb %%mm1, %%mm0 \n\t" + + // add 3rd active group + "movq %%mm0, %%mm1 \n\t" // mov updated Raws to mm1 + "psllq _ShiftBpp, %%mm1 \n\t" // shift data to pos. correctly + "pand %%mm6, %%mm1 \n\t" // mask to use 3rd active group + "paddb %%mm1, %%mm0 \n\t" + + // add 4th active group + "movq %%mm0, %%mm1 \n\t" // mov updated Raws to mm1 + "psllq _ShiftBpp, %%mm1 \n\t" // shift data to pos. correctly + "pand %%mm5, %%mm1 \n\t" // mask to use 4th active group + "addl $8, %%edx \n\t" + "paddb %%mm1, %%mm0 \n\t" + "cmpl _MMXLength, %%edx \n\t" + "movq %%mm0, -8(%%edi,%%edx,) \n\t" // write updated Raws to array + "movq %%mm0, %%mm1 \n\t" // prep 1st add at top of loop + "jb sub_2lp \n\t" + + : "=a" (dummy_value_a), // 0 // output regs (dummy) + "=D" (dummy_value_D) // 1 + + : "0" (bpp), // eax // input regs + "1" (row) // edi + + : "%edx", "%esi" // clobber list +#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ + , "%mm0", "%mm1", "%mm5", "%mm6", "%mm7" +#endif + ); + } + break; + + case 8: + { + __asm__ __volatile__ ( +// preload "movl row, %%edi \n\t" + "movl _dif, %%edx \n\t" + "movl %%edi, %%esi \n\t" // lp = row +// preload "movl bpp, %%eax \n\t" + "addl %%eax, %%edi \n\t" // rp = row + bpp + "movl _MMXLength, %%ecx \n\t" + + // prime the pump: load the first Raw(x-bpp) data set + "movq -8(%%edi,%%edx,), %%mm7 \n\t" + "andl $0x0000003f, %%ecx \n\t" // calc bytes over mult of 64 + + "sub_8lp: \n\t" + "movq (%%edi,%%edx,), %%mm0 \n\t" // load Sub(x) for 1st 8 bytes + "paddb %%mm7, %%mm0 \n\t" + "movq 8(%%edi,%%edx,), %%mm1 \n\t" // load Sub(x) for 2nd 8 bytes + "movq %%mm0, (%%edi,%%edx,) \n\t" // write Raw(x) for 1st 8 bytes + + // Now mm0 will be used as Raw(x-bpp) for the 2nd group of 8 bytes. + // This will be repeated for each group of 8 bytes with the 8th + // group being used as the Raw(x-bpp) for the 1st group of the + // next loop. + + "paddb %%mm0, %%mm1 \n\t" + "movq 16(%%edi,%%edx,), %%mm2 \n\t" // load Sub(x) for 3rd 8 bytes + "movq %%mm1, 8(%%edi,%%edx,) \n\t" // write Raw(x) for 2nd 8 bytes + "paddb %%mm1, %%mm2 \n\t" + "movq 24(%%edi,%%edx,), %%mm3 \n\t" // load Sub(x) for 4th 8 bytes + "movq %%mm2, 16(%%edi,%%edx,) \n\t" // write Raw(x) for 3rd 8 bytes + "paddb %%mm2, %%mm3 \n\t" + "movq 32(%%edi,%%edx,), %%mm4 \n\t" // load Sub(x) for 5th 8 bytes + "movq %%mm3, 24(%%edi,%%edx,) \n\t" // write Raw(x) for 4th 8 bytes + "paddb %%mm3, %%mm4 \n\t" + "movq 40(%%edi,%%edx,), %%mm5 \n\t" // load Sub(x) for 6th 8 bytes + "movq %%mm4, 32(%%edi,%%edx,) \n\t" // write Raw(x) for 5th 8 bytes + "paddb %%mm4, %%mm5 \n\t" + "movq 48(%%edi,%%edx,), %%mm6 \n\t" // load Sub(x) for 7th 8 bytes + "movq %%mm5, 40(%%edi,%%edx,) \n\t" // write Raw(x) for 6th 8 bytes + "paddb %%mm5, %%mm6 \n\t" + "movq 56(%%edi,%%edx,), %%mm7 \n\t" // load Sub(x) for 8th 8 bytes + "movq %%mm6, 48(%%edi,%%edx,) \n\t" // write Raw(x) for 7th 8 bytes + "addl $64, %%edx \n\t" + "paddb %%mm6, %%mm7 \n\t" + "cmpl %%ecx, %%edx \n\t" + "movq %%mm7, -8(%%edi,%%edx,) \n\t" // write Raw(x) for 8th 8 bytes + "jb sub_8lp \n\t" + + "cmpl _MMXLength, %%edx \n\t" + "jnb sub_8lt8 \n\t" + + "sub_8lpA: \n\t" + "movq (%%edi,%%edx,), %%mm0 \n\t" + "addl $8, %%edx \n\t" + "paddb %%mm7, %%mm0 \n\t" + "cmpl _MMXLength, %%edx \n\t" + "movq %%mm0, -8(%%edi,%%edx,) \n\t" // -8 to offset early addl edx + "movq %%mm0, %%mm7 \n\t" // move calculated Raw(x) data + // to mm1 to be new Raw(x-bpp) + // for next loop + "jb sub_8lpA \n\t" + + "sub_8lt8: \n\t" + + : "=a" (dummy_value_a), // 0 // output regs (dummy) + "=D" (dummy_value_D) // 1 + + : "0" (bpp), // eax // input regs + "1" (row) // edi + + : "%ecx", "%edx", "%esi" // clobber list +#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ + , "%mm0", "%mm1", "%mm2", "%mm3", "%mm4", "%mm5", "%mm6", "%mm7" +#endif + ); + } + break; + + default: // bpp greater than 8 bytes GRR BOGUS + { + __asm__ __volatile__ ( + "movl _dif, %%edx \n\t" +// preload "movl row, %%edi \n\t" + "movl %%edi, %%esi \n\t" // lp = row +// preload "movl bpp, %%eax \n\t" + "addl %%eax, %%edi \n\t" // rp = row + bpp + + "sub_Alp: \n\t" + "movq (%%edi,%%edx,), %%mm0 \n\t" + "movq (%%esi,%%edx,), %%mm1 \n\t" + "addl $8, %%edx \n\t" + "paddb %%mm1, %%mm0 \n\t" + "cmpl _MMXLength, %%edx \n\t" + "movq %%mm0, -8(%%edi,%%edx,) \n\t" // mov does not affect flags; + // -8 to offset addl edx + "jb sub_Alp \n\t" + + : "=a" (dummy_value_a), // 0 // output regs (dummy) + "=D" (dummy_value_D) // 1 + + : "0" (bpp), // eax // input regs + "1" (row) // edi + + : "%edx", "%esi" // clobber list +#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ + , "%mm0", "%mm1" +#endif + ); + } + break; + + } // end switch (bpp) + + __asm__ __volatile__ ( + "movl _MMXLength, %%edx \n\t" +//pre "movl row, %%edi \n\t" + "cmpl _FullLength, %%edx \n\t" + "jnb sub_end \n\t" + + "movl %%edi, %%esi \n\t" // lp = row +//pre "movl bpp, %%eax \n\t" + "addl %%eax, %%edi \n\t" // rp = row + bpp + "xorl %%eax, %%eax \n\t" + + "sub_lp2: \n\t" + "movb (%%esi,%%edx,), %%al \n\t" + "addb %%al, (%%edi,%%edx,) \n\t" + "incl %%edx \n\t" + "cmpl _FullLength, %%edx \n\t" + "jb sub_lp2 \n\t" + + "sub_end: \n\t" + "EMMS \n\t" // end MMX instructions + + : "=a" (dummy_value_a), // 0 // output regs (dummy) + "=D" (dummy_value_D) // 1 + + : "0" (bpp), // eax // input regs + "1" (row) // edi + + : "%edx", "%esi" // clobber list + ); + +} // end of png_read_filter_row_mmx_sub() +#endif + + + + +//===========================================================================// +// // +// P N G _ R E A D _ F I L T E R _ R O W _ M M X _ U P // +// // +//===========================================================================// + +// Optimized code for PNG Up filter decoder + +static void /* PRIVATE */ +png_read_filter_row_mmx_up(png_row_infop row_info, png_bytep row, + png_bytep prev_row) +{ + png_uint_32 len; + int dummy_value_d; // fix 'forbidden register 3 (dx) was spilled' error + int dummy_value_S; + int dummy_value_D; + + len = row_info->rowbytes; // number of bytes to filter + + __asm__ __volatile__ ( +//pre "movl row, %%edi \n\t" + // get # of bytes to alignment +#ifdef __PIC__ + "pushl %%ebx \n\t" +#endif + "movl %%edi, %%ecx \n\t" + "xorl %%ebx, %%ebx \n\t" + "addl $0x7, %%ecx \n\t" + "xorl %%eax, %%eax \n\t" + "andl $0xfffffff8, %%ecx \n\t" +//pre "movl prev_row, %%esi \n\t" + "subl %%edi, %%ecx \n\t" + "jz up_go \n\t" + + "up_lp1: \n\t" // fix alignment + "movb (%%edi,%%ebx,), %%al \n\t" + "addb (%%esi,%%ebx,), %%al \n\t" + "incl %%ebx \n\t" + "cmpl %%ecx, %%ebx \n\t" + "movb %%al, -1(%%edi,%%ebx,) \n\t" // mov does not affect flags; -1 to + "jb up_lp1 \n\t" // offset incl ebx + + "up_go: \n\t" +//pre "movl len, %%edx \n\t" + "movl %%edx, %%ecx \n\t" + "subl %%ebx, %%edx \n\t" // subtract alignment fix + "andl $0x0000003f, %%edx \n\t" // calc bytes over mult of 64 + "subl %%edx, %%ecx \n\t" // drop over bytes from length + + // unrolled loop - use all MMX registers and interleave to reduce + // number of branch instructions (loops) and reduce partial stalls + "up_loop: \n\t" + "movq (%%esi,%%ebx,), %%mm1 \n\t" + "movq (%%edi,%%ebx,), %%mm0 \n\t" + "movq 8(%%esi,%%ebx,), %%mm3 \n\t" + "paddb %%mm1, %%mm0 \n\t" + "movq 8(%%edi,%%ebx,), %%mm2 \n\t" + "movq %%mm0, (%%edi,%%ebx,) \n\t" + "paddb %%mm3, %%mm2 \n\t" + "movq 16(%%esi,%%ebx,), %%mm5 \n\t" + "movq %%mm2, 8(%%edi,%%ebx,) \n\t" + "movq 16(%%edi,%%ebx,), %%mm4 \n\t" + "movq 24(%%esi,%%ebx,), %%mm7 \n\t" + "paddb %%mm5, %%mm4 \n\t" + "movq 24(%%edi,%%ebx,), %%mm6 \n\t" + "movq %%mm4, 16(%%edi,%%ebx,) \n\t" + "paddb %%mm7, %%mm6 \n\t" + "movq 32(%%esi,%%ebx,), %%mm1 \n\t" + "movq %%mm6, 24(%%edi,%%ebx,) \n\t" + "movq 32(%%edi,%%ebx,), %%mm0 \n\t" + "movq 40(%%esi,%%ebx,), %%mm3 \n\t" + "paddb %%mm1, %%mm0 \n\t" + "movq 40(%%edi,%%ebx,), %%mm2 \n\t" + "movq %%mm0, 32(%%edi,%%ebx,) \n\t" + "paddb %%mm3, %%mm2 \n\t" + "movq 48(%%esi,%%ebx,), %%mm5 \n\t" + "movq %%mm2, 40(%%edi,%%ebx,) \n\t" + "movq 48(%%edi,%%ebx,), %%mm4 \n\t" + "movq 56(%%esi,%%ebx,), %%mm7 \n\t" + "paddb %%mm5, %%mm4 \n\t" + "movq 56(%%edi,%%ebx,), %%mm6 \n\t" + "movq %%mm4, 48(%%edi,%%ebx,) \n\t" + "addl $64, %%ebx \n\t" + "paddb %%mm7, %%mm6 \n\t" + "cmpl %%ecx, %%ebx \n\t" + "movq %%mm6, -8(%%edi,%%ebx,) \n\t" // (+56)movq does not affect flags; + "jb up_loop \n\t" // -8 to offset addl ebx + + "cmpl $0, %%edx \n\t" // test for bytes over mult of 64 + "jz up_end \n\t" + + "cmpl $8, %%edx \n\t" // test for less than 8 bytes + "jb up_lt8 \n\t" // [added by lcreeve@netins.net] + + "addl %%edx, %%ecx \n\t" + "andl $0x00000007, %%edx \n\t" // calc bytes over mult of 8 + "subl %%edx, %%ecx \n\t" // drop over bytes from length + "jz up_lt8 \n\t" + + "up_lpA: \n\t" // use MMX regs to update 8 bytes sim. + "movq (%%esi,%%ebx,), %%mm1 \n\t" + "movq (%%edi,%%ebx,), %%mm0 \n\t" + "addl $8, %%ebx \n\t" + "paddb %%mm1, %%mm0 \n\t" + "cmpl %%ecx, %%ebx \n\t" + "movq %%mm0, -8(%%edi,%%ebx,) \n\t" // movq does not affect flags; -8 to + "jb up_lpA \n\t" // offset add ebx + "cmpl $0, %%edx \n\t" // test for bytes over mult of 8 + "jz up_end \n\t" + + "up_lt8: \n\t" + "xorl %%eax, %%eax \n\t" + "addl %%edx, %%ecx \n\t" // move over byte count into counter + + "up_lp2: \n\t" // use x86 regs for remaining bytes + "movb (%%edi,%%ebx,), %%al \n\t" + "addb (%%esi,%%ebx,), %%al \n\t" + "incl %%ebx \n\t" + "cmpl %%ecx, %%ebx \n\t" + "movb %%al, -1(%%edi,%%ebx,) \n\t" // mov does not affect flags; -1 to + "jb up_lp2 \n\t" // offset inc ebx + + "up_end: \n\t" + "EMMS \n\t" // conversion of filtered row complete +#ifdef __PIC__ + "popl %%ebx \n\t" +#endif + + : "=d" (dummy_value_d), // 0 // output regs (dummy) + "=S" (dummy_value_S), // 1 + "=D" (dummy_value_D) // 2 + + : "0" (len), // edx // input regs + "1" (prev_row), // esi + "2" (row) // edi + + : "%eax", "%ebx", "%ecx" // clobber list (no input regs!) + +#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ + , "%mm0", "%mm1", "%mm2", "%mm3" + , "%mm4", "%mm5", "%mm6", "%mm7" +#endif + ); + +} // end of png_read_filter_row_mmx_up() + +#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ + + + + +/*===========================================================================*/ +/* */ +/* P N G _ R E A D _ F I L T E R _ R O W */ +/* */ +/*===========================================================================*/ + + +/* Optimized png_read_filter_row routines */ + +void /* PRIVATE */ +png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep + row, png_bytep prev_row, int filter) +{ +#ifdef PNG_DEBUG + char filnm[10]; +#endif + +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) +/* GRR: these are superseded by png_ptr->asm_flags: */ +#define UseMMX_sub 1 // GRR: converted 20000730 +#define UseMMX_up 1 // GRR: converted 20000729 +#define UseMMX_avg 1 // GRR: converted 20000828 (+ 16-bit bugfix 20000916) +#define UseMMX_paeth 1 // GRR: converted 20000828 + + if (_mmx_supported == 2) { + /* this should have happened in png_init_mmx_flags() already */ +#if !defined(PNG_1_0_X) + png_warning(png_ptr, "asm_flags may not have been initialized"); +#endif + png_mmx_support(); + } +#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ + +#ifdef PNG_DEBUG + png_debug(1, "in png_read_filter_row (pnggccrd.c)\n"); + switch (filter) + { + case 0: sprintf(filnm, "none"); + break; + case 1: sprintf(filnm, "sub-%s", +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) +#if !defined(PNG_1_0_X) + (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "MMX" : +#endif +#endif +"x86"); + break; + case 2: sprintf(filnm, "up-%s", +#ifdef PNG_ASSEMBLER_CODE_SUPPORTED +#if !defined(PNG_1_0_X) + (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP)? "MMX" : +#endif +#endif + "x86"); + break; + case 3: sprintf(filnm, "avg-%s", +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) +#if !defined(PNG_1_0_X) + (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)? "MMX" : +#endif +#endif + "x86"); + break; + case 4: sprintf(filnm, "Paeth-%s", +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) +#if !defined(PNG_1_0_X) + (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)? "MMX": +#endif +#endif +"x86"); + break; + default: sprintf(filnm, "unknw"); + break; + } + png_debug2(0, "row_number=%5ld, %5s, ", png_ptr->row_number, filnm); + png_debug1(0, "row=0x%08lx, ", (unsigned long)row); + png_debug2(0, "pixdepth=%2d, bytes=%d, ", (int)row_info->pixel_depth, + (int)((row_info->pixel_depth + 7) >> 3)); + png_debug1(0,"rowbytes=%8ld\n", row_info->rowbytes); +#endif /* PNG_DEBUG */ + + switch (filter) + { + case PNG_FILTER_VALUE_NONE: + break; + + case PNG_FILTER_VALUE_SUB: +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) +#if !defined(PNG_1_0_X) + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB) && + (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) && + (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold)) +#else + if (_mmx_supported) +#endif + { + png_read_filter_row_mmx_sub(row_info, row); + } + else +#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ + { + png_uint_32 i; + png_uint_32 istop = row_info->rowbytes; + png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; + png_bytep rp = row + bpp; + png_bytep lp = row; + + for (i = bpp; i < istop; i++) + { + *rp = (png_byte)(((int)(*rp) + (int)(*lp++)) & 0xff); + rp++; + } + } /* end !UseMMX_sub */ + break; + + case PNG_FILTER_VALUE_UP: +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) +#if !defined(PNG_1_0_X) + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP) && + (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) && + (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold)) +#else + if (_mmx_supported) +#endif + { + png_read_filter_row_mmx_up(row_info, row, prev_row); + } + else +#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ + { + png_uint_32 i; + png_uint_32 istop = row_info->rowbytes; + png_bytep rp = row; + png_bytep pp = prev_row; + + for (i = 0; i < istop; ++i) + { + *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff); + rp++; + } + } /* end !UseMMX_up */ + break; + + case PNG_FILTER_VALUE_AVG: +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) +#if !defined(PNG_1_0_X) + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG) && + (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) && + (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold)) +#else + if (_mmx_supported) +#endif + { + png_read_filter_row_mmx_avg(row_info, row, prev_row); + } + else +#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ + { + png_uint_32 i; + png_bytep rp = row; + png_bytep pp = prev_row; + png_bytep lp = row; + png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; + png_uint_32 istop = row_info->rowbytes - bpp; + + for (i = 0; i < bpp; i++) + { + *rp = (png_byte)(((int)(*rp) + + ((int)(*pp++) >> 1)) & 0xff); + rp++; + } + + for (i = 0; i < istop; i++) + { + *rp = (png_byte)(((int)(*rp) + + ((int)(*pp++ + *lp++) >> 1)) & 0xff); + rp++; + } + } /* end !UseMMX_avg */ + break; + + case PNG_FILTER_VALUE_PAETH: +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) +#if !defined(PNG_1_0_X) + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH) && + (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) && + (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold)) +#else + if (_mmx_supported) +#endif + { + png_read_filter_row_mmx_paeth(row_info, row, prev_row); + } + else +#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ + { + png_uint_32 i; + png_bytep rp = row; + png_bytep pp = prev_row; + png_bytep lp = row; + png_bytep cp = prev_row; + png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; + png_uint_32 istop = row_info->rowbytes - bpp; + + for (i = 0; i < bpp; i++) + { + *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff); + rp++; + } + + for (i = 0; i < istop; i++) /* use leftover rp,pp */ + { + int a, b, c, pa, pb, pc, p; + + a = *lp++; + b = *pp++; + c = *cp++; + + p = b - c; + pc = a - c; + +#ifdef PNG_USE_ABS + pa = abs(p); + pb = abs(pc); + pc = abs(p + pc); +#else + pa = p < 0 ? -p : p; + pb = pc < 0 ? -pc : pc; + pc = (p + pc) < 0 ? -(p + pc) : p + pc; +#endif + + /* + if (pa <= pb && pa <= pc) + p = a; + else if (pb <= pc) + p = b; + else + p = c; + */ + + p = (pa <= pb && pa <= pc) ? a : (pb <= pc) ? b : c; + + *rp = (png_byte)(((int)(*rp) + p) & 0xff); + rp++; + } + } /* end !UseMMX_paeth */ + break; + + default: + png_warning(png_ptr, "Ignoring bad row-filter type"); + *row=0; + break; + } +} + +#endif /* PNG_HAVE_ASSEMBLER_READ_FILTER_ROW */ + + +/*===========================================================================*/ +/* */ +/* P N G _ M M X _ S U P P O R T */ +/* */ +/*===========================================================================*/ + +/* GRR NOTES: (1) the following code assumes 386 or better (pushfl/popfl) + * (2) all instructions compile with gcc 2.7.2.3 and later + * (3) the function is moved down here to prevent gcc from + * inlining it in multiple places and then barfing be- + * cause the ".NOT_SUPPORTED" label is multiply defined + * [is there a way to signal that a *single* function should + * not be inlined? is there a way to modify the label for + * each inlined instance, e.g., by appending _1, _2, etc.? + * maybe if don't use leading "." in label name? (nope...sigh)] + */ + +int PNGAPI +png_mmx_support(void) +{ +#if defined(PNG_MMX_CODE_SUPPORTED) + __asm__ __volatile__ ( + "pushl %%ebx \n\t" // ebx gets clobbered by CPUID instruction + "pushl %%ecx \n\t" // so does ecx... + "pushl %%edx \n\t" // ...and edx (but ecx & edx safe on Linux) +// ".byte 0x66 \n\t" // convert 16-bit pushf to 32-bit pushfd +// "pushf \n\t" // 16-bit pushf + "pushfl \n\t" // save Eflag to stack + "popl %%eax \n\t" // get Eflag from stack into eax + "movl %%eax, %%ecx \n\t" // make another copy of Eflag in ecx + "xorl $0x200000, %%eax \n\t" // toggle ID bit in Eflag (i.e., bit 21) + "pushl %%eax \n\t" // save modified Eflag back to stack +// ".byte 0x66 \n\t" // convert 16-bit popf to 32-bit popfd +// "popf \n\t" // 16-bit popf + "popfl \n\t" // restore modified value to Eflag reg + "pushfl \n\t" // save Eflag to stack + "popl %%eax \n\t" // get Eflag from stack + "pushl %%ecx \n\t" // save original Eflag to stack + "popfl \n\t" // restore original Eflag + "xorl %%ecx, %%eax \n\t" // compare new Eflag with original Eflag + "jz 0f \n\t" // if same, CPUID instr. is not supported + + "xorl %%eax, %%eax \n\t" // set eax to zero +// ".byte 0x0f, 0xa2 \n\t" // CPUID instruction (two-byte opcode) + "cpuid \n\t" // get the CPU identification info + "cmpl $1, %%eax \n\t" // make sure eax return non-zero value + "jl 0f \n\t" // if eax is zero, MMX is not supported + + "xorl %%eax, %%eax \n\t" // set eax to zero and... + "incl %%eax \n\t" // ...increment eax to 1. This pair is + // faster than the instruction "mov eax, 1" + "cpuid \n\t" // get the CPU identification info again + "andl $0x800000, %%edx \n\t" // mask out all bits but MMX bit (23) + "cmpl $0, %%edx \n\t" // 0 = MMX not supported + "jz 0f \n\t" // non-zero = yes, MMX IS supported + + "movl $1, %%eax \n\t" // set return value to 1 + "jmp 1f \n\t" // DONE: have MMX support + + "0: \n\t" // .NOT_SUPPORTED: target label for jump instructions + "movl $0, %%eax \n\t" // set return value to 0 + "1: \n\t" // .RETURN: target label for jump instructions + "movl %%eax, _mmx_supported \n\t" // save in global static variable, too + "popl %%edx \n\t" // restore edx + "popl %%ecx \n\t" // restore ecx + "popl %%ebx \n\t" // restore ebx + +// "ret \n\t" // DONE: no MMX support + // (fall through to standard C "ret") + + : // output list (none) + + : // any variables used on input (none) + + : "%eax" // clobber list +// , "%ebx", "%ecx", "%edx" // GRR: we handle these manually +// , "memory" // if write to a variable gcc thought was in a reg +// , "cc" // "condition codes" (flag bits) + ); +#else + _mmx_supported = 0; +#endif /* PNG_MMX_CODE_SUPPORTED */ + + return _mmx_supported; +} + + +#endif /* PNG_USE_PNGGCCRD */ diff --git a/gtkmm-osx/libpng-1.2.5/pngget.c b/gtkmm-osx/libpng-1.2.5/pngget.c new file mode 100644 index 0000000..f7f5c67 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/pngget.c @@ -0,0 +1,927 @@ + +/* pngget.c - retrieval of values from info struct + * + * libpng 1.2.5 - October 3, 2002 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2002 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + */ + +#define PNG_INTERNAL +#include "png.h" + +png_uint_32 PNGAPI +png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag) +{ + if (png_ptr != NULL && info_ptr != NULL) + return(info_ptr->valid & flag); + else + return(0); +} + +png_uint_32 PNGAPI +png_get_rowbytes(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return(info_ptr->rowbytes); + else + return(0); +} + +#if defined(PNG_INFO_IMAGE_SUPPORTED) +png_bytepp PNGAPI +png_get_rows(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return(info_ptr->row_pointers); + else + return(0); +} +#endif + +#ifdef PNG_EASY_ACCESS_SUPPORTED +/* easy access to info, added in libpng-0.99 */ +png_uint_32 PNGAPI +png_get_image_width(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + { + return info_ptr->width; + } + return (0); +} + +png_uint_32 PNGAPI +png_get_image_height(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + { + return info_ptr->height; + } + return (0); +} + +png_byte PNGAPI +png_get_bit_depth(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + { + return info_ptr->bit_depth; + } + return (0); +} + +png_byte PNGAPI +png_get_color_type(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + { + return info_ptr->color_type; + } + return (0); +} + +png_byte PNGAPI +png_get_filter_type(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + { + return info_ptr->filter_type; + } + return (0); +} + +png_byte PNGAPI +png_get_interlace_type(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + { + return info_ptr->interlace_type; + } + return (0); +} + +png_byte PNGAPI +png_get_compression_type(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + { + return info_ptr->compression_type; + } + return (0); +} + +png_uint_32 PNGAPI +png_get_x_pixels_per_meter(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) +#if defined(PNG_pHYs_SUPPORTED) + if (info_ptr->valid & PNG_INFO_pHYs) + { + png_debug1(1, "in %s retrieval function\n", "png_get_x_pixels_per_meter"); + if(info_ptr->phys_unit_type != PNG_RESOLUTION_METER) + return (0); + else return (info_ptr->x_pixels_per_unit); + } +#else + return (0); +#endif + return (0); +} + +png_uint_32 PNGAPI +png_get_y_pixels_per_meter(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) +#if defined(PNG_pHYs_SUPPORTED) + if (info_ptr->valid & PNG_INFO_pHYs) + { + png_debug1(1, "in %s retrieval function\n", "png_get_y_pixels_per_meter"); + if(info_ptr->phys_unit_type != PNG_RESOLUTION_METER) + return (0); + else return (info_ptr->y_pixels_per_unit); + } +#else + return (0); +#endif + return (0); +} + +png_uint_32 PNGAPI +png_get_pixels_per_meter(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) +#if defined(PNG_pHYs_SUPPORTED) + if (info_ptr->valid & PNG_INFO_pHYs) + { + png_debug1(1, "in %s retrieval function\n", "png_get_pixels_per_meter"); + if(info_ptr->phys_unit_type != PNG_RESOLUTION_METER || + info_ptr->x_pixels_per_unit != info_ptr->y_pixels_per_unit) + return (0); + else return (info_ptr->x_pixels_per_unit); + } +#else + return (0); +#endif + return (0); +} + +#ifdef PNG_FLOATING_POINT_SUPPORTED +float PNGAPI +png_get_pixel_aspect_ratio(png_structp png_ptr, png_infop info_ptr) + { + if (png_ptr != NULL && info_ptr != NULL) +#if defined(PNG_pHYs_SUPPORTED) + if (info_ptr->valid & PNG_INFO_pHYs) + { + png_debug1(1, "in %s retrieval function\n", "png_get_aspect_ratio"); + if (info_ptr->x_pixels_per_unit == 0) + return ((float)0.0); + else + return ((float)((float)info_ptr->y_pixels_per_unit + /(float)info_ptr->x_pixels_per_unit)); + } +#else + return (0.0); +#endif + return ((float)0.0); +} +#endif + +png_int_32 PNGAPI +png_get_x_offset_microns(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) +#if defined(PNG_oFFs_SUPPORTED) + if (info_ptr->valid & PNG_INFO_oFFs) + { + png_debug1(1, "in %s retrieval function\n", "png_get_x_offset_microns"); + if(info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER) + return (0); + else return (info_ptr->x_offset); + } +#else + return (0); +#endif + return (0); +} + +png_int_32 PNGAPI +png_get_y_offset_microns(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) +#if defined(PNG_oFFs_SUPPORTED) + if (info_ptr->valid & PNG_INFO_oFFs) + { + png_debug1(1, "in %s retrieval function\n", "png_get_y_offset_microns"); + if(info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER) + return (0); + else return (info_ptr->y_offset); + } +#else + return (0); +#endif + return (0); +} + +png_int_32 PNGAPI +png_get_x_offset_pixels(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) +#if defined(PNG_oFFs_SUPPORTED) + if (info_ptr->valid & PNG_INFO_oFFs) + { + png_debug1(1, "in %s retrieval function\n", "png_get_x_offset_microns"); + if(info_ptr->offset_unit_type != PNG_OFFSET_PIXEL) + return (0); + else return (info_ptr->x_offset); + } +#else + return (0); +#endif + return (0); +} + +png_int_32 PNGAPI +png_get_y_offset_pixels(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) +#if defined(PNG_oFFs_SUPPORTED) + if (info_ptr->valid & PNG_INFO_oFFs) + { + png_debug1(1, "in %s retrieval function\n", "png_get_y_offset_microns"); + if(info_ptr->offset_unit_type != PNG_OFFSET_PIXEL) + return (0); + else return (info_ptr->y_offset); + } +#else + return (0); +#endif + return (0); +} + +#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED) +png_uint_32 PNGAPI +png_get_pixels_per_inch(png_structp png_ptr, png_infop info_ptr) +{ + return ((png_uint_32)((float)png_get_pixels_per_meter(png_ptr, info_ptr) + *.0254 +.5)); +} + +png_uint_32 PNGAPI +png_get_x_pixels_per_inch(png_structp png_ptr, png_infop info_ptr) +{ + return ((png_uint_32)((float)png_get_x_pixels_per_meter(png_ptr, info_ptr) + *.0254 +.5)); +} + +png_uint_32 PNGAPI +png_get_y_pixels_per_inch(png_structp png_ptr, png_infop info_ptr) +{ + return ((png_uint_32)((float)png_get_y_pixels_per_meter(png_ptr, info_ptr) + *.0254 +.5)); +} + +float PNGAPI +png_get_x_offset_inches(png_structp png_ptr, png_infop info_ptr) +{ + return ((float)png_get_x_offset_microns(png_ptr, info_ptr) + *.00003937); +} + +float PNGAPI +png_get_y_offset_inches(png_structp png_ptr, png_infop info_ptr) +{ + return ((float)png_get_y_offset_microns(png_ptr, info_ptr) + *.00003937); +} + +#if defined(PNG_pHYs_SUPPORTED) +png_uint_32 PNGAPI +png_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr, + png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type) +{ + png_uint_32 retval = 0; + + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) + { + png_debug1(1, "in %s retrieval function\n", "pHYs"); + if (res_x != NULL) + { + *res_x = info_ptr->x_pixels_per_unit; + retval |= PNG_INFO_pHYs; + } + if (res_y != NULL) + { + *res_y = info_ptr->y_pixels_per_unit; + retval |= PNG_INFO_pHYs; + } + if (unit_type != NULL) + { + *unit_type = (int)info_ptr->phys_unit_type; + retval |= PNG_INFO_pHYs; + if(*unit_type == 1) + { + if (res_x != NULL) *res_x = (png_uint_32)(*res_x * .0254 + .50); + if (res_y != NULL) *res_y = (png_uint_32)(*res_y * .0254 + .50); + } + } + } + return (retval); +} +#endif /* PNG_pHYs_SUPPORTED */ +#endif /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */ + +/* png_get_channels really belongs in here, too, but it's been around longer */ + +#endif /* PNG_EASY_ACCESS_SUPPORTED */ + +png_byte PNGAPI +png_get_channels(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return(info_ptr->channels); + else + return (0); +} + +png_bytep PNGAPI +png_get_signature(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return(info_ptr->signature); + else + return (NULL); +} + +#if defined(PNG_bKGD_SUPPORTED) +png_uint_32 PNGAPI +png_get_bKGD(png_structp png_ptr, png_infop info_ptr, + png_color_16p *background) +{ + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD) + && background != NULL) + { + png_debug1(1, "in %s retrieval function\n", "bKGD"); + *background = &(info_ptr->background); + return (PNG_INFO_bKGD); + } + return (0); +} +#endif + +#if defined(PNG_cHRM_SUPPORTED) +#ifdef PNG_FLOATING_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_cHRM(png_structp png_ptr, png_infop info_ptr, + double *white_x, double *white_y, double *red_x, double *red_y, + double *green_x, double *green_y, double *blue_x, double *blue_y) +{ + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM)) + { + png_debug1(1, "in %s retrieval function\n", "cHRM"); + if (white_x != NULL) + *white_x = (double)info_ptr->x_white; + if (white_y != NULL) + *white_y = (double)info_ptr->y_white; + if (red_x != NULL) + *red_x = (double)info_ptr->x_red; + if (red_y != NULL) + *red_y = (double)info_ptr->y_red; + if (green_x != NULL) + *green_x = (double)info_ptr->x_green; + if (green_y != NULL) + *green_y = (double)info_ptr->y_green; + if (blue_x != NULL) + *blue_x = (double)info_ptr->x_blue; + if (blue_y != NULL) + *blue_y = (double)info_ptr->y_blue; + return (PNG_INFO_cHRM); + } + return (0); +} +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_cHRM_fixed(png_structp png_ptr, png_infop info_ptr, + png_fixed_point *white_x, png_fixed_point *white_y, png_fixed_point *red_x, + png_fixed_point *red_y, png_fixed_point *green_x, png_fixed_point *green_y, + png_fixed_point *blue_x, png_fixed_point *blue_y) +{ + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM)) + { + png_debug1(1, "in %s retrieval function\n", "cHRM"); + if (white_x != NULL) + *white_x = info_ptr->int_x_white; + if (white_y != NULL) + *white_y = info_ptr->int_y_white; + if (red_x != NULL) + *red_x = info_ptr->int_x_red; + if (red_y != NULL) + *red_y = info_ptr->int_y_red; + if (green_x != NULL) + *green_x = info_ptr->int_x_green; + if (green_y != NULL) + *green_y = info_ptr->int_y_green; + if (blue_x != NULL) + *blue_x = info_ptr->int_x_blue; + if (blue_y != NULL) + *blue_y = info_ptr->int_y_blue; + return (PNG_INFO_cHRM); + } + return (0); +} +#endif +#endif + +#if defined(PNG_gAMA_SUPPORTED) +#ifdef PNG_FLOATING_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_gAMA(png_structp png_ptr, png_infop info_ptr, double *file_gamma) +{ + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA) + && file_gamma != NULL) + { + png_debug1(1, "in %s retrieval function\n", "gAMA"); + *file_gamma = (double)info_ptr->gamma; + return (PNG_INFO_gAMA); + } + return (0); +} +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, + png_fixed_point *int_file_gamma) +{ + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA) + && int_file_gamma != NULL) + { + png_debug1(1, "in %s retrieval function\n", "gAMA"); + *int_file_gamma = info_ptr->int_gamma; + return (PNG_INFO_gAMA); + } + return (0); +} +#endif +#endif + +#if defined(PNG_sRGB_SUPPORTED) +png_uint_32 PNGAPI +png_get_sRGB(png_structp png_ptr, png_infop info_ptr, int *file_srgb_intent) +{ + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB) + && file_srgb_intent != NULL) + { + png_debug1(1, "in %s retrieval function\n", "sRGB"); + *file_srgb_intent = (int)info_ptr->srgb_intent; + return (PNG_INFO_sRGB); + } + return (0); +} +#endif + +#if defined(PNG_iCCP_SUPPORTED) +png_uint_32 PNGAPI +png_get_iCCP(png_structp png_ptr, png_infop info_ptr, + png_charpp name, int *compression_type, + png_charpp profile, png_uint_32 *proflen) +{ + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP) + && name != NULL && profile != NULL && proflen != NULL) + { + png_debug1(1, "in %s retrieval function\n", "iCCP"); + *name = info_ptr->iccp_name; + *profile = info_ptr->iccp_profile; + /* compression_type is a dummy so the API won't have to change + if we introduce multiple compression types later. */ + *proflen = (int)info_ptr->iccp_proflen; + *compression_type = (int)info_ptr->iccp_compression; + return (PNG_INFO_iCCP); + } + return (0); +} +#endif + +#if defined(PNG_sPLT_SUPPORTED) +png_uint_32 PNGAPI +png_get_sPLT(png_structp png_ptr, png_infop info_ptr, + png_sPLT_tpp spalettes) +{ + if (png_ptr != NULL && info_ptr != NULL && spalettes != NULL) + *spalettes = info_ptr->splt_palettes; + return ((png_uint_32)info_ptr->splt_palettes_num); +} +#endif + +#if defined(PNG_hIST_SUPPORTED) +png_uint_32 PNGAPI +png_get_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist) +{ + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST) + && hist != NULL) + { + png_debug1(1, "in %s retrieval function\n", "hIST"); + *hist = info_ptr->hist; + return (PNG_INFO_hIST); + } + return (0); +} +#endif + +png_uint_32 PNGAPI +png_get_IHDR(png_structp png_ptr, png_infop info_ptr, + png_uint_32 *width, png_uint_32 *height, int *bit_depth, + int *color_type, int *interlace_type, int *compression_type, + int *filter_type) + +{ + if (png_ptr != NULL && info_ptr != NULL && width != NULL && height != NULL && + bit_depth != NULL && color_type != NULL) + { + int pixel_depth, channels; + png_uint_32 rowbytes_per_pixel; + + png_debug1(1, "in %s retrieval function\n", "IHDR"); + *width = info_ptr->width; + *height = info_ptr->height; + *bit_depth = info_ptr->bit_depth; + if (info_ptr->bit_depth < 1 || info_ptr->bit_depth > 16) + png_error(png_ptr, "Invalid bit depth"); + *color_type = info_ptr->color_type; + if (info_ptr->color_type > 6) + png_error(png_ptr, "Invalid color type"); + if (compression_type != NULL) + *compression_type = info_ptr->compression_type; + if (filter_type != NULL) + *filter_type = info_ptr->filter_type; + if (interlace_type != NULL) + *interlace_type = info_ptr->interlace_type; + + /* check for potential overflow of rowbytes */ + if (*color_type == PNG_COLOR_TYPE_PALETTE) + channels = 1; + else if (*color_type & PNG_COLOR_MASK_COLOR) + channels = 3; + else + channels = 1; + if (*color_type & PNG_COLOR_MASK_ALPHA) + channels++; + pixel_depth = *bit_depth * channels; + rowbytes_per_pixel = (pixel_depth + 7) >> 3; + if (width == 0 || *width > PNG_MAX_UINT) + png_error(png_ptr, "Invalid image width"); + if (height == 0 || *height > PNG_MAX_UINT) + png_error(png_ptr, "Invalid image height"); + if (*width > PNG_MAX_UINT/rowbytes_per_pixel - 64) + { + png_error(png_ptr, + "Width too large for libpng to process image data."); + } + return (1); + } + return (0); +} + +#if defined(PNG_oFFs_SUPPORTED) +png_uint_32 PNGAPI +png_get_oFFs(png_structp png_ptr, png_infop info_ptr, + png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type) +{ + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs) + && offset_x != NULL && offset_y != NULL && unit_type != NULL) + { + png_debug1(1, "in %s retrieval function\n", "oFFs"); + *offset_x = info_ptr->x_offset; + *offset_y = info_ptr->y_offset; + *unit_type = (int)info_ptr->offset_unit_type; + return (PNG_INFO_oFFs); + } + return (0); +} +#endif + +#if defined(PNG_pCAL_SUPPORTED) +png_uint_32 PNGAPI +png_get_pCAL(png_structp png_ptr, png_infop info_ptr, + png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams, + png_charp *units, png_charpp *params) +{ + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL) + && purpose != NULL && X0 != NULL && X1 != NULL && type != NULL && + nparams != NULL && units != NULL && params != NULL) + { + png_debug1(1, "in %s retrieval function\n", "pCAL"); + *purpose = info_ptr->pcal_purpose; + *X0 = info_ptr->pcal_X0; + *X1 = info_ptr->pcal_X1; + *type = (int)info_ptr->pcal_type; + *nparams = (int)info_ptr->pcal_nparams; + *units = info_ptr->pcal_units; + *params = info_ptr->pcal_params; + return (PNG_INFO_pCAL); + } + return (0); +} +#endif + +#if defined(PNG_sCAL_SUPPORTED) +#ifdef PNG_FLOATING_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_sCAL(png_structp png_ptr, png_infop info_ptr, + int *unit, double *width, double *height) +{ + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_sCAL)) + { + *unit = info_ptr->scal_unit; + *width = info_ptr->scal_pixel_width; + *height = info_ptr->scal_pixel_height; + return (PNG_INFO_sCAL); + } + return(0); +} +#else +#ifdef PNG_FIXED_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_sCAL_s(png_structp png_ptr, png_infop info_ptr, + int *unit, png_charpp width, png_charpp height) +{ + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_sCAL)) + { + *unit = info_ptr->scal_unit; + *width = info_ptr->scal_s_width; + *height = info_ptr->scal_s_height; + return (PNG_INFO_sCAL); + } + return(0); +} +#endif +#endif +#endif + +#if defined(PNG_pHYs_SUPPORTED) +png_uint_32 PNGAPI +png_get_pHYs(png_structp png_ptr, png_infop info_ptr, + png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type) +{ + png_uint_32 retval = 0; + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_pHYs)) + { + png_debug1(1, "in %s retrieval function\n", "pHYs"); + if (res_x != NULL) + { + *res_x = info_ptr->x_pixels_per_unit; + retval |= PNG_INFO_pHYs; + } + if (res_y != NULL) + { + *res_y = info_ptr->y_pixels_per_unit; + retval |= PNG_INFO_pHYs; + } + if (unit_type != NULL) + { + *unit_type = (int)info_ptr->phys_unit_type; + retval |= PNG_INFO_pHYs; + } + } + return (retval); +} +#endif + +png_uint_32 PNGAPI +png_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette, + int *num_palette) +{ + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_PLTE) + && palette != NULL) + { + png_debug1(1, "in %s retrieval function\n", "PLTE"); + *palette = info_ptr->palette; + *num_palette = info_ptr->num_palette; + png_debug1(3, "num_palette = %d\n", *num_palette); + return (PNG_INFO_PLTE); + } + return (0); +} + +#if defined(PNG_sBIT_SUPPORTED) +png_uint_32 PNGAPI +png_get_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit) +{ + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT) + && sig_bit != NULL) + { + png_debug1(1, "in %s retrieval function\n", "sBIT"); + *sig_bit = &(info_ptr->sig_bit); + return (PNG_INFO_sBIT); + } + return (0); +} +#endif + +#if defined(PNG_TEXT_SUPPORTED) +png_uint_32 PNGAPI +png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr, + int *num_text) +{ + if (png_ptr != NULL && info_ptr != NULL && info_ptr->num_text > 0) + { + png_debug1(1, "in %s retrieval function\n", + (png_ptr->chunk_name[0] == '\0' ? "text" + : (png_const_charp)png_ptr->chunk_name)); + if (text_ptr != NULL) + *text_ptr = info_ptr->text; + if (num_text != NULL) + *num_text = info_ptr->num_text; + return ((png_uint_32)info_ptr->num_text); + } + if (num_text != NULL) + *num_text = 0; + return(0); +} +#endif + +#if defined(PNG_tIME_SUPPORTED) +png_uint_32 PNGAPI +png_get_tIME(png_structp png_ptr, png_infop info_ptr, png_timep *mod_time) +{ + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME) + && mod_time != NULL) + { + png_debug1(1, "in %s retrieval function\n", "tIME"); + *mod_time = &(info_ptr->mod_time); + return (PNG_INFO_tIME); + } + return (0); +} +#endif + +#if defined(PNG_tRNS_SUPPORTED) +png_uint_32 PNGAPI +png_get_tRNS(png_structp png_ptr, png_infop info_ptr, + png_bytep *trans, int *num_trans, png_color_16p *trans_values) +{ + png_uint_32 retval = 0; + if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS)) + { + png_debug1(1, "in %s retrieval function\n", "tRNS"); + if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + if (trans != NULL) + { + *trans = info_ptr->trans; + retval |= PNG_INFO_tRNS; + } + if (trans_values != NULL) + *trans_values = &(info_ptr->trans_values); + } + else /* if (info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) */ + { + if (trans_values != NULL) + { + *trans_values = &(info_ptr->trans_values); + retval |= PNG_INFO_tRNS; + } + if(trans != NULL) + *trans = NULL; + } + if(num_trans != NULL) + { + *num_trans = info_ptr->num_trans; + retval |= PNG_INFO_tRNS; + } + } + return (retval); +} +#endif + +#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) +png_uint_32 PNGAPI +png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr, + png_unknown_chunkpp unknowns) +{ + if (png_ptr != NULL && info_ptr != NULL && unknowns != NULL) + *unknowns = info_ptr->unknown_chunks; + return ((png_uint_32)info_ptr->unknown_chunks_num); +} +#endif + +#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) +png_byte PNGAPI +png_get_rgb_to_gray_status (png_structp png_ptr) +{ + return (png_byte)(png_ptr? png_ptr->rgb_to_gray_status : 0); +} +#endif + +#if defined(PNG_USER_CHUNKS_SUPPORTED) +png_voidp PNGAPI +png_get_user_chunk_ptr(png_structp png_ptr) +{ + return (png_ptr? png_ptr->user_chunk_ptr : NULL); +} +#endif + + +png_uint_32 PNGAPI +png_get_compression_buffer_size(png_structp png_ptr) +{ + return (png_uint_32)(png_ptr? png_ptr->zbuf_size : 0L); +} + + +#ifndef PNG_1_0_X +#ifdef PNG_ASSEMBLER_CODE_SUPPORTED +/* this function was added to libpng 1.2.0 and should exist by default */ +png_uint_32 PNGAPI +png_get_asm_flags (png_structp png_ptr) +{ + return (png_uint_32)(png_ptr? png_ptr->asm_flags : 0L); +} + +/* this function was added to libpng 1.2.0 and should exist by default */ +png_uint_32 PNGAPI +png_get_asm_flagmask (int flag_select) +{ + png_uint_32 settable_asm_flags = 0; + + if (flag_select & PNG_SELECT_READ) + settable_asm_flags |= + PNG_ASM_FLAG_MMX_READ_COMBINE_ROW | + PNG_ASM_FLAG_MMX_READ_INTERLACE | + PNG_ASM_FLAG_MMX_READ_FILTER_SUB | + PNG_ASM_FLAG_MMX_READ_FILTER_UP | + PNG_ASM_FLAG_MMX_READ_FILTER_AVG | + PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ; + /* no non-MMX flags yet */ + +#if 0 + /* GRR: no write-flags yet, either, but someday... */ + if (flag_select & PNG_SELECT_WRITE) + settable_asm_flags |= + PNG_ASM_FLAG_MMX_WRITE_ [whatever] ; +#endif /* 0 */ + + return settable_asm_flags; /* _theoretically_ settable capabilities only */ +} +#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ + + +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) + /* GRR: could add this: && defined(PNG_MMX_CODE_SUPPORTED) */ +/* this function was added to libpng 1.2.0 */ +png_uint_32 PNGAPI +png_get_mmx_flagmask (int flag_select, int *compilerID) +{ + png_uint_32 settable_mmx_flags = 0; + + if (flag_select & PNG_SELECT_READ) + settable_mmx_flags |= + PNG_ASM_FLAG_MMX_READ_COMBINE_ROW | + PNG_ASM_FLAG_MMX_READ_INTERLACE | + PNG_ASM_FLAG_MMX_READ_FILTER_SUB | + PNG_ASM_FLAG_MMX_READ_FILTER_UP | + PNG_ASM_FLAG_MMX_READ_FILTER_AVG | + PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ; +#if 0 + /* GRR: no MMX write support yet, but someday... */ + if (flag_select & PNG_SELECT_WRITE) + settable_mmx_flags |= + PNG_ASM_FLAG_MMX_WRITE_ [whatever] ; +#endif /* 0 */ + + if (compilerID != NULL) { +#ifdef PNG_USE_PNGVCRD + *compilerID = 1; /* MSVC */ +#else +#ifdef PNG_USE_PNGGCCRD + *compilerID = 2; /* gcc/gas */ +#else + *compilerID = -1; /* unknown (i.e., no asm/MMX code compiled) */ +#endif +#endif + } + + return settable_mmx_flags; /* _theoretically_ settable capabilities only */ +} + +/* this function was added to libpng 1.2.0 */ +png_byte PNGAPI +png_get_mmx_bitdepth_threshold (png_structp png_ptr) +{ + return (png_byte)(png_ptr? png_ptr->mmx_bitdepth_threshold : 0); +} + +/* this function was added to libpng 1.2.0 */ +png_uint_32 PNGAPI +png_get_mmx_rowbytes_threshold (png_structp png_ptr) +{ + return (png_uint_32)(png_ptr? png_ptr->mmx_rowbytes_threshold : 0L); +} +#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ +#endif /* PNG_1_0_X */ diff --git a/gtkmm-osx/libpng-1.2.5/pngmem.c b/gtkmm-osx/libpng-1.2.5/pngmem.c new file mode 100644 index 0000000..66eec0b --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/pngmem.c @@ -0,0 +1,566 @@ + +/* pngmem.c - stub functions for memory allocation + * + * libpng 1.2.5 - October 3, 2002 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2002 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This file provides a location for all memory allocation. Users who + * need special memory handling are expected to supply replacement + * functions for png_malloc() and png_free(), and to use + * png_create_read_struct_2() and png_create_write_struct_2() to + * identify the replacement functions. + */ + +#define PNG_INTERNAL +#include "png.h" + +/* Borland DOS special memory handler */ +#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) +/* if you change this, be sure to change the one in png.h also */ + +/* Allocate memory for a png_struct. The malloc and memset can be replaced + by a single call to calloc() if this is thought to improve performance. */ +png_voidp /* PRIVATE */ +png_create_struct(int type) +{ +#ifdef PNG_USER_MEM_SUPPORTED + return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL)); +} + +/* Alternate version of png_create_struct, for use with user-defined malloc. */ +png_voidp /* PRIVATE */ +png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr) +{ +#endif /* PNG_USER_MEM_SUPPORTED */ + png_size_t size; + png_voidp struct_ptr; + + if (type == PNG_STRUCT_INFO) + size = sizeof(png_info); + else if (type == PNG_STRUCT_PNG) + size = sizeof(png_struct); + else + return (png_get_copyright()); + +#ifdef PNG_USER_MEM_SUPPORTED + if(malloc_fn != NULL) + { + png_struct dummy_struct; + png_structp png_ptr = &dummy_struct; + png_ptr->mem_ptr=mem_ptr; + struct_ptr = (*(malloc_fn))(png_ptr, (png_uint_32)size); + } + else +#endif /* PNG_USER_MEM_SUPPORTED */ + struct_ptr = (png_voidp)farmalloc(size)); + if (struct_ptr != NULL) + png_memset(struct_ptr, 0, size); + return (struct_ptr); +} + +/* Free memory allocated by a png_create_struct() call */ +void /* PRIVATE */ +png_destroy_struct(png_voidp struct_ptr) +{ +#ifdef PNG_USER_MEM_SUPPORTED + png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL); +} + +/* Free memory allocated by a png_create_struct() call */ +void /* PRIVATE */ +png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn, + png_voidp mem_ptr) +{ +#endif + if (struct_ptr != NULL) + { +#ifdef PNG_USER_MEM_SUPPORTED + if(free_fn != NULL) + { + png_struct dummy_struct; + png_structp png_ptr = &dummy_struct; + png_ptr->mem_ptr=mem_ptr; + (*(free_fn))(png_ptr, struct_ptr); + return; + } +#endif /* PNG_USER_MEM_SUPPORTED */ + farfree (struct_ptr); + } +} + +/* Allocate memory. For reasonable files, size should never exceed + * 64K. However, zlib may allocate more then 64K if you don't tell + * it not to. See zconf.h and png.h for more information. zlib does + * need to allocate exactly 64K, so whatever you call here must + * have the ability to do that. + * + * Borland seems to have a problem in DOS mode for exactly 64K. + * It gives you a segment with an offset of 8 (perhaps to store its + * memory stuff). zlib doesn't like this at all, so we have to + * detect and deal with it. This code should not be needed in + * Windows or OS/2 modes, and only in 16 bit mode. This code has + * been updated by Alexander Lehmann for version 0.89 to waste less + * memory. + * + * Note that we can't use png_size_t for the "size" declaration, + * since on some systems a png_size_t is a 16-bit quantity, and as a + * result, we would be truncating potentially larger memory requests + * (which should cause a fatal error) and introducing major problems. + */ + +png_voidp PNGAPI +png_malloc(png_structp png_ptr, png_uint_32 size) +{ + png_voidp ret; + + if (png_ptr == NULL || size == 0) + return (NULL); + +#ifdef PNG_USER_MEM_SUPPORTED + if(png_ptr->malloc_fn != NULL) + { + ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size)); + if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) + png_error(png_ptr, "Out of memory!"); + return (ret); + } + else + return png_malloc_default(png_ptr, size); +} + +png_voidp PNGAPI +png_malloc_default(png_structp png_ptr, png_uint_32 size) +{ + png_voidp ret; +#endif /* PNG_USER_MEM_SUPPORTED */ + +#ifdef PNG_MAX_MALLOC_64K + if (size > (png_uint_32)65536L) + png_error(png_ptr, "Cannot Allocate > 64K"); +#endif + + if (size == (png_uint_32)65536L) + { + if (png_ptr->offset_table == NULL) + { + /* try to see if we need to do any of this fancy stuff */ + ret = farmalloc(size); + if (ret == NULL || ((png_size_t)ret & 0xffff)) + { + int num_blocks; + png_uint_32 total_size; + png_bytep table; + int i; + png_byte huge * hptr; + + if (ret != NULL) + { + farfree(ret); + ret = NULL; + } + + if(png_ptr->zlib_window_bits > 14) + num_blocks = (int)(1 << (png_ptr->zlib_window_bits - 14)); + else + num_blocks = 1; + if (png_ptr->zlib_mem_level >= 7) + num_blocks += (int)(1 << (png_ptr->zlib_mem_level - 7)); + else + num_blocks++; + + total_size = ((png_uint_32)65536L) * (png_uint_32)num_blocks+16; + + table = farmalloc(total_size); + + if (table == NULL) + { + if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) + png_error(png_ptr, "Out Of Memory."); /* Note "O" and "M" */ + else + png_warning(png_ptr, "Out Of Memory."); + return (NULL); + } + + if ((png_size_t)table & 0xfff0) + { + if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) + png_error(png_ptr, + "Farmalloc didn't return normalized pointer"); + else + png_warning(png_ptr, + "Farmalloc didn't return normalized pointer"); + return (NULL); + } + + png_ptr->offset_table = table; + png_ptr->offset_table_ptr = farmalloc(num_blocks * + sizeof (png_bytep)); + + if (png_ptr->offset_table_ptr == NULL) + { + if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) + png_error(png_ptr, "Out Of memory."); /* Note "O" and "M" */ + else + png_warning(png_ptr, "Out Of memory."); + return (NULL); + } + + hptr = (png_byte huge *)table; + if ((png_size_t)hptr & 0xf) + { + hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L); + hptr = hptr + 16L; /* "hptr += 16L" fails on Turbo C++ 3.0 */ + } + for (i = 0; i < num_blocks; i++) + { + png_ptr->offset_table_ptr[i] = (png_bytep)hptr; + hptr = hptr + (png_uint_32)65536L; /* "+=" fails on TC++3.0 */ + } + + png_ptr->offset_table_number = num_blocks; + png_ptr->offset_table_count = 0; + png_ptr->offset_table_count_free = 0; + } + } + + if (png_ptr->offset_table_count >= png_ptr->offset_table_number) + { + if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) + png_error(png_ptr, "Out of Memory."); /* Note "o" and "M" */ + else + png_warning(png_ptr, "Out of Memory."); + return (NULL); + } + + ret = png_ptr->offset_table_ptr[png_ptr->offset_table_count++]; + } + else + ret = farmalloc(size); + + if (ret == NULL) + { + if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) + png_error(png_ptr, "Out of memory."); /* Note "o" and "m" */ + else + png_warning(png_ptr, "Out of memory."); /* Note "o" and "m" */ + } + + return (ret); +} + +/* free a pointer allocated by png_malloc(). In the default + configuration, png_ptr is not used, but is passed in case it + is needed. If ptr is NULL, return without taking any action. */ +void PNGAPI +png_free(png_structp png_ptr, png_voidp ptr) +{ + if (png_ptr == NULL || ptr == NULL) + return; + +#ifdef PNG_USER_MEM_SUPPORTED + if (png_ptr->free_fn != NULL) + { + (*(png_ptr->free_fn))(png_ptr, ptr); + return; + } + else png_free_default(png_ptr, ptr); +} + +void PNGAPI +png_free_default(png_structp png_ptr, png_voidp ptr) +{ +#endif /* PNG_USER_MEM_SUPPORTED */ + + if (png_ptr->offset_table != NULL) + { + int i; + + for (i = 0; i < png_ptr->offset_table_count; i++) + { + if (ptr == png_ptr->offset_table_ptr[i]) + { + ptr = NULL; + png_ptr->offset_table_count_free++; + break; + } + } + if (png_ptr->offset_table_count_free == png_ptr->offset_table_count) + { + farfree(png_ptr->offset_table); + farfree(png_ptr->offset_table_ptr); + png_ptr->offset_table = NULL; + png_ptr->offset_table_ptr = NULL; + } + } + + if (ptr != NULL) + { + farfree(ptr); + } +} + +#else /* Not the Borland DOS special memory handler */ + +/* Allocate memory for a png_struct or a png_info. The malloc and + memset can be replaced by a single call to calloc() if this is thought + to improve performance noticably. */ +png_voidp /* PRIVATE */ +png_create_struct(int type) +{ +#ifdef PNG_USER_MEM_SUPPORTED + return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL)); +} + +/* Allocate memory for a png_struct or a png_info. The malloc and + memset can be replaced by a single call to calloc() if this is thought + to improve performance noticably. */ +png_voidp /* PRIVATE */ +png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr) +{ +#endif /* PNG_USER_MEM_SUPPORTED */ + png_size_t size; + png_voidp struct_ptr; + + if (type == PNG_STRUCT_INFO) + size = sizeof(png_info); + else if (type == PNG_STRUCT_PNG) + size = sizeof(png_struct); + else + return (NULL); + +#ifdef PNG_USER_MEM_SUPPORTED + if(malloc_fn != NULL) + { + png_struct dummy_struct; + png_structp png_ptr = &dummy_struct; + png_ptr->mem_ptr=mem_ptr; + struct_ptr = (*(malloc_fn))(png_ptr, size); + if (struct_ptr != NULL) + png_memset(struct_ptr, 0, size); + return (struct_ptr); + } +#endif /* PNG_USER_MEM_SUPPORTED */ + +#if defined(__TURBOC__) && !defined(__FLAT__) + if ((struct_ptr = (png_voidp)farmalloc(size)) != NULL) +#else +# if defined(_MSC_VER) && defined(MAXSEG_64K) + if ((struct_ptr = (png_voidp)halloc(size,1)) != NULL) +# else + if ((struct_ptr = (png_voidp)malloc(size)) != NULL) +# endif +#endif + { + png_memset(struct_ptr, 0, size); + } + + return (struct_ptr); +} + + +/* Free memory allocated by a png_create_struct() call */ +void /* PRIVATE */ +png_destroy_struct(png_voidp struct_ptr) +{ +#ifdef PNG_USER_MEM_SUPPORTED + png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL); +} + +/* Free memory allocated by a png_create_struct() call */ +void /* PRIVATE */ +png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn, + png_voidp mem_ptr) +{ +#endif /* PNG_USER_MEM_SUPPORTED */ + if (struct_ptr != NULL) + { +#ifdef PNG_USER_MEM_SUPPORTED + if(free_fn != NULL) + { + png_struct dummy_struct; + png_structp png_ptr = &dummy_struct; + png_ptr->mem_ptr=mem_ptr; + (*(free_fn))(png_ptr, struct_ptr); + return; + } +#endif /* PNG_USER_MEM_SUPPORTED */ +#if defined(__TURBOC__) && !defined(__FLAT__) + farfree(struct_ptr); +#else +# if defined(_MSC_VER) && defined(MAXSEG_64K) + hfree(struct_ptr); +# else + free(struct_ptr); +# endif +#endif + } +} + +/* Allocate memory. For reasonable files, size should never exceed + 64K. However, zlib may allocate more then 64K if you don't tell + it not to. See zconf.h and png.h for more information. zlib does + need to allocate exactly 64K, so whatever you call here must + have the ability to do that. */ + +png_voidp PNGAPI +png_malloc(png_structp png_ptr, png_uint_32 size) +{ + png_voidp ret; + + if (png_ptr == NULL || size == 0) + return (NULL); + +#ifdef PNG_USER_MEM_SUPPORTED + if(png_ptr->malloc_fn != NULL) + { + ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size)); + if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) + png_error(png_ptr, "Out of Memory!"); + return (ret); + } + else + return (png_malloc_default(png_ptr, size)); +} + +png_voidp PNGAPI +png_malloc_default(png_structp png_ptr, png_uint_32 size) +{ + png_voidp ret; +#endif /* PNG_USER_MEM_SUPPORTED */ + +#ifdef PNG_MAX_MALLOC_64K + if (size > (png_uint_32)65536L) + { + if(png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) + png_error(png_ptr, "Cannot Allocate > 64K"); + else + return NULL; + } +#endif + +#if defined(__TURBOC__) && !defined(__FLAT__) + ret = farmalloc(size); +#else +# if defined(_MSC_VER) && defined(MAXSEG_64K) + ret = halloc(size, 1); +# else + ret = malloc((size_t)size); +# endif +#endif + + if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) + png_error(png_ptr, "Out of Memory"); + + return (ret); +} + +/* Free a pointer allocated by png_malloc(). If ptr is NULL, return + without taking any action. */ +void PNGAPI +png_free(png_structp png_ptr, png_voidp ptr) +{ + if (png_ptr == NULL || ptr == NULL) + return; + +#ifdef PNG_USER_MEM_SUPPORTED + if (png_ptr->free_fn != NULL) + { + (*(png_ptr->free_fn))(png_ptr, ptr); + return; + } + else png_free_default(png_ptr, ptr); +} +void PNGAPI +png_free_default(png_structp png_ptr, png_voidp ptr) +{ + if (png_ptr == NULL || ptr == NULL) + return; + +#endif /* PNG_USER_MEM_SUPPORTED */ + +#if defined(__TURBOC__) && !defined(__FLAT__) + farfree(ptr); +#else +# if defined(_MSC_VER) && defined(MAXSEG_64K) + hfree(ptr); +# else + free(ptr); +# endif +#endif +} + +#endif /* Not Borland DOS special memory handler */ + +#if defined(PNG_1_0_X) +# define png_malloc_warn png_malloc +#else +/* This function was added at libpng version 1.2.3. The png_malloc_warn() + * function will issue a png_warning and return NULL instead of issuing a + * png_error, if it fails to allocate the requested memory. + */ +png_voidp PNGAPI +png_malloc_warn(png_structp png_ptr, png_uint_32 size) +{ + png_voidp ptr; + png_uint_32 save_flags=png_ptr->flags; + + png_ptr->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK; + ptr = (png_voidp)png_malloc((png_structp)png_ptr, size); + png_ptr->flags=save_flags; + return(ptr); +} +#endif + +png_voidp PNGAPI +png_memcpy_check (png_structp png_ptr, png_voidp s1, png_voidp s2, + png_uint_32 length) +{ + png_size_t size; + + size = (png_size_t)length; + if ((png_uint_32)size != length) + png_error(png_ptr,"Overflow in png_memcpy_check."); + + return(png_memcpy (s1, s2, size)); +} + +png_voidp PNGAPI +png_memset_check (png_structp png_ptr, png_voidp s1, int value, + png_uint_32 length) +{ + png_size_t size; + + size = (png_size_t)length; + if ((png_uint_32)size != length) + png_error(png_ptr,"Overflow in png_memset_check."); + + return (png_memset (s1, value, size)); + +} + +#ifdef PNG_USER_MEM_SUPPORTED +/* This function is called when the application wants to use another method + * of allocating and freeing memory. + */ +void PNGAPI +png_set_mem_fn(png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr + malloc_fn, png_free_ptr free_fn) +{ + png_ptr->mem_ptr = mem_ptr; + png_ptr->malloc_fn = malloc_fn; + png_ptr->free_fn = free_fn; +} + +/* This function returns a pointer to the mem_ptr associated with the user + * functions. The application should free any memory associated with this + * pointer before png_write_destroy and png_read_destroy are called. + */ +png_voidp PNGAPI +png_get_mem_ptr(png_structp png_ptr) +{ + return ((png_voidp)png_ptr->mem_ptr); +} +#endif /* PNG_USER_MEM_SUPPORTED */ diff --git a/gtkmm-osx/libpng-1.2.5/pngnow.png b/gtkmm-osx/libpng-1.2.5/pngnow.png new file mode 100644 index 0000000000000000000000000000000000000000..174b5fa057f0e755d9d68f07d6ae385e387d5a95 GIT binary patch literal 2018 zcmV<82Oao{P)Px%VNgs|Mg0E!1Of!i&dkgL1e^i{%mOrgigZ+7TwH2w zRC;7&euP|Vd|YaDRAOXIQmkZV@CJ4M* z6zq;9Od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aiuvI_Y9sNRvFpXAQEJWQ3VTUYvVEuAa8H6{X znS;=WrerHhLSf{aIh|zDs4McNKGJ@?ad#s-G4)j}MIjuEoHQ17$6QlpMR`mZs*1;^ zLdr--{J^PY;4I$3k))N2X4XW&FDocRuVt2@u0(|cj|d-&mefx3k*Jag5BU9#KkQb~`xaN*p= zi$B)=G;`_l?9abkzI6WVuUA(6mg`Z5**_)>pn#>1S}=D;c9IbGaUP;_Uft7GrJZ*1 z6$s#?|E`a(@0{(N8P|trJJvUpJ?AX2&^=4W?0nwEA3UKxu`v^{}KB0WK;0!Wa8?n zkv+2V*W~23$y_eH9`nFAjY4LVA5p(G%b7Fbuffer_size) + { + png_process_some_data(png_ptr, info_ptr); + } +} + +/* What we do with the incoming data depends on what we were previously + * doing before we ran out of data... + */ +void /* PRIVATE */ +png_process_some_data(png_structp png_ptr, png_infop info_ptr) +{ + switch (png_ptr->process_mode) + { + case PNG_READ_SIG_MODE: + { + png_push_read_sig(png_ptr, info_ptr); + break; + } + case PNG_READ_CHUNK_MODE: + { + png_push_read_chunk(png_ptr, info_ptr); + break; + } + case PNG_READ_IDAT_MODE: + { + png_push_read_IDAT(png_ptr); + break; + } +#if defined(PNG_READ_tEXt_SUPPORTED) + case PNG_READ_tEXt_MODE: + { + png_push_read_tEXt(png_ptr, info_ptr); + break; + } +#endif +#if defined(PNG_READ_zTXt_SUPPORTED) + case PNG_READ_zTXt_MODE: + { + png_push_read_zTXt(png_ptr, info_ptr); + break; + } +#endif +#if defined(PNG_READ_iTXt_SUPPORTED) + case PNG_READ_iTXt_MODE: + { + png_push_read_iTXt(png_ptr, info_ptr); + break; + } +#endif + case PNG_SKIP_MODE: + { + png_push_crc_finish(png_ptr); + break; + } + default: + { + png_ptr->buffer_size = 0; + break; + } + } +} + +/* Read any remaining signature bytes from the stream and compare them with + * the correct PNG signature. It is possible that this routine is called + * with bytes already read from the signature, either because they have been + * checked by the calling application, or because of multiple calls to this + * routine. + */ +void /* PRIVATE */ +png_push_read_sig(png_structp png_ptr, png_infop info_ptr) +{ + png_size_t num_checked = png_ptr->sig_bytes, + num_to_check = 8 - num_checked; + + if (png_ptr->buffer_size < num_to_check) + { + num_to_check = png_ptr->buffer_size; + } + + png_push_fill_buffer(png_ptr, &(info_ptr->signature[num_checked]), + num_to_check); + png_ptr->sig_bytes = (png_byte)(png_ptr->sig_bytes+num_to_check); + + if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check)) + { + if (num_checked < 4 && + png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4)) + png_error(png_ptr, "Not a PNG file"); + else + png_error(png_ptr, "PNG file corrupted by ASCII conversion"); + } + else + { + if (png_ptr->sig_bytes >= 8) + { + png_ptr->process_mode = PNG_READ_CHUNK_MODE; + } + } +} + +void /* PRIVATE */ +png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_IHDR; + PNG_IDAT; + PNG_IEND; + PNG_PLTE; +#if defined(PNG_READ_bKGD_SUPPORTED) + PNG_bKGD; +#endif +#if defined(PNG_READ_cHRM_SUPPORTED) + PNG_cHRM; +#endif +#if defined(PNG_READ_gAMA_SUPPORTED) + PNG_gAMA; +#endif +#if defined(PNG_READ_hIST_SUPPORTED) + PNG_hIST; +#endif +#if defined(PNG_READ_iCCP_SUPPORTED) + PNG_iCCP; +#endif +#if defined(PNG_READ_iTXt_SUPPORTED) + PNG_iTXt; +#endif +#if defined(PNG_READ_oFFs_SUPPORTED) + PNG_oFFs; +#endif +#if defined(PNG_READ_pCAL_SUPPORTED) + PNG_pCAL; +#endif +#if defined(PNG_READ_pHYs_SUPPORTED) + PNG_pHYs; +#endif +#if defined(PNG_READ_sBIT_SUPPORTED) + PNG_sBIT; +#endif +#if defined(PNG_READ_sCAL_SUPPORTED) + PNG_sCAL; +#endif +#if defined(PNG_READ_sRGB_SUPPORTED) + PNG_sRGB; +#endif +#if defined(PNG_READ_sPLT_SUPPORTED) + PNG_sPLT; +#endif +#if defined(PNG_READ_tEXt_SUPPORTED) + PNG_tEXt; +#endif +#if defined(PNG_READ_tIME_SUPPORTED) + PNG_tIME; +#endif +#if defined(PNG_READ_tRNS_SUPPORTED) + PNG_tRNS; +#endif +#if defined(PNG_READ_zTXt_SUPPORTED) + PNG_zTXt; +#endif +#endif /* PNG_USE_LOCAL_ARRAYS */ + /* First we make sure we have enough data for the 4 byte chunk name + * and the 4 byte chunk length before proceeding with decoding the + * chunk data. To fully decode each of these chunks, we also make + * sure we have enough data in the buffer for the 4 byte CRC at the + * end of every chunk (except IDAT, which is handled separately). + */ + if (!(png_ptr->mode & PNG_HAVE_CHUNK_HEADER)) + { + png_byte chunk_length[4]; + + if (png_ptr->buffer_size < 8) + { + png_push_save_buffer(png_ptr); + return; + } + + png_push_fill_buffer(png_ptr, chunk_length, 4); + png_ptr->push_length = png_get_uint_32(chunk_length); + png_reset_crc(png_ptr); + png_crc_read(png_ptr, png_ptr->chunk_name, 4); + png_ptr->mode |= PNG_HAVE_CHUNK_HEADER; + } + + if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_handle_IHDR(png_ptr, info_ptr, png_ptr->push_length); + } + else if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_handle_PLTE(png_ptr, info_ptr, png_ptr->push_length); + } + else if (!png_memcmp(png_ptr->chunk_name, (png_bytep)png_IDAT, 4)) + { + /* If we reach an IDAT chunk, this means we have read all of the + * header chunks, and we can start reading the image (or if this + * is called after the image has been read - we have an error). + */ + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before IDAT"); + else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && + !(png_ptr->mode & PNG_HAVE_PLTE)) + png_error(png_ptr, "Missing PLTE before IDAT"); + + if (png_ptr->mode & PNG_HAVE_IDAT) + { + if (png_ptr->push_length == 0) + return; + + if (png_ptr->mode & PNG_AFTER_IDAT) + png_error(png_ptr, "Too many IDAT's found"); + } + + png_ptr->idat_size = png_ptr->push_length; + png_ptr->mode |= PNG_HAVE_IDAT; + png_ptr->process_mode = PNG_READ_IDAT_MODE; + png_push_have_info(png_ptr, info_ptr); + png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes; + png_ptr->zstream.next_out = png_ptr->row_buf; + return; + } + else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_handle_IEND(png_ptr, info_ptr, png_ptr->push_length); + + png_ptr->process_mode = PNG_READ_DONE_MODE; + png_push_have_end(png_ptr, info_ptr); + } +#if defined(PNG_READ_gAMA_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_gAMA, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_handle_gAMA(png_ptr, info_ptr, png_ptr->push_length); + } +#endif +#if defined(PNG_READ_sBIT_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_sBIT, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_handle_sBIT(png_ptr, info_ptr, png_ptr->push_length); + } +#endif +#if defined(PNG_READ_cHRM_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_cHRM, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_handle_cHRM(png_ptr, info_ptr, png_ptr->push_length); + } +#endif +#if defined(PNG_READ_sRGB_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_sRGB, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_handle_sRGB(png_ptr, info_ptr, png_ptr->push_length); + } +#endif +#if defined(PNG_READ_iCCP_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_iCCP, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_handle_iCCP(png_ptr, info_ptr, png_ptr->push_length); + } +#endif +#if defined(PNG_READ_sPLT_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_sPLT, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_handle_sPLT(png_ptr, info_ptr, png_ptr->push_length); + } +#endif +#if defined(PNG_READ_tRNS_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_tRNS, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_handle_tRNS(png_ptr, info_ptr, png_ptr->push_length); + } +#endif +#if defined(PNG_READ_bKGD_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_bKGD, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_handle_bKGD(png_ptr, info_ptr, png_ptr->push_length); + } +#endif +#if defined(PNG_READ_hIST_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_hIST, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_handle_hIST(png_ptr, info_ptr, png_ptr->push_length); + } +#endif +#if defined(PNG_READ_pHYs_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_pHYs, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_handle_pHYs(png_ptr, info_ptr, png_ptr->push_length); + } +#endif +#if defined(PNG_READ_oFFs_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_oFFs, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_handle_oFFs(png_ptr, info_ptr, png_ptr->push_length); + } +#endif +#if defined(PNG_READ_pCAL_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_pCAL, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_handle_pCAL(png_ptr, info_ptr, png_ptr->push_length); + } +#endif +#if defined(PNG_READ_sCAL_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_sCAL, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_handle_sCAL(png_ptr, info_ptr, png_ptr->push_length); + } +#endif +#if defined(PNG_READ_tIME_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_tIME, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_handle_tIME(png_ptr, info_ptr, png_ptr->push_length); + } +#endif +#if defined(PNG_READ_tEXt_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_tEXt, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_push_handle_tEXt(png_ptr, info_ptr, png_ptr->push_length); + } +#endif +#if defined(PNG_READ_zTXt_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_zTXt, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_push_handle_zTXt(png_ptr, info_ptr, png_ptr->push_length); + } +#endif +#if defined(PNG_READ_iTXt_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_iTXt, 4)) + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_push_handle_iTXt(png_ptr, info_ptr, png_ptr->push_length); + } +#endif + else + { + if (png_ptr->push_length + 4 > png_ptr->buffer_size) + { + png_push_save_buffer(png_ptr); + return; + } + png_push_handle_unknown(png_ptr, info_ptr, png_ptr->push_length); + } + + png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; +} + +void /* PRIVATE */ +png_push_crc_skip(png_structp png_ptr, png_uint_32 skip) +{ + png_ptr->process_mode = PNG_SKIP_MODE; + png_ptr->skip_length = skip; +} + +void /* PRIVATE */ +png_push_crc_finish(png_structp png_ptr) +{ + if (png_ptr->skip_length && png_ptr->save_buffer_size) + { + png_size_t save_size; + + if (png_ptr->skip_length < (png_uint_32)png_ptr->save_buffer_size) + save_size = (png_size_t)png_ptr->skip_length; + else + save_size = png_ptr->save_buffer_size; + + png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size); + + png_ptr->skip_length -= save_size; + png_ptr->buffer_size -= save_size; + png_ptr->save_buffer_size -= save_size; + png_ptr->save_buffer_ptr += save_size; + } + if (png_ptr->skip_length && png_ptr->current_buffer_size) + { + png_size_t save_size; + + if (png_ptr->skip_length < (png_uint_32)png_ptr->current_buffer_size) + save_size = (png_size_t)png_ptr->skip_length; + else + save_size = png_ptr->current_buffer_size; + + png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size); + + png_ptr->skip_length -= save_size; + png_ptr->buffer_size -= save_size; + png_ptr->current_buffer_size -= save_size; + png_ptr->current_buffer_ptr += save_size; + } + if (!png_ptr->skip_length) + { + if (png_ptr->buffer_size < 4) + { + png_push_save_buffer(png_ptr); + return; + } + + png_crc_finish(png_ptr, 0); + png_ptr->process_mode = PNG_READ_CHUNK_MODE; + } +} + +void PNGAPI +png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length) +{ + png_bytep ptr; + + ptr = buffer; + if (png_ptr->save_buffer_size) + { + png_size_t save_size; + + if (length < png_ptr->save_buffer_size) + save_size = length; + else + save_size = png_ptr->save_buffer_size; + + png_memcpy(ptr, png_ptr->save_buffer_ptr, save_size); + length -= save_size; + ptr += save_size; + png_ptr->buffer_size -= save_size; + png_ptr->save_buffer_size -= save_size; + png_ptr->save_buffer_ptr += save_size; + } + if (length && png_ptr->current_buffer_size) + { + png_size_t save_size; + + if (length < png_ptr->current_buffer_size) + save_size = length; + else + save_size = png_ptr->current_buffer_size; + + png_memcpy(ptr, png_ptr->current_buffer_ptr, save_size); + png_ptr->buffer_size -= save_size; + png_ptr->current_buffer_size -= save_size; + png_ptr->current_buffer_ptr += save_size; + } +} + +void /* PRIVATE */ +png_push_save_buffer(png_structp png_ptr) +{ + if (png_ptr->save_buffer_size) + { + if (png_ptr->save_buffer_ptr != png_ptr->save_buffer) + { + png_size_t i,istop; + png_bytep sp; + png_bytep dp; + + istop = png_ptr->save_buffer_size; + for (i = 0, sp = png_ptr->save_buffer_ptr, dp = png_ptr->save_buffer; + i < istop; i++, sp++, dp++) + { + *dp = *sp; + } + } + } + if (png_ptr->save_buffer_size + png_ptr->current_buffer_size > + png_ptr->save_buffer_max) + { + png_size_t new_max; + png_bytep old_buffer; + + new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + 256; + old_buffer = png_ptr->save_buffer; + png_ptr->save_buffer = (png_bytep)png_malloc(png_ptr, + (png_uint_32)new_max); + png_memcpy(png_ptr->save_buffer, old_buffer, png_ptr->save_buffer_size); + png_free(png_ptr, old_buffer); + png_ptr->save_buffer_max = new_max; + } + if (png_ptr->current_buffer_size) + { + png_memcpy(png_ptr->save_buffer + png_ptr->save_buffer_size, + png_ptr->current_buffer_ptr, png_ptr->current_buffer_size); + png_ptr->save_buffer_size += png_ptr->current_buffer_size; + png_ptr->current_buffer_size = 0; + } + png_ptr->save_buffer_ptr = png_ptr->save_buffer; + png_ptr->buffer_size = 0; +} + +void /* PRIVATE */ +png_push_restore_buffer(png_structp png_ptr, png_bytep buffer, + png_size_t buffer_length) +{ + png_ptr->current_buffer = buffer; + png_ptr->current_buffer_size = buffer_length; + png_ptr->buffer_size = buffer_length + png_ptr->save_buffer_size; + png_ptr->current_buffer_ptr = png_ptr->current_buffer; +} + +void /* PRIVATE */ +png_push_read_IDAT(png_structp png_ptr) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_IDAT; +#endif + if (!(png_ptr->mode & PNG_HAVE_CHUNK_HEADER)) + { + png_byte chunk_length[4]; + + if (png_ptr->buffer_size < 8) + { + png_push_save_buffer(png_ptr); + return; + } + + png_push_fill_buffer(png_ptr, chunk_length, 4); + png_ptr->push_length = png_get_uint_32(chunk_length); + + png_reset_crc(png_ptr); + png_crc_read(png_ptr, png_ptr->chunk_name, 4); + png_ptr->mode |= PNG_HAVE_CHUNK_HEADER; + + if (png_memcmp(png_ptr->chunk_name, (png_bytep)png_IDAT, 4)) + { + png_ptr->process_mode = PNG_READ_CHUNK_MODE; + if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) + png_error(png_ptr, "Not enough compressed data"); + return; + } + + png_ptr->idat_size = png_ptr->push_length; + } + if (png_ptr->idat_size && png_ptr->save_buffer_size) + { + png_size_t save_size; + + if (png_ptr->idat_size < (png_uint_32)png_ptr->save_buffer_size) + { + save_size = (png_size_t)png_ptr->idat_size; + /* check for overflow */ + if((png_uint_32)save_size != png_ptr->idat_size) + png_error(png_ptr, "save_size overflowed in pngpread"); + } + else + save_size = png_ptr->save_buffer_size; + + png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size); + if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) + png_process_IDAT_data(png_ptr, png_ptr->save_buffer_ptr, save_size); + png_ptr->idat_size -= save_size; + png_ptr->buffer_size -= save_size; + png_ptr->save_buffer_size -= save_size; + png_ptr->save_buffer_ptr += save_size; + } + if (png_ptr->idat_size && png_ptr->current_buffer_size) + { + png_size_t save_size; + + if (png_ptr->idat_size < (png_uint_32)png_ptr->current_buffer_size) + { + save_size = (png_size_t)png_ptr->idat_size; + /* check for overflow */ + if((png_uint_32)save_size != png_ptr->idat_size) + png_error(png_ptr, "save_size overflowed in pngpread"); + } + else + save_size = png_ptr->current_buffer_size; + + png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size); + if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) + png_process_IDAT_data(png_ptr, png_ptr->current_buffer_ptr, save_size); + + png_ptr->idat_size -= save_size; + png_ptr->buffer_size -= save_size; + png_ptr->current_buffer_size -= save_size; + png_ptr->current_buffer_ptr += save_size; + } + if (!png_ptr->idat_size) + { + if (png_ptr->buffer_size < 4) + { + png_push_save_buffer(png_ptr); + return; + } + + png_crc_finish(png_ptr, 0); + png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; + png_ptr->mode |= PNG_AFTER_IDAT; + } +} + +void /* PRIVATE */ +png_process_IDAT_data(png_structp png_ptr, png_bytep buffer, + png_size_t buffer_length) +{ + int ret; + + if ((png_ptr->flags & PNG_FLAG_ZLIB_FINISHED) && buffer_length) + png_error(png_ptr, "Extra compression data"); + + png_ptr->zstream.next_in = buffer; + png_ptr->zstream.avail_in = (uInt)buffer_length; + for(;;) + { + ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); + if (ret != Z_OK) + { + if (ret == Z_STREAM_END) + { + if (png_ptr->zstream.avail_in) + png_error(png_ptr, "Extra compressed data"); + if (!(png_ptr->zstream.avail_out)) + { + png_push_process_row(png_ptr); + } + + png_ptr->mode |= PNG_AFTER_IDAT; + png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; + break; + } + else if (ret == Z_BUF_ERROR) + break; + else + png_error(png_ptr, "Decompression Error"); + } + if (!(png_ptr->zstream.avail_out)) + { + if (( +#if defined(PNG_READ_INTERLACING_SUPPORTED) + png_ptr->interlaced && png_ptr->pass > 6) || + (!png_ptr->interlaced && +#endif + png_ptr->row_number == png_ptr->num_rows-1)) + { + if (png_ptr->zstream.avail_in) + png_warning(png_ptr, "Too much data in IDAT chunks"); + png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; + break; + } + png_push_process_row(png_ptr); + png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes; + png_ptr->zstream.next_out = png_ptr->row_buf; + } + else + break; + } +} + +void /* PRIVATE */ +png_push_process_row(png_structp png_ptr) +{ + png_ptr->row_info.color_type = png_ptr->color_type; + png_ptr->row_info.width = png_ptr->iwidth; + png_ptr->row_info.channels = png_ptr->channels; + png_ptr->row_info.bit_depth = png_ptr->bit_depth; + png_ptr->row_info.pixel_depth = png_ptr->pixel_depth; + + png_ptr->row_info.rowbytes = ((png_ptr->row_info.width * + (png_uint_32)png_ptr->row_info.pixel_depth + 7) >> 3); + + png_read_filter_row(png_ptr, &(png_ptr->row_info), + png_ptr->row_buf + 1, png_ptr->prev_row + 1, + (int)(png_ptr->row_buf[0])); + + png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf, + png_ptr->rowbytes + 1); + + if (png_ptr->transformations) + png_do_read_transformations(png_ptr); + +#if defined(PNG_READ_INTERLACING_SUPPORTED) + /* blow up interlaced rows to full size */ + if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) + { + if (png_ptr->pass < 6) +/* old interface (pre-1.0.9): + png_do_read_interlace(&(png_ptr->row_info), + png_ptr->row_buf + 1, png_ptr->pass, png_ptr->transformations); + */ + png_do_read_interlace(png_ptr); + + switch (png_ptr->pass) + { + case 0: + { + int i; + for (i = 0; i < 8 && png_ptr->pass == 0; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); /* updates png_ptr->pass */ + } + if (png_ptr->pass == 2) /* pass 1 might be empty */ + { + for (i = 0; i < 4 && png_ptr->pass == 2; i++) + { + png_push_have_row(png_ptr, png_bytep_NULL); + png_read_push_finish_row(png_ptr); + } + } + if (png_ptr->pass == 4 && png_ptr->height <= 4) + { + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, png_bytep_NULL); + png_read_push_finish_row(png_ptr); + } + } + if (png_ptr->pass == 6 && png_ptr->height <= 4) + { + png_push_have_row(png_ptr, png_bytep_NULL); + png_read_push_finish_row(png_ptr); + } + break; + } + case 1: + { + int i; + for (i = 0; i < 8 && png_ptr->pass == 1; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + if (png_ptr->pass == 2) /* skip top 4 generated rows */ + { + for (i = 0; i < 4 && png_ptr->pass == 2; i++) + { + png_push_have_row(png_ptr, png_bytep_NULL); + png_read_push_finish_row(png_ptr); + } + } + break; + } + case 2: + { + int i; + for (i = 0; i < 4 && png_ptr->pass == 2; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + for (i = 0; i < 4 && png_ptr->pass == 2; i++) + { + png_push_have_row(png_ptr, png_bytep_NULL); + png_read_push_finish_row(png_ptr); + } + if (png_ptr->pass == 4) /* pass 3 might be empty */ + { + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, png_bytep_NULL); + png_read_push_finish_row(png_ptr); + } + } + break; + } + case 3: + { + int i; + for (i = 0; i < 4 && png_ptr->pass == 3; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + if (png_ptr->pass == 4) /* skip top two generated rows */ + { + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, png_bytep_NULL); + png_read_push_finish_row(png_ptr); + } + } + break; + } + case 4: + { + int i; + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, png_bytep_NULL); + png_read_push_finish_row(png_ptr); + } + if (png_ptr->pass == 6) /* pass 5 might be empty */ + { + png_push_have_row(png_ptr, png_bytep_NULL); + png_read_push_finish_row(png_ptr); + } + break; + } + case 5: + { + int i; + for (i = 0; i < 2 && png_ptr->pass == 5; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + if (png_ptr->pass == 6) /* skip top generated row */ + { + png_push_have_row(png_ptr, png_bytep_NULL); + png_read_push_finish_row(png_ptr); + } + break; + } + case 6: + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + if (png_ptr->pass != 6) + break; + png_push_have_row(png_ptr, png_bytep_NULL); + png_read_push_finish_row(png_ptr); + } + } + } + else +#endif + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } +} + +void /* PRIVATE */ +png_read_push_finish_row(png_structp png_ptr) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */ + + /* start of interlace block */ + const int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; + + /* offset to next interlace block */ + const int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; + + /* start of interlace block in the y direction */ + const int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1}; + + /* offset to next interlace block in the y direction */ + const int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2}; + + /* Width of interlace block. This is not currently used - if you need + * it, uncomment it here and in png.h + const int FARDATA png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; + */ + + /* Height of interlace block. This is not currently used - if you need + * it, uncomment it here and in png.h + const int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1}; + */ +#endif + + png_ptr->row_number++; + if (png_ptr->row_number < png_ptr->num_rows) + return; + + if (png_ptr->interlaced) + { + png_ptr->row_number = 0; + png_memset_check(png_ptr, png_ptr->prev_row, 0, + png_ptr->rowbytes + 1); + do + { + png_ptr->pass++; + if ((png_ptr->pass == 1 && png_ptr->width < 5) || + (png_ptr->pass == 3 && png_ptr->width < 3) || + (png_ptr->pass == 5 && png_ptr->width < 2)) + png_ptr->pass++; + + if (png_ptr->pass > 7) + png_ptr->pass--; + if (png_ptr->pass >= 7) + break; + + png_ptr->iwidth = (png_ptr->width + + png_pass_inc[png_ptr->pass] - 1 - + png_pass_start[png_ptr->pass]) / + png_pass_inc[png_ptr->pass]; + + png_ptr->irowbytes = ((png_ptr->iwidth * + png_ptr->pixel_depth + 7) >> 3) + 1; + + if (png_ptr->transformations & PNG_INTERLACE) + break; + + png_ptr->num_rows = (png_ptr->height + + png_pass_yinc[png_ptr->pass] - 1 - + png_pass_ystart[png_ptr->pass]) / + png_pass_yinc[png_ptr->pass]; + + } while (png_ptr->iwidth == 0 || png_ptr->num_rows == 0); + } +} + +#if defined(PNG_READ_tEXt_SUPPORTED) +void /* PRIVATE */ +png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 + length) +{ + if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND)) + { + png_error(png_ptr, "Out of place tEXt"); + /* to quiet some compiler warnings */ + if(info_ptr == NULL) return; + } + +#ifdef PNG_MAX_MALLOC_64K + png_ptr->skip_length = 0; /* This may not be necessary */ + + if (length > (png_uint_32)65535L) /* Can't hold entire string in memory */ + { + png_warning(png_ptr, "tEXt chunk too large to fit in memory"); + png_ptr->skip_length = length - (png_uint_32)65535L; + length = (png_uint_32)65535L; + } +#endif + + png_ptr->current_text = (png_charp)png_malloc(png_ptr, + (png_uint_32)(length+1)); + png_ptr->current_text[length] = '\0'; + png_ptr->current_text_ptr = png_ptr->current_text; + png_ptr->current_text_size = (png_size_t)length; + png_ptr->current_text_left = (png_size_t)length; + png_ptr->process_mode = PNG_READ_tEXt_MODE; +} + +void /* PRIVATE */ +png_push_read_tEXt(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr->buffer_size && png_ptr->current_text_left) + { + png_size_t text_size; + + if (png_ptr->buffer_size < png_ptr->current_text_left) + text_size = png_ptr->buffer_size; + else + text_size = png_ptr->current_text_left; + png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size); + png_ptr->current_text_left -= text_size; + png_ptr->current_text_ptr += text_size; + } + if (!(png_ptr->current_text_left)) + { + png_textp text_ptr; + png_charp text; + png_charp key; + int ret; + + if (png_ptr->buffer_size < 4) + { + png_push_save_buffer(png_ptr); + return; + } + + png_push_crc_finish(png_ptr); + +#if defined(PNG_MAX_MALLOC_64K) + if (png_ptr->skip_length) + return; +#endif + + key = png_ptr->current_text; + + for (text = key; *text; text++) + /* empty loop */ ; + + if (text != key + png_ptr->current_text_size) + text++; + + text_ptr = (png_textp)png_malloc(png_ptr, (png_uint_32)sizeof(png_text)); + text_ptr->compression = PNG_TEXT_COMPRESSION_NONE; + text_ptr->key = key; +#ifdef PNG_iTXt_SUPPORTED + text_ptr->lang = NULL; + text_ptr->lang_key = NULL; +#endif + text_ptr->text = text; + + ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1); + + png_free(png_ptr, key); + png_free(png_ptr, text_ptr); + png_ptr->current_text = NULL; + + if (ret) + png_warning(png_ptr, "Insufficient memory to store text chunk."); + } +} +#endif + +#if defined(PNG_READ_zTXt_SUPPORTED) +void /* PRIVATE */ +png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 + length) +{ + if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND)) + { + png_error(png_ptr, "Out of place zTXt"); + /* to quiet some compiler warnings */ + if(info_ptr == NULL) return; + } + +#ifdef PNG_MAX_MALLOC_64K + /* We can't handle zTXt chunks > 64K, since we don't have enough space + * to be able to store the uncompressed data. Actually, the threshold + * is probably around 32K, but it isn't as definite as 64K is. + */ + if (length > (png_uint_32)65535L) + { + png_warning(png_ptr, "zTXt chunk too large to fit in memory"); + png_push_crc_skip(png_ptr, length); + return; + } +#endif + + png_ptr->current_text = (png_charp)png_malloc(png_ptr, + (png_uint_32)(length+1)); + png_ptr->current_text[length] = '\0'; + png_ptr->current_text_ptr = png_ptr->current_text; + png_ptr->current_text_size = (png_size_t)length; + png_ptr->current_text_left = (png_size_t)length; + png_ptr->process_mode = PNG_READ_zTXt_MODE; +} + +void /* PRIVATE */ +png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr->buffer_size && png_ptr->current_text_left) + { + png_size_t text_size; + + if (png_ptr->buffer_size < (png_uint_32)png_ptr->current_text_left) + text_size = png_ptr->buffer_size; + else + text_size = png_ptr->current_text_left; + png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size); + png_ptr->current_text_left -= text_size; + png_ptr->current_text_ptr += text_size; + } + if (!(png_ptr->current_text_left)) + { + png_textp text_ptr; + png_charp text; + png_charp key; + int ret; + png_size_t text_size, key_size; + + if (png_ptr->buffer_size < 4) + { + png_push_save_buffer(png_ptr); + return; + } + + png_push_crc_finish(png_ptr); + + key = png_ptr->current_text; + + for (text = key; *text; text++) + /* empty loop */ ; + + /* zTXt can't have zero text */ + if (text == key + png_ptr->current_text_size) + { + png_ptr->current_text = NULL; + png_free(png_ptr, key); + return; + } + + text++; + + if (*text != PNG_TEXT_COMPRESSION_zTXt) /* check compression byte */ + { + png_ptr->current_text = NULL; + png_free(png_ptr, key); + return; + } + + text++; + + png_ptr->zstream.next_in = (png_bytep )text; + png_ptr->zstream.avail_in = (uInt)(png_ptr->current_text_size - + (text - key)); + png_ptr->zstream.next_out = png_ptr->zbuf; + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + + key_size = text - key; + text_size = 0; + text = NULL; + ret = Z_STREAM_END; + + while (png_ptr->zstream.avail_in) + { + ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); + if (ret != Z_OK && ret != Z_STREAM_END) + { + inflateReset(&png_ptr->zstream); + png_ptr->zstream.avail_in = 0; + png_ptr->current_text = NULL; + png_free(png_ptr, key); + png_free(png_ptr, text); + return; + } + if (!(png_ptr->zstream.avail_out) || ret == Z_STREAM_END) + { + if (text == NULL) + { + text = (png_charp)png_malloc(png_ptr, + (png_uint_32)(png_ptr->zbuf_size - png_ptr->zstream.avail_out + + key_size + 1)); + png_memcpy(text + key_size, png_ptr->zbuf, + png_ptr->zbuf_size - png_ptr->zstream.avail_out); + png_memcpy(text, key, key_size); + text_size = key_size + png_ptr->zbuf_size - + png_ptr->zstream.avail_out; + *(text + text_size) = '\0'; + } + else + { + png_charp tmp; + + tmp = text; + text = (png_charp)png_malloc(png_ptr, text_size + + (png_uint_32)(png_ptr->zbuf_size - png_ptr->zstream.avail_out + + 1)); + png_memcpy(text, tmp, text_size); + png_free(png_ptr, tmp); + png_memcpy(text + text_size, png_ptr->zbuf, + png_ptr->zbuf_size - png_ptr->zstream.avail_out); + text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out; + *(text + text_size) = '\0'; + } + if (ret != Z_STREAM_END) + { + png_ptr->zstream.next_out = png_ptr->zbuf; + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + } + } + else + { + break; + } + + if (ret == Z_STREAM_END) + break; + } + + inflateReset(&png_ptr->zstream); + png_ptr->zstream.avail_in = 0; + + if (ret != Z_STREAM_END) + { + png_ptr->current_text = NULL; + png_free(png_ptr, key); + png_free(png_ptr, text); + return; + } + + png_ptr->current_text = NULL; + png_free(png_ptr, key); + key = text; + text += key_size; + + text_ptr = (png_textp)png_malloc(png_ptr, (png_uint_32)sizeof(png_text)); + text_ptr->compression = PNG_TEXT_COMPRESSION_zTXt; + text_ptr->key = key; +#ifdef PNG_iTXt_SUPPORTED + text_ptr->lang = NULL; + text_ptr->lang_key = NULL; +#endif + text_ptr->text = text; + + ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1); + + png_free(png_ptr, key); + png_free(png_ptr, text_ptr); + + if (ret) + png_warning(png_ptr, "Insufficient memory to store text chunk."); + } +} +#endif + +#if defined(PNG_READ_iTXt_SUPPORTED) +void /* PRIVATE */ +png_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 + length) +{ + if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND)) + { + png_error(png_ptr, "Out of place iTXt"); + /* to quiet some compiler warnings */ + if(info_ptr == NULL) return; + } + +#ifdef PNG_MAX_MALLOC_64K + png_ptr->skip_length = 0; /* This may not be necessary */ + + if (length > (png_uint_32)65535L) /* Can't hold entire string in memory */ + { + png_warning(png_ptr, "iTXt chunk too large to fit in memory"); + png_ptr->skip_length = length - (png_uint_32)65535L; + length = (png_uint_32)65535L; + } +#endif + + png_ptr->current_text = (png_charp)png_malloc(png_ptr, + (png_uint_32)(length+1)); + png_ptr->current_text[length] = '\0'; + png_ptr->current_text_ptr = png_ptr->current_text; + png_ptr->current_text_size = (png_size_t)length; + png_ptr->current_text_left = (png_size_t)length; + png_ptr->process_mode = PNG_READ_iTXt_MODE; +} + +void /* PRIVATE */ +png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr) +{ + + if (png_ptr->buffer_size && png_ptr->current_text_left) + { + png_size_t text_size; + + if (png_ptr->buffer_size < png_ptr->current_text_left) + text_size = png_ptr->buffer_size; + else + text_size = png_ptr->current_text_left; + png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size); + png_ptr->current_text_left -= text_size; + png_ptr->current_text_ptr += text_size; + } + if (!(png_ptr->current_text_left)) + { + png_textp text_ptr; + png_charp key; + int comp_flag; + png_charp lang; + png_charp lang_key; + png_charp text; + int ret; + + if (png_ptr->buffer_size < 4) + { + png_push_save_buffer(png_ptr); + return; + } + + png_push_crc_finish(png_ptr); + +#if defined(PNG_MAX_MALLOC_64K) + if (png_ptr->skip_length) + return; +#endif + + key = png_ptr->current_text; + + for (lang = key; *lang; lang++) + /* empty loop */ ; + + if (lang != key + png_ptr->current_text_size) + lang++; + + comp_flag = *lang++; + lang++; /* skip comp_type, always zero */ + + for (lang_key = lang; *lang_key; lang_key++) + /* empty loop */ ; + lang_key++; /* skip NUL separator */ + + for (text = lang_key; *text; text++) + /* empty loop */ ; + + if (text != key + png_ptr->current_text_size) + text++; + + text_ptr = (png_textp)png_malloc(png_ptr, (png_uint_32)sizeof(png_text)); + text_ptr->compression = comp_flag + 2; + text_ptr->key = key; + text_ptr->lang = lang; + text_ptr->lang_key = lang_key; + text_ptr->text = text; + text_ptr->text_length = 0; + text_ptr->itxt_length = png_strlen(text); + + ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1); + + png_ptr->current_text = NULL; + + png_free(png_ptr, text_ptr); + if (ret) + png_warning(png_ptr, "Insufficient memory to store iTXt chunk."); + } +} +#endif + +/* This function is called when we haven't found a handler for this + * chunk. If there isn't a problem with the chunk itself (ie a bad chunk + * name or a critical chunk), the chunk is (currently) silently ignored. + */ +void /* PRIVATE */ +png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 + length) +{ + png_uint_32 skip=0; + png_check_chunk_name(png_ptr, png_ptr->chunk_name); + + if (!(png_ptr->chunk_name[0] & 0x20)) + { +#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) + if(png_handle_as_unknown(png_ptr, png_ptr->chunk_name) != + HANDLE_CHUNK_ALWAYS +#if defined(PNG_READ_USER_CHUNKS_SUPPORTED) + && png_ptr->read_user_chunk_fn == NULL +#endif + ) +#endif + png_chunk_error(png_ptr, "unknown critical chunk"); + + /* to quiet compiler warnings about unused info_ptr */ + if (info_ptr == NULL) + return; + } + +#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) + if (png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS) + { + png_unknown_chunk chunk; + +#ifdef PNG_MAX_MALLOC_64K + if (length > (png_uint_32)65535L) + { + png_warning(png_ptr, "unknown chunk too large to fit in memory"); + skip = length - (png_uint_32)65535L; + length = (png_uint_32)65535L; + } +#endif + + png_strcpy((png_charp)chunk.name, (png_charp)png_ptr->chunk_name); + chunk.data = (png_bytep)png_malloc(png_ptr, length); + png_crc_read(png_ptr, chunk.data, length); + chunk.size = length; +#if defined(PNG_READ_USER_CHUNKS_SUPPORTED) + if(png_ptr->read_user_chunk_fn != NULL) + { + /* callback to user unknown chunk handler */ + if ((*(png_ptr->read_user_chunk_fn)) (png_ptr, &chunk) <= 0) + { + if (!(png_ptr->chunk_name[0] & 0x20)) + if(png_handle_as_unknown(png_ptr, png_ptr->chunk_name) != + HANDLE_CHUNK_ALWAYS) + png_chunk_error(png_ptr, "unknown critical chunk"); + } + png_set_unknown_chunks(png_ptr, info_ptr, &chunk, 1); + } + else +#endif + png_set_unknown_chunks(png_ptr, info_ptr, &chunk, 1); + png_free(png_ptr, chunk.data); + } + else +#endif + skip=length; + png_push_crc_skip(png_ptr, skip); +} + +void /* PRIVATE */ +png_push_have_info(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr->info_fn != NULL) + (*(png_ptr->info_fn))(png_ptr, info_ptr); +} + +void /* PRIVATE */ +png_push_have_end(png_structp png_ptr, png_infop info_ptr) +{ + if (png_ptr->end_fn != NULL) + (*(png_ptr->end_fn))(png_ptr, info_ptr); +} + +void /* PRIVATE */ +png_push_have_row(png_structp png_ptr, png_bytep row) +{ + if (png_ptr->row_fn != NULL) + (*(png_ptr->row_fn))(png_ptr, row, png_ptr->row_number, + (int)png_ptr->pass); +} + +void PNGAPI +png_progressive_combine_row (png_structp png_ptr, + png_bytep old_row, png_bytep new_row) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + const int FARDATA png_pass_dsp_mask[7] = + {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff}; +#endif + if (new_row != NULL) /* new_row must == png_ptr->row_buf here. */ + png_combine_row(png_ptr, old_row, png_pass_dsp_mask[png_ptr->pass]); +} + +void PNGAPI +png_set_progressive_read_fn(png_structp png_ptr, png_voidp progressive_ptr, + png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, + png_progressive_end_ptr end_fn) +{ + png_ptr->info_fn = info_fn; + png_ptr->row_fn = row_fn; + png_ptr->end_fn = end_fn; + + png_set_read_fn(png_ptr, progressive_ptr, png_push_fill_buffer); +} + +png_voidp PNGAPI +png_get_progressive_ptr(png_structp png_ptr) +{ + return png_ptr->io_ptr; +} +#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ diff --git a/gtkmm-osx/libpng-1.2.5/pngread.c b/gtkmm-osx/libpng-1.2.5/pngread.c new file mode 100644 index 0000000..e91d3e8 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/pngread.c @@ -0,0 +1,1424 @@ + +/* pngread.c - read a PNG file + * + * libpng 1.2.5 - October 3, 2002 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2002 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This file contains routines that an application calls directly to + * read a PNG file or stream. + */ + +#define PNG_INTERNAL +#include "png.h" + +/* Create a PNG structure for reading, and allocate any memory needed. */ +png_structp PNGAPI +png_create_read_struct(png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn) +{ + +#ifdef PNG_USER_MEM_SUPPORTED + return (png_create_read_struct_2(user_png_ver, error_ptr, error_fn, + warn_fn, png_voidp_NULL, png_malloc_ptr_NULL, png_free_ptr_NULL)); +} + +/* Alternate create PNG structure for reading, and allocate any memory needed. */ +png_structp PNGAPI +png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn) +{ +#endif /* PNG_USER_MEM_SUPPORTED */ + + png_structp png_ptr; + +#ifdef PNG_SETJMP_SUPPORTED +#ifdef USE_FAR_KEYWORD + jmp_buf jmpbuf; +#endif +#endif + + int i; + + png_debug(1, "in png_create_read_struct\n"); +#ifdef PNG_USER_MEM_SUPPORTED + png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG, + (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr); +#else + png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG); +#endif + if (png_ptr == NULL) + return (NULL); + +#if !defined(PNG_1_0_X) +#ifdef PNG_ASSEMBLER_CODE_SUPPORTED + png_init_mmx_flags(png_ptr); /* 1.2.0 addition */ +#endif +#endif /* PNG_1_0_X */ + +#ifdef PNG_SETJMP_SUPPORTED +#ifdef USE_FAR_KEYWORD + if (setjmp(jmpbuf)) +#else + if (setjmp(png_ptr->jmpbuf)) +#endif + { + png_free(png_ptr, png_ptr->zbuf); + png_ptr->zbuf=NULL; +#ifdef PNG_USER_MEM_SUPPORTED + png_destroy_struct_2((png_voidp)png_ptr, + (png_free_ptr)free_fn, (png_voidp)mem_ptr); +#else + png_destroy_struct((png_voidp)png_ptr); +#endif + return (NULL); + } +#ifdef USE_FAR_KEYWORD + png_memcpy(png_ptr->jmpbuf,jmpbuf,sizeof(jmp_buf)); +#endif +#endif + +#ifdef PNG_USER_MEM_SUPPORTED + png_set_mem_fn(png_ptr, mem_ptr, malloc_fn, free_fn); +#endif + + png_set_error_fn(png_ptr, error_ptr, error_fn, warn_fn); + + i=0; + do + { + if(user_png_ver[i] != png_libpng_ver[i]) + png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; + } while (png_libpng_ver[i++]); + + if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH) + { + /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so + * we must recompile any applications that use any older library version. + * For versions after libpng 1.0, we will be compatible, so we need + * only check the first digit. + */ + if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] || + (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) || + (user_png_ver[0] == '0' && user_png_ver[2] < '9')) + { +#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) + char msg[80]; + if (user_png_ver) + { + sprintf(msg, "Application was compiled with png.h from libpng-%.20s", + user_png_ver); + png_warning(png_ptr, msg); + } + sprintf(msg, "Application is running with png.c from libpng-%.20s", + png_libpng_ver); + png_warning(png_ptr, msg); +#endif +#ifdef PNG_ERROR_NUMBERS_SUPPORTED + png_ptr->flags=0; +#endif + png_error(png_ptr, + "Incompatible libpng version in application and library"); + } + } + + /* initialize zbuf - compression buffer */ + png_ptr->zbuf_size = PNG_ZBUF_SIZE; + png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, + (png_uint_32)png_ptr->zbuf_size); + png_ptr->zstream.zalloc = png_zalloc; + png_ptr->zstream.zfree = png_zfree; + png_ptr->zstream.opaque = (voidpf)png_ptr; + + switch (inflateInit(&png_ptr->zstream)) + { + case Z_OK: /* Do nothing */ break; + case Z_MEM_ERROR: + case Z_STREAM_ERROR: png_error(png_ptr, "zlib memory error"); break; + case Z_VERSION_ERROR: png_error(png_ptr, "zlib version error"); break; + default: png_error(png_ptr, "Unknown zlib error"); + } + + png_ptr->zstream.next_out = png_ptr->zbuf; + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + + png_set_read_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL); + +#ifdef PNG_SETJMP_SUPPORTED +/* Applications that neglect to set up their own setjmp() and then encounter + a png_error() will longjmp here. Since the jmpbuf is then meaningless we + abort instead of returning. */ +#ifdef USE_FAR_KEYWORD + if (setjmp(jmpbuf)) + PNG_ABORT(); + png_memcpy(png_ptr->jmpbuf,jmpbuf,sizeof(jmp_buf)); +#else + if (setjmp(png_ptr->jmpbuf)) + PNG_ABORT(); +#endif +#endif + return (png_ptr); +} + +/* Initialize PNG structure for reading, and allocate any memory needed. + This interface is deprecated in favour of the png_create_read_struct(), + and it will eventually disappear. */ +#undef png_read_init +void PNGAPI +png_read_init(png_structp png_ptr) +{ + /* We only come here via pre-1.0.7-compiled applications */ + png_read_init_2(png_ptr, "1.0.6 or earlier", 0, 0); +} + +void PNGAPI +png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver, + png_size_t png_struct_size, png_size_t png_info_size) +{ + /* We only come here via pre-1.0.12-compiled applications */ +#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) + if(sizeof(png_struct) > png_struct_size || sizeof(png_info) > png_info_size) + { + char msg[80]; + png_ptr->warning_fn=NULL; + if (user_png_ver) + { + sprintf(msg, "Application was compiled with png.h from libpng-%.20s", + user_png_ver); + png_warning(png_ptr, msg); + } + sprintf(msg, "Application is running with png.c from libpng-%.20s", + png_libpng_ver); + png_warning(png_ptr, msg); + } +#endif + if(sizeof(png_struct) > png_struct_size) + { + png_ptr->error_fn=NULL; +#ifdef PNG_ERROR_NUMBERS_SUPPORTED + png_ptr->flags=0; +#endif + png_error(png_ptr, + "The png struct allocated by the application for reading is too small."); + } + if(sizeof(png_info) > png_info_size) + { + png_ptr->error_fn=NULL; +#ifdef PNG_ERROR_NUMBERS_SUPPORTED + png_ptr->flags=0; +#endif + png_error(png_ptr, + "The info struct allocated by application for reading is too small."); + } + png_read_init_3(&png_ptr, user_png_ver, png_struct_size); +} + +void PNGAPI +png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver, + png_size_t png_struct_size) +{ +#ifdef PNG_SETJMP_SUPPORTED + jmp_buf tmp_jmp; /* to save current jump buffer */ +#endif + + int i=0; + + png_structp png_ptr=*ptr_ptr; + + do + { + if(user_png_ver[i] != png_libpng_ver[i]) + { +#ifdef PNG_LEGACY_SUPPORTED + png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; +#else + png_ptr->warning_fn=NULL; + png_warning(png_ptr, + "Application uses deprecated png_read_init() and should be recompiled."); + break; +#endif + } + } while (png_libpng_ver[i++]); + + png_debug(1, "in png_read_init_3\n"); + +#ifdef PNG_SETJMP_SUPPORTED + /* save jump buffer and error functions */ + png_memcpy(tmp_jmp, png_ptr->jmpbuf, sizeof (jmp_buf)); +#endif + + if(sizeof(png_struct) > png_struct_size) + { + png_destroy_struct(png_ptr); + *ptr_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG); + png_ptr = *ptr_ptr; + } + + /* reset all variables to 0 */ + png_memset(png_ptr, 0, sizeof (png_struct)); + +#ifdef PNG_SETJMP_SUPPORTED + /* restore jump buffer */ + png_memcpy(png_ptr->jmpbuf, tmp_jmp, sizeof (jmp_buf)); +#endif + + /* initialize zbuf - compression buffer */ + png_ptr->zbuf_size = PNG_ZBUF_SIZE; + png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, + (png_uint_32)png_ptr->zbuf_size); + png_ptr->zstream.zalloc = png_zalloc; + png_ptr->zstream.zfree = png_zfree; + png_ptr->zstream.opaque = (voidpf)png_ptr; + + switch (inflateInit(&png_ptr->zstream)) + { + case Z_OK: /* Do nothing */ break; + case Z_MEM_ERROR: + case Z_STREAM_ERROR: png_error(png_ptr, "zlib memory"); break; + case Z_VERSION_ERROR: png_error(png_ptr, "zlib version"); break; + default: png_error(png_ptr, "Unknown zlib error"); + } + + png_ptr->zstream.next_out = png_ptr->zbuf; + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + + png_set_read_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL); +} + +/* Read the information before the actual image data. This has been + * changed in v0.90 to allow reading a file that already has the magic + * bytes read from the stream. You can tell libpng how many bytes have + * been read from the beginning of the stream (up to the maximum of 8) + * via png_set_sig_bytes(), and we will only check the remaining bytes + * here. The application can then have access to the signature bytes we + * read if it is determined that this isn't a valid PNG file. + */ +void PNGAPI +png_read_info(png_structp png_ptr, png_infop info_ptr) +{ + png_debug(1, "in png_read_info\n"); + /* If we haven't checked all of the PNG signature bytes, do so now. */ + if (png_ptr->sig_bytes < 8) + { + png_size_t num_checked = png_ptr->sig_bytes, + num_to_check = 8 - num_checked; + + png_read_data(png_ptr, &(info_ptr->signature[num_checked]), num_to_check); + png_ptr->sig_bytes = 8; + + if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check)) + { + if (num_checked < 4 && + png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4)) + png_error(png_ptr, "Not a PNG file"); + else + png_error(png_ptr, "PNG file corrupted by ASCII conversion"); + } + if (num_checked < 3) + png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE; + } + + for(;;) + { +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_IHDR; + PNG_IDAT; + PNG_IEND; + PNG_PLTE; +#if defined(PNG_READ_bKGD_SUPPORTED) + PNG_bKGD; +#endif +#if defined(PNG_READ_cHRM_SUPPORTED) + PNG_cHRM; +#endif +#if defined(PNG_READ_gAMA_SUPPORTED) + PNG_gAMA; +#endif +#if defined(PNG_READ_hIST_SUPPORTED) + PNG_hIST; +#endif +#if defined(PNG_READ_iCCP_SUPPORTED) + PNG_iCCP; +#endif +#if defined(PNG_READ_iTXt_SUPPORTED) + PNG_iTXt; +#endif +#if defined(PNG_READ_oFFs_SUPPORTED) + PNG_oFFs; +#endif +#if defined(PNG_READ_pCAL_SUPPORTED) + PNG_pCAL; +#endif +#if defined(PNG_READ_pHYs_SUPPORTED) + PNG_pHYs; +#endif +#if defined(PNG_READ_sBIT_SUPPORTED) + PNG_sBIT; +#endif +#if defined(PNG_READ_sCAL_SUPPORTED) + PNG_sCAL; +#endif +#if defined(PNG_READ_sPLT_SUPPORTED) + PNG_sPLT; +#endif +#if defined(PNG_READ_sRGB_SUPPORTED) + PNG_sRGB; +#endif +#if defined(PNG_READ_tEXt_SUPPORTED) + PNG_tEXt; +#endif +#if defined(PNG_READ_tIME_SUPPORTED) + PNG_tIME; +#endif +#if defined(PNG_READ_tRNS_SUPPORTED) + PNG_tRNS; +#endif +#if defined(PNG_READ_zTXt_SUPPORTED) + PNG_zTXt; +#endif +#endif /* PNG_GLOBAL_ARRAYS */ + png_byte chunk_length[4]; + png_uint_32 length; + + png_read_data(png_ptr, chunk_length, 4); + length = png_get_uint_32(chunk_length); + + png_reset_crc(png_ptr); + png_crc_read(png_ptr, png_ptr->chunk_name, 4); + + png_debug2(0, "Reading %s chunk, length=%lu.\n", png_ptr->chunk_name, + length); + + if (length > PNG_MAX_UINT) + png_error(png_ptr, "Invalid chunk length."); + + /* This should be a binary subdivision search or a hash for + * matching the chunk name rather than a linear search. + */ + if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4)) + png_handle_IHDR(png_ptr, info_ptr, length); + else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4)) + png_handle_IEND(png_ptr, info_ptr, length); +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + else if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name)) + { + if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) + png_ptr->mode |= PNG_HAVE_IDAT; + png_handle_unknown(png_ptr, info_ptr, length); + if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4)) + png_ptr->mode |= PNG_HAVE_PLTE; + else if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) + { + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before IDAT"); + else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && + !(png_ptr->mode & PNG_HAVE_PLTE)) + png_error(png_ptr, "Missing PLTE before IDAT"); + break; + } + } +#endif + else if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4)) + png_handle_PLTE(png_ptr, info_ptr, length); + else if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) + { + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before IDAT"); + else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && + !(png_ptr->mode & PNG_HAVE_PLTE)) + png_error(png_ptr, "Missing PLTE before IDAT"); + + png_ptr->idat_size = length; + png_ptr->mode |= PNG_HAVE_IDAT; + break; + } +#if defined(PNG_READ_bKGD_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_bKGD, 4)) + png_handle_bKGD(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_cHRM_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_cHRM, 4)) + png_handle_cHRM(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_gAMA_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_gAMA, 4)) + png_handle_gAMA(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_hIST_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_hIST, 4)) + png_handle_hIST(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_oFFs_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_oFFs, 4)) + png_handle_oFFs(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_pCAL_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_pCAL, 4)) + png_handle_pCAL(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_sCAL_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_sCAL, 4)) + png_handle_sCAL(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_pHYs_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_pHYs, 4)) + png_handle_pHYs(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_sBIT_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_sBIT, 4)) + png_handle_sBIT(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_sRGB_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_sRGB, 4)) + png_handle_sRGB(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_iCCP_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_iCCP, 4)) + png_handle_iCCP(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_sPLT_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_sPLT, 4)) + png_handle_sPLT(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_tEXt_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_tEXt, 4)) + png_handle_tEXt(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_tIME_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_tIME, 4)) + png_handle_tIME(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_tRNS_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_tRNS, 4)) + png_handle_tRNS(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_zTXt_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_zTXt, 4)) + png_handle_zTXt(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_iTXt_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_iTXt, 4)) + png_handle_iTXt(png_ptr, info_ptr, length); +#endif + else + png_handle_unknown(png_ptr, info_ptr, length); + } +} + +/* optional call to update the users info_ptr structure */ +void PNGAPI +png_read_update_info(png_structp png_ptr, png_infop info_ptr) +{ + png_debug(1, "in png_read_update_info\n"); + if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) + png_read_start_row(png_ptr); + else + png_warning(png_ptr, + "Ignoring extra png_read_update_info() call; row buffer not reallocated"); + png_read_transform_info(png_ptr, info_ptr); +} + +/* Initialize palette, background, etc, after transformations + * are set, but before any reading takes place. This allows + * the user to obtain a gamma-corrected palette, for example. + * If the user doesn't call this, we will do it ourselves. + */ +void PNGAPI +png_start_read_image(png_structp png_ptr) +{ + png_debug(1, "in png_start_read_image\n"); + if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) + png_read_start_row(png_ptr); +} + +void PNGAPI +png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_IDAT; + const int png_pass_dsp_mask[7] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff}; + const int png_pass_mask[7] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff}; +#endif + int ret; + png_debug2(1, "in png_read_row (row %lu, pass %d)\n", + png_ptr->row_number, png_ptr->pass); + if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) + png_read_start_row(png_ptr); + if (png_ptr->row_number == 0 && png_ptr->pass == 0) + { + /* check for transforms that have been set but were defined out */ +#if defined(PNG_WRITE_INVERT_SUPPORTED) && !defined(PNG_READ_INVERT_SUPPORTED) + if (png_ptr->transformations & PNG_INVERT_MONO) + png_warning(png_ptr, "PNG_READ_INVERT_SUPPORTED is not defined."); +#endif +#if defined(PNG_WRITE_FILLER_SUPPORTED) && !defined(PNG_READ_FILLER_SUPPORTED) + if (png_ptr->transformations & PNG_FILLER) + png_warning(png_ptr, "PNG_READ_FILLER_SUPPORTED is not defined."); +#endif +#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && !defined(PNG_READ_PACKSWAP_SUPPORTED) + if (png_ptr->transformations & PNG_PACKSWAP) + png_warning(png_ptr, "PNG_READ_PACKSWAP_SUPPORTED is not defined."); +#endif +#if defined(PNG_WRITE_PACK_SUPPORTED) && !defined(PNG_READ_PACK_SUPPORTED) + if (png_ptr->transformations & PNG_PACK) + png_warning(png_ptr, "PNG_READ_PACK_SUPPORTED is not defined."); +#endif +#if defined(PNG_WRITE_SHIFT_SUPPORTED) && !defined(PNG_READ_SHIFT_SUPPORTED) + if (png_ptr->transformations & PNG_SHIFT) + png_warning(png_ptr, "PNG_READ_SHIFT_SUPPORTED is not defined."); +#endif +#if defined(PNG_WRITE_BGR_SUPPORTED) && !defined(PNG_READ_BGR_SUPPORTED) + if (png_ptr->transformations & PNG_BGR) + png_warning(png_ptr, "PNG_READ_BGR_SUPPORTED is not defined."); +#endif +#if defined(PNG_WRITE_SWAP_SUPPORTED) && !defined(PNG_READ_SWAP_SUPPORTED) + if (png_ptr->transformations & PNG_SWAP_BYTES) + png_warning(png_ptr, "PNG_READ_SWAP_SUPPORTED is not defined."); +#endif + } + +#if defined(PNG_READ_INTERLACING_SUPPORTED) + /* if interlaced and we do not need a new row, combine row and return */ + if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) + { + switch (png_ptr->pass) + { + case 0: + if (png_ptr->row_number & 0x07) + { + if (dsp_row != NULL) + png_combine_row(png_ptr, dsp_row, + png_pass_dsp_mask[png_ptr->pass]); + png_read_finish_row(png_ptr); + return; + } + break; + case 1: + if ((png_ptr->row_number & 0x07) || png_ptr->width < 5) + { + if (dsp_row != NULL) + png_combine_row(png_ptr, dsp_row, + png_pass_dsp_mask[png_ptr->pass]); + png_read_finish_row(png_ptr); + return; + } + break; + case 2: + if ((png_ptr->row_number & 0x07) != 4) + { + if (dsp_row != NULL && (png_ptr->row_number & 4)) + png_combine_row(png_ptr, dsp_row, + png_pass_dsp_mask[png_ptr->pass]); + png_read_finish_row(png_ptr); + return; + } + break; + case 3: + if ((png_ptr->row_number & 3) || png_ptr->width < 3) + { + if (dsp_row != NULL) + png_combine_row(png_ptr, dsp_row, + png_pass_dsp_mask[png_ptr->pass]); + png_read_finish_row(png_ptr); + return; + } + break; + case 4: + if ((png_ptr->row_number & 3) != 2) + { + if (dsp_row != NULL && (png_ptr->row_number & 2)) + png_combine_row(png_ptr, dsp_row, + png_pass_dsp_mask[png_ptr->pass]); + png_read_finish_row(png_ptr); + return; + } + break; + case 5: + if ((png_ptr->row_number & 1) || png_ptr->width < 2) + { + if (dsp_row != NULL) + png_combine_row(png_ptr, dsp_row, + png_pass_dsp_mask[png_ptr->pass]); + png_read_finish_row(png_ptr); + return; + } + break; + case 6: + if (!(png_ptr->row_number & 1)) + { + png_read_finish_row(png_ptr); + return; + } + break; + } + } +#endif + + if (!(png_ptr->mode & PNG_HAVE_IDAT)) + png_error(png_ptr, "Invalid attempt to read row data"); + + png_ptr->zstream.next_out = png_ptr->row_buf; + png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes; + do + { + if (!(png_ptr->zstream.avail_in)) + { + while (!png_ptr->idat_size) + { + png_byte chunk_length[4]; + + png_crc_finish(png_ptr, 0); + + png_read_data(png_ptr, chunk_length, 4); + png_ptr->idat_size = png_get_uint_32(chunk_length); + + if (png_ptr->idat_size > PNG_MAX_UINT) + png_error(png_ptr, "Invalid chunk length."); + + png_reset_crc(png_ptr); + png_crc_read(png_ptr, png_ptr->chunk_name, 4); + if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) + png_error(png_ptr, "Not enough image data"); + } + png_ptr->zstream.avail_in = (uInt)png_ptr->zbuf_size; + png_ptr->zstream.next_in = png_ptr->zbuf; + if (png_ptr->zbuf_size > png_ptr->idat_size) + png_ptr->zstream.avail_in = (uInt)png_ptr->idat_size; + png_crc_read(png_ptr, png_ptr->zbuf, + (png_size_t)png_ptr->zstream.avail_in); + png_ptr->idat_size -= png_ptr->zstream.avail_in; + } + ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); + if (ret == Z_STREAM_END) + { + if (png_ptr->zstream.avail_out || png_ptr->zstream.avail_in || + png_ptr->idat_size) + png_error(png_ptr, "Extra compressed data"); + png_ptr->mode |= PNG_AFTER_IDAT; + png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; + break; + } + if (ret != Z_OK) + png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg : + "Decompression error"); + + } while (png_ptr->zstream.avail_out); + + png_ptr->row_info.color_type = png_ptr->color_type; + png_ptr->row_info.width = png_ptr->iwidth; + png_ptr->row_info.channels = png_ptr->channels; + png_ptr->row_info.bit_depth = png_ptr->bit_depth; + png_ptr->row_info.pixel_depth = png_ptr->pixel_depth; + png_ptr->row_info.rowbytes = ((png_ptr->row_info.width * + (png_uint_32)png_ptr->row_info.pixel_depth + 7) >> 3); + + if(png_ptr->row_buf[0]) + png_read_filter_row(png_ptr, &(png_ptr->row_info), + png_ptr->row_buf + 1, png_ptr->prev_row + 1, + (int)(png_ptr->row_buf[0])); + + png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf, + png_ptr->rowbytes + 1); + +#if defined(PNG_MNG_FEATURES_SUPPORTED) + if((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && + (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING)) + { + /* Intrapixel differencing */ + png_do_read_intrapixel(&(png_ptr->row_info), png_ptr->row_buf + 1); + } +#endif + + if (png_ptr->transformations) + png_do_read_transformations(png_ptr); + +#if defined(PNG_READ_INTERLACING_SUPPORTED) + /* blow up interlaced rows to full size */ + if (png_ptr->interlaced && + (png_ptr->transformations & PNG_INTERLACE)) + { + if (png_ptr->pass < 6) +/* old interface (pre-1.0.9): + png_do_read_interlace(&(png_ptr->row_info), + png_ptr->row_buf + 1, png_ptr->pass, png_ptr->transformations); + */ + png_do_read_interlace(png_ptr); + + if (dsp_row != NULL) + png_combine_row(png_ptr, dsp_row, + png_pass_dsp_mask[png_ptr->pass]); + if (row != NULL) + png_combine_row(png_ptr, row, + png_pass_mask[png_ptr->pass]); + } + else +#endif + { + if (row != NULL) + png_combine_row(png_ptr, row, 0xff); + if (dsp_row != NULL) + png_combine_row(png_ptr, dsp_row, 0xff); + } + png_read_finish_row(png_ptr); + + if (png_ptr->read_row_fn != NULL) + (*(png_ptr->read_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass); +} + +/* Read one or more rows of image data. If the image is interlaced, + * and png_set_interlace_handling() has been called, the rows need to + * contain the contents of the rows from the previous pass. If the + * image has alpha or transparency, and png_handle_alpha()[*] has been + * called, the rows contents must be initialized to the contents of the + * screen. + * + * "row" holds the actual image, and pixels are placed in it + * as they arrive. If the image is displayed after each pass, it will + * appear to "sparkle" in. "display_row" can be used to display a + * "chunky" progressive image, with finer detail added as it becomes + * available. If you do not want this "chunky" display, you may pass + * NULL for display_row. If you do not want the sparkle display, and + * you have not called png_handle_alpha(), you may pass NULL for rows. + * If you have called png_handle_alpha(), and the image has either an + * alpha channel or a transparency chunk, you must provide a buffer for + * rows. In this case, you do not have to provide a display_row buffer + * also, but you may. If the image is not interlaced, or if you have + * not called png_set_interlace_handling(), the display_row buffer will + * be ignored, so pass NULL to it. + * + * [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.5 + */ + +void PNGAPI +png_read_rows(png_structp png_ptr, png_bytepp row, + png_bytepp display_row, png_uint_32 num_rows) +{ + png_uint_32 i; + png_bytepp rp; + png_bytepp dp; + + png_debug(1, "in png_read_rows\n"); + rp = row; + dp = display_row; + if (rp != NULL && dp != NULL) + for (i = 0; i < num_rows; i++) + { + png_bytep rptr = *rp++; + png_bytep dptr = *dp++; + + png_read_row(png_ptr, rptr, dptr); + } + else if(rp != NULL) + for (i = 0; i < num_rows; i++) + { + png_bytep rptr = *rp; + png_read_row(png_ptr, rptr, png_bytep_NULL); + rp++; + } + else if(dp != NULL) + for (i = 0; i < num_rows; i++) + { + png_bytep dptr = *dp; + png_read_row(png_ptr, png_bytep_NULL, dptr); + dp++; + } +} + +/* Read the entire image. If the image has an alpha channel or a tRNS + * chunk, and you have called png_handle_alpha()[*], you will need to + * initialize the image to the current image that PNG will be overlaying. + * We set the num_rows again here, in case it was incorrectly set in + * png_read_start_row() by a call to png_read_update_info() or + * png_start_read_image() if png_set_interlace_handling() wasn't called + * prior to either of these functions like it should have been. You can + * only call this function once. If you desire to have an image for + * each pass of a interlaced image, use png_read_rows() instead. + * + * [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.5 + */ +void PNGAPI +png_read_image(png_structp png_ptr, png_bytepp image) +{ + png_uint_32 i,image_height; + int pass, j; + png_bytepp rp; + + png_debug(1, "in png_read_image\n"); + +#ifdef PNG_READ_INTERLACING_SUPPORTED + pass = png_set_interlace_handling(png_ptr); +#else + if (png_ptr->interlaced) + png_error(png_ptr, + "Cannot read interlaced image -- interlace handler disabled."); + pass = 1; +#endif + + + image_height=png_ptr->height; + png_ptr->num_rows = image_height; /* Make sure this is set correctly */ + + for (j = 0; j < pass; j++) + { + rp = image; + for (i = 0; i < image_height; i++) + { + png_read_row(png_ptr, *rp, png_bytep_NULL); + rp++; + } + } +} + +/* Read the end of the PNG file. Will not read past the end of the + * file, will verify the end is accurate, and will read any comments + * or time information at the end of the file, if info is not NULL. + */ +void PNGAPI +png_read_end(png_structp png_ptr, png_infop info_ptr) +{ + png_byte chunk_length[4]; + png_uint_32 length; + + png_debug(1, "in png_read_end\n"); + png_crc_finish(png_ptr, 0); /* Finish off CRC from last IDAT chunk */ + + do + { +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_IHDR; + PNG_IDAT; + PNG_IEND; + PNG_PLTE; +#if defined(PNG_READ_bKGD_SUPPORTED) + PNG_bKGD; +#endif +#if defined(PNG_READ_cHRM_SUPPORTED) + PNG_cHRM; +#endif +#if defined(PNG_READ_gAMA_SUPPORTED) + PNG_gAMA; +#endif +#if defined(PNG_READ_hIST_SUPPORTED) + PNG_hIST; +#endif +#if defined(PNG_READ_iCCP_SUPPORTED) + PNG_iCCP; +#endif +#if defined(PNG_READ_iTXt_SUPPORTED) + PNG_iTXt; +#endif +#if defined(PNG_READ_oFFs_SUPPORTED) + PNG_oFFs; +#endif +#if defined(PNG_READ_pCAL_SUPPORTED) + PNG_pCAL; +#endif +#if defined(PNG_READ_pHYs_SUPPORTED) + PNG_pHYs; +#endif +#if defined(PNG_READ_sBIT_SUPPORTED) + PNG_sBIT; +#endif +#if defined(PNG_READ_sCAL_SUPPORTED) + PNG_sCAL; +#endif +#if defined(PNG_READ_sPLT_SUPPORTED) + PNG_sPLT; +#endif +#if defined(PNG_READ_sRGB_SUPPORTED) + PNG_sRGB; +#endif +#if defined(PNG_READ_tEXt_SUPPORTED) + PNG_tEXt; +#endif +#if defined(PNG_READ_tIME_SUPPORTED) + PNG_tIME; +#endif +#if defined(PNG_READ_tRNS_SUPPORTED) + PNG_tRNS; +#endif +#if defined(PNG_READ_zTXt_SUPPORTED) + PNG_zTXt; +#endif +#endif /* PNG_GLOBAL_ARRAYS */ + + png_read_data(png_ptr, chunk_length, 4); + length = png_get_uint_32(chunk_length); + + png_reset_crc(png_ptr); + png_crc_read(png_ptr, png_ptr->chunk_name, 4); + + png_debug1(0, "Reading %s chunk.\n", png_ptr->chunk_name); + + if (length > PNG_MAX_UINT) + png_error(png_ptr, "Invalid chunk length."); + + if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4)) + png_handle_IHDR(png_ptr, info_ptr, length); + else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4)) + png_handle_IEND(png_ptr, info_ptr, length); +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + else if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name)) + { + if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) + { + if (length > 0 || png_ptr->mode & PNG_AFTER_IDAT) + png_error(png_ptr, "Too many IDAT's found"); + } + else + png_ptr->mode |= PNG_AFTER_IDAT; + png_handle_unknown(png_ptr, info_ptr, length); + if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4)) + png_ptr->mode |= PNG_HAVE_PLTE; + } +#endif + else if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) + { + /* Zero length IDATs are legal after the last IDAT has been + * read, but not after other chunks have been read. + */ + if (length > 0 || png_ptr->mode & PNG_AFTER_IDAT) + png_error(png_ptr, "Too many IDAT's found"); + png_crc_finish(png_ptr, length); + } + else if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4)) + png_handle_PLTE(png_ptr, info_ptr, length); +#if defined(PNG_READ_bKGD_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_bKGD, 4)) + png_handle_bKGD(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_cHRM_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_cHRM, 4)) + png_handle_cHRM(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_gAMA_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_gAMA, 4)) + png_handle_gAMA(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_hIST_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_hIST, 4)) + png_handle_hIST(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_oFFs_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_oFFs, 4)) + png_handle_oFFs(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_pCAL_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_pCAL, 4)) + png_handle_pCAL(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_sCAL_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_sCAL, 4)) + png_handle_sCAL(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_pHYs_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_pHYs, 4)) + png_handle_pHYs(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_sBIT_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_sBIT, 4)) + png_handle_sBIT(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_sRGB_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_sRGB, 4)) + png_handle_sRGB(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_iCCP_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_iCCP, 4)) + png_handle_iCCP(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_sPLT_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_sPLT, 4)) + png_handle_sPLT(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_tEXt_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_tEXt, 4)) + png_handle_tEXt(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_tIME_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_tIME, 4)) + png_handle_tIME(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_tRNS_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_tRNS, 4)) + png_handle_tRNS(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_zTXt_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_zTXt, 4)) + png_handle_zTXt(png_ptr, info_ptr, length); +#endif +#if defined(PNG_READ_iTXt_SUPPORTED) + else if (!png_memcmp(png_ptr->chunk_name, png_iTXt, 4)) + png_handle_iTXt(png_ptr, info_ptr, length); +#endif + else + png_handle_unknown(png_ptr, info_ptr, length); + } while (!(png_ptr->mode & PNG_HAVE_IEND)); +} + +/* free all memory used by the read */ +void PNGAPI +png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, + png_infopp end_info_ptr_ptr) +{ + png_structp png_ptr = NULL; + png_infop info_ptr = NULL, end_info_ptr = NULL; +#ifdef PNG_USER_MEM_SUPPORTED + png_free_ptr free_fn = NULL; + png_voidp mem_ptr = NULL; +#endif + + png_debug(1, "in png_destroy_read_struct\n"); + if (png_ptr_ptr != NULL) + png_ptr = *png_ptr_ptr; + + if (info_ptr_ptr != NULL) + info_ptr = *info_ptr_ptr; + + if (end_info_ptr_ptr != NULL) + end_info_ptr = *end_info_ptr_ptr; + +#ifdef PNG_USER_MEM_SUPPORTED + free_fn = png_ptr->free_fn; + mem_ptr = png_ptr->mem_ptr; +#endif + + png_read_destroy(png_ptr, info_ptr, end_info_ptr); + + if (info_ptr != NULL) + { +#if defined(PNG_TEXT_SUPPORTED) + png_free_data(png_ptr, info_ptr, PNG_FREE_TEXT, -1); +#endif + +#ifdef PNG_USER_MEM_SUPPORTED + png_destroy_struct_2((png_voidp)info_ptr, (png_free_ptr)free_fn, + (png_voidp)mem_ptr); +#else + png_destroy_struct((png_voidp)info_ptr); +#endif + *info_ptr_ptr = NULL; + } + + if (end_info_ptr != NULL) + { +#if defined(PNG_READ_TEXT_SUPPORTED) + png_free_data(png_ptr, end_info_ptr, PNG_FREE_TEXT, -1); +#endif +#ifdef PNG_USER_MEM_SUPPORTED + png_destroy_struct_2((png_voidp)end_info_ptr, (png_free_ptr)free_fn, + (png_voidp)mem_ptr); +#else + png_destroy_struct((png_voidp)end_info_ptr); +#endif + *end_info_ptr_ptr = NULL; + } + + if (png_ptr != NULL) + { +#ifdef PNG_USER_MEM_SUPPORTED + png_destroy_struct_2((png_voidp)png_ptr, (png_free_ptr)free_fn, + (png_voidp)mem_ptr); +#else + png_destroy_struct((png_voidp)png_ptr); +#endif + *png_ptr_ptr = NULL; + } +} + +/* free all memory used by the read (old method) */ +void /* PRIVATE */ +png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr) +{ +#ifdef PNG_SETJMP_SUPPORTED + jmp_buf tmp_jmp; +#endif + png_error_ptr error_fn; + png_error_ptr warning_fn; + png_voidp error_ptr; +#ifdef PNG_USER_MEM_SUPPORTED + png_free_ptr free_fn; +#endif + + png_debug(1, "in png_read_destroy\n"); + if (info_ptr != NULL) + png_info_destroy(png_ptr, info_ptr); + + if (end_info_ptr != NULL) + png_info_destroy(png_ptr, end_info_ptr); + + png_free(png_ptr, png_ptr->zbuf); + png_free(png_ptr, png_ptr->big_row_buf); + png_free(png_ptr, png_ptr->prev_row); +#if defined(PNG_READ_DITHER_SUPPORTED) + png_free(png_ptr, png_ptr->palette_lookup); + png_free(png_ptr, png_ptr->dither_index); +#endif +#if defined(PNG_READ_GAMMA_SUPPORTED) + png_free(png_ptr, png_ptr->gamma_table); +#endif +#if defined(PNG_READ_BACKGROUND_SUPPORTED) + png_free(png_ptr, png_ptr->gamma_from_1); + png_free(png_ptr, png_ptr->gamma_to_1); +#endif +#ifdef PNG_FREE_ME_SUPPORTED + if (png_ptr->free_me & PNG_FREE_PLTE) + png_zfree(png_ptr, png_ptr->palette); + png_ptr->free_me &= ~PNG_FREE_PLTE; +#else + if (png_ptr->flags & PNG_FLAG_FREE_PLTE) + png_zfree(png_ptr, png_ptr->palette); + png_ptr->flags &= ~PNG_FLAG_FREE_PLTE; +#endif +#if defined(PNG_tRNS_SUPPORTED) || \ + defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) +#ifdef PNG_FREE_ME_SUPPORTED + if (png_ptr->free_me & PNG_FREE_TRNS) + png_free(png_ptr, png_ptr->trans); + png_ptr->free_me &= ~PNG_FREE_TRNS; +#else + if (png_ptr->flags & PNG_FLAG_FREE_TRNS) + png_free(png_ptr, png_ptr->trans); + png_ptr->flags &= ~PNG_FLAG_FREE_TRNS; +#endif +#endif +#if defined(PNG_READ_hIST_SUPPORTED) +#ifdef PNG_FREE_ME_SUPPORTED + if (png_ptr->free_me & PNG_FREE_HIST) + png_free(png_ptr, png_ptr->hist); + png_ptr->free_me &= ~PNG_FREE_HIST; +#else + if (png_ptr->flags & PNG_FLAG_FREE_HIST) + png_free(png_ptr, png_ptr->hist); + png_ptr->flags &= ~PNG_FLAG_FREE_HIST; +#endif +#endif +#if defined(PNG_READ_GAMMA_SUPPORTED) + if (png_ptr->gamma_16_table != NULL) + { + int i; + int istop = (1 << (8 - png_ptr->gamma_shift)); + for (i = 0; i < istop; i++) + { + png_free(png_ptr, png_ptr->gamma_16_table[i]); + } + png_free(png_ptr, png_ptr->gamma_16_table); + } +#if defined(PNG_READ_BACKGROUND_SUPPORTED) + if (png_ptr->gamma_16_from_1 != NULL) + { + int i; + int istop = (1 << (8 - png_ptr->gamma_shift)); + for (i = 0; i < istop; i++) + { + png_free(png_ptr, png_ptr->gamma_16_from_1[i]); + } + png_free(png_ptr, png_ptr->gamma_16_from_1); + } + if (png_ptr->gamma_16_to_1 != NULL) + { + int i; + int istop = (1 << (8 - png_ptr->gamma_shift)); + for (i = 0; i < istop; i++) + { + png_free(png_ptr, png_ptr->gamma_16_to_1[i]); + } + png_free(png_ptr, png_ptr->gamma_16_to_1); + } +#endif +#endif +#if defined(PNG_TIME_RFC1123_SUPPORTED) + png_free(png_ptr, png_ptr->time_buffer); +#endif + + inflateEnd(&png_ptr->zstream); +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED + png_free(png_ptr, png_ptr->save_buffer); +#endif + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +#ifdef PNG_TEXT_SUPPORTED + png_free(png_ptr, png_ptr->current_text); +#endif /* PNG_TEXT_SUPPORTED */ +#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ + + /* Save the important info out of the png_struct, in case it is + * being used again. + */ +#ifdef PNG_SETJMP_SUPPORTED + png_memcpy(tmp_jmp, png_ptr->jmpbuf, sizeof (jmp_buf)); +#endif + + error_fn = png_ptr->error_fn; + warning_fn = png_ptr->warning_fn; + error_ptr = png_ptr->error_ptr; +#ifdef PNG_USER_MEM_SUPPORTED + free_fn = png_ptr->free_fn; +#endif + + png_memset(png_ptr, 0, sizeof (png_struct)); + + png_ptr->error_fn = error_fn; + png_ptr->warning_fn = warning_fn; + png_ptr->error_ptr = error_ptr; +#ifdef PNG_USER_MEM_SUPPORTED + png_ptr->free_fn = free_fn; +#endif + +#ifdef PNG_SETJMP_SUPPORTED + png_memcpy(png_ptr->jmpbuf, tmp_jmp, sizeof (jmp_buf)); +#endif + +} + +void PNGAPI +png_set_read_status_fn(png_structp png_ptr, png_read_status_ptr read_row_fn) +{ + png_ptr->read_row_fn = read_row_fn; +} + +#if defined(PNG_INFO_IMAGE_SUPPORTED) +void PNGAPI +png_read_png(png_structp png_ptr, png_infop info_ptr, + int transforms, + voidp params) +{ + int row; + +#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) + /* invert the alpha channel from opacity to transparency */ + if (transforms & PNG_TRANSFORM_INVERT_ALPHA) + png_set_invert_alpha(png_ptr); +#endif + + /* The call to png_read_info() gives us all of the information from the + * PNG file before the first IDAT (image data chunk). + */ + png_read_info(png_ptr, info_ptr); + + /* -------------- image transformations start here ------------------- */ + +#if defined(PNG_READ_16_TO_8_SUPPORTED) + /* tell libpng to strip 16 bit/color files down to 8 bits/color */ + if (transforms & PNG_TRANSFORM_STRIP_16) + png_set_strip_16(png_ptr); +#endif + +#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) + /* Strip alpha bytes from the input data without combining with the + * background (not recommended). + */ + if (transforms & PNG_TRANSFORM_STRIP_ALPHA) + png_set_strip_alpha(png_ptr); +#endif + +#if defined(PNG_READ_PACK_SUPPORTED) && !defined(PNG_READ_EXPAND_SUPPORTED) + /* Extract multiple pixels with bit depths of 1, 2, and 4 from a single + * byte into separate bytes (useful for paletted and grayscale images). + */ + if (transforms & PNG_TRANSFORM_PACKING) + png_set_packing(png_ptr); +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + /* Change the order of packed pixels to least significant bit first + * (not useful if you are using png_set_packing). */ + if (transforms & PNG_TRANSFORM_PACKSWAP) + png_set_packswap(png_ptr); +#endif + +#if defined(PNG_READ_EXPAND_SUPPORTED) + /* Expand paletted colors into true RGB triplets + * Expand grayscale images to full 8 bits from 1, 2, or 4 bits/pixel + * Expand paletted or RGB images with transparency to full alpha + * channels so the data will be available as RGBA quartets. + */ + if (transforms & PNG_TRANSFORM_EXPAND) + if ((png_ptr->bit_depth < 8) || + (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) || + (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))) + png_set_expand(png_ptr); +#endif + + /* We don't handle background color or gamma transformation or dithering. */ + +#if defined(PNG_READ_INVERT_SUPPORTED) + /* invert monochrome files to have 0 as white and 1 as black */ + if (transforms & PNG_TRANSFORM_INVERT_MONO) + png_set_invert_mono(png_ptr); +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) + /* If you want to shift the pixel values from the range [0,255] or + * [0,65535] to the original [0,7] or [0,31], or whatever range the + * colors were originally in: + */ + if ((transforms & PNG_TRANSFORM_SHIFT) + && png_get_valid(png_ptr, info_ptr, PNG_INFO_sBIT)) + { + png_color_8p sig_bit; + + png_get_sBIT(png_ptr, info_ptr, &sig_bit); + png_set_shift(png_ptr, sig_bit); + } +#endif + +#if defined(PNG_READ_BGR_SUPPORTED) + /* flip the RGB pixels to BGR (or RGBA to BGRA) */ + if (transforms & PNG_TRANSFORM_BGR) + png_set_bgr(png_ptr); +#endif + +#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) + /* swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */ + if (transforms & PNG_TRANSFORM_SWAP_ALPHA) + png_set_swap_alpha(png_ptr); +#endif + +#if defined(PNG_READ_SWAP_SUPPORTED) + /* swap bytes of 16 bit files to least significant byte first */ + if (transforms & PNG_TRANSFORM_SWAP_ENDIAN) + png_set_swap(png_ptr); +#endif + + /* We don't handle adding filler bytes */ + + /* Optional call to gamma correct and add the background to the palette + * and update info structure. REQUIRED if you are expecting libpng to + * update the palette for you (i.e., you selected such a transform above). + */ + png_read_update_info(png_ptr, info_ptr); + + /* -------------- image transformations end here ------------------- */ + +#ifdef PNG_FREE_ME_SUPPORTED + png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0); +#endif + if(info_ptr->row_pointers == NULL) + { + info_ptr->row_pointers = (png_bytepp)png_malloc(png_ptr, + info_ptr->height * sizeof(png_bytep)); +#ifdef PNG_FREE_ME_SUPPORTED + info_ptr->free_me |= PNG_FREE_ROWS; +#endif + for (row = 0; row < (int)info_ptr->height; row++) + { + info_ptr->row_pointers[row] = (png_bytep)png_malloc(png_ptr, + png_get_rowbytes(png_ptr, info_ptr)); + } + } + + png_read_image(png_ptr, info_ptr->row_pointers); + info_ptr->valid |= PNG_INFO_IDAT; + + /* read rest of file, and get additional chunks in info_ptr - REQUIRED */ + png_read_end(png_ptr, info_ptr); + + if(transforms == 0 || params == NULL) + /* quiet compiler warnings */ return; + +} +#endif diff --git a/gtkmm-osx/libpng-1.2.5/pngrio.c b/gtkmm-osx/libpng-1.2.5/pngrio.c new file mode 100644 index 0000000..c33b1cd --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/pngrio.c @@ -0,0 +1,161 @@ + +/* pngrio.c - functions for data input + * + * libpng 1.2.5 - October 3, 2002 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2002 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This file provides a location for all input. Users who need + * special handling are expected to write a function that has the same + * arguments as this and performs a similar function, but that possibly + * has a different input method. Note that you shouldn't change this + * function, but rather write a replacement function and then make + * libpng use it at run time with png_set_read_fn(...). + */ + +#define PNG_INTERNAL +#include "png.h" + +/* Read the data from whatever input you are using. The default routine + reads from a file pointer. Note that this routine sometimes gets called + with very small lengths, so you should implement some kind of simple + buffering if you are using unbuffered reads. This should never be asked + to read more then 64K on a 16 bit machine. */ +void /* PRIVATE */ +png_read_data(png_structp png_ptr, png_bytep data, png_size_t length) +{ + png_debug1(4,"reading %d bytes\n", (int)length); + if (png_ptr->read_data_fn != NULL) + (*(png_ptr->read_data_fn))(png_ptr, data, length); + else + png_error(png_ptr, "Call to NULL read function"); +} + +#if !defined(PNG_NO_STDIO) +/* This is the function that does the actual reading of data. If you are + not reading from a standard C stream, you should create a replacement + read_data function and use it at run time with png_set_read_fn(), rather + than changing the library. */ +#ifndef USE_FAR_KEYWORD +void PNGAPI +png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) +{ + png_size_t check; + + /* fread() returns 0 on error, so it is OK to store this in a png_size_t + * instead of an int, which is what fread() actually returns. + */ +#if defined(_WIN32_WCE) + if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) ) + check = 0; +#else + check = (png_size_t)fread(data, (png_size_t)1, length, + (png_FILE_p)png_ptr->io_ptr); +#endif + + if (check != length) + png_error(png_ptr, "Read Error"); +} +#else +/* this is the model-independent version. Since the standard I/O library + can't handle far buffers in the medium and small models, we have to copy + the data. +*/ + +#define NEAR_BUF_SIZE 1024 +#define MIN(a,b) (a <= b ? a : b) + +static void /* PRIVATE */ +png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) +{ + int check; + png_byte *n_data; + png_FILE_p io_ptr; + + /* Check if data really is near. If so, use usual code. */ + n_data = (png_byte *)CVT_PTR_NOCHECK(data); + io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); + if ((png_bytep)n_data == data) + { +#if defined(_WIN32_WCE) + if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) ) + check = 0; +#else + check = fread(n_data, 1, length, io_ptr); +#endif + } + else + { + png_byte buf[NEAR_BUF_SIZE]; + png_size_t read, remaining, err; + check = 0; + remaining = length; + do + { + read = MIN(NEAR_BUF_SIZE, remaining); +#if defined(_WIN32_WCE) + if ( !ReadFile((HANDLE)(io_ptr), buf, read, &err, NULL) ) + err = 0; +#else + err = fread(buf, (png_size_t)1, read, io_ptr); +#endif + png_memcpy(data, buf, read); /* copy far buffer to near buffer */ + if(err != read) + break; + else + check += err; + data += read; + remaining -= read; + } + while (remaining != 0); + } + if ((png_uint_32)check != (png_uint_32)length) + png_error(png_ptr, "read Error"); +} +#endif +#endif + +/* This function allows the application to supply a new input function + for libpng if standard C streams aren't being used. + + This function takes as its arguments: + png_ptr - pointer to a png input data structure + io_ptr - pointer to user supplied structure containing info about + the input functions. May be NULL. + read_data_fn - pointer to a new input function that takes as its + arguments a pointer to a png_struct, a pointer to + a location where input data can be stored, and a 32-bit + unsigned int that is the number of bytes to be read. + To exit and output any fatal error messages the new write + function should call png_error(png_ptr, "Error msg"). */ +void PNGAPI +png_set_read_fn(png_structp png_ptr, png_voidp io_ptr, + png_rw_ptr read_data_fn) +{ + png_ptr->io_ptr = io_ptr; + +#if !defined(PNG_NO_STDIO) + if (read_data_fn != NULL) + png_ptr->read_data_fn = read_data_fn; + else + png_ptr->read_data_fn = png_default_read_data; +#else + png_ptr->read_data_fn = read_data_fn; +#endif + + /* It is an error to write to a read device */ + if (png_ptr->write_data_fn != NULL) + { + png_ptr->write_data_fn = NULL; + png_warning(png_ptr, + "It's an error to set both read_data_fn and write_data_fn in the "); + png_warning(png_ptr, + "same structure. Resetting write_data_fn to NULL."); + } + +#if defined(PNG_WRITE_FLUSH_SUPPORTED) + png_ptr->output_flush_fn = NULL; +#endif +} diff --git a/gtkmm-osx/libpng-1.2.5/pngrtran.c b/gtkmm-osx/libpng-1.2.5/pngrtran.c new file mode 100644 index 0000000..3de9120 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/pngrtran.c @@ -0,0 +1,4175 @@ + +/* pngrtran.c - transforms the data in a row for PNG readers + * + * libpng 1.2.5 - October 3, 2002 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2002 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This file contains functions optionally called by an application + * in order to tell libpng how to handle data when reading a PNG. + * Transformations that are used in both reading and writing are + * in pngtrans.c. + */ + +#define PNG_INTERNAL +#include "png.h" + +/* Set the action on getting a CRC error for an ancillary or critical chunk. */ +void PNGAPI +png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action) +{ + png_debug(1, "in png_set_crc_action\n"); + /* Tell libpng how we react to CRC errors in critical chunks */ + switch (crit_action) + { + case PNG_CRC_NO_CHANGE: /* leave setting as is */ + break; + case PNG_CRC_WARN_USE: /* warn/use data */ + png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; + png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE; + break; + case PNG_CRC_QUIET_USE: /* quiet/use data */ + png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; + png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE | + PNG_FLAG_CRC_CRITICAL_IGNORE; + break; + case PNG_CRC_WARN_DISCARD: /* not a valid action for critical data */ + png_warning(png_ptr, "Can't discard critical data on CRC error."); + case PNG_CRC_ERROR_QUIT: /* error/quit */ + case PNG_CRC_DEFAULT: + default: + png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; + break; + } + + switch (ancil_action) + { + case PNG_CRC_NO_CHANGE: /* leave setting as is */ + break; + case PNG_CRC_WARN_USE: /* warn/use data */ + png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; + png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_USE; + break; + case PNG_CRC_QUIET_USE: /* quiet/use data */ + png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; + png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_USE | + PNG_FLAG_CRC_ANCILLARY_NOWARN; + break; + case PNG_CRC_ERROR_QUIT: /* error/quit */ + png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; + png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_NOWARN; + break; + case PNG_CRC_WARN_DISCARD: /* warn/discard data */ + case PNG_CRC_DEFAULT: + default: + png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; + break; + } +} + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \ + defined(PNG_FLOATING_POINT_SUPPORTED) +/* handle alpha and tRNS via a background color */ +void PNGAPI +png_set_background(png_structp png_ptr, + png_color_16p background_color, int background_gamma_code, + int need_expand, double background_gamma) +{ + png_debug(1, "in png_set_background\n"); + if (background_gamma_code == PNG_BACKGROUND_GAMMA_UNKNOWN) + { + png_warning(png_ptr, "Application must supply a known background gamma"); + return; + } + + png_ptr->transformations |= PNG_BACKGROUND; + png_memcpy(&(png_ptr->background), background_color, sizeof(png_color_16)); + png_ptr->background_gamma = (float)background_gamma; + png_ptr->background_gamma_type = (png_byte)(background_gamma_code); + png_ptr->transformations |= (need_expand ? PNG_BACKGROUND_EXPAND : 0); + + /* Note: if need_expand is set and color_type is either RGB or RGB_ALPHA + * (in which case need_expand is superfluous anyway), the background color + * might actually be gray yet not be flagged as such. This is not a problem + * for the current code, which uses PNG_BACKGROUND_IS_GRAY only to + * decide when to do the png_do_gray_to_rgb() transformation. + */ + if ((need_expand && !(png_ptr->color_type & PNG_COLOR_MASK_COLOR)) || + (!need_expand && background_color->red == background_color->green && + background_color->red == background_color->blue)) + png_ptr->mode |= PNG_BACKGROUND_IS_GRAY; +} +#endif + +#if defined(PNG_READ_16_TO_8_SUPPORTED) +/* strip 16 bit depth files to 8 bit depth */ +void PNGAPI +png_set_strip_16(png_structp png_ptr) +{ + png_debug(1, "in png_set_strip_16\n"); + png_ptr->transformations |= PNG_16_TO_8; +} +#endif + +#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) +void PNGAPI +png_set_strip_alpha(png_structp png_ptr) +{ + png_debug(1, "in png_set_strip_alpha\n"); + png_ptr->transformations |= PNG_STRIP_ALPHA; +} +#endif + +#if defined(PNG_READ_DITHER_SUPPORTED) +/* Dither file to 8 bit. Supply a palette, the current number + * of elements in the palette, the maximum number of elements + * allowed, and a histogram if possible. If the current number + * of colors is greater then the maximum number, the palette will be + * modified to fit in the maximum number. "full_dither" indicates + * whether we need a dithering cube set up for RGB images, or if we + * simply are reducing the number of colors in a paletted image. + */ + +typedef struct png_dsort_struct +{ + struct png_dsort_struct FAR * next; + png_byte left; + png_byte right; +} png_dsort; +typedef png_dsort FAR * png_dsortp; +typedef png_dsort FAR * FAR * png_dsortpp; + +void PNGAPI +png_set_dither(png_structp png_ptr, png_colorp palette, + int num_palette, int maximum_colors, png_uint_16p histogram, + int full_dither) +{ + png_debug(1, "in png_set_dither\n"); + png_ptr->transformations |= PNG_DITHER; + + if (!full_dither) + { + int i; + + png_ptr->dither_index = (png_bytep)png_malloc(png_ptr, + (png_uint_32)(num_palette * sizeof (png_byte))); + for (i = 0; i < num_palette; i++) + png_ptr->dither_index[i] = (png_byte)i; + } + + if (num_palette > maximum_colors) + { + if (histogram != NULL) + { + /* This is easy enough, just throw out the least used colors. + Perhaps not the best solution, but good enough. */ + + int i; + + /* initialize an array to sort colors */ + png_ptr->dither_sort = (png_bytep)png_malloc(png_ptr, + (png_uint_32)(num_palette * sizeof (png_byte))); + + /* initialize the dither_sort array */ + for (i = 0; i < num_palette; i++) + png_ptr->dither_sort[i] = (png_byte)i; + + /* Find the least used palette entries by starting a + bubble sort, and running it until we have sorted + out enough colors. Note that we don't care about + sorting all the colors, just finding which are + least used. */ + + for (i = num_palette - 1; i >= maximum_colors; i--) + { + int done; /* to stop early if the list is pre-sorted */ + int j; + + done = 1; + for (j = 0; j < i; j++) + { + if (histogram[png_ptr->dither_sort[j]] + < histogram[png_ptr->dither_sort[j + 1]]) + { + png_byte t; + + t = png_ptr->dither_sort[j]; + png_ptr->dither_sort[j] = png_ptr->dither_sort[j + 1]; + png_ptr->dither_sort[j + 1] = t; + done = 0; + } + } + if (done) + break; + } + + /* swap the palette around, and set up a table, if necessary */ + if (full_dither) + { + int j = num_palette; + + /* put all the useful colors within the max, but don't + move the others */ + for (i = 0; i < maximum_colors; i++) + { + if ((int)png_ptr->dither_sort[i] >= maximum_colors) + { + do + j--; + while ((int)png_ptr->dither_sort[j] >= maximum_colors); + palette[i] = palette[j]; + } + } + } + else + { + int j = num_palette; + + /* move all the used colors inside the max limit, and + develop a translation table */ + for (i = 0; i < maximum_colors; i++) + { + /* only move the colors we need to */ + if ((int)png_ptr->dither_sort[i] >= maximum_colors) + { + png_color tmp_color; + + do + j--; + while ((int)png_ptr->dither_sort[j] >= maximum_colors); + + tmp_color = palette[j]; + palette[j] = palette[i]; + palette[i] = tmp_color; + /* indicate where the color went */ + png_ptr->dither_index[j] = (png_byte)i; + png_ptr->dither_index[i] = (png_byte)j; + } + } + + /* find closest color for those colors we are not using */ + for (i = 0; i < num_palette; i++) + { + if ((int)png_ptr->dither_index[i] >= maximum_colors) + { + int min_d, k, min_k, d_index; + + /* find the closest color to one we threw out */ + d_index = png_ptr->dither_index[i]; + min_d = PNG_COLOR_DIST(palette[d_index], palette[0]); + for (k = 1, min_k = 0; k < maximum_colors; k++) + { + int d; + + d = PNG_COLOR_DIST(palette[d_index], palette[k]); + + if (d < min_d) + { + min_d = d; + min_k = k; + } + } + /* point to closest color */ + png_ptr->dither_index[i] = (png_byte)min_k; + } + } + } + png_free(png_ptr, png_ptr->dither_sort); + png_ptr->dither_sort=NULL; + } + else + { + /* This is much harder to do simply (and quickly). Perhaps + we need to go through a median cut routine, but those + don't always behave themselves with only a few colors + as input. So we will just find the closest two colors, + and throw out one of them (chosen somewhat randomly). + [We don't understand this at all, so if someone wants to + work on improving it, be our guest - AED, GRP] + */ + int i; + int max_d; + int num_new_palette; + png_dsortp t; + png_dsortpp hash; + + t=NULL; + + /* initialize palette index arrays */ + png_ptr->index_to_palette = (png_bytep)png_malloc(png_ptr, + (png_uint_32)(num_palette * sizeof (png_byte))); + png_ptr->palette_to_index = (png_bytep)png_malloc(png_ptr, + (png_uint_32)(num_palette * sizeof (png_byte))); + + /* initialize the sort array */ + for (i = 0; i < num_palette; i++) + { + png_ptr->index_to_palette[i] = (png_byte)i; + png_ptr->palette_to_index[i] = (png_byte)i; + } + + hash = (png_dsortpp)png_malloc(png_ptr, (png_uint_32)(769 * + sizeof (png_dsortp))); + for (i = 0; i < 769; i++) + hash[i] = NULL; +/* png_memset(hash, 0, 769 * sizeof (png_dsortp)); */ + + num_new_palette = num_palette; + + /* initial wild guess at how far apart the farthest pixel + pair we will be eliminating will be. Larger + numbers mean more areas will be allocated, Smaller + numbers run the risk of not saving enough data, and + having to do this all over again. + + I have not done extensive checking on this number. + */ + max_d = 96; + + while (num_new_palette > maximum_colors) + { + for (i = 0; i < num_new_palette - 1; i++) + { + int j; + + for (j = i + 1; j < num_new_palette; j++) + { + int d; + + d = PNG_COLOR_DIST(palette[i], palette[j]); + + if (d <= max_d) + { + + t = (png_dsortp)png_malloc_warn(png_ptr, + (png_uint_32)(sizeof(png_dsort))); + if (t == NULL) + break; + t->next = hash[d]; + t->left = (png_byte)i; + t->right = (png_byte)j; + hash[d] = t; + } + } + if (t == NULL) + break; + } + + if (t != NULL) + for (i = 0; i <= max_d; i++) + { + if (hash[i] != NULL) + { + png_dsortp p; + + for (p = hash[i]; p; p = p->next) + { + if ((int)png_ptr->index_to_palette[p->left] + < num_new_palette && + (int)png_ptr->index_to_palette[p->right] + < num_new_palette) + { + int j, next_j; + + if (num_new_palette & 0x01) + { + j = p->left; + next_j = p->right; + } + else + { + j = p->right; + next_j = p->left; + } + + num_new_palette--; + palette[png_ptr->index_to_palette[j]] + = palette[num_new_palette]; + if (!full_dither) + { + int k; + + for (k = 0; k < num_palette; k++) + { + if (png_ptr->dither_index[k] == + png_ptr->index_to_palette[j]) + png_ptr->dither_index[k] = + png_ptr->index_to_palette[next_j]; + if ((int)png_ptr->dither_index[k] == + num_new_palette) + png_ptr->dither_index[k] = + png_ptr->index_to_palette[j]; + } + } + + png_ptr->index_to_palette[png_ptr->palette_to_index + [num_new_palette]] = png_ptr->index_to_palette[j]; + png_ptr->palette_to_index[png_ptr->index_to_palette[j]] + = png_ptr->palette_to_index[num_new_palette]; + + png_ptr->index_to_palette[j] = (png_byte)num_new_palette; + png_ptr->palette_to_index[num_new_palette] = (png_byte)j; + } + if (num_new_palette <= maximum_colors) + break; + } + if (num_new_palette <= maximum_colors) + break; + } + } + + for (i = 0; i < 769; i++) + { + if (hash[i] != NULL) + { + png_dsortp p = hash[i]; + while (p) + { + t = p->next; + png_free(png_ptr, p); + p = t; + } + } + hash[i] = 0; + } + max_d += 96; + } + png_free(png_ptr, hash); + png_free(png_ptr, png_ptr->palette_to_index); + png_free(png_ptr, png_ptr->index_to_palette); + png_ptr->palette_to_index=NULL; + png_ptr->index_to_palette=NULL; + } + num_palette = maximum_colors; + } + if (png_ptr->palette == NULL) + { + png_ptr->palette = palette; + } + png_ptr->num_palette = (png_uint_16)num_palette; + + if (full_dither) + { + int i; + png_bytep distance; + int total_bits = PNG_DITHER_RED_BITS + PNG_DITHER_GREEN_BITS + + PNG_DITHER_BLUE_BITS; + int num_red = (1 << PNG_DITHER_RED_BITS); + int num_green = (1 << PNG_DITHER_GREEN_BITS); + int num_blue = (1 << PNG_DITHER_BLUE_BITS); + png_size_t num_entries = ((png_size_t)1 << total_bits); + + png_ptr->palette_lookup = (png_bytep )png_malloc(png_ptr, + (png_uint_32)(num_entries * sizeof (png_byte))); + + png_memset(png_ptr->palette_lookup, 0, num_entries * sizeof (png_byte)); + + distance = (png_bytep)png_malloc(png_ptr, (png_uint_32)(num_entries * + sizeof(png_byte))); + + png_memset(distance, 0xff, num_entries * sizeof(png_byte)); + + for (i = 0; i < num_palette; i++) + { + int ir, ig, ib; + int r = (palette[i].red >> (8 - PNG_DITHER_RED_BITS)); + int g = (palette[i].green >> (8 - PNG_DITHER_GREEN_BITS)); + int b = (palette[i].blue >> (8 - PNG_DITHER_BLUE_BITS)); + + for (ir = 0; ir < num_red; ir++) + { + int dr = abs(ir - r); + int index_r = (ir << (PNG_DITHER_BLUE_BITS + PNG_DITHER_GREEN_BITS)); + + for (ig = 0; ig < num_green; ig++) + { + int dg = abs(ig - g); + int dt = dr + dg; + int dm = ((dr > dg) ? dr : dg); + int index_g = index_r | (ig << PNG_DITHER_BLUE_BITS); + + for (ib = 0; ib < num_blue; ib++) + { + int d_index = index_g | ib; + int db = abs(ib - b); + int dmax = ((dm > db) ? dm : db); + int d = dmax + dt + db; + + if (d < (int)distance[d_index]) + { + distance[d_index] = (png_byte)d; + png_ptr->palette_lookup[d_index] = (png_byte)i; + } + } + } + } + } + + png_free(png_ptr, distance); + } +} +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED) +/* Transform the image from the file_gamma to the screen_gamma. We + * only do transformations on images where the file_gamma and screen_gamma + * are not close reciprocals, otherwise it slows things down slightly, and + * also needlessly introduces small errors. + * + * We will turn off gamma transformation later if no semitransparent entries + * are present in the tRNS array for palette images. We can't do it here + * because we don't necessarily have the tRNS chunk yet. + */ +void PNGAPI +png_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma) +{ + png_debug(1, "in png_set_gamma\n"); + if ((fabs(scrn_gamma * file_gamma - 1.0) > PNG_GAMMA_THRESHOLD) || + (png_ptr->color_type & PNG_COLOR_MASK_ALPHA) || + (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)) + png_ptr->transformations |= PNG_GAMMA; + png_ptr->gamma = (float)file_gamma; + png_ptr->screen_gamma = (float)scrn_gamma; +} +#endif + +#if defined(PNG_READ_EXPAND_SUPPORTED) +/* Expand paletted images to RGB, expand grayscale images of + * less than 8-bit depth to 8-bit depth, and expand tRNS chunks + * to alpha channels. + */ +void PNGAPI +png_set_expand(png_structp png_ptr) +{ + png_debug(1, "in png_set_expand\n"); + png_ptr->transformations |= PNG_EXPAND; +} + +/* GRR 19990627: the following three functions currently are identical + * to png_set_expand(). However, it is entirely reasonable that someone + * might wish to expand an indexed image to RGB but *not* expand a single, + * fully transparent palette entry to a full alpha channel--perhaps instead + * convert tRNS to the grayscale/RGB format (16-bit RGB value), or replace + * the transparent color with a particular RGB value, or drop tRNS entirely. + * IOW, a future version of the library may make the transformations flag + * a bit more fine-grained, with separate bits for each of these three + * functions. + * + * More to the point, these functions make it obvious what libpng will be + * doing, whereas "expand" can (and does) mean any number of things. + */ + +/* Expand paletted images to RGB. */ +void PNGAPI +png_set_palette_to_rgb(png_structp png_ptr) +{ + png_debug(1, "in png_set_expand\n"); + png_ptr->transformations |= PNG_EXPAND; +} + +/* Expand grayscale images of less than 8-bit depth to 8 bits. */ +void PNGAPI +png_set_gray_1_2_4_to_8(png_structp png_ptr) +{ + png_debug(1, "in png_set_expand\n"); + png_ptr->transformations |= PNG_EXPAND; +} + +/* Expand tRNS chunks to alpha channels. */ +void PNGAPI +png_set_tRNS_to_alpha(png_structp png_ptr) +{ + png_debug(1, "in png_set_expand\n"); + png_ptr->transformations |= PNG_EXPAND; +} +#endif /* defined(PNG_READ_EXPAND_SUPPORTED) */ + +#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) +void PNGAPI +png_set_gray_to_rgb(png_structp png_ptr) +{ + png_debug(1, "in png_set_gray_to_rgb\n"); + png_ptr->transformations |= PNG_GRAY_TO_RGB; +} +#endif + +#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) +#if defined(PNG_FLOATING_POINT_SUPPORTED) +/* Convert a RGB image to a grayscale of the same width. This allows us, + * for example, to convert a 24 bpp RGB image into an 8 bpp grayscale image. + */ + +void PNGAPI +png_set_rgb_to_gray(png_structp png_ptr, int error_action, double red, + double green) +{ + int red_fixed = (int)((float)red*100000.0 + 0.5); + int green_fixed = (int)((float)green*100000.0 + 0.5); + png_set_rgb_to_gray_fixed(png_ptr, error_action, red_fixed, green_fixed); +} +#endif + +void PNGAPI +png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action, + png_fixed_point red, png_fixed_point green) +{ + png_debug(1, "in png_set_rgb_to_gray\n"); + switch(error_action) + { + case 1: png_ptr->transformations |= PNG_RGB_TO_GRAY; + break; + case 2: png_ptr->transformations |= PNG_RGB_TO_GRAY_WARN; + break; + case 3: png_ptr->transformations |= PNG_RGB_TO_GRAY_ERR; + } + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) +#if defined(PNG_READ_EXPAND_SUPPORTED) + png_ptr->transformations |= PNG_EXPAND; +#else + { + png_warning(png_ptr, "Cannot do RGB_TO_GRAY without EXPAND_SUPPORTED."); + png_ptr->transformations &= ~PNG_RGB_TO_GRAY; + } +#endif + { + png_uint_16 red_int, green_int; + if(red < 0 || green < 0) + { + red_int = 6968; /* .212671 * 32768 + .5 */ + green_int = 23434; /* .715160 * 32768 + .5 */ + } + else if(red + green < 100000L) + { + red_int = (png_uint_16)(((png_uint_32)red*32768L)/100000L); + green_int = (png_uint_16)(((png_uint_32)green*32768L)/100000L); + } + else + { + png_warning(png_ptr, "ignoring out of range rgb_to_gray coefficients"); + red_int = 6968; + green_int = 23434; + } + png_ptr->rgb_to_gray_red_coeff = red_int; + png_ptr->rgb_to_gray_green_coeff = green_int; + png_ptr->rgb_to_gray_blue_coeff = (png_uint_16)(32768-red_int-green_int); + } +} +#endif + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_LEGACY_SUPPORTED) +void PNGAPI +png_set_read_user_transform_fn(png_structp png_ptr, png_user_transform_ptr + read_user_transform_fn) +{ + png_debug(1, "in png_set_read_user_transform_fn\n"); +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) + png_ptr->transformations |= PNG_USER_TRANSFORM; + png_ptr->read_user_transform_fn = read_user_transform_fn; +#endif +#ifdef PNG_LEGACY_SUPPORTED + if(read_user_transform_fn) + png_warning(png_ptr, + "This version of libpng does not support user transforms"); +#endif +} +#endif + +/* Initialize everything needed for the read. This includes modifying + * the palette. + */ +void /* PRIVATE */ +png_init_read_transformations(png_structp png_ptr) +{ + png_debug(1, "in png_init_read_transformations\n"); +#if defined(PNG_USELESS_TESTS_SUPPORTED) + if(png_ptr != NULL) +#endif + { +#if defined(PNG_READ_BACKGROUND_SUPPORTED) || defined(PNG_READ_SHIFT_SUPPORTED) \ + || defined(PNG_READ_GAMMA_SUPPORTED) + int color_type = png_ptr->color_type; +#endif + +#if defined(PNG_READ_EXPAND_SUPPORTED) && defined(PNG_READ_BACKGROUND_SUPPORTED) + if ((png_ptr->transformations & PNG_BACKGROUND_EXPAND) && + (png_ptr->transformations & PNG_EXPAND)) + { + if (!(color_type & PNG_COLOR_MASK_COLOR)) /* i.e., GRAY or GRAY_ALPHA */ + { + /* expand background chunk. */ + switch (png_ptr->bit_depth) + { + case 1: + png_ptr->background.gray *= (png_uint_16)0xff; + png_ptr->background.red = png_ptr->background.green + = png_ptr->background.blue = png_ptr->background.gray; + break; + case 2: + png_ptr->background.gray *= (png_uint_16)0x55; + png_ptr->background.red = png_ptr->background.green + = png_ptr->background.blue = png_ptr->background.gray; + break; + case 4: + png_ptr->background.gray *= (png_uint_16)0x11; + png_ptr->background.red = png_ptr->background.green + = png_ptr->background.blue = png_ptr->background.gray; + break; + case 8: + case 16: + png_ptr->background.red = png_ptr->background.green + = png_ptr->background.blue = png_ptr->background.gray; + break; + } + } + else if (color_type == PNG_COLOR_TYPE_PALETTE) + { + png_ptr->background.red = + png_ptr->palette[png_ptr->background.index].red; + png_ptr->background.green = + png_ptr->palette[png_ptr->background.index].green; + png_ptr->background.blue = + png_ptr->palette[png_ptr->background.index].blue; + +#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) + if (png_ptr->transformations & PNG_INVERT_ALPHA) + { +#if defined(PNG_READ_EXPAND_SUPPORTED) + if (!(png_ptr->transformations & PNG_EXPAND)) +#endif + { + /* invert the alpha channel (in tRNS) unless the pixels are + going to be expanded, in which case leave it for later */ + int i,istop; + istop=(int)png_ptr->num_trans; + for (i=0; itrans[i] = (png_byte)(255 - png_ptr->trans[i]); + } + } +#endif + + } + } +#endif + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED) + png_ptr->background_1 = png_ptr->background; +#endif +#if defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED) + + if ((color_type == PNG_COLOR_TYPE_PALETTE && png_ptr->num_trans != 0) + && (fabs(png_ptr->screen_gamma * png_ptr->gamma - 1.0) + < PNG_GAMMA_THRESHOLD)) + { + int i,k; + k=0; + for (i=0; inum_trans; i++) + { + if (png_ptr->trans[i] != 0 && png_ptr->trans[i] != 0xff) + k=1; /* partial transparency is present */ + } + if (k == 0) + png_ptr->transformations &= (~PNG_GAMMA); + } + + if (png_ptr->transformations & (PNG_GAMMA | PNG_RGB_TO_GRAY)) + { + png_build_gamma_table(png_ptr); +#if defined(PNG_READ_BACKGROUND_SUPPORTED) + if (png_ptr->transformations & PNG_BACKGROUND) + { + if (color_type == PNG_COLOR_TYPE_PALETTE) + { + /* could skip if no transparency and + */ + png_color back, back_1; + png_colorp palette = png_ptr->palette; + int num_palette = png_ptr->num_palette; + int i; + if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_FILE) + { + back.red = png_ptr->gamma_table[png_ptr->background.red]; + back.green = png_ptr->gamma_table[png_ptr->background.green]; + back.blue = png_ptr->gamma_table[png_ptr->background.blue]; + + back_1.red = png_ptr->gamma_to_1[png_ptr->background.red]; + back_1.green = png_ptr->gamma_to_1[png_ptr->background.green]; + back_1.blue = png_ptr->gamma_to_1[png_ptr->background.blue]; + } + else + { + double g, gs; + + switch (png_ptr->background_gamma_type) + { + case PNG_BACKGROUND_GAMMA_SCREEN: + g = (png_ptr->screen_gamma); + gs = 1.0; + break; + case PNG_BACKGROUND_GAMMA_FILE: + g = 1.0 / (png_ptr->gamma); + gs = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); + break; + case PNG_BACKGROUND_GAMMA_UNIQUE: + g = 1.0 / (png_ptr->background_gamma); + gs = 1.0 / (png_ptr->background_gamma * + png_ptr->screen_gamma); + break; + default: + g = 1.0; /* back_1 */ + gs = 1.0; /* back */ + } + + if ( fabs(gs - 1.0) < PNG_GAMMA_THRESHOLD) + { + back.red = (png_byte)png_ptr->background.red; + back.green = (png_byte)png_ptr->background.green; + back.blue = (png_byte)png_ptr->background.blue; + } + else + { + back.red = (png_byte)(pow( + (double)png_ptr->background.red/255, gs) * 255.0 + .5); + back.green = (png_byte)(pow( + (double)png_ptr->background.green/255, gs) * 255.0 + .5); + back.blue = (png_byte)(pow( + (double)png_ptr->background.blue/255, gs) * 255.0 + .5); + } + + back_1.red = (png_byte)(pow( + (double)png_ptr->background.red/255, g) * 255.0 + .5); + back_1.green = (png_byte)(pow( + (double)png_ptr->background.green/255, g) * 255.0 + .5); + back_1.blue = (png_byte)(pow( + (double)png_ptr->background.blue/255, g) * 255.0 + .5); + } + for (i = 0; i < num_palette; i++) + { + if (i < (int)png_ptr->num_trans && png_ptr->trans[i] != 0xff) + { + if (png_ptr->trans[i] == 0) + { + palette[i] = back; + } + else /* if (png_ptr->trans[i] != 0xff) */ + { + png_byte v, w; + + v = png_ptr->gamma_to_1[palette[i].red]; + png_composite(w, v, png_ptr->trans[i], back_1.red); + palette[i].red = png_ptr->gamma_from_1[w]; + + v = png_ptr->gamma_to_1[palette[i].green]; + png_composite(w, v, png_ptr->trans[i], back_1.green); + palette[i].green = png_ptr->gamma_from_1[w]; + + v = png_ptr->gamma_to_1[palette[i].blue]; + png_composite(w, v, png_ptr->trans[i], back_1.blue); + palette[i].blue = png_ptr->gamma_from_1[w]; + } + } + else + { + palette[i].red = png_ptr->gamma_table[palette[i].red]; + palette[i].green = png_ptr->gamma_table[palette[i].green]; + palette[i].blue = png_ptr->gamma_table[palette[i].blue]; + } + } + } + /* if (png_ptr->background_gamma_type!=PNG_BACKGROUND_GAMMA_UNKNOWN) */ + else + /* color_type != PNG_COLOR_TYPE_PALETTE */ + { + double m = (double)(((png_uint_32)1 << png_ptr->bit_depth) - 1); + double g = 1.0; + double gs = 1.0; + + switch (png_ptr->background_gamma_type) + { + case PNG_BACKGROUND_GAMMA_SCREEN: + g = (png_ptr->screen_gamma); + gs = 1.0; + break; + case PNG_BACKGROUND_GAMMA_FILE: + g = 1.0 / (png_ptr->gamma); + gs = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); + break; + case PNG_BACKGROUND_GAMMA_UNIQUE: + g = 1.0 / (png_ptr->background_gamma); + gs = 1.0 / (png_ptr->background_gamma * + png_ptr->screen_gamma); + break; + } + + png_ptr->background_1.gray = (png_uint_16)(pow( + (double)png_ptr->background.gray / m, g) * m + .5); + png_ptr->background.gray = (png_uint_16)(pow( + (double)png_ptr->background.gray / m, gs) * m + .5); + + if ((png_ptr->background.red != png_ptr->background.green) || + (png_ptr->background.red != png_ptr->background.blue) || + (png_ptr->background.red != png_ptr->background.gray)) + { + /* RGB or RGBA with color background */ + png_ptr->background_1.red = (png_uint_16)(pow( + (double)png_ptr->background.red / m, g) * m + .5); + png_ptr->background_1.green = (png_uint_16)(pow( + (double)png_ptr->background.green / m, g) * m + .5); + png_ptr->background_1.blue = (png_uint_16)(pow( + (double)png_ptr->background.blue / m, g) * m + .5); + png_ptr->background.red = (png_uint_16)(pow( + (double)png_ptr->background.red / m, gs) * m + .5); + png_ptr->background.green = (png_uint_16)(pow( + (double)png_ptr->background.green / m, gs) * m + .5); + png_ptr->background.blue = (png_uint_16)(pow( + (double)png_ptr->background.blue / m, gs) * m + .5); + } + else + { + /* GRAY, GRAY ALPHA, RGB, or RGBA with gray background */ + png_ptr->background_1.red = png_ptr->background_1.green + = png_ptr->background_1.blue = png_ptr->background_1.gray; + png_ptr->background.red = png_ptr->background.green + = png_ptr->background.blue = png_ptr->background.gray; + } + } + } + else + /* transformation does not include PNG_BACKGROUND */ +#endif /* PNG_READ_BACKGROUND_SUPPORTED */ + if (color_type == PNG_COLOR_TYPE_PALETTE) + { + png_colorp palette = png_ptr->palette; + int num_palette = png_ptr->num_palette; + int i; + + for (i = 0; i < num_palette; i++) + { + palette[i].red = png_ptr->gamma_table[palette[i].red]; + palette[i].green = png_ptr->gamma_table[palette[i].green]; + palette[i].blue = png_ptr->gamma_table[palette[i].blue]; + } + } + } +#if defined(PNG_READ_BACKGROUND_SUPPORTED) + else +#endif +#endif /* PNG_READ_GAMMA_SUPPORTED && PNG_FLOATING_POINT_SUPPORTED */ +#if defined(PNG_READ_BACKGROUND_SUPPORTED) + /* No GAMMA transformation */ + if ((png_ptr->transformations & PNG_BACKGROUND) && + (color_type == PNG_COLOR_TYPE_PALETTE)) + { + int i; + int istop = (int)png_ptr->num_trans; + png_color back; + png_colorp palette = png_ptr->palette; + + back.red = (png_byte)png_ptr->background.red; + back.green = (png_byte)png_ptr->background.green; + back.blue = (png_byte)png_ptr->background.blue; + + for (i = 0; i < istop; i++) + { + if (png_ptr->trans[i] == 0) + { + palette[i] = back; + } + else if (png_ptr->trans[i] != 0xff) + { + /* The png_composite() macro is defined in png.h */ + png_composite(palette[i].red, palette[i].red, + png_ptr->trans[i], back.red); + png_composite(palette[i].green, palette[i].green, + png_ptr->trans[i], back.green); + png_composite(palette[i].blue, palette[i].blue, + png_ptr->trans[i], back.blue); + } + } + } +#endif /* PNG_READ_BACKGROUND_SUPPORTED */ + +#if defined(PNG_READ_SHIFT_SUPPORTED) + if ((png_ptr->transformations & PNG_SHIFT) && + (color_type == PNG_COLOR_TYPE_PALETTE)) + { + png_uint_16 i; + png_uint_16 istop = png_ptr->num_palette; + int sr = 8 - png_ptr->sig_bit.red; + int sg = 8 - png_ptr->sig_bit.green; + int sb = 8 - png_ptr->sig_bit.blue; + + if (sr < 0 || sr > 8) + sr = 0; + if (sg < 0 || sg > 8) + sg = 0; + if (sb < 0 || sb > 8) + sb = 0; + for (i = 0; i < istop; i++) + { + png_ptr->palette[i].red >>= sr; + png_ptr->palette[i].green >>= sg; + png_ptr->palette[i].blue >>= sb; + } + } +#endif /* PNG_READ_SHIFT_SUPPORTED */ + } +#if !defined(PNG_READ_GAMMA_SUPPORTED) && !defined(PNG_READ_SHIFT_SUPPORTED) \ + && !defined(PNG_READ_BACKGROUND_SUPPORTED) + if(png_ptr) + return; +#endif +} + +/* Modify the info structure to reflect the transformations. The + * info should be updated so a PNG file could be written with it, + * assuming the transformations result in valid PNG data. + */ +void /* PRIVATE */ +png_read_transform_info(png_structp png_ptr, png_infop info_ptr) +{ + png_debug(1, "in png_read_transform_info\n"); +#if defined(PNG_READ_EXPAND_SUPPORTED) + if (png_ptr->transformations & PNG_EXPAND) + { + if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + if (png_ptr->num_trans) + info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA; + else + info_ptr->color_type = PNG_COLOR_TYPE_RGB; + info_ptr->bit_depth = 8; + info_ptr->num_trans = 0; + } + else + { + if (png_ptr->num_trans) + info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; + if (info_ptr->bit_depth < 8) + info_ptr->bit_depth = 8; + info_ptr->num_trans = 0; + } + } +#endif + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) + if (png_ptr->transformations & PNG_BACKGROUND) + { + info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA; + info_ptr->num_trans = 0; + info_ptr->background = png_ptr->background; + } +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) + if (png_ptr->transformations & PNG_GAMMA) + { +#ifdef PNG_FLOATING_POINT_SUPPORTED + info_ptr->gamma = png_ptr->gamma; +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED + info_ptr->int_gamma = png_ptr->int_gamma; +#endif + } +#endif + +#if defined(PNG_READ_16_TO_8_SUPPORTED) + if ((png_ptr->transformations & PNG_16_TO_8) && (info_ptr->bit_depth == 16)) + info_ptr->bit_depth = 8; +#endif + +#if defined(PNG_READ_DITHER_SUPPORTED) + if (png_ptr->transformations & PNG_DITHER) + { + if (((info_ptr->color_type == PNG_COLOR_TYPE_RGB) || + (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)) && + png_ptr->palette_lookup && info_ptr->bit_depth == 8) + { + info_ptr->color_type = PNG_COLOR_TYPE_PALETTE; + } + } +#endif + +#if defined(PNG_READ_PACK_SUPPORTED) + if ((png_ptr->transformations & PNG_PACK) && (info_ptr->bit_depth < 8)) + info_ptr->bit_depth = 8; +#endif + +#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) + if (png_ptr->transformations & PNG_GRAY_TO_RGB) + info_ptr->color_type |= PNG_COLOR_MASK_COLOR; +#endif + +#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) + if (png_ptr->transformations & PNG_RGB_TO_GRAY) + info_ptr->color_type &= ~PNG_COLOR_MASK_COLOR; +#endif + + if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + info_ptr->channels = 1; + else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR) + info_ptr->channels = 3; + else + info_ptr->channels = 1; + +#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) + if (png_ptr->transformations & PNG_STRIP_ALPHA) + info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA; +#endif + + if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) + info_ptr->channels++; + +#if defined(PNG_READ_FILLER_SUPPORTED) + /* STRIP_ALPHA and FILLER allowed: MASK_ALPHA bit stripped above */ + if ((png_ptr->transformations & PNG_FILLER) && + ((info_ptr->color_type == PNG_COLOR_TYPE_RGB) || + (info_ptr->color_type == PNG_COLOR_TYPE_GRAY))) + { + info_ptr->channels++; +#if 0 /* if adding a true alpha channel not just filler */ + info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; +#endif + } +#endif + +#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) && \ +defined(PNG_READ_USER_TRANSFORM_SUPPORTED) + if(png_ptr->transformations & PNG_USER_TRANSFORM) + { + if(info_ptr->bit_depth < png_ptr->user_transform_depth) + info_ptr->bit_depth = png_ptr->user_transform_depth; + if(info_ptr->channels < png_ptr->user_transform_channels) + info_ptr->channels = png_ptr->user_transform_channels; + } +#endif + + info_ptr->pixel_depth = (png_byte)(info_ptr->channels * + info_ptr->bit_depth); + info_ptr->rowbytes = ((info_ptr->width * info_ptr->pixel_depth + 7) >> 3); + +#if !defined(PNG_READ_EXPAND_SUPPORTED) + if(png_ptr) + return; +#endif +} + +/* Transform the row. The order of transformations is significant, + * and is very touchy. If you add a transformation, take care to + * decide how it fits in with the other transformations here. + */ +void /* PRIVATE */ +png_do_read_transformations(png_structp png_ptr) +{ + png_debug(1, "in png_do_read_transformations\n"); +#if !defined(PNG_USELESS_TESTS_SUPPORTED) + if (png_ptr->row_buf == NULL) + { +#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) + char msg[50]; + + sprintf(msg, "NULL row buffer for row %ld, pass %d", png_ptr->row_number, + png_ptr->pass); + png_error(png_ptr, msg); +#else + png_error(png_ptr, "NULL row buffer"); +#endif + } +#endif + +#if defined(PNG_READ_EXPAND_SUPPORTED) + if (png_ptr->transformations & PNG_EXPAND) + { + if (png_ptr->row_info.color_type == PNG_COLOR_TYPE_PALETTE) + { + png_do_expand_palette(&(png_ptr->row_info), png_ptr->row_buf + 1, + png_ptr->palette, png_ptr->trans, png_ptr->num_trans); + } + else + { + if (png_ptr->num_trans) + png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1, + &(png_ptr->trans_values)); + else + png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1, + NULL); + } + } +#endif + +#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) + if (png_ptr->transformations & PNG_STRIP_ALPHA) + png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, + PNG_FLAG_FILLER_AFTER); +#endif + +#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) + if (png_ptr->transformations & PNG_RGB_TO_GRAY) + { + int rgb_error = + png_do_rgb_to_gray(png_ptr, &(png_ptr->row_info), png_ptr->row_buf + 1); + if(rgb_error) + { + png_ptr->rgb_to_gray_status=1; + if(png_ptr->transformations == PNG_RGB_TO_GRAY_WARN) + png_warning(png_ptr, "png_do_rgb_to_gray found nongray pixel"); + if(png_ptr->transformations == PNG_RGB_TO_GRAY_ERR) + png_error(png_ptr, "png_do_rgb_to_gray found nongray pixel"); + } + } +#endif + +/* +From Andreas Dilger e-mail to png-implement, 26 March 1998: + + In most cases, the "simple transparency" should be done prior to doing + gray-to-RGB, or you will have to test 3x as many bytes to check if a + pixel is transparent. You would also need to make sure that the + transparency information is upgraded to RGB. + + To summarize, the current flow is: + - Gray + simple transparency -> compare 1 or 2 gray bytes and composite + with background "in place" if transparent, + convert to RGB if necessary + - Gray + alpha -> composite with gray background and remove alpha bytes, + convert to RGB if necessary + + To support RGB backgrounds for gray images we need: + - Gray + simple transparency -> convert to RGB + simple transparency, compare + 3 or 6 bytes and composite with background + "in place" if transparent (3x compare/pixel + compared to doing composite with gray bkgrnd) + - Gray + alpha -> convert to RGB + alpha, composite with background and + remove alpha bytes (3x float operations/pixel + compared with composite on gray background) + + Greg's change will do this. The reason it wasn't done before is for + performance, as this increases the per-pixel operations. If we would check + in advance if the background was gray or RGB, and position the gray-to-RGB + transform appropriately, then it would save a lot of work/time. + */ + +#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) + /* if gray -> RGB, do so now only if background is non-gray; else do later + * for performance reasons */ + if ((png_ptr->transformations & PNG_GRAY_TO_RGB) && + !(png_ptr->mode & PNG_BACKGROUND_IS_GRAY)) + png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1); +#endif + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) + if ((png_ptr->transformations & PNG_BACKGROUND) && + ((png_ptr->num_trans != 0 ) || + (png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) + png_do_background(&(png_ptr->row_info), png_ptr->row_buf + 1, + &(png_ptr->trans_values), &(png_ptr->background) +#if defined(PNG_READ_GAMMA_SUPPORTED) + , &(png_ptr->background_1), + png_ptr->gamma_table, png_ptr->gamma_from_1, + png_ptr->gamma_to_1, png_ptr->gamma_16_table, + png_ptr->gamma_16_from_1, png_ptr->gamma_16_to_1, + png_ptr->gamma_shift +#endif +); +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) + if ((png_ptr->transformations & PNG_GAMMA) && +#if defined(PNG_READ_BACKGROUND_SUPPORTED) + !((png_ptr->transformations & PNG_BACKGROUND) && + ((png_ptr->num_trans != 0) || + (png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) && +#endif + (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE)) + png_do_gamma(&(png_ptr->row_info), png_ptr->row_buf + 1, + png_ptr->gamma_table, png_ptr->gamma_16_table, + png_ptr->gamma_shift); +#endif + +#if defined(PNG_READ_16_TO_8_SUPPORTED) + if (png_ptr->transformations & PNG_16_TO_8) + png_do_chop(&(png_ptr->row_info), png_ptr->row_buf + 1); +#endif + +#if defined(PNG_READ_DITHER_SUPPORTED) + if (png_ptr->transformations & PNG_DITHER) + { + png_do_dither((png_row_infop)&(png_ptr->row_info), png_ptr->row_buf + 1, + png_ptr->palette_lookup, png_ptr->dither_index); + if(png_ptr->row_info.rowbytes == (png_uint_32)0) + png_error(png_ptr, "png_do_dither returned rowbytes=0"); + } +#endif + +#if defined(PNG_READ_INVERT_SUPPORTED) + if (png_ptr->transformations & PNG_INVERT_MONO) + png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1); +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) + if (png_ptr->transformations & PNG_SHIFT) + png_do_unshift(&(png_ptr->row_info), png_ptr->row_buf + 1, + &(png_ptr->shift)); +#endif + +#if defined(PNG_READ_PACK_SUPPORTED) + if (png_ptr->transformations & PNG_PACK) + png_do_unpack(&(png_ptr->row_info), png_ptr->row_buf + 1); +#endif + +#if defined(PNG_READ_BGR_SUPPORTED) + if (png_ptr->transformations & PNG_BGR) + png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1); +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + if (png_ptr->transformations & PNG_PACKSWAP) + png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1); +#endif + +#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) + /* if gray -> RGB, do so now only if we did not do so above */ + if ((png_ptr->transformations & PNG_GRAY_TO_RGB) && + (png_ptr->mode & PNG_BACKGROUND_IS_GRAY)) + png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1); +#endif + +#if defined(PNG_READ_FILLER_SUPPORTED) + if (png_ptr->transformations & PNG_FILLER) + png_do_read_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, + (png_uint_32)png_ptr->filler, png_ptr->flags); +#endif + +#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) + if (png_ptr->transformations & PNG_INVERT_ALPHA) + png_do_read_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); +#endif + +#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) + if (png_ptr->transformations & PNG_SWAP_ALPHA) + png_do_read_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); +#endif + +#if defined(PNG_READ_SWAP_SUPPORTED) + if (png_ptr->transformations & PNG_SWAP_BYTES) + png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1); +#endif + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) + if (png_ptr->transformations & PNG_USER_TRANSFORM) + { + if(png_ptr->read_user_transform_fn != NULL) + (*(png_ptr->read_user_transform_fn)) /* user read transform function */ + (png_ptr, /* png_ptr */ + &(png_ptr->row_info), /* row_info: */ + /* png_uint_32 width; width of row */ + /* png_uint_32 rowbytes; number of bytes in row */ + /* png_byte color_type; color type of pixels */ + /* png_byte bit_depth; bit depth of samples */ + /* png_byte channels; number of channels (1-4) */ + /* png_byte pixel_depth; bits per pixel (depth*channels) */ + png_ptr->row_buf + 1); /* start of pixel data for row */ +#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) + if(png_ptr->user_transform_depth) + png_ptr->row_info.bit_depth = png_ptr->user_transform_depth; + if(png_ptr->user_transform_channels) + png_ptr->row_info.channels = png_ptr->user_transform_channels; +#endif + png_ptr->row_info.pixel_depth = (png_byte)(png_ptr->row_info.bit_depth * + png_ptr->row_info.channels); + png_ptr->row_info.rowbytes = (png_ptr->row_info.width * + png_ptr->row_info.pixel_depth+7)>>3; + } +#endif + +} + +#if defined(PNG_READ_PACK_SUPPORTED) +/* Unpack pixels of 1, 2, or 4 bits per pixel into 1 byte per pixel, + * without changing the actual values. Thus, if you had a row with + * a bit depth of 1, you would end up with bytes that only contained + * the numbers 0 or 1. If you would rather they contain 0 and 255, use + * png_do_shift() after this. + */ +void /* PRIVATE */ +png_do_unpack(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_unpack\n"); +#if defined(PNG_USELESS_TESTS_SUPPORTED) + if (row != NULL && row_info != NULL && row_info->bit_depth < 8) +#else + if (row_info->bit_depth < 8) +#endif + { + png_uint_32 i; + png_uint_32 row_width=row_info->width; + + switch (row_info->bit_depth) + { + case 1: + { + png_bytep sp = row + (png_size_t)((row_width - 1) >> 3); + png_bytep dp = row + (png_size_t)row_width - 1; + png_uint_32 shift = 7 - (int)((row_width + 7) & 0x07); + for (i = 0; i < row_width; i++) + { + *dp = (png_byte)((*sp >> shift) & 0x01); + if (shift == 7) + { + shift = 0; + sp--; + } + else + shift++; + + dp--; + } + break; + } + case 2: + { + + png_bytep sp = row + (png_size_t)((row_width - 1) >> 2); + png_bytep dp = row + (png_size_t)row_width - 1; + png_uint_32 shift = (int)((3 - ((row_width + 3) & 0x03)) << 1); + for (i = 0; i < row_width; i++) + { + *dp = (png_byte)((*sp >> shift) & 0x03); + if (shift == 6) + { + shift = 0; + sp--; + } + else + shift += 2; + + dp--; + } + break; + } + case 4: + { + png_bytep sp = row + (png_size_t)((row_width - 1) >> 1); + png_bytep dp = row + (png_size_t)row_width - 1; + png_uint_32 shift = (int)((1 - ((row_width + 1) & 0x01)) << 2); + for (i = 0; i < row_width; i++) + { + *dp = (png_byte)((*sp >> shift) & 0x0f); + if (shift == 4) + { + shift = 0; + sp--; + } + else + shift = 4; + + dp--; + } + break; + } + } + row_info->bit_depth = 8; + row_info->pixel_depth = (png_byte)(8 * row_info->channels); + row_info->rowbytes = row_width * row_info->channels; + } +} +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) +/* Reverse the effects of png_do_shift. This routine merely shifts the + * pixels back to their significant bits values. Thus, if you have + * a row of bit depth 8, but only 5 are significant, this will shift + * the values back to 0 through 31. + */ +void /* PRIVATE */ +png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits) +{ + png_debug(1, "in png_do_unshift\n"); + if ( +#if defined(PNG_USELESS_TESTS_SUPPORTED) + row != NULL && row_info != NULL && sig_bits != NULL && +#endif + row_info->color_type != PNG_COLOR_TYPE_PALETTE) + { + int shift[4]; + int channels = 0; + int c; + png_uint_16 value = 0; + png_uint_32 row_width = row_info->width; + + if (row_info->color_type & PNG_COLOR_MASK_COLOR) + { + shift[channels++] = row_info->bit_depth - sig_bits->red; + shift[channels++] = row_info->bit_depth - sig_bits->green; + shift[channels++] = row_info->bit_depth - sig_bits->blue; + } + else + { + shift[channels++] = row_info->bit_depth - sig_bits->gray; + } + if (row_info->color_type & PNG_COLOR_MASK_ALPHA) + { + shift[channels++] = row_info->bit_depth - sig_bits->alpha; + } + + for (c = 0; c < channels; c++) + { + if (shift[c] <= 0) + shift[c] = 0; + else + value = 1; + } + + if (!value) + return; + + switch (row_info->bit_depth) + { + case 2: + { + png_bytep bp; + png_uint_32 i; + png_uint_32 istop = row_info->rowbytes; + + for (bp = row, i = 0; i < istop; i++) + { + *bp >>= 1; + *bp++ &= 0x55; + } + break; + } + case 4: + { + png_bytep bp = row; + png_uint_32 i; + png_uint_32 istop = row_info->rowbytes; + png_byte mask = (png_byte)((((int)0xf0 >> shift[0]) & (int)0xf0) | + (png_byte)((int)0xf >> shift[0])); + + for (i = 0; i < istop; i++) + { + *bp >>= shift[0]; + *bp++ &= mask; + } + break; + } + case 8: + { + png_bytep bp = row; + png_uint_32 i; + png_uint_32 istop = row_width * channels; + + for (i = 0; i < istop; i++) + { + *bp++ >>= shift[i%channels]; + } + break; + } + case 16: + { + png_bytep bp = row; + png_uint_32 i; + png_uint_32 istop = channels * row_width; + + for (i = 0; i < istop; i++) + { + value = (png_uint_16)((*bp << 8) + *(bp + 1)); + value >>= shift[i%channels]; + *bp++ = (png_byte)(value >> 8); + *bp++ = (png_byte)(value & 0xff); + } + break; + } + } + } +} +#endif + +#if defined(PNG_READ_16_TO_8_SUPPORTED) +/* chop rows of bit depth 16 down to 8 */ +void /* PRIVATE */ +png_do_chop(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_chop\n"); +#if defined(PNG_USELESS_TESTS_SUPPORTED) + if (row != NULL && row_info != NULL && row_info->bit_depth == 16) +#else + if (row_info->bit_depth == 16) +#endif + { + png_bytep sp = row; + png_bytep dp = row; + png_uint_32 i; + png_uint_32 istop = row_info->width * row_info->channels; + + for (i = 0; i> 8)) >> 8; + * + * Approximate calculation with shift/add instead of multiply/divide: + * *dp = ((((png_uint_32)(*sp) << 8) | + * (png_uint_32)((int)(*(sp + 1)) - *sp)) + 128) >> 8; + * + * What we actually do to avoid extra shifting and conversion: + */ + + *dp = *sp + ((((int)(*(sp + 1)) - *sp) > 128) ? 1 : 0); +#else + /* Simply discard the low order byte */ + *dp = *sp; +#endif + } + row_info->bit_depth = 8; + row_info->pixel_depth = (png_byte)(8 * row_info->channels); + row_info->rowbytes = row_info->width * row_info->channels; + } +} +#endif + +#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) +void /* PRIVATE */ +png_do_read_swap_alpha(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_read_swap_alpha\n"); +#if defined(PNG_USELESS_TESTS_SUPPORTED) + if (row != NULL && row_info != NULL) +#endif + { + png_uint_32 row_width = row_info->width; + if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + /* This converts from RGBA to ARGB */ + if (row_info->bit_depth == 8) + { + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_byte save; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + save = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = save; + } + } + /* This converts from RRGGBBAA to AARRGGBB */ + else + { + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_byte save[2]; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + save[0] = *(--sp); + save[1] = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = save[0]; + *(--dp) = save[1]; + } + } + } + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + /* This converts from GA to AG */ + if (row_info->bit_depth == 8) + { + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_byte save; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + save = *(--sp); + *(--dp) = *(--sp); + *(--dp) = save; + } + } + /* This converts from GGAA to AAGG */ + else + { + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_byte save[2]; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + save[0] = *(--sp); + save[1] = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = save[0]; + *(--dp) = save[1]; + } + } + } + } +} +#endif + +#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) +void /* PRIVATE */ +png_do_read_invert_alpha(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_read_invert_alpha\n"); +#if defined(PNG_USELESS_TESTS_SUPPORTED) + if (row != NULL && row_info != NULL) +#endif + { + png_uint_32 row_width = row_info->width; + if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + /* This inverts the alpha channel in RGBA */ + if (row_info->bit_depth == 8) + { + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + *(--dp) = (png_byte)(255 - *(--sp)); + +/* This does nothing: + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + We can replace it with: +*/ + sp-=3; + dp=sp; + } + } + /* This inverts the alpha channel in RRGGBBAA */ + else + { + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + *(--dp) = (png_byte)(255 - *(--sp)); + *(--dp) = (png_byte)(255 - *(--sp)); + +/* This does nothing: + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + We can replace it with: +*/ + sp-=6; + dp=sp; + } + } + } + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + /* This inverts the alpha channel in GA */ + if (row_info->bit_depth == 8) + { + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + *(--dp) = (png_byte)(255 - *(--sp)); + *(--dp) = *(--sp); + } + } + /* This inverts the alpha channel in GGAA */ + else + { + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + *(--dp) = (png_byte)(255 - *(--sp)); + *(--dp) = (png_byte)(255 - *(--sp)); +/* + *(--dp) = *(--sp); + *(--dp) = *(--sp); +*/ + sp-=2; + dp=sp; + } + } + } + } +} +#endif + +#if defined(PNG_READ_FILLER_SUPPORTED) +/* Add filler channel if we have RGB color */ +void /* PRIVATE */ +png_do_read_filler(png_row_infop row_info, png_bytep row, + png_uint_32 filler, png_uint_32 flags) +{ + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + png_byte hi_filler = (png_byte)((filler>>8) & 0xff); + png_byte lo_filler = (png_byte)(filler & 0xff); + + png_debug(1, "in png_do_read_filler\n"); + if ( +#if defined(PNG_USELESS_TESTS_SUPPORTED) + row != NULL && row_info != NULL && +#endif + row_info->color_type == PNG_COLOR_TYPE_GRAY) + { + if(row_info->bit_depth == 8) + { + /* This changes the data from G to GX */ + if (flags & PNG_FLAG_FILLER_AFTER) + { + png_bytep sp = row + (png_size_t)row_width; + png_bytep dp = sp + (png_size_t)row_width; + for (i = 1; i < row_width; i++) + { + *(--dp) = lo_filler; + *(--dp) = *(--sp); + } + *(--dp) = lo_filler; + row_info->channels = 2; + row_info->pixel_depth = 16; + row_info->rowbytes = row_width * 2; + } + /* This changes the data from G to XG */ + else + { + png_bytep sp = row + (png_size_t)row_width; + png_bytep dp = sp + (png_size_t)row_width; + for (i = 0; i < row_width; i++) + { + *(--dp) = *(--sp); + *(--dp) = lo_filler; + } + row_info->channels = 2; + row_info->pixel_depth = 16; + row_info->rowbytes = row_width * 2; + } + } + else if(row_info->bit_depth == 16) + { + /* This changes the data from GG to GGXX */ + if (flags & PNG_FLAG_FILLER_AFTER) + { + png_bytep sp = row + (png_size_t)row_width; + png_bytep dp = sp + (png_size_t)row_width; + for (i = 1; i < row_width; i++) + { + *(--dp) = hi_filler; + *(--dp) = lo_filler; + *(--dp) = *(--sp); + *(--dp) = *(--sp); + } + *(--dp) = hi_filler; + *(--dp) = lo_filler; + row_info->channels = 2; + row_info->pixel_depth = 32; + row_info->rowbytes = row_width * 4; + } + /* This changes the data from GG to XXGG */ + else + { + png_bytep sp = row + (png_size_t)row_width; + png_bytep dp = sp + (png_size_t)row_width; + for (i = 0; i < row_width; i++) + { + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = hi_filler; + *(--dp) = lo_filler; + } + row_info->channels = 2; + row_info->pixel_depth = 32; + row_info->rowbytes = row_width * 4; + } + } + } /* COLOR_TYPE == GRAY */ + else if (row_info->color_type == PNG_COLOR_TYPE_RGB) + { + if(row_info->bit_depth == 8) + { + /* This changes the data from RGB to RGBX */ + if (flags & PNG_FLAG_FILLER_AFTER) + { + png_bytep sp = row + (png_size_t)row_width * 3; + png_bytep dp = sp + (png_size_t)row_width; + for (i = 1; i < row_width; i++) + { + *(--dp) = lo_filler; + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + } + *(--dp) = lo_filler; + row_info->channels = 4; + row_info->pixel_depth = 32; + row_info->rowbytes = row_width * 4; + } + /* This changes the data from RGB to XRGB */ + else + { + png_bytep sp = row + (png_size_t)row_width * 3; + png_bytep dp = sp + (png_size_t)row_width; + for (i = 0; i < row_width; i++) + { + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = lo_filler; + } + row_info->channels = 4; + row_info->pixel_depth = 32; + row_info->rowbytes = row_width * 4; + } + } + else if(row_info->bit_depth == 16) + { + /* This changes the data from RRGGBB to RRGGBBXX */ + if (flags & PNG_FLAG_FILLER_AFTER) + { + png_bytep sp = row + (png_size_t)row_width * 3; + png_bytep dp = sp + (png_size_t)row_width; + for (i = 1; i < row_width; i++) + { + *(--dp) = hi_filler; + *(--dp) = lo_filler; + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + } + *(--dp) = hi_filler; + *(--dp) = lo_filler; + row_info->channels = 4; + row_info->pixel_depth = 64; + row_info->rowbytes = row_width * 8; + } + /* This changes the data from RRGGBB to XXRRGGBB */ + else + { + png_bytep sp = row + (png_size_t)row_width * 3; + png_bytep dp = sp + (png_size_t)row_width; + for (i = 0; i < row_width; i++) + { + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = hi_filler; + *(--dp) = lo_filler; + } + row_info->channels = 4; + row_info->pixel_depth = 64; + row_info->rowbytes = row_width * 8; + } + } + } /* COLOR_TYPE == RGB */ +} +#endif + +#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) +/* expand grayscale files to RGB, with or without alpha */ +void /* PRIVATE */ +png_do_gray_to_rgb(png_row_infop row_info, png_bytep row) +{ + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + png_debug(1, "in png_do_gray_to_rgb\n"); + if (row_info->bit_depth >= 8 && +#if defined(PNG_USELESS_TESTS_SUPPORTED) + row != NULL && row_info != NULL && +#endif + !(row_info->color_type & PNG_COLOR_MASK_COLOR)) + { + if (row_info->color_type == PNG_COLOR_TYPE_GRAY) + { + if (row_info->bit_depth == 8) + { + png_bytep sp = row + (png_size_t)row_width - 1; + png_bytep dp = sp + (png_size_t)row_width * 2; + for (i = 0; i < row_width; i++) + { + *(dp--) = *sp; + *(dp--) = *sp; + *(dp--) = *(sp--); + } + } + else + { + png_bytep sp = row + (png_size_t)row_width * 2 - 1; + png_bytep dp = sp + (png_size_t)row_width * 4; + for (i = 0; i < row_width; i++) + { + *(dp--) = *sp; + *(dp--) = *(sp - 1); + *(dp--) = *sp; + *(dp--) = *(sp - 1); + *(dp--) = *(sp--); + *(dp--) = *(sp--); + } + } + } + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + if (row_info->bit_depth == 8) + { + png_bytep sp = row + (png_size_t)row_width * 2 - 1; + png_bytep dp = sp + (png_size_t)row_width * 2; + for (i = 0; i < row_width; i++) + { + *(dp--) = *(sp--); + *(dp--) = *sp; + *(dp--) = *sp; + *(dp--) = *(sp--); + } + } + else + { + png_bytep sp = row + (png_size_t)row_width * 4 - 1; + png_bytep dp = sp + (png_size_t)row_width * 4; + for (i = 0; i < row_width; i++) + { + *(dp--) = *(sp--); + *(dp--) = *(sp--); + *(dp--) = *sp; + *(dp--) = *(sp - 1); + *(dp--) = *sp; + *(dp--) = *(sp - 1); + *(dp--) = *(sp--); + *(dp--) = *(sp--); + } + } + } + row_info->channels += (png_byte)2; + row_info->color_type |= PNG_COLOR_MASK_COLOR; + row_info->pixel_depth = (png_byte)(row_info->channels * + row_info->bit_depth); + row_info->rowbytes = ((row_width * + row_info->pixel_depth + 7) >> 3); + } +} +#endif + +#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) +/* reduce RGB files to grayscale, with or without alpha + * using the equation given in Poynton's ColorFAQ at + * + * Copyright (c) 1998-01-04 Charles Poynton poynton@inforamp.net + * + * Y = 0.212671 * R + 0.715160 * G + 0.072169 * B + * + * We approximate this with + * + * Y = 0.21268 * R + 0.7151 * G + 0.07217 * B + * + * which can be expressed with integers as + * + * Y = (6969 * R + 23434 * G + 2365 * B)/32768 + * + * The calculation is to be done in a linear colorspace. + * + * Other integer coefficents can be used via png_set_rgb_to_gray(). + */ +int /* PRIVATE */ +png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row) + +{ + png_uint_32 i; + + png_uint_32 row_width = row_info->width; + int rgb_error = 0; + + png_debug(1, "in png_do_rgb_to_gray\n"); + if ( +#if defined(PNG_USELESS_TESTS_SUPPORTED) + row != NULL && row_info != NULL && +#endif + (row_info->color_type & PNG_COLOR_MASK_COLOR)) + { + png_uint_32 rc = png_ptr->rgb_to_gray_red_coeff; + png_uint_32 gc = png_ptr->rgb_to_gray_green_coeff; + png_uint_32 bc = png_ptr->rgb_to_gray_blue_coeff; + + if (row_info->color_type == PNG_COLOR_TYPE_RGB) + { + if (row_info->bit_depth == 8) + { +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + if (png_ptr->gamma_from_1 != NULL && png_ptr->gamma_to_1 != NULL) + { + png_bytep sp = row; + png_bytep dp = row; + + for (i = 0; i < row_width; i++) + { + png_byte red = png_ptr->gamma_to_1[*(sp++)]; + png_byte green = png_ptr->gamma_to_1[*(sp++)]; + png_byte blue = png_ptr->gamma_to_1[*(sp++)]; + if(red != green || red != blue) + { + rgb_error |= 1; + *(dp++) = png_ptr->gamma_from_1[ + (rc*red+gc*green+bc*blue)>>15]; + } + else + *(dp++) = *(sp-1); + } + } + else +#endif + { + png_bytep sp = row; + png_bytep dp = row; + for (i = 0; i < row_width; i++) + { + png_byte red = *(sp++); + png_byte green = *(sp++); + png_byte blue = *(sp++); + if(red != green || red != blue) + { + rgb_error |= 1; + *(dp++) = (png_byte)((rc*red+gc*green+bc*blue)>>15); + } + else + *(dp++) = *(sp-1); + } + } + } + + else /* RGB bit_depth == 16 */ + { +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + if (png_ptr->gamma_16_to_1 != NULL && + png_ptr->gamma_16_from_1 != NULL) + { + png_bytep sp = row; + png_bytep dp = row; + for (i = 0; i < row_width; i++) + { + png_uint_16 red, green, blue, w; + + red = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; + green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; + blue = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; + + if(red == green && red == blue) + w = red; + else + { + png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) >> + png_ptr->gamma_shift][red>>8]; + png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >> + png_ptr->gamma_shift][green>>8]; + png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >> + png_ptr->gamma_shift][blue>>8]; + png_uint_16 gray16 = (png_uint_16)((rc*red_1 + gc*green_1 + + bc*blue_1)>>15); + w = png_ptr->gamma_16_from_1[(gray16&0xff) >> + png_ptr->gamma_shift][gray16 >> 8]; + rgb_error |= 1; + } + + *(dp++) = (png_byte)((w>>8) & 0xff); + *(dp++) = (png_byte)(w & 0xff); + } + } + else +#endif + { + png_bytep sp = row; + png_bytep dp = row; + for (i = 0; i < row_width; i++) + { + png_uint_16 red, green, blue, gray16; + + red = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; + green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; + blue = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; + + if(red != green || red != blue) + rgb_error |= 1; + gray16 = (png_uint_16)((rc*red + gc*green + bc*blue)>>15); + *(dp++) = (png_byte)((gray16>>8) & 0xff); + *(dp++) = (png_byte)(gray16 & 0xff); + } + } + } + } + if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + if (row_info->bit_depth == 8) + { +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + if (png_ptr->gamma_from_1 != NULL && png_ptr->gamma_to_1 != NULL) + { + png_bytep sp = row; + png_bytep dp = row; + for (i = 0; i < row_width; i++) + { + png_byte red = png_ptr->gamma_to_1[*(sp++)]; + png_byte green = png_ptr->gamma_to_1[*(sp++)]; + png_byte blue = png_ptr->gamma_to_1[*(sp++)]; + if(red != green || red != blue) + rgb_error |= 1; + *(dp++) = png_ptr->gamma_from_1 + [(rc*red + gc*green + bc*blue)>>15]; + *(dp++) = *(sp++); /* alpha */ + } + } + else +#endif + { + png_bytep sp = row; + png_bytep dp = row; + for (i = 0; i < row_width; i++) + { + png_byte red = *(sp++); + png_byte green = *(sp++); + png_byte blue = *(sp++); + if(red != green || red != blue) + rgb_error |= 1; + *(dp++) = (png_byte)((gc*red + gc*green + bc*blue)>>8); + *(dp++) = *(sp++); /* alpha */ + } + } + } + else /* RGBA bit_depth == 16 */ + { +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + if (png_ptr->gamma_16_to_1 != NULL && + png_ptr->gamma_16_from_1 != NULL) + { + png_bytep sp = row; + png_bytep dp = row; + for (i = 0; i < row_width; i++) + { + png_uint_16 red, green, blue, w; + + red = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; + green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; + blue = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; + + if(red == green && red == blue) + w = red; + else + { + png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) >> + png_ptr->gamma_shift][red>>8]; + png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >> + png_ptr->gamma_shift][green>>8]; + png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >> + png_ptr->gamma_shift][blue>>8]; + png_uint_16 gray16 = (png_uint_16)((rc * red_1 + + gc * green_1 + bc * blue_1)>>15); + w = png_ptr->gamma_16_from_1[(gray16&0xff) >> + png_ptr->gamma_shift][gray16 >> 8]; + rgb_error |= 1; + } + + *(dp++) = (png_byte)((w>>8) & 0xff); + *(dp++) = (png_byte)(w & 0xff); + *(dp++) = *(sp++); /* alpha */ + *(dp++) = *(sp++); + } + } + else +#endif + { + png_bytep sp = row; + png_bytep dp = row; + for (i = 0; i < row_width; i++) + { + png_uint_16 red, green, blue, gray16; + red = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2; + green = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2; + blue = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2; + if(red != green || red != blue) + rgb_error |= 1; + gray16 = (png_uint_16)((rc*red + gc*green + bc*blue)>>15); + *(dp++) = (png_byte)((gray16>>8) & 0xff); + *(dp++) = (png_byte)(gray16 & 0xff); + *(dp++) = *(sp++); /* alpha */ + *(dp++) = *(sp++); + } + } + } + } + row_info->channels -= (png_byte)2; + row_info->color_type &= ~PNG_COLOR_MASK_COLOR; + row_info->pixel_depth = (png_byte)(row_info->channels * + row_info->bit_depth); + row_info->rowbytes = ((row_width * + row_info->pixel_depth + 7) >> 3); + } + return rgb_error; +} +#endif + +/* Build a grayscale palette. Palette is assumed to be 1 << bit_depth + * large of png_color. This lets grayscale images be treated as + * paletted. Most useful for gamma correction and simplification + * of code. + */ +void PNGAPI +png_build_grayscale_palette(int bit_depth, png_colorp palette) +{ + int num_palette; + int color_inc; + int i; + int v; + + png_debug(1, "in png_do_build_grayscale_palette\n"); + if (palette == NULL) + return; + + switch (bit_depth) + { + case 1: + num_palette = 2; + color_inc = 0xff; + break; + case 2: + num_palette = 4; + color_inc = 0x55; + break; + case 4: + num_palette = 16; + color_inc = 0x11; + break; + case 8: + num_palette = 256; + color_inc = 1; + break; + default: + num_palette = 0; + color_inc = 0; + break; + } + + for (i = 0, v = 0; i < num_palette; i++, v += color_inc) + { + palette[i].red = (png_byte)v; + palette[i].green = (png_byte)v; + palette[i].blue = (png_byte)v; + } +} + +/* This function is currently unused. Do we really need it? */ +#if defined(PNG_READ_DITHER_SUPPORTED) && defined(PNG_CORRECT_PALETTE_SUPPORTED) +void /* PRIVATE */ +png_correct_palette(png_structp png_ptr, png_colorp palette, + int num_palette) +{ + png_debug(1, "in png_correct_palette\n"); +#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \ + defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED) + if (png_ptr->transformations & (PNG_GAMMA | PNG_BACKGROUND)) + { + png_color back, back_1; + + if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_FILE) + { + back.red = png_ptr->gamma_table[png_ptr->background.red]; + back.green = png_ptr->gamma_table[png_ptr->background.green]; + back.blue = png_ptr->gamma_table[png_ptr->background.blue]; + + back_1.red = png_ptr->gamma_to_1[png_ptr->background.red]; + back_1.green = png_ptr->gamma_to_1[png_ptr->background.green]; + back_1.blue = png_ptr->gamma_to_1[png_ptr->background.blue]; + } + else + { + double g; + + g = 1.0 / (png_ptr->background_gamma * png_ptr->screen_gamma); + + if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_SCREEN || + fabs(g - 1.0) < PNG_GAMMA_THRESHOLD) + { + back.red = png_ptr->background.red; + back.green = png_ptr->background.green; + back.blue = png_ptr->background.blue; + } + else + { + back.red = + (png_byte)(pow((double)png_ptr->background.red/255, g) * + 255.0 + 0.5); + back.green = + (png_byte)(pow((double)png_ptr->background.green/255, g) * + 255.0 + 0.5); + back.blue = + (png_byte)(pow((double)png_ptr->background.blue/255, g) * + 255.0 + 0.5); + } + + g = 1.0 / png_ptr->background_gamma; + + back_1.red = + (png_byte)(pow((double)png_ptr->background.red/255, g) * + 255.0 + 0.5); + back_1.green = + (png_byte)(pow((double)png_ptr->background.green/255, g) * + 255.0 + 0.5); + back_1.blue = + (png_byte)(pow((double)png_ptr->background.blue/255, g) * + 255.0 + 0.5); + } + + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + png_uint_32 i; + + for (i = 0; i < (png_uint_32)num_palette; i++) + { + if (i < png_ptr->num_trans && png_ptr->trans[i] == 0) + { + palette[i] = back; + } + else if (i < png_ptr->num_trans && png_ptr->trans[i] != 0xff) + { + png_byte v, w; + + v = png_ptr->gamma_to_1[png_ptr->palette[i].red]; + png_composite(w, v, png_ptr->trans[i], back_1.red); + palette[i].red = png_ptr->gamma_from_1[w]; + + v = png_ptr->gamma_to_1[png_ptr->palette[i].green]; + png_composite(w, v, png_ptr->trans[i], back_1.green); + palette[i].green = png_ptr->gamma_from_1[w]; + + v = png_ptr->gamma_to_1[png_ptr->palette[i].blue]; + png_composite(w, v, png_ptr->trans[i], back_1.blue); + palette[i].blue = png_ptr->gamma_from_1[w]; + } + else + { + palette[i].red = png_ptr->gamma_table[palette[i].red]; + palette[i].green = png_ptr->gamma_table[palette[i].green]; + palette[i].blue = png_ptr->gamma_table[palette[i].blue]; + } + } + } + else + { + int i; + + for (i = 0; i < num_palette; i++) + { + if (palette[i].red == (png_byte)png_ptr->trans_values.gray) + { + palette[i] = back; + } + else + { + palette[i].red = png_ptr->gamma_table[palette[i].red]; + palette[i].green = png_ptr->gamma_table[palette[i].green]; + palette[i].blue = png_ptr->gamma_table[palette[i].blue]; + } + } + } + } + else +#endif +#if defined(PNG_READ_GAMMA_SUPPORTED) + if (png_ptr->transformations & PNG_GAMMA) + { + int i; + + for (i = 0; i < num_palette; i++) + { + palette[i].red = png_ptr->gamma_table[palette[i].red]; + palette[i].green = png_ptr->gamma_table[palette[i].green]; + palette[i].blue = png_ptr->gamma_table[palette[i].blue]; + } + } +#if defined(PNG_READ_BACKGROUND_SUPPORTED) + else +#endif +#endif +#if defined(PNG_READ_BACKGROUND_SUPPORTED) + if (png_ptr->transformations & PNG_BACKGROUND) + { + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + png_color back; + + back.red = (png_byte)png_ptr->background.red; + back.green = (png_byte)png_ptr->background.green; + back.blue = (png_byte)png_ptr->background.blue; + + for (i = 0; i < (int)png_ptr->num_trans; i++) + { + if (png_ptr->trans[i] == 0) + { + palette[i].red = back.red; + palette[i].green = back.green; + palette[i].blue = back.blue; + } + else if (png_ptr->trans[i] != 0xff) + { + png_composite(palette[i].red, png_ptr->palette[i].red, + png_ptr->trans[i], back.red); + png_composite(palette[i].green, png_ptr->palette[i].green, + png_ptr->trans[i], back.green); + png_composite(palette[i].blue, png_ptr->palette[i].blue, + png_ptr->trans[i], back.blue); + } + } + } + else /* assume grayscale palette (what else could it be?) */ + { + int i; + + for (i = 0; i < num_palette; i++) + { + if (i == (png_byte)png_ptr->trans_values.gray) + { + palette[i].red = (png_byte)png_ptr->background.red; + palette[i].green = (png_byte)png_ptr->background.green; + palette[i].blue = (png_byte)png_ptr->background.blue; + } + } + } + } +#endif +} +#endif + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) +/* Replace any alpha or transparency with the supplied background color. + * "background" is already in the screen gamma, while "background_1" is + * at a gamma of 1.0. Paletted files have already been taken care of. + */ +void /* PRIVATE */ +png_do_background(png_row_infop row_info, png_bytep row, + png_color_16p trans_values, png_color_16p background +#if defined(PNG_READ_GAMMA_SUPPORTED) + , png_color_16p background_1, + png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1, + png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1, + png_uint_16pp gamma_16_to_1, int gamma_shift +#endif + ) +{ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width=row_info->width; + int shift; + + png_debug(1, "in png_do_background\n"); + if (background != NULL && +#if defined(PNG_USELESS_TESTS_SUPPORTED) + row != NULL && row_info != NULL && +#endif + (!(row_info->color_type & PNG_COLOR_MASK_ALPHA) || + (row_info->color_type != PNG_COLOR_TYPE_PALETTE && trans_values))) + { + switch (row_info->color_type) + { + case PNG_COLOR_TYPE_GRAY: + { + switch (row_info->bit_depth) + { + case 1: + { + sp = row; + shift = 7; + for (i = 0; i < row_width; i++) + { + if ((png_uint_16)((*sp >> shift) & 0x01) + == trans_values->gray) + { + *sp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff); + *sp |= (png_byte)(background->gray << shift); + } + if (!shift) + { + shift = 7; + sp++; + } + else + shift--; + } + break; + } + case 2: + { +#if defined(PNG_READ_GAMMA_SUPPORTED) + if (gamma_table != NULL) + { + sp = row; + shift = 6; + for (i = 0; i < row_width; i++) + { + if ((png_uint_16)((*sp >> shift) & 0x03) + == trans_values->gray) + { + *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); + *sp |= (png_byte)(background->gray << shift); + } + else + { + png_byte p = (png_byte)((*sp >> shift) & 0x03); + png_byte g = (png_byte)((gamma_table [p | (p << 2) | + (p << 4) | (p << 6)] >> 6) & 0x03); + *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); + *sp |= (png_byte)(g << shift); + } + if (!shift) + { + shift = 6; + sp++; + } + else + shift -= 2; + } + } + else +#endif + { + sp = row; + shift = 6; + for (i = 0; i < row_width; i++) + { + if ((png_uint_16)((*sp >> shift) & 0x03) + == trans_values->gray) + { + *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); + *sp |= (png_byte)(background->gray << shift); + } + if (!shift) + { + shift = 6; + sp++; + } + else + shift -= 2; + } + } + break; + } + case 4: + { +#if defined(PNG_READ_GAMMA_SUPPORTED) + if (gamma_table != NULL) + { + sp = row; + shift = 4; + for (i = 0; i < row_width; i++) + { + if ((png_uint_16)((*sp >> shift) & 0x0f) + == trans_values->gray) + { + *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); + *sp |= (png_byte)(background->gray << shift); + } + else + { + png_byte p = (png_byte)((*sp >> shift) & 0x0f); + png_byte g = (png_byte)((gamma_table[p | + (p << 4)] >> 4) & 0x0f); + *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); + *sp |= (png_byte)(g << shift); + } + if (!shift) + { + shift = 4; + sp++; + } + else + shift -= 4; + } + } + else +#endif + { + sp = row; + shift = 4; + for (i = 0; i < row_width; i++) + { + if ((png_uint_16)((*sp >> shift) & 0x0f) + == trans_values->gray) + { + *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); + *sp |= (png_byte)(background->gray << shift); + } + if (!shift) + { + shift = 4; + sp++; + } + else + shift -= 4; + } + } + break; + } + case 8: + { +#if defined(PNG_READ_GAMMA_SUPPORTED) + if (gamma_table != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp++) + { + if (*sp == trans_values->gray) + { + *sp = (png_byte)background->gray; + } + else + { + *sp = gamma_table[*sp]; + } + } + } + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp++) + { + if (*sp == trans_values->gray) + { + *sp = (png_byte)background->gray; + } + } + } + break; + } + case 16: + { +#if defined(PNG_READ_GAMMA_SUPPORTED) + if (gamma_16 != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp += 2) + { + png_uint_16 v; + + v = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + if (v == trans_values->gray) + { + /* background is already in screen gamma */ + *sp = (png_byte)((background->gray >> 8) & 0xff); + *(sp + 1) = (png_byte)(background->gray & 0xff); + } + else + { + v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + } + } + } + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp += 2) + { + png_uint_16 v; + + v = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + if (v == trans_values->gray) + { + *sp = (png_byte)((background->gray >> 8) & 0xff); + *(sp + 1) = (png_byte)(background->gray & 0xff); + } + } + } + break; + } + } + break; + } + case PNG_COLOR_TYPE_RGB: + { + if (row_info->bit_depth == 8) + { +#if defined(PNG_READ_GAMMA_SUPPORTED) + if (gamma_table != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp += 3) + { + if (*sp == trans_values->red && + *(sp + 1) == trans_values->green && + *(sp + 2) == trans_values->blue) + { + *sp = (png_byte)background->red; + *(sp + 1) = (png_byte)background->green; + *(sp + 2) = (png_byte)background->blue; + } + else + { + *sp = gamma_table[*sp]; + *(sp + 1) = gamma_table[*(sp + 1)]; + *(sp + 2) = gamma_table[*(sp + 2)]; + } + } + } + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp += 3) + { + if (*sp == trans_values->red && + *(sp + 1) == trans_values->green && + *(sp + 2) == trans_values->blue) + { + *sp = (png_byte)background->red; + *(sp + 1) = (png_byte)background->green; + *(sp + 2) = (png_byte)background->blue; + } + } + } + } + else /* if (row_info->bit_depth == 16) */ + { +#if defined(PNG_READ_GAMMA_SUPPORTED) + if (gamma_16 != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp += 6) + { + png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + png_uint_16 g = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3)); + png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5)); + if (r == trans_values->red && g == trans_values->green && + b == trans_values->blue) + { + /* background is already in screen gamma */ + *sp = (png_byte)((background->red >> 8) & 0xff); + *(sp + 1) = (png_byte)(background->red & 0xff); + *(sp + 2) = (png_byte)((background->green >> 8) & 0xff); + *(sp + 3) = (png_byte)(background->green & 0xff); + *(sp + 4) = (png_byte)((background->blue >> 8) & 0xff); + *(sp + 5) = (png_byte)(background->blue & 0xff); + } + else + { + png_uint_16 v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)]; + *(sp + 2) = (png_byte)((v >> 8) & 0xff); + *(sp + 3) = (png_byte)(v & 0xff); + v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)]; + *(sp + 4) = (png_byte)((v >> 8) & 0xff); + *(sp + 5) = (png_byte)(v & 0xff); + } + } + } + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp += 6) + { + png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp+1)); + png_uint_16 g = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3)); + png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5)); + + if (r == trans_values->red && g == trans_values->green && + b == trans_values->blue) + { + *sp = (png_byte)((background->red >> 8) & 0xff); + *(sp + 1) = (png_byte)(background->red & 0xff); + *(sp + 2) = (png_byte)((background->green >> 8) & 0xff); + *(sp + 3) = (png_byte)(background->green & 0xff); + *(sp + 4) = (png_byte)((background->blue >> 8) & 0xff); + *(sp + 5) = (png_byte)(background->blue & 0xff); + } + } + } + } + break; + } + case PNG_COLOR_TYPE_GRAY_ALPHA: + { + if (row_info->bit_depth == 8) + { +#if defined(PNG_READ_GAMMA_SUPPORTED) + if (gamma_to_1 != NULL && gamma_from_1 != NULL && + gamma_table != NULL) + { + sp = row; + dp = row; + for (i = 0; i < row_width; i++, sp += 2, dp++) + { + png_uint_16 a = *(sp + 1); + + if (a == 0xff) + { + *dp = gamma_table[*sp]; + } + else if (a == 0) + { + /* background is already in screen gamma */ + *dp = (png_byte)background->gray; + } + else + { + png_byte v, w; + + v = gamma_to_1[*sp]; + png_composite(w, v, a, background_1->gray); + *dp = gamma_from_1[w]; + } + } + } + else +#endif + { + sp = row; + dp = row; + for (i = 0; i < row_width; i++, sp += 2, dp++) + { + png_byte a = *(sp + 1); + + if (a == 0xff) + { + *dp = *sp; + } +#if defined(PNG_READ_GAMMA_SUPPORTED) + else if (a == 0) + { + *dp = (png_byte)background->gray; + } + else + { + png_composite(*dp, *sp, a, background_1->gray); + } +#else + *dp = (png_byte)background->gray; +#endif + } + } + } + else /* if (png_ptr->bit_depth == 16) */ + { +#if defined(PNG_READ_GAMMA_SUPPORTED) + if (gamma_16 != NULL && gamma_16_from_1 != NULL && + gamma_16_to_1 != NULL) + { + sp = row; + dp = row; + for (i = 0; i < row_width; i++, sp += 4, dp += 2) + { + png_uint_16 a = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3)); + + if (a == (png_uint_16)0xffff) + { + png_uint_16 v; + + v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; + *dp = (png_byte)((v >> 8) & 0xff); + *(dp + 1) = (png_byte)(v & 0xff); + } +#if defined(PNG_READ_GAMMA_SUPPORTED) + else if (a == 0) +#else + else +#endif + { + /* background is already in screen gamma */ + *dp = (png_byte)((background->gray >> 8) & 0xff); + *(dp + 1) = (png_byte)(background->gray & 0xff); + } +#if defined(PNG_READ_GAMMA_SUPPORTED) + else + { + png_uint_16 g, v, w; + + g = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp]; + png_composite_16(v, g, a, background_1->gray); + w = gamma_16_from_1[(v&0xff) >> gamma_shift][v >> 8]; + *dp = (png_byte)((w >> 8) & 0xff); + *(dp + 1) = (png_byte)(w & 0xff); + } +#endif + } + } + else +#endif + { + sp = row; + dp = row; + for (i = 0; i < row_width; i++, sp += 4, dp += 2) + { + png_uint_16 a = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3)); + if (a == (png_uint_16)0xffff) + { + png_memcpy(dp, sp, 2); + } +#if defined(PNG_READ_GAMMA_SUPPORTED) + else if (a == 0) +#else + else +#endif + { + *dp = (png_byte)((background->gray >> 8) & 0xff); + *(dp + 1) = (png_byte)(background->gray & 0xff); + } +#if defined(PNG_READ_GAMMA_SUPPORTED) + else + { + png_uint_16 g, v; + + g = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + png_composite_16(v, g, a, background_1->gray); + *dp = (png_byte)((v >> 8) & 0xff); + *(dp + 1) = (png_byte)(v & 0xff); + } +#endif + } + } + } + break; + } + case PNG_COLOR_TYPE_RGB_ALPHA: + { + if (row_info->bit_depth == 8) + { +#if defined(PNG_READ_GAMMA_SUPPORTED) + if (gamma_to_1 != NULL && gamma_from_1 != NULL && + gamma_table != NULL) + { + sp = row; + dp = row; + for (i = 0; i < row_width; i++, sp += 4, dp += 3) + { + png_byte a = *(sp + 3); + + if (a == 0xff) + { + *dp = gamma_table[*sp]; + *(dp + 1) = gamma_table[*(sp + 1)]; + *(dp + 2) = gamma_table[*(sp + 2)]; + } + else if (a == 0) + { + /* background is already in screen gamma */ + *dp = (png_byte)background->red; + *(dp + 1) = (png_byte)background->green; + *(dp + 2) = (png_byte)background->blue; + } + else + { + png_byte v, w; + + v = gamma_to_1[*sp]; + png_composite(w, v, a, background_1->red); + *dp = gamma_from_1[w]; + v = gamma_to_1[*(sp + 1)]; + png_composite(w, v, a, background_1->green); + *(dp + 1) = gamma_from_1[w]; + v = gamma_to_1[*(sp + 2)]; + png_composite(w, v, a, background_1->blue); + *(dp + 2) = gamma_from_1[w]; + } + } + } + else +#endif + { + sp = row; + dp = row; + for (i = 0; i < row_width; i++, sp += 4, dp += 3) + { + png_byte a = *(sp + 3); + + if (a == 0xff) + { + *dp = *sp; + *(dp + 1) = *(sp + 1); + *(dp + 2) = *(sp + 2); + } + else if (a == 0) + { + *dp = (png_byte)background->red; + *(dp + 1) = (png_byte)background->green; + *(dp + 2) = (png_byte)background->blue; + } + else + { + png_composite(*dp, *sp, a, background->red); + png_composite(*(dp + 1), *(sp + 1), a, + background->green); + png_composite(*(dp + 2), *(sp + 2), a, + background->blue); + } + } + } + } + else /* if (row_info->bit_depth == 16) */ + { +#if defined(PNG_READ_GAMMA_SUPPORTED) + if (gamma_16 != NULL && gamma_16_from_1 != NULL && + gamma_16_to_1 != NULL) + { + sp = row; + dp = row; + for (i = 0; i < row_width; i++, sp += 8, dp += 6) + { + png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6)) + << 8) + (png_uint_16)(*(sp + 7))); + if (a == (png_uint_16)0xffff) + { + png_uint_16 v; + + v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; + *dp = (png_byte)((v >> 8) & 0xff); + *(dp + 1) = (png_byte)(v & 0xff); + v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)]; + *(dp + 2) = (png_byte)((v >> 8) & 0xff); + *(dp + 3) = (png_byte)(v & 0xff); + v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)]; + *(dp + 4) = (png_byte)((v >> 8) & 0xff); + *(dp + 5) = (png_byte)(v & 0xff); + } + else if (a == 0) + { + /* background is already in screen gamma */ + *dp = (png_byte)((background->red >> 8) & 0xff); + *(dp + 1) = (png_byte)(background->red & 0xff); + *(dp + 2) = (png_byte)((background->green >> 8) & 0xff); + *(dp + 3) = (png_byte)(background->green & 0xff); + *(dp + 4) = (png_byte)((background->blue >> 8) & 0xff); + *(dp + 5) = (png_byte)(background->blue & 0xff); + } + else + { + png_uint_16 v, w, x; + + v = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp]; + png_composite_16(w, v, a, background_1->red); + x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8]; + *dp = (png_byte)((x >> 8) & 0xff); + *(dp + 1) = (png_byte)(x & 0xff); + v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)]; + png_composite_16(w, v, a, background_1->green); + x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8]; + *(dp + 2) = (png_byte)((x >> 8) & 0xff); + *(dp + 3) = (png_byte)(x & 0xff); + v = gamma_16_to_1[*(sp + 5) >> gamma_shift][*(sp + 4)]; + png_composite_16(w, v, a, background_1->blue); + x = gamma_16_from_1[(w & 0xff) >> gamma_shift][w >> 8]; + *(dp + 4) = (png_byte)((x >> 8) & 0xff); + *(dp + 5) = (png_byte)(x & 0xff); + } + } + } + else +#endif + { + sp = row; + dp = row; + for (i = 0; i < row_width; i++, sp += 8, dp += 6) + { + png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6)) + << 8) + (png_uint_16)(*(sp + 7))); + if (a == (png_uint_16)0xffff) + { + png_memcpy(dp, sp, 6); + } + else if (a == 0) + { + *dp = (png_byte)((background->red >> 8) & 0xff); + *(dp + 1) = (png_byte)(background->red & 0xff); + *(dp + 2) = (png_byte)((background->green >> 8) & 0xff); + *(dp + 3) = (png_byte)(background->green & 0xff); + *(dp + 4) = (png_byte)((background->blue >> 8) & 0xff); + *(dp + 5) = (png_byte)(background->blue & 0xff); + } + else + { + png_uint_16 v; + + png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8) + + *(sp + 3)); + png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8) + + *(sp + 5)); + + png_composite_16(v, r, a, background->red); + *dp = (png_byte)((v >> 8) & 0xff); + *(dp + 1) = (png_byte)(v & 0xff); + png_composite_16(v, g, a, background->green); + *(dp + 2) = (png_byte)((v >> 8) & 0xff); + *(dp + 3) = (png_byte)(v & 0xff); + png_composite_16(v, b, a, background->blue); + *(dp + 4) = (png_byte)((v >> 8) & 0xff); + *(dp + 5) = (png_byte)(v & 0xff); + } + } + } + } + break; + } + } + + if (row_info->color_type & PNG_COLOR_MASK_ALPHA) + { + row_info->color_type &= ~PNG_COLOR_MASK_ALPHA; + row_info->channels--; + row_info->pixel_depth = (png_byte)(row_info->channels * + row_info->bit_depth); + row_info->rowbytes = ((row_width * + row_info->pixel_depth + 7) >> 3); + } + } +} +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) +/* Gamma correct the image, avoiding the alpha channel. Make sure + * you do this after you deal with the transparency issue on grayscale + * or RGB images. If your bit depth is 8, use gamma_table, if it + * is 16, use gamma_16_table and gamma_shift. Build these with + * build_gamma_table(). + */ +void /* PRIVATE */ +png_do_gamma(png_row_infop row_info, png_bytep row, + png_bytep gamma_table, png_uint_16pp gamma_16_table, + int gamma_shift) +{ + png_bytep sp; + png_uint_32 i; + png_uint_32 row_width=row_info->width; + + png_debug(1, "in png_do_gamma\n"); + if ( +#if defined(PNG_USELESS_TESTS_SUPPORTED) + row != NULL && row_info != NULL && +#endif + ((row_info->bit_depth <= 8 && gamma_table != NULL) || + (row_info->bit_depth == 16 && gamma_16_table != NULL))) + { + switch (row_info->color_type) + { + case PNG_COLOR_TYPE_RGB: + { + if (row_info->bit_depth == 8) + { + sp = row; + for (i = 0; i < row_width; i++) + { + *sp = gamma_table[*sp]; + sp++; + *sp = gamma_table[*sp]; + sp++; + *sp = gamma_table[*sp]; + sp++; + } + } + else /* if (row_info->bit_depth == 16) */ + { + sp = row; + for (i = 0; i < row_width; i++) + { + png_uint_16 v; + + v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 2; + v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 2; + v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 2; + } + } + break; + } + case PNG_COLOR_TYPE_RGB_ALPHA: + { + if (row_info->bit_depth == 8) + { + sp = row; + for (i = 0; i < row_width; i++) + { + *sp = gamma_table[*sp]; + sp++; + *sp = gamma_table[*sp]; + sp++; + *sp = gamma_table[*sp]; + sp++; + sp++; + } + } + else /* if (row_info->bit_depth == 16) */ + { + sp = row; + for (i = 0; i < row_width; i++) + { + png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 2; + v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 2; + v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 4; + } + } + break; + } + case PNG_COLOR_TYPE_GRAY_ALPHA: + { + if (row_info->bit_depth == 8) + { + sp = row; + for (i = 0; i < row_width; i++) + { + *sp = gamma_table[*sp]; + sp += 2; + } + } + else /* if (row_info->bit_depth == 16) */ + { + sp = row; + for (i = 0; i < row_width; i++) + { + png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 4; + } + } + break; + } + case PNG_COLOR_TYPE_GRAY: + { + if (row_info->bit_depth == 2) + { + sp = row; + for (i = 0; i < row_width; i += 4) + { + int a = *sp & 0xc0; + int b = *sp & 0x30; + int c = *sp & 0x0c; + int d = *sp & 0x03; + + *sp = (png_byte)( + ((((int)gamma_table[a|(a>>2)|(a>>4)|(a>>6)]) ) & 0xc0)| + ((((int)gamma_table[(b<<2)|b|(b>>2)|(b>>4)])>>2) & 0x30)| + ((((int)gamma_table[(c<<4)|(c<<2)|c|(c>>2)])>>4) & 0x0c)| + ((((int)gamma_table[(d<<6)|(d<<4)|(d<<2)|d])>>6) )); + sp++; + } + } + if (row_info->bit_depth == 4) + { + sp = row; + for (i = 0; i < row_width; i += 2) + { + int msb = *sp & 0xf0; + int lsb = *sp & 0x0f; + + *sp = (png_byte)((((int)gamma_table[msb | (msb >> 4)]) & 0xf0) + | (((int)gamma_table[(lsb << 4) | lsb]) >> 4)); + sp++; + } + } + else if (row_info->bit_depth == 8) + { + sp = row; + for (i = 0; i < row_width; i++) + { + *sp = gamma_table[*sp]; + sp++; + } + } + else if (row_info->bit_depth == 16) + { + sp = row; + for (i = 0; i < row_width; i++) + { + png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 2; + } + } + break; + } + } + } +} +#endif + +#if defined(PNG_READ_EXPAND_SUPPORTED) +/* Expands a palette row to an RGB or RGBA row depending + * upon whether you supply trans and num_trans. + */ +void /* PRIVATE */ +png_do_expand_palette(png_row_infop row_info, png_bytep row, + png_colorp palette, png_bytep trans, int num_trans) +{ + int shift, value; + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width=row_info->width; + + png_debug(1, "in png_do_expand_palette\n"); + if ( +#if defined(PNG_USELESS_TESTS_SUPPORTED) + row != NULL && row_info != NULL && +#endif + row_info->color_type == PNG_COLOR_TYPE_PALETTE) + { + if (row_info->bit_depth < 8) + { + switch (row_info->bit_depth) + { + case 1: + { + sp = row + (png_size_t)((row_width - 1) >> 3); + dp = row + (png_size_t)row_width - 1; + shift = 7 - (int)((row_width + 7) & 0x07); + for (i = 0; i < row_width; i++) + { + if ((*sp >> shift) & 0x01) + *dp = 1; + else + *dp = 0; + if (shift == 7) + { + shift = 0; + sp--; + } + else + shift++; + + dp--; + } + break; + } + case 2: + { + sp = row + (png_size_t)((row_width - 1) >> 2); + dp = row + (png_size_t)row_width - 1; + shift = (int)((3 - ((row_width + 3) & 0x03)) << 1); + for (i = 0; i < row_width; i++) + { + value = (*sp >> shift) & 0x03; + *dp = (png_byte)value; + if (shift == 6) + { + shift = 0; + sp--; + } + else + shift += 2; + + dp--; + } + break; + } + case 4: + { + sp = row + (png_size_t)((row_width - 1) >> 1); + dp = row + (png_size_t)row_width - 1; + shift = (int)((row_width & 0x01) << 2); + for (i = 0; i < row_width; i++) + { + value = (*sp >> shift) & 0x0f; + *dp = (png_byte)value; + if (shift == 4) + { + shift = 0; + sp--; + } + else + shift += 4; + + dp--; + } + break; + } + } + row_info->bit_depth = 8; + row_info->pixel_depth = 8; + row_info->rowbytes = row_width; + } + switch (row_info->bit_depth) + { + case 8: + { + if (trans != NULL) + { + sp = row + (png_size_t)row_width - 1; + dp = row + (png_size_t)(row_width << 2) - 1; + + for (i = 0; i < row_width; i++) + { + if ((int)(*sp) >= num_trans) + *dp-- = 0xff; + else + *dp-- = trans[*sp]; + *dp-- = palette[*sp].blue; + *dp-- = palette[*sp].green; + *dp-- = palette[*sp].red; + sp--; + } + row_info->bit_depth = 8; + row_info->pixel_depth = 32; + row_info->rowbytes = row_width * 4; + row_info->color_type = 6; + row_info->channels = 4; + } + else + { + sp = row + (png_size_t)row_width - 1; + dp = row + (png_size_t)(row_width * 3) - 1; + + for (i = 0; i < row_width; i++) + { + *dp-- = palette[*sp].blue; + *dp-- = palette[*sp].green; + *dp-- = palette[*sp].red; + sp--; + } + row_info->bit_depth = 8; + row_info->pixel_depth = 24; + row_info->rowbytes = row_width * 3; + row_info->color_type = 2; + row_info->channels = 3; + } + break; + } + } + } +} + +/* If the bit depth < 8, it is expanded to 8. Also, if the + * transparency value is supplied, an alpha channel is built. + */ +void /* PRIVATE */ +png_do_expand(png_row_infop row_info, png_bytep row, + png_color_16p trans_value) +{ + int shift, value; + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width=row_info->width; + + png_debug(1, "in png_do_expand\n"); +#if defined(PNG_USELESS_TESTS_SUPPORTED) + if (row != NULL && row_info != NULL) +#endif + { + if (row_info->color_type == PNG_COLOR_TYPE_GRAY) + { + png_uint_16 gray = (png_uint_16)(trans_value ? trans_value->gray : 0); + + if (row_info->bit_depth < 8) + { + switch (row_info->bit_depth) + { + case 1: + { + gray = (png_uint_16)(gray*0xff); + sp = row + (png_size_t)((row_width - 1) >> 3); + dp = row + (png_size_t)row_width - 1; + shift = 7 - (int)((row_width + 7) & 0x07); + for (i = 0; i < row_width; i++) + { + if ((*sp >> shift) & 0x01) + *dp = 0xff; + else + *dp = 0; + if (shift == 7) + { + shift = 0; + sp--; + } + else + shift++; + + dp--; + } + break; + } + case 2: + { + gray = (png_uint_16)(gray*0x55); + sp = row + (png_size_t)((row_width - 1) >> 2); + dp = row + (png_size_t)row_width - 1; + shift = (int)((3 - ((row_width + 3) & 0x03)) << 1); + for (i = 0; i < row_width; i++) + { + value = (*sp >> shift) & 0x03; + *dp = (png_byte)(value | (value << 2) | (value << 4) | + (value << 6)); + if (shift == 6) + { + shift = 0; + sp--; + } + else + shift += 2; + + dp--; + } + break; + } + case 4: + { + gray = (png_uint_16)(gray*0x11); + sp = row + (png_size_t)((row_width - 1) >> 1); + dp = row + (png_size_t)row_width - 1; + shift = (int)((1 - ((row_width + 1) & 0x01)) << 2); + for (i = 0; i < row_width; i++) + { + value = (*sp >> shift) & 0x0f; + *dp = (png_byte)(value | (value << 4)); + if (shift == 4) + { + shift = 0; + sp--; + } + else + shift = 4; + + dp--; + } + break; + } + } + row_info->bit_depth = 8; + row_info->pixel_depth = 8; + row_info->rowbytes = row_width; + } + + if (trans_value != NULL) + { + if (row_info->bit_depth == 8) + { + sp = row + (png_size_t)row_width - 1; + dp = row + (png_size_t)(row_width << 1) - 1; + for (i = 0; i < row_width; i++) + { + if (*sp == gray) + *dp-- = 0; + else + *dp-- = 0xff; + *dp-- = *sp--; + } + } + else if (row_info->bit_depth == 16) + { + sp = row + row_info->rowbytes - 1; + dp = row + (row_info->rowbytes << 1) - 1; + for (i = 0; i < row_width; i++) + { + if (((png_uint_16)*(sp) | + ((png_uint_16)*(sp - 1) << 8)) == gray) + { + *dp-- = 0; + *dp-- = 0; + } + else + { + *dp-- = 0xff; + *dp-- = 0xff; + } + *dp-- = *sp--; + *dp-- = *sp--; + } + } + row_info->color_type = PNG_COLOR_TYPE_GRAY_ALPHA; + row_info->channels = 2; + row_info->pixel_depth = (png_byte)(row_info->bit_depth << 1); + row_info->rowbytes = + ((row_width * row_info->pixel_depth) >> 3); + } + } + else if (row_info->color_type == PNG_COLOR_TYPE_RGB && trans_value) + { + if (row_info->bit_depth == 8) + { + sp = row + (png_size_t)row_info->rowbytes - 1; + dp = row + (png_size_t)(row_width << 2) - 1; + for (i = 0; i < row_width; i++) + { + if (*(sp - 2) == trans_value->red && + *(sp - 1) == trans_value->green && + *(sp - 0) == trans_value->blue) + *dp-- = 0; + else + *dp-- = 0xff; + *dp-- = *sp--; + *dp-- = *sp--; + *dp-- = *sp--; + } + } + else if (row_info->bit_depth == 16) + { + sp = row + row_info->rowbytes - 1; + dp = row + (png_size_t)(row_width << 3) - 1; + for (i = 0; i < row_width; i++) + { + if ((((png_uint_16)*(sp - 4) | + ((png_uint_16)*(sp - 5) << 8)) == trans_value->red) && + (((png_uint_16)*(sp - 2) | + ((png_uint_16)*(sp - 3) << 8)) == trans_value->green) && + (((png_uint_16)*(sp - 0) | + ((png_uint_16)*(sp - 1) << 8)) == trans_value->blue)) + { + *dp-- = 0; + *dp-- = 0; + } + else + { + *dp-- = 0xff; + *dp-- = 0xff; + } + *dp-- = *sp--; + *dp-- = *sp--; + *dp-- = *sp--; + *dp-- = *sp--; + *dp-- = *sp--; + *dp-- = *sp--; + } + } + row_info->color_type = PNG_COLOR_TYPE_RGB_ALPHA; + row_info->channels = 4; + row_info->pixel_depth = (png_byte)(row_info->bit_depth << 2); + row_info->rowbytes = + ((row_width * row_info->pixel_depth) >> 3); + } + } +} +#endif + +#if defined(PNG_READ_DITHER_SUPPORTED) +void /* PRIVATE */ +png_do_dither(png_row_infop row_info, png_bytep row, + png_bytep palette_lookup, png_bytep dither_lookup) +{ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width=row_info->width; + + png_debug(1, "in png_do_dither\n"); +#if defined(PNG_USELESS_TESTS_SUPPORTED) + if (row != NULL && row_info != NULL) +#endif + { + if (row_info->color_type == PNG_COLOR_TYPE_RGB && + palette_lookup && row_info->bit_depth == 8) + { + int r, g, b, p; + sp = row; + dp = row; + for (i = 0; i < row_width; i++) + { + r = *sp++; + g = *sp++; + b = *sp++; + + /* this looks real messy, but the compiler will reduce + it down to a reasonable formula. For example, with + 5 bits per color, we get: + p = (((r >> 3) & 0x1f) << 10) | + (((g >> 3) & 0x1f) << 5) | + ((b >> 3) & 0x1f); + */ + p = (((r >> (8 - PNG_DITHER_RED_BITS)) & + ((1 << PNG_DITHER_RED_BITS) - 1)) << + (PNG_DITHER_GREEN_BITS + PNG_DITHER_BLUE_BITS)) | + (((g >> (8 - PNG_DITHER_GREEN_BITS)) & + ((1 << PNG_DITHER_GREEN_BITS) - 1)) << + (PNG_DITHER_BLUE_BITS)) | + ((b >> (8 - PNG_DITHER_BLUE_BITS)) & + ((1 << PNG_DITHER_BLUE_BITS) - 1)); + + *dp++ = palette_lookup[p]; + } + row_info->color_type = PNG_COLOR_TYPE_PALETTE; + row_info->channels = 1; + row_info->pixel_depth = row_info->bit_depth; + row_info->rowbytes = + ((row_width * row_info->pixel_depth + 7) >> 3); + } + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA && + palette_lookup != NULL && row_info->bit_depth == 8) + { + int r, g, b, p; + sp = row; + dp = row; + for (i = 0; i < row_width; i++) + { + r = *sp++; + g = *sp++; + b = *sp++; + sp++; + + p = (((r >> (8 - PNG_DITHER_RED_BITS)) & + ((1 << PNG_DITHER_RED_BITS) - 1)) << + (PNG_DITHER_GREEN_BITS + PNG_DITHER_BLUE_BITS)) | + (((g >> (8 - PNG_DITHER_GREEN_BITS)) & + ((1 << PNG_DITHER_GREEN_BITS) - 1)) << + (PNG_DITHER_BLUE_BITS)) | + ((b >> (8 - PNG_DITHER_BLUE_BITS)) & + ((1 << PNG_DITHER_BLUE_BITS) - 1)); + + *dp++ = palette_lookup[p]; + } + row_info->color_type = PNG_COLOR_TYPE_PALETTE; + row_info->channels = 1; + row_info->pixel_depth = row_info->bit_depth; + row_info->rowbytes = + ((row_width * row_info->pixel_depth + 7) >> 3); + } + else if (row_info->color_type == PNG_COLOR_TYPE_PALETTE && + dither_lookup && row_info->bit_depth == 8) + { + sp = row; + for (i = 0; i < row_width; i++, sp++) + { + *sp = dither_lookup[*sp]; + } + } + } +} +#endif + +#ifdef PNG_FLOATING_POINT_SUPPORTED +#if defined(PNG_READ_GAMMA_SUPPORTED) +static int png_gamma_shift[] = + {0x10, 0x21, 0x42, 0x84, 0x110, 0x248, 0x550, 0xff0}; + +/* We build the 8- or 16-bit gamma tables here. Note that for 16-bit + * tables, we don't make a full table if we are reducing to 8-bit in + * the future. Note also how the gamma_16 tables are segmented so that + * we don't need to allocate > 64K chunks for a full 16-bit table. + */ +void /* PRIVATE */ +png_build_gamma_table(png_structp png_ptr) +{ + png_debug(1, "in png_build_gamma_table\n"); + if(png_ptr->gamma != 0.0) + { + if (png_ptr->bit_depth <= 8) + { + int i; + double g; + + if (png_ptr->screen_gamma > .000001) + g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); + else + g = 1.0; + + png_ptr->gamma_table = (png_bytep)png_malloc(png_ptr, + (png_uint_32)256); + + for (i = 0; i < 256; i++) + { + png_ptr->gamma_table[i] = (png_byte)(pow((double)i / 255.0, + g) * 255.0 + .5); + } + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) + if (png_ptr->transformations & ((PNG_BACKGROUND) | PNG_RGB_TO_GRAY)) + { + + g = 1.0 / (png_ptr->gamma); + + png_ptr->gamma_to_1 = (png_bytep)png_malloc(png_ptr, + (png_uint_32)256); + + for (i = 0; i < 256; i++) + { + png_ptr->gamma_to_1[i] = (png_byte)(pow((double)i / 255.0, + g) * 255.0 + .5); + } + + + png_ptr->gamma_from_1 = (png_bytep)png_malloc(png_ptr, + (png_uint_32)256); + + if(png_ptr->screen_gamma > 0.000001) + g = 1.0 / png_ptr->screen_gamma; + else + g = png_ptr->gamma; /* probably doing rgb_to_gray */ + + for (i = 0; i < 256; i++) + { + png_ptr->gamma_from_1[i] = (png_byte)(pow((double)i / 255.0, + g) * 255.0 + .5); + + } + } +#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */ + } + else + { + double g; + int i, j, shift, num; + int sig_bit; + png_uint_32 ig; + + if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) + { + sig_bit = (int)png_ptr->sig_bit.red; + if ((int)png_ptr->sig_bit.green > sig_bit) + sig_bit = png_ptr->sig_bit.green; + if ((int)png_ptr->sig_bit.blue > sig_bit) + sig_bit = png_ptr->sig_bit.blue; + } + else + { + sig_bit = (int)png_ptr->sig_bit.gray; + } + + if (sig_bit > 0) + shift = 16 - sig_bit; + else + shift = 0; + + if (png_ptr->transformations & PNG_16_TO_8) + { + if (shift < (16 - PNG_MAX_GAMMA_8)) + shift = (16 - PNG_MAX_GAMMA_8); + } + + if (shift > 8) + shift = 8; + if (shift < 0) + shift = 0; + + png_ptr->gamma_shift = (png_byte)shift; + + num = (1 << (8 - shift)); + + if (png_ptr->screen_gamma > .000001) + g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); + else + g = 1.0; + + png_ptr->gamma_16_table = (png_uint_16pp)png_malloc(png_ptr, + (png_uint_32)(num * sizeof (png_uint_16p))); + + if (png_ptr->transformations & (PNG_16_TO_8 | PNG_BACKGROUND)) + { + double fin, fout; + png_uint_32 last, max; + + for (i = 0; i < num; i++) + { + png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr, + (png_uint_32)(256 * sizeof (png_uint_16))); + } + + g = 1.0 / g; + last = 0; + for (i = 0; i < 256; i++) + { + fout = ((double)i + 0.5) / 256.0; + fin = pow(fout, g); + max = (png_uint_32)(fin * (double)((png_uint_32)num << 8)); + while (last <= max) + { + png_ptr->gamma_16_table[(int)(last & (0xff >> shift))] + [(int)(last >> (8 - shift))] = (png_uint_16)( + (png_uint_16)i | ((png_uint_16)i << 8)); + last++; + } + } + while (last < ((png_uint_32)num << 8)) + { + png_ptr->gamma_16_table[(int)(last & (0xff >> shift))] + [(int)(last >> (8 - shift))] = (png_uint_16)65535L; + last++; + } + } + else + { + for (i = 0; i < num; i++) + { + png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr, + (png_uint_32)(256 * sizeof (png_uint_16))); + + ig = (((png_uint_32)i * (png_uint_32)png_gamma_shift[shift]) >> 4); + for (j = 0; j < 256; j++) + { + png_ptr->gamma_16_table[i][j] = + (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / + 65535.0, g) * 65535.0 + .5); + } + } + } + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) + if (png_ptr->transformations & (PNG_BACKGROUND | PNG_RGB_TO_GRAY)) + { + + g = 1.0 / (png_ptr->gamma); + + png_ptr->gamma_16_to_1 = (png_uint_16pp)png_malloc(png_ptr, + (png_uint_32)(num * sizeof (png_uint_16p ))); + + for (i = 0; i < num; i++) + { + png_ptr->gamma_16_to_1[i] = (png_uint_16p)png_malloc(png_ptr, + (png_uint_32)(256 * sizeof (png_uint_16))); + + ig = (((png_uint_32)i * + (png_uint_32)png_gamma_shift[shift]) >> 4); + for (j = 0; j < 256; j++) + { + png_ptr->gamma_16_to_1[i][j] = + (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / + 65535.0, g) * 65535.0 + .5); + } + } + + if(png_ptr->screen_gamma > 0.000001) + g = 1.0 / png_ptr->screen_gamma; + else + g = png_ptr->gamma; /* probably doing rgb_to_gray */ + + png_ptr->gamma_16_from_1 = (png_uint_16pp)png_malloc(png_ptr, + (png_uint_32)(num * sizeof (png_uint_16p))); + + for (i = 0; i < num; i++) + { + png_ptr->gamma_16_from_1[i] = (png_uint_16p)png_malloc(png_ptr, + (png_uint_32)(256 * sizeof (png_uint_16))); + + ig = (((png_uint_32)i * + (png_uint_32)png_gamma_shift[shift]) >> 4); + for (j = 0; j < 256; j++) + { + png_ptr->gamma_16_from_1[i][j] = + (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / + 65535.0, g) * 65535.0 + .5); + } + } + } +#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */ + } + } +} +#endif +/* To do: install integer version of png_build_gamma_table here */ +#endif + +#if defined(PNG_MNG_FEATURES_SUPPORTED) +/* undoes intrapixel differencing */ +void /* PRIVATE */ +png_do_read_intrapixel(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_read_intrapixel\n"); + if ( +#if defined(PNG_USELESS_TESTS_SUPPORTED) + row != NULL && row_info != NULL && +#endif + (row_info->color_type & PNG_COLOR_MASK_COLOR)) + { + int bytes_per_pixel; + png_uint_32 row_width = row_info->width; + if (row_info->bit_depth == 8) + { + png_bytep rp; + png_uint_32 i; + + if (row_info->color_type == PNG_COLOR_TYPE_RGB) + bytes_per_pixel = 3; + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + bytes_per_pixel = 4; + else + return; + + for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) + { + *(rp) = (png_byte)((256 + *rp + *(rp+1))&0xff); + *(rp+2) = (png_byte)((256 + *(rp+2) + *(rp+1))&0xff); + } + } + else if (row_info->bit_depth == 16) + { + png_bytep rp; + png_uint_32 i; + + if (row_info->color_type == PNG_COLOR_TYPE_RGB) + bytes_per_pixel = 6; + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + bytes_per_pixel = 8; + else + return; + + for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) + { + png_uint_32 s0=*(rp )<<8 | *(rp+1); + png_uint_32 s1=*(rp+2)<<8 | *(rp+3); + png_uint_32 s2=*(rp+4)<<8 | *(rp+5); + png_uint_32 red=(65536+s0+s1)&0xffff; + png_uint_32 blue=(65536+s2+s1)&0xffff; + *(rp ) = (png_byte)((red>>8)&0xff); + *(rp+1) = (png_byte)(red&0xff); + *(rp+4) = (png_byte)((blue>>8)&0xff); + *(rp+5) = (png_byte)(blue&0xff); + } + } + } +} +#endif /* PNG_MNG_FEATURES_SUPPORTED */ diff --git a/gtkmm-osx/libpng-1.2.5/pngrutil.c b/gtkmm-osx/libpng-1.2.5/pngrutil.c new file mode 100644 index 0000000..9cbfed6 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/pngrutil.c @@ -0,0 +1,3101 @@ + +/* pngrutil.c - utilities to read a PNG file + * + * libpng 1.2.5 - October 3, 2002 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2002 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This file contains routines that are only called from within + * libpng itself during the course of reading an image. + */ + +#define PNG_INTERNAL +#include "png.h" + +#if defined(_WIN32_WCE) +/* strtod() function is not supported on WindowsCE */ +# ifdef PNG_FLOATING_POINT_SUPPORTED +__inline double strtod(const char *nptr, char **endptr) +{ + double result = 0; + int len; + wchar_t *str, *end; + + len = MultiByteToWideChar(CP_ACP, 0, nptr, -1, NULL, 0); + str = (wchar_t *)malloc(len * sizeof(wchar_t)); + if ( NULL != str ) + { + MultiByteToWideChar(CP_ACP, 0, nptr, -1, str, len); + result = wcstod(str, &end); + len = WideCharToMultiByte(CP_ACP, 0, end, -1, NULL, 0, NULL, NULL); + *endptr = (char *)nptr + (png_strlen(nptr) - len + 1); + free(str); + } + return result; +} +# endif +#endif + +#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED +/* Grab an unsigned 32-bit integer from a buffer in big-endian format. */ +png_uint_32 /* PRIVATE */ +png_get_uint_32(png_bytep buf) +{ + png_uint_32 i = ((png_uint_32)(*buf) << 24) + + ((png_uint_32)(*(buf + 1)) << 16) + + ((png_uint_32)(*(buf + 2)) << 8) + + (png_uint_32)(*(buf + 3)); + + return (i); +} + +#if defined(PNG_READ_pCAL_SUPPORTED) || defined(PNG_READ_oFFs_SUPPORTED) +/* Grab a signed 32-bit integer from a buffer in big-endian format. The + * data is stored in the PNG file in two's complement format, and it is + * assumed that the machine format for signed integers is the same. */ +png_int_32 /* PRIVATE */ +png_get_int_32(png_bytep buf) +{ + png_int_32 i = ((png_int_32)(*buf) << 24) + + ((png_int_32)(*(buf + 1)) << 16) + + ((png_int_32)(*(buf + 2)) << 8) + + (png_int_32)(*(buf + 3)); + + return (i); +} +#endif /* PNG_READ_pCAL_SUPPORTED */ + +/* Grab an unsigned 16-bit integer from a buffer in big-endian format. */ +png_uint_16 /* PRIVATE */ +png_get_uint_16(png_bytep buf) +{ + png_uint_16 i = (png_uint_16)(((png_uint_16)(*buf) << 8) + + (png_uint_16)(*(buf + 1))); + + return (i); +} +#endif /* PNG_READ_BIG_ENDIAN_SUPPORTED */ + +/* Read data, and (optionally) run it through the CRC. */ +void /* PRIVATE */ +png_crc_read(png_structp png_ptr, png_bytep buf, png_size_t length) +{ + png_read_data(png_ptr, buf, length); + png_calculate_crc(png_ptr, buf, length); +} + +/* Optionally skip data and then check the CRC. Depending on whether we + are reading a ancillary or critical chunk, and how the program has set + things up, we may calculate the CRC on the data and print a message. + Returns '1' if there was a CRC error, '0' otherwise. */ +int /* PRIVATE */ +png_crc_finish(png_structp png_ptr, png_uint_32 skip) +{ + png_size_t i; + png_size_t istop = png_ptr->zbuf_size; + + for (i = (png_size_t)skip; i > istop; i -= istop) + { + png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size); + } + if (i) + { + png_crc_read(png_ptr, png_ptr->zbuf, i); + } + + if (png_crc_error(png_ptr)) + { + if (((png_ptr->chunk_name[0] & 0x20) && /* Ancillary */ + !(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN)) || + (!(png_ptr->chunk_name[0] & 0x20) && /* Critical */ + (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_USE))) + { + png_chunk_warning(png_ptr, "CRC error"); + } + else + { + png_chunk_error(png_ptr, "CRC error"); + } + return (1); + } + + return (0); +} + +/* Compare the CRC stored in the PNG file with that calculated by libpng from + the data it has read thus far. */ +int /* PRIVATE */ +png_crc_error(png_structp png_ptr) +{ + png_byte crc_bytes[4]; + png_uint_32 crc; + int need_crc = 1; + + if (png_ptr->chunk_name[0] & 0x20) /* ancillary */ + { + if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_MASK) == + (PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN)) + need_crc = 0; + } + else /* critical */ + { + if (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE) + need_crc = 0; + } + + png_read_data(png_ptr, crc_bytes, 4); + + if (need_crc) + { + crc = png_get_uint_32(crc_bytes); + return ((int)(crc != png_ptr->crc)); + } + else + return (0); +} + +#if defined(PNG_READ_zTXt_SUPPORTED) || defined(PNG_READ_iTXt_SUPPORTED) || \ + defined(PNG_READ_iCCP_SUPPORTED) +/* + * Decompress trailing data in a chunk. The assumption is that chunkdata + * points at an allocated area holding the contents of a chunk with a + * trailing compressed part. What we get back is an allocated area + * holding the original prefix part and an uncompressed version of the + * trailing part (the malloc area passed in is freed). + */ +png_charp /* PRIVATE */ +png_decompress_chunk(png_structp png_ptr, int comp_type, + png_charp chunkdata, png_size_t chunklength, + png_size_t prefix_size, png_size_t *newlength) +{ + static char msg[] = "Error decoding compressed text"; + png_charp text = NULL; + png_size_t text_size; + + if (comp_type == PNG_COMPRESSION_TYPE_BASE) + { + int ret = Z_OK; + png_ptr->zstream.next_in = (png_bytep)(chunkdata + prefix_size); + png_ptr->zstream.avail_in = (uInt)(chunklength - prefix_size); + png_ptr->zstream.next_out = png_ptr->zbuf; + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + + text_size = 0; + text = NULL; + + while (png_ptr->zstream.avail_in) + { + ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); + if (ret != Z_OK && ret != Z_STREAM_END) + { + if (png_ptr->zstream.msg != NULL) + png_warning(png_ptr, png_ptr->zstream.msg); + else + png_warning(png_ptr, msg); + inflateReset(&png_ptr->zstream); + png_ptr->zstream.avail_in = 0; + + if (text == NULL) + { + text_size = prefix_size + sizeof(msg) + 1; + text = (png_charp)png_malloc_warn(png_ptr, text_size); + if (text == NULL) + { + png_free(png_ptr,chunkdata); + png_error(png_ptr,"Not enough memory to decompress chunk"); + } + png_memcpy(text, chunkdata, prefix_size); + } + + text[text_size - 1] = 0x00; + + /* Copy what we can of the error message into the text chunk */ + text_size = (png_size_t)(chunklength - (text - chunkdata) - 1); + text_size = sizeof(msg) > text_size ? text_size : sizeof(msg); + png_memcpy(text + prefix_size, msg, text_size + 1); + break; + } + if (!png_ptr->zstream.avail_out || ret == Z_STREAM_END) + { + if (text == NULL) + { + text_size = prefix_size + + png_ptr->zbuf_size - png_ptr->zstream.avail_out; + text = (png_charp)png_malloc_warn(png_ptr, text_size + 1); + if (text == NULL) + { + png_free(png_ptr,chunkdata); + png_error(png_ptr,"Not enough memory to decompress chunk."); + } + png_memcpy(text + prefix_size, png_ptr->zbuf, + text_size - prefix_size); + png_memcpy(text, chunkdata, prefix_size); + *(text + text_size) = 0x00; + } + else + { + png_charp tmp; + + tmp = text; + text = (png_charp)png_malloc_warn(png_ptr, + (png_uint_32)(text_size + + png_ptr->zbuf_size - png_ptr->zstream.avail_out + 1)); + if (text == NULL) + { + png_free(png_ptr, tmp); + png_free(png_ptr, chunkdata); + png_error(png_ptr,"Not enough memory to decompress chunk.."); + } + png_memcpy(text, tmp, text_size); + png_free(png_ptr, tmp); + png_memcpy(text + text_size, png_ptr->zbuf, + (png_ptr->zbuf_size - png_ptr->zstream.avail_out)); + text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out; + *(text + text_size) = 0x00; + } + if (ret == Z_STREAM_END) + break; + else + { + png_ptr->zstream.next_out = png_ptr->zbuf; + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + } + } + } + if (ret != Z_STREAM_END) + { +#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) + char umsg[50]; + + if (ret == Z_BUF_ERROR) + sprintf(umsg,"Buffer error in compressed datastream in %s chunk", + png_ptr->chunk_name); + else if (ret == Z_DATA_ERROR) + sprintf(umsg,"Data error in compressed datastream in %s chunk", + png_ptr->chunk_name); + else + sprintf(umsg,"Incomplete compressed datastream in %s chunk", + png_ptr->chunk_name); + png_warning(png_ptr, umsg); +#else + png_warning(png_ptr, + "Incomplete compressed datastream in chunk other than IDAT"); +#endif + text_size=prefix_size; + if (text == NULL) + { + text = (png_charp)png_malloc_warn(png_ptr, text_size+1); + if (text == NULL) + { + png_free(png_ptr, chunkdata); + png_error(png_ptr,"Not enough memory for text."); + } + png_memcpy(text, chunkdata, prefix_size); + } + *(text + text_size) = 0x00; + } + + inflateReset(&png_ptr->zstream); + png_ptr->zstream.avail_in = 0; + + png_free(png_ptr, chunkdata); + chunkdata = text; + *newlength=text_size; + } + else /* if (comp_type != PNG_COMPRESSION_TYPE_BASE) */ + { +#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) + char umsg[50]; + + sprintf(umsg, "Unknown zTXt compression type %d", comp_type); + png_warning(png_ptr, umsg); +#else + png_warning(png_ptr, "Unknown zTXt compression type"); +#endif + + *(chunkdata + prefix_size) = 0x00; + *newlength=prefix_size; + } + + return chunkdata; +} +#endif + +/* read and check the IDHR chunk */ +void /* PRIVATE */ +png_handle_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +{ + png_byte buf[13]; + png_uint_32 width, height; + int bit_depth, color_type, compression_type, filter_type; + int interlace_type; + + png_debug(1, "in png_handle_IHDR\n"); + + if (png_ptr->mode & PNG_HAVE_IHDR) + png_error(png_ptr, "Out of place IHDR"); + + /* check the length */ + if (length != 13) + png_error(png_ptr, "Invalid IHDR chunk"); + + png_ptr->mode |= PNG_HAVE_IHDR; + + png_crc_read(png_ptr, buf, 13); + png_crc_finish(png_ptr, 0); + + width = png_get_uint_32(buf); + height = png_get_uint_32(buf + 4); + bit_depth = buf[8]; + color_type = buf[9]; + compression_type = buf[10]; + filter_type = buf[11]; + interlace_type = buf[12]; + + + /* set internal variables */ + png_ptr->width = width; + png_ptr->height = height; + png_ptr->bit_depth = (png_byte)bit_depth; + png_ptr->interlaced = (png_byte)interlace_type; + png_ptr->color_type = (png_byte)color_type; +#if defined(PNG_MNG_FEATURES_SUPPORTED) + png_ptr->filter_type = (png_byte)filter_type; +#endif + + /* find number of channels */ + switch (png_ptr->color_type) + { + case PNG_COLOR_TYPE_GRAY: + case PNG_COLOR_TYPE_PALETTE: + png_ptr->channels = 1; + break; + case PNG_COLOR_TYPE_RGB: + png_ptr->channels = 3; + break; + case PNG_COLOR_TYPE_GRAY_ALPHA: + png_ptr->channels = 2; + break; + case PNG_COLOR_TYPE_RGB_ALPHA: + png_ptr->channels = 4; + break; + } + + /* set up other useful info */ + png_ptr->pixel_depth = (png_byte)(png_ptr->bit_depth * + png_ptr->channels); + png_ptr->rowbytes = ((png_ptr->width * + (png_uint_32)png_ptr->pixel_depth + 7) >> 3); + png_debug1(3,"bit_depth = %d\n", png_ptr->bit_depth); + png_debug1(3,"channels = %d\n", png_ptr->channels); + png_debug1(3,"rowbytes = %lu\n", png_ptr->rowbytes); + png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, + color_type, interlace_type, compression_type, filter_type); +} + +/* read and check the palette */ +void /* PRIVATE */ +png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +{ + png_color palette[PNG_MAX_PALETTE_LENGTH]; + int num, i; +#ifndef PNG_NO_POINTER_INDEXING + png_colorp pal_ptr; +#endif + + png_debug(1, "in png_handle_PLTE\n"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before PLTE"); + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_warning(png_ptr, "Invalid PLTE after IDAT"); + png_crc_finish(png_ptr, length); + return; + } + else if (png_ptr->mode & PNG_HAVE_PLTE) + png_error(png_ptr, "Duplicate PLTE chunk"); + + png_ptr->mode |= PNG_HAVE_PLTE; + + if (!(png_ptr->color_type&PNG_COLOR_MASK_COLOR)) + { + png_warning(png_ptr, + "Ignoring PLTE chunk in grayscale PNG"); + png_crc_finish(png_ptr, length); + return; + } +#if !defined(PNG_READ_OPT_PLTE_SUPPORTED) + if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE) + { + png_crc_finish(png_ptr, length); + return; + } +#endif + + if (length > 3*PNG_MAX_PALETTE_LENGTH || length % 3) + { + if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE) + { + png_warning(png_ptr, "Invalid palette chunk"); + png_crc_finish(png_ptr, length); + return; + } + else + { + png_error(png_ptr, "Invalid palette chunk"); + } + } + + num = (int)length / 3; + +#ifndef PNG_NO_POINTER_INDEXING + for (i = 0, pal_ptr = palette; i < num; i++, pal_ptr++) + { + png_byte buf[3]; + + png_crc_read(png_ptr, buf, 3); + pal_ptr->red = buf[0]; + pal_ptr->green = buf[1]; + pal_ptr->blue = buf[2]; + } +#else + for (i = 0; i < num; i++) + { + png_byte buf[3]; + + png_crc_read(png_ptr, buf, 3); + /* don't depend upon png_color being any order */ + palette[i].red = buf[0]; + palette[i].green = buf[1]; + palette[i].blue = buf[2]; + } +#endif + + /* If we actually NEED the PLTE chunk (ie for a paletted image), we do + whatever the normal CRC configuration tells us. However, if we + have an RGB image, the PLTE can be considered ancillary, so + we will act as though it is. */ +#if !defined(PNG_READ_OPT_PLTE_SUPPORTED) + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) +#endif + { + png_crc_finish(png_ptr, 0); + } +#if !defined(PNG_READ_OPT_PLTE_SUPPORTED) + else if (png_crc_error(png_ptr)) /* Only if we have a CRC error */ + { + /* If we don't want to use the data from an ancillary chunk, + we have two options: an error abort, or a warning and we + ignore the data in this chunk (which should be OK, since + it's considered ancillary for a RGB or RGBA image). */ + if (!(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_USE)) + { + if (png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN) + { + png_chunk_error(png_ptr, "CRC error"); + } + else + { + png_chunk_warning(png_ptr, "CRC error"); + return; + } + } + /* Otherwise, we (optionally) emit a warning and use the chunk. */ + else if (!(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN)) + { + png_chunk_warning(png_ptr, "CRC error"); + } + } +#endif + + png_set_PLTE(png_ptr, info_ptr, palette, num); + +#if defined(PNG_READ_tRNS_SUPPORTED) + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS)) + { + if (png_ptr->num_trans > (png_uint_16)num) + { + png_warning(png_ptr, "Truncating incorrect tRNS chunk length"); + png_ptr->num_trans = (png_uint_16)num; + } + if (info_ptr->num_trans > (png_uint_16)num) + { + png_warning(png_ptr, "Truncating incorrect info tRNS chunk length"); + info_ptr->num_trans = (png_uint_16)num; + } + } + } +#endif + +} + +void /* PRIVATE */ +png_handle_IEND(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +{ + png_debug(1, "in png_handle_IEND\n"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR) || !(png_ptr->mode & PNG_HAVE_IDAT)) + { + png_error(png_ptr, "No image in file"); + + info_ptr = info_ptr; /* quiet compiler warnings about unused info_ptr */ + } + + png_ptr->mode |= (PNG_AFTER_IDAT | PNG_HAVE_IEND); + + if (length != 0) + { + png_warning(png_ptr, "Incorrect IEND chunk length"); + } + png_crc_finish(png_ptr, length); +} + +#if defined(PNG_READ_gAMA_SUPPORTED) +void /* PRIVATE */ +png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +{ + png_fixed_point igamma; +#ifdef PNG_FLOATING_POINT_SUPPORTED + float file_gamma; +#endif + png_byte buf[4]; + + png_debug(1, "in png_handle_gAMA\n"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before gAMA"); + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_warning(png_ptr, "Invalid gAMA after IDAT"); + png_crc_finish(png_ptr, length); + return; + } + else if (png_ptr->mode & PNG_HAVE_PLTE) + /* Should be an error, but we can cope with it */ + png_warning(png_ptr, "Out of place gAMA chunk"); + + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA) +#if defined(PNG_READ_sRGB_SUPPORTED) + && !(info_ptr->valid & PNG_INFO_sRGB) +#endif + ) + { + png_warning(png_ptr, "Duplicate gAMA chunk"); + png_crc_finish(png_ptr, length); + return; + } + + if (length != 4) + { + png_warning(png_ptr, "Incorrect gAMA chunk length"); + png_crc_finish(png_ptr, length); + return; + } + + png_crc_read(png_ptr, buf, 4); + if (png_crc_finish(png_ptr, 0)) + return; + + igamma = (png_fixed_point)png_get_uint_32(buf); + /* check for zero gamma */ + if (igamma == 0) + { + png_warning(png_ptr, + "Ignoring gAMA chunk with gamma=0"); + return; + } + +#if defined(PNG_READ_sRGB_SUPPORTED) + if (info_ptr->valid & PNG_INFO_sRGB) + if(igamma < 45000L || igamma > 46000L) + { + png_warning(png_ptr, + "Ignoring incorrect gAMA value when sRGB is also present"); +#ifndef PNG_NO_CONSOLE_IO + fprintf(stderr, "gamma = (%d/100000)\n", (int)igamma); +#endif + return; + } +#endif /* PNG_READ_sRGB_SUPPORTED */ + +#ifdef PNG_FLOATING_POINT_SUPPORTED + file_gamma = (float)igamma / (float)100000.0; +# ifdef PNG_READ_GAMMA_SUPPORTED + png_ptr->gamma = file_gamma; +# endif + png_set_gAMA(png_ptr, info_ptr, file_gamma); +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED + png_set_gAMA_fixed(png_ptr, info_ptr, igamma); +#endif +} +#endif + +#if defined(PNG_READ_sBIT_SUPPORTED) +void /* PRIVATE */ +png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +{ + png_size_t truelen; + png_byte buf[4]; + + png_debug(1, "in png_handle_sBIT\n"); + + buf[0] = buf[1] = buf[2] = buf[3] = 0; + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before sBIT"); + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_warning(png_ptr, "Invalid sBIT after IDAT"); + png_crc_finish(png_ptr, length); + return; + } + else if (png_ptr->mode & PNG_HAVE_PLTE) + { + /* Should be an error, but we can cope with it */ + png_warning(png_ptr, "Out of place sBIT chunk"); + } + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT)) + { + png_warning(png_ptr, "Duplicate sBIT chunk"); + png_crc_finish(png_ptr, length); + return; + } + + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + truelen = 3; + else + truelen = (png_size_t)png_ptr->channels; + + if (length != truelen) + { + png_warning(png_ptr, "Incorrect sBIT chunk length"); + png_crc_finish(png_ptr, length); + return; + } + + png_crc_read(png_ptr, buf, truelen); + if (png_crc_finish(png_ptr, 0)) + return; + + if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) + { + png_ptr->sig_bit.red = buf[0]; + png_ptr->sig_bit.green = buf[1]; + png_ptr->sig_bit.blue = buf[2]; + png_ptr->sig_bit.alpha = buf[3]; + } + else + { + png_ptr->sig_bit.gray = buf[0]; + png_ptr->sig_bit.red = buf[0]; + png_ptr->sig_bit.green = buf[0]; + png_ptr->sig_bit.blue = buf[0]; + png_ptr->sig_bit.alpha = buf[1]; + } + png_set_sBIT(png_ptr, info_ptr, &(png_ptr->sig_bit)); +} +#endif + +#if defined(PNG_READ_cHRM_SUPPORTED) +void /* PRIVATE */ +png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +{ + png_byte buf[4]; +#ifdef PNG_FLOATING_POINT_SUPPORTED + float white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y; +#endif + png_fixed_point int_x_white, int_y_white, int_x_red, int_y_red, int_x_green, + int_y_green, int_x_blue, int_y_blue; + + png_uint_32 uint_x, uint_y; + + png_debug(1, "in png_handle_cHRM\n"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before cHRM"); + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_warning(png_ptr, "Invalid cHRM after IDAT"); + png_crc_finish(png_ptr, length); + return; + } + else if (png_ptr->mode & PNG_HAVE_PLTE) + /* Should be an error, but we can cope with it */ + png_warning(png_ptr, "Missing PLTE before cHRM"); + + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM) +#if defined(PNG_READ_sRGB_SUPPORTED) + && !(info_ptr->valid & PNG_INFO_sRGB) +#endif + ) + { + png_warning(png_ptr, "Duplicate cHRM chunk"); + png_crc_finish(png_ptr, length); + return; + } + + if (length != 32) + { + png_warning(png_ptr, "Incorrect cHRM chunk length"); + png_crc_finish(png_ptr, length); + return; + } + + png_crc_read(png_ptr, buf, 4); + uint_x = png_get_uint_32(buf); + + png_crc_read(png_ptr, buf, 4); + uint_y = png_get_uint_32(buf); + + if (uint_x > 80000L || uint_y > 80000L || + uint_x + uint_y > 100000L) + { + png_warning(png_ptr, "Invalid cHRM white point"); + png_crc_finish(png_ptr, 24); + return; + } + int_x_white = (png_fixed_point)uint_x; + int_y_white = (png_fixed_point)uint_y; + + png_crc_read(png_ptr, buf, 4); + uint_x = png_get_uint_32(buf); + + png_crc_read(png_ptr, buf, 4); + uint_y = png_get_uint_32(buf); + + if (uint_x > 80000L || uint_y > 80000L || + uint_x + uint_y > 100000L) + { + png_warning(png_ptr, "Invalid cHRM red point"); + png_crc_finish(png_ptr, 16); + return; + } + int_x_red = (png_fixed_point)uint_x; + int_y_red = (png_fixed_point)uint_y; + + png_crc_read(png_ptr, buf, 4); + uint_x = png_get_uint_32(buf); + + png_crc_read(png_ptr, buf, 4); + uint_y = png_get_uint_32(buf); + + if (uint_x > 80000L || uint_y > 80000L || + uint_x + uint_y > 100000L) + { + png_warning(png_ptr, "Invalid cHRM green point"); + png_crc_finish(png_ptr, 8); + return; + } + int_x_green = (png_fixed_point)uint_x; + int_y_green = (png_fixed_point)uint_y; + + png_crc_read(png_ptr, buf, 4); + uint_x = png_get_uint_32(buf); + + png_crc_read(png_ptr, buf, 4); + uint_y = png_get_uint_32(buf); + + if (uint_x > 80000L || uint_y > 80000L || + uint_x + uint_y > 100000L) + { + png_warning(png_ptr, "Invalid cHRM blue point"); + png_crc_finish(png_ptr, 0); + return; + } + int_x_blue = (png_fixed_point)uint_x; + int_y_blue = (png_fixed_point)uint_y; + +#ifdef PNG_FLOATING_POINT_SUPPORTED + white_x = (float)int_x_white / (float)100000.0; + white_y = (float)int_y_white / (float)100000.0; + red_x = (float)int_x_red / (float)100000.0; + red_y = (float)int_y_red / (float)100000.0; + green_x = (float)int_x_green / (float)100000.0; + green_y = (float)int_y_green / (float)100000.0; + blue_x = (float)int_x_blue / (float)100000.0; + blue_y = (float)int_y_blue / (float)100000.0; +#endif + +#if defined(PNG_READ_sRGB_SUPPORTED) + if (info_ptr->valid & PNG_INFO_sRGB) + { + if (abs(int_x_white - 31270L) > 1000 || + abs(int_y_white - 32900L) > 1000 || + abs(int_x_red - 64000L) > 1000 || + abs(int_y_red - 33000L) > 1000 || + abs(int_x_green - 30000L) > 1000 || + abs(int_y_green - 60000L) > 1000 || + abs(int_x_blue - 15000L) > 1000 || + abs(int_y_blue - 6000L) > 1000) + { + + png_warning(png_ptr, + "Ignoring incorrect cHRM value when sRGB is also present"); +#ifndef PNG_NO_CONSOLE_IO +#ifdef PNG_FLOATING_POINT_SUPPORTED + fprintf(stderr,"wx=%f, wy=%f, rx=%f, ry=%f\n", + white_x, white_y, red_x, red_y); + fprintf(stderr,"gx=%f, gy=%f, bx=%f, by=%f\n", + green_x, green_y, blue_x, blue_y); +#else + fprintf(stderr,"wx=%ld, wy=%ld, rx=%ld, ry=%ld\n", + int_x_white, int_y_white, int_x_red, int_y_red); + fprintf(stderr,"gx=%ld, gy=%ld, bx=%ld, by=%ld\n", + int_x_green, int_y_green, int_x_blue, int_y_blue); +#endif +#endif /* PNG_NO_CONSOLE_IO */ + } + png_crc_finish(png_ptr, 0); + return; + } +#endif /* PNG_READ_sRGB_SUPPORTED */ + +#ifdef PNG_FLOATING_POINT_SUPPORTED + png_set_cHRM(png_ptr, info_ptr, + white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y); +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED + png_set_cHRM_fixed(png_ptr, info_ptr, + int_x_white, int_y_white, int_x_red, int_y_red, int_x_green, + int_y_green, int_x_blue, int_y_blue); +#endif + if (png_crc_finish(png_ptr, 0)) + return; +} +#endif + +#if defined(PNG_READ_sRGB_SUPPORTED) +void /* PRIVATE */ +png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +{ + int intent; + png_byte buf[1]; + + png_debug(1, "in png_handle_sRGB\n"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before sRGB"); + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_warning(png_ptr, "Invalid sRGB after IDAT"); + png_crc_finish(png_ptr, length); + return; + } + else if (png_ptr->mode & PNG_HAVE_PLTE) + /* Should be an error, but we can cope with it */ + png_warning(png_ptr, "Out of place sRGB chunk"); + + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB)) + { + png_warning(png_ptr, "Duplicate sRGB chunk"); + png_crc_finish(png_ptr, length); + return; + } + + if (length != 1) + { + png_warning(png_ptr, "Incorrect sRGB chunk length"); + png_crc_finish(png_ptr, length); + return; + } + + png_crc_read(png_ptr, buf, 1); + if (png_crc_finish(png_ptr, 0)) + return; + + intent = buf[0]; + /* check for bad intent */ + if (intent >= PNG_sRGB_INTENT_LAST) + { + png_warning(png_ptr, "Unknown sRGB intent"); + return; + } + +#if defined(PNG_READ_gAMA_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED) + if ((info_ptr->valid & PNG_INFO_gAMA)) + { + int igamma; +#ifdef PNG_FIXED_POINT_SUPPORTED + igamma=(int)info_ptr->int_gamma; +#else +# ifdef PNG_FLOATING_POINT_SUPPORTED + igamma=(int)(info_ptr->gamma * 100000.); +# endif +#endif + if(igamma < 45000L || igamma > 46000L) + { + png_warning(png_ptr, + "Ignoring incorrect gAMA value when sRGB is also present"); +#ifndef PNG_NO_CONSOLE_IO +# ifdef PNG_FIXED_POINT_SUPPORTED + fprintf(stderr,"incorrect gamma=(%d/100000)\n",(int)png_ptr->int_gamma); +# else +# ifdef PNG_FLOATING_POINT_SUPPORTED + fprintf(stderr,"incorrect gamma=%f\n",png_ptr->gamma); +# endif +# endif +#endif + } + } +#endif /* PNG_READ_gAMA_SUPPORTED */ + +#ifdef PNG_READ_cHRM_SUPPORTED +#ifdef PNG_FIXED_POINT_SUPPORTED + if (info_ptr->valid & PNG_INFO_cHRM) + if (abs(info_ptr->int_x_white - 31270L) > 1000 || + abs(info_ptr->int_y_white - 32900L) > 1000 || + abs(info_ptr->int_x_red - 64000L) > 1000 || + abs(info_ptr->int_y_red - 33000L) > 1000 || + abs(info_ptr->int_x_green - 30000L) > 1000 || + abs(info_ptr->int_y_green - 60000L) > 1000 || + abs(info_ptr->int_x_blue - 15000L) > 1000 || + abs(info_ptr->int_y_blue - 6000L) > 1000) + { + png_warning(png_ptr, + "Ignoring incorrect cHRM value when sRGB is also present"); + } +#endif /* PNG_FIXED_POINT_SUPPORTED */ +#endif /* PNG_READ_cHRM_SUPPORTED */ + + png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, intent); +} +#endif /* PNG_READ_sRGB_SUPPORTED */ + +#if defined(PNG_READ_iCCP_SUPPORTED) +void /* PRIVATE */ +png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +/* Note: this does not properly handle chunks that are > 64K under DOS */ +{ + png_charp chunkdata; + png_byte compression_type; + png_bytep pC; + png_charp profile; + png_uint_32 skip = 0; + png_uint_32 profile_size = 0; + png_uint_32 profile_length = 0; + png_size_t slength, prefix_length, data_length; + + png_debug(1, "in png_handle_iCCP\n"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before iCCP"); + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_warning(png_ptr, "Invalid iCCP after IDAT"); + png_crc_finish(png_ptr, length); + return; + } + else if (png_ptr->mode & PNG_HAVE_PLTE) + /* Should be an error, but we can cope with it */ + png_warning(png_ptr, "Out of place iCCP chunk"); + + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP)) + { + png_warning(png_ptr, "Duplicate iCCP chunk"); + png_crc_finish(png_ptr, length); + return; + } + +#ifdef PNG_MAX_MALLOC_64K + if (length > (png_uint_32)65535L) + { + png_warning(png_ptr, "iCCP chunk too large to fit in memory"); + skip = length - (png_uint_32)65535L; + length = (png_uint_32)65535L; + } +#endif + + chunkdata = (png_charp)png_malloc(png_ptr, length + 1); + slength = (png_size_t)length; + png_crc_read(png_ptr, (png_bytep)chunkdata, slength); + + if (png_crc_finish(png_ptr, skip)) + { + png_free(png_ptr, chunkdata); + return; + } + + chunkdata[slength] = 0x00; + + for (profile = chunkdata; *profile; profile++) + /* empty loop to find end of name */ ; + + ++profile; + + /* there should be at least one zero (the compression type byte) + following the separator, and we should be on it */ + if ( profile >= chunkdata + slength) + { + png_free(png_ptr, chunkdata); + png_warning(png_ptr, "Malformed iCCP chunk"); + return; + } + + /* compression_type should always be zero */ + compression_type = *profile++; + if (compression_type) + { + png_warning(png_ptr, "Ignoring nonzero compression type in iCCP chunk"); + compression_type=0x00; /* Reset it to zero (libpng-1.0.6 through 1.0.8 + wrote nonzero) */ + } + + prefix_length = profile - chunkdata; + chunkdata = png_decompress_chunk(png_ptr, compression_type, chunkdata, + slength, prefix_length, &data_length); + + profile_length = data_length - prefix_length; + + if ( prefix_length > data_length || profile_length < 4) + { + png_free(png_ptr, chunkdata); + png_warning(png_ptr, "Profile size field missing from iCCP chunk"); + return; + } + + /* Check the profile_size recorded in the first 32 bits of the ICC profile */ + pC = (png_bytep)(chunkdata+prefix_length); + profile_size = ((*(pC ))<<24) | + ((*(pC+1))<<16) | + ((*(pC+2))<< 8) | + ((*(pC+3)) ); + + if(profile_size < profile_length) + profile_length = profile_size; + + if(profile_size > profile_length) + { + png_free(png_ptr, chunkdata); + png_warning(png_ptr, "Ignoring truncated iCCP profile.\n"); + return; + } + + png_set_iCCP(png_ptr, info_ptr, chunkdata, compression_type, + chunkdata + prefix_length, profile_length); + png_free(png_ptr, chunkdata); +} +#endif /* PNG_READ_iCCP_SUPPORTED */ + +#if defined(PNG_READ_sPLT_SUPPORTED) +void /* PRIVATE */ +png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +/* Note: this does not properly handle chunks that are > 64K under DOS */ +{ + png_bytep chunkdata; + png_bytep entry_start; + png_sPLT_t new_palette; +#ifdef PNG_NO_POINTER_INDEXING + png_sPLT_entryp pp; +#endif + int data_length, entry_size, i; + png_uint_32 skip = 0; + png_size_t slength; + + png_debug(1, "in png_handle_sPLT\n"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before sPLT"); + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_warning(png_ptr, "Invalid sPLT after IDAT"); + png_crc_finish(png_ptr, length); + return; + } + +#ifdef PNG_MAX_MALLOC_64K + if (length > (png_uint_32)65535L) + { + png_warning(png_ptr, "sPLT chunk too large to fit in memory"); + skip = length - (png_uint_32)65535L; + length = (png_uint_32)65535L; + } +#endif + + chunkdata = (png_bytep)png_malloc(png_ptr, length + 1); + slength = (png_size_t)length; + png_crc_read(png_ptr, (png_bytep)chunkdata, slength); + + if (png_crc_finish(png_ptr, skip)) + { + png_free(png_ptr, chunkdata); + return; + } + + chunkdata[slength] = 0x00; + + for (entry_start = chunkdata; *entry_start; entry_start++) + /* empty loop to find end of name */ ; + ++entry_start; + + /* a sample depth should follow the separator, and we should be on it */ + if (entry_start > chunkdata + slength) + { + png_free(png_ptr, chunkdata); + png_warning(png_ptr, "malformed sPLT chunk"); + return; + } + + new_palette.depth = *entry_start++; + entry_size = (new_palette.depth == 8 ? 6 : 10); + data_length = (slength - (entry_start - chunkdata)); + + /* integrity-check the data length */ + if (data_length % entry_size) + { + png_free(png_ptr, chunkdata); + png_warning(png_ptr, "sPLT chunk has bad length"); + return; + } + + new_palette.nentries = data_length / entry_size; + new_palette.entries = (png_sPLT_entryp)png_malloc( + png_ptr, new_palette.nentries * sizeof(png_sPLT_entry)); + +#ifndef PNG_NO_POINTER_INDEXING + for (i = 0; i < new_palette.nentries; i++) + { + png_sPLT_entryp pp = new_palette.entries + i; + + if (new_palette.depth == 8) + { + pp->red = *entry_start++; + pp->green = *entry_start++; + pp->blue = *entry_start++; + pp->alpha = *entry_start++; + } + else + { + pp->red = png_get_uint_16(entry_start); entry_start += 2; + pp->green = png_get_uint_16(entry_start); entry_start += 2; + pp->blue = png_get_uint_16(entry_start); entry_start += 2; + pp->alpha = png_get_uint_16(entry_start); entry_start += 2; + } + pp->frequency = png_get_uint_16(entry_start); entry_start += 2; + } +#else + pp = new_palette.entries; + for (i = 0; i < new_palette.nentries; i++) + { + + if (new_palette.depth == 8) + { + pp[i].red = *entry_start++; + pp[i].green = *entry_start++; + pp[i].blue = *entry_start++; + pp[i].alpha = *entry_start++; + } + else + { + pp[i].red = png_get_uint_16(entry_start); entry_start += 2; + pp[i].green = png_get_uint_16(entry_start); entry_start += 2; + pp[i].blue = png_get_uint_16(entry_start); entry_start += 2; + pp[i].alpha = png_get_uint_16(entry_start); entry_start += 2; + } + pp->frequency = png_get_uint_16(entry_start); entry_start += 2; + } +#endif + + /* discard all chunk data except the name and stash that */ + new_palette.name = (png_charp)chunkdata; + + png_set_sPLT(png_ptr, info_ptr, &new_palette, 1); + + png_free(png_ptr, chunkdata); + png_free(png_ptr, new_palette.entries); +} +#endif /* PNG_READ_sPLT_SUPPORTED */ + +#if defined(PNG_READ_tRNS_SUPPORTED) +void /* PRIVATE */ +png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +{ + png_byte readbuf[PNG_MAX_PALETTE_LENGTH]; + + png_debug(1, "in png_handle_tRNS\n"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before tRNS"); + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_warning(png_ptr, "Invalid tRNS after IDAT"); + png_crc_finish(png_ptr, length); + return; + } + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS)) + { + png_warning(png_ptr, "Duplicate tRNS chunk"); + png_crc_finish(png_ptr, length); + return; + } + + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + if (!(png_ptr->mode & PNG_HAVE_PLTE)) + { + /* Should be an error, but we can cope with it */ + png_warning(png_ptr, "Missing PLTE before tRNS"); + } + else if (length > (png_uint_32)png_ptr->num_palette) + { + png_warning(png_ptr, "Incorrect tRNS chunk length"); + png_crc_finish(png_ptr, length); + return; + } + if (length == 0) + { + png_warning(png_ptr, "Zero length tRNS chunk"); + png_crc_finish(png_ptr, length); + return; + } + + png_crc_read(png_ptr, readbuf, (png_size_t)length); + png_ptr->num_trans = (png_uint_16)length; + } + else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) + { + png_byte buf[6]; + + if (length != 6) + { + png_warning(png_ptr, "Incorrect tRNS chunk length"); + png_crc_finish(png_ptr, length); + return; + } + + png_crc_read(png_ptr, buf, (png_size_t)length); + png_ptr->num_trans = 1; + png_ptr->trans_values.red = png_get_uint_16(buf); + png_ptr->trans_values.green = png_get_uint_16(buf + 2); + png_ptr->trans_values.blue = png_get_uint_16(buf + 4); + } + else if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY) + { + png_byte buf[6]; + + if (length != 2) + { + png_warning(png_ptr, "Incorrect tRNS chunk length"); + png_crc_finish(png_ptr, length); + return; + } + + png_crc_read(png_ptr, buf, 2); + png_ptr->num_trans = 1; + png_ptr->trans_values.gray = png_get_uint_16(buf); + } + else + { + png_warning(png_ptr, "tRNS chunk not allowed with alpha channel"); + png_crc_finish(png_ptr, length); + return; + } + + if (png_crc_finish(png_ptr, 0)) + return; + + png_set_tRNS(png_ptr, info_ptr, readbuf, png_ptr->num_trans, + &(png_ptr->trans_values)); +} +#endif + +#if defined(PNG_READ_bKGD_SUPPORTED) +void /* PRIVATE */ +png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +{ + png_size_t truelen; + png_byte buf[6]; + + png_debug(1, "in png_handle_bKGD\n"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before bKGD"); + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_warning(png_ptr, "Invalid bKGD after IDAT"); + png_crc_finish(png_ptr, length); + return; + } + else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && + !(png_ptr->mode & PNG_HAVE_PLTE)) + { + png_warning(png_ptr, "Missing PLTE before bKGD"); + png_crc_finish(png_ptr, length); + return; + } + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD)) + { + png_warning(png_ptr, "Duplicate bKGD chunk"); + png_crc_finish(png_ptr, length); + return; + } + + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + truelen = 1; + else if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) + truelen = 6; + else + truelen = 2; + + if (length != truelen) + { + png_warning(png_ptr, "Incorrect bKGD chunk length"); + png_crc_finish(png_ptr, length); + return; + } + + png_crc_read(png_ptr, buf, truelen); + if (png_crc_finish(png_ptr, 0)) + return; + + /* We convert the index value into RGB components so that we can allow + * arbitrary RGB values for background when we have transparency, and + * so it is easy to determine the RGB values of the background color + * from the info_ptr struct. */ + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + png_ptr->background.index = buf[0]; + if(info_ptr->num_palette) + { + if(buf[0] > info_ptr->num_palette) + { + png_warning(png_ptr, "Incorrect bKGD chunk index value"); + return; + } + png_ptr->background.red = + (png_uint_16)png_ptr->palette[buf[0]].red; + png_ptr->background.green = + (png_uint_16)png_ptr->palette[buf[0]].green; + png_ptr->background.blue = + (png_uint_16)png_ptr->palette[buf[0]].blue; + } + } + else if (!(png_ptr->color_type & PNG_COLOR_MASK_COLOR)) /* GRAY */ + { + png_ptr->background.red = + png_ptr->background.green = + png_ptr->background.blue = + png_ptr->background.gray = png_get_uint_16(buf); + } + else + { + png_ptr->background.red = png_get_uint_16(buf); + png_ptr->background.green = png_get_uint_16(buf + 2); + png_ptr->background.blue = png_get_uint_16(buf + 4); + } + + png_set_bKGD(png_ptr, info_ptr, &(png_ptr->background)); +} +#endif + +#if defined(PNG_READ_hIST_SUPPORTED) +void /* PRIVATE */ +png_handle_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +{ + int num, i; + png_uint_16 readbuf[PNG_MAX_PALETTE_LENGTH]; + + png_debug(1, "in png_handle_hIST\n"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before hIST"); + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_warning(png_ptr, "Invalid hIST after IDAT"); + png_crc_finish(png_ptr, length); + return; + } + else if (!(png_ptr->mode & PNG_HAVE_PLTE)) + { + png_warning(png_ptr, "Missing PLTE before hIST"); + png_crc_finish(png_ptr, length); + return; + } + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST)) + { + png_warning(png_ptr, "Duplicate hIST chunk"); + png_crc_finish(png_ptr, length); + return; + } + + num = (int)length / 2 ; + if (num != png_ptr->num_palette) + { + png_warning(png_ptr, "Incorrect hIST chunk length"); + png_crc_finish(png_ptr, length); + return; + } + + for (i = 0; i < num; i++) + { + png_byte buf[2]; + + png_crc_read(png_ptr, buf, 2); + readbuf[i] = png_get_uint_16(buf); + } + + if (png_crc_finish(png_ptr, 0)) + return; + + png_set_hIST(png_ptr, info_ptr, readbuf); +} +#endif + +#if defined(PNG_READ_pHYs_SUPPORTED) +void /* PRIVATE */ +png_handle_pHYs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +{ + png_byte buf[9]; + png_uint_32 res_x, res_y; + int unit_type; + + png_debug(1, "in png_handle_pHYs\n"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before pHYs"); + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_warning(png_ptr, "Invalid pHYs after IDAT"); + png_crc_finish(png_ptr, length); + return; + } + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) + { + png_warning(png_ptr, "Duplicate pHYs chunk"); + png_crc_finish(png_ptr, length); + return; + } + + if (length != 9) + { + png_warning(png_ptr, "Incorrect pHYs chunk length"); + png_crc_finish(png_ptr, length); + return; + } + + png_crc_read(png_ptr, buf, 9); + if (png_crc_finish(png_ptr, 0)) + return; + + res_x = png_get_uint_32(buf); + res_y = png_get_uint_32(buf + 4); + unit_type = buf[8]; + png_set_pHYs(png_ptr, info_ptr, res_x, res_y, unit_type); +} +#endif + +#if defined(PNG_READ_oFFs_SUPPORTED) +void /* PRIVATE */ +png_handle_oFFs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +{ + png_byte buf[9]; + png_int_32 offset_x, offset_y; + int unit_type; + + png_debug(1, "in png_handle_oFFs\n"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before oFFs"); + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_warning(png_ptr, "Invalid oFFs after IDAT"); + png_crc_finish(png_ptr, length); + return; + } + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) + { + png_warning(png_ptr, "Duplicate oFFs chunk"); + png_crc_finish(png_ptr, length); + return; + } + + if (length != 9) + { + png_warning(png_ptr, "Incorrect oFFs chunk length"); + png_crc_finish(png_ptr, length); + return; + } + + png_crc_read(png_ptr, buf, 9); + if (png_crc_finish(png_ptr, 0)) + return; + + offset_x = png_get_int_32(buf); + offset_y = png_get_int_32(buf + 4); + unit_type = buf[8]; + png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y, unit_type); +} +#endif + +#if defined(PNG_READ_pCAL_SUPPORTED) +/* read the pCAL chunk (described in the PNG Extensions document) */ +void /* PRIVATE */ +png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +{ + png_charp purpose; + png_int_32 X0, X1; + png_byte type, nparams; + png_charp buf, units, endptr; + png_charpp params; + png_size_t slength; + int i; + + png_debug(1, "in png_handle_pCAL\n"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before pCAL"); + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_warning(png_ptr, "Invalid pCAL after IDAT"); + png_crc_finish(png_ptr, length); + return; + } + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL)) + { + png_warning(png_ptr, "Duplicate pCAL chunk"); + png_crc_finish(png_ptr, length); + return; + } + + png_debug1(2, "Allocating and reading pCAL chunk data (%lu bytes)\n", + length + 1); + purpose = (png_charp)png_malloc_warn(png_ptr, length + 1); + if (purpose == NULL) + { + png_warning(png_ptr, "No memory for pCAL purpose."); + return; + } + slength = (png_size_t)length; + png_crc_read(png_ptr, (png_bytep)purpose, slength); + + if (png_crc_finish(png_ptr, 0)) + { + png_free(png_ptr, purpose); + return; + } + + purpose[slength] = 0x00; /* null terminate the last string */ + + png_debug(3, "Finding end of pCAL purpose string\n"); + for (buf = purpose; *buf; buf++) + /* empty loop */ ; + + endptr = purpose + slength; + + /* We need to have at least 12 bytes after the purpose string + in order to get the parameter information. */ + if (endptr <= buf + 12) + { + png_warning(png_ptr, "Invalid pCAL data"); + png_free(png_ptr, purpose); + return; + } + + png_debug(3, "Reading pCAL X0, X1, type, nparams, and units\n"); + X0 = png_get_int_32((png_bytep)buf+1); + X1 = png_get_int_32((png_bytep)buf+5); + type = buf[9]; + nparams = buf[10]; + units = buf + 11; + + png_debug(3, "Checking pCAL equation type and number of parameters\n"); + /* Check that we have the right number of parameters for known + equation types. */ + if ((type == PNG_EQUATION_LINEAR && nparams != 2) || + (type == PNG_EQUATION_BASE_E && nparams != 3) || + (type == PNG_EQUATION_ARBITRARY && nparams != 3) || + (type == PNG_EQUATION_HYPERBOLIC && nparams != 4)) + { + png_warning(png_ptr, "Invalid pCAL parameters for equation type"); + png_free(png_ptr, purpose); + return; + } + else if (type >= PNG_EQUATION_LAST) + { + png_warning(png_ptr, "Unrecognized equation type for pCAL chunk"); + } + + for (buf = units; *buf; buf++) + /* Empty loop to move past the units string. */ ; + + png_debug(3, "Allocating pCAL parameters array\n"); + params = (png_charpp)png_malloc_warn(png_ptr, (png_uint_32)(nparams + *sizeof(png_charp))) ; + if (params == NULL) + { + png_free(png_ptr, purpose); + png_warning(png_ptr, "No memory for pCAL params."); + return; + } + + /* Get pointers to the start of each parameter string. */ + for (i = 0; i < (int)nparams; i++) + { + buf++; /* Skip the null string terminator from previous parameter. */ + + png_debug1(3, "Reading pCAL parameter %d\n", i); + for (params[i] = buf; *buf != 0x00 && buf <= endptr; buf++) + /* Empty loop to move past each parameter string */ ; + + /* Make sure we haven't run out of data yet */ + if (buf > endptr) + { + png_warning(png_ptr, "Invalid pCAL data"); + png_free(png_ptr, purpose); + png_free(png_ptr, params); + return; + } + } + + png_set_pCAL(png_ptr, info_ptr, purpose, X0, X1, type, nparams, + units, params); + + png_free(png_ptr, purpose); + png_free(png_ptr, params); +} +#endif + +#if defined(PNG_READ_sCAL_SUPPORTED) +/* read the sCAL chunk */ +void /* PRIVATE */ +png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +{ + png_charp buffer, ep; +#ifdef PNG_FLOATING_POINT_SUPPORTED + double width, height; + png_charp vp; +#else +#ifdef PNG_FIXED_POINT_SUPPORTED + png_charp swidth, sheight; +#endif +#endif + png_size_t slength; + + png_debug(1, "in png_handle_sCAL\n"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before sCAL"); + else if (png_ptr->mode & PNG_HAVE_IDAT) + { + png_warning(png_ptr, "Invalid sCAL after IDAT"); + png_crc_finish(png_ptr, length); + return; + } + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sCAL)) + { + png_warning(png_ptr, "Duplicate sCAL chunk"); + png_crc_finish(png_ptr, length); + return; + } + + png_debug1(2, "Allocating and reading sCAL chunk data (%lu bytes)\n", + length + 1); + buffer = (png_charp)png_malloc_warn(png_ptr, length + 1); + if (buffer == NULL) + { + png_warning(png_ptr, "Out of memory while processing sCAL chunk"); + return; + } + slength = (png_size_t)length; + png_crc_read(png_ptr, (png_bytep)buffer, slength); + + if (png_crc_finish(png_ptr, 0)) + { + png_free(png_ptr, buffer); + return; + } + + buffer[slength] = 0x00; /* null terminate the last string */ + + ep = buffer + 1; /* skip unit byte */ + +#ifdef PNG_FLOATING_POINT_SUPPORTED + width = strtod(ep, &vp); + if (*vp) + { + png_warning(png_ptr, "malformed width string in sCAL chunk"); + return; + } +#else +#ifdef PNG_FIXED_POINT_SUPPORTED + swidth = (png_charp)png_malloc_warn(png_ptr, png_strlen(ep) + 1); + if (swidth == NULL) + { + png_warning(png_ptr, "Out of memory while processing sCAL chunk width"); + return; + } + png_memcpy(swidth, ep, (png_size_t)png_strlen(ep)); +#endif +#endif + + for (ep = buffer; *ep; ep++) + /* empty loop */ ; + ep++; + +#ifdef PNG_FLOATING_POINT_SUPPORTED + height = strtod(ep, &vp); + if (*vp) + { + png_warning(png_ptr, "malformed height string in sCAL chunk"); + return; + } +#else +#ifdef PNG_FIXED_POINT_SUPPORTED + sheight = (png_charp)png_malloc_warn(png_ptr, png_strlen(ep) + 1); + if (swidth == NULL) + { + png_warning(png_ptr, "Out of memory while processing sCAL chunk height"); + return; + } + png_memcpy(sheight, ep, (png_size_t)png_strlen(ep)); +#endif +#endif + + if (buffer + slength < ep +#ifdef PNG_FLOATING_POINT_SUPPORTED + || width <= 0. || height <= 0. +#endif + ) + { + png_warning(png_ptr, "Invalid sCAL data"); + png_free(png_ptr, buffer); +#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED) + png_free(png_ptr, swidth); + png_free(png_ptr, sheight); +#endif + return; + } + + +#ifdef PNG_FLOATING_POINT_SUPPORTED + png_set_sCAL(png_ptr, info_ptr, buffer[0], width, height); +#else +#ifdef PNG_FIXED_POINT_SUPPORTED + png_set_sCAL_s(png_ptr, info_ptr, buffer[0], swidth, sheight); +#endif +#endif + + png_free(png_ptr, buffer); +#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED) + png_free(png_ptr, swidth); + png_free(png_ptr, sheight); +#endif +} +#endif + +#if defined(PNG_READ_tIME_SUPPORTED) +void /* PRIVATE */ +png_handle_tIME(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +{ + png_byte buf[7]; + png_time mod_time; + + png_debug(1, "in png_handle_tIME\n"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Out of place tIME chunk"); + else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME)) + { + png_warning(png_ptr, "Duplicate tIME chunk"); + png_crc_finish(png_ptr, length); + return; + } + + if (png_ptr->mode & PNG_HAVE_IDAT) + png_ptr->mode |= PNG_AFTER_IDAT; + + if (length != 7) + { + png_warning(png_ptr, "Incorrect tIME chunk length"); + png_crc_finish(png_ptr, length); + return; + } + + png_crc_read(png_ptr, buf, 7); + if (png_crc_finish(png_ptr, 0)) + return; + + mod_time.second = buf[6]; + mod_time.minute = buf[5]; + mod_time.hour = buf[4]; + mod_time.day = buf[3]; + mod_time.month = buf[2]; + mod_time.year = png_get_uint_16(buf); + + png_set_tIME(png_ptr, info_ptr, &mod_time); +} +#endif + +#if defined(PNG_READ_tEXt_SUPPORTED) +/* Note: this does not properly handle chunks that are > 64K under DOS */ +void /* PRIVATE */ +png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +{ + png_textp text_ptr; + png_charp key; + png_charp text; + png_uint_32 skip = 0; + png_size_t slength; + int ret; + + png_debug(1, "in png_handle_tEXt\n"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before tEXt"); + + if (png_ptr->mode & PNG_HAVE_IDAT) + png_ptr->mode |= PNG_AFTER_IDAT; + +#ifdef PNG_MAX_MALLOC_64K + if (length > (png_uint_32)65535L) + { + png_warning(png_ptr, "tEXt chunk too large to fit in memory"); + skip = length - (png_uint_32)65535L; + length = (png_uint_32)65535L; + } +#endif + + key = (png_charp)png_malloc_warn(png_ptr, length + 1); + if (key == NULL) + { + png_warning(png_ptr, "No memory to process text chunk."); + return; + } + slength = (png_size_t)length; + png_crc_read(png_ptr, (png_bytep)key, slength); + + if (png_crc_finish(png_ptr, skip)) + { + png_free(png_ptr, key); + return; + } + + key[slength] = 0x00; + + for (text = key; *text; text++) + /* empty loop to find end of key */ ; + + if (text != key + slength) + text++; + + text_ptr = (png_textp)png_malloc_warn(png_ptr, (png_uint_32)sizeof(png_text)); + if (text_ptr == NULL) + { + png_warning(png_ptr, "Not enough memory to process text chunk."); + png_free(png_ptr, key); + return; + } + text_ptr->compression = PNG_TEXT_COMPRESSION_NONE; + text_ptr->key = key; +#ifdef PNG_iTXt_SUPPORTED + text_ptr->lang = NULL; + text_ptr->lang_key = NULL; + text_ptr->itxt_length = 0; +#endif + text_ptr->text = text; + text_ptr->text_length = png_strlen(text); + + ret=png_set_text_2(png_ptr, info_ptr, text_ptr, 1); + + png_free(png_ptr, key); + png_free(png_ptr, text_ptr); + if (ret) + png_warning(png_ptr, "Insufficient memory to process text chunk."); +} +#endif + +#if defined(PNG_READ_zTXt_SUPPORTED) +/* note: this does not correctly handle chunks that are > 64K under DOS */ +void /* PRIVATE */ +png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +{ + png_textp text_ptr; + png_charp chunkdata; + png_charp text; + int comp_type; + int ret; + png_size_t slength, prefix_len, data_len; + + png_debug(1, "in png_handle_zTXt\n"); + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before zTXt"); + + if (png_ptr->mode & PNG_HAVE_IDAT) + png_ptr->mode |= PNG_AFTER_IDAT; + +#ifdef PNG_MAX_MALLOC_64K + /* We will no doubt have problems with chunks even half this size, but + there is no hard and fast rule to tell us where to stop. */ + if (length > (png_uint_32)65535L) + { + png_warning(png_ptr,"zTXt chunk too large to fit in memory"); + png_crc_finish(png_ptr, length); + return; + } +#endif + + chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); + if (chunkdata == NULL) + { + png_warning(png_ptr,"Out of memory processing zTXt chunk."); + return; + } + slength = (png_size_t)length; + png_crc_read(png_ptr, (png_bytep)chunkdata, slength); + if (png_crc_finish(png_ptr, 0)) + { + png_free(png_ptr, chunkdata); + return; + } + + chunkdata[slength] = 0x00; + + for (text = chunkdata; *text; text++) + /* empty loop */ ; + + /* zTXt must have some text after the chunkdataword */ + if (text == chunkdata + slength) + { + comp_type = PNG_TEXT_COMPRESSION_NONE; + png_warning(png_ptr, "Zero length zTXt chunk"); + } + else + { + comp_type = *(++text); + if (comp_type != PNG_TEXT_COMPRESSION_zTXt) + { + png_warning(png_ptr, "Unknown compression type in zTXt chunk"); + comp_type = PNG_TEXT_COMPRESSION_zTXt; + } + text++; /* skip the compression_method byte */ + } + prefix_len = text - chunkdata; + + chunkdata = (png_charp)png_decompress_chunk(png_ptr, comp_type, chunkdata, + (png_size_t)length, prefix_len, &data_len); + + text_ptr = (png_textp)png_malloc_warn(png_ptr, (png_uint_32)sizeof(png_text)); + if (text_ptr == NULL) + { + png_warning(png_ptr,"Not enough memory to process zTXt chunk."); + png_free(png_ptr, chunkdata); + return; + } + text_ptr->compression = comp_type; + text_ptr->key = chunkdata; +#ifdef PNG_iTXt_SUPPORTED + text_ptr->lang = NULL; + text_ptr->lang_key = NULL; + text_ptr->itxt_length = 0; +#endif + text_ptr->text = chunkdata + prefix_len; + text_ptr->text_length = data_len; + + ret=png_set_text_2(png_ptr, info_ptr, text_ptr, 1); + + png_free(png_ptr, text_ptr); + png_free(png_ptr, chunkdata); + if (ret) + png_error(png_ptr, "Insufficient memory to store zTXt chunk."); +} +#endif + +#if defined(PNG_READ_iTXt_SUPPORTED) +/* note: this does not correctly handle chunks that are > 64K under DOS */ +void /* PRIVATE */ +png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +{ + png_textp text_ptr; + png_charp chunkdata; + png_charp key, lang, text, lang_key; + int comp_flag; + int comp_type = 0; + int ret; + png_size_t slength, prefix_len, data_len; + + png_debug(1, "in png_handle_iTXt\n"); + + if (!(png_ptr->mode & PNG_HAVE_IHDR)) + png_error(png_ptr, "Missing IHDR before iTXt"); + + if (png_ptr->mode & PNG_HAVE_IDAT) + png_ptr->mode |= PNG_AFTER_IDAT; + +#ifdef PNG_MAX_MALLOC_64K + /* We will no doubt have problems with chunks even half this size, but + there is no hard and fast rule to tell us where to stop. */ + if (length > (png_uint_32)65535L) + { + png_warning(png_ptr,"iTXt chunk too large to fit in memory"); + png_crc_finish(png_ptr, length); + return; + } +#endif + + chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); + if (chunkdata == NULL) + { + png_warning(png_ptr, "No memory to process iTXt chunk."); + return; + } + slength = (png_size_t)length; + png_crc_read(png_ptr, (png_bytep)chunkdata, slength); + if (png_crc_finish(png_ptr, 0)) + { + png_free(png_ptr, chunkdata); + return; + } + + chunkdata[slength] = 0x00; + + for (lang = chunkdata; *lang; lang++) + /* empty loop */ ; + lang++; /* skip NUL separator */ + + /* iTXt must have a language tag (possibly empty), two compression bytes, + translated keyword (possibly empty), and possibly some text after the + keyword */ + + if (lang >= chunkdata + slength) + { + comp_flag = PNG_TEXT_COMPRESSION_NONE; + png_warning(png_ptr, "Zero length iTXt chunk"); + } + else + { + comp_flag = *lang++; + comp_type = *lang++; + } + + for (lang_key = lang; *lang_key; lang_key++) + /* empty loop */ ; + lang_key++; /* skip NUL separator */ + + for (text = lang_key; *text; text++) + /* empty loop */ ; + text++; /* skip NUL separator */ + + prefix_len = text - chunkdata; + + key=chunkdata; + if (comp_flag) + chunkdata = png_decompress_chunk(png_ptr, comp_type, chunkdata, + (size_t)length, prefix_len, &data_len); + else + data_len=png_strlen(chunkdata + prefix_len); + text_ptr = (png_textp)png_malloc_warn(png_ptr, (png_uint_32)sizeof(png_text)); + if (text_ptr == NULL) + { + png_warning(png_ptr,"Not enough memory to process iTXt chunk."); + png_free(png_ptr, chunkdata); + return; + } + text_ptr->compression = (int)comp_flag + 1; + text_ptr->lang_key = chunkdata+(lang_key-key); + text_ptr->lang = chunkdata+(lang-key); + text_ptr->itxt_length = data_len; + text_ptr->text_length = 0; + text_ptr->key = chunkdata; + text_ptr->text = chunkdata + prefix_len; + + ret=png_set_text_2(png_ptr, info_ptr, text_ptr, 1); + + png_free(png_ptr, text_ptr); + png_free(png_ptr, chunkdata); + if (ret) + png_error(png_ptr, "Insufficient memory to store iTXt chunk."); +} +#endif + +/* This function is called when we haven't found a handler for a + chunk. If there isn't a problem with the chunk itself (ie bad + chunk name, CRC, or a critical chunk), the chunk is silently ignored + -- unless the PNG_FLAG_UNKNOWN_CHUNKS_SUPPORTED flag is on in which + case it will be saved away to be written out later. */ +void /* PRIVATE */ +png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) +{ + png_uint_32 skip = 0; + + png_debug(1, "in png_handle_unknown\n"); + + if (png_ptr->mode & PNG_HAVE_IDAT) + { +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_IDAT; +#endif + if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) /* not an IDAT */ + png_ptr->mode |= PNG_AFTER_IDAT; + } + + png_check_chunk_name(png_ptr, png_ptr->chunk_name); + + if (!(png_ptr->chunk_name[0] & 0x20)) + { +#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) + if(png_handle_as_unknown(png_ptr, png_ptr->chunk_name) != + HANDLE_CHUNK_ALWAYS +#if defined(PNG_READ_USER_CHUNKS_SUPPORTED) + && png_ptr->read_user_chunk_fn == NULL +#endif + ) +#endif + png_chunk_error(png_ptr, "unknown critical chunk"); + } + +#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) + if (png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS) + { + png_unknown_chunk chunk; + +#ifdef PNG_MAX_MALLOC_64K + if (length > (png_uint_32)65535L) + { + png_warning(png_ptr, "unknown chunk too large to fit in memory"); + skip = length - (png_uint_32)65535L; + length = (png_uint_32)65535L; + } +#endif + png_strcpy((png_charp)chunk.name, (png_charp)png_ptr->chunk_name); + chunk.data = (png_bytep)png_malloc(png_ptr, length); + chunk.size = (png_size_t)length; + png_crc_read(png_ptr, (png_bytep)chunk.data, length); +#if defined(PNG_READ_USER_CHUNKS_SUPPORTED) + if(png_ptr->read_user_chunk_fn != NULL) + { + /* callback to user unknown chunk handler */ + if ((*(png_ptr->read_user_chunk_fn)) (png_ptr, &chunk) <= 0) + { + if (!(png_ptr->chunk_name[0] & 0x20)) + if(png_handle_as_unknown(png_ptr, png_ptr->chunk_name) != + HANDLE_CHUNK_ALWAYS) + { + png_free(png_ptr, chunk.data); + png_chunk_error(png_ptr, "unknown critical chunk"); + } + png_set_unknown_chunks(png_ptr, info_ptr, &chunk, 1); + } + } + else +#endif + png_set_unknown_chunks(png_ptr, info_ptr, &chunk, 1); + png_free(png_ptr, chunk.data); + } + else +#endif + skip = length; + + png_crc_finish(png_ptr, skip); + +#if !defined(PNG_READ_USER_CHUNKS_SUPPORTED) + info_ptr = info_ptr; /* quiet compiler warnings about unused info_ptr */ +#endif +} + +/* This function is called to verify that a chunk name is valid. + This function can't have the "critical chunk check" incorporated + into it, since in the future we will need to be able to call user + functions to handle unknown critical chunks after we check that + the chunk name itself is valid. */ + +#define isnonalpha(c) ((c) < 41 || (c) > 122 || ((c) > 90 && (c) < 97)) + +void /* PRIVATE */ +png_check_chunk_name(png_structp png_ptr, png_bytep chunk_name) +{ + png_debug(1, "in png_check_chunk_name\n"); + if (isnonalpha(chunk_name[0]) || isnonalpha(chunk_name[1]) || + isnonalpha(chunk_name[2]) || isnonalpha(chunk_name[3])) + { + png_chunk_error(png_ptr, "invalid chunk type"); + } +} + +/* Combines the row recently read in with the existing pixels in the + row. This routine takes care of alpha and transparency if requested. + This routine also handles the two methods of progressive display + of interlaced images, depending on the mask value. + The mask value describes which pixels are to be combined with + the row. The pattern always repeats every 8 pixels, so just 8 + bits are needed. A one indicates the pixel is to be combined, + a zero indicates the pixel is to be skipped. This is in addition + to any alpha or transparency value associated with the pixel. If + you want all pixels to be combined, pass 0xff (255) in mask. */ +#ifndef PNG_HAVE_ASSEMBLER_COMBINE_ROW +void /* PRIVATE */ +png_combine_row(png_structp png_ptr, png_bytep row, int mask) +{ + png_debug(1,"in png_combine_row\n"); + if (mask == 0xff) + { + png_memcpy(row, png_ptr->row_buf + 1, + (png_size_t)((png_ptr->width * + png_ptr->row_info.pixel_depth + 7) >> 3)); + } + else + { + switch (png_ptr->row_info.pixel_depth) + { + case 1: + { + png_bytep sp = png_ptr->row_buf + 1; + png_bytep dp = row; + int s_inc, s_start, s_end; + int m = 0x80; + int shift; + png_uint_32 i; + png_uint_32 row_width = png_ptr->width; + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + if (png_ptr->transformations & PNG_PACKSWAP) + { + s_start = 0; + s_end = 7; + s_inc = 1; + } + else +#endif + { + s_start = 7; + s_end = 0; + s_inc = -1; + } + + shift = s_start; + + for (i = 0; i < row_width; i++) + { + if (m & mask) + { + int value; + + value = (*sp >> shift) & 0x01; + *dp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff); + *dp |= (png_byte)(value << shift); + } + + if (shift == s_end) + { + shift = s_start; + sp++; + dp++; + } + else + shift += s_inc; + + if (m == 1) + m = 0x80; + else + m >>= 1; + } + break; + } + case 2: + { + png_bytep sp = png_ptr->row_buf + 1; + png_bytep dp = row; + int s_start, s_end, s_inc; + int m = 0x80; + int shift; + png_uint_32 i; + png_uint_32 row_width = png_ptr->width; + int value; + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + if (png_ptr->transformations & PNG_PACKSWAP) + { + s_start = 0; + s_end = 6; + s_inc = 2; + } + else +#endif + { + s_start = 6; + s_end = 0; + s_inc = -2; + } + + shift = s_start; + + for (i = 0; i < row_width; i++) + { + if (m & mask) + { + value = (*sp >> shift) & 0x03; + *dp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); + *dp |= (png_byte)(value << shift); + } + + if (shift == s_end) + { + shift = s_start; + sp++; + dp++; + } + else + shift += s_inc; + if (m == 1) + m = 0x80; + else + m >>= 1; + } + break; + } + case 4: + { + png_bytep sp = png_ptr->row_buf + 1; + png_bytep dp = row; + int s_start, s_end, s_inc; + int m = 0x80; + int shift; + png_uint_32 i; + png_uint_32 row_width = png_ptr->width; + int value; + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + if (png_ptr->transformations & PNG_PACKSWAP) + { + s_start = 0; + s_end = 4; + s_inc = 4; + } + else +#endif + { + s_start = 4; + s_end = 0; + s_inc = -4; + } + shift = s_start; + + for (i = 0; i < row_width; i++) + { + if (m & mask) + { + value = (*sp >> shift) & 0xf; + *dp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); + *dp |= (png_byte)(value << shift); + } + + if (shift == s_end) + { + shift = s_start; + sp++; + dp++; + } + else + shift += s_inc; + if (m == 1) + m = 0x80; + else + m >>= 1; + } + break; + } + default: + { + png_bytep sp = png_ptr->row_buf + 1; + png_bytep dp = row; + png_size_t pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); + png_uint_32 i; + png_uint_32 row_width = png_ptr->width; + png_byte m = 0x80; + + + for (i = 0; i < row_width; i++) + { + if (m & mask) + { + png_memcpy(dp, sp, pixel_bytes); + } + + sp += pixel_bytes; + dp += pixel_bytes; + + if (m == 1) + m = 0x80; + else + m >>= 1; + } + break; + } + } + } +} +#endif /* !PNG_HAVE_ASSEMBLER_COMBINE_ROW */ + +#ifdef PNG_READ_INTERLACING_SUPPORTED +#ifndef PNG_HAVE_ASSEMBLER_READ_INTERLACE /* else in pngvcrd.c, pnggccrd.c */ +/* OLD pre-1.0.9 interface: +void png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass, + png_uint_32 transformations) + */ +void /* PRIVATE */ +png_do_read_interlace(png_structp png_ptr) +{ + png_row_infop row_info = &(png_ptr->row_info); + png_bytep row = png_ptr->row_buf + 1; + int pass = png_ptr->pass; + png_uint_32 transformations = png_ptr->transformations; +#ifdef PNG_USE_LOCAL_ARRAYS + /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */ + /* offset to next interlace block */ + const int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; +#endif + + png_debug(1,"in png_do_read_interlace (stock C version)\n"); + if (row != NULL && row_info != NULL) + { + png_uint_32 final_width; + + final_width = row_info->width * png_pass_inc[pass]; + + switch (row_info->pixel_depth) + { + case 1: + { + png_bytep sp = row + (png_size_t)((row_info->width - 1) >> 3); + png_bytep dp = row + (png_size_t)((final_width - 1) >> 3); + int sshift, dshift; + int s_start, s_end, s_inc; + int jstop = png_pass_inc[pass]; + png_byte v; + png_uint_32 i; + int j; + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + if (transformations & PNG_PACKSWAP) + { + sshift = (int)((row_info->width + 7) & 0x07); + dshift = (int)((final_width + 7) & 0x07); + s_start = 7; + s_end = 0; + s_inc = -1; + } + else +#endif + { + sshift = 7 - (int)((row_info->width + 7) & 0x07); + dshift = 7 - (int)((final_width + 7) & 0x07); + s_start = 0; + s_end = 7; + s_inc = 1; + } + + for (i = 0; i < row_info->width; i++) + { + v = (png_byte)((*sp >> sshift) & 0x01); + for (j = 0; j < jstop; j++) + { + *dp &= (png_byte)((0x7f7f >> (7 - dshift)) & 0xff); + *dp |= (png_byte)(v << dshift); + if (dshift == s_end) + { + dshift = s_start; + dp--; + } + else + dshift += s_inc; + } + if (sshift == s_end) + { + sshift = s_start; + sp--; + } + else + sshift += s_inc; + } + break; + } + case 2: + { + png_bytep sp = row + (png_uint_32)((row_info->width - 1) >> 2); + png_bytep dp = row + (png_uint_32)((final_width - 1) >> 2); + int sshift, dshift; + int s_start, s_end, s_inc; + int jstop = png_pass_inc[pass]; + png_uint_32 i; + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + if (transformations & PNG_PACKSWAP) + { + sshift = (int)(((row_info->width + 3) & 0x03) << 1); + dshift = (int)(((final_width + 3) & 0x03) << 1); + s_start = 6; + s_end = 0; + s_inc = -2; + } + else +#endif + { + sshift = (int)((3 - ((row_info->width + 3) & 0x03)) << 1); + dshift = (int)((3 - ((final_width + 3) & 0x03)) << 1); + s_start = 0; + s_end = 6; + s_inc = 2; + } + + for (i = 0; i < row_info->width; i++) + { + png_byte v; + int j; + + v = (png_byte)((*sp >> sshift) & 0x03); + for (j = 0; j < jstop; j++) + { + *dp &= (png_byte)((0x3f3f >> (6 - dshift)) & 0xff); + *dp |= (png_byte)(v << dshift); + if (dshift == s_end) + { + dshift = s_start; + dp--; + } + else + dshift += s_inc; + } + if (sshift == s_end) + { + sshift = s_start; + sp--; + } + else + sshift += s_inc; + } + break; + } + case 4: + { + png_bytep sp = row + (png_size_t)((row_info->width - 1) >> 1); + png_bytep dp = row + (png_size_t)((final_width - 1) >> 1); + int sshift, dshift; + int s_start, s_end, s_inc; + png_uint_32 i; + int jstop = png_pass_inc[pass]; + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + if (transformations & PNG_PACKSWAP) + { + sshift = (int)(((row_info->width + 1) & 0x01) << 2); + dshift = (int)(((final_width + 1) & 0x01) << 2); + s_start = 4; + s_end = 0; + s_inc = -4; + } + else +#endif + { + sshift = (int)((1 - ((row_info->width + 1) & 0x01)) << 2); + dshift = (int)((1 - ((final_width + 1) & 0x01)) << 2); + s_start = 0; + s_end = 4; + s_inc = 4; + } + + for (i = 0; i < row_info->width; i++) + { + png_byte v = (png_byte)((*sp >> sshift) & 0xf); + int j; + + for (j = 0; j < jstop; j++) + { + *dp &= (png_byte)((0xf0f >> (4 - dshift)) & 0xff); + *dp |= (png_byte)(v << dshift); + if (dshift == s_end) + { + dshift = s_start; + dp--; + } + else + dshift += s_inc; + } + if (sshift == s_end) + { + sshift = s_start; + sp--; + } + else + sshift += s_inc; + } + break; + } + default: + { + png_size_t pixel_bytes = (row_info->pixel_depth >> 3); + png_bytep sp = row + (png_size_t)(row_info->width - 1) * pixel_bytes; + png_bytep dp = row + (png_size_t)(final_width - 1) * pixel_bytes; + + int jstop = png_pass_inc[pass]; + png_uint_32 i; + + for (i = 0; i < row_info->width; i++) + { + png_byte v[8]; + int j; + + png_memcpy(v, sp, pixel_bytes); + for (j = 0; j < jstop; j++) + { + png_memcpy(dp, v, pixel_bytes); + dp -= pixel_bytes; + } + sp -= pixel_bytes; + } + break; + } + } + row_info->width = final_width; + row_info->rowbytes = ((final_width * + (png_uint_32)row_info->pixel_depth + 7) >> 3); + } +#if !defined(PNG_READ_PACKSWAP_SUPPORTED) + transformations = transformations; /* silence compiler warning */ +#endif +} +#endif /* !PNG_HAVE_ASSEMBLER_READ_INTERLACE */ +#endif /* PNG_READ_INTERLACING_SUPPORTED */ + +#ifndef PNG_HAVE_ASSEMBLER_READ_FILTER_ROW +void /* PRIVATE */ +png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row, + png_bytep prev_row, int filter) +{ + png_debug(1, "in png_read_filter_row\n"); + png_debug2(2,"row = %lu, filter = %d\n", png_ptr->row_number, filter); + switch (filter) + { + case PNG_FILTER_VALUE_NONE: + break; + case PNG_FILTER_VALUE_SUB: + { + png_uint_32 i; + png_uint_32 istop = row_info->rowbytes; + png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; + png_bytep rp = row + bpp; + png_bytep lp = row; + + for (i = bpp; i < istop; i++) + { + *rp = (png_byte)(((int)(*rp) + (int)(*lp++)) & 0xff); + rp++; + } + break; + } + case PNG_FILTER_VALUE_UP: + { + png_uint_32 i; + png_uint_32 istop = row_info->rowbytes; + png_bytep rp = row; + png_bytep pp = prev_row; + + for (i = 0; i < istop; i++) + { + *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff); + rp++; + } + break; + } + case PNG_FILTER_VALUE_AVG: + { + png_uint_32 i; + png_bytep rp = row; + png_bytep pp = prev_row; + png_bytep lp = row; + png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; + png_uint_32 istop = row_info->rowbytes - bpp; + + for (i = 0; i < bpp; i++) + { + *rp = (png_byte)(((int)(*rp) + + ((int)(*pp++) / 2 )) & 0xff); + rp++; + } + + for (i = 0; i < istop; i++) + { + *rp = (png_byte)(((int)(*rp) + + (int)(*pp++ + *lp++) / 2 ) & 0xff); + rp++; + } + break; + } + case PNG_FILTER_VALUE_PAETH: + { + png_uint_32 i; + png_bytep rp = row; + png_bytep pp = prev_row; + png_bytep lp = row; + png_bytep cp = prev_row; + png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; + png_uint_32 istop=row_info->rowbytes - bpp; + + for (i = 0; i < bpp; i++) + { + *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff); + rp++; + } + + for (i = 0; i < istop; i++) /* use leftover rp,pp */ + { + int a, b, c, pa, pb, pc, p; + + a = *lp++; + b = *pp++; + c = *cp++; + + p = b - c; + pc = a - c; + +#ifdef PNG_USE_ABS + pa = abs(p); + pb = abs(pc); + pc = abs(p + pc); +#else + pa = p < 0 ? -p : p; + pb = pc < 0 ? -pc : pc; + pc = (p + pc) < 0 ? -(p + pc) : p + pc; +#endif + + /* + if (pa <= pb && pa <= pc) + p = a; + else if (pb <= pc) + p = b; + else + p = c; + */ + + p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c; + + *rp = (png_byte)(((int)(*rp) + p) & 0xff); + rp++; + } + break; + } + default: + png_warning(png_ptr, "Ignoring bad adaptive filter type"); + *row=0; + break; + } +} +#endif /* !PNG_HAVE_ASSEMBLER_READ_FILTER_ROW */ + +void /* PRIVATE */ +png_read_finish_row(png_structp png_ptr) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */ + + /* start of interlace block */ + const int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; + + /* offset to next interlace block */ + const int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; + + /* start of interlace block in the y direction */ + const int png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; + + /* offset to next interlace block in the y direction */ + const int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; +#endif + + png_debug(1, "in png_read_finish_row\n"); + png_ptr->row_number++; + if (png_ptr->row_number < png_ptr->num_rows) + return; + + if (png_ptr->interlaced) + { + png_ptr->row_number = 0; + png_memset_check(png_ptr, png_ptr->prev_row, 0, png_ptr->rowbytes + 1); + do + { + png_ptr->pass++; + if (png_ptr->pass >= 7) + break; + png_ptr->iwidth = (png_ptr->width + + png_pass_inc[png_ptr->pass] - 1 - + png_pass_start[png_ptr->pass]) / + png_pass_inc[png_ptr->pass]; + png_ptr->irowbytes = ((png_ptr->iwidth * + (png_uint_32)png_ptr->pixel_depth + 7) >> 3) +1; + + if (!(png_ptr->transformations & PNG_INTERLACE)) + { + png_ptr->num_rows = (png_ptr->height + + png_pass_yinc[png_ptr->pass] - 1 - + png_pass_ystart[png_ptr->pass]) / + png_pass_yinc[png_ptr->pass]; + if (!(png_ptr->num_rows)) + continue; + } + else /* if (png_ptr->transformations & PNG_INTERLACE) */ + break; + } while (png_ptr->iwidth == 0); + + if (png_ptr->pass < 7) + return; + } + + if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) + { +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_IDAT; +#endif + char extra; + int ret; + + png_ptr->zstream.next_out = (Byte *)&extra; + png_ptr->zstream.avail_out = (uInt)1; + for(;;) + { + if (!(png_ptr->zstream.avail_in)) + { + while (!png_ptr->idat_size) + { + png_byte chunk_length[4]; + + png_crc_finish(png_ptr, 0); + + png_read_data(png_ptr, chunk_length, 4); + png_ptr->idat_size = png_get_uint_32(chunk_length); + + png_reset_crc(png_ptr); + png_crc_read(png_ptr, png_ptr->chunk_name, 4); + if (png_memcmp(png_ptr->chunk_name, (png_bytep)png_IDAT, 4)) + png_error(png_ptr, "Not enough image data"); + + } + png_ptr->zstream.avail_in = (uInt)png_ptr->zbuf_size; + png_ptr->zstream.next_in = png_ptr->zbuf; + if (png_ptr->zbuf_size > png_ptr->idat_size) + png_ptr->zstream.avail_in = (uInt)png_ptr->idat_size; + png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zstream.avail_in); + png_ptr->idat_size -= png_ptr->zstream.avail_in; + } + ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); + if (ret == Z_STREAM_END) + { + if (!(png_ptr->zstream.avail_out) || png_ptr->zstream.avail_in || + png_ptr->idat_size) + png_warning(png_ptr, "Extra compressed data"); + png_ptr->mode |= PNG_AFTER_IDAT; + png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; + break; + } + if (ret != Z_OK) + png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg : + "Decompression Error"); + + if (!(png_ptr->zstream.avail_out)) + { + png_warning(png_ptr, "Extra compressed data."); + png_ptr->mode |= PNG_AFTER_IDAT; + png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; + break; + } + + } + png_ptr->zstream.avail_out = 0; + } + + if (png_ptr->idat_size || png_ptr->zstream.avail_in) + png_warning(png_ptr, "Extra compression data"); + + inflateReset(&png_ptr->zstream); + + png_ptr->mode |= PNG_AFTER_IDAT; +} + +void /* PRIVATE */ +png_read_start_row(png_structp png_ptr) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */ + + /* start of interlace block */ + const int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; + + /* offset to next interlace block */ + const int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; + + /* start of interlace block in the y direction */ + const int png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; + + /* offset to next interlace block in the y direction */ + const int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; +#endif + + int max_pixel_depth; + png_uint_32 row_bytes; + + png_debug(1, "in png_read_start_row\n"); + png_ptr->zstream.avail_in = 0; + png_init_read_transformations(png_ptr); + if (png_ptr->interlaced) + { + if (!(png_ptr->transformations & PNG_INTERLACE)) + png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 - + png_pass_ystart[0]) / png_pass_yinc[0]; + else + png_ptr->num_rows = png_ptr->height; + + png_ptr->iwidth = (png_ptr->width + + png_pass_inc[png_ptr->pass] - 1 - + png_pass_start[png_ptr->pass]) / + png_pass_inc[png_ptr->pass]; + + row_bytes = ((png_ptr->iwidth * + (png_uint_32)png_ptr->pixel_depth + 7) >> 3) +1; + png_ptr->irowbytes = (png_size_t)row_bytes; + if((png_uint_32)png_ptr->irowbytes != row_bytes) + png_error(png_ptr, "Rowbytes overflow in png_read_start_row"); + } + else + { + png_ptr->num_rows = png_ptr->height; + png_ptr->iwidth = png_ptr->width; + png_ptr->irowbytes = png_ptr->rowbytes + 1; + } + max_pixel_depth = png_ptr->pixel_depth; + +#if defined(PNG_READ_PACK_SUPPORTED) + if ((png_ptr->transformations & PNG_PACK) && png_ptr->bit_depth < 8) + max_pixel_depth = 8; +#endif + +#if defined(PNG_READ_EXPAND_SUPPORTED) + if (png_ptr->transformations & PNG_EXPAND) + { + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + if (png_ptr->num_trans) + max_pixel_depth = 32; + else + max_pixel_depth = 24; + } + else if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY) + { + if (max_pixel_depth < 8) + max_pixel_depth = 8; + if (png_ptr->num_trans) + max_pixel_depth *= 2; + } + else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) + { + if (png_ptr->num_trans) + { + max_pixel_depth *= 4; + max_pixel_depth /= 3; + } + } + } +#endif + +#if defined(PNG_READ_FILLER_SUPPORTED) + if (png_ptr->transformations & (PNG_FILLER)) + { + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + max_pixel_depth = 32; + else if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY) + { + if (max_pixel_depth <= 8) + max_pixel_depth = 16; + else + max_pixel_depth = 32; + } + else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) + { + if (max_pixel_depth <= 32) + max_pixel_depth = 32; + else + max_pixel_depth = 64; + } + } +#endif + +#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) + if (png_ptr->transformations & PNG_GRAY_TO_RGB) + { + if ( +#if defined(PNG_READ_EXPAND_SUPPORTED) + (png_ptr->num_trans && (png_ptr->transformations & PNG_EXPAND)) || +#endif +#if defined(PNG_READ_FILLER_SUPPORTED) + (png_ptr->transformations & (PNG_FILLER)) || +#endif + png_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + if (max_pixel_depth <= 16) + max_pixel_depth = 32; + else + max_pixel_depth = 64; + } + else + { + if (max_pixel_depth <= 8) + { + if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + max_pixel_depth = 32; + else + max_pixel_depth = 24; + } + else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + max_pixel_depth = 64; + else + max_pixel_depth = 48; + } + } +#endif + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) && \ +defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) + if(png_ptr->transformations & PNG_USER_TRANSFORM) + { + int user_pixel_depth=png_ptr->user_transform_depth* + png_ptr->user_transform_channels; + if(user_pixel_depth > max_pixel_depth) + max_pixel_depth=user_pixel_depth; + } +#endif + + /* align the width on the next larger 8 pixels. Mainly used + for interlacing */ + row_bytes = ((png_ptr->width + 7) & ~((png_uint_32)7)); + /* calculate the maximum bytes needed, adding a byte and a pixel + for safety's sake */ + row_bytes = ((row_bytes * (png_uint_32)max_pixel_depth + 7) >> 3) + + 1 + ((max_pixel_depth + 7) >> 3); +#ifdef PNG_MAX_MALLOC_64K + if (row_bytes > (png_uint_32)65536L) + png_error(png_ptr, "This image requires a row greater than 64KB"); +#endif + png_ptr->big_row_buf = (png_bytep)png_malloc(png_ptr, row_bytes+64); + png_ptr->row_buf = png_ptr->big_row_buf+32; +#if defined(PNG_DEBUG) && defined(PNG_USE_PNGGCCRD) + png_ptr->row_buf_size = row_bytes; +#endif + +#ifdef PNG_MAX_MALLOC_64K + if ((png_uint_32)png_ptr->rowbytes + 1 > (png_uint_32)65536L) + png_error(png_ptr, "This image requires a row greater than 64KB"); +#endif + png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, (png_uint_32)( + png_ptr->rowbytes + 1)); + + png_memset_check(png_ptr, png_ptr->prev_row, 0, png_ptr->rowbytes + 1); + + png_debug1(3, "width = %lu,\n", png_ptr->width); + png_debug1(3, "height = %lu,\n", png_ptr->height); + png_debug1(3, "iwidth = %lu,\n", png_ptr->iwidth); + png_debug1(3, "num_rows = %lu\n", png_ptr->num_rows); + png_debug1(3, "rowbytes = %lu,\n", png_ptr->rowbytes); + png_debug1(3, "irowbytes = %lu,\n", png_ptr->irowbytes); + + png_ptr->flags |= PNG_FLAG_ROW_INIT; +} diff --git a/gtkmm-osx/libpng-1.2.5/pngset.c b/gtkmm-osx/libpng-1.2.5/pngset.c new file mode 100644 index 0000000..8e4e619 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/pngset.c @@ -0,0 +1,1160 @@ + +/* pngset.c - storage of image information into info struct + * + * libpng 1.2.5 - October 3, 2002 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2002 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * The functions here are used during reads to store data from the file + * into the info struct, and during writes to store application data + * into the info struct for writing into the file. This abstracts the + * info struct and allows us to change the structure in the future. + */ + +#define PNG_INTERNAL +#include "png.h" + +#if defined(PNG_bKGD_SUPPORTED) +void PNGAPI +png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background) +{ + png_debug1(1, "in %s storage function\n", "bKGD"); + if (png_ptr == NULL || info_ptr == NULL) + return; + + png_memcpy(&(info_ptr->background), background, sizeof(png_color_16)); + info_ptr->valid |= PNG_INFO_bKGD; +} +#endif + +#if defined(PNG_cHRM_SUPPORTED) +#ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_cHRM(png_structp png_ptr, png_infop info_ptr, + double white_x, double white_y, double red_x, double red_y, + double green_x, double green_y, double blue_x, double blue_y) +{ + png_debug1(1, "in %s storage function\n", "cHRM"); + if (png_ptr == NULL || info_ptr == NULL) + return; + + if (white_x < 0.0 || white_y < 0.0 || + red_x < 0.0 || red_y < 0.0 || + green_x < 0.0 || green_y < 0.0 || + blue_x < 0.0 || blue_y < 0.0) + { + png_warning(png_ptr, + "Ignoring attempt to set negative chromaticity value"); + return; + } + if (white_x > 21474.83 || white_y > 21474.83 || + red_x > 21474.83 || red_y > 21474.83 || + green_x > 21474.83 || green_y > 21474.83 || + blue_x > 21474.83 || blue_y > 21474.83) + { + png_warning(png_ptr, + "Ignoring attempt to set chromaticity value exceeding 21474.83"); + return; + } + + info_ptr->x_white = (float)white_x; + info_ptr->y_white = (float)white_y; + info_ptr->x_red = (float)red_x; + info_ptr->y_red = (float)red_y; + info_ptr->x_green = (float)green_x; + info_ptr->y_green = (float)green_y; + info_ptr->x_blue = (float)blue_x; + info_ptr->y_blue = (float)blue_y; +#ifdef PNG_FIXED_POINT_SUPPORTED + info_ptr->int_x_white = (png_fixed_point)(white_x*100000.+0.5); + info_ptr->int_y_white = (png_fixed_point)(white_y*100000.+0.5); + info_ptr->int_x_red = (png_fixed_point)( red_x*100000.+0.5); + info_ptr->int_y_red = (png_fixed_point)( red_y*100000.+0.5); + info_ptr->int_x_green = (png_fixed_point)(green_x*100000.+0.5); + info_ptr->int_y_green = (png_fixed_point)(green_y*100000.+0.5); + info_ptr->int_x_blue = (png_fixed_point)( blue_x*100000.+0.5); + info_ptr->int_y_blue = (png_fixed_point)( blue_y*100000.+0.5); +#endif + info_ptr->valid |= PNG_INFO_cHRM; +} +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED +void PNGAPI +png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr, + png_fixed_point white_x, png_fixed_point white_y, png_fixed_point red_x, + png_fixed_point red_y, png_fixed_point green_x, png_fixed_point green_y, + png_fixed_point blue_x, png_fixed_point blue_y) +{ + png_debug1(1, "in %s storage function\n", "cHRM"); + if (png_ptr == NULL || info_ptr == NULL) + return; + + if (white_x < 0 || white_y < 0 || + red_x < 0 || red_y < 0 || + green_x < 0 || green_y < 0 || + blue_x < 0 || blue_y < 0) + { + png_warning(png_ptr, + "Ignoring attempt to set negative chromaticity value"); + return; + } + if (white_x > (double) PNG_MAX_UINT || white_y > (double) PNG_MAX_UINT || + red_x > (double) PNG_MAX_UINT || red_y > (double) PNG_MAX_UINT || + green_x > (double) PNG_MAX_UINT || green_y > (double) PNG_MAX_UINT || + blue_x > (double) PNG_MAX_UINT || blue_y > (double) PNG_MAX_UINT) + { + png_warning(png_ptr, + "Ignoring attempt to set chromaticity value exceeding 21474.83"); + return; + } + info_ptr->int_x_white = white_x; + info_ptr->int_y_white = white_y; + info_ptr->int_x_red = red_x; + info_ptr->int_y_red = red_y; + info_ptr->int_x_green = green_x; + info_ptr->int_y_green = green_y; + info_ptr->int_x_blue = blue_x; + info_ptr->int_y_blue = blue_y; +#ifdef PNG_FLOATING_POINT_SUPPORTED + info_ptr->x_white = (float)(white_x/100000.); + info_ptr->y_white = (float)(white_y/100000.); + info_ptr->x_red = (float)( red_x/100000.); + info_ptr->y_red = (float)( red_y/100000.); + info_ptr->x_green = (float)(green_x/100000.); + info_ptr->y_green = (float)(green_y/100000.); + info_ptr->x_blue = (float)( blue_x/100000.); + info_ptr->y_blue = (float)( blue_y/100000.); +#endif + info_ptr->valid |= PNG_INFO_cHRM; +} +#endif +#endif + +#if defined(PNG_gAMA_SUPPORTED) +#ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma) +{ + double gamma; + png_debug1(1, "in %s storage function\n", "gAMA"); + if (png_ptr == NULL || info_ptr == NULL) + return; + + /* Check for overflow */ + if (file_gamma > 21474.83) + { + png_warning(png_ptr, "Limiting gamma to 21474.83"); + gamma=21474.83; + } + else + gamma=file_gamma; + info_ptr->gamma = (float)gamma; +#ifdef PNG_FIXED_POINT_SUPPORTED + info_ptr->int_gamma = (int)(gamma*100000.+.5); +#endif + info_ptr->valid |= PNG_INFO_gAMA; + if(gamma == 0.0) + png_warning(png_ptr, "Setting gamma=0"); +} +#endif +void PNGAPI +png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point + int_gamma) +{ + png_fixed_point gamma; + + png_debug1(1, "in %s storage function\n", "gAMA"); + if (png_ptr == NULL || info_ptr == NULL) + return; + + if (int_gamma > (png_fixed_point) PNG_MAX_UINT) + { + png_warning(png_ptr, "Limiting gamma to 21474.83"); + gamma=PNG_MAX_UINT; + } + else + { + if (int_gamma < 0) + { + png_warning(png_ptr, "Setting negative gamma to zero"); + gamma=0; + } + else + gamma=int_gamma; + } +#ifdef PNG_FLOATING_POINT_SUPPORTED + info_ptr->gamma = (float)(gamma/100000.); +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED + info_ptr->int_gamma = gamma; +#endif + info_ptr->valid |= PNG_INFO_gAMA; + if(gamma == 0) + png_warning(png_ptr, "Setting gamma=0"); +} +#endif + +#if defined(PNG_hIST_SUPPORTED) +void PNGAPI +png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist) +{ + int i; + + png_debug1(1, "in %s storage function\n", "hIST"); + if (png_ptr == NULL || info_ptr == NULL) + return; + if (info_ptr->num_palette == 0) + { + png_warning(png_ptr, + "Palette size 0, hIST allocation skipped."); + return; + } + +#ifdef PNG_FREE_ME_SUPPORTED + png_free_data(png_ptr, info_ptr, PNG_FREE_HIST, 0); +#endif + /* Changed from info->num_palette to 256 in version 1.2.1 */ + png_ptr->hist = (png_uint_16p)png_malloc_warn(png_ptr, + (png_uint_32)(256 * sizeof (png_uint_16))); + if (png_ptr->hist == NULL) + { + png_warning(png_ptr, "Insufficient memory for hIST chunk data."); + return; + } + + for (i = 0; i < info_ptr->num_palette; i++) + png_ptr->hist[i] = hist[i]; + info_ptr->hist = png_ptr->hist; + info_ptr->valid |= PNG_INFO_hIST; + +#ifdef PNG_FREE_ME_SUPPORTED + info_ptr->free_me |= PNG_FREE_HIST; +#else + png_ptr->flags |= PNG_FLAG_FREE_HIST; +#endif +} +#endif + +void PNGAPI +png_set_IHDR(png_structp png_ptr, png_infop info_ptr, + png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_type, int compression_type, + int filter_type) +{ + int rowbytes_per_pixel; + png_debug1(1, "in %s storage function\n", "IHDR"); + if (png_ptr == NULL || info_ptr == NULL) + return; + + /* check for width and height valid values */ + if (width == 0 || height == 0) + png_error(png_ptr, "Image width or height is zero in IHDR"); + if (width > PNG_MAX_UINT || height > PNG_MAX_UINT) + png_error(png_ptr, "Invalid image size in IHDR"); + + /* check other values */ + if (bit_depth != 1 && bit_depth != 2 && bit_depth != 4 && + bit_depth != 8 && bit_depth != 16) + png_error(png_ptr, "Invalid bit depth in IHDR"); + + if (color_type < 0 || color_type == 1 || + color_type == 5 || color_type > 6) + png_error(png_ptr, "Invalid color type in IHDR"); + + if (((color_type == PNG_COLOR_TYPE_PALETTE) && bit_depth > 8) || + ((color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA || + color_type == PNG_COLOR_TYPE_RGB_ALPHA) && bit_depth < 8)) + png_error(png_ptr, "Invalid color type/bit depth combination in IHDR"); + + if (interlace_type >= PNG_INTERLACE_LAST) + png_error(png_ptr, "Unknown interlace method in IHDR"); + + if (compression_type != PNG_COMPRESSION_TYPE_BASE) + png_error(png_ptr, "Unknown compression method in IHDR"); + +#if defined(PNG_MNG_FEATURES_SUPPORTED) + /* Accept filter_method 64 (intrapixel differencing) only if + * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and + * 2. Libpng did not read a PNG signature (this filter_method is only + * used in PNG datastreams that are embedded in MNG datastreams) and + * 3. The application called png_permit_mng_features with a mask that + * included PNG_FLAG_MNG_FILTER_64 and + * 4. The filter_method is 64 and + * 5. The color_type is RGB or RGBA + */ + if((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)&&png_ptr->mng_features_permitted) + png_warning(png_ptr,"MNG features are not allowed in a PNG datastream\n"); + if(filter_type != PNG_FILTER_TYPE_BASE) + { + if(!((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && + (filter_type == PNG_INTRAPIXEL_DIFFERENCING) && + ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) && + (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA))) + png_error(png_ptr, "Unknown filter method in IHDR"); + if(png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) + png_warning(png_ptr, "Invalid filter method in IHDR"); + } +#else + if(filter_type != PNG_FILTER_TYPE_BASE) + png_error(png_ptr, "Unknown filter method in IHDR"); +#endif + + info_ptr->width = width; + info_ptr->height = height; + info_ptr->bit_depth = (png_byte)bit_depth; + info_ptr->color_type =(png_byte) color_type; + info_ptr->compression_type = (png_byte)compression_type; + info_ptr->filter_type = (png_byte)filter_type; + info_ptr->interlace_type = (png_byte)interlace_type; + if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + info_ptr->channels = 1; + else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR) + info_ptr->channels = 3; + else + info_ptr->channels = 1; + if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) + info_ptr->channels++; + info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth); + + /* check for overflow */ + rowbytes_per_pixel = (info_ptr->pixel_depth + 7) >> 3; + if ( width > PNG_MAX_UINT/rowbytes_per_pixel - 64) + { + png_warning(png_ptr, + "Width too large to process image data; rowbytes will overflow."); + info_ptr->rowbytes = (png_size_t)0; + } + else + info_ptr->rowbytes = (info_ptr->width * info_ptr->pixel_depth + 7) >> 3; +} + +#if defined(PNG_oFFs_SUPPORTED) +void PNGAPI +png_set_oFFs(png_structp png_ptr, png_infop info_ptr, + png_int_32 offset_x, png_int_32 offset_y, int unit_type) +{ + png_debug1(1, "in %s storage function\n", "oFFs"); + if (png_ptr == NULL || info_ptr == NULL) + return; + + info_ptr->x_offset = offset_x; + info_ptr->y_offset = offset_y; + info_ptr->offset_unit_type = (png_byte)unit_type; + info_ptr->valid |= PNG_INFO_oFFs; +} +#endif + +#if defined(PNG_pCAL_SUPPORTED) +void PNGAPI +png_set_pCAL(png_structp png_ptr, png_infop info_ptr, + png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, + png_charp units, png_charpp params) +{ + png_uint_32 length; + int i; + + png_debug1(1, "in %s storage function\n", "pCAL"); + if (png_ptr == NULL || info_ptr == NULL) + return; + + length = png_strlen(purpose) + 1; + png_debug1(3, "allocating purpose for info (%lu bytes)\n", length); + info_ptr->pcal_purpose = (png_charp)png_malloc_warn(png_ptr, length); + if (info_ptr->pcal_purpose == NULL) + { + png_warning(png_ptr, "Insufficient memory for pCAL purpose."); + return; + } + png_memcpy(info_ptr->pcal_purpose, purpose, (png_size_t)length); + + png_debug(3, "storing X0, X1, type, and nparams in info\n"); + info_ptr->pcal_X0 = X0; + info_ptr->pcal_X1 = X1; + info_ptr->pcal_type = (png_byte)type; + info_ptr->pcal_nparams = (png_byte)nparams; + + length = png_strlen(units) + 1; + png_debug1(3, "allocating units for info (%lu bytes)\n", length); + info_ptr->pcal_units = (png_charp)png_malloc_warn(png_ptr, length); + if (info_ptr->pcal_units == NULL) + { + png_warning(png_ptr, "Insufficient memory for pCAL units."); + return; + } + png_memcpy(info_ptr->pcal_units, units, (png_size_t)length); + + info_ptr->pcal_params = (png_charpp)png_malloc_warn(png_ptr, + (png_uint_32)((nparams + 1) * sizeof(png_charp))); + if (info_ptr->pcal_params == NULL) + { + png_warning(png_ptr, "Insufficient memory for pCAL params."); + return; + } + + info_ptr->pcal_params[nparams] = NULL; + + for (i = 0; i < nparams; i++) + { + length = png_strlen(params[i]) + 1; + png_debug2(3, "allocating parameter %d for info (%lu bytes)\n", i, length); + info_ptr->pcal_params[i] = (png_charp)png_malloc_warn(png_ptr, length); + if (info_ptr->pcal_params[i] == NULL) + { + png_warning(png_ptr, "Insufficient memory for pCAL parameter."); + return; + } + png_memcpy(info_ptr->pcal_params[i], params[i], (png_size_t)length); + } + + info_ptr->valid |= PNG_INFO_pCAL; +#ifdef PNG_FREE_ME_SUPPORTED + info_ptr->free_me |= PNG_FREE_PCAL; +#endif +} +#endif + +#if defined(PNG_READ_sCAL_SUPPORTED) || defined(PNG_WRITE_sCAL_SUPPORTED) +#ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_sCAL(png_structp png_ptr, png_infop info_ptr, + int unit, double width, double height) +{ + png_debug1(1, "in %s storage function\n", "sCAL"); + if (png_ptr == NULL || info_ptr == NULL) + return; + + info_ptr->scal_unit = (png_byte)unit; + info_ptr->scal_pixel_width = width; + info_ptr->scal_pixel_height = height; + + info_ptr->valid |= PNG_INFO_sCAL; +} +#else +#ifdef PNG_FIXED_POINT_SUPPORTED +void PNGAPI +png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr, + int unit, png_charp swidth, png_charp sheight) +{ + png_uint_32 length; + + png_debug1(1, "in %s storage function\n", "sCAL"); + if (png_ptr == NULL || info_ptr == NULL) + return; + + info_ptr->scal_unit = (png_byte)unit; + + length = png_strlen(swidth) + 1; + png_debug1(3, "allocating unit for info (%d bytes)\n", length); + info_ptr->scal_s_width = (png_charp)png_malloc(png_ptr, length); + png_memcpy(info_ptr->scal_s_width, swidth, (png_size_t)length); + + length = png_strlen(sheight) + 1; + png_debug1(3, "allocating unit for info (%d bytes)\n", length); + info_ptr->scal_s_height = (png_charp)png_malloc(png_ptr, length); + png_memcpy(info_ptr->scal_s_height, sheight, (png_size_t)length); + + info_ptr->valid |= PNG_INFO_sCAL; +#ifdef PNG_FREE_ME_SUPPORTED + info_ptr->free_me |= PNG_FREE_SCAL; +#endif +} +#endif +#endif +#endif + +#if defined(PNG_pHYs_SUPPORTED) +void PNGAPI +png_set_pHYs(png_structp png_ptr, png_infop info_ptr, + png_uint_32 res_x, png_uint_32 res_y, int unit_type) +{ + png_debug1(1, "in %s storage function\n", "pHYs"); + if (png_ptr == NULL || info_ptr == NULL) + return; + + info_ptr->x_pixels_per_unit = res_x; + info_ptr->y_pixels_per_unit = res_y; + info_ptr->phys_unit_type = (png_byte)unit_type; + info_ptr->valid |= PNG_INFO_pHYs; +} +#endif + +void PNGAPI +png_set_PLTE(png_structp png_ptr, png_infop info_ptr, + png_colorp palette, int num_palette) +{ + + png_debug1(1, "in %s storage function\n", "PLTE"); + if (png_ptr == NULL || info_ptr == NULL) + return; + + /* + * It may not actually be necessary to set png_ptr->palette here; + * we do it for backward compatibility with the way the png_handle_tRNS + * function used to do the allocation. + */ +#ifdef PNG_FREE_ME_SUPPORTED + png_free_data(png_ptr, info_ptr, PNG_FREE_PLTE, 0); +#endif + /* Changed in libpng-1.2.1 to allocate 256 instead of num_palette entries, + in case of an invalid PNG file that has too-large sample values. */ + png_ptr->palette = (png_colorp)png_zalloc(png_ptr, (uInt)256, + sizeof (png_color)); + if (png_ptr->palette == NULL) + png_error(png_ptr, "Unable to malloc palette"); + png_memcpy(png_ptr->palette, palette, num_palette * sizeof (png_color)); + info_ptr->palette = png_ptr->palette; + info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette; + +#ifdef PNG_FREE_ME_SUPPORTED + info_ptr->free_me |= PNG_FREE_PLTE; +#else + png_ptr->flags |= PNG_FLAG_FREE_PLTE; +#endif + + info_ptr->valid |= PNG_INFO_PLTE; +} + +#if defined(PNG_sBIT_SUPPORTED) +void PNGAPI +png_set_sBIT(png_structp png_ptr, png_infop info_ptr, + png_color_8p sig_bit) +{ + png_debug1(1, "in %s storage function\n", "sBIT"); + if (png_ptr == NULL || info_ptr == NULL) + return; + + png_memcpy(&(info_ptr->sig_bit), sig_bit, sizeof (png_color_8)); + info_ptr->valid |= PNG_INFO_sBIT; +} +#endif + +#if defined(PNG_sRGB_SUPPORTED) +void PNGAPI +png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int intent) +{ + png_debug1(1, "in %s storage function\n", "sRGB"); + if (png_ptr == NULL || info_ptr == NULL) + return; + + info_ptr->srgb_intent = (png_byte)intent; + info_ptr->valid |= PNG_INFO_sRGB; +} + +void PNGAPI +png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr, + int intent) +{ +#if defined(PNG_gAMA_SUPPORTED) +#ifdef PNG_FLOATING_POINT_SUPPORTED + float file_gamma; +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED + png_fixed_point int_file_gamma; +#endif +#endif +#if defined(PNG_cHRM_SUPPORTED) +#ifdef PNG_FLOATING_POINT_SUPPORTED + float white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y; +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED + png_fixed_point int_white_x, int_white_y, int_red_x, int_red_y, int_green_x, + int_green_y, int_blue_x, int_blue_y; +#endif +#endif + png_debug1(1, "in %s storage function\n", "sRGB_gAMA_and_cHRM"); + if (png_ptr == NULL || info_ptr == NULL) + return; + + png_set_sRGB(png_ptr, info_ptr, intent); + +#if defined(PNG_gAMA_SUPPORTED) +#ifdef PNG_FLOATING_POINT_SUPPORTED + file_gamma = (float).45455; + png_set_gAMA(png_ptr, info_ptr, file_gamma); +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED + int_file_gamma = 45455L; + png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma); +#endif +#endif + +#if defined(PNG_cHRM_SUPPORTED) +#ifdef PNG_FIXED_POINT_SUPPORTED + int_white_x = 31270L; + int_white_y = 32900L; + int_red_x = 64000L; + int_red_y = 33000L; + int_green_x = 30000L; + int_green_y = 60000L; + int_blue_x = 15000L; + int_blue_y = 6000L; + + png_set_cHRM_fixed(png_ptr, info_ptr, + int_white_x, int_white_y, int_red_x, int_red_y, int_green_x, int_green_y, + int_blue_x, int_blue_y); +#endif +#ifdef PNG_FLOATING_POINT_SUPPORTED + white_x = (float).3127; + white_y = (float).3290; + red_x = (float).64; + red_y = (float).33; + green_x = (float).30; + green_y = (float).60; + blue_x = (float).15; + blue_y = (float).06; + + png_set_cHRM(png_ptr, info_ptr, + white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y); +#endif +#endif +} +#endif + + +#if defined(PNG_iCCP_SUPPORTED) +void PNGAPI +png_set_iCCP(png_structp png_ptr, png_infop info_ptr, + png_charp name, int compression_type, + png_charp profile, png_uint_32 proflen) +{ + png_charp new_iccp_name; + png_charp new_iccp_profile; + + png_debug1(1, "in %s storage function\n", "iCCP"); + if (png_ptr == NULL || info_ptr == NULL || name == NULL || profile == NULL) + return; + + new_iccp_name = (png_charp)png_malloc(png_ptr, png_strlen(name)+1); + png_strcpy(new_iccp_name, name); + new_iccp_profile = (png_charp)png_malloc(png_ptr, proflen); + png_memcpy(new_iccp_profile, profile, (png_size_t)proflen); + + png_free_data(png_ptr, info_ptr, PNG_FREE_ICCP, 0); + + info_ptr->iccp_proflen = proflen; + info_ptr->iccp_name = new_iccp_name; + info_ptr->iccp_profile = new_iccp_profile; + /* Compression is always zero but is here so the API and info structure + * does not have to change if we introduce multiple compression types */ + info_ptr->iccp_compression = (png_byte)compression_type; +#ifdef PNG_FREE_ME_SUPPORTED + info_ptr->free_me |= PNG_FREE_ICCP; +#endif + info_ptr->valid |= PNG_INFO_iCCP; +} +#endif + +#if defined(PNG_TEXT_SUPPORTED) +void PNGAPI +png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, + int num_text) +{ + int ret; + ret=png_set_text_2(png_ptr, info_ptr, text_ptr, num_text); + if (ret) + png_error(png_ptr, "Insufficient memory to store text"); +} + +int /* PRIVATE */ +png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, + int num_text) +{ + int i; + + png_debug1(1, "in %s storage function\n", (png_ptr->chunk_name[0] == '\0' ? + "text" : (png_const_charp)png_ptr->chunk_name)); + + if (png_ptr == NULL || info_ptr == NULL || num_text == 0) + return(0); + + /* Make sure we have enough space in the "text" array in info_struct + * to hold all of the incoming text_ptr objects. + */ + if (info_ptr->num_text + num_text > info_ptr->max_text) + { + if (info_ptr->text != NULL) + { + png_textp old_text; + int old_max; + + old_max = info_ptr->max_text; + info_ptr->max_text = info_ptr->num_text + num_text + 8; + old_text = info_ptr->text; + info_ptr->text = (png_textp)png_malloc_warn(png_ptr, + (png_uint_32)(info_ptr->max_text * sizeof (png_text))); + if (info_ptr->text == NULL) + { + png_free(png_ptr, old_text); + return(1); + } + png_memcpy(info_ptr->text, old_text, (png_size_t)(old_max * + sizeof(png_text))); + png_free(png_ptr, old_text); + } + else + { + info_ptr->max_text = num_text + 8; + info_ptr->num_text = 0; + info_ptr->text = (png_textp)png_malloc_warn(png_ptr, + (png_uint_32)(info_ptr->max_text * sizeof (png_text))); + if (info_ptr->text == NULL) + return(1); +#ifdef PNG_FREE_ME_SUPPORTED + info_ptr->free_me |= PNG_FREE_TEXT; +#endif + } + png_debug1(3, "allocated %d entries for info_ptr->text\n", + info_ptr->max_text); + } + for (i = 0; i < num_text; i++) + { + png_size_t text_length,key_len; + png_size_t lang_len,lang_key_len; + png_textp textp = &(info_ptr->text[info_ptr->num_text]); + + if (text_ptr[i].key == NULL) + continue; + + key_len = png_strlen(text_ptr[i].key); + + if(text_ptr[i].compression <= 0) + { + lang_len = 0; + lang_key_len = 0; + } + else +#ifdef PNG_iTXt_SUPPORTED + { + /* set iTXt data */ + if (text_ptr[i].lang != NULL) + lang_len = png_strlen(text_ptr[i].lang); + else + lang_len = 0; + if (text_ptr[i].lang_key != NULL) + lang_key_len = png_strlen(text_ptr[i].lang_key); + else + lang_key_len = 0; + } +#else + { + png_warning(png_ptr, "iTXt chunk not supported."); + continue; + } +#endif + + if (text_ptr[i].text == NULL || text_ptr[i].text[0] == '\0') + { + text_length = 0; +#ifdef PNG_iTXt_SUPPORTED + if(text_ptr[i].compression > 0) + textp->compression = PNG_ITXT_COMPRESSION_NONE; + else +#endif + textp->compression = PNG_TEXT_COMPRESSION_NONE; + } + else + { + text_length = png_strlen(text_ptr[i].text); + textp->compression = text_ptr[i].compression; + } + + textp->key = (png_charp)png_malloc_warn(png_ptr, + (png_uint_32)(key_len + text_length + lang_len + lang_key_len + 4)); + if (textp->key == NULL) + return(1); + png_debug2(2, "Allocated %lu bytes at %x in png_set_text\n", + (png_uint_32)(key_len + lang_len + lang_key_len + text_length + 4), + (int)textp->key); + + png_memcpy(textp->key, text_ptr[i].key, + (png_size_t)(key_len)); + *(textp->key+key_len) = '\0'; +#ifdef PNG_iTXt_SUPPORTED + if (text_ptr[i].compression > 0) + { + textp->lang=textp->key + key_len + 1; + png_memcpy(textp->lang, text_ptr[i].lang, lang_len); + *(textp->lang+lang_len) = '\0'; + textp->lang_key=textp->lang + lang_len + 1; + png_memcpy(textp->lang_key, text_ptr[i].lang_key, lang_key_len); + *(textp->lang_key+lang_key_len) = '\0'; + textp->text=textp->lang_key + lang_key_len + 1; + } + else +#endif + { +#ifdef PNG_iTXt_SUPPORTED + textp->lang=NULL; + textp->lang_key=NULL; +#endif + textp->text=textp->key + key_len + 1; + } + if(text_length) + png_memcpy(textp->text, text_ptr[i].text, + (png_size_t)(text_length)); + *(textp->text+text_length) = '\0'; + +#ifdef PNG_iTXt_SUPPORTED + if(textp->compression > 0) + { + textp->text_length = 0; + textp->itxt_length = text_length; + } + else +#endif + { + textp->text_length = text_length; +#ifdef PNG_iTXt_SUPPORTED + textp->itxt_length = 0; +#endif + } + info_ptr->text[info_ptr->num_text]= *textp; + info_ptr->num_text++; + png_debug1(3, "transferred text chunk %d\n", info_ptr->num_text); + } + return(0); +} +#endif + +#if defined(PNG_tIME_SUPPORTED) +void PNGAPI +png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time) +{ + png_debug1(1, "in %s storage function\n", "tIME"); + if (png_ptr == NULL || info_ptr == NULL || + (png_ptr->mode & PNG_WROTE_tIME)) + return; + + png_memcpy(&(info_ptr->mod_time), mod_time, sizeof (png_time)); + info_ptr->valid |= PNG_INFO_tIME; +} +#endif + +#if defined(PNG_tRNS_SUPPORTED) +void PNGAPI +png_set_tRNS(png_structp png_ptr, png_infop info_ptr, + png_bytep trans, int num_trans, png_color_16p trans_values) +{ + png_debug1(1, "in %s storage function\n", "tRNS"); + if (png_ptr == NULL || info_ptr == NULL) + return; + + if (trans != NULL) + { + /* + * It may not actually be necessary to set png_ptr->trans here; + * we do it for backward compatibility with the way the png_handle_tRNS + * function used to do the allocation. + */ +#ifdef PNG_FREE_ME_SUPPORTED + png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0); +#endif + /* Changed from num_trans to 256 in version 1.2.1 */ + png_ptr->trans = info_ptr->trans = (png_bytep)png_malloc(png_ptr, + (png_uint_32)256); + png_memcpy(info_ptr->trans, trans, (png_size_t)num_trans); +#ifdef PNG_FREE_ME_SUPPORTED + info_ptr->free_me |= PNG_FREE_TRNS; +#else + png_ptr->flags |= PNG_FLAG_FREE_TRNS; +#endif + } + + if (trans_values != NULL) + { + png_memcpy(&(info_ptr->trans_values), trans_values, + sizeof(png_color_16)); + if (num_trans == 0) + num_trans = 1; + } + info_ptr->num_trans = (png_uint_16)num_trans; + info_ptr->valid |= PNG_INFO_tRNS; +} +#endif + +#if defined(PNG_sPLT_SUPPORTED) +void PNGAPI +png_set_sPLT(png_structp png_ptr, + png_infop info_ptr, png_sPLT_tp entries, int nentries) +{ + png_sPLT_tp np; + int i; + + np = (png_sPLT_tp)png_malloc_warn(png_ptr, + (info_ptr->splt_palettes_num + nentries) * sizeof(png_sPLT_t)); + if (np == NULL) + { + png_warning(png_ptr, "No memory for sPLT palettes."); + return; + } + + png_memcpy(np, info_ptr->splt_palettes, + info_ptr->splt_palettes_num * sizeof(png_sPLT_t)); + png_free(png_ptr, info_ptr->splt_palettes); + info_ptr->splt_palettes=NULL; + + for (i = 0; i < nentries; i++) + { + png_sPLT_tp to = np + info_ptr->splt_palettes_num + i; + png_sPLT_tp from = entries + i; + + to->name = (png_charp)png_malloc(png_ptr, + png_strlen(from->name) + 1); + png_strcpy(to->name, from->name); + to->entries = (png_sPLT_entryp)png_malloc(png_ptr, + from->nentries * sizeof(png_sPLT_t)); + png_memcpy(to->entries, from->entries, + from->nentries * sizeof(png_sPLT_t)); + to->nentries = from->nentries; + to->depth = from->depth; + } + + info_ptr->splt_palettes = np; + info_ptr->splt_palettes_num += nentries; + info_ptr->valid |= PNG_INFO_sPLT; +#ifdef PNG_FREE_ME_SUPPORTED + info_ptr->free_me |= PNG_FREE_SPLT; +#endif +} +#endif /* PNG_sPLT_SUPPORTED */ + +#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) +void PNGAPI +png_set_unknown_chunks(png_structp png_ptr, + png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns) +{ + png_unknown_chunkp np; + int i; + + if (png_ptr == NULL || info_ptr == NULL || num_unknowns == 0) + return; + + np = (png_unknown_chunkp)png_malloc_warn(png_ptr, + (info_ptr->unknown_chunks_num + num_unknowns) * + sizeof(png_unknown_chunk)); + if (np == NULL) + { + png_warning(png_ptr, "Out of memory while processing unknown chunk."); + return; + } + + png_memcpy(np, info_ptr->unknown_chunks, + info_ptr->unknown_chunks_num * sizeof(png_unknown_chunk)); + png_free(png_ptr, info_ptr->unknown_chunks); + info_ptr->unknown_chunks=NULL; + + for (i = 0; i < num_unknowns; i++) + { + png_unknown_chunkp to = np + info_ptr->unknown_chunks_num + i; + png_unknown_chunkp from = unknowns + i; + + png_strcpy((png_charp)to->name, (png_charp)from->name); + to->data = (png_bytep)png_malloc(png_ptr, from->size); + if (to->data == NULL) + png_warning(png_ptr, "Out of memory while processing unknown chunk."); + else + { + png_memcpy(to->data, from->data, from->size); + to->size = from->size; + + /* note our location in the read or write sequence */ + to->location = (png_byte)(png_ptr->mode & 0xff); + } + } + + info_ptr->unknown_chunks = np; + info_ptr->unknown_chunks_num += num_unknowns; +#ifdef PNG_FREE_ME_SUPPORTED + info_ptr->free_me |= PNG_FREE_UNKN; +#endif +} +void PNGAPI +png_set_unknown_chunk_location(png_structp png_ptr, png_infop info_ptr, + int chunk, int location) +{ + if(png_ptr != NULL && info_ptr != NULL && chunk >= 0 && chunk < + (int)info_ptr->unknown_chunks_num) + info_ptr->unknown_chunks[chunk].location = (png_byte)location; +} +#endif + +#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ + defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) +void PNGAPI +png_permit_empty_plte (png_structp png_ptr, int empty_plte_permitted) +{ + /* This function is deprecated in favor of png_permit_mng_features() + and will be removed from libpng-2.0.0 */ + png_debug(1, "in png_permit_empty_plte, DEPRECATED.\n"); + if (png_ptr == NULL) + return; + png_ptr->mng_features_permitted = (png_byte) + ((png_ptr->mng_features_permitted & (~(PNG_FLAG_MNG_EMPTY_PLTE))) | + ((empty_plte_permitted & PNG_FLAG_MNG_EMPTY_PLTE))); +} +#endif + +#if defined(PNG_MNG_FEATURES_SUPPORTED) +png_uint_32 PNGAPI +png_permit_mng_features (png_structp png_ptr, png_uint_32 mng_features) +{ + png_debug(1, "in png_permit_mng_features\n"); + if (png_ptr == NULL) + return (png_uint_32)0; + png_ptr->mng_features_permitted = + (png_byte)(mng_features & PNG_ALL_MNG_FEATURES); + return (png_uint_32)png_ptr->mng_features_permitted; +} +#endif + +#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) +void PNGAPI +png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep + chunk_list, int num_chunks) +{ + png_bytep new_list, p; + int i, old_num_chunks; + if (num_chunks == 0) + { + if(keep == HANDLE_CHUNK_ALWAYS || keep == HANDLE_CHUNK_IF_SAFE) + png_ptr->flags |= PNG_FLAG_KEEP_UNKNOWN_CHUNKS; + else + png_ptr->flags &= ~PNG_FLAG_KEEP_UNKNOWN_CHUNKS; + + if(keep == HANDLE_CHUNK_ALWAYS) + png_ptr->flags |= PNG_FLAG_KEEP_UNSAFE_CHUNKS; + else + png_ptr->flags &= ~PNG_FLAG_KEEP_UNSAFE_CHUNKS; + return; + } + if (chunk_list == NULL) + return; + old_num_chunks=png_ptr->num_chunk_list; + new_list=(png_bytep)png_malloc(png_ptr, + (png_uint_32)(5*(num_chunks+old_num_chunks))); + if(png_ptr->chunk_list != NULL) + { + png_memcpy(new_list, png_ptr->chunk_list, + (png_size_t)(5*old_num_chunks)); + png_free(png_ptr, png_ptr->chunk_list); + png_ptr->chunk_list=NULL; + } + png_memcpy(new_list+5*old_num_chunks, chunk_list, + (png_size_t)(5*num_chunks)); + for (p=new_list+5*old_num_chunks+4, i=0; inum_chunk_list=old_num_chunks+num_chunks; + png_ptr->chunk_list=new_list; +#ifdef PNG_FREE_ME_SUPPORTED + png_ptr->free_me |= PNG_FREE_LIST; +#endif +} +#endif + +#if defined(PNG_READ_USER_CHUNKS_SUPPORTED) +void PNGAPI +png_set_read_user_chunk_fn(png_structp png_ptr, png_voidp user_chunk_ptr, + png_user_chunk_ptr read_user_chunk_fn) +{ + png_debug(1, "in png_set_read_user_chunk_fn\n"); + png_ptr->read_user_chunk_fn = read_user_chunk_fn; + png_ptr->user_chunk_ptr = user_chunk_ptr; +} +#endif + +#if defined(PNG_INFO_IMAGE_SUPPORTED) +void PNGAPI +png_set_rows(png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers) +{ + png_debug1(1, "in %s storage function\n", "rows"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + if(info_ptr->row_pointers && (info_ptr->row_pointers != row_pointers)) + png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0); + info_ptr->row_pointers = row_pointers; + if(row_pointers) + info_ptr->valid |= PNG_INFO_IDAT; +} +#endif + +void PNGAPI +png_set_compression_buffer_size(png_structp png_ptr, png_uint_32 size) +{ + if(png_ptr->zbuf) + png_free(png_ptr, png_ptr->zbuf); + png_ptr->zbuf_size = (png_size_t)size; + png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, size); + png_ptr->zstream.next_out = png_ptr->zbuf; + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; +} + +void PNGAPI +png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask) +{ + if (png_ptr && info_ptr) + info_ptr->valid &= ~(mask); +} + + +#ifndef PNG_1_0_X +#ifdef PNG_ASSEMBLER_CODE_SUPPORTED +/* this function was added to libpng 1.2.0 and should always exist by default */ +void PNGAPI +png_set_asm_flags (png_structp png_ptr, png_uint_32 asm_flags) +{ + png_uint_32 settable_asm_flags; + png_uint_32 settable_mmx_flags; + + settable_mmx_flags = +#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW + PNG_ASM_FLAG_MMX_READ_COMBINE_ROW | +#endif +#ifdef PNG_HAVE_ASSEMBLER_READ_INTERLACE + PNG_ASM_FLAG_MMX_READ_INTERLACE | +#endif +#ifdef PNG_HAVE_ASSEMBLER_READ_FILTER_ROW + PNG_ASM_FLAG_MMX_READ_FILTER_SUB | + PNG_ASM_FLAG_MMX_READ_FILTER_UP | + PNG_ASM_FLAG_MMX_READ_FILTER_AVG | + PNG_ASM_FLAG_MMX_READ_FILTER_PAETH | +#endif + 0; + + /* could be some non-MMX ones in the future, but not currently: */ + settable_asm_flags = settable_mmx_flags; + + if (!(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_COMPILED) || + !(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU)) + { + /* clear all MMX flags if MMX isn't supported */ + settable_asm_flags &= ~settable_mmx_flags; + png_ptr->asm_flags &= ~settable_mmx_flags; + } + + /* we're replacing the settable bits with those passed in by the user, + * so first zero them out of the master copy, then logical-OR in the + * allowed subset that was requested */ + + png_ptr->asm_flags &= ~settable_asm_flags; /* zero them */ + png_ptr->asm_flags |= (asm_flags & settable_asm_flags); /* set them */ +} +#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */ + +#ifdef PNG_ASSEMBLER_CODE_SUPPORTED +/* this function was added to libpng 1.2.0 */ +void PNGAPI +png_set_mmx_thresholds (png_structp png_ptr, + png_byte mmx_bitdepth_threshold, + png_uint_32 mmx_rowbytes_threshold) +{ + png_ptr->mmx_bitdepth_threshold = mmx_bitdepth_threshold; + png_ptr->mmx_rowbytes_threshold = mmx_rowbytes_threshold; +} +#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */ +#endif /* ?PNG_1_0_X */ diff --git a/gtkmm-osx/libpng-1.2.5/pngtest.c b/gtkmm-osx/libpng-1.2.5/pngtest.c new file mode 100644 index 0000000..cc8209e --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/pngtest.c @@ -0,0 +1,1541 @@ + +/* pngtest.c - a simple test program to test libpng + * + * libpng 1.2.5 - October 3, 2002 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2002 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This program reads in a PNG image, writes it out again, and then + * compares the two files. If the files are identical, this shows that + * the basic chunk handling, filtering, and (de)compression code is working + * properly. It does not currently test all of the transforms, although + * it probably should. + * + * The program will report "FAIL" in certain legitimate cases: + * 1) when the compression level or filter selection method is changed. + * 2) when the maximum IDAT size (PNG_ZBUF_SIZE in pngconf.h) is not 8192. + * 3) unknown unsafe-to-copy ancillary chunks or unknown critical chunks + * exist in the input file. + * 4) others not listed here... + * In these cases, it is best to check with another tool such as "pngcheck" + * to see what the differences between the two files are. + * + * If a filename is given on the command-line, then this file is used + * for the input, rather than the default "pngtest.png". This allows + * testing a wide variety of files easily. You can also test a number + * of files at once by typing "pngtest -m file1.png file2.png ..." + */ + +#if defined(_WIN32_WCE) +# if _WIN32_WCE < 211 + __error__ (f|w)printf functions are not supported on old WindowsCE.; +# endif +# include +# include +# define READFILE(file, data, length, check) \ + if (ReadFile(file, data, length, &check,NULL)) check = 0 +# define WRITEFILE(file, data, length, check)) \ + if (WriteFile(file, data, length, &check, NULL)) check = 0 +# define FCLOSE(file) CloseHandle(file) +#else +# include +# include +# include +# define READFILE(file, data, length, check) \ + check=(png_size_t)fread(data,(png_size_t)1,length,file) +# define WRITEFILE(file, data, length, check) \ + check=(png_size_t)fwrite(data,(png_size_t)1, length, file) +# define FCLOSE(file) fclose(file) +#endif + +#if defined(PNG_NO_STDIO) +# if defined(_WIN32_WCE) + typedef HANDLE png_FILE_p; +# else + typedef FILE * png_FILE_p; +# endif +#endif + +/* Makes pngtest verbose so we can find problems (needs to be before png.h) */ +#ifndef PNG_DEBUG +# define PNG_DEBUG 0 +#endif + +#if !PNG_DEBUG +# define SINGLE_ROWBUF_ALLOC /* makes buffer overruns easier to nail */ +#endif + +/* Turn on CPU timing +#define PNGTEST_TIMING +*/ + +#ifdef PNG_NO_FLOATING_POINT_SUPPORTED +#undef PNGTEST_TIMING +#endif + +#ifdef PNGTEST_TIMING +static float t_start, t_stop, t_decode, t_encode, t_misc; +#include +#endif + +#include "png.h" + +/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */ +#ifndef png_jmpbuf +# define png_jmpbuf(png_ptr) png_ptr->jmpbuf +#endif + +#ifdef PNGTEST_TIMING +static float t_start, t_stop, t_decode, t_encode, t_misc; +#if !defined(PNG_tIME_SUPPORTED) +#include +#endif +#endif + +#if defined(PNG_TIME_RFC1123_SUPPORTED) +static int tIME_chunk_present=0; +static char tIME_string[30] = "no tIME chunk present in file"; +#endif + +static int verbose = 0; + +int test_one_file PNGARG((PNG_CONST char *inname, PNG_CONST char *outname)); + +#ifdef __TURBOC__ +#include +#endif + +/* defined so I can write to a file on gui/windowing platforms */ +/* #define STDERR stderr */ +#define STDERR stdout /* for DOS */ + +/* example of using row callbacks to make a simple progress meter */ +static int status_pass=1; +static int status_dots_requested=0; +static int status_dots=1; + +void +#ifdef PNG_1_0_X +PNGAPI +#endif +read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass); +void +#ifdef PNG_1_0_X +PNGAPI +#endif +read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) +{ + if(png_ptr == NULL || row_number > PNG_MAX_UINT) return; + if(status_pass != pass) + { + fprintf(stdout,"\n Pass %d: ",pass); + status_pass = pass; + status_dots = 31; + } + status_dots--; + if(status_dots == 0) + { + fprintf(stdout, "\n "); + status_dots=30; + } + fprintf(stdout, "r"); +} + +void +#ifdef PNG_1_0_X +PNGAPI +#endif +write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass); +void +#ifdef PNG_1_0_X +PNGAPI +#endif +write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) +{ + if(png_ptr == NULL || row_number > PNG_MAX_UINT || pass > 7) return; + fprintf(stdout, "w"); +} + + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) +/* Example of using user transform callback (we don't transform anything, + but merely examine the row filters. We set this to 256 rather than + 5 in case illegal filter values are present.) */ +static png_uint_32 filters_used[256]; +void +#ifdef PNG_1_0_X +PNGAPI +#endif +count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data); +void +#ifdef PNG_1_0_X +PNGAPI +#endif +count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data) +{ + if(png_ptr != NULL && row_info != NULL) + ++filters_used[*(data-1)]; +} +#endif + +#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +/* example of using user transform callback (we don't transform anything, + but merely count the zero samples) */ + +static png_uint_32 zero_samples; + +void +#ifdef PNG_1_0_X +PNGAPI +#endif +count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data); +void +#ifdef PNG_1_0_X +PNGAPI +#endif +count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data) +{ + png_bytep dp = data; + if(png_ptr == NULL)return; + + /* contents of row_info: + * png_uint_32 width width of row + * png_uint_32 rowbytes number of bytes in row + * png_byte color_type color type of pixels + * png_byte bit_depth bit depth of samples + * png_byte channels number of channels (1-4) + * png_byte pixel_depth bits per pixel (depth*channels) + */ + + + /* counts the number of zero samples (or zero pixels if color_type is 3 */ + + if(row_info->color_type == 0 || row_info->color_type == 3) + { + int pos=0; + png_uint_32 n, nstop; + for (n=0, nstop=row_info->width; nbit_depth == 1) + { + if(((*dp << pos++ ) & 0x80) == 0) zero_samples++; + if(pos == 8) + { + pos = 0; + dp++; + } + } + if(row_info->bit_depth == 2) + { + if(((*dp << (pos+=2)) & 0xc0) == 0) zero_samples++; + if(pos == 8) + { + pos = 0; + dp++; + } + } + if(row_info->bit_depth == 4) + { + if(((*dp << (pos+=4)) & 0xf0) == 0) zero_samples++; + if(pos == 8) + { + pos = 0; + dp++; + } + } + if(row_info->bit_depth == 8) + if(*dp++ == 0) zero_samples++; + if(row_info->bit_depth == 16) + { + if((*dp | *(dp+1)) == 0) zero_samples++; + dp+=2; + } + } + } + else /* other color types */ + { + png_uint_32 n, nstop; + int channel; + int color_channels = row_info->channels; + if(row_info->color_type > 3)color_channels--; + + for (n=0, nstop=row_info->width; nbit_depth == 8) + if(*dp++ == 0) zero_samples++; + if(row_info->bit_depth == 16) + { + if((*dp | *(dp+1)) == 0) zero_samples++; + dp+=2; + } + } + if(row_info->color_type > 3) + { + dp++; + if(row_info->bit_depth == 16)dp++; + } + } + } +} +#endif /* PNG_WRITE_USER_TRANSFORM_SUPPORTED */ + +static int wrote_question = 0; + +#if defined(PNG_NO_STDIO) +/* START of code to validate stdio-free compilation */ +/* These copies of the default read/write functions come from pngrio.c and */ +/* pngwio.c. They allow "don't include stdio" testing of the library. */ +/* This is the function that does the actual reading of data. If you are + not reading from a standard C stream, you should create a replacement + read_data function and use it at run time with png_set_read_fn(), rather + than changing the library. */ + +#ifndef USE_FAR_KEYWORD +static void +pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) +{ + png_size_t check; + + /* fread() returns 0 on error, so it is OK to store this in a png_size_t + * instead of an int, which is what fread() actually returns. + */ + READFILE((png_FILE_p)png_ptr->io_ptr, data, length, check); + + if (check != length) + { + png_error(png_ptr, "Read Error!"); + } +} +#else +/* this is the model-independent version. Since the standard I/O library + can't handle far buffers in the medium and small models, we have to copy + the data. +*/ + +#define NEAR_BUF_SIZE 1024 +#define MIN(a,b) (a <= b ? a : b) + +static void +pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) +{ + int check; + png_byte *n_data; + png_FILE_p io_ptr; + + /* Check if data really is near. If so, use usual code. */ + n_data = (png_byte *)CVT_PTR_NOCHECK(data); + io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); + if ((png_bytep)n_data == data) + { + READFILE(io_ptr, n_data, length, check); + } + else + { + png_byte buf[NEAR_BUF_SIZE]; + png_size_t read, remaining, err; + check = 0; + remaining = length; + do + { + read = MIN(NEAR_BUF_SIZE, remaining); + READFILE(io_ptr, buf, 1, err); + png_memcpy(data, buf, read); /* copy far buffer to near buffer */ + if(err != read) + break; + else + check += err; + data += read; + remaining -= read; + } + while (remaining != 0); + } + if (check != length) + { + png_error(png_ptr, "read Error"); + } +} +#endif /* USE_FAR_KEYWORD */ + +#if defined(PNG_WRITE_FLUSH_SUPPORTED) +static void +pngtest_flush(png_structp png_ptr) +{ +#if !defined(_WIN32_WCE) + png_FILE_p io_ptr; + io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr)); + if (io_ptr != NULL) + fflush(io_ptr); +#endif +} +#endif + +/* This is the function that does the actual writing of data. If you are + not writing to a standard C stream, you should create a replacement + write_data function and use it at run time with png_set_write_fn(), rather + than changing the library. */ +#ifndef USE_FAR_KEYWORD +static void +pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length) +{ + png_uint_32 check; + + WRITEFILE((png_FILE_p)png_ptr->io_ptr, data, length, check); + if (check != length) + { + png_error(png_ptr, "Write Error"); + } +} +#else +/* this is the model-independent version. Since the standard I/O library + can't handle far buffers in the medium and small models, we have to copy + the data. +*/ + +#define NEAR_BUF_SIZE 1024 +#define MIN(a,b) (a <= b ? a : b) + +static void +pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length) +{ + png_uint_32 check; + png_byte *near_data; /* Needs to be "png_byte *" instead of "png_bytep" */ + png_FILE_p io_ptr; + + /* Check if data really is near. If so, use usual code. */ + near_data = (png_byte *)CVT_PTR_NOCHECK(data); + io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); + if ((png_bytep)near_data == data) + { + WRITEFILE(io_ptr, near_data, length, check); + } + else + { + png_byte buf[NEAR_BUF_SIZE]; + png_size_t written, remaining, err; + check = 0; + remaining = length; + do + { + written = MIN(NEAR_BUF_SIZE, remaining); + png_memcpy(buf, data, written); /* copy far buffer to near buffer */ + WRITEFILE(io_ptr, buf, written, err); + if (err != written) + break; + else + check += err; + data += written; + remaining -= written; + } + while (remaining != 0); + } + if (check != length) + { + png_error(png_ptr, "Write Error"); + } +} + +#endif /* USE_FAR_KEYWORD */ + +/* This function is called when there is a warning, but the library thinks + * it can continue anyway. Replacement functions don't have to do anything + * here if you don't want to. In the default configuration, png_ptr is + * not used, but it is passed in case it may be useful. + */ +static void +pngtest_warning(png_structp png_ptr, png_const_charp message) +{ + PNG_CONST char *name = "UNKNOWN (ERROR!)"; + if (png_ptr != NULL && png_ptr->error_ptr != NULL) + name = png_ptr->error_ptr; + fprintf(STDERR, "%s: libpng warning: %s\n", name, message); +} + +/* This is the default error handling function. Note that replacements for + * this function MUST NOT RETURN, or the program will likely crash. This + * function is used by default, or if the program supplies NULL for the + * error function pointer in png_set_error_fn(). + */ +static void +pngtest_error(png_structp png_ptr, png_const_charp message) +{ + pngtest_warning(png_ptr, message); + /* We can return because png_error calls the default handler, which is + * actually OK in this case. */ +} +#endif /* PNG_NO_STDIO */ +/* END of code to validate stdio-free compilation */ + +/* START of code to validate memory allocation and deallocation */ +#ifdef PNG_USER_MEM_SUPPORTED + +/* Allocate memory. For reasonable files, size should never exceed + 64K. However, zlib may allocate more then 64K if you don't tell + it not to. See zconf.h and png.h for more information. zlib does + need to allocate exactly 64K, so whatever you call here must + have the ability to do that. + + This piece of code can be compiled to validate max 64K allocations + by setting MAXSEG_64K in zlib zconf.h *or* PNG_MAX_MALLOC_64K. */ +typedef struct memory_information +{ + png_uint_32 size; + png_voidp pointer; + struct memory_information FAR *next; +} memory_information; +typedef memory_information FAR *memory_infop; + +static memory_infop pinformation = NULL; +static int current_allocation = 0; +static int maximum_allocation = 0; +static int total_allocation = 0; +static int num_allocations = 0; + +png_voidp png_debug_malloc PNGARG((png_structp png_ptr, png_uint_32 size)); +void png_debug_free PNGARG((png_structp png_ptr, png_voidp ptr)); + +png_voidp +png_debug_malloc(png_structp png_ptr, png_uint_32 size) +{ + + /* png_malloc has already tested for NULL; png_create_struct calls + png_debug_malloc directly, with png_ptr == NULL which is OK */ + + if (size == 0) + return (NULL); + + /* This calls the library allocator twice, once to get the requested + buffer and once to get a new free list entry. */ + { + memory_infop pinfo = (memory_infop)png_malloc_default(png_ptr, + (png_uint_32)sizeof *pinfo); + pinfo->size = size; + current_allocation += size; + total_allocation += size; + num_allocations ++; + if (current_allocation > maximum_allocation) + maximum_allocation = current_allocation; + pinfo->pointer = (png_voidp)png_malloc_default(png_ptr, size); + pinfo->next = pinformation; + pinformation = pinfo; + /* Make sure the caller isn't assuming zeroed memory. */ + png_memset(pinfo->pointer, 0xdd, pinfo->size); +#if PNG_DEBUG + if(verbose) + printf("png_malloc %lu bytes at %x\n",size,pinfo->pointer); +#endif + assert(pinfo->size != 12345678); + return (png_voidp)(pinfo->pointer); + } +} + +/* Free a pointer. It is removed from the list at the same time. */ +void +png_debug_free(png_structp png_ptr, png_voidp ptr) +{ + if (png_ptr == NULL) + fprintf(STDERR, "NULL pointer to png_debug_free.\n"); + if (ptr == 0) + { +#if 0 /* This happens all the time. */ + fprintf(STDERR, "WARNING: freeing NULL pointer\n"); +#endif + return; + } + + /* Unlink the element from the list. */ + { + memory_infop FAR *ppinfo = &pinformation; + for (;;) + { + memory_infop pinfo = *ppinfo; + if (pinfo->pointer == ptr) + { + *ppinfo = pinfo->next; + current_allocation -= pinfo->size; + if (current_allocation < 0) + fprintf(STDERR, "Duplicate free of memory\n"); + /* We must free the list element too, but first kill + the memory that is to be freed. */ + png_memset(ptr, 0x55, pinfo->size); + png_free_default(png_ptr, pinfo); + pinfo=NULL; + break; + } + if (pinfo->next == NULL) + { + fprintf(STDERR, "Pointer %x not found\n", (unsigned int)ptr); + break; + } + ppinfo = &pinfo->next; + } + } + + /* Finally free the data. */ +#if PNG_DEBUG + if(verbose) + printf("Freeing %x\n",ptr); +#endif + png_free_default(png_ptr, ptr); + ptr=NULL; +} +#endif /* PNG_USER_MEM_SUPPORTED */ +/* END of code to test memory allocation/deallocation */ + +/* Test one file */ +int +test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) +{ + static png_FILE_p fpin; + static png_FILE_p fpout; /* "static" prevents setjmp corruption */ + png_structp read_ptr; + png_infop read_info_ptr, end_info_ptr; +#ifdef PNG_WRITE_SUPPORTED + png_structp write_ptr; + png_infop write_info_ptr; + png_infop write_end_info_ptr; +#else + png_structp write_ptr = NULL; + png_infop write_info_ptr = NULL; + png_infop write_end_info_ptr = NULL; +#endif + png_bytep row_buf; + png_uint_32 y; + png_uint_32 width, height; + int num_pass, pass; + int bit_depth, color_type; +#ifdef PNG_SETJMP_SUPPORTED +#ifdef USE_FAR_KEYWORD + jmp_buf jmpbuf; +#endif +#endif + +#if defined(_WIN32_WCE) + TCHAR path[MAX_PATH]; +#endif + char inbuf[256], outbuf[256]; + + row_buf = NULL; + +#if defined(_WIN32_WCE) + MultiByteToWideChar(CP_ACP, 0, inname, -1, path, MAX_PATH); + if ((fpin = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE) +#else + if ((fpin = fopen(inname, "rb")) == NULL) +#endif + { + fprintf(STDERR, "Could not find input file %s\n", inname); + return (1); + } + +#if defined(_WIN32_WCE) + MultiByteToWideChar(CP_ACP, 0, outname, -1, path, MAX_PATH); + if ((fpout = CreateFile(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL)) == INVALID_HANDLE_VALUE) +#else + if ((fpout = fopen(outname, "wb")) == NULL) +#endif + { + fprintf(STDERR, "Could not open output file %s\n", outname); + FCLOSE(fpin); + return (1); + } + + png_debug(0, "Allocating read and write structures\n"); +#ifdef PNG_USER_MEM_SUPPORTED + read_ptr = png_create_read_struct_2(PNG_LIBPNG_VER_STRING, png_voidp_NULL, + png_error_ptr_NULL, png_error_ptr_NULL, png_voidp_NULL, + (png_malloc_ptr)png_debug_malloc, (png_free_ptr)png_debug_free); +#else + read_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, png_voidp_NULL, + png_error_ptr_NULL, png_error_ptr_NULL); +#endif +#if defined(PNG_NO_STDIO) + png_set_error_fn(read_ptr, (png_voidp)inname, pngtest_error, + pngtest_warning); +#endif +#ifdef PNG_WRITE_SUPPORTED +#ifdef PNG_USER_MEM_SUPPORTED + write_ptr = png_create_write_struct_2(PNG_LIBPNG_VER_STRING, png_voidp_NULL, + png_error_ptr_NULL, png_error_ptr_NULL, png_voidp_NULL, + (png_malloc_ptr)png_debug_malloc, (png_free_ptr)png_debug_free); +#else + write_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, png_voidp_NULL, + png_error_ptr_NULL, png_error_ptr_NULL); +#endif +#if defined(PNG_NO_STDIO) + png_set_error_fn(write_ptr, (png_voidp)inname, pngtest_error, + pngtest_warning); +#endif +#endif + png_debug(0, "Allocating read_info, write_info and end_info structures\n"); + read_info_ptr = png_create_info_struct(read_ptr); + end_info_ptr = png_create_info_struct(read_ptr); +#ifdef PNG_WRITE_SUPPORTED + write_info_ptr = png_create_info_struct(write_ptr); + write_end_info_ptr = png_create_info_struct(write_ptr); +#endif + +#ifdef PNG_SETJMP_SUPPORTED + png_debug(0, "Setting jmpbuf for read struct\n"); +#ifdef USE_FAR_KEYWORD + if (setjmp(jmpbuf)) +#else + if (setjmp(png_jmpbuf(read_ptr))) +#endif + { + fprintf(STDERR, "%s -> %s: libpng read error\n", inname, outname); + if (row_buf) + png_free(read_ptr, row_buf); + png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr); +#ifdef PNG_WRITE_SUPPORTED + png_destroy_info_struct(write_ptr, &write_end_info_ptr); + png_destroy_write_struct(&write_ptr, &write_info_ptr); +#endif + FCLOSE(fpin); + FCLOSE(fpout); + return (1); + } +#ifdef USE_FAR_KEYWORD + png_memcpy(png_jmpbuf(read_ptr),jmpbuf,sizeof(jmp_buf)); +#endif + +#ifdef PNG_WRITE_SUPPORTED + png_debug(0, "Setting jmpbuf for write struct\n"); +#ifdef USE_FAR_KEYWORD + if (setjmp(jmpbuf)) +#else + if (setjmp(png_jmpbuf(write_ptr))) +#endif + { + fprintf(STDERR, "%s -> %s: libpng write error\n", inname, outname); + png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr); + png_destroy_info_struct(write_ptr, &write_end_info_ptr); +#ifdef PNG_WRITE_SUPPORTED + png_destroy_write_struct(&write_ptr, &write_info_ptr); +#endif + FCLOSE(fpin); + FCLOSE(fpout); + return (1); + } +#ifdef USE_FAR_KEYWORD + png_memcpy(png_jmpbuf(write_ptr),jmpbuf,sizeof(jmp_buf)); +#endif +#endif +#endif + + png_debug(0, "Initializing input and output streams\n"); +#if !defined(PNG_NO_STDIO) + png_init_io(read_ptr, fpin); +# ifdef PNG_WRITE_SUPPORTED + png_init_io(write_ptr, fpout); +# endif +#else + png_set_read_fn(read_ptr, (png_voidp)fpin, pngtest_read_data); +# ifdef PNG_WRITE_SUPPORTED + png_set_write_fn(write_ptr, (png_voidp)fpout, pngtest_write_data, +# if defined(PNG_WRITE_FLUSH_SUPPORTED) + pngtest_flush); +# else + NULL); +# endif +# endif +#endif + if(status_dots_requested == 1) + { +#ifdef PNG_WRITE_SUPPORTED + png_set_write_status_fn(write_ptr, write_row_callback); +#endif + png_set_read_status_fn(read_ptr, read_row_callback); + } + else + { +#ifdef PNG_WRITE_SUPPORTED + png_set_write_status_fn(write_ptr, png_write_status_ptr_NULL); +#endif + png_set_read_status_fn(read_ptr, png_read_status_ptr_NULL); + } + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) + { + int i; + for(i=0; i<256; i++) + filters_used[i]=0; + png_set_read_user_transform_fn(read_ptr, count_filters); + } +#endif +#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) + zero_samples=0; + png_set_write_user_transform_fn(write_ptr, count_zero_samples); +#endif + +#define HANDLE_CHUNK_IF_SAFE 2 +#define HANDLE_CHUNK_ALWAYS 3 +#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) + png_set_keep_unknown_chunks(read_ptr, HANDLE_CHUNK_ALWAYS, + png_bytep_NULL, 0); +#endif +#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) + png_set_keep_unknown_chunks(write_ptr, HANDLE_CHUNK_IF_SAFE, + png_bytep_NULL, 0); +#endif + + png_debug(0, "Reading info struct\n"); + png_read_info(read_ptr, read_info_ptr); + + png_debug(0, "Transferring info struct\n"); + { + int interlace_type, compression_type, filter_type; + + if (png_get_IHDR(read_ptr, read_info_ptr, &width, &height, &bit_depth, + &color_type, &interlace_type, &compression_type, &filter_type)) + { + png_set_IHDR(write_ptr, write_info_ptr, width, height, bit_depth, +#if defined(PNG_WRITE_INTERLACING_SUPPORTED) + color_type, interlace_type, compression_type, filter_type); +#else + color_type, PNG_INTERLACE_NONE, compression_type, filter_type); +#endif + } + } +#if defined(PNG_FIXED_POINT_SUPPORTED) +#if defined(PNG_cHRM_SUPPORTED) + { + png_fixed_point white_x, white_y, red_x, red_y, green_x, green_y, blue_x, + blue_y; + if (png_get_cHRM_fixed(read_ptr, read_info_ptr, &white_x, &white_y, &red_x, + &red_y, &green_x, &green_y, &blue_x, &blue_y)) + { + png_set_cHRM_fixed(write_ptr, write_info_ptr, white_x, white_y, red_x, + red_y, green_x, green_y, blue_x, blue_y); + } + } +#endif +#if defined(PNG_gAMA_SUPPORTED) + { + png_fixed_point gamma; + + if (png_get_gAMA_fixed(read_ptr, read_info_ptr, &gamma)) + { + png_set_gAMA_fixed(write_ptr, write_info_ptr, gamma); + } + } +#endif +#else /* Use floating point versions */ +#if defined(PNG_FLOATING_POINT_SUPPORTED) +#if defined(PNG_cHRM_SUPPORTED) + { + double white_x, white_y, red_x, red_y, green_x, green_y, blue_x, + blue_y; + if (png_get_cHRM(read_ptr, read_info_ptr, &white_x, &white_y, &red_x, + &red_y, &green_x, &green_y, &blue_x, &blue_y)) + { + png_set_cHRM(write_ptr, write_info_ptr, white_x, white_y, red_x, + red_y, green_x, green_y, blue_x, blue_y); + } + } +#endif +#if defined(PNG_gAMA_SUPPORTED) + { + double gamma; + + if (png_get_gAMA(read_ptr, read_info_ptr, &gamma)) + { + png_set_gAMA(write_ptr, write_info_ptr, gamma); + } + } +#endif +#endif /* floating point */ +#endif /* fixed point */ +#if defined(PNG_iCCP_SUPPORTED) + { + png_charp name; + png_charp profile; + png_uint_32 proflen; + int compression_type; + + if (png_get_iCCP(read_ptr, read_info_ptr, &name, &compression_type, + &profile, &proflen)) + { + png_set_iCCP(write_ptr, write_info_ptr, name, compression_type, + profile, proflen); + } + } +#endif +#if defined(PNG_sRGB_SUPPORTED) + { + int intent; + + if (png_get_sRGB(read_ptr, read_info_ptr, &intent)) + { + png_set_sRGB(write_ptr, write_info_ptr, intent); + } + } +#endif + { + png_colorp palette; + int num_palette; + + if (png_get_PLTE(read_ptr, read_info_ptr, &palette, &num_palette)) + { + png_set_PLTE(write_ptr, write_info_ptr, palette, num_palette); + } + } +#if defined(PNG_bKGD_SUPPORTED) + { + png_color_16p background; + + if (png_get_bKGD(read_ptr, read_info_ptr, &background)) + { + png_set_bKGD(write_ptr, write_info_ptr, background); + } + } +#endif +#if defined(PNG_hIST_SUPPORTED) + { + png_uint_16p hist; + + if (png_get_hIST(read_ptr, read_info_ptr, &hist)) + { + png_set_hIST(write_ptr, write_info_ptr, hist); + } + } +#endif +#if defined(PNG_oFFs_SUPPORTED) + { + png_int_32 offset_x, offset_y; + int unit_type; + + if (png_get_oFFs(read_ptr, read_info_ptr,&offset_x,&offset_y,&unit_type)) + { + png_set_oFFs(write_ptr, write_info_ptr, offset_x, offset_y, unit_type); + } + } +#endif +#if defined(PNG_pCAL_SUPPORTED) + { + png_charp purpose, units; + png_charpp params; + png_int_32 X0, X1; + int type, nparams; + + if (png_get_pCAL(read_ptr, read_info_ptr, &purpose, &X0, &X1, &type, + &nparams, &units, ¶ms)) + { + png_set_pCAL(write_ptr, write_info_ptr, purpose, X0, X1, type, + nparams, units, params); + } + } +#endif +#if defined(PNG_pHYs_SUPPORTED) + { + png_uint_32 res_x, res_y; + int unit_type; + + if (png_get_pHYs(read_ptr, read_info_ptr, &res_x, &res_y, &unit_type)) + { + png_set_pHYs(write_ptr, write_info_ptr, res_x, res_y, unit_type); + } + } +#endif +#if defined(PNG_sBIT_SUPPORTED) + { + png_color_8p sig_bit; + + if (png_get_sBIT(read_ptr, read_info_ptr, &sig_bit)) + { + png_set_sBIT(write_ptr, write_info_ptr, sig_bit); + } + } +#endif +#if defined(PNG_sCAL_SUPPORTED) +#ifdef PNG_FLOATING_POINT_SUPPORTED + { + int unit; + double scal_width, scal_height; + + if (png_get_sCAL(read_ptr, read_info_ptr, &unit, &scal_width, + &scal_height)) + { + png_set_sCAL(write_ptr, write_info_ptr, unit, scal_width, scal_height); + } + } +#else +#ifdef PNG_FIXED_POINT_SUPPORTED + { + int unit; + png_charp scal_width, scal_height; + + if (png_get_sCAL_s(read_ptr, read_info_ptr, &unit, &scal_width, + &scal_height)) + { + png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width, scal_height); + } + } +#endif +#endif +#endif +#if defined(PNG_TEXT_SUPPORTED) + { + png_textp text_ptr; + int num_text; + + if (png_get_text(read_ptr, read_info_ptr, &text_ptr, &num_text) > 0) + { + png_debug1(0, "Handling %d iTXt/tEXt/zTXt chunks\n", num_text); + png_set_text(write_ptr, write_info_ptr, text_ptr, num_text); + } + } +#endif +#if defined(PNG_tIME_SUPPORTED) + { + png_timep mod_time; + + if (png_get_tIME(read_ptr, read_info_ptr, &mod_time)) + { + png_set_tIME(write_ptr, write_info_ptr, mod_time); +#if defined(PNG_TIME_RFC1123_SUPPORTED) + /* we have to use png_strcpy instead of "=" because the string + pointed to by png_convert_to_rfc1123() gets free'ed before + we use it */ + png_strcpy(tIME_string,png_convert_to_rfc1123(read_ptr, mod_time)); + tIME_chunk_present++; +#endif /* PNG_TIME_RFC1123_SUPPORTED */ + } + } +#endif +#if defined(PNG_tRNS_SUPPORTED) + { + png_bytep trans; + int num_trans; + png_color_16p trans_values; + + if (png_get_tRNS(read_ptr, read_info_ptr, &trans, &num_trans, + &trans_values)) + { + png_set_tRNS(write_ptr, write_info_ptr, trans, num_trans, + trans_values); + } + } +#endif +#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) + { + png_unknown_chunkp unknowns; + int num_unknowns = (int)png_get_unknown_chunks(read_ptr, read_info_ptr, + &unknowns); + if (num_unknowns) + { + png_size_t i; + png_set_unknown_chunks(write_ptr, write_info_ptr, unknowns, + num_unknowns); + /* copy the locations from the read_info_ptr. The automatically + generated locations in write_info_ptr are wrong because we + haven't written anything yet */ + for (i = 0; i < (png_size_t)num_unknowns; i++) + png_set_unknown_chunk_location(write_ptr, write_info_ptr, i, + unknowns[i].location); + } + } +#endif + +#ifdef PNG_WRITE_SUPPORTED + png_debug(0, "\nWriting info struct\n"); + +/* If we wanted, we could write info in two steps: + png_write_info_before_PLTE(write_ptr, write_info_ptr); + */ + png_write_info(write_ptr, write_info_ptr); +#endif + +#ifdef SINGLE_ROWBUF_ALLOC + png_debug(0, "\nAllocating row buffer..."); + row_buf = (png_bytep)png_malloc(read_ptr, + png_get_rowbytes(read_ptr, read_info_ptr)); + png_debug1(0, "0x%08lx\n\n", (unsigned long)row_buf); +#endif /* SINGLE_ROWBUF_ALLOC */ + png_debug(0, "Writing row data\n"); + +#if defined(PNG_READ_INTERLACING_SUPPORTED) || \ + defined(PNG_WRITE_INTERLACING_SUPPORTED) + num_pass = png_set_interlace_handling(read_ptr); +# ifdef PNG_WRITE_SUPPORTED + png_set_interlace_handling(write_ptr); +# endif +#else + num_pass=1; +#endif + +#ifdef PNGTEST_TIMING + t_stop = (float)clock(); + t_misc += (t_stop - t_start); + t_start = t_stop; +#endif + for (pass = 0; pass < num_pass; pass++) + { + png_debug1(0, "Writing row data for pass %d\n",pass); + for (y = 0; y < height; y++) + { +#ifndef SINGLE_ROWBUF_ALLOC + png_debug2(0, "\nAllocating row buffer (pass %d, y = %ld)...", pass,y); + row_buf = (png_bytep)png_malloc(read_ptr, + png_get_rowbytes(read_ptr, read_info_ptr)); + png_debug2(0, "0x%08lx (%ld bytes)\n", (unsigned long)row_buf, + png_get_rowbytes(read_ptr, read_info_ptr)); +#endif /* !SINGLE_ROWBUF_ALLOC */ + png_read_rows(read_ptr, (png_bytepp)&row_buf, png_bytepp_NULL, 1); + +#ifdef PNG_WRITE_SUPPORTED +#ifdef PNGTEST_TIMING + t_stop = (float)clock(); + t_decode += (t_stop - t_start); + t_start = t_stop; +#endif + png_write_rows(write_ptr, (png_bytepp)&row_buf, 1); +#ifdef PNGTEST_TIMING + t_stop = (float)clock(); + t_encode += (t_stop - t_start); + t_start = t_stop; +#endif +#endif /* PNG_WRITE_SUPPORTED */ + +#ifndef SINGLE_ROWBUF_ALLOC + png_debug2(0, "Freeing row buffer (pass %d, y = %ld)\n\n", pass, y); + png_free(read_ptr, row_buf); +#endif /* !SINGLE_ROWBUF_ALLOC */ + } + } + +#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) + png_free_data(read_ptr, read_info_ptr, PNG_FREE_UNKN, -1); +#endif +#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) + png_free_data(write_ptr, write_info_ptr, PNG_FREE_UNKN, -1); +#endif + + png_debug(0, "Reading and writing end_info data\n"); + + png_read_end(read_ptr, end_info_ptr); +#if defined(PNG_TEXT_SUPPORTED) + { + png_textp text_ptr; + int num_text; + + if (png_get_text(read_ptr, end_info_ptr, &text_ptr, &num_text) > 0) + { + png_debug1(0, "Handling %d iTXt/tEXt/zTXt chunks\n", num_text); + png_set_text(write_ptr, write_end_info_ptr, text_ptr, num_text); + } + } +#endif +#if defined(PNG_tIME_SUPPORTED) + { + png_timep mod_time; + + if (png_get_tIME(read_ptr, end_info_ptr, &mod_time)) + { + png_set_tIME(write_ptr, write_end_info_ptr, mod_time); +#if defined(PNG_TIME_RFC1123_SUPPORTED) + /* we have to use png_strcpy instead of "=" because the string + pointed to by png_convert_to_rfc1123() gets free'ed before + we use it */ + png_strcpy(tIME_string,png_convert_to_rfc1123(read_ptr, mod_time)); + tIME_chunk_present++; +#endif /* PNG_TIME_RFC1123_SUPPORTED */ + } + } +#endif +#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) + { + png_unknown_chunkp unknowns; + int num_unknowns; + num_unknowns = (int)png_get_unknown_chunks(read_ptr, end_info_ptr, + &unknowns); + if (num_unknowns) + { + png_size_t i; + png_set_unknown_chunks(write_ptr, write_end_info_ptr, unknowns, + num_unknowns); + /* copy the locations from the read_info_ptr. The automatically + generated locations in write_end_info_ptr are wrong because we + haven't written the end_info yet */ + for (i = 0; i < (png_size_t)num_unknowns; i++) + png_set_unknown_chunk_location(write_ptr, write_end_info_ptr, i, + unknowns[i].location); + } + } +#endif +#ifdef PNG_WRITE_SUPPORTED + png_write_end(write_ptr, write_end_info_ptr); +#endif + +#ifdef PNG_EASY_ACCESS_SUPPORTED + if(verbose) + { + png_uint_32 iwidth, iheight; + iwidth = png_get_image_width(write_ptr, write_info_ptr); + iheight = png_get_image_height(write_ptr, write_info_ptr); + fprintf(STDERR, "Image width = %lu, height = %lu\n", + iwidth, iheight); + } +#endif + + png_debug(0, "Destroying data structs\n"); +#ifdef SINGLE_ROWBUF_ALLOC + png_debug(1, "destroying row_buf for read_ptr\n"); + png_free(read_ptr, row_buf); + row_buf=NULL; +#endif /* SINGLE_ROWBUF_ALLOC */ + png_debug(1, "destroying read_ptr, read_info_ptr, end_info_ptr\n"); + png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr); +#ifdef PNG_WRITE_SUPPORTED + png_debug(1, "destroying write_end_info_ptr\n"); + png_destroy_info_struct(write_ptr, &write_end_info_ptr); + png_debug(1, "destroying write_ptr, write_info_ptr\n"); + png_destroy_write_struct(&write_ptr, &write_info_ptr); +#endif + png_debug(0, "Destruction complete.\n"); + + FCLOSE(fpin); + FCLOSE(fpout); + + png_debug(0, "Opening files for comparison\n"); +#if defined(_WIN32_WCE) + MultiByteToWideChar(CP_ACP, 0, inname, -1, path, MAX_PATH); + if ((fpin = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE) +#else + if ((fpin = fopen(inname, "rb")) == NULL) +#endif + { + fprintf(STDERR, "Could not find file %s\n", inname); + return (1); + } + +#if defined(_WIN32_WCE) + MultiByteToWideChar(CP_ACP, 0, outname, -1, path, MAX_PATH); + if ((fpout = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE) +#else + if ((fpout = fopen(outname, "rb")) == NULL) +#endif + { + fprintf(STDERR, "Could not find file %s\n", outname); + FCLOSE(fpin); + return (1); + } + + for(;;) + { + png_size_t num_in, num_out; + + READFILE(fpin, inbuf, 1, num_in); + READFILE(fpout, outbuf, 1, num_out); + + if (num_in != num_out) + { + fprintf(STDERR, "\nFiles %s and %s are of a different size\n", + inname, outname); + if(wrote_question == 0) + { + fprintf(STDERR, + " Was %s written with the same maximum IDAT chunk size (%d bytes),", + inname,PNG_ZBUF_SIZE); + fprintf(STDERR, + "\n filtering heuristic (libpng default), compression"); + fprintf(STDERR, + " level (zlib default),\n and zlib version (%s)?\n\n", + ZLIB_VERSION); + wrote_question=1; + } + FCLOSE(fpin); + FCLOSE(fpout); + return (0); + } + + if (!num_in) + break; + + if (png_memcmp(inbuf, outbuf, num_in)) + { + fprintf(STDERR, "\nFiles %s and %s are different\n", inname, outname); + if(wrote_question == 0) + { + fprintf(STDERR, + " Was %s written with the same maximum IDAT chunk size (%d bytes),", + inname,PNG_ZBUF_SIZE); + fprintf(STDERR, + "\n filtering heuristic (libpng default), compression"); + fprintf(STDERR, + " level (zlib default),\n and zlib version (%s)?\n\n", + ZLIB_VERSION); + wrote_question=1; + } + FCLOSE(fpin); + FCLOSE(fpout); + return (0); + } + } + + FCLOSE(fpin); + FCLOSE(fpout); + + return (0); +} + +/* input and output filenames */ +#ifdef RISCOS +static PNG_CONST char *inname = "pngtest/png"; +static PNG_CONST char *outname = "pngout/png"; +#else +static PNG_CONST char *inname = "pngtest.png"; +static PNG_CONST char *outname = "pngout.png"; +#endif + +int +main(int argc, char *argv[]) +{ + int multiple = 0; + int ierror = 0; + + fprintf(STDERR, "Testing libpng version %s\n", PNG_LIBPNG_VER_STRING); + fprintf(STDERR, " with zlib version %s\n", ZLIB_VERSION); + fprintf(STDERR,"%s",png_get_copyright(NULL)); + /* Show the version of libpng used in building the library */ + fprintf(STDERR," library (%lu):%s", png_access_version_number(), + png_get_header_version(NULL)); + /* Show the version of libpng used in building the application */ + fprintf(STDERR," pngtest (%lu):%s", (unsigned long)PNG_LIBPNG_VER, + PNG_HEADER_VERSION_STRING); + fprintf(STDERR," sizeof(png_struct)=%ld, sizeof(png_info)=%ld\n", + (long)sizeof(png_struct), (long)sizeof(png_info)); + + /* Do some consistency checking on the memory allocation settings, I'm + not sure this matters, but it is nice to know, the first of these + tests should be impossible because of the way the macros are set + in pngconf.h */ +#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K) + fprintf(STDERR, " NOTE: Zlib compiled for max 64k, libpng not\n"); +#endif + /* I think the following can happen. */ +#if !defined(MAXSEG_64K) && defined(PNG_MAX_MALLOC_64K) + fprintf(STDERR, " NOTE: libpng compiled for max 64k, zlib not\n"); +#endif + + if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING)) + { + fprintf(STDERR, + "Warning: versions are different between png.h and png.c\n"); + fprintf(STDERR, " png.h version: %s\n", PNG_LIBPNG_VER_STRING); + fprintf(STDERR, " png.c version: %s\n\n", png_libpng_ver); + ++ierror; + } + + if (argc > 1) + { + if (strcmp(argv[1], "-m") == 0) + { + multiple = 1; + status_dots_requested = 0; + } + else if (strcmp(argv[1], "-mv") == 0 || + strcmp(argv[1], "-vm") == 0 ) + { + multiple = 1; + verbose = 1; + status_dots_requested = 1; + } + else if (strcmp(argv[1], "-v") == 0) + { + verbose = 1; + status_dots_requested = 1; + inname = argv[2]; + } + else + { + inname = argv[1]; + status_dots_requested = 0; + } + } + + if (!multiple && argc == 3+verbose) + outname = argv[2+verbose]; + + if ((!multiple && argc > 3+verbose) || (multiple && argc < 2)) + { + fprintf(STDERR, + "usage: %s [infile.png] [outfile.png]\n\t%s -m {infile.png}\n", + argv[0], argv[0]); + fprintf(STDERR, + " reads/writes one PNG file (without -m) or multiple files (-m)\n"); + fprintf(STDERR, + " with -m %s is used as a temporary file\n", outname); + exit(1); + } + + if (multiple) + { + int i; +#ifdef PNG_USER_MEM_SUPPORTED + int allocation_now = current_allocation; +#endif + for (i=2; isize, + (unsigned int) pinfo->pointer); + pinfo = pinfo->next; + } + } +#endif + } +#ifdef PNG_USER_MEM_SUPPORTED + fprintf(STDERR, " Current memory allocation: %10d bytes\n", + current_allocation); + fprintf(STDERR, " Maximum memory allocation: %10d bytes\n", + maximum_allocation); + fprintf(STDERR, " Total memory allocation: %10d bytes\n", + total_allocation); + fprintf(STDERR, " Number of allocations: %10d\n", + num_allocations); +#endif + } + else + { + int i; + for (i=0; i<3; ++i) + { + int kerror; +#ifdef PNG_USER_MEM_SUPPORTED + int allocation_now = current_allocation; +#endif + if (i == 1) status_dots_requested = 1; + else if(verbose == 0)status_dots_requested = 0; + if (i == 0 || verbose == 1 || ierror != 0) + fprintf(STDERR, "Testing %s:",inname); + kerror = test_one_file(inname, outname); + if(kerror == 0) + { + if(verbose == 1 || i == 2) + { +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) + int k; +#endif +#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) + fprintf(STDERR, "\n PASS (%lu zero samples)\n",zero_samples); +#else + fprintf(STDERR, " PASS\n"); +#endif +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) + for (k=0; k<256; k++) + if(filters_used[k]) + fprintf(STDERR, " Filter %d was used %lu times\n", + k,filters_used[k]); +#endif +#if defined(PNG_TIME_RFC1123_SUPPORTED) + if(tIME_chunk_present != 0) + fprintf(STDERR, " tIME = %s\n",tIME_string); +#endif /* PNG_TIME_RFC1123_SUPPORTED */ + } + } + else + { + if(verbose == 0 && i != 2) + fprintf(STDERR, "Testing %s:",inname); + fprintf(STDERR, " FAIL\n"); + ierror += kerror; + } +#ifdef PNG_USER_MEM_SUPPORTED + if (allocation_now != current_allocation) + fprintf(STDERR, "MEMORY ERROR: %d bytes lost\n", + current_allocation-allocation_now); + if (current_allocation != 0) + { + memory_infop pinfo = pinformation; + + fprintf(STDERR, "MEMORY ERROR: %d bytes still allocated\n", + current_allocation); + while (pinfo != NULL) + { + fprintf(STDERR," %lu bytes at %x\n", + pinfo->size, (unsigned int)pinfo->pointer); + pinfo = pinfo->next; + } + } +#endif + } +#ifdef PNG_USER_MEM_SUPPORTED + fprintf(STDERR, " Current memory allocation: %10d bytes\n", + current_allocation); + fprintf(STDERR, " Maximum memory allocation: %10d bytes\n", + maximum_allocation); + fprintf(STDERR, " Total memory allocation: %10d bytes\n", + total_allocation); + fprintf(STDERR, " Number of allocations: %10d\n", + num_allocations); +#endif + } + +#ifdef PNGTEST_TIMING + t_stop = (float)clock(); + t_misc += (t_stop - t_start); + t_start = t_stop; + fprintf(STDERR," CPU time used = %.3f seconds", + (t_misc+t_decode+t_encode)/(float)CLOCKS_PER_SEC); + fprintf(STDERR," (decoding %.3f,\n", + t_decode/(float)CLOCKS_PER_SEC); + fprintf(STDERR," encoding %.3f ,", + t_encode/(float)CLOCKS_PER_SEC); + fprintf(STDERR," other %.3f seconds)\n\n", + t_misc/(float)CLOCKS_PER_SEC); +#endif + + if (ierror == 0) + fprintf(STDERR, "libpng passes test\n"); + else + fprintf(STDERR, "libpng FAILS test\n"); + return (int)(ierror != 0); +} + +/* Generate a compiler error if there is an old png.h in the search path. */ +typedef version_1_2_5 your_png_h_is_not_version_1_2_5; diff --git a/gtkmm-osx/libpng-1.2.5/pngtest.png b/gtkmm-osx/libpng-1.2.5/pngtest.png new file mode 100644 index 0000000000000000000000000000000000000000..f3a6df4483fc9d020c028d4e4f417767bfa72877 GIT binary patch literal 8574 zcmV-^A%WhBP) z000SeMObuHX>@F508max+yQwt001AiNklO)sr#@4<(ul(br`VbraBmuhk@3?%j97U znXm>WOoQH`mkmQV#Dgk$0iE!|kWKC(UZ$ifRdrR{?y-0LgGZ$*Gb7{uBI5Vw`}_VL z{2^pm*wxREhAV)-c=gTo8wWkR0{G-;xXP6%b;|g zqv8I@RW)^t7%eD~>nQ>F*f4b!06nYt@O07vs6LIyqkVe<@%GI=8WyVu!(s*S(Wtjd zU(82uRNY!T->v-XN2ArS$X5V=dGn1YqyG7%{PGt7XU7MtdHKc8=PzFjmdlKMM?UM^ zob$|iirnz{`J^*FIa-}hE}4{WHg{nFts1NPT7|xL{NGPcRH-}Z&ORBqPLzDn!OJ*ST}> zsq;*)JZ0ti6+7x~Kj$aL=b^rKPwfk=f2HdiZa6`2T=xibJt!J~uT>R;Q>-WuGr z>+kD`02wfMflFU=HkosFJX+0N)tk;s`c_j_0VTpgzwk;lMDRY`trmcRH5e^iTso}L zSR)vfk!8Zs)3G@}KJdl}&u6aFG!TgtM$iI<%`sXitMK~Zh0#o0vVhXw#p$H%4EJ)< zKvegiUUY;EfakNabNK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osx/libpng-1.2.5/pngtrans.c b/gtkmm-osx/libpng-1.2.5/pngtrans.c new file mode 100644 index 0000000..f08fb4e --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/pngtrans.c @@ -0,0 +1,640 @@ + +/* pngtrans.c - transforms the data in a row (used by both readers and writers) + * + * libpng 1.2.5 - October 3, 2002 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2002 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + */ + +#define PNG_INTERNAL +#include "png.h" + +#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) +/* turn on BGR-to-RGB mapping */ +void PNGAPI +png_set_bgr(png_structp png_ptr) +{ + png_debug(1, "in png_set_bgr\n"); + png_ptr->transformations |= PNG_BGR; +} +#endif + +#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +/* turn on 16 bit byte swapping */ +void PNGAPI +png_set_swap(png_structp png_ptr) +{ + png_debug(1, "in png_set_swap\n"); + if (png_ptr->bit_depth == 16) + png_ptr->transformations |= PNG_SWAP_BYTES; +} +#endif + +#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) +/* turn on pixel packing */ +void PNGAPI +png_set_packing(png_structp png_ptr) +{ + png_debug(1, "in png_set_packing\n"); + if (png_ptr->bit_depth < 8) + { + png_ptr->transformations |= PNG_PACK; + png_ptr->usr_bit_depth = 8; + } +} +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED) +/* turn on packed pixel swapping */ +void PNGAPI +png_set_packswap(png_structp png_ptr) +{ + png_debug(1, "in png_set_packswap\n"); + if (png_ptr->bit_depth < 8) + png_ptr->transformations |= PNG_PACKSWAP; +} +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) +void PNGAPI +png_set_shift(png_structp png_ptr, png_color_8p true_bits) +{ + png_debug(1, "in png_set_shift\n"); + png_ptr->transformations |= PNG_SHIFT; + png_ptr->shift = *true_bits; +} +#endif + +#if defined(PNG_READ_INTERLACING_SUPPORTED) || \ + defined(PNG_WRITE_INTERLACING_SUPPORTED) +int PNGAPI +png_set_interlace_handling(png_structp png_ptr) +{ + png_debug(1, "in png_set_interlace handling\n"); + if (png_ptr->interlaced) + { + png_ptr->transformations |= PNG_INTERLACE; + return (7); + } + + return (1); +} +#endif + +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) +/* Add a filler byte on read, or remove a filler or alpha byte on write. + * The filler type has changed in v0.95 to allow future 2-byte fillers + * for 48-bit input data, as well as to avoid problems with some compilers + * that don't like bytes as parameters. + */ +void PNGAPI +png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc) +{ + png_debug(1, "in png_set_filler\n"); + png_ptr->transformations |= PNG_FILLER; + png_ptr->filler = (png_byte)filler; + if (filler_loc == PNG_FILLER_AFTER) + png_ptr->flags |= PNG_FLAG_FILLER_AFTER; + else + png_ptr->flags &= ~PNG_FLAG_FILLER_AFTER; + + /* This should probably go in the "do_filler" routine. + * I attempted to do that in libpng-1.0.1a but that caused problems + * so I restored it in libpng-1.0.2a + */ + + if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) + { + png_ptr->usr_channels = 4; + } + + /* Also I added this in libpng-1.0.2a (what happens when we expand + * a less-than-8-bit grayscale to GA? */ + + if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY && png_ptr->bit_depth >= 8) + { + png_ptr->usr_channels = 2; + } +} +#endif + +#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) +void PNGAPI +png_set_swap_alpha(png_structp png_ptr) +{ + png_debug(1, "in png_set_swap_alpha\n"); + png_ptr->transformations |= PNG_SWAP_ALPHA; +} +#endif + +#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) +void PNGAPI +png_set_invert_alpha(png_structp png_ptr) +{ + png_debug(1, "in png_set_invert_alpha\n"); + png_ptr->transformations |= PNG_INVERT_ALPHA; +} +#endif + +#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) +void PNGAPI +png_set_invert_mono(png_structp png_ptr) +{ + png_debug(1, "in png_set_invert_mono\n"); + png_ptr->transformations |= PNG_INVERT_MONO; +} + +/* invert monochrome grayscale data */ +void /* PRIVATE */ +png_do_invert(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_invert\n"); + /* This test removed from libpng version 1.0.13 and 1.2.0: + * if (row_info->bit_depth == 1 && + */ +#if defined(PNG_USELESS_TESTS_SUPPORTED) + if (row == NULL || row_info == NULL) + return; +#endif + if (row_info->color_type == PNG_COLOR_TYPE_GRAY) + { + png_bytep rp = row; + png_uint_32 i; + png_uint_32 istop = row_info->rowbytes; + + for (i = 0; i < istop; i++) + { + *rp = (png_byte)(~(*rp)); + rp++; + } + } + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA && + row_info->bit_depth == 8) + { + png_bytep rp = row; + png_uint_32 i; + png_uint_32 istop = row_info->rowbytes; + + for (i = 0; i < istop; i+=2) + { + *rp = (png_byte)(~(*rp)); + rp+=2; + } + } + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA && + row_info->bit_depth == 16) + { + png_bytep rp = row; + png_uint_32 i; + png_uint_32 istop = row_info->rowbytes; + + for (i = 0; i < istop; i+=4) + { + *rp = (png_byte)(~(*rp)); + *(rp+1) = (png_byte)(~(*(rp+1))); + rp+=4; + } + } +} +#endif + +#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +/* swaps byte order on 16 bit depth images */ +void /* PRIVATE */ +png_do_swap(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_swap\n"); + if ( +#if defined(PNG_USELESS_TESTS_SUPPORTED) + row != NULL && row_info != NULL && +#endif + row_info->bit_depth == 16) + { + png_bytep rp = row; + png_uint_32 i; + png_uint_32 istop= row_info->width * row_info->channels; + + for (i = 0; i < istop; i++, rp += 2) + { + png_byte t = *rp; + *rp = *(rp + 1); + *(rp + 1) = t; + } + } +} +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED) +static png_byte onebppswaptable[256] = { + 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, + 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, + 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, + 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, + 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4, + 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4, + 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, + 0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC, + 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, + 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2, + 0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, + 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA, + 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6, + 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6, + 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE, + 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE, + 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, + 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1, + 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, + 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9, + 0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5, + 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5, + 0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED, + 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD, + 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3, + 0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3, + 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, + 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB, + 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, + 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7, + 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, + 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF +}; + +static png_byte twobppswaptable[256] = { + 0x00, 0x40, 0x80, 0xC0, 0x10, 0x50, 0x90, 0xD0, + 0x20, 0x60, 0xA0, 0xE0, 0x30, 0x70, 0xB0, 0xF0, + 0x04, 0x44, 0x84, 0xC4, 0x14, 0x54, 0x94, 0xD4, + 0x24, 0x64, 0xA4, 0xE4, 0x34, 0x74, 0xB4, 0xF4, + 0x08, 0x48, 0x88, 0xC8, 0x18, 0x58, 0x98, 0xD8, + 0x28, 0x68, 0xA8, 0xE8,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0xF7, + 0x0B, 0x4B, 0x8B, 0xCB, 0x1B, 0x5B, 0x9B, 0xDB, + 0x2B, 0x6B, 0xAB, 0xEB, 0x3B, 0x7B, 0xBB, 0xFB, + 0x0F, 0x4F, 0x8F, 0xCF, 0x1F, 0x5F, 0x9F, 0xDF, + 0x2F, 0x6F, 0xAF, 0xEF, 0x3F, 0x7F, 0xBF, 0xFF +}; + +static png_byte fourbppswaptable[256] = { + 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, + 0x80, 0x90, 0xA0, 0xB0, 0xC0, 0xD0, 0xE0, 0xF0, + 0x01, 0x11, 0x21, 0x31, 0x41, 0x51, 0x61, 0x71, + 0x81, 0x91, 0xA1, 0xB1, 0xC1, 0xD1, 0xE1, 0xF1, + 0x02, 0x12, 0x22, 0x32, 0x42, 0x52, 0x62, 0x72, + 0x82, 0x92, 0xA2, 0xB2, 0xC2, 0xD2, 0xE2, 0xF2, + 0x03, 0x13, 0x23, 0x33, 0x43, 0x53, 0x63, 0x73, + 0x83, 0x93, 0xA3, 0xB3, 0xC3, 0xD3, 0xE3, 0xF3, + 0x04, 0x14, 0x24, 0x34, 0x44, 0x54, 0x64, 0x74, + 0x84, 0x94, 0xA4, 0xB4, 0xC4, 0xD4, 0xE4, 0xF4, + 0x05, 0x15, 0x25, 0x35, 0x45, 0x55, 0x65, 0x75, + 0x85, 0x95, 0xA5, 0xB5, 0xC5, 0xD5, 0xE5, 0xF5, + 0x06, 0x16, 0x26, 0x36, 0x46, 0x56, 0x66, 0x76, + 0x86, 0x96, 0xA6, 0xB6, 0xC6, 0xD6, 0xE6, 0xF6, + 0x07, 0x17, 0x27, 0x37, 0x47, 0x57, 0x67, 0x77, + 0x87, 0x97, 0xA7, 0xB7, 0xC7, 0xD7, 0xE7, 0xF7, + 0x08, 0x18, 0x28, 0x38, 0x48, 0x58, 0x68, 0x78, + 0x88, 0x98, 0xA8, 0xB8, 0xC8, 0xD8, 0xE8, 0xF8, + 0x09, 0x19, 0x29, 0x39, 0x49, 0x59, 0x69, 0x79, + 0x89, 0x99, 0xA9, 0xB9, 0xC9, 0xD9, 0xE9, 0xF9, + 0x0A, 0x1A, 0x2A, 0x3A, 0x4A, 0x5A, 0x6A, 0x7A, + 0x8A, 0x9A, 0xAA, 0xBA, 0xCA, 0xDA, 0xEA, 0xFA, + 0x0B, 0x1B, 0x2B, 0x3B, 0x4B, 0x5B, 0x6B, 0x7B, + 0x8B, 0x9B, 0xAB, 0xBB, 0xCB, 0xDB, 0xEB, 0xFB, + 0x0C, 0x1C, 0x2C, 0x3C, 0x4C, 0x5C, 0x6C, 0x7C, + 0x8C, 0x9C, 0xAC, 0xBC, 0xCC, 0xDC, 0xEC, 0xFC, + 0x0D, 0x1D, 0x2D, 0x3D, 0x4D, 0x5D, 0x6D, 0x7D, + 0x8D, 0x9D, 0xAD, 0xBD, 0xCD, 0xDD, 0xED, 0xFD, + 0x0E, 0x1E, 0x2E, 0x3E, 0x4E, 0x5E, 0x6E, 0x7E, + 0x8E, 0x9E, 0xAE, 0xBE, 0xCE, 0xDE, 0xEE, 0xFE, + 0x0F, 0x1F, 0x2F, 0x3F, 0x4F, 0x5F, 0x6F, 0x7F, + 0x8F, 0x9F, 0xAF, 0xBF, 0xCF, 0xDF, 0xEF, 0xFF +}; + +/* swaps pixel packing order within bytes */ +void /* PRIVATE */ +png_do_packswap(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_packswap\n"); + if ( +#if defined(PNG_USELESS_TESTS_SUPPORTED) + row != NULL && row_info != NULL && +#endif + row_info->bit_depth < 8) + { + png_bytep rp, end, table; + + end = row + row_info->rowbytes; + + if (row_info->bit_depth == 1) + table = onebppswaptable; + else if (row_info->bit_depth == 2) + table = twobppswaptable; + else if (row_info->bit_depth == 4) + table = fourbppswaptable; + else + return; + + for (rp = row; rp < end; rp++) + *rp = table[*rp]; + } +} +#endif /* PNG_READ_PACKSWAP_SUPPORTED or PNG_WRITE_PACKSWAP_SUPPORTED */ + +#if defined(PNG_WRITE_FILLER_SUPPORTED) || \ + defined(PNG_READ_STRIP_ALPHA_SUPPORTED) +/* remove filler or alpha byte(s) */ +void /* PRIVATE */ +png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags) +{ + png_debug(1, "in png_do_strip_filler\n"); +#if defined(PNG_USELESS_TESTS_SUPPORTED) + if (row != NULL && row_info != NULL) +#endif + { +/* + if (row_info->color_type == PNG_COLOR_TYPE_RGB || + row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) +*/ + png_bytep sp=row; + png_bytep dp=row; + png_uint_32 row_width=row_info->width; + png_uint_32 i; + + if (row_info->channels == 4) + { + if (row_info->bit_depth == 8) + { + /* This converts from RGBX or RGBA to RGB */ + if (flags & PNG_FLAG_FILLER_AFTER) + { + dp+=3; sp+=4; + for (i = 1; i < row_width; i++) + { + *dp++ = *sp++; + *dp++ = *sp++; + *dp++ = *sp++; + sp++; + } + } + /* This converts from XRGB or ARGB to RGB */ + else + { + for (i = 0; i < row_width; i++) + { + sp++; + *dp++ = *sp++; + *dp++ = *sp++; + *dp++ = *sp++; + } + } + row_info->pixel_depth = 24; + row_info->rowbytes = row_width * 3; + } + else /* if (row_info->bit_depth == 16) */ + { + if (flags & PNG_FLAG_FILLER_AFTER) + { + /* This converts from RRGGBBXX or RRGGBBAA to RRGGBB */ + sp += 8; dp += 6; + for (i = 1; i < row_width; i++) + { + /* This could be (although png_memcpy is probably slower): + png_memcpy(dp, sp, 6); + sp += 8; + dp += 6; + */ + + *dp++ = *sp++; + *dp++ = *sp++; + *dp++ = *sp++; + *dp++ = *sp++; + *dp++ = *sp++; + *dp++ = *sp++; + sp += 2; + } + } + else + { + /* This converts from XXRRGGBB or AARRGGBB to RRGGBB */ + for (i = 0; i < row_width; i++) + { + /* This could be (although png_memcpy is probably slower): + png_memcpy(dp, sp, 6); + sp += 8; + dp += 6; + */ + + sp+=2; + *dp++ = *sp++; + *dp++ = *sp++; + *dp++ = *sp++; + *dp++ = *sp++; + *dp++ = *sp++; + *dp++ = *sp++; + } + } + row_info->pixel_depth = 48; + row_info->rowbytes = row_width * 6; + } + row_info->channels = 3; + row_info->color_type &= ~PNG_COLOR_MASK_ALPHA; + } +/* + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY || + row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) +*/ + else if (row_info->channels == 2) + { + if (row_info->bit_depth == 8) + { + /* This converts from GX or GA to G */ + if (flags & PNG_FLAG_FILLER_AFTER) + { + for (i = 0; i < row_width; i++) + { + *dp++ = *sp++; + sp++; + } + } + /* This converts from XG or AG to G */ + else + { + for (i = 0; i < row_width; i++) + { + sp++; + *dp++ = *sp++; + } + } + row_info->pixel_depth = 8; + row_info->rowbytes = row_width; + } + else /* if (row_info->bit_depth == 16) */ + { + if (flags & PNG_FLAG_FILLER_AFTER) + { + /* This converts from GGXX or GGAA to GG */ + sp += 4; dp += 2; + for (i = 1; i < row_width; i++) + { + *dp++ = *sp++; + *dp++ = *sp++; + sp += 2; + } + } + else + { + /* This converts from XXGG or AAGG to GG */ + for (i = 0; i < row_width; i++) + { + sp += 2; + *dp++ = *sp++; + *dp++ = *sp++; + } + } + row_info->pixel_depth = 16; + row_info->rowbytes = row_width * 2; + } + row_info->channels = 1; + row_info->color_type &= ~PNG_COLOR_MASK_ALPHA; + } + } +} +#endif + +#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) +/* swaps red and blue bytes within a pixel */ +void /* PRIVATE */ +png_do_bgr(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_bgr\n"); + if ( +#if defined(PNG_USELESS_TESTS_SUPPORTED) + row != NULL && row_info != NULL && +#endif + (row_info->color_type & PNG_COLOR_MASK_COLOR)) + { + png_uint_32 row_width = row_info->width; + if (row_info->bit_depth == 8) + { + if (row_info->color_type == PNG_COLOR_TYPE_RGB) + { + png_bytep rp; + png_uint_32 i; + + for (i = 0, rp = row; i < row_width; i++, rp += 3) + { + png_byte save = *rp; + *rp = *(rp + 2); + *(rp + 2) = save; + } + } + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + png_bytep rp; + png_uint_32 i; + + for (i = 0, rp = row; i < row_width; i++, rp += 4) + { + png_byte save = *rp; + *rp = *(rp + 2); + *(rp + 2) = save; + } + } + } + else if (row_info->bit_depth == 16) + { + if (row_info->color_type == PNG_COLOR_TYPE_RGB) + { + png_bytep rp; + png_uint_32 i; + + for (i = 0, rp = row; i < row_width; i++, rp += 6) + { + png_byte save = *rp; + *rp = *(rp + 4); + *(rp + 4) = save; + save = *(rp + 1); + *(rp + 1) = *(rp + 5); + *(rp + 5) = save; + } + } + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + png_bytep rp; + png_uint_32 i; + + for (i = 0, rp = row; i < row_width; i++, rp += 8) + { + png_byte save = *rp; + *rp = *(rp + 4); + *(rp + 4) = save; + save = *(rp + 1); + *(rp + 1) = *(rp + 5); + *(rp + 5) = save; + } + } + } + } +} +#endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */ + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_LEGACY_SUPPORTED) +void PNGAPI +png_set_user_transform_info(png_structp png_ptr, png_voidp + user_transform_ptr, int user_transform_depth, int user_transform_channels) +{ + png_debug(1, "in png_set_user_transform_info\n"); +#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) + png_ptr->user_transform_ptr = user_transform_ptr; + png_ptr->user_transform_depth = (png_byte)user_transform_depth; + png_ptr->user_transform_channels = (png_byte)user_transform_channels; +#else + if(user_transform_ptr || user_transform_depth || user_transform_channels) + png_warning(png_ptr, + "This version of libpng does not support user transform info"); +#endif +} +#endif + +/* This function returns a pointer to the user_transform_ptr associated with + * the user transform functions. The application should free any memory + * associated with this pointer before png_write_destroy and png_read_destroy + * are called. + */ +png_voidp PNGAPI +png_get_user_transform_ptr(png_structp png_ptr) +{ +#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) + return ((png_voidp)png_ptr->user_transform_ptr); +#else + if(png_ptr) + return (NULL); + return (NULL); +#endif +} diff --git a/gtkmm-osx/libpng-1.2.5/pngvcrd.c b/gtkmm-osx/libpng-1.2.5/pngvcrd.c new file mode 100644 index 0000000..4f513eb --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/pngvcrd.c @@ -0,0 +1,3845 @@ +/* pngvcrd.c - mixed C/assembler version of utilities to read a PNG file + * + * For Intel x86 CPU and Microsoft Visual C++ compiler + * + * libpng version 1.2.5 - October 3, 2002 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2002 Glenn Randers-Pehrson + * Copyright (c) 1998, Intel Corporation + * + * Contributed by Nirav Chhatrapati, Intel Corporation, 1998 + * Interface to libpng contributed by Gilles Vollant, 1999 + * + * + * In png_do_read_interlace() in libpng versions 1.0.3a through 1.0.4d, + * a sign error in the post-MMX cleanup code for each pixel_depth resulted + * in bad pixels at the beginning of some rows of some images, and also + * (due to out-of-range memory reads and writes) caused heap corruption + * when compiled with MSVC 6.0. The error was fixed in version 1.0.4e. + * + * [png_read_filter_row_mmx_avg() bpp == 2 bugfix, GRR 20000916] + * + * [runtime MMX configuration, GRR 20010102] + * + */ + +#define PNG_INTERNAL +#include "png.h" + +#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_USE_PNGVCRD) + +static int mmx_supported=2; + + +int PNGAPI +png_mmx_support(void) +{ + int mmx_supported_local = 0; + _asm { + push ebx //CPUID will trash these + push ecx + push edx + + pushfd //Save Eflag to stack + pop eax //Get Eflag from stack into eax + mov ecx, eax //Make another copy of Eflag in ecx + xor eax, 0x200000 //Toggle ID bit in Eflag [i.e. bit(21)] + push eax //Save modified Eflag back to stack + + popfd //Restored modified value back to Eflag reg + pushfd //Save Eflag to stack + pop eax //Get Eflag from stack + push ecx // save original Eflag to stack + popfd // restore original Eflag + xor eax, ecx //Compare the new Eflag with the original Eflag + jz NOT_SUPPORTED //If the same, CPUID instruction is not supported, + //skip following instructions and jump to + //NOT_SUPPORTED label + + xor eax, eax //Set eax to zero + + _asm _emit 0x0f //CPUID instruction (two bytes opcode) + _asm _emit 0xa2 + + cmp eax, 1 //make sure eax return non-zero value + jl NOT_SUPPORTED //If eax is zero, mmx not supported + + xor eax, eax //set eax to zero + inc eax //Now increment eax to 1. This instruction is + //faster than the instruction "mov eax, 1" + + _asm _emit 0x0f //CPUID instruction + _asm _emit 0xa2 + + and edx, 0x00800000 //mask out all bits but mmx bit(24) + cmp edx, 0 // 0 = mmx not supported + jz NOT_SUPPORTED // non-zero = Yes, mmx IS supported + + mov mmx_supported_local, 1 //set return value to 1 + +NOT_SUPPORTED: + mov eax, mmx_supported_local //move return value to eax + pop edx //CPUID trashed these + pop ecx + pop ebx + } + + //mmx_supported_local=0; // test code for force don't support MMX + //printf("MMX : %u (1=MMX supported)\n",mmx_supported_local); + + mmx_supported = mmx_supported_local; + return mmx_supported_local; +} + +/* Combines the row recently read in with the previous row. + This routine takes care of alpha and transparency if requested. + This routine also handles the two methods of progressive display + of interlaced images, depending on the mask value. + The mask value describes which pixels are to be combined with + the row. The pattern always repeats every 8 pixels, so just 8 + bits are needed. A one indicates the pixel is to be combined; a + zero indicates the pixel is to be skipped. This is in addition + to any alpha or transparency value associated with the pixel. If + you want all pixels to be combined, pass 0xff (255) in mask. */ + +/* Use this routine for x86 platform - uses faster MMX routine if machine + supports MMX */ + +void /* PRIVATE */ +png_combine_row(png_structp png_ptr, png_bytep row, int mask) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + const int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; +#endif + + png_debug(1,"in png_combine_row_asm\n"); + + if (mmx_supported == 2) { + /* this should have happened in png_init_mmx_flags() already */ + png_warning(png_ptr, "asm_flags may not have been initialized"); + png_mmx_support(); + } + + if (mask == 0xff) + { + png_memcpy(row, png_ptr->row_buf + 1, + (png_size_t)((png_ptr->width * png_ptr->row_info.pixel_depth + 7) >> 3)); + } + /* GRR: add "else if (mask == 0)" case? + * or does png_combine_row() not even get called in that case? */ + else + { + switch (png_ptr->row_info.pixel_depth) + { + case 1: + { + png_bytep sp; + png_bytep dp; + int s_inc, s_start, s_end; + int m; + int shift; + png_uint_32 i; + + sp = png_ptr->row_buf + 1; + dp = row; + m = 0x80; +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + if (png_ptr->transformations & PNG_PACKSWAP) + { + s_start = 0; + s_end = 7; + s_inc = 1; + } + else +#endif + { + s_start = 7; + s_end = 0; + s_inc = -1; + } + + shift = s_start; + + for (i = 0; i < png_ptr->width; i++) + { + if (m & mask) + { + int value; + + value = (*sp >> shift) & 0x1; + *dp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff); + *dp |= (png_byte)(value << shift); + } + + if (shift == s_end) + { + shift = s_start; + sp++; + dp++; + } + else + shift += s_inc; + + if (m == 1) + m = 0x80; + else + m >>= 1; + } + break; + } + + case 2: + { + png_bytep sp; + png_bytep dp; + int s_start, s_end, s_inc; + int m; + int shift; + png_uint_32 i; + int value; + + sp = png_ptr->row_buf + 1; + dp = row; + m = 0x80; +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + if (png_ptr->transformations & PNG_PACKSWAP) + { + s_start = 0; + s_end = 6; + s_inc = 2; + } + else +#endif + { + s_start = 6; + s_end = 0; + s_inc = -2; + } + + shift = s_start; + + for (i = 0; i < png_ptr->width; i++) + { + if (m & mask) + { + value = (*sp >> shift) & 0x3; + *dp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); + *dp |= (png_byte)(value << shift); + } + + if (shift == s_end) + { + shift = s_start; + sp++; + dp++; + } + else + shift += s_inc; + if (m == 1) + m = 0x80; + else + m >>= 1; + } + break; + } + + case 4: + { + png_bytep sp; + png_bytep dp; + int s_start, s_end, s_inc; + int m; + int shift; + png_uint_32 i; + int value; + + sp = png_ptr->row_buf + 1; + dp = row; + m = 0x80; +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + if (png_ptr->transformations & PNG_PACKSWAP) + { + s_start = 0; + s_end = 4; + s_inc = 4; + } + else +#endif + { + s_start = 4; + s_end = 0; + s_inc = -4; + } + shift = s_start; + + for (i = 0; i < png_ptr->width; i++) + { + if (m & mask) + { + value = (*sp >> shift) & 0xf; + *dp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); + *dp |= (png_byte)(value << shift); + } + + if (shift == s_end) + { + shift = s_start; + sp++; + dp++; + } + else + shift += s_inc; + if (m == 1) + m = 0x80; + else + m >>= 1; + } + break; + } + + case 8: + { + png_bytep srcptr; + png_bytep dstptr; + png_uint_32 len; + int m; + int diff, unmask; + + __int64 mask0=0x0102040810204080; + + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) + /* && mmx_supported */ ) + { + srcptr = png_ptr->row_buf + 1; + dstptr = row; + m = 0x80; + unmask = ~mask; + len = png_ptr->width &~7; //reduce to multiple of 8 + diff = png_ptr->width & 7; //amount lost + + _asm + { + movd mm7, unmask //load bit pattern + psubb mm6,mm6 //zero mm6 + punpcklbw mm7,mm7 + punpcklwd mm7,mm7 + punpckldq mm7,mm7 //fill register with 8 masks + + movq mm0,mask0 + + pand mm0,mm7 //nonzero if keep byte + pcmpeqb mm0,mm6 //zeros->1s, v versa + + mov ecx,len //load length of line (pixels) + mov esi,srcptr //load source + mov ebx,dstptr //load dest + cmp ecx,0 //lcr + je mainloop8end + +mainloop8: + movq mm4,[esi] + pand mm4,mm0 + movq mm6,mm0 + pandn mm6,[ebx] + por mm4,mm6 + movq [ebx],mm4 + + add esi,8 //inc by 8 bytes processed + add ebx,8 + sub ecx,8 //dec by 8 pixels processed + + ja mainloop8 +mainloop8end: + + mov ecx,diff + cmp ecx,0 + jz end8 + + mov edx,mask + sal edx,24 //make low byte the high byte + +secondloop8: + sal edx,1 //move high bit to CF + jnc skip8 //if CF = 0 + mov al,[esi] + mov [ebx],al +skip8: + inc esi + inc ebx + + dec ecx + jnz secondloop8 +end8: + emms + } + } + else /* mmx not supported - use modified C routine */ + { + register unsigned int incr1, initial_val, final_val; + png_size_t pixel_bytes; + png_uint_32 i; + register int disp = png_pass_inc[png_ptr->pass]; + int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; + + pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); + srcptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]* + pixel_bytes; + dstptr = row + offset_table[png_ptr->pass]*pixel_bytes; + initial_val = offset_table[png_ptr->pass]*pixel_bytes; + final_val = png_ptr->width*pixel_bytes; + incr1 = (disp)*pixel_bytes; + for (i = initial_val; i < final_val; i += incr1) + { + png_memcpy(dstptr, srcptr, pixel_bytes); + srcptr += incr1; + dstptr += incr1; + } + } /* end of else */ + + break; + } // end 8 bpp + + case 16: + { + png_bytep srcptr; + png_bytep dstptr; + png_uint_32 len; + int unmask, diff; + __int64 mask1=0x0101020204040808, + mask0=0x1010202040408080; + + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) + /* && mmx_supported */ ) + { + srcptr = png_ptr->row_buf + 1; + dstptr = row; + + unmask = ~mask; + len = (png_ptr->width)&~7; + diff = (png_ptr->width)&7; + _asm + { + movd mm7, unmask //load bit pattern + psubb mm6,mm6 //zero mm6 + punpcklbw mm7,mm7 + punpcklwd mm7,mm7 + punpckldq mm7,mm7 //fill register with 8 masks + + movq mm0,mask0 + movq mm1,mask1 + + pand mm0,mm7 + pand mm1,mm7 + + pcmpeqb mm0,mm6 + pcmpeqb mm1,mm6 + + mov ecx,len //load length of line + mov esi,srcptr //load source + mov ebx,dstptr //load dest + cmp ecx,0 //lcr + jz mainloop16end + +mainloop16: + movq mm4,[esi] + pand mm4,mm0 + movq mm6,mm0 + movq mm7,[ebx] + pandn mm6,mm7 + por mm4,mm6 + movq [ebx],mm4 + + movq mm5,[esi+8] + pand mm5,mm1 + movq mm7,mm1 + movq mm6,[ebx+8] + pandn mm7,mm6 + por mm5,mm7 + movq [ebx+8],mm5 + + add esi,16 //inc by 16 bytes processed + add ebx,16 + sub ecx,8 //dec by 8 pixels processed + + ja mainloop16 + +mainloop16end: + mov ecx,diff + cmp ecx,0 + jz end16 + + mov edx,mask + sal edx,24 //make low byte the high byte +secondloop16: + sal edx,1 //move high bit to CF + jnc skip16 //if CF = 0 + mov ax,[esi] + mov [ebx],ax +skip16: + add esi,2 + add ebx,2 + + dec ecx + jnz secondloop16 +end16: + emms + } + } + else /* mmx not supported - use modified C routine */ + { + register unsigned int incr1, initial_val, final_val; + png_size_t pixel_bytes; + png_uint_32 i; + register int disp = png_pass_inc[png_ptr->pass]; + int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; + + pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); + srcptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]* + pixel_bytes; + dstptr = row + offset_table[png_ptr->pass]*pixel_bytes; + initial_val = offset_table[png_ptr->pass]*pixel_bytes; + final_val = png_ptr->width*pixel_bytes; + incr1 = (disp)*pixel_bytes; + for (i = initial_val; i < final_val; i += incr1) + { + png_memcpy(dstptr, srcptr, pixel_bytes); + srcptr += incr1; + dstptr += incr1; + } + } /* end of else */ + + break; + } // end 16 bpp + + case 24: + { + png_bytep srcptr; + png_bytep dstptr; + png_uint_32 len; + int unmask, diff; + + __int64 mask2=0x0101010202020404, //24bpp + mask1=0x0408080810101020, + mask0=0x2020404040808080; + + srcptr = png_ptr->row_buf + 1; + dstptr = row; + + unmask = ~mask; + len = (png_ptr->width)&~7; + diff = (png_ptr->width)&7; + + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) + /* && mmx_supported */ ) + { + _asm + { + movd mm7, unmask //load bit pattern + psubb mm6,mm6 //zero mm6 + punpcklbw mm7,mm7 + punpcklwd mm7,mm7 + punpckldq mm7,mm7 //fill register with 8 masks + + movq mm0,mask0 + movq mm1,mask1 + movq mm2,mask2 + + pand mm0,mm7 + pand mm1,mm7 + pand mm2,mm7 + + pcmpeqb mm0,mm6 + pcmpeqb mm1,mm6 + pcmpeqb mm2,mm6 + + mov ecx,len //load length of line + mov esi,srcptr //load source + mov ebx,dstptr //load dest + cmp ecx,0 + jz mainloop24end + +mainloop24: + movq mm4,[esi] + pand mm4,mm0 + movq mm6,mm0 + movq mm7,[ebx] + pandn mm6,mm7 + por mm4,mm6 + movq [ebx],mm4 + + + movq mm5,[esi+8] + pand mm5,mm1 + movq mm7,mm1 + movq mm6,[ebx+8] + pandn mm7,mm6 + por mm5,mm7 + movq [ebx+8],mm5 + + movq mm6,[esi+16] + pand mm6,mm2 + movq mm4,mm2 + movq mm7,[ebx+16] + pandn mm4,mm7 + por mm6,mm4 + movq [ebx+16],mm6 + + add esi,24 //inc by 24 bytes processed + add ebx,24 + sub ecx,8 //dec by 8 pixels processed + + ja mainloop24 + +mainloop24end: + mov ecx,diff + cmp ecx,0 + jz end24 + + mov edx,mask + sal edx,24 //make low byte the high byte +secondloop24: + sal edx,1 //move high bit to CF + jnc skip24 //if CF = 0 + mov ax,[esi] + mov [ebx],ax + xor eax,eax + mov al,[esi+2] + mov [ebx+2],al +skip24: + add esi,3 + add ebx,3 + + dec ecx + jnz secondloop24 + +end24: + emms + } + } + else /* mmx not supported - use modified C routine */ + { + register unsigned int incr1, initial_val, final_val; + png_size_t pixel_bytes; + png_uint_32 i; + register int disp = png_pass_inc[png_ptr->pass]; + int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; + + pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); + srcptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]* + pixel_bytes; + dstptr = row + offset_table[png_ptr->pass]*pixel_bytes; + initial_val = offset_table[png_ptr->pass]*pixel_bytes; + final_val = png_ptr->width*pixel_bytes; + incr1 = (disp)*pixel_bytes; + for (i = initial_val; i < final_val; i += incr1) + { + png_memcpy(dstptr, srcptr, pixel_bytes); + srcptr += incr1; + dstptr += incr1; + } + } /* end of else */ + + break; + } // end 24 bpp + + case 32: + { + png_bytep srcptr; + png_bytep dstptr; + png_uint_32 len; + int unmask, diff; + + __int64 mask3=0x0101010102020202, //32bpp + mask2=0x0404040408080808, + mask1=0x1010101020202020, + mask0=0x4040404080808080; + + srcptr = png_ptr->row_buf + 1; + dstptr = row; + + unmask = ~mask; + len = (png_ptr->width)&~7; + diff = (png_ptr->width)&7; + + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) + /* && mmx_supported */ ) + { + _asm + { + movd mm7, unmask //load bit pattern + psubb mm6,mm6 //zero mm6 + punpcklbw mm7,mm7 + punpcklwd mm7,mm7 + punpckldq mm7,mm7 //fill register with 8 masks + + movq mm0,mask0 + movq mm1,mask1 + movq mm2,mask2 + movq mm3,mask3 + + pand mm0,mm7 + pand mm1,mm7 + pand mm2,mm7 + pand mm3,mm7 + + pcmpeqb mm0,mm6 + pcmpeqb mm1,mm6 + pcmpeqb mm2,mm6 + pcmpeqb mm3,mm6 + + mov ecx,len //load length of line + mov esi,srcptr //load source + mov ebx,dstptr //load dest + + cmp ecx,0 //lcr + jz mainloop32end + +mainloop32: + movq mm4,[esi] + pand mm4,mm0 + movq mm6,mm0 + movq mm7,[ebx] + pandn mm6,mm7 + por mm4,mm6 + movq [ebx],mm4 + + movq mm5,[esi+8] + pand mm5,mm1 + movq mm7,mm1 + movq mm6,[ebx+8] + pandn mm7,mm6 + por mm5,mm7 + movq [ebx+8],mm5 + + movq mm6,[esi+16] + pand mm6,mm2 + movq mm4,mm2 + movq mm7,[ebx+16] + pandn mm4,mm7 + por mm6,mm4 + movq [ebx+16],mm6 + + movq mm7,[esi+24] + pand mm7,mm3 + movq mm5,mm3 + movq mm4,[ebx+24] + pandn mm5,mm4 + por mm7,mm5 + movq [ebx+24],mm7 + + add esi,32 //inc by 32 bytes processed + add ebx,32 + sub ecx,8 //dec by 8 pixels processed + + ja mainloop32 + +mainloop32end: + mov ecx,diff + cmp ecx,0 + jz end32 + + mov edx,mask + sal edx,24 //make low byte the high byte +secondloop32: + sal edx,1 //move high bit to CF + jnc skip32 //if CF = 0 + mov eax,[esi] + mov [ebx],eax +skip32: + add esi,4 + add ebx,4 + + dec ecx + jnz secondloop32 + +end32: + emms + } + } + else /* mmx _not supported - Use modified C routine */ + { + register unsigned int incr1, initial_val, final_val; + png_size_t pixel_bytes; + png_uint_32 i; + register int disp = png_pass_inc[png_ptr->pass]; + int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; + + pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); + srcptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]* + pixel_bytes; + dstptr = row + offset_table[png_ptr->pass]*pixel_bytes; + initial_val = offset_table[png_ptr->pass]*pixel_bytes; + final_val = png_ptr->width*pixel_bytes; + incr1 = (disp)*pixel_bytes; + for (i = initial_val; i < final_val; i += incr1) + { + png_memcpy(dstptr, srcptr, pixel_bytes); + srcptr += incr1; + dstptr += incr1; + } + } /* end of else */ + + break; + } // end 32 bpp + + case 48: + { + png_bytep srcptr; + png_bytep dstptr; + png_uint_32 len; + int unmask, diff; + + __int64 mask5=0x0101010101010202, + mask4=0x0202020204040404, + mask3=0x0404080808080808, + mask2=0x1010101010102020, + mask1=0x2020202040404040, + mask0=0x4040808080808080; + + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) + /* && mmx_supported */ ) + { + srcptr = png_ptr->row_buf + 1; + dstptr = row; + + unmask = ~mask; + len = (png_ptr->width)&~7; + diff = (png_ptr->width)&7; + _asm + { + movd mm7, unmask //load bit pattern + psubb mm6,mm6 //zero mm6 + punpcklbw mm7,mm7 + punpcklwd mm7,mm7 + punpckldq mm7,mm7 //fill register with 8 masks + + movq mm0,mask0 + movq mm1,mask1 + movq mm2,mask2 + movq mm3,mask3 + movq mm4,mask4 + movq mm5,mask5 + + pand mm0,mm7 + pand mm1,mm7 + pand mm2,mm7 + pand mm3,mm7 + pand mm4,mm7 + pand mm5,mm7 + + pcmpeqb mm0,mm6 + pcmpeqb mm1,mm6 + pcmpeqb mm2,mm6 + pcmpeqb mm3,mm6 + pcmpeqb mm4,mm6 + pcmpeqb mm5,mm6 + + mov ecx,len //load length of line + mov esi,srcptr //load source + mov ebx,dstptr //load dest + + cmp ecx,0 + jz mainloop48end + +mainloop48: + movq mm7,[esi] + pand mm7,mm0 + movq mm6,mm0 + pandn mm6,[ebx] + por mm7,mm6 + movq [ebx],mm7 + + movq mm6,[esi+8] + pand mm6,mm1 + movq mm7,mm1 + pandn mm7,[ebx+8] + por mm6,mm7 + movq [ebx+8],mm6 + + movq mm6,[esi+16] + pand mm6,mm2 + movq mm7,mm2 + pandn mm7,[ebx+16] + por mm6,mm7 + movq [ebx+16],mm6 + + movq mm7,[esi+24] + pand mm7,mm3 + movq mm6,mm3 + pandn mm6,[ebx+24] + por mm7,mm6 + movq [ebx+24],mm7 + + movq mm6,[esi+32] + pand mm6,mm4 + movq mm7,mm4 + pandn mm7,[ebx+32] + por mm6,mm7 + movq [ebx+32],mm6 + + movq mm7,[esi+40] + pand mm7,mm5 + movq mm6,mm5 + pandn mm6,[ebx+40] + por mm7,mm6 + movq [ebx+40],mm7 + + add esi,48 //inc by 32 bytes processed + add ebx,48 + sub ecx,8 //dec by 8 pixels processed + + ja mainloop48 +mainloop48end: + + mov ecx,diff + cmp ecx,0 + jz end48 + + mov edx,mask + sal edx,24 //make low byte the high byte + +secondloop48: + sal edx,1 //move high bit to CF + jnc skip48 //if CF = 0 + mov eax,[esi] + mov [ebx],eax +skip48: + add esi,4 + add ebx,4 + + dec ecx + jnz secondloop48 + +end48: + emms + } + } + else /* mmx _not supported - Use modified C routine */ + { + register unsigned int incr1, initial_val, final_val; + png_size_t pixel_bytes; + png_uint_32 i; + register int disp = png_pass_inc[png_ptr->pass]; + int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; + + pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); + srcptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]* + pixel_bytes; + dstptr = row + offset_table[png_ptr->pass]*pixel_bytes; + initial_val = offset_table[png_ptr->pass]*pixel_bytes; + final_val = png_ptr->width*pixel_bytes; + incr1 = (disp)*pixel_bytes; + for (i = initial_val; i < final_val; i += incr1) + { + png_memcpy(dstptr, srcptr, pixel_bytes); + srcptr += incr1; + dstptr += incr1; + } + } /* end of else */ + + break; + } // end 48 bpp + + default: + { + png_bytep sptr; + png_bytep dp; + png_size_t pixel_bytes; + int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; + unsigned int i; + register int disp = png_pass_inc[png_ptr->pass]; // get the offset + register unsigned int incr1, initial_val, final_val; + + pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); + sptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]* + pixel_bytes; + dp = row + offset_table[png_ptr->pass]*pixel_bytes; + initial_val = offset_table[png_ptr->pass]*pixel_bytes; + final_val = png_ptr->width*pixel_bytes; + incr1 = (disp)*pixel_bytes; + for (i = initial_val; i < final_val; i += incr1) + { + png_memcpy(dp, sptr, pixel_bytes); + sptr += incr1; + dp += incr1; + } + break; + } + } /* end switch (png_ptr->row_info.pixel_depth) */ + } /* end if (non-trivial mask) */ + +} /* end png_combine_row() */ + + +#if defined(PNG_READ_INTERLACING_SUPPORTED) + +void /* PRIVATE */ +png_do_read_interlace(png_structp png_ptr) +{ + png_row_infop row_info = &(png_ptr->row_info); + png_bytep row = png_ptr->row_buf + 1; + int pass = png_ptr->pass; + png_uint_32 transformations = png_ptr->transformations; +#ifdef PNG_USE_LOCAL_ARRAYS + const int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; +#endif + + png_debug(1,"in png_do_read_interlace\n"); + + if (mmx_supported == 2) { + /* this should have happened in png_init_mmx_flags() already */ + png_warning(png_ptr, "asm_flags may not have been initialized"); + png_mmx_support(); + } + + if (row != NULL && row_info != NULL) + { + png_uint_32 final_width; + + final_width = row_info->width * png_pass_inc[pass]; + + switch (row_info->pixel_depth) + { + case 1: + { + png_bytep sp, dp; + int sshift, dshift; + int s_start, s_end, s_inc; + png_byte v; + png_uint_32 i; + int j; + + sp = row + (png_size_t)((row_info->width - 1) >> 3); + dp = row + (png_size_t)((final_width - 1) >> 3); +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + if (transformations & PNG_PACKSWAP) + { + sshift = (int)((row_info->width + 7) & 7); + dshift = (int)((final_width + 7) & 7); + s_start = 7; + s_end = 0; + s_inc = -1; + } + else +#endif + { + sshift = 7 - (int)((row_info->width + 7) & 7); + dshift = 7 - (int)((final_width + 7) & 7); + s_start = 0; + s_end = 7; + s_inc = 1; + } + + for (i = row_info->width; i; i--) + { + v = (png_byte)((*sp >> sshift) & 0x1); + for (j = 0; j < png_pass_inc[pass]; j++) + { + *dp &= (png_byte)((0x7f7f >> (7 - dshift)) & 0xff); + *dp |= (png_byte)(v << dshift); + if (dshift == s_end) + { + dshift = s_start; + dp--; + } + else + dshift += s_inc; + } + if (sshift == s_end) + { + sshift = s_start; + sp--; + } + else + sshift += s_inc; + } + break; + } + + case 2: + { + png_bytep sp, dp; + int sshift, dshift; + int s_start, s_end, s_inc; + png_uint_32 i; + + sp = row + (png_size_t)((row_info->width - 1) >> 2); + dp = row + (png_size_t)((final_width - 1) >> 2); +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + if (transformations & PNG_PACKSWAP) + { + sshift = (png_size_t)(((row_info->width + 3) & 3) << 1); + dshift = (png_size_t)(((final_width + 3) & 3) << 1); + s_start = 6; + s_end = 0; + s_inc = -2; + } + else +#endif + { + sshift = (png_size_t)((3 - ((row_info->width + 3) & 3)) << 1); + dshift = (png_size_t)((3 - ((final_width + 3) & 3)) << 1); + s_start = 0; + s_end = 6; + s_inc = 2; + } + + for (i = row_info->width; i; i--) + { + png_byte v; + int j; + + v = (png_byte)((*sp >> sshift) & 0x3); + for (j = 0; j < png_pass_inc[pass]; j++) + { + *dp &= (png_byte)((0x3f3f >> (6 - dshift)) & 0xff); + *dp |= (png_byte)(v << dshift); + if (dshift == s_end) + { + dshift = s_start; + dp--; + } + else + dshift += s_inc; + } + if (sshift == s_end) + { + sshift = s_start; + sp--; + } + else + sshift += s_inc; + } + break; + } + + case 4: + { + png_bytep sp, dp; + int sshift, dshift; + int s_start, s_end, s_inc; + png_uint_32 i; + + sp = row + (png_size_t)((row_info->width - 1) >> 1); + dp = row + (png_size_t)((final_width - 1) >> 1); +#if defined(PNG_READ_PACKSWAP_SUPPORTED) + if (transformations & PNG_PACKSWAP) + { + sshift = (png_size_t)(((row_info->width + 1) & 1) << 2); + dshift = (png_size_t)(((final_width + 1) & 1) << 2); + s_start = 4; + s_end = 0; + s_inc = -4; + } + else +#endif + { + sshift = (png_size_t)((1 - ((row_info->width + 1) & 1)) << 2); + dshift = (png_size_t)((1 - ((final_width + 1) & 1)) << 2); + s_start = 0; + s_end = 4; + s_inc = 4; + } + + for (i = row_info->width; i; i--) + { + png_byte v; + int j; + + v = (png_byte)((*sp >> sshift) & 0xf); + for (j = 0; j < png_pass_inc[pass]; j++) + { + *dp &= (png_byte)((0xf0f >> (4 - dshift)) & 0xff); + *dp |= (png_byte)(v << dshift); + if (dshift == s_end) + { + dshift = s_start; + dp--; + } + else + dshift += s_inc; + } + if (sshift == s_end) + { + sshift = s_start; + sp--; + } + else + sshift += s_inc; + } + break; + } + + default: // This is the place where the routine is modified + { + __int64 const4 = 0x0000000000FFFFFF; + // __int64 const5 = 0x000000FFFFFF0000; // unused... + __int64 const6 = 0x00000000000000FF; + png_bytep sptr, dp; + png_uint_32 i; + png_size_t pixel_bytes; + int width = row_info->width; + + pixel_bytes = (row_info->pixel_depth >> 3); + + sptr = row + (width - 1) * pixel_bytes; + dp = row + (final_width - 1) * pixel_bytes; + // New code by Nirav Chhatrapati - Intel Corporation + // sign fix by GRR + // NOTE: there is NO MMX code for 48-bit and 64-bit images + + // use MMX routine if machine supports it + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_INTERLACE) + /* && mmx_supported */ ) + { + if (pixel_bytes == 3) + { + if (((pass == 0) || (pass == 1)) && width) + { + _asm + { + mov esi, sptr + mov edi, dp + mov ecx, width + sub edi, 21 // (png_pass_inc[pass] - 1)*pixel_bytes +loop_pass0: + movd mm0, [esi] ; X X X X X v2 v1 v0 + pand mm0, const4 ; 0 0 0 0 0 v2 v1 v0 + movq mm1, mm0 ; 0 0 0 0 0 v2 v1 v0 + psllq mm0, 16 ; 0 0 0 v2 v1 v0 0 0 + movq mm2, mm0 ; 0 0 0 v2 v1 v0 0 0 + psllq mm0, 24 ; v2 v1 v0 0 0 0 0 0 + psrlq mm1, 8 ; 0 0 0 0 0 0 v2 v1 + por mm0, mm2 ; v2 v1 v0 v2 v1 v0 0 0 + por mm0, mm1 ; v2 v1 v0 v2 v1 v0 v2 v1 + movq mm3, mm0 ; v2 v1 v0 v2 v1 v0 v2 v1 + psllq mm0, 16 ; v0 v2 v1 v0 v2 v1 0 0 + movq mm4, mm3 ; v2 v1 v0 v2 v1 v0 v2 v1 + punpckhdq mm3, mm0 ; v0 v2 v1 v0 v2 v1 v0 v2 + movq [edi+16] , mm4 + psrlq mm0, 32 ; 0 0 0 0 v0 v2 v1 v0 + movq [edi+8] , mm3 + punpckldq mm0, mm4 ; v1 v0 v2 v1 v0 v2 v1 v0 + sub esi, 3 + movq [edi], mm0 + sub edi, 24 + //sub esi, 3 + dec ecx + jnz loop_pass0 + EMMS + } + } + else if (((pass == 2) || (pass == 3)) && width) + { + _asm + { + mov esi, sptr + mov edi, dp + mov ecx, width + sub edi, 9 // (png_pass_inc[pass] - 1)*pixel_bytes +loop_pass2: + movd mm0, [esi] ; X X X X X v2 v1 v0 + pand mm0, const4 ; 0 0 0 0 0 v2 v1 v0 + movq mm1, mm0 ; 0 0 0 0 0 v2 v1 v0 + psllq mm0, 16 ; 0 0 0 v2 v1 v0 0 0 + movq mm2, mm0 ; 0 0 0 v2 v1 v0 0 0 + psllq mm0, 24 ; v2 v1 v0 0 0 0 0 0 + psrlq mm1, 8 ; 0 0 0 0 0 0 v2 v1 + por mm0, mm2 ; v2 v1 v0 v2 v1 v0 0 0 + por mm0, mm1 ; v2 v1 v0 v2 v1 v0 v2 v1 + movq [edi+4], mm0 ; move to memory + psrlq mm0, 16 ; 0 0 v2 v1 v0 v2 v1 v0 + movd [edi], mm0 ; move to memory + sub esi, 3 + sub edi, 12 + dec ecx + jnz loop_pass2 + EMMS + } + } + else if (width) /* && ((pass == 4) || (pass == 5)) */ + { + int width_mmx = ((width >> 1) << 1) - 8; + if (width_mmx < 0) + width_mmx = 0; + width -= width_mmx; // 8 or 9 pix, 24 or 27 bytes + if (width_mmx) + { + _asm + { + mov esi, sptr + mov edi, dp + mov ecx, width_mmx + sub esi, 3 + sub edi, 9 +loop_pass4: + movq mm0, [esi] ; X X v2 v1 v0 v5 v4 v3 + movq mm7, mm0 ; X X v2 v1 v0 v5 v4 v3 + movq mm6, mm0 ; X X v2 v1 v0 v5 v4 v3 + psllq mm0, 24 ; v1 v0 v5 v4 v3 0 0 0 + pand mm7, const4 ; 0 0 0 0 0 v5 v4 v3 + psrlq mm6, 24 ; 0 0 0 X X v2 v1 v0 + por mm0, mm7 ; v1 v0 v5 v4 v3 v5 v4 v3 + movq mm5, mm6 ; 0 0 0 X X v2 v1 v0 + psllq mm6, 8 ; 0 0 X X v2 v1 v0 0 + movq [edi], mm0 ; move quad to memory + psrlq mm5, 16 ; 0 0 0 0 0 X X v2 + pand mm5, const6 ; 0 0 0 0 0 0 0 v2 + por mm6, mm5 ; 0 0 X X v2 v1 v0 v2 + movd [edi+8], mm6 ; move double to memory + sub esi, 6 + sub edi, 12 + sub ecx, 2 + jnz loop_pass4 + EMMS + } + } + + sptr -= width_mmx*3; + dp -= width_mmx*6; + for (i = width; i; i--) + { + png_byte v[8]; + int j; + + png_memcpy(v, sptr, 3); + for (j = 0; j < png_pass_inc[pass]; j++) + { + png_memcpy(dp, v, 3); + dp -= 3; + } + sptr -= 3; + } + } + } /* end of pixel_bytes == 3 */ + + else if (pixel_bytes == 1) + { + if (((pass == 0) || (pass == 1)) && width) + { + int width_mmx = ((width >> 2) << 2); + width -= width_mmx; + if (width_mmx) + { + _asm + { + mov esi, sptr + mov edi, dp + mov ecx, width_mmx + sub edi, 31 + sub esi, 3 +loop1_pass0: + movd mm0, [esi] ; X X X X v0 v1 v2 v3 + movq mm1, mm0 ; X X X X v0 v1 v2 v3 + punpcklbw mm0, mm0 ; v0 v0 v1 v1 v2 v2 v3 v3 + movq mm2, mm0 ; v0 v0 v1 v1 v2 v2 v3 v3 + punpcklwd mm0, mm0 ; v2 v2 v2 v2 v3 v3 v3 v3 + movq mm3, mm0 ; v2 v2 v2 v2 v3 v3 v3 v3 + punpckldq mm0, mm0 ; v3 v3 v3 v3 v3 v3 v3 v3 + punpckhdq mm3, mm3 ; v2 v2 v2 v2 v2 v2 v2 v2 + movq [edi], mm0 ; move to memory v3 + punpckhwd mm2, mm2 ; v0 v0 v0 v0 v1 v1 v1 v1 + movq [edi+8], mm3 ; move to memory v2 + movq mm4, mm2 ; v0 v0 v0 v0 v1 v1 v1 v1 + punpckldq mm2, mm2 ; v1 v1 v1 v1 v1 v1 v1 v1 + punpckhdq mm4, mm4 ; v0 v0 v0 v0 v0 v0 v0 v0 + movq [edi+16], mm2 ; move to memory v1 + movq [edi+24], mm4 ; move to memory v0 + sub esi, 4 + sub edi, 32 + sub ecx, 4 + jnz loop1_pass0 + EMMS + } + } + + sptr -= width_mmx; + dp -= width_mmx*8; + for (i = width; i; i--) + { + int j; + + /* I simplified this part in version 1.0.4e + * here and in several other instances where + * pixel_bytes == 1 -- GR-P + * + * Original code: + * + * png_byte v[8]; + * png_memcpy(v, sptr, pixel_bytes); + * for (j = 0; j < png_pass_inc[pass]; j++) + * { + * png_memcpy(dp, v, pixel_bytes); + * dp -= pixel_bytes; + * } + * sptr -= pixel_bytes; + * + * Replacement code is in the next three lines: + */ + + for (j = 0; j < png_pass_inc[pass]; j++) + *dp-- = *sptr; + sptr--; + } + } + else if (((pass == 2) || (pass == 3)) && width) + { + int width_mmx = ((width >> 2) << 2); + width -= width_mmx; + if (width_mmx) + { + _asm + { + mov esi, sptr + mov edi, dp + mov ecx, width_mmx + sub edi, 15 + sub esi, 3 +loop1_pass2: + movd mm0, [esi] ; X X X X v0 v1 v2 v3 + punpcklbw mm0, mm0 ; v0 v0 v1 v1 v2 v2 v3 v3 + movq mm1, mm0 ; v0 v0 v1 v1 v2 v2 v3 v3 + punpcklwd mm0, mm0 ; v2 v2 v2 v2 v3 v3 v3 v3 + punpckhwd mm1, mm1 ; v0 v0 v0 v0 v1 v1 v1 v1 + movq [edi], mm0 ; move to memory v2 and v3 + sub esi, 4 + movq [edi+8], mm1 ; move to memory v1 and v0 + sub edi, 16 + sub ecx, 4 + jnz loop1_pass2 + EMMS + } + } + + sptr -= width_mmx; + dp -= width_mmx*4; + for (i = width; i; i--) + { + int j; + + for (j = 0; j < png_pass_inc[pass]; j++) + { + *dp-- = *sptr; + } + sptr --; + } + } + else if (width) /* && ((pass == 4) || (pass == 5))) */ + { + int width_mmx = ((width >> 3) << 3); + width -= width_mmx; + if (width_mmx) + { + _asm + { + mov esi, sptr + mov edi, dp + mov ecx, width_mmx + sub edi, 15 + sub esi, 7 +loop1_pass4: + movq mm0, [esi] ; v0 v1 v2 v3 v4 v5 v6 v7 + movq mm1, mm0 ; v0 v1 v2 v3 v4 v5 v6 v7 + punpcklbw mm0, mm0 ; v4 v4 v5 v5 v6 v6 v7 v7 + //movq mm1, mm0 ; v0 v0 v1 v1 v2 v2 v3 v3 + punpckhbw mm1, mm1 ;v0 v0 v1 v1 v2 v2 v3 v3 + movq [edi+8], mm1 ; move to memory v0 v1 v2 and v3 + sub esi, 8 + movq [edi], mm0 ; move to memory v4 v5 v6 and v7 + //sub esi, 4 + sub edi, 16 + sub ecx, 8 + jnz loop1_pass4 + EMMS + } + } + + sptr -= width_mmx; + dp -= width_mmx*2; + for (i = width; i; i--) + { + int j; + + for (j = 0; j < png_pass_inc[pass]; j++) + { + *dp-- = *sptr; + } + sptr --; + } + } + } /* end of pixel_bytes == 1 */ + + else if (pixel_bytes == 2) + { + if (((pass == 0) || (pass == 1)) && width) + { + int width_mmx = ((width >> 1) << 1); + width -= width_mmx; + if (width_mmx) + { + _asm + { + mov esi, sptr + mov edi, dp + mov ecx, width_mmx + sub esi, 2 + sub edi, 30 +loop2_pass0: + movd mm0, [esi] ; X X X X v1 v0 v3 v2 + punpcklwd mm0, mm0 ; v1 v0 v1 v0 v3 v2 v3 v2 + movq mm1, mm0 ; v1 v0 v1 v0 v3 v2 v3 v2 + punpckldq mm0, mm0 ; v3 v2 v3 v2 v3 v2 v3 v2 + punpckhdq mm1, mm1 ; v1 v0 v1 v0 v1 v0 v1 v0 + movq [edi], mm0 + movq [edi + 8], mm0 + movq [edi + 16], mm1 + movq [edi + 24], mm1 + sub esi, 4 + sub edi, 32 + sub ecx, 2 + jnz loop2_pass0 + EMMS + } + } + + sptr -= (width_mmx*2 - 2); // sign fixed + dp -= (width_mmx*16 - 2); // sign fixed + for (i = width; i; i--) + { + png_byte v[8]; + int j; + sptr -= 2; + png_memcpy(v, sptr, 2); + for (j = 0; j < png_pass_inc[pass]; j++) + { + dp -= 2; + png_memcpy(dp, v, 2); + } + } + } + else if (((pass == 2) || (pass == 3)) && width) + { + int width_mmx = ((width >> 1) << 1) ; + width -= width_mmx; + if (width_mmx) + { + _asm + { + mov esi, sptr + mov edi, dp + mov ecx, width_mmx + sub esi, 2 + sub edi, 14 +loop2_pass2: + movd mm0, [esi] ; X X X X v1 v0 v3 v2 + punpcklwd mm0, mm0 ; v1 v0 v1 v0 v3 v2 v3 v2 + movq mm1, mm0 ; v1 v0 v1 v0 v3 v2 v3 v2 + punpckldq mm0, mm0 ; v3 v2 v3 v2 v3 v2 v3 v2 + punpckhdq mm1, mm1 ; v1 v0 v1 v0 v1 v0 v1 v0 + movq [edi], mm0 + sub esi, 4 + movq [edi + 8], mm1 + //sub esi, 4 + sub edi, 16 + sub ecx, 2 + jnz loop2_pass2 + EMMS + } + } + + sptr -= (width_mmx*2 - 2); // sign fixed + dp -= (width_mmx*8 - 2); // sign fixed + for (i = width; i; i--) + { + png_byte v[8]; + int j; + sptr -= 2; + png_memcpy(v, sptr, 2); + for (j = 0; j < png_pass_inc[pass]; j++) + { + dp -= 2; + png_memcpy(dp, v, 2); + } + } + } + else if (width) // pass == 4 or 5 + { + int width_mmx = ((width >> 1) << 1) ; + width -= width_mmx; + if (width_mmx) + { + _asm + { + mov esi, sptr + mov edi, dp + mov ecx, width_mmx + sub esi, 2 + sub edi, 6 +loop2_pass4: + movd mm0, [esi] ; X X X X v1 v0 v3 v2 + punpcklwd mm0, mm0 ; v1 v0 v1 v0 v3 v2 v3 v2 + sub esi, 4 + movq [edi], mm0 + sub edi, 8 + sub ecx, 2 + jnz loop2_pass4 + EMMS + } + } + + sptr -= (width_mmx*2 - 2); // sign fixed + dp -= (width_mmx*4 - 2); // sign fixed + for (i = width; i; i--) + { + png_byte v[8]; + int j; + sptr -= 2; + png_memcpy(v, sptr, 2); + for (j = 0; j < png_pass_inc[pass]; j++) + { + dp -= 2; + png_memcpy(dp, v, 2); + } + } + } + } /* end of pixel_bytes == 2 */ + + else if (pixel_bytes == 4) + { + if (((pass == 0) || (pass == 1)) && width) + { + int width_mmx = ((width >> 1) << 1) ; + width -= width_mmx; + if (width_mmx) + { + _asm + { + mov esi, sptr + mov edi, dp + mov ecx, width_mmx + sub esi, 4 + sub edi, 60 +loop4_pass0: + movq mm0, [esi] ; v3 v2 v1 v0 v7 v6 v5 v4 + movq mm1, mm0 ; v3 v2 v1 v0 v7 v6 v5 v4 + punpckldq mm0, mm0 ; v7 v6 v5 v4 v7 v6 v5 v4 + punpckhdq mm1, mm1 ; v3 v2 v1 v0 v3 v2 v1 v0 + movq [edi], mm0 + movq [edi + 8], mm0 + movq [edi + 16], mm0 + movq [edi + 24], mm0 + movq [edi+32], mm1 + movq [edi + 40], mm1 + movq [edi+ 48], mm1 + sub esi, 8 + movq [edi + 56], mm1 + sub edi, 64 + sub ecx, 2 + jnz loop4_pass0 + EMMS + } + } + + sptr -= (width_mmx*4 - 4); // sign fixed + dp -= (width_mmx*32 - 4); // sign fixed + for (i = width; i; i--) + { + png_byte v[8]; + int j; + sptr -= 4; + png_memcpy(v, sptr, 4); + for (j = 0; j < png_pass_inc[pass]; j++) + { + dp -= 4; + png_memcpy(dp, v, 4); + } + } + } + else if (((pass == 2) || (pass == 3)) && width) + { + int width_mmx = ((width >> 1) << 1) ; + width -= width_mmx; + if (width_mmx) + { + _asm + { + mov esi, sptr + mov edi, dp + mov ecx, width_mmx + sub esi, 4 + sub edi, 28 +loop4_pass2: + movq mm0, [esi] ; v3 v2 v1 v0 v7 v6 v5 v4 + movq mm1, mm0 ; v3 v2 v1 v0 v7 v6 v5 v4 + punpckldq mm0, mm0 ; v7 v6 v5 v4 v7 v6 v5 v4 + punpckhdq mm1, mm1 ; v3 v2 v1 v0 v3 v2 v1 v0 + movq [edi], mm0 + movq [edi + 8], mm0 + movq [edi+16], mm1 + movq [edi + 24], mm1 + sub esi, 8 + sub edi, 32 + sub ecx, 2 + jnz loop4_pass2 + EMMS + } + } + + sptr -= (width_mmx*4 - 4); // sign fixed + dp -= (width_mmx*16 - 4); // sign fixed + for (i = width; i; i--) + { + png_byte v[8]; + int j; + sptr -= 4; + png_memcpy(v, sptr, 4); + for (j = 0; j < png_pass_inc[pass]; j++) + { + dp -= 4; + png_memcpy(dp, v, 4); + } + } + } + else if (width) // pass == 4 or 5 + { + int width_mmx = ((width >> 1) << 1) ; + width -= width_mmx; + if (width_mmx) + { + _asm + { + mov esi, sptr + mov edi, dp + mov ecx, width_mmx + sub esi, 4 + sub edi, 12 +loop4_pass4: + movq mm0, [esi] ; v3 v2 v1 v0 v7 v6 v5 v4 + movq mm1, mm0 ; v3 v2 v1 v0 v7 v6 v5 v4 + punpckldq mm0, mm0 ; v7 v6 v5 v4 v7 v6 v5 v4 + punpckhdq mm1, mm1 ; v3 v2 v1 v0 v3 v2 v1 v0 + movq [edi], mm0 + sub esi, 8 + movq [edi + 8], mm1 + sub edi, 16 + sub ecx, 2 + jnz loop4_pass4 + EMMS + } + } + + sptr -= (width_mmx*4 - 4); // sign fixed + dp -= (width_mmx*8 - 4); // sign fixed + for (i = width; i; i--) + { + png_byte v[8]; + int j; + sptr -= 4; + png_memcpy(v, sptr, 4); + for (j = 0; j < png_pass_inc[pass]; j++) + { + dp -= 4; + png_memcpy(dp, v, 4); + } + } + } + + } /* end of pixel_bytes == 4 */ + + else if (pixel_bytes == 6) + { + for (i = width; i; i--) + { + png_byte v[8]; + int j; + png_memcpy(v, sptr, 6); + for (j = 0; j < png_pass_inc[pass]; j++) + { + png_memcpy(dp, v, 6); + dp -= 6; + } + sptr -= 6; + } + } /* end of pixel_bytes == 6 */ + + else + { + for (i = width; i; i--) + { + png_byte v[8]; + int j; + png_memcpy(v, sptr, pixel_bytes); + for (j = 0; j < png_pass_inc[pass]; j++) + { + png_memcpy(dp, v, pixel_bytes); + dp -= pixel_bytes; + } + sptr-= pixel_bytes; + } + } + } /* end of mmx_supported */ + + else /* MMX not supported: use modified C code - takes advantage + * of inlining of memcpy for a constant */ + { + if (pixel_bytes == 1) + { + for (i = width; i; i--) + { + int j; + for (j = 0; j < png_pass_inc[pass]; j++) + *dp-- = *sptr; + sptr--; + } + } + else if (pixel_bytes == 3) + { + for (i = width; i; i--) + { + png_byte v[8]; + int j; + png_memcpy(v, sptr, pixel_bytes); + for (j = 0; j < png_pass_inc[pass]; j++) + { + png_memcpy(dp, v, pixel_bytes); + dp -= pixel_bytes; + } + sptr -= pixel_bytes; + } + } + else if (pixel_bytes == 2) + { + for (i = width; i; i--) + { + png_byte v[8]; + int j; + png_memcpy(v, sptr, pixel_bytes); + for (j = 0; j < png_pass_inc[pass]; j++) + { + png_memcpy(dp, v, pixel_bytes); + dp -= pixel_bytes; + } + sptr -= pixel_bytes; + } + } + else if (pixel_bytes == 4) + { + for (i = width; i; i--) + { + png_byte v[8]; + int j; + png_memcpy(v, sptr, pixel_bytes); + for (j = 0; j < png_pass_inc[pass]; j++) + { + png_memcpy(dp, v, pixel_bytes); + dp -= pixel_bytes; + } + sptr -= pixel_bytes; + } + } + else if (pixel_bytes == 6) + { + for (i = width; i; i--) + { + png_byte v[8]; + int j; + png_memcpy(v, sptr, pixel_bytes); + for (j = 0; j < png_pass_inc[pass]; j++) + { + png_memcpy(dp, v, pixel_bytes); + dp -= pixel_bytes; + } + sptr -= pixel_bytes; + } + } + else + { + for (i = width; i; i--) + { + png_byte v[8]; + int j; + png_memcpy(v, sptr, pixel_bytes); + for (j = 0; j < png_pass_inc[pass]; j++) + { + png_memcpy(dp, v, pixel_bytes); + dp -= pixel_bytes; + } + sptr -= pixel_bytes; + } + } + + } /* end of MMX not supported */ + break; + } + } /* end switch (row_info->pixel_depth) */ + + row_info->width = final_width; + row_info->rowbytes = ((final_width * + (png_uint_32)row_info->pixel_depth + 7) >> 3); + } + +} + +#endif /* PNG_READ_INTERLACING_SUPPORTED */ + + +// These variables are utilized in the functions below. They are declared +// globally here to ensure alignment on 8-byte boundaries. + +union uAll { + __int64 use; + double align; +} LBCarryMask = {0x0101010101010101}, + HBClearMask = {0x7f7f7f7f7f7f7f7f}, + ActiveMask, ActiveMask2, ActiveMaskEnd, ShiftBpp, ShiftRem; + + +// Optimized code for PNG Average filter decoder +void /* PRIVATE */ +png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row + , png_bytep prev_row) +{ + int bpp; + png_uint_32 FullLength; + png_uint_32 MMXLength; + //png_uint_32 len; + int diff; + + bpp = (row_info->pixel_depth + 7) >> 3; // Get # bytes per pixel + FullLength = row_info->rowbytes; // # of bytes to filter + _asm { + // Init address pointers and offset + mov edi, row // edi ==> Avg(x) + xor ebx, ebx // ebx ==> x + mov edx, edi + mov esi, prev_row // esi ==> Prior(x) + sub edx, bpp // edx ==> Raw(x-bpp) + + xor eax, eax + // Compute the Raw value for the first bpp bytes + // Raw(x) = Avg(x) + (Prior(x)/2) +davgrlp: + mov al, [esi + ebx] // Load al with Prior(x) + inc ebx + shr al, 1 // divide by 2 + add al, [edi+ebx-1] // Add Avg(x); -1 to offset inc ebx + cmp ebx, bpp + mov [edi+ebx-1], al // Write back Raw(x); + // mov does not affect flags; -1 to offset inc ebx + jb davgrlp + // get # of bytes to alignment + mov diff, edi // take start of row + add diff, ebx // add bpp + add diff, 0xf // add 7 + 8 to incr past alignment boundary + and diff, 0xfffffff8 // mask to alignment boundary + sub diff, edi // subtract from start ==> value ebx at alignment + jz davggo + // fix alignment + // Compute the Raw value for the bytes upto the alignment boundary + // Raw(x) = Avg(x) + ((Raw(x-bpp) + Prior(x))/2) + xor ecx, ecx +davglp1: + xor eax, eax + mov cl, [esi + ebx] // load cl with Prior(x) + mov al, [edx + ebx] // load al with Raw(x-bpp) + add ax, cx + inc ebx + shr ax, 1 // divide by 2 + add al, [edi+ebx-1] // Add Avg(x); -1 to offset inc ebx + cmp ebx, diff // Check if at alignment boundary + mov [edi+ebx-1], al // Write back Raw(x); + // mov does not affect flags; -1 to offset inc ebx + jb davglp1 // Repeat until at alignment boundary +davggo: + mov eax, FullLength + mov ecx, eax + sub eax, ebx // subtract alignment fix + and eax, 0x00000007 // calc bytes over mult of 8 + sub ecx, eax // drop over bytes from original length + mov MMXLength, ecx + } // end _asm block + // Now do the math for the rest of the row + switch ( bpp ) + { + case 3: + { + ActiveMask.use = 0x0000000000ffffff; + ShiftBpp.use = 24; // == 3 * 8 + ShiftRem.use = 40; // == 64 - 24 + _asm { + // Re-init address pointers and offset + movq mm7, ActiveMask + mov ebx, diff // ebx ==> x = offset to alignment boundary + movq mm5, LBCarryMask + mov edi, row // edi ==> Avg(x) + movq mm4, HBClearMask + mov esi, prev_row // esi ==> Prior(x) + // PRIME the pump (load the first Raw(x-bpp) data set + movq mm2, [edi + ebx - 8] // Load previous aligned 8 bytes + // (we correct position in loop below) +davg3lp: + movq mm0, [edi + ebx] // Load mm0 with Avg(x) + // Add (Prev_row/2) to Average + movq mm3, mm5 + psrlq mm2, ShiftRem // Correct position Raw(x-bpp) data + movq mm1, [esi + ebx] // Load mm1 with Prior(x) + movq mm6, mm7 + pand mm3, mm1 // get lsb for each prev_row byte + psrlq mm1, 1 // divide prev_row bytes by 2 + pand mm1, mm4 // clear invalid bit 7 of each byte + paddb mm0, mm1 // add (Prev_row/2) to Avg for each byte + // Add 1st active group (Raw(x-bpp)/2) to Average with LBCarry + movq mm1, mm3 // now use mm1 for getting LBCarrys + pand mm1, mm2 // get LBCarrys for each byte where both + // lsb's were == 1 (Only valid for active group) + psrlq mm2, 1 // divide raw bytes by 2 + pand mm2, mm4 // clear invalid bit 7 of each byte + paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte + pand mm2, mm6 // Leave only Active Group 1 bytes to add to Avg + paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active + // byte + // Add 2nd active group (Raw(x-bpp)/2) to Average with LBCarry + psllq mm6, ShiftBpp // shift the mm6 mask to cover bytes 3-5 + movq mm2, mm0 // mov updated Raws to mm2 + psllq mm2, ShiftBpp // shift data to position correctly + movq mm1, mm3 // now use mm1 for getting LBCarrys + pand mm1, mm2 // get LBCarrys for each byte where both + // lsb's were == 1 (Only valid for active group) + psrlq mm2, 1 // divide raw bytes by 2 + pand mm2, mm4 // clear invalid bit 7 of each byte + paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte + pand mm2, mm6 // Leave only Active Group 2 bytes to add to Avg + paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active + // byte + + // Add 3rd active group (Raw(x-bpp)/2) to Average with LBCarry + psllq mm6, ShiftBpp // shift the mm6 mask to cover the last two + // bytes + movq mm2, mm0 // mov updated Raws to mm2 + psllq mm2, ShiftBpp // shift data to position correctly + // Data only needs to be shifted once here to + // get the correct x-bpp offset. + movq mm1, mm3 // now use mm1 for getting LBCarrys + pand mm1, mm2 // get LBCarrys for each byte where both + // lsb's were == 1 (Only valid for active group) + psrlq mm2, 1 // divide raw bytes by 2 + pand mm2, mm4 // clear invalid bit 7 of each byte + paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte + pand mm2, mm6 // Leave only Active Group 2 bytes to add to Avg + add ebx, 8 + paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active + // byte + + // Now ready to write back to memory + movq [edi + ebx - 8], mm0 + // Move updated Raw(x) to use as Raw(x-bpp) for next loop + cmp ebx, MMXLength + movq mm2, mm0 // mov updated Raw(x) to mm2 + jb davg3lp + } // end _asm block + } + break; + + case 6: + case 4: + case 7: + case 5: + { + ActiveMask.use = 0xffffffffffffffff; // use shift below to clear + // appropriate inactive bytes + ShiftBpp.use = bpp << 3; + ShiftRem.use = 64 - ShiftBpp.use; + _asm { + movq mm4, HBClearMask + // Re-init address pointers and offset + mov ebx, diff // ebx ==> x = offset to alignment boundary + // Load ActiveMask and clear all bytes except for 1st active group + movq mm7, ActiveMask + mov edi, row // edi ==> Avg(x) + psrlq mm7, ShiftRem + mov esi, prev_row // esi ==> Prior(x) + movq mm6, mm7 + movq mm5, LBCarryMask + psllq mm6, ShiftBpp // Create mask for 2nd active group + // PRIME the pump (load the first Raw(x-bpp) data set + movq mm2, [edi + ebx - 8] // Load previous aligned 8 bytes + // (we correct position in loop below) +davg4lp: + movq mm0, [edi + ebx] + psrlq mm2, ShiftRem // shift data to position correctly + movq mm1, [esi + ebx] + // Add (Prev_row/2) to Average + movq mm3, mm5 + pand mm3, mm1 // get lsb for each prev_row byte + psrlq mm1, 1 // divide prev_row bytes by 2 + pand mm1, mm4 // clear invalid bit 7 of each byte + paddb mm0, mm1 // add (Prev_row/2) to Avg for each byte + // Add 1st active group (Raw(x-bpp)/2) to Average with LBCarry + movq mm1, mm3 // now use mm1 for getting LBCarrys + pand mm1, mm2 // get LBCarrys for each byte where both + // lsb's were == 1 (Only valid for active group) + psrlq mm2, 1 // divide raw bytes by 2 + pand mm2, mm4 // clear invalid bit 7 of each byte + paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte + pand mm2, mm7 // Leave only Active Group 1 bytes to add to Avg + paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active + // byte + // Add 2nd active group (Raw(x-bpp)/2) to Average with LBCarry + movq mm2, mm0 // mov updated Raws to mm2 + psllq mm2, ShiftBpp // shift data to position correctly + add ebx, 8 + movq mm1, mm3 // now use mm1 for getting LBCarrys + pand mm1, mm2 // get LBCarrys for each byte where both + // lsb's were == 1 (Only valid for active group) + psrlq mm2, 1 // divide raw bytes by 2 + pand mm2, mm4 // clear invalid bit 7 of each byte + paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte + pand mm2, mm6 // Leave only Active Group 2 bytes to add to Avg + paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active + // byte + cmp ebx, MMXLength + // Now ready to write back to memory + movq [edi + ebx - 8], mm0 + // Prep Raw(x-bpp) for next loop + movq mm2, mm0 // mov updated Raws to mm2 + jb davg4lp + } // end _asm block + } + break; + case 2: + { + ActiveMask.use = 0x000000000000ffff; + ShiftBpp.use = 16; // == 2 * 8 [BUGFIX] + ShiftRem.use = 48; // == 64 - 16 [BUGFIX] + _asm { + // Load ActiveMask + movq mm7, ActiveMask + // Re-init address pointers and offset + mov ebx, diff // ebx ==> x = offset to alignment boundary + movq mm5, LBCarryMask + mov edi, row // edi ==> Avg(x) + movq mm4, HBClearMask + mov esi, prev_row // esi ==> Prior(x) + // PRIME the pump (load the first Raw(x-bpp) data set + movq mm2, [edi + ebx - 8] // Load previous aligned 8 bytes + // (we correct position in loop below) +davg2lp: + movq mm0, [edi + ebx] + psrlq mm2, ShiftRem // shift data to position correctly [BUGFIX] + movq mm1, [esi + ebx] + // Add (Prev_row/2) to Average + movq mm3, mm5 + pand mm3, mm1 // get lsb for each prev_row byte + psrlq mm1, 1 // divide prev_row bytes by 2 + pand mm1, mm4 // clear invalid bit 7 of each byte + movq mm6, mm7 + paddb mm0, mm1 // add (Prev_row/2) to Avg for each byte + // Add 1st active group (Raw(x-bpp)/2) to Average with LBCarry + movq mm1, mm3 // now use mm1 for getting LBCarrys + pand mm1, mm2 // get LBCarrys for each byte where both + // lsb's were == 1 (Only valid for active group) + psrlq mm2, 1 // divide raw bytes by 2 + pand mm2, mm4 // clear invalid bit 7 of each byte + paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte + pand mm2, mm6 // Leave only Active Group 1 bytes to add to Avg + paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active byte + // Add 2nd active group (Raw(x-bpp)/2) to Average with LBCarry + psllq mm6, ShiftBpp // shift the mm6 mask to cover bytes 2 & 3 + movq mm2, mm0 // mov updated Raws to mm2 + psllq mm2, ShiftBpp // shift data to position correctly + movq mm1, mm3 // now use mm1 for getting LBCarrys + pand mm1, mm2 // get LBCarrys for each byte where both + // lsb's were == 1 (Only valid for active group) + psrlq mm2, 1 // divide raw bytes by 2 + pand mm2, mm4 // clear invalid bit 7 of each byte + paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte + pand mm2, mm6 // Leave only Active Group 2 bytes to add to Avg + paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active byte + + // Add rdd active group (Raw(x-bpp)/2) to Average with LBCarry + psllq mm6, ShiftBpp // shift the mm6 mask to cover bytes 4 & 5 + movq mm2, mm0 // mov updated Raws to mm2 + psllq mm2, ShiftBpp // shift data to position correctly + // Data only needs to be shifted once here to + // get the correct x-bpp offset. + movq mm1, mm3 // now use mm1 for getting LBCarrys + pand mm1, mm2 // get LBCarrys for each byte where both + // lsb's were == 1 (Only valid for active group) + psrlq mm2, 1 // divide raw bytes by 2 + pand mm2, mm4 // clear invalid bit 7 of each byte + paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte + pand mm2, mm6 // Leave only Active Group 2 bytes to add to Avg + paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active byte + + // Add 4th active group (Raw(x-bpp)/2) to Average with LBCarry + psllq mm6, ShiftBpp // shift the mm6 mask to cover bytes 6 & 7 + movq mm2, mm0 // mov updated Raws to mm2 + psllq mm2, ShiftBpp // shift data to position correctly + // Data only needs to be shifted once here to + // get the correct x-bpp offset. + add ebx, 8 + movq mm1, mm3 // now use mm1 for getting LBCarrys + pand mm1, mm2 // get LBCarrys for each byte where both + // lsb's were == 1 (Only valid for active group) + psrlq mm2, 1 // divide raw bytes by 2 + pand mm2, mm4 // clear invalid bit 7 of each byte + paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte + pand mm2, mm6 // Leave only Active Group 2 bytes to add to Avg + paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active byte + + cmp ebx, MMXLength + // Now ready to write back to memory + movq [edi + ebx - 8], mm0 + // Prep Raw(x-bpp) for next loop + movq mm2, mm0 // mov updated Raws to mm2 + jb davg2lp + } // end _asm block + } + break; + + case 1: // bpp == 1 + { + _asm { + // Re-init address pointers and offset + mov ebx, diff // ebx ==> x = offset to alignment boundary + mov edi, row // edi ==> Avg(x) + cmp ebx, FullLength // Test if offset at end of array + jnb davg1end + // Do Paeth decode for remaining bytes + mov esi, prev_row // esi ==> Prior(x) + mov edx, edi + xor ecx, ecx // zero ecx before using cl & cx in loop below + sub edx, bpp // edx ==> Raw(x-bpp) +davg1lp: + // Raw(x) = Avg(x) + ((Raw(x-bpp) + Prior(x))/2) + xor eax, eax + mov cl, [esi + ebx] // load cl with Prior(x) + mov al, [edx + ebx] // load al with Raw(x-bpp) + add ax, cx + inc ebx + shr ax, 1 // divide by 2 + add al, [edi+ebx-1] // Add Avg(x); -1 to offset inc ebx + cmp ebx, FullLength // Check if at end of array + mov [edi+ebx-1], al // Write back Raw(x); + // mov does not affect flags; -1 to offset inc ebx + jb davg1lp +davg1end: + } // end _asm block + } + return; + + case 8: // bpp == 8 + { + _asm { + // Re-init address pointers and offset + mov ebx, diff // ebx ==> x = offset to alignment boundary + movq mm5, LBCarryMask + mov edi, row // edi ==> Avg(x) + movq mm4, HBClearMask + mov esi, prev_row // esi ==> Prior(x) + // PRIME the pump (load the first Raw(x-bpp) data set + movq mm2, [edi + ebx - 8] // Load previous aligned 8 bytes + // (NO NEED to correct position in loop below) +davg8lp: + movq mm0, [edi + ebx] + movq mm3, mm5 + movq mm1, [esi + ebx] + add ebx, 8 + pand mm3, mm1 // get lsb for each prev_row byte + psrlq mm1, 1 // divide prev_row bytes by 2 + pand mm3, mm2 // get LBCarrys for each byte where both + // lsb's were == 1 + psrlq mm2, 1 // divide raw bytes by 2 + pand mm1, mm4 // clear invalid bit 7 of each byte + paddb mm0, mm3 // add LBCarrys to Avg for each byte + pand mm2, mm4 // clear invalid bit 7 of each byte + paddb mm0, mm1 // add (Prev_row/2) to Avg for each byte + paddb mm0, mm2 // add (Raw/2) to Avg for each byte + cmp ebx, MMXLength + movq [edi + ebx - 8], mm0 + movq mm2, mm0 // reuse as Raw(x-bpp) + jb davg8lp + } // end _asm block + } + break; + default: // bpp greater than 8 + { + _asm { + movq mm5, LBCarryMask + // Re-init address pointers and offset + mov ebx, diff // ebx ==> x = offset to alignment boundary + mov edi, row // edi ==> Avg(x) + movq mm4, HBClearMask + mov edx, edi + mov esi, prev_row // esi ==> Prior(x) + sub edx, bpp // edx ==> Raw(x-bpp) +davgAlp: + movq mm0, [edi + ebx] + movq mm3, mm5 + movq mm1, [esi + ebx] + pand mm3, mm1 // get lsb for each prev_row byte + movq mm2, [edx + ebx] + psrlq mm1, 1 // divide prev_row bytes by 2 + pand mm3, mm2 // get LBCarrys for each byte where both + // lsb's were == 1 + psrlq mm2, 1 // divide raw bytes by 2 + pand mm1, mm4 // clear invalid bit 7 of each byte + paddb mm0, mm3 // add LBCarrys to Avg for each byte + pand mm2, mm4 // clear invalid bit 7 of each byte + paddb mm0, mm1 // add (Prev_row/2) to Avg for each byte + add ebx, 8 + paddb mm0, mm2 // add (Raw/2) to Avg for each byte + cmp ebx, MMXLength + movq [edi + ebx - 8], mm0 + jb davgAlp + } // end _asm block + } + break; + } // end switch ( bpp ) + + _asm { + // MMX acceleration complete now do clean-up + // Check if any remaining bytes left to decode + mov ebx, MMXLength // ebx ==> x = offset bytes remaining after MMX + mov edi, row // edi ==> Avg(x) + cmp ebx, FullLength // Test if offset at end of array + jnb davgend + // Do Paeth decode for remaining bytes + mov esi, prev_row // esi ==> Prior(x) + mov edx, edi + xor ecx, ecx // zero ecx before using cl & cx in loop below + sub edx, bpp // edx ==> Raw(x-bpp) +davglp2: + // Raw(x) = Avg(x) + ((Raw(x-bpp) + Prior(x))/2) + xor eax, eax + mov cl, [esi + ebx] // load cl with Prior(x) + mov al, [edx + ebx] // load al with Raw(x-bpp) + add ax, cx + inc ebx + shr ax, 1 // divide by 2 + add al, [edi+ebx-1] // Add Avg(x); -1 to offset inc ebx + cmp ebx, FullLength // Check if at end of array + mov [edi+ebx-1], al // Write back Raw(x); + // mov does not affect flags; -1 to offset inc ebx + jb davglp2 +davgend: + emms // End MMX instructions; prep for possible FP instrs. + } // end _asm block +} + +// Optimized code for PNG Paeth filter decoder +void /* PRIVATE */ +png_read_filter_row_mmx_paeth(png_row_infop row_info, png_bytep row, + png_bytep prev_row) +{ + png_uint_32 FullLength; + png_uint_32 MMXLength; + //png_uint_32 len; + int bpp; + int diff; + //int ptemp; + int patemp, pbtemp, pctemp; + + bpp = (row_info->pixel_depth + 7) >> 3; // Get # bytes per pixel + FullLength = row_info->rowbytes; // # of bytes to filter + _asm + { + xor ebx, ebx // ebx ==> x offset + mov edi, row + xor edx, edx // edx ==> x-bpp offset + mov esi, prev_row + xor eax, eax + + // Compute the Raw value for the first bpp bytes + // Note: the formula works out to be always + // Paeth(x) = Raw(x) + Prior(x) where x < bpp +dpthrlp: + mov al, [edi + ebx] + add al, [esi + ebx] + inc ebx + cmp ebx, bpp + mov [edi + ebx - 1], al + jb dpthrlp + // get # of bytes to alignment + mov diff, edi // take start of row + add diff, ebx // add bpp + xor ecx, ecx + add diff, 0xf // add 7 + 8 to incr past alignment boundary + and diff, 0xfffffff8 // mask to alignment boundary + sub diff, edi // subtract from start ==> value ebx at alignment + jz dpthgo + // fix alignment +dpthlp1: + xor eax, eax + // pav = p - a = (a + b - c) - a = b - c + mov al, [esi + ebx] // load Prior(x) into al + mov cl, [esi + edx] // load Prior(x-bpp) into cl + sub eax, ecx // subtract Prior(x-bpp) + mov patemp, eax // Save pav for later use + xor eax, eax + // pbv = p - b = (a + b - c) - b = a - c + mov al, [edi + edx] // load Raw(x-bpp) into al + sub eax, ecx // subtract Prior(x-bpp) + mov ecx, eax + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + add eax, patemp // pcv = pav + pbv + // pc = abs(pcv) + test eax, 0x80000000 + jz dpthpca + neg eax // reverse sign of neg values +dpthpca: + mov pctemp, eax // save pc for later use + // pb = abs(pbv) + test ecx, 0x80000000 + jz dpthpba + neg ecx // reverse sign of neg values +dpthpba: + mov pbtemp, ecx // save pb for later use + // pa = abs(pav) + mov eax, patemp + test eax, 0x80000000 + jz dpthpaa + neg eax // reverse sign of neg values +dpthpaa: + mov patemp, eax // save pa for later use + // test if pa <= pb + cmp eax, ecx + jna dpthabb + // pa > pb; now test if pb <= pc + cmp ecx, pctemp + jna dpthbbc + // pb > pc; Raw(x) = Paeth(x) + Prior(x-bpp) + mov cl, [esi + edx] // load Prior(x-bpp) into cl + jmp dpthpaeth +dpthbbc: + // pb <= pc; Raw(x) = Paeth(x) + Prior(x) + mov cl, [esi + ebx] // load Prior(x) into cl + jmp dpthpaeth +dpthabb: + // pa <= pb; now test if pa <= pc + cmp eax, pctemp + jna dpthabc + // pa > pc; Raw(x) = Paeth(x) + Prior(x-bpp) + mov cl, [esi + edx] // load Prior(x-bpp) into cl + jmp dpthpaeth +dpthabc: + // pa <= pc; Raw(x) = Paeth(x) + Raw(x-bpp) + mov cl, [edi + edx] // load Raw(x-bpp) into cl +dpthpaeth: + inc ebx + inc edx + // Raw(x) = (Paeth(x) + Paeth_Predictor( a, b, c )) mod 256 + add [edi + ebx - 1], cl + cmp ebx, diff + jb dpthlp1 +dpthgo: + mov ecx, FullLength + mov eax, ecx + sub eax, ebx // subtract alignment fix + and eax, 0x00000007 // calc bytes over mult of 8 + sub ecx, eax // drop over bytes from original length + mov MMXLength, ecx + } // end _asm block + // Now do the math for the rest of the row + switch ( bpp ) + { + case 3: + { + ActiveMask.use = 0x0000000000ffffff; + ActiveMaskEnd.use = 0xffff000000000000; + ShiftBpp.use = 24; // == bpp(3) * 8 + ShiftRem.use = 40; // == 64 - 24 + _asm + { + mov ebx, diff + mov edi, row + mov esi, prev_row + pxor mm0, mm0 + // PRIME the pump (load the first Raw(x-bpp) data set + movq mm1, [edi+ebx-8] +dpth3lp: + psrlq mm1, ShiftRem // shift last 3 bytes to 1st 3 bytes + movq mm2, [esi + ebx] // load b=Prior(x) + punpcklbw mm1, mm0 // Unpack High bytes of a + movq mm3, [esi+ebx-8] // Prep c=Prior(x-bpp) bytes + punpcklbw mm2, mm0 // Unpack High bytes of b + psrlq mm3, ShiftRem // shift last 3 bytes to 1st 3 bytes + // pav = p - a = (a + b - c) - a = b - c + movq mm4, mm2 + punpcklbw mm3, mm0 // Unpack High bytes of c + // pbv = p - b = (a + b - c) - b = a - c + movq mm5, mm1 + psubw mm4, mm3 + pxor mm7, mm7 + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + movq mm6, mm4 + psubw mm5, mm3 + + // pa = abs(p-a) = abs(pav) + // pb = abs(p-b) = abs(pbv) + // pc = abs(p-c) = abs(pcv) + pcmpgtw mm0, mm4 // Create mask pav bytes < 0 + paddw mm6, mm5 + pand mm0, mm4 // Only pav bytes < 0 in mm7 + pcmpgtw mm7, mm5 // Create mask pbv bytes < 0 + psubw mm4, mm0 + pand mm7, mm5 // Only pbv bytes < 0 in mm0 + psubw mm4, mm0 + psubw mm5, mm7 + pxor mm0, mm0 + pcmpgtw mm0, mm6 // Create mask pcv bytes < 0 + pand mm0, mm6 // Only pav bytes < 0 in mm7 + psubw mm5, mm7 + psubw mm6, mm0 + // test pa <= pb + movq mm7, mm4 + psubw mm6, mm0 + pcmpgtw mm7, mm5 // pa > pb? + movq mm0, mm7 + // use mm7 mask to merge pa & pb + pand mm5, mm7 + // use mm0 mask copy to merge a & b + pand mm2, mm0 + pandn mm7, mm4 + pandn mm0, mm1 + paddw mm7, mm5 + paddw mm0, mm2 + // test ((pa <= pb)? pa:pb) <= pc + pcmpgtw mm7, mm6 // pab > pc? + pxor mm1, mm1 + pand mm3, mm7 + pandn mm7, mm0 + paddw mm7, mm3 + pxor mm0, mm0 + packuswb mm7, mm1 + movq mm3, [esi + ebx] // load c=Prior(x-bpp) + pand mm7, ActiveMask + movq mm2, mm3 // load b=Prior(x) step 1 + paddb mm7, [edi + ebx] // add Paeth predictor with Raw(x) + punpcklbw mm3, mm0 // Unpack High bytes of c + movq [edi + ebx], mm7 // write back updated value + movq mm1, mm7 // Now mm1 will be used as Raw(x-bpp) + // Now do Paeth for 2nd set of bytes (3-5) + psrlq mm2, ShiftBpp // load b=Prior(x) step 2 + punpcklbw mm1, mm0 // Unpack High bytes of a + pxor mm7, mm7 + punpcklbw mm2, mm0 // Unpack High bytes of b + // pbv = p - b = (a + b - c) - b = a - c + movq mm5, mm1 + // pav = p - a = (a + b - c) - a = b - c + movq mm4, mm2 + psubw mm5, mm3 + psubw mm4, mm3 + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = + // pav + pbv = pbv + pav + movq mm6, mm5 + paddw mm6, mm4 + + // pa = abs(p-a) = abs(pav) + // pb = abs(p-b) = abs(pbv) + // pc = abs(p-c) = abs(pcv) + pcmpgtw mm0, mm5 // Create mask pbv bytes < 0 + pcmpgtw mm7, mm4 // Create mask pav bytes < 0 + pand mm0, mm5 // Only pbv bytes < 0 in mm0 + pand mm7, mm4 // Only pav bytes < 0 in mm7 + psubw mm5, mm0 + psubw mm4, mm7 + psubw mm5, mm0 + psubw mm4, mm7 + pxor mm0, mm0 + pcmpgtw mm0, mm6 // Create mask pcv bytes < 0 + pand mm0, mm6 // Only pav bytes < 0 in mm7 + psubw mm6, mm0 + // test pa <= pb + movq mm7, mm4 + psubw mm6, mm0 + pcmpgtw mm7, mm5 // pa > pb? + movq mm0, mm7 + // use mm7 mask to merge pa & pb + pand mm5, mm7 + // use mm0 mask copy to merge a & b + pand mm2, mm0 + pandn mm7, mm4 + pandn mm0, mm1 + paddw mm7, mm5 + paddw mm0, mm2 + // test ((pa <= pb)? pa:pb) <= pc + pcmpgtw mm7, mm6 // pab > pc? + movq mm2, [esi + ebx] // load b=Prior(x) + pand mm3, mm7 + pandn mm7, mm0 + pxor mm1, mm1 + paddw mm7, mm3 + pxor mm0, mm0 + packuswb mm7, mm1 + movq mm3, mm2 // load c=Prior(x-bpp) step 1 + pand mm7, ActiveMask + punpckhbw mm2, mm0 // Unpack High bytes of b + psllq mm7, ShiftBpp // Shift bytes to 2nd group of 3 bytes + // pav = p - a = (a + b - c) - a = b - c + movq mm4, mm2 + paddb mm7, [edi + ebx] // add Paeth predictor with Raw(x) + psllq mm3, ShiftBpp // load c=Prior(x-bpp) step 2 + movq [edi + ebx], mm7 // write back updated value + movq mm1, mm7 + punpckhbw mm3, mm0 // Unpack High bytes of c + psllq mm1, ShiftBpp // Shift bytes + // Now mm1 will be used as Raw(x-bpp) + // Now do Paeth for 3rd, and final, set of bytes (6-7) + pxor mm7, mm7 + punpckhbw mm1, mm0 // Unpack High bytes of a + psubw mm4, mm3 + // pbv = p - b = (a + b - c) - b = a - c + movq mm5, mm1 + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + movq mm6, mm4 + psubw mm5, mm3 + pxor mm0, mm0 + paddw mm6, mm5 + + // pa = abs(p-a) = abs(pav) + // pb = abs(p-b) = abs(pbv) + // pc = abs(p-c) = abs(pcv) + pcmpgtw mm0, mm4 // Create mask pav bytes < 0 + pcmpgtw mm7, mm5 // Create mask pbv bytes < 0 + pand mm0, mm4 // Only pav bytes < 0 in mm7 + pand mm7, mm5 // Only pbv bytes < 0 in mm0 + psubw mm4, mm0 + psubw mm5, mm7 + psubw mm4, mm0 + psubw mm5, mm7 + pxor mm0, mm0 + pcmpgtw mm0, mm6 // Create mask pcv bytes < 0 + pand mm0, mm6 // Only pav bytes < 0 in mm7 + psubw mm6, mm0 + // test pa <= pb + movq mm7, mm4 + psubw mm6, mm0 + pcmpgtw mm7, mm5 // pa > pb? + movq mm0, mm7 + // use mm0 mask copy to merge a & b + pand mm2, mm0 + // use mm7 mask to merge pa & pb + pand mm5, mm7 + pandn mm0, mm1 + pandn mm7, mm4 + paddw mm0, mm2 + paddw mm7, mm5 + // test ((pa <= pb)? pa:pb) <= pc + pcmpgtw mm7, mm6 // pab > pc? + pand mm3, mm7 + pandn mm7, mm0 + paddw mm7, mm3 + pxor mm1, mm1 + packuswb mm1, mm7 + // Step ebx to next set of 8 bytes and repeat loop til done + add ebx, 8 + pand mm1, ActiveMaskEnd + paddb mm1, [edi + ebx - 8] // add Paeth predictor with Raw(x) + + cmp ebx, MMXLength + pxor mm0, mm0 // pxor does not affect flags + movq [edi + ebx - 8], mm1 // write back updated value + // mm1 will be used as Raw(x-bpp) next loop + // mm3 ready to be used as Prior(x-bpp) next loop + jb dpth3lp + } // end _asm block + } + break; + + case 6: + case 7: + case 5: + { + ActiveMask.use = 0x00000000ffffffff; + ActiveMask2.use = 0xffffffff00000000; + ShiftBpp.use = bpp << 3; // == bpp * 8 + ShiftRem.use = 64 - ShiftBpp.use; + _asm + { + mov ebx, diff + mov edi, row + mov esi, prev_row + // PRIME the pump (load the first Raw(x-bpp) data set + movq mm1, [edi+ebx-8] + pxor mm0, mm0 +dpth6lp: + // Must shift to position Raw(x-bpp) data + psrlq mm1, ShiftRem + // Do first set of 4 bytes + movq mm3, [esi+ebx-8] // read c=Prior(x-bpp) bytes + punpcklbw mm1, mm0 // Unpack Low bytes of a + movq mm2, [esi + ebx] // load b=Prior(x) + punpcklbw mm2, mm0 // Unpack Low bytes of b + // Must shift to position Prior(x-bpp) data + psrlq mm3, ShiftRem + // pav = p - a = (a + b - c) - a = b - c + movq mm4, mm2 + punpcklbw mm3, mm0 // Unpack Low bytes of c + // pbv = p - b = (a + b - c) - b = a - c + movq mm5, mm1 + psubw mm4, mm3 + pxor mm7, mm7 + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + movq mm6, mm4 + psubw mm5, mm3 + // pa = abs(p-a) = abs(pav) + // pb = abs(p-b) = abs(pbv) + // pc = abs(p-c) = abs(pcv) + pcmpgtw mm0, mm4 // Create mask pav bytes < 0 + paddw mm6, mm5 + pand mm0, mm4 // Only pav bytes < 0 in mm7 + pcmpgtw mm7, mm5 // Create mask pbv bytes < 0 + psubw mm4, mm0 + pand mm7, mm5 // Only pbv bytes < 0 in mm0 + psubw mm4, mm0 + psubw mm5, mm7 + pxor mm0, mm0 + pcmpgtw mm0, mm6 // Create mask pcv bytes < 0 + pand mm0, mm6 // Only pav bytes < 0 in mm7 + psubw mm5, mm7 + psubw mm6, mm0 + // test pa <= pb + movq mm7, mm4 + psubw mm6, mm0 + pcmpgtw mm7, mm5 // pa > pb? + movq mm0, mm7 + // use mm7 mask to merge pa & pb + pand mm5, mm7 + // use mm0 mask copy to merge a & b + pand mm2, mm0 + pandn mm7, mm4 + pandn mm0, mm1 + paddw mm7, mm5 + paddw mm0, mm2 + // test ((pa <= pb)? pa:pb) <= pc + pcmpgtw mm7, mm6 // pab > pc? + pxor mm1, mm1 + pand mm3, mm7 + pandn mm7, mm0 + paddw mm7, mm3 + pxor mm0, mm0 + packuswb mm7, mm1 + movq mm3, [esi + ebx - 8] // load c=Prior(x-bpp) + pand mm7, ActiveMask + psrlq mm3, ShiftRem + movq mm2, [esi + ebx] // load b=Prior(x) step 1 + paddb mm7, [edi + ebx] // add Paeth predictor with Raw(x) + movq mm6, mm2 + movq [edi + ebx], mm7 // write back updated value + movq mm1, [edi+ebx-8] + psllq mm6, ShiftBpp + movq mm5, mm7 + psrlq mm1, ShiftRem + por mm3, mm6 + psllq mm5, ShiftBpp + punpckhbw mm3, mm0 // Unpack High bytes of c + por mm1, mm5 + // Do second set of 4 bytes + punpckhbw mm2, mm0 // Unpack High bytes of b + punpckhbw mm1, mm0 // Unpack High bytes of a + // pav = p - a = (a + b - c) - a = b - c + movq mm4, mm2 + // pbv = p - b = (a + b - c) - b = a - c + movq mm5, mm1 + psubw mm4, mm3 + pxor mm7, mm7 + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + movq mm6, mm4 + psubw mm5, mm3 + // pa = abs(p-a) = abs(pav) + // pb = abs(p-b) = abs(pbv) + // pc = abs(p-c) = abs(pcv) + pcmpgtw mm0, mm4 // Create mask pav bytes < 0 + paddw mm6, mm5 + pand mm0, mm4 // Only pav bytes < 0 in mm7 + pcmpgtw mm7, mm5 // Create mask pbv bytes < 0 + psubw mm4, mm0 + pand mm7, mm5 // Only pbv bytes < 0 in mm0 + psubw mm4, mm0 + psubw mm5, mm7 + pxor mm0, mm0 + pcmpgtw mm0, mm6 // Create mask pcv bytes < 0 + pand mm0, mm6 // Only pav bytes < 0 in mm7 + psubw mm5, mm7 + psubw mm6, mm0 + // test pa <= pb + movq mm7, mm4 + psubw mm6, mm0 + pcmpgtw mm7, mm5 // pa > pb? + movq mm0, mm7 + // use mm7 mask to merge pa & pb + pand mm5, mm7 + // use mm0 mask copy to merge a & b + pand mm2, mm0 + pandn mm7, mm4 + pandn mm0, mm1 + paddw mm7, mm5 + paddw mm0, mm2 + // test ((pa <= pb)? pa:pb) <= pc + pcmpgtw mm7, mm6 // pab > pc? + pxor mm1, mm1 + pand mm3, mm7 + pandn mm7, mm0 + pxor mm1, mm1 + paddw mm7, mm3 + pxor mm0, mm0 + // Step ex to next set of 8 bytes and repeat loop til done + add ebx, 8 + packuswb mm1, mm7 + paddb mm1, [edi + ebx - 8] // add Paeth predictor with Raw(x) + cmp ebx, MMXLength + movq [edi + ebx - 8], mm1 // write back updated value + // mm1 will be used as Raw(x-bpp) next loop + jb dpth6lp + } // end _asm block + } + break; + + case 4: + { + ActiveMask.use = 0x00000000ffffffff; + _asm { + mov ebx, diff + mov edi, row + mov esi, prev_row + pxor mm0, mm0 + // PRIME the pump (load the first Raw(x-bpp) data set + movq mm1, [edi+ebx-8] // Only time should need to read + // a=Raw(x-bpp) bytes +dpth4lp: + // Do first set of 4 bytes + movq mm3, [esi+ebx-8] // read c=Prior(x-bpp) bytes + punpckhbw mm1, mm0 // Unpack Low bytes of a + movq mm2, [esi + ebx] // load b=Prior(x) + punpcklbw mm2, mm0 // Unpack High bytes of b + // pav = p - a = (a + b - c) - a = b - c + movq mm4, mm2 + punpckhbw mm3, mm0 // Unpack High bytes of c + // pbv = p - b = (a + b - c) - b = a - c + movq mm5, mm1 + psubw mm4, mm3 + pxor mm7, mm7 + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + movq mm6, mm4 + psubw mm5, mm3 + // pa = abs(p-a) = abs(pav) + // pb = abs(p-b) = abs(pbv) + // pc = abs(p-c) = abs(pcv) + pcmpgtw mm0, mm4 // Create mask pav bytes < 0 + paddw mm6, mm5 + pand mm0, mm4 // Only pav bytes < 0 in mm7 + pcmpgtw mm7, mm5 // Create mask pbv bytes < 0 + psubw mm4, mm0 + pand mm7, mm5 // Only pbv bytes < 0 in mm0 + psubw mm4, mm0 + psubw mm5, mm7 + pxor mm0, mm0 + pcmpgtw mm0, mm6 // Create mask pcv bytes < 0 + pand mm0, mm6 // Only pav bytes < 0 in mm7 + psubw mm5, mm7 + psubw mm6, mm0 + // test pa <= pb + movq mm7, mm4 + psubw mm6, mm0 + pcmpgtw mm7, mm5 // pa > pb? + movq mm0, mm7 + // use mm7 mask to merge pa & pb + pand mm5, mm7 + // use mm0 mask copy to merge a & b + pand mm2, mm0 + pandn mm7, mm4 + pandn mm0, mm1 + paddw mm7, mm5 + paddw mm0, mm2 + // test ((pa <= pb)? pa:pb) <= pc + pcmpgtw mm7, mm6 // pab > pc? + pxor mm1, mm1 + pand mm3, mm7 + pandn mm7, mm0 + paddw mm7, mm3 + pxor mm0, mm0 + packuswb mm7, mm1 + movq mm3, [esi + ebx] // load c=Prior(x-bpp) + pand mm7, ActiveMask + movq mm2, mm3 // load b=Prior(x) step 1 + paddb mm7, [edi + ebx] // add Paeth predictor with Raw(x) + punpcklbw mm3, mm0 // Unpack High bytes of c + movq [edi + ebx], mm7 // write back updated value + movq mm1, mm7 // Now mm1 will be used as Raw(x-bpp) + // Do second set of 4 bytes + punpckhbw mm2, mm0 // Unpack Low bytes of b + punpcklbw mm1, mm0 // Unpack Low bytes of a + // pav = p - a = (a + b - c) - a = b - c + movq mm4, mm2 + // pbv = p - b = (a + b - c) - b = a - c + movq mm5, mm1 + psubw mm4, mm3 + pxor mm7, mm7 + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + movq mm6, mm4 + psubw mm5, mm3 + // pa = abs(p-a) = abs(pav) + // pb = abs(p-b) = abs(pbv) + // pc = abs(p-c) = abs(pcv) + pcmpgtw mm0, mm4 // Create mask pav bytes < 0 + paddw mm6, mm5 + pand mm0, mm4 // Only pav bytes < 0 in mm7 + pcmpgtw mm7, mm5 // Create mask pbv bytes < 0 + psubw mm4, mm0 + pand mm7, mm5 // Only pbv bytes < 0 in mm0 + psubw mm4, mm0 + psubw mm5, mm7 + pxor mm0, mm0 + pcmpgtw mm0, mm6 // Create mask pcv bytes < 0 + pand mm0, mm6 // Only pav bytes < 0 in mm7 + psubw mm5, mm7 + psubw mm6, mm0 + // test pa <= pb + movq mm7, mm4 + psubw mm6, mm0 + pcmpgtw mm7, mm5 // pa > pb? + movq mm0, mm7 + // use mm7 mask to merge pa & pb + pand mm5, mm7 + // use mm0 mask copy to merge a & b + pand mm2, mm0 + pandn mm7, mm4 + pandn mm0, mm1 + paddw mm7, mm5 + paddw mm0, mm2 + // test ((pa <= pb)? pa:pb) <= pc + pcmpgtw mm7, mm6 // pab > pc? + pxor mm1, mm1 + pand mm3, mm7 + pandn mm7, mm0 + pxor mm1, mm1 + paddw mm7, mm3 + pxor mm0, mm0 + // Step ex to next set of 8 bytes and repeat loop til done + add ebx, 8 + packuswb mm1, mm7 + paddb mm1, [edi + ebx - 8] // add Paeth predictor with Raw(x) + cmp ebx, MMXLength + movq [edi + ebx - 8], mm1 // write back updated value + // mm1 will be used as Raw(x-bpp) next loop + jb dpth4lp + } // end _asm block + } + break; + case 8: // bpp == 8 + { + ActiveMask.use = 0x00000000ffffffff; + _asm { + mov ebx, diff + mov edi, row + mov esi, prev_row + pxor mm0, mm0 + // PRIME the pump (load the first Raw(x-bpp) data set + movq mm1, [edi+ebx-8] // Only time should need to read + // a=Raw(x-bpp) bytes +dpth8lp: + // Do first set of 4 bytes + movq mm3, [esi+ebx-8] // read c=Prior(x-bpp) bytes + punpcklbw mm1, mm0 // Unpack Low bytes of a + movq mm2, [esi + ebx] // load b=Prior(x) + punpcklbw mm2, mm0 // Unpack Low bytes of b + // pav = p - a = (a + b - c) - a = b - c + movq mm4, mm2 + punpcklbw mm3, mm0 // Unpack Low bytes of c + // pbv = p - b = (a + b - c) - b = a - c + movq mm5, mm1 + psubw mm4, mm3 + pxor mm7, mm7 + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + movq mm6, mm4 + psubw mm5, mm3 + // pa = abs(p-a) = abs(pav) + // pb = abs(p-b) = abs(pbv) + // pc = abs(p-c) = abs(pcv) + pcmpgtw mm0, mm4 // Create mask pav bytes < 0 + paddw mm6, mm5 + pand mm0, mm4 // Only pav bytes < 0 in mm7 + pcmpgtw mm7, mm5 // Create mask pbv bytes < 0 + psubw mm4, mm0 + pand mm7, mm5 // Only pbv bytes < 0 in mm0 + psubw mm4, mm0 + psubw mm5, mm7 + pxor mm0, mm0 + pcmpgtw mm0, mm6 // Create mask pcv bytes < 0 + pand mm0, mm6 // Only pav bytes < 0 in mm7 + psubw mm5, mm7 + psubw mm6, mm0 + // test pa <= pb + movq mm7, mm4 + psubw mm6, mm0 + pcmpgtw mm7, mm5 // pa > pb? + movq mm0, mm7 + // use mm7 mask to merge pa & pb + pand mm5, mm7 + // use mm0 mask copy to merge a & b + pand mm2, mm0 + pandn mm7, mm4 + pandn mm0, mm1 + paddw mm7, mm5 + paddw mm0, mm2 + // test ((pa <= pb)? pa:pb) <= pc + pcmpgtw mm7, mm6 // pab > pc? + pxor mm1, mm1 + pand mm3, mm7 + pandn mm7, mm0 + paddw mm7, mm3 + pxor mm0, mm0 + packuswb mm7, mm1 + movq mm3, [esi+ebx-8] // read c=Prior(x-bpp) bytes + pand mm7, ActiveMask + movq mm2, [esi + ebx] // load b=Prior(x) + paddb mm7, [edi + ebx] // add Paeth predictor with Raw(x) + punpckhbw mm3, mm0 // Unpack High bytes of c + movq [edi + ebx], mm7 // write back updated value + movq mm1, [edi+ebx-8] // read a=Raw(x-bpp) bytes + + // Do second set of 4 bytes + punpckhbw mm2, mm0 // Unpack High bytes of b + punpckhbw mm1, mm0 // Unpack High bytes of a + // pav = p - a = (a + b - c) - a = b - c + movq mm4, mm2 + // pbv = p - b = (a + b - c) - b = a - c + movq mm5, mm1 + psubw mm4, mm3 + pxor mm7, mm7 + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + movq mm6, mm4 + psubw mm5, mm3 + // pa = abs(p-a) = abs(pav) + // pb = abs(p-b) = abs(pbv) + // pc = abs(p-c) = abs(pcv) + pcmpgtw mm0, mm4 // Create mask pav bytes < 0 + paddw mm6, mm5 + pand mm0, mm4 // Only pav bytes < 0 in mm7 + pcmpgtw mm7, mm5 // Create mask pbv bytes < 0 + psubw mm4, mm0 + pand mm7, mm5 // Only pbv bytes < 0 in mm0 + psubw mm4, mm0 + psubw mm5, mm7 + pxor mm0, mm0 + pcmpgtw mm0, mm6 // Create mask pcv bytes < 0 + pand mm0, mm6 // Only pav bytes < 0 in mm7 + psubw mm5, mm7 + psubw mm6, mm0 + // test pa <= pb + movq mm7, mm4 + psubw mm6, mm0 + pcmpgtw mm7, mm5 // pa > pb? + movq mm0, mm7 + // use mm7 mask to merge pa & pb + pand mm5, mm7 + // use mm0 mask copy to merge a & b + pand mm2, mm0 + pandn mm7, mm4 + pandn mm0, mm1 + paddw mm7, mm5 + paddw mm0, mm2 + // test ((pa <= pb)? pa:pb) <= pc + pcmpgtw mm7, mm6 // pab > pc? + pxor mm1, mm1 + pand mm3, mm7 + pandn mm7, mm0 + pxor mm1, mm1 + paddw mm7, mm3 + pxor mm0, mm0 + // Step ex to next set of 8 bytes and repeat loop til done + add ebx, 8 + packuswb mm1, mm7 + paddb mm1, [edi + ebx - 8] // add Paeth predictor with Raw(x) + cmp ebx, MMXLength + movq [edi + ebx - 8], mm1 // write back updated value + // mm1 will be used as Raw(x-bpp) next loop + jb dpth8lp + } // end _asm block + } + break; + + case 1: // bpp = 1 + case 2: // bpp = 2 + default: // bpp > 8 + { + _asm { + mov ebx, diff + cmp ebx, FullLength + jnb dpthdend + mov edi, row + mov esi, prev_row + // Do Paeth decode for remaining bytes + mov edx, ebx + xor ecx, ecx // zero ecx before using cl & cx in loop below + sub edx, bpp // Set edx = ebx - bpp +dpthdlp: + xor eax, eax + // pav = p - a = (a + b - c) - a = b - c + mov al, [esi + ebx] // load Prior(x) into al + mov cl, [esi + edx] // load Prior(x-bpp) into cl + sub eax, ecx // subtract Prior(x-bpp) + mov patemp, eax // Save pav for later use + xor eax, eax + // pbv = p - b = (a + b - c) - b = a - c + mov al, [edi + edx] // load Raw(x-bpp) into al + sub eax, ecx // subtract Prior(x-bpp) + mov ecx, eax + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + add eax, patemp // pcv = pav + pbv + // pc = abs(pcv) + test eax, 0x80000000 + jz dpthdpca + neg eax // reverse sign of neg values +dpthdpca: + mov pctemp, eax // save pc for later use + // pb = abs(pbv) + test ecx, 0x80000000 + jz dpthdpba + neg ecx // reverse sign of neg values +dpthdpba: + mov pbtemp, ecx // save pb for later use + // pa = abs(pav) + mov eax, patemp + test eax, 0x80000000 + jz dpthdpaa + neg eax // reverse sign of neg values +dpthdpaa: + mov patemp, eax // save pa for later use + // test if pa <= pb + cmp eax, ecx + jna dpthdabb + // pa > pb; now test if pb <= pc + cmp ecx, pctemp + jna dpthdbbc + // pb > pc; Raw(x) = Paeth(x) + Prior(x-bpp) + mov cl, [esi + edx] // load Prior(x-bpp) into cl + jmp dpthdpaeth +dpthdbbc: + // pb <= pc; Raw(x) = Paeth(x) + Prior(x) + mov cl, [esi + ebx] // load Prior(x) into cl + jmp dpthdpaeth +dpthdabb: + // pa <= pb; now test if pa <= pc + cmp eax, pctemp + jna dpthdabc + // pa > pc; Raw(x) = Paeth(x) + Prior(x-bpp) + mov cl, [esi + edx] // load Prior(x-bpp) into cl + jmp dpthdpaeth +dpthdabc: + // pa <= pc; Raw(x) = Paeth(x) + Raw(x-bpp) + mov cl, [edi + edx] // load Raw(x-bpp) into cl +dpthdpaeth: + inc ebx + inc edx + // Raw(x) = (Paeth(x) + Paeth_Predictor( a, b, c )) mod 256 + add [edi + ebx - 1], cl + cmp ebx, FullLength + jb dpthdlp +dpthdend: + } // end _asm block + } + return; // No need to go further with this one + } // end switch ( bpp ) + _asm + { + // MMX acceleration complete now do clean-up + // Check if any remaining bytes left to decode + mov ebx, MMXLength + cmp ebx, FullLength + jnb dpthend + mov edi, row + mov esi, prev_row + // Do Paeth decode for remaining bytes + mov edx, ebx + xor ecx, ecx // zero ecx before using cl & cx in loop below + sub edx, bpp // Set edx = ebx - bpp +dpthlp2: + xor eax, eax + // pav = p - a = (a + b - c) - a = b - c + mov al, [esi + ebx] // load Prior(x) into al + mov cl, [esi + edx] // load Prior(x-bpp) into cl + sub eax, ecx // subtract Prior(x-bpp) + mov patemp, eax // Save pav for later use + xor eax, eax + // pbv = p - b = (a + b - c) - b = a - c + mov al, [edi + edx] // load Raw(x-bpp) into al + sub eax, ecx // subtract Prior(x-bpp) + mov ecx, eax + // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv + add eax, patemp // pcv = pav + pbv + // pc = abs(pcv) + test eax, 0x80000000 + jz dpthpca2 + neg eax // reverse sign of neg values +dpthpca2: + mov pctemp, eax // save pc for later use + // pb = abs(pbv) + test ecx, 0x80000000 + jz dpthpba2 + neg ecx // reverse sign of neg values +dpthpba2: + mov pbtemp, ecx // save pb for later use + // pa = abs(pav) + mov eax, patemp + test eax, 0x80000000 + jz dpthpaa2 + neg eax // reverse sign of neg values +dpthpaa2: + mov patemp, eax // save pa for later use + // test if pa <= pb + cmp eax, ecx + jna dpthabb2 + // pa > pb; now test if pb <= pc + cmp ecx, pctemp + jna dpthbbc2 + // pb > pc; Raw(x) = Paeth(x) + Prior(x-bpp) + mov cl, [esi + edx] // load Prior(x-bpp) into cl + jmp dpthpaeth2 +dpthbbc2: + // pb <= pc; Raw(x) = Paeth(x) + Prior(x) + mov cl, [esi + ebx] // load Prior(x) into cl + jmp dpthpaeth2 +dpthabb2: + // pa <= pb; now test if pa <= pc + cmp eax, pctemp + jna dpthabc2 + // pa > pc; Raw(x) = Paeth(x) + Prior(x-bpp) + mov cl, [esi + edx] // load Prior(x-bpp) into cl + jmp dpthpaeth2 +dpthabc2: + // pa <= pc; Raw(x) = Paeth(x) + Raw(x-bpp) + mov cl, [edi + edx] // load Raw(x-bpp) into cl +dpthpaeth2: + inc ebx + inc edx + // Raw(x) = (Paeth(x) + Paeth_Predictor( a, b, c )) mod 256 + add [edi + ebx - 1], cl + cmp ebx, FullLength + jb dpthlp2 +dpthend: + emms // End MMX instructions; prep for possible FP instrs. + } // end _asm block +} + +// Optimized code for PNG Sub filter decoder +void /* PRIVATE */ +png_read_filter_row_mmx_sub(png_row_infop row_info, png_bytep row) +{ + //int test; + int bpp; + png_uint_32 FullLength; + png_uint_32 MMXLength; + int diff; + + bpp = (row_info->pixel_depth + 7) >> 3; // Get # bytes per pixel + FullLength = row_info->rowbytes - bpp; // # of bytes to filter + _asm { + mov edi, row + mov esi, edi // lp = row + add edi, bpp // rp = row + bpp + xor eax, eax + // get # of bytes to alignment + mov diff, edi // take start of row + add diff, 0xf // add 7 + 8 to incr past + // alignment boundary + xor ebx, ebx + and diff, 0xfffffff8 // mask to alignment boundary + sub diff, edi // subtract from start ==> value + // ebx at alignment + jz dsubgo + // fix alignment +dsublp1: + mov al, [esi+ebx] + add [edi+ebx], al + inc ebx + cmp ebx, diff + jb dsublp1 +dsubgo: + mov ecx, FullLength + mov edx, ecx + sub edx, ebx // subtract alignment fix + and edx, 0x00000007 // calc bytes over mult of 8 + sub ecx, edx // drop over bytes from length + mov MMXLength, ecx + } // end _asm block + + // Now do the math for the rest of the row + switch ( bpp ) + { + case 3: + { + ActiveMask.use = 0x0000ffffff000000; + ShiftBpp.use = 24; // == 3 * 8 + ShiftRem.use = 40; // == 64 - 24 + _asm { + mov edi, row + movq mm7, ActiveMask // Load ActiveMask for 2nd active byte group + mov esi, edi // lp = row + add edi, bpp // rp = row + bpp + movq mm6, mm7 + mov ebx, diff + psllq mm6, ShiftBpp // Move mask in mm6 to cover 3rd active + // byte group + // PRIME the pump (load the first Raw(x-bpp) data set + movq mm1, [edi+ebx-8] +dsub3lp: + psrlq mm1, ShiftRem // Shift data for adding 1st bpp bytes + // no need for mask; shift clears inactive bytes + // Add 1st active group + movq mm0, [edi+ebx] + paddb mm0, mm1 + // Add 2nd active group + movq mm1, mm0 // mov updated Raws to mm1 + psllq mm1, ShiftBpp // shift data to position correctly + pand mm1, mm7 // mask to use only 2nd active group + paddb mm0, mm1 + // Add 3rd active group + movq mm1, mm0 // mov updated Raws to mm1 + psllq mm1, ShiftBpp // shift data to position correctly + pand mm1, mm6 // mask to use only 3rd active group + add ebx, 8 + paddb mm0, mm1 + cmp ebx, MMXLength + movq [edi+ebx-8], mm0 // Write updated Raws back to array + // Prep for doing 1st add at top of loop + movq mm1, mm0 + jb dsub3lp + } // end _asm block + } + break; + + case 1: + { + // Placed here just in case this is a duplicate of the + // non-MMX code for the SUB filter in png_read_filter_row below + // + // png_bytep rp; + // png_bytep lp; + // png_uint_32 i; + // bpp = (row_info->pixel_depth + 7) >> 3; + // for (i = (png_uint_32)bpp, rp = row + bpp, lp = row; + // i < row_info->rowbytes; i++, rp++, lp++) + // { + // *rp = (png_byte)(((int)(*rp) + (int)(*lp)) & 0xff); + // } + _asm { + mov ebx, diff + mov edi, row + cmp ebx, FullLength + jnb dsub1end + mov esi, edi // lp = row + xor eax, eax + add edi, bpp // rp = row + bpp +dsub1lp: + mov al, [esi+ebx] + add [edi+ebx], al + inc ebx + cmp ebx, FullLength + jb dsub1lp +dsub1end: + } // end _asm block + } + return; + + case 6: + case 7: + case 4: + case 5: + { + ShiftBpp.use = bpp << 3; + ShiftRem.use = 64 - ShiftBpp.use; + _asm { + mov edi, row + mov ebx, diff + mov esi, edi // lp = row + add edi, bpp // rp = row + bpp + // PRIME the pump (load the first Raw(x-bpp) data set + movq mm1, [edi+ebx-8] +dsub4lp: + psrlq mm1, ShiftRem // Shift data for adding 1st bpp bytes + // no need for mask; shift clears inactive bytes + movq mm0, [edi+ebx] + paddb mm0, mm1 + // Add 2nd active group + movq mm1, mm0 // mov updated Raws to mm1 + psllq mm1, ShiftBpp // shift data to position correctly + // there is no need for any mask + // since shift clears inactive bits/bytes + add ebx, 8 + paddb mm0, mm1 + cmp ebx, MMXLength + movq [edi+ebx-8], mm0 + movq mm1, mm0 // Prep for doing 1st add at top of loop + jb dsub4lp + } // end _asm block + } + break; + + case 2: + { + ActiveMask.use = 0x00000000ffff0000; + ShiftBpp.use = 16; // == 2 * 8 + ShiftRem.use = 48; // == 64 - 16 + _asm { + movq mm7, ActiveMask // Load ActiveMask for 2nd active byte group + mov ebx, diff + movq mm6, mm7 + mov edi, row + psllq mm6, ShiftBpp // Move mask in mm6 to cover 3rd active + // byte group + mov esi, edi // lp = row + movq mm5, mm6 + add edi, bpp // rp = row + bpp + psllq mm5, ShiftBpp // Move mask in mm5 to cover 4th active + // byte group + // PRIME the pump (load the first Raw(x-bpp) data set + movq mm1, [edi+ebx-8] +dsub2lp: + // Add 1st active group + psrlq mm1, ShiftRem // Shift data for adding 1st bpp bytes + // no need for mask; shift clears inactive + // bytes + movq mm0, [edi+ebx] + paddb mm0, mm1 + // Add 2nd active group + movq mm1, mm0 // mov updated Raws to mm1 + psllq mm1, ShiftBpp // shift data to position correctly + pand mm1, mm7 // mask to use only 2nd active group + paddb mm0, mm1 + // Add 3rd active group + movq mm1, mm0 // mov updated Raws to mm1 + psllq mm1, ShiftBpp // shift data to position correctly + pand mm1, mm6 // mask to use only 3rd active group + paddb mm0, mm1 + // Add 4th active group + movq mm1, mm0 // mov updated Raws to mm1 + psllq mm1, ShiftBpp // shift data to position correctly + pand mm1, mm5 // mask to use only 4th active group + add ebx, 8 + paddb mm0, mm1 + cmp ebx, MMXLength + movq [edi+ebx-8], mm0 // Write updated Raws back to array + movq mm1, mm0 // Prep for doing 1st add at top of loop + jb dsub2lp + } // end _asm block + } + break; + case 8: + { + _asm { + mov edi, row + mov ebx, diff + mov esi, edi // lp = row + add edi, bpp // rp = row + bpp + mov ecx, MMXLength + movq mm7, [edi+ebx-8] // PRIME the pump (load the first + // Raw(x-bpp) data set + and ecx, 0x0000003f // calc bytes over mult of 64 +dsub8lp: + movq mm0, [edi+ebx] // Load Sub(x) for 1st 8 bytes + paddb mm0, mm7 + movq mm1, [edi+ebx+8] // Load Sub(x) for 2nd 8 bytes + movq [edi+ebx], mm0 // Write Raw(x) for 1st 8 bytes + // Now mm0 will be used as Raw(x-bpp) for + // the 2nd group of 8 bytes. This will be + // repeated for each group of 8 bytes with + // the 8th group being used as the Raw(x-bpp) + // for the 1st group of the next loop. + paddb mm1, mm0 + movq mm2, [edi+ebx+16] // Load Sub(x) for 3rd 8 bytes + movq [edi+ebx+8], mm1 // Write Raw(x) for 2nd 8 bytes + paddb mm2, mm1 + movq mm3, [edi+ebx+24] // Load Sub(x) for 4th 8 bytes + movq [edi+ebx+16], mm2 // Write Raw(x) for 3rd 8 bytes + paddb mm3, mm2 + movq mm4, [edi+ebx+32] // Load Sub(x) for 5th 8 bytes + movq [edi+ebx+24], mm3 // Write Raw(x) for 4th 8 bytes + paddb mm4, mm3 + movq mm5, [edi+ebx+40] // Load Sub(x) for 6th 8 bytes + movq [edi+ebx+32], mm4 // Write Raw(x) for 5th 8 bytes + paddb mm5, mm4 + movq mm6, [edi+ebx+48] // Load Sub(x) for 7th 8 bytes + movq [edi+ebx+40], mm5 // Write Raw(x) for 6th 8 bytes + paddb mm6, mm5 + movq mm7, [edi+ebx+56] // Load Sub(x) for 8th 8 bytes + movq [edi+ebx+48], mm6 // Write Raw(x) for 7th 8 bytes + add ebx, 64 + paddb mm7, mm6 + cmp ebx, ecx + movq [edi+ebx-8], mm7 // Write Raw(x) for 8th 8 bytes + jb dsub8lp + cmp ebx, MMXLength + jnb dsub8lt8 +dsub8lpA: + movq mm0, [edi+ebx] + add ebx, 8 + paddb mm0, mm7 + cmp ebx, MMXLength + movq [edi+ebx-8], mm0 // use -8 to offset early add to ebx + movq mm7, mm0 // Move calculated Raw(x) data to mm1 to + // be the new Raw(x-bpp) for the next loop + jb dsub8lpA +dsub8lt8: + } // end _asm block + } + break; + + default: // bpp greater than 8 bytes + { + _asm { + mov ebx, diff + mov edi, row + mov esi, edi // lp = row + add edi, bpp // rp = row + bpp +dsubAlp: + movq mm0, [edi+ebx] + movq mm1, [esi+ebx] + add ebx, 8 + paddb mm0, mm1 + cmp ebx, MMXLength + movq [edi+ebx-8], mm0 // mov does not affect flags; -8 to offset + // add ebx + jb dsubAlp + } // end _asm block + } + break; + + } // end switch ( bpp ) + + _asm { + mov ebx, MMXLength + mov edi, row + cmp ebx, FullLength + jnb dsubend + mov esi, edi // lp = row + xor eax, eax + add edi, bpp // rp = row + bpp +dsublp2: + mov al, [esi+ebx] + add [edi+ebx], al + inc ebx + cmp ebx, FullLength + jb dsublp2 +dsubend: + emms // End MMX instructions; prep for possible FP instrs. + } // end _asm block +} + +// Optimized code for PNG Up filter decoder +void /* PRIVATE */ +png_read_filter_row_mmx_up(png_row_infop row_info, png_bytep row, + png_bytep prev_row) +{ + png_uint_32 len; + len = row_info->rowbytes; // # of bytes to filter + _asm { + mov edi, row + // get # of bytes to alignment + mov ecx, edi + xor ebx, ebx + add ecx, 0x7 + xor eax, eax + and ecx, 0xfffffff8 + mov esi, prev_row + sub ecx, edi + jz dupgo + // fix alignment +duplp1: + mov al, [edi+ebx] + add al, [esi+ebx] + inc ebx + cmp ebx, ecx + mov [edi + ebx-1], al // mov does not affect flags; -1 to offset inc ebx + jb duplp1 +dupgo: + mov ecx, len + mov edx, ecx + sub edx, ebx // subtract alignment fix + and edx, 0x0000003f // calc bytes over mult of 64 + sub ecx, edx // drop over bytes from length + // Unrolled loop - use all MMX registers and interleave to reduce + // number of branch instructions (loops) and reduce partial stalls +duploop: + movq mm1, [esi+ebx] + movq mm0, [edi+ebx] + movq mm3, [esi+ebx+8] + paddb mm0, mm1 + movq mm2, [edi+ebx+8] + movq [edi+ebx], mm0 + paddb mm2, mm3 + movq mm5, [esi+ebx+16] + movq [edi+ebx+8], mm2 + movq mm4, [edi+ebx+16] + movq mm7, [esi+ebx+24] + paddb mm4, mm5 + movq mm6, [edi+ebx+24] + movq [edi+ebx+16], mm4 + paddb mm6, mm7 + movq mm1, [esi+ebx+32] + movq [edi+ebx+24], mm6 + movq mm0, [edi+ebx+32] + movq mm3, [esi+ebx+40] + paddb mm0, mm1 + movq mm2, [edi+ebx+40] + movq [edi+ebx+32], mm0 + paddb mm2, mm3 + movq mm5, [esi+ebx+48] + movq [edi+ebx+40], mm2 + movq mm4, [edi+ebx+48] + movq mm7, [esi+ebx+56] + paddb mm4, mm5 + movq mm6, [edi+ebx+56] + movq [edi+ebx+48], mm4 + add ebx, 64 + paddb mm6, mm7 + cmp ebx, ecx + movq [edi+ebx-8], mm6 // (+56)movq does not affect flags; + // -8 to offset add ebx + jb duploop + + cmp edx, 0 // Test for bytes over mult of 64 + jz dupend + + + // 2 lines added by lcreeve@netins.net + // (mail 11 Jul 98 in png-implement list) + cmp edx, 8 //test for less than 8 bytes + jb duplt8 + + + add ecx, edx + and edx, 0x00000007 // calc bytes over mult of 8 + sub ecx, edx // drop over bytes from length + jz duplt8 + // Loop using MMX registers mm0 & mm1 to update 8 bytes simultaneously +duplpA: + movq mm1, [esi+ebx] + movq mm0, [edi+ebx] + add ebx, 8 + paddb mm0, mm1 + cmp ebx, ecx + movq [edi+ebx-8], mm0 // movq does not affect flags; -8 to offset add ebx + jb duplpA + cmp edx, 0 // Test for bytes over mult of 8 + jz dupend +duplt8: + xor eax, eax + add ecx, edx // move over byte count into counter + // Loop using x86 registers to update remaining bytes +duplp2: + mov al, [edi + ebx] + add al, [esi + ebx] + inc ebx + cmp ebx, ecx + mov [edi + ebx-1], al // mov does not affect flags; -1 to offset inc ebx + jb duplp2 +dupend: + // Conversion of filtered row completed + emms // End MMX instructions; prep for possible FP instrs. + } // end _asm block +} + + +// Optimized png_read_filter_row routines +void /* PRIVATE */ +png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep + row, png_bytep prev_row, int filter) +{ +#ifdef PNG_DEBUG + char filnm[10]; +#endif + + if (mmx_supported == 2) { + /* this should have happened in png_init_mmx_flags() already */ + png_warning(png_ptr, "asm_flags may not have been initialized"); + png_mmx_support(); + } + +#ifdef PNG_DEBUG + png_debug(1, "in png_read_filter_row\n"); + switch (filter) + { + case 0: sprintf(filnm, "none"); + break; + case 1: sprintf(filnm, "sub-%s", + (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "MMX" : "x86"); + break; + case 2: sprintf(filnm, "up-%s", + (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP)? "MMX" : "x86"); + break; + case 3: sprintf(filnm, "avg-%s", + (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)? "MMX" : "x86"); + break; + case 4: sprintf(filnm, "Paeth-%s", + (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)? "MMX":"x86"); + break; + default: sprintf(filnm, "unknw"); + break; + } + png_debug2(0,"row=%5d, %s, ", png_ptr->row_number, filnm); + png_debug2(0, "pd=%2d, b=%d, ", (int)row_info->pixel_depth, + (int)((row_info->pixel_depth + 7) >> 3)); + png_debug1(0,"len=%8d, ", row_info->rowbytes); +#endif /* PNG_DEBUG */ + + switch (filter) + { + case PNG_FILTER_VALUE_NONE: + break; + + case PNG_FILTER_VALUE_SUB: + { + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB) && + (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) && + (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold)) + { + png_read_filter_row_mmx_sub(row_info, row); + } + else + { + png_uint_32 i; + png_uint_32 istop = row_info->rowbytes; + png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; + png_bytep rp = row + bpp; + png_bytep lp = row; + + for (i = bpp; i < istop; i++) + { + *rp = (png_byte)(((int)(*rp) + (int)(*lp++)) & 0xff); + rp++; + } + } + break; + } + + case PNG_FILTER_VALUE_UP: + { + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP) && + (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) && + (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold)) + { + png_read_filter_row_mmx_up(row_info, row, prev_row); + } + else + { + png_uint_32 i; + png_uint_32 istop = row_info->rowbytes; + png_bytep rp = row; + png_bytep pp = prev_row; + + for (i = 0; i < istop; ++i) + { + *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff); + rp++; + } + } + break; + } + + case PNG_FILTER_VALUE_AVG: + { + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG) && + (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) && + (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold)) + { + png_read_filter_row_mmx_avg(row_info, row, prev_row); + } + else + { + png_uint_32 i; + png_bytep rp = row; + png_bytep pp = prev_row; + png_bytep lp = row; + png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; + png_uint_32 istop = row_info->rowbytes - bpp; + + for (i = 0; i < bpp; i++) + { + *rp = (png_byte)(((int)(*rp) + + ((int)(*pp++) >> 1)) & 0xff); + rp++; + } + + for (i = 0; i < istop; i++) + { + *rp = (png_byte)(((int)(*rp) + + ((int)(*pp++ + *lp++) >> 1)) & 0xff); + rp++; + } + } + break; + } + + case PNG_FILTER_VALUE_PAETH: + { + if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH) && + (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) && + (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold)) + { + png_read_filter_row_mmx_paeth(row_info, row, prev_row); + } + else + { + png_uint_32 i; + png_bytep rp = row; + png_bytep pp = prev_row; + png_bytep lp = row; + png_bytep cp = prev_row; + png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; + png_uint_32 istop=row_info->rowbytes - bpp; + + for (i = 0; i < bpp; i++) + { + *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff); + rp++; + } + + for (i = 0; i < istop; i++) // use leftover rp,pp + { + int a, b, c, pa, pb, pc, p; + + a = *lp++; + b = *pp++; + c = *cp++; + + p = b - c; + pc = a - c; + +#ifdef PNG_USE_ABS + pa = abs(p); + pb = abs(pc); + pc = abs(p + pc); +#else + pa = p < 0 ? -p : p; + pb = pc < 0 ? -pc : pc; + pc = (p + pc) < 0 ? -(p + pc) : p + pc; +#endif + + /* + if (pa <= pb && pa <= pc) + p = a; + else if (pb <= pc) + p = b; + else + p = c; + */ + + p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c; + + *rp = (png_byte)(((int)(*rp) + p) & 0xff); + rp++; + } + } + break; + } + + default: + png_warning(png_ptr, "Ignoring bad row filter type"); + *row=0; + break; + } +} + +#endif /* PNG_ASSEMBLER_CODE_SUPPORTED && PNG_USE_PNGVCRD */ diff --git a/gtkmm-osx/libpng-1.2.5/pngwio.c b/gtkmm-osx/libpng-1.2.5/pngwio.c new file mode 100644 index 0000000..b39b414 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/pngwio.c @@ -0,0 +1,228 @@ + +/* pngwio.c - functions for data output + * + * libpng 1.2.5 - October 3, 2002 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2002 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + * + * This file provides a location for all output. Users who need + * special handling are expected to write functions that have the same + * arguments as these and perform similar functions, but that possibly + * use different output methods. Note that you shouldn't change these + * functions, but rather write replacement functions and then change + * them at run time with png_set_write_fn(...). + */ + +#define PNG_INTERNAL +#include "png.h" +#ifdef PNG_WRITE_SUPPORTED + +/* Write the data to whatever output you are using. The default routine + writes to a file pointer. Note that this routine sometimes gets called + with very small lengths, so you should implement some kind of simple + buffering if you are using unbuffered writes. This should never be asked + to write more than 64K on a 16 bit machine. */ + +void /* PRIVATE */ +png_write_data(png_structp png_ptr, png_bytep data, png_size_t length) +{ + if (png_ptr->write_data_fn != NULL ) + (*(png_ptr->write_data_fn))(png_ptr, data, length); + else + png_error(png_ptr, "Call to NULL write function"); +} + +#if !defined(PNG_NO_STDIO) +/* This is the function that does the actual writing of data. If you are + not writing to a standard C stream, you should create a replacement + write_data function and use it at run time with png_set_write_fn(), rather + than changing the library. */ +#ifndef USE_FAR_KEYWORD +void PNGAPI +png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) +{ + png_uint_32 check; + +#if defined(_WIN32_WCE) + if ( !WriteFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) ) + check = 0; +#else + check = fwrite(data, 1, length, (png_FILE_p)(png_ptr->io_ptr)); +#endif + if (check != length) + png_error(png_ptr, "Write Error"); +} +#else +/* this is the model-independent version. Since the standard I/O library + can't handle far buffers in the medium and small models, we have to copy + the data. +*/ + +#define NEAR_BUF_SIZE 1024 +#define MIN(a,b) (a <= b ? a : b) + +void PNGAPI +png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) +{ + png_uint_32 check; + png_byte *near_data; /* Needs to be "png_byte *" instead of "png_bytep" */ + png_FILE_p io_ptr; + + /* Check if data really is near. If so, use usual code. */ + near_data = (png_byte *)CVT_PTR_NOCHECK(data); + io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); + if ((png_bytep)near_data == data) + { +#if defined(_WIN32_WCE) + if ( !WriteFile(io_ptr, near_data, length, &check, NULL) ) + check = 0; +#else + check = fwrite(near_data, 1, length, io_ptr); +#endif + } + else + { + png_byte buf[NEAR_BUF_SIZE]; + png_size_t written, remaining, err; + check = 0; + remaining = length; + do + { + written = MIN(NEAR_BUF_SIZE, remaining); + png_memcpy(buf, data, written); /* copy far buffer to near buffer */ +#if defined(_WIN32_WCE) + if ( !WriteFile(io_ptr, buf, written, &err, NULL) ) + err = 0; +#else + err = fwrite(buf, 1, written, io_ptr); +#endif + if (err != written) + break; + else + check += err; + data += written; + remaining -= written; + } + while (remaining != 0); + } + if (check != length) + png_error(png_ptr, "Write Error"); +} + +#endif +#endif + +/* This function is called to output any data pending writing (normally + to disk). After png_flush is called, there should be no data pending + writing in any buffers. */ +#if defined(PNG_WRITE_FLUSH_SUPPORTED) +void /* PRIVATE */ +png_flush(png_structp png_ptr) +{ + if (png_ptr->output_flush_fn != NULL) + (*(png_ptr->output_flush_fn))(png_ptr); +} + +#if !defined(PNG_NO_STDIO) +void PNGAPI +png_default_flush(png_structp png_ptr) +{ +#if !defined(_WIN32_WCE) + png_FILE_p io_ptr; + io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr)); + if (io_ptr != NULL) + fflush(io_ptr); +#endif +} +#endif +#endif + +/* This function allows the application to supply new output functions for + libpng if standard C streams aren't being used. + + This function takes as its arguments: + png_ptr - pointer to a png output data structure + io_ptr - pointer to user supplied structure containing info about + the output functions. May be NULL. + write_data_fn - pointer to a new output function that takes as its + arguments a pointer to a png_struct, a pointer to + data to be written, and a 32-bit unsigned int that is + the number of bytes to be written. The new write + function should call png_error(png_ptr, "Error msg") + to exit and output any fatal error messages. + flush_data_fn - pointer to a new flush function that takes as its + arguments a pointer to a png_struct. After a call to + the flush function, there should be no data in any buffers + or pending transmission. If the output method doesn't do + any buffering of ouput, a function prototype must still be + supplied although it doesn't have to do anything. If + PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile + time, output_flush_fn will be ignored, although it must be + supplied for compatibility. */ +void PNGAPI +png_set_write_fn(png_structp png_ptr, png_voidp io_ptr, + png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn) +{ + png_ptr->io_ptr = io_ptr; + +#if !defined(PNG_NO_STDIO) + if (write_data_fn != NULL) + png_ptr->write_data_fn = write_data_fn; + else + png_ptr->write_data_fn = png_default_write_data; +#else + png_ptr->write_data_fn = write_data_fn; +#endif + +#if defined(PNG_WRITE_FLUSH_SUPPORTED) +#if !defined(PNG_NO_STDIO) + if (output_flush_fn != NULL) + png_ptr->output_flush_fn = output_flush_fn; + else + png_ptr->output_flush_fn = png_default_flush; +#else + png_ptr->output_flush_fn = output_flush_fn; +#endif +#endif /* PNG_WRITE_FLUSH_SUPPORTED */ + + /* It is an error to read while writing a png file */ + if (png_ptr->read_data_fn != NULL) + { + png_ptr->read_data_fn = NULL; + png_warning(png_ptr, + "Attempted to set both read_data_fn and write_data_fn in"); + png_warning(png_ptr, + "the same structure. Resetting read_data_fn to NULL."); + } +} + +#if defined(USE_FAR_KEYWORD) +#if defined(_MSC_VER) +void *png_far_to_near(png_structp png_ptr,png_voidp ptr, int check) +{ + void *near_ptr; + void FAR *far_ptr; + FP_OFF(near_ptr) = FP_OFF(ptr); + far_ptr = (void FAR *)near_ptr; + if(check != 0) + if(FP_SEG(ptr) != FP_SEG(far_ptr)) + png_error(png_ptr,"segment lost in conversion"); + return(near_ptr); +} +# else +void *png_far_to_near(png_structp png_ptr,png_voidp ptr, int check) +{ + void *near_ptr; + void FAR *far_ptr; + near_ptr = (void FAR *)ptr; + far_ptr = (void FAR *)near_ptr; + if(check != 0) + if(far_ptr != ptr) + png_error(png_ptr,"segment lost in conversion"); + return(near_ptr); +} +# endif +# endif +#endif /* PNG_WRITE_SUPPORTED */ diff --git a/gtkmm-osx/libpng-1.2.5/pngwrite.c b/gtkmm-osx/libpng-1.2.5/pngwrite.c new file mode 100644 index 0000000..10c9ea4 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/pngwrite.c @@ -0,0 +1,1450 @@ + +/* pngwrite.c - general routines to write a PNG file + * + * libpng 1.2.5 - October 3, 2002 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2002 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + */ + +/* get internal access to png.h */ +#define PNG_INTERNAL +#include "png.h" +#ifdef PNG_WRITE_SUPPORTED + +/* Writes all the PNG information. This is the suggested way to use the + * library. If you have a new chunk to add, make a function to write it, + * and put it in the correct location here. If you want the chunk written + * after the image data, put it in png_write_end(). I strongly encourage + * you to supply a PNG_INFO_ flag, and check info_ptr->valid before writing + * the chunk, as that will keep the code from breaking if you want to just + * write a plain PNG file. If you have long comments, I suggest writing + * them in png_write_end(), and compressing them. + */ +void PNGAPI +png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr) +{ + png_debug(1, "in png_write_info_before_PLTE\n"); + if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE)) + { + png_write_sig(png_ptr); /* write PNG signature */ +#if defined(PNG_MNG_FEATURES_SUPPORTED) + if((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)&&(png_ptr->mng_features_permitted)) + { + png_warning(png_ptr,"MNG features are not allowed in a PNG datastream\n"); + png_ptr->mng_features_permitted=0; + } +#endif + /* write IHDR information. */ + png_write_IHDR(png_ptr, info_ptr->width, info_ptr->height, + info_ptr->bit_depth, info_ptr->color_type, info_ptr->compression_type, + info_ptr->filter_type, +#if defined(PNG_WRITE_INTERLACING_SUPPORTED) + info_ptr->interlace_type); +#else + 0); +#endif + /* the rest of these check to see if the valid field has the appropriate + flag set, and if it does, writes the chunk. */ +#if defined(PNG_WRITE_gAMA_SUPPORTED) + if (info_ptr->valid & PNG_INFO_gAMA) + { +# ifdef PNG_FLOATING_POINT_SUPPORTED + png_write_gAMA(png_ptr, info_ptr->gamma); +#else +#ifdef PNG_FIXED_POINT_SUPPORTED + png_write_gAMA_fixed(png_ptr, info_ptr->int_gamma); +# endif +#endif + } +#endif +#if defined(PNG_WRITE_sRGB_SUPPORTED) + if (info_ptr->valid & PNG_INFO_sRGB) + png_write_sRGB(png_ptr, (int)info_ptr->srgb_intent); +#endif +#if defined(PNG_WRITE_iCCP_SUPPORTED) + if (info_ptr->valid & PNG_INFO_iCCP) + png_write_iCCP(png_ptr, info_ptr->iccp_name, PNG_COMPRESSION_TYPE_BASE, + info_ptr->iccp_profile, (int)info_ptr->iccp_proflen); +#endif +#if defined(PNG_WRITE_sBIT_SUPPORTED) + if (info_ptr->valid & PNG_INFO_sBIT) + png_write_sBIT(png_ptr, &(info_ptr->sig_bit), info_ptr->color_type); +#endif +#if defined(PNG_WRITE_cHRM_SUPPORTED) + if (info_ptr->valid & PNG_INFO_cHRM) + { +#ifdef PNG_FLOATING_POINT_SUPPORTED + png_write_cHRM(png_ptr, + info_ptr->x_white, info_ptr->y_white, + info_ptr->x_red, info_ptr->y_red, + info_ptr->x_green, info_ptr->y_green, + info_ptr->x_blue, info_ptr->y_blue); +#else +# ifdef PNG_FIXED_POINT_SUPPORTED + png_write_cHRM_fixed(png_ptr, + info_ptr->int_x_white, info_ptr->int_y_white, + info_ptr->int_x_red, info_ptr->int_y_red, + info_ptr->int_x_green, info_ptr->int_y_green, + info_ptr->int_x_blue, info_ptr->int_y_blue); +# endif +#endif + } +#endif +#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) + if (info_ptr->unknown_chunks_num) + { + png_unknown_chunk *up; + + png_debug(5, "writing extra chunks\n"); + + for (up = info_ptr->unknown_chunks; + up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; + up++) + { + int keep=png_handle_as_unknown(png_ptr, up->name); + if (keep != HANDLE_CHUNK_NEVER && + up->location && (!(up->location & PNG_HAVE_PLTE)) && + ((up->name[3] & 0x20) || keep == HANDLE_CHUNK_ALWAYS || + (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS))) + { + png_write_chunk(png_ptr, up->name, up->data, up->size); + } + } + } +#endif + png_ptr->mode |= PNG_WROTE_INFO_BEFORE_PLTE; + } +} + +void PNGAPI +png_write_info(png_structp png_ptr, png_infop info_ptr) +{ +#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) + int i; +#endif + + png_debug(1, "in png_write_info\n"); + + png_write_info_before_PLTE(png_ptr, info_ptr); + + if (info_ptr->valid & PNG_INFO_PLTE) + png_write_PLTE(png_ptr, info_ptr->palette, + (png_uint_32)info_ptr->num_palette); + else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + png_error(png_ptr, "Valid palette required for paletted images\n"); + +#if defined(PNG_WRITE_tRNS_SUPPORTED) + if (info_ptr->valid & PNG_INFO_tRNS) + { +#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) + /* invert the alpha channel (in tRNS) */ + if ((png_ptr->transformations & PNG_INVERT_ALPHA) && + info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + int j; + for (j=0; j<(int)info_ptr->num_trans; j++) + info_ptr->trans[j] = (png_byte)(255 - info_ptr->trans[j]); + } +#endif + png_write_tRNS(png_ptr, info_ptr->trans, &(info_ptr->trans_values), + info_ptr->num_trans, info_ptr->color_type); + } +#endif +#if defined(PNG_WRITE_bKGD_SUPPORTED) + if (info_ptr->valid & PNG_INFO_bKGD) + png_write_bKGD(png_ptr, &(info_ptr->background), info_ptr->color_type); +#endif +#if defined(PNG_WRITE_hIST_SUPPORTED) + if (info_ptr->valid & PNG_INFO_hIST) + png_write_hIST(png_ptr, info_ptr->hist, info_ptr->num_palette); +#endif +#if defined(PNG_WRITE_oFFs_SUPPORTED) + if (info_ptr->valid & PNG_INFO_oFFs) + png_write_oFFs(png_ptr, info_ptr->x_offset, info_ptr->y_offset, + info_ptr->offset_unit_type); +#endif +#if defined(PNG_WRITE_pCAL_SUPPORTED) + if (info_ptr->valid & PNG_INFO_pCAL) + png_write_pCAL(png_ptr, info_ptr->pcal_purpose, info_ptr->pcal_X0, + info_ptr->pcal_X1, info_ptr->pcal_type, info_ptr->pcal_nparams, + info_ptr->pcal_units, info_ptr->pcal_params); +#endif +#if defined(PNG_WRITE_sCAL_SUPPORTED) + if (info_ptr->valid & PNG_INFO_sCAL) +#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO) + png_write_sCAL(png_ptr, (int)info_ptr->scal_unit, + info_ptr->scal_pixel_width, info_ptr->scal_pixel_height); +#else +#ifdef PNG_FIXED_POINT_SUPPORTED + png_write_sCAL_s(png_ptr, (int)info_ptr->scal_unit, + info_ptr->scal_s_width, info_ptr->scal_s_height); +#else + png_warning(png_ptr, + "png_write_sCAL not supported; sCAL chunk not written.\n"); +#endif +#endif +#endif +#if defined(PNG_WRITE_pHYs_SUPPORTED) + if (info_ptr->valid & PNG_INFO_pHYs) + png_write_pHYs(png_ptr, info_ptr->x_pixels_per_unit, + info_ptr->y_pixels_per_unit, info_ptr->phys_unit_type); +#endif +#if defined(PNG_WRITE_tIME_SUPPORTED) + if (info_ptr->valid & PNG_INFO_tIME) + { + png_write_tIME(png_ptr, &(info_ptr->mod_time)); + png_ptr->mode |= PNG_WROTE_tIME; + } +#endif +#if defined(PNG_WRITE_sPLT_SUPPORTED) + if (info_ptr->valid & PNG_INFO_sPLT) + for (i = 0; i < (int)info_ptr->splt_palettes_num; i++) + png_write_sPLT(png_ptr, info_ptr->splt_palettes + i); +#endif +#if defined(PNG_WRITE_TEXT_SUPPORTED) + /* Check to see if we need to write text chunks */ + for (i = 0; i < info_ptr->num_text; i++) + { + png_debug2(2, "Writing header text chunk %d, type %d\n", i, + info_ptr->text[i].compression); + /* an internationalized chunk? */ + if (info_ptr->text[i].compression > 0) + { +#if defined(PNG_WRITE_iTXt_SUPPORTED) + /* write international chunk */ + png_write_iTXt(png_ptr, + info_ptr->text[i].compression, + info_ptr->text[i].key, + info_ptr->text[i].lang, + info_ptr->text[i].lang_key, + info_ptr->text[i].text); +#else + png_warning(png_ptr, "Unable to write international text\n"); +#endif + /* Mark this chunk as written */ + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; + } + /* If we want a compressed text chunk */ + else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_zTXt) + { +#if defined(PNG_WRITE_zTXt_SUPPORTED) + /* write compressed chunk */ + png_write_zTXt(png_ptr, info_ptr->text[i].key, + info_ptr->text[i].text, 0, + info_ptr->text[i].compression); +#else + png_warning(png_ptr, "Unable to write compressed text\n"); +#endif + /* Mark this chunk as written */ + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR; + } + else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE) + { +#if defined(PNG_WRITE_tEXt_SUPPORTED) + /* write uncompressed chunk */ + png_write_tEXt(png_ptr, info_ptr->text[i].key, + info_ptr->text[i].text, + 0); +#else + png_warning(png_ptr, "Unable to write uncompressed text\n"); +#endif + /* Mark this chunk as written */ + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; + } + } +#endif +#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) + if (info_ptr->unknown_chunks_num) + { + png_unknown_chunk *up; + + png_debug(5, "writing extra chunks\n"); + + for (up = info_ptr->unknown_chunks; + up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; + up++) + { + int keep=png_handle_as_unknown(png_ptr, up->name); + if (keep != HANDLE_CHUNK_NEVER && + up->location && (up->location & PNG_HAVE_PLTE) && + !(up->location & PNG_HAVE_IDAT) && + ((up->name[3] & 0x20) || keep == HANDLE_CHUNK_ALWAYS || + (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS))) + { + png_write_chunk(png_ptr, up->name, up->data, up->size); + } + } + } +#endif +} + +/* Writes the end of the PNG file. If you don't want to write comments or + * time information, you can pass NULL for info. If you already wrote these + * in png_write_info(), do not write them again here. If you have long + * comments, I suggest writing them here, and compressing them. + */ +void PNGAPI +png_write_end(png_structp png_ptr, png_infop info_ptr) +{ + png_debug(1, "in png_write_end\n"); + if (!(png_ptr->mode & PNG_HAVE_IDAT)) + png_error(png_ptr, "No IDATs written into file"); + + /* see if user wants us to write information chunks */ + if (info_ptr != NULL) + { +#if defined(PNG_WRITE_TEXT_SUPPORTED) + int i; /* local index variable */ +#endif +#if defined(PNG_WRITE_tIME_SUPPORTED) + /* check to see if user has supplied a time chunk */ + if ((info_ptr->valid & PNG_INFO_tIME) && + !(png_ptr->mode & PNG_WROTE_tIME)) + png_write_tIME(png_ptr, &(info_ptr->mod_time)); +#endif +#if defined(PNG_WRITE_TEXT_SUPPORTED) + /* loop through comment chunks */ + for (i = 0; i < info_ptr->num_text; i++) + { + png_debug2(2, "Writing trailer text chunk %d, type %d\n", i, + info_ptr->text[i].compression); + /* an internationalized chunk? */ + if (info_ptr->text[i].compression > 0) + { +#if defined(PNG_WRITE_iTXt_SUPPORTED) + /* write international chunk */ + png_write_iTXt(png_ptr, + info_ptr->text[i].compression, + info_ptr->text[i].key, + info_ptr->text[i].lang, + info_ptr->text[i].lang_key, + info_ptr->text[i].text); +#else + png_warning(png_ptr, "Unable to write international text\n"); +#endif + /* Mark this chunk as written */ + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; + } + else if (info_ptr->text[i].compression >= PNG_TEXT_COMPRESSION_zTXt) + { +#if defined(PNG_WRITE_zTXt_SUPPORTED) + /* write compressed chunk */ + png_write_zTXt(png_ptr, info_ptr->text[i].key, + info_ptr->text[i].text, 0, + info_ptr->text[i].compression); +#else + png_warning(png_ptr, "Unable to write compressed text\n"); +#endif + /* Mark this chunk as written */ + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR; + } + else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE) + { +#if defined(PNG_WRITE_tEXt_SUPPORTED) + /* write uncompressed chunk */ + png_write_tEXt(png_ptr, info_ptr->text[i].key, + info_ptr->text[i].text, 0); +#else + png_warning(png_ptr, "Unable to write uncompressed text\n"); +#endif + + /* Mark this chunk as written */ + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; + } + } +#endif +#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) + if (info_ptr->unknown_chunks_num) + { + png_unknown_chunk *up; + + png_debug(5, "writing extra chunks\n"); + + for (up = info_ptr->unknown_chunks; + up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; + up++) + { + int keep=png_handle_as_unknown(png_ptr, up->name); + if (keep != HANDLE_CHUNK_NEVER && + up->location && (up->location & PNG_AFTER_IDAT) && + ((up->name[3] & 0x20) || keep == HANDLE_CHUNK_ALWAYS || + (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS))) + { + png_write_chunk(png_ptr, up->name, up->data, up->size); + } + } + } +#endif + } + + png_ptr->mode |= PNG_AFTER_IDAT; + + /* write end of PNG file */ + png_write_IEND(png_ptr); +#if 0 +/* This flush, added in libpng-1.0.8, causes some applications to crash + because they do not set png_ptr->output_flush_fn */ + png_flush(png_ptr); +#endif +} + +#if defined(PNG_WRITE_tIME_SUPPORTED) +#if !defined(_WIN32_WCE) +/* "time.h" functions are not supported on WindowsCE */ +void PNGAPI +png_convert_from_struct_tm(png_timep ptime, struct tm FAR * ttime) +{ + png_debug(1, "in png_convert_from_struct_tm\n"); + ptime->year = (png_uint_16)(1900 + ttime->tm_year); + ptime->month = (png_byte)(ttime->tm_mon + 1); + ptime->day = (png_byte)ttime->tm_mday; + ptime->hour = (png_byte)ttime->tm_hour; + ptime->minute = (png_byte)ttime->tm_min; + ptime->second = (png_byte)ttime->tm_sec; +} + +void PNGAPI +png_convert_from_time_t(png_timep ptime, time_t ttime) +{ + struct tm *tbuf; + + png_debug(1, "in png_convert_from_time_t\n"); + tbuf = gmtime(&ttime); + png_convert_from_struct_tm(ptime, tbuf); +} +#endif +#endif + +/* Initialize png_ptr structure, and allocate any memory needed */ +png_structp PNGAPI +png_create_write_struct(png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn) +{ +#ifdef PNG_USER_MEM_SUPPORTED + return (png_create_write_struct_2(user_png_ver, error_ptr, error_fn, + warn_fn, png_voidp_NULL, png_malloc_ptr_NULL, png_free_ptr_NULL)); +} + +/* Alternate initialize png_ptr structure, and allocate any memory needed */ +png_structp PNGAPI +png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn) +{ +#endif /* PNG_USER_MEM_SUPPORTED */ + png_structp png_ptr; +#ifdef PNG_SETJMP_SUPPORTED +#ifdef USE_FAR_KEYWORD + jmp_buf jmpbuf; +#endif +#endif + int i; + png_debug(1, "in png_create_write_struct\n"); +#ifdef PNG_USER_MEM_SUPPORTED + png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG, + (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr); +#else + png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG); +#endif /* PNG_USER_MEM_SUPPORTED */ + if (png_ptr == NULL) + return (NULL); + +#if !defined(PNG_1_0_X) +#ifdef PNG_ASSEMBLER_CODE_SUPPORTED + png_init_mmx_flags(png_ptr); /* 1.2.0 addition */ +#endif +#endif /* PNG_1_0_X */ + +#ifdef PNG_SETJMP_SUPPORTED +#ifdef USE_FAR_KEYWORD + if (setjmp(jmpbuf)) +#else + if (setjmp(png_ptr->jmpbuf)) +#endif + { + png_free(png_ptr, png_ptr->zbuf); + png_ptr->zbuf=NULL; + png_destroy_struct(png_ptr); + return (NULL); + } +#ifdef USE_FAR_KEYWORD + png_memcpy(png_ptr->jmpbuf,jmpbuf,sizeof(jmp_buf)); +#endif +#endif + +#ifdef PNG_USER_MEM_SUPPORTED + png_set_mem_fn(png_ptr, mem_ptr, malloc_fn, free_fn); +#endif /* PNG_USER_MEM_SUPPORTED */ + png_set_error_fn(png_ptr, error_ptr, error_fn, warn_fn); + + i=0; + do + { + if(user_png_ver[i] != png_libpng_ver[i]) + png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; + } while (png_libpng_ver[i++]); + + if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH) + { + /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so + * we must recompile any applications that use any older library version. + * For versions after libpng 1.0, we will be compatible, so we need + * only check the first digit. + */ + if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] || + (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) || + (user_png_ver[0] == '0' && user_png_ver[2] < '9')) + { +#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) + char msg[80]; + if (user_png_ver) + { + sprintf(msg, "Application was compiled with png.h from libpng-%.20s", + user_png_ver); + png_warning(png_ptr, msg); + } + sprintf(msg, "Application is running with png.c from libpng-%.20s", + png_libpng_ver); + png_warning(png_ptr, msg); +#endif +#ifdef PNG_ERROR_NUMBERS_SUPPORTED + png_ptr->flags=0; +#endif + png_error(png_ptr, + "Incompatible libpng version in application and library"); + } + } + + /* initialize zbuf - compression buffer */ + png_ptr->zbuf_size = PNG_ZBUF_SIZE; + png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, + (png_uint_32)png_ptr->zbuf_size); + + png_set_write_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL, + png_flush_ptr_NULL); + +#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) + png_set_filter_heuristics(png_ptr, PNG_FILTER_HEURISTIC_DEFAULT, + 1, png_doublep_NULL, png_doublep_NULL); +#endif + +#ifdef PNG_SETJMP_SUPPORTED +/* Applications that neglect to set up their own setjmp() and then encounter + a png_error() will longjmp here. Since the jmpbuf is then meaningless we + abort instead of returning. */ +#ifdef USE_FAR_KEYWORD + if (setjmp(jmpbuf)) + PNG_ABORT(); + png_memcpy(png_ptr->jmpbuf,jmpbuf,sizeof(jmp_buf)); +#else + if (setjmp(png_ptr->jmpbuf)) + PNG_ABORT(); +#endif +#endif + return (png_ptr); +} + +/* Initialize png_ptr structure, and allocate any memory needed */ +#undef png_write_init +void PNGAPI +png_write_init(png_structp png_ptr) +{ + /* We only come here via pre-1.0.7-compiled applications */ + png_write_init_2(png_ptr, "1.0.6 or earlier", 0, 0); +} + +void PNGAPI +png_write_init_2(png_structp png_ptr, png_const_charp user_png_ver, + png_size_t png_struct_size, png_size_t png_info_size) +{ + /* We only come here via pre-1.0.12-compiled applications */ +#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) + if(sizeof(png_struct) > png_struct_size || sizeof(png_info) > png_info_size) + { + char msg[80]; + png_ptr->warning_fn=NULL; + if (user_png_ver) + { + sprintf(msg, "Application was compiled with png.h from libpng-%.20s", + user_png_ver); + png_warning(png_ptr, msg); + } + sprintf(msg, "Application is running with png.c from libpng-%.20s", + png_libpng_ver); + png_warning(png_ptr, msg); + } +#endif + if(sizeof(png_struct) > png_struct_size) + { + png_ptr->error_fn=NULL; +#ifdef PNG_ERROR_NUMBERS_SUPPORTED + png_ptr->flags=0; +#endif + png_error(png_ptr, + "The png struct allocated by the application for writing is too small."); + } + if(sizeof(png_info) > png_info_size) + { + png_ptr->error_fn=NULL; +#ifdef PNG_ERROR_NUMBERS_SUPPORTED + png_ptr->flags=0; +#endif + png_error(png_ptr, + "The info struct allocated by the application for writing is too small."); + } + png_write_init_3(&png_ptr, user_png_ver, png_struct_size); +} + + +void PNGAPI +png_write_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver, + png_size_t png_struct_size) +{ + png_structp png_ptr=*ptr_ptr; +#ifdef PNG_SETJMP_SUPPORTED + jmp_buf tmp_jmp; /* to save current jump buffer */ +#endif + int i = 0; + do + { + if (user_png_ver[i] != png_libpng_ver[i]) + { +#ifdef PNG_LEGACY_SUPPORTED + png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; +#else + png_ptr->warning_fn=NULL; + png_warning(png_ptr, + "Application uses deprecated png_write_init() and should be recompiled."); + break; +#endif + } + } while (png_libpng_ver[i++]); + + png_debug(1, "in png_write_init_3\n"); + +#ifdef PNG_SETJMP_SUPPORTED + /* save jump buffer and error functions */ + png_memcpy(tmp_jmp, png_ptr->jmpbuf, sizeof (jmp_buf)); +#endif + + if (sizeof(png_struct) > png_struct_size) + { + png_destroy_struct(png_ptr); + png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG); + *ptr_ptr = png_ptr; + } + + /* reset all variables to 0 */ + png_memset(png_ptr, 0, sizeof (png_struct)); + +#if !defined(PNG_1_0_X) +#ifdef PNG_ASSEMBLER_CODE_SUPPORTED + png_init_mmx_flags(png_ptr); /* 1.2.0 addition */ +#endif +#endif /* PNG_1_0_X */ + +#ifdef PNG_SETJMP_SUPPORTED + /* restore jump buffer */ + png_memcpy(png_ptr->jmpbuf, tmp_jmp, sizeof (jmp_buf)); +#endif + + png_set_write_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL, + png_flush_ptr_NULL); + + /* initialize zbuf - compression buffer */ + png_ptr->zbuf_size = PNG_ZBUF_SIZE; + png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, + (png_uint_32)png_ptr->zbuf_size); + +#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) + png_set_filter_heuristics(png_ptr, PNG_FILTER_HEURISTIC_DEFAULT, + 1, png_doublep_NULL, png_doublep_NULL); +#endif +} + +/* Write a few rows of image data. If the image is interlaced, + * either you will have to write the 7 sub images, or, if you + * have called png_set_interlace_handling(), you will have to + * "write" the image seven times. + */ +void PNGAPI +png_write_rows(png_structp png_ptr, png_bytepp row, + png_uint_32 num_rows) +{ + png_uint_32 i; /* row counter */ + png_bytepp rp; /* row pointer */ + + png_debug(1, "in png_write_rows\n"); + /* loop through the rows */ + for (i = 0, rp = row; i < num_rows; i++, rp++) + { + png_write_row(png_ptr, *rp); + } +} + +/* Write the image. You only need to call this function once, even + * if you are writing an interlaced image. + */ +void PNGAPI +png_write_image(png_structp png_ptr, png_bytepp image) +{ + png_uint_32 i; /* row index */ + int pass, num_pass; /* pass variables */ + png_bytepp rp; /* points to current row */ + + png_debug(1, "in png_write_image\n"); +#if defined(PNG_WRITE_INTERLACING_SUPPORTED) + /* intialize interlace handling. If image is not interlaced, + this will set pass to 1 */ + num_pass = png_set_interlace_handling(png_ptr); +#else + num_pass = 1; +#endif + /* loop through passes */ + for (pass = 0; pass < num_pass; pass++) + { + /* loop through image */ + for (i = 0, rp = image; i < png_ptr->height; i++, rp++) + { + png_write_row(png_ptr, *rp); + } + } +} + +/* called by user to write a row of image data */ +void PNGAPI +png_write_row(png_structp png_ptr, png_bytep row) +{ + png_debug2(1, "in png_write_row (row %ld, pass %d)\n", + png_ptr->row_number, png_ptr->pass); + /* initialize transformations and other stuff if first time */ + if (png_ptr->row_number == 0 && png_ptr->pass == 0) + { + /* make sure we wrote the header info */ + if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE)) + png_error(png_ptr, + "png_write_info was never called before png_write_row."); + + /* check for transforms that have been set but were defined out */ +#if !defined(PNG_WRITE_INVERT_SUPPORTED) && defined(PNG_READ_INVERT_SUPPORTED) + if (png_ptr->transformations & PNG_INVERT_MONO) + png_warning(png_ptr, "PNG_WRITE_INVERT_SUPPORTED is not defined."); +#endif +#if !defined(PNG_WRITE_FILLER_SUPPORTED) && defined(PNG_READ_FILLER_SUPPORTED) + if (png_ptr->transformations & PNG_FILLER) + png_warning(png_ptr, "PNG_WRITE_FILLER_SUPPORTED is not defined."); +#endif +#if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && defined(PNG_READ_PACKSWAP_SUPPORTED) + if (png_ptr->transformations & PNG_PACKSWAP) + png_warning(png_ptr, "PNG_WRITE_PACKSWAP_SUPPORTED is not defined."); +#endif +#if !defined(PNG_WRITE_PACK_SUPPORTED) && defined(PNG_READ_PACK_SUPPORTED) + if (png_ptr->transformations & PNG_PACK) + png_warning(png_ptr, "PNG_WRITE_PACK_SUPPORTED is not defined."); +#endif +#if !defined(PNG_WRITE_SHIFT_SUPPORTED) && defined(PNG_READ_SHIFT_SUPPORTED) + if (png_ptr->transformations & PNG_SHIFT) + png_warning(png_ptr, "PNG_WRITE_SHIFT_SUPPORTED is not defined."); +#endif +#if !defined(PNG_WRITE_BGR_SUPPORTED) && defined(PNG_READ_BGR_SUPPORTED) + if (png_ptr->transformations & PNG_BGR) + png_warning(png_ptr, "PNG_WRITE_BGR_SUPPORTED is not defined."); +#endif +#if !defined(PNG_WRITE_SWAP_SUPPORTED) && defined(PNG_READ_SWAP_SUPPORTED) + if (png_ptr->transformations & PNG_SWAP_BYTES) + png_warning(png_ptr, "PNG_WRITE_SWAP_SUPPORTED is not defined."); +#endif + + png_write_start_row(png_ptr); + } + +#if defined(PNG_WRITE_INTERLACING_SUPPORTED) + /* if interlaced and not interested in row, return */ + if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) + { + switch (png_ptr->pass) + { + case 0: + if (png_ptr->row_number & 0x07) + { + png_write_finish_row(png_ptr); + return; + } + break; + case 1: + if ((png_ptr->row_number & 0x07) || png_ptr->width < 5) + { + png_write_finish_row(png_ptr); + return; + } + break; + case 2: + if ((png_ptr->row_number & 0x07) != 4) + { + png_write_finish_row(png_ptr); + return; + } + break; + case 3: + if ((png_ptr->row_number & 0x03) || png_ptr->width < 3) + { + png_write_finish_row(png_ptr); + return; + } + break; + case 4: + if ((png_ptr->row_number & 0x03) != 2) + { + png_write_finish_row(png_ptr); + return; + } + break; + case 5: + if ((png_ptr->row_number & 0x01) || png_ptr->width < 2) + { + png_write_finish_row(png_ptr); + return; + } + break; + case 6: + if (!(png_ptr->row_number & 0x01)) + { + png_write_finish_row(png_ptr); + return; + } + break; + } + } +#endif + + /* set up row info for transformations */ + png_ptr->row_info.color_type = png_ptr->color_type; + png_ptr->row_info.width = png_ptr->usr_width; + png_ptr->row_info.channels = png_ptr->usr_channels; + png_ptr->row_info.bit_depth = png_ptr->usr_bit_depth; + png_ptr->row_info.pixel_depth = (png_byte)(png_ptr->row_info.bit_depth * + png_ptr->row_info.channels); + + png_ptr->row_info.rowbytes = ((png_ptr->row_info.width * + (png_uint_32)png_ptr->row_info.pixel_depth + 7) >> 3); + + png_debug1(3, "row_info->color_type = %d\n", png_ptr->row_info.color_type); + png_debug1(3, "row_info->width = %lu\n", png_ptr->row_info.width); + png_debug1(3, "row_info->channels = %d\n", png_ptr->row_info.channels); + png_debug1(3, "row_info->bit_depth = %d\n", png_ptr->row_info.bit_depth); + png_debug1(3, "row_info->pixel_depth = %d\n", png_ptr->row_info.pixel_depth); + png_debug1(3, "row_info->rowbytes = %lu\n", png_ptr->row_info.rowbytes); + + /* Copy user's row into buffer, leaving room for filter byte. */ + png_memcpy_check(png_ptr, png_ptr->row_buf + 1, row, + png_ptr->row_info.rowbytes); + +#if defined(PNG_WRITE_INTERLACING_SUPPORTED) + /* handle interlacing */ + if (png_ptr->interlaced && png_ptr->pass < 6 && + (png_ptr->transformations & PNG_INTERLACE)) + { + png_do_write_interlace(&(png_ptr->row_info), + png_ptr->row_buf + 1, png_ptr->pass); + /* this should always get caught above, but still ... */ + if (!(png_ptr->row_info.width)) + { + png_write_finish_row(png_ptr); + return; + } + } +#endif + + /* handle other transformations */ + if (png_ptr->transformations) + png_do_write_transformations(png_ptr); + +#if defined(PNG_MNG_FEATURES_SUPPORTED) + /* Write filter_method 64 (intrapixel differencing) only if + * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and + * 2. Libpng did not write a PNG signature (this filter_method is only + * used in PNG datastreams that are embedded in MNG datastreams) and + * 3. The application called png_permit_mng_features with a mask that + * included PNG_FLAG_MNG_FILTER_64 and + * 4. The filter_method is 64 and + * 5. The color_type is RGB or RGBA + */ + if((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && + (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING)) + { + /* Intrapixel differencing */ + png_do_write_intrapixel(&(png_ptr->row_info), png_ptr->row_buf + 1); + } +#endif + + /* Find a filter if necessary, filter the row and write it out. */ + png_write_find_filter(png_ptr, &(png_ptr->row_info)); + + if (png_ptr->write_row_fn != NULL) + (*(png_ptr->write_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass); +} + +#if defined(PNG_WRITE_FLUSH_SUPPORTED) +/* Set the automatic flush interval or 0 to turn flushing off */ +void PNGAPI +png_set_flush(png_structp png_ptr, int nrows) +{ + png_debug(1, "in png_set_flush\n"); + png_ptr->flush_dist = (nrows < 0 ? 0 : nrows); +} + +/* flush the current output buffers now */ +void PNGAPI +png_write_flush(png_structp png_ptr) +{ + int wrote_IDAT; + + png_debug(1, "in png_write_flush\n"); + /* We have already written out all of the data */ + if (png_ptr->row_number >= png_ptr->num_rows) + return; + + do + { + int ret; + + /* compress the data */ + ret = deflate(&png_ptr->zstream, Z_SYNC_FLUSH); + wrote_IDAT = 0; + + /* check for compression errors */ + if (ret != Z_OK) + { + if (png_ptr->zstream.msg != NULL) + png_error(png_ptr, png_ptr->zstream.msg); + else + png_error(png_ptr, "zlib error"); + } + + if (!(png_ptr->zstream.avail_out)) + { + /* write the IDAT and reset the zlib output buffer */ + png_write_IDAT(png_ptr, png_ptr->zbuf, + png_ptr->zbuf_size); + png_ptr->zstream.next_out = png_ptr->zbuf; + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + wrote_IDAT = 1; + } + } while(wrote_IDAT == 1); + + /* If there is any data left to be output, write it into a new IDAT */ + if (png_ptr->zbuf_size != png_ptr->zstream.avail_out) + { + /* write the IDAT and reset the zlib output buffer */ + png_write_IDAT(png_ptr, png_ptr->zbuf, + png_ptr->zbuf_size - png_ptr->zstream.avail_out); + png_ptr->zstream.next_out = png_ptr->zbuf; + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + } + png_ptr->flush_rows = 0; + png_flush(png_ptr); +} +#endif /* PNG_WRITE_FLUSH_SUPPORTED */ + +/* free all memory used by the write */ +void PNGAPI +png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr) +{ + png_structp png_ptr = NULL; + png_infop info_ptr = NULL; +#ifdef PNG_USER_MEM_SUPPORTED + png_free_ptr free_fn = NULL; + png_voidp mem_ptr = NULL; +#endif + + png_debug(1, "in png_destroy_write_struct\n"); + if (png_ptr_ptr != NULL) + { + png_ptr = *png_ptr_ptr; +#ifdef PNG_USER_MEM_SUPPORTED + free_fn = png_ptr->free_fn; + mem_ptr = png_ptr->mem_ptr; +#endif + } + + if (info_ptr_ptr != NULL) + info_ptr = *info_ptr_ptr; + + if (info_ptr != NULL) + { + png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1); + +#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) + if (png_ptr->num_chunk_list) + { + png_free(png_ptr, png_ptr->chunk_list); + png_ptr->chunk_list=NULL; + png_ptr->num_chunk_list=0; + } +#endif + +#ifdef PNG_USER_MEM_SUPPORTED + png_destroy_struct_2((png_voidp)info_ptr, (png_free_ptr)free_fn, + (png_voidp)mem_ptr); +#else + png_destroy_struct((png_voidp)info_ptr); +#endif + *info_ptr_ptr = NULL; + } + + if (png_ptr != NULL) + { + png_write_destroy(png_ptr); +#ifdef PNG_USER_MEM_SUPPORTED + png_destroy_struct_2((png_voidp)png_ptr, (png_free_ptr)free_fn, + (png_voidp)mem_ptr); +#else + png_destroy_struct((png_voidp)png_ptr); +#endif + *png_ptr_ptr = NULL; + } +} + + +/* Free any memory used in png_ptr struct (old method) */ +void /* PRIVATE */ +png_write_destroy(png_structp png_ptr) +{ +#ifdef PNG_SETJMP_SUPPORTED + jmp_buf tmp_jmp; /* save jump buffer */ +#endif + png_error_ptr error_fn; + png_error_ptr warning_fn; + png_voidp error_ptr; +#ifdef PNG_USER_MEM_SUPPORTED + png_free_ptr free_fn; +#endif + + png_debug(1, "in png_write_destroy\n"); + /* free any memory zlib uses */ + deflateEnd(&png_ptr->zstream); + + /* free our memory. png_free checks NULL for us. */ + png_free(png_ptr, png_ptr->zbuf); + png_free(png_ptr, png_ptr->row_buf); + png_free(png_ptr, png_ptr->prev_row); + png_free(png_ptr, png_ptr->sub_row); + png_free(png_ptr, png_ptr->up_row); + png_free(png_ptr, png_ptr->avg_row); + png_free(png_ptr, png_ptr->paeth_row); + +#if defined(PNG_TIME_RFC1123_SUPPORTED) + png_free(png_ptr, png_ptr->time_buffer); +#endif + +#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) + png_free(png_ptr, png_ptr->prev_filters); + png_free(png_ptr, png_ptr->filter_weights); + png_free(png_ptr, png_ptr->inv_filter_weights); + png_free(png_ptr, png_ptr->filter_costs); + png_free(png_ptr, png_ptr->inv_filter_costs); +#endif + +#ifdef PNG_SETJMP_SUPPORTED + /* reset structure */ + png_memcpy(tmp_jmp, png_ptr->jmpbuf, sizeof (jmp_buf)); +#endif + + error_fn = png_ptr->error_fn; + warning_fn = png_ptr->warning_fn; + error_ptr = png_ptr->error_ptr; +#ifdef PNG_USER_MEM_SUPPORTED + free_fn = png_ptr->free_fn; +#endif + + png_memset(png_ptr, 0, sizeof (png_struct)); + + png_ptr->error_fn = error_fn; + png_ptr->warning_fn = warning_fn; + png_ptr->error_ptr = error_ptr; +#ifdef PNG_USER_MEM_SUPPORTED + png_ptr->free_fn = free_fn; +#endif + +#ifdef PNG_SETJMP_SUPPORTED + png_memcpy(png_ptr->jmpbuf, tmp_jmp, sizeof (jmp_buf)); +#endif +} + +/* Allow the application to select one or more row filters to use. */ +void PNGAPI +png_set_filter(png_structp png_ptr, int method, int filters) +{ + png_debug(1, "in png_set_filter\n"); +#if defined(PNG_MNG_FEATURES_SUPPORTED) + if((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && + (method == PNG_INTRAPIXEL_DIFFERENCING)) + method = PNG_FILTER_TYPE_BASE; +#endif + if (method == PNG_FILTER_TYPE_BASE) + { + switch (filters & (PNG_ALL_FILTERS | 0x07)) + { + case 5: + case 6: + case 7: png_warning(png_ptr, "Unknown row filter for method 0"); + case PNG_FILTER_VALUE_NONE: png_ptr->do_filter=PNG_FILTER_NONE; break; + case PNG_FILTER_VALUE_SUB: png_ptr->do_filter=PNG_FILTER_SUB; break; + case PNG_FILTER_VALUE_UP: png_ptr->do_filter=PNG_FILTER_UP; break; + case PNG_FILTER_VALUE_AVG: png_ptr->do_filter=PNG_FILTER_AVG; break; + case PNG_FILTER_VALUE_PAETH: png_ptr->do_filter=PNG_FILTER_PAETH;break; + default: png_ptr->do_filter = (png_byte)filters; break; + } + + /* If we have allocated the row_buf, this means we have already started + * with the image and we should have allocated all of the filter buffers + * that have been selected. If prev_row isn't already allocated, then + * it is too late to start using the filters that need it, since we + * will be missing the data in the previous row. If an application + * wants to start and stop using particular filters during compression, + * it should start out with all of the filters, and then add and + * remove them after the start of compression. + */ + if (png_ptr->row_buf != NULL) + { + if ((png_ptr->do_filter & PNG_FILTER_SUB) && png_ptr->sub_row == NULL) + { + png_ptr->sub_row = (png_bytep)png_malloc(png_ptr, + (png_ptr->rowbytes + 1)); + png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB; + } + + if ((png_ptr->do_filter & PNG_FILTER_UP) && png_ptr->up_row == NULL) + { + if (png_ptr->prev_row == NULL) + { + png_warning(png_ptr, "Can't add Up filter after starting"); + png_ptr->do_filter &= ~PNG_FILTER_UP; + } + else + { + png_ptr->up_row = (png_bytep)png_malloc(png_ptr, + (png_ptr->rowbytes + 1)); + png_ptr->up_row[0] = PNG_FILTER_VALUE_UP; + } + } + + if ((png_ptr->do_filter & PNG_FILTER_AVG) && png_ptr->avg_row == NULL) + { + if (png_ptr->prev_row == NULL) + { + png_warning(png_ptr, "Can't add Average filter after starting"); + png_ptr->do_filter &= ~PNG_FILTER_AVG; + } + else + { + png_ptr->avg_row = (png_bytep)png_malloc(png_ptr, + (png_ptr->rowbytes + 1)); + png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG; + } + } + + if ((png_ptr->do_filter & PNG_FILTER_PAETH) && + png_ptr->paeth_row == NULL) + { + if (png_ptr->prev_row == NULL) + { + png_warning(png_ptr, "Can't add Paeth filter after starting"); + png_ptr->do_filter &= (png_byte)(~PNG_FILTER_PAETH); + } + else + { + png_ptr->paeth_row = (png_bytep)png_malloc(png_ptr, + (png_ptr->rowbytes + 1)); + png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH; + } + } + + if (png_ptr->do_filter == PNG_NO_FILTERS) + png_ptr->do_filter = PNG_FILTER_NONE; + } + } + else + png_error(png_ptr, "Unknown custom filter method"); +} + +/* This allows us to influence the way in which libpng chooses the "best" + * filter for the current scanline. While the "minimum-sum-of-absolute- + * differences metric is relatively fast and effective, there is some + * question as to whether it can be improved upon by trying to keep the + * filtered data going to zlib more consistent, hopefully resulting in + * better compression. + */ +#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) /* GRR 970116 */ +void PNGAPI +png_set_filter_heuristics(png_structp png_ptr, int heuristic_method, + int num_weights, png_doublep filter_weights, + png_doublep filter_costs) +{ + int i; + + png_debug(1, "in png_set_filter_heuristics\n"); + if (heuristic_method >= PNG_FILTER_HEURISTIC_LAST) + { + png_warning(png_ptr, "Unknown filter heuristic method"); + return; + } + + if (heuristic_method == PNG_FILTER_HEURISTIC_DEFAULT) + { + heuristic_method = PNG_FILTER_HEURISTIC_UNWEIGHTED; + } + + if (num_weights < 0 || filter_weights == NULL || + heuristic_method == PNG_FILTER_HEURISTIC_UNWEIGHTED) + { + num_weights = 0; + } + + png_ptr->num_prev_filters = (png_byte)num_weights; + png_ptr->heuristic_method = (png_byte)heuristic_method; + + if (num_weights > 0) + { + if (png_ptr->prev_filters == NULL) + { + png_ptr->prev_filters = (png_bytep)png_malloc(png_ptr, + (png_uint_32)(sizeof(png_byte) * num_weights)); + + /* To make sure that the weighting starts out fairly */ + for (i = 0; i < num_weights; i++) + { + png_ptr->prev_filters[i] = 255; + } + } + + if (png_ptr->filter_weights == NULL) + { + png_ptr->filter_weights = (png_uint_16p)png_malloc(png_ptr, + (png_uint_32)(sizeof(png_uint_16) * num_weights)); + + png_ptr->inv_filter_weights = (png_uint_16p)png_malloc(png_ptr, + (png_uint_32)(sizeof(png_uint_16) * num_weights)); + for (i = 0; i < num_weights; i++) + { + png_ptr->inv_filter_weights[i] = + png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR; + } + } + + for (i = 0; i < num_weights; i++) + { + if (filter_weights[i] < 0.0) + { + png_ptr->inv_filter_weights[i] = + png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR; + } + else + { + png_ptr->inv_filter_weights[i] = + (png_uint_16)((double)PNG_WEIGHT_FACTOR*filter_weights[i]+0.5); + png_ptr->filter_weights[i] = + (png_uint_16)((double)PNG_WEIGHT_FACTOR/filter_weights[i]+0.5); + } + } + } + + /* If, in the future, there are other filter methods, this would + * need to be based on png_ptr->filter. + */ + if (png_ptr->filter_costs == NULL) + { + png_ptr->filter_costs = (png_uint_16p)png_malloc(png_ptr, + (png_uint_32)(sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST)); + + png_ptr->inv_filter_costs = (png_uint_16p)png_malloc(png_ptr, + (png_uint_32)(sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST)); + + for (i = 0; i < PNG_FILTER_VALUE_LAST; i++) + { + png_ptr->inv_filter_costs[i] = + png_ptr->filter_costs[i] = PNG_COST_FACTOR; + } + } + + /* Here is where we set the relative costs of the different filters. We + * should take the desired compression level into account when setting + * the costs, so that Paeth, for instance, has a high relative cost at low + * compression levels, while it has a lower relative cost at higher + * compression settings. The filter types are in order of increasing + * relative cost, so it would be possible to do this with an algorithm. + */ + for (i = 0; i < PNG_FILTER_VALUE_LAST; i++) + { + if (filter_costs == NULL || filter_costs[i] < 0.0) + { + png_ptr->inv_filter_costs[i] = + png_ptr->filter_costs[i] = PNG_COST_FACTOR; + } + else if (filter_costs[i] >= 1.0) + { + png_ptr->inv_filter_costs[i] = + (png_uint_16)((double)PNG_COST_FACTOR / filter_costs[i] + 0.5); + png_ptr->filter_costs[i] = + (png_uint_16)((double)PNG_COST_FACTOR * filter_costs[i] + 0.5); + } + } +} +#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */ + +void PNGAPI +png_set_compression_level(png_structp png_ptr, int level) +{ + png_debug(1, "in png_set_compression_level\n"); + png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_LEVEL; + png_ptr->zlib_level = level; +} + +void PNGAPI +png_set_compression_mem_level(png_structp png_ptr, int mem_level) +{ + png_debug(1, "in png_set_compression_mem_level\n"); + png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL; + png_ptr->zlib_mem_level = mem_level; +} + +void PNGAPI +png_set_compression_strategy(png_structp png_ptr, int strategy) +{ + png_debug(1, "in png_set_compression_strategy\n"); + png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_STRATEGY; + png_ptr->zlib_strategy = strategy; +} + +void PNGAPI +png_set_compression_window_bits(png_structp png_ptr, int window_bits) +{ + if (window_bits > 15) + png_warning(png_ptr, "Only compression windows <= 32k supported by PNG"); + else if (window_bits < 8) + png_warning(png_ptr, "Only compression windows >= 256 supported by PNG"); +#ifndef WBITS_8_OK + /* avoid libpng bug with 256-byte windows */ + if (window_bits == 8) + { + png_warning(png_ptr, "Compression window is being reset to 512"); + window_bits=9; + } +#endif + png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS; + png_ptr->zlib_window_bits = window_bits; +} + +void PNGAPI +png_set_compression_method(png_structp png_ptr, int method) +{ + png_debug(1, "in png_set_compression_method\n"); + if (method != 8) + png_warning(png_ptr, "Only compression method 8 is supported by PNG"); + png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_METHOD; + png_ptr->zlib_method = method; +} + +void PNGAPI +png_set_write_status_fn(png_structp png_ptr, png_write_status_ptr write_row_fn) +{ + png_ptr->write_row_fn = write_row_fn; +} + +#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +void PNGAPI +png_set_write_user_transform_fn(png_structp png_ptr, png_user_transform_ptr + write_user_transform_fn) +{ + png_debug(1, "in png_set_write_user_transform_fn\n"); + png_ptr->transformations |= PNG_USER_TRANSFORM; + png_ptr->write_user_transform_fn = write_user_transform_fn; +} +#endif + + +#if defined(PNG_INFO_IMAGE_SUPPORTED) +void PNGAPI +png_write_png(png_structp png_ptr, png_infop info_ptr, + int transforms, voidp params) +{ +#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) + /* invert the alpha channel from opacity to transparency */ + if (transforms & PNG_TRANSFORM_INVERT_ALPHA) + png_set_invert_alpha(png_ptr); +#endif + + /* Write the file header information. */ + png_write_info(png_ptr, info_ptr); + + /* ------ these transformations don't touch the info structure ------- */ + +#if defined(PNG_WRITE_INVERT_SUPPORTED) + /* invert monochrome pixels */ + if (transforms & PNG_TRANSFORM_INVERT_MONO) + png_set_invert_mono(png_ptr); +#endif + +#if defined(PNG_WRITE_SHIFT_SUPPORTED) + /* Shift the pixels up to a legal bit depth and fill in + * as appropriate to correctly scale the image. + */ + if ((transforms & PNG_TRANSFORM_SHIFT) + && (info_ptr->valid & PNG_INFO_sBIT)) + png_set_shift(png_ptr, &info_ptr->sig_bit); +#endif + +#if defined(PNG_WRITE_PACK_SUPPORTED) + /* pack pixels into bytes */ + if (transforms & PNG_TRANSFORM_PACKING) + png_set_packing(png_ptr); +#endif + +#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) + /* swap location of alpha bytes from ARGB to RGBA */ + if (transforms & PNG_TRANSFORM_SWAP_ALPHA) + png_set_swap_alpha(png_ptr); +#endif + +#if defined(PNG_WRITE_FILLER_SUPPORTED) + /* Get rid of filler (OR ALPHA) bytes, pack XRGB/RGBX/ARGB/RGBA into + * RGB (4 channels -> 3 channels). The second parameter is not used. + */ + if (transforms & PNG_TRANSFORM_STRIP_FILLER) + png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); +#endif + +#if defined(PNG_WRITE_BGR_SUPPORTED) + /* flip BGR pixels to RGB */ + if (transforms & PNG_TRANSFORM_BGR) + png_set_bgr(png_ptr); +#endif + +#if defined(PNG_WRITE_SWAP_SUPPORTED) + /* swap bytes of 16-bit files to most significant byte first */ + if (transforms & PNG_TRANSFORM_SWAP_ENDIAN) + png_set_swap(png_ptr); +#endif + +#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) + /* swap bits of 1, 2, 4 bit packed pixel formats */ + if (transforms & PNG_TRANSFORM_PACKSWAP) + png_set_packswap(png_ptr); +#endif + + /* ----------------------- end of transformations ------------------- */ + + /* write the bits */ + if (info_ptr->valid & PNG_INFO_IDAT) + png_write_image(png_ptr, info_ptr->row_pointers); + + /* It is REQUIRED to call this to finish writing the rest of the file */ + png_write_end(png_ptr, info_ptr); + + if(transforms == 0 || params == NULL) + /* quiet compiler warnings */ return; +} +#endif +#endif /* PNG_WRITE_SUPPORTED */ diff --git a/gtkmm-osx/libpng-1.2.5/pngwtran.c b/gtkmm-osx/libpng-1.2.5/pngwtran.c new file mode 100644 index 0000000..c28da11 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/pngwtran.c @@ -0,0 +1,563 @@ + +/* pngwtran.c - transforms the data in a row for PNG writers + * + * libpng 1.2.5 - October 3, 2002 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2002 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + */ + +#define PNG_INTERNAL +#include "png.h" +#ifdef PNG_WRITE_SUPPORTED + +/* Transform the data according to the user's wishes. The order of + * transformations is significant. + */ +void /* PRIVATE */ +png_do_write_transformations(png_structp png_ptr) +{ + png_debug(1, "in png_do_write_transformations\n"); + + if (png_ptr == NULL) + return; + +#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) + if (png_ptr->transformations & PNG_USER_TRANSFORM) + if(png_ptr->write_user_transform_fn != NULL) + (*(png_ptr->write_user_transform_fn)) /* user write transform function */ + (png_ptr, /* png_ptr */ + &(png_ptr->row_info), /* row_info: */ + /* png_uint_32 width; width of row */ + /* png_uint_32 rowbytes; number of bytes in row */ + /* png_byte color_type; color type of pixels */ + /* png_byte bit_depth; bit depth of samples */ + /* png_byte channels; number of channels (1-4) */ + /* png_byte pixel_depth; bits per pixel (depth*channels) */ + png_ptr->row_buf + 1); /* start of pixel data for row */ +#endif +#if defined(PNG_WRITE_FILLER_SUPPORTED) + if (png_ptr->transformations & PNG_FILLER) + png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, + png_ptr->flags); +#endif +#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) + if (png_ptr->transformations & PNG_PACKSWAP) + png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1); +#endif +#if defined(PNG_WRITE_PACK_SUPPORTED) + if (png_ptr->transformations & PNG_PACK) + png_do_pack(&(png_ptr->row_info), png_ptr->row_buf + 1, + (png_uint_32)png_ptr->bit_depth); +#endif +#if defined(PNG_WRITE_SWAP_SUPPORTED) + if (png_ptr->transformations & PNG_SWAP_BYTES) + png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1); +#endif +#if defined(PNG_WRITE_SHIFT_SUPPORTED) + if (png_ptr->transformations & PNG_SHIFT) + png_do_shift(&(png_ptr->row_info), png_ptr->row_buf + 1, + &(png_ptr->shift)); +#endif +#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) + if (png_ptr->transformations & PNG_INVERT_ALPHA) + png_do_write_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); +#endif +#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) + if (png_ptr->transformations & PNG_SWAP_ALPHA) + png_do_write_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); +#endif +#if defined(PNG_WRITE_BGR_SUPPORTED) + if (png_ptr->transformations & PNG_BGR) + png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1); +#endif +#if defined(PNG_WRITE_INVERT_SUPPORTED) + if (png_ptr->transformations & PNG_INVERT_MONO) + png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1); +#endif +} + +#if defined(PNG_WRITE_PACK_SUPPORTED) +/* Pack pixels into bytes. Pass the true bit depth in bit_depth. The + * row_info bit depth should be 8 (one pixel per byte). The channels + * should be 1 (this only happens on grayscale and paletted images). + */ +void /* PRIVATE */ +png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) +{ + png_debug(1, "in png_do_pack\n"); + if (row_info->bit_depth == 8 && +#if defined(PNG_USELESS_TESTS_SUPPORTED) + row != NULL && row_info != NULL && +#endif + row_info->channels == 1) + { + switch ((int)bit_depth) + { + case 1: + { + png_bytep sp, dp; + int mask, v; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + sp = row; + dp = row; + mask = 0x80; + v = 0; + + for (i = 0; i < row_width; i++) + { + if (*sp != 0) + v |= mask; + sp++; + if (mask > 1) + mask >>= 1; + else + { + mask = 0x80; + *dp = (png_byte)v; + dp++; + v = 0; + } + } + if (mask != 0x80) + *dp = (png_byte)v; + break; + } + case 2: + { + png_bytep sp, dp; + int shift, v; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + sp = row; + dp = row; + shift = 6; + v = 0; + for (i = 0; i < row_width; i++) + { + png_byte value; + + value = (png_byte)(*sp & 0x03); + v |= (value << shift); + if (shift == 0) + { + shift = 6; + *dp = (png_byte)v; + dp++; + v = 0; + } + else + shift -= 2; + sp++; + } + if (shift != 6) + *dp = (png_byte)v; + break; + } + case 4: + { + png_bytep sp, dp; + int shift, v; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + sp = row; + dp = row; + shift = 4; + v = 0; + for (i = 0; i < row_width; i++) + { + png_byte value; + + value = (png_byte)(*sp & 0x0f); + v |= (value << shift); + + if (shift == 0) + { + shift = 4; + *dp = (png_byte)v; + dp++; + v = 0; + } + else + shift -= 4; + + sp++; + } + if (shift != 4) + *dp = (png_byte)v; + break; + } + } + row_info->bit_depth = (png_byte)bit_depth; + row_info->pixel_depth = (png_byte)(bit_depth * row_info->channels); + row_info->rowbytes = + ((row_info->width * row_info->pixel_depth + 7) >> 3); + } +} +#endif + +#if defined(PNG_WRITE_SHIFT_SUPPORTED) +/* Shift pixel values to take advantage of whole range. Pass the + * true number of bits in bit_depth. The row should be packed + * according to row_info->bit_depth. Thus, if you had a row of + * bit depth 4, but the pixels only had values from 0 to 7, you + * would pass 3 as bit_depth, and this routine would translate the + * data to 0 to 15. + */ +void /* PRIVATE */ +png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth) +{ + png_debug(1, "in png_do_shift\n"); +#if defined(PNG_USELESS_TESTS_SUPPORTED) + if (row != NULL && row_info != NULL && +#else + if ( +#endif + row_info->color_type != PNG_COLOR_TYPE_PALETTE) + { + int shift_start[4], shift_dec[4]; + int channels = 0; + + if (row_info->color_type & PNG_COLOR_MASK_COLOR) + { + shift_start[channels] = row_info->bit_depth - bit_depth->red; + shift_dec[channels] = bit_depth->red; + channels++; + shift_start[channels] = row_info->bit_depth - bit_depth->green; + shift_dec[channels] = bit_depth->green; + channels++; + shift_start[channels] = row_info->bit_depth - bit_depth->blue; + shift_dec[channels] = bit_depth->blue; + channels++; + } + else + { + shift_start[channels] = row_info->bit_depth - bit_depth->gray; + shift_dec[channels] = bit_depth->gray; + channels++; + } + if (row_info->color_type & PNG_COLOR_MASK_ALPHA) + { + shift_start[channels] = row_info->bit_depth - bit_depth->alpha; + shift_dec[channels] = bit_depth->alpha; + channels++; + } + + /* with low row depths, could only be grayscale, so one channel */ + if (row_info->bit_depth < 8) + { + png_bytep bp = row; + png_uint_32 i; + png_byte mask; + png_uint_32 row_bytes = row_info->rowbytes; + + if (bit_depth->gray == 1 && row_info->bit_depth == 2) + mask = 0x55; + else if (row_info->bit_depth == 4 && bit_depth->gray == 3) + mask = 0x11; + else + mask = 0xff; + + for (i = 0; i < row_bytes; i++, bp++) + { + png_uint_16 v; + int j; + + v = *bp; + *bp = 0; + for (j = shift_start[0]; j > -shift_dec[0]; j -= shift_dec[0]) + { + if (j > 0) + *bp |= (png_byte)((v << j) & 0xff); + else + *bp |= (png_byte)((v >> (-j)) & mask); + } + } + } + else if (row_info->bit_depth == 8) + { + png_bytep bp = row; + png_uint_32 i; + png_uint_32 istop = channels * row_info->width; + + for (i = 0; i < istop; i++, bp++) + { + + png_uint_16 v; + int j; + int c = (int)(i%channels); + + v = *bp; + *bp = 0; + for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c]) + { + if (j > 0) + *bp |= (png_byte)((v << j) & 0xff); + else + *bp |= (png_byte)((v >> (-j)) & 0xff); + } + } + } + else + { + png_bytep bp; + png_uint_32 i; + png_uint_32 istop = channels * row_info->width; + + for (bp = row, i = 0; i < istop; i++) + { + int c = (int)(i%channels); + png_uint_16 value, v; + int j; + + v = (png_uint_16)(((png_uint_16)(*bp) << 8) + *(bp + 1)); + value = 0; + for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c]) + { + if (j > 0) + value |= (png_uint_16)((v << j) & (png_uint_16)0xffff); + else + value |= (png_uint_16)((v >> (-j)) & (png_uint_16)0xffff); + } + *bp++ = (png_byte)(value >> 8); + *bp++ = (png_byte)(value & 0xff); + } + } + } +} +#endif + +#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) +void /* PRIVATE */ +png_do_write_swap_alpha(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_write_swap_alpha\n"); +#if defined(PNG_USELESS_TESTS_SUPPORTED) + if (row != NULL && row_info != NULL) +#endif + { + if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + /* This converts from ARGB to RGBA */ + if (row_info->bit_depth == 8) + { + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + for (i = 0, sp = dp = row; i < row_width; i++) + { + png_byte save = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = save; + } + } + /* This converts from AARRGGBB to RRGGBBAA */ + else + { + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + png_byte save[2]; + save[0] = *(sp++); + save[1] = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = save[0]; + *(dp++) = save[1]; + } + } + } + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + /* This converts from AG to GA */ + if (row_info->bit_depth == 8) + { + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + png_byte save = *(sp++); + *(dp++) = *(sp++); + *(dp++) = save; + } + } + /* This converts from AAGG to GGAA */ + else + { + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + png_byte save[2]; + save[0] = *(sp++); + save[1] = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = save[0]; + *(dp++) = save[1]; + } + } + } + } +} +#endif + +#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) +void /* PRIVATE */ +png_do_write_invert_alpha(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_write_invert_alpha\n"); +#if defined(PNG_USELESS_TESTS_SUPPORTED) + if (row != NULL && row_info != NULL) +#endif + { + if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + /* This inverts the alpha channel in RGBA */ + if (row_info->bit_depth == 8) + { + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + for (i = 0, sp = dp = row; i < row_width; i++) + { + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = (png_byte)(255 - *(sp++)); + } + } + /* This inverts the alpha channel in RRGGBBAA */ + else + { + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = (png_byte)(255 - *(sp++)); + *(dp++) = (png_byte)(255 - *(sp++)); + } + } + } + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + /* This inverts the alpha channel in GA */ + if (row_info->bit_depth == 8) + { + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + *(dp++) = *(sp++); + *(dp++) = (png_byte)(255 - *(sp++)); + } + } + /* This inverts the alpha channel in GGAA */ + else + { + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = (png_byte)(255 - *(sp++)); + *(dp++) = (png_byte)(255 - *(sp++)); + } + } + } + } +} +#endif + +#if defined(PNG_MNG_FEATURES_SUPPORTED) +/* undoes intrapixel differencing */ +void /* PRIVATE */ +png_do_write_intrapixel(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_write_intrapixel\n"); + if ( +#if defined(PNG_USELESS_TESTS_SUPPORTED) + row != NULL && row_info != NULL && +#endif + (row_info->color_type & PNG_COLOR_MASK_COLOR)) + { + int bytes_per_pixel; + png_uint_32 row_width = row_info->width; + if (row_info->bit_depth == 8) + { + png_bytep rp; + png_uint_32 i; + + if (row_info->color_type == PNG_COLOR_TYPE_RGB) + bytes_per_pixel = 3; + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + bytes_per_pixel = 4; + else + return; + + for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) + { + *(rp) = (png_byte)((*rp - *(rp+1))&0xff); + *(rp+2) = (png_byte)((*(rp+2) - *(rp+1))&0xff); + } + } + else if (row_info->bit_depth == 16) + { + png_bytep rp; + png_uint_32 i; + + if (row_info->color_type == PNG_COLOR_TYPE_RGB) + bytes_per_pixel = 6; + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + bytes_per_pixel = 8; + else + return; + + for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) + { + png_uint_32 s0=*(rp )<<8 | *(rp+1); + png_uint_32 s1=*(rp+2)<<8 | *(rp+3); + png_uint_32 s2=*(rp+4)<<8 | *(rp+5); + png_uint_32 red=(s0-s1)&0xffff; + png_uint_32 blue=(s2-s1)&0xffff; + *(rp ) = (png_byte)((red>>8)&0xff); + *(rp+1) = (png_byte)(red&0xff); + *(rp+4) = (png_byte)((blue>>8)&0xff); + *(rp+5) = (png_byte)(blue&0xff); + } + } + } +} +#endif /* PNG_MNG_FEATURES_SUPPORTED */ +#endif /* PNG_WRITE_SUPPORTED */ diff --git a/gtkmm-osx/libpng-1.2.5/pngwutil.c b/gtkmm-osx/libpng-1.2.5/pngwutil.c new file mode 100644 index 0000000..4b5ab6c --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/pngwutil.c @@ -0,0 +1,2675 @@ + +/* pngwutil.c - utilities to write a PNG file + * + * libpng 1.2.5 - October 3, 2002 + * For conditions of distribution and use, see copyright notice in png.h + * Copyright (c) 1998-2002 Glenn Randers-Pehrson + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) + */ + +#define PNG_INTERNAL +#include "png.h" +#ifdef PNG_WRITE_SUPPORTED + +/* Place a 32-bit number into a buffer in PNG byte order. We work + * with unsigned numbers for convenience, although one supported + * ancillary chunk uses signed (two's complement) numbers. + */ +void /* PRIVATE */ +png_save_uint_32(png_bytep buf, png_uint_32 i) +{ + buf[0] = (png_byte)((i >> 24) & 0xff); + buf[1] = (png_byte)((i >> 16) & 0xff); + buf[2] = (png_byte)((i >> 8) & 0xff); + buf[3] = (png_byte)(i & 0xff); +} + +#if defined(PNG_WRITE_pCAL_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED) +/* The png_save_int_32 function assumes integers are stored in two's + * complement format. If this isn't the case, then this routine needs to + * be modified to write data in two's complement format. + */ +void /* PRIVATE */ +png_save_int_32(png_bytep buf, png_int_32 i) +{ + buf[0] = (png_byte)((i >> 24) & 0xff); + buf[1] = (png_byte)((i >> 16) & 0xff); + buf[2] = (png_byte)((i >> 8) & 0xff); + buf[3] = (png_byte)(i & 0xff); +} +#endif + +/* Place a 16-bit number into a buffer in PNG byte order. + * The parameter is declared unsigned int, not png_uint_16, + * just to avoid potential problems on pre-ANSI C compilers. + */ +void /* PRIVATE */ +png_save_uint_16(png_bytep buf, unsigned int i) +{ + buf[0] = (png_byte)((i >> 8) & 0xff); + buf[1] = (png_byte)(i & 0xff); +} + +/* Write a PNG chunk all at once. The type is an array of ASCII characters + * representing the chunk name. The array must be at least 4 bytes in + * length, and does not need to be null terminated. To be safe, pass the + * pre-defined chunk names here, and if you need a new one, define it + * where the others are defined. The length is the length of the data. + * All the data must be present. If that is not possible, use the + * png_write_chunk_start(), png_write_chunk_data(), and png_write_chunk_end() + * functions instead. + */ +void PNGAPI +png_write_chunk(png_structp png_ptr, png_bytep chunk_name, + png_bytep data, png_size_t length) +{ + png_write_chunk_start(png_ptr, chunk_name, (png_uint_32)length); + png_write_chunk_data(png_ptr, data, length); + png_write_chunk_end(png_ptr); +} + +/* Write the start of a PNG chunk. The type is the chunk type. + * The total_length is the sum of the lengths of all the data you will be + * passing in png_write_chunk_data(). + */ +void PNGAPI +png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name, + png_uint_32 length) +{ + png_byte buf[4]; + png_debug2(0, "Writing %s chunk (%lu bytes)\n", chunk_name, length); + + /* write the length */ + png_save_uint_32(buf, length); + png_write_data(png_ptr, buf, (png_size_t)4); + + /* write the chunk name */ + png_write_data(png_ptr, chunk_name, (png_size_t)4); + /* reset the crc and run it over the chunk name */ + png_reset_crc(png_ptr); + png_calculate_crc(png_ptr, chunk_name, (png_size_t)4); +} + +/* Write the data of a PNG chunk started with png_write_chunk_start(). + * Note that multiple calls to this function are allowed, and that the + * sum of the lengths from these calls *must* add up to the total_length + * given to png_write_chunk_start(). + */ +void PNGAPI +png_write_chunk_data(png_structp png_ptr, png_bytep data, png_size_t length) +{ + /* write the data, and run the CRC over it */ + if (data != NULL && length > 0) + { + png_calculate_crc(png_ptr, data, length); + png_write_data(png_ptr, data, length); + } +} + +/* Finish a chunk started with png_write_chunk_start(). */ +void PNGAPI +png_write_chunk_end(png_structp png_ptr) +{ + png_byte buf[4]; + + /* write the crc */ + png_save_uint_32(buf, png_ptr->crc); + + png_write_data(png_ptr, buf, (png_size_t)4); +} + +/* Simple function to write the signature. If we have already written + * the magic bytes of the signature, or more likely, the PNG stream is + * being embedded into another stream and doesn't need its own signature, + * we should call png_set_sig_bytes() to tell libpng how many of the + * bytes have already been written. + */ +void /* PRIVATE */ +png_write_sig(png_structp png_ptr) +{ + png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10}; + /* write the rest of the 8 byte signature */ + png_write_data(png_ptr, &png_signature[png_ptr->sig_bytes], + (png_size_t)8 - png_ptr->sig_bytes); + if(png_ptr->sig_bytes < 3) + png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE; +} + +#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_iCCP_SUPPORTED) +/* + * This pair of functions encapsulates the operation of (a) compressing a + * text string, and (b) issuing it later as a series of chunk data writes. + * The compression_state structure is shared context for these functions + * set up by the caller in order to make the whole mess thread-safe. + */ + +typedef struct +{ + char *input; /* the uncompressed input data */ + int input_len; /* its length */ + int num_output_ptr; /* number of output pointers used */ + int max_output_ptr; /* size of output_ptr */ + png_charpp output_ptr; /* array of pointers to output */ +} compression_state; + +/* compress given text into storage in the png_ptr structure */ +static int /* PRIVATE */ +png_text_compress(png_structp png_ptr, + png_charp text, png_size_t text_len, int compression, + compression_state *comp) +{ + int ret; + + comp->num_output_ptr = comp->max_output_ptr = 0; + comp->output_ptr = NULL; + comp->input = NULL; + + /* we may just want to pass the text right through */ + if (compression == PNG_TEXT_COMPRESSION_NONE) + { + comp->input = text; + comp->input_len = text_len; + return((int)text_len); + } + + if (compression >= PNG_TEXT_COMPRESSION_LAST) + { +#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) + char msg[50]; + sprintf(msg, "Unknown compression type %d", compression); + png_warning(png_ptr, msg); +#else + png_warning(png_ptr, "Unknown compression type"); +#endif + } + + /* We can't write the chunk until we find out how much data we have, + * which means we need to run the compressor first and save the + * output. This shouldn't be a problem, as the vast majority of + * comments should be reasonable, but we will set up an array of + * malloc'd pointers to be sure. + * + * If we knew the application was well behaved, we could simplify this + * greatly by assuming we can always malloc an output buffer large + * enough to hold the compressed text ((1001 * text_len / 1000) + 12) + * and malloc this directly. The only time this would be a bad idea is + * if we can't malloc more than 64K and we have 64K of random input + * data, or if the input string is incredibly large (although this + * wouldn't cause a failure, just a slowdown due to swapping). + */ + + /* set up the compression buffers */ + png_ptr->zstream.avail_in = (uInt)text_len; + png_ptr->zstream.next_in = (Bytef *)text; + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + png_ptr->zstream.next_out = (Bytef *)png_ptr->zbuf; + + /* this is the same compression loop as in png_write_row() */ + do + { + /* compress the data */ + ret = deflate(&png_ptr->zstream, Z_NO_FLUSH); + if (ret != Z_OK) + { + /* error */ + if (png_ptr->zstream.msg != NULL) + png_error(png_ptr, png_ptr->zstream.msg); + else + png_error(png_ptr, "zlib error"); + } + /* check to see if we need more room */ + if (!png_ptr->zstream.avail_out && png_ptr->zstream.avail_in) + { + /* make sure the output array has room */ + if (comp->num_output_ptr >= comp->max_output_ptr) + { + int old_max; + + old_max = comp->max_output_ptr; + comp->max_output_ptr = comp->num_output_ptr + 4; + if (comp->output_ptr != NULL) + { + png_charpp old_ptr; + + old_ptr = comp->output_ptr; + comp->output_ptr = (png_charpp)png_malloc(png_ptr, + (png_uint_32)(comp->max_output_ptr * sizeof (png_charpp))); + png_memcpy(comp->output_ptr, old_ptr, old_max + * sizeof (png_charp)); + png_free(png_ptr, old_ptr); + } + else + comp->output_ptr = (png_charpp)png_malloc(png_ptr, + (png_uint_32)(comp->max_output_ptr * sizeof (png_charp))); + } + + /* save the data */ + comp->output_ptr[comp->num_output_ptr] = (png_charp)png_malloc(png_ptr, + (png_uint_32)png_ptr->zbuf_size); + png_memcpy(comp->output_ptr[comp->num_output_ptr], png_ptr->zbuf, + png_ptr->zbuf_size); + comp->num_output_ptr++; + + /* and reset the buffer */ + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + png_ptr->zstream.next_out = png_ptr->zbuf; + } + /* continue until we don't have any more to compress */ + } while (png_ptr->zstream.avail_in); + + /* finish the compression */ + do + { + /* tell zlib we are finished */ + ret = deflate(&png_ptr->zstream, Z_FINISH); + + if (ret == Z_OK) + { + /* check to see if we need more room */ + if (!(png_ptr->zstream.avail_out)) + { + /* check to make sure our output array has room */ + if (comp->num_output_ptr >= comp->max_output_ptr) + { + int old_max; + + old_max = comp->max_output_ptr; + comp->max_output_ptr = comp->num_output_ptr + 4; + if (comp->output_ptr != NULL) + { + png_charpp old_ptr; + + old_ptr = comp->output_ptr; + /* This could be optimized to realloc() */ + comp->output_ptr = (png_charpp)png_malloc(png_ptr, + (png_uint_32)(comp->max_output_ptr * sizeof (png_charpp))); + png_memcpy(comp->output_ptr, old_ptr, + old_max * sizeof (png_charp)); + png_free(png_ptr, old_ptr); + } + else + comp->output_ptr = (png_charpp)png_malloc(png_ptr, + (png_uint_32)(comp->max_output_ptr * sizeof (png_charp))); + } + + /* save off the data */ + comp->output_ptr[comp->num_output_ptr] = + (png_charp)png_malloc(png_ptr, (png_uint_32)png_ptr->zbuf_size); + png_memcpy(comp->output_ptr[comp->num_output_ptr], png_ptr->zbuf, + png_ptr->zbuf_size); + comp->num_output_ptr++; + + /* and reset the buffer pointers */ + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + png_ptr->zstream.next_out = png_ptr->zbuf; + } + } + else if (ret != Z_STREAM_END) + { + /* we got an error */ + if (png_ptr->zstream.msg != NULL) + png_error(png_ptr, png_ptr->zstream.msg); + else + png_error(png_ptr, "zlib error"); + } + } while (ret != Z_STREAM_END); + + /* text length is number of buffers plus last buffer */ + text_len = png_ptr->zbuf_size * comp->num_output_ptr; + if (png_ptr->zstream.avail_out < png_ptr->zbuf_size) + text_len += png_ptr->zbuf_size - (png_size_t)png_ptr->zstream.avail_out; + + return((int)text_len); +} + +/* ship the compressed text out via chunk writes */ +static void /* PRIVATE */ +png_write_compressed_data_out(png_structp png_ptr, compression_state *comp) +{ + int i; + + /* handle the no-compression case */ + if (comp->input) + { + png_write_chunk_data(png_ptr, (png_bytep)comp->input, + (png_size_t)comp->input_len); + return; + } + + /* write saved output buffers, if any */ + for (i = 0; i < comp->num_output_ptr; i++) + { + png_write_chunk_data(png_ptr,(png_bytep)comp->output_ptr[i], + png_ptr->zbuf_size); + png_free(png_ptr, comp->output_ptr[i]); + comp->output_ptr[i]=NULL; + } + if (comp->max_output_ptr != 0) + png_free(png_ptr, comp->output_ptr); + comp->output_ptr=NULL; + /* write anything left in zbuf */ + if (png_ptr->zstream.avail_out < (png_uint_32)png_ptr->zbuf_size) + png_write_chunk_data(png_ptr, png_ptr->zbuf, + png_ptr->zbuf_size - png_ptr->zstream.avail_out); + + /* reset zlib for another zTXt/iTXt or the image data */ + deflateReset(&png_ptr->zstream); + +} +#endif + +/* Write the IHDR chunk, and update the png_struct with the necessary + * information. Note that the rest of this code depends upon this + * information being correct. + */ +void /* PRIVATE */ +png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height, + int bit_depth, int color_type, int compression_type, int filter_type, + int interlace_type) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_IHDR; +#endif + png_byte buf[13]; /* buffer to store the IHDR info */ + + png_debug(1, "in png_write_IHDR\n"); + /* Check that we have valid input data from the application info */ + switch (color_type) + { + case PNG_COLOR_TYPE_GRAY: + switch (bit_depth) + { + case 1: + case 2: + case 4: + case 8: + case 16: png_ptr->channels = 1; break; + default: png_error(png_ptr,"Invalid bit depth for grayscale image"); + } + break; + case PNG_COLOR_TYPE_RGB: + if (bit_depth != 8 && bit_depth != 16) + png_error(png_ptr, "Invalid bit depth for RGB image"); + png_ptr->channels = 3; + break; + case PNG_COLOR_TYPE_PALETTE: + switch (bit_depth) + { + case 1: + case 2: + case 4: + case 8: png_ptr->channels = 1; break; + default: png_error(png_ptr, "Invalid bit depth for paletted image"); + } + break; + case PNG_COLOR_TYPE_GRAY_ALPHA: + if (bit_depth != 8 && bit_depth != 16) + png_error(png_ptr, "Invalid bit depth for grayscale+alpha image"); + png_ptr->channels = 2; + break; + case PNG_COLOR_TYPE_RGB_ALPHA: + if (bit_depth != 8 && bit_depth != 16) + png_error(png_ptr, "Invalid bit depth for RGBA image"); + png_ptr->channels = 4; + break; + default: + png_error(png_ptr, "Invalid image color type specified"); + } + + if (compression_type != PNG_COMPRESSION_TYPE_BASE) + { + png_warning(png_ptr, "Invalid compression type specified"); + compression_type = PNG_COMPRESSION_TYPE_BASE; + } + + /* Write filter_method 64 (intrapixel differencing) only if + * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and + * 2. Libpng did not write a PNG signature (this filter_method is only + * used in PNG datastreams that are embedded in MNG datastreams) and + * 3. The application called png_permit_mng_features with a mask that + * included PNG_FLAG_MNG_FILTER_64 and + * 4. The filter_method is 64 and + * 5. The color_type is RGB or RGBA + */ + if ( +#if defined(PNG_MNG_FEATURES_SUPPORTED) + !((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && + ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) && + (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA) && + (filter_type == PNG_INTRAPIXEL_DIFFERENCING)) && +#endif + filter_type != PNG_FILTER_TYPE_BASE) + { + png_warning(png_ptr, "Invalid filter type specified"); + filter_type = PNG_FILTER_TYPE_BASE; + } + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + if (interlace_type != PNG_INTERLACE_NONE && + interlace_type != PNG_INTERLACE_ADAM7) + { + png_warning(png_ptr, "Invalid interlace type specified"); + interlace_type = PNG_INTERLACE_ADAM7; + } +#else + interlace_type=PNG_INTERLACE_NONE; +#endif + + /* save off the relevent information */ + png_ptr->bit_depth = (png_byte)bit_depth; + png_ptr->color_type = (png_byte)color_type; + png_ptr->interlaced = (png_byte)interlace_type; +#if defined(PNG_MNG_FEATURES_SUPPORTED) + png_ptr->filter_type = (png_byte)filter_type; +#endif + png_ptr->width = width; + png_ptr->height = height; + + png_ptr->pixel_depth = (png_byte)(bit_depth * png_ptr->channels); + png_ptr->rowbytes = ((width * (png_size_t)png_ptr->pixel_depth + 7) >> 3); + /* set the usr info, so any transformations can modify it */ + png_ptr->usr_width = png_ptr->width; + png_ptr->usr_bit_depth = png_ptr->bit_depth; + png_ptr->usr_channels = png_ptr->channels; + + /* pack the header information into the buffer */ + png_save_uint_32(buf, width); + png_save_uint_32(buf + 4, height); + buf[8] = (png_byte)bit_depth; + buf[9] = (png_byte)color_type; + buf[10] = (png_byte)compression_type; + buf[11] = (png_byte)filter_type; + buf[12] = (png_byte)interlace_type; + + /* write the chunk */ + png_write_chunk(png_ptr, (png_bytep)png_IHDR, buf, (png_size_t)13); + + /* initialize zlib with PNG info */ + png_ptr->zstream.zalloc = png_zalloc; + png_ptr->zstream.zfree = png_zfree; + png_ptr->zstream.opaque = (voidpf)png_ptr; + if (!(png_ptr->do_filter)) + { + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE || + png_ptr->bit_depth < 8) + png_ptr->do_filter = PNG_FILTER_NONE; + else + png_ptr->do_filter = PNG_ALL_FILTERS; + } + if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_STRATEGY)) + { + if (png_ptr->do_filter != PNG_FILTER_NONE) + png_ptr->zlib_strategy = Z_FILTERED; + else + png_ptr->zlib_strategy = Z_DEFAULT_STRATEGY; + } + if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_LEVEL)) + png_ptr->zlib_level = Z_DEFAULT_COMPRESSION; + if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL)) + png_ptr->zlib_mem_level = 8; + if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS)) + png_ptr->zlib_window_bits = 15; + if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_METHOD)) + png_ptr->zlib_method = 8; + deflateInit2(&png_ptr->zstream, png_ptr->zlib_level, + png_ptr->zlib_method, png_ptr->zlib_window_bits, + png_ptr->zlib_mem_level, png_ptr->zlib_strategy); + png_ptr->zstream.next_out = png_ptr->zbuf; + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + + png_ptr->mode = PNG_HAVE_IHDR; +} + +/* write the palette. We are careful not to trust png_color to be in the + * correct order for PNG, so people can redefine it to any convenient + * structure. + */ +void /* PRIVATE */ +png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_PLTE; +#endif + png_uint_32 i; + png_colorp pal_ptr; + png_byte buf[3]; + + png_debug(1, "in png_write_PLTE\n"); + if (( +#if defined(PNG_MNG_FEATURES_SUPPORTED) + !(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) && +#endif + num_pal == 0) || num_pal > 256) + { + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + png_error(png_ptr, "Invalid number of colors in palette"); + } + else + { + png_warning(png_ptr, "Invalid number of colors in palette"); + return; + } + } + + if (!(png_ptr->color_type&PNG_COLOR_MASK_COLOR)) + { + png_warning(png_ptr, + "Ignoring request to write a PLTE chunk in grayscale PNG"); + return; + } + + png_ptr->num_palette = (png_uint_16)num_pal; + png_debug1(3, "num_palette = %d\n", png_ptr->num_palette); + + png_write_chunk_start(png_ptr, (png_bytep)png_PLTE, num_pal * 3); +#ifndef PNG_NO_POINTER_INDEXING + for (i = 0, pal_ptr = palette; i < num_pal; i++, pal_ptr++) + { + buf[0] = pal_ptr->red; + buf[1] = pal_ptr->green; + buf[2] = pal_ptr->blue; + png_write_chunk_data(png_ptr, buf, (png_size_t)3); + } +#else + /* This is a little slower but some buggy compilers need to do this instead */ + pal_ptr=palette; + for (i = 0; i < num_pal; i++) + { + buf[0] = pal_ptr[i].red; + buf[1] = pal_ptr[i].green; + buf[2] = pal_ptr[i].blue; + png_write_chunk_data(png_ptr, buf, (png_size_t)3); + } +#endif + png_write_chunk_end(png_ptr); + png_ptr->mode |= PNG_HAVE_PLTE; +} + +/* write an IDAT chunk */ +void /* PRIVATE */ +png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_IDAT; +#endif + png_debug(1, "in png_write_IDAT\n"); + png_write_chunk(png_ptr, (png_bytep)png_IDAT, data, length); + png_ptr->mode |= PNG_HAVE_IDAT; +} + +/* write an IEND chunk */ +void /* PRIVATE */ +png_write_IEND(png_structp png_ptr) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_IEND; +#endif + png_debug(1, "in png_write_IEND\n"); + png_write_chunk(png_ptr, (png_bytep)png_IEND, png_bytep_NULL, + (png_size_t)0); + png_ptr->mode |= PNG_HAVE_IEND; +} + +#if defined(PNG_WRITE_gAMA_SUPPORTED) +/* write a gAMA chunk */ +#ifdef PNG_FLOATING_POINT_SUPPORTED +void /* PRIVATE */ +png_write_gAMA(png_structp png_ptr, double file_gamma) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_gAMA; +#endif + png_uint_32 igamma; + png_byte buf[4]; + + png_debug(1, "in png_write_gAMA\n"); + /* file_gamma is saved in 1/100,000ths */ + igamma = (png_uint_32)(file_gamma * 100000.0 + 0.5); + png_save_uint_32(buf, igamma); + png_write_chunk(png_ptr, (png_bytep)png_gAMA, buf, (png_size_t)4); +} +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED +void /* PRIVATE */ +png_write_gAMA_fixed(png_structp png_ptr, png_fixed_point file_gamma) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_gAMA; +#endif + png_byte buf[4]; + + png_debug(1, "in png_write_gAMA\n"); + /* file_gamma is saved in 1/100,000ths */ + png_save_uint_32(buf, (png_uint_32)file_gamma); + png_write_chunk(png_ptr, (png_bytep)png_gAMA, buf, (png_size_t)4); +} +#endif +#endif + +#if defined(PNG_WRITE_sRGB_SUPPORTED) +/* write a sRGB chunk */ +void /* PRIVATE */ +png_write_sRGB(png_structp png_ptr, int srgb_intent) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_sRGB; +#endif + png_byte buf[1]; + + png_debug(1, "in png_write_sRGB\n"); + if(srgb_intent >= PNG_sRGB_INTENT_LAST) + png_warning(png_ptr, + "Invalid sRGB rendering intent specified"); + buf[0]=(png_byte)srgb_intent; + png_write_chunk(png_ptr, (png_bytep)png_sRGB, buf, (png_size_t)1); +} +#endif + +#if defined(PNG_WRITE_iCCP_SUPPORTED) +/* write an iCCP chunk */ +void /* PRIVATE */ +png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type, + png_charp profile, int profile_len) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_iCCP; +#endif + png_size_t name_len; + png_charp new_name; + compression_state comp; + + png_debug(1, "in png_write_iCCP\n"); + if (name == NULL || (name_len = png_check_keyword(png_ptr, name, + &new_name)) == 0) + { + png_warning(png_ptr, "Empty keyword in iCCP chunk"); + return; + } + + if (compression_type != PNG_COMPRESSION_TYPE_BASE) + png_warning(png_ptr, "Unknown compression type in iCCP chunk"); + + if (profile == NULL) + profile_len = 0; + + if (profile_len) + profile_len = png_text_compress(png_ptr, profile, (png_size_t)profile_len, + PNG_COMPRESSION_TYPE_BASE, &comp); + + /* make sure we include the NULL after the name and the compression type */ + png_write_chunk_start(png_ptr, (png_bytep)png_iCCP, + (png_uint_32)name_len+profile_len+2); + new_name[name_len+1]=0x00; + png_write_chunk_data(png_ptr, (png_bytep)new_name, name_len + 2); + + if (profile_len) + png_write_compressed_data_out(png_ptr, &comp); + + png_write_chunk_end(png_ptr); + png_free(png_ptr, new_name); +} +#endif + +#if defined(PNG_WRITE_sPLT_SUPPORTED) +/* write a sPLT chunk */ +void /* PRIVATE */ +png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_sPLT; +#endif + png_size_t name_len; + png_charp new_name; + png_byte entrybuf[10]; + int entry_size = (spalette->depth == 8 ? 6 : 10); + int palette_size = entry_size * spalette->nentries; + png_sPLT_entryp ep; +#ifdef PNG_NO_POINTER_INDEXING + int i; +#endif + + png_debug(1, "in png_write_sPLT\n"); + if (spalette->name == NULL || (name_len = png_check_keyword(png_ptr, + spalette->name, &new_name))==0) + { + png_warning(png_ptr, "Empty keyword in sPLT chunk"); + return; + } + + /* make sure we include the NULL after the name */ + png_write_chunk_start(png_ptr, (png_bytep)png_sPLT, + (png_uint_32)(name_len + 2 + palette_size)); + png_write_chunk_data(png_ptr, (png_bytep)new_name, name_len + 1); + png_write_chunk_data(png_ptr, (png_bytep)&spalette->depth, 1); + + /* loop through each palette entry, writing appropriately */ +#ifndef PNG_NO_POINTER_INDEXING + for (ep = spalette->entries; epentries+spalette->nentries; ep++) + { + if (spalette->depth == 8) + { + entrybuf[0] = (png_byte)ep->red; + entrybuf[1] = (png_byte)ep->green; + entrybuf[2] = (png_byte)ep->blue; + entrybuf[3] = (png_byte)ep->alpha; + png_save_uint_16(entrybuf + 4, ep->frequency); + } + else + { + png_save_uint_16(entrybuf + 0, ep->red); + png_save_uint_16(entrybuf + 2, ep->green); + png_save_uint_16(entrybuf + 4, ep->blue); + png_save_uint_16(entrybuf + 6, ep->alpha); + png_save_uint_16(entrybuf + 8, ep->frequency); + } + png_write_chunk_data(png_ptr, entrybuf, (png_size_t)entry_size); + } +#else + ep=spalette->entries; + for (i=0; i>spalette->nentries; i++) + { + if (spalette->depth == 8) + { + entrybuf[0] = (png_byte)ep[i].red; + entrybuf[1] = (png_byte)ep[i].green; + entrybuf[2] = (png_byte)ep[i].blue; + entrybuf[3] = (png_byte)ep[i].alpha; + png_save_uint_16(entrybuf + 4, ep[i].frequency); + } + else + { + png_save_uint_16(entrybuf + 0, ep[i].red); + png_save_uint_16(entrybuf + 2, ep[i].green); + png_save_uint_16(entrybuf + 4, ep[i].blue); + png_save_uint_16(entrybuf + 6, ep[i].alpha); + png_save_uint_16(entrybuf + 8, ep[i].frequency); + } + png_write_chunk_data(png_ptr, entrybuf, entry_size); + } +#endif + + png_write_chunk_end(png_ptr); + png_free(png_ptr, new_name); +} +#endif + +#if defined(PNG_WRITE_sBIT_SUPPORTED) +/* write the sBIT chunk */ +void /* PRIVATE */ +png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_sBIT; +#endif + png_byte buf[4]; + png_size_t size; + + png_debug(1, "in png_write_sBIT\n"); + /* make sure we don't depend upon the order of PNG_COLOR_8 */ + if (color_type & PNG_COLOR_MASK_COLOR) + { + png_byte maxbits; + + maxbits = (png_byte)(color_type==PNG_COLOR_TYPE_PALETTE ? 8 : + png_ptr->usr_bit_depth); + if (sbit->red == 0 || sbit->red > maxbits || + sbit->green == 0 || sbit->green > maxbits || + sbit->blue == 0 || sbit->blue > maxbits) + { + png_warning(png_ptr, "Invalid sBIT depth specified"); + return; + } + buf[0] = sbit->red; + buf[1] = sbit->green; + buf[2] = sbit->blue; + size = 3; + } + else + { + if (sbit->gray == 0 || sbit->gray > png_ptr->usr_bit_depth) + { + png_warning(png_ptr, "Invalid sBIT depth specified"); + return; + } + buf[0] = sbit->gray; + size = 1; + } + + if (color_type & PNG_COLOR_MASK_ALPHA) + { + if (sbit->alpha == 0 || sbit->alpha > png_ptr->usr_bit_depth) + { + png_warning(png_ptr, "Invalid sBIT depth specified"); + return; + } + buf[size++] = sbit->alpha; + } + + png_write_chunk(png_ptr, (png_bytep)png_sBIT, buf, size); +} +#endif + +#if defined(PNG_WRITE_cHRM_SUPPORTED) +/* write the cHRM chunk */ +#ifdef PNG_FLOATING_POINT_SUPPORTED +void /* PRIVATE */ +png_write_cHRM(png_structp png_ptr, double white_x, double white_y, + double red_x, double red_y, double green_x, double green_y, + double blue_x, double blue_y) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_cHRM; +#endif + png_byte buf[32]; + png_uint_32 itemp; + + png_debug(1, "in png_write_cHRM\n"); + /* each value is saved in 1/100,000ths */ + if (white_x < 0 || white_x > 0.8 || white_y < 0 || white_y > 0.8 || + white_x + white_y > 1.0) + { + png_warning(png_ptr, "Invalid cHRM white point specified"); +#if !defined(PNG_NO_CONSOLE_IO) + fprintf(stderr,"white_x=%f, white_y=%f\n",white_x, white_y); +#endif + return; + } + itemp = (png_uint_32)(white_x * 100000.0 + 0.5); + png_save_uint_32(buf, itemp); + itemp = (png_uint_32)(white_y * 100000.0 + 0.5); + png_save_uint_32(buf + 4, itemp); + + if (red_x < 0 || red_x > 0.8 || red_y < 0 || red_y > 0.8 || + red_x + red_y > 1.0) + { + png_warning(png_ptr, "Invalid cHRM red point specified"); + return; + } + itemp = (png_uint_32)(red_x * 100000.0 + 0.5); + png_save_uint_32(buf + 8, itemp); + itemp = (png_uint_32)(red_y * 100000.0 + 0.5); + png_save_uint_32(buf + 12, itemp); + + if (green_x < 0 || green_x > 0.8 || green_y < 0 || green_y > 0.8 || + green_x + green_y > 1.0) + { + png_warning(png_ptr, "Invalid cHRM green point specified"); + return; + } + itemp = (png_uint_32)(green_x * 100000.0 + 0.5); + png_save_uint_32(buf + 16, itemp); + itemp = (png_uint_32)(green_y * 100000.0 + 0.5); + png_save_uint_32(buf + 20, itemp); + + if (blue_x < 0 || blue_x > 0.8 || blue_y < 0 || blue_y > 0.8 || + blue_x + blue_y > 1.0) + { + png_warning(png_ptr, "Invalid cHRM blue point specified"); + return; + } + itemp = (png_uint_32)(blue_x * 100000.0 + 0.5); + png_save_uint_32(buf + 24, itemp); + itemp = (png_uint_32)(blue_y * 100000.0 + 0.5); + png_save_uint_32(buf + 28, itemp); + + png_write_chunk(png_ptr, (png_bytep)png_cHRM, buf, (png_size_t)32); +} +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED +void /* PRIVATE */ +png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x, + png_fixed_point white_y, png_fixed_point red_x, png_fixed_point red_y, + png_fixed_point green_x, png_fixed_point green_y, png_fixed_point blue_x, + png_fixed_point blue_y) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_cHRM; +#endif + png_byte buf[32]; + + png_debug(1, "in png_write_cHRM\n"); + /* each value is saved in 1/100,000ths */ + if (white_x > 80000L || white_y > 80000L || white_x + white_y > 100000L) + { + png_warning(png_ptr, "Invalid fixed cHRM white point specified"); +#if !defined(PNG_NO_CONSOLE_IO) + fprintf(stderr,"white_x=%ld, white_y=%ld\n",white_x, white_y); +#endif + return; + } + png_save_uint_32(buf, (png_uint_32)white_x); + png_save_uint_32(buf + 4, (png_uint_32)white_y); + + if (red_x > 80000L || red_y > 80000L || red_x + red_y > 100000L) + { + png_warning(png_ptr, "Invalid cHRM fixed red point specified"); + return; + } + png_save_uint_32(buf + 8, (png_uint_32)red_x); + png_save_uint_32(buf + 12, (png_uint_32)red_y); + + if (green_x > 80000L || green_y > 80000L || green_x + green_y > 100000L) + { + png_warning(png_ptr, "Invalid fixed cHRM green point specified"); + return; + } + png_save_uint_32(buf + 16, (png_uint_32)green_x); + png_save_uint_32(buf + 20, (png_uint_32)green_y); + + if (blue_x > 80000L || blue_y > 80000L || blue_x + blue_y > 100000L) + { + png_warning(png_ptr, "Invalid fixed cHRM blue point specified"); + return; + } + png_save_uint_32(buf + 24, (png_uint_32)blue_x); + png_save_uint_32(buf + 28, (png_uint_32)blue_y); + + png_write_chunk(png_ptr, (png_bytep)png_cHRM, buf, (png_size_t)32); +} +#endif +#endif + +#if defined(PNG_WRITE_tRNS_SUPPORTED) +/* write the tRNS chunk */ +void /* PRIVATE */ +png_write_tRNS(png_structp png_ptr, png_bytep trans, png_color_16p tran, + int num_trans, int color_type) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_tRNS; +#endif + png_byte buf[6]; + + png_debug(1, "in png_write_tRNS\n"); + if (color_type == PNG_COLOR_TYPE_PALETTE) + { + if (num_trans <= 0 || num_trans > (int)png_ptr->num_palette) + { + png_warning(png_ptr,"Invalid number of transparent colors specified"); + return; + } + /* write the chunk out as it is */ + png_write_chunk(png_ptr, (png_bytep)png_tRNS, trans, (png_size_t)num_trans); + } + else if (color_type == PNG_COLOR_TYPE_GRAY) + { + /* one 16 bit value */ + if(tran->gray >= (1 << png_ptr->bit_depth)) + { + png_warning(png_ptr, + "Ignoring attempt to write tRNS chunk out-of-range for bit_depth"); + return; + } + png_save_uint_16(buf, tran->gray); + png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)2); + } + else if (color_type == PNG_COLOR_TYPE_RGB) + { + /* three 16 bit values */ + png_save_uint_16(buf, tran->red); + png_save_uint_16(buf + 2, tran->green); + png_save_uint_16(buf + 4, tran->blue); + if(png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4])) + { + png_warning(png_ptr, + "Ignoring attempt to write 16-bit tRNS chunk when bit_depth is 8"); + return; + } + png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)6); + } + else + { + png_warning(png_ptr, "Can't write tRNS with an alpha channel"); + } +} +#endif + +#if defined(PNG_WRITE_bKGD_SUPPORTED) +/* write the background chunk */ +void /* PRIVATE */ +png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_bKGD; +#endif + png_byte buf[6]; + + png_debug(1, "in png_write_bKGD\n"); + if (color_type == PNG_COLOR_TYPE_PALETTE) + { + if ( +#if defined(PNG_MNG_FEATURES_SUPPORTED) + (png_ptr->num_palette || + (!(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE))) && +#endif + back->index > png_ptr->num_palette) + { + png_warning(png_ptr, "Invalid background palette index"); + return; + } + buf[0] = back->index; + png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)1); + } + else if (color_type & PNG_COLOR_MASK_COLOR) + { + png_save_uint_16(buf, back->red); + png_save_uint_16(buf + 2, back->green); + png_save_uint_16(buf + 4, back->blue); + if(png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4])) + { + png_warning(png_ptr, + "Ignoring attempt to write 16-bit bKGD chunk when bit_depth is 8"); + return; + } + png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)6); + } + else + { + if(back->gray >= (1 << png_ptr->bit_depth)) + { + png_warning(png_ptr, + "Ignoring attempt to write bKGD chunk out-of-range for bit_depth"); + return; + } + png_save_uint_16(buf, back->gray); + png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)2); + } +} +#endif + +#if defined(PNG_WRITE_hIST_SUPPORTED) +/* write the histogram */ +void /* PRIVATE */ +png_write_hIST(png_structp png_ptr, png_uint_16p hist, int num_hist) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_hIST; +#endif + int i; + png_byte buf[3]; + + png_debug(1, "in png_write_hIST\n"); + if (num_hist > (int)png_ptr->num_palette) + { + png_debug2(3, "num_hist = %d, num_palette = %d\n", num_hist, + png_ptr->num_palette); + png_warning(png_ptr, "Invalid number of histogram entries specified"); + return; + } + + png_write_chunk_start(png_ptr, (png_bytep)png_hIST, (png_uint_32)(num_hist * 2)); + for (i = 0; i < num_hist; i++) + { + png_save_uint_16(buf, hist[i]); + png_write_chunk_data(png_ptr, buf, (png_size_t)2); + } + png_write_chunk_end(png_ptr); +} +#endif + +#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \ + defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) +/* Check that the tEXt or zTXt keyword is valid per PNG 1.0 specification, + * and if invalid, correct the keyword rather than discarding the entire + * chunk. The PNG 1.0 specification requires keywords 1-79 characters in + * length, forbids leading or trailing whitespace, multiple internal spaces, + * and the non-break space (0x80) from ISO 8859-1. Returns keyword length. + * + * The new_key is allocated to hold the corrected keyword and must be freed + * by the calling routine. This avoids problems with trying to write to + * static keywords without having to have duplicate copies of the strings. + */ +png_size_t /* PRIVATE */ +png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key) +{ + png_size_t key_len; + png_charp kp, dp; + int kflag; + int kwarn=0; + + png_debug(1, "in png_check_keyword\n"); + *new_key = NULL; + + if (key == NULL || (key_len = png_strlen(key)) == 0) + { + png_warning(png_ptr, "zero length keyword"); + return ((png_size_t)0); + } + + png_debug1(2, "Keyword to be checked is '%s'\n", key); + + *new_key = (png_charp)png_malloc(png_ptr, (png_uint_32)(key_len + 2)); + + /* Replace non-printing characters with a blank and print a warning */ + for (kp = key, dp = *new_key; *kp != '\0'; kp++, dp++) + { + if (*kp < 0x20 || (*kp > 0x7E && (png_byte)*kp < 0xA1)) + { +#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) + char msg[40]; + + sprintf(msg, "invalid keyword character 0x%02X", *kp); + png_warning(png_ptr, msg); +#else + png_warning(png_ptr, "invalid character in keyword"); +#endif + *dp = ' '; + } + else + { + *dp = *kp; + } + } + *dp = '\0'; + + /* Remove any trailing white space. */ + kp = *new_key + key_len - 1; + if (*kp == ' ') + { + png_warning(png_ptr, "trailing spaces removed from keyword"); + + while (*kp == ' ') + { + *(kp--) = '\0'; + key_len--; + } + } + + /* Remove any leading white space. */ + kp = *new_key; + if (*kp == ' ') + { + png_warning(png_ptr, "leading spaces removed from keyword"); + + while (*kp == ' ') + { + kp++; + key_len--; + } + } + + png_debug1(2, "Checking for multiple internal spaces in '%s'\n", kp); + + /* Remove multiple internal spaces. */ + for (kflag = 0, dp = *new_key; *kp != '\0'; kp++) + { + if (*kp == ' ' && kflag == 0) + { + *(dp++) = *kp; + kflag = 1; + } + else if (*kp == ' ') + { + key_len--; + kwarn=1; + } + else + { + *(dp++) = *kp; + kflag = 0; + } + } + *dp = '\0'; + if(kwarn) + png_warning(png_ptr, "extra interior spaces removed from keyword"); + + if (key_len == 0) + { + png_free(png_ptr, *new_key); + *new_key=NULL; + png_warning(png_ptr, "Zero length keyword"); + } + + if (key_len > 79) + { + png_warning(png_ptr, "keyword length must be 1 - 79 characters"); + new_key[79] = '\0'; + key_len = 79; + } + + return (key_len); +} +#endif + +#if defined(PNG_WRITE_tEXt_SUPPORTED) +/* write a tEXt chunk */ +void /* PRIVATE */ +png_write_tEXt(png_structp png_ptr, png_charp key, png_charp text, + png_size_t text_len) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_tEXt; +#endif + png_size_t key_len; + png_charp new_key; + + png_debug(1, "in png_write_tEXt\n"); + if (key == NULL || (key_len = png_check_keyword(png_ptr, key, &new_key))==0) + { + png_warning(png_ptr, "Empty keyword in tEXt chunk"); + return; + } + + if (text == NULL || *text == '\0') + text_len = 0; + else + text_len = png_strlen(text); + + /* make sure we include the 0 after the key */ + png_write_chunk_start(png_ptr, (png_bytep)png_tEXt, (png_uint_32)key_len+text_len+1); + /* + * We leave it to the application to meet PNG-1.0 requirements on the + * contents of the text. PNG-1.0 through PNG-1.2 discourage the use of + * any non-Latin-1 characters except for NEWLINE. ISO PNG will forbid them. + * The NUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG. + */ + png_write_chunk_data(png_ptr, (png_bytep)new_key, key_len + 1); + if (text_len) + png_write_chunk_data(png_ptr, (png_bytep)text, text_len); + + png_write_chunk_end(png_ptr); + png_free(png_ptr, new_key); +} +#endif + +#if defined(PNG_WRITE_zTXt_SUPPORTED) +/* write a compressed text chunk */ +void /* PRIVATE */ +png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text, + png_size_t text_len, int compression) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_zTXt; +#endif + png_size_t key_len; + char buf[1]; + png_charp new_key; + compression_state comp; + + png_debug(1, "in png_write_zTXt\n"); + + if (key == NULL || (key_len = png_check_keyword(png_ptr, key, &new_key))==0) + { + png_warning(png_ptr, "Empty keyword in zTXt chunk"); + return; + } + + if (text == NULL || *text == '\0' || compression==PNG_TEXT_COMPRESSION_NONE) + { + png_write_tEXt(png_ptr, new_key, text, (png_size_t)0); + png_free(png_ptr, new_key); + return; + } + + text_len = png_strlen(text); + + png_free(png_ptr, new_key); + + /* compute the compressed data; do it now for the length */ + text_len = png_text_compress(png_ptr, text, text_len, compression, + &comp); + + /* write start of chunk */ + png_write_chunk_start(png_ptr, (png_bytep)png_zTXt, (png_uint_32) + (key_len+text_len+2)); + /* write key */ + png_write_chunk_data(png_ptr, (png_bytep)key, key_len + 1); + buf[0] = (png_byte)compression; + /* write compression */ + png_write_chunk_data(png_ptr, (png_bytep)buf, (png_size_t)1); + /* write the compressed data */ + png_write_compressed_data_out(png_ptr, &comp); + + /* close the chunk */ + png_write_chunk_end(png_ptr); +} +#endif + +#if defined(PNG_WRITE_iTXt_SUPPORTED) +/* write an iTXt chunk */ +void /* PRIVATE */ +png_write_iTXt(png_structp png_ptr, int compression, png_charp key, + png_charp lang, png_charp lang_key, png_charp text) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_iTXt; +#endif + png_size_t lang_len, key_len, lang_key_len, text_len; + png_charp new_lang, new_key; + png_byte cbuf[2]; + compression_state comp; + + png_debug(1, "in png_write_iTXt\n"); + + if (key == NULL || (key_len = png_check_keyword(png_ptr, key, &new_key))==0) + { + png_warning(png_ptr, "Empty keyword in iTXt chunk"); + return; + } + if (lang == NULL || (lang_len = png_check_keyword(png_ptr, lang, &new_lang))==0) + { + png_warning(png_ptr, "Empty language field in iTXt chunk"); + new_lang = NULL; + lang_len = 0; + } + + if (lang_key == NULL) + lang_key_len = 0; + else + lang_key_len = png_strlen(lang_key); + + if (text == NULL) + text_len = 0; + else + text_len = png_strlen(text); + + /* compute the compressed data; do it now for the length */ + text_len = png_text_compress(png_ptr, text, text_len, compression-2, + &comp); + + + /* make sure we include the compression flag, the compression byte, + * and the NULs after the key, lang, and lang_key parts */ + + png_write_chunk_start(png_ptr, (png_bytep)png_iTXt, + (png_uint_32)( + 5 /* comp byte, comp flag, terminators for key, lang and lang_key */ + + key_len + + lang_len + + lang_key_len + + text_len)); + + /* + * We leave it to the application to meet PNG-1.0 requirements on the + * contents of the text. PNG-1.0 through PNG-1.2 discourage the use of + * any non-Latin-1 characters except for NEWLINE. ISO PNG will forbid them. + * The NUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG. + */ + png_write_chunk_data(png_ptr, (png_bytep)new_key, key_len + 1); + + /* set the compression flag */ + if (compression == PNG_ITXT_COMPRESSION_NONE || \ + compression == PNG_TEXT_COMPRESSION_NONE) + cbuf[0] = 0; + else /* compression == PNG_ITXT_COMPRESSION_zTXt */ + cbuf[0] = 1; + /* set the compression method */ + cbuf[1] = 0; + png_write_chunk_data(png_ptr, cbuf, 2); + + cbuf[0] = 0; + png_write_chunk_data(png_ptr, (new_lang ? (png_bytep)new_lang : cbuf), lang_len + 1); + png_write_chunk_data(png_ptr, (lang_key ? (png_bytep)lang_key : cbuf), lang_key_len + 1); + png_write_compressed_data_out(png_ptr, &comp); + + png_write_chunk_end(png_ptr); + png_free(png_ptr, new_key); + if (new_lang) + png_free(png_ptr, new_lang); +} +#endif + +#if defined(PNG_WRITE_oFFs_SUPPORTED) +/* write the oFFs chunk */ +void /* PRIVATE */ +png_write_oFFs(png_structp png_ptr, png_int_32 x_offset, png_int_32 y_offset, + int unit_type) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_oFFs; +#endif + png_byte buf[9]; + + png_debug(1, "in png_write_oFFs\n"); + if (unit_type >= PNG_OFFSET_LAST) + png_warning(png_ptr, "Unrecognized unit type for oFFs chunk"); + + png_save_int_32(buf, x_offset); + png_save_int_32(buf + 4, y_offset); + buf[8] = (png_byte)unit_type; + + png_write_chunk(png_ptr, (png_bytep)png_oFFs, buf, (png_size_t)9); +} +#endif + +#if defined(PNG_WRITE_pCAL_SUPPORTED) +/* write the pCAL chunk (described in the PNG extensions document) */ +void /* PRIVATE */ +png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0, + png_int_32 X1, int type, int nparams, png_charp units, png_charpp params) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_pCAL; +#endif + png_size_t purpose_len, units_len, total_len; + png_uint_32p params_len; + png_byte buf[10]; + png_charp new_purpose; + int i; + + png_debug1(1, "in png_write_pCAL (%d parameters)\n", nparams); + if (type >= PNG_EQUATION_LAST) + png_warning(png_ptr, "Unrecognized equation type for pCAL chunk"); + + purpose_len = png_check_keyword(png_ptr, purpose, &new_purpose) + 1; + png_debug1(3, "pCAL purpose length = %d\n", (int)purpose_len); + units_len = png_strlen(units) + (nparams == 0 ? 0 : 1); + png_debug1(3, "pCAL units length = %d\n", (int)units_len); + total_len = purpose_len + units_len + 10; + + params_len = (png_uint_32p)png_malloc(png_ptr, (png_uint_32)(nparams + *sizeof(png_uint_32))); + + /* Find the length of each parameter, making sure we don't count the + null terminator for the last parameter. */ + for (i = 0; i < nparams; i++) + { + params_len[i] = png_strlen(params[i]) + (i == nparams - 1 ? 0 : 1); + png_debug2(3, "pCAL parameter %d length = %lu\n", i, params_len[i]); + total_len += (png_size_t)params_len[i]; + } + + png_debug1(3, "pCAL total length = %d\n", (int)total_len); + png_write_chunk_start(png_ptr, (png_bytep)png_pCAL, (png_uint_32)total_len); + png_write_chunk_data(png_ptr, (png_bytep)new_purpose, purpose_len); + png_save_int_32(buf, X0); + png_save_int_32(buf + 4, X1); + buf[8] = (png_byte)type; + buf[9] = (png_byte)nparams; + png_write_chunk_data(png_ptr, buf, (png_size_t)10); + png_write_chunk_data(png_ptr, (png_bytep)units, (png_size_t)units_len); + + png_free(png_ptr, new_purpose); + + for (i = 0; i < nparams; i++) + { + png_write_chunk_data(png_ptr, (png_bytep)params[i], + (png_size_t)params_len[i]); + } + + png_free(png_ptr, params_len); + png_write_chunk_end(png_ptr); +} +#endif + +#if defined(PNG_WRITE_sCAL_SUPPORTED) +/* write the sCAL chunk */ +#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO) +void /* PRIVATE */ +png_write_sCAL(png_structp png_ptr, int unit, double width,double height) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_sCAL; +#endif + png_size_t total_len; + char wbuf[32], hbuf[32]; + + png_debug(1, "in png_write_sCAL\n"); + +#if defined(_WIN32_WCE) +/* sprintf() function is not supported on WindowsCE */ + { + wchar_t wc_buf[32]; + swprintf(wc_buf, TEXT("%12.12e"), width); + WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, wbuf, 32, NULL, NULL); + swprintf(wc_buf, TEXT("%12.12e"), height); + WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, hbuf, 32, NULL, NULL); + } +#else + sprintf(wbuf, "%12.12e", width); + sprintf(hbuf, "%12.12e", height); +#endif + total_len = 1 + png_strlen(wbuf)+1 + png_strlen(hbuf); + + png_debug1(3, "sCAL total length = %d\n", (int)total_len); + png_write_chunk_start(png_ptr, (png_bytep)png_sCAL, (png_uint_32)total_len); + png_write_chunk_data(png_ptr, (png_bytep)&unit, 1); + png_write_chunk_data(png_ptr, (png_bytep)wbuf, png_strlen(wbuf)+1); + png_write_chunk_data(png_ptr, (png_bytep)hbuf, png_strlen(hbuf)); + + png_write_chunk_end(png_ptr); +} +#else +#ifdef PNG_FIXED_POINT_SUPPORTED +void /* PRIVATE */ +png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width, + png_charp height) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_sCAL; +#endif + png_size_t total_len; + char wbuf[32], hbuf[32]; + + png_debug(1, "in png_write_sCAL_s\n"); + + png_strcpy(wbuf,(const char *)width); + png_strcpy(hbuf,(const char *)height); + total_len = 1 + png_strlen(wbuf)+1 + png_strlen(hbuf); + + png_debug1(3, "sCAL total length = %d\n", total_len); + png_write_chunk_start(png_ptr, (png_bytep)png_sCAL, (png_uint_32)total_len); + png_write_chunk_data(png_ptr, (png_bytep)&unit, 1); + png_write_chunk_data(png_ptr, (png_bytep)wbuf, png_strlen(wbuf)+1); + png_write_chunk_data(png_ptr, (png_bytep)hbuf, png_strlen(hbuf)); + + png_write_chunk_end(png_ptr); +} +#endif +#endif +#endif + +#if defined(PNG_WRITE_pHYs_SUPPORTED) +/* write the pHYs chunk */ +void /* PRIVATE */ +png_write_pHYs(png_structp png_ptr, png_uint_32 x_pixels_per_unit, + png_uint_32 y_pixels_per_unit, + int unit_type) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_pHYs; +#endif + png_byte buf[9]; + + png_debug(1, "in png_write_pHYs\n"); + if (unit_type >= PNG_RESOLUTION_LAST) + png_warning(png_ptr, "Unrecognized unit type for pHYs chunk"); + + png_save_uint_32(buf, x_pixels_per_unit); + png_save_uint_32(buf + 4, y_pixels_per_unit); + buf[8] = (png_byte)unit_type; + + png_write_chunk(png_ptr, (png_bytep)png_pHYs, buf, (png_size_t)9); +} +#endif + +#if defined(PNG_WRITE_tIME_SUPPORTED) +/* Write the tIME chunk. Use either png_convert_from_struct_tm() + * or png_convert_from_time_t(), or fill in the structure yourself. + */ +void /* PRIVATE */ +png_write_tIME(png_structp png_ptr, png_timep mod_time) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + PNG_tIME; +#endif + png_byte buf[7]; + + png_debug(1, "in png_write_tIME\n"); + if (mod_time->month > 12 || mod_time->month < 1 || + mod_time->day > 31 || mod_time->day < 1 || + mod_time->hour > 23 || mod_time->second > 60) + { + png_warning(png_ptr, "Invalid time specified for tIME chunk"); + return; + } + + png_save_uint_16(buf, mod_time->year); + buf[2] = mod_time->month; + buf[3] = mod_time->day; + buf[4] = mod_time->hour; + buf[5] = mod_time->minute; + buf[6] = mod_time->second; + + png_write_chunk(png_ptr, (png_bytep)png_tIME, buf, (png_size_t)7); +} +#endif + +/* initializes the row writing capability of libpng */ +void /* PRIVATE */ +png_write_start_row(png_structp png_ptr) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */ + + /* start of interlace block */ + int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; + + /* offset to next interlace block */ + int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; + + /* start of interlace block in the y direction */ + int png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; + + /* offset to next interlace block in the y direction */ + int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; +#endif + + png_size_t buf_size; + + png_debug(1, "in png_write_start_row\n"); + buf_size = (png_size_t)(((png_ptr->width * png_ptr->usr_channels * + png_ptr->usr_bit_depth + 7) >> 3) + 1); + + /* set up row buffer */ + png_ptr->row_buf = (png_bytep)png_malloc(png_ptr, (png_uint_32)buf_size); + png_ptr->row_buf[0] = PNG_FILTER_VALUE_NONE; + + /* set up filtering buffer, if using this filter */ + if (png_ptr->do_filter & PNG_FILTER_SUB) + { + png_ptr->sub_row = (png_bytep)png_malloc(png_ptr, + (png_ptr->rowbytes + 1)); + png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB; + } + + /* We only need to keep the previous row if we are using one of these. */ + if (png_ptr->do_filter & (PNG_FILTER_AVG | PNG_FILTER_UP | PNG_FILTER_PAETH)) + { + /* set up previous row buffer */ + png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, (png_uint_32)buf_size); + png_memset(png_ptr->prev_row, 0, buf_size); + + if (png_ptr->do_filter & PNG_FILTER_UP) + { + png_ptr->up_row = (png_bytep )png_malloc(png_ptr, + (png_ptr->rowbytes + 1)); + png_ptr->up_row[0] = PNG_FILTER_VALUE_UP; + } + + if (png_ptr->do_filter & PNG_FILTER_AVG) + { + png_ptr->avg_row = (png_bytep)png_malloc(png_ptr, + (png_ptr->rowbytes + 1)); + png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG; + } + + if (png_ptr->do_filter & PNG_FILTER_PAETH) + { + png_ptr->paeth_row = (png_bytep )png_malloc(png_ptr, + (png_ptr->rowbytes + 1)); + png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH; + } + } + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + /* if interlaced, we need to set up width and height of pass */ + if (png_ptr->interlaced) + { + if (!(png_ptr->transformations & PNG_INTERLACE)) + { + png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 - + png_pass_ystart[0]) / png_pass_yinc[0]; + png_ptr->usr_width = (png_ptr->width + png_pass_inc[0] - 1 - + png_pass_start[0]) / png_pass_inc[0]; + } + else + { + png_ptr->num_rows = png_ptr->height; + png_ptr->usr_width = png_ptr->width; + } + } + else +#endif + { + png_ptr->num_rows = png_ptr->height; + png_ptr->usr_width = png_ptr->width; + } + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + png_ptr->zstream.next_out = png_ptr->zbuf; +} + +/* Internal use only. Called when finished processing a row of data. */ +void /* PRIVATE */ +png_write_finish_row(png_structp png_ptr) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */ + + /* start of interlace block */ + int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; + + /* offset to next interlace block */ + int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; + + /* start of interlace block in the y direction */ + int png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; + + /* offset to next interlace block in the y direction */ + int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; +#endif + + int ret; + + png_debug(1, "in png_write_finish_row\n"); + /* next row */ + png_ptr->row_number++; + + /* see if we are done */ + if (png_ptr->row_number < png_ptr->num_rows) + return; + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + /* if interlaced, go to next pass */ + if (png_ptr->interlaced) + { + png_ptr->row_number = 0; + if (png_ptr->transformations & PNG_INTERLACE) + { + png_ptr->pass++; + } + else + { + /* loop until we find a non-zero width or height pass */ + do + { + png_ptr->pass++; + if (png_ptr->pass >= 7) + break; + png_ptr->usr_width = (png_ptr->width + + png_pass_inc[png_ptr->pass] - 1 - + png_pass_start[png_ptr->pass]) / + png_pass_inc[png_ptr->pass]; + png_ptr->num_rows = (png_ptr->height + + png_pass_yinc[png_ptr->pass] - 1 - + png_pass_ystart[png_ptr->pass]) / + png_pass_yinc[png_ptr->pass]; + if (png_ptr->transformations & PNG_INTERLACE) + break; + } while (png_ptr->usr_width == 0 || png_ptr->num_rows == 0); + + } + + /* reset the row above the image for the next pass */ + if (png_ptr->pass < 7) + { + if (png_ptr->prev_row != NULL) + png_memset(png_ptr->prev_row, 0, + (png_size_t) (((png_uint_32)png_ptr->usr_channels * + (png_uint_32)png_ptr->usr_bit_depth * + png_ptr->width + 7) >> 3) + 1); + return; + } + } +#endif + + /* if we get here, we've just written the last row, so we need + to flush the compressor */ + do + { + /* tell the compressor we are done */ + ret = deflate(&png_ptr->zstream, Z_FINISH); + /* check for an error */ + if (ret == Z_OK) + { + /* check to see if we need more room */ + if (!(png_ptr->zstream.avail_out)) + { + png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size); + png_ptr->zstream.next_out = png_ptr->zbuf; + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + } + } + else if (ret != Z_STREAM_END) + { + if (png_ptr->zstream.msg != NULL) + png_error(png_ptr, png_ptr->zstream.msg); + else + png_error(png_ptr, "zlib error"); + } + } while (ret != Z_STREAM_END); + + /* write any extra space */ + if (png_ptr->zstream.avail_out < png_ptr->zbuf_size) + { + png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size - + png_ptr->zstream.avail_out); + } + + deflateReset(&png_ptr->zstream); +} + +#if defined(PNG_WRITE_INTERLACING_SUPPORTED) +/* Pick out the correct pixels for the interlace pass. + * The basic idea here is to go through the row with a source + * pointer and a destination pointer (sp and dp), and copy the + * correct pixels for the pass. As the row gets compacted, + * sp will always be >= dp, so we should never overwrite anything. + * See the default: case for the easiest code to understand. + */ +void /* PRIVATE */ +png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass) +{ +#ifdef PNG_USE_LOCAL_ARRAYS + /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */ + + /* start of interlace block */ + int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; + + /* offset to next interlace block */ + int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; +#endif + + png_debug(1, "in png_do_write_interlace\n"); + /* we don't have to do anything on the last pass (6) */ +#if defined(PNG_USELESS_TESTS_SUPPORTED) + if (row != NULL && row_info != NULL && pass < 6) +#else + if (pass < 6) +#endif + { + /* each pixel depth is handled separately */ + switch (row_info->pixel_depth) + { + case 1: + { + png_bytep sp; + png_bytep dp; + int shift; + int d; + int value; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + dp = row; + d = 0; + shift = 7; + for (i = png_pass_start[pass]; i < row_width; + i += png_pass_inc[pass]) + { + sp = row + (png_size_t)(i >> 3); + value = (int)(*sp >> (7 - (int)(i & 0x07))) & 0x01; + d |= (value << shift); + + if (shift == 0) + { + shift = 7; + *dp++ = (png_byte)d; + d = 0; + } + else + shift--; + + } + if (shift != 7) + *dp = (png_byte)d; + break; + } + case 2: + { + png_bytep sp; + png_bytep dp; + int shift; + int d; + int value; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + dp = row; + shift = 6; + d = 0; + for (i = png_pass_start[pass]; i < row_width; + i += png_pass_inc[pass]) + { + sp = row + (png_size_t)(i >> 2); + value = (*sp >> ((3 - (int)(i & 0x03)) << 1)) & 0x03; + d |= (value << shift); + + if (shift == 0) + { + shift = 6; + *dp++ = (png_byte)d; + d = 0; + } + else + shift -= 2; + } + if (shift != 6) + *dp = (png_byte)d; + break; + } + case 4: + { + png_bytep sp; + png_bytep dp; + int shift; + int d; + int value; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + dp = row; + shift = 4; + d = 0; + for (i = png_pass_start[pass]; i < row_width; + i += png_pass_inc[pass]) + { + sp = row + (png_size_t)(i >> 1); + value = (*sp >> ((1 - (int)(i & 0x01)) << 2)) & 0x0f; + d |= (value << shift); + + if (shift == 0) + { + shift = 4; + *dp++ = (png_byte)d; + d = 0; + } + else + shift -= 4; + } + if (shift != 4) + *dp = (png_byte)d; + break; + } + default: + { + png_bytep sp; + png_bytep dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + png_size_t pixel_bytes; + + /* start at the beginning */ + dp = row; + /* find out how many bytes each pixel takes up */ + pixel_bytes = (row_info->pixel_depth >> 3); + /* loop through the row, only looking at the pixels that + matter */ + for (i = png_pass_start[pass]; i < row_width; + i += png_pass_inc[pass]) + { + /* find out where the original pixel is */ + sp = row + (png_size_t)i * pixel_bytes; + /* move the pixel */ + if (dp != sp) + png_memcpy(dp, sp, pixel_bytes); + /* next pixel */ + dp += pixel_bytes; + } + break; + } + } + /* set new row width */ + row_info->width = (row_info->width + + png_pass_inc[pass] - 1 - + png_pass_start[pass]) / + png_pass_inc[pass]; + row_info->rowbytes = ((row_info->width * + row_info->pixel_depth + 7) >> 3); + } +} +#endif + +/* This filters the row, chooses which filter to use, if it has not already + * been specified by the application, and then writes the row out with the + * chosen filter. + */ +#define PNG_MAXSUM (~((png_uint_32)0) >> 1) +#define PNG_HISHIFT 10 +#define PNG_LOMASK ((png_uint_32)0xffffL) +#define PNG_HIMASK ((png_uint_32)(~PNG_LOMASK >> PNG_HISHIFT)) +void /* PRIVATE */ +png_write_find_filter(png_structp png_ptr, png_row_infop row_info) +{ + png_bytep prev_row, best_row, row_buf; + png_uint_32 mins, bpp; + png_byte filter_to_do = png_ptr->do_filter; + png_uint_32 row_bytes = row_info->rowbytes; +#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) + int num_p_filters = (int)png_ptr->num_prev_filters; +#endif + + png_debug(1, "in png_write_find_filter\n"); + /* find out how many bytes offset each pixel is */ + bpp = (row_info->pixel_depth + 7) / 8; + + prev_row = png_ptr->prev_row; + best_row = row_buf = png_ptr->row_buf; + mins = PNG_MAXSUM; + + /* The prediction method we use is to find which method provides the + * smallest value when summing the absolute values of the distances + * from zero, using anything >= 128 as negative numbers. This is known + * as the "minimum sum of absolute differences" heuristic. Other + * heuristics are the "weighted minimum sum of absolute differences" + * (experimental and can in theory improve compression), and the "zlib + * predictive" method (not implemented yet), which does test compressions + * of lines using different filter methods, and then chooses the + * (series of) filter(s) that give minimum compressed data size (VERY + * computationally expensive). + * + * GRR 980525: consider also + * (1) minimum sum of absolute differences from running average (i.e., + * keep running sum of non-absolute differences & count of bytes) + * [track dispersion, too? restart average if dispersion too large?] + * (1b) minimum sum of absolute differences from sliding average, probably + * with window size <= deflate window (usually 32K) + * (2) minimum sum of squared differences from zero or running average + * (i.e., ~ root-mean-square approach) + */ + + + /* We don't need to test the 'no filter' case if this is the only filter + * that has been chosen, as it doesn't actually do anything to the data. + */ + if ((filter_to_do & PNG_FILTER_NONE) && + filter_to_do != PNG_FILTER_NONE) + { + png_bytep rp; + png_uint_32 sum = 0; + png_uint_32 i; + int v; + + for (i = 0, rp = row_buf + 1; i < row_bytes; i++, rp++) + { + v = *rp; + sum += (v < 128) ? v : 256 - v; + } + +#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) + if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + png_uint_32 sumhi, sumlo; + int j; + sumlo = sum & PNG_LOMASK; + sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; /* Gives us some footroom */ + + /* Reduce the sum if we match any of the previous rows */ + for (j = 0; j < num_p_filters; j++) + { + if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_NONE) + { + sumlo = (sumlo * png_ptr->filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + sumhi = (sumhi * png_ptr->filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + } + } + + /* Factor in the cost of this filter (this is here for completeness, + * but it makes no sense to have a "cost" for the NONE filter, as + * it has the minimum possible computational cost - none). + */ + sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_NONE]) >> + PNG_COST_SHIFT; + sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_NONE]) >> + PNG_COST_SHIFT; + + if (sumhi > PNG_HIMASK) + sum = PNG_MAXSUM; + else + sum = (sumhi << PNG_HISHIFT) + sumlo; + } +#endif + mins = sum; + } + + /* sub filter */ + if (filter_to_do == PNG_FILTER_SUB) + /* it's the only filter so no testing is needed */ + { + png_bytep rp, lp, dp; + png_uint_32 i; + for (i = 0, rp = row_buf + 1, dp = png_ptr->sub_row + 1; i < bpp; + i++, rp++, dp++) + { + *dp = *rp; + } + for (lp = row_buf + 1; i < row_bytes; + i++, rp++, lp++, dp++) + { + *dp = (png_byte)(((int)*rp - (int)*lp) & 0xff); + } + best_row = png_ptr->sub_row; + } + + else if (filter_to_do & PNG_FILTER_SUB) + { + png_bytep rp, dp, lp; + png_uint_32 sum = 0, lmins = mins; + png_uint_32 i; + int v; + +#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) + /* We temporarily increase the "minimum sum" by the factor we + * would reduce the sum of this filter, so that we can do the + * early exit comparison without scaling the sum each time. + */ + if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int j; + png_uint_32 lmhi, lmlo; + lmlo = lmins & PNG_LOMASK; + lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; + + for (j = 0; j < num_p_filters; j++) + { + if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_SUB) + { + lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + } + } + + lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> + PNG_COST_SHIFT; + lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> + PNG_COST_SHIFT; + + if (lmhi > PNG_HIMASK) + lmins = PNG_MAXSUM; + else + lmins = (lmhi << PNG_HISHIFT) + lmlo; + } +#endif + + for (i = 0, rp = row_buf + 1, dp = png_ptr->sub_row + 1; i < bpp; + i++, rp++, dp++) + { + v = *dp = *rp; + + sum += (v < 128) ? v : 256 - v; + } + for (lp = row_buf + 1; i < row_info->rowbytes; + i++, rp++, lp++, dp++) + { + v = *dp = (png_byte)(((int)*rp - (int)*lp) & 0xff); + + sum += (v < 128) ? v : 256 - v; + + if (sum > lmins) /* We are already worse, don't continue. */ + break; + } + +#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) + if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int j; + png_uint_32 sumhi, sumlo; + sumlo = sum & PNG_LOMASK; + sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; + + for (j = 0; j < num_p_filters; j++) + { + if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_SUB) + { + sumlo = (sumlo * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + sumhi = (sumhi * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + } + } + + sumlo = (sumlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> + PNG_COST_SHIFT; + sumhi = (sumhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> + PNG_COST_SHIFT; + + if (sumhi > PNG_HIMASK) + sum = PNG_MAXSUM; + else + sum = (sumhi << PNG_HISHIFT) + sumlo; + } +#endif + + if (sum < mins) + { + mins = sum; + best_row = png_ptr->sub_row; + } + } + + /* up filter */ + if (filter_to_do == PNG_FILTER_UP) + { + png_bytep rp, dp, pp; + png_uint_32 i; + + for (i = 0, rp = row_buf + 1, dp = png_ptr->up_row + 1, + pp = prev_row + 1; i < row_bytes; + i++, rp++, pp++, dp++) + { + *dp = (png_byte)(((int)*rp - (int)*pp) & 0xff); + } + best_row = png_ptr->up_row; + } + + else if (filter_to_do & PNG_FILTER_UP) + { + png_bytep rp, dp, pp; + png_uint_32 sum = 0, lmins = mins; + png_uint_32 i; + int v; + + +#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) + if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int j; + png_uint_32 lmhi, lmlo; + lmlo = lmins & PNG_LOMASK; + lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; + + for (j = 0; j < num_p_filters; j++) + { + if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_UP) + { + lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + } + } + + lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_UP]) >> + PNG_COST_SHIFT; + lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_UP]) >> + PNG_COST_SHIFT; + + if (lmhi > PNG_HIMASK) + lmins = PNG_MAXSUM; + else + lmins = (lmhi << PNG_HISHIFT) + lmlo; + } +#endif + + for (i = 0, rp = row_buf + 1, dp = png_ptr->up_row + 1, + pp = prev_row + 1; i < row_bytes; i++) + { + v = *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff); + + sum += (v < 128) ? v : 256 - v; + + if (sum > lmins) /* We are already worse, don't continue. */ + break; + } + +#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) + if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int j; + png_uint_32 sumhi, sumlo; + sumlo = sum & PNG_LOMASK; + sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; + + for (j = 0; j < num_p_filters; j++) + { + if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_UP) + { + sumlo = (sumlo * png_ptr->filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + sumhi = (sumhi * png_ptr->filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + } + } + + sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_UP]) >> + PNG_COST_SHIFT; + sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_UP]) >> + PNG_COST_SHIFT; + + if (sumhi > PNG_HIMASK) + sum = PNG_MAXSUM; + else + sum = (sumhi << PNG_HISHIFT) + sumlo; + } +#endif + + if (sum < mins) + { + mins = sum; + best_row = png_ptr->up_row; + } + } + + /* avg filter */ + if (filter_to_do == PNG_FILTER_AVG) + { + png_bytep rp, dp, pp, lp; + png_uint_32 i; + for (i = 0, rp = row_buf + 1, dp = png_ptr->avg_row + 1, + pp = prev_row + 1; i < bpp; i++) + { + *dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff); + } + for (lp = row_buf + 1; i < row_bytes; i++) + { + *dp++ = (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2)) + & 0xff); + } + best_row = png_ptr->avg_row; + } + + else if (filter_to_do & PNG_FILTER_AVG) + { + png_bytep rp, dp, pp, lp; + png_uint_32 sum = 0, lmins = mins; + png_uint_32 i; + int v; + +#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) + if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int j; + png_uint_32 lmhi, lmlo; + lmlo = lmins & PNG_LOMASK; + lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; + + for (j = 0; j < num_p_filters; j++) + { + if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_AVG) + { + lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + } + } + + lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_AVG]) >> + PNG_COST_SHIFT; + lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_AVG]) >> + PNG_COST_SHIFT; + + if (lmhi > PNG_HIMASK) + lmins = PNG_MAXSUM; + else + lmins = (lmhi << PNG_HISHIFT) + lmlo; + } +#endif + + for (i = 0, rp = row_buf + 1, dp = png_ptr->avg_row + 1, + pp = prev_row + 1; i < bpp; i++) + { + v = *dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff); + + sum += (v < 128) ? v : 256 - v; + } + for (lp = row_buf + 1; i < row_bytes; i++) + { + v = *dp++ = + (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2)) & 0xff); + + sum += (v < 128) ? v : 256 - v; + + if (sum > lmins) /* We are already worse, don't continue. */ + break; + } + +#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) + if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int j; + png_uint_32 sumhi, sumlo; + sumlo = sum & PNG_LOMASK; + sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; + + for (j = 0; j < num_p_filters; j++) + { + if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_NONE) + { + sumlo = (sumlo * png_ptr->filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + sumhi = (sumhi * png_ptr->filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + } + } + + sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_AVG]) >> + PNG_COST_SHIFT; + sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_AVG]) >> + PNG_COST_SHIFT; + + if (sumhi > PNG_HIMASK) + sum = PNG_MAXSUM; + else + sum = (sumhi << PNG_HISHIFT) + sumlo; + } +#endif + + if (sum < mins) + { + mins = sum; + best_row = png_ptr->avg_row; + } + } + + /* Paeth filter */ + if (filter_to_do == PNG_FILTER_PAETH) + { + png_bytep rp, dp, pp, cp, lp; + png_uint_32 i; + for (i = 0, rp = row_buf + 1, dp = png_ptr->paeth_row + 1, + pp = prev_row + 1; i < bpp; i++) + { + *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff); + } + + for (lp = row_buf + 1, cp = prev_row + 1; i < row_bytes; i++) + { + int a, b, c, pa, pb, pc, p; + + b = *pp++; + c = *cp++; + a = *lp++; + + p = b - c; + pc = a - c; + +#ifdef PNG_USE_ABS + pa = abs(p); + pb = abs(pc); + pc = abs(p + pc); +#else + pa = p < 0 ? -p : p; + pb = pc < 0 ? -pc : pc; + pc = (p + pc) < 0 ? -(p + pc) : p + pc; +#endif + + p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c; + + *dp++ = (png_byte)(((int)*rp++ - p) & 0xff); + } + best_row = png_ptr->paeth_row; + } + + else if (filter_to_do & PNG_FILTER_PAETH) + { + png_bytep rp, dp, pp, cp, lp; + png_uint_32 sum = 0, lmins = mins; + png_uint_32 i; + int v; + +#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) + if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int j; + png_uint_32 lmhi, lmlo; + lmlo = lmins & PNG_LOMASK; + lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; + + for (j = 0; j < num_p_filters; j++) + { + if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_PAETH) + { + lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + } + } + + lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_PAETH]) >> + PNG_COST_SHIFT; + lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_PAETH]) >> + PNG_COST_SHIFT; + + if (lmhi > PNG_HIMASK) + lmins = PNG_MAXSUM; + else + lmins = (lmhi << PNG_HISHIFT) + lmlo; + } +#endif + + for (i = 0, rp = row_buf + 1, dp = png_ptr->paeth_row + 1, + pp = prev_row + 1; i < bpp; i++) + { + v = *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff); + + sum += (v < 128) ? v : 256 - v; + } + + for (lp = row_buf + 1, cp = prev_row + 1; i < row_bytes; i++) + { + int a, b, c, pa, pb, pc, p; + + b = *pp++; + c = *cp++; + a = *lp++; + +#ifndef PNG_SLOW_PAETH + p = b - c; + pc = a - c; +#ifdef PNG_USE_ABS + pa = abs(p); + pb = abs(pc); + pc = abs(p + pc); +#else + pa = p < 0 ? -p : p; + pb = pc < 0 ? -pc : pc; + pc = (p + pc) < 0 ? -(p + pc) : p + pc; +#endif + p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c; +#else /* PNG_SLOW_PAETH */ + p = a + b - c; + pa = abs(p - a); + pb = abs(p - b); + pc = abs(p - c); + if (pa <= pb && pa <= pc) + p = a; + else if (pb <= pc) + p = b; + else + p = c; +#endif /* PNG_SLOW_PAETH */ + + v = *dp++ = (png_byte)(((int)*rp++ - p) & 0xff); + + sum += (v < 128) ? v : 256 - v; + + if (sum > lmins) /* We are already worse, don't continue. */ + break; + } + +#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) + if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) + { + int j; + png_uint_32 sumhi, sumlo; + sumlo = sum & PNG_LOMASK; + sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; + + for (j = 0; j < num_p_filters; j++) + { + if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_PAETH) + { + sumlo = (sumlo * png_ptr->filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + sumhi = (sumhi * png_ptr->filter_weights[j]) >> + PNG_WEIGHT_SHIFT; + } + } + + sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_PAETH]) >> + PNG_COST_SHIFT; + sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_PAETH]) >> + PNG_COST_SHIFT; + + if (sumhi > PNG_HIMASK) + sum = PNG_MAXSUM; + else + sum = (sumhi << PNG_HISHIFT) + sumlo; + } +#endif + + if (sum < mins) + { + best_row = png_ptr->paeth_row; + } + } + + /* Do the actual writing of the filtered row data from the chosen filter. */ + + png_write_filtered_row(png_ptr, best_row); + +#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) + /* Save the type of filter we picked this time for future calculations */ + if (png_ptr->num_prev_filters > 0) + { + int j; + for (j = 1; j < num_p_filters; j++) + { + png_ptr->prev_filters[j] = png_ptr->prev_filters[j - 1]; + } + png_ptr->prev_filters[j] = best_row[0]; + } +#endif +} + + +/* Do the actual writing of a previously filtered row. */ +void /* PRIVATE */ +png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row) +{ + png_debug(1, "in png_write_filtered_row\n"); + png_debug1(2, "filter = %d\n", filtered_row[0]); + /* set up the zlib input buffer */ + + png_ptr->zstream.next_in = filtered_row; + png_ptr->zstream.avail_in = (uInt)png_ptr->row_info.rowbytes + 1; + /* repeat until we have compressed all the data */ + do + { + int ret; /* return of zlib */ + + /* compress the data */ + ret = deflate(&png_ptr->zstream, Z_NO_FLUSH); + /* check for compression errors */ + if (ret != Z_OK) + { + if (png_ptr->zstream.msg != NULL) + png_error(png_ptr, png_ptr->zstream.msg); + else + png_error(png_ptr, "zlib error"); + } + + /* see if it is time to write another IDAT */ + if (!(png_ptr->zstream.avail_out)) + { + /* write the IDAT and reset the zlib output buffer */ + png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size); + png_ptr->zstream.next_out = png_ptr->zbuf; + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + } + /* repeat until all data has been compressed */ + } while (png_ptr->zstream.avail_in); + + /* swap the current and previous rows */ + if (png_ptr->prev_row != NULL) + { + png_bytep tptr; + + tptr = png_ptr->prev_row; + png_ptr->prev_row = png_ptr->row_buf; + png_ptr->row_buf = tptr; + } + + /* finish row - updates counters and flushes zlib if last row */ + png_write_finish_row(png_ptr); + +#if defined(PNG_WRITE_FLUSH_SUPPORTED) + png_ptr->flush_rows++; + + if (png_ptr->flush_dist > 0 && + png_ptr->flush_rows >= png_ptr->flush_dist) + { + png_write_flush(png_ptr); + } +#endif +} +#endif /* PNG_WRITE_SUPPORTED */ diff --git a/gtkmm-osx/libpng-1.2.5/projects/beos/x86-shared.proj b/gtkmm-osx/libpng-1.2.5/projects/beos/x86-shared.proj new file mode 100644 index 0000000000000000000000000000000000000000..6d2e3c31998f36b1fc44eb440f0c730f011d53f7 GIT binary patch literal 17031 zcmeHPUu+yl8K3QKle25bm&E^KJI#f(32kIwt3pMSqQuELPN?mid~VaCHrMsu`n-5= z_cXiylU9g*h@gtf15lyx#zP+p52!qW5JGu~0HLZceKBf?O5-|Vct zcFxIh=cv~CMxNdI^L;bl{C4Ks@4lJ!_=WTcV`sjT&hQz=j{hRVM{LHJ`Z+>|zr-nx z7|U>T0rxoKZUvY0u&(2lK-`5$;bBB2oAG9GBRZy}rX9yi<&6cya!RRLL(3c7O-&nA zxkEw}4^|luy;RyEU|^V4;8Aj1b7`j_at}N#b9$$sur|&LcuX6Pn{uzXo>5HgI7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>M45kDEp6fDVT37d!7ugRbaxP73bjO~-(K5;X)eYQ_BY*fF z+;9r6F$cn}b-gOwYV(h7Xnqg!tq@-dAu&44Sd1Pkg&Hsl&)tOx&^z}LbYgJs@J0jb z#77w2jjaU=ehQpKY@`{5DbX4%-Xg%F zFcpnrL%{_7bnu4(O0~eWnSLs9e9h5NKqVRLzg7XLN2;4o!P^4-a@mD%i-yCAX2d@$ z;M7(fPMfVeZaNJ$ov`j+odirt#Hf0z5~j`89rw6qHyTj+%K(W+90jVqy7{yzQ2702 zH55=7Y1exIi9!uPZMN{-2D1yW@E(Tpg|A^fOnd5^PqgmbhMG@FLP&<_d`eUY)MhWd zg$A_8m0ayOZMNpCAoVxM=fNC7e zAmaZM?>hoZIUjsyPw86ye-{eEJ@*Rj3Q(Z7DEMfe?$s^nd$`zS2bY89YwaM=8IVZ+ z<_eu>;n%6Mm)Gj+Ca1RA^Rt5!egB76pqA)8$9 zM-IO9jDB4y9kLa5EY4lhXVq^EX-sxWACIgHzRbzTehk?omAc&UajER}2yxT2kxz-X PZ8~JH9RDDKPHFxR(DFj< literal 0 HcmV?d00001 diff --git a/gtkmm-osx/libpng-1.2.5/projects/beos/x86-shared.txt b/gtkmm-osx/libpng-1.2.5/projects/beos/x86-shared.txt new file mode 100644 index 0000000..0cd4d9d --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/beos/x86-shared.txt @@ -0,0 +1,22 @@ +This project builds a shared library version of libpng on x86 BeOS. + +It defines PNG_USE_PNGGCCRD, which activates the assembly code in +pnggccrd.c; this hasn't been extensively tested on BeOS. + +To install: + +1) build + + Note: As of version 1.0.10, you'll get a fair number of warnings when + you compile pnggccrd.c. As far as I know, these are harmless, + but it would be better if someone fixed them. + +2) copy and png.h, pngconf.h somewhere; /boot/home/config/include (which + you'll have to make) is a good choice + +3) copy libpng.so to /boot/home/config/lib + +4) build your libpng.so applications (remember to include libz.a as + well when you link) + +- Chris Herborth, March 27, 2001 diff --git a/gtkmm-osx/libpng-1.2.5/projects/beos/x86-static.proj b/gtkmm-osx/libpng-1.2.5/projects/beos/x86-static.proj new file mode 100644 index 0000000000000000000000000000000000000000..37c0753664a682120b138d997f0886ba4354e9b5 GIT binary patch literal 16706 zcmeHOO>7&-6`nOWHl`CW7}Rb&lkCAmy&Z_%X7y~&T#77 zA*mVWnp6Av)jQP))!j8&Ya7bJg7CARMH5JLI4xe@V&_)k|t3C9~ zSjj4AZqdmP!P2jy{t)tpe(I{(uCs+Mh;s3Qx@Ts=^K8qdr%52(zMR8L=9OHLyDqm1 z+{sl-_c-XT{bkxI6d3E+i^?A4*viR4zo6?m)3D}IZ!D1rTa>g?3BYTfVOz=NL~$um za_k>*9k-#*6j`ThR27f)i>?LVAHJV746DI`swva`_u`OhgzRdQJB@pHtmjx>&Z#TDQ!=>8v z+QmS8d21Zbt&oMD6I+qCL>8}TZVOo=jA>F3tlj3GZOtkKS?uj1i^>!S&Q7x`Z3#bc zaV0R{^gS9A@9u;D8ROP4bW2WL%Fugzf2vd(%^RNWWXOvX{t|hOtE;PDb)sKU@Q0s( zO+BjXI$SGNg*qd4v1FLsxmY4c#)W^#SYozh=<&qGCsA&vHUez~b`}ECOdQUeYi8mC zUb=2K5<3f$wzh2q+6Yu5AYG6?itwOaeXf+(Jf1-egkIpKtHItbF6k8EeVsZG91;G> z^7oz+eg@k8UA00N_Yy8ZoDfl}q0o!QnD?BdD)GQAVte5hUC^w;f>z+6oMKE#mymQl zf%{antxK9?8CF3MZ;UWWrbnxos>#=d4HzZ)3j!m($F#k&&A2T{<&4mU}Kcn!^<|Q|a$Nu`Wit)JC9x-mxf|JK^4i zrX_q&d^B_bZ!;-vSFn{AM_acx0{4o5G$=h&ZkoP+sZ-odYo74P6xsJA{6LE49fBXI zE;jgwd!OcWLatN5W`sz`y4%UNU6 zS#xX8x`BFc+Hf^|(k$YOn~cR_$S6%f!%OOi!?DLqdqy)6dUHtuK}H2i0jY8zJ4awB zYIcsB<{GLA%f{EnSp@C^>Yer*priH|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Release=0 +Special=0 +Private=0 +DLL=1 +Locale=2057 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +Comments= + +[HistoryLists\hlIncludePath] +Count=18 +Item0=..\..;..\..\..\zlib;$(BCB)\include +Item1=..\..;P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include +Item2=..\..;..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression\external;$(BCB)\include +Item3=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression\external;$(BCB)\include +Item4=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression;$(BCB)\include +Item5=..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression;$(BCB)\include +Item6=..\Source\ThirdParty\PortableNetworkGraphics;P:\Development\Source\ThirdParty\ZLibCompression;$(BCB)\include +Item7=..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\include +Item8=$(BCB)\include +Item9=..\Source;..\Source\General\Templates;..\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl +Item10=P:\Development\Source\;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl +Item11=P:\Development\Source;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl +Item12=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl +Item13=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl +Item14=P:\Development\Source\General\Templates\;$(BCB)\include;$(BCB)\include\vcl +Item15=P:\Development\Source\General\Templates;$(BCB)\include;$(BCB)\include\vcl +Item16=P:\Development\Source;$(BCB)\include;$(BCB)\include\vcl +Item17=$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=10 +Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..;..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib +Item4=$(BCB)\lib\obj;$(BCB)\lib +Item5=..\Source\SIMUtilities;..\Source;$(BCB)\lib\obj;$(BCB)\lib +Item6=P:\Development\Source\SIMUtilities\;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib +Item7=P:\Development\Source\SIMUtilities;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib +Item8=P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib +Item9=P:\Development\Source;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=20 +Item0=ZLIB_DLL;Z_PREFIX;PNG_BUILD_DLL;PNG_NO_MODULEDEF +Item1=_DEBUG;ZLIB_DLL;Z_PREFIX;PNG_BUILD_DLL;PNG_NO_MODULEDEF +Item2=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_NO_MODULEDEF +Item3=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_NO_GLOBAL_ARRAYS +Item4=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED;PNG_DEBUG_FILE=stderr +Item5=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED +Item6=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED +Item7=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF +Item8=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5 +Item9=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG +Item10=PNG_BUILD_DLL;ZLIB_DLL +Item11=PNG_BUILD_DLL +Item12=PNG_DLL;PNG_BUILD_DLL;ZLIB_DLL +Item13=PNG_DLL;PNG_BUILD_DLL;PNG_NO_GLOBAL_ARRAYS;ZLIB_DLL +Item14=PNG_DLL;PNG_BUILD_DLL;PNG_NO_GLOBAL_ARRAYS +Item15=PNG_DLL;PNG_BUILD_DLL +Item16=PNG_DLL;PNG_BUILD_DLL;PNG_MODULEDEF +Item17=_HTML_FORM +Item18=_DEBUG;_HTML_FORM +Item19=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=..\Obj +Item1=P:\Development\Obj + +[Debugging] +DebugSourceDirs= + +[Parameters] +RunParams= +HostApplication=P:\Development\Executables\LibPNGTestApp.exe +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + + \ No newline at end of file diff --git a/gtkmm-osx/libpng-1.2.5/projects/borland/libpng.cpp b/gtkmm-osx/libpng-1.2.5/projects/borland/libpng.cpp new file mode 100644 index 0000000..2708ad4 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/borland/libpng.cpp @@ -0,0 +1,28 @@ +//--------------------------------------------------------------------------- +#include +//--------------------------------------------------------------------------- +// Important note about DLL memory management when your DLL uses the +// static version of the RunTime Library: +// +// If your DLL exports any functions that pass String objects (or structs/ +// classes containing nested Strings) as parameter or function results, +// you will need to add the library MEMMGR.LIB to both the DLL project and +// any other projects that use the DLL. You will also need to use MEMMGR.LIB +// if any other projects which use the DLL will be performing new or delete +// operations on any non-TObject-derived classes which are exported from the +// DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling +// EXE's to use the BORLNDMM.DLL as their memory manager. In these cases, +// the file BORLNDMM.DLL should be deployed along with your DLL. +// +// To avoid using BORLNDMM.DLL, pass string information using "char *" or +// ShortString parameters. +// +// If your DLL uses the dynamic version of the RTL, you do not need to +// explicitly add MEMMGR.LIB as this will be done implicitly for you +//--------------------------------------------------------------------------- + +int WINAPI DllEntryPoint(HINSTANCE, unsigned long, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- diff --git a/gtkmm-osx/libpng-1.2.5/projects/borland/libpng.readme.txt b/gtkmm-osx/libpng-1.2.5/projects/borland/libpng.readme.txt new file mode 100644 index 0000000..efe7cbd --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/borland/libpng.readme.txt @@ -0,0 +1,19 @@ +Project files to build libpng using Borland C++ Builder v5.0 + +To use this dll, you will need to: + +1) add the following conditional defines to your project + +PNG_USE_DLL +Z_PREFIX + +2) add the paths to png.h and zlib.h to your include path + +3) add libpng.lib or libpngstat.lib to the project. + +If you are using libpng.dll, libpng.dll and zlib.dll will be required for the code to run. + +Alternatively, the libpng.dll can be built using zlibstat.lib to produce one dll containing both the zlib and png code. + +See the libpng documentation for instructions on how to use the code. + diff --git a/gtkmm-osx/libpng-1.2.5/projects/borland/libpngstat.bpf b/gtkmm-osx/libpng-1.2.5/projects/borland/libpngstat.bpf new file mode 100644 index 0000000..9159d02 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/borland/libpngstat.bpf @@ -0,0 +1,22 @@ +USELIB("zlibstat.lib"); +USEUNIT("..\..\pngerror.c"); +USEUNIT("..\..\png.c"); +USEUNIT("..\..\pngwutil.c"); +USEUNIT("..\..\pngmem.c"); +USEUNIT("..\..\pngpread.c"); +USEUNIT("..\..\pngread.c"); +USEUNIT("..\..\pngrio.c"); +USEUNIT("..\..\pngrtran.c"); +USEUNIT("..\..\pngrutil.c"); +USEUNIT("..\..\pngset.c"); +USEUNIT("..\..\pngtrans.c"); +USEUNIT("..\..\pngwio.c"); +USEUNIT("..\..\pngwrite.c"); +USEUNIT("..\..\pngwtran.c"); +USEUNIT("..\..\pngget.c"); +//--------------------------------------------------------------------------- +#define Library + +// To add a file to the library use the Project menu 'Add to Project'. + + \ No newline at end of file diff --git a/gtkmm-osx/libpng-1.2.5/projects/borland/libpngstat.bpr b/gtkmm-osx/libpng-1.2.5/projects/borland/libpngstat.bpr new file mode 100644 index 0000000..0b97981 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/borland/libpngstat.bpr @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2057 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..;P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include +Item1=..\..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_DEBUG + +[HistoryLists\hlTlibPageSize] +Count=1 +Item0=0x0010 + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/gtkmm-osx/libpng-1.2.5/projects/borland/zlib+libpng.bpg b/gtkmm-osx/libpng-1.2.5/projects/borland/zlib+libpng.bpg new file mode 100644 index 0000000..f8f4702 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/borland/zlib+libpng.bpg @@ -0,0 +1,33 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = zlibstat.lib libpngstat.lib zlib.dll libpng.dll +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +libpng.dll: libpng.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +zlibstat.lib: zlibstat.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +zlib.dll: zlib.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +libpngstat.lib: libpngstat.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + + diff --git a/gtkmm-osx/libpng-1.2.5/projects/borland/zlib.bpf b/gtkmm-osx/libpng-1.2.5/projects/borland/zlib.bpf new file mode 100644 index 0000000..7dca899 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/borland/zlib.bpf @@ -0,0 +1,20 @@ +USEUNIT("zlib.cpp"); +USEUNIT("..\..\..\zlib\zutil.c"); +USEUNIT("..\..\..\zlib\compress.c"); +USEUNIT("..\..\..\zlib\crc32.c"); +USEUNIT("..\..\..\zlib\deflate.c"); +USEUNIT("..\..\..\zlib\gzio.c"); +USEUNIT("..\..\..\zlib\infblock.c"); +USEUNIT("..\..\..\zlib\infcodes.c"); +USEUNIT("..\..\..\zlib\inffast.c"); +USEUNIT("..\..\..\zlib\inflate.c"); +USEUNIT("..\..\..\zlib\inftrees.c"); +USEUNIT("..\..\..\zlib\infutil.c"); +USEUNIT("..\..\..\zlib\trees.c"); +USEUNIT("..\..\..\zlib\uncompr.c"); +USEUNIT("..\..\..\zlib\adler32.c"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + +DllEntryPoint \ No newline at end of file diff --git a/gtkmm-osx/libpng-1.2.5/projects/borland/zlib.bpg b/gtkmm-osx/libpng-1.2.5/projects/borland/zlib.bpg new file mode 100644 index 0000000..0292b48 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/borland/zlib.bpg @@ -0,0 +1,25 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = zlibstat.lib zlib.dll +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +zlibstat.lib: zlibstat.bpr + $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +zlib.dll: zlib.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + + diff --git a/gtkmm-osx/libpng-1.2.5/projects/borland/zlib.bpr b/gtkmm-osx/libpng-1.2.5/projects/borland/zlib.bpr new file mode 100644 index 0000000..b3dda39 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/borland/zlib.bpr @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=1 +Locale=2057 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=16 +Item0=..\..\..\zlib;$(BCB)\include +Item1=..\..\..;..\Source\ThirdParty\ZLibCompression\external;..\Source\ThirdParty\ZLibCompression;..\..\..\zlib;$(BCB)\include +Item2=..\Source\ThirdParty\ZLibCompression\external;..\Source\ThirdParty\ZLibCompression;..\..\..\zlib;$(BCB)\include +Item3=P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include +Item4=..\Source\ThirdParty\ZLibCompression\external;..\Source\ThirdParty\ZLibCompression;$(BCB)\include +Item5=..\Source\ThirdParty\ZLibCompression;$(BCB)\include +Item6=$(BCB)\include +Item7=..\Source;..\Source\General\Templates;..\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl +Item8=P:\Development\Source\;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl +Item9=P:\Development\Source;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl +Item10=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl +Item11=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl +Item12=P:\Development\Source\General\Templates\;$(BCB)\include;$(BCB)\include\vcl +Item13=P:\Development\Source\General\Templates;$(BCB)\include;$(BCB)\include\vcl +Item14=P:\Development\Source;$(BCB)\include;$(BCB)\include\vcl +Item15=$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=12 +Item0=..\..\..\zlib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\..;..\Source\ThirdParty\ZLibCompression\external;..\Source\ThirdParty\ZLibCompression;..\..\..\zlib;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\Source\ThirdParty\ZLibCompression\external;..\Source\ThirdParty\ZLibCompression;..\..\..\zlib;$(BCB)\lib\obj;$(BCB)\lib +Item3=P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\Source\ThirdParty\ZLibCompression\external;..\Source\ThirdParty\ZLibCompression;$(BCB)\lib\obj;$(BCB)\lib +Item5=$(BCB)\lib\obj;$(BCB)\lib +Item6=..\Source\ThirdParty\ZLibCompression;$(BCB)\lib\obj;$(BCB)\lib +Item7=..\Source\SIMUtilities;..\Source;$(BCB)\lib\obj;$(BCB)\lib +Item8=P:\Development\Source\SIMUtilities\;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib +Item9=P:\Development\Source\SIMUtilities;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib +Item10=P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib +Item11=P:\Development\Source;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=8 +Item0=ZLIB_DLL;Z_PREFIX +Item1=ZLIB_DLL;_DEBUG;Z_PREFIX +Item2=ZLIB_DLL;_DEBUG +Item3=ZLIB_DLL +Item4=_WINDOWS;ZLIB_DLL +Item5=_HTML_FORM +Item6=_DEBUG;_HTML_FORM +Item7=_DEBUG + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=..\Obj +Item1=P:\Development\Obj + +[Debugging] +DebugSourceDirs= + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + + \ No newline at end of file diff --git a/gtkmm-osx/libpng-1.2.5/projects/borland/zlib.cpp b/gtkmm-osx/libpng-1.2.5/projects/borland/zlib.cpp new file mode 100644 index 0000000..3df1532 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/borland/zlib.cpp @@ -0,0 +1,29 @@ +//--------------------------------------------------------------------------- + +#include +//--------------------------------------------------------------------------- +// Important note about DLL memory management when your DLL uses the +// static version of the RunTime Library: +// +// If your DLL exports any functions that pass String objects (or structs/ +// classes containing nested Strings) as parameter or function results, +// you will need to add the library MEMMGR.LIB to both the DLL project and +// any other projects that use the DLL. You will also need to use MEMMGR.LIB +// if any other projects which use the DLL will be performing new or delete +// operations on any non-TObject-derived classes which are exported from the +// DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling +// EXE's to use the BORLNDMM.DLL as their memory manager. In these cases, +// the file BORLNDMM.DLL should be deployed along with your DLL. +// +// To avoid using BORLNDMM.DLL, pass string information using "char *" or +// ShortString parameters. +// +// If your DLL uses the dynamic version of the RTL, you do not need to +// explicitly add MEMMGR.LIB as this will be done implicitly for you +//--------------------------------------------------------------------------- + +int WINAPI DllEntryPoint(HINSTANCE, unsigned long, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- diff --git a/gtkmm-osx/libpng-1.2.5/projects/borland/zlibstat.bpf b/gtkmm-osx/libpng-1.2.5/projects/borland/zlibstat.bpf new file mode 100644 index 0000000..14c36bc --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/borland/zlibstat.bpf @@ -0,0 +1,20 @@ +USEUNIT("..\..\..\zlib\zutil.c"); +USEUNIT("..\..\..\zlib\compress.c"); +USEUNIT("..\..\..\zlib\crc32.c"); +USEUNIT("..\..\..\zlib\deflate.c"); +USEUNIT("..\..\..\zlib\gzio.c"); +USEUNIT("..\..\..\zlib\infblock.c"); +USEUNIT("..\..\..\zlib\infcodes.c"); +USEUNIT("..\..\..\zlib\inffast.c"); +USEUNIT("..\..\..\zlib\inflate.c"); +USEUNIT("..\..\..\zlib\inftrees.c"); +USEUNIT("..\..\..\zlib\infutil.c"); +USEUNIT("..\..\..\zlib\trees.c"); +USEUNIT("..\..\..\zlib\uncompr.c"); +USEUNIT("..\..\..\zlib\adler32.c"); +//--------------------------------------------------------------------------- +#define Library + +// To add a file to the library use the Project menu 'Add to Project'. + + \ No newline at end of file diff --git a/gtkmm-osx/libpng-1.2.5/projects/borland/zlibstat.bpr b/gtkmm-osx/libpng-1.2.5/projects/borland/zlibstat.bpr new file mode 100644 index 0000000..9e09038 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/borland/zlibstat.bpr @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2057 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=8 +Item0=..\..\..\zlib;$(BCB)\include +Item1=..\Source\ThirdParty\ZLibCompression\external;..\..\..\zlib;$(BCB)\include +Item2=P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include +Item3=..\Source\ThirdParty\ZLibCompression\external;$(BCB)\include +Item4=..\Source\ThirdParty\ZLibCompression\external;..\Source\ThirdParty\ZLibCompression\ext;..\Source\ThirdParty\ZLibCompression;$(BCB)\include +Item5=..\Source\ThirdParty\ZLibCompression;$(BCB)\include +Item6=$(BCB)\include +Item7=$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=7 +Item0=..\..\..\zlib;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\lib\obj;$(BCB)\lib +Item2=..\Source\ThirdParty\ZLibCompression\external;..\..\..\zlib;$(BCB)\lib\obj;$(BCB)\lib +Item3=P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\Source\ThirdParty\ZLibCompression\external;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\Source\ThirdParty\ZLibCompression\external;..\Source\ThirdParty\ZLibCompression\ext;..\Source\ThirdParty\ZLibCompression;$(BCB)\lib\obj;$(BCB)\lib +Item6=..\Source\ThirdParty\ZLibCompression;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=3 +Item0=Z_PREFIX +Item1=ZLIB_DLL +Item2=_WINDOWS;ZLIB_DLL + +[HistoryLists\hlIntOutputDir] +Count=2 +Item0=..\Obj +Item1=P:\Development\Obj + +[HistoryLists\hlTlibPageSize] +Count=1 +Item0=0x0010 + +[Debugging] +DebugSourceDirs= + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/gtkmm-osx/libpng-1.2.5/projects/msvc/README.txt b/gtkmm-osx/libpng-1.2.5/projects/msvc/README.txt new file mode 100644 index 0000000..d684b6b --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/msvc/README.txt @@ -0,0 +1,57 @@ +Microsoft Developer Studio Build File, Format Version 6.00 for +libpng 1.2.5 (October 3, 2002) and zlib + +Copyright (C) 2000 Simon-Pierre Cadieux +For conditions of distribution and use, see copyright notice in png.h + +Assumes that libpng sources are in ..\.. +Assumes that zlib sources have been copied to ..\..\..\zlib + +To build: + +0) On the main menu, select "File | Open Workspace" and then + select "libpng.dsw". + +1) On the main menu Select "Build | Set Active configuration". + Among the configurations beginning with "libpng" select the + one you wish to build (the corresponding "zlib" configuration + will be built automatically). + +2) Select "Build | Clean" + +3) Select "Build | Rebuild All". Ignore warning messages about + not being able to find certain include files (e.g., m68881.h, + alloc.h). + +4) Look in the appropriate "win32" subdirectories for both "zlib" + and "libpng" binaries. + +This project will build the PNG Development Group's "official" versions of +libpng and zlib libraries: + + libpng13.dll (default version, currently C code only) + libpng13a.dll (C + Assembler version) + libpng13b.dll (C + Assembler debug version) + libpng13d.dll (C code debug version) + libpng13vb.dll (version for VB, uses "stdcall" protocol) + libpng13[c,e-m].dll (reserved for official versions) + libpng13[n-z].dll (available for private versions) + zlib.dll (default version, currently C code only) + zlibd.dll (debug version) + zlibvb.dll (version for Visual Basic, uses "stdcall" protocol) + +If you change anything in libpng, or select different compiler settings, +please change the library name to an unreserved name, and define +DLLFNAME_POSTFIX and (PRIVATEBUILD or SPECIALBUILD) accordingly. DLLFNAME_POSTFIX +should correspond to a string in the range of "N" to "Z" depending on the letter +you choose for your private version. + +All DLLs built by this project use the Microsoft dynamic C runtime library +MSVCRT.DLL (MSVCRTD.DLL for debug versions). If you distribute any of the +above mentioned libraries you should also include this DLL in your package. +For a list of files that are redistributable in Visual C++ 6.0, see +Common\Redist\Redist.txt on Disc 1 of the Visual C++ 6.0 product CDs. + +5) For an example workspace that builds an application using the resulting + DLLs, go to Libpng's contrib\msvctest directory and use it to build + and run "pngtest". diff --git a/gtkmm-osx/libpng-1.2.5/projects/msvc/libpng.dsp b/gtkmm-osx/libpng-1.2.5/projects/msvc/libpng.dsp new file mode 100644 index 0000000..d08d3d5 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/msvc/libpng.dsp @@ -0,0 +1,439 @@ +# Microsoft Developer Studio Project File - Name="libpng" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=libpng - Win32 DLL +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "libpng.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "libpng.mak" CFG="libpng - Win32 DLL" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "libpng - Win32 DLL" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libpng - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libpng - Win32 DLL ASM" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libpng - Win32 DLL Debug ASM" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "libpng - Win32 LIB" (based on "Win32 (x86) Static Library") +!MESSAGE "libpng - Win32 LIB Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "libpng - Win32 DLL VB" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" + +!IF "$(CFG)" == "libpng - Win32 DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\win32\libpng\dll" +# PROP Intermediate_Dir ".\win32\libpng\dll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c +# ADD CPP /nologo /MD /W3 /O1 /I "..\.." /I "..\..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /Yu"png.h" /FD /c +MTL=midl.exe +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /dll /machine:I386 +# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll\libpng13.dll" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\win32\libpng\dll_dbg" +# PROP Intermediate_Dir ".\win32\libpng\dll_dbg" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "DEBUG" /D "_DEBUG" /D PNG_DEBUG=1 /D "WIN32" /D "_WINDOWS" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /Yu"png.h" /FD /GZ /c +MTL=midl.exe +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\.." /d "_DEBUG" /d PNG_DEBUG=1 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /dll /debug /machine:I386 /out:".\win32\libpng\dll_dbg\libpng13d.dll" + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\win32\libpng\dll_asm" +# PROP Intermediate_Dir ".\win32\libpng\dll_asm" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c +# ADD CPP /nologo /MD /W3 /O1 /I "..\.." /I "..\..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "PNG_USE_PNGVCRD" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /Yu"png.h" /FD /c +MTL=midl.exe +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG" /d "PNG_USE_PNGVCRD" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /dll /machine:I386 +# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll_asm\libpng13a.dll" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug ASM" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\win32\libpng\dll_dbga" +# PROP Intermediate_Dir ".\win32\libpng\dll_dbga" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "DEBUG" /D "_DEBUG" /D PNG_DEBUG=1 /D "WIN32" /D "_WINDOWS" /D "PNG_USE_PNGVCRD" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /Yu"png.h" /FD /GZ /c +MTL=midl.exe +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\.." /d "_DEBUG" /d PNG_DEBUG=1 /d "PNG_USE_PNGVCRD" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /dll /debug /machine:I386 /out:".\win32\libpng\dll_dbga\libpng13b.dll" + +!ELSEIF "$(CFG)" == "libpng - Win32 LIB" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\win32\libpng\lib" +# PROP Intermediate_Dir ".\win32\libpng\lib" +# PROP Target_Dir "" +MTL=midl.exe +CPP=cl.exe +# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_LIB" /FD /c +# ADD CPP /nologo /W3 /O1 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /Yu"png.h" /FD /c +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "libpng - Win32 LIB Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\win32\libpng\lib_dbg" +# PROP Intermediate_Dir ".\win32\libpng\lib_dbg" +# PROP Target_Dir "" +MTL=midl.exe +CPP=cl.exe +# ADD BASE CPP /nologo /W3 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_LIB" /FD /GZ /c +# ADD CPP /nologo /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "DEBUG" /D "_DEBUG" /D PNG_DEBUG=1 /D "WIN32" /Yu"png.h" /FD /GZ /c +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "libpng___Win32_DLL_VB" +# PROP BASE Intermediate_Dir "libpng___Win32_DLL_VB" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\win32\libpng\dll_vb" +# PROP Intermediate_Dir ".\win32\libpng\dll_vb" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /O1 /I "..\.." /I "..\..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /Yu"png.h" /FD /c +# ADD CPP /nologo /Gd /MD /W3 /O1 /I "..\.." /I "..\..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /D PNGAPI=__stdcall /Yu"png.h" /FD /c +MTL=midl.exe +RSC=rc.exe +# ADD BASE RSC /l 0x409 /i "..\.." /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll\libpng13.dll" +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll_vb\libpngvb13.dll" +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "libpng - Win32 DLL" +# Name "libpng - Win32 DLL Debug" +# Name "libpng - Win32 DLL ASM" +# Name "libpng - Win32 DLL Debug ASM" +# Name "libpng - Win32 LIB" +# Name "libpng - Win32 LIB Debug" +# Name "libpng - Win32 DLL VB" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\png.c +# SUBTRACT CPP /YX /Yc /Yu +# End Source File +# Begin Source File + +SOURCE=.\png.rc + +!IF "$(CFG)" == "libpng - Win32 DLL" + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug" + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM" + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug ASM" + +!ELSEIF "$(CFG)" == "libpng - Win32 LIB" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "libpng - Win32 LIB Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\png32ms.def + +!IF "$(CFG)" == "libpng - Win32 DLL" + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug" + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM" + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug ASM" + +!ELSEIF "$(CFG)" == "libpng - Win32 LIB" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "libpng - Win32 LIB Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\pngerror.c +# ADD CPP /Yc"png.h" +# End Source File +# Begin Source File + +SOURCE=..\..\pngget.c +# End Source File +# Begin Source File + +SOURCE=..\..\pngmem.c +# End Source File +# Begin Source File + +SOURCE=..\..\pngpread.c +# End Source File +# Begin Source File + +SOURCE=..\..\pngread.c +# End Source File +# Begin Source File + +SOURCE=..\..\pngrio.c +# End Source File +# Begin Source File + +SOURCE=..\..\pngrtran.c +# End Source File +# Begin Source File + +SOURCE=..\..\pngrutil.c +# End Source File +# Begin Source File + +SOURCE=..\..\pngset.c +# End Source File +# Begin Source File + +SOURCE=..\..\pngtrans.c +# End Source File +# Begin Source File + +SOURCE=..\..\pngvcrd.c + +!IF "$(CFG)" == "libpng - Win32 DLL" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM" + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug ASM" + +!ELSEIF "$(CFG)" == "libpng - Win32 LIB" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "libpng - Win32 LIB Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\pngwio.c +# End Source File +# Begin Source File + +SOURCE=..\..\pngwrite.c +# End Source File +# Begin Source File + +SOURCE=..\..\pngwtran.c +# End Source File +# Begin Source File + +SOURCE=..\..\pngwutil.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\png.h +# End Source File +# Begin Source File + +SOURCE=..\..\pngconf.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=.\readme.txt + +!IF "$(CFG)" == "libpng - Win32 DLL" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug ASM" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "libpng - Win32 LIB" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "libpng - Win32 LIB Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# End Target +# End Project diff --git a/gtkmm-osx/libpng-1.2.5/projects/msvc/libpng.dsw b/gtkmm-osx/libpng-1.2.5/projects/msvc/libpng.dsw new file mode 100644 index 0000000..eca5b77 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/msvc/libpng.dsw @@ -0,0 +1,44 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "libpng"=.\libpng.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name zlib + End Project Dependency +}}} + +############################################################################### + +Project: "zlib"=.\zlib.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/gtkmm-osx/libpng-1.2.5/projects/msvc/png.rc b/gtkmm-osx/libpng-1.2.5/projects/msvc/png.rc new file mode 100644 index 0000000..9912471 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/msvc/png.rc @@ -0,0 +1,100 @@ +#define PNG_VERSION_INFO_ONLY + +#include +#include "png.h" + +#define _QUOTE(x) # x +#define QUOTE(x) _QUOTE(x) + +#define PNG_LIBPNG_DLLFNAME "LIBPNG" + +#if defined(DLLFNAME_POSTFIX) && !defined(PRIVATEBUILD) && !defined(SPECIALBUILD) +# error PRIVATEBUILD or SPECIALBUILD must be defined as a string describing the type of change brought to the standard library +#endif /* defined(DLLFNAME_POSTFIX)... */ + +#if !defined(DLLFNAME_POSTFIX) && defined(PNG_USE_PNGVCRD) +# if defined(PNG_DEBUG) && (PNG_DEBUG > 0) +# define DLLFNAME_POSTFIX "B" +# else +# define DLLFNAME_POSTFIX "A" +# endif /* !defined(DLLFNAME_POSTFIX)... */ +# if !defined(SPECIALBUILD) +# define SPECIALBUILD "Use MMX instructions" +# endif /* SPECIALBUILD */ +#endif + +#if defined(PNG_DEBUG) && (PNG_DEBUG > 0) +# define VS_DEBUG VS_FF_DEBUG +# ifndef DLLFNAME_POSTFIX +# define DLLFNAME_POSTFIX "D" +# endif /* DLLFNAME_POSTFIX */ +# ifndef COMMENTS +# define COMMENTS "PNG_DEBUG=" QUOTE(PNG_DEBUG) +# endif /* COMMENTS */ +#else +# define VS_DEBUG 0 +# ifndef DLLFNAME_POSTFIX +# define DLLFNAME_POSTFIX +# endif /* DLLFNAME_POSTFIX */ +#endif /* defined(DEBUG)... */ + +#ifdef PRIVATEBUILD +# define VS_PRIVATEBUILD VS_FF_PRIVATEBUILD +#else +# define VS_PRIVATEBUILD 0 +#endif /* PRIVATEBUILD */ + +#ifdef SPECIALBUILD +# define VS_SPECIALBUILD VS_FF_SPECIALBUILD +#else +# define VS_SPECIALBUILD 0 +#endif /* SPECIALBUILD */ + +#if ((PNG_LIBPNG_BUILD_TYPE & PNG_LIBPNG_BUILD_TYPEMASK) != \ + PNG_LIBPNG_BUILD_STABLE) +# define VS_PRERELEASE VS_FF_PRERELEASE +# define VS_PATCHED 0 +#else +# define VS_PRERELEASE 0 +# if (PNG_LIBPNG_BUILD_TYPE & PNG_LIBPNG_BUILD_PATCHED) +# define VS_PATCHED VS_FF_PATCHED +# else +# define VS_PATCHED 0 +# endif +#endif + +VS_VERSION_INFO VERSIONINFO +FILEVERSION PNG_LIBPNG_VER_MAJOR, PNG_LIBPNG_VER_MINOR, PNG_LIBPNG_VER_RELEASE, PNG_LIBPNG_VER_BUILD +PRODUCTVERSION PNG_LIBPNG_VER_MAJOR, PNG_LIBPNG_VER_MINOR, PNG_LIBPNG_VER_RELEASE, PNG_LIBPNG_VER_BUILD +FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +FILEFLAGS VS_DEBUG | VS_PRIVATEBUILD | VS_SPECIALBUILD | VS_PRERELEASE | VS_PATCHED +FILEOS VOS__WINDOWS32 +FILETYPE VFT_DLL +FILESUBTYPE VFT2_UNKNOWN +BEGIN + BLOCK "StringFileInfo" + BEGIN BLOCK "040904E4" /* Language type = U.S English(0x0409) and Character Set = Windows, Multilingual(0x04E4) */ + BEGIN +#ifdef COMMENTS + VALUE "Comments", COMMENTS "\000" +#endif /* COMMENTS */ + VALUE "FileDescription", "PNG image compression library\000" + VALUE "FileVersion", PNG_LIBPNG_VER_STRING "\000" + VALUE "InternalName", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_MAJOR) DLLFNAME_POSTFIX " (Windows 32 bit)\000" + VALUE "LegalCopyright", "\251 1998-2002 Glenn Randers-Pehrson\000" + VALUE "OriginalFilename", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_MAJOR) DLLFNAME_POSTFIX ".DLL\000" +#ifdef PRIVATEBUILD + VALUE "PrivateBuild", PRIVATEBUILD +#endif /* PRIVATEBUILD */ + VALUE "ProductName", "LibPNG\000" + VALUE "ProductVersion", "1\000" +#ifdef SPECIALBUILD + VALUE "SpecialBuild", SPECIALBUILD +#endif /* SPECIALBUILD */ + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 0x04E4 + END +END diff --git a/gtkmm-osx/libpng-1.2.5/projects/msvc/png32ms.def b/gtkmm-osx/libpng-1.2.5/projects/msvc/png32ms.def new file mode 100644 index 0000000..c995371 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/msvc/png32ms.def @@ -0,0 +1,220 @@ +;------------------------------------------ +; LIBPNG module definition file for Windows +;------------------------------------------ + +LIBRARY +DESCRIPTION "PNG image compression library for Windows" + +EXPORTS +;Version 1.2.5 + png_build_grayscale_palette @1 + png_check_sig @2 + png_chunk_error @3 + png_chunk_warning @4 + png_convert_from_struct_tm @5 + png_convert_from_time_t @6 + png_create_info_struct @7 + png_create_read_struct @8 + png_create_write_struct @9 + png_data_freer @10 + png_destroy_info_struct @11 + png_destroy_read_struct @12 + png_destroy_write_struct @13 + png_error @14 + png_free @15 + png_free_data @16 + png_get_IHDR @17 + png_get_PLTE @18 + png_get_bKGD @19 + png_get_bit_depth @20 + png_get_cHRM @21 + png_get_cHRM_fixed @22 + png_get_channels @23 + png_get_color_type @24 + png_get_compression_buffer_size @25 + png_get_compression_type @26 + png_get_copyright @27 + png_get_error_ptr @28 + png_get_filter_type @29 + png_get_gAMA @30 + png_get_gAMA_fixed @31 + png_get_hIST @32 + png_get_header_ver @33 + png_get_header_version @34 + png_get_iCCP @35 + png_get_image_height @36 + png_get_image_width @37 + png_get_interlace_type @38 + png_get_io_ptr @39 + png_get_libpng_ver @40 + png_get_oFFs @41 + png_get_pCAL @42 + png_get_pHYs @43 + png_get_pixel_aspect_ratio @44 + png_get_pixels_per_meter @45 + png_get_progressive_ptr @46 + png_get_rgb_to_gray_status @47 + png_get_rowbytes @48 + png_get_rows @49 + png_get_sBIT @50 + png_get_sCAL @51 + png_get_sPLT @52 + png_get_sRGB @53 + png_get_signature @54 + png_get_tIME @55 + png_get_tRNS @56 + png_get_text @57 + png_get_unknown_chunks @58 + png_get_user_chunk_ptr @59 + png_get_user_transform_ptr @60 + png_get_valid @61 + png_get_x_offset_microns @62 + png_get_x_offset_pixels @63 + png_get_x_pixels_per_meter @64 + png_get_y_offset_microns @65 + png_get_y_offset_pixels @66 + png_get_y_pixels_per_meter @67 + png_malloc @68 + png_memcpy_check @69 + png_memset_check @70 +; png_permit_empty_plte is deprecated + png_permit_empty_plte @71 + png_process_data @72 + png_progressive_combine_row @73 + png_read_end @74 + png_read_image @75 + png_read_info @76 +; png_read_init is deprecated + png_read_init @77 + png_read_png @78 + png_read_row @79 + png_read_rows @80 + png_read_update_info @81 + png_reset_zstream @82 + png_set_IHDR @83 + png_set_PLTE @84 + png_set_bKGD @85 + png_set_background @86 + png_set_bgr @87 + png_set_cHRM @88 + png_set_cHRM_fixed @89 + png_set_compression_buffer_size @90 + png_set_compression_level @91 + png_set_compression_mem_level @92 + png_set_compression_method @93 + png_set_compression_strategy @94 + png_set_compression_window_bits @95 + png_set_crc_action @96 + png_set_dither @97 + png_set_error_fn @98 + png_set_expand @99 + png_set_filler @100 + png_set_filter @101 + png_set_filter_heuristics @102 + png_set_flush @103 + png_set_gAMA @104 + png_set_gAMA_fixed @105 + png_set_gamma @106 + png_set_gray_1_2_4_to_8 @107 + png_set_gray_to_rgb @108 + png_set_hIST @109 + png_set_iCCP @110 + png_set_interlace_handling @111 + png_set_invert_alpha @112 + png_set_invert_mono @113 + png_set_keep_unknown_chunks @114 + png_set_oFFs @115 + png_set_pCAL @116 + png_set_pHYs @117 + png_set_packing @118 + png_set_packswap @119 + png_set_palette_to_rgb @120 + png_set_progressive_read_fn @121 + png_set_read_fn @122 + png_set_read_status_fn @123 + png_set_read_user_chunk_fn @124 + png_set_read_user_transform_fn @125 + png_set_rgb_to_gray @126 + png_set_rgb_to_gray_fixed @127 + png_set_rows @128 + png_set_sBIT @129 + png_set_sCAL @130 + png_set_sPLT @131 + png_set_sRGB @132 + png_set_sRGB_gAMA_and_cHRM @133 + png_set_shift @134 + png_set_sig_bytes @135 + png_set_strip_16 @136 + png_set_strip_alpha @137 + png_set_swap @138 + png_set_swap_alpha @139 + png_set_tIME @140 + png_set_tRNS @141 + png_set_tRNS_to_alpha @142 + png_set_text @143 + png_set_unknown_chunk_location @144 + png_set_unknown_chunks @145 + png_set_user_transform_info @146 + png_set_write_fn @147 + png_set_write_status_fn @148 + png_set_write_user_transform_fn @149 + png_sig_cmp @150 + png_start_read_image @151 + png_warning @152 + png_write_chunk @153 + png_write_chunk_data @154 + png_write_chunk_end @155 + png_write_chunk_start @156 + png_write_end @157 + png_write_flush @158 + png_write_image @159 + png_write_info @160 + png_write_info_before_PLTE @161 +; png_write_init is deprecated + png_write_init @162 + png_write_png @163 + png_write_row @164 + png_write_rows @165 +; png_read_init_2 and png_write_init_2 are deprecated. + png_read_init_2 @166 + png_write_init_2 @167 + png_access_version_number @168 +; png_sig_bytes @169 +; png_libpng_ver @170 + png_init_io @171 + png_convert_to_rfc1123 @172 + png_set_invalid @173 +; Added at version 1.0.12 +; For compatiblity with 1.0.7-1.0.11 + png_info_init @174 + png_read_init_3 @175 + png_write_init_3 @176 + png_info_init_3 @177 + png_destroy_struct @178 +; Added at version 1.2.0 +; For use with PNG_USER_MEM_SUPPORTED + png_destroy_struct_2 @179 + png_create_read_struct_2 @180 + png_create_write_struct_2 @181 + png_malloc_default @182 + png_free_default @183 +; MNG features + png_permit_mng_features @184 +; MMX support + png_mmx_support @185 + png_get_mmx_flagmask @186 + png_get_asm_flagmask @187 + png_get_asm_flags @188 + png_get_mmx_bitdepth_threshold @189 + png_get_mmx_rowbytes_threshold @190 + png_set_asm_flags @191 + png_init_mmx_flags @192 +; Strip error numbers + png_set_strip_error_numbers @193 +; Added at version 1.2.2 + png_handle_as_unknown @194 +; Added at version 1.2.2 and deleted from 1.2.3 +; png_zalloc @195 +; png_zfree @196 +; Added at version 1.2.4 + png_malloc_warn @195 diff --git a/gtkmm-osx/libpng-1.2.5/projects/msvc/zlib.def b/gtkmm-osx/libpng-1.2.5/projects/msvc/zlib.def new file mode 100644 index 0000000..022aa45 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/msvc/zlib.def @@ -0,0 +1,45 @@ +LIBRARY +DESCRIPTION "zlib compression library for Windows" + +EXPORTS + adler32 @1 + compress @2 + crc32 @3 + deflate @4 + deflateCopy @5 + deflateEnd @6 + deflateInit2_ @7 + deflateInit_ @8 + deflateParams @9 + deflateReset @10 + deflateSetDictionary @11 + gzclose @12 + gzdopen @13 + gzerror @14 + gzflush @15 + gzopen @16 + gzread @17 + gzwrite @18 + inflate @19 + inflateEnd @20 + inflateInit2_ @21 + inflateInit_ @22 + inflateReset @23 + inflateSetDictionary @24 + inflateSync @25 + uncompress @26 + zlibVersion @27 + gzprintf @28 + gzputc @29 + gzgetc @30 + gzseek @31 + gzrewind @32 + gztell @33 + gzeof @34 + gzsetparams @35 + zError @36 + inflateSyncPoint @37 + get_crc_table @38 + compress2 @39 + gzputs @40 + gzgets @41 diff --git a/gtkmm-osx/libpng-1.2.5/projects/msvc/zlib.dsp b/gtkmm-osx/libpng-1.2.5/projects/msvc/zlib.dsp new file mode 100644 index 0000000..df9a5db --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/msvc/zlib.dsp @@ -0,0 +1,441 @@ +# Microsoft Developer Studio Project File - Name="zlib" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=zlib - Win32 DLL +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "zlib.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "zlib.mak" CFG="zlib - Win32 DLL" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "zlib - Win32 DLL" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "zlib - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "zlib - Win32 DLL ASM" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "zlib - Win32 DLL Debug ASM" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "zlib - Win32 LIB" (based on "Win32 (x86) Static Library") +!MESSAGE "zlib - Win32 LIB Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "zlib - Win32 DLL VB" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" + +!IF "$(CFG)" == "zlib - Win32 DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\win32\zlib\dll" +# PROP Intermediate_Dir ".\win32\zlib\dll" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /FD /c +# ADD CPP /nologo /MD /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ZLIB_DLL" /FD /c +MTL=midl.exe +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /dll /machine:I386 +# ADD LINK32 /nologo /dll /machine:I386 +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\win32\zlib\dll_dbg" +# PROP Intermediate_Dir ".\win32\zlib\dll_dbg" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /D "DEBUG" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ZLIB_DLL" /FD /GZ /c +MTL=midl.exe +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /dll /debug /machine:I386 /out:".\win32\zlib\dll_dbg\zlibd.dll" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\win32\zlib\dll_asm" +# PROP Intermediate_Dir ".\win32\zlib\dll_asm" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c +# ADD CPP /nologo /MD /W3 /O1 /I "..\..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_WIN32" /D "_WINDOWS" /D "ZLIB_DLL" /D "DYNAMIC_CRC_TABLE" /D "ASMV" /FAcs /FD /c +MTL=midl.exe +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /dll /machine:I386 +# ADD LINK32 gvmat32.obj /nologo /dll /machine:I386 /out:".\win32\zlib\dll_asm\zliba.dll" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug ASM" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\win32\zlib\dll_dbga" +# PROP Intermediate_Dir ".\win32\zlib\dll_dbga" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Zi /Od /I "..\..\..\zlib" /D "_DEBUG" /D "WIN32" /D "_WIN32" /D "_WINDOWS" /D "ZLIB_DLL" /D "DYNAMIC_CRC_TABLE" /D "ASMV" /FAcs /FD /GZ /c +MTL=midl.exe +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "..\.." /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 gvmat32d.obj /nologo /dll /debug /machine:I386 /out:".\win32\zlib\dll_dbga\zlibb.dll" + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\win32\zlib\lib" +# PROP Intermediate_Dir ".\win32\zlib\lib" +# PROP Target_Dir "" +MTL=midl.exe +CPP=cl.exe +# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_LIB" /FD /c +# ADD CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /FD /c +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir ".\win32\zlib\lib_dbg" +# PROP Intermediate_Dir ".\win32\zlib\lib_dbg" +# PROP Target_Dir "" +MTL=midl.exe +CPP=cl.exe +# ADD BASE CPP /nologo /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_LIB" /FD /GZ /c +# ADD CPP /nologo /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL VB" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "zlib___Win32_DLL_VB" +# PROP BASE Intermediate_Dir "zlib___Win32_DLL_VB" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir ".\win32\zlib\dll_vb" +# PROP Intermediate_Dir ".\win32\zlib\dll_vb" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +CPP=cl.exe +# ADD BASE CPP /nologo /MD /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ZLIB_DLL" /FD /c +# ADD CPP /nologo /Gd /MD /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ZLIB_DLL" /FD /c +MTL=midl.exe +RSC=rc.exe +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /dll /machine:I386 +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\zlib\dll_vb/zlibvb.dll" +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "zlib - Win32 DLL" +# Name "zlib - Win32 DLL Debug" +# Name "zlib - Win32 DLL ASM" +# Name "zlib - Win32 DLL Debug ASM" +# Name "zlib - Win32 LIB" +# Name "zlib - Win32 LIB Debug" +# Name "zlib - Win32 DLL VB" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\zlib\adler32.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\compress.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\crc32.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\deflate.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\contrib\asm386\gvmat32c.c + +!IF "$(CFG)" == "zlib - Win32 DLL" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug ASM" + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL VB" + +# PROP BASE Exclude_From_Build 1 +# PROP Exclude_From_Build 1 + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\gzio.c +# ADD CPP /Yc"zutil.h" +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\infblock.c +# ADD CPP /Yu"zutil.h" +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\infcodes.c +# ADD CPP /Yu"zutil.h" +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\inffast.c +# ADD CPP /Yu"zutil.h" +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\inflate.c +# ADD CPP /Yu"zutil.h" +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\inftrees.c +# ADD CPP /Yu"zutil.h" +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\infutil.c +# ADD CPP /Yu"zutil.h" +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\trees.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\uncompr.c +# End Source File +# Begin Source File + +SOURCE=.\zlib.def + +!IF "$(CFG)" == "zlib - Win32 DLL" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug ASM" + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL VB" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\msdos\zlib.rc + +!IF "$(CFG)" == "zlib - Win32 DLL" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM" + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug ASM" + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" + +# PROP Exclude_From_Build 1 + +!ELSEIF "$(CFG)" == "zlib - Win32 DLL VB" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\zutil.c +# ADD CPP /Yu"zutil.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\zlib\deflate.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\infblock.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\infcodes.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\inffast.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\inffixed.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\inftrees.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\infutil.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\trees.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\zconf.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\zlib.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\zlib\zutil.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/gtkmm-osx/libpng-1.2.5/projects/netware.txt b/gtkmm-osx/libpng-1.2.5/projects/netware.txt new file mode 100644 index 0000000..178361d --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/netware.txt @@ -0,0 +1,6 @@ +A set of project files is available for Netware. Get +libpng-1.2.5-project-netware.zip from a libpng distribution +site such as http://libpng.sourceforge.net + +Put the zip file in this directory (projects) and then run +"unzip -a libpng-1.2.5-project-netware.zip" diff --git a/gtkmm-osx/libpng-1.2.5/projects/wince.txt b/gtkmm-osx/libpng-1.2.5/projects/wince.txt new file mode 100644 index 0000000..a1a26c0 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/projects/wince.txt @@ -0,0 +1,6 @@ +A set of project files is available for WinCE. Get +libpng-1.2.5-project-wince.zip from a libpng distribution +site such as http://libpng.sourceforge.net + +Put the zip file in this directory (projects) and then run +"unzip -a libpng-1.2.5-project-wince.zip" diff --git a/gtkmm-osx/libpng-1.2.5/scripts/SCOPTIONS.ppc b/gtkmm-osx/libpng-1.2.5/scripts/SCOPTIONS.ppc new file mode 100644 index 0000000..2c3503e --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/SCOPTIONS.ppc @@ -0,0 +1,7 @@ +OPTIMIZE +OPTPEEP +OPTTIME +OPTSCHED +AUTOREGISTER +PARMS=REGISTERS +INCLUDEDIR=hlp:ppc/include diff --git a/gtkmm-osx/libpng-1.2.5/scripts/descrip.mms b/gtkmm-osx/libpng-1.2.5/scripts/descrip.mms new file mode 100644 index 0000000..3584b0d --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/descrip.mms @@ -0,0 +1,52 @@ + +cc_defs = /inc=$(ZLIBSRC) +c_deb = + +.ifdef __DECC__ +pref = /prefix=all +.endif + + + +OBJS = png.obj, pngset.obj, pngget.obj, pngrutil.obj, pngtrans.obj,\ + pngwutil.obj, pngread.obj, pngmem.obj, pngwrite.obj, pngrtran.obj,\ + pngwtran.obj, pngrio.obj, pngwio.obj, pngerror.obj, pngpread.obj + + +CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF) + +all : pngtest.exe libpng.olb + @ write sys$output " pngtest available" + +libpng.olb : libpng.olb($(OBJS)) + @ write sys$output " Libpng available" + + +pngtest.exe : pngtest.obj libpng.olb + link pngtest,libpng.olb/lib,$(ZLIBSRC)libz.olb/lib + +test : pngtest.exe + run pngtest + +clean : + delete *.obj;*,*.exe;* + + +# Other dependencies. +png.obj : png.h, pngconf.h +pngpread.obj : png.h, pngconf.h +pngset.obj : png.h, pngconf.h +pngget.obj : png.h, pngconf.h +pngread.obj : png.h, pngconf.h +pngrtran.obj : png.h, pngconf.h +pngrutil.obj : png.h, pngconf.h +pngerror.obj : png.h, pngconf.h +pngmem.obj : png.h, pngconf.h +pngrio.obj : png.h, pngconf.h +pngwio.obj : png.h, pngconf.h +pngtest.obj : png.h, pngconf.h +pngtrans.obj : png.h, pngconf.h +pngwrite.obj : png.h, pngconf.h +pngwtran.obj : png.h, pngconf.h +pngwutil.obj : png.h, pngconf.h + diff --git a/gtkmm-osx/libpng-1.2.5/scripts/libpng-config-body.in b/gtkmm-osx/libpng-1.2.5/scripts/libpng-config-body.in new file mode 100755 index 0000000..b466432 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/libpng-config-body.in @@ -0,0 +1,96 @@ + +usage() +{ + cat < libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo libdir=\"$(LIBPATH)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo R_opts=\"-R$(LIBPATH)\"; \ + echo ccopts=\"-xtarget=ultra\"; \ + echo ldopts=\"-xtarget=ultra\"; \ + echo libs=\"-lpng12 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) + ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so + +$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) + ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) + +$(LIBNAME).so.$(PNGVER): $(OBJSDLL) + @case "`type ld`" in *ucb*) \ + echo; \ + echo '## WARNING:'; \ + echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ + echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \ + echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \ + echo '## The environment variable LD_LIBRARY_PATH should not be set'; \ + echo '## at all. If it is, things are likely to break because of'; \ + echo '## the libucb dependency that is created.'; \ + echo; \ + ;; \ + esac + $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \ + -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) + +libpng.so.3.$(PNGMIN): $(OBJS) + $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.3 \ + -o libpng.so.3.$(PNGMIN) $(OBJSDLL) + +pngtest: pngtest.o $(LIBNAME).so + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm $(DI)/libpng + (cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ + libpng.so.3 + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.$(PNGVER)* + cp $(LIBNAME).so.$(PNGVER) $(DL) + cp libpng.so.3.$(PNGMIN) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + chmod 755 $(DL)/libpng.so.3.$(PNGMIN) + (cd $(DL); \ + ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ + ln -f -s libpng.so.3 libpng.so; \ + ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ + ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/libpng12.pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/libpng12.pc + chmod 644 $(DL)/pkgconfig/libpng12.pc + (cd $(DL)/pkgconfig; ln -f -s libpng12.pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi + -@/bin/rm -f $(DM)/man3/libpng.3 + -@/bin/rm -f $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then mkdir $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/libpng12-config + cp libpng-config $(DB)/libpng12-config + chmod 755 $(DB)/libpng12-config + (cd $(DB); ln -sf libpng12-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + -o pngtesti `$(BINPATH)/libpng12-config --ldflags` \ + $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) + ./pngtesti pngtest.png + +clean: + /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ + libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ + libpng.so.3.$(PNGMIN) \ + libpng.pc + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h +pngerror.o pngerror.pic.o: png.h pngconf.h +pngrio.o pngrio.pic.o: png.h pngconf.h +pngwio.o pngwio.pic.o: png.h pngconf.h +pngmem.o pngmem.pic.o: png.h pngconf.h +pngset.o pngset.pic.o: png.h pngconf.h +pngget.o pngget.pic.o: png.h pngconf.h +pngread.o pngread.pic.o: png.h pngconf.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h +pngpread.o pngpread.pic.o: png.h pngconf.h + +pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.64sunu b/gtkmm-osx/libpng-1.2.5/scripts/makefile.64sunu new file mode 100644 index 0000000..a9b40f2 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.64sunu @@ -0,0 +1,224 @@ +# makefile for libpng on Solaris 2.x with cc +# Contributed by William L. Sebok, based on makefile.linux +# Copyright (C) 2002 Glenn Randers-Pehrson +# Copyright (C) 1998 Greg Roelofs +# Copyright (C) 1996, 1997 Andreas Dilger +# For conditions of distribution and use, see copyright notice in png.h + +CC=cc +SUN_CC_FLAGS=-fast -xtarget=ultra -xarch=v9 +SUN_LD_FLAGS=-fast -xtarget=ultra -xarch=v9 + +# where make install puts libpng.a, libpng12.so and libpng12/png.h +prefix=/a + +# Where the zlib library and include files are located +# Changing these to ../zlib poses a security risk. If you want +# to have zlib in an adjacent directory, specify the full path instead of "..". +#ZLIBLIB=../zlib +#ZLIBINC=../zlib + +ZLIBLIB=/usr/lib +ZLIBINC=/usr/include + +WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ + -Wmissing-declarations -Wtraditional -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes #-Wconversion +CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \ + # $(WARNMORE) -g -DPNG_DEBUG=5 +LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm + +#RANLIB=ranlib +RANLIB=echo + +LIBNAME=libpng12 +PNGMAJ = 0 +PNGMIN = 1.2.5 +PNGVER = $(PNGMAJ).$(PNGMIN) + +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c + +all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config + +libpng.a: $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo libdir=\"$(LIBPATH)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo R_opts=\"-R$(LIBPATH)\"; \ + echo ccopts=\"-xtarget=ultra -xarch=v9\"; \ + echo ldopts=\"-xtarget=ultra -xarch=v9\"; \ + echo libs=\"-lpng12 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) + ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so + +$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) + ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) + +$(LIBNAME).so.$(PNGVER): $(OBJSDLL) + @case "`type ld`" in *ucb*) \ + echo; \ + echo '## WARNING:'; \ + echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ + echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \ + echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \ + echo '## The environment variable LD_LIBRARY_PATH should not be set'; \ + echo '## at all. If it is, things are likely to break because of'; \ + echo '## the libucb dependency that is created.'; \ + echo; \ + ;; \ + esac + $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \ + -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) + +libpng.so.3.$(PNGMIN): $(OBJSDLL) + $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.3 \ + -o libpng.so.3.$(PNGMIN) $(OBJSDLL) + +pngtest: pngtest.o $(LIBNAME).so + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm $(DI)/libpng + (cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ + libpng.so.3.$(PNGMIN) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ).$(PNGVER)* $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.$(PNGVER)* + cp $(LIBNAME).so.$(PNGVER) $(DL) + cp libpng.so.3.$(PNGMIN) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + chmod 755 $(DL)/libpng.so.3.$(PNGMIN) + (cd $(DL); \ + ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ + ln -f -s libpng.so.3 libpng.so; \ + ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ + ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi + -@/bin/rm -f $(DM)/man3/libpng.3 + -@/bin/rm -f $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then mkdir $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + -o pngtesti `$(BINPATH)/libpng12-config --ldflags ` \ + $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) + ./pngtesti pngtest.png + +clean: + /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ + libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ + libpng.so.3.$(PNGMIN) \ + libpng.pc + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h +pngerror.o pngerror.pic.o: png.h pngconf.h +pngrio.o pngrio.pic.o: png.h pngconf.h +pngwio.o pngwio.pic.o: png.h pngconf.h +pngmem.o pngmem.pic.o: png.h pngconf.h +pngset.o pngset.pic.o: png.h pngconf.h +pngget.o pngget.pic.o: png.h pngconf.h +pngread.o pngread.pic.o: png.h pngconf.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h +pngpread.o pngpread.pic.o: png.h pngconf.h + +pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.acorn b/gtkmm-osx/libpng-1.2.5/scripts/makefile.acorn new file mode 100644 index 0000000..470cf89 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.acorn @@ -0,0 +1,51 @@ +# Project: libpng + + +# Toolflags: +CCflags = -c -depend !Depend -IC:,Zlib: -g -throwback -DRISCOS -fnah +C++flags = -c -depend !Depend -IC: -throwback +Linkflags = -aif -c++ -o $@ +ObjAsmflags = -throwback -NoCache -depend !Depend +CMHGflags = +LibFileflags = -c -l -o $@ +Squeezeflags = -o $@ + + +# Final targets: +@.libpng-lib: @.o.png @.o.pngerror @.o.pngrio @.o.pngwio @.o.pngmem \ + @.o.pngpread @.o.pngset @.o.pngget @.o.pngread @.o.pngrtran \ + @.o.pngrutil @.o.pngtrans @.o.pngwrite @.o.pngwtran @.o.pngwutil + LibFile $(LibFileflags) @.o.png @.o.pngerror @.o.pngrio @.o.pngrtran \ + @.o.pngmem @.o.pngpread @.o.pngset @.o.pngget @.o.pngread @.o.pngwio \ + @.o.pngrutil @.o.pngtrans @.o.pngwrite @.o.pngwtran @.o.pngwutil +@.mm-libpng-lib: @.mm.png @.mm.pngerror @.mm.pngrio @.mm.pngwio @.mm.pngmem \ + @.mm.pngpread @.mm.pngset @.mm.pngget @.mm.pngread @.mm.pngrtran \ + @.mm.pngrutil @.mm.pngtrans @.mm.pngwrite @.mm.pngwtran @.mm.pngwutil + LibFile $(LibFileflags) @.mm.png @.mm.pngerror @.mm.pngrio \ + @.mm.pngwio @.mm.pngmem @.mm.pngpread @.mm.pngset @.mm.pngget \ + @.mm.pngread @.mm.pngrtran @.mm.pngrutil @.mm.pngtrans @.mm.pngwrite \ + @.mm.pngwtran @.mm.pngwutil + + +# User-editable dependencies: +# (C) Copyright 1997 Tom Tanner +Test: @.pngtest + .pngtest + @remove .pngtest + +#It would be nice if you could stop "make" listing from here on! +@.pngtest: @.o.pngtest @.libpng-lib C:o.Stubs Zlib:zlib_lib + Link $(Linkflags) @.o.pngtest @.libpng-lib C:o.Stubs Zlib:zlib_lib + +.SUFFIXES: .o .mm .c + +.c.mm: + MemCheck.CC cc $(ccflags) -o $@ LibPng:$< +.c.o: + cc $(ccflags) -o $@ $< + + +# Static dependencies: + + +# Dynamic dependencies: diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.aix b/gtkmm-osx/libpng-1.2.5/scripts/makefile.aix new file mode 100644 index 0000000..29cc6eb --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.aix @@ -0,0 +1,104 @@ +# makefile for libpng using gcc (generic, static library) +# Copyright (C) 2002 Glenn Randers-Pehrson +# Copyright (C) 2000 Cosmin Truta +# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc) +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# For conditions of distribution and use, see copyright notice in png.h + +# Location of the zlib library and include files +ZLIBINC = ../zlib +ZLIBLIB = ../zlib + +# Compiler, linker, lib and other tools +CC = gcc +LD = $(CC) +AR = ar rcs +RANLIB = ranlib +RM = rm -f + +LIBNAME=libpng12 +PNGMAJ = 0 +PNGMIN = 1.2.5 +PNGVER = $(PNGMAJ).$(PNGMIN) + +prefix=/usr/local +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DI=$(DESTDIR)/$(INCPATH) +DL=$(DESTDIR)/$(LIBPATH) + +CDEBUG = -g -DPNG_DEBUG=5 +LDDEBUG = +CRELEASE = -O2 +LDRELEASE = -s +WARNMORE=-Wall +CFLAGS = -I$(ZLIBINC) $(WARNMORE) $(CRELEASE) +LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm $(LDRELEASE) + +# File extensions +O=.o +A=.a +E= + +# Variables +OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \ + pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \ + pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) + +# Targets +all: libpng$(A) pngtest$(E) + +$(LIBNAME)$(A): $(OBJS) + $(AR) $@ $(OBJS) + $(RANLIB) $@ + +test: pngtest$(E) + ./pngtest$(E) + +pngtest$(E): pngtest$(O) $(LIBNAME)$(A) + $(LD) -o $@ pngtest$(O) $(LDFLAGS) + +install: $(LIBNAME)$(A) + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/libpng ]; then mkdir $(DI)/libpng; fi + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@rm $(DI)/png.h + -@rm $(DI)/pngconf.h + cp png.h pngconf.h $(DI)/libpng + chmod 644 $(DI)/libpng/png.h \ + cp $(LIBNAME)$(A) $(DL) + (cd $(DL); ln -f -s $(LIBNAME)$(A) libpng$(A)) + $(DI)/libpng/pngconf.h + (cd $(DI); ln -f -s libpng/* .;) + +clean: + /bin/rm -f *.o $(LIBNAME)$(A) pngtest pngout.png + +png$(O): png.h pngconf.h +pngerror$(O): png.h pngconf.h +pngget$(O): png.h pngconf.h +pngmem$(O): png.h pngconf.h +pngpread$(O): png.h pngconf.h +pngread$(O): png.h pngconf.h +pngrio$(O): png.h pngconf.h +pngrtran$(O): png.h pngconf.h +pngrutil$(O): png.h pngconf.h +pngset$(O): png.h pngconf.h +pngtest$(O): png.h pngconf.h +pngtrans$(O): png.h pngconf.h +pngwio$(O): png.h pngconf.h +pngwrite$(O): png.h pngconf.h +pngwtran$(O): png.h pngconf.h +pngwutil$(O): png.h pngconf.h + diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.amiga b/gtkmm-osx/libpng-1.2.5/scripts/makefile.amiga new file mode 100644 index 0000000..79cb424 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.amiga @@ -0,0 +1,48 @@ +# Commodore Amiga Makefile +# makefile for libpng and SAS C V6.5x compiler +# Copyright (C) 1995-2000 Wolf Faust +# For conditions of distribution and use, see copyright notice in png.h +# +# Note: Use #define PNG_READ_BIG_ENDIAN_SUPPORTED in pngconf.h +# +# Location/path of zlib include files +ZLIB=/zlib +#compiler +CC=sc +#compiler flags +# WARNING: a bug in V6.51 causes bad code with OPTGO +# So use V6.55 or set NOOPTGO!!!!!!!!! +CFLAGS= NOSTKCHK PARMS=REG OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL\ + OPTLOOP OPTRDEP=4 OPTDEP=4 OPTCOMP=4 INCLUDEDIR=$(ZLIB) \ + DEFINE=PNG_INTERNAL +#linker flags +LDFLAGS= SD ND BATCH +#link libs +LDLIBS= libpng.lib libgz.lib LIB:scm.lib LIB:sc.lib Lib:amiga.lib +# linker +LN= slink +# file deletion command +RM= delete quiet +# library (.lib) file creation command +AR= oml +# make directory command +MKDIR= makedir + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +all: libpng.lib pngtest + +libpng.lib: $(OBJS) +-$(RM) libpng.lib +$(AR) libpng.lib r $(OBJS) + +pngtest: pngtest.o libpng.lib +$(LN) libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo libs=\"-lpng12 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) + ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so + cp $(LIBNAME).so* /boot/home/config/lib + +$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) + ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) + +$(LIBNAME).so.$(PNGVER): $(OBJSDLL) + $(CC) -nostart -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) -o \ + $(LIBNAME).so.$(PNGVER) $(OBJSDLL) + +libpng.so.3.$(PNGMIN): $(OBJSDLL) + $(CC) -nostart -Wl,-soname,libpng.so.3 -o \ + libpng.so.3.$(PNGMIN) $(OBJSDLL) + +pngtest: pngtest.o $(LIBNAME).so + $(CC) -L$(ZLIBLIB) -lz -lpng12 -o pngtest pngtest.o + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -sf $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ + libpng.so.3.$(PNGMIN) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* + cp $(LIBNAME).so.$(PNGVER) $(DL) + cp libpng.so.3.$(PNGMIN) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + chmod 755 $(DL)/libpng.so.3.$(PNGMIN) + (cd $(DL); \ + ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ + ln -sf libpng.so.3 libpng.so; \ + ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ + ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi + -@/bin/rm -f $(DM)/man3/libpng.3 + -@/bin/rm -f $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then mkdir $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. + +test-installed: + $(CC) $(CFLAGS) \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ + -o pngtesti `$(BINPATH)/libpng12-config --ldflags` + ./pngtesti pngtest.png + +clean: + /bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \ + $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtesti \ + libpng.so.3.$(PNGMIN) \ + libpng.pc + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h +pngerror.o pngerror.pic.o: png.h pngconf.h +pngrio.o pngrio.pic.o: png.h pngconf.h +pngwio.o pngwio.pic.o: png.h pngconf.h +pngmem.o pngmem.pic.o: png.h pngconf.h +pngset.o pngset.pic.o: png.h pngconf.h +pngget.o pngget.pic.o: png.h pngconf.h +pngread.o pngread.pic.o: png.h pngconf.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h +pngpread.o pngpread.pic.o: png.h pngconf.h +pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.bor b/gtkmm-osx/libpng-1.2.5/scripts/makefile.bor new file mode 100644 index 0000000..a5651aa --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.bor @@ -0,0 +1,162 @@ +# Makefile for libpng +# 16-bit Borland C++ (Note: All modules are compiled in C mode) +# To build the library, do: +# "make -fmakefile.bor -DMODEL=c" +# or: "make -fmakefile.bor -DMODEL=l" +# +# ------------ Borland C++ ------------ + +### Absolutely necessary for this makefile to work +.AUTODEPEND + +## Where zlib.h, zconf.h and zlib_MODEL.lib are +ZLIB_DIR=..\zlib + + +## Compiler, linker and lib stuff +CC=bcc +LD=bcc +LIB=tlib + +!ifndef MODEL +MODEL=l +!endif + +MODEL_ARG=-m$(MODEL) + +#TARGET_CPU=3 +# 2 = 286, 3 = 386, etc. +!ifndef TARGET_CPU +TARGET_CPU=2 +!endif + +# Use this if you don't want Borland's fancy exception handling +# (for Borland C++ 4.0 or later) +#NOEHLIB=noeh$(MODEL).lib + +!ifdef DEBUG +CDEBUG=-v +LDEBUG=-v +!else +CDEBUG= +LDEBUG= +!endif + +# STACKOFLOW=1 +!ifdef STACKOFLOW +CDEBUG=$(CDEBUG) -N +LDEBUG=$(LDEBUG) -N +!endif + +# -X- turn on dependency generation in the object file +# -w set all warnings on +# -O2 optimize for speed +# -Z global optimization +CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG) + +# -M generate map file +LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG) + + +## Variables +OBJS = \ + png.obj \ + pngerror.obj \ + pngget.obj \ + pngmem.obj \ + pngpread.obj \ + pngread.obj \ + pngrio.obj \ + pngrtran.obj \ + pngrutil.obj \ + pngset.obj \ + pngtrans.obj \ + pngwio.obj \ + pngwrite.obj \ + pngwtran.obj \ + pngwutil.obj + +LIBOBJS = \ + +png.obj \ + +pngerror.obj \ + +pngget.obj \ + +pngmem.obj \ + +pngpread.obj \ + +pngread.obj \ + +pngrio.obj \ + +pngrtran.obj \ + +pngrutil.obj \ + +pngset.obj \ + +pngtrans.obj \ + +pngwio.obj \ + +pngwrite.obj \ + +pngwtran.obj \ + +pngwutil.obj + +LIBNAME=libpng$(MODEL).lib + + +## Implicit rules +# Braces let make "batch" calls to the compiler, +# 2 calls instead of 12; space is important. +.c.obj: + $(CC) $(CFLAGS) -c {$*.c } + +.c.exe: + $(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB) + + +## Major targets +all: libpng pngtest + +libpng: $(LIBNAME) + +pngtest: pngtest$(MODEL).exe + +test: pngtest$(MODEL).exe + pngtest$(MODEL) + + +## Minor Targets + +png.obj: png.c +pngerror.obj: pngerror.c +pngget.obj: pngget.c +pngmem.obj: pngmem.c +pngpread.obj: pngpread.c +pngread.obj: pngread.c +pngrio.obj: pngrio.c +pngrtran.obj: pngrtran.c +pngrutil.obj: pngrutil.c +pngset.obj: pngset.c +pngtrans.obj: pngtrans.c +pngwio.obj: pngwio.c +pngwrite.obj: pngwrite.c +pngwtran.obj: pngwtran.c +pngwutil.obj: pngwutil.c + + +$(LIBNAME): $(OBJS) + -del $(LIBNAME) + $(LIB) $(LIBNAME) @&&| +$(LIBOBJS), libpng$(MODEL) +| + + +pngtest$(MODEL).obj: pngtest.c + $(CC) $(CFLAGS) -opngtest$(MODEL) -c pngtest.c + +pngtest$(MODEL).exe: pngtest$(MODEL).obj + $(LD) $(LDFLAGS) pngtest$(MODEL).obj $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB) + + +# Clean up anything else you want +clean: + -del *.obj + -del *.exe + -del *.lib + -del *.lst + -del *.map + + +# End of makefile for libpng diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.cygwin b/gtkmm-osx/libpng-1.2.5/scripts/makefile.cygwin new file mode 100644 index 0000000..a282bef --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.cygwin @@ -0,0 +1,305 @@ +# makefile for cygwin on x86 +# Builds both dll (with import lib) and static lib versions +# of the library, and builds two copies of pngtest: one +# statically linked and one dynamically linked. +# +# Copyright (C) 2002 Soren Anderson, Charles Wilson, and Glenn Randers-Pehrson +# based on makefile for linux-elf w/mmx by: +# Copyright (C) 1998-2000 Greg Roelofs +# Copyright (C) 1996, 1997 Andreas Dilger +# For conditions of distribution and use, see copyright notice in png.h + +# This makefile intends to support building outside the src directory +# if desired. When invoking it, specify an argument to SRCDIR on the +# command line that points to the top of the directory where your source +# is located. + +ifdef SRCDIR +VPATH = $(SRCDIR) +else +SRCDIR = . +endif + +# Override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. + +DESTDIR= + +# To enable assembler optimizations, add '-DPNG_USE_PNGGCCRD' to +# $CFLAGS, and include pnggccrd.o in $OBJS, below, and in the dependency +# list at the bottom of this makefile. + +CC=gcc +ifdef MINGW +MINGW_CCFLAGS=-mno-cygwin -I/usr/include/mingw +MINGW_LDFLAGS=-mno-cygwin -L/usr/lib/mingw +endif + +# Where "make install" puts libpng*.a, *png*.dll, png.h, and pngconf.h +ifndef prefix +prefix=/usr +$(warning You haven't specified a 'prefix=' location. Defaulting to "/usr") +endif + +# Where the zlib library and include files are located +ZLIBLIB= /usr/lib +ZLIBINC= +#ZLIBLIB=../zlib +#ZLIBINC=../zlib + +ALIGN= +# for i386: +#ALIGN=-malign-loops=2 -malign-functions=2 + +WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ + -Wmissing-declarations -Wtraditional -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes #-Wconversion + +### if you use the asm, add pnggccrd.o to the OBJS list +### +### if you don't need thread safety, but want the asm accel +#CFLAGS= $(strip $(MINGW_CCFLAGS) -DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD \ +# $(addprefix -I,$(ZLIBINC)) -Wall -O3 $(ALIGN) -funroll-loops \ +# -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5 +### if you need thread safety and want (minimal) asm accel +#CFLAGS= $(strip $(MINGW_CCFLAGS) -DPNG_USE_PNGGCCRD $(addprefix -I,$(ZLIBINC)) \ +# -Wall -O3 $(ALIGN) -funroll-loops \ +# -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5 +### Normal (non-asm) compilation +CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \ + -Wall -O3 $(ALIGN) -funroll-loops \ + -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5 + +LIBNAME = libpng12 +PNGMAJ = 0 +CYGDLL = 12 +PNGMIN = 1.2.5 +PNGVER = $(PNGMAJ).$(PNGMIN) + +SHAREDLIB=cygpng$(CYGDLL).dll +STATLIB=libpng.a +IMPLIB=libpng.dll.a +SHAREDDEF=libpng.def +LIBS=$(SHAREDLIB) $(STATLIB) +EXE=.exe + +LDFLAGS=$(strip -L. $(MINGW_LDFLAGS) -lpng $(addprefix -L,$(ZLIBLIB)) -lz) +LDSFLAGS=$(strip -shared -L. $(MINGW_LDFLAGS) -Wl,--export-all) +LDEXTRA=-Wl,--out-implib=$(IMPLIB) $(addprefix -L,$(ZLIBLIB)) -lz + +MKDIR=/bin/mkdir -pv +RANLIB=ranlib +#RANLIB=echo + +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib + +BINPATH=$(prefix)/bin +MANPATH=$(prefix)/man +MAN3PATH=$(MANPATH)/man3 +MAN5PATH=$(MANPATH)/man5 + +# cosmetic: shortened strings: +S =$(SRCDIR) +D =$(DESTDIR) +DB =$(D)$(BINPATH) +DI =$(D)$(INCPATH) +DL =$(D)$(LIBPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o # pnggccrd.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +%.o : %.c + $(CC) -c $(CFLAGS) -o $@ $< +%.pic.o : CFLAGS += -DPNG_BUILD_DLL +%.pic.o : %.c + $(CC) -c $(CFLAGS) -o $@ $< + +all: all-static all-shared libpng.pc libpng-config libpng.pc libpng-config + +# Make this to verify that "make [...] install" will do what you want. +buildsetup-tell: + @echo VPATH is set to: \"$(VPATH)\" + @echo prefix is set to: \"$(prefix)\" + @echo -e INCPATH,LIBPATH, etc. are set to:'\n' \ + $(addprefix $(D),$(INCPATH)'\n' $(LIBPATH)'\n' $(BINPATH)'\n' \ + $(MANPATH)'\n' $(MAN3PATH)'\n' $(MAN5PATH)'\n')'\n' + +libpng.pc: scripts/libpng.pc.in + @echo -e Making pkg-config file for this libpng installation..'\n' \ + using PREFIX=\"$(prefix)\"'\n' + cat $(S)/scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! | \ + sed -e s/-lm// > libpng.pc + +libpng-config: scripts/libpng-config-head.in scripts/libpng-config-body.in + @echo -e Making $(LIBNAME) libpng-config file for this libpng \ + installation..'\n' using PREFIX=\"$(prefix)\"'\n' + ( cat $(S)/scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo libs=\"-lpng$(CYGDLL) -lz\"; \ + cat $(S)/scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +static: all-static +shared: all-shared +all-static: $(STATLIB) pngtest-stat$(EXE) +all-shared: $(SHAREDLIB) pngtest$(EXE) + +pnggccrd.o: pnggccrd.c png.h pngconf.h + @echo "" + @echo ' You can ignore the "control reaches end of non-void function"' + @echo ' warning and " defined but not used" warnings:' + @echo "" + $(CC) -c $(CFLAGS) -o $@ $< + +pnggccrd.pic.o: pnggccrd.c png.h pngconf.h + @echo "" + @echo ' You can ignore the "control reaches end of non-void function"' + @echo ' warning and " defined but not used" warnings:' + @echo "" + $(CC) -c $(CFLAGS) -DPNG_BUILD_DLL -o $@ $< + +$(STATLIB): $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +$(SHAREDDEF): projects/msvc/png32ms.def + cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' | \ + sed -e 's/\([^;]*\);/;/' > $@ + +$(SHAREDLIB): $(OBJSDLL) $(SHAREDDEF) + $(CC) $(LDSFLAGS) -o $@ $(OBJSDLL) -L. $(LDEXTRA) + +pngtest$(EXE): pngtest.pic.o $(SHAREDLIB) + $(CC) $(CFLAGS) $< $(LDFLAGS) -o $@ + +pngtest-stat$(EXE): pngtest.o $(STATLIB) + $(CC) -static $(CFLAGS) $< $(LDFLAGS) -o $@ + +pngtest.pic.o: pngtest.c + $(CC) $(CFLAGS) -c $< -o $@ + +pngtest.o: pngtest.c + $(CC) $(CFLAGS) -c $< -o $@ + +test: test-static test-shared + +test-static: pngtest-stat$(EXE) + ./pngtest-stat $(S)/pngtest.png + +test-shared: pngtest$(EXE) + ./pngtest $(S)/pngtest.png + +install-static: $(STATLIB) install-headers install-man + -@if [ ! -d $(DL) ]; then $(MKDIR) $(DL); fi + install -m 644 $(STATLIB) $(DL)/$(LIBNAME).a + -@rm -f $(DL)/$(STATLIB) + (cd $(DL); ln -sf $(LIBNAME).a $(STATLIB)) + +install-shared: $(SHAREDLIB) libpng.pc libpng-config install-headers install-man + -@if [ ! -d $(DL) ]; then $(MKDIR) $(DL); fi + -@if [ ! -d $(DB) ]; then $(MKDIR) $(DB); fi + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR) $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + install -m 644 $(IMPLIB) $(DL)/$(LIBNAME).dll.a + -@rm -f $(DL)/$(IMPLIB) + (cd $(DL); ln -sf $(LIBNAME).dll.a $(IMPLIB)) + install -s -m 755 $(SHAREDLIB) $(DB) + install -m 644 libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + +install-headers: + -@if [ ! -d $(DI) ]; then $(MKDIR) $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR) $(DI)/$(LIBNAME); fi + -@rm -f $(DI)/png.h + -@rm -f $(DI)/pngconf.h + install -m 644 $(S)/png.h $(S)/pngconf.h $(DI)/$(LIBNAME) + -@rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) + +install-man: + -@if [ ! -d $(D)$(MAN3PATH) ]; then $(MKDIR) $(D)$(MAN3PATH); fi + -@if [ ! -d $(D)$(MAN5PATH) ]; then $(MKDIR) $(D)$(MAN5PATH); fi + install -m 644 $(S)/libpngpf.3 $(S)/libpng.3 $(D)$(MAN3PATH) + install -m 644 $(S)/png.5 $(D)$(MAN5PATH) + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then mkdir $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) + +# Run this to verify that a future `configure' run will pick up the settings +# you want. +test-config-install: SHELL=/bin/bash +test-config-install: $(DB)/libpng-config + @echo -e Testing libpng-config functions...'\n' + @ for TYRA in LDFLAGS CPPFLAGS CFLAGS LIBS VERSION; \ + do \ + printf "(%d)\t %10s =%s\n" $$(($$gytiu + 1)) $$TYRA \ + "$$($(DB)/libpng-config `echo --$$TYRA |tr '[:upper:]' '[:lower:]'`)"; \ + gytiu=$$(( $$gytiu + 1 )); \ + done + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. + +test-installed: + $(CC) $(CFLAGS) \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + -L$(ZLIBLIB) \ + -o pngtesti$(EXE) `$(BINPATH)/libpng12-config --ldflags` + ./pngtesti$(EXE) pngtest.png + +clean: + /bin/rm -f *.pic.o *.o $(STATLIB) $(IMPLIB) $(SHAREDLIB) \ + pngtest-stat$(EXE) pngtest$(EXE) pngout.png $(SHAREDDEF) \ + libpng-config libpng.pc pngtesti$(EXE) + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +.PHONY: buildsetup-tell libpng.pc libpng-config test-config-install clean + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h png.c +pngerror.o pngerror.pic.o: png.h pngconf.h pngerror.c +pngrio.o pngrio.pic.o: png.h pngconf.h pngrio.c +pngwio.o pngwio.pic.o: png.h pngconf.h pngwio.c +pngmem.o pngmem.pic.o: png.h pngconf.h pngmem.c +pngset.o pngset.pic.o: png.h pngconf.h pngset.c +pngget.o pngget.pic.o: png.h pngconf.h pngget.c +pngread.o pngread.pic.o: png.h pngconf.h pngread.c +pngrtran.o pngrtran.pic.o: png.h pngconf.h pngrtran.c +pngrutil.o pngrutil.pic.o: png.h pngconf.h pngrutil.c +pngtrans.o pngtrans.pic.o: png.h pngconf.h pngtrans.c +pngwrite.o pngwrite.pic.o: png.h pngconf.h pngwrite.c +pngwtran.o pngwtran.pic.o: png.h pngconf.h pngwtran.c +pngwutil.o pngwutil.pic.o: png.h pngconf.h pngwutil.c +pngpread.o pngpread.pic.o: png.h pngconf.h pngpread.c + +pngtest.o: png.h pngconf.h pngtest.c +pngtest-stat.o: png.h pngconf.h pngtest.c + + + diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.darwin b/gtkmm-osx/libpng-1.2.5/scripts/makefile.darwin new file mode 100644 index 0000000..b04044f --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.darwin @@ -0,0 +1,205 @@ +# makefile for libpng on Darwin / Mac OS X +# Copyright (C) 2002 Glenn Randers-Pehrson +# Copyright (C) 2001 Christoph Pfisterer +# derived from makefile.linux: +# Copyright (C) 1998, 1999 Greg Roelofs +# Copyright (C) 1996, 1997 Andreas Dilger +# For conditions of distribution and use, see copyright notice in png.h + +# where "make install" puts libpng.a, libpng12.dylib, png.h and pngconf.h +prefix=/usr/local + +# Where the zlib library and include files are located +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +ZLIBLIB=../zlib +ZLIBINC=../zlib + +CC=cc +CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops +LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz + +#RANLIB=echo +RANLIB=ranlib + +PNGMAJ = 0 +PNGMIN = 1.2.5 +PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng12 + +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) -fno-common -o $@ $*.c + +all: libpng.a $(LIBNAME).dylib pngtest libpng.pc libpng-config + +libpng.a: $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! | \ + sed -e s/-lm// > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo libs=\"-lpng12 -lz\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBNAME).dylib: $(LIBNAME).$(PNGMAJ).dylib + ln -sf $(LIBNAME).$(PNGMAJ).dylib $(LIBNAME).dylib + +$(LIBNAME).$(PNGMAJ).dylib: $(LIBNAME).$(PNGVER).dylib + ln -sf $(LIBNAME).$(PNGVER).dylib $(LIBNAME).$(PNGMAJ).dylib + +$(LIBNAME).$(PNGVER).dylib: $(OBJSDLL) + $(CC) -dynamiclib \ + -install_name $(DL)/$(LIBNAME).$(PNGMAJ).dylib \ + -flat_namespace -undefined suppress \ + -o $(LIBNAME).$(PNGVER).dylib \ + $(OBJSDLL) + +libpng.3.$(PNGMIN).dylib: $(OBJSDLL) + $(CC) -dynamiclib \ + -install_name $(DL)/libpng.3.dylib \ + -current_version 3 -compatibility_version 3 \ + -flat_namespace -undefined suppress \ + -o libpng.3.$(PNGMIN).dylib \ + $(OBJSDLL) + +pngtest: pngtest.o $(LIBNAME).dylib + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -sf $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBNAME).dylib libpng.pc \ + libpng.3.$(PNGMIN).dylib + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).$(PNGVER)*.dylib + -@/bin/rm -f $(DL)/$(LIBNAME).dylib + -@/bin/rm -f $(DL)/libpng.dylib + -@/bin/rm -f $(DL)/libpng.3.dylib + -@/bin/rm -f $(DL)/libpng.3.$(PNGMIN)*.dylib + cp $(LIBNAME).$(PNGVER).dylib $(DL) + cp libpng.3.$(PNGMIN).dylib $(DL) + chmod 755 $(DL)/$(LIBNAME).$(PNGVER).dylib + chmod 755 $(DL)/libpng.3.$(PNGMIN).dylib + (cd $(DL); \ + ln -sf libpng.3.$(PNGMIN).dylib libpng.3.dylib; \ + ln -sf libpng.3.dylib libpng.dylib; \ + ln -sf $(LIBNAME).$(PNGVER).dylib $(LIBNAME).$(PNGMAJ).dylib; \ + ln -sf $(LIBNAME).$(PNGMAJ).dylib $(LIBNAME).dylib) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi + -@/bin/rm -f $(DM)/man3/libpng.3 + -@/bin/rm -f $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then mkdir $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. + +test-installed: + $(CC) $(CFLAGS) \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + -L$(ZLIBLIB) \ + -o pngtesti `$(BINPATH)/libpng12-config --ldflags` + ./pngtesti pngtest.png + +clean: + rm -f *.o libpng.a pngtest pngout.png libpng-config \ + libpng.3.$(PNGMIN).dylib \ + libpng.pc $(LIBNAME).*dylib pngtesti + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h +pngerror.o pngerror.pic.o: png.h pngconf.h +pngrio.o pngrio.pic.o: png.h pngconf.h +pngwio.o pngwio.pic.o: png.h pngconf.h +pngmem.o pngmem.pic.o: png.h pngconf.h +pngset.o pngset.pic.o: png.h pngconf.h +pngget.o pngget.pic.o: png.h pngconf.h +pngread.o pngread.pic.o: png.h pngconf.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h +pngpread.o pngpread.pic.o: png.h pngconf.h + +pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.dec b/gtkmm-osx/libpng-1.2.5/scripts/makefile.dec new file mode 100644 index 0000000..5d7a11e --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.dec @@ -0,0 +1,185 @@ +# makefile for libpng on DEC Alpha Unix +# Copyright (C) 2000-2002 Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# For conditions of distribution and use, see copyright notice in png.h + +# where make install puts libpng.a and png.h +prefix=/usr/local +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +# Where the zlib library and include files are located +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +ZLIBLIB=../zlib +ZLIBINC=../zlib + +PNGMAJ = 0 +PNGMIN = 1.2.5 +PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng12 + +CC=cc +CFLAGS=-std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1 +LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm + +#RANLIB=echo +RANLIB=ranlib + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +all: $(LIBNAME).so libpng.a pngtest libpng.pc libpng-config + +libpng.a: $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo ccopts=\"-std\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo libs=\"-lpng12 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) + ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so + +$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) + ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) + +$(LIBNAME).so.$(PNGVER): $(OBJS) + $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) + -soname $(LIBNAME).so.$(PNGMAJ) + +libpng.so.3.$(PNGMIN): $(OBJS) + $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) + -soname libpng.so.3 + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -sf $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ + libpng.so.3.$(PNGMIN) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* + cp $(LIBNAME).so.$(PNGVER) $(DL) + cp libpng.so.3.$(PNGMIN) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + chmod 755 $(DL)/libpng.so.3.$(PNGMIN) + (cd $(DL); \ + ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ + ln -f -s libpng.so.3 libpng.so; \ + ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ + ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi + -@/bin/rm -f $(DM)/man3/libpng.3 + -@/bin/rm -f $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then mkdir $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) -w1 -I$(ZLIBINC) \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + -L$(ZLIBLIB) -R$(ZLIBLIB) \ + -o pngtesti `$(BINPATH)/libpng12-config --ldflags` + ./pngtesti pngtest.png + +clean: + /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ + libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ + libpng.so.3.$(PNGMIN) \ + libpng.pc + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h +pngerror.o: png.h pngconf.h +pngrio.o: png.h pngconf.h +pngwio.o: png.h pngconf.h +pngmem.o: png.h pngconf.h +pngset.o: png.h pngconf.h +pngget.o: png.h pngconf.h +pngread.o: png.h pngconf.h +pngrtran.o: png.h pngconf.h +pngrutil.o: png.h pngconf.h +pngtest.o: png.h pngconf.h +pngtrans.o: png.h pngconf.h +pngwrite.o: png.h pngconf.h +pngwtran.o: png.h pngconf.h +pngwutil.o: png.h pngconf.h +pngpread.o: png.h pngconf.h + diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.dj2 b/gtkmm-osx/libpng-1.2.5/scripts/makefile.dj2 new file mode 100644 index 0000000..09045c2 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.dj2 @@ -0,0 +1,55 @@ +# DJGPP (DOS gcc) makefile for libpng +# Copyright (C) 2002 Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# For conditions of distribution and use, see copyright notice in png.h + +# where make install will put libpng.a and png.h +#prefix=/usr/local +prefix=. +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib + +CC=gcc +CFLAGS=-I../zlib -O +LDFLAGS=-L. -L../zlib/ -lpng -lz -lm + +RANLIB=ranlib + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o pngwtran.o \ + pngmem.o pngerror.o pngpread.o + +all: libpng.a pngtest + +libpng.a: $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + coff2exe pngtest + +test: pngtest + ./pngtest +clean: + rm -f *.o libpng.a pngtest pngout.png + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h +pngerror.o: png.h pngconf.h +pngrio.o: png.h pngconf.h +pngwio.o: png.h pngconf.h +pngmem.o: png.h pngconf.h +pngset.o: png.h pngconf.h +pngget.o: png.h pngconf.h +pngread.o: png.h pngconf.h +pngpread.o: png.h pngconf.h +pngrtran.o: png.h pngconf.h +pngrutil.o: png.h pngconf.h +pngtest.o: png.h pngconf.h +pngtrans.o: png.h pngconf.h +pngwrite.o: png.h pngconf.h +pngwtran.o: png.h pngconf.h +pngwutil.o: png.h pngconf.h + diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.freebsd b/gtkmm-osx/libpng-1.2.5/scripts/makefile.freebsd new file mode 100644 index 0000000..d7d5fae --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.freebsd @@ -0,0 +1,48 @@ +# makefile for libpng under FreeBSD +# Copyright (C) 2002 Glenn Randers-Pehrson and Andrey A. Chernov +# For conditions of distribution and use, see copyright notice in png.h + +PREFIX?= /usr/local +SHLIB_VER?= 5 + +LIB= png +SHLIB_MAJOR= ${SHLIB_VER} +SHLIB_MINOR= 0 +NOPROFILE= YES +NOOBJ= YES + +# where make install puts libpng.a and png.h +DESTDIR= ${PREFIX} +LIBDIR= /lib +INCS= png.h pngconf.h +INCSDIR= /include/libpng +INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk +MAN= libpng.3 libpngpf.3 png.5 +MANDIR= /man/man +SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \ + libpng/pngconf.h ${INCSDIR}/../pngconf.h +LDADD+= -lm -lz +DPADD+= ${LIBM} ${LIBZ} + +CFLAGS+= -I. -DPNG_USE_PNGGCCRD +.if (${MACHINE_ARCH} != "i386") +CFLAGS+= -DPNG_NO_ASSEMBLER_CODE +.endif + +SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ + pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ + pngwtran.c pngmem.c pngerror.c pngpread.c pnggccrd.c + +pngtest: pngtest.o libpng.a + ${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -lpng -lz -lm + +CLEANFILES= pngtest pngtest.o pngout.png + +test: pngtest + ./pngtest + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +.include diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.gcc b/gtkmm-osx/libpng-1.2.5/scripts/makefile.gcc new file mode 100644 index 0000000..f7fc368 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.gcc @@ -0,0 +1,66 @@ +# makefile for libpng using gcc (generic, static library) +# Copyright (C) 2000 Cosmin Truta +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# For conditions of distribution and use, see copyright notice in png.h + +# Location of the zlib library and include files +ZLIBINC = ../zlib +ZLIBLIB = ../zlib + +# Compiler, linker, lib and other tools +CC = gcc +LD = $(CC) +AR = ar rcs +RANLIB = ranlib +RM = rm -f + +CDEBUG = -g -DPNG_DEBUG=5 +LDDEBUG = +CRELEASE = -O2 +LDRELEASE = -s +CFLAGS = -I$(ZLIBINC) -Wall $(CRELEASE) +LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm $(LDRELEASE) + +# File extensions +O=.o +A=.a +E= + +# Variables +OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \ + pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \ + pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) + +# Targets +all: libpng$(A) pngtest$(E) + +libpng$(A): $(OBJS) + $(AR) $@ $(OBJS) + $(RANLIB) $@ + +test: pngtest$(E) + ./pngtest$(E) + +pngtest$(E): pngtest$(O) libpng$(A) + $(LD) -o $@ pngtest$(O) $(LDFLAGS) + +clean: + $(RM) *$(O) libpng$(A) pngtest$(E) pngout.png + +png$(O): png.h pngconf.h +pngerror$(O): png.h pngconf.h +pngget$(O): png.h pngconf.h +pngmem$(O): png.h pngconf.h +pngpread$(O): png.h pngconf.h +pngread$(O): png.h pngconf.h +pngrio$(O): png.h pngconf.h +pngrtran$(O): png.h pngconf.h +pngrutil$(O): png.h pngconf.h +pngset$(O): png.h pngconf.h +pngtest$(O): png.h pngconf.h +pngtrans$(O): png.h pngconf.h +pngwio$(O): png.h pngconf.h +pngwrite$(O): png.h pngconf.h +pngwtran$(O): png.h pngconf.h +pngwutil$(O): png.h pngconf.h + diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.gcmmx b/gtkmm-osx/libpng-1.2.5/scripts/makefile.gcmmx new file mode 100644 index 0000000..d0dfdd9 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.gcmmx @@ -0,0 +1,249 @@ +# makefile for libpng.a and libpng12.so on Linux ELF with gcc using MMX +# assembler code +# Copyright 2002 Greg Roelofs and Glenn Randers-Pehrson +# Copyright 1998-2001 Greg Roelofs +# Copyright 1996-1997 Andreas Dilger +# For conditions of distribution and use, see copyright notice in png.h + +# CAUTION: Do not use this makefile with gcc versions 2.7.2.2 and earlier. + +# WARNING: The assembler code in pnggccrd.c may not be thread safe. + +# NOTE: When testing MMX performance on a multitasking system, make sure +# there are no floating-point programs (e.g., SETI@Home) running in +# the background! Context switches between MMX and FPU are expensive. + +LIBNAME = libpng12 +PNGMAJ = 0 +PNGMIN = 1.2.5 +PNGVER = $(PNGMAJ).$(PNGMIN) + +CC=gcc + +# where "make install" puts libpng12.a, libpng12.so*, +# libpng12/png.h and libpng12/pngconf.h +# Prefix must be a full pathname. +prefix=/usr/local + +# Where the zlib library and include files are located. +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +ZLIBLIB=../zlib +ZLIBINC=../zlib + +ALIGN= +# for i386: +#ALIGN=-malign-loops=2 -malign-functions=2 + +WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ + -Wmissing-declarations -Wtraditional -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes #-Wconversion + +# for pgcc version 2.95.1, -O3 is buggy; don't use it. + +# Remove -DPNG_THREAD_UNSAFE_OK if you need thread safety +### for generic gcc: +CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall \ + -O3 $(ALIGN) -funroll-loops \ + -fomit-frame-pointer # $(WARNMORE) -g -DPNG_DEBUG=5 +### for gcc 2.95.2 on 686: +#CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \ +# -mcpu=i686 -malign-double -ffast-math -fstrict-aliasing \ +# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer +### for gcc 2.7.2.3 on 486 and up: +#CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \ +# -m486 -malign-double -ffast-math \ +# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer + +LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm +LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm + +RANLIB=ranlib +#RANLIB=echo + +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o pnggccrd.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c + +all: libpng.a $(LIBNAME).so pngtest pngtest-static libpng.pc libpng-config + +libpng.a: $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo cppflags=\"-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \ + echo libs=\"-lpng12 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +pnggccrd.o: pnggccrd.c png.h pngconf.h + $(CC) -c $(CFLAGS) -o $@ $*.c + +pnggccrd.pic.o: pnggccrd.c png.h pngconf.h + $(CC) -c $(CFLAGS) -fPIC -o $@ pnggccrd.c + +$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) + ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so + +$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) + ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) + +$(LIBNAME).so.$(PNGVER): $(OBJSDLL) + $(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) \ + -o $(LIBNAME).so.$(PNGVER) \ + $(OBJSDLL) + +libpng.so.3.$(PNGMIN): $(OBJSDLL) + $(CC) -shared -Wl,-soname,libpng.so.3 \ + -o libpng.so.3.$(PNGMIN) \ + $(OBJSDLL) + +pngtest: pngtest.o $(LIBNAME).so + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +pngtest-static: pngtest.o libpng.a + $(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A) + +test: pngtest pngtest-static + @echo "" + @echo " Running pngtest dynamically linked with $(LIBNAME).so:" + @echo "" + ./pngtest + @echo "" + @echo " Running pngtest statically linked with libpng.a:" + @echo "" + ./pngtest-static + +install-headers: png.h pngconf.h + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -sf $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ + libpng.so.3.$(PNGMIN) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* + cp $(LIBNAME).so.$(PNGVER) $(DL) + cp libpng.so.3.$(PNGMIN) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + chmod 755 $(DL)/libpng.so.3.$(PNGMIN) + (cd $(DL); \ + ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ + ln -sf libpng.so.3 libpng.so; \ + ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ + ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi + -@/bin/rm -f $(DM)/man3/libpng.3 + -@/bin/rm -f $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then mkdir $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. + +test-installed: + $(CC) -I$(ZLIBINC) \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ + -o pngtesti `$(BINPATH)/libpng12-config --ldflags` + ./pngtesti pngtest.png + +clean: + /bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \ + $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \ + libpng.so.3.$(PNGMIN) \ + libpng.pc + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +png.o png.pic.o: png.h pngconf.h png.c +pngerror.o pngerror.pic.o: png.h pngconf.h pngerror.c +pngrio.o pngrio.pic.o: png.h pngconf.h pngrio.c +pngwio.o pngwio.pic.o: png.h pngconf.h pngwio.c +pngmem.o pngmem.pic.o: png.h pngconf.h pngmem.c +pngset.o pngset.pic.o: png.h pngconf.h pngset.c +pngget.o pngget.pic.o: png.h pngconf.h pngget.c +pngread.o pngread.pic.o: png.h pngconf.h pngread.c +pngrtran.o pngrtran.pic.o: png.h pngconf.h pngrtran.c +pngrutil.o pngrutil.pic.o: png.h pngconf.h pngrutil.c +pngtrans.o pngtrans.pic.o: png.h pngconf.h pngtrans.c +pngwrite.o pngwrite.pic.o: png.h pngconf.h pngwrite.c +pngwtran.o pngwtran.pic.o: png.h pngconf.h pngwtran.c +pngwutil.o pngwutil.pic.o: png.h pngconf.h pngwutil.c +pngpread.o pngpread.pic.o: png.h pngconf.h pngpread.c + +pngtest.o: png.h pngconf.h pngtest.c diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.hpgcc b/gtkmm-osx/libpng-1.2.5/scripts/makefile.hpgcc new file mode 100644 index 0000000..f677308 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.hpgcc @@ -0,0 +1,217 @@ +# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker. +# Copyright (C) 2002, Glenn Randers-Pehrson +# Copyright (C) 2001, Laurent faillie +# Copyright (C) 1998, 1999 Greg Roelofs +# Copyright (C) 1996, 1997 Andreas Dilger +# For conditions of distribution and use, see copyright notice in png.h + +CC=gcc +LD=ld + +# where "make install" puts libpng.a, libpng.sl*, png.h and pngconf.h +prefix=/usr/local + +# Where the zlib library and include files are located +ZLIBLIB=/opt/zlib/lib +ZLIBINC=/opt/zlib/include + +# Note that if you plan to build a libpng shared library, zlib must also +# be a shared library, which zlib's configure does not do. After running +# zlib's configure, edit the appropriate lines of makefile to read: +# CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \ +# LDSHARED=ld -b +# SHAREDLIB=libz.sl + +ALIGN= +# for i386: +#ALIGN=-malign-loops=2 -malign-functions=2 + +WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ + -Wmissing-declarations -Wtraditional -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes #-Wconversion + +# for pgcc version 2.95.1, -O3 is buggy; don't use it. + +CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \ + $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5 +#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm +LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm + +RANLIB=ranlib +#RANLIB=echo + +PNGMAJ = 0 +PNGMIN = 1.2.5 +PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng12 + +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c + +all: libpng.a $(LIBNAME).sl pngtest libpng.pc libpng-config + +libpng.a: $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo libs=\"-lpng12 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBNAME).sl: $(LIBNAME).sl.$(PNGMAJ) + ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl + +$(LIBNAME).sl.$(PNGMAJ): $(LIBNAME).sl.$(PNGVER) + ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ) + +$(LIBNAME).sl.$(PNGVER): $(OBJSDLL) + $(LD) -b +s \ + +h $(LIBNAME).sl.$(PNGMAJ) -o $(LIBNAME).sl.$(PNGVER) $(OBJSDLL) + +libpng.sl.3.$(PNGMIN): $(OBJSDLL) + $(LD) -b +s \ + +h libpng.sl.3 -o libpng.sl.3.$(PNGMIN) $(OBJSDLL) + +pngtest: pngtest.o $(LIBNAME).sl + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + + +install-headers: png.h pngconf.h + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -sf $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBNAME).sl.$(PNGVER) libpng.pc \ + libpng.sl.3.$(PNGMIN) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGVER)* $(DL)/$(LIBNAME).sl + -@/bin/rm -f $(DL)/libpng.sl + -@/bin/rm -f $(DL)/libpng.sl.3 + -@/bin/rm -f $(DL)/libpng.sl.3.$(PNGMIN)* + cp $(LIBNAME).sl.$(PNGVER) $(DL) + cp libpng.sl.3.$(PNGMIN) $(DL) + chmod 755 $(DL)/$(LIBNAME).sl.$(PNGVER) + chmod 755 $(DL)/libpng.sl.3.$(PNGMIN) + (cd $(DL); \ + ln -sf libpng.sl.3.$(PNGMIN) libpng.sl.3; \ + ln -sf libpng.sl.3 libpng.sl; \ + ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ); \ + ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi + -@/bin/rm -f $(DM)/man3/libpng.3 + -@/bin/rm -f $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then mkdir $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) -I$(ZLIBINC) \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ + -o pngtesti `$(BINPATH)/libpng12-config --ldflags` + ./pngtesti pngtest.png + +clean: + /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ + libpng-config $(LIBNAME).sl $(LIBNAME).sl.$(PNGMAJ)* \ + libpng.sl.3.$(PNGMIN) \ + libpng.pc + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h +pngerror.o pngerror.pic.o: png.h pngconf.h +pngrio.o pngrio.pic.o: png.h pngconf.h +pngwio.o pngwio.pic.o: png.h pngconf.h +pngmem.o pngmem.pic.o: png.h pngconf.h +pngset.o pngset.pic.o: png.h pngconf.h +pngget.o pngget.pic.o: png.h pngconf.h +pngread.o pngread.pic.o: png.h pngconf.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h +pngpread.o pngpread.pic.o: png.h pngconf.h + +pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.hpux b/gtkmm-osx/libpng-1.2.5/scripts/makefile.hpux new file mode 100644 index 0000000..a9c4d35 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.hpux @@ -0,0 +1,202 @@ +# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product. +# Copyright (C) 1999-2002 Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42 +# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard +# For conditions of distribution and use, see copyright notice in png.h + +# Where the zlib library and include files are located +ZLIBLIB=/opt/zlib/lib +ZLIBINC=/opt/zlib/include + +# Note that if you plan to build a libpng shared library, zlib must also +# be a shared library, which zlib's configure does not do. After running +# zlib's configure, edit the appropriate lines of makefile to read: +# CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \ +# LDSHARED=ld -b +# SHAREDLIB=libz.sl + +CC=cc +CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0 +# Caution: be sure you have built zlib with the same CFLAGS. +CCFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0 +LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm + +RANLIB=ranlib + +PNGMAJ = 0 +PNGMIN = 1.2.5 +PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng12 + +# where make install puts libpng.a, libpng12.sl, and png.h +prefix=/opt/libpng +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) +z -o $@ $*.c + +all: libpng.a $(LIBNAME).sl pngtest libpng.pc libpng-config + +libpng.a: $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo ccopts=\"-Ae +DA1.1 +DS2.0\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo libs=\"-lpng12 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBNAME).sl: $(LIBNAME).sl.$(PNGMAJ) + ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl + +$(LIBNAME).sl.$(PNGMAJ): $(LIBNAME).sl.$(PNGVER) + ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ) + +$(LIBNAME).sl.$(PNGVER): $(OBJSDLL) + $(LD) -b +s \ + +h $(LIBNAME).sl.$(PNGMAJ) -o $(LIBNAME).sl.$(PNGVER) $(OBJSDLL) + +libpng.sl.3.$(PNGMIN): $(OBJSDLL) + $(LD) -b +s \ + +h libpng.sl.3 -o libpng.sl.3.$(PNGMIN) $(OBJSDLL) + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -sf $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBNAME).sl.$(PNGVER) libpng.pc \ + libpng.sl.3.$(PNGMIN) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGVER)* $(DL)/$(LIBNAME).sl + -@/bin/rm -f $(DL)/libpng.sl + -@/bin/rm -f $(DL)/libpng.sl.3 + -@/bin/rm -f $(DL)/libpng.sl.3.$(PNGMIN)* + cp $(LIBNAME).sl.$(PNGVER) $(DL) + cp libpng.sl.3.$(PNGMIN) $(DL) + chmod 755 $(DL)/$(LIBNAME).sl.$(PNGVER) + chmod 755 $(DL)/libpng.sl.3.$(PNGMIN) + (cd $(DL); \ + ln -sf libpng.sl.3.$(PNGMIN) libpng.sl.3; \ + ln -sf libpng.sl.3 libpng.sl; \ + ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ); \ + ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi + -@/bin/rm -f $(DM)/man3/libpng.3 + -@/bin/rm -f $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then mkdir $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) $(CCFLAGS) \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + -L$(ZLIBLIB) \ + -o pngtesti `$(BINPATH)/libpng12-config --ldflags` + ./pngtesti pngtest.png + +clean: + /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ + libpng-config $(LIBNAME).sl $(LIBNAME).sl.$(PNGMAJ)* \ + libpng.sl.3.$(PNGMIN) \ + libpng.pc + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h +pngerror.o: png.h pngconf.h +pngrio.o: png.h pngconf.h +pngwio.o: png.h pngconf.h +pngmem.o: png.h pngconf.h +pngset.o: png.h pngconf.h +pngget.o: png.h pngconf.h +pngread.o: png.h pngconf.h +pngrtran.o: png.h pngconf.h +pngrutil.o: png.h pngconf.h +pngtest.o: png.h pngconf.h +pngtrans.o: png.h pngconf.h +pngwrite.o: png.h pngconf.h +pngwtran.o: png.h pngconf.h +pngwutil.o: png.h pngconf.h +pngpread.o: png.h pngconf.h diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.ibmc b/gtkmm-osx/libpng-1.2.5/scripts/makefile.ibmc new file mode 100644 index 0000000..f09a62c --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.ibmc @@ -0,0 +1,71 @@ +# Makefile for libpng (static) +# IBM C version 3.x for Win32 and OS/2 +# Copyright (C) 2000 Cosmin Truta +# For conditions of distribution and use, see copyright notice in png.h +# Notes: +# Derived from makefile.std +# All modules are compiled in C mode +# Tested under Win32, expected to work under OS/2 +# Can be easily adapted for IBM VisualAge/C++ for AIX + +# Location of the zlib library and include files +ZLIBINC = ../zlib +ZLIBLIB = ../zlib + +# Compiler, linker, lib and other tools +CC = icc +LD = ilink +AR = ilib +RM = del + +CFLAGS = -I$(ZLIBINC) -Mc -O2 -W3 +LDFLAGS = + +# File extensions +O=.obj +A=.lib +E=.exe + +# Variables +OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \ + pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \ + pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) + +LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A) + +# Targets +all: libpng$(A) pngtest$(E) + +libpng$(A): $(OBJS) + $(AR) -out:$@ $(OBJS) + +test: pngtest$(E) + pngtest$(E) + +pngtest: pngtest$(E) + +pngtest$(E): pngtest$(O) libpng$(A) + $(LD) $(LDFLAGS) pngtest$(O) $(LIBS) + +clean: + $(RM) *$(O) + $(RM) libpng$(A) + $(RM) pngtest$(E) + $(RM) pngout.png + +png$(O): png.h pngconf.h +pngerror$(O): png.h pngconf.h +pngget$(O): png.h pngconf.h +pngmem$(O): png.h pngconf.h +pngpread$(O): png.h pngconf.h +pngread$(O): png.h pngconf.h +pngrio$(O): png.h pngconf.h +pngrtran$(O): png.h pngconf.h +pngrutil$(O): png.h pngconf.h +pngset$(O): png.h pngconf.h +pngtest$(O): png.h pngconf.h +pngtrans$(O): png.h pngconf.h +pngwio$(O): png.h pngconf.h +pngwrite$(O): png.h pngconf.h +pngwtran$(O): png.h pngconf.h +pngwutil$(O): png.h pngconf.h diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.intel b/gtkmm-osx/libpng-1.2.5/scripts/makefile.intel new file mode 100644 index 0000000..1cabe77 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.intel @@ -0,0 +1,114 @@ +# Makefile for libpng +# Microsoft Visual C++ with Intel C/C++ Compiler 4.0 and later + +# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is +# copyright 1995 Guy Eric Schalnat, Group 42, Inc. +# For conditions of distribution and use, see copyright notice in png.h + +# To use, do "nmake /f scripts\makefile.intel" + + +# ------------------- Intel C/C++ Compiler 4.0 and later ------------------- + +# Caution: the assembler code was introduced at libpng version 1.0.4 and has +# not yet been thoroughly tested. + +# Use assembler code +ASMCODE=-DPNG_USE_PNGVCRD + +# Where the zlib library and include files are located +ZLIBLIB=..\zlib +ZLIBINC=..\zlib + +# Target CPU +CPU=6 # Pentium II +#CPU=5 # Pentium + +# Calling convention +CALLING=r # __fastcall +#CALLING=z # __stdcall +#CALLING=d # __cdecl + +# Uncomment next to put error messages in a file +#ERRFILE=>>pngerrs + +# -------------------------------------------------------------------------- + + +CC=icl -c +CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -I$(ZLIBINC) $(ASMCODE) -nologo +LD=link +LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO + +O=.obj + +OBJS=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) \ +pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) \ +pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) pngvcrd$(O) + + +all: test + +png$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngset$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngget$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngread$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngpread$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngrtran$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngrutil$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngvcrd$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngerror$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngmem$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngrio$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngwio$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngtest$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngtrans$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngwrite$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngwtran$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngwutil$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +libpng.lib: $(OBJS) + if exist libpng.lib del libpng.lib + lib /NOLOGO /OUT:libpng.lib $(OBJS) + +pngtest.exe: pngtest.obj libpng.lib + $(LD) $(LDFLAGS) /OUT:pngtest.exe pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib + +test: pngtest.exe + pngtest.exe + + +# End of makefile for libpng diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.knr b/gtkmm-osx/libpng-1.2.5/scripts/makefile.knr new file mode 100644 index 0000000..44ee538 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.knr @@ -0,0 +1,99 @@ +# makefile for libpng +# Copyright (C) 2002 Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# For conditions of distribution and use, see copyright notice in png.h + +# This makefile requires the file ansi2knr.c, which you can get +# from the Ghostscript ftp site at ftp://ftp.cs.wisc.edu/ghost/ +# If you have libjpeg, you probably already have ansi2knr.c in the jpeg +# source distribution. + +# where make install puts libpng.a and png.h +prefix=/usr/local +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +CC=cc +CFLAGS=-I../zlib -O +LDFLAGS=-L. -L../zlib/ -lpng -lz -lm +# flags for ansi2knr +ANSI2KNRFLAGS= + +RANLIB=ranlib +#RANLIB=echo + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +all: ansi2knr libpng.a pngtest + +# general rule to allow ansi2knr to work +.c.o: + ./ansi2knr $*.c T$*.c + $(CC) $(CFLAGS) -c T$*.c + rm -f T$*.c $*.o + mv T$*.o $*.o + +ansi2knr: ansi2knr.c + $(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c + +libpng.a: ansi2knr $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install: libpng.a + -@mkdir $(DESTDIR)$(INCPATH) + -@mkdir $(DESTDIR)$(INCPATH)/libpng + -@mkdir $(DESTDIR)$(LIBPATH) + -@rm -f $(DESTDIR)$(INCPATH)/png.h + -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h + cp png.h $(DESTDIR)$(INCPATH)/libpng + cp pngconf.h $(DESTDIR)$(INCPATH)/libpng + chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h + chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h + (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .) + cp libpng.a $(DESTDIR)$(LIBPATH) + chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a + +clean: + rm -f *.o libpng.a pngtest pngout.png ansi2knr + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h +pngerror.o: png.h pngconf.h +pngrio.o: png.h pngconf.h +pngwio.o: png.h pngconf.h +pngmem.o: png.h pngconf.h +pngset.o: png.h pngconf.h +pngget.o: png.h pngconf.h +pngread.o: png.h pngconf.h +pngpread.o: png.h pngconf.h +pngrtran.o: png.h pngconf.h +pngrutil.o: png.h pngconf.h +pngtest.o: png.h pngconf.h +pngtrans.o: png.h pngconf.h +pngwrite.o: png.h pngconf.h +pngwtran.o: png.h pngconf.h +pngwutil.o: png.h pngconf.h diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.linux b/gtkmm-osx/libpng-1.2.5/scripts/makefile.linux new file mode 100644 index 0000000..7ec8125 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.linux @@ -0,0 +1,223 @@ +# makefile for libpng.a and libpng12.so on Linux ELF with gcc +# Copyright (C) 1998, 1999, 2002 Greg Roelofs and Glenn Randers-Pehrson +# Copyright (C) 1996, 1997 Andreas Dilger +# For conditions of distribution and use, see copyright notice in png.h + +LIBNAME = libpng12 +PNGMAJ = 0 +PNGMIN = 1.2.5 +PNGVER = $(PNGMAJ).$(PNGMIN) + +CC=gcc + +# where "make install" puts libpng12.a, libpng12.so*, +# libpng12/png.h and libpng12/pngconf.h +# Prefix must be a full pathname. +prefix=/usr/local + +# Where the zlib library and include files are located. +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +ZLIBLIB=../zlib +ZLIBINC=../zlib + +ALIGN= +# for i386: +#ALIGN=-malign-loops=2 -malign-functions=2 + +WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ + -Wmissing-declarations -Wtraditional -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes #-Wconversion + +# for pgcc version 2.95.1, -O3 is buggy; don't use it. + +CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \ + $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5 + +LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm +LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm + +RANLIB=ranlib +#RANLIB=echo + +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c + +all: libpng.a $(LIBNAME).so pngtest pngtest-static libpng.pc libpng-config + +libpng.a: $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \ + echo libs=\"-lpng12 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) + ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so + +$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) + ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) + +$(LIBNAME).so.$(PNGVER): $(OBJSDLL) + $(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) \ + -o $(LIBNAME).so.$(PNGVER) \ + $(OBJSDLL) + +libpng.so.3.$(PNGMIN): $(OBJSDLL) + $(CC) -shared -Wl,-soname,libpng.so.3 \ + -o libpng.so.3.$(PNGMIN) \ + $(OBJSDLL) + +pngtest: pngtest.o $(LIBNAME).so + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +pngtest-static: pngtest.o libpng.a + $(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A) + +test: pngtest pngtest-static + @echo "" + @echo " Running pngtest dynamically linked with $(LIBNAME).so:" + @echo "" + ./pngtest + @echo "" + @echo " Running pngtest statically linked with libpng.a:" + @echo "" + ./pngtest-static + +install-headers: png.h pngconf.h + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -sf $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ + libpng.so.3.$(PNGMIN) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* + cp $(LIBNAME).so.$(PNGVER) $(DL) + cp libpng.so.3.$(PNGMIN) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + chmod 755 $(DL)/libpng.so.3.$(PNGMIN) + (cd $(DL); \ + ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ + ln -sf libpng.so.3 libpng.so; \ + ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ + ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi + -@/bin/rm -f $(DM)/man3/libpng.3 + -@/bin/rm -f $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then mkdir $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. + +test-installed: + $(CC) -I$(ZLIBINC) \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ + -o pngtesti `$(BINPATH)/libpng12-config --ldflags` + ./pngtesti pngtest.png + +clean: + /bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \ + $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \ + libpng.so.3.$(PNGMIN) \ + libpng.pc + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h +pngerror.o pngerror.pic.o: png.h pngconf.h +pngrio.o pngrio.pic.o: png.h pngconf.h +pngwio.o pngwio.pic.o: png.h pngconf.h +pngmem.o pngmem.pic.o: png.h pngconf.h +pngset.o pngset.pic.o: png.h pngconf.h +pngget.o pngget.pic.o: png.h pngconf.h +pngread.o pngread.pic.o: png.h pngconf.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h +pngpread.o pngpread.pic.o: png.h pngconf.h + +pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.macosx b/gtkmm-osx/libpng-1.2.5/scripts/makefile.macosx new file mode 100644 index 0000000..e348ecf --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.macosx @@ -0,0 +1,197 @@ +# makefile for libpng, MACOS X +# Copyright (C) 2002 Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# Modified by Karin Kosina 20011010: +# build shared library (*.dylib) +# For conditions of distribution and use, see copyright notice in png.h + +# where make install puts libpng.a and png.h +prefix=/usr/local + +# Where the zlib library and include files are located +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +ZLIBLIB=../zlib +ZLIBINC=../zlib + +CC=cc + +PNGMAJ = 0 +PNGMIN = 1.2.5 +PNGVER = $(PNGMAJ).$(PNGMIN) + +CFLAGS=-fno-common -I$(ZLIBINC) -O # -g -DPNG_DEBUG=5 +LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -current_version $(PNGVER) + +LIBNAME=libpng12 +SHAREDLIB_POSTFIX=dylib +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +#RANLIB=echo +RANLIB=ranlib + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +all: libpng.a pngtest shared libpng.pc libpng-config + +shared: $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! | \ + sed -e s/-lm// > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo libs=\"-lpng12 -lz\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +libpng.a: $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX): $(OBJS) + cc -dynamiclib -flat_namespace -undefined suppress -o $@ $(OBJS) + +libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX): $(OBJS) + cc -dynamiclib -compatibility_version 3 -flat_namespace \ + -undefined suppress -o $@ $(OBJS) + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \ + libpng.pc libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f \ + $(DL)/$(LIBNAME).$(PNGVER)*.$(SHAREDLIB_POSTFIX) + -@/bin/rm -f $(DL)/$(LIBNAME).$(SHAREDLIB_POSTFIX) + -@/bin/rm -f libpng.$(SHARED_POSTFIX) + -@/bin/rm -f libpng.3.$(SHARED_POSTFIX) + -@/bin/rm -f libpng.3.$(PNGMIN)*.$(SHARED_POSTFIX) + cp libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) $(DL) + cp $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) $(DL) + chmod 755 $(DL)/$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) + chmod 755 $(DL)/libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) + (cd $(DL); \ + ln -f -s libpng.3.$(PNGMIN).$(SHARED_POSTFIX) \ + libpng.3.$(SHARED_POSTFIX); \ + ln -f -s libpng.3.$(SHARED_POSTFIX) libpng.$(SHARED_POSTFIX); \ + ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) \ + libpng.$(SHARED_POSTFIX); \ + ln -f -s libpng.3.$(PNGMIN).$(SHARED_POSTFIX) \ + libpng.3.$(SHARED_POSTFIX); \ + ln -f -s $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \ + $(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX); \ + ln -f -s $(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX) \ + $(LIBNAME).$(SHAREDLIB_POSTFIX)) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi + -@/bin/rm -f $(DM)/man3/libpng.3 + -@/bin/rm -f $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then mkdir $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. + +test-installed: + $(CC) $(CFLAGS) \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + -L$(ZLIBLIB) \ + -o pngtesti `$(BINPATH)/libpng12-config --ldflags` + ./pngtesti pngtest.png + +clean: + rm -f *.o libpng.a pngtest pngout.png libpng-config \ + $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \ + $(LIBNAME).$(SHAREDLIB_POSTFIX) \ + libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) \ + libpng.pc + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h +pngerror.o: png.h pngconf.h +pngrio.o: png.h pngconf.h +pngwio.o: png.h pngconf.h +pngmem.o: png.h pngconf.h +pngset.o: png.h pngconf.h +pngget.o: png.h pngconf.h +pngread.o: png.h pngconf.h +pngrtran.o: png.h pngconf.h +pngrutil.o: png.h pngconf.h +pngtest.o: png.h pngconf.h +pngtrans.o: png.h pngconf.h +pngwrite.o: png.h pngconf.h +pngwtran.o: png.h pngconf.h +pngwutil.o: png.h pngconf.h +pngpread.o: png.h pngconf.h + diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.mips b/gtkmm-osx/libpng-1.2.5/scripts/makefile.mips new file mode 100644 index 0000000..f1a557d --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.mips @@ -0,0 +1,83 @@ +# makefile for libpng +# Copyright (C) Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# For conditions of distribution and use, see copyright notice in png.h + +# where make install puts libpng.a and png.h +prefix=/usr/local +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +CC=cc +CFLAGS=-I../zlib -O -systype sysv -DSYSV -w -Dmips +#CFLAGS=-O +LDFLAGS=-L. -L../zlib/ -lpng -lz -lm + +#RANLIB=ranlib +RANLIB=echo + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +all: libpng.a pngtest + +libpng.a: $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install: libpng.a + -@mkdir $(DESTDIR)$(INCPATH) + -@mkdir $(DESTDIR)$(INCPATH)/libpng + -@mkdir $(DESTDIR)$(LIBPATH) + -@rm -f $(DESTDIR)$(INCPATH)/png.h + -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h + cp png.h $(DESTDIR)$(INCPATH)/libpng + cp pngconf.h $(DESTDIR)$(INCPATH)/libpng + chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h + chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h + (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .) + cp libpng.a $(DESTDIR)$(LIBPATH) + chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a + +clean: + rm -f *.o libpng.a pngtest pngout.png + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h +pngerror.o: png.h pngconf.h +pngrio.o: png.h pngconf.h +pngwio.o: png.h pngconf.h +pngmem.o: png.h pngconf.h +pngset.o: png.h pngconf.h +pngget.o: png.h pngconf.h +pngread.o: png.h pngconf.h +pngpread.o: png.h pngconf.h +pngrtran.o: png.h pngconf.h +pngrutil.o: png.h pngconf.h +pngtest.o: png.h pngconf.h +pngtrans.o: png.h pngconf.h +pngwrite.o: png.h pngconf.h +pngwtran.o: png.h pngconf.h +pngwutil.o: png.h pngconf.h diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.msc b/gtkmm-osx/libpng-1.2.5/scripts/makefile.msc new file mode 100644 index 0000000..1cbfd91 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.msc @@ -0,0 +1,86 @@ +# makefile for libpng +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# For conditions of distribution and use, see copyright notice in png.h +# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib + +# -------- Microsoft C 5.1 and later, does not use assembler code -------- +MODEL=L +CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL) -I..\zlib +#-Ox generates bad code with MSC 5.1 +CC=cl +LD=link +LDFLAGS=/e/st:0x1500/noe +O=.obj + +#uncomment next to put error messages in a file +ERRFILE= >> pngerrs + +# variables +OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) +OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) +OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) + +all: libpng.lib + +png$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngset$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngget$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngread$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngpread$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngrtran$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngrutil$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngerror$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngmem$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngrio$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwio$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngtest$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngtrans$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwrite$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwtran$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwutil$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) + del libpng.lib + lib libpng $(OBJS1); + lib libpng $(OBJS2); + lib libpng $(OBJS3); + +pngtest.exe: pngtest.obj libpng.lib + $(LD) $(LDFLAGS) pngtest.obj,,,libpng.lib ..\zlib\zlib.lib ; + +test: pngtest.exe + pngtest + +# End of makefile for libpng + diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.ne12bsd b/gtkmm-osx/libpng-1.2.5/scripts/makefile.ne12bsd new file mode 100644 index 0000000..4cccc6d --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.ne12bsd @@ -0,0 +1,44 @@ +# makefile for libpng for NetBSD for the standard +# make obj && make depend && make && make test +# make includes && make install +# Copyright (C) 2002 Patrick R.L. Welche +# For conditions of distribution and use, see copyright notice in png.h + +# You should also run makefile.netbsd + +LOCALBASE?=/usr/local +LIBDIR= ${LOCALBASE}/lib +MANDIR= ${LOCALBASE}/man +INCSDIR=${LOCALBASE}/include/libpng12 + +LIB= png12 +SHLIB_MAJOR= 0 +SHLIB_MINOR= 1.2.5 +SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ + pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ + pngwtran.c pngmem.c pngerror.c pngpread.c +INCS= png.h pngconf.h +MAN= libpng.3 libpngpf.3 png.5 + +CPPFLAGS+=-I${.CURDIR} -DPNG_USE_PNGGCCRD + +# something like this for mmx assembler, but it core dumps for me at the moment +# .if ${MACHINE_ARCH} == "i386" +# CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK +# MKLINT= no +# .else + CPPFLAGS+=-DPNG_NO_ASSEMBLER_CODE +# .endif + +CLEANFILES+=pngtest.o pngtest + +pngtest.o: pngtest.c + ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} + +pngtest: pngtest.o libpng.a + ${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm + +test: pngtest + cd ${.CURDIR} && ${.OBJDIR}/pngtest + +.include diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.netbsd b/gtkmm-osx/libpng-1.2.5/scripts/makefile.netbsd new file mode 100644 index 0000000..6b53c4e --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.netbsd @@ -0,0 +1,44 @@ +# makefile for libpng for NetBSD for the standard +# make obj && make depend && make && make test +# make includes && make install +# Copyright (C) 2002 Patrick R.L. Welche +# For conditions of distribution and use, see copyright notice in png.h + +# You should also run makefile.ne0bsd + +LOCALBASE?=/usr/local +LIBDIR= ${LOCALBASE}/lib +MANDIR= ${LOCALBASE}/man +INCSDIR=${LOCALBASE}/include/libpng + +LIB= png +SHLIB_MAJOR= 3 +SHLIB_MINOR= 1.2.5 +SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ + pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ + pngwtran.c pngmem.c pngerror.c pngpread.c +INCS= png.h pngconf.h +MAN= libpng.3 libpngpf.3 png.5 + +CPPFLAGS+=-I${.CURDIR} -DPNG_USE_PNGGCCRD + +# something like this for mmx assembler, but it core dumps for me at the moment +# .if ${MACHINE_ARCH} == "i386" +# CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK +# MKLINT= no +# .else + CPPFLAGS+=-DPNG_NO_ASSEMBLER_CODE +# .endif + +CLEANFILES+=pngtest.o pngtest + +pngtest.o: pngtest.c + ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} + +pngtest: pngtest.o libpng.a + ${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm + +test: pngtest + cd ${.CURDIR} && ${.OBJDIR}/pngtest + +.include diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.openbsd b/gtkmm-osx/libpng-1.2.5/scripts/makefile.openbsd new file mode 100644 index 0000000..af94f40 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.openbsd @@ -0,0 +1,72 @@ +# makefile for libpng +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# For conditions of distribution and use, see copyright notice in png.h + +PREFIX?= /usr/local +LIBDIR= ${PREFIX}/lib +MANDIR= ${PREFIX}/man/cat + +SHLIB_MAJOR= 0 +SHLIB_MINOR= 1.2.5 + +LIB= png +SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \ + pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c \ + pngwio.c pngwrite.c pngwtran.c pngwutil.c + +HDRS= png.h pngconf.h + +CFLAGS+= -Wall +CPPFLAGS+= -I${.CURDIR} -DPNG_NO_ASSEMBLER_CODE -DPNG_USE_PNGGCCRD + +NOPROFILE= Yes + +CLEANFILES+= pngtest.o pngtest + +MAN= libpng.3 libpngpf.3 png.5 +DOCS= ANNOUNCE CHANGES LICENSE README libpng.txt + +pngtest.o: pngtest.c + ${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} + +pngtest: pngtest.o + ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm + +test: pngtest + cd ${.OBJDIR} && env \ + LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest + +beforeinstall: + if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \ + ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include/libpng; \ + fi + if [ ! -d ${DESTDIR}${LIBDIR} ]; then \ + ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \ + fi + if [ ! -d ${DESTDIR}${LIBDIR}/debug ]; then \ + ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}/debug; \ + fi + if [ ! -d ${DESTDIR}${MANDIR}3 ]; then \ + ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}3; \ + fi + if [ ! -d ${DESTDIR}${MANDIR}5 ]; then \ + ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}5; \ + fi + if [ ! -d ${DESTDIR}${PREFIX}/share/doc/png ]; then \ + ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/share/doc/png; \ + fi + +afterinstall: + @rm -f ${DESTDIR}${LIBDIR}/libpng_pic.a + @rm -f ${DESTDIR}${LIBDIR}/debug/libpng.a + @rm -f ${DESTDIR}${PREFIX}/include/png.h + @rm -f ${DESTDIR}${PREFIX}/include/pngconf.h + @rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true + ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ + -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include/libpng + ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ + -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include + ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ + -m ${NONBINMODE} ${DOCS} ${DESTDIR}${PREFIX}/share/doc/png + +.include diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.os2 b/gtkmm-osx/libpng-1.2.5/scripts/makefile.os2 new file mode 100644 index 0000000..588067d --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.os2 @@ -0,0 +1,69 @@ +# makefile for libpng on OS/2 with gcc +# For conditions of distribution and use, see copyright notice in png.h + +# Related files: pngos2.def + +CC=gcc -Zomf -s + +# Where the zlib library and include files are located +ZLIBLIB=../zlib +ZLIBINC=../zlib + +WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ + -Wmissing-declarations -Wtraditional -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes #-Wconversion +CFLAGS=-I$(ZLIBINC) -Wall -O6 -funroll-loops -malign-loops=2 \ + -malign-functions=2 #$(WARNMORE) -g -DPNG_DEBUG=5 +LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lzdll -Zcrtdll +AR=emxomfar + +PNGLIB=png.lib +IMPLIB=emximp +SHAREDLIB=png.dll +SHAREDLIBIMP=pngdll.lib + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +.SUFFIXES: .c .o + +all: $(PNGLIB) $(SHAREDLIB) $(SHAREDLIBIMP) + +$(PNGLIB): $(OBJS) + $(AR) rc $@ $(OBJS) + +$(SHAREDLIB): $(OBJS) pngos2.def + $(CC) $(LDFLAGS) -Zdll -o $@ $^ + +$(SHAREDLIBIMP): pngos2.def + $(IMPLIB) -o $@ $^ + +pngtest.exe: pngtest.o png.dll pngdll.lib + $(CC) -o $@ $(CFLAGS) $< $(LDFLAGS) + +test: pngtest.exe + ./pngtest.exe + +clean: + rm -f *.o $(PNGLIB) png.dll pngdll.lib pngtest.exe pngout.png + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h +pngerror.o pngerror.pic.o: png.h pngconf.h +pngrio.o pngrio.pic.o: png.h pngconf.h +pngwio.o pngwio.pic.o: png.h pngconf.h +pngmem.o pngmem.pic.o: png.h pngconf.h +pngset.o pngset.pic.o: png.h pngconf.h +pngget.o pngget.pic.o: png.h pngconf.h +pngread.o pngread.pic.o: png.h pngconf.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h +pngpread.o pngpread.pic.o: png.h pngconf.h + +pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.sco b/gtkmm-osx/libpng-1.2.5/scripts/makefile.sco new file mode 100644 index 0000000..74068a2 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.sco @@ -0,0 +1,201 @@ +# makefile for SCO OSr5 ELF and Unixware 7 with Native cc +# Contributed by Mike Hopkirk (hops@sco.com) modified from Makefile.lnx +# force ELF build dynamic linking, SONAME setting in lib and RPATH in app +# Copyright (C) 2002 Glenn Randers-Pehrson +# Copyright (C) 1998 Greg Roelofs +# Copyright (C) 1996, 1997 Andreas Dilger +# For conditions of distribution and use, see copyright notice in png.h + +CC=cc + +# where make install puts libpng.a, libpng.so*, and png.h +prefix=/usr/local + +# Where the zlib library and include files are located +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +ZLIBLIB=../zlib +ZLIBINC=../zlib + +CFLAGS= -dy -belf -I$(ZLIBINC) -O3 +LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm + +#RANLIB=ranlib +RANLIB=echo + +PNGMAJ = 0 +PNGMIN = 1.2.5 +PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng12 + +INCPATH=$(prefix)/include/libpng +LIBPATH=$(prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c + +all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config + +libpng.a: $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo ccopts=\"-belf\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo libs=\"-lpng12 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) + ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so + +$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) + ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) + +$(LIBNAME).so.$(PNGVER): $(OBJSDLL) + $(CC) -G -Wl,-h,$(LIBNAME).so.$(PNGMAJ) -o $(LIBNAME).so.$(PNGVER) \ + $(OBJSDLL) + +libpng.so.3.$(PNGMIN): $(OBJSDLL) + $(CC) -G -Wl,-h,libpng.so.3 -o libpng.so.3.$(PNGMIN) \ + $(OBJSDLL) + +pngtest: pngtest.o $(LIBNAME).so + LD_RUN_PATH=.:$(ZLIBLIB) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + -@/bin/rm -f $(DI)/png.h + -@/bin/rm -f $(DI)/pngconf.h + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ + libpng.so.3.$(PNGMIN) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* + cp $(LIBNAME).so.$(PNGVER) $(DL) + cp libpng.so.3.$(PNGMIN) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + chmod 755 $(DL)/libpng.so.3.$(PNGMIN) + (cd $(DL); \ + ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ + ln -f -s libpng.so.3 libpng.so; \ + ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ + ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi + -@/bin/rm -f $(DM)/man3/libpng.3 + -@/bin/rm -f $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then mkdir $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. + +test-installed: + $(CC) $(CFLAGS) \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + -L$(ZLIBLIB) \ + -o pngtesti `$(BINPATH)/libpng12-config --ldflags` + ./pngtesti pngtest.png + +clean: + /bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \ + $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \ + libpng.so.3.$(PNGMIN) \ + libpng.pc + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h +pngerror.o pngerror.pic.o: png.h pngconf.h +pngrio.o pngrio.pic.o: png.h pngconf.h +pngwio.o pngwio.pic.o: png.h pngconf.h +pngmem.o pngmem.pic.o: png.h pngconf.h +pngset.o pngset.pic.o: png.h pngconf.h +pngget.o pngget.pic.o: png.h pngconf.h +pngread.o pngread.pic.o: png.h pngconf.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h +pngpread.o pngpread.pic.o: png.h pngconf.h + +pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.sggcc b/gtkmm-osx/libpng-1.2.5/scripts/makefile.sggcc new file mode 100644 index 0000000..082de1b --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.sggcc @@ -0,0 +1,211 @@ +# makefile for libpng.a and libpng12.so, SGI IRIX with 'cc' +# Copyright (C) 2001-2002 Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# For conditions of distribution and use, see copyright notice in png.h + +# Where make install puts libpng.a, libpng12.so, and libpng12/png.h +# Prefix must be a full pathname. + +prefix=/usr/local + +# Where the zlib library and include files are located +#ZLIBLIB=/usr/local/lib32 +#ZLIBINC=/usr/local/include +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +ZLIBLIB=../zlib +ZLIBINC=../zlib + +LIBNAME=libpng12 +PNGMAJ = 0 +PNGMIN = 1.2.5 +PNGVER = $(PNGMAJ).$(PNGMIN) +CC=gcc + +# ABI can be blank to use default for your system, -32, -o32, -n32, or -64 +# See "man abi". zlib must be built with the same ABI. +ABI= + +WARNMORE= # -g -DPNG_DEBUG=5 +CFLAGS=$(ABI) -I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32 +LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm +LDSHARED=cc $(ABI) -shared -soname $(LIBNAME).so.$(PNGMAJ) \ + -set_version sgi$(PNGMAJ).0 +LDLEGACY=cc $(ABI) -shared -soname libpng.so.3 \ + -set_version sgi$3.0 +# See "man dso" for info about shared objects + +RANLIB=echo +#RANLIB=ranlib + +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib +#LIBPATH=$(prefix)/lib32 +MANPATH=$(prefix)/man +BINPATH=$(prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = pnggccrd.o png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +all: libpng.a pngtest shared libpng.pc libpng-config + +libpng.a: $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +shared: $(LIBNAME).so.$(PNGVER) + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo ccopts=\"$(ABI)\"; \ + echo ldopts=\"$(ABI)\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo libdir=\"$(LIBPATH)\"; \ + echo libs=\"-lpng12 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) + ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so + +$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) + ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) + +$(LIBNAME).so.$(PNGVER): $(OBJS) + $(LDSHARED) -o $@ $(OBJS) + rm -f $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ) + +libpng.so.3.$(PNGMIN): $(OBJS) + $(LDLEGACY) -o $@ $(OBJS) + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + echo + echo Testing local static library. + ./pngtest + +install-headers: png.h pngconf.h + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -sf $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ + libpng.so.3.$(PNGMIN) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* + cp $(LIBNAME).so.$(PNGVER) $(DL) + cp libpng.so.3.$(PNGMIN) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + chmod 755 $(DL)/libpng.so.3.$(PNGMIN) + (cd $(DL); \ + ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ + ln -sf libpng.so.3 libpng.so; \ + ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ + ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi + -@/bin/rm -f $(DM)/man3/libpng.3 + -@/bin/rm -f $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then mkdir $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) -I$(ZLIBINC) \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + -L$(ZLIBLIB) -rpath $(ZLIBLIB):`$(BINPATH)/libpng12-config --libdir` \ + -o pngtesti `$(BINPATH)/libpng12-config --ldflags` + ./pngtesti pngtest.png + +clean: + rm -f *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \ + $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ + libpng.so.3.$(PNGMIN) \ + so_locations + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h +pngerror.o: png.h pngconf.h +pngrio.o: png.h pngconf.h +pngwio.o: png.h pngconf.h +pngmem.o: png.h pngconf.h +pngset.o: png.h pngconf.h +pngget.o: png.h pngconf.h +pngread.o: png.h pngconf.h +pngrtran.o: png.h pngconf.h +pngrutil.o: png.h pngconf.h +pngtest.o: png.h pngconf.h +pngtrans.o: png.h pngconf.h +pngwrite.o: png.h pngconf.h +pngwtran.o: png.h pngconf.h +pngwutil.o: png.h pngconf.h +pngpread.o: png.h pngconf.h +pnggccrd.o: png.h pngconf.h + diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.sgi b/gtkmm-osx/libpng-1.2.5/scripts/makefile.sgi new file mode 100644 index 0000000..219b8ad --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.sgi @@ -0,0 +1,217 @@ +# makefile for libpng.a and libpng12.so, SGI IRIX with 'cc' +# Copyright (C) 2001-2002 Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# For conditions of distribution and use, see copyright notice in png.h + +LIBNAME=libpng12 +PNGMAJ = 0 +PNGMIN = 1.2.5 +PNGVER = $(PNGMAJ).$(PNGMIN) + +# Where make install puts libpng.a, libpng12.so, and libpng12/png.h +# Prefix must be a full pathname. + +prefix=/usr/local + +# Where the zlib library and include files are located +#ZLIBLIB=/usr/local/lib32 +#ZLIBINC=/usr/local/include +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +ZLIBLIB=../zlib +ZLIBINC=../zlib + +CC=cc + +# ABI can be blank to use default for your system, -32, -o32, -n32, or -64 +# See "man abi". zlib must be built with the same ABI. +ABI= + +WARNMORE=-fullwarn +# Note: -KPIC is the default anyhow +#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC -DPNG_USE_PNGGCCRD # -g -DPNG_DEBUG=5 +CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -DPNG_USE_PNGGCCRD \ + -DPNG_NO_ASSEMBLER_CODE +LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng12 -lz -lm +LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm +LDSHARED=cc $(ABI) -shared -soname $(LIBNAME).so.$(PNGMAJ) \ + -set_version sgi$(PNGMAJ).0 +LDLEGACY=cc $(ABI) -shared -soname libpng.so.3 \ + -set_version sgi$3.0 +# See "man dso" for info about shared objects + +RANLIB=echo +#RANLIB=ranlib + +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib +#LIBPATH=$(prefix)/lib32 +MANPATH=$(prefix)/man +BINPATH=$(prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = pnggccrd.o png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +all: libpng.a pngtest shared libpng.pc libpng-config + +libpng.a: $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +shared: $(LIBNAME).so.$(PNGVER) + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo cppflags=\"-DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE\"; \ + echo ccopts=\"$(ABI)\"; \ + echo ldopts=\"$(ABI)\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo libdir=\"$(LIBPATH)\"; \ + echo libs=\"-lpng12 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) + ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so + +$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) + ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) + +$(LIBNAME).so.$(PNGVER): $(OBJS) + $(LDSHARED) -o $@ $(OBJS) + rm -f $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ) + +libpng.so.3.$(PNGMIN): $(OBJS) + $(LDLEGACY) -o $@ $(OBJS) + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + echo + echo Testing local static library. + ./pngtest + +install-headers: png.h pngconf.h + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -sf $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ + libpng.so.3.$(PNGMIN) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* + cp $(LIBNAME).so.$(PNGVER) $(DL) + cp libpng.so.3.$(PNGMIN) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + chmod 755 $(DL)/libpng.so.3.$(PNGMIN) + (cd $(DL); \ + ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ + ln -sf libpng.so.3 libpng.so; \ + ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ + ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi + -@/bin/rm -f $(DM)/man3/libpng.3 + -@/bin/rm -f $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then mkdir $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) -I$(ZLIBINC) \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + -L$(ZLIBLIB) -rpath $(ZLIBLIB):`$(BINPATH)/libpng12-config --libdir` \ + -o pngtesti `$(BINPATH)/libpng12-config --ldflags` + ./pngtesti pngtest.png + +clean: + rm -f *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \ + $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ + libpng.so.3.$(PNGMIN) \ + so_locations + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h +pngerror.o: png.h pngconf.h +pngrio.o: png.h pngconf.h +pngwio.o: png.h pngconf.h +pngmem.o: png.h pngconf.h +pngset.o: png.h pngconf.h +pngget.o: png.h pngconf.h +pngread.o: png.h pngconf.h +pngrtran.o: png.h pngconf.h +pngrutil.o: png.h pngconf.h +pngtest.o: png.h pngconf.h +pngtrans.o: png.h pngconf.h +pngwrite.o: png.h pngconf.h +pngwtran.o: png.h pngconf.h +pngwutil.o: png.h pngconf.h +pngpread.o: png.h pngconf.h +pnggccrd.o: png.h pngconf.h + diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.so9 b/gtkmm-osx/libpng-1.2.5/scripts/makefile.so9 new file mode 100644 index 0000000..f1ca807 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.so9 @@ -0,0 +1,223 @@ +# makefile for libpng on Solaris 9 (beta) with Forte cc +# Updated by Chad Schrock for Solaris 9 +# Contributed by William L. Sebok, based on makefile.linux +# Copyright (C) 2002 Glenn Randers-Pehrson +# Copyright (C) 1998-2001 Greg Roelofs +# Copyright (C) 1996-1997 Andreas Dilger +# For conditions of distribution and use, see copyright notice in png.h + +# gcc 2.95 doesn't work. +CC=cc + +# Where make install puts libpng.a, libpng.so*, and png.h +prefix=/usr/local + +# Where the zlib library and include files are located +# Changing these to ../zlib poses a security risk. If you want +# to have zlib in an adjacent directory, specify the full path instead of "..". +#ZLIBLIB=../zlib +#ZLIBINC=../zlib +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +#Use the preinstalled zlib that comes with Solaris 9: +ZLIBLIB=/usr/lib +ZLIBINC=/usr/include + +#WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ + -Wmissing-declarations -Wtraditional -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes #-Wconversion +#CFLAGS=-I$(ZLIBINC) -Wall -O3 $(WARNMORE) -g -DPNG_DEBUG=5 +CFLAGS=-I$(ZLIBINC) -O3 +LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm + +#RANLIB=ranlib +RANLIB=echo + +PNGMAJ = 0 +PNGMIN = 1.2.5 +PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng12 + +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c + +all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config + +libpng.a: $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo R_opts=\"-R$(LIBPATH)\"; \ + echo libs=\"-lpng12 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) + ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so + +$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) + ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) + +$(LIBNAME).so.$(PNGVER): $(OBJSDLL) + @case "`type ld`" in *ucb*) \ + echo; \ + echo '## WARNING:'; \ + echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ + echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \ + echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \ + echo '## The environment variable LD_LIBRARY_PATH should not be set'; \ + echo '## at all. If it is, things are likely to break because of'; \ + echo '## the libucb dependency that is created.'; \ + echo; \ + ;; \ + esac + $(LD) -G -h $(LIBNAME).so.$(PNGMAJ) \ + -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) + +libpng.so.3.$(PNGMIN): $(OBJS) + $(LD) -G -h libpng.so.3 \ + -o libpng.so.3.$(PNGMIN) $(OBJSDLL) + +pngtest: pngtest.o $(LIBNAME).so + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ + libpng.so.3.$(PNGMIN) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* + cp $(LIBNAME).so.$(PNGVER) $(DL) + cp libpng.so.3.$(PNGMIN) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + chmod 755 $(DL)/libpng.so.3.$(PNGMIN) + (cd $(DL); \ + ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ + ln -f -s libpng.so.3 libpng.so; \ + ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ + ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi + -@/bin/rm -f $(DM)/man3/libpng.3 + -@/bin/rm -f $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then mkdir $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) -I$(ZLIBINC) \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + -o pngtesti `$(BINPATH)/libpng12-config --ldflags` \ + -L$(ZLIBLIB) -R$(ZLIBLIB) + ./pngtesti pngtest.png + +clean: + /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ + libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ + libpng.so.3.$(PNGMIN) \ + libpng.pc + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h +pngerror.o pngerror.pic.o: png.h pngconf.h +pngrio.o pngrio.pic.o: png.h pngconf.h +pngwio.o pngwio.pic.o: png.h pngconf.h +pngmem.o pngmem.pic.o: png.h pngconf.h +pngset.o pngset.pic.o: png.h pngconf.h +pngget.o pngget.pic.o: png.h pngconf.h +pngread.o pngread.pic.o: png.h pngconf.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h +pngpread.o pngpread.pic.o: png.h pngconf.h + +pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.solaris b/gtkmm-osx/libpng-1.2.5/scripts/makefile.solaris new file mode 100644 index 0000000..9c5a844 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.solaris @@ -0,0 +1,220 @@ +# makefile for libpng on Solaris 2.x with gcc +# Copyright (C) 2002 Glenn Randers-Pehrson +# Contributed by William L. Sebok, based on makefile.linux +# Copyright (C) 1998 Greg Roelofs +# Copyright (C) 1996, 1997 Andreas Dilger +# For conditions of distribution and use, see copyright notice in png.h + +CC=gcc + +# Where make install puts libpng.a, libpng12.so*, and png.h +prefix=/usr/local + +# Where the zlib library and include files are located +# Changing these to ../zlib poses a security risk. If you want +# to have zlib in an adjacent directory, specify the full path instead of "..". +#ZLIBLIB=../zlib +#ZLIBINC=../zlib + +ZLIBLIB=/usr/local/lib +ZLIBINC=/usr/local/include + +WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ + -Wmissing-declarations -Wtraditional -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes #-Wconversion +CFLAGS=-I$(ZLIBINC) -Wall -O3 \ + # $(WARNMORE) -g -DPNG_DEBUG=5 +LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm + +#RANLIB=ranlib +RANLIB=echo + +PNGMAJ = 0 +PNGMIN = 1.2.5 +PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng12 + +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib +MANPATH=$(prefix)/man +BINPATH=$(prefix)/bin + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +DB=$(DESTDIR)$(BINPATH) +DI=$(DESTDIR)$(INCPATH) +DL=$(DESTDIR)$(LIBPATH) +DM=$(DESTDIR)$(MANPATH) + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +OBJSDLL = $(OBJS:.o=.pic.o) + +.SUFFIXES: .c .o .pic.o + +.c.pic.o: + $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c + +all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config + +libpng.a: $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +libpng.pc: + cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc + +libpng-config: + ( cat scripts/libpng-config-head.in; \ + echo prefix=\"$(prefix)\"; \ + echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ + echo cppflags=\"-DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE\"; \ + echo L_opts=\"-L$(LIBPATH)\"; \ + echo R_opts=\"-R$(LIBPATH)\"; \ + echo libs=\"-lpng12 -lz -lm\"; \ + cat scripts/libpng-config-body.in ) > libpng-config + chmod +x libpng-config + +$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) + ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so + +$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) + ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) + +$(LIBNAME).so.$(PNGVER): $(OBJSDLL) + @case "`type ld`" in *ucb*) \ + echo; \ + echo '## WARNING:'; \ + echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ + echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \ + echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \ + echo '## The environment variable LD_LIBRARY_PATH should not be set'; \ + echo '## at all. If it is, things are likely to break because of'; \ + echo '## the libucb dependency that is created.'; \ + echo; \ + ;; \ + esac + $(LD) -G -h $(LIBNAME).so.$(PNGMAJ) \ + -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) + +libpng.so.3.$(PNGMIN): $(OBJS) + $(LD) -G -h libpng.so.3 \ + -o libpng.so.3.$(PNGMIN) $(OBJSDLL) + +pngtest: pngtest.o $(LIBNAME).so + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install-headers: png.h pngconf.h + -@if [ ! -d $(DI) ]; then mkdir $(DI); fi + -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi + cp png.h pngconf.h $(DI)/$(LIBNAME) + chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h + -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h + -@/bin/rm -f $(DI)/libpng + (cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .) + +install-static: install-headers libpng.a + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + cp libpng.a $(DL)/$(LIBNAME).a + chmod 644 $(DL)/$(LIBNAME).a + -@/bin/rm -f $(DL)/libpng.a + (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) + +install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ + libpng.so.3.$(PNGMIN) + -@if [ ! -d $(DL) ]; then mkdir $(DL); fi + -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so + -@/bin/rm -f $(DL)/libpng.so + -@/bin/rm -f $(DL)/libpng.so.3 + -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* + cp $(LIBNAME).so.$(PNGVER) $(DL) + cp libpng.so.3.$(PNGMIN) $(DL) + chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) + chmod 755 $(DL)/libpng.so.3.$(PNGMIN) + (cd $(DL); \ + ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ + ln -f -s libpng.so.3 libpng.so; \ + ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so; \ + ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)) + -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi + -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc + -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc + chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc + (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) + +install-man: libpng.3 libpngpf.3 png.5 + -@if [ ! -d $(DM) ]; then mkdir $(DM); fi + -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi + -@/bin/rm -f $(DM)/man3/libpng.3 + -@/bin/rm -f $(DM)/man3/libpngpf.3 + cp libpng.3 $(DM)/man3 + cp libpngpf.3 $(DM)/man3 + -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi + -@/bin/rm -f $(DM)/man5/png.5 + cp png.5 $(DM)/man5 + +install-config: libpng-config + -@if [ ! -d $(DB) ]; then mkdir $(DB); fi + -@/bin/rm -f $(DB)/libpng-config + -@/bin/rm -f $(DB)/$(LIBNAME)-config + cp libpng-config $(DB)/$(LIBNAME)-config + chmod 755 $(DB)/$(LIBNAME)-config + (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) + +install: install-static install-shared install-man install-config + +# If you installed in $(DESTDIR), test-installed won't work until you +# move the library to its final location. + +test-installed: + echo + echo Testing installed dynamic shared library. + $(CC) -I$(ZLIBINC) \ + `$(BINPATH)/libpng12-config --cflags` pngtest.c \ + -o pngtesti `$(BINPATH)/libpng12-config --ldflags` \ + -L$(ZLIBLIB) -R$(ZLIBLIB) + ./pngtesti pngtest.png + +clean: + /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ + libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ + libpng.so.3.$(PNGMIN) \ + libpng.pc + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o png.pic.o: png.h pngconf.h +pngerror.o pngerror.pic.o: png.h pngconf.h +pngrio.o pngrio.pic.o: png.h pngconf.h +pngwio.o pngwio.pic.o: png.h pngconf.h +pngmem.o pngmem.pic.o: png.h pngconf.h +pngset.o pngset.pic.o: png.h pngconf.h +pngget.o pngget.pic.o: png.h pngconf.h +pngread.o pngread.pic.o: png.h pngconf.h +pngrtran.o pngrtran.pic.o: png.h pngconf.h +pngrutil.o pngrutil.pic.o: png.h pngconf.h +pngtrans.o pngtrans.pic.o: png.h pngconf.h +pngwrite.o pngwrite.pic.o: png.h pngconf.h +pngwtran.o pngwtran.pic.o: png.h pngconf.h +pngwutil.o pngwutil.pic.o: png.h pngconf.h +pngpread.o pngpread.pic.o: png.h pngconf.h + +pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.std b/gtkmm-osx/libpng-1.2.5/scripts/makefile.std new file mode 100644 index 0000000..5d1f529 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.std @@ -0,0 +1,89 @@ +# makefile for libpng +# Copyright (C) 2002 Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# For conditions of distribution and use, see copyright notice in png.h + +# where make install puts libpng.a and png.h +prefix=/usr/local +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +# Where the zlib library and include files are located +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +ZLIBLIB=../zlib +ZLIBINC=../zlib + +CC=cc +CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=5 +LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm + +#RANLIB=echo +RANLIB=ranlib + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +all: libpng.a pngtest + +libpng.a: $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install: libpng.a + -@mkdir $(DESTDIR)$(INCPATH) + -@mkdir $(DESTDIR)$(INCPATH)/libpng + -@mkdir $(DESTDIR)$(LIBPATH) + -@rm -f $(DESTDIR)$(INCPATH)/png.h + -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h + cp png.h $(DESTDIR)$(INCPATH)/libpng + cp pngconf.h $(DESTDIR)$(INCPATH)/libpng + chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h + chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h + (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .) + cp libpng.a $(DESTDIR)$(LIBPATH) + chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a + +clean: + rm -f *.o libpng.a pngtest pngout.png + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h +pngerror.o: png.h pngconf.h +pngrio.o: png.h pngconf.h +pngwio.o: png.h pngconf.h +pngmem.o: png.h pngconf.h +pngset.o: png.h pngconf.h +pngget.o: png.h pngconf.h +pngread.o: png.h pngconf.h +pngrtran.o: png.h pngconf.h +pngrutil.o: png.h pngconf.h +pngtest.o: png.h pngconf.h +pngtrans.o: png.h pngconf.h +pngwrite.o: png.h pngconf.h +pngwtran.o: png.h pngconf.h +pngwutil.o: png.h pngconf.h +pngpread.o: png.h pngconf.h + diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.sunos b/gtkmm-osx/libpng-1.2.5/scripts/makefile.sunos new file mode 100644 index 0000000..70a6e88 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.sunos @@ -0,0 +1,93 @@ +# makefile for libpng +# Copyright (C) 2002 Glenn Randers-Pehrson +# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. +# For conditions of distribution and use, see copyright notice in png.h + +# where make install puts libpng.a and png.h +prefix=/usr/local +INCPATH=$(prefix)/include +LIBPATH=$(prefix)/lib + +# override DESTDIR= on the make install command line to easily support +# installing into a temporary location. Example: +# +# make install DESTDIR=/tmp/build/libpng +# +# If you're going to install into a temporary location +# via DESTDIR, $(DESTDIR)$(prefix) must already exist before +# you execute make install. +DESTDIR= + +# Where the zlib library and include files are located +#ZLIBLIB=/usr/local/lib +#ZLIBINC=/usr/local/include +ZLIBLIB=../zlib +ZLIBINC=../zlib + + +WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow -Wconversion \ + -Wmissing-declarations -Wtraditional -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes +CC=gcc +CFLAGS=-I$(ZLIBINC) -O # $(WARNMORE) -DPNG_DEBUG=5 +LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm + +RANLIB=ranlib +#RANLIB=echo + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ + pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ + pngwtran.o pngmem.o pngerror.o pngpread.o + +all: libpng.a pngtest + +libpng.a: $(OBJS) + ar rc $@ $(OBJS) + $(RANLIB) $@ + +pngtest: pngtest.o libpng.a + $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) + +test: pngtest + ./pngtest + +install: libpng.a + -@mkdir $(DESTDIR)$(INCPATH) + -@mkdir $(DESTDIR)$(INCPATH)/libpng + -@mkdir $(DESTDIR)$(LIBPATH) + -@rm -f $(DESTDIR)$(INCPATH)/png.h + -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h + cp png.h $(DESTDIR)$(INCPATH)/libpng + cp pngconf.h $(DESTDIR)$(INCPATH)/libpng + chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h + chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h + (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .) + cp libpng.a $(DESTDIR)$(LIBPATH) + chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a + +clean: + rm -f *.o libpng.a pngtest pngout.png + +DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO +writelock: + chmod a-w *.[ch35] $(DOCS) scripts/* + +# DO NOT DELETE THIS LINE -- make depend depends on it. + +png.o: png.h pngconf.h +pngerror.o: png.h pngconf.h +pngrio.o: png.h pngconf.h +pngwio.o: png.h pngconf.h +pngmem.o: png.h pngconf.h +pngset.o: png.h pngconf.h +pngget.o: png.h pngconf.h +pngread.o: png.h pngconf.h +pngrtran.o: png.h pngconf.h +pngrutil.o: png.h pngconf.h +pngtest.o: png.h pngconf.h +pngtrans.o: png.h pngconf.h +pngwrite.o: png.h pngconf.h +pngwtran.o: png.h pngconf.h +pngwutil.o: png.h pngconf.h +pngpread.o: png.h pngconf.h + diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.tc3 b/gtkmm-osx/libpng-1.2.5/scripts/makefile.tc3 new file mode 100644 index 0000000..21435a6 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.tc3 @@ -0,0 +1,89 @@ +# Makefile for libpng +# TurboC/C++ (Note: All modules are compiled in C mode) + +# To use, do "make -fmakefile.tc3" + +# ----- Turbo C 3.00 (can be modified to work with earlier versions) ----- + +MODEL=l +CFLAGS=-O2 -Z -m$(MODEL) -I..\zlib +#CFLAGS=-D_NO_PROTO -O2 -Z -m$(MODEL) -I..\zlib # Turbo C older than 3.00 +CC=tcc +LD=tcc +LIB=tlib +LDFLAGS=-m$(MODEL) -L..\zlib +O=.obj +E=.exe + +# variables +OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) +OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) +OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) +OBJSL1 = +png$(O) +pngset$(O) +pngget$(O) +pngrutil$(O) +pngtrans$(O) +OBJSL2 = +pngwutil$(O) +pngmem$(O) +pngpread$(O) +pngread$(O) +pngerror$(O) +OBJSL3 = +pngwrite$(O) +pngrtran$(O) +pngwtran$(O) +pngrio$(O) +pngwio$(O) + +all: libpng$(MODEL).lib pngtest$(E) + +pngtest: pngtest$(E) + +test: pngtest$(E) + pngtest$(E) + +png$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c + +pngset$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c + +pngget$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c + +pngread$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c + +pngpread$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c + +pngrtran$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c + +pngrutil$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c + +pngerror$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c + +pngmem$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c + +pngrio$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c + +pngwio$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c + +pngtest$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c + +pngtrans$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c + +pngwrite$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c + +pngwtran$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c + +pngwutil$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c + +libpng$(MODEL).lib: $(OBJS1) $(OBJS2) $(OBJS3) + $(LIB) libpng$(MODEL) +$(OBJSL1) + $(LIB) libpng$(MODEL) +$(OBJSL2) + $(LIB) libpng$(MODEL) +$(OBJSL3) + +pngtest$(E): pngtest$(O) libpng$(MODEL).lib + $(LD) $(LDFLAGS) pngtest.obj libpng$(MODEL).lib zlib_$(MODEL).lib + +# End of makefile for libpng diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.vcawin32 b/gtkmm-osx/libpng-1.2.5/scripts/makefile.vcawin32 new file mode 100644 index 0000000..812dd8f --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.vcawin32 @@ -0,0 +1,94 @@ +# makefile for libpng +# Copyright (C) 1998 Tim Wegner +# For conditions of distribution and use, see copyright notice in png.h +# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib +# To use, do "nmake /f scripts\makefile.vcawin32" + +# -------- Microsoft Visual C++ 5.0 and later, uses assembler code -------- + +# Caution: the assembler code was introduced at libpng version 1.0.4 and has +# not yet been thoroughly tested. + +# If you don't want to use assembler code, use makefile.vcwin32 instead. + +CFLAGS=-DPNG_USE_PNGVCRD -Ox -GA3s -nologo -W3 -I..\zlib + +CC=cl +LD=link +LDFLAGS= +O=.obj + +#uncomment next to put error messages in a file +#ERRFILE= >> pngerrs + +# variables +OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) +OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) +OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) pngvcrd$(O) + +all: libpng.lib + +png$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngset$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngget$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngread$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngpread$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngrtran$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngrutil$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngvcrd$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngerror$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngmem$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngrio$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwio$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngtest$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngtrans$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwrite$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwtran$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwutil$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) + echo something to del > libpng.lib + del libpng.lib + lib /OUT:libpng.lib $(OBJS1) $(OBJS2) $(OBJS3) + +pngtest.exe: pngtest.obj libpng.lib + $(LD) $(LDFLAGS) pngtest.obj libpng.lib ..\zlib\zlib.lib /OUT:pngtest.exe /SUBSYSTEM:CONSOLE + +test: pngtest.exe + pngtest + +# End of makefile for libpng + diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.vcwin32 b/gtkmm-osx/libpng-1.2.5/scripts/makefile.vcwin32 new file mode 100644 index 0000000..64b762e --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.vcwin32 @@ -0,0 +1,87 @@ +# makefile for libpng +# Copyright (C) 1998 Tim Wegner +# For conditions of distribution and use, see copyright notice in png.h +# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib +# To use, do "nmake /f scripts\makefile.vcwin32" + +# -------- Microsoft Visual C++ 4.0 and later, no assembler code -------- +# If you want to use assembler code, use makefile.vcawin32 instead. + +CFLAGS= -Ox -GA3s -nologo -W3 -I..\zlib + +CC=cl +LD=link +LDFLAGS= +O=.obj + +#uncomment next to put error messages in a file +#ERRFILE= >> pngerrs + +# variables +OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) +OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) +OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) + +all: libpng.lib + +png$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngset$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngget$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngread$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngpread$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngrtran$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngrutil$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngerror$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngmem$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngrio$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwio$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngtest$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngtrans$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwrite$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwtran$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +pngwutil$(O): png.h pngconf.h + $(CC) -c $(CFLAGS) $*.c $(ERRFILE) + +libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) + echo something to del > libpng.lib + del libpng.lib + lib /OUT:libpng.lib $(OBJS1) $(OBJS2) $(OBJS3) + +pngtest.exe: pngtest.obj libpng.lib + $(LD) $(LDFLAGS) pngtest.obj libpng.lib ..\zlib\zlib.lib /OUT:pngtest.exe /SUBSYSTEM:CONSOLE + +test: pngtest.exe + pngtest + +# End of makefile for libpng + diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makefile.watcom b/gtkmm-osx/libpng-1.2.5/scripts/makefile.watcom new file mode 100644 index 0000000..5e860fc --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makefile.watcom @@ -0,0 +1,109 @@ +# Makefile for libpng +# Watcom C/C++ 10.0 and later, 32-bit protected mode, flat memory model + +# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is +# copyright 1995 Guy Eric Schalnat, Group 42, Inc. +# For conditions of distribution and use, see copyright notice in png.h + +# To use, do "wmake /f scripts\makefile.watcom" + + +# ---------------------- Watcom C/C++ 10.0 and later ----------------------- + +# Where the zlib library and include files are located +ZLIBLIB=..\zlib +ZLIBINC=..\zlib + +# Target OS +OS=DOS +#OS=NT + +# Target CPU +CPU=6 # Pentium Pro +#CPU=5 # Pentium + +# Calling convention +CALLING=r # registers +#CALLING=s # stack + +# Uncomment next to put error messages in a file +#ERRFILE=>>pngerrs + +# -------------------------------------------------------------------------- + + +CC=wcc386 +CFLAGS=-$(CPU)$(CALLING) -fp$(CPU) -fpi87 -oneatx -mf -bt=$(OS) -i=$(ZLIBINC) -zq +LD=wcl386 +LDFLAGS=-zq + +O=.obj + +OBJS1=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) +OBJS2=pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) +OBJS3=pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) + + +all: test + +png$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngset$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngget$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngread$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngpread$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngrtran$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngrutil$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngerror$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngmem$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngrio$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngwio$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngtest$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngtrans$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngwrite$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngwtran$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +pngwutil$(O): png.h pngconf.h + $(CC) $(CFLAGS) $*.c $(ERRFILE) + +libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) + wlib -b -c -n -q libpng.lib $(OBJS1) + wlib -b -c -q libpng.lib $(OBJS2) + wlib -b -c -q libpng.lib $(OBJS3) + +pngtest.exe: pngtest.obj libpng.lib + $(LD) $(LDFLAGS) pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib + +test: pngtest.exe .symbolic + pngtest.exe + + +# End of makefile for libpng diff --git a/gtkmm-osx/libpng-1.2.5/scripts/makevms.com b/gtkmm-osx/libpng-1.2.5/scripts/makevms.com new file mode 100644 index 0000000..b9e3895 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/makevms.com @@ -0,0 +1,144 @@ +$! make libpng under VMS +$! +$! +$! Check for MMK/MMS +$! +$! This procedure accepts one parameter (contrib), which causes it to build +$! the programs from the contrib directory instead of libpng. +$! +$ p1 = f$edit(p1,"UPCASE") +$ if p1 .eqs. "CONTRIB" +$ then +$ set def [.contrib.gregbook] +$ @makevms +$ set def [-.pngminus] +$ @makevms +$ set def [--] +$ exit +$ endif +$ Make = "" +$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS" +$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK" +$! +$! Look for the compiler used +$! +$ zlibsrc = "[-.zlib]" +$ ccopt="/include=''zlibsrc'" +$ if f$getsyi("HW_MODEL").ge.1024 +$ then +$ ccopt = "/prefix=all"+ccopt +$ comp = "__decc__=1" +$ if f$trnlnm("SYS").eqs."" then define sys sys$library: +$ else +$ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs."" +$ then +$ if f$trnlnm("SYS").eqs."" then define sys sys$library: +$ if f$search("SYS$SYSTEM:VAXC.EXE").eqs."" +$ then +$ comp = "__gcc__=1" +$ CC :== GCC +$ else +$ comp = "__vaxc__=1" +$ endif +$ else +$ if f$trnlnm("SYS").eqs."" then define sys decc$library_include: +$ ccopt = "/decc/prefix=all"+ccopt +$ comp = "__decc__=1" +$ endif +$ endif +$! +$! Build the thing plain or with mms/mmk +$! +$ write sys$output "Compiling Libpng sources ..." +$ if make.eqs."" +$ then +$ dele pngtest.obj;* +$ CALL MAKE png.OBJ "cc ''CCOPT' png" - + png.c png.h pngconf.h +$ CALL MAKE pngpread.OBJ "cc ''CCOPT' pngpread" - + pngpread.c png.h pngconf.h +$ CALL MAKE pngset.OBJ "cc ''CCOPT' pngset" - + pngset.c png.h pngconf.h +$ CALL MAKE pngget.OBJ "cc ''CCOPT' pngget" - + pngget.c png.h pngconf.h +$ CALL MAKE pngread.OBJ "cc ''CCOPT' pngread" - + pngread.c png.h pngconf.h +$ CALL MAKE pngpread.OBJ "cc ''CCOPT' pngpread" - + pngpread.c png.h pngconf.h +$ CALL MAKE pngrtran.OBJ "cc ''CCOPT' pngrtran" - + pngrtran.c png.h pngconf.h +$ CALL MAKE pngrutil.OBJ "cc ''CCOPT' pngrutil" - + pngrutil.c png.h pngconf.h +$ CALL MAKE pngerror.OBJ "cc ''CCOPT' pngerror" - + pngerror.c png.h pngconf.h +$ CALL MAKE pngmem.OBJ "cc ''CCOPT' pngmem" - + pngmem.c png.h pngconf.h +$ CALL MAKE pngrio.OBJ "cc ''CCOPT' pngrio" - + pngrio.c png.h pngconf.h +$ CALL MAKE pngwio.OBJ "cc ''CCOPT' pngwio" - + pngwio.c png.h pngconf.h +$ CALL MAKE pngtrans.OBJ "cc ''CCOPT' pngtrans" - + pngtrans.c png.h pngconf.h +$ CALL MAKE pngwrite.OBJ "cc ''CCOPT' pngwrite" - + pngwrite.c png.h pngconf.h +$ CALL MAKE pngwtran.OBJ "cc ''CCOPT' pngwtran" - + pngwtran.c png.h pngconf.h +$ CALL MAKE pngwutil.OBJ "cc ''CCOPT' pngwutil" - + pngwutil.c png.h pngconf.h +$ write sys$output "Building Libpng ..." +$ CALL MAKE libpng.OLB "lib/crea libpng.olb *.obj" *.OBJ +$ write sys$output "Building pngtest..." +$ CALL MAKE pngtest.OBJ "cc ''CCOPT' pngtest" - + pngtest.c png.h pngconf.h +$ call make pngtest.exe - + "LINK pngtest,libpng.olb/lib,''zlibsrc'libz.olb/lib" - + pngtest.obj libpng.olb +$ write sys$output "Testing Libpng..." +$ run pngtest +$ else +$ if f$search("DESCRIP.MMS") .eqs. "" then copy/nolog [.SCRIPTS]DESCRIP.MMS [] +$ 'make'/macro=('comp',zlibsrc='zlibsrc') +$ endif +$ write sys$output "Libpng build completed" +$ exit +$! +$! +$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES +$ V = 'F$Verify(0) +$! P1 = What we are trying to make +$! P2 = Command to make it +$! P3 - P8 What it depends on +$ +$ If F$Search(P1) .Eqs. "" Then Goto Makeit +$ Time = F$CvTime(F$File(P1,"RDT")) +$arg=3 +$Loop: +$ Argument = P'arg +$ If Argument .Eqs. "" Then Goto Exit +$ El=0 +$Loop2: +$ File = F$Element(El," ",Argument) +$ If File .Eqs. " " Then Goto Endl +$ AFile = "" +$Loop3: +$ OFile = AFile +$ AFile = F$Search(File) +$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl +$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit +$ Goto Loop3 +$NextEL: +$ El = El + 1 +$ Goto Loop2 +$EndL: +$ arg=arg+1 +$ If arg .Le. 8 Then Goto Loop +$ Goto Exit +$ +$Makeit: +$ VV=F$VERIFY(0) +$ write sys$output P2 +$ 'P2 +$ VV='F$Verify(VV) +$Exit: +$ If V Then Set Verify +$ENDSUBROUTINE diff --git a/gtkmm-osx/libpng-1.2.5/scripts/pngdef.pas b/gtkmm-osx/libpng-1.2.5/scripts/pngdef.pas new file mode 100644 index 0000000..6e20683 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/pngdef.pas @@ -0,0 +1,795 @@ +unit pngdef; + +// Caution: this file has fallen out of date since version 1.0.5. Write to +// png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu about volunteering +// to it up to date. + +interface + +const + PNG_LIBPNG_VER_STRING = '1.2.5'; + PNG_LIBPNG_VER = 10205; + +type + png_uint_32 = Cardinal; + png_int_32 = Longint; + png_uint_16 = Word; + png_int_16 = Smallint; + png_byte = Byte; + png_size_t = png_uint_32; + png_charpp = ^png_charp; + png_charp = PChar; + float = single; + int = Integer; + png_bytepp = ^png_bytep; + png_bytep = ^png_byte; + png_uint_16p = ^png_uint_16; + png_uint_16pp = ^png_uint_16p; + png_voidp = pointer; + time_t = Longint; + png_doublep = ^png_double; + png_double = double; + + user_error_ptr = Pointer; + png_error_ptrp = ^png_error_ptr; + png_error_ptr = procedure(png_ptr: Pointer; msg: Pointer); + stdcall; + png_rw_ptrp = ^png_rw_ptr; + png_rw_ptr = procedure(png_ptr: Pointer; data: Pointer; + length: png_size_t); + stdcall; + png_flush_ptrp = ^png_flush_ptr; + png_flush_ptr = procedure(png_ptr: Pointer); + stdcall; + png_progressive_info_ptrp = ^png_progressive_info_ptr; + png_progressive_info_ptr = procedure(png_ptr: Pointer; + info_ptr: Pointer); + stdcall; + png_progressive_end_ptrp = ^png_progressive_end_ptr; + png_progressive_end_ptr = procedure(png_ptr: Pointer; + info_ptr: Pointer); + stdcall; + png_progressive_row_ptrp = ^png_progressive_row_ptr; + png_progressive_row_ptr = procedure(png_ptr: Pointer; + data: Pointer; length: png_uint_32; + count: int); + stdcall; + png_read_status_ptr = procedure(png_ptr: Pointer; + row_number: png_uint_32; pass: int); + stdcall; + png_write_status_ptr = procedure(png_ptr: Pointer; + row_number: png_uint_32; pass: int); + stdcall; + png_user_chunk_ptr = procedure(png_ptr: Pointer; + data: png_unknown_chunkp); + stdcall; + png_user_transform_ptr = procedure(png_ptr: Pointer; + row_info: Pointer; data: png_bytep); + stdcall; + + png_colorpp = ^png_colorp; + png_colorp = ^png_color; + png_color = packed record + red, green, blue: png_byte; + end; + + png_color_16pp = ^png_color_16p; + png_color_16p = ^png_color_16; + png_color_16 = packed record + index: png_byte; //used for palette files + red, green, blue: png_uint_16; //for use in red green blue files + gray: png_uint_16; //for use in grayscale files + end; + + png_color_8pp = ^png_color_8p; + png_color_8p = ^png_color_8; + png_color_8 = packed record + red, green, blue: png_byte; //for use in red green blue files + gray: png_byte; //for use in grayscale files + alpha: png_byte; //for alpha channel files + end; + + png_textpp = ^png_textp; + png_textp = ^png_text; + png_text = packed record + compression: int; //compression value + key: png_charp; //keyword, 1-79 character description of "text" + text: png_charp; //comment, may be empty ("") + text_length: png_size_t; //length of text field + end; + + png_timepp = ^png_timep; + png_timep = ^png_time; + png_time = packed record + year: png_uint_16; //yyyy + month: png_byte; //1..12 + day: png_byte; //1..31 + hour: png_byte; //0..23 + minute: png_byte; //0..59 + second: png_byte; //0..60 (leap seconds) + end; + + png_infopp = ^png_infop; + png_infop = Pointer; + + png_row_infopp = ^png_row_infop; + png_row_infop = ^png_row_info; + png_row_info = packed record + width: png_uint_32; //width of row + rowbytes: png_size_t; //number of bytes in row + color_type: png_byte; //color type of row + bit_depth: png_byte; //bit depth of row + channels: png_byte; //number of channels (1, 2, 3, or 4) + pixel_depth: png_byte; //bits per pixel (depth * channels) + end; + + png_structpp = ^png_structp; + png_structp = Pointer; + +const + +// Supported compression types for text in PNG files (tEXt, and zTXt). +// The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. + + PNG_TEXT_COMPRESSION_NONE_WR = -3; + PNG_TEXT_COMPRESSION_zTXt_WR = -2; + PNG_TEXT_COMPRESSION_NONE = -1; + PNG_TEXT_COMPRESSION_zTXt = 0; + +// These describe the color_type field in png_info. +// color type masks + + PNG_COLOR_MASK_PALETTE = 1; + PNG_COLOR_MASK_COLOR = 2; + PNG_COLOR_MASK_ALPHA = 4; + +// color types. Note that not all combinations are legal + + PNG_COLOR_TYPE_GRAY = 0; + PNG_COLOR_TYPE_PALETTE = PNG_COLOR_MASK_COLOR or + PNG_COLOR_MASK_PALETTE; + PNG_COLOR_TYPE_RGB = PNG_COLOR_MASK_COLOR; + PNG_COLOR_TYPE_RGB_ALPHA = PNG_COLOR_MASK_COLOR or + PNG_COLOR_MASK_ALPHA; + PNG_COLOR_TYPE_GRAY_ALPHA = PNG_COLOR_MASK_ALPHA; + +// This is for compression type. PNG 1.0 only defines the single type. + + PNG_COMPRESSION_TYPE_BASE = 0; // Deflate method 8, 32K window + PNG_COMPRESSION_TYPE_DEFAULT = PNG_COMPRESSION_TYPE_BASE; + +// This is for filter type. PNG 1.0 only defines the single type. + + PNG_FILTER_TYPE_BASE = 0; // Single row per-byte filtering + PNG_FILTER_TYPE_DEFAULT = PNG_FILTER_TYPE_BASE; + +// These are for the interlacing type. These values should NOT be changed. + + PNG_INTERLACE_NONE = 0; // Non-interlaced image + PNG_INTERLACE_ADAM7 = 1; // Adam7 interlacing + +// These are for the oFFs chunk. These values should NOT be changed. + + PNG_OFFSET_PIXEL = 0; // Offset in pixels + PNG_OFFSET_MICROMETER = 1; // Offset in micrometers (1/10^6 meter) + +// These are for the pCAL chunk. These values should NOT be changed. + + PNG_EQUATION_LINEAR = 0; // Linear transformation + PNG_EQUATION_BASE_E = 1; // Exponential base e transform + PNG_EQUATION_ARBITRARY = 2; // Arbitrary base exponential transform + PNG_EQUATION_HYPERBOLIC = 3; // Hyperbolic sine transformation + +// These are for the pHYs chunk. These values should NOT be changed. + + PNG_RESOLUTION_UNKNOWN = 0; // pixels/unknown unit (aspect ratio) + PNG_RESOLUTION_METER = 1; // pixels/meter + +// These are for the sRGB chunk. These values should NOT be changed. + PNG_sRGB_INTENT_PERCEPTUAL = 0; + PNG_sRGB_INTENT_RELATIVE = 1; + PNG_sRGB_INTENT_SATURATION = 2; + PNG_sRGB_INTENT_ABSOLUTE = 3; + +// Handle alpha and tRNS by replacing with a background color. + PNG_BACKGROUND_GAMMA_UNKNOWN = 0; + PNG_BACKGROUND_GAMMA_SCREEN = 1; + PNG_BACKGROUND_GAMMA_FILE = 2; + PNG_BACKGROUND_GAMMA_UNIQUE = 3; + +// Values for png_set_crc_action() to say how to handle CRC errors in +// ancillary and critical chunks, and whether to use the data contained +// therein. Note that it is impossible to "discard" data in a critical +// chunk. For versions prior to 0.90, the action was always error/quit, +// whereas in version 0.90 and later, the action for CRC errors in ancillary +// chunks is warn/discard. These values should NOT be changed. + +// value action:critical action:ancillary + + PNG_CRC_DEFAULT = 0; // error/quit warn/discard data + PNG_CRC_ERROR_QUIT = 1; // error/quit error/quit + PNG_CRC_WARN_DISCARD = 2; // (INVALID) warn/discard data + PNG_CRC_WARN_USE = 3; // warn/use data warn/use data + PNG_CRC_QUIET_USE = 4; // quiet/use data quiet/use data + PNG_CRC_NO_CHANGE = 5; // use current value use current value + +// Flags for png_set_filter() to say which filters to use. The flags +// are chosen so that they don't conflict with real filter types +// below, in case they are supplied instead of the #defined constants. +// These values should NOT be changed. + + PNG_NO_FILTERS = $00; + PNG_FILTER_NONE = $08; + PNG_FILTER_SUB = $10; + PNG_FILTER_UP = $20; + PNG_FILTER_AVG = $40; + PNG_FILTER_PAETH = $80; + PNG_ALL_FILTERS = PNG_FILTER_NONE or PNG_FILTER_SUB or + PNG_FILTER_UP or PNG_FILTER_AVG or + PNG_FILTER_PAETH; + +// Filter values (not flags) - used in pngwrite.c, pngwutil.c for now. +// These defines should NOT be changed. + + PNG_FILTER_VALUE_NONE = 0; + PNG_FILTER_VALUE_SUB = 1; + PNG_FILTER_VALUE_UP = 2; + PNG_FILTER_VALUE_AVG = 3; + PNG_FILTER_VALUE_PAETH = 4; + +// Heuristic used for row filter selection. These defines should NOT be +// changed. + + PNG_FILTER_HEURISTIC_DEFAULT = 0; // Currently "UNWEIGHTED" + PNG_FILTER_HEURISTIC_UNWEIGHTED = 1; // Used by libpng < 0.95 + PNG_FILTER_HEURISTIC_WEIGHTED = 2; // Experimental feature + PNG_FILTER_HEURISTIC_LAST = 3; // Not a valid value + +procedure png_build_grayscale_palette(bit_depth: int; palette: png_colorp); + stdcall; +function png_check_sig(sig: png_bytep; num: int): int; + stdcall; +procedure png_chunk_error(png_ptr: png_structp; + const mess: png_charp); + stdcall; +procedure png_chunk_warning(png_ptr: png_structp; + const mess: png_charp); + stdcall; +procedure png_convert_from_time_t(ptime: png_timep; ttime: time_t); + stdcall; +function png_convert_to_rfc1123(png_ptr: png_structp; ptime: png_timep): + png_charp; + stdcall; +function png_create_info_struct(png_ptr: png_structp): png_infop; + stdcall; +function png_create_read_struct(user_png_ver: png_charp; + error_ptr: user_error_ptr; error_fn: png_error_ptr; + warn_fn: png_error_ptr): png_structp; + stdcall; +function png_get_copyright(png_ptr: png_structp): png_charp; + stdcall; +function png_get_header_ver(png_ptr: png_structp): png_charp; + stdcall; +function png_get_header_version(png_ptr: png_structp): png_charp; + stdcall; +function png_get_libpng_ver(png_ptr: png_structp): png_charp; + stdcall; +function png_create_write_struct(user_png_ver: png_charp; + error_ptr: user_error_ptr; error_fn: png_error_ptr; + warn_fn: png_error_ptr): png_structp; + stdcall; +procedure png_destroy_info_struct(png_ptr: png_structp; + info_ptr_ptr: png_infopp); + stdcall; +procedure png_destroy_read_struct(png_ptr_ptr: png_structpp; + info_ptr_ptr, end_info_ptr_ptr: png_infopp); + stdcall; +procedure png_destroy_write_struct(png_ptr_ptr: png_structpp; + info_ptr_ptr: png_infopp); + stdcall; +function png_get_IHDR(png_ptr: png_structp; info_ptr: png_infop; + var width, height: png_uint_32; var bit_depth, + color_type, interlace_type, compression_type, + filter_type: int): png_uint_32; + stdcall; +function png_get_PLTE(png_ptr: png_structp; info_ptr: png_infop; + var palette: png_colorp; var num_palette: int): + png_uint_32; + stdcall; +function png_get_bKGD(png_ptr: png_structp; info_ptr: png_infop; + var background: png_color_16p): png_uint_32; + stdcall; +function png_get_bit_depth(png_ptr: png_structp; info_ptr: png_infop): + png_byte; + stdcall; +function png_get_cHRM(png_ptr: png_structp; info_ptr: png_infop; + var white_x, white_y, red_x, red_y, green_x, green_y, + blue_x, blue_y: double): png_uint_32; + stdcall; +function png_get_channels(png_ptr: png_structp; info_ptr: png_infop): + png_byte; + stdcall; +function png_get_color_type(png_ptr: png_structp; info_ptr: png_infop): + png_byte; + stdcall; +function png_get_compression_type(png_ptr: png_structp; + info_ptr: png_infop): png_byte; + stdcall; +function png_get_error_ptr(png_ptr: png_structp): png_voidp; + stdcall; +function png_get_filter_type(png_ptr: png_structp; info_ptr: png_infop): + png_byte; + stdcall; +function png_get_gAMA(png_ptr: png_structp; info_ptr: png_infop; + var file_gamma: double): png_uint_32; + stdcall; +function png_get_hIST(png_ptr: png_structp; info_ptr: png_infop; + var hist: png_uint_16p): png_uint_32; + stdcall; +function png_get_image_height(png_ptr: png_structp; info_ptr: png_infop): + png_uint_32; + stdcall; +function png_get_image_width(png_ptr: png_structp; info_ptr: png_infop): + png_uint_32; + stdcall; +function png_get_interlace_type(png_ptr: png_structp; + info_ptr: png_infop): png_byte; + stdcall; +function png_get_io_ptr(png_ptr: png_structp): png_voidp; + stdcall; +function png_get_oFFs(png_ptr: png_structp; info_ptr: png_infop; + var offset_x, offset_y: png_uint_32; + var unit_type: int): png_uint_32; + stdcall; +function png_get_sCAL(png_ptr: png_structp; info_ptr: png_infop; + var unit:int; var width: png_uint_32; height: png_uint_32): + png_uint_32; + stdcall +function png_get_pCAL(png_ptr: png_structp; info_ptr: png_infop; + var purpose: png_charp; var X0, X1: png_int_32; + var typ, nparams: int; var units: png_charp; + var params: png_charpp): png_uint_32; + stdcall; +function png_get_pHYs(png_ptr: png_structp; info_ptr: png_infop; + var res_x, res_y: png_uint_32; var unit_type: int): + png_uint_32; + stdcall; +function png_get_pixel_aspect_ratio(png_ptr: png_structp; + info_ptr: png_infop): float; + stdcall; +function png_get_pixels_per_meter(png_ptr: png_structp; + info_ptr: png_infop): png_uint_32; + stdcall; +function png_get_progressive_ptr(png_ptr: png_structp): png_voidp; + stdcall; +function png_get_rgb_to_gray_status(png_ptr: png_structp); + stdcall; +function png_get_rowbytes(png_ptr: png_structp; info_ptr: png_infop): + png_uint_32; + stdcall; +function png_get_rows(png_ptr: png_structp; info_ptr: png_infop): + png_bytepp; + stdcall; +function png_get_sBIT(png_ptr: png_structp; info_ptr: png_infop; + var sig_bits: png_color_8p): png_uint_32; + stdcall; +function png_get_sRGB(png_ptr: png_structp; info_ptr: png_infop; + var file_srgb_intent: int): png_uint_32; + stdcall; +function png_get_signature(png_ptr: png_structp; info_ptr: png_infop): + png_bytep; + stdcall; +function png_get_tIME(png_ptr: png_structp; info_ptr: png_infop; + var mod_time: png_timep): png_uint_32; + stdcall; +function png_get_tRNS(png_ptr: png_structp; info_ptr: png_infop; + var trans: png_bytep; var num_trans: int; + var trans_values: png_color_16p): png_uint_32; + stdcall; +function png_get_text(png_ptr: png_structp; info_ptr: png_infop; + var text_ptr: png_textp; var num_text: int): + png_uint_32; + stdcall; +function png_get_user_chunk_ptr(png_ptr: png_structp): + png_voidp; + stdcall; +function png_get_valid(png_ptr: png_structp; info_ptr: png_infop; + flag: png_uint_32): png_uint_32; + stdcall; +function png_get_x_offset_microns(png_ptr: png_structp; + info_ptr: png_infop): png_uint_32; + stdcall; +function png_get_x_offset_pixels(png_ptr: png_structp; + info_ptr: png_infop): png_uint_32; + stdcall; +function png_get_x_pixels_per_meter(png_ptr: png_structp; + info_ptr: png_infop): png_uint_32; + stdcall; +function png_get_y_offset_microns(png_ptr: png_structp; + info_ptr: png_infop): png_uint_32; + stdcall; +function png_get_y_offset_pixels(png_ptr: png_structp; + info_ptr: png_infop): png_uint_32; + stdcall; +function png_get_y_pixels_per_meter(png_ptr: png_structp; + info_ptr: png_infop): png_uint_32; + stdcall; +procedure png_process_data(png_ptr: png_structp; info_ptr: png_infop; + buffer: png_bytep; buffer_size: png_size_t); + stdcall; +procedure png_progressive_combine_row(png_ptr: png_structp; + old_row, new_row: png_bytep); + stdcall; +procedure png_read_end(png_ptr: png_structp; info_ptr: png_infop); + stdcall; +procedure png_read_image(png_ptr: png_structp; image: png_bytepp); + stdcall; +procedure png_read_info(png_ptr: png_structp; info_ptr: png_infop); + stdcall; +procedure png_read_row(png_ptr: png_structp; row, dsp_row: png_bytep); + stdcall; +procedure png_read_rows(png_ptr: png_structp; row, display_row: + png_bytepp; num_rows: png_uint_32); + stdcall; +procedure png_read_update_info(png_ptr: png_structp; info_ptr: png_infop); + stdcall; +procedure png_set_IHDR(png_ptr: png_structp; info_ptr: png_infop; + width, height: png_uint_32; bit_depth, color_type, + interlace_type, compression_type, filter_type: int); + stdcall; +procedure png_set_PLTE(png_ptr: png_structp; info_ptr: png_infop; + palette: png_colorp; num_palette: int); + stdcall; +procedure png_set_bKGD(png_ptr: png_structp; info_ptr: png_infop; + background: png_color_16p); + stdcall; +procedure png_set_background(png_ptr: png_structp; + background_color: png_color_16p; + background_gamma_code, need_expand: int; + background_gamma: double); + stdcall; +procedure png_set_bgr(png_ptr: png_structp); + stdcall; +procedure png_set_cHRM(png_ptr: png_structp; info_ptr: png_infop; + white_x, white_y, red_x, red_y, green_x, green_y, + blue_x, blue_y: double); + stdcall; +procedure png_set_cHRM_fixed(png_ptr: png_structp; info_ptr: png_infop; + white_x, white_y, red_x, red_y, green_x, green_y, + blue_x, blue_y: png_fixed_point); + stdcall; +procedure png_set_compression_level(png_ptr: png_structp; level: int); + stdcall; +procedure png_set_compression_mem_level(png_ptr: png_structp; + mem_level: int); + stdcall; +procedure png_set_compression_method(png_ptr: png_structp; method: int); + stdcall; +procedure png_set_compression_strategy(png_ptr: png_structp; + strategy: int); + stdcall; +procedure png_set_compression_window_bits(png_ptr: png_structp; + window_bits: int); + stdcall; +procedure png_set_crc_action(png_ptr: png_structp; + crit_action, ancil_action: int); + stdcall; +procedure png_set_dither(png_ptr: png_structp; plaette: png_colorp; + num_palette, maximum_colors: int; + histogram: png_uint_16p; full_dither: int); + stdcall; +procedure png_set_error_fn(png_ptr: png_structp; error_ptr: png_voidp; + error_fn, warning_fn: png_error_ptr); + stdcall; +procedure png_set_expand(png_ptr: png_structp); + stdcall; +procedure png_set_filler(png_ptr: png_structp; filler: png_uint_32; + filler_loc: int); + stdcall; +procedure png_set_filter(png_ptr: png_structp; method, filters: int); + stdcall; +procedure png_set_filter_heuristics(png_ptr: png_structp; + heuristic_method, num_weights: int; + filter_weights, filter_costs: png_doublep); + stdcall; +procedure png_set_flush(png_ptr: png_structp; nrows: int); + stdcall; +procedure png_set_gAMA(png_ptr: png_structp; info_ptr: png_infop; + file_gamma: double); + stdcall; +procedure png_set_gAMA_fixed(png_ptr: png_structp; info_ptr: png_infop; + file_gamma: png_fixed_point); + stdcall; +procedure png_set_gamma(png_ptr: png_structp; screen_gamma, + default_file_gamma: double); + stdcall; +procedure png_set_gray_1_2_4_to_8(png_ptr: png_structp); + stdcall; +procedure png_set_gray_to_rgb(png_ptr: png_structp); + stdcall; +procedure png_set_hIST(png_ptr: png_structp; info_ptr: png_infop; + hist: png_uint_16p); + stdcall; +function png_set_interlace_handling(png_ptr: png_structp): int; + stdcall; +procedure png_set_invalid(png_ptr: png_structp; info_ptr:png_infop; + mask: int); + stdcall; +procedure png_set_invert_alpha(png_ptr: png_structp); + stdcall; +procedure png_set_invert_mono(png_ptr: png_structp); + stdcall; +procedure png_set_oFFs(png_ptr: png_structp; info_ptr: png_infop; + offset_x, offset_y: png_uint_32; unit_type: int); + stdcall; +procedure png_set_palette_to_rgb(png_ptr: png_structp); + stdcall; +procedure png_set_pCAL(png_ptr: png_structp; info_ptr: png_infop; + purpose: png_charp; X0, X1: png_int_32; + typ, nparams: int; units: png_charp; + params: png_charpp); + stdcall; +procedure png_set_pHYs(png_ptr: png_structp; info_ptr: png_infop; + res_x, res_y: png_uint_32; unit_type: int); + stdcall; +procedure png_set_packing(png_ptr: png_structp); + stdcall; +procedure png_set_packswap(png_ptr: png_structp); + stdcall; +procedure png_set_progressive_read_fn(png_ptr: png_structp; + progressive_ptr: png_voidp; + info_fn: png_progressive_info_ptr; + row_fn: png_progressive_row_ptr; + end_fn: png_progressive_end_ptr); + stdcall; +procedure png_set_read_fn(png_ptr: png_structp; + io_ptr: png_voidp; read_data_fn: png_rw_ptr); + stdcall; +procedure png_set_read_status_fn(png_ptr: png_structp; + read_row_fn: png_read_status_ptr); + stdcall; +procedure png_set_read_user_chunk_fn(png_ptr: png_structp; + read_user_chunk_fn: png_user_chunk_ptr); + stdcall; +procedure png_set_read_user_transform_fn(png_ptr: png_structp; + read_user_transform_fn: png_user_transform_ptr); + stdcall; +procedure png_set_rgb_to_gray(png_ptr: png_structp; int: error_action; + red_weight, green_weight: double); + stdcall; +procedure png_set_rgb_to_gray_fixed(png_ptr: png_structp; int: error_action; + red_weight, green_weight: png_fixed_point); + stdcall; +procedure png_set_rows(png_ptr: png_structp; info_ptr: png_infop; + row_pointers: png_bytepp); + stdcall; +procedure png_set_sBIT(png_ptr: png_structp; info_ptr: png_infop; + sig_bits: png_color_8p); + stdcall; +procedure png_set_sRGB(png_ptr: png_structp; info_ptr: png_infop; + intent: int); + stdcall; +procedure png_set_sRGB_gAMA_and_cHRM(png_ptr: png_structp; + info_ptr: png_infop; intent: int); + stdcall; +procedure png_set_shift(png_ptr: png_structp; true_bits: png_color_8p); + stdcall; +procedure png_set_sig_bytes(png_ptr: png_structp; num_bytes: int); + stdcall; +procedure png_set_strip_16(png_ptr: png_structp); + stdcall; +procedure png_set_strip_alpha(png_ptr: png_structp); + stdcall; +procedure png_set_swap(png_ptr: png_structp); + stdcall; +procedure png_set_swap_alpha(png_ptr: png_structp); + stdcall; +procedure png_set_tIME(png_ptr: png_structp; info_ptr: png_infop; + mod_time: png_timep); + stdcall; +procedure png_set_tRNS(png_ptr: png_structp; info_ptr: png_infop; + trans: png_bytep; num_trans: int; + trans_values: png_color_16p); + stdcall; +procedure png_set_tRNS_to_alpha(png_ptr: png_structp); + stdcall; +procedure png_set_text(png_ptr: png_structp; info_ptr: png_infop; + text_ptr: png_textp; num_text: int); + stdcall; +procedure png_set_write_fn(png_ptr: png_structp; + io_ptr: png_voidp; write_data_fn: png_rw_ptr; + output_flush_fn: png_flush_ptr); + stdcall; +procedure png_set_write_status_fn(png_ptr: png_structp; + write_row_fn: png_write_status_ptr); + stdcall; +procedure png_set_write_user_transform_fn(png_ptr: png_structp; + write_user_transform_fn: png_user_transform_ptr); + stdcall; +function png_sig_cmp(sig: png_bytep; start, num_to_check: png_size_t): + int; + stdcall; +procedure png_start_read_image(png_ptr: png_structp); + stdcall; +procedure png_write_chunk(png_ptr: png_structp; + chunk_name, data: png_bytep; length: png_size_t); + stdcall; +procedure png_write_chunk_data(png_ptr: png_structp; + data: png_bytep; length: png_size_t); + stdcall; +procedure png_write_chunk_end(png_ptr: png_structp); + stdcall; +procedure png_write_chunk_start(png_ptr: png_structp; + chunk_name: png_bytep; length: png_uint_32); + stdcall; +procedure png_write_end(png_ptr: png_structp; info_ptr: png_infop); + stdcall; +procedure png_write_flush(png_ptr: png_structp); + stdcall; +procedure png_write_image(png_ptr: png_structp; image: png_bytepp); + stdcall; +procedure png_write_info(png_ptr: png_structp; info_ptr: png_infop); + stdcall; +procedure png_write_info_before_PLTE(png_ptr: png_structp; info_ptr: png_infop); + stdcall; +procedure png_write_row(png_ptr: png_structp; row: png_bytep); + stdcall; +procedure png_write_rows(png_ptr: png_structp; row: png_bytepp; + num_rows: png_uint_32); + stdcall; +procedure png_get_iCCP(png_ptr: png_structp; info_ptr: png_infop; + name: png_charpp; compression_type: int *; profile: png_charpp; + proflen: png_int_32): png_bytep; + stdcall; +procedure png_get_sPLT(png_ptr: png_structp; + info_ptr: png_infop; entries: png_spalette_pp): png_uint_32; + stdcall; +procedure png_set_iCCP(png_ptr: png_structp; info_ptr: png_infop; + name: png_charp; compression_type: int; profile: png_charp; + proflen: int); + stdcall; +procedure png_free_data(png_ptr: png_structp; info_ptr: png_infop; num: int); + stdcall; +procedure png_set_sPLT(png_ptr: png_structp; info_ptr: png_infop; + entries: png_spalette_p; nentries: int); + stdcall; + +implementation + +const + pngDLL = 'png32bd.dll'; + +procedure png_build_grayscale_palette; external pngDLL; +function png_check_sig; external pngDLL; +procedure png_chunk_error; external pngDLL; +procedure png_chunk_warning; external pngDLL; +procedure png_convert_from_time_t; external pngDLL; +function png_convert_to_rfc1123; external pngDLL; +function png_create_info_struct; external pngDLL; +function png_create_read_struct; external pngDLL; +function png_create_write_struct; external pngDLL; +procedure png_destroy_info_struct; external pngDLL; +procedure png_destroy_read_struct; external pngDLL; +procedure png_destroy_write_struct; external pngDLL; +function png_get_IHDR; external pngDLL; +function png_get_PLTE; external pngDLL; +function png_get_bKGD; external pngDLL; +function png_get_bit_depth; external pngDLL; +function png_get_cHRM; external pngDLL; +function png_get_channels; external pngDLL; +function png_get_color_type; external pngDLL; +function png_get_compression_type; external pngDLL; +function png_get_error_ptr; external pngDLL; +function png_get_filter_type; external pngDLL; +function png_get_gAMA; external pngDLL; +function png_get_hIST; external pngDLL; +function png_get_image_height; external pngDLL; +function png_get_image_width; external pngDLL; +function png_get_interlace_type; external pngDLL; +function png_get_io_ptr; external pngDLL; +function png_get_oFFs; external pngDLL; +function png_get_pCAL; external pngDLL; +function png_get_pHYs; external pngDLL; +function png_get_pixel_aspect_ratio; external pngDLL; +function png_get_pixels_per_meter; external pngDLL; +function png_get_progressive_ptr; external pngDLL; +function png_get_rowbytes; external pngDLL; +function png_get_rows; external pngDLL; +function png_get_sBIT; external pngDLL; +function png_get_sRGB; external pngDLL; +function png_get_signature; external pngDLL; +function png_get_tIME; external pngDLL; +function png_get_tRNS; external pngDLL; +function png_get_text; external pngDLL; +function png_get_user_chunk_ptr; external pngDLL; +function png_get_valid; external pngDLL; +function png_get_x_offset_microns; external pngDLL; +function png_get_x_offset_pixels; external pngDLL; +function png_get_x_pixels_per_meter; external pngDLL; +function png_get_y_offset_microns; external pngDLL; +function png_get_y_offset_pixels; external pngDLL; +function png_get_y_pixels_per_meter; external pngDLL; +procedure png_process_data; external pngDLL; +procedure png_progressive_combine_row; external pngDLL; +procedure png_read_end; external pngDLL; +procedure png_read_image; external pngDLL; +procedure png_read_info; external pngDLL; +procedure png_read_row; external pngDLL; +procedure png_read_rows; external pngDLL; +procedure png_read_update_info; external pngDLL; +procedure png_set_IHDR; external pngDLL; +procedure png_set_PLTE; external pngDLL; +procedure png_set_bKGD; external pngDLL; +procedure png_set_background; external pngDLL; +procedure png_set_bgr; external pngDLL; +procedure png_set_cHRM; external pngDLL; +procedure png_set_cHRM_fixed; external pngDLL; +procedure png_set_compression_level; external pngDLL; +procedure png_set_compression_mem_level; external pngDLL; +procedure png_set_compression_method; external pngDLL; +procedure png_set_compression_strategy; external pngDLL; +procedure png_set_compression_window_bits; external pngDLL; +procedure png_set_crc_action; external pngDLL; +procedure png_set_dither; external pngDLL; +procedure png_set_error_fn; external pngDLL; +procedure png_set_expand; external pngDLL; +procedure png_set_filler; external pngDLL; +procedure png_set_filter; external pngDLL; +procedure png_set_filter_heuristics; external pngDLL; +procedure png_set_flush; external pngDLL; +procedure png_set_gAMA; external pngDLL; +procedure png_set_gAMA_fixed; external pngDLL; +procedure png_set_gamma; external pngDLL; +procedure png_set_gray_to_rgb; external pngDLL; +procedure png_set_hIST; external pngDLL; +function png_set_interlace_handling; external pngDLL; +procedure png_set_invert_alpha; external pngDLL; +procedure png_set_invert_mono; external pngDLL; +procedure png_set_oFFs; external pngDLL; +procedure png_set_pCAL; external pngDLL; +procedure png_set_pHYs; external pngDLL; +procedure png_set_packing; external pngDLL; +procedure png_set_packswap; external pngDLL; +procedure png_set_progressive_read_fn; external pngDLL; +procedure png_set_read_fn; external pngDLL; +procedure png_set_read_status_fn; external pngDLL; +procedure png_set_read_user_transform_fn; external pngDLL; +procedure png_set_rgb_to_gray; external pngDLL; +procedure png_set_rgb_to_gray_fixed; external pngDLL; +procedure png_set_rows; external pngDLL; +procedure png_set_sBIT; external pngDLL; +procedure png_set_sRGB; external pngDLL; +procedure png_set_sRGB_gAMA_and_cHRM; external pngDLL; +procedure png_set_shift; external pngDLL; +procedure png_set_sig_bytes; external pngDLL; +procedure png_set_strip_16; external pngDLL; +procedure png_set_strip_alpha; external pngDLL; +procedure png_set_swap; external pngDLL; +procedure png_set_swap_alpha; external pngDLL; +procedure png_set_tIME; external pngDLL; +procedure png_set_tRNS; external pngDLL; +procedure png_set_text; external pngDLL; +procedure png_set_user_chunk_fn; external pngDLL; +procedure png_set_write_fn; external pngDLL; +procedure png_set_write_status_fn; external pngDLL; +procedure png_set_write_user_transform_fn; external pngDLL; +function png_sig_cmp; external pngDLL; +procedure png_start_read_image; external pngDLL; +procedure png_write_chunk; external pngDLL; +procedure png_write_chunk_data; external pngDLL; +procedure png_write_chunk_end; external pngDLL; +procedure png_write_chunk_start; external pngDLL; +procedure png_write_end; external pngDLL; +procedure png_write_flush; external pngDLL; +procedure png_write_image; external pngDLL; +procedure png_write_info; external pngDLL; +procedure png_write_info_before_PLTE; external pngDLL; +procedure png_write_row; external pngDLL; +procedure png_write_rows; external pngDLL; +procedure png_get_iCCP; external pngDLL; +procedure png_get_sPLT; external pngDLL; +procedure png_set_iCCP; external pngDLL; +procedure png_set_sPLT; external pngDLL; +procedure png_free_data; external pngDLL; + +end. diff --git a/gtkmm-osx/libpng-1.2.5/scripts/pngos2.def b/gtkmm-osx/libpng-1.2.5/scripts/pngos2.def new file mode 100644 index 0000000..3c4a3c8 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/pngos2.def @@ -0,0 +1,241 @@ +;---------------------------------------- +; PNG.LIB module definition file for OS/2 +;---------------------------------------- + +; Version 1.2.5 + +LIBRARY PNG +DESCRIPTION "PNG image compression library for OS/2" +CODE PRELOAD MOVEABLE DISCARDABLE +DATA PRELOAD MOVEABLE MULTIPLE + +EXPORTS + + + png_build_grayscale_palette + png_check_sig + png_chunk_error + png_chunk_warning + png_convert_from_struct_tm + png_convert_from_time_t + png_create_info_struct + png_create_read_struct + png_create_write_struct + png_data_freer + png_destroy_info_struct + png_destroy_read_struct + png_destroy_write_struct + png_error + png_free + png_free_data + png_get_IHDR + png_get_PLTE + png_get_bKGD + png_get_bit_depth + png_get_cHRM + png_get_cHRM_fixed + png_get_channels + png_get_color_type + png_get_compression_buffer_size + png_get_compression_type + png_get_copyright + png_get_error_ptr + png_get_filter_type + png_get_gAMA + png_get_gAMA_fixed + png_get_hIST + png_get_header_ver + png_get_header_version + png_get_iCCP + png_get_image_height + png_get_image_width + png_get_interlace_type + png_get_io_ptr + png_get_libpng_ver + png_get_oFFs + png_get_pCAL + png_get_pHYs + png_get_pixel_aspect_ratio + png_get_pixels_per_meter + png_get_progressive_ptr + png_get_rgb_to_gray_status + png_get_rowbytes + png_get_rows + png_get_sBIT + png_get_sCAL + png_get_sPLT + png_get_sRGB + png_get_signature + png_get_tIME + png_get_tRNS + png_get_text + png_get_unknown_chunks + png_get_user_chunk_ptr + png_get_user_transform_ptr + png_get_valid + png_get_x_offset_microns + png_get_x_offset_pixels + png_get_x_pixels_per_meter + png_get_y_offset_microns + png_get_y_offset_pixels + png_get_y_pixels_per_meter + png_malloc + png_memcpy_check + png_memset_check + png_permit_empty_plte + png_process_data + png_progressive_combine_row + png_read_end + png_read_image + png_read_info + png_read_init ; deprecated + png_read_png + png_read_row + png_read_rows + png_read_update_info + png_reset_zstream + png_set_IHDR + png_set_PLTE + png_set_bKGD + png_set_background + png_set_bgr + png_set_cHRM + png_set_cHRM_fixed + png_set_compression_buffer_size + png_set_compression_level + png_set_compression_mem_level + png_set_compression_method + png_set_compression_strategy + png_set_compression_window_bits + png_set_crc_action + png_set_dither + png_set_error_fn + png_set_expand + png_set_filler + png_set_filter + png_set_filter_heuristics + png_set_flush + png_set_gAMA + png_set_gAMA_fixed + png_set_gamma + png_set_gray_1_2_4_to_8 + png_set_gray_to_rgb + png_set_hIST + png_set_iCCP + png_set_interlace_handling + png_set_invert_alpha + png_set_invert_mono + png_set_keep_unknown_chunks + png_set_oFFs + png_set_pCAL + png_set_pHYs + png_set_packing + png_set_packswap + png_set_palette_to_rgb + png_set_progressive_read_fn + png_set_read_fn + png_set_read_status_fn + png_set_read_user_chunk_fn + png_set_read_user_transform_fn + png_set_rgb_to_gray + png_set_rgb_to_gray_fixed + png_set_rows + png_set_sBIT + png_set_sCAL + png_set_sPLT + png_set_sRGB + png_set_sRGB_gAMA_and_cHRM + png_set_shift + png_set_sig_bytes + png_set_strip_16 + png_set_strip_alpha + png_set_swap + png_set_swap_alpha + png_set_tIME + png_set_tRNS + png_set_tRNS_to_alpha + png_set_text + png_set_unknown_chunk_location + png_set_unknown_chunks + png_set_user_transform_info + png_set_write_fn + png_set_write_status_fn + png_set_write_user_transform_fn + png_sig_cmp + png_start_read_image + png_warning + png_write_chunk + png_write_chunk_data + png_write_chunk_end + png_write_chunk_start + png_write_end + png_write_flush + png_write_image + png_write_info + png_write_info_before_PLTE + png_write_init ; deprecated + png_write_png + png_write_row + png_write_rows + png_read_init_2 + png_write_init_2 + png_access_version_number + png_init_io + png_convert_to_rfc1123 + png_set_invalid + +; Added at version 1.2.0: + png_mmx_support + png_permit_empty_plte + png_permit_mng_features + png_get_mmx_flagmask + png_get_asm_flagmask + png_get_asm_flags + png_get_mmx_bitdepth_threshold + png_get_mmx_rowbytes_threshold + png_set_asm_flags + png_init_mmx_flags + +; Added at version 1.2.2: + png_handle_as_unknown + +; Added at version 1.2.2 and deleted from 1.2.3: +; png_zalloc +; png_zfree + +; Added at version 1.2.4 + png_malloc_warn + +; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS + png_libpng_ver + png_pass_start + png_pass_inc + png_pass_ystart + png_pass_yinc + png_pass_mask + png_pass_dsp_mask +; png_pass_width +; png_pass_height + +; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS + png_IHDR + png_IDAT + png_IEND + png_PLTE + png_bKGD + png_cHRM + png_gAMA + png_hIST + png_iCCP + png_iTXt + png_oFFs + png_pCAL + png_pHYs + png_sBIT + png_sCAL + png_sPLT + png_sRGB + png_tEXt + png_tIME + png_tRNS + png_zTXt diff --git a/gtkmm-osx/libpng-1.2.5/scripts/smakefile.ppc b/gtkmm-osx/libpng-1.2.5/scripts/smakefile.ppc new file mode 100644 index 0000000..e5c0278 --- /dev/null +++ b/gtkmm-osx/libpng-1.2.5/scripts/smakefile.ppc @@ -0,0 +1,30 @@ +# Amiga powerUP (TM) Makefile +# makefile for libpng and SAS C V6.58/7.00 PPC compiler +# Copyright (C) 1998 by Andreas R. Kleinert +# For conditions of distribution and use, see copyright notice in png.h + +CC = scppc +CFLAGS = NOSTKCHK NOSINT OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL IDIR /zlib \ + OPTLOOP OPTRDEP=8 OPTDEP=8 OPTCOMP=8 +LIBNAME = libpng.a +AR = ppc-amigaos-ar +AR_FLAGS = cr +RANLIB = ppc-amigaos-ranlib +LDFLAGS = -r -o +LDLIBS = ../zlib/libzip.a LIB:scppc.a +LN = ppc-amigaos-ld +RM = delete quiet +MKDIR = makedir + +OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o pngread.o \ +pngerror.o pngpread.o pngwrite.o pngrtran.o pngwtran.o pngrio.o pngwio.o pngmem.o + +all: $(LIBNAME) pngtest + +$(LIBNAME): $(OBJS) + $(AR) $(AR_FLAGS) $@ $(OBJS) + $(RANLIB) $@ + +pngtest: pngtest.o $(LIBNAME) + $(LN) $(LDFLAGS) pngtest LIB:c_ppc.o pngtest.o $(LIBNAME) $(LDLIBS) \ +LIB:end.o diff --git a/gtkmm-osx/package b/gtkmm-osx/package new file mode 100755 index 0000000..4681714 --- /dev/null +++ b/gtkmm-osx/package @@ -0,0 +1,292 @@ +#! /bin/csh -ef +# this file was orignally distributed by Apple in the Developer Tools package +#it is distributed under the Apple Open Source License +set version=0.2 +set prog = `/usr/bin/basename $0` +set usage = "Usage: $prog [-f] root-dir info-file [tiff-file] [-d dest-dir] [-r resource-dir] [-traditional | -gnutar] [-bzip]" +set noglob + +if (-x /usr/bin/mkbom) then + set mkbom=/usr/bin/mkbom + set lsbom=/usr/bin/lsbom +else + set mkbom=/usr/etc/mkbom + set lsbom=/usr/etc/lsbom +endif + +if (-x /usr/bin/awk) then + set awk=/usr/bin/awk +else + set awk=/bin/awk +endif +set bzip2=`which bzip2` +set gnutar=/usr/bin/gnutar +set tar=/usr/bin/tar +set pax=/bin/pax + +# gather parameters +if ($#argv == 0) then + echo $usage + exit(1) +endif +unset usebzip +while ( $#argv > 0 ) + switch ( $argv[1] ) + case -d: + if ( $?destDir ) then + echo ${prog}: dest-dir parameter already set to ${destDir}. + echo $usage + exit(1) + else if ( $#argv < 2 ) then + echo ${prog}: -d option requires destination directory. + echo $usage + exit(1) + else + set destDir = $argv[2] + shift; shift + breaksw + endif + case -f: + if ( $?rootDir ) then + echo ${prog}: root-dir parameter already set to ${rootDir}. + echo $usage + exit(1) + else if ( $#argv < 2 ) then + echo ${prog}: -f option requires package root directory. + echo $usage + exit(1) + else + set rootDir = $argv[2] + set fflag + shift; shift + breaksw + endif + case -r: + if ( $?resDir ) then + echo ${prog}: resource-dir parameter already set to ${resDir}. + echo $usage + exit(1) + else if ( $#argv < 2 ) then + echo ${prog}: -r option requires package resource directory. + echo $usage + exit(1) + else + set resDir = $argv[2] + shift; shift + breaksw + endif + case -traditional: + echo useing standard tar + set usetar + unset usegnutar + unset usepax + breaksw + case -gnutar: + echo using gnutar + set usegnutar + unset usepax + unset usetar + shift + case -bzip: + if (-x $bzip2) then + set usebzip + echo using bzip compression + else + echo COMPRESSION ERROR: You can not use BZIP2 you do not have it installed + exit(1) + endif + shift + breaksw + case -*: + echo ${prog}: Unknown option: $argv[1] + echo $usage + exit(1) + case *.info: + if ( $?info ) then + echo ${prog}: info-file parameter already set to ${info}. + echo $usage + exit(1) + else + set info = "$argv[1]" + shift + breaksw + endif + case *.tiff: + if ( $?tiff ) then + echo ${prog}: tiff-file parameter already set to ${tiff}. + echo $usage + exit(1) + else + set tiff = "$argv[1]" + shift + breaksw + endif + default: + if ( $?rootDir ) then + echo ${prog}: unrecognized parameter: $argv[1] + echo $usage + exit(1) + else + set rootDir = "$argv[1]" + shift + breaksw + endif + endsw +end + +# check for mandatory parameters +if ( ! $?rootDir ) then + echo ${prog}: missing root-dir parameter. + echo $usage + exit(1) +else if ( ! $?info) then + echo ${prog}: missing info-file parameter. + echo $usage + exit(1) +endif + +# destDir gets default value if unset on command line +if ( $?destDir ) then + /bin/mkdir -p $destDir +else + set destDir = . +endif + +# derive the root name for the package from the root name of the info file +set root = `/usr/bin/basename $info .info` + +# create package directory +set pkg = ${destDir}/${root}.pkg +echo Generating Installer package $pkg ... +if ( -e $pkg ) /bin/rm -rf $pkg +/bin/mkdir -p -m 755 $pkg +/bin/mkdir -p -m 755 $pkg/Contents +/bin/mkdir -p -m 755 $pkg/Contents/Resources +/bin/mkdir -p -m 755 $pkg/Contents/Resources/English.lproj/ +echo "gxpmpkg2" >$pkg/Contents/PkgInfo +chmod 755 $pkg/Contents/PkgInfo +# (gnu)tar/pax and compress root directory to package archive +echo -n " creating package archive ... " +if ( $?fflag ) then + set pkgTop = ${rootDir:t} + set parent = ${rootDir:h} + if ( "$parent" == "$pkgTop" ) set parent = "." +else + set parent = $rootDir + set pkgTop = . +endif +if ( $?usetar ) then + set pkgArchive = $pkg/Contents/Resources/$root.tar.Z + (cd $parent; $tar -w $pkgTop) | /usr/bin/tar -f -c > $pkgArchive +else if ( $?usegnutar ) then + if ( $?usebzip ) then + set pkgArchive = $pkg/Contents/Resources/$root.tar.bz2 + (cd $parent; $gnutar c $pkgTop) | $bzip2 -f -c > $pkgArchive + else + set pkgArchive = $pkg/Contents/Resources/$root.tar.gz + (cd $parent; $gnutar zcf $pkgArchive $pkgTop) + endif +else + set pkgArchive = $pkg/Contents/Resources/$root.pax.gz + (cd $parent; $pax -w -z -x cpio $pkgTop) > $pkgArchive +endif +/bin/chmod 755 $pkgArchive +echo done. + +# copy info file to package +set pkgInfo = $pkg/Contents/Resources/English.lproj/$root.info +echo -n " copying ${info:t} ... " +/bin/cp $info $pkgInfo +/bin/chmod 755 $pkgInfo +echo done. + +# copy tiff file to package +if ( $?tiff ) then + set pkgTiff = $pkg/$root.tiff + echo -n " copying ${tiff:t} ... " + /bin/cp $tiff $pkgTiff + /bin/chmod 444 $pkgTiff + echo done. +endif + +# copy resources to package +if ( $?resDir ) then + echo -n " copying ${resDir:t} ... " + + # don't want to see push/pop output + pushd $resDir > /dev/null + # get lists of resources. We'll want to change + # permissions on just these things later. + set directoriesInResDir = `find . -type d | grep -v svn` + set filesInResDir = `find . -type f | grep -v svn` + popd > /dev/null + + # copy the resource directory contents into the package directory + foreach resFile (`ls $resDir | grep -v svn`) + cp -r "$resDir/$resFile" "$pkg/Contents/Resources" + end + + pushd $pkg/Contents/Resources > /dev/null + # Change all directories to +r+x, except the package + # directory itself + foreach resFileItem ($directoriesInResDir) + if ( $resFileItem != "." ) then + chmod 755 "$resFileItem" + endif + end + # change all flat files to read only + foreach resFileItem ($filesInResDir) + if ( $resFileItem != "./.DS_Store" ) then + chmod 755 "$resFileItem" + endif + end + popd > /dev/null + + echo done. +endif + +# generate bom file +set pkgBom = $pkg/Contents/Resources/$root.bom +echo -n " generating bom file ... " +/bin/rm -f $pkgBom +if ( $?fflag ) then + $mkbom $parent $pkgBom >& /dev/null +else + $mkbom $rootDir $pkgBom >& /dev/null +endif +/bin/chmod 444 $pkgArchive +echo done. + +# generate sizes file +set pkgSizes = $pkg/Contents/Resources/$root.sizes +echo -n " generating sizes file ... " + +# compute number of files in package +set numFiles = `$lsbom -s $pkgBom | /usr/bin/wc -l` + +# compute package size when compressed +@ compressedSize = `/usr/bin/du -k -s $pkg | $awk '{print $1}'` +@ compressedSize += 3 # add 1KB each for sizes, location, status files + +@ infoSize = `/bin/ls -s $pkgInfo | $awk '{print $1}'` +@ bomSize = `/bin/ls -s $pkgBom | $awk '{print $1}'` +if ( $?tiff ) then + @ tiffSize = `/bin/ls -s $pkgTiff | $awk '{print $1}'` +else + @ tiffSize = 0 +endif + +@ installedSize = `/usr/bin/du -k -s $rootDir | $awk '{print $1}'` +@ installedSize += $infoSize + $bomSize + $tiffSize + 3 + +# echo size parameters to sizes file +echo NumFiles $numFiles > $pkgSizes +echo InstalledSize $installedSize >> $pkgSizes +echo CompressedSize $compressedSize >> $pkgSizes +echo done. +echo " ... finished generating $pkg." + +exit(0) + +# end package + diff --git a/gtkmm-osx/package.info b/gtkmm-osx/package.info new file mode 100644 index 0000000..b1682ed --- /dev/null +++ b/gtkmm-osx/package.info @@ -0,0 +1,14 @@ +Title @PACKAGE@-@VERSION@ +Version @VERSION@ +Description @PACKAGE@ +DefaultLocation /usr/local +DeleteWarning +NeedsAuthorization YES +DisableStop NO +UseUserMask YES +Application NO +Relocatable NO +Required NO +InstallOnly NO +RequiresReboot NO +InstallFat NO diff --git a/gtkmm-osx/trunk/Makefile b/gtkmm-osx/trunk/Makefile deleted file mode 100644 index 6337551..0000000 --- a/gtkmm-osx/trunk/Makefile +++ /dev/null @@ -1,602 +0,0 @@ -#export - - -# Directories -#ROOT_DIR=/Users/darco/Projects/GTK -ROOT_DIR=$(shell pwd) -PREFIX_DIR=$(ROOT_DIR)/output -#PREFIX_DIR=/Applications/SynfigStudio.app/Contents/synfig -PACKAGETMP_DIR=$(ROOT_DIR)/pkg_out -#PREFIX_DIR=/usr/local - -GETTEXT_VER=0.14.5 -GETTEXT_DIR=$(ROOT_DIR)/gettext-$(GETTEXT_VER) -GETTEXT_DL=http://mirrors.kernel.org/gnu/gettext/gettext-$(GETTEXT_VER).tar.gz - -LIBICONV_VER=1.9.1 -LIBICONV_DIR=$(ROOT_DIR)/libiconv-$(LIBICONV_VER) -LIBICONV_DL=http://mirrors.kernel.org/gnu/libiconv/libiconv-$(GETTEXT_VER).tar.gz - -GLIB_VER=2.4.7 -GLIB_VER=2.8.6 -GLIB_DIR=$(ROOT_DIR)/glib-$(GLIB_VER) -GLIB_DL=ftp://ftp.gtk.org/pub/gtk/v2.8/glib-$(GLIB_VER).tar.bz2 - -PANGO_VER=1.4.1 -PANGO_VER=1.10.4 -PANGO_DIR=$(ROOT_DIR)/pango-$(PANGO_VER) -PANGO_DL=http://ftp.gtk.org/pub/gtk/v2.8/pango-$(PANGO_VER).tar.bz2 - -CAIRO_VER=1.0.2 -CAIRO_DIR=$(ROOT_DIR)/cairo-$(CAIRO_VER) -CAIRO_DL=http://cairographics.org/releases/cairo-$(CAIRO_VER).tar.gz - -ATK_VER=1.6.1 -ATK_VER=1.10.3 -ATK_DIR=$(ROOT_DIR)/atk-$(ATK_VER) -ATK_DL=http://ftp.gtk.org/pub/gtk/v2.8/atk-$(ATK_VER).tar.bz2 - -GTK_VER=2.4.13 -GTK_VER=2.8.13 -GTK_DIR=$(ROOT_DIR)/gtk+-$(GTK_VER) -GTK_DL=http://ftp.gtk.org/pub/gtk/v2.8/gtk+-$(GTK_VER).tar.bz2 - -LIBPNG_VER=1.2.10 -LIBPNG_DIR=$(ROOT_DIR)/libpng-$(LIBPNG_VER) -LIBPNG_DL=ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-$(LIBPNG_VER).tar.bz2 - -LIBJPEG_VER=6b -LIBJPEG_DIR=$(ROOT_DIR)/jpeg-$(LIBJPEG_VER) - -LIBTIFF_VER=3.5.7 -LIBTIFF_DIR=$(ROOT_DIR)/tiff-v$(LIBTIFF_VER) - -LIBSIGC_DIR=$(ROOT_DIR)/libsigc++-1.2.4 -#LIBSIGC2_DIR=$(ROOT_DIR)/libsigc++-2.0.5 - -LIBSIGC2_VER=2.0.16 -LIBSIGC2_DIR=$(ROOT_DIR)/libsigc++-$(LIBSIGC2_VER) -LIBSIGC2_DL=http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.0/libsigc++-$(LIBSIGC2_VER).tar.gz - - -GLIBMM_VER=2.4.5 -GLIBMM_VER=2.8.5 -GLIBMM_DIR=$(ROOT_DIR)/glibmm-$(GLIBMM_VER) -GLIBMM_DL=http://ftp.gnome.org/pub/GNOME/sources/glibmm/2.8/glibmm-$(GLIBMM_VER).tar.gz - -GTKMM_VER=2.4.7 -GTKMM_VER=2.8.3 -GTKMM_DIR=$(ROOT_DIR)/gtkmm-$(GTKMM_VER) -GTKMM_DL=http://ftp.gnome.org/pub/GNOME/sources/gtkmm/2.8/gtkmm-$(GTKMM_VER).tar.gz - -LIBXML2_VER=2.6.23 -LIBXML2_DIR=$(ROOT_DIR)/libxml2-$(LIBXML2_VER) - -LIBXMLPP_VER=1.0.4 -LIBXMLPP_DIR=$(ROOT_DIR)/libxml++-$(LIBXMLPP_VER) -LIBXMLPP_DL=http://ftp.gnome.org/pub/GNOME/sources/libxml++/1.0/libxml++-$(LIBXMLPP_VER).tar.gz - - -FONTCONFIG_VER=2.2.96 -FONTCONFIG_DIR=$(ROOT_DIR)/fontconfig-$(FONTCONFIG_VER) - -INSTALL_PREFIX=/usr/local - -# Other -prefix="$(PREFIX_DIR)" -TEMP_FILE=$(ROOT_DIR)/tempfile.xxx -PKG_CONFIG_PATH="$(PREFIX_DIR)"/lib/pkgconfig:/usr/X11R6/lib/pkgconfig:/usr/lib/pkgconfig -PREFIX_SYMBOL=@PREFIX@ - -#export DYLD_LIBRARY_PATH="$(PREFIX_DIR)"/lib:/lib:/usr/local/lib:/lib:/usr/lib -export LD_PREBIND=1 -export LD_PREBIND_ALLOW_OVERLAP=1 -export LD_PREBIND_ALL_TWOLEVEL_MODULES=1 -export MACOSX_DEPLOYMENT_TARGET=10.4 -export CPP=gcc -E - -# Programs -#MAKE=export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET) && make -MAKE=make -j2 -CP=cp -MV=mv -MKDIR=mkdir -GREP=grep -STRIP=strip -FIND=find -CHMOD=chmod -PRINTF=printf -SED=/sw/bin/sed -PACKAGE=./package -CURL=curl -f -UNTARZ=tar xvzf -UNTARJ=tar xvjf -CAT=cat - -OFLAGS= -ARCHFLAGS=-arch i386 -arch ppc - -#ARCHFLAGS=-arch i386 - -#OFLAGS=-faltivec -maltivec -#ARCHFLAGS=-arch ppc - -CFLAGS=-I"$(PREFIX_DIR)"/include -no-cpp-precomp $(OFLAGS) $(ARCHFLAGS) -CC=gcc $(CFLAGS) -CC3=gcc $(CFLAGS) -CXXFLAGS=$(CFLAGS) -CXX=g++ $(CXXFLAGS) -CXXCPP=g++ -E -CPP=gcc -E -LDFLAGS=$(ARCHFLAGS) -L"$(PREFIX_DIR)"/lib -prebind_all_twolevel_modules -twolevel_namespace -bind_at_load -undefined dynamic_lookup -LFLAGS=$(LDFLAGS) - - -DESTDIR_FIX=for filename in `$(FIND) . | $(GREP) Makefile | $(GREP) -v -e Makefile.am -e Makefile.in` ; do { echo Patching $$filename ... && sed 's:LIBDIR=\\"$$(libdir)\\":LIBDIR=\\"$(INSTALL_PREFIX)/lib\\":g;s:DATA_PREFIX=\\"$$(prefix)\\":DATA_PREFIX=\\"$(INSTALL_PREFIX)\\":g; s:LOCALEDIR=\\"$$(localedir)\\":LOCALEDIR=\\"$(INSTALL_PREFIX)/share/locale\\":g; s:LOCALE_ALIAS_PATH=\\"$$(aliaspath)\\":LOCALE_ALIAS_PATH=\\"$(INSTALL_PREFIX)/share/locale\\":g;s:SYSCONFDIR=\\"$$(sysconfdir)\\":SYSCONFDIR=\\"$(INSTALL_PREFIX)/etc\\":g;' < $$filename > $(TEMP_FILE) && cp $(TEMP_FILE) $$filename ; } ; done ; - -ENDIAN_FIX=$(PRINTF) "\#ifdef __BIG_ENDIAN__\n\ -\#define WORDS_BIGENDIAN\n\ -\#endif\n\ -\#undef G_ATOMIC_I486\n\ -\#undef G_ATOMIC_POWERPC\n\ -\#ifdef __i386__\n\ -\#define G_ATOMIC_I486\n\ -\#endif\n\ -\#ifdef __ppc__\n\ -\#define G_ATOMIC_POWERPC\n\ -\#endif\n\ -" >> config.h - -ENVIRONMENT="ARCHFLAGS=$(ARCHFLAGS)" "CC=$(CC)" "CXX=$(CXX)" "CXXCPP=$(CXXCPP)" "CPP=$(CPP)" "PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)" "LDFLAGS=$(LDFLAGS)" "MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET)" - -# Flags -CONFIG_FLAGS=--prefix="$(PREFIX_DIR)" --disable-static --enable-shared $(ENVIRONMENT) - -# Targets -all: gettext glib libpng libjpeg cairo pango atk gtk libsigc2 glibmm gtkmm libxmlpp - -packages: gettext-pkg glib-pkg pango-pkg atk-pkg libpng-pkg libjpeg-pkg cairo-pkg gtk-pkg libsigc2-pkg glibmm-pkg gtkmm-pkg libxmlpp-pkg -clean: gettext-clean glib-clean libpng-clean libjpeg-clean cairo-clean pango-clean atk-clean gtk-clean libsigc2-clean glibmm-clean gtkmm-clean libxmlpp-clean - $(RM) -r gtkmm.pkg - -clean-all: clean - $(RM) -r output - -strip: - $(STRIP) "$(PREFIX_DIR)"/lib/*.dylib - -setup-uninstall: - $(PRINTF) "\ -#!/bin/bash\n\ -cd @PREFIX@\n\ -sudo for file in "'`'"cat bin/uninstall_gtk_list.txt"'`'"\n\ -do\n\ - printf .\n\ - rm $$file\n\ -done\n\ -" > "$(PREFIX_DIR)"/bin/uninstall_gtk - $(CHMOD) +x "$(PREFIX_DIR)"/bin/uninstall_gtk - cd "$(PREFIX_DIR)" && find . | tac > bin/uninstall_gtk_list.txt - -#PACKAGE_PREP="for filename in `find . | $(GREP) -e '\.la' -e '\.pc' -e '[-]config' -e '\.loaders' -e '\.immodules'` ; do [ -d $$filename ] || { $(GREP) -l '$(ROOT_DIR)' $$filename && $(SED) 's;"$(PREFIX_DIR)";@PREFIX@;g;s:-L$(ROOT_DIR)/gettext-0.11.5/intl::g;' < $$filename > $(TEMP_FILE) && $(CP) $(TEMP_FILE) $$filename ;} ; done; $(RM) $(TEMP_FILE)" - -PACKAGE_PREP=for filename in `find | $(GREP) -e '\.la' -e '\.pc' -e '[-]config' -e '\.loaders' -e '\.immodules'` ; do [ -d $$filename ] || { $(SED) 's;$(PACKAGETMP_DIR);@PREFIX@;g;s;"$(PREFIX_DIR)";@PREFIX@;g;s:-L$(ROOT_DIR)/gettext-0.11.5/intl::g;' < $$filename > $(TEMP_FILE) && $(CP) $(TEMP_FILE) $$filename && echo $$filename ;} ; done; $(RM) $(TEMP_FILE) ; $(RM) -R share/doc - -package-prep: setup-uninstall - -cd "$(PREFIX_DIR)" && $(PACKAGE_PREP) -# -cd "$(PREFIX_DIR)" && for filename in `$(CAT) "$(PREFIX_DIR)"/bin/uninstall_gtk_list.txt | $(GREP) -e "\.la" -e "\.pc" -e -config -e "\.loaders" -e "\.immodules"` ;\ -# do [ -d $$filename ] || { \ -# $(GREP) -l "$(ROOT_DIR)" $$filename && \ -# $(SED) "s;"$(PREFIX_DIR)";@PREFIX@;g;s:-L$(ROOT_DIR)/gettext-0.11.5/intl::g;" \ -# < $$filename > $(TEMP_FILE) && \ -# $(CP) $(TEMP_FILE) $$filename \ -# ;} ; done -# $(RM) $(TEMP_FILE) - - -package: - $(PACKAGE) "$(PREFIX_DIR)" gtkmm.info -r PkgResource -bzip -# -[ -d gtkmm.xpm ] && mv gtkmm.xpm gtkmm.pkg - -gettext: gettext-$(GETTEXT_VER) - cd $(GETTEXT_DIR) && ./configure $(CONFIG_FLAGS) "LDFLAGS=$(LDFLAGS) -L$(GETTEXT_DIR)/intl" --with-libiconv-prefix=/usr/lib - cd $(GETTEXT_DIR) && $(ENDIAN_FIX) -# $(SED) "s/__USER_LABEL_PREFIX__/_/g;" < $(GETTEXT_DIR)/intl/libgnuintl.h > $(TEMP_FILE) -# $(CP) $(TEMP_FILE) $(GETTEXT_DIR)/intl/libgnuintl.h -# $(RM) $(TEMPFILE) -#cd $(GETTEXT_DIR) && $(DESTDIR_FIX) - $(MAKE) -C $(GETTEXT_DIR) - $(MAKE) -C $(GETTEXT_DIR) install - -gettext-pkg: - $(RM) -r $(ROOT_DIR)/pkg_out - $(MAKE) -C $(GETTEXT_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out - -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) - $(SED) "s/@PACKAGE@/gettext/g;s/@VERSION@/$(GETTEXT_VER)/;" < package.info > gettext.info - $(PACKAGE) $(ROOT_DIR)/pkg_out gettext.info -r PkgResource -bzip - $(RM) -r $(ROOT_DIR)/pkg_out - mv $(ROOT_DIR)/gettext.pkg packages - -gettext-clean: - $(MAKE) -C $(GETTEXT_DIR) clean - -gettext-$(GETTEXT_VER): - $(CURL) $(GETTEXT_DL) -o gettext-$(GETTEXT_VER).tar.gz - $(UNTARZ) gettext-$(GETTEXT_VER).tar.gz - -libiconv: - cd $(LIBICONV_DIR) && ./configure $(CONFIG_FLAGS) - cd $(LIBICONV_DIR) && $(ENDIAN_FIX) - cd $(LIBICONV_DIR) && $(DESTDIR_FIX) - $(MAKE) -C $(LIBICONV_DIR) - $(MAKE) -C $(LIBICONV_DIR) install - -libiconv-clean: - $(MAKE) -C $(LIBICONV_DIR) clean - -glib: glib-$(GLIB_VER) - cd $(GLIB_DIR) && ./configure $(CONFIG_FLAGS) - cd $(GLIB_DIR) && $(ENDIAN_FIX) - cd $(GLIB_DIR) && $(DESTDIR_FIX) - $(MAKE) -C $(GLIB_DIR) - $(MAKE) -C $(GLIB_DIR) install-strip - -glib-pkg: - $(RM) -r $(ROOT_DIR)/pkg_out - $(MAKE) -C $(GLIB_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out - -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) - $(SED) "s/@PACKAGE@/glib/g;s/@VERSION@/$(GLIB_VER)/;" < package.info > glib.info - $(PACKAGE) $(ROOT_DIR)/pkg_out glib.info -r PkgResource -bzip - $(RM) -r $(ROOT_DIR)/pkg_out - mv $(ROOT_DIR)/glib.pkg packages - -glib-clean: - $(MAKE) -C $(GLIB_DIR) clean - -glib-$(GLIB_VER): - $(CURL) $(GLIB_DL) -o glib-$(GLIB_VER).tar.bz2 -# $(UNTARZ) glib-$(GLIB_VER).tar.gz - $(UNTARJ) glib-$(GLIB_VER).tar.bz2 - - - - -cairo: cairo-$(CAIRO_VER) - cd $(CAIRO_DIR) && ./configure $(CONFIG_FLAGS) - cd $(CAIRO_DIR) && $(ENDIAN_FIX) - cd $(CAIRO_DIR) && $(DESTDIR_FIX) - $(MAKE) -C $(CAIRO_DIR) - $(MAKE) -C $(CAIRO_DIR) install-strip - -cairo-pkg: - $(RM) -r $(ROOT_DIR)/pkg_out - $(MAKE) -C $(CAIRO_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out - -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) - $(SED) "s/@PACKAGE@/cairo/g;s/@VERSION@/$(CAIRO_VER)/;" < package.info > cairo.info - $(PACKAGE) $(ROOT_DIR)/pkg_out cairo.info -r PkgResource -bzip - $(RM) -r $(ROOT_DIR)/pkg_out - mv $(ROOT_DIR)/cairo.pkg packages - -cairo-clean: - $(MAKE) -C $(CAIRO_DIR) clean - -cairo-$(CAIRO_VER): - $(CURL) $(CAIRO_DL) -o cairo-$(CAIRO_VER).tar.gz - $(UNTARZ) cairo-$(CAIRO_VER).tar.gz - - - - -pango: pango-$(PANGO_VER) - cd $(PANGO_DIR) && ./configure $(CONFIG_FLAGS) - cd $(PANGO_DIR) && $(ENDIAN_FIX) - cd $(PANGO_DIR) && $(DESTDIR_FIX) - $(MAKE) -C $(PANGO_DIR) - $(MAKE) -C $(PANGO_DIR) install-strip - -pango-pkg: - $(RM) -r $(ROOT_DIR)/pkg_out - $(MAKE) -C $(PANGO_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out - -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) - $(SED) "s/@PACKAGE@/pango/g;s/@VERSION@/$(PANGO_VER)/;" < package.info > pango.info - $(PACKAGE) $(ROOT_DIR)/pkg_out pango.info -r PkgResource -bzip - $(RM) -r $(ROOT_DIR)/pkg_out - mv $(ROOT_DIR)/pango.pkg packages - -pango-clean: - $(MAKE) -C $(PANGO_DIR) clean - -pango-$(PANGO_VER): - $(CURL) $(PANGO_DL) -o pango-$(PANGO_VER).tar.bz2 - $(UNTARJ) pango-$(PANGO_VER).tar.bz2 - -atk: atk-$(ATK_VER) - cd $(ATK_DIR) && ./configure $(CONFIG_FLAGS) - cd $(ATK_DIR) && $(ENDIAN_FIX) - cd $(ATK_DIR) && $(DESTDIR_FIX) - $(MAKE) -C $(ATK_DIR) - $(MAKE) -C $(ATK_DIR) install-strip - -atk-pkg: - $(RM) -r $(ROOT_DIR)/pkg_out - $(MAKE) -C $(ATK_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out - -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) - $(SED) "s/@PACKAGE@/atk/g;s/@VERSION@/$(ATK_VER)/;" < package.info > atk.info - $(PACKAGE) $(ROOT_DIR)/pkg_out atk.info -r PkgResource -bzip - $(RM) -r $(ROOT_DIR)/pkg_out - mv $(ROOT_DIR)/atk.pkg packages - -atk-clean: - $(MAKE) -C $(ATK_DIR) clean - -atk-$(ATK_VER): - $(CURL) $(ATK_DL) -o atk-$(ATK_VER).tar.bz2 - $(UNTARJ) atk-$(ATK_VER).tar.bz2 - -libpng: libpng-$(LIBPNG_VER) - cd $(LIBPNG_DIR) && ./configure $(CONFIG_FLAGS) - cd $(LIBPNG_DIR) && $(ENDIAN_FIX) - cd $(LIBPNG_DIR) && $(DESTDIR_FIX) - $(MAKE) -C $(LIBPNG_DIR) - $(MAKE) -C $(LIBPNG_DIR) install-strip -# $(MAKE) -C $(LIBPNG_DIR) -f makefile.macosx prefix="$(PREFIX_DIR)" $(ENVIRONMENT) -# $(MAKE) -C $(LIBPNG_DIR) -f makefile.macosx install prefix="$(PREFIX_DIR)" $(ENVIRONMENT) -# $(MAKE) -C $(LIBPNG_DIR) -f makefile.macosx shared prefix="$(PREFIX_DIR)" $(ENVIRONMENT) -# $(MAKE) -C $(LIBPNG_DIR) -f makefile.macosx install-shared prefix="$(PREFIX_DIR)" $(ENVIRONMENT) -# $(MV) "$(PREFIX_DIR)"/lib/libpng.dylib "$(PREFIX_DIR)"/lib/libpng.dylib.xxx - -libpng-pkg: - $(RM) -r $(ROOT_DIR)/pkg_out - $(MKDIR) $(ROOT_DIR)/pkg_out - $(MAKE) -C $(LIBPNG_DIR) -f makefile.macosx install prefix=$(ROOT_DIR)/pkg_out - -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) - $(SED) "s/@PACKAGE@/libpng/g;s/@VERSION@/$(LIBPNG_VER)/;" < package.info > libpng.info - $(PACKAGE) $(ROOT_DIR)/pkg_out libpng.info -r PkgResource -bzip - $(RM) -r $(ROOT_DIR)/pkg_out - mv $(ROOT_DIR)/libpng.pkg packages - -libpng-clean: - $(MAKE) -C $(LIBPNG_DIR) clean - -libpng-$(LIBPNG_VER): - $(CURL) $(LIBPNG_DL) -o libpng-$(LIBPNG_VER).tar.bz2 - $(UNTARJ) libpng-$(LIBPNG_VER).tar.bz2 - - -gtk: gtk+-$(GTK_VER) - -$(MV) "$(PREFIX_DIR)"/lib/libjpeg.dylib.xxx "$(PREFIX_DIR)"/lib/libjpeg.dylib - -$(MV) "$(PREFIX_DIR)"/lib/libpng.dylib.xxx "$(PREFIX_DIR)"/lib/libpng.dylib - $(SED) -ibak "s/ libjpeg.dylib//" "$(PREFIX_DIR)"/lib/libjpeg.la - cd $(GTK_DIR) && ./configure $(CONFIG_FLAGS) LIBS="-L/usr/X11R6/lib -lfontconfig -lxinerama" --without-libtiff - cd $(GTK_DIR) && $(ENDIAN_FIX) - -$(MV) "$(PREFIX_DIR)"/lib/libjpeg.dylib "$(PREFIX_DIR)"/lib/libjpeg.dylib.xxx - -$(MV) "$(PREFIX_DIR)"/lib/libpng.dylib "$(PREFIX_DIR)"/lib/libpng.dylib.xxx - cd $(GTK_DIR) && $(DESTDIR_FIX) - $(MAKE) -C $(GTK_DIR) - $(MAKE) -C $(GTK_DIR) install-strip - $(SED) -ibak "s:dependency_libs='':dependency_libs='-L/usr/X11R6/lib -lX11 -lXinerama':" "$(PREFIX_DIR)"/lib/libgdk-x11-2.0.la - -gtk-pkg: - $(RM) -r $(ROOT_DIR)/pkg_out - $(MAKE) -C $(GTK_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out - -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) - $(SED) "s/@PACKAGE@/gtk/g;s/@VERSION@/$(GTK_VER)/;" < package.info > gtk.info - $(PACKAGE) $(ROOT_DIR)/pkg_out gtk.info -r PkgResource -bzip - #$(RM) -r $(ROOT_DIR)/pkg_out - mv $(ROOT_DIR)/gtk.pkg packages - -gtk-clean: - $(MAKE) -C $(GTK_DIR) clean - -gtk+-$(GTK_VER): - $(CURL) $(GTK_DL) -o gtk+-$(GTK_VER).tar.bz2 - $(UNTARJ) gtk+-$(GTK_VER).tar.bz2 - -libjpeg: - cd $(LIBJPEG_DIR) && ./configure $(CONFIG_FLAGS) - $(CP) $(GLIB_DIR)/libtool $(LIBJPEG_DIR) - $(MAKE) -C $(LIBJPEG_DIR) - $(MAKE) -C $(LIBJPEG_DIR) install - $(MV) "$(PREFIX_DIR)"/lib/libjpeg.dylib "$(PREFIX_DIR)"/lib/libjpeg.dylib.xxx -# $(RM) "$(PREFIX_DIR)"/lib/libjpeg.dylib - -libjpeg-pkg: - $(RM) -r $(ROOT_DIR)/pkg_out - $(MKDIR) $(ROOT_DIR)/pkg_out - $(MKDIR) $(ROOT_DIR)/pkg_out/include - $(MKDIR) $(ROOT_DIR)/pkg_out/lib - $(MKDIR) $(ROOT_DIR)/pkg_out/bin - $(MKDIR) $(ROOT_DIR)/pkg_out/man - $(MKDIR) $(ROOT_DIR)/pkg_out/man/man1 - $(MKDIR) $(ROOT_DIR)/pkg_out/share - $(MAKE) -C $(LIBJPEG_DIR) install prefix=$(ROOT_DIR)/pkg_out - -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) - $(SED) "s/@PACKAGE@/libjpeg/g;s/@VERSION@/$(LIBJPEG_VER)/;" < package.info > libjpeg.info - $(PACKAGE) $(ROOT_DIR)/pkg_out libjpeg.info -r PkgResource -bzip - $(RM) -r $(ROOT_DIR)/pkg_out - mv $(ROOT_DIR)/libjpeg.pkg packages - -libjpeg-clean: - $(MAKE) -C $(LIBJPEG_DIR) clean - - -libtiff: - MAKE=make && cd $(LIBTIFF_DIR) && ./configure --prefix="$(PREFIX_DIR)" --noninteractive --with-CC="$(CC3)" --with-CFLAGS="$(CFLAGS)" - $(MAKE) -C $(LIBTIFF_DIR) -e - $(MAKE) -C $(LIBTIFF_DIR) install - -libtiff-pkg: - $(RM) -r $(ROOT_DIR)/pkg_out - $(MAKE) -C $(LIBTIFF_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out - -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) - $(SED) "s/@PACKAGE@/libtiff/g;s/@VERSION@/$(LIBTIFF_VER)/;" < package.info > libtiff.info - $(PACKAGE) $(ROOT_DIR)/pkg_out libtiff.info -r PkgResource -bzip - $(RM) -r $(ROOT_DIR)/pkg_out - mv $(ROOT_DIR)/libtiff.pkg packages - -libtiff-clean: - $(MAKE) -C $(LIBTIFF_DIR) clean - -#LDFLAGS=-L"$(PREFIX_DIR)"/lib -prebind -flat_namespace # -fcoalesce-templates - -libsigc: - #cd $(LIBSIGC_DIR) && ./configure $(CONFIG_FLAGS) LDFLAGS="$(LDFLAGS) -lstdc++ -lsupc++" "CC=g++ $(CFLAGS)" - cd $(LIBSIGC_DIR) && ./configure $(CONFIG_FLAGS) LDFLAGS="$(LDFLAGS) -lstdc++" "CC=g++ $(CFLAGS)" - cd $(LIBSIGC_DIR) && $(ENDIAN_FIX) - $(MAKE) -C $(LIBSIGC_DIR) - $(MAKE) -C $(LIBSIGC_DIR) install-strip - -libsigc-pkg: - $(RM) -r $(ROOT_DIR)/pkg_out - $(MAKE) -C $(LIBSIGC_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out - -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) - $(SED) "s/@PACKAGE@/libsigc/g;s/@VERSION@/$(LIBSIGC_VER)/;" < package.info > libsigc.info - $(PACKAGE) $(ROOT_DIR)/pkg_out libsigc.info -r PkgResource -bzip - $(RM) -r $(ROOT_DIR)/pkg_out - mv $(ROOT_DIR)/libsigc.pkg packages - -libsigc-clean: - $(MAKE) -C $(LIBSIGC_DIR) clean - - -glibmm: glibmm-$(GLIBMM_VER) - #cd $(GLIBMM_DIR) && ./configure $(CONFIG_FLAGS) "LDFLAGS=$(LDFLAGS) -L/usr/X11R6/lib -lXinerama -lstdc++ -lsupc++" "CC=g++ $(CFLAGS)" - cd $(GLIBMM_DIR) && ./configure $(CONFIG_FLAGS) "LDFLAGS=$(LDFLAGS) -L/usr/X11R6/lib -lXinerama -lstdc++" "CC=g++ $(CFLAGS)" - cd $(GLIBMM_DIR) && $(ENDIAN_FIX) - cd $(GLIBMM_DIR) && $(DESTDIR_FIX) - $(MAKE) -C $(GLIBMM_DIR) - $(MAKE) -C $(GLIBMM_DIR) install-strip - -glibmm-pkg: - $(RM) -r $(ROOT_DIR)/pkg_out - $(MAKE) -C $(GLIBMM_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out - -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) - $(SED) "s/@PACKAGE@/glibmm/g;s/@VERSION@/$(GLIBMM_VER)/;" < package.info > glibmm.info - $(PACKAGE) $(ROOT_DIR)/pkg_out glibmm.info -r PkgResource -bzip - $(RM) -r $(ROOT_DIR)/pkg_out - mv $(ROOT_DIR)/glibmm.pkg packages - -gibmm-clean: - $(MAKE) -C $(GLIBMM_DIR) clean - -glibmm-$(GLIBMM_VER): - $(CURL) $(GLIBMM_DL) -o glibmm-$(GLIBMM_VER).tar.gz - $(UNTARZ) glibmm-$(GLIBMM_VER).tar.gz - - -gtkmm: gtkmm-$(GTKMM_VER) - #cd $(GTKMM_DIR) && ./configure $(CONFIG_FLAGS) "LDFLAGS=$(LDFLAGS) -L/usr/X11R6/lib -lXinerama -lstdc++ -lsupc++" "CC=g++ $(CFLAGS)" --enable-examples=no --enable-demos=no --enable-docs=no - cd $(GTKMM_DIR) && ./configure $(CONFIG_FLAGS) "LDFLAGS=$(LDFLAGS) -L/usr/X11R6/lib -lXinerama -lstdc++" "CC=g++ $(CFLAGS)" - cd $(GTKMM_DIR) && $(DESTDIR_FIX) - $(MAKE) -C $(GTKMM_DIR) - $(MAKE) -C $(GTKMM_DIR) install-strip - -gtkmm-pkg: - $(RM) -r $(ROOT_DIR)/pkg_out - $(MAKE) -C $(GTKMM_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out - -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) - $(SED) "s/@PACKAGE@/gtkmm/g;s/@VERSION@/$(GTKMM_VER)/;" < package.info > gtkmm.info - $(PACKAGE) $(ROOT_DIR)/pkg_out gtkmm.info -r PkgResource -bzip - $(RM) -r $(ROOT_DIR)/pkg_out - mv $(ROOT_DIR)/gtkmm.pkg packages - -gtkmm-clean: - $(MAKE) -C $(GTKMM_DIR) clean - -gtkmm-$(GTKMM_VER): - $(CURL) $(GTKMM_DL) -o gtkmm-$(GTKMM_VER).tar.gz - $(UNTARZ) gtkmm-$(GTKMM_VER).tar.gz - - -libsigc2: libsigc++-$(LIBSIGC2_VER) - #cd $(LIBSIGC2_DIR) && ./configure $(CONFIG_FLAGS) LDFLAGS="$(LDFLAGS) -lstdc++ -lsupc++" "CC=g++ $(CFLAGS)" - cd $(LIBSIGC2_DIR) && ./configure $(CONFIG_FLAGS) LDFLAGS="$(LDFLAGS) -lstdc++" "CC=g++ $(CFLAGS)" - cd $(LIBSIGC2_DIR) && $(ENDIAN_FIX) - $(MAKE) -C $(LIBSIGC2_DIR) - $(MAKE) -C $(LIBSIGC2_DIR) install-strip - -libsigc2-pkg: - $(RM) -r $(ROOT_DIR)/pkg_out - $(MAKE) -C $(LIBSIGC2_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out - -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) - $(SED) "s/@PACKAGE@/libsigc2/g;s/@VERSION@/$(LIBSIGC2_VER)/;" < package.info > libsigc2.info - $(PACKAGE) $(ROOT_DIR)/pkg_out libsigc2.info -r PkgResource -bzip - $(RM) -r $(ROOT_DIR)/pkg_out - mv $(ROOT_DIR)/libsigc2.pkg packages - -libsigc2-clean: - $(MAKE) -C $(LIBSIGC2_DIR) clean - -libsigc++-$(LIBSIGC2_VER): - $(CURL) $(LIBSIGC2_DL) -o libsigc2-$(LIBSIGC2_VER).tar.gz - $(UNTARZ) libsigc2-$(LIBSIGC2_VER).tar.gz - -LDFLAGS=-L"$(PREFIX_DIR)"/lib -prebind -prebind_all_twolevel_modules -twolevel_namespace -bind_at_load -CONFIG_FLAGS=--prefix="$(PREFIX_DIR)" --disable-static --enable-shared "CC=$(CC)" "CXX=$(CXX)" "CXXCPP=$(CXXCPP)" "PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)" "LDFLAGS=$(LDFLAGS)" "MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET)" - -libxml2: - cd $(LIBXML2_DIR) && ./configure $(CONFIG_FLAGS) - cd $(LIBXML2_DIR) && $(ENDIAN_FIX) - cd $(LIBXML2_DIR) && $(DESTDIR_FIX) - $(MAKE) -C $(LIBXML2_DIR) - $(MAKE) -C $(LIBXML2_DIR) install-strip - -libxml2-pkg: - $(RM) -r $(ROOT_DIR)/pkg_out - $(MAKE) -C $(LIBXML2_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out - -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) - $(SED) "s/@PACKAGE@/libxml2/g;s/@VERSION@/$(LIBXML2_VER)/;" < package.info > libxml2.info - $(PACKAGE) $(ROOT_DIR)/pkg_out libxml2.info -r PkgResource -bzip - $(RM) -r $(ROOT_DIR)/pkg_out - mv $(ROOT_DIR)/libxml2.pkg packages - -libxml2-clean: - $(MAKE) -C $(LIBXML2_DIR) clean - - -fontconfig: - cd $(FONTCONFIG_DIR) && ./configure $(CONFIG_FLAGS) --disable-docs --without-docdir HASDOCBOOK=no - cd $(FONTCONFIG_DIR) && $(ENDIAN_FIX) - cd $(FONTCONFIG_DIR) && $(DESTDIR_FIX) - $(MAKE) -C $(FONTCONFIG_DIR) - $(MAKE) -C $(FONTCONFIG_DIR) install-strip - -fontconfig-pkg: - $(RM) -r $(ROOT_DIR)/pkg_out - $(MAKE) -C $(FONTCONFIG_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out - -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) - $(SED) "s/@PACKAGE@/fontconfig/g;s/@VERSION@/$(FONTCONFIG_VER)/;" < package.info > fontconfig.info - $(PACKAGE) $(ROOT_DIR)/pkg_out fontconfig.info -r PkgResource -bzip - $(RM) -r $(ROOT_DIR)/pkg_out - mv $(ROOT_DIR)/fontconfig.pkg packages - -fontconfig-clean: - $(MAKE) -C $(FONTCONFIG_DIR) clean - -LDFLAGS=-L"$(PREFIX_DIR)"/lib -prebind -prebind_all_twolevel_modules -twolevel_namespace -bind_at_load -CONFIG_FLAGS=--prefix="$(PREFIX_DIR)" --disable-static --enable-shared "CC=$(CC)" "CXX=$(CXX)" "CXXCPP=$(CXXCPP)" "PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)" "LDFLAGS=$(LDFLAGS)" "MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET)" - -libxmlpp: $(LIBXMLPP_DIR) - cd $(LIBXMLPP_DIR) && ./configure $(CONFIG_FLAGS) - cd $(LIBXMLPP_DIR) && $(ENDIAN_FIX) - cd $(LIBXMLPP_DIR) && $(DESTDIR_FIX) - $(MAKE) -C $(LIBXMLPP_DIR) - $(MAKE) -C $(LIBXMLPP_DIR) install-strip - -libxmlpp-pkg: - $(RM) -r $(ROOT_DIR)/pkg_out - $(MAKE) -C $(LIBXMLPP_DIR) install-strip prefix=$(ROOT_DIR)/pkg_out - -cd $(ROOT_DIR)/pkg_out && $(PACKAGE_PREP) - $(SED) "s/@PACKAGE@/libxmlpp/g;s/@VERSION@/$(LIBXMLPP_VER)/;" < package.info > libxmlpp.info - $(PACKAGE) $(ROOT_DIR)/pkg_out libxmlpp.info -r PkgResource -bzip - $(RM) -r $(ROOT_DIR)/pkg_out - mv $(ROOT_DIR)/libxmlpp.pkg packages - -libxmlpp-clean: - $(MAKE) -C $(LIBXMLPP_DIR) clean - -$(LIBXMLPP_DIR): - $(CURL) $(LIBXMLPP_DL) -o libxmlpp-$(LIBXMLPP_VER).tar.gz - $(UNTARZ) libxmlpp-$(LIBXMLPP_VER).tar.gz - -.PHONY: package diff --git a/gtkmm-osx/trunk/Packages b/gtkmm-osx/trunk/Packages deleted file mode 120000 index b592020..0000000 --- a/gtkmm-osx/trunk/Packages +++ /dev/null @@ -1 +0,0 @@ -gtkmm-meta.mpkg/Contents/Packages \ No newline at end of file diff --git a/gtkmm-osx/trunk/PkgResource/License.txt b/gtkmm-osx/trunk/PkgResource/License.txt deleted file mode 100644 index d60c31a..0000000 --- a/gtkmm-osx/trunk/PkgResource/License.txt +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/gtkmm-osx/trunk/PkgResource/ReadMe.txt b/gtkmm-osx/trunk/PkgResource/ReadMe.txt deleted file mode 100644 index 737ac3a..0000000 --- a/gtkmm-osx/trunk/PkgResource/ReadMe.txt +++ /dev/null @@ -1,3 +0,0 @@ -This package was created for use with Synfig Studio, but you should be able to use it with other programs as well. - -Everything in here was created with the stock distributions without any modifications to the source code. You can find/download the source to all of the included packages by searching around on freshmeat.net. diff --git a/gtkmm-osx/trunk/PkgResource/postflight b/gtkmm-osx/trunk/PkgResource/postflight deleted file mode 100755 index 00a0936..0000000 --- a/gtkmm-osx/trunk/PkgResource/postflight +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -echo Start of post_install script. - - -PREFIX=$2 - -LIST_FILE=$PREFIX/bin/uninstall_gtk_list.txt -TEMP_FILE=tempfile.xxx - -echo ARG1=$1 -echo ARG2=$2 -echo ARG3=$3 -echo ARG4=$4 -echo RESOURCE_DIR=$RESOURCE_DIR -echo PREFIX=$PREFIX -echo LIST_FILE=$LIST_FILE -echo TEMP_FILE=$TEMP_FILE -sleep 1 - -#[ -e $LIST_FILE ] || { echo Unable to find $LIST_FILE ; sleep 1; exit 1; } -cd $PREFIX -for filename in `find . | grep -e "\.la" -e "\.pc" -e -config -e "\.loaders" -e "\.immodules"` ; do { - grep -l @PREFIX@ $filename && sed " -s;@PREFIX@;$PREFIX;g; -" < $filename > $TEMP_FILE && - cp $TEMP_FILE $filename && echo $filename; -} ; done - -rm $TEMP_FILE - -mkdir -p $PREFIX/etc/pango -[ -e $PREFIX/bin/pango-querymodules ] && $PREFIX/bin/pango-querymodules > $PREFIX/etc/pango/pango.modules - -echo "Done with shell script" - -exit 0 - - - diff --git a/gtkmm-osx/trunk/gtkmm-meta.mpkg/Contents/Info.plist b/gtkmm-osx/trunk/gtkmm-meta.mpkg/Contents/Info.plist deleted file mode 100644 index 6b562fe..0000000 --- a/gtkmm-osx/trunk/gtkmm-meta.mpkg/Contents/Info.plist +++ /dev/null @@ -1,89 +0,0 @@ - - - - - IFPkgFlagBackgroundAlignment - left - IFPkgFlagBackgroundScaling - none - IFPkgFlagComponentDirectory - ./Contents/Packages - IFPkgFlagPackageList - - - IFPkgFlagPackageLocation - gettext.pkg - IFPkgFlagPackageSelection - selected - - - IFPkgFlagPackageLocation - libpng.pkg - IFPkgFlagPackageSelection - selected - - - IFPkgFlagPackageLocation - libjpeg.pkg - IFPkgFlagPackageSelection - selected - - - IFPkgFlagPackageLocation - glib.pkg - IFPkgFlagPackageSelection - selected - - - IFPkgFlagPackageLocation - pango.pkg - IFPkgFlagPackageSelection - selected - - - IFPkgFlagPackageLocation - atk.pkg - IFPkgFlagPackageSelection - selected - - - IFPkgFlagPackageLocation - gtk.pkg - IFPkgFlagPackageSelection - selected - - - IFPkgFlagPackageLocation - libsigc2.pkg - IFPkgFlagPackageSelection - selected - - - IFPkgFlagPackageLocation - glibmm.pkg - IFPkgFlagPackageSelection - selected - - - IFPkgFlagPackageLocation - gtkmm.pkg - IFPkgFlagPackageSelection - selected - - - IFPkgFlagPackageLocation - libxml2.pkg - IFPkgFlagPackageSelection - selected - - - IFPkgFlagPackageLocation - libxmlpp.pkg - IFPkgFlagPackageSelection - selected - - - IFPkgFormatVersion - 0.10000000149011612 - - diff --git a/gtkmm-osx/trunk/gtkmm-meta.mpkg/Contents/PkgInfo b/gtkmm-osx/trunk/gtkmm-meta.mpkg/Contents/PkgInfo deleted file mode 100644 index 4cd3119..0000000 --- a/gtkmm-osx/trunk/gtkmm-meta.mpkg/Contents/PkgInfo +++ /dev/null @@ -1 +0,0 @@ -pmkrpkg1 \ No newline at end of file diff --git a/gtkmm-osx/trunk/gtkmm-meta.mpkg/Contents/Resources/English.lproj/Description.plist b/gtkmm-osx/trunk/gtkmm-meta.mpkg/Contents/Resources/English.lproj/Description.plist deleted file mode 100644 index 7dbd0f8..0000000 --- a/gtkmm-osx/trunk/gtkmm-meta.mpkg/Contents/Resources/English.lproj/Description.plist +++ /dev/null @@ -1,10 +0,0 @@ - - - - - IFPkgDescriptionDescription - - IFPkgDescriptionTitle - GTKMM 2.4.7 - - diff --git a/gtkmm-osx/trunk/gtkmm-meta.mpkg/Contents/Resources/English.lproj/background.tif b/gtkmm-osx/trunk/gtkmm-meta.mpkg/Contents/Resources/English.lproj/background.tif deleted file mode 100755 index 43cf472c2a0e3217f612575200030ad84e79e280..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 40132 zcmeFZ3p|ut_c*?vxf|C(u7h#EUkcjFqFkx+yvkqS`?l~h8iA)%-! zNu?U4q9lsa1^;JsKkqr`eb4*-e&5gc|NWh(=9#tEUVH7e)?Uxr`&oN7dwZY+0KfqO zFb7aD1i>HH4Y}}@1H;f)I17dm3ouLv2|&oNcr;wXe1#D(O!&sfZ3bHO6~EBpE6m~} z_>IP5KO_QR4y-OAaY*z#EC&(4(z9w5e&VkI;9h_jj8%m+7hrxEwu6j*qH+4s7SYV& zEwBit@l3O2!CD3Y2*#ubev@HeVR{t60>EJd!17v{H_IMh{^38<0FdVaU%yR#!n}M* zjsaoRu&98raFV$*$)4gJ7|JRFpsB8|ZJ?oHprJ?7&^FN0Fj%4w3{B#~Dc&1>sU$C7 z|G-cq`Pb(z%98?pjO5+4?bYqW&3yv`Z4x4Vof8~fyc0Hh>-)%?7~>7&4B|qD3ubY5*j59_qHHLp!@e`p;4*}5~+HJg{TF(t7)jJtHB-NNef+B_(pk028L4u z!$L`{t|?w&(NrV(=;%Nn10QuQbxmzQ4Ha#DA1@UR4Ihe%p6?QU6@7}YkA{!8zAi;m zM;=f5+GY4pqW;n+Tmg5wgw-j@P>t2ePo4fx2=Z;zf8PY*->Sb^fjx(?cjG~4` z#v2=|{Uh!_BR)0I@5h+`Vn|laccK3imW-o>|Go|3itmDu4B?W2d899e>T3aij9E_? z>@6x9dM@9dE){h>19f#nwck*}zO&HSKFlZ3FaBR?{1fH(#_&_-L!nasrRG1=eq*p8 zdRU|j{A3#cS={(Z{IAsi8Ha$4W^e!J;}8Fa_`gng=Hat2qcp>2Vc&qsa`?7S3f*nuetF}Jg27Y0Y zArz`{U?67^?li{=U3lo*X#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{5nep{lF};{XMR%_4?RDa#di-EQz!r1cH#WI7_nO|btN(mJMwE0rm}*&SImu-M(m?Y>u?92McR0AwjDq!L9I6v9TV_ zIN@TYdQUzqqt=L-I7sqYt8Q$2VW8TJH2yFFDFdsqvT1dt@>pfYsoY)VLnkymO&Y#U zJHw2>1mxHeRV%zK)WEZ=hu>!QDOxr)g; zfct6 wrote the original ansi2knr and -continues to maintain the current version; most of the code in the current -version is his work. ansi2knr also includes contributions by Francois -Pinard and Jim Avera . diff --git a/gtkmm-osx/trunk/jpeg-6b/ansi2knr.c b/gtkmm-osx/trunk/jpeg-6b/ansi2knr.c deleted file mode 100644 index 4e05fc2..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/ansi2knr.c +++ /dev/null @@ -1,693 +0,0 @@ -/* ansi2knr.c */ -/* Convert ANSI C function definitions to K&R ("traditional C") syntax */ - -/* -ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY. No author or distributor accepts responsibility to anyone for the -consequences of using it or for whether it serves any particular purpose or -works at all, unless he says so in writing. Refer to the GNU General Public -License (the "GPL") for full details. - -Everyone is granted permission to copy, modify and redistribute ansi2knr, -but only under the conditions described in the GPL. A copy of this license -is supposed to have been given to you along with ansi2knr so you can know -your rights and responsibilities. It should be in a file named COPYLEFT. -[In the IJG distribution, the GPL appears below, not in a separate file.] -Among other things, the copyright notice and this notice must be preserved -on all copies. - -We explicitly state here what we believe is already implied by the GPL: if -the ansi2knr program is distributed as a separate set of sources and a -separate executable file which are aggregated on a storage medium together -with another program, this in itself does not bring the other program under -the GPL, nor does the mere fact that such a program or the procedures for -constructing it invoke the ansi2knr executable bring any other part of the -program under the GPL. -*/ - -/* ----------- Here is the GNU GPL file COPYLEFT, referred to above ---------- ------ These terms do NOT apply to the JPEG software itself; see README ------ - - GHOSTSCRIPT GENERAL PUBLIC LICENSE - (Clarified 11 Feb 1988) - - Copyright (C) 1988 Richard M. Stallman - Everyone is permitted to copy and distribute verbatim copies of this - license, but changing it is not allowed. You can also use this wording - to make the terms for other programs. - - The license agreements of most software companies keep you at the -mercy of those companies. By contrast, our general public license is -intended to give everyone the right to share Ghostscript. To make sure -that you get the rights we want you to have, we need to make -restrictions that forbid anyone to deny you these rights or to ask you -to surrender the rights. Hence this license agreement. - - Specifically, we want to make sure that you have the right to give -away copies of Ghostscript, that you receive source code or else can get -it if you want it, that you can change Ghostscript or use pieces of it -in new free programs, and that you know you can do these things. - - To make sure that everyone has such rights, we have to forbid you to -deprive anyone else of these rights. For example, if you distribute -copies of Ghostscript, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must tell them their rights. - - Also, for our own protection, we must make certain that everyone finds -out that there is no warranty for Ghostscript. If Ghostscript is -modified by someone else and passed on, we want its recipients to know -that what they have is not what we distributed, so that any problems -introduced by others will not reflect on our reputation. - - Therefore we (Richard M. Stallman and the Free Software Foundation, -Inc.) make the following terms which say what you must do to be allowed -to distribute or change Ghostscript. - - - COPYING POLICIES - - 1. You may copy and distribute verbatim copies of Ghostscript source -code as you receive it, in any medium, provided that you conspicuously -and appropriately publish on each copy a valid copyright and license -notice "Copyright (C) 1989 Aladdin Enterprises. All rights reserved. -Distributed by Free Software Foundation, Inc." (or with whatever year is -appropriate); keep intact the notices on all files that refer to this -License Agreement and to the absence of any warranty; and give any other -recipients of the Ghostscript program a copy of this License Agreement -along with the program. You may charge a distribution fee for the -physical act of transferring a copy. - - 2. You may modify your copy or copies of Ghostscript or any portion of -it, and copy and distribute such modifications under the terms of -Paragraph 1 above, provided that you also do the following: - - a) cause the modified files to carry prominent notices stating - that you changed the files and the date of any change; and - - b) cause the whole of any work that you distribute or publish, - that in whole or in part contains or is a derivative of Ghostscript - or any part thereof, to be licensed at no charge to all third - parties on terms identical to those contained in this License - Agreement (except that you may choose to grant more extensive - warranty protection to some or all third parties, at your option). - - c) You may charge a distribution fee for the physical act of - transferring a copy, and you may at your option offer warranty - protection in exchange for a fee. - -Mere aggregation of another unrelated program with this program (or its -derivative) on a volume of a storage or distribution medium does not bring -the other program under the scope of these terms. - - 3. You may copy and distribute Ghostscript (or a portion or derivative -of it, under Paragraph 2) in object code or executable form under the -terms of Paragraphs 1 and 2 above provided that you also do one of the -following: - - a) accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of - Paragraphs 1 and 2 above; or, - - b) accompany it with a written offer, valid for at least three - years, to give any third party free (except for a nominal - shipping charge) a complete machine-readable copy of the - corresponding source code, to be distributed under the terms of - Paragraphs 1 and 2 above; or, - - c) accompany it with the information you received as to where the - corresponding source code may be obtained. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form alone.) - -For an executable file, complete source code means all the source code for -all modules it contains; but, as a special exception, it need not include -source code for modules which are standard libraries that accompany the -operating system on which the executable file runs. - - 4. You may not copy, sublicense, distribute or transfer Ghostscript -except as expressly provided under this License Agreement. Any attempt -otherwise to copy, sublicense, distribute or transfer Ghostscript is -void and your rights to use the program under this License agreement -shall be automatically terminated. However, parties who have received -computer software programs from you with this License Agreement will not -have their licenses terminated so long as such parties remain in full -compliance. - - 5. If you wish to incorporate parts of Ghostscript into other free -programs whose distribution conditions are different, write to the Free -Software Foundation at 675 Mass Ave, Cambridge, MA 02139. We have not -yet worked out a simple rule that can be stated here, but we will often -permit this. We will be guided by the two goals of preserving the free -status of all derivatives of our free software and of promoting the -sharing and reuse of software. - -Your comments and suggestions about our licensing policies and our -software are welcome! Please contact the Free Software Foundation, -Inc., 675 Mass Ave, Cambridge, MA 02139, or call (617) 876-3296. - - NO WARRANTY - - BECAUSE GHOSTSCRIPT IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY -NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT -WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC, RICHARD -M. STALLMAN, ALADDIN ENTERPRISES, L. PETER DEUTSCH, AND/OR OTHER PARTIES -PROVIDE GHOSTSCRIPT "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE -ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF GHOSTSCRIPT IS WITH -YOU. SHOULD GHOSTSCRIPT PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL -NECESSARY SERVICING, REPAIR OR CORRECTION. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M. -STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., L. PETER DEUTSCH, ALADDIN -ENTERPRISES, AND/OR ANY OTHER PARTY WHO MAY MODIFY AND REDISTRIBUTE -GHOSTSCRIPT AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING -ANY LOST PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE -(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED -INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A FAILURE OF THE -PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) GHOSTSCRIPT, EVEN IF YOU -HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM -BY ANY OTHER PARTY. - --------------------- End of file COPYLEFT ------------------------------ -*/ - -/* - * Usage: - ansi2knr input_file [output_file] - * If no output_file is supplied, output goes to stdout. - * There are no error messages. - * - * ansi2knr recognizes function definitions by seeing a non-keyword - * identifier at the left margin, followed by a left parenthesis, - * with a right parenthesis as the last character on the line, - * and with a left brace as the first token on the following line - * (ignoring possible intervening comments). - * It will recognize a multi-line header provided that no intervening - * line ends with a left or right brace or a semicolon. - * These algorithms ignore whitespace and comments, except that - * the function name must be the first thing on the line. - * The following constructs will confuse it: - * - Any other construct that starts at the left margin and - * follows the above syntax (such as a macro or function call). - * - Some macros that tinker with the syntax of the function header. - */ - -/* - * The original and principal author of ansi2knr is L. Peter Deutsch - * . Other authors are noted in the change history - * that follows (in reverse chronological order): - lpd 96-01-21 added code to cope with not HAVE_CONFIG_H and with - compilers that don't understand void, as suggested by - Tom Lane - lpd 96-01-15 changed to require that the first non-comment token - on the line following a function header be a left brace, - to reduce sensitivity to macros, as suggested by Tom Lane - - lpd 95-06-22 removed #ifndefs whose sole purpose was to define - undefined preprocessor symbols as 0; changed all #ifdefs - for configuration symbols to #ifs - lpd 95-04-05 changed copyright notice to make it clear that - including ansi2knr in a program does not bring the entire - program under the GPL - lpd 94-12-18 added conditionals for systems where ctype macros - don't handle 8-bit characters properly, suggested by - Francois Pinard ; - removed --varargs switch (this is now the default) - lpd 94-10-10 removed CONFIG_BROKETS conditional - lpd 94-07-16 added some conditionals to help GNU `configure', - suggested by Francois Pinard ; - properly erase prototype args in function parameters, - contributed by Jim Avera ; - correct error in writeblanks (it shouldn't erase EOLs) - lpd 89-xx-xx original version - */ - -/* Most of the conditionals here are to make ansi2knr work with */ -/* or without the GNU configure machinery. */ - -#if HAVE_CONFIG_H -# include -#endif - -#include -#include - -#if HAVE_CONFIG_H - -/* - For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h). - This will define HAVE_CONFIG_H and so, activate the following lines. - */ - -# if STDC_HEADERS || HAVE_STRING_H -# include -# else -# include -# endif - -#else /* not HAVE_CONFIG_H */ - -/* Otherwise do it the hard way */ - -# ifdef BSD -# include -# else -# ifdef VMS - extern int strlen(), strncmp(); -# else -# include -# endif -# endif - -#endif /* not HAVE_CONFIG_H */ - -#if STDC_HEADERS -# include -#else -/* - malloc and free should be declared in stdlib.h, - but if you've got a K&R compiler, they probably aren't. - */ -# ifdef MSDOS -# include -# else -# ifdef VMS - extern char *malloc(); - extern void free(); -# else - extern char *malloc(); - extern int free(); -# endif -# endif - -#endif - -/* - * The ctype macros don't always handle 8-bit characters correctly. - * Compensate for this here. - */ -#ifdef isascii -# undef HAVE_ISASCII /* just in case */ -# define HAVE_ISASCII 1 -#else -#endif -#if STDC_HEADERS || !HAVE_ISASCII -# define is_ascii(c) 1 -#else -# define is_ascii(c) isascii(c) -#endif - -#define is_space(c) (is_ascii(c) && isspace(c)) -#define is_alpha(c) (is_ascii(c) && isalpha(c)) -#define is_alnum(c) (is_ascii(c) && isalnum(c)) - -/* Scanning macros */ -#define isidchar(ch) (is_alnum(ch) || (ch) == '_') -#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_') - -/* Forward references */ -char *skipspace(); -int writeblanks(); -int test1(); -int convert1(); - -/* The main program */ -int -main(argc, argv) - int argc; - char *argv[]; -{ FILE *in, *out; -#define bufsize 5000 /* arbitrary size */ - char *buf; - char *line; - char *more; - /* - * In previous versions, ansi2knr recognized a --varargs switch. - * If this switch was supplied, ansi2knr would attempt to convert - * a ... argument to va_alist and va_dcl; if this switch was not - * supplied, ansi2knr would simply drop any such arguments. - * Now, ansi2knr always does this conversion, and we only - * check for this switch for backward compatibility. - */ - int convert_varargs = 1; - - if ( argc > 1 && argv[1][0] == '-' ) - { if ( !strcmp(argv[1], "--varargs") ) - { convert_varargs = 1; - argc--; - argv++; - } - else - { fprintf(stderr, "Unrecognized switch: %s\n", argv[1]); - exit(1); - } - } - switch ( argc ) - { - default: - printf("Usage: ansi2knr input_file [output_file]\n"); - exit(0); - case 2: - out = stdout; - break; - case 3: - out = fopen(argv[2], "w"); - if ( out == NULL ) - { fprintf(stderr, "Cannot open output file %s\n", argv[2]); - exit(1); - } - } - in = fopen(argv[1], "r"); - if ( in == NULL ) - { fprintf(stderr, "Cannot open input file %s\n", argv[1]); - exit(1); - } - fprintf(out, "#line 1 \"%s\"\n", argv[1]); - buf = malloc(bufsize); - line = buf; - while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL ) - { -test: line += strlen(line); - switch ( test1(buf) ) - { - case 2: /* a function header */ - convert1(buf, out, 1, convert_varargs); - break; - case 1: /* a function */ - /* Check for a { at the start of the next line. */ - more = ++line; -f: if ( line >= buf + (bufsize - 1) ) /* overflow check */ - goto wl; - if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL ) - goto wl; - switch ( *skipspace(more, 1) ) - { - case '{': - /* Definitely a function header. */ - convert1(buf, out, 0, convert_varargs); - fputs(more, out); - break; - case 0: - /* The next line was blank or a comment: */ - /* keep scanning for a non-comment. */ - line += strlen(line); - goto f; - default: - /* buf isn't a function header, but */ - /* more might be. */ - fputs(buf, out); - strcpy(buf, more); - line = buf; - goto test; - } - break; - case -1: /* maybe the start of a function */ - if ( line != buf + (bufsize - 1) ) /* overflow check */ - continue; - /* falls through */ - default: /* not a function */ -wl: fputs(buf, out); - break; - } - line = buf; - } - if ( line != buf ) - fputs(buf, out); - free(buf); - fclose(out); - fclose(in); - return 0; -} - -/* Skip over space and comments, in either direction. */ -char * -skipspace(p, dir) - register char *p; - register int dir; /* 1 for forward, -1 for backward */ -{ for ( ; ; ) - { while ( is_space(*p) ) - p += dir; - if ( !(*p == '/' && p[dir] == '*') ) - break; - p += dir; p += dir; - while ( !(*p == '*' && p[dir] == '/') ) - { if ( *p == 0 ) - return p; /* multi-line comment?? */ - p += dir; - } - p += dir; p += dir; - } - return p; -} - -/* - * Write blanks over part of a string. - * Don't overwrite end-of-line characters. - */ -int -writeblanks(start, end) - char *start; - char *end; -{ char *p; - for ( p = start; p < end; p++ ) - if ( *p != '\r' && *p != '\n' ) - *p = ' '; - return 0; -} - -/* - * Test whether the string in buf is a function definition. - * The string may contain and/or end with a newline. - * Return as follows: - * 0 - definitely not a function definition; - * 1 - definitely a function definition; - * 2 - definitely a function prototype (NOT USED); - * -1 - may be the beginning of a function definition, - * append another line and look again. - * The reason we don't attempt to convert function prototypes is that - * Ghostscript's declaration-generating macros look too much like - * prototypes, and confuse the algorithms. - */ -int -test1(buf) - char *buf; -{ register char *p = buf; - char *bend; - char *endfn; - int contin; - - if ( !isidfirstchar(*p) ) - return 0; /* no name at left margin */ - bend = skipspace(buf + strlen(buf) - 1, -1); - switch ( *bend ) - { - case ';': contin = 0 /*2*/; break; - case ')': contin = 1; break; - case '{': return 0; /* not a function */ - case '}': return 0; /* not a function */ - default: contin = -1; - } - while ( isidchar(*p) ) - p++; - endfn = p; - p = skipspace(p, 1); - if ( *p++ != '(' ) - return 0; /* not a function */ - p = skipspace(p, 1); - if ( *p == ')' ) - return 0; /* no parameters */ - /* Check that the apparent function name isn't a keyword. */ - /* We only need to check for keywords that could be followed */ - /* by a left parenthesis (which, unfortunately, is most of them). */ - { static char *words[] = - { "asm", "auto", "case", "char", "const", "double", - "extern", "float", "for", "if", "int", "long", - "register", "return", "short", "signed", "sizeof", - "static", "switch", "typedef", "unsigned", - "void", "volatile", "while", 0 - }; - char **key = words; - char *kp; - int len = endfn - buf; - - while ( (kp = *key) != 0 ) - { if ( strlen(kp) == len && !strncmp(kp, buf, len) ) - return 0; /* name is a keyword */ - key++; - } - } - return contin; -} - -/* Convert a recognized function definition or header to K&R syntax. */ -int -convert1(buf, out, header, convert_varargs) - char *buf; - FILE *out; - int header; /* Boolean */ - int convert_varargs; /* Boolean */ -{ char *endfn; - register char *p; - char **breaks; - unsigned num_breaks = 2; /* for testing */ - char **btop; - char **bp; - char **ap; - char *vararg = 0; - - /* Pre-ANSI implementations don't agree on whether strchr */ - /* is called strchr or index, so we open-code it here. */ - for ( endfn = buf; *(endfn++) != '('; ) - ; -top: p = endfn; - breaks = (char **)malloc(sizeof(char *) * num_breaks * 2); - if ( breaks == 0 ) - { /* Couldn't allocate break table, give up */ - fprintf(stderr, "Unable to allocate break table!\n"); - fputs(buf, out); - return -1; - } - btop = breaks + num_breaks * 2 - 2; - bp = breaks; - /* Parse the argument list */ - do - { int level = 0; - char *lp = NULL; - char *rp; - char *end = NULL; - - if ( bp >= btop ) - { /* Filled up break table. */ - /* Allocate a bigger one and start over. */ - free((char *)breaks); - num_breaks <<= 1; - goto top; - } - *bp++ = p; - /* Find the end of the argument */ - for ( ; end == NULL; p++ ) - { switch(*p) - { - case ',': - if ( !level ) end = p; - break; - case '(': - if ( !level ) lp = p; - level++; - break; - case ')': - if ( --level < 0 ) end = p; - else rp = p; - break; - case '/': - p = skipspace(p, 1) - 1; - break; - default: - ; - } - } - /* Erase any embedded prototype parameters. */ - if ( lp ) - writeblanks(lp + 1, rp); - p--; /* back up over terminator */ - /* Find the name being declared. */ - /* This is complicated because of procedure and */ - /* array modifiers. */ - for ( ; ; ) - { p = skipspace(p - 1, -1); - switch ( *p ) - { - case ']': /* skip array dimension(s) */ - case ')': /* skip procedure args OR name */ - { int level = 1; - while ( level ) - switch ( *--p ) - { - case ']': case ')': level++; break; - case '[': case '(': level--; break; - case '/': p = skipspace(p, -1) + 1; break; - default: ; - } - } - if ( *p == '(' && *skipspace(p + 1, 1) == '*' ) - { /* We found the name being declared */ - while ( !isidfirstchar(*p) ) - p = skipspace(p, 1) + 1; - goto found; - } - break; - default: - goto found; - } - } -found: if ( *p == '.' && p[-1] == '.' && p[-2] == '.' ) - { if ( convert_varargs ) - { *bp++ = "va_alist"; - vararg = p-2; - } - else - { p++; - if ( bp == breaks + 1 ) /* sole argument */ - writeblanks(breaks[0], p); - else - writeblanks(bp[-1] - 1, p); - bp--; - } - } - else - { while ( isidchar(*p) ) p--; - *bp++ = p+1; - } - p = end; - } - while ( *p++ == ',' ); - *bp = p; - /* Make a special check for 'void' arglist */ - if ( bp == breaks+2 ) - { p = skipspace(breaks[0], 1); - if ( !strncmp(p, "void", 4) ) - { p = skipspace(p+4, 1); - if ( p == breaks[2] - 1 ) - { bp = breaks; /* yup, pretend arglist is empty */ - writeblanks(breaks[0], p + 1); - } - } - } - /* Put out the function name and left parenthesis. */ - p = buf; - while ( p != endfn ) putc(*p, out), p++; - /* Put out the declaration. */ - if ( header ) - { fputs(");", out); - for ( p = breaks[0]; *p; p++ ) - if ( *p == '\r' || *p == '\n' ) - putc(*p, out); - } - else - { for ( ap = breaks+1; ap < bp; ap += 2 ) - { p = *ap; - while ( isidchar(*p) ) - putc(*p, out), p++; - if ( ap < bp - 1 ) - fputs(", ", out); - } - fputs(") ", out); - /* Put out the argument declarations */ - for ( ap = breaks+2; ap <= bp; ap += 2 ) - (*ap)[-1] = ';'; - if ( vararg != 0 ) - { *vararg = 0; - fputs(breaks[0], out); /* any prior args */ - fputs("va_dcl", out); /* the final arg */ - fputs(bp[0], out); - } - else - fputs(breaks[0], out); - } - free((char *)breaks); - return 0; -} diff --git a/gtkmm-osx/trunk/jpeg-6b/cderror.h b/gtkmm-osx/trunk/jpeg-6b/cderror.h deleted file mode 100644 index 70435e1..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/cderror.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * cderror.h - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file defines the error and message codes for the cjpeg/djpeg - * applications. These strings are not needed as part of the JPEG library - * proper. - * Edit this file to add new codes, or to translate the message strings to - * some other language. - */ - -/* - * To define the enum list of message codes, include this file without - * defining macro JMESSAGE. To create a message string table, include it - * again with a suitable JMESSAGE definition (see jerror.c for an example). - */ -#ifndef JMESSAGE -#ifndef CDERROR_H -#define CDERROR_H -/* First time through, define the enum list */ -#define JMAKE_ENUM_LIST -#else -/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ -#define JMESSAGE(code,string) -#endif /* CDERROR_H */ -#endif /* JMESSAGE */ - -#ifdef JMAKE_ENUM_LIST - -typedef enum { - -#define JMESSAGE(code,string) code , - -#endif /* JMAKE_ENUM_LIST */ - -JMESSAGE(JMSG_FIRSTADDONCODE=1000, NULL) /* Must be first entry! */ - -#ifdef BMP_SUPPORTED -JMESSAGE(JERR_BMP_BADCMAP, "Unsupported BMP colormap format") -JMESSAGE(JERR_BMP_BADDEPTH, "Only 8- and 24-bit BMP files are supported") -JMESSAGE(JERR_BMP_BADHEADER, "Invalid BMP file: bad header length") -JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1") -JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB") -JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported") -JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM") -JMESSAGE(JTRC_BMP, "%ux%u 24-bit BMP image") -JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image") -JMESSAGE(JTRC_BMP_OS2, "%ux%u 24-bit OS2 BMP image") -JMESSAGE(JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image") -#endif /* BMP_SUPPORTED */ - -#ifdef GIF_SUPPORTED -JMESSAGE(JERR_GIF_BUG, "GIF output got confused") -JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d") -JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB") -JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file") -JMESSAGE(JERR_GIF_NOT, "Not a GIF file") -JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image") -JMESSAGE(JTRC_GIF_BADVERSION, - "Warning: unexpected GIF version number '%c%c%c'") -JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x") -JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input") -JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file") -JMESSAGE(JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring") -JMESSAGE(JWRN_GIF_ENDCODE, "Premature end of GIF image") -JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits") -#endif /* GIF_SUPPORTED */ - -#ifdef PPM_SUPPORTED -JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB") -JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file") -JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM file") -JMESSAGE(JTRC_PGM, "%ux%u PGM image") -JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image") -JMESSAGE(JTRC_PPM, "%ux%u PPM image") -JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image") -#endif /* PPM_SUPPORTED */ - -#ifdef RLE_SUPPORTED -JMESSAGE(JERR_RLE_BADERROR, "Bogus error code from RLE library") -JMESSAGE(JERR_RLE_COLORSPACE, "RLE output must be grayscale or RGB") -JMESSAGE(JERR_RLE_DIMENSIONS, "Image dimensions (%ux%u) too large for RLE") -JMESSAGE(JERR_RLE_EMPTY, "Empty RLE file") -JMESSAGE(JERR_RLE_EOF, "Premature EOF in RLE header") -JMESSAGE(JERR_RLE_MEM, "Insufficient memory for RLE header") -JMESSAGE(JERR_RLE_NOT, "Not an RLE file") -JMESSAGE(JERR_RLE_TOOMANYCHANNELS, "Cannot handle %d output channels for RLE") -JMESSAGE(JERR_RLE_UNSUPPORTED, "Cannot handle this RLE setup") -JMESSAGE(JTRC_RLE, "%ux%u full-color RLE file") -JMESSAGE(JTRC_RLE_FULLMAP, "%ux%u full-color RLE file with map of length %d") -JMESSAGE(JTRC_RLE_GRAY, "%ux%u grayscale RLE file") -JMESSAGE(JTRC_RLE_MAPGRAY, "%ux%u grayscale RLE file with map of length %d") -JMESSAGE(JTRC_RLE_MAPPED, "%ux%u colormapped RLE file with map of length %d") -#endif /* RLE_SUPPORTED */ - -#ifdef TARGA_SUPPORTED -JMESSAGE(JERR_TGA_BADCMAP, "Unsupported Targa colormap format") -JMESSAGE(JERR_TGA_BADPARMS, "Invalid or unsupported Targa file") -JMESSAGE(JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB") -JMESSAGE(JTRC_TGA, "%ux%u RGB Targa image") -JMESSAGE(JTRC_TGA_GRAY, "%ux%u grayscale Targa image") -JMESSAGE(JTRC_TGA_MAPPED, "%ux%u colormapped Targa image") -#else -JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled") -#endif /* TARGA_SUPPORTED */ - -JMESSAGE(JERR_BAD_CMAP_FILE, - "Color map file is invalid or of unsupported format") -JMESSAGE(JERR_TOO_MANY_COLORS, - "Output file format cannot handle %d colormap entries") -JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed") -#ifdef TARGA_SUPPORTED -JMESSAGE(JERR_UNKNOWN_FORMAT, - "Unrecognized input file format --- perhaps you need -targa") -#else -JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format") -#endif -JMESSAGE(JERR_UNSUPPORTED_FORMAT, "Unsupported output file format") - -#ifdef JMAKE_ENUM_LIST - - JMSG_LASTADDONCODE -} ADDON_MESSAGE_CODE; - -#undef JMAKE_ENUM_LIST -#endif /* JMAKE_ENUM_LIST */ - -/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ -#undef JMESSAGE diff --git a/gtkmm-osx/trunk/jpeg-6b/cdjpeg.c b/gtkmm-osx/trunk/jpeg-6b/cdjpeg.c deleted file mode 100644 index b6250ff..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/cdjpeg.c +++ /dev/null @@ -1,181 +0,0 @@ -/* - * cdjpeg.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains common support routines used by the IJG application - * programs (cjpeg, djpeg, jpegtran). - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ -#include /* to declare isupper(), tolower() */ -#ifdef NEED_SIGNAL_CATCHER -#include /* to declare signal() */ -#endif -#ifdef USE_SETMODE -#include /* to declare setmode()'s parameter macros */ -/* If you have setmode() but not , just delete this line: */ -#include /* to declare setmode() */ -#endif - - -/* - * Signal catcher to ensure that temporary files are removed before aborting. - * NB: for Amiga Manx C this is actually a global routine named _abort(); - * we put "#define signal_catcher _abort" in jconfig.h. Talk about bogus... - */ - -#ifdef NEED_SIGNAL_CATCHER - -static j_common_ptr sig_cinfo; - -void /* must be global for Manx C */ -signal_catcher (int signum) -{ - if (sig_cinfo != NULL) { - if (sig_cinfo->err != NULL) /* turn off trace output */ - sig_cinfo->err->trace_level = 0; - jpeg_destroy(sig_cinfo); /* clean up memory allocation & temp files */ - } - exit(EXIT_FAILURE); -} - - -GLOBAL(void) -enable_signal_catcher (j_common_ptr cinfo) -{ - sig_cinfo = cinfo; -#ifdef SIGINT /* not all systems have SIGINT */ - signal(SIGINT, signal_catcher); -#endif -#ifdef SIGTERM /* not all systems have SIGTERM */ - signal(SIGTERM, signal_catcher); -#endif -} - -#endif - - -/* - * Optional progress monitor: display a percent-done figure on stderr. - */ - -#ifdef PROGRESS_REPORT - -METHODDEF(void) -progress_monitor (j_common_ptr cinfo) -{ - cd_progress_ptr prog = (cd_progress_ptr) cinfo->progress; - int total_passes = prog->pub.total_passes + prog->total_extra_passes; - int percent_done = (int) (prog->pub.pass_counter*100L/prog->pub.pass_limit); - - if (percent_done != prog->percent_done) { - prog->percent_done = percent_done; - if (total_passes > 1) { - fprintf(stderr, "\rPass %d/%d: %3d%% ", - prog->pub.completed_passes + prog->completed_extra_passes + 1, - total_passes, percent_done); - } else { - fprintf(stderr, "\r %3d%% ", percent_done); - } - fflush(stderr); - } -} - - -GLOBAL(void) -start_progress_monitor (j_common_ptr cinfo, cd_progress_ptr progress) -{ - /* Enable progress display, unless trace output is on */ - if (cinfo->err->trace_level == 0) { - progress->pub.progress_monitor = progress_monitor; - progress->completed_extra_passes = 0; - progress->total_extra_passes = 0; - progress->percent_done = -1; - cinfo->progress = &progress->pub; - } -} - - -GLOBAL(void) -end_progress_monitor (j_common_ptr cinfo) -{ - /* Clear away progress display */ - if (cinfo->err->trace_level == 0) { - fprintf(stderr, "\r \r"); - fflush(stderr); - } -} - -#endif - - -/* - * Case-insensitive matching of possibly-abbreviated keyword switches. - * keyword is the constant keyword (must be lower case already), - * minchars is length of minimum legal abbreviation. - */ - -GLOBAL(boolean) -keymatch (char * arg, const char * keyword, int minchars) -{ - register int ca, ck; - register int nmatched = 0; - - while ((ca = *arg++) != '\0') { - if ((ck = *keyword++) == '\0') - return FALSE; /* arg longer than keyword, no good */ - if (isupper(ca)) /* force arg to lcase (assume ck is already) */ - ca = tolower(ca); - if (ca != ck) - return FALSE; /* no good */ - nmatched++; /* count matched characters */ - } - /* reached end of argument; fail if it's too short for unique abbrev */ - if (nmatched < minchars) - return FALSE; - return TRUE; /* A-OK */ -} - - -/* - * Routines to establish binary I/O mode for stdin and stdout. - * Non-Unix systems often require some hacking to get out of text mode. - */ - -GLOBAL(FILE *) -read_stdin (void) -{ - FILE * input_file = stdin; - -#ifdef USE_SETMODE /* need to hack file mode? */ - setmode(fileno(stdin), O_BINARY); -#endif -#ifdef USE_FDOPEN /* need to re-open in binary mode? */ - if ((input_file = fdopen(fileno(stdin), READ_BINARY)) == NULL) { - fprintf(stderr, "Cannot reopen stdin\n"); - exit(EXIT_FAILURE); - } -#endif - return input_file; -} - - -GLOBAL(FILE *) -write_stdout (void) -{ - FILE * output_file = stdout; - -#ifdef USE_SETMODE /* need to hack file mode? */ - setmode(fileno(stdout), O_BINARY); -#endif -#ifdef USE_FDOPEN /* need to re-open in binary mode? */ - if ((output_file = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) { - fprintf(stderr, "Cannot reopen stdout\n"); - exit(EXIT_FAILURE); - } -#endif - return output_file; -} diff --git a/gtkmm-osx/trunk/jpeg-6b/cdjpeg.h b/gtkmm-osx/trunk/jpeg-6b/cdjpeg.h deleted file mode 100644 index 2b387b6..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/cdjpeg.h +++ /dev/null @@ -1,184 +0,0 @@ -/* - * cdjpeg.h - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains common declarations for the sample applications - * cjpeg and djpeg. It is NOT used by the core JPEG library. - */ - -#define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */ -#define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */ -#include "jinclude.h" -#include "jpeglib.h" -#include "jerror.h" /* get library error codes too */ -#include "cderror.h" /* get application-specific error codes */ - - -/* - * Object interface for cjpeg's source file decoding modules - */ - -typedef struct cjpeg_source_struct * cjpeg_source_ptr; - -struct cjpeg_source_struct { - JMETHOD(void, start_input, (j_compress_ptr cinfo, - cjpeg_source_ptr sinfo)); - JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo, - cjpeg_source_ptr sinfo)); - JMETHOD(void, finish_input, (j_compress_ptr cinfo, - cjpeg_source_ptr sinfo)); - - FILE *input_file; - - JSAMPARRAY buffer; - JDIMENSION buffer_height; -}; - - -/* - * Object interface for djpeg's output file encoding modules - */ - -typedef struct djpeg_dest_struct * djpeg_dest_ptr; - -struct djpeg_dest_struct { - /* start_output is called after jpeg_start_decompress finishes. - * The color map will be ready at this time, if one is needed. - */ - JMETHOD(void, start_output, (j_decompress_ptr cinfo, - djpeg_dest_ptr dinfo)); - /* Emit the specified number of pixel rows from the buffer. */ - JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo, - djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied)); - /* Finish up at the end of the image. */ - JMETHOD(void, finish_output, (j_decompress_ptr cinfo, - djpeg_dest_ptr dinfo)); - - /* Target file spec; filled in by djpeg.c after object is created. */ - FILE * output_file; - - /* Output pixel-row buffer. Created by module init or start_output. - * Width is cinfo->output_width * cinfo->output_components; - * height is buffer_height. - */ - JSAMPARRAY buffer; - JDIMENSION buffer_height; -}; - - -/* - * cjpeg/djpeg may need to perform extra passes to convert to or from - * the source/destination file format. The JPEG library does not know - * about these passes, but we'd like them to be counted by the progress - * monitor. We use an expanded progress monitor object to hold the - * additional pass count. - */ - -struct cdjpeg_progress_mgr { - struct jpeg_progress_mgr pub; /* fields known to JPEG library */ - int completed_extra_passes; /* extra passes completed */ - int total_extra_passes; /* total extra */ - /* last printed percentage stored here to avoid multiple printouts */ - int percent_done; -}; - -typedef struct cdjpeg_progress_mgr * cd_progress_ptr; - - -/* Short forms of external names for systems with brain-damaged linkers. */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jinit_read_bmp jIRdBMP -#define jinit_write_bmp jIWrBMP -#define jinit_read_gif jIRdGIF -#define jinit_write_gif jIWrGIF -#define jinit_read_ppm jIRdPPM -#define jinit_write_ppm jIWrPPM -#define jinit_read_rle jIRdRLE -#define jinit_write_rle jIWrRLE -#define jinit_read_targa jIRdTarga -#define jinit_write_targa jIWrTarga -#define read_quant_tables RdQTables -#define read_scan_script RdScnScript -#define set_quant_slots SetQSlots -#define set_sample_factors SetSFacts -#define read_color_map RdCMap -#define enable_signal_catcher EnSigCatcher -#define start_progress_monitor StProgMon -#define end_progress_monitor EnProgMon -#define read_stdin RdStdin -#define write_stdout WrStdout -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - -/* Module selection routines for I/O modules. */ - -EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo)); -EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo, - boolean is_os2)); -EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo)); -EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo)); -EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo)); -EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo)); -EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo)); -EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo)); -EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo)); -EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo)); - -/* cjpeg support routines (in rdswitch.c) */ - -EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename, - int scale_factor, boolean force_baseline)); -EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename)); -EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg)); -EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg)); - -/* djpeg support routines (in rdcolmap.c) */ - -EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile)); - -/* common support routines (in cdjpeg.c) */ - -EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo)); -EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo, - cd_progress_ptr progress)); -EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo)); -EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars)); -EXTERN(FILE *) read_stdin JPP((void)); -EXTERN(FILE *) write_stdout JPP((void)); - -/* miscellaneous useful macros */ - -#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#define WRITE_BINARY "w" -#else -#ifdef VMS /* VMS is very nonstandard */ -#define READ_BINARY "rb", "ctx=stm" -#define WRITE_BINARY "wb", "ctx=stm" -#else /* standard ANSI-compliant case */ -#define READ_BINARY "rb" -#define WRITE_BINARY "wb" -#endif -#endif - -#ifndef EXIT_FAILURE /* define exit() codes if not provided */ -#define EXIT_FAILURE 1 -#endif -#ifndef EXIT_SUCCESS -#ifdef VMS -#define EXIT_SUCCESS 1 /* VMS is very nonstandard */ -#else -#define EXIT_SUCCESS 0 -#endif -#endif -#ifndef EXIT_WARNING -#ifdef VMS -#define EXIT_WARNING 1 /* VMS is very nonstandard */ -#else -#define EXIT_WARNING 2 -#endif -#endif diff --git a/gtkmm-osx/trunk/jpeg-6b/change.log b/gtkmm-osx/trunk/jpeg-6b/change.log deleted file mode 100644 index 74102c0..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/change.log +++ /dev/null @@ -1,217 +0,0 @@ -CHANGE LOG for Independent JPEG Group's JPEG software - - -Version 6b 27-Mar-1998 ------------------------ - -jpegtran has new features for lossless image transformations (rotation -and flipping) as well as "lossless" reduction to grayscale. - -jpegtran now copies comments by default; it has a -copy switch to enable -copying all APPn blocks as well, or to suppress comments. (Formerly it -always suppressed comments and APPn blocks.) jpegtran now also preserves -JFIF version and resolution information. - -New decompressor library feature: COM and APPn markers found in the input -file can be saved in memory for later use by the application. (Before, -you had to code this up yourself with a custom marker processor.) - -There is an unused field "void * client_data" now in compress and decompress -parameter structs; this may be useful in some applications. - -JFIF version number information is now saved by the decoder and accepted by -the encoder. jpegtran uses this to copy the source file's version number, -to ensure "jpegtran -copy all" won't create bogus files that contain JFXX -extensions but claim to be version 1.01. Applications that generate their -own JFXX extension markers also (finally) have a supported way to cause the -encoder to emit JFIF version number 1.02. - -djpeg's trace mode reports JFIF 1.02 thumbnail images as such, rather -than as unknown APP0 markers. - -In -verbose mode, djpeg and rdjpgcom will try to print the contents of -APP12 markers as text. Some digital cameras store useful text information -in APP12 markers. - -Handling of truncated data streams is more robust: blocks beyond the one in -which the error occurs will be output as uniform gray, or left unchanged -if decoding a progressive JPEG. The appearance no longer depends on the -Huffman tables being used. - -Huffman tables are checked for validity much more carefully than before. - -To avoid the Unisys LZW patent, djpeg's GIF output capability has been -changed to produce "uncompressed GIFs", and cjpeg's GIF input capability -has been removed altogether. We're not happy about it either, but there -seems to be no good alternative. - -The configure script now supports building libjpeg as a shared library -on many flavors of Unix (all the ones that GNU libtool knows how to -build shared libraries for). Use "./configure --enable-shared" to -try this out. - -New jconfig file and makefiles for Microsoft Visual C++ and Developer Studio. -Also, a jconfig file and a build script for Metrowerks CodeWarrior -on Apple Macintosh. makefile.dj has been updated for DJGPP v2, and there -are miscellaneous other minor improvements in the makefiles. - -jmemmac.c now knows how to create temporary files following Mac System 7 -conventions. - -djpeg's -map switch is now able to read raw-format PPM files reliably. - -cjpeg -progressive -restart no longer generates any unnecessary DRI markers. - -Multiple calls to jpeg_simple_progression for a single JPEG object -no longer leak memory. - - -Version 6a 7-Feb-96 --------------------- - -Library initialization sequence modified to detect version mismatches -and struct field packing mismatches between library and calling application. -This change requires applications to be recompiled, but does not require -any application source code change. - -All routine declarations changed to the style "GLOBAL(type) name ...", -that is, GLOBAL, LOCAL, METHODDEF, EXTERN are now macros taking the -routine's return type as an argument. This makes it possible to add -Microsoft-style linkage keywords to all the routines by changing just -these macros. Note that any application code that was using these macros -will have to be changed. - -DCT coefficient quantization tables are now stored in normal array order -rather than zigzag order. Application code that calls jpeg_add_quant_table, -or otherwise manipulates quantization tables directly, will need to be -changed. If you need to make such code work with either older or newer -versions of the library, a test like "#if JPEG_LIB_VERSION >= 61" is -recommended. - -djpeg's trace capability now dumps DQT tables in natural order, not zigzag -order. This allows the trace output to be made into a "-qtables" file -more easily. - -New system-dependent memory manager module for use on Apple Macintosh. - -Fix bug in cjpeg's -smooth option: last one or two scanlines would be -duplicates of the prior line unless the image height mod 16 was 1 or 2. - -Repair minor problems in VMS, BCC, MC6 makefiles. - -New configure script based on latest GNU Autoconf. - -Correct the list of include files needed by MetroWerks C for ccommand(). - -Numerous small documentation updates. - - -Version 6 2-Aug-95 -------------------- - -Progressive JPEG support: library can read and write full progressive JPEG -files. A "buffered image" mode supports incremental decoding for on-the-fly -display of progressive images. Simply recompiling an existing IJG-v5-based -decoder with v6 should allow it to read progressive files, though of course -without any special progressive display. - -New "jpegtran" application performs lossless transcoding between different -JPEG formats; primarily, it can be used to convert baseline to progressive -JPEG and vice versa. In support of jpegtran, the library now allows lossless -reading and writing of JPEG files as DCT coefficient arrays. This ability -may be of use in other applications. - -Notes for programmers: -* We changed jpeg_start_decompress() to be able to suspend; this makes all -decoding modes available to suspending-input applications. However, -existing applications that use suspending input will need to be changed -to check the return value from jpeg_start_decompress(). You don't need to -do anything if you don't use a suspending data source. -* We changed the interface to the virtual array routines: access_virt_array -routines now take a count of the number of rows to access this time. The -last parameter to request_virt_array routines is now interpreted as the -maximum number of rows that may be accessed at once, but not necessarily -the height of every access. - - -Version 5b 15-Mar-95 ---------------------- - -Correct bugs with grayscale images having v_samp_factor > 1. - -jpeg_write_raw_data() now supports output suspension. - -Correct bugs in "configure" script for case of compiling in -a directory other than the one containing the source files. - -Repair bug in jquant1.c: sometimes didn't use as many colors as it could. - -Borland C makefile and jconfig file work under either MS-DOS or OS/2. - -Miscellaneous improvements to documentation. - - -Version 5a 7-Dec-94 --------------------- - -Changed color conversion roundoff behavior so that grayscale values are -represented exactly. (This causes test image files to change.) - -Make ordered dither use 16x16 instead of 4x4 pattern for a small quality -improvement. - -New configure script based on latest GNU Autoconf. -Fix configure script to handle CFLAGS correctly. -Rename *.auto files to *.cfg, so that configure script still works if -file names have been truncated for DOS. - -Fix bug in rdbmp.c: didn't allow for extra data between header and image. - -Modify rdppm.c/wrppm.c to handle 2-byte raw PPM/PGM formats for 12-bit data. - -Fix several bugs in rdrle.c. - -NEED_SHORT_EXTERNAL_NAMES option was broken. - -Revise jerror.h/jerror.c for more flexibility in message table. - -Repair oversight in jmemname.c NO_MKTEMP case: file could be there -but unreadable. - - -Version 5 24-Sep-94 --------------------- - -Version 5 represents a nearly complete redesign and rewrite of the IJG -software. Major user-visible changes include: - * Automatic configuration simplifies installation for most Unix systems. - * A range of speed vs. image quality tradeoffs are supported. - This includes resizing of an image during decompression: scaling down - by a factor of 1/2, 1/4, or 1/8 is handled very efficiently. - * New programs rdjpgcom and wrjpgcom allow insertion and extraction - of text comments in a JPEG file. - -The application programmer's interface to the library has changed completely. -Notable improvements include: - * We have eliminated the use of callback routines for handling the - uncompressed image data. The application now sees the library as a - set of routines that it calls to read or write image data on a - scanline-by-scanline basis. - * The application image data is represented in a conventional interleaved- - pixel format, rather than as a separate array for each color channel. - This can save a copying step in many programs. - * The handling of compressed data has been cleaned up: the application can - supply routines to source or sink the compressed data. It is possible to - suspend processing on source/sink buffer overrun, although this is not - supported in all operating modes. - * All static state has been eliminated from the library, so that multiple - instances of compression or decompression can be active concurrently. - * JPEG abbreviated datastream formats are supported, ie, quantization and - Huffman tables can be stored separately from the image data. - * And not only that, but the documentation of the library has improved - considerably! - - -The last widely used release before the version 5 rewrite was version 4A of -18-Feb-93. Change logs before that point have been discarded, since they -are not of much interest after the rewrite. diff --git a/gtkmm-osx/trunk/jpeg-6b/cjpeg.1 b/gtkmm-osx/trunk/jpeg-6b/cjpeg.1 deleted file mode 100644 index d175a96..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/cjpeg.1 +++ /dev/null @@ -1,292 +0,0 @@ -.TH CJPEG 1 "20 March 1998" -.SH NAME -cjpeg \- compress an image file to a JPEG file -.SH SYNOPSIS -.B cjpeg -[ -.I options -] -[ -.I filename -] -.LP -.SH DESCRIPTION -.LP -.B cjpeg -compresses the named image file, or the standard input if no file is -named, and produces a JPEG/JFIF file on the standard output. -The currently supported input file formats are: PPM (PBMPLUS color -format), PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster -Toolkit format). (RLE is supported only if the URT library is available.) -.SH OPTIONS -All switch names may be abbreviated; for example, -.B \-grayscale -may be written -.B \-gray -or -.BR \-gr . -Most of the "basic" switches can be abbreviated to as little as one letter. -Upper and lower case are equivalent (thus -.B \-BMP -is the same as -.BR \-bmp ). -British spellings are also accepted (e.g., -.BR \-greyscale ), -though for brevity these are not mentioned below. -.PP -The basic switches are: -.TP -.BI \-quality " N" -Scale quantization tables to adjust image quality. Quality is 0 (worst) to -100 (best); default is 75. (See below for more info.) -.TP -.B \-grayscale -Create monochrome JPEG file from color input. Be sure to use this switch when -compressing a grayscale BMP file, because -.B cjpeg -isn't bright enough to notice whether a BMP file uses only shades of gray. -By saying -.BR \-grayscale , -you'll get a smaller JPEG file that takes less time to process. -.TP -.B \-optimize -Perform optimization of entropy encoding parameters. Without this, default -encoding parameters are used. -.B \-optimize -usually makes the JPEG file a little smaller, but -.B cjpeg -runs somewhat slower and needs much more memory. Image quality and speed of -decompression are unaffected by -.BR \-optimize . -.TP -.B \-progressive -Create progressive JPEG file (see below). -.TP -.B \-targa -Input file is Targa format. Targa files that contain an "identification" -field will not be automatically recognized by -.BR cjpeg ; -for such files you must specify -.B \-targa -to make -.B cjpeg -treat the input as Targa format. -For most Targa files, you won't need this switch. -.PP -The -.B \-quality -switch lets you trade off compressed file size against quality of the -reconstructed image: the higher the quality setting, the larger the JPEG file, -and the closer the output image will be to the original input. Normally you -want to use the lowest quality setting (smallest file) that decompresses into -something visually indistinguishable from the original image. For this -purpose the quality setting should be between 50 and 95; the default of 75 is -often about right. If you see defects at -.B \-quality -75, then go up 5 or 10 counts at a time until you are happy with the output -image. (The optimal setting will vary from one image to another.) -.PP -.B \-quality -100 will generate a quantization table of all 1's, minimizing loss in the -quantization step (but there is still information loss in subsampling, as well -as roundoff error). This setting is mainly of interest for experimental -purposes. Quality values above about 95 are -.B not -recommended for normal use; the compressed file size goes up dramatically for -hardly any gain in output image quality. -.PP -In the other direction, quality values below 50 will produce very small files -of low image quality. Settings around 5 to 10 might be useful in preparing an -index of a large image library, for example. Try -.B \-quality -2 (or so) for some amusing Cubist effects. (Note: quality -values below about 25 generate 2-byte quantization tables, which are -considered optional in the JPEG standard. -.B cjpeg -emits a warning message when you give such a quality value, because some -other JPEG programs may be unable to decode the resulting file. Use -.B \-baseline -if you need to ensure compatibility at low quality values.) -.PP -The -.B \-progressive -switch creates a "progressive JPEG" file. In this type of JPEG file, the data -is stored in multiple scans of increasing quality. If the file is being -transmitted over a slow communications link, the decoder can use the first -scan to display a low-quality image very quickly, and can then improve the -display with each subsequent scan. The final image is exactly equivalent to a -standard JPEG file of the same quality setting, and the total file size is -about the same --- often a little smaller. -.B Caution: -progressive JPEG is not yet widely implemented, so many decoders will be -unable to view a progressive JPEG file at all. -.PP -Switches for advanced users: -.TP -.B \-dct int -Use integer DCT method (default). -.TP -.B \-dct fast -Use fast integer DCT (less accurate). -.TP -.B \-dct float -Use floating-point DCT method. -The float method is very slightly more accurate than the int method, but is -much slower unless your machine has very fast floating-point hardware. Also -note that results of the floating-point method may vary slightly across -machines, while the integer methods should give the same results everywhere. -The fast integer method is much less accurate than the other two. -.TP -.BI \-restart " N" -Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is -attached to the number. -.B \-restart 0 -(the default) means no restart markers. -.TP -.BI \-smooth " N" -Smooth the input image to eliminate dithering noise. N, ranging from 1 to -100, indicates the strength of smoothing. 0 (the default) means no smoothing. -.TP -.BI \-maxmemory " N" -Set limit for amount of memory to use in processing large images. Value is -in thousands of bytes, or millions of bytes if "M" is attached to the -number. For example, -.B \-max 4m -selects 4000000 bytes. If more space is needed, temporary files will be used. -.TP -.BI \-outfile " name" -Send output image to the named file, not to standard output. -.TP -.B \-verbose -Enable debug printout. More -.BR \-v 's -give more output. Also, version information is printed at startup. -.TP -.B \-debug -Same as -.BR \-verbose . -.PP -The -.B \-restart -option inserts extra markers that allow a JPEG decoder to resynchronize after -a transmission error. Without restart markers, any damage to a compressed -file will usually ruin the image from the point of the error to the end of the -image; with restart markers, the damage is usually confined to the portion of -the image up to the next restart marker. Of course, the restart markers -occupy extra space. We recommend -.B \-restart 1 -for images that will be transmitted across unreliable networks such as Usenet. -.PP -The -.B \-smooth -option filters the input to eliminate fine-scale noise. This is often useful -when converting dithered images to JPEG: a moderate smoothing factor of 10 to -50 gets rid of dithering patterns in the input file, resulting in a smaller -JPEG file and a better-looking image. Too large a smoothing factor will -visibly blur the image, however. -.PP -Switches for wizards: -.TP -.B \-baseline -Force baseline-compatible quantization tables to be generated. This clamps -quantization values to 8 bits even at low quality settings. (This switch is -poorly named, since it does not ensure that the output is actually baseline -JPEG. For example, you can use -.B \-baseline -and -.B \-progressive -together.) -.TP -.BI \-qtables " file" -Use the quantization tables given in the specified text file. -.TP -.BI \-qslots " N[,...]" -Select which quantization table to use for each color component. -.TP -.BI \-sample " HxV[,...]" -Set JPEG sampling factors for each color component. -.TP -.BI \-scans " file" -Use the scan script given in the specified text file. -.PP -The "wizard" switches are intended for experimentation with JPEG. If you -don't know what you are doing, \fBdon't use them\fR. These switches are -documented further in the file wizard.doc. -.SH EXAMPLES -.LP -This example compresses the PPM file foo.ppm with a quality factor of -60 and saves the output as foo.jpg: -.IP -.B cjpeg \-quality -.I 60 foo.ppm -.B > -.I foo.jpg -.SH HINTS -Color GIF files are not the ideal input for JPEG; JPEG is really intended for -compressing full-color (24-bit) images. In particular, don't try to convert -cartoons, line drawings, and other images that have only a few distinct -colors. GIF works great on these, JPEG does not. If you want to convert a -GIF to JPEG, you should experiment with -.BR cjpeg 's -.B \-quality -and -.B \-smooth -options to get a satisfactory conversion. -.B \-smooth 10 -or so is often helpful. -.PP -Avoid running an image through a series of JPEG compression/decompression -cycles. Image quality loss will accumulate; after ten or so cycles the image -may be noticeably worse than it was after one cycle. It's best to use a -lossless format while manipulating an image, then convert to JPEG format when -you are ready to file the image away. -.PP -The -.B \-optimize -option to -.B cjpeg -is worth using when you are making a "final" version for posting or archiving. -It's also a win when you are using low quality settings to make very small -JPEG files; the percentage improvement is often a lot more than it is on -larger files. (At present, -.B \-optimize -mode is always selected when generating progressive JPEG files.) -.SH ENVIRONMENT -.TP -.B JPEGMEM -If this environment variable is set, its value is the default memory limit. -The value is specified as described for the -.B \-maxmemory -switch. -.B JPEGMEM -overrides the default value specified when the program was compiled, and -itself is overridden by an explicit -.BR \-maxmemory . -.SH SEE ALSO -.BR djpeg (1), -.BR jpegtran (1), -.BR rdjpgcom (1), -.BR wrjpgcom (1) -.br -.BR ppm (5), -.BR pgm (5) -.br -Wallace, Gregory K. "The JPEG Still Picture Compression Standard", -Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. -.SH AUTHOR -Independent JPEG Group -.SH BUGS -Arithmetic coding is not supported for legal reasons. -.PP -GIF input files are no longer supported, to avoid the Unisys LZW patent. -Use a Unisys-licensed program if you need to read a GIF file. (Conversion -of GIF files to JPEG is usually a bad idea anyway.) -.PP -Not all variants of BMP and Targa file formats are supported. -.PP -The -.B \-targa -switch is not a bug, it's a feature. (It would be a bug if the Targa format -designers had not been clueless.) -.PP -Still not as fast as we'd like. diff --git a/gtkmm-osx/trunk/jpeg-6b/cjpeg.c b/gtkmm-osx/trunk/jpeg-6b/cjpeg.c deleted file mode 100644 index f2a929f..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/cjpeg.c +++ /dev/null @@ -1,606 +0,0 @@ -/* - * cjpeg.c - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a command-line user interface for the JPEG compressor. - * It should work on any system with Unix- or MS-DOS-style command lines. - * - * Two different command line styles are permitted, depending on the - * compile-time switch TWO_FILE_COMMANDLINE: - * cjpeg [options] inputfile outputfile - * cjpeg [options] [inputfile] - * In the second style, output is always to standard output, which you'd - * normally redirect to a file or pipe to some other program. Input is - * either from a named file or from standard input (typically redirected). - * The second style is convenient on Unix but is unhelpful on systems that - * don't support pipes. Also, you MUST use the first style if your system - * doesn't do binary I/O to stdin/stdout. - * To simplify script writing, the "-outfile" switch is provided. The syntax - * cjpeg [options] -outfile outputfile inputfile - * works regardless of which command line style is used. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ -#include "jversion.h" /* for version message */ - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - - -/* Create the add-on message string table. */ - -#define JMESSAGE(code,string) string , - -static const char * const cdjpeg_message_table[] = { -#include "cderror.h" - NULL -}; - - -/* - * This routine determines what format the input file is, - * and selects the appropriate input-reading module. - * - * To determine which family of input formats the file belongs to, - * we may look only at the first byte of the file, since C does not - * guarantee that more than one character can be pushed back with ungetc. - * Looking at additional bytes would require one of these approaches: - * 1) assume we can fseek() the input file (fails for piped input); - * 2) assume we can push back more than one character (works in - * some C implementations, but unportable); - * 3) provide our own buffering (breaks input readers that want to use - * stdio directly, such as the RLE library); - * or 4) don't put back the data, and modify the input_init methods to assume - * they start reading after the start of file (also breaks RLE library). - * #1 is attractive for MS-DOS but is untenable on Unix. - * - * The most portable solution for file types that can't be identified by their - * first byte is to make the user tell us what they are. This is also the - * only approach for "raw" file types that contain only arbitrary values. - * We presently apply this method for Targa files. Most of the time Targa - * files start with 0x00, so we recognize that case. Potentially, however, - * a Targa file could start with any byte value (byte 0 is the length of the - * seldom-used ID field), so we provide a switch to force Targa input mode. - */ - -static boolean is_targa; /* records user -targa switch */ - - -LOCAL(cjpeg_source_ptr) -select_file_type (j_compress_ptr cinfo, FILE * infile) -{ - int c; - - if (is_targa) { -#ifdef TARGA_SUPPORTED - return jinit_read_targa(cinfo); -#else - ERREXIT(cinfo, JERR_TGA_NOTCOMP); -#endif - } - - if ((c = getc(infile)) == EOF) - ERREXIT(cinfo, JERR_INPUT_EMPTY); - if (ungetc(c, infile) == EOF) - ERREXIT(cinfo, JERR_UNGETC_FAILED); - - switch (c) { -#ifdef BMP_SUPPORTED - case 'B': - return jinit_read_bmp(cinfo); -#endif -#ifdef GIF_SUPPORTED - case 'G': - return jinit_read_gif(cinfo); -#endif -#ifdef PPM_SUPPORTED - case 'P': - return jinit_read_ppm(cinfo); -#endif -#ifdef RLE_SUPPORTED - case 'R': - return jinit_read_rle(cinfo); -#endif -#ifdef TARGA_SUPPORTED - case 0x00: - return jinit_read_targa(cinfo); -#endif - default: - ERREXIT(cinfo, JERR_UNKNOWN_FORMAT); - break; - } - - return NULL; /* suppress compiler warnings */ -} - - -/* - * Argument-parsing code. - * The switch parser is designed to be useful with DOS-style command line - * syntax, ie, intermixed switches and file names, where only the switches - * to the left of a given file name affect processing of that file. - * The main program in this file doesn't actually use this capability... - */ - - -static const char * progname; /* program name for error messages */ -static char * outfilename; /* for -outfile switch */ - - -LOCAL(void) -usage (void) -/* complain about bad command line */ -{ - fprintf(stderr, "usage: %s [switches] ", progname); -#ifdef TWO_FILE_COMMANDLINE - fprintf(stderr, "inputfile outputfile\n"); -#else - fprintf(stderr, "[inputfile]\n"); -#endif - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf(stderr, " -quality N Compression quality (0..100; 5-95 is useful range)\n"); - fprintf(stderr, " -grayscale Create monochrome JPEG file\n"); -#ifdef ENTROPY_OPT_SUPPORTED - fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n"); -#endif -#ifdef C_PROGRESSIVE_SUPPORTED - fprintf(stderr, " -progressive Create progressive JPEG file\n"); -#endif -#ifdef TARGA_SUPPORTED - fprintf(stderr, " -targa Input file is Targa format (usually not needed)\n"); -#endif - fprintf(stderr, "Switches for advanced users:\n"); -#ifdef DCT_ISLOW_SUPPORTED - fprintf(stderr, " -dct int Use integer DCT method%s\n", - (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : "")); -#endif -#ifdef DCT_IFAST_SUPPORTED - fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n", - (JDCT_DEFAULT == JDCT_IFAST ? " (default)" : "")); -#endif -#ifdef DCT_FLOAT_SUPPORTED - fprintf(stderr, " -dct float Use floating-point DCT method%s\n", - (JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : "")); -#endif - fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n"); -#ifdef INPUT_SMOOTHING_SUPPORTED - fprintf(stderr, " -smooth N Smooth dithered input (N=1..100 is strength)\n"); -#endif - fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); - fprintf(stderr, " -outfile name Specify name for output file\n"); - fprintf(stderr, " -verbose or -debug Emit debug output\n"); - fprintf(stderr, "Switches for wizards:\n"); -#ifdef C_ARITH_CODING_SUPPORTED - fprintf(stderr, " -arithmetic Use arithmetic coding\n"); -#endif - fprintf(stderr, " -baseline Force baseline quantization tables\n"); - fprintf(stderr, " -qtables file Use quantization tables given in file\n"); - fprintf(stderr, " -qslots N[,...] Set component quantization tables\n"); - fprintf(stderr, " -sample HxV[,...] Set component sampling factors\n"); -#ifdef C_MULTISCAN_FILES_SUPPORTED - fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n"); -#endif - exit(EXIT_FAILURE); -} - - -LOCAL(int) -parse_switches (j_compress_ptr cinfo, int argc, char **argv, - int last_file_arg_seen, boolean for_real) -/* Parse optional switches. - * Returns argv[] index of first file-name argument (== argc if none). - * Any file names with indexes <= last_file_arg_seen are ignored; - * they have presumably been processed in a previous iteration. - * (Pass 0 for last_file_arg_seen on the first or only iteration.) - * for_real is FALSE on the first (dummy) pass; we may skip any expensive - * processing. - */ -{ - int argn; - char * arg; - int quality; /* -quality parameter */ - int q_scale_factor; /* scaling percentage for -qtables */ - boolean force_baseline; - boolean simple_progressive; - char * qtablefile = NULL; /* saves -qtables filename if any */ - char * qslotsarg = NULL; /* saves -qslots parm if any */ - char * samplearg = NULL; /* saves -sample parm if any */ - char * scansarg = NULL; /* saves -scans parm if any */ - - /* Set up default JPEG parameters. */ - /* Note that default -quality level need not, and does not, - * match the default scaling for an explicit -qtables argument. - */ - quality = 75; /* default -quality value */ - q_scale_factor = 100; /* default to no scaling for -qtables */ - force_baseline = FALSE; /* by default, allow 16-bit quantizers */ - simple_progressive = FALSE; - is_targa = FALSE; - outfilename = NULL; - cinfo->err->trace_level = 0; - - /* Scan command line options, adjust parameters */ - - for (argn = 1; argn < argc; argn++) { - arg = argv[argn]; - if (*arg != '-') { - /* Not a switch, must be a file name argument */ - if (argn <= last_file_arg_seen) { - outfilename = NULL; /* -outfile applies to just one input file */ - continue; /* ignore this name if previously processed */ - } - break; /* else done parsing switches */ - } - arg++; /* advance past switch marker character */ - - if (keymatch(arg, "arithmetic", 1)) { - /* Use arithmetic coding. */ -#ifdef C_ARITH_CODING_SUPPORTED - cinfo->arith_code = TRUE; -#else - fprintf(stderr, "%s: sorry, arithmetic coding not supported\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "baseline", 1)) { - /* Force baseline-compatible output (8-bit quantizer values). */ - force_baseline = TRUE; - - } else if (keymatch(arg, "dct", 2)) { - /* Select DCT algorithm. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "int", 1)) { - cinfo->dct_method = JDCT_ISLOW; - } else if (keymatch(argv[argn], "fast", 2)) { - cinfo->dct_method = JDCT_IFAST; - } else if (keymatch(argv[argn], "float", 2)) { - cinfo->dct_method = JDCT_FLOAT; - } else - usage(); - - } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) { - /* Enable debug printouts. */ - /* On first -d, print version identification */ - static boolean printed_version = FALSE; - - if (! printed_version) { - fprintf(stderr, "Independent JPEG Group's CJPEG, version %s\n%s\n", - JVERSION, JCOPYRIGHT); - printed_version = TRUE; - } - cinfo->err->trace_level++; - - } else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) { - /* Force a monochrome JPEG file to be generated. */ - jpeg_set_colorspace(cinfo, JCS_GRAYSCALE); - - } else if (keymatch(arg, "maxmemory", 3)) { - /* Maximum memory in Kb (or Mb with 'm'). */ - long lval; - char ch = 'x'; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) - usage(); - if (ch == 'm' || ch == 'M') - lval *= 1000L; - cinfo->mem->max_memory_to_use = lval * 1000L; - - } else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) { - /* Enable entropy parm optimization. */ -#ifdef ENTROPY_OPT_SUPPORTED - cinfo->optimize_coding = TRUE; -#else - fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "outfile", 4)) { - /* Set output file name. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - outfilename = argv[argn]; /* save it away for later use */ - - } else if (keymatch(arg, "progressive", 1)) { - /* Select simple progressive mode. */ -#ifdef C_PROGRESSIVE_SUPPORTED - simple_progressive = TRUE; - /* We must postpone execution until num_components is known. */ -#else - fprintf(stderr, "%s: sorry, progressive output was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "quality", 1)) { - /* Quality factor (quantization table scaling factor). */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%d", &quality) != 1) - usage(); - /* Change scale factor in case -qtables is present. */ - q_scale_factor = jpeg_quality_scaling(quality); - - } else if (keymatch(arg, "qslots", 2)) { - /* Quantization table slot numbers. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - qslotsarg = argv[argn]; - /* Must delay setting qslots until after we have processed any - * colorspace-determining switches, since jpeg_set_colorspace sets - * default quant table numbers. - */ - - } else if (keymatch(arg, "qtables", 2)) { - /* Quantization tables fetched from file. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - qtablefile = argv[argn]; - /* We postpone actually reading the file in case -quality comes later. */ - - } else if (keymatch(arg, "restart", 1)) { - /* Restart interval in MCU rows (or in MCUs with 'b'). */ - long lval; - char ch = 'x'; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) - usage(); - if (lval < 0 || lval > 65535L) - usage(); - if (ch == 'b' || ch == 'B') { - cinfo->restart_interval = (unsigned int) lval; - cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */ - } else { - cinfo->restart_in_rows = (int) lval; - /* restart_interval will be computed during startup */ - } - - } else if (keymatch(arg, "sample", 2)) { - /* Set sampling factors. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - samplearg = argv[argn]; - /* Must delay setting sample factors until after we have processed any - * colorspace-determining switches, since jpeg_set_colorspace sets - * default sampling factors. - */ - - } else if (keymatch(arg, "scans", 2)) { - /* Set scan script. */ -#ifdef C_MULTISCAN_FILES_SUPPORTED - if (++argn >= argc) /* advance to next argument */ - usage(); - scansarg = argv[argn]; - /* We must postpone reading the file in case -progressive appears. */ -#else - fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "smooth", 2)) { - /* Set input smoothing factor. */ - int val; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%d", &val) != 1) - usage(); - if (val < 0 || val > 100) - usage(); - cinfo->smoothing_factor = val; - - } else if (keymatch(arg, "targa", 1)) { - /* Input file is Targa format. */ - is_targa = TRUE; - - } else { - usage(); /* bogus switch */ - } - } - - /* Post-switch-scanning cleanup */ - - if (for_real) { - - /* Set quantization tables for selected quality. */ - /* Some or all may be overridden if -qtables is present. */ - jpeg_set_quality(cinfo, quality, force_baseline); - - if (qtablefile != NULL) /* process -qtables if it was present */ - if (! read_quant_tables(cinfo, qtablefile, - q_scale_factor, force_baseline)) - usage(); - - if (qslotsarg != NULL) /* process -qslots if it was present */ - if (! set_quant_slots(cinfo, qslotsarg)) - usage(); - - if (samplearg != NULL) /* process -sample if it was present */ - if (! set_sample_factors(cinfo, samplearg)) - usage(); - -#ifdef C_PROGRESSIVE_SUPPORTED - if (simple_progressive) /* process -progressive; -scans can override */ - jpeg_simple_progression(cinfo); -#endif - -#ifdef C_MULTISCAN_FILES_SUPPORTED - if (scansarg != NULL) /* process -scans if it was present */ - if (! read_scan_script(cinfo, scansarg)) - usage(); -#endif - } - - return argn; /* return index of next arg (file name) */ -} - - -/* - * The main program. - */ - -int -main (int argc, char **argv) -{ - struct jpeg_compress_struct cinfo; - struct jpeg_error_mgr jerr; -#ifdef PROGRESS_REPORT - struct cdjpeg_progress_mgr progress; -#endif - int file_index; - cjpeg_source_ptr src_mgr; - FILE * input_file; - FILE * output_file; - JDIMENSION num_scanlines; - - /* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "cjpeg"; /* in case C library doesn't provide it */ - - /* Initialize the JPEG compression object with default error handling. */ - cinfo.err = jpeg_std_error(&jerr); - jpeg_create_compress(&cinfo); - /* Add some application-specific error messages (from cderror.h) */ - jerr.addon_message_table = cdjpeg_message_table; - jerr.first_addon_message = JMSG_FIRSTADDONCODE; - jerr.last_addon_message = JMSG_LASTADDONCODE; - - /* Now safe to enable signal catcher. */ -#ifdef NEED_SIGNAL_CATCHER - enable_signal_catcher((j_common_ptr) &cinfo); -#endif - - /* Initialize JPEG parameters. - * Much of this may be overridden later. - * In particular, we don't yet know the input file's color space, - * but we need to provide some value for jpeg_set_defaults() to work. - */ - - cinfo.in_color_space = JCS_RGB; /* arbitrary guess */ - jpeg_set_defaults(&cinfo); - - /* Scan command line to find file names. - * It is convenient to use just one switch-parsing routine, but the switch - * values read here are ignored; we will rescan the switches after opening - * the input file. - */ - - file_index = parse_switches(&cinfo, argc, argv, 0, FALSE); - -#ifdef TWO_FILE_COMMANDLINE - /* Must have either -outfile switch or explicit output file name */ - if (outfilename == NULL) { - if (file_index != argc-2) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - outfilename = argv[file_index+1]; - } else { - if (file_index != argc-1) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - } -#else - /* Unix style: expect zero or one file name */ - if (file_index < argc-1) { - fprintf(stderr, "%s: only one input file\n", progname); - usage(); - } -#endif /* TWO_FILE_COMMANDLINE */ - - /* Open the input file. */ - if (file_index < argc) { - if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]); - exit(EXIT_FAILURE); - } - } else { - /* default input file is stdin */ - input_file = read_stdin(); - } - - /* Open the output file. */ - if (outfilename != NULL) { - if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, outfilename); - exit(EXIT_FAILURE); - } - } else { - /* default output file is stdout */ - output_file = write_stdout(); - } - -#ifdef PROGRESS_REPORT - start_progress_monitor((j_common_ptr) &cinfo, &progress); -#endif - - /* Figure out the input file format, and set up to read it. */ - src_mgr = select_file_type(&cinfo, input_file); - src_mgr->input_file = input_file; - - /* Read the input file header to obtain file size & colorspace. */ - (*src_mgr->start_input) (&cinfo, src_mgr); - - /* Now that we know input colorspace, fix colorspace-dependent defaults */ - jpeg_default_colorspace(&cinfo); - - /* Adjust default compression parameters by re-parsing the options */ - file_index = parse_switches(&cinfo, argc, argv, 0, TRUE); - - /* Specify data destination for compression */ - jpeg_stdio_dest(&cinfo, output_file); - - /* Start compressor */ - jpeg_start_compress(&cinfo, TRUE); - - /* Process data */ - while (cinfo.next_scanline < cinfo.image_height) { - num_scanlines = (*src_mgr->get_pixel_rows) (&cinfo, src_mgr); - (void) jpeg_write_scanlines(&cinfo, src_mgr->buffer, num_scanlines); - } - - /* Finish compression and release memory */ - (*src_mgr->finish_input) (&cinfo, src_mgr); - jpeg_finish_compress(&cinfo); - jpeg_destroy_compress(&cinfo); - - /* Close files, if we opened them */ - if (input_file != stdin) - fclose(input_file); - if (output_file != stdout) - fclose(output_file); - -#ifdef PROGRESS_REPORT - end_progress_monitor((j_common_ptr) &cinfo); -#endif - - /* All done. */ - exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ -} diff --git a/gtkmm-osx/trunk/jpeg-6b/ckconfig.c b/gtkmm-osx/trunk/jpeg-6b/ckconfig.c deleted file mode 100644 index 34baf79..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/ckconfig.c +++ /dev/null @@ -1,402 +0,0 @@ -/* - * ckconfig.c - * - * Copyright (C) 1991-1994, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - */ - -/* - * This program is intended to help you determine how to configure the JPEG - * software for installation on a particular system. The idea is to try to - * compile and execute this program. If your compiler fails to compile the - * program, make changes as indicated in the comments below. Once you can - * compile the program, run it, and it will produce a "jconfig.h" file for - * your system. - * - * As a general rule, each time you try to compile this program, - * pay attention only to the *first* error message you get from the compiler. - * Many C compilers will issue lots of spurious error messages once they - * have gotten confused. Go to the line indicated in the first error message, - * and read the comments preceding that line to see what to change. - * - * Almost all of the edits you may need to make to this program consist of - * changing a line that reads "#define SOME_SYMBOL" to "#undef SOME_SYMBOL", - * or vice versa. This is called defining or undefining that symbol. - */ - - -/* First we must see if your system has the include files we need. - * We start out with the assumption that your system has all the ANSI-standard - * include files. If you get any error trying to include one of these files, - * undefine the corresponding HAVE_xxx symbol. - */ - -#define HAVE_STDDEF_H /* replace 'define' by 'undef' if error here */ -#ifdef HAVE_STDDEF_H /* next line will be skipped if you undef... */ -#include -#endif - -#define HAVE_STDLIB_H /* same thing for stdlib.h */ -#ifdef HAVE_STDLIB_H -#include -#endif - -#include /* If you ain't got this, you ain't got C. */ - -/* We have to see if your string functions are defined by - * strings.h (old BSD convention) or string.h (everybody else). - * We try the non-BSD convention first; define NEED_BSD_STRINGS - * if the compiler says it can't find string.h. - */ - -#undef NEED_BSD_STRINGS - -#ifdef NEED_BSD_STRINGS -#include -#else -#include -#endif - -/* On some systems (especially older Unix machines), type size_t is - * defined only in the include file . If you get a failure - * on the size_t test below, try defining NEED_SYS_TYPES_H. - */ - -#undef NEED_SYS_TYPES_H /* start by assuming we don't need it */ -#ifdef NEED_SYS_TYPES_H -#include -#endif - - -/* Usually type size_t is defined in one of the include files we've included - * above. If not, you'll get an error on the "typedef size_t my_size_t;" line. - * In that case, first try defining NEED_SYS_TYPES_H just above. - * If that doesn't work, you'll have to search through your system library - * to figure out which include file defines "size_t". Look for a line that - * says "typedef something-or-other size_t;". Then, change the line below - * that says "#include " to instead include the file - * you found size_t in, and define NEED_SPECIAL_INCLUDE. If you can't find - * type size_t anywhere, try replacing "#include " with - * "typedef unsigned int size_t;". - */ - -#undef NEED_SPECIAL_INCLUDE /* assume we DON'T need it, for starters */ - -#ifdef NEED_SPECIAL_INCLUDE -#include -#endif - -typedef size_t my_size_t; /* The payoff: do we have size_t now? */ - - -/* The next question is whether your compiler supports ANSI-style function - * prototypes. You need to know this in order to choose between using - * makefile.ansi and using makefile.unix. - * The #define line below is set to assume you have ANSI function prototypes. - * If you get an error in this group of lines, undefine HAVE_PROTOTYPES. - */ - -#define HAVE_PROTOTYPES - -#ifdef HAVE_PROTOTYPES -int testfunction (int arg1, int * arg2); /* check prototypes */ - -struct methods_struct { /* check method-pointer declarations */ - int (*error_exit) (char *msgtext); - int (*trace_message) (char *msgtext); - int (*another_method) (void); -}; - -int testfunction (int arg1, int * arg2) /* check definitions */ -{ - return arg2[arg1]; -} - -int test2function (void) /* check void arg list */ -{ - return 0; -} -#endif - - -/* Now we want to find out if your compiler knows what "unsigned char" means. - * If you get an error on the "unsigned char un_char;" line, - * then undefine HAVE_UNSIGNED_CHAR. - */ - -#define HAVE_UNSIGNED_CHAR - -#ifdef HAVE_UNSIGNED_CHAR -unsigned char un_char; -#endif - - -/* Now we want to find out if your compiler knows what "unsigned short" means. - * If you get an error on the "unsigned short un_short;" line, - * then undefine HAVE_UNSIGNED_SHORT. - */ - -#define HAVE_UNSIGNED_SHORT - -#ifdef HAVE_UNSIGNED_SHORT -unsigned short un_short; -#endif - - -/* Now we want to find out if your compiler understands type "void". - * If you get an error anywhere in here, undefine HAVE_VOID. - */ - -#define HAVE_VOID - -#ifdef HAVE_VOID -/* Caution: a C++ compiler will insist on complete prototypes */ -typedef void * void_ptr; /* check void * */ -#ifdef HAVE_PROTOTYPES /* check ptr to function returning void */ -typedef void (*void_func) (int a, int b); -#else -typedef void (*void_func) (); -#endif - -#ifdef HAVE_PROTOTYPES /* check void function result */ -void test3function (void_ptr arg1, void_func arg2) -#else -void test3function (arg1, arg2) - void_ptr arg1; - void_func arg2; -#endif -{ - char * locptr = (char *) arg1; /* check casting to and from void * */ - arg1 = (void *) locptr; - (*arg2) (1, 2); /* check call of fcn returning void */ -} -#endif - - -/* Now we want to find out if your compiler knows what "const" means. - * If you get an error here, undefine HAVE_CONST. - */ - -#define HAVE_CONST - -#ifdef HAVE_CONST -static const int carray[3] = {1, 2, 3}; - -#ifdef HAVE_PROTOTYPES -int test4function (const int arg1) -#else -int test4function (arg1) - const int arg1; -#endif -{ - return carray[arg1]; -} -#endif - - -/* If you get an error or warning about this structure definition, - * define INCOMPLETE_TYPES_BROKEN. - */ - -#undef INCOMPLETE_TYPES_BROKEN - -#ifndef INCOMPLETE_TYPES_BROKEN -typedef struct undefined_structure * undef_struct_ptr; -#endif - - -/* If you get an error about duplicate names, - * define NEED_SHORT_EXTERNAL_NAMES. - */ - -#undef NEED_SHORT_EXTERNAL_NAMES - -#ifndef NEED_SHORT_EXTERNAL_NAMES - -int possibly_duplicate_function () -{ - return 0; -} - -int possibly_dupli_function () -{ - return 1; -} - -#endif - - - -/************************************************************************ - * OK, that's it. You should not have to change anything beyond this - * point in order to compile and execute this program. (You might get - * some warnings, but you can ignore them.) - * When you run the program, it will make a couple more tests that it - * can do automatically, and then it will create jconfig.h and print out - * any additional suggestions it has. - ************************************************************************ - */ - - -#ifdef HAVE_PROTOTYPES -int is_char_signed (int arg) -#else -int is_char_signed (arg) - int arg; -#endif -{ - if (arg == 189) { /* expected result for unsigned char */ - return 0; /* type char is unsigned */ - } - else if (arg != -67) { /* expected result for signed char */ - printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n"); - printf("I fear the JPEG software will not work at all.\n\n"); - } - return 1; /* assume char is signed otherwise */ -} - - -#ifdef HAVE_PROTOTYPES -int is_shifting_signed (long arg) -#else -int is_shifting_signed (arg) - long arg; -#endif -/* See whether right-shift on a long is signed or not. */ -{ - long res = arg >> 4; - - if (res == -0x7F7E80CL) { /* expected result for signed shift */ - return 1; /* right shift is signed */ - } - /* see if unsigned-shift hack will fix it. */ - /* we can't just test exact value since it depends on width of long... */ - res |= (~0L) << (32-4); - if (res == -0x7F7E80CL) { /* expected result now? */ - return 0; /* right shift is unsigned */ - } - printf("Right shift isn't acting as I expect it to.\n"); - printf("I fear the JPEG software will not work at all.\n\n"); - return 0; /* try it with unsigned anyway */ -} - - -#ifdef HAVE_PROTOTYPES -int main (int argc, char ** argv) -#else -int main (argc, argv) - int argc; - char ** argv; -#endif -{ - char signed_char_check = (char) (-67); - FILE *outfile; - - /* Attempt to write jconfig.h */ - if ((outfile = fopen("jconfig.h", "w")) == NULL) { - printf("Failed to write jconfig.h\n"); - return 1; - } - - /* Write out all the info */ - fprintf(outfile, "/* jconfig.h --- generated by ckconfig.c */\n"); - fprintf(outfile, "/* see jconfig.doc for explanations */\n\n"); -#ifdef HAVE_PROTOTYPES - fprintf(outfile, "#define HAVE_PROTOTYPES\n"); -#else - fprintf(outfile, "#undef HAVE_PROTOTYPES\n"); -#endif -#ifdef HAVE_UNSIGNED_CHAR - fprintf(outfile, "#define HAVE_UNSIGNED_CHAR\n"); -#else - fprintf(outfile, "#undef HAVE_UNSIGNED_CHAR\n"); -#endif -#ifdef HAVE_UNSIGNED_SHORT - fprintf(outfile, "#define HAVE_UNSIGNED_SHORT\n"); -#else - fprintf(outfile, "#undef HAVE_UNSIGNED_SHORT\n"); -#endif -#ifdef HAVE_VOID - fprintf(outfile, "/* #define void char */\n"); -#else - fprintf(outfile, "#define void char\n"); -#endif -#ifdef HAVE_CONST - fprintf(outfile, "/* #define const */\n"); -#else - fprintf(outfile, "#define const\n"); -#endif - if (is_char_signed((int) signed_char_check)) - fprintf(outfile, "#undef CHAR_IS_UNSIGNED\n"); - else - fprintf(outfile, "#define CHAR_IS_UNSIGNED\n"); -#ifdef HAVE_STDDEF_H - fprintf(outfile, "#define HAVE_STDDEF_H\n"); -#else - fprintf(outfile, "#undef HAVE_STDDEF_H\n"); -#endif -#ifdef HAVE_STDLIB_H - fprintf(outfile, "#define HAVE_STDLIB_H\n"); -#else - fprintf(outfile, "#undef HAVE_STDLIB_H\n"); -#endif -#ifdef NEED_BSD_STRINGS - fprintf(outfile, "#define NEED_BSD_STRINGS\n"); -#else - fprintf(outfile, "#undef NEED_BSD_STRINGS\n"); -#endif -#ifdef NEED_SYS_TYPES_H - fprintf(outfile, "#define NEED_SYS_TYPES_H\n"); -#else - fprintf(outfile, "#undef NEED_SYS_TYPES_H\n"); -#endif - fprintf(outfile, "#undef NEED_FAR_POINTERS\n"); -#ifdef NEED_SHORT_EXTERNAL_NAMES - fprintf(outfile, "#define NEED_SHORT_EXTERNAL_NAMES\n"); -#else - fprintf(outfile, "#undef NEED_SHORT_EXTERNAL_NAMES\n"); -#endif -#ifdef INCOMPLETE_TYPES_BROKEN - fprintf(outfile, "#define INCOMPLETE_TYPES_BROKEN\n"); -#else - fprintf(outfile, "#undef INCOMPLETE_TYPES_BROKEN\n"); -#endif - fprintf(outfile, "\n#ifdef JPEG_INTERNALS\n\n"); - if (is_shifting_signed(-0x7F7E80B1L)) - fprintf(outfile, "#undef RIGHT_SHIFT_IS_UNSIGNED\n"); - else - fprintf(outfile, "#define RIGHT_SHIFT_IS_UNSIGNED\n"); - fprintf(outfile, "\n#endif /* JPEG_INTERNALS */\n"); - fprintf(outfile, "\n#ifdef JPEG_CJPEG_DJPEG\n\n"); - fprintf(outfile, "#define BMP_SUPPORTED /* BMP image file format */\n"); - fprintf(outfile, "#define GIF_SUPPORTED /* GIF image file format */\n"); - fprintf(outfile, "#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */\n"); - fprintf(outfile, "#undef RLE_SUPPORTED /* Utah RLE image file format */\n"); - fprintf(outfile, "#define TARGA_SUPPORTED /* Targa image file format */\n\n"); - fprintf(outfile, "#undef TWO_FILE_COMMANDLINE /* You may need this on non-Unix systems */\n"); - fprintf(outfile, "#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */\n"); - fprintf(outfile, "#undef DONT_USE_B_MODE\n"); - fprintf(outfile, "/* #define PROGRESS_REPORT */ /* optional */\n"); - fprintf(outfile, "\n#endif /* JPEG_CJPEG_DJPEG */\n"); - - /* Close the jconfig.h file */ - fclose(outfile); - - /* User report */ - printf("Configuration check for Independent JPEG Group's software done.\n"); - printf("\nI have written the jconfig.h file for you.\n\n"); -#ifdef HAVE_PROTOTYPES - printf("You should use makefile.ansi as the starting point for your Makefile.\n"); -#else - printf("You should use makefile.unix as the starting point for your Makefile.\n"); -#endif - -#ifdef NEED_SPECIAL_INCLUDE - printf("\nYou'll need to change jconfig.h to include the system include file\n"); - printf("that you found type size_t in, or add a direct definition of type\n"); - printf("size_t if that's what you used. Just add it to the end.\n"); -#endif - - return 0; -} diff --git a/gtkmm-osx/trunk/jpeg-6b/coderules.doc b/gtkmm-osx/trunk/jpeg-6b/coderules.doc deleted file mode 100644 index 0ab5d9b..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/coderules.doc +++ /dev/null @@ -1,118 +0,0 @@ -IJG JPEG LIBRARY: CODING RULES - -Copyright (C) 1991-1996, Thomas G. Lane. -This file is part of the Independent JPEG Group's software. -For conditions of distribution and use, see the accompanying README file. - - -Since numerous people will be contributing code and bug fixes, it's important -to establish a common coding style. The goal of using similar coding styles -is much more important than the details of just what that style is. - -In general we follow the recommendations of "Recommended C Style and Coding -Standards" revision 6.1 (Cannon et al. as modified by Spencer, Keppel and -Brader). This document is available in the IJG FTP archive (see -jpeg/doc/cstyle.ms.tbl.Z, or cstyle.txt.Z for those without nroff/tbl). - -Block comments should be laid out thusly: - -/* - * Block comments in this style. - */ - -We indent statements in K&R style, e.g., - if (test) { - then-part; - } else { - else-part; - } -with two spaces per indentation level. (This indentation convention is -handled automatically by GNU Emacs and many other text editors.) - -Multi-word names should be written in lower case with underscores, e.g., -multi_word_name (not multiWordName). Preprocessor symbols and enum constants -are similar but upper case (MULTI_WORD_NAME). Names should be unique within -the first fifteen characters. (On some older systems, global names must be -unique within six characters. We accommodate this without cluttering the -source code by using macros to substitute shorter names.) - -We use function prototypes everywhere; we rely on automatic source code -transformation to feed prototype-less C compilers. Transformation is done -by the simple and portable tool 'ansi2knr.c' (courtesy of Ghostscript). -ansi2knr is not very bright, so it imposes a format requirement on function -declarations: the function name MUST BEGIN IN COLUMN 1. Thus all functions -should be written in the following style: - -LOCAL(int *) -function_name (int a, char *b) -{ - code... -} - -Note that each function definition must begin with GLOBAL(type), LOCAL(type), -or METHODDEF(type). These macros expand to "static type" or just "type" as -appropriate. They provide a readable indication of the routine's usage and -can readily be changed for special needs. (For instance, special linkage -keywords can be inserted for use in Windows DLLs.) - -ansi2knr does not transform method declarations (function pointers in -structs). We handle these with a macro JMETHOD, defined as - #ifdef HAVE_PROTOTYPES - #define JMETHOD(type,methodname,arglist) type (*methodname) arglist - #else - #define JMETHOD(type,methodname,arglist) type (*methodname) () - #endif -which is used like this: - struct function_pointers { - JMETHOD(void, init_entropy_encoder, (int somearg, jparms *jp)); - JMETHOD(void, term_entropy_encoder, (void)); - }; -Note the set of parentheses surrounding the parameter list. - -A similar solution is used for forward and external function declarations -(see the EXTERN and JPP macros). - -If the code is to work on non-ANSI compilers, we cannot rely on a prototype -declaration to coerce actual parameters into the right types. Therefore, use -explicit casts on actual parameters whenever the actual parameter type is not -identical to the formal parameter. Beware of implicit conversions to "int". - -It seems there are some non-ANSI compilers in which the sizeof() operator -is defined to return int, yet size_t is defined as long. Needless to say, -this is brain-damaged. Always use the SIZEOF() macro in place of sizeof(), -so that the result is guaranteed to be of type size_t. - - -The JPEG library is intended to be used within larger programs. Furthermore, -we want it to be reentrant so that it can be used by applications that process -multiple images concurrently. The following rules support these requirements: - -1. Avoid direct use of file I/O, "malloc", error report printouts, etc; -pass these through the common routines provided. - -2. Minimize global namespace pollution. Functions should be declared static -wherever possible. (Note that our method-based calling conventions help this -a lot: in many modules only the initialization function will ever need to be -called directly, so only that function need be externally visible.) All -global function names should begin with "jpeg_", and should have an -abbreviated name (unique in the first six characters) substituted by macro -when NEED_SHORT_EXTERNAL_NAMES is set. - -3. Don't use global variables; anything that must be used in another module -should be in the common data structures. - -4. Don't use static variables except for read-only constant tables. Variables -that should be private to a module can be placed into private structures (see -the system architecture document, structure.doc). - -5. Source file names should begin with "j" for files that are part of the -library proper; source files that are not part of the library, such as cjpeg.c -and djpeg.c, do not begin with "j". Keep source file names to eight -characters (plus ".c" or ".h", etc) to make life easy for MS-DOSers. Keep -compression and decompression code in separate source files --- some -applications may want only one half of the library. - -Note: these rules (particularly #4) are not followed religiously in the -modules that are used in cjpeg/djpeg but are not part of the JPEG library -proper. Those modules are not really intended to be used in other -applications. diff --git a/gtkmm-osx/trunk/jpeg-6b/config.guess b/gtkmm-osx/trunk/jpeg-6b/config.guess deleted file mode 100755 index ba66165..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/config.guess +++ /dev/null @@ -1,1371 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -# Free Software Foundation, Inc. - -timestamp='2001-04-20' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Written by Per Bothner . -# Please send patches to . -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; - --version | -v ) - echo "$version" ; exit 0 ;; - --help | --h* | -h ) - echo "$usage"; exit 0 ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - - -dummy=dummy-$$ -trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int dummy(){}" > $dummy.c - for c in cc gcc c89 ; do - ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 - if test $? = 0 ; then - CC_FOR_BUILD="$c"; break - fi - done - rm -f $dummy.c $dummy.o $dummy.rel - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 8/24/94.) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # Netbsd (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # Determine the machine/vendor (is the vendor relevant). - case "${UNAME_MACHINE}" in - amiga) machine=m68k-unknown ;; - arm32) machine=arm-unknown ;; - atari*) machine=m68k-atari ;; - sun3*) machine=m68k-sun ;; - mac68k) machine=m68k-apple ;; - macppc) machine=powerpc-apple ;; - hp3[0-9][05]) machine=m68k-hp ;; - ibmrt|romp-ibm) machine=romp-ibm ;; - *) machine=${UNAME_MACHINE}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE}" in - i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit 0 ;; - alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - cat <$dummy.s - .data -\$Lformat: - .byte 37,100,45,37,120,10,0 # "%d-%x\n" - - .text - .globl main - .align 4 - .ent main -main: - .frame \$30,16,\$26,0 - ldgp \$29,0(\$27) - .prologue 1 - .long 0x47e03d80 # implver \$0 - lda \$2,-1 - .long 0x47e20c21 # amask \$2,\$1 - lda \$16,\$Lformat - mov \$0,\$17 - not \$1,\$18 - jsr \$26,printf - ldgp \$29,0(\$26) - mov 0,\$16 - jsr \$26,exit - .end main -EOF - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - case `./$dummy` in - 0-0) - UNAME_MACHINE="alpha" - ;; - 1-0) - UNAME_MACHINE="alphaev5" - ;; - 1-1) - UNAME_MACHINE="alphaev56" - ;; - 1-101) - UNAME_MACHINE="alphapca56" - ;; - 2-303) - UNAME_MACHINE="alphaev6" - ;; - 2-307) - UNAME_MACHINE="alphaev67" - ;; - esac - fi - rm -f $dummy.s $dummy - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit 0 ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit 0 ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit 0;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; - arc64:OpenBSD:*:*) - echo mips64el-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hkmips:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit 0 ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit 0;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit 0 ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit 0 ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit 0 ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit 0 ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD $dummy.c -o $dummy \ - && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit 0 ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit 0 ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit 0 ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit 0 ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit 0 ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit 0 ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit 0 ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit 0 ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit 0 ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit 0 ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit 0 ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - echo rs6000-ibm-aix3.2.5 - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit 0 ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit 0 ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit 0 ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit 0 ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit 0 ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit 0 ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - case "${HPUX_REV}" in - 11.[0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - esac ;; - esac - fi ;; - esac - if [ "${HP_ARCH}" = "" ]; then - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` - if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi - rm -f $dummy.c $dummy - fi ;; - esac - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; - 3050*:HI-UX:*:*) - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - echo unknown-hitachi-hiuxwe2 - exit 0 ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit 0 ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit 0 ;; - *9??*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit 0 ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit 0 ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit 0 ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit 0 ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit 0 ;; - hppa*:OpenBSD:*:*) - echo hppa-unknown-openbsd - exit 0 ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit 0 ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit 0 ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit 0 ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} - exit 0 ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ - exit 0 ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*T3D:*:*:*) - echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i386-pc-interix - exit 0 ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit 0 ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux - exit 0 ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - mips:Linux:*:*) - cat >$dummy.c < /* for printf() prototype */ -int main (int argc, char *argv[]) { -#else -int main (argc, argv) int argc; char *argv[]; { -#endif -#ifdef __MIPSEB__ - printf ("%s-unknown-linux-gnu\n", argv[1]); -#endif -#ifdef __MIPSEL__ - printf ("%sel-unknown-linux-gnu\n", argv[1]); -#endif - return 0; -} -EOF - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - ;; - ppc:Linux:*:*) - # Determine Lib Version - cat >$dummy.c < -#if defined(__GLIBC__) -extern char __libc_version[]; -extern char __libc_release[]; -#endif -main(argc, argv) - int argc; - char *argv[]; -{ -#if defined(__GLIBC__) - printf("%s %s\n", __libc_version, __libc_release); -#else - printf("unknown\n"); -#endif - return 0; -} -EOF - LIBC="" - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null - if test "$?" = 0 ; then - ./$dummy | grep 1\.99 > /dev/null - if test "$?" = 0 ; then LIBC="libc1" ; fi - fi - rm -f $dummy.c $dummy - echo powerpc-unknown-linux-gnu${LIBC} - exit 0 ;; - alpha:Linux:*:*) - cat <$dummy.s - .data - \$Lformat: - .byte 37,100,45,37,120,10,0 # "%d-%x\n" - .text - .globl main - .align 4 - .ent main - main: - .frame \$30,16,\$26,0 - ldgp \$29,0(\$27) - .prologue 1 - .long 0x47e03d80 # implver \$0 - lda \$2,-1 - .long 0x47e20c21 # amask \$2,\$1 - lda \$16,\$Lformat - mov \$0,\$17 - not \$1,\$18 - jsr \$26,printf - ldgp \$29,0(\$26) - mov 0,\$16 - jsr \$26,exit - .end main -EOF - LIBC="" - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - case `./$dummy` in - 0-0) UNAME_MACHINE="alpha" ;; - 1-0) UNAME_MACHINE="alphaev5" ;; - 1-1) UNAME_MACHINE="alphaev56" ;; - 1-101) UNAME_MACHINE="alphapca56" ;; - 2-303) UNAME_MACHINE="alphaev6" ;; - 2-307) UNAME_MACHINE="alphaev67" ;; - esac - objdump --private-headers $dummy | \ - grep ld.so.1 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi - fi - rm -f $dummy.s $dummy - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit 0 ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit 0 ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit 0 ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit 0 ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - ld_supported_emulations=`cd /; ld --help 2>&1 \ - | sed -ne '/supported emulations:/!d - s/[ ][ ]*/ /g - s/.*supported emulations: *// - s/ .*// - p'` - case "$ld_supported_emulations" in - i*86linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 - ;; - elf_i*86) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - i*86coff) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 - ;; - esac - # Either a pre-BFD a.out linker (linux-gnuoldld) - # or one that does not give us useful --help. - # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. - # If ld does not provide *any* "supported emulations:" - # that means it is gnuoldld. - test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 - case "${UNAME_MACHINE}" in - i*86) - VENDOR=pc; - ;; - *) - VENDOR=unknown; - ;; - esac - # Determine whether the default compiler is a.out or elf - cat >$dummy.c < -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif -#ifdef __ELF__ -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -#else - printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); -#endif - return 0; -} -EOF - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 - ;; -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions -# are messed up and put the nodename in both sysname and nodename. - i*86:DYNIX/ptx:4*:*) - echo i386-sequent-sysv4 - exit 0 ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit 0 ;; - i*86:*:5:7*) - # Fixed at (any) Pentium or better - UNAME_MACHINE=i586 - if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then - echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} - fi - exit 0 ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit 0 ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit 0 ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit 0 ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit 0 ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit 0 ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit 0 ;; - PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit 0 ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit 0 ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit 0 ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit 0 ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit 0 ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit 0 ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit 0 ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit 0 ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - *:Darwin:*:*) - echo `uname -p`-apple-darwin${UNAME_RELEASE} - exit 0 ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - if test "${UNAME_MACHINE}" = "x86pc"; then - UNAME_MACHINE=pc - fi - echo `uname -p`-${UNAME_MACHINE}-nto-qnx - exit 0 ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit 0 ;; - NSR-[KW]:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit 0 ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit 0 ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit 0 ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit 0 ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit 0 ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit 0 ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit 0 ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit 0 ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 -rm -f $dummy.c $dummy - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit 0 ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - c34*) - echo c34-convex-bsd - exit 0 ;; - c38*) - echo c38-convex-bsd - exit 0 ;; - c4*) - echo c4-convex-bsd - exit 0 ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/gtkmm-osx/trunk/jpeg-6b/config.sub b/gtkmm-osx/trunk/jpeg-6b/config.sub deleted file mode 100755 index 213a6d4..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/config.sub +++ /dev/null @@ -1,954 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -if [ x$1 = x ] -then - echo Configuration name missing. 1>&2 - echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 - echo "or $0 ALIAS" 1>&2 - echo where ALIAS is a recognized configuration type. 1>&2 - exit 1 -fi - -# First pass through any local machine types. -case $1 in - *local*) - echo $1 - exit 0 - ;; - *) - ;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - linux-gnu*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple) - os= - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco5) - os=sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ - | arme[lb] | pyramid | mn10200 | mn10300 \ - | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ - | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ - | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ - | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ - | mipstx39 | mipstx39el \ - | sparc | sparclet | sparclite | sparc64 | v850) - basic_machine=$basic_machine-unknown - ;; - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i[3456]86) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \ - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ - | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \ - | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ - | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ - | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mipstx39-* | mipstx39el-* \ - | f301-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-cbm - ;; - amigaos | amigados) - basic_machine=m68k-cbm - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-cbm - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [ctj]90-cray) - basic_machine=c90-cray - os=-unicos - ;; - crds | unos) - basic_machine=m68k-crds - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - os=-mvs - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[3456]86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i[3456]86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i[3456]86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i[3456]86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - miniframe) - basic_machine=m68000-convergent - ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - np1) - basic_machine=np1-gould - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pentium | p5) - basic_machine=i586-intel - ;; - pentiumpro | p6) - basic_machine=i686-intel - ;; - pentium-* | p5-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - k5) - # We don't have specific support for AMD's K5 yet, so just call it a Pentium - basic_machine=i586-amd - ;; - nexen) - # We don't have specific support for Nexgen yet, so just call it a Pentium - basic_machine=i586-nexgen - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=rs6000-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - xmp) - basic_machine=xmp-cray - os=-unicos - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; - romp) - basic_machine=romp-ibm - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sparc) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -ctix* | -uts*) - os=-sysv - ;; - -ns2 ) - os=-nextstep2 - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -xenix) - os=-xenix - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - *-acorn) - os=-riscix1.2 - ;; - arm*-semi) - os=-aout - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-ibm) - os=-aix - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f301-fujitsu) - os=-uxpv - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -hpux*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -vxsim* | -vxworks*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os diff --git a/gtkmm-osx/trunk/jpeg-6b/configure b/gtkmm-osx/trunk/jpeg-6b/configure deleted file mode 100755 index 35c9db5..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/configure +++ /dev/null @@ -1,2011 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help - --enable-shared build shared library using GNU libtool" -ac_help="$ac_help - --enable-static build static library using GNU libtool" -ac_help="$ac_help - --enable-maxmem[=N] enable use of temp files, set max mem usage to N MB" -ac_help="$ac_help -" - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *=*) - varname=`echo "$ac_option"|sed -e 's/=.*//'` - # Reject names that aren't valid shell variable names. - if test -n "`echo $varname| sed 's/[a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $varname: invalid shell variable name" 1>&2; exit 1; } - fi - val="`echo "$ac_option"|sed 's/[^=]*=//'`" - test -n "$verbose" && echo " setting shell variable $varname to $val" - eval "$varname='$val'" - eval "export $varname" ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=jcmaster.c - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:538: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:567: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - ac_prog_rejected=no - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:615: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:649: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:654: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes - test "${CFLAGS+set}" = set || CFLAGS="-O2" -else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-O" -fi - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:681: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - -echo $ac_n "checking for function prototypes""... $ac_c" 1>&6 -echo "configure:742: checking for function prototypes" >&5 -if eval "test \"`echo '$''{'ijg_cv_have_prototypes'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ijg_cv_have_prototypes=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ijg_cv_have_prototypes=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ijg_cv_have_prototypes" 1>&6 -if test $ijg_cv_have_prototypes = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_PROTOTYPES -EOF - -else - echo Your compiler does not seem to know about function prototypes. - echo Perhaps it needs a special switch to enable ANSI C mode. - echo If so, we recommend running configure like this: - echo " ./configure CC='cc -switch'" - echo where -switch is the proper switch. -fi -ac_safe=`echo "stddef.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for stddef.h""... $ac_c" 1>&6 -echo "configure:792: checking for stddef.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_STDDEF_H -EOF - -else - echo "$ac_t""no" 1>&6 -fi - -ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6 -echo "configure:828: checking for stdlib.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_STDLIB_H -EOF - -else - echo "$ac_t""no" 1>&6 -fi - -ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for string.h""... $ac_c" 1>&6 -echo "configure:864: checking for string.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 -cat >> confdefs.h <<\EOF -#define NEED_BSD_STRINGS -EOF - -fi - -echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:900: checking for size_t" >&5 -cat > conftest.$ac_ext < -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#include -#ifdef NEED_BSD_STRINGS -#include -#else -#include -#endif -typedef size_t my_size_t; - -int main() { - my_size_t foovar; -; return 0; } -EOF -if { (eval echo configure:923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ijg_size_t_ok=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ijg_size_t_ok="not ANSI, perhaps it is in sys/types.h" -fi -rm -f conftest* -echo "$ac_t""$ijg_size_t_ok" 1>&6 -if test "$ijg_size_t_ok" != yes; then -ac_safe=`echo "sys/types.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for sys/types.h""... $ac_c" 1>&6 -echo "configure:937: checking for sys/types.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define NEED_SYS_TYPES_H -EOF - -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "size_t" >/dev/null 2>&1; then - rm -rf conftest* - ijg_size_t_ok="size_t is in sys/types.h" -else - rm -rf conftest* - ijg_size_t_ok=no -fi -rm -f conftest* - -else - echo "$ac_t""no" 1>&6 -ijg_size_t_ok=no -fi - -echo "$ac_t""$ijg_size_t_ok" 1>&6 -if test "$ijg_size_t_ok" = no; then - echo Type size_t is not defined in any of the usual places. - echo Try putting '"typedef unsigned int size_t;"' in jconfig.h. -fi -fi -echo $ac_n "checking for type unsigned char""... $ac_c" 1>&6 -echo "configure:994: checking for type unsigned char" >&5 -cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -cat >> confdefs.h <<\EOF -#define HAVE_UNSIGNED_CHAR -EOF - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 -fi -rm -f conftest* -echo $ac_n "checking for type unsigned short""... $ac_c" 1>&6 -echo "configure:1018: checking for type unsigned short" >&5 -cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -cat >> confdefs.h <<\EOF -#define HAVE_UNSIGNED_SHORT -EOF - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 -fi -rm -f conftest* -echo $ac_n "checking for type void""... $ac_c" 1>&6 -echo "configure:1042: checking for type void" >&5 -cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 -cat >> confdefs.h <<\EOF -#define void char -EOF - -fi -rm -f conftest* - -echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1088: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <j = 5; -} -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; -} - -; return 0; } -EOF -if { (eval echo configure:1142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_const=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_c_const" 1>&6 -if test $ac_cv_c_const = no; then - cat >> confdefs.h <<\EOF -#define const -EOF - -fi - -echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1163: checking for inline" >&5 -ijg_cv_inline="" -cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ijg_cv_inline="__inline__" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ijg_cv_inline="__inline" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ijg_cv_inline="inline" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* -echo "$ac_t""$ijg_cv_inline" 1>&6 -cat >> confdefs.h <&6 -echo "configure:1224: checking for broken incomplete types" >&5 -cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""ok" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""broken" 1>&6 -cat >> confdefs.h <<\EOF -#define INCOMPLETE_TYPES_BROKEN -EOF - -fi -rm -f conftest* -echo $ac_n "checking for short external names""... $ac_c" 1>&6 -echo "configure:1248: checking for short external names" >&5 -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - echo "$ac_t""ok" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""short" 1>&6 -cat >> confdefs.h <<\EOF -#define NEED_SHORT_EXTERNAL_NAMES -EOF - -fi -rm -f conftest* -echo $ac_n "checking to see if char is signed""... $ac_c" 1>&6 -echo "configure:1275: checking to see if char is signed" >&5 -if test "$cross_compiling" = yes; then - echo Assuming that char is signed on target machine. -echo If it is unsigned, this will be a little bit inefficient. - -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - echo "$ac_t""no" 1>&6 -cat >> confdefs.h <<\EOF -#define CHAR_IS_UNSIGNED -EOF - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - echo "$ac_t""yes" 1>&6 -fi -rm -fr conftest* -fi - -echo $ac_n "checking to see if right shift is signed""... $ac_c" 1>&6 -echo "configure:1323: checking to see if right shift is signed" >&5 -if test "$cross_compiling" = yes; then - echo "$ac_t""Assuming that right shift is signed on target machine." 1>&6 -else - cat > conftest.$ac_ext <> 4; - - if (res == -0x7F7E80CL) { /* expected result for signed shift */ - return 1; /* right shift is signed */ - } - /* see if unsigned-shift hack will fix it. */ - /* we can't just test exact value since it depends on width of long... */ - res |= (~0L) << (32-4); - if (res == -0x7F7E80CL) { /* expected result now? */ - return 0; /* right shift is unsigned */ - } - printf("Right shift isn't acting as I expect it to.\n"); - printf("I fear the JPEG software will not work at all.\n\n"); - return 0; /* try it with unsigned anyway */ -} -main() { - exit(is_shifting_signed(-0x7F7E80B1L)); -} -EOF -if { (eval echo configure:1358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - echo "$ac_t""no" 1>&6 -cat >> confdefs.h <<\EOF -#define RIGHT_SHIFT_IS_UNSIGNED -EOF - -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - echo "$ac_t""yes" 1>&6 -fi -rm -fr conftest* -fi - -echo $ac_n "checking to see if fopen accepts b spec""... $ac_c" 1>&6 -echo "configure:1375: checking to see if fopen accepts b spec" >&5 -if test "$cross_compiling" = yes; then - echo "$ac_t""Assuming that it does." 1>&6 -else - cat > conftest.$ac_ext < -main() { - if (fopen("conftestdata", "wb") != NULL) - exit(0); - exit(1); -} -EOF -if { (eval echo configure:1390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - echo "$ac_t""no" 1>&6 -cat >> confdefs.h <<\EOF -#define DONT_USE_B_MODE -EOF - -fi -rm -fr conftest* -fi - -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1436: checking for a BSD compatible install" >&5 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1488: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -# Decide whether to use libtool, -# and if so whether to build shared, static, or both flavors of library. -LTSHARED="no" -# Check whether --enable-shared or --disable-shared was given. -if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - LTSHARED="$enableval" -fi - -LTSTATIC="no" -# Check whether --enable-static or --disable-static was given. -if test "${enable_static+set}" = set; then - enableval="$enable_static" - LTSTATIC="$enableval" -fi - -if test "x$LTSHARED" != xno -o "x$LTSTATIC" != xno; then - USELIBTOOL="yes" - LIBTOOL="./libtool" - O="lo" - A="la" - LN='$(LIBTOOL) --mode=link $(CC)' - INSTALL_LIB='$(LIBTOOL) --mode=install ${INSTALL}' - INSTALL_PROGRAM="\$(LIBTOOL) --mode=install $INSTALL_PROGRAM" -else - USELIBTOOL="no" - LIBTOOL="" - O="o" - A="a" - LN='$(CC)' - INSTALL_LIB="$INSTALL_DATA" -fi - - - - - - -# Configure libtool if needed. -if test $USELIBTOOL = yes; then - disable_shared= - disable_static= - if test "x$LTSHARED" = xno; then - disable_shared="--disable-shared" - fi - if test "x$LTSTATIC" = xno; then - disable_static="--disable-static" - fi - $srcdir/ltconfig $disable_shared $disable_static $srcdir/ltmain.sh -fi - -# Select memory manager depending on user input. -# If no "-enable-maxmem", use jmemnobs -MEMORYMGR='jmemnobs.$(O)' -MAXMEM="no" -# Check whether --enable-maxmem or --disable-maxmem was given. -if test "${enable_maxmem+set}" = set; then - enableval="$enable_maxmem" - MAXMEM="$enableval" -fi - -# support --with-maxmem for backwards compatibility with IJG V5. -# Check whether --with-maxmem or --without-maxmem was given. -if test "${with_maxmem+set}" = set; then - withval="$with_maxmem" - MAXMEM="$withval" -fi - -if test "x$MAXMEM" = xyes; then - MAXMEM=1 -fi -if test "x$MAXMEM" != xno; then - if test -n "`echo $MAXMEM | sed 's/[0-9]//g'`"; then - { echo "configure: error: non-numeric argument to --enable-maxmem" 1>&2; exit 1; } - fi - DEFAULTMAXMEM=`expr $MAXMEM \* 1048576` -cat >> confdefs.h <&6 -echo "configure:1596: checking for 'tmpfile()'" >&5 -cat > conftest.$ac_ext < -int main() { - FILE * tfile = tmpfile(); -; return 0; } -EOF -if { (eval echo configure:1605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -MEMORYMGR='jmemansi.$(O)' -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 -MEMORYMGR='jmemname.$(O)' -cat >> confdefs.h <<\EOF -#define NEED_SIGNAL_CATCHER -EOF - -echo $ac_n "checking for 'mktemp()'""... $ac_c" 1>&6 -echo "configure:1620: checking for 'mktemp()'" >&5 -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 -cat >> confdefs.h <<\EOF -#define NO_MKTEMP -EOF - -fi -rm -f conftest* -fi -rm -f conftest* -fi - - -# Extract the library version ID from jpeglib.h. -echo $ac_n "checking libjpeg version number""... $ac_c" 1>&6 -echo "configure:1650: checking libjpeg version number" >&5 -JPEG_LIB_VERSION=`sed -e '/^#define JPEG_LIB_VERSION/!d' -e 's/^[^0-9]*\([0-9][0-9]*\).*$/\1/' $srcdir/jpeglib.h` -echo "$ac_t""$JPEG_LIB_VERSION" 1>&6 - - -# Prepare to massage makefile.cfg correctly. -if test $ijg_cv_have_prototypes = yes; then - A2K_DEPS="" - COM_A2K="# " -else - A2K_DEPS="ansi2knr" - COM_A2K="" -fi - - -# ansi2knr needs -DBSD if string.h is missing -if test $ac_cv_header_string_h = no; then - ANSI2KNRFLAGS="-DBSD" -else - ANSI2KNRFLAGS="" -fi - -# Substitutions to enable or disable libtool-related stuff -if test $USELIBTOOL = yes -a $ijg_cv_have_prototypes = yes; then - COM_LT="" -else - COM_LT="# " -fi - -if test "x$LTSHARED" != xno; then - FORCE_INSTALL_LIB="install-lib" -else - FORCE_INSTALL_LIB="" -fi - -# Set up -I directives -if test "x$srcdir" = x.; then - INCLUDEFLAGS='-I$(srcdir)' -else - INCLUDEFLAGS='-I. -I$(srcdir)' -fi - -trap '' 1 2 15 - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -DEFS=-DHAVE_CONFIG_H - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" - -trap 'rm -fr `echo "Makefile:makefile.cfg jconfig.h:jconfig.cfg" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@CC@%$CC%g -s%@CPP@%$CPP%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@RANLIB@%$RANLIB%g -s%@LIBTOOL@%$LIBTOOL%g -s%@O@%$O%g -s%@A@%$A%g -s%@LN@%$LN%g -s%@INSTALL_LIB@%$INSTALL_LIB%g -s%@MEMORYMGR@%$MEMORYMGR%g -s%@JPEG_LIB_VERSION@%$JPEG_LIB_VERSION%g -s%@A2K_DEPS@%$A2K_DEPS%g -s%@COM_A2K@%$COM_A2K%g -s%@ANSI2KNRFLAGS@%$ANSI2KNRFLAGS%g -s%@COM_LT@%$COM_LT%g -s%@FORCE_INSTALL_LIB@%$FORCE_INSTALL_LIB%g -s%@INCLUDEFLAGS@%$INCLUDEFLAGS%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' -ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. - -rm -f conftest.tail -while : -do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS - echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file - fi -fi; done - -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - diff --git a/gtkmm-osx/trunk/jpeg-6b/djpeg.1 b/gtkmm-osx/trunk/jpeg-6b/djpeg.1 deleted file mode 100644 index 11beb6a..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/djpeg.1 +++ /dev/null @@ -1,253 +0,0 @@ -.TH DJPEG 1 "22 August 1997" -.SH NAME -djpeg \- decompress a JPEG file to an image file -.SH SYNOPSIS -.B djpeg -[ -.I options -] -[ -.I filename -] -.LP -.SH DESCRIPTION -.LP -.B djpeg -decompresses the named JPEG file, or the standard input if no file is named, -and produces an image file on the standard output. PBMPLUS (PPM/PGM), BMP, -GIF, Targa, or RLE (Utah Raster Toolkit) output format can be selected. -(RLE is supported only if the URT library is available.) -.SH OPTIONS -All switch names may be abbreviated; for example, -.B \-grayscale -may be written -.B \-gray -or -.BR \-gr . -Most of the "basic" switches can be abbreviated to as little as one letter. -Upper and lower case are equivalent (thus -.B \-BMP -is the same as -.BR \-bmp ). -British spellings are also accepted (e.g., -.BR \-greyscale ), -though for brevity these are not mentioned below. -.PP -The basic switches are: -.TP -.BI \-colors " N" -Reduce image to at most N colors. This reduces the number of colors used in -the output image, so that it can be displayed on a colormapped display or -stored in a colormapped file format. For example, if you have an 8-bit -display, you'd need to reduce to 256 or fewer colors. -.TP -.BI \-quantize " N" -Same as -.BR \-colors . -.B \-colors -is the recommended name, -.B \-quantize -is provided only for backwards compatibility. -.TP -.B \-fast -Select recommended processing options for fast, low quality output. (The -default options are chosen for highest quality output.) Currently, this is -equivalent to \fB\-dct fast \-nosmooth \-onepass \-dither ordered\fR. -.TP -.B \-grayscale -Force gray-scale output even if JPEG file is color. Useful for viewing on -monochrome displays; also, -.B djpeg -runs noticeably faster in this mode. -.TP -.BI \-scale " M/N" -Scale the output image by a factor M/N. Currently the scale factor must be -1/1, 1/2, 1/4, or 1/8. Scaling is handy if the image is larger than your -screen; also, -.B djpeg -runs much faster when scaling down the output. -.TP -.B \-bmp -Select BMP output format (Windows flavor). 8-bit colormapped format is -emitted if -.B \-colors -or -.B \-grayscale -is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color -format is emitted. -.TP -.B \-gif -Select GIF output format. Since GIF does not support more than 256 colors, -.B \-colors 256 -is assumed (unless you specify a smaller number of colors). -.TP -.B \-os2 -Select BMP output format (OS/2 1.x flavor). 8-bit colormapped format is -emitted if -.B \-colors -or -.B \-grayscale -is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color -format is emitted. -.TP -.B \-pnm -Select PBMPLUS (PPM/PGM) output format (this is the default format). -PGM is emitted if the JPEG file is gray-scale or if -.B \-grayscale -is specified; otherwise PPM is emitted. -.TP -.B \-rle -Select RLE output format. (Requires URT library.) -.TP -.B \-targa -Select Targa output format. Gray-scale format is emitted if the JPEG file is -gray-scale or if -.B \-grayscale -is specified; otherwise, colormapped format is emitted if -.B \-colors -is specified; otherwise, 24-bit full-color format is emitted. -.PP -Switches for advanced users: -.TP -.B \-dct int -Use integer DCT method (default). -.TP -.B \-dct fast -Use fast integer DCT (less accurate). -.TP -.B \-dct float -Use floating-point DCT method. -The float method is very slightly more accurate than the int method, but is -much slower unless your machine has very fast floating-point hardware. Also -note that results of the floating-point method may vary slightly across -machines, while the integer methods should give the same results everywhere. -The fast integer method is much less accurate than the other two. -.TP -.B \-dither fs -Use Floyd-Steinberg dithering in color quantization. -.TP -.B \-dither ordered -Use ordered dithering in color quantization. -.TP -.B \-dither none -Do not use dithering in color quantization. -By default, Floyd-Steinberg dithering is applied when quantizing colors; this -is slow but usually produces the best results. Ordered dither is a compromise -between speed and quality; no dithering is fast but usually looks awful. Note -that these switches have no effect unless color quantization is being done. -Ordered dither is only available in -.B \-onepass -mode. -.TP -.BI \-map " file" -Quantize to the colors used in the specified image file. This is useful for -producing multiple files with identical color maps, or for forcing a -predefined set of colors to be used. The -.I file -must be a GIF or PPM file. This option overrides -.B \-colors -and -.BR \-onepass . -.TP -.B \-nosmooth -Use a faster, lower-quality upsampling routine. -.TP -.B \-onepass -Use one-pass instead of two-pass color quantization. The one-pass method is -faster and needs less memory, but it produces a lower-quality image. -.B \-onepass -is ignored unless you also say -.B \-colors -.IR N . -Also, the one-pass method is always used for gray-scale output (the two-pass -method is no improvement then). -.TP -.BI \-maxmemory " N" -Set limit for amount of memory to use in processing large images. Value is -in thousands of bytes, or millions of bytes if "M" is attached to the -number. For example, -.B \-max 4m -selects 4000000 bytes. If more space is needed, temporary files will be used. -.TP -.BI \-outfile " name" -Send output image to the named file, not to standard output. -.TP -.B \-verbose -Enable debug printout. More -.BR \-v 's -give more output. Also, version information is printed at startup. -.TP -.B \-debug -Same as -.BR \-verbose . -.SH EXAMPLES -.LP -This example decompresses the JPEG file foo.jpg, quantizes it to -256 colors, and saves the output in 8-bit BMP format in foo.bmp: -.IP -.B djpeg \-colors 256 \-bmp -.I foo.jpg -.B > -.I foo.bmp -.SH HINTS -To get a quick preview of an image, use the -.B \-grayscale -and/or -.B \-scale -switches. -.B \-grayscale \-scale 1/8 -is the fastest case. -.PP -Several options are available that trade off image quality to gain speed. -.B \-fast -turns on the recommended settings. -.PP -.B \-dct fast -and/or -.B \-nosmooth -gain speed at a small sacrifice in quality. -When producing a color-quantized image, -.B \-onepass \-dither ordered -is fast but much lower quality than the default behavior. -.B \-dither none -may give acceptable results in two-pass mode, but is seldom tolerable in -one-pass mode. -.PP -If you are fortunate enough to have very fast floating point hardware, -\fB\-dct float\fR may be even faster than \fB\-dct fast\fR. But on most -machines \fB\-dct float\fR is slower than \fB\-dct int\fR; in this case it is -not worth using, because its theoretical accuracy advantage is too small to be -significant in practice. -.SH ENVIRONMENT -.TP -.B JPEGMEM -If this environment variable is set, its value is the default memory limit. -The value is specified as described for the -.B \-maxmemory -switch. -.B JPEGMEM -overrides the default value specified when the program was compiled, and -itself is overridden by an explicit -.BR \-maxmemory . -.SH SEE ALSO -.BR cjpeg (1), -.BR jpegtran (1), -.BR rdjpgcom (1), -.BR wrjpgcom (1) -.br -.BR ppm (5), -.BR pgm (5) -.br -Wallace, Gregory K. "The JPEG Still Picture Compression Standard", -Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. -.SH AUTHOR -Independent JPEG Group -.SH BUGS -Arithmetic coding is not supported for legal reasons. -.PP -To avoid the Unisys LZW patent, -.B djpeg -produces uncompressed GIF files. These are larger than they should be, but -are readable by standard GIF decoders. -.PP -Still not as fast as we'd like. diff --git a/gtkmm-osx/trunk/jpeg-6b/djpeg.c b/gtkmm-osx/trunk/jpeg-6b/djpeg.c deleted file mode 100644 index e099e90..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/djpeg.c +++ /dev/null @@ -1,616 +0,0 @@ -/* - * djpeg.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a command-line user interface for the JPEG decompressor. - * It should work on any system with Unix- or MS-DOS-style command lines. - * - * Two different command line styles are permitted, depending on the - * compile-time switch TWO_FILE_COMMANDLINE: - * djpeg [options] inputfile outputfile - * djpeg [options] [inputfile] - * In the second style, output is always to standard output, which you'd - * normally redirect to a file or pipe to some other program. Input is - * either from a named file or from standard input (typically redirected). - * The second style is convenient on Unix but is unhelpful on systems that - * don't support pipes. Also, you MUST use the first style if your system - * doesn't do binary I/O to stdin/stdout. - * To simplify script writing, the "-outfile" switch is provided. The syntax - * djpeg [options] -outfile outputfile inputfile - * works regardless of which command line style is used. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ -#include "jversion.h" /* for version message */ - -#include /* to declare isprint() */ - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - - -/* Create the add-on message string table. */ - -#define JMESSAGE(code,string) string , - -static const char * const cdjpeg_message_table[] = { -#include "cderror.h" - NULL -}; - - -/* - * This list defines the known output image formats - * (not all of which need be supported by a given version). - * You can change the default output format by defining DEFAULT_FMT; - * indeed, you had better do so if you undefine PPM_SUPPORTED. - */ - -typedef enum { - FMT_BMP, /* BMP format (Windows flavor) */ - FMT_GIF, /* GIF format */ - FMT_OS2, /* BMP format (OS/2 flavor) */ - FMT_PPM, /* PPM/PGM (PBMPLUS formats) */ - FMT_RLE, /* RLE format */ - FMT_TARGA, /* Targa format */ - FMT_TIFF /* TIFF format */ -} IMAGE_FORMATS; - -#ifndef DEFAULT_FMT /* so can override from CFLAGS in Makefile */ -#define DEFAULT_FMT FMT_PPM -#endif - -static IMAGE_FORMATS requested_fmt; - - -/* - * Argument-parsing code. - * The switch parser is designed to be useful with DOS-style command line - * syntax, ie, intermixed switches and file names, where only the switches - * to the left of a given file name affect processing of that file. - * The main program in this file doesn't actually use this capability... - */ - - -static const char * progname; /* program name for error messages */ -static char * outfilename; /* for -outfile switch */ - - -LOCAL(void) -usage (void) -/* complain about bad command line */ -{ - fprintf(stderr, "usage: %s [switches] ", progname); -#ifdef TWO_FILE_COMMANDLINE - fprintf(stderr, "inputfile outputfile\n"); -#else - fprintf(stderr, "[inputfile]\n"); -#endif - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf(stderr, " -colors N Reduce image to no more than N colors\n"); - fprintf(stderr, " -fast Fast, low-quality processing\n"); - fprintf(stderr, " -grayscale Force grayscale output\n"); -#ifdef IDCT_SCALING_SUPPORTED - fprintf(stderr, " -scale M/N Scale output image by fraction M/N, eg, 1/8\n"); -#endif -#ifdef BMP_SUPPORTED - fprintf(stderr, " -bmp Select BMP output format (Windows style)%s\n", - (DEFAULT_FMT == FMT_BMP ? " (default)" : "")); -#endif -#ifdef GIF_SUPPORTED - fprintf(stderr, " -gif Select GIF output format%s\n", - (DEFAULT_FMT == FMT_GIF ? " (default)" : "")); -#endif -#ifdef BMP_SUPPORTED - fprintf(stderr, " -os2 Select BMP output format (OS/2 style)%s\n", - (DEFAULT_FMT == FMT_OS2 ? " (default)" : "")); -#endif -#ifdef PPM_SUPPORTED - fprintf(stderr, " -pnm Select PBMPLUS (PPM/PGM) output format%s\n", - (DEFAULT_FMT == FMT_PPM ? " (default)" : "")); -#endif -#ifdef RLE_SUPPORTED - fprintf(stderr, " -rle Select Utah RLE output format%s\n", - (DEFAULT_FMT == FMT_RLE ? " (default)" : "")); -#endif -#ifdef TARGA_SUPPORTED - fprintf(stderr, " -targa Select Targa output format%s\n", - (DEFAULT_FMT == FMT_TARGA ? " (default)" : "")); -#endif - fprintf(stderr, "Switches for advanced users:\n"); -#ifdef DCT_ISLOW_SUPPORTED - fprintf(stderr, " -dct int Use integer DCT method%s\n", - (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : "")); -#endif -#ifdef DCT_IFAST_SUPPORTED - fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n", - (JDCT_DEFAULT == JDCT_IFAST ? " (default)" : "")); -#endif -#ifdef DCT_FLOAT_SUPPORTED - fprintf(stderr, " -dct float Use floating-point DCT method%s\n", - (JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : "")); -#endif - fprintf(stderr, " -dither fs Use F-S dithering (default)\n"); - fprintf(stderr, " -dither none Don't use dithering in quantization\n"); - fprintf(stderr, " -dither ordered Use ordered dither (medium speed, quality)\n"); -#ifdef QUANT_2PASS_SUPPORTED - fprintf(stderr, " -map FILE Map to colors used in named image file\n"); -#endif - fprintf(stderr, " -nosmooth Don't use high-quality upsampling\n"); -#ifdef QUANT_1PASS_SUPPORTED - fprintf(stderr, " -onepass Use 1-pass quantization (fast, low quality)\n"); -#endif - fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); - fprintf(stderr, " -outfile name Specify name for output file\n"); - fprintf(stderr, " -verbose or -debug Emit debug output\n"); - exit(EXIT_FAILURE); -} - - -LOCAL(int) -parse_switches (j_decompress_ptr cinfo, int argc, char **argv, - int last_file_arg_seen, boolean for_real) -/* Parse optional switches. - * Returns argv[] index of first file-name argument (== argc if none). - * Any file names with indexes <= last_file_arg_seen are ignored; - * they have presumably been processed in a previous iteration. - * (Pass 0 for last_file_arg_seen on the first or only iteration.) - * for_real is FALSE on the first (dummy) pass; we may skip any expensive - * processing. - */ -{ - int argn; - char * arg; - - /* Set up default JPEG parameters. */ - requested_fmt = DEFAULT_FMT; /* set default output file format */ - outfilename = NULL; - cinfo->err->trace_level = 0; - - /* Scan command line options, adjust parameters */ - - for (argn = 1; argn < argc; argn++) { - arg = argv[argn]; - if (*arg != '-') { - /* Not a switch, must be a file name argument */ - if (argn <= last_file_arg_seen) { - outfilename = NULL; /* -outfile applies to just one input file */ - continue; /* ignore this name if previously processed */ - } - break; /* else done parsing switches */ - } - arg++; /* advance past switch marker character */ - - if (keymatch(arg, "bmp", 1)) { - /* BMP output format. */ - requested_fmt = FMT_BMP; - - } else if (keymatch(arg, "colors", 1) || keymatch(arg, "colours", 1) || - keymatch(arg, "quantize", 1) || keymatch(arg, "quantise", 1)) { - /* Do color quantization. */ - int val; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%d", &val) != 1) - usage(); - cinfo->desired_number_of_colors = val; - cinfo->quantize_colors = TRUE; - - } else if (keymatch(arg, "dct", 2)) { - /* Select IDCT algorithm. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "int", 1)) { - cinfo->dct_method = JDCT_ISLOW; - } else if (keymatch(argv[argn], "fast", 2)) { - cinfo->dct_method = JDCT_IFAST; - } else if (keymatch(argv[argn], "float", 2)) { - cinfo->dct_method = JDCT_FLOAT; - } else - usage(); - - } else if (keymatch(arg, "dither", 2)) { - /* Select dithering algorithm. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "fs", 2)) { - cinfo->dither_mode = JDITHER_FS; - } else if (keymatch(argv[argn], "none", 2)) { - cinfo->dither_mode = JDITHER_NONE; - } else if (keymatch(argv[argn], "ordered", 2)) { - cinfo->dither_mode = JDITHER_ORDERED; - } else - usage(); - - } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) { - /* Enable debug printouts. */ - /* On first -d, print version identification */ - static boolean printed_version = FALSE; - - if (! printed_version) { - fprintf(stderr, "Independent JPEG Group's DJPEG, version %s\n%s\n", - JVERSION, JCOPYRIGHT); - printed_version = TRUE; - } - cinfo->err->trace_level++; - - } else if (keymatch(arg, "fast", 1)) { - /* Select recommended processing options for quick-and-dirty output. */ - cinfo->two_pass_quantize = FALSE; - cinfo->dither_mode = JDITHER_ORDERED; - if (! cinfo->quantize_colors) /* don't override an earlier -colors */ - cinfo->desired_number_of_colors = 216; - cinfo->dct_method = JDCT_FASTEST; - cinfo->do_fancy_upsampling = FALSE; - - } else if (keymatch(arg, "gif", 1)) { - /* GIF output format. */ - requested_fmt = FMT_GIF; - - } else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) { - /* Force monochrome output. */ - cinfo->out_color_space = JCS_GRAYSCALE; - - } else if (keymatch(arg, "map", 3)) { - /* Quantize to a color map taken from an input file. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (for_real) { /* too expensive to do twice! */ -#ifdef QUANT_2PASS_SUPPORTED /* otherwise can't quantize to supplied map */ - FILE * mapfile; - - if ((mapfile = fopen(argv[argn], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); - exit(EXIT_FAILURE); - } - read_color_map(cinfo, mapfile); - fclose(mapfile); - cinfo->quantize_colors = TRUE; -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } - - } else if (keymatch(arg, "maxmemory", 3)) { - /* Maximum memory in Kb (or Mb with 'm'). */ - long lval; - char ch = 'x'; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) - usage(); - if (ch == 'm' || ch == 'M') - lval *= 1000L; - cinfo->mem->max_memory_to_use = lval * 1000L; - - } else if (keymatch(arg, "nosmooth", 3)) { - /* Suppress fancy upsampling */ - cinfo->do_fancy_upsampling = FALSE; - - } else if (keymatch(arg, "onepass", 3)) { - /* Use fast one-pass quantization. */ - cinfo->two_pass_quantize = FALSE; - - } else if (keymatch(arg, "os2", 3)) { - /* BMP output format (OS/2 flavor). */ - requested_fmt = FMT_OS2; - - } else if (keymatch(arg, "outfile", 4)) { - /* Set output file name. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - outfilename = argv[argn]; /* save it away for later use */ - - } else if (keymatch(arg, "pnm", 1) || keymatch(arg, "ppm", 1)) { - /* PPM/PGM output format. */ - requested_fmt = FMT_PPM; - - } else if (keymatch(arg, "rle", 1)) { - /* RLE output format. */ - requested_fmt = FMT_RLE; - - } else if (keymatch(arg, "scale", 1)) { - /* Scale the output image by a fraction M/N. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%d/%d", - &cinfo->scale_num, &cinfo->scale_denom) != 2) - usage(); - - } else if (keymatch(arg, "targa", 1)) { - /* Targa output format. */ - requested_fmt = FMT_TARGA; - - } else { - usage(); /* bogus switch */ - } - } - - return argn; /* return index of next arg (file name) */ -} - - -/* - * Marker processor for COM and interesting APPn markers. - * This replaces the library's built-in processor, which just skips the marker. - * We want to print out the marker as text, to the extent possible. - * Note this code relies on a non-suspending data source. - */ - -LOCAL(unsigned int) -jpeg_getc (j_decompress_ptr cinfo) -/* Read next byte */ -{ - struct jpeg_source_mgr * datasrc = cinfo->src; - - if (datasrc->bytes_in_buffer == 0) { - if (! (*datasrc->fill_input_buffer) (cinfo)) - ERREXIT(cinfo, JERR_CANT_SUSPEND); - } - datasrc->bytes_in_buffer--; - return GETJOCTET(*datasrc->next_input_byte++); -} - - -METHODDEF(boolean) -print_text_marker (j_decompress_ptr cinfo) -{ - boolean traceit = (cinfo->err->trace_level >= 1); - INT32 length; - unsigned int ch; - unsigned int lastch = 0; - - length = jpeg_getc(cinfo) << 8; - length += jpeg_getc(cinfo); - length -= 2; /* discount the length word itself */ - - if (traceit) { - if (cinfo->unread_marker == JPEG_COM) - fprintf(stderr, "Comment, length %ld:\n", (long) length); - else /* assume it is an APPn otherwise */ - fprintf(stderr, "APP%d, length %ld:\n", - cinfo->unread_marker - JPEG_APP0, (long) length); - } - - while (--length >= 0) { - ch = jpeg_getc(cinfo); - if (traceit) { - /* Emit the character in a readable form. - * Nonprintables are converted to \nnn form, - * while \ is converted to \\. - * Newlines in CR, CR/LF, or LF form will be printed as one newline. - */ - if (ch == '\r') { - fprintf(stderr, "\n"); - } else if (ch == '\n') { - if (lastch != '\r') - fprintf(stderr, "\n"); - } else if (ch == '\\') { - fprintf(stderr, "\\\\"); - } else if (isprint(ch)) { - putc(ch, stderr); - } else { - fprintf(stderr, "\\%03o", ch); - } - lastch = ch; - } - } - - if (traceit) - fprintf(stderr, "\n"); - - return TRUE; -} - - -/* - * The main program. - */ - -int -main (int argc, char **argv) -{ - struct jpeg_decompress_struct cinfo; - struct jpeg_error_mgr jerr; -#ifdef PROGRESS_REPORT - struct cdjpeg_progress_mgr progress; -#endif - int file_index; - djpeg_dest_ptr dest_mgr = NULL; - FILE * input_file; - FILE * output_file; - JDIMENSION num_scanlines; - - /* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "djpeg"; /* in case C library doesn't provide it */ - - /* Initialize the JPEG decompression object with default error handling. */ - cinfo.err = jpeg_std_error(&jerr); - jpeg_create_decompress(&cinfo); - /* Add some application-specific error messages (from cderror.h) */ - jerr.addon_message_table = cdjpeg_message_table; - jerr.first_addon_message = JMSG_FIRSTADDONCODE; - jerr.last_addon_message = JMSG_LASTADDONCODE; - - /* Insert custom marker processor for COM and APP12. - * APP12 is used by some digital camera makers for textual info, - * so we provide the ability to display it as text. - * If you like, additional APPn marker types can be selected for display, - * but don't try to override APP0 or APP14 this way (see libjpeg.doc). - */ - jpeg_set_marker_processor(&cinfo, JPEG_COM, print_text_marker); - jpeg_set_marker_processor(&cinfo, JPEG_APP0+12, print_text_marker); - - /* Now safe to enable signal catcher. */ -#ifdef NEED_SIGNAL_CATCHER - enable_signal_catcher((j_common_ptr) &cinfo); -#endif - - /* Scan command line to find file names. */ - /* It is convenient to use just one switch-parsing routine, but the switch - * values read here are ignored; we will rescan the switches after opening - * the input file. - * (Exception: tracing level set here controls verbosity for COM markers - * found during jpeg_read_header...) - */ - - file_index = parse_switches(&cinfo, argc, argv, 0, FALSE); - -#ifdef TWO_FILE_COMMANDLINE - /* Must have either -outfile switch or explicit output file name */ - if (outfilename == NULL) { - if (file_index != argc-2) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - outfilename = argv[file_index+1]; - } else { - if (file_index != argc-1) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - } -#else - /* Unix style: expect zero or one file name */ - if (file_index < argc-1) { - fprintf(stderr, "%s: only one input file\n", progname); - usage(); - } -#endif /* TWO_FILE_COMMANDLINE */ - - /* Open the input file. */ - if (file_index < argc) { - if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]); - exit(EXIT_FAILURE); - } - } else { - /* default input file is stdin */ - input_file = read_stdin(); - } - - /* Open the output file. */ - if (outfilename != NULL) { - if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, outfilename); - exit(EXIT_FAILURE); - } - } else { - /* default output file is stdout */ - output_file = write_stdout(); - } - -#ifdef PROGRESS_REPORT - start_progress_monitor((j_common_ptr) &cinfo, &progress); -#endif - - /* Specify data source for decompression */ - jpeg_stdio_src(&cinfo, input_file); - - /* Read file header, set default decompression parameters */ - (void) jpeg_read_header(&cinfo, TRUE); - - /* Adjust default decompression parameters by re-parsing the options */ - file_index = parse_switches(&cinfo, argc, argv, 0, TRUE); - - /* Initialize the output module now to let it override any crucial - * option settings (for instance, GIF wants to force color quantization). - */ - switch (requested_fmt) { -#ifdef BMP_SUPPORTED - case FMT_BMP: - dest_mgr = jinit_write_bmp(&cinfo, FALSE); - break; - case FMT_OS2: - dest_mgr = jinit_write_bmp(&cinfo, TRUE); - break; -#endif -#ifdef GIF_SUPPORTED - case FMT_GIF: - dest_mgr = jinit_write_gif(&cinfo); - break; -#endif -#ifdef PPM_SUPPORTED - case FMT_PPM: - dest_mgr = jinit_write_ppm(&cinfo); - break; -#endif -#ifdef RLE_SUPPORTED - case FMT_RLE: - dest_mgr = jinit_write_rle(&cinfo); - break; -#endif -#ifdef TARGA_SUPPORTED - case FMT_TARGA: - dest_mgr = jinit_write_targa(&cinfo); - break; -#endif - default: - ERREXIT(&cinfo, JERR_UNSUPPORTED_FORMAT); - break; - } - dest_mgr->output_file = output_file; - - /* Start decompressor */ - (void) jpeg_start_decompress(&cinfo); - - /* Write output file header */ - (*dest_mgr->start_output) (&cinfo, dest_mgr); - - /* Process data */ - while (cinfo.output_scanline < cinfo.output_height) { - num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer, - dest_mgr->buffer_height); - (*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines); - } - -#ifdef PROGRESS_REPORT - /* Hack: count final pass as done in case finish_output does an extra pass. - * The library won't have updated completed_passes. - */ - progress.pub.completed_passes = progress.pub.total_passes; -#endif - - /* Finish decompression and release memory. - * I must do it in this order because output module has allocated memory - * of lifespan JPOOL_IMAGE; it needs to finish before releasing memory. - */ - (*dest_mgr->finish_output) (&cinfo, dest_mgr); - (void) jpeg_finish_decompress(&cinfo); - jpeg_destroy_decompress(&cinfo); - - /* Close files, if we opened them */ - if (input_file != stdin) - fclose(input_file); - if (output_file != stdout) - fclose(output_file); - -#ifdef PROGRESS_REPORT - end_progress_monitor((j_common_ptr) &cinfo); -#endif - - /* All done. */ - exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ -} diff --git a/gtkmm-osx/trunk/jpeg-6b/example.c b/gtkmm-osx/trunk/jpeg-6b/example.c deleted file mode 100644 index 7fc354f..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/example.c +++ /dev/null @@ -1,433 +0,0 @@ -/* - * example.c - * - * This file illustrates how to use the IJG code as a subroutine library - * to read or write JPEG image files. You should look at this code in - * conjunction with the documentation file libjpeg.doc. - * - * This code will not do anything useful as-is, but it may be helpful as a - * skeleton for constructing routines that call the JPEG library. - * - * We present these routines in the same coding style used in the JPEG code - * (ANSI function definitions, etc); but you are of course free to code your - * routines in a different style if you prefer. - */ - -#include - -/* - * Include file for users of JPEG library. - * You will need to have included system headers that define at least - * the typedefs FILE and size_t before you can include jpeglib.h. - * (stdio.h is sufficient on ANSI-conforming systems.) - * You may also wish to include "jerror.h". - */ - -#include "jpeglib.h" - -/* - * is used for the optional error recovery mechanism shown in - * the second part of the example. - */ - -#include - - - -/******************** JPEG COMPRESSION SAMPLE INTERFACE *******************/ - -/* This half of the example shows how to feed data into the JPEG compressor. - * We present a minimal version that does not worry about refinements such - * as error recovery (the JPEG code will just exit() if it gets an error). - */ - - -/* - * IMAGE DATA FORMATS: - * - * The standard input image format is a rectangular array of pixels, with - * each pixel having the same number of "component" values (color channels). - * Each pixel row is an array of JSAMPLEs (which typically are unsigned chars). - * If you are working with color data, then the color values for each pixel - * must be adjacent in the row; for example, R,G,B,R,G,B,R,G,B,... for 24-bit - * RGB color. - * - * For this example, we'll assume that this data structure matches the way - * our application has stored the image in memory, so we can just pass a - * pointer to our image buffer. In particular, let's say that the image is - * RGB color and is described by: - */ - -extern JSAMPLE * image_buffer; /* Points to large array of R,G,B-order data */ -extern int image_height; /* Number of rows in image */ -extern int image_width; /* Number of columns in image */ - - -/* - * Sample routine for JPEG compression. We assume that the target file name - * and a compression quality factor are passed in. - */ - -GLOBAL(void) -write_JPEG_file (char * filename, int quality) -{ - /* This struct contains the JPEG compression parameters and pointers to - * working space (which is allocated as needed by the JPEG library). - * It is possible to have several such structures, representing multiple - * compression/decompression processes, in existence at once. We refer - * to any one struct (and its associated working data) as a "JPEG object". - */ - struct jpeg_compress_struct cinfo; - /* This struct represents a JPEG error handler. It is declared separately - * because applications often want to supply a specialized error handler - * (see the second half of this file for an example). But here we just - * take the easy way out and use the standard error handler, which will - * print a message on stderr and call exit() if compression fails. - * Note that this struct must live as long as the main JPEG parameter - * struct, to avoid dangling-pointer problems. - */ - struct jpeg_error_mgr jerr; - /* More stuff */ - FILE * outfile; /* target file */ - JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */ - int row_stride; /* physical row width in image buffer */ - - /* Step 1: allocate and initialize JPEG compression object */ - - /* We have to set up the error handler first, in case the initialization - * step fails. (Unlikely, but it could happen if you are out of memory.) - * This routine fills in the contents of struct jerr, and returns jerr's - * address which we place into the link field in cinfo. - */ - cinfo.err = jpeg_std_error(&jerr); - /* Now we can initialize the JPEG compression object. */ - jpeg_create_compress(&cinfo); - - /* Step 2: specify data destination (eg, a file) */ - /* Note: steps 2 and 3 can be done in either order. */ - - /* Here we use the library-supplied code to send compressed data to a - * stdio stream. You can also write your own code to do something else. - * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that - * requires it in order to write binary files. - */ - if ((outfile = fopen(filename, "wb")) == NULL) { - fprintf(stderr, "can't open %s\n", filename); - exit(1); - } - jpeg_stdio_dest(&cinfo, outfile); - - /* Step 3: set parameters for compression */ - - /* First we supply a description of the input image. - * Four fields of the cinfo struct must be filled in: - */ - cinfo.image_width = image_width; /* image width and height, in pixels */ - cinfo.image_height = image_height; - cinfo.input_components = 3; /* # of color components per pixel */ - cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ - /* Now use the library's routine to set default compression parameters. - * (You must set at least cinfo.in_color_space before calling this, - * since the defaults depend on the source color space.) - */ - jpeg_set_defaults(&cinfo); - /* Now you can set any non-default parameters you wish to. - * Here we just illustrate the use of quality (quantization table) scaling: - */ - jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */); - - /* Step 4: Start compressor */ - - /* TRUE ensures that we will write a complete interchange-JPEG file. - * Pass TRUE unless you are very sure of what you're doing. - */ - jpeg_start_compress(&cinfo, TRUE); - - /* Step 5: while (scan lines remain to be written) */ - /* jpeg_write_scanlines(...); */ - - /* Here we use the library's state variable cinfo.next_scanline as the - * loop counter, so that we don't have to keep track ourselves. - * To keep things simple, we pass one scanline per call; you can pass - * more if you wish, though. - */ - row_stride = image_width * 3; /* JSAMPLEs per row in image_buffer */ - - while (cinfo.next_scanline < cinfo.image_height) { - /* jpeg_write_scanlines expects an array of pointers to scanlines. - * Here the array is only one element long, but you could pass - * more than one scanline at a time if that's more convenient. - */ - row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride]; - (void) jpeg_write_scanlines(&cinfo, row_pointer, 1); - } - - /* Step 6: Finish compression */ - - jpeg_finish_compress(&cinfo); - /* After finish_compress, we can close the output file. */ - fclose(outfile); - - /* Step 7: release JPEG compression object */ - - /* This is an important step since it will release a good deal of memory. */ - jpeg_destroy_compress(&cinfo); - - /* And we're done! */ -} - - -/* - * SOME FINE POINTS: - * - * In the above loop, we ignored the return value of jpeg_write_scanlines, - * which is the number of scanlines actually written. We could get away - * with this because we were only relying on the value of cinfo.next_scanline, - * which will be incremented correctly. If you maintain additional loop - * variables then you should be careful to increment them properly. - * Actually, for output to a stdio stream you needn't worry, because - * then jpeg_write_scanlines will write all the lines passed (or else exit - * with a fatal error). Partial writes can only occur if you use a data - * destination module that can demand suspension of the compressor. - * (If you don't know what that's for, you don't need it.) - * - * If the compressor requires full-image buffers (for entropy-coding - * optimization or a multi-scan JPEG file), it will create temporary - * files for anything that doesn't fit within the maximum-memory setting. - * (Note that temp files are NOT needed if you use the default parameters.) - * On some systems you may need to set up a signal handler to ensure that - * temporary files are deleted if the program is interrupted. See libjpeg.doc. - * - * Scanlines MUST be supplied in top-to-bottom order if you want your JPEG - * files to be compatible with everyone else's. If you cannot readily read - * your data in that order, you'll need an intermediate array to hold the - * image. See rdtarga.c or rdbmp.c for examples of handling bottom-to-top - * source data using the JPEG code's internal virtual-array mechanisms. - */ - - - -/******************** JPEG DECOMPRESSION SAMPLE INTERFACE *******************/ - -/* This half of the example shows how to read data from the JPEG decompressor. - * It's a bit more refined than the above, in that we show: - * (a) how to modify the JPEG library's standard error-reporting behavior; - * (b) how to allocate workspace using the library's memory manager. - * - * Just to make this example a little different from the first one, we'll - * assume that we do not intend to put the whole image into an in-memory - * buffer, but to send it line-by-line someplace else. We need a one- - * scanline-high JSAMPLE array as a work buffer, and we will let the JPEG - * memory manager allocate it for us. This approach is actually quite useful - * because we don't need to remember to deallocate the buffer separately: it - * will go away automatically when the JPEG object is cleaned up. - */ - - -/* - * ERROR HANDLING: - * - * The JPEG library's standard error handler (jerror.c) is divided into - * several "methods" which you can override individually. This lets you - * adjust the behavior without duplicating a lot of code, which you might - * have to update with each future release. - * - * Our example here shows how to override the "error_exit" method so that - * control is returned to the library's caller when a fatal error occurs, - * rather than calling exit() as the standard error_exit method does. - * - * We use C's setjmp/longjmp facility to return control. This means that the - * routine which calls the JPEG library must first execute a setjmp() call to - * establish the return point. We want the replacement error_exit to do a - * longjmp(). But we need to make the setjmp buffer accessible to the - * error_exit routine. To do this, we make a private extension of the - * standard JPEG error handler object. (If we were using C++, we'd say we - * were making a subclass of the regular error handler.) - * - * Here's the extended error handler struct: - */ - -struct my_error_mgr { - struct jpeg_error_mgr pub; /* "public" fields */ - - jmp_buf setjmp_buffer; /* for return to caller */ -}; - -typedef struct my_error_mgr * my_error_ptr; - -/* - * Here's the routine that will replace the standard error_exit method: - */ - -METHODDEF(void) -my_error_exit (j_common_ptr cinfo) -{ - /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */ - my_error_ptr myerr = (my_error_ptr) cinfo->err; - - /* Always display the message. */ - /* We could postpone this until after returning, if we chose. */ - (*cinfo->err->output_message) (cinfo); - - /* Return control to the setjmp point */ - longjmp(myerr->setjmp_buffer, 1); -} - - -/* - * Sample routine for JPEG decompression. We assume that the source file name - * is passed in. We want to return 1 on success, 0 on error. - */ - - -GLOBAL(int) -read_JPEG_file (char * filename) -{ - /* This struct contains the JPEG decompression parameters and pointers to - * working space (which is allocated as needed by the JPEG library). - */ - struct jpeg_decompress_struct cinfo; - /* We use our private extension JPEG error handler. - * Note that this struct must live as long as the main JPEG parameter - * struct, to avoid dangling-pointer problems. - */ - struct my_error_mgr jerr; - /* More stuff */ - FILE * infile; /* source file */ - JSAMPARRAY buffer; /* Output row buffer */ - int row_stride; /* physical row width in output buffer */ - - /* In this example we want to open the input file before doing anything else, - * so that the setjmp() error recovery below can assume the file is open. - * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that - * requires it in order to read binary files. - */ - - if ((infile = fopen(filename, "rb")) == NULL) { - fprintf(stderr, "can't open %s\n", filename); - return 0; - } - - /* Step 1: allocate and initialize JPEG decompression object */ - - /* We set up the normal JPEG error routines, then override error_exit. */ - cinfo.err = jpeg_std_error(&jerr.pub); - jerr.pub.error_exit = my_error_exit; - /* Establish the setjmp return context for my_error_exit to use. */ - if (setjmp(jerr.setjmp_buffer)) { - /* If we get here, the JPEG code has signaled an error. - * We need to clean up the JPEG object, close the input file, and return. - */ - jpeg_destroy_decompress(&cinfo); - fclose(infile); - return 0; - } - /* Now we can initialize the JPEG decompression object. */ - jpeg_create_decompress(&cinfo); - - /* Step 2: specify data source (eg, a file) */ - - jpeg_stdio_src(&cinfo, infile); - - /* Step 3: read file parameters with jpeg_read_header() */ - - (void) jpeg_read_header(&cinfo, TRUE); - /* We can ignore the return value from jpeg_read_header since - * (a) suspension is not possible with the stdio data source, and - * (b) we passed TRUE to reject a tables-only JPEG file as an error. - * See libjpeg.doc for more info. - */ - - /* Step 4: set parameters for decompression */ - - /* In this example, we don't need to change any of the defaults set by - * jpeg_read_header(), so we do nothing here. - */ - - /* Step 5: Start decompressor */ - - (void) jpeg_start_decompress(&cinfo); - /* We can ignore the return value since suspension is not possible - * with the stdio data source. - */ - - /* We may need to do some setup of our own at this point before reading - * the data. After jpeg_start_decompress() we have the correct scaled - * output image dimensions available, as well as the output colormap - * if we asked for color quantization. - * In this example, we need to make an output work buffer of the right size. - */ - /* JSAMPLEs per row in output buffer */ - row_stride = cinfo.output_width * cinfo.output_components; - /* Make a one-row-high sample array that will go away when done with image */ - buffer = (*cinfo.mem->alloc_sarray) - ((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1); - - /* Step 6: while (scan lines remain to be read) */ - /* jpeg_read_scanlines(...); */ - - /* Here we use the library's state variable cinfo.output_scanline as the - * loop counter, so that we don't have to keep track ourselves. - */ - while (cinfo.output_scanline < cinfo.output_height) { - /* jpeg_read_scanlines expects an array of pointers to scanlines. - * Here the array is only one element long, but you could ask for - * more than one scanline at a time if that's more convenient. - */ - (void) jpeg_read_scanlines(&cinfo, buffer, 1); - /* Assume put_scanline_someplace wants a pointer and sample count. */ - put_scanline_someplace(buffer[0], row_stride); - } - - /* Step 7: Finish decompression */ - - (void) jpeg_finish_decompress(&cinfo); - /* We can ignore the return value since suspension is not possible - * with the stdio data source. - */ - - /* Step 8: Release JPEG decompression object */ - - /* This is an important step since it will release a good deal of memory. */ - jpeg_destroy_decompress(&cinfo); - - /* After finish_decompress, we can close the input file. - * Here we postpone it until after no more JPEG errors are possible, - * so as to simplify the setjmp error logic above. (Actually, I don't - * think that jpeg_destroy can do an error exit, but why assume anything...) - */ - fclose(infile); - - /* At this point you may want to check to see whether any corrupt-data - * warnings occurred (test whether jerr.pub.num_warnings is nonzero). - */ - - /* And we're done! */ - return 1; -} - - -/* - * SOME FINE POINTS: - * - * In the above code, we ignored the return value of jpeg_read_scanlines, - * which is the number of scanlines actually read. We could get away with - * this because we asked for only one line at a time and we weren't using - * a suspending data source. See libjpeg.doc for more info. - * - * We cheated a bit by calling alloc_sarray() after jpeg_start_decompress(); - * we should have done it beforehand to ensure that the space would be - * counted against the JPEG max_memory setting. In some systems the above - * code would risk an out-of-memory error. However, in general we don't - * know the output image dimensions before jpeg_start_decompress(), unless we - * call jpeg_calc_output_dimensions(). See libjpeg.doc for more about this. - * - * Scanlines are returned in the same order as they appear in the JPEG file, - * which is standardly top-to-bottom. If you must emit data bottom-to-top, - * you can use one of the virtual arrays provided by the JPEG memory manager - * to invert the data. See wrbmp.c for an example. - * - * As with compression, some operating modes may require temporary files. - * On some systems you may need to set up a signal handler to ensure that - * temporary files are deleted if the program is interrupted. See libjpeg.doc. - */ diff --git a/gtkmm-osx/trunk/jpeg-6b/filelist.doc b/gtkmm-osx/trunk/jpeg-6b/filelist.doc deleted file mode 100644 index e14982c..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/filelist.doc +++ /dev/null @@ -1,210 +0,0 @@ -IJG JPEG LIBRARY: FILE LIST - -Copyright (C) 1994-1998, Thomas G. Lane. -This file is part of the Independent JPEG Group's software. -For conditions of distribution and use, see the accompanying README file. - - -Here is a road map to the files in the IJG JPEG distribution. The -distribution includes the JPEG library proper, plus two application -programs ("cjpeg" and "djpeg") which use the library to convert JPEG -files to and from some other popular image formats. A third application -"jpegtran" uses the library to do lossless conversion between different -variants of JPEG. There are also two stand-alone applications, -"rdjpgcom" and "wrjpgcom". - - -THE JPEG LIBRARY -================ - -Include files: - -jpeglib.h JPEG library's exported data and function declarations. -jconfig.h Configuration declarations. Note: this file is not present - in the distribution; it is generated during installation. -jmorecfg.h Additional configuration declarations; need not be changed - for a standard installation. -jerror.h Declares JPEG library's error and trace message codes. -jinclude.h Central include file used by all IJG .c files to reference - system include files. -jpegint.h JPEG library's internal data structures. -jchuff.h Private declarations for Huffman encoder modules. -jdhuff.h Private declarations for Huffman decoder modules. -jdct.h Private declarations for forward & reverse DCT subsystems. -jmemsys.h Private declarations for memory management subsystem. -jversion.h Version information. - -Applications using the library should include jpeglib.h (which in turn -includes jconfig.h and jmorecfg.h). Optionally, jerror.h may be included -if the application needs to reference individual JPEG error codes. The -other include files are intended for internal use and would not normally -be included by an application program. (cjpeg/djpeg/etc do use jinclude.h, -since its function is to improve portability of the whole IJG distribution. -Most other applications will directly include the system include files they -want, and hence won't need jinclude.h.) - - -C source code files: - -These files contain most of the functions intended to be called directly by -an application program: - -jcapimin.c Application program interface: core routines for compression. -jcapistd.c Application program interface: standard compression. -jdapimin.c Application program interface: core routines for decompression. -jdapistd.c Application program interface: standard decompression. -jcomapi.c Application program interface routines common to compression - and decompression. -jcparam.c Compression parameter setting helper routines. -jctrans.c API and library routines for transcoding compression. -jdtrans.c API and library routines for transcoding decompression. - -Compression side of the library: - -jcinit.c Initialization: determines which other modules to use. -jcmaster.c Master control: setup and inter-pass sequencing logic. -jcmainct.c Main buffer controller (preprocessor => JPEG compressor). -jcprepct.c Preprocessor buffer controller. -jccoefct.c Buffer controller for DCT coefficient buffer. -jccolor.c Color space conversion. -jcsample.c Downsampling. -jcdctmgr.c DCT manager (DCT implementation selection & control). -jfdctint.c Forward DCT using slow-but-accurate integer method. -jfdctfst.c Forward DCT using faster, less accurate integer method. -jfdctflt.c Forward DCT using floating-point arithmetic. -jchuff.c Huffman entropy coding for sequential JPEG. -jcphuff.c Huffman entropy coding for progressive JPEG. -jcmarker.c JPEG marker writing. -jdatadst.c Data destination manager for stdio output. - -Decompression side of the library: - -jdmaster.c Master control: determines which other modules to use. -jdinput.c Input controller: controls input processing modules. -jdmainct.c Main buffer controller (JPEG decompressor => postprocessor). -jdcoefct.c Buffer controller for DCT coefficient buffer. -jdpostct.c Postprocessor buffer controller. -jdmarker.c JPEG marker reading. -jdhuff.c Huffman entropy decoding for sequential JPEG. -jdphuff.c Huffman entropy decoding for progressive JPEG. -jddctmgr.c IDCT manager (IDCT implementation selection & control). -jidctint.c Inverse DCT using slow-but-accurate integer method. -jidctfst.c Inverse DCT using faster, less accurate integer method. -jidctflt.c Inverse DCT using floating-point arithmetic. -jidctred.c Inverse DCTs with reduced-size outputs. -jdsample.c Upsampling. -jdcolor.c Color space conversion. -jdmerge.c Merged upsampling/color conversion (faster, lower quality). -jquant1.c One-pass color quantization using a fixed-spacing colormap. -jquant2.c Two-pass color quantization using a custom-generated colormap. - Also handles one-pass quantization to an externally given map. -jdatasrc.c Data source manager for stdio input. - -Support files for both compression and decompression: - -jerror.c Standard error handling routines (application replaceable). -jmemmgr.c System-independent (more or less) memory management code. -jutils.c Miscellaneous utility routines. - -jmemmgr.c relies on a system-dependent memory management module. The IJG -distribution includes the following implementations of the system-dependent -module: - -jmemnobs.c "No backing store": assumes adequate virtual memory exists. -jmemansi.c Makes temporary files with ANSI-standard routine tmpfile(). -jmemname.c Makes temporary files with program-generated file names. -jmemdos.c Custom implementation for MS-DOS (16-bit environment only): - can use extended and expanded memory as well as temp files. -jmemmac.c Custom implementation for Apple Macintosh. - -Exactly one of the system-dependent modules should be configured into an -installed JPEG library (see install.doc for hints about which one to use). -On unusual systems you may find it worthwhile to make a special -system-dependent memory manager. - - -Non-C source code files: - -jmemdosa.asm 80x86 assembly code support for jmemdos.c; used only in - MS-DOS-specific configurations of the JPEG library. - - -CJPEG/DJPEG/JPEGTRAN -==================== - -Include files: - -cdjpeg.h Declarations shared by cjpeg/djpeg/jpegtran modules. -cderror.h Additional error and trace message codes for cjpeg et al. -transupp.h Declarations for jpegtran support routines in transupp.c. - -C source code files: - -cjpeg.c Main program for cjpeg. -djpeg.c Main program for djpeg. -jpegtran.c Main program for jpegtran. -cdjpeg.c Utility routines used by all three programs. -rdcolmap.c Code to read a colormap file for djpeg's "-map" switch. -rdswitch.c Code to process some of cjpeg's more complex switches. - Also used by jpegtran. -transupp.c Support code for jpegtran: lossless image manipulations. - -Image file reader modules for cjpeg: - -rdbmp.c BMP file input. -rdgif.c GIF file input (now just a stub). -rdppm.c PPM/PGM file input. -rdrle.c Utah RLE file input. -rdtarga.c Targa file input. - -Image file writer modules for djpeg: - -wrbmp.c BMP file output. -wrgif.c GIF file output (a mere shadow of its former self). -wrppm.c PPM/PGM file output. -wrrle.c Utah RLE file output. -wrtarga.c Targa file output. - - -RDJPGCOM/WRJPGCOM -================= - -C source code files: - -rdjpgcom.c Stand-alone rdjpgcom application. -wrjpgcom.c Stand-alone wrjpgcom application. - -These programs do not depend on the IJG library. They do use -jconfig.h and jinclude.h, only to improve portability. - - -ADDITIONAL FILES -================ - -Documentation (see README for a guide to the documentation files): - -README Master documentation file. -*.doc Other documentation files. -*.1 Documentation in Unix man page format. -change.log Version-to-version change highlights. -example.c Sample code for calling JPEG library. - -Configuration/installation files and programs (see install.doc for more info): - -configure Unix shell script to perform automatic configuration. -ltconfig Support scripts for configure (from GNU libtool). -ltmain.sh -config.guess -config.sub -install-sh Install shell script for those Unix systems lacking one. -ckconfig.c Program to generate jconfig.h on non-Unix systems. -jconfig.doc Template for making jconfig.h by hand. -makefile.* Sample makefiles for particular systems. -jconfig.* Sample jconfig.h for particular systems. -ansi2knr.c De-ANSIfier for pre-ANSI C compilers (courtesy of - L. Peter Deutsch and Aladdin Enterprises). - -Test files (see install.doc for test procedure): - -test*.* Source and comparison files for confidence test. - These are binary image files, NOT text files. diff --git a/gtkmm-osx/trunk/jpeg-6b/install-sh b/gtkmm-osx/trunk/jpeg-6b/install-sh deleted file mode 100755 index e843669..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/install-sh +++ /dev/null @@ -1,250 +0,0 @@ -#!/bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff --git a/gtkmm-osx/trunk/jpeg-6b/install.doc b/gtkmm-osx/trunk/jpeg-6b/install.doc deleted file mode 100644 index 3702b98..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/install.doc +++ /dev/null @@ -1,1063 +0,0 @@ -INSTALLATION INSTRUCTIONS for the Independent JPEG Group's JPEG software - -Copyright (C) 1991-1998, Thomas G. Lane. -This file is part of the Independent JPEG Group's software. -For conditions of distribution and use, see the accompanying README file. - - -This file explains how to configure and install the IJG software. We have -tried to make this software extremely portable and flexible, so that it can be -adapted to almost any environment. The downside of this decision is that the -installation process is complicated. We have provided shortcuts to simplify -the task on common systems. But in any case, you will need at least a little -familiarity with C programming and program build procedures for your system. - -If you are only using this software as part of a larger program, the larger -program's installation procedure may take care of configuring the IJG code. -For example, Ghostscript's installation script will configure the IJG code. -You don't need to read this file if you just want to compile Ghostscript. - -If you are on a Unix machine, you may not need to read this file at all. -Try doing - ./configure - make - make test -If that doesn't complain, do - make install -(better do "make -n install" first to see if the makefile will put the files -where you want them). Read further if you run into snags or want to customize -the code for your system. - - -TABLE OF CONTENTS ------------------ - -Before you start -Configuring the software: - using the automatic "configure" script - using one of the supplied jconfig and makefile files - by hand -Building the software -Testing the software -Installing the software -Optional stuff -Optimization -Hints for specific systems - - -BEFORE YOU START -================ - -Before installing the software you must unpack the distributed source code. -Since you are reading this file, you have probably already succeeded in this -task. However, there is a potential for error if you needed to convert the -files to the local standard text file format (for example, if you are on -MS-DOS you may have converted LF end-of-line to CR/LF). You must apply -such conversion to all the files EXCEPT those whose names begin with "test". -The test files contain binary data; if you change them in any way then the -self-test will give bad results. - -Please check the last section of this file to see if there are hints for the -specific machine or compiler you are using. - - -CONFIGURING THE SOFTWARE -======================== - -To configure the IJG code for your system, you need to create two files: - * jconfig.h: contains values for system-dependent #define symbols. - * Makefile: controls the compilation process. -(On a non-Unix machine, you may create "project files" or some other -substitute for a Makefile. jconfig.h is needed in any environment.) - -We provide three different ways to generate these files: - * On a Unix system, you can just run the "configure" script. - * We provide sample jconfig files and makefiles for popular machines; - if your machine matches one of the samples, just copy the right sample - files to jconfig.h and Makefile. - * If all else fails, read the instructions below and make your own files. - - -Configuring the software using the automatic "configure" script ---------------------------------------------------------------- - -If you are on a Unix machine, you can just type - ./configure -and let the configure script construct appropriate configuration files. -If you're using "csh" on an old version of System V, you might need to type - sh configure -instead to prevent csh from trying to execute configure itself. -Expect configure to run for a few minutes, particularly on slower machines; -it works by compiling a series of test programs. - -Configure was created with GNU Autoconf and it follows the usual conventions -for GNU configure scripts. It makes a few assumptions that you may want to -override. You can do this by providing optional switches to configure: - -* If you want to build libjpeg as a shared library, say - ./configure --enable-shared -To get both shared and static libraries, say - ./configure --enable-shared --enable-static -Note that these switches invoke GNU libtool to take care of system-dependent -shared library building methods. If things don't work this way, please try -running configure without either switch; that should build a static library -without using libtool. If that works, your problem is probably with libtool -not with the IJG code. libtool is fairly new and doesn't support all flavors -of Unix yet. (You might be able to find a newer version of libtool than the -one included with libjpeg; see ftp.gnu.org. Report libtool problems to -bug-libtool@gnu.org.) - -* Configure will use gcc (GNU C compiler) if it's available, otherwise cc. -To force a particular compiler to be selected, use the CC option, for example - ./configure CC='cc' -The same method can be used to include any unusual compiler switches. -For example, on HP-UX you probably want to say - ./configure CC='cc -Aa' -to get HP's compiler to run in ANSI mode. - -* The default CFLAGS setting is "-O" for non-gcc compilers, "-O2" for gcc. -You can override this by saying, for example, - ./configure CFLAGS='-g' -if you want to compile with debugging support. - -* Configure will set up the makefile so that "make install" will install files -into /usr/local/bin, /usr/local/man, etc. You can specify an installation -prefix other than "/usr/local" by giving configure the option "--prefix=PATH". - -* If you don't have a lot of swap space, you may need to enable the IJG -software's internal virtual memory mechanism. To do this, give the option -"--enable-maxmem=N" where N is the default maxmemory limit in megabytes. -This is discussed in more detail under "Selecting a memory manager", below. -You probably don't need to worry about this on reasonably-sized Unix machines, -unless you plan to process very large images. - -Configure has some other features that are useful if you are cross-compiling -or working in a network of multiple machine types; but if you need those -features, you probably already know how to use them. - - -Configuring the software using one of the supplied jconfig and makefile files ------------------------------------------------------------------------------ - -If you have one of these systems, you can just use the provided configuration -files: - -Makefile jconfig file System and/or compiler - -makefile.manx jconfig.manx Amiga, Manx Aztec C -makefile.sas jconfig.sas Amiga, SAS C -makeproj.mac jconfig.mac Apple Macintosh, Metrowerks CodeWarrior -mak*jpeg.st jconfig.st Atari ST/STE/TT, Pure C or Turbo C -makefile.bcc jconfig.bcc MS-DOS or OS/2, Borland C -makefile.dj jconfig.dj MS-DOS, DJGPP (Delorie's port of GNU C) -makefile.mc6 jconfig.mc6 MS-DOS, Microsoft C (16-bit only) -makefile.wat jconfig.wat MS-DOS, OS/2, or Windows NT, Watcom C -makefile.vc jconfig.vc Windows NT/95, MS Visual C++ -make*.ds jconfig.vc Windows NT/95, MS Developer Studio -makefile.mms jconfig.vms Digital VMS, with MMS software -makefile.vms jconfig.vms Digital VMS, without MMS software - -Copy the proper jconfig file to jconfig.h and the makefile to Makefile (or -whatever your system uses as the standard makefile name). For more info see -the appropriate system-specific hints section near the end of this file. - - -Configuring the software by hand --------------------------------- - -First, generate a jconfig.h file. If you are moderately familiar with C, -the comments in jconfig.doc should be enough information to do this; just -copy jconfig.doc to jconfig.h and edit it appropriately. Otherwise, you may -prefer to use the ckconfig.c program. You will need to compile and execute -ckconfig.c by hand --- we hope you know at least enough to do that. -ckconfig.c may not compile the first try (in fact, the whole idea is for it -to fail if anything is going to). If you get compile errors, fix them by -editing ckconfig.c according to the directions given in ckconfig.c. Once -you get it to run, it will write a suitable jconfig.h file, and will also -print out some advice about which makefile to use. - -You may also want to look at the canned jconfig files, if there is one for a -system similar to yours. - -Second, select a makefile and copy it to Makefile (or whatever your system -uses as the standard makefile name). The most generic makefiles we provide -are - makefile.ansi: if your C compiler supports function prototypes - makefile.unix: if not. -(You have function prototypes if ckconfig.c put "#define HAVE_PROTOTYPES" -in jconfig.h.) You may want to start from one of the other makefiles if -there is one for a system similar to yours. - -Look over the selected Makefile and adjust options as needed. In particular -you may want to change the CC and CFLAGS definitions. For instance, if you -are using GCC, set CC=gcc. If you had to use any compiler switches to get -ckconfig.c to work, make sure the same switches are in CFLAGS. - -If you are on a system that doesn't use makefiles, you'll need to set up -project files (or whatever you do use) to compile all the source files and -link them into executable files cjpeg, djpeg, jpegtran, rdjpgcom, and wrjpgcom. -See the file lists in any of the makefiles to find out which files go into -each program. Note that the provided makefiles all make a "library" file -libjpeg first, but you don't have to do that if you don't want to; the file -lists identify which source files are actually needed for compression, -decompression, or both. As a last resort, you can make a batch script that -just compiles everything and links it all together; makefile.vms is an example -of this (it's for VMS systems that have no make-like utility). - -Here are comments about some specific configuration decisions you'll -need to make: - -Command line style ------------------- - -These programs can use a Unix-like command line style which supports -redirection and piping, like this: - cjpeg inputfile >outputfile - cjpeg outputfile - source program | cjpeg >outputfile -The simpler "two file" command line style is just - cjpeg inputfile outputfile -You may prefer the two-file style, particularly if you don't have pipes. - -You MUST use two-file style on any system that doesn't cope well with binary -data fed through stdin/stdout; this is true for some MS-DOS compilers, for -example. If you're not on a Unix system, it's safest to assume you need -two-file style. (But if your compiler provides either the Posix-standard -fdopen() library routine or a Microsoft-compatible setmode() routine, you -can safely use the Unix command line style, by defining USE_FDOPEN or -USE_SETMODE respectively.) - -To use the two-file style, make jconfig.h say "#define TWO_FILE_COMMANDLINE". - -Selecting a memory manager --------------------------- - -The IJG code is capable of working on images that are too big to fit in main -memory; data is swapped out to temporary files as necessary. However, the -code to do this is rather system-dependent. We provide five different -memory managers: - -* jmemansi.c This version uses the ANSI-standard library routine tmpfile(), - which not all non-ANSI systems have. On some systems - tmpfile() may put the temporary file in a non-optimal - location; if you don't like what it does, use jmemname.c. - -* jmemname.c This version creates named temporary files. For anything - except a Unix machine, you'll need to configure the - select_file_name() routine appropriately; see the comments - near the head of jmemname.c. If you use this version, define - NEED_SIGNAL_CATCHER in jconfig.h to make sure the temp files - are removed if the program is aborted. - -* jmemnobs.c (That stands for No Backing Store :-).) This will compile on - almost any system, but it assumes you have enough main memory - or virtual memory to hold the biggest images you work with. - -* jmemdos.c This should be used with most 16-bit MS-DOS compilers. - See the system-specific notes about MS-DOS for more info. - IMPORTANT: if you use this, define USE_MSDOS_MEMMGR in - jconfig.h, and include the assembly file jmemdosa.asm in the - programs. The supplied makefiles and jconfig files for - 16-bit MS-DOS compilers already do both. - -* jmemmac.c Custom version for Apple Macintosh; see the system-specific - notes for Macintosh for more info. - -To use a particular memory manager, change the SYSDEPMEM variable in your -makefile to equal the corresponding object file name (for example, jmemansi.o -or jmemansi.obj for jmemansi.c). - -If you have plenty of (real or virtual) main memory, just use jmemnobs.c. -"Plenty" means about ten bytes for every pixel in the largest images -you plan to process, so a lot of systems don't meet this criterion. -If yours doesn't, try jmemansi.c first. If that doesn't compile, you'll have -to use jmemname.c; be sure to adjust select_file_name() for local conditions. -You may also need to change unlink() to remove() in close_backing_store(). - -Except with jmemnobs.c or jmemmac.c, you need to adjust the DEFAULT_MAX_MEM -setting to a reasonable value for your system (either by adding a #define for -DEFAULT_MAX_MEM to jconfig.h, or by adding a -D switch to the Makefile). -This value limits the amount of data space the program will attempt to -allocate. Code and static data space isn't counted, so the actual memory -needs for cjpeg or djpeg are typically 100 to 150Kb more than the max-memory -setting. Larger max-memory settings reduce the amount of I/O needed to -process a large image, but too large a value can result in "insufficient -memory" failures. On most Unix machines (and other systems with virtual -memory), just set DEFAULT_MAX_MEM to several million and forget it. At the -other end of the spectrum, for MS-DOS machines you probably can't go much -above 300K to 400K. (On MS-DOS the value refers to conventional memory only. -Extended/expanded memory is handled separately by jmemdos.c.) - - -BUILDING THE SOFTWARE -===================== - -Now you should be able to compile the software. Just say "make" (or -whatever's necessary to start the compilation). Have a cup of coffee. - -Here are some things that could go wrong: - -If your compiler complains about undefined structures, you should be able to -shut it up by putting "#define INCOMPLETE_TYPES_BROKEN" in jconfig.h. - -If you have trouble with missing system include files or inclusion of the -wrong ones, read jinclude.h. This shouldn't happen if you used configure -or ckconfig.c to set up jconfig.h. - -There are a fair number of routines that do not use all of their parameters; -some compilers will issue warnings about this, which you can ignore. There -are also a few configuration checks that may give "unreachable code" warnings. -Any other warning deserves investigation. - -If you don't have a getenv() library routine, define NO_GETENV. - -Also see the system-specific hints, below. - - -TESTING THE SOFTWARE -==================== - -As a quick test of functionality we've included a small sample image in -several forms: - testorig.jpg Starting point for the djpeg tests. - testimg.ppm The output of djpeg testorig.jpg - testimg.bmp The output of djpeg -bmp -colors 256 testorig.jpg - testimg.jpg The output of cjpeg testimg.ppm - testprog.jpg Progressive-mode equivalent of testorig.jpg. - testimgp.jpg The output of cjpeg -progressive -optimize testimg.ppm -(The first- and second-generation .jpg files aren't identical since JPEG is -lossy.) If you can generate duplicates of the testimg* files then you -probably have working programs. - -With most of the makefiles, "make test" will perform the necessary -comparisons. - -If you're using a makefile that doesn't provide the test option, run djpeg -and cjpeg by hand and compare the output files to testimg* with whatever -binary file comparison tool you have. The files should be bit-for-bit -identical. - -If the programs complain "MAX_ALLOC_CHUNK is wrong, please fix", then you -need to reduce MAX_ALLOC_CHUNK to a value that fits in type size_t. -Try adding "#define MAX_ALLOC_CHUNK 65520L" to jconfig.h. A less likely -configuration error is "ALIGN_TYPE is wrong, please fix": defining ALIGN_TYPE -as long should take care of that one. - -If the cjpeg test run fails with "Missing Huffman code table entry", it's a -good bet that you needed to define RIGHT_SHIFT_IS_UNSIGNED. Go back to the -configuration step and run ckconfig.c. (This is a good plan for any other -test failure, too.) - -If you are using Unix (one-file) command line style on a non-Unix system, -it's a good idea to check that binary I/O through stdin/stdout actually -works. You should get the same results from "djpeg out.ppm" -as from "djpeg -outfile out.ppm testorig.jpg". Note that the makefiles all -use the latter style and therefore do not exercise stdin/stdout! If this -check fails, try recompiling with USE_SETMODE or USE_FDOPEN defined. -If it still doesn't work, better use two-file style. - -If you chose a memory manager other than jmemnobs.c, you should test that -temporary-file usage works. Try "djpeg -bmp -colors 256 -max 0 testorig.jpg" -and make sure its output matches testimg.bmp. If you have any really large -images handy, try compressing them with -optimize and/or decompressing with --colors 256 to make sure your DEFAULT_MAX_MEM setting is not too large. - -NOTE: this is far from an exhaustive test of the JPEG software; some modules, -such as 1-pass color quantization, are not exercised at all. It's just a -quick test to give you some confidence that you haven't missed something -major. - - -INSTALLING THE SOFTWARE -======================= - -Once you're done with the above steps, you can install the software by -copying the executable files (cjpeg, djpeg, jpegtran, rdjpgcom, and wrjpgcom) -to wherever you normally install programs. On Unix systems, you'll also want -to put the man pages (cjpeg.1, djpeg.1, jpegtran.1, rdjpgcom.1, wrjpgcom.1) -in the man-page directory. The pre-fab makefiles don't support this step -since there's such a wide variety of installation procedures on different -systems. - -If you generated a Makefile with the "configure" script, you can just say - make install -to install the programs and their man pages into the standard places. -(You'll probably need to be root to do this.) We recommend first saying - make -n install -to see where configure thought the files should go. You may need to edit -the Makefile, particularly if your system's conventions for man page -filenames don't match what configure expects. - -If you want to install the IJG library itself, for use in compiling other -programs besides ours, then you need to put the four include files - jpeglib.h jerror.h jconfig.h jmorecfg.h -into your include-file directory, and put the library file libjpeg.a -(extension may vary depending on system) wherever library files go. -If you generated a Makefile with "configure", it will do what it thinks -is the right thing if you say - make install-lib - - -OPTIONAL STUFF -============== - -Progress monitor: - -If you like, you can #define PROGRESS_REPORT (in jconfig.h) to enable display -of percent-done progress reports. The routine provided in cdjpeg.c merely -prints percentages to stderr, but you can customize it to do something -fancier. - -Utah RLE file format support: - -We distribute the software with support for RLE image files (Utah Raster -Toolkit format) disabled, because the RLE support won't compile without the -Utah library. If you have URT version 3.1 or later, you can enable RLE -support as follows: - 1. #define RLE_SUPPORTED in jconfig.h. - 2. Add a -I option to CFLAGS in the Makefile for the directory - containing the URT .h files (typically the "include" - subdirectory of the URT distribution). - 3. Add -L... -lrle to LDLIBS in the Makefile, where ... specifies - the directory containing the URT "librle.a" file (typically the - "lib" subdirectory of the URT distribution). - -Support for 12-bit-deep pixel data: - -The JPEG standard allows either 8-bit or 12-bit data precision. (For color, -this means 8 or 12 bits per channel, of course.) If you need to work with -deeper than 8-bit data, you can compile the IJG code for 12-bit operation. -To do so: - 1. In jmorecfg.h, define BITS_IN_JSAMPLE as 12 rather than 8. - 2. In jconfig.h, undefine BMP_SUPPORTED, RLE_SUPPORTED, and TARGA_SUPPORTED, - because the code for those formats doesn't handle 12-bit data and won't - even compile. (The PPM code does work, as explained below. The GIF - code works too; it scales 8-bit GIF data to and from 12-bit depth - automatically.) - 3. Compile. Don't expect "make test" to pass, since the supplied test - files are for 8-bit data. - -Currently, 12-bit support does not work on 16-bit-int machines. - -Note that a 12-bit version will not read 8-bit JPEG files, nor vice versa; -so you'll want to keep around a regular 8-bit compilation as well. -(Run-time selection of data depth, to allow a single copy that does both, -is possible but would probably slow things down considerably; it's very low -on our to-do list.) - -The PPM reader (rdppm.c) can read 12-bit data from either text-format or -binary-format PPM and PGM files. Binary-format PPM/PGM files which have a -maxval greater than 255 are assumed to use 2 bytes per sample, LSB first -(little-endian order). As of early 1995, 2-byte binary format is not -officially supported by the PBMPLUS library, but it is expected that a -future release of PBMPLUS will support it. Note that the PPM reader will -read files of any maxval regardless of the BITS_IN_JSAMPLE setting; incoming -data is automatically rescaled to either maxval=255 or maxval=4095 as -appropriate for the cjpeg bit depth. - -The PPM writer (wrppm.c) will normally write 2-byte binary PPM or PGM -format, maxval 4095, when compiled with BITS_IN_JSAMPLE=12. Since this -format is not yet widely supported, you can disable it by compiling wrppm.c -with PPM_NORAWWORD defined; then the data is scaled down to 8 bits to make a -standard 1-byte/sample PPM or PGM file. (Yes, this means still another copy -of djpeg to keep around. But hopefully you won't need it for very long. -Poskanzer's supposed to get that new PBMPLUS release out Real Soon Now.) - -Of course, if you are working with 12-bit data, you probably have it stored -in some other, nonstandard format. In that case you'll probably want to -write your own I/O modules to read and write your format. - -Note that a 12-bit version of cjpeg always runs in "-optimize" mode, in -order to generate valid Huffman tables. This is necessary because our -default Huffman tables only cover 8-bit data. - -Removing code: - -If you need to make a smaller version of the JPEG software, some optional -functions can be removed at compile time. See the xxx_SUPPORTED #defines in -jconfig.h and jmorecfg.h. If at all possible, we recommend that you leave in -decoder support for all valid JPEG files, to ensure that you can read anyone's -output. Taking out support for image file formats that you don't use is the -most painless way to make the programs smaller. Another possibility is to -remove some of the DCT methods: in particular, the "IFAST" method may not be -enough faster than the others to be worth keeping on your machine. (If you -do remove ISLOW or IFAST, be sure to redefine JDCT_DEFAULT or JDCT_FASTEST -to a supported method, by adding a #define in jconfig.h.) - - -OPTIMIZATION -============ - -Unless you own a Cray, you'll probably be interested in making the JPEG -software go as fast as possible. This section covers some machine-dependent -optimizations you may want to try. We suggest that before trying any of -this, you first get the basic installation to pass the self-test step. -Repeat the self-test after any optimization to make sure that you haven't -broken anything. - -The integer DCT routines perform a lot of multiplications. These -multiplications must yield 32-bit results, but none of their input values -are more than 16 bits wide. On many machines, notably the 680x0 and 80x86 -CPUs, a 16x16=>32 bit multiply instruction is faster than a full 32x32=>32 -bit multiply. Unfortunately there is no portable way to specify such a -multiplication in C, but some compilers can generate one when you use the -right combination of casts. See the MULTIPLYxxx macro definitions in -jdct.h. If your compiler makes "int" be 32 bits and "short" be 16 bits, -defining SHORTxSHORT_32 is fairly likely to work. When experimenting with -alternate definitions, be sure to test not only whether the code still works -(use the self-test), but also whether it is actually faster --- on some -compilers, alternate definitions may compute the right answer, yet be slower -than the default. Timing cjpeg on a large PGM (grayscale) input file is the -best way to check this, as the DCT will be the largest fraction of the runtime -in that mode. (Note: some of the distributed compiler-specific jconfig files -already contain #define switches to select appropriate MULTIPLYxxx -definitions.) - -If your machine has sufficiently fast floating point hardware, you may find -that the float DCT method is faster than the integer DCT methods, even -after tweaking the integer multiply macros. In that case you may want to -make the float DCT be the default method. (The only objection to this is -that float DCT results may vary slightly across machines.) To do that, add -"#define JDCT_DEFAULT JDCT_FLOAT" to jconfig.h. Even if you don't change -the default, you should redefine JDCT_FASTEST, which is the method selected -by djpeg's -fast switch. Don't forget to update the documentation files -(usage.doc and/or cjpeg.1, djpeg.1) to agree with what you've done. - -If access to "short" arrays is slow on your machine, it may be a win to -define type JCOEF as int rather than short. This will cost a good deal of -memory though, particularly in some multi-pass modes, so don't do it unless -you have memory to burn and short is REALLY slow. - -If your compiler can compile function calls in-line, make sure the INLINE -macro in jmorecfg.h is defined as the keyword that marks a function -inline-able. Some compilers have a switch that tells the compiler to inline -any function it thinks is profitable (e.g., -finline-functions for gcc). -Enabling such a switch is likely to make the compiled code bigger but faster. - -In general, it's worth trying the maximum optimization level of your compiler, -and experimenting with any optional optimizations such as loop unrolling. -(Unfortunately, far too many compilers have optimizer bugs ... be prepared to -back off if the code fails self-test.) If you do any experimentation along -these lines, please report the optimal settings to jpeg-info@uunet.uu.net so -we can mention them in future releases. Be sure to specify your machine and -compiler version. - - -HINTS FOR SPECIFIC SYSTEMS -========================== - -We welcome reports on changes needed for systems not mentioned here. Submit -'em to jpeg-info@uunet.uu.net. Also, if configure or ckconfig.c is wrong -about how to configure the JPEG software for your system, please let us know. - - -Acorn RISC OS: - -(Thanks to Simon Middleton for these hints on compiling with Desktop C.) -After renaming the files according to Acorn conventions, take a copy of -makefile.ansi, change all occurrences of 'libjpeg.a' to 'libjpeg.o' and -change these definitions as indicated: - -CFLAGS= -throwback -IC: -Wn -LDLIBS=C:o.Stubs -SYSDEPMEM=jmemansi.o -LN=Link -AR=LibFile -c -o - -Also add a new line '.c.o:; $(cc) $< $(cflags) -c -o $@'. Remove the -lines '$(RM) libjpeg.o' and '$(AR2) libjpeg.o' and the 'jconfig.h' -dependency section. - -Copy jconfig.doc to jconfig.h. Edit jconfig.h to define TWO_FILE_COMMANDLINE -and CHAR_IS_UNSIGNED. - -Run the makefile using !AMU not !Make. If you want to use the 'clean' and -'test' makefile entries then you will have to fiddle with the syntax a bit -and rename the test files. - - -Amiga: - -SAS C 6.50 reportedly is too buggy to compile the IJG code properly. -A patch to update to 6.51 is available from SAS or AmiNet FTP sites. - -The supplied config files are set up to use jmemname.c as the memory -manager, with temporary files being created on the device named by -"JPEGTMP:". - - -Atari ST/STE/TT: - -Copy the project files makcjpeg.st, makdjpeg.st, maktjpeg.st, and makljpeg.st -to cjpeg.prj, djpeg.prj, jpegtran.prj, and libjpeg.prj respectively. The -project files should work as-is with Pure C. For Turbo C, change library -filenames "pc..." to "tc..." in each project file. Note that libjpeg.prj -selects jmemansi.c as the recommended memory manager. You'll probably want to -adjust the DEFAULT_MAX_MEM setting --- you want it to be a couple hundred K -less than your normal free memory. Put "#define DEFAULT_MAX_MEM nnnn" into -jconfig.h to do this. - -To use the 68881/68882 coprocessor for the floating point DCT, add the -compiler option "-8" to the project files and replace pcfltlib.lib with -pc881lib.lib in cjpeg.prj and djpeg.prj. Or if you don't have a -coprocessor, you may prefer to remove the float DCT code by undefining -DCT_FLOAT_SUPPORTED in jmorecfg.h (since without a coprocessor, the float -code will be too slow to be useful). In that case, you can delete -pcfltlib.lib from the project files. - -Note that you must make libjpeg.lib before making cjpeg.ttp, djpeg.ttp, -or jpegtran.ttp. You'll have to perform the self-test by hand. - -We haven't bothered to include project files for rdjpgcom and wrjpgcom. -Those source files should just be compiled by themselves; they don't -depend on the JPEG library. - -There is a bug in some older versions of the Turbo C library which causes the -space used by temporary files created with "tmpfile()" not to be freed after -an abnormal program exit. If you check your disk afterwards, you will find -cluster chains that are allocated but not used by a file. This should not -happen in cjpeg/djpeg/jpegtran, since we enable a signal catcher to explicitly -close temp files before exiting. But if you use the JPEG library with your -own code, be sure to supply a signal catcher, or else use a different -system-dependent memory manager. - - -Cray: - -Should you be so fortunate as to be running JPEG on a Cray YMP, there is a -compiler bug in old versions of Cray's Standard C (prior to 3.1). If you -still have an old compiler, you'll need to insert a line reading -"#pragma novector" just before the loop - for (i = 1; i <= (int) htbl->bits[l]; i++) - huffsize[p++] = (char) l; -in fix_huff_tbl (in V5beta1, line 204 of jchuff.c and line 176 of jdhuff.c). -[This bug may or may not still occur with the current IJG code, but it's -probably a dead issue anyway...] - - -HP-UX: - -If you have HP-UX 7.05 or later with the "software development" C compiler, -you should run the compiler in ANSI mode. If using the configure script, -say - ./configure CC='cc -Aa' -(or -Ae if you prefer). If configuring by hand, use makefile.ansi and add -"-Aa" to the CFLAGS line in the makefile. - -If you have a pre-7.05 system, or if you are using the non-ANSI C compiler -delivered with a minimum HP-UX system, then you must use makefile.unix -(and do NOT add -Aa); or just run configure without the CC option. - -On HP 9000 series 800 machines, the HP C compiler is buggy in revisions prior -to A.08.07. If you get complaints about "not a typedef name", you'll have to -use makefile.unix, or run configure without the CC option. - - -Macintosh, generic comments: - -The supplied user-interface files (cjpeg.c, djpeg.c, etc) are set up to -provide a Unix-style command line interface. You can use this interface on -the Mac by means of the ccommand() library routine provided by Metrowerks -CodeWarrior or Think C. This is only appropriate for testing the library, -however; to make a user-friendly equivalent of cjpeg/djpeg you'd really want -to develop a Mac-style user interface. There isn't a complete example -available at the moment, but there are some helpful starting points: -1. Sam Bushell's free "To JPEG" applet provides drag-and-drop conversion to -JPEG under System 7 and later. This only illustrates how to use the -compression half of the library, but it does a very nice job of that part. -The CodeWarrior source code is available from http://www.pobox.com/~jsam. -2. Jim Brunner prepared a Mac-style user interface for both compression and -decompression. Unfortunately, it hasn't been updated since IJG v4, and -the library's API has changed considerably since then. Still it may be of -some help, particularly as a guide to compiling the IJG code under Think C. -Jim's code is available from the Info-Mac archives, at sumex-aim.stanford.edu -or mirrors thereof; see file /info-mac/dev/src/jpeg-convert-c.hqx. - -jmemmac.c is the recommended memory manager back end for Macintosh. It uses -NewPtr/DisposePtr instead of malloc/free, and has a Mac-specific -implementation of jpeg_mem_available(). It also creates temporary files that -follow Mac conventions. (That part of the code relies on System-7-or-later OS -functions. See the comments in jmemmac.c if you need to run it on System 6.) -NOTE that USE_MAC_MEMMGR must be defined in jconfig.h to use jmemmac.c. - -You can also use jmemnobs.c, if you don't care about handling images larger -than available memory. If you use any memory manager back end other than -jmemmac.c, we recommend replacing "malloc" and "free" by "NewPtr" and -"DisposePtr", because Mac C libraries often have peculiar implementations of -malloc/free. (For instance, free() may not return the freed space to the -Mac Memory Manager. This is undesirable for the IJG code because jmemmgr.c -already clumps space requests.) - - -Macintosh, Metrowerks CodeWarrior: - -The Unix-command-line-style interface can be used by defining USE_CCOMMAND. -You'll also need to define TWO_FILE_COMMANDLINE to avoid stdin/stdout. -This means that when using the cjpeg/djpeg programs, you'll have to type the -input and output file names in the "Arguments" text-edit box, rather than -using the file radio buttons. (Perhaps USE_FDOPEN or USE_SETMODE would -eliminate the problem, but I haven't heard from anyone who's tried it.) - -On 680x0 Macs, Metrowerks defines type "double" as a 10-byte IEEE extended -float. jmemmgr.c won't like this: it wants sizeof(ALIGN_TYPE) to be a power -of 2. Add "#define ALIGN_TYPE long" to jconfig.h to eliminate the complaint. - -The supplied configuration file jconfig.mac can be used for your jconfig.h; -it includes all the recommended symbol definitions. If you have AppleScript -installed, you can run the supplied script makeproj.mac to create CodeWarrior -project files for the library and the testbed applications, then build the -library and applications. (Thanks to Dan Sears and Don Agro for this nifty -hack, which saves us from trying to maintain CodeWarrior project files as part -of the IJG distribution...) - - -Macintosh, Think C: - -The documentation in Jim Brunner's "JPEG Convert" source code (see above) -includes detailed build instructions for Think C; it's probably somewhat -out of date for the current release, but may be helpful. - -If you want to build the minimal command line version, proceed as follows. -You'll have to prepare project files for the programs; we don't include any -in the distribution since they are not text files. Use the file lists in -any of the supplied makefiles as a guide. Also add the ANSI and Unix C -libraries in a separate segment. You may need to divide the JPEG files into -more than one segment; we recommend dividing compression and decompression -modules. Define USE_CCOMMAND in jconfig.h so that the ccommand() routine is -called. You must also define TWO_FILE_COMMANDLINE because stdin/stdout -don't handle binary data correctly. - -On 680x0 Macs, Think C defines type "double" as a 12-byte IEEE extended float. -jmemmgr.c won't like this: it wants sizeof(ALIGN_TYPE) to be a power of 2. -Add "#define ALIGN_TYPE long" to jconfig.h to eliminate the complaint. - -jconfig.mac should work as a jconfig.h configuration file for Think C, -but the makeproj.mac AppleScript script is specific to CodeWarrior. Sorry. - - -MIPS R3000: - -MIPS's cc version 1.31 has a rather nasty optimization bug. Don't use -O -if you have that compiler version. (Use "cc -V" to check the version.) -Note that the R3000 chip is found in workstations from DEC and others. - - -MS-DOS, generic comments for 16-bit compilers: - -The IJG code is designed to work well in 80x86 "small" or "medium" memory -models (i.e., data pointers are 16 bits unless explicitly declared "far"; -code pointers can be either size). You may be able to use small model to -compile cjpeg or djpeg by itself, but you will probably have to use medium -model for any larger application. This won't make much difference in -performance. You *will* take a noticeable performance hit if you use a -large-data memory model, and you should avoid "huge" model if at all -possible. Be sure that NEED_FAR_POINTERS is defined in jconfig.h if you use -a small-data memory model; be sure it is NOT defined if you use a large-data -model. (The supplied makefiles and jconfig files for Borland and Microsoft C -compile in medium model and define NEED_FAR_POINTERS.) - -The DOS-specific memory manager, jmemdos.c, should be used if possible. -It needs some assembly-code routines which are in jmemdosa.asm; make sure -your makefile assembles that file and includes it in the library. If you -don't have a suitable assembler, you can get pre-assembled object files for -jmemdosa by FTP from ftp.uu.net:/graphics/jpeg/jdosaobj.zip. (DOS-oriented -distributions of the IJG source code often include these object files.) - -When using jmemdos.c, jconfig.h must define USE_MSDOS_MEMMGR and must set -MAX_ALLOC_CHUNK to less than 64K (65520L is a typical value). If your -C library's far-heap malloc() can't allocate blocks that large, reduce -MAX_ALLOC_CHUNK to whatever it can handle. - -If you can't use jmemdos.c for some reason --- for example, because you -don't have an assembler to assemble jmemdosa.asm --- you'll have to fall -back to jmemansi.c or jmemname.c. You'll probably still need to set -MAX_ALLOC_CHUNK in jconfig.h, because most DOS C libraries won't malloc() -more than 64K at a time. IMPORTANT: if you use jmemansi.c or jmemname.c, -you will have to compile in a large-data memory model in order to get the -right stdio library. Too bad. - -wrjpgcom needs to be compiled in large model, because it malloc()s a 64KB -work area to hold the comment text. If your C library's malloc can't -handle that, reduce MAX_COM_LENGTH as necessary in wrjpgcom.c. - -Most MS-DOS compilers treat stdin/stdout as text files, so you must use -two-file command line style. But if your compiler has either fdopen() or -setmode(), you can use one-file style if you like. To do this, define -USE_SETMODE or USE_FDOPEN so that stdin/stdout will be set to binary mode. -(USE_SETMODE seems to work with more DOS compilers than USE_FDOPEN.) You -should test that I/O through stdin/stdout produces the same results as I/O -to explicitly named files... the "make test" procedures in the supplied -makefiles do NOT use stdin/stdout. - - -MS-DOS, generic comments for 32-bit compilers: - -None of the above comments about memory models apply if you are using a -32-bit flat-memory-space environment, such as DJGPP or Watcom C. (And you -should use one if you have it, as performance will be much better than -8086-compatible code!) For flat-memory-space compilers, do NOT define -NEED_FAR_POINTERS, and do NOT use jmemdos.c. Use jmemnobs.c if the -environment supplies adequate virtual memory, otherwise use jmemansi.c or -jmemname.c. - -You'll still need to be careful about binary I/O through stdin/stdout. -See the last paragraph of the previous section. - - -MS-DOS, Borland C: - -Be sure to convert all the source files to DOS text format (CR/LF newlines). -Although Borland C will often work OK with unmodified Unix (LF newlines) -source files, sometimes it will give bogus compile errors. -"Illegal character '#'" is the most common such error. (This is true with -Borland C 3.1, but perhaps is fixed in newer releases.) - -If you want one-file command line style, just undefine TWO_FILE_COMMANDLINE. -jconfig.bcc already includes #define USE_SETMODE to make this work. -(fdopen does not work correctly.) - - -MS-DOS, Microsoft C: - -makefile.mc6 works with Microsoft C, DOS Visual C++, etc. It should only -be used if you want to build a 16-bit (small or medium memory model) program. - -If you want one-file command line style, just undefine TWO_FILE_COMMANDLINE. -jconfig.mc6 already includes #define USE_SETMODE to make this work. -(fdopen does not work correctly.) - -Note that this makefile assumes that the working copy of itself is called -"makefile". If you want to call it something else, say "makefile.mak", -be sure to adjust the dependency line that reads "$(RFILE) : makefile". -Otherwise the make will fail because it doesn't know how to create "makefile". -Worse, some releases of Microsoft's make utilities give an incorrect error -message in this situation. - -Old versions of MS C fail with an "out of macro expansion space" error -because they can't cope with the macro TRACEMS8 (defined in jerror.h). -If this happens to you, the easiest solution is to change TRACEMS8 to -expand to nothing. You'll lose the ability to dump out JPEG coefficient -tables with djpeg -debug -debug, but at least you can compile. - -Original MS C 6.0 is very buggy; it compiles incorrect code unless you turn -off optimization entirely (remove -O from CFLAGS). 6.00A is better, but it -still generates bad code if you enable loop optimizations (-Ol or -Ox). - -MS C 8.0 crashes when compiling jquant1.c with optimization switch /Oo ... -which is on by default. To work around this bug, compile that one file -with /Oo-. - - -Microsoft Windows (all versions), generic comments: - -Some Windows system include files define typedef boolean as "unsigned char". -The IJG code also defines typedef boolean, but we make it "int" by default. -This doesn't affect the IJG programs because we don't import those Windows -include files. But if you use the JPEG library in your own program, and some -of your program's files import one definition of boolean while some import the -other, you can get all sorts of mysterious problems. A good preventive step -is to make the IJG library use "unsigned char" for boolean. To do that, -add something like this to your jconfig.h file: - /* Define "boolean" as unsigned char, not int, per Windows custom */ - #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ - typedef unsigned char boolean; - #endif - #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ -(This is already in jconfig.vc, by the way.) - -windef.h contains the declarations - #define far - #define FAR far -Since jmorecfg.h tries to define FAR as empty, you may get a compiler -warning if you include both jpeglib.h and windef.h (which windows.h -includes). To suppress the warning, you can put "#ifndef FAR"/"#endif" -around the line "#define FAR" in jmorecfg.h. - -When using the library in a Windows application, you will almost certainly -want to modify or replace the error handler module jerror.c, since our -default error handler does a couple of inappropriate things: - 1. it tries to write error and warning messages on stderr; - 2. in event of a fatal error, it exits by calling exit(). - -A simple stopgap solution for problem 1 is to replace the line - fprintf(stderr, "%s\n", buffer); -(in output_message in jerror.c) with - MessageBox(GetActiveWindow(),buffer,"JPEG Error",MB_OK|MB_ICONERROR); -It's highly recommended that you at least do that much, since otherwise -error messages will disappear into nowhere. (Beginning with IJG v6b, this -code is already present in jerror.c; just define USE_WINDOWS_MESSAGEBOX in -jconfig.h to enable it.) - -The proper solution for problem 2 is to return control to your calling -application after a library error. This can be done with the setjmp/longjmp -technique discussed in libjpeg.doc and illustrated in example.c. (NOTE: -some older Windows C compilers provide versions of setjmp/longjmp that -don't actually work under Windows. You may need to use the Windows system -functions Catch and Throw instead.) - -The recommended memory manager under Windows is jmemnobs.c; in other words, -let Windows do any virtual memory management needed. You should NOT use -jmemdos.c nor jmemdosa.asm under Windows. - -For Windows 3.1, we recommend compiling in medium or large memory model; -for newer Windows versions, use a 32-bit flat memory model. (See the MS-DOS -sections above for more info about memory models.) In the 16-bit memory -models only, you'll need to put - #define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */ -into jconfig.h to limit allocation chunks to 64Kb. (Without that, you'd -have to use huge memory model, which slows things down unnecessarily.) -jmemnobs.c works without modification in large or flat memory models, but to -use medium model, you need to modify its jpeg_get_large and jpeg_free_large -routines to allocate far memory. In any case, you might like to replace -its calls to malloc and free with direct calls on Windows memory allocation -functions. - -You may also want to modify jdatasrc.c and jdatadst.c to use Windows file -operations rather than fread/fwrite. This is only necessary if your C -compiler doesn't provide a competent implementation of C stdio functions. - -You might want to tweak the RGB_xxx macros in jmorecfg.h so that the library -will accept or deliver color pixels in BGR sample order, not RGB; BGR order -is usually more convenient under Windows. Note that this change will break -the sample applications cjpeg/djpeg, but the library itself works fine. - - -Many people want to convert the IJG library into a DLL. This is reasonably -straightforward, but watch out for the following: - - 1. Don't try to compile as a DLL in small or medium memory model; use -large model, or even better, 32-bit flat model. Many places in the IJG code -assume the address of a local variable is an ordinary (not FAR) pointer; -that isn't true in a medium-model DLL. - - 2. Microsoft C cannot pass file pointers between applications and DLLs. -(See Microsoft Knowledge Base, PSS ID Number Q50336.) So jdatasrc.c and -jdatadst.c don't work if you open a file in your application and then pass -the pointer to the DLL. One workaround is to make jdatasrc.c/jdatadst.c -part of your main application rather than part of the DLL. - - 3. You'll probably need to modify the macros GLOBAL() and EXTERN() to -attach suitable linkage keywords to the exported routine names. Similarly, -you'll want to modify METHODDEF() and JMETHOD() to ensure function pointers -are declared in a way that lets application routines be called back through -the function pointers. These macros are in jmorecfg.h. Typical definitions -for a 16-bit DLL are: - #define GLOBAL(type) type _far _pascal _loadds _export - #define EXTERN(type) extern type _far _pascal _loadds - #define METHODDEF(type) static type _far _pascal - #define JMETHOD(type,methodname,arglist) \ - type (_far _pascal *methodname) arglist -For a 32-bit DLL you may want something like - #define GLOBAL(type) __declspec(dllexport) type - #define EXTERN(type) extern __declspec(dllexport) type -Although not all the GLOBAL routines are actually intended to be called by -the application, the performance cost of making them all DLL entry points is -negligible. - -The unmodified IJG library presents a very C-specific application interface, -so the resulting DLL is only usable from C or C++ applications. There has -been some talk of writing wrapper code that would present a simpler interface -usable from other languages, such as Visual Basic. This is on our to-do list -but hasn't been very high priority --- any volunteers out there? - - -Microsoft Windows, Borland C: - -The provided jconfig.bcc should work OK in a 32-bit Windows environment, -but you'll need to tweak it in a 16-bit environment (you'd need to define -NEED_FAR_POINTERS and MAX_ALLOC_CHUNK). Beware that makefile.bcc will need -alteration if you want to use it for Windows --- in particular, you should -use jmemnobs.c not jmemdos.c under Windows. - -Borland C++ 4.5 fails with an internal compiler error when trying to compile -jdmerge.c in 32-bit mode. If enough people complain, perhaps Borland will fix -it. In the meantime, the simplest known workaround is to add a redundant -definition of the variable range_limit in h2v1_merged_upsample(), at the head -of the block that handles odd image width (about line 268 in v6 jdmerge.c): - /* If image width is odd, do the last output column separately */ - if (cinfo->output_width & 1) { - register JSAMPLE * range_limit = cinfo->sample_range_limit; /* ADD THIS */ - cb = GETJSAMPLE(*inptr1); -Pretty bizarre, especially since the very similar routine h2v2_merged_upsample -doesn't trigger the bug. -Recent reports suggest that this bug does not occur with "bcc32a" (the -Pentium-optimized version of the compiler). - -Another report from a user of Borland C 4.5 was that incorrect code (leading -to a color shift in processed images) was produced if any of the following -optimization switch combinations were used: - -Ot -Og - -Ot -Op - -Ot -Om -So try backing off on optimization if you see such a problem. (Are there -several different releases all numbered "4.5"??) - - -Microsoft Windows, Microsoft Visual C++: - -jconfig.vc should work OK with any Microsoft compiler for a 32-bit memory -model. makefile.vc is intended for command-line use. (If you are using -the Developer Studio environment, you may prefer the DevStudio project -files; see below.) - -Some users feel that it's easier to call the library from C++ code if you -force VC++ to treat the library as C++ code, which you can do by renaming -all the *.c files to *.cpp (and adjusting the makefile to match). This -avoids the need to put extern "C" { ... } around #include "jpeglib.h" in -your C++ application. - - -Microsoft Windows, Microsoft Developer Studio: - -We include makefiles that should work as project files in DevStudio 4.2 or -later. There is a library makefile that builds the IJG library as a static -Win32 library, and an application makefile that builds the sample applications -as Win32 console applications. (Even if you only want the library, we -recommend building the applications so that you can run the self-test.) - -To use: -1. Copy jconfig.vc to jconfig.h, makelib.ds to jpeg.mak, and - makeapps.ds to apps.mak. (Note that the renaming is critical!) -2. Click on the .mak files to construct project workspaces. - (If you are using DevStudio more recent than 4.2, you'll probably - get a message saying that the makefiles are being updated.) -3. Build the library project, then the applications project. -4. Move the application .exe files from `app`\Release to an - appropriate location on your path. -5. To perform the self-test, execute the command line - NMAKE /f makefile.vc test - - -OS/2, Borland C++: - -Watch out for optimization bugs in older Borland compilers; you may need -to back off the optimization switch settings. See the comments in -makefile.bcc. - - -SGI: - -On some SGI systems, you may need to set "AR2= ar -ts" in the Makefile. -If you are using configure, you can do this by saying - ./configure RANLIB='ar -ts' -This change is not needed on all SGIs. Use it only if the make fails at the -stage of linking the completed programs. - -On the MIPS R4000 architecture (Indy, etc.), the compiler option "-mips2" -reportedly speeds up the float DCT method substantially, enough to make it -faster than the default int method (but still slower than the fast int -method). If you use -mips2, you may want to alter the default DCT method to -be float. To do this, put "#define JDCT_DEFAULT JDCT_FLOAT" in jconfig.h. - - -VMS: - -On an Alpha/VMS system with MMS, be sure to use the "/Marco=Alpha=1" -qualifier with MMS when building the JPEG package. - -VAX/VMS v5.5-1 may have problems with the test step of the build procedure -reporting differences when it compares the original and test images. If the -error points to the last block of the files, it is most likely bogus and may -be safely ignored. It seems to be because the files are Stream_LF and -Backup/Compare has difficulty with the (presumably) null padded files. -This problem was not observed on VAX/VMS v6.1 or AXP/VMS v6.1. diff --git a/gtkmm-osx/trunk/jpeg-6b/jcapimin.c b/gtkmm-osx/trunk/jpeg-6b/jcapimin.c deleted file mode 100644 index 54fb8c5..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jcapimin.c +++ /dev/null @@ -1,280 +0,0 @@ -/* - * jcapimin.c - * - * Copyright (C) 1994-1998, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains application interface code for the compression half - * of the JPEG library. These are the "minimum" API routines that may be - * needed in either the normal full-compression case or the transcoding-only - * case. - * - * Most of the routines intended to be called directly by an application - * are in this file or in jcapistd.c. But also see jcparam.c for - * parameter-setup helper routines, jcomapi.c for routines shared by - * compression and decompression, and jctrans.c for the transcoding case. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* - * Initialization of a JPEG compression object. - * The error manager must already be set up (in case memory manager fails). - */ - -GLOBAL(void) -jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize) -{ - int i; - - /* Guard against version mismatches between library and caller. */ - cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */ - if (version != JPEG_LIB_VERSION) - ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version); - if (structsize != SIZEOF(struct jpeg_compress_struct)) - ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, - (int) SIZEOF(struct jpeg_compress_struct), (int) structsize); - - /* For debugging purposes, we zero the whole master structure. - * But the application has already set the err pointer, and may have set - * client_data, so we have to save and restore those fields. - * Note: if application hasn't set client_data, tools like Purify may - * complain here. - */ - { - struct jpeg_error_mgr * err = cinfo->err; - void * client_data = cinfo->client_data; /* ignore Purify complaint here */ - MEMZERO(cinfo, SIZEOF(struct jpeg_compress_struct)); - cinfo->err = err; - cinfo->client_data = client_data; - } - cinfo->is_decompressor = FALSE; - - /* Initialize a memory manager instance for this object */ - jinit_memory_mgr((j_common_ptr) cinfo); - - /* Zero out pointers to permanent structures. */ - cinfo->progress = NULL; - cinfo->dest = NULL; - - cinfo->comp_info = NULL; - - for (i = 0; i < NUM_QUANT_TBLS; i++) - cinfo->quant_tbl_ptrs[i] = NULL; - - for (i = 0; i < NUM_HUFF_TBLS; i++) { - cinfo->dc_huff_tbl_ptrs[i] = NULL; - cinfo->ac_huff_tbl_ptrs[i] = NULL; - } - - cinfo->script_space = NULL; - - cinfo->input_gamma = 1.0; /* in case application forgets */ - - /* OK, I'm ready */ - cinfo->global_state = CSTATE_START; -} - - -/* - * Destruction of a JPEG compression object - */ - -GLOBAL(void) -jpeg_destroy_compress (j_compress_ptr cinfo) -{ - jpeg_destroy((j_common_ptr) cinfo); /* use common routine */ -} - - -/* - * Abort processing of a JPEG compression operation, - * but don't destroy the object itself. - */ - -GLOBAL(void) -jpeg_abort_compress (j_compress_ptr cinfo) -{ - jpeg_abort((j_common_ptr) cinfo); /* use common routine */ -} - - -/* - * Forcibly suppress or un-suppress all quantization and Huffman tables. - * Marks all currently defined tables as already written (if suppress) - * or not written (if !suppress). This will control whether they get emitted - * by a subsequent jpeg_start_compress call. - * - * This routine is exported for use by applications that want to produce - * abbreviated JPEG datastreams. It logically belongs in jcparam.c, but - * since it is called by jpeg_start_compress, we put it here --- otherwise - * jcparam.o would be linked whether the application used it or not. - */ - -GLOBAL(void) -jpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress) -{ - int i; - JQUANT_TBL * qtbl; - JHUFF_TBL * htbl; - - for (i = 0; i < NUM_QUANT_TBLS; i++) { - if ((qtbl = cinfo->quant_tbl_ptrs[i]) != NULL) - qtbl->sent_table = suppress; - } - - for (i = 0; i < NUM_HUFF_TBLS; i++) { - if ((htbl = cinfo->dc_huff_tbl_ptrs[i]) != NULL) - htbl->sent_table = suppress; - if ((htbl = cinfo->ac_huff_tbl_ptrs[i]) != NULL) - htbl->sent_table = suppress; - } -} - - -/* - * Finish JPEG compression. - * - * If a multipass operating mode was selected, this may do a great deal of - * work including most of the actual output. - */ - -GLOBAL(void) -jpeg_finish_compress (j_compress_ptr cinfo) -{ - JDIMENSION iMCU_row; - - if (cinfo->global_state == CSTATE_SCANNING || - cinfo->global_state == CSTATE_RAW_OK) { - /* Terminate first pass */ - if (cinfo->next_scanline < cinfo->image_height) - ERREXIT(cinfo, JERR_TOO_LITTLE_DATA); - (*cinfo->master->finish_pass) (cinfo); - } else if (cinfo->global_state != CSTATE_WRCOEFS) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - /* Perform any remaining passes */ - while (! cinfo->master->is_last_pass) { - (*cinfo->master->prepare_for_pass) (cinfo); - for (iMCU_row = 0; iMCU_row < cinfo->total_iMCU_rows; iMCU_row++) { - if (cinfo->progress != NULL) { - cinfo->progress->pass_counter = (long) iMCU_row; - cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows; - (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); - } - /* We bypass the main controller and invoke coef controller directly; - * all work is being done from the coefficient buffer. - */ - if (! (*cinfo->coef->compress_data) (cinfo, (JSAMPIMAGE) NULL)) - ERREXIT(cinfo, JERR_CANT_SUSPEND); - } - (*cinfo->master->finish_pass) (cinfo); - } - /* Write EOI, do final cleanup */ - (*cinfo->marker->write_file_trailer) (cinfo); - (*cinfo->dest->term_destination) (cinfo); - /* We can use jpeg_abort to release memory and reset global_state */ - jpeg_abort((j_common_ptr) cinfo); -} - - -/* - * Write a special marker. - * This is only recommended for writing COM or APPn markers. - * Must be called after jpeg_start_compress() and before - * first call to jpeg_write_scanlines() or jpeg_write_raw_data(). - */ - -GLOBAL(void) -jpeg_write_marker (j_compress_ptr cinfo, int marker, - const JOCTET *dataptr, unsigned int datalen) -{ - JMETHOD(void, write_marker_byte, (j_compress_ptr info, int val)); - - if (cinfo->next_scanline != 0 || - (cinfo->global_state != CSTATE_SCANNING && - cinfo->global_state != CSTATE_RAW_OK && - cinfo->global_state != CSTATE_WRCOEFS)) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - (*cinfo->marker->write_marker_header) (cinfo, marker, datalen); - write_marker_byte = cinfo->marker->write_marker_byte; /* copy for speed */ - while (datalen--) { - (*write_marker_byte) (cinfo, *dataptr); - dataptr++; - } -} - -/* Same, but piecemeal. */ - -GLOBAL(void) -jpeg_write_m_header (j_compress_ptr cinfo, int marker, unsigned int datalen) -{ - if (cinfo->next_scanline != 0 || - (cinfo->global_state != CSTATE_SCANNING && - cinfo->global_state != CSTATE_RAW_OK && - cinfo->global_state != CSTATE_WRCOEFS)) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - (*cinfo->marker->write_marker_header) (cinfo, marker, datalen); -} - -GLOBAL(void) -jpeg_write_m_byte (j_compress_ptr cinfo, int val) -{ - (*cinfo->marker->write_marker_byte) (cinfo, val); -} - - -/* - * Alternate compression function: just write an abbreviated table file. - * Before calling this, all parameters and a data destination must be set up. - * - * To produce a pair of files containing abbreviated tables and abbreviated - * image data, one would proceed as follows: - * - * initialize JPEG object - * set JPEG parameters - * set destination to table file - * jpeg_write_tables(cinfo); - * set destination to image file - * jpeg_start_compress(cinfo, FALSE); - * write data... - * jpeg_finish_compress(cinfo); - * - * jpeg_write_tables has the side effect of marking all tables written - * (same as jpeg_suppress_tables(..., TRUE)). Thus a subsequent start_compress - * will not re-emit the tables unless it is passed write_all_tables=TRUE. - */ - -GLOBAL(void) -jpeg_write_tables (j_compress_ptr cinfo) -{ - if (cinfo->global_state != CSTATE_START) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - /* (Re)initialize error mgr and destination modules */ - (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); - (*cinfo->dest->init_destination) (cinfo); - /* Initialize the marker writer ... bit of a crock to do it here. */ - jinit_marker_writer(cinfo); - /* Write them tables! */ - (*cinfo->marker->write_tables_only) (cinfo); - /* And clean up. */ - (*cinfo->dest->term_destination) (cinfo); - /* - * In library releases up through v6a, we called jpeg_abort() here to free - * any working memory allocated by the destination manager and marker - * writer. Some applications had a problem with that: they allocated space - * of their own from the library memory manager, and didn't want it to go - * away during write_tables. So now we do nothing. This will cause a - * memory leak if an app calls write_tables repeatedly without doing a full - * compression cycle or otherwise resetting the JPEG object. However, that - * seems less bad than unexpectedly freeing memory in the normal case. - * An app that prefers the old behavior can call jpeg_abort for itself after - * each call to jpeg_write_tables(). - */ -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jcapistd.c b/gtkmm-osx/trunk/jpeg-6b/jcapistd.c deleted file mode 100644 index c0320b1..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jcapistd.c +++ /dev/null @@ -1,161 +0,0 @@ -/* - * jcapistd.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains application interface code for the compression half - * of the JPEG library. These are the "standard" API routines that are - * used in the normal full-compression case. They are not used by a - * transcoding-only application. Note that if an application links in - * jpeg_start_compress, it will end up linking in the entire compressor. - * We thus must separate this file from jcapimin.c to avoid linking the - * whole compression library into a transcoder. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* - * Compression initialization. - * Before calling this, all parameters and a data destination must be set up. - * - * We require a write_all_tables parameter as a failsafe check when writing - * multiple datastreams from the same compression object. Since prior runs - * will have left all the tables marked sent_table=TRUE, a subsequent run - * would emit an abbreviated stream (no tables) by default. This may be what - * is wanted, but for safety's sake it should not be the default behavior: - * programmers should have to make a deliberate choice to emit abbreviated - * images. Therefore the documentation and examples should encourage people - * to pass write_all_tables=TRUE; then it will take active thought to do the - * wrong thing. - */ - -GLOBAL(void) -jpeg_start_compress (j_compress_ptr cinfo, boolean write_all_tables) -{ - if (cinfo->global_state != CSTATE_START) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - if (write_all_tables) - jpeg_suppress_tables(cinfo, FALSE); /* mark all tables to be written */ - - /* (Re)initialize error mgr and destination modules */ - (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); - (*cinfo->dest->init_destination) (cinfo); - /* Perform master selection of active modules */ - jinit_compress_master(cinfo); - /* Set up for the first pass */ - (*cinfo->master->prepare_for_pass) (cinfo); - /* Ready for application to drive first pass through jpeg_write_scanlines - * or jpeg_write_raw_data. - */ - cinfo->next_scanline = 0; - cinfo->global_state = (cinfo->raw_data_in ? CSTATE_RAW_OK : CSTATE_SCANNING); -} - - -/* - * Write some scanlines of data to the JPEG compressor. - * - * The return value will be the number of lines actually written. - * This should be less than the supplied num_lines only in case that - * the data destination module has requested suspension of the compressor, - * or if more than image_height scanlines are passed in. - * - * Note: we warn about excess calls to jpeg_write_scanlines() since - * this likely signals an application programmer error. However, - * excess scanlines passed in the last valid call are *silently* ignored, - * so that the application need not adjust num_lines for end-of-image - * when using a multiple-scanline buffer. - */ - -GLOBAL(JDIMENSION) -jpeg_write_scanlines (j_compress_ptr cinfo, JSAMPARRAY scanlines, - JDIMENSION num_lines) -{ - JDIMENSION row_ctr, rows_left; - - if (cinfo->global_state != CSTATE_SCANNING) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - if (cinfo->next_scanline >= cinfo->image_height) - WARNMS(cinfo, JWRN_TOO_MUCH_DATA); - - /* Call progress monitor hook if present */ - if (cinfo->progress != NULL) { - cinfo->progress->pass_counter = (long) cinfo->next_scanline; - cinfo->progress->pass_limit = (long) cinfo->image_height; - (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); - } - - /* Give master control module another chance if this is first call to - * jpeg_write_scanlines. This lets output of the frame/scan headers be - * delayed so that application can write COM, etc, markers between - * jpeg_start_compress and jpeg_write_scanlines. - */ - if (cinfo->master->call_pass_startup) - (*cinfo->master->pass_startup) (cinfo); - - /* Ignore any extra scanlines at bottom of image. */ - rows_left = cinfo->image_height - cinfo->next_scanline; - if (num_lines > rows_left) - num_lines = rows_left; - - row_ctr = 0; - (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, num_lines); - cinfo->next_scanline += row_ctr; - return row_ctr; -} - - -/* - * Alternate entry point to write raw data. - * Processes exactly one iMCU row per call, unless suspended. - */ - -GLOBAL(JDIMENSION) -jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data, - JDIMENSION num_lines) -{ - JDIMENSION lines_per_iMCU_row; - - if (cinfo->global_state != CSTATE_RAW_OK) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - if (cinfo->next_scanline >= cinfo->image_height) { - WARNMS(cinfo, JWRN_TOO_MUCH_DATA); - return 0; - } - - /* Call progress monitor hook if present */ - if (cinfo->progress != NULL) { - cinfo->progress->pass_counter = (long) cinfo->next_scanline; - cinfo->progress->pass_limit = (long) cinfo->image_height; - (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); - } - - /* Give master control module another chance if this is first call to - * jpeg_write_raw_data. This lets output of the frame/scan headers be - * delayed so that application can write COM, etc, markers between - * jpeg_start_compress and jpeg_write_raw_data. - */ - if (cinfo->master->call_pass_startup) - (*cinfo->master->pass_startup) (cinfo); - - /* Verify that at least one iMCU row has been passed. */ - lines_per_iMCU_row = cinfo->max_v_samp_factor * DCTSIZE; - if (num_lines < lines_per_iMCU_row) - ERREXIT(cinfo, JERR_BUFFER_SIZE); - - /* Directly compress the row. */ - if (! (*cinfo->coef->compress_data) (cinfo, data)) { - /* If compressor did not consume the whole row, suspend processing. */ - return 0; - } - - /* OK, we processed one iMCU row. */ - cinfo->next_scanline += lines_per_iMCU_row; - return lines_per_iMCU_row; -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jccoefct.c b/gtkmm-osx/trunk/jpeg-6b/jccoefct.c deleted file mode 100644 index 1963ddb..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jccoefct.c +++ /dev/null @@ -1,449 +0,0 @@ -/* - * jccoefct.c - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains the coefficient buffer controller for compression. - * This controller is the top level of the JPEG compressor proper. - * The coefficient buffer lies between forward-DCT and entropy encoding steps. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* We use a full-image coefficient buffer when doing Huffman optimization, - * and also for writing multiple-scan JPEG files. In all cases, the DCT - * step is run during the first pass, and subsequent passes need only read - * the buffered coefficients. - */ -#ifdef ENTROPY_OPT_SUPPORTED -#define FULL_COEF_BUFFER_SUPPORTED -#else -#ifdef C_MULTISCAN_FILES_SUPPORTED -#define FULL_COEF_BUFFER_SUPPORTED -#endif -#endif - - -/* Private buffer controller object */ - -typedef struct { - struct jpeg_c_coef_controller pub; /* public fields */ - - JDIMENSION iMCU_row_num; /* iMCU row # within image */ - JDIMENSION mcu_ctr; /* counts MCUs processed in current row */ - int MCU_vert_offset; /* counts MCU rows within iMCU row */ - int MCU_rows_per_iMCU_row; /* number of such rows needed */ - - /* For single-pass compression, it's sufficient to buffer just one MCU - * (although this may prove a bit slow in practice). We allocate a - * workspace of C_MAX_BLOCKS_IN_MCU coefficient blocks, and reuse it for each - * MCU constructed and sent. (On 80x86, the workspace is FAR even though - * it's not really very big; this is to keep the module interfaces unchanged - * when a large coefficient buffer is necessary.) - * In multi-pass modes, this array points to the current MCU's blocks - * within the virtual arrays. - */ - JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU]; - - /* In multi-pass modes, we need a virtual block array for each component. */ - jvirt_barray_ptr whole_image[MAX_COMPONENTS]; -} my_coef_controller; - -typedef my_coef_controller * my_coef_ptr; - - -/* Forward declarations */ -METHODDEF(boolean) compress_data - JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf)); -#ifdef FULL_COEF_BUFFER_SUPPORTED -METHODDEF(boolean) compress_first_pass - JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf)); -METHODDEF(boolean) compress_output - JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf)); -#endif - - -LOCAL(void) -start_iMCU_row (j_compress_ptr cinfo) -/* Reset within-iMCU-row counters for a new row */ -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - - /* In an interleaved scan, an MCU row is the same as an iMCU row. - * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows. - * But at the bottom of the image, process only what's left. - */ - if (cinfo->comps_in_scan > 1) { - coef->MCU_rows_per_iMCU_row = 1; - } else { - if (coef->iMCU_row_num < (cinfo->total_iMCU_rows-1)) - coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor; - else - coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height; - } - - coef->mcu_ctr = 0; - coef->MCU_vert_offset = 0; -} - - -/* - * Initialize for a processing pass. - */ - -METHODDEF(void) -start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - - coef->iMCU_row_num = 0; - start_iMCU_row(cinfo); - - switch (pass_mode) { - case JBUF_PASS_THRU: - if (coef->whole_image[0] != NULL) - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - coef->pub.compress_data = compress_data; - break; -#ifdef FULL_COEF_BUFFER_SUPPORTED - case JBUF_SAVE_AND_PASS: - if (coef->whole_image[0] == NULL) - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - coef->pub.compress_data = compress_first_pass; - break; - case JBUF_CRANK_DEST: - if (coef->whole_image[0] == NULL) - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - coef->pub.compress_data = compress_output; - break; -#endif - default: - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - break; - } -} - - -/* - * Process some data in the single-pass case. - * We process the equivalent of one fully interleaved MCU row ("iMCU" row) - * per call, ie, v_samp_factor block rows for each component in the image. - * Returns TRUE if the iMCU row is completed, FALSE if suspended. - * - * NB: input_buf contains a plane for each component in image, - * which we index according to the component's SOF position. - */ - -METHODDEF(boolean) -compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - JDIMENSION MCU_col_num; /* index of current MCU within row */ - JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; - JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; - int blkn, bi, ci, yindex, yoffset, blockcnt; - JDIMENSION ypos, xpos; - jpeg_component_info *compptr; - - /* Loop to write as much as one whole iMCU row */ - for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; - yoffset++) { - for (MCU_col_num = coef->mcu_ctr; MCU_col_num <= last_MCU_col; - MCU_col_num++) { - /* Determine where data comes from in input_buf and do the DCT thing. - * Each call on forward_DCT processes a horizontal row of DCT blocks - * as wide as an MCU; we rely on having allocated the MCU_buffer[] blocks - * sequentially. Dummy blocks at the right or bottom edge are filled in - * specially. The data in them does not matter for image reconstruction, - * so we fill them with values that will encode to the smallest amount of - * data, viz: all zeroes in the AC entries, DC entries equal to previous - * block's DC value. (Thanks to Thomas Kinsman for this idea.) - */ - blkn = 0; - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width - : compptr->last_col_width; - xpos = MCU_col_num * compptr->MCU_sample_width; - ypos = yoffset * DCTSIZE; /* ypos == (yoffset+yindex) * DCTSIZE */ - for (yindex = 0; yindex < compptr->MCU_height; yindex++) { - if (coef->iMCU_row_num < last_iMCU_row || - yoffset+yindex < compptr->last_row_height) { - (*cinfo->fdct->forward_DCT) (cinfo, compptr, - input_buf[compptr->component_index], - coef->MCU_buffer[blkn], - ypos, xpos, (JDIMENSION) blockcnt); - if (blockcnt < compptr->MCU_width) { - /* Create some dummy blocks at the right edge of the image. */ - jzero_far((void FAR *) coef->MCU_buffer[blkn + blockcnt], - (compptr->MCU_width - blockcnt) * SIZEOF(JBLOCK)); - for (bi = blockcnt; bi < compptr->MCU_width; bi++) { - coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn+bi-1][0][0]; - } - } - } else { - /* Create a row of dummy blocks at the bottom of the image. */ - jzero_far((void FAR *) coef->MCU_buffer[blkn], - compptr->MCU_width * SIZEOF(JBLOCK)); - for (bi = 0; bi < compptr->MCU_width; bi++) { - coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn-1][0][0]; - } - } - blkn += compptr->MCU_width; - ypos += DCTSIZE; - } - } - /* Try to write the MCU. In event of a suspension failure, we will - * re-DCT the MCU on restart (a bit inefficient, could be fixed...) - */ - if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) { - /* Suspension forced; update state counters and exit */ - coef->MCU_vert_offset = yoffset; - coef->mcu_ctr = MCU_col_num; - return FALSE; - } - } - /* Completed an MCU row, but perhaps not an iMCU row */ - coef->mcu_ctr = 0; - } - /* Completed the iMCU row, advance counters for next one */ - coef->iMCU_row_num++; - start_iMCU_row(cinfo); - return TRUE; -} - - -#ifdef FULL_COEF_BUFFER_SUPPORTED - -/* - * Process some data in the first pass of a multi-pass case. - * We process the equivalent of one fully interleaved MCU row ("iMCU" row) - * per call, ie, v_samp_factor block rows for each component in the image. - * This amount of data is read from the source buffer, DCT'd and quantized, - * and saved into the virtual arrays. We also generate suitable dummy blocks - * as needed at the right and lower edges. (The dummy blocks are constructed - * in the virtual arrays, which have been padded appropriately.) This makes - * it possible for subsequent passes not to worry about real vs. dummy blocks. - * - * We must also emit the data to the entropy encoder. This is conveniently - * done by calling compress_output() after we've loaded the current strip - * of the virtual arrays. - * - * NB: input_buf contains a plane for each component in image. All - * components are DCT'd and loaded into the virtual arrays in this pass. - * However, it may be that only a subset of the components are emitted to - * the entropy encoder during this first pass; be careful about looking - * at the scan-dependent variables (MCU dimensions, etc). - */ - -METHODDEF(boolean) -compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; - JDIMENSION blocks_across, MCUs_across, MCUindex; - int bi, ci, h_samp_factor, block_row, block_rows, ndummy; - JCOEF lastDC; - jpeg_component_info *compptr; - JBLOCKARRAY buffer; - JBLOCKROW thisblockrow, lastblockrow; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Align the virtual buffer for this component. */ - buffer = (*cinfo->mem->access_virt_barray) - ((j_common_ptr) cinfo, coef->whole_image[ci], - coef->iMCU_row_num * compptr->v_samp_factor, - (JDIMENSION) compptr->v_samp_factor, TRUE); - /* Count non-dummy DCT block rows in this iMCU row. */ - if (coef->iMCU_row_num < last_iMCU_row) - block_rows = compptr->v_samp_factor; - else { - /* NB: can't use last_row_height here, since may not be set! */ - block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor); - if (block_rows == 0) block_rows = compptr->v_samp_factor; - } - blocks_across = compptr->width_in_blocks; - h_samp_factor = compptr->h_samp_factor; - /* Count number of dummy blocks to be added at the right margin. */ - ndummy = (int) (blocks_across % h_samp_factor); - if (ndummy > 0) - ndummy = h_samp_factor - ndummy; - /* Perform DCT for all non-dummy blocks in this iMCU row. Each call - * on forward_DCT processes a complete horizontal row of DCT blocks. - */ - for (block_row = 0; block_row < block_rows; block_row++) { - thisblockrow = buffer[block_row]; - (*cinfo->fdct->forward_DCT) (cinfo, compptr, - input_buf[ci], thisblockrow, - (JDIMENSION) (block_row * DCTSIZE), - (JDIMENSION) 0, blocks_across); - if (ndummy > 0) { - /* Create dummy blocks at the right edge of the image. */ - thisblockrow += blocks_across; /* => first dummy block */ - jzero_far((void FAR *) thisblockrow, ndummy * SIZEOF(JBLOCK)); - lastDC = thisblockrow[-1][0]; - for (bi = 0; bi < ndummy; bi++) { - thisblockrow[bi][0] = lastDC; - } - } - } - /* If at end of image, create dummy block rows as needed. - * The tricky part here is that within each MCU, we want the DC values - * of the dummy blocks to match the last real block's DC value. - * This squeezes a few more bytes out of the resulting file... - */ - if (coef->iMCU_row_num == last_iMCU_row) { - blocks_across += ndummy; /* include lower right corner */ - MCUs_across = blocks_across / h_samp_factor; - for (block_row = block_rows; block_row < compptr->v_samp_factor; - block_row++) { - thisblockrow = buffer[block_row]; - lastblockrow = buffer[block_row-1]; - jzero_far((void FAR *) thisblockrow, - (size_t) (blocks_across * SIZEOF(JBLOCK))); - for (MCUindex = 0; MCUindex < MCUs_across; MCUindex++) { - lastDC = lastblockrow[h_samp_factor-1][0]; - for (bi = 0; bi < h_samp_factor; bi++) { - thisblockrow[bi][0] = lastDC; - } - thisblockrow += h_samp_factor; /* advance to next MCU in row */ - lastblockrow += h_samp_factor; - } - } - } - } - /* NB: compress_output will increment iMCU_row_num if successful. - * A suspension return will result in redoing all the work above next time. - */ - - /* Emit data to the entropy encoder, sharing code with subsequent passes */ - return compress_output(cinfo, input_buf); -} - - -/* - * Process some data in subsequent passes of a multi-pass case. - * We process the equivalent of one fully interleaved MCU row ("iMCU" row) - * per call, ie, v_samp_factor block rows for each component in the scan. - * The data is obtained from the virtual arrays and fed to the entropy coder. - * Returns TRUE if the iMCU row is completed, FALSE if suspended. - * - * NB: input_buf is ignored; it is likely to be a NULL pointer. - */ - -METHODDEF(boolean) -compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - JDIMENSION MCU_col_num; /* index of current MCU within row */ - int blkn, ci, xindex, yindex, yoffset; - JDIMENSION start_col; - JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN]; - JBLOCKROW buffer_ptr; - jpeg_component_info *compptr; - - /* Align the virtual buffers for the components used in this scan. - * NB: during first pass, this is safe only because the buffers will - * already be aligned properly, so jmemmgr.c won't need to do any I/O. - */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - buffer[ci] = (*cinfo->mem->access_virt_barray) - ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index], - coef->iMCU_row_num * compptr->v_samp_factor, - (JDIMENSION) compptr->v_samp_factor, FALSE); - } - - /* Loop to process one whole iMCU row */ - for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; - yoffset++) { - for (MCU_col_num = coef->mcu_ctr; MCU_col_num < cinfo->MCUs_per_row; - MCU_col_num++) { - /* Construct list of pointers to DCT blocks belonging to this MCU */ - blkn = 0; /* index of current DCT block within MCU */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - start_col = MCU_col_num * compptr->MCU_width; - for (yindex = 0; yindex < compptr->MCU_height; yindex++) { - buffer_ptr = buffer[ci][yindex+yoffset] + start_col; - for (xindex = 0; xindex < compptr->MCU_width; xindex++) { - coef->MCU_buffer[blkn++] = buffer_ptr++; - } - } - } - /* Try to write the MCU. */ - if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) { - /* Suspension forced; update state counters and exit */ - coef->MCU_vert_offset = yoffset; - coef->mcu_ctr = MCU_col_num; - return FALSE; - } - } - /* Completed an MCU row, but perhaps not an iMCU row */ - coef->mcu_ctr = 0; - } - /* Completed the iMCU row, advance counters for next one */ - coef->iMCU_row_num++; - start_iMCU_row(cinfo); - return TRUE; -} - -#endif /* FULL_COEF_BUFFER_SUPPORTED */ - - -/* - * Initialize coefficient buffer controller. - */ - -GLOBAL(void) -jinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer) -{ - my_coef_ptr coef; - - coef = (my_coef_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_coef_controller)); - cinfo->coef = (struct jpeg_c_coef_controller *) coef; - coef->pub.start_pass = start_pass_coef; - - /* Create the coefficient buffer. */ - if (need_full_buffer) { -#ifdef FULL_COEF_BUFFER_SUPPORTED - /* Allocate a full-image virtual array for each component, */ - /* padded to a multiple of samp_factor DCT blocks in each direction. */ - int ci; - jpeg_component_info *compptr; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - coef->whole_image[ci] = (*cinfo->mem->request_virt_barray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, - (JDIMENSION) jround_up((long) compptr->width_in_blocks, - (long) compptr->h_samp_factor), - (JDIMENSION) jround_up((long) compptr->height_in_blocks, - (long) compptr->v_samp_factor), - (JDIMENSION) compptr->v_samp_factor); - } -#else - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); -#endif - } else { - /* We only need a single-MCU buffer. */ - JBLOCKROW buffer; - int i; - - buffer = (JBLOCKROW) - (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, - C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); - for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) { - coef->MCU_buffer[i] = buffer + i; - } - coef->whole_image[0] = NULL; /* flag for no virtual arrays */ - } -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jccolor.c b/gtkmm-osx/trunk/jpeg-6b/jccolor.c deleted file mode 100644 index 0a8a4b5..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jccolor.c +++ /dev/null @@ -1,459 +0,0 @@ -/* - * jccolor.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains input colorspace conversion routines. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Private subobject */ - -typedef struct { - struct jpeg_color_converter pub; /* public fields */ - - /* Private state for RGB->YCC conversion */ - INT32 * rgb_ycc_tab; /* => table for RGB to YCbCr conversion */ -} my_color_converter; - -typedef my_color_converter * my_cconvert_ptr; - - -/**************** RGB -> YCbCr conversion: most common case **************/ - -/* - * YCbCr is defined per CCIR 601-1, except that Cb and Cr are - * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5. - * The conversion equations to be implemented are therefore - * Y = 0.29900 * R + 0.58700 * G + 0.11400 * B - * Cb = -0.16874 * R - 0.33126 * G + 0.50000 * B + CENTERJSAMPLE - * Cr = 0.50000 * R - 0.41869 * G - 0.08131 * B + CENTERJSAMPLE - * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.) - * Note: older versions of the IJG code used a zero offset of MAXJSAMPLE/2, - * rather than CENTERJSAMPLE, for Cb and Cr. This gave equal positive and - * negative swings for Cb/Cr, but meant that grayscale values (Cb=Cr=0) - * were not represented exactly. Now we sacrifice exact representation of - * maximum red and maximum blue in order to get exact grayscales. - * - * To avoid floating-point arithmetic, we represent the fractional constants - * as integers scaled up by 2^16 (about 4 digits precision); we have to divide - * the products by 2^16, with appropriate rounding, to get the correct answer. - * - * For even more speed, we avoid doing any multiplications in the inner loop - * by precalculating the constants times R,G,B for all possible values. - * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table); - * for 12-bit samples it is still acceptable. It's not very reasonable for - * 16-bit samples, but if you want lossless storage you shouldn't be changing - * colorspace anyway. - * The CENTERJSAMPLE offsets and the rounding fudge-factor of 0.5 are included - * in the tables to save adding them separately in the inner loop. - */ - -#define SCALEBITS 16 /* speediest right-shift on some machines */ -#define CBCR_OFFSET ((INT32) CENTERJSAMPLE << SCALEBITS) -#define ONE_HALF ((INT32) 1 << (SCALEBITS-1)) -#define FIX(x) ((INT32) ((x) * (1L< Y section */ -#define G_Y_OFF (1*(MAXJSAMPLE+1)) /* offset to G => Y section */ -#define B_Y_OFF (2*(MAXJSAMPLE+1)) /* etc. */ -#define R_CB_OFF (3*(MAXJSAMPLE+1)) -#define G_CB_OFF (4*(MAXJSAMPLE+1)) -#define B_CB_OFF (5*(MAXJSAMPLE+1)) -#define R_CR_OFF B_CB_OFF /* B=>Cb, R=>Cr are the same */ -#define G_CR_OFF (6*(MAXJSAMPLE+1)) -#define B_CR_OFF (7*(MAXJSAMPLE+1)) -#define TABLE_SIZE (8*(MAXJSAMPLE+1)) - - -/* - * Initialize for RGB->YCC colorspace conversion. - */ - -METHODDEF(void) -rgb_ycc_start (j_compress_ptr cinfo) -{ - my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; - INT32 * rgb_ycc_tab; - INT32 i; - - /* Allocate and fill in the conversion tables. */ - cconvert->rgb_ycc_tab = rgb_ycc_tab = (INT32 *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - (TABLE_SIZE * SIZEOF(INT32))); - - for (i = 0; i <= MAXJSAMPLE; i++) { - rgb_ycc_tab[i+R_Y_OFF] = FIX(0.29900) * i; - rgb_ycc_tab[i+G_Y_OFF] = FIX(0.58700) * i; - rgb_ycc_tab[i+B_Y_OFF] = FIX(0.11400) * i + ONE_HALF; - rgb_ycc_tab[i+R_CB_OFF] = (-FIX(0.16874)) * i; - rgb_ycc_tab[i+G_CB_OFF] = (-FIX(0.33126)) * i; - /* We use a rounding fudge-factor of 0.5-epsilon for Cb and Cr. - * This ensures that the maximum output will round to MAXJSAMPLE - * not MAXJSAMPLE+1, and thus that we don't have to range-limit. - */ - rgb_ycc_tab[i+B_CB_OFF] = FIX(0.50000) * i + CBCR_OFFSET + ONE_HALF-1; -/* B=>Cb and R=>Cr tables are the same - rgb_ycc_tab[i+R_CR_OFF] = FIX(0.50000) * i + CBCR_OFFSET + ONE_HALF-1; -*/ - rgb_ycc_tab[i+G_CR_OFF] = (-FIX(0.41869)) * i; - rgb_ycc_tab[i+B_CR_OFF] = (-FIX(0.08131)) * i; - } -} - - -/* - * Convert some rows of samples to the JPEG colorspace. - * - * Note that we change from the application's interleaved-pixel format - * to our internal noninterleaved, one-plane-per-component format. - * The input buffer is therefore three times as wide as the output buffer. - * - * A starting row offset is provided only for the output buffer. The caller - * can easily adjust the passed input_buf value to accommodate any row - * offset required on that side. - */ - -METHODDEF(void) -rgb_ycc_convert (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPIMAGE output_buf, - JDIMENSION output_row, int num_rows) -{ - my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; - register int r, g, b; - register INT32 * ctab = cconvert->rgb_ycc_tab; - register JSAMPROW inptr; - register JSAMPROW outptr0, outptr1, outptr2; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->image_width; - - while (--num_rows >= 0) { - inptr = *input_buf++; - outptr0 = output_buf[0][output_row]; - outptr1 = output_buf[1][output_row]; - outptr2 = output_buf[2][output_row]; - output_row++; - for (col = 0; col < num_cols; col++) { - r = GETJSAMPLE(inptr[RGB_RED]); - g = GETJSAMPLE(inptr[RGB_GREEN]); - b = GETJSAMPLE(inptr[RGB_BLUE]); - inptr += RGB_PIXELSIZE; - /* If the inputs are 0..MAXJSAMPLE, the outputs of these equations - * must be too; we do not need an explicit range-limiting operation. - * Hence the value being shifted is never negative, and we don't - * need the general RIGHT_SHIFT macro. - */ - /* Y */ - outptr0[col] = (JSAMPLE) - ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) - >> SCALEBITS); - /* Cb */ - outptr1[col] = (JSAMPLE) - ((ctab[r+R_CB_OFF] + ctab[g+G_CB_OFF] + ctab[b+B_CB_OFF]) - >> SCALEBITS); - /* Cr */ - outptr2[col] = (JSAMPLE) - ((ctab[r+R_CR_OFF] + ctab[g+G_CR_OFF] + ctab[b+B_CR_OFF]) - >> SCALEBITS); - } - } -} - - -/**************** Cases other than RGB -> YCbCr **************/ - - -/* - * Convert some rows of samples to the JPEG colorspace. - * This version handles RGB->grayscale conversion, which is the same - * as the RGB->Y portion of RGB->YCbCr. - * We assume rgb_ycc_start has been called (we only use the Y tables). - */ - -METHODDEF(void) -rgb_gray_convert (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPIMAGE output_buf, - JDIMENSION output_row, int num_rows) -{ - my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; - register int r, g, b; - register INT32 * ctab = cconvert->rgb_ycc_tab; - register JSAMPROW inptr; - register JSAMPROW outptr; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->image_width; - - while (--num_rows >= 0) { - inptr = *input_buf++; - outptr = output_buf[0][output_row]; - output_row++; - for (col = 0; col < num_cols; col++) { - r = GETJSAMPLE(inptr[RGB_RED]); - g = GETJSAMPLE(inptr[RGB_GREEN]); - b = GETJSAMPLE(inptr[RGB_BLUE]); - inptr += RGB_PIXELSIZE; - /* Y */ - outptr[col] = (JSAMPLE) - ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) - >> SCALEBITS); - } - } -} - - -/* - * Convert some rows of samples to the JPEG colorspace. - * This version handles Adobe-style CMYK->YCCK conversion, - * where we convert R=1-C, G=1-M, and B=1-Y to YCbCr using the same - * conversion as above, while passing K (black) unchanged. - * We assume rgb_ycc_start has been called. - */ - -METHODDEF(void) -cmyk_ycck_convert (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPIMAGE output_buf, - JDIMENSION output_row, int num_rows) -{ - my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; - register int r, g, b; - register INT32 * ctab = cconvert->rgb_ycc_tab; - register JSAMPROW inptr; - register JSAMPROW outptr0, outptr1, outptr2, outptr3; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->image_width; - - while (--num_rows >= 0) { - inptr = *input_buf++; - outptr0 = output_buf[0][output_row]; - outptr1 = output_buf[1][output_row]; - outptr2 = output_buf[2][output_row]; - outptr3 = output_buf[3][output_row]; - output_row++; - for (col = 0; col < num_cols; col++) { - r = MAXJSAMPLE - GETJSAMPLE(inptr[0]); - g = MAXJSAMPLE - GETJSAMPLE(inptr[1]); - b = MAXJSAMPLE - GETJSAMPLE(inptr[2]); - /* K passes through as-is */ - outptr3[col] = inptr[3]; /* don't need GETJSAMPLE here */ - inptr += 4; - /* If the inputs are 0..MAXJSAMPLE, the outputs of these equations - * must be too; we do not need an explicit range-limiting operation. - * Hence the value being shifted is never negative, and we don't - * need the general RIGHT_SHIFT macro. - */ - /* Y */ - outptr0[col] = (JSAMPLE) - ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) - >> SCALEBITS); - /* Cb */ - outptr1[col] = (JSAMPLE) - ((ctab[r+R_CB_OFF] + ctab[g+G_CB_OFF] + ctab[b+B_CB_OFF]) - >> SCALEBITS); - /* Cr */ - outptr2[col] = (JSAMPLE) - ((ctab[r+R_CR_OFF] + ctab[g+G_CR_OFF] + ctab[b+B_CR_OFF]) - >> SCALEBITS); - } - } -} - - -/* - * Convert some rows of samples to the JPEG colorspace. - * This version handles grayscale output with no conversion. - * The source can be either plain grayscale or YCbCr (since Y == gray). - */ - -METHODDEF(void) -grayscale_convert (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPIMAGE output_buf, - JDIMENSION output_row, int num_rows) -{ - register JSAMPROW inptr; - register JSAMPROW outptr; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->image_width; - int instride = cinfo->input_components; - - while (--num_rows >= 0) { - inptr = *input_buf++; - outptr = output_buf[0][output_row]; - output_row++; - for (col = 0; col < num_cols; col++) { - outptr[col] = inptr[0]; /* don't need GETJSAMPLE() here */ - inptr += instride; - } - } -} - - -/* - * Convert some rows of samples to the JPEG colorspace. - * This version handles multi-component colorspaces without conversion. - * We assume input_components == num_components. - */ - -METHODDEF(void) -null_convert (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPIMAGE output_buf, - JDIMENSION output_row, int num_rows) -{ - register JSAMPROW inptr; - register JSAMPROW outptr; - register JDIMENSION col; - register int ci; - int nc = cinfo->num_components; - JDIMENSION num_cols = cinfo->image_width; - - while (--num_rows >= 0) { - /* It seems fastest to make a separate pass for each component. */ - for (ci = 0; ci < nc; ci++) { - inptr = *input_buf; - outptr = output_buf[ci][output_row]; - for (col = 0; col < num_cols; col++) { - outptr[col] = inptr[ci]; /* don't need GETJSAMPLE() here */ - inptr += nc; - } - } - input_buf++; - output_row++; - } -} - - -/* - * Empty method for start_pass. - */ - -METHODDEF(void) -null_method (j_compress_ptr cinfo) -{ - /* no work needed */ -} - - -/* - * Module initialization routine for input colorspace conversion. - */ - -GLOBAL(void) -jinit_color_converter (j_compress_ptr cinfo) -{ - my_cconvert_ptr cconvert; - - cconvert = (my_cconvert_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_color_converter)); - cinfo->cconvert = (struct jpeg_color_converter *) cconvert; - /* set start_pass to null method until we find out differently */ - cconvert->pub.start_pass = null_method; - - /* Make sure input_components agrees with in_color_space */ - switch (cinfo->in_color_space) { - case JCS_GRAYSCALE: - if (cinfo->input_components != 1) - ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); - break; - - case JCS_RGB: -#if RGB_PIXELSIZE != 3 - if (cinfo->input_components != RGB_PIXELSIZE) - ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); - break; -#endif /* else share code with YCbCr */ - - case JCS_YCbCr: - if (cinfo->input_components != 3) - ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); - break; - - case JCS_CMYK: - case JCS_YCCK: - if (cinfo->input_components != 4) - ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); - break; - - default: /* JCS_UNKNOWN can be anything */ - if (cinfo->input_components < 1) - ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); - break; - } - - /* Check num_components, set conversion method based on requested space */ - switch (cinfo->jpeg_color_space) { - case JCS_GRAYSCALE: - if (cinfo->num_components != 1) - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - if (cinfo->in_color_space == JCS_GRAYSCALE) - cconvert->pub.color_convert = grayscale_convert; - else if (cinfo->in_color_space == JCS_RGB) { - cconvert->pub.start_pass = rgb_ycc_start; - cconvert->pub.color_convert = rgb_gray_convert; - } else if (cinfo->in_color_space == JCS_YCbCr) - cconvert->pub.color_convert = grayscale_convert; - else - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - break; - - case JCS_RGB: - if (cinfo->num_components != 3) - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - if (cinfo->in_color_space == JCS_RGB && RGB_PIXELSIZE == 3) - cconvert->pub.color_convert = null_convert; - else - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - break; - - case JCS_YCbCr: - if (cinfo->num_components != 3) - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - if (cinfo->in_color_space == JCS_RGB) { - cconvert->pub.start_pass = rgb_ycc_start; - cconvert->pub.color_convert = rgb_ycc_convert; - } else if (cinfo->in_color_space == JCS_YCbCr) - cconvert->pub.color_convert = null_convert; - else - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - break; - - case JCS_CMYK: - if (cinfo->num_components != 4) - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - if (cinfo->in_color_space == JCS_CMYK) - cconvert->pub.color_convert = null_convert; - else - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - break; - - case JCS_YCCK: - if (cinfo->num_components != 4) - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - if (cinfo->in_color_space == JCS_CMYK) { - cconvert->pub.start_pass = rgb_ycc_start; - cconvert->pub.color_convert = cmyk_ycck_convert; - } else if (cinfo->in_color_space == JCS_YCCK) - cconvert->pub.color_convert = null_convert; - else - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - break; - - default: /* allow null conversion of JCS_UNKNOWN */ - if (cinfo->jpeg_color_space != cinfo->in_color_space || - cinfo->num_components != cinfo->input_components) - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - cconvert->pub.color_convert = null_convert; - break; - } -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jcdctmgr.c b/gtkmm-osx/trunk/jpeg-6b/jcdctmgr.c deleted file mode 100644 index 61fa79b..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jcdctmgr.c +++ /dev/null @@ -1,387 +0,0 @@ -/* - * jcdctmgr.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains the forward-DCT management logic. - * This code selects a particular DCT implementation to be used, - * and it performs related housekeeping chores including coefficient - * quantization. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jdct.h" /* Private declarations for DCT subsystem */ - - -/* Private subobject for this module */ - -typedef struct { - struct jpeg_forward_dct pub; /* public fields */ - - /* Pointer to the DCT routine actually in use */ - forward_DCT_method_ptr do_dct; - - /* The actual post-DCT divisors --- not identical to the quant table - * entries, because of scaling (especially for an unnormalized DCT). - * Each table is given in normal array order. - */ - DCTELEM * divisors[NUM_QUANT_TBLS]; - -#ifdef DCT_FLOAT_SUPPORTED - /* Same as above for the floating-point case. */ - float_DCT_method_ptr do_float_dct; - FAST_FLOAT * float_divisors[NUM_QUANT_TBLS]; -#endif -} my_fdct_controller; - -typedef my_fdct_controller * my_fdct_ptr; - - -/* - * Initialize for a processing pass. - * Verify that all referenced Q-tables are present, and set up - * the divisor table for each one. - * In the current implementation, DCT of all components is done during - * the first pass, even if only some components will be output in the - * first scan. Hence all components should be examined here. - */ - -METHODDEF(void) -start_pass_fdctmgr (j_compress_ptr cinfo) -{ - my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; - int ci, qtblno, i; - jpeg_component_info *compptr; - JQUANT_TBL * qtbl; - DCTELEM * dtbl; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - qtblno = compptr->quant_tbl_no; - /* Make sure specified quantization table is present */ - if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS || - cinfo->quant_tbl_ptrs[qtblno] == NULL) - ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno); - qtbl = cinfo->quant_tbl_ptrs[qtblno]; - /* Compute divisors for this quant table */ - /* We may do this more than once for same table, but it's not a big deal */ - switch (cinfo->dct_method) { -#ifdef DCT_ISLOW_SUPPORTED - case JDCT_ISLOW: - /* For LL&M IDCT method, divisors are equal to raw quantization - * coefficients multiplied by 8 (to counteract scaling). - */ - if (fdct->divisors[qtblno] == NULL) { - fdct->divisors[qtblno] = (DCTELEM *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - DCTSIZE2 * SIZEOF(DCTELEM)); - } - dtbl = fdct->divisors[qtblno]; - for (i = 0; i < DCTSIZE2; i++) { - dtbl[i] = ((DCTELEM) qtbl->quantval[i]) << 3; - } - break; -#endif -#ifdef DCT_IFAST_SUPPORTED - case JDCT_IFAST: - { - /* For AA&N IDCT method, divisors are equal to quantization - * coefficients scaled by scalefactor[row]*scalefactor[col], where - * scalefactor[0] = 1 - * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 - * We apply a further scale factor of 8. - */ -#define CONST_BITS 14 - static const INT16 aanscales[DCTSIZE2] = { - /* precomputed values scaled up by 14 bits */ - 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, - 22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270, - 21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906, - 19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315, - 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, - 12873, 17855, 16819, 15137, 12873, 10114, 6967, 3552, - 8867, 12299, 11585, 10426, 8867, 6967, 4799, 2446, - 4520, 6270, 5906, 5315, 4520, 3552, 2446, 1247 - }; - SHIFT_TEMPS - - if (fdct->divisors[qtblno] == NULL) { - fdct->divisors[qtblno] = (DCTELEM *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - DCTSIZE2 * SIZEOF(DCTELEM)); - } - dtbl = fdct->divisors[qtblno]; - for (i = 0; i < DCTSIZE2; i++) { - dtbl[i] = (DCTELEM) - DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i], - (INT32) aanscales[i]), - CONST_BITS-3); - } - } - break; -#endif -#ifdef DCT_FLOAT_SUPPORTED - case JDCT_FLOAT: - { - /* For float AA&N IDCT method, divisors are equal to quantization - * coefficients scaled by scalefactor[row]*scalefactor[col], where - * scalefactor[0] = 1 - * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 - * We apply a further scale factor of 8. - * What's actually stored is 1/divisor so that the inner loop can - * use a multiplication rather than a division. - */ - FAST_FLOAT * fdtbl; - int row, col; - static const double aanscalefactor[DCTSIZE] = { - 1.0, 1.387039845, 1.306562965, 1.175875602, - 1.0, 0.785694958, 0.541196100, 0.275899379 - }; - - if (fdct->float_divisors[qtblno] == NULL) { - fdct->float_divisors[qtblno] = (FAST_FLOAT *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - DCTSIZE2 * SIZEOF(FAST_FLOAT)); - } - fdtbl = fdct->float_divisors[qtblno]; - i = 0; - for (row = 0; row < DCTSIZE; row++) { - for (col = 0; col < DCTSIZE; col++) { - fdtbl[i] = (FAST_FLOAT) - (1.0 / (((double) qtbl->quantval[i] * - aanscalefactor[row] * aanscalefactor[col] * 8.0))); - i++; - } - } - } - break; -#endif - default: - ERREXIT(cinfo, JERR_NOT_COMPILED); - break; - } - } -} - - -/* - * Perform forward DCT on one or more blocks of a component. - * - * The input samples are taken from the sample_data[] array starting at - * position start_row/start_col, and moving to the right for any additional - * blocks. The quantized coefficients are returned in coef_blocks[]. - */ - -METHODDEF(void) -forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY sample_data, JBLOCKROW coef_blocks, - JDIMENSION start_row, JDIMENSION start_col, - JDIMENSION num_blocks) -/* This version is used for integer DCT implementations. */ -{ - /* This routine is heavily used, so it's worth coding it tightly. */ - my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; - forward_DCT_method_ptr do_dct = fdct->do_dct; - DCTELEM * divisors = fdct->divisors[compptr->quant_tbl_no]; - DCTELEM workspace[DCTSIZE2]; /* work area for FDCT subroutine */ - JDIMENSION bi; - - sample_data += start_row; /* fold in the vertical offset once */ - - for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) { - /* Load data into workspace, applying unsigned->signed conversion */ - { register DCTELEM *workspaceptr; - register JSAMPROW elemptr; - register int elemr; - - workspaceptr = workspace; - for (elemr = 0; elemr < DCTSIZE; elemr++) { - elemptr = sample_data[elemr] + start_col; -#if DCTSIZE == 8 /* unroll the inner loop */ - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; -#else - { register int elemc; - for (elemc = DCTSIZE; elemc > 0; elemc--) { - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - } - } -#endif - } - } - - /* Perform the DCT */ - (*do_dct) (workspace); - - /* Quantize/descale the coefficients, and store into coef_blocks[] */ - { register DCTELEM temp, qval; - register int i; - register JCOEFPTR output_ptr = coef_blocks[bi]; - - for (i = 0; i < DCTSIZE2; i++) { - qval = divisors[i]; - temp = workspace[i]; - /* Divide the coefficient value by qval, ensuring proper rounding. - * Since C does not specify the direction of rounding for negative - * quotients, we have to force the dividend positive for portability. - * - * In most files, at least half of the output values will be zero - * (at default quantization settings, more like three-quarters...) - * so we should ensure that this case is fast. On many machines, - * a comparison is enough cheaper than a divide to make a special test - * a win. Since both inputs will be nonnegative, we need only test - * for a < b to discover whether a/b is 0. - * If your machine's division is fast enough, define FAST_DIVIDE. - */ -#ifdef FAST_DIVIDE -#define DIVIDE_BY(a,b) a /= b -#else -#define DIVIDE_BY(a,b) if (a >= b) a /= b; else a = 0 -#endif - if (temp < 0) { - temp = -temp; - temp += qval>>1; /* for rounding */ - DIVIDE_BY(temp, qval); - temp = -temp; - } else { - temp += qval>>1; /* for rounding */ - DIVIDE_BY(temp, qval); - } - output_ptr[i] = (JCOEF) temp; - } - } - } -} - - -#ifdef DCT_FLOAT_SUPPORTED - -METHODDEF(void) -forward_DCT_float (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY sample_data, JBLOCKROW coef_blocks, - JDIMENSION start_row, JDIMENSION start_col, - JDIMENSION num_blocks) -/* This version is used for floating-point DCT implementations. */ -{ - /* This routine is heavily used, so it's worth coding it tightly. */ - my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; - float_DCT_method_ptr do_dct = fdct->do_float_dct; - FAST_FLOAT * divisors = fdct->float_divisors[compptr->quant_tbl_no]; - FAST_FLOAT workspace[DCTSIZE2]; /* work area for FDCT subroutine */ - JDIMENSION bi; - - sample_data += start_row; /* fold in the vertical offset once */ - - for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) { - /* Load data into workspace, applying unsigned->signed conversion */ - { register FAST_FLOAT *workspaceptr; - register JSAMPROW elemptr; - register int elemr; - - workspaceptr = workspace; - for (elemr = 0; elemr < DCTSIZE; elemr++) { - elemptr = sample_data[elemr] + start_col; -#if DCTSIZE == 8 /* unroll the inner loop */ - *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); - *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); - *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); - *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); - *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); - *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); - *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); - *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); -#else - { register int elemc; - for (elemc = DCTSIZE; elemc > 0; elemc--) { - *workspaceptr++ = (FAST_FLOAT) - (GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); - } - } -#endif - } - } - - /* Perform the DCT */ - (*do_dct) (workspace); - - /* Quantize/descale the coefficients, and store into coef_blocks[] */ - { register FAST_FLOAT temp; - register int i; - register JCOEFPTR output_ptr = coef_blocks[bi]; - - for (i = 0; i < DCTSIZE2; i++) { - /* Apply the quantization and scaling factor */ - temp = workspace[i] * divisors[i]; - /* Round to nearest integer. - * Since C does not specify the direction of rounding for negative - * quotients, we have to force the dividend positive for portability. - * The maximum coefficient size is +-16K (for 12-bit data), so this - * code should work for either 16-bit or 32-bit ints. - */ - output_ptr[i] = (JCOEF) ((int) (temp + (FAST_FLOAT) 16384.5) - 16384); - } - } - } -} - -#endif /* DCT_FLOAT_SUPPORTED */ - - -/* - * Initialize FDCT manager. - */ - -GLOBAL(void) -jinit_forward_dct (j_compress_ptr cinfo) -{ - my_fdct_ptr fdct; - int i; - - fdct = (my_fdct_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_fdct_controller)); - cinfo->fdct = (struct jpeg_forward_dct *) fdct; - fdct->pub.start_pass = start_pass_fdctmgr; - - switch (cinfo->dct_method) { -#ifdef DCT_ISLOW_SUPPORTED - case JDCT_ISLOW: - fdct->pub.forward_DCT = forward_DCT; - fdct->do_dct = jpeg_fdct_islow; - break; -#endif -#ifdef DCT_IFAST_SUPPORTED - case JDCT_IFAST: - fdct->pub.forward_DCT = forward_DCT; - fdct->do_dct = jpeg_fdct_ifast; - break; -#endif -#ifdef DCT_FLOAT_SUPPORTED - case JDCT_FLOAT: - fdct->pub.forward_DCT = forward_DCT_float; - fdct->do_float_dct = jpeg_fdct_float; - break; -#endif - default: - ERREXIT(cinfo, JERR_NOT_COMPILED); - break; - } - - /* Mark divisor tables unallocated */ - for (i = 0; i < NUM_QUANT_TBLS; i++) { - fdct->divisors[i] = NULL; -#ifdef DCT_FLOAT_SUPPORTED - fdct->float_divisors[i] = NULL; -#endif - } -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jchuff.c b/gtkmm-osx/trunk/jpeg-6b/jchuff.c deleted file mode 100644 index f235250..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jchuff.c +++ /dev/null @@ -1,909 +0,0 @@ -/* - * jchuff.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains Huffman entropy encoding routines. - * - * Much of the complexity here has to do with supporting output suspension. - * If the data destination module demands suspension, we want to be able to - * back up to the start of the current MCU. To do this, we copy state - * variables into local working storage, and update them back to the - * permanent JPEG objects only upon successful completion of an MCU. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jchuff.h" /* Declarations shared with jcphuff.c */ - - -/* Expanded entropy encoder object for Huffman encoding. - * - * The savable_state subrecord contains fields that change within an MCU, - * but must not be updated permanently until we complete the MCU. - */ - -typedef struct { - INT32 put_buffer; /* current bit-accumulation buffer */ - int put_bits; /* # of bits now in it */ - int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ -} savable_state; - -/* This macro is to work around compilers with missing or broken - * structure assignment. You'll need to fix this code if you have - * such a compiler and you change MAX_COMPS_IN_SCAN. - */ - -#ifndef NO_STRUCT_ASSIGN -#define ASSIGN_STATE(dest,src) ((dest) = (src)) -#else -#if MAX_COMPS_IN_SCAN == 4 -#define ASSIGN_STATE(dest,src) \ - ((dest).put_buffer = (src).put_buffer, \ - (dest).put_bits = (src).put_bits, \ - (dest).last_dc_val[0] = (src).last_dc_val[0], \ - (dest).last_dc_val[1] = (src).last_dc_val[1], \ - (dest).last_dc_val[2] = (src).last_dc_val[2], \ - (dest).last_dc_val[3] = (src).last_dc_val[3]) -#endif -#endif - - -typedef struct { - struct jpeg_entropy_encoder pub; /* public fields */ - - savable_state saved; /* Bit buffer & DC state at start of MCU */ - - /* These fields are NOT loaded into local working state. */ - unsigned int restarts_to_go; /* MCUs left in this restart interval */ - int next_restart_num; /* next restart number to write (0-7) */ - - /* Pointers to derived tables (these workspaces have image lifespan) */ - c_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS]; - c_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS]; - -#ifdef ENTROPY_OPT_SUPPORTED /* Statistics tables for optimization */ - long * dc_count_ptrs[NUM_HUFF_TBLS]; - long * ac_count_ptrs[NUM_HUFF_TBLS]; -#endif -} huff_entropy_encoder; - -typedef huff_entropy_encoder * huff_entropy_ptr; - -/* Working state while writing an MCU. - * This struct contains all the fields that are needed by subroutines. - */ - -typedef struct { - JOCTET * next_output_byte; /* => next byte to write in buffer */ - size_t free_in_buffer; /* # of byte spaces remaining in buffer */ - savable_state cur; /* Current bit buffer & DC state */ - j_compress_ptr cinfo; /* dump_buffer needs access to this */ -} working_state; - - -/* Forward declarations */ -METHODDEF(boolean) encode_mcu_huff JPP((j_compress_ptr cinfo, - JBLOCKROW *MCU_data)); -METHODDEF(void) finish_pass_huff JPP((j_compress_ptr cinfo)); -#ifdef ENTROPY_OPT_SUPPORTED -METHODDEF(boolean) encode_mcu_gather JPP((j_compress_ptr cinfo, - JBLOCKROW *MCU_data)); -METHODDEF(void) finish_pass_gather JPP((j_compress_ptr cinfo)); -#endif - - -/* - * Initialize for a Huffman-compressed scan. - * If gather_statistics is TRUE, we do not output anything during the scan, - * just count the Huffman symbols used and generate Huffman code tables. - */ - -METHODDEF(void) -start_pass_huff (j_compress_ptr cinfo, boolean gather_statistics) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int ci, dctbl, actbl; - jpeg_component_info * compptr; - - if (gather_statistics) { -#ifdef ENTROPY_OPT_SUPPORTED - entropy->pub.encode_mcu = encode_mcu_gather; - entropy->pub.finish_pass = finish_pass_gather; -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } else { - entropy->pub.encode_mcu = encode_mcu_huff; - entropy->pub.finish_pass = finish_pass_huff; - } - - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - dctbl = compptr->dc_tbl_no; - actbl = compptr->ac_tbl_no; - if (gather_statistics) { -#ifdef ENTROPY_OPT_SUPPORTED - /* Check for invalid table indexes */ - /* (make_c_derived_tbl does this in the other path) */ - if (dctbl < 0 || dctbl >= NUM_HUFF_TBLS) - ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, dctbl); - if (actbl < 0 || actbl >= NUM_HUFF_TBLS) - ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, actbl); - /* Allocate and zero the statistics tables */ - /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */ - if (entropy->dc_count_ptrs[dctbl] == NULL) - entropy->dc_count_ptrs[dctbl] = (long *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - 257 * SIZEOF(long)); - MEMZERO(entropy->dc_count_ptrs[dctbl], 257 * SIZEOF(long)); - if (entropy->ac_count_ptrs[actbl] == NULL) - entropy->ac_count_ptrs[actbl] = (long *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - 257 * SIZEOF(long)); - MEMZERO(entropy->ac_count_ptrs[actbl], 257 * SIZEOF(long)); -#endif - } else { - /* Compute derived values for Huffman tables */ - /* We may do this more than once for a table, but it's not expensive */ - jpeg_make_c_derived_tbl(cinfo, TRUE, dctbl, - & entropy->dc_derived_tbls[dctbl]); - jpeg_make_c_derived_tbl(cinfo, FALSE, actbl, - & entropy->ac_derived_tbls[actbl]); - } - /* Initialize DC predictions to 0 */ - entropy->saved.last_dc_val[ci] = 0; - } - - /* Initialize bit buffer to empty */ - entropy->saved.put_buffer = 0; - entropy->saved.put_bits = 0; - - /* Initialize restart stuff */ - entropy->restarts_to_go = cinfo->restart_interval; - entropy->next_restart_num = 0; -} - - -/* - * Compute the derived values for a Huffman table. - * This routine also performs some validation checks on the table. - * - * Note this is also used by jcphuff.c. - */ - -GLOBAL(void) -jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno, - c_derived_tbl ** pdtbl) -{ - JHUFF_TBL *htbl; - c_derived_tbl *dtbl; - int p, i, l, lastp, si, maxsymbol; - char huffsize[257]; - unsigned int huffcode[257]; - unsigned int code; - - /* Note that huffsize[] and huffcode[] are filled in code-length order, - * paralleling the order of the symbols themselves in htbl->huffval[]. - */ - - /* Find the input Huffman table */ - if (tblno < 0 || tblno >= NUM_HUFF_TBLS) - ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno); - htbl = - isDC ? cinfo->dc_huff_tbl_ptrs[tblno] : cinfo->ac_huff_tbl_ptrs[tblno]; - if (htbl == NULL) - ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno); - - /* Allocate a workspace if we haven't already done so. */ - if (*pdtbl == NULL) - *pdtbl = (c_derived_tbl *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(c_derived_tbl)); - dtbl = *pdtbl; - - /* Figure C.1: make table of Huffman code length for each symbol */ - - p = 0; - for (l = 1; l <= 16; l++) { - i = (int) htbl->bits[l]; - if (i < 0 || p + i > 256) /* protect against table overrun */ - ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); - while (i--) - huffsize[p++] = (char) l; - } - huffsize[p] = 0; - lastp = p; - - /* Figure C.2: generate the codes themselves */ - /* We also validate that the counts represent a legal Huffman code tree. */ - - code = 0; - si = huffsize[0]; - p = 0; - while (huffsize[p]) { - while (((int) huffsize[p]) == si) { - huffcode[p++] = code; - code++; - } - /* code is now 1 more than the last code used for codelength si; but - * it must still fit in si bits, since no code is allowed to be all ones. - */ - if (((INT32) code) >= (((INT32) 1) << si)) - ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); - code <<= 1; - si++; - } - - /* Figure C.3: generate encoding tables */ - /* These are code and size indexed by symbol value */ - - /* Set all codeless symbols to have code length 0; - * this lets us detect duplicate VAL entries here, and later - * allows emit_bits to detect any attempt to emit such symbols. - */ - MEMZERO(dtbl->ehufsi, SIZEOF(dtbl->ehufsi)); - - /* This is also a convenient place to check for out-of-range - * and duplicated VAL entries. We allow 0..255 for AC symbols - * but only 0..15 for DC. (We could constrain them further - * based on data depth and mode, but this seems enough.) - */ - maxsymbol = isDC ? 15 : 255; - - for (p = 0; p < lastp; p++) { - i = htbl->huffval[p]; - if (i < 0 || i > maxsymbol || dtbl->ehufsi[i]) - ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); - dtbl->ehufco[i] = huffcode[p]; - dtbl->ehufsi[i] = huffsize[p]; - } -} - - -/* Outputting bytes to the file */ - -/* Emit a byte, taking 'action' if must suspend. */ -#define emit_byte(state,val,action) \ - { *(state)->next_output_byte++ = (JOCTET) (val); \ - if (--(state)->free_in_buffer == 0) \ - if (! dump_buffer(state)) \ - { action; } } - - -LOCAL(boolean) -dump_buffer (working_state * state) -/* Empty the output buffer; return TRUE if successful, FALSE if must suspend */ -{ - struct jpeg_destination_mgr * dest = state->cinfo->dest; - - if (! (*dest->empty_output_buffer) (state->cinfo)) - return FALSE; - /* After a successful buffer dump, must reset buffer pointers */ - state->next_output_byte = dest->next_output_byte; - state->free_in_buffer = dest->free_in_buffer; - return TRUE; -} - - -/* Outputting bits to the file */ - -/* Only the right 24 bits of put_buffer are used; the valid bits are - * left-justified in this part. At most 16 bits can be passed to emit_bits - * in one call, and we never retain more than 7 bits in put_buffer - * between calls, so 24 bits are sufficient. - */ - -INLINE -LOCAL(boolean) -emit_bits (working_state * state, unsigned int code, int size) -/* Emit some bits; return TRUE if successful, FALSE if must suspend */ -{ - /* This routine is heavily used, so it's worth coding tightly. */ - register INT32 put_buffer = (INT32) code; - register int put_bits = state->cur.put_bits; - - /* if size is 0, caller used an invalid Huffman table entry */ - if (size == 0) - ERREXIT(state->cinfo, JERR_HUFF_MISSING_CODE); - - put_buffer &= (((INT32) 1)<cur.put_buffer; /* and merge with old buffer contents */ - - while (put_bits >= 8) { - int c = (int) ((put_buffer >> 16) & 0xFF); - - emit_byte(state, c, return FALSE); - if (c == 0xFF) { /* need to stuff a zero byte? */ - emit_byte(state, 0, return FALSE); - } - put_buffer <<= 8; - put_bits -= 8; - } - - state->cur.put_buffer = put_buffer; /* update state variables */ - state->cur.put_bits = put_bits; - - return TRUE; -} - - -LOCAL(boolean) -flush_bits (working_state * state) -{ - if (! emit_bits(state, 0x7F, 7)) /* fill any partial byte with ones */ - return FALSE; - state->cur.put_buffer = 0; /* and reset bit-buffer to empty */ - state->cur.put_bits = 0; - return TRUE; -} - - -/* Encode a single block's worth of coefficients */ - -LOCAL(boolean) -encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val, - c_derived_tbl *dctbl, c_derived_tbl *actbl) -{ - register int temp, temp2; - register int nbits; - register int k, r, i; - - /* Encode the DC coefficient difference per section F.1.2.1 */ - - temp = temp2 = block[0] - last_dc_val; - - if (temp < 0) { - temp = -temp; /* temp is abs value of input */ - /* For a negative input, want temp2 = bitwise complement of abs(input) */ - /* This code assumes we are on a two's complement machine */ - temp2--; - } - - /* Find the number of bits needed for the magnitude of the coefficient */ - nbits = 0; - while (temp) { - nbits++; - temp >>= 1; - } - /* Check for out-of-range coefficient values. - * Since we're encoding a difference, the range limit is twice as much. - */ - if (nbits > MAX_COEF_BITS+1) - ERREXIT(state->cinfo, JERR_BAD_DCT_COEF); - - /* Emit the Huffman-coded symbol for the number of bits */ - if (! emit_bits(state, dctbl->ehufco[nbits], dctbl->ehufsi[nbits])) - return FALSE; - - /* Emit that number of bits of the value, if positive, */ - /* or the complement of its magnitude, if negative. */ - if (nbits) /* emit_bits rejects calls with size 0 */ - if (! emit_bits(state, (unsigned int) temp2, nbits)) - return FALSE; - - /* Encode the AC coefficients per section F.1.2.2 */ - - r = 0; /* r = run length of zeros */ - - for (k = 1; k < DCTSIZE2; k++) { - if ((temp = block[jpeg_natural_order[k]]) == 0) { - r++; - } else { - /* if run length > 15, must emit special run-length-16 codes (0xF0) */ - while (r > 15) { - if (! emit_bits(state, actbl->ehufco[0xF0], actbl->ehufsi[0xF0])) - return FALSE; - r -= 16; - } - - temp2 = temp; - if (temp < 0) { - temp = -temp; /* temp is abs value of input */ - /* This code assumes we are on a two's complement machine */ - temp2--; - } - - /* Find the number of bits needed for the magnitude of the coefficient */ - nbits = 1; /* there must be at least one 1 bit */ - while ((temp >>= 1)) - nbits++; - /* Check for out-of-range coefficient values */ - if (nbits > MAX_COEF_BITS) - ERREXIT(state->cinfo, JERR_BAD_DCT_COEF); - - /* Emit Huffman symbol for run length / number of bits */ - i = (r << 4) + nbits; - if (! emit_bits(state, actbl->ehufco[i], actbl->ehufsi[i])) - return FALSE; - - /* Emit that number of bits of the value, if positive, */ - /* or the complement of its magnitude, if negative. */ - if (! emit_bits(state, (unsigned int) temp2, nbits)) - return FALSE; - - r = 0; - } - } - - /* If the last coef(s) were zero, emit an end-of-block code */ - if (r > 0) - if (! emit_bits(state, actbl->ehufco[0], actbl->ehufsi[0])) - return FALSE; - - return TRUE; -} - - -/* - * Emit a restart marker & resynchronize predictions. - */ - -LOCAL(boolean) -emit_restart (working_state * state, int restart_num) -{ - int ci; - - if (! flush_bits(state)) - return FALSE; - - emit_byte(state, 0xFF, return FALSE); - emit_byte(state, JPEG_RST0 + restart_num, return FALSE); - - /* Re-initialize DC predictions to 0 */ - for (ci = 0; ci < state->cinfo->comps_in_scan; ci++) - state->cur.last_dc_val[ci] = 0; - - /* The restart counter is not updated until we successfully write the MCU. */ - - return TRUE; -} - - -/* - * Encode and output one MCU's worth of Huffman-compressed coefficients. - */ - -METHODDEF(boolean) -encode_mcu_huff (j_compress_ptr cinfo, JBLOCKROW *MCU_data) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - working_state state; - int blkn, ci; - jpeg_component_info * compptr; - - /* Load up working state */ - state.next_output_byte = cinfo->dest->next_output_byte; - state.free_in_buffer = cinfo->dest->free_in_buffer; - ASSIGN_STATE(state.cur, entropy->saved); - state.cinfo = cinfo; - - /* Emit restart marker if needed */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) - if (! emit_restart(&state, entropy->next_restart_num)) - return FALSE; - } - - /* Encode the MCU data blocks */ - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - ci = cinfo->MCU_membership[blkn]; - compptr = cinfo->cur_comp_info[ci]; - if (! encode_one_block(&state, - MCU_data[blkn][0], state.cur.last_dc_val[ci], - entropy->dc_derived_tbls[compptr->dc_tbl_no], - entropy->ac_derived_tbls[compptr->ac_tbl_no])) - return FALSE; - /* Update last_dc_val */ - state.cur.last_dc_val[ci] = MCU_data[blkn][0][0]; - } - - /* Completed MCU, so update state */ - cinfo->dest->next_output_byte = state.next_output_byte; - cinfo->dest->free_in_buffer = state.free_in_buffer; - ASSIGN_STATE(entropy->saved, state.cur); - - /* Update restart-interval state too */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) { - entropy->restarts_to_go = cinfo->restart_interval; - entropy->next_restart_num++; - entropy->next_restart_num &= 7; - } - entropy->restarts_to_go--; - } - - return TRUE; -} - - -/* - * Finish up at the end of a Huffman-compressed scan. - */ - -METHODDEF(void) -finish_pass_huff (j_compress_ptr cinfo) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - working_state state; - - /* Load up working state ... flush_bits needs it */ - state.next_output_byte = cinfo->dest->next_output_byte; - state.free_in_buffer = cinfo->dest->free_in_buffer; - ASSIGN_STATE(state.cur, entropy->saved); - state.cinfo = cinfo; - - /* Flush out the last data */ - if (! flush_bits(&state)) - ERREXIT(cinfo, JERR_CANT_SUSPEND); - - /* Update state */ - cinfo->dest->next_output_byte = state.next_output_byte; - cinfo->dest->free_in_buffer = state.free_in_buffer; - ASSIGN_STATE(entropy->saved, state.cur); -} - - -/* - * Huffman coding optimization. - * - * We first scan the supplied data and count the number of uses of each symbol - * that is to be Huffman-coded. (This process MUST agree with the code above.) - * Then we build a Huffman coding tree for the observed counts. - * Symbols which are not needed at all for the particular image are not - * assigned any code, which saves space in the DHT marker as well as in - * the compressed data. - */ - -#ifdef ENTROPY_OPT_SUPPORTED - - -/* Process a single block's worth of coefficients */ - -LOCAL(void) -htest_one_block (j_compress_ptr cinfo, JCOEFPTR block, int last_dc_val, - long dc_counts[], long ac_counts[]) -{ - register int temp; - register int nbits; - register int k, r; - - /* Encode the DC coefficient difference per section F.1.2.1 */ - - temp = block[0] - last_dc_val; - if (temp < 0) - temp = -temp; - - /* Find the number of bits needed for the magnitude of the coefficient */ - nbits = 0; - while (temp) { - nbits++; - temp >>= 1; - } - /* Check for out-of-range coefficient values. - * Since we're encoding a difference, the range limit is twice as much. - */ - if (nbits > MAX_COEF_BITS+1) - ERREXIT(cinfo, JERR_BAD_DCT_COEF); - - /* Count the Huffman symbol for the number of bits */ - dc_counts[nbits]++; - - /* Encode the AC coefficients per section F.1.2.2 */ - - r = 0; /* r = run length of zeros */ - - for (k = 1; k < DCTSIZE2; k++) { - if ((temp = block[jpeg_natural_order[k]]) == 0) { - r++; - } else { - /* if run length > 15, must emit special run-length-16 codes (0xF0) */ - while (r > 15) { - ac_counts[0xF0]++; - r -= 16; - } - - /* Find the number of bits needed for the magnitude of the coefficient */ - if (temp < 0) - temp = -temp; - - /* Find the number of bits needed for the magnitude of the coefficient */ - nbits = 1; /* there must be at least one 1 bit */ - while ((temp >>= 1)) - nbits++; - /* Check for out-of-range coefficient values */ - if (nbits > MAX_COEF_BITS) - ERREXIT(cinfo, JERR_BAD_DCT_COEF); - - /* Count Huffman symbol for run length / number of bits */ - ac_counts[(r << 4) + nbits]++; - - r = 0; - } - } - - /* If the last coef(s) were zero, emit an end-of-block code */ - if (r > 0) - ac_counts[0]++; -} - - -/* - * Trial-encode one MCU's worth of Huffman-compressed coefficients. - * No data is actually output, so no suspension return is possible. - */ - -METHODDEF(boolean) -encode_mcu_gather (j_compress_ptr cinfo, JBLOCKROW *MCU_data) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int blkn, ci; - jpeg_component_info * compptr; - - /* Take care of restart intervals if needed */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) { - /* Re-initialize DC predictions to 0 */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) - entropy->saved.last_dc_val[ci] = 0; - /* Update restart state */ - entropy->restarts_to_go = cinfo->restart_interval; - } - entropy->restarts_to_go--; - } - - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - ci = cinfo->MCU_membership[blkn]; - compptr = cinfo->cur_comp_info[ci]; - htest_one_block(cinfo, MCU_data[blkn][0], entropy->saved.last_dc_val[ci], - entropy->dc_count_ptrs[compptr->dc_tbl_no], - entropy->ac_count_ptrs[compptr->ac_tbl_no]); - entropy->saved.last_dc_val[ci] = MCU_data[blkn][0][0]; - } - - return TRUE; -} - - -/* - * Generate the best Huffman code table for the given counts, fill htbl. - * Note this is also used by jcphuff.c. - * - * The JPEG standard requires that no symbol be assigned a codeword of all - * one bits (so that padding bits added at the end of a compressed segment - * can't look like a valid code). Because of the canonical ordering of - * codewords, this just means that there must be an unused slot in the - * longest codeword length category. Section K.2 of the JPEG spec suggests - * reserving such a slot by pretending that symbol 256 is a valid symbol - * with count 1. In theory that's not optimal; giving it count zero but - * including it in the symbol set anyway should give a better Huffman code. - * But the theoretically better code actually seems to come out worse in - * practice, because it produces more all-ones bytes (which incur stuffed - * zero bytes in the final file). In any case the difference is tiny. - * - * The JPEG standard requires Huffman codes to be no more than 16 bits long. - * If some symbols have a very small but nonzero probability, the Huffman tree - * must be adjusted to meet the code length restriction. We currently use - * the adjustment method suggested in JPEG section K.2. This method is *not* - * optimal; it may not choose the best possible limited-length code. But - * typically only very-low-frequency symbols will be given less-than-optimal - * lengths, so the code is almost optimal. Experimental comparisons against - * an optimal limited-length-code algorithm indicate that the difference is - * microscopic --- usually less than a hundredth of a percent of total size. - * So the extra complexity of an optimal algorithm doesn't seem worthwhile. - */ - -GLOBAL(void) -jpeg_gen_optimal_table (j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[]) -{ -#define MAX_CLEN 32 /* assumed maximum initial code length */ - UINT8 bits[MAX_CLEN+1]; /* bits[k] = # of symbols with code length k */ - int codesize[257]; /* codesize[k] = code length of symbol k */ - int others[257]; /* next symbol in current branch of tree */ - int c1, c2; - int p, i, j; - long v; - - /* This algorithm is explained in section K.2 of the JPEG standard */ - - MEMZERO(bits, SIZEOF(bits)); - MEMZERO(codesize, SIZEOF(codesize)); - for (i = 0; i < 257; i++) - others[i] = -1; /* init links to empty */ - - freq[256] = 1; /* make sure 256 has a nonzero count */ - /* Including the pseudo-symbol 256 in the Huffman procedure guarantees - * that no real symbol is given code-value of all ones, because 256 - * will be placed last in the largest codeword category. - */ - - /* Huffman's basic algorithm to assign optimal code lengths to symbols */ - - for (;;) { - /* Find the smallest nonzero frequency, set c1 = its symbol */ - /* In case of ties, take the larger symbol number */ - c1 = -1; - v = 1000000000L; - for (i = 0; i <= 256; i++) { - if (freq[i] && freq[i] <= v) { - v = freq[i]; - c1 = i; - } - } - - /* Find the next smallest nonzero frequency, set c2 = its symbol */ - /* In case of ties, take the larger symbol number */ - c2 = -1; - v = 1000000000L; - for (i = 0; i <= 256; i++) { - if (freq[i] && freq[i] <= v && i != c1) { - v = freq[i]; - c2 = i; - } - } - - /* Done if we've merged everything into one frequency */ - if (c2 < 0) - break; - - /* Else merge the two counts/trees */ - freq[c1] += freq[c2]; - freq[c2] = 0; - - /* Increment the codesize of everything in c1's tree branch */ - codesize[c1]++; - while (others[c1] >= 0) { - c1 = others[c1]; - codesize[c1]++; - } - - others[c1] = c2; /* chain c2 onto c1's tree branch */ - - /* Increment the codesize of everything in c2's tree branch */ - codesize[c2]++; - while (others[c2] >= 0) { - c2 = others[c2]; - codesize[c2]++; - } - } - - /* Now count the number of symbols of each code length */ - for (i = 0; i <= 256; i++) { - if (codesize[i]) { - /* The JPEG standard seems to think that this can't happen, */ - /* but I'm paranoid... */ - if (codesize[i] > MAX_CLEN) - ERREXIT(cinfo, JERR_HUFF_CLEN_OVERFLOW); - - bits[codesize[i]]++; - } - } - - /* JPEG doesn't allow symbols with code lengths over 16 bits, so if the pure - * Huffman procedure assigned any such lengths, we must adjust the coding. - * Here is what the JPEG spec says about how this next bit works: - * Since symbols are paired for the longest Huffman code, the symbols are - * removed from this length category two at a time. The prefix for the pair - * (which is one bit shorter) is allocated to one of the pair; then, - * skipping the BITS entry for that prefix length, a code word from the next - * shortest nonzero BITS entry is converted into a prefix for two code words - * one bit longer. - */ - - for (i = MAX_CLEN; i > 16; i--) { - while (bits[i] > 0) { - j = i - 2; /* find length of new prefix to be used */ - while (bits[j] == 0) - j--; - - bits[i] -= 2; /* remove two symbols */ - bits[i-1]++; /* one goes in this length */ - bits[j+1] += 2; /* two new symbols in this length */ - bits[j]--; /* symbol of this length is now a prefix */ - } - } - - /* Remove the count for the pseudo-symbol 256 from the largest codelength */ - while (bits[i] == 0) /* find largest codelength still in use */ - i--; - bits[i]--; - - /* Return final symbol counts (only for lengths 0..16) */ - MEMCOPY(htbl->bits, bits, SIZEOF(htbl->bits)); - - /* Return a list of the symbols sorted by code length */ - /* It's not real clear to me why we don't need to consider the codelength - * changes made above, but the JPEG spec seems to think this works. - */ - p = 0; - for (i = 1; i <= MAX_CLEN; i++) { - for (j = 0; j <= 255; j++) { - if (codesize[j] == i) { - htbl->huffval[p] = (UINT8) j; - p++; - } - } - } - - /* Set sent_table FALSE so updated table will be written to JPEG file. */ - htbl->sent_table = FALSE; -} - - -/* - * Finish up a statistics-gathering pass and create the new Huffman tables. - */ - -METHODDEF(void) -finish_pass_gather (j_compress_ptr cinfo) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int ci, dctbl, actbl; - jpeg_component_info * compptr; - JHUFF_TBL **htblptr; - boolean did_dc[NUM_HUFF_TBLS]; - boolean did_ac[NUM_HUFF_TBLS]; - - /* It's important not to apply jpeg_gen_optimal_table more than once - * per table, because it clobbers the input frequency counts! - */ - MEMZERO(did_dc, SIZEOF(did_dc)); - MEMZERO(did_ac, SIZEOF(did_ac)); - - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - dctbl = compptr->dc_tbl_no; - actbl = compptr->ac_tbl_no; - if (! did_dc[dctbl]) { - htblptr = & cinfo->dc_huff_tbl_ptrs[dctbl]; - if (*htblptr == NULL) - *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); - jpeg_gen_optimal_table(cinfo, *htblptr, entropy->dc_count_ptrs[dctbl]); - did_dc[dctbl] = TRUE; - } - if (! did_ac[actbl]) { - htblptr = & cinfo->ac_huff_tbl_ptrs[actbl]; - if (*htblptr == NULL) - *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); - jpeg_gen_optimal_table(cinfo, *htblptr, entropy->ac_count_ptrs[actbl]); - did_ac[actbl] = TRUE; - } - } -} - - -#endif /* ENTROPY_OPT_SUPPORTED */ - - -/* - * Module initialization routine for Huffman entropy encoding. - */ - -GLOBAL(void) -jinit_huff_encoder (j_compress_ptr cinfo) -{ - huff_entropy_ptr entropy; - int i; - - entropy = (huff_entropy_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(huff_entropy_encoder)); - cinfo->entropy = (struct jpeg_entropy_encoder *) entropy; - entropy->pub.start_pass = start_pass_huff; - - /* Mark tables unallocated */ - for (i = 0; i < NUM_HUFF_TBLS; i++) { - entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL; -#ifdef ENTROPY_OPT_SUPPORTED - entropy->dc_count_ptrs[i] = entropy->ac_count_ptrs[i] = NULL; -#endif - } -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jchuff.h b/gtkmm-osx/trunk/jpeg-6b/jchuff.h deleted file mode 100644 index a9599fc..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jchuff.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * jchuff.h - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains declarations for Huffman entropy encoding routines - * that are shared between the sequential encoder (jchuff.c) and the - * progressive encoder (jcphuff.c). No other modules need to see these. - */ - -/* The legal range of a DCT coefficient is - * -1024 .. +1023 for 8-bit data; - * -16384 .. +16383 for 12-bit data. - * Hence the magnitude should always fit in 10 or 14 bits respectively. - */ - -#if BITS_IN_JSAMPLE == 8 -#define MAX_COEF_BITS 10 -#else -#define MAX_COEF_BITS 14 -#endif - -/* Derived data constructed for each Huffman table */ - -typedef struct { - unsigned int ehufco[256]; /* code for each symbol */ - char ehufsi[256]; /* length of code for each symbol */ - /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */ -} c_derived_tbl; - -/* Short forms of external names for systems with brain-damaged linkers. */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jpeg_make_c_derived_tbl jMkCDerived -#define jpeg_gen_optimal_table jGenOptTbl -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - -/* Expand a Huffman table definition into the derived format */ -EXTERN(void) jpeg_make_c_derived_tbl - JPP((j_compress_ptr cinfo, boolean isDC, int tblno, - c_derived_tbl ** pdtbl)); - -/* Generate an optimal table definition given the specified counts */ -EXTERN(void) jpeg_gen_optimal_table - JPP((j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[])); diff --git a/gtkmm-osx/trunk/jpeg-6b/jcinit.c b/gtkmm-osx/trunk/jpeg-6b/jcinit.c deleted file mode 100644 index 5efffe3..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jcinit.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * jcinit.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains initialization logic for the JPEG compressor. - * This routine is in charge of selecting the modules to be executed and - * making an initialization call to each one. - * - * Logically, this code belongs in jcmaster.c. It's split out because - * linking this routine implies linking the entire compression library. - * For a transcoding-only application, we want to be able to use jcmaster.c - * without linking in the whole library. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* - * Master selection of compression modules. - * This is done once at the start of processing an image. We determine - * which modules will be used and give them appropriate initialization calls. - */ - -GLOBAL(void) -jinit_compress_master (j_compress_ptr cinfo) -{ - /* Initialize master control (includes parameter checking/processing) */ - jinit_c_master_control(cinfo, FALSE /* full compression */); - - /* Preprocessing */ - if (! cinfo->raw_data_in) { - jinit_color_converter(cinfo); - jinit_downsampler(cinfo); - jinit_c_prep_controller(cinfo, FALSE /* never need full buffer here */); - } - /* Forward DCT */ - jinit_forward_dct(cinfo); - /* Entropy encoding: either Huffman or arithmetic coding. */ - if (cinfo->arith_code) { - ERREXIT(cinfo, JERR_ARITH_NOTIMPL); - } else { - if (cinfo->progressive_mode) { -#ifdef C_PROGRESSIVE_SUPPORTED - jinit_phuff_encoder(cinfo); -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } else - jinit_huff_encoder(cinfo); - } - - /* Need a full-image coefficient buffer in any multi-pass mode. */ - jinit_c_coef_controller(cinfo, - (boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding)); - jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */); - - jinit_marker_writer(cinfo); - - /* We can now tell the memory manager to allocate virtual arrays. */ - (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); - - /* Write the datastream header (SOI) immediately. - * Frame and scan headers are postponed till later. - * This lets application insert special markers after the SOI. - */ - (*cinfo->marker->write_file_header) (cinfo); -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jcmainct.c b/gtkmm-osx/trunk/jpeg-6b/jcmainct.c deleted file mode 100644 index e0279a7..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jcmainct.c +++ /dev/null @@ -1,293 +0,0 @@ -/* - * jcmainct.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains the main buffer controller for compression. - * The main buffer lies between the pre-processor and the JPEG - * compressor proper; it holds downsampled data in the JPEG colorspace. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Note: currently, there is no operating mode in which a full-image buffer - * is needed at this step. If there were, that mode could not be used with - * "raw data" input, since this module is bypassed in that case. However, - * we've left the code here for possible use in special applications. - */ -#undef FULL_MAIN_BUFFER_SUPPORTED - - -/* Private buffer controller object */ - -typedef struct { - struct jpeg_c_main_controller pub; /* public fields */ - - JDIMENSION cur_iMCU_row; /* number of current iMCU row */ - JDIMENSION rowgroup_ctr; /* counts row groups received in iMCU row */ - boolean suspended; /* remember if we suspended output */ - J_BUF_MODE pass_mode; /* current operating mode */ - - /* If using just a strip buffer, this points to the entire set of buffers - * (we allocate one for each component). In the full-image case, this - * points to the currently accessible strips of the virtual arrays. - */ - JSAMPARRAY buffer[MAX_COMPONENTS]; - -#ifdef FULL_MAIN_BUFFER_SUPPORTED - /* If using full-image storage, this array holds pointers to virtual-array - * control blocks for each component. Unused if not full-image storage. - */ - jvirt_sarray_ptr whole_image[MAX_COMPONENTS]; -#endif -} my_main_controller; - -typedef my_main_controller * my_main_ptr; - - -/* Forward declarations */ -METHODDEF(void) process_data_simple_main - JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf, - JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail)); -#ifdef FULL_MAIN_BUFFER_SUPPORTED -METHODDEF(void) process_data_buffer_main - JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf, - JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail)); -#endif - - -/* - * Initialize for a processing pass. - */ - -METHODDEF(void) -start_pass_main (j_compress_ptr cinfo, J_BUF_MODE pass_mode) -{ - my_main_ptr main = (my_main_ptr) cinfo->main; - - /* Do nothing in raw-data mode. */ - if (cinfo->raw_data_in) - return; - - main->cur_iMCU_row = 0; /* initialize counters */ - main->rowgroup_ctr = 0; - main->suspended = FALSE; - main->pass_mode = pass_mode; /* save mode for use by process_data */ - - switch (pass_mode) { - case JBUF_PASS_THRU: -#ifdef FULL_MAIN_BUFFER_SUPPORTED - if (main->whole_image[0] != NULL) - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); -#endif - main->pub.process_data = process_data_simple_main; - break; -#ifdef FULL_MAIN_BUFFER_SUPPORTED - case JBUF_SAVE_SOURCE: - case JBUF_CRANK_DEST: - case JBUF_SAVE_AND_PASS: - if (main->whole_image[0] == NULL) - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - main->pub.process_data = process_data_buffer_main; - break; -#endif - default: - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - break; - } -} - - -/* - * Process some data. - * This routine handles the simple pass-through mode, - * where we have only a strip buffer. - */ - -METHODDEF(void) -process_data_simple_main (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, - JDIMENSION in_rows_avail) -{ - my_main_ptr main = (my_main_ptr) cinfo->main; - - while (main->cur_iMCU_row < cinfo->total_iMCU_rows) { - /* Read input data if we haven't filled the main buffer yet */ - if (main->rowgroup_ctr < DCTSIZE) - (*cinfo->prep->pre_process_data) (cinfo, - input_buf, in_row_ctr, in_rows_avail, - main->buffer, &main->rowgroup_ctr, - (JDIMENSION) DCTSIZE); - - /* If we don't have a full iMCU row buffered, return to application for - * more data. Note that preprocessor will always pad to fill the iMCU row - * at the bottom of the image. - */ - if (main->rowgroup_ctr != DCTSIZE) - return; - - /* Send the completed row to the compressor */ - if (! (*cinfo->coef->compress_data) (cinfo, main->buffer)) { - /* If compressor did not consume the whole row, then we must need to - * suspend processing and return to the application. In this situation - * we pretend we didn't yet consume the last input row; otherwise, if - * it happened to be the last row of the image, the application would - * think we were done. - */ - if (! main->suspended) { - (*in_row_ctr)--; - main->suspended = TRUE; - } - return; - } - /* We did finish the row. Undo our little suspension hack if a previous - * call suspended; then mark the main buffer empty. - */ - if (main->suspended) { - (*in_row_ctr)++; - main->suspended = FALSE; - } - main->rowgroup_ctr = 0; - main->cur_iMCU_row++; - } -} - - -#ifdef FULL_MAIN_BUFFER_SUPPORTED - -/* - * Process some data. - * This routine handles all of the modes that use a full-size buffer. - */ - -METHODDEF(void) -process_data_buffer_main (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, - JDIMENSION in_rows_avail) -{ - my_main_ptr main = (my_main_ptr) cinfo->main; - int ci; - jpeg_component_info *compptr; - boolean writing = (main->pass_mode != JBUF_CRANK_DEST); - - while (main->cur_iMCU_row < cinfo->total_iMCU_rows) { - /* Realign the virtual buffers if at the start of an iMCU row. */ - if (main->rowgroup_ctr == 0) { - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - main->buffer[ci] = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, main->whole_image[ci], - main->cur_iMCU_row * (compptr->v_samp_factor * DCTSIZE), - (JDIMENSION) (compptr->v_samp_factor * DCTSIZE), writing); - } - /* In a read pass, pretend we just read some source data. */ - if (! writing) { - *in_row_ctr += cinfo->max_v_samp_factor * DCTSIZE; - main->rowgroup_ctr = DCTSIZE; - } - } - - /* If a write pass, read input data until the current iMCU row is full. */ - /* Note: preprocessor will pad if necessary to fill the last iMCU row. */ - if (writing) { - (*cinfo->prep->pre_process_data) (cinfo, - input_buf, in_row_ctr, in_rows_avail, - main->buffer, &main->rowgroup_ctr, - (JDIMENSION) DCTSIZE); - /* Return to application if we need more data to fill the iMCU row. */ - if (main->rowgroup_ctr < DCTSIZE) - return; - } - - /* Emit data, unless this is a sink-only pass. */ - if (main->pass_mode != JBUF_SAVE_SOURCE) { - if (! (*cinfo->coef->compress_data) (cinfo, main->buffer)) { - /* If compressor did not consume the whole row, then we must need to - * suspend processing and return to the application. In this situation - * we pretend we didn't yet consume the last input row; otherwise, if - * it happened to be the last row of the image, the application would - * think we were done. - */ - if (! main->suspended) { - (*in_row_ctr)--; - main->suspended = TRUE; - } - return; - } - /* We did finish the row. Undo our little suspension hack if a previous - * call suspended; then mark the main buffer empty. - */ - if (main->suspended) { - (*in_row_ctr)++; - main->suspended = FALSE; - } - } - - /* If get here, we are done with this iMCU row. Mark buffer empty. */ - main->rowgroup_ctr = 0; - main->cur_iMCU_row++; - } -} - -#endif /* FULL_MAIN_BUFFER_SUPPORTED */ - - -/* - * Initialize main buffer controller. - */ - -GLOBAL(void) -jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer) -{ - my_main_ptr main; - int ci; - jpeg_component_info *compptr; - - main = (my_main_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_main_controller)); - cinfo->main = (struct jpeg_c_main_controller *) main; - main->pub.start_pass = start_pass_main; - - /* We don't need to create a buffer in raw-data mode. */ - if (cinfo->raw_data_in) - return; - - /* Create the buffer. It holds downsampled data, so each component - * may be of a different size. - */ - if (need_full_buffer) { -#ifdef FULL_MAIN_BUFFER_SUPPORTED - /* Allocate a full-image virtual array for each component */ - /* Note we pad the bottom to a multiple of the iMCU height */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - main->whole_image[ci] = (*cinfo->mem->request_virt_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, - compptr->width_in_blocks * DCTSIZE, - (JDIMENSION) jround_up((long) compptr->height_in_blocks, - (long) compptr->v_samp_factor) * DCTSIZE, - (JDIMENSION) (compptr->v_samp_factor * DCTSIZE)); - } -#else - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); -#endif - } else { -#ifdef FULL_MAIN_BUFFER_SUPPORTED - main->whole_image[0] = NULL; /* flag for no virtual arrays */ -#endif - /* Allocate a strip buffer for each component */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - main->buffer[ci] = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - compptr->width_in_blocks * DCTSIZE, - (JDIMENSION) (compptr->v_samp_factor * DCTSIZE)); - } - } -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jcmarker.c b/gtkmm-osx/trunk/jpeg-6b/jcmarker.c deleted file mode 100644 index 3d1e6c6..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jcmarker.c +++ /dev/null @@ -1,664 +0,0 @@ -/* - * jcmarker.c - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to write JPEG datastream markers. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -typedef enum { /* JPEG marker codes */ - M_SOF0 = 0xc0, - M_SOF1 = 0xc1, - M_SOF2 = 0xc2, - M_SOF3 = 0xc3, - - M_SOF5 = 0xc5, - M_SOF6 = 0xc6, - M_SOF7 = 0xc7, - - M_JPG = 0xc8, - M_SOF9 = 0xc9, - M_SOF10 = 0xca, - M_SOF11 = 0xcb, - - M_SOF13 = 0xcd, - M_SOF14 = 0xce, - M_SOF15 = 0xcf, - - M_DHT = 0xc4, - - M_DAC = 0xcc, - - M_RST0 = 0xd0, - M_RST1 = 0xd1, - M_RST2 = 0xd2, - M_RST3 = 0xd3, - M_RST4 = 0xd4, - M_RST5 = 0xd5, - M_RST6 = 0xd6, - M_RST7 = 0xd7, - - M_SOI = 0xd8, - M_EOI = 0xd9, - M_SOS = 0xda, - M_DQT = 0xdb, - M_DNL = 0xdc, - M_DRI = 0xdd, - M_DHP = 0xde, - M_EXP = 0xdf, - - M_APP0 = 0xe0, - M_APP1 = 0xe1, - M_APP2 = 0xe2, - M_APP3 = 0xe3, - M_APP4 = 0xe4, - M_APP5 = 0xe5, - M_APP6 = 0xe6, - M_APP7 = 0xe7, - M_APP8 = 0xe8, - M_APP9 = 0xe9, - M_APP10 = 0xea, - M_APP11 = 0xeb, - M_APP12 = 0xec, - M_APP13 = 0xed, - M_APP14 = 0xee, - M_APP15 = 0xef, - - M_JPG0 = 0xf0, - M_JPG13 = 0xfd, - M_COM = 0xfe, - - M_TEM = 0x01, - - M_ERROR = 0x100 -} JPEG_MARKER; - - -/* Private state */ - -typedef struct { - struct jpeg_marker_writer pub; /* public fields */ - - unsigned int last_restart_interval; /* last DRI value emitted; 0 after SOI */ -} my_marker_writer; - -typedef my_marker_writer * my_marker_ptr; - - -/* - * Basic output routines. - * - * Note that we do not support suspension while writing a marker. - * Therefore, an application using suspension must ensure that there is - * enough buffer space for the initial markers (typ. 600-700 bytes) before - * calling jpeg_start_compress, and enough space to write the trailing EOI - * (a few bytes) before calling jpeg_finish_compress. Multipass compression - * modes are not supported at all with suspension, so those two are the only - * points where markers will be written. - */ - -LOCAL(void) -emit_byte (j_compress_ptr cinfo, int val) -/* Emit a byte */ -{ - struct jpeg_destination_mgr * dest = cinfo->dest; - - *(dest->next_output_byte)++ = (JOCTET) val; - if (--dest->free_in_buffer == 0) { - if (! (*dest->empty_output_buffer) (cinfo)) - ERREXIT(cinfo, JERR_CANT_SUSPEND); - } -} - - -LOCAL(void) -emit_marker (j_compress_ptr cinfo, JPEG_MARKER mark) -/* Emit a marker code */ -{ - emit_byte(cinfo, 0xFF); - emit_byte(cinfo, (int) mark); -} - - -LOCAL(void) -emit_2bytes (j_compress_ptr cinfo, int value) -/* Emit a 2-byte integer; these are always MSB first in JPEG files */ -{ - emit_byte(cinfo, (value >> 8) & 0xFF); - emit_byte(cinfo, value & 0xFF); -} - - -/* - * Routines to write specific marker types. - */ - -LOCAL(int) -emit_dqt (j_compress_ptr cinfo, int index) -/* Emit a DQT marker */ -/* Returns the precision used (0 = 8bits, 1 = 16bits) for baseline checking */ -{ - JQUANT_TBL * qtbl = cinfo->quant_tbl_ptrs[index]; - int prec; - int i; - - if (qtbl == NULL) - ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, index); - - prec = 0; - for (i = 0; i < DCTSIZE2; i++) { - if (qtbl->quantval[i] > 255) - prec = 1; - } - - if (! qtbl->sent_table) { - emit_marker(cinfo, M_DQT); - - emit_2bytes(cinfo, prec ? DCTSIZE2*2 + 1 + 2 : DCTSIZE2 + 1 + 2); - - emit_byte(cinfo, index + (prec<<4)); - - for (i = 0; i < DCTSIZE2; i++) { - /* The table entries must be emitted in zigzag order. */ - unsigned int qval = qtbl->quantval[jpeg_natural_order[i]]; - if (prec) - emit_byte(cinfo, (int) (qval >> 8)); - emit_byte(cinfo, (int) (qval & 0xFF)); - } - - qtbl->sent_table = TRUE; - } - - return prec; -} - - -LOCAL(void) -emit_dht (j_compress_ptr cinfo, int index, boolean is_ac) -/* Emit a DHT marker */ -{ - JHUFF_TBL * htbl; - int length, i; - - if (is_ac) { - htbl = cinfo->ac_huff_tbl_ptrs[index]; - index += 0x10; /* output index has AC bit set */ - } else { - htbl = cinfo->dc_huff_tbl_ptrs[index]; - } - - if (htbl == NULL) - ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, index); - - if (! htbl->sent_table) { - emit_marker(cinfo, M_DHT); - - length = 0; - for (i = 1; i <= 16; i++) - length += htbl->bits[i]; - - emit_2bytes(cinfo, length + 2 + 1 + 16); - emit_byte(cinfo, index); - - for (i = 1; i <= 16; i++) - emit_byte(cinfo, htbl->bits[i]); - - for (i = 0; i < length; i++) - emit_byte(cinfo, htbl->huffval[i]); - - htbl->sent_table = TRUE; - } -} - - -LOCAL(void) -emit_dac (j_compress_ptr cinfo) -/* Emit a DAC marker */ -/* Since the useful info is so small, we want to emit all the tables in */ -/* one DAC marker. Therefore this routine does its own scan of the table. */ -{ -#ifdef C_ARITH_CODING_SUPPORTED - char dc_in_use[NUM_ARITH_TBLS]; - char ac_in_use[NUM_ARITH_TBLS]; - int length, i; - jpeg_component_info *compptr; - - for (i = 0; i < NUM_ARITH_TBLS; i++) - dc_in_use[i] = ac_in_use[i] = 0; - - for (i = 0; i < cinfo->comps_in_scan; i++) { - compptr = cinfo->cur_comp_info[i]; - dc_in_use[compptr->dc_tbl_no] = 1; - ac_in_use[compptr->ac_tbl_no] = 1; - } - - length = 0; - for (i = 0; i < NUM_ARITH_TBLS; i++) - length += dc_in_use[i] + ac_in_use[i]; - - emit_marker(cinfo, M_DAC); - - emit_2bytes(cinfo, length*2 + 2); - - for (i = 0; i < NUM_ARITH_TBLS; i++) { - if (dc_in_use[i]) { - emit_byte(cinfo, i); - emit_byte(cinfo, cinfo->arith_dc_L[i] + (cinfo->arith_dc_U[i]<<4)); - } - if (ac_in_use[i]) { - emit_byte(cinfo, i + 0x10); - emit_byte(cinfo, cinfo->arith_ac_K[i]); - } - } -#endif /* C_ARITH_CODING_SUPPORTED */ -} - - -LOCAL(void) -emit_dri (j_compress_ptr cinfo) -/* Emit a DRI marker */ -{ - emit_marker(cinfo, M_DRI); - - emit_2bytes(cinfo, 4); /* fixed length */ - - emit_2bytes(cinfo, (int) cinfo->restart_interval); -} - - -LOCAL(void) -emit_sof (j_compress_ptr cinfo, JPEG_MARKER code) -/* Emit a SOF marker */ -{ - int ci; - jpeg_component_info *compptr; - - emit_marker(cinfo, code); - - emit_2bytes(cinfo, 3 * cinfo->num_components + 2 + 5 + 1); /* length */ - - /* Make sure image isn't bigger than SOF field can handle */ - if ((long) cinfo->image_height > 65535L || - (long) cinfo->image_width > 65535L) - ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) 65535); - - emit_byte(cinfo, cinfo->data_precision); - emit_2bytes(cinfo, (int) cinfo->image_height); - emit_2bytes(cinfo, (int) cinfo->image_width); - - emit_byte(cinfo, cinfo->num_components); - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - emit_byte(cinfo, compptr->component_id); - emit_byte(cinfo, (compptr->h_samp_factor << 4) + compptr->v_samp_factor); - emit_byte(cinfo, compptr->quant_tbl_no); - } -} - - -LOCAL(void) -emit_sos (j_compress_ptr cinfo) -/* Emit a SOS marker */ -{ - int i, td, ta; - jpeg_component_info *compptr; - - emit_marker(cinfo, M_SOS); - - emit_2bytes(cinfo, 2 * cinfo->comps_in_scan + 2 + 1 + 3); /* length */ - - emit_byte(cinfo, cinfo->comps_in_scan); - - for (i = 0; i < cinfo->comps_in_scan; i++) { - compptr = cinfo->cur_comp_info[i]; - emit_byte(cinfo, compptr->component_id); - td = compptr->dc_tbl_no; - ta = compptr->ac_tbl_no; - if (cinfo->progressive_mode) { - /* Progressive mode: only DC or only AC tables are used in one scan; - * furthermore, Huffman coding of DC refinement uses no table at all. - * We emit 0 for unused field(s); this is recommended by the P&M text - * but does not seem to be specified in the standard. - */ - if (cinfo->Ss == 0) { - ta = 0; /* DC scan */ - if (cinfo->Ah != 0 && !cinfo->arith_code) - td = 0; /* no DC table either */ - } else { - td = 0; /* AC scan */ - } - } - emit_byte(cinfo, (td << 4) + ta); - } - - emit_byte(cinfo, cinfo->Ss); - emit_byte(cinfo, cinfo->Se); - emit_byte(cinfo, (cinfo->Ah << 4) + cinfo->Al); -} - - -LOCAL(void) -emit_jfif_app0 (j_compress_ptr cinfo) -/* Emit a JFIF-compliant APP0 marker */ -{ - /* - * Length of APP0 block (2 bytes) - * Block ID (4 bytes - ASCII "JFIF") - * Zero byte (1 byte to terminate the ID string) - * Version Major, Minor (2 bytes - major first) - * Units (1 byte - 0x00 = none, 0x01 = inch, 0x02 = cm) - * Xdpu (2 bytes - dots per unit horizontal) - * Ydpu (2 bytes - dots per unit vertical) - * Thumbnail X size (1 byte) - * Thumbnail Y size (1 byte) - */ - - emit_marker(cinfo, M_APP0); - - emit_2bytes(cinfo, 2 + 4 + 1 + 2 + 1 + 2 + 2 + 1 + 1); /* length */ - - emit_byte(cinfo, 0x4A); /* Identifier: ASCII "JFIF" */ - emit_byte(cinfo, 0x46); - emit_byte(cinfo, 0x49); - emit_byte(cinfo, 0x46); - emit_byte(cinfo, 0); - emit_byte(cinfo, cinfo->JFIF_major_version); /* Version fields */ - emit_byte(cinfo, cinfo->JFIF_minor_version); - emit_byte(cinfo, cinfo->density_unit); /* Pixel size information */ - emit_2bytes(cinfo, (int) cinfo->X_density); - emit_2bytes(cinfo, (int) cinfo->Y_density); - emit_byte(cinfo, 0); /* No thumbnail image */ - emit_byte(cinfo, 0); -} - - -LOCAL(void) -emit_adobe_app14 (j_compress_ptr cinfo) -/* Emit an Adobe APP14 marker */ -{ - /* - * Length of APP14 block (2 bytes) - * Block ID (5 bytes - ASCII "Adobe") - * Version Number (2 bytes - currently 100) - * Flags0 (2 bytes - currently 0) - * Flags1 (2 bytes - currently 0) - * Color transform (1 byte) - * - * Although Adobe TN 5116 mentions Version = 101, all the Adobe files - * now in circulation seem to use Version = 100, so that's what we write. - * - * We write the color transform byte as 1 if the JPEG color space is - * YCbCr, 2 if it's YCCK, 0 otherwise. Adobe's definition has to do with - * whether the encoder performed a transformation, which is pretty useless. - */ - - emit_marker(cinfo, M_APP14); - - emit_2bytes(cinfo, 2 + 5 + 2 + 2 + 2 + 1); /* length */ - - emit_byte(cinfo, 0x41); /* Identifier: ASCII "Adobe" */ - emit_byte(cinfo, 0x64); - emit_byte(cinfo, 0x6F); - emit_byte(cinfo, 0x62); - emit_byte(cinfo, 0x65); - emit_2bytes(cinfo, 100); /* Version */ - emit_2bytes(cinfo, 0); /* Flags0 */ - emit_2bytes(cinfo, 0); /* Flags1 */ - switch (cinfo->jpeg_color_space) { - case JCS_YCbCr: - emit_byte(cinfo, 1); /* Color transform = 1 */ - break; - case JCS_YCCK: - emit_byte(cinfo, 2); /* Color transform = 2 */ - break; - default: - emit_byte(cinfo, 0); /* Color transform = 0 */ - break; - } -} - - -/* - * These routines allow writing an arbitrary marker with parameters. - * The only intended use is to emit COM or APPn markers after calling - * write_file_header and before calling write_frame_header. - * Other uses are not guaranteed to produce desirable results. - * Counting the parameter bytes properly is the caller's responsibility. - */ - -METHODDEF(void) -write_marker_header (j_compress_ptr cinfo, int marker, unsigned int datalen) -/* Emit an arbitrary marker header */ -{ - if (datalen > (unsigned int) 65533) /* safety check */ - ERREXIT(cinfo, JERR_BAD_LENGTH); - - emit_marker(cinfo, (JPEG_MARKER) marker); - - emit_2bytes(cinfo, (int) (datalen + 2)); /* total length */ -} - -METHODDEF(void) -write_marker_byte (j_compress_ptr cinfo, int val) -/* Emit one byte of marker parameters following write_marker_header */ -{ - emit_byte(cinfo, val); -} - - -/* - * Write datastream header. - * This consists of an SOI and optional APPn markers. - * We recommend use of the JFIF marker, but not the Adobe marker, - * when using YCbCr or grayscale data. The JFIF marker should NOT - * be used for any other JPEG colorspace. The Adobe marker is helpful - * to distinguish RGB, CMYK, and YCCK colorspaces. - * Note that an application can write additional header markers after - * jpeg_start_compress returns. - */ - -METHODDEF(void) -write_file_header (j_compress_ptr cinfo) -{ - my_marker_ptr marker = (my_marker_ptr) cinfo->marker; - - emit_marker(cinfo, M_SOI); /* first the SOI */ - - /* SOI is defined to reset restart interval to 0 */ - marker->last_restart_interval = 0; - - if (cinfo->write_JFIF_header) /* next an optional JFIF APP0 */ - emit_jfif_app0(cinfo); - if (cinfo->write_Adobe_marker) /* next an optional Adobe APP14 */ - emit_adobe_app14(cinfo); -} - - -/* - * Write frame header. - * This consists of DQT and SOFn markers. - * Note that we do not emit the SOF until we have emitted the DQT(s). - * This avoids compatibility problems with incorrect implementations that - * try to error-check the quant table numbers as soon as they see the SOF. - */ - -METHODDEF(void) -write_frame_header (j_compress_ptr cinfo) -{ - int ci, prec; - boolean is_baseline; - jpeg_component_info *compptr; - - /* Emit DQT for each quantization table. - * Note that emit_dqt() suppresses any duplicate tables. - */ - prec = 0; - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - prec += emit_dqt(cinfo, compptr->quant_tbl_no); - } - /* now prec is nonzero iff there are any 16-bit quant tables. */ - - /* Check for a non-baseline specification. - * Note we assume that Huffman table numbers won't be changed later. - */ - if (cinfo->arith_code || cinfo->progressive_mode || - cinfo->data_precision != 8) { - is_baseline = FALSE; - } else { - is_baseline = TRUE; - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - if (compptr->dc_tbl_no > 1 || compptr->ac_tbl_no > 1) - is_baseline = FALSE; - } - if (prec && is_baseline) { - is_baseline = FALSE; - /* If it's baseline except for quantizer size, warn the user */ - TRACEMS(cinfo, 0, JTRC_16BIT_TABLES); - } - } - - /* Emit the proper SOF marker */ - if (cinfo->arith_code) { - emit_sof(cinfo, M_SOF9); /* SOF code for arithmetic coding */ - } else { - if (cinfo->progressive_mode) - emit_sof(cinfo, M_SOF2); /* SOF code for progressive Huffman */ - else if (is_baseline) - emit_sof(cinfo, M_SOF0); /* SOF code for baseline implementation */ - else - emit_sof(cinfo, M_SOF1); /* SOF code for non-baseline Huffman file */ - } -} - - -/* - * Write scan header. - * This consists of DHT or DAC markers, optional DRI, and SOS. - * Compressed data will be written following the SOS. - */ - -METHODDEF(void) -write_scan_header (j_compress_ptr cinfo) -{ - my_marker_ptr marker = (my_marker_ptr) cinfo->marker; - int i; - jpeg_component_info *compptr; - - if (cinfo->arith_code) { - /* Emit arith conditioning info. We may have some duplication - * if the file has multiple scans, but it's so small it's hardly - * worth worrying about. - */ - emit_dac(cinfo); - } else { - /* Emit Huffman tables. - * Note that emit_dht() suppresses any duplicate tables. - */ - for (i = 0; i < cinfo->comps_in_scan; i++) { - compptr = cinfo->cur_comp_info[i]; - if (cinfo->progressive_mode) { - /* Progressive mode: only DC or only AC tables are used in one scan */ - if (cinfo->Ss == 0) { - if (cinfo->Ah == 0) /* DC needs no table for refinement scan */ - emit_dht(cinfo, compptr->dc_tbl_no, FALSE); - } else { - emit_dht(cinfo, compptr->ac_tbl_no, TRUE); - } - } else { - /* Sequential mode: need both DC and AC tables */ - emit_dht(cinfo, compptr->dc_tbl_no, FALSE); - emit_dht(cinfo, compptr->ac_tbl_no, TRUE); - } - } - } - - /* Emit DRI if required --- note that DRI value could change for each scan. - * We avoid wasting space with unnecessary DRIs, however. - */ - if (cinfo->restart_interval != marker->last_restart_interval) { - emit_dri(cinfo); - marker->last_restart_interval = cinfo->restart_interval; - } - - emit_sos(cinfo); -} - - -/* - * Write datastream trailer. - */ - -METHODDEF(void) -write_file_trailer (j_compress_ptr cinfo) -{ - emit_marker(cinfo, M_EOI); -} - - -/* - * Write an abbreviated table-specification datastream. - * This consists of SOI, DQT and DHT tables, and EOI. - * Any table that is defined and not marked sent_table = TRUE will be - * emitted. Note that all tables will be marked sent_table = TRUE at exit. - */ - -METHODDEF(void) -write_tables_only (j_compress_ptr cinfo) -{ - int i; - - emit_marker(cinfo, M_SOI); - - for (i = 0; i < NUM_QUANT_TBLS; i++) { - if (cinfo->quant_tbl_ptrs[i] != NULL) - (void) emit_dqt(cinfo, i); - } - - if (! cinfo->arith_code) { - for (i = 0; i < NUM_HUFF_TBLS; i++) { - if (cinfo->dc_huff_tbl_ptrs[i] != NULL) - emit_dht(cinfo, i, FALSE); - if (cinfo->ac_huff_tbl_ptrs[i] != NULL) - emit_dht(cinfo, i, TRUE); - } - } - - emit_marker(cinfo, M_EOI); -} - - -/* - * Initialize the marker writer module. - */ - -GLOBAL(void) -jinit_marker_writer (j_compress_ptr cinfo) -{ - my_marker_ptr marker; - - /* Create the subobject */ - marker = (my_marker_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_marker_writer)); - cinfo->marker = (struct jpeg_marker_writer *) marker; - /* Initialize method pointers */ - marker->pub.write_file_header = write_file_header; - marker->pub.write_frame_header = write_frame_header; - marker->pub.write_scan_header = write_scan_header; - marker->pub.write_file_trailer = write_file_trailer; - marker->pub.write_tables_only = write_tables_only; - marker->pub.write_marker_header = write_marker_header; - marker->pub.write_marker_byte = write_marker_byte; - /* Initialize private state */ - marker->last_restart_interval = 0; -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jcmaster.c b/gtkmm-osx/trunk/jpeg-6b/jcmaster.c deleted file mode 100644 index aab4020..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jcmaster.c +++ /dev/null @@ -1,590 +0,0 @@ -/* - * jcmaster.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains master control logic for the JPEG compressor. - * These routines are concerned with parameter validation, initial setup, - * and inter-pass control (determining the number of passes and the work - * to be done in each pass). - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Private state */ - -typedef enum { - main_pass, /* input data, also do first output step */ - huff_opt_pass, /* Huffman code optimization pass */ - output_pass /* data output pass */ -} c_pass_type; - -typedef struct { - struct jpeg_comp_master pub; /* public fields */ - - c_pass_type pass_type; /* the type of the current pass */ - - int pass_number; /* # of passes completed */ - int total_passes; /* total # of passes needed */ - - int scan_number; /* current index in scan_info[] */ -} my_comp_master; - -typedef my_comp_master * my_master_ptr; - - -/* - * Support routines that do various essential calculations. - */ - -LOCAL(void) -initial_setup (j_compress_ptr cinfo) -/* Do computations that are needed before master selection phase */ -{ - int ci; - jpeg_component_info *compptr; - long samplesperrow; - JDIMENSION jd_samplesperrow; - - /* Sanity check on image dimensions */ - if (cinfo->image_height <= 0 || cinfo->image_width <= 0 - || cinfo->num_components <= 0 || cinfo->input_components <= 0) - ERREXIT(cinfo, JERR_EMPTY_IMAGE); - - /* Make sure image isn't bigger than I can handle */ - if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION || - (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION) - ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION); - - /* Width of an input scanline must be representable as JDIMENSION. */ - samplesperrow = (long) cinfo->image_width * (long) cinfo->input_components; - jd_samplesperrow = (JDIMENSION) samplesperrow; - if ((long) jd_samplesperrow != samplesperrow) - ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); - - /* For now, precision must match compiled-in value... */ - if (cinfo->data_precision != BITS_IN_JSAMPLE) - ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision); - - /* Check that number of components won't exceed internal array sizes */ - if (cinfo->num_components > MAX_COMPONENTS) - ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, - MAX_COMPONENTS); - - /* Compute maximum sampling factors; check factor validity */ - cinfo->max_h_samp_factor = 1; - cinfo->max_v_samp_factor = 1; - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR || - compptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR) - ERREXIT(cinfo, JERR_BAD_SAMPLING); - cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor, - compptr->h_samp_factor); - cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor, - compptr->v_samp_factor); - } - - /* Compute dimensions of components */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Fill in the correct component_index value; don't rely on application */ - compptr->component_index = ci; - /* For compression, we never do DCT scaling. */ - compptr->DCT_scaled_size = DCTSIZE; - /* Size in DCT blocks */ - compptr->width_in_blocks = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, - (long) (cinfo->max_h_samp_factor * DCTSIZE)); - compptr->height_in_blocks = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, - (long) (cinfo->max_v_samp_factor * DCTSIZE)); - /* Size in samples */ - compptr->downsampled_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, - (long) cinfo->max_h_samp_factor); - compptr->downsampled_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, - (long) cinfo->max_v_samp_factor); - /* Mark component needed (this flag isn't actually used for compression) */ - compptr->component_needed = TRUE; - } - - /* Compute number of fully interleaved MCU rows (number of times that - * main controller will call coefficient controller). - */ - cinfo->total_iMCU_rows = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height, - (long) (cinfo->max_v_samp_factor*DCTSIZE)); -} - - -#ifdef C_MULTISCAN_FILES_SUPPORTED - -LOCAL(void) -validate_script (j_compress_ptr cinfo) -/* Verify that the scan script in cinfo->scan_info[] is valid; also - * determine whether it uses progressive JPEG, and set cinfo->progressive_mode. - */ -{ - const jpeg_scan_info * scanptr; - int scanno, ncomps, ci, coefi, thisi; - int Ss, Se, Ah, Al; - boolean component_sent[MAX_COMPONENTS]; -#ifdef C_PROGRESSIVE_SUPPORTED - int * last_bitpos_ptr; - int last_bitpos[MAX_COMPONENTS][DCTSIZE2]; - /* -1 until that coefficient has been seen; then last Al for it */ -#endif - - if (cinfo->num_scans <= 0) - ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, 0); - - /* For sequential JPEG, all scans must have Ss=0, Se=DCTSIZE2-1; - * for progressive JPEG, no scan can have this. - */ - scanptr = cinfo->scan_info; - if (scanptr->Ss != 0 || scanptr->Se != DCTSIZE2-1) { -#ifdef C_PROGRESSIVE_SUPPORTED - cinfo->progressive_mode = TRUE; - last_bitpos_ptr = & last_bitpos[0][0]; - for (ci = 0; ci < cinfo->num_components; ci++) - for (coefi = 0; coefi < DCTSIZE2; coefi++) - *last_bitpos_ptr++ = -1; -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } else { - cinfo->progressive_mode = FALSE; - for (ci = 0; ci < cinfo->num_components; ci++) - component_sent[ci] = FALSE; - } - - for (scanno = 1; scanno <= cinfo->num_scans; scanptr++, scanno++) { - /* Validate component indexes */ - ncomps = scanptr->comps_in_scan; - if (ncomps <= 0 || ncomps > MAX_COMPS_IN_SCAN) - ERREXIT2(cinfo, JERR_COMPONENT_COUNT, ncomps, MAX_COMPS_IN_SCAN); - for (ci = 0; ci < ncomps; ci++) { - thisi = scanptr->component_index[ci]; - if (thisi < 0 || thisi >= cinfo->num_components) - ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno); - /* Components must appear in SOF order within each scan */ - if (ci > 0 && thisi <= scanptr->component_index[ci-1]) - ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno); - } - /* Validate progression parameters */ - Ss = scanptr->Ss; - Se = scanptr->Se; - Ah = scanptr->Ah; - Al = scanptr->Al; - if (cinfo->progressive_mode) { -#ifdef C_PROGRESSIVE_SUPPORTED - /* The JPEG spec simply gives the ranges 0..13 for Ah and Al, but that - * seems wrong: the upper bound ought to depend on data precision. - * Perhaps they really meant 0..N+1 for N-bit precision. - * Here we allow 0..10 for 8-bit data; Al larger than 10 results in - * out-of-range reconstructed DC values during the first DC scan, - * which might cause problems for some decoders. - */ -#if BITS_IN_JSAMPLE == 8 -#define MAX_AH_AL 10 -#else -#define MAX_AH_AL 13 -#endif - if (Ss < 0 || Ss >= DCTSIZE2 || Se < Ss || Se >= DCTSIZE2 || - Ah < 0 || Ah > MAX_AH_AL || Al < 0 || Al > MAX_AH_AL) - ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); - if (Ss == 0) { - if (Se != 0) /* DC and AC together not OK */ - ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); - } else { - if (ncomps != 1) /* AC scans must be for only one component */ - ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); - } - for (ci = 0; ci < ncomps; ci++) { - last_bitpos_ptr = & last_bitpos[scanptr->component_index[ci]][0]; - if (Ss != 0 && last_bitpos_ptr[0] < 0) /* AC without prior DC scan */ - ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); - for (coefi = Ss; coefi <= Se; coefi++) { - if (last_bitpos_ptr[coefi] < 0) { - /* first scan of this coefficient */ - if (Ah != 0) - ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); - } else { - /* not first scan */ - if (Ah != last_bitpos_ptr[coefi] || Al != Ah-1) - ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); - } - last_bitpos_ptr[coefi] = Al; - } - } -#endif - } else { - /* For sequential JPEG, all progression parameters must be these: */ - if (Ss != 0 || Se != DCTSIZE2-1 || Ah != 0 || Al != 0) - ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); - /* Make sure components are not sent twice */ - for (ci = 0; ci < ncomps; ci++) { - thisi = scanptr->component_index[ci]; - if (component_sent[thisi]) - ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno); - component_sent[thisi] = TRUE; - } - } - } - - /* Now verify that everything got sent. */ - if (cinfo->progressive_mode) { -#ifdef C_PROGRESSIVE_SUPPORTED - /* For progressive mode, we only check that at least some DC data - * got sent for each component; the spec does not require that all bits - * of all coefficients be transmitted. Would it be wiser to enforce - * transmission of all coefficient bits?? - */ - for (ci = 0; ci < cinfo->num_components; ci++) { - if (last_bitpos[ci][0] < 0) - ERREXIT(cinfo, JERR_MISSING_DATA); - } -#endif - } else { - for (ci = 0; ci < cinfo->num_components; ci++) { - if (! component_sent[ci]) - ERREXIT(cinfo, JERR_MISSING_DATA); - } - } -} - -#endif /* C_MULTISCAN_FILES_SUPPORTED */ - - -LOCAL(void) -select_scan_parameters (j_compress_ptr cinfo) -/* Set up the scan parameters for the current scan */ -{ - int ci; - -#ifdef C_MULTISCAN_FILES_SUPPORTED - if (cinfo->scan_info != NULL) { - /* Prepare for current scan --- the script is already validated */ - my_master_ptr master = (my_master_ptr) cinfo->master; - const jpeg_scan_info * scanptr = cinfo->scan_info + master->scan_number; - - cinfo->comps_in_scan = scanptr->comps_in_scan; - for (ci = 0; ci < scanptr->comps_in_scan; ci++) { - cinfo->cur_comp_info[ci] = - &cinfo->comp_info[scanptr->component_index[ci]]; - } - cinfo->Ss = scanptr->Ss; - cinfo->Se = scanptr->Se; - cinfo->Ah = scanptr->Ah; - cinfo->Al = scanptr->Al; - } - else -#endif - { - /* Prepare for single sequential-JPEG scan containing all components */ - if (cinfo->num_components > MAX_COMPS_IN_SCAN) - ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, - MAX_COMPS_IN_SCAN); - cinfo->comps_in_scan = cinfo->num_components; - for (ci = 0; ci < cinfo->num_components; ci++) { - cinfo->cur_comp_info[ci] = &cinfo->comp_info[ci]; - } - cinfo->Ss = 0; - cinfo->Se = DCTSIZE2-1; - cinfo->Ah = 0; - cinfo->Al = 0; - } -} - - -LOCAL(void) -per_scan_setup (j_compress_ptr cinfo) -/* Do computations that are needed before processing a JPEG scan */ -/* cinfo->comps_in_scan and cinfo->cur_comp_info[] are already set */ -{ - int ci, mcublks, tmp; - jpeg_component_info *compptr; - - if (cinfo->comps_in_scan == 1) { - - /* Noninterleaved (single-component) scan */ - compptr = cinfo->cur_comp_info[0]; - - /* Overall image size in MCUs */ - cinfo->MCUs_per_row = compptr->width_in_blocks; - cinfo->MCU_rows_in_scan = compptr->height_in_blocks; - - /* For noninterleaved scan, always one block per MCU */ - compptr->MCU_width = 1; - compptr->MCU_height = 1; - compptr->MCU_blocks = 1; - compptr->MCU_sample_width = DCTSIZE; - compptr->last_col_width = 1; - /* For noninterleaved scans, it is convenient to define last_row_height - * as the number of block rows present in the last iMCU row. - */ - tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor); - if (tmp == 0) tmp = compptr->v_samp_factor; - compptr->last_row_height = tmp; - - /* Prepare array describing MCU composition */ - cinfo->blocks_in_MCU = 1; - cinfo->MCU_membership[0] = 0; - - } else { - - /* Interleaved (multi-component) scan */ - if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN) - ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan, - MAX_COMPS_IN_SCAN); - - /* Overall image size in MCUs */ - cinfo->MCUs_per_row = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width, - (long) (cinfo->max_h_samp_factor*DCTSIZE)); - cinfo->MCU_rows_in_scan = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height, - (long) (cinfo->max_v_samp_factor*DCTSIZE)); - - cinfo->blocks_in_MCU = 0; - - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - /* Sampling factors give # of blocks of component in each MCU */ - compptr->MCU_width = compptr->h_samp_factor; - compptr->MCU_height = compptr->v_samp_factor; - compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height; - compptr->MCU_sample_width = compptr->MCU_width * DCTSIZE; - /* Figure number of non-dummy blocks in last MCU column & row */ - tmp = (int) (compptr->width_in_blocks % compptr->MCU_width); - if (tmp == 0) tmp = compptr->MCU_width; - compptr->last_col_width = tmp; - tmp = (int) (compptr->height_in_blocks % compptr->MCU_height); - if (tmp == 0) tmp = compptr->MCU_height; - compptr->last_row_height = tmp; - /* Prepare array describing MCU composition */ - mcublks = compptr->MCU_blocks; - if (cinfo->blocks_in_MCU + mcublks > C_MAX_BLOCKS_IN_MCU) - ERREXIT(cinfo, JERR_BAD_MCU_SIZE); - while (mcublks-- > 0) { - cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci; - } - } - - } - - /* Convert restart specified in rows to actual MCU count. */ - /* Note that count must fit in 16 bits, so we provide limiting. */ - if (cinfo->restart_in_rows > 0) { - long nominal = (long) cinfo->restart_in_rows * (long) cinfo->MCUs_per_row; - cinfo->restart_interval = (unsigned int) MIN(nominal, 65535L); - } -} - - -/* - * Per-pass setup. - * This is called at the beginning of each pass. We determine which modules - * will be active during this pass and give them appropriate start_pass calls. - * We also set is_last_pass to indicate whether any more passes will be - * required. - */ - -METHODDEF(void) -prepare_for_pass (j_compress_ptr cinfo) -{ - my_master_ptr master = (my_master_ptr) cinfo->master; - - switch (master->pass_type) { - case main_pass: - /* Initial pass: will collect input data, and do either Huffman - * optimization or data output for the first scan. - */ - select_scan_parameters(cinfo); - per_scan_setup(cinfo); - if (! cinfo->raw_data_in) { - (*cinfo->cconvert->start_pass) (cinfo); - (*cinfo->downsample->start_pass) (cinfo); - (*cinfo->prep->start_pass) (cinfo, JBUF_PASS_THRU); - } - (*cinfo->fdct->start_pass) (cinfo); - (*cinfo->entropy->start_pass) (cinfo, cinfo->optimize_coding); - (*cinfo->coef->start_pass) (cinfo, - (master->total_passes > 1 ? - JBUF_SAVE_AND_PASS : JBUF_PASS_THRU)); - (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU); - if (cinfo->optimize_coding) { - /* No immediate data output; postpone writing frame/scan headers */ - master->pub.call_pass_startup = FALSE; - } else { - /* Will write frame/scan headers at first jpeg_write_scanlines call */ - master->pub.call_pass_startup = TRUE; - } - break; -#ifdef ENTROPY_OPT_SUPPORTED - case huff_opt_pass: - /* Do Huffman optimization for a scan after the first one. */ - select_scan_parameters(cinfo); - per_scan_setup(cinfo); - if (cinfo->Ss != 0 || cinfo->Ah == 0 || cinfo->arith_code) { - (*cinfo->entropy->start_pass) (cinfo, TRUE); - (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST); - master->pub.call_pass_startup = FALSE; - break; - } - /* Special case: Huffman DC refinement scans need no Huffman table - * and therefore we can skip the optimization pass for them. - */ - master->pass_type = output_pass; - master->pass_number++; - /*FALLTHROUGH*/ -#endif - case output_pass: - /* Do a data-output pass. */ - /* We need not repeat per-scan setup if prior optimization pass did it. */ - if (! cinfo->optimize_coding) { - select_scan_parameters(cinfo); - per_scan_setup(cinfo); - } - (*cinfo->entropy->start_pass) (cinfo, FALSE); - (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST); - /* We emit frame/scan headers now */ - if (master->scan_number == 0) - (*cinfo->marker->write_frame_header) (cinfo); - (*cinfo->marker->write_scan_header) (cinfo); - master->pub.call_pass_startup = FALSE; - break; - default: - ERREXIT(cinfo, JERR_NOT_COMPILED); - } - - master->pub.is_last_pass = (master->pass_number == master->total_passes-1); - - /* Set up progress monitor's pass info if present */ - if (cinfo->progress != NULL) { - cinfo->progress->completed_passes = master->pass_number; - cinfo->progress->total_passes = master->total_passes; - } -} - - -/* - * Special start-of-pass hook. - * This is called by jpeg_write_scanlines if call_pass_startup is TRUE. - * In single-pass processing, we need this hook because we don't want to - * write frame/scan headers during jpeg_start_compress; we want to let the - * application write COM markers etc. between jpeg_start_compress and the - * jpeg_write_scanlines loop. - * In multi-pass processing, this routine is not used. - */ - -METHODDEF(void) -pass_startup (j_compress_ptr cinfo) -{ - cinfo->master->call_pass_startup = FALSE; /* reset flag so call only once */ - - (*cinfo->marker->write_frame_header) (cinfo); - (*cinfo->marker->write_scan_header) (cinfo); -} - - -/* - * Finish up at end of pass. - */ - -METHODDEF(void) -finish_pass_master (j_compress_ptr cinfo) -{ - my_master_ptr master = (my_master_ptr) cinfo->master; - - /* The entropy coder always needs an end-of-pass call, - * either to analyze statistics or to flush its output buffer. - */ - (*cinfo->entropy->finish_pass) (cinfo); - - /* Update state for next pass */ - switch (master->pass_type) { - case main_pass: - /* next pass is either output of scan 0 (after optimization) - * or output of scan 1 (if no optimization). - */ - master->pass_type = output_pass; - if (! cinfo->optimize_coding) - master->scan_number++; - break; - case huff_opt_pass: - /* next pass is always output of current scan */ - master->pass_type = output_pass; - break; - case output_pass: - /* next pass is either optimization or output of next scan */ - if (cinfo->optimize_coding) - master->pass_type = huff_opt_pass; - master->scan_number++; - break; - } - - master->pass_number++; -} - - -/* - * Initialize master compression control. - */ - -GLOBAL(void) -jinit_c_master_control (j_compress_ptr cinfo, boolean transcode_only) -{ - my_master_ptr master; - - master = (my_master_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_comp_master)); - cinfo->master = (struct jpeg_comp_master *) master; - master->pub.prepare_for_pass = prepare_for_pass; - master->pub.pass_startup = pass_startup; - master->pub.finish_pass = finish_pass_master; - master->pub.is_last_pass = FALSE; - - /* Validate parameters, determine derived values */ - initial_setup(cinfo); - - if (cinfo->scan_info != NULL) { -#ifdef C_MULTISCAN_FILES_SUPPORTED - validate_script(cinfo); -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } else { - cinfo->progressive_mode = FALSE; - cinfo->num_scans = 1; - } - - if (cinfo->progressive_mode) /* TEMPORARY HACK ??? */ - cinfo->optimize_coding = TRUE; /* assume default tables no good for progressive mode */ - - /* Initialize my private state */ - if (transcode_only) { - /* no main pass in transcoding */ - if (cinfo->optimize_coding) - master->pass_type = huff_opt_pass; - else - master->pass_type = output_pass; - } else { - /* for normal compression, first pass is always this type: */ - master->pass_type = main_pass; - } - master->scan_number = 0; - master->pass_number = 0; - if (cinfo->optimize_coding) - master->total_passes = cinfo->num_scans * 2; - else - master->total_passes = cinfo->num_scans; -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jcomapi.c b/gtkmm-osx/trunk/jpeg-6b/jcomapi.c deleted file mode 100644 index 9b1fa75..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jcomapi.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * jcomapi.c - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains application interface routines that are used for both - * compression and decompression. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* - * Abort processing of a JPEG compression or decompression operation, - * but don't destroy the object itself. - * - * For this, we merely clean up all the nonpermanent memory pools. - * Note that temp files (virtual arrays) are not allowed to belong to - * the permanent pool, so we will be able to close all temp files here. - * Closing a data source or destination, if necessary, is the application's - * responsibility. - */ - -GLOBAL(void) -jpeg_abort (j_common_ptr cinfo) -{ - int pool; - - /* Do nothing if called on a not-initialized or destroyed JPEG object. */ - if (cinfo->mem == NULL) - return; - - /* Releasing pools in reverse order might help avoid fragmentation - * with some (brain-damaged) malloc libraries. - */ - for (pool = JPOOL_NUMPOOLS-1; pool > JPOOL_PERMANENT; pool--) { - (*cinfo->mem->free_pool) (cinfo, pool); - } - - /* Reset overall state for possible reuse of object */ - if (cinfo->is_decompressor) { - cinfo->global_state = DSTATE_START; - /* Try to keep application from accessing now-deleted marker list. - * A bit kludgy to do it here, but this is the most central place. - */ - ((j_decompress_ptr) cinfo)->marker_list = NULL; - } else { - cinfo->global_state = CSTATE_START; - } -} - - -/* - * Destruction of a JPEG object. - * - * Everything gets deallocated except the master jpeg_compress_struct itself - * and the error manager struct. Both of these are supplied by the application - * and must be freed, if necessary, by the application. (Often they are on - * the stack and so don't need to be freed anyway.) - * Closing a data source or destination, if necessary, is the application's - * responsibility. - */ - -GLOBAL(void) -jpeg_destroy (j_common_ptr cinfo) -{ - /* We need only tell the memory manager to release everything. */ - /* NB: mem pointer is NULL if memory mgr failed to initialize. */ - if (cinfo->mem != NULL) - (*cinfo->mem->self_destruct) (cinfo); - cinfo->mem = NULL; /* be safe if jpeg_destroy is called twice */ - cinfo->global_state = 0; /* mark it destroyed */ -} - - -/* - * Convenience routines for allocating quantization and Huffman tables. - * (Would jutils.c be a more reasonable place to put these?) - */ - -GLOBAL(JQUANT_TBL *) -jpeg_alloc_quant_table (j_common_ptr cinfo) -{ - JQUANT_TBL *tbl; - - tbl = (JQUANT_TBL *) - (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JQUANT_TBL)); - tbl->sent_table = FALSE; /* make sure this is false in any new table */ - return tbl; -} - - -GLOBAL(JHUFF_TBL *) -jpeg_alloc_huff_table (j_common_ptr cinfo) -{ - JHUFF_TBL *tbl; - - tbl = (JHUFF_TBL *) - (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JHUFF_TBL)); - tbl->sent_table = FALSE; /* make sure this is false in any new table */ - return tbl; -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jconfig.bcc b/gtkmm-osx/trunk/jpeg-6b/jconfig.bcc deleted file mode 100644 index c6c53ff..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jconfig.bcc +++ /dev/null @@ -1,48 +0,0 @@ -/* jconfig.bcc --- jconfig.h for Borland C (Turbo C) on MS-DOS or OS/2. */ -/* see jconfig.doc for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#undef CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#ifdef __MSDOS__ -#define NEED_FAR_POINTERS /* for small or medium memory model */ -#endif -#undef NEED_SHORT_EXTERNAL_NAMES -#undef INCOMPLETE_TYPES_BROKEN /* this assumes you have -w-stu in CFLAGS */ - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#ifdef __MSDOS__ -#define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */ -#define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */ -#define USE_FMEM /* Borland has _fmemcpy() and _fmemset() */ -#endif - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#define TWO_FILE_COMMANDLINE -#define USE_SETMODE /* Borland has setmode() */ -#ifdef __MSDOS__ -#define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */ -#endif -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jconfig.cfg b/gtkmm-osx/trunk/jpeg-6b/jconfig.cfg deleted file mode 100644 index 36a04fa..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jconfig.cfg +++ /dev/null @@ -1,44 +0,0 @@ -/* jconfig.cfg --- source file edited by configure script */ -/* see jconfig.doc for explanations */ - -#undef HAVE_PROTOTYPES -#undef HAVE_UNSIGNED_CHAR -#undef HAVE_UNSIGNED_SHORT -#undef void -#undef const -#undef CHAR_IS_UNSIGNED -#undef HAVE_STDDEF_H -#undef HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#undef NEED_FAR_POINTERS -#undef NEED_SHORT_EXTERNAL_NAMES -/* Define this if you get warnings about undefined structures. */ -#undef INCOMPLETE_TYPES_BROKEN - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED -#undef INLINE -/* These are for configuring the JPEG memory manager. */ -#undef DEFAULT_MAX_MEM -#undef NO_MKTEMP - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#undef TWO_FILE_COMMANDLINE -#undef NEED_SIGNAL_CATCHER -#undef DONT_USE_B_MODE - -/* Define this if you want percent-done progress reports from cjpeg/djpeg. */ -#undef PROGRESS_REPORT - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jconfig.dj b/gtkmm-osx/trunk/jpeg-6b/jconfig.dj deleted file mode 100644 index f759a9d..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jconfig.dj +++ /dev/null @@ -1,38 +0,0 @@ -/* jconfig.dj --- jconfig.h for DJGPP (Delorie's GNU C port) on MS-DOS. */ -/* see jconfig.doc for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#undef CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#undef NEED_FAR_POINTERS /* DJGPP uses flat 32-bit addressing */ -#undef NEED_SHORT_EXTERNAL_NAMES -#undef INCOMPLETE_TYPES_BROKEN - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#undef TWO_FILE_COMMANDLINE /* optional */ -#define USE_SETMODE /* Needed to make one-file style work in DJGPP */ -#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */ -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jconfig.doc b/gtkmm-osx/trunk/jpeg-6b/jconfig.doc deleted file mode 100644 index c18d1c0..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jconfig.doc +++ /dev/null @@ -1,155 +0,0 @@ -/* - * jconfig.doc - * - * Copyright (C) 1991-1994, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file documents the configuration options that are required to - * customize the JPEG software for a particular system. - * - * The actual configuration options for a particular installation are stored - * in jconfig.h. On many machines, jconfig.h can be generated automatically - * or copied from one of the "canned" jconfig files that we supply. But if - * you need to generate a jconfig.h file by hand, this file tells you how. - * - * DO NOT EDIT THIS FILE --- IT WON'T ACCOMPLISH ANYTHING. - * EDIT A COPY NAMED JCONFIG.H. - */ - - -/* - * These symbols indicate the properties of your machine or compiler. - * #define the symbol if yes, #undef it if no. - */ - -/* Does your compiler support function prototypes? - * (If not, you also need to use ansi2knr, see install.doc) - */ -#define HAVE_PROTOTYPES - -/* Does your compiler support the declaration "unsigned char" ? - * How about "unsigned short" ? - */ -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT - -/* Define "void" as "char" if your compiler doesn't know about type void. - * NOTE: be sure to define void such that "void *" represents the most general - * pointer type, e.g., that returned by malloc(). - */ -/* #define void char */ - -/* Define "const" as empty if your compiler doesn't know the "const" keyword. - */ -/* #define const */ - -/* Define this if an ordinary "char" type is unsigned. - * If you're not sure, leaving it undefined will work at some cost in speed. - * If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal. - */ -#undef CHAR_IS_UNSIGNED - -/* Define this if your system has an ANSI-conforming file. - */ -#define HAVE_STDDEF_H - -/* Define this if your system has an ANSI-conforming file. - */ -#define HAVE_STDLIB_H - -/* Define this if your system does not have an ANSI/SysV , - * but does have a BSD-style . - */ -#undef NEED_BSD_STRINGS - -/* Define this if your system does not provide typedef size_t in any of the - * ANSI-standard places (stddef.h, stdlib.h, or stdio.h), but places it in - * instead. - */ -#undef NEED_SYS_TYPES_H - -/* For 80x86 machines, you need to define NEED_FAR_POINTERS, - * unless you are using a large-data memory model or 80386 flat-memory mode. - * On less brain-damaged CPUs this symbol must not be defined. - * (Defining this symbol causes large data structures to be referenced through - * "far" pointers and to be allocated with a special version of malloc.) - */ -#undef NEED_FAR_POINTERS - -/* Define this if your linker needs global names to be unique in less - * than the first 15 characters. - */ -#undef NEED_SHORT_EXTERNAL_NAMES - -/* Although a real ANSI C compiler can deal perfectly well with pointers to - * unspecified structures (see "incomplete types" in the spec), a few pre-ANSI - * and pseudo-ANSI compilers get confused. To keep one of these bozos happy, - * define INCOMPLETE_TYPES_BROKEN. This is not recommended unless you - * actually get "missing structure definition" warnings or errors while - * compiling the JPEG code. - */ -#undef INCOMPLETE_TYPES_BROKEN - - -/* - * The following options affect code selection within the JPEG library, - * but they don't need to be visible to applications using the library. - * To minimize application namespace pollution, the symbols won't be - * defined unless JPEG_INTERNALS has been defined. - */ - -#ifdef JPEG_INTERNALS - -/* Define this if your compiler implements ">>" on signed values as a logical - * (unsigned) shift; leave it undefined if ">>" is a signed (arithmetic) shift, - * which is the normal and rational definition. - */ -#undef RIGHT_SHIFT_IS_UNSIGNED - - -#endif /* JPEG_INTERNALS */ - - -/* - * The remaining options do not affect the JPEG library proper, - * but only the sample applications cjpeg/djpeg (see cjpeg.c, djpeg.c). - * Other applications can ignore these. - */ - -#ifdef JPEG_CJPEG_DJPEG - -/* These defines indicate which image (non-JPEG) file formats are allowed. */ - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -/* Define this if you want to name both input and output files on the command - * line, rather than using stdout and optionally stdin. You MUST do this if - * your system can't cope with binary I/O to stdin/stdout. See comments at - * head of cjpeg.c or djpeg.c. - */ -#undef TWO_FILE_COMMANDLINE - -/* Define this if your system needs explicit cleanup of temporary files. - * This is crucial under MS-DOS, where the temporary "files" may be areas - * of extended memory; on most other systems it's not as important. - */ -#undef NEED_SIGNAL_CATCHER - -/* By default, we open image files with fopen(...,"rb") or fopen(...,"wb"). - * This is necessary on systems that distinguish text files from binary files, - * and is harmless on most systems that don't. If you have one of the rare - * systems that complains about the "b" spec, define this symbol. - */ -#undef DONT_USE_B_MODE - -/* Define this if you want percent-done progress reports from cjpeg/djpeg. - */ -#undef PROGRESS_REPORT - - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jconfig.mac b/gtkmm-osx/trunk/jpeg-6b/jconfig.mac deleted file mode 100644 index 0de3efe..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jconfig.mac +++ /dev/null @@ -1,43 +0,0 @@ -/* jconfig.mac --- jconfig.h for CodeWarrior on Apple Macintosh */ -/* see jconfig.doc for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#undef CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#undef NEED_FAR_POINTERS -#undef NEED_SHORT_EXTERNAL_NAMES -#undef INCOMPLETE_TYPES_BROKEN - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#define USE_MAC_MEMMGR /* Define this if you use jmemmac.c */ - -#define ALIGN_TYPE long /* Needed for 680x0 Macs */ - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#define USE_CCOMMAND /* Command line reader for Macintosh */ -#define TWO_FILE_COMMANDLINE /* Binary I/O thru stdin/stdout doesn't work */ - -#undef NEED_SIGNAL_CATCHER -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jconfig.manx b/gtkmm-osx/trunk/jpeg-6b/jconfig.manx deleted file mode 100644 index 6dd0d00..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jconfig.manx +++ /dev/null @@ -1,43 +0,0 @@ -/* jconfig.manx --- jconfig.h for Amiga systems using Manx Aztec C ver 5.x. */ -/* see jconfig.doc for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#undef CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#undef NEED_FAR_POINTERS -#undef NEED_SHORT_EXTERNAL_NAMES -#undef INCOMPLETE_TYPES_BROKEN - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#define TEMP_DIRECTORY "JPEGTMP:" /* recommended setting for Amiga */ - -#define SHORTxSHORT_32 /* produces better DCT code with Aztec C */ - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#define TWO_FILE_COMMANDLINE -#define NEED_SIGNAL_CATCHER -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#define signal_catcher _abort /* hack for Aztec C naming requirements */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jconfig.mc6 b/gtkmm-osx/trunk/jpeg-6b/jconfig.mc6 deleted file mode 100644 index c55082d..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jconfig.mc6 +++ /dev/null @@ -1,52 +0,0 @@ -/* jconfig.mc6 --- jconfig.h for Microsoft C on MS-DOS, version 6.00A & up. */ -/* see jconfig.doc for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#undef CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#define NEED_FAR_POINTERS /* for small or medium memory model */ -#undef NEED_SHORT_EXTERNAL_NAMES -#undef INCOMPLETE_TYPES_BROKEN - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */ - -#define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */ - -#define USE_FMEM /* Microsoft has _fmemcpy() and _fmemset() */ - -#define NEED_FHEAPMIN /* far heap management routines are broken */ - -#define SHORTxLCONST_32 /* enable compiler-specific DCT optimization */ -/* Note: the above define is known to improve the code with Microsoft C 6.00A. - * I do not know whether it is good for later compiler versions. - * Please report any info on this point to jpeg-info@uunet.uu.net. - */ - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#define TWO_FILE_COMMANDLINE -#define USE_SETMODE /* Microsoft has setmode() */ -#define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */ -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jconfig.sas b/gtkmm-osx/trunk/jpeg-6b/jconfig.sas deleted file mode 100644 index efdac22..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jconfig.sas +++ /dev/null @@ -1,43 +0,0 @@ -/* jconfig.sas --- jconfig.h for Amiga systems using SAS C 6.0 and up. */ -/* see jconfig.doc for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#undef CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#undef NEED_FAR_POINTERS -#undef NEED_SHORT_EXTERNAL_NAMES -#undef INCOMPLETE_TYPES_BROKEN - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#define TEMP_DIRECTORY "JPEGTMP:" /* recommended setting for Amiga */ - -#define NO_MKTEMP /* SAS C doesn't have mktemp() */ - -#define SHORTxSHORT_32 /* produces better DCT code with SAS C */ - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#define TWO_FILE_COMMANDLINE -#define NEED_SIGNAL_CATCHER -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jconfig.st b/gtkmm-osx/trunk/jpeg-6b/jconfig.st deleted file mode 100644 index 4421b7a..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jconfig.st +++ /dev/null @@ -1,42 +0,0 @@ -/* jconfig.st --- jconfig.h for Atari ST/STE/TT using Pure C or Turbo C. */ -/* see jconfig.doc for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#undef CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#undef NEED_FAR_POINTERS -#undef NEED_SHORT_EXTERNAL_NAMES -#define INCOMPLETE_TYPES_BROKEN /* suppress undefined-structure warnings */ - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#define ALIGN_TYPE long /* apparently double is a weird size? */ - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#define TWO_FILE_COMMANDLINE /* optional -- undef if you like Unix style */ -/* Note: if you undef TWO_FILE_COMMANDLINE, you may need to define - * USE_SETMODE. Some Atari compilers require it, some do not. - */ -#define NEED_SIGNAL_CATCHER /* needed if you use jmemname.c */ -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jconfig.vc b/gtkmm-osx/trunk/jpeg-6b/jconfig.vc deleted file mode 100644 index 7e291c7..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jconfig.vc +++ /dev/null @@ -1,45 +0,0 @@ -/* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */ -/* see jconfig.doc for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#undef CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */ -#undef NEED_SHORT_EXTERNAL_NAMES -#undef INCOMPLETE_TYPES_BROKEN - -/* Define "boolean" as unsigned char, not int, per Windows custom */ -#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ -typedef unsigned char boolean; -#endif -#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ - - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#define TWO_FILE_COMMANDLINE /* optional */ -#define USE_SETMODE /* Microsoft has setmode() */ -#undef NEED_SIGNAL_CATCHER -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jconfig.vms b/gtkmm-osx/trunk/jpeg-6b/jconfig.vms deleted file mode 100644 index 55a6ffb..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jconfig.vms +++ /dev/null @@ -1,37 +0,0 @@ -/* jconfig.vms --- jconfig.h for use on Digital VMS. */ -/* see jconfig.doc for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#undef CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#undef NEED_FAR_POINTERS -#undef NEED_SHORT_EXTERNAL_NAMES -#undef INCOMPLETE_TYPES_BROKEN - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#define TWO_FILE_COMMANDLINE /* Needed on VMS */ -#undef NEED_SIGNAL_CATCHER -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jconfig.wat b/gtkmm-osx/trunk/jpeg-6b/jconfig.wat deleted file mode 100644 index 6cc545b..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jconfig.wat +++ /dev/null @@ -1,38 +0,0 @@ -/* jconfig.wat --- jconfig.h for Watcom C/C++ on MS-DOS or OS/2. */ -/* see jconfig.doc for explanations */ - -#define HAVE_PROTOTYPES -#define HAVE_UNSIGNED_CHAR -#define HAVE_UNSIGNED_SHORT -/* #define void char */ -/* #define const */ -#define CHAR_IS_UNSIGNED -#define HAVE_STDDEF_H -#define HAVE_STDLIB_H -#undef NEED_BSD_STRINGS -#undef NEED_SYS_TYPES_H -#undef NEED_FAR_POINTERS /* Watcom uses flat 32-bit addressing */ -#undef NEED_SHORT_EXTERNAL_NAMES -#undef INCOMPLETE_TYPES_BROKEN - -#ifdef JPEG_INTERNALS - -#undef RIGHT_SHIFT_IS_UNSIGNED - -#endif /* JPEG_INTERNALS */ - -#ifdef JPEG_CJPEG_DJPEG - -#define BMP_SUPPORTED /* BMP image file format */ -#define GIF_SUPPORTED /* GIF image file format */ -#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ -#undef RLE_SUPPORTED /* Utah RLE image file format */ -#define TARGA_SUPPORTED /* Targa image file format */ - -#undef TWO_FILE_COMMANDLINE /* optional */ -#define USE_SETMODE /* Needed to make one-file style work in Watcom */ -#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */ -#undef DONT_USE_B_MODE -#undef PROGRESS_REPORT /* optional */ - -#endif /* JPEG_CJPEG_DJPEG */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jcparam.c b/gtkmm-osx/trunk/jpeg-6b/jcparam.c deleted file mode 100644 index 6fc48f5..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jcparam.c +++ /dev/null @@ -1,610 +0,0 @@ -/* - * jcparam.c - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains optional default-setting code for the JPEG compressor. - * Applications do not have to use this file, but those that don't use it - * must know a lot more about the innards of the JPEG code. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* - * Quantization table setup routines - */ - -GLOBAL(void) -jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl, - const unsigned int *basic_table, - int scale_factor, boolean force_baseline) -/* Define a quantization table equal to the basic_table times - * a scale factor (given as a percentage). - * If force_baseline is TRUE, the computed quantization table entries - * are limited to 1..255 for JPEG baseline compatibility. - */ -{ - JQUANT_TBL ** qtblptr; - int i; - long temp; - - /* Safety check to ensure start_compress not called yet. */ - if (cinfo->global_state != CSTATE_START) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - if (which_tbl < 0 || which_tbl >= NUM_QUANT_TBLS) - ERREXIT1(cinfo, JERR_DQT_INDEX, which_tbl); - - qtblptr = & cinfo->quant_tbl_ptrs[which_tbl]; - - if (*qtblptr == NULL) - *qtblptr = jpeg_alloc_quant_table((j_common_ptr) cinfo); - - for (i = 0; i < DCTSIZE2; i++) { - temp = ((long) basic_table[i] * scale_factor + 50L) / 100L; - /* limit the values to the valid range */ - if (temp <= 0L) temp = 1L; - if (temp > 32767L) temp = 32767L; /* max quantizer needed for 12 bits */ - if (force_baseline && temp > 255L) - temp = 255L; /* limit to baseline range if requested */ - (*qtblptr)->quantval[i] = (UINT16) temp; - } - - /* Initialize sent_table FALSE so table will be written to JPEG file. */ - (*qtblptr)->sent_table = FALSE; -} - - -GLOBAL(void) -jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor, - boolean force_baseline) -/* Set or change the 'quality' (quantization) setting, using default tables - * and a straight percentage-scaling quality scale. In most cases it's better - * to use jpeg_set_quality (below); this entry point is provided for - * applications that insist on a linear percentage scaling. - */ -{ - /* These are the sample quantization tables given in JPEG spec section K.1. - * The spec says that the values given produce "good" quality, and - * when divided by 2, "very good" quality. - */ - static const unsigned int std_luminance_quant_tbl[DCTSIZE2] = { - 16, 11, 10, 16, 24, 40, 51, 61, - 12, 12, 14, 19, 26, 58, 60, 55, - 14, 13, 16, 24, 40, 57, 69, 56, - 14, 17, 22, 29, 51, 87, 80, 62, - 18, 22, 37, 56, 68, 109, 103, 77, - 24, 35, 55, 64, 81, 104, 113, 92, - 49, 64, 78, 87, 103, 121, 120, 101, - 72, 92, 95, 98, 112, 100, 103, 99 - }; - static const unsigned int std_chrominance_quant_tbl[DCTSIZE2] = { - 17, 18, 24, 47, 99, 99, 99, 99, - 18, 21, 26, 66, 99, 99, 99, 99, - 24, 26, 56, 99, 99, 99, 99, 99, - 47, 66, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99 - }; - - /* Set up two quantization tables using the specified scaling */ - jpeg_add_quant_table(cinfo, 0, std_luminance_quant_tbl, - scale_factor, force_baseline); - jpeg_add_quant_table(cinfo, 1, std_chrominance_quant_tbl, - scale_factor, force_baseline); -} - - -GLOBAL(int) -jpeg_quality_scaling (int quality) -/* Convert a user-specified quality rating to a percentage scaling factor - * for an underlying quantization table, using our recommended scaling curve. - * The input 'quality' factor should be 0 (terrible) to 100 (very good). - */ -{ - /* Safety limit on quality factor. Convert 0 to 1 to avoid zero divide. */ - if (quality <= 0) quality = 1; - if (quality > 100) quality = 100; - - /* The basic table is used as-is (scaling 100) for a quality of 50. - * Qualities 50..100 are converted to scaling percentage 200 - 2*Q; - * note that at Q=100 the scaling is 0, which will cause jpeg_add_quant_table - * to make all the table entries 1 (hence, minimum quantization loss). - * Qualities 1..50 are converted to scaling percentage 5000/Q. - */ - if (quality < 50) - quality = 5000 / quality; - else - quality = 200 - quality*2; - - return quality; -} - - -GLOBAL(void) -jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline) -/* Set or change the 'quality' (quantization) setting, using default tables. - * This is the standard quality-adjusting entry point for typical user - * interfaces; only those who want detailed control over quantization tables - * would use the preceding three routines directly. - */ -{ - /* Convert user 0-100 rating to percentage scaling */ - quality = jpeg_quality_scaling(quality); - - /* Set up standard quality tables */ - jpeg_set_linear_quality(cinfo, quality, force_baseline); -} - - -/* - * Huffman table setup routines - */ - -LOCAL(void) -add_huff_table (j_compress_ptr cinfo, - JHUFF_TBL **htblptr, const UINT8 *bits, const UINT8 *val) -/* Define a Huffman table */ -{ - int nsymbols, len; - - if (*htblptr == NULL) - *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); - - /* Copy the number-of-symbols-of-each-code-length counts */ - MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits)); - - /* Validate the counts. We do this here mainly so we can copy the right - * number of symbols from the val[] array, without risking marching off - * the end of memory. jchuff.c will do a more thorough test later. - */ - nsymbols = 0; - for (len = 1; len <= 16; len++) - nsymbols += bits[len]; - if (nsymbols < 1 || nsymbols > 256) - ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); - - MEMCOPY((*htblptr)->huffval, val, nsymbols * SIZEOF(UINT8)); - - /* Initialize sent_table FALSE so table will be written to JPEG file. */ - (*htblptr)->sent_table = FALSE; -} - - -LOCAL(void) -std_huff_tables (j_compress_ptr cinfo) -/* Set up the standard Huffman tables (cf. JPEG standard section K.3) */ -/* IMPORTANT: these are only valid for 8-bit data precision! */ -{ - static const UINT8 bits_dc_luminance[17] = - { /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }; - static const UINT8 val_dc_luminance[] = - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; - - static const UINT8 bits_dc_chrominance[17] = - { /* 0-base */ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; - static const UINT8 val_dc_chrominance[] = - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; - - static const UINT8 bits_ac_luminance[17] = - { /* 0-base */ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d }; - static const UINT8 val_ac_luminance[] = - { 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, - 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, - 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08, - 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0, - 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16, - 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28, - 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, - 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, - 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, - 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, - 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, - 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, - 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, - 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, - 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, - 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, - 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, - 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2, - 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, - 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, - 0xf9, 0xfa }; - - static const UINT8 bits_ac_chrominance[17] = - { /* 0-base */ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 }; - static const UINT8 val_ac_chrominance[] = - { 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, - 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, - 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, - 0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0, - 0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34, - 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26, - 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38, - 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, - 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, - 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, - 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, - 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, - 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, - 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, - 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, - 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, - 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, - 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, - 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, - 0xf9, 0xfa }; - - add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[0], - bits_dc_luminance, val_dc_luminance); - add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[0], - bits_ac_luminance, val_ac_luminance); - add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[1], - bits_dc_chrominance, val_dc_chrominance); - add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[1], - bits_ac_chrominance, val_ac_chrominance); -} - - -/* - * Default parameter setup for compression. - * - * Applications that don't choose to use this routine must do their - * own setup of all these parameters. Alternately, you can call this - * to establish defaults and then alter parameters selectively. This - * is the recommended approach since, if we add any new parameters, - * your code will still work (they'll be set to reasonable defaults). - */ - -GLOBAL(void) -jpeg_set_defaults (j_compress_ptr cinfo) -{ - int i; - - /* Safety check to ensure start_compress not called yet. */ - if (cinfo->global_state != CSTATE_START) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - /* Allocate comp_info array large enough for maximum component count. - * Array is made permanent in case application wants to compress - * multiple images at same param settings. - */ - if (cinfo->comp_info == NULL) - cinfo->comp_info = (jpeg_component_info *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - MAX_COMPONENTS * SIZEOF(jpeg_component_info)); - - /* Initialize everything not dependent on the color space */ - - cinfo->data_precision = BITS_IN_JSAMPLE; - /* Set up two quantization tables using default quality of 75 */ - jpeg_set_quality(cinfo, 75, TRUE); - /* Set up two Huffman tables */ - std_huff_tables(cinfo); - - /* Initialize default arithmetic coding conditioning */ - for (i = 0; i < NUM_ARITH_TBLS; i++) { - cinfo->arith_dc_L[i] = 0; - cinfo->arith_dc_U[i] = 1; - cinfo->arith_ac_K[i] = 5; - } - - /* Default is no multiple-scan output */ - cinfo->scan_info = NULL; - cinfo->num_scans = 0; - - /* Expect normal source image, not raw downsampled data */ - cinfo->raw_data_in = FALSE; - - /* Use Huffman coding, not arithmetic coding, by default */ - cinfo->arith_code = FALSE; - - /* By default, don't do extra passes to optimize entropy coding */ - cinfo->optimize_coding = FALSE; - /* The standard Huffman tables are only valid for 8-bit data precision. - * If the precision is higher, force optimization on so that usable - * tables will be computed. This test can be removed if default tables - * are supplied that are valid for the desired precision. - */ - if (cinfo->data_precision > 8) - cinfo->optimize_coding = TRUE; - - /* By default, use the simpler non-cosited sampling alignment */ - cinfo->CCIR601_sampling = FALSE; - - /* No input smoothing */ - cinfo->smoothing_factor = 0; - - /* DCT algorithm preference */ - cinfo->dct_method = JDCT_DEFAULT; - - /* No restart markers */ - cinfo->restart_interval = 0; - cinfo->restart_in_rows = 0; - - /* Fill in default JFIF marker parameters. Note that whether the marker - * will actually be written is determined by jpeg_set_colorspace. - * - * By default, the library emits JFIF version code 1.01. - * An application that wants to emit JFIF 1.02 extension markers should set - * JFIF_minor_version to 2. We could probably get away with just defaulting - * to 1.02, but there may still be some decoders in use that will complain - * about that; saying 1.01 should minimize compatibility problems. - */ - cinfo->JFIF_major_version = 1; /* Default JFIF version = 1.01 */ - cinfo->JFIF_minor_version = 1; - cinfo->density_unit = 0; /* Pixel size is unknown by default */ - cinfo->X_density = 1; /* Pixel aspect ratio is square by default */ - cinfo->Y_density = 1; - - /* Choose JPEG colorspace based on input space, set defaults accordingly */ - - jpeg_default_colorspace(cinfo); -} - - -/* - * Select an appropriate JPEG colorspace for in_color_space. - */ - -GLOBAL(void) -jpeg_default_colorspace (j_compress_ptr cinfo) -{ - switch (cinfo->in_color_space) { - case JCS_GRAYSCALE: - jpeg_set_colorspace(cinfo, JCS_GRAYSCALE); - break; - case JCS_RGB: - jpeg_set_colorspace(cinfo, JCS_YCbCr); - break; - case JCS_YCbCr: - jpeg_set_colorspace(cinfo, JCS_YCbCr); - break; - case JCS_CMYK: - jpeg_set_colorspace(cinfo, JCS_CMYK); /* By default, no translation */ - break; - case JCS_YCCK: - jpeg_set_colorspace(cinfo, JCS_YCCK); - break; - case JCS_UNKNOWN: - jpeg_set_colorspace(cinfo, JCS_UNKNOWN); - break; - default: - ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); - } -} - - -/* - * Set the JPEG colorspace, and choose colorspace-dependent default values. - */ - -GLOBAL(void) -jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace) -{ - jpeg_component_info * compptr; - int ci; - -#define SET_COMP(index,id,hsamp,vsamp,quant,dctbl,actbl) \ - (compptr = &cinfo->comp_info[index], \ - compptr->component_id = (id), \ - compptr->h_samp_factor = (hsamp), \ - compptr->v_samp_factor = (vsamp), \ - compptr->quant_tbl_no = (quant), \ - compptr->dc_tbl_no = (dctbl), \ - compptr->ac_tbl_no = (actbl) ) - - /* Safety check to ensure start_compress not called yet. */ - if (cinfo->global_state != CSTATE_START) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - /* For all colorspaces, we use Q and Huff tables 0 for luminance components, - * tables 1 for chrominance components. - */ - - cinfo->jpeg_color_space = colorspace; - - cinfo->write_JFIF_header = FALSE; /* No marker for non-JFIF colorspaces */ - cinfo->write_Adobe_marker = FALSE; /* write no Adobe marker by default */ - - switch (colorspace) { - case JCS_GRAYSCALE: - cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */ - cinfo->num_components = 1; - /* JFIF specifies component ID 1 */ - SET_COMP(0, 1, 1,1, 0, 0,0); - break; - case JCS_RGB: - cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag RGB */ - cinfo->num_components = 3; - SET_COMP(0, 0x52 /* 'R' */, 1,1, 0, 0,0); - SET_COMP(1, 0x47 /* 'G' */, 1,1, 0, 0,0); - SET_COMP(2, 0x42 /* 'B' */, 1,1, 0, 0,0); - break; - case JCS_YCbCr: - cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */ - cinfo->num_components = 3; - /* JFIF specifies component IDs 1,2,3 */ - /* We default to 2x2 subsamples of chrominance */ - SET_COMP(0, 1, 2,2, 0, 0,0); - SET_COMP(1, 2, 1,1, 1, 1,1); - SET_COMP(2, 3, 1,1, 1, 1,1); - break; - case JCS_CMYK: - cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag CMYK */ - cinfo->num_components = 4; - SET_COMP(0, 0x43 /* 'C' */, 1,1, 0, 0,0); - SET_COMP(1, 0x4D /* 'M' */, 1,1, 0, 0,0); - SET_COMP(2, 0x59 /* 'Y' */, 1,1, 0, 0,0); - SET_COMP(3, 0x4B /* 'K' */, 1,1, 0, 0,0); - break; - case JCS_YCCK: - cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag YCCK */ - cinfo->num_components = 4; - SET_COMP(0, 1, 2,2, 0, 0,0); - SET_COMP(1, 2, 1,1, 1, 1,1); - SET_COMP(2, 3, 1,1, 1, 1,1); - SET_COMP(3, 4, 2,2, 0, 0,0); - break; - case JCS_UNKNOWN: - cinfo->num_components = cinfo->input_components; - if (cinfo->num_components < 1 || cinfo->num_components > MAX_COMPONENTS) - ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, - MAX_COMPONENTS); - for (ci = 0; ci < cinfo->num_components; ci++) { - SET_COMP(ci, ci, 1,1, 0, 0,0); - } - break; - default: - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - } -} - - -#ifdef C_PROGRESSIVE_SUPPORTED - -LOCAL(jpeg_scan_info *) -fill_a_scan (jpeg_scan_info * scanptr, int ci, - int Ss, int Se, int Ah, int Al) -/* Support routine: generate one scan for specified component */ -{ - scanptr->comps_in_scan = 1; - scanptr->component_index[0] = ci; - scanptr->Ss = Ss; - scanptr->Se = Se; - scanptr->Ah = Ah; - scanptr->Al = Al; - scanptr++; - return scanptr; -} - -LOCAL(jpeg_scan_info *) -fill_scans (jpeg_scan_info * scanptr, int ncomps, - int Ss, int Se, int Ah, int Al) -/* Support routine: generate one scan for each component */ -{ - int ci; - - for (ci = 0; ci < ncomps; ci++) { - scanptr->comps_in_scan = 1; - scanptr->component_index[0] = ci; - scanptr->Ss = Ss; - scanptr->Se = Se; - scanptr->Ah = Ah; - scanptr->Al = Al; - scanptr++; - } - return scanptr; -} - -LOCAL(jpeg_scan_info *) -fill_dc_scans (jpeg_scan_info * scanptr, int ncomps, int Ah, int Al) -/* Support routine: generate interleaved DC scan if possible, else N scans */ -{ - int ci; - - if (ncomps <= MAX_COMPS_IN_SCAN) { - /* Single interleaved DC scan */ - scanptr->comps_in_scan = ncomps; - for (ci = 0; ci < ncomps; ci++) - scanptr->component_index[ci] = ci; - scanptr->Ss = scanptr->Se = 0; - scanptr->Ah = Ah; - scanptr->Al = Al; - scanptr++; - } else { - /* Noninterleaved DC scan for each component */ - scanptr = fill_scans(scanptr, ncomps, 0, 0, Ah, Al); - } - return scanptr; -} - - -/* - * Create a recommended progressive-JPEG script. - * cinfo->num_components and cinfo->jpeg_color_space must be correct. - */ - -GLOBAL(void) -jpeg_simple_progression (j_compress_ptr cinfo) -{ - int ncomps = cinfo->num_components; - int nscans; - jpeg_scan_info * scanptr; - - /* Safety check to ensure start_compress not called yet. */ - if (cinfo->global_state != CSTATE_START) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - /* Figure space needed for script. Calculation must match code below! */ - if (ncomps == 3 && cinfo->jpeg_color_space == JCS_YCbCr) { - /* Custom script for YCbCr color images. */ - nscans = 10; - } else { - /* All-purpose script for other color spaces. */ - if (ncomps > MAX_COMPS_IN_SCAN) - nscans = 6 * ncomps; /* 2 DC + 4 AC scans per component */ - else - nscans = 2 + 4 * ncomps; /* 2 DC scans; 4 AC scans per component */ - } - - /* Allocate space for script. - * We need to put it in the permanent pool in case the application performs - * multiple compressions without changing the settings. To avoid a memory - * leak if jpeg_simple_progression is called repeatedly for the same JPEG - * object, we try to re-use previously allocated space, and we allocate - * enough space to handle YCbCr even if initially asked for grayscale. - */ - if (cinfo->script_space == NULL || cinfo->script_space_size < nscans) { - cinfo->script_space_size = MAX(nscans, 10); - cinfo->script_space = (jpeg_scan_info *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - cinfo->script_space_size * SIZEOF(jpeg_scan_info)); - } - scanptr = cinfo->script_space; - cinfo->scan_info = scanptr; - cinfo->num_scans = nscans; - - if (ncomps == 3 && cinfo->jpeg_color_space == JCS_YCbCr) { - /* Custom script for YCbCr color images. */ - /* Initial DC scan */ - scanptr = fill_dc_scans(scanptr, ncomps, 0, 1); - /* Initial AC scan: get some luma data out in a hurry */ - scanptr = fill_a_scan(scanptr, 0, 1, 5, 0, 2); - /* Chroma data is too small to be worth expending many scans on */ - scanptr = fill_a_scan(scanptr, 2, 1, 63, 0, 1); - scanptr = fill_a_scan(scanptr, 1, 1, 63, 0, 1); - /* Complete spectral selection for luma AC */ - scanptr = fill_a_scan(scanptr, 0, 6, 63, 0, 2); - /* Refine next bit of luma AC */ - scanptr = fill_a_scan(scanptr, 0, 1, 63, 2, 1); - /* Finish DC successive approximation */ - scanptr = fill_dc_scans(scanptr, ncomps, 1, 0); - /* Finish AC successive approximation */ - scanptr = fill_a_scan(scanptr, 2, 1, 63, 1, 0); - scanptr = fill_a_scan(scanptr, 1, 1, 63, 1, 0); - /* Luma bottom bit comes last since it's usually largest scan */ - scanptr = fill_a_scan(scanptr, 0, 1, 63, 1, 0); - } else { - /* All-purpose script for other color spaces. */ - /* Successive approximation first pass */ - scanptr = fill_dc_scans(scanptr, ncomps, 0, 1); - scanptr = fill_scans(scanptr, ncomps, 1, 5, 0, 2); - scanptr = fill_scans(scanptr, ncomps, 6, 63, 0, 2); - /* Successive approximation second pass */ - scanptr = fill_scans(scanptr, ncomps, 1, 63, 2, 1); - /* Successive approximation final pass */ - scanptr = fill_dc_scans(scanptr, ncomps, 1, 0); - scanptr = fill_scans(scanptr, ncomps, 1, 63, 1, 0); - } -} - -#endif /* C_PROGRESSIVE_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jcphuff.c b/gtkmm-osx/trunk/jpeg-6b/jcphuff.c deleted file mode 100644 index 07f9178..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jcphuff.c +++ /dev/null @@ -1,833 +0,0 @@ -/* - * jcphuff.c - * - * Copyright (C) 1995-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains Huffman entropy encoding routines for progressive JPEG. - * - * We do not support output suspension in this module, since the library - * currently does not allow multiple-scan files to be written with output - * suspension. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jchuff.h" /* Declarations shared with jchuff.c */ - -#ifdef C_PROGRESSIVE_SUPPORTED - -/* Expanded entropy encoder object for progressive Huffman encoding. */ - -typedef struct { - struct jpeg_entropy_encoder pub; /* public fields */ - - /* Mode flag: TRUE for optimization, FALSE for actual data output */ - boolean gather_statistics; - - /* Bit-level coding status. - * next_output_byte/free_in_buffer are local copies of cinfo->dest fields. - */ - JOCTET * next_output_byte; /* => next byte to write in buffer */ - size_t free_in_buffer; /* # of byte spaces remaining in buffer */ - INT32 put_buffer; /* current bit-accumulation buffer */ - int put_bits; /* # of bits now in it */ - j_compress_ptr cinfo; /* link to cinfo (needed for dump_buffer) */ - - /* Coding status for DC components */ - int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ - - /* Coding status for AC components */ - int ac_tbl_no; /* the table number of the single component */ - unsigned int EOBRUN; /* run length of EOBs */ - unsigned int BE; /* # of buffered correction bits before MCU */ - char * bit_buffer; /* buffer for correction bits (1 per char) */ - /* packing correction bits tightly would save some space but cost time... */ - - unsigned int restarts_to_go; /* MCUs left in this restart interval */ - int next_restart_num; /* next restart number to write (0-7) */ - - /* Pointers to derived tables (these workspaces have image lifespan). - * Since any one scan codes only DC or only AC, we only need one set - * of tables, not one for DC and one for AC. - */ - c_derived_tbl * derived_tbls[NUM_HUFF_TBLS]; - - /* Statistics tables for optimization; again, one set is enough */ - long * count_ptrs[NUM_HUFF_TBLS]; -} phuff_entropy_encoder; - -typedef phuff_entropy_encoder * phuff_entropy_ptr; - -/* MAX_CORR_BITS is the number of bits the AC refinement correction-bit - * buffer can hold. Larger sizes may slightly improve compression, but - * 1000 is already well into the realm of overkill. - * The minimum safe size is 64 bits. - */ - -#define MAX_CORR_BITS 1000 /* Max # of correction bits I can buffer */ - -/* IRIGHT_SHIFT is like RIGHT_SHIFT, but works on int rather than INT32. - * We assume that int right shift is unsigned if INT32 right shift is, - * which should be safe. - */ - -#ifdef RIGHT_SHIFT_IS_UNSIGNED -#define ISHIFT_TEMPS int ishift_temp; -#define IRIGHT_SHIFT(x,shft) \ - ((ishift_temp = (x)) < 0 ? \ - (ishift_temp >> (shft)) | ((~0) << (16-(shft))) : \ - (ishift_temp >> (shft))) -#else -#define ISHIFT_TEMPS -#define IRIGHT_SHIFT(x,shft) ((x) >> (shft)) -#endif - -/* Forward declarations */ -METHODDEF(boolean) encode_mcu_DC_first JPP((j_compress_ptr cinfo, - JBLOCKROW *MCU_data)); -METHODDEF(boolean) encode_mcu_AC_first JPP((j_compress_ptr cinfo, - JBLOCKROW *MCU_data)); -METHODDEF(boolean) encode_mcu_DC_refine JPP((j_compress_ptr cinfo, - JBLOCKROW *MCU_data)); -METHODDEF(boolean) encode_mcu_AC_refine JPP((j_compress_ptr cinfo, - JBLOCKROW *MCU_data)); -METHODDEF(void) finish_pass_phuff JPP((j_compress_ptr cinfo)); -METHODDEF(void) finish_pass_gather_phuff JPP((j_compress_ptr cinfo)); - - -/* - * Initialize for a Huffman-compressed scan using progressive JPEG. - */ - -METHODDEF(void) -start_pass_phuff (j_compress_ptr cinfo, boolean gather_statistics) -{ - phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; - boolean is_DC_band; - int ci, tbl; - jpeg_component_info * compptr; - - entropy->cinfo = cinfo; - entropy->gather_statistics = gather_statistics; - - is_DC_band = (cinfo->Ss == 0); - - /* We assume jcmaster.c already validated the scan parameters. */ - - /* Select execution routines */ - if (cinfo->Ah == 0) { - if (is_DC_band) - entropy->pub.encode_mcu = encode_mcu_DC_first; - else - entropy->pub.encode_mcu = encode_mcu_AC_first; - } else { - if (is_DC_band) - entropy->pub.encode_mcu = encode_mcu_DC_refine; - else { - entropy->pub.encode_mcu = encode_mcu_AC_refine; - /* AC refinement needs a correction bit buffer */ - if (entropy->bit_buffer == NULL) - entropy->bit_buffer = (char *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - MAX_CORR_BITS * SIZEOF(char)); - } - } - if (gather_statistics) - entropy->pub.finish_pass = finish_pass_gather_phuff; - else - entropy->pub.finish_pass = finish_pass_phuff; - - /* Only DC coefficients may be interleaved, so cinfo->comps_in_scan = 1 - * for AC coefficients. - */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - /* Initialize DC predictions to 0 */ - entropy->last_dc_val[ci] = 0; - /* Get table index */ - if (is_DC_band) { - if (cinfo->Ah != 0) /* DC refinement needs no table */ - continue; - tbl = compptr->dc_tbl_no; - } else { - entropy->ac_tbl_no = tbl = compptr->ac_tbl_no; - } - if (gather_statistics) { - /* Check for invalid table index */ - /* (make_c_derived_tbl does this in the other path) */ - if (tbl < 0 || tbl >= NUM_HUFF_TBLS) - ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tbl); - /* Allocate and zero the statistics tables */ - /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */ - if (entropy->count_ptrs[tbl] == NULL) - entropy->count_ptrs[tbl] = (long *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - 257 * SIZEOF(long)); - MEMZERO(entropy->count_ptrs[tbl], 257 * SIZEOF(long)); - } else { - /* Compute derived values for Huffman table */ - /* We may do this more than once for a table, but it's not expensive */ - jpeg_make_c_derived_tbl(cinfo, is_DC_band, tbl, - & entropy->derived_tbls[tbl]); - } - } - - /* Initialize AC stuff */ - entropy->EOBRUN = 0; - entropy->BE = 0; - - /* Initialize bit buffer to empty */ - entropy->put_buffer = 0; - entropy->put_bits = 0; - - /* Initialize restart stuff */ - entropy->restarts_to_go = cinfo->restart_interval; - entropy->next_restart_num = 0; -} - - -/* Outputting bytes to the file. - * NB: these must be called only when actually outputting, - * that is, entropy->gather_statistics == FALSE. - */ - -/* Emit a byte */ -#define emit_byte(entropy,val) \ - { *(entropy)->next_output_byte++ = (JOCTET) (val); \ - if (--(entropy)->free_in_buffer == 0) \ - dump_buffer(entropy); } - - -LOCAL(void) -dump_buffer (phuff_entropy_ptr entropy) -/* Empty the output buffer; we do not support suspension in this module. */ -{ - struct jpeg_destination_mgr * dest = entropy->cinfo->dest; - - if (! (*dest->empty_output_buffer) (entropy->cinfo)) - ERREXIT(entropy->cinfo, JERR_CANT_SUSPEND); - /* After a successful buffer dump, must reset buffer pointers */ - entropy->next_output_byte = dest->next_output_byte; - entropy->free_in_buffer = dest->free_in_buffer; -} - - -/* Outputting bits to the file */ - -/* Only the right 24 bits of put_buffer are used; the valid bits are - * left-justified in this part. At most 16 bits can be passed to emit_bits - * in one call, and we never retain more than 7 bits in put_buffer - * between calls, so 24 bits are sufficient. - */ - -INLINE -LOCAL(void) -emit_bits (phuff_entropy_ptr entropy, unsigned int code, int size) -/* Emit some bits, unless we are in gather mode */ -{ - /* This routine is heavily used, so it's worth coding tightly. */ - register INT32 put_buffer = (INT32) code; - register int put_bits = entropy->put_bits; - - /* if size is 0, caller used an invalid Huffman table entry */ - if (size == 0) - ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE); - - if (entropy->gather_statistics) - return; /* do nothing if we're only getting stats */ - - put_buffer &= (((INT32) 1)<put_buffer; /* and merge with old buffer contents */ - - while (put_bits >= 8) { - int c = (int) ((put_buffer >> 16) & 0xFF); - - emit_byte(entropy, c); - if (c == 0xFF) { /* need to stuff a zero byte? */ - emit_byte(entropy, 0); - } - put_buffer <<= 8; - put_bits -= 8; - } - - entropy->put_buffer = put_buffer; /* update variables */ - entropy->put_bits = put_bits; -} - - -LOCAL(void) -flush_bits (phuff_entropy_ptr entropy) -{ - emit_bits(entropy, 0x7F, 7); /* fill any partial byte with ones */ - entropy->put_buffer = 0; /* and reset bit-buffer to empty */ - entropy->put_bits = 0; -} - - -/* - * Emit (or just count) a Huffman symbol. - */ - -INLINE -LOCAL(void) -emit_symbol (phuff_entropy_ptr entropy, int tbl_no, int symbol) -{ - if (entropy->gather_statistics) - entropy->count_ptrs[tbl_no][symbol]++; - else { - c_derived_tbl * tbl = entropy->derived_tbls[tbl_no]; - emit_bits(entropy, tbl->ehufco[symbol], tbl->ehufsi[symbol]); - } -} - - -/* - * Emit bits from a correction bit buffer. - */ - -LOCAL(void) -emit_buffered_bits (phuff_entropy_ptr entropy, char * bufstart, - unsigned int nbits) -{ - if (entropy->gather_statistics) - return; /* no real work */ - - while (nbits > 0) { - emit_bits(entropy, (unsigned int) (*bufstart), 1); - bufstart++; - nbits--; - } -} - - -/* - * Emit any pending EOBRUN symbol. - */ - -LOCAL(void) -emit_eobrun (phuff_entropy_ptr entropy) -{ - register int temp, nbits; - - if (entropy->EOBRUN > 0) { /* if there is any pending EOBRUN */ - temp = entropy->EOBRUN; - nbits = 0; - while ((temp >>= 1)) - nbits++; - /* safety check: shouldn't happen given limited correction-bit buffer */ - if (nbits > 14) - ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE); - - emit_symbol(entropy, entropy->ac_tbl_no, nbits << 4); - if (nbits) - emit_bits(entropy, entropy->EOBRUN, nbits); - - entropy->EOBRUN = 0; - - /* Emit any buffered correction bits */ - emit_buffered_bits(entropy, entropy->bit_buffer, entropy->BE); - entropy->BE = 0; - } -} - - -/* - * Emit a restart marker & resynchronize predictions. - */ - -LOCAL(void) -emit_restart (phuff_entropy_ptr entropy, int restart_num) -{ - int ci; - - emit_eobrun(entropy); - - if (! entropy->gather_statistics) { - flush_bits(entropy); - emit_byte(entropy, 0xFF); - emit_byte(entropy, JPEG_RST0 + restart_num); - } - - if (entropy->cinfo->Ss == 0) { - /* Re-initialize DC predictions to 0 */ - for (ci = 0; ci < entropy->cinfo->comps_in_scan; ci++) - entropy->last_dc_val[ci] = 0; - } else { - /* Re-initialize all AC-related fields to 0 */ - entropy->EOBRUN = 0; - entropy->BE = 0; - } -} - - -/* - * MCU encoding for DC initial scan (either spectral selection, - * or first pass of successive approximation). - */ - -METHODDEF(boolean) -encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) -{ - phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; - register int temp, temp2; - register int nbits; - int blkn, ci; - int Al = cinfo->Al; - JBLOCKROW block; - jpeg_component_info * compptr; - ISHIFT_TEMPS - - entropy->next_output_byte = cinfo->dest->next_output_byte; - entropy->free_in_buffer = cinfo->dest->free_in_buffer; - - /* Emit restart marker if needed */ - if (cinfo->restart_interval) - if (entropy->restarts_to_go == 0) - emit_restart(entropy, entropy->next_restart_num); - - /* Encode the MCU data blocks */ - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - block = MCU_data[blkn]; - ci = cinfo->MCU_membership[blkn]; - compptr = cinfo->cur_comp_info[ci]; - - /* Compute the DC value after the required point transform by Al. - * This is simply an arithmetic right shift. - */ - temp2 = IRIGHT_SHIFT((int) ((*block)[0]), Al); - - /* DC differences are figured on the point-transformed values. */ - temp = temp2 - entropy->last_dc_val[ci]; - entropy->last_dc_val[ci] = temp2; - - /* Encode the DC coefficient difference per section G.1.2.1 */ - temp2 = temp; - if (temp < 0) { - temp = -temp; /* temp is abs value of input */ - /* For a negative input, want temp2 = bitwise complement of abs(input) */ - /* This code assumes we are on a two's complement machine */ - temp2--; - } - - /* Find the number of bits needed for the magnitude of the coefficient */ - nbits = 0; - while (temp) { - nbits++; - temp >>= 1; - } - /* Check for out-of-range coefficient values. - * Since we're encoding a difference, the range limit is twice as much. - */ - if (nbits > MAX_COEF_BITS+1) - ERREXIT(cinfo, JERR_BAD_DCT_COEF); - - /* Count/emit the Huffman-coded symbol for the number of bits */ - emit_symbol(entropy, compptr->dc_tbl_no, nbits); - - /* Emit that number of bits of the value, if positive, */ - /* or the complement of its magnitude, if negative. */ - if (nbits) /* emit_bits rejects calls with size 0 */ - emit_bits(entropy, (unsigned int) temp2, nbits); - } - - cinfo->dest->next_output_byte = entropy->next_output_byte; - cinfo->dest->free_in_buffer = entropy->free_in_buffer; - - /* Update restart-interval state too */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) { - entropy->restarts_to_go = cinfo->restart_interval; - entropy->next_restart_num++; - entropy->next_restart_num &= 7; - } - entropy->restarts_to_go--; - } - - return TRUE; -} - - -/* - * MCU encoding for AC initial scan (either spectral selection, - * or first pass of successive approximation). - */ - -METHODDEF(boolean) -encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) -{ - phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; - register int temp, temp2; - register int nbits; - register int r, k; - int Se = cinfo->Se; - int Al = cinfo->Al; - JBLOCKROW block; - - entropy->next_output_byte = cinfo->dest->next_output_byte; - entropy->free_in_buffer = cinfo->dest->free_in_buffer; - - /* Emit restart marker if needed */ - if (cinfo->restart_interval) - if (entropy->restarts_to_go == 0) - emit_restart(entropy, entropy->next_restart_num); - - /* Encode the MCU data block */ - block = MCU_data[0]; - - /* Encode the AC coefficients per section G.1.2.2, fig. G.3 */ - - r = 0; /* r = run length of zeros */ - - for (k = cinfo->Ss; k <= Se; k++) { - if ((temp = (*block)[jpeg_natural_order[k]]) == 0) { - r++; - continue; - } - /* We must apply the point transform by Al. For AC coefficients this - * is an integer division with rounding towards 0. To do this portably - * in C, we shift after obtaining the absolute value; so the code is - * interwoven with finding the abs value (temp) and output bits (temp2). - */ - if (temp < 0) { - temp = -temp; /* temp is abs value of input */ - temp >>= Al; /* apply the point transform */ - /* For a negative coef, want temp2 = bitwise complement of abs(coef) */ - temp2 = ~temp; - } else { - temp >>= Al; /* apply the point transform */ - temp2 = temp; - } - /* Watch out for case that nonzero coef is zero after point transform */ - if (temp == 0) { - r++; - continue; - } - - /* Emit any pending EOBRUN */ - if (entropy->EOBRUN > 0) - emit_eobrun(entropy); - /* if run length > 15, must emit special run-length-16 codes (0xF0) */ - while (r > 15) { - emit_symbol(entropy, entropy->ac_tbl_no, 0xF0); - r -= 16; - } - - /* Find the number of bits needed for the magnitude of the coefficient */ - nbits = 1; /* there must be at least one 1 bit */ - while ((temp >>= 1)) - nbits++; - /* Check for out-of-range coefficient values */ - if (nbits > MAX_COEF_BITS) - ERREXIT(cinfo, JERR_BAD_DCT_COEF); - - /* Count/emit Huffman symbol for run length / number of bits */ - emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + nbits); - - /* Emit that number of bits of the value, if positive, */ - /* or the complement of its magnitude, if negative. */ - emit_bits(entropy, (unsigned int) temp2, nbits); - - r = 0; /* reset zero run length */ - } - - if (r > 0) { /* If there are trailing zeroes, */ - entropy->EOBRUN++; /* count an EOB */ - if (entropy->EOBRUN == 0x7FFF) - emit_eobrun(entropy); /* force it out to avoid overflow */ - } - - cinfo->dest->next_output_byte = entropy->next_output_byte; - cinfo->dest->free_in_buffer = entropy->free_in_buffer; - - /* Update restart-interval state too */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) { - entropy->restarts_to_go = cinfo->restart_interval; - entropy->next_restart_num++; - entropy->next_restart_num &= 7; - } - entropy->restarts_to_go--; - } - - return TRUE; -} - - -/* - * MCU encoding for DC successive approximation refinement scan. - * Note: we assume such scans can be multi-component, although the spec - * is not very clear on the point. - */ - -METHODDEF(boolean) -encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) -{ - phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; - register int temp; - int blkn; - int Al = cinfo->Al; - JBLOCKROW block; - - entropy->next_output_byte = cinfo->dest->next_output_byte; - entropy->free_in_buffer = cinfo->dest->free_in_buffer; - - /* Emit restart marker if needed */ - if (cinfo->restart_interval) - if (entropy->restarts_to_go == 0) - emit_restart(entropy, entropy->next_restart_num); - - /* Encode the MCU data blocks */ - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - block = MCU_data[blkn]; - - /* We simply emit the Al'th bit of the DC coefficient value. */ - temp = (*block)[0]; - emit_bits(entropy, (unsigned int) (temp >> Al), 1); - } - - cinfo->dest->next_output_byte = entropy->next_output_byte; - cinfo->dest->free_in_buffer = entropy->free_in_buffer; - - /* Update restart-interval state too */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) { - entropy->restarts_to_go = cinfo->restart_interval; - entropy->next_restart_num++; - entropy->next_restart_num &= 7; - } - entropy->restarts_to_go--; - } - - return TRUE; -} - - -/* - * MCU encoding for AC successive approximation refinement scan. - */ - -METHODDEF(boolean) -encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) -{ - phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; - register int temp; - register int r, k; - int EOB; - char *BR_buffer; - unsigned int BR; - int Se = cinfo->Se; - int Al = cinfo->Al; - JBLOCKROW block; - int absvalues[DCTSIZE2]; - - entropy->next_output_byte = cinfo->dest->next_output_byte; - entropy->free_in_buffer = cinfo->dest->free_in_buffer; - - /* Emit restart marker if needed */ - if (cinfo->restart_interval) - if (entropy->restarts_to_go == 0) - emit_restart(entropy, entropy->next_restart_num); - - /* Encode the MCU data block */ - block = MCU_data[0]; - - /* It is convenient to make a pre-pass to determine the transformed - * coefficients' absolute values and the EOB position. - */ - EOB = 0; - for (k = cinfo->Ss; k <= Se; k++) { - temp = (*block)[jpeg_natural_order[k]]; - /* We must apply the point transform by Al. For AC coefficients this - * is an integer division with rounding towards 0. To do this portably - * in C, we shift after obtaining the absolute value. - */ - if (temp < 0) - temp = -temp; /* temp is abs value of input */ - temp >>= Al; /* apply the point transform */ - absvalues[k] = temp; /* save abs value for main pass */ - if (temp == 1) - EOB = k; /* EOB = index of last newly-nonzero coef */ - } - - /* Encode the AC coefficients per section G.1.2.3, fig. G.7 */ - - r = 0; /* r = run length of zeros */ - BR = 0; /* BR = count of buffered bits added now */ - BR_buffer = entropy->bit_buffer + entropy->BE; /* Append bits to buffer */ - - for (k = cinfo->Ss; k <= Se; k++) { - if ((temp = absvalues[k]) == 0) { - r++; - continue; - } - - /* Emit any required ZRLs, but not if they can be folded into EOB */ - while (r > 15 && k <= EOB) { - /* emit any pending EOBRUN and the BE correction bits */ - emit_eobrun(entropy); - /* Emit ZRL */ - emit_symbol(entropy, entropy->ac_tbl_no, 0xF0); - r -= 16; - /* Emit buffered correction bits that must be associated with ZRL */ - emit_buffered_bits(entropy, BR_buffer, BR); - BR_buffer = entropy->bit_buffer; /* BE bits are gone now */ - BR = 0; - } - - /* If the coef was previously nonzero, it only needs a correction bit. - * NOTE: a straight translation of the spec's figure G.7 would suggest - * that we also need to test r > 15. But if r > 15, we can only get here - * if k > EOB, which implies that this coefficient is not 1. - */ - if (temp > 1) { - /* The correction bit is the next bit of the absolute value. */ - BR_buffer[BR++] = (char) (temp & 1); - continue; - } - - /* Emit any pending EOBRUN and the BE correction bits */ - emit_eobrun(entropy); - - /* Count/emit Huffman symbol for run length / number of bits */ - emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + 1); - - /* Emit output bit for newly-nonzero coef */ - temp = ((*block)[jpeg_natural_order[k]] < 0) ? 0 : 1; - emit_bits(entropy, (unsigned int) temp, 1); - - /* Emit buffered correction bits that must be associated with this code */ - emit_buffered_bits(entropy, BR_buffer, BR); - BR_buffer = entropy->bit_buffer; /* BE bits are gone now */ - BR = 0; - r = 0; /* reset zero run length */ - } - - if (r > 0 || BR > 0) { /* If there are trailing zeroes, */ - entropy->EOBRUN++; /* count an EOB */ - entropy->BE += BR; /* concat my correction bits to older ones */ - /* We force out the EOB if we risk either: - * 1. overflow of the EOB counter; - * 2. overflow of the correction bit buffer during the next MCU. - */ - if (entropy->EOBRUN == 0x7FFF || entropy->BE > (MAX_CORR_BITS-DCTSIZE2+1)) - emit_eobrun(entropy); - } - - cinfo->dest->next_output_byte = entropy->next_output_byte; - cinfo->dest->free_in_buffer = entropy->free_in_buffer; - - /* Update restart-interval state too */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) { - entropy->restarts_to_go = cinfo->restart_interval; - entropy->next_restart_num++; - entropy->next_restart_num &= 7; - } - entropy->restarts_to_go--; - } - - return TRUE; -} - - -/* - * Finish up at the end of a Huffman-compressed progressive scan. - */ - -METHODDEF(void) -finish_pass_phuff (j_compress_ptr cinfo) -{ - phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; - - entropy->next_output_byte = cinfo->dest->next_output_byte; - entropy->free_in_buffer = cinfo->dest->free_in_buffer; - - /* Flush out any buffered data */ - emit_eobrun(entropy); - flush_bits(entropy); - - cinfo->dest->next_output_byte = entropy->next_output_byte; - cinfo->dest->free_in_buffer = entropy->free_in_buffer; -} - - -/* - * Finish up a statistics-gathering pass and create the new Huffman tables. - */ - -METHODDEF(void) -finish_pass_gather_phuff (j_compress_ptr cinfo) -{ - phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; - boolean is_DC_band; - int ci, tbl; - jpeg_component_info * compptr; - JHUFF_TBL **htblptr; - boolean did[NUM_HUFF_TBLS]; - - /* Flush out buffered data (all we care about is counting the EOB symbol) */ - emit_eobrun(entropy); - - is_DC_band = (cinfo->Ss == 0); - - /* It's important not to apply jpeg_gen_optimal_table more than once - * per table, because it clobbers the input frequency counts! - */ - MEMZERO(did, SIZEOF(did)); - - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - if (is_DC_band) { - if (cinfo->Ah != 0) /* DC refinement needs no table */ - continue; - tbl = compptr->dc_tbl_no; - } else { - tbl = compptr->ac_tbl_no; - } - if (! did[tbl]) { - if (is_DC_band) - htblptr = & cinfo->dc_huff_tbl_ptrs[tbl]; - else - htblptr = & cinfo->ac_huff_tbl_ptrs[tbl]; - if (*htblptr == NULL) - *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); - jpeg_gen_optimal_table(cinfo, *htblptr, entropy->count_ptrs[tbl]); - did[tbl] = TRUE; - } - } -} - - -/* - * Module initialization routine for progressive Huffman entropy encoding. - */ - -GLOBAL(void) -jinit_phuff_encoder (j_compress_ptr cinfo) -{ - phuff_entropy_ptr entropy; - int i; - - entropy = (phuff_entropy_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(phuff_entropy_encoder)); - cinfo->entropy = (struct jpeg_entropy_encoder *) entropy; - entropy->pub.start_pass = start_pass_phuff; - - /* Mark tables unallocated */ - for (i = 0; i < NUM_HUFF_TBLS; i++) { - entropy->derived_tbls[i] = NULL; - entropy->count_ptrs[i] = NULL; - } - entropy->bit_buffer = NULL; /* needed only in AC refinement scan */ -} - -#endif /* C_PROGRESSIVE_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jcprepct.c b/gtkmm-osx/trunk/jpeg-6b/jcprepct.c deleted file mode 100644 index fa93333..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jcprepct.c +++ /dev/null @@ -1,354 +0,0 @@ -/* - * jcprepct.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains the compression preprocessing controller. - * This controller manages the color conversion, downsampling, - * and edge expansion steps. - * - * Most of the complexity here is associated with buffering input rows - * as required by the downsampler. See the comments at the head of - * jcsample.c for the downsampler's needs. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* At present, jcsample.c can request context rows only for smoothing. - * In the future, we might also need context rows for CCIR601 sampling - * or other more-complex downsampling procedures. The code to support - * context rows should be compiled only if needed. - */ -#ifdef INPUT_SMOOTHING_SUPPORTED -#define CONTEXT_ROWS_SUPPORTED -#endif - - -/* - * For the simple (no-context-row) case, we just need to buffer one - * row group's worth of pixels for the downsampling step. At the bottom of - * the image, we pad to a full row group by replicating the last pixel row. - * The downsampler's last output row is then replicated if needed to pad - * out to a full iMCU row. - * - * When providing context rows, we must buffer three row groups' worth of - * pixels. Three row groups are physically allocated, but the row pointer - * arrays are made five row groups high, with the extra pointers above and - * below "wrapping around" to point to the last and first real row groups. - * This allows the downsampler to access the proper context rows. - * At the top and bottom of the image, we create dummy context rows by - * copying the first or last real pixel row. This copying could be avoided - * by pointer hacking as is done in jdmainct.c, but it doesn't seem worth the - * trouble on the compression side. - */ - - -/* Private buffer controller object */ - -typedef struct { - struct jpeg_c_prep_controller pub; /* public fields */ - - /* Downsampling input buffer. This buffer holds color-converted data - * until we have enough to do a downsample step. - */ - JSAMPARRAY color_buf[MAX_COMPONENTS]; - - JDIMENSION rows_to_go; /* counts rows remaining in source image */ - int next_buf_row; /* index of next row to store in color_buf */ - -#ifdef CONTEXT_ROWS_SUPPORTED /* only needed for context case */ - int this_row_group; /* starting row index of group to process */ - int next_buf_stop; /* downsample when we reach this index */ -#endif -} my_prep_controller; - -typedef my_prep_controller * my_prep_ptr; - - -/* - * Initialize for a processing pass. - */ - -METHODDEF(void) -start_pass_prep (j_compress_ptr cinfo, J_BUF_MODE pass_mode) -{ - my_prep_ptr prep = (my_prep_ptr) cinfo->prep; - - if (pass_mode != JBUF_PASS_THRU) - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - - /* Initialize total-height counter for detecting bottom of image */ - prep->rows_to_go = cinfo->image_height; - /* Mark the conversion buffer empty */ - prep->next_buf_row = 0; -#ifdef CONTEXT_ROWS_SUPPORTED - /* Preset additional state variables for context mode. - * These aren't used in non-context mode, so we needn't test which mode. - */ - prep->this_row_group = 0; - /* Set next_buf_stop to stop after two row groups have been read in. */ - prep->next_buf_stop = 2 * cinfo->max_v_samp_factor; -#endif -} - - -/* - * Expand an image vertically from height input_rows to height output_rows, - * by duplicating the bottom row. - */ - -LOCAL(void) -expand_bottom_edge (JSAMPARRAY image_data, JDIMENSION num_cols, - int input_rows, int output_rows) -{ - register int row; - - for (row = input_rows; row < output_rows; row++) { - jcopy_sample_rows(image_data, input_rows-1, image_data, row, - 1, num_cols); - } -} - - -/* - * Process some data in the simple no-context case. - * - * Preprocessor output data is counted in "row groups". A row group - * is defined to be v_samp_factor sample rows of each component. - * Downsampling will produce this much data from each max_v_samp_factor - * input rows. - */ - -METHODDEF(void) -pre_process_data (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, - JDIMENSION in_rows_avail, - JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr, - JDIMENSION out_row_groups_avail) -{ - my_prep_ptr prep = (my_prep_ptr) cinfo->prep; - int numrows, ci; - JDIMENSION inrows; - jpeg_component_info * compptr; - - while (*in_row_ctr < in_rows_avail && - *out_row_group_ctr < out_row_groups_avail) { - /* Do color conversion to fill the conversion buffer. */ - inrows = in_rows_avail - *in_row_ctr; - numrows = cinfo->max_v_samp_factor - prep->next_buf_row; - numrows = (int) MIN((JDIMENSION) numrows, inrows); - (*cinfo->cconvert->color_convert) (cinfo, input_buf + *in_row_ctr, - prep->color_buf, - (JDIMENSION) prep->next_buf_row, - numrows); - *in_row_ctr += numrows; - prep->next_buf_row += numrows; - prep->rows_to_go -= numrows; - /* If at bottom of image, pad to fill the conversion buffer. */ - if (prep->rows_to_go == 0 && - prep->next_buf_row < cinfo->max_v_samp_factor) { - for (ci = 0; ci < cinfo->num_components; ci++) { - expand_bottom_edge(prep->color_buf[ci], cinfo->image_width, - prep->next_buf_row, cinfo->max_v_samp_factor); - } - prep->next_buf_row = cinfo->max_v_samp_factor; - } - /* If we've filled the conversion buffer, empty it. */ - if (prep->next_buf_row == cinfo->max_v_samp_factor) { - (*cinfo->downsample->downsample) (cinfo, - prep->color_buf, (JDIMENSION) 0, - output_buf, *out_row_group_ctr); - prep->next_buf_row = 0; - (*out_row_group_ctr)++; - } - /* If at bottom of image, pad the output to a full iMCU height. - * Note we assume the caller is providing a one-iMCU-height output buffer! - */ - if (prep->rows_to_go == 0 && - *out_row_group_ctr < out_row_groups_avail) { - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - expand_bottom_edge(output_buf[ci], - compptr->width_in_blocks * DCTSIZE, - (int) (*out_row_group_ctr * compptr->v_samp_factor), - (int) (out_row_groups_avail * compptr->v_samp_factor)); - } - *out_row_group_ctr = out_row_groups_avail; - break; /* can exit outer loop without test */ - } - } -} - - -#ifdef CONTEXT_ROWS_SUPPORTED - -/* - * Process some data in the context case. - */ - -METHODDEF(void) -pre_process_context (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, - JDIMENSION in_rows_avail, - JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr, - JDIMENSION out_row_groups_avail) -{ - my_prep_ptr prep = (my_prep_ptr) cinfo->prep; - int numrows, ci; - int buf_height = cinfo->max_v_samp_factor * 3; - JDIMENSION inrows; - - while (*out_row_group_ctr < out_row_groups_avail) { - if (*in_row_ctr < in_rows_avail) { - /* Do color conversion to fill the conversion buffer. */ - inrows = in_rows_avail - *in_row_ctr; - numrows = prep->next_buf_stop - prep->next_buf_row; - numrows = (int) MIN((JDIMENSION) numrows, inrows); - (*cinfo->cconvert->color_convert) (cinfo, input_buf + *in_row_ctr, - prep->color_buf, - (JDIMENSION) prep->next_buf_row, - numrows); - /* Pad at top of image, if first time through */ - if (prep->rows_to_go == cinfo->image_height) { - for (ci = 0; ci < cinfo->num_components; ci++) { - int row; - for (row = 1; row <= cinfo->max_v_samp_factor; row++) { - jcopy_sample_rows(prep->color_buf[ci], 0, - prep->color_buf[ci], -row, - 1, cinfo->image_width); - } - } - } - *in_row_ctr += numrows; - prep->next_buf_row += numrows; - prep->rows_to_go -= numrows; - } else { - /* Return for more data, unless we are at the bottom of the image. */ - if (prep->rows_to_go != 0) - break; - /* When at bottom of image, pad to fill the conversion buffer. */ - if (prep->next_buf_row < prep->next_buf_stop) { - for (ci = 0; ci < cinfo->num_components; ci++) { - expand_bottom_edge(prep->color_buf[ci], cinfo->image_width, - prep->next_buf_row, prep->next_buf_stop); - } - prep->next_buf_row = prep->next_buf_stop; - } - } - /* If we've gotten enough data, downsample a row group. */ - if (prep->next_buf_row == prep->next_buf_stop) { - (*cinfo->downsample->downsample) (cinfo, - prep->color_buf, - (JDIMENSION) prep->this_row_group, - output_buf, *out_row_group_ctr); - (*out_row_group_ctr)++; - /* Advance pointers with wraparound as necessary. */ - prep->this_row_group += cinfo->max_v_samp_factor; - if (prep->this_row_group >= buf_height) - prep->this_row_group = 0; - if (prep->next_buf_row >= buf_height) - prep->next_buf_row = 0; - prep->next_buf_stop = prep->next_buf_row + cinfo->max_v_samp_factor; - } - } -} - - -/* - * Create the wrapped-around downsampling input buffer needed for context mode. - */ - -LOCAL(void) -create_context_buffer (j_compress_ptr cinfo) -{ - my_prep_ptr prep = (my_prep_ptr) cinfo->prep; - int rgroup_height = cinfo->max_v_samp_factor; - int ci, i; - jpeg_component_info * compptr; - JSAMPARRAY true_buffer, fake_buffer; - - /* Grab enough space for fake row pointers for all the components; - * we need five row groups' worth of pointers for each component. - */ - fake_buffer = (JSAMPARRAY) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - (cinfo->num_components * 5 * rgroup_height) * - SIZEOF(JSAMPROW)); - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Allocate the actual buffer space (3 row groups) for this component. - * We make the buffer wide enough to allow the downsampler to edge-expand - * horizontally within the buffer, if it so chooses. - */ - true_buffer = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (JDIMENSION) (((long) compptr->width_in_blocks * DCTSIZE * - cinfo->max_h_samp_factor) / compptr->h_samp_factor), - (JDIMENSION) (3 * rgroup_height)); - /* Copy true buffer row pointers into the middle of the fake row array */ - MEMCOPY(fake_buffer + rgroup_height, true_buffer, - 3 * rgroup_height * SIZEOF(JSAMPROW)); - /* Fill in the above and below wraparound pointers */ - for (i = 0; i < rgroup_height; i++) { - fake_buffer[i] = true_buffer[2 * rgroup_height + i]; - fake_buffer[4 * rgroup_height + i] = true_buffer[i]; - } - prep->color_buf[ci] = fake_buffer + rgroup_height; - fake_buffer += 5 * rgroup_height; /* point to space for next component */ - } -} - -#endif /* CONTEXT_ROWS_SUPPORTED */ - - -/* - * Initialize preprocessing controller. - */ - -GLOBAL(void) -jinit_c_prep_controller (j_compress_ptr cinfo, boolean need_full_buffer) -{ - my_prep_ptr prep; - int ci; - jpeg_component_info * compptr; - - if (need_full_buffer) /* safety check */ - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - - prep = (my_prep_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_prep_controller)); - cinfo->prep = (struct jpeg_c_prep_controller *) prep; - prep->pub.start_pass = start_pass_prep; - - /* Allocate the color conversion buffer. - * We make the buffer wide enough to allow the downsampler to edge-expand - * horizontally within the buffer, if it so chooses. - */ - if (cinfo->downsample->need_context_rows) { - /* Set up to provide context rows */ -#ifdef CONTEXT_ROWS_SUPPORTED - prep->pub.pre_process_data = pre_process_context; - create_context_buffer(cinfo); -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } else { - /* No context, just make it tall enough for one row group */ - prep->pub.pre_process_data = pre_process_data; - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - prep->color_buf[ci] = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (JDIMENSION) (((long) compptr->width_in_blocks * DCTSIZE * - cinfo->max_h_samp_factor) / compptr->h_samp_factor), - (JDIMENSION) cinfo->max_v_samp_factor); - } - } -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jcsample.c b/gtkmm-osx/trunk/jpeg-6b/jcsample.c deleted file mode 100644 index 212ec87..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jcsample.c +++ /dev/null @@ -1,519 +0,0 @@ -/* - * jcsample.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains downsampling routines. - * - * Downsampling input data is counted in "row groups". A row group - * is defined to be max_v_samp_factor pixel rows of each component, - * from which the downsampler produces v_samp_factor sample rows. - * A single row group is processed in each call to the downsampler module. - * - * The downsampler is responsible for edge-expansion of its output data - * to fill an integral number of DCT blocks horizontally. The source buffer - * may be modified if it is helpful for this purpose (the source buffer is - * allocated wide enough to correspond to the desired output width). - * The caller (the prep controller) is responsible for vertical padding. - * - * The downsampler may request "context rows" by setting need_context_rows - * during startup. In this case, the input arrays will contain at least - * one row group's worth of pixels above and below the passed-in data; - * the caller will create dummy rows at image top and bottom by replicating - * the first or last real pixel row. - * - * An excellent reference for image resampling is - * Digital Image Warping, George Wolberg, 1990. - * Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7. - * - * The downsampling algorithm used here is a simple average of the source - * pixels covered by the output pixel. The hi-falutin sampling literature - * refers to this as a "box filter". In general the characteristics of a box - * filter are not very good, but for the specific cases we normally use (1:1 - * and 2:1 ratios) the box is equivalent to a "triangle filter" which is not - * nearly so bad. If you intend to use other sampling ratios, you'd be well - * advised to improve this code. - * - * A simple input-smoothing capability is provided. This is mainly intended - * for cleaning up color-dithered GIF input files (if you find it inadequate, - * we suggest using an external filtering program such as pnmconvol). When - * enabled, each input pixel P is replaced by a weighted sum of itself and its - * eight neighbors. P's weight is 1-8*SF and each neighbor's weight is SF, - * where SF = (smoothing_factor / 1024). - * Currently, smoothing is only supported for 2h2v sampling factors. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Pointer to routine to downsample a single component */ -typedef JMETHOD(void, downsample1_ptr, - (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY output_data)); - -/* Private subobject */ - -typedef struct { - struct jpeg_downsampler pub; /* public fields */ - - /* Downsampling method pointers, one per component */ - downsample1_ptr methods[MAX_COMPONENTS]; -} my_downsampler; - -typedef my_downsampler * my_downsample_ptr; - - -/* - * Initialize for a downsampling pass. - */ - -METHODDEF(void) -start_pass_downsample (j_compress_ptr cinfo) -{ - /* no work for now */ -} - - -/* - * Expand a component horizontally from width input_cols to width output_cols, - * by duplicating the rightmost samples. - */ - -LOCAL(void) -expand_right_edge (JSAMPARRAY image_data, int num_rows, - JDIMENSION input_cols, JDIMENSION output_cols) -{ - register JSAMPROW ptr; - register JSAMPLE pixval; - register int count; - int row; - int numcols = (int) (output_cols - input_cols); - - if (numcols > 0) { - for (row = 0; row < num_rows; row++) { - ptr = image_data[row] + input_cols; - pixval = ptr[-1]; /* don't need GETJSAMPLE() here */ - for (count = numcols; count > 0; count--) - *ptr++ = pixval; - } - } -} - - -/* - * Do downsampling for a whole row group (all components). - * - * In this version we simply downsample each component independently. - */ - -METHODDEF(void) -sep_downsample (j_compress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION in_row_index, - JSAMPIMAGE output_buf, JDIMENSION out_row_group_index) -{ - my_downsample_ptr downsample = (my_downsample_ptr) cinfo->downsample; - int ci; - jpeg_component_info * compptr; - JSAMPARRAY in_ptr, out_ptr; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - in_ptr = input_buf[ci] + in_row_index; - out_ptr = output_buf[ci] + (out_row_group_index * compptr->v_samp_factor); - (*downsample->methods[ci]) (cinfo, compptr, in_ptr, out_ptr); - } -} - - -/* - * Downsample pixel values of a single component. - * One row group is processed per call. - * This version handles arbitrary integral sampling ratios, without smoothing. - * Note that this version is not actually used for customary sampling ratios. - */ - -METHODDEF(void) -int_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY output_data) -{ - int inrow, outrow, h_expand, v_expand, numpix, numpix2, h, v; - JDIMENSION outcol, outcol_h; /* outcol_h == outcol*h_expand */ - JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; - JSAMPROW inptr, outptr; - INT32 outvalue; - - h_expand = cinfo->max_h_samp_factor / compptr->h_samp_factor; - v_expand = cinfo->max_v_samp_factor / compptr->v_samp_factor; - numpix = h_expand * v_expand; - numpix2 = numpix/2; - - /* Expand input data enough to let all the output samples be generated - * by the standard loop. Special-casing padded output would be more - * efficient. - */ - expand_right_edge(input_data, cinfo->max_v_samp_factor, - cinfo->image_width, output_cols * h_expand); - - inrow = 0; - for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { - outptr = output_data[outrow]; - for (outcol = 0, outcol_h = 0; outcol < output_cols; - outcol++, outcol_h += h_expand) { - outvalue = 0; - for (v = 0; v < v_expand; v++) { - inptr = input_data[inrow+v] + outcol_h; - for (h = 0; h < h_expand; h++) { - outvalue += (INT32) GETJSAMPLE(*inptr++); - } - } - *outptr++ = (JSAMPLE) ((outvalue + numpix2) / numpix); - } - inrow += v_expand; - } -} - - -/* - * Downsample pixel values of a single component. - * This version handles the special case of a full-size component, - * without smoothing. - */ - -METHODDEF(void) -fullsize_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY output_data) -{ - /* Copy the data */ - jcopy_sample_rows(input_data, 0, output_data, 0, - cinfo->max_v_samp_factor, cinfo->image_width); - /* Edge-expand */ - expand_right_edge(output_data, cinfo->max_v_samp_factor, - cinfo->image_width, compptr->width_in_blocks * DCTSIZE); -} - - -/* - * Downsample pixel values of a single component. - * This version handles the common case of 2:1 horizontal and 1:1 vertical, - * without smoothing. - * - * A note about the "bias" calculations: when rounding fractional values to - * integer, we do not want to always round 0.5 up to the next integer. - * If we did that, we'd introduce a noticeable bias towards larger values. - * Instead, this code is arranged so that 0.5 will be rounded up or down at - * alternate pixel locations (a simple ordered dither pattern). - */ - -METHODDEF(void) -h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY output_data) -{ - int outrow; - JDIMENSION outcol; - JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; - register JSAMPROW inptr, outptr; - register int bias; - - /* Expand input data enough to let all the output samples be generated - * by the standard loop. Special-casing padded output would be more - * efficient. - */ - expand_right_edge(input_data, cinfo->max_v_samp_factor, - cinfo->image_width, output_cols * 2); - - for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { - outptr = output_data[outrow]; - inptr = input_data[outrow]; - bias = 0; /* bias = 0,1,0,1,... for successive samples */ - for (outcol = 0; outcol < output_cols; outcol++) { - *outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr) + GETJSAMPLE(inptr[1]) - + bias) >> 1); - bias ^= 1; /* 0=>1, 1=>0 */ - inptr += 2; - } - } -} - - -/* - * Downsample pixel values of a single component. - * This version handles the standard case of 2:1 horizontal and 2:1 vertical, - * without smoothing. - */ - -METHODDEF(void) -h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY output_data) -{ - int inrow, outrow; - JDIMENSION outcol; - JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; - register JSAMPROW inptr0, inptr1, outptr; - register int bias; - - /* Expand input data enough to let all the output samples be generated - * by the standard loop. Special-casing padded output would be more - * efficient. - */ - expand_right_edge(input_data, cinfo->max_v_samp_factor, - cinfo->image_width, output_cols * 2); - - inrow = 0; - for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { - outptr = output_data[outrow]; - inptr0 = input_data[inrow]; - inptr1 = input_data[inrow+1]; - bias = 1; /* bias = 1,2,1,2,... for successive samples */ - for (outcol = 0; outcol < output_cols; outcol++) { - *outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + - GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]) - + bias) >> 2); - bias ^= 3; /* 1=>2, 2=>1 */ - inptr0 += 2; inptr1 += 2; - } - inrow += 2; - } -} - - -#ifdef INPUT_SMOOTHING_SUPPORTED - -/* - * Downsample pixel values of a single component. - * This version handles the standard case of 2:1 horizontal and 2:1 vertical, - * with smoothing. One row of context is required. - */ - -METHODDEF(void) -h2v2_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY output_data) -{ - int inrow, outrow; - JDIMENSION colctr; - JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; - register JSAMPROW inptr0, inptr1, above_ptr, below_ptr, outptr; - INT32 membersum, neighsum, memberscale, neighscale; - - /* Expand input data enough to let all the output samples be generated - * by the standard loop. Special-casing padded output would be more - * efficient. - */ - expand_right_edge(input_data - 1, cinfo->max_v_samp_factor + 2, - cinfo->image_width, output_cols * 2); - - /* We don't bother to form the individual "smoothed" input pixel values; - * we can directly compute the output which is the average of the four - * smoothed values. Each of the four member pixels contributes a fraction - * (1-8*SF) to its own smoothed image and a fraction SF to each of the three - * other smoothed pixels, therefore a total fraction (1-5*SF)/4 to the final - * output. The four corner-adjacent neighbor pixels contribute a fraction - * SF to just one smoothed pixel, or SF/4 to the final output; while the - * eight edge-adjacent neighbors contribute SF to each of two smoothed - * pixels, or SF/2 overall. In order to use integer arithmetic, these - * factors are scaled by 2^16 = 65536. - * Also recall that SF = smoothing_factor / 1024. - */ - - memberscale = 16384 - cinfo->smoothing_factor * 80; /* scaled (1-5*SF)/4 */ - neighscale = cinfo->smoothing_factor * 16; /* scaled SF/4 */ - - inrow = 0; - for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { - outptr = output_data[outrow]; - inptr0 = input_data[inrow]; - inptr1 = input_data[inrow+1]; - above_ptr = input_data[inrow-1]; - below_ptr = input_data[inrow+2]; - - /* Special case for first column: pretend column -1 is same as column 0 */ - membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + - GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]); - neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) + - GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) + - GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[2]) + - GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[2]); - neighsum += neighsum; - neighsum += GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[2]) + - GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[2]); - membersum = membersum * memberscale + neighsum * neighscale; - *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); - inptr0 += 2; inptr1 += 2; above_ptr += 2; below_ptr += 2; - - for (colctr = output_cols - 2; colctr > 0; colctr--) { - /* sum of pixels directly mapped to this output element */ - membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + - GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]); - /* sum of edge-neighbor pixels */ - neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) + - GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) + - GETJSAMPLE(inptr0[-1]) + GETJSAMPLE(inptr0[2]) + - GETJSAMPLE(inptr1[-1]) + GETJSAMPLE(inptr1[2]); - /* The edge-neighbors count twice as much as corner-neighbors */ - neighsum += neighsum; - /* Add in the corner-neighbors */ - neighsum += GETJSAMPLE(above_ptr[-1]) + GETJSAMPLE(above_ptr[2]) + - GETJSAMPLE(below_ptr[-1]) + GETJSAMPLE(below_ptr[2]); - /* form final output scaled up by 2^16 */ - membersum = membersum * memberscale + neighsum * neighscale; - /* round, descale and output it */ - *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); - inptr0 += 2; inptr1 += 2; above_ptr += 2; below_ptr += 2; - } - - /* Special case for last column */ - membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + - GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]); - neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) + - GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) + - GETJSAMPLE(inptr0[-1]) + GETJSAMPLE(inptr0[1]) + - GETJSAMPLE(inptr1[-1]) + GETJSAMPLE(inptr1[1]); - neighsum += neighsum; - neighsum += GETJSAMPLE(above_ptr[-1]) + GETJSAMPLE(above_ptr[1]) + - GETJSAMPLE(below_ptr[-1]) + GETJSAMPLE(below_ptr[1]); - membersum = membersum * memberscale + neighsum * neighscale; - *outptr = (JSAMPLE) ((membersum + 32768) >> 16); - - inrow += 2; - } -} - - -/* - * Downsample pixel values of a single component. - * This version handles the special case of a full-size component, - * with smoothing. One row of context is required. - */ - -METHODDEF(void) -fullsize_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info *compptr, - JSAMPARRAY input_data, JSAMPARRAY output_data) -{ - int outrow; - JDIMENSION colctr; - JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; - register JSAMPROW inptr, above_ptr, below_ptr, outptr; - INT32 membersum, neighsum, memberscale, neighscale; - int colsum, lastcolsum, nextcolsum; - - /* Expand input data enough to let all the output samples be generated - * by the standard loop. Special-casing padded output would be more - * efficient. - */ - expand_right_edge(input_data - 1, cinfo->max_v_samp_factor + 2, - cinfo->image_width, output_cols); - - /* Each of the eight neighbor pixels contributes a fraction SF to the - * smoothed pixel, while the main pixel contributes (1-8*SF). In order - * to use integer arithmetic, these factors are multiplied by 2^16 = 65536. - * Also recall that SF = smoothing_factor / 1024. - */ - - memberscale = 65536L - cinfo->smoothing_factor * 512L; /* scaled 1-8*SF */ - neighscale = cinfo->smoothing_factor * 64; /* scaled SF */ - - for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { - outptr = output_data[outrow]; - inptr = input_data[outrow]; - above_ptr = input_data[outrow-1]; - below_ptr = input_data[outrow+1]; - - /* Special case for first column */ - colsum = GETJSAMPLE(*above_ptr++) + GETJSAMPLE(*below_ptr++) + - GETJSAMPLE(*inptr); - membersum = GETJSAMPLE(*inptr++); - nextcolsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(*below_ptr) + - GETJSAMPLE(*inptr); - neighsum = colsum + (colsum - membersum) + nextcolsum; - membersum = membersum * memberscale + neighsum * neighscale; - *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); - lastcolsum = colsum; colsum = nextcolsum; - - for (colctr = output_cols - 2; colctr > 0; colctr--) { - membersum = GETJSAMPLE(*inptr++); - above_ptr++; below_ptr++; - nextcolsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(*below_ptr) + - GETJSAMPLE(*inptr); - neighsum = lastcolsum + (colsum - membersum) + nextcolsum; - membersum = membersum * memberscale + neighsum * neighscale; - *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); - lastcolsum = colsum; colsum = nextcolsum; - } - - /* Special case for last column */ - membersum = GETJSAMPLE(*inptr); - neighsum = lastcolsum + (colsum - membersum) + colsum; - membersum = membersum * memberscale + neighsum * neighscale; - *outptr = (JSAMPLE) ((membersum + 32768) >> 16); - - } -} - -#endif /* INPUT_SMOOTHING_SUPPORTED */ - - -/* - * Module initialization routine for downsampling. - * Note that we must select a routine for each component. - */ - -GLOBAL(void) -jinit_downsampler (j_compress_ptr cinfo) -{ - my_downsample_ptr downsample; - int ci; - jpeg_component_info * compptr; - boolean smoothok = TRUE; - - downsample = (my_downsample_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_downsampler)); - cinfo->downsample = (struct jpeg_downsampler *) downsample; - downsample->pub.start_pass = start_pass_downsample; - downsample->pub.downsample = sep_downsample; - downsample->pub.need_context_rows = FALSE; - - if (cinfo->CCIR601_sampling) - ERREXIT(cinfo, JERR_CCIR601_NOTIMPL); - - /* Verify we can handle the sampling factors, and set up method pointers */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - if (compptr->h_samp_factor == cinfo->max_h_samp_factor && - compptr->v_samp_factor == cinfo->max_v_samp_factor) { -#ifdef INPUT_SMOOTHING_SUPPORTED - if (cinfo->smoothing_factor) { - downsample->methods[ci] = fullsize_smooth_downsample; - downsample->pub.need_context_rows = TRUE; - } else -#endif - downsample->methods[ci] = fullsize_downsample; - } else if (compptr->h_samp_factor * 2 == cinfo->max_h_samp_factor && - compptr->v_samp_factor == cinfo->max_v_samp_factor) { - smoothok = FALSE; - downsample->methods[ci] = h2v1_downsample; - } else if (compptr->h_samp_factor * 2 == cinfo->max_h_samp_factor && - compptr->v_samp_factor * 2 == cinfo->max_v_samp_factor) { -#ifdef INPUT_SMOOTHING_SUPPORTED - if (cinfo->smoothing_factor) { - downsample->methods[ci] = h2v2_smooth_downsample; - downsample->pub.need_context_rows = TRUE; - } else -#endif - downsample->methods[ci] = h2v2_downsample; - } else if ((cinfo->max_h_samp_factor % compptr->h_samp_factor) == 0 && - (cinfo->max_v_samp_factor % compptr->v_samp_factor) == 0) { - smoothok = FALSE; - downsample->methods[ci] = int_downsample; - } else - ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL); - } - -#ifdef INPUT_SMOOTHING_SUPPORTED - if (cinfo->smoothing_factor && !smoothok) - TRACEMS(cinfo, 0, JTRC_SMOOTH_NOTIMPL); -#endif -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jctrans.c b/gtkmm-osx/trunk/jpeg-6b/jctrans.c deleted file mode 100644 index 0e6d707..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jctrans.c +++ /dev/null @@ -1,388 +0,0 @@ -/* - * jctrans.c - * - * Copyright (C) 1995-1998, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains library routines for transcoding compression, - * that is, writing raw DCT coefficient arrays to an output JPEG file. - * The routines in jcapimin.c will also be needed by a transcoder. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Forward declarations */ -LOCAL(void) transencode_master_selection - JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)); -LOCAL(void) transencode_coef_controller - JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)); - - -/* - * Compression initialization for writing raw-coefficient data. - * Before calling this, all parameters and a data destination must be set up. - * Call jpeg_finish_compress() to actually write the data. - * - * The number of passed virtual arrays must match cinfo->num_components. - * Note that the virtual arrays need not be filled or even realized at - * the time write_coefficients is called; indeed, if the virtual arrays - * were requested from this compression object's memory manager, they - * typically will be realized during this routine and filled afterwards. - */ - -GLOBAL(void) -jpeg_write_coefficients (j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays) -{ - if (cinfo->global_state != CSTATE_START) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - /* Mark all tables to be written */ - jpeg_suppress_tables(cinfo, FALSE); - /* (Re)initialize error mgr and destination modules */ - (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); - (*cinfo->dest->init_destination) (cinfo); - /* Perform master selection of active modules */ - transencode_master_selection(cinfo, coef_arrays); - /* Wait for jpeg_finish_compress() call */ - cinfo->next_scanline = 0; /* so jpeg_write_marker works */ - cinfo->global_state = CSTATE_WRCOEFS; -} - - -/* - * Initialize the compression object with default parameters, - * then copy from the source object all parameters needed for lossless - * transcoding. Parameters that can be varied without loss (such as - * scan script and Huffman optimization) are left in their default states. - */ - -GLOBAL(void) -jpeg_copy_critical_parameters (j_decompress_ptr srcinfo, - j_compress_ptr dstinfo) -{ - JQUANT_TBL ** qtblptr; - jpeg_component_info *incomp, *outcomp; - JQUANT_TBL *c_quant, *slot_quant; - int tblno, ci, coefi; - - /* Safety check to ensure start_compress not called yet. */ - if (dstinfo->global_state != CSTATE_START) - ERREXIT1(dstinfo, JERR_BAD_STATE, dstinfo->global_state); - /* Copy fundamental image dimensions */ - dstinfo->image_width = srcinfo->image_width; - dstinfo->image_height = srcinfo->image_height; - dstinfo->input_components = srcinfo->num_components; - dstinfo->in_color_space = srcinfo->jpeg_color_space; - /* Initialize all parameters to default values */ - jpeg_set_defaults(dstinfo); - /* jpeg_set_defaults may choose wrong colorspace, eg YCbCr if input is RGB. - * Fix it to get the right header markers for the image colorspace. - */ - jpeg_set_colorspace(dstinfo, srcinfo->jpeg_color_space); - dstinfo->data_precision = srcinfo->data_precision; - dstinfo->CCIR601_sampling = srcinfo->CCIR601_sampling; - /* Copy the source's quantization tables. */ - for (tblno = 0; tblno < NUM_QUANT_TBLS; tblno++) { - if (srcinfo->quant_tbl_ptrs[tblno] != NULL) { - qtblptr = & dstinfo->quant_tbl_ptrs[tblno]; - if (*qtblptr == NULL) - *qtblptr = jpeg_alloc_quant_table((j_common_ptr) dstinfo); - MEMCOPY((*qtblptr)->quantval, - srcinfo->quant_tbl_ptrs[tblno]->quantval, - SIZEOF((*qtblptr)->quantval)); - (*qtblptr)->sent_table = FALSE; - } - } - /* Copy the source's per-component info. - * Note we assume jpeg_set_defaults has allocated the dest comp_info array. - */ - dstinfo->num_components = srcinfo->num_components; - if (dstinfo->num_components < 1 || dstinfo->num_components > MAX_COMPONENTS) - ERREXIT2(dstinfo, JERR_COMPONENT_COUNT, dstinfo->num_components, - MAX_COMPONENTS); - for (ci = 0, incomp = srcinfo->comp_info, outcomp = dstinfo->comp_info; - ci < dstinfo->num_components; ci++, incomp++, outcomp++) { - outcomp->component_id = incomp->component_id; - outcomp->h_samp_factor = incomp->h_samp_factor; - outcomp->v_samp_factor = incomp->v_samp_factor; - outcomp->quant_tbl_no = incomp->quant_tbl_no; - /* Make sure saved quantization table for component matches the qtable - * slot. If not, the input file re-used this qtable slot. - * IJG encoder currently cannot duplicate this. - */ - tblno = outcomp->quant_tbl_no; - if (tblno < 0 || tblno >= NUM_QUANT_TBLS || - srcinfo->quant_tbl_ptrs[tblno] == NULL) - ERREXIT1(dstinfo, JERR_NO_QUANT_TABLE, tblno); - slot_quant = srcinfo->quant_tbl_ptrs[tblno]; - c_quant = incomp->quant_table; - if (c_quant != NULL) { - for (coefi = 0; coefi < DCTSIZE2; coefi++) { - if (c_quant->quantval[coefi] != slot_quant->quantval[coefi]) - ERREXIT1(dstinfo, JERR_MISMATCHED_QUANT_TABLE, tblno); - } - } - /* Note: we do not copy the source's Huffman table assignments; - * instead we rely on jpeg_set_colorspace to have made a suitable choice. - */ - } - /* Also copy JFIF version and resolution information, if available. - * Strictly speaking this isn't "critical" info, but it's nearly - * always appropriate to copy it if available. In particular, - * if the application chooses to copy JFIF 1.02 extension markers from - * the source file, we need to copy the version to make sure we don't - * emit a file that has 1.02 extensions but a claimed version of 1.01. - * We will *not*, however, copy version info from mislabeled "2.01" files. - */ - if (srcinfo->saw_JFIF_marker) { - if (srcinfo->JFIF_major_version == 1) { - dstinfo->JFIF_major_version = srcinfo->JFIF_major_version; - dstinfo->JFIF_minor_version = srcinfo->JFIF_minor_version; - } - dstinfo->density_unit = srcinfo->density_unit; - dstinfo->X_density = srcinfo->X_density; - dstinfo->Y_density = srcinfo->Y_density; - } -} - - -/* - * Master selection of compression modules for transcoding. - * This substitutes for jcinit.c's initialization of the full compressor. - */ - -LOCAL(void) -transencode_master_selection (j_compress_ptr cinfo, - jvirt_barray_ptr * coef_arrays) -{ - /* Although we don't actually use input_components for transcoding, - * jcmaster.c's initial_setup will complain if input_components is 0. - */ - cinfo->input_components = 1; - /* Initialize master control (includes parameter checking/processing) */ - jinit_c_master_control(cinfo, TRUE /* transcode only */); - - /* Entropy encoding: either Huffman or arithmetic coding. */ - if (cinfo->arith_code) { - ERREXIT(cinfo, JERR_ARITH_NOTIMPL); - } else { - if (cinfo->progressive_mode) { -#ifdef C_PROGRESSIVE_SUPPORTED - jinit_phuff_encoder(cinfo); -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } else - jinit_huff_encoder(cinfo); - } - - /* We need a special coefficient buffer controller. */ - transencode_coef_controller(cinfo, coef_arrays); - - jinit_marker_writer(cinfo); - - /* We can now tell the memory manager to allocate virtual arrays. */ - (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); - - /* Write the datastream header (SOI, JFIF) immediately. - * Frame and scan headers are postponed till later. - * This lets application insert special markers after the SOI. - */ - (*cinfo->marker->write_file_header) (cinfo); -} - - -/* - * The rest of this file is a special implementation of the coefficient - * buffer controller. This is similar to jccoefct.c, but it handles only - * output from presupplied virtual arrays. Furthermore, we generate any - * dummy padding blocks on-the-fly rather than expecting them to be present - * in the arrays. - */ - -/* Private buffer controller object */ - -typedef struct { - struct jpeg_c_coef_controller pub; /* public fields */ - - JDIMENSION iMCU_row_num; /* iMCU row # within image */ - JDIMENSION mcu_ctr; /* counts MCUs processed in current row */ - int MCU_vert_offset; /* counts MCU rows within iMCU row */ - int MCU_rows_per_iMCU_row; /* number of such rows needed */ - - /* Virtual block array for each component. */ - jvirt_barray_ptr * whole_image; - - /* Workspace for constructing dummy blocks at right/bottom edges. */ - JBLOCKROW dummy_buffer[C_MAX_BLOCKS_IN_MCU]; -} my_coef_controller; - -typedef my_coef_controller * my_coef_ptr; - - -LOCAL(void) -start_iMCU_row (j_compress_ptr cinfo) -/* Reset within-iMCU-row counters for a new row */ -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - - /* In an interleaved scan, an MCU row is the same as an iMCU row. - * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows. - * But at the bottom of the image, process only what's left. - */ - if (cinfo->comps_in_scan > 1) { - coef->MCU_rows_per_iMCU_row = 1; - } else { - if (coef->iMCU_row_num < (cinfo->total_iMCU_rows-1)) - coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor; - else - coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height; - } - - coef->mcu_ctr = 0; - coef->MCU_vert_offset = 0; -} - - -/* - * Initialize for a processing pass. - */ - -METHODDEF(void) -start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - - if (pass_mode != JBUF_CRANK_DEST) - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - - coef->iMCU_row_num = 0; - start_iMCU_row(cinfo); -} - - -/* - * Process some data. - * We process the equivalent of one fully interleaved MCU row ("iMCU" row) - * per call, ie, v_samp_factor block rows for each component in the scan. - * The data is obtained from the virtual arrays and fed to the entropy coder. - * Returns TRUE if the iMCU row is completed, FALSE if suspended. - * - * NB: input_buf is ignored; it is likely to be a NULL pointer. - */ - -METHODDEF(boolean) -compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - JDIMENSION MCU_col_num; /* index of current MCU within row */ - JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; - JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; - int blkn, ci, xindex, yindex, yoffset, blockcnt; - JDIMENSION start_col; - JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN]; - JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU]; - JBLOCKROW buffer_ptr; - jpeg_component_info *compptr; - - /* Align the virtual buffers for the components used in this scan. */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - buffer[ci] = (*cinfo->mem->access_virt_barray) - ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index], - coef->iMCU_row_num * compptr->v_samp_factor, - (JDIMENSION) compptr->v_samp_factor, FALSE); - } - - /* Loop to process one whole iMCU row */ - for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; - yoffset++) { - for (MCU_col_num = coef->mcu_ctr; MCU_col_num < cinfo->MCUs_per_row; - MCU_col_num++) { - /* Construct list of pointers to DCT blocks belonging to this MCU */ - blkn = 0; /* index of current DCT block within MCU */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - start_col = MCU_col_num * compptr->MCU_width; - blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width - : compptr->last_col_width; - for (yindex = 0; yindex < compptr->MCU_height; yindex++) { - if (coef->iMCU_row_num < last_iMCU_row || - yindex+yoffset < compptr->last_row_height) { - /* Fill in pointers to real blocks in this row */ - buffer_ptr = buffer[ci][yindex+yoffset] + start_col; - for (xindex = 0; xindex < blockcnt; xindex++) - MCU_buffer[blkn++] = buffer_ptr++; - } else { - /* At bottom of image, need a whole row of dummy blocks */ - xindex = 0; - } - /* Fill in any dummy blocks needed in this row. - * Dummy blocks are filled in the same way as in jccoefct.c: - * all zeroes in the AC entries, DC entries equal to previous - * block's DC value. The init routine has already zeroed the - * AC entries, so we need only set the DC entries correctly. - */ - for (; xindex < compptr->MCU_width; xindex++) { - MCU_buffer[blkn] = coef->dummy_buffer[blkn]; - MCU_buffer[blkn][0][0] = MCU_buffer[blkn-1][0][0]; - blkn++; - } - } - } - /* Try to write the MCU. */ - if (! (*cinfo->entropy->encode_mcu) (cinfo, MCU_buffer)) { - /* Suspension forced; update state counters and exit */ - coef->MCU_vert_offset = yoffset; - coef->mcu_ctr = MCU_col_num; - return FALSE; - } - } - /* Completed an MCU row, but perhaps not an iMCU row */ - coef->mcu_ctr = 0; - } - /* Completed the iMCU row, advance counters for next one */ - coef->iMCU_row_num++; - start_iMCU_row(cinfo); - return TRUE; -} - - -/* - * Initialize coefficient buffer controller. - * - * Each passed coefficient array must be the right size for that - * coefficient: width_in_blocks wide and height_in_blocks high, - * with unitheight at least v_samp_factor. - */ - -LOCAL(void) -transencode_coef_controller (j_compress_ptr cinfo, - jvirt_barray_ptr * coef_arrays) -{ - my_coef_ptr coef; - JBLOCKROW buffer; - int i; - - coef = (my_coef_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_coef_controller)); - cinfo->coef = (struct jpeg_c_coef_controller *) coef; - coef->pub.start_pass = start_pass_coef; - coef->pub.compress_data = compress_output; - - /* Save pointer to virtual arrays */ - coef->whole_image = coef_arrays; - - /* Allocate and pre-zero space for dummy DCT blocks. */ - buffer = (JBLOCKROW) - (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, - C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); - jzero_far((void FAR *) buffer, C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); - for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) { - coef->dummy_buffer[i] = buffer + i; - } -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jdapimin.c b/gtkmm-osx/trunk/jpeg-6b/jdapimin.c deleted file mode 100644 index cadb59f..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jdapimin.c +++ /dev/null @@ -1,395 +0,0 @@ -/* - * jdapimin.c - * - * Copyright (C) 1994-1998, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains application interface code for the decompression half - * of the JPEG library. These are the "minimum" API routines that may be - * needed in either the normal full-decompression case or the - * transcoding-only case. - * - * Most of the routines intended to be called directly by an application - * are in this file or in jdapistd.c. But also see jcomapi.c for routines - * shared by compression and decompression, and jdtrans.c for the transcoding - * case. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* - * Initialization of a JPEG decompression object. - * The error manager must already be set up (in case memory manager fails). - */ - -GLOBAL(void) -jpeg_CreateDecompress (j_decompress_ptr cinfo, int version, size_t structsize) -{ - int i; - - /* Guard against version mismatches between library and caller. */ - cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */ - if (version != JPEG_LIB_VERSION) - ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version); - if (structsize != SIZEOF(struct jpeg_decompress_struct)) - ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, - (int) SIZEOF(struct jpeg_decompress_struct), (int) structsize); - - /* For debugging purposes, we zero the whole master structure. - * But the application has already set the err pointer, and may have set - * client_data, so we have to save and restore those fields. - * Note: if application hasn't set client_data, tools like Purify may - * complain here. - */ - { - struct jpeg_error_mgr * err = cinfo->err; - void * client_data = cinfo->client_data; /* ignore Purify complaint here */ - MEMZERO(cinfo, SIZEOF(struct jpeg_decompress_struct)); - cinfo->err = err; - cinfo->client_data = client_data; - } - cinfo->is_decompressor = TRUE; - - /* Initialize a memory manager instance for this object */ - jinit_memory_mgr((j_common_ptr) cinfo); - - /* Zero out pointers to permanent structures. */ - cinfo->progress = NULL; - cinfo->src = NULL; - - for (i = 0; i < NUM_QUANT_TBLS; i++) - cinfo->quant_tbl_ptrs[i] = NULL; - - for (i = 0; i < NUM_HUFF_TBLS; i++) { - cinfo->dc_huff_tbl_ptrs[i] = NULL; - cinfo->ac_huff_tbl_ptrs[i] = NULL; - } - - /* Initialize marker processor so application can override methods - * for COM, APPn markers before calling jpeg_read_header. - */ - cinfo->marker_list = NULL; - jinit_marker_reader(cinfo); - - /* And initialize the overall input controller. */ - jinit_input_controller(cinfo); - - /* OK, I'm ready */ - cinfo->global_state = DSTATE_START; -} - - -/* - * Destruction of a JPEG decompression object - */ - -GLOBAL(void) -jpeg_destroy_decompress (j_decompress_ptr cinfo) -{ - jpeg_destroy((j_common_ptr) cinfo); /* use common routine */ -} - - -/* - * Abort processing of a JPEG decompression operation, - * but don't destroy the object itself. - */ - -GLOBAL(void) -jpeg_abort_decompress (j_decompress_ptr cinfo) -{ - jpeg_abort((j_common_ptr) cinfo); /* use common routine */ -} - - -/* - * Set default decompression parameters. - */ - -LOCAL(void) -default_decompress_parms (j_decompress_ptr cinfo) -{ - /* Guess the input colorspace, and set output colorspace accordingly. */ - /* (Wish JPEG committee had provided a real way to specify this...) */ - /* Note application may override our guesses. */ - switch (cinfo->num_components) { - case 1: - cinfo->jpeg_color_space = JCS_GRAYSCALE; - cinfo->out_color_space = JCS_GRAYSCALE; - break; - - case 3: - if (cinfo->saw_JFIF_marker) { - cinfo->jpeg_color_space = JCS_YCbCr; /* JFIF implies YCbCr */ - } else if (cinfo->saw_Adobe_marker) { - switch (cinfo->Adobe_transform) { - case 0: - cinfo->jpeg_color_space = JCS_RGB; - break; - case 1: - cinfo->jpeg_color_space = JCS_YCbCr; - break; - default: - WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform); - cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */ - break; - } - } else { - /* Saw no special markers, try to guess from the component IDs */ - int cid0 = cinfo->comp_info[0].component_id; - int cid1 = cinfo->comp_info[1].component_id; - int cid2 = cinfo->comp_info[2].component_id; - - if (cid0 == 1 && cid1 == 2 && cid2 == 3) - cinfo->jpeg_color_space = JCS_YCbCr; /* assume JFIF w/out marker */ - else if (cid0 == 82 && cid1 == 71 && cid2 == 66) - cinfo->jpeg_color_space = JCS_RGB; /* ASCII 'R', 'G', 'B' */ - else { - TRACEMS3(cinfo, 1, JTRC_UNKNOWN_IDS, cid0, cid1, cid2); - cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */ - } - } - /* Always guess RGB is proper output colorspace. */ - cinfo->out_color_space = JCS_RGB; - break; - - case 4: - if (cinfo->saw_Adobe_marker) { - switch (cinfo->Adobe_transform) { - case 0: - cinfo->jpeg_color_space = JCS_CMYK; - break; - case 2: - cinfo->jpeg_color_space = JCS_YCCK; - break; - default: - WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform); - cinfo->jpeg_color_space = JCS_YCCK; /* assume it's YCCK */ - break; - } - } else { - /* No special markers, assume straight CMYK. */ - cinfo->jpeg_color_space = JCS_CMYK; - } - cinfo->out_color_space = JCS_CMYK; - break; - - default: - cinfo->jpeg_color_space = JCS_UNKNOWN; - cinfo->out_color_space = JCS_UNKNOWN; - break; - } - - /* Set defaults for other decompression parameters. */ - cinfo->scale_num = 1; /* 1:1 scaling */ - cinfo->scale_denom = 1; - cinfo->output_gamma = 1.0; - cinfo->buffered_image = FALSE; - cinfo->raw_data_out = FALSE; - cinfo->dct_method = JDCT_DEFAULT; - cinfo->do_fancy_upsampling = TRUE; - cinfo->do_block_smoothing = TRUE; - cinfo->quantize_colors = FALSE; - /* We set these in case application only sets quantize_colors. */ - cinfo->dither_mode = JDITHER_FS; -#ifdef QUANT_2PASS_SUPPORTED - cinfo->two_pass_quantize = TRUE; -#else - cinfo->two_pass_quantize = FALSE; -#endif - cinfo->desired_number_of_colors = 256; - cinfo->colormap = NULL; - /* Initialize for no mode change in buffered-image mode. */ - cinfo->enable_1pass_quant = FALSE; - cinfo->enable_external_quant = FALSE; - cinfo->enable_2pass_quant = FALSE; -} - - -/* - * Decompression startup: read start of JPEG datastream to see what's there. - * Need only initialize JPEG object and supply a data source before calling. - * - * This routine will read as far as the first SOS marker (ie, actual start of - * compressed data), and will save all tables and parameters in the JPEG - * object. It will also initialize the decompression parameters to default - * values, and finally return JPEG_HEADER_OK. On return, the application may - * adjust the decompression parameters and then call jpeg_start_decompress. - * (Or, if the application only wanted to determine the image parameters, - * the data need not be decompressed. In that case, call jpeg_abort or - * jpeg_destroy to release any temporary space.) - * If an abbreviated (tables only) datastream is presented, the routine will - * return JPEG_HEADER_TABLES_ONLY upon reaching EOI. The application may then - * re-use the JPEG object to read the abbreviated image datastream(s). - * It is unnecessary (but OK) to call jpeg_abort in this case. - * The JPEG_SUSPENDED return code only occurs if the data source module - * requests suspension of the decompressor. In this case the application - * should load more source data and then re-call jpeg_read_header to resume - * processing. - * If a non-suspending data source is used and require_image is TRUE, then the - * return code need not be inspected since only JPEG_HEADER_OK is possible. - * - * This routine is now just a front end to jpeg_consume_input, with some - * extra error checking. - */ - -GLOBAL(int) -jpeg_read_header (j_decompress_ptr cinfo, boolean require_image) -{ - int retcode; - - if (cinfo->global_state != DSTATE_START && - cinfo->global_state != DSTATE_INHEADER) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - retcode = jpeg_consume_input(cinfo); - - switch (retcode) { - case JPEG_REACHED_SOS: - retcode = JPEG_HEADER_OK; - break; - case JPEG_REACHED_EOI: - if (require_image) /* Complain if application wanted an image */ - ERREXIT(cinfo, JERR_NO_IMAGE); - /* Reset to start state; it would be safer to require the application to - * call jpeg_abort, but we can't change it now for compatibility reasons. - * A side effect is to free any temporary memory (there shouldn't be any). - */ - jpeg_abort((j_common_ptr) cinfo); /* sets state = DSTATE_START */ - retcode = JPEG_HEADER_TABLES_ONLY; - break; - case JPEG_SUSPENDED: - /* no work */ - break; - } - - return retcode; -} - - -/* - * Consume data in advance of what the decompressor requires. - * This can be called at any time once the decompressor object has - * been created and a data source has been set up. - * - * This routine is essentially a state machine that handles a couple - * of critical state-transition actions, namely initial setup and - * transition from header scanning to ready-for-start_decompress. - * All the actual input is done via the input controller's consume_input - * method. - */ - -GLOBAL(int) -jpeg_consume_input (j_decompress_ptr cinfo) -{ - int retcode = JPEG_SUSPENDED; - - /* NB: every possible DSTATE value should be listed in this switch */ - switch (cinfo->global_state) { - case DSTATE_START: - /* Start-of-datastream actions: reset appropriate modules */ - (*cinfo->inputctl->reset_input_controller) (cinfo); - /* Initialize application's data source module */ - (*cinfo->src->init_source) (cinfo); - cinfo->global_state = DSTATE_INHEADER; - /*FALLTHROUGH*/ - case DSTATE_INHEADER: - retcode = (*cinfo->inputctl->consume_input) (cinfo); - if (retcode == JPEG_REACHED_SOS) { /* Found SOS, prepare to decompress */ - /* Set up default parameters based on header data */ - default_decompress_parms(cinfo); - /* Set global state: ready for start_decompress */ - cinfo->global_state = DSTATE_READY; - } - break; - case DSTATE_READY: - /* Can't advance past first SOS until start_decompress is called */ - retcode = JPEG_REACHED_SOS; - break; - case DSTATE_PRELOAD: - case DSTATE_PRESCAN: - case DSTATE_SCANNING: - case DSTATE_RAW_OK: - case DSTATE_BUFIMAGE: - case DSTATE_BUFPOST: - case DSTATE_STOPPING: - retcode = (*cinfo->inputctl->consume_input) (cinfo); - break; - default: - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - } - return retcode; -} - - -/* - * Have we finished reading the input file? - */ - -GLOBAL(boolean) -jpeg_input_complete (j_decompress_ptr cinfo) -{ - /* Check for valid jpeg object */ - if (cinfo->global_state < DSTATE_START || - cinfo->global_state > DSTATE_STOPPING) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - return cinfo->inputctl->eoi_reached; -} - - -/* - * Is there more than one scan? - */ - -GLOBAL(boolean) -jpeg_has_multiple_scans (j_decompress_ptr cinfo) -{ - /* Only valid after jpeg_read_header completes */ - if (cinfo->global_state < DSTATE_READY || - cinfo->global_state > DSTATE_STOPPING) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - return cinfo->inputctl->has_multiple_scans; -} - - -/* - * Finish JPEG decompression. - * - * This will normally just verify the file trailer and release temp storage. - * - * Returns FALSE if suspended. The return value need be inspected only if - * a suspending data source is used. - */ - -GLOBAL(boolean) -jpeg_finish_decompress (j_decompress_ptr cinfo) -{ - if ((cinfo->global_state == DSTATE_SCANNING || - cinfo->global_state == DSTATE_RAW_OK) && ! cinfo->buffered_image) { - /* Terminate final pass of non-buffered mode */ - if (cinfo->output_scanline < cinfo->output_height) - ERREXIT(cinfo, JERR_TOO_LITTLE_DATA); - (*cinfo->master->finish_output_pass) (cinfo); - cinfo->global_state = DSTATE_STOPPING; - } else if (cinfo->global_state == DSTATE_BUFIMAGE) { - /* Finishing after a buffered-image operation */ - cinfo->global_state = DSTATE_STOPPING; - } else if (cinfo->global_state != DSTATE_STOPPING) { - /* STOPPING = repeat call after a suspension, anything else is error */ - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - } - /* Read until EOI */ - while (! cinfo->inputctl->eoi_reached) { - if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED) - return FALSE; /* Suspend, come back later */ - } - /* Do final cleanup */ - (*cinfo->src->term_source) (cinfo); - /* We can use jpeg_abort to release memory and reset global_state */ - jpeg_abort((j_common_ptr) cinfo); - return TRUE; -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jdapistd.c b/gtkmm-osx/trunk/jpeg-6b/jdapistd.c deleted file mode 100644 index c8e3fa0..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jdapistd.c +++ /dev/null @@ -1,275 +0,0 @@ -/* - * jdapistd.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains application interface code for the decompression half - * of the JPEG library. These are the "standard" API routines that are - * used in the normal full-decompression case. They are not used by a - * transcoding-only application. Note that if an application links in - * jpeg_start_decompress, it will end up linking in the entire decompressor. - * We thus must separate this file from jdapimin.c to avoid linking the - * whole decompression library into a transcoder. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Forward declarations */ -LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo)); - - -/* - * Decompression initialization. - * jpeg_read_header must be completed before calling this. - * - * If a multipass operating mode was selected, this will do all but the - * last pass, and thus may take a great deal of time. - * - * Returns FALSE if suspended. The return value need be inspected only if - * a suspending data source is used. - */ - -GLOBAL(boolean) -jpeg_start_decompress (j_decompress_ptr cinfo) -{ - if (cinfo->global_state == DSTATE_READY) { - /* First call: initialize master control, select active modules */ - jinit_master_decompress(cinfo); - if (cinfo->buffered_image) { - /* No more work here; expecting jpeg_start_output next */ - cinfo->global_state = DSTATE_BUFIMAGE; - return TRUE; - } - cinfo->global_state = DSTATE_PRELOAD; - } - if (cinfo->global_state == DSTATE_PRELOAD) { - /* If file has multiple scans, absorb them all into the coef buffer */ - if (cinfo->inputctl->has_multiple_scans) { -#ifdef D_MULTISCAN_FILES_SUPPORTED - for (;;) { - int retcode; - /* Call progress monitor hook if present */ - if (cinfo->progress != NULL) - (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); - /* Absorb some more input */ - retcode = (*cinfo->inputctl->consume_input) (cinfo); - if (retcode == JPEG_SUSPENDED) - return FALSE; - if (retcode == JPEG_REACHED_EOI) - break; - /* Advance progress counter if appropriate */ - if (cinfo->progress != NULL && - (retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) { - if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) { - /* jdmaster underestimated number of scans; ratchet up one scan */ - cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows; - } - } - } -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif /* D_MULTISCAN_FILES_SUPPORTED */ - } - cinfo->output_scan_number = cinfo->input_scan_number; - } else if (cinfo->global_state != DSTATE_PRESCAN) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - /* Perform any dummy output passes, and set up for the final pass */ - return output_pass_setup(cinfo); -} - - -/* - * Set up for an output pass, and perform any dummy pass(es) needed. - * Common subroutine for jpeg_start_decompress and jpeg_start_output. - * Entry: global_state = DSTATE_PRESCAN only if previously suspended. - * Exit: If done, returns TRUE and sets global_state for proper output mode. - * If suspended, returns FALSE and sets global_state = DSTATE_PRESCAN. - */ - -LOCAL(boolean) -output_pass_setup (j_decompress_ptr cinfo) -{ - if (cinfo->global_state != DSTATE_PRESCAN) { - /* First call: do pass setup */ - (*cinfo->master->prepare_for_output_pass) (cinfo); - cinfo->output_scanline = 0; - cinfo->global_state = DSTATE_PRESCAN; - } - /* Loop over any required dummy passes */ - while (cinfo->master->is_dummy_pass) { -#ifdef QUANT_2PASS_SUPPORTED - /* Crank through the dummy pass */ - while (cinfo->output_scanline < cinfo->output_height) { - JDIMENSION last_scanline; - /* Call progress monitor hook if present */ - if (cinfo->progress != NULL) { - cinfo->progress->pass_counter = (long) cinfo->output_scanline; - cinfo->progress->pass_limit = (long) cinfo->output_height; - (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); - } - /* Process some data */ - last_scanline = cinfo->output_scanline; - (*cinfo->main->process_data) (cinfo, (JSAMPARRAY) NULL, - &cinfo->output_scanline, (JDIMENSION) 0); - if (cinfo->output_scanline == last_scanline) - return FALSE; /* No progress made, must suspend */ - } - /* Finish up dummy pass, and set up for another one */ - (*cinfo->master->finish_output_pass) (cinfo); - (*cinfo->master->prepare_for_output_pass) (cinfo); - cinfo->output_scanline = 0; -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif /* QUANT_2PASS_SUPPORTED */ - } - /* Ready for application to drive output pass through - * jpeg_read_scanlines or jpeg_read_raw_data. - */ - cinfo->global_state = cinfo->raw_data_out ? DSTATE_RAW_OK : DSTATE_SCANNING; - return TRUE; -} - - -/* - * Read some scanlines of data from the JPEG decompressor. - * - * The return value will be the number of lines actually read. - * This may be less than the number requested in several cases, - * including bottom of image, data source suspension, and operating - * modes that emit multiple scanlines at a time. - * - * Note: we warn about excess calls to jpeg_read_scanlines() since - * this likely signals an application programmer error. However, - * an oversize buffer (max_lines > scanlines remaining) is not an error. - */ - -GLOBAL(JDIMENSION) -jpeg_read_scanlines (j_decompress_ptr cinfo, JSAMPARRAY scanlines, - JDIMENSION max_lines) -{ - JDIMENSION row_ctr; - - if (cinfo->global_state != DSTATE_SCANNING) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - if (cinfo->output_scanline >= cinfo->output_height) { - WARNMS(cinfo, JWRN_TOO_MUCH_DATA); - return 0; - } - - /* Call progress monitor hook if present */ - if (cinfo->progress != NULL) { - cinfo->progress->pass_counter = (long) cinfo->output_scanline; - cinfo->progress->pass_limit = (long) cinfo->output_height; - (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); - } - - /* Process some data */ - row_ctr = 0; - (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, max_lines); - cinfo->output_scanline += row_ctr; - return row_ctr; -} - - -/* - * Alternate entry point to read raw data. - * Processes exactly one iMCU row per call, unless suspended. - */ - -GLOBAL(JDIMENSION) -jpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data, - JDIMENSION max_lines) -{ - JDIMENSION lines_per_iMCU_row; - - if (cinfo->global_state != DSTATE_RAW_OK) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - if (cinfo->output_scanline >= cinfo->output_height) { - WARNMS(cinfo, JWRN_TOO_MUCH_DATA); - return 0; - } - - /* Call progress monitor hook if present */ - if (cinfo->progress != NULL) { - cinfo->progress->pass_counter = (long) cinfo->output_scanline; - cinfo->progress->pass_limit = (long) cinfo->output_height; - (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); - } - - /* Verify that at least one iMCU row can be returned. */ - lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size; - if (max_lines < lines_per_iMCU_row) - ERREXIT(cinfo, JERR_BUFFER_SIZE); - - /* Decompress directly into user's buffer. */ - if (! (*cinfo->coef->decompress_data) (cinfo, data)) - return 0; /* suspension forced, can do nothing more */ - - /* OK, we processed one iMCU row. */ - cinfo->output_scanline += lines_per_iMCU_row; - return lines_per_iMCU_row; -} - - -/* Additional entry points for buffered-image mode. */ - -#ifdef D_MULTISCAN_FILES_SUPPORTED - -/* - * Initialize for an output pass in buffered-image mode. - */ - -GLOBAL(boolean) -jpeg_start_output (j_decompress_ptr cinfo, int scan_number) -{ - if (cinfo->global_state != DSTATE_BUFIMAGE && - cinfo->global_state != DSTATE_PRESCAN) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - /* Limit scan number to valid range */ - if (scan_number <= 0) - scan_number = 1; - if (cinfo->inputctl->eoi_reached && - scan_number > cinfo->input_scan_number) - scan_number = cinfo->input_scan_number; - cinfo->output_scan_number = scan_number; - /* Perform any dummy output passes, and set up for the real pass */ - return output_pass_setup(cinfo); -} - - -/* - * Finish up after an output pass in buffered-image mode. - * - * Returns FALSE if suspended. The return value need be inspected only if - * a suspending data source is used. - */ - -GLOBAL(boolean) -jpeg_finish_output (j_decompress_ptr cinfo) -{ - if ((cinfo->global_state == DSTATE_SCANNING || - cinfo->global_state == DSTATE_RAW_OK) && cinfo->buffered_image) { - /* Terminate this pass. */ - /* We do not require the whole pass to have been completed. */ - (*cinfo->master->finish_output_pass) (cinfo); - cinfo->global_state = DSTATE_BUFPOST; - } else if (cinfo->global_state != DSTATE_BUFPOST) { - /* BUFPOST = repeat call after a suspension, anything else is error */ - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - } - /* Read markers looking for SOS or EOI */ - while (cinfo->input_scan_number <= cinfo->output_scan_number && - ! cinfo->inputctl->eoi_reached) { - if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED) - return FALSE; /* Suspend, come back later */ - } - cinfo->global_state = DSTATE_BUFIMAGE; - return TRUE; -} - -#endif /* D_MULTISCAN_FILES_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jdatadst.c b/gtkmm-osx/trunk/jpeg-6b/jdatadst.c deleted file mode 100644 index a8f6fb0..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jdatadst.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - * jdatadst.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains compression data destination routines for the case of - * emitting JPEG data to a file (or any stdio stream). While these routines - * are sufficient for most applications, some will want to use a different - * destination manager. - * IMPORTANT: we assume that fwrite() will correctly transcribe an array of - * JOCTETs into 8-bit-wide elements on external storage. If char is wider - * than 8 bits on your machine, you may need to do some tweaking. - */ - -/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ -#include "jinclude.h" -#include "jpeglib.h" -#include "jerror.h" - - -/* Expanded data destination object for stdio output */ - -typedef struct { - struct jpeg_destination_mgr pub; /* public fields */ - - FILE * outfile; /* target stream */ - JOCTET * buffer; /* start of buffer */ -} my_destination_mgr; - -typedef my_destination_mgr * my_dest_ptr; - -#define OUTPUT_BUF_SIZE 4096 /* choose an efficiently fwrite'able size */ - - -/* - * Initialize destination --- called by jpeg_start_compress - * before any data is actually written. - */ - -METHODDEF(void) -init_destination (j_compress_ptr cinfo) -{ - my_dest_ptr dest = (my_dest_ptr) cinfo->dest; - - /* Allocate the output buffer --- it will be released when done with image */ - dest->buffer = (JOCTET *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - OUTPUT_BUF_SIZE * SIZEOF(JOCTET)); - - dest->pub.next_output_byte = dest->buffer; - dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; -} - - -/* - * Empty the output buffer --- called whenever buffer fills up. - * - * In typical applications, this should write the entire output buffer - * (ignoring the current state of next_output_byte & free_in_buffer), - * reset the pointer & count to the start of the buffer, and return TRUE - * indicating that the buffer has been dumped. - * - * In applications that need to be able to suspend compression due to output - * overrun, a FALSE return indicates that the buffer cannot be emptied now. - * In this situation, the compressor will return to its caller (possibly with - * an indication that it has not accepted all the supplied scanlines). The - * application should resume compression after it has made more room in the - * output buffer. Note that there are substantial restrictions on the use of - * suspension --- see the documentation. - * - * When suspending, the compressor will back up to a convenient restart point - * (typically the start of the current MCU). next_output_byte & free_in_buffer - * indicate where the restart point will be if the current call returns FALSE. - * Data beyond this point will be regenerated after resumption, so do not - * write it out when emptying the buffer externally. - */ - -METHODDEF(boolean) -empty_output_buffer (j_compress_ptr cinfo) -{ - my_dest_ptr dest = (my_dest_ptr) cinfo->dest; - - if (JFWRITE(dest->outfile, dest->buffer, OUTPUT_BUF_SIZE) != - (size_t) OUTPUT_BUF_SIZE) - ERREXIT(cinfo, JERR_FILE_WRITE); - - dest->pub.next_output_byte = dest->buffer; - dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; - - return TRUE; -} - - -/* - * Terminate destination --- called by jpeg_finish_compress - * after all data has been written. Usually needs to flush buffer. - * - * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding - * application must deal with any cleanup that should happen even - * for error exit. - */ - -METHODDEF(void) -term_destination (j_compress_ptr cinfo) -{ - my_dest_ptr dest = (my_dest_ptr) cinfo->dest; - size_t datacount = OUTPUT_BUF_SIZE - dest->pub.free_in_buffer; - - /* Write any data remaining in the buffer */ - if (datacount > 0) { - if (JFWRITE(dest->outfile, dest->buffer, datacount) != datacount) - ERREXIT(cinfo, JERR_FILE_WRITE); - } - fflush(dest->outfile); - /* Make sure we wrote the output file OK */ - if (ferror(dest->outfile)) - ERREXIT(cinfo, JERR_FILE_WRITE); -} - - -/* - * Prepare for output to a stdio stream. - * The caller must have already opened the stream, and is responsible - * for closing it after finishing compression. - */ - -GLOBAL(void) -jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile) -{ - my_dest_ptr dest; - - /* The destination object is made permanent so that multiple JPEG images - * can be written to the same file without re-executing jpeg_stdio_dest. - * This makes it dangerous to use this manager and a different destination - * manager serially with the same JPEG object, because their private object - * sizes may be different. Caveat programmer. - */ - if (cinfo->dest == NULL) { /* first time for this JPEG object? */ - cinfo->dest = (struct jpeg_destination_mgr *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - SIZEOF(my_destination_mgr)); - } - - dest = (my_dest_ptr) cinfo->dest; - dest->pub.init_destination = init_destination; - dest->pub.empty_output_buffer = empty_output_buffer; - dest->pub.term_destination = term_destination; - dest->outfile = outfile; -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jdatasrc.c b/gtkmm-osx/trunk/jpeg-6b/jdatasrc.c deleted file mode 100644 index edc752b..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jdatasrc.c +++ /dev/null @@ -1,212 +0,0 @@ -/* - * jdatasrc.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains decompression data source routines for the case of - * reading JPEG data from a file (or any stdio stream). While these routines - * are sufficient for most applications, some will want to use a different - * source manager. - * IMPORTANT: we assume that fread() will correctly transcribe an array of - * JOCTETs from 8-bit-wide elements on external storage. If char is wider - * than 8 bits on your machine, you may need to do some tweaking. - */ - -/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ -#include "jinclude.h" -#include "jpeglib.h" -#include "jerror.h" - - -/* Expanded data source object for stdio input */ - -typedef struct { - struct jpeg_source_mgr pub; /* public fields */ - - FILE * infile; /* source stream */ - JOCTET * buffer; /* start of buffer */ - boolean start_of_file; /* have we gotten any data yet? */ -} my_source_mgr; - -typedef my_source_mgr * my_src_ptr; - -#define INPUT_BUF_SIZE 4096 /* choose an efficiently fread'able size */ - - -/* - * Initialize source --- called by jpeg_read_header - * before any data is actually read. - */ - -METHODDEF(void) -init_source (j_decompress_ptr cinfo) -{ - my_src_ptr src = (my_src_ptr) cinfo->src; - - /* We reset the empty-input-file flag for each image, - * but we don't clear the input buffer. - * This is correct behavior for reading a series of images from one source. - */ - src->start_of_file = TRUE; -} - - -/* - * Fill the input buffer --- called whenever buffer is emptied. - * - * In typical applications, this should read fresh data into the buffer - * (ignoring the current state of next_input_byte & bytes_in_buffer), - * reset the pointer & count to the start of the buffer, and return TRUE - * indicating that the buffer has been reloaded. It is not necessary to - * fill the buffer entirely, only to obtain at least one more byte. - * - * There is no such thing as an EOF return. If the end of the file has been - * reached, the routine has a choice of ERREXIT() or inserting fake data into - * the buffer. In most cases, generating a warning message and inserting a - * fake EOI marker is the best course of action --- this will allow the - * decompressor to output however much of the image is there. However, - * the resulting error message is misleading if the real problem is an empty - * input file, so we handle that case specially. - * - * In applications that need to be able to suspend compression due to input - * not being available yet, a FALSE return indicates that no more data can be - * obtained right now, but more may be forthcoming later. In this situation, - * the decompressor will return to its caller (with an indication of the - * number of scanlines it has read, if any). The application should resume - * decompression after it has loaded more data into the input buffer. Note - * that there are substantial restrictions on the use of suspension --- see - * the documentation. - * - * When suspending, the decompressor will back up to a convenient restart point - * (typically the start of the current MCU). next_input_byte & bytes_in_buffer - * indicate where the restart point will be if the current call returns FALSE. - * Data beyond this point must be rescanned after resumption, so move it to - * the front of the buffer rather than discarding it. - */ - -METHODDEF(boolean) -fill_input_buffer (j_decompress_ptr cinfo) -{ - my_src_ptr src = (my_src_ptr) cinfo->src; - size_t nbytes; - - nbytes = JFREAD(src->infile, src->buffer, INPUT_BUF_SIZE); - - if (nbytes <= 0) { - if (src->start_of_file) /* Treat empty input file as fatal error */ - ERREXIT(cinfo, JERR_INPUT_EMPTY); - WARNMS(cinfo, JWRN_JPEG_EOF); - /* Insert a fake EOI marker */ - src->buffer[0] = (JOCTET) 0xFF; - src->buffer[1] = (JOCTET) JPEG_EOI; - nbytes = 2; - } - - src->pub.next_input_byte = src->buffer; - src->pub.bytes_in_buffer = nbytes; - src->start_of_file = FALSE; - - return TRUE; -} - - -/* - * Skip data --- used to skip over a potentially large amount of - * uninteresting data (such as an APPn marker). - * - * Writers of suspendable-input applications must note that skip_input_data - * is not granted the right to give a suspension return. If the skip extends - * beyond the data currently in the buffer, the buffer can be marked empty so - * that the next read will cause a fill_input_buffer call that can suspend. - * Arranging for additional bytes to be discarded before reloading the input - * buffer is the application writer's problem. - */ - -METHODDEF(void) -skip_input_data (j_decompress_ptr cinfo, long num_bytes) -{ - my_src_ptr src = (my_src_ptr) cinfo->src; - - /* Just a dumb implementation for now. Could use fseek() except - * it doesn't work on pipes. Not clear that being smart is worth - * any trouble anyway --- large skips are infrequent. - */ - if (num_bytes > 0) { - while (num_bytes > (long) src->pub.bytes_in_buffer) { - num_bytes -= (long) src->pub.bytes_in_buffer; - (void) fill_input_buffer(cinfo); - /* note we assume that fill_input_buffer will never return FALSE, - * so suspension need not be handled. - */ - } - src->pub.next_input_byte += (size_t) num_bytes; - src->pub.bytes_in_buffer -= (size_t) num_bytes; - } -} - - -/* - * An additional method that can be provided by data source modules is the - * resync_to_restart method for error recovery in the presence of RST markers. - * For the moment, this source module just uses the default resync method - * provided by the JPEG library. That method assumes that no backtracking - * is possible. - */ - - -/* - * Terminate source --- called by jpeg_finish_decompress - * after all data has been read. Often a no-op. - * - * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding - * application must deal with any cleanup that should happen even - * for error exit. - */ - -METHODDEF(void) -term_source (j_decompress_ptr cinfo) -{ - /* no work necessary here */ -} - - -/* - * Prepare for input from a stdio stream. - * The caller must have already opened the stream, and is responsible - * for closing it after finishing decompression. - */ - -GLOBAL(void) -jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile) -{ - my_src_ptr src; - - /* The source object and input buffer are made permanent so that a series - * of JPEG images can be read from the same file by calling jpeg_stdio_src - * only before the first one. (If we discarded the buffer at the end of - * one image, we'd likely lose the start of the next one.) - * This makes it unsafe to use this manager and a different source - * manager serially with the same JPEG object. Caveat programmer. - */ - if (cinfo->src == NULL) { /* first time for this JPEG object? */ - cinfo->src = (struct jpeg_source_mgr *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - SIZEOF(my_source_mgr)); - src = (my_src_ptr) cinfo->src; - src->buffer = (JOCTET *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - INPUT_BUF_SIZE * SIZEOF(JOCTET)); - } - - src = (my_src_ptr) cinfo->src; - src->pub.init_source = init_source; - src->pub.fill_input_buffer = fill_input_buffer; - src->pub.skip_input_data = skip_input_data; - src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */ - src->pub.term_source = term_source; - src->infile = infile; - src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */ - src->pub.next_input_byte = NULL; /* until buffer loaded */ -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jdcoefct.c b/gtkmm-osx/trunk/jpeg-6b/jdcoefct.c deleted file mode 100644 index 4938d20..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jdcoefct.c +++ /dev/null @@ -1,736 +0,0 @@ -/* - * jdcoefct.c - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains the coefficient buffer controller for decompression. - * This controller is the top level of the JPEG decompressor proper. - * The coefficient buffer lies between entropy decoding and inverse-DCT steps. - * - * In buffered-image mode, this controller is the interface between - * input-oriented processing and output-oriented processing. - * Also, the input side (only) is used when reading a file for transcoding. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - -/* Block smoothing is only applicable for progressive JPEG, so: */ -#ifndef D_PROGRESSIVE_SUPPORTED -#undef BLOCK_SMOOTHING_SUPPORTED -#endif - -/* Private buffer controller object */ - -typedef struct { - struct jpeg_d_coef_controller pub; /* public fields */ - - /* These variables keep track of the current location of the input side. */ - /* cinfo->input_iMCU_row is also used for this. */ - JDIMENSION MCU_ctr; /* counts MCUs processed in current row */ - int MCU_vert_offset; /* counts MCU rows within iMCU row */ - int MCU_rows_per_iMCU_row; /* number of such rows needed */ - - /* The output side's location is represented by cinfo->output_iMCU_row. */ - - /* In single-pass modes, it's sufficient to buffer just one MCU. - * We allocate a workspace of D_MAX_BLOCKS_IN_MCU coefficient blocks, - * and let the entropy decoder write into that workspace each time. - * (On 80x86, the workspace is FAR even though it's not really very big; - * this is to keep the module interfaces unchanged when a large coefficient - * buffer is necessary.) - * In multi-pass modes, this array points to the current MCU's blocks - * within the virtual arrays; it is used only by the input side. - */ - JBLOCKROW MCU_buffer[D_MAX_BLOCKS_IN_MCU]; - -#ifdef D_MULTISCAN_FILES_SUPPORTED - /* In multi-pass modes, we need a virtual block array for each component. */ - jvirt_barray_ptr whole_image[MAX_COMPONENTS]; -#endif - -#ifdef BLOCK_SMOOTHING_SUPPORTED - /* When doing block smoothing, we latch coefficient Al values here */ - int * coef_bits_latch; -#define SAVED_COEFS 6 /* we save coef_bits[0..5] */ -#endif -} my_coef_controller; - -typedef my_coef_controller * my_coef_ptr; - -/* Forward declarations */ -METHODDEF(int) decompress_onepass - JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); -#ifdef D_MULTISCAN_FILES_SUPPORTED -METHODDEF(int) decompress_data - JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); -#endif -#ifdef BLOCK_SMOOTHING_SUPPORTED -LOCAL(boolean) smoothing_ok JPP((j_decompress_ptr cinfo)); -METHODDEF(int) decompress_smooth_data - JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); -#endif - - -LOCAL(void) -start_iMCU_row (j_decompress_ptr cinfo) -/* Reset within-iMCU-row counters for a new row (input side) */ -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - - /* In an interleaved scan, an MCU row is the same as an iMCU row. - * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows. - * But at the bottom of the image, process only what's left. - */ - if (cinfo->comps_in_scan > 1) { - coef->MCU_rows_per_iMCU_row = 1; - } else { - if (cinfo->input_iMCU_row < (cinfo->total_iMCU_rows-1)) - coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor; - else - coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height; - } - - coef->MCU_ctr = 0; - coef->MCU_vert_offset = 0; -} - - -/* - * Initialize for an input processing pass. - */ - -METHODDEF(void) -start_input_pass (j_decompress_ptr cinfo) -{ - cinfo->input_iMCU_row = 0; - start_iMCU_row(cinfo); -} - - -/* - * Initialize for an output processing pass. - */ - -METHODDEF(void) -start_output_pass (j_decompress_ptr cinfo) -{ -#ifdef BLOCK_SMOOTHING_SUPPORTED - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - - /* If multipass, check to see whether to use block smoothing on this pass */ - if (coef->pub.coef_arrays != NULL) { - if (cinfo->do_block_smoothing && smoothing_ok(cinfo)) - coef->pub.decompress_data = decompress_smooth_data; - else - coef->pub.decompress_data = decompress_data; - } -#endif - cinfo->output_iMCU_row = 0; -} - - -/* - * Decompress and return some data in the single-pass case. - * Always attempts to emit one fully interleaved MCU row ("iMCU" row). - * Input and output must run in lockstep since we have only a one-MCU buffer. - * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. - * - * NB: output_buf contains a plane for each component in image, - * which we index according to the component's SOF position. - */ - -METHODDEF(int) -decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - JDIMENSION MCU_col_num; /* index of current MCU within row */ - JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; - JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; - int blkn, ci, xindex, yindex, yoffset, useful_width; - JSAMPARRAY output_ptr; - JDIMENSION start_col, output_col; - jpeg_component_info *compptr; - inverse_DCT_method_ptr inverse_DCT; - - /* Loop to process as much as one whole iMCU row */ - for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; - yoffset++) { - for (MCU_col_num = coef->MCU_ctr; MCU_col_num <= last_MCU_col; - MCU_col_num++) { - /* Try to fetch an MCU. Entropy decoder expects buffer to be zeroed. */ - jzero_far((void FAR *) coef->MCU_buffer[0], - (size_t) (cinfo->blocks_in_MCU * SIZEOF(JBLOCK))); - if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) { - /* Suspension forced; update state counters and exit */ - coef->MCU_vert_offset = yoffset; - coef->MCU_ctr = MCU_col_num; - return JPEG_SUSPENDED; - } - /* Determine where data should go in output_buf and do the IDCT thing. - * We skip dummy blocks at the right and bottom edges (but blkn gets - * incremented past them!). Note the inner loop relies on having - * allocated the MCU_buffer[] blocks sequentially. - */ - blkn = 0; /* index of current DCT block within MCU */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - /* Don't bother to IDCT an uninteresting component. */ - if (! compptr->component_needed) { - blkn += compptr->MCU_blocks; - continue; - } - inverse_DCT = cinfo->idct->inverse_DCT[compptr->component_index]; - useful_width = (MCU_col_num < last_MCU_col) ? compptr->MCU_width - : compptr->last_col_width; - output_ptr = output_buf[compptr->component_index] + - yoffset * compptr->DCT_scaled_size; - start_col = MCU_col_num * compptr->MCU_sample_width; - for (yindex = 0; yindex < compptr->MCU_height; yindex++) { - if (cinfo->input_iMCU_row < last_iMCU_row || - yoffset+yindex < compptr->last_row_height) { - output_col = start_col; - for (xindex = 0; xindex < useful_width; xindex++) { - (*inverse_DCT) (cinfo, compptr, - (JCOEFPTR) coef->MCU_buffer[blkn+xindex], - output_ptr, output_col); - output_col += compptr->DCT_scaled_size; - } - } - blkn += compptr->MCU_width; - output_ptr += compptr->DCT_scaled_size; - } - } - } - /* Completed an MCU row, but perhaps not an iMCU row */ - coef->MCU_ctr = 0; - } - /* Completed the iMCU row, advance counters for next one */ - cinfo->output_iMCU_row++; - if (++(cinfo->input_iMCU_row) < cinfo->total_iMCU_rows) { - start_iMCU_row(cinfo); - return JPEG_ROW_COMPLETED; - } - /* Completed the scan */ - (*cinfo->inputctl->finish_input_pass) (cinfo); - return JPEG_SCAN_COMPLETED; -} - - -/* - * Dummy consume-input routine for single-pass operation. - */ - -METHODDEF(int) -dummy_consume_data (j_decompress_ptr cinfo) -{ - return JPEG_SUSPENDED; /* Always indicate nothing was done */ -} - - -#ifdef D_MULTISCAN_FILES_SUPPORTED - -/* - * Consume input data and store it in the full-image coefficient buffer. - * We read as much as one fully interleaved MCU row ("iMCU" row) per call, - * ie, v_samp_factor block rows for each component in the scan. - * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. - */ - -METHODDEF(int) -consume_data (j_decompress_ptr cinfo) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - JDIMENSION MCU_col_num; /* index of current MCU within row */ - int blkn, ci, xindex, yindex, yoffset; - JDIMENSION start_col; - JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN]; - JBLOCKROW buffer_ptr; - jpeg_component_info *compptr; - - /* Align the virtual buffers for the components used in this scan. */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - buffer[ci] = (*cinfo->mem->access_virt_barray) - ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index], - cinfo->input_iMCU_row * compptr->v_samp_factor, - (JDIMENSION) compptr->v_samp_factor, TRUE); - /* Note: entropy decoder expects buffer to be zeroed, - * but this is handled automatically by the memory manager - * because we requested a pre-zeroed array. - */ - } - - /* Loop to process one whole iMCU row */ - for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; - yoffset++) { - for (MCU_col_num = coef->MCU_ctr; MCU_col_num < cinfo->MCUs_per_row; - MCU_col_num++) { - /* Construct list of pointers to DCT blocks belonging to this MCU */ - blkn = 0; /* index of current DCT block within MCU */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - start_col = MCU_col_num * compptr->MCU_width; - for (yindex = 0; yindex < compptr->MCU_height; yindex++) { - buffer_ptr = buffer[ci][yindex+yoffset] + start_col; - for (xindex = 0; xindex < compptr->MCU_width; xindex++) { - coef->MCU_buffer[blkn++] = buffer_ptr++; - } - } - } - /* Try to fetch the MCU. */ - if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) { - /* Suspension forced; update state counters and exit */ - coef->MCU_vert_offset = yoffset; - coef->MCU_ctr = MCU_col_num; - return JPEG_SUSPENDED; - } - } - /* Completed an MCU row, but perhaps not an iMCU row */ - coef->MCU_ctr = 0; - } - /* Completed the iMCU row, advance counters for next one */ - if (++(cinfo->input_iMCU_row) < cinfo->total_iMCU_rows) { - start_iMCU_row(cinfo); - return JPEG_ROW_COMPLETED; - } - /* Completed the scan */ - (*cinfo->inputctl->finish_input_pass) (cinfo); - return JPEG_SCAN_COMPLETED; -} - - -/* - * Decompress and return some data in the multi-pass case. - * Always attempts to emit one fully interleaved MCU row ("iMCU" row). - * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. - * - * NB: output_buf contains a plane for each component in image. - */ - -METHODDEF(int) -decompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; - JDIMENSION block_num; - int ci, block_row, block_rows; - JBLOCKARRAY buffer; - JBLOCKROW buffer_ptr; - JSAMPARRAY output_ptr; - JDIMENSION output_col; - jpeg_component_info *compptr; - inverse_DCT_method_ptr inverse_DCT; - - /* Force some input to be done if we are getting ahead of the input. */ - while (cinfo->input_scan_number < cinfo->output_scan_number || - (cinfo->input_scan_number == cinfo->output_scan_number && - cinfo->input_iMCU_row <= cinfo->output_iMCU_row)) { - if ((*cinfo->inputctl->consume_input)(cinfo) == JPEG_SUSPENDED) - return JPEG_SUSPENDED; - } - - /* OK, output from the virtual arrays. */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Don't bother to IDCT an uninteresting component. */ - if (! compptr->component_needed) - continue; - /* Align the virtual buffer for this component. */ - buffer = (*cinfo->mem->access_virt_barray) - ((j_common_ptr) cinfo, coef->whole_image[ci], - cinfo->output_iMCU_row * compptr->v_samp_factor, - (JDIMENSION) compptr->v_samp_factor, FALSE); - /* Count non-dummy DCT block rows in this iMCU row. */ - if (cinfo->output_iMCU_row < last_iMCU_row) - block_rows = compptr->v_samp_factor; - else { - /* NB: can't use last_row_height here; it is input-side-dependent! */ - block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor); - if (block_rows == 0) block_rows = compptr->v_samp_factor; - } - inverse_DCT = cinfo->idct->inverse_DCT[ci]; - output_ptr = output_buf[ci]; - /* Loop over all DCT blocks to be processed. */ - for (block_row = 0; block_row < block_rows; block_row++) { - buffer_ptr = buffer[block_row]; - output_col = 0; - for (block_num = 0; block_num < compptr->width_in_blocks; block_num++) { - (*inverse_DCT) (cinfo, compptr, (JCOEFPTR) buffer_ptr, - output_ptr, output_col); - buffer_ptr++; - output_col += compptr->DCT_scaled_size; - } - output_ptr += compptr->DCT_scaled_size; - } - } - - if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows) - return JPEG_ROW_COMPLETED; - return JPEG_SCAN_COMPLETED; -} - -#endif /* D_MULTISCAN_FILES_SUPPORTED */ - - -#ifdef BLOCK_SMOOTHING_SUPPORTED - -/* - * This code applies interblock smoothing as described by section K.8 - * of the JPEG standard: the first 5 AC coefficients are estimated from - * the DC values of a DCT block and its 8 neighboring blocks. - * We apply smoothing only for progressive JPEG decoding, and only if - * the coefficients it can estimate are not yet known to full precision. - */ - -/* Natural-order array positions of the first 5 zigzag-order coefficients */ -#define Q01_POS 1 -#define Q10_POS 8 -#define Q20_POS 16 -#define Q11_POS 9 -#define Q02_POS 2 - -/* - * Determine whether block smoothing is applicable and safe. - * We also latch the current states of the coef_bits[] entries for the - * AC coefficients; otherwise, if the input side of the decompressor - * advances into a new scan, we might think the coefficients are known - * more accurately than they really are. - */ - -LOCAL(boolean) -smoothing_ok (j_decompress_ptr cinfo) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - boolean smoothing_useful = FALSE; - int ci, coefi; - jpeg_component_info *compptr; - JQUANT_TBL * qtable; - int * coef_bits; - int * coef_bits_latch; - - if (! cinfo->progressive_mode || cinfo->coef_bits == NULL) - return FALSE; - - /* Allocate latch area if not already done */ - if (coef->coef_bits_latch == NULL) - coef->coef_bits_latch = (int *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - cinfo->num_components * - (SAVED_COEFS * SIZEOF(int))); - coef_bits_latch = coef->coef_bits_latch; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* All components' quantization values must already be latched. */ - if ((qtable = compptr->quant_table) == NULL) - return FALSE; - /* Verify DC & first 5 AC quantizers are nonzero to avoid zero-divide. */ - if (qtable->quantval[0] == 0 || - qtable->quantval[Q01_POS] == 0 || - qtable->quantval[Q10_POS] == 0 || - qtable->quantval[Q20_POS] == 0 || - qtable->quantval[Q11_POS] == 0 || - qtable->quantval[Q02_POS] == 0) - return FALSE; - /* DC values must be at least partly known for all components. */ - coef_bits = cinfo->coef_bits[ci]; - if (coef_bits[0] < 0) - return FALSE; - /* Block smoothing is helpful if some AC coefficients remain inaccurate. */ - for (coefi = 1; coefi <= 5; coefi++) { - coef_bits_latch[coefi] = coef_bits[coefi]; - if (coef_bits[coefi] != 0) - smoothing_useful = TRUE; - } - coef_bits_latch += SAVED_COEFS; - } - - return smoothing_useful; -} - - -/* - * Variant of decompress_data for use when doing block smoothing. - */ - -METHODDEF(int) -decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) -{ - my_coef_ptr coef = (my_coef_ptr) cinfo->coef; - JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; - JDIMENSION block_num, last_block_column; - int ci, block_row, block_rows, access_rows; - JBLOCKARRAY buffer; - JBLOCKROW buffer_ptr, prev_block_row, next_block_row; - JSAMPARRAY output_ptr; - JDIMENSION output_col; - jpeg_component_info *compptr; - inverse_DCT_method_ptr inverse_DCT; - boolean first_row, last_row; - JBLOCK workspace; - int *coef_bits; - JQUANT_TBL *quanttbl; - INT32 Q00,Q01,Q02,Q10,Q11,Q20, num; - int DC1,DC2,DC3,DC4,DC5,DC6,DC7,DC8,DC9; - int Al, pred; - - /* Force some input to be done if we are getting ahead of the input. */ - while (cinfo->input_scan_number <= cinfo->output_scan_number && - ! cinfo->inputctl->eoi_reached) { - if (cinfo->input_scan_number == cinfo->output_scan_number) { - /* If input is working on current scan, we ordinarily want it to - * have completed the current row. But if input scan is DC, - * we want it to keep one row ahead so that next block row's DC - * values are up to date. - */ - JDIMENSION delta = (cinfo->Ss == 0) ? 1 : 0; - if (cinfo->input_iMCU_row > cinfo->output_iMCU_row+delta) - break; - } - if ((*cinfo->inputctl->consume_input)(cinfo) == JPEG_SUSPENDED) - return JPEG_SUSPENDED; - } - - /* OK, output from the virtual arrays. */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Don't bother to IDCT an uninteresting component. */ - if (! compptr->component_needed) - continue; - /* Count non-dummy DCT block rows in this iMCU row. */ - if (cinfo->output_iMCU_row < last_iMCU_row) { - block_rows = compptr->v_samp_factor; - access_rows = block_rows * 2; /* this and next iMCU row */ - last_row = FALSE; - } else { - /* NB: can't use last_row_height here; it is input-side-dependent! */ - block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor); - if (block_rows == 0) block_rows = compptr->v_samp_factor; - access_rows = block_rows; /* this iMCU row only */ - last_row = TRUE; - } - /* Align the virtual buffer for this component. */ - if (cinfo->output_iMCU_row > 0) { - access_rows += compptr->v_samp_factor; /* prior iMCU row too */ - buffer = (*cinfo->mem->access_virt_barray) - ((j_common_ptr) cinfo, coef->whole_image[ci], - (cinfo->output_iMCU_row - 1) * compptr->v_samp_factor, - (JDIMENSION) access_rows, FALSE); - buffer += compptr->v_samp_factor; /* point to current iMCU row */ - first_row = FALSE; - } else { - buffer = (*cinfo->mem->access_virt_barray) - ((j_common_ptr) cinfo, coef->whole_image[ci], - (JDIMENSION) 0, (JDIMENSION) access_rows, FALSE); - first_row = TRUE; - } - /* Fetch component-dependent info */ - coef_bits = coef->coef_bits_latch + (ci * SAVED_COEFS); - quanttbl = compptr->quant_table; - Q00 = quanttbl->quantval[0]; - Q01 = quanttbl->quantval[Q01_POS]; - Q10 = quanttbl->quantval[Q10_POS]; - Q20 = quanttbl->quantval[Q20_POS]; - Q11 = quanttbl->quantval[Q11_POS]; - Q02 = quanttbl->quantval[Q02_POS]; - inverse_DCT = cinfo->idct->inverse_DCT[ci]; - output_ptr = output_buf[ci]; - /* Loop over all DCT blocks to be processed. */ - for (block_row = 0; block_row < block_rows; block_row++) { - buffer_ptr = buffer[block_row]; - if (first_row && block_row == 0) - prev_block_row = buffer_ptr; - else - prev_block_row = buffer[block_row-1]; - if (last_row && block_row == block_rows-1) - next_block_row = buffer_ptr; - else - next_block_row = buffer[block_row+1]; - /* We fetch the surrounding DC values using a sliding-register approach. - * Initialize all nine here so as to do the right thing on narrow pics. - */ - DC1 = DC2 = DC3 = (int) prev_block_row[0][0]; - DC4 = DC5 = DC6 = (int) buffer_ptr[0][0]; - DC7 = DC8 = DC9 = (int) next_block_row[0][0]; - output_col = 0; - last_block_column = compptr->width_in_blocks - 1; - for (block_num = 0; block_num <= last_block_column; block_num++) { - /* Fetch current DCT block into workspace so we can modify it. */ - jcopy_block_row(buffer_ptr, (JBLOCKROW) workspace, (JDIMENSION) 1); - /* Update DC values */ - if (block_num < last_block_column) { - DC3 = (int) prev_block_row[1][0]; - DC6 = (int) buffer_ptr[1][0]; - DC9 = (int) next_block_row[1][0]; - } - /* Compute coefficient estimates per K.8. - * An estimate is applied only if coefficient is still zero, - * and is not known to be fully accurate. - */ - /* AC01 */ - if ((Al=coef_bits[1]) != 0 && workspace[1] == 0) { - num = 36 * Q00 * (DC4 - DC6); - if (num >= 0) { - pred = (int) (((Q01<<7) + num) / (Q01<<8)); - if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { - pred = (int) (((Q10<<7) + num) / (Q10<<8)); - if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { - pred = (int) (((Q20<<7) + num) / (Q20<<8)); - if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { - pred = (int) (((Q11<<7) + num) / (Q11<<8)); - if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { - pred = (int) (((Q02<<7) + num) / (Q02<<8)); - if (Al > 0 && pred >= (1< 0 && pred >= (1<DCT_scaled_size; - } - output_ptr += compptr->DCT_scaled_size; - } - } - - if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows) - return JPEG_ROW_COMPLETED; - return JPEG_SCAN_COMPLETED; -} - -#endif /* BLOCK_SMOOTHING_SUPPORTED */ - - -/* - * Initialize coefficient buffer controller. - */ - -GLOBAL(void) -jinit_d_coef_controller (j_decompress_ptr cinfo, boolean need_full_buffer) -{ - my_coef_ptr coef; - - coef = (my_coef_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_coef_controller)); - cinfo->coef = (struct jpeg_d_coef_controller *) coef; - coef->pub.start_input_pass = start_input_pass; - coef->pub.start_output_pass = start_output_pass; -#ifdef BLOCK_SMOOTHING_SUPPORTED - coef->coef_bits_latch = NULL; -#endif - - /* Create the coefficient buffer. */ - if (need_full_buffer) { -#ifdef D_MULTISCAN_FILES_SUPPORTED - /* Allocate a full-image virtual array for each component, */ - /* padded to a multiple of samp_factor DCT blocks in each direction. */ - /* Note we ask for a pre-zeroed array. */ - int ci, access_rows; - jpeg_component_info *compptr; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - access_rows = compptr->v_samp_factor; -#ifdef BLOCK_SMOOTHING_SUPPORTED - /* If block smoothing could be used, need a bigger window */ - if (cinfo->progressive_mode) - access_rows *= 3; -#endif - coef->whole_image[ci] = (*cinfo->mem->request_virt_barray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, TRUE, - (JDIMENSION) jround_up((long) compptr->width_in_blocks, - (long) compptr->h_samp_factor), - (JDIMENSION) jround_up((long) compptr->height_in_blocks, - (long) compptr->v_samp_factor), - (JDIMENSION) access_rows); - } - coef->pub.consume_data = consume_data; - coef->pub.decompress_data = decompress_data; - coef->pub.coef_arrays = coef->whole_image; /* link to virtual arrays */ -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } else { - /* We only need a single-MCU buffer. */ - JBLOCKROW buffer; - int i; - - buffer = (JBLOCKROW) - (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, - D_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); - for (i = 0; i < D_MAX_BLOCKS_IN_MCU; i++) { - coef->MCU_buffer[i] = buffer + i; - } - coef->pub.consume_data = dummy_consume_data; - coef->pub.decompress_data = decompress_onepass; - coef->pub.coef_arrays = NULL; /* flag for no virtual arrays */ - } -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jdcolor.c b/gtkmm-osx/trunk/jpeg-6b/jdcolor.c deleted file mode 100644 index 6c04dfe..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jdcolor.c +++ /dev/null @@ -1,396 +0,0 @@ -/* - * jdcolor.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains output colorspace conversion routines. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Private subobject */ - -typedef struct { - struct jpeg_color_deconverter pub; /* public fields */ - - /* Private state for YCC->RGB conversion */ - int * Cr_r_tab; /* => table for Cr to R conversion */ - int * Cb_b_tab; /* => table for Cb to B conversion */ - INT32 * Cr_g_tab; /* => table for Cr to G conversion */ - INT32 * Cb_g_tab; /* => table for Cb to G conversion */ -} my_color_deconverter; - -typedef my_color_deconverter * my_cconvert_ptr; - - -/**************** YCbCr -> RGB conversion: most common case **************/ - -/* - * YCbCr is defined per CCIR 601-1, except that Cb and Cr are - * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5. - * The conversion equations to be implemented are therefore - * R = Y + 1.40200 * Cr - * G = Y - 0.34414 * Cb - 0.71414 * Cr - * B = Y + 1.77200 * Cb - * where Cb and Cr represent the incoming values less CENTERJSAMPLE. - * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.) - * - * To avoid floating-point arithmetic, we represent the fractional constants - * as integers scaled up by 2^16 (about 4 digits precision); we have to divide - * the products by 2^16, with appropriate rounding, to get the correct answer. - * Notice that Y, being an integral input, does not contribute any fraction - * so it need not participate in the rounding. - * - * For even more speed, we avoid doing any multiplications in the inner loop - * by precalculating the constants times Cb and Cr for all possible values. - * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table); - * for 12-bit samples it is still acceptable. It's not very reasonable for - * 16-bit samples, but if you want lossless storage you shouldn't be changing - * colorspace anyway. - * The Cr=>R and Cb=>B values can be rounded to integers in advance; the - * values for the G calculation are left scaled up, since we must add them - * together before rounding. - */ - -#define SCALEBITS 16 /* speediest right-shift on some machines */ -#define ONE_HALF ((INT32) 1 << (SCALEBITS-1)) -#define FIX(x) ((INT32) ((x) * (1L<RGB colorspace conversion. - */ - -LOCAL(void) -build_ycc_rgb_table (j_decompress_ptr cinfo) -{ - my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; - int i; - INT32 x; - SHIFT_TEMPS - - cconvert->Cr_r_tab = (int *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - (MAXJSAMPLE+1) * SIZEOF(int)); - cconvert->Cb_b_tab = (int *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - (MAXJSAMPLE+1) * SIZEOF(int)); - cconvert->Cr_g_tab = (INT32 *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - (MAXJSAMPLE+1) * SIZEOF(INT32)); - cconvert->Cb_g_tab = (INT32 *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - (MAXJSAMPLE+1) * SIZEOF(INT32)); - - for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) { - /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */ - /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */ - /* Cr=>R value is nearest int to 1.40200 * x */ - cconvert->Cr_r_tab[i] = (int) - RIGHT_SHIFT(FIX(1.40200) * x + ONE_HALF, SCALEBITS); - /* Cb=>B value is nearest int to 1.77200 * x */ - cconvert->Cb_b_tab[i] = (int) - RIGHT_SHIFT(FIX(1.77200) * x + ONE_HALF, SCALEBITS); - /* Cr=>G value is scaled-up -0.71414 * x */ - cconvert->Cr_g_tab[i] = (- FIX(0.71414)) * x; - /* Cb=>G value is scaled-up -0.34414 * x */ - /* We also add in ONE_HALF so that need not do it in inner loop */ - cconvert->Cb_g_tab[i] = (- FIX(0.34414)) * x + ONE_HALF; - } -} - - -/* - * Convert some rows of samples to the output colorspace. - * - * Note that we change from noninterleaved, one-plane-per-component format - * to interleaved-pixel format. The output buffer is therefore three times - * as wide as the input buffer. - * A starting row offset is provided only for the input buffer. The caller - * can easily adjust the passed output_buf value to accommodate any row - * offset required on that side. - */ - -METHODDEF(void) -ycc_rgb_convert (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION input_row, - JSAMPARRAY output_buf, int num_rows) -{ - my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; - register int y, cb, cr; - register JSAMPROW outptr; - register JSAMPROW inptr0, inptr1, inptr2; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->output_width; - /* copy these pointers into registers if possible */ - register JSAMPLE * range_limit = cinfo->sample_range_limit; - register int * Crrtab = cconvert->Cr_r_tab; - register int * Cbbtab = cconvert->Cb_b_tab; - register INT32 * Crgtab = cconvert->Cr_g_tab; - register INT32 * Cbgtab = cconvert->Cb_g_tab; - SHIFT_TEMPS - - while (--num_rows >= 0) { - inptr0 = input_buf[0][input_row]; - inptr1 = input_buf[1][input_row]; - inptr2 = input_buf[2][input_row]; - input_row++; - outptr = *output_buf++; - for (col = 0; col < num_cols; col++) { - y = GETJSAMPLE(inptr0[col]); - cb = GETJSAMPLE(inptr1[col]); - cr = GETJSAMPLE(inptr2[col]); - /* Range-limiting is essential due to noise introduced by DCT losses. */ - outptr[RGB_RED] = range_limit[y + Crrtab[cr]]; - outptr[RGB_GREEN] = range_limit[y + - ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], - SCALEBITS))]; - outptr[RGB_BLUE] = range_limit[y + Cbbtab[cb]]; - outptr += RGB_PIXELSIZE; - } - } -} - - -/**************** Cases other than YCbCr -> RGB **************/ - - -/* - * Color conversion for no colorspace change: just copy the data, - * converting from separate-planes to interleaved representation. - */ - -METHODDEF(void) -null_convert (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION input_row, - JSAMPARRAY output_buf, int num_rows) -{ - register JSAMPROW inptr, outptr; - register JDIMENSION count; - register int num_components = cinfo->num_components; - JDIMENSION num_cols = cinfo->output_width; - int ci; - - while (--num_rows >= 0) { - for (ci = 0; ci < num_components; ci++) { - inptr = input_buf[ci][input_row]; - outptr = output_buf[0] + ci; - for (count = num_cols; count > 0; count--) { - *outptr = *inptr++; /* needn't bother with GETJSAMPLE() here */ - outptr += num_components; - } - } - input_row++; - output_buf++; - } -} - - -/* - * Color conversion for grayscale: just copy the data. - * This also works for YCbCr -> grayscale conversion, in which - * we just copy the Y (luminance) component and ignore chrominance. - */ - -METHODDEF(void) -grayscale_convert (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION input_row, - JSAMPARRAY output_buf, int num_rows) -{ - jcopy_sample_rows(input_buf[0], (int) input_row, output_buf, 0, - num_rows, cinfo->output_width); -} - - -/* - * Convert grayscale to RGB: just duplicate the graylevel three times. - * This is provided to support applications that don't want to cope - * with grayscale as a separate case. - */ - -METHODDEF(void) -gray_rgb_convert (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION input_row, - JSAMPARRAY output_buf, int num_rows) -{ - register JSAMPROW inptr, outptr; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->output_width; - - while (--num_rows >= 0) { - inptr = input_buf[0][input_row++]; - outptr = *output_buf++; - for (col = 0; col < num_cols; col++) { - /* We can dispense with GETJSAMPLE() here */ - outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col]; - outptr += RGB_PIXELSIZE; - } - } -} - - -/* - * Adobe-style YCCK->CMYK conversion. - * We convert YCbCr to R=1-C, G=1-M, and B=1-Y using the same - * conversion as above, while passing K (black) unchanged. - * We assume build_ycc_rgb_table has been called. - */ - -METHODDEF(void) -ycck_cmyk_convert (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION input_row, - JSAMPARRAY output_buf, int num_rows) -{ - my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; - register int y, cb, cr; - register JSAMPROW outptr; - register JSAMPROW inptr0, inptr1, inptr2, inptr3; - register JDIMENSION col; - JDIMENSION num_cols = cinfo->output_width; - /* copy these pointers into registers if possible */ - register JSAMPLE * range_limit = cinfo->sample_range_limit; - register int * Crrtab = cconvert->Cr_r_tab; - register int * Cbbtab = cconvert->Cb_b_tab; - register INT32 * Crgtab = cconvert->Cr_g_tab; - register INT32 * Cbgtab = cconvert->Cb_g_tab; - SHIFT_TEMPS - - while (--num_rows >= 0) { - inptr0 = input_buf[0][input_row]; - inptr1 = input_buf[1][input_row]; - inptr2 = input_buf[2][input_row]; - inptr3 = input_buf[3][input_row]; - input_row++; - outptr = *output_buf++; - for (col = 0; col < num_cols; col++) { - y = GETJSAMPLE(inptr0[col]); - cb = GETJSAMPLE(inptr1[col]); - cr = GETJSAMPLE(inptr2[col]); - /* Range-limiting is essential due to noise introduced by DCT losses. */ - outptr[0] = range_limit[MAXJSAMPLE - (y + Crrtab[cr])]; /* red */ - outptr[1] = range_limit[MAXJSAMPLE - (y + /* green */ - ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], - SCALEBITS)))]; - outptr[2] = range_limit[MAXJSAMPLE - (y + Cbbtab[cb])]; /* blue */ - /* K passes through unchanged */ - outptr[3] = inptr3[col]; /* don't need GETJSAMPLE here */ - outptr += 4; - } - } -} - - -/* - * Empty method for start_pass. - */ - -METHODDEF(void) -start_pass_dcolor (j_decompress_ptr cinfo) -{ - /* no work needed */ -} - - -/* - * Module initialization routine for output colorspace conversion. - */ - -GLOBAL(void) -jinit_color_deconverter (j_decompress_ptr cinfo) -{ - my_cconvert_ptr cconvert; - int ci; - - cconvert = (my_cconvert_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_color_deconverter)); - cinfo->cconvert = (struct jpeg_color_deconverter *) cconvert; - cconvert->pub.start_pass = start_pass_dcolor; - - /* Make sure num_components agrees with jpeg_color_space */ - switch (cinfo->jpeg_color_space) { - case JCS_GRAYSCALE: - if (cinfo->num_components != 1) - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - break; - - case JCS_RGB: - case JCS_YCbCr: - if (cinfo->num_components != 3) - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - break; - - case JCS_CMYK: - case JCS_YCCK: - if (cinfo->num_components != 4) - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - break; - - default: /* JCS_UNKNOWN can be anything */ - if (cinfo->num_components < 1) - ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); - break; - } - - /* Set out_color_components and conversion method based on requested space. - * Also clear the component_needed flags for any unused components, - * so that earlier pipeline stages can avoid useless computation. - */ - - switch (cinfo->out_color_space) { - case JCS_GRAYSCALE: - cinfo->out_color_components = 1; - if (cinfo->jpeg_color_space == JCS_GRAYSCALE || - cinfo->jpeg_color_space == JCS_YCbCr) { - cconvert->pub.color_convert = grayscale_convert; - /* For color->grayscale conversion, only the Y (0) component is needed */ - for (ci = 1; ci < cinfo->num_components; ci++) - cinfo->comp_info[ci].component_needed = FALSE; - } else - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - break; - - case JCS_RGB: - cinfo->out_color_components = RGB_PIXELSIZE; - if (cinfo->jpeg_color_space == JCS_YCbCr) { - cconvert->pub.color_convert = ycc_rgb_convert; - build_ycc_rgb_table(cinfo); - } else if (cinfo->jpeg_color_space == JCS_GRAYSCALE) { - cconvert->pub.color_convert = gray_rgb_convert; - } else if (cinfo->jpeg_color_space == JCS_RGB && RGB_PIXELSIZE == 3) { - cconvert->pub.color_convert = null_convert; - } else - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - break; - - case JCS_CMYK: - cinfo->out_color_components = 4; - if (cinfo->jpeg_color_space == JCS_YCCK) { - cconvert->pub.color_convert = ycck_cmyk_convert; - build_ycc_rgb_table(cinfo); - } else if (cinfo->jpeg_color_space == JCS_CMYK) { - cconvert->pub.color_convert = null_convert; - } else - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - break; - - default: - /* Permit null conversion to same output space */ - if (cinfo->out_color_space == cinfo->jpeg_color_space) { - cinfo->out_color_components = cinfo->num_components; - cconvert->pub.color_convert = null_convert; - } else /* unsupported non-null conversion */ - ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); - break; - } - - if (cinfo->quantize_colors) - cinfo->output_components = 1; /* single colormapped output component */ - else - cinfo->output_components = cinfo->out_color_components; -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jdct.h b/gtkmm-osx/trunk/jpeg-6b/jdct.h deleted file mode 100644 index 31054a8..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jdct.h +++ /dev/null @@ -1,176 +0,0 @@ -/* - * jdct.h - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This include file contains common declarations for the forward and - * inverse DCT modules. These declarations are private to the DCT managers - * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms. - * The individual DCT algorithms are kept in separate files to ease - * machine-dependent tuning (e.g., assembly coding). - */ - - -/* - * A forward DCT routine is given a pointer to a work area of type DCTELEM[]; - * the DCT is to be performed in-place in that buffer. Type DCTELEM is int - * for 8-bit samples, INT32 for 12-bit samples. (NOTE: Floating-point DCT - * implementations use an array of type FAST_FLOAT, instead.) - * The DCT inputs are expected to be signed (range +-CENTERJSAMPLE). - * The DCT outputs are returned scaled up by a factor of 8; they therefore - * have a range of +-8K for 8-bit data, +-128K for 12-bit data. This - * convention improves accuracy in integer implementations and saves some - * work in floating-point ones. - * Quantization of the output coefficients is done by jcdctmgr.c. - */ - -#if BITS_IN_JSAMPLE == 8 -typedef int DCTELEM; /* 16 or 32 bits is fine */ -#else -typedef INT32 DCTELEM; /* must have 32 bits */ -#endif - -typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data)); -typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data)); - - -/* - * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer - * to an output sample array. The routine must dequantize the input data as - * well as perform the IDCT; for dequantization, it uses the multiplier table - * pointed to by compptr->dct_table. The output data is to be placed into the - * sample array starting at a specified column. (Any row offset needed will - * be applied to the array pointer before it is passed to the IDCT code.) - * Note that the number of samples emitted by the IDCT routine is - * DCT_scaled_size * DCT_scaled_size. - */ - -/* typedef inverse_DCT_method_ptr is declared in jpegint.h */ - -/* - * Each IDCT routine has its own ideas about the best dct_table element type. - */ - -typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */ -#if BITS_IN_JSAMPLE == 8 -typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */ -#define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */ -#else -typedef INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */ -#define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */ -#endif -typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */ - - -/* - * Each IDCT routine is responsible for range-limiting its results and - * converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could - * be quite far out of range if the input data is corrupt, so a bulletproof - * range-limiting step is required. We use a mask-and-table-lookup method - * to do the combined operations quickly. See the comments with - * prepare_range_limit_table (in jdmaster.c) for more info. - */ - -#define IDCT_range_limit(cinfo) ((cinfo)->sample_range_limit + CENTERJSAMPLE) - -#define RANGE_MASK (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */ - - -/* Short forms of external names for systems with brain-damaged linkers. */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jpeg_fdct_islow jFDislow -#define jpeg_fdct_ifast jFDifast -#define jpeg_fdct_float jFDfloat -#define jpeg_idct_islow jRDislow -#define jpeg_idct_ifast jRDifast -#define jpeg_idct_float jRDfloat -#define jpeg_idct_4x4 jRD4x4 -#define jpeg_idct_2x2 jRD2x2 -#define jpeg_idct_1x1 jRD1x1 -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - -/* Extern declarations for the forward and inverse DCT routines. */ - -EXTERN(void) jpeg_fdct_islow JPP((DCTELEM * data)); -EXTERN(void) jpeg_fdct_ifast JPP((DCTELEM * data)); -EXTERN(void) jpeg_fdct_float JPP((FAST_FLOAT * data)); - -EXTERN(void) jpeg_idct_islow - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_ifast - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_float - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_4x4 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_2x2 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); -EXTERN(void) jpeg_idct_1x1 - JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); - - -/* - * Macros for handling fixed-point arithmetic; these are used by many - * but not all of the DCT/IDCT modules. - * - * All values are expected to be of type INT32. - * Fractional constants are scaled left by CONST_BITS bits. - * CONST_BITS is defined within each module using these macros, - * and may differ from one module to the next. - */ - -#define ONE ((INT32) 1) -#define CONST_SCALE (ONE << CONST_BITS) - -/* Convert a positive real constant to an integer scaled by CONST_SCALE. - * Caution: some C compilers fail to reduce "FIX(constant)" at compile time, - * thus causing a lot of useless floating-point operations at run time. - */ - -#define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5)) - -/* Descale and correctly round an INT32 value that's scaled by N bits. - * We assume RIGHT_SHIFT rounds towards minus infinity, so adding - * the fudge factor is correct for either sign of X. - */ - -#define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n) - -/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. - * This macro is used only when the two inputs will actually be no more than - * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a - * full 32x32 multiply. This provides a useful speedup on many machines. - * Unfortunately there is no way to specify a 16x16->32 multiply portably - * in C, but some C compilers will do the right thing if you provide the - * correct combination of casts. - */ - -#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ -#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT16) (const))) -#endif -#ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */ -#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT32) (const))) -#endif - -#ifndef MULTIPLY16C16 /* default definition */ -#define MULTIPLY16C16(var,const) ((var) * (const)) -#endif - -/* Same except both inputs are variables. */ - -#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ -#define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2))) -#endif - -#ifndef MULTIPLY16V16 /* default definition */ -#define MULTIPLY16V16(var1,var2) ((var1) * (var2)) -#endif diff --git a/gtkmm-osx/trunk/jpeg-6b/jddctmgr.c b/gtkmm-osx/trunk/jpeg-6b/jddctmgr.c deleted file mode 100644 index bbf8d0e..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jddctmgr.c +++ /dev/null @@ -1,269 +0,0 @@ -/* - * jddctmgr.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains the inverse-DCT management logic. - * This code selects a particular IDCT implementation to be used, - * and it performs related housekeeping chores. No code in this file - * is executed per IDCT step, only during output pass setup. - * - * Note that the IDCT routines are responsible for performing coefficient - * dequantization as well as the IDCT proper. This module sets up the - * dequantization multiplier table needed by the IDCT routine. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jdct.h" /* Private declarations for DCT subsystem */ - - -/* - * The decompressor input side (jdinput.c) saves away the appropriate - * quantization table for each component at the start of the first scan - * involving that component. (This is necessary in order to correctly - * decode files that reuse Q-table slots.) - * When we are ready to make an output pass, the saved Q-table is converted - * to a multiplier table that will actually be used by the IDCT routine. - * The multiplier table contents are IDCT-method-dependent. To support - * application changes in IDCT method between scans, we can remake the - * multiplier tables if necessary. - * In buffered-image mode, the first output pass may occur before any data - * has been seen for some components, and thus before their Q-tables have - * been saved away. To handle this case, multiplier tables are preset - * to zeroes; the result of the IDCT will be a neutral gray level. - */ - - -/* Private subobject for this module */ - -typedef struct { - struct jpeg_inverse_dct pub; /* public fields */ - - /* This array contains the IDCT method code that each multiplier table - * is currently set up for, or -1 if it's not yet set up. - * The actual multiplier tables are pointed to by dct_table in the - * per-component comp_info structures. - */ - int cur_method[MAX_COMPONENTS]; -} my_idct_controller; - -typedef my_idct_controller * my_idct_ptr; - - -/* Allocated multiplier tables: big enough for any supported variant */ - -typedef union { - ISLOW_MULT_TYPE islow_array[DCTSIZE2]; -#ifdef DCT_IFAST_SUPPORTED - IFAST_MULT_TYPE ifast_array[DCTSIZE2]; -#endif -#ifdef DCT_FLOAT_SUPPORTED - FLOAT_MULT_TYPE float_array[DCTSIZE2]; -#endif -} multiplier_table; - - -/* The current scaled-IDCT routines require ISLOW-style multiplier tables, - * so be sure to compile that code if either ISLOW or SCALING is requested. - */ -#ifdef DCT_ISLOW_SUPPORTED -#define PROVIDE_ISLOW_TABLES -#else -#ifdef IDCT_SCALING_SUPPORTED -#define PROVIDE_ISLOW_TABLES -#endif -#endif - - -/* - * Prepare for an output pass. - * Here we select the proper IDCT routine for each component and build - * a matching multiplier table. - */ - -METHODDEF(void) -start_pass (j_decompress_ptr cinfo) -{ - my_idct_ptr idct = (my_idct_ptr) cinfo->idct; - int ci, i; - jpeg_component_info *compptr; - int method = 0; - inverse_DCT_method_ptr method_ptr = NULL; - JQUANT_TBL * qtbl; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Select the proper IDCT routine for this component's scaling */ - switch (compptr->DCT_scaled_size) { -#ifdef IDCT_SCALING_SUPPORTED - case 1: - method_ptr = jpeg_idct_1x1; - method = JDCT_ISLOW; /* jidctred uses islow-style table */ - break; - case 2: - method_ptr = jpeg_idct_2x2; - method = JDCT_ISLOW; /* jidctred uses islow-style table */ - break; - case 4: - method_ptr = jpeg_idct_4x4; - method = JDCT_ISLOW; /* jidctred uses islow-style table */ - break; -#endif - case DCTSIZE: - switch (cinfo->dct_method) { -#ifdef DCT_ISLOW_SUPPORTED - case JDCT_ISLOW: - method_ptr = jpeg_idct_islow; - method = JDCT_ISLOW; - break; -#endif -#ifdef DCT_IFAST_SUPPORTED - case JDCT_IFAST: - method_ptr = jpeg_idct_ifast; - method = JDCT_IFAST; - break; -#endif -#ifdef DCT_FLOAT_SUPPORTED - case JDCT_FLOAT: - method_ptr = jpeg_idct_float; - method = JDCT_FLOAT; - break; -#endif - default: - ERREXIT(cinfo, JERR_NOT_COMPILED); - break; - } - break; - default: - ERREXIT1(cinfo, JERR_BAD_DCTSIZE, compptr->DCT_scaled_size); - break; - } - idct->pub.inverse_DCT[ci] = method_ptr; - /* Create multiplier table from quant table. - * However, we can skip this if the component is uninteresting - * or if we already built the table. Also, if no quant table - * has yet been saved for the component, we leave the - * multiplier table all-zero; we'll be reading zeroes from the - * coefficient controller's buffer anyway. - */ - if (! compptr->component_needed || idct->cur_method[ci] == method) - continue; - qtbl = compptr->quant_table; - if (qtbl == NULL) /* happens if no data yet for component */ - continue; - idct->cur_method[ci] = method; - switch (method) { -#ifdef PROVIDE_ISLOW_TABLES - case JDCT_ISLOW: - { - /* For LL&M IDCT method, multipliers are equal to raw quantization - * coefficients, but are stored as ints to ensure access efficiency. - */ - ISLOW_MULT_TYPE * ismtbl = (ISLOW_MULT_TYPE *) compptr->dct_table; - for (i = 0; i < DCTSIZE2; i++) { - ismtbl[i] = (ISLOW_MULT_TYPE) qtbl->quantval[i]; - } - } - break; -#endif -#ifdef DCT_IFAST_SUPPORTED - case JDCT_IFAST: - { - /* For AA&N IDCT method, multipliers are equal to quantization - * coefficients scaled by scalefactor[row]*scalefactor[col], where - * scalefactor[0] = 1 - * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 - * For integer operation, the multiplier table is to be scaled by - * IFAST_SCALE_BITS. - */ - IFAST_MULT_TYPE * ifmtbl = (IFAST_MULT_TYPE *) compptr->dct_table; -#define CONST_BITS 14 - static const INT16 aanscales[DCTSIZE2] = { - /* precomputed values scaled up by 14 bits */ - 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, - 22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270, - 21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906, - 19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315, - 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, - 12873, 17855, 16819, 15137, 12873, 10114, 6967, 3552, - 8867, 12299, 11585, 10426, 8867, 6967, 4799, 2446, - 4520, 6270, 5906, 5315, 4520, 3552, 2446, 1247 - }; - SHIFT_TEMPS - - for (i = 0; i < DCTSIZE2; i++) { - ifmtbl[i] = (IFAST_MULT_TYPE) - DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i], - (INT32) aanscales[i]), - CONST_BITS-IFAST_SCALE_BITS); - } - } - break; -#endif -#ifdef DCT_FLOAT_SUPPORTED - case JDCT_FLOAT: - { - /* For float AA&N IDCT method, multipliers are equal to quantization - * coefficients scaled by scalefactor[row]*scalefactor[col], where - * scalefactor[0] = 1 - * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 - */ - FLOAT_MULT_TYPE * fmtbl = (FLOAT_MULT_TYPE *) compptr->dct_table; - int row, col; - static const double aanscalefactor[DCTSIZE] = { - 1.0, 1.387039845, 1.306562965, 1.175875602, - 1.0, 0.785694958, 0.541196100, 0.275899379 - }; - - i = 0; - for (row = 0; row < DCTSIZE; row++) { - for (col = 0; col < DCTSIZE; col++) { - fmtbl[i] = (FLOAT_MULT_TYPE) - ((double) qtbl->quantval[i] * - aanscalefactor[row] * aanscalefactor[col]); - i++; - } - } - } - break; -#endif - default: - ERREXIT(cinfo, JERR_NOT_COMPILED); - break; - } - } -} - - -/* - * Initialize IDCT manager. - */ - -GLOBAL(void) -jinit_inverse_dct (j_decompress_ptr cinfo) -{ - my_idct_ptr idct; - int ci; - jpeg_component_info *compptr; - - idct = (my_idct_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_idct_controller)); - cinfo->idct = (struct jpeg_inverse_dct *) idct; - idct->pub.start_pass = start_pass; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Allocate and pre-zero a multiplier table for each component */ - compptr->dct_table = - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(multiplier_table)); - MEMZERO(compptr->dct_table, SIZEOF(multiplier_table)); - /* Mark multiplier table not yet set up for any method */ - idct->cur_method[ci] = -1; - } -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jdhuff.c b/gtkmm-osx/trunk/jpeg-6b/jdhuff.c deleted file mode 100644 index b5ba39f..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jdhuff.c +++ /dev/null @@ -1,651 +0,0 @@ -/* - * jdhuff.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains Huffman entropy decoding routines. - * - * Much of the complexity here has to do with supporting input suspension. - * If the data source module demands suspension, we want to be able to back - * up to the start of the current MCU. To do this, we copy state variables - * into local working storage, and update them back to the permanent - * storage only upon successful completion of an MCU. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jdhuff.h" /* Declarations shared with jdphuff.c */ - - -/* - * Expanded entropy decoder object for Huffman decoding. - * - * The savable_state subrecord contains fields that change within an MCU, - * but must not be updated permanently until we complete the MCU. - */ - -typedef struct { - int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ -} savable_state; - -/* This macro is to work around compilers with missing or broken - * structure assignment. You'll need to fix this code if you have - * such a compiler and you change MAX_COMPS_IN_SCAN. - */ - -#ifndef NO_STRUCT_ASSIGN -#define ASSIGN_STATE(dest,src) ((dest) = (src)) -#else -#if MAX_COMPS_IN_SCAN == 4 -#define ASSIGN_STATE(dest,src) \ - ((dest).last_dc_val[0] = (src).last_dc_val[0], \ - (dest).last_dc_val[1] = (src).last_dc_val[1], \ - (dest).last_dc_val[2] = (src).last_dc_val[2], \ - (dest).last_dc_val[3] = (src).last_dc_val[3]) -#endif -#endif - - -typedef struct { - struct jpeg_entropy_decoder pub; /* public fields */ - - /* These fields are loaded into local variables at start of each MCU. - * In case of suspension, we exit WITHOUT updating them. - */ - bitread_perm_state bitstate; /* Bit buffer at start of MCU */ - savable_state saved; /* Other state at start of MCU */ - - /* These fields are NOT loaded into local working state. */ - unsigned int restarts_to_go; /* MCUs left in this restart interval */ - - /* Pointers to derived tables (these workspaces have image lifespan) */ - d_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS]; - d_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS]; - - /* Precalculated info set up by start_pass for use in decode_mcu: */ - - /* Pointers to derived tables to be used for each block within an MCU */ - d_derived_tbl * dc_cur_tbls[D_MAX_BLOCKS_IN_MCU]; - d_derived_tbl * ac_cur_tbls[D_MAX_BLOCKS_IN_MCU]; - /* Whether we care about the DC and AC coefficient values for each block */ - boolean dc_needed[D_MAX_BLOCKS_IN_MCU]; - boolean ac_needed[D_MAX_BLOCKS_IN_MCU]; -} huff_entropy_decoder; - -typedef huff_entropy_decoder * huff_entropy_ptr; - - -/* - * Initialize for a Huffman-compressed scan. - */ - -METHODDEF(void) -start_pass_huff_decoder (j_decompress_ptr cinfo) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int ci, blkn, dctbl, actbl; - jpeg_component_info * compptr; - - /* Check that the scan parameters Ss, Se, Ah/Al are OK for sequential JPEG. - * This ought to be an error condition, but we make it a warning because - * there are some baseline files out there with all zeroes in these bytes. - */ - if (cinfo->Ss != 0 || cinfo->Se != DCTSIZE2-1 || - cinfo->Ah != 0 || cinfo->Al != 0) - WARNMS(cinfo, JWRN_NOT_SEQUENTIAL); - - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - dctbl = compptr->dc_tbl_no; - actbl = compptr->ac_tbl_no; - /* Compute derived values for Huffman tables */ - /* We may do this more than once for a table, but it's not expensive */ - jpeg_make_d_derived_tbl(cinfo, TRUE, dctbl, - & entropy->dc_derived_tbls[dctbl]); - jpeg_make_d_derived_tbl(cinfo, FALSE, actbl, - & entropy->ac_derived_tbls[actbl]); - /* Initialize DC predictions to 0 */ - entropy->saved.last_dc_val[ci] = 0; - } - - /* Precalculate decoding info for each block in an MCU of this scan */ - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - ci = cinfo->MCU_membership[blkn]; - compptr = cinfo->cur_comp_info[ci]; - /* Precalculate which table to use for each block */ - entropy->dc_cur_tbls[blkn] = entropy->dc_derived_tbls[compptr->dc_tbl_no]; - entropy->ac_cur_tbls[blkn] = entropy->ac_derived_tbls[compptr->ac_tbl_no]; - /* Decide whether we really care about the coefficient values */ - if (compptr->component_needed) { - entropy->dc_needed[blkn] = TRUE; - /* we don't need the ACs if producing a 1/8th-size image */ - entropy->ac_needed[blkn] = (compptr->DCT_scaled_size > 1); - } else { - entropy->dc_needed[blkn] = entropy->ac_needed[blkn] = FALSE; - } - } - - /* Initialize bitread state variables */ - entropy->bitstate.bits_left = 0; - entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */ - entropy->pub.insufficient_data = FALSE; - - /* Initialize restart counter */ - entropy->restarts_to_go = cinfo->restart_interval; -} - - -/* - * Compute the derived values for a Huffman table. - * This routine also performs some validation checks on the table. - * - * Note this is also used by jdphuff.c. - */ - -GLOBAL(void) -jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno, - d_derived_tbl ** pdtbl) -{ - JHUFF_TBL *htbl; - d_derived_tbl *dtbl; - int p, i, l, si, numsymbols; - int lookbits, ctr; - char huffsize[257]; - unsigned int huffcode[257]; - unsigned int code; - - /* Note that huffsize[] and huffcode[] are filled in code-length order, - * paralleling the order of the symbols themselves in htbl->huffval[]. - */ - - /* Find the input Huffman table */ - if (tblno < 0 || tblno >= NUM_HUFF_TBLS) - ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno); - htbl = - isDC ? cinfo->dc_huff_tbl_ptrs[tblno] : cinfo->ac_huff_tbl_ptrs[tblno]; - if (htbl == NULL) - ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno); - - /* Allocate a workspace if we haven't already done so. */ - if (*pdtbl == NULL) - *pdtbl = (d_derived_tbl *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(d_derived_tbl)); - dtbl = *pdtbl; - dtbl->pub = htbl; /* fill in back link */ - - /* Figure C.1: make table of Huffman code length for each symbol */ - - p = 0; - for (l = 1; l <= 16; l++) { - i = (int) htbl->bits[l]; - if (i < 0 || p + i > 256) /* protect against table overrun */ - ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); - while (i--) - huffsize[p++] = (char) l; - } - huffsize[p] = 0; - numsymbols = p; - - /* Figure C.2: generate the codes themselves */ - /* We also validate that the counts represent a legal Huffman code tree. */ - - code = 0; - si = huffsize[0]; - p = 0; - while (huffsize[p]) { - while (((int) huffsize[p]) == si) { - huffcode[p++] = code; - code++; - } - /* code is now 1 more than the last code used for codelength si; but - * it must still fit in si bits, since no code is allowed to be all ones. - */ - if (((INT32) code) >= (((INT32) 1) << si)) - ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); - code <<= 1; - si++; - } - - /* Figure F.15: generate decoding tables for bit-sequential decoding */ - - p = 0; - for (l = 1; l <= 16; l++) { - if (htbl->bits[l]) { - /* valoffset[l] = huffval[] index of 1st symbol of code length l, - * minus the minimum code of length l - */ - dtbl->valoffset[l] = (INT32) p - (INT32) huffcode[p]; - p += htbl->bits[l]; - dtbl->maxcode[l] = huffcode[p-1]; /* maximum code of length l */ - } else { - dtbl->maxcode[l] = -1; /* -1 if no codes of this length */ - } - } - dtbl->maxcode[17] = 0xFFFFFL; /* ensures jpeg_huff_decode terminates */ - - /* Compute lookahead tables to speed up decoding. - * First we set all the table entries to 0, indicating "too long"; - * then we iterate through the Huffman codes that are short enough and - * fill in all the entries that correspond to bit sequences starting - * with that code. - */ - - MEMZERO(dtbl->look_nbits, SIZEOF(dtbl->look_nbits)); - - p = 0; - for (l = 1; l <= HUFF_LOOKAHEAD; l++) { - for (i = 1; i <= (int) htbl->bits[l]; i++, p++) { - /* l = current code's length, p = its index in huffcode[] & huffval[]. */ - /* Generate left-justified code followed by all possible bit sequences */ - lookbits = huffcode[p] << (HUFF_LOOKAHEAD-l); - for (ctr = 1 << (HUFF_LOOKAHEAD-l); ctr > 0; ctr--) { - dtbl->look_nbits[lookbits] = l; - dtbl->look_sym[lookbits] = htbl->huffval[p]; - lookbits++; - } - } - } - - /* Validate symbols as being reasonable. - * For AC tables, we make no check, but accept all byte values 0..255. - * For DC tables, we require the symbols to be in range 0..15. - * (Tighter bounds could be applied depending on the data depth and mode, - * but this is sufficient to ensure safe decoding.) - */ - if (isDC) { - for (i = 0; i < numsymbols; i++) { - int sym = htbl->huffval[i]; - if (sym < 0 || sym > 15) - ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); - } - } -} - - -/* - * Out-of-line code for bit fetching (shared with jdphuff.c). - * See jdhuff.h for info about usage. - * Note: current values of get_buffer and bits_left are passed as parameters, - * but are returned in the corresponding fields of the state struct. - * - * On most machines MIN_GET_BITS should be 25 to allow the full 32-bit width - * of get_buffer to be used. (On machines with wider words, an even larger - * buffer could be used.) However, on some machines 32-bit shifts are - * quite slow and take time proportional to the number of places shifted. - * (This is true with most PC compilers, for instance.) In this case it may - * be a win to set MIN_GET_BITS to the minimum value of 15. This reduces the - * average shift distance at the cost of more calls to jpeg_fill_bit_buffer. - */ - -#ifdef SLOW_SHIFT_32 -#define MIN_GET_BITS 15 /* minimum allowable value */ -#else -#define MIN_GET_BITS (BIT_BUF_SIZE-7) -#endif - - -GLOBAL(boolean) -jpeg_fill_bit_buffer (bitread_working_state * state, - register bit_buf_type get_buffer, register int bits_left, - int nbits) -/* Load up the bit buffer to a depth of at least nbits */ -{ - /* Copy heavily used state fields into locals (hopefully registers) */ - register const JOCTET * next_input_byte = state->next_input_byte; - register size_t bytes_in_buffer = state->bytes_in_buffer; - j_decompress_ptr cinfo = state->cinfo; - - /* Attempt to load at least MIN_GET_BITS bits into get_buffer. */ - /* (It is assumed that no request will be for more than that many bits.) */ - /* We fail to do so only if we hit a marker or are forced to suspend. */ - - if (cinfo->unread_marker == 0) { /* cannot advance past a marker */ - while (bits_left < MIN_GET_BITS) { - register int c; - - /* Attempt to read a byte */ - if (bytes_in_buffer == 0) { - if (! (*cinfo->src->fill_input_buffer) (cinfo)) - return FALSE; - next_input_byte = cinfo->src->next_input_byte; - bytes_in_buffer = cinfo->src->bytes_in_buffer; - } - bytes_in_buffer--; - c = GETJOCTET(*next_input_byte++); - - /* If it's 0xFF, check and discard stuffed zero byte */ - if (c == 0xFF) { - /* Loop here to discard any padding FF's on terminating marker, - * so that we can save a valid unread_marker value. NOTE: we will - * accept multiple FF's followed by a 0 as meaning a single FF data - * byte. This data pattern is not valid according to the standard. - */ - do { - if (bytes_in_buffer == 0) { - if (! (*cinfo->src->fill_input_buffer) (cinfo)) - return FALSE; - next_input_byte = cinfo->src->next_input_byte; - bytes_in_buffer = cinfo->src->bytes_in_buffer; - } - bytes_in_buffer--; - c = GETJOCTET(*next_input_byte++); - } while (c == 0xFF); - - if (c == 0) { - /* Found FF/00, which represents an FF data byte */ - c = 0xFF; - } else { - /* Oops, it's actually a marker indicating end of compressed data. - * Save the marker code for later use. - * Fine point: it might appear that we should save the marker into - * bitread working state, not straight into permanent state. But - * once we have hit a marker, we cannot need to suspend within the - * current MCU, because we will read no more bytes from the data - * source. So it is OK to update permanent state right away. - */ - cinfo->unread_marker = c; - /* See if we need to insert some fake zero bits. */ - goto no_more_bytes; - } - } - - /* OK, load c into get_buffer */ - get_buffer = (get_buffer << 8) | c; - bits_left += 8; - } /* end while */ - } else { - no_more_bytes: - /* We get here if we've read the marker that terminates the compressed - * data segment. There should be enough bits in the buffer register - * to satisfy the request; if so, no problem. - */ - if (nbits > bits_left) { - /* Uh-oh. Report corrupted data to user and stuff zeroes into - * the data stream, so that we can produce some kind of image. - * We use a nonvolatile flag to ensure that only one warning message - * appears per data segment. - */ - if (! cinfo->entropy->insufficient_data) { - WARNMS(cinfo, JWRN_HIT_MARKER); - cinfo->entropy->insufficient_data = TRUE; - } - /* Fill the buffer with zero bits */ - get_buffer <<= MIN_GET_BITS - bits_left; - bits_left = MIN_GET_BITS; - } - } - - /* Unload the local registers */ - state->next_input_byte = next_input_byte; - state->bytes_in_buffer = bytes_in_buffer; - state->get_buffer = get_buffer; - state->bits_left = bits_left; - - return TRUE; -} - - -/* - * Out-of-line code for Huffman code decoding. - * See jdhuff.h for info about usage. - */ - -GLOBAL(int) -jpeg_huff_decode (bitread_working_state * state, - register bit_buf_type get_buffer, register int bits_left, - d_derived_tbl * htbl, int min_bits) -{ - register int l = min_bits; - register INT32 code; - - /* HUFF_DECODE has determined that the code is at least min_bits */ - /* bits long, so fetch that many bits in one swoop. */ - - CHECK_BIT_BUFFER(*state, l, return -1); - code = GET_BITS(l); - - /* Collect the rest of the Huffman code one bit at a time. */ - /* This is per Figure F.16 in the JPEG spec. */ - - while (code > htbl->maxcode[l]) { - code <<= 1; - CHECK_BIT_BUFFER(*state, 1, return -1); - code |= GET_BITS(1); - l++; - } - - /* Unload the local registers */ - state->get_buffer = get_buffer; - state->bits_left = bits_left; - - /* With garbage input we may reach the sentinel value l = 17. */ - - if (l > 16) { - WARNMS(state->cinfo, JWRN_HUFF_BAD_CODE); - return 0; /* fake a zero as the safest result */ - } - - return htbl->pub->huffval[ (int) (code + htbl->valoffset[l]) ]; -} - - -/* - * Figure F.12: extend sign bit. - * On some machines, a shift and add will be faster than a table lookup. - */ - -#ifdef AVOID_TABLES - -#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x)) - -#else - -#define HUFF_EXTEND(x,s) ((x) < extend_test[s] ? (x) + extend_offset[s] : (x)) - -static const int extend_test[16] = /* entry n is 2**(n-1) */ - { 0, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, - 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 }; - -static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */ - { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1, - ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1, - ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1, - ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 }; - -#endif /* AVOID_TABLES */ - - -/* - * Check for a restart marker & resynchronize decoder. - * Returns FALSE if must suspend. - */ - -LOCAL(boolean) -process_restart (j_decompress_ptr cinfo) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int ci; - - /* Throw away any unused bits remaining in bit buffer; */ - /* include any full bytes in next_marker's count of discarded bytes */ - cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8; - entropy->bitstate.bits_left = 0; - - /* Advance past the RSTn marker */ - if (! (*cinfo->marker->read_restart_marker) (cinfo)) - return FALSE; - - /* Re-initialize DC predictions to 0 */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) - entropy->saved.last_dc_val[ci] = 0; - - /* Reset restart counter */ - entropy->restarts_to_go = cinfo->restart_interval; - - /* Reset out-of-data flag, unless read_restart_marker left us smack up - * against a marker. In that case we will end up treating the next data - * segment as empty, and we can avoid producing bogus output pixels by - * leaving the flag set. - */ - if (cinfo->unread_marker == 0) - entropy->pub.insufficient_data = FALSE; - - return TRUE; -} - - -/* - * Decode and return one MCU's worth of Huffman-compressed coefficients. - * The coefficients are reordered from zigzag order into natural array order, - * but are not dequantized. - * - * The i'th block of the MCU is stored into the block pointed to by - * MCU_data[i]. WE ASSUME THIS AREA HAS BEEN ZEROED BY THE CALLER. - * (Wholesale zeroing is usually a little faster than retail...) - * - * Returns FALSE if data source requested suspension. In that case no - * changes have been made to permanent state. (Exception: some output - * coefficients may already have been assigned. This is harmless for - * this module, since we'll just re-assign them on the next call.) - */ - -METHODDEF(boolean) -decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) -{ - huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; - int blkn; - BITREAD_STATE_VARS; - savable_state state; - - /* Process restart marker if needed; may have to suspend */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) - if (! process_restart(cinfo)) - return FALSE; - } - - /* If we've run out of data, just leave the MCU set to zeroes. - * This way, we return uniform gray for the remainder of the segment. - */ - if (! entropy->pub.insufficient_data) { - - /* Load up working state */ - BITREAD_LOAD_STATE(cinfo,entropy->bitstate); - ASSIGN_STATE(state, entropy->saved); - - /* Outer loop handles each block in the MCU */ - - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - JBLOCKROW block = MCU_data[blkn]; - d_derived_tbl * dctbl = entropy->dc_cur_tbls[blkn]; - d_derived_tbl * actbl = entropy->ac_cur_tbls[blkn]; - register int s, k, r; - - /* Decode a single block's worth of coefficients */ - - /* Section F.2.2.1: decode the DC coefficient difference */ - HUFF_DECODE(s, br_state, dctbl, return FALSE, label1); - if (s) { - CHECK_BIT_BUFFER(br_state, s, return FALSE); - r = GET_BITS(s); - s = HUFF_EXTEND(r, s); - } - - if (entropy->dc_needed[blkn]) { - /* Convert DC difference to actual value, update last_dc_val */ - int ci = cinfo->MCU_membership[blkn]; - s += state.last_dc_val[ci]; - state.last_dc_val[ci] = s; - /* Output the DC coefficient (assumes jpeg_natural_order[0] = 0) */ - (*block)[0] = (JCOEF) s; - } - - if (entropy->ac_needed[blkn]) { - - /* Section F.2.2.2: decode the AC coefficients */ - /* Since zeroes are skipped, output area must be cleared beforehand */ - for (k = 1; k < DCTSIZE2; k++) { - HUFF_DECODE(s, br_state, actbl, return FALSE, label2); - - r = s >> 4; - s &= 15; - - if (s) { - k += r; - CHECK_BIT_BUFFER(br_state, s, return FALSE); - r = GET_BITS(s); - s = HUFF_EXTEND(r, s); - /* Output coefficient in natural (dezigzagged) order. - * Note: the extra entries in jpeg_natural_order[] will save us - * if k >= DCTSIZE2, which could happen if the data is corrupted. - */ - (*block)[jpeg_natural_order[k]] = (JCOEF) s; - } else { - if (r != 15) - break; - k += 15; - } - } - - } else { - - /* Section F.2.2.2: decode the AC coefficients */ - /* In this path we just discard the values */ - for (k = 1; k < DCTSIZE2; k++) { - HUFF_DECODE(s, br_state, actbl, return FALSE, label3); - - r = s >> 4; - s &= 15; - - if (s) { - k += r; - CHECK_BIT_BUFFER(br_state, s, return FALSE); - DROP_BITS(s); - } else { - if (r != 15) - break; - k += 15; - } - } - - } - } - - /* Completed MCU, so update state */ - BITREAD_SAVE_STATE(cinfo,entropy->bitstate); - ASSIGN_STATE(entropy->saved, state); - } - - /* Account for restart interval (no-op if not using restarts) */ - entropy->restarts_to_go--; - - return TRUE; -} - - -/* - * Module initialization routine for Huffman entropy decoding. - */ - -GLOBAL(void) -jinit_huff_decoder (j_decompress_ptr cinfo) -{ - huff_entropy_ptr entropy; - int i; - - entropy = (huff_entropy_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(huff_entropy_decoder)); - cinfo->entropy = (struct jpeg_entropy_decoder *) entropy; - entropy->pub.start_pass = start_pass_huff_decoder; - entropy->pub.decode_mcu = decode_mcu; - - /* Mark tables unallocated */ - for (i = 0; i < NUM_HUFF_TBLS; i++) { - entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL; - } -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jdhuff.h b/gtkmm-osx/trunk/jpeg-6b/jdhuff.h deleted file mode 100644 index ae19b6c..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jdhuff.h +++ /dev/null @@ -1,201 +0,0 @@ -/* - * jdhuff.h - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains declarations for Huffman entropy decoding routines - * that are shared between the sequential decoder (jdhuff.c) and the - * progressive decoder (jdphuff.c). No other modules need to see these. - */ - -/* Short forms of external names for systems with brain-damaged linkers. */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jpeg_make_d_derived_tbl jMkDDerived -#define jpeg_fill_bit_buffer jFilBitBuf -#define jpeg_huff_decode jHufDecode -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - - -/* Derived data constructed for each Huffman table */ - -#define HUFF_LOOKAHEAD 8 /* # of bits of lookahead */ - -typedef struct { - /* Basic tables: (element [0] of each array is unused) */ - INT32 maxcode[18]; /* largest code of length k (-1 if none) */ - /* (maxcode[17] is a sentinel to ensure jpeg_huff_decode terminates) */ - INT32 valoffset[17]; /* huffval[] offset for codes of length k */ - /* valoffset[k] = huffval[] index of 1st symbol of code length k, less - * the smallest code of length k; so given a code of length k, the - * corresponding symbol is huffval[code + valoffset[k]] - */ - - /* Link to public Huffman table (needed only in jpeg_huff_decode) */ - JHUFF_TBL *pub; - - /* Lookahead tables: indexed by the next HUFF_LOOKAHEAD bits of - * the input data stream. If the next Huffman code is no more - * than HUFF_LOOKAHEAD bits long, we can obtain its length and - * the corresponding symbol directly from these tables. - */ - int look_nbits[1< 32 bits on your machine, and shifting/masking longs is - * reasonably fast, making bit_buf_type be long and setting BIT_BUF_SIZE - * appropriately should be a win. Unfortunately we can't define the size - * with something like #define BIT_BUF_SIZE (sizeof(bit_buf_type)*8) - * because not all machines measure sizeof in 8-bit bytes. - */ - -typedef struct { /* Bitreading state saved across MCUs */ - bit_buf_type get_buffer; /* current bit-extraction buffer */ - int bits_left; /* # of unused bits in it */ -} bitread_perm_state; - -typedef struct { /* Bitreading working state within an MCU */ - /* Current data source location */ - /* We need a copy, rather than munging the original, in case of suspension */ - const JOCTET * next_input_byte; /* => next byte to read from source */ - size_t bytes_in_buffer; /* # of bytes remaining in source buffer */ - /* Bit input buffer --- note these values are kept in register variables, - * not in this struct, inside the inner loops. - */ - bit_buf_type get_buffer; /* current bit-extraction buffer */ - int bits_left; /* # of unused bits in it */ - /* Pointer needed by jpeg_fill_bit_buffer. */ - j_decompress_ptr cinfo; /* back link to decompress master record */ -} bitread_working_state; - -/* Macros to declare and load/save bitread local variables. */ -#define BITREAD_STATE_VARS \ - register bit_buf_type get_buffer; \ - register int bits_left; \ - bitread_working_state br_state - -#define BITREAD_LOAD_STATE(cinfop,permstate) \ - br_state.cinfo = cinfop; \ - br_state.next_input_byte = cinfop->src->next_input_byte; \ - br_state.bytes_in_buffer = cinfop->src->bytes_in_buffer; \ - get_buffer = permstate.get_buffer; \ - bits_left = permstate.bits_left; - -#define BITREAD_SAVE_STATE(cinfop,permstate) \ - cinfop->src->next_input_byte = br_state.next_input_byte; \ - cinfop->src->bytes_in_buffer = br_state.bytes_in_buffer; \ - permstate.get_buffer = get_buffer; \ - permstate.bits_left = bits_left - -/* - * These macros provide the in-line portion of bit fetching. - * Use CHECK_BIT_BUFFER to ensure there are N bits in get_buffer - * before using GET_BITS, PEEK_BITS, or DROP_BITS. - * The variables get_buffer and bits_left are assumed to be locals, - * but the state struct might not be (jpeg_huff_decode needs this). - * CHECK_BIT_BUFFER(state,n,action); - * Ensure there are N bits in get_buffer; if suspend, take action. - * val = GET_BITS(n); - * Fetch next N bits. - * val = PEEK_BITS(n); - * Fetch next N bits without removing them from the buffer. - * DROP_BITS(n); - * Discard next N bits. - * The value N should be a simple variable, not an expression, because it - * is evaluated multiple times. - */ - -#define CHECK_BIT_BUFFER(state,nbits,action) \ - { if (bits_left < (nbits)) { \ - if (! jpeg_fill_bit_buffer(&(state),get_buffer,bits_left,nbits)) \ - { action; } \ - get_buffer = (state).get_buffer; bits_left = (state).bits_left; } } - -#define GET_BITS(nbits) \ - (((int) (get_buffer >> (bits_left -= (nbits)))) & ((1<<(nbits))-1)) - -#define PEEK_BITS(nbits) \ - (((int) (get_buffer >> (bits_left - (nbits)))) & ((1<<(nbits))-1)) - -#define DROP_BITS(nbits) \ - (bits_left -= (nbits)) - -/* Load up the bit buffer to a depth of at least nbits */ -EXTERN(boolean) jpeg_fill_bit_buffer - JPP((bitread_working_state * state, register bit_buf_type get_buffer, - register int bits_left, int nbits)); - - -/* - * Code for extracting next Huffman-coded symbol from input bit stream. - * Again, this is time-critical and we make the main paths be macros. - * - * We use a lookahead table to process codes of up to HUFF_LOOKAHEAD bits - * without looping. Usually, more than 95% of the Huffman codes will be 8 - * or fewer bits long. The few overlength codes are handled with a loop, - * which need not be inline code. - * - * Notes about the HUFF_DECODE macro: - * 1. Near the end of the data segment, we may fail to get enough bits - * for a lookahead. In that case, we do it the hard way. - * 2. If the lookahead table contains no entry, the next code must be - * more than HUFF_LOOKAHEAD bits long. - * 3. jpeg_huff_decode returns -1 if forced to suspend. - */ - -#define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \ -{ register int nb, look; \ - if (bits_left < HUFF_LOOKAHEAD) { \ - if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \ - get_buffer = state.get_buffer; bits_left = state.bits_left; \ - if (bits_left < HUFF_LOOKAHEAD) { \ - nb = 1; goto slowlabel; \ - } \ - } \ - look = PEEK_BITS(HUFF_LOOKAHEAD); \ - if ((nb = htbl->look_nbits[look]) != 0) { \ - DROP_BITS(nb); \ - result = htbl->look_sym[look]; \ - } else { \ - nb = HUFF_LOOKAHEAD+1; \ -slowlabel: \ - if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \ - { failaction; } \ - get_buffer = state.get_buffer; bits_left = state.bits_left; \ - } \ -} - -/* Out-of-line case for Huffman code fetching */ -EXTERN(int) jpeg_huff_decode - JPP((bitread_working_state * state, register bit_buf_type get_buffer, - register int bits_left, d_derived_tbl * htbl, int min_bits)); diff --git a/gtkmm-osx/trunk/jpeg-6b/jdinput.c b/gtkmm-osx/trunk/jpeg-6b/jdinput.c deleted file mode 100644 index 0c2ac8f..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jdinput.c +++ /dev/null @@ -1,381 +0,0 @@ -/* - * jdinput.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains input control logic for the JPEG decompressor. - * These routines are concerned with controlling the decompressor's input - * processing (marker reading and coefficient decoding). The actual input - * reading is done in jdmarker.c, jdhuff.c, and jdphuff.c. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Private state */ - -typedef struct { - struct jpeg_input_controller pub; /* public fields */ - - boolean inheaders; /* TRUE until first SOS is reached */ -} my_input_controller; - -typedef my_input_controller * my_inputctl_ptr; - - -/* Forward declarations */ -METHODDEF(int) consume_markers JPP((j_decompress_ptr cinfo)); - - -/* - * Routines to calculate various quantities related to the size of the image. - */ - -LOCAL(void) -initial_setup (j_decompress_ptr cinfo) -/* Called once, when first SOS marker is reached */ -{ - int ci; - jpeg_component_info *compptr; - - /* Make sure image isn't bigger than I can handle */ - if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION || - (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION) - ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION); - - /* For now, precision must match compiled-in value... */ - if (cinfo->data_precision != BITS_IN_JSAMPLE) - ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision); - - /* Check that number of components won't exceed internal array sizes */ - if (cinfo->num_components > MAX_COMPONENTS) - ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, - MAX_COMPONENTS); - - /* Compute maximum sampling factors; check factor validity */ - cinfo->max_h_samp_factor = 1; - cinfo->max_v_samp_factor = 1; - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR || - compptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR) - ERREXIT(cinfo, JERR_BAD_SAMPLING); - cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor, - compptr->h_samp_factor); - cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor, - compptr->v_samp_factor); - } - - /* We initialize DCT_scaled_size and min_DCT_scaled_size to DCTSIZE. - * In the full decompressor, this will be overridden by jdmaster.c; - * but in the transcoder, jdmaster.c is not used, so we must do it here. - */ - cinfo->min_DCT_scaled_size = DCTSIZE; - - /* Compute dimensions of components */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - compptr->DCT_scaled_size = DCTSIZE; - /* Size in DCT blocks */ - compptr->width_in_blocks = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, - (long) (cinfo->max_h_samp_factor * DCTSIZE)); - compptr->height_in_blocks = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, - (long) (cinfo->max_v_samp_factor * DCTSIZE)); - /* downsampled_width and downsampled_height will also be overridden by - * jdmaster.c if we are doing full decompression. The transcoder library - * doesn't use these values, but the calling application might. - */ - /* Size in samples */ - compptr->downsampled_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, - (long) cinfo->max_h_samp_factor); - compptr->downsampled_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, - (long) cinfo->max_v_samp_factor); - /* Mark component needed, until color conversion says otherwise */ - compptr->component_needed = TRUE; - /* Mark no quantization table yet saved for component */ - compptr->quant_table = NULL; - } - - /* Compute number of fully interleaved MCU rows. */ - cinfo->total_iMCU_rows = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height, - (long) (cinfo->max_v_samp_factor*DCTSIZE)); - - /* Decide whether file contains multiple scans */ - if (cinfo->comps_in_scan < cinfo->num_components || cinfo->progressive_mode) - cinfo->inputctl->has_multiple_scans = TRUE; - else - cinfo->inputctl->has_multiple_scans = FALSE; -} - - -LOCAL(void) -per_scan_setup (j_decompress_ptr cinfo) -/* Do computations that are needed before processing a JPEG scan */ -/* cinfo->comps_in_scan and cinfo->cur_comp_info[] were set from SOS marker */ -{ - int ci, mcublks, tmp; - jpeg_component_info *compptr; - - if (cinfo->comps_in_scan == 1) { - - /* Noninterleaved (single-component) scan */ - compptr = cinfo->cur_comp_info[0]; - - /* Overall image size in MCUs */ - cinfo->MCUs_per_row = compptr->width_in_blocks; - cinfo->MCU_rows_in_scan = compptr->height_in_blocks; - - /* For noninterleaved scan, always one block per MCU */ - compptr->MCU_width = 1; - compptr->MCU_height = 1; - compptr->MCU_blocks = 1; - compptr->MCU_sample_width = compptr->DCT_scaled_size; - compptr->last_col_width = 1; - /* For noninterleaved scans, it is convenient to define last_row_height - * as the number of block rows present in the last iMCU row. - */ - tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor); - if (tmp == 0) tmp = compptr->v_samp_factor; - compptr->last_row_height = tmp; - - /* Prepare array describing MCU composition */ - cinfo->blocks_in_MCU = 1; - cinfo->MCU_membership[0] = 0; - - } else { - - /* Interleaved (multi-component) scan */ - if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN) - ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan, - MAX_COMPS_IN_SCAN); - - /* Overall image size in MCUs */ - cinfo->MCUs_per_row = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width, - (long) (cinfo->max_h_samp_factor*DCTSIZE)); - cinfo->MCU_rows_in_scan = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height, - (long) (cinfo->max_v_samp_factor*DCTSIZE)); - - cinfo->blocks_in_MCU = 0; - - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - /* Sampling factors give # of blocks of component in each MCU */ - compptr->MCU_width = compptr->h_samp_factor; - compptr->MCU_height = compptr->v_samp_factor; - compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height; - compptr->MCU_sample_width = compptr->MCU_width * compptr->DCT_scaled_size; - /* Figure number of non-dummy blocks in last MCU column & row */ - tmp = (int) (compptr->width_in_blocks % compptr->MCU_width); - if (tmp == 0) tmp = compptr->MCU_width; - compptr->last_col_width = tmp; - tmp = (int) (compptr->height_in_blocks % compptr->MCU_height); - if (tmp == 0) tmp = compptr->MCU_height; - compptr->last_row_height = tmp; - /* Prepare array describing MCU composition */ - mcublks = compptr->MCU_blocks; - if (cinfo->blocks_in_MCU + mcublks > D_MAX_BLOCKS_IN_MCU) - ERREXIT(cinfo, JERR_BAD_MCU_SIZE); - while (mcublks-- > 0) { - cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci; - } - } - - } -} - - -/* - * Save away a copy of the Q-table referenced by each component present - * in the current scan, unless already saved during a prior scan. - * - * In a multiple-scan JPEG file, the encoder could assign different components - * the same Q-table slot number, but change table definitions between scans - * so that each component uses a different Q-table. (The IJG encoder is not - * currently capable of doing this, but other encoders might.) Since we want - * to be able to dequantize all the components at the end of the file, this - * means that we have to save away the table actually used for each component. - * We do this by copying the table at the start of the first scan containing - * the component. - * The JPEG spec prohibits the encoder from changing the contents of a Q-table - * slot between scans of a component using that slot. If the encoder does so - * anyway, this decoder will simply use the Q-table values that were current - * at the start of the first scan for the component. - * - * The decompressor output side looks only at the saved quant tables, - * not at the current Q-table slots. - */ - -LOCAL(void) -latch_quant_tables (j_decompress_ptr cinfo) -{ - int ci, qtblno; - jpeg_component_info *compptr; - JQUANT_TBL * qtbl; - - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - /* No work if we already saved Q-table for this component */ - if (compptr->quant_table != NULL) - continue; - /* Make sure specified quantization table is present */ - qtblno = compptr->quant_tbl_no; - if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS || - cinfo->quant_tbl_ptrs[qtblno] == NULL) - ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno); - /* OK, save away the quantization table */ - qtbl = (JQUANT_TBL *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(JQUANT_TBL)); - MEMCOPY(qtbl, cinfo->quant_tbl_ptrs[qtblno], SIZEOF(JQUANT_TBL)); - compptr->quant_table = qtbl; - } -} - - -/* - * Initialize the input modules to read a scan of compressed data. - * The first call to this is done by jdmaster.c after initializing - * the entire decompressor (during jpeg_start_decompress). - * Subsequent calls come from consume_markers, below. - */ - -METHODDEF(void) -start_input_pass (j_decompress_ptr cinfo) -{ - per_scan_setup(cinfo); - latch_quant_tables(cinfo); - (*cinfo->entropy->start_pass) (cinfo); - (*cinfo->coef->start_input_pass) (cinfo); - cinfo->inputctl->consume_input = cinfo->coef->consume_data; -} - - -/* - * Finish up after inputting a compressed-data scan. - * This is called by the coefficient controller after it's read all - * the expected data of the scan. - */ - -METHODDEF(void) -finish_input_pass (j_decompress_ptr cinfo) -{ - cinfo->inputctl->consume_input = consume_markers; -} - - -/* - * Read JPEG markers before, between, or after compressed-data scans. - * Change state as necessary when a new scan is reached. - * Return value is JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. - * - * The consume_input method pointer points either here or to the - * coefficient controller's consume_data routine, depending on whether - * we are reading a compressed data segment or inter-segment markers. - */ - -METHODDEF(int) -consume_markers (j_decompress_ptr cinfo) -{ - my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl; - int val; - - if (inputctl->pub.eoi_reached) /* After hitting EOI, read no further */ - return JPEG_REACHED_EOI; - - val = (*cinfo->marker->read_markers) (cinfo); - - switch (val) { - case JPEG_REACHED_SOS: /* Found SOS */ - if (inputctl->inheaders) { /* 1st SOS */ - initial_setup(cinfo); - inputctl->inheaders = FALSE; - /* Note: start_input_pass must be called by jdmaster.c - * before any more input can be consumed. jdapimin.c is - * responsible for enforcing this sequencing. - */ - } else { /* 2nd or later SOS marker */ - if (! inputctl->pub.has_multiple_scans) - ERREXIT(cinfo, JERR_EOI_EXPECTED); /* Oops, I wasn't expecting this! */ - start_input_pass(cinfo); - } - break; - case JPEG_REACHED_EOI: /* Found EOI */ - inputctl->pub.eoi_reached = TRUE; - if (inputctl->inheaders) { /* Tables-only datastream, apparently */ - if (cinfo->marker->saw_SOF) - ERREXIT(cinfo, JERR_SOF_NO_SOS); - } else { - /* Prevent infinite loop in coef ctlr's decompress_data routine - * if user set output_scan_number larger than number of scans. - */ - if (cinfo->output_scan_number > cinfo->input_scan_number) - cinfo->output_scan_number = cinfo->input_scan_number; - } - break; - case JPEG_SUSPENDED: - break; - } - - return val; -} - - -/* - * Reset state to begin a fresh datastream. - */ - -METHODDEF(void) -reset_input_controller (j_decompress_ptr cinfo) -{ - my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl; - - inputctl->pub.consume_input = consume_markers; - inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */ - inputctl->pub.eoi_reached = FALSE; - inputctl->inheaders = TRUE; - /* Reset other modules */ - (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); - (*cinfo->marker->reset_marker_reader) (cinfo); - /* Reset progression state -- would be cleaner if entropy decoder did this */ - cinfo->coef_bits = NULL; -} - - -/* - * Initialize the input controller module. - * This is called only once, when the decompression object is created. - */ - -GLOBAL(void) -jinit_input_controller (j_decompress_ptr cinfo) -{ - my_inputctl_ptr inputctl; - - /* Create subobject in permanent pool */ - inputctl = (my_inputctl_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - SIZEOF(my_input_controller)); - cinfo->inputctl = (struct jpeg_input_controller *) inputctl; - /* Initialize method pointers */ - inputctl->pub.consume_input = consume_markers; - inputctl->pub.reset_input_controller = reset_input_controller; - inputctl->pub.start_input_pass = start_input_pass; - inputctl->pub.finish_input_pass = finish_input_pass; - /* Initialize state: can't use reset_input_controller since we don't - * want to try to reset other modules yet. - */ - inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */ - inputctl->pub.eoi_reached = FALSE; - inputctl->inheaders = TRUE; -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jdmainct.c b/gtkmm-osx/trunk/jpeg-6b/jdmainct.c deleted file mode 100644 index 13c956f..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jdmainct.c +++ /dev/null @@ -1,512 +0,0 @@ -/* - * jdmainct.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains the main buffer controller for decompression. - * The main buffer lies between the JPEG decompressor proper and the - * post-processor; it holds downsampled data in the JPEG colorspace. - * - * Note that this code is bypassed in raw-data mode, since the application - * supplies the equivalent of the main buffer in that case. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* - * In the current system design, the main buffer need never be a full-image - * buffer; any full-height buffers will be found inside the coefficient or - * postprocessing controllers. Nonetheless, the main controller is not - * trivial. Its responsibility is to provide context rows for upsampling/ - * rescaling, and doing this in an efficient fashion is a bit tricky. - * - * Postprocessor input data is counted in "row groups". A row group - * is defined to be (v_samp_factor * DCT_scaled_size / min_DCT_scaled_size) - * sample rows of each component. (We require DCT_scaled_size values to be - * chosen such that these numbers are integers. In practice DCT_scaled_size - * values will likely be powers of two, so we actually have the stronger - * condition that DCT_scaled_size / min_DCT_scaled_size is an integer.) - * Upsampling will typically produce max_v_samp_factor pixel rows from each - * row group (times any additional scale factor that the upsampler is - * applying). - * - * The coefficient controller will deliver data to us one iMCU row at a time; - * each iMCU row contains v_samp_factor * DCT_scaled_size sample rows, or - * exactly min_DCT_scaled_size row groups. (This amount of data corresponds - * to one row of MCUs when the image is fully interleaved.) Note that the - * number of sample rows varies across components, but the number of row - * groups does not. Some garbage sample rows may be included in the last iMCU - * row at the bottom of the image. - * - * Depending on the vertical scaling algorithm used, the upsampler may need - * access to the sample row(s) above and below its current input row group. - * The upsampler is required to set need_context_rows TRUE at global selection - * time if so. When need_context_rows is FALSE, this controller can simply - * obtain one iMCU row at a time from the coefficient controller and dole it - * out as row groups to the postprocessor. - * - * When need_context_rows is TRUE, this controller guarantees that the buffer - * passed to postprocessing contains at least one row group's worth of samples - * above and below the row group(s) being processed. Note that the context - * rows "above" the first passed row group appear at negative row offsets in - * the passed buffer. At the top and bottom of the image, the required - * context rows are manufactured by duplicating the first or last real sample - * row; this avoids having special cases in the upsampling inner loops. - * - * The amount of context is fixed at one row group just because that's a - * convenient number for this controller to work with. The existing - * upsamplers really only need one sample row of context. An upsampler - * supporting arbitrary output rescaling might wish for more than one row - * group of context when shrinking the image; tough, we don't handle that. - * (This is justified by the assumption that downsizing will be handled mostly - * by adjusting the DCT_scaled_size values, so that the actual scale factor at - * the upsample step needn't be much less than one.) - * - * To provide the desired context, we have to retain the last two row groups - * of one iMCU row while reading in the next iMCU row. (The last row group - * can't be processed until we have another row group for its below-context, - * and so we have to save the next-to-last group too for its above-context.) - * We could do this most simply by copying data around in our buffer, but - * that'd be very slow. We can avoid copying any data by creating a rather - * strange pointer structure. Here's how it works. We allocate a workspace - * consisting of M+2 row groups (where M = min_DCT_scaled_size is the number - * of row groups per iMCU row). We create two sets of redundant pointers to - * the workspace. Labeling the physical row groups 0 to M+1, the synthesized - * pointer lists look like this: - * M+1 M-1 - * master pointer --> 0 master pointer --> 0 - * 1 1 - * ... ... - * M-3 M-3 - * M-2 M - * M-1 M+1 - * M M-2 - * M+1 M-1 - * 0 0 - * We read alternate iMCU rows using each master pointer; thus the last two - * row groups of the previous iMCU row remain un-overwritten in the workspace. - * The pointer lists are set up so that the required context rows appear to - * be adjacent to the proper places when we pass the pointer lists to the - * upsampler. - * - * The above pictures describe the normal state of the pointer lists. - * At top and bottom of the image, we diddle the pointer lists to duplicate - * the first or last sample row as necessary (this is cheaper than copying - * sample rows around). - * - * This scheme breaks down if M < 2, ie, min_DCT_scaled_size is 1. In that - * situation each iMCU row provides only one row group so the buffering logic - * must be different (eg, we must read two iMCU rows before we can emit the - * first row group). For now, we simply do not support providing context - * rows when min_DCT_scaled_size is 1. That combination seems unlikely to - * be worth providing --- if someone wants a 1/8th-size preview, they probably - * want it quick and dirty, so a context-free upsampler is sufficient. - */ - - -/* Private buffer controller object */ - -typedef struct { - struct jpeg_d_main_controller pub; /* public fields */ - - /* Pointer to allocated workspace (M or M+2 row groups). */ - JSAMPARRAY buffer[MAX_COMPONENTS]; - - boolean buffer_full; /* Have we gotten an iMCU row from decoder? */ - JDIMENSION rowgroup_ctr; /* counts row groups output to postprocessor */ - - /* Remaining fields are only used in the context case. */ - - /* These are the master pointers to the funny-order pointer lists. */ - JSAMPIMAGE xbuffer[2]; /* pointers to weird pointer lists */ - - int whichptr; /* indicates which pointer set is now in use */ - int context_state; /* process_data state machine status */ - JDIMENSION rowgroups_avail; /* row groups available to postprocessor */ - JDIMENSION iMCU_row_ctr; /* counts iMCU rows to detect image top/bot */ -} my_main_controller; - -typedef my_main_controller * my_main_ptr; - -/* context_state values: */ -#define CTX_PREPARE_FOR_IMCU 0 /* need to prepare for MCU row */ -#define CTX_PROCESS_IMCU 1 /* feeding iMCU to postprocessor */ -#define CTX_POSTPONED_ROW 2 /* feeding postponed row group */ - - -/* Forward declarations */ -METHODDEF(void) process_data_simple_main - JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, - JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)); -METHODDEF(void) process_data_context_main - JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, - JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)); -#ifdef QUANT_2PASS_SUPPORTED -METHODDEF(void) process_data_crank_post - JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, - JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)); -#endif - - -LOCAL(void) -alloc_funny_pointers (j_decompress_ptr cinfo) -/* Allocate space for the funny pointer lists. - * This is done only once, not once per pass. - */ -{ - my_main_ptr main = (my_main_ptr) cinfo->main; - int ci, rgroup; - int M = cinfo->min_DCT_scaled_size; - jpeg_component_info *compptr; - JSAMPARRAY xbuf; - - /* Get top-level space for component array pointers. - * We alloc both arrays with one call to save a few cycles. - */ - main->xbuffer[0] = (JSAMPIMAGE) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - cinfo->num_components * 2 * SIZEOF(JSAMPARRAY)); - main->xbuffer[1] = main->xbuffer[0] + cinfo->num_components; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / - cinfo->min_DCT_scaled_size; /* height of a row group of component */ - /* Get space for pointer lists --- M+4 row groups in each list. - * We alloc both pointer lists with one call to save a few cycles. - */ - xbuf = (JSAMPARRAY) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - 2 * (rgroup * (M + 4)) * SIZEOF(JSAMPROW)); - xbuf += rgroup; /* want one row group at negative offsets */ - main->xbuffer[0][ci] = xbuf; - xbuf += rgroup * (M + 4); - main->xbuffer[1][ci] = xbuf; - } -} - - -LOCAL(void) -make_funny_pointers (j_decompress_ptr cinfo) -/* Create the funny pointer lists discussed in the comments above. - * The actual workspace is already allocated (in main->buffer), - * and the space for the pointer lists is allocated too. - * This routine just fills in the curiously ordered lists. - * This will be repeated at the beginning of each pass. - */ -{ - my_main_ptr main = (my_main_ptr) cinfo->main; - int ci, i, rgroup; - int M = cinfo->min_DCT_scaled_size; - jpeg_component_info *compptr; - JSAMPARRAY buf, xbuf0, xbuf1; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / - cinfo->min_DCT_scaled_size; /* height of a row group of component */ - xbuf0 = main->xbuffer[0][ci]; - xbuf1 = main->xbuffer[1][ci]; - /* First copy the workspace pointers as-is */ - buf = main->buffer[ci]; - for (i = 0; i < rgroup * (M + 2); i++) { - xbuf0[i] = xbuf1[i] = buf[i]; - } - /* In the second list, put the last four row groups in swapped order */ - for (i = 0; i < rgroup * 2; i++) { - xbuf1[rgroup*(M-2) + i] = buf[rgroup*M + i]; - xbuf1[rgroup*M + i] = buf[rgroup*(M-2) + i]; - } - /* The wraparound pointers at top and bottom will be filled later - * (see set_wraparound_pointers, below). Initially we want the "above" - * pointers to duplicate the first actual data line. This only needs - * to happen in xbuffer[0]. - */ - for (i = 0; i < rgroup; i++) { - xbuf0[i - rgroup] = xbuf0[0]; - } - } -} - - -LOCAL(void) -set_wraparound_pointers (j_decompress_ptr cinfo) -/* Set up the "wraparound" pointers at top and bottom of the pointer lists. - * This changes the pointer list state from top-of-image to the normal state. - */ -{ - my_main_ptr main = (my_main_ptr) cinfo->main; - int ci, i, rgroup; - int M = cinfo->min_DCT_scaled_size; - jpeg_component_info *compptr; - JSAMPARRAY xbuf0, xbuf1; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / - cinfo->min_DCT_scaled_size; /* height of a row group of component */ - xbuf0 = main->xbuffer[0][ci]; - xbuf1 = main->xbuffer[1][ci]; - for (i = 0; i < rgroup; i++) { - xbuf0[i - rgroup] = xbuf0[rgroup*(M+1) + i]; - xbuf1[i - rgroup] = xbuf1[rgroup*(M+1) + i]; - xbuf0[rgroup*(M+2) + i] = xbuf0[i]; - xbuf1[rgroup*(M+2) + i] = xbuf1[i]; - } - } -} - - -LOCAL(void) -set_bottom_pointers (j_decompress_ptr cinfo) -/* Change the pointer lists to duplicate the last sample row at the bottom - * of the image. whichptr indicates which xbuffer holds the final iMCU row. - * Also sets rowgroups_avail to indicate number of nondummy row groups in row. - */ -{ - my_main_ptr main = (my_main_ptr) cinfo->main; - int ci, i, rgroup, iMCUheight, rows_left; - jpeg_component_info *compptr; - JSAMPARRAY xbuf; - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Count sample rows in one iMCU row and in one row group */ - iMCUheight = compptr->v_samp_factor * compptr->DCT_scaled_size; - rgroup = iMCUheight / cinfo->min_DCT_scaled_size; - /* Count nondummy sample rows remaining for this component */ - rows_left = (int) (compptr->downsampled_height % (JDIMENSION) iMCUheight); - if (rows_left == 0) rows_left = iMCUheight; - /* Count nondummy row groups. Should get same answer for each component, - * so we need only do it once. - */ - if (ci == 0) { - main->rowgroups_avail = (JDIMENSION) ((rows_left-1) / rgroup + 1); - } - /* Duplicate the last real sample row rgroup*2 times; this pads out the - * last partial rowgroup and ensures at least one full rowgroup of context. - */ - xbuf = main->xbuffer[main->whichptr][ci]; - for (i = 0; i < rgroup * 2; i++) { - xbuf[rows_left + i] = xbuf[rows_left-1]; - } - } -} - - -/* - * Initialize for a processing pass. - */ - -METHODDEF(void) -start_pass_main (j_decompress_ptr cinfo, J_BUF_MODE pass_mode) -{ - my_main_ptr main = (my_main_ptr) cinfo->main; - - switch (pass_mode) { - case JBUF_PASS_THRU: - if (cinfo->upsample->need_context_rows) { - main->pub.process_data = process_data_context_main; - make_funny_pointers(cinfo); /* Create the xbuffer[] lists */ - main->whichptr = 0; /* Read first iMCU row into xbuffer[0] */ - main->context_state = CTX_PREPARE_FOR_IMCU; - main->iMCU_row_ctr = 0; - } else { - /* Simple case with no context needed */ - main->pub.process_data = process_data_simple_main; - } - main->buffer_full = FALSE; /* Mark buffer empty */ - main->rowgroup_ctr = 0; - break; -#ifdef QUANT_2PASS_SUPPORTED - case JBUF_CRANK_DEST: - /* For last pass of 2-pass quantization, just crank the postprocessor */ - main->pub.process_data = process_data_crank_post; - break; -#endif - default: - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - break; - } -} - - -/* - * Process some data. - * This handles the simple case where no context is required. - */ - -METHODDEF(void) -process_data_simple_main (j_decompress_ptr cinfo, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail) -{ - my_main_ptr main = (my_main_ptr) cinfo->main; - JDIMENSION rowgroups_avail; - - /* Read input data if we haven't filled the main buffer yet */ - if (! main->buffer_full) { - if (! (*cinfo->coef->decompress_data) (cinfo, main->buffer)) - return; /* suspension forced, can do nothing more */ - main->buffer_full = TRUE; /* OK, we have an iMCU row to work with */ - } - - /* There are always min_DCT_scaled_size row groups in an iMCU row. */ - rowgroups_avail = (JDIMENSION) cinfo->min_DCT_scaled_size; - /* Note: at the bottom of the image, we may pass extra garbage row groups - * to the postprocessor. The postprocessor has to check for bottom - * of image anyway (at row resolution), so no point in us doing it too. - */ - - /* Feed the postprocessor */ - (*cinfo->post->post_process_data) (cinfo, main->buffer, - &main->rowgroup_ctr, rowgroups_avail, - output_buf, out_row_ctr, out_rows_avail); - - /* Has postprocessor consumed all the data yet? If so, mark buffer empty */ - if (main->rowgroup_ctr >= rowgroups_avail) { - main->buffer_full = FALSE; - main->rowgroup_ctr = 0; - } -} - - -/* - * Process some data. - * This handles the case where context rows must be provided. - */ - -METHODDEF(void) -process_data_context_main (j_decompress_ptr cinfo, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail) -{ - my_main_ptr main = (my_main_ptr) cinfo->main; - - /* Read input data if we haven't filled the main buffer yet */ - if (! main->buffer_full) { - if (! (*cinfo->coef->decompress_data) (cinfo, - main->xbuffer[main->whichptr])) - return; /* suspension forced, can do nothing more */ - main->buffer_full = TRUE; /* OK, we have an iMCU row to work with */ - main->iMCU_row_ctr++; /* count rows received */ - } - - /* Postprocessor typically will not swallow all the input data it is handed - * in one call (due to filling the output buffer first). Must be prepared - * to exit and restart. This switch lets us keep track of how far we got. - * Note that each case falls through to the next on successful completion. - */ - switch (main->context_state) { - case CTX_POSTPONED_ROW: - /* Call postprocessor using previously set pointers for postponed row */ - (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr], - &main->rowgroup_ctr, main->rowgroups_avail, - output_buf, out_row_ctr, out_rows_avail); - if (main->rowgroup_ctr < main->rowgroups_avail) - return; /* Need to suspend */ - main->context_state = CTX_PREPARE_FOR_IMCU; - if (*out_row_ctr >= out_rows_avail) - return; /* Postprocessor exactly filled output buf */ - /*FALLTHROUGH*/ - case CTX_PREPARE_FOR_IMCU: - /* Prepare to process first M-1 row groups of this iMCU row */ - main->rowgroup_ctr = 0; - main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_scaled_size - 1); - /* Check for bottom of image: if so, tweak pointers to "duplicate" - * the last sample row, and adjust rowgroups_avail to ignore padding rows. - */ - if (main->iMCU_row_ctr == cinfo->total_iMCU_rows) - set_bottom_pointers(cinfo); - main->context_state = CTX_PROCESS_IMCU; - /*FALLTHROUGH*/ - case CTX_PROCESS_IMCU: - /* Call postprocessor using previously set pointers */ - (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr], - &main->rowgroup_ctr, main->rowgroups_avail, - output_buf, out_row_ctr, out_rows_avail); - if (main->rowgroup_ctr < main->rowgroups_avail) - return; /* Need to suspend */ - /* After the first iMCU, change wraparound pointers to normal state */ - if (main->iMCU_row_ctr == 1) - set_wraparound_pointers(cinfo); - /* Prepare to load new iMCU row using other xbuffer list */ - main->whichptr ^= 1; /* 0=>1 or 1=>0 */ - main->buffer_full = FALSE; - /* Still need to process last row group of this iMCU row, */ - /* which is saved at index M+1 of the other xbuffer */ - main->rowgroup_ctr = (JDIMENSION) (cinfo->min_DCT_scaled_size + 1); - main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_scaled_size + 2); - main->context_state = CTX_POSTPONED_ROW; - } -} - - -/* - * Process some data. - * Final pass of two-pass quantization: just call the postprocessor. - * Source data will be the postprocessor controller's internal buffer. - */ - -#ifdef QUANT_2PASS_SUPPORTED - -METHODDEF(void) -process_data_crank_post (j_decompress_ptr cinfo, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail) -{ - (*cinfo->post->post_process_data) (cinfo, (JSAMPIMAGE) NULL, - (JDIMENSION *) NULL, (JDIMENSION) 0, - output_buf, out_row_ctr, out_rows_avail); -} - -#endif /* QUANT_2PASS_SUPPORTED */ - - -/* - * Initialize main buffer controller. - */ - -GLOBAL(void) -jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer) -{ - my_main_ptr main; - int ci, rgroup, ngroups; - jpeg_component_info *compptr; - - main = (my_main_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_main_controller)); - cinfo->main = (struct jpeg_d_main_controller *) main; - main->pub.start_pass = start_pass_main; - - if (need_full_buffer) /* shouldn't happen */ - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - - /* Allocate the workspace. - * ngroups is the number of row groups we need. - */ - if (cinfo->upsample->need_context_rows) { - if (cinfo->min_DCT_scaled_size < 2) /* unsupported, see comments above */ - ERREXIT(cinfo, JERR_NOTIMPL); - alloc_funny_pointers(cinfo); /* Alloc space for xbuffer[] lists */ - ngroups = cinfo->min_DCT_scaled_size + 2; - } else { - ngroups = cinfo->min_DCT_scaled_size; - } - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / - cinfo->min_DCT_scaled_size; /* height of a row group of component */ - main->buffer[ci] = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - compptr->width_in_blocks * compptr->DCT_scaled_size, - (JDIMENSION) (rgroup * ngroups)); - } -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jdmarker.c b/gtkmm-osx/trunk/jpeg-6b/jdmarker.c deleted file mode 100644 index f4cca8c..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jdmarker.c +++ /dev/null @@ -1,1360 +0,0 @@ -/* - * jdmarker.c - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to decode JPEG datastream markers. - * Most of the complexity arises from our desire to support input - * suspension: if not all of the data for a marker is available, - * we must exit back to the application. On resumption, we reprocess - * the marker. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -typedef enum { /* JPEG marker codes */ - M_SOF0 = 0xc0, - M_SOF1 = 0xc1, - M_SOF2 = 0xc2, - M_SOF3 = 0xc3, - - M_SOF5 = 0xc5, - M_SOF6 = 0xc6, - M_SOF7 = 0xc7, - - M_JPG = 0xc8, - M_SOF9 = 0xc9, - M_SOF10 = 0xca, - M_SOF11 = 0xcb, - - M_SOF13 = 0xcd, - M_SOF14 = 0xce, - M_SOF15 = 0xcf, - - M_DHT = 0xc4, - - M_DAC = 0xcc, - - M_RST0 = 0xd0, - M_RST1 = 0xd1, - M_RST2 = 0xd2, - M_RST3 = 0xd3, - M_RST4 = 0xd4, - M_RST5 = 0xd5, - M_RST6 = 0xd6, - M_RST7 = 0xd7, - - M_SOI = 0xd8, - M_EOI = 0xd9, - M_SOS = 0xda, - M_DQT = 0xdb, - M_DNL = 0xdc, - M_DRI = 0xdd, - M_DHP = 0xde, - M_EXP = 0xdf, - - M_APP0 = 0xe0, - M_APP1 = 0xe1, - M_APP2 = 0xe2, - M_APP3 = 0xe3, - M_APP4 = 0xe4, - M_APP5 = 0xe5, - M_APP6 = 0xe6, - M_APP7 = 0xe7, - M_APP8 = 0xe8, - M_APP9 = 0xe9, - M_APP10 = 0xea, - M_APP11 = 0xeb, - M_APP12 = 0xec, - M_APP13 = 0xed, - M_APP14 = 0xee, - M_APP15 = 0xef, - - M_JPG0 = 0xf0, - M_JPG13 = 0xfd, - M_COM = 0xfe, - - M_TEM = 0x01, - - M_ERROR = 0x100 -} JPEG_MARKER; - - -/* Private state */ - -typedef struct { - struct jpeg_marker_reader pub; /* public fields */ - - /* Application-overridable marker processing methods */ - jpeg_marker_parser_method process_COM; - jpeg_marker_parser_method process_APPn[16]; - - /* Limit on marker data length to save for each marker type */ - unsigned int length_limit_COM; - unsigned int length_limit_APPn[16]; - - /* Status of COM/APPn marker saving */ - jpeg_saved_marker_ptr cur_marker; /* NULL if not processing a marker */ - unsigned int bytes_read; /* data bytes read so far in marker */ - /* Note: cur_marker is not linked into marker_list until it's all read. */ -} my_marker_reader; - -typedef my_marker_reader * my_marker_ptr; - - -/* - * Macros for fetching data from the data source module. - * - * At all times, cinfo->src->next_input_byte and ->bytes_in_buffer reflect - * the current restart point; we update them only when we have reached a - * suitable place to restart if a suspension occurs. - */ - -/* Declare and initialize local copies of input pointer/count */ -#define INPUT_VARS(cinfo) \ - struct jpeg_source_mgr * datasrc = (cinfo)->src; \ - const JOCTET * next_input_byte = datasrc->next_input_byte; \ - size_t bytes_in_buffer = datasrc->bytes_in_buffer - -/* Unload the local copies --- do this only at a restart boundary */ -#define INPUT_SYNC(cinfo) \ - ( datasrc->next_input_byte = next_input_byte, \ - datasrc->bytes_in_buffer = bytes_in_buffer ) - -/* Reload the local copies --- used only in MAKE_BYTE_AVAIL */ -#define INPUT_RELOAD(cinfo) \ - ( next_input_byte = datasrc->next_input_byte, \ - bytes_in_buffer = datasrc->bytes_in_buffer ) - -/* Internal macro for INPUT_BYTE and INPUT_2BYTES: make a byte available. - * Note we do *not* do INPUT_SYNC before calling fill_input_buffer, - * but we must reload the local copies after a successful fill. - */ -#define MAKE_BYTE_AVAIL(cinfo,action) \ - if (bytes_in_buffer == 0) { \ - if (! (*datasrc->fill_input_buffer) (cinfo)) \ - { action; } \ - INPUT_RELOAD(cinfo); \ - } - -/* Read a byte into variable V. - * If must suspend, take the specified action (typically "return FALSE"). - */ -#define INPUT_BYTE(cinfo,V,action) \ - MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \ - bytes_in_buffer--; \ - V = GETJOCTET(*next_input_byte++); ) - -/* As above, but read two bytes interpreted as an unsigned 16-bit integer. - * V should be declared unsigned int or perhaps INT32. - */ -#define INPUT_2BYTES(cinfo,V,action) \ - MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \ - bytes_in_buffer--; \ - V = ((unsigned int) GETJOCTET(*next_input_byte++)) << 8; \ - MAKE_BYTE_AVAIL(cinfo,action); \ - bytes_in_buffer--; \ - V += GETJOCTET(*next_input_byte++); ) - - -/* - * Routines to process JPEG markers. - * - * Entry condition: JPEG marker itself has been read and its code saved - * in cinfo->unread_marker; input restart point is just after the marker. - * - * Exit: if return TRUE, have read and processed any parameters, and have - * updated the restart point to point after the parameters. - * If return FALSE, was forced to suspend before reaching end of - * marker parameters; restart point has not been moved. Same routine - * will be called again after application supplies more input data. - * - * This approach to suspension assumes that all of a marker's parameters - * can fit into a single input bufferload. This should hold for "normal" - * markers. Some COM/APPn markers might have large parameter segments - * that might not fit. If we are simply dropping such a marker, we use - * skip_input_data to get past it, and thereby put the problem on the - * source manager's shoulders. If we are saving the marker's contents - * into memory, we use a slightly different convention: when forced to - * suspend, the marker processor updates the restart point to the end of - * what it's consumed (ie, the end of the buffer) before returning FALSE. - * On resumption, cinfo->unread_marker still contains the marker code, - * but the data source will point to the next chunk of marker data. - * The marker processor must retain internal state to deal with this. - * - * Note that we don't bother to avoid duplicate trace messages if a - * suspension occurs within marker parameters. Other side effects - * require more care. - */ - - -LOCAL(boolean) -get_soi (j_decompress_ptr cinfo) -/* Process an SOI marker */ -{ - int i; - - TRACEMS(cinfo, 1, JTRC_SOI); - - if (cinfo->marker->saw_SOI) - ERREXIT(cinfo, JERR_SOI_DUPLICATE); - - /* Reset all parameters that are defined to be reset by SOI */ - - for (i = 0; i < NUM_ARITH_TBLS; i++) { - cinfo->arith_dc_L[i] = 0; - cinfo->arith_dc_U[i] = 1; - cinfo->arith_ac_K[i] = 5; - } - cinfo->restart_interval = 0; - - /* Set initial assumptions for colorspace etc */ - - cinfo->jpeg_color_space = JCS_UNKNOWN; - cinfo->CCIR601_sampling = FALSE; /* Assume non-CCIR sampling??? */ - - cinfo->saw_JFIF_marker = FALSE; - cinfo->JFIF_major_version = 1; /* set default JFIF APP0 values */ - cinfo->JFIF_minor_version = 1; - cinfo->density_unit = 0; - cinfo->X_density = 1; - cinfo->Y_density = 1; - cinfo->saw_Adobe_marker = FALSE; - cinfo->Adobe_transform = 0; - - cinfo->marker->saw_SOI = TRUE; - - return TRUE; -} - - -LOCAL(boolean) -get_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith) -/* Process a SOFn marker */ -{ - INT32 length; - int c, ci; - jpeg_component_info * compptr; - INPUT_VARS(cinfo); - - cinfo->progressive_mode = is_prog; - cinfo->arith_code = is_arith; - - INPUT_2BYTES(cinfo, length, return FALSE); - - INPUT_BYTE(cinfo, cinfo->data_precision, return FALSE); - INPUT_2BYTES(cinfo, cinfo->image_height, return FALSE); - INPUT_2BYTES(cinfo, cinfo->image_width, return FALSE); - INPUT_BYTE(cinfo, cinfo->num_components, return FALSE); - - length -= 8; - - TRACEMS4(cinfo, 1, JTRC_SOF, cinfo->unread_marker, - (int) cinfo->image_width, (int) cinfo->image_height, - cinfo->num_components); - - if (cinfo->marker->saw_SOF) - ERREXIT(cinfo, JERR_SOF_DUPLICATE); - - /* We don't support files in which the image height is initially specified */ - /* as 0 and is later redefined by DNL. As long as we have to check that, */ - /* might as well have a general sanity check. */ - if (cinfo->image_height <= 0 || cinfo->image_width <= 0 - || cinfo->num_components <= 0) - ERREXIT(cinfo, JERR_EMPTY_IMAGE); - - if (length != (cinfo->num_components * 3)) - ERREXIT(cinfo, JERR_BAD_LENGTH); - - if (cinfo->comp_info == NULL) /* do only once, even if suspend */ - cinfo->comp_info = (jpeg_component_info *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - cinfo->num_components * SIZEOF(jpeg_component_info)); - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - compptr->component_index = ci; - INPUT_BYTE(cinfo, compptr->component_id, return FALSE); - INPUT_BYTE(cinfo, c, return FALSE); - compptr->h_samp_factor = (c >> 4) & 15; - compptr->v_samp_factor = (c ) & 15; - INPUT_BYTE(cinfo, compptr->quant_tbl_no, return FALSE); - - TRACEMS4(cinfo, 1, JTRC_SOF_COMPONENT, - compptr->component_id, compptr->h_samp_factor, - compptr->v_samp_factor, compptr->quant_tbl_no); - } - - cinfo->marker->saw_SOF = TRUE; - - INPUT_SYNC(cinfo); - return TRUE; -} - - -LOCAL(boolean) -get_sos (j_decompress_ptr cinfo) -/* Process a SOS marker */ -{ - INT32 length; - int i, ci, n, c, cc; - jpeg_component_info * compptr; - INPUT_VARS(cinfo); - - if (! cinfo->marker->saw_SOF) - ERREXIT(cinfo, JERR_SOS_NO_SOF); - - INPUT_2BYTES(cinfo, length, return FALSE); - - INPUT_BYTE(cinfo, n, return FALSE); /* Number of components */ - - TRACEMS1(cinfo, 1, JTRC_SOS, n); - - if (length != (n * 2 + 6) || n < 1 || n > MAX_COMPS_IN_SCAN) - ERREXIT(cinfo, JERR_BAD_LENGTH); - - cinfo->comps_in_scan = n; - - /* Collect the component-spec parameters */ - - for (i = 0; i < n; i++) { - INPUT_BYTE(cinfo, cc, return FALSE); - INPUT_BYTE(cinfo, c, return FALSE); - - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - if (cc == compptr->component_id) - goto id_found; - } - - ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc); - - id_found: - - cinfo->cur_comp_info[i] = compptr; - compptr->dc_tbl_no = (c >> 4) & 15; - compptr->ac_tbl_no = (c ) & 15; - - TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc, - compptr->dc_tbl_no, compptr->ac_tbl_no); - } - - /* Collect the additional scan parameters Ss, Se, Ah/Al. */ - INPUT_BYTE(cinfo, c, return FALSE); - cinfo->Ss = c; - INPUT_BYTE(cinfo, c, return FALSE); - cinfo->Se = c; - INPUT_BYTE(cinfo, c, return FALSE); - cinfo->Ah = (c >> 4) & 15; - cinfo->Al = (c ) & 15; - - TRACEMS4(cinfo, 1, JTRC_SOS_PARAMS, cinfo->Ss, cinfo->Se, - cinfo->Ah, cinfo->Al); - - /* Prepare to scan data & restart markers */ - cinfo->marker->next_restart_num = 0; - - /* Count another SOS marker */ - cinfo->input_scan_number++; - - INPUT_SYNC(cinfo); - return TRUE; -} - - -#ifdef D_ARITH_CODING_SUPPORTED - -LOCAL(boolean) -get_dac (j_decompress_ptr cinfo) -/* Process a DAC marker */ -{ - INT32 length; - int index, val; - INPUT_VARS(cinfo); - - INPUT_2BYTES(cinfo, length, return FALSE); - length -= 2; - - while (length > 0) { - INPUT_BYTE(cinfo, index, return FALSE); - INPUT_BYTE(cinfo, val, return FALSE); - - length -= 2; - - TRACEMS2(cinfo, 1, JTRC_DAC, index, val); - - if (index < 0 || index >= (2*NUM_ARITH_TBLS)) - ERREXIT1(cinfo, JERR_DAC_INDEX, index); - - if (index >= NUM_ARITH_TBLS) { /* define AC table */ - cinfo->arith_ac_K[index-NUM_ARITH_TBLS] = (UINT8) val; - } else { /* define DC table */ - cinfo->arith_dc_L[index] = (UINT8) (val & 0x0F); - cinfo->arith_dc_U[index] = (UINT8) (val >> 4); - if (cinfo->arith_dc_L[index] > cinfo->arith_dc_U[index]) - ERREXIT1(cinfo, JERR_DAC_VALUE, val); - } - } - - if (length != 0) - ERREXIT(cinfo, JERR_BAD_LENGTH); - - INPUT_SYNC(cinfo); - return TRUE; -} - -#else /* ! D_ARITH_CODING_SUPPORTED */ - -#define get_dac(cinfo) skip_variable(cinfo) - -#endif /* D_ARITH_CODING_SUPPORTED */ - - -LOCAL(boolean) -get_dht (j_decompress_ptr cinfo) -/* Process a DHT marker */ -{ - INT32 length; - UINT8 bits[17]; - UINT8 huffval[256]; - int i, index, count; - JHUFF_TBL **htblptr; - INPUT_VARS(cinfo); - - INPUT_2BYTES(cinfo, length, return FALSE); - length -= 2; - - while (length > 16) { - INPUT_BYTE(cinfo, index, return FALSE); - - TRACEMS1(cinfo, 1, JTRC_DHT, index); - - bits[0] = 0; - count = 0; - for (i = 1; i <= 16; i++) { - INPUT_BYTE(cinfo, bits[i], return FALSE); - count += bits[i]; - } - - length -= 1 + 16; - - TRACEMS8(cinfo, 2, JTRC_HUFFBITS, - bits[1], bits[2], bits[3], bits[4], - bits[5], bits[6], bits[7], bits[8]); - TRACEMS8(cinfo, 2, JTRC_HUFFBITS, - bits[9], bits[10], bits[11], bits[12], - bits[13], bits[14], bits[15], bits[16]); - - /* Here we just do minimal validation of the counts to avoid walking - * off the end of our table space. jdhuff.c will check more carefully. - */ - if (count > 256 || ((INT32) count) > length) - ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); - - for (i = 0; i < count; i++) - INPUT_BYTE(cinfo, huffval[i], return FALSE); - - length -= count; - - if (index & 0x10) { /* AC table definition */ - index -= 0x10; - htblptr = &cinfo->ac_huff_tbl_ptrs[index]; - } else { /* DC table definition */ - htblptr = &cinfo->dc_huff_tbl_ptrs[index]; - } - - if (index < 0 || index >= NUM_HUFF_TBLS) - ERREXIT1(cinfo, JERR_DHT_INDEX, index); - - if (*htblptr == NULL) - *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); - - MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits)); - MEMCOPY((*htblptr)->huffval, huffval, SIZEOF((*htblptr)->huffval)); - } - - if (length != 0) - ERREXIT(cinfo, JERR_BAD_LENGTH); - - INPUT_SYNC(cinfo); - return TRUE; -} - - -LOCAL(boolean) -get_dqt (j_decompress_ptr cinfo) -/* Process a DQT marker */ -{ - INT32 length; - int n, i, prec; - unsigned int tmp; - JQUANT_TBL *quant_ptr; - INPUT_VARS(cinfo); - - INPUT_2BYTES(cinfo, length, return FALSE); - length -= 2; - - while (length > 0) { - INPUT_BYTE(cinfo, n, return FALSE); - prec = n >> 4; - n &= 0x0F; - - TRACEMS2(cinfo, 1, JTRC_DQT, n, prec); - - if (n >= NUM_QUANT_TBLS) - ERREXIT1(cinfo, JERR_DQT_INDEX, n); - - if (cinfo->quant_tbl_ptrs[n] == NULL) - cinfo->quant_tbl_ptrs[n] = jpeg_alloc_quant_table((j_common_ptr) cinfo); - quant_ptr = cinfo->quant_tbl_ptrs[n]; - - for (i = 0; i < DCTSIZE2; i++) { - if (prec) - INPUT_2BYTES(cinfo, tmp, return FALSE); - else - INPUT_BYTE(cinfo, tmp, return FALSE); - /* We convert the zigzag-order table to natural array order. */ - quant_ptr->quantval[jpeg_natural_order[i]] = (UINT16) tmp; - } - - if (cinfo->err->trace_level >= 2) { - for (i = 0; i < DCTSIZE2; i += 8) { - TRACEMS8(cinfo, 2, JTRC_QUANTVALS, - quant_ptr->quantval[i], quant_ptr->quantval[i+1], - quant_ptr->quantval[i+2], quant_ptr->quantval[i+3], - quant_ptr->quantval[i+4], quant_ptr->quantval[i+5], - quant_ptr->quantval[i+6], quant_ptr->quantval[i+7]); - } - } - - length -= DCTSIZE2+1; - if (prec) length -= DCTSIZE2; - } - - if (length != 0) - ERREXIT(cinfo, JERR_BAD_LENGTH); - - INPUT_SYNC(cinfo); - return TRUE; -} - - -LOCAL(boolean) -get_dri (j_decompress_ptr cinfo) -/* Process a DRI marker */ -{ - INT32 length; - unsigned int tmp; - INPUT_VARS(cinfo); - - INPUT_2BYTES(cinfo, length, return FALSE); - - if (length != 4) - ERREXIT(cinfo, JERR_BAD_LENGTH); - - INPUT_2BYTES(cinfo, tmp, return FALSE); - - TRACEMS1(cinfo, 1, JTRC_DRI, tmp); - - cinfo->restart_interval = tmp; - - INPUT_SYNC(cinfo); - return TRUE; -} - - -/* - * Routines for processing APPn and COM markers. - * These are either saved in memory or discarded, per application request. - * APP0 and APP14 are specially checked to see if they are - * JFIF and Adobe markers, respectively. - */ - -#define APP0_DATA_LEN 14 /* Length of interesting data in APP0 */ -#define APP14_DATA_LEN 12 /* Length of interesting data in APP14 */ -#define APPN_DATA_LEN 14 /* Must be the largest of the above!! */ - - -LOCAL(void) -examine_app0 (j_decompress_ptr cinfo, JOCTET FAR * data, - unsigned int datalen, INT32 remaining) -/* Examine first few bytes from an APP0. - * Take appropriate action if it is a JFIF marker. - * datalen is # of bytes at data[], remaining is length of rest of marker data. - */ -{ - INT32 totallen = (INT32) datalen + remaining; - - if (datalen >= APP0_DATA_LEN && - GETJOCTET(data[0]) == 0x4A && - GETJOCTET(data[1]) == 0x46 && - GETJOCTET(data[2]) == 0x49 && - GETJOCTET(data[3]) == 0x46 && - GETJOCTET(data[4]) == 0) { - /* Found JFIF APP0 marker: save info */ - cinfo->saw_JFIF_marker = TRUE; - cinfo->JFIF_major_version = GETJOCTET(data[5]); - cinfo->JFIF_minor_version = GETJOCTET(data[6]); - cinfo->density_unit = GETJOCTET(data[7]); - cinfo->X_density = (GETJOCTET(data[8]) << 8) + GETJOCTET(data[9]); - cinfo->Y_density = (GETJOCTET(data[10]) << 8) + GETJOCTET(data[11]); - /* Check version. - * Major version must be 1, anything else signals an incompatible change. - * (We used to treat this as an error, but now it's a nonfatal warning, - * because some bozo at Hijaak couldn't read the spec.) - * Minor version should be 0..2, but process anyway if newer. - */ - if (cinfo->JFIF_major_version != 1) - WARNMS2(cinfo, JWRN_JFIF_MAJOR, - cinfo->JFIF_major_version, cinfo->JFIF_minor_version); - /* Generate trace messages */ - TRACEMS5(cinfo, 1, JTRC_JFIF, - cinfo->JFIF_major_version, cinfo->JFIF_minor_version, - cinfo->X_density, cinfo->Y_density, cinfo->density_unit); - /* Validate thumbnail dimensions and issue appropriate messages */ - if (GETJOCTET(data[12]) | GETJOCTET(data[13])) - TRACEMS2(cinfo, 1, JTRC_JFIF_THUMBNAIL, - GETJOCTET(data[12]), GETJOCTET(data[13])); - totallen -= APP0_DATA_LEN; - if (totallen != - ((INT32)GETJOCTET(data[12]) * (INT32)GETJOCTET(data[13]) * (INT32) 3)) - TRACEMS1(cinfo, 1, JTRC_JFIF_BADTHUMBNAILSIZE, (int) totallen); - } else if (datalen >= 6 && - GETJOCTET(data[0]) == 0x4A && - GETJOCTET(data[1]) == 0x46 && - GETJOCTET(data[2]) == 0x58 && - GETJOCTET(data[3]) == 0x58 && - GETJOCTET(data[4]) == 0) { - /* Found JFIF "JFXX" extension APP0 marker */ - /* The library doesn't actually do anything with these, - * but we try to produce a helpful trace message. - */ - switch (GETJOCTET(data[5])) { - case 0x10: - TRACEMS1(cinfo, 1, JTRC_THUMB_JPEG, (int) totallen); - break; - case 0x11: - TRACEMS1(cinfo, 1, JTRC_THUMB_PALETTE, (int) totallen); - break; - case 0x13: - TRACEMS1(cinfo, 1, JTRC_THUMB_RGB, (int) totallen); - break; - default: - TRACEMS2(cinfo, 1, JTRC_JFIF_EXTENSION, - GETJOCTET(data[5]), (int) totallen); - break; - } - } else { - /* Start of APP0 does not match "JFIF" or "JFXX", or too short */ - TRACEMS1(cinfo, 1, JTRC_APP0, (int) totallen); - } -} - - -LOCAL(void) -examine_app14 (j_decompress_ptr cinfo, JOCTET FAR * data, - unsigned int datalen, INT32 remaining) -/* Examine first few bytes from an APP14. - * Take appropriate action if it is an Adobe marker. - * datalen is # of bytes at data[], remaining is length of rest of marker data. - */ -{ - unsigned int version, flags0, flags1, transform; - - if (datalen >= APP14_DATA_LEN && - GETJOCTET(data[0]) == 0x41 && - GETJOCTET(data[1]) == 0x64 && - GETJOCTET(data[2]) == 0x6F && - GETJOCTET(data[3]) == 0x62 && - GETJOCTET(data[4]) == 0x65) { - /* Found Adobe APP14 marker */ - version = (GETJOCTET(data[5]) << 8) + GETJOCTET(data[6]); - flags0 = (GETJOCTET(data[7]) << 8) + GETJOCTET(data[8]); - flags1 = (GETJOCTET(data[9]) << 8) + GETJOCTET(data[10]); - transform = GETJOCTET(data[11]); - TRACEMS4(cinfo, 1, JTRC_ADOBE, version, flags0, flags1, transform); - cinfo->saw_Adobe_marker = TRUE; - cinfo->Adobe_transform = (UINT8) transform; - } else { - /* Start of APP14 does not match "Adobe", or too short */ - TRACEMS1(cinfo, 1, JTRC_APP14, (int) (datalen + remaining)); - } -} - - -METHODDEF(boolean) -get_interesting_appn (j_decompress_ptr cinfo) -/* Process an APP0 or APP14 marker without saving it */ -{ - INT32 length; - JOCTET b[APPN_DATA_LEN]; - unsigned int i, numtoread; - INPUT_VARS(cinfo); - - INPUT_2BYTES(cinfo, length, return FALSE); - length -= 2; - - /* get the interesting part of the marker data */ - if (length >= APPN_DATA_LEN) - numtoread = APPN_DATA_LEN; - else if (length > 0) - numtoread = (unsigned int) length; - else - numtoread = 0; - for (i = 0; i < numtoread; i++) - INPUT_BYTE(cinfo, b[i], return FALSE); - length -= numtoread; - - /* process it */ - switch (cinfo->unread_marker) { - case M_APP0: - examine_app0(cinfo, (JOCTET FAR *) b, numtoread, length); - break; - case M_APP14: - examine_app14(cinfo, (JOCTET FAR *) b, numtoread, length); - break; - default: - /* can't get here unless jpeg_save_markers chooses wrong processor */ - ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker); - break; - } - - /* skip any remaining data -- could be lots */ - INPUT_SYNC(cinfo); - if (length > 0) - (*cinfo->src->skip_input_data) (cinfo, (long) length); - - return TRUE; -} - - -#ifdef SAVE_MARKERS_SUPPORTED - -METHODDEF(boolean) -save_marker (j_decompress_ptr cinfo) -/* Save an APPn or COM marker into the marker list */ -{ - my_marker_ptr marker = (my_marker_ptr) cinfo->marker; - jpeg_saved_marker_ptr cur_marker = marker->cur_marker; - unsigned int bytes_read, data_length; - JOCTET FAR * data; - INT32 length = 0; - INPUT_VARS(cinfo); - - if (cur_marker == NULL) { - /* begin reading a marker */ - INPUT_2BYTES(cinfo, length, return FALSE); - length -= 2; - if (length >= 0) { /* watch out for bogus length word */ - /* figure out how much we want to save */ - unsigned int limit; - if (cinfo->unread_marker == (int) M_COM) - limit = marker->length_limit_COM; - else - limit = marker->length_limit_APPn[cinfo->unread_marker - (int) M_APP0]; - if ((unsigned int) length < limit) - limit = (unsigned int) length; - /* allocate and initialize the marker item */ - cur_marker = (jpeg_saved_marker_ptr) - (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(struct jpeg_marker_struct) + limit); - cur_marker->next = NULL; - cur_marker->marker = (UINT8) cinfo->unread_marker; - cur_marker->original_length = (unsigned int) length; - cur_marker->data_length = limit; - /* data area is just beyond the jpeg_marker_struct */ - data = cur_marker->data = (JOCTET FAR *) (cur_marker + 1); - marker->cur_marker = cur_marker; - marker->bytes_read = 0; - bytes_read = 0; - data_length = limit; - } else { - /* deal with bogus length word */ - bytes_read = data_length = 0; - data = NULL; - } - } else { - /* resume reading a marker */ - bytes_read = marker->bytes_read; - data_length = cur_marker->data_length; - data = cur_marker->data + bytes_read; - } - - while (bytes_read < data_length) { - INPUT_SYNC(cinfo); /* move the restart point to here */ - marker->bytes_read = bytes_read; - /* If there's not at least one byte in buffer, suspend */ - MAKE_BYTE_AVAIL(cinfo, return FALSE); - /* Copy bytes with reasonable rapidity */ - while (bytes_read < data_length && bytes_in_buffer > 0) { - *data++ = *next_input_byte++; - bytes_in_buffer--; - bytes_read++; - } - } - - /* Done reading what we want to read */ - if (cur_marker != NULL) { /* will be NULL if bogus length word */ - /* Add new marker to end of list */ - if (cinfo->marker_list == NULL) { - cinfo->marker_list = cur_marker; - } else { - jpeg_saved_marker_ptr prev = cinfo->marker_list; - while (prev->next != NULL) - prev = prev->next; - prev->next = cur_marker; - } - /* Reset pointer & calc remaining data length */ - data = cur_marker->data; - length = cur_marker->original_length - data_length; - } - /* Reset to initial state for next marker */ - marker->cur_marker = NULL; - - /* Process the marker if interesting; else just make a generic trace msg */ - switch (cinfo->unread_marker) { - case M_APP0: - examine_app0(cinfo, data, data_length, length); - break; - case M_APP14: - examine_app14(cinfo, data, data_length, length); - break; - default: - TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo->unread_marker, - (int) (data_length + length)); - break; - } - - /* skip any remaining data -- could be lots */ - INPUT_SYNC(cinfo); /* do before skip_input_data */ - if (length > 0) - (*cinfo->src->skip_input_data) (cinfo, (long) length); - - return TRUE; -} - -#endif /* SAVE_MARKERS_SUPPORTED */ - - -METHODDEF(boolean) -skip_variable (j_decompress_ptr cinfo) -/* Skip over an unknown or uninteresting variable-length marker */ -{ - INT32 length; - INPUT_VARS(cinfo); - - INPUT_2BYTES(cinfo, length, return FALSE); - length -= 2; - - TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo->unread_marker, (int) length); - - INPUT_SYNC(cinfo); /* do before skip_input_data */ - if (length > 0) - (*cinfo->src->skip_input_data) (cinfo, (long) length); - - return TRUE; -} - - -/* - * Find the next JPEG marker, save it in cinfo->unread_marker. - * Returns FALSE if had to suspend before reaching a marker; - * in that case cinfo->unread_marker is unchanged. - * - * Note that the result might not be a valid marker code, - * but it will never be 0 or FF. - */ - -LOCAL(boolean) -next_marker (j_decompress_ptr cinfo) -{ - int c; - INPUT_VARS(cinfo); - - for (;;) { - INPUT_BYTE(cinfo, c, return FALSE); - /* Skip any non-FF bytes. - * This may look a bit inefficient, but it will not occur in a valid file. - * We sync after each discarded byte so that a suspending data source - * can discard the byte from its buffer. - */ - while (c != 0xFF) { - cinfo->marker->discarded_bytes++; - INPUT_SYNC(cinfo); - INPUT_BYTE(cinfo, c, return FALSE); - } - /* This loop swallows any duplicate FF bytes. Extra FFs are legal as - * pad bytes, so don't count them in discarded_bytes. We assume there - * will not be so many consecutive FF bytes as to overflow a suspending - * data source's input buffer. - */ - do { - INPUT_BYTE(cinfo, c, return FALSE); - } while (c == 0xFF); - if (c != 0) - break; /* found a valid marker, exit loop */ - /* Reach here if we found a stuffed-zero data sequence (FF/00). - * Discard it and loop back to try again. - */ - cinfo->marker->discarded_bytes += 2; - INPUT_SYNC(cinfo); - } - - if (cinfo->marker->discarded_bytes != 0) { - WARNMS2(cinfo, JWRN_EXTRANEOUS_DATA, cinfo->marker->discarded_bytes, c); - cinfo->marker->discarded_bytes = 0; - } - - cinfo->unread_marker = c; - - INPUT_SYNC(cinfo); - return TRUE; -} - - -LOCAL(boolean) -first_marker (j_decompress_ptr cinfo) -/* Like next_marker, but used to obtain the initial SOI marker. */ -/* For this marker, we do not allow preceding garbage or fill; otherwise, - * we might well scan an entire input file before realizing it ain't JPEG. - * If an application wants to process non-JFIF files, it must seek to the - * SOI before calling the JPEG library. - */ -{ - int c, c2; - INPUT_VARS(cinfo); - - INPUT_BYTE(cinfo, c, return FALSE); - INPUT_BYTE(cinfo, c2, return FALSE); - if (c != 0xFF || c2 != (int) M_SOI) - ERREXIT2(cinfo, JERR_NO_SOI, c, c2); - - cinfo->unread_marker = c2; - - INPUT_SYNC(cinfo); - return TRUE; -} - - -/* - * Read markers until SOS or EOI. - * - * Returns same codes as are defined for jpeg_consume_input: - * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. - */ - -METHODDEF(int) -read_markers (j_decompress_ptr cinfo) -{ - /* Outer loop repeats once for each marker. */ - for (;;) { - /* Collect the marker proper, unless we already did. */ - /* NB: first_marker() enforces the requirement that SOI appear first. */ - if (cinfo->unread_marker == 0) { - if (! cinfo->marker->saw_SOI) { - if (! first_marker(cinfo)) - return JPEG_SUSPENDED; - } else { - if (! next_marker(cinfo)) - return JPEG_SUSPENDED; - } - } - /* At this point cinfo->unread_marker contains the marker code and the - * input point is just past the marker proper, but before any parameters. - * A suspension will cause us to return with this state still true. - */ - switch (cinfo->unread_marker) { - case M_SOI: - if (! get_soi(cinfo)) - return JPEG_SUSPENDED; - break; - - case M_SOF0: /* Baseline */ - case M_SOF1: /* Extended sequential, Huffman */ - if (! get_sof(cinfo, FALSE, FALSE)) - return JPEG_SUSPENDED; - break; - - case M_SOF2: /* Progressive, Huffman */ - if (! get_sof(cinfo, TRUE, FALSE)) - return JPEG_SUSPENDED; - break; - - case M_SOF9: /* Extended sequential, arithmetic */ - if (! get_sof(cinfo, FALSE, TRUE)) - return JPEG_SUSPENDED; - break; - - case M_SOF10: /* Progressive, arithmetic */ - if (! get_sof(cinfo, TRUE, TRUE)) - return JPEG_SUSPENDED; - break; - - /* Currently unsupported SOFn types */ - case M_SOF3: /* Lossless, Huffman */ - case M_SOF5: /* Differential sequential, Huffman */ - case M_SOF6: /* Differential progressive, Huffman */ - case M_SOF7: /* Differential lossless, Huffman */ - case M_JPG: /* Reserved for JPEG extensions */ - case M_SOF11: /* Lossless, arithmetic */ - case M_SOF13: /* Differential sequential, arithmetic */ - case M_SOF14: /* Differential progressive, arithmetic */ - case M_SOF15: /* Differential lossless, arithmetic */ - ERREXIT1(cinfo, JERR_SOF_UNSUPPORTED, cinfo->unread_marker); - break; - - case M_SOS: - if (! get_sos(cinfo)) - return JPEG_SUSPENDED; - cinfo->unread_marker = 0; /* processed the marker */ - return JPEG_REACHED_SOS; - - case M_EOI: - TRACEMS(cinfo, 1, JTRC_EOI); - cinfo->unread_marker = 0; /* processed the marker */ - return JPEG_REACHED_EOI; - - case M_DAC: - if (! get_dac(cinfo)) - return JPEG_SUSPENDED; - break; - - case M_DHT: - if (! get_dht(cinfo)) - return JPEG_SUSPENDED; - break; - - case M_DQT: - if (! get_dqt(cinfo)) - return JPEG_SUSPENDED; - break; - - case M_DRI: - if (! get_dri(cinfo)) - return JPEG_SUSPENDED; - break; - - case M_APP0: - case M_APP1: - case M_APP2: - case M_APP3: - case M_APP4: - case M_APP5: - case M_APP6: - case M_APP7: - case M_APP8: - case M_APP9: - case M_APP10: - case M_APP11: - case M_APP12: - case M_APP13: - case M_APP14: - case M_APP15: - if (! (*((my_marker_ptr) cinfo->marker)->process_APPn[ - cinfo->unread_marker - (int) M_APP0]) (cinfo)) - return JPEG_SUSPENDED; - break; - - case M_COM: - if (! (*((my_marker_ptr) cinfo->marker)->process_COM) (cinfo)) - return JPEG_SUSPENDED; - break; - - case M_RST0: /* these are all parameterless */ - case M_RST1: - case M_RST2: - case M_RST3: - case M_RST4: - case M_RST5: - case M_RST6: - case M_RST7: - case M_TEM: - TRACEMS1(cinfo, 1, JTRC_PARMLESS_MARKER, cinfo->unread_marker); - break; - - case M_DNL: /* Ignore DNL ... perhaps the wrong thing */ - if (! skip_variable(cinfo)) - return JPEG_SUSPENDED; - break; - - default: /* must be DHP, EXP, JPGn, or RESn */ - /* For now, we treat the reserved markers as fatal errors since they are - * likely to be used to signal incompatible JPEG Part 3 extensions. - * Once the JPEG 3 version-number marker is well defined, this code - * ought to change! - */ - ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker); - break; - } - /* Successfully processed marker, so reset state variable */ - cinfo->unread_marker = 0; - } /* end loop */ -} - - -/* - * Read a restart marker, which is expected to appear next in the datastream; - * if the marker is not there, take appropriate recovery action. - * Returns FALSE if suspension is required. - * - * This is called by the entropy decoder after it has read an appropriate - * number of MCUs. cinfo->unread_marker may be nonzero if the entropy decoder - * has already read a marker from the data source. Under normal conditions - * cinfo->unread_marker will be reset to 0 before returning; if not reset, - * it holds a marker which the decoder will be unable to read past. - */ - -METHODDEF(boolean) -read_restart_marker (j_decompress_ptr cinfo) -{ - /* Obtain a marker unless we already did. */ - /* Note that next_marker will complain if it skips any data. */ - if (cinfo->unread_marker == 0) { - if (! next_marker(cinfo)) - return FALSE; - } - - if (cinfo->unread_marker == - ((int) M_RST0 + cinfo->marker->next_restart_num)) { - /* Normal case --- swallow the marker and let entropy decoder continue */ - TRACEMS1(cinfo, 3, JTRC_RST, cinfo->marker->next_restart_num); - cinfo->unread_marker = 0; - } else { - /* Uh-oh, the restart markers have been messed up. */ - /* Let the data source manager determine how to resync. */ - if (! (*cinfo->src->resync_to_restart) (cinfo, - cinfo->marker->next_restart_num)) - return FALSE; - } - - /* Update next-restart state */ - cinfo->marker->next_restart_num = (cinfo->marker->next_restart_num + 1) & 7; - - return TRUE; -} - - -/* - * This is the default resync_to_restart method for data source managers - * to use if they don't have any better approach. Some data source managers - * may be able to back up, or may have additional knowledge about the data - * which permits a more intelligent recovery strategy; such managers would - * presumably supply their own resync method. - * - * read_restart_marker calls resync_to_restart if it finds a marker other than - * the restart marker it was expecting. (This code is *not* used unless - * a nonzero restart interval has been declared.) cinfo->unread_marker is - * the marker code actually found (might be anything, except 0 or FF). - * The desired restart marker number (0..7) is passed as a parameter. - * This routine is supposed to apply whatever error recovery strategy seems - * appropriate in order to position the input stream to the next data segment. - * Note that cinfo->unread_marker is treated as a marker appearing before - * the current data-source input point; usually it should be reset to zero - * before returning. - * Returns FALSE if suspension is required. - * - * This implementation is substantially constrained by wanting to treat the - * input as a data stream; this means we can't back up. Therefore, we have - * only the following actions to work with: - * 1. Simply discard the marker and let the entropy decoder resume at next - * byte of file. - * 2. Read forward until we find another marker, discarding intervening - * data. (In theory we could look ahead within the current bufferload, - * without having to discard data if we don't find the desired marker. - * This idea is not implemented here, in part because it makes behavior - * dependent on buffer size and chance buffer-boundary positions.) - * 3. Leave the marker unread (by failing to zero cinfo->unread_marker). - * This will cause the entropy decoder to process an empty data segment, - * inserting dummy zeroes, and then we will reprocess the marker. - * - * #2 is appropriate if we think the desired marker lies ahead, while #3 is - * appropriate if the found marker is a future restart marker (indicating - * that we have missed the desired restart marker, probably because it got - * corrupted). - * We apply #2 or #3 if the found marker is a restart marker no more than - * two counts behind or ahead of the expected one. We also apply #2 if the - * found marker is not a legal JPEG marker code (it's certainly bogus data). - * If the found marker is a restart marker more than 2 counts away, we do #1 - * (too much risk that the marker is erroneous; with luck we will be able to - * resync at some future point). - * For any valid non-restart JPEG marker, we apply #3. This keeps us from - * overrunning the end of a scan. An implementation limited to single-scan - * files might find it better to apply #2 for markers other than EOI, since - * any other marker would have to be bogus data in that case. - */ - -GLOBAL(boolean) -jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired) -{ - int marker = cinfo->unread_marker; - int action = 1; - - /* Always put up a warning. */ - WARNMS2(cinfo, JWRN_MUST_RESYNC, marker, desired); - - /* Outer loop handles repeated decision after scanning forward. */ - for (;;) { - if (marker < (int) M_SOF0) - action = 2; /* invalid marker */ - else if (marker < (int) M_RST0 || marker > (int) M_RST7) - action = 3; /* valid non-restart marker */ - else { - if (marker == ((int) M_RST0 + ((desired+1) & 7)) || - marker == ((int) M_RST0 + ((desired+2) & 7))) - action = 3; /* one of the next two expected restarts */ - else if (marker == ((int) M_RST0 + ((desired-1) & 7)) || - marker == ((int) M_RST0 + ((desired-2) & 7))) - action = 2; /* a prior restart, so advance */ - else - action = 1; /* desired restart or too far away */ - } - TRACEMS2(cinfo, 4, JTRC_RECOVERY_ACTION, marker, action); - switch (action) { - case 1: - /* Discard marker and let entropy decoder resume processing. */ - cinfo->unread_marker = 0; - return TRUE; - case 2: - /* Scan to the next marker, and repeat the decision loop. */ - if (! next_marker(cinfo)) - return FALSE; - marker = cinfo->unread_marker; - break; - case 3: - /* Return without advancing past this marker. */ - /* Entropy decoder will be forced to process an empty segment. */ - return TRUE; - } - } /* end loop */ -} - - -/* - * Reset marker processing state to begin a fresh datastream. - */ - -METHODDEF(void) -reset_marker_reader (j_decompress_ptr cinfo) -{ - my_marker_ptr marker = (my_marker_ptr) cinfo->marker; - - cinfo->comp_info = NULL; /* until allocated by get_sof */ - cinfo->input_scan_number = 0; /* no SOS seen yet */ - cinfo->unread_marker = 0; /* no pending marker */ - marker->pub.saw_SOI = FALSE; /* set internal state too */ - marker->pub.saw_SOF = FALSE; - marker->pub.discarded_bytes = 0; - marker->cur_marker = NULL; -} - - -/* - * Initialize the marker reader module. - * This is called only once, when the decompression object is created. - */ - -GLOBAL(void) -jinit_marker_reader (j_decompress_ptr cinfo) -{ - my_marker_ptr marker; - int i; - - /* Create subobject in permanent pool */ - marker = (my_marker_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - SIZEOF(my_marker_reader)); - cinfo->marker = (struct jpeg_marker_reader *) marker; - /* Initialize public method pointers */ - marker->pub.reset_marker_reader = reset_marker_reader; - marker->pub.read_markers = read_markers; - marker->pub.read_restart_marker = read_restart_marker; - /* Initialize COM/APPn processing. - * By default, we examine and then discard APP0 and APP14, - * but simply discard COM and all other APPn. - */ - marker->process_COM = skip_variable; - marker->length_limit_COM = 0; - for (i = 0; i < 16; i++) { - marker->process_APPn[i] = skip_variable; - marker->length_limit_APPn[i] = 0; - } - marker->process_APPn[0] = get_interesting_appn; - marker->process_APPn[14] = get_interesting_appn; - /* Reset marker processing state */ - reset_marker_reader(cinfo); -} - - -/* - * Control saving of COM and APPn markers into marker_list. - */ - -#ifdef SAVE_MARKERS_SUPPORTED - -GLOBAL(void) -jpeg_save_markers (j_decompress_ptr cinfo, int marker_code, - unsigned int length_limit) -{ - my_marker_ptr marker = (my_marker_ptr) cinfo->marker; - long maxlength; - jpeg_marker_parser_method processor; - - /* Length limit mustn't be larger than what we can allocate - * (should only be a concern in a 16-bit environment). - */ - maxlength = cinfo->mem->max_alloc_chunk - SIZEOF(struct jpeg_marker_struct); - if (((long) length_limit) > maxlength) - length_limit = (unsigned int) maxlength; - - /* Choose processor routine to use. - * APP0/APP14 have special requirements. - */ - if (length_limit) { - processor = save_marker; - /* If saving APP0/APP14, save at least enough for our internal use. */ - if (marker_code == (int) M_APP0 && length_limit < APP0_DATA_LEN) - length_limit = APP0_DATA_LEN; - else if (marker_code == (int) M_APP14 && length_limit < APP14_DATA_LEN) - length_limit = APP14_DATA_LEN; - } else { - processor = skip_variable; - /* If discarding APP0/APP14, use our regular on-the-fly processor. */ - if (marker_code == (int) M_APP0 || marker_code == (int) M_APP14) - processor = get_interesting_appn; - } - - if (marker_code == (int) M_COM) { - marker->process_COM = processor; - marker->length_limit_COM = length_limit; - } else if (marker_code >= (int) M_APP0 && marker_code <= (int) M_APP15) { - marker->process_APPn[marker_code - (int) M_APP0] = processor; - marker->length_limit_APPn[marker_code - (int) M_APP0] = length_limit; - } else - ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code); -} - -#endif /* SAVE_MARKERS_SUPPORTED */ - - -/* - * Install a special processing method for COM or APPn markers. - */ - -GLOBAL(void) -jpeg_set_marker_processor (j_decompress_ptr cinfo, int marker_code, - jpeg_marker_parser_method routine) -{ - my_marker_ptr marker = (my_marker_ptr) cinfo->marker; - - if (marker_code == (int) M_COM) - marker->process_COM = routine; - else if (marker_code >= (int) M_APP0 && marker_code <= (int) M_APP15) - marker->process_APPn[marker_code - (int) M_APP0] = routine; - else - ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code); -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jdmaster.c b/gtkmm-osx/trunk/jpeg-6b/jdmaster.c deleted file mode 100644 index 2802c5b..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jdmaster.c +++ /dev/null @@ -1,557 +0,0 @@ -/* - * jdmaster.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains master control logic for the JPEG decompressor. - * These routines are concerned with selecting the modules to be executed - * and with determining the number of passes and the work to be done in each - * pass. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Private state */ - -typedef struct { - struct jpeg_decomp_master pub; /* public fields */ - - int pass_number; /* # of passes completed */ - - boolean using_merged_upsample; /* TRUE if using merged upsample/cconvert */ - - /* Saved references to initialized quantizer modules, - * in case we need to switch modes. - */ - struct jpeg_color_quantizer * quantizer_1pass; - struct jpeg_color_quantizer * quantizer_2pass; -} my_decomp_master; - -typedef my_decomp_master * my_master_ptr; - - -/* - * Determine whether merged upsample/color conversion should be used. - * CRUCIAL: this must match the actual capabilities of jdmerge.c! - */ - -LOCAL(boolean) -use_merged_upsample (j_decompress_ptr cinfo) -{ -#ifdef UPSAMPLE_MERGING_SUPPORTED - /* Merging is the equivalent of plain box-filter upsampling */ - if (cinfo->do_fancy_upsampling || cinfo->CCIR601_sampling) - return FALSE; - /* jdmerge.c only supports YCC=>RGB color conversion */ - if (cinfo->jpeg_color_space != JCS_YCbCr || cinfo->num_components != 3 || - cinfo->out_color_space != JCS_RGB || - cinfo->out_color_components != RGB_PIXELSIZE) - return FALSE; - /* and it only handles 2h1v or 2h2v sampling ratios */ - if (cinfo->comp_info[0].h_samp_factor != 2 || - cinfo->comp_info[1].h_samp_factor != 1 || - cinfo->comp_info[2].h_samp_factor != 1 || - cinfo->comp_info[0].v_samp_factor > 2 || - cinfo->comp_info[1].v_samp_factor != 1 || - cinfo->comp_info[2].v_samp_factor != 1) - return FALSE; - /* furthermore, it doesn't work if we've scaled the IDCTs differently */ - if (cinfo->comp_info[0].DCT_scaled_size != cinfo->min_DCT_scaled_size || - cinfo->comp_info[1].DCT_scaled_size != cinfo->min_DCT_scaled_size || - cinfo->comp_info[2].DCT_scaled_size != cinfo->min_DCT_scaled_size) - return FALSE; - /* ??? also need to test for upsample-time rescaling, when & if supported */ - return TRUE; /* by golly, it'll work... */ -#else - return FALSE; -#endif -} - - -/* - * Compute output image dimensions and related values. - * NOTE: this is exported for possible use by application. - * Hence it mustn't do anything that can't be done twice. - * Also note that it may be called before the master module is initialized! - */ - -GLOBAL(void) -jpeg_calc_output_dimensions (j_decompress_ptr cinfo) -/* Do computations that are needed before master selection phase */ -{ -#ifdef IDCT_SCALING_SUPPORTED - int ci; - jpeg_component_info *compptr; -#endif - - /* Prevent application from calling me at wrong times */ - if (cinfo->global_state != DSTATE_READY) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - -#ifdef IDCT_SCALING_SUPPORTED - - /* Compute actual output image dimensions and DCT scaling choices. */ - if (cinfo->scale_num * 8 <= cinfo->scale_denom) { - /* Provide 1/8 scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width, 8L); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height, 8L); - cinfo->min_DCT_scaled_size = 1; - } else if (cinfo->scale_num * 4 <= cinfo->scale_denom) { - /* Provide 1/4 scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width, 4L); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height, 4L); - cinfo->min_DCT_scaled_size = 2; - } else if (cinfo->scale_num * 2 <= cinfo->scale_denom) { - /* Provide 1/2 scaling */ - cinfo->output_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width, 2L); - cinfo->output_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height, 2L); - cinfo->min_DCT_scaled_size = 4; - } else { - /* Provide 1/1 scaling */ - cinfo->output_width = cinfo->image_width; - cinfo->output_height = cinfo->image_height; - cinfo->min_DCT_scaled_size = DCTSIZE; - } - /* In selecting the actual DCT scaling for each component, we try to - * scale up the chroma components via IDCT scaling rather than upsampling. - * This saves time if the upsampler gets to use 1:1 scaling. - * Note this code assumes that the supported DCT scalings are powers of 2. - */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - int ssize = cinfo->min_DCT_scaled_size; - while (ssize < DCTSIZE && - (compptr->h_samp_factor * ssize * 2 <= - cinfo->max_h_samp_factor * cinfo->min_DCT_scaled_size) && - (compptr->v_samp_factor * ssize * 2 <= - cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size)) { - ssize = ssize * 2; - } - compptr->DCT_scaled_size = ssize; - } - - /* Recompute downsampled dimensions of components; - * application needs to know these if using raw downsampled data. - */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Size in samples, after IDCT scaling */ - compptr->downsampled_width = (JDIMENSION) - jdiv_round_up((long) cinfo->image_width * - (long) (compptr->h_samp_factor * compptr->DCT_scaled_size), - (long) (cinfo->max_h_samp_factor * DCTSIZE)); - compptr->downsampled_height = (JDIMENSION) - jdiv_round_up((long) cinfo->image_height * - (long) (compptr->v_samp_factor * compptr->DCT_scaled_size), - (long) (cinfo->max_v_samp_factor * DCTSIZE)); - } - -#else /* !IDCT_SCALING_SUPPORTED */ - - /* Hardwire it to "no scaling" */ - cinfo->output_width = cinfo->image_width; - cinfo->output_height = cinfo->image_height; - /* jdinput.c has already initialized DCT_scaled_size to DCTSIZE, - * and has computed unscaled downsampled_width and downsampled_height. - */ - -#endif /* IDCT_SCALING_SUPPORTED */ - - /* Report number of components in selected colorspace. */ - /* Probably this should be in the color conversion module... */ - switch (cinfo->out_color_space) { - case JCS_GRAYSCALE: - cinfo->out_color_components = 1; - break; - case JCS_RGB: -#if RGB_PIXELSIZE != 3 - cinfo->out_color_components = RGB_PIXELSIZE; - break; -#endif /* else share code with YCbCr */ - case JCS_YCbCr: - cinfo->out_color_components = 3; - break; - case JCS_CMYK: - case JCS_YCCK: - cinfo->out_color_components = 4; - break; - default: /* else must be same colorspace as in file */ - cinfo->out_color_components = cinfo->num_components; - break; - } - cinfo->output_components = (cinfo->quantize_colors ? 1 : - cinfo->out_color_components); - - /* See if upsampler will want to emit more than one row at a time */ - if (use_merged_upsample(cinfo)) - cinfo->rec_outbuf_height = cinfo->max_v_samp_factor; - else - cinfo->rec_outbuf_height = 1; -} - - -/* - * Several decompression processes need to range-limit values to the range - * 0..MAXJSAMPLE; the input value may fall somewhat outside this range - * due to noise introduced by quantization, roundoff error, etc. These - * processes are inner loops and need to be as fast as possible. On most - * machines, particularly CPUs with pipelines or instruction prefetch, - * a (subscript-check-less) C table lookup - * x = sample_range_limit[x]; - * is faster than explicit tests - * if (x < 0) x = 0; - * else if (x > MAXJSAMPLE) x = MAXJSAMPLE; - * These processes all use a common table prepared by the routine below. - * - * For most steps we can mathematically guarantee that the initial value - * of x is within MAXJSAMPLE+1 of the legal range, so a table running from - * -(MAXJSAMPLE+1) to 2*MAXJSAMPLE+1 is sufficient. But for the initial - * limiting step (just after the IDCT), a wildly out-of-range value is - * possible if the input data is corrupt. To avoid any chance of indexing - * off the end of memory and getting a bad-pointer trap, we perform the - * post-IDCT limiting thus: - * x = range_limit[x & MASK]; - * where MASK is 2 bits wider than legal sample data, ie 10 bits for 8-bit - * samples. Under normal circumstances this is more than enough range and - * a correct output will be generated; with bogus input data the mask will - * cause wraparound, and we will safely generate a bogus-but-in-range output. - * For the post-IDCT step, we want to convert the data from signed to unsigned - * representation by adding CENTERJSAMPLE at the same time that we limit it. - * So the post-IDCT limiting table ends up looking like this: - * CENTERJSAMPLE,CENTERJSAMPLE+1,...,MAXJSAMPLE, - * MAXJSAMPLE (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times), - * 0 (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times), - * 0,1,...,CENTERJSAMPLE-1 - * Negative inputs select values from the upper half of the table after - * masking. - * - * We can save some space by overlapping the start of the post-IDCT table - * with the simpler range limiting table. The post-IDCT table begins at - * sample_range_limit + CENTERJSAMPLE. - * - * Note that the table is allocated in near data space on PCs; it's small - * enough and used often enough to justify this. - */ - -LOCAL(void) -prepare_range_limit_table (j_decompress_ptr cinfo) -/* Allocate and fill in the sample_range_limit table */ -{ - JSAMPLE * table; - int i; - - table = (JSAMPLE *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - (5 * (MAXJSAMPLE+1) + CENTERJSAMPLE) * SIZEOF(JSAMPLE)); - table += (MAXJSAMPLE+1); /* allow negative subscripts of simple table */ - cinfo->sample_range_limit = table; - /* First segment of "simple" table: limit[x] = 0 for x < 0 */ - MEMZERO(table - (MAXJSAMPLE+1), (MAXJSAMPLE+1) * SIZEOF(JSAMPLE)); - /* Main part of "simple" table: limit[x] = x */ - for (i = 0; i <= MAXJSAMPLE; i++) - table[i] = (JSAMPLE) i; - table += CENTERJSAMPLE; /* Point to where post-IDCT table starts */ - /* End of simple table, rest of first half of post-IDCT table */ - for (i = CENTERJSAMPLE; i < 2*(MAXJSAMPLE+1); i++) - table[i] = MAXJSAMPLE; - /* Second half of post-IDCT table */ - MEMZERO(table + (2 * (MAXJSAMPLE+1)), - (2 * (MAXJSAMPLE+1) - CENTERJSAMPLE) * SIZEOF(JSAMPLE)); - MEMCOPY(table + (4 * (MAXJSAMPLE+1) - CENTERJSAMPLE), - cinfo->sample_range_limit, CENTERJSAMPLE * SIZEOF(JSAMPLE)); -} - - -/* - * Master selection of decompression modules. - * This is done once at jpeg_start_decompress time. We determine - * which modules will be used and give them appropriate initialization calls. - * We also initialize the decompressor input side to begin consuming data. - * - * Since jpeg_read_header has finished, we know what is in the SOF - * and (first) SOS markers. We also have all the application parameter - * settings. - */ - -LOCAL(void) -master_selection (j_decompress_ptr cinfo) -{ - my_master_ptr master = (my_master_ptr) cinfo->master; - boolean use_c_buffer; - long samplesperrow; - JDIMENSION jd_samplesperrow; - - /* Initialize dimensions and other stuff */ - jpeg_calc_output_dimensions(cinfo); - prepare_range_limit_table(cinfo); - - /* Width of an output scanline must be representable as JDIMENSION. */ - samplesperrow = (long) cinfo->output_width * (long) cinfo->out_color_components; - jd_samplesperrow = (JDIMENSION) samplesperrow; - if ((long) jd_samplesperrow != samplesperrow) - ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); - - /* Initialize my private state */ - master->pass_number = 0; - master->using_merged_upsample = use_merged_upsample(cinfo); - - /* Color quantizer selection */ - master->quantizer_1pass = NULL; - master->quantizer_2pass = NULL; - /* No mode changes if not using buffered-image mode. */ - if (! cinfo->quantize_colors || ! cinfo->buffered_image) { - cinfo->enable_1pass_quant = FALSE; - cinfo->enable_external_quant = FALSE; - cinfo->enable_2pass_quant = FALSE; - } - if (cinfo->quantize_colors) { - if (cinfo->raw_data_out) - ERREXIT(cinfo, JERR_NOTIMPL); - /* 2-pass quantizer only works in 3-component color space. */ - if (cinfo->out_color_components != 3) { - cinfo->enable_1pass_quant = TRUE; - cinfo->enable_external_quant = FALSE; - cinfo->enable_2pass_quant = FALSE; - cinfo->colormap = NULL; - } else if (cinfo->colormap != NULL) { - cinfo->enable_external_quant = TRUE; - } else if (cinfo->two_pass_quantize) { - cinfo->enable_2pass_quant = TRUE; - } else { - cinfo->enable_1pass_quant = TRUE; - } - - if (cinfo->enable_1pass_quant) { -#ifdef QUANT_1PASS_SUPPORTED - jinit_1pass_quantizer(cinfo); - master->quantizer_1pass = cinfo->cquantize; -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } - - /* We use the 2-pass code to map to external colormaps. */ - if (cinfo->enable_2pass_quant || cinfo->enable_external_quant) { -#ifdef QUANT_2PASS_SUPPORTED - jinit_2pass_quantizer(cinfo); - master->quantizer_2pass = cinfo->cquantize; -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } - /* If both quantizers are initialized, the 2-pass one is left active; - * this is necessary for starting with quantization to an external map. - */ - } - - /* Post-processing: in particular, color conversion first */ - if (! cinfo->raw_data_out) { - if (master->using_merged_upsample) { -#ifdef UPSAMPLE_MERGING_SUPPORTED - jinit_merged_upsampler(cinfo); /* does color conversion too */ -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } else { - jinit_color_deconverter(cinfo); - jinit_upsampler(cinfo); - } - jinit_d_post_controller(cinfo, cinfo->enable_2pass_quant); - } - /* Inverse DCT */ - jinit_inverse_dct(cinfo); - /* Entropy decoding: either Huffman or arithmetic coding. */ - if (cinfo->arith_code) { - ERREXIT(cinfo, JERR_ARITH_NOTIMPL); - } else { - if (cinfo->progressive_mode) { -#ifdef D_PROGRESSIVE_SUPPORTED - jinit_phuff_decoder(cinfo); -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } else - jinit_huff_decoder(cinfo); - } - - /* Initialize principal buffer controllers. */ - use_c_buffer = cinfo->inputctl->has_multiple_scans || cinfo->buffered_image; - jinit_d_coef_controller(cinfo, use_c_buffer); - - if (! cinfo->raw_data_out) - jinit_d_main_controller(cinfo, FALSE /* never need full buffer here */); - - /* We can now tell the memory manager to allocate virtual arrays. */ - (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); - - /* Initialize input side of decompressor to consume first scan. */ - (*cinfo->inputctl->start_input_pass) (cinfo); - -#ifdef D_MULTISCAN_FILES_SUPPORTED - /* If jpeg_start_decompress will read the whole file, initialize - * progress monitoring appropriately. The input step is counted - * as one pass. - */ - if (cinfo->progress != NULL && ! cinfo->buffered_image && - cinfo->inputctl->has_multiple_scans) { - int nscans; - /* Estimate number of scans to set pass_limit. */ - if (cinfo->progressive_mode) { - /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */ - nscans = 2 + 3 * cinfo->num_components; - } else { - /* For a nonprogressive multiscan file, estimate 1 scan per component. */ - nscans = cinfo->num_components; - } - cinfo->progress->pass_counter = 0L; - cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans; - cinfo->progress->completed_passes = 0; - cinfo->progress->total_passes = (cinfo->enable_2pass_quant ? 3 : 2); - /* Count the input pass as done */ - master->pass_number++; - } -#endif /* D_MULTISCAN_FILES_SUPPORTED */ -} - - -/* - * Per-pass setup. - * This is called at the beginning of each output pass. We determine which - * modules will be active during this pass and give them appropriate - * start_pass calls. We also set is_dummy_pass to indicate whether this - * is a "real" output pass or a dummy pass for color quantization. - * (In the latter case, jdapistd.c will crank the pass to completion.) - */ - -METHODDEF(void) -prepare_for_output_pass (j_decompress_ptr cinfo) -{ - my_master_ptr master = (my_master_ptr) cinfo->master; - - if (master->pub.is_dummy_pass) { -#ifdef QUANT_2PASS_SUPPORTED - /* Final pass of 2-pass quantization */ - master->pub.is_dummy_pass = FALSE; - (*cinfo->cquantize->start_pass) (cinfo, FALSE); - (*cinfo->post->start_pass) (cinfo, JBUF_CRANK_DEST); - (*cinfo->main->start_pass) (cinfo, JBUF_CRANK_DEST); -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif /* QUANT_2PASS_SUPPORTED */ - } else { - if (cinfo->quantize_colors && cinfo->colormap == NULL) { - /* Select new quantization method */ - if (cinfo->two_pass_quantize && cinfo->enable_2pass_quant) { - cinfo->cquantize = master->quantizer_2pass; - master->pub.is_dummy_pass = TRUE; - } else if (cinfo->enable_1pass_quant) { - cinfo->cquantize = master->quantizer_1pass; - } else { - ERREXIT(cinfo, JERR_MODE_CHANGE); - } - } - (*cinfo->idct->start_pass) (cinfo); - (*cinfo->coef->start_output_pass) (cinfo); - if (! cinfo->raw_data_out) { - if (! master->using_merged_upsample) - (*cinfo->cconvert->start_pass) (cinfo); - (*cinfo->upsample->start_pass) (cinfo); - if (cinfo->quantize_colors) - (*cinfo->cquantize->start_pass) (cinfo, master->pub.is_dummy_pass); - (*cinfo->post->start_pass) (cinfo, - (master->pub.is_dummy_pass ? JBUF_SAVE_AND_PASS : JBUF_PASS_THRU)); - (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU); - } - } - - /* Set up progress monitor's pass info if present */ - if (cinfo->progress != NULL) { - cinfo->progress->completed_passes = master->pass_number; - cinfo->progress->total_passes = master->pass_number + - (master->pub.is_dummy_pass ? 2 : 1); - /* In buffered-image mode, we assume one more output pass if EOI not - * yet reached, but no more passes if EOI has been reached. - */ - if (cinfo->buffered_image && ! cinfo->inputctl->eoi_reached) { - cinfo->progress->total_passes += (cinfo->enable_2pass_quant ? 2 : 1); - } - } -} - - -/* - * Finish up at end of an output pass. - */ - -METHODDEF(void) -finish_output_pass (j_decompress_ptr cinfo) -{ - my_master_ptr master = (my_master_ptr) cinfo->master; - - if (cinfo->quantize_colors) - (*cinfo->cquantize->finish_pass) (cinfo); - master->pass_number++; -} - - -#ifdef D_MULTISCAN_FILES_SUPPORTED - -/* - * Switch to a new external colormap between output passes. - */ - -GLOBAL(void) -jpeg_new_colormap (j_decompress_ptr cinfo) -{ - my_master_ptr master = (my_master_ptr) cinfo->master; - - /* Prevent application from calling me at wrong times */ - if (cinfo->global_state != DSTATE_BUFIMAGE) - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - - if (cinfo->quantize_colors && cinfo->enable_external_quant && - cinfo->colormap != NULL) { - /* Select 2-pass quantizer for external colormap use */ - cinfo->cquantize = master->quantizer_2pass; - /* Notify quantizer of colormap change */ - (*cinfo->cquantize->new_color_map) (cinfo); - master->pub.is_dummy_pass = FALSE; /* just in case */ - } else - ERREXIT(cinfo, JERR_MODE_CHANGE); -} - -#endif /* D_MULTISCAN_FILES_SUPPORTED */ - - -/* - * Initialize master decompression control and select active modules. - * This is performed at the start of jpeg_start_decompress. - */ - -GLOBAL(void) -jinit_master_decompress (j_decompress_ptr cinfo) -{ - my_master_ptr master; - - master = (my_master_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_decomp_master)); - cinfo->master = (struct jpeg_decomp_master *) master; - master->pub.prepare_for_output_pass = prepare_for_output_pass; - master->pub.finish_output_pass = finish_output_pass; - - master->pub.is_dummy_pass = FALSE; - - master_selection(cinfo); -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jdmerge.c b/gtkmm-osx/trunk/jpeg-6b/jdmerge.c deleted file mode 100644 index 3744446..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jdmerge.c +++ /dev/null @@ -1,400 +0,0 @@ -/* - * jdmerge.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains code for merged upsampling/color conversion. - * - * This file combines functions from jdsample.c and jdcolor.c; - * read those files first to understand what's going on. - * - * When the chroma components are to be upsampled by simple replication - * (ie, box filtering), we can save some work in color conversion by - * calculating all the output pixels corresponding to a pair of chroma - * samples at one time. In the conversion equations - * R = Y + K1 * Cr - * G = Y + K2 * Cb + K3 * Cr - * B = Y + K4 * Cb - * only the Y term varies among the group of pixels corresponding to a pair - * of chroma samples, so the rest of the terms can be calculated just once. - * At typical sampling ratios, this eliminates half or three-quarters of the - * multiplications needed for color conversion. - * - * This file currently provides implementations for the following cases: - * YCbCr => RGB color conversion only. - * Sampling ratios of 2h1v or 2h2v. - * No scaling needed at upsample time. - * Corner-aligned (non-CCIR601) sampling alignment. - * Other special cases could be added, but in most applications these are - * the only common cases. (For uncommon cases we fall back on the more - * general code in jdsample.c and jdcolor.c.) - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - -#ifdef UPSAMPLE_MERGING_SUPPORTED - - -/* Private subobject */ - -typedef struct { - struct jpeg_upsampler pub; /* public fields */ - - /* Pointer to routine to do actual upsampling/conversion of one row group */ - JMETHOD(void, upmethod, (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, - JSAMPARRAY output_buf)); - - /* Private state for YCC->RGB conversion */ - int * Cr_r_tab; /* => table for Cr to R conversion */ - int * Cb_b_tab; /* => table for Cb to B conversion */ - INT32 * Cr_g_tab; /* => table for Cr to G conversion */ - INT32 * Cb_g_tab; /* => table for Cb to G conversion */ - - /* For 2:1 vertical sampling, we produce two output rows at a time. - * We need a "spare" row buffer to hold the second output row if the - * application provides just a one-row buffer; we also use the spare - * to discard the dummy last row if the image height is odd. - */ - JSAMPROW spare_row; - boolean spare_full; /* T if spare buffer is occupied */ - - JDIMENSION out_row_width; /* samples per output row */ - JDIMENSION rows_to_go; /* counts rows remaining in image */ -} my_upsampler; - -typedef my_upsampler * my_upsample_ptr; - -#define SCALEBITS 16 /* speediest right-shift on some machines */ -#define ONE_HALF ((INT32) 1 << (SCALEBITS-1)) -#define FIX(x) ((INT32) ((x) * (1L<RGB colorspace conversion. - * This is taken directly from jdcolor.c; see that file for more info. - */ - -LOCAL(void) -build_ycc_rgb_table (j_decompress_ptr cinfo) -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - int i; - INT32 x; - SHIFT_TEMPS - - upsample->Cr_r_tab = (int *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - (MAXJSAMPLE+1) * SIZEOF(int)); - upsample->Cb_b_tab = (int *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - (MAXJSAMPLE+1) * SIZEOF(int)); - upsample->Cr_g_tab = (INT32 *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - (MAXJSAMPLE+1) * SIZEOF(INT32)); - upsample->Cb_g_tab = (INT32 *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - (MAXJSAMPLE+1) * SIZEOF(INT32)); - - for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) { - /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */ - /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */ - /* Cr=>R value is nearest int to 1.40200 * x */ - upsample->Cr_r_tab[i] = (int) - RIGHT_SHIFT(FIX(1.40200) * x + ONE_HALF, SCALEBITS); - /* Cb=>B value is nearest int to 1.77200 * x */ - upsample->Cb_b_tab[i] = (int) - RIGHT_SHIFT(FIX(1.77200) * x + ONE_HALF, SCALEBITS); - /* Cr=>G value is scaled-up -0.71414 * x */ - upsample->Cr_g_tab[i] = (- FIX(0.71414)) * x; - /* Cb=>G value is scaled-up -0.34414 * x */ - /* We also add in ONE_HALF so that need not do it in inner loop */ - upsample->Cb_g_tab[i] = (- FIX(0.34414)) * x + ONE_HALF; - } -} - - -/* - * Initialize for an upsampling pass. - */ - -METHODDEF(void) -start_pass_merged_upsample (j_decompress_ptr cinfo) -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - - /* Mark the spare buffer empty */ - upsample->spare_full = FALSE; - /* Initialize total-height counter for detecting bottom of image */ - upsample->rows_to_go = cinfo->output_height; -} - - -/* - * Control routine to do upsampling (and color conversion). - * - * The control routine just handles the row buffering considerations. - */ - -METHODDEF(void) -merged_2v_upsample (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail) -/* 2:1 vertical sampling case: may need a spare row. */ -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - JSAMPROW work_ptrs[2]; - JDIMENSION num_rows; /* number of rows returned to caller */ - - if (upsample->spare_full) { - /* If we have a spare row saved from a previous cycle, just return it. */ - jcopy_sample_rows(& upsample->spare_row, 0, output_buf + *out_row_ctr, 0, - 1, upsample->out_row_width); - num_rows = 1; - upsample->spare_full = FALSE; - } else { - /* Figure number of rows to return to caller. */ - num_rows = 2; - /* Not more than the distance to the end of the image. */ - if (num_rows > upsample->rows_to_go) - num_rows = upsample->rows_to_go; - /* And not more than what the client can accept: */ - out_rows_avail -= *out_row_ctr; - if (num_rows > out_rows_avail) - num_rows = out_rows_avail; - /* Create output pointer array for upsampler. */ - work_ptrs[0] = output_buf[*out_row_ctr]; - if (num_rows > 1) { - work_ptrs[1] = output_buf[*out_row_ctr + 1]; - } else { - work_ptrs[1] = upsample->spare_row; - upsample->spare_full = TRUE; - } - /* Now do the upsampling. */ - (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr, work_ptrs); - } - - /* Adjust counts */ - *out_row_ctr += num_rows; - upsample->rows_to_go -= num_rows; - /* When the buffer is emptied, declare this input row group consumed */ - if (! upsample->spare_full) - (*in_row_group_ctr)++; -} - - -METHODDEF(void) -merged_1v_upsample (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail) -/* 1:1 vertical sampling case: much easier, never need a spare row. */ -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - - /* Just do the upsampling. */ - (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr, - output_buf + *out_row_ctr); - /* Adjust counts */ - (*out_row_ctr)++; - (*in_row_group_ctr)++; -} - - -/* - * These are the routines invoked by the control routines to do - * the actual upsampling/conversion. One row group is processed per call. - * - * Note: since we may be writing directly into application-supplied buffers, - * we have to be honest about the output width; we can't assume the buffer - * has been rounded up to an even width. - */ - - -/* - * Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical. - */ - -METHODDEF(void) -h2v1_merged_upsample (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, - JSAMPARRAY output_buf) -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - register int y, cred, cgreen, cblue; - int cb, cr; - register JSAMPROW outptr; - JSAMPROW inptr0, inptr1, inptr2; - JDIMENSION col; - /* copy these pointers into registers if possible */ - register JSAMPLE * range_limit = cinfo->sample_range_limit; - int * Crrtab = upsample->Cr_r_tab; - int * Cbbtab = upsample->Cb_b_tab; - INT32 * Crgtab = upsample->Cr_g_tab; - INT32 * Cbgtab = upsample->Cb_g_tab; - SHIFT_TEMPS - - inptr0 = input_buf[0][in_row_group_ctr]; - inptr1 = input_buf[1][in_row_group_ctr]; - inptr2 = input_buf[2][in_row_group_ctr]; - outptr = output_buf[0]; - /* Loop for each pair of output pixels */ - for (col = cinfo->output_width >> 1; col > 0; col--) { - /* Do the chroma part of the calculation */ - cb = GETJSAMPLE(*inptr1++); - cr = GETJSAMPLE(*inptr2++); - cred = Crrtab[cr]; - cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); - cblue = Cbbtab[cb]; - /* Fetch 2 Y values and emit 2 pixels */ - y = GETJSAMPLE(*inptr0++); - outptr[RGB_RED] = range_limit[y + cred]; - outptr[RGB_GREEN] = range_limit[y + cgreen]; - outptr[RGB_BLUE] = range_limit[y + cblue]; - outptr += RGB_PIXELSIZE; - y = GETJSAMPLE(*inptr0++); - outptr[RGB_RED] = range_limit[y + cred]; - outptr[RGB_GREEN] = range_limit[y + cgreen]; - outptr[RGB_BLUE] = range_limit[y + cblue]; - outptr += RGB_PIXELSIZE; - } - /* If image width is odd, do the last output column separately */ - if (cinfo->output_width & 1) { - cb = GETJSAMPLE(*inptr1); - cr = GETJSAMPLE(*inptr2); - cred = Crrtab[cr]; - cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); - cblue = Cbbtab[cb]; - y = GETJSAMPLE(*inptr0); - outptr[RGB_RED] = range_limit[y + cred]; - outptr[RGB_GREEN] = range_limit[y + cgreen]; - outptr[RGB_BLUE] = range_limit[y + cblue]; - } -} - - -/* - * Upsample and color convert for the case of 2:1 horizontal and 2:1 vertical. - */ - -METHODDEF(void) -h2v2_merged_upsample (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, - JSAMPARRAY output_buf) -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - register int y, cred, cgreen, cblue; - int cb, cr; - register JSAMPROW outptr0, outptr1; - JSAMPROW inptr00, inptr01, inptr1, inptr2; - JDIMENSION col; - /* copy these pointers into registers if possible */ - register JSAMPLE * range_limit = cinfo->sample_range_limit; - int * Crrtab = upsample->Cr_r_tab; - int * Cbbtab = upsample->Cb_b_tab; - INT32 * Crgtab = upsample->Cr_g_tab; - INT32 * Cbgtab = upsample->Cb_g_tab; - SHIFT_TEMPS - - inptr00 = input_buf[0][in_row_group_ctr*2]; - inptr01 = input_buf[0][in_row_group_ctr*2 + 1]; - inptr1 = input_buf[1][in_row_group_ctr]; - inptr2 = input_buf[2][in_row_group_ctr]; - outptr0 = output_buf[0]; - outptr1 = output_buf[1]; - /* Loop for each group of output pixels */ - for (col = cinfo->output_width >> 1; col > 0; col--) { - /* Do the chroma part of the calculation */ - cb = GETJSAMPLE(*inptr1++); - cr = GETJSAMPLE(*inptr2++); - cred = Crrtab[cr]; - cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); - cblue = Cbbtab[cb]; - /* Fetch 4 Y values and emit 4 pixels */ - y = GETJSAMPLE(*inptr00++); - outptr0[RGB_RED] = range_limit[y + cred]; - outptr0[RGB_GREEN] = range_limit[y + cgreen]; - outptr0[RGB_BLUE] = range_limit[y + cblue]; - outptr0 += RGB_PIXELSIZE; - y = GETJSAMPLE(*inptr00++); - outptr0[RGB_RED] = range_limit[y + cred]; - outptr0[RGB_GREEN] = range_limit[y + cgreen]; - outptr0[RGB_BLUE] = range_limit[y + cblue]; - outptr0 += RGB_PIXELSIZE; - y = GETJSAMPLE(*inptr01++); - outptr1[RGB_RED] = range_limit[y + cred]; - outptr1[RGB_GREEN] = range_limit[y + cgreen]; - outptr1[RGB_BLUE] = range_limit[y + cblue]; - outptr1 += RGB_PIXELSIZE; - y = GETJSAMPLE(*inptr01++); - outptr1[RGB_RED] = range_limit[y + cred]; - outptr1[RGB_GREEN] = range_limit[y + cgreen]; - outptr1[RGB_BLUE] = range_limit[y + cblue]; - outptr1 += RGB_PIXELSIZE; - } - /* If image width is odd, do the last output column separately */ - if (cinfo->output_width & 1) { - cb = GETJSAMPLE(*inptr1); - cr = GETJSAMPLE(*inptr2); - cred = Crrtab[cr]; - cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); - cblue = Cbbtab[cb]; - y = GETJSAMPLE(*inptr00); - outptr0[RGB_RED] = range_limit[y + cred]; - outptr0[RGB_GREEN] = range_limit[y + cgreen]; - outptr0[RGB_BLUE] = range_limit[y + cblue]; - y = GETJSAMPLE(*inptr01); - outptr1[RGB_RED] = range_limit[y + cred]; - outptr1[RGB_GREEN] = range_limit[y + cgreen]; - outptr1[RGB_BLUE] = range_limit[y + cblue]; - } -} - - -/* - * Module initialization routine for merged upsampling/color conversion. - * - * NB: this is called under the conditions determined by use_merged_upsample() - * in jdmaster.c. That routine MUST correspond to the actual capabilities - * of this module; no safety checks are made here. - */ - -GLOBAL(void) -jinit_merged_upsampler (j_decompress_ptr cinfo) -{ - my_upsample_ptr upsample; - - upsample = (my_upsample_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_upsampler)); - cinfo->upsample = (struct jpeg_upsampler *) upsample; - upsample->pub.start_pass = start_pass_merged_upsample; - upsample->pub.need_context_rows = FALSE; - - upsample->out_row_width = cinfo->output_width * cinfo->out_color_components; - - if (cinfo->max_v_samp_factor == 2) { - upsample->pub.upsample = merged_2v_upsample; - upsample->upmethod = h2v2_merged_upsample; - /* Allocate a spare row buffer */ - upsample->spare_row = (JSAMPROW) - (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, - (size_t) (upsample->out_row_width * SIZEOF(JSAMPLE))); - } else { - upsample->pub.upsample = merged_1v_upsample; - upsample->upmethod = h2v1_merged_upsample; - /* No spare row needed */ - upsample->spare_row = NULL; - } - - build_ycc_rgb_table(cinfo); -} - -#endif /* UPSAMPLE_MERGING_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jdphuff.c b/gtkmm-osx/trunk/jpeg-6b/jdphuff.c deleted file mode 100644 index 2267809..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jdphuff.c +++ /dev/null @@ -1,668 +0,0 @@ -/* - * jdphuff.c - * - * Copyright (C) 1995-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains Huffman entropy decoding routines for progressive JPEG. - * - * Much of the complexity here has to do with supporting input suspension. - * If the data source module demands suspension, we want to be able to back - * up to the start of the current MCU. To do this, we copy state variables - * into local working storage, and update them back to the permanent - * storage only upon successful completion of an MCU. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jdhuff.h" /* Declarations shared with jdhuff.c */ - - -#ifdef D_PROGRESSIVE_SUPPORTED - -/* - * Expanded entropy decoder object for progressive Huffman decoding. - * - * The savable_state subrecord contains fields that change within an MCU, - * but must not be updated permanently until we complete the MCU. - */ - -typedef struct { - unsigned int EOBRUN; /* remaining EOBs in EOBRUN */ - int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ -} savable_state; - -/* This macro is to work around compilers with missing or broken - * structure assignment. You'll need to fix this code if you have - * such a compiler and you change MAX_COMPS_IN_SCAN. - */ - -#ifndef NO_STRUCT_ASSIGN -#define ASSIGN_STATE(dest,src) ((dest) = (src)) -#else -#if MAX_COMPS_IN_SCAN == 4 -#define ASSIGN_STATE(dest,src) \ - ((dest).EOBRUN = (src).EOBRUN, \ - (dest).last_dc_val[0] = (src).last_dc_val[0], \ - (dest).last_dc_val[1] = (src).last_dc_val[1], \ - (dest).last_dc_val[2] = (src).last_dc_val[2], \ - (dest).last_dc_val[3] = (src).last_dc_val[3]) -#endif -#endif - - -typedef struct { - struct jpeg_entropy_decoder pub; /* public fields */ - - /* These fields are loaded into local variables at start of each MCU. - * In case of suspension, we exit WITHOUT updating them. - */ - bitread_perm_state bitstate; /* Bit buffer at start of MCU */ - savable_state saved; /* Other state at start of MCU */ - - /* These fields are NOT loaded into local working state. */ - unsigned int restarts_to_go; /* MCUs left in this restart interval */ - - /* Pointers to derived tables (these workspaces have image lifespan) */ - d_derived_tbl * derived_tbls[NUM_HUFF_TBLS]; - - d_derived_tbl * ac_derived_tbl; /* active table during an AC scan */ -} phuff_entropy_decoder; - -typedef phuff_entropy_decoder * phuff_entropy_ptr; - -/* Forward declarations */ -METHODDEF(boolean) decode_mcu_DC_first JPP((j_decompress_ptr cinfo, - JBLOCKROW *MCU_data)); -METHODDEF(boolean) decode_mcu_AC_first JPP((j_decompress_ptr cinfo, - JBLOCKROW *MCU_data)); -METHODDEF(boolean) decode_mcu_DC_refine JPP((j_decompress_ptr cinfo, - JBLOCKROW *MCU_data)); -METHODDEF(boolean) decode_mcu_AC_refine JPP((j_decompress_ptr cinfo, - JBLOCKROW *MCU_data)); - - -/* - * Initialize for a Huffman-compressed scan. - */ - -METHODDEF(void) -start_pass_phuff_decoder (j_decompress_ptr cinfo) -{ - phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; - boolean is_DC_band, bad; - int ci, coefi, tbl; - int *coef_bit_ptr; - jpeg_component_info * compptr; - - is_DC_band = (cinfo->Ss == 0); - - /* Validate scan parameters */ - bad = FALSE; - if (is_DC_band) { - if (cinfo->Se != 0) - bad = TRUE; - } else { - /* need not check Ss/Se < 0 since they came from unsigned bytes */ - if (cinfo->Ss > cinfo->Se || cinfo->Se >= DCTSIZE2) - bad = TRUE; - /* AC scans may have only one component */ - if (cinfo->comps_in_scan != 1) - bad = TRUE; - } - if (cinfo->Ah != 0) { - /* Successive approximation refinement scan: must have Al = Ah-1. */ - if (cinfo->Al != cinfo->Ah-1) - bad = TRUE; - } - if (cinfo->Al > 13) /* need not check for < 0 */ - bad = TRUE; - /* Arguably the maximum Al value should be less than 13 for 8-bit precision, - * but the spec doesn't say so, and we try to be liberal about what we - * accept. Note: large Al values could result in out-of-range DC - * coefficients during early scans, leading to bizarre displays due to - * overflows in the IDCT math. But we won't crash. - */ - if (bad) - ERREXIT4(cinfo, JERR_BAD_PROGRESSION, - cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al); - /* Update progression status, and verify that scan order is legal. - * Note that inter-scan inconsistencies are treated as warnings - * not fatal errors ... not clear if this is right way to behave. - */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - int cindex = cinfo->cur_comp_info[ci]->component_index; - coef_bit_ptr = & cinfo->coef_bits[cindex][0]; - if (!is_DC_band && coef_bit_ptr[0] < 0) /* AC without prior DC scan */ - WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, 0); - for (coefi = cinfo->Ss; coefi <= cinfo->Se; coefi++) { - int expected = (coef_bit_ptr[coefi] < 0) ? 0 : coef_bit_ptr[coefi]; - if (cinfo->Ah != expected) - WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, coefi); - coef_bit_ptr[coefi] = cinfo->Al; - } - } - - /* Select MCU decoding routine */ - if (cinfo->Ah == 0) { - if (is_DC_band) - entropy->pub.decode_mcu = decode_mcu_DC_first; - else - entropy->pub.decode_mcu = decode_mcu_AC_first; - } else { - if (is_DC_band) - entropy->pub.decode_mcu = decode_mcu_DC_refine; - else - entropy->pub.decode_mcu = decode_mcu_AC_refine; - } - - for (ci = 0; ci < cinfo->comps_in_scan; ci++) { - compptr = cinfo->cur_comp_info[ci]; - /* Make sure requested tables are present, and compute derived tables. - * We may build same derived table more than once, but it's not expensive. - */ - if (is_DC_band) { - if (cinfo->Ah == 0) { /* DC refinement needs no table */ - tbl = compptr->dc_tbl_no; - jpeg_make_d_derived_tbl(cinfo, TRUE, tbl, - & entropy->derived_tbls[tbl]); - } - } else { - tbl = compptr->ac_tbl_no; - jpeg_make_d_derived_tbl(cinfo, FALSE, tbl, - & entropy->derived_tbls[tbl]); - /* remember the single active table */ - entropy->ac_derived_tbl = entropy->derived_tbls[tbl]; - } - /* Initialize DC predictions to 0 */ - entropy->saved.last_dc_val[ci] = 0; - } - - /* Initialize bitread state variables */ - entropy->bitstate.bits_left = 0; - entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */ - entropy->pub.insufficient_data = FALSE; - - /* Initialize private state variables */ - entropy->saved.EOBRUN = 0; - - /* Initialize restart counter */ - entropy->restarts_to_go = cinfo->restart_interval; -} - - -/* - * Figure F.12: extend sign bit. - * On some machines, a shift and add will be faster than a table lookup. - */ - -#ifdef AVOID_TABLES - -#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x)) - -#else - -#define HUFF_EXTEND(x,s) ((x) < extend_test[s] ? (x) + extend_offset[s] : (x)) - -static const int extend_test[16] = /* entry n is 2**(n-1) */ - { 0, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, - 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 }; - -static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */ - { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1, - ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1, - ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1, - ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 }; - -#endif /* AVOID_TABLES */ - - -/* - * Check for a restart marker & resynchronize decoder. - * Returns FALSE if must suspend. - */ - -LOCAL(boolean) -process_restart (j_decompress_ptr cinfo) -{ - phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; - int ci; - - /* Throw away any unused bits remaining in bit buffer; */ - /* include any full bytes in next_marker's count of discarded bytes */ - cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8; - entropy->bitstate.bits_left = 0; - - /* Advance past the RSTn marker */ - if (! (*cinfo->marker->read_restart_marker) (cinfo)) - return FALSE; - - /* Re-initialize DC predictions to 0 */ - for (ci = 0; ci < cinfo->comps_in_scan; ci++) - entropy->saved.last_dc_val[ci] = 0; - /* Re-init EOB run count, too */ - entropy->saved.EOBRUN = 0; - - /* Reset restart counter */ - entropy->restarts_to_go = cinfo->restart_interval; - - /* Reset out-of-data flag, unless read_restart_marker left us smack up - * against a marker. In that case we will end up treating the next data - * segment as empty, and we can avoid producing bogus output pixels by - * leaving the flag set. - */ - if (cinfo->unread_marker == 0) - entropy->pub.insufficient_data = FALSE; - - return TRUE; -} - - -/* - * Huffman MCU decoding. - * Each of these routines decodes and returns one MCU's worth of - * Huffman-compressed coefficients. - * The coefficients are reordered from zigzag order into natural array order, - * but are not dequantized. - * - * The i'th block of the MCU is stored into the block pointed to by - * MCU_data[i]. WE ASSUME THIS AREA IS INITIALLY ZEROED BY THE CALLER. - * - * We return FALSE if data source requested suspension. In that case no - * changes have been made to permanent state. (Exception: some output - * coefficients may already have been assigned. This is harmless for - * spectral selection, since we'll just re-assign them on the next call. - * Successive approximation AC refinement has to be more careful, however.) - */ - -/* - * MCU decoding for DC initial scan (either spectral selection, - * or first pass of successive approximation). - */ - -METHODDEF(boolean) -decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) -{ - phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; - int Al = cinfo->Al; - register int s, r; - int blkn, ci; - JBLOCKROW block; - BITREAD_STATE_VARS; - savable_state state; - d_derived_tbl * tbl; - jpeg_component_info * compptr; - - /* Process restart marker if needed; may have to suspend */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) - if (! process_restart(cinfo)) - return FALSE; - } - - /* If we've run out of data, just leave the MCU set to zeroes. - * This way, we return uniform gray for the remainder of the segment. - */ - if (! entropy->pub.insufficient_data) { - - /* Load up working state */ - BITREAD_LOAD_STATE(cinfo,entropy->bitstate); - ASSIGN_STATE(state, entropy->saved); - - /* Outer loop handles each block in the MCU */ - - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - block = MCU_data[blkn]; - ci = cinfo->MCU_membership[blkn]; - compptr = cinfo->cur_comp_info[ci]; - tbl = entropy->derived_tbls[compptr->dc_tbl_no]; - - /* Decode a single block's worth of coefficients */ - - /* Section F.2.2.1: decode the DC coefficient difference */ - HUFF_DECODE(s, br_state, tbl, return FALSE, label1); - if (s) { - CHECK_BIT_BUFFER(br_state, s, return FALSE); - r = GET_BITS(s); - s = HUFF_EXTEND(r, s); - } - - /* Convert DC difference to actual value, update last_dc_val */ - s += state.last_dc_val[ci]; - state.last_dc_val[ci] = s; - /* Scale and output the coefficient (assumes jpeg_natural_order[0]=0) */ - (*block)[0] = (JCOEF) (s << Al); - } - - /* Completed MCU, so update state */ - BITREAD_SAVE_STATE(cinfo,entropy->bitstate); - ASSIGN_STATE(entropy->saved, state); - } - - /* Account for restart interval (no-op if not using restarts) */ - entropy->restarts_to_go--; - - return TRUE; -} - - -/* - * MCU decoding for AC initial scan (either spectral selection, - * or first pass of successive approximation). - */ - -METHODDEF(boolean) -decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) -{ - phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; - int Se = cinfo->Se; - int Al = cinfo->Al; - register int s, k, r; - unsigned int EOBRUN; - JBLOCKROW block; - BITREAD_STATE_VARS; - d_derived_tbl * tbl; - - /* Process restart marker if needed; may have to suspend */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) - if (! process_restart(cinfo)) - return FALSE; - } - - /* If we've run out of data, just leave the MCU set to zeroes. - * This way, we return uniform gray for the remainder of the segment. - */ - if (! entropy->pub.insufficient_data) { - - /* Load up working state. - * We can avoid loading/saving bitread state if in an EOB run. - */ - EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */ - - /* There is always only one block per MCU */ - - if (EOBRUN > 0) /* if it's a band of zeroes... */ - EOBRUN--; /* ...process it now (we do nothing) */ - else { - BITREAD_LOAD_STATE(cinfo,entropy->bitstate); - block = MCU_data[0]; - tbl = entropy->ac_derived_tbl; - - for (k = cinfo->Ss; k <= Se; k++) { - HUFF_DECODE(s, br_state, tbl, return FALSE, label2); - r = s >> 4; - s &= 15; - if (s) { - k += r; - CHECK_BIT_BUFFER(br_state, s, return FALSE); - r = GET_BITS(s); - s = HUFF_EXTEND(r, s); - /* Scale and output coefficient in natural (dezigzagged) order */ - (*block)[jpeg_natural_order[k]] = (JCOEF) (s << Al); - } else { - if (r == 15) { /* ZRL */ - k += 15; /* skip 15 zeroes in band */ - } else { /* EOBr, run length is 2^r + appended bits */ - EOBRUN = 1 << r; - if (r) { /* EOBr, r > 0 */ - CHECK_BIT_BUFFER(br_state, r, return FALSE); - r = GET_BITS(r); - EOBRUN += r; - } - EOBRUN--; /* this band is processed at this moment */ - break; /* force end-of-band */ - } - } - } - - BITREAD_SAVE_STATE(cinfo,entropy->bitstate); - } - - /* Completed MCU, so update state */ - entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */ - } - - /* Account for restart interval (no-op if not using restarts) */ - entropy->restarts_to_go--; - - return TRUE; -} - - -/* - * MCU decoding for DC successive approximation refinement scan. - * Note: we assume such scans can be multi-component, although the spec - * is not very clear on the point. - */ - -METHODDEF(boolean) -decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) -{ - phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; - int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ - int blkn; - JBLOCKROW block; - BITREAD_STATE_VARS; - - /* Process restart marker if needed; may have to suspend */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) - if (! process_restart(cinfo)) - return FALSE; - } - - /* Not worth the cycles to check insufficient_data here, - * since we will not change the data anyway if we read zeroes. - */ - - /* Load up working state */ - BITREAD_LOAD_STATE(cinfo,entropy->bitstate); - - /* Outer loop handles each block in the MCU */ - - for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { - block = MCU_data[blkn]; - - /* Encoded data is simply the next bit of the two's-complement DC value */ - CHECK_BIT_BUFFER(br_state, 1, return FALSE); - if (GET_BITS(1)) - (*block)[0] |= p1; - /* Note: since we use |=, repeating the assignment later is safe */ - } - - /* Completed MCU, so update state */ - BITREAD_SAVE_STATE(cinfo,entropy->bitstate); - - /* Account for restart interval (no-op if not using restarts) */ - entropy->restarts_to_go--; - - return TRUE; -} - - -/* - * MCU decoding for AC successive approximation refinement scan. - */ - -METHODDEF(boolean) -decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) -{ - phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; - int Se = cinfo->Se; - int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ - int m1 = (-1) << cinfo->Al; /* -1 in the bit position being coded */ - register int s, k, r; - unsigned int EOBRUN; - JBLOCKROW block; - JCOEFPTR thiscoef; - BITREAD_STATE_VARS; - d_derived_tbl * tbl; - int num_newnz; - int newnz_pos[DCTSIZE2]; - - /* Process restart marker if needed; may have to suspend */ - if (cinfo->restart_interval) { - if (entropy->restarts_to_go == 0) - if (! process_restart(cinfo)) - return FALSE; - } - - /* If we've run out of data, don't modify the MCU. - */ - if (! entropy->pub.insufficient_data) { - - /* Load up working state */ - BITREAD_LOAD_STATE(cinfo,entropy->bitstate); - EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */ - - /* There is always only one block per MCU */ - block = MCU_data[0]; - tbl = entropy->ac_derived_tbl; - - /* If we are forced to suspend, we must undo the assignments to any newly - * nonzero coefficients in the block, because otherwise we'd get confused - * next time about which coefficients were already nonzero. - * But we need not undo addition of bits to already-nonzero coefficients; - * instead, we can test the current bit to see if we already did it. - */ - num_newnz = 0; - - /* initialize coefficient loop counter to start of band */ - k = cinfo->Ss; - - if (EOBRUN == 0) { - for (; k <= Se; k++) { - HUFF_DECODE(s, br_state, tbl, goto undoit, label3); - r = s >> 4; - s &= 15; - if (s) { - if (s != 1) /* size of new coef should always be 1 */ - WARNMS(cinfo, JWRN_HUFF_BAD_CODE); - CHECK_BIT_BUFFER(br_state, 1, goto undoit); - if (GET_BITS(1)) - s = p1; /* newly nonzero coef is positive */ - else - s = m1; /* newly nonzero coef is negative */ - } else { - if (r != 15) { - EOBRUN = 1 << r; /* EOBr, run length is 2^r + appended bits */ - if (r) { - CHECK_BIT_BUFFER(br_state, r, goto undoit); - r = GET_BITS(r); - EOBRUN += r; - } - break; /* rest of block is handled by EOB logic */ - } - /* note s = 0 for processing ZRL */ - } - /* Advance over already-nonzero coefs and r still-zero coefs, - * appending correction bits to the nonzeroes. A correction bit is 1 - * if the absolute value of the coefficient must be increased. - */ - do { - thiscoef = *block + jpeg_natural_order[k]; - if (*thiscoef != 0) { - CHECK_BIT_BUFFER(br_state, 1, goto undoit); - if (GET_BITS(1)) { - if ((*thiscoef & p1) == 0) { /* do nothing if already set it */ - if (*thiscoef >= 0) - *thiscoef += p1; - else - *thiscoef += m1; - } - } - } else { - if (--r < 0) - break; /* reached target zero coefficient */ - } - k++; - } while (k <= Se); - if (s) { - int pos = jpeg_natural_order[k]; - /* Output newly nonzero coefficient */ - (*block)[pos] = (JCOEF) s; - /* Remember its position in case we have to suspend */ - newnz_pos[num_newnz++] = pos; - } - } - } - - if (EOBRUN > 0) { - /* Scan any remaining coefficient positions after the end-of-band - * (the last newly nonzero coefficient, if any). Append a correction - * bit to each already-nonzero coefficient. A correction bit is 1 - * if the absolute value of the coefficient must be increased. - */ - for (; k <= Se; k++) { - thiscoef = *block + jpeg_natural_order[k]; - if (*thiscoef != 0) { - CHECK_BIT_BUFFER(br_state, 1, goto undoit); - if (GET_BITS(1)) { - if ((*thiscoef & p1) == 0) { /* do nothing if already changed it */ - if (*thiscoef >= 0) - *thiscoef += p1; - else - *thiscoef += m1; - } - } - } - } - /* Count one block completed in EOB run */ - EOBRUN--; - } - - /* Completed MCU, so update state */ - BITREAD_SAVE_STATE(cinfo,entropy->bitstate); - entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */ - } - - /* Account for restart interval (no-op if not using restarts) */ - entropy->restarts_to_go--; - - return TRUE; - -undoit: - /* Re-zero any output coefficients that we made newly nonzero */ - while (num_newnz > 0) - (*block)[newnz_pos[--num_newnz]] = 0; - - return FALSE; -} - - -/* - * Module initialization routine for progressive Huffman entropy decoding. - */ - -GLOBAL(void) -jinit_phuff_decoder (j_decompress_ptr cinfo) -{ - phuff_entropy_ptr entropy; - int *coef_bit_ptr; - int ci, i; - - entropy = (phuff_entropy_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(phuff_entropy_decoder)); - cinfo->entropy = (struct jpeg_entropy_decoder *) entropy; - entropy->pub.start_pass = start_pass_phuff_decoder; - - /* Mark derived tables unallocated */ - for (i = 0; i < NUM_HUFF_TBLS; i++) { - entropy->derived_tbls[i] = NULL; - } - - /* Create progression status table */ - cinfo->coef_bits = (int (*)[DCTSIZE2]) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - cinfo->num_components*DCTSIZE2*SIZEOF(int)); - coef_bit_ptr = & cinfo->coef_bits[0][0]; - for (ci = 0; ci < cinfo->num_components; ci++) - for (i = 0; i < DCTSIZE2; i++) - *coef_bit_ptr++ = -1; -} - -#endif /* D_PROGRESSIVE_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jdpostct.c b/gtkmm-osx/trunk/jpeg-6b/jdpostct.c deleted file mode 100644 index 571563d..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jdpostct.c +++ /dev/null @@ -1,290 +0,0 @@ -/* - * jdpostct.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains the decompression postprocessing controller. - * This controller manages the upsampling, color conversion, and color - * quantization/reduction steps; specifically, it controls the buffering - * between upsample/color conversion and color quantization/reduction. - * - * If no color quantization/reduction is required, then this module has no - * work to do, and it just hands off to the upsample/color conversion code. - * An integrated upsample/convert/quantize process would replace this module - * entirely. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Private buffer controller object */ - -typedef struct { - struct jpeg_d_post_controller pub; /* public fields */ - - /* Color quantization source buffer: this holds output data from - * the upsample/color conversion step to be passed to the quantizer. - * For two-pass color quantization, we need a full-image buffer; - * for one-pass operation, a strip buffer is sufficient. - */ - jvirt_sarray_ptr whole_image; /* virtual array, or NULL if one-pass */ - JSAMPARRAY buffer; /* strip buffer, or current strip of virtual */ - JDIMENSION strip_height; /* buffer size in rows */ - /* for two-pass mode only: */ - JDIMENSION starting_row; /* row # of first row in current strip */ - JDIMENSION next_row; /* index of next row to fill/empty in strip */ -} my_post_controller; - -typedef my_post_controller * my_post_ptr; - - -/* Forward declarations */ -METHODDEF(void) post_process_1pass - JPP((j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail)); -#ifdef QUANT_2PASS_SUPPORTED -METHODDEF(void) post_process_prepass - JPP((j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail)); -METHODDEF(void) post_process_2pass - JPP((j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail)); -#endif - - -/* - * Initialize for a processing pass. - */ - -METHODDEF(void) -start_pass_dpost (j_decompress_ptr cinfo, J_BUF_MODE pass_mode) -{ - my_post_ptr post = (my_post_ptr) cinfo->post; - - switch (pass_mode) { - case JBUF_PASS_THRU: - if (cinfo->quantize_colors) { - /* Single-pass processing with color quantization. */ - post->pub.post_process_data = post_process_1pass; - /* We could be doing buffered-image output before starting a 2-pass - * color quantization; in that case, jinit_d_post_controller did not - * allocate a strip buffer. Use the virtual-array buffer as workspace. - */ - if (post->buffer == NULL) { - post->buffer = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, post->whole_image, - (JDIMENSION) 0, post->strip_height, TRUE); - } - } else { - /* For single-pass processing without color quantization, - * I have no work to do; just call the upsampler directly. - */ - post->pub.post_process_data = cinfo->upsample->upsample; - } - break; -#ifdef QUANT_2PASS_SUPPORTED - case JBUF_SAVE_AND_PASS: - /* First pass of 2-pass quantization */ - if (post->whole_image == NULL) - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - post->pub.post_process_data = post_process_prepass; - break; - case JBUF_CRANK_DEST: - /* Second pass of 2-pass quantization */ - if (post->whole_image == NULL) - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - post->pub.post_process_data = post_process_2pass; - break; -#endif /* QUANT_2PASS_SUPPORTED */ - default: - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); - break; - } - post->starting_row = post->next_row = 0; -} - - -/* - * Process some data in the one-pass (strip buffer) case. - * This is used for color precision reduction as well as one-pass quantization. - */ - -METHODDEF(void) -post_process_1pass (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail) -{ - my_post_ptr post = (my_post_ptr) cinfo->post; - JDIMENSION num_rows, max_rows; - - /* Fill the buffer, but not more than what we can dump out in one go. */ - /* Note we rely on the upsampler to detect bottom of image. */ - max_rows = out_rows_avail - *out_row_ctr; - if (max_rows > post->strip_height) - max_rows = post->strip_height; - num_rows = 0; - (*cinfo->upsample->upsample) (cinfo, - input_buf, in_row_group_ctr, in_row_groups_avail, - post->buffer, &num_rows, max_rows); - /* Quantize and emit data. */ - (*cinfo->cquantize->color_quantize) (cinfo, - post->buffer, output_buf + *out_row_ctr, (int) num_rows); - *out_row_ctr += num_rows; -} - - -#ifdef QUANT_2PASS_SUPPORTED - -/* - * Process some data in the first pass of 2-pass quantization. - */ - -METHODDEF(void) -post_process_prepass (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail) -{ - my_post_ptr post = (my_post_ptr) cinfo->post; - JDIMENSION old_next_row, num_rows; - - /* Reposition virtual buffer if at start of strip. */ - if (post->next_row == 0) { - post->buffer = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, post->whole_image, - post->starting_row, post->strip_height, TRUE); - } - - /* Upsample some data (up to a strip height's worth). */ - old_next_row = post->next_row; - (*cinfo->upsample->upsample) (cinfo, - input_buf, in_row_group_ctr, in_row_groups_avail, - post->buffer, &post->next_row, post->strip_height); - - /* Allow quantizer to scan new data. No data is emitted, */ - /* but we advance out_row_ctr so outer loop can tell when we're done. */ - if (post->next_row > old_next_row) { - num_rows = post->next_row - old_next_row; - (*cinfo->cquantize->color_quantize) (cinfo, post->buffer + old_next_row, - (JSAMPARRAY) NULL, (int) num_rows); - *out_row_ctr += num_rows; - } - - /* Advance if we filled the strip. */ - if (post->next_row >= post->strip_height) { - post->starting_row += post->strip_height; - post->next_row = 0; - } -} - - -/* - * Process some data in the second pass of 2-pass quantization. - */ - -METHODDEF(void) -post_process_2pass (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail) -{ - my_post_ptr post = (my_post_ptr) cinfo->post; - JDIMENSION num_rows, max_rows; - - /* Reposition virtual buffer if at start of strip. */ - if (post->next_row == 0) { - post->buffer = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, post->whole_image, - post->starting_row, post->strip_height, FALSE); - } - - /* Determine number of rows to emit. */ - num_rows = post->strip_height - post->next_row; /* available in strip */ - max_rows = out_rows_avail - *out_row_ctr; /* available in output area */ - if (num_rows > max_rows) - num_rows = max_rows; - /* We have to check bottom of image here, can't depend on upsampler. */ - max_rows = cinfo->output_height - post->starting_row; - if (num_rows > max_rows) - num_rows = max_rows; - - /* Quantize and emit data. */ - (*cinfo->cquantize->color_quantize) (cinfo, - post->buffer + post->next_row, output_buf + *out_row_ctr, - (int) num_rows); - *out_row_ctr += num_rows; - - /* Advance if we filled the strip. */ - post->next_row += num_rows; - if (post->next_row >= post->strip_height) { - post->starting_row += post->strip_height; - post->next_row = 0; - } -} - -#endif /* QUANT_2PASS_SUPPORTED */ - - -/* - * Initialize postprocessing controller. - */ - -GLOBAL(void) -jinit_d_post_controller (j_decompress_ptr cinfo, boolean need_full_buffer) -{ - my_post_ptr post; - - post = (my_post_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_post_controller)); - cinfo->post = (struct jpeg_d_post_controller *) post; - post->pub.start_pass = start_pass_dpost; - post->whole_image = NULL; /* flag for no virtual arrays */ - post->buffer = NULL; /* flag for no strip buffer */ - - /* Create the quantization buffer, if needed */ - if (cinfo->quantize_colors) { - /* The buffer strip height is max_v_samp_factor, which is typically - * an efficient number of rows for upsampling to return. - * (In the presence of output rescaling, we might want to be smarter?) - */ - post->strip_height = (JDIMENSION) cinfo->max_v_samp_factor; - if (need_full_buffer) { - /* Two-pass color quantization: need full-image storage. */ - /* We round up the number of rows to a multiple of the strip height. */ -#ifdef QUANT_2PASS_SUPPORTED - post->whole_image = (*cinfo->mem->request_virt_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, - cinfo->output_width * cinfo->out_color_components, - (JDIMENSION) jround_up((long) cinfo->output_height, - (long) post->strip_height), - post->strip_height); -#else - ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); -#endif /* QUANT_2PASS_SUPPORTED */ - } else { - /* One-pass color quantization: just make a strip buffer. */ - post->buffer = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - cinfo->output_width * cinfo->out_color_components, - post->strip_height); - } - } -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jdsample.c b/gtkmm-osx/trunk/jpeg-6b/jdsample.c deleted file mode 100644 index 80ffefb..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jdsample.c +++ /dev/null @@ -1,478 +0,0 @@ -/* - * jdsample.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains upsampling routines. - * - * Upsampling input data is counted in "row groups". A row group - * is defined to be (v_samp_factor * DCT_scaled_size / min_DCT_scaled_size) - * sample rows of each component. Upsampling will normally produce - * max_v_samp_factor pixel rows from each row group (but this could vary - * if the upsampler is applying a scale factor of its own). - * - * An excellent reference for image resampling is - * Digital Image Warping, George Wolberg, 1990. - * Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Pointer to routine to upsample a single component */ -typedef JMETHOD(void, upsample1_ptr, - (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)); - -/* Private subobject */ - -typedef struct { - struct jpeg_upsampler pub; /* public fields */ - - /* Color conversion buffer. When using separate upsampling and color - * conversion steps, this buffer holds one upsampled row group until it - * has been color converted and output. - * Note: we do not allocate any storage for component(s) which are full-size, - * ie do not need rescaling. The corresponding entry of color_buf[] is - * simply set to point to the input data array, thereby avoiding copying. - */ - JSAMPARRAY color_buf[MAX_COMPONENTS]; - - /* Per-component upsampling method pointers */ - upsample1_ptr methods[MAX_COMPONENTS]; - - int next_row_out; /* counts rows emitted from color_buf */ - JDIMENSION rows_to_go; /* counts rows remaining in image */ - - /* Height of an input row group for each component. */ - int rowgroup_height[MAX_COMPONENTS]; - - /* These arrays save pixel expansion factors so that int_expand need not - * recompute them each time. They are unused for other upsampling methods. - */ - UINT8 h_expand[MAX_COMPONENTS]; - UINT8 v_expand[MAX_COMPONENTS]; -} my_upsampler; - -typedef my_upsampler * my_upsample_ptr; - - -/* - * Initialize for an upsampling pass. - */ - -METHODDEF(void) -start_pass_upsample (j_decompress_ptr cinfo) -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - - /* Mark the conversion buffer empty */ - upsample->next_row_out = cinfo->max_v_samp_factor; - /* Initialize total-height counter for detecting bottom of image */ - upsample->rows_to_go = cinfo->output_height; -} - - -/* - * Control routine to do upsampling (and color conversion). - * - * In this version we upsample each component independently. - * We upsample one row group into the conversion buffer, then apply - * color conversion a row at a time. - */ - -METHODDEF(void) -sep_upsample (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail) -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - int ci; - jpeg_component_info * compptr; - JDIMENSION num_rows; - - /* Fill the conversion buffer, if it's empty */ - if (upsample->next_row_out >= cinfo->max_v_samp_factor) { - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Invoke per-component upsample method. Notice we pass a POINTER - * to color_buf[ci], so that fullsize_upsample can change it. - */ - (*upsample->methods[ci]) (cinfo, compptr, - input_buf[ci] + (*in_row_group_ctr * upsample->rowgroup_height[ci]), - upsample->color_buf + ci); - } - upsample->next_row_out = 0; - } - - /* Color-convert and emit rows */ - - /* How many we have in the buffer: */ - num_rows = (JDIMENSION) (cinfo->max_v_samp_factor - upsample->next_row_out); - /* Not more than the distance to the end of the image. Need this test - * in case the image height is not a multiple of max_v_samp_factor: - */ - if (num_rows > upsample->rows_to_go) - num_rows = upsample->rows_to_go; - /* And not more than what the client can accept: */ - out_rows_avail -= *out_row_ctr; - if (num_rows > out_rows_avail) - num_rows = out_rows_avail; - - (*cinfo->cconvert->color_convert) (cinfo, upsample->color_buf, - (JDIMENSION) upsample->next_row_out, - output_buf + *out_row_ctr, - (int) num_rows); - - /* Adjust counts */ - *out_row_ctr += num_rows; - upsample->rows_to_go -= num_rows; - upsample->next_row_out += num_rows; - /* When the buffer is emptied, declare this input row group consumed */ - if (upsample->next_row_out >= cinfo->max_v_samp_factor) - (*in_row_group_ctr)++; -} - - -/* - * These are the routines invoked by sep_upsample to upsample pixel values - * of a single component. One row group is processed per call. - */ - - -/* - * For full-size components, we just make color_buf[ci] point at the - * input buffer, and thus avoid copying any data. Note that this is - * safe only because sep_upsample doesn't declare the input row group - * "consumed" until we are done color converting and emitting it. - */ - -METHODDEF(void) -fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) -{ - *output_data_ptr = input_data; -} - - -/* - * This is a no-op version used for "uninteresting" components. - * These components will not be referenced by color conversion. - */ - -METHODDEF(void) -noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) -{ - *output_data_ptr = NULL; /* safety check */ -} - - -/* - * This version handles any integral sampling ratios. - * This is not used for typical JPEG files, so it need not be fast. - * Nor, for that matter, is it particularly accurate: the algorithm is - * simple replication of the input pixel onto the corresponding output - * pixels. The hi-falutin sampling literature refers to this as a - * "box filter". A box filter tends to introduce visible artifacts, - * so if you are actually going to use 3:1 or 4:1 sampling ratios - * you would be well advised to improve this code. - */ - -METHODDEF(void) -int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) -{ - my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; - JSAMPARRAY output_data = *output_data_ptr; - register JSAMPROW inptr, outptr; - register JSAMPLE invalue; - register int h; - JSAMPROW outend; - int h_expand, v_expand; - int inrow, outrow; - - h_expand = upsample->h_expand[compptr->component_index]; - v_expand = upsample->v_expand[compptr->component_index]; - - inrow = outrow = 0; - while (outrow < cinfo->max_v_samp_factor) { - /* Generate one output row with proper horizontal expansion */ - inptr = input_data[inrow]; - outptr = output_data[outrow]; - outend = outptr + cinfo->output_width; - while (outptr < outend) { - invalue = *inptr++; /* don't need GETJSAMPLE() here */ - for (h = h_expand; h > 0; h--) { - *outptr++ = invalue; - } - } - /* Generate any additional output rows by duplicating the first one */ - if (v_expand > 1) { - jcopy_sample_rows(output_data, outrow, output_data, outrow+1, - v_expand-1, cinfo->output_width); - } - inrow++; - outrow += v_expand; - } -} - - -/* - * Fast processing for the common case of 2:1 horizontal and 1:1 vertical. - * It's still a box filter. - */ - -METHODDEF(void) -h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) -{ - JSAMPARRAY output_data = *output_data_ptr; - register JSAMPROW inptr, outptr; - register JSAMPLE invalue; - JSAMPROW outend; - int inrow; - - for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) { - inptr = input_data[inrow]; - outptr = output_data[inrow]; - outend = outptr + cinfo->output_width; - while (outptr < outend) { - invalue = *inptr++; /* don't need GETJSAMPLE() here */ - *outptr++ = invalue; - *outptr++ = invalue; - } - } -} - - -/* - * Fast processing for the common case of 2:1 horizontal and 2:1 vertical. - * It's still a box filter. - */ - -METHODDEF(void) -h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) -{ - JSAMPARRAY output_data = *output_data_ptr; - register JSAMPROW inptr, outptr; - register JSAMPLE invalue; - JSAMPROW outend; - int inrow, outrow; - - inrow = outrow = 0; - while (outrow < cinfo->max_v_samp_factor) { - inptr = input_data[inrow]; - outptr = output_data[outrow]; - outend = outptr + cinfo->output_width; - while (outptr < outend) { - invalue = *inptr++; /* don't need GETJSAMPLE() here */ - *outptr++ = invalue; - *outptr++ = invalue; - } - jcopy_sample_rows(output_data, outrow, output_data, outrow+1, - 1, cinfo->output_width); - inrow++; - outrow += 2; - } -} - - -/* - * Fancy processing for the common case of 2:1 horizontal and 1:1 vertical. - * - * The upsampling algorithm is linear interpolation between pixel centers, - * also known as a "triangle filter". This is a good compromise between - * speed and visual quality. The centers of the output pixels are 1/4 and 3/4 - * of the way between input pixel centers. - * - * A note about the "bias" calculations: when rounding fractional values to - * integer, we do not want to always round 0.5 up to the next integer. - * If we did that, we'd introduce a noticeable bias towards larger values. - * Instead, this code is arranged so that 0.5 will be rounded up or down at - * alternate pixel locations (a simple ordered dither pattern). - */ - -METHODDEF(void) -h2v1_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) -{ - JSAMPARRAY output_data = *output_data_ptr; - register JSAMPROW inptr, outptr; - register int invalue; - register JDIMENSION colctr; - int inrow; - - for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) { - inptr = input_data[inrow]; - outptr = output_data[inrow]; - /* Special case for first column */ - invalue = GETJSAMPLE(*inptr++); - *outptr++ = (JSAMPLE) invalue; - *outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(*inptr) + 2) >> 2); - - for (colctr = compptr->downsampled_width - 2; colctr > 0; colctr--) { - /* General case: 3/4 * nearer pixel + 1/4 * further pixel */ - invalue = GETJSAMPLE(*inptr++) * 3; - *outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(inptr[-2]) + 1) >> 2); - *outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(*inptr) + 2) >> 2); - } - - /* Special case for last column */ - invalue = GETJSAMPLE(*inptr); - *outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(inptr[-1]) + 1) >> 2); - *outptr++ = (JSAMPLE) invalue; - } -} - - -/* - * Fancy processing for the common case of 2:1 horizontal and 2:1 vertical. - * Again a triangle filter; see comments for h2v1 case, above. - * - * It is OK for us to reference the adjacent input rows because we demanded - * context from the main buffer controller (see initialization code). - */ - -METHODDEF(void) -h2v2_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) -{ - JSAMPARRAY output_data = *output_data_ptr; - register JSAMPROW inptr0, inptr1, outptr; -#if BITS_IN_JSAMPLE == 8 - register int thiscolsum, lastcolsum, nextcolsum; -#else - register INT32 thiscolsum, lastcolsum, nextcolsum; -#endif - register JDIMENSION colctr; - int inrow, outrow, v; - - inrow = outrow = 0; - while (outrow < cinfo->max_v_samp_factor) { - for (v = 0; v < 2; v++) { - /* inptr0 points to nearest input row, inptr1 points to next nearest */ - inptr0 = input_data[inrow]; - if (v == 0) /* next nearest is row above */ - inptr1 = input_data[inrow-1]; - else /* next nearest is row below */ - inptr1 = input_data[inrow+1]; - outptr = output_data[outrow++]; - - /* Special case for first column */ - thiscolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++); - nextcolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++); - *outptr++ = (JSAMPLE) ((thiscolsum * 4 + 8) >> 4); - *outptr++ = (JSAMPLE) ((thiscolsum * 3 + nextcolsum + 7) >> 4); - lastcolsum = thiscolsum; thiscolsum = nextcolsum; - - for (colctr = compptr->downsampled_width - 2; colctr > 0; colctr--) { - /* General case: 3/4 * nearer pixel + 1/4 * further pixel in each */ - /* dimension, thus 9/16, 3/16, 3/16, 1/16 overall */ - nextcolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++); - *outptr++ = (JSAMPLE) ((thiscolsum * 3 + lastcolsum + 8) >> 4); - *outptr++ = (JSAMPLE) ((thiscolsum * 3 + nextcolsum + 7) >> 4); - lastcolsum = thiscolsum; thiscolsum = nextcolsum; - } - - /* Special case for last column */ - *outptr++ = (JSAMPLE) ((thiscolsum * 3 + lastcolsum + 8) >> 4); - *outptr++ = (JSAMPLE) ((thiscolsum * 4 + 7) >> 4); - } - inrow++; - } -} - - -/* - * Module initialization routine for upsampling. - */ - -GLOBAL(void) -jinit_upsampler (j_decompress_ptr cinfo) -{ - my_upsample_ptr upsample; - int ci; - jpeg_component_info * compptr; - boolean need_buffer, do_fancy; - int h_in_group, v_in_group, h_out_group, v_out_group; - - upsample = (my_upsample_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_upsampler)); - cinfo->upsample = (struct jpeg_upsampler *) upsample; - upsample->pub.start_pass = start_pass_upsample; - upsample->pub.upsample = sep_upsample; - upsample->pub.need_context_rows = FALSE; /* until we find out differently */ - - if (cinfo->CCIR601_sampling) /* this isn't supported */ - ERREXIT(cinfo, JERR_CCIR601_NOTIMPL); - - /* jdmainct.c doesn't support context rows when min_DCT_scaled_size = 1, - * so don't ask for it. - */ - do_fancy = cinfo->do_fancy_upsampling && cinfo->min_DCT_scaled_size > 1; - - /* Verify we can handle the sampling factors, select per-component methods, - * and create storage as needed. - */ - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; - ci++, compptr++) { - /* Compute size of an "input group" after IDCT scaling. This many samples - * are to be converted to max_h_samp_factor * max_v_samp_factor pixels. - */ - h_in_group = (compptr->h_samp_factor * compptr->DCT_scaled_size) / - cinfo->min_DCT_scaled_size; - v_in_group = (compptr->v_samp_factor * compptr->DCT_scaled_size) / - cinfo->min_DCT_scaled_size; - h_out_group = cinfo->max_h_samp_factor; - v_out_group = cinfo->max_v_samp_factor; - upsample->rowgroup_height[ci] = v_in_group; /* save for use later */ - need_buffer = TRUE; - if (! compptr->component_needed) { - /* Don't bother to upsample an uninteresting component. */ - upsample->methods[ci] = noop_upsample; - need_buffer = FALSE; - } else if (h_in_group == h_out_group && v_in_group == v_out_group) { - /* Fullsize components can be processed without any work. */ - upsample->methods[ci] = fullsize_upsample; - need_buffer = FALSE; - } else if (h_in_group * 2 == h_out_group && - v_in_group == v_out_group) { - /* Special cases for 2h1v upsampling */ - if (do_fancy && compptr->downsampled_width > 2) - upsample->methods[ci] = h2v1_fancy_upsample; - else - upsample->methods[ci] = h2v1_upsample; - } else if (h_in_group * 2 == h_out_group && - v_in_group * 2 == v_out_group) { - /* Special cases for 2h2v upsampling */ - if (do_fancy && compptr->downsampled_width > 2) { - upsample->methods[ci] = h2v2_fancy_upsample; - upsample->pub.need_context_rows = TRUE; - } else - upsample->methods[ci] = h2v2_upsample; - } else if ((h_out_group % h_in_group) == 0 && - (v_out_group % v_in_group) == 0) { - /* Generic integral-factors upsampling method */ - upsample->methods[ci] = int_upsample; - upsample->h_expand[ci] = (UINT8) (h_out_group / h_in_group); - upsample->v_expand[ci] = (UINT8) (v_out_group / v_in_group); - } else - ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL); - if (need_buffer) { - upsample->color_buf[ci] = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (JDIMENSION) jround_up((long) cinfo->output_width, - (long) cinfo->max_h_samp_factor), - (JDIMENSION) cinfo->max_v_samp_factor); - } - } -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jdtrans.c b/gtkmm-osx/trunk/jpeg-6b/jdtrans.c deleted file mode 100644 index 6c0ab71..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jdtrans.c +++ /dev/null @@ -1,143 +0,0 @@ -/* - * jdtrans.c - * - * Copyright (C) 1995-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains library routines for transcoding decompression, - * that is, reading raw DCT coefficient arrays from an input JPEG file. - * The routines in jdapimin.c will also be needed by a transcoder. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* Forward declarations */ -LOCAL(void) transdecode_master_selection JPP((j_decompress_ptr cinfo)); - - -/* - * Read the coefficient arrays from a JPEG file. - * jpeg_read_header must be completed before calling this. - * - * The entire image is read into a set of virtual coefficient-block arrays, - * one per component. The return value is a pointer to the array of - * virtual-array descriptors. These can be manipulated directly via the - * JPEG memory manager, or handed off to jpeg_write_coefficients(). - * To release the memory occupied by the virtual arrays, call - * jpeg_finish_decompress() when done with the data. - * - * An alternative usage is to simply obtain access to the coefficient arrays - * during a buffered-image-mode decompression operation. This is allowed - * after any jpeg_finish_output() call. The arrays can be accessed until - * jpeg_finish_decompress() is called. (Note that any call to the library - * may reposition the arrays, so don't rely on access_virt_barray() results - * to stay valid across library calls.) - * - * Returns NULL if suspended. This case need be checked only if - * a suspending data source is used. - */ - -GLOBAL(jvirt_barray_ptr *) -jpeg_read_coefficients (j_decompress_ptr cinfo) -{ - if (cinfo->global_state == DSTATE_READY) { - /* First call: initialize active modules */ - transdecode_master_selection(cinfo); - cinfo->global_state = DSTATE_RDCOEFS; - } - if (cinfo->global_state == DSTATE_RDCOEFS) { - /* Absorb whole file into the coef buffer */ - for (;;) { - int retcode; - /* Call progress monitor hook if present */ - if (cinfo->progress != NULL) - (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); - /* Absorb some more input */ - retcode = (*cinfo->inputctl->consume_input) (cinfo); - if (retcode == JPEG_SUSPENDED) - return NULL; - if (retcode == JPEG_REACHED_EOI) - break; - /* Advance progress counter if appropriate */ - if (cinfo->progress != NULL && - (retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) { - if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) { - /* startup underestimated number of scans; ratchet up one scan */ - cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows; - } - } - } - /* Set state so that jpeg_finish_decompress does the right thing */ - cinfo->global_state = DSTATE_STOPPING; - } - /* At this point we should be in state DSTATE_STOPPING if being used - * standalone, or in state DSTATE_BUFIMAGE if being invoked to get access - * to the coefficients during a full buffered-image-mode decompression. - */ - if ((cinfo->global_state == DSTATE_STOPPING || - cinfo->global_state == DSTATE_BUFIMAGE) && cinfo->buffered_image) { - return cinfo->coef->coef_arrays; - } - /* Oops, improper usage */ - ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); - return NULL; /* keep compiler happy */ -} - - -/* - * Master selection of decompression modules for transcoding. - * This substitutes for jdmaster.c's initialization of the full decompressor. - */ - -LOCAL(void) -transdecode_master_selection (j_decompress_ptr cinfo) -{ - /* This is effectively a buffered-image operation. */ - cinfo->buffered_image = TRUE; - - /* Entropy decoding: either Huffman or arithmetic coding. */ - if (cinfo->arith_code) { - ERREXIT(cinfo, JERR_ARITH_NOTIMPL); - } else { - if (cinfo->progressive_mode) { -#ifdef D_PROGRESSIVE_SUPPORTED - jinit_phuff_decoder(cinfo); -#else - ERREXIT(cinfo, JERR_NOT_COMPILED); -#endif - } else - jinit_huff_decoder(cinfo); - } - - /* Always get a full-image coefficient buffer. */ - jinit_d_coef_controller(cinfo, TRUE); - - /* We can now tell the memory manager to allocate virtual arrays. */ - (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); - - /* Initialize input side of decompressor to consume first scan. */ - (*cinfo->inputctl->start_input_pass) (cinfo); - - /* Initialize progress monitoring. */ - if (cinfo->progress != NULL) { - int nscans; - /* Estimate number of scans to set pass_limit. */ - if (cinfo->progressive_mode) { - /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */ - nscans = 2 + 3 * cinfo->num_components; - } else if (cinfo->inputctl->has_multiple_scans) { - /* For a nonprogressive multiscan file, estimate 1 scan per component. */ - nscans = cinfo->num_components; - } else { - nscans = 1; - } - cinfo->progress->pass_counter = 0L; - cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans; - cinfo->progress->completed_passes = 0; - cinfo->progress->total_passes = 1; - } -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jerror.c b/gtkmm-osx/trunk/jpeg-6b/jerror.c deleted file mode 100644 index 3da7be8..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jerror.c +++ /dev/null @@ -1,252 +0,0 @@ -/* - * jerror.c - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains simple error-reporting and trace-message routines. - * These are suitable for Unix-like systems and others where writing to - * stderr is the right thing to do. Many applications will want to replace - * some or all of these routines. - * - * If you define USE_WINDOWS_MESSAGEBOX in jconfig.h or in the makefile, - * you get a Windows-specific hack to display error messages in a dialog box. - * It ain't much, but it beats dropping error messages into the bit bucket, - * which is what happens to output to stderr under most Windows C compilers. - * - * These routines are used by both the compression and decompression code. - */ - -/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ -#include "jinclude.h" -#include "jpeglib.h" -#include "jversion.h" -#include "jerror.h" - -#ifdef USE_WINDOWS_MESSAGEBOX -#include -#endif - -#ifndef EXIT_FAILURE /* define exit() codes if not provided */ -#define EXIT_FAILURE 1 -#endif - - -/* - * Create the message string table. - * We do this from the master message list in jerror.h by re-reading - * jerror.h with a suitable definition for macro JMESSAGE. - * The message table is made an external symbol just in case any applications - * want to refer to it directly. - */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jpeg_std_message_table jMsgTable -#endif - -#define JMESSAGE(code,string) string , - -const char * const jpeg_std_message_table[] = { -#include "jerror.h" - NULL -}; - - -/* - * Error exit handler: must not return to caller. - * - * Applications may override this if they want to get control back after - * an error. Typically one would longjmp somewhere instead of exiting. - * The setjmp buffer can be made a private field within an expanded error - * handler object. Note that the info needed to generate an error message - * is stored in the error object, so you can generate the message now or - * later, at your convenience. - * You should make sure that the JPEG object is cleaned up (with jpeg_abort - * or jpeg_destroy) at some point. - */ - -METHODDEF(void) -error_exit (j_common_ptr cinfo) -{ - /* Always display the message */ - (*cinfo->err->output_message) (cinfo); - - /* Let the memory manager delete any temp files before we die */ - jpeg_destroy(cinfo); - - exit(EXIT_FAILURE); -} - - -/* - * Actual output of an error or trace message. - * Applications may override this method to send JPEG messages somewhere - * other than stderr. - * - * On Windows, printing to stderr is generally completely useless, - * so we provide optional code to produce an error-dialog popup. - * Most Windows applications will still prefer to override this routine, - * but if they don't, it'll do something at least marginally useful. - * - * NOTE: to use the library in an environment that doesn't support the - * C stdio library, you may have to delete the call to fprintf() entirely, - * not just not use this routine. - */ - -METHODDEF(void) -output_message (j_common_ptr cinfo) -{ - char buffer[JMSG_LENGTH_MAX]; - - /* Create the message */ - (*cinfo->err->format_message) (cinfo, buffer); - -#ifdef USE_WINDOWS_MESSAGEBOX - /* Display it in a message dialog box */ - MessageBox(GetActiveWindow(), buffer, "JPEG Library Error", - MB_OK | MB_ICONERROR); -#else - /* Send it to stderr, adding a newline */ - fprintf(stderr, "%s\n", buffer); -#endif -} - - -/* - * Decide whether to emit a trace or warning message. - * msg_level is one of: - * -1: recoverable corrupt-data warning, may want to abort. - * 0: important advisory messages (always display to user). - * 1: first level of tracing detail. - * 2,3,...: successively more detailed tracing messages. - * An application might override this method if it wanted to abort on warnings - * or change the policy about which messages to display. - */ - -METHODDEF(void) -emit_message (j_common_ptr cinfo, int msg_level) -{ - struct jpeg_error_mgr * err = cinfo->err; - - if (msg_level < 0) { - /* It's a warning message. Since corrupt files may generate many warnings, - * the policy implemented here is to show only the first warning, - * unless trace_level >= 3. - */ - if (err->num_warnings == 0 || err->trace_level >= 3) - (*err->output_message) (cinfo); - /* Always count warnings in num_warnings. */ - err->num_warnings++; - } else { - /* It's a trace message. Show it if trace_level >= msg_level. */ - if (err->trace_level >= msg_level) - (*err->output_message) (cinfo); - } -} - - -/* - * Format a message string for the most recent JPEG error or message. - * The message is stored into buffer, which should be at least JMSG_LENGTH_MAX - * characters. Note that no '\n' character is added to the string. - * Few applications should need to override this method. - */ - -METHODDEF(void) -format_message (j_common_ptr cinfo, char * buffer) -{ - struct jpeg_error_mgr * err = cinfo->err; - int msg_code = err->msg_code; - const char * msgtext = NULL; - const char * msgptr; - char ch; - boolean isstring; - - /* Look up message string in proper table */ - if (msg_code > 0 && msg_code <= err->last_jpeg_message) { - msgtext = err->jpeg_message_table[msg_code]; - } else if (err->addon_message_table != NULL && - msg_code >= err->first_addon_message && - msg_code <= err->last_addon_message) { - msgtext = err->addon_message_table[msg_code - err->first_addon_message]; - } - - /* Defend against bogus message number */ - if (msgtext == NULL) { - err->msg_parm.i[0] = msg_code; - msgtext = err->jpeg_message_table[0]; - } - - /* Check for string parameter, as indicated by %s in the message text */ - isstring = FALSE; - msgptr = msgtext; - while ((ch = *msgptr++) != '\0') { - if (ch == '%') { - if (*msgptr == 's') isstring = TRUE; - break; - } - } - - /* Format the message into the passed buffer */ - if (isstring) - sprintf(buffer, msgtext, err->msg_parm.s); - else - sprintf(buffer, msgtext, - err->msg_parm.i[0], err->msg_parm.i[1], - err->msg_parm.i[2], err->msg_parm.i[3], - err->msg_parm.i[4], err->msg_parm.i[5], - err->msg_parm.i[6], err->msg_parm.i[7]); -} - - -/* - * Reset error state variables at start of a new image. - * This is called during compression startup to reset trace/error - * processing to default state, without losing any application-specific - * method pointers. An application might possibly want to override - * this method if it has additional error processing state. - */ - -METHODDEF(void) -reset_error_mgr (j_common_ptr cinfo) -{ - cinfo->err->num_warnings = 0; - /* trace_level is not reset since it is an application-supplied parameter */ - cinfo->err->msg_code = 0; /* may be useful as a flag for "no error" */ -} - - -/* - * Fill in the standard error-handling methods in a jpeg_error_mgr object. - * Typical call is: - * struct jpeg_compress_struct cinfo; - * struct jpeg_error_mgr err; - * - * cinfo.err = jpeg_std_error(&err); - * after which the application may override some of the methods. - */ - -GLOBAL(struct jpeg_error_mgr *) -jpeg_std_error (struct jpeg_error_mgr * err) -{ - err->error_exit = error_exit; - err->emit_message = emit_message; - err->output_message = output_message; - err->format_message = format_message; - err->reset_error_mgr = reset_error_mgr; - - err->trace_level = 0; /* default = no tracing */ - err->num_warnings = 0; /* no warnings emitted yet */ - err->msg_code = 0; /* may be useful as a flag for "no error" */ - - /* Initialize message table pointers */ - err->jpeg_message_table = jpeg_std_message_table; - err->last_jpeg_message = (int) JMSG_LASTMSGCODE - 1; - - err->addon_message_table = NULL; - err->first_addon_message = 0; /* for safety */ - err->last_addon_message = 0; - - return err; -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jerror.h b/gtkmm-osx/trunk/jpeg-6b/jerror.h deleted file mode 100644 index fc2fffe..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jerror.h +++ /dev/null @@ -1,291 +0,0 @@ -/* - * jerror.h - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file defines the error and message codes for the JPEG library. - * Edit this file to add new codes, or to translate the message strings to - * some other language. - * A set of error-reporting macros are defined too. Some applications using - * the JPEG library may wish to include this file to get the error codes - * and/or the macros. - */ - -/* - * To define the enum list of message codes, include this file without - * defining macro JMESSAGE. To create a message string table, include it - * again with a suitable JMESSAGE definition (see jerror.c for an example). - */ -#ifndef JMESSAGE -#ifndef JERROR_H -/* First time through, define the enum list */ -#define JMAKE_ENUM_LIST -#else -/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ -#define JMESSAGE(code,string) -#endif /* JERROR_H */ -#endif /* JMESSAGE */ - -#ifdef JMAKE_ENUM_LIST - -typedef enum { - -#define JMESSAGE(code,string) code , - -#endif /* JMAKE_ENUM_LIST */ - -JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */ - -/* For maintenance convenience, list is alphabetical by message code name */ -JMESSAGE(JERR_ARITH_NOTIMPL, - "Sorry, there are legal restrictions on arithmetic coding") -JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") -JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") -JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode") -JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") -JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range") -JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported") -JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition") -JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace") -JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") -JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length") -JMESSAGE(JERR_BAD_LIB_VERSION, - "Wrong JPEG library version: library is %d, caller expects %d") -JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") -JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") -JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") -JMESSAGE(JERR_BAD_PROGRESSION, - "Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d") -JMESSAGE(JERR_BAD_PROG_SCRIPT, - "Invalid progressive parameters at scan script entry %d") -JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors") -JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d") -JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d") -JMESSAGE(JERR_BAD_STRUCT_SIZE, - "JPEG parameter struct mismatch: library thinks size is %u, caller expects %u") -JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access") -JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small") -JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here") -JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet") -JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d") -JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request") -JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d") -JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x") -JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d") -JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d") -JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)") -JMESSAGE(JERR_EMS_READ, "Read from EMS failed") -JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed") -JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan") -JMESSAGE(JERR_FILE_READ, "Input file read error") -JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?") -JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet") -JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow") -JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry") -JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels") -JMESSAGE(JERR_INPUT_EMPTY, "Empty input file") -JMESSAGE(JERR_INPUT_EOF, "Premature end of input file") -JMESSAGE(JERR_MISMATCHED_QUANT_TABLE, - "Cannot transcode due to multiple use of quantization table %d") -JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data") -JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") -JMESSAGE(JERR_NOTIMPL, "Not implemented yet") -JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") -JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported") -JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined") -JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image") -JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined") -JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x") -JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)") -JMESSAGE(JERR_QUANT_COMPONENTS, - "Cannot quantize more than %d color components") -JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors") -JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors") -JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers") -JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker") -JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x") -JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers") -JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF") -JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s") -JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file") -JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file") -JMESSAGE(JERR_TFILE_WRITE, - "Write failed on temporary file --- out of disk space?") -JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines") -JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x") -JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up") -JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation") -JMESSAGE(JERR_XMS_READ, "Read from XMS failed") -JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed") -JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT) -JMESSAGE(JMSG_VERSION, JVERSION) -JMESSAGE(JTRC_16BIT_TABLES, - "Caution: quantization tables are too coarse for baseline JPEG") -JMESSAGE(JTRC_ADOBE, - "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d") -JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u") -JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u") -JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x") -JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x") -JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d") -JMESSAGE(JTRC_DRI, "Define Restart Interval %u") -JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u") -JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u") -JMESSAGE(JTRC_EOI, "End Of Image") -JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d") -JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d") -JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE, - "Warning: thumbnail image size does not match data length %u") -JMESSAGE(JTRC_JFIF_EXTENSION, - "JFIF extension marker: type 0x%02x, length %u") -JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image") -JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u") -JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x") -JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u") -JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors") -JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors") -JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization") -JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d") -JMESSAGE(JTRC_RST, "RST%d") -JMESSAGE(JTRC_SMOOTH_NOTIMPL, - "Smoothing not supported with nonstandard sampling ratios") -JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d") -JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d") -JMESSAGE(JTRC_SOI, "Start of Image") -JMESSAGE(JTRC_SOS, "Start Of Scan: %d components") -JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d") -JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d") -JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s") -JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s") -JMESSAGE(JTRC_THUMB_JPEG, - "JFIF extension marker: JPEG-compressed thumbnail image, length %u") -JMESSAGE(JTRC_THUMB_PALETTE, - "JFIF extension marker: palette thumbnail image, length %u") -JMESSAGE(JTRC_THUMB_RGB, - "JFIF extension marker: RGB thumbnail image, length %u") -JMESSAGE(JTRC_UNKNOWN_IDS, - "Unrecognized component IDs %d %d %d, assuming YCbCr") -JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") -JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") -JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") -JMESSAGE(JWRN_BOGUS_PROGRESSION, - "Inconsistent progression sequence for component %d coefficient %d") -JMESSAGE(JWRN_EXTRANEOUS_DATA, - "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") -JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment") -JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code") -JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d") -JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file") -JMESSAGE(JWRN_MUST_RESYNC, - "Corrupt JPEG data: found marker 0x%02x instead of RST%d") -JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG") -JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") - -#ifdef JMAKE_ENUM_LIST - - JMSG_LASTMSGCODE -} J_MESSAGE_CODE; - -#undef JMAKE_ENUM_LIST -#endif /* JMAKE_ENUM_LIST */ - -/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ -#undef JMESSAGE - - -#ifndef JERROR_H -#define JERROR_H - -/* Macros to simplify using the error and trace message stuff */ -/* The first parameter is either type of cinfo pointer */ - -/* Fatal errors (print message and exit) */ -#define ERREXIT(cinfo,code) \ - ((cinfo)->err->msg_code = (code), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXIT1(cinfo,code,p1) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXIT2(cinfo,code,p1,p2) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXIT3(cinfo,code,p1,p2,p3) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (cinfo)->err->msg_parm.i[2] = (p3), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXIT4(cinfo,code,p1,p2,p3,p4) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (cinfo)->err->msg_parm.i[2] = (p3), \ - (cinfo)->err->msg_parm.i[3] = (p4), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) -#define ERREXITS(cinfo,code,str) \ - ((cinfo)->err->msg_code = (code), \ - strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) - -#define MAKESTMT(stuff) do { stuff } while (0) - -/* Nonfatal errors (we can keep going, but the data is probably corrupt) */ -#define WARNMS(cinfo,code) \ - ((cinfo)->err->msg_code = (code), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) -#define WARNMS1(cinfo,code,p1) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) -#define WARNMS2(cinfo,code,p1,p2) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) - -/* Informational/debugging messages */ -#define TRACEMS(cinfo,lvl,code) \ - ((cinfo)->err->msg_code = (code), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) -#define TRACEMS1(cinfo,lvl,code,p1) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) -#define TRACEMS2(cinfo,lvl,code,p1,p2) \ - ((cinfo)->err->msg_code = (code), \ - (cinfo)->err->msg_parm.i[0] = (p1), \ - (cinfo)->err->msg_parm.i[1] = (p2), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) -#define TRACEMS3(cinfo,lvl,code,p1,p2,p3) \ - MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ - _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \ - (cinfo)->err->msg_code = (code); \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) -#define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4) \ - MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ - _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ - (cinfo)->err->msg_code = (code); \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) -#define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5) \ - MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ - _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ - _mp[4] = (p5); \ - (cinfo)->err->msg_code = (code); \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) -#define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8) \ - MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ - _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ - _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \ - (cinfo)->err->msg_code = (code); \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) -#define TRACEMSS(cinfo,lvl,code,str) \ - ((cinfo)->err->msg_code = (code), \ - strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ - (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) - -#endif /* JERROR_H */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jfdctflt.c b/gtkmm-osx/trunk/jpeg-6b/jfdctflt.c deleted file mode 100644 index 79d7a00..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jfdctflt.c +++ /dev/null @@ -1,168 +0,0 @@ -/* - * jfdctflt.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a floating-point implementation of the - * forward DCT (Discrete Cosine Transform). - * - * This implementation should be more accurate than either of the integer - * DCT implementations. However, it may not give the same results on all - * machines because of differences in roundoff behavior. Speed will depend - * on the hardware's floating point capacity. - * - * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT - * on each column. Direct algorithms are also available, but they are - * much more complex and seem not to be any faster when reduced to code. - * - * This implementation is based on Arai, Agui, and Nakajima's algorithm for - * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in - * Japanese, but the algorithm is described in the Pennebaker & Mitchell - * JPEG textbook (see REFERENCES section in file README). The following code - * is based directly on figure 4-8 in P&M. - * While an 8-point DCT cannot be done in less than 11 multiplies, it is - * possible to arrange the computation so that many of the multiplies are - * simple scalings of the final outputs. These multiplies can then be - * folded into the multiplications or divisions by the JPEG quantization - * table entries. The AA&N method leaves only 5 multiplies and 29 adds - * to be done in the DCT itself. - * The primary disadvantage of this method is that with a fixed-point - * implementation, accuracy is lost due to imprecise representation of the - * scaled quantization values. However, that problem does not arise if - * we use floating point arithmetic. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jdct.h" /* Private declarations for DCT subsystem */ - -#ifdef DCT_FLOAT_SUPPORTED - - -/* - * This module is specialized to the case DCTSIZE = 8. - */ - -#if DCTSIZE != 8 - Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ -#endif - - -/* - * Perform the forward DCT on one block of samples. - */ - -GLOBAL(void) -jpeg_fdct_float (FAST_FLOAT * data) -{ - FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - FAST_FLOAT tmp10, tmp11, tmp12, tmp13; - FAST_FLOAT z1, z2, z3, z4, z5, z11, z13; - FAST_FLOAT *dataptr; - int ctr; - - /* Pass 1: process rows. */ - - dataptr = data; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - tmp0 = dataptr[0] + dataptr[7]; - tmp7 = dataptr[0] - dataptr[7]; - tmp1 = dataptr[1] + dataptr[6]; - tmp6 = dataptr[1] - dataptr[6]; - tmp2 = dataptr[2] + dataptr[5]; - tmp5 = dataptr[2] - dataptr[5]; - tmp3 = dataptr[3] + dataptr[4]; - tmp4 = dataptr[3] - dataptr[4]; - - /* Even part */ - - tmp10 = tmp0 + tmp3; /* phase 2 */ - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - - dataptr[0] = tmp10 + tmp11; /* phase 3 */ - dataptr[4] = tmp10 - tmp11; - - z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */ - dataptr[2] = tmp13 + z1; /* phase 5 */ - dataptr[6] = tmp13 - z1; - - /* Odd part */ - - tmp10 = tmp4 + tmp5; /* phase 2 */ - tmp11 = tmp5 + tmp6; - tmp12 = tmp6 + tmp7; - - /* The rotator is modified from fig 4-8 to avoid extra negations. */ - z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */ - z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */ - z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */ - z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */ - - z11 = tmp7 + z3; /* phase 5 */ - z13 = tmp7 - z3; - - dataptr[5] = z13 + z2; /* phase 6 */ - dataptr[3] = z13 - z2; - dataptr[1] = z11 + z4; - dataptr[7] = z11 - z4; - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. */ - - dataptr = data; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; - tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; - tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; - tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; - tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; - tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; - tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; - tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; - - /* Even part */ - - tmp10 = tmp0 + tmp3; /* phase 2 */ - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - - dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */ - dataptr[DCTSIZE*4] = tmp10 - tmp11; - - z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */ - dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */ - dataptr[DCTSIZE*6] = tmp13 - z1; - - /* Odd part */ - - tmp10 = tmp4 + tmp5; /* phase 2 */ - tmp11 = tmp5 + tmp6; - tmp12 = tmp6 + tmp7; - - /* The rotator is modified from fig 4-8 to avoid extra negations. */ - z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */ - z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */ - z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */ - z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */ - - z11 = tmp7 + z3; /* phase 5 */ - z13 = tmp7 - z3; - - dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */ - dataptr[DCTSIZE*3] = z13 - z2; - dataptr[DCTSIZE*1] = z11 + z4; - dataptr[DCTSIZE*7] = z11 - z4; - - dataptr++; /* advance pointer to next column */ - } -} - -#endif /* DCT_FLOAT_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jfdctfst.c b/gtkmm-osx/trunk/jpeg-6b/jfdctfst.c deleted file mode 100644 index ccb378a..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jfdctfst.c +++ /dev/null @@ -1,224 +0,0 @@ -/* - * jfdctfst.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a fast, not so accurate integer implementation of the - * forward DCT (Discrete Cosine Transform). - * - * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT - * on each column. Direct algorithms are also available, but they are - * much more complex and seem not to be any faster when reduced to code. - * - * This implementation is based on Arai, Agui, and Nakajima's algorithm for - * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in - * Japanese, but the algorithm is described in the Pennebaker & Mitchell - * JPEG textbook (see REFERENCES section in file README). The following code - * is based directly on figure 4-8 in P&M. - * While an 8-point DCT cannot be done in less than 11 multiplies, it is - * possible to arrange the computation so that many of the multiplies are - * simple scalings of the final outputs. These multiplies can then be - * folded into the multiplications or divisions by the JPEG quantization - * table entries. The AA&N method leaves only 5 multiplies and 29 adds - * to be done in the DCT itself. - * The primary disadvantage of this method is that with fixed-point math, - * accuracy is lost due to imprecise representation of the scaled - * quantization values. The smaller the quantization table entry, the less - * precise the scaled value, so this implementation does worse with high- - * quality-setting files than with low-quality ones. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jdct.h" /* Private declarations for DCT subsystem */ - -#ifdef DCT_IFAST_SUPPORTED - - -/* - * This module is specialized to the case DCTSIZE = 8. - */ - -#if DCTSIZE != 8 - Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ -#endif - - -/* Scaling decisions are generally the same as in the LL&M algorithm; - * see jfdctint.c for more details. However, we choose to descale - * (right shift) multiplication products as soon as they are formed, - * rather than carrying additional fractional bits into subsequent additions. - * This compromises accuracy slightly, but it lets us save a few shifts. - * More importantly, 16-bit arithmetic is then adequate (for 8-bit samples) - * everywhere except in the multiplications proper; this saves a good deal - * of work on 16-bit-int machines. - * - * Again to save a few shifts, the intermediate results between pass 1 and - * pass 2 are not upscaled, but are represented only to integral precision. - * - * A final compromise is to represent the multiplicative constants to only - * 8 fractional bits, rather than 13. This saves some shifting work on some - * machines, and may also reduce the cost of multiplication (since there - * are fewer one-bits in the constants). - */ - -#define CONST_BITS 8 - - -/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus - * causing a lot of useless floating-point operations at run time. - * To get around this we use the following pre-calculated constants. - * If you change CONST_BITS you may want to add appropriate values. - * (With a reasonable C compiler, you can just rely on the FIX() macro...) - */ - -#if CONST_BITS == 8 -#define FIX_0_382683433 ((INT32) 98) /* FIX(0.382683433) */ -#define FIX_0_541196100 ((INT32) 139) /* FIX(0.541196100) */ -#define FIX_0_707106781 ((INT32) 181) /* FIX(0.707106781) */ -#define FIX_1_306562965 ((INT32) 334) /* FIX(1.306562965) */ -#else -#define FIX_0_382683433 FIX(0.382683433) -#define FIX_0_541196100 FIX(0.541196100) -#define FIX_0_707106781 FIX(0.707106781) -#define FIX_1_306562965 FIX(1.306562965) -#endif - - -/* We can gain a little more speed, with a further compromise in accuracy, - * by omitting the addition in a descaling shift. This yields an incorrectly - * rounded result half the time... - */ - -#ifndef USE_ACCURATE_ROUNDING -#undef DESCALE -#define DESCALE(x,n) RIGHT_SHIFT(x, n) -#endif - - -/* Multiply a DCTELEM variable by an INT32 constant, and immediately - * descale to yield a DCTELEM result. - */ - -#define MULTIPLY(var,const) ((DCTELEM) DESCALE((var) * (const), CONST_BITS)) - - -/* - * Perform the forward DCT on one block of samples. - */ - -GLOBAL(void) -jpeg_fdct_ifast (DCTELEM * data) -{ - DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - DCTELEM tmp10, tmp11, tmp12, tmp13; - DCTELEM z1, z2, z3, z4, z5, z11, z13; - DCTELEM *dataptr; - int ctr; - SHIFT_TEMPS - - /* Pass 1: process rows. */ - - dataptr = data; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - tmp0 = dataptr[0] + dataptr[7]; - tmp7 = dataptr[0] - dataptr[7]; - tmp1 = dataptr[1] + dataptr[6]; - tmp6 = dataptr[1] - dataptr[6]; - tmp2 = dataptr[2] + dataptr[5]; - tmp5 = dataptr[2] - dataptr[5]; - tmp3 = dataptr[3] + dataptr[4]; - tmp4 = dataptr[3] - dataptr[4]; - - /* Even part */ - - tmp10 = tmp0 + tmp3; /* phase 2 */ - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - - dataptr[0] = tmp10 + tmp11; /* phase 3 */ - dataptr[4] = tmp10 - tmp11; - - z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */ - dataptr[2] = tmp13 + z1; /* phase 5 */ - dataptr[6] = tmp13 - z1; - - /* Odd part */ - - tmp10 = tmp4 + tmp5; /* phase 2 */ - tmp11 = tmp5 + tmp6; - tmp12 = tmp6 + tmp7; - - /* The rotator is modified from fig 4-8 to avoid extra negations. */ - z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */ - z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */ - z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */ - z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */ - - z11 = tmp7 + z3; /* phase 5 */ - z13 = tmp7 - z3; - - dataptr[5] = z13 + z2; /* phase 6 */ - dataptr[3] = z13 - z2; - dataptr[1] = z11 + z4; - dataptr[7] = z11 - z4; - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. */ - - dataptr = data; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; - tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; - tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; - tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; - tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; - tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; - tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; - tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; - - /* Even part */ - - tmp10 = tmp0 + tmp3; /* phase 2 */ - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - - dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */ - dataptr[DCTSIZE*4] = tmp10 - tmp11; - - z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */ - dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */ - dataptr[DCTSIZE*6] = tmp13 - z1; - - /* Odd part */ - - tmp10 = tmp4 + tmp5; /* phase 2 */ - tmp11 = tmp5 + tmp6; - tmp12 = tmp6 + tmp7; - - /* The rotator is modified from fig 4-8 to avoid extra negations. */ - z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */ - z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */ - z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */ - z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */ - - z11 = tmp7 + z3; /* phase 5 */ - z13 = tmp7 - z3; - - dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */ - dataptr[DCTSIZE*3] = z13 - z2; - dataptr[DCTSIZE*1] = z11 + z4; - dataptr[DCTSIZE*7] = z11 - z4; - - dataptr++; /* advance pointer to next column */ - } -} - -#endif /* DCT_IFAST_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jfdctint.c b/gtkmm-osx/trunk/jpeg-6b/jfdctint.c deleted file mode 100644 index 0a78b64..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jfdctint.c +++ /dev/null @@ -1,283 +0,0 @@ -/* - * jfdctint.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a slow-but-accurate integer implementation of the - * forward DCT (Discrete Cosine Transform). - * - * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT - * on each column. Direct algorithms are also available, but they are - * much more complex and seem not to be any faster when reduced to code. - * - * This implementation is based on an algorithm described in - * C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT - * Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics, - * Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991. - * The primary algorithm described there uses 11 multiplies and 29 adds. - * We use their alternate method with 12 multiplies and 32 adds. - * The advantage of this method is that no data path contains more than one - * multiplication; this allows a very simple and accurate implementation in - * scaled fixed-point arithmetic, with a minimal number of shifts. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jdct.h" /* Private declarations for DCT subsystem */ - -#ifdef DCT_ISLOW_SUPPORTED - - -/* - * This module is specialized to the case DCTSIZE = 8. - */ - -#if DCTSIZE != 8 - Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ -#endif - - -/* - * The poop on this scaling stuff is as follows: - * - * Each 1-D DCT step produces outputs which are a factor of sqrt(N) - * larger than the true DCT outputs. The final outputs are therefore - * a factor of N larger than desired; since N=8 this can be cured by - * a simple right shift at the end of the algorithm. The advantage of - * this arrangement is that we save two multiplications per 1-D DCT, - * because the y0 and y4 outputs need not be divided by sqrt(N). - * In the IJG code, this factor of 8 is removed by the quantization step - * (in jcdctmgr.c), NOT in this module. - * - * We have to do addition and subtraction of the integer inputs, which - * is no problem, and multiplication by fractional constants, which is - * a problem to do in integer arithmetic. We multiply all the constants - * by CONST_SCALE and convert them to integer constants (thus retaining - * CONST_BITS bits of precision in the constants). After doing a - * multiplication we have to divide the product by CONST_SCALE, with proper - * rounding, to produce the correct output. This division can be done - * cheaply as a right shift of CONST_BITS bits. We postpone shifting - * as long as possible so that partial sums can be added together with - * full fractional precision. - * - * The outputs of the first pass are scaled up by PASS1_BITS bits so that - * they are represented to better-than-integral precision. These outputs - * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word - * with the recommended scaling. (For 12-bit sample data, the intermediate - * array is INT32 anyway.) - * - * To avoid overflow of the 32-bit intermediate results in pass 2, we must - * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26. Error analysis - * shows that the values given below are the most effective. - */ - -#if BITS_IN_JSAMPLE == 8 -#define CONST_BITS 13 -#define PASS1_BITS 2 -#else -#define CONST_BITS 13 -#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ -#endif - -/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus - * causing a lot of useless floating-point operations at run time. - * To get around this we use the following pre-calculated constants. - * If you change CONST_BITS you may want to add appropriate values. - * (With a reasonable C compiler, you can just rely on the FIX() macro...) - */ - -#if CONST_BITS == 13 -#define FIX_0_298631336 ((INT32) 2446) /* FIX(0.298631336) */ -#define FIX_0_390180644 ((INT32) 3196) /* FIX(0.390180644) */ -#define FIX_0_541196100 ((INT32) 4433) /* FIX(0.541196100) */ -#define FIX_0_765366865 ((INT32) 6270) /* FIX(0.765366865) */ -#define FIX_0_899976223 ((INT32) 7373) /* FIX(0.899976223) */ -#define FIX_1_175875602 ((INT32) 9633) /* FIX(1.175875602) */ -#define FIX_1_501321110 ((INT32) 12299) /* FIX(1.501321110) */ -#define FIX_1_847759065 ((INT32) 15137) /* FIX(1.847759065) */ -#define FIX_1_961570560 ((INT32) 16069) /* FIX(1.961570560) */ -#define FIX_2_053119869 ((INT32) 16819) /* FIX(2.053119869) */ -#define FIX_2_562915447 ((INT32) 20995) /* FIX(2.562915447) */ -#define FIX_3_072711026 ((INT32) 25172) /* FIX(3.072711026) */ -#else -#define FIX_0_298631336 FIX(0.298631336) -#define FIX_0_390180644 FIX(0.390180644) -#define FIX_0_541196100 FIX(0.541196100) -#define FIX_0_765366865 FIX(0.765366865) -#define FIX_0_899976223 FIX(0.899976223) -#define FIX_1_175875602 FIX(1.175875602) -#define FIX_1_501321110 FIX(1.501321110) -#define FIX_1_847759065 FIX(1.847759065) -#define FIX_1_961570560 FIX(1.961570560) -#define FIX_2_053119869 FIX(2.053119869) -#define FIX_2_562915447 FIX(2.562915447) -#define FIX_3_072711026 FIX(3.072711026) -#endif - - -/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. - * For 8-bit samples with the recommended scaling, all the variable - * and constant values involved are no more than 16 bits wide, so a - * 16x16->32 bit multiply can be used instead of a full 32x32 multiply. - * For 12-bit samples, a full 32-bit multiplication will be needed. - */ - -#if BITS_IN_JSAMPLE == 8 -#define MULTIPLY(var,const) MULTIPLY16C16(var,const) -#else -#define MULTIPLY(var,const) ((var) * (const)) -#endif - - -/* - * Perform the forward DCT on one block of samples. - */ - -GLOBAL(void) -jpeg_fdct_islow (DCTELEM * data) -{ - INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - INT32 tmp10, tmp11, tmp12, tmp13; - INT32 z1, z2, z3, z4, z5; - DCTELEM *dataptr; - int ctr; - SHIFT_TEMPS - - /* Pass 1: process rows. */ - /* Note results are scaled up by sqrt(8) compared to a true DCT; */ - /* furthermore, we scale the results by 2**PASS1_BITS. */ - - dataptr = data; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - tmp0 = dataptr[0] + dataptr[7]; - tmp7 = dataptr[0] - dataptr[7]; - tmp1 = dataptr[1] + dataptr[6]; - tmp6 = dataptr[1] - dataptr[6]; - tmp2 = dataptr[2] + dataptr[5]; - tmp5 = dataptr[2] - dataptr[5]; - tmp3 = dataptr[3] + dataptr[4]; - tmp4 = dataptr[3] - dataptr[4]; - - /* Even part per LL&M figure 1 --- note that published figure is faulty; - * rotator "sqrt(2)*c1" should be "sqrt(2)*c6". - */ - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - - dataptr[0] = (DCTELEM) ((tmp10 + tmp11) << PASS1_BITS); - dataptr[4] = (DCTELEM) ((tmp10 - tmp11) << PASS1_BITS); - - z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); - dataptr[2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865), - CONST_BITS-PASS1_BITS); - dataptr[6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065), - CONST_BITS-PASS1_BITS); - - /* Odd part per figure 8 --- note paper omits factor of sqrt(2). - * cK represents cos(K*pi/16). - * i0..i3 in the paper are tmp4..tmp7 here. - */ - - z1 = tmp4 + tmp7; - z2 = tmp5 + tmp6; - z3 = tmp4 + tmp6; - z4 = tmp5 + tmp7; - z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ - - tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ - tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ - tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ - tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ - z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ - z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ - z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ - z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ - - z3 += z5; - z4 += z5; - - dataptr[7] = (DCTELEM) DESCALE(tmp4 + z1 + z3, CONST_BITS-PASS1_BITS); - dataptr[5] = (DCTELEM) DESCALE(tmp5 + z2 + z4, CONST_BITS-PASS1_BITS); - dataptr[3] = (DCTELEM) DESCALE(tmp6 + z2 + z3, CONST_BITS-PASS1_BITS); - dataptr[1] = (DCTELEM) DESCALE(tmp7 + z1 + z4, CONST_BITS-PASS1_BITS); - - dataptr += DCTSIZE; /* advance pointer to next row */ - } - - /* Pass 2: process columns. - * We remove the PASS1_BITS scaling, but leave the results scaled up - * by an overall factor of 8. - */ - - dataptr = data; - for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { - tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; - tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; - tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; - tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; - tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; - tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; - tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; - tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; - - /* Even part per LL&M figure 1 --- note that published figure is faulty; - * rotator "sqrt(2)*c1" should be "sqrt(2)*c6". - */ - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - - dataptr[DCTSIZE*0] = (DCTELEM) DESCALE(tmp10 + tmp11, PASS1_BITS); - dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp10 - tmp11, PASS1_BITS); - - z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); - dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865), - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065), - CONST_BITS+PASS1_BITS); - - /* Odd part per figure 8 --- note paper omits factor of sqrt(2). - * cK represents cos(K*pi/16). - * i0..i3 in the paper are tmp4..tmp7 here. - */ - - z1 = tmp4 + tmp7; - z2 = tmp5 + tmp6; - z3 = tmp4 + tmp6; - z4 = tmp5 + tmp7; - z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ - - tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ - tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ - tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ - tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ - z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ - z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ - z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ - z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ - - z3 += z5; - z4 += z5; - - dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp4 + z1 + z3, - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp5 + z2 + z4, - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp6 + z2 + z3, - CONST_BITS+PASS1_BITS); - dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp7 + z1 + z4, - CONST_BITS+PASS1_BITS); - - dataptr++; /* advance pointer to next column */ - } -} - -#endif /* DCT_ISLOW_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jidctflt.c b/gtkmm-osx/trunk/jpeg-6b/jidctflt.c deleted file mode 100644 index 0188ce3..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jidctflt.c +++ /dev/null @@ -1,242 +0,0 @@ -/* - * jidctflt.c - * - * Copyright (C) 1994-1998, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a floating-point implementation of the - * inverse DCT (Discrete Cosine Transform). In the IJG code, this routine - * must also perform dequantization of the input coefficients. - * - * This implementation should be more accurate than either of the integer - * IDCT implementations. However, it may not give the same results on all - * machines because of differences in roundoff behavior. Speed will depend - * on the hardware's floating point capacity. - * - * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT - * on each row (or vice versa, but it's more convenient to emit a row at - * a time). Direct algorithms are also available, but they are much more - * complex and seem not to be any faster when reduced to code. - * - * This implementation is based on Arai, Agui, and Nakajima's algorithm for - * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in - * Japanese, but the algorithm is described in the Pennebaker & Mitchell - * JPEG textbook (see REFERENCES section in file README). The following code - * is based directly on figure 4-8 in P&M. - * While an 8-point DCT cannot be done in less than 11 multiplies, it is - * possible to arrange the computation so that many of the multiplies are - * simple scalings of the final outputs. These multiplies can then be - * folded into the multiplications or divisions by the JPEG quantization - * table entries. The AA&N method leaves only 5 multiplies and 29 adds - * to be done in the DCT itself. - * The primary disadvantage of this method is that with a fixed-point - * implementation, accuracy is lost due to imprecise representation of the - * scaled quantization values. However, that problem does not arise if - * we use floating point arithmetic. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jdct.h" /* Private declarations for DCT subsystem */ - -#ifdef DCT_FLOAT_SUPPORTED - - -/* - * This module is specialized to the case DCTSIZE = 8. - */ - -#if DCTSIZE != 8 - Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ -#endif - - -/* Dequantize a coefficient by multiplying it by the multiplier-table - * entry; produce a float result. - */ - -#define DEQUANTIZE(coef,quantval) (((FAST_FLOAT) (coef)) * (quantval)) - - -/* - * Perform dequantization and inverse DCT on one block of coefficients. - */ - -GLOBAL(void) -jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - FAST_FLOAT tmp10, tmp11, tmp12, tmp13; - FAST_FLOAT z5, z10, z11, z12, z13; - JCOEFPTR inptr; - FLOAT_MULT_TYPE * quantptr; - FAST_FLOAT * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - FAST_FLOAT workspace[DCTSIZE2]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (FLOAT_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = DCTSIZE; ctr > 0; ctr--) { - /* Due to quantization, we will usually find that many of the input - * coefficients are zero, especially the AC terms. We can exploit this - * by short-circuiting the IDCT calculation for any column in which all - * the AC terms are zero. In that case each output is equal to the - * DC coefficient (with scale factor as needed). - * With typical images and quantization tables, half or more of the - * column DCT calculations can be simplified this way. - */ - - if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && - inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && - inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && - inptr[DCTSIZE*7] == 0) { - /* AC terms all zero */ - FAST_FLOAT dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - - wsptr[DCTSIZE*0] = dcval; - wsptr[DCTSIZE*1] = dcval; - wsptr[DCTSIZE*2] = dcval; - wsptr[DCTSIZE*3] = dcval; - wsptr[DCTSIZE*4] = dcval; - wsptr[DCTSIZE*5] = dcval; - wsptr[DCTSIZE*6] = dcval; - wsptr[DCTSIZE*7] = dcval; - - inptr++; /* advance pointers to next column */ - quantptr++; - wsptr++; - continue; - } - - /* Even part */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - tmp3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - - tmp10 = tmp0 + tmp2; /* phase 3 */ - tmp11 = tmp0 - tmp2; - - tmp13 = tmp1 + tmp3; /* phases 5-3 */ - tmp12 = (tmp1 - tmp3) * ((FAST_FLOAT) 1.414213562) - tmp13; /* 2*c4 */ - - tmp0 = tmp10 + tmp13; /* phase 2 */ - tmp3 = tmp10 - tmp13; - tmp1 = tmp11 + tmp12; - tmp2 = tmp11 - tmp12; - - /* Odd part */ - - tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - tmp5 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - tmp6 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - tmp7 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - - z13 = tmp6 + tmp5; /* phase 6 */ - z10 = tmp6 - tmp5; - z11 = tmp4 + tmp7; - z12 = tmp4 - tmp7; - - tmp7 = z11 + z13; /* phase 5 */ - tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562); /* 2*c4 */ - - z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */ - tmp10 = ((FAST_FLOAT) 1.082392200) * z12 - z5; /* 2*(c2-c6) */ - tmp12 = ((FAST_FLOAT) -2.613125930) * z10 + z5; /* -2*(c2+c6) */ - - tmp6 = tmp12 - tmp7; /* phase 2 */ - tmp5 = tmp11 - tmp6; - tmp4 = tmp10 + tmp5; - - wsptr[DCTSIZE*0] = tmp0 + tmp7; - wsptr[DCTSIZE*7] = tmp0 - tmp7; - wsptr[DCTSIZE*1] = tmp1 + tmp6; - wsptr[DCTSIZE*6] = tmp1 - tmp6; - wsptr[DCTSIZE*2] = tmp2 + tmp5; - wsptr[DCTSIZE*5] = tmp2 - tmp5; - wsptr[DCTSIZE*4] = tmp3 + tmp4; - wsptr[DCTSIZE*3] = tmp3 - tmp4; - - inptr++; /* advance pointers to next column */ - quantptr++; - wsptr++; - } - - /* Pass 2: process rows from work array, store into output array. */ - /* Note that we must descale the results by a factor of 8 == 2**3. */ - - wsptr = workspace; - for (ctr = 0; ctr < DCTSIZE; ctr++) { - outptr = output_buf[ctr] + output_col; - /* Rows of zeroes can be exploited in the same way as we did with columns. - * However, the column calculation has created many nonzero AC terms, so - * the simplification applies less often (typically 5% to 10% of the time). - * And testing floats for zero is relatively expensive, so we don't bother. - */ - - /* Even part */ - - tmp10 = wsptr[0] + wsptr[4]; - tmp11 = wsptr[0] - wsptr[4]; - - tmp13 = wsptr[2] + wsptr[6]; - tmp12 = (wsptr[2] - wsptr[6]) * ((FAST_FLOAT) 1.414213562) - tmp13; - - tmp0 = tmp10 + tmp13; - tmp3 = tmp10 - tmp13; - tmp1 = tmp11 + tmp12; - tmp2 = tmp11 - tmp12; - - /* Odd part */ - - z13 = wsptr[5] + wsptr[3]; - z10 = wsptr[5] - wsptr[3]; - z11 = wsptr[1] + wsptr[7]; - z12 = wsptr[1] - wsptr[7]; - - tmp7 = z11 + z13; - tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562); - - z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */ - tmp10 = ((FAST_FLOAT) 1.082392200) * z12 - z5; /* 2*(c2-c6) */ - tmp12 = ((FAST_FLOAT) -2.613125930) * z10 + z5; /* -2*(c2+c6) */ - - tmp6 = tmp12 - tmp7; - tmp5 = tmp11 - tmp6; - tmp4 = tmp10 + tmp5; - - /* Final output stage: scale down by a factor of 8 and range-limit */ - - outptr[0] = range_limit[(int) DESCALE((INT32) (tmp0 + tmp7), 3) - & RANGE_MASK]; - outptr[7] = range_limit[(int) DESCALE((INT32) (tmp0 - tmp7), 3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) DESCALE((INT32) (tmp1 + tmp6), 3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) DESCALE((INT32) (tmp1 - tmp6), 3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) DESCALE((INT32) (tmp2 + tmp5), 3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) DESCALE((INT32) (tmp2 - tmp5), 3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) DESCALE((INT32) (tmp3 + tmp4), 3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) DESCALE((INT32) (tmp3 - tmp4), 3) - & RANGE_MASK]; - - wsptr += DCTSIZE; /* advance pointer to next row */ - } -} - -#endif /* DCT_FLOAT_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jidctfst.c b/gtkmm-osx/trunk/jpeg-6b/jidctfst.c deleted file mode 100644 index dba4216..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jidctfst.c +++ /dev/null @@ -1,368 +0,0 @@ -/* - * jidctfst.c - * - * Copyright (C) 1994-1998, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a fast, not so accurate integer implementation of the - * inverse DCT (Discrete Cosine Transform). In the IJG code, this routine - * must also perform dequantization of the input coefficients. - * - * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT - * on each row (or vice versa, but it's more convenient to emit a row at - * a time). Direct algorithms are also available, but they are much more - * complex and seem not to be any faster when reduced to code. - * - * This implementation is based on Arai, Agui, and Nakajima's algorithm for - * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in - * Japanese, but the algorithm is described in the Pennebaker & Mitchell - * JPEG textbook (see REFERENCES section in file README). The following code - * is based directly on figure 4-8 in P&M. - * While an 8-point DCT cannot be done in less than 11 multiplies, it is - * possible to arrange the computation so that many of the multiplies are - * simple scalings of the final outputs. These multiplies can then be - * folded into the multiplications or divisions by the JPEG quantization - * table entries. The AA&N method leaves only 5 multiplies and 29 adds - * to be done in the DCT itself. - * The primary disadvantage of this method is that with fixed-point math, - * accuracy is lost due to imprecise representation of the scaled - * quantization values. The smaller the quantization table entry, the less - * precise the scaled value, so this implementation does worse with high- - * quality-setting files than with low-quality ones. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jdct.h" /* Private declarations for DCT subsystem */ - -#ifdef DCT_IFAST_SUPPORTED - - -/* - * This module is specialized to the case DCTSIZE = 8. - */ - -#if DCTSIZE != 8 - Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ -#endif - - -/* Scaling decisions are generally the same as in the LL&M algorithm; - * see jidctint.c for more details. However, we choose to descale - * (right shift) multiplication products as soon as they are formed, - * rather than carrying additional fractional bits into subsequent additions. - * This compromises accuracy slightly, but it lets us save a few shifts. - * More importantly, 16-bit arithmetic is then adequate (for 8-bit samples) - * everywhere except in the multiplications proper; this saves a good deal - * of work on 16-bit-int machines. - * - * The dequantized coefficients are not integers because the AA&N scaling - * factors have been incorporated. We represent them scaled up by PASS1_BITS, - * so that the first and second IDCT rounds have the same input scaling. - * For 8-bit JSAMPLEs, we choose IFAST_SCALE_BITS = PASS1_BITS so as to - * avoid a descaling shift; this compromises accuracy rather drastically - * for small quantization table entries, but it saves a lot of shifts. - * For 12-bit JSAMPLEs, there's no hope of using 16x16 multiplies anyway, - * so we use a much larger scaling factor to preserve accuracy. - * - * A final compromise is to represent the multiplicative constants to only - * 8 fractional bits, rather than 13. This saves some shifting work on some - * machines, and may also reduce the cost of multiplication (since there - * are fewer one-bits in the constants). - */ - -#if BITS_IN_JSAMPLE == 8 -#define CONST_BITS 8 -#define PASS1_BITS 2 -#else -#define CONST_BITS 8 -#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ -#endif - -/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus - * causing a lot of useless floating-point operations at run time. - * To get around this we use the following pre-calculated constants. - * If you change CONST_BITS you may want to add appropriate values. - * (With a reasonable C compiler, you can just rely on the FIX() macro...) - */ - -#if CONST_BITS == 8 -#define FIX_1_082392200 ((INT32) 277) /* FIX(1.082392200) */ -#define FIX_1_414213562 ((INT32) 362) /* FIX(1.414213562) */ -#define FIX_1_847759065 ((INT32) 473) /* FIX(1.847759065) */ -#define FIX_2_613125930 ((INT32) 669) /* FIX(2.613125930) */ -#else -#define FIX_1_082392200 FIX(1.082392200) -#define FIX_1_414213562 FIX(1.414213562) -#define FIX_1_847759065 FIX(1.847759065) -#define FIX_2_613125930 FIX(2.613125930) -#endif - - -/* We can gain a little more speed, with a further compromise in accuracy, - * by omitting the addition in a descaling shift. This yields an incorrectly - * rounded result half the time... - */ - -#ifndef USE_ACCURATE_ROUNDING -#undef DESCALE -#define DESCALE(x,n) RIGHT_SHIFT(x, n) -#endif - - -/* Multiply a DCTELEM variable by an INT32 constant, and immediately - * descale to yield a DCTELEM result. - */ - -#define MULTIPLY(var,const) ((DCTELEM) DESCALE((var) * (const), CONST_BITS)) - - -/* Dequantize a coefficient by multiplying it by the multiplier-table - * entry; produce a DCTELEM result. For 8-bit data a 16x16->16 - * multiplication will do. For 12-bit data, the multiplier table is - * declared INT32, so a 32-bit multiply will be used. - */ - -#if BITS_IN_JSAMPLE == 8 -#define DEQUANTIZE(coef,quantval) (((IFAST_MULT_TYPE) (coef)) * (quantval)) -#else -#define DEQUANTIZE(coef,quantval) \ - DESCALE((coef)*(quantval), IFAST_SCALE_BITS-PASS1_BITS) -#endif - - -/* Like DESCALE, but applies to a DCTELEM and produces an int. - * We assume that int right shift is unsigned if INT32 right shift is. - */ - -#ifdef RIGHT_SHIFT_IS_UNSIGNED -#define ISHIFT_TEMPS DCTELEM ishift_temp; -#if BITS_IN_JSAMPLE == 8 -#define DCTELEMBITS 16 /* DCTELEM may be 16 or 32 bits */ -#else -#define DCTELEMBITS 32 /* DCTELEM must be 32 bits */ -#endif -#define IRIGHT_SHIFT(x,shft) \ - ((ishift_temp = (x)) < 0 ? \ - (ishift_temp >> (shft)) | ((~((DCTELEM) 0)) << (DCTELEMBITS-(shft))) : \ - (ishift_temp >> (shft))) -#else -#define ISHIFT_TEMPS -#define IRIGHT_SHIFT(x,shft) ((x) >> (shft)) -#endif - -#ifdef USE_ACCURATE_ROUNDING -#define IDESCALE(x,n) ((int) IRIGHT_SHIFT((x) + (1 << ((n)-1)), n)) -#else -#define IDESCALE(x,n) ((int) IRIGHT_SHIFT(x, n)) -#endif - - -/* - * Perform dequantization and inverse DCT on one block of coefficients. - */ - -GLOBAL(void) -jpeg_idct_ifast (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - DCTELEM tmp10, tmp11, tmp12, tmp13; - DCTELEM z5, z10, z11, z12, z13; - JCOEFPTR inptr; - IFAST_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[DCTSIZE2]; /* buffers data between passes */ - SHIFT_TEMPS /* for DESCALE */ - ISHIFT_TEMPS /* for IDESCALE */ - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (IFAST_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = DCTSIZE; ctr > 0; ctr--) { - /* Due to quantization, we will usually find that many of the input - * coefficients are zero, especially the AC terms. We can exploit this - * by short-circuiting the IDCT calculation for any column in which all - * the AC terms are zero. In that case each output is equal to the - * DC coefficient (with scale factor as needed). - * With typical images and quantization tables, half or more of the - * column DCT calculations can be simplified this way. - */ - - if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && - inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && - inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && - inptr[DCTSIZE*7] == 0) { - /* AC terms all zero */ - int dcval = (int) DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - - wsptr[DCTSIZE*0] = dcval; - wsptr[DCTSIZE*1] = dcval; - wsptr[DCTSIZE*2] = dcval; - wsptr[DCTSIZE*3] = dcval; - wsptr[DCTSIZE*4] = dcval; - wsptr[DCTSIZE*5] = dcval; - wsptr[DCTSIZE*6] = dcval; - wsptr[DCTSIZE*7] = dcval; - - inptr++; /* advance pointers to next column */ - quantptr++; - wsptr++; - continue; - } - - /* Even part */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - tmp3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - - tmp10 = tmp0 + tmp2; /* phase 3 */ - tmp11 = tmp0 - tmp2; - - tmp13 = tmp1 + tmp3; /* phases 5-3 */ - tmp12 = MULTIPLY(tmp1 - tmp3, FIX_1_414213562) - tmp13; /* 2*c4 */ - - tmp0 = tmp10 + tmp13; /* phase 2 */ - tmp3 = tmp10 - tmp13; - tmp1 = tmp11 + tmp12; - tmp2 = tmp11 - tmp12; - - /* Odd part */ - - tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - tmp5 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - tmp6 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - tmp7 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - - z13 = tmp6 + tmp5; /* phase 6 */ - z10 = tmp6 - tmp5; - z11 = tmp4 + tmp7; - z12 = tmp4 - tmp7; - - tmp7 = z11 + z13; /* phase 5 */ - tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */ - - z5 = MULTIPLY(z10 + z12, FIX_1_847759065); /* 2*c2 */ - tmp10 = MULTIPLY(z12, FIX_1_082392200) - z5; /* 2*(c2-c6) */ - tmp12 = MULTIPLY(z10, - FIX_2_613125930) + z5; /* -2*(c2+c6) */ - - tmp6 = tmp12 - tmp7; /* phase 2 */ - tmp5 = tmp11 - tmp6; - tmp4 = tmp10 + tmp5; - - wsptr[DCTSIZE*0] = (int) (tmp0 + tmp7); - wsptr[DCTSIZE*7] = (int) (tmp0 - tmp7); - wsptr[DCTSIZE*1] = (int) (tmp1 + tmp6); - wsptr[DCTSIZE*6] = (int) (tmp1 - tmp6); - wsptr[DCTSIZE*2] = (int) (tmp2 + tmp5); - wsptr[DCTSIZE*5] = (int) (tmp2 - tmp5); - wsptr[DCTSIZE*4] = (int) (tmp3 + tmp4); - wsptr[DCTSIZE*3] = (int) (tmp3 - tmp4); - - inptr++; /* advance pointers to next column */ - quantptr++; - wsptr++; - } - - /* Pass 2: process rows from work array, store into output array. */ - /* Note that we must descale the results by a factor of 8 == 2**3, */ - /* and also undo the PASS1_BITS scaling. */ - - wsptr = workspace; - for (ctr = 0; ctr < DCTSIZE; ctr++) { - outptr = output_buf[ctr] + output_col; - /* Rows of zeroes can be exploited in the same way as we did with columns. - * However, the column calculation has created many nonzero AC terms, so - * the simplification applies less often (typically 5% to 10% of the time). - * On machines with very fast multiplication, it's possible that the - * test takes more time than it's worth. In that case this section - * may be commented out. - */ - -#ifndef NO_ZERO_ROW_TEST - if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && wsptr[4] == 0 && - wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) { - /* AC terms all zero */ - JSAMPLE dcval = range_limit[IDESCALE(wsptr[0], PASS1_BITS+3) - & RANGE_MASK]; - - outptr[0] = dcval; - outptr[1] = dcval; - outptr[2] = dcval; - outptr[3] = dcval; - outptr[4] = dcval; - outptr[5] = dcval; - outptr[6] = dcval; - outptr[7] = dcval; - - wsptr += DCTSIZE; /* advance pointer to next row */ - continue; - } -#endif - - /* Even part */ - - tmp10 = ((DCTELEM) wsptr[0] + (DCTELEM) wsptr[4]); - tmp11 = ((DCTELEM) wsptr[0] - (DCTELEM) wsptr[4]); - - tmp13 = ((DCTELEM) wsptr[2] + (DCTELEM) wsptr[6]); - tmp12 = MULTIPLY((DCTELEM) wsptr[2] - (DCTELEM) wsptr[6], FIX_1_414213562) - - tmp13; - - tmp0 = tmp10 + tmp13; - tmp3 = tmp10 - tmp13; - tmp1 = tmp11 + tmp12; - tmp2 = tmp11 - tmp12; - - /* Odd part */ - - z13 = (DCTELEM) wsptr[5] + (DCTELEM) wsptr[3]; - z10 = (DCTELEM) wsptr[5] - (DCTELEM) wsptr[3]; - z11 = (DCTELEM) wsptr[1] + (DCTELEM) wsptr[7]; - z12 = (DCTELEM) wsptr[1] - (DCTELEM) wsptr[7]; - - tmp7 = z11 + z13; /* phase 5 */ - tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */ - - z5 = MULTIPLY(z10 + z12, FIX_1_847759065); /* 2*c2 */ - tmp10 = MULTIPLY(z12, FIX_1_082392200) - z5; /* 2*(c2-c6) */ - tmp12 = MULTIPLY(z10, - FIX_2_613125930) + z5; /* -2*(c2+c6) */ - - tmp6 = tmp12 - tmp7; /* phase 2 */ - tmp5 = tmp11 - tmp6; - tmp4 = tmp10 + tmp5; - - /* Final output stage: scale down by a factor of 8 and range-limit */ - - outptr[0] = range_limit[IDESCALE(tmp0 + tmp7, PASS1_BITS+3) - & RANGE_MASK]; - outptr[7] = range_limit[IDESCALE(tmp0 - tmp7, PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[IDESCALE(tmp1 + tmp6, PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[IDESCALE(tmp1 - tmp6, PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[IDESCALE(tmp2 + tmp5, PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[IDESCALE(tmp2 - tmp5, PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[IDESCALE(tmp3 + tmp4, PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[IDESCALE(tmp3 - tmp4, PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += DCTSIZE; /* advance pointer to next row */ - } -} - -#endif /* DCT_IFAST_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jidctint.c b/gtkmm-osx/trunk/jpeg-6b/jidctint.c deleted file mode 100644 index a72b320..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jidctint.c +++ /dev/null @@ -1,389 +0,0 @@ -/* - * jidctint.c - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a slow-but-accurate integer implementation of the - * inverse DCT (Discrete Cosine Transform). In the IJG code, this routine - * must also perform dequantization of the input coefficients. - * - * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT - * on each row (or vice versa, but it's more convenient to emit a row at - * a time). Direct algorithms are also available, but they are much more - * complex and seem not to be any faster when reduced to code. - * - * This implementation is based on an algorithm described in - * C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT - * Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics, - * Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991. - * The primary algorithm described there uses 11 multiplies and 29 adds. - * We use their alternate method with 12 multiplies and 32 adds. - * The advantage of this method is that no data path contains more than one - * multiplication; this allows a very simple and accurate implementation in - * scaled fixed-point arithmetic, with a minimal number of shifts. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jdct.h" /* Private declarations for DCT subsystem */ - -#ifdef DCT_ISLOW_SUPPORTED - - -/* - * This module is specialized to the case DCTSIZE = 8. - */ - -#if DCTSIZE != 8 - Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ -#endif - - -/* - * The poop on this scaling stuff is as follows: - * - * Each 1-D IDCT step produces outputs which are a factor of sqrt(N) - * larger than the true IDCT outputs. The final outputs are therefore - * a factor of N larger than desired; since N=8 this can be cured by - * a simple right shift at the end of the algorithm. The advantage of - * this arrangement is that we save two multiplications per 1-D IDCT, - * because the y0 and y4 inputs need not be divided by sqrt(N). - * - * We have to do addition and subtraction of the integer inputs, which - * is no problem, and multiplication by fractional constants, which is - * a problem to do in integer arithmetic. We multiply all the constants - * by CONST_SCALE and convert them to integer constants (thus retaining - * CONST_BITS bits of precision in the constants). After doing a - * multiplication we have to divide the product by CONST_SCALE, with proper - * rounding, to produce the correct output. This division can be done - * cheaply as a right shift of CONST_BITS bits. We postpone shifting - * as long as possible so that partial sums can be added together with - * full fractional precision. - * - * The outputs of the first pass are scaled up by PASS1_BITS bits so that - * they are represented to better-than-integral precision. These outputs - * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word - * with the recommended scaling. (To scale up 12-bit sample data further, an - * intermediate INT32 array would be needed.) - * - * To avoid overflow of the 32-bit intermediate results in pass 2, we must - * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26. Error analysis - * shows that the values given below are the most effective. - */ - -#if BITS_IN_JSAMPLE == 8 -#define CONST_BITS 13 -#define PASS1_BITS 2 -#else -#define CONST_BITS 13 -#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ -#endif - -/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus - * causing a lot of useless floating-point operations at run time. - * To get around this we use the following pre-calculated constants. - * If you change CONST_BITS you may want to add appropriate values. - * (With a reasonable C compiler, you can just rely on the FIX() macro...) - */ - -#if CONST_BITS == 13 -#define FIX_0_298631336 ((INT32) 2446) /* FIX(0.298631336) */ -#define FIX_0_390180644 ((INT32) 3196) /* FIX(0.390180644) */ -#define FIX_0_541196100 ((INT32) 4433) /* FIX(0.541196100) */ -#define FIX_0_765366865 ((INT32) 6270) /* FIX(0.765366865) */ -#define FIX_0_899976223 ((INT32) 7373) /* FIX(0.899976223) */ -#define FIX_1_175875602 ((INT32) 9633) /* FIX(1.175875602) */ -#define FIX_1_501321110 ((INT32) 12299) /* FIX(1.501321110) */ -#define FIX_1_847759065 ((INT32) 15137) /* FIX(1.847759065) */ -#define FIX_1_961570560 ((INT32) 16069) /* FIX(1.961570560) */ -#define FIX_2_053119869 ((INT32) 16819) /* FIX(2.053119869) */ -#define FIX_2_562915447 ((INT32) 20995) /* FIX(2.562915447) */ -#define FIX_3_072711026 ((INT32) 25172) /* FIX(3.072711026) */ -#else -#define FIX_0_298631336 FIX(0.298631336) -#define FIX_0_390180644 FIX(0.390180644) -#define FIX_0_541196100 FIX(0.541196100) -#define FIX_0_765366865 FIX(0.765366865) -#define FIX_0_899976223 FIX(0.899976223) -#define FIX_1_175875602 FIX(1.175875602) -#define FIX_1_501321110 FIX(1.501321110) -#define FIX_1_847759065 FIX(1.847759065) -#define FIX_1_961570560 FIX(1.961570560) -#define FIX_2_053119869 FIX(2.053119869) -#define FIX_2_562915447 FIX(2.562915447) -#define FIX_3_072711026 FIX(3.072711026) -#endif - - -/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. - * For 8-bit samples with the recommended scaling, all the variable - * and constant values involved are no more than 16 bits wide, so a - * 16x16->32 bit multiply can be used instead of a full 32x32 multiply. - * For 12-bit samples, a full 32-bit multiplication will be needed. - */ - -#if BITS_IN_JSAMPLE == 8 -#define MULTIPLY(var,const) MULTIPLY16C16(var,const) -#else -#define MULTIPLY(var,const) ((var) * (const)) -#endif - - -/* Dequantize a coefficient by multiplying it by the multiplier-table - * entry; produce an int result. In this module, both inputs and result - * are 16 bits or less, so either int or short multiply will work. - */ - -#define DEQUANTIZE(coef,quantval) (((ISLOW_MULT_TYPE) (coef)) * (quantval)) - - -/* - * Perform dequantization and inverse DCT on one block of coefficients. - */ - -GLOBAL(void) -jpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp0, tmp1, tmp2, tmp3; - INT32 tmp10, tmp11, tmp12, tmp13; - INT32 z1, z2, z3, z4, z5; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[DCTSIZE2]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. */ - /* Note results are scaled up by sqrt(8) compared to a true IDCT; */ - /* furthermore, we scale the results by 2**PASS1_BITS. */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = DCTSIZE; ctr > 0; ctr--) { - /* Due to quantization, we will usually find that many of the input - * coefficients are zero, especially the AC terms. We can exploit this - * by short-circuiting the IDCT calculation for any column in which all - * the AC terms are zero. In that case each output is equal to the - * DC coefficient (with scale factor as needed). - * With typical images and quantization tables, half or more of the - * column DCT calculations can be simplified this way. - */ - - if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && - inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && - inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && - inptr[DCTSIZE*7] == 0) { - /* AC terms all zero */ - int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS; - - wsptr[DCTSIZE*0] = dcval; - wsptr[DCTSIZE*1] = dcval; - wsptr[DCTSIZE*2] = dcval; - wsptr[DCTSIZE*3] = dcval; - wsptr[DCTSIZE*4] = dcval; - wsptr[DCTSIZE*5] = dcval; - wsptr[DCTSIZE*6] = dcval; - wsptr[DCTSIZE*7] = dcval; - - inptr++; /* advance pointers to next column */ - quantptr++; - wsptr++; - continue; - } - - /* Even part: reverse the even part of the forward DCT. */ - /* The rotator is sqrt(2)*c(-6). */ - - z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - - z1 = MULTIPLY(z2 + z3, FIX_0_541196100); - tmp2 = z1 + MULTIPLY(z3, - FIX_1_847759065); - tmp3 = z1 + MULTIPLY(z2, FIX_0_765366865); - - z2 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); - - tmp0 = (z2 + z3) << CONST_BITS; - tmp1 = (z2 - z3) << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - - /* Odd part per figure 8; the matrix is unitary and hence its - * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. - */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - tmp1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - tmp2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - tmp3 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - - z1 = tmp0 + tmp3; - z2 = tmp1 + tmp2; - z3 = tmp0 + tmp2; - z4 = tmp1 + tmp3; - z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ - - tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ - tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ - tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ - tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ - z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ - z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ - z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ - z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ - - z3 += z5; - z4 += z5; - - tmp0 += z1 + z3; - tmp1 += z2 + z4; - tmp2 += z2 + z3; - tmp3 += z1 + z4; - - /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ - - wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp3, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*7] = (int) DESCALE(tmp10 - tmp3, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*1] = (int) DESCALE(tmp11 + tmp2, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*6] = (int) DESCALE(tmp11 - tmp2, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*2] = (int) DESCALE(tmp12 + tmp1, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*5] = (int) DESCALE(tmp12 - tmp1, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*3] = (int) DESCALE(tmp13 + tmp0, CONST_BITS-PASS1_BITS); - wsptr[DCTSIZE*4] = (int) DESCALE(tmp13 - tmp0, CONST_BITS-PASS1_BITS); - - inptr++; /* advance pointers to next column */ - quantptr++; - wsptr++; - } - - /* Pass 2: process rows from work array, store into output array. */ - /* Note that we must descale the results by a factor of 8 == 2**3, */ - /* and also undo the PASS1_BITS scaling. */ - - wsptr = workspace; - for (ctr = 0; ctr < DCTSIZE; ctr++) { - outptr = output_buf[ctr] + output_col; - /* Rows of zeroes can be exploited in the same way as we did with columns. - * However, the column calculation has created many nonzero AC terms, so - * the simplification applies less often (typically 5% to 10% of the time). - * On machines with very fast multiplication, it's possible that the - * test takes more time than it's worth. In that case this section - * may be commented out. - */ - -#ifndef NO_ZERO_ROW_TEST - if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && wsptr[4] == 0 && - wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) { - /* AC terms all zero */ - JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3) - & RANGE_MASK]; - - outptr[0] = dcval; - outptr[1] = dcval; - outptr[2] = dcval; - outptr[3] = dcval; - outptr[4] = dcval; - outptr[5] = dcval; - outptr[6] = dcval; - outptr[7] = dcval; - - wsptr += DCTSIZE; /* advance pointer to next row */ - continue; - } -#endif - - /* Even part: reverse the even part of the forward DCT. */ - /* The rotator is sqrt(2)*c(-6). */ - - z2 = (INT32) wsptr[2]; - z3 = (INT32) wsptr[6]; - - z1 = MULTIPLY(z2 + z3, FIX_0_541196100); - tmp2 = z1 + MULTIPLY(z3, - FIX_1_847759065); - tmp3 = z1 + MULTIPLY(z2, FIX_0_765366865); - - tmp0 = ((INT32) wsptr[0] + (INT32) wsptr[4]) << CONST_BITS; - tmp1 = ((INT32) wsptr[0] - (INT32) wsptr[4]) << CONST_BITS; - - tmp10 = tmp0 + tmp3; - tmp13 = tmp0 - tmp3; - tmp11 = tmp1 + tmp2; - tmp12 = tmp1 - tmp2; - - /* Odd part per figure 8; the matrix is unitary and hence its - * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. - */ - - tmp0 = (INT32) wsptr[7]; - tmp1 = (INT32) wsptr[5]; - tmp2 = (INT32) wsptr[3]; - tmp3 = (INT32) wsptr[1]; - - z1 = tmp0 + tmp3; - z2 = tmp1 + tmp2; - z3 = tmp0 + tmp2; - z4 = tmp1 + tmp3; - z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ - - tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ - tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ - tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ - tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ - z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ - z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ - z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ - z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ - - z3 += z5; - z4 += z5; - - tmp0 += z1 + z3; - tmp1 += z2 + z4; - tmp2 += z2 + z3; - tmp3 += z1 + z4; - - /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ - - outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp3, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[7] = range_limit[(int) DESCALE(tmp10 - tmp3, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[1] = range_limit[(int) DESCALE(tmp11 + tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[6] = range_limit[(int) DESCALE(tmp11 - tmp2, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[2] = range_limit[(int) DESCALE(tmp12 + tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[5] = range_limit[(int) DESCALE(tmp12 - tmp1, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[3] = range_limit[(int) DESCALE(tmp13 + tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - outptr[4] = range_limit[(int) DESCALE(tmp13 - tmp0, - CONST_BITS+PASS1_BITS+3) - & RANGE_MASK]; - - wsptr += DCTSIZE; /* advance pointer to next row */ - } -} - -#endif /* DCT_ISLOW_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jidctred.c b/gtkmm-osx/trunk/jpeg-6b/jidctred.c deleted file mode 100644 index 421f3c7..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jidctred.c +++ /dev/null @@ -1,398 +0,0 @@ -/* - * jidctred.c - * - * Copyright (C) 1994-1998, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains inverse-DCT routines that produce reduced-size output: - * either 4x4, 2x2, or 1x1 pixels from an 8x8 DCT block. - * - * The implementation is based on the Loeffler, Ligtenberg and Moschytz (LL&M) - * algorithm used in jidctint.c. We simply replace each 8-to-8 1-D IDCT step - * with an 8-to-4 step that produces the four averages of two adjacent outputs - * (or an 8-to-2 step producing two averages of four outputs, for 2x2 output). - * These steps were derived by computing the corresponding values at the end - * of the normal LL&M code, then simplifying as much as possible. - * - * 1x1 is trivial: just take the DC coefficient divided by 8. - * - * See jidctint.c for additional comments. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jdct.h" /* Private declarations for DCT subsystem */ - -#ifdef IDCT_SCALING_SUPPORTED - - -/* - * This module is specialized to the case DCTSIZE = 8. - */ - -#if DCTSIZE != 8 - Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ -#endif - - -/* Scaling is the same as in jidctint.c. */ - -#if BITS_IN_JSAMPLE == 8 -#define CONST_BITS 13 -#define PASS1_BITS 2 -#else -#define CONST_BITS 13 -#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ -#endif - -/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus - * causing a lot of useless floating-point operations at run time. - * To get around this we use the following pre-calculated constants. - * If you change CONST_BITS you may want to add appropriate values. - * (With a reasonable C compiler, you can just rely on the FIX() macro...) - */ - -#if CONST_BITS == 13 -#define FIX_0_211164243 ((INT32) 1730) /* FIX(0.211164243) */ -#define FIX_0_509795579 ((INT32) 4176) /* FIX(0.509795579) */ -#define FIX_0_601344887 ((INT32) 4926) /* FIX(0.601344887) */ -#define FIX_0_720959822 ((INT32) 5906) /* FIX(0.720959822) */ -#define FIX_0_765366865 ((INT32) 6270) /* FIX(0.765366865) */ -#define FIX_0_850430095 ((INT32) 6967) /* FIX(0.850430095) */ -#define FIX_0_899976223 ((INT32) 7373) /* FIX(0.899976223) */ -#define FIX_1_061594337 ((INT32) 8697) /* FIX(1.061594337) */ -#define FIX_1_272758580 ((INT32) 10426) /* FIX(1.272758580) */ -#define FIX_1_451774981 ((INT32) 11893) /* FIX(1.451774981) */ -#define FIX_1_847759065 ((INT32) 15137) /* FIX(1.847759065) */ -#define FIX_2_172734803 ((INT32) 17799) /* FIX(2.172734803) */ -#define FIX_2_562915447 ((INT32) 20995) /* FIX(2.562915447) */ -#define FIX_3_624509785 ((INT32) 29692) /* FIX(3.624509785) */ -#else -#define FIX_0_211164243 FIX(0.211164243) -#define FIX_0_509795579 FIX(0.509795579) -#define FIX_0_601344887 FIX(0.601344887) -#define FIX_0_720959822 FIX(0.720959822) -#define FIX_0_765366865 FIX(0.765366865) -#define FIX_0_850430095 FIX(0.850430095) -#define FIX_0_899976223 FIX(0.899976223) -#define FIX_1_061594337 FIX(1.061594337) -#define FIX_1_272758580 FIX(1.272758580) -#define FIX_1_451774981 FIX(1.451774981) -#define FIX_1_847759065 FIX(1.847759065) -#define FIX_2_172734803 FIX(2.172734803) -#define FIX_2_562915447 FIX(2.562915447) -#define FIX_3_624509785 FIX(3.624509785) -#endif - - -/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. - * For 8-bit samples with the recommended scaling, all the variable - * and constant values involved are no more than 16 bits wide, so a - * 16x16->32 bit multiply can be used instead of a full 32x32 multiply. - * For 12-bit samples, a full 32-bit multiplication will be needed. - */ - -#if BITS_IN_JSAMPLE == 8 -#define MULTIPLY(var,const) MULTIPLY16C16(var,const) -#else -#define MULTIPLY(var,const) ((var) * (const)) -#endif - - -/* Dequantize a coefficient by multiplying it by the multiplier-table - * entry; produce an int result. In this module, both inputs and result - * are 16 bits or less, so either int or short multiply will work. - */ - -#define DEQUANTIZE(coef,quantval) (((ISLOW_MULT_TYPE) (coef)) * (quantval)) - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a reduced-size 4x4 output block. - */ - -GLOBAL(void) -jpeg_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp0, tmp2, tmp10, tmp12; - INT32 z1, z2, z3, z4; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[DCTSIZE*4]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = DCTSIZE; ctr > 0; inptr++, quantptr++, wsptr++, ctr--) { - /* Don't bother to process column 4, because second pass won't use it */ - if (ctr == DCTSIZE-4) - continue; - if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && - inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*5] == 0 && - inptr[DCTSIZE*6] == 0 && inptr[DCTSIZE*7] == 0) { - /* AC terms all zero; we need not examine term 4 for 4x4 output */ - int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS; - - wsptr[DCTSIZE*0] = dcval; - wsptr[DCTSIZE*1] = dcval; - wsptr[DCTSIZE*2] = dcval; - wsptr[DCTSIZE*3] = dcval; - - continue; - } - - /* Even part */ - - tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp0 <<= (CONST_BITS+1); - - z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); - z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); - - tmp2 = MULTIPLY(z2, FIX_1_847759065) + MULTIPLY(z3, - FIX_0_765366865); - - tmp10 = tmp0 + tmp2; - tmp12 = tmp0 - tmp2; - - /* Odd part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - z2 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - z4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - - tmp0 = MULTIPLY(z1, - FIX_0_211164243) /* sqrt(2) * (c3-c1) */ - + MULTIPLY(z2, FIX_1_451774981) /* sqrt(2) * (c3+c7) */ - + MULTIPLY(z3, - FIX_2_172734803) /* sqrt(2) * (-c1-c5) */ - + MULTIPLY(z4, FIX_1_061594337); /* sqrt(2) * (c5+c7) */ - - tmp2 = MULTIPLY(z1, - FIX_0_509795579) /* sqrt(2) * (c7-c5) */ - + MULTIPLY(z2, - FIX_0_601344887) /* sqrt(2) * (c5-c1) */ - + MULTIPLY(z3, FIX_0_899976223) /* sqrt(2) * (c3-c7) */ - + MULTIPLY(z4, FIX_2_562915447); /* sqrt(2) * (c1+c3) */ - - /* Final output stage */ - - wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp2, CONST_BITS-PASS1_BITS+1); - wsptr[DCTSIZE*3] = (int) DESCALE(tmp10 - tmp2, CONST_BITS-PASS1_BITS+1); - wsptr[DCTSIZE*1] = (int) DESCALE(tmp12 + tmp0, CONST_BITS-PASS1_BITS+1); - wsptr[DCTSIZE*2] = (int) DESCALE(tmp12 - tmp0, CONST_BITS-PASS1_BITS+1); - } - - /* Pass 2: process 4 rows from work array, store into output array. */ - - wsptr = workspace; - for (ctr = 0; ctr < 4; ctr++) { - outptr = output_buf[ctr] + output_col; - /* It's not clear whether a zero row test is worthwhile here ... */ - -#ifndef NO_ZERO_ROW_TEST - if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && - wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) { - /* AC terms all zero */ - JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3) - & RANGE_MASK]; - - outptr[0] = dcval; - outptr[1] = dcval; - outptr[2] = dcval; - outptr[3] = dcval; - - wsptr += DCTSIZE; /* advance pointer to next row */ - continue; - } -#endif - - /* Even part */ - - tmp0 = ((INT32) wsptr[0]) << (CONST_BITS+1); - - tmp2 = MULTIPLY((INT32) wsptr[2], FIX_1_847759065) - + MULTIPLY((INT32) wsptr[6], - FIX_0_765366865); - - tmp10 = tmp0 + tmp2; - tmp12 = tmp0 - tmp2; - - /* Odd part */ - - z1 = (INT32) wsptr[7]; - z2 = (INT32) wsptr[5]; - z3 = (INT32) wsptr[3]; - z4 = (INT32) wsptr[1]; - - tmp0 = MULTIPLY(z1, - FIX_0_211164243) /* sqrt(2) * (c3-c1) */ - + MULTIPLY(z2, FIX_1_451774981) /* sqrt(2) * (c3+c7) */ - + MULTIPLY(z3, - FIX_2_172734803) /* sqrt(2) * (-c1-c5) */ - + MULTIPLY(z4, FIX_1_061594337); /* sqrt(2) * (c5+c7) */ - - tmp2 = MULTIPLY(z1, - FIX_0_509795579) /* sqrt(2) * (c7-c5) */ - + MULTIPLY(z2, - FIX_0_601344887) /* sqrt(2) * (c5-c1) */ - + MULTIPLY(z3, FIX_0_899976223) /* sqrt(2) * (c3-c7) */ - + MULTIPLY(z4, FIX_2_562915447); /* sqrt(2) * (c1+c3) */ - - /* Final output stage */ - - outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp2, - CONST_BITS+PASS1_BITS+3+1) - & RANGE_MASK]; - outptr[3] = range_limit[(int) DESCALE(tmp10 - tmp2, - CONST_BITS+PASS1_BITS+3+1) - & RANGE_MASK]; - outptr[1] = range_limit[(int) DESCALE(tmp12 + tmp0, - CONST_BITS+PASS1_BITS+3+1) - & RANGE_MASK]; - outptr[2] = range_limit[(int) DESCALE(tmp12 - tmp0, - CONST_BITS+PASS1_BITS+3+1) - & RANGE_MASK]; - - wsptr += DCTSIZE; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a reduced-size 2x2 output block. - */ - -GLOBAL(void) -jpeg_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - INT32 tmp0, tmp10, z1; - JCOEFPTR inptr; - ISLOW_MULT_TYPE * quantptr; - int * wsptr; - JSAMPROW outptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - int ctr; - int workspace[DCTSIZE*2]; /* buffers data between passes */ - SHIFT_TEMPS - - /* Pass 1: process columns from input, store into work array. */ - - inptr = coef_block; - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - wsptr = workspace; - for (ctr = DCTSIZE; ctr > 0; inptr++, quantptr++, wsptr++, ctr--) { - /* Don't bother to process columns 2,4,6 */ - if (ctr == DCTSIZE-2 || ctr == DCTSIZE-4 || ctr == DCTSIZE-6) - continue; - if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*3] == 0 && - inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*7] == 0) { - /* AC terms all zero; we need not examine terms 2,4,6 for 2x2 output */ - int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS; - - wsptr[DCTSIZE*0] = dcval; - wsptr[DCTSIZE*1] = dcval; - - continue; - } - - /* Even part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - tmp10 = z1 << (CONST_BITS+2); - - /* Odd part */ - - z1 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); - tmp0 = MULTIPLY(z1, - FIX_0_720959822); /* sqrt(2) * (c7-c5+c3-c1) */ - z1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); - tmp0 += MULTIPLY(z1, FIX_0_850430095); /* sqrt(2) * (-c1+c3+c5+c7) */ - z1 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); - tmp0 += MULTIPLY(z1, - FIX_1_272758580); /* sqrt(2) * (-c1+c3-c5-c7) */ - z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); - tmp0 += MULTIPLY(z1, FIX_3_624509785); /* sqrt(2) * (c1+c3+c5+c7) */ - - /* Final output stage */ - - wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp0, CONST_BITS-PASS1_BITS+2); - wsptr[DCTSIZE*1] = (int) DESCALE(tmp10 - tmp0, CONST_BITS-PASS1_BITS+2); - } - - /* Pass 2: process 2 rows from work array, store into output array. */ - - wsptr = workspace; - for (ctr = 0; ctr < 2; ctr++) { - outptr = output_buf[ctr] + output_col; - /* It's not clear whether a zero row test is worthwhile here ... */ - -#ifndef NO_ZERO_ROW_TEST - if (wsptr[1] == 0 && wsptr[3] == 0 && wsptr[5] == 0 && wsptr[7] == 0) { - /* AC terms all zero */ - JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3) - & RANGE_MASK]; - - outptr[0] = dcval; - outptr[1] = dcval; - - wsptr += DCTSIZE; /* advance pointer to next row */ - continue; - } -#endif - - /* Even part */ - - tmp10 = ((INT32) wsptr[0]) << (CONST_BITS+2); - - /* Odd part */ - - tmp0 = MULTIPLY((INT32) wsptr[7], - FIX_0_720959822) /* sqrt(2) * (c7-c5+c3-c1) */ - + MULTIPLY((INT32) wsptr[5], FIX_0_850430095) /* sqrt(2) * (-c1+c3+c5+c7) */ - + MULTIPLY((INT32) wsptr[3], - FIX_1_272758580) /* sqrt(2) * (-c1+c3-c5-c7) */ - + MULTIPLY((INT32) wsptr[1], FIX_3_624509785); /* sqrt(2) * (c1+c3+c5+c7) */ - - /* Final output stage */ - - outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp0, - CONST_BITS+PASS1_BITS+3+2) - & RANGE_MASK]; - outptr[1] = range_limit[(int) DESCALE(tmp10 - tmp0, - CONST_BITS+PASS1_BITS+3+2) - & RANGE_MASK]; - - wsptr += DCTSIZE; /* advance pointer to next row */ - } -} - - -/* - * Perform dequantization and inverse DCT on one block of coefficients, - * producing a reduced-size 1x1 output block. - */ - -GLOBAL(void) -jpeg_idct_1x1 (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col) -{ - int dcval; - ISLOW_MULT_TYPE * quantptr; - JSAMPLE *range_limit = IDCT_range_limit(cinfo); - SHIFT_TEMPS - - /* We hardly need an inverse DCT routine for this: just take the - * average pixel value, which is one-eighth of the DC coefficient. - */ - quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; - dcval = DEQUANTIZE(coef_block[0], quantptr[0]); - dcval = (int) DESCALE((INT32) dcval, 3); - - output_buf[0][output_col] = range_limit[dcval & RANGE_MASK]; -} - -#endif /* IDCT_SCALING_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jinclude.h b/gtkmm-osx/trunk/jpeg-6b/jinclude.h deleted file mode 100644 index 0a4f151..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jinclude.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * jinclude.h - * - * Copyright (C) 1991-1994, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file exists to provide a single place to fix any problems with - * including the wrong system include files. (Common problems are taken - * care of by the standard jconfig symbols, but on really weird systems - * you may have to edit this file.) - * - * NOTE: this file is NOT intended to be included by applications using the - * JPEG library. Most applications need only include jpeglib.h. - */ - - -/* Include auto-config file to find out which system include files we need. */ - -#include "jconfig.h" /* auto configuration options */ -#define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */ - -/* - * We need the NULL macro and size_t typedef. - * On an ANSI-conforming system it is sufficient to include . - * Otherwise, we get them from or ; we may have to - * pull in as well. - * Note that the core JPEG library does not require ; - * only the default error handler and data source/destination modules do. - * But we must pull it in because of the references to FILE in jpeglib.h. - * You can remove those references if you want to compile without . - */ - -#ifdef HAVE_STDDEF_H -#include -#endif - -#ifdef HAVE_STDLIB_H -#include -#endif - -#ifdef NEED_SYS_TYPES_H -#include -#endif - -#include - -/* - * We need memory copying and zeroing functions, plus strncpy(). - * ANSI and System V implementations declare these in . - * BSD doesn't have the mem() functions, but it does have bcopy()/bzero(). - * Some systems may declare memset and memcpy in . - * - * NOTE: we assume the size parameters to these functions are of type size_t. - * Change the casts in these macros if not! - */ - -#ifdef NEED_BSD_STRINGS - -#include -#define MEMZERO(target,size) bzero((void *)(target), (size_t)(size)) -#define MEMCOPY(dest,src,size) bcopy((const void *)(src), (void *)(dest), (size_t)(size)) - -#else /* not BSD, assume ANSI/SysV string lib */ - -#include -#define MEMZERO(target,size) memset((void *)(target), 0, (size_t)(size)) -#define MEMCOPY(dest,src,size) memcpy((void *)(dest), (const void *)(src), (size_t)(size)) - -#endif - -/* - * In ANSI C, and indeed any rational implementation, size_t is also the - * type returned by sizeof(). However, it seems there are some irrational - * implementations out there, in which sizeof() returns an int even though - * size_t is defined as long or unsigned long. To ensure consistent results - * we always use this SIZEOF() macro in place of using sizeof() directly. - */ - -#define SIZEOF(object) ((size_t) sizeof(object)) - -/* - * The modules that use fread() and fwrite() always invoke them through - * these macros. On some systems you may need to twiddle the argument casts. - * CAUTION: argument order is different from underlying functions! - */ - -#define JFREAD(file,buf,sizeofbuf) \ - ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) -#define JFWRITE(file,buf,sizeofbuf) \ - ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) diff --git a/gtkmm-osx/trunk/jpeg-6b/jmemansi.c b/gtkmm-osx/trunk/jpeg-6b/jmemansi.c deleted file mode 100644 index 2d93e49..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jmemansi.c +++ /dev/null @@ -1,167 +0,0 @@ -/* - * jmemansi.c - * - * Copyright (C) 1992-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file provides a simple generic implementation of the system- - * dependent portion of the JPEG memory manager. This implementation - * assumes that you have the ANSI-standard library routine tmpfile(). - * Also, the problem of determining the amount of memory available - * is shoved onto the user. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jmemsys.h" /* import the system-dependent declarations */ - -#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ -extern void * malloc JPP((size_t size)); -extern void free JPP((void *ptr)); -#endif - -#ifndef SEEK_SET /* pre-ANSI systems may not define this; */ -#define SEEK_SET 0 /* if not, assume 0 is correct */ -#endif - - -/* - * Memory allocation and freeing are controlled by the regular library - * routines malloc() and free(). - */ - -GLOBAL(void *) -jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void *) malloc(sizeofobject); -} - -GLOBAL(void) -jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) -{ - free(object); -} - - -/* - * "Large" objects are treated the same as "small" ones. - * NB: although we include FAR keywords in the routine declarations, - * this file won't actually work in 80x86 small/medium model; at least, - * you probably won't be able to process useful-size images in only 64KB. - */ - -GLOBAL(void FAR *) -jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void FAR *) malloc(sizeofobject); -} - -GLOBAL(void) -jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) -{ - free(object); -} - - -/* - * This routine computes the total memory space available for allocation. - * It's impossible to do this in a portable way; our current solution is - * to make the user tell us (with a default value set at compile time). - * If you can actually get the available space, it's a good idea to subtract - * a slop factor of 5% or so. - */ - -#ifndef DEFAULT_MAX_MEM /* so can override from makefile */ -#define DEFAULT_MAX_MEM 1000000L /* default: one megabyte */ -#endif - -GLOBAL(long) -jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, - long max_bytes_needed, long already_allocated) -{ - return cinfo->mem->max_memory_to_use - already_allocated; -} - - -/* - * Backing store (temporary file) management. - * Backing store objects are only used when the value returned by - * jpeg_mem_available is less than the total space needed. You can dispense - * with these routines if you have plenty of virtual memory; see jmemnobs.c. - */ - - -METHODDEF(void) -read_backing_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - if (fseek(info->temp_file, file_offset, SEEK_SET)) - ERREXIT(cinfo, JERR_TFILE_SEEK); - if (JFREAD(info->temp_file, buffer_address, byte_count) - != (size_t) byte_count) - ERREXIT(cinfo, JERR_TFILE_READ); -} - - -METHODDEF(void) -write_backing_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - if (fseek(info->temp_file, file_offset, SEEK_SET)) - ERREXIT(cinfo, JERR_TFILE_SEEK); - if (JFWRITE(info->temp_file, buffer_address, byte_count) - != (size_t) byte_count) - ERREXIT(cinfo, JERR_TFILE_WRITE); -} - - -METHODDEF(void) -close_backing_store (j_common_ptr cinfo, backing_store_ptr info) -{ - fclose(info->temp_file); - /* Since this implementation uses tmpfile() to create the file, - * no explicit file deletion is needed. - */ -} - - -/* - * Initial opening of a backing-store object. - * - * This version uses tmpfile(), which constructs a suitable file name - * behind the scenes. We don't have to use info->temp_name[] at all; - * indeed, we can't even find out the actual name of the temp file. - */ - -GLOBAL(void) -jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - if ((info->temp_file = tmpfile()) == NULL) - ERREXITS(cinfo, JERR_TFILE_CREATE, ""); - info->read_backing_store = read_backing_store; - info->write_backing_store = write_backing_store; - info->close_backing_store = close_backing_store; -} - - -/* - * These routines take care of any system-dependent initialization and - * cleanup required. - */ - -GLOBAL(long) -jpeg_mem_init (j_common_ptr cinfo) -{ - return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ -} - -GLOBAL(void) -jpeg_mem_term (j_common_ptr cinfo) -{ - /* no work */ -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jmemdos.c b/gtkmm-osx/trunk/jpeg-6b/jmemdos.c deleted file mode 100644 index 60b45c6..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jmemdos.c +++ /dev/null @@ -1,638 +0,0 @@ -/* - * jmemdos.c - * - * Copyright (C) 1992-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file provides an MS-DOS-compatible implementation of the system- - * dependent portion of the JPEG memory manager. Temporary data can be - * stored in extended or expanded memory as well as in regular DOS files. - * - * If you use this file, you must be sure that NEED_FAR_POINTERS is defined - * if you compile in a small-data memory model; it should NOT be defined if - * you use a large-data memory model. This file is not recommended if you - * are using a flat-memory-space 386 environment such as DJGCC or Watcom C. - * Also, this code will NOT work if struct fields are aligned on greater than - * 2-byte boundaries. - * - * Based on code contributed by Ge' Weijers. - */ - -/* - * If you have both extended and expanded memory, you may want to change the - * order in which they are tried in jopen_backing_store. On a 286 machine - * expanded memory is usually faster, since extended memory access involves - * an expensive protected-mode-and-back switch. On 386 and better, extended - * memory is usually faster. As distributed, the code tries extended memory - * first (what? not everyone has a 386? :-). - * - * You can disable use of extended/expanded memory entirely by altering these - * definitions or overriding them from the Makefile (eg, -DEMS_SUPPORTED=0). - */ - -#ifndef XMS_SUPPORTED -#define XMS_SUPPORTED 1 -#endif -#ifndef EMS_SUPPORTED -#define EMS_SUPPORTED 1 -#endif - - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jmemsys.h" /* import the system-dependent declarations */ - -#ifndef HAVE_STDLIB_H /* should declare these */ -extern void * malloc JPP((size_t size)); -extern void free JPP((void *ptr)); -extern char * getenv JPP((const char * name)); -#endif - -#ifdef NEED_FAR_POINTERS - -#ifdef __TURBOC__ -/* These definitions work for Borland C (Turbo C) */ -#include /* need farmalloc(), farfree() */ -#define far_malloc(x) farmalloc(x) -#define far_free(x) farfree(x) -#else -/* These definitions work for Microsoft C and compatible compilers */ -#include /* need _fmalloc(), _ffree() */ -#define far_malloc(x) _fmalloc(x) -#define far_free(x) _ffree(x) -#endif - -#else /* not NEED_FAR_POINTERS */ - -#define far_malloc(x) malloc(x) -#define far_free(x) free(x) - -#endif /* NEED_FAR_POINTERS */ - -#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#else -#define READ_BINARY "rb" -#endif - -#ifndef USE_MSDOS_MEMMGR /* make sure user got configuration right */ - You forgot to define USE_MSDOS_MEMMGR in jconfig.h. /* deliberate syntax error */ -#endif - -#if MAX_ALLOC_CHUNK >= 65535L /* make sure jconfig.h got this right */ - MAX_ALLOC_CHUNK should be less than 64K. /* deliberate syntax error */ -#endif - - -/* - * Declarations for assembly-language support routines (see jmemdosa.asm). - * - * The functions are declared "far" as are all their pointer arguments; - * this ensures the assembly source code will work regardless of the - * compiler memory model. We assume "short" is 16 bits, "long" is 32. - */ - -typedef void far * XMSDRIVER; /* actually a pointer to code */ -typedef struct { /* registers for calling XMS driver */ - unsigned short ax, dx, bx; - void far * ds_si; - } XMScontext; -typedef struct { /* registers for calling EMS driver */ - unsigned short ax, dx, bx; - void far * ds_si; - } EMScontext; - -extern short far jdos_open JPP((short far * handle, char far * filename)); -extern short far jdos_close JPP((short handle)); -extern short far jdos_seek JPP((short handle, long offset)); -extern short far jdos_read JPP((short handle, void far * buffer, - unsigned short count)); -extern short far jdos_write JPP((short handle, void far * buffer, - unsigned short count)); -extern void far jxms_getdriver JPP((XMSDRIVER far *)); -extern void far jxms_calldriver JPP((XMSDRIVER, XMScontext far *)); -extern short far jems_available JPP((void)); -extern void far jems_calldriver JPP((EMScontext far *)); - - -/* - * Selection of a file name for a temporary file. - * This is highly system-dependent, and you may want to customize it. - */ - -static int next_file_num; /* to distinguish among several temp files */ - -LOCAL(void) -select_file_name (char * fname) -{ - const char * env; - char * ptr; - FILE * tfile; - - /* Keep generating file names till we find one that's not in use */ - for (;;) { - /* Get temp directory name from environment TMP or TEMP variable; - * if none, use "." - */ - if ((env = (const char *) getenv("TMP")) == NULL) - if ((env = (const char *) getenv("TEMP")) == NULL) - env = "."; - if (*env == '\0') /* null string means "." */ - env = "."; - ptr = fname; /* copy name to fname */ - while (*env != '\0') - *ptr++ = *env++; - if (ptr[-1] != '\\' && ptr[-1] != '/') - *ptr++ = '\\'; /* append backslash if not in env variable */ - /* Append a suitable file name */ - next_file_num++; /* advance counter */ - sprintf(ptr, "JPG%03d.TMP", next_file_num); - /* Probe to see if file name is already in use */ - if ((tfile = fopen(fname, READ_BINARY)) == NULL) - break; - fclose(tfile); /* oops, it's there; close tfile & try again */ - } -} - - -/* - * Near-memory allocation and freeing are controlled by the regular library - * routines malloc() and free(). - */ - -GLOBAL(void *) -jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void *) malloc(sizeofobject); -} - -GLOBAL(void) -jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) -{ - free(object); -} - - -/* - * "Large" objects are allocated in far memory, if possible - */ - -GLOBAL(void FAR *) -jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void FAR *) far_malloc(sizeofobject); -} - -GLOBAL(void) -jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) -{ - far_free(object); -} - - -/* - * This routine computes the total memory space available for allocation. - * It's impossible to do this in a portable way; our current solution is - * to make the user tell us (with a default value set at compile time). - * If you can actually get the available space, it's a good idea to subtract - * a slop factor of 5% or so. - */ - -#ifndef DEFAULT_MAX_MEM /* so can override from makefile */ -#define DEFAULT_MAX_MEM 300000L /* for total usage about 450K */ -#endif - -GLOBAL(long) -jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, - long max_bytes_needed, long already_allocated) -{ - return cinfo->mem->max_memory_to_use - already_allocated; -} - - -/* - * Backing store (temporary file) management. - * Backing store objects are only used when the value returned by - * jpeg_mem_available is less than the total space needed. You can dispense - * with these routines if you have plenty of virtual memory; see jmemnobs.c. - */ - -/* - * For MS-DOS we support three types of backing storage: - * 1. Conventional DOS files. We access these by direct DOS calls rather - * than via the stdio package. This provides a bit better performance, - * but the real reason is that the buffers to be read or written are FAR. - * The stdio library for small-data memory models can't cope with that. - * 2. Extended memory, accessed per the XMS V2.0 specification. - * 3. Expanded memory, accessed per the LIM/EMS 4.0 specification. - * You'll need copies of those specs to make sense of the related code. - * The specs are available by Internet FTP from the SIMTEL archives - * (oak.oakland.edu and its various mirror sites). See files - * pub/msdos/microsoft/xms20.arc and pub/msdos/info/limems41.zip. - */ - - -/* - * Access methods for a DOS file. - */ - - -METHODDEF(void) -read_file_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - if (jdos_seek(info->handle.file_handle, file_offset)) - ERREXIT(cinfo, JERR_TFILE_SEEK); - /* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */ - if (byte_count > 65535L) /* safety check */ - ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK); - if (jdos_read(info->handle.file_handle, buffer_address, - (unsigned short) byte_count)) - ERREXIT(cinfo, JERR_TFILE_READ); -} - - -METHODDEF(void) -write_file_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - if (jdos_seek(info->handle.file_handle, file_offset)) - ERREXIT(cinfo, JERR_TFILE_SEEK); - /* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */ - if (byte_count > 65535L) /* safety check */ - ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK); - if (jdos_write(info->handle.file_handle, buffer_address, - (unsigned short) byte_count)) - ERREXIT(cinfo, JERR_TFILE_WRITE); -} - - -METHODDEF(void) -close_file_store (j_common_ptr cinfo, backing_store_ptr info) -{ - jdos_close(info->handle.file_handle); /* close the file */ - remove(info->temp_name); /* delete the file */ -/* If your system doesn't have remove(), try unlink() instead. - * remove() is the ANSI-standard name for this function, but - * unlink() was more common in pre-ANSI systems. - */ - TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name); -} - - -LOCAL(boolean) -open_file_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - short handle; - - select_file_name(info->temp_name); - if (jdos_open((short far *) & handle, (char far *) info->temp_name)) { - /* might as well exit since jpeg_open_backing_store will fail anyway */ - ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); - return FALSE; - } - info->handle.file_handle = handle; - info->read_backing_store = read_file_store; - info->write_backing_store = write_file_store; - info->close_backing_store = close_file_store; - TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name); - return TRUE; /* succeeded */ -} - - -/* - * Access methods for extended memory. - */ - -#if XMS_SUPPORTED - -static XMSDRIVER xms_driver; /* saved address of XMS driver */ - -typedef union { /* either long offset or real-mode pointer */ - long offset; - void far * ptr; - } XMSPTR; - -typedef struct { /* XMS move specification structure */ - long length; - XMSH src_handle; - XMSPTR src; - XMSH dst_handle; - XMSPTR dst; - } XMSspec; - -#define ODD(X) (((X) & 1L) != 0) - - -METHODDEF(void) -read_xms_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - XMScontext ctx; - XMSspec spec; - char endbuffer[2]; - - /* The XMS driver can't cope with an odd length, so handle the last byte - * specially if byte_count is odd. We don't expect this to be common. - */ - - spec.length = byte_count & (~ 1L); - spec.src_handle = info->handle.xms_handle; - spec.src.offset = file_offset; - spec.dst_handle = 0; - spec.dst.ptr = buffer_address; - - ctx.ds_si = (void far *) & spec; - ctx.ax = 0x0b00; /* EMB move */ - jxms_calldriver(xms_driver, (XMScontext far *) & ctx); - if (ctx.ax != 1) - ERREXIT(cinfo, JERR_XMS_READ); - - if (ODD(byte_count)) { - read_xms_store(cinfo, info, (void FAR *) endbuffer, - file_offset + byte_count - 1L, 2L); - ((char FAR *) buffer_address)[byte_count - 1L] = endbuffer[0]; - } -} - - -METHODDEF(void) -write_xms_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - XMScontext ctx; - XMSspec spec; - char endbuffer[2]; - - /* The XMS driver can't cope with an odd length, so handle the last byte - * specially if byte_count is odd. We don't expect this to be common. - */ - - spec.length = byte_count & (~ 1L); - spec.src_handle = 0; - spec.src.ptr = buffer_address; - spec.dst_handle = info->handle.xms_handle; - spec.dst.offset = file_offset; - - ctx.ds_si = (void far *) & spec; - ctx.ax = 0x0b00; /* EMB move */ - jxms_calldriver(xms_driver, (XMScontext far *) & ctx); - if (ctx.ax != 1) - ERREXIT(cinfo, JERR_XMS_WRITE); - - if (ODD(byte_count)) { - read_xms_store(cinfo, info, (void FAR *) endbuffer, - file_offset + byte_count - 1L, 2L); - endbuffer[0] = ((char FAR *) buffer_address)[byte_count - 1L]; - write_xms_store(cinfo, info, (void FAR *) endbuffer, - file_offset + byte_count - 1L, 2L); - } -} - - -METHODDEF(void) -close_xms_store (j_common_ptr cinfo, backing_store_ptr info) -{ - XMScontext ctx; - - ctx.dx = info->handle.xms_handle; - ctx.ax = 0x0a00; - jxms_calldriver(xms_driver, (XMScontext far *) & ctx); - TRACEMS1(cinfo, 1, JTRC_XMS_CLOSE, info->handle.xms_handle); - /* we ignore any error return from the driver */ -} - - -LOCAL(boolean) -open_xms_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - XMScontext ctx; - - /* Get address of XMS driver */ - jxms_getdriver((XMSDRIVER far *) & xms_driver); - if (xms_driver == NULL) - return FALSE; /* no driver to be had */ - - /* Get version number, must be >= 2.00 */ - ctx.ax = 0x0000; - jxms_calldriver(xms_driver, (XMScontext far *) & ctx); - if (ctx.ax < (unsigned short) 0x0200) - return FALSE; - - /* Try to get space (expressed in kilobytes) */ - ctx.dx = (unsigned short) ((total_bytes_needed + 1023L) >> 10); - ctx.ax = 0x0900; - jxms_calldriver(xms_driver, (XMScontext far *) & ctx); - if (ctx.ax != 1) - return FALSE; - - /* Succeeded, save the handle and away we go */ - info->handle.xms_handle = ctx.dx; - info->read_backing_store = read_xms_store; - info->write_backing_store = write_xms_store; - info->close_backing_store = close_xms_store; - TRACEMS1(cinfo, 1, JTRC_XMS_OPEN, ctx.dx); - return TRUE; /* succeeded */ -} - -#endif /* XMS_SUPPORTED */ - - -/* - * Access methods for expanded memory. - */ - -#if EMS_SUPPORTED - -/* The EMS move specification structure requires word and long fields aligned - * at odd byte boundaries. Some compilers will align struct fields at even - * byte boundaries. While it's usually possible to force byte alignment, - * that causes an overall performance penalty and may pose problems in merging - * JPEG into a larger application. Instead we accept some rather dirty code - * here. Note this code would fail if the hardware did not allow odd-byte - * word & long accesses, but all 80x86 CPUs do. - */ - -typedef void far * EMSPTR; - -typedef union { /* EMS move specification structure */ - long length; /* It's easy to access first 4 bytes */ - char bytes[18]; /* Misaligned fields in here! */ - } EMSspec; - -/* Macros for accessing misaligned fields */ -#define FIELD_AT(spec,offset,type) (*((type *) &(spec.bytes[offset]))) -#define SRC_TYPE(spec) FIELD_AT(spec,4,char) -#define SRC_HANDLE(spec) FIELD_AT(spec,5,EMSH) -#define SRC_OFFSET(spec) FIELD_AT(spec,7,unsigned short) -#define SRC_PAGE(spec) FIELD_AT(spec,9,unsigned short) -#define SRC_PTR(spec) FIELD_AT(spec,7,EMSPTR) -#define DST_TYPE(spec) FIELD_AT(spec,11,char) -#define DST_HANDLE(spec) FIELD_AT(spec,12,EMSH) -#define DST_OFFSET(spec) FIELD_AT(spec,14,unsigned short) -#define DST_PAGE(spec) FIELD_AT(spec,16,unsigned short) -#define DST_PTR(spec) FIELD_AT(spec,14,EMSPTR) - -#define EMSPAGESIZE 16384L /* gospel, see the EMS specs */ - -#define HIBYTE(W) (((W) >> 8) & 0xFF) -#define LOBYTE(W) ((W) & 0xFF) - - -METHODDEF(void) -read_ems_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - EMScontext ctx; - EMSspec spec; - - spec.length = byte_count; - SRC_TYPE(spec) = 1; - SRC_HANDLE(spec) = info->handle.ems_handle; - SRC_PAGE(spec) = (unsigned short) (file_offset / EMSPAGESIZE); - SRC_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE); - DST_TYPE(spec) = 0; - DST_HANDLE(spec) = 0; - DST_PTR(spec) = buffer_address; - - ctx.ds_si = (void far *) & spec; - ctx.ax = 0x5700; /* move memory region */ - jems_calldriver((EMScontext far *) & ctx); - if (HIBYTE(ctx.ax) != 0) - ERREXIT(cinfo, JERR_EMS_READ); -} - - -METHODDEF(void) -write_ems_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - EMScontext ctx; - EMSspec spec; - - spec.length = byte_count; - SRC_TYPE(spec) = 0; - SRC_HANDLE(spec) = 0; - SRC_PTR(spec) = buffer_address; - DST_TYPE(spec) = 1; - DST_HANDLE(spec) = info->handle.ems_handle; - DST_PAGE(spec) = (unsigned short) (file_offset / EMSPAGESIZE); - DST_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE); - - ctx.ds_si = (void far *) & spec; - ctx.ax = 0x5700; /* move memory region */ - jems_calldriver((EMScontext far *) & ctx); - if (HIBYTE(ctx.ax) != 0) - ERREXIT(cinfo, JERR_EMS_WRITE); -} - - -METHODDEF(void) -close_ems_store (j_common_ptr cinfo, backing_store_ptr info) -{ - EMScontext ctx; - - ctx.ax = 0x4500; - ctx.dx = info->handle.ems_handle; - jems_calldriver((EMScontext far *) & ctx); - TRACEMS1(cinfo, 1, JTRC_EMS_CLOSE, info->handle.ems_handle); - /* we ignore any error return from the driver */ -} - - -LOCAL(boolean) -open_ems_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - EMScontext ctx; - - /* Is EMS driver there? */ - if (! jems_available()) - return FALSE; - - /* Get status, make sure EMS is OK */ - ctx.ax = 0x4000; - jems_calldriver((EMScontext far *) & ctx); - if (HIBYTE(ctx.ax) != 0) - return FALSE; - - /* Get version, must be >= 4.0 */ - ctx.ax = 0x4600; - jems_calldriver((EMScontext far *) & ctx); - if (HIBYTE(ctx.ax) != 0 || LOBYTE(ctx.ax) < 0x40) - return FALSE; - - /* Try to allocate requested space */ - ctx.ax = 0x4300; - ctx.bx = (unsigned short) ((total_bytes_needed + EMSPAGESIZE-1L) / EMSPAGESIZE); - jems_calldriver((EMScontext far *) & ctx); - if (HIBYTE(ctx.ax) != 0) - return FALSE; - - /* Succeeded, save the handle and away we go */ - info->handle.ems_handle = ctx.dx; - info->read_backing_store = read_ems_store; - info->write_backing_store = write_ems_store; - info->close_backing_store = close_ems_store; - TRACEMS1(cinfo, 1, JTRC_EMS_OPEN, ctx.dx); - return TRUE; /* succeeded */ -} - -#endif /* EMS_SUPPORTED */ - - -/* - * Initial opening of a backing-store object. - */ - -GLOBAL(void) -jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - /* Try extended memory, then expanded memory, then regular file. */ -#if XMS_SUPPORTED - if (open_xms_store(cinfo, info, total_bytes_needed)) - return; -#endif -#if EMS_SUPPORTED - if (open_ems_store(cinfo, info, total_bytes_needed)) - return; -#endif - if (open_file_store(cinfo, info, total_bytes_needed)) - return; - ERREXITS(cinfo, JERR_TFILE_CREATE, ""); -} - - -/* - * These routines take care of any system-dependent initialization and - * cleanup required. - */ - -GLOBAL(long) -jpeg_mem_init (j_common_ptr cinfo) -{ - next_file_num = 0; /* initialize temp file name generator */ - return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ -} - -GLOBAL(void) -jpeg_mem_term (j_common_ptr cinfo) -{ - /* Microsoft C, at least in v6.00A, will not successfully reclaim freed - * blocks of size > 32Kbytes unless we give it a kick in the rear, like so: - */ -#ifdef NEED_FHEAPMIN - _fheapmin(); -#endif -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jmemdosa.asm b/gtkmm-osx/trunk/jpeg-6b/jmemdosa.asm deleted file mode 100644 index ecd4372..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jmemdosa.asm +++ /dev/null @@ -1,379 +0,0 @@ -; -; jmemdosa.asm -; -; Copyright (C) 1992, Thomas G. Lane. -; This file is part of the Independent JPEG Group's software. -; For conditions of distribution and use, see the accompanying README file. -; -; This file contains low-level interface routines to support the MS-DOS -; backing store manager (jmemdos.c). Routines are provided to access disk -; files through direct DOS calls, and to access XMS and EMS drivers. -; -; This file should assemble with Microsoft's MASM or any compatible -; assembler (including Borland's Turbo Assembler). If you haven't got -; a compatible assembler, better fall back to jmemansi.c or jmemname.c. -; -; To minimize dependence on the C compiler's register usage conventions, -; we save and restore all 8086 registers, even though most compilers only -; require SI,DI,DS to be preserved. Also, we use only 16-bit-wide return -; values, which everybody returns in AX. -; -; Based on code contributed by Ge' Weijers. -; - -JMEMDOSA_TXT segment byte public 'CODE' - - assume cs:JMEMDOSA_TXT - - public _jdos_open - public _jdos_close - public _jdos_seek - public _jdos_read - public _jdos_write - public _jxms_getdriver - public _jxms_calldriver - public _jems_available - public _jems_calldriver - -; -; short far jdos_open (short far * handle, char far * filename) -; -; Create and open a temporary file -; -_jdos_open proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov cx,0 ; normal file attributes - lds dx,dword ptr [bp+10] ; get filename pointer - mov ah,3ch ; create file - int 21h - jc open_err ; if failed, return error code - lds bx,dword ptr [bp+6] ; get handle pointer - mov word ptr [bx],ax ; save the handle - xor ax,ax ; return zero for OK -open_err: pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jdos_open endp - - -; -; short far jdos_close (short handle) -; -; Close the file handle -; -_jdos_close proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov bx,word ptr [bp+6] ; file handle - mov ah,3eh ; close file - int 21h - jc close_err ; if failed, return error code - xor ax,ax ; return zero for OK -close_err: pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jdos_close endp - - -; -; short far jdos_seek (short handle, long offset) -; -; Set file position -; -_jdos_seek proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov bx,word ptr [bp+6] ; file handle - mov dx,word ptr [bp+8] ; LS offset - mov cx,word ptr [bp+10] ; MS offset - mov ax,4200h ; absolute seek - int 21h - jc seek_err ; if failed, return error code - xor ax,ax ; return zero for OK -seek_err: pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jdos_seek endp - - -; -; short far jdos_read (short handle, void far * buffer, unsigned short count) -; -; Read from file -; -_jdos_read proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov bx,word ptr [bp+6] ; file handle - lds dx,dword ptr [bp+8] ; buffer address - mov cx,word ptr [bp+12] ; number of bytes - mov ah,3fh ; read file - int 21h - jc read_err ; if failed, return error code - cmp ax,word ptr [bp+12] ; make sure all bytes were read - je read_ok - mov ax,1 ; else return 1 for not OK - jmp short read_err -read_ok: xor ax,ax ; return zero for OK -read_err: pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jdos_read endp - - -; -; short far jdos_write (short handle, void far * buffer, unsigned short count) -; -; Write to file -; -_jdos_write proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov bx,word ptr [bp+6] ; file handle - lds dx,dword ptr [bp+8] ; buffer address - mov cx,word ptr [bp+12] ; number of bytes - mov ah,40h ; write file - int 21h - jc write_err ; if failed, return error code - cmp ax,word ptr [bp+12] ; make sure all bytes written - je write_ok - mov ax,1 ; else return 1 for not OK - jmp short write_err -write_ok: xor ax,ax ; return zero for OK -write_err: pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jdos_write endp - - -; -; void far jxms_getdriver (XMSDRIVER far *) -; -; Get the address of the XMS driver, or NULL if not available -; -_jxms_getdriver proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov ax,4300h ; call multiplex interrupt with - int 2fh ; a magic cookie, hex 4300 - cmp al,80h ; AL should contain hex 80 - je xmsavail - xor dx,dx ; no XMS driver available - xor ax,ax ; return a nil pointer - jmp short xmsavail_done -xmsavail: mov ax,4310h ; fetch driver address with - int 2fh ; another magic cookie - mov dx,es ; copy address to dx:ax - mov ax,bx -xmsavail_done: les bx,dword ptr [bp+6] ; get pointer to return value - mov word ptr es:[bx],ax - mov word ptr es:[bx+2],dx - pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jxms_getdriver endp - - -; -; void far jxms_calldriver (XMSDRIVER, XMScontext far *) -; -; The XMScontext structure contains values for the AX,DX,BX,SI,DS registers. -; These are loaded, the XMS call is performed, and the new values of the -; AX,DX,BX registers are written back to the context structure. -; -_jxms_calldriver proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - les bx,dword ptr [bp+10] ; get XMScontext pointer - mov ax,word ptr es:[bx] ; load registers - mov dx,word ptr es:[bx+2] - mov si,word ptr es:[bx+6] - mov ds,word ptr es:[bx+8] - mov bx,word ptr es:[bx+4] - call dword ptr [bp+6] ; call the driver - mov cx,bx ; save returned BX for a sec - les bx,dword ptr [bp+10] ; get XMScontext pointer - mov word ptr es:[bx],ax ; put back ax,dx,bx - mov word ptr es:[bx+2],dx - mov word ptr es:[bx+4],cx - pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jxms_calldriver endp - - -; -; short far jems_available (void) -; -; Have we got an EMS driver? (this comes straight from the EMS 4.0 specs) -; -_jems_available proc far - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - mov ax,3567h ; get interrupt vector 67h - int 21h - push cs - pop ds - mov di,000ah ; check offs 10 in returned seg - lea si,ASCII_device_name ; against literal string - mov cx,8 - cld - repe cmpsb - jne no_ems - mov ax,1 ; match, it's there - jmp short avail_done -no_ems: xor ax,ax ; it's not there -avail_done: pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - ret - -ASCII_device_name db "EMMXXXX0" - -_jems_available endp - - -; -; void far jems_calldriver (EMScontext far *) -; -; The EMScontext structure contains values for the AX,DX,BX,SI,DS registers. -; These are loaded, the EMS trap is performed, and the new values of the -; AX,DX,BX registers are written back to the context structure. -; -_jems_calldriver proc far - push bp ; linkage - mov bp,sp - push si ; save all registers for safety - push di - push bx - push cx - push dx - push es - push ds - les bx,dword ptr [bp+6] ; get EMScontext pointer - mov ax,word ptr es:[bx] ; load registers - mov dx,word ptr es:[bx+2] - mov si,word ptr es:[bx+6] - mov ds,word ptr es:[bx+8] - mov bx,word ptr es:[bx+4] - int 67h ; call the EMS driver - mov cx,bx ; save returned BX for a sec - les bx,dword ptr [bp+6] ; get EMScontext pointer - mov word ptr es:[bx],ax ; put back ax,dx,bx - mov word ptr es:[bx+2],dx - mov word ptr es:[bx+4],cx - pop ds ; restore registers and exit - pop es - pop dx - pop cx - pop bx - pop di - pop si - pop bp - ret -_jems_calldriver endp - -JMEMDOSA_TXT ends - - end diff --git a/gtkmm-osx/trunk/jpeg-6b/jmemmac.c b/gtkmm-osx/trunk/jpeg-6b/jmemmac.c deleted file mode 100644 index 106f9be..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jmemmac.c +++ /dev/null @@ -1,289 +0,0 @@ -/* - * jmemmac.c - * - * Copyright (C) 1992-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * jmemmac.c provides an Apple Macintosh implementation of the system- - * dependent portion of the JPEG memory manager. - * - * If you use jmemmac.c, then you must define USE_MAC_MEMMGR in the - * JPEG_INTERNALS part of jconfig.h. - * - * jmemmac.c uses the Macintosh toolbox routines NewPtr and DisposePtr - * instead of malloc and free. It accurately determines the amount of - * memory available by using CompactMem. Notice that if left to its - * own devices, this code can chew up all available space in the - * application's zone, with the exception of the rather small "slop" - * factor computed in jpeg_mem_available(). The application can ensure - * that more space is left over by reducing max_memory_to_use. - * - * Large images are swapped to disk using temporary files and System 7.0+'s - * temporary folder functionality. - * - * Note that jmemmac.c depends on two features of MacOS that were first - * introduced in System 7: FindFolder and the FSSpec-based calls. - * If your application uses jmemmac.c and is run under System 6 or earlier, - * and the jpeg library decides it needs a temporary file, it will abort, - * printing error messages about requiring System 7. (If no temporary files - * are created, it will run fine.) - * - * If you want to use jmemmac.c in an application that might be used with - * System 6 or earlier, then you should remove dependencies on FindFolder - * and the FSSpec calls. You will need to replace FindFolder with some - * other mechanism for finding a place to put temporary files, and you - * should replace the FSSpec calls with their HFS equivalents: - * - * FSpDelete -> HDelete - * FSpGetFInfo -> HGetFInfo - * FSpCreate -> HCreate - * FSpOpenDF -> HOpen *** Note: not HOpenDF *** - * FSMakeFSSpec -> (fill in spec by hand.) - * - * (Use HOpen instead of HOpenDF. HOpen is just a glue-interface to PBHOpen, - * which is on all HFS macs. HOpenDF is a System 7 addition which avoids the - * ages-old problem of names starting with a period.) - * - * Contributed by Sam Bushell (jsam@iagu.on.net) and - * Dan Gildor (gyld@in-touch.com). - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jmemsys.h" /* import the system-dependent declarations */ - -#ifndef USE_MAC_MEMMGR /* make sure user got configuration right */ - You forgot to define USE_MAC_MEMMGR in jconfig.h. /* deliberate syntax error */ -#endif - -#include /* we use the MacOS memory manager */ -#include /* we use the MacOS File stuff */ -#include /* we use the MacOS HFS stuff */ -#include /* for smSystemScript */ -#include /* we use Gestalt to test for specific functionality */ - -#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */ -#define TEMP_FILE_NAME "JPG%03d.TMP" -#endif - -static int next_file_num; /* to distinguish among several temp files */ - - -/* - * Memory allocation and freeing are controlled by the MacOS library - * routines NewPtr() and DisposePtr(), which allocate fixed-address - * storage. Unfortunately, the IJG library isn't smart enough to cope - * with relocatable storage. - */ - -GLOBAL(void *) -jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void *) NewPtr(sizeofobject); -} - -GLOBAL(void) -jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) -{ - DisposePtr((Ptr) object); -} - - -/* - * "Large" objects are treated the same as "small" ones. - * NB: we include FAR keywords in the routine declarations simply for - * consistency with the rest of the IJG code; FAR should expand to empty - * on rational architectures like the Mac. - */ - -GLOBAL(void FAR *) -jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void FAR *) NewPtr(sizeofobject); -} - -GLOBAL(void) -jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) -{ - DisposePtr((Ptr) object); -} - - -/* - * This routine computes the total memory space available for allocation. - */ - -GLOBAL(long) -jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, - long max_bytes_needed, long already_allocated) -{ - long limit = cinfo->mem->max_memory_to_use - already_allocated; - long slop, mem; - - /* Don't ask for more than what application has told us we may use */ - if (max_bytes_needed > limit && limit > 0) - max_bytes_needed = limit; - /* Find whether there's a big enough free block in the heap. - * CompactMem tries to create a contiguous block of the requested size, - * and then returns the size of the largest free block (which could be - * much more or much less than we asked for). - * We add some slop to ensure we don't use up all available memory. - */ - slop = max_bytes_needed / 16 + 32768L; - mem = CompactMem(max_bytes_needed + slop) - slop; - if (mem < 0) - mem = 0; /* sigh, couldn't even get the slop */ - /* Don't take more than the application says we can have */ - if (mem > limit && limit > 0) - mem = limit; - return mem; -} - - -/* - * Backing store (temporary file) management. - * Backing store objects are only used when the value returned by - * jpeg_mem_available is less than the total space needed. You can dispense - * with these routines if you have plenty of virtual memory; see jmemnobs.c. - */ - - -METHODDEF(void) -read_backing_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - long bytes = byte_count; - long retVal; - - if ( SetFPos ( info->temp_file, fsFromStart, file_offset ) != noErr ) - ERREXIT(cinfo, JERR_TFILE_SEEK); - - retVal = FSRead ( info->temp_file, &bytes, - (unsigned char *) buffer_address ); - if ( retVal != noErr || bytes != byte_count ) - ERREXIT(cinfo, JERR_TFILE_READ); -} - - -METHODDEF(void) -write_backing_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - long bytes = byte_count; - long retVal; - - if ( SetFPos ( info->temp_file, fsFromStart, file_offset ) != noErr ) - ERREXIT(cinfo, JERR_TFILE_SEEK); - - retVal = FSWrite ( info->temp_file, &bytes, - (unsigned char *) buffer_address ); - if ( retVal != noErr || bytes != byte_count ) - ERREXIT(cinfo, JERR_TFILE_WRITE); -} - - -METHODDEF(void) -close_backing_store (j_common_ptr cinfo, backing_store_ptr info) -{ - FSClose ( info->temp_file ); - FSpDelete ( &(info->tempSpec) ); -} - - -/* - * Initial opening of a backing-store object. - * - * This version uses FindFolder to find the Temporary Items folder, - * and puts the temporary file in there. - */ - -GLOBAL(void) -jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - short tmpRef, vRefNum; - long dirID; - FInfo finderInfo; - FSSpec theSpec; - Str255 fName; - OSErr osErr; - long gestaltResponse = 0; - - /* Check that FSSpec calls are available. */ - osErr = Gestalt( gestaltFSAttr, &gestaltResponse ); - if ( ( osErr != noErr ) - || !( gestaltResponse & (1<temp_name, TEMP_FILE_NAME, next_file_num); - strcpy ( (Ptr)fName+1, info->temp_name ); - *fName = strlen (info->temp_name); - osErr = FSMakeFSSpec ( vRefNum, dirID, fName, &theSpec ); - - if ( (osErr = FSpGetFInfo ( &theSpec, &finderInfo ) ) != noErr ) - break; - } - - osErr = FSpCreate ( &theSpec, '????', '????', smSystemScript ); - if ( osErr != noErr ) - ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); - - osErr = FSpOpenDF ( &theSpec, fsRdWrPerm, &(info->temp_file) ); - if ( osErr != noErr ) - ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); - - info->tempSpec = theSpec; - - info->read_backing_store = read_backing_store; - info->write_backing_store = write_backing_store; - info->close_backing_store = close_backing_store; - TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name); -} - - -/* - * These routines take care of any system-dependent initialization and - * cleanup required. - */ - -GLOBAL(long) -jpeg_mem_init (j_common_ptr cinfo) -{ - next_file_num = 0; - - /* max_memory_to_use will be initialized to FreeMem()'s result; - * the calling application might later reduce it, for example - * to leave room to invoke multiple JPEG objects. - * Note that FreeMem returns the total number of free bytes; - * it may not be possible to allocate a single block of this size. - */ - return FreeMem(); -} - -GLOBAL(void) -jpeg_mem_term (j_common_ptr cinfo) -{ - /* no work */ -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jmemmgr.c b/gtkmm-osx/trunk/jpeg-6b/jmemmgr.c deleted file mode 100644 index d801b32..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jmemmgr.c +++ /dev/null @@ -1,1118 +0,0 @@ -/* - * jmemmgr.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains the JPEG system-independent memory management - * routines. This code is usable across a wide variety of machines; most - * of the system dependencies have been isolated in a separate file. - * The major functions provided here are: - * * pool-based allocation and freeing of memory; - * * policy decisions about how to divide available memory among the - * virtual arrays; - * * control logic for swapping virtual arrays between main memory and - * backing storage. - * The separate system-dependent file provides the actual backing-storage - * access code, and it contains the policy decision about how much total - * main memory to use. - * This file is system-dependent in the sense that some of its functions - * are unnecessary in some systems. For example, if there is enough virtual - * memory so that backing storage will never be used, much of the virtual - * array control logic could be removed. (Of course, if you have that much - * memory then you shouldn't care about a little bit of unused code...) - */ - -#define JPEG_INTERNALS -#define AM_MEMORY_MANAGER /* we define jvirt_Xarray_control structs */ -#include "jinclude.h" -#include "jpeglib.h" -#include "jmemsys.h" /* import the system-dependent declarations */ - -#ifndef NO_GETENV -#ifndef HAVE_STDLIB_H /* should declare getenv() */ -extern char * getenv JPP((const char * name)); -#endif -#endif - - -/* - * Some important notes: - * The allocation routines provided here must never return NULL. - * They should exit to error_exit if unsuccessful. - * - * It's not a good idea to try to merge the sarray and barray routines, - * even though they are textually almost the same, because samples are - * usually stored as bytes while coefficients are shorts or ints. Thus, - * in machines where byte pointers have a different representation from - * word pointers, the resulting machine code could not be the same. - */ - - -/* - * Many machines require storage alignment: longs must start on 4-byte - * boundaries, doubles on 8-byte boundaries, etc. On such machines, malloc() - * always returns pointers that are multiples of the worst-case alignment - * requirement, and we had better do so too. - * There isn't any really portable way to determine the worst-case alignment - * requirement. This module assumes that the alignment requirement is - * multiples of sizeof(ALIGN_TYPE). - * By default, we define ALIGN_TYPE as double. This is necessary on some - * workstations (where doubles really do need 8-byte alignment) and will work - * fine on nearly everything. If your machine has lesser alignment needs, - * you can save a few bytes by making ALIGN_TYPE smaller. - * The only place I know of where this will NOT work is certain Macintosh - * 680x0 compilers that define double as a 10-byte IEEE extended float. - * Doing 10-byte alignment is counterproductive because longwords won't be - * aligned well. Put "#define ALIGN_TYPE long" in jconfig.h if you have - * such a compiler. - */ - -#ifndef ALIGN_TYPE /* so can override from jconfig.h */ -#define ALIGN_TYPE double -#endif - - -/* - * We allocate objects from "pools", where each pool is gotten with a single - * request to jpeg_get_small() or jpeg_get_large(). There is no per-object - * overhead within a pool, except for alignment padding. Each pool has a - * header with a link to the next pool of the same class. - * Small and large pool headers are identical except that the latter's - * link pointer must be FAR on 80x86 machines. - * Notice that the "real" header fields are union'ed with a dummy ALIGN_TYPE - * field. This forces the compiler to make SIZEOF(small_pool_hdr) a multiple - * of the alignment requirement of ALIGN_TYPE. - */ - -typedef union small_pool_struct * small_pool_ptr; - -typedef union small_pool_struct { - struct { - small_pool_ptr next; /* next in list of pools */ - size_t bytes_used; /* how many bytes already used within pool */ - size_t bytes_left; /* bytes still available in this pool */ - } hdr; - ALIGN_TYPE dummy; /* included in union to ensure alignment */ -} small_pool_hdr; - -typedef union large_pool_struct FAR * large_pool_ptr; - -typedef union large_pool_struct { - struct { - large_pool_ptr next; /* next in list of pools */ - size_t bytes_used; /* how many bytes already used within pool */ - size_t bytes_left; /* bytes still available in this pool */ - } hdr; - ALIGN_TYPE dummy; /* included in union to ensure alignment */ -} large_pool_hdr; - - -/* - * Here is the full definition of a memory manager object. - */ - -typedef struct { - struct jpeg_memory_mgr pub; /* public fields */ - - /* Each pool identifier (lifetime class) names a linked list of pools. */ - small_pool_ptr small_list[JPOOL_NUMPOOLS]; - large_pool_ptr large_list[JPOOL_NUMPOOLS]; - - /* Since we only have one lifetime class of virtual arrays, only one - * linked list is necessary (for each datatype). Note that the virtual - * array control blocks being linked together are actually stored somewhere - * in the small-pool list. - */ - jvirt_sarray_ptr virt_sarray_list; - jvirt_barray_ptr virt_barray_list; - - /* This counts total space obtained from jpeg_get_small/large */ - long total_space_allocated; - - /* alloc_sarray and alloc_barray set this value for use by virtual - * array routines. - */ - JDIMENSION last_rowsperchunk; /* from most recent alloc_sarray/barray */ -} my_memory_mgr; - -typedef my_memory_mgr * my_mem_ptr; - - -/* - * The control blocks for virtual arrays. - * Note that these blocks are allocated in the "small" pool area. - * System-dependent info for the associated backing store (if any) is hidden - * inside the backing_store_info struct. - */ - -struct jvirt_sarray_control { - JSAMPARRAY mem_buffer; /* => the in-memory buffer */ - JDIMENSION rows_in_array; /* total virtual array height */ - JDIMENSION samplesperrow; /* width of array (and of memory buffer) */ - JDIMENSION maxaccess; /* max rows accessed by access_virt_sarray */ - JDIMENSION rows_in_mem; /* height of memory buffer */ - JDIMENSION rowsperchunk; /* allocation chunk size in mem_buffer */ - JDIMENSION cur_start_row; /* first logical row # in the buffer */ - JDIMENSION first_undef_row; /* row # of first uninitialized row */ - boolean pre_zero; /* pre-zero mode requested? */ - boolean dirty; /* do current buffer contents need written? */ - boolean b_s_open; /* is backing-store data valid? */ - jvirt_sarray_ptr next; /* link to next virtual sarray control block */ - backing_store_info b_s_info; /* System-dependent control info */ -}; - -struct jvirt_barray_control { - JBLOCKARRAY mem_buffer; /* => the in-memory buffer */ - JDIMENSION rows_in_array; /* total virtual array height */ - JDIMENSION blocksperrow; /* width of array (and of memory buffer) */ - JDIMENSION maxaccess; /* max rows accessed by access_virt_barray */ - JDIMENSION rows_in_mem; /* height of memory buffer */ - JDIMENSION rowsperchunk; /* allocation chunk size in mem_buffer */ - JDIMENSION cur_start_row; /* first logical row # in the buffer */ - JDIMENSION first_undef_row; /* row # of first uninitialized row */ - boolean pre_zero; /* pre-zero mode requested? */ - boolean dirty; /* do current buffer contents need written? */ - boolean b_s_open; /* is backing-store data valid? */ - jvirt_barray_ptr next; /* link to next virtual barray control block */ - backing_store_info b_s_info; /* System-dependent control info */ -}; - - -#ifdef MEM_STATS /* optional extra stuff for statistics */ - -LOCAL(void) -print_mem_stats (j_common_ptr cinfo, int pool_id) -{ - my_mem_ptr mem = (my_mem_ptr) cinfo->mem; - small_pool_ptr shdr_ptr; - large_pool_ptr lhdr_ptr; - - /* Since this is only a debugging stub, we can cheat a little by using - * fprintf directly rather than going through the trace message code. - * This is helpful because message parm array can't handle longs. - */ - fprintf(stderr, "Freeing pool %d, total space = %ld\n", - pool_id, mem->total_space_allocated); - - for (lhdr_ptr = mem->large_list[pool_id]; lhdr_ptr != NULL; - lhdr_ptr = lhdr_ptr->hdr.next) { - fprintf(stderr, " Large chunk used %ld\n", - (long) lhdr_ptr->hdr.bytes_used); - } - - for (shdr_ptr = mem->small_list[pool_id]; shdr_ptr != NULL; - shdr_ptr = shdr_ptr->hdr.next) { - fprintf(stderr, " Small chunk used %ld free %ld\n", - (long) shdr_ptr->hdr.bytes_used, - (long) shdr_ptr->hdr.bytes_left); - } -} - -#endif /* MEM_STATS */ - - -LOCAL(void) -out_of_memory (j_common_ptr cinfo, int which) -/* Report an out-of-memory error and stop execution */ -/* If we compiled MEM_STATS support, report alloc requests before dying */ -{ -#ifdef MEM_STATS - cinfo->err->trace_level = 2; /* force self_destruct to report stats */ -#endif - ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, which); -} - - -/* - * Allocation of "small" objects. - * - * For these, we use pooled storage. When a new pool must be created, - * we try to get enough space for the current request plus a "slop" factor, - * where the slop will be the amount of leftover space in the new pool. - * The speed vs. space tradeoff is largely determined by the slop values. - * A different slop value is provided for each pool class (lifetime), - * and we also distinguish the first pool of a class from later ones. - * NOTE: the values given work fairly well on both 16- and 32-bit-int - * machines, but may be too small if longs are 64 bits or more. - */ - -static const size_t first_pool_slop[JPOOL_NUMPOOLS] = -{ - 1600, /* first PERMANENT pool */ - 16000 /* first IMAGE pool */ -}; - -static const size_t extra_pool_slop[JPOOL_NUMPOOLS] = -{ - 0, /* additional PERMANENT pools */ - 5000 /* additional IMAGE pools */ -}; - -#define MIN_SLOP 50 /* greater than 0 to avoid futile looping */ - - -METHODDEF(void *) -alloc_small (j_common_ptr cinfo, int pool_id, size_t sizeofobject) -/* Allocate a "small" object */ -{ - my_mem_ptr mem = (my_mem_ptr) cinfo->mem; - small_pool_ptr hdr_ptr, prev_hdr_ptr; - char * data_ptr; - size_t odd_bytes, min_request, slop; - - /* Check for unsatisfiable request (do now to ensure no overflow below) */ - if (sizeofobject > (size_t) (MAX_ALLOC_CHUNK-SIZEOF(small_pool_hdr))) - out_of_memory(cinfo, 1); /* request exceeds malloc's ability */ - - /* Round up the requested size to a multiple of SIZEOF(ALIGN_TYPE) */ - odd_bytes = sizeofobject % SIZEOF(ALIGN_TYPE); - if (odd_bytes > 0) - sizeofobject += SIZEOF(ALIGN_TYPE) - odd_bytes; - - /* See if space is available in any existing pool */ - if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS) - ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ - prev_hdr_ptr = NULL; - hdr_ptr = mem->small_list[pool_id]; - while (hdr_ptr != NULL) { - if (hdr_ptr->hdr.bytes_left >= sizeofobject) - break; /* found pool with enough space */ - prev_hdr_ptr = hdr_ptr; - hdr_ptr = hdr_ptr->hdr.next; - } - - /* Time to make a new pool? */ - if (hdr_ptr == NULL) { - /* min_request is what we need now, slop is what will be leftover */ - min_request = sizeofobject + SIZEOF(small_pool_hdr); - if (prev_hdr_ptr == NULL) /* first pool in class? */ - slop = first_pool_slop[pool_id]; - else - slop = extra_pool_slop[pool_id]; - /* Don't ask for more than MAX_ALLOC_CHUNK */ - if (slop > (size_t) (MAX_ALLOC_CHUNK-min_request)) - slop = (size_t) (MAX_ALLOC_CHUNK-min_request); - /* Try to get space, if fail reduce slop and try again */ - for (;;) { - hdr_ptr = (small_pool_ptr) jpeg_get_small(cinfo, min_request + slop); - if (hdr_ptr != NULL) - break; - slop /= 2; - if (slop < MIN_SLOP) /* give up when it gets real small */ - out_of_memory(cinfo, 2); /* jpeg_get_small failed */ - } - mem->total_space_allocated += min_request + slop; - /* Success, initialize the new pool header and add to end of list */ - hdr_ptr->hdr.next = NULL; - hdr_ptr->hdr.bytes_used = 0; - hdr_ptr->hdr.bytes_left = sizeofobject + slop; - if (prev_hdr_ptr == NULL) /* first pool in class? */ - mem->small_list[pool_id] = hdr_ptr; - else - prev_hdr_ptr->hdr.next = hdr_ptr; - } - - /* OK, allocate the object from the current pool */ - data_ptr = (char *) (hdr_ptr + 1); /* point to first data byte in pool */ - data_ptr += hdr_ptr->hdr.bytes_used; /* point to place for object */ - hdr_ptr->hdr.bytes_used += sizeofobject; - hdr_ptr->hdr.bytes_left -= sizeofobject; - - return (void *) data_ptr; -} - - -/* - * Allocation of "large" objects. - * - * The external semantics of these are the same as "small" objects, - * except that FAR pointers are used on 80x86. However the pool - * management heuristics are quite different. We assume that each - * request is large enough that it may as well be passed directly to - * jpeg_get_large; the pool management just links everything together - * so that we can free it all on demand. - * Note: the major use of "large" objects is in JSAMPARRAY and JBLOCKARRAY - * structures. The routines that create these structures (see below) - * deliberately bunch rows together to ensure a large request size. - */ - -METHODDEF(void FAR *) -alloc_large (j_common_ptr cinfo, int pool_id, size_t sizeofobject) -/* Allocate a "large" object */ -{ - my_mem_ptr mem = (my_mem_ptr) cinfo->mem; - large_pool_ptr hdr_ptr; - size_t odd_bytes; - - /* Check for unsatisfiable request (do now to ensure no overflow below) */ - if (sizeofobject > (size_t) (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr))) - out_of_memory(cinfo, 3); /* request exceeds malloc's ability */ - - /* Round up the requested size to a multiple of SIZEOF(ALIGN_TYPE) */ - odd_bytes = sizeofobject % SIZEOF(ALIGN_TYPE); - if (odd_bytes > 0) - sizeofobject += SIZEOF(ALIGN_TYPE) - odd_bytes; - - /* Always make a new pool */ - if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS) - ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ - - hdr_ptr = (large_pool_ptr) jpeg_get_large(cinfo, sizeofobject + - SIZEOF(large_pool_hdr)); - if (hdr_ptr == NULL) - out_of_memory(cinfo, 4); /* jpeg_get_large failed */ - mem->total_space_allocated += sizeofobject + SIZEOF(large_pool_hdr); - - /* Success, initialize the new pool header and add to list */ - hdr_ptr->hdr.next = mem->large_list[pool_id]; - /* We maintain space counts in each pool header for statistical purposes, - * even though they are not needed for allocation. - */ - hdr_ptr->hdr.bytes_used = sizeofobject; - hdr_ptr->hdr.bytes_left = 0; - mem->large_list[pool_id] = hdr_ptr; - - return (void FAR *) (hdr_ptr + 1); /* point to first data byte in pool */ -} - - -/* - * Creation of 2-D sample arrays. - * The pointers are in near heap, the samples themselves in FAR heap. - * - * To minimize allocation overhead and to allow I/O of large contiguous - * blocks, we allocate the sample rows in groups of as many rows as possible - * without exceeding MAX_ALLOC_CHUNK total bytes per allocation request. - * NB: the virtual array control routines, later in this file, know about - * this chunking of rows. The rowsperchunk value is left in the mem manager - * object so that it can be saved away if this sarray is the workspace for - * a virtual array. - */ - -METHODDEF(JSAMPARRAY) -alloc_sarray (j_common_ptr cinfo, int pool_id, - JDIMENSION samplesperrow, JDIMENSION numrows) -/* Allocate a 2-D sample array */ -{ - my_mem_ptr mem = (my_mem_ptr) cinfo->mem; - JSAMPARRAY result; - JSAMPROW workspace; - JDIMENSION rowsperchunk, currow, i; - long ltemp; - - /* Calculate max # of rows allowed in one allocation chunk */ - ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) / - ((long) samplesperrow * SIZEOF(JSAMPLE)); - if (ltemp <= 0) - ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); - if (ltemp < (long) numrows) - rowsperchunk = (JDIMENSION) ltemp; - else - rowsperchunk = numrows; - mem->last_rowsperchunk = rowsperchunk; - - /* Get space for row pointers (small object) */ - result = (JSAMPARRAY) alloc_small(cinfo, pool_id, - (size_t) (numrows * SIZEOF(JSAMPROW))); - - /* Get the rows themselves (large objects) */ - currow = 0; - while (currow < numrows) { - rowsperchunk = MIN(rowsperchunk, numrows - currow); - workspace = (JSAMPROW) alloc_large(cinfo, pool_id, - (size_t) ((size_t) rowsperchunk * (size_t) samplesperrow - * SIZEOF(JSAMPLE))); - for (i = rowsperchunk; i > 0; i--) { - result[currow++] = workspace; - workspace += samplesperrow; - } - } - - return result; -} - - -/* - * Creation of 2-D coefficient-block arrays. - * This is essentially the same as the code for sample arrays, above. - */ - -METHODDEF(JBLOCKARRAY) -alloc_barray (j_common_ptr cinfo, int pool_id, - JDIMENSION blocksperrow, JDIMENSION numrows) -/* Allocate a 2-D coefficient-block array */ -{ - my_mem_ptr mem = (my_mem_ptr) cinfo->mem; - JBLOCKARRAY result; - JBLOCKROW workspace; - JDIMENSION rowsperchunk, currow, i; - long ltemp; - - /* Calculate max # of rows allowed in one allocation chunk */ - ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) / - ((long) blocksperrow * SIZEOF(JBLOCK)); - if (ltemp <= 0) - ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); - if (ltemp < (long) numrows) - rowsperchunk = (JDIMENSION) ltemp; - else - rowsperchunk = numrows; - mem->last_rowsperchunk = rowsperchunk; - - /* Get space for row pointers (small object) */ - result = (JBLOCKARRAY) alloc_small(cinfo, pool_id, - (size_t) (numrows * SIZEOF(JBLOCKROW))); - - /* Get the rows themselves (large objects) */ - currow = 0; - while (currow < numrows) { - rowsperchunk = MIN(rowsperchunk, numrows - currow); - workspace = (JBLOCKROW) alloc_large(cinfo, pool_id, - (size_t) ((size_t) rowsperchunk * (size_t) blocksperrow - * SIZEOF(JBLOCK))); - for (i = rowsperchunk; i > 0; i--) { - result[currow++] = workspace; - workspace += blocksperrow; - } - } - - return result; -} - - -/* - * About virtual array management: - * - * The above "normal" array routines are only used to allocate strip buffers - * (as wide as the image, but just a few rows high). Full-image-sized buffers - * are handled as "virtual" arrays. The array is still accessed a strip at a - * time, but the memory manager must save the whole array for repeated - * accesses. The intended implementation is that there is a strip buffer in - * memory (as high as is possible given the desired memory limit), plus a - * backing file that holds the rest of the array. - * - * The request_virt_array routines are told the total size of the image and - * the maximum number of rows that will be accessed at once. The in-memory - * buffer must be at least as large as the maxaccess value. - * - * The request routines create control blocks but not the in-memory buffers. - * That is postponed until realize_virt_arrays is called. At that time the - * total amount of space needed is known (approximately, anyway), so free - * memory can be divided up fairly. - * - * The access_virt_array routines are responsible for making a specific strip - * area accessible (after reading or writing the backing file, if necessary). - * Note that the access routines are told whether the caller intends to modify - * the accessed strip; during a read-only pass this saves having to rewrite - * data to disk. The access routines are also responsible for pre-zeroing - * any newly accessed rows, if pre-zeroing was requested. - * - * In current usage, the access requests are usually for nonoverlapping - * strips; that is, successive access start_row numbers differ by exactly - * num_rows = maxaccess. This means we can get good performance with simple - * buffer dump/reload logic, by making the in-memory buffer be a multiple - * of the access height; then there will never be accesses across bufferload - * boundaries. The code will still work with overlapping access requests, - * but it doesn't handle bufferload overlaps very efficiently. - */ - - -METHODDEF(jvirt_sarray_ptr) -request_virt_sarray (j_common_ptr cinfo, int pool_id, boolean pre_zero, - JDIMENSION samplesperrow, JDIMENSION numrows, - JDIMENSION maxaccess) -/* Request a virtual 2-D sample array */ -{ - my_mem_ptr mem = (my_mem_ptr) cinfo->mem; - jvirt_sarray_ptr result; - - /* Only IMAGE-lifetime virtual arrays are currently supported */ - if (pool_id != JPOOL_IMAGE) - ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ - - /* get control block */ - result = (jvirt_sarray_ptr) alloc_small(cinfo, pool_id, - SIZEOF(struct jvirt_sarray_control)); - - result->mem_buffer = NULL; /* marks array not yet realized */ - result->rows_in_array = numrows; - result->samplesperrow = samplesperrow; - result->maxaccess = maxaccess; - result->pre_zero = pre_zero; - result->b_s_open = FALSE; /* no associated backing-store object */ - result->next = mem->virt_sarray_list; /* add to list of virtual arrays */ - mem->virt_sarray_list = result; - - return result; -} - - -METHODDEF(jvirt_barray_ptr) -request_virt_barray (j_common_ptr cinfo, int pool_id, boolean pre_zero, - JDIMENSION blocksperrow, JDIMENSION numrows, - JDIMENSION maxaccess) -/* Request a virtual 2-D coefficient-block array */ -{ - my_mem_ptr mem = (my_mem_ptr) cinfo->mem; - jvirt_barray_ptr result; - - /* Only IMAGE-lifetime virtual arrays are currently supported */ - if (pool_id != JPOOL_IMAGE) - ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ - - /* get control block */ - result = (jvirt_barray_ptr) alloc_small(cinfo, pool_id, - SIZEOF(struct jvirt_barray_control)); - - result->mem_buffer = NULL; /* marks array not yet realized */ - result->rows_in_array = numrows; - result->blocksperrow = blocksperrow; - result->maxaccess = maxaccess; - result->pre_zero = pre_zero; - result->b_s_open = FALSE; /* no associated backing-store object */ - result->next = mem->virt_barray_list; /* add to list of virtual arrays */ - mem->virt_barray_list = result; - - return result; -} - - -METHODDEF(void) -realize_virt_arrays (j_common_ptr cinfo) -/* Allocate the in-memory buffers for any unrealized virtual arrays */ -{ - my_mem_ptr mem = (my_mem_ptr) cinfo->mem; - long space_per_minheight, maximum_space, avail_mem; - long minheights, max_minheights; - jvirt_sarray_ptr sptr; - jvirt_barray_ptr bptr; - - /* Compute the minimum space needed (maxaccess rows in each buffer) - * and the maximum space needed (full image height in each buffer). - * These may be of use to the system-dependent jpeg_mem_available routine. - */ - space_per_minheight = 0; - maximum_space = 0; - for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { - if (sptr->mem_buffer == NULL) { /* if not realized yet */ - space_per_minheight += (long) sptr->maxaccess * - (long) sptr->samplesperrow * SIZEOF(JSAMPLE); - maximum_space += (long) sptr->rows_in_array * - (long) sptr->samplesperrow * SIZEOF(JSAMPLE); - } - } - for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { - if (bptr->mem_buffer == NULL) { /* if not realized yet */ - space_per_minheight += (long) bptr->maxaccess * - (long) bptr->blocksperrow * SIZEOF(JBLOCK); - maximum_space += (long) bptr->rows_in_array * - (long) bptr->blocksperrow * SIZEOF(JBLOCK); - } - } - - if (space_per_minheight <= 0) - return; /* no unrealized arrays, no work */ - - /* Determine amount of memory to actually use; this is system-dependent. */ - avail_mem = jpeg_mem_available(cinfo, space_per_minheight, maximum_space, - mem->total_space_allocated); - - /* If the maximum space needed is available, make all the buffers full - * height; otherwise parcel it out with the same number of minheights - * in each buffer. - */ - if (avail_mem >= maximum_space) - max_minheights = 1000000000L; - else { - max_minheights = avail_mem / space_per_minheight; - /* If there doesn't seem to be enough space, try to get the minimum - * anyway. This allows a "stub" implementation of jpeg_mem_available(). - */ - if (max_minheights <= 0) - max_minheights = 1; - } - - /* Allocate the in-memory buffers and initialize backing store as needed. */ - - for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { - if (sptr->mem_buffer == NULL) { /* if not realized yet */ - minheights = ((long) sptr->rows_in_array - 1L) / sptr->maxaccess + 1L; - if (minheights <= max_minheights) { - /* This buffer fits in memory */ - sptr->rows_in_mem = sptr->rows_in_array; - } else { - /* It doesn't fit in memory, create backing store. */ - sptr->rows_in_mem = (JDIMENSION) (max_minheights * sptr->maxaccess); - jpeg_open_backing_store(cinfo, & sptr->b_s_info, - (long) sptr->rows_in_array * - (long) sptr->samplesperrow * - (long) SIZEOF(JSAMPLE)); - sptr->b_s_open = TRUE; - } - sptr->mem_buffer = alloc_sarray(cinfo, JPOOL_IMAGE, - sptr->samplesperrow, sptr->rows_in_mem); - sptr->rowsperchunk = mem->last_rowsperchunk; - sptr->cur_start_row = 0; - sptr->first_undef_row = 0; - sptr->dirty = FALSE; - } - } - - for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { - if (bptr->mem_buffer == NULL) { /* if not realized yet */ - minheights = ((long) bptr->rows_in_array - 1L) / bptr->maxaccess + 1L; - if (minheights <= max_minheights) { - /* This buffer fits in memory */ - bptr->rows_in_mem = bptr->rows_in_array; - } else { - /* It doesn't fit in memory, create backing store. */ - bptr->rows_in_mem = (JDIMENSION) (max_minheights * bptr->maxaccess); - jpeg_open_backing_store(cinfo, & bptr->b_s_info, - (long) bptr->rows_in_array * - (long) bptr->blocksperrow * - (long) SIZEOF(JBLOCK)); - bptr->b_s_open = TRUE; - } - bptr->mem_buffer = alloc_barray(cinfo, JPOOL_IMAGE, - bptr->blocksperrow, bptr->rows_in_mem); - bptr->rowsperchunk = mem->last_rowsperchunk; - bptr->cur_start_row = 0; - bptr->first_undef_row = 0; - bptr->dirty = FALSE; - } - } -} - - -LOCAL(void) -do_sarray_io (j_common_ptr cinfo, jvirt_sarray_ptr ptr, boolean writing) -/* Do backing store read or write of a virtual sample array */ -{ - long bytesperrow, file_offset, byte_count, rows, thisrow, i; - - bytesperrow = (long) ptr->samplesperrow * SIZEOF(JSAMPLE); - file_offset = ptr->cur_start_row * bytesperrow; - /* Loop to read or write each allocation chunk in mem_buffer */ - for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) { - /* One chunk, but check for short chunk at end of buffer */ - rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i); - /* Transfer no more than is currently defined */ - thisrow = (long) ptr->cur_start_row + i; - rows = MIN(rows, (long) ptr->first_undef_row - thisrow); - /* Transfer no more than fits in file */ - rows = MIN(rows, (long) ptr->rows_in_array - thisrow); - if (rows <= 0) /* this chunk might be past end of file! */ - break; - byte_count = rows * bytesperrow; - if (writing) - (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info, - (void FAR *) ptr->mem_buffer[i], - file_offset, byte_count); - else - (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info, - (void FAR *) ptr->mem_buffer[i], - file_offset, byte_count); - file_offset += byte_count; - } -} - - -LOCAL(void) -do_barray_io (j_common_ptr cinfo, jvirt_barray_ptr ptr, boolean writing) -/* Do backing store read or write of a virtual coefficient-block array */ -{ - long bytesperrow, file_offset, byte_count, rows, thisrow, i; - - bytesperrow = (long) ptr->blocksperrow * SIZEOF(JBLOCK); - file_offset = ptr->cur_start_row * bytesperrow; - /* Loop to read or write each allocation chunk in mem_buffer */ - for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) { - /* One chunk, but check for short chunk at end of buffer */ - rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i); - /* Transfer no more than is currently defined */ - thisrow = (long) ptr->cur_start_row + i; - rows = MIN(rows, (long) ptr->first_undef_row - thisrow); - /* Transfer no more than fits in file */ - rows = MIN(rows, (long) ptr->rows_in_array - thisrow); - if (rows <= 0) /* this chunk might be past end of file! */ - break; - byte_count = rows * bytesperrow; - if (writing) - (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info, - (void FAR *) ptr->mem_buffer[i], - file_offset, byte_count); - else - (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info, - (void FAR *) ptr->mem_buffer[i], - file_offset, byte_count); - file_offset += byte_count; - } -} - - -METHODDEF(JSAMPARRAY) -access_virt_sarray (j_common_ptr cinfo, jvirt_sarray_ptr ptr, - JDIMENSION start_row, JDIMENSION num_rows, - boolean writable) -/* Access the part of a virtual sample array starting at start_row */ -/* and extending for num_rows rows. writable is true if */ -/* caller intends to modify the accessed area. */ -{ - JDIMENSION end_row = start_row + num_rows; - JDIMENSION undef_row; - - /* debugging check */ - if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess || - ptr->mem_buffer == NULL) - ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); - - /* Make the desired part of the virtual array accessible */ - if (start_row < ptr->cur_start_row || - end_row > ptr->cur_start_row+ptr->rows_in_mem) { - if (! ptr->b_s_open) - ERREXIT(cinfo, JERR_VIRTUAL_BUG); - /* Flush old buffer contents if necessary */ - if (ptr->dirty) { - do_sarray_io(cinfo, ptr, TRUE); - ptr->dirty = FALSE; - } - /* Decide what part of virtual array to access. - * Algorithm: if target address > current window, assume forward scan, - * load starting at target address. If target address < current window, - * assume backward scan, load so that target area is top of window. - * Note that when switching from forward write to forward read, will have - * start_row = 0, so the limiting case applies and we load from 0 anyway. - */ - if (start_row > ptr->cur_start_row) { - ptr->cur_start_row = start_row; - } else { - /* use long arithmetic here to avoid overflow & unsigned problems */ - long ltemp; - - ltemp = (long) end_row - (long) ptr->rows_in_mem; - if (ltemp < 0) - ltemp = 0; /* don't fall off front end of file */ - ptr->cur_start_row = (JDIMENSION) ltemp; - } - /* Read in the selected part of the array. - * During the initial write pass, we will do no actual read - * because the selected part is all undefined. - */ - do_sarray_io(cinfo, ptr, FALSE); - } - /* Ensure the accessed part of the array is defined; prezero if needed. - * To improve locality of access, we only prezero the part of the array - * that the caller is about to access, not the entire in-memory array. - */ - if (ptr->first_undef_row < end_row) { - if (ptr->first_undef_row < start_row) { - if (writable) /* writer skipped over a section of array */ - ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); - undef_row = start_row; /* but reader is allowed to read ahead */ - } else { - undef_row = ptr->first_undef_row; - } - if (writable) - ptr->first_undef_row = end_row; - if (ptr->pre_zero) { - size_t bytesperrow = (size_t) ptr->samplesperrow * SIZEOF(JSAMPLE); - undef_row -= ptr->cur_start_row; /* make indexes relative to buffer */ - end_row -= ptr->cur_start_row; - while (undef_row < end_row) { - jzero_far((void FAR *) ptr->mem_buffer[undef_row], bytesperrow); - undef_row++; - } - } else { - if (! writable) /* reader looking at undefined data */ - ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); - } - } - /* Flag the buffer dirty if caller will write in it */ - if (writable) - ptr->dirty = TRUE; - /* Return address of proper part of the buffer */ - return ptr->mem_buffer + (start_row - ptr->cur_start_row); -} - - -METHODDEF(JBLOCKARRAY) -access_virt_barray (j_common_ptr cinfo, jvirt_barray_ptr ptr, - JDIMENSION start_row, JDIMENSION num_rows, - boolean writable) -/* Access the part of a virtual block array starting at start_row */ -/* and extending for num_rows rows. writable is true if */ -/* caller intends to modify the accessed area. */ -{ - JDIMENSION end_row = start_row + num_rows; - JDIMENSION undef_row; - - /* debugging check */ - if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess || - ptr->mem_buffer == NULL) - ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); - - /* Make the desired part of the virtual array accessible */ - if (start_row < ptr->cur_start_row || - end_row > ptr->cur_start_row+ptr->rows_in_mem) { - if (! ptr->b_s_open) - ERREXIT(cinfo, JERR_VIRTUAL_BUG); - /* Flush old buffer contents if necessary */ - if (ptr->dirty) { - do_barray_io(cinfo, ptr, TRUE); - ptr->dirty = FALSE; - } - /* Decide what part of virtual array to access. - * Algorithm: if target address > current window, assume forward scan, - * load starting at target address. If target address < current window, - * assume backward scan, load so that target area is top of window. - * Note that when switching from forward write to forward read, will have - * start_row = 0, so the limiting case applies and we load from 0 anyway. - */ - if (start_row > ptr->cur_start_row) { - ptr->cur_start_row = start_row; - } else { - /* use long arithmetic here to avoid overflow & unsigned problems */ - long ltemp; - - ltemp = (long) end_row - (long) ptr->rows_in_mem; - if (ltemp < 0) - ltemp = 0; /* don't fall off front end of file */ - ptr->cur_start_row = (JDIMENSION) ltemp; - } - /* Read in the selected part of the array. - * During the initial write pass, we will do no actual read - * because the selected part is all undefined. - */ - do_barray_io(cinfo, ptr, FALSE); - } - /* Ensure the accessed part of the array is defined; prezero if needed. - * To improve locality of access, we only prezero the part of the array - * that the caller is about to access, not the entire in-memory array. - */ - if (ptr->first_undef_row < end_row) { - if (ptr->first_undef_row < start_row) { - if (writable) /* writer skipped over a section of array */ - ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); - undef_row = start_row; /* but reader is allowed to read ahead */ - } else { - undef_row = ptr->first_undef_row; - } - if (writable) - ptr->first_undef_row = end_row; - if (ptr->pre_zero) { - size_t bytesperrow = (size_t) ptr->blocksperrow * SIZEOF(JBLOCK); - undef_row -= ptr->cur_start_row; /* make indexes relative to buffer */ - end_row -= ptr->cur_start_row; - while (undef_row < end_row) { - jzero_far((void FAR *) ptr->mem_buffer[undef_row], bytesperrow); - undef_row++; - } - } else { - if (! writable) /* reader looking at undefined data */ - ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); - } - } - /* Flag the buffer dirty if caller will write in it */ - if (writable) - ptr->dirty = TRUE; - /* Return address of proper part of the buffer */ - return ptr->mem_buffer + (start_row - ptr->cur_start_row); -} - - -/* - * Release all objects belonging to a specified pool. - */ - -METHODDEF(void) -free_pool (j_common_ptr cinfo, int pool_id) -{ - my_mem_ptr mem = (my_mem_ptr) cinfo->mem; - small_pool_ptr shdr_ptr; - large_pool_ptr lhdr_ptr; - size_t space_freed; - - if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS) - ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ - -#ifdef MEM_STATS - if (cinfo->err->trace_level > 1) - print_mem_stats(cinfo, pool_id); /* print pool's memory usage statistics */ -#endif - - /* If freeing IMAGE pool, close any virtual arrays first */ - if (pool_id == JPOOL_IMAGE) { - jvirt_sarray_ptr sptr; - jvirt_barray_ptr bptr; - - for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { - if (sptr->b_s_open) { /* there may be no backing store */ - sptr->b_s_open = FALSE; /* prevent recursive close if error */ - (*sptr->b_s_info.close_backing_store) (cinfo, & sptr->b_s_info); - } - } - mem->virt_sarray_list = NULL; - for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { - if (bptr->b_s_open) { /* there may be no backing store */ - bptr->b_s_open = FALSE; /* prevent recursive close if error */ - (*bptr->b_s_info.close_backing_store) (cinfo, & bptr->b_s_info); - } - } - mem->virt_barray_list = NULL; - } - - /* Release large objects */ - lhdr_ptr = mem->large_list[pool_id]; - mem->large_list[pool_id] = NULL; - - while (lhdr_ptr != NULL) { - large_pool_ptr next_lhdr_ptr = lhdr_ptr->hdr.next; - space_freed = lhdr_ptr->hdr.bytes_used + - lhdr_ptr->hdr.bytes_left + - SIZEOF(large_pool_hdr); - jpeg_free_large(cinfo, (void FAR *) lhdr_ptr, space_freed); - mem->total_space_allocated -= space_freed; - lhdr_ptr = next_lhdr_ptr; - } - - /* Release small objects */ - shdr_ptr = mem->small_list[pool_id]; - mem->small_list[pool_id] = NULL; - - while (shdr_ptr != NULL) { - small_pool_ptr next_shdr_ptr = shdr_ptr->hdr.next; - space_freed = shdr_ptr->hdr.bytes_used + - shdr_ptr->hdr.bytes_left + - SIZEOF(small_pool_hdr); - jpeg_free_small(cinfo, (void *) shdr_ptr, space_freed); - mem->total_space_allocated -= space_freed; - shdr_ptr = next_shdr_ptr; - } -} - - -/* - * Close up shop entirely. - * Note that this cannot be called unless cinfo->mem is non-NULL. - */ - -METHODDEF(void) -self_destruct (j_common_ptr cinfo) -{ - int pool; - - /* Close all backing store, release all memory. - * Releasing pools in reverse order might help avoid fragmentation - * with some (brain-damaged) malloc libraries. - */ - for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) { - free_pool(cinfo, pool); - } - - /* Release the memory manager control block too. */ - jpeg_free_small(cinfo, (void *) cinfo->mem, SIZEOF(my_memory_mgr)); - cinfo->mem = NULL; /* ensures I will be called only once */ - - jpeg_mem_term(cinfo); /* system-dependent cleanup */ -} - - -/* - * Memory manager initialization. - * When this is called, only the error manager pointer is valid in cinfo! - */ - -GLOBAL(void) -jinit_memory_mgr (j_common_ptr cinfo) -{ - my_mem_ptr mem; - long max_to_use; - int pool; - size_t test_mac; - - cinfo->mem = NULL; /* for safety if init fails */ - - /* Check for configuration errors. - * SIZEOF(ALIGN_TYPE) should be a power of 2; otherwise, it probably - * doesn't reflect any real hardware alignment requirement. - * The test is a little tricky: for X>0, X and X-1 have no one-bits - * in common if and only if X is a power of 2, ie has only one one-bit. - * Some compilers may give an "unreachable code" warning here; ignore it. - */ - if ((SIZEOF(ALIGN_TYPE) & (SIZEOF(ALIGN_TYPE)-1)) != 0) - ERREXIT(cinfo, JERR_BAD_ALIGN_TYPE); - /* MAX_ALLOC_CHUNK must be representable as type size_t, and must be - * a multiple of SIZEOF(ALIGN_TYPE). - * Again, an "unreachable code" warning may be ignored here. - * But a "constant too large" warning means you need to fix MAX_ALLOC_CHUNK. - */ - test_mac = (size_t) MAX_ALLOC_CHUNK; - if ((long) test_mac != MAX_ALLOC_CHUNK || - (MAX_ALLOC_CHUNK % SIZEOF(ALIGN_TYPE)) != 0) - ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK); - - max_to_use = jpeg_mem_init(cinfo); /* system-dependent initialization */ - - /* Attempt to allocate memory manager's control block */ - mem = (my_mem_ptr) jpeg_get_small(cinfo, SIZEOF(my_memory_mgr)); - - if (mem == NULL) { - jpeg_mem_term(cinfo); /* system-dependent cleanup */ - ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 0); - } - - /* OK, fill in the method pointers */ - mem->pub.alloc_small = alloc_small; - mem->pub.alloc_large = alloc_large; - mem->pub.alloc_sarray = alloc_sarray; - mem->pub.alloc_barray = alloc_barray; - mem->pub.request_virt_sarray = request_virt_sarray; - mem->pub.request_virt_barray = request_virt_barray; - mem->pub.realize_virt_arrays = realize_virt_arrays; - mem->pub.access_virt_sarray = access_virt_sarray; - mem->pub.access_virt_barray = access_virt_barray; - mem->pub.free_pool = free_pool; - mem->pub.self_destruct = self_destruct; - - /* Make MAX_ALLOC_CHUNK accessible to other modules */ - mem->pub.max_alloc_chunk = MAX_ALLOC_CHUNK; - - /* Initialize working state */ - mem->pub.max_memory_to_use = max_to_use; - - for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) { - mem->small_list[pool] = NULL; - mem->large_list[pool] = NULL; - } - mem->virt_sarray_list = NULL; - mem->virt_barray_list = NULL; - - mem->total_space_allocated = SIZEOF(my_memory_mgr); - - /* Declare ourselves open for business */ - cinfo->mem = & mem->pub; - - /* Check for an environment variable JPEGMEM; if found, override the - * default max_memory setting from jpeg_mem_init. Note that the - * surrounding application may again override this value. - * If your system doesn't support getenv(), define NO_GETENV to disable - * this feature. - */ -#ifndef NO_GETENV - { char * memenv; - - if ((memenv = getenv("JPEGMEM")) != NULL) { - char ch = 'x'; - - if (sscanf(memenv, "%ld%c", &max_to_use, &ch) > 0) { - if (ch == 'm' || ch == 'M') - max_to_use *= 1000L; - mem->pub.max_memory_to_use = max_to_use * 1000L; - } - } - } -#endif - -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jmemname.c b/gtkmm-osx/trunk/jpeg-6b/jmemname.c deleted file mode 100644 index ed96dee..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jmemname.c +++ /dev/null @@ -1,276 +0,0 @@ -/* - * jmemname.c - * - * Copyright (C) 1992-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file provides a generic implementation of the system-dependent - * portion of the JPEG memory manager. This implementation assumes that - * you must explicitly construct a name for each temp file. - * Also, the problem of determining the amount of memory available - * is shoved onto the user. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jmemsys.h" /* import the system-dependent declarations */ - -#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ -extern void * malloc JPP((size_t size)); -extern void free JPP((void *ptr)); -#endif - -#ifndef SEEK_SET /* pre-ANSI systems may not define this; */ -#define SEEK_SET 0 /* if not, assume 0 is correct */ -#endif - -#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#define RW_BINARY "w+" -#else -#ifdef VMS /* VMS is very nonstandard */ -#define READ_BINARY "rb", "ctx=stm" -#define RW_BINARY "w+b", "ctx=stm" -#else /* standard ANSI-compliant case */ -#define READ_BINARY "rb" -#define RW_BINARY "w+b" -#endif -#endif - - -/* - * Selection of a file name for a temporary file. - * This is system-dependent! - * - * The code as given is suitable for most Unix systems, and it is easily - * modified for most non-Unix systems. Some notes: - * 1. The temp file is created in the directory named by TEMP_DIRECTORY. - * The default value is /usr/tmp, which is the conventional place for - * creating large temp files on Unix. On other systems you'll probably - * want to change the file location. You can do this by editing the - * #define, or (preferred) by defining TEMP_DIRECTORY in jconfig.h. - * - * 2. If you need to change the file name as well as its location, - * you can override the TEMP_FILE_NAME macro. (Note that this is - * actually a printf format string; it must contain %s and %d.) - * Few people should need to do this. - * - * 3. mktemp() is used to ensure that multiple processes running - * simultaneously won't select the same file names. If your system - * doesn't have mktemp(), define NO_MKTEMP to do it the hard way. - * (If you don't have , also define NO_ERRNO_H.) - * - * 4. You probably want to define NEED_SIGNAL_CATCHER so that cjpeg.c/djpeg.c - * will cause the temp files to be removed if you stop the program early. - */ - -#ifndef TEMP_DIRECTORY /* can override from jconfig.h or Makefile */ -#define TEMP_DIRECTORY "/usr/tmp/" /* recommended setting for Unix */ -#endif - -static int next_file_num; /* to distinguish among several temp files */ - -#ifdef NO_MKTEMP - -#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */ -#define TEMP_FILE_NAME "%sJPG%03d.TMP" -#endif - -#ifndef NO_ERRNO_H -#include /* to define ENOENT */ -#endif - -/* ANSI C specifies that errno is a macro, but on older systems it's more - * likely to be a plain int variable. And not all versions of errno.h - * bother to declare it, so we have to in order to be most portable. Thus: - */ -#ifndef errno -extern int errno; -#endif - - -LOCAL(void) -select_file_name (char * fname) -{ - FILE * tfile; - - /* Keep generating file names till we find one that's not in use */ - for (;;) { - next_file_num++; /* advance counter */ - sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num); - if ((tfile = fopen(fname, READ_BINARY)) == NULL) { - /* fopen could have failed for a reason other than the file not - * being there; for example, file there but unreadable. - * If isn't available, then we cannot test the cause. - */ -#ifdef ENOENT - if (errno != ENOENT) - continue; -#endif - break; - } - fclose(tfile); /* oops, it's there; close tfile & try again */ - } -} - -#else /* ! NO_MKTEMP */ - -/* Note that mktemp() requires the initial filename to end in six X's */ -#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */ -#define TEMP_FILE_NAME "%sJPG%dXXXXXX" -#endif - -LOCAL(void) -select_file_name (char * fname) -{ - next_file_num++; /* advance counter */ - sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num); - mktemp(fname); /* make sure file name is unique */ - /* mktemp replaces the trailing XXXXXX with a unique string of characters */ -} - -#endif /* NO_MKTEMP */ - - -/* - * Memory allocation and freeing are controlled by the regular library - * routines malloc() and free(). - */ - -GLOBAL(void *) -jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void *) malloc(sizeofobject); -} - -GLOBAL(void) -jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) -{ - free(object); -} - - -/* - * "Large" objects are treated the same as "small" ones. - * NB: although we include FAR keywords in the routine declarations, - * this file won't actually work in 80x86 small/medium model; at least, - * you probably won't be able to process useful-size images in only 64KB. - */ - -GLOBAL(void FAR *) -jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void FAR *) malloc(sizeofobject); -} - -GLOBAL(void) -jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) -{ - free(object); -} - - -/* - * This routine computes the total memory space available for allocation. - * It's impossible to do this in a portable way; our current solution is - * to make the user tell us (with a default value set at compile time). - * If you can actually get the available space, it's a good idea to subtract - * a slop factor of 5% or so. - */ - -#ifndef DEFAULT_MAX_MEM /* so can override from makefile */ -#define DEFAULT_MAX_MEM 1000000L /* default: one megabyte */ -#endif - -GLOBAL(long) -jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, - long max_bytes_needed, long already_allocated) -{ - return cinfo->mem->max_memory_to_use - already_allocated; -} - - -/* - * Backing store (temporary file) management. - * Backing store objects are only used when the value returned by - * jpeg_mem_available is less than the total space needed. You can dispense - * with these routines if you have plenty of virtual memory; see jmemnobs.c. - */ - - -METHODDEF(void) -read_backing_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - if (fseek(info->temp_file, file_offset, SEEK_SET)) - ERREXIT(cinfo, JERR_TFILE_SEEK); - if (JFREAD(info->temp_file, buffer_address, byte_count) - != (size_t) byte_count) - ERREXIT(cinfo, JERR_TFILE_READ); -} - - -METHODDEF(void) -write_backing_store (j_common_ptr cinfo, backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count) -{ - if (fseek(info->temp_file, file_offset, SEEK_SET)) - ERREXIT(cinfo, JERR_TFILE_SEEK); - if (JFWRITE(info->temp_file, buffer_address, byte_count) - != (size_t) byte_count) - ERREXIT(cinfo, JERR_TFILE_WRITE); -} - - -METHODDEF(void) -close_backing_store (j_common_ptr cinfo, backing_store_ptr info) -{ - fclose(info->temp_file); /* close the file */ - unlink(info->temp_name); /* delete the file */ -/* If your system doesn't have unlink(), use remove() instead. - * remove() is the ANSI-standard name for this function, but if - * your system was ANSI you'd be using jmemansi.c, right? - */ - TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name); -} - - -/* - * Initial opening of a backing-store object. - */ - -GLOBAL(void) -jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - select_file_name(info->temp_name); - if ((info->temp_file = fopen(info->temp_name, RW_BINARY)) == NULL) - ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); - info->read_backing_store = read_backing_store; - info->write_backing_store = write_backing_store; - info->close_backing_store = close_backing_store; - TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name); -} - - -/* - * These routines take care of any system-dependent initialization and - * cleanup required. - */ - -GLOBAL(long) -jpeg_mem_init (j_common_ptr cinfo) -{ - next_file_num = 0; /* initialize temp file name generator */ - return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ -} - -GLOBAL(void) -jpeg_mem_term (j_common_ptr cinfo) -{ - /* no work */ -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jmemnobs.c b/gtkmm-osx/trunk/jpeg-6b/jmemnobs.c deleted file mode 100644 index eb8c337..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jmemnobs.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * jmemnobs.c - * - * Copyright (C) 1992-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file provides a really simple implementation of the system- - * dependent portion of the JPEG memory manager. This implementation - * assumes that no backing-store files are needed: all required space - * can be obtained from malloc(). - * This is very portable in the sense that it'll compile on almost anything, - * but you'd better have lots of main memory (or virtual memory) if you want - * to process big images. - * Note that the max_memory_to_use option is ignored by this implementation. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" -#include "jmemsys.h" /* import the system-dependent declarations */ - -#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ -extern void * malloc JPP((size_t size)); -extern void free JPP((void *ptr)); -#endif - - -/* - * Memory allocation and freeing are controlled by the regular library - * routines malloc() and free(). - */ - -GLOBAL(void *) -jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void *) malloc(sizeofobject); -} - -GLOBAL(void) -jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) -{ - free(object); -} - - -/* - * "Large" objects are treated the same as "small" ones. - * NB: although we include FAR keywords in the routine declarations, - * this file won't actually work in 80x86 small/medium model; at least, - * you probably won't be able to process useful-size images in only 64KB. - */ - -GLOBAL(void FAR *) -jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) -{ - return (void FAR *) malloc(sizeofobject); -} - -GLOBAL(void) -jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) -{ - free(object); -} - - -/* - * This routine computes the total memory space available for allocation. - * Here we always say, "we got all you want bud!" - */ - -GLOBAL(long) -jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, - long max_bytes_needed, long already_allocated) -{ - return max_bytes_needed; -} - - -/* - * Backing store (temporary file) management. - * Since jpeg_mem_available always promised the moon, - * this should never be called and we can just error out. - */ - -GLOBAL(void) -jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, - long total_bytes_needed) -{ - ERREXIT(cinfo, JERR_NO_BACKING_STORE); -} - - -/* - * These routines take care of any system-dependent initialization and - * cleanup required. Here, there isn't any. - */ - -GLOBAL(long) -jpeg_mem_init (j_common_ptr cinfo) -{ - return 0; /* just set max_memory_to_use to 0 */ -} - -GLOBAL(void) -jpeg_mem_term (j_common_ptr cinfo) -{ - /* no work */ -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jmemsys.h b/gtkmm-osx/trunk/jpeg-6b/jmemsys.h deleted file mode 100644 index 6c3c6d3..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jmemsys.h +++ /dev/null @@ -1,198 +0,0 @@ -/* - * jmemsys.h - * - * Copyright (C) 1992-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This include file defines the interface between the system-independent - * and system-dependent portions of the JPEG memory manager. No other - * modules need include it. (The system-independent portion is jmemmgr.c; - * there are several different versions of the system-dependent portion.) - * - * This file works as-is for the system-dependent memory managers supplied - * in the IJG distribution. You may need to modify it if you write a - * custom memory manager. If system-dependent changes are needed in - * this file, the best method is to #ifdef them based on a configuration - * symbol supplied in jconfig.h, as we have done with USE_MSDOS_MEMMGR - * and USE_MAC_MEMMGR. - */ - - -/* Short forms of external names for systems with brain-damaged linkers. */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jpeg_get_small jGetSmall -#define jpeg_free_small jFreeSmall -#define jpeg_get_large jGetLarge -#define jpeg_free_large jFreeLarge -#define jpeg_mem_available jMemAvail -#define jpeg_open_backing_store jOpenBackStore -#define jpeg_mem_init jMemInit -#define jpeg_mem_term jMemTerm -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - - -/* - * These two functions are used to allocate and release small chunks of - * memory. (Typically the total amount requested through jpeg_get_small is - * no more than 20K or so; this will be requested in chunks of a few K each.) - * Behavior should be the same as for the standard library functions malloc - * and free; in particular, jpeg_get_small must return NULL on failure. - * On most systems, these ARE malloc and free. jpeg_free_small is passed the - * size of the object being freed, just in case it's needed. - * On an 80x86 machine using small-data memory model, these manage near heap. - */ - -EXTERN(void *) jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject)); -EXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object, - size_t sizeofobject)); - -/* - * These two functions are used to allocate and release large chunks of - * memory (up to the total free space designated by jpeg_mem_available). - * The interface is the same as above, except that on an 80x86 machine, - * far pointers are used. On most other machines these are identical to - * the jpeg_get/free_small routines; but we keep them separate anyway, - * in case a different allocation strategy is desirable for large chunks. - */ - -EXTERN(void FAR *) jpeg_get_large JPP((j_common_ptr cinfo, - size_t sizeofobject)); -EXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object, - size_t sizeofobject)); - -/* - * The macro MAX_ALLOC_CHUNK designates the maximum number of bytes that may - * be requested in a single call to jpeg_get_large (and jpeg_get_small for that - * matter, but that case should never come into play). This macro is needed - * to model the 64Kb-segment-size limit of far addressing on 80x86 machines. - * On those machines, we expect that jconfig.h will provide a proper value. - * On machines with 32-bit flat address spaces, any large constant may be used. - * - * NB: jmemmgr.c expects that MAX_ALLOC_CHUNK will be representable as type - * size_t and will be a multiple of sizeof(align_type). - */ - -#ifndef MAX_ALLOC_CHUNK /* may be overridden in jconfig.h */ -#define MAX_ALLOC_CHUNK 1000000000L -#endif - -/* - * This routine computes the total space still available for allocation by - * jpeg_get_large. If more space than this is needed, backing store will be - * used. NOTE: any memory already allocated must not be counted. - * - * There is a minimum space requirement, corresponding to the minimum - * feasible buffer sizes; jmemmgr.c will request that much space even if - * jpeg_mem_available returns zero. The maximum space needed, enough to hold - * all working storage in memory, is also passed in case it is useful. - * Finally, the total space already allocated is passed. If no better - * method is available, cinfo->mem->max_memory_to_use - already_allocated - * is often a suitable calculation. - * - * It is OK for jpeg_mem_available to underestimate the space available - * (that'll just lead to more backing-store access than is really necessary). - * However, an overestimate will lead to failure. Hence it's wise to subtract - * a slop factor from the true available space. 5% should be enough. - * - * On machines with lots of virtual memory, any large constant may be returned. - * Conversely, zero may be returned to always use the minimum amount of memory. - */ - -EXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo, - long min_bytes_needed, - long max_bytes_needed, - long already_allocated)); - - -/* - * This structure holds whatever state is needed to access a single - * backing-store object. The read/write/close method pointers are called - * by jmemmgr.c to manipulate the backing-store object; all other fields - * are private to the system-dependent backing store routines. - */ - -#define TEMP_NAME_LENGTH 64 /* max length of a temporary file's name */ - - -#ifdef USE_MSDOS_MEMMGR /* DOS-specific junk */ - -typedef unsigned short XMSH; /* type of extended-memory handles */ -typedef unsigned short EMSH; /* type of expanded-memory handles */ - -typedef union { - short file_handle; /* DOS file handle if it's a temp file */ - XMSH xms_handle; /* handle if it's a chunk of XMS */ - EMSH ems_handle; /* handle if it's a chunk of EMS */ -} handle_union; - -#endif /* USE_MSDOS_MEMMGR */ - -#ifdef USE_MAC_MEMMGR /* Mac-specific junk */ -#include -#endif /* USE_MAC_MEMMGR */ - - -typedef struct backing_store_struct * backing_store_ptr; - -typedef struct backing_store_struct { - /* Methods for reading/writing/closing this backing-store object */ - JMETHOD(void, read_backing_store, (j_common_ptr cinfo, - backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count)); - JMETHOD(void, write_backing_store, (j_common_ptr cinfo, - backing_store_ptr info, - void FAR * buffer_address, - long file_offset, long byte_count)); - JMETHOD(void, close_backing_store, (j_common_ptr cinfo, - backing_store_ptr info)); - - /* Private fields for system-dependent backing-store management */ -#ifdef USE_MSDOS_MEMMGR - /* For the MS-DOS manager (jmemdos.c), we need: */ - handle_union handle; /* reference to backing-store storage object */ - char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ -#else -#ifdef USE_MAC_MEMMGR - /* For the Mac manager (jmemmac.c), we need: */ - short temp_file; /* file reference number to temp file */ - FSSpec tempSpec; /* the FSSpec for the temp file */ - char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ -#else - /* For a typical implementation with temp files, we need: */ - FILE * temp_file; /* stdio reference to temp file */ - char temp_name[TEMP_NAME_LENGTH]; /* name of temp file */ -#endif -#endif -} backing_store_info; - - -/* - * Initial opening of a backing-store object. This must fill in the - * read/write/close pointers in the object. The read/write routines - * may take an error exit if the specified maximum file size is exceeded. - * (If jpeg_mem_available always returns a large value, this routine can - * just take an error exit.) - */ - -EXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo, - backing_store_ptr info, - long total_bytes_needed)); - - -/* - * These routines take care of any system-dependent initialization and - * cleanup required. jpeg_mem_init will be called before anything is - * allocated (and, therefore, nothing in cinfo is of use except the error - * manager pointer). It should return a suitable default value for - * max_memory_to_use; this may subsequently be overridden by the surrounding - * application. (Note that max_memory_to_use is only important if - * jpeg_mem_available chooses to consult it ... no one else will.) - * jpeg_mem_term may assume that all requested memory has been freed and that - * all opened backing-store objects have been closed. - */ - -EXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo)); -EXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo)); diff --git a/gtkmm-osx/trunk/jpeg-6b/jmorecfg.h b/gtkmm-osx/trunk/jpeg-6b/jmorecfg.h deleted file mode 100644 index 54a7d1c..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jmorecfg.h +++ /dev/null @@ -1,363 +0,0 @@ -/* - * jmorecfg.h - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains additional configuration options that customize the - * JPEG software for special applications or support machine-dependent - * optimizations. Most users will not need to touch this file. - */ - - -/* - * Define BITS_IN_JSAMPLE as either - * 8 for 8-bit sample values (the usual setting) - * 12 for 12-bit sample values - * Only 8 and 12 are legal data precisions for lossy JPEG according to the - * JPEG standard, and the IJG code does not support anything else! - * We do not support run-time selection of data precision, sorry. - */ - -#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ - - -/* - * Maximum number of components (color channels) allowed in JPEG image. - * To meet the letter of the JPEG spec, set this to 255. However, darn - * few applications need more than 4 channels (maybe 5 for CMYK + alpha - * mask). We recommend 10 as a reasonable compromise; use 4 if you are - * really short on memory. (Each allowed component costs a hundred or so - * bytes of storage, whether actually used in an image or not.) - */ - -#define MAX_COMPONENTS 10 /* maximum number of image components */ - - -/* - * Basic data types. - * You may need to change these if you have a machine with unusual data - * type sizes; for example, "char" not 8 bits, "short" not 16 bits, - * or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, - * but it had better be at least 16. - */ - -/* Representation of a single sample (pixel element value). - * We frequently allocate large arrays of these, so it's important to keep - * them small. But if you have memory to burn and access to char or short - * arrays is very slow on your hardware, you might want to change these. - */ - -#if BITS_IN_JSAMPLE == 8 -/* JSAMPLE should be the smallest type that will hold the values 0..255. - * You can use a signed char by having GETJSAMPLE mask it with 0xFF. - */ - -#ifdef HAVE_UNSIGNED_CHAR - -typedef unsigned char JSAMPLE; -#define GETJSAMPLE(value) ((int) (value)) - -#else /* not HAVE_UNSIGNED_CHAR */ - -typedef char JSAMPLE; -#ifdef CHAR_IS_UNSIGNED -#define GETJSAMPLE(value) ((int) (value)) -#else -#define GETJSAMPLE(value) ((int) (value) & 0xFF) -#endif /* CHAR_IS_UNSIGNED */ - -#endif /* HAVE_UNSIGNED_CHAR */ - -#define MAXJSAMPLE 255 -#define CENTERJSAMPLE 128 - -#endif /* BITS_IN_JSAMPLE == 8 */ - - -#if BITS_IN_JSAMPLE == 12 -/* JSAMPLE should be the smallest type that will hold the values 0..4095. - * On nearly all machines "short" will do nicely. - */ - -typedef short JSAMPLE; -#define GETJSAMPLE(value) ((int) (value)) - -#define MAXJSAMPLE 4095 -#define CENTERJSAMPLE 2048 - -#endif /* BITS_IN_JSAMPLE == 12 */ - - -/* Representation of a DCT frequency coefficient. - * This should be a signed value of at least 16 bits; "short" is usually OK. - * Again, we allocate large arrays of these, but you can change to int - * if you have memory to burn and "short" is really slow. - */ - -typedef short JCOEF; - - -/* Compressed datastreams are represented as arrays of JOCTET. - * These must be EXACTLY 8 bits wide, at least once they are written to - * external storage. Note that when using the stdio data source/destination - * managers, this is also the data type passed to fread/fwrite. - */ - -#ifdef HAVE_UNSIGNED_CHAR - -typedef unsigned char JOCTET; -#define GETJOCTET(value) (value) - -#else /* not HAVE_UNSIGNED_CHAR */ - -typedef char JOCTET; -#ifdef CHAR_IS_UNSIGNED -#define GETJOCTET(value) (value) -#else -#define GETJOCTET(value) ((value) & 0xFF) -#endif /* CHAR_IS_UNSIGNED */ - -#endif /* HAVE_UNSIGNED_CHAR */ - - -/* These typedefs are used for various table entries and so forth. - * They must be at least as wide as specified; but making them too big - * won't cost a huge amount of memory, so we don't provide special - * extraction code like we did for JSAMPLE. (In other words, these - * typedefs live at a different point on the speed/space tradeoff curve.) - */ - -/* UINT8 must hold at least the values 0..255. */ - -#ifdef HAVE_UNSIGNED_CHAR -typedef unsigned char UINT8; -#else /* not HAVE_UNSIGNED_CHAR */ -#ifdef CHAR_IS_UNSIGNED -typedef char UINT8; -#else /* not CHAR_IS_UNSIGNED */ -typedef short UINT8; -#endif /* CHAR_IS_UNSIGNED */ -#endif /* HAVE_UNSIGNED_CHAR */ - -/* UINT16 must hold at least the values 0..65535. */ - -#ifdef HAVE_UNSIGNED_SHORT -typedef unsigned short UINT16; -#else /* not HAVE_UNSIGNED_SHORT */ -typedef unsigned int UINT16; -#endif /* HAVE_UNSIGNED_SHORT */ - -/* INT16 must hold at least the values -32768..32767. */ - -#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ -typedef short INT16; -#endif - -/* INT32 must hold at least signed 32-bit values. */ - -#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ -typedef long INT32; -#endif - -/* Datatype used for image dimensions. The JPEG standard only supports - * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore - * "unsigned int" is sufficient on all machines. However, if you need to - * handle larger images and you don't mind deviating from the spec, you - * can change this datatype. - */ - -typedef unsigned int JDIMENSION; - -#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ - - -/* These macros are used in all function definitions and extern declarations. - * You could modify them if you need to change function linkage conventions; - * in particular, you'll need to do that to make the library a Windows DLL. - * Another application is to make all functions global for use with debuggers - * or code profilers that require it. - */ - -/* a function called through method pointers: */ -#define METHODDEF(type) static type -/* a function used only in its module: */ -#define LOCAL(type) static type -/* a function referenced thru EXTERNs: */ -#define GLOBAL(type) type -/* a reference to a GLOBAL function: */ -#define EXTERN(type) extern type - - -/* This macro is used to declare a "method", that is, a function pointer. - * We want to supply prototype parameters if the compiler can cope. - * Note that the arglist parameter must be parenthesized! - * Again, you can customize this if you need special linkage keywords. - */ - -#ifdef HAVE_PROTOTYPES -#define JMETHOD(type,methodname,arglist) type (*methodname) arglist -#else -#define JMETHOD(type,methodname,arglist) type (*methodname) () -#endif - - -/* Here is the pseudo-keyword for declaring pointers that must be "far" - * on 80x86 machines. Most of the specialized coding for 80x86 is handled - * by just saying "FAR *" where such a pointer is needed. In a few places - * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol. - */ - -#ifdef NEED_FAR_POINTERS -#define FAR far -#else -#define FAR -#endif - - -/* - * On a few systems, type boolean and/or its values FALSE, TRUE may appear - * in standard header files. Or you may have conflicts with application- - * specific header files that you want to include together with these files. - * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. - */ - -#ifndef HAVE_BOOLEAN -typedef int boolean; -#endif -#ifndef FALSE /* in case these macros already exist */ -#define FALSE 0 /* values of boolean */ -#endif -#ifndef TRUE -#define TRUE 1 -#endif - - -/* - * The remaining options affect code selection within the JPEG library, - * but they don't need to be visible to most applications using the library. - * To minimize application namespace pollution, the symbols won't be - * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined. - */ - -#ifdef JPEG_INTERNALS -#define JPEG_INTERNAL_OPTIONS -#endif - -#ifdef JPEG_INTERNAL_OPTIONS - - -/* - * These defines indicate whether to include various optional functions. - * Undefining some of these symbols will produce a smaller but less capable - * library. Note that you can leave certain source files out of the - * compilation/linking process if you've #undef'd the corresponding symbols. - * (You may HAVE to do that if your compiler doesn't like null source files.) - */ - -/* Arithmetic coding is unsupported for legal reasons. Complaints to IBM. */ - -/* Capability options common to encoder and decoder: */ - -#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */ -#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */ -#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */ - -/* Encoder capability options: */ - -#undef C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ -#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ -#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ -#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ -/* Note: if you selected 12-bit data precision, it is dangerous to turn off - * ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit - * precision, so jchuff.c normally uses entropy optimization to compute - * usable tables for higher precision. If you don't want to do optimization, - * you'll have to supply different default Huffman tables. - * The exact same statements apply for progressive JPEG: the default tables - * don't work for progressive mode. (This may get fixed, however.) - */ -#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */ - -/* Decoder capability options: */ - -#undef D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ -#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ -#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ -#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */ -#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */ -#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */ -#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */ -#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */ -#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */ -#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */ - -/* more capability options later, no doubt */ - - -/* - * Ordering of RGB data in scanlines passed to or from the application. - * If your application wants to deal with data in the order B,G,R, just - * change these macros. You can also deal with formats such as R,G,B,X - * (one extra byte per pixel) by changing RGB_PIXELSIZE. Note that changing - * the offsets will also change the order in which colormap data is organized. - * RESTRICTIONS: - * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats. - * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not - * useful if you are using JPEG color spaces other than YCbCr or grayscale. - * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE - * is not 3 (they don't understand about dummy color components!). So you - * can't use color quantization if you change that value. - */ - -#define RGB_RED 0 /* Offset of Red in an RGB scanline element */ -#define RGB_GREEN 1 /* Offset of Green */ -#define RGB_BLUE 2 /* Offset of Blue */ -#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ - - -/* Definitions for speed-related optimizations. */ - - -/* If your compiler supports inline functions, define INLINE - * as the inline keyword; otherwise define it as empty. - */ - -#ifndef INLINE -#ifdef __GNUC__ /* for instance, GNU C knows about inline */ -#define INLINE __inline__ -#endif -#ifndef INLINE -#define INLINE /* default is to define it as empty */ -#endif -#endif - - -/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying - * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER - * as short on such a machine. MULTIPLIER must be at least 16 bits wide. - */ - -#ifndef MULTIPLIER -#define MULTIPLIER int /* type for fastest integer multiply */ -#endif - - -/* FAST_FLOAT should be either float or double, whichever is done faster - * by your compiler. (Note that this type is only used in the floating point - * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.) - * Typically, float is faster in ANSI C compilers, while double is faster in - * pre-ANSI compilers (because they insist on converting to double anyway). - * The code below therefore chooses float if we have ANSI-style prototypes. - */ - -#ifndef FAST_FLOAT -#ifdef HAVE_PROTOTYPES -#define FAST_FLOAT float -#else -#define FAST_FLOAT double -#endif -#endif - -#endif /* JPEG_INTERNAL_OPTIONS */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jpegint.h b/gtkmm-osx/trunk/jpeg-6b/jpegint.h deleted file mode 100644 index 95b00d4..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jpegint.h +++ /dev/null @@ -1,392 +0,0 @@ -/* - * jpegint.h - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file provides common declarations for the various JPEG modules. - * These declarations are considered internal to the JPEG library; most - * applications using the library shouldn't need to include this file. - */ - - -/* Declarations for both compression & decompression */ - -typedef enum { /* Operating modes for buffer controllers */ - JBUF_PASS_THRU, /* Plain stripwise operation */ - /* Remaining modes require a full-image buffer to have been created */ - JBUF_SAVE_SOURCE, /* Run source subobject only, save output */ - JBUF_CRANK_DEST, /* Run dest subobject only, using saved data */ - JBUF_SAVE_AND_PASS /* Run both subobjects, save output */ -} J_BUF_MODE; - -/* Values of global_state field (jdapi.c has some dependencies on ordering!) */ -#define CSTATE_START 100 /* after create_compress */ -#define CSTATE_SCANNING 101 /* start_compress done, write_scanlines OK */ -#define CSTATE_RAW_OK 102 /* start_compress done, write_raw_data OK */ -#define CSTATE_WRCOEFS 103 /* jpeg_write_coefficients done */ -#define DSTATE_START 200 /* after create_decompress */ -#define DSTATE_INHEADER 201 /* reading header markers, no SOS yet */ -#define DSTATE_READY 202 /* found SOS, ready for start_decompress */ -#define DSTATE_PRELOAD 203 /* reading multiscan file in start_decompress*/ -#define DSTATE_PRESCAN 204 /* performing dummy pass for 2-pass quant */ -#define DSTATE_SCANNING 205 /* start_decompress done, read_scanlines OK */ -#define DSTATE_RAW_OK 206 /* start_decompress done, read_raw_data OK */ -#define DSTATE_BUFIMAGE 207 /* expecting jpeg_start_output */ -#define DSTATE_BUFPOST 208 /* looking for SOS/EOI in jpeg_finish_output */ -#define DSTATE_RDCOEFS 209 /* reading file in jpeg_read_coefficients */ -#define DSTATE_STOPPING 210 /* looking for EOI in jpeg_finish_decompress */ - - -/* Declarations for compression modules */ - -/* Master control module */ -struct jpeg_comp_master { - JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo)); - JMETHOD(void, pass_startup, (j_compress_ptr cinfo)); - JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); - - /* State variables made visible to other modules */ - boolean call_pass_startup; /* True if pass_startup must be called */ - boolean is_last_pass; /* True during last pass */ -}; - -/* Main buffer control (downsampled-data buffer) */ -struct jpeg_c_main_controller { - JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(void, process_data, (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, - JDIMENSION in_rows_avail)); -}; - -/* Compression preprocessing (downsampling input buffer control) */ -struct jpeg_c_prep_controller { - JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(void, pre_process_data, (j_compress_ptr cinfo, - JSAMPARRAY input_buf, - JDIMENSION *in_row_ctr, - JDIMENSION in_rows_avail, - JSAMPIMAGE output_buf, - JDIMENSION *out_row_group_ctr, - JDIMENSION out_row_groups_avail)); -}; - -/* Coefficient buffer control */ -struct jpeg_c_coef_controller { - JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(boolean, compress_data, (j_compress_ptr cinfo, - JSAMPIMAGE input_buf)); -}; - -/* Colorspace conversion */ -struct jpeg_color_converter { - JMETHOD(void, start_pass, (j_compress_ptr cinfo)); - JMETHOD(void, color_convert, (j_compress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPIMAGE output_buf, - JDIMENSION output_row, int num_rows)); -}; - -/* Downsampling */ -struct jpeg_downsampler { - JMETHOD(void, start_pass, (j_compress_ptr cinfo)); - JMETHOD(void, downsample, (j_compress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION in_row_index, - JSAMPIMAGE output_buf, - JDIMENSION out_row_group_index)); - - boolean need_context_rows; /* TRUE if need rows above & below */ -}; - -/* Forward DCT (also controls coefficient quantization) */ -struct jpeg_forward_dct { - JMETHOD(void, start_pass, (j_compress_ptr cinfo)); - /* perhaps this should be an array??? */ - JMETHOD(void, forward_DCT, (j_compress_ptr cinfo, - jpeg_component_info * compptr, - JSAMPARRAY sample_data, JBLOCKROW coef_blocks, - JDIMENSION start_row, JDIMENSION start_col, - JDIMENSION num_blocks)); -}; - -/* Entropy encoding */ -struct jpeg_entropy_encoder { - JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics)); - JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data)); - JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); -}; - -/* Marker writing */ -struct jpeg_marker_writer { - JMETHOD(void, write_file_header, (j_compress_ptr cinfo)); - JMETHOD(void, write_frame_header, (j_compress_ptr cinfo)); - JMETHOD(void, write_scan_header, (j_compress_ptr cinfo)); - JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo)); - JMETHOD(void, write_tables_only, (j_compress_ptr cinfo)); - /* These routines are exported to allow insertion of extra markers */ - /* Probably only COM and APPn markers should be written this way */ - JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker, - unsigned int datalen)); - JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val)); -}; - - -/* Declarations for decompression modules */ - -/* Master control module */ -struct jpeg_decomp_master { - JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo)); - - /* State variables made visible to other modules */ - boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */ -}; - -/* Input control module */ -struct jpeg_input_controller { - JMETHOD(int, consume_input, (j_decompress_ptr cinfo)); - JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo)); - JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo)); - - /* State variables made visible to other modules */ - boolean has_multiple_scans; /* True if file has multiple scans */ - boolean eoi_reached; /* True when EOI has been consumed */ -}; - -/* Main buffer control (downsampled-data buffer) */ -struct jpeg_d_main_controller { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(void, process_data, (j_decompress_ptr cinfo, - JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail)); -}; - -/* Coefficient buffer control */ -struct jpeg_d_coef_controller { - JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); - JMETHOD(int, consume_data, (j_decompress_ptr cinfo)); - JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo)); - JMETHOD(int, decompress_data, (j_decompress_ptr cinfo, - JSAMPIMAGE output_buf)); - /* Pointer to array of coefficient virtual arrays, or NULL if none */ - jvirt_barray_ptr *coef_arrays; -}; - -/* Decompression postprocessing (color quantization buffer control) */ -struct jpeg_d_post_controller { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); - JMETHOD(void, post_process_data, (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, - JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, - JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail)); -}; - -/* Marker reading & parsing */ -struct jpeg_marker_reader { - JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo)); - /* Read markers until SOS or EOI. - * Returns same codes as are defined for jpeg_consume_input: - * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. - */ - JMETHOD(int, read_markers, (j_decompress_ptr cinfo)); - /* Read a restart marker --- exported for use by entropy decoder only */ - jpeg_marker_parser_method read_restart_marker; - - /* State of marker reader --- nominally internal, but applications - * supplying COM or APPn handlers might like to know the state. - */ - boolean saw_SOI; /* found SOI? */ - boolean saw_SOF; /* found SOF? */ - int next_restart_num; /* next restart number expected (0-7) */ - unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */ -}; - -/* Entropy decoding */ -struct jpeg_entropy_decoder { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); - JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo, - JBLOCKROW *MCU_data)); - - /* This is here to share code between baseline and progressive decoders; */ - /* other modules probably should not use it */ - boolean insufficient_data; /* set TRUE after emitting warning */ -}; - -/* Inverse DCT (also performs dequantization) */ -typedef JMETHOD(void, inverse_DCT_method_ptr, - (j_decompress_ptr cinfo, jpeg_component_info * compptr, - JCOEFPTR coef_block, - JSAMPARRAY output_buf, JDIMENSION output_col)); - -struct jpeg_inverse_dct { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); - /* It is useful to allow each component to have a separate IDCT method. */ - inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS]; -}; - -/* Upsampling (note that upsampler must also call color converter) */ -struct jpeg_upsampler { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, upsample, (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, - JDIMENSION *in_row_group_ctr, - JDIMENSION in_row_groups_avail, - JSAMPARRAY output_buf, - JDIMENSION *out_row_ctr, - JDIMENSION out_rows_avail)); - - boolean need_context_rows; /* TRUE if need rows above & below */ -}; - -/* Colorspace conversion */ -struct jpeg_color_deconverter { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, color_convert, (j_decompress_ptr cinfo, - JSAMPIMAGE input_buf, JDIMENSION input_row, - JSAMPARRAY output_buf, int num_rows)); -}; - -/* Color quantization or color precision reduction */ -struct jpeg_color_quantizer { - JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan)); - JMETHOD(void, color_quantize, (j_decompress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPARRAY output_buf, - int num_rows)); - JMETHOD(void, finish_pass, (j_decompress_ptr cinfo)); - JMETHOD(void, new_color_map, (j_decompress_ptr cinfo)); -}; - - -/* Miscellaneous useful macros */ - -#undef MAX -#define MAX(a,b) ((a) > (b) ? (a) : (b)) -#undef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) - - -/* We assume that right shift corresponds to signed division by 2 with - * rounding towards minus infinity. This is correct for typical "arithmetic - * shift" instructions that shift in copies of the sign bit. But some - * C compilers implement >> with an unsigned shift. For these machines you - * must define RIGHT_SHIFT_IS_UNSIGNED. - * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity. - * It is only applied with constant shift counts. SHIFT_TEMPS must be - * included in the variables of any routine using RIGHT_SHIFT. - */ - -#ifdef RIGHT_SHIFT_IS_UNSIGNED -#define SHIFT_TEMPS INT32 shift_temp; -#define RIGHT_SHIFT(x,shft) \ - ((shift_temp = (x)) < 0 ? \ - (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \ - (shift_temp >> (shft))) -#else -#define SHIFT_TEMPS -#define RIGHT_SHIFT(x,shft) ((x) >> (shft)) -#endif - - -/* Short forms of external names for systems with brain-damaged linkers. */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jinit_compress_master jICompress -#define jinit_c_master_control jICMaster -#define jinit_c_main_controller jICMainC -#define jinit_c_prep_controller jICPrepC -#define jinit_c_coef_controller jICCoefC -#define jinit_color_converter jICColor -#define jinit_downsampler jIDownsampler -#define jinit_forward_dct jIFDCT -#define jinit_huff_encoder jIHEncoder -#define jinit_phuff_encoder jIPHEncoder -#define jinit_marker_writer jIMWriter -#define jinit_master_decompress jIDMaster -#define jinit_d_main_controller jIDMainC -#define jinit_d_coef_controller jIDCoefC -#define jinit_d_post_controller jIDPostC -#define jinit_input_controller jIInCtlr -#define jinit_marker_reader jIMReader -#define jinit_huff_decoder jIHDecoder -#define jinit_phuff_decoder jIPHDecoder -#define jinit_inverse_dct jIIDCT -#define jinit_upsampler jIUpsampler -#define jinit_color_deconverter jIDColor -#define jinit_1pass_quantizer jI1Quant -#define jinit_2pass_quantizer jI2Quant -#define jinit_merged_upsampler jIMUpsampler -#define jinit_memory_mgr jIMemMgr -#define jdiv_round_up jDivRound -#define jround_up jRound -#define jcopy_sample_rows jCopySamples -#define jcopy_block_row jCopyBlocks -#define jzero_far jZeroFar -#define jpeg_zigzag_order jZIGTable -#define jpeg_natural_order jZAGTable -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - - -/* Compression module initialization routines */ -EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo)); -EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo, - boolean transcode_only)); -EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo, - boolean need_full_buffer)); -EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo, - boolean need_full_buffer)); -EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo, - boolean need_full_buffer)); -EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo)); -EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo)); -EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo)); -EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo)); -EXTERN(void) jinit_phuff_encoder JPP((j_compress_ptr cinfo)); -EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo)); -/* Decompression module initialization routines */ -EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo, - boolean need_full_buffer)); -EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo, - boolean need_full_buffer)); -EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo, - boolean need_full_buffer)); -EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_phuff_decoder JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo)); -EXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo)); -/* Memory manager initialization */ -EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo)); - -/* Utility routines in jutils.c */ -EXTERN(long) jdiv_round_up JPP((long a, long b)); -EXTERN(long) jround_up JPP((long a, long b)); -EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row, - JSAMPARRAY output_array, int dest_row, - int num_rows, JDIMENSION num_cols)); -EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row, - JDIMENSION num_blocks)); -EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero)); -/* Constant tables in jutils.c */ -#if 0 /* This table is not actually needed in v6a */ -extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */ -#endif -extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */ - -/* Suppress undefined-structure complaints if necessary. */ - -#ifdef INCOMPLETE_TYPES_BROKEN -#ifndef AM_MEMORY_MANAGER /* only jmemmgr.c defines these */ -struct jvirt_sarray_control { long dummy; }; -struct jvirt_barray_control { long dummy; }; -#endif -#endif /* INCOMPLETE_TYPES_BROKEN */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jpeglib.h b/gtkmm-osx/trunk/jpeg-6b/jpeglib.h deleted file mode 100644 index 31569a2..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jpeglib.h +++ /dev/null @@ -1,1096 +0,0 @@ -/* - * jpeglib.h - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file defines the application interface for the JPEG library. - * Most applications using the library need only include this file, - * and perhaps jerror.h if they want to know the exact error codes. - */ - -#ifndef JPEGLIB_H -#define JPEGLIB_H - -/* - * First we include the configuration files that record how this - * installation of the JPEG library is set up. jconfig.h can be - * generated automatically for many systems. jmorecfg.h contains - * manual configuration options that most people need not worry about. - */ - -#ifndef JCONFIG_INCLUDED /* in case jinclude.h already did */ -#include "jconfig.h" /* widely used configuration options */ -#endif -#include "jmorecfg.h" /* seldom changed options */ - - -/* Version ID for the JPEG library. - * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60". - */ - -#define JPEG_LIB_VERSION 62 /* Version 6b */ - - -/* Various constants determining the sizes of things. - * All of these are specified by the JPEG standard, so don't change them - * if you want to be compatible. - */ - -#define DCTSIZE 8 /* The basic DCT block is 8x8 samples */ -#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ -#define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */ -#define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */ -#define NUM_ARITH_TBLS 16 /* Arith-coding tables are numbered 0..15 */ -#define MAX_COMPS_IN_SCAN 4 /* JPEG limit on # of components in one scan */ -#define MAX_SAMP_FACTOR 4 /* JPEG limit on sampling factors */ -/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard; - * the PostScript DCT filter can emit files with many more than 10 blocks/MCU. - * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU - * to handle it. We even let you do this from the jconfig.h file. However, - * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe - * sometimes emits noncompliant files doesn't mean you should too. - */ -#define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on blocks per MCU */ -#ifndef D_MAX_BLOCKS_IN_MCU -#define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on blocks per MCU */ -#endif - - -/* Data structures for images (arrays of samples and of DCT coefficients). - * On 80x86 machines, the image arrays are too big for near pointers, - * but the pointer arrays can fit in near memory. - */ - -typedef JSAMPLE FAR *JSAMPROW; /* ptr to one image row of pixel samples. */ -typedef JSAMPROW *JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */ -typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */ - -typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */ -typedef JBLOCK FAR *JBLOCKROW; /* pointer to one row of coefficient blocks */ -typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */ -typedef JBLOCKARRAY *JBLOCKIMAGE; /* a 3-D array of coefficient blocks */ - -typedef JCOEF FAR *JCOEFPTR; /* useful in a couple of places */ - - -/* Types for JPEG compression parameters and working tables. */ - - -/* DCT coefficient quantization tables. */ - -typedef struct { - /* This array gives the coefficient quantizers in natural array order - * (not the zigzag order in which they are stored in a JPEG DQT marker). - * CAUTION: IJG versions prior to v6a kept this array in zigzag order. - */ - UINT16 quantval[DCTSIZE2]; /* quantization step for each coefficient */ - /* This field is used only during compression. It's initialized FALSE when - * the table is created, and set TRUE when it's been output to the file. - * You could suppress output of a table by setting this to TRUE. - * (See jpeg_suppress_tables for an example.) - */ - boolean sent_table; /* TRUE when table has been output */ -} JQUANT_TBL; - - -/* Huffman coding tables. */ - -typedef struct { - /* These two fields directly represent the contents of a JPEG DHT marker */ - UINT8 bits[17]; /* bits[k] = # of symbols with codes of */ - /* length k bits; bits[0] is unused */ - UINT8 huffval[256]; /* The symbols, in order of incr code length */ - /* This field is used only during compression. It's initialized FALSE when - * the table is created, and set TRUE when it's been output to the file. - * You could suppress output of a table by setting this to TRUE. - * (See jpeg_suppress_tables for an example.) - */ - boolean sent_table; /* TRUE when table has been output */ -} JHUFF_TBL; - - -/* Basic info about one component (color channel). */ - -typedef struct { - /* These values are fixed over the whole image. */ - /* For compression, they must be supplied by parameter setup; */ - /* for decompression, they are read from the SOF marker. */ - int component_id; /* identifier for this component (0..255) */ - int component_index; /* its index in SOF or cinfo->comp_info[] */ - int h_samp_factor; /* horizontal sampling factor (1..4) */ - int v_samp_factor; /* vertical sampling factor (1..4) */ - int quant_tbl_no; /* quantization table selector (0..3) */ - /* These values may vary between scans. */ - /* For compression, they must be supplied by parameter setup; */ - /* for decompression, they are read from the SOS marker. */ - /* The decompressor output side may not use these variables. */ - int dc_tbl_no; /* DC entropy table selector (0..3) */ - int ac_tbl_no; /* AC entropy table selector (0..3) */ - - /* Remaining fields should be treated as private by applications. */ - - /* These values are computed during compression or decompression startup: */ - /* Component's size in DCT blocks. - * Any dummy blocks added to complete an MCU are not counted; therefore - * these values do not depend on whether a scan is interleaved or not. - */ - JDIMENSION width_in_blocks; - JDIMENSION height_in_blocks; - /* Size of a DCT block in samples. Always DCTSIZE for compression. - * For decompression this is the size of the output from one DCT block, - * reflecting any scaling we choose to apply during the IDCT step. - * Values of 1,2,4,8 are likely to be supported. Note that different - * components may receive different IDCT scalings. - */ - int DCT_scaled_size; - /* The downsampled dimensions are the component's actual, unpadded number - * of samples at the main buffer (preprocessing/compression interface), thus - * downsampled_width = ceil(image_width * Hi/Hmax) - * and similarly for height. For decompression, IDCT scaling is included, so - * downsampled_width = ceil(image_width * Hi/Hmax * DCT_scaled_size/DCTSIZE) - */ - JDIMENSION downsampled_width; /* actual width in samples */ - JDIMENSION downsampled_height; /* actual height in samples */ - /* This flag is used only for decompression. In cases where some of the - * components will be ignored (eg grayscale output from YCbCr image), - * we can skip most computations for the unused components. - */ - boolean component_needed; /* do we need the value of this component? */ - - /* These values are computed before starting a scan of the component. */ - /* The decompressor output side may not use these variables. */ - int MCU_width; /* number of blocks per MCU, horizontally */ - int MCU_height; /* number of blocks per MCU, vertically */ - int MCU_blocks; /* MCU_width * MCU_height */ - int MCU_sample_width; /* MCU width in samples, MCU_width*DCT_scaled_size */ - int last_col_width; /* # of non-dummy blocks across in last MCU */ - int last_row_height; /* # of non-dummy blocks down in last MCU */ - - /* Saved quantization table for component; NULL if none yet saved. - * See jdinput.c comments about the need for this information. - * This field is currently used only for decompression. - */ - JQUANT_TBL * quant_table; - - /* Private per-component storage for DCT or IDCT subsystem. */ - void * dct_table; -} jpeg_component_info; - - -/* The script for encoding a multiple-scan file is an array of these: */ - -typedef struct { - int comps_in_scan; /* number of components encoded in this scan */ - int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */ - int Ss, Se; /* progressive JPEG spectral selection parms */ - int Ah, Al; /* progressive JPEG successive approx. parms */ -} jpeg_scan_info; - -/* The decompressor can save APPn and COM markers in a list of these: */ - -typedef struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr; - -struct jpeg_marker_struct { - jpeg_saved_marker_ptr next; /* next in list, or NULL */ - UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */ - unsigned int original_length; /* # bytes of data in the file */ - unsigned int data_length; /* # bytes of data saved at data[] */ - JOCTET FAR * data; /* the data contained in the marker */ - /* the marker length word is not counted in data_length or original_length */ -}; - -/* Known color spaces. */ - -typedef enum { - JCS_UNKNOWN, /* error/unspecified */ - JCS_GRAYSCALE, /* monochrome */ - JCS_RGB, /* red/green/blue */ - JCS_YCbCr, /* Y/Cb/Cr (also known as YUV) */ - JCS_CMYK, /* C/M/Y/K */ - JCS_YCCK /* Y/Cb/Cr/K */ -} J_COLOR_SPACE; - -/* DCT/IDCT algorithm options. */ - -typedef enum { - JDCT_ISLOW, /* slow but accurate integer algorithm */ - JDCT_IFAST, /* faster, less accurate integer method */ - JDCT_FLOAT /* floating-point: accurate, fast on fast HW */ -} J_DCT_METHOD; - -#ifndef JDCT_DEFAULT /* may be overridden in jconfig.h */ -#define JDCT_DEFAULT JDCT_ISLOW -#endif -#ifndef JDCT_FASTEST /* may be overridden in jconfig.h */ -#define JDCT_FASTEST JDCT_IFAST -#endif - -/* Dithering options for decompression. */ - -typedef enum { - JDITHER_NONE, /* no dithering */ - JDITHER_ORDERED, /* simple ordered dither */ - JDITHER_FS /* Floyd-Steinberg error diffusion dither */ -} J_DITHER_MODE; - - -/* Common fields between JPEG compression and decompression master structs. */ - -#define jpeg_common_fields \ - struct jpeg_error_mgr * err; /* Error handler module */\ - struct jpeg_memory_mgr * mem; /* Memory manager module */\ - struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\ - void * client_data; /* Available for use by application */\ - boolean is_decompressor; /* So common code can tell which is which */\ - int global_state /* For checking call sequence validity */ - -/* Routines that are to be used by both halves of the library are declared - * to receive a pointer to this structure. There are no actual instances of - * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct. - */ -struct jpeg_common_struct { - jpeg_common_fields; /* Fields common to both master struct types */ - /* Additional fields follow in an actual jpeg_compress_struct or - * jpeg_decompress_struct. All three structs must agree on these - * initial fields! (This would be a lot cleaner in C++.) - */ -}; - -typedef struct jpeg_common_struct * j_common_ptr; -typedef struct jpeg_compress_struct * j_compress_ptr; -typedef struct jpeg_decompress_struct * j_decompress_ptr; - - -/* Master record for a compression instance */ - -struct jpeg_compress_struct { - jpeg_common_fields; /* Fields shared with jpeg_decompress_struct */ - - /* Destination for compressed data */ - struct jpeg_destination_mgr * dest; - - /* Description of source image --- these fields must be filled in by - * outer application before starting compression. in_color_space must - * be correct before you can even call jpeg_set_defaults(). - */ - - JDIMENSION image_width; /* input image width */ - JDIMENSION image_height; /* input image height */ - int input_components; /* # of color components in input image */ - J_COLOR_SPACE in_color_space; /* colorspace of input image */ - - double input_gamma; /* image gamma of input image */ - - /* Compression parameters --- these fields must be set before calling - * jpeg_start_compress(). We recommend calling jpeg_set_defaults() to - * initialize everything to reasonable defaults, then changing anything - * the application specifically wants to change. That way you won't get - * burnt when new parameters are added. Also note that there are several - * helper routines to simplify changing parameters. - */ - - int data_precision; /* bits of precision in image data */ - - int num_components; /* # of color components in JPEG image */ - J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ - - jpeg_component_info * comp_info; - /* comp_info[i] describes component that appears i'th in SOF */ - - JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; - /* ptrs to coefficient quantization tables, or NULL if not defined */ - - JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; - JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; - /* ptrs to Huffman coding tables, or NULL if not defined */ - - UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ - UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ - UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ - - int num_scans; /* # of entries in scan_info array */ - const jpeg_scan_info * scan_info; /* script for multi-scan file, or NULL */ - /* The default value of scan_info is NULL, which causes a single-scan - * sequential JPEG file to be emitted. To create a multi-scan file, - * set num_scans and scan_info to point to an array of scan definitions. - */ - - boolean raw_data_in; /* TRUE=caller supplies downsampled data */ - boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ - boolean optimize_coding; /* TRUE=optimize entropy encoding parms */ - boolean CCIR601_sampling; /* TRUE=first samples are cosited */ - int smoothing_factor; /* 1..100, or 0 for no input smoothing */ - J_DCT_METHOD dct_method; /* DCT algorithm selector */ - - /* The restart interval can be specified in absolute MCUs by setting - * restart_interval, or in MCU rows by setting restart_in_rows - * (in which case the correct restart_interval will be figured - * for each scan). - */ - unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */ - int restart_in_rows; /* if > 0, MCU rows per restart interval */ - - /* Parameters controlling emission of special markers. */ - - boolean write_JFIF_header; /* should a JFIF marker be written? */ - UINT8 JFIF_major_version; /* What to write for the JFIF version number */ - UINT8 JFIF_minor_version; - /* These three values are not used by the JPEG code, merely copied */ - /* into the JFIF APP0 marker. density_unit can be 0 for unknown, */ - /* 1 for dots/inch, or 2 for dots/cm. Note that the pixel aspect */ - /* ratio is defined by X_density/Y_density even when density_unit=0. */ - UINT8 density_unit; /* JFIF code for pixel size units */ - UINT16 X_density; /* Horizontal pixel density */ - UINT16 Y_density; /* Vertical pixel density */ - boolean write_Adobe_marker; /* should an Adobe marker be written? */ - - /* State variable: index of next scanline to be written to - * jpeg_write_scanlines(). Application may use this to control its - * processing loop, e.g., "while (next_scanline < image_height)". - */ - - JDIMENSION next_scanline; /* 0 .. image_height-1 */ - - /* Remaining fields are known throughout compressor, but generally - * should not be touched by a surrounding application. - */ - - /* - * These fields are computed during compression startup - */ - boolean progressive_mode; /* TRUE if scan script uses progressive mode */ - int max_h_samp_factor; /* largest h_samp_factor */ - int max_v_samp_factor; /* largest v_samp_factor */ - - JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coef ctlr */ - /* The coefficient controller receives data in units of MCU rows as defined - * for fully interleaved scans (whether the JPEG file is interleaved or not). - * There are v_samp_factor * DCTSIZE sample rows of each component in an - * "iMCU" (interleaved MCU) row. - */ - - /* - * These fields are valid during any one scan. - * They describe the components and MCUs actually appearing in the scan. - */ - int comps_in_scan; /* # of JPEG components in this scan */ - jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; - /* *cur_comp_info[i] describes component that appears i'th in SOS */ - - JDIMENSION MCUs_per_row; /* # of MCUs across the image */ - JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ - - int blocks_in_MCU; /* # of DCT blocks per MCU */ - int MCU_membership[C_MAX_BLOCKS_IN_MCU]; - /* MCU_membership[i] is index in cur_comp_info of component owning */ - /* i'th block in an MCU */ - - int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ - - /* - * Links to compression subobjects (methods and private variables of modules) - */ - struct jpeg_comp_master * master; - struct jpeg_c_main_controller * main; - struct jpeg_c_prep_controller * prep; - struct jpeg_c_coef_controller * coef; - struct jpeg_marker_writer * marker; - struct jpeg_color_converter * cconvert; - struct jpeg_downsampler * downsample; - struct jpeg_forward_dct * fdct; - struct jpeg_entropy_encoder * entropy; - jpeg_scan_info * script_space; /* workspace for jpeg_simple_progression */ - int script_space_size; -}; - - -/* Master record for a decompression instance */ - -struct jpeg_decompress_struct { - jpeg_common_fields; /* Fields shared with jpeg_compress_struct */ - - /* Source of compressed data */ - struct jpeg_source_mgr * src; - - /* Basic description of image --- filled in by jpeg_read_header(). */ - /* Application may inspect these values to decide how to process image. */ - - JDIMENSION image_width; /* nominal image width (from SOF marker) */ - JDIMENSION image_height; /* nominal image height */ - int num_components; /* # of color components in JPEG image */ - J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ - - /* Decompression processing parameters --- these fields must be set before - * calling jpeg_start_decompress(). Note that jpeg_read_header() initializes - * them to default values. - */ - - J_COLOR_SPACE out_color_space; /* colorspace for output */ - - unsigned int scale_num, scale_denom; /* fraction by which to scale image */ - - double output_gamma; /* image gamma wanted in output */ - - boolean buffered_image; /* TRUE=multiple output passes */ - boolean raw_data_out; /* TRUE=downsampled data wanted */ - - J_DCT_METHOD dct_method; /* IDCT algorithm selector */ - boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */ - boolean do_block_smoothing; /* TRUE=apply interblock smoothing */ - - boolean quantize_colors; /* TRUE=colormapped output wanted */ - /* the following are ignored if not quantize_colors: */ - J_DITHER_MODE dither_mode; /* type of color dithering to use */ - boolean two_pass_quantize; /* TRUE=use two-pass color quantization */ - int desired_number_of_colors; /* max # colors to use in created colormap */ - /* these are significant only in buffered-image mode: */ - boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */ - boolean enable_external_quant;/* enable future use of external colormap */ - boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */ - - /* Description of actual output image that will be returned to application. - * These fields are computed by jpeg_start_decompress(). - * You can also use jpeg_calc_output_dimensions() to determine these values - * in advance of calling jpeg_start_decompress(). - */ - - JDIMENSION output_width; /* scaled image width */ - JDIMENSION output_height; /* scaled image height */ - int out_color_components; /* # of color components in out_color_space */ - int output_components; /* # of color components returned */ - /* output_components is 1 (a colormap index) when quantizing colors; - * otherwise it equals out_color_components. - */ - int rec_outbuf_height; /* min recommended height of scanline buffer */ - /* If the buffer passed to jpeg_read_scanlines() is less than this many rows - * high, space and time will be wasted due to unnecessary data copying. - * Usually rec_outbuf_height will be 1 or 2, at most 4. - */ - - /* When quantizing colors, the output colormap is described by these fields. - * The application can supply a colormap by setting colormap non-NULL before - * calling jpeg_start_decompress; otherwise a colormap is created during - * jpeg_start_decompress or jpeg_start_output. - * The map has out_color_components rows and actual_number_of_colors columns. - */ - int actual_number_of_colors; /* number of entries in use */ - JSAMPARRAY colormap; /* The color map as a 2-D pixel array */ - - /* State variables: these variables indicate the progress of decompression. - * The application may examine these but must not modify them. - */ - - /* Row index of next scanline to be read from jpeg_read_scanlines(). - * Application may use this to control its processing loop, e.g., - * "while (output_scanline < output_height)". - */ - JDIMENSION output_scanline; /* 0 .. output_height-1 */ - - /* Current input scan number and number of iMCU rows completed in scan. - * These indicate the progress of the decompressor input side. - */ - int input_scan_number; /* Number of SOS markers seen so far */ - JDIMENSION input_iMCU_row; /* Number of iMCU rows completed */ - - /* The "output scan number" is the notional scan being displayed by the - * output side. The decompressor will not allow output scan/row number - * to get ahead of input scan/row, but it can fall arbitrarily far behind. - */ - int output_scan_number; /* Nominal scan number being displayed */ - JDIMENSION output_iMCU_row; /* Number of iMCU rows read */ - - /* Current progression status. coef_bits[c][i] indicates the precision - * with which component c's DCT coefficient i (in zigzag order) is known. - * It is -1 when no data has yet been received, otherwise it is the point - * transform (shift) value for the most recent scan of the coefficient - * (thus, 0 at completion of the progression). - * This pointer is NULL when reading a non-progressive file. - */ - int (*coef_bits)[DCTSIZE2]; /* -1 or current Al value for each coef */ - - /* Internal JPEG parameters --- the application usually need not look at - * these fields. Note that the decompressor output side may not use - * any parameters that can change between scans. - */ - - /* Quantization and Huffman tables are carried forward across input - * datastreams when processing abbreviated JPEG datastreams. - */ - - JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; - /* ptrs to coefficient quantization tables, or NULL if not defined */ - - JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; - JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; - /* ptrs to Huffman coding tables, or NULL if not defined */ - - /* These parameters are never carried across datastreams, since they - * are given in SOF/SOS markers or defined to be reset by SOI. - */ - - int data_precision; /* bits of precision in image data */ - - jpeg_component_info * comp_info; - /* comp_info[i] describes component that appears i'th in SOF */ - - boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */ - boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ - - UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ - UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ - UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ - - unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */ - - /* These fields record data obtained from optional markers recognized by - * the JPEG library. - */ - boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */ - /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */ - UINT8 JFIF_major_version; /* JFIF version number */ - UINT8 JFIF_minor_version; - UINT8 density_unit; /* JFIF code for pixel size units */ - UINT16 X_density; /* Horizontal pixel density */ - UINT16 Y_density; /* Vertical pixel density */ - boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */ - UINT8 Adobe_transform; /* Color transform code from Adobe marker */ - - boolean CCIR601_sampling; /* TRUE=first samples are cosited */ - - /* Aside from the specific data retained from APPn markers known to the - * library, the uninterpreted contents of any or all APPn and COM markers - * can be saved in a list for examination by the application. - */ - jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */ - - /* Remaining fields are known throughout decompressor, but generally - * should not be touched by a surrounding application. - */ - - /* - * These fields are computed during decompression startup - */ - int max_h_samp_factor; /* largest h_samp_factor */ - int max_v_samp_factor; /* largest v_samp_factor */ - - int min_DCT_scaled_size; /* smallest DCT_scaled_size of any component */ - - JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */ - /* The coefficient controller's input and output progress is measured in - * units of "iMCU" (interleaved MCU) rows. These are the same as MCU rows - * in fully interleaved JPEG scans, but are used whether the scan is - * interleaved or not. We define an iMCU row as v_samp_factor DCT block - * rows of each component. Therefore, the IDCT output contains - * v_samp_factor*DCT_scaled_size sample rows of a component per iMCU row. - */ - - JSAMPLE * sample_range_limit; /* table for fast range-limiting */ - - /* - * These fields are valid during any one scan. - * They describe the components and MCUs actually appearing in the scan. - * Note that the decompressor output side must not use these fields. - */ - int comps_in_scan; /* # of JPEG components in this scan */ - jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; - /* *cur_comp_info[i] describes component that appears i'th in SOS */ - - JDIMENSION MCUs_per_row; /* # of MCUs across the image */ - JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ - - int blocks_in_MCU; /* # of DCT blocks per MCU */ - int MCU_membership[D_MAX_BLOCKS_IN_MCU]; - /* MCU_membership[i] is index in cur_comp_info of component owning */ - /* i'th block in an MCU */ - - int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ - - /* This field is shared between entropy decoder and marker parser. - * It is either zero or the code of a JPEG marker that has been - * read from the data source, but has not yet been processed. - */ - int unread_marker; - - /* - * Links to decompression subobjects (methods, private variables of modules) - */ - struct jpeg_decomp_master * master; - struct jpeg_d_main_controller * main; - struct jpeg_d_coef_controller * coef; - struct jpeg_d_post_controller * post; - struct jpeg_input_controller * inputctl; - struct jpeg_marker_reader * marker; - struct jpeg_entropy_decoder * entropy; - struct jpeg_inverse_dct * idct; - struct jpeg_upsampler * upsample; - struct jpeg_color_deconverter * cconvert; - struct jpeg_color_quantizer * cquantize; -}; - - -/* "Object" declarations for JPEG modules that may be supplied or called - * directly by the surrounding application. - * As with all objects in the JPEG library, these structs only define the - * publicly visible methods and state variables of a module. Additional - * private fields may exist after the public ones. - */ - - -/* Error handler object */ - -struct jpeg_error_mgr { - /* Error exit handler: does not return to caller */ - JMETHOD(void, error_exit, (j_common_ptr cinfo)); - /* Conditionally emit a trace or warning message */ - JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level)); - /* Routine that actually outputs a trace or error message */ - JMETHOD(void, output_message, (j_common_ptr cinfo)); - /* Format a message string for the most recent JPEG error or message */ - JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer)); -#define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */ - /* Reset error state variables at start of a new image */ - JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo)); - - /* The message ID code and any parameters are saved here. - * A message can have one string parameter or up to 8 int parameters. - */ - int msg_code; -#define JMSG_STR_PARM_MAX 80 - union { - int i[8]; - char s[JMSG_STR_PARM_MAX]; - } msg_parm; - - /* Standard state variables for error facility */ - - int trace_level; /* max msg_level that will be displayed */ - - /* For recoverable corrupt-data errors, we emit a warning message, - * but keep going unless emit_message chooses to abort. emit_message - * should count warnings in num_warnings. The surrounding application - * can check for bad data by seeing if num_warnings is nonzero at the - * end of processing. - */ - long num_warnings; /* number of corrupt-data warnings */ - - /* These fields point to the table(s) of error message strings. - * An application can change the table pointer to switch to a different - * message list (typically, to change the language in which errors are - * reported). Some applications may wish to add additional error codes - * that will be handled by the JPEG library error mechanism; the second - * table pointer is used for this purpose. - * - * First table includes all errors generated by JPEG library itself. - * Error code 0 is reserved for a "no such error string" message. - */ - const char * const * jpeg_message_table; /* Library errors */ - int last_jpeg_message; /* Table contains strings 0..last_jpeg_message */ - /* Second table can be added by application (see cjpeg/djpeg for example). - * It contains strings numbered first_addon_message..last_addon_message. - */ - const char * const * addon_message_table; /* Non-library errors */ - int first_addon_message; /* code for first string in addon table */ - int last_addon_message; /* code for last string in addon table */ -}; - - -/* Progress monitor object */ - -struct jpeg_progress_mgr { - JMETHOD(void, progress_monitor, (j_common_ptr cinfo)); - - long pass_counter; /* work units completed in this pass */ - long pass_limit; /* total number of work units in this pass */ - int completed_passes; /* passes completed so far */ - int total_passes; /* total number of passes expected */ -}; - - -/* Data destination object for compression */ - -struct jpeg_destination_mgr { - JOCTET * next_output_byte; /* => next byte to write in buffer */ - size_t free_in_buffer; /* # of byte spaces remaining in buffer */ - - JMETHOD(void, init_destination, (j_compress_ptr cinfo)); - JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo)); - JMETHOD(void, term_destination, (j_compress_ptr cinfo)); -}; - - -/* Data source object for decompression */ - -struct jpeg_source_mgr { - const JOCTET * next_input_byte; /* => next byte to read from buffer */ - size_t bytes_in_buffer; /* # of bytes remaining in buffer */ - - JMETHOD(void, init_source, (j_decompress_ptr cinfo)); - JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo)); - JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes)); - JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired)); - JMETHOD(void, term_source, (j_decompress_ptr cinfo)); -}; - - -/* Memory manager object. - * Allocates "small" objects (a few K total), "large" objects (tens of K), - * and "really big" objects (virtual arrays with backing store if needed). - * The memory manager does not allow individual objects to be freed; rather, - * each created object is assigned to a pool, and whole pools can be freed - * at once. This is faster and more convenient than remembering exactly what - * to free, especially where malloc()/free() are not too speedy. - * NB: alloc routines never return NULL. They exit to error_exit if not - * successful. - */ - -#define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */ -#define JPOOL_IMAGE 1 /* lasts until done with image/datastream */ -#define JPOOL_NUMPOOLS 2 - -typedef struct jvirt_sarray_control * jvirt_sarray_ptr; -typedef struct jvirt_barray_control * jvirt_barray_ptr; - - -struct jpeg_memory_mgr { - /* Method pointers */ - JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id, - size_t sizeofobject)); - JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id, - size_t sizeofobject)); - JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id, - JDIMENSION samplesperrow, - JDIMENSION numrows)); - JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id, - JDIMENSION blocksperrow, - JDIMENSION numrows)); - JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo, - int pool_id, - boolean pre_zero, - JDIMENSION samplesperrow, - JDIMENSION numrows, - JDIMENSION maxaccess)); - JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo, - int pool_id, - boolean pre_zero, - JDIMENSION blocksperrow, - JDIMENSION numrows, - JDIMENSION maxaccess)); - JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo)); - JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo, - jvirt_sarray_ptr ptr, - JDIMENSION start_row, - JDIMENSION num_rows, - boolean writable)); - JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo, - jvirt_barray_ptr ptr, - JDIMENSION start_row, - JDIMENSION num_rows, - boolean writable)); - JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id)); - JMETHOD(void, self_destruct, (j_common_ptr cinfo)); - - /* Limit on memory allocation for this JPEG object. (Note that this is - * merely advisory, not a guaranteed maximum; it only affects the space - * used for virtual-array buffers.) May be changed by outer application - * after creating the JPEG object. - */ - long max_memory_to_use; - - /* Maximum allocation request accepted by alloc_large. */ - long max_alloc_chunk; -}; - - -/* Routine signature for application-supplied marker processing methods. - * Need not pass marker code since it is stored in cinfo->unread_marker. - */ -typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo)); - - -/* Declarations for routines called by application. - * The JPP macro hides prototype parameters from compilers that can't cope. - * Note JPP requires double parentheses. - */ - -#ifdef HAVE_PROTOTYPES -#define JPP(arglist) arglist -#else -#define JPP(arglist) () -#endif - - -/* Short forms of external names for systems with brain-damaged linkers. - * We shorten external names to be unique in the first six letters, which - * is good enough for all known systems. - * (If your compiler itself needs names to be unique in less than 15 - * characters, you are out of luck. Get a better compiler.) - */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jpeg_std_error jStdError -#define jpeg_CreateCompress jCreaCompress -#define jpeg_CreateDecompress jCreaDecompress -#define jpeg_destroy_compress jDestCompress -#define jpeg_destroy_decompress jDestDecompress -#define jpeg_stdio_dest jStdDest -#define jpeg_stdio_src jStdSrc -#define jpeg_set_defaults jSetDefaults -#define jpeg_set_colorspace jSetColorspace -#define jpeg_default_colorspace jDefColorspace -#define jpeg_set_quality jSetQuality -#define jpeg_set_linear_quality jSetLQuality -#define jpeg_add_quant_table jAddQuantTable -#define jpeg_quality_scaling jQualityScaling -#define jpeg_simple_progression jSimProgress -#define jpeg_suppress_tables jSuppressTables -#define jpeg_alloc_quant_table jAlcQTable -#define jpeg_alloc_huff_table jAlcHTable -#define jpeg_start_compress jStrtCompress -#define jpeg_write_scanlines jWrtScanlines -#define jpeg_finish_compress jFinCompress -#define jpeg_write_raw_data jWrtRawData -#define jpeg_write_marker jWrtMarker -#define jpeg_write_m_header jWrtMHeader -#define jpeg_write_m_byte jWrtMByte -#define jpeg_write_tables jWrtTables -#define jpeg_read_header jReadHeader -#define jpeg_start_decompress jStrtDecompress -#define jpeg_read_scanlines jReadScanlines -#define jpeg_finish_decompress jFinDecompress -#define jpeg_read_raw_data jReadRawData -#define jpeg_has_multiple_scans jHasMultScn -#define jpeg_start_output jStrtOutput -#define jpeg_finish_output jFinOutput -#define jpeg_input_complete jInComplete -#define jpeg_new_colormap jNewCMap -#define jpeg_consume_input jConsumeInput -#define jpeg_calc_output_dimensions jCalcDimensions -#define jpeg_save_markers jSaveMarkers -#define jpeg_set_marker_processor jSetMarker -#define jpeg_read_coefficients jReadCoefs -#define jpeg_write_coefficients jWrtCoefs -#define jpeg_copy_critical_parameters jCopyCrit -#define jpeg_abort_compress jAbrtCompress -#define jpeg_abort_decompress jAbrtDecompress -#define jpeg_abort jAbort -#define jpeg_destroy jDestroy -#define jpeg_resync_to_restart jResyncRestart -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - - -/* Default error-management setup */ -EXTERN(struct jpeg_error_mgr *) jpeg_std_error - JPP((struct jpeg_error_mgr * err)); - -/* Initialization of JPEG compression objects. - * jpeg_create_compress() and jpeg_create_decompress() are the exported - * names that applications should call. These expand to calls on - * jpeg_CreateCompress and jpeg_CreateDecompress with additional information - * passed for version mismatch checking. - * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx. - */ -#define jpeg_create_compress(cinfo) \ - jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \ - (size_t) sizeof(struct jpeg_compress_struct)) -#define jpeg_create_decompress(cinfo) \ - jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \ - (size_t) sizeof(struct jpeg_decompress_struct)) -EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo, - int version, size_t structsize)); -EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo, - int version, size_t structsize)); -/* Destruction of JPEG compression objects */ -EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo)); -EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo)); - -/* Standard data source and destination managers: stdio streams. */ -/* Caller is responsible for opening the file before and closing after. */ -EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile)); -EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile)); - -/* Default parameter setup for compression */ -EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo)); -/* Compression parameter setup aids */ -EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo, - J_COLOR_SPACE colorspace)); -EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo)); -EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality, - boolean force_baseline)); -EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo, - int scale_factor, - boolean force_baseline)); -EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl, - const unsigned int *basic_table, - int scale_factor, - boolean force_baseline)); -EXTERN(int) jpeg_quality_scaling JPP((int quality)); -EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo)); -EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo, - boolean suppress)); -EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo)); -EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo)); - -/* Main entry points for compression */ -EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo, - boolean write_all_tables)); -EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo, - JSAMPARRAY scanlines, - JDIMENSION num_lines)); -EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo)); - -/* Replaces jpeg_write_scanlines when writing raw downsampled data. */ -EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo, - JSAMPIMAGE data, - JDIMENSION num_lines)); - -/* Write a special marker. See libjpeg.doc concerning safe usage. */ -EXTERN(void) jpeg_write_marker - JPP((j_compress_ptr cinfo, int marker, - const JOCTET * dataptr, unsigned int datalen)); -/* Same, but piecemeal. */ -EXTERN(void) jpeg_write_m_header - JPP((j_compress_ptr cinfo, int marker, unsigned int datalen)); -EXTERN(void) jpeg_write_m_byte - JPP((j_compress_ptr cinfo, int val)); - -/* Alternate compression function: just write an abbreviated table file */ -EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo)); - -/* Decompression startup: read start of JPEG datastream to see what's there */ -EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo, - boolean require_image)); -/* Return value is one of: */ -#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */ -#define JPEG_HEADER_OK 1 /* Found valid image datastream */ -#define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream */ -/* If you pass require_image = TRUE (normal case), you need not check for - * a TABLES_ONLY return code; an abbreviated file will cause an error exit. - * JPEG_SUSPENDED is only possible if you use a data source module that can - * give a suspension return (the stdio source module doesn't). - */ - -/* Main entry points for decompression */ -EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo)); -EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo, - JSAMPARRAY scanlines, - JDIMENSION max_lines)); -EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo)); - -/* Replaces jpeg_read_scanlines when reading raw downsampled data. */ -EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo, - JSAMPIMAGE data, - JDIMENSION max_lines)); - -/* Additional entry points for buffered-image mode. */ -EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo)); -EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo, - int scan_number)); -EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo)); -EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo)); -EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo)); -EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo)); -/* Return value is one of: */ -/* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */ -#define JPEG_REACHED_SOS 1 /* Reached start of new scan */ -#define JPEG_REACHED_EOI 2 /* Reached end of image */ -#define JPEG_ROW_COMPLETED 3 /* Completed one iMCU row */ -#define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */ - -/* Precalculate output dimensions for current decompression parameters. */ -EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo)); - -/* Control saving of COM and APPn markers into marker_list. */ -EXTERN(void) jpeg_save_markers - JPP((j_decompress_ptr cinfo, int marker_code, - unsigned int length_limit)); - -/* Install a special processing method for COM or APPn markers. */ -EXTERN(void) jpeg_set_marker_processor - JPP((j_decompress_ptr cinfo, int marker_code, - jpeg_marker_parser_method routine)); - -/* Read or write raw DCT coefficients --- useful for lossless transcoding. */ -EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo)); -EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo, - jvirt_barray_ptr * coef_arrays)); -EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo, - j_compress_ptr dstinfo)); - -/* If you choose to abort compression or decompression before completing - * jpeg_finish_(de)compress, then you need to clean up to release memory, - * temporary files, etc. You can just call jpeg_destroy_(de)compress - * if you're done with the JPEG object, but if you want to clean it up and - * reuse it, call this: - */ -EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo)); -EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo)); - -/* Generic versions of jpeg_abort and jpeg_destroy that work on either - * flavor of JPEG object. These may be more convenient in some places. - */ -EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo)); -EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo)); - -/* Default restart-marker-resync procedure for use by data source modules */ -EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo, - int desired)); - - -/* These marker codes are exported since applications and data source modules - * are likely to want to use them. - */ - -#define JPEG_RST0 0xD0 /* RST0 marker code */ -#define JPEG_EOI 0xD9 /* EOI marker code */ -#define JPEG_APP0 0xE0 /* APP0 marker code */ -#define JPEG_COM 0xFE /* COM marker code */ - - -/* If we have a brain-damaged compiler that emits warnings (or worse, errors) - * for structure definitions that are never filled in, keep it quiet by - * supplying dummy definitions for the various substructures. - */ - -#ifdef INCOMPLETE_TYPES_BROKEN -#ifndef JPEG_INTERNALS /* will be defined in jpegint.h */ -struct jvirt_sarray_control { long dummy; }; -struct jvirt_barray_control { long dummy; }; -struct jpeg_comp_master { long dummy; }; -struct jpeg_c_main_controller { long dummy; }; -struct jpeg_c_prep_controller { long dummy; }; -struct jpeg_c_coef_controller { long dummy; }; -struct jpeg_marker_writer { long dummy; }; -struct jpeg_color_converter { long dummy; }; -struct jpeg_downsampler { long dummy; }; -struct jpeg_forward_dct { long dummy; }; -struct jpeg_entropy_encoder { long dummy; }; -struct jpeg_decomp_master { long dummy; }; -struct jpeg_d_main_controller { long dummy; }; -struct jpeg_d_coef_controller { long dummy; }; -struct jpeg_d_post_controller { long dummy; }; -struct jpeg_input_controller { long dummy; }; -struct jpeg_marker_reader { long dummy; }; -struct jpeg_entropy_decoder { long dummy; }; -struct jpeg_inverse_dct { long dummy; }; -struct jpeg_upsampler { long dummy; }; -struct jpeg_color_deconverter { long dummy; }; -struct jpeg_color_quantizer { long dummy; }; -#endif /* JPEG_INTERNALS */ -#endif /* INCOMPLETE_TYPES_BROKEN */ - - -/* - * The JPEG library modules define JPEG_INTERNALS before including this file. - * The internal structure declarations are read only when that is true. - * Applications using the library should not include jpegint.h, but may wish - * to include jerror.h. - */ - -#ifdef JPEG_INTERNALS -#include "jpegint.h" /* fetch private declarations */ -#include "jerror.h" /* fetch error codes too */ -#endif - -#endif /* JPEGLIB_H */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jpegtran.1 b/gtkmm-osx/trunk/jpeg-6b/jpegtran.1 deleted file mode 100644 index 6de18e2..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jpegtran.1 +++ /dev/null @@ -1,238 +0,0 @@ -.TH JPEGTRAN 1 "3 August 1997" -.SH NAME -jpegtran \- lossless transformation of JPEG files -.SH SYNOPSIS -.B jpegtran -[ -.I options -] -[ -.I filename -] -.LP -.SH DESCRIPTION -.LP -.B jpegtran -performs various useful transformations of JPEG files. -It can translate the coded representation from one variant of JPEG to another, -for example from baseline JPEG to progressive JPEG or vice versa. It can also -perform some rearrangements of the image data, for example turning an image -from landscape to portrait format by rotation. -.PP -.B jpegtran -works by rearranging the compressed data (DCT coefficients), without -ever fully decoding the image. Therefore, its transformations are lossless: -there is no image degradation at all, which would not be true if you used -.B djpeg -followed by -.B cjpeg -to accomplish the same conversion. But by the same token, -.B jpegtran -cannot perform lossy operations such as changing the image quality. -.PP -.B jpegtran -reads the named JPEG/JFIF file, or the standard input if no file is -named, and produces a JPEG/JFIF file on the standard output. -.SH OPTIONS -All switch names may be abbreviated; for example, -.B \-optimize -may be written -.B \-opt -or -.BR \-o . -Upper and lower case are equivalent. -British spellings are also accepted (e.g., -.BR \-optimise ), -though for brevity these are not mentioned below. -.PP -To specify the coded JPEG representation used in the output file, -.B jpegtran -accepts a subset of the switches recognized by -.BR cjpeg : -.TP -.B \-optimize -Perform optimization of entropy encoding parameters. -.TP -.B \-progressive -Create progressive JPEG file. -.TP -.BI \-restart " N" -Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is -attached to the number. -.TP -.BI \-scans " file" -Use the scan script given in the specified text file. -.PP -See -.BR cjpeg (1) -for more details about these switches. -If you specify none of these switches, you get a plain baseline-JPEG output -file. The quality setting and so forth are determined by the input file. -.PP -The image can be losslessly transformed by giving one of these switches: -.TP -.B \-flip horizontal -Mirror image horizontally (left-right). -.TP -.B \-flip vertical -Mirror image vertically (top-bottom). -.TP -.B \-rotate 90 -Rotate image 90 degrees clockwise. -.TP -.B \-rotate 180 -Rotate image 180 degrees. -.TP -.B \-rotate 270 -Rotate image 270 degrees clockwise (or 90 ccw). -.TP -.B \-transpose -Transpose image (across UL-to-LR axis). -.TP -.B \-transverse -Transverse transpose (across UR-to-LL axis). -.PP -The transpose transformation has no restrictions regarding image dimensions. -The other transformations operate rather oddly if the image dimensions are not -a multiple of the iMCU size (usually 8 or 16 pixels), because they can only -transform complete blocks of DCT coefficient data in the desired way. -.PP -.BR jpegtran 's -default behavior when transforming an odd-size image is designed -to preserve exact reversibility and mathematical consistency of the -transformation set. As stated, transpose is able to flip the entire image -area. Horizontal mirroring leaves any partial iMCU column at the right edge -untouched, but is able to flip all rows of the image. Similarly, vertical -mirroring leaves any partial iMCU row at the bottom edge untouched, but is -able to flip all columns. The other transforms can be built up as sequences -of transpose and flip operations; for consistency, their actions on edge -pixels are defined to be the same as the end result of the corresponding -transpose-and-flip sequence. -.PP -For practical use, you may prefer to discard any untransformable edge pixels -rather than having a strange-looking strip along the right and/or bottom edges -of a transformed image. To do this, add the -.B \-trim -switch: -.TP -.B \-trim -Drop non-transformable edge blocks. -.PP -Obviously, a transformation with -.B \-trim -is not reversible, so strictly speaking -.B jpegtran -with this switch is not lossless. Also, the expected mathematical -equivalences between the transformations no longer hold. For example, -.B \-rot 270 -trim -trims only the bottom edge, but -.B \-rot 90 -trim -followed by -.B \-rot 180 -trim -trims both edges. -.PP -Another not-strictly-lossless transformation switch is: -.TP -.B \-grayscale -Force grayscale output. -.PP -This option discards the chrominance channels if the input image is YCbCr -(ie, a standard color JPEG), resulting in a grayscale JPEG file. The -luminance channel is preserved exactly, so this is a better method of reducing -to grayscale than decompression, conversion, and recompression. This switch -is particularly handy for fixing a monochrome picture that was mistakenly -encoded as a color JPEG. (In such a case, the space savings from getting rid -of the near-empty chroma channels won't be large; but the decoding time for -a grayscale JPEG is substantially less than that for a color JPEG.) -.PP -.B jpegtran -also recognizes these switches that control what to do with "extra" markers, -such as comment blocks: -.TP -.B \-copy none -Copy no extra markers from source file. This setting suppresses all -comments and other excess baggage present in the source file. -.TP -.B \-copy comments -Copy only comment markers. This setting copies comments from the source file, -but discards any other inessential data. -.TP -.B \-copy all -Copy all extra markers. This setting preserves miscellaneous markers -found in the source file, such as JFIF thumbnails and Photoshop settings. -In some files these extra markers can be sizable. -.PP -The default behavior is -.BR "\-copy comments" . -(Note: in IJG releases v6 and v6a, -.B jpegtran -always did the equivalent of -.BR "\-copy none" .) -.PP -Additional switches recognized by jpegtran are: -.TP -.BI \-maxmemory " N" -Set limit for amount of memory to use in processing large images. Value is -in thousands of bytes, or millions of bytes if "M" is attached to the -number. For example, -.B \-max 4m -selects 4000000 bytes. If more space is needed, temporary files will be used. -.TP -.BI \-outfile " name" -Send output image to the named file, not to standard output. -.TP -.B \-verbose -Enable debug printout. More -.BR \-v 's -give more output. Also, version information is printed at startup. -.TP -.B \-debug -Same as -.BR \-verbose . -.SH EXAMPLES -.LP -This example converts a baseline JPEG file to progressive form: -.IP -.B jpegtran \-progressive -.I foo.jpg -.B > -.I fooprog.jpg -.PP -This example rotates an image 90 degrees clockwise, discarding any -unrotatable edge pixels: -.IP -.B jpegtran \-rot 90 -trim -.I foo.jpg -.B > -.I foo90.jpg -.SH ENVIRONMENT -.TP -.B JPEGMEM -If this environment variable is set, its value is the default memory limit. -The value is specified as described for the -.B \-maxmemory -switch. -.B JPEGMEM -overrides the default value specified when the program was compiled, and -itself is overridden by an explicit -.BR \-maxmemory . -.SH SEE ALSO -.BR cjpeg (1), -.BR djpeg (1), -.BR rdjpgcom (1), -.BR wrjpgcom (1) -.br -Wallace, Gregory K. "The JPEG Still Picture Compression Standard", -Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. -.SH AUTHOR -Independent JPEG Group -.SH BUGS -Arithmetic coding is not supported for legal reasons. -.PP -The transform options can't transform odd-size images perfectly. Use -.B \-trim -if you don't like the results without it. -.PP -The entire image is read into memory and then written out again, even in -cases where this isn't really necessary. Expect swapping on large images, -especially when using the more complex transform options. diff --git a/gtkmm-osx/trunk/jpeg-6b/jpegtran.c b/gtkmm-osx/trunk/jpeg-6b/jpegtran.c deleted file mode 100644 index 20ef111..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jpegtran.c +++ /dev/null @@ -1,504 +0,0 @@ -/* - * jpegtran.c - * - * Copyright (C) 1995-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a command-line user interface for JPEG transcoding. - * It is very similar to cjpeg.c, but provides lossless transcoding between - * different JPEG file formats. It also provides some lossless and sort-of- - * lossless transformations of JPEG data. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ -#include "transupp.h" /* Support routines for jpegtran */ -#include "jversion.h" /* for version message */ - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - - -/* - * Argument-parsing code. - * The switch parser is designed to be useful with DOS-style command line - * syntax, ie, intermixed switches and file names, where only the switches - * to the left of a given file name affect processing of that file. - * The main program in this file doesn't actually use this capability... - */ - - -static const char * progname; /* program name for error messages */ -static char * outfilename; /* for -outfile switch */ -static JCOPY_OPTION copyoption; /* -copy switch */ -static jpeg_transform_info transformoption; /* image transformation options */ - - -LOCAL(void) -usage (void) -/* complain about bad command line */ -{ - fprintf(stderr, "usage: %s [switches] ", progname); -#ifdef TWO_FILE_COMMANDLINE - fprintf(stderr, "inputfile outputfile\n"); -#else - fprintf(stderr, "[inputfile]\n"); -#endif - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf(stderr, " -copy none Copy no extra markers from source file\n"); - fprintf(stderr, " -copy comments Copy only comment markers (default)\n"); - fprintf(stderr, " -copy all Copy all extra markers\n"); -#ifdef ENTROPY_OPT_SUPPORTED - fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n"); -#endif -#ifdef C_PROGRESSIVE_SUPPORTED - fprintf(stderr, " -progressive Create progressive JPEG file\n"); -#endif -#if TRANSFORMS_SUPPORTED - fprintf(stderr, "Switches for modifying the image:\n"); - fprintf(stderr, " -grayscale Reduce to grayscale (omit color data)\n"); - fprintf(stderr, " -flip [horizontal|vertical] Mirror image (left-right or top-bottom)\n"); - fprintf(stderr, " -rotate [90|180|270] Rotate image (degrees clockwise)\n"); - fprintf(stderr, " -transpose Transpose image\n"); - fprintf(stderr, " -transverse Transverse transpose image\n"); - fprintf(stderr, " -trim Drop non-transformable edge blocks\n"); -#endif /* TRANSFORMS_SUPPORTED */ - fprintf(stderr, "Switches for advanced users:\n"); - fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n"); - fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); - fprintf(stderr, " -outfile name Specify name for output file\n"); - fprintf(stderr, " -verbose or -debug Emit debug output\n"); - fprintf(stderr, "Switches for wizards:\n"); -#ifdef C_ARITH_CODING_SUPPORTED - fprintf(stderr, " -arithmetic Use arithmetic coding\n"); -#endif -#ifdef C_MULTISCAN_FILES_SUPPORTED - fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n"); -#endif - exit(EXIT_FAILURE); -} - - -LOCAL(void) -select_transform (JXFORM_CODE transform) -/* Silly little routine to detect multiple transform options, - * which we can't handle. - */ -{ -#if TRANSFORMS_SUPPORTED - if (transformoption.transform == JXFORM_NONE || - transformoption.transform == transform) { - transformoption.transform = transform; - } else { - fprintf(stderr, "%s: can only do one image transformation at a time\n", - progname); - usage(); - } -#else - fprintf(stderr, "%s: sorry, image transformation was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif -} - - -LOCAL(int) -parse_switches (j_compress_ptr cinfo, int argc, char **argv, - int last_file_arg_seen, boolean for_real) -/* Parse optional switches. - * Returns argv[] index of first file-name argument (== argc if none). - * Any file names with indexes <= last_file_arg_seen are ignored; - * they have presumably been processed in a previous iteration. - * (Pass 0 for last_file_arg_seen on the first or only iteration.) - * for_real is FALSE on the first (dummy) pass; we may skip any expensive - * processing. - */ -{ - int argn; - char * arg; - boolean simple_progressive; - char * scansarg = NULL; /* saves -scans parm if any */ - - /* Set up default JPEG parameters. */ - simple_progressive = FALSE; - outfilename = NULL; - copyoption = JCOPYOPT_DEFAULT; - transformoption.transform = JXFORM_NONE; - transformoption.trim = FALSE; - transformoption.force_grayscale = FALSE; - cinfo->err->trace_level = 0; - - /* Scan command line options, adjust parameters */ - - for (argn = 1; argn < argc; argn++) { - arg = argv[argn]; - if (*arg != '-') { - /* Not a switch, must be a file name argument */ - if (argn <= last_file_arg_seen) { - outfilename = NULL; /* -outfile applies to just one input file */ - continue; /* ignore this name if previously processed */ - } - break; /* else done parsing switches */ - } - arg++; /* advance past switch marker character */ - - if (keymatch(arg, "arithmetic", 1)) { - /* Use arithmetic coding. */ -#ifdef C_ARITH_CODING_SUPPORTED - cinfo->arith_code = TRUE; -#else - fprintf(stderr, "%s: sorry, arithmetic coding not supported\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "copy", 1)) { - /* Select which extra markers to copy. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "none", 1)) { - copyoption = JCOPYOPT_NONE; - } else if (keymatch(argv[argn], "comments", 1)) { - copyoption = JCOPYOPT_COMMENTS; - } else if (keymatch(argv[argn], "all", 1)) { - copyoption = JCOPYOPT_ALL; - } else - usage(); - - } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) { - /* Enable debug printouts. */ - /* On first -d, print version identification */ - static boolean printed_version = FALSE; - - if (! printed_version) { - fprintf(stderr, "Independent JPEG Group's JPEGTRAN, version %s\n%s\n", - JVERSION, JCOPYRIGHT); - printed_version = TRUE; - } - cinfo->err->trace_level++; - - } else if (keymatch(arg, "flip", 1)) { - /* Mirror left-right or top-bottom. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "horizontal", 1)) - select_transform(JXFORM_FLIP_H); - else if (keymatch(argv[argn], "vertical", 1)) - select_transform(JXFORM_FLIP_V); - else - usage(); - - } else if (keymatch(arg, "grayscale", 1) || keymatch(arg, "greyscale",1)) { - /* Force to grayscale. */ -#if TRANSFORMS_SUPPORTED - transformoption.force_grayscale = TRUE; -#else - select_transform(JXFORM_NONE); /* force an error */ -#endif - - } else if (keymatch(arg, "maxmemory", 3)) { - /* Maximum memory in Kb (or Mb with 'm'). */ - long lval; - char ch = 'x'; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) - usage(); - if (ch == 'm' || ch == 'M') - lval *= 1000L; - cinfo->mem->max_memory_to_use = lval * 1000L; - - } else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) { - /* Enable entropy parm optimization. */ -#ifdef ENTROPY_OPT_SUPPORTED - cinfo->optimize_coding = TRUE; -#else - fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "outfile", 4)) { - /* Set output file name. */ - if (++argn >= argc) /* advance to next argument */ - usage(); - outfilename = argv[argn]; /* save it away for later use */ - - } else if (keymatch(arg, "progressive", 1)) { - /* Select simple progressive mode. */ -#ifdef C_PROGRESSIVE_SUPPORTED - simple_progressive = TRUE; - /* We must postpone execution until num_components is known. */ -#else - fprintf(stderr, "%s: sorry, progressive output was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "restart", 1)) { - /* Restart interval in MCU rows (or in MCUs with 'b'). */ - long lval; - char ch = 'x'; - - if (++argn >= argc) /* advance to next argument */ - usage(); - if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) - usage(); - if (lval < 0 || lval > 65535L) - usage(); - if (ch == 'b' || ch == 'B') { - cinfo->restart_interval = (unsigned int) lval; - cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */ - } else { - cinfo->restart_in_rows = (int) lval; - /* restart_interval will be computed during startup */ - } - - } else if (keymatch(arg, "rotate", 2)) { - /* Rotate 90, 180, or 270 degrees (measured clockwise). */ - if (++argn >= argc) /* advance to next argument */ - usage(); - if (keymatch(argv[argn], "90", 2)) - select_transform(JXFORM_ROT_90); - else if (keymatch(argv[argn], "180", 3)) - select_transform(JXFORM_ROT_180); - else if (keymatch(argv[argn], "270", 3)) - select_transform(JXFORM_ROT_270); - else - usage(); - - } else if (keymatch(arg, "scans", 1)) { - /* Set scan script. */ -#ifdef C_MULTISCAN_FILES_SUPPORTED - if (++argn >= argc) /* advance to next argument */ - usage(); - scansarg = argv[argn]; - /* We must postpone reading the file in case -progressive appears. */ -#else - fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n", - progname); - exit(EXIT_FAILURE); -#endif - - } else if (keymatch(arg, "transpose", 1)) { - /* Transpose (across UL-to-LR axis). */ - select_transform(JXFORM_TRANSPOSE); - - } else if (keymatch(arg, "transverse", 6)) { - /* Transverse transpose (across UR-to-LL axis). */ - select_transform(JXFORM_TRANSVERSE); - - } else if (keymatch(arg, "trim", 3)) { - /* Trim off any partial edge MCUs that the transform can't handle. */ - transformoption.trim = TRUE; - - } else { - usage(); /* bogus switch */ - } - } - - /* Post-switch-scanning cleanup */ - - if (for_real) { - -#ifdef C_PROGRESSIVE_SUPPORTED - if (simple_progressive) /* process -progressive; -scans can override */ - jpeg_simple_progression(cinfo); -#endif - -#ifdef C_MULTISCAN_FILES_SUPPORTED - if (scansarg != NULL) /* process -scans if it was present */ - if (! read_scan_script(cinfo, scansarg)) - usage(); -#endif - } - - return argn; /* return index of next arg (file name) */ -} - - -/* - * The main program. - */ - -int -main (int argc, char **argv) -{ - struct jpeg_decompress_struct srcinfo; - struct jpeg_compress_struct dstinfo; - struct jpeg_error_mgr jsrcerr, jdsterr; -#ifdef PROGRESS_REPORT - struct cdjpeg_progress_mgr progress; -#endif - jvirt_barray_ptr * src_coef_arrays; - jvirt_barray_ptr * dst_coef_arrays; - int file_index; - FILE * input_file; - FILE * output_file; - - /* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "jpegtran"; /* in case C library doesn't provide it */ - - /* Initialize the JPEG decompression object with default error handling. */ - srcinfo.err = jpeg_std_error(&jsrcerr); - jpeg_create_decompress(&srcinfo); - /* Initialize the JPEG compression object with default error handling. */ - dstinfo.err = jpeg_std_error(&jdsterr); - jpeg_create_compress(&dstinfo); - - /* Now safe to enable signal catcher. - * Note: we assume only the decompression object will have virtual arrays. - */ -#ifdef NEED_SIGNAL_CATCHER - enable_signal_catcher((j_common_ptr) &srcinfo); -#endif - - /* Scan command line to find file names. - * It is convenient to use just one switch-parsing routine, but the switch - * values read here are mostly ignored; we will rescan the switches after - * opening the input file. Also note that most of the switches affect the - * destination JPEG object, so we parse into that and then copy over what - * needs to affects the source too. - */ - - file_index = parse_switches(&dstinfo, argc, argv, 0, FALSE); - jsrcerr.trace_level = jdsterr.trace_level; - srcinfo.mem->max_memory_to_use = dstinfo.mem->max_memory_to_use; - -#ifdef TWO_FILE_COMMANDLINE - /* Must have either -outfile switch or explicit output file name */ - if (outfilename == NULL) { - if (file_index != argc-2) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - outfilename = argv[file_index+1]; - } else { - if (file_index != argc-1) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - } -#else - /* Unix style: expect zero or one file name */ - if (file_index < argc-1) { - fprintf(stderr, "%s: only one input file\n", progname); - usage(); - } -#endif /* TWO_FILE_COMMANDLINE */ - - /* Open the input file. */ - if (file_index < argc) { - if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]); - exit(EXIT_FAILURE); - } - } else { - /* default input file is stdin */ - input_file = read_stdin(); - } - - /* Open the output file. */ - if (outfilename != NULL) { - if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, outfilename); - exit(EXIT_FAILURE); - } - } else { - /* default output file is stdout */ - output_file = write_stdout(); - } - -#ifdef PROGRESS_REPORT - start_progress_monitor((j_common_ptr) &dstinfo, &progress); -#endif - - /* Specify data source for decompression */ - jpeg_stdio_src(&srcinfo, input_file); - - /* Enable saving of extra markers that we want to copy */ - jcopy_markers_setup(&srcinfo, copyoption); - - /* Read file header */ - (void) jpeg_read_header(&srcinfo, TRUE); - - /* Any space needed by a transform option must be requested before - * jpeg_read_coefficients so that memory allocation will be done right. - */ -#if TRANSFORMS_SUPPORTED - jtransform_request_workspace(&srcinfo, &transformoption); -#endif - - /* Read source file as DCT coefficients */ - src_coef_arrays = jpeg_read_coefficients(&srcinfo); - - /* Initialize destination compression parameters from source values */ - jpeg_copy_critical_parameters(&srcinfo, &dstinfo); - - /* Adjust destination parameters if required by transform options; - * also find out which set of coefficient arrays will hold the output. - */ -#if TRANSFORMS_SUPPORTED - dst_coef_arrays = jtransform_adjust_parameters(&srcinfo, &dstinfo, - src_coef_arrays, - &transformoption); -#else - dst_coef_arrays = src_coef_arrays; -#endif - - /* Adjust default compression parameters by re-parsing the options */ - file_index = parse_switches(&dstinfo, argc, argv, 0, TRUE); - - /* Specify data destination for compression */ - jpeg_stdio_dest(&dstinfo, output_file); - - /* Start compressor (note no image data is actually written here) */ - jpeg_write_coefficients(&dstinfo, dst_coef_arrays); - - /* Copy to the output file any extra markers that we want to preserve */ - jcopy_markers_execute(&srcinfo, &dstinfo, copyoption); - - /* Execute image transformation, if any */ -#if TRANSFORMS_SUPPORTED - jtransform_execute_transformation(&srcinfo, &dstinfo, - src_coef_arrays, - &transformoption); -#endif - - /* Finish compression and release memory */ - jpeg_finish_compress(&dstinfo); - jpeg_destroy_compress(&dstinfo); - (void) jpeg_finish_decompress(&srcinfo); - jpeg_destroy_decompress(&srcinfo); - - /* Close files, if we opened them */ - if (input_file != stdin) - fclose(input_file); - if (output_file != stdout) - fclose(output_file); - -#ifdef PROGRESS_REPORT - end_progress_monitor((j_common_ptr) &dstinfo); -#endif - - /* All done. */ - exit(jsrcerr.num_warnings + jdsterr.num_warnings ?EXIT_WARNING:EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jquant1.c b/gtkmm-osx/trunk/jpeg-6b/jquant1.c deleted file mode 100644 index b2f96aa..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jquant1.c +++ /dev/null @@ -1,856 +0,0 @@ -/* - * jquant1.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains 1-pass color quantization (color mapping) routines. - * These routines provide mapping to a fixed color map using equally spaced - * color values. Optional Floyd-Steinberg or ordered dithering is available. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - -#ifdef QUANT_1PASS_SUPPORTED - - -/* - * The main purpose of 1-pass quantization is to provide a fast, if not very - * high quality, colormapped output capability. A 2-pass quantizer usually - * gives better visual quality; however, for quantized grayscale output this - * quantizer is perfectly adequate. Dithering is highly recommended with this - * quantizer, though you can turn it off if you really want to. - * - * In 1-pass quantization the colormap must be chosen in advance of seeing the - * image. We use a map consisting of all combinations of Ncolors[i] color - * values for the i'th component. The Ncolors[] values are chosen so that - * their product, the total number of colors, is no more than that requested. - * (In most cases, the product will be somewhat less.) - * - * Since the colormap is orthogonal, the representative value for each color - * component can be determined without considering the other components; - * then these indexes can be combined into a colormap index by a standard - * N-dimensional-array-subscript calculation. Most of the arithmetic involved - * can be precalculated and stored in the lookup table colorindex[]. - * colorindex[i][j] maps pixel value j in component i to the nearest - * representative value (grid plane) for that component; this index is - * multiplied by the array stride for component i, so that the - * index of the colormap entry closest to a given pixel value is just - * sum( colorindex[component-number][pixel-component-value] ) - * Aside from being fast, this scheme allows for variable spacing between - * representative values with no additional lookup cost. - * - * If gamma correction has been applied in color conversion, it might be wise - * to adjust the color grid spacing so that the representative colors are - * equidistant in linear space. At this writing, gamma correction is not - * implemented by jdcolor, so nothing is done here. - */ - - -/* Declarations for ordered dithering. - * - * We use a standard 16x16 ordered dither array. The basic concept of ordered - * dithering is described in many references, for instance Dale Schumacher's - * chapter II.2 of Graphics Gems II (James Arvo, ed. Academic Press, 1991). - * In place of Schumacher's comparisons against a "threshold" value, we add a - * "dither" value to the input pixel and then round the result to the nearest - * output value. The dither value is equivalent to (0.5 - threshold) times - * the distance between output values. For ordered dithering, we assume that - * the output colors are equally spaced; if not, results will probably be - * worse, since the dither may be too much or too little at a given point. - * - * The normal calculation would be to form pixel value + dither, range-limit - * this to 0..MAXJSAMPLE, and then index into the colorindex table as usual. - * We can skip the separate range-limiting step by extending the colorindex - * table in both directions. - */ - -#define ODITHER_SIZE 16 /* dimension of dither matrix */ -/* NB: if ODITHER_SIZE is not a power of 2, ODITHER_MASK uses will break */ -#define ODITHER_CELLS (ODITHER_SIZE*ODITHER_SIZE) /* # cells in matrix */ -#define ODITHER_MASK (ODITHER_SIZE-1) /* mask for wrapping around counters */ - -typedef int ODITHER_MATRIX[ODITHER_SIZE][ODITHER_SIZE]; -typedef int (*ODITHER_MATRIX_PTR)[ODITHER_SIZE]; - -static const UINT8 base_dither_matrix[ODITHER_SIZE][ODITHER_SIZE] = { - /* Bayer's order-4 dither array. Generated by the code given in - * Stephen Hawley's article "Ordered Dithering" in Graphics Gems I. - * The values in this array must range from 0 to ODITHER_CELLS-1. - */ - { 0,192, 48,240, 12,204, 60,252, 3,195, 51,243, 15,207, 63,255 }, - { 128, 64,176,112,140, 76,188,124,131, 67,179,115,143, 79,191,127 }, - { 32,224, 16,208, 44,236, 28,220, 35,227, 19,211, 47,239, 31,223 }, - { 160, 96,144, 80,172,108,156, 92,163, 99,147, 83,175,111,159, 95 }, - { 8,200, 56,248, 4,196, 52,244, 11,203, 59,251, 7,199, 55,247 }, - { 136, 72,184,120,132, 68,180,116,139, 75,187,123,135, 71,183,119 }, - { 40,232, 24,216, 36,228, 20,212, 43,235, 27,219, 39,231, 23,215 }, - { 168,104,152, 88,164,100,148, 84,171,107,155, 91,167,103,151, 87 }, - { 2,194, 50,242, 14,206, 62,254, 1,193, 49,241, 13,205, 61,253 }, - { 130, 66,178,114,142, 78,190,126,129, 65,177,113,141, 77,189,125 }, - { 34,226, 18,210, 46,238, 30,222, 33,225, 17,209, 45,237, 29,221 }, - { 162, 98,146, 82,174,110,158, 94,161, 97,145, 81,173,109,157, 93 }, - { 10,202, 58,250, 6,198, 54,246, 9,201, 57,249, 5,197, 53,245 }, - { 138, 74,186,122,134, 70,182,118,137, 73,185,121,133, 69,181,117 }, - { 42,234, 26,218, 38,230, 22,214, 41,233, 25,217, 37,229, 21,213 }, - { 170,106,154, 90,166,102,150, 86,169,105,153, 89,165,101,149, 85 } -}; - - -/* Declarations for Floyd-Steinberg dithering. - * - * Errors are accumulated into the array fserrors[], at a resolution of - * 1/16th of a pixel count. The error at a given pixel is propagated - * to its not-yet-processed neighbors using the standard F-S fractions, - * ... (here) 7/16 - * 3/16 5/16 1/16 - * We work left-to-right on even rows, right-to-left on odd rows. - * - * We can get away with a single array (holding one row's worth of errors) - * by using it to store the current row's errors at pixel columns not yet - * processed, but the next row's errors at columns already processed. We - * need only a few extra variables to hold the errors immediately around the - * current column. (If we are lucky, those variables are in registers, but - * even if not, they're probably cheaper to access than array elements are.) - * - * The fserrors[] array is indexed [component#][position]. - * We provide (#columns + 2) entries per component; the extra entry at each - * end saves us from special-casing the first and last pixels. - * - * Note: on a wide image, we might not have enough room in a PC's near data - * segment to hold the error array; so it is allocated with alloc_large. - */ - -#if BITS_IN_JSAMPLE == 8 -typedef INT16 FSERROR; /* 16 bits should be enough */ -typedef int LOCFSERROR; /* use 'int' for calculation temps */ -#else -typedef INT32 FSERROR; /* may need more than 16 bits */ -typedef INT32 LOCFSERROR; /* be sure calculation temps are big enough */ -#endif - -typedef FSERROR FAR *FSERRPTR; /* pointer to error array (in FAR storage!) */ - - -/* Private subobject */ - -#define MAX_Q_COMPS 4 /* max components I can handle */ - -typedef struct { - struct jpeg_color_quantizer pub; /* public fields */ - - /* Initially allocated colormap is saved here */ - JSAMPARRAY sv_colormap; /* The color map as a 2-D pixel array */ - int sv_actual; /* number of entries in use */ - - JSAMPARRAY colorindex; /* Precomputed mapping for speed */ - /* colorindex[i][j] = index of color closest to pixel value j in component i, - * premultiplied as described above. Since colormap indexes must fit into - * JSAMPLEs, the entries of this array will too. - */ - boolean is_padded; /* is the colorindex padded for odither? */ - - int Ncolors[MAX_Q_COMPS]; /* # of values alloced to each component */ - - /* Variables for ordered dithering */ - int row_index; /* cur row's vertical index in dither matrix */ - ODITHER_MATRIX_PTR odither[MAX_Q_COMPS]; /* one dither array per component */ - - /* Variables for Floyd-Steinberg dithering */ - FSERRPTR fserrors[MAX_Q_COMPS]; /* accumulated errors */ - boolean on_odd_row; /* flag to remember which row we are on */ -} my_cquantizer; - -typedef my_cquantizer * my_cquantize_ptr; - - -/* - * Policy-making subroutines for create_colormap and create_colorindex. - * These routines determine the colormap to be used. The rest of the module - * only assumes that the colormap is orthogonal. - * - * * select_ncolors decides how to divvy up the available colors - * among the components. - * * output_value defines the set of representative values for a component. - * * largest_input_value defines the mapping from input values to - * representative values for a component. - * Note that the latter two routines may impose different policies for - * different components, though this is not currently done. - */ - - -LOCAL(int) -select_ncolors (j_decompress_ptr cinfo, int Ncolors[]) -/* Determine allocation of desired colors to components, */ -/* and fill in Ncolors[] array to indicate choice. */ -/* Return value is total number of colors (product of Ncolors[] values). */ -{ - int nc = cinfo->out_color_components; /* number of color components */ - int max_colors = cinfo->desired_number_of_colors; - int total_colors, iroot, i, j; - boolean changed; - long temp; - static const int RGB_order[3] = { RGB_GREEN, RGB_RED, RGB_BLUE }; - - /* We can allocate at least the nc'th root of max_colors per component. */ - /* Compute floor(nc'th root of max_colors). */ - iroot = 1; - do { - iroot++; - temp = iroot; /* set temp = iroot ** nc */ - for (i = 1; i < nc; i++) - temp *= iroot; - } while (temp <= (long) max_colors); /* repeat till iroot exceeds root */ - iroot--; /* now iroot = floor(root) */ - - /* Must have at least 2 color values per component */ - if (iroot < 2) - ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, (int) temp); - - /* Initialize to iroot color values for each component */ - total_colors = 1; - for (i = 0; i < nc; i++) { - Ncolors[i] = iroot; - total_colors *= iroot; - } - /* We may be able to increment the count for one or more components without - * exceeding max_colors, though we know not all can be incremented. - * Sometimes, the first component can be incremented more than once! - * (Example: for 16 colors, we start at 2*2*2, go to 3*2*2, then 4*2*2.) - * In RGB colorspace, try to increment G first, then R, then B. - */ - do { - changed = FALSE; - for (i = 0; i < nc; i++) { - j = (cinfo->out_color_space == JCS_RGB ? RGB_order[i] : i); - /* calculate new total_colors if Ncolors[j] is incremented */ - temp = total_colors / Ncolors[j]; - temp *= Ncolors[j]+1; /* done in long arith to avoid oflo */ - if (temp > (long) max_colors) - break; /* won't fit, done with this pass */ - Ncolors[j]++; /* OK, apply the increment */ - total_colors = (int) temp; - changed = TRUE; - } - } while (changed); - - return total_colors; -} - - -LOCAL(int) -output_value (j_decompress_ptr cinfo, int ci, int j, int maxj) -/* Return j'th output value, where j will range from 0 to maxj */ -/* The output values must fall in 0..MAXJSAMPLE in increasing order */ -{ - /* We always provide values 0 and MAXJSAMPLE for each component; - * any additional values are equally spaced between these limits. - * (Forcing the upper and lower values to the limits ensures that - * dithering can't produce a color outside the selected gamut.) - */ - return (int) (((INT32) j * MAXJSAMPLE + maxj/2) / maxj); -} - - -LOCAL(int) -largest_input_value (j_decompress_ptr cinfo, int ci, int j, int maxj) -/* Return largest input value that should map to j'th output value */ -/* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */ -{ - /* Breakpoints are halfway between values returned by output_value */ - return (int) (((INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj)); -} - - -/* - * Create the colormap. - */ - -LOCAL(void) -create_colormap (j_decompress_ptr cinfo) -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - JSAMPARRAY colormap; /* Created colormap */ - int total_colors; /* Number of distinct output colors */ - int i,j,k, nci, blksize, blkdist, ptr, val; - - /* Select number of colors for each component */ - total_colors = select_ncolors(cinfo, cquantize->Ncolors); - - /* Report selected color counts */ - if (cinfo->out_color_components == 3) - TRACEMS4(cinfo, 1, JTRC_QUANT_3_NCOLORS, - total_colors, cquantize->Ncolors[0], - cquantize->Ncolors[1], cquantize->Ncolors[2]); - else - TRACEMS1(cinfo, 1, JTRC_QUANT_NCOLORS, total_colors); - - /* Allocate and fill in the colormap. */ - /* The colors are ordered in the map in standard row-major order, */ - /* i.e. rightmost (highest-indexed) color changes most rapidly. */ - - colormap = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (JDIMENSION) total_colors, (JDIMENSION) cinfo->out_color_components); - - /* blksize is number of adjacent repeated entries for a component */ - /* blkdist is distance between groups of identical entries for a component */ - blkdist = total_colors; - - for (i = 0; i < cinfo->out_color_components; i++) { - /* fill in colormap entries for i'th color component */ - nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ - blksize = blkdist / nci; - for (j = 0; j < nci; j++) { - /* Compute j'th output value (out of nci) for component */ - val = output_value(cinfo, i, j, nci-1); - /* Fill in all colormap entries that have this value of this component */ - for (ptr = j * blksize; ptr < total_colors; ptr += blkdist) { - /* fill in blksize entries beginning at ptr */ - for (k = 0; k < blksize; k++) - colormap[i][ptr+k] = (JSAMPLE) val; - } - } - blkdist = blksize; /* blksize of this color is blkdist of next */ - } - - /* Save the colormap in private storage, - * where it will survive color quantization mode changes. - */ - cquantize->sv_colormap = colormap; - cquantize->sv_actual = total_colors; -} - - -/* - * Create the color index table. - */ - -LOCAL(void) -create_colorindex (j_decompress_ptr cinfo) -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - JSAMPROW indexptr; - int i,j,k, nci, blksize, val, pad; - - /* For ordered dither, we pad the color index tables by MAXJSAMPLE in - * each direction (input index values can be -MAXJSAMPLE .. 2*MAXJSAMPLE). - * This is not necessary in the other dithering modes. However, we - * flag whether it was done in case user changes dithering mode. - */ - if (cinfo->dither_mode == JDITHER_ORDERED) { - pad = MAXJSAMPLE*2; - cquantize->is_padded = TRUE; - } else { - pad = 0; - cquantize->is_padded = FALSE; - } - - cquantize->colorindex = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (JDIMENSION) (MAXJSAMPLE+1 + pad), - (JDIMENSION) cinfo->out_color_components); - - /* blksize is number of adjacent repeated entries for a component */ - blksize = cquantize->sv_actual; - - for (i = 0; i < cinfo->out_color_components; i++) { - /* fill in colorindex entries for i'th color component */ - nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ - blksize = blksize / nci; - - /* adjust colorindex pointers to provide padding at negative indexes. */ - if (pad) - cquantize->colorindex[i] += MAXJSAMPLE; - - /* in loop, val = index of current output value, */ - /* and k = largest j that maps to current val */ - indexptr = cquantize->colorindex[i]; - val = 0; - k = largest_input_value(cinfo, i, 0, nci-1); - for (j = 0; j <= MAXJSAMPLE; j++) { - while (j > k) /* advance val if past boundary */ - k = largest_input_value(cinfo, i, ++val, nci-1); - /* premultiply so that no multiplication needed in main processing */ - indexptr[j] = (JSAMPLE) (val * blksize); - } - /* Pad at both ends if necessary */ - if (pad) - for (j = 1; j <= MAXJSAMPLE; j++) { - indexptr[-j] = indexptr[0]; - indexptr[MAXJSAMPLE+j] = indexptr[MAXJSAMPLE]; - } - } -} - - -/* - * Create an ordered-dither array for a component having ncolors - * distinct output values. - */ - -LOCAL(ODITHER_MATRIX_PTR) -make_odither_array (j_decompress_ptr cinfo, int ncolors) -{ - ODITHER_MATRIX_PTR odither; - int j,k; - INT32 num,den; - - odither = (ODITHER_MATRIX_PTR) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(ODITHER_MATRIX)); - /* The inter-value distance for this color is MAXJSAMPLE/(ncolors-1). - * Hence the dither value for the matrix cell with fill order f - * (f=0..N-1) should be (N-1-2*f)/(2*N) * MAXJSAMPLE/(ncolors-1). - * On 16-bit-int machine, be careful to avoid overflow. - */ - den = 2 * ODITHER_CELLS * ((INT32) (ncolors - 1)); - for (j = 0; j < ODITHER_SIZE; j++) { - for (k = 0; k < ODITHER_SIZE; k++) { - num = ((INT32) (ODITHER_CELLS-1 - 2*((int)base_dither_matrix[j][k]))) - * MAXJSAMPLE; - /* Ensure round towards zero despite C's lack of consistency - * about rounding negative values in integer division... - */ - odither[j][k] = (int) (num<0 ? -((-num)/den) : num/den); - } - } - return odither; -} - - -/* - * Create the ordered-dither tables. - * Components having the same number of representative colors may - * share a dither table. - */ - -LOCAL(void) -create_odither_tables (j_decompress_ptr cinfo) -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - ODITHER_MATRIX_PTR odither; - int i, j, nci; - - for (i = 0; i < cinfo->out_color_components; i++) { - nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ - odither = NULL; /* search for matching prior component */ - for (j = 0; j < i; j++) { - if (nci == cquantize->Ncolors[j]) { - odither = cquantize->odither[j]; - break; - } - } - if (odither == NULL) /* need a new table? */ - odither = make_odither_array(cinfo, nci); - cquantize->odither[i] = odither; - } -} - - -/* - * Map some rows of pixels to the output colormapped representation. - */ - -METHODDEF(void) -color_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf, - JSAMPARRAY output_buf, int num_rows) -/* General case, no dithering */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - JSAMPARRAY colorindex = cquantize->colorindex; - register int pixcode, ci; - register JSAMPROW ptrin, ptrout; - int row; - JDIMENSION col; - JDIMENSION width = cinfo->output_width; - register int nc = cinfo->out_color_components; - - for (row = 0; row < num_rows; row++) { - ptrin = input_buf[row]; - ptrout = output_buf[row]; - for (col = width; col > 0; col--) { - pixcode = 0; - for (ci = 0; ci < nc; ci++) { - pixcode += GETJSAMPLE(colorindex[ci][GETJSAMPLE(*ptrin++)]); - } - *ptrout++ = (JSAMPLE) pixcode; - } - } -} - - -METHODDEF(void) -color_quantize3 (j_decompress_ptr cinfo, JSAMPARRAY input_buf, - JSAMPARRAY output_buf, int num_rows) -/* Fast path for out_color_components==3, no dithering */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - register int pixcode; - register JSAMPROW ptrin, ptrout; - JSAMPROW colorindex0 = cquantize->colorindex[0]; - JSAMPROW colorindex1 = cquantize->colorindex[1]; - JSAMPROW colorindex2 = cquantize->colorindex[2]; - int row; - JDIMENSION col; - JDIMENSION width = cinfo->output_width; - - for (row = 0; row < num_rows; row++) { - ptrin = input_buf[row]; - ptrout = output_buf[row]; - for (col = width; col > 0; col--) { - pixcode = GETJSAMPLE(colorindex0[GETJSAMPLE(*ptrin++)]); - pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*ptrin++)]); - pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*ptrin++)]); - *ptrout++ = (JSAMPLE) pixcode; - } - } -} - - -METHODDEF(void) -quantize_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, - JSAMPARRAY output_buf, int num_rows) -/* General case, with ordered dithering */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - register JSAMPROW input_ptr; - register JSAMPROW output_ptr; - JSAMPROW colorindex_ci; - int * dither; /* points to active row of dither matrix */ - int row_index, col_index; /* current indexes into dither matrix */ - int nc = cinfo->out_color_components; - int ci; - int row; - JDIMENSION col; - JDIMENSION width = cinfo->output_width; - - for (row = 0; row < num_rows; row++) { - /* Initialize output values to 0 so can process components separately */ - jzero_far((void FAR *) output_buf[row], - (size_t) (width * SIZEOF(JSAMPLE))); - row_index = cquantize->row_index; - for (ci = 0; ci < nc; ci++) { - input_ptr = input_buf[row] + ci; - output_ptr = output_buf[row]; - colorindex_ci = cquantize->colorindex[ci]; - dither = cquantize->odither[ci][row_index]; - col_index = 0; - - for (col = width; col > 0; col--) { - /* Form pixel value + dither, range-limit to 0..MAXJSAMPLE, - * select output value, accumulate into output code for this pixel. - * Range-limiting need not be done explicitly, as we have extended - * the colorindex table to produce the right answers for out-of-range - * inputs. The maximum dither is +- MAXJSAMPLE; this sets the - * required amount of padding. - */ - *output_ptr += colorindex_ci[GETJSAMPLE(*input_ptr)+dither[col_index]]; - input_ptr += nc; - output_ptr++; - col_index = (col_index + 1) & ODITHER_MASK; - } - } - /* Advance row index for next row */ - row_index = (row_index + 1) & ODITHER_MASK; - cquantize->row_index = row_index; - } -} - - -METHODDEF(void) -quantize3_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, - JSAMPARRAY output_buf, int num_rows) -/* Fast path for out_color_components==3, with ordered dithering */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - register int pixcode; - register JSAMPROW input_ptr; - register JSAMPROW output_ptr; - JSAMPROW colorindex0 = cquantize->colorindex[0]; - JSAMPROW colorindex1 = cquantize->colorindex[1]; - JSAMPROW colorindex2 = cquantize->colorindex[2]; - int * dither0; /* points to active row of dither matrix */ - int * dither1; - int * dither2; - int row_index, col_index; /* current indexes into dither matrix */ - int row; - JDIMENSION col; - JDIMENSION width = cinfo->output_width; - - for (row = 0; row < num_rows; row++) { - row_index = cquantize->row_index; - input_ptr = input_buf[row]; - output_ptr = output_buf[row]; - dither0 = cquantize->odither[0][row_index]; - dither1 = cquantize->odither[1][row_index]; - dither2 = cquantize->odither[2][row_index]; - col_index = 0; - - for (col = width; col > 0; col--) { - pixcode = GETJSAMPLE(colorindex0[GETJSAMPLE(*input_ptr++) + - dither0[col_index]]); - pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*input_ptr++) + - dither1[col_index]]); - pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*input_ptr++) + - dither2[col_index]]); - *output_ptr++ = (JSAMPLE) pixcode; - col_index = (col_index + 1) & ODITHER_MASK; - } - row_index = (row_index + 1) & ODITHER_MASK; - cquantize->row_index = row_index; - } -} - - -METHODDEF(void) -quantize_fs_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, - JSAMPARRAY output_buf, int num_rows) -/* General case, with Floyd-Steinberg dithering */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - register LOCFSERROR cur; /* current error or pixel value */ - LOCFSERROR belowerr; /* error for pixel below cur */ - LOCFSERROR bpreverr; /* error for below/prev col */ - LOCFSERROR bnexterr; /* error for below/next col */ - LOCFSERROR delta; - register FSERRPTR errorptr; /* => fserrors[] at column before current */ - register JSAMPROW input_ptr; - register JSAMPROW output_ptr; - JSAMPROW colorindex_ci; - JSAMPROW colormap_ci; - int pixcode; - int nc = cinfo->out_color_components; - int dir; /* 1 for left-to-right, -1 for right-to-left */ - int dirnc; /* dir * nc */ - int ci; - int row; - JDIMENSION col; - JDIMENSION width = cinfo->output_width; - JSAMPLE *range_limit = cinfo->sample_range_limit; - SHIFT_TEMPS - - for (row = 0; row < num_rows; row++) { - /* Initialize output values to 0 so can process components separately */ - jzero_far((void FAR *) output_buf[row], - (size_t) (width * SIZEOF(JSAMPLE))); - for (ci = 0; ci < nc; ci++) { - input_ptr = input_buf[row] + ci; - output_ptr = output_buf[row]; - if (cquantize->on_odd_row) { - /* work right to left in this row */ - input_ptr += (width-1) * nc; /* so point to rightmost pixel */ - output_ptr += width-1; - dir = -1; - dirnc = -nc; - errorptr = cquantize->fserrors[ci] + (width+1); /* => entry after last column */ - } else { - /* work left to right in this row */ - dir = 1; - dirnc = nc; - errorptr = cquantize->fserrors[ci]; /* => entry before first column */ - } - colorindex_ci = cquantize->colorindex[ci]; - colormap_ci = cquantize->sv_colormap[ci]; - /* Preset error values: no error propagated to first pixel from left */ - cur = 0; - /* and no error propagated to row below yet */ - belowerr = bpreverr = 0; - - for (col = width; col > 0; col--) { - /* cur holds the error propagated from the previous pixel on the - * current line. Add the error propagated from the previous line - * to form the complete error correction term for this pixel, and - * round the error term (which is expressed * 16) to an integer. - * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct - * for either sign of the error value. - * Note: errorptr points to *previous* column's array entry. - */ - cur = RIGHT_SHIFT(cur + errorptr[dir] + 8, 4); - /* Form pixel value + error, and range-limit to 0..MAXJSAMPLE. - * The maximum error is +- MAXJSAMPLE; this sets the required size - * of the range_limit array. - */ - cur += GETJSAMPLE(*input_ptr); - cur = GETJSAMPLE(range_limit[cur]); - /* Select output value, accumulate into output code for this pixel */ - pixcode = GETJSAMPLE(colorindex_ci[cur]); - *output_ptr += (JSAMPLE) pixcode; - /* Compute actual representation error at this pixel */ - /* Note: we can do this even though we don't have the final */ - /* pixel code, because the colormap is orthogonal. */ - cur -= GETJSAMPLE(colormap_ci[pixcode]); - /* Compute error fractions to be propagated to adjacent pixels. - * Add these into the running sums, and simultaneously shift the - * next-line error sums left by 1 column. - */ - bnexterr = cur; - delta = cur * 2; - cur += delta; /* form error * 3 */ - errorptr[0] = (FSERROR) (bpreverr + cur); - cur += delta; /* form error * 5 */ - bpreverr = belowerr + cur; - belowerr = bnexterr; - cur += delta; /* form error * 7 */ - /* At this point cur contains the 7/16 error value to be propagated - * to the next pixel on the current line, and all the errors for the - * next line have been shifted over. We are therefore ready to move on. - */ - input_ptr += dirnc; /* advance input ptr to next column */ - output_ptr += dir; /* advance output ptr to next column */ - errorptr += dir; /* advance errorptr to current column */ - } - /* Post-loop cleanup: we must unload the final error value into the - * final fserrors[] entry. Note we need not unload belowerr because - * it is for the dummy column before or after the actual array. - */ - errorptr[0] = (FSERROR) bpreverr; /* unload prev err into array */ - } - cquantize->on_odd_row = (cquantize->on_odd_row ? FALSE : TRUE); - } -} - - -/* - * Allocate workspace for Floyd-Steinberg errors. - */ - -LOCAL(void) -alloc_fs_workspace (j_decompress_ptr cinfo) -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - size_t arraysize; - int i; - - arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR)); - for (i = 0; i < cinfo->out_color_components; i++) { - cquantize->fserrors[i] = (FSERRPTR) - (*cinfo->mem->alloc_large)((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize); - } -} - - -/* - * Initialize for one-pass color quantization. - */ - -METHODDEF(void) -start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan) -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - size_t arraysize; - int i; - - /* Install my colormap. */ - cinfo->colormap = cquantize->sv_colormap; - cinfo->actual_number_of_colors = cquantize->sv_actual; - - /* Initialize for desired dithering mode. */ - switch (cinfo->dither_mode) { - case JDITHER_NONE: - if (cinfo->out_color_components == 3) - cquantize->pub.color_quantize = color_quantize3; - else - cquantize->pub.color_quantize = color_quantize; - break; - case JDITHER_ORDERED: - if (cinfo->out_color_components == 3) - cquantize->pub.color_quantize = quantize3_ord_dither; - else - cquantize->pub.color_quantize = quantize_ord_dither; - cquantize->row_index = 0; /* initialize state for ordered dither */ - /* If user changed to ordered dither from another mode, - * we must recreate the color index table with padding. - * This will cost extra space, but probably isn't very likely. - */ - if (! cquantize->is_padded) - create_colorindex(cinfo); - /* Create ordered-dither tables if we didn't already. */ - if (cquantize->odither[0] == NULL) - create_odither_tables(cinfo); - break; - case JDITHER_FS: - cquantize->pub.color_quantize = quantize_fs_dither; - cquantize->on_odd_row = FALSE; /* initialize state for F-S dither */ - /* Allocate Floyd-Steinberg workspace if didn't already. */ - if (cquantize->fserrors[0] == NULL) - alloc_fs_workspace(cinfo); - /* Initialize the propagated errors to zero. */ - arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR)); - for (i = 0; i < cinfo->out_color_components; i++) - jzero_far((void FAR *) cquantize->fserrors[i], arraysize); - break; - default: - ERREXIT(cinfo, JERR_NOT_COMPILED); - break; - } -} - - -/* - * Finish up at the end of the pass. - */ - -METHODDEF(void) -finish_pass_1_quant (j_decompress_ptr cinfo) -{ - /* no work in 1-pass case */ -} - - -/* - * Switch to a new external colormap between output passes. - * Shouldn't get to this module! - */ - -METHODDEF(void) -new_color_map_1_quant (j_decompress_ptr cinfo) -{ - ERREXIT(cinfo, JERR_MODE_CHANGE); -} - - -/* - * Module initialization routine for 1-pass color quantization. - */ - -GLOBAL(void) -jinit_1pass_quantizer (j_decompress_ptr cinfo) -{ - my_cquantize_ptr cquantize; - - cquantize = (my_cquantize_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_cquantizer)); - cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize; - cquantize->pub.start_pass = start_pass_1_quant; - cquantize->pub.finish_pass = finish_pass_1_quant; - cquantize->pub.new_color_map = new_color_map_1_quant; - cquantize->fserrors[0] = NULL; /* Flag FS workspace not allocated */ - cquantize->odither[0] = NULL; /* Also flag odither arrays not allocated */ - - /* Make sure my internal arrays won't overflow */ - if (cinfo->out_color_components > MAX_Q_COMPS) - ERREXIT1(cinfo, JERR_QUANT_COMPONENTS, MAX_Q_COMPS); - /* Make sure colormap indexes can be represented by JSAMPLEs */ - if (cinfo->desired_number_of_colors > (MAXJSAMPLE+1)) - ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXJSAMPLE+1); - - /* Create the colormap and color index table. */ - create_colormap(cinfo); - create_colorindex(cinfo); - - /* Allocate Floyd-Steinberg workspace now if requested. - * We do this now since it is FAR storage and may affect the memory - * manager's space calculations. If the user changes to FS dither - * mode in a later pass, we will allocate the space then, and will - * possibly overrun the max_memory_to_use setting. - */ - if (cinfo->dither_mode == JDITHER_FS) - alloc_fs_workspace(cinfo); -} - -#endif /* QUANT_1PASS_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jquant2.c b/gtkmm-osx/trunk/jpeg-6b/jquant2.c deleted file mode 100644 index af601e3..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jquant2.c +++ /dev/null @@ -1,1310 +0,0 @@ -/* - * jquant2.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains 2-pass color quantization (color mapping) routines. - * These routines provide selection of a custom color map for an image, - * followed by mapping of the image to that color map, with optional - * Floyd-Steinberg dithering. - * It is also possible to use just the second pass to map to an arbitrary - * externally-given color map. - * - * Note: ordered dithering is not supported, since there isn't any fast - * way to compute intercolor distances; it's unclear that ordered dither's - * fundamental assumptions even hold with an irregularly spaced color map. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - -#ifdef QUANT_2PASS_SUPPORTED - - -/* - * This module implements the well-known Heckbert paradigm for color - * quantization. Most of the ideas used here can be traced back to - * Heckbert's seminal paper - * Heckbert, Paul. "Color Image Quantization for Frame Buffer Display", - * Proc. SIGGRAPH '82, Computer Graphics v.16 #3 (July 1982), pp 297-304. - * - * In the first pass over the image, we accumulate a histogram showing the - * usage count of each possible color. To keep the histogram to a reasonable - * size, we reduce the precision of the input; typical practice is to retain - * 5 or 6 bits per color, so that 8 or 4 different input values are counted - * in the same histogram cell. - * - * Next, the color-selection step begins with a box representing the whole - * color space, and repeatedly splits the "largest" remaining box until we - * have as many boxes as desired colors. Then the mean color in each - * remaining box becomes one of the possible output colors. - * - * The second pass over the image maps each input pixel to the closest output - * color (optionally after applying a Floyd-Steinberg dithering correction). - * This mapping is logically trivial, but making it go fast enough requires - * considerable care. - * - * Heckbert-style quantizers vary a good deal in their policies for choosing - * the "largest" box and deciding where to cut it. The particular policies - * used here have proved out well in experimental comparisons, but better ones - * may yet be found. - * - * In earlier versions of the IJG code, this module quantized in YCbCr color - * space, processing the raw upsampled data without a color conversion step. - * This allowed the color conversion math to be done only once per colormap - * entry, not once per pixel. However, that optimization precluded other - * useful optimizations (such as merging color conversion with upsampling) - * and it also interfered with desired capabilities such as quantizing to an - * externally-supplied colormap. We have therefore abandoned that approach. - * The present code works in the post-conversion color space, typically RGB. - * - * To improve the visual quality of the results, we actually work in scaled - * RGB space, giving G distances more weight than R, and R in turn more than - * B. To do everything in integer math, we must use integer scale factors. - * The 2/3/1 scale factors used here correspond loosely to the relative - * weights of the colors in the NTSC grayscale equation. - * If you want to use this code to quantize a non-RGB color space, you'll - * probably need to change these scale factors. - */ - -#define R_SCALE 2 /* scale R distances by this much */ -#define G_SCALE 3 /* scale G distances by this much */ -#define B_SCALE 1 /* and B by this much */ - -/* Relabel R/G/B as components 0/1/2, respecting the RGB ordering defined - * in jmorecfg.h. As the code stands, it will do the right thing for R,G,B - * and B,G,R orders. If you define some other weird order in jmorecfg.h, - * you'll get compile errors until you extend this logic. In that case - * you'll probably want to tweak the histogram sizes too. - */ - -#if RGB_RED == 0 -#define C0_SCALE R_SCALE -#endif -#if RGB_BLUE == 0 -#define C0_SCALE B_SCALE -#endif -#if RGB_GREEN == 1 -#define C1_SCALE G_SCALE -#endif -#if RGB_RED == 2 -#define C2_SCALE R_SCALE -#endif -#if RGB_BLUE == 2 -#define C2_SCALE B_SCALE -#endif - - -/* - * First we have the histogram data structure and routines for creating it. - * - * The number of bits of precision can be adjusted by changing these symbols. - * We recommend keeping 6 bits for G and 5 each for R and B. - * If you have plenty of memory and cycles, 6 bits all around gives marginally - * better results; if you are short of memory, 5 bits all around will save - * some space but degrade the results. - * To maintain a fully accurate histogram, we'd need to allocate a "long" - * (preferably unsigned long) for each cell. In practice this is overkill; - * we can get by with 16 bits per cell. Few of the cell counts will overflow, - * and clamping those that do overflow to the maximum value will give close- - * enough results. This reduces the recommended histogram size from 256Kb - * to 128Kb, which is a useful savings on PC-class machines. - * (In the second pass the histogram space is re-used for pixel mapping data; - * in that capacity, each cell must be able to store zero to the number of - * desired colors. 16 bits/cell is plenty for that too.) - * Since the JPEG code is intended to run in small memory model on 80x86 - * machines, we can't just allocate the histogram in one chunk. Instead - * of a true 3-D array, we use a row of pointers to 2-D arrays. Each - * pointer corresponds to a C0 value (typically 2^5 = 32 pointers) and - * each 2-D array has 2^6*2^5 = 2048 or 2^6*2^6 = 4096 entries. Note that - * on 80x86 machines, the pointer row is in near memory but the actual - * arrays are in far memory (same arrangement as we use for image arrays). - */ - -#define MAXNUMCOLORS (MAXJSAMPLE+1) /* maximum size of colormap */ - -/* These will do the right thing for either R,G,B or B,G,R color order, - * but you may not like the results for other color orders. - */ -#define HIST_C0_BITS 5 /* bits of precision in R/B histogram */ -#define HIST_C1_BITS 6 /* bits of precision in G histogram */ -#define HIST_C2_BITS 5 /* bits of precision in B/R histogram */ - -/* Number of elements along histogram axes. */ -#define HIST_C0_ELEMS (1<cquantize; - register JSAMPROW ptr; - register histptr histp; - register hist3d histogram = cquantize->histogram; - int row; - JDIMENSION col; - JDIMENSION width = cinfo->output_width; - - for (row = 0; row < num_rows; row++) { - ptr = input_buf[row]; - for (col = width; col > 0; col--) { - /* get pixel value and index into the histogram */ - histp = & histogram[GETJSAMPLE(ptr[0]) >> C0_SHIFT] - [GETJSAMPLE(ptr[1]) >> C1_SHIFT] - [GETJSAMPLE(ptr[2]) >> C2_SHIFT]; - /* increment, check for overflow and undo increment if so. */ - if (++(*histp) <= 0) - (*histp)--; - ptr += 3; - } - } -} - - -/* - * Next we have the really interesting routines: selection of a colormap - * given the completed histogram. - * These routines work with a list of "boxes", each representing a rectangular - * subset of the input color space (to histogram precision). - */ - -typedef struct { - /* The bounds of the box (inclusive); expressed as histogram indexes */ - int c0min, c0max; - int c1min, c1max; - int c2min, c2max; - /* The volume (actually 2-norm) of the box */ - INT32 volume; - /* The number of nonzero histogram cells within this box */ - long colorcount; -} box; - -typedef box * boxptr; - - -LOCAL(boxptr) -find_biggest_color_pop (boxptr boxlist, int numboxes) -/* Find the splittable box with the largest color population */ -/* Returns NULL if no splittable boxes remain */ -{ - register boxptr boxp; - register int i; - register long maxc = 0; - boxptr which = NULL; - - for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { - if (boxp->colorcount > maxc && boxp->volume > 0) { - which = boxp; - maxc = boxp->colorcount; - } - } - return which; -} - - -LOCAL(boxptr) -find_biggest_volume (boxptr boxlist, int numboxes) -/* Find the splittable box with the largest (scaled) volume */ -/* Returns NULL if no splittable boxes remain */ -{ - register boxptr boxp; - register int i; - register INT32 maxv = 0; - boxptr which = NULL; - - for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { - if (boxp->volume > maxv) { - which = boxp; - maxv = boxp->volume; - } - } - return which; -} - - -LOCAL(void) -update_box (j_decompress_ptr cinfo, boxptr boxp) -/* Shrink the min/max bounds of a box to enclose only nonzero elements, */ -/* and recompute its volume and population */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - hist3d histogram = cquantize->histogram; - histptr histp; - int c0,c1,c2; - int c0min,c0max,c1min,c1max,c2min,c2max; - INT32 dist0,dist1,dist2; - long ccount; - - c0min = boxp->c0min; c0max = boxp->c0max; - c1min = boxp->c1min; c1max = boxp->c1max; - c2min = boxp->c2min; c2max = boxp->c2max; - - if (c0max > c0min) - for (c0 = c0min; c0 <= c0max; c0++) - for (c1 = c1min; c1 <= c1max; c1++) { - histp = & histogram[c0][c1][c2min]; - for (c2 = c2min; c2 <= c2max; c2++) - if (*histp++ != 0) { - boxp->c0min = c0min = c0; - goto have_c0min; - } - } - have_c0min: - if (c0max > c0min) - for (c0 = c0max; c0 >= c0min; c0--) - for (c1 = c1min; c1 <= c1max; c1++) { - histp = & histogram[c0][c1][c2min]; - for (c2 = c2min; c2 <= c2max; c2++) - if (*histp++ != 0) { - boxp->c0max = c0max = c0; - goto have_c0max; - } - } - have_c0max: - if (c1max > c1min) - for (c1 = c1min; c1 <= c1max; c1++) - for (c0 = c0min; c0 <= c0max; c0++) { - histp = & histogram[c0][c1][c2min]; - for (c2 = c2min; c2 <= c2max; c2++) - if (*histp++ != 0) { - boxp->c1min = c1min = c1; - goto have_c1min; - } - } - have_c1min: - if (c1max > c1min) - for (c1 = c1max; c1 >= c1min; c1--) - for (c0 = c0min; c0 <= c0max; c0++) { - histp = & histogram[c0][c1][c2min]; - for (c2 = c2min; c2 <= c2max; c2++) - if (*histp++ != 0) { - boxp->c1max = c1max = c1; - goto have_c1max; - } - } - have_c1max: - if (c2max > c2min) - for (c2 = c2min; c2 <= c2max; c2++) - for (c0 = c0min; c0 <= c0max; c0++) { - histp = & histogram[c0][c1min][c2]; - for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) - if (*histp != 0) { - boxp->c2min = c2min = c2; - goto have_c2min; - } - } - have_c2min: - if (c2max > c2min) - for (c2 = c2max; c2 >= c2min; c2--) - for (c0 = c0min; c0 <= c0max; c0++) { - histp = & histogram[c0][c1min][c2]; - for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) - if (*histp != 0) { - boxp->c2max = c2max = c2; - goto have_c2max; - } - } - have_c2max: - - /* Update box volume. - * We use 2-norm rather than real volume here; this biases the method - * against making long narrow boxes, and it has the side benefit that - * a box is splittable iff norm > 0. - * Since the differences are expressed in histogram-cell units, - * we have to shift back to JSAMPLE units to get consistent distances; - * after which, we scale according to the selected distance scale factors. - */ - dist0 = ((c0max - c0min) << C0_SHIFT) * C0_SCALE; - dist1 = ((c1max - c1min) << C1_SHIFT) * C1_SCALE; - dist2 = ((c2max - c2min) << C2_SHIFT) * C2_SCALE; - boxp->volume = dist0*dist0 + dist1*dist1 + dist2*dist2; - - /* Now scan remaining volume of box and compute population */ - ccount = 0; - for (c0 = c0min; c0 <= c0max; c0++) - for (c1 = c1min; c1 <= c1max; c1++) { - histp = & histogram[c0][c1][c2min]; - for (c2 = c2min; c2 <= c2max; c2++, histp++) - if (*histp != 0) { - ccount++; - } - } - boxp->colorcount = ccount; -} - - -LOCAL(int) -median_cut (j_decompress_ptr cinfo, boxptr boxlist, int numboxes, - int desired_colors) -/* Repeatedly select and split the largest box until we have enough boxes */ -{ - int n,lb; - int c0,c1,c2,cmax; - register boxptr b1,b2; - - while (numboxes < desired_colors) { - /* Select box to split. - * Current algorithm: by population for first half, then by volume. - */ - if (numboxes*2 <= desired_colors) { - b1 = find_biggest_color_pop(boxlist, numboxes); - } else { - b1 = find_biggest_volume(boxlist, numboxes); - } - if (b1 == NULL) /* no splittable boxes left! */ - break; - b2 = &boxlist[numboxes]; /* where new box will go */ - /* Copy the color bounds to the new box. */ - b2->c0max = b1->c0max; b2->c1max = b1->c1max; b2->c2max = b1->c2max; - b2->c0min = b1->c0min; b2->c1min = b1->c1min; b2->c2min = b1->c2min; - /* Choose which axis to split the box on. - * Current algorithm: longest scaled axis. - * See notes in update_box about scaling distances. - */ - c0 = ((b1->c0max - b1->c0min) << C0_SHIFT) * C0_SCALE; - c1 = ((b1->c1max - b1->c1min) << C1_SHIFT) * C1_SCALE; - c2 = ((b1->c2max - b1->c2min) << C2_SHIFT) * C2_SCALE; - /* We want to break any ties in favor of green, then red, blue last. - * This code does the right thing for R,G,B or B,G,R color orders only. - */ -#if RGB_RED == 0 - cmax = c1; n = 1; - if (c0 > cmax) { cmax = c0; n = 0; } - if (c2 > cmax) { n = 2; } -#else - cmax = c1; n = 1; - if (c2 > cmax) { cmax = c2; n = 2; } - if (c0 > cmax) { n = 0; } -#endif - /* Choose split point along selected axis, and update box bounds. - * Current algorithm: split at halfway point. - * (Since the box has been shrunk to minimum volume, - * any split will produce two nonempty subboxes.) - * Note that lb value is max for lower box, so must be < old max. - */ - switch (n) { - case 0: - lb = (b1->c0max + b1->c0min) / 2; - b1->c0max = lb; - b2->c0min = lb+1; - break; - case 1: - lb = (b1->c1max + b1->c1min) / 2; - b1->c1max = lb; - b2->c1min = lb+1; - break; - case 2: - lb = (b1->c2max + b1->c2min) / 2; - b1->c2max = lb; - b2->c2min = lb+1; - break; - } - /* Update stats for boxes */ - update_box(cinfo, b1); - update_box(cinfo, b2); - numboxes++; - } - return numboxes; -} - - -LOCAL(void) -compute_color (j_decompress_ptr cinfo, boxptr boxp, int icolor) -/* Compute representative color for a box, put it in colormap[icolor] */ -{ - /* Current algorithm: mean weighted by pixels (not colors) */ - /* Note it is important to get the rounding correct! */ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - hist3d histogram = cquantize->histogram; - histptr histp; - int c0,c1,c2; - int c0min,c0max,c1min,c1max,c2min,c2max; - long count; - long total = 0; - long c0total = 0; - long c1total = 0; - long c2total = 0; - - c0min = boxp->c0min; c0max = boxp->c0max; - c1min = boxp->c1min; c1max = boxp->c1max; - c2min = boxp->c2min; c2max = boxp->c2max; - - for (c0 = c0min; c0 <= c0max; c0++) - for (c1 = c1min; c1 <= c1max; c1++) { - histp = & histogram[c0][c1][c2min]; - for (c2 = c2min; c2 <= c2max; c2++) { - if ((count = *histp++) != 0) { - total += count; - c0total += ((c0 << C0_SHIFT) + ((1<>1)) * count; - c1total += ((c1 << C1_SHIFT) + ((1<>1)) * count; - c2total += ((c2 << C2_SHIFT) + ((1<>1)) * count; - } - } - } - - cinfo->colormap[0][icolor] = (JSAMPLE) ((c0total + (total>>1)) / total); - cinfo->colormap[1][icolor] = (JSAMPLE) ((c1total + (total>>1)) / total); - cinfo->colormap[2][icolor] = (JSAMPLE) ((c2total + (total>>1)) / total); -} - - -LOCAL(void) -select_colors (j_decompress_ptr cinfo, int desired_colors) -/* Master routine for color selection */ -{ - boxptr boxlist; - int numboxes; - int i; - - /* Allocate workspace for box list */ - boxlist = (boxptr) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, desired_colors * SIZEOF(box)); - /* Initialize one box containing whole space */ - numboxes = 1; - boxlist[0].c0min = 0; - boxlist[0].c0max = MAXJSAMPLE >> C0_SHIFT; - boxlist[0].c1min = 0; - boxlist[0].c1max = MAXJSAMPLE >> C1_SHIFT; - boxlist[0].c2min = 0; - boxlist[0].c2max = MAXJSAMPLE >> C2_SHIFT; - /* Shrink it to actually-used volume and set its statistics */ - update_box(cinfo, & boxlist[0]); - /* Perform median-cut to produce final box list */ - numboxes = median_cut(cinfo, boxlist, numboxes, desired_colors); - /* Compute the representative color for each box, fill colormap */ - for (i = 0; i < numboxes; i++) - compute_color(cinfo, & boxlist[i], i); - cinfo->actual_number_of_colors = numboxes; - TRACEMS1(cinfo, 1, JTRC_QUANT_SELECTED, numboxes); -} - - -/* - * These routines are concerned with the time-critical task of mapping input - * colors to the nearest color in the selected colormap. - * - * We re-use the histogram space as an "inverse color map", essentially a - * cache for the results of nearest-color searches. All colors within a - * histogram cell will be mapped to the same colormap entry, namely the one - * closest to the cell's center. This may not be quite the closest entry to - * the actual input color, but it's almost as good. A zero in the cache - * indicates we haven't found the nearest color for that cell yet; the array - * is cleared to zeroes before starting the mapping pass. When we find the - * nearest color for a cell, its colormap index plus one is recorded in the - * cache for future use. The pass2 scanning routines call fill_inverse_cmap - * when they need to use an unfilled entry in the cache. - * - * Our method of efficiently finding nearest colors is based on the "locally - * sorted search" idea described by Heckbert and on the incremental distance - * calculation described by Spencer W. Thomas in chapter III.1 of Graphics - * Gems II (James Arvo, ed. Academic Press, 1991). Thomas points out that - * the distances from a given colormap entry to each cell of the histogram can - * be computed quickly using an incremental method: the differences between - * distances to adjacent cells themselves differ by a constant. This allows a - * fairly fast implementation of the "brute force" approach of computing the - * distance from every colormap entry to every histogram cell. Unfortunately, - * it needs a work array to hold the best-distance-so-far for each histogram - * cell (because the inner loop has to be over cells, not colormap entries). - * The work array elements have to be INT32s, so the work array would need - * 256Kb at our recommended precision. This is not feasible in DOS machines. - * - * To get around these problems, we apply Thomas' method to compute the - * nearest colors for only the cells within a small subbox of the histogram. - * The work array need be only as big as the subbox, so the memory usage - * problem is solved. Furthermore, we need not fill subboxes that are never - * referenced in pass2; many images use only part of the color gamut, so a - * fair amount of work is saved. An additional advantage of this - * approach is that we can apply Heckbert's locality criterion to quickly - * eliminate colormap entries that are far away from the subbox; typically - * three-fourths of the colormap entries are rejected by Heckbert's criterion, - * and we need not compute their distances to individual cells in the subbox. - * The speed of this approach is heavily influenced by the subbox size: too - * small means too much overhead, too big loses because Heckbert's criterion - * can't eliminate as many colormap entries. Empirically the best subbox - * size seems to be about 1/512th of the histogram (1/8th in each direction). - * - * Thomas' article also describes a refined method which is asymptotically - * faster than the brute-force method, but it is also far more complex and - * cannot efficiently be applied to small subboxes. It is therefore not - * useful for programs intended to be portable to DOS machines. On machines - * with plenty of memory, filling the whole histogram in one shot with Thomas' - * refined method might be faster than the present code --- but then again, - * it might not be any faster, and it's certainly more complicated. - */ - - -/* log2(histogram cells in update box) for each axis; this can be adjusted */ -#define BOX_C0_LOG (HIST_C0_BITS-3) -#define BOX_C1_LOG (HIST_C1_BITS-3) -#define BOX_C2_LOG (HIST_C2_BITS-3) - -#define BOX_C0_ELEMS (1<actual_number_of_colors; - int maxc0, maxc1, maxc2; - int centerc0, centerc1, centerc2; - int i, x, ncolors; - INT32 minmaxdist, min_dist, max_dist, tdist; - INT32 mindist[MAXNUMCOLORS]; /* min distance to colormap entry i */ - - /* Compute true coordinates of update box's upper corner and center. - * Actually we compute the coordinates of the center of the upper-corner - * histogram cell, which are the upper bounds of the volume we care about. - * Note that since ">>" rounds down, the "center" values may be closer to - * min than to max; hence comparisons to them must be "<=", not "<". - */ - maxc0 = minc0 + ((1 << BOX_C0_SHIFT) - (1 << C0_SHIFT)); - centerc0 = (minc0 + maxc0) >> 1; - maxc1 = minc1 + ((1 << BOX_C1_SHIFT) - (1 << C1_SHIFT)); - centerc1 = (minc1 + maxc1) >> 1; - maxc2 = minc2 + ((1 << BOX_C2_SHIFT) - (1 << C2_SHIFT)); - centerc2 = (minc2 + maxc2) >> 1; - - /* For each color in colormap, find: - * 1. its minimum squared-distance to any point in the update box - * (zero if color is within update box); - * 2. its maximum squared-distance to any point in the update box. - * Both of these can be found by considering only the corners of the box. - * We save the minimum distance for each color in mindist[]; - * only the smallest maximum distance is of interest. - */ - minmaxdist = 0x7FFFFFFFL; - - for (i = 0; i < numcolors; i++) { - /* We compute the squared-c0-distance term, then add in the other two. */ - x = GETJSAMPLE(cinfo->colormap[0][i]); - if (x < minc0) { - tdist = (x - minc0) * C0_SCALE; - min_dist = tdist*tdist; - tdist = (x - maxc0) * C0_SCALE; - max_dist = tdist*tdist; - } else if (x > maxc0) { - tdist = (x - maxc0) * C0_SCALE; - min_dist = tdist*tdist; - tdist = (x - minc0) * C0_SCALE; - max_dist = tdist*tdist; - } else { - /* within cell range so no contribution to min_dist */ - min_dist = 0; - if (x <= centerc0) { - tdist = (x - maxc0) * C0_SCALE; - max_dist = tdist*tdist; - } else { - tdist = (x - minc0) * C0_SCALE; - max_dist = tdist*tdist; - } - } - - x = GETJSAMPLE(cinfo->colormap[1][i]); - if (x < minc1) { - tdist = (x - minc1) * C1_SCALE; - min_dist += tdist*tdist; - tdist = (x - maxc1) * C1_SCALE; - max_dist += tdist*tdist; - } else if (x > maxc1) { - tdist = (x - maxc1) * C1_SCALE; - min_dist += tdist*tdist; - tdist = (x - minc1) * C1_SCALE; - max_dist += tdist*tdist; - } else { - /* within cell range so no contribution to min_dist */ - if (x <= centerc1) { - tdist = (x - maxc1) * C1_SCALE; - max_dist += tdist*tdist; - } else { - tdist = (x - minc1) * C1_SCALE; - max_dist += tdist*tdist; - } - } - - x = GETJSAMPLE(cinfo->colormap[2][i]); - if (x < minc2) { - tdist = (x - minc2) * C2_SCALE; - min_dist += tdist*tdist; - tdist = (x - maxc2) * C2_SCALE; - max_dist += tdist*tdist; - } else if (x > maxc2) { - tdist = (x - maxc2) * C2_SCALE; - min_dist += tdist*tdist; - tdist = (x - minc2) * C2_SCALE; - max_dist += tdist*tdist; - } else { - /* within cell range so no contribution to min_dist */ - if (x <= centerc2) { - tdist = (x - maxc2) * C2_SCALE; - max_dist += tdist*tdist; - } else { - tdist = (x - minc2) * C2_SCALE; - max_dist += tdist*tdist; - } - } - - mindist[i] = min_dist; /* save away the results */ - if (max_dist < minmaxdist) - minmaxdist = max_dist; - } - - /* Now we know that no cell in the update box is more than minmaxdist - * away from some colormap entry. Therefore, only colors that are - * within minmaxdist of some part of the box need be considered. - */ - ncolors = 0; - for (i = 0; i < numcolors; i++) { - if (mindist[i] <= minmaxdist) - colorlist[ncolors++] = (JSAMPLE) i; - } - return ncolors; -} - - -LOCAL(void) -find_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2, - int numcolors, JSAMPLE colorlist[], JSAMPLE bestcolor[]) -/* Find the closest colormap entry for each cell in the update box, - * given the list of candidate colors prepared by find_nearby_colors. - * Return the indexes of the closest entries in the bestcolor[] array. - * This routine uses Thomas' incremental distance calculation method to - * find the distance from a colormap entry to successive cells in the box. - */ -{ - int ic0, ic1, ic2; - int i, icolor; - register INT32 * bptr; /* pointer into bestdist[] array */ - JSAMPLE * cptr; /* pointer into bestcolor[] array */ - INT32 dist0, dist1; /* initial distance values */ - register INT32 dist2; /* current distance in inner loop */ - INT32 xx0, xx1; /* distance increments */ - register INT32 xx2; - INT32 inc0, inc1, inc2; /* initial values for increments */ - /* This array holds the distance to the nearest-so-far color for each cell */ - INT32 bestdist[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; - - /* Initialize best-distance for each cell of the update box */ - bptr = bestdist; - for (i = BOX_C0_ELEMS*BOX_C1_ELEMS*BOX_C2_ELEMS-1; i >= 0; i--) - *bptr++ = 0x7FFFFFFFL; - - /* For each color selected by find_nearby_colors, - * compute its distance to the center of each cell in the box. - * If that's less than best-so-far, update best distance and color number. - */ - - /* Nominal steps between cell centers ("x" in Thomas article) */ -#define STEP_C0 ((1 << C0_SHIFT) * C0_SCALE) -#define STEP_C1 ((1 << C1_SHIFT) * C1_SCALE) -#define STEP_C2 ((1 << C2_SHIFT) * C2_SCALE) - - for (i = 0; i < numcolors; i++) { - icolor = GETJSAMPLE(colorlist[i]); - /* Compute (square of) distance from minc0/c1/c2 to this color */ - inc0 = (minc0 - GETJSAMPLE(cinfo->colormap[0][icolor])) * C0_SCALE; - dist0 = inc0*inc0; - inc1 = (minc1 - GETJSAMPLE(cinfo->colormap[1][icolor])) * C1_SCALE; - dist0 += inc1*inc1; - inc2 = (minc2 - GETJSAMPLE(cinfo->colormap[2][icolor])) * C2_SCALE; - dist0 += inc2*inc2; - /* Form the initial difference increments */ - inc0 = inc0 * (2 * STEP_C0) + STEP_C0 * STEP_C0; - inc1 = inc1 * (2 * STEP_C1) + STEP_C1 * STEP_C1; - inc2 = inc2 * (2 * STEP_C2) + STEP_C2 * STEP_C2; - /* Now loop over all cells in box, updating distance per Thomas method */ - bptr = bestdist; - cptr = bestcolor; - xx0 = inc0; - for (ic0 = BOX_C0_ELEMS-1; ic0 >= 0; ic0--) { - dist1 = dist0; - xx1 = inc1; - for (ic1 = BOX_C1_ELEMS-1; ic1 >= 0; ic1--) { - dist2 = dist1; - xx2 = inc2; - for (ic2 = BOX_C2_ELEMS-1; ic2 >= 0; ic2--) { - if (dist2 < *bptr) { - *bptr = dist2; - *cptr = (JSAMPLE) icolor; - } - dist2 += xx2; - xx2 += 2 * STEP_C2 * STEP_C2; - bptr++; - cptr++; - } - dist1 += xx1; - xx1 += 2 * STEP_C1 * STEP_C1; - } - dist0 += xx0; - xx0 += 2 * STEP_C0 * STEP_C0; - } - } -} - - -LOCAL(void) -fill_inverse_cmap (j_decompress_ptr cinfo, int c0, int c1, int c2) -/* Fill the inverse-colormap entries in the update box that contains */ -/* histogram cell c0/c1/c2. (Only that one cell MUST be filled, but */ -/* we can fill as many others as we wish.) */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - hist3d histogram = cquantize->histogram; - int minc0, minc1, minc2; /* lower left corner of update box */ - int ic0, ic1, ic2; - register JSAMPLE * cptr; /* pointer into bestcolor[] array */ - register histptr cachep; /* pointer into main cache array */ - /* This array lists the candidate colormap indexes. */ - JSAMPLE colorlist[MAXNUMCOLORS]; - int numcolors; /* number of candidate colors */ - /* This array holds the actually closest colormap index for each cell. */ - JSAMPLE bestcolor[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; - - /* Convert cell coordinates to update box ID */ - c0 >>= BOX_C0_LOG; - c1 >>= BOX_C1_LOG; - c2 >>= BOX_C2_LOG; - - /* Compute true coordinates of update box's origin corner. - * Actually we compute the coordinates of the center of the corner - * histogram cell, which are the lower bounds of the volume we care about. - */ - minc0 = (c0 << BOX_C0_SHIFT) + ((1 << C0_SHIFT) >> 1); - minc1 = (c1 << BOX_C1_SHIFT) + ((1 << C1_SHIFT) >> 1); - minc2 = (c2 << BOX_C2_SHIFT) + ((1 << C2_SHIFT) >> 1); - - /* Determine which colormap entries are close enough to be candidates - * for the nearest entry to some cell in the update box. - */ - numcolors = find_nearby_colors(cinfo, minc0, minc1, minc2, colorlist); - - /* Determine the actually nearest colors. */ - find_best_colors(cinfo, minc0, minc1, minc2, numcolors, colorlist, - bestcolor); - - /* Save the best color numbers (plus 1) in the main cache array */ - c0 <<= BOX_C0_LOG; /* convert ID back to base cell indexes */ - c1 <<= BOX_C1_LOG; - c2 <<= BOX_C2_LOG; - cptr = bestcolor; - for (ic0 = 0; ic0 < BOX_C0_ELEMS; ic0++) { - for (ic1 = 0; ic1 < BOX_C1_ELEMS; ic1++) { - cachep = & histogram[c0+ic0][c1+ic1][c2]; - for (ic2 = 0; ic2 < BOX_C2_ELEMS; ic2++) { - *cachep++ = (histcell) (GETJSAMPLE(*cptr++) + 1); - } - } - } -} - - -/* - * Map some rows of pixels to the output colormapped representation. - */ - -METHODDEF(void) -pass2_no_dither (j_decompress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows) -/* This version performs no dithering */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - hist3d histogram = cquantize->histogram; - register JSAMPROW inptr, outptr; - register histptr cachep; - register int c0, c1, c2; - int row; - JDIMENSION col; - JDIMENSION width = cinfo->output_width; - - for (row = 0; row < num_rows; row++) { - inptr = input_buf[row]; - outptr = output_buf[row]; - for (col = width; col > 0; col--) { - /* get pixel value and index into the cache */ - c0 = GETJSAMPLE(*inptr++) >> C0_SHIFT; - c1 = GETJSAMPLE(*inptr++) >> C1_SHIFT; - c2 = GETJSAMPLE(*inptr++) >> C2_SHIFT; - cachep = & histogram[c0][c1][c2]; - /* If we have not seen this color before, find nearest colormap entry */ - /* and update the cache */ - if (*cachep == 0) - fill_inverse_cmap(cinfo, c0,c1,c2); - /* Now emit the colormap index for this cell */ - *outptr++ = (JSAMPLE) (*cachep - 1); - } - } -} - - -METHODDEF(void) -pass2_fs_dither (j_decompress_ptr cinfo, - JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows) -/* This version performs Floyd-Steinberg dithering */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - hist3d histogram = cquantize->histogram; - register LOCFSERROR cur0, cur1, cur2; /* current error or pixel value */ - LOCFSERROR belowerr0, belowerr1, belowerr2; /* error for pixel below cur */ - LOCFSERROR bpreverr0, bpreverr1, bpreverr2; /* error for below/prev col */ - register FSERRPTR errorptr; /* => fserrors[] at column before current */ - JSAMPROW inptr; /* => current input pixel */ - JSAMPROW outptr; /* => current output pixel */ - histptr cachep; - int dir; /* +1 or -1 depending on direction */ - int dir3; /* 3*dir, for advancing inptr & errorptr */ - int row; - JDIMENSION col; - JDIMENSION width = cinfo->output_width; - JSAMPLE *range_limit = cinfo->sample_range_limit; - int *error_limit = cquantize->error_limiter; - JSAMPROW colormap0 = cinfo->colormap[0]; - JSAMPROW colormap1 = cinfo->colormap[1]; - JSAMPROW colormap2 = cinfo->colormap[2]; - SHIFT_TEMPS - - for (row = 0; row < num_rows; row++) { - inptr = input_buf[row]; - outptr = output_buf[row]; - if (cquantize->on_odd_row) { - /* work right to left in this row */ - inptr += (width-1) * 3; /* so point to rightmost pixel */ - outptr += width-1; - dir = -1; - dir3 = -3; - errorptr = cquantize->fserrors + (width+1)*3; /* => entry after last column */ - cquantize->on_odd_row = FALSE; /* flip for next time */ - } else { - /* work left to right in this row */ - dir = 1; - dir3 = 3; - errorptr = cquantize->fserrors; /* => entry before first real column */ - cquantize->on_odd_row = TRUE; /* flip for next time */ - } - /* Preset error values: no error propagated to first pixel from left */ - cur0 = cur1 = cur2 = 0; - /* and no error propagated to row below yet */ - belowerr0 = belowerr1 = belowerr2 = 0; - bpreverr0 = bpreverr1 = bpreverr2 = 0; - - for (col = width; col > 0; col--) { - /* curN holds the error propagated from the previous pixel on the - * current line. Add the error propagated from the previous line - * to form the complete error correction term for this pixel, and - * round the error term (which is expressed * 16) to an integer. - * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct - * for either sign of the error value. - * Note: errorptr points to *previous* column's array entry. - */ - cur0 = RIGHT_SHIFT(cur0 + errorptr[dir3+0] + 8, 4); - cur1 = RIGHT_SHIFT(cur1 + errorptr[dir3+1] + 8, 4); - cur2 = RIGHT_SHIFT(cur2 + errorptr[dir3+2] + 8, 4); - /* Limit the error using transfer function set by init_error_limit. - * See comments with init_error_limit for rationale. - */ - cur0 = error_limit[cur0]; - cur1 = error_limit[cur1]; - cur2 = error_limit[cur2]; - /* Form pixel value + error, and range-limit to 0..MAXJSAMPLE. - * The maximum error is +- MAXJSAMPLE (or less with error limiting); - * this sets the required size of the range_limit array. - */ - cur0 += GETJSAMPLE(inptr[0]); - cur1 += GETJSAMPLE(inptr[1]); - cur2 += GETJSAMPLE(inptr[2]); - cur0 = GETJSAMPLE(range_limit[cur0]); - cur1 = GETJSAMPLE(range_limit[cur1]); - cur2 = GETJSAMPLE(range_limit[cur2]); - /* Index into the cache with adjusted pixel value */ - cachep = & histogram[cur0>>C0_SHIFT][cur1>>C1_SHIFT][cur2>>C2_SHIFT]; - /* If we have not seen this color before, find nearest colormap */ - /* entry and update the cache */ - if (*cachep == 0) - fill_inverse_cmap(cinfo, cur0>>C0_SHIFT,cur1>>C1_SHIFT,cur2>>C2_SHIFT); - /* Now emit the colormap index for this cell */ - { register int pixcode = *cachep - 1; - *outptr = (JSAMPLE) pixcode; - /* Compute representation error for this pixel */ - cur0 -= GETJSAMPLE(colormap0[pixcode]); - cur1 -= GETJSAMPLE(colormap1[pixcode]); - cur2 -= GETJSAMPLE(colormap2[pixcode]); - } - /* Compute error fractions to be propagated to adjacent pixels. - * Add these into the running sums, and simultaneously shift the - * next-line error sums left by 1 column. - */ - { register LOCFSERROR bnexterr, delta; - - bnexterr = cur0; /* Process component 0 */ - delta = cur0 * 2; - cur0 += delta; /* form error * 3 */ - errorptr[0] = (FSERROR) (bpreverr0 + cur0); - cur0 += delta; /* form error * 5 */ - bpreverr0 = belowerr0 + cur0; - belowerr0 = bnexterr; - cur0 += delta; /* form error * 7 */ - bnexterr = cur1; /* Process component 1 */ - delta = cur1 * 2; - cur1 += delta; /* form error * 3 */ - errorptr[1] = (FSERROR) (bpreverr1 + cur1); - cur1 += delta; /* form error * 5 */ - bpreverr1 = belowerr1 + cur1; - belowerr1 = bnexterr; - cur1 += delta; /* form error * 7 */ - bnexterr = cur2; /* Process component 2 */ - delta = cur2 * 2; - cur2 += delta; /* form error * 3 */ - errorptr[2] = (FSERROR) (bpreverr2 + cur2); - cur2 += delta; /* form error * 5 */ - bpreverr2 = belowerr2 + cur2; - belowerr2 = bnexterr; - cur2 += delta; /* form error * 7 */ - } - /* At this point curN contains the 7/16 error value to be propagated - * to the next pixel on the current line, and all the errors for the - * next line have been shifted over. We are therefore ready to move on. - */ - inptr += dir3; /* Advance pixel pointers to next column */ - outptr += dir; - errorptr += dir3; /* advance errorptr to current column */ - } - /* Post-loop cleanup: we must unload the final error values into the - * final fserrors[] entry. Note we need not unload belowerrN because - * it is for the dummy column before or after the actual array. - */ - errorptr[0] = (FSERROR) bpreverr0; /* unload prev errs into array */ - errorptr[1] = (FSERROR) bpreverr1; - errorptr[2] = (FSERROR) bpreverr2; - } -} - - -/* - * Initialize the error-limiting transfer function (lookup table). - * The raw F-S error computation can potentially compute error values of up to - * +- MAXJSAMPLE. But we want the maximum correction applied to a pixel to be - * much less, otherwise obviously wrong pixels will be created. (Typical - * effects include weird fringes at color-area boundaries, isolated bright - * pixels in a dark area, etc.) The standard advice for avoiding this problem - * is to ensure that the "corners" of the color cube are allocated as output - * colors; then repeated errors in the same direction cannot cause cascading - * error buildup. However, that only prevents the error from getting - * completely out of hand; Aaron Giles reports that error limiting improves - * the results even with corner colors allocated. - * A simple clamping of the error values to about +- MAXJSAMPLE/8 works pretty - * well, but the smoother transfer function used below is even better. Thanks - * to Aaron Giles for this idea. - */ - -LOCAL(void) -init_error_limit (j_decompress_ptr cinfo) -/* Allocate and fill in the error_limiter table */ -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - int * table; - int in, out; - - table = (int *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE*2+1) * SIZEOF(int)); - table += MAXJSAMPLE; /* so can index -MAXJSAMPLE .. +MAXJSAMPLE */ - cquantize->error_limiter = table; - -#define STEPSIZE ((MAXJSAMPLE+1)/16) - /* Map errors 1:1 up to +- MAXJSAMPLE/16 */ - out = 0; - for (in = 0; in < STEPSIZE; in++, out++) { - table[in] = out; table[-in] = -out; - } - /* Map errors 1:2 up to +- 3*MAXJSAMPLE/16 */ - for (; in < STEPSIZE*3; in++, out += (in&1) ? 0 : 1) { - table[in] = out; table[-in] = -out; - } - /* Clamp the rest to final out value (which is (MAXJSAMPLE+1)/8) */ - for (; in <= MAXJSAMPLE; in++) { - table[in] = out; table[-in] = -out; - } -#undef STEPSIZE -} - - -/* - * Finish up at the end of each pass. - */ - -METHODDEF(void) -finish_pass1 (j_decompress_ptr cinfo) -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - - /* Select the representative colors and fill in cinfo->colormap */ - cinfo->colormap = cquantize->sv_colormap; - select_colors(cinfo, cquantize->desired); - /* Force next pass to zero the color index table */ - cquantize->needs_zeroed = TRUE; -} - - -METHODDEF(void) -finish_pass2 (j_decompress_ptr cinfo) -{ - /* no work */ -} - - -/* - * Initialize for each processing pass. - */ - -METHODDEF(void) -start_pass_2_quant (j_decompress_ptr cinfo, boolean is_pre_scan) -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - hist3d histogram = cquantize->histogram; - int i; - - /* Only F-S dithering or no dithering is supported. */ - /* If user asks for ordered dither, give him F-S. */ - if (cinfo->dither_mode != JDITHER_NONE) - cinfo->dither_mode = JDITHER_FS; - - if (is_pre_scan) { - /* Set up method pointers */ - cquantize->pub.color_quantize = prescan_quantize; - cquantize->pub.finish_pass = finish_pass1; - cquantize->needs_zeroed = TRUE; /* Always zero histogram */ - } else { - /* Set up method pointers */ - if (cinfo->dither_mode == JDITHER_FS) - cquantize->pub.color_quantize = pass2_fs_dither; - else - cquantize->pub.color_quantize = pass2_no_dither; - cquantize->pub.finish_pass = finish_pass2; - - /* Make sure color count is acceptable */ - i = cinfo->actual_number_of_colors; - if (i < 1) - ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 1); - if (i > MAXNUMCOLORS) - ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS); - - if (cinfo->dither_mode == JDITHER_FS) { - size_t arraysize = (size_t) ((cinfo->output_width + 2) * - (3 * SIZEOF(FSERROR))); - /* Allocate Floyd-Steinberg workspace if we didn't already. */ - if (cquantize->fserrors == NULL) - cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large) - ((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize); - /* Initialize the propagated errors to zero. */ - jzero_far((void FAR *) cquantize->fserrors, arraysize); - /* Make the error-limit table if we didn't already. */ - if (cquantize->error_limiter == NULL) - init_error_limit(cinfo); - cquantize->on_odd_row = FALSE; - } - - } - /* Zero the histogram or inverse color map, if necessary */ - if (cquantize->needs_zeroed) { - for (i = 0; i < HIST_C0_ELEMS; i++) { - jzero_far((void FAR *) histogram[i], - HIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell)); - } - cquantize->needs_zeroed = FALSE; - } -} - - -/* - * Switch to a new external colormap between output passes. - */ - -METHODDEF(void) -new_color_map_2_quant (j_decompress_ptr cinfo) -{ - my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; - - /* Reset the inverse color map */ - cquantize->needs_zeroed = TRUE; -} - - -/* - * Module initialization routine for 2-pass color quantization. - */ - -GLOBAL(void) -jinit_2pass_quantizer (j_decompress_ptr cinfo) -{ - my_cquantize_ptr cquantize; - int i; - - cquantize = (my_cquantize_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(my_cquantizer)); - cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize; - cquantize->pub.start_pass = start_pass_2_quant; - cquantize->pub.new_color_map = new_color_map_2_quant; - cquantize->fserrors = NULL; /* flag optional arrays not allocated */ - cquantize->error_limiter = NULL; - - /* Make sure jdmaster didn't give me a case I can't handle */ - if (cinfo->out_color_components != 3) - ERREXIT(cinfo, JERR_NOTIMPL); - - /* Allocate the histogram/inverse colormap storage */ - cquantize->histogram = (hist3d) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, HIST_C0_ELEMS * SIZEOF(hist2d)); - for (i = 0; i < HIST_C0_ELEMS; i++) { - cquantize->histogram[i] = (hist2d) (*cinfo->mem->alloc_large) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - HIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell)); - } - cquantize->needs_zeroed = TRUE; /* histogram is garbage now */ - - /* Allocate storage for the completed colormap, if required. - * We do this now since it is FAR storage and may affect - * the memory manager's space calculations. - */ - if (cinfo->enable_2pass_quant) { - /* Make sure color count is acceptable */ - int desired = cinfo->desired_number_of_colors; - /* Lower bound on # of colors ... somewhat arbitrary as long as > 0 */ - if (desired < 8) - ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 8); - /* Make sure colormap indexes can be represented by JSAMPLEs */ - if (desired > MAXNUMCOLORS) - ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS); - cquantize->sv_colormap = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo,JPOOL_IMAGE, (JDIMENSION) desired, (JDIMENSION) 3); - cquantize->desired = desired; - } else - cquantize->sv_colormap = NULL; - - /* Only F-S dithering or no dithering is supported. */ - /* If user asks for ordered dither, give him F-S. */ - if (cinfo->dither_mode != JDITHER_NONE) - cinfo->dither_mode = JDITHER_FS; - - /* Allocate Floyd-Steinberg workspace if necessary. - * This isn't really needed until pass 2, but again it is FAR storage. - * Although we will cope with a later change in dither_mode, - * we do not promise to honor max_memory_to_use if dither_mode changes. - */ - if (cinfo->dither_mode == JDITHER_FS) { - cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (size_t) ((cinfo->output_width + 2) * (3 * SIZEOF(FSERROR)))); - /* Might as well create the error-limiting table too. */ - init_error_limit(cinfo); - } -} - -#endif /* QUANT_2PASS_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/jutils.c b/gtkmm-osx/trunk/jpeg-6b/jutils.c deleted file mode 100644 index d18a955..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jutils.c +++ /dev/null @@ -1,179 +0,0 @@ -/* - * jutils.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains tables and miscellaneous utility routines needed - * for both compression and decompression. - * Note we prefix all global names with "j" to minimize conflicts with - * a surrounding application. - */ - -#define JPEG_INTERNALS -#include "jinclude.h" -#include "jpeglib.h" - - -/* - * jpeg_zigzag_order[i] is the zigzag-order position of the i'th element - * of a DCT block read in natural order (left to right, top to bottom). - */ - -#if 0 /* This table is not actually needed in v6a */ - -const int jpeg_zigzag_order[DCTSIZE2] = { - 0, 1, 5, 6, 14, 15, 27, 28, - 2, 4, 7, 13, 16, 26, 29, 42, - 3, 8, 12, 17, 25, 30, 41, 43, - 9, 11, 18, 24, 31, 40, 44, 53, - 10, 19, 23, 32, 39, 45, 52, 54, - 20, 22, 33, 38, 46, 51, 55, 60, - 21, 34, 37, 47, 50, 56, 59, 61, - 35, 36, 48, 49, 57, 58, 62, 63 -}; - -#endif - -/* - * jpeg_natural_order[i] is the natural-order position of the i'th element - * of zigzag order. - * - * When reading corrupted data, the Huffman decoders could attempt - * to reference an entry beyond the end of this array (if the decoded - * zero run length reaches past the end of the block). To prevent - * wild stores without adding an inner-loop test, we put some extra - * "63"s after the real entries. This will cause the extra coefficient - * to be stored in location 63 of the block, not somewhere random. - * The worst case would be a run-length of 15, which means we need 16 - * fake entries. - */ - -const int jpeg_natural_order[DCTSIZE2+16] = { - 0, 1, 8, 16, 9, 2, 3, 10, - 17, 24, 32, 25, 18, 11, 4, 5, - 12, 19, 26, 33, 40, 48, 41, 34, - 27, 20, 13, 6, 7, 14, 21, 28, - 35, 42, 49, 56, 57, 50, 43, 36, - 29, 22, 15, 23, 30, 37, 44, 51, - 58, 59, 52, 45, 38, 31, 39, 46, - 53, 60, 61, 54, 47, 55, 62, 63, - 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ - 63, 63, 63, 63, 63, 63, 63, 63 -}; - - -/* - * Arithmetic utilities - */ - -GLOBAL(long) -jdiv_round_up (long a, long b) -/* Compute a/b rounded up to next integer, ie, ceil(a/b) */ -/* Assumes a >= 0, b > 0 */ -{ - return (a + b - 1L) / b; -} - - -GLOBAL(long) -jround_up (long a, long b) -/* Compute a rounded up to next multiple of b, ie, ceil(a/b)*b */ -/* Assumes a >= 0, b > 0 */ -{ - a += b - 1L; - return a - (a % b); -} - - -/* On normal machines we can apply MEMCOPY() and MEMZERO() to sample arrays - * and coefficient-block arrays. This won't work on 80x86 because the arrays - * are FAR and we're assuming a small-pointer memory model. However, some - * DOS compilers provide far-pointer versions of memcpy() and memset() even - * in the small-model libraries. These will be used if USE_FMEM is defined. - * Otherwise, the routines below do it the hard way. (The performance cost - * is not all that great, because these routines aren't very heavily used.) - */ - -#ifndef NEED_FAR_POINTERS /* normal case, same as regular macros */ -#define FMEMCOPY(dest,src,size) MEMCOPY(dest,src,size) -#define FMEMZERO(target,size) MEMZERO(target,size) -#else /* 80x86 case, define if we can */ -#ifdef USE_FMEM -#define FMEMCOPY(dest,src,size) _fmemcpy((void FAR *)(dest), (const void FAR *)(src), (size_t)(size)) -#define FMEMZERO(target,size) _fmemset((void FAR *)(target), 0, (size_t)(size)) -#endif -#endif - - -GLOBAL(void) -jcopy_sample_rows (JSAMPARRAY input_array, int source_row, - JSAMPARRAY output_array, int dest_row, - int num_rows, JDIMENSION num_cols) -/* Copy some rows of samples from one place to another. - * num_rows rows are copied from input_array[source_row++] - * to output_array[dest_row++]; these areas may overlap for duplication. - * The source and destination arrays must be at least as wide as num_cols. - */ -{ - register JSAMPROW inptr, outptr; -#ifdef FMEMCOPY - register size_t count = (size_t) (num_cols * SIZEOF(JSAMPLE)); -#else - register JDIMENSION count; -#endif - register int row; - - input_array += source_row; - output_array += dest_row; - - for (row = num_rows; row > 0; row--) { - inptr = *input_array++; - outptr = *output_array++; -#ifdef FMEMCOPY - FMEMCOPY(outptr, inptr, count); -#else - for (count = num_cols; count > 0; count--) - *outptr++ = *inptr++; /* needn't bother with GETJSAMPLE() here */ -#endif - } -} - - -GLOBAL(void) -jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row, - JDIMENSION num_blocks) -/* Copy a row of coefficient blocks from one place to another. */ -{ -#ifdef FMEMCOPY - FMEMCOPY(output_row, input_row, num_blocks * (DCTSIZE2 * SIZEOF(JCOEF))); -#else - register JCOEFPTR inptr, outptr; - register long count; - - inptr = (JCOEFPTR) input_row; - outptr = (JCOEFPTR) output_row; - for (count = (long) num_blocks * DCTSIZE2; count > 0; count--) { - *outptr++ = *inptr++; - } -#endif -} - - -GLOBAL(void) -jzero_far (void FAR * target, size_t bytestozero) -/* Zero out a chunk of FAR memory. */ -/* This might be sample-array data, block-array data, or alloc_large data. */ -{ -#ifdef FMEMZERO - FMEMZERO(target, bytestozero); -#else - register char FAR * ptr = (char FAR *) target; - register size_t count; - - for (count = bytestozero; count > 0; count--) { - *ptr++ = 0; - } -#endif -} diff --git a/gtkmm-osx/trunk/jpeg-6b/jversion.h b/gtkmm-osx/trunk/jpeg-6b/jversion.h deleted file mode 100644 index 6472c58..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/jversion.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * jversion.h - * - * Copyright (C) 1991-1998, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains software version identification. - */ - - -#define JVERSION "6b 27-Mar-1998" - -#define JCOPYRIGHT "Copyright (C) 1998, Thomas G. Lane" diff --git a/gtkmm-osx/trunk/jpeg-6b/libjpeg.doc b/gtkmm-osx/trunk/jpeg-6b/libjpeg.doc deleted file mode 100644 index 689b206..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/libjpeg.doc +++ /dev/null @@ -1,3006 +0,0 @@ -USING THE IJG JPEG LIBRARY - -Copyright (C) 1994-1998, Thomas G. Lane. -This file is part of the Independent JPEG Group's software. -For conditions of distribution and use, see the accompanying README file. - - -This file describes how to use the IJG JPEG library within an application -program. Read it if you want to write a program that uses the library. - -The file example.c provides heavily commented skeleton code for calling the -JPEG library. Also see jpeglib.h (the include file to be used by application -programs) for full details about data structures and function parameter lists. -The library source code, of course, is the ultimate reference. - -Note that there have been *major* changes from the application interface -presented by IJG version 4 and earlier versions. The old design had several -inherent limitations, and it had accumulated a lot of cruft as we added -features while trying to minimize application-interface changes. We have -sacrificed backward compatibility in the version 5 rewrite, but we think the -improvements justify this. - - -TABLE OF CONTENTS ------------------ - -Overview: - Functions provided by the library - Outline of typical usage -Basic library usage: - Data formats - Compression details - Decompression details - Mechanics of usage: include files, linking, etc -Advanced features: - Compression parameter selection - Decompression parameter selection - Special color spaces - Error handling - Compressed data handling (source and destination managers) - I/O suspension - Progressive JPEG support - Buffered-image mode - Abbreviated datastreams and multiple images - Special markers - Raw (downsampled) image data - Really raw data: DCT coefficients - Progress monitoring - Memory management - Memory usage - Library compile-time options - Portability considerations - Notes for MS-DOS implementors - -You should read at least the overview and basic usage sections before trying -to program with the library. The sections on advanced features can be read -if and when you need them. - - -OVERVIEW -======== - -Functions provided by the library ---------------------------------- - -The IJG JPEG library provides C code to read and write JPEG-compressed image -files. The surrounding application program receives or supplies image data a -scanline at a time, using a straightforward uncompressed image format. All -details of color conversion and other preprocessing/postprocessing can be -handled by the library. - -The library includes a substantial amount of code that is not covered by the -JPEG standard but is necessary for typical applications of JPEG. These -functions preprocess the image before JPEG compression or postprocess it after -decompression. They include colorspace conversion, downsampling/upsampling, -and color quantization. The application indirectly selects use of this code -by specifying the format in which it wishes to supply or receive image data. -For example, if colormapped output is requested, then the decompression -library automatically invokes color quantization. - -A wide range of quality vs. speed tradeoffs are possible in JPEG processing, -and even more so in decompression postprocessing. The decompression library -provides multiple implementations that cover most of the useful tradeoffs, -ranging from very-high-quality down to fast-preview operation. On the -compression side we have generally not provided low-quality choices, since -compression is normally less time-critical. It should be understood that the -low-quality modes may not meet the JPEG standard's accuracy requirements; -nonetheless, they are useful for viewers. - -A word about functions *not* provided by the library. We handle a subset of -the ISO JPEG standard; most baseline, extended-sequential, and progressive -JPEG processes are supported. (Our subset includes all features now in common -use.) Unsupported ISO options include: - * Hierarchical storage - * Lossless JPEG - * Arithmetic entropy coding (unsupported for legal reasons) - * DNL marker - * Nonintegral subsampling ratios -We support both 8- and 12-bit data precision, but this is a compile-time -choice rather than a run-time choice; hence it is difficult to use both -precisions in a single application. - -By itself, the library handles only interchange JPEG datastreams --- in -particular the widely used JFIF file format. The library can be used by -surrounding code to process interchange or abbreviated JPEG datastreams that -are embedded in more complex file formats. (For example, this library is -used by the free LIBTIFF library to support JPEG compression in TIFF.) - - -Outline of typical usage ------------------------- - -The rough outline of a JPEG compression operation is: - - Allocate and initialize a JPEG compression object - Specify the destination for the compressed data (eg, a file) - Set parameters for compression, including image size & colorspace - jpeg_start_compress(...); - while (scan lines remain to be written) - jpeg_write_scanlines(...); - jpeg_finish_compress(...); - Release the JPEG compression object - -A JPEG compression object holds parameters and working state for the JPEG -library. We make creation/destruction of the object separate from starting -or finishing compression of an image; the same object can be re-used for a -series of image compression operations. This makes it easy to re-use the -same parameter settings for a sequence of images. Re-use of a JPEG object -also has important implications for processing abbreviated JPEG datastreams, -as discussed later. - -The image data to be compressed is supplied to jpeg_write_scanlines() from -in-memory buffers. If the application is doing file-to-file compression, -reading image data from the source file is the application's responsibility. -The library emits compressed data by calling a "data destination manager", -which typically will write the data into a file; but the application can -provide its own destination manager to do something else. - -Similarly, the rough outline of a JPEG decompression operation is: - - Allocate and initialize a JPEG decompression object - Specify the source of the compressed data (eg, a file) - Call jpeg_read_header() to obtain image info - Set parameters for decompression - jpeg_start_decompress(...); - while (scan lines remain to be read) - jpeg_read_scanlines(...); - jpeg_finish_decompress(...); - Release the JPEG decompression object - -This is comparable to the compression outline except that reading the -datastream header is a separate step. This is helpful because information -about the image's size, colorspace, etc is available when the application -selects decompression parameters. For example, the application can choose an -output scaling ratio that will fit the image into the available screen size. - -The decompression library obtains compressed data by calling a data source -manager, which typically will read the data from a file; but other behaviors -can be obtained with a custom source manager. Decompressed data is delivered -into in-memory buffers passed to jpeg_read_scanlines(). - -It is possible to abort an incomplete compression or decompression operation -by calling jpeg_abort(); or, if you do not need to retain the JPEG object, -simply release it by calling jpeg_destroy(). - -JPEG compression and decompression objects are two separate struct types. -However, they share some common fields, and certain routines such as -jpeg_destroy() can work on either type of object. - -The JPEG library has no static variables: all state is in the compression -or decompression object. Therefore it is possible to process multiple -compression and decompression operations concurrently, using multiple JPEG -objects. - -Both compression and decompression can be done in an incremental memory-to- -memory fashion, if suitable source/destination managers are used. See the -section on "I/O suspension" for more details. - - -BASIC LIBRARY USAGE -=================== - -Data formats ------------- - -Before diving into procedural details, it is helpful to understand the -image data format that the JPEG library expects or returns. - -The standard input image format is a rectangular array of pixels, with each -pixel having the same number of "component" or "sample" values (color -channels). You must specify how many components there are and the colorspace -interpretation of the components. Most applications will use RGB data -(three components per pixel) or grayscale data (one component per pixel). -PLEASE NOTE THAT RGB DATA IS THREE SAMPLES PER PIXEL, GRAYSCALE ONLY ONE. -A remarkable number of people manage to miss this, only to find that their -programs don't work with grayscale JPEG files. - -There is no provision for colormapped input. JPEG files are always full-color -or full grayscale (or sometimes another colorspace such as CMYK). You can -feed in a colormapped image by expanding it to full-color format. However -JPEG often doesn't work very well with source data that has been colormapped, -because of dithering noise. This is discussed in more detail in the JPEG FAQ -and the other references mentioned in the README file. - -Pixels are stored by scanlines, with each scanline running from left to -right. The component values for each pixel are adjacent in the row; for -example, R,G,B,R,G,B,R,G,B,... for 24-bit RGB color. Each scanline is an -array of data type JSAMPLE --- which is typically "unsigned char", unless -you've changed jmorecfg.h. (You can also change the RGB pixel layout, say -to B,G,R order, by modifying jmorecfg.h. But see the restrictions listed in -that file before doing so.) - -A 2-D array of pixels is formed by making a list of pointers to the starts of -scanlines; so the scanlines need not be physically adjacent in memory. Even -if you process just one scanline at a time, you must make a one-element -pointer array to conform to this structure. Pointers to JSAMPLE rows are of -type JSAMPROW, and the pointer to the pointer array is of type JSAMPARRAY. - -The library accepts or supplies one or more complete scanlines per call. -It is not possible to process part of a row at a time. Scanlines are always -processed top-to-bottom. You can process an entire image in one call if you -have it all in memory, but usually it's simplest to process one scanline at -a time. - -For best results, source data values should have the precision specified by -BITS_IN_JSAMPLE (normally 8 bits). For instance, if you choose to compress -data that's only 6 bits/channel, you should left-justify each value in a -byte before passing it to the compressor. If you need to compress data -that has more than 8 bits/channel, compile with BITS_IN_JSAMPLE = 12. -(See "Library compile-time options", later.) - - -The data format returned by the decompressor is the same in all details, -except that colormapped output is supported. (Again, a JPEG file is never -colormapped. But you can ask the decompressor to perform on-the-fly color -quantization to deliver colormapped output.) If you request colormapped -output then the returned data array contains a single JSAMPLE per pixel; -its value is an index into a color map. The color map is represented as -a 2-D JSAMPARRAY in which each row holds the values of one color component, -that is, colormap[i][j] is the value of the i'th color component for pixel -value (map index) j. Note that since the colormap indexes are stored in -JSAMPLEs, the maximum number of colors is limited by the size of JSAMPLE -(ie, at most 256 colors for an 8-bit JPEG library). - - -Compression details -------------------- - -Here we revisit the JPEG compression outline given in the overview. - -1. Allocate and initialize a JPEG compression object. - -A JPEG compression object is a "struct jpeg_compress_struct". (It also has -a bunch of subsidiary structures which are allocated via malloc(), but the -application doesn't control those directly.) This struct can be just a local -variable in the calling routine, if a single routine is going to execute the -whole JPEG compression sequence. Otherwise it can be static or allocated -from malloc(). - -You will also need a structure representing a JPEG error handler. The part -of this that the library cares about is a "struct jpeg_error_mgr". If you -are providing your own error handler, you'll typically want to embed the -jpeg_error_mgr struct in a larger structure; this is discussed later under -"Error handling". For now we'll assume you are just using the default error -handler. The default error handler will print JPEG error/warning messages -on stderr, and it will call exit() if a fatal error occurs. - -You must initialize the error handler structure, store a pointer to it into -the JPEG object's "err" field, and then call jpeg_create_compress() to -initialize the rest of the JPEG object. - -Typical code for this step, if you are using the default error handler, is - - struct jpeg_compress_struct cinfo; - struct jpeg_error_mgr jerr; - ... - cinfo.err = jpeg_std_error(&jerr); - jpeg_create_compress(&cinfo); - -jpeg_create_compress allocates a small amount of memory, so it could fail -if you are out of memory. In that case it will exit via the error handler; -that's why the error handler must be initialized first. - - -2. Specify the destination for the compressed data (eg, a file). - -As previously mentioned, the JPEG library delivers compressed data to a -"data destination" module. The library includes one data destination -module which knows how to write to a stdio stream. You can use your own -destination module if you want to do something else, as discussed later. - -If you use the standard destination module, you must open the target stdio -stream beforehand. Typical code for this step looks like: - - FILE * outfile; - ... - if ((outfile = fopen(filename, "wb")) == NULL) { - fprintf(stderr, "can't open %s\n", filename); - exit(1); - } - jpeg_stdio_dest(&cinfo, outfile); - -where the last line invokes the standard destination module. - -WARNING: it is critical that the binary compressed data be delivered to the -output file unchanged. On non-Unix systems the stdio library may perform -newline translation or otherwise corrupt binary data. To suppress this -behavior, you may need to use a "b" option to fopen (as shown above), or use -setmode() or another routine to put the stdio stream in binary mode. See -cjpeg.c and djpeg.c for code that has been found to work on many systems. - -You can select the data destination after setting other parameters (step 3), -if that's more convenient. You may not change the destination between -calling jpeg_start_compress() and jpeg_finish_compress(). - - -3. Set parameters for compression, including image size & colorspace. - -You must supply information about the source image by setting the following -fields in the JPEG object (cinfo structure): - - image_width Width of image, in pixels - image_height Height of image, in pixels - input_components Number of color channels (samples per pixel) - in_color_space Color space of source image - -The image dimensions are, hopefully, obvious. JPEG supports image dimensions -of 1 to 64K pixels in either direction. The input color space is typically -RGB or grayscale, and input_components is 3 or 1 accordingly. (See "Special -color spaces", later, for more info.) The in_color_space field must be -assigned one of the J_COLOR_SPACE enum constants, typically JCS_RGB or -JCS_GRAYSCALE. - -JPEG has a large number of compression parameters that determine how the -image is encoded. Most applications don't need or want to know about all -these parameters. You can set all the parameters to reasonable defaults by -calling jpeg_set_defaults(); then, if there are particular values you want -to change, you can do so after that. The "Compression parameter selection" -section tells about all the parameters. - -You must set in_color_space correctly before calling jpeg_set_defaults(), -because the defaults depend on the source image colorspace. However the -other three source image parameters need not be valid until you call -jpeg_start_compress(). There's no harm in calling jpeg_set_defaults() more -than once, if that happens to be convenient. - -Typical code for a 24-bit RGB source image is - - cinfo.image_width = Width; /* image width and height, in pixels */ - cinfo.image_height = Height; - cinfo.input_components = 3; /* # of color components per pixel */ - cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ - - jpeg_set_defaults(&cinfo); - /* Make optional parameter settings here */ - - -4. jpeg_start_compress(...); - -After you have established the data destination and set all the necessary -source image info and other parameters, call jpeg_start_compress() to begin -a compression cycle. This will initialize internal state, allocate working -storage, and emit the first few bytes of the JPEG datastream header. - -Typical code: - - jpeg_start_compress(&cinfo, TRUE); - -The "TRUE" parameter ensures that a complete JPEG interchange datastream -will be written. This is appropriate in most cases. If you think you might -want to use an abbreviated datastream, read the section on abbreviated -datastreams, below. - -Once you have called jpeg_start_compress(), you may not alter any JPEG -parameters or other fields of the JPEG object until you have completed -the compression cycle. - - -5. while (scan lines remain to be written) - jpeg_write_scanlines(...); - -Now write all the required image data by calling jpeg_write_scanlines() -one or more times. You can pass one or more scanlines in each call, up -to the total image height. In most applications it is convenient to pass -just one or a few scanlines at a time. The expected format for the passed -data is discussed under "Data formats", above. - -Image data should be written in top-to-bottom scanline order. The JPEG spec -contains some weasel wording about how top and bottom are application-defined -terms (a curious interpretation of the English language...) but if you want -your files to be compatible with everyone else's, you WILL use top-to-bottom -order. If the source data must be read in bottom-to-top order, you can use -the JPEG library's virtual array mechanism to invert the data efficiently. -Examples of this can be found in the sample application cjpeg. - -The library maintains a count of the number of scanlines written so far -in the next_scanline field of the JPEG object. Usually you can just use -this variable as the loop counter, so that the loop test looks like -"while (cinfo.next_scanline < cinfo.image_height)". - -Code for this step depends heavily on the way that you store the source data. -example.c shows the following code for the case of a full-size 2-D source -array containing 3-byte RGB pixels: - - JSAMPROW row_pointer[1]; /* pointer to a single row */ - int row_stride; /* physical row width in buffer */ - - row_stride = image_width * 3; /* JSAMPLEs per row in image_buffer */ - - while (cinfo.next_scanline < cinfo.image_height) { - row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride]; - jpeg_write_scanlines(&cinfo, row_pointer, 1); - } - -jpeg_write_scanlines() returns the number of scanlines actually written. -This will normally be equal to the number passed in, so you can usually -ignore the return value. It is different in just two cases: - * If you try to write more scanlines than the declared image height, - the additional scanlines are ignored. - * If you use a suspending data destination manager, output buffer overrun - will cause the compressor to return before accepting all the passed lines. - This feature is discussed under "I/O suspension", below. The normal - stdio destination manager will NOT cause this to happen. -In any case, the return value is the same as the change in the value of -next_scanline. - - -6. jpeg_finish_compress(...); - -After all the image data has been written, call jpeg_finish_compress() to -complete the compression cycle. This step is ESSENTIAL to ensure that the -last bufferload of data is written to the data destination. -jpeg_finish_compress() also releases working memory associated with the JPEG -object. - -Typical code: - - jpeg_finish_compress(&cinfo); - -If using the stdio destination manager, don't forget to close the output -stdio stream (if necessary) afterwards. - -If you have requested a multi-pass operating mode, such as Huffman code -optimization, jpeg_finish_compress() will perform the additional passes using -data buffered by the first pass. In this case jpeg_finish_compress() may take -quite a while to complete. With the default compression parameters, this will -not happen. - -It is an error to call jpeg_finish_compress() before writing the necessary -total number of scanlines. If you wish to abort compression, call -jpeg_abort() as discussed below. - -After completing a compression cycle, you may dispose of the JPEG object -as discussed next, or you may use it to compress another image. In that case -return to step 2, 3, or 4 as appropriate. If you do not change the -destination manager, the new datastream will be written to the same target. -If you do not change any JPEG parameters, the new datastream will be written -with the same parameters as before. Note that you can change the input image -dimensions freely between cycles, but if you change the input colorspace, you -should call jpeg_set_defaults() to adjust for the new colorspace; and then -you'll need to repeat all of step 3. - - -7. Release the JPEG compression object. - -When you are done with a JPEG compression object, destroy it by calling -jpeg_destroy_compress(). This will free all subsidiary memory (regardless of -the previous state of the object). Or you can call jpeg_destroy(), which -works for either compression or decompression objects --- this may be more -convenient if you are sharing code between compression and decompression -cases. (Actually, these routines are equivalent except for the declared type -of the passed pointer. To avoid gripes from ANSI C compilers, jpeg_destroy() -should be passed a j_common_ptr.) - -If you allocated the jpeg_compress_struct structure from malloc(), freeing -it is your responsibility --- jpeg_destroy() won't. Ditto for the error -handler structure. - -Typical code: - - jpeg_destroy_compress(&cinfo); - - -8. Aborting. - -If you decide to abort a compression cycle before finishing, you can clean up -in either of two ways: - -* If you don't need the JPEG object any more, just call - jpeg_destroy_compress() or jpeg_destroy() to release memory. This is - legitimate at any point after calling jpeg_create_compress() --- in fact, - it's safe even if jpeg_create_compress() fails. - -* If you want to re-use the JPEG object, call jpeg_abort_compress(), or call - jpeg_abort() which works on both compression and decompression objects. - This will return the object to an idle state, releasing any working memory. - jpeg_abort() is allowed at any time after successful object creation. - -Note that cleaning up the data destination, if required, is your -responsibility; neither of these routines will call term_destination(). -(See "Compressed data handling", below, for more about that.) - -jpeg_destroy() and jpeg_abort() are the only safe calls to make on a JPEG -object that has reported an error by calling error_exit (see "Error handling" -for more info). The internal state of such an object is likely to be out of -whack. Either of these two routines will return the object to a known state. - - -Decompression details ---------------------- - -Here we revisit the JPEG decompression outline given in the overview. - -1. Allocate and initialize a JPEG decompression object. - -This is just like initialization for compression, as discussed above, -except that the object is a "struct jpeg_decompress_struct" and you -call jpeg_create_decompress(). Error handling is exactly the same. - -Typical code: - - struct jpeg_decompress_struct cinfo; - struct jpeg_error_mgr jerr; - ... - cinfo.err = jpeg_std_error(&jerr); - jpeg_create_decompress(&cinfo); - -(Both here and in the IJG code, we usually use variable name "cinfo" for -both compression and decompression objects.) - - -2. Specify the source of the compressed data (eg, a file). - -As previously mentioned, the JPEG library reads compressed data from a "data -source" module. The library includes one data source module which knows how -to read from a stdio stream. You can use your own source module if you want -to do something else, as discussed later. - -If you use the standard source module, you must open the source stdio stream -beforehand. Typical code for this step looks like: - - FILE * infile; - ... - if ((infile = fopen(filename, "rb")) == NULL) { - fprintf(stderr, "can't open %s\n", filename); - exit(1); - } - jpeg_stdio_src(&cinfo, infile); - -where the last line invokes the standard source module. - -WARNING: it is critical that the binary compressed data be read unchanged. -On non-Unix systems the stdio library may perform newline translation or -otherwise corrupt binary data. To suppress this behavior, you may need to use -a "b" option to fopen (as shown above), or use setmode() or another routine to -put the stdio stream in binary mode. See cjpeg.c and djpeg.c for code that -has been found to work on many systems. - -You may not change the data source between calling jpeg_read_header() and -jpeg_finish_decompress(). If you wish to read a series of JPEG images from -a single source file, you should repeat the jpeg_read_header() to -jpeg_finish_decompress() sequence without reinitializing either the JPEG -object or the data source module; this prevents buffered input data from -being discarded. - - -3. Call jpeg_read_header() to obtain image info. - -Typical code for this step is just - - jpeg_read_header(&cinfo, TRUE); - -This will read the source datastream header markers, up to the beginning -of the compressed data proper. On return, the image dimensions and other -info have been stored in the JPEG object. The application may wish to -consult this information before selecting decompression parameters. - -More complex code is necessary if - * A suspending data source is used --- in that case jpeg_read_header() - may return before it has read all the header data. See "I/O suspension", - below. The normal stdio source manager will NOT cause this to happen. - * Abbreviated JPEG files are to be processed --- see the section on - abbreviated datastreams. Standard applications that deal only in - interchange JPEG files need not be concerned with this case either. - -It is permissible to stop at this point if you just wanted to find out the -image dimensions and other header info for a JPEG file. In that case, -call jpeg_destroy() when you are done with the JPEG object, or call -jpeg_abort() to return it to an idle state before selecting a new data -source and reading another header. - - -4. Set parameters for decompression. - -jpeg_read_header() sets appropriate default decompression parameters based on -the properties of the image (in particular, its colorspace). However, you -may well want to alter these defaults before beginning the decompression. -For example, the default is to produce full color output from a color file. -If you want colormapped output you must ask for it. Other options allow the -returned image to be scaled and allow various speed/quality tradeoffs to be -selected. "Decompression parameter selection", below, gives details. - -If the defaults are appropriate, nothing need be done at this step. - -Note that all default values are set by each call to jpeg_read_header(). -If you reuse a decompression object, you cannot expect your parameter -settings to be preserved across cycles, as you can for compression. -You must set desired parameter values each time. - - -5. jpeg_start_decompress(...); - -Once the parameter values are satisfactory, call jpeg_start_decompress() to -begin decompression. This will initialize internal state, allocate working -memory, and prepare for returning data. - -Typical code is just - - jpeg_start_decompress(&cinfo); - -If you have requested a multi-pass operating mode, such as 2-pass color -quantization, jpeg_start_decompress() will do everything needed before data -output can begin. In this case jpeg_start_decompress() may take quite a while -to complete. With a single-scan (non progressive) JPEG file and default -decompression parameters, this will not happen; jpeg_start_decompress() will -return quickly. - -After this call, the final output image dimensions, including any requested -scaling, are available in the JPEG object; so is the selected colormap, if -colormapped output has been requested. Useful fields include - - output_width image width and height, as scaled - output_height - out_color_components # of color components in out_color_space - output_components # of color components returned per pixel - colormap the selected colormap, if any - actual_number_of_colors number of entries in colormap - -output_components is 1 (a colormap index) when quantizing colors; otherwise it -equals out_color_components. It is the number of JSAMPLE values that will be -emitted per pixel in the output arrays. - -Typically you will need to allocate data buffers to hold the incoming image. -You will need output_width * output_components JSAMPLEs per scanline in your -output buffer, and a total of output_height scanlines will be returned. - -Note: if you are using the JPEG library's internal memory manager to allocate -data buffers (as djpeg does), then the manager's protocol requires that you -request large buffers *before* calling jpeg_start_decompress(). This is a -little tricky since the output_XXX fields are not normally valid then. You -can make them valid by calling jpeg_calc_output_dimensions() after setting the -relevant parameters (scaling, output color space, and quantization flag). - - -6. while (scan lines remain to be read) - jpeg_read_scanlines(...); - -Now you can read the decompressed image data by calling jpeg_read_scanlines() -one or more times. At each call, you pass in the maximum number of scanlines -to be read (ie, the height of your working buffer); jpeg_read_scanlines() -will return up to that many lines. The return value is the number of lines -actually read. The format of the returned data is discussed under "Data -formats", above. Don't forget that grayscale and color JPEGs will return -different data formats! - -Image data is returned in top-to-bottom scanline order. If you must write -out the image in bottom-to-top order, you can use the JPEG library's virtual -array mechanism to invert the data efficiently. Examples of this can be -found in the sample application djpeg. - -The library maintains a count of the number of scanlines returned so far -in the output_scanline field of the JPEG object. Usually you can just use -this variable as the loop counter, so that the loop test looks like -"while (cinfo.output_scanline < cinfo.output_height)". (Note that the test -should NOT be against image_height, unless you never use scaling. The -image_height field is the height of the original unscaled image.) -The return value always equals the change in the value of output_scanline. - -If you don't use a suspending data source, it is safe to assume that -jpeg_read_scanlines() reads at least one scanline per call, until the -bottom of the image has been reached. - -If you use a buffer larger than one scanline, it is NOT safe to assume that -jpeg_read_scanlines() fills it. (The current implementation returns only a -few scanlines per call, no matter how large a buffer you pass.) So you must -always provide a loop that calls jpeg_read_scanlines() repeatedly until the -whole image has been read. - - -7. jpeg_finish_decompress(...); - -After all the image data has been read, call jpeg_finish_decompress() to -complete the decompression cycle. This causes working memory associated -with the JPEG object to be released. - -Typical code: - - jpeg_finish_decompress(&cinfo); - -If using the stdio source manager, don't forget to close the source stdio -stream if necessary. - -It is an error to call jpeg_finish_decompress() before reading the correct -total number of scanlines. If you wish to abort decompression, call -jpeg_abort() as discussed below. - -After completing a decompression cycle, you may dispose of the JPEG object as -discussed next, or you may use it to decompress another image. In that case -return to step 2 or 3 as appropriate. If you do not change the source -manager, the next image will be read from the same source. - - -8. Release the JPEG decompression object. - -When you are done with a JPEG decompression object, destroy it by calling -jpeg_destroy_decompress() or jpeg_destroy(). The previous discussion of -destroying compression objects applies here too. - -Typical code: - - jpeg_destroy_decompress(&cinfo); - - -9. Aborting. - -You can abort a decompression cycle by calling jpeg_destroy_decompress() or -jpeg_destroy() if you don't need the JPEG object any more, or -jpeg_abort_decompress() or jpeg_abort() if you want to reuse the object. -The previous discussion of aborting compression cycles applies here too. - - -Mechanics of usage: include files, linking, etc ------------------------------------------------ - -Applications using the JPEG library should include the header file jpeglib.h -to obtain declarations of data types and routines. Before including -jpeglib.h, include system headers that define at least the typedefs FILE and -size_t. On ANSI-conforming systems, including is sufficient; on -older Unix systems, you may need to define size_t. - -If the application needs to refer to individual JPEG library error codes, also -include jerror.h to define those symbols. - -jpeglib.h indirectly includes the files jconfig.h and jmorecfg.h. If you are -installing the JPEG header files in a system directory, you will want to -install all four files: jpeglib.h, jerror.h, jconfig.h, jmorecfg.h. - -The most convenient way to include the JPEG code into your executable program -is to prepare a library file ("libjpeg.a", or a corresponding name on non-Unix -machines) and reference it at your link step. If you use only half of the -library (only compression or only decompression), only that much code will be -included from the library, unless your linker is hopelessly brain-damaged. -The supplied makefiles build libjpeg.a automatically (see install.doc). - -While you can build the JPEG library as a shared library if the whim strikes -you, we don't really recommend it. The trouble with shared libraries is that -at some point you'll probably try to substitute a new version of the library -without recompiling the calling applications. That generally doesn't work -because the parameter struct declarations usually change with each new -version. In other words, the library's API is *not* guaranteed binary -compatible across versions; we only try to ensure source-code compatibility. -(In hindsight, it might have been smarter to hide the parameter structs from -applications and introduce a ton of access functions instead. Too late now, -however.) - -On some systems your application may need to set up a signal handler to ensure -that temporary files are deleted if the program is interrupted. This is most -critical if you are on MS-DOS and use the jmemdos.c memory manager back end; -it will try to grab extended memory for temp files, and that space will NOT be -freed automatically. See cjpeg.c or djpeg.c for an example signal handler. - -It may be worth pointing out that the core JPEG library does not actually -require the stdio library: only the default source/destination managers and -error handler need it. You can use the library in a stdio-less environment -if you replace those modules and use jmemnobs.c (or another memory manager of -your own devising). More info about the minimum system library requirements -may be found in jinclude.h. - - -ADVANCED FEATURES -================= - -Compression parameter selection -------------------------------- - -This section describes all the optional parameters you can set for JPEG -compression, as well as the "helper" routines provided to assist in this -task. Proper setting of some parameters requires detailed understanding -of the JPEG standard; if you don't know what a parameter is for, it's best -not to mess with it! See REFERENCES in the README file for pointers to -more info about JPEG. - -It's a good idea to call jpeg_set_defaults() first, even if you plan to set -all the parameters; that way your code is more likely to work with future JPEG -libraries that have additional parameters. For the same reason, we recommend -you use a helper routine where one is provided, in preference to twiddling -cinfo fields directly. - -The helper routines are: - -jpeg_set_defaults (j_compress_ptr cinfo) - This routine sets all JPEG parameters to reasonable defaults, using - only the input image's color space (field in_color_space, which must - already be set in cinfo). Many applications will only need to use - this routine and perhaps jpeg_set_quality(). - -jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace) - Sets the JPEG file's colorspace (field jpeg_color_space) as specified, - and sets other color-space-dependent parameters appropriately. See - "Special color spaces", below, before using this. A large number of - parameters, including all per-component parameters, are set by this - routine; if you want to twiddle individual parameters you should call - jpeg_set_colorspace() before rather than after. - -jpeg_default_colorspace (j_compress_ptr cinfo) - Selects an appropriate JPEG colorspace based on cinfo->in_color_space, - and calls jpeg_set_colorspace(). This is actually a subroutine of - jpeg_set_defaults(). It's broken out in case you want to change - just the colorspace-dependent JPEG parameters. - -jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline) - Constructs JPEG quantization tables appropriate for the indicated - quality setting. The quality value is expressed on the 0..100 scale - recommended by IJG (cjpeg's "-quality" switch uses this routine). - Note that the exact mapping from quality values to tables may change - in future IJG releases as more is learned about DCT quantization. - If the force_baseline parameter is TRUE, then the quantization table - entries are constrained to the range 1..255 for full JPEG baseline - compatibility. In the current implementation, this only makes a - difference for quality settings below 25, and it effectively prevents - very small/low quality files from being generated. The IJG decoder - is capable of reading the non-baseline files generated at low quality - settings when force_baseline is FALSE, but other decoders may not be. - -jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor, - boolean force_baseline) - Same as jpeg_set_quality() except that the generated tables are the - sample tables given in the JPEC spec section K.1, multiplied by the - specified scale factor (which is expressed as a percentage; thus - scale_factor = 100 reproduces the spec's tables). Note that larger - scale factors give lower quality. This entry point is useful for - conforming to the Adobe PostScript DCT conventions, but we do not - recommend linear scaling as a user-visible quality scale otherwise. - force_baseline again constrains the computed table entries to 1..255. - -int jpeg_quality_scaling (int quality) - Converts a value on the IJG-recommended quality scale to a linear - scaling percentage. Note that this routine may change or go away - in future releases --- IJG may choose to adopt a scaling method that - can't be expressed as a simple scalar multiplier, in which case the - premise of this routine collapses. Caveat user. - -jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl, - const unsigned int *basic_table, - int scale_factor, boolean force_baseline) - Allows an arbitrary quantization table to be created. which_tbl - indicates which table slot to fill. basic_table points to an array - of 64 unsigned ints given in normal array order. These values are - multiplied by scale_factor/100 and then clamped to the range 1..65535 - (or to 1..255 if force_baseline is TRUE). - CAUTION: prior to library version 6a, jpeg_add_quant_table expected - the basic table to be given in JPEG zigzag order. If you need to - write code that works with either older or newer versions of this - routine, you must check the library version number. Something like - "#if JPEG_LIB_VERSION >= 61" is the right test. - -jpeg_simple_progression (j_compress_ptr cinfo) - Generates a default scan script for writing a progressive-JPEG file. - This is the recommended method of creating a progressive file, - unless you want to make a custom scan sequence. You must ensure that - the JPEG color space is set correctly before calling this routine. - - -Compression parameters (cinfo fields) include: - -J_DCT_METHOD dct_method - Selects the algorithm used for the DCT step. Choices are: - JDCT_ISLOW: slow but accurate integer algorithm - JDCT_IFAST: faster, less accurate integer method - JDCT_FLOAT: floating-point method - JDCT_DEFAULT: default method (normally JDCT_ISLOW) - JDCT_FASTEST: fastest method (normally JDCT_IFAST) - The FLOAT method is very slightly more accurate than the ISLOW method, - but may give different results on different machines due to varying - roundoff behavior. The integer methods should give the same results - on all machines. On machines with sufficiently fast FP hardware, the - floating-point method may also be the fastest. The IFAST method is - considerably less accurate than the other two; its use is not - recommended if high quality is a concern. JDCT_DEFAULT and - JDCT_FASTEST are macros configurable by each installation. - -J_COLOR_SPACE jpeg_color_space -int num_components - The JPEG color space and corresponding number of components; see - "Special color spaces", below, for more info. We recommend using - jpeg_set_color_space() if you want to change these. - -boolean optimize_coding - TRUE causes the compressor to compute optimal Huffman coding tables - for the image. This requires an extra pass over the data and - therefore costs a good deal of space and time. The default is - FALSE, which tells the compressor to use the supplied or default - Huffman tables. In most cases optimal tables save only a few percent - of file size compared to the default tables. Note that when this is - TRUE, you need not supply Huffman tables at all, and any you do - supply will be overwritten. - -unsigned int restart_interval -int restart_in_rows - To emit restart markers in the JPEG file, set one of these nonzero. - Set restart_interval to specify the exact interval in MCU blocks. - Set restart_in_rows to specify the interval in MCU rows. (If - restart_in_rows is not 0, then restart_interval is set after the - image width in MCUs is computed.) Defaults are zero (no restarts). - One restart marker per MCU row is often a good choice. - NOTE: the overhead of restart markers is higher in grayscale JPEG - files than in color files, and MUCH higher in progressive JPEGs. - If you use restarts, you may want to use larger intervals in those - cases. - -const jpeg_scan_info * scan_info -int num_scans - By default, scan_info is NULL; this causes the compressor to write a - single-scan sequential JPEG file. If not NULL, scan_info points to - an array of scan definition records of length num_scans. The - compressor will then write a JPEG file having one scan for each scan - definition record. This is used to generate noninterleaved or - progressive JPEG files. The library checks that the scan array - defines a valid JPEG scan sequence. (jpeg_simple_progression creates - a suitable scan definition array for progressive JPEG.) This is - discussed further under "Progressive JPEG support". - -int smoothing_factor - If non-zero, the input image is smoothed; the value should be 1 for - minimal smoothing to 100 for maximum smoothing. Consult jcsample.c - for details of the smoothing algorithm. The default is zero. - -boolean write_JFIF_header - If TRUE, a JFIF APP0 marker is emitted. jpeg_set_defaults() and - jpeg_set_colorspace() set this TRUE if a JFIF-legal JPEG color space - (ie, YCbCr or grayscale) is selected, otherwise FALSE. - -UINT8 JFIF_major_version -UINT8 JFIF_minor_version - The version number to be written into the JFIF marker. - jpeg_set_defaults() initializes the version to 1.01 (major=minor=1). - You should set it to 1.02 (major=1, minor=2) if you plan to write - any JFIF 1.02 extension markers. - -UINT8 density_unit -UINT16 X_density -UINT16 Y_density - The resolution information to be written into the JFIF marker; - not used otherwise. density_unit may be 0 for unknown, - 1 for dots/inch, or 2 for dots/cm. The default values are 0,1,1 - indicating square pixels of unknown size. - -boolean write_Adobe_marker - If TRUE, an Adobe APP14 marker is emitted. jpeg_set_defaults() and - jpeg_set_colorspace() set this TRUE if JPEG color space RGB, CMYK, - or YCCK is selected, otherwise FALSE. It is generally a bad idea - to set both write_JFIF_header and write_Adobe_marker. In fact, - you probably shouldn't change the default settings at all --- the - default behavior ensures that the JPEG file's color space can be - recognized by the decoder. - -JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS] - Pointers to coefficient quantization tables, one per table slot, - or NULL if no table is defined for a slot. Usually these should - be set via one of the above helper routines; jpeg_add_quant_table() - is general enough to define any quantization table. The other - routines will set up table slot 0 for luminance quality and table - slot 1 for chrominance. - -JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS] -JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS] - Pointers to Huffman coding tables, one per table slot, or NULL if - no table is defined for a slot. Slots 0 and 1 are filled with the - JPEG sample tables by jpeg_set_defaults(). If you need to allocate - more table structures, jpeg_alloc_huff_table() may be used. - Note that optimal Huffman tables can be computed for an image - by setting optimize_coding, as discussed above; there's seldom - any need to mess with providing your own Huffman tables. - -There are some additional cinfo fields which are not documented here -because you currently can't change them; for example, you can't set -arith_code TRUE because arithmetic coding is unsupported. - - -Per-component parameters are stored in the struct cinfo.comp_info[i] for -component number i. Note that components here refer to components of the -JPEG color space, *not* the source image color space. A suitably large -comp_info[] array is allocated by jpeg_set_defaults(); if you choose not -to use that routine, it's up to you to allocate the array. - -int component_id - The one-byte identifier code to be recorded in the JPEG file for - this component. For the standard color spaces, we recommend you - leave the default values alone. - -int h_samp_factor -int v_samp_factor - Horizontal and vertical sampling factors for the component; must - be 1..4 according to the JPEG standard. Note that larger sampling - factors indicate a higher-resolution component; many people find - this behavior quite unintuitive. The default values are 2,2 for - luminance components and 1,1 for chrominance components, except - for grayscale where 1,1 is used. - -int quant_tbl_no - Quantization table number for component. The default value is - 0 for luminance components and 1 for chrominance components. - -int dc_tbl_no -int ac_tbl_no - DC and AC entropy coding table numbers. The default values are - 0 for luminance components and 1 for chrominance components. - -int component_index - Must equal the component's index in comp_info[]. (Beginning in - release v6, the compressor library will fill this in automatically; - you don't have to.) - - -Decompression parameter selection ---------------------------------- - -Decompression parameter selection is somewhat simpler than compression -parameter selection, since all of the JPEG internal parameters are -recorded in the source file and need not be supplied by the application. -(Unless you are working with abbreviated files, in which case see -"Abbreviated datastreams", below.) Decompression parameters control -the postprocessing done on the image to deliver it in a format suitable -for the application's use. Many of the parameters control speed/quality -tradeoffs, in which faster decompression may be obtained at the price of -a poorer-quality image. The defaults select the highest quality (slowest) -processing. - -The following fields in the JPEG object are set by jpeg_read_header() and -may be useful to the application in choosing decompression parameters: - -JDIMENSION image_width Width and height of image -JDIMENSION image_height -int num_components Number of color components -J_COLOR_SPACE jpeg_color_space Colorspace of image -boolean saw_JFIF_marker TRUE if a JFIF APP0 marker was seen - UINT8 JFIF_major_version Version information from JFIF marker - UINT8 JFIF_minor_version - UINT8 density_unit Resolution data from JFIF marker - UINT16 X_density - UINT16 Y_density -boolean saw_Adobe_marker TRUE if an Adobe APP14 marker was seen - UINT8 Adobe_transform Color transform code from Adobe marker - -The JPEG color space, unfortunately, is something of a guess since the JPEG -standard proper does not provide a way to record it. In practice most files -adhere to the JFIF or Adobe conventions, and the decoder will recognize these -correctly. See "Special color spaces", below, for more info. - - -The decompression parameters that determine the basic properties of the -returned image are: - -J_COLOR_SPACE out_color_space - Output color space. jpeg_read_header() sets an appropriate default - based on jpeg_color_space; typically it will be RGB or grayscale. - The application can change this field to request output in a different - colorspace. For example, set it to JCS_GRAYSCALE to get grayscale - output from a color file. (This is useful for previewing: grayscale - output is faster than full color since the color components need not - be processed.) Note that not all possible color space transforms are - currently implemented; you may need to extend jdcolor.c if you want an - unusual conversion. - -unsigned int scale_num, scale_denom - Scale the image by the fraction scale_num/scale_denom. Default is - 1/1, or no scaling. Currently, the only supported scaling ratios - are 1/1, 1/2, 1/4, and 1/8. (The library design allows for arbitrary - scaling ratios but this is not likely to be implemented any time soon.) - Smaller scaling ratios permit significantly faster decoding since - fewer pixels need be processed and a simpler IDCT method can be used. - -boolean quantize_colors - If set TRUE, colormapped output will be delivered. Default is FALSE, - meaning that full-color output will be delivered. - -The next three parameters are relevant only if quantize_colors is TRUE. - -int desired_number_of_colors - Maximum number of colors to use in generating a library-supplied color - map (the actual number of colors is returned in a different field). - Default 256. Ignored when the application supplies its own color map. - -boolean two_pass_quantize - If TRUE, an extra pass over the image is made to select a custom color - map for the image. This usually looks a lot better than the one-size- - fits-all colormap that is used otherwise. Default is TRUE. Ignored - when the application supplies its own color map. - -J_DITHER_MODE dither_mode - Selects color dithering method. Supported values are: - JDITHER_NONE no dithering: fast, very low quality - JDITHER_ORDERED ordered dither: moderate speed and quality - JDITHER_FS Floyd-Steinberg dither: slow, high quality - Default is JDITHER_FS. (At present, ordered dither is implemented - only in the single-pass, standard-colormap case. If you ask for - ordered dither when two_pass_quantize is TRUE or when you supply - an external color map, you'll get F-S dithering.) - -When quantize_colors is TRUE, the target color map is described by the next -two fields. colormap is set to NULL by jpeg_read_header(). The application -can supply a color map by setting colormap non-NULL and setting -actual_number_of_colors to the map size. Otherwise, jpeg_start_decompress() -selects a suitable color map and sets these two fields itself. -[Implementation restriction: at present, an externally supplied colormap is -only accepted for 3-component output color spaces.] - -JSAMPARRAY colormap - The color map, represented as a 2-D pixel array of out_color_components - rows and actual_number_of_colors columns. Ignored if not quantizing. - CAUTION: if the JPEG library creates its own colormap, the storage - pointed to by this field is released by jpeg_finish_decompress(). - Copy the colormap somewhere else first, if you want to save it. - -int actual_number_of_colors - The number of colors in the color map. - -Additional decompression parameters that the application may set include: - -J_DCT_METHOD dct_method - Selects the algorithm used for the DCT step. Choices are the same - as described above for compression. - -boolean do_fancy_upsampling - If TRUE, do careful upsampling of chroma components. If FALSE, - a faster but sloppier method is used. Default is TRUE. The visual - impact of the sloppier method is often very small. - -boolean do_block_smoothing - If TRUE, interblock smoothing is applied in early stages of decoding - progressive JPEG files; if FALSE, not. Default is TRUE. Early - progression stages look "fuzzy" with smoothing, "blocky" without. - In any case, block smoothing ceases to be applied after the first few - AC coefficients are known to full accuracy, so it is relevant only - when using buffered-image mode for progressive images. - -boolean enable_1pass_quant -boolean enable_external_quant -boolean enable_2pass_quant - These are significant only in buffered-image mode, which is - described in its own section below. - - -The output image dimensions are given by the following fields. These are -computed from the source image dimensions and the decompression parameters -by jpeg_start_decompress(). You can also call jpeg_calc_output_dimensions() -to obtain the values that will result from the current parameter settings. -This can be useful if you are trying to pick a scaling ratio that will get -close to a desired target size. It's also important if you are using the -JPEG library's memory manager to allocate output buffer space, because you -are supposed to request such buffers *before* jpeg_start_decompress(). - -JDIMENSION output_width Actual dimensions of output image. -JDIMENSION output_height -int out_color_components Number of color components in out_color_space. -int output_components Number of color components returned. -int rec_outbuf_height Recommended height of scanline buffer. - -When quantizing colors, output_components is 1, indicating a single color map -index per pixel. Otherwise it equals out_color_components. The output arrays -are required to be output_width * output_components JSAMPLEs wide. - -rec_outbuf_height is the recommended minimum height (in scanlines) of the -buffer passed to jpeg_read_scanlines(). If the buffer is smaller, the -library will still work, but time will be wasted due to unnecessary data -copying. In high-quality modes, rec_outbuf_height is always 1, but some -faster, lower-quality modes set it to larger values (typically 2 to 4). -If you are going to ask for a high-speed processing mode, you may as well -go to the trouble of honoring rec_outbuf_height so as to avoid data copying. -(An output buffer larger than rec_outbuf_height lines is OK, but won't -provide any material speed improvement over that height.) - - -Special color spaces --------------------- - -The JPEG standard itself is "color blind" and doesn't specify any particular -color space. It is customary to convert color data to a luminance/chrominance -color space before compressing, since this permits greater compression. The -existing de-facto JPEG file format standards specify YCbCr or grayscale data -(JFIF), or grayscale, RGB, YCbCr, CMYK, or YCCK (Adobe). For special -applications such as multispectral images, other color spaces can be used, -but it must be understood that such files will be unportable. - -The JPEG library can handle the most common colorspace conversions (namely -RGB <=> YCbCr and CMYK <=> YCCK). It can also deal with data of an unknown -color space, passing it through without conversion. If you deal extensively -with an unusual color space, you can easily extend the library to understand -additional color spaces and perform appropriate conversions. - -For compression, the source data's color space is specified by field -in_color_space. This is transformed to the JPEG file's color space given -by jpeg_color_space. jpeg_set_defaults() chooses a reasonable JPEG color -space depending on in_color_space, but you can override this by calling -jpeg_set_colorspace(). Of course you must select a supported transformation. -jccolor.c currently supports the following transformations: - RGB => YCbCr - RGB => GRAYSCALE - YCbCr => GRAYSCALE - CMYK => YCCK -plus the null transforms: GRAYSCALE => GRAYSCALE, RGB => RGB, -YCbCr => YCbCr, CMYK => CMYK, YCCK => YCCK, and UNKNOWN => UNKNOWN. - -The de-facto file format standards (JFIF and Adobe) specify APPn markers that -indicate the color space of the JPEG file. It is important to ensure that -these are written correctly, or omitted if the JPEG file's color space is not -one of the ones supported by the de-facto standards. jpeg_set_colorspace() -will set the compression parameters to include or omit the APPn markers -properly, so long as it is told the truth about the JPEG color space. -For example, if you are writing some random 3-component color space without -conversion, don't try to fake out the library by setting in_color_space and -jpeg_color_space to JCS_YCbCr; use JCS_UNKNOWN. You may want to write an -APPn marker of your own devising to identify the colorspace --- see "Special -markers", below. - -When told that the color space is UNKNOWN, the library will default to using -luminance-quality compression parameters for all color components. You may -well want to change these parameters. See the source code for -jpeg_set_colorspace(), in jcparam.c, for details. - -For decompression, the JPEG file's color space is given in jpeg_color_space, -and this is transformed to the output color space out_color_space. -jpeg_read_header's setting of jpeg_color_space can be relied on if the file -conforms to JFIF or Adobe conventions, but otherwise it is no better than a -guess. If you know the JPEG file's color space for certain, you can override -jpeg_read_header's guess by setting jpeg_color_space. jpeg_read_header also -selects a default output color space based on (its guess of) jpeg_color_space; -set out_color_space to override this. Again, you must select a supported -transformation. jdcolor.c currently supports - YCbCr => GRAYSCALE - YCbCr => RGB - GRAYSCALE => RGB - YCCK => CMYK -as well as the null transforms. (Since GRAYSCALE=>RGB is provided, an -application can force grayscale JPEGs to look like color JPEGs if it only -wants to handle one case.) - -The two-pass color quantizer, jquant2.c, is specialized to handle RGB data -(it weights distances appropriately for RGB colors). You'll need to modify -the code if you want to use it for non-RGB output color spaces. Note that -jquant2.c is used to map to an application-supplied colormap as well as for -the normal two-pass colormap selection process. - -CAUTION: it appears that Adobe Photoshop writes inverted data in CMYK JPEG -files: 0 represents 100% ink coverage, rather than 0% ink as you'd expect. -This is arguably a bug in Photoshop, but if you need to work with Photoshop -CMYK files, you will have to deal with it in your application. We cannot -"fix" this in the library by inverting the data during the CMYK<=>YCCK -transform, because that would break other applications, notably Ghostscript. -Photoshop versions prior to 3.0 write EPS files containing JPEG-encoded CMYK -data in the same inverted-YCCK representation used in bare JPEG files, but -the surrounding PostScript code performs an inversion using the PS image -operator. I am told that Photoshop 3.0 will write uninverted YCCK in -EPS/JPEG files, and will omit the PS-level inversion. (But the data -polarity used in bare JPEG files will not change in 3.0.) In either case, -the JPEG library must not invert the data itself, or else Ghostscript would -read these EPS files incorrectly. - - -Error handling --------------- - -When the default error handler is used, any error detected inside the JPEG -routines will cause a message to be printed on stderr, followed by exit(). -You can supply your own error handling routines to override this behavior -and to control the treatment of nonfatal warnings and trace/debug messages. -The file example.c illustrates the most common case, which is to have the -application regain control after an error rather than exiting. - -The JPEG library never writes any message directly; it always goes through -the error handling routines. Three classes of messages are recognized: - * Fatal errors: the library cannot continue. - * Warnings: the library can continue, but the data is corrupt, and a - damaged output image is likely to result. - * Trace/informational messages. These come with a trace level indicating - the importance of the message; you can control the verbosity of the - program by adjusting the maximum trace level that will be displayed. - -You may, if you wish, simply replace the entire JPEG error handling module -(jerror.c) with your own code. However, you can avoid code duplication by -only replacing some of the routines depending on the behavior you need. -This is accomplished by calling jpeg_std_error() as usual, but then overriding -some of the method pointers in the jpeg_error_mgr struct, as illustrated by -example.c. - -All of the error handling routines will receive a pointer to the JPEG object -(a j_common_ptr which points to either a jpeg_compress_struct or a -jpeg_decompress_struct; if you need to tell which, test the is_decompressor -field). This struct includes a pointer to the error manager struct in its -"err" field. Frequently, custom error handler routines will need to access -additional data which is not known to the JPEG library or the standard error -handler. The most convenient way to do this is to embed either the JPEG -object or the jpeg_error_mgr struct in a larger structure that contains -additional fields; then casting the passed pointer provides access to the -additional fields. Again, see example.c for one way to do it. (Beginning -with IJG version 6b, there is also a void pointer "client_data" in each -JPEG object, which the application can also use to find related data. -The library does not touch client_data at all.) - -The individual methods that you might wish to override are: - -error_exit (j_common_ptr cinfo) - Receives control for a fatal error. Information sufficient to - generate the error message has been stored in cinfo->err; call - output_message to display it. Control must NOT return to the caller; - generally this routine will exit() or longjmp() somewhere. - Typically you would override this routine to get rid of the exit() - default behavior. Note that if you continue processing, you should - clean up the JPEG object with jpeg_abort() or jpeg_destroy(). - -output_message (j_common_ptr cinfo) - Actual output of any JPEG message. Override this to send messages - somewhere other than stderr. Note that this method does not know - how to generate a message, only where to send it. - -format_message (j_common_ptr cinfo, char * buffer) - Constructs a readable error message string based on the error info - stored in cinfo->err. This method is called by output_message. Few - applications should need to override this method. One possible - reason for doing so is to implement dynamic switching of error message - language. - -emit_message (j_common_ptr cinfo, int msg_level) - Decide whether or not to emit a warning or trace message; if so, - calls output_message. The main reason for overriding this method - would be to abort on warnings. msg_level is -1 for warnings, - 0 and up for trace messages. - -Only error_exit() and emit_message() are called from the rest of the JPEG -library; the other two are internal to the error handler. - -The actual message texts are stored in an array of strings which is pointed to -by the field err->jpeg_message_table. The messages are numbered from 0 to -err->last_jpeg_message, and it is these code numbers that are used in the -JPEG library code. You could replace the message texts (for instance, with -messages in French or German) by changing the message table pointer. See -jerror.h for the default texts. CAUTION: this table will almost certainly -change or grow from one library version to the next. - -It may be useful for an application to add its own message texts that are -handled by the same mechanism. The error handler supports a second "add-on" -message table for this purpose. To define an addon table, set the pointer -err->addon_message_table and the message numbers err->first_addon_message and -err->last_addon_message. If you number the addon messages beginning at 1000 -or so, you won't have to worry about conflicts with the library's built-in -messages. See the sample applications cjpeg/djpeg for an example of using -addon messages (the addon messages are defined in cderror.h). - -Actual invocation of the error handler is done via macros defined in jerror.h: - ERREXITn(...) for fatal errors - WARNMSn(...) for corrupt-data warnings - TRACEMSn(...) for trace and informational messages. -These macros store the message code and any additional parameters into the -error handler struct, then invoke the error_exit() or emit_message() method. -The variants of each macro are for varying numbers of additional parameters. -The additional parameters are inserted into the generated message using -standard printf() format codes. - -See jerror.h and jerror.c for further details. - - -Compressed data handling (source and destination managers) ----------------------------------------------------------- - -The JPEG compression library sends its compressed data to a "destination -manager" module. The default destination manager just writes the data to a -stdio stream, but you can provide your own manager to do something else. -Similarly, the decompression library calls a "source manager" to obtain the -compressed data; you can provide your own source manager if you want the data -to come from somewhere other than a stdio stream. - -In both cases, compressed data is processed a bufferload at a time: the -destination or source manager provides a work buffer, and the library invokes -the manager only when the buffer is filled or emptied. (You could define a -one-character buffer to force the manager to be invoked for each byte, but -that would be rather inefficient.) The buffer's size and location are -controlled by the manager, not by the library. For example, if you desired to -decompress a JPEG datastream that was all in memory, you could just make the -buffer pointer and length point to the original data in memory. Then the -buffer-reload procedure would be invoked only if the decompressor ran off the -end of the datastream, which would indicate an erroneous datastream. - -The work buffer is defined as an array of datatype JOCTET, which is generally -"char" or "unsigned char". On a machine where char is not exactly 8 bits -wide, you must define JOCTET as a wider data type and then modify the data -source and destination modules to transcribe the work arrays into 8-bit units -on external storage. - -A data destination manager struct contains a pointer and count defining the -next byte to write in the work buffer and the remaining free space: - - JOCTET * next_output_byte; /* => next byte to write in buffer */ - size_t free_in_buffer; /* # of byte spaces remaining in buffer */ - -The library increments the pointer and decrements the count until the buffer -is filled. The manager's empty_output_buffer method must reset the pointer -and count. The manager is expected to remember the buffer's starting address -and total size in private fields not visible to the library. - -A data destination manager provides three methods: - -init_destination (j_compress_ptr cinfo) - Initialize destination. This is called by jpeg_start_compress() - before any data is actually written. It must initialize - next_output_byte and free_in_buffer. free_in_buffer must be - initialized to a positive value. - -empty_output_buffer (j_compress_ptr cinfo) - This is called whenever the buffer has filled (free_in_buffer - reaches zero). In typical applications, it should write out the - *entire* buffer (use the saved start address and buffer length; - ignore the current state of next_output_byte and free_in_buffer). - Then reset the pointer & count to the start of the buffer, and - return TRUE indicating that the buffer has been dumped. - free_in_buffer must be set to a positive value when TRUE is - returned. A FALSE return should only be used when I/O suspension is - desired (this operating mode is discussed in the next section). - -term_destination (j_compress_ptr cinfo) - Terminate destination --- called by jpeg_finish_compress() after all - data has been written. In most applications, this must flush any - data remaining in the buffer. Use either next_output_byte or - free_in_buffer to determine how much data is in the buffer. - -term_destination() is NOT called by jpeg_abort() or jpeg_destroy(). If you -want the destination manager to be cleaned up during an abort, you must do it -yourself. - -You will also need code to create a jpeg_destination_mgr struct, fill in its -method pointers, and insert a pointer to the struct into the "dest" field of -the JPEG compression object. This can be done in-line in your setup code if -you like, but it's probably cleaner to provide a separate routine similar to -the jpeg_stdio_dest() routine of the supplied destination manager. - -Decompression source managers follow a parallel design, but with some -additional frammishes. The source manager struct contains a pointer and count -defining the next byte to read from the work buffer and the number of bytes -remaining: - - const JOCTET * next_input_byte; /* => next byte to read from buffer */ - size_t bytes_in_buffer; /* # of bytes remaining in buffer */ - -The library increments the pointer and decrements the count until the buffer -is emptied. The manager's fill_input_buffer method must reset the pointer and -count. In most applications, the manager must remember the buffer's starting -address and total size in private fields not visible to the library. - -A data source manager provides five methods: - -init_source (j_decompress_ptr cinfo) - Initialize source. This is called by jpeg_read_header() before any - data is actually read. Unlike init_destination(), it may leave - bytes_in_buffer set to 0 (in which case a fill_input_buffer() call - will occur immediately). - -fill_input_buffer (j_decompress_ptr cinfo) - This is called whenever bytes_in_buffer has reached zero and more - data is wanted. In typical applications, it should read fresh data - into the buffer (ignoring the current state of next_input_byte and - bytes_in_buffer), reset the pointer & count to the start of the - buffer, and return TRUE indicating that the buffer has been reloaded. - It is not necessary to fill the buffer entirely, only to obtain at - least one more byte. bytes_in_buffer MUST be set to a positive value - if TRUE is returned. A FALSE return should only be used when I/O - suspension is desired (this mode is discussed in the next section). - -skip_input_data (j_decompress_ptr cinfo, long num_bytes) - Skip num_bytes worth of data. The buffer pointer and count should - be advanced over num_bytes input bytes, refilling the buffer as - needed. This is used to skip over a potentially large amount of - uninteresting data (such as an APPn marker). In some applications - it may be possible to optimize away the reading of the skipped data, - but it's not clear that being smart is worth much trouble; large - skips are uncommon. bytes_in_buffer may be zero on return. - A zero or negative skip count should be treated as a no-op. - -resync_to_restart (j_decompress_ptr cinfo, int desired) - This routine is called only when the decompressor has failed to find - a restart (RSTn) marker where one is expected. Its mission is to - find a suitable point for resuming decompression. For most - applications, we recommend that you just use the default resync - procedure, jpeg_resync_to_restart(). However, if you are able to back - up in the input data stream, or if you have a-priori knowledge about - the likely location of restart markers, you may be able to do better. - Read the read_restart_marker() and jpeg_resync_to_restart() routines - in jdmarker.c if you think you'd like to implement your own resync - procedure. - -term_source (j_decompress_ptr cinfo) - Terminate source --- called by jpeg_finish_decompress() after all - data has been read. Often a no-op. - -For both fill_input_buffer() and skip_input_data(), there is no such thing -as an EOF return. If the end of the file has been reached, the routine has -a choice of exiting via ERREXIT() or inserting fake data into the buffer. -In most cases, generating a warning message and inserting a fake EOI marker -is the best course of action --- this will allow the decompressor to output -however much of the image is there. In pathological cases, the decompressor -may swallow the EOI and again demand data ... just keep feeding it fake EOIs. -jdatasrc.c illustrates the recommended error recovery behavior. - -term_source() is NOT called by jpeg_abort() or jpeg_destroy(). If you want -the source manager to be cleaned up during an abort, you must do it yourself. - -You will also need code to create a jpeg_source_mgr struct, fill in its method -pointers, and insert a pointer to the struct into the "src" field of the JPEG -decompression object. This can be done in-line in your setup code if you -like, but it's probably cleaner to provide a separate routine similar to the -jpeg_stdio_src() routine of the supplied source manager. - -For more information, consult the stdio source and destination managers -in jdatasrc.c and jdatadst.c. - - -I/O suspension --------------- - -Some applications need to use the JPEG library as an incremental memory-to- -memory filter: when the compressed data buffer is filled or emptied, they want -control to return to the outer loop, rather than expecting that the buffer can -be emptied or reloaded within the data source/destination manager subroutine. -The library supports this need by providing an "I/O suspension" mode, which we -describe in this section. - -The I/O suspension mode is not a panacea: nothing is guaranteed about the -maximum amount of time spent in any one call to the library, so it will not -eliminate response-time problems in single-threaded applications. If you -need guaranteed response time, we suggest you "bite the bullet" and implement -a real multi-tasking capability. - -To use I/O suspension, cooperation is needed between the calling application -and the data source or destination manager; you will always need a custom -source/destination manager. (Please read the previous section if you haven't -already.) The basic idea is that the empty_output_buffer() or -fill_input_buffer() routine is a no-op, merely returning FALSE to indicate -that it has done nothing. Upon seeing this, the JPEG library suspends -operation and returns to its caller. The surrounding application is -responsible for emptying or refilling the work buffer before calling the -JPEG library again. - -Compression suspension: - -For compression suspension, use an empty_output_buffer() routine that returns -FALSE; typically it will not do anything else. This will cause the -compressor to return to the caller of jpeg_write_scanlines(), with the return -value indicating that not all the supplied scanlines have been accepted. -The application must make more room in the output buffer, adjust the output -buffer pointer/count appropriately, and then call jpeg_write_scanlines() -again, pointing to the first unconsumed scanline. - -When forced to suspend, the compressor will backtrack to a convenient stopping -point (usually the start of the current MCU); it will regenerate some output -data when restarted. Therefore, although empty_output_buffer() is only -called when the buffer is filled, you should NOT write out the entire buffer -after a suspension. Write only the data up to the current position of -next_output_byte/free_in_buffer. The data beyond that point will be -regenerated after resumption. - -Because of the backtracking behavior, a good-size output buffer is essential -for efficiency; you don't want the compressor to suspend often. (In fact, an -overly small buffer could lead to infinite looping, if a single MCU required -more data than would fit in the buffer.) We recommend a buffer of at least -several Kbytes. You may want to insert explicit code to ensure that you don't -call jpeg_write_scanlines() unless there is a reasonable amount of space in -the output buffer; in other words, flush the buffer before trying to compress -more data. - -The compressor does not allow suspension while it is trying to write JPEG -markers at the beginning and end of the file. This means that: - * At the beginning of a compression operation, there must be enough free - space in the output buffer to hold the header markers (typically 600 or - so bytes). The recommended buffer size is bigger than this anyway, so - this is not a problem as long as you start with an empty buffer. However, - this restriction might catch you if you insert large special markers, such - as a JFIF thumbnail image, without flushing the buffer afterwards. - * When you call jpeg_finish_compress(), there must be enough space in the - output buffer to emit any buffered data and the final EOI marker. In the - current implementation, half a dozen bytes should suffice for this, but - for safety's sake we recommend ensuring that at least 100 bytes are free - before calling jpeg_finish_compress(). - -A more significant restriction is that jpeg_finish_compress() cannot suspend. -This means you cannot use suspension with multi-pass operating modes, namely -Huffman code optimization and multiple-scan output. Those modes write the -whole file during jpeg_finish_compress(), which will certainly result in -buffer overrun. (Note that this restriction applies only to compression, -not decompression. The decompressor supports input suspension in all of its -operating modes.) - -Decompression suspension: - -For decompression suspension, use a fill_input_buffer() routine that simply -returns FALSE (except perhaps during error recovery, as discussed below). -This will cause the decompressor to return to its caller with an indication -that suspension has occurred. This can happen at four places: - * jpeg_read_header(): will return JPEG_SUSPENDED. - * jpeg_start_decompress(): will return FALSE, rather than its usual TRUE. - * jpeg_read_scanlines(): will return the number of scanlines already - completed (possibly 0). - * jpeg_finish_decompress(): will return FALSE, rather than its usual TRUE. -The surrounding application must recognize these cases, load more data into -the input buffer, and repeat the call. In the case of jpeg_read_scanlines(), -increment the passed pointers past any scanlines successfully read. - -Just as with compression, the decompressor will typically backtrack to a -convenient restart point before suspending. When fill_input_buffer() is -called, next_input_byte/bytes_in_buffer point to the current restart point, -which is where the decompressor will backtrack to if FALSE is returned. -The data beyond that position must NOT be discarded if you suspend; it needs -to be re-read upon resumption. In most implementations, you'll need to shift -this data down to the start of your work buffer and then load more data after -it. Again, this behavior means that a several-Kbyte work buffer is essential -for decent performance; furthermore, you should load a reasonable amount of -new data before resuming decompression. (If you loaded, say, only one new -byte each time around, you could waste a LOT of cycles.) - -The skip_input_data() source manager routine requires special care in a -suspension scenario. This routine is NOT granted the ability to suspend the -decompressor; it can decrement bytes_in_buffer to zero, but no more. If the -requested skip distance exceeds the amount of data currently in the input -buffer, then skip_input_data() must set bytes_in_buffer to zero and record the -additional skip distance somewhere else. The decompressor will immediately -call fill_input_buffer(), which should return FALSE, which will cause a -suspension return. The surrounding application must then arrange to discard -the recorded number of bytes before it resumes loading the input buffer. -(Yes, this design is rather baroque, but it avoids complexity in the far more -common case where a non-suspending source manager is used.) - -If the input data has been exhausted, we recommend that you emit a warning -and insert dummy EOI markers just as a non-suspending data source manager -would do. This can be handled either in the surrounding application logic or -within fill_input_buffer(); the latter is probably more efficient. If -fill_input_buffer() knows that no more data is available, it can set the -pointer/count to point to a dummy EOI marker and then return TRUE just as -though it had read more data in a non-suspending situation. - -The decompressor does not attempt to suspend within standard JPEG markers; -instead it will backtrack to the start of the marker and reprocess the whole -marker next time. Hence the input buffer must be large enough to hold the -longest standard marker in the file. Standard JPEG markers should normally -not exceed a few hundred bytes each (DHT tables are typically the longest). -We recommend at least a 2K buffer for performance reasons, which is much -larger than any correct marker is likely to be. For robustness against -damaged marker length counts, you may wish to insert a test in your -application for the case that the input buffer is completely full and yet -the decoder has suspended without consuming any data --- otherwise, if this -situation did occur, it would lead to an endless loop. (The library can't -provide this test since it has no idea whether "the buffer is full", or -even whether there is a fixed-size input buffer.) - -The input buffer would need to be 64K to allow for arbitrary COM or APPn -markers, but these are handled specially: they are either saved into allocated -memory, or skipped over by calling skip_input_data(). In the former case, -suspension is handled correctly, and in the latter case, the problem of -buffer overrun is placed on skip_input_data's shoulders, as explained above. -Note that if you provide your own marker handling routine for large markers, -you should consider how to deal with buffer overflow. - -Multiple-buffer management: - -In some applications it is desirable to store the compressed data in a linked -list of buffer areas, so as to avoid data copying. This can be handled by -having empty_output_buffer() or fill_input_buffer() set the pointer and count -to reference the next available buffer; FALSE is returned only if no more -buffers are available. Although seemingly straightforward, there is a -pitfall in this approach: the backtrack that occurs when FALSE is returned -could back up into an earlier buffer. For example, when fill_input_buffer() -is called, the current pointer & count indicate the backtrack restart point. -Since fill_input_buffer() will set the pointer and count to refer to a new -buffer, the restart position must be saved somewhere else. Suppose a second -call to fill_input_buffer() occurs in the same library call, and no -additional input data is available, so fill_input_buffer must return FALSE. -If the JPEG library has not moved the pointer/count forward in the current -buffer, then *the correct restart point is the saved position in the prior -buffer*. Prior buffers may be discarded only after the library establishes -a restart point within a later buffer. Similar remarks apply for output into -a chain of buffers. - -The library will never attempt to backtrack over a skip_input_data() call, -so any skipped data can be permanently discarded. You still have to deal -with the case of skipping not-yet-received data, however. - -It's much simpler to use only a single buffer; when fill_input_buffer() is -called, move any unconsumed data (beyond the current pointer/count) down to -the beginning of this buffer and then load new data into the remaining buffer -space. This approach requires a little more data copying but is far easier -to get right. - - -Progressive JPEG support ------------------------- - -Progressive JPEG rearranges the stored data into a series of scans of -increasing quality. In situations where a JPEG file is transmitted across a -slow communications link, a decoder can generate a low-quality image very -quickly from the first scan, then gradually improve the displayed quality as -more scans are received. The final image after all scans are complete is -identical to that of a regular (sequential) JPEG file of the same quality -setting. Progressive JPEG files are often slightly smaller than equivalent -sequential JPEG files, but the possibility of incremental display is the main -reason for using progressive JPEG. - -The IJG encoder library generates progressive JPEG files when given a -suitable "scan script" defining how to divide the data into scans. -Creation of progressive JPEG files is otherwise transparent to the encoder. -Progressive JPEG files can also be read transparently by the decoder library. -If the decoding application simply uses the library as defined above, it -will receive a final decoded image without any indication that the file was -progressive. Of course, this approach does not allow incremental display. -To perform incremental display, an application needs to use the decoder -library's "buffered-image" mode, in which it receives a decoded image -multiple times. - -Each displayed scan requires about as much work to decode as a full JPEG -image of the same size, so the decoder must be fairly fast in relation to the -data transmission rate in order to make incremental display useful. However, -it is possible to skip displaying the image and simply add the incoming bits -to the decoder's coefficient buffer. This is fast because only Huffman -decoding need be done, not IDCT, upsampling, colorspace conversion, etc. -The IJG decoder library allows the application to switch dynamically between -displaying the image and simply absorbing the incoming bits. A properly -coded application can automatically adapt the number of display passes to -suit the time available as the image is received. Also, a final -higher-quality display cycle can be performed from the buffered data after -the end of the file is reached. - -Progressive compression: - -To create a progressive JPEG file (or a multiple-scan sequential JPEG file), -set the scan_info cinfo field to point to an array of scan descriptors, and -perform compression as usual. Instead of constructing your own scan list, -you can call the jpeg_simple_progression() helper routine to create a -recommended progression sequence; this method should be used by all -applications that don't want to get involved in the nitty-gritty of -progressive scan sequence design. (If you want to provide user control of -scan sequences, you may wish to borrow the scan script reading code found -in rdswitch.c, so that you can read scan script files just like cjpeg's.) -When scan_info is not NULL, the compression library will store DCT'd data -into a buffer array as jpeg_write_scanlines() is called, and will emit all -the requested scans during jpeg_finish_compress(). This implies that -multiple-scan output cannot be created with a suspending data destination -manager, since jpeg_finish_compress() does not support suspension. We -should also note that the compressor currently forces Huffman optimization -mode when creating a progressive JPEG file, because the default Huffman -tables are unsuitable for progressive files. - -Progressive decompression: - -When buffered-image mode is not used, the decoder library will read all of -a multi-scan file during jpeg_start_decompress(), so that it can provide a -final decoded image. (Here "multi-scan" means either progressive or -multi-scan sequential.) This makes multi-scan files transparent to the -decoding application. However, existing applications that used suspending -input with version 5 of the IJG library will need to be modified to check -for a suspension return from jpeg_start_decompress(). - -To perform incremental display, an application must use the library's -buffered-image mode. This is described in the next section. - - -Buffered-image mode -------------------- - -In buffered-image mode, the library stores the partially decoded image in a -coefficient buffer, from which it can be read out as many times as desired. -This mode is typically used for incremental display of progressive JPEG files, -but it can be used with any JPEG file. Each scan of a progressive JPEG file -adds more data (more detail) to the buffered image. The application can -display in lockstep with the source file (one display pass per input scan), -or it can allow input processing to outrun display processing. By making -input and display processing run independently, it is possible for the -application to adapt progressive display to a wide range of data transmission -rates. - -The basic control flow for buffered-image decoding is - - jpeg_create_decompress() - set data source - jpeg_read_header() - set overall decompression parameters - cinfo.buffered_image = TRUE; /* select buffered-image mode */ - jpeg_start_decompress() - for (each output pass) { - adjust output decompression parameters if required - jpeg_start_output() /* start a new output pass */ - for (all scanlines in image) { - jpeg_read_scanlines() - display scanlines - } - jpeg_finish_output() /* terminate output pass */ - } - jpeg_finish_decompress() - jpeg_destroy_decompress() - -This differs from ordinary unbuffered decoding in that there is an additional -level of looping. The application can choose how many output passes to make -and how to display each pass. - -The simplest approach to displaying progressive images is to do one display -pass for each scan appearing in the input file. In this case the outer loop -condition is typically - while (! jpeg_input_complete(&cinfo)) -and the start-output call should read - jpeg_start_output(&cinfo, cinfo.input_scan_number); -The second parameter to jpeg_start_output() indicates which scan of the input -file is to be displayed; the scans are numbered starting at 1 for this -purpose. (You can use a loop counter starting at 1 if you like, but using -the library's input scan counter is easier.) The library automatically reads -data as necessary to complete each requested scan, and jpeg_finish_output() -advances to the next scan or end-of-image marker (hence input_scan_number -will be incremented by the time control arrives back at jpeg_start_output()). -With this technique, data is read from the input file only as needed, and -input and output processing run in lockstep. - -After reading the final scan and reaching the end of the input file, the -buffered image remains available; it can be read additional times by -repeating the jpeg_start_output()/jpeg_read_scanlines()/jpeg_finish_output() -sequence. For example, a useful technique is to use fast one-pass color -quantization for display passes made while the image is arriving, followed by -a final display pass using two-pass quantization for highest quality. This -is done by changing the library parameters before the final output pass. -Changing parameters between passes is discussed in detail below. - -In general the last scan of a progressive file cannot be recognized as such -until after it is read, so a post-input display pass is the best approach if -you want special processing in the final pass. - -When done with the image, be sure to call jpeg_finish_decompress() to release -the buffered image (or just use jpeg_destroy_decompress()). - -If input data arrives faster than it can be displayed, the application can -cause the library to decode input data in advance of what's needed to produce -output. This is done by calling the routine jpeg_consume_input(). -The return value is one of the following: - JPEG_REACHED_SOS: reached an SOS marker (the start of a new scan) - JPEG_REACHED_EOI: reached the EOI marker (end of image) - JPEG_ROW_COMPLETED: completed reading one MCU row of compressed data - JPEG_SCAN_COMPLETED: completed reading last MCU row of current scan - JPEG_SUSPENDED: suspended before completing any of the above -(JPEG_SUSPENDED can occur only if a suspending data source is used.) This -routine can be called at any time after initializing the JPEG object. It -reads some additional data and returns when one of the indicated significant -events occurs. (If called after the EOI marker is reached, it will -immediately return JPEG_REACHED_EOI without attempting to read more data.) - -The library's output processing will automatically call jpeg_consume_input() -whenever the output processing overtakes the input; thus, simple lockstep -display requires no direct calls to jpeg_consume_input(). But by adding -calls to jpeg_consume_input(), you can absorb data in advance of what is -being displayed. This has two benefits: - * You can limit buildup of unprocessed data in your input buffer. - * You can eliminate extra display passes by paying attention to the - state of the library's input processing. - -The first of these benefits only requires interspersing calls to -jpeg_consume_input() with your display operations and any other processing -you may be doing. To avoid wasting cycles due to backtracking, it's best to -call jpeg_consume_input() only after a hundred or so new bytes have arrived. -This is discussed further under "I/O suspension", above. (Note: the JPEG -library currently is not thread-safe. You must not call jpeg_consume_input() -from one thread of control if a different library routine is working on the -same JPEG object in another thread.) - -When input arrives fast enough that more than one new scan is available -before you start a new output pass, you may as well skip the output pass -corresponding to the completed scan. This occurs for free if you pass -cinfo.input_scan_number as the target scan number to jpeg_start_output(). -The input_scan_number field is simply the index of the scan currently being -consumed by the input processor. You can ensure that this is up-to-date by -emptying the input buffer just before calling jpeg_start_output(): call -jpeg_consume_input() repeatedly until it returns JPEG_SUSPENDED or -JPEG_REACHED_EOI. - -The target scan number passed to jpeg_start_output() is saved in the -cinfo.output_scan_number field. The library's output processing calls -jpeg_consume_input() whenever the current input scan number and row within -that scan is less than or equal to the current output scan number and row. -Thus, input processing can "get ahead" of the output processing but is not -allowed to "fall behind". You can achieve several different effects by -manipulating this interlock rule. For example, if you pass a target scan -number greater than the current input scan number, the output processor will -wait until that scan starts to arrive before producing any output. (To avoid -an infinite loop, the target scan number is automatically reset to the last -scan number when the end of image is reached. Thus, if you specify a large -target scan number, the library will just absorb the entire input file and -then perform an output pass. This is effectively the same as what -jpeg_start_decompress() does when you don't select buffered-image mode.) -When you pass a target scan number equal to the current input scan number, -the image is displayed no faster than the current input scan arrives. The -final possibility is to pass a target scan number less than the current input -scan number; this disables the input/output interlock and causes the output -processor to simply display whatever it finds in the image buffer, without -waiting for input. (However, the library will not accept a target scan -number less than one, so you can't avoid waiting for the first scan.) - -When data is arriving faster than the output display processing can advance -through the image, jpeg_consume_input() will store data into the buffered -image beyond the point at which the output processing is reading data out -again. If the input arrives fast enough, it may "wrap around" the buffer to -the point where the input is more than one whole scan ahead of the output. -If the output processing simply proceeds through its display pass without -paying attention to the input, the effect seen on-screen is that the lower -part of the image is one or more scans better in quality than the upper part. -Then, when the next output scan is started, you have a choice of what target -scan number to use. The recommended choice is to use the current input scan -number at that time, which implies that you've skipped the output scans -corresponding to the input scans that were completed while you processed the -previous output scan. In this way, the decoder automatically adapts its -speed to the arriving data, by skipping output scans as necessary to keep up -with the arriving data. - -When using this strategy, you'll want to be sure that you perform a final -output pass after receiving all the data; otherwise your last display may not -be full quality across the whole screen. So the right outer loop logic is -something like this: - do { - absorb any waiting input by calling jpeg_consume_input() - final_pass = jpeg_input_complete(&cinfo); - adjust output decompression parameters if required - jpeg_start_output(&cinfo, cinfo.input_scan_number); - ... - jpeg_finish_output() - } while (! final_pass); -rather than quitting as soon as jpeg_input_complete() returns TRUE. This -arrangement makes it simple to use higher-quality decoding parameters -for the final pass. But if you don't want to use special parameters for -the final pass, the right loop logic is like this: - for (;;) { - absorb any waiting input by calling jpeg_consume_input() - jpeg_start_output(&cinfo, cinfo.input_scan_number); - ... - jpeg_finish_output() - if (jpeg_input_complete(&cinfo) && - cinfo.input_scan_number == cinfo.output_scan_number) - break; - } -In this case you don't need to know in advance whether an output pass is to -be the last one, so it's not necessary to have reached EOF before starting -the final output pass; rather, what you want to test is whether the output -pass was performed in sync with the final input scan. This form of the loop -will avoid an extra output pass whenever the decoder is able (or nearly able) -to keep up with the incoming data. - -When the data transmission speed is high, you might begin a display pass, -then find that much or all of the file has arrived before you can complete -the pass. (You can detect this by noting the JPEG_REACHED_EOI return code -from jpeg_consume_input(), or equivalently by testing jpeg_input_complete().) -In this situation you may wish to abort the current display pass and start a -new one using the newly arrived information. To do so, just call -jpeg_finish_output() and then start a new pass with jpeg_start_output(). - -A variant strategy is to abort and restart display if more than one complete -scan arrives during an output pass; this can be detected by noting -JPEG_REACHED_SOS returns and/or examining cinfo.input_scan_number. This -idea should be employed with caution, however, since the display process -might never get to the bottom of the image before being aborted, resulting -in the lower part of the screen being several passes worse than the upper. -In most cases it's probably best to abort an output pass only if the whole -file has arrived and you want to begin the final output pass immediately. - -When receiving data across a communication link, we recommend always using -the current input scan number for the output target scan number; if a -higher-quality final pass is to be done, it should be started (aborting any -incomplete output pass) as soon as the end of file is received. However, -many other strategies are possible. For example, the application can examine -the parameters of the current input scan and decide whether to display it or -not. If the scan contains only chroma data, one might choose not to use it -as the target scan, expecting that the scan will be small and will arrive -quickly. To skip to the next scan, call jpeg_consume_input() until it -returns JPEG_REACHED_SOS or JPEG_REACHED_EOI. Or just use the next higher -number as the target scan for jpeg_start_output(); but that method doesn't -let you inspect the next scan's parameters before deciding to display it. - - -In buffered-image mode, jpeg_start_decompress() never performs input and -thus never suspends. An application that uses input suspension with -buffered-image mode must be prepared for suspension returns from these -routines: -* jpeg_start_output() performs input only if you request 2-pass quantization - and the target scan isn't fully read yet. (This is discussed below.) -* jpeg_read_scanlines(), as always, returns the number of scanlines that it - was able to produce before suspending. -* jpeg_finish_output() will read any markers following the target scan, - up to the end of the file or the SOS marker that begins another scan. - (But it reads no input if jpeg_consume_input() has already reached the - end of the file or a SOS marker beyond the target output scan.) -* jpeg_finish_decompress() will read until the end of file, and thus can - suspend if the end hasn't already been reached (as can be tested by - calling jpeg_input_complete()). -jpeg_start_output(), jpeg_finish_output(), and jpeg_finish_decompress() -all return TRUE if they completed their tasks, FALSE if they had to suspend. -In the event of a FALSE return, the application must load more input data -and repeat the call. Applications that use non-suspending data sources need -not check the return values of these three routines. - - -It is possible to change decoding parameters between output passes in the -buffered-image mode. The decoder library currently supports only very -limited changes of parameters. ONLY THE FOLLOWING parameter changes are -allowed after jpeg_start_decompress() is called: -* dct_method can be changed before each call to jpeg_start_output(). - For example, one could use a fast DCT method for early scans, changing - to a higher quality method for the final scan. -* dither_mode can be changed before each call to jpeg_start_output(); - of course this has no impact if not using color quantization. Typically - one would use ordered dither for initial passes, then switch to - Floyd-Steinberg dither for the final pass. Caution: changing dither mode - can cause more memory to be allocated by the library. Although the amount - of memory involved is not large (a scanline or so), it may cause the - initial max_memory_to_use specification to be exceeded, which in the worst - case would result in an out-of-memory failure. -* do_block_smoothing can be changed before each call to jpeg_start_output(). - This setting is relevant only when decoding a progressive JPEG image. - During the first DC-only scan, block smoothing provides a very "fuzzy" look - instead of the very "blocky" look seen without it; which is better seems a - matter of personal taste. But block smoothing is nearly always a win - during later stages, especially when decoding a successive-approximation - image: smoothing helps to hide the slight blockiness that otherwise shows - up on smooth gradients until the lowest coefficient bits are sent. -* Color quantization mode can be changed under the rules described below. - You *cannot* change between full-color and quantized output (because that - would alter the required I/O buffer sizes), but you can change which - quantization method is used. - -When generating color-quantized output, changing quantization method is a -very useful way of switching between high-speed and high-quality display. -The library allows you to change among its three quantization methods: -1. Single-pass quantization to a fixed color cube. - Selected by cinfo.two_pass_quantize = FALSE and cinfo.colormap = NULL. -2. Single-pass quantization to an application-supplied colormap. - Selected by setting cinfo.colormap to point to the colormap (the value of - two_pass_quantize is ignored); also set cinfo.actual_number_of_colors. -3. Two-pass quantization to a colormap chosen specifically for the image. - Selected by cinfo.two_pass_quantize = TRUE and cinfo.colormap = NULL. - (This is the default setting selected by jpeg_read_header, but it is - probably NOT what you want for the first pass of progressive display!) -These methods offer successively better quality and lesser speed. However, -only the first method is available for quantizing in non-RGB color spaces. - -IMPORTANT: because the different quantizer methods have very different -working-storage requirements, the library requires you to indicate which -one(s) you intend to use before you call jpeg_start_decompress(). (If we did -not require this, the max_memory_to_use setting would be a complete fiction.) -You do this by setting one or more of these three cinfo fields to TRUE: - enable_1pass_quant Fixed color cube colormap - enable_external_quant Externally-supplied colormap - enable_2pass_quant Two-pass custom colormap -All three are initialized FALSE by jpeg_read_header(). But -jpeg_start_decompress() automatically sets TRUE the one selected by the -current two_pass_quantize and colormap settings, so you only need to set the -enable flags for any other quantization methods you plan to change to later. - -After setting the enable flags correctly at jpeg_start_decompress() time, you -can change to any enabled quantization method by setting two_pass_quantize -and colormap properly just before calling jpeg_start_output(). The following -special rules apply: -1. You must explicitly set cinfo.colormap to NULL when switching to 1-pass - or 2-pass mode from a different mode, or when you want the 2-pass - quantizer to be re-run to generate a new colormap. -2. To switch to an external colormap, or to change to a different external - colormap than was used on the prior pass, you must call - jpeg_new_colormap() after setting cinfo.colormap. -NOTE: if you want to use the same colormap as was used in the prior pass, -you should not do either of these things. This will save some nontrivial -switchover costs. -(These requirements exist because cinfo.colormap will always be non-NULL -after completing a prior output pass, since both the 1-pass and 2-pass -quantizers set it to point to their output colormaps. Thus you have to -do one of these two things to notify the library that something has changed. -Yup, it's a bit klugy, but it's necessary to do it this way for backwards -compatibility.) - -Note that in buffered-image mode, the library generates any requested colormap -during jpeg_start_output(), not during jpeg_start_decompress(). - -When using two-pass quantization, jpeg_start_output() makes a pass over the -buffered image to determine the optimum color map; it therefore may take a -significant amount of time, whereas ordinarily it does little work. The -progress monitor hook is called during this pass, if defined. It is also -important to realize that if the specified target scan number is greater than -or equal to the current input scan number, jpeg_start_output() will attempt -to consume input as it makes this pass. If you use a suspending data source, -you need to check for a FALSE return from jpeg_start_output() under these -conditions. The combination of 2-pass quantization and a not-yet-fully-read -target scan is the only case in which jpeg_start_output() will consume input. - - -Application authors who support buffered-image mode may be tempted to use it -for all JPEG images, even single-scan ones. This will work, but it is -inefficient: there is no need to create an image-sized coefficient buffer for -single-scan images. Requesting buffered-image mode for such an image wastes -memory. Worse, it can cost time on large images, since the buffered data has -to be swapped out or written to a temporary file. If you are concerned about -maximum performance on baseline JPEG files, you should use buffered-image -mode only when the incoming file actually has multiple scans. This can be -tested by calling jpeg_has_multiple_scans(), which will return a correct -result at any time after jpeg_read_header() completes. - -It is also worth noting that when you use jpeg_consume_input() to let input -processing get ahead of output processing, the resulting pattern of access to -the coefficient buffer is quite nonsequential. It's best to use the memory -manager jmemnobs.c if you can (ie, if you have enough real or virtual main -memory). If not, at least make sure that max_memory_to_use is set as high as -possible. If the JPEG memory manager has to use a temporary file, you will -probably see a lot of disk traffic and poor performance. (This could be -improved with additional work on the memory manager, but we haven't gotten -around to it yet.) - -In some applications it may be convenient to use jpeg_consume_input() for all -input processing, including reading the initial markers; that is, you may -wish to call jpeg_consume_input() instead of jpeg_read_header() during -startup. This works, but note that you must check for JPEG_REACHED_SOS and -JPEG_REACHED_EOI return codes as the equivalent of jpeg_read_header's codes. -Once the first SOS marker has been reached, you must call -jpeg_start_decompress() before jpeg_consume_input() will consume more input; -it'll just keep returning JPEG_REACHED_SOS until you do. If you read a -tables-only file this way, jpeg_consume_input() will return JPEG_REACHED_EOI -without ever returning JPEG_REACHED_SOS; be sure to check for this case. -If this happens, the decompressor will not read any more input until you call -jpeg_abort() to reset it. It is OK to call jpeg_consume_input() even when not -using buffered-image mode, but in that case it's basically a no-op after the -initial markers have been read: it will just return JPEG_SUSPENDED. - - -Abbreviated datastreams and multiple images -------------------------------------------- - -A JPEG compression or decompression object can be reused to process multiple -images. This saves a small amount of time per image by eliminating the -"create" and "destroy" operations, but that isn't the real purpose of the -feature. Rather, reuse of an object provides support for abbreviated JPEG -datastreams. Object reuse can also simplify processing a series of images in -a single input or output file. This section explains these features. - -A JPEG file normally contains several hundred bytes worth of quantization -and Huffman tables. In a situation where many images will be stored or -transmitted with identical tables, this may represent an annoying overhead. -The JPEG standard therefore permits tables to be omitted. The standard -defines three classes of JPEG datastreams: - * "Interchange" datastreams contain an image and all tables needed to decode - the image. These are the usual kind of JPEG file. - * "Abbreviated image" datastreams contain an image, but are missing some or - all of the tables needed to decode that image. - * "Abbreviated table specification" (henceforth "tables-only") datastreams - contain only table specifications. -To decode an abbreviated image, it is necessary to load the missing table(s) -into the decoder beforehand. This can be accomplished by reading a separate -tables-only file. A variant scheme uses a series of images in which the first -image is an interchange (complete) datastream, while subsequent ones are -abbreviated and rely on the tables loaded by the first image. It is assumed -that once the decoder has read a table, it will remember that table until a -new definition for the same table number is encountered. - -It is the application designer's responsibility to figure out how to associate -the correct tables with an abbreviated image. While abbreviated datastreams -can be useful in a closed environment, their use is strongly discouraged in -any situation where data exchange with other applications might be needed. -Caveat designer. - -The JPEG library provides support for reading and writing any combination of -tables-only datastreams and abbreviated images. In both compression and -decompression objects, a quantization or Huffman table will be retained for -the lifetime of the object, unless it is overwritten by a new table definition. - - -To create abbreviated image datastreams, it is only necessary to tell the -compressor not to emit some or all of the tables it is using. Each -quantization and Huffman table struct contains a boolean field "sent_table", -which normally is initialized to FALSE. For each table used by the image, the -header-writing process emits the table and sets sent_table = TRUE unless it is -already TRUE. (In normal usage, this prevents outputting the same table -definition multiple times, as would otherwise occur because the chroma -components typically share tables.) Thus, setting this field to TRUE before -calling jpeg_start_compress() will prevent the table from being written at -all. - -If you want to create a "pure" abbreviated image file containing no tables, -just call "jpeg_suppress_tables(&cinfo, TRUE)" after constructing all the -tables. If you want to emit some but not all tables, you'll need to set the -individual sent_table fields directly. - -To create an abbreviated image, you must also call jpeg_start_compress() -with a second parameter of FALSE, not TRUE. Otherwise jpeg_start_compress() -will force all the sent_table fields to FALSE. (This is a safety feature to -prevent abbreviated images from being created accidentally.) - -To create a tables-only file, perform the same parameter setup that you -normally would, but instead of calling jpeg_start_compress() and so on, call -jpeg_write_tables(&cinfo). This will write an abbreviated datastream -containing only SOI, DQT and/or DHT markers, and EOI. All the quantization -and Huffman tables that are currently defined in the compression object will -be emitted unless their sent_tables flag is already TRUE, and then all the -sent_tables flags will be set TRUE. - -A sure-fire way to create matching tables-only and abbreviated image files -is to proceed as follows: - - create JPEG compression object - set JPEG parameters - set destination to tables-only file - jpeg_write_tables(&cinfo); - set destination to image file - jpeg_start_compress(&cinfo, FALSE); - write data... - jpeg_finish_compress(&cinfo); - -Since the JPEG parameters are not altered between writing the table file and -the abbreviated image file, the same tables are sure to be used. Of course, -you can repeat the jpeg_start_compress() ... jpeg_finish_compress() sequence -many times to produce many abbreviated image files matching the table file. - -You cannot suppress output of the computed Huffman tables when Huffman -optimization is selected. (If you could, there'd be no way to decode the -image...) Generally, you don't want to set optimize_coding = TRUE when -you are trying to produce abbreviated files. - -In some cases you might want to compress an image using tables which are -not stored in the application, but are defined in an interchange or -tables-only file readable by the application. This can be done by setting up -a JPEG decompression object to read the specification file, then copying the -tables into your compression object. See jpeg_copy_critical_parameters() -for an example of copying quantization tables. - - -To read abbreviated image files, you simply need to load the proper tables -into the decompression object before trying to read the abbreviated image. -If the proper tables are stored in the application program, you can just -allocate the table structs and fill in their contents directly. For example, -to load a fixed quantization table into table slot "n": - - if (cinfo.quant_tbl_ptrs[n] == NULL) - cinfo.quant_tbl_ptrs[n] = jpeg_alloc_quant_table((j_common_ptr) &cinfo); - quant_ptr = cinfo.quant_tbl_ptrs[n]; /* quant_ptr is JQUANT_TBL* */ - for (i = 0; i < 64; i++) { - /* Qtable[] is desired quantization table, in natural array order */ - quant_ptr->quantval[i] = Qtable[i]; - } - -Code to load a fixed Huffman table is typically (for AC table "n"): - - if (cinfo.ac_huff_tbl_ptrs[n] == NULL) - cinfo.ac_huff_tbl_ptrs[n] = jpeg_alloc_huff_table((j_common_ptr) &cinfo); - huff_ptr = cinfo.ac_huff_tbl_ptrs[n]; /* huff_ptr is JHUFF_TBL* */ - for (i = 1; i <= 16; i++) { - /* counts[i] is number of Huffman codes of length i bits, i=1..16 */ - huff_ptr->bits[i] = counts[i]; - } - for (i = 0; i < 256; i++) { - /* symbols[] is the list of Huffman symbols, in code-length order */ - huff_ptr->huffval[i] = symbols[i]; - } - -(Note that trying to set cinfo.quant_tbl_ptrs[n] to point directly at a -constant JQUANT_TBL object is not safe. If the incoming file happened to -contain a quantization table definition, your master table would get -overwritten! Instead allocate a working table copy and copy the master table -into it, as illustrated above. Ditto for Huffman tables, of course.) - -You might want to read the tables from a tables-only file, rather than -hard-wiring them into your application. The jpeg_read_header() call is -sufficient to read a tables-only file. You must pass a second parameter of -FALSE to indicate that you do not require an image to be present. Thus, the -typical scenario is - - create JPEG decompression object - set source to tables-only file - jpeg_read_header(&cinfo, FALSE); - set source to abbreviated image file - jpeg_read_header(&cinfo, TRUE); - set decompression parameters - jpeg_start_decompress(&cinfo); - read data... - jpeg_finish_decompress(&cinfo); - -In some cases, you may want to read a file without knowing whether it contains -an image or just tables. In that case, pass FALSE and check the return value -from jpeg_read_header(): it will be JPEG_HEADER_OK if an image was found, -JPEG_HEADER_TABLES_ONLY if only tables were found. (A third return value, -JPEG_SUSPENDED, is possible when using a suspending data source manager.) -Note that jpeg_read_header() will not complain if you read an abbreviated -image for which you haven't loaded the missing tables; the missing-table check -occurs later, in jpeg_start_decompress(). - - -It is possible to read a series of images from a single source file by -repeating the jpeg_read_header() ... jpeg_finish_decompress() sequence, -without releasing/recreating the JPEG object or the data source module. -(If you did reinitialize, any partial bufferload left in the data source -buffer at the end of one image would be discarded, causing you to lose the -start of the next image.) When you use this method, stored tables are -automatically carried forward, so some of the images can be abbreviated images -that depend on tables from earlier images. - -If you intend to write a series of images into a single destination file, -you might want to make a specialized data destination module that doesn't -flush the output buffer at term_destination() time. This would speed things -up by some trifling amount. Of course, you'd need to remember to flush the -buffer after the last image. You can make the later images be abbreviated -ones by passing FALSE to jpeg_start_compress(). - - -Special markers ---------------- - -Some applications may need to insert or extract special data in the JPEG -datastream. The JPEG standard provides marker types "COM" (comment) and -"APP0" through "APP15" (application) to hold application-specific data. -Unfortunately, the use of these markers is not specified by the standard. -COM markers are fairly widely used to hold user-supplied text. The JFIF file -format spec uses APP0 markers with specified initial strings to hold certain -data. Adobe applications use APP14 markers beginning with the string "Adobe" -for miscellaneous data. Other APPn markers are rarely seen, but might -contain almost anything. - -If you wish to store user-supplied text, we recommend you use COM markers -and place readable 7-bit ASCII text in them. Newline conventions are not -standardized --- expect to find LF (Unix style), CR/LF (DOS style), or CR -(Mac style). A robust COM reader should be able to cope with random binary -garbage, including nulls, since some applications generate COM markers -containing non-ASCII junk. (But yours should not be one of them.) - -For program-supplied data, use an APPn marker, and be sure to begin it with an -identifying string so that you can tell whether the marker is actually yours. -It's probably best to avoid using APP0 or APP14 for any private markers. -(NOTE: the upcoming SPIFF standard will use APP8 markers; we recommend you -not use APP8 markers for any private purposes, either.) - -Keep in mind that at most 65533 bytes can be put into one marker, but you -can have as many markers as you like. - -By default, the IJG compression library will write a JFIF APP0 marker if the -selected JPEG colorspace is grayscale or YCbCr, or an Adobe APP14 marker if -the selected colorspace is RGB, CMYK, or YCCK. You can disable this, but -we don't recommend it. The decompression library will recognize JFIF and -Adobe markers and will set the JPEG colorspace properly when one is found. - - -You can write special markers immediately following the datastream header by -calling jpeg_write_marker() after jpeg_start_compress() and before the first -call to jpeg_write_scanlines(). When you do this, the markers appear after -the SOI and the JFIF APP0 and Adobe APP14 markers (if written), but before -all else. Specify the marker type parameter as "JPEG_COM" for COM or -"JPEG_APP0 + n" for APPn. (Actually, jpeg_write_marker will let you write -any marker type, but we don't recommend writing any other kinds of marker.) -For example, to write a user comment string pointed to by comment_text: - jpeg_write_marker(cinfo, JPEG_COM, comment_text, strlen(comment_text)); - -If it's not convenient to store all the marker data in memory at once, -you can instead call jpeg_write_m_header() followed by multiple calls to -jpeg_write_m_byte(). If you do it this way, it's your responsibility to -call jpeg_write_m_byte() exactly the number of times given in the length -parameter to jpeg_write_m_header(). (This method lets you empty the -output buffer partway through a marker, which might be important when -using a suspending data destination module. In any case, if you are using -a suspending destination, you should flush its buffer after inserting -any special markers. See "I/O suspension".) - -Or, if you prefer to synthesize the marker byte sequence yourself, -you can just cram it straight into the data destination module. - -If you are writing JFIF 1.02 extension markers (thumbnail images), don't -forget to set cinfo.JFIF_minor_version = 2 so that the encoder will write the -correct JFIF version number in the JFIF header marker. The library's default -is to write version 1.01, but that's wrong if you insert any 1.02 extension -markers. (We could probably get away with just defaulting to 1.02, but there -used to be broken decoders that would complain about unknown minor version -numbers. To reduce compatibility risks it's safest not to write 1.02 unless -you are actually using 1.02 extensions.) - - -When reading, two methods of handling special markers are available: -1. You can ask the library to save the contents of COM and/or APPn markers -into memory, and then examine them at your leisure afterwards. -2. You can supply your own routine to process COM and/or APPn markers -on-the-fly as they are read. -The first method is simpler to use, especially if you are using a suspending -data source; writing a marker processor that copes with input suspension is -not easy (consider what happens if the marker is longer than your available -input buffer). However, the second method conserves memory since the marker -data need not be kept around after it's been processed. - -For either method, you'd normally set up marker handling after creating a -decompression object and before calling jpeg_read_header(), because the -markers of interest will typically be near the head of the file and so will -be scanned by jpeg_read_header. Once you've established a marker handling -method, it will be used for the life of that decompression object -(potentially many datastreams), unless you change it. Marker handling is -determined separately for COM markers and for each APPn marker code. - - -To save the contents of special markers in memory, call - jpeg_save_markers(cinfo, marker_code, length_limit) -where marker_code is the marker type to save, JPEG_COM or JPEG_APP0+n. -(To arrange to save all the special marker types, you need to call this -routine 17 times, for COM and APP0-APP15.) If the incoming marker is longer -than length_limit data bytes, only length_limit bytes will be saved; this -parameter allows you to avoid chewing up memory when you only need to see the -first few bytes of a potentially large marker. If you want to save all the -data, set length_limit to 0xFFFF; that is enough since marker lengths are only -16 bits. As a special case, setting length_limit to 0 prevents that marker -type from being saved at all. (That is the default behavior, in fact.) - -After jpeg_read_header() completes, you can examine the special markers by -following the cinfo->marker_list pointer chain. All the special markers in -the file appear in this list, in order of their occurrence in the file (but -omitting any markers of types you didn't ask for). Both the original data -length and the saved data length are recorded for each list entry; the latter -will not exceed length_limit for the particular marker type. Note that these -lengths exclude the marker length word, whereas the stored representation -within the JPEG file includes it. (Hence the maximum data length is really -only 65533.) - -It is possible that additional special markers appear in the file beyond the -SOS marker at which jpeg_read_header stops; if so, the marker list will be -extended during reading of the rest of the file. This is not expected to be -common, however. If you are short on memory you may want to reset the length -limit to zero for all marker types after finishing jpeg_read_header, to -ensure that the max_memory_to_use setting cannot be exceeded due to addition -of later markers. - -The marker list remains stored until you call jpeg_finish_decompress or -jpeg_abort, at which point the memory is freed and the list is set to empty. -(jpeg_destroy also releases the storage, of course.) - -Note that the library is internally interested in APP0 and APP14 markers; -if you try to set a small nonzero length limit on these types, the library -will silently force the length up to the minimum it wants. (But you can set -a zero length limit to prevent them from being saved at all.) Also, in a -16-bit environment, the maximum length limit may be constrained to less than -65533 by malloc() limitations. It is therefore best not to assume that the -effective length limit is exactly what you set it to be. - - -If you want to supply your own marker-reading routine, you do it by calling -jpeg_set_marker_processor(). A marker processor routine must have the -signature - boolean jpeg_marker_parser_method (j_decompress_ptr cinfo) -Although the marker code is not explicitly passed, the routine can find it -in cinfo->unread_marker. At the time of call, the marker proper has been -read from the data source module. The processor routine is responsible for -reading the marker length word and the remaining parameter bytes, if any. -Return TRUE to indicate success. (FALSE should be returned only if you are -using a suspending data source and it tells you to suspend. See the standard -marker processors in jdmarker.c for appropriate coding methods if you need to -use a suspending data source.) - -If you override the default APP0 or APP14 processors, it is up to you to -recognize JFIF and Adobe markers if you want colorspace recognition to occur -properly. We recommend copying and extending the default processors if you -want to do that. (A better idea is to save these marker types for later -examination by calling jpeg_save_markers(); that method doesn't interfere -with the library's own processing of these markers.) - -jpeg_set_marker_processor() and jpeg_save_markers() are mutually exclusive ---- if you call one it overrides any previous call to the other, for the -particular marker type specified. - -A simple example of an external COM processor can be found in djpeg.c. -Also, see jpegtran.c for an example of using jpeg_save_markers. - - -Raw (downsampled) image data ----------------------------- - -Some applications need to supply already-downsampled image data to the JPEG -compressor, or to receive raw downsampled data from the decompressor. The -library supports this requirement by allowing the application to write or -read raw data, bypassing the normal preprocessing or postprocessing steps. -The interface is different from the standard one and is somewhat harder to -use. If your interest is merely in bypassing color conversion, we recommend -that you use the standard interface and simply set jpeg_color_space = -in_color_space (or jpeg_color_space = out_color_space for decompression). -The mechanism described in this section is necessary only to supply or -receive downsampled image data, in which not all components have the same -dimensions. - - -To compress raw data, you must supply the data in the colorspace to be used -in the JPEG file (please read the earlier section on Special color spaces) -and downsampled to the sampling factors specified in the JPEG parameters. -You must supply the data in the format used internally by the JPEG library, -namely a JSAMPIMAGE array. This is an array of pointers to two-dimensional -arrays, each of type JSAMPARRAY. Each 2-D array holds the values for one -color component. This structure is necessary since the components are of -different sizes. If the image dimensions are not a multiple of the MCU size, -you must also pad the data correctly (usually, this is done by replicating -the last column and/or row). The data must be padded to a multiple of a DCT -block in each component: that is, each downsampled row must contain a -multiple of 8 valid samples, and there must be a multiple of 8 sample rows -for each component. (For applications such as conversion of digital TV -images, the standard image size is usually a multiple of the DCT block size, -so that no padding need actually be done.) - -The procedure for compression of raw data is basically the same as normal -compression, except that you call jpeg_write_raw_data() in place of -jpeg_write_scanlines(). Before calling jpeg_start_compress(), you must do -the following: - * Set cinfo->raw_data_in to TRUE. (It is set FALSE by jpeg_set_defaults().) - This notifies the library that you will be supplying raw data. - * Ensure jpeg_color_space is correct --- an explicit jpeg_set_colorspace() - call is a good idea. Note that since color conversion is bypassed, - in_color_space is ignored, except that jpeg_set_defaults() uses it to - choose the default jpeg_color_space setting. - * Ensure the sampling factors, cinfo->comp_info[i].h_samp_factor and - cinfo->comp_info[i].v_samp_factor, are correct. Since these indicate the - dimensions of the data you are supplying, it's wise to set them - explicitly, rather than assuming the library's defaults are what you want. - -To pass raw data to the library, call jpeg_write_raw_data() in place of -jpeg_write_scanlines(). The two routines work similarly except that -jpeg_write_raw_data takes a JSAMPIMAGE data array rather than JSAMPARRAY. -The scanlines count passed to and returned from jpeg_write_raw_data is -measured in terms of the component with the largest v_samp_factor. - -jpeg_write_raw_data() processes one MCU row per call, which is to say -v_samp_factor*DCTSIZE sample rows of each component. The passed num_lines -value must be at least max_v_samp_factor*DCTSIZE, and the return value will -be exactly that amount (or possibly some multiple of that amount, in future -library versions). This is true even on the last call at the bottom of the -image; don't forget to pad your data as necessary. - -The required dimensions of the supplied data can be computed for each -component as - cinfo->comp_info[i].width_in_blocks*DCTSIZE samples per row - cinfo->comp_info[i].height_in_blocks*DCTSIZE rows in image -after jpeg_start_compress() has initialized those fields. If the valid data -is smaller than this, it must be padded appropriately. For some sampling -factors and image sizes, additional dummy DCT blocks are inserted to make -the image a multiple of the MCU dimensions. The library creates such dummy -blocks itself; it does not read them from your supplied data. Therefore you -need never pad by more than DCTSIZE samples. An example may help here. -Assume 2h2v downsampling of YCbCr data, that is - cinfo->comp_info[0].h_samp_factor = 2 for Y - cinfo->comp_info[0].v_samp_factor = 2 - cinfo->comp_info[1].h_samp_factor = 1 for Cb - cinfo->comp_info[1].v_samp_factor = 1 - cinfo->comp_info[2].h_samp_factor = 1 for Cr - cinfo->comp_info[2].v_samp_factor = 1 -and suppose that the nominal image dimensions (cinfo->image_width and -cinfo->image_height) are 101x101 pixels. Then jpeg_start_compress() will -compute downsampled_width = 101 and width_in_blocks = 13 for Y, -downsampled_width = 51 and width_in_blocks = 7 for Cb and Cr (and the same -for the height fields). You must pad the Y data to at least 13*8 = 104 -columns and rows, the Cb/Cr data to at least 7*8 = 56 columns and rows. The -MCU height is max_v_samp_factor = 2 DCT rows so you must pass at least 16 -scanlines on each call to jpeg_write_raw_data(), which is to say 16 actual -sample rows of Y and 8 each of Cb and Cr. A total of 7 MCU rows are needed, -so you must pass a total of 7*16 = 112 "scanlines". The last DCT block row -of Y data is dummy, so it doesn't matter what you pass for it in the data -arrays, but the scanlines count must total up to 112 so that all of the Cb -and Cr data gets passed. - -Output suspension is supported with raw-data compression: if the data -destination module suspends, jpeg_write_raw_data() will return 0. -In this case the same data rows must be passed again on the next call. - - -Decompression with raw data output implies bypassing all postprocessing: -you cannot ask for rescaling or color quantization, for instance. More -seriously, you must deal with the color space and sampling factors present in -the incoming file. If your application only handles, say, 2h1v YCbCr data, -you must check for and fail on other color spaces or other sampling factors. -The library will not convert to a different color space for you. - -To obtain raw data output, set cinfo->raw_data_out = TRUE before -jpeg_start_decompress() (it is set FALSE by jpeg_read_header()). Be sure to -verify that the color space and sampling factors are ones you can handle. -Then call jpeg_read_raw_data() in place of jpeg_read_scanlines(). The -decompression process is otherwise the same as usual. - -jpeg_read_raw_data() returns one MCU row per call, and thus you must pass a -buffer of at least max_v_samp_factor*DCTSIZE scanlines (scanline counting is -the same as for raw-data compression). The buffer you pass must be large -enough to hold the actual data plus padding to DCT-block boundaries. As with -compression, any entirely dummy DCT blocks are not processed so you need not -allocate space for them, but the total scanline count includes them. The -above example of computing buffer dimensions for raw-data compression is -equally valid for decompression. - -Input suspension is supported with raw-data decompression: if the data source -module suspends, jpeg_read_raw_data() will return 0. You can also use -buffered-image mode to read raw data in multiple passes. - - -Really raw data: DCT coefficients ---------------------------------- - -It is possible to read or write the contents of a JPEG file as raw DCT -coefficients. This facility is mainly intended for use in lossless -transcoding between different JPEG file formats. Other possible applications -include lossless cropping of a JPEG image, lossless reassembly of a -multi-strip or multi-tile TIFF/JPEG file into a single JPEG datastream, etc. - -To read the contents of a JPEG file as DCT coefficients, open the file and do -jpeg_read_header() as usual. But instead of calling jpeg_start_decompress() -and jpeg_read_scanlines(), call jpeg_read_coefficients(). This will read the -entire image into a set of virtual coefficient-block arrays, one array per -component. The return value is a pointer to an array of virtual-array -descriptors. Each virtual array can be accessed directly using the JPEG -memory manager's access_virt_barray method (see Memory management, below, -and also read structure.doc's discussion of virtual array handling). Or, -for simple transcoding to a different JPEG file format, the array list can -just be handed directly to jpeg_write_coefficients(). - -Each block in the block arrays contains quantized coefficient values in -normal array order (not JPEG zigzag order). The block arrays contain only -DCT blocks containing real data; any entirely-dummy blocks added to fill out -interleaved MCUs at the right or bottom edges of the image are discarded -during reading and are not stored in the block arrays. (The size of each -block array can be determined from the width_in_blocks and height_in_blocks -fields of the component's comp_info entry.) This is also the data format -expected by jpeg_write_coefficients(). - -When you are done using the virtual arrays, call jpeg_finish_decompress() -to release the array storage and return the decompression object to an idle -state; or just call jpeg_destroy() if you don't need to reuse the object. - -If you use a suspending data source, jpeg_read_coefficients() will return -NULL if it is forced to suspend; a non-NULL return value indicates successful -completion. You need not test for a NULL return value when using a -non-suspending data source. - -It is also possible to call jpeg_read_coefficients() to obtain access to the -decoder's coefficient arrays during a normal decode cycle in buffered-image -mode. This frammish might be useful for progressively displaying an incoming -image and then re-encoding it without loss. To do this, decode in buffered- -image mode as discussed previously, then call jpeg_read_coefficients() after -the last jpeg_finish_output() call. The arrays will be available for your use -until you call jpeg_finish_decompress(). - - -To write the contents of a JPEG file as DCT coefficients, you must provide -the DCT coefficients stored in virtual block arrays. You can either pass -block arrays read from an input JPEG file by jpeg_read_coefficients(), or -allocate virtual arrays from the JPEG compression object and fill them -yourself. In either case, jpeg_write_coefficients() is substituted for -jpeg_start_compress() and jpeg_write_scanlines(). Thus the sequence is - * Create compression object - * Set all compression parameters as necessary - * Request virtual arrays if needed - * jpeg_write_coefficients() - * jpeg_finish_compress() - * Destroy or re-use compression object -jpeg_write_coefficients() is passed a pointer to an array of virtual block -array descriptors; the number of arrays is equal to cinfo.num_components. - -The virtual arrays need only have been requested, not realized, before -jpeg_write_coefficients() is called. A side-effect of -jpeg_write_coefficients() is to realize any virtual arrays that have been -requested from the compression object's memory manager. Thus, when obtaining -the virtual arrays from the compression object, you should fill the arrays -after calling jpeg_write_coefficients(). The data is actually written out -when you call jpeg_finish_compress(); jpeg_write_coefficients() only writes -the file header. - -When writing raw DCT coefficients, it is crucial that the JPEG quantization -tables and sampling factors match the way the data was encoded, or the -resulting file will be invalid. For transcoding from an existing JPEG file, -we recommend using jpeg_copy_critical_parameters(). This routine initializes -all the compression parameters to default values (like jpeg_set_defaults()), -then copies the critical information from a source decompression object. -The decompression object should have just been used to read the entire -JPEG input file --- that is, it should be awaiting jpeg_finish_decompress(). - -jpeg_write_coefficients() marks all tables stored in the compression object -as needing to be written to the output file (thus, it acts like -jpeg_start_compress(cinfo, TRUE)). This is for safety's sake, to avoid -emitting abbreviated JPEG files by accident. If you really want to emit an -abbreviated JPEG file, call jpeg_suppress_tables(), or set the tables' -individual sent_table flags, between calling jpeg_write_coefficients() and -jpeg_finish_compress(). - - -Progress monitoring -------------------- - -Some applications may need to regain control from the JPEG library every so -often. The typical use of this feature is to produce a percent-done bar or -other progress display. (For a simple example, see cjpeg.c or djpeg.c.) -Although you do get control back frequently during the data-transferring pass -(the jpeg_read_scanlines or jpeg_write_scanlines loop), any additional passes -will occur inside jpeg_finish_compress or jpeg_start_decompress; those -routines may take a long time to execute, and you don't get control back -until they are done. - -You can define a progress-monitor routine which will be called periodically -by the library. No guarantees are made about how often this call will occur, -so we don't recommend you use it for mouse tracking or anything like that. -At present, a call will occur once per MCU row, scanline, or sample row -group, whichever unit is convenient for the current processing mode; so the -wider the image, the longer the time between calls. During the data -transferring pass, only one call occurs per call of jpeg_read_scanlines or -jpeg_write_scanlines, so don't pass a large number of scanlines at once if -you want fine resolution in the progress count. (If you really need to use -the callback mechanism for time-critical tasks like mouse tracking, you could -insert additional calls inside some of the library's inner loops.) - -To establish a progress-monitor callback, create a struct jpeg_progress_mgr, -fill in its progress_monitor field with a pointer to your callback routine, -and set cinfo->progress to point to the struct. The callback will be called -whenever cinfo->progress is non-NULL. (This pointer is set to NULL by -jpeg_create_compress or jpeg_create_decompress; the library will not change -it thereafter. So if you allocate dynamic storage for the progress struct, -make sure it will live as long as the JPEG object does. Allocating from the -JPEG memory manager with lifetime JPOOL_PERMANENT will work nicely.) You -can use the same callback routine for both compression and decompression. - -The jpeg_progress_mgr struct contains four fields which are set by the library: - long pass_counter; /* work units completed in this pass */ - long pass_limit; /* total number of work units in this pass */ - int completed_passes; /* passes completed so far */ - int total_passes; /* total number of passes expected */ -During any one pass, pass_counter increases from 0 up to (not including) -pass_limit; the step size is usually but not necessarily 1. The pass_limit -value may change from one pass to another. The expected total number of -passes is in total_passes, and the number of passes already completed is in -completed_passes. Thus the fraction of work completed may be estimated as - completed_passes + (pass_counter/pass_limit) - -------------------------------------------- - total_passes -ignoring the fact that the passes may not be equal amounts of work. - -When decompressing, pass_limit can even change within a pass, because it -depends on the number of scans in the JPEG file, which isn't always known in -advance. The computed fraction-of-work-done may jump suddenly (if the library -discovers it has overestimated the number of scans) or even decrease (in the -opposite case). It is not wise to put great faith in the work estimate. - -When using the decompressor's buffered-image mode, the progress monitor work -estimate is likely to be completely unhelpful, because the library has no way -to know how many output passes will be demanded of it. Currently, the library -sets total_passes based on the assumption that there will be one more output -pass if the input file end hasn't yet been read (jpeg_input_complete() isn't -TRUE), but no more output passes if the file end has been reached when the -output pass is started. This means that total_passes will rise as additional -output passes are requested. If you have a way of determining the input file -size, estimating progress based on the fraction of the file that's been read -will probably be more useful than using the library's value. - - -Memory management ------------------ - -This section covers some key facts about the JPEG library's built-in memory -manager. For more info, please read structure.doc's section about the memory -manager, and consult the source code if necessary. - -All memory and temporary file allocation within the library is done via the -memory manager. If necessary, you can replace the "back end" of the memory -manager to control allocation yourself (for example, if you don't want the -library to use malloc() and free() for some reason). - -Some data is allocated "permanently" and will not be freed until the JPEG -object is destroyed. Most data is allocated "per image" and is freed by -jpeg_finish_compress, jpeg_finish_decompress, or jpeg_abort. You can call the -memory manager yourself to allocate structures that will automatically be -freed at these times. Typical code for this is - ptr = (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, size); -Use JPOOL_PERMANENT to get storage that lasts as long as the JPEG object. -Use alloc_large instead of alloc_small for anything bigger than a few Kbytes. -There are also alloc_sarray and alloc_barray routines that automatically -build 2-D sample or block arrays. - -The library's minimum space requirements to process an image depend on the -image's width, but not on its height, because the library ordinarily works -with "strip" buffers that are as wide as the image but just a few rows high. -Some operating modes (eg, two-pass color quantization) require full-image -buffers. Such buffers are treated as "virtual arrays": only the current strip -need be in memory, and the rest can be swapped out to a temporary file. - -If you use the simplest memory manager back end (jmemnobs.c), then no -temporary files are used; virtual arrays are simply malloc()'d. Images bigger -than memory can be processed only if your system supports virtual memory. -The other memory manager back ends support temporary files of various flavors -and thus work in machines without virtual memory. They may also be useful on -Unix machines if you need to process images that exceed available swap space. - -When using temporary files, the library will make the in-memory buffers for -its virtual arrays just big enough to stay within a "maximum memory" setting. -Your application can set this limit by setting cinfo->mem->max_memory_to_use -after creating the JPEG object. (Of course, there is still a minimum size for -the buffers, so the max-memory setting is effective only if it is bigger than -the minimum space needed.) If you allocate any large structures yourself, you -must allocate them before jpeg_start_compress() or jpeg_start_decompress() in -order to have them counted against the max memory limit. Also keep in mind -that space allocated with alloc_small() is ignored, on the assumption that -it's too small to be worth worrying about; so a reasonable safety margin -should be left when setting max_memory_to_use. - -If you use the jmemname.c or jmemdos.c memory manager back end, it is -important to clean up the JPEG object properly to ensure that the temporary -files get deleted. (This is especially crucial with jmemdos.c, where the -"temporary files" may be extended-memory segments; if they are not freed, -DOS will require a reboot to recover the memory.) Thus, with these memory -managers, it's a good idea to provide a signal handler that will trap any -early exit from your program. The handler should call either jpeg_abort() -or jpeg_destroy() for any active JPEG objects. A handler is not needed with -jmemnobs.c, and shouldn't be necessary with jmemansi.c or jmemmac.c either, -since the C library is supposed to take care of deleting files made with -tmpfile(). - - -Memory usage ------------- - -Working memory requirements while performing compression or decompression -depend on image dimensions, image characteristics (such as colorspace and -JPEG process), and operating mode (application-selected options). - -As of v6b, the decompressor requires: - 1. About 24K in more-or-less-fixed-size data. This varies a bit depending - on operating mode and image characteristics (particularly color vs. - grayscale), but it doesn't depend on image dimensions. - 2. Strip buffers (of size proportional to the image width) for IDCT and - upsampling results. The worst case for commonly used sampling factors - is about 34 bytes * width in pixels for a color image. A grayscale image - only needs about 8 bytes per pixel column. - 3. A full-image DCT coefficient buffer is needed to decode a multi-scan JPEG - file (including progressive JPEGs), or whenever you select buffered-image - mode. This takes 2 bytes/coefficient. At typical 2x2 sampling, that's - 3 bytes per pixel for a color image. Worst case (1x1 sampling) requires - 6 bytes/pixel. For grayscale, figure 2 bytes/pixel. - 4. To perform 2-pass color quantization, the decompressor also needs a - 128K color lookup table and a full-image pixel buffer (3 bytes/pixel). -This does not count any memory allocated by the application, such as a -buffer to hold the final output image. - -The above figures are valid for 8-bit JPEG data precision and a machine with -32-bit ints. For 12-bit JPEG data, double the size of the strip buffers and -quantization pixel buffer. The "fixed-size" data will be somewhat smaller -with 16-bit ints, larger with 64-bit ints. Also, CMYK or other unusual -color spaces will require different amounts of space. - -The full-image coefficient and pixel buffers, if needed at all, do not -have to be fully RAM resident; you can have the library use temporary -files instead when the total memory usage would exceed a limit you set. -(But if your OS supports virtual memory, it's probably better to just use -jmemnobs and let the OS do the swapping.) - -The compressor's memory requirements are similar, except that it has no need -for color quantization. Also, it needs a full-image DCT coefficient buffer -if Huffman-table optimization is asked for, even if progressive mode is not -requested. - -If you need more detailed information about memory usage in a particular -situation, you can enable the MEM_STATS code in jmemmgr.c. - - -Library compile-time options ----------------------------- - -A number of compile-time options are available by modifying jmorecfg.h. - -The JPEG standard provides for both the baseline 8-bit DCT process and -a 12-bit DCT process. The IJG code supports 12-bit lossy JPEG if you define -BITS_IN_JSAMPLE as 12 rather than 8. Note that this causes JSAMPLE to be -larger than a char, so it affects the surrounding application's image data. -The sample applications cjpeg and djpeg can support 12-bit mode only for PPM -and GIF file formats; you must disable the other file formats to compile a -12-bit cjpeg or djpeg. (install.doc has more information about that.) -At present, a 12-bit library can handle *only* 12-bit images, not both -precisions. (If you need to include both 8- and 12-bit libraries in a single -application, you could probably do it by defining NEED_SHORT_EXTERNAL_NAMES -for just one of the copies. You'd have to access the 8-bit and 12-bit copies -from separate application source files. This is untested ... if you try it, -we'd like to hear whether it works!) - -Note that a 12-bit library always compresses in Huffman optimization mode, -in order to generate valid Huffman tables. This is necessary because our -default Huffman tables only cover 8-bit data. If you need to output 12-bit -files in one pass, you'll have to supply suitable default Huffman tables. -You may also want to supply your own DCT quantization tables; the existing -quality-scaling code has been developed for 8-bit use, and probably doesn't -generate especially good tables for 12-bit. - -The maximum number of components (color channels) in the image is determined -by MAX_COMPONENTS. The JPEG standard allows up to 255 components, but we -expect that few applications will need more than four or so. - -On machines with unusual data type sizes, you may be able to improve -performance or reduce memory space by tweaking the various typedefs in -jmorecfg.h. In particular, on some RISC CPUs, access to arrays of "short"s -is quite slow; consider trading memory for speed by making JCOEF, INT16, and -UINT16 be "int" or "unsigned int". UINT8 is also a candidate to become int. -You probably don't want to make JSAMPLE be int unless you have lots of memory -to burn. - -You can reduce the size of the library by compiling out various optional -functions. To do this, undefine xxx_SUPPORTED symbols as necessary. - -You can also save a few K by not having text error messages in the library; -the standard error message table occupies about 5Kb. This is particularly -reasonable for embedded applications where there's no good way to display -a message anyway. To do this, remove the creation of the message table -(jpeg_std_message_table[]) from jerror.c, and alter format_message to do -something reasonable without it. You could output the numeric value of the -message code number, for example. If you do this, you can also save a couple -more K by modifying the TRACEMSn() macros in jerror.h to expand to nothing; -you don't need trace capability anyway, right? - - -Portability considerations --------------------------- - -The JPEG library has been written to be extremely portable; the sample -applications cjpeg and djpeg are slightly less so. This section summarizes -the design goals in this area. (If you encounter any bugs that cause the -library to be less portable than is claimed here, we'd appreciate hearing -about them.) - -The code works fine on ANSI C, C++, and pre-ANSI C compilers, using any of -the popular system include file setups, and some not-so-popular ones too. -See install.doc for configuration procedures. - -The code is not dependent on the exact sizes of the C data types. As -distributed, we make the assumptions that - char is at least 8 bits wide - short is at least 16 bits wide - int is at least 16 bits wide - long is at least 32 bits wide -(These are the minimum requirements of the ANSI C standard.) Wider types will -work fine, although memory may be used inefficiently if char is much larger -than 8 bits or short is much bigger than 16 bits. The code should work -equally well with 16- or 32-bit ints. - -In a system where these assumptions are not met, you may be able to make the -code work by modifying the typedefs in jmorecfg.h. However, you will probably -have difficulty if int is less than 16 bits wide, since references to plain -int abound in the code. - -char can be either signed or unsigned, although the code runs faster if an -unsigned char type is available. If char is wider than 8 bits, you will need -to redefine JOCTET and/or provide custom data source/destination managers so -that JOCTET represents exactly 8 bits of data on external storage. - -The JPEG library proper does not assume ASCII representation of characters. -But some of the image file I/O modules in cjpeg/djpeg do have ASCII -dependencies in file-header manipulation; so does cjpeg's select_file_type() -routine. - -The JPEG library does not rely heavily on the C library. In particular, C -stdio is used only by the data source/destination modules and the error -handler, all of which are application-replaceable. (cjpeg/djpeg are more -heavily dependent on stdio.) malloc and free are called only from the memory -manager "back end" module, so you can use a different memory allocator by -replacing that one file. - -The code generally assumes that C names must be unique in the first 15 -characters. However, global function names can be made unique in the -first 6 characters by defining NEED_SHORT_EXTERNAL_NAMES. - -More info about porting the code may be gleaned by reading jconfig.doc, -jmorecfg.h, and jinclude.h. - - -Notes for MS-DOS implementors ------------------------------ - -The IJG code is designed to work efficiently in 80x86 "small" or "medium" -memory models (i.e., data pointers are 16 bits unless explicitly declared -"far"; code pointers can be either size). You may be able to use small -model to compile cjpeg or djpeg by itself, but you will probably have to use -medium model for any larger application. This won't make much difference in -performance. You *will* take a noticeable performance hit if you use a -large-data memory model (perhaps 10%-25%), and you should avoid "huge" model -if at all possible. - -The JPEG library typically needs 2Kb-3Kb of stack space. It will also -malloc about 20K-30K of near heap space while executing (and lots of far -heap, but that doesn't count in this calculation). This figure will vary -depending on selected operating mode, and to a lesser extent on image size. -There is also about 5Kb-6Kb of constant data which will be allocated in the -near data segment (about 4Kb of this is the error message table). -Thus you have perhaps 20K available for other modules' static data and near -heap space before you need to go to a larger memory model. The C library's -static data will account for several K of this, but that still leaves a good -deal for your needs. (If you are tight on space, you could reduce the sizes -of the I/O buffers allocated by jdatasrc.c and jdatadst.c, say from 4K to -1K. Another possibility is to move the error message table to far memory; -this should be doable with only localized hacking on jerror.c.) - -About 2K of the near heap space is "permanent" memory that will not be -released until you destroy the JPEG object. This is only an issue if you -save a JPEG object between compression or decompression operations. - -Far data space may also be a tight resource when you are dealing with large -images. The most memory-intensive case is decompression with two-pass color -quantization, or single-pass quantization to an externally supplied color -map. This requires a 128Kb color lookup table plus strip buffers amounting -to about 40 bytes per column for typical sampling ratios (eg, about 25600 -bytes for a 640-pixel-wide image). You may not be able to process wide -images if you have large data structures of your own. - -Of course, all of these concerns vanish if you use a 32-bit flat-memory-model -compiler, such as DJGPP or Watcom C. We highly recommend flat model if you -can use it; the JPEG library is significantly faster in flat model. diff --git a/gtkmm-osx/trunk/jpeg-6b/ltconfig b/gtkmm-osx/trunk/jpeg-6b/ltconfig deleted file mode 100755 index 2347e69..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/ltconfig +++ /dev/null @@ -1,1512 +0,0 @@ -#! /bin/sh - -# ltconfig - Create a system-specific libtool. -# Copyright (C) 1996-1998 Free Software Foundation, Inc. -# Gordon Matzigkeit , 1996 -# -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# A lot of this script is taken from autoconf-2.10. - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi - -echo=echo -if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then : -else - # The Solaris and AIX default echo program unquotes backslashes. - # This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # So, we emulate echo with printf '%s\n' - echo="printf %s\\n" - if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then : - else - # Oops. We have no working printf. Try to find a not-so-buggy echo. - echo=echo - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" - for dir in $PATH /usr/ucb; do - if test -f $dir/echo && test "X`$dir/echo '\t'`" = 'X\t'; then - echo="$dir/echo" - break - fi - done - IFS="$save_ifs" - fi -fi - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' -sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' - -# The name of this program. -progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` - -# Constants: -PROGRAM=ltconfig -PACKAGE=libtool -VERSION=1.2 -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5' -rm="rm -f" - -help="Try \`$progname --help' for more information." - -# Global variables: -can_build_shared=yes -enable_shared=yes -# All known linkers require a `.a' archive for static linking. -enable_static=yes -ltmain= -silent= -srcdir= -ac_config_guess= -ac_config_sub= -host= -nonopt= -verify_host=yes -with_gcc=no -with_gnu_ld=no - -old_AR="$AR" -old_CC="$CC" -old_CFLAGS="$CFLAGS" -old_CPPFLAGS="$CPPFLAGS" -old_LD="$LD" -old_LN_S="$LN_S" -old_NM="$NM" -old_RANLIB="$RANLIB" - -# Parse the command line options. -args= -prev= -for option -do - case "$option" in - -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - eval "$prev=\$option" - prev= - continue - fi - - case "$option" in - --help) cat <&2 - echo "$help" 1>&2 - exit 1 - ;; - - *) - if test -z "$ltmain"; then - ltmain="$option" - elif test -z "$host"; then -# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 -# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then -# echo "$progname: warning \`$option' is not a valid host type" 1>&2 -# fi - host="$option" - else - echo "$progname: too many arguments" 1>&2 - echo "$help" 1>&2 - exit 1 - fi ;; - esac -done - -if test -z "$ltmain"; then - echo "$progname: you must specify a LTMAIN file" 1>&2 - echo "$help" 1>&2 - exit 1 -fi - -if test -f "$ltmain"; then : -else - echo "$progname: \`$ltmain' does not exist" 1>&2 - echo "$help" 1>&2 - exit 1 -fi - -# Quote any args containing shell metacharacters. -ltconfig_args= -for arg -do - case "$arg" in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ltconfig_args="$ltconfig_args '$arg'" ;; - *) ltconfig_args="$ltconfig_args $arg" ;; - esac -done - -# A relevant subset of AC_INIT. - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 5 compiler messages saved in config.log -# 6 checking for... messages and results -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>>./config.log - -# NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LANG+set}" = set; then LANG=C; export LANG; fi - -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - -if test -z "$srcdir"; then - # Assume the source directory is the same one as the path to ltmain.sh. - srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'` - test "$srcdir" = "$ltmain" && srcdir=. -fi - -trap "$rm conftest*; exit 1" 1 2 15 -if test "$verify_host" = yes; then - # Check for config.guess and config.sub. - ac_aux_dir= - for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/config.guess; then - ac_aux_dir=$ac_dir - break - fi - done - if test -z "$ac_aux_dir"; then - echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2 - echo "$help" 1>&2 - exit 1 - fi - ac_config_guess=$ac_aux_dir/config.guess - ac_config_sub=$ac_aux_dir/config.sub - - # Make sure we can run config.sub. - if $ac_config_sub sun4 >/dev/null 2>&1; then : - else - echo "$progname: cannot run $ac_config_sub" 1>&2 - echo "$help" 1>&2 - exit 1 - fi - - echo $ac_n "checking host system type""... $ac_c" 1>&6 - - host_alias=$host - case "$host_alias" in - "") - if host_alias=`$ac_config_guess`; then : - else - echo "$progname: cannot guess host type; you must specify one" 1>&2 - echo "$help" 1>&2 - exit 1 - fi ;; - esac - host=`$ac_config_sub $host_alias` - echo "$ac_t$host" 1>&6 - - # Make sure the host verified. - test -z "$host" && exit 1 - -elif test -z "$host"; then - echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 - echo "$help" 1>&2 - exit 1 -else - host_alias=$host -fi - -# Transform linux* to *-*-linux-gnu*, to support old configure scripts. -case "$host_os" in -linux-gnu*) ;; -linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` -esac - -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - -case "$host_os" in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "${COLLECT_NAMES+set}" != set; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR cru $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -# Set a sane default for `AR'. -test -z "$AR" && AR=ar - -# If RANLIB is not set, then run the test. -if test "${RANLIB+set}" != "set"; then - result=no - - echo $ac_n "checking for ranlib... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/ranlib; then - RANLIB="ranlib" - result="ranlib" - break - fi - done - IFS="$save_ifs" - - echo "$ac_t$result" 1>&6 -fi - -if test -n "$RANLIB"; then - old_archive_cmds="$old_archive_cmds;\$RANLIB \$oldlib" - old_postinstall_cmds="\$RANLIB \$oldlib;$old_postinstall_cmds" -fi - -# Check to see if we are using GCC. -if test "$with_gcc" != yes || test -z "$CC"; then - # If CC is not set, then try to find GCC or a usable CC. - if test -z "$CC"; then - echo $ac_n "checking for gcc... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" - for dir in $PATH; do - IFS="$save_ifs" - test -z "$dir" && dir=. - if test -f $dir/gcc; then - CC="gcc" - break - fi - done - IFS="$save_ifs" - - if test -n "$CC"; then - echo "$ac_t$CC" 1>&6 - else - echo "$ac_t"no 1>&6 - fi - fi - - # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". - if test -z "$CC"; then - echo $ac_n "checking for cc... $ac_c" 1>&6 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" - cc_rejected=no - for dir in $PATH; do - test -z "$dir" && dir=. - if test -f $dir/cc; then - if test "$dir/cc" = "/usr/ucb/cc"; then - cc_rejected=yes - continue - fi - CC="cc" - break - fi - done - IFS="$save_ifs" - if test $cc_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same name, so the bogon will be chosen - # first if we set CC to just the name; use the full file name. - shift - set dummy "$dir/cc" "$@" - shift - CC="$@" - fi - fi - - if test -n "$CC"; then - echo "$ac_t$CC" 1>&6 - else - echo "$ac_t"no 1>&6 - fi - - if test -z "$CC"; then - echo "$progname: error: no acceptable cc found in \$PATH" 1>&2 - exit 1 - fi - fi - - # Now see if the compiler is really GCC. - with_gcc=no - echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 - echo "$progname:424: checking whether we are using GNU C" >&5 - - $rm conftest.c - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - with_gcc=yes - fi - $rm conftest.c - echo "$ac_t$with_gcc" 1>&6 -fi - -# Allow CC to be a program name with arguments. -set dummy $CC -compiler="$2" - -echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 -pic_flag= -special_shlib_compile_flags= -wl= -link_static_flag= -no_builtin_flag= - -if test "$with_gcc" = yes; then - wl='-Wl,' - link_static_flag='-static' - no_builtin_flag=' -fno-builtin' - - case "$host_os" in - aix3* | aix4* | irix5* | irix6* | osf3* | osf4*) - # PIC is the default for these OSes. - ;; - os2*) - # We can build DLLs from non-PIC. - ;; - amigaos*) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - pic_flag='-m68020 -resident32 -malways-restore-a4' - ;; - *) - pic_flag='-fPIC' - ;; - esac -else - # PORTME Check for PIC flags for the system compiler. - case "$host_os" in - aix3* | aix4*) - # All AIX code is PIC. - link_static_flag='-bnso -bI:/lib/syscalls.exp' - ;; - - hpux9* | hpux10*) - # Is there a better link_static_flag that works with the bundled CC? - wl='-Wl,' - link_static_flag="${wl}-a ${wl}archive" - pic_flag='+Z' - ;; - - irix5* | irix6*) - wl='-Wl,' - link_static_flag='-non_shared' - # PIC (with -KPIC) is the default. - ;; - - os2*) - # We can build DLLs from non-PIC. - ;; - - osf3* | osf4*) - # All OSF/1 code is PIC. - wl='-Wl,' - link_static_flag='-non_shared' - ;; - - sco3.2v5*) - pic_flag='-Kpic' - link_static_flag='-dn' - special_shlib_compile_flags='-belf' - ;; - - solaris2*) - pic_flag='-KPIC' - link_static_flag='-Bstatic' - wl='-Wl,' - ;; - - sunos4*) - pic_flag='-PIC' - link_static_flag='-Bstatic' - wl='-Qoption ld ' - ;; - - sysv4.2uw2*) - pic_flag='-KPIC' - link_static_flag='-Bstatic' - wl='-Wl,' - ;; - - uts4*) - pic_flag='-pic' - link_static_flag='-Bstatic' - ;; - - *) - can_build_shared=no - ;; - esac -fi - -if test -n "$pic_flag"; then - echo "$ac_t$pic_flag" 1>&6 - - # Check to make sure the pic_flag actually works. - echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6 - $rm conftest* - echo > conftest.c - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $pic_flag -DPIC" - echo "$progname:547: checking if $compiler PIC flag $pic_flag works" >&5 - if { (eval echo $progname:548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then - # Append any warnings to the config.log. - cat conftest.err 1>&5 - - # On HP-UX, both CC and GCC only warn that PIC is supported... then they - # create non-PIC objects. So, if there were any warnings, we assume that - # PIC is not supported. - if test -s conftest.err; then - echo "$ac_t"no 1>&6 - can_build_shared=no - pic_flag= - else - echo "$ac_t"yes 1>&6 - pic_flag=" $pic_flag" - fi - else - # Append any errors to the config.log. - cat conftest.err 1>&5 - can_build_shared=no - pic_flag= - echo "$ac_t"no 1>&6 - fi - CFLAGS="$save_CFLAGS" - $rm conftest* -else - echo "$ac_t"none 1>&6 -fi - -# Check for any special shared library compilation flags. -if test -n "$special_shlib_compile_flags"; then - echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2 - if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then : - else - echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2 - can_build_shared=no - fi -fi - -echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6 -$rm conftest* -echo 'main(){return(0);}' > conftest.c -save_LDFLAGS="$LDFLAGS" -LDFLAGS="$LDFLAGS $link_static_flag" -echo "$progname:591: checking if $compiler static flag $link_static_flag works" >&5 -if { (eval echo $progname:592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - echo "$ac_t$link_static_flag" 1>&6 -else - echo "$ac_t"none 1>&6 - link_static_flag= -fi -LDFLAGS="$save_LDFLAGS" -$rm conftest* - -if test -z "$LN_S"; then - # Check to see if we can use ln -s, or we need hard links. - echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 - $rm conftestdata - if ln -s X conftestdata 2>/dev/null; then - $rm conftestdata - LN_S="ln -s" - else - LN_S=ln - fi - if test "$LN_S" = "ln -s"; then - echo "$ac_t"yes 1>&6 - else - echo "$ac_t"no 1>&6 - fi -fi - -# Make sure LD is an absolute path. -if test -z "$LD"; then - ac_prog=ld - if test "$with_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 - echo "$progname:624: checking for ld used by GCC" >&5 - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. - /* | [A-Za-z]:\\*) - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we are not using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac - elif test "$with_gnu_ld" = yes; then - echo $ac_n "checking for GNU ld... $ac_c" 1>&6 - echo "$progname:642: checking for GNU ld" >&5 - else - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 - echo "$progname:645: checking for non-GNU ld" >&5 - fi - - if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog"; then - LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" - fi - - if test -n "$LD"; then - echo "$ac_t$LD" 1>&6 - else - echo "$ac_t"no 1>&6 - fi - - if test -z "$LD"; then - echo "$progname: error: no acceptable ld found in \$PATH" 1>&2 - exit 1 - fi -fi - -# Check to see if it really is or is not GNU ld. -echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 -# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - with_gnu_ld=yes -else - with_gnu_ld=no -fi -echo "$ac_t$with_gnu_ld" 1>&6 - -# See if the linker supports building shared libraries. -echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 - -allow_undefined_flag= -no_undefined_flag= -archive_cmds= -old_archive_from_new_cmds= -export_dynamic_flag_spec= -hardcode_libdir_flag_spec= -hardcode_libdir_separator= -hardcode_direct=no -hardcode_minus_L=no -hardcode_shlibpath_var=unsupported -runpath_var= - -case "$host_os" in -amigaos* | sunos4*) - # On these operating systems, we should treat GNU ld like the system ld. - gnu_ld_acts_native=yes - ;; -*) - gnu_ld_acts_native=no - ;; -esac - -ld_shlibs=yes -if test "$with_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then - - # See if GNU ld supports shared libraries. - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs' - runpath_var=LD_RUN_PATH - ld_shlibs=yes - else - ld_shlibs=no - fi - - if test "$ld_shlibs" = yes; then - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - fi -else - # PORTME fill in a description of your system's linker (not GNU ld) - case "$host_os" in - aix3*) - allow_undefined_flag=unsupported - archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR cru $lib $objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$with_gcc" = yes && test -z "$link_static_flag"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix4*) - allow_undefined_flag=unsupported - archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR cru $lib $objdir/$soname' - hardcode_direct=yes - hardcode_minus_L=yes - ;; - - amigaos*) - archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib$libobjs /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib$libobjs' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3, at last, uses gcc -shared to do shared libraries. - freebsd3*) - archive_cmds='$CC -shared -o $lib$libobjs' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs;mv $objdir/$soname $lib' - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs' - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - irix5* | irix6*) - archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - ;; - - netbsd*) - # Tested with NetBSD 1.2 ld - archive_cmds='$LD -Bshareable -o $lib$libobjs' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - openbsd*) - archive_cmds='$LD -Bshareable -o $lib$libobjs' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;$echo DATA >> $objdir/$libname.def;$echo " SINGLE NONSHARED" >> $objdir/$libname.def;$echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' - ;; - - osf3* | osf4*) - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - sco3.2v5*) - archive_cmds='$LD -G -o $lib$libobjs' - hardcode_direct=yes - ;; - - solaris2*) - no_undefined_flag=' -z text' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib$libobjs' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - - # Solaris 2 before 2.5 hardcodes -L paths. - case "$host_os" in - solaris2.[0-4]*) - hardcode_minus_L=yes - ;; - esac - ;; - - sunos4*) - if test "$with_gcc" = yes; then - archive_cmds='$CC -shared -o $lib$libobjs' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs' - fi - - if test "$with_gnu_ld" = yes; then - export_dynamic_flag_spec='${wl}-export-dynamic' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib$libobjs' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=no - hardcode_minus_L=no - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - can_build_shared=no - ;; - esac -fi -echo "$ac_t$ld_shlibs" 1>&6 - -if test -z "$NM"; then - echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 - case "$NM" in - /* | [A-Za-z]:\\*) ;; # Let the user override the test with a path. - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - NM="$ac_dir/nm -B" - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - NM="$ac_dir/nm -p" - else - NM="$ac_dir/nm" - fi - break - fi - done - IFS="$ac_save_ifs" - test -z "$NM" && NM=nm - ;; - esac - echo "$ac_t$NM" 1>&6 -fi - -# Check for command to grab the raw symbol name followed by C symbol from nm. -echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRSTU]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Transform the above into a raw symbol and a C symbol. -symxfrm='\1 \1' - -# Define system-specific variables. -case "$host_os" in -aix*) - symcode='[BCDTU]' - ;; -irix*) - # Cannot use undefined symbols on IRIX because inlined functions mess us up. - symcode='[BCDEGRST]' - ;; -solaris2*) - symcode='[BDTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then - symcode='[ABCDGISTUW]' -fi - -# Write the raw and C identifiers. -global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'" - -# Check to see that the pipe works correctly. -pipe_works=no -$rm conftest* -cat > conftest.c <&5 -if { (eval echo $progname:972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then - # Now try to grab the symbols. - nlist=conftest.nm - if { echo "$progname:975: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then - - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - wcout=`wc "$nlist" 2>/dev/null` - count=`$echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'` - (test "$count" -ge 0) 2>/dev/null || count=-1 - else - rm -f "$nlist"T - count=-1 - fi - - # Make sure that we snagged all the symbols we need. - if egrep ' nm_test_var$' "$nlist" >/dev/null; then - if egrep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.c -#ifdef __cplusplus -extern "C" { -#endif - -EOF - # Now generate the symbol file. - sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c - - cat <> conftest.c -#if defined (__STDC__) && __STDC__ -# define __ptr_t void * -#else -# define __ptr_t char * -#endif - -/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */ -int dld_preloaded_symbol_count = $count; - -/* The mapping between symbol names and symbols. */ -struct { - char *name; - __ptr_t address; -} -dld_preloaded_symbols[] = -{ -EOF - sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> conftest.c - cat <<\EOF >> conftest.c - {0, (__ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif -EOF - # Now try linking the two files. - mv conftest.o conftestm.o - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS='conftestm.o' - CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo $progname:1033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - pipe_works=yes - else - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 - fi - LIBS="$save_LIBS" - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $global_symbol_pipe" >&5 - fi -else - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 -fi -$rm conftest* - -# Do not use the global_symbol_pipe unless it works. -echo "$ac_t$pipe_works" 1>&6 -test "$pipe_works" = yes || global_symbol_pipe= - -# Check hardcoding attributes. -echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || \ - test -n "$runpath_var"; then - - # We can hardcode non-existant directories. - if test "$hardcode_direct" != no && \ - test "$hardcode_minus_L" != no && \ - test "$hardcode_shlibpath_var" != no; then - - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -elif test "$hardcode_direct" != yes && \ - test "$hardcode_minus_L" != yes && \ - test "$hardcode_shlibpath_var" != yes; then - # We cannot hardcode anything. - hardcode_action=unsupported -else - # We can only hardcode existing directories. - hardcode_action=relink -fi -echo "$ac_t$hardcode_action" 1>&6 -test "$hardcode_action" = unsupported && can_build_shared=no - - -reload_flag= -reload_cmds='$LD$reload_flag -o $output$reload_objs' -echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6 -# PORTME Some linker may need a different reload flag. -reload_flag='-r' -echo "$ac_t$reload_flag" -test -n "$reload_flag" && reload_flag=" $reload_flag" - -# PORTME Fill in your ld.so characteristics -library_names_spec= -libname_spec='lib$name' -soname_spec= -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -version_type=none -dynamic_linker="$host_os ld.so" - -echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 -case "$host_os" in -aix3* | aix4*) - version_type=linux - library_names_spec='${libname}${release}.so.$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}.so.$major' - ;; - -amigaos*) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' - ;; - -freebsd2* | freebsd3*) - version_type=sunos - library_names_spec='${libname}${release}.so.$versuffix $libname.so' - finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - ;; - -gnu*) - version_type=sunos - library_names_spec='${libname}${release}.so.$versuffix' - shlibpath_var=LD_LIBRARY_PATH - ;; - -hpux9* | hpux10*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - dynamic_linker="$host_os dld.sl" - version_type=sunos - shlibpath_var=SHLIB_PATH - library_names_spec='${libname}${release}.sl.$versuffix ${libname}${release}.sl.$major $libname.sl' - soname_spec='${libname}${release}.sl.$major' - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -irix5* | irix6*) - version_type=osf - soname_spec='${libname}${release}.so' - library_names_spec='${libname}${release}.so.$versuffix $libname.so' - shlibpath_var=LD_LIBRARY_PATH - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux-gnu*) - version_type=linux - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' - soname_spec='${libname}${release}.so.$major' - finish_cmds='PATH="$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - - if test -f /lib/ld.so.1; then - dynamic_linker='GNU ld.so' - else - # Only the GNU ld.so supports shared libraries on MkLinux. - case "$host_cpu" in - powerpc*) dynamic_linker=no ;; - *) dynamic_linker='Linux ld.so' ;; - esac - fi - ;; - -netbsd* | openbsd*) - version_type=sunos - library_names_spec='${libname}${release}.so.$versuffix' - finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - ;; - -os2*) - libname_spec='$name' - library_names_spec='$libname.dll $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4*) - version_type=osf - soname_spec='${libname}${release}.so' - library_names_spec='${libname}${release}.so.$versuffix $libname.so' - shlibpath_var=LD_LIBRARY_PATH - ;; - -sco3.2v5*) - version_type=osf - soname_spec='${libname}${release}.so.$major' - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' - shlibpath_var=LD_LIBRARY_PATH - ;; - -solaris2*) - version_type=linux - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' - soname_spec='${libname}${release}.so.$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}.so.$versuffix' - finish_cmds='PATH="$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - ;; - -sysv4.2uw2*) - version_type=linux - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' - soname_spec='${libname}${release}.so.$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so' - soname_spec='${libname}${release}.so.$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -echo "$ac_t$dynamic_linker" -test "$dynamic_linker" = no && can_build_shared=no - -# Report the final consequences. -echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 - -echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 -test "$can_build_shared" = "no" && enable_shared=no - -# On AIX, shared libraries and static libraries use the same namespace, and -# are all built from PIC. -case "$host_os" in -aix*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds;\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; -esac - -echo "$ac_t$enable_shared" 1>&6 - -# Make sure either enable_shared or enable_static is yes. -test "$enable_shared" = yes || enable_static=yes - -echo "checking whether to build static libraries... $enable_static" 1>&6 - -echo $ac_n "checking for objdir... $ac_c" 1>&6 -rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - objdir=_libs -fi -rmdir .libs 2>/dev/null -echo "$ac_t$objdir" 1>&6 - -# Copy echo and quote the copy, instead of the original, because it is -# used later. -ltecho="$echo" - -# Now quote all the things that may contain metacharacters. -for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \ - old_LN_S AR CC LD LN_S NM reload_flag reload_cmds wl pic_flag \ - link_static_flag no_builtin_flag export_dynamic_flag_spec \ - libname_spec library_names_spec soname_spec RANLIB \ - old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ - old_postuninstall_cmds archive_cmds postinstall_cmds postuninstall_cmds \ - allow_undefined_flag no_undefined_flag \ - finish_cmds finish_eval global_symbol_pipe \ - hardcode_libdir_flag_spec hardcode_libdir_separator; do - - case "$var" in - reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | archive_cmds | \ - postinstall_cmds | postuninstall_cmds | finish_cmds) - # Double-quote double-evaled strings. - eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`" - ;; - *) - eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`" - ;; - esac -done - -ofile=libtool -trap "$rm $ofile; exit 1" 1 2 15 -echo creating $ofile -$rm $ofile -cat < $ofile -#! /bin/sh - -# libtool - Provide generalized library-building support services. -# Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION -# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. -# -# Copyright (C) 1996-1998 Free Software Foundation, Inc. -# Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This program was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\ -# LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\ -# $0$ltconfig_args -# -# Compiler and other test output produced by $progname, useful for -# debugging $progname, is in ./config.log if it exists. - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="sed -e s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi - -# An echo program that does not interpret backslashes. -echo="$ltecho" - -# The version of $progname that generated this script. -LTCONFIG_VERSION="$VERSION" - -# Shell to use when invoking shell scripts. -SHELL=${CONFIG_SHELL-/bin/sh} - -# Whether or not to build libtool libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build old-style libraries. -build_old_libs=$enable_static - -# The host system. -host_alias="$host_alias" -host="$host" - -# The archiver. -AR="$AR" - -# The default C compiler. -CC="$CC" - -# The linker used to build libraries. -LD="$LD" - -# Whether we need hard or soft links. -LN_S="$LN_S" - -# A BSD-compatible nm program. -NM="$NM" - -# The name of the directory that contains temporary libtool files. -objdir="$objdir" - -# How to create reloadable object files. -reload_flag="$reload_flag" -reload_cmds="$reload_cmds" - -# How to pass a linker flag through the compiler. -wl="$wl" - -# Additional compiler flags for building library objects. -pic_flag="$pic_flag" - -# Compiler flag to prevent dynamic linking. -link_static_flag="$link_static_flag" - -# Compiler flag to turn off builtin functions. -no_builtin_flag="$no_builtin_flag" - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec="$export_dynamic_flag_spec" - -# Library versioning type. -version_type=$version_type - -# Format of library name prefix. -libname_spec="$libname_spec" - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME. -library_names_spec="$library_names_spec" - -# The coded name of the library, if different from the real name. -soname_spec="$soname_spec" - -# Commands used to build and install an old-style archive. -RANLIB="$RANLIB" -old_archive_cmds="$old_archive_cmds" -old_postinstall_cmds="$old_postinstall_cmds" -old_postuninstall_cmds="$old_postuninstall_cmds" - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds="$old_archive_from_new_cmds" - -# Commands used to build and install a shared archive. -archive_cmds="$archive_cmds" -postinstall_cmds="$postinstall_cmds" -postuninstall_cmds="$postuninstall_cmds" - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag="$allow_undefined_flag" - -# Flag that forces no undefined symbols. -no_undefined_flag="$no_undefined_flag" - -# Commands used to finish a libtool library installation in a directory. -finish_cmds="$finish_cmds" - -# Same as above, but a single script fragment to be evaled but not shown. -finish_eval="$finish_eval" - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe="$global_symbol_pipe" - -# This is the shared library runtime path variable. -runpath_var=$runpath_var - -# This is the shared library path variable. -shlibpath_var=$shlibpath_var - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec="$hardcode_libdir_flag_spec" - -# Whether we need a single -rpath flag with a separated argument. -hardcode_libdir_separator="$hardcode_libdir_separator" - -# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the -# resulting binary. -hardcode_direct=$hardcode_direct - -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the -# resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into -# the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -EOF - -case "$host_os" in -aix3*) - cat <<\EOF >> $ofile -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "${COLLECT_NAMES+set}" != set; then - COLLECT_NAMES= - export COLLECT_NAMES -fi - -EOF - ;; -esac - -# Append the ltmain.sh script. -cat "$ltmain" >> $ofile || (rm -f $ofile; exit 1) - -chmod +x $ofile -exit 0 - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/gtkmm-osx/trunk/jpeg-6b/ltmain.sh b/gtkmm-osx/trunk/jpeg-6b/ltmain.sh deleted file mode 100644 index e9350b3..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/ltmain.sh +++ /dev/null @@ -1,2453 +0,0 @@ -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun ltconfig. -# -# Copyright (C) 1996-1998 Free Software Foundation, Inc. -# Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# The name of this program. -progname=`$echo "$0" | sed 's%^.*/%%'` -modename="$progname" - -# Constants. -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=1.2 - -default_mode= -help="Try \`$progname --help' for more information." -magic="%%%MAGIC variable%%%" -mkdir="mkdir" -mv="mv -f" -rm="rm -f" - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' -sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' - -# NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LANG+set}" = set; then LANG=C; export LANG; fi - -if test "$LTCONFIG_VERSION" != "$VERSION"; then - echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 -fi - -if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - echo "$modename: not configured to build any kind of library" 1>&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 -fi - -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= - -# Parse our command line options once, thoroughly. -while test $# -gt 0 -do - arg="$1" - shift - - case "$arg" in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case "$prev" in - execute_dlfiles) - eval "$prev=\"\$$prev \$arg\"" - ;; - *) - eval "$prev=\$arg" - ;; - esac - - prev= - prevopt= - continue - fi - - # Have we seen a non-optional argument yet? - case "$arg" in - --help) - show_help=yes - ;; - - --version) - echo "$PROGRAM (GNU $PACKAGE) $VERSION" - exit 0 - ;; - - --dry-run | -n) - run=: - ;; - - --features) - echo "host: $host" - if test "$build_libtool_libs" = yes; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - exit 0 - ;; - - --finish) mode="finish" ;; - - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - - --quiet | --silent) - show=: - ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles - ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - - *) - nonopt="$arg" - break - ;; - esac -done - -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit 1 -fi - -if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - case "$nonopt" in - *cc | *++ | gcc* | *-gcc*) - mode=link - for arg - do - case "$arg" in - -c) - mode=compile - break - ;; - esac - done - ;; - *db | *dbx) - mode=execute - ;; - *install*|cp|mv) - mode=install - ;; - *rm) - mode=uninstall - ;; - *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute - - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi - fi - ;; - esac - fi - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." - - # These modes are in order of execution frequency so that they run quickly. - case "$mode" in - # libtool compile mode - compile) - modename="$modename: compile" - # Get the compilation command and the source file. - base_compile= - lastarg= - srcfile="$nonopt" - suppress_output= - - for arg - do - # Accept any command-line options. - case "$arg" in - -o) - $echo "$modename: you cannot specify the output filename with \`-o'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - - -static) - build_libtool_libs=no - build_old_libs=yes - continue - ;; - esac - - # Accept the current argument as the source file. - lastarg="$srcfile" - srcfile="$arg" - - # Aesthetically quote the previous argument. - - # Backslashify any backslashes, double quotes, and dollar signs. - # These are the only characters that are still specially - # interpreted inside of double-quoted scrings. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly in scan - # sets, so we specify it separately. - case "$lastarg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - lastarg="\"$lastarg\"" - ;; - esac - - # Add the previous argument to base_compile. - if test -z "$base_compile"; then - base_compile="$lastarg" - else - base_compile="$base_compile $lastarg" - fi - done - - # Get the name of the library object. - libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` - - # Recognize several different file suffixes. - xform='[cCFSfms]' - case "$libobj" in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.f90) xform=f90 ;; - *.for) xform=for ;; - esac - - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - - case "$libobj" in - *.lo) obj=`$echo "X$libobj" | $Xsed -e 's/\.lo$/.o/'` ;; - *) - $echo "$modename: cannot determine name of library object from \`$srcfile'" 1>&2 - exit 1 - ;; - esac - - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - $run $rm $obj $libobj - trap "$run $rm $obj $libobj; exit 1" 1 2 15 - else - $run $rm $libobj - trap "$run $rm $libobj; exit 1" 1 2 15 - fi - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - # All platforms use -DPIC, to notify preprocessed assembler code. - $show "$base_compile$pic_flag -DPIC $srcfile" - if $run eval "$base_compile\$pic_flag -DPIC \$srcfile"; then : - else - test -n "$obj" && $run $rm $obj - exit 1 - fi - - # If we have no pic_flag, then copy the object into place and finish. - if test -z "$pic_flag"; then - $show "$LN_S $obj $libobj" - $run $LN_S $obj $libobj - exit $? - fi - - # Just move the object, then go on to compile the next one - $show "$mv $obj $libobj" - $run $mv $obj $libobj || exit 1 - - # Allow error messages only from the first compilation. - suppress_output=' >/dev/null 2>&1' - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - # Suppress compiler output if we already did a PIC compilation. - $show "$base_compile $srcfile$suppress_output" - if $run eval "$base_compile \$srcfile$suppress_output"; then : - else - $run $rm $obj $libobj - exit 1 - fi - fi - - # Create an invalid libtool object if no PIC, so that we do not - # accidentally link it into a program. - if test "$build_libtool_libs" != yes; then - $show "echo timestamp > $libobj" - $run eval "echo timestamp > \$libobj" || exit $? - fi - - exit 0 - ;; - - # libtool link mode - link) - modename="$modename: link" - CC="$nonopt" - allow_undefined=yes - compile_command="$CC" - finalize_command="$CC" - - compile_shlibpath= - finalize_shlibpath= - deplibs= - dlfiles= - dlprefiles= - export_dynamic=no - hardcode_libdirs= - libobjs= - link_against_libtool_libs= - ltlibs= - objs= - prev= - prevarg= - release= - rpath= - perm_rpath= - temp_rpath= - vinfo= - - # We need to know -static, to get the right output filenames. - for arg - do - case "$arg" in - -all-static | -static) - if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 - fi - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - for arg - do - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case "$prev" in - output) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" - ;; - esac - - case "$prev" in - dlfiles|dlprefiles) - case "$arg" in - *.la | *.lo) ;; # We handle these cases below. - *) - dlprefiles="$dlprefiles $arg" - test "$prev" = dlfiles && dlfiles="$dlfiles $arg" - prev= - ;; - esac - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath) - rpath="$rpath $arg" - prev= - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi - - prevarg="$arg" - - case "$arg" in - -all-static) - if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - if test "$export_dynamic" != yes; then - export_dynamic=yes - if test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - else - arg= - fi - - # Add the symbol object into the linking commands. - compile_command="$compile_command @SYMFILE@" - finalize_command="$finalize_command @SYMFILE@" - fi - ;; - - -L*) - dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'` - case "$dir" in - /* | [A-Za-z]:\\*) - # Add the corresponding hardcode_libdir_flag, if it is not identical. - ;; - *) - $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2 - exit 1 - ;; - esac - deplibs="$deplibs $arg" - ;; - - -l*) deplibs="$deplibs $arg" ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -o) prev=output ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -static) - # If we have no pic_flag, then this is the same as -all-static. - if test -z "$pic_flag" && test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - ;; - - *.o | *.a) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A library object. - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - if test "$build_libtool_libs" = yes; then - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e 's/\.lo$/\.o/'` - prev= - fi - libobjs="$libobjs $arg" - ;; - - *.la) - # A libtool-controlled library. - - dlname= - libdir= - library_names= - old_library= - - # Check to see that this really is a libtool archive. - if (sed -e '2q' $arg | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then : - else - $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2 - exit 1 - fi - - # If there is no directory component, then add one. - case "$arg" in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$libdir"; then - $echo "$modename: \`$arg' contains no -rpath information" 1>&2 - exit 1 - fi - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$arg'" 1>&2 - exit 1 - fi - - # Find the relevant object directory and library name. - name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'` - dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$arg"; then - dir="$objdir" - else - dir="$dir/$objdir" - fi - - # This library was specified with -dlopen. - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - if test -z "$dlname"; then - # If there is no dlname, we need to preload. - prev=dlprefiles - else - # We should not create a dependency on this library, but we - # may need any libraries it requires. - compile_command="$compile_command$dependency_libs" - finalize_command="$finalize_command$dependency_libs" - prev= - continue - fi - fi - - # The library was specified with -dlpreopen. - if test "$prev" = dlprefiles; then - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - dlprefiles="$dlprefiles $dir/$old_library" - else - dlprefiles="$dlprefiles $dir/$linklib" - fi - prev= - fi - - if test "$build_libtool_libs" = yes && test -n "$library_names"; then - link_against_libtool_libs="$link_against_libtool_libs $arg" - if test -n "$shlibpath_var"; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *) temp_rpath="$temp_rpath $dir" ;; - esac - fi - - # This is the magic to use -rpath. - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - # Put the magic libdir with the hardcode flag. - hardcode_libdirs="$libdir" - libdir="@HARDCODE_LIBDIRS@" - else - # Just accumulate the unique libdirs. - case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - libdir= - fi - fi - - if test -n "$libdir"; then - eval flag=\"$hardcode_libdir_flag_spec\" - - compile_command="$compile_command $flag" - finalize_command="$finalize_command $flag" - fi - elif test -n "$runpath_var"; then - # Do the same for the permanent run path. - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - - - case "$hardcode_action" in - immediate) - if test "$hardcode_direct" = no; then - compile_command="$compile_command $dir/$linklib" - elif test "$hardcode_minus_L" = no; then - compile_command="$compile_command -L$dir -l$name" - elif test "$hardcode_shlibpath_var" = no; then - compile_shlibpath="$compile_shlibpath$dir:" - compile_command="$compile_command -l$name" - fi - ;; - - relink) - # We need an absolute path. - case "$dir" in - /* | [A-Za-z]:\\*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - exit 1 - fi - dir="$absdir" - ;; - esac - - if test "$hardcode_direct" = yes; then - compile_command="$compile_command $dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - compile_command="$compile_command -L$dir -l$name" - elif test "$hardcode_shlibpath_var" = yes; then - compile_shlibpath="$compile_shlibpath$dir:" - compile_command="$compile_command -l$name" - fi - ;; - - *) - $echo "$modename: \`$hardcode_action' is an unknown hardcode action" 1>&2 - exit 1 - ;; - esac - - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then - finalize_command="$finalize_command $libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - finalize_command="$finalize_command -L$libdir -l$name" - elif test "$hardcode_shlibpath_var" = yes; then - finalize_shlibpath="$finalize_shlibpath$libdir:" - finalize_command="$finalize_command -l$name" - else - # We cannot seem to hardcode it, guess we'll fake it. - finalize_command="$finalize_command -L$libdir -l$name" - fi - else - # Transform directly to old archives if we don't build new libraries. - if test -n "$pic_flag" && test -z "$old_library"; then - $echo "$modename: cannot find static library for \`$arg'" 1>&2 - exit 1 - fi - - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_command="$compile_command $dir/$linklib" - finalize_command="$finalize_command $dir/$linklib" - else - compile_command="$compile_command -L$dir -l$name" - finalize_command="$finalize_command -L$dir -l$name" - fi - fi - - # Add in any libraries that this one depends upon. - compile_command="$compile_command$dependency_libs" - finalize_command="$finalize_command$dependency_libs" - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - ;; - esac - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - done - - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - if test -n "$vinfo" && test -n "$release"; then - $echo "$modename: you cannot specify both \`-version-info' and \`-release'" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - oldlib= - oldobjs= - case "$output" in - "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - - */* | *\\*) - $echo "$modename: output file \`$output' must have no directory components" 1>&2 - exit 1 - ;; - - *.a) - # Now set the variables for building old libraries. - build_libtool_libs=no - build_old_libs=yes - oldlib="$output" - $show "$rm $oldlib" - $run $rm $oldlib - ;; - - *.la) - # Make sure we only generate libraries of the form `libNAME.la'. - case "$output" in - lib*) ;; - *) - $echo "$modename: libtool library \`$arg' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - esac - - name=`$echo "X$output" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval libname=\"$libname_spec\" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - current=0 - revision=0 - age=0 - - if test -n "$objs"; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1 - exit 1 - fi - - # How the heck are we supposed to write a wrapper for a shared library? - if test -n "$link_against_libtool_libs"; then - $echo "$modename: libtool library \`$output' may not depend on uninstalled libraries:$link_against_libtool_libs" 1>&2 - exit 1 - fi - - if test -n "$dlfiles$dlprefiles"; then - $echo "$modename: warning: \`-dlopen' is ignored while creating libtool libraries" 1>&2 - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi - - if test -z "$rpath"; then - $echo "$modename: you must specify an installation directory with \`-rpath'" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - set dummy $rpath - if test $# -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 - fi - install_libdir="$2" - - # Parse the version information argument. - IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' - set dummy $vinfo - IFS="$save_ifs" - - if test -n "$5"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - test -n "$2" && current="$2" - test -n "$3" && revision="$3" - test -n "$4" && age="$4" - - # Check that each of the things are valid numbers. - case "$current" in - 0 | [1-9] | [1-9][0-9]*) ;; - *) - $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - ;; - esac - - case "$revision" in - 0 | [1-9] | [1-9][0-9]*) ;; - *) - $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - ;; - esac - - case "$age" in - 0 | [1-9] | [1-9][0-9]*) ;; - *) - $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - ;; - esac - - if test $age -gt $current; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit 1 - fi - - # Calculate the version variables. - version_vars="version_type current age revision" - case "$version_type" in - none) ;; - - linux) - version_vars="$version_vars major versuffix" - major=`expr $current - $age` - versuffix="$major.$age.$revision" - ;; - - osf) - version_vars="$version_vars versuffix verstring" - major=`expr $current - $age` - versuffix="$current.$age.$revision" - verstring="$versuffix" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test $loop != 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - sunos) - version_vars="$version_vars major versuffix" - major="$current" - versuffix="$current.$revision" - ;; - - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 - ;; - esac - - # Create the output directory, or remove our outputs if we need to. - if test -d $objdir; then - $show "$rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.*" - $run $rm $objdir/$output $objdir/$libname.* $objdir/${libname}${release}.* - else - $show "$mkdir $objdir" - $run $mkdir $objdir - status=$? - if test $status -eq 0 || test -d $objdir; then : - else - exit $status - fi - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - # Add libc to deplibs on all systems. - dependency_libs="$deplibs" - deplibs="$deplibs -lc" - - if test "$build_libtool_libs" = yes; then - # Get the real and link names of the library. - eval library_names=\"$library_names_spec\" - set dummy $library_names - realname="$2" - shift; shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - lib="$objdir/$realname" - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are PIC. - test -z "$pic_flag" && libobjs=`$echo "X$libobjs " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//g'` - - # Do each of the archive commands. - eval cmds=\"$archive_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Create links to the real library. - for linkname in $linknames; do - $show "(cd $objdir && $LN_S $realname $linkname)" - $run eval '(cd $objdir && $LN_S $realname $linkname)' || exit $? - done - - # If -export-dynamic was specified, set the dlname. - if test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - - # Now set the variables for building old libraries. - oldlib="$objdir/$libname.a" - ;; - - *.lo | *.o) - if test -n "$link_against_libtool_libs"; then - $echo "$modename: error: cannot link libtool libraries into reloadable objects" 1>&2 - exit 1 - fi - - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored while creating objects" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles"; then - $echo "$modename: warning: \`-dlopen' is ignored while creating objects" 1>&2 - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored while creating objects" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored while creating objects" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2 - fi - - case "$output" in - *.lo) - if test -n "$objs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit 1 - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e 's/\.lo$/.o/'` - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $run $rm $obj $libobj - - # Create the old-style object. - reload_objs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'` - - output="$obj" - eval cmds=\"$reload_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Exit if we aren't doing a library object file. - test -z "$libobj" && exit 0 - - if test "$build_libtool_libs" != yes; then - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - $show "echo timestamp > $libobj" - $run eval "echo timestamp > $libobj" || exit $? - exit 0 - fi - - if test -n "$pic_flag"; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs" - output="$libobj" - eval cmds=\"$reload_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - else - # Just create a symlink. - $show "$LN_S $obj $libobj" - $run $LN_S $obj $libobj || exit 1 - fi - - exit 0 - ;; - - *) - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored while linking programs" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored while creating objects" 1>&2 - fi - - if test -n "$rpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - # Put the magic libdir with the hardcode flag. - hardcode_libdirs="$libdir" - libdir="@HARDCODE_LIBDIRS@" - else - # Just accumulate the unique libdirs. - case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - libdir= - fi - fi - - if test -n "$libdir"; then - eval flag=\"$hardcode_libdir_flag_spec\" - - compile_command="$compile_command $flag" - finalize_command="$finalize_command $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - fi - - # Substitute the hardcoded libdirs into the compile commands. - if test -n "$hardcode_libdir_separator"; then - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"` - fi - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$echo "X$compile_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'` - finalize_command=`$echo "X$finalize_command " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'` - fi - - if test "$export_dynamic" = yes && test -n "$NM" && test -n "$global_symbol_pipe"; then - dlsyms="${output}S.c" - else - dlsyms= - fi - - if test -n "$dlsyms"; then - # Add our own program objects to the preloaded list. - dlprefiles=`$echo "X$objs$dlprefiles " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//'` - - # Discover the nlist of each of the dlfiles. - nlist="$objdir/${output}.nm" - - if test -d $objdir; then - $show "$rm $nlist ${nlist}T" - $run $rm "$nlist" "${nlist}T" - else - $show "$mkdir $objdir" - $run $mkdir $objdir - status=$? - if test $status -eq 0 || test -d $objdir; then : - else - exit $status - fi - fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - # Parse the name list into a source file. - $show "creating $objdir/$dlsyms" - if test -z "$run"; then - # Make sure we at least have an empty file. - test -f "$nlist" || : > "$nlist" - - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - wcout=`wc "$nlist" 2>/dev/null` - count=`echo "X$wcout" | $Xsed -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'` - (test "$count" -ge 0) 2>/dev/null || count=-1 - else - $rm "$nlist"T - count=-1 - fi - - case "$dlsyms" in - "") ;; - *.c) - $echo > "$objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$output' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* Prevent the only kind of declaration conflicts we can make. */ -#define dld_preloaded_symbol_count some_other_symbol -#define dld_preloaded_symbols some_other_symbol - -/* External symbol declarations for the compiler. */\ -" - - if test -f "$nlist"; then - sed -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$objdir/$dlsyms" - else - echo '/* NONE */' >> "$objdir/$dlsyms" - fi - - $echo >> "$objdir/$dlsyms" "\ - -#undef dld_preloaded_symbol_count -#undef dld_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define __ptr_t void * -#else -# define __ptr_t char * -#endif - -/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */ -int dld_preloaded_symbol_count = $count; - -/* The mapping between symbol names and symbols. */ -struct { - char *name; - __ptr_t address; -} -dld_preloaded_symbols[] = -{\ -" - - if test -f "$nlist"; then - sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$nlist" >> "$objdir/$dlsyms" - fi - - $echo >> "$objdir/$dlsyms" "\ - {0, (__ptr_t) 0} -}; - -#ifdef __cplusplus -} -#endif\ -" - ;; - - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit 1 - ;; - esac - fi - - # Now compile the dynamic symbol file. - $show "(cd $objdir && $CC -c$no_builtin_flag \"$dlsyms\")" - $run eval '(cd $objdir && $CC -c$no_builtin_flag "$dlsyms")' || exit $? - - # Transform the symbol file into the correct name. - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.o%"` - elif test "$export_dynamic" != yes; then - test -n "$dlfiles$dlprefiles" && $echo "$modename: warning: \`-dlopen' and \`-dlpreopen' are ignored without \`-export-dynamic'" 1>&2 - else - # We keep going just in case the user didn't refer to - # dld_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 - - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi - - if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - - # We have no uninstalled library dependencies, so finalize right now. - $show "$compile_command" - $run eval "$compile_command" - exit $? - fi - - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'%g'` - finalize_command=`$echo "X$finalize_command" | $Xsed -e 's%@OUTPUT@%'"$objdir/$output"'T%g'` - - # Create the binary in the object directory, then wrap it. - if test -d $objdir; then : - else - $show "$mkdir $objdir" - $run $mkdir $objdir - status=$? - if test $status -eq 0 || test -d $objdir; then : - else - exit $status - fi - fi - - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case "$dir" in - /* | [A-Za-z]:\\*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi - - # Delete the old output file. - $run $rm $output - - if test -n "$compile_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_command="$runpath_var=\"$rpath\$$runpath_var\" $compile_command" - finalize_command="$runpath_var=\"$rpath\$$runpath_var\" $finalize_command" - fi - - case "$hardcode_action" in - relink) - # AGH! Flame the AIX and HP-UX people for me, will ya? - $echo "$modename: warning: using a buggy system linker" 1>&2 - $echo "$modename: relinking will be required before \`$output' can be installed" 1>&2 - ;; - esac - - $show "$compile_command" - $run eval "$compile_command" || exit $? - - # Now create the wrapper script. - $show "creating $output" - - # Quote the finalize command for shipping. - finalize_command=`$echo "X$finalize_command" | $Xsed -e "$sed_quote_subst"` - - # Quote $echo for shipping. - qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` - - # Only actually do things if our run command is non-null. - if test -z "$run"; then - $rm $output - trap "$rm $output; exit 1" 1 2 15 - - $echo > $output "\ -#! /bin/sh - -# $output - temporary wrapper script for $objdir/$output -# Generated by ltmain.sh - GNU $PACKAGE $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of \``pwd`'. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='sed -e s/^X//' -sed_quote_subst='$sed_quote_subst' - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - link_against_libtool_libs='$link_against_libtool_libs' - finalize_command=\"$finalize_command\" -else - # When we are sourced in execute mode, \$file and \$echo are already set. - if test \"\$libtool_execute_magic\" = \"$magic\"; then : - else - echo=\"$qecho\" - file=\"\$0\" - fi\ -" - $echo >> $output "\ - - # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - /* | [A-Za-z]:\\*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` - done - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" - - progdir=\"\$thisdir/$objdir\" - program='$output' - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $echo >> $output "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/:*\$//'\` - - export $shlibpath_var -" - fi - - $echo >> $output "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. - - # Export the path to the program. - PATH=\"\$progdir:\$PATH\" - export PATH - - exec \$program \${1+\"\$@\"} - - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" - exit 1 - fi - else - # The program doesn't exist. - \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 1>&2 - echo \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" - chmod +x $output - fi - exit 0 - ;; - esac - - # See if we need to build an old-fashioned archive. - if test "$build_old_libs" = "yes"; then - # Transform .lo files to .o files. - oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'` - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - eval cmds=\"$old_archive_from_new_cmds\" - else - eval cmds=\"$old_archive_cmds\" - fi - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - # Now create the libtool archive. - case "$output" in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.a" - - $show "creating $output" - - # Only create the output if not a dry run. - if test -z "$run"; then - $echo > $output "\ -# $output - a libtool library file -# Generated by ltmain.sh - GNU $PACKAGE $VERSION - -# The name that we can dlopen(3). -dlname='$dlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Directory that this library needs to be installed in: -libdir='$install_libdir'\ -" - fi - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - $show "(cd $objdir && $LN_S ../$output $output)" - $run eval "(cd $objdir && $LN_S ../$output $output)" || exit 1 - ;; - esac - exit 0 - ;; - - # libtool install mode - install) - modename="$modename: install" - - # There may be an optional /bin/sh argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL"; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - install_prog="$arg " - arg="$1" - shift - else - install_prog= - arg="$nonopt" - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog$arg" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir= - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest="$arg" - continue - fi - - case "$arg" in - -d) isdir=yes ;; - -f) prev="-f" ;; - -g) prev="-g" ;; - -m) prev="-m" ;; - -o) prev="-o" ;; - -s) - stripme=" -s" - continue - ;; - -*) ;; - - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest="$arg" - continue - fi - ;; - esac - - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog $arg" - done - - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - if test -z "$files"; then - if test -z "$dest"; then - $echo "$modename: no file or destination specified" 1>&2 - else - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 - exit 1 - fi - - # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test -n "$isdir"; then - destdir="$dest" - destname= - else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` - test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` - - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test $# -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - fi - case "$destdir" in - /* | [A-Za-z]:\\*) ;; - *) - for file in $files; do - case "$file" in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case "$file" in - *.a) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - library_names= - old_library= - # If there is no directory component, then add one. - case "$file" in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/" - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift - - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$realname $destdir/$realname" - $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $? - test "X$dlname" = "X$realname" && dlname= - - if test $# -gt 0; then - # Delete the old symlinks. - rmcmd="$rm" - for linkname - do - rmcmd="$rmcmd $destdir/$linkname" - done - $show "$rmcmd" - $run $rmcmd - - # ... and create new ones. - for linkname - do - test "X$dlname" = "X$linkname" && dlname= - $show "(cd $destdir && $LN_S $realname $linkname)" - $run eval "(cd $destdir && $LN_S $realname $linkname)" - done - fi - - if test -n "$dlname"; then - # Install the dynamically-loadable library. - $show "$install_prog $dir/$dlname $destdir/$dlname" - $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $? - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - eval cmds=\"$postinstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - $show "$install_prog $file $destdir/$name" - $run eval "$install_prog $file $destdir/$name" || exit $? - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case "$destfile" in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e 's/\.lo$/\.o/'` - ;; - *.o) - staticdest="$destfile" - destfile= - ;; - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; - esac - - # Install the libtool object if requested. - if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? - fi - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e 's/\.lo$/\.o/'` - - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi - exit 0 - ;; - - *) - # Do a test to see if this is really a libtool program. - if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then - link_against_libtool_libs= - finalize_command= - - # If there is no directory component, then add one. - case "$file" in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Check the variables that should have been set. - if test -z "$link_against_libtool_libs" || test -z "$finalize_command"; then - $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 - exit 1 - fi - - finalize=yes - for lib in $link_against_libtool_libs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. - case "$lib" in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi - libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`" - if test -z "$libdir"; then - $echo "$modename: warning: \`$lib' contains no -rpath information" 1>&2 - elif test -f "$libfile"; then : - else - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done - - if test "$hardcode_action" = relink; then - if test "$finalize" = yes; then - $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2 - $show "$finalize_command" - if $run eval "$finalize_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - continue - fi - file="$objdir/$file"T - else - $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2 - fi - else - # Install the binary that we compiled earlier. - file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - $show "$install_prog$stripme $file $dest" - $run eval "$install_prog\$stripme \$file \$dest" || exit $? - ;; - esac - done - - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - - # Do each command in the postinstall commands. - eval cmds=\"$old_postinstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec $SHELL $0 --finish$current_libdirs - exit 1 - fi - - exit 0 - ;; - - # libtool finish mode - finish) - modename="$modename: finish" - libdirs="$nonopt" - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - eval cmds=\"$finish_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" - done - IFS="$save_ifs" - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $run eval "$cmds" - fi - done - fi - - echo "------------------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - echo " $libdir" - done - echo - echo "To link against installed libraries in a given directory, LIBDIR," - echo "you must use the \`-LLIBDIR' flag during linking." - echo - echo " You will also need to do one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - echo " - use the \`$flag' linker flag" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - echo - echo "See any operating system documentation about shared libraries for" - echo "more information, such as the ld(1) and ld.so(8) manual pages." - echo "------------------------------------------------------------------------------" - exit 0 - ;; - - # libtool execute mode - execute) - modename="$modename: execute" - - # The first argument is the command name. - cmd="$nonopt" - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" - exit 1 - fi - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - if test -f "$file"; then : - else - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - dir= - case "$file" in - *.la) - # Check to see that this really is a libtool archive. - if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - # Read the libtool library. - dlname= - library_names= - - # If there is no directory component, then add one. - case "$file" in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" - continue - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit 1 - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; - - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case "$file" in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if (sed -e '4q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then - # If there is no directory component, then add one. - case "$file" in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` - args="$args \"$file\"" - done - - if test -z "$run"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - - # Now actually exec the command. - eval "exec \$cmd$args" - - $echo "$modename: cannot exec \$cmd$args" - exit 1 - else - # Display what would be done. - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" - $echo "$cmd$args" - exit 0 - fi - ;; - - # libtool uninstall mode - uninstall) - modename="$modename: uninstall" - rm="$nonopt" - files= - - for arg - do - case "$arg" in - -*) rm="$rm $arg" ;; - *) files="$files $arg" ;; - esac - done - - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 - exit 1 - fi - - for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - rmfiles="$file" - - case "$name" in - *.la) - # Possibly a libtool archive, so verify it. - if (sed -e '2q' $file | egrep '^# Generated by ltmain\.sh') >/dev/null 2>&1; then - . $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $dir/$n" - test "X$n" = "X$dlname" && dlname= - done - test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname" - test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library" - - $show "$rm $rmfiles" - $run $rm $rmfiles - - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - eval cmds=\"$postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" - done - IFS="$save_ifs" - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - eval cmds=\"$old_postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS=';' - for cmd in $cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" - done - IFS="$save_ifs" - fi - - # FIXME: should reinstall the best remaining shared library. - fi - ;; - - *.lo) - if test "$build_old_libs" = yes; then - oldobj=`$echo "X$name" | $Xsed -e 's/\.lo$/\.o/'` - rmfiles="$rmfiles $dir/$oldobj" - fi - $show "$rm $rmfiles" - $run $rm $rmfiles - ;; - - *) - $show "$rm $rmfiles" - $run $rm $rmfiles - ;; - esac - done - exit 0 - ;; - - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 - exit 1 - ;; - esac - - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit 1 -fi # test -z "$show_help" - -# We need to display help for each of the modes. -case "$mode" in -"") $echo \ -"Usage: $modename [OPTION]... [MODE-ARG]... - -Provide generalized library-building support services. - --n, --dry-run display commands without modifying any files - --features display configuration information and exit - --finish same as \`--mode=finish' - --help display this help message and exit - --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] - --quiet same as \`--silent' - --silent don't print informational messages - --version print version information - -MODE must be one of the following: - - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE." - exit 0 - ;; - -compile) - $echo \ -"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - -execute) - $echo \ -"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - -finish) - $echo \ -"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - -install) - $echo \ -"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - -link) - $echo \ -"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to dld_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -static do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only -library objects (\`.lo' files) may be specified, and \`-rpath' is required. - -If OUTPUT-FILE ends in \`.a', then a standard library is created using \`ar' -and \`ranlib'. - -If OUTPUT-FILE ends in \`.lo' or \`.o', then a reloadable object file is -created, otherwise an executable program is created." - ;; - -uninstall) - $echo -"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit 1 - ;; -esac - -echo -$echo "Try \`$modename --help' for more information about other modes." - -exit 0 - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/gtkmm-osx/trunk/jpeg-6b/makcjpeg.st b/gtkmm-osx/trunk/jpeg-6b/makcjpeg.st deleted file mode 100644 index fc72c89..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/makcjpeg.st +++ /dev/null @@ -1,38 +0,0 @@ -; Project file for Independent JPEG Group's software -; -; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. -; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de), -; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de), -; and Guido Vollbeding (guivol@esc.de). -; -; To use this file, rename it to cjpeg.prj. -; If you are using Turbo C, change filenames beginning with "pc..." to "tc..." -; Read installation instructions before trying to make the program! -; -; -; * * * Output file * * * -cjpeg.ttp -; -; * * * COMPILER OPTIONS * * * -.C[-P] ; absolute calls -.C[-M] ; and no string merging, folks -.C[-w-cln] ; no "constant is long" warnings -.C[-w-par] ; no "parameter xxxx unused" -.C[-w-rch] ; no "unreachable code" -.C[-wsig] ; warn if significant digits may be lost -= -; * * * * List of modules * * * * -pcstart.o -cjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h) -cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -rdppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -rdgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -rdtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -rdbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -rdrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -libjpeg.lib ; built by libjpeg.prj -pcfltlib.lib ; floating point library -; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED -pcstdlib.lib ; standard library -pcextlib.lib ; extended library diff --git a/gtkmm-osx/trunk/jpeg-6b/makdjpeg.st b/gtkmm-osx/trunk/jpeg-6b/makdjpeg.st deleted file mode 100644 index 3226726..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/makdjpeg.st +++ /dev/null @@ -1,38 +0,0 @@ -; Project file for Independent JPEG Group's software -; -; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. -; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de), -; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de), -; and Guido Vollbeding (guivol@esc.de). -; -; To use this file, rename it to djpeg.prj. -; If you are using Turbo C, change filenames beginning with "pc..." to "tc..." -; Read installation instructions before trying to make the program! -; -; -; * * * Output file * * * -djpeg.ttp -; -; * * * COMPILER OPTIONS * * * -.C[-P] ; absolute calls -.C[-M] ; and no string merging, folks -.C[-w-cln] ; no "constant is long" warnings -.C[-w-par] ; no "parameter xxxx unused" -.C[-w-rch] ; no "unreachable code" -.C[-wsig] ; warn if significant digits may be lost -= -; * * * * List of modules * * * * -pcstart.o -djpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h) -cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -rdcolmap.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -wrppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -wrgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -wrtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -wrbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -wrrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -libjpeg.lib ; built by libjpeg.prj -pcfltlib.lib ; floating point library -; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED -pcstdlib.lib ; standard library -pcextlib.lib ; extended library diff --git a/gtkmm-osx/trunk/jpeg-6b/makeapps.ds b/gtkmm-osx/trunk/jpeg-6b/makeapps.ds deleted file mode 100644 index bedd038..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/makeapps.ds +++ /dev/null @@ -1,828 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -!IF "$(CFG)" == "" -CFG=cjpeg - Win32 -!MESSAGE No configuration specified. Defaulting to cjpeg - Win32. -!ENDIF - -!IF "$(CFG)" != "cjpeg - Win32" && "$(CFG)" != "djpeg - Win32" &&\ - "$(CFG)" != "jpegtran - Win32" && "$(CFG)" != "rdjpgcom - Win32" &&\ - "$(CFG)" != "wrjpgcom - Win32" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "apps.mak" CFG="cjpeg - Win32" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "cjpeg - Win32" (based on "Win32 (x86) Console Application") -!MESSAGE "djpeg - Win32" (based on "Win32 (x86) Console Application") -!MESSAGE "jpegtran - Win32" (based on "Win32 (x86) Console Application") -!MESSAGE "rdjpgcom - Win32" (based on "Win32 (x86) Console Application") -!MESSAGE "wrjpgcom - Win32" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "cjpeg - Win32" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "cjpeg - Win32" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "cjpeg\Release" -# PROP BASE Intermediate_Dir "cjpeg\Release" -# PROP BASE Target_Dir "cjpeg" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "cjpeg\Release" -# PROP Intermediate_Dir "cjpeg\Release" -# PROP Target_Dir "cjpeg" -OUTDIR=.\cjpeg\Release -INTDIR=.\cjpeg\Release - -ALL : "$(OUTDIR)\cjpeg.exe" - -CLEAN : - -@erase "$(INTDIR)\cjpeg.obj" - -@erase "$(INTDIR)\rdppm.obj" - -@erase "$(INTDIR)\rdgif.obj" - -@erase "$(INTDIR)\rdtarga.obj" - -@erase "$(INTDIR)\rdrle.obj" - -@erase "$(INTDIR)\rdbmp.obj" - -@erase "$(INTDIR)\rdswitch.obj" - -@erase "$(INTDIR)\cdjpeg.obj" - -@erase "$(OUTDIR)\cjpeg.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ - /Fp"$(INTDIR)/cjpeg.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\cjpeg\Release/ -CPP_SBRS=.\. -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/cjpeg.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\ - /pdb:"$(OUTDIR)/cjpeg.pdb" /machine:I386 /out:"$(OUTDIR)/cjpeg.exe" -LINK32_OBJS= \ - "$(INTDIR)\cjpeg.obj" \ - "$(INTDIR)\rdppm.obj" \ - "$(INTDIR)\rdgif.obj" \ - "$(INTDIR)\rdtarga.obj" \ - "$(INTDIR)\rdrle.obj" \ - "$(INTDIR)\rdbmp.obj" \ - "$(INTDIR)\rdswitch.obj" \ - "$(INTDIR)\cdjpeg.obj" \ - - -"$(OUTDIR)\cjpeg.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "djpeg - Win32" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "djpeg\Release" -# PROP BASE Intermediate_Dir "djpeg\Release" -# PROP BASE Target_Dir "djpeg" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "djpeg\Release" -# PROP Intermediate_Dir "djpeg\Release" -# PROP Target_Dir "djpeg" -OUTDIR=.\djpeg\Release -INTDIR=.\djpeg\Release - -ALL : "$(OUTDIR)\djpeg.exe" - -CLEAN : - -@erase "$(INTDIR)\djpeg.obj" - -@erase "$(INTDIR)\wrppm.obj" - -@erase "$(INTDIR)\wrgif.obj" - -@erase "$(INTDIR)\wrtarga.obj" - -@erase "$(INTDIR)\wrrle.obj" - -@erase "$(INTDIR)\wrbmp.obj" - -@erase "$(INTDIR)\rdcolmap.obj" - -@erase "$(INTDIR)\cdjpeg.obj" - -@erase "$(OUTDIR)\djpeg.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ - /Fp"$(INTDIR)/djpeg.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\djpeg\Release/ -CPP_SBRS=.\. -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/djpeg.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\ - /pdb:"$(OUTDIR)/djpeg.pdb" /machine:I386 /out:"$(OUTDIR)/djpeg.exe" -LINK32_OBJS= \ - "$(INTDIR)\djpeg.obj" \ - "$(INTDIR)\wrppm.obj" \ - "$(INTDIR)\wrgif.obj" \ - "$(INTDIR)\wrtarga.obj" \ - "$(INTDIR)\wrrle.obj" \ - "$(INTDIR)\wrbmp.obj" \ - "$(INTDIR)\rdcolmap.obj" \ - "$(INTDIR)\cdjpeg.obj" \ - - -"$(OUTDIR)\djpeg.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "jpegtran - Win32" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "jpegtran\Release" -# PROP BASE Intermediate_Dir "jpegtran\Release" -# PROP BASE Target_Dir "jpegtran" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "jpegtran\Release" -# PROP Intermediate_Dir "jpegtran\Release" -# PROP Target_Dir "jpegtran" -OUTDIR=.\jpegtran\Release -INTDIR=.\jpegtran\Release - -ALL : "$(OUTDIR)\jpegtran.exe" - -CLEAN : - -@erase "$(INTDIR)\jpegtran.obj" - -@erase "$(INTDIR)\rdswitch.obj" - -@erase "$(INTDIR)\cdjpeg.obj" - -@erase "$(INTDIR)\transupp.obj" - -@erase "$(OUTDIR)\jpegtran.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ - /Fp"$(INTDIR)/jpegtran.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\jpegtran\Release/ -CPP_SBRS=.\. -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/jpegtran.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\ - /pdb:"$(OUTDIR)/jpegtran.pdb" /machine:I386 /out:"$(OUTDIR)/jpegtran.exe" -LINK32_OBJS= \ - "$(INTDIR)\jpegtran.obj" \ - "$(INTDIR)\rdswitch.obj" \ - "$(INTDIR)\cdjpeg.obj" \ - "$(INTDIR)\transupp.obj" \ - - -"$(OUTDIR)\jpegtran.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "rdjpgcom - Win32" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "rdjpgcom\Release" -# PROP BASE Intermediate_Dir "rdjpgcom\Release" -# PROP BASE Target_Dir "rdjpgcom" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "rdjpgcom\Release" -# PROP Intermediate_Dir "rdjpgcom\Release" -# PROP Target_Dir "rdjpgcom" -OUTDIR=.\rdjpgcom\Release -INTDIR=.\rdjpgcom\Release - -ALL : "$(OUTDIR)\rdjpgcom.exe" - -CLEAN : - -@erase "$(INTDIR)\rdjpgcom.obj" - -@erase "$(OUTDIR)\rdjpgcom.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ - /Fp"$(INTDIR)/rdjpgcom.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\rdjpgcom\Release/ -CPP_SBRS=.\. -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/rdjpgcom.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\ - /pdb:"$(OUTDIR)/rdjpgcom.pdb" /machine:I386 /out:"$(OUTDIR)/rdjpgcom.exe" -LINK32_OBJS= \ - "$(INTDIR)\rdjpgcom.obj" - -"$(OUTDIR)\rdjpgcom.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "wrjpgcom - Win32" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "wrjpgcom\Release" -# PROP BASE Intermediate_Dir "wrjpgcom\Release" -# PROP BASE Target_Dir "wrjpgcom" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "wrjpgcom\Release" -# PROP Intermediate_Dir "wrjpgcom\Release" -# PROP Target_Dir "wrjpgcom" -OUTDIR=.\wrjpgcom\Release -INTDIR=.\wrjpgcom\Release - -ALL : "$(OUTDIR)\wrjpgcom.exe" - -CLEAN : - -@erase "$(INTDIR)\wrjpgcom.obj" - -@erase "$(OUTDIR)\wrjpgcom.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ - /Fp"$(INTDIR)/wrjpgcom.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\wrjpgcom\Release/ -CPP_SBRS=.\. -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/wrjpgcom.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\ - /pdb:"$(OUTDIR)/wrjpgcom.pdb" /machine:I386 /out:"$(OUTDIR)/wrjpgcom.exe" -LINK32_OBJS= \ - "$(INTDIR)\wrjpgcom.obj" - -"$(OUTDIR)\wrjpgcom.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "cjpeg - Win32" - -!IF "$(CFG)" == "cjpeg - Win32" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE="cjpeg.c" -DEP_CPP_CJPEG=\ - "cdjpeg.h"\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - "cderror.h"\ - "jversion.h"\ - - -"$(INTDIR)\cjpeg.obj" : $(SOURCE) $(DEP_CPP_CJPEG) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="cdjpeg.c" -DEP_CPP_CDJPE=\ - "cdjpeg.h"\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - "cderror.h"\ - - -"$(INTDIR)\cdjpeg.obj" : $(SOURCE) $(DEP_CPP_CDJPE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="rdswitch.c" -DEP_CPP_RDSWI=\ - "cdjpeg.h"\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - "cderror.h"\ - - -"$(INTDIR)\rdswitch.obj" : $(SOURCE) $(DEP_CPP_RDSWI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="rdppm.c" -DEP_CPP_RDPPM=\ - "cdjpeg.h"\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - "cderror.h"\ - - -"$(INTDIR)\rdppm.obj" : $(SOURCE) $(DEP_CPP_RDPPM) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="rdgif.c" -DEP_CPP_RDGIF=\ - "cdjpeg.h"\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - "cderror.h"\ - - -"$(INTDIR)\rdgif.obj" : $(SOURCE) $(DEP_CPP_RDGIF) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="rdtarga.c" -DEP_CPP_RDTAR=\ - "cdjpeg.h"\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - "cderror.h"\ - - -"$(INTDIR)\rdtarga.obj" : $(SOURCE) $(DEP_CPP_RDTAR) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="rdbmp.c" -DEP_CPP_RDBMP=\ - "cdjpeg.h"\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - "cderror.h"\ - - -"$(INTDIR)\rdbmp.obj" : $(SOURCE) $(DEP_CPP_RDBMP) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="rdrle.c" -DEP_CPP_RDRLE=\ - "cdjpeg.h"\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - "cderror.h"\ - - -"$(INTDIR)\rdrle.obj" : $(SOURCE) $(DEP_CPP_RDRLE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -# End Target -################################################################################ -# Begin Target - -# Name "djpeg - Win32" - -!IF "$(CFG)" == "djpeg - Win32" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE="djpeg.c" -DEP_CPP_DJPEG=\ - "cdjpeg.h"\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - "cderror.h"\ - "jversion.h"\ - - -"$(INTDIR)\djpeg.obj" : $(SOURCE) $(DEP_CPP_DJPEG) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="cdjpeg.c" -DEP_CPP_CDJPE=\ - "cdjpeg.h"\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - "cderror.h"\ - - -"$(INTDIR)\cdjpeg.obj" : $(SOURCE) $(DEP_CPP_CDJPE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="rdcolmap.c" -DEP_CPP_RDCOL=\ - "cdjpeg.h"\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - "cderror.h"\ - - -"$(INTDIR)\rdcolmap.obj" : $(SOURCE) $(DEP_CPP_RDCOL) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="wrppm.c" -DEP_CPP_WRPPM=\ - "cdjpeg.h"\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - "cderror.h"\ - - -"$(INTDIR)\wrppm.obj" : $(SOURCE) $(DEP_CPP_WRPPM) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="wrgif.c" -DEP_CPP_WRGIF=\ - "cdjpeg.h"\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - "cderror.h"\ - - -"$(INTDIR)\wrgif.obj" : $(SOURCE) $(DEP_CPP_WRGIF) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="wrtarga.c" -DEP_CPP_WRTAR=\ - "cdjpeg.h"\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - "cderror.h"\ - - -"$(INTDIR)\wrtarga.obj" : $(SOURCE) $(DEP_CPP_WRTAR) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="wrbmp.c" -DEP_CPP_WRBMP=\ - "cdjpeg.h"\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - "cderror.h"\ - - -"$(INTDIR)\wrbmp.obj" : $(SOURCE) $(DEP_CPP_WRBMP) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="wrrle.c" -DEP_CPP_WRRLE=\ - "cdjpeg.h"\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - "cderror.h"\ - - -"$(INTDIR)\wrrle.obj" : $(SOURCE) $(DEP_CPP_WRRLE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -# End Target -################################################################################ -# Begin Target - -# Name "jpegtran - Win32" - -!IF "$(CFG)" == "jpegtran - Win32" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE="jpegtran.c" -DEP_CPP_JPEGT=\ - "cdjpeg.h"\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - "cderror.h"\ - "transupp.h"\ - "jversion.h"\ - - -"$(INTDIR)\jpegtran.obj" : $(SOURCE) $(DEP_CPP_JPEGT) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="cdjpeg.c" -DEP_CPP_CDJPE=\ - "cdjpeg.h"\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - "cderror.h"\ - - -"$(INTDIR)\cdjpeg.obj" : $(SOURCE) $(DEP_CPP_CDJPE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="rdswitch.c" -DEP_CPP_RDSWI=\ - "cdjpeg.h"\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - "cderror.h"\ - - -"$(INTDIR)\rdswitch.obj" : $(SOURCE) $(DEP_CPP_RDSWI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="transupp.c" -DEP_CPP_TRANS=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - "transupp.h"\ - - -"$(INTDIR)\transupp.obj" : $(SOURCE) $(DEP_CPP_TRANS) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -# End Target -################################################################################ -# Begin Target - -# Name "rdjpgcom - Win32" - -!IF "$(CFG)" == "rdjpgcom - Win32" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE="rdjpgcom.c" -DEP_CPP_RDJPG=\ - "jinclude.h"\ - "jconfig.h"\ - - -"$(INTDIR)\rdjpgcom.obj" : $(SOURCE) $(DEP_CPP_RDJPG) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -# End Target -################################################################################ -# Begin Target - -# Name "wrjpgcom - Win32" - -!IF "$(CFG)" == "wrjpgcom - Win32" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE="wrjpgcom.c" -DEP_CPP_WRJPG=\ - "jinclude.h"\ - "jconfig.h"\ - - -"$(INTDIR)\wrjpgcom.obj" : $(SOURCE) $(DEP_CPP_WRJPG) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -# End Target -# End Project -################################################################################ - diff --git a/gtkmm-osx/trunk/jpeg-6b/makefile.ansi b/gtkmm-osx/trunk/jpeg-6b/makefile.ansi deleted file mode 100644 index 8291913..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/makefile.ansi +++ /dev/null @@ -1,214 +0,0 @@ -# Makefile for Independent JPEG Group's software - -# This makefile is suitable for Unix-like systems with ANSI-capable compilers. -# If you have a non-ANSI compiler, makefile.unix is a better starting point. - -# Read installation instructions before saying "make" !! - -# The name of your C compiler: -CC= cc - -# You may need to adjust these cc options: -CFLAGS= -O -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via -D switches here. - -# Link-time cc options: -LDFLAGS= - -# To link any special libraries, add the necessary -l commands here. -LDLIBS= - -# Put here the object file name for the correct system-dependent memory -# manager file. For Unix this is usually jmemnobs.o, but you may want -# to use jmemansi.o or jmemname.o if you have limited swap space. -SYSDEPMEM= jmemnobs.o - -# miscellaneous OS-dependent stuff -# linker -LN= $(CC) -# file deletion command -RM= rm -f -# library (.a) file creation command -AR= ar rc -# second step in .a creation (use "touch" if not needed) -AR2= ranlib - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ - jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ - jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ - jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ - jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ - jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ - jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ - jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ - coderules.doc filelist.doc change.log -MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ - makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ - makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh -OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm -TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ - testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \ - jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \ - jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \ - jfdctint.o -# decompression library object files -DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \ - jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \ - jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \ - jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o -# These objectfiles are included in libjpeg.a -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ - cdjpeg.o -DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ - cdjpeg.o -TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o - - -all: libjpeg.a cjpeg djpeg jpegtran rdjpgcom wrjpgcom - -libjpeg.a: $(LIBOBJECTS) - $(RM) libjpeg.a - $(AR) libjpeg.a $(LIBOBJECTS) - $(AR2) libjpeg.a - -cjpeg: $(COBJECTS) libjpeg.a - $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.a $(LDLIBS) - -djpeg: $(DOBJECTS) libjpeg.a - $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.a $(LDLIBS) - -jpegtran: $(TROBJECTS) libjpeg.a - $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.a $(LDLIBS) - -rdjpgcom: rdjpgcom.o - $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS) - -wrjpgcom: wrjpgcom.o - $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS) - -jconfig.h: jconfig.doc - echo You must prepare a system-dependent jconfig.h file. - echo Please read the installation directions in install.doc. - exit 1 - -clean: - $(RM) *.o cjpeg djpeg jpegtran libjpeg.a rdjpgcom wrjpgcom - $(RM) core testout* - -test: cjpeg djpeg jpegtran - $(RM) testout* - ./djpeg -dct int -ppm -outfile testout.ppm testorig.jpg - ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg - ./cjpeg -dct int -outfile testout.jpg testimg.ppm - ./djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg - ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm - ./jpegtran -outfile testoutt.jpg testprog.jpg - cmp testimg.ppm testout.ppm - cmp testimg.bmp testout.bmp - cmp testimg.jpg testout.jpg - cmp testimg.ppm testoutp.ppm - cmp testimgp.jpg testoutp.jpg - cmp testorig.jpg testoutt.jpg - - -jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h -cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/gtkmm-osx/trunk/jpeg-6b/makefile.bcc b/gtkmm-osx/trunk/jpeg-6b/makefile.bcc deleted file mode 100644 index a1cfcde..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/makefile.bcc +++ /dev/null @@ -1,285 +0,0 @@ -# Makefile for Independent JPEG Group's software - -# This makefile is suitable for Borland C on MS-DOS or OS/2. -# It works with Borland C++ for DOS, revision 3.0 or later, -# and has been tested with Borland C++ for OS/2. -# Watch out for optimization bugs in the OS/2 compilers --- see notes below! -# Thanks to Tom Wright and Ge' Weijers (original DOS) and -# Ken Porter (OS/2) for this file. - -# Read installation instructions before saying "make" !! - -# Are we under DOS or OS/2? -!if !$d(DOS) && !$d(OS2) -!if $d(__OS2__) -OS2=1 -!else -DOS=1 -!endif -!endif - -# The name of your C compiler: -CC= bcc - -# You may need to adjust these cc options: -!if $d(DOS) -CFLAGS= -O2 -mm -w-par -w-stu -w-ccc -w-rch -!else -CFLAGS= -O1 -w-par -w-stu -w-ccc -w-rch -!endif -# -O2 enables full code optimization (for pre-3.0 Borland C++, use -O -G -Z). -# -O2 is buggy in Borland OS/2 C++ revision 2.0, so use -O1 there for now. -# If you have Borland OS/2 C++ revision 1.0, use -O or no optimization at all. -# -mm selects medium memory model (near data, far code pointers; DOS only!) -# -w-par suppresses warnings about unused function parameters -# -w-stu suppresses warnings about incomplete structures -# -w-ccc suppresses warnings about compile-time-constant conditions -# -w-rch suppresses warnings about unreachable code -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via -D switches here. - -# Link-time cc options: -!if $d(DOS) -LDFLAGS= -mm -# memory model option here must match CFLAGS! -!else -LDFLAGS= -# -lai full-screen app -# -lc case-significant link -!endif - -# Put here the object file name for the correct system-dependent memory -# manager file. -# For DOS, we recommend jmemdos.c and jmemdosa.asm. -# For OS/2, we recommend jmemnobs.c (flat memory!) -# SYSDEPMEMLIB must list the same files with "+" signs for the librarian. -!if $d(DOS) -SYSDEPMEM= jmemdos.obj jmemdosa.obj -SYSDEPMEMLIB= +jmemdos.obj +jmemdosa.obj -!else -SYSDEPMEM= jmemnobs.obj -SYSDEPMEMLIB= +jmemnobs.obj -!endif - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ - jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ - jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ - jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ - jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ - jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ - jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ - jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ - coderules.doc filelist.doc change.log -MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ - makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ - makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh -OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm -TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ - testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \ - jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \ - jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \ - jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj -# decompression library object files -DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \ - jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \ - jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \ - jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \ - jquant1.obj jquant2.obj jdmerge.obj -# These objectfiles are included in libjpeg.lib -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \ - rdswitch.obj cdjpeg.obj -DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ - rdcolmap.obj cdjpeg.obj -TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj - - -all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe - -libjpeg.lib: $(LIBOBJECTS) - - del libjpeg.lib - tlib libjpeg.lib /E /C @&&| -+jcapimin.obj +jcapistd.obj +jctrans.obj +jcparam.obj +jdatadst.obj & -+jcinit.obj +jcmaster.obj +jcmarker.obj +jcmainct.obj +jcprepct.obj & -+jccoefct.obj +jccolor.obj +jcsample.obj +jchuff.obj +jcphuff.obj & -+jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj +jfdctint.obj +jdapimin.obj & -+jdapistd.obj +jdtrans.obj +jdatasrc.obj +jdmaster.obj +jdinput.obj & -+jdmarker.obj +jdhuff.obj +jdphuff.obj +jdmainct.obj +jdcoefct.obj & -+jdpostct.obj +jddctmgr.obj +jidctfst.obj +jidctflt.obj +jidctint.obj & -+jidctred.obj +jdsample.obj +jdcolor.obj +jquant1.obj +jquant2.obj & -+jdmerge.obj +jcomapi.obj +jutils.obj +jerror.obj +jmemmgr.obj & -$(SYSDEPMEMLIB) -| - -cjpeg.exe: $(COBJECTS) libjpeg.lib - $(CC) $(LDFLAGS) -ecjpeg.exe $(COBJECTS) libjpeg.lib - -djpeg.exe: $(DOBJECTS) libjpeg.lib - $(CC) $(LDFLAGS) -edjpeg.exe $(DOBJECTS) libjpeg.lib - -jpegtran.exe: $(TROBJECTS) libjpeg.lib - $(CC) $(LDFLAGS) -ejpegtran.exe $(TROBJECTS) libjpeg.lib - -rdjpgcom.exe: rdjpgcom.c -!if $d(DOS) - $(CC) -ms -O rdjpgcom.c -!else - $(CC) $(CFLAGS) rdjpgcom.c -!endif - -# On DOS, wrjpgcom needs large model so it can malloc a 64K chunk -wrjpgcom.exe: wrjpgcom.c -!if $d(DOS) - $(CC) -ml -O wrjpgcom.c -!else - $(CC) $(CFLAGS) wrjpgcom.c -!endif - -# This "{}" syntax allows Borland Make to "batch" source files. -# In this way, each run of the compiler can build many modules. -.c.obj: - $(CC) $(CFLAGS) -c{ $<} - -jconfig.h: jconfig.doc - echo You must prepare a system-dependent jconfig.h file. - echo Please read the installation directions in install.doc. - exit 1 - -clean: - - del *.obj - - del libjpeg.lib - - del cjpeg.exe - - del djpeg.exe - - del jpegtran.exe - - del rdjpgcom.exe - - del wrjpgcom.exe - - del testout*.* - -test: cjpeg.exe djpeg.exe jpegtran.exe - - del testout*.* - djpeg -dct int -ppm -outfile testout.ppm testorig.jpg - djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg - cjpeg -dct int -outfile testout.jpg testimg.ppm - djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg - cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm - jpegtran -outfile testoutt.jpg testprog.jpg -!if $d(DOS) - fc /b testimg.ppm testout.ppm - fc /b testimg.bmp testout.bmp - fc /b testimg.jpg testout.jpg - fc /b testimg.ppm testoutp.ppm - fc /b testimgp.jpg testoutp.jpg - fc /b testorig.jpg testoutt.jpg -!else - echo n > n.tmp - comp testimg.ppm testout.ppm < n.tmp - comp testimg.bmp testout.bmp < n.tmp - comp testimg.jpg testout.jpg < n.tmp - comp testimg.ppm testoutp.ppm < n.tmp - comp testimgp.jpg testoutp.jpg < n.tmp - comp testorig.jpg testoutt.jpg < n.tmp - del n.tmp -!endif - - -jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h -cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -jmemdosa.obj: jmemdosa.asm - tasm /mx jmemdosa.asm diff --git a/gtkmm-osx/trunk/jpeg-6b/makefile.cfg b/gtkmm-osx/trunk/jpeg-6b/makefile.cfg deleted file mode 100644 index f25e42e..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/makefile.cfg +++ /dev/null @@ -1,319 +0,0 @@ -# Makefile for Independent JPEG Group's software - -# makefile.cfg is edited by configure to produce a custom Makefile. - -# Read installation instructions before saying "make" !! - -# For compiling with source and object files in different directories. -srcdir = @srcdir@ -VPATH = @srcdir@ - -# Where to install the programs and man pages. -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = $(exec_prefix)/bin -libdir = $(exec_prefix)/lib -includedir = $(prefix)/include -binprefix = -manprefix = -manext = 1 -mandir = $(prefix)/man/man$(manext) - -# The name of your C compiler: -CC= @CC@ - -# You may need to adjust these cc options: -CFLAGS= @CFLAGS@ @CPPFLAGS@ @INCLUDEFLAGS@ -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via -D switches here. -# However, any special defines for ansi2knr.c may be included here: -ANSI2KNRFLAGS= @ANSI2KNRFLAGS@ - -# Link-time cc options: -LDFLAGS= @LDFLAGS@ - -# To link any special libraries, add the necessary -l commands here. -LDLIBS= @LIBS@ - -# If using GNU libtool, LIBTOOL references it; if not, LIBTOOL is empty. -LIBTOOL = @LIBTOOL@ -# $(O) expands to "lo" if using libtool, plain "o" if not. -# Similarly, $(A) expands to "la" or "a". -O = @O@ -A = @A@ - -# Library version ID; libtool uses this for the shared library version number. -# Note: we suggest this match the macro of the same name in jpeglib.h. -JPEG_LIB_VERSION = @JPEG_LIB_VERSION@ - -# Put here the object file name for the correct system-dependent memory -# manager file. For Unix this is usually jmemnobs.o, but you may want -# to use jmemansi.o or jmemname.o if you have limited swap space. -SYSDEPMEM= @MEMORYMGR@ - -# miscellaneous OS-dependent stuff -SHELL= /bin/sh -# linker -LN= @LN@ -# file deletion command -RM= rm -f -# directory creation command -MKDIR= mkdir -# library (.a) file creation command -AR= ar rc -# second step in .a creation (use "touch" if not needed) -AR2= @RANLIB@ -# installation program -INSTALL= @INSTALL@ -INSTALL_PROGRAM= @INSTALL_PROGRAM@ -INSTALL_LIB= @INSTALL_LIB@ -INSTALL_DATA= @INSTALL_DATA@ - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ - jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ - jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ - jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ - jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ - jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ - jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ - jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ - coderules.doc filelist.doc change.log -MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ - makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ - makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh -OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm -TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ - testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jcomapi.$(O) jutils.$(O) jerror.$(O) jmemmgr.$(O) $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.$(O) jcapistd.$(O) jctrans.$(O) jcparam.$(O) \ - jdatadst.$(O) jcinit.$(O) jcmaster.$(O) jcmarker.$(O) jcmainct.$(O) \ - jcprepct.$(O) jccoefct.$(O) jccolor.$(O) jcsample.$(O) jchuff.$(O) \ - jcphuff.$(O) jcdctmgr.$(O) jfdctfst.$(O) jfdctflt.$(O) \ - jfdctint.$(O) -# decompression library object files -DLIBOBJECTS= jdapimin.$(O) jdapistd.$(O) jdtrans.$(O) jdatasrc.$(O) \ - jdmaster.$(O) jdinput.$(O) jdmarker.$(O) jdhuff.$(O) jdphuff.$(O) \ - jdmainct.$(O) jdcoefct.$(O) jdpostct.$(O) jddctmgr.$(O) \ - jidctfst.$(O) jidctflt.$(O) jidctint.$(O) jidctred.$(O) \ - jdsample.$(O) jdcolor.$(O) jquant1.$(O) jquant2.$(O) jdmerge.$(O) -# These objectfiles are included in libjpeg.a -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.$(O) rdppm.$(O) rdgif.$(O) rdtarga.$(O) rdrle.$(O) \ - rdbmp.$(O) rdswitch.$(O) cdjpeg.$(O) -DOBJECTS= djpeg.$(O) wrppm.$(O) wrgif.$(O) wrtarga.$(O) wrrle.$(O) \ - wrbmp.$(O) rdcolmap.$(O) cdjpeg.$(O) -TROBJECTS= jpegtran.$(O) rdswitch.$(O) cdjpeg.$(O) transupp.$(O) - - -all: @A2K_DEPS@ libjpeg.$(A) cjpeg djpeg jpegtran rdjpgcom wrjpgcom - -# Special compilation rules to support ansi2knr and libtool. -.SUFFIXES: .lo .la - -# How to compile with libtool. -@COM_LT@.c.lo: -@COM_LT@ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/$*.c - -# How to use ansi2knr, when not using libtool. -@COM_A2K@.c.o: -@COM_A2K@ ./ansi2knr $(srcdir)/$*.c knr/$*.c -@COM_A2K@ $(CC) $(CFLAGS) -c knr/$*.c -@COM_A2K@ $(RM) knr/$*.c - -# How to use ansi2knr AND libtool. -@COM_A2K@.c.lo: -@COM_A2K@ ./ansi2knr $(srcdir)/$*.c knr/$*.c -@COM_A2K@ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c knr/$*.c -@COM_A2K@ $(RM) knr/$*.c - -ansi2knr: ansi2knr.c - $(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr $(srcdir)/ansi2knr.c - $(MKDIR) knr - -# the library: - -# without libtool: -libjpeg.a: @A2K_DEPS@ $(LIBOBJECTS) - $(RM) libjpeg.a - $(AR) libjpeg.a $(LIBOBJECTS) - $(AR2) libjpeg.a - -# with libtool: -libjpeg.la: @A2K_DEPS@ $(LIBOBJECTS) - $(LIBTOOL) --mode=link $(CC) -o libjpeg.la $(LIBOBJECTS) \ - -rpath $(libdir) -version-info $(JPEG_LIB_VERSION) - -# sample programs: - -cjpeg: $(COBJECTS) libjpeg.$(A) - $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.$(A) $(LDLIBS) - -djpeg: $(DOBJECTS) libjpeg.$(A) - $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.$(A) $(LDLIBS) - -jpegtran: $(TROBJECTS) libjpeg.$(A) - $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.$(A) $(LDLIBS) - -rdjpgcom: rdjpgcom.$(O) - $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.$(O) $(LDLIBS) - -wrjpgcom: wrjpgcom.$(O) - $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.$(O) $(LDLIBS) - -# Installation rules: - -install: cjpeg djpeg jpegtran rdjpgcom wrjpgcom @FORCE_INSTALL_LIB@ - $(INSTALL_PROGRAM) cjpeg $(bindir)/$(binprefix)cjpeg - $(INSTALL_PROGRAM) djpeg $(bindir)/$(binprefix)djpeg - $(INSTALL_PROGRAM) jpegtran $(bindir)/$(binprefix)jpegtran - $(INSTALL_PROGRAM) rdjpgcom $(bindir)/$(binprefix)rdjpgcom - $(INSTALL_PROGRAM) wrjpgcom $(bindir)/$(binprefix)wrjpgcom - $(INSTALL_DATA) $(srcdir)/cjpeg.1 $(mandir)/$(manprefix)cjpeg.$(manext) - $(INSTALL_DATA) $(srcdir)/djpeg.1 $(mandir)/$(manprefix)djpeg.$(manext) - $(INSTALL_DATA) $(srcdir)/jpegtran.1 $(mandir)/$(manprefix)jpegtran.$(manext) - $(INSTALL_DATA) $(srcdir)/rdjpgcom.1 $(mandir)/$(manprefix)rdjpgcom.$(manext) - $(INSTALL_DATA) $(srcdir)/wrjpgcom.1 $(mandir)/$(manprefix)wrjpgcom.$(manext) - -install-lib: libjpeg.$(A) install-headers - $(INSTALL_LIB) libjpeg.$(A) $(libdir)/$(binprefix)libjpeg.$(A) - -install-headers: jconfig.h - $(INSTALL_DATA) jconfig.h $(includedir)/jconfig.h - $(INSTALL_DATA) $(srcdir)/jpeglib.h $(includedir)/jpeglib.h - $(INSTALL_DATA) $(srcdir)/jmorecfg.h $(includedir)/jmorecfg.h - $(INSTALL_DATA) $(srcdir)/jerror.h $(includedir)/jerror.h - -clean: - $(RM) *.o *.lo libjpeg.a libjpeg.la - $(RM) cjpeg djpeg jpegtran rdjpgcom wrjpgcom - $(RM) ansi2knr core testout* config.log config.status - $(RM) -r knr .libs _libs - -distclean: clean - $(RM) Makefile jconfig.h libtool config.cache - -test: cjpeg djpeg jpegtran - $(RM) testout* - ./djpeg -dct int -ppm -outfile testout.ppm $(srcdir)/testorig.jpg - ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testorig.jpg - ./cjpeg -dct int -outfile testout.jpg $(srcdir)/testimg.ppm - ./djpeg -dct int -ppm -outfile testoutp.ppm $(srcdir)/testprog.jpg - ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg $(srcdir)/testimg.ppm - ./jpegtran -outfile testoutt.jpg $(srcdir)/testprog.jpg - cmp $(srcdir)/testimg.ppm testout.ppm - cmp $(srcdir)/testimg.bmp testout.bmp - cmp $(srcdir)/testimg.jpg testout.jpg - cmp $(srcdir)/testimg.ppm testoutp.ppm - cmp $(srcdir)/testimgp.jpg testoutp.jpg - cmp $(srcdir)/testorig.jpg testoutt.jpg - -check: test - -# Mistake catcher: - -jconfig.h: jconfig.doc - echo You must prepare a system-dependent jconfig.h file. - echo Please read the installation directions in install.doc. - exit 1 - -# GNU Make likes to know which target names are not really files to be made: -.PHONY: all install install-lib install-headers clean distclean test check - - -jcapimin.$(O): jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.$(O): jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.$(O): jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.$(O): jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.$(O): jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.$(O): jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcinit.$(O): jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.$(O): jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.$(O): jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.$(O): jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.$(O): jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.$(O): jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcphuff.$(O): jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcprepct.$(O): jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.$(O): jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.$(O): jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.$(O): jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.$(O): jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.$(O): jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.$(O): jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.$(O): jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.$(O): jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.$(O): jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.$(O): jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdinput.$(O): jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.$(O): jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.$(O): jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.$(O): jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.$(O): jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdphuff.$(O): jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdpostct.$(O): jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.$(O): jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.$(O): jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.$(O): jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.$(O): jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.$(O): jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.$(O): jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.$(O): jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.$(O): jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.$(O): jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctred.$(O): jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.$(O): jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.$(O): jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.$(O): jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.$(O): jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.$(O): jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.$(O): jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.$(O): jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.$(O): jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.$(O): jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.$(O): cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.$(O): djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.$(O): jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.$(O): rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.$(O): wrjpgcom.c jinclude.h jconfig.h -cdjpeg.$(O): cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.$(O): rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.$(O): rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.$(O): transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.$(O): rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.$(O): wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.$(O): rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.$(O): wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.$(O): rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.$(O): wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.$(O): rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.$(O): wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.$(O): rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.$(O): wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/gtkmm-osx/trunk/jpeg-6b/makefile.dj b/gtkmm-osx/trunk/jpeg-6b/makefile.dj deleted file mode 100644 index f766d25..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/makefile.dj +++ /dev/null @@ -1,220 +0,0 @@ -# Makefile for Independent JPEG Group's software - -# This makefile is for DJGPP (Delorie's GNU C port on MS-DOS), v2.0 or later. -# Thanks to Frank J. Donahoe for this version. - -# Read installation instructions before saying "make" !! - -# The name of your C compiler: -CC= gcc - -# You may need to adjust these cc options: -CFLAGS= -O2 -Wall -I. -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via -D switches here. - -# Link-time cc options: -LDFLAGS= -s - -# To link any special libraries, add the necessary -l commands here. -LDLIBS= - -# Put here the object file name for the correct system-dependent memory -# manager file. For DJGPP this is usually jmemnobs.o, but you could -# use jmemname.o if you want to use named temp files instead of swap space. -SYSDEPMEM= jmemnobs.o - -# miscellaneous OS-dependent stuff -# linker -LN= $(CC) -# file deletion command -RM= del -# library (.a) file creation command -AR= ar rc -# second step in .a creation (use "touch" if not needed) -AR2= ranlib - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ - jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ - jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ - jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ - jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ - jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ - jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ - jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ - coderules.doc filelist.doc change.log -MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ - makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ - makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh -OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm -TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ - testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \ - jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \ - jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \ - jfdctint.o -# decompression library object files -DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \ - jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \ - jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \ - jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o -# These objectfiles are included in libjpeg.a -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ - cdjpeg.o -DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ - cdjpeg.o -TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o - - -all: libjpeg.a cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe - -libjpeg.a: $(LIBOBJECTS) - $(RM) libjpeg.a - $(AR) libjpeg.a $(LIBOBJECTS) - $(AR2) libjpeg.a - -cjpeg.exe: $(COBJECTS) libjpeg.a - $(LN) $(LDFLAGS) -o cjpeg.exe $(COBJECTS) libjpeg.a $(LDLIBS) - -djpeg.exe: $(DOBJECTS) libjpeg.a - $(LN) $(LDFLAGS) -o djpeg.exe $(DOBJECTS) libjpeg.a $(LDLIBS) - -jpegtran.exe: $(TROBJECTS) libjpeg.a - $(LN) $(LDFLAGS) -o jpegtran.exe $(TROBJECTS) libjpeg.a $(LDLIBS) - -rdjpgcom.exe: rdjpgcom.o - $(LN) $(LDFLAGS) -o rdjpgcom.exe rdjpgcom.o $(LDLIBS) - -wrjpgcom.exe: wrjpgcom.o - $(LN) $(LDFLAGS) -o wrjpgcom.exe wrjpgcom.o $(LDLIBS) - -jconfig.h: jconfig.doc - echo You must prepare a system-dependent jconfig.h file. - echo Please read the installation directions in install.doc. - exit 1 - -clean: - $(RM) *.o - $(RM) cjpeg.exe - $(RM) djpeg.exe - $(RM) jpegtran.exe - $(RM) rdjpgcom.exe - $(RM) wrjpgcom.exe - $(RM) libjpeg.a - $(RM) testout*.* - -test: cjpeg.exe djpeg.exe jpegtran.exe - $(RM) testout*.* - ./djpeg -dct int -ppm -outfile testout.ppm testorig.jpg - ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg - ./cjpeg -dct int -outfile testout.jpg testimg.ppm - ./djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg - ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm - ./jpegtran -outfile testoutt.jpg testprog.jpg - fc /b testimg.ppm testout.ppm - fc /b testimg.bmp testout.bmp - fc /b testimg.jpg testout.jpg - fc /b testimg.ppm testoutp.ppm - fc /b testimgp.jpg testoutp.jpg - fc /b testorig.jpg testoutt.jpg - - -jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h -cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/gtkmm-osx/trunk/jpeg-6b/makefile.manx b/gtkmm-osx/trunk/jpeg-6b/makefile.manx deleted file mode 100644 index 4cb42d1..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/makefile.manx +++ /dev/null @@ -1,214 +0,0 @@ -# Makefile for Independent JPEG Group's software - -# This makefile is for Amiga systems using Manx Aztec C ver 5.x. -# Thanks to D.J. James (djjames@cup.portal.com) for this version. - -# Read installation instructions before saying "make" !! - -# The name of your C compiler: -CC= cc - -# You may need to adjust these cc options: -# Uncomment for generic 68000 code (will work on any Amiga) -ARCHFLAGS= -sn - -# Uncomment for 68020/68030 code (faster, but won't run on 68000 CPU) -#ARCHFLAGS= -c2 - -CFLAGS= -MC -MD $(ARCHFLAGS) -spfam -r4 - -# Link-time cc options: -LDFLAGS= -g - -# To link any special libraries, add the necessary -l commands here. -LDLIBS= -lml -lcl - -# Put here the object file name for the correct system-dependent memory -# manager file. For Amiga we recommend jmemname.o. -SYSDEPMEM= jmemname.o - -# miscellaneous OS-dependent stuff -# linker -LN= ln -# file deletion command -RM= delete quiet -# library (.lib) file creation command -AR= lb - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ - jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ - jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ - jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ - jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ - jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ - jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ - jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ - coderules.doc filelist.doc change.log -MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ - makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ - makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh -OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm -TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ - testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \ - jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \ - jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \ - jfdctint.o -# decompression library object files -DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \ - jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \ - jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \ - jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o -# These objectfiles are included in libjpeg.lib -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ - cdjpeg.o -DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ - cdjpeg.o -TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o - - -all: libjpeg.lib cjpeg djpeg jpegtran rdjpgcom wrjpgcom - -libjpeg.lib: $(LIBOBJECTS) - -$(RM) libjpeg.lib - $(AR) libjpeg.lib $(LIBOBJECTS) - -cjpeg: $(COBJECTS) libjpeg.lib - $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.lib $(LDLIBS) - -djpeg: $(DOBJECTS) libjpeg.lib - $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.lib $(LDLIBS) - -jpegtran: $(TROBJECTS) libjpeg.lib - $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.lib $(LDLIBS) - -rdjpgcom: rdjpgcom.o - $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS) - -wrjpgcom: wrjpgcom.o - $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS) - -jconfig.h: jconfig.doc - echo You must prepare a system-dependent jconfig.h file. - echo Please read the installation directions in install.doc. - exit 1 - -clean: - -$(RM) *.o cjpeg djpeg jpegtran libjpeg.lib rdjpgcom wrjpgcom - -$(RM) core testout*.* - -test: cjpeg djpeg jpegtran - -$(RM) testout*.* - djpeg -dct int -ppm -outfile testout.ppm testorig.jpg - djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg - cjpeg -dct int -outfile testout.jpg testimg.ppm - djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg - cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm - jpegtran -outfile testoutt.jpg testprog.jpg - cmp testimg.ppm testout.ppm - cmp testimg.bmp testout.bmp - cmp testimg.jpg testout.jpg - cmp testimg.ppm testoutp.ppm - cmp testimgp.jpg testoutp.jpg - cmp testorig.jpg testoutt.jpg - - -jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h -cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/gtkmm-osx/trunk/jpeg-6b/makefile.mc6 b/gtkmm-osx/trunk/jpeg-6b/makefile.mc6 deleted file mode 100644 index 6aff054..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/makefile.mc6 +++ /dev/null @@ -1,249 +0,0 @@ -# Makefile for Independent JPEG Group's software - -# This makefile is for Microsoft C for MS-DOS, version 6.00A and up. -# Use NMAKE, not Microsoft's brain-damaged MAKE. -# Thanks to Alan Wright and Chris Turner of Olivetti Research Ltd. - -# Read installation instructions before saying "nmake" !! - -# You may need to adjust these compiler options: -CFLAGS = -AM -Oecigt -Gs -W3 -# -AM medium memory model (or use -AS for small model, if you remove features) -# -Oecigt -Gs maximum safe optimisation (-Ol has bugs in MSC 6.00A) -# -W3 warning level 3 -# You might also want to add -G2 if you have an 80286, etc. -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via -D switches here. - -# Jan-Herman Buining suggests the following switches for MS C 8.0 and a 486: -# CFLAGS = /AM /f- /FPi87 /G3 /Gs /Gy /Ob1 /Oc /Oe /Og /Oi /Ol /On /Oo /Ot \ -# /OV4 /W3 -# except for jquant1.c, which must be compiled with /Oo- to avoid a compiler -# crash. - -# Ingar Steinsland suggests the following switches when building -# a 16-bit Windows DLL: -# CFLAGS = -ALw -Gsw -Zpe -W3 -O2 -Zi -Zd - -# Put here the object file name for the correct system-dependent memory -# manager file. For DOS, we recommend jmemdos.c and jmemdosa.asm. -# (But not for Windows; see install.doc if you use this makefile for Windows.) -SYSDEPMEM= jmemdos.obj jmemdosa.obj -# SYSDEPMEMLIB must list the same files with "+" signs for the librarian. -SYSDEPMEMLIB= +jmemdos.obj +jmemdosa.obj - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ - jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ - jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ - jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ - jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ - jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ - jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ - jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ - coderules.doc filelist.doc change.log -MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ - makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ - makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh -OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm -TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ - testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \ - jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \ - jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \ - jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj -# decompression library object files -DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \ - jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \ - jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \ - jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \ - jquant1.obj jquant2.obj jdmerge.obj -# These objectfiles are included in libjpeg.lib -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \ - rdswitch.obj cdjpeg.obj -DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ - rdcolmap.obj cdjpeg.obj -TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj - -# need linker response file because file list > 128 chars -RFILE = libjpeg.ans - - -all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe - -libjpeg.lib: $(LIBOBJECTS) $(RFILE) - del libjpeg.lib - lib @$(RFILE) - -# linker response file for building libjpeg.lib -$(RFILE) : makefile - del $(RFILE) - echo libjpeg.lib >$(RFILE) -# silly want-to-create-it prompt: - echo y >>$(RFILE) - echo +jcapimin.obj +jcapistd.obj +jctrans.obj +jcparam.obj & >>$(RFILE) - echo +jdatadst.obj +jcinit.obj +jcmaster.obj +jcmarker.obj & >>$(RFILE) - echo +jcmainct.obj +jcprepct.obj +jccoefct.obj & >>$(RFILE) - echo +jccolor.obj +jcsample.obj +jchuff.obj +jcphuff.obj & >>$(RFILE) - echo +jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj & >>$(RFILE) - echo +jfdctint.obj +jdapimin.obj +jdapistd.obj & >>$(RFILE) - echo +jdtrans.obj +jdatasrc.obj +jdmaster.obj +jdinput.obj & >>$(RFILE) - echo +jdmarker.obj +jdhuff.obj +jdphuff.obj +jdmainct.obj & >>$(RFILE) - echo +jdcoefct.obj +jdpostct.obj +jddctmgr.obj & >>$(RFILE) - echo +jidctfst.obj +jidctflt.obj +jidctint.obj & >>$(RFILE) - echo +jidctred.obj +jdsample.obj +jdcolor.obj +jquant1.obj & >>$(RFILE) - echo +jquant2.obj +jdmerge.obj +jcomapi.obj +jutils.obj & >>$(RFILE) - echo +jerror.obj +jmemmgr.obj & >>$(RFILE) - echo $(SYSDEPMEMLIB) ; >>$(RFILE) - -cjpeg.exe: $(COBJECTS) libjpeg.lib - echo $(COBJECTS) >cjpeg.lst - link /STACK:4096 /EXEPACK @cjpeg.lst, cjpeg.exe, , libjpeg.lib, ; - del cjpeg.lst - -djpeg.exe: $(DOBJECTS) libjpeg.lib - echo $(DOBJECTS) >djpeg.lst - link /STACK:4096 /EXEPACK @djpeg.lst, djpeg.exe, , libjpeg.lib, ; - del djpeg.lst - -jpegtran.exe: $(TROBJECTS) libjpeg.lib - link /STACK:4096 /EXEPACK $(TROBJECTS), jpegtran.exe, , libjpeg.lib, ; - -rdjpgcom.exe: rdjpgcom.c - $(CC) -AS -O -W3 rdjpgcom.c - -# wrjpgcom needs large model so it can malloc a 64K chunk -wrjpgcom.exe: wrjpgcom.c - $(CC) -AL -O -W3 wrjpgcom.c - -jconfig.h: jconfig.doc - echo You must prepare a system-dependent jconfig.h file. - echo Please read the installation directions in install.doc. - exit 1 - -clean: - del *.obj - del libjpeg.lib - del cjpeg.exe - del djpeg.exe - del jpegtran.exe - del rdjpgcom.exe - del wrjpgcom.exe - del testout*.* - -test: cjpeg.exe djpeg.exe jpegtran.exe - del testout*.* - djpeg -dct int -ppm -outfile testout.ppm testorig.jpg - djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg - cjpeg -dct int -outfile testout.jpg testimg.ppm - djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg - cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm - jpegtran -outfile testoutt.jpg testprog.jpg - fc /b testimg.ppm testout.ppm - fc /b testimg.bmp testout.bmp - fc /b testimg.jpg testout.jpg - fc /b testimg.ppm testoutp.ppm - fc /b testimgp.jpg testoutp.jpg - fc /b testorig.jpg testoutt.jpg - - -jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h -cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -jmemdosa.obj : jmemdosa.asm - masm /mx $*; diff --git a/gtkmm-osx/trunk/jpeg-6b/makefile.mms b/gtkmm-osx/trunk/jpeg-6b/makefile.mms deleted file mode 100644 index cf130e5..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/makefile.mms +++ /dev/null @@ -1,218 +0,0 @@ -# Makefile for Independent JPEG Group's software - -# This makefile is for use with MMS on Digital VMS systems. -# Thanks to Rick Dyson (dyson@iowasp.physics.uiowa.edu) -# and Tim Bell (tbell@netcom.com) for their help. - -# Read installation instructions before saying "MMS" !! - -# You may need to adjust these cc options: -CFLAGS= $(CFLAGS) /NoDebug /Optimize -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via /Define switches here. -.ifdef ALPHA -OPT= -.else -OPT= ,Sys$Disk:[]MAKVMS.OPT/Option -.endif - -# Put here the object file name for the correct system-dependent memory -# manager file. For Unix this is usually jmemnobs.o, but you may want -# to use jmemansi.o or jmemname.o if you have limited swap space. -SYSDEPMEM= jmemnobs.obj - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ - jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ - jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ - jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ - jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ - jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ - jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ - jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ - coderules.doc filelist.doc change.log -MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ - makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ - makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh -OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm -TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ - testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \ - jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \ - jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \ - jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj -# decompression library object files -DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \ - jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \ - jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \ - jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \ - jquant1.obj jquant2.obj jdmerge.obj -# These objectfiles are included in libjpeg.olb -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \ - rdswitch.obj cdjpeg.obj -DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ - rdcolmap.obj cdjpeg.obj -TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj -# objectfile lists with commas --- what a crock -COBJLIST= cjpeg.obj,rdppm.obj,rdgif.obj,rdtarga.obj,rdrle.obj,rdbmp.obj,\ - rdswitch.obj,cdjpeg.obj -DOBJLIST= djpeg.obj,wrppm.obj,wrgif.obj,wrtarga.obj,wrrle.obj,wrbmp.obj,\ - rdcolmap.obj,cdjpeg.obj -TROBJLIST= jpegtran.obj,rdswitch.obj,cdjpeg.obj,transupp.obj -LIBOBJLIST= jcapimin.obj,jcapistd.obj,jctrans.obj,jcparam.obj,jdatadst.obj,\ - jcinit.obj,jcmaster.obj,jcmarker.obj,jcmainct.obj,jcprepct.obj,\ - jccoefct.obj,jccolor.obj,jcsample.obj,jchuff.obj,jcphuff.obj,\ - jcdctmgr.obj,jfdctfst.obj,jfdctflt.obj,jfdctint.obj,jdapimin.obj,\ - jdapistd.obj,jdtrans.obj,jdatasrc.obj,jdmaster.obj,jdinput.obj,\ - jdmarker.obj,jdhuff.obj,jdphuff.obj,jdmainct.obj,jdcoefct.obj,\ - jdpostct.obj,jddctmgr.obj,jidctfst.obj,jidctflt.obj,jidctint.obj,\ - jidctred.obj,jdsample.obj,jdcolor.obj,jquant1.obj,jquant2.obj,\ - jdmerge.obj,jcomapi.obj,jutils.obj,jerror.obj,jmemmgr.obj,$(SYSDEPMEM) - - -.first - @- Define /NoLog Sys Sys$Library - -ALL : libjpeg.olb cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe - @ Continue - -libjpeg.olb : $(LIBOBJECTS) - Library /Create libjpeg.olb $(LIBOBJLIST) - -cjpeg.exe : $(COBJECTS) libjpeg.olb - $(LINK) $(LFLAGS) /Executable = cjpeg.exe $(COBJLIST),libjpeg.olb/Library$(OPT) - -djpeg.exe : $(DOBJECTS) libjpeg.olb - $(LINK) $(LFLAGS) /Executable = djpeg.exe $(DOBJLIST),libjpeg.olb/Library$(OPT) - -jpegtran.exe : $(TROBJECTS) libjpeg.olb - $(LINK) $(LFLAGS) /Executable = jpegtran.exe $(TROBJLIST),libjpeg.olb/Library$(OPT) - -rdjpgcom.exe : rdjpgcom.obj - $(LINK) $(LFLAGS) /Executable = rdjpgcom.exe rdjpgcom.obj$(OPT) - -wrjpgcom.exe : wrjpgcom.obj - $(LINK) $(LFLAGS) /Executable = wrjpgcom.exe wrjpgcom.obj$(OPT) - -jconfig.h : jconfig.vms - @- Copy jconfig.vms jconfig.h - -clean : - @- Set Protection = Owner:RWED *.*;-1 - @- Set Protection = Owner:RWED *.OBJ - - Purge /NoLog /NoConfirm *.* - - Delete /NoLog /NoConfirm *.OBJ; - -test : cjpeg.exe djpeg.exe jpegtran.exe - mcr sys$disk:[]djpeg -dct int -ppm -outfile testout.ppm testorig.jpg - mcr sys$disk:[]djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg - mcr sys$disk:[]cjpeg -dct int -outfile testout.jpg testimg.ppm - mcr sys$disk:[]djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg - mcr sys$disk:[]cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm - mcr sys$disk:[]jpegtran -outfile testoutt.jpg testprog.jpg - - Backup /Compare/Log testimg.ppm testout.ppm - - Backup /Compare/Log testimg.bmp testout.bmp - - Backup /Compare/Log testimg.jpg testout.jpg - - Backup /Compare/Log testimg.ppm testoutp.ppm - - Backup /Compare/Log testimgp.jpg testoutp.jpg - - Backup /Compare/Log testorig.jpg testoutt.jpg - - -jcapimin.obj : jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.obj : jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.obj : jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.obj : jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.obj : jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.obj : jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcinit.obj : jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.obj : jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.obj : jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.obj : jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.obj : jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.obj : jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcphuff.obj : jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcprepct.obj : jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.obj : jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.obj : jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.obj : jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.obj : jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.obj : jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.obj : jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.obj : jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.obj : jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.obj : jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.obj : jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdinput.obj : jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.obj : jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.obj : jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.obj : jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.obj : jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdphuff.obj : jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdpostct.obj : jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.obj : jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.obj : jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.obj : jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.obj : jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.obj : jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.obj : jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.obj : jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.obj : jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.obj : jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctred.obj : jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.obj : jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.obj : jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.obj : jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.obj : jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.obj : jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.obj : jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.obj : jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.obj : jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.obj : jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.obj : cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.obj : djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.obj : jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.obj : rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.obj : wrjpgcom.c jinclude.h jconfig.h -cdjpeg.obj : cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.obj : rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.obj : rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.obj : transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.obj : rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.obj : wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.obj : rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.obj : wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.obj : rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.obj : wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.obj : rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.obj : wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.obj : rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.obj : wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/gtkmm-osx/trunk/jpeg-6b/makefile.sas b/gtkmm-osx/trunk/jpeg-6b/makefile.sas deleted file mode 100644 index f296faf..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/makefile.sas +++ /dev/null @@ -1,252 +0,0 @@ -# Makefile for Independent JPEG Group's software - -# This makefile is for Amiga systems using SAS C 6.0 and up. -# Thanks to Ed Hanway, Mark Rinfret, and Jim Zepeda. - -# Read installation instructions before saying "make" !! - -# The name of your C compiler: -CC= sc - -# You may need to adjust these cc options: -# Uncomment the following lines for generic 680x0 version -ARCHFLAGS= cpu=any -SUFFIX= - -# Uncomment the following lines for 68030-only version -#ARCHFLAGS= cpu=68030 -#SUFFIX=.030 - -CFLAGS= nostackcheck data=near parms=register optimize $(ARCHFLAGS) \ - ignore=104 ignore=304 ignore=306 -# ignore=104 disables warnings for mismatched const qualifiers -# ignore=304 disables warnings for variables being optimized out -# ignore=306 disables warnings for the inlining of functions -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via define switches here. - -# Link-time cc options: -LDFLAGS= SC SD ND BATCH - -# To link any special libraries, add the necessary commands here. -LDLIBS= LIB:scm.lib LIB:sc.lib - -# Put here the object file name for the correct system-dependent memory -# manager file. For Amiga we recommend jmemname.o. -SYSDEPMEM= jmemname.o - -# miscellaneous OS-dependent stuff -# linker -LN= slink -# file deletion command -RM= delete quiet -# library (.lib) file creation command -AR= oml - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ - jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ - jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ - jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ - jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ - jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ - jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ - jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ - coderules.doc filelist.doc change.log -MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ - makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ - makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh -OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm -TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ - testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \ - jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \ - jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \ - jfdctint.o -# decompression library object files -DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \ - jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \ - jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \ - jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o -# These objectfiles are included in libjpeg.lib -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ - cdjpeg.o -DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ - cdjpeg.o -TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o - - -all: libjpeg.lib cjpeg$(SUFFIX) djpeg$(SUFFIX) jpegtran$(SUFFIX) rdjpgcom$(SUFFIX) wrjpgcom$(SUFFIX) - -# note: do several AR steps to avoid command line length limitations - -libjpeg.lib: $(LIBOBJECTS) - -$(RM) libjpeg.lib - $(AR) libjpeg.lib r $(CLIBOBJECTS) - $(AR) libjpeg.lib r $(DLIBOBJECTS) - $(AR) libjpeg.lib r $(COMOBJECTS) - -cjpeg$(SUFFIX): $(COBJECTS) libjpeg.lib - $(LN) - -# You may want to adjust these compiler options: -CFLAGS= $(cflags) $(cdebug) $(cvars) -I. -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via -D switches here. - -# Link-time options: -LDFLAGS= $(ldebug) $(conlflags) - -# To link any special libraries, add the necessary commands here. -LDLIBS= $(conlibs) - -# Put here the object file name for the correct system-dependent memory -# manager file. For NT we suggest jmemnobs.obj, which expects the OS to -# provide adequate virtual memory. -SYSDEPMEM= jmemnobs.obj - -# miscellaneous OS-dependent stuff -# file deletion command -RM= del - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ - jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ - jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ - jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ - jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ - jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ - jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \ - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \ - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ - jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ - wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ - coderules.doc filelist.doc change.log -MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ - makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \ - makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \ - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \ - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \ - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \ - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh -OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm -TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \ - testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \ - jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \ - jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \ - jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj -# decompression library object files -DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \ - jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \ - jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \ - jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \ - jquant1.obj jquant2.obj jdmerge.obj -# These objectfiles are included in libjpeg.lib -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \ - rdswitch.obj cdjpeg.obj -DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ - rdcolmap.obj cdjpeg.obj -TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj - -# Template command for compiling .c to .obj -.c.obj: - $(cc) $(CFLAGS) $*.c - - -all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe - -libjpeg.lib: $(LIBOBJECTS) - $(RM) libjpeg.lib - lib -out:libjpeg.lib $(LIBOBJECTS) - -cjpeg.exe: $(COBJECTS) libjpeg.lib - $(link) $(LDFLAGS) -out:cjpeg.exe $(COBJECTS) libjpeg.lib $(LDLIBS) - -djpeg.exe: $(DOBJECTS) libjpeg.lib - $(link) $(LDFLAGS) -out:djpeg.exe $(DOBJECTS) libjpeg.lib $(LDLIBS) - -jpegtran.exe: $(TROBJECTS) libjpeg.lib - $(link) $(LDFLAGS) -out:jpegtran.exe $(TROBJECTS) libjpeg.lib $(LDLIBS) - -rdjpgcom.exe: rdjpgcom.obj - $(link) $(LDFLAGS) -out:rdjpgcom.exe rdjpgcom.obj $(LDLIBS) - -wrjpgcom.exe: wrjpgcom.obj - $(link) $(LDFLAGS) -out:wrjpgcom.exe wrjpgcom.obj $(LDLIBS) - - -clean: - $(RM) *.obj *.exe libjpeg.lib - $(RM) testout* - -test: cjpeg.exe djpeg.exe jpegtran.exe - $(RM) testout* - .\djpeg -dct int -ppm -outfile testout.ppm testorig.jpg - .\djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg - .\cjpeg -dct int -outfile testout.jpg testimg.ppm - .\djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg - .\cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm - .\jpegtran -outfile testoutt.jpg testprog.jpg - fc /b testimg.ppm testout.ppm - fc /b testimg.bmp testout.bmp - fc /b testimg.jpg testout.jpg - fc /b testimg.ppm testoutp.ppm - fc /b testimgp.jpg testoutp.jpg - fc /b testorig.jpg testoutt.jpg - - -jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h -cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/gtkmm-osx/trunk/jpeg-6b/makefile.vms b/gtkmm-osx/trunk/jpeg-6b/makefile.vms deleted file mode 100644 index a42358d..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/makefile.vms +++ /dev/null @@ -1,142 +0,0 @@ -$! Makefile for Independent JPEG Group's software -$! -$! This is a command procedure for Digital VMS systems that do not have MMS. -$! It builds the JPEG software by brute force, recompiling everything whether -$! or not it is necessary. It then runs the basic self-test. -$! Thanks to Rick Dyson (dyson@iowasp.physics.uiowa.edu) -$! and Tim Bell (tbell@netcom.com) for their help. -$! -$! Read installation instructions before running this!! -$! -$ If F$Mode () .eqs. "INTERACTIVE" -$ Then -$ VERIFY = F$Verify (0) -$ Else -$ VERIFY = F$Verify (1) -$ EndIf -$ On Control_Y Then GoTo End -$ On Error Then GoTo End -$ -$ If F$GetSyi ("HW_MODEL") .gt. 1023 -$ Then -$ OPT = "" -$ Else -$ OPT = ",Sys$Disk:[]makvms.opt/Option" -$ EndIf -$ -$ DoCompile := CC /NoDebug /Optimize /NoList -$! -$ DoCompile jcapimin.c -$ DoCompile jcapistd.c -$ DoCompile jctrans.c -$ DoCompile jcparam.c -$ DoCompile jdatadst.c -$ DoCompile jcinit.c -$ DoCompile jcmaster.c -$ DoCompile jcmarker.c -$ DoCompile jcmainct.c -$ DoCompile jcprepct.c -$ DoCompile jccoefct.c -$ DoCompile jccolor.c -$ DoCompile jcsample.c -$ DoCompile jchuff.c -$ DoCompile jcphuff.c -$ DoCompile jcdctmgr.c -$ DoCompile jfdctfst.c -$ DoCompile jfdctflt.c -$ DoCompile jfdctint.c -$ DoCompile jdapimin.c -$ DoCompile jdapistd.c -$ DoCompile jdtrans.c -$ DoCompile jdatasrc.c -$ DoCompile jdmaster.c -$ DoCompile jdinput.c -$ DoCompile jdmarker.c -$ DoCompile jdhuff.c -$ DoCompile jdphuff.c -$ DoCompile jdmainct.c -$ DoCompile jdcoefct.c -$ DoCompile jdpostct.c -$ DoCompile jddctmgr.c -$ DoCompile jidctfst.c -$ DoCompile jidctflt.c -$ DoCompile jidctint.c -$ DoCompile jidctred.c -$ DoCompile jdsample.c -$ DoCompile jdcolor.c -$ DoCompile jquant1.c -$ DoCompile jquant2.c -$ DoCompile jdmerge.c -$ DoCompile jcomapi.c -$ DoCompile jutils.c -$ DoCompile jerror.c -$ DoCompile jmemmgr.c -$ DoCompile jmemnobs.c -$! -$ Library /Create libjpeg.olb jcapimin.obj,jcapistd.obj,jctrans.obj, - - jcparam.obj,jdatadst.obj,jcinit.obj,jcmaster.obj,jcmarker.obj, - - jcmainct.obj,jcprepct.obj,jccoefct.obj,jccolor.obj,jcsample.obj, - - jchuff.obj,jcphuff.obj,jcdctmgr.obj,jfdctfst.obj,jfdctflt.obj, - - jfdctint.obj,jdapimin.obj,jdapistd.obj,jdtrans.obj,jdatasrc.obj, - - jdmaster.obj,jdinput.obj,jdmarker.obj,jdhuff.obj,jdphuff.obj, - - jdmainct.obj,jdcoefct.obj,jdpostct.obj,jddctmgr.obj,jidctfst.obj, - - jidctflt.obj,jidctint.obj,jidctred.obj,jdsample.obj,jdcolor.obj, - - jquant1.obj,jquant2.obj,jdmerge.obj,jcomapi.obj,jutils.obj, - - jerror.obj,jmemmgr.obj,jmemnobs.obj -$! -$ DoCompile cjpeg.c -$ DoCompile rdppm.c -$ DoCompile rdgif.c -$ DoCompile rdtarga.c -$ DoCompile rdrle.c -$ DoCompile rdbmp.c -$ DoCompile rdswitch.c -$ DoCompile cdjpeg.c -$! -$ Link /NoMap /Executable = cjpeg.exe cjpeg.obj,rdppm.obj,rdgif.obj, - - rdtarga.obj,rdrle.obj,rdbmp.obj,rdswitch.obj,cdjpeg.obj,libjpeg.olb/Library'OPT' -$! -$ DoCompile djpeg.c -$ DoCompile wrppm.c -$ DoCompile wrgif.c -$ DoCompile wrtarga.c -$ DoCompile wrrle.c -$ DoCompile wrbmp.c -$ DoCompile rdcolmap.c -$ DoCompile cdjpeg.c -$! -$ Link /NoMap /Executable = djpeg.exe djpeg.obj,wrppm.obj,wrgif.obj, - - wrtarga.obj,wrrle.obj,wrbmp.obj,rdcolmap.obj,cdjpeg.obj,libjpeg.olb/Library'OPT' -$! -$ DoCompile jpegtran.c -$ DoCompile rdswitch.c -$ DoCompile cdjpeg.c -$ DoCompile transupp.c -$! -$ Link /NoMap /Executable = jpegtran.exe jpegtran.obj,rdswitch.obj, - - cdjpeg.obj,transupp.obj,libjpeg.olb/Library'OPT' -$! -$ DoCompile rdjpgcom.c -$ Link /NoMap /Executable = rdjpgcom.exe rdjpgcom.obj'OPT' -$! -$ DoCompile wrjpgcom.c -$ Link /NoMap /Executable = wrjpgcom.exe wrjpgcom.obj'OPT' -$! -$! Run the self-test -$! -$ mcr sys$disk:[]djpeg -dct int -ppm -outfile testout.ppm testorig.jpg -$ mcr sys$disk:[]djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg -$ mcr sys$disk:[]cjpeg -dct int -outfile testout.jpg testimg.ppm -$ mcr sys$disk:[]djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg -$ mcr sys$disk:[]cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm -$ mcr sys$disk:[]jpegtran -outfile testoutt.jpg testprog.jpg -$ Backup /Compare/Log testimg.ppm testout.ppm -$ Backup /Compare/Log testimg.bmp testout.bmp -$ Backup /Compare/Log testimg.jpg testout.jpg -$ Backup /Compare/Log testimg.ppm testoutp.ppm -$ Backup /Compare/Log testimgp.jpg testoutp.jpg -$ Backup /Compare/Log testorig.jpg testoutt.jpg -$! -$End: -$ If Verify Then Set Verify -$ Exit diff --git a/gtkmm-osx/trunk/jpeg-6b/makefile.wat b/gtkmm-osx/trunk/jpeg-6b/makefile.wat deleted file mode 100644 index d953e46..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/makefile.wat +++ /dev/null @@ -1,233 +0,0 @@ -# Makefile for Independent JPEG Group's software - -# This makefile is suitable for Watcom C/C++ 10.0 on MS-DOS (using -# dos4g extender), OS/2, and Windows NT console mode. -# Thanks to Janos Haide, jhaide@btrvtech.com. - -# Read installation instructions before saying "wmake" !! - -# Uncomment line for desired system -SYSTEM=DOS -#SYSTEM=OS2 -#SYSTEM=NT - -# The name of your C compiler: -CC= wcl386 - -# You may need to adjust these cc options: -CFLAGS= -4r -ort -wx -zq -bt=$(SYSTEM) -# Caution: avoid -ol or -ox; these generate bad code with 10.0 or 10.0a. -# Generally, we recommend defining any configuration symbols in jconfig.h, -# NOT via -D switches here. - -# Link-time cc options: -!ifeq SYSTEM DOS -LDFLAGS= -zq -l=dos4g -!else ifeq SYSTEM OS2 -LDFLAGS= -zq -l=os2v2 -!else ifeq SYSTEM NT -LDFLAGS= -zq -l=nt -!endif - -# Put here the object file name for the correct system-dependent memory -# manager file. jmemnobs should work fine for dos4g or OS/2 environment. -SYSDEPMEM= jmemnobs.obj - -# End of configurable options. - - -# source files: JPEG library proper -LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c & - jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c & - jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c & - jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c & - jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c & - jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c & - jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c & - jquant2.c jutils.c jmemmgr.c -# memmgr back ends: compile only one of these into a working library -SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c -# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom -APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c & - rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c & - rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c -SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) -# files included by source files -INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h & - jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h -# documentation, test, and support files -DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 & - wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc & - coderules.doc filelist.doc change.log -MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc & - makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds & - makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st & - maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms & - makvms.opt -CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat & - jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas & - jconfig.vms -CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh -OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm -TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg & - testimgp.jpg -DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) & - $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES) -# library object files common to compression and decompression -COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) -# compression library object files -CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj & - jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj & - jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj & - jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj -# decompression library object files -DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj & - jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj & - jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj & - jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj & - jquant1.obj jquant2.obj jdmerge.obj -# These objectfiles are included in libjpeg.lib -LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) -# object files for sample applications (excluding library files) -COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj & - rdswitch.obj cdjpeg.obj -DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj & - rdcolmap.obj cdjpeg.obj -TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj - - -all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe - -libjpeg.lib: $(LIBOBJECTS) - - del libjpeg.lib - * wlib -n libjpeg.lib $(LIBOBJECTS) - -cjpeg.exe: $(COBJECTS) libjpeg.lib - $(CC) $(LDFLAGS) $(COBJECTS) libjpeg.lib - -djpeg.exe: $(DOBJECTS) libjpeg.lib - $(CC) $(LDFLAGS) $(DOBJECTS) libjpeg.lib - -jpegtran.exe: $(TROBJECTS) libjpeg.lib - $(CC) $(LDFLAGS) $(TROBJECTS) libjpeg.lib - -rdjpgcom.exe: rdjpgcom.c - $(CC) $(CFLAGS) $(LDFLAGS) rdjpgcom.c - -wrjpgcom.exe: wrjpgcom.c - $(CC) $(CFLAGS) $(LDFLAGS) wrjpgcom.c - -.c.obj: - $(CC) $(CFLAGS) -c $< - -jconfig.h: jconfig.doc - echo You must prepare a system-dependent jconfig.h file. - echo Please read the installation directions in install.doc. - exit 1 - -clean: .SYMBOLIC - - del *.obj - - del libjpeg.lib - - del cjpeg.exe - - del djpeg.exe - - del jpegtran.exe - - del rdjpgcom.exe - - del wrjpgcom.exe - - del testout*.* - -test: cjpeg.exe djpeg.exe jpegtran.exe .SYMBOLIC - - del testout*.* - djpeg -dct int -ppm -outfile testout.ppm testorig.jpg - djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg - cjpeg -dct int -outfile testout.jpg testimg.ppm - djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg - cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm - jpegtran -outfile testoutt.jpg testprog.jpg -!ifeq SYSTEM DOS - fc /b testimg.ppm testout.ppm - fc /b testimg.bmp testout.bmp - fc /b testimg.jpg testout.jpg - fc /b testimg.ppm testoutp.ppm - fc /b testimgp.jpg testoutp.jpg - fc /b testorig.jpg testoutt.jpg -!else - echo n > n.tmp - comp testimg.ppm testout.ppm < n.tmp - comp testimg.bmp testout.bmp < n.tmp - comp testimg.jpg testout.jpg < n.tmp - comp testimg.ppm testoutp.ppm < n.tmp - comp testimgp.jpg testoutp.jpg < n.tmp - comp testorig.jpg testoutt.jpg < n.tmp - del n.tmp -!endif - - -jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h -jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h -jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h -jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h -jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h -jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h -jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h -cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h -jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h -rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h -wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h -cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h -rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h -wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/gtkmm-osx/trunk/jpeg-6b/makelib.ds b/gtkmm-osx/trunk/jpeg-6b/makelib.ds deleted file mode 100644 index c7ad36d..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/makelib.ds +++ /dev/null @@ -1,1046 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -!IF "$(CFG)" == "" -CFG=jpeg - Win32 -!MESSAGE No configuration specified. Defaulting to jpeg - Win32. -!ENDIF - -!IF "$(CFG)" != "jpeg - Win32" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "jpeg.mak" CFG="jpeg - Win32" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "jpeg - Win32" (based on "Win32 (x86) Static Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -# PROP Target_Last_Scanned "jpeg - Win32" -CPP=cl.exe - -!IF "$(CFG)" == "jpeg - Win32" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "$(OUTDIR)\jpeg.lib" - -CLEAN : - -@erase "$(INTDIR)\jcapimin.obj" - -@erase "$(INTDIR)\jcapistd.obj" - -@erase "$(INTDIR)\jctrans.obj" - -@erase "$(INTDIR)\jcparam.obj" - -@erase "$(INTDIR)\jdatadst.obj" - -@erase "$(INTDIR)\jcinit.obj" - -@erase "$(INTDIR)\jcmaster.obj" - -@erase "$(INTDIR)\jcmarker.obj" - -@erase "$(INTDIR)\jcmainct.obj" - -@erase "$(INTDIR)\jcprepct.obj" - -@erase "$(INTDIR)\jccoefct.obj" - -@erase "$(INTDIR)\jccolor.obj" - -@erase "$(INTDIR)\jcsample.obj" - -@erase "$(INTDIR)\jchuff.obj" - -@erase "$(INTDIR)\jcphuff.obj" - -@erase "$(INTDIR)\jcdctmgr.obj" - -@erase "$(INTDIR)\jfdctfst.obj" - -@erase "$(INTDIR)\jfdctflt.obj" - -@erase "$(INTDIR)\jfdctint.obj" - -@erase "$(INTDIR)\jdapimin.obj" - -@erase "$(INTDIR)\jdapistd.obj" - -@erase "$(INTDIR)\jdtrans.obj" - -@erase "$(INTDIR)\jdatasrc.obj" - -@erase "$(INTDIR)\jdmaster.obj" - -@erase "$(INTDIR)\jdinput.obj" - -@erase "$(INTDIR)\jdmarker.obj" - -@erase "$(INTDIR)\jdhuff.obj" - -@erase "$(INTDIR)\jdphuff.obj" - -@erase "$(INTDIR)\jdmainct.obj" - -@erase "$(INTDIR)\jdcoefct.obj" - -@erase "$(INTDIR)\jdpostct.obj" - -@erase "$(INTDIR)\jddctmgr.obj" - -@erase "$(INTDIR)\jidctfst.obj" - -@erase "$(INTDIR)\jidctflt.obj" - -@erase "$(INTDIR)\jidctint.obj" - -@erase "$(INTDIR)\jidctred.obj" - -@erase "$(INTDIR)\jdsample.obj" - -@erase "$(INTDIR)\jdcolor.obj" - -@erase "$(INTDIR)\jquant1.obj" - -@erase "$(INTDIR)\jquant2.obj" - -@erase "$(INTDIR)\jdmerge.obj" - -@erase "$(INTDIR)\jcomapi.obj" - -@erase "$(INTDIR)\jutils.obj" - -@erase "$(INTDIR)\jerror.obj" - -@erase "$(INTDIR)\jmemmgr.obj" - -@erase "$(INTDIR)\jmemnobs.obj" - -@erase "$(OUTDIR)\jpeg.lib" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c -CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\ - /Fp"$(INTDIR)/jpeg.pch" /YX /Fo"$(INTDIR)/" /c -CPP_OBJS=.\Release/ -CPP_SBRS=.\. -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/jpeg.bsc" -BSC32_SBRS= \ - -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -LIB32_FLAGS=/nologo /out:"$(OUTDIR)/jpeg.lib" -LIB32_OBJS= \ - "$(INTDIR)\jcapimin.obj" \ - "$(INTDIR)\jcapistd.obj" \ - "$(INTDIR)\jctrans.obj" \ - "$(INTDIR)\jcparam.obj" \ - "$(INTDIR)\jdatadst.obj" \ - "$(INTDIR)\jcinit.obj" \ - "$(INTDIR)\jcmaster.obj" \ - "$(INTDIR)\jcmarker.obj" \ - "$(INTDIR)\jcmainct.obj" \ - "$(INTDIR)\jcprepct.obj" \ - "$(INTDIR)\jccoefct.obj" \ - "$(INTDIR)\jccolor.obj" \ - "$(INTDIR)\jcsample.obj" \ - "$(INTDIR)\jchuff.obj" \ - "$(INTDIR)\jcphuff.obj" \ - "$(INTDIR)\jcdctmgr.obj" \ - "$(INTDIR)\jfdctfst.obj" \ - "$(INTDIR)\jfdctflt.obj" \ - "$(INTDIR)\jfdctint.obj" \ - "$(INTDIR)\jdapimin.obj" \ - "$(INTDIR)\jdapistd.obj" \ - "$(INTDIR)\jdtrans.obj" \ - "$(INTDIR)\jdatasrc.obj" \ - "$(INTDIR)\jdmaster.obj" \ - "$(INTDIR)\jdinput.obj" \ - "$(INTDIR)\jdmarker.obj" \ - "$(INTDIR)\jdhuff.obj" \ - "$(INTDIR)\jdphuff.obj" \ - "$(INTDIR)\jdmainct.obj" \ - "$(INTDIR)\jdcoefct.obj" \ - "$(INTDIR)\jdpostct.obj" \ - "$(INTDIR)\jddctmgr.obj" \ - "$(INTDIR)\jidctfst.obj" \ - "$(INTDIR)\jidctflt.obj" \ - "$(INTDIR)\jidctint.obj" \ - "$(INTDIR)\jidctred.obj" \ - "$(INTDIR)\jdsample.obj" \ - "$(INTDIR)\jdcolor.obj" \ - "$(INTDIR)\jquant1.obj" \ - "$(INTDIR)\jquant2.obj" \ - "$(INTDIR)\jdmerge.obj" \ - "$(INTDIR)\jcomapi.obj" \ - "$(INTDIR)\jutils.obj" \ - "$(INTDIR)\jerror.obj" \ - "$(INTDIR)\jmemmgr.obj" \ - "$(INTDIR)\jmemnobs.obj" - -"$(OUTDIR)\jpeg.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS) - $(LIB32) @<< - $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) -<< - -!ENDIF - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "jpeg - Win32" - -!IF "$(CFG)" == "jpeg - Win32" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE="jcapimin.c" -DEP_CPP_JCAPI=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jcapimin.obj" : $(SOURCE) $(DEP_CPP_JCAPI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jcapistd.c" -DEP_CPP_JCAPIS=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jcapistd.obj" : $(SOURCE) $(DEP_CPP_JCAPIS) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jccoefct.c" -DEP_CPP_JCCOE=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jccoefct.obj" : $(SOURCE) $(DEP_CPP_JCCOE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jccolor.c" -DEP_CPP_JCCOL=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jccolor.obj" : $(SOURCE) $(DEP_CPP_JCCOL) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jcdctmgr.c" -DEP_CPP_JCDCT=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - "jdct.h"\ - - -"$(INTDIR)\jcdctmgr.obj" : $(SOURCE) $(DEP_CPP_JCDCT) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jchuff.c" -DEP_CPP_JCHUF=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - "jchuff.h"\ - - -"$(INTDIR)\jchuff.obj" : $(SOURCE) $(DEP_CPP_JCHUF) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jcinit.c" -DEP_CPP_JCINI=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jcinit.obj" : $(SOURCE) $(DEP_CPP_JCINI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jcmainct.c" -DEP_CPP_JCMAI=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jcmainct.obj" : $(SOURCE) $(DEP_CPP_JCMAI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jcmarker.c" -DEP_CPP_JCMAR=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jcmarker.obj" : $(SOURCE) $(DEP_CPP_JCMAR) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jcmaster.c" -DEP_CPP_JCMAS=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jcmaster.obj" : $(SOURCE) $(DEP_CPP_JCMAS) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jcomapi.c" -DEP_CPP_JCOMA=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jcomapi.obj" : $(SOURCE) $(DEP_CPP_JCOMA) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jcparam.c" -DEP_CPP_JCPAR=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jcparam.obj" : $(SOURCE) $(DEP_CPP_JCPAR) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jcphuff.c" -DEP_CPP_JCPHU=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - "jchuff.h"\ - - -"$(INTDIR)\jcphuff.obj" : $(SOURCE) $(DEP_CPP_JCPHU) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jcprepct.c" -DEP_CPP_JCPRE=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jcprepct.obj" : $(SOURCE) $(DEP_CPP_JCPRE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jcsample.c" -DEP_CPP_JCSAM=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jcsample.obj" : $(SOURCE) $(DEP_CPP_JCSAM) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jctrans.c" -DEP_CPP_JCTRA=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jctrans.obj" : $(SOURCE) $(DEP_CPP_JCTRA) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jdapimin.c" -DEP_CPP_JDAPI=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jdapimin.obj" : $(SOURCE) $(DEP_CPP_JDAPI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jdapistd.c" -DEP_CPP_JDAPIS=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jdapistd.obj" : $(SOURCE) $(DEP_CPP_JDAPIS) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jdatadst.c" -DEP_CPP_JDATA=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - - -"$(INTDIR)\jdatadst.obj" : $(SOURCE) $(DEP_CPP_JDATA) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jdatasrc.c" -DEP_CPP_JDATAS=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jerror.h"\ - - -"$(INTDIR)\jdatasrc.obj" : $(SOURCE) $(DEP_CPP_JDATAS) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jdcoefct.c" -DEP_CPP_JDCOE=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jdcoefct.obj" : $(SOURCE) $(DEP_CPP_JDCOE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jdcolor.c" -DEP_CPP_JDCOL=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jdcolor.obj" : $(SOURCE) $(DEP_CPP_JDCOL) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jddctmgr.c" -DEP_CPP_JDDCT=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - "jdct.h"\ - - -"$(INTDIR)\jddctmgr.obj" : $(SOURCE) $(DEP_CPP_JDDCT) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jdhuff.c" -DEP_CPP_JDHUF=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - "jdhuff.h"\ - - -"$(INTDIR)\jdhuff.obj" : $(SOURCE) $(DEP_CPP_JDHUF) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jdinput.c" -DEP_CPP_JDINP=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jdinput.obj" : $(SOURCE) $(DEP_CPP_JDINP) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jdmainct.c" -DEP_CPP_JDMAI=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jdmainct.obj" : $(SOURCE) $(DEP_CPP_JDMAI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jdmarker.c" -DEP_CPP_JDMAR=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jdmarker.obj" : $(SOURCE) $(DEP_CPP_JDMAR) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jdmaster.c" -DEP_CPP_JDMAS=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jdmaster.obj" : $(SOURCE) $(DEP_CPP_JDMAS) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jdmerge.c" -DEP_CPP_JDMER=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jdmerge.obj" : $(SOURCE) $(DEP_CPP_JDMER) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jdphuff.c" -DEP_CPP_JDPHU=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - "jdhuff.h"\ - - -"$(INTDIR)\jdphuff.obj" : $(SOURCE) $(DEP_CPP_JDPHU) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jdpostct.c" -DEP_CPP_JDPOS=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jdpostct.obj" : $(SOURCE) $(DEP_CPP_JDPOS) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jdsample.c" -DEP_CPP_JDSAM=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jdsample.obj" : $(SOURCE) $(DEP_CPP_JDSAM) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jdtrans.c" -DEP_CPP_JDTRA=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jdtrans.obj" : $(SOURCE) $(DEP_CPP_JDTRA) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jerror.c" -DEP_CPP_JERRO=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jversion.h"\ - "jerror.h"\ - - -"$(INTDIR)\jerror.obj" : $(SOURCE) $(DEP_CPP_JERRO) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jfdctflt.c" -DEP_CPP_JFDCT=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - "jdct.h"\ - - -"$(INTDIR)\jfdctflt.obj" : $(SOURCE) $(DEP_CPP_JFDCT) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jfdctfst.c" -DEP_CPP_JFDCTF=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - "jdct.h"\ - - -"$(INTDIR)\jfdctfst.obj" : $(SOURCE) $(DEP_CPP_JFDCTF) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jfdctint.c" -DEP_CPP_JFDCTI=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - "jdct.h"\ - - -"$(INTDIR)\jfdctint.obj" : $(SOURCE) $(DEP_CPP_JFDCTI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jidctflt.c" -DEP_CPP_JIDCT=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - "jdct.h"\ - - -"$(INTDIR)\jidctflt.obj" : $(SOURCE) $(DEP_CPP_JIDCT) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jidctfst.c" -DEP_CPP_JIDCTF=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - "jdct.h"\ - - -"$(INTDIR)\jidctfst.obj" : $(SOURCE) $(DEP_CPP_JIDCTF) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jidctint.c" -DEP_CPP_JIDCTI=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - "jdct.h"\ - - -"$(INTDIR)\jidctint.obj" : $(SOURCE) $(DEP_CPP_JIDCTI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jidctred.c" -DEP_CPP_JIDCTR=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - "jdct.h"\ - - -"$(INTDIR)\jidctred.obj" : $(SOURCE) $(DEP_CPP_JIDCTR) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jquant1.c" -DEP_CPP_JQUAN=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jquant1.obj" : $(SOURCE) $(DEP_CPP_JQUAN) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jquant2.c" -DEP_CPP_JQUANT=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jquant2.obj" : $(SOURCE) $(DEP_CPP_JQUANT) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jutils.c" -DEP_CPP_JUTIL=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - - -"$(INTDIR)\jutils.obj" : $(SOURCE) $(DEP_CPP_JUTIL) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jmemmgr.c" -DEP_CPP_JMEMM=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - "jmemsys.h"\ - - -"$(INTDIR)\jmemmgr.obj" : $(SOURCE) $(DEP_CPP_JMEMM) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE="jmemnobs.c" -DEP_CPP_JMEMN=\ - "jinclude.h"\ - "jconfig.h"\ - "jpeglib.h"\ - "jmorecfg.h"\ - "jpegint.h"\ - "jerror.h"\ - "jmemsys.h"\ - - -"$(INTDIR)\jmemnobs.obj" : $(SOURCE) $(DEP_CPP_JMEMN) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -# End Source File -# End Target -# End Project -################################################################################ - diff --git a/gtkmm-osx/trunk/jpeg-6b/makeproj.mac b/gtkmm-osx/trunk/jpeg-6b/makeproj.mac deleted file mode 100644 index ed277c8..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/makeproj.mac +++ /dev/null @@ -1,213 +0,0 @@ --- --- makeproj.mac --- --- This AppleScript builds Code Warrior PRO Release 2 project files for the --- libjpeg library as well as the test programs 'cjpeg', 'djpeg', 'jpegtran'. --- (We'd distribute real project files, except they're not text --- and would create maintenance headaches.) --- --- The script then compiles and links the library and the test programs. --- NOTE: if you haven't already created a 'jconfig.h' file, the script --- automatically copies 'jconfig.mac' to 'jconfig.h'. --- --- To use this script, you must have AppleScript 1.1 or later installed --- and a suitable AppleScript editor like Script Editor or Script Debugger --- (http://www.latenightsw.com). Open this file with your AppleScript --- editor and execute the "run" command to build the projects. --- --- Thanks to Dan Sears and Don Agro for this script. --- Questions about this script can be addressed to dogpark@interlog.com --- - -on run - - choose folder with prompt ">>> Select IJG source folder <<<" - set ijg_folder to result - - choose folder with prompt ">>> Select MetroWerks folder <<<" - set cw_folder to result - - -- if jconfig.h doesn't already exist, copy jconfig.mac - - tell application "Finder" - if not (exists file "jconfig.h" of ijg_folder) then - duplicate {file "jconfig.mac" of folder ijg_folder} - select file "jconfig.mac copy" of folder ijg_folder - set name of selection to "jconfig.h" - end if - end tell - - tell application "CodeWarrior IDE 2.1" - with timeout of 10000 seconds - - -- create libjpeg project - - activate - Create Project (ijg_folder as string) & "libjpeg.proj" - Set Preferences of panel "Target Settings" to {Target Name:"libjpeg"} - Set Preferences of panel "PPC Project" to {File Name:"libjpeg"} - Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"} - Set Preferences of panel "PPC Project" to {Project Type:library} - Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true} - Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true} - Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC} - Set Preferences of panel "PPC Linker" to {Generate SYM File:false} - - Add Files (ijg_folder as string) & "jcapimin.c" To Segment 1 - Add Files (ijg_folder as string) & "jcapistd.c" To Segment 1 - Add Files (ijg_folder as string) & "jctrans.c" To Segment 1 - Add Files (ijg_folder as string) & "jcparam.c" To Segment 1 - Add Files (ijg_folder as string) & "jdatadst.c" To Segment 1 - Add Files (ijg_folder as string) & "jcinit.c" To Segment 1 - Add Files (ijg_folder as string) & "jcmaster.c" To Segment 1 - Add Files (ijg_folder as string) & "jcmarker.c" To Segment 1 - Add Files (ijg_folder as string) & "jcmainct.c" To Segment 1 - Add Files (ijg_folder as string) & "jcprepct.c" To Segment 1 - Add Files (ijg_folder as string) & "jccoefct.c" To Segment 1 - Add Files (ijg_folder as string) & "jccolor.c" To Segment 1 - Add Files (ijg_folder as string) & "jcsample.c" To Segment 1 - Add Files (ijg_folder as string) & "jchuff.c" To Segment 1 - Add Files (ijg_folder as string) & "jcphuff.c" To Segment 1 - Add Files (ijg_folder as string) & "jcdctmgr.c" To Segment 1 - Add Files (ijg_folder as string) & "jfdctfst.c" To Segment 1 - Add Files (ijg_folder as string) & "jfdctflt.c" To Segment 1 - Add Files (ijg_folder as string) & "jfdctint.c" To Segment 1 - Add Files (ijg_folder as string) & "jdapimin.c" To Segment 1 - Add Files (ijg_folder as string) & "jdapistd.c" To Segment 1 - Add Files (ijg_folder as string) & "jdtrans.c" To Segment 1 - Add Files (ijg_folder as string) & "jdatasrc.c" To Segment 1 - Add Files (ijg_folder as string) & "jdmaster.c" To Segment 1 - Add Files (ijg_folder as string) & "jdinput.c" To Segment 1 - Add Files (ijg_folder as string) & "jdmarker.c" To Segment 1 - Add Files (ijg_folder as string) & "jdhuff.c" To Segment 1 - Add Files (ijg_folder as string) & "jdphuff.c" To Segment 1 - Add Files (ijg_folder as string) & "jdmainct.c" To Segment 1 - Add Files (ijg_folder as string) & "jdcoefct.c" To Segment 1 - Add Files (ijg_folder as string) & "jdpostct.c" To Segment 1 - Add Files (ijg_folder as string) & "jddctmgr.c" To Segment 1 - Add Files (ijg_folder as string) & "jidctfst.c" To Segment 1 - Add Files (ijg_folder as string) & "jidctflt.c" To Segment 1 - Add Files (ijg_folder as string) & "jidctint.c" To Segment 1 - Add Files (ijg_folder as string) & "jidctred.c" To Segment 1 - Add Files (ijg_folder as string) & "jdsample.c" To Segment 1 - Add Files (ijg_folder as string) & "jdcolor.c" To Segment 1 - Add Files (ijg_folder as string) & "jquant1.c" To Segment 1 - Add Files (ijg_folder as string) & "jquant2.c" To Segment 1 - Add Files (ijg_folder as string) & "jdmerge.c" To Segment 1 - Add Files (ijg_folder as string) & "jcomapi.c" To Segment 1 - Add Files (ijg_folder as string) & "jutils.c" To Segment 1 - Add Files (ijg_folder as string) & "jerror.c" To Segment 1 - Add Files (ijg_folder as string) & "jmemmgr.c" To Segment 1 - Add Files (ijg_folder as string) & "jmemmac.c" To Segment 1 - - -- compile and link the library - - Make Project - Close Project - - -- create cjpeg project - - activate - Create Project (ijg_folder as string) & "cjpeg.proj" - Set Preferences of panel "Target Settings" to {Target Name:"cjpeg"} - Set Preferences of panel "PPC Project" to {File Name:"cjpeg"} - Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"} - Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true} - Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true} - Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC} - Set Preferences of panel "PPC Linker" to {Generate SYM File:false} - - Add Files (ijg_folder as string) & "cjpeg.c" To Segment 1 - Add Files (ijg_folder as string) & "rdppm.c" To Segment 1 - Add Files (ijg_folder as string) & "rdgif.c" To Segment 1 - Add Files (ijg_folder as string) & "rdtarga.c" To Segment 1 - Add Files (ijg_folder as string) & "rdrle.c" To Segment 1 - Add Files (ijg_folder as string) & "rdbmp.c" To Segment 1 - Add Files (ijg_folder as string) & "rdswitch.c" To Segment 1 - Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1 - - Add Files (ijg_folder as string) & "libjpeg" To Segment 2 - - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3 - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3 - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3 - - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4 - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4 - - -- compile and link cjpeg - - Make Project - Close Project - - -- create djpeg project - - activate - Create Project (ijg_folder as string) & "djpeg.proj" - Set Preferences of panel "Target Settings" to {Target Name:"djpeg"} - Set Preferences of panel "PPC Project" to {File Name:"djpeg"} - Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"} - Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true} - Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true} - Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC} - Set Preferences of panel "PPC Linker" to {Generate SYM File:false} - - Add Files (ijg_folder as string) & "djpeg.c" To Segment 1 - Add Files (ijg_folder as string) & "wrppm.c" To Segment 1 - Add Files (ijg_folder as string) & "wrgif.c" To Segment 1 - Add Files (ijg_folder as string) & "wrtarga.c" To Segment 1 - Add Files (ijg_folder as string) & "wrrle.c" To Segment 1 - Add Files (ijg_folder as string) & "wrbmp.c" To Segment 1 - Add Files (ijg_folder as string) & "rdcolmap.c" To Segment 1 - Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1 - - Add Files (ijg_folder as string) & "libjpeg" To Segment 2 - - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3 - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3 - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3 - - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4 - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4 - - -- compile and link djpeg - - Make Project - Close Project - - -- create jpegtran project - - activate - Create Project (ijg_folder as string) & "jpegtran.proj" - Set Preferences of panel "Target Settings" to {Target Name:"jpegtran"} - Set Preferences of panel "PPC Project" to {File Name:"jpegtran"} - Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"} - Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true} - Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true} - Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC} - Set Preferences of panel "PPC Linker" to {Generate SYM File:false} - - Add Files (ijg_folder as string) & "jpegtran.c" To Segment 1 - Add Files (ijg_folder as string) & "rdswitch.c" To Segment 1 - Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1 - Add Files (ijg_folder as string) & "transupp.c" To Segment 1 - - Add Files (ijg_folder as string) & "libjpeg" To Segment 2 - - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3 - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3 - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3 - - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4 - Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4 - - -- compile and link jpegtran - - Make Project - Close Project - - quit - - end timeout - end tell -end run diff --git a/gtkmm-osx/trunk/jpeg-6b/makljpeg.st b/gtkmm-osx/trunk/jpeg-6b/makljpeg.st deleted file mode 100644 index 813493e..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/makljpeg.st +++ /dev/null @@ -1,70 +0,0 @@ -; Project file for Independent JPEG Group's software -; -; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. -; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de), -; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de), -; and Guido Vollbeding (guivol@esc.de). -; -; To use this file, rename it to libjpeg.prj. -; Read installation instructions before trying to make the program! -; -; -; * * * Output file * * * -libjpeg.lib -; -; * * * COMPILER OPTIONS * * * -.C[-P] ; absolute calls -.C[-M] ; and no string merging, folks -.C[-w-cln] ; no "constant is long" warnings -.C[-w-par] ; no "parameter xxxx unused" -.C[-w-rch] ; no "unreachable code" -.C[-wsig] ; warn if significant digits may be lost -.L[-J] ; link new Obj-format (so we get a library) -= -; * * * * List of modules * * * * -jcapimin.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcapistd.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jccoefct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jccolor.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcdctmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) -jchuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jchuff.h) -jcinit.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcmainct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcmarker.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcmaster.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcomapi.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcparam.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcphuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jchuff.h) -jcprepct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jcsample.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jctrans.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdapimin.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdapistd.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdatadst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h) -jdatasrc.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h) -jdcoefct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdcolor.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jddctmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) -jdhuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdhuff.h) -jdinput.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdmainct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdmarker.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdmaster.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdmerge.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdphuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdhuff.h) -jdpostct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdsample.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jdtrans.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jerror.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jversion.h,jerror.h) -jfdctflt.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) -jfdctfst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) -jfdctint.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) -jidctflt.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) -jidctfst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) -jidctint.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) -jidctred.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) -jquant1.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jquant2.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jutils.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) -jmemmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jmemsys.h) -jmemansi.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jmemsys.h) diff --git a/gtkmm-osx/trunk/jpeg-6b/maktjpeg.st b/gtkmm-osx/trunk/jpeg-6b/maktjpeg.st deleted file mode 100644 index 31f4d16..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/maktjpeg.st +++ /dev/null @@ -1,32 +0,0 @@ -; Project file for Independent JPEG Group's software -; -; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. -; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de), -; Dr. B. Setzepfandt (bernd@gina.uni-muenster.de), -; and Guido Vollbeding (guivol@esc.de). -; -; To use this file, rename it to jpegtran.prj. -; If you are using Turbo C, change filenames beginning with "pc..." to "tc..." -; Read installation instructions before trying to make the program! -; -; -; * * * Output file * * * -jpegtran.ttp -; -; * * * COMPILER OPTIONS * * * -.C[-P] ; absolute calls -.C[-M] ; and no string merging, folks -.C[-w-cln] ; no "constant is long" warnings -.C[-w-par] ; no "parameter xxxx unused" -.C[-w-rch] ; no "unreachable code" -.C[-wsig] ; warn if significant digits may be lost -= -; * * * * List of modules * * * * -pcstart.o -jpegtran.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,transupp.h,jversion.h) -cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) -transupp.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,transupp.h) -libjpeg.lib ; built by libjpeg.prj -pcstdlib.lib ; standard library -pcextlib.lib ; extended library diff --git a/gtkmm-osx/trunk/jpeg-6b/makvms.opt b/gtkmm-osx/trunk/jpeg-6b/makvms.opt deleted file mode 100644 index 675e8fe..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/makvms.opt +++ /dev/null @@ -1,4 +0,0 @@ -! A pointer to the VAX/VMS C Run-Time Shareable Library. -! This file is needed by makefile.mms and makefile.vms, -! but only for the older VAX C compiler. DEC C does not need it. -Sys$Library:VAXCRTL.EXE /Share diff --git a/gtkmm-osx/trunk/jpeg-6b/rdbmp.c b/gtkmm-osx/trunk/jpeg-6b/rdbmp.c deleted file mode 100644 index b05fe2a..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/rdbmp.c +++ /dev/null @@ -1,439 +0,0 @@ -/* - * rdbmp.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to read input images in Microsoft "BMP" - * format (MS Windows 3.x, OS/2 1.x, and OS/2 2.x flavors). - * Currently, only 8-bit and 24-bit images are supported, not 1-bit or - * 4-bit (feeding such low-depth images into JPEG would be silly anyway). - * Also, we don't support RLE-compressed files. - * - * These routines may need modification for non-Unix environments or - * specialized applications. As they stand, they assume input from - * an ordinary stdio stream. They further assume that reading begins - * at the start of the file; start_input may need work if the - * user interface has already read some data (e.g., to determine that - * the file is indeed BMP format). - * - * This code contributed by James Arthur Boucher. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef BMP_SUPPORTED - - -/* Macros to deal with unsigned chars as efficiently as compiler allows */ - -#ifdef HAVE_UNSIGNED_CHAR -typedef unsigned char U_CHAR; -#define UCH(x) ((int) (x)) -#else /* !HAVE_UNSIGNED_CHAR */ -#ifdef CHAR_IS_UNSIGNED -typedef char U_CHAR; -#define UCH(x) ((int) (x)) -#else -typedef char U_CHAR; -#define UCH(x) ((int) (x) & 0xFF) -#endif -#endif /* HAVE_UNSIGNED_CHAR */ - - -#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len))) - - -/* Private version of data source object */ - -typedef struct _bmp_source_struct * bmp_source_ptr; - -typedef struct _bmp_source_struct { - struct cjpeg_source_struct pub; /* public fields */ - - j_compress_ptr cinfo; /* back link saves passing separate parm */ - - JSAMPARRAY colormap; /* BMP colormap (converted to my format) */ - - jvirt_sarray_ptr whole_image; /* Needed to reverse row order */ - JDIMENSION source_row; /* Current source row number */ - JDIMENSION row_width; /* Physical width of scanlines in file */ - - int bits_per_pixel; /* remembers 8- or 24-bit format */ -} bmp_source_struct; - - -LOCAL(int) -read_byte (bmp_source_ptr sinfo) -/* Read next byte from BMP file */ -{ - register FILE *infile = sinfo->pub.input_file; - register int c; - - if ((c = getc(infile)) == EOF) - ERREXIT(sinfo->cinfo, JERR_INPUT_EOF); - return c; -} - - -LOCAL(void) -read_colormap (bmp_source_ptr sinfo, int cmaplen, int mapentrysize) -/* Read the colormap from a BMP file */ -{ - int i; - - switch (mapentrysize) { - case 3: - /* BGR format (occurs in OS/2 files) */ - for (i = 0; i < cmaplen; i++) { - sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo); - sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo); - sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo); - } - break; - case 4: - /* BGR0 format (occurs in MS Windows files) */ - for (i = 0; i < cmaplen; i++) { - sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo); - sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo); - sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo); - (void) read_byte(sinfo); - } - break; - default: - ERREXIT(sinfo->cinfo, JERR_BMP_BADCMAP); - break; - } -} - - -/* - * Read one row of pixels. - * The image has been read into the whole_image array, but is otherwise - * unprocessed. We must read it out in top-to-bottom row order, and if - * it is an 8-bit image, we must expand colormapped pixels to 24bit format. - */ - -METHODDEF(JDIMENSION) -get_8bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading 8-bit colormap indexes */ -{ - bmp_source_ptr source = (bmp_source_ptr) sinfo; - register JSAMPARRAY colormap = source->colormap; - JSAMPARRAY image_ptr; - register int t; - register JSAMPROW inptr, outptr; - register JDIMENSION col; - - /* Fetch next row from virtual array */ - source->source_row--; - image_ptr = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, source->whole_image, - source->source_row, (JDIMENSION) 1, FALSE); - - /* Expand the colormap indexes to real data */ - inptr = image_ptr[0]; - outptr = source->pub.buffer[0]; - for (col = cinfo->image_width; col > 0; col--) { - t = GETJSAMPLE(*inptr++); - *outptr++ = colormap[0][t]; /* can omit GETJSAMPLE() safely */ - *outptr++ = colormap[1][t]; - *outptr++ = colormap[2][t]; - } - - return 1; -} - - -METHODDEF(JDIMENSION) -get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading 24-bit pixels */ -{ - bmp_source_ptr source = (bmp_source_ptr) sinfo; - JSAMPARRAY image_ptr; - register JSAMPROW inptr, outptr; - register JDIMENSION col; - - /* Fetch next row from virtual array */ - source->source_row--; - image_ptr = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, source->whole_image, - source->source_row, (JDIMENSION) 1, FALSE); - - /* Transfer data. Note source values are in BGR order - * (even though Microsoft's own documents say the opposite). - */ - inptr = image_ptr[0]; - outptr = source->pub.buffer[0]; - for (col = cinfo->image_width; col > 0; col--) { - outptr[2] = *inptr++; /* can omit GETJSAMPLE() safely */ - outptr[1] = *inptr++; - outptr[0] = *inptr++; - outptr += 3; - } - - return 1; -} - - -/* - * This method loads the image into whole_image during the first call on - * get_pixel_rows. The get_pixel_rows pointer is then adjusted to call - * get_8bit_row or get_24bit_row on subsequent calls. - */ - -METHODDEF(JDIMENSION) -preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - bmp_source_ptr source = (bmp_source_ptr) sinfo; - register FILE *infile = source->pub.input_file; - register int c; - register JSAMPROW out_ptr; - JSAMPARRAY image_ptr; - JDIMENSION row, col; - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; - - /* Read the data into a virtual array in input-file row order. */ - for (row = 0; row < cinfo->image_height; row++) { - if (progress != NULL) { - progress->pub.pass_counter = (long) row; - progress->pub.pass_limit = (long) cinfo->image_height; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } - image_ptr = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, source->whole_image, - row, (JDIMENSION) 1, TRUE); - out_ptr = image_ptr[0]; - for (col = source->row_width; col > 0; col--) { - /* inline copy of read_byte() for speed */ - if ((c = getc(infile)) == EOF) - ERREXIT(cinfo, JERR_INPUT_EOF); - *out_ptr++ = (JSAMPLE) c; - } - } - if (progress != NULL) - progress->completed_extra_passes++; - - /* Set up to read from the virtual array in top-to-bottom order */ - switch (source->bits_per_pixel) { - case 8: - source->pub.get_pixel_rows = get_8bit_row; - break; - case 24: - source->pub.get_pixel_rows = get_24bit_row; - break; - default: - ERREXIT(cinfo, JERR_BMP_BADDEPTH); - } - source->source_row = cinfo->image_height; - - /* And read the first row */ - return (*source->pub.get_pixel_rows) (cinfo, sinfo); -} - - -/* - * Read the file header; return image size and component count. - */ - -METHODDEF(void) -start_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - bmp_source_ptr source = (bmp_source_ptr) sinfo; - U_CHAR bmpfileheader[14]; - U_CHAR bmpinfoheader[64]; -#define GET_2B(array,offset) ((unsigned int) UCH(array[offset]) + \ - (((unsigned int) UCH(array[offset+1])) << 8)) -#define GET_4B(array,offset) ((INT32) UCH(array[offset]) + \ - (((INT32) UCH(array[offset+1])) << 8) + \ - (((INT32) UCH(array[offset+2])) << 16) + \ - (((INT32) UCH(array[offset+3])) << 24)) - INT32 bfOffBits; - INT32 headerSize; - INT32 biWidth = 0; /* initialize to avoid compiler warning */ - INT32 biHeight = 0; - unsigned int biPlanes; - INT32 biCompression; - INT32 biXPelsPerMeter,biYPelsPerMeter; - INT32 biClrUsed = 0; - int mapentrysize = 0; /* 0 indicates no colormap */ - INT32 bPad; - JDIMENSION row_width; - - /* Read and verify the bitmap file header */ - if (! ReadOK(source->pub.input_file, bmpfileheader, 14)) - ERREXIT(cinfo, JERR_INPUT_EOF); - if (GET_2B(bmpfileheader,0) != 0x4D42) /* 'BM' */ - ERREXIT(cinfo, JERR_BMP_NOT); - bfOffBits = (INT32) GET_4B(bmpfileheader,10); - /* We ignore the remaining fileheader fields */ - - /* The infoheader might be 12 bytes (OS/2 1.x), 40 bytes (Windows), - * or 64 bytes (OS/2 2.x). Check the first 4 bytes to find out which. - */ - if (! ReadOK(source->pub.input_file, bmpinfoheader, 4)) - ERREXIT(cinfo, JERR_INPUT_EOF); - headerSize = (INT32) GET_4B(bmpinfoheader,0); - if (headerSize < 12 || headerSize > 64) - ERREXIT(cinfo, JERR_BMP_BADHEADER); - if (! ReadOK(source->pub.input_file, bmpinfoheader+4, headerSize-4)) - ERREXIT(cinfo, JERR_INPUT_EOF); - - switch ((int) headerSize) { - case 12: - /* Decode OS/2 1.x header (Microsoft calls this a BITMAPCOREHEADER) */ - biWidth = (INT32) GET_2B(bmpinfoheader,4); - biHeight = (INT32) GET_2B(bmpinfoheader,6); - biPlanes = GET_2B(bmpinfoheader,8); - source->bits_per_pixel = (int) GET_2B(bmpinfoheader,10); - - switch (source->bits_per_pixel) { - case 8: /* colormapped image */ - mapentrysize = 3; /* OS/2 uses RGBTRIPLE colormap */ - TRACEMS2(cinfo, 1, JTRC_BMP_OS2_MAPPED, (int) biWidth, (int) biHeight); - break; - case 24: /* RGB image */ - TRACEMS2(cinfo, 1, JTRC_BMP_OS2, (int) biWidth, (int) biHeight); - break; - default: - ERREXIT(cinfo, JERR_BMP_BADDEPTH); - break; - } - if (biPlanes != 1) - ERREXIT(cinfo, JERR_BMP_BADPLANES); - break; - case 40: - case 64: - /* Decode Windows 3.x header (Microsoft calls this a BITMAPINFOHEADER) */ - /* or OS/2 2.x header, which has additional fields that we ignore */ - biWidth = GET_4B(bmpinfoheader,4); - biHeight = GET_4B(bmpinfoheader,8); - biPlanes = GET_2B(bmpinfoheader,12); - source->bits_per_pixel = (int) GET_2B(bmpinfoheader,14); - biCompression = GET_4B(bmpinfoheader,16); - biXPelsPerMeter = GET_4B(bmpinfoheader,24); - biYPelsPerMeter = GET_4B(bmpinfoheader,28); - biClrUsed = GET_4B(bmpinfoheader,32); - /* biSizeImage, biClrImportant fields are ignored */ - - switch (source->bits_per_pixel) { - case 8: /* colormapped image */ - mapentrysize = 4; /* Windows uses RGBQUAD colormap */ - TRACEMS2(cinfo, 1, JTRC_BMP_MAPPED, (int) biWidth, (int) biHeight); - break; - case 24: /* RGB image */ - TRACEMS2(cinfo, 1, JTRC_BMP, (int) biWidth, (int) biHeight); - break; - default: - ERREXIT(cinfo, JERR_BMP_BADDEPTH); - break; - } - if (biPlanes != 1) - ERREXIT(cinfo, JERR_BMP_BADPLANES); - if (biCompression != 0) - ERREXIT(cinfo, JERR_BMP_COMPRESSED); - - if (biXPelsPerMeter > 0 && biYPelsPerMeter > 0) { - /* Set JFIF density parameters from the BMP data */ - cinfo->X_density = (UINT16) (biXPelsPerMeter/100); /* 100 cm per meter */ - cinfo->Y_density = (UINT16) (biYPelsPerMeter/100); - cinfo->density_unit = 2; /* dots/cm */ - } - break; - default: - ERREXIT(cinfo, JERR_BMP_BADHEADER); - break; - } - - /* Compute distance to bitmap data --- will adjust for colormap below */ - bPad = bfOffBits - (headerSize + 14); - - /* Read the colormap, if any */ - if (mapentrysize > 0) { - if (biClrUsed <= 0) - biClrUsed = 256; /* assume it's 256 */ - else if (biClrUsed > 256) - ERREXIT(cinfo, JERR_BMP_BADCMAP); - /* Allocate space to store the colormap */ - source->colormap = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (JDIMENSION) biClrUsed, (JDIMENSION) 3); - /* and read it from the file */ - read_colormap(source, (int) biClrUsed, mapentrysize); - /* account for size of colormap */ - bPad -= biClrUsed * mapentrysize; - } - - /* Skip any remaining pad bytes */ - if (bPad < 0) /* incorrect bfOffBits value? */ - ERREXIT(cinfo, JERR_BMP_BADHEADER); - while (--bPad >= 0) { - (void) read_byte(source); - } - - /* Compute row width in file, including padding to 4-byte boundary */ - if (source->bits_per_pixel == 24) - row_width = (JDIMENSION) (biWidth * 3); - else - row_width = (JDIMENSION) biWidth; - while ((row_width & 3) != 0) row_width++; - source->row_width = row_width; - - /* Allocate space for inversion array, prepare for preload pass */ - source->whole_image = (*cinfo->mem->request_virt_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, - row_width, (JDIMENSION) biHeight, (JDIMENSION) 1); - source->pub.get_pixel_rows = preload_image; - if (cinfo->progress != NULL) { - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; - progress->total_extra_passes++; /* count file input as separate pass */ - } - - /* Allocate one-row buffer for returned data */ - source->pub.buffer = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (JDIMENSION) (biWidth * 3), (JDIMENSION) 1); - source->pub.buffer_height = 1; - - cinfo->in_color_space = JCS_RGB; - cinfo->input_components = 3; - cinfo->data_precision = 8; - cinfo->image_width = (JDIMENSION) biWidth; - cinfo->image_height = (JDIMENSION) biHeight; -} - - -/* - * Finish up at the end of the file. - */ - -METHODDEF(void) -finish_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - /* no work */ -} - - -/* - * The module selection routine for BMP format input. - */ - -GLOBAL(cjpeg_source_ptr) -jinit_read_bmp (j_compress_ptr cinfo) -{ - bmp_source_ptr source; - - /* Create module interface object */ - source = (bmp_source_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(bmp_source_struct)); - source->cinfo = cinfo; /* make back link for subroutines */ - /* Fill in method ptrs, except get_pixel_rows which start_input sets */ - source->pub.start_input = start_input_bmp; - source->pub.finish_input = finish_input_bmp; - - return (cjpeg_source_ptr) source; -} - -#endif /* BMP_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/rdcolmap.c b/gtkmm-osx/trunk/jpeg-6b/rdcolmap.c deleted file mode 100644 index 42b3437..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/rdcolmap.c +++ /dev/null @@ -1,253 +0,0 @@ -/* - * rdcolmap.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file implements djpeg's "-map file" switch. It reads a source image - * and constructs a colormap to be supplied to the JPEG decompressor. - * - * Currently, these file formats are supported for the map file: - * GIF: the contents of the GIF's global colormap are used. - * PPM (either text or raw flavor): the entire file is read and - * each unique pixel value is entered in the map. - * Note that reading a large PPM file will be horrendously slow. - * Typically, a PPM-format map file should contain just one pixel - * of each desired color. Such a file can be extracted from an - * ordinary image PPM file with ppmtomap(1). - * - * Rescaling a PPM that has a maxval unequal to MAXJSAMPLE is not - * currently implemented. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef QUANT_2PASS_SUPPORTED /* otherwise can't quantize to supplied map */ - -/* Portions of this code are based on the PBMPLUS library, which is: -** -** Copyright (C) 1988 by Jef Poskanzer. -** -** Permission to use, copy, modify, and distribute this software and its -** documentation for any purpose and without fee is hereby granted, provided -** that the above copyright notice appear in all copies and that both that -** copyright notice and this permission notice appear in supporting -** documentation. This software is provided "as is" without express or -** implied warranty. -*/ - - -/* - * Add a (potentially) new color to the color map. - */ - -LOCAL(void) -add_map_entry (j_decompress_ptr cinfo, int R, int G, int B) -{ - JSAMPROW colormap0 = cinfo->colormap[0]; - JSAMPROW colormap1 = cinfo->colormap[1]; - JSAMPROW colormap2 = cinfo->colormap[2]; - int ncolors = cinfo->actual_number_of_colors; - int index; - - /* Check for duplicate color. */ - for (index = 0; index < ncolors; index++) { - if (GETJSAMPLE(colormap0[index]) == R && - GETJSAMPLE(colormap1[index]) == G && - GETJSAMPLE(colormap2[index]) == B) - return; /* color is already in map */ - } - - /* Check for map overflow. */ - if (ncolors >= (MAXJSAMPLE+1)) - ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, (MAXJSAMPLE+1)); - - /* OK, add color to map. */ - colormap0[ncolors] = (JSAMPLE) R; - colormap1[ncolors] = (JSAMPLE) G; - colormap2[ncolors] = (JSAMPLE) B; - cinfo->actual_number_of_colors++; -} - - -/* - * Extract color map from a GIF file. - */ - -LOCAL(void) -read_gif_map (j_decompress_ptr cinfo, FILE * infile) -{ - int header[13]; - int i, colormaplen; - int R, G, B; - - /* Initial 'G' has already been read by read_color_map */ - /* Read the rest of the GIF header and logical screen descriptor */ - for (i = 1; i < 13; i++) { - if ((header[i] = getc(infile)) == EOF) - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - } - - /* Verify GIF Header */ - if (header[1] != 'I' || header[2] != 'F') - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - - /* There must be a global color map. */ - if ((header[10] & 0x80) == 0) - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - - /* OK, fetch it. */ - colormaplen = 2 << (header[10] & 0x07); - - for (i = 0; i < colormaplen; i++) { - R = getc(infile); - G = getc(infile); - B = getc(infile); - if (R == EOF || G == EOF || B == EOF) - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - add_map_entry(cinfo, - R << (BITS_IN_JSAMPLE-8), - G << (BITS_IN_JSAMPLE-8), - B << (BITS_IN_JSAMPLE-8)); - } -} - - -/* Support routines for reading PPM */ - - -LOCAL(int) -pbm_getc (FILE * infile) -/* Read next char, skipping over any comments */ -/* A comment/newline sequence is returned as a newline */ -{ - register int ch; - - ch = getc(infile); - if (ch == '#') { - do { - ch = getc(infile); - } while (ch != '\n' && ch != EOF); - } - return ch; -} - - -LOCAL(unsigned int) -read_pbm_integer (j_decompress_ptr cinfo, FILE * infile) -/* Read an unsigned decimal integer from the PPM file */ -/* Swallows one trailing character after the integer */ -/* Note that on a 16-bit-int machine, only values up to 64k can be read. */ -/* This should not be a problem in practice. */ -{ - register int ch; - register unsigned int val; - - /* Skip any leading whitespace */ - do { - ch = pbm_getc(infile); - if (ch == EOF) - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'); - - if (ch < '0' || ch > '9') - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - - val = ch - '0'; - while ((ch = pbm_getc(infile)) >= '0' && ch <= '9') { - val *= 10; - val += ch - '0'; - } - return val; -} - - -/* - * Extract color map from a PPM file. - */ - -LOCAL(void) -read_ppm_map (j_decompress_ptr cinfo, FILE * infile) -{ - int c; - unsigned int w, h, maxval, row, col; - int R, G, B; - - /* Initial 'P' has already been read by read_color_map */ - c = getc(infile); /* save format discriminator for a sec */ - - /* while we fetch the remaining header info */ - w = read_pbm_integer(cinfo, infile); - h = read_pbm_integer(cinfo, infile); - maxval = read_pbm_integer(cinfo, infile); - - if (w <= 0 || h <= 0 || maxval <= 0) /* error check */ - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - - /* For now, we don't support rescaling from an unusual maxval. */ - if (maxval != (unsigned int) MAXJSAMPLE) - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - - switch (c) { - case '3': /* it's a text-format PPM file */ - for (row = 0; row < h; row++) { - for (col = 0; col < w; col++) { - R = read_pbm_integer(cinfo, infile); - G = read_pbm_integer(cinfo, infile); - B = read_pbm_integer(cinfo, infile); - add_map_entry(cinfo, R, G, B); - } - } - break; - - case '6': /* it's a raw-format PPM file */ - for (row = 0; row < h; row++) { - for (col = 0; col < w; col++) { - R = getc(infile); - G = getc(infile); - B = getc(infile); - if (R == EOF || G == EOF || B == EOF) - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - add_map_entry(cinfo, R, G, B); - } - } - break; - - default: - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - break; - } -} - - -/* - * Main entry point from djpeg.c. - * Input: opened input file (from file name argument on command line). - * Output: colormap and actual_number_of_colors fields are set in cinfo. - */ - -GLOBAL(void) -read_color_map (j_decompress_ptr cinfo, FILE * infile) -{ - /* Allocate space for a color map of maximum supported size. */ - cinfo->colormap = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (JDIMENSION) (MAXJSAMPLE+1), (JDIMENSION) 3); - cinfo->actual_number_of_colors = 0; /* initialize map to empty */ - - /* Read first byte to determine file format */ - switch (getc(infile)) { - case 'G': - read_gif_map(cinfo, infile); - break; - case 'P': - read_ppm_map(cinfo, infile); - break; - default: - ERREXIT(cinfo, JERR_BAD_CMAP_FILE); - break; - } -} - -#endif /* QUANT_2PASS_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/rdgif.c b/gtkmm-osx/trunk/jpeg-6b/rdgif.c deleted file mode 100644 index b27c167..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/rdgif.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * rdgif.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to read input images in GIF format. - * - ***************************************************************************** - * NOTE: to avoid entanglements with Unisys' patent on LZW compression, * - * the ability to read GIF files has been removed from the IJG distribution. * - * Sorry about that. * - ***************************************************************************** - * - * We are required to state that - * "The Graphics Interchange Format(c) is the Copyright property of - * CompuServe Incorporated. GIF(sm) is a Service Mark property of - * CompuServe Incorporated." - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef GIF_SUPPORTED - -/* - * The module selection routine for GIF format input. - */ - -GLOBAL(cjpeg_source_ptr) -jinit_read_gif (j_compress_ptr cinfo) -{ - fprintf(stderr, "GIF input is unsupported for legal reasons. Sorry.\n"); - exit(EXIT_FAILURE); - return NULL; /* keep compiler happy */ -} - -#endif /* GIF_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/rdjpgcom.1 b/gtkmm-osx/trunk/jpeg-6b/rdjpgcom.1 deleted file mode 100644 index 2bba04e..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/rdjpgcom.1 +++ /dev/null @@ -1,54 +0,0 @@ -.TH RDJPGCOM 1 "11 October 1997" -.SH NAME -rdjpgcom \- display text comments from a JPEG file -.SH SYNOPSIS -.B rdjpgcom -[ -.B \-verbose -] -[ -.I filename -] -.LP -.SH DESCRIPTION -.LP -.B rdjpgcom -reads the named JPEG/JFIF file, or the standard input if no file is named, -and prints any text comments found in the file on the standard output. -.PP -The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. -Although the standard doesn't actually define what COM blocks are for, they -are widely used to hold user-supplied text strings. This lets you add -annotations, titles, index terms, etc to your JPEG files, and later retrieve -them as text. COM blocks do not interfere with the image stored in the JPEG -file. The maximum size of a COM block is 64K, but you can have as many of -them as you like in one JPEG file. -.SH OPTIONS -.TP -.B \-verbose -Causes -.B rdjpgcom -to also display the JPEG image dimensions. -.PP -Switch names may be abbreviated, and are not case sensitive. -.SH HINTS -.B rdjpgcom -does not depend on the IJG JPEG library. Its source code is intended as an -illustration of the minimum amount of code required to parse a JPEG file -header correctly. -.PP -In -.B \-verbose -mode, -.B rdjpgcom -will also attempt to print the contents of any "APP12" markers as text. -Some digital cameras produce APP12 markers containing useful textual -information. If you like, you can modify the source code to print -other APPn marker types as well. -.SH SEE ALSO -.BR cjpeg (1), -.BR djpeg (1), -.BR jpegtran (1), -.BR wrjpgcom (1) -.SH AUTHOR -Independent JPEG Group diff --git a/gtkmm-osx/trunk/jpeg-6b/rdjpgcom.c b/gtkmm-osx/trunk/jpeg-6b/rdjpgcom.c deleted file mode 100644 index ffe6fc6..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/rdjpgcom.c +++ /dev/null @@ -1,496 +0,0 @@ -/* - * rdjpgcom.c - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a very simple stand-alone application that displays - * the text in COM (comment) markers in a JFIF file. - * This may be useful as an example of the minimum logic needed to parse - * JPEG markers. - */ - -#define JPEG_CJPEG_DJPEG /* to get the command-line config symbols */ -#include "jinclude.h" /* get auto-config symbols, */ - -#include /* to declare isupper(), tolower() */ -#ifdef USE_SETMODE -#include /* to declare setmode()'s parameter macros */ -/* If you have setmode() but not , just delete this line: */ -#include /* to declare setmode() */ -#endif - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - -#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#else -#ifdef VMS /* VMS is very nonstandard */ -#define READ_BINARY "rb", "ctx=stm" -#else /* standard ANSI-compliant case */ -#define READ_BINARY "rb" -#endif -#endif - -#ifndef EXIT_FAILURE /* define exit() codes if not provided */ -#define EXIT_FAILURE 1 -#endif -#ifndef EXIT_SUCCESS -#ifdef VMS -#define EXIT_SUCCESS 1 /* VMS is very nonstandard */ -#else -#define EXIT_SUCCESS 0 -#endif -#endif - - -/* - * These macros are used to read the input file. - * To reuse this code in another application, you might need to change these. - */ - -static FILE * infile; /* input JPEG file */ - -/* Return next input byte, or EOF if no more */ -#define NEXTBYTE() getc(infile) - - -/* Error exit handler */ -#define ERREXIT(msg) (fprintf(stderr, "%s\n", msg), exit(EXIT_FAILURE)) - - -/* Read one byte, testing for EOF */ -static int -read_1_byte (void) -{ - int c; - - c = NEXTBYTE(); - if (c == EOF) - ERREXIT("Premature EOF in JPEG file"); - return c; -} - -/* Read 2 bytes, convert to unsigned int */ -/* All 2-byte quantities in JPEG markers are MSB first */ -static unsigned int -read_2_bytes (void) -{ - int c1, c2; - - c1 = NEXTBYTE(); - if (c1 == EOF) - ERREXIT("Premature EOF in JPEG file"); - c2 = NEXTBYTE(); - if (c2 == EOF) - ERREXIT("Premature EOF in JPEG file"); - return (((unsigned int) c1) << 8) + ((unsigned int) c2); -} - - -/* - * JPEG markers consist of one or more 0xFF bytes, followed by a marker - * code byte (which is not an FF). Here are the marker codes of interest - * in this program. (See jdmarker.c for a more complete list.) - */ - -#define M_SOF0 0xC0 /* Start Of Frame N */ -#define M_SOF1 0xC1 /* N indicates which compression process */ -#define M_SOF2 0xC2 /* Only SOF0-SOF2 are now in common use */ -#define M_SOF3 0xC3 -#define M_SOF5 0xC5 /* NB: codes C4 and CC are NOT SOF markers */ -#define M_SOF6 0xC6 -#define M_SOF7 0xC7 -#define M_SOF9 0xC9 -#define M_SOF10 0xCA -#define M_SOF11 0xCB -#define M_SOF13 0xCD -#define M_SOF14 0xCE -#define M_SOF15 0xCF -#define M_SOI 0xD8 /* Start Of Image (beginning of datastream) */ -#define M_EOI 0xD9 /* End Of Image (end of datastream) */ -#define M_SOS 0xDA /* Start Of Scan (begins compressed data) */ -#define M_APP0 0xE0 /* Application-specific marker, type N */ -#define M_APP12 0xEC /* (we don't bother to list all 16 APPn's) */ -#define M_COM 0xFE /* COMment */ - - -/* - * Find the next JPEG marker and return its marker code. - * We expect at least one FF byte, possibly more if the compressor used FFs - * to pad the file. - * There could also be non-FF garbage between markers. The treatment of such - * garbage is unspecified; we choose to skip over it but emit a warning msg. - * NB: this routine must not be used after seeing SOS marker, since it will - * not deal correctly with FF/00 sequences in the compressed image data... - */ - -static int -next_marker (void) -{ - int c; - int discarded_bytes = 0; - - /* Find 0xFF byte; count and skip any non-FFs. */ - c = read_1_byte(); - while (c != 0xFF) { - discarded_bytes++; - c = read_1_byte(); - } - /* Get marker code byte, swallowing any duplicate FF bytes. Extra FFs - * are legal as pad bytes, so don't count them in discarded_bytes. - */ - do { - c = read_1_byte(); - } while (c == 0xFF); - - if (discarded_bytes != 0) { - fprintf(stderr, "Warning: garbage data found in JPEG file\n"); - } - - return c; -} - - -/* - * Read the initial marker, which should be SOI. - * For a JFIF file, the first two bytes of the file should be literally - * 0xFF M_SOI. To be more general, we could use next_marker, but if the - * input file weren't actually JPEG at all, next_marker might read the whole - * file and then return a misleading error message... - */ - -static int -first_marker (void) -{ - int c1, c2; - - c1 = NEXTBYTE(); - c2 = NEXTBYTE(); - if (c1 != 0xFF || c2 != M_SOI) - ERREXIT("Not a JPEG file"); - return c2; -} - - -/* - * Most types of marker are followed by a variable-length parameter segment. - * This routine skips over the parameters for any marker we don't otherwise - * want to process. - * Note that we MUST skip the parameter segment explicitly in order not to - * be fooled by 0xFF bytes that might appear within the parameter segment; - * such bytes do NOT introduce new markers. - */ - -static void -skip_variable (void) -/* Skip over an unknown or uninteresting variable-length marker */ -{ - unsigned int length; - - /* Get the marker parameter length count */ - length = read_2_bytes(); - /* Length includes itself, so must be at least 2 */ - if (length < 2) - ERREXIT("Erroneous JPEG marker length"); - length -= 2; - /* Skip over the remaining bytes */ - while (length > 0) { - (void) read_1_byte(); - length--; - } -} - - -/* - * Process a COM marker. - * We want to print out the marker contents as legible text; - * we must guard against non-text junk and varying newline representations. - */ - -static void -process_COM (void) -{ - unsigned int length; - int ch; - int lastch = 0; - - /* Get the marker parameter length count */ - length = read_2_bytes(); - /* Length includes itself, so must be at least 2 */ - if (length < 2) - ERREXIT("Erroneous JPEG marker length"); - length -= 2; - - while (length > 0) { - ch = read_1_byte(); - /* Emit the character in a readable form. - * Nonprintables are converted to \nnn form, - * while \ is converted to \\. - * Newlines in CR, CR/LF, or LF form will be printed as one newline. - */ - if (ch == '\r') { - printf("\n"); - } else if (ch == '\n') { - if (lastch != '\r') - printf("\n"); - } else if (ch == '\\') { - printf("\\\\"); - } else if (isprint(ch)) { - putc(ch, stdout); - } else { - printf("\\%03o", ch); - } - lastch = ch; - length--; - } - printf("\n"); -} - - -/* - * Process a SOFn marker. - * This code is only needed if you want to know the image dimensions... - */ - -static void -process_SOFn (int marker) -{ - unsigned int length; - unsigned int image_height, image_width; - int data_precision, num_components; - const char * process; - int ci; - - length = read_2_bytes(); /* usual parameter length count */ - - data_precision = read_1_byte(); - image_height = read_2_bytes(); - image_width = read_2_bytes(); - num_components = read_1_byte(); - - switch (marker) { - case M_SOF0: process = "Baseline"; break; - case M_SOF1: process = "Extended sequential"; break; - case M_SOF2: process = "Progressive"; break; - case M_SOF3: process = "Lossless"; break; - case M_SOF5: process = "Differential sequential"; break; - case M_SOF6: process = "Differential progressive"; break; - case M_SOF7: process = "Differential lossless"; break; - case M_SOF9: process = "Extended sequential, arithmetic coding"; break; - case M_SOF10: process = "Progressive, arithmetic coding"; break; - case M_SOF11: process = "Lossless, arithmetic coding"; break; - case M_SOF13: process = "Differential sequential, arithmetic coding"; break; - case M_SOF14: process = "Differential progressive, arithmetic coding"; break; - case M_SOF15: process = "Differential lossless, arithmetic coding"; break; - default: process = "Unknown"; break; - } - - printf("JPEG image is %uw * %uh, %d color components, %d bits per sample\n", - image_width, image_height, num_components, data_precision); - printf("JPEG process: %s\n", process); - - if (length != (unsigned int) (8 + num_components * 3)) - ERREXIT("Bogus SOF marker length"); - - for (ci = 0; ci < num_components; ci++) { - (void) read_1_byte(); /* Component ID code */ - (void) read_1_byte(); /* H, V sampling factors */ - (void) read_1_byte(); /* Quantization table number */ - } -} - - -/* - * Parse the marker stream until SOS or EOI is seen; - * display any COM markers. - * While the companion program wrjpgcom will always insert COM markers before - * SOFn, other implementations might not, so we scan to SOS before stopping. - * If we were only interested in the image dimensions, we would stop at SOFn. - * (Conversely, if we only cared about COM markers, there would be no need - * for special code to handle SOFn; we could treat it like other markers.) - */ - -static int -scan_JPEG_header (int verbose) -{ - int marker; - - /* Expect SOI at start of file */ - if (first_marker() != M_SOI) - ERREXIT("Expected SOI marker first"); - - /* Scan miscellaneous markers until we reach SOS. */ - for (;;) { - marker = next_marker(); - switch (marker) { - /* Note that marker codes 0xC4, 0xC8, 0xCC are not, and must not be, - * treated as SOFn. C4 in particular is actually DHT. - */ - case M_SOF0: /* Baseline */ - case M_SOF1: /* Extended sequential, Huffman */ - case M_SOF2: /* Progressive, Huffman */ - case M_SOF3: /* Lossless, Huffman */ - case M_SOF5: /* Differential sequential, Huffman */ - case M_SOF6: /* Differential progressive, Huffman */ - case M_SOF7: /* Differential lossless, Huffman */ - case M_SOF9: /* Extended sequential, arithmetic */ - case M_SOF10: /* Progressive, arithmetic */ - case M_SOF11: /* Lossless, arithmetic */ - case M_SOF13: /* Differential sequential, arithmetic */ - case M_SOF14: /* Differential progressive, arithmetic */ - case M_SOF15: /* Differential lossless, arithmetic */ - if (verbose) - process_SOFn(marker); - else - skip_variable(); - break; - - case M_SOS: /* stop before hitting compressed data */ - return marker; - - case M_EOI: /* in case it's a tables-only JPEG stream */ - return marker; - - case M_COM: - process_COM(); - break; - - case M_APP12: - /* Some digital camera makers put useful textual information into - * APP12 markers, so we print those out too when in -verbose mode. - */ - if (verbose) { - printf("APP12 contains:\n"); - process_COM(); - } else - skip_variable(); - break; - - default: /* Anything else just gets skipped */ - skip_variable(); /* we assume it has a parameter count... */ - break; - } - } /* end loop */ -} - - -/* Command line parsing code */ - -static const char * progname; /* program name for error messages */ - - -static void -usage (void) -/* complain about bad command line */ -{ - fprintf(stderr, "rdjpgcom displays any textual comments in a JPEG file.\n"); - - fprintf(stderr, "Usage: %s [switches] [inputfile]\n", progname); - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf(stderr, " -verbose Also display dimensions of JPEG image\n"); - - exit(EXIT_FAILURE); -} - - -static int -keymatch (char * arg, const char * keyword, int minchars) -/* Case-insensitive matching of (possibly abbreviated) keyword switches. */ -/* keyword is the constant keyword (must be lower case already), */ -/* minchars is length of minimum legal abbreviation. */ -{ - register int ca, ck; - register int nmatched = 0; - - while ((ca = *arg++) != '\0') { - if ((ck = *keyword++) == '\0') - return 0; /* arg longer than keyword, no good */ - if (isupper(ca)) /* force arg to lcase (assume ck is already) */ - ca = tolower(ca); - if (ca != ck) - return 0; /* no good */ - nmatched++; /* count matched characters */ - } - /* reached end of argument; fail if it's too short for unique abbrev */ - if (nmatched < minchars) - return 0; - return 1; /* A-OK */ -} - - -/* - * The main program. - */ - -int -main (int argc, char **argv) -{ - int argn; - char * arg; - int verbose = 0; - - /* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "rdjpgcom"; /* in case C library doesn't provide it */ - - /* Parse switches, if any */ - for (argn = 1; argn < argc; argn++) { - arg = argv[argn]; - if (arg[0] != '-') - break; /* not switch, must be file name */ - arg++; /* advance over '-' */ - if (keymatch(arg, "verbose", 1)) { - verbose++; - } else - usage(); - } - - /* Open the input file. */ - /* Unix style: expect zero or one file name */ - if (argn < argc-1) { - fprintf(stderr, "%s: only one input file\n", progname); - usage(); - } - if (argn < argc) { - if ((infile = fopen(argv[argn], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); - exit(EXIT_FAILURE); - } - } else { - /* default input file is stdin */ -#ifdef USE_SETMODE /* need to hack file mode? */ - setmode(fileno(stdin), O_BINARY); -#endif -#ifdef USE_FDOPEN /* need to re-open in binary mode? */ - if ((infile = fdopen(fileno(stdin), READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open stdin\n", progname); - exit(EXIT_FAILURE); - } -#else - infile = stdin; -#endif - } - - /* Scan the JPEG headers. */ - (void) scan_JPEG_header(verbose); - - /* All done. */ - exit(EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ -} diff --git a/gtkmm-osx/trunk/jpeg-6b/rdppm.c b/gtkmm-osx/trunk/jpeg-6b/rdppm.c deleted file mode 100644 index 1df35c1..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/rdppm.c +++ /dev/null @@ -1,458 +0,0 @@ -/* - * rdppm.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to read input images in PPM/PGM format. - * The extended 2-byte-per-sample raw PPM/PGM formats are supported. - * The PBMPLUS library is NOT required to compile this software - * (but it is highly useful as a set of PPM image manipulation programs). - * - * These routines may need modification for non-Unix environments or - * specialized applications. As they stand, they assume input from - * an ordinary stdio stream. They further assume that reading begins - * at the start of the file; start_input may need work if the - * user interface has already read some data (e.g., to determine that - * the file is indeed PPM format). - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef PPM_SUPPORTED - - -/* Portions of this code are based on the PBMPLUS library, which is: -** -** Copyright (C) 1988 by Jef Poskanzer. -** -** Permission to use, copy, modify, and distribute this software and its -** documentation for any purpose and without fee is hereby granted, provided -** that the above copyright notice appear in all copies and that both that -** copyright notice and this permission notice appear in supporting -** documentation. This software is provided "as is" without express or -** implied warranty. -*/ - - -/* Macros to deal with unsigned chars as efficiently as compiler allows */ - -#ifdef HAVE_UNSIGNED_CHAR -typedef unsigned char U_CHAR; -#define UCH(x) ((int) (x)) -#else /* !HAVE_UNSIGNED_CHAR */ -#ifdef CHAR_IS_UNSIGNED -typedef char U_CHAR; -#define UCH(x) ((int) (x)) -#else -typedef char U_CHAR; -#define UCH(x) ((int) (x) & 0xFF) -#endif -#endif /* HAVE_UNSIGNED_CHAR */ - - -#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len))) - - -/* - * On most systems, reading individual bytes with getc() is drastically less - * efficient than buffering a row at a time with fread(). On PCs, we must - * allocate the buffer in near data space, because we are assuming small-data - * memory model, wherein fread() can't reach far memory. If you need to - * process very wide images on a PC, you might have to compile in large-memory - * model, or else replace fread() with a getc() loop --- which will be much - * slower. - */ - - -/* Private version of data source object */ - -typedef struct { - struct cjpeg_source_struct pub; /* public fields */ - - U_CHAR *iobuffer; /* non-FAR pointer to I/O buffer */ - JSAMPROW pixrow; /* FAR pointer to same */ - size_t buffer_width; /* width of I/O buffer */ - JSAMPLE *rescale; /* => maxval-remapping array, or NULL */ -} ppm_source_struct; - -typedef ppm_source_struct * ppm_source_ptr; - - -LOCAL(int) -pbm_getc (FILE * infile) -/* Read next char, skipping over any comments */ -/* A comment/newline sequence is returned as a newline */ -{ - register int ch; - - ch = getc(infile); - if (ch == '#') { - do { - ch = getc(infile); - } while (ch != '\n' && ch != EOF); - } - return ch; -} - - -LOCAL(unsigned int) -read_pbm_integer (j_compress_ptr cinfo, FILE * infile) -/* Read an unsigned decimal integer from the PPM file */ -/* Swallows one trailing character after the integer */ -/* Note that on a 16-bit-int machine, only values up to 64k can be read. */ -/* This should not be a problem in practice. */ -{ - register int ch; - register unsigned int val; - - /* Skip any leading whitespace */ - do { - ch = pbm_getc(infile); - if (ch == EOF) - ERREXIT(cinfo, JERR_INPUT_EOF); - } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'); - - if (ch < '0' || ch > '9') - ERREXIT(cinfo, JERR_PPM_NONNUMERIC); - - val = ch - '0'; - while ((ch = pbm_getc(infile)) >= '0' && ch <= '9') { - val *= 10; - val += ch - '0'; - } - return val; -} - - -/* - * Read one row of pixels. - * - * We provide several different versions depending on input file format. - * In all cases, input is scaled to the size of JSAMPLE. - * - * A really fast path is provided for reading byte/sample raw files with - * maxval = MAXJSAMPLE, which is the normal case for 8-bit data. - */ - - -METHODDEF(JDIMENSION) -get_text_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading text-format PGM files with any maxval */ -{ - ppm_source_ptr source = (ppm_source_ptr) sinfo; - FILE * infile = source->pub.input_file; - register JSAMPROW ptr; - register JSAMPLE *rescale = source->rescale; - JDIMENSION col; - - ptr = source->pub.buffer[0]; - for (col = cinfo->image_width; col > 0; col--) { - *ptr++ = rescale[read_pbm_integer(cinfo, infile)]; - } - return 1; -} - - -METHODDEF(JDIMENSION) -get_text_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading text-format PPM files with any maxval */ -{ - ppm_source_ptr source = (ppm_source_ptr) sinfo; - FILE * infile = source->pub.input_file; - register JSAMPROW ptr; - register JSAMPLE *rescale = source->rescale; - JDIMENSION col; - - ptr = source->pub.buffer[0]; - for (col = cinfo->image_width; col > 0; col--) { - *ptr++ = rescale[read_pbm_integer(cinfo, infile)]; - *ptr++ = rescale[read_pbm_integer(cinfo, infile)]; - *ptr++ = rescale[read_pbm_integer(cinfo, infile)]; - } - return 1; -} - - -METHODDEF(JDIMENSION) -get_scaled_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading raw-byte-format PGM files with any maxval */ -{ - ppm_source_ptr source = (ppm_source_ptr) sinfo; - register JSAMPROW ptr; - register U_CHAR * bufferptr; - register JSAMPLE *rescale = source->rescale; - JDIMENSION col; - - if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) - ERREXIT(cinfo, JERR_INPUT_EOF); - ptr = source->pub.buffer[0]; - bufferptr = source->iobuffer; - for (col = cinfo->image_width; col > 0; col--) { - *ptr++ = rescale[UCH(*bufferptr++)]; - } - return 1; -} - - -METHODDEF(JDIMENSION) -get_scaled_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading raw-byte-format PPM files with any maxval */ -{ - ppm_source_ptr source = (ppm_source_ptr) sinfo; - register JSAMPROW ptr; - register U_CHAR * bufferptr; - register JSAMPLE *rescale = source->rescale; - JDIMENSION col; - - if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) - ERREXIT(cinfo, JERR_INPUT_EOF); - ptr = source->pub.buffer[0]; - bufferptr = source->iobuffer; - for (col = cinfo->image_width; col > 0; col--) { - *ptr++ = rescale[UCH(*bufferptr++)]; - *ptr++ = rescale[UCH(*bufferptr++)]; - *ptr++ = rescale[UCH(*bufferptr++)]; - } - return 1; -} - - -METHODDEF(JDIMENSION) -get_raw_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading raw-byte-format files with maxval = MAXJSAMPLE. - * In this case we just read right into the JSAMPLE buffer! - * Note that same code works for PPM and PGM files. - */ -{ - ppm_source_ptr source = (ppm_source_ptr) sinfo; - - if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) - ERREXIT(cinfo, JERR_INPUT_EOF); - return 1; -} - - -METHODDEF(JDIMENSION) -get_word_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading raw-word-format PGM files with any maxval */ -{ - ppm_source_ptr source = (ppm_source_ptr) sinfo; - register JSAMPROW ptr; - register U_CHAR * bufferptr; - register JSAMPLE *rescale = source->rescale; - JDIMENSION col; - - if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) - ERREXIT(cinfo, JERR_INPUT_EOF); - ptr = source->pub.buffer[0]; - bufferptr = source->iobuffer; - for (col = cinfo->image_width; col > 0; col--) { - register int temp; - temp = UCH(*bufferptr++); - temp |= UCH(*bufferptr++) << 8; - *ptr++ = rescale[temp]; - } - return 1; -} - - -METHODDEF(JDIMENSION) -get_word_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading raw-word-format PPM files with any maxval */ -{ - ppm_source_ptr source = (ppm_source_ptr) sinfo; - register JSAMPROW ptr; - register U_CHAR * bufferptr; - register JSAMPLE *rescale = source->rescale; - JDIMENSION col; - - if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) - ERREXIT(cinfo, JERR_INPUT_EOF); - ptr = source->pub.buffer[0]; - bufferptr = source->iobuffer; - for (col = cinfo->image_width; col > 0; col--) { - register int temp; - temp = UCH(*bufferptr++); - temp |= UCH(*bufferptr++) << 8; - *ptr++ = rescale[temp]; - temp = UCH(*bufferptr++); - temp |= UCH(*bufferptr++) << 8; - *ptr++ = rescale[temp]; - temp = UCH(*bufferptr++); - temp |= UCH(*bufferptr++) << 8; - *ptr++ = rescale[temp]; - } - return 1; -} - - -/* - * Read the file header; return image size and component count. - */ - -METHODDEF(void) -start_input_ppm (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - ppm_source_ptr source = (ppm_source_ptr) sinfo; - int c; - unsigned int w, h, maxval; - boolean need_iobuffer, use_raw_buffer, need_rescale; - - if (getc(source->pub.input_file) != 'P') - ERREXIT(cinfo, JERR_PPM_NOT); - - c = getc(source->pub.input_file); /* subformat discriminator character */ - - /* detect unsupported variants (ie, PBM) before trying to read header */ - switch (c) { - case '2': /* it's a text-format PGM file */ - case '3': /* it's a text-format PPM file */ - case '5': /* it's a raw-format PGM file */ - case '6': /* it's a raw-format PPM file */ - break; - default: - ERREXIT(cinfo, JERR_PPM_NOT); - break; - } - - /* fetch the remaining header info */ - w = read_pbm_integer(cinfo, source->pub.input_file); - h = read_pbm_integer(cinfo, source->pub.input_file); - maxval = read_pbm_integer(cinfo, source->pub.input_file); - - if (w <= 0 || h <= 0 || maxval <= 0) /* error check */ - ERREXIT(cinfo, JERR_PPM_NOT); - - cinfo->data_precision = BITS_IN_JSAMPLE; /* we always rescale data to this */ - cinfo->image_width = (JDIMENSION) w; - cinfo->image_height = (JDIMENSION) h; - - /* initialize flags to most common settings */ - need_iobuffer = TRUE; /* do we need an I/O buffer? */ - use_raw_buffer = FALSE; /* do we map input buffer onto I/O buffer? */ - need_rescale = TRUE; /* do we need a rescale array? */ - - switch (c) { - case '2': /* it's a text-format PGM file */ - cinfo->input_components = 1; - cinfo->in_color_space = JCS_GRAYSCALE; - TRACEMS2(cinfo, 1, JTRC_PGM_TEXT, w, h); - source->pub.get_pixel_rows = get_text_gray_row; - need_iobuffer = FALSE; - break; - - case '3': /* it's a text-format PPM file */ - cinfo->input_components = 3; - cinfo->in_color_space = JCS_RGB; - TRACEMS2(cinfo, 1, JTRC_PPM_TEXT, w, h); - source->pub.get_pixel_rows = get_text_rgb_row; - need_iobuffer = FALSE; - break; - - case '5': /* it's a raw-format PGM file */ - cinfo->input_components = 1; - cinfo->in_color_space = JCS_GRAYSCALE; - TRACEMS2(cinfo, 1, JTRC_PGM, w, h); - if (maxval > 255) { - source->pub.get_pixel_rows = get_word_gray_row; - } else if (maxval == MAXJSAMPLE && SIZEOF(JSAMPLE) == SIZEOF(U_CHAR)) { - source->pub.get_pixel_rows = get_raw_row; - use_raw_buffer = TRUE; - need_rescale = FALSE; - } else { - source->pub.get_pixel_rows = get_scaled_gray_row; - } - break; - - case '6': /* it's a raw-format PPM file */ - cinfo->input_components = 3; - cinfo->in_color_space = JCS_RGB; - TRACEMS2(cinfo, 1, JTRC_PPM, w, h); - if (maxval > 255) { - source->pub.get_pixel_rows = get_word_rgb_row; - } else if (maxval == MAXJSAMPLE && SIZEOF(JSAMPLE) == SIZEOF(U_CHAR)) { - source->pub.get_pixel_rows = get_raw_row; - use_raw_buffer = TRUE; - need_rescale = FALSE; - } else { - source->pub.get_pixel_rows = get_scaled_rgb_row; - } - break; - } - - /* Allocate space for I/O buffer: 1 or 3 bytes or words/pixel. */ - if (need_iobuffer) { - source->buffer_width = (size_t) w * cinfo->input_components * - ((maxval<=255) ? SIZEOF(U_CHAR) : (2*SIZEOF(U_CHAR))); - source->iobuffer = (U_CHAR *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - source->buffer_width); - } - - /* Create compressor input buffer. */ - if (use_raw_buffer) { - /* For unscaled raw-input case, we can just map it onto the I/O buffer. */ - /* Synthesize a JSAMPARRAY pointer structure */ - /* Cast here implies near->far pointer conversion on PCs */ - source->pixrow = (JSAMPROW) source->iobuffer; - source->pub.buffer = & source->pixrow; - source->pub.buffer_height = 1; - } else { - /* Need to translate anyway, so make a separate sample buffer. */ - source->pub.buffer = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (JDIMENSION) w * cinfo->input_components, (JDIMENSION) 1); - source->pub.buffer_height = 1; - } - - /* Compute the rescaling array if required. */ - if (need_rescale) { - INT32 val, half_maxval; - - /* On 16-bit-int machines we have to be careful of maxval = 65535 */ - source->rescale = (JSAMPLE *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - (size_t) (((long) maxval + 1L) * SIZEOF(JSAMPLE))); - half_maxval = maxval / 2; - for (val = 0; val <= (INT32) maxval; val++) { - /* The multiplication here must be done in 32 bits to avoid overflow */ - source->rescale[val] = (JSAMPLE) ((val*MAXJSAMPLE + half_maxval)/maxval); - } - } -} - - -/* - * Finish up at the end of the file. - */ - -METHODDEF(void) -finish_input_ppm (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - /* no work */ -} - - -/* - * The module selection routine for PPM format input. - */ - -GLOBAL(cjpeg_source_ptr) -jinit_read_ppm (j_compress_ptr cinfo) -{ - ppm_source_ptr source; - - /* Create module interface object */ - source = (ppm_source_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(ppm_source_struct)); - /* Fill in method ptrs, except get_pixel_rows which start_input sets */ - source->pub.start_input = start_input_ppm; - source->pub.finish_input = finish_input_ppm; - - return (cjpeg_source_ptr) source; -} - -#endif /* PPM_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/rdrle.c b/gtkmm-osx/trunk/jpeg-6b/rdrle.c deleted file mode 100644 index 542bc37..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/rdrle.c +++ /dev/null @@ -1,387 +0,0 @@ -/* - * rdrle.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to read input images in Utah RLE format. - * The Utah Raster Toolkit library is required (version 3.1 or later). - * - * These routines may need modification for non-Unix environments or - * specialized applications. As they stand, they assume input from - * an ordinary stdio stream. They further assume that reading begins - * at the start of the file; start_input may need work if the - * user interface has already read some data (e.g., to determine that - * the file is indeed RLE format). - * - * Based on code contributed by Mike Lijewski, - * with updates from Robert Hutchinson. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef RLE_SUPPORTED - -/* rle.h is provided by the Utah Raster Toolkit. */ - -#include - -/* - * We assume that JSAMPLE has the same representation as rle_pixel, - * to wit, "unsigned char". Hence we can't cope with 12- or 16-bit samples. - */ - -#if BITS_IN_JSAMPLE != 8 - Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ -#endif - -/* - * We support the following types of RLE files: - * - * GRAYSCALE - 8 bits, no colormap - * MAPPEDGRAY - 8 bits, 1 channel colomap - * PSEUDOCOLOR - 8 bits, 3 channel colormap - * TRUECOLOR - 24 bits, 3 channel colormap - * DIRECTCOLOR - 24 bits, no colormap - * - * For now, we ignore any alpha channel in the image. - */ - -typedef enum - { GRAYSCALE, MAPPEDGRAY, PSEUDOCOLOR, TRUECOLOR, DIRECTCOLOR } rle_kind; - - -/* - * Since RLE stores scanlines bottom-to-top, we have to invert the image - * to conform to JPEG's top-to-bottom order. To do this, we read the - * incoming image into a virtual array on the first get_pixel_rows call, - * then fetch the required row from the virtual array on subsequent calls. - */ - -typedef struct _rle_source_struct * rle_source_ptr; - -typedef struct _rle_source_struct { - struct cjpeg_source_struct pub; /* public fields */ - - rle_kind visual; /* actual type of input file */ - jvirt_sarray_ptr image; /* virtual array to hold the image */ - JDIMENSION row; /* current row # in the virtual array */ - rle_hdr header; /* Input file information */ - rle_pixel** rle_row; /* holds a row returned by rle_getrow() */ - -} rle_source_struct; - - -/* - * Read the file header; return image size and component count. - */ - -METHODDEF(void) -start_input_rle (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - rle_source_ptr source = (rle_source_ptr) sinfo; - JDIMENSION width, height; -#ifdef PROGRESS_REPORT - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; -#endif - - /* Use RLE library routine to get the header info */ - source->header = *rle_hdr_init(NULL); - source->header.rle_file = source->pub.input_file; - switch (rle_get_setup(&(source->header))) { - case RLE_SUCCESS: - /* A-OK */ - break; - case RLE_NOT_RLE: - ERREXIT(cinfo, JERR_RLE_NOT); - break; - case RLE_NO_SPACE: - ERREXIT(cinfo, JERR_RLE_MEM); - break; - case RLE_EMPTY: - ERREXIT(cinfo, JERR_RLE_EMPTY); - break; - case RLE_EOF: - ERREXIT(cinfo, JERR_RLE_EOF); - break; - default: - ERREXIT(cinfo, JERR_RLE_BADERROR); - break; - } - - /* Figure out what we have, set private vars and return values accordingly */ - - width = source->header.xmax - source->header.xmin + 1; - height = source->header.ymax - source->header.ymin + 1; - source->header.xmin = 0; /* realign horizontally */ - source->header.xmax = width-1; - - cinfo->image_width = width; - cinfo->image_height = height; - cinfo->data_precision = 8; /* we can only handle 8 bit data */ - - if (source->header.ncolors == 1 && source->header.ncmap == 0) { - source->visual = GRAYSCALE; - TRACEMS2(cinfo, 1, JTRC_RLE_GRAY, width, height); - } else if (source->header.ncolors == 1 && source->header.ncmap == 1) { - source->visual = MAPPEDGRAY; - TRACEMS3(cinfo, 1, JTRC_RLE_MAPGRAY, width, height, - 1 << source->header.cmaplen); - } else if (source->header.ncolors == 1 && source->header.ncmap == 3) { - source->visual = PSEUDOCOLOR; - TRACEMS3(cinfo, 1, JTRC_RLE_MAPPED, width, height, - 1 << source->header.cmaplen); - } else if (source->header.ncolors == 3 && source->header.ncmap == 3) { - source->visual = TRUECOLOR; - TRACEMS3(cinfo, 1, JTRC_RLE_FULLMAP, width, height, - 1 << source->header.cmaplen); - } else if (source->header.ncolors == 3 && source->header.ncmap == 0) { - source->visual = DIRECTCOLOR; - TRACEMS2(cinfo, 1, JTRC_RLE, width, height); - } else - ERREXIT(cinfo, JERR_RLE_UNSUPPORTED); - - if (source->visual == GRAYSCALE || source->visual == MAPPEDGRAY) { - cinfo->in_color_space = JCS_GRAYSCALE; - cinfo->input_components = 1; - } else { - cinfo->in_color_space = JCS_RGB; - cinfo->input_components = 3; - } - - /* - * A place to hold each scanline while it's converted. - * (GRAYSCALE scanlines don't need converting) - */ - if (source->visual != GRAYSCALE) { - source->rle_row = (rle_pixel**) (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (JDIMENSION) width, (JDIMENSION) cinfo->input_components); - } - - /* request a virtual array to hold the image */ - source->image = (*cinfo->mem->request_virt_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, - (JDIMENSION) (width * source->header.ncolors), - (JDIMENSION) height, (JDIMENSION) 1); - -#ifdef PROGRESS_REPORT - if (progress != NULL) { - /* count file input as separate pass */ - progress->total_extra_passes++; - } -#endif - - source->pub.buffer_height = 1; -} - - -/* - * Read one row of pixels. - * Called only after load_image has read the image into the virtual array. - * Used for GRAYSCALE, MAPPEDGRAY, TRUECOLOR, and DIRECTCOLOR images. - */ - -METHODDEF(JDIMENSION) -get_rle_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - rle_source_ptr source = (rle_source_ptr) sinfo; - - source->row--; - source->pub.buffer = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE); - - return 1; -} - -/* - * Read one row of pixels. - * Called only after load_image has read the image into the virtual array. - * Used for PSEUDOCOLOR images. - */ - -METHODDEF(JDIMENSION) -get_pseudocolor_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - rle_source_ptr source = (rle_source_ptr) sinfo; - JSAMPROW src_row, dest_row; - JDIMENSION col; - rle_map *colormap; - int val; - - colormap = source->header.cmap; - dest_row = source->pub.buffer[0]; - source->row--; - src_row = * (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE); - - for (col = cinfo->image_width; col > 0; col--) { - val = GETJSAMPLE(*src_row++); - *dest_row++ = (JSAMPLE) (colormap[val ] >> 8); - *dest_row++ = (JSAMPLE) (colormap[val + 256] >> 8); - *dest_row++ = (JSAMPLE) (colormap[val + 512] >> 8); - } - - return 1; -} - - -/* - * Load the image into a virtual array. We have to do this because RLE - * files start at the lower left while the JPEG standard has them starting - * in the upper left. This is called the first time we want to get a row - * of input. What we do is load the RLE data into the array and then call - * the appropriate routine to read one row from the array. Before returning, - * we set source->pub.get_pixel_rows so that subsequent calls go straight to - * the appropriate row-reading routine. - */ - -METHODDEF(JDIMENSION) -load_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - rle_source_ptr source = (rle_source_ptr) sinfo; - JDIMENSION row, col; - JSAMPROW scanline, red_ptr, green_ptr, blue_ptr; - rle_pixel **rle_row; - rle_map *colormap; - char channel; -#ifdef PROGRESS_REPORT - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; -#endif - - colormap = source->header.cmap; - rle_row = source->rle_row; - - /* Read the RLE data into our virtual array. - * We assume here that (a) rle_pixel is represented the same as JSAMPLE, - * and (b) we are not on a machine where FAR pointers differ from regular. - */ - RLE_CLR_BIT(source->header, RLE_ALPHA); /* don't read the alpha channel */ - -#ifdef PROGRESS_REPORT - if (progress != NULL) { - progress->pub.pass_limit = cinfo->image_height; - progress->pub.pass_counter = 0; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } -#endif - - switch (source->visual) { - - case GRAYSCALE: - case PSEUDOCOLOR: - for (row = 0; row < cinfo->image_height; row++) { - rle_row = (rle_pixel **) (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); - rle_getrow(&source->header, rle_row); -#ifdef PROGRESS_REPORT - if (progress != NULL) { - progress->pub.pass_counter++; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } -#endif - } - break; - - case MAPPEDGRAY: - case TRUECOLOR: - for (row = 0; row < cinfo->image_height; row++) { - scanline = * (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); - rle_row = source->rle_row; - rle_getrow(&source->header, rle_row); - - for (col = 0; col < cinfo->image_width; col++) { - for (channel = 0; channel < source->header.ncolors; channel++) { - *scanline++ = (JSAMPLE) - (colormap[GETJSAMPLE(rle_row[channel][col]) + 256 * channel] >> 8); - } - } - -#ifdef PROGRESS_REPORT - if (progress != NULL) { - progress->pub.pass_counter++; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } -#endif - } - break; - - case DIRECTCOLOR: - for (row = 0; row < cinfo->image_height; row++) { - scanline = * (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); - rle_getrow(&source->header, rle_row); - - red_ptr = rle_row[0]; - green_ptr = rle_row[1]; - blue_ptr = rle_row[2]; - - for (col = cinfo->image_width; col > 0; col--) { - *scanline++ = *red_ptr++; - *scanline++ = *green_ptr++; - *scanline++ = *blue_ptr++; - } - -#ifdef PROGRESS_REPORT - if (progress != NULL) { - progress->pub.pass_counter++; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } -#endif - } - } - -#ifdef PROGRESS_REPORT - if (progress != NULL) - progress->completed_extra_passes++; -#endif - - /* Set up to call proper row-extraction routine in future */ - if (source->visual == PSEUDOCOLOR) { - source->pub.buffer = source->rle_row; - source->pub.get_pixel_rows = get_pseudocolor_row; - } else { - source->pub.get_pixel_rows = get_rle_row; - } - source->row = cinfo->image_height; - - /* And fetch the topmost (bottommost) row */ - return (*source->pub.get_pixel_rows) (cinfo, sinfo); -} - - -/* - * Finish up at the end of the file. - */ - -METHODDEF(void) -finish_input_rle (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - /* no work */ -} - - -/* - * The module selection routine for RLE format input. - */ - -GLOBAL(cjpeg_source_ptr) -jinit_read_rle (j_compress_ptr cinfo) -{ - rle_source_ptr source; - - /* Create module interface object */ - source = (rle_source_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(rle_source_struct)); - /* Fill in method ptrs */ - source->pub.start_input = start_input_rle; - source->pub.finish_input = finish_input_rle; - source->pub.get_pixel_rows = load_image; - - return (cjpeg_source_ptr) source; -} - -#endif /* RLE_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/rdswitch.c b/gtkmm-osx/trunk/jpeg-6b/rdswitch.c deleted file mode 100644 index 4f4bb4f..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/rdswitch.c +++ /dev/null @@ -1,332 +0,0 @@ -/* - * rdswitch.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to process some of cjpeg's more complicated - * command-line switches. Switches processed here are: - * -qtables file Read quantization tables from text file - * -scans file Read scan script from text file - * -qslots N[,N,...] Set component quantization table selectors - * -sample HxV[,HxV,...] Set component sampling factors - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ -#include /* to declare isdigit(), isspace() */ - - -LOCAL(int) -text_getc (FILE * file) -/* Read next char, skipping over any comments (# to end of line) */ -/* A comment/newline sequence is returned as a newline */ -{ - register int ch; - - ch = getc(file); - if (ch == '#') { - do { - ch = getc(file); - } while (ch != '\n' && ch != EOF); - } - return ch; -} - - -LOCAL(boolean) -read_text_integer (FILE * file, long * result, int * termchar) -/* Read an unsigned decimal integer from a file, store it in result */ -/* Reads one trailing character after the integer; returns it in termchar */ -{ - register int ch; - register long val; - - /* Skip any leading whitespace, detect EOF */ - do { - ch = text_getc(file); - if (ch == EOF) { - *termchar = ch; - return FALSE; - } - } while (isspace(ch)); - - if (! isdigit(ch)) { - *termchar = ch; - return FALSE; - } - - val = ch - '0'; - while ((ch = text_getc(file)) != EOF) { - if (! isdigit(ch)) - break; - val *= 10; - val += ch - '0'; - } - *result = val; - *termchar = ch; - return TRUE; -} - - -GLOBAL(boolean) -read_quant_tables (j_compress_ptr cinfo, char * filename, - int scale_factor, boolean force_baseline) -/* Read a set of quantization tables from the specified file. - * The file is plain ASCII text: decimal numbers with whitespace between. - * Comments preceded by '#' may be included in the file. - * There may be one to NUM_QUANT_TBLS tables in the file, each of 64 values. - * The tables are implicitly numbered 0,1,etc. - * NOTE: does not affect the qslots mapping, which will default to selecting - * table 0 for luminance (or primary) components, 1 for chrominance components. - * You must use -qslots if you want a different component->table mapping. - */ -{ - FILE * fp; - int tblno, i, termchar; - long val; - unsigned int table[DCTSIZE2]; - - if ((fp = fopen(filename, "r")) == NULL) { - fprintf(stderr, "Can't open table file %s\n", filename); - return FALSE; - } - tblno = 0; - - while (read_text_integer(fp, &val, &termchar)) { /* read 1st element of table */ - if (tblno >= NUM_QUANT_TBLS) { - fprintf(stderr, "Too many tables in file %s\n", filename); - fclose(fp); - return FALSE; - } - table[0] = (unsigned int) val; - for (i = 1; i < DCTSIZE2; i++) { - if (! read_text_integer(fp, &val, &termchar)) { - fprintf(stderr, "Invalid table data in file %s\n", filename); - fclose(fp); - return FALSE; - } - table[i] = (unsigned int) val; - } - jpeg_add_quant_table(cinfo, tblno, table, scale_factor, force_baseline); - tblno++; - } - - if (termchar != EOF) { - fprintf(stderr, "Non-numeric data in file %s\n", filename); - fclose(fp); - return FALSE; - } - - fclose(fp); - return TRUE; -} - - -#ifdef C_MULTISCAN_FILES_SUPPORTED - -LOCAL(boolean) -read_scan_integer (FILE * file, long * result, int * termchar) -/* Variant of read_text_integer that always looks for a non-space termchar; - * this simplifies parsing of punctuation in scan scripts. - */ -{ - register int ch; - - if (! read_text_integer(file, result, termchar)) - return FALSE; - ch = *termchar; - while (ch != EOF && isspace(ch)) - ch = text_getc(file); - if (isdigit(ch)) { /* oops, put it back */ - if (ungetc(ch, file) == EOF) - return FALSE; - ch = ' '; - } else { - /* Any separators other than ';' and ':' are ignored; - * this allows user to insert commas, etc, if desired. - */ - if (ch != EOF && ch != ';' && ch != ':') - ch = ' '; - } - *termchar = ch; - return TRUE; -} - - -GLOBAL(boolean) -read_scan_script (j_compress_ptr cinfo, char * filename) -/* Read a scan script from the specified text file. - * Each entry in the file defines one scan to be emitted. - * Entries are separated by semicolons ';'. - * An entry contains one to four component indexes, - * optionally followed by a colon ':' and four progressive-JPEG parameters. - * The component indexes denote which component(s) are to be transmitted - * in the current scan. The first component has index 0. - * Sequential JPEG is used if the progressive-JPEG parameters are omitted. - * The file is free format text: any whitespace may appear between numbers - * and the ':' and ';' punctuation marks. Also, other punctuation (such - * as commas or dashes) can be placed between numbers if desired. - * Comments preceded by '#' may be included in the file. - * Note: we do very little validity checking here; - * jcmaster.c will validate the script parameters. - */ -{ - FILE * fp; - int scanno, ncomps, termchar; - long val; - jpeg_scan_info * scanptr; -#define MAX_SCANS 100 /* quite arbitrary limit */ - jpeg_scan_info scans[MAX_SCANS]; - - if ((fp = fopen(filename, "r")) == NULL) { - fprintf(stderr, "Can't open scan definition file %s\n", filename); - return FALSE; - } - scanptr = scans; - scanno = 0; - - while (read_scan_integer(fp, &val, &termchar)) { - if (scanno >= MAX_SCANS) { - fprintf(stderr, "Too many scans defined in file %s\n", filename); - fclose(fp); - return FALSE; - } - scanptr->component_index[0] = (int) val; - ncomps = 1; - while (termchar == ' ') { - if (ncomps >= MAX_COMPS_IN_SCAN) { - fprintf(stderr, "Too many components in one scan in file %s\n", - filename); - fclose(fp); - return FALSE; - } - if (! read_scan_integer(fp, &val, &termchar)) - goto bogus; - scanptr->component_index[ncomps] = (int) val; - ncomps++; - } - scanptr->comps_in_scan = ncomps; - if (termchar == ':') { - if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ') - goto bogus; - scanptr->Ss = (int) val; - if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ') - goto bogus; - scanptr->Se = (int) val; - if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ') - goto bogus; - scanptr->Ah = (int) val; - if (! read_scan_integer(fp, &val, &termchar)) - goto bogus; - scanptr->Al = (int) val; - } else { - /* set non-progressive parameters */ - scanptr->Ss = 0; - scanptr->Se = DCTSIZE2-1; - scanptr->Ah = 0; - scanptr->Al = 0; - } - if (termchar != ';' && termchar != EOF) { -bogus: - fprintf(stderr, "Invalid scan entry format in file %s\n", filename); - fclose(fp); - return FALSE; - } - scanptr++, scanno++; - } - - if (termchar != EOF) { - fprintf(stderr, "Non-numeric data in file %s\n", filename); - fclose(fp); - return FALSE; - } - - if (scanno > 0) { - /* Stash completed scan list in cinfo structure. - * NOTE: for cjpeg's use, JPOOL_IMAGE is the right lifetime for this data, - * but if you want to compress multiple images you'd want JPOOL_PERMANENT. - */ - scanptr = (jpeg_scan_info *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - scanno * SIZEOF(jpeg_scan_info)); - MEMCOPY(scanptr, scans, scanno * SIZEOF(jpeg_scan_info)); - cinfo->scan_info = scanptr; - cinfo->num_scans = scanno; - } - - fclose(fp); - return TRUE; -} - -#endif /* C_MULTISCAN_FILES_SUPPORTED */ - - -GLOBAL(boolean) -set_quant_slots (j_compress_ptr cinfo, char *arg) -/* Process a quantization-table-selectors parameter string, of the form - * N[,N,...] - * If there are more components than parameters, the last value is replicated. - */ -{ - int val = 0; /* default table # */ - int ci; - char ch; - - for (ci = 0; ci < MAX_COMPONENTS; ci++) { - if (*arg) { - ch = ','; /* if not set by sscanf, will be ',' */ - if (sscanf(arg, "%d%c", &val, &ch) < 1) - return FALSE; - if (ch != ',') /* syntax check */ - return FALSE; - if (val < 0 || val >= NUM_QUANT_TBLS) { - fprintf(stderr, "JPEG quantization tables are numbered 0..%d\n", - NUM_QUANT_TBLS-1); - return FALSE; - } - cinfo->comp_info[ci].quant_tbl_no = val; - while (*arg && *arg++ != ',') /* advance to next segment of arg string */ - ; - } else { - /* reached end of parameter, set remaining components to last table */ - cinfo->comp_info[ci].quant_tbl_no = val; - } - } - return TRUE; -} - - -GLOBAL(boolean) -set_sample_factors (j_compress_ptr cinfo, char *arg) -/* Process a sample-factors parameter string, of the form - * HxV[,HxV,...] - * If there are more components than parameters, "1x1" is assumed for the rest. - */ -{ - int ci, val1, val2; - char ch1, ch2; - - for (ci = 0; ci < MAX_COMPONENTS; ci++) { - if (*arg) { - ch2 = ','; /* if not set by sscanf, will be ',' */ - if (sscanf(arg, "%d%c%d%c", &val1, &ch1, &val2, &ch2) < 3) - return FALSE; - if ((ch1 != 'x' && ch1 != 'X') || ch2 != ',') /* syntax check */ - return FALSE; - if (val1 <= 0 || val1 > 4 || val2 <= 0 || val2 > 4) { - fprintf(stderr, "JPEG sampling factors must be 1..4\n"); - return FALSE; - } - cinfo->comp_info[ci].h_samp_factor = val1; - cinfo->comp_info[ci].v_samp_factor = val2; - while (*arg && *arg++ != ',') /* advance to next segment of arg string */ - ; - } else { - /* reached end of parameter, set remaining components to 1x1 sampling */ - cinfo->comp_info[ci].h_samp_factor = 1; - cinfo->comp_info[ci].v_samp_factor = 1; - } - } - return TRUE; -} diff --git a/gtkmm-osx/trunk/jpeg-6b/rdtarga.c b/gtkmm-osx/trunk/jpeg-6b/rdtarga.c deleted file mode 100644 index 4c2cd26..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/rdtarga.c +++ /dev/null @@ -1,500 +0,0 @@ -/* - * rdtarga.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to read input images in Targa format. - * - * These routines may need modification for non-Unix environments or - * specialized applications. As they stand, they assume input from - * an ordinary stdio stream. They further assume that reading begins - * at the start of the file; start_input may need work if the - * user interface has already read some data (e.g., to determine that - * the file is indeed Targa format). - * - * Based on code contributed by Lee Daniel Crocker. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef TARGA_SUPPORTED - - -/* Macros to deal with unsigned chars as efficiently as compiler allows */ - -#ifdef HAVE_UNSIGNED_CHAR -typedef unsigned char U_CHAR; -#define UCH(x) ((int) (x)) -#else /* !HAVE_UNSIGNED_CHAR */ -#ifdef CHAR_IS_UNSIGNED -typedef char U_CHAR; -#define UCH(x) ((int) (x)) -#else -typedef char U_CHAR; -#define UCH(x) ((int) (x) & 0xFF) -#endif -#endif /* HAVE_UNSIGNED_CHAR */ - - -#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len))) - - -/* Private version of data source object */ - -typedef struct _tga_source_struct * tga_source_ptr; - -typedef struct _tga_source_struct { - struct cjpeg_source_struct pub; /* public fields */ - - j_compress_ptr cinfo; /* back link saves passing separate parm */ - - JSAMPARRAY colormap; /* Targa colormap (converted to my format) */ - - jvirt_sarray_ptr whole_image; /* Needed if funny input row order */ - JDIMENSION current_row; /* Current logical row number to read */ - - /* Pointer to routine to extract next Targa pixel from input file */ - JMETHOD(void, read_pixel, (tga_source_ptr sinfo)); - - /* Result of read_pixel is delivered here: */ - U_CHAR tga_pixel[4]; - - int pixel_size; /* Bytes per Targa pixel (1 to 4) */ - - /* State info for reading RLE-coded pixels; both counts must be init to 0 */ - int block_count; /* # of pixels remaining in RLE block */ - int dup_pixel_count; /* # of times to duplicate previous pixel */ - - /* This saves the correct pixel-row-expansion method for preload_image */ - JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo, - cjpeg_source_ptr sinfo)); -} tga_source_struct; - - -/* For expanding 5-bit pixel values to 8-bit with best rounding */ - -static const UINT8 c5to8bits[32] = { - 0, 8, 16, 25, 33, 41, 49, 58, - 66, 74, 82, 90, 99, 107, 115, 123, - 132, 140, 148, 156, 165, 173, 181, 189, - 197, 206, 214, 222, 230, 239, 247, 255 -}; - - - -LOCAL(int) -read_byte (tga_source_ptr sinfo) -/* Read next byte from Targa file */ -{ - register FILE *infile = sinfo->pub.input_file; - register int c; - - if ((c = getc(infile)) == EOF) - ERREXIT(sinfo->cinfo, JERR_INPUT_EOF); - return c; -} - - -LOCAL(void) -read_colormap (tga_source_ptr sinfo, int cmaplen, int mapentrysize) -/* Read the colormap from a Targa file */ -{ - int i; - - /* Presently only handles 24-bit BGR format */ - if (mapentrysize != 24) - ERREXIT(sinfo->cinfo, JERR_TGA_BADCMAP); - - for (i = 0; i < cmaplen; i++) { - sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo); - sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo); - sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo); - } -} - - -/* - * read_pixel methods: get a single pixel from Targa file into tga_pixel[] - */ - -METHODDEF(void) -read_non_rle_pixel (tga_source_ptr sinfo) -/* Read one Targa pixel from the input file; no RLE expansion */ -{ - register FILE *infile = sinfo->pub.input_file; - register int i; - - for (i = 0; i < sinfo->pixel_size; i++) { - sinfo->tga_pixel[i] = (U_CHAR) getc(infile); - } -} - - -METHODDEF(void) -read_rle_pixel (tga_source_ptr sinfo) -/* Read one Targa pixel from the input file, expanding RLE data as needed */ -{ - register FILE *infile = sinfo->pub.input_file; - register int i; - - /* Duplicate previously read pixel? */ - if (sinfo->dup_pixel_count > 0) { - sinfo->dup_pixel_count--; - return; - } - - /* Time to read RLE block header? */ - if (--sinfo->block_count < 0) { /* decrement pixels remaining in block */ - i = read_byte(sinfo); - if (i & 0x80) { /* Start of duplicate-pixel block? */ - sinfo->dup_pixel_count = i & 0x7F; /* number of dups after this one */ - sinfo->block_count = 0; /* then read new block header */ - } else { - sinfo->block_count = i & 0x7F; /* number of pixels after this one */ - } - } - - /* Read next pixel */ - for (i = 0; i < sinfo->pixel_size; i++) { - sinfo->tga_pixel[i] = (U_CHAR) getc(infile); - } -} - - -/* - * Read one row of pixels. - * - * We provide several different versions depending on input file format. - */ - - -METHODDEF(JDIMENSION) -get_8bit_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading 8-bit grayscale pixels */ -{ - tga_source_ptr source = (tga_source_ptr) sinfo; - register JSAMPROW ptr; - register JDIMENSION col; - - ptr = source->pub.buffer[0]; - for (col = cinfo->image_width; col > 0; col--) { - (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ - *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]); - } - return 1; -} - -METHODDEF(JDIMENSION) -get_8bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading 8-bit colormap indexes */ -{ - tga_source_ptr source = (tga_source_ptr) sinfo; - register int t; - register JSAMPROW ptr; - register JDIMENSION col; - register JSAMPARRAY colormap = source->colormap; - - ptr = source->pub.buffer[0]; - for (col = cinfo->image_width; col > 0; col--) { - (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ - t = UCH(source->tga_pixel[0]); - *ptr++ = colormap[0][t]; - *ptr++ = colormap[1][t]; - *ptr++ = colormap[2][t]; - } - return 1; -} - -METHODDEF(JDIMENSION) -get_16bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading 16-bit pixels */ -{ - tga_source_ptr source = (tga_source_ptr) sinfo; - register int t; - register JSAMPROW ptr; - register JDIMENSION col; - - ptr = source->pub.buffer[0]; - for (col = cinfo->image_width; col > 0; col--) { - (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ - t = UCH(source->tga_pixel[0]); - t += UCH(source->tga_pixel[1]) << 8; - /* We expand 5 bit data to 8 bit sample width. - * The format of the 16-bit (LSB first) input word is - * xRRRRRGGGGGBBBBB - */ - ptr[2] = (JSAMPLE) c5to8bits[t & 0x1F]; - t >>= 5; - ptr[1] = (JSAMPLE) c5to8bits[t & 0x1F]; - t >>= 5; - ptr[0] = (JSAMPLE) c5to8bits[t & 0x1F]; - ptr += 3; - } - return 1; -} - -METHODDEF(JDIMENSION) -get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -/* This version is for reading 24-bit pixels */ -{ - tga_source_ptr source = (tga_source_ptr) sinfo; - register JSAMPROW ptr; - register JDIMENSION col; - - ptr = source->pub.buffer[0]; - for (col = cinfo->image_width; col > 0; col--) { - (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ - *ptr++ = (JSAMPLE) UCH(source->tga_pixel[2]); /* change BGR to RGB order */ - *ptr++ = (JSAMPLE) UCH(source->tga_pixel[1]); - *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]); - } - return 1; -} - -/* - * Targa also defines a 32-bit pixel format with order B,G,R,A. - * We presently ignore the attribute byte, so the code for reading - * these pixels is identical to the 24-bit routine above. - * This works because the actual pixel length is only known to read_pixel. - */ - -#define get_32bit_row get_24bit_row - - -/* - * This method is for re-reading the input data in standard top-down - * row order. The entire image has already been read into whole_image - * with proper conversion of pixel format, but it's in a funny row order. - */ - -METHODDEF(JDIMENSION) -get_memory_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - tga_source_ptr source = (tga_source_ptr) sinfo; - JDIMENSION source_row; - - /* Compute row of source that maps to current_row of normal order */ - /* For now, assume image is bottom-up and not interlaced. */ - /* NEEDS WORK to support interlaced images! */ - source_row = cinfo->image_height - source->current_row - 1; - - /* Fetch that row from virtual array */ - source->pub.buffer = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, source->whole_image, - source_row, (JDIMENSION) 1, FALSE); - - source->current_row++; - return 1; -} - - -/* - * This method loads the image into whole_image during the first call on - * get_pixel_rows. The get_pixel_rows pointer is then adjusted to call - * get_memory_row on subsequent calls. - */ - -METHODDEF(JDIMENSION) -preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - tga_source_ptr source = (tga_source_ptr) sinfo; - JDIMENSION row; - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; - - /* Read the data into a virtual array in input-file row order. */ - for (row = 0; row < cinfo->image_height; row++) { - if (progress != NULL) { - progress->pub.pass_counter = (long) row; - progress->pub.pass_limit = (long) cinfo->image_height; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } - source->pub.buffer = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, source->whole_image, row, (JDIMENSION) 1, TRUE); - (*source->get_pixel_rows) (cinfo, sinfo); - } - if (progress != NULL) - progress->completed_extra_passes++; - - /* Set up to read from the virtual array in unscrambled order */ - source->pub.get_pixel_rows = get_memory_row; - source->current_row = 0; - /* And read the first row */ - return get_memory_row(cinfo, sinfo); -} - - -/* - * Read the file header; return image size and component count. - */ - -METHODDEF(void) -start_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - tga_source_ptr source = (tga_source_ptr) sinfo; - U_CHAR targaheader[18]; - int idlen, cmaptype, subtype, flags, interlace_type, components; - unsigned int width, height, maplen; - boolean is_bottom_up; - -#define GET_2B(offset) ((unsigned int) UCH(targaheader[offset]) + \ - (((unsigned int) UCH(targaheader[offset+1])) << 8)) - - if (! ReadOK(source->pub.input_file, targaheader, 18)) - ERREXIT(cinfo, JERR_INPUT_EOF); - - /* Pretend "15-bit" pixels are 16-bit --- we ignore attribute bit anyway */ - if (targaheader[16] == 15) - targaheader[16] = 16; - - idlen = UCH(targaheader[0]); - cmaptype = UCH(targaheader[1]); - subtype = UCH(targaheader[2]); - maplen = GET_2B(5); - width = GET_2B(12); - height = GET_2B(14); - source->pixel_size = UCH(targaheader[16]) >> 3; - flags = UCH(targaheader[17]); /* Image Descriptor byte */ - - is_bottom_up = ((flags & 0x20) == 0); /* bit 5 set => top-down */ - interlace_type = flags >> 6; /* bits 6/7 are interlace code */ - - if (cmaptype > 1 || /* cmaptype must be 0 or 1 */ - source->pixel_size < 1 || source->pixel_size > 4 || - (UCH(targaheader[16]) & 7) != 0 || /* bits/pixel must be multiple of 8 */ - interlace_type != 0) /* currently don't allow interlaced image */ - ERREXIT(cinfo, JERR_TGA_BADPARMS); - - if (subtype > 8) { - /* It's an RLE-coded file */ - source->read_pixel = read_rle_pixel; - source->block_count = source->dup_pixel_count = 0; - subtype -= 8; - } else { - /* Non-RLE file */ - source->read_pixel = read_non_rle_pixel; - } - - /* Now should have subtype 1, 2, or 3 */ - components = 3; /* until proven different */ - cinfo->in_color_space = JCS_RGB; - - switch (subtype) { - case 1: /* Colormapped image */ - if (source->pixel_size == 1 && cmaptype == 1) - source->get_pixel_rows = get_8bit_row; - else - ERREXIT(cinfo, JERR_TGA_BADPARMS); - TRACEMS2(cinfo, 1, JTRC_TGA_MAPPED, width, height); - break; - case 2: /* RGB image */ - switch (source->pixel_size) { - case 2: - source->get_pixel_rows = get_16bit_row; - break; - case 3: - source->get_pixel_rows = get_24bit_row; - break; - case 4: - source->get_pixel_rows = get_32bit_row; - break; - default: - ERREXIT(cinfo, JERR_TGA_BADPARMS); - break; - } - TRACEMS2(cinfo, 1, JTRC_TGA, width, height); - break; - case 3: /* Grayscale image */ - components = 1; - cinfo->in_color_space = JCS_GRAYSCALE; - if (source->pixel_size == 1) - source->get_pixel_rows = get_8bit_gray_row; - else - ERREXIT(cinfo, JERR_TGA_BADPARMS); - TRACEMS2(cinfo, 1, JTRC_TGA_GRAY, width, height); - break; - default: - ERREXIT(cinfo, JERR_TGA_BADPARMS); - break; - } - - if (is_bottom_up) { - /* Create a virtual array to buffer the upside-down image. */ - source->whole_image = (*cinfo->mem->request_virt_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, - (JDIMENSION) width * components, (JDIMENSION) height, (JDIMENSION) 1); - if (cinfo->progress != NULL) { - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; - progress->total_extra_passes++; /* count file input as separate pass */ - } - /* source->pub.buffer will point to the virtual array. */ - source->pub.buffer_height = 1; /* in case anyone looks at it */ - source->pub.get_pixel_rows = preload_image; - } else { - /* Don't need a virtual array, but do need a one-row input buffer. */ - source->whole_image = NULL; - source->pub.buffer = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - (JDIMENSION) width * components, (JDIMENSION) 1); - source->pub.buffer_height = 1; - source->pub.get_pixel_rows = source->get_pixel_rows; - } - - while (idlen--) /* Throw away ID field */ - (void) read_byte(source); - - if (maplen > 0) { - if (maplen > 256 || GET_2B(3) != 0) - ERREXIT(cinfo, JERR_TGA_BADCMAP); - /* Allocate space to store the colormap */ - source->colormap = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, (JDIMENSION) maplen, (JDIMENSION) 3); - /* and read it from the file */ - read_colormap(source, (int) maplen, UCH(targaheader[7])); - } else { - if (cmaptype) /* but you promised a cmap! */ - ERREXIT(cinfo, JERR_TGA_BADPARMS); - source->colormap = NULL; - } - - cinfo->input_components = components; - cinfo->data_precision = 8; - cinfo->image_width = width; - cinfo->image_height = height; -} - - -/* - * Finish up at the end of the file. - */ - -METHODDEF(void) -finish_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) -{ - /* no work */ -} - - -/* - * The module selection routine for Targa format input. - */ - -GLOBAL(cjpeg_source_ptr) -jinit_read_targa (j_compress_ptr cinfo) -{ - tga_source_ptr source; - - /* Create module interface object */ - source = (tga_source_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(tga_source_struct)); - source->cinfo = cinfo; /* make back link for subroutines */ - /* Fill in method ptrs, except get_pixel_rows which start_input sets */ - source->pub.start_input = start_input_tga; - source->pub.finish_input = finish_input_tga; - - return (cjpeg_source_ptr) source; -} - -#endif /* TARGA_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/structure.doc b/gtkmm-osx/trunk/jpeg-6b/structure.doc deleted file mode 100644 index 51c9def..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/structure.doc +++ /dev/null @@ -1,948 +0,0 @@ -IJG JPEG LIBRARY: SYSTEM ARCHITECTURE - -Copyright (C) 1991-1995, Thomas G. Lane. -This file is part of the Independent JPEG Group's software. -For conditions of distribution and use, see the accompanying README file. - - -This file provides an overview of the architecture of the IJG JPEG software; -that is, the functions of the various modules in the system and the interfaces -between modules. For more precise details about any data structure or calling -convention, see the include files and comments in the source code. - -We assume that the reader is already somewhat familiar with the JPEG standard. -The README file includes references for learning about JPEG. The file -libjpeg.doc describes the library from the viewpoint of an application -programmer using the library; it's best to read that file before this one. -Also, the file coderules.doc describes the coding style conventions we use. - -In this document, JPEG-specific terminology follows the JPEG standard: - A "component" means a color channel, e.g., Red or Luminance. - A "sample" is a single component value (i.e., one number in the image data). - A "coefficient" is a frequency coefficient (a DCT transform output number). - A "block" is an 8x8 group of samples or coefficients. - An "MCU" (minimum coded unit) is an interleaved set of blocks of size - determined by the sampling factors, or a single block in a - noninterleaved scan. -We do not use the terms "pixel" and "sample" interchangeably. When we say -pixel, we mean an element of the full-size image, while a sample is an element -of the downsampled image. Thus the number of samples may vary across -components while the number of pixels does not. (This terminology is not used -rigorously throughout the code, but it is used in places where confusion would -otherwise result.) - - -*** System features *** - -The IJG distribution contains two parts: - * A subroutine library for JPEG compression and decompression. - * cjpeg/djpeg, two sample applications that use the library to transform - JFIF JPEG files to and from several other image formats. -cjpeg/djpeg are of no great intellectual complexity: they merely add a simple -command-line user interface and I/O routines for several uncompressed image -formats. This document concentrates on the library itself. - -We desire the library to be capable of supporting all JPEG baseline, extended -sequential, and progressive DCT processes. Hierarchical processes are not -supported. - -The library does not support the lossless (spatial) JPEG process. Lossless -JPEG shares little or no code with lossy JPEG, and would normally be used -without the extensive pre- and post-processing provided by this library. -We feel that lossless JPEG is better handled by a separate library. - -Within these limits, any set of compression parameters allowed by the JPEG -spec should be readable for decompression. (We can be more restrictive about -what formats we can generate.) Although the system design allows for all -parameter values, some uncommon settings are not yet implemented and may -never be; nonintegral sampling ratios are the prime example. Furthermore, -we treat 8-bit vs. 12-bit data precision as a compile-time switch, not a -run-time option, because most machines can store 8-bit pixels much more -compactly than 12-bit. - -For legal reasons, JPEG arithmetic coding is not currently supported, but -extending the library to include it would be straightforward. - -By itself, the library handles only interchange JPEG datastreams --- in -particular the widely used JFIF file format. The library can be used by -surrounding code to process interchange or abbreviated JPEG datastreams that -are embedded in more complex file formats. (For example, libtiff uses this -library to implement JPEG compression within the TIFF file format.) - -The library includes a substantial amount of code that is not covered by the -JPEG standard but is necessary for typical applications of JPEG. These -functions preprocess the image before JPEG compression or postprocess it after -decompression. They include colorspace conversion, downsampling/upsampling, -and color quantization. This code can be omitted if not needed. - -A wide range of quality vs. speed tradeoffs are possible in JPEG processing, -and even more so in decompression postprocessing. The decompression library -provides multiple implementations that cover most of the useful tradeoffs, -ranging from very-high-quality down to fast-preview operation. On the -compression side we have generally not provided low-quality choices, since -compression is normally less time-critical. It should be understood that the -low-quality modes may not meet the JPEG standard's accuracy requirements; -nonetheless, they are useful for viewers. - - -*** Portability issues *** - -Portability is an essential requirement for the library. The key portability -issues that show up at the level of system architecture are: - -1. Memory usage. We want the code to be able to run on PC-class machines -with limited memory. Images should therefore be processed sequentially (in -strips), to avoid holding the whole image in memory at once. Where a -full-image buffer is necessary, we should be able to use either virtual memory -or temporary files. - -2. Near/far pointer distinction. To run efficiently on 80x86 machines, the -code should distinguish "small" objects (kept in near data space) from -"large" ones (kept in far data space). This is an annoying restriction, but -fortunately it does not impact code quality for less brain-damaged machines, -and the source code clutter turns out to be minimal with sufficient use of -pointer typedefs. - -3. Data precision. We assume that "char" is at least 8 bits, "short" and -"int" at least 16, "long" at least 32. The code will work fine with larger -data sizes, although memory may be used inefficiently in some cases. However, -the JPEG compressed datastream must ultimately appear on external storage as a -sequence of 8-bit bytes if it is to conform to the standard. This may pose a -problem on machines where char is wider than 8 bits. The library represents -compressed data as an array of values of typedef JOCTET. If no data type -exactly 8 bits wide is available, custom data source and data destination -modules must be written to unpack and pack the chosen JOCTET datatype into -8-bit external representation. - - -*** System overview *** - -The compressor and decompressor are each divided into two main sections: -the JPEG compressor or decompressor proper, and the preprocessing or -postprocessing functions. The interface between these two sections is the -image data that the official JPEG spec regards as its input or output: this -data is in the colorspace to be used for compression, and it is downsampled -to the sampling factors to be used. The preprocessing and postprocessing -steps are responsible for converting a normal image representation to or from -this form. (Those few applications that want to deal with YCbCr downsampled -data can skip the preprocessing or postprocessing step.) - -Looking more closely, the compressor library contains the following main -elements: - - Preprocessing: - * Color space conversion (e.g., RGB to YCbCr). - * Edge expansion and downsampling. Optionally, this step can do simple - smoothing --- this is often helpful for low-quality source data. - JPEG proper: - * MCU assembly, DCT, quantization. - * Entropy coding (sequential or progressive, Huffman or arithmetic). - -In addition to these modules we need overall control, marker generation, -and support code (memory management & error handling). There is also a -module responsible for physically writing the output data --- typically -this is just an interface to fwrite(), but some applications may need to -do something else with the data. - -The decompressor library contains the following main elements: - - JPEG proper: - * Entropy decoding (sequential or progressive, Huffman or arithmetic). - * Dequantization, inverse DCT, MCU disassembly. - Postprocessing: - * Upsampling. Optionally, this step may be able to do more general - rescaling of the image. - * Color space conversion (e.g., YCbCr to RGB). This step may also - provide gamma adjustment [ currently it does not ]. - * Optional color quantization (e.g., reduction to 256 colors). - * Optional color precision reduction (e.g., 24-bit to 15-bit color). - [This feature is not currently implemented.] - -We also need overall control, marker parsing, and a data source module. -The support code (memory management & error handling) can be shared with -the compression half of the library. - -There may be several implementations of each of these elements, particularly -in the decompressor, where a wide range of speed/quality tradeoffs is very -useful. It must be understood that some of the best speedups involve -merging adjacent steps in the pipeline. For example, upsampling, color space -conversion, and color quantization might all be done at once when using a -low-quality ordered-dither technique. The system architecture is designed to -allow such merging where appropriate. - - -Note: it is convenient to regard edge expansion (padding to block boundaries) -as a preprocessing/postprocessing function, even though the JPEG spec includes -it in compression/decompression. We do this because downsampling/upsampling -can be simplified a little if they work on padded data: it's not necessary to -have special cases at the right and bottom edges. Therefore the interface -buffer is always an integral number of blocks wide and high, and we expect -compression preprocessing to pad the source data properly. Padding will occur -only to the next block (8-sample) boundary. In an interleaved-scan situation, -additional dummy blocks may be used to fill out MCUs, but the MCU assembly and -disassembly logic will create or discard these blocks internally. (This is -advantageous for speed reasons, since we avoid DCTing the dummy blocks. -It also permits a small reduction in file size, because the compressor can -choose dummy block contents so as to minimize their size in compressed form. -Finally, it makes the interface buffer specification independent of whether -the file is actually interleaved or not.) Applications that wish to deal -directly with the downsampled data must provide similar buffering and padding -for odd-sized images. - - -*** Poor man's object-oriented programming *** - -It should be clear by now that we have a lot of quasi-independent processing -steps, many of which have several possible behaviors. To avoid cluttering the -code with lots of switch statements, we use a simple form of object-style -programming to separate out the different possibilities. - -For example, two different color quantization algorithms could be implemented -as two separate modules that present the same external interface; at runtime, -the calling code will access the proper module indirectly through an "object". - -We can get the limited features we need while staying within portable C. -The basic tool is a function pointer. An "object" is just a struct -containing one or more function pointer fields, each of which corresponds to -a method name in real object-oriented languages. During initialization we -fill in the function pointers with references to whichever module we have -determined we need to use in this run. Then invocation of the module is done -by indirecting through a function pointer; on most machines this is no more -expensive than a switch statement, which would be the only other way of -making the required run-time choice. The really significant benefit, of -course, is keeping the source code clean and well structured. - -We can also arrange to have private storage that varies between different -implementations of the same kind of object. We do this by making all the -module-specific object structs be separately allocated entities, which will -be accessed via pointers in the master compression or decompression struct. -The "public" fields or methods for a given kind of object are specified by -a commonly known struct. But a module's initialization code can allocate -a larger struct that contains the common struct as its first member, plus -additional private fields. With appropriate pointer casting, the module's -internal functions can access these private fields. (For a simple example, -see jdatadst.c, which implements the external interface specified by struct -jpeg_destination_mgr, but adds extra fields.) - -(Of course this would all be a lot easier if we were using C++, but we are -not yet prepared to assume that everyone has a C++ compiler.) - -An important benefit of this scheme is that it is easy to provide multiple -versions of any method, each tuned to a particular case. While a lot of -precalculation might be done to select an optimal implementation of a method, -the cost per invocation is constant. For example, the upsampling step might -have a "generic" method, plus one or more "hardwired" methods for the most -popular sampling factors; the hardwired methods would be faster because they'd -use straight-line code instead of for-loops. The cost to determine which -method to use is paid only once, at startup, and the selection criteria are -hidden from the callers of the method. - -This plan differs a little bit from usual object-oriented structures, in that -only one instance of each object class will exist during execution. The -reason for having the class structure is that on different runs we may create -different instances (choose to execute different modules). You can think of -the term "method" as denoting the common interface presented by a particular -set of interchangeable functions, and "object" as denoting a group of related -methods, or the total shared interface behavior of a group of modules. - - -*** Overall control structure *** - -We previously mentioned the need for overall control logic in the compression -and decompression libraries. In IJG implementations prior to v5, overall -control was mostly provided by "pipeline control" modules, which proved to be -large, unwieldy, and hard to understand. To improve the situation, the -control logic has been subdivided into multiple modules. The control modules -consist of: - -1. Master control for module selection and initialization. This has two -responsibilities: - - 1A. Startup initialization at the beginning of image processing. - The individual processing modules to be used in this run are selected - and given initialization calls. - - 1B. Per-pass control. This determines how many passes will be performed - and calls each active processing module to configure itself - appropriately at the beginning of each pass. End-of-pass processing, - where necessary, is also invoked from the master control module. - - Method selection is partially distributed, in that a particular processing - module may contain several possible implementations of a particular method, - which it will select among when given its initialization call. The master - control code need only be concerned with decisions that affect more than - one module. - -2. Data buffering control. A separate control module exists for each - inter-processing-step data buffer. This module is responsible for - invoking the processing steps that write or read that data buffer. - -Each buffer controller sees the world as follows: - -input data => processing step A => buffer => processing step B => output data - | | | - ------------------ controller ------------------ - -The controller knows the dataflow requirements of steps A and B: how much data -they want to accept in one chunk and how much they output in one chunk. Its -function is to manage its buffer and call A and B at the proper times. - -A data buffer control module may itself be viewed as a processing step by a -higher-level control module; thus the control modules form a binary tree with -elementary processing steps at the leaves of the tree. - -The control modules are objects. A considerable amount of flexibility can -be had by replacing implementations of a control module. For example: -* Merging of adjacent steps in the pipeline is done by replacing a control - module and its pair of processing-step modules with a single processing- - step module. (Hence the possible merges are determined by the tree of - control modules.) -* In some processing modes, a given interstep buffer need only be a "strip" - buffer large enough to accommodate the desired data chunk sizes. In other - modes, a full-image buffer is needed and several passes are required. - The control module determines which kind of buffer is used and manipulates - virtual array buffers as needed. One or both processing steps may be - unaware of the multi-pass behavior. - -In theory, we might be able to make all of the data buffer controllers -interchangeable and provide just one set of implementations for all. In -practice, each one contains considerable special-case processing for its -particular job. The buffer controller concept should be regarded as an -overall system structuring principle, not as a complete description of the -task performed by any one controller. - - -*** Compression object structure *** - -Here is a sketch of the logical structure of the JPEG compression library: - - |-- Colorspace conversion - |-- Preprocessing controller --| - | |-- Downsampling -Main controller --| - | |-- Forward DCT, quantize - |-- Coefficient controller --| - |-- Entropy encoding - -This sketch also describes the flow of control (subroutine calls) during -typical image data processing. Each of the components shown in the diagram is -an "object" which may have several different implementations available. One -or more source code files contain the actual implementation(s) of each object. - -The objects shown above are: - -* Main controller: buffer controller for the subsampled-data buffer, which - holds the preprocessed input data. This controller invokes preprocessing to - fill the subsampled-data buffer, and JPEG compression to empty it. There is - usually no need for a full-image buffer here; a strip buffer is adequate. - -* Preprocessing controller: buffer controller for the downsampling input data - buffer, which lies between colorspace conversion and downsampling. Note - that a unified conversion/downsampling module would probably replace this - controller entirely. - -* Colorspace conversion: converts application image data into the desired - JPEG color space; also changes the data from pixel-interleaved layout to - separate component planes. Processes one pixel row at a time. - -* Downsampling: performs reduction of chroma components as required. - Optionally may perform pixel-level smoothing as well. Processes a "row - group" at a time, where a row group is defined as Vmax pixel rows of each - component before downsampling, and Vk sample rows afterwards (remember Vk - differs across components). Some downsampling or smoothing algorithms may - require context rows above and below the current row group; the - preprocessing controller is responsible for supplying these rows via proper - buffering. The downsampler is responsible for edge expansion at the right - edge (i.e., extending each sample row to a multiple of 8 samples); but the - preprocessing controller is responsible for vertical edge expansion (i.e., - duplicating the bottom sample row as needed to make a multiple of 8 rows). - -* Coefficient controller: buffer controller for the DCT-coefficient data. - This controller handles MCU assembly, including insertion of dummy DCT - blocks when needed at the right or bottom edge. When performing - Huffman-code optimization or emitting a multiscan JPEG file, this - controller is responsible for buffering the full image. The equivalent of - one fully interleaved MCU row of subsampled data is processed per call, - even when the JPEG file is noninterleaved. - -* Forward DCT and quantization: Perform DCT, quantize, and emit coefficients. - Works on one or more DCT blocks at a time. (Note: the coefficients are now - emitted in normal array order, which the entropy encoder is expected to - convert to zigzag order as necessary. Prior versions of the IJG code did - the conversion to zigzag order within the quantization step.) - -* Entropy encoding: Perform Huffman or arithmetic entropy coding and emit the - coded data to the data destination module. Works on one MCU per call. - For progressive JPEG, the same DCT blocks are fed to the entropy coder - during each pass, and the coder must emit the appropriate subset of - coefficients. - -In addition to the above objects, the compression library includes these -objects: - -* Master control: determines the number of passes required, controls overall - and per-pass initialization of the other modules. - -* Marker writing: generates JPEG markers (except for RSTn, which is emitted - by the entropy encoder when needed). - -* Data destination manager: writes the output JPEG datastream to its final - destination (e.g., a file). The destination manager supplied with the - library knows how to write to a stdio stream; for other behaviors, the - surrounding application may provide its own destination manager. - -* Memory manager: allocates and releases memory, controls virtual arrays - (with backing store management, where required). - -* Error handler: performs formatting and output of error and trace messages; - determines handling of nonfatal errors. The surrounding application may - override some or all of this object's methods to change error handling. - -* Progress monitor: supports output of "percent-done" progress reports. - This object represents an optional callback to the surrounding application: - if wanted, it must be supplied by the application. - -The error handler, destination manager, and progress monitor objects are -defined as separate objects in order to simplify application-specific -customization of the JPEG library. A surrounding application may override -individual methods or supply its own all-new implementation of one of these -objects. The object interfaces for these objects are therefore treated as -part of the application interface of the library, whereas the other objects -are internal to the library. - -The error handler and memory manager are shared by JPEG compression and -decompression; the progress monitor, if used, may be shared as well. - - -*** Decompression object structure *** - -Here is a sketch of the logical structure of the JPEG decompression library: - - |-- Entropy decoding - |-- Coefficient controller --| - | |-- Dequantize, Inverse DCT -Main controller --| - | |-- Upsampling - |-- Postprocessing controller --| |-- Colorspace conversion - |-- Color quantization - |-- Color precision reduction - -As before, this diagram also represents typical control flow. The objects -shown are: - -* Main controller: buffer controller for the subsampled-data buffer, which - holds the output of JPEG decompression proper. This controller's primary - task is to feed the postprocessing procedure. Some upsampling algorithms - may require context rows above and below the current row group; when this - is true, the main controller is responsible for managing its buffer so as - to make context rows available. In the current design, the main buffer is - always a strip buffer; a full-image buffer is never required. - -* Coefficient controller: buffer controller for the DCT-coefficient data. - This controller handles MCU disassembly, including deletion of any dummy - DCT blocks at the right or bottom edge. When reading a multiscan JPEG - file, this controller is responsible for buffering the full image. - (Buffering DCT coefficients, rather than samples, is necessary to support - progressive JPEG.) The equivalent of one fully interleaved MCU row of - subsampled data is processed per call, even when the source JPEG file is - noninterleaved. - -* Entropy decoding: Read coded data from the data source module and perform - Huffman or arithmetic entropy decoding. Works on one MCU per call. - For progressive JPEG decoding, the coefficient controller supplies the prior - coefficients of each MCU (initially all zeroes), which the entropy decoder - modifies in each scan. - -* Dequantization and inverse DCT: like it says. Note that the coefficients - buffered by the coefficient controller have NOT been dequantized; we - merge dequantization and inverse DCT into a single step for speed reasons. - When scaled-down output is asked for, simplified DCT algorithms may be used - that emit only 1x1, 2x2, or 4x4 samples per DCT block, not the full 8x8. - Works on one DCT block at a time. - -* Postprocessing controller: buffer controller for the color quantization - input buffer, when quantization is in use. (Without quantization, this - controller just calls the upsampler.) For two-pass quantization, this - controller is responsible for buffering the full-image data. - -* Upsampling: restores chroma components to full size. (May support more - general output rescaling, too. Note that if undersized DCT outputs have - been emitted by the DCT module, this module must adjust so that properly - sized outputs are created.) Works on one row group at a time. This module - also calls the color conversion module, so its top level is effectively a - buffer controller for the upsampling->color conversion buffer. However, in - all but the highest-quality operating modes, upsampling and color - conversion are likely to be merged into a single step. - -* Colorspace conversion: convert from JPEG color space to output color space, - and change data layout from separate component planes to pixel-interleaved. - Works on one pixel row at a time. - -* Color quantization: reduce the data to colormapped form, using either an - externally specified colormap or an internally generated one. This module - is not used for full-color output. Works on one pixel row at a time; may - require two passes to generate a color map. Note that the output will - always be a single component representing colormap indexes. In the current - design, the output values are JSAMPLEs, so an 8-bit compilation cannot - quantize to more than 256 colors. This is unlikely to be a problem in - practice. - -* Color reduction: this module handles color precision reduction, e.g., - generating 15-bit color (5 bits/primary) from JPEG's 24-bit output. - Not quite clear yet how this should be handled... should we merge it with - colorspace conversion??? - -Note that some high-speed operating modes might condense the entire -postprocessing sequence to a single module (upsample, color convert, and -quantize in one step). - -In addition to the above objects, the decompression library includes these -objects: - -* Master control: determines the number of passes required, controls overall - and per-pass initialization of the other modules. This is subdivided into - input and output control: jdinput.c controls only input-side processing, - while jdmaster.c handles overall initialization and output-side control. - -* Marker reading: decodes JPEG markers (except for RSTn). - -* Data source manager: supplies the input JPEG datastream. The source - manager supplied with the library knows how to read from a stdio stream; - for other behaviors, the surrounding application may provide its own source - manager. - -* Memory manager: same as for compression library. - -* Error handler: same as for compression library. - -* Progress monitor: same as for compression library. - -As with compression, the data source manager, error handler, and progress -monitor are candidates for replacement by a surrounding application. - - -*** Decompression input and output separation *** - -To support efficient incremental display of progressive JPEG files, the -decompressor is divided into two sections that can run independently: - -1. Data input includes marker parsing, entropy decoding, and input into the - coefficient controller's DCT coefficient buffer. Note that this - processing is relatively cheap and fast. - -2. Data output reads from the DCT coefficient buffer and performs the IDCT - and all postprocessing steps. - -For a progressive JPEG file, the data input processing is allowed to get -arbitrarily far ahead of the data output processing. (This occurs only -if the application calls jpeg_consume_input(); otherwise input and output -run in lockstep, since the input section is called only when the output -section needs more data.) In this way the application can avoid making -extra display passes when data is arriving faster than the display pass -can run. Furthermore, it is possible to abort an output pass without -losing anything, since the coefficient buffer is read-only as far as the -output section is concerned. See libjpeg.doc for more detail. - -A full-image coefficient array is only created if the JPEG file has multiple -scans (or if the application specifies buffered-image mode anyway). When -reading a single-scan file, the coefficient controller normally creates only -a one-MCU buffer, so input and output processing must run in lockstep in this -case. jpeg_consume_input() is effectively a no-op in this situation. - -The main impact of dividing the decompressor in this fashion is that we must -be very careful with shared variables in the cinfo data structure. Each -variable that can change during the course of decompression must be -classified as belonging to data input or data output, and each section must -look only at its own variables. For example, the data output section may not -depend on any of the variables that describe the current scan in the JPEG -file, because these may change as the data input section advances into a new -scan. - -The progress monitor is (somewhat arbitrarily) defined to treat input of the -file as one pass when buffered-image mode is not used, and to ignore data -input work completely when buffered-image mode is used. Note that the -library has no reliable way to predict the number of passes when dealing -with a progressive JPEG file, nor can it predict the number of output passes -in buffered-image mode. So the work estimate is inherently bogus anyway. - -No comparable division is currently made in the compression library, because -there isn't any real need for it. - - -*** Data formats *** - -Arrays of pixel sample values use the following data structure: - - typedef something JSAMPLE; a pixel component value, 0..MAXJSAMPLE - typedef JSAMPLE *JSAMPROW; ptr to a row of samples - typedef JSAMPROW *JSAMPARRAY; ptr to a list of rows - typedef JSAMPARRAY *JSAMPIMAGE; ptr to a list of color-component arrays - -The basic element type JSAMPLE will typically be one of unsigned char, -(signed) char, or short. Short will be used if samples wider than 8 bits are -to be supported (this is a compile-time option). Otherwise, unsigned char is -used if possible. If the compiler only supports signed chars, then it is -necessary to mask off the value when reading. Thus, all reads of JSAMPLE -values must be coded as "GETJSAMPLE(value)", where the macro will be defined -as "((value) & 0xFF)" on signed-char machines and "((int) (value))" elsewhere. - -With these conventions, JSAMPLE values can be assumed to be >= 0. This helps -simplify correct rounding during downsampling, etc. The JPEG standard's -specification that sample values run from -128..127 is accommodated by -subtracting 128 just as the sample value is copied into the source array for -the DCT step (this will be an array of signed ints). Similarly, during -decompression the output of the IDCT step will be immediately shifted back to -0..255. (NB: different values are required when 12-bit samples are in use. -The code is written in terms of MAXJSAMPLE and CENTERJSAMPLE, which will be -defined as 255 and 128 respectively in an 8-bit implementation, and as 4095 -and 2048 in a 12-bit implementation.) - -We use a pointer per row, rather than a two-dimensional JSAMPLE array. This -choice costs only a small amount of memory and has several benefits: -* Code using the data structure doesn't need to know the allocated width of - the rows. This simplifies edge expansion/compression, since we can work - in an array that's wider than the logical picture width. -* Indexing doesn't require multiplication; this is a performance win on many - machines. -* Arrays with more than 64K total elements can be supported even on machines - where malloc() cannot allocate chunks larger than 64K. -* The rows forming a component array may be allocated at different times - without extra copying. This trick allows some speedups in smoothing steps - that need access to the previous and next rows. - -Note that each color component is stored in a separate array; we don't use the -traditional layout in which the components of a pixel are stored together. -This simplifies coding of modules that work on each component independently, -because they don't need to know how many components there are. Furthermore, -we can read or write each component to a temporary file independently, which -is helpful when dealing with noninterleaved JPEG files. - -In general, a specific sample value is accessed by code such as - GETJSAMPLE(image[colorcomponent][row][col]) -where col is measured from the image left edge, but row is measured from the -first sample row currently in memory. Either of the first two indexings can -be precomputed by copying the relevant pointer. - - -Since most image-processing applications prefer to work on images in which -the components of a pixel are stored together, the data passed to or from the -surrounding application uses the traditional convention: a single pixel is -represented by N consecutive JSAMPLE values, and an image row is an array of -(# of color components)*(image width) JSAMPLEs. One or more rows of data can -be represented by a pointer of type JSAMPARRAY in this scheme. This scheme is -converted to component-wise storage inside the JPEG library. (Applications -that want to skip JPEG preprocessing or postprocessing will have to contend -with component-wise storage.) - - -Arrays of DCT-coefficient values use the following data structure: - - typedef short JCOEF; a 16-bit signed integer - typedef JCOEF JBLOCK[DCTSIZE2]; an 8x8 block of coefficients - typedef JBLOCK *JBLOCKROW; ptr to one horizontal row of 8x8 blocks - typedef JBLOCKROW *JBLOCKARRAY; ptr to a list of such rows - typedef JBLOCKARRAY *JBLOCKIMAGE; ptr to a list of color component arrays - -The underlying type is at least a 16-bit signed integer; while "short" is big -enough on all machines of interest, on some machines it is preferable to use -"int" for speed reasons, despite the storage cost. Coefficients are grouped -into 8x8 blocks (but we always use #defines DCTSIZE and DCTSIZE2 rather than -"8" and "64"). - -The contents of a coefficient block may be in either "natural" or zigzagged -order, and may be true values or divided by the quantization coefficients, -depending on where the block is in the processing pipeline. In the current -library, coefficient blocks are kept in natural order everywhere; the entropy -codecs zigzag or dezigzag the data as it is written or read. The blocks -contain quantized coefficients everywhere outside the DCT/IDCT subsystems. -(This latter decision may need to be revisited to support variable -quantization a la JPEG Part 3.) - -Notice that the allocation unit is now a row of 8x8 blocks, corresponding to -eight rows of samples. Otherwise the structure is much the same as for -samples, and for the same reasons. - -On machines where malloc() can't handle a request bigger than 64Kb, this data -structure limits us to rows of less than 512 JBLOCKs, or a picture width of -4000+ pixels. This seems an acceptable restriction. - - -On 80x86 machines, the bottom-level pointer types (JSAMPROW and JBLOCKROW) -must be declared as "far" pointers, but the upper levels can be "near" -(implying that the pointer lists are allocated in the DS segment). -We use a #define symbol FAR, which expands to the "far" keyword when -compiling on 80x86 machines and to nothing elsewhere. - - -*** Suspendable processing *** - -In some applications it is desirable to use the JPEG library as an -incremental, memory-to-memory filter. In this situation the data source or -destination may be a limited-size buffer, and we can't rely on being able to -empty or refill the buffer at arbitrary times. Instead the application would -like to have control return from the library at buffer overflow/underrun, and -then resume compression or decompression at a later time. - -This scenario is supported for simple cases. (For anything more complex, we -recommend that the application "bite the bullet" and develop real multitasking -capability.) The libjpeg.doc file goes into more detail about the usage and -limitations of this capability; here we address the implications for library -structure. - -The essence of the problem is that the entropy codec (coder or decoder) must -be prepared to stop at arbitrary times. In turn, the controllers that call -the entropy codec must be able to stop before having produced or consumed all -the data that they normally would handle in one call. That part is reasonably -straightforward: we make the controller call interfaces include "progress -counters" which indicate the number of data chunks successfully processed, and -we require callers to test the counter rather than just assume all of the data -was processed. - -Rather than trying to restart at an arbitrary point, the current Huffman -codecs are designed to restart at the beginning of the current MCU after a -suspension due to buffer overflow/underrun. At the start of each call, the -codec's internal state is loaded from permanent storage (in the JPEG object -structures) into local variables. On successful completion of the MCU, the -permanent state is updated. (This copying is not very expensive, and may even -lead to *improved* performance if the local variables can be registerized.) -If a suspension occurs, the codec simply returns without updating the state, -thus effectively reverting to the start of the MCU. Note that this implies -leaving some data unprocessed in the source/destination buffer (ie, the -compressed partial MCU). The data source/destination module interfaces are -specified so as to make this possible. This also implies that the data buffer -must be large enough to hold a worst-case compressed MCU; a couple thousand -bytes should be enough. - -In a successive-approximation AC refinement scan, the progressive Huffman -decoder has to be able to undo assignments of newly nonzero coefficients if it -suspends before the MCU is complete, since decoding requires distinguishing -previously-zero and previously-nonzero coefficients. This is a bit tedious -but probably won't have much effect on performance. Other variants of Huffman -decoding need not worry about this, since they will just store the same values -again if forced to repeat the MCU. - -This approach would probably not work for an arithmetic codec, since its -modifiable state is quite large and couldn't be copied cheaply. Instead it -would have to suspend and resume exactly at the point of the buffer end. - -The JPEG marker reader is designed to cope with suspension at an arbitrary -point. It does so by backing up to the start of the marker parameter segment, -so the data buffer must be big enough to hold the largest marker of interest. -Again, a couple KB should be adequate. (A special "skip" convention is used -to bypass COM and APPn markers, so these can be larger than the buffer size -without causing problems; otherwise a 64K buffer would be needed in the worst -case.) - -The JPEG marker writer currently does *not* cope with suspension. I feel that -this is not necessary; it is much easier simply to require the application to -ensure there is enough buffer space before starting. (An empty 2K buffer is -more than sufficient for the header markers; and ensuring there are a dozen or -two bytes available before calling jpeg_finish_compress() will suffice for the -trailer.) This would not work for writing multi-scan JPEG files, but -we simply do not intend to support that capability with suspension. - - -*** Memory manager services *** - -The JPEG library's memory manager controls allocation and deallocation of -memory, and it manages large "virtual" data arrays on machines where the -operating system does not provide virtual memory. Note that the same -memory manager serves both compression and decompression operations. - -In all cases, allocated objects are tied to a particular compression or -decompression master record, and they will be released when that master -record is destroyed. - -The memory manager does not provide explicit deallocation of objects. -Instead, objects are created in "pools" of free storage, and a whole pool -can be freed at once. This approach helps prevent storage-leak bugs, and -it speeds up operations whenever malloc/free are slow (as they often are). -The pools can be regarded as lifetime identifiers for objects. Two -pools/lifetimes are defined: - * JPOOL_PERMANENT lasts until master record is destroyed - * JPOOL_IMAGE lasts until done with image (JPEG datastream) -Permanent lifetime is used for parameters and tables that should be carried -across from one datastream to another; this includes all application-visible -parameters. Image lifetime is used for everything else. (A third lifetime, -JPOOL_PASS = one processing pass, was originally planned. However it was -dropped as not being worthwhile. The actual usage patterns are such that the -peak memory usage would be about the same anyway; and having per-pass storage -substantially complicates the virtual memory allocation rules --- see below.) - -The memory manager deals with three kinds of object: -1. "Small" objects. Typically these require no more than 10K-20K total. -2. "Large" objects. These may require tens to hundreds of K depending on - image size. Semantically they behave the same as small objects, but we - distinguish them for two reasons: - * On MS-DOS machines, large objects are referenced by FAR pointers, - small objects by NEAR pointers. - * Pool allocation heuristics may differ for large and small objects. - Note that individual "large" objects cannot exceed the size allowed by - type size_t, which may be 64K or less on some machines. -3. "Virtual" objects. These are large 2-D arrays of JSAMPLEs or JBLOCKs - (typically large enough for the entire image being processed). The - memory manager provides stripwise access to these arrays. On machines - without virtual memory, the rest of the array may be swapped out to a - temporary file. - -(Note: JSAMPARRAY and JBLOCKARRAY data structures are a combination of large -objects for the data proper and small objects for the row pointers. For -convenience and speed, the memory manager provides single routines to create -these structures. Similarly, virtual arrays include a small control block -and a JSAMPARRAY or JBLOCKARRAY working buffer, all created with one call.) - -In the present implementation, virtual arrays are only permitted to have image -lifespan. (Permanent lifespan would not be reasonable, and pass lifespan is -not very useful since a virtual array's raison d'etre is to store data for -multiple passes through the image.) We also expect that only "small" objects -will be given permanent lifespan, though this restriction is not required by -the memory manager. - -In a non-virtual-memory machine, some performance benefit can be gained by -making the in-memory buffers for virtual arrays be as large as possible. -(For small images, the buffers might fit entirely in memory, so blind -swapping would be very wasteful.) The memory manager will adjust the height -of the buffers to fit within a prespecified maximum memory usage. In order -to do this in a reasonably optimal fashion, the manager needs to allocate all -of the virtual arrays at once. Therefore, there isn't a one-step allocation -routine for virtual arrays; instead, there is a "request" routine that simply -allocates the control block, and a "realize" routine (called just once) that -determines space allocation and creates all of the actual buffers. The -realize routine must allow for space occupied by non-virtual large objects. -(We don't bother to factor in the space needed for small objects, on the -grounds that it isn't worth the trouble.) - -To support all this, we establish the following protocol for doing business -with the memory manager: - 1. Modules must request virtual arrays (which may have only image lifespan) - during the initial setup phase, i.e., in their jinit_xxx routines. - 2. All "large" objects (including JSAMPARRAYs and JBLOCKARRAYs) must also be - allocated during initial setup. - 3. realize_virt_arrays will be called at the completion of initial setup. - The above conventions ensure that sufficient information is available - for it to choose a good size for virtual array buffers. -Small objects of any lifespan may be allocated at any time. We expect that -the total space used for small objects will be small enough to be negligible -in the realize_virt_arrays computation. - -In a virtual-memory machine, we simply pretend that the available space is -infinite, thus causing realize_virt_arrays to decide that it can allocate all -the virtual arrays as full-size in-memory buffers. The overhead of the -virtual-array access protocol is very small when no swapping occurs. - -A virtual array can be specified to be "pre-zeroed"; when this flag is set, -never-yet-written sections of the array are set to zero before being made -available to the caller. If this flag is not set, never-written sections -of the array contain garbage. (This feature exists primarily because the -equivalent logic would otherwise be needed in jdcoefct.c for progressive -JPEG mode; we may as well make it available for possible other uses.) - -The first write pass on a virtual array is required to occur in top-to-bottom -order; read passes, as well as any write passes after the first one, may -access the array in any order. This restriction exists partly to simplify -the virtual array control logic, and partly because some file systems may not -support seeking beyond the current end-of-file in a temporary file. The main -implication of this restriction is that rearrangement of rows (such as -converting top-to-bottom data order to bottom-to-top) must be handled while -reading data out of the virtual array, not while putting it in. - - -*** Memory manager internal structure *** - -To isolate system dependencies as much as possible, we have broken the -memory manager into two parts. There is a reasonably system-independent -"front end" (jmemmgr.c) and a "back end" that contains only the code -likely to change across systems. All of the memory management methods -outlined above are implemented by the front end. The back end provides -the following routines for use by the front end (none of these routines -are known to the rest of the JPEG code): - -jpeg_mem_init, jpeg_mem_term system-dependent initialization/shutdown - -jpeg_get_small, jpeg_free_small interface to malloc and free library routines - (or their equivalents) - -jpeg_get_large, jpeg_free_large interface to FAR malloc/free in MSDOS machines; - else usually the same as - jpeg_get_small/jpeg_free_small - -jpeg_mem_available estimate available memory - -jpeg_open_backing_store create a backing-store object - -read_backing_store, manipulate a backing-store object -write_backing_store, -close_backing_store - -On some systems there will be more than one type of backing-store object -(specifically, in MS-DOS a backing store file might be an area of extended -memory as well as a disk file). jpeg_open_backing_store is responsible for -choosing how to implement a given object. The read/write/close routines -are method pointers in the structure that describes a given object; this -lets them be different for different object types. - -It may be necessary to ensure that backing store objects are explicitly -released upon abnormal program termination. For example, MS-DOS won't free -extended memory by itself. To support this, we will expect the main program -or surrounding application to arrange to call self_destruct (typically via -jpeg_destroy) upon abnormal termination. This may require a SIGINT signal -handler or equivalent. We don't want to have the back end module install its -own signal handler, because that would pre-empt the surrounding application's -ability to control signal handling. - -The IJG distribution includes several memory manager back end implementations. -Usually the same back end should be suitable for all applications on a given -system, but it is possible for an application to supply its own back end at -need. - - -*** Implications of DNL marker *** - -Some JPEG files may use a DNL marker to postpone definition of the image -height (this would be useful for a fax-like scanner's output, for instance). -In these files the SOF marker claims the image height is 0, and you only -find out the true image height at the end of the first scan. - -We could read these files as follows: -1. Upon seeing zero image height, replace it by 65535 (the maximum allowed). -2. When the DNL is found, update the image height in the global image - descriptor. -This implies that control modules must avoid making copies of the image -height, and must re-test for termination after each MCU row. This would -be easy enough to do. - -In cases where image-size data structures are allocated, this approach will -result in very inefficient use of virtual memory or much-larger-than-necessary -temporary files. This seems acceptable for something that probably won't be a -mainstream usage. People might have to forgo use of memory-hogging options -(such as two-pass color quantization or noninterleaved JPEG files) if they -want efficient conversion of such files. (One could improve efficiency by -demanding a user-supplied upper bound for the height, less than 65536; in most -cases it could be much less.) - -The standard also permits the SOF marker to overestimate the image height, -with a DNL to give the true, smaller height at the end of the first scan. -This would solve the space problems if the overestimate wasn't too great. -However, it implies that you don't even know whether DNL will be used. - -This leads to a couple of very serious objections: -1. Testing for a DNL marker must occur in the inner loop of the decompressor's - Huffman decoder; this implies a speed penalty whether the feature is used - or not. -2. There is no way to hide the last-minute change in image height from an - application using the decoder. Thus *every* application using the IJG - library would suffer a complexity penalty whether it cared about DNL or - not. -We currently do not support DNL because of these problems. - -A different approach is to insist that DNL-using files be preprocessed by a -separate program that reads ahead to the DNL, then goes back and fixes the SOF -marker. This is a much simpler solution and is probably far more efficient. -Even if one wants piped input, buffering the first scan of the JPEG file needs -a lot smaller temp file than is implied by the maximum-height method. For -this approach we'd simply treat DNL as a no-op in the decompressor (at most, -check that it matches the SOF image height). - -We will not worry about making the compressor capable of outputting DNL. -Something similar to the first scheme above could be applied if anyone ever -wants to make that work. diff --git a/gtkmm-osx/trunk/jpeg-6b/testimg.bmp b/gtkmm-osx/trunk/jpeg-6b/testimg.bmp deleted file mode 100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K+?ftnAVf9l{XXTKgxnoiA-)%)ZYMH17e~+I49Qs{lkCOcW=jlu?Mabo;D&{?sM8O zeWRE=CBGzta;3II$*R+LGz9`OhMxHTsgrQj2F@4IA4JB5KC6KC6MD5MD5OC3NB2OC3OC3PD4RE5R?1Y?2b@4nB5}E6‹H8™G9£F7¯G:¸G9¾E:ÅG;ÇG>ÊG?ËH@ÐE@çFLíCLëDKëEIîCIïBDñ>Bô=Aø;A÷:@ô:?ð×?<ËA7»=/µ@.µ@.´?-´?-³@-²?-¯@-­@,ªA,¦A-¢B,Ÿ@*›A)˜@*–A,”>-’?/’?/‘>.‘>,=+’<+’<+”?+”?+”=*”=*”=*•>+–?,–@/–?6•>5—=2Ÿ?1©B3³D3¼D4¿D4¹?0µA2¬F8žH;‡H9oA2T8*C3&=5295495473271160050-50-72/72/72/61.61-50,50,41,//-.0-//-//-0/-0/-2.-2.-5,-4+,4*+3)*7(+=.1E69P:0U?1^A3jC4xD6„E4’E5œC3§C4¯A4µA4¼B7ÀD:ÄE<ÅF=ÍC@áEIçBIèCIêDHíDGïBDó@Cö?Cø;A÷:@ô:?ðÕ@<Ê@6¹>/µ@.´?-´?-´?-²?,°?-¯@-­@,©@+¦A-¡A+Ÿ@*›A)˜@*–A,”>-’?/‘>.‘>.‘>,=+’<+’<+”?+“>*”=*”=*”=*•>+–?,–@/”@5•>5˜>3 >1«A3µD4½C4¿D5»A2·C6¬F8œI;…G:l@3S9*B4)>63:6595484382271161.61.72/72/72/61.61-50,50,41,//-.0-//-//-0/-0/-2.-2.-3--5,-4*+3)*5)+<-0C47N8:d>=vEA†JINLšTV¤aj¥l}rŽ‘{¢†€®…¹{„»ou©[[QHuOCiOFeOG_PH_RN_[Yfnotƒ‡ˆ”™•™ž—š ”™‘ƒ~ojkY][LVSJXSZVRaXQa/.,/.,0/-10.40-40-51.51.72.72.72.72.92,92,92,92,91.80.7/-7/-7/-7/-80.91/80.80.80.80.80.80.80.80.6.,5-+5-+5-+4,*4,*4,*4,*5-+5-+5-+5-+5-+5-+5-+3.*2-'1.'2/(30)30)41*41*52+63,63,63,74-85.96/96/:7.?8.@:.B<0D>2G?4H@5H@3H@3I@1I@1K?1K?1K?/L@0MA1NB2MA1QA1YB2dC2qC3|C2‡B2’A0˜<- :+§;.¯=2µ@6ºD:¿F=ÅD>ÙCEá@FãBGçBFêDFðCEôADø?Dú;@ù:?õ;@ð=@è@@ÜA=Ñ@;Æ@5·=.³@-³@-²?,²?-°?-¯>,­@,ª?-§@-¥@,¡A+A,š?*˜@*•@+”>-‘>.‘>.‘>.=+=+=+=+‘>,‘>,’<+’<+“=,“=,”?+•?.•A6–?5š>3£>2¯A4¹C5¿D5ÁC5ÀD8¸F;®I=™J=G;h@4Q:,B5,?74=77<66:4494183072/72/62/62/62/51.52-41,41,21,.0-,1-.0-.0-//-//-0/-2.-5//4..5,-4*+4*+9-/>24I56[97l?9|E@†IDOM˜[`›fv”mˆŒwžƒ}­}‚¹u~·fm¤TV‰MEvLAkMAeOFcQHcMH^NK\[[eqty…‰ˆ‡Œ†Šˆ…†Š|xzlfiXZ[MVSLZU[ZT`[S`.-+/.,/.,0/-3/,40-40-40-61-61-61-61-81+81+81+81+7/-7/-6.,6.,6.,6.,7/-7/-80.80.80.80.80.80.80.80.5-+5-+5-+4,*4,*4,*3+)3+)6.,6.,6.,6.,6.,6.,6.,4/,30+30)30)41*41*52+52+52+52+52+63,74-85.85.96/96->7-?9-@:.B<0E=2E=2F>1F>1G=1G>/H<.I=/I=/J>.L@0JA0KD2NE4UD4^D3iD2sB1~A/†?-Œ9)”9'9*£<-¬@3³E8¸H<ÁF>ÒDCÚACÞBCâDCçCDìBCó@C÷?Aú;@ù:?õ;@î>@åA@ÚB=Í@9Â@3µ=-°@,°@,°@,¯>,®?,®?,¬?+©@-¦?,£@+ @*œ@+˜@*–@)”?*‘>,‘>.‘>.=-=+=+<*<*=+=+<*<*’<+‘>,”>-’?-•A6–?5œ>2¦@4²B6¼C8ÁC7ÂB7ÂF<ºJ?¬L@—K>|F:b@4L:.A7-@85>96=77<74:5294183083062/62/62/32.52-21,21,12--2.-2./1./1.00.00.10.10.5106005//5,-4+,6,-:01D22T71c;3qA7{E;‚HD‰RU_l‹i‚ƒs˜}y«x}µowµ`f¢QR‹LEyL@pL@hPEgQFfLC^GBVMLZ^^fjnquyxx}wz€vwzokoa`bTWYLTTL]WY]V]]V^------.-+/.,0/-10.3/,40-3/,3/,4/+4/+4/+4/+6/)6/)4/,4/,3.+3.+3.+3.+4/,4/,50-50-50-50-50-50-50-50-3.+3.+2-*2-*2-*1,)1,)1,)4/,4/,4/,4/,4/,4/,4/,4/,41,41,41,41,41,52-52-52-52-52-63.63.74/85096196/<5-=6,?8.@9/B:/C;0C;0C;.D:.D:.F:.G;-H<.I=/J>0I@1JG6MH5RG5YF5bE3jD1uB/}>,‚;)‹:)“:*š=,£B2¬F8²J=»I?ÌGBÔDCØDBÝEBâBBéAAð=@ô<>ù:?ø:<ô<>í?>áB>ÓC:ÅA5¹?0²?-®?,®?,®?,­>-¬>-¬>-ª?-¨>.¤?- ?,ž?+š?,—?+•>*“>*‘>,?.>->->-Ž=,Ž=,Ž=,Ž=,Ž=,Ž=,Ž=,<,>-‘>.?.”B4—A4@1¨@3¶A7¿C9ÅB8ÄA7¾C;·H?¦LCJ@tE;Z>2E9-<5+@93@85?75>63=52<4194083/62/43/43/23.32.12-12-02--2.,2.-2.-2./1./1.00.10.3205105104..2,,4+,7./=/.N5.Y9.e=1n@3sB;yKK€Zeƒg€p—zxªu{·ks´_d¦TT”OGƒLBwNAmNBhMAeJA`GBYGFXKKWMPU]cc`fbbia`f\Z`TW[MUXMXXP^YV`WX`WZ,,,,,,.-+.-+/.,0/-3/,3/,2.+2.+3.*3.*3.*3.*5.(5-*3.+3.+2-*1,)1,)2-*3.+3.+3.+3.+3.+3.+3.+3.+3.+3.+2-*2-*2-*2-*1,)1,)1,)0+(3.+3.+3.+3.+3.+3.+3.+3.+41,41,41,41,41,41,41,41,41,52-52-63.74/85085085.;4,<5+=6,>7-@7.A9.A9.A9.C9/C9-E9-F:.G;/H<.J>0HA1JG6IH6NG5VF6\E3dC2n@0v>-{<+‚;)Œ;*”=,œ@1£F5ªJ:´J=ÄH@ÌEAÑFAÖE@ÞCAä@>ì>?ñ:<÷;<ô:;ð<=é@=ÜC=ÍC8¾@2±>,®?,«@,ª?+ª?+ª?-©>,©>,¨?,¥>-¢?, ?,›>,—?+•>*“>)‘?*>+>->->-Ž=,Ž=,Ž=,<+Ž=,‹<+<+‹<+‹<-Œ=,>/Ž?.”B4—A2 @2¬B5¹C9ÂC:ÅB:ÂA;ºA9±I@£NGNEoG=S?4A;/96-@93A75?74>63<4194083/74/43/43/34/23.23.02-02-.3--3/-3/.3/.3/02/02/11/11/21/32032040/2.-1-,4..8.,G4-O4)X8+`<0e?6mGFyYd‚k…€uŸ||²w|¼nu»dh¯[[¡RMLB~OArL@hI=cH>`HB^ECX@BO;@FBGJDMJJQJJQIIQFKQEOUIVWO^YS`YS`XU++++++,,,---/.,/.,0/-0/-1-*1-*1-*1-*2-)2-)2-)2-)2-*2,,1++1++1++1++2,,2,,1++1++1++1++1++1++1++1++2,,2,,2,,1++1++1++0**0**3--3--3--3--3--3--3--3.+41,41,41,30+30+30+30+30+41,41,52-63.74/74/85085.:3+;4,<5-=6.?6/?6-?6-?7,B8.B8.E8/E9-G;/H<0J>2H@3HE6GF4KE5QD4XC2_B2f?.n=,v=,|:*…9)Œ;*“=.›B2¢F7¬F8»F<ÂF>ÉF>ÐE>ÙD@âC?ê@@ð>>ò::ñ;:ì<<äA<ÖC;ÆD6µ@/ª=)ª?-©@-©@-¨?,¨>.¨>.§=-¥>-£=. ?.ž?-š?-–?,“>*‘?*>)>+>->-Œ=,Œ=.Œ=.‹<-‹<-‹<-Š=-Š;,‰<,Š.‹=0Œ?/’C2˜B1¡A1®B6¼C:ÂC<ÄC=ÀC=¹FA²QJ¥XRXQsRIWI>CC793@72>71=60:5/94.83/63.43.43.34/13.13..3-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.=4/>5.>5.>5.?4.?5,B5-C6.D7/F90G:1F<2G?4H@5J@6P?5T>3X<1^90b6+m9.t8-|8+ƒ9,;/“=0˜?1ž>0§A3­A4µC8¾E:ÊG=ÔG>ÞE?åC@è@?êBAæDAÚE>ÈD8·B1ªA.¢B,¢A.¡@-¢?,¢>.¡=-¡=-¢>. ?/œ<,š=,˜<-•>-“=,=+Ž=*Œ>*‹<+‹<+Š=-‰<,‰<,‰<,ˆ:-‡;-‰=/†3ˆ@2‰A5‹A4‘E5—D4£E9±I>ºG@»D>»EA¸MG´ZR¯f_£qf‘sh~rdjj^V^SIQFLLBJF=B>5<8/95,74+63,33+43.34.14-14-02-/1,,1+,1+-2.-2.-2.-2./1./1./1./1.02/02/11/11/11/11/11/40/4+0;/3A32C4/J;6]OOymy‹…Ÿ“»”–ϐ•Ùƒ‰ÓtzÆjn·_b§Z[”LItHBdA>]>>X?BUAIVLU\U`bbqnn}xv†|rulyoguh_k_W_P]\Hb\Fc]G,-/,-/,-/,-/------.,-.-+/.,.-+0,)0,)/+(/+(/+(/+(.*).*).*).*)/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*0,+0,+0,+1-,1-,1-,1-,1-,1-,1-,1-,1-,1-,0,+0,)1-*2.+3/,3/,2.+2.+2.+2.+2.+2.+3/,40-51.62/80.91.:2/;4.=4/>50>50=4-?4.?4.A4.B5-C6.E80G:2H;3H>5H>5L=6O>6Q=4V;2Z90_7/h70p7.w7-9-‰9.<1–<1›=1¢@3§A3¬B5´D8¾E:ÉF<ÔE=ÛD=ßD@àE@ÞFAÔG>ÄF8²C2¥B-žB-ŸC.žB-Ÿ@.ž?-ž?-ž?-ž>.ž>.š=,™>,–=-”=,=+>+Œ>*Œ=,‹<+Š=+‰<,‰<,‰<,‡;+‡;-…<-†2†@6‡A7ˆB6“G9—E7£G<¯J@¸IB¸GA·LF³TN±d\ªqfŸ~oo|mmseZfZNXMLNAKI=EC7@=4=:188.44,11)23-23-03,/2+/1,.0+.0+.0+/1.-2./1./1./1./1./1./1.02/02/11/11/11/11/11/2015+49-7<23?53H?:^VTxr|Šˆž““¹”—ʐ–Ô„‹ÏyÂqy¸kt­hnž\_€XZqSUjRWjT^hZgmfvvr‚tˆ~’‡ƒ•‰~Žv†yr€qfteZeT[ZE`Z@b\D,-/,-/,-/,-/,-/,.-------.-+.-+.-+-,*/+(.*'.*'.*',+),*+,*+,*++)*+)*+)*+)*-+,-+,-+,-+,-+,-+,-+,-+,,*+,*+-+,-+,-+,.,-.,-.,-.,-.,-.,-/-./-./-./-./.,0,+0,+1-,2.-2.-2.-2.-1-,1-,1-,1-,1-,2.-3/.40/51.80.91.:2/;30=31=4/=4/=4/?40?4.A4.A4.C60D71F93G:4H;5J;6K<7N=6P;6S:5V72[6.c60k6.t5,}7/‡9/;0”<0–<1?3 @4¢@3¨@3±C6ºD8ÅE:ÍD:ÕF@×H@ÔIBÌI?¾E:®C3¡B.œA.B/œA.œ?.›>-›>-›>-›>/›?0˜<-–=-”<.“=.>-Œ=,‹<+Š=+‰<*‰<*‰<,‡;+‡;-…<-„:-ƒ;-„<0‚<0‚<2‚>3ƒ?4…A8‡C:ˆD9”J=—H; H>¬KD²KF³LG²SM®`V­sg¦qŒz‘Ž{‚‰ws€ocqbXcUNRDMN@HI;DD8@@49;.46+/1&01)01)/0*/0*./*./*//-//-//-.0-//-//-//-//-//-//-00.00.00.00.00.00.00.1/26+97+98/4;63HE>_^Yzz|‹š”±’—¿•Ç„ŽÃ}‰»{‰¶|‹²}Œ«}ˆšwƒq~‡n}‚n~~o‚~yŽ…ƒ™‹¡”‘¨˜¥”ˆŠƒ–ƒ|{j{i\hTXX@]Y<_[@-.0-.0-.0-.0-.0-.0.......-+.-+-,*-,*.*'.*'.*'.*),*++)*+)*+)*+)**()*()*(),*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+-+,-+,-+,-+,.,-.,-.,-.,-/-./-./-./+*0,+1-,1-,1-,1-,0,+0,+0,+0,+0,+0,+1-,2.-3/.40/91/:20;31<41=31=31=31=4/>3/>3/@2/@3-A4.C60D71E82F93H94I:5J;6L:6N94Q83T50^72e60o6/x8/‚90Š:/<1”>1™?4›?4›?2Ÿ?1¥A2®B5¸D7¿E:ÇG>ËH@ÊJAÃI>¶F:ªB5žA0™@.™A-™A-˜?-—>,—>,™>,™=.—>.•<,”=,“=.=-Ž=,Š=+Š=-‰<,ˆ;)ˆ;)‡;+‡;+„;,„;,ƒ;-€;,;/€<1€<1>5ƒ@7ƒC:‡D<ˆE<”L@–H<žG>§JC®LI®QL­]Vªj^§€o¡yšš‚›ƒ†•€z‹xm{jbm]SZJQUFKO@EI:@D6;=057,13(01)/0(./).-(.-).-)/.,0/-/.,/.,/.,/.,/.,..,/.,..,0/-//-0/-//-//-//-//-2-17,:6*83-1961HJ?bfX{€z‹““£–°Œ•¶ƒ²¯…™²¤¶’¨³“¨«¤£Œ ž‡ž˜‚™}˜‰œ‹ˆ£”°š˜±›”­—‹£…›„’|k|iXfOSV;ZV9^Z=+/2+/2+/2+/2-.0-.0......------.-+-,*-,*,+),+),+),*+,*+,*++)*+)**()*()*(),*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*++)*+)*+)*,*+-+,-+,.,-.,-/-./-./-./+*0,+0,+0,+0,+0,+/+*.*)/+*/+*/+*/+*0,+1-,3/.40/901:20;31<42=32=31<20<20=20=2.?1.?1.@2/A30B5/C60D63C84D95E:6G96H94K84N50X72_60i70r7/}:1†<1Œ>2>2—@6—?5—?5—?3œ@3£C5«C6³E8ºE;½G=¾H>¹G=°D8¦A5›?0—@/—@-—@-–?.•>-”=,•<,–=/–=/•<.“;-’0->0-?1.@2/A4.?4.@51@72@93A:4B94C84F74H5/Q51X5/a6/l8-u9.€0‹=1“?5•>5“?5“?4•B4šB4 C4¥D4¬B5°D8´E:±E;ªB7¡?4š>1–>0•?.”?+“=,“=,“<+“<+”<.”<.“;-’<-<.;-Š;,‰<,‡;+‡;+†:*†:*…9)ƒ:)ƒ:+9*9-9-€<1<3?6€A8‚C<…F?ˆIBŠICŽJAG>—HCŸNJ§VR§`Z©pe¤ƒrœ”}–¡ƒ¨Šˆ§ˆƒ „~–~yˆup{jdp\]iSR^JJS@BK:>E5:@29<134,22*1.)/,'/))0**1++2,,1++1++1++1++1++0,+0,+0,+1-,1-,1-,1-,/.,/.,/.,2,.8*75(13+(56&EK1\gGu‚d†“yŽ›Š‘ž”Ÿš‹ž˜¥——´ž¢Å¥©Î­¥É­¦Ê°§Ë±¤È¬—¾Ÿ‹³‘ˆ°²Ž²Ž²¬Š„¡‚€™{wŽrdx]Q_ENR7QQ5SR6,03,03,03,03./1./1./1./1/////////////.,/.,.-+.-+/-..,-.,--+,,*++)*+)**()+)*+)*+)*+)*+)*+)*+)*+)*+)*+)*+)**()*()*())'()'(+)*+)*,*+-+,.,-.,-/-./-./+*/+*/+*/+*/+*.*)-)(,('0,+0,+0,+0,+1-,2.-40/40/:12;23;23<34=32<21<21;10<1/<1/>0/=/.>0->0-?1.>3/=60;60;83<94=:5>93@72C60G4.O4+Y4+d5+n8,x:-;.…;.<4‘<5>3@3A2“B1—A2™@0 >1¦@4ªB7ªB9¥@6Ÿ>5—=2•?2’?-’?-‘>,=+‘;*‘;*’<-’<-‘;.‘;.Ž;-;-Š;.ˆ:-†:,„;,…9)…9)ƒ:)‚9(‚9*9*~8,~8,€<1€=4€@7B9„E>…IAˆKFŒMFŒIAŽH@˜JF¡SO¨]X©hb©{n¤Žy™œ’§†‰¬‹‚ªˆ€¡„™€~‹wxnjxadr[ZhQQ]IITCCL;>D60-?1.=2.=4-=6.;819919:29:2;81?6/C2+J1,T2)^3*g7+o9-u=.z2¢B6¡C7žB7™?4–>2”>1”>/“=.=-<,Ž=,Œ=,Œ=.>/Ž<.Ž<.‹2>5€@6‚C:ƒG=…JB‡NE‹OGŒICŽID“PJ˜\Tžg`uiž‡už˜€”¡…ª‰‰¬‹ƒ¨‡€¡„~›zytˆoi}bby]\pUUgOO\HGRAAH8=A388.85.7/,3+)2()2()3)*4*+0*,/+*0*,0**0*,0*,2),2),3*-1+-1+-1+-0,-0,-0,-1+/4)/4*+4-%46!?F%T`8m|Qg‰™tžz¡~ˆ¡zŠ§{‘¶‚›ÄˆŸËŸÉ™žÇÆš˜Á•Œ·Š‚­€…®‚Œµ‰„«‰®…‰©‚~œxvolƒfZnSJZ?GM3FJ1DF./0+.0+/0+01,01,01,12-21-32.43/43/62/51.41,3/,4/,50-50-4/,3.+2,,1-,0,+0,+.,-.,---/--/,,.++-*).))+.)/.)-/(/.)-/)-.)-.*+.*+/+*/+*-,*.-)--+-.)./*./*------.,-/-./.,0/-2.+2.+2-*4,)5-*6.+8/*:1,:1*;2+=4-=4->50>50>50=4/<3.;2-=2.<1-<1/;0.=/.>0/>0/@1.A0)@2);4*77-39-28.56.:3-?-)F*'L)'S*&Z/(`5,d<0k@0yA0@/†A1‹B3@3“=0“;/’8-“;/“=.”A1•B2”C2’A0‘>.‘;,—;0—:2’;1Œ=0ˆ?0„?/‚?.ƒ>.ˆ@1ˆ?0Š>1Š<0‰;/ˆ:.†:-ƒ;-{9+~@3w<.q7)w>-w>-v;-}?2{;/‚@4‡E9‰I?ˆLA†MB„PC‡NE‘KI—SP”bY‘paŒ}j‰‰q‰–|Šž‚¤‡¦‰Ž§Š§Œ‡¤ˆ~Ÿ‚uš{o—uiib„_[zXZsUZnSWeNPWEJK=C?6@93;0.6**3')3'+3'+1&*,*-)+***,*(),'+.(,1(-2'-3(.3(.3(02(00)10)1/*1/*0/)-1++0-(//#5,>5,>5.>5.>5.=4-<3.<3.=2.<1-;0.;0.=/.=/.>0/@1.C0*C0)A2+>4+:6-95,:3-<1-?-+D*)I*(N+'T/)Z5-_:1e>/pA/xA-€A0ˆ@2?4‘=3“:2“;19.‹.Œ@0A1A1ŽA/‘?1•;2•;2<2‹=0†>0ƒ@/?/‚?.…@1†>/‰=0ˆ<.‡;.„;,‚:,€;,x8,x<1s9-n9+s>.s>.r8*u:,}=1ƒA5‰E:‹I=‰K@†NA„PC‡NE‘JH—SR’f]Œwf„†p€“wž„¥†ˆ§ˆ§Š§§Š¤‰Ÿƒwœ}o˜ve’i`‹`Y‚ZY{X\wXZnSSaJNUCFH;C@7<737/-3*+2)*1(+.(*,*+**,+),+),-(,/)-2(02(02(02(02(10)1/*1-*3-*3-*12-12.-0,)--%8:,SXBox]€‹i‡–o†™l†žnˆ£p†¤p„¥pŠ­w“¶€™¹‡–¶„“³Œ®{†«x‚¨w‚¨yƒ¨|ƒ¦|‚¤{x’uqˆnh{eYjWMZHEL<@D5;=/12,12,12,12,23-23-43.43.54/54/85085085074/72.61-80-80-7/,6.+4/,3.+2,,1-,1-./-.0.1/-0--/,,.+*/+)./(/1'//)-/)-/)-/)-.*+.*+0,+0,+/.*/.*/.)0/*0/*0/+//-///0./0./0/-/.,1-*2-*6.+70*90+:1*<1+=3*>4+?5,?6-?6-@7.@7.?6/>5.=4-=4-=2.<1-;0.;0.;0.;0.<1/?1.C2+E0+H/+K--L,/K+.I*/E+.A-,@.*A.(E.(M.)X1*b3-g5,j:,o;-w;0=4‡<6Œ<5:4:4Š<2‡=2†>2…?3†A2‰A3ŒB5C5Ž?2=/Œ>1Š>.‡>/…>,†=.ˆ<,‰;.‰<,ˆ:-†:*ƒ;,<)~=+{<+}=1z<1v:/u;/x@1x@1v<.v;-?5‚B8‰F=‹H?‰JA‡KA‡NCŠNF‘JH˜TQ–f\ve‡…n‚‘t{¤ƒ…¨‡ˆª‰ªŒ©ŒŽ¥‰ˆŸƒš}y˜xi–ma’e\‹a\†`]‚`[|]UrVPhPFYEBP?:D93:2.3,*/)*,)**(0'(1&*1&*1&*0'*1(+0*.0+//*.-+.,+0+,0)-0(-1(-1)-01/23/..*'**"57*PUAmv[|Ši€k~“j™jƒŸn€ n~ m€¥q‡¬x¯|‹­zˆªx„©v§v§u¦w¦y¤y€¢}}›yw‘tp‡mh|cYkUMZHDH9=?299-23-23-34.34.34.45/54/54/650761961:72:72961940940:2/91.91.80-50-4/,4..4..3/03/01/01/20.1..0--/-+.0)02).0*.0*.0*.0*,/+,/+*1-,1-,0/+0/+10+10+10+10,11/1111/010.10.2.+3.+3.*92,92,;2+<3,>4+@6-@6-A7.B8/A8/B90A8/A81@70>5.>5.=2.=2.<1/;0.;0.<1/=20=2.B3.E2.L..R+0V'/U&.P'/I).C/.<1+;2)?2)G0(R/)_.*d/)i9/k;/u<3}<6…;8‰;9Š;7ˆ:6‰>8†@8†B9…B9…C7†B7‡A7‰A5ˆ@1ˆA/‡@.‡@.‡>-ˆ<,ˆ;+‰:+Š8*ˆ9*‡:*ƒ:)<){=(x>(x>*‚>1{7.z7.z<1v;-w=/|A3{@2€B7ƒE:†H=ˆJ?†J@‡MBˆODŠQHŒSJŽ\QŽh[‹tb…g€‹m~–vž|ƒ§ƒ„©‡‡ª‰‹ªŠ‹¦‡‡ ‚ƒš~}˜yq•oi”ifgfŒeg‹gd†e_~_Zw[PhPK^JBP?8D62:/.4*,/(+*%2&&5%(4%(2&(1'(/)+/+,.,-+++*+-*+-(,-(,/',/',/*+-.*+1++0+'.+"88,PUAiqYv„c{Œhyh|–iœl}Ÿmyžkz m¥r‚§t€¥q}£p}£p}¥s~¥v~¥x}¤x|¡x}Ÿzz™wuqn‡je|bWkRN[GDF9?=1:8,45/45/45/560560560761761872872;83<94<94<94<73<73<41<41;30;3083072/61.61.5106216213122011/00./1-.2,04+.4+.4+.2,.2,,2,,2,,3/.3/,3/,3/,21,21,32-32.32032032032051051.61.61-;4.<5/=4-?6-A7.B8/E8/C9/D:1D:1E;2D:1C90B8/@5/@5/>3/>3/=2.=2.=20=20>31>31@51E31M02T,4X)3W(2R)1K,1B30:6-77+:6*B4)M2)X/)^/)f:1j;3s<7z=:‚<:†<;‡;;†::‚;7>8A8B9ƒC:ƒC:…@9„@7‚C2‚C1ƒB0„?/†=.ˆ<.‰:-‹9-‰7+‡8+…9+‚:+~=+x>*v?*x>*9-|/'‚8/„>4w4+s5*}A6}C7E:€G<‚I>ƒJ?„KB†MD‡QG…WJ|aNzjQ€pYu]‚|bƒ†i†“uˆ|ƒ£~§‚‚ª…‚¬†©„¥€{ž}z™wz’pzlxlwŒkumr‰lm„gkd`rX[iRR[HHL=@@4;7,70&5*$6('5''3''1'&.)&+*(++)+-*',('+*)+*)+***,+),+),-)*,#$2*'50*86*BC5UZFfpWn}^tˆeqŠbuex˜iw›ks™htšiwŸkz¢nx lwŸmx ny£s{¥u{¥w|£wyžuzœww–tsŽom†hd{_WkPN[GCC7>:195,560560671671782782872872983:94=:5>;6>;6>;6>95>95?74?74>63=52;63:5294194184184395484373243151240/6-06-.6-06-.4..4..4..4/,40-40-40-51.32-32-43.43.43/431542540841850940:5/=60>7/@7.A8/C90D:0G:1H;2F<3F<3F<3F<3E;2C90B71A60@51@51?40>3/>31?42@53?53@72C52I35P16T/6S.5P05J22C52=90<:-=:+C7)I6(Q3)W2)]2+d3,l50v64}77‚87ƒ77‚66~75}:4}<6}>5€?9ƒ@8†?9…A8€B3€C1B1ƒ@0…=/‡;.ˆ:.‡9-…9,ƒ9,‚:,<,|=,y>,x?,|=,‡5*‹2,¡LE§XQ‹A8|90‚F;€K=yH:zJ<{M>|N?}OBQE‡UJ‚_LrkOosR|uX‡w]yb˜iŸ‹s ”z––z|‹£ˆ¨…§‚€¤~{Ÿy~™vƒ‘p…ŽoƒŽp€pp{ŽpwŒms‡kj~bfv\_hSV[GOM>GA3@6*=0';,'9+(6+'3+(/,',-'+.').().(+-(-,*/+*3)*4(*7'*7'(3($<3,E>4IG8QR@]bKgqVjyZn‚]k„\l‰]p‘bq•eo•do—eršfuŸmrœjq›itžnx¢rz¤vy¢vyŸvvštw™vu”rokj…fc|^UlON\ECC7@91;4,671782782782893893983:94:94;:5>;6?<7?<7?<7@;7@;7B:7B:7A96@85=84=84<73<73<73<74<74<74;639529338308/09/.8/080.80.80.61.61-61-61-52-52-63.63.74/74/540540841952:63<94=84@93@70A8/C90D:0G:1H<0I=1I=1J=4J=4J=4I<3F<3D:1B8/A7.A81@70@72?61?61@72@72A83?74@85B86D97G96H96H96H94E80E8/E9-E9+G9,I9*K9+Q7*Z/&d/'n3-z63ƒ98‰;9‹;:‹=;‹A>‡@:‚=6<3:3‚<4ˆ=7‰@7ƒA5B3‚@2ƒ?2ƒ=1„<0;/€/|>/}>/=/†9/1+¢<8ÍlfÙ~y­ZTŒC<ˆLAN@tJ(+C&+E$+C&(F5-LC4VQ>[YD`bJgmQiwVj{Wl‚[g‚Wf†WlŽ\o”an”an–bršfsko›jo™irœnw ty¢xxžwu›vs—su—vs’rn‹li„cb{[TmMM]CGH:E<5@707827828938938939:4:94:94;:5<;6?<7@=8@=8@=8A<8A<8C;8C;8C;8B:7?:6>95>95=84>95>95>95>95=85<73:51;30:0.:0.91.91.91/91.91.72.61-61-63.63.63.74/74/74/540651952;83<94?:4B;5B;3A8/B:/C9/E;/H<0I=1J>2J>2K>5K>5J=4J=4F<3E;2C90B8/B92B92A83@72@72A83B94A:4?82@93B;5D=7F=6G<6K<5N;4M6.N6,Q6+Q6+Q7*P9+P9)V6'f6*r6,~;3‰@9•D@›HDŸJGŸLF QJ™LDŽD;…;0„7-…7-Œ91=4ˆ>5‡>7†=6…<5…<5=4}=3z>3x@3vA3x@3z>3<3ƒ:3ˆ73‘31˜(&³=;ì|zý•’Åhc–G@‰K@xH:nMhV>lX@t[E`L€hPysQ„wUžt\´l^É__ÓV\ÙQ[×T\äouÙzx̆|À~µ•€«•}£’xŸvœŠrœŠt™u•u‘‘u‹’s†‘s‚‘r|‹ny†ju{amoWgbN_TBUE5R/(9/&7.'6/'81):/)=.+A,+F)+H(+K'+H)'TB4YQ9B?:D?;D?;E@8E>8D=7B;5B;5B;5B;5B:7B;5A:4A:4A83A83A83@72@64>71>71>71<71<71;60:5/85.85.74/74/961961961:70<71=82A:2B;1C:1D<1F<2J>2K?3L@2N@3N@5N@7N@7L?6K>5I<3H;2E;2E;2B90A8/@91?80?80?80@93@93<5/MD=M@:K:3T@9R62O0+a<6\3-`5.`4+^/'^/%f6,m=1q=0‰I=G;—I?ŸKAŸF>›>7š=6žD;¦ND¤PE¨VJ«YK¥OB™A5—;0›>6“98‘98Œ65†52†84„?8|@6r>1rB4oA2q=0v:0‚72Œ43’-1š',ÈHIèbaÅEDÍWUáyv«VO†F<„VFmR=i[AibFjeHj`En^D|dLjT’bL²m]ÑnhÛX]à;Lç-Eò+Hõ0Lö@YìI\ä[eånrâ{|ۀ}ۃ؉‚Ãv½wº„x¶†x²ˆx­Šw¨‹y¥Œxš€o™~m˜xi“oabY„UM{IBxA>u:9:49:49:49:4:;5;<6>=8?>9>=8>=8A>9A>9B?:C@;D?;D?;FA=E@8E>8E>8E>8E>8D=5C<6C<4D;4C:1B92B92B92B92A83A83@93@93>71<71;60;6096/85.74/74/96196/96/:70<71>:1A:0B<0C;0E;/I=1J>0L@2L@2N@3N@3N@5N@7M?6J=4I<3H;2E;2E;2C:1B90@91@91@91@91A:4B92D93I81L/+V.,j76u99{;;…ECƒD?„H@…IA†G>ŽIB™NH¡PL¢OG“D7”B4šB6ŸC8 >3œ7-œ7-Ÿ=0£C5›?0™@0 E3¤G6§F6®H:¶NE´LM¯HL¥@D™9;‘98>:ƒ@8x>3o>0zI;…LA„?8„,+’).³9DÒLWÜKNßMMÊ>=À@?Ð`\³YQ„@5‚TDyaIe[@^]?ihIslOvgJ~dK–cN¼dXÖ_[æUZëANò,Eþ%Dÿ&Hÿ'Iÿ.Nù3Nò6UE8[O5cZ9gaAifEnrOz‚]z‰bt†^r‰_p‰_p‹`qŽ`u’dw”dw”dw”fs’ix–rz—xy–x~˜}ƒ„…‡ƒ›…™ƒz’zr‰om„hhd`y[TmMNaERSAVPBUOC8938938939:4;<6<=7?>9@?:@?:@?:C@;C@;C@;C@;D?;D?;FA;FA;FA;E@:E@:E@:G@8F?7JA:I@9H?8G>5F=6E<3F<3E;1D:1D:1D:1D:1D;4D;4D;4C<4?80?80<71;60:5/:5/94.94.96/96/:5/;7.>7/@9/B90C;0E;1F<0I=1K?1M?2M@0NA1M@0P?5M?4L>3K=2I<3H;2E;1D:0C:1C:1A:0A:0?;2@<3@<3D;4UD—I?–LAœNB¬RJ¾URÌOSÄLK¥@4B0 @0¥?1¥;.£7+¤8+§=/«E6¡>+˜7$:'¥>-¬A/²C2¶D:§02¯:B¹DL½LRºMR­KL–A>‚71{8/v6,x2*„1-œ37¹=GÕGWèM[âFIÏ53Ð:9½31ÈNKÆc]”J?Œ[J}cLj_CgdEtoOpQhJhN°hYäbbõQZôDQö7Iý1Jÿ2Nÿ/Mÿ*Hÿ2Oü0K÷1Jõ5Lò4Mð2Kó3Ló7Pò@XïC[îF]íIaëNcêQeèUhèVkåSjäRiãOiäNiçNlëPoòSsóVuþh…ña|å[tÕUlÍYlÉdr¨R]r-2^&'Y0,W:4Q?5B:-:8)>B1LN9VO3aV6e_?heDquT†e~ŒiwˆdxŒiu‹er‹dr‹cvŒeyhzizj€•v„›~Šž… Š’£—¨–˜©™–¦™‘¢’‡˜†zypƒmg~b^wYTmMPcGSXDXUDYVG7827828939:4;<6=>8@?:A@;BA5G=3F<2E;1D:0D:0E;1E;2D;2E<3E<5E<5@91?80=82<71;60:5/:5/:5/96/96-;7.;7,?8.@:.C;0D0K?/M@0M@0M@/M@0O?2O>4L>3K=2J<3G:1E;1D:0D;2D;2B;1@<1@<3A=4B>5F<3S81[*&‰:?¾T`ÙTeæUfãUcËJOŸ30–:/‘>0™A3®F=ÅIGÕBHÍ>@±B7§F5©B3¬@3¯?3°>3³B4´D6²G5©B/£<)¤;(©<(«:(®6&­3(¶97º9=½7>¼7<¿^õ@aøCfö@fõ?eõ?gø?hüCmÿErÿIsÿOuÿQuþUvòSqçTnåaxÖfv·Wb}15j0/X1*P8,G>/>A.;D/?G/PK._T8g`CokN||`ˆŽr‡‘v}‹qzq|s|szozŠm}Œoƒ’uˆ—z•£Šœ©•£®¦±¡¬´§±¹®°·°«µ­¡«¢” ”ƒ‘‚s„qh|c]tXSlNPdHRZCWYDYZH671671782893:;5<=7?>9@?:BA/K?1M@0M@0NA0O?/O?0O?2N=3N=3J<1I;0G;/D:0D:0D<1D<1B;1@<1A=2A?3B?6K=4\5.w32­LSÛ]iæM_å@Q×6E·&+¨1)7(’:&—<)¬@3ÃD=Ô>?Í;;±?5¨B4ª@2­?2²@5¸C9¼H;»J<¬>/ª?/¨=+¦;)ª9)°:,·;/¼<1ÊFAÎDAÐ>?Ð79Ö7<ÞBEâLNÝROÄC>ÆKCÍTLÔSMÙKJÛ?Bà5>á27Û4.Ú7.Ð1+Ï:4¿84³@9µ[P–UC{N9‚bI†kP„`F’[F­fTËrdçmhêEKò:Dê9Cç=8@?:@?:C@;DAGB>GD=GD=HC=ID>IE2I=1G=1G=1F<0F<0E;1E;1D;2C:1A:0A:0@91@91=82<71;60;60;7.;7.;7,<8-?9-A;/D0L?/M@0NA0NA0O?/O?/O?2N=3M<2L;1I;0G;/F90C9/C;0B<0B;1@<1@>2A?3B?6N;4m84—FEÄY_ÛWbßCQÞ8FÔ3;½++­1'¡8%˜:!—9 ¤;&¶>.Ã:2¾71§7,¢:-¥9-§7,¯:1¸B8ºE;·E:®>2­?0§<,¤6'ª6)¶>0ÃD;ÊG=¾8-Î@6áD?ìBBô=Aó9>ë27Þ.0Û75âGBèSLåNGÜ=9Ù10ã/2ê67Ù1(ÞÒA>ÒGBÝOMëWWíNRïDMð:Gö5F÷2Fø.Dû1Gþ7Nþ8Sý8Tý8Vþ9Wÿ;\ÿ>aÿAeÿCkþ;eýjý?mú>nø>oô=mö:jÿHrÿ;aÿ?dÿKnÿKn÷NmïUoãZnèr‚Âaj˜ILt:8\6-P9+PC2UM:^QAreUˆ|n•‚Ÿ‘¦§Ÿ¡¦Ÿ–œ˜•ž›ž§¤¦¯¬¦¬¨¢§£¦¨£µ´°ÂÁ¼ÌÉÀÑÎÅÕÐÌÕÐÍÔÎÎÕÏÑÑËÏËÆÊ¿½À°²¯˜Ÿ˜€Œ~m~k`t[WnRVjNS`FV`EX`H560560560560671893:94;:5=<7>=8A>9C@;DAHC?HC?GD=HE>ID>ID>JF=JF=MF2@@4P91r1/¨JKÁSV»>D½06Â03Á//º1)©1!£9#œ=!™;›< ¡=#¥;%¤6%ž6) 8-¢6,¥4,­81·@:¸C<²@6±B7­A4¨-Ï>-Ù5+á*&í"%ú%+ÿ*1ÿ.4í)*ç.+á3,ß4,à3,ã2,é0-ç2+Ú2%Ö6&Ð2&Ï7,Å6.½>7È`UÒq¦eSVBŠM:£WIÈf[ßd_çRTèCIõFMí@Dß??Ô@<É@8Æ@7ÑFAãMLïJNô@Kù9Hý7Hü5Hø3E÷6Gú;Mú8Pü7Rû6Rý6Uÿ6Xÿ9]ÿ;aÿkÿ?mÿ@qÿBtÿBuþBuüBtùBpÿFmúAaþEeÿKjþKkÿVtÿ_zõ]tòj~æp~Óow®^aƒCAg6/hB7sUJye\Œ}v£–­£¡²®«¶¶¶²¶¹ª¯³°·½¶½Å½ÁÊÀÃÊÃÂÊÉÆÍÕÎÖÝ×ÛâÚØçÝÛéÝÝæÚÜåØßä×ààÔÞÙÏØÊÅ˺ºº¢§£ˆ’‡t‚qexb\sW[oS[jM\iK]gL561561561560561671872983<;6=<7@=8B?:DAHE>HE>HE2G=1E=2D;2C:1C:3A:2A:4@93?74<73<71>7/>7/<8/=90>:1A:2C<2D=3H@5I?3L@2MA1NA0P@0O@-O@-L?/L>1M=0L;1J91I81E80C90@9/>:/;;/<<0=>0>?1A?0S8-‡<7Ä\[ÊZY®86«.*²1+®.%­2#¬9&¬B*ªF,¦D'£A&£A&¢<#Ÿ9# 9*£;0¦:0¦7.­<4¶C<·E;°@5«=0¨Dá;=Ö<<Í@9Á>4¶8,¹6.Ä94âHHé@Eð;Dö:Hú:Iø8G÷;Iû?NþAUÿ?Vþiÿ>lÿ>oÿ>pý>qú@rø@t÷Aq÷CjÿMmÿSs÷Jhë@`ýTsÿg…ÿe‚÷]wï_xçh{Üp}Æqx§gg^X{ZQ—~wª™’¾°­Ä¼ºÆÂÃÈÇÌÇÇÏÃÃÏËÊØÌÊØÑÊÚ×ÎßßÔäæÛéêàëíãëïåæòèæôèèðäæîáèíàéêÝçäØâÑÊÑÁ¿Â««©‘–z†xl{hbu_`rXbpVboScmT21/320431651875984984984;:5<;6==5??7AA9CC9EE;EE;HH@HH>HHLC4J@4KA5MC9LB8F=4B90E<5C:5@93?74@85?75<74<42C:5B94A96>95?:7>:7?;8@<9B?:D@7G@6J@4L@0O@-O@+L?,G@.F?/I;0K81M53K65J88F;9B?:6904,«=,­<,³=/½C4ÄF8À>1º2&Ç9+Ì8*Ð8+Ö8-Û7-â5.é3/î1-ñ.,ô.-ó0,ñ1,ê5*ã7)Ý:)Û:(Ü9&Ô3Ð3 Ï8'Æ7'¾6(ÂB5ÏSIÈNCÏSKá\Wî]ZðPRí>Cò9?÷?GêAFßCDÕAAÈ?9»<3±;/°HH>HH9H?:F=8B;5D:8A96?74?74@85@85=85;62=4/=4/=52<74=96>:9=<:>=9B?:D?9G@6J@4M@0O@-P?+L@*B?,B?.F<0H:1J65I56F35@65@<9:=6;>5@@4E<-J9)^B4€L>®QB«;- 2#¡6&£:'ž7$ž9%£>*¡;%§<(®?+³@-¶=,·9*¸6(µ7)ª9)¥:*¤9)¥;+¨>.«A1«B/«@.®?,«:(±<+¿E6ÆH9Á?1¼8+À6)Ë7+Ï7,Ð9.Ñ;-Ô8·;1®:-ª<-«=.¶E5ÆL?ÔNEÜGCã?>ï?Bú?Fþ@JøCJ÷CLúDPÿFTýBSù>Sü>XÿBaÿFhÿCiü?iù@jùBpüFvþJzÿK{ÿJzÿHtõKpñQsõ\zù_{ûXwüNqýEkúDlïEiÚKgÈ_p±nukLI~t°–‰Ì²¥äÓÉìãÜëçæêéîêçòíâóöãùûáúÿâýÿçÿÿìÿÿòþÿöþÿùûþú÷ýúõü÷ôúõòøïðôëîñèíïæëæÝàÜÖØÊÆų²®ž¡šŽ“Œ‰…ˆƒ•‡‰€†Œ~/.,0/-10.21/43/540762761:94::2<<4>>6@@6BB8CC9DD:IF=IG;JH;LI8MJ7NL7NL7OL9KI:NKBTRS_^fihxmm…lkŠkhƒ`YiYQ\OGRH@KH>GG=EE93>:1=9083-94.;60<92=:3>;4?<5@<3E>4G?4I?3L@0O?0P?/P?-L?,<;&:=(?<+A;-B71A62>42;30=84B;5H94N2.Y,)l/.‡;= FE£;0¢2$Ÿ1 ¤9'¥<)ž7$ž8"¢<&¤;&ª=)±A-¶A/¹>.»<-¾:-¾-­>-­<,²?-°8(¹>.ËL=ËG:¼6*º2&É9.Ð6,Ô6+Ô8,Ö:.Ø:/Ü8.ã6/è3,ð0-ô.+ô.+ð1)ç2'Ý6&Ô8"Ò7!Ý8$Ü5#Ú9'Ú>/Ó=.È6)Å9,ËA7É<5Í>8ÙEAåKIêJJéCCì?AëCCÞCAÕD?ÍB=Â=4¶:.®8*«:*¬;+¬8)ÀD8ÔNEÝIEà@@è>A÷BIÿHPôAGô@IùCOýGTþEUú@Uû?XþA_ÿDfÿCiÿCkÿFpÿIwÿK{ÿL|ÿJzÿFxÿHwÿKtúNtÿZ|ÿa€ýUvñCdûIkÿTvÜ?\ÍI`Ø{…¸||aC;|n®ŽÕ³§óÛÑûìåúòðù÷ú÷ôýôìûúëÿÿêÿÿìÿÿîÿÿóÿÿ÷ÿÿûÿÿýüÿþûÿýùÿúøÿøöÿõöýóôûðôùðóðçêåßáÓÏξ½¹­®¨¢¥ž£™£—£«žž¦—›£–/.,/.,0/-10,21-32.54/650880991;;3==5??5AA7BB8CC9HEQPL^]bmlzzz’‚¡€‚¨€€¦{u—rkŠe_{YSmTLdMEZG@PB;2?=1@<1?;/A;-F?/H?.K?/M@/O?0O?/P>0L?/@=*?>,@=.?;/?;2>93=:5:94<94D95M51V-+j)-„28ž8C«>C¦7.¥7(¥:(ª?-¨?, 9&¡8#¤;&¥:&«<)³>,¹@/½>/Á=0Å=1Ä>2½?3¶=2²9.®8*¯9+°:,²:,³9*¶;,¹;-ÄB4ËE9È>3¾1'À2(Í9/Ö5+Ø4*Ú6-Û7-Þ7.á6,æ3,ì1*ó0,ô.+ô/)ï0(ä2&Û4$Ò6 Ð5×2Ú0Ú4$Ü<.Ö=/Ð9.Í=2ÒD:Ä5-Å60Ê;5ØD@âMIåKIÞC?Ö=8Ó@9ÎA8Ç>4¾VádtþŸ§ÓŽd92lJ>¥ynÐ¥œõÔËÿéãÿôòÿýÿÿüÿùóÿüïÿÿïÿÿðÿÿòÿÿôÿÿ÷ÿÿûýÿüûÿýúÿüøÿúøÿù÷ÿö÷ÿõöÿôøþó÷öëïìãäÚÕÒÉÆÁº¹´³´¬±´©°¶ª¶¾³°¸­¬´©10,10,0/+0/+10,21,43.54/77/880991;;3==3??5AA7DA8IE:LF:NH:PJ:RK9RM:SL:QK=OJDVTUfdqwx††¨¹“ϐƎ‹À‡ƒ¶{w©pmšid_[~UPnNJaKGXEBM?=B;7895296/85,85,671783891;;1>5L?6K>5F<3B92=82:946;47<59<5>:1H4-Y2-w78”?D¦>E§9<ª;0ª<+«@.¬A/©@-¥<)¦;'«>*§8$­:'µ<+¼=.Á<-Å;.Ê<0Ê=3Å?6¾>3º:/·7,·7,¸8+º8+º8+»7+ÇA5ÍC8Å8.Á1&Æ3)Ë7-Ï5+Û4+ß3)á4-â6,ã5,ç5+ì1*ð/*õ/,ö/*ò/)ì0'â2#Ù4!Ð5Ï4Ö1Ù/Ø2"Ø6)×9-Ô:0Ö?6ØE=ÖF>Í@7É<5Ë@9ÖKDÙNGÒE>Å;1Å=1Â<0ÀCòBLûIUÿJYýFXúCYûC]û@_ûBdÿElÿJsÿNzÿO|ÿLyþIvÿJwÿTÿT}ýJqùImÿStÿVtøNiëD^äF]êXkÿ–¢ÿµ¼óžŽHFk.)¦kc͖óÈÁÿãÞÿñðÿüýÿýÿü÷þþöÿÿöÿÿ÷ÿÿøÿÿúÿÿüÿÿýýÿýúÿüøÿûøÿùøÿø÷ÿöøÿõ÷ÿôøÿôøýñóóéêäÜÚÖÑÍÍÊÃÉÉ¿ÊÊÀÊÍÂÉÐȾȿ·Á¸65143.32.10+10+21,32-43.66.77/880::2<<2>>4@@6B@4JD8ME8OH8RK;TK:TM;SL*F@*G?*H@+IA,IB0IA4HB6HA9G@:K=?ž51§;/ª<+ª?-ª?-©>,©>*¬?+°?-«8%²9(¹:+¿9-Ã9,È:.Í:0Ï<4Ë>5Æ;4Â91Á8.Á8.Â9/Â8.Ã6,Å7-ÑC9Ð@7Ã0&Ã,#Ð7/Ö<4Ó2*à3,ä2(ç2+è3*ê3+í2+ð/*ó-*ö/*õ.)ñ0)ì1(á4$Ú5"Ñ6 Ð5Ø7#Ù3#Ö3$Õ3&Õ5)Ô8,Ô<1Ö?6ìYQáRJÓHAÌC;ÊE<ÌI?ÈE;À>1¼:*¼;(¼:*¹:)·:(¸:+¼>0¿A3ÁA6Á<3Å<6ÏA=×EEÝGHäIMëLPèBFê@CðCIùKTþNYüJZüF\üF_øA_ùBaýEiÿJpÿNwÿOzÿNxÿLvÿQ{ÿRyþOvýOtÿVyÿ]{ÿSoîD^úTlîQd÷dtÿ’žÿ‹•ôƒ‰Ç`d§MMµjgΏŠï¼¸ÿÞÙÿïîÿúùÿüþýûÿýúÿþûÿÿûÿÿûÿÿüÿÿûýÿûûÿûøÿûøÿüùÿûúÿûúÿøúÿöøÿó÷ýñóùíïòææçÝÛßØÒÛ×ÎÝÛÏàÞÒßáÖÜãÛÏØÓÅÎÉ<94;8185052+41*41*52+63,74-85.96/;81=:1?<3A>5C?4JB7MC7PG8SJ;WK;UL=UK?SJCSJK]Wcnl‚‚‚¦‘•Åš ÚŸ¦ê¢©ñ¡¥ïž ë™›å•˜Ý”•Ö‘ʉ‰½‚ƒ±zy¡rq‘fc~XVkPN\IGRFCLCBJ??K==G;:@;9:<94?;/C=-E@,F@*FA+EB/EC4CC7BC;AC>@ACBLCANEEOCHNAIL>HI>GDCHAA=2L:.gF7ƒOAI<Ž?2”8)¥>/©>,«>*¬?+­@,¯@-°?-±<*±8'¶8)½9*Ã9,È8-Ì8.Ò91Ô;5Ï:4Í:3Ë81Ë81Ì92Í:2Ì70Ë6/Ó<5Õ>5Ò91Ì2(Î4*Ø;2Ú<3×3*ä1*é1'ì1*î2)ð1)ò/)ô-(ö,(÷-)ô/)ð1)é3(â5'Ù6%Ò7!Ï7 Ô9%Õ8%Ó6%Ñ4%Ò4(Ó7+Ò8.Ð7/ãNGèXPçZSÚQIÌG>ÄD9¿@7¹>/¹<*¹<&¹<(¹:'¸9(º;*À>0ÃA4ÉD;Æ@7É@:ÑFCÕIHÖHGØGJßIKæFHèBDíDIõLSüQZûO]ûL]ûK`öD^÷DaùFfýIlÿNuÿOxÿOxÿPw÷VxóUvôTvüYxÿ]{ÿZwûQkòI`ýWköUgêM^ö^mâKZæTaåTa×XaÁefȃ~嫧ÿÔÑÿëèÿóòÿøùÿþÿûüÿûüÿûüÿüüþüúýýùúý÷÷ü÷ôÿú÷ÿûøÿüûÿûúÿøøÿóóýîñúëîðáäéÝÝäÙÕâÙÒæßÕëçÛñíáññåìóìÛæâÎÙÕ@=6=:3:7074-52+52+52+63,74-74-96/;81=:1?<3@=4B>3JB7MC7RF8VJ:WK;XL?:6@<1A>/C@/CB0BC3BD7?D=>D@CVCIaLRhU\o\br`dobbjd`afXWaJDlG>ƒSE•XF“J7‘@+™>+¨A.®@/®A-¯@-°A.´A/²=+°7&µ7(¼8+Â8+È8-Í6-Ñ7/Õ81Ø;4Ò72Ð72Ð72Ñ82Ô94Ô94Ó83Ó6/ÞA:Õ8/Ñ3*Ö8/Þ=5Þ=5Ú91Ü5,ç2)ë0'ï0(ñ0)ô/)÷-)÷,(÷,(÷-)ô/)î2)é4)á5'Ú7&Ô7$Ï8#Î7"Ï8%Î7$Ï6&Ð7)Ò9+Ñ7+Î4*Ë4+ãNGód\ë`YÕOFÄA7º;2µ9-¸>)¸>'¹<&¹;%º9&½9*À2ÊD9ÊA9ÎE?ÕKHÓLIÎGDÍEEÖHGãIIæCDèEHòMSøSZùR\÷O^úOaôH^õG`øGdûIiÿNrÿQxÿRyÿTzðUuïZwù^}ý^|ùUpõMgùOiÿYnÿ[mÿctðM^÷TeôO`üUgõL_äR_À^_»vqל˜úÉÅÿåãÿíëÿôôÿÿýüÿÿûÿÿûÿÿûÿþýýýýüúþùöýøõÿøõÿùöÿúùÿúùÿööüððøéìôææëÝÝèÚÙäÙÓèÞÕðèÝùóåÿúìþþòôúöáëêÓÝÜB>5A=4@<3>:1<8/:6-84+73*62)62)73*84+;60>93A<6E>6I@7MC7RF8UI9WJ:XK;ZLA[NHTIMXR`gd|~§’Ê— ãžªö¥°ÿª³ÿ«²ÿ¬´ÿ¬²üª±ùª¯ó¨¬ì©«èŸ¡Ú™šÒÁ±tr¡he’]Z‡XR~XQzYQvVOnMH_C?M?:@?;:B?8>>4@B5BE:?D=:CB>FH?LUDVnQfƒarŽisŽtvx„o€€^lŠ[c’WYžWU¦VM¦M?Ÿ@.œ9$ :$§<(¬=*®?,±@.³@-´?-¶=,¹;,º6'¾6(Ä6*Ë7-Ñ7-Ö8/Ú91Ú83×84Ø95Ù:6Ø93Ø61Ø61Ú83Ý:3æC<à=6Ú70ã@7þ[Rÿlcÿ]Tç?6å3)í2)ñ2*ô/)ô*&õ(%ø(&ø+(÷-+ó0,í2+ã1'Ú0#Ô1"Ô4$Ó:(Ì;&Ê<(Í<)Ï<*Ò:,Ò9+Ò8,Ñ7-Ú@8Ï81ÜGAôc^åXQËB<Å@;·4*·:&¶<$¹<&º<&½:(¿:+Ä<0Æ>2Ç>4ÌC;ÙPJßXRÔOJÃ?:À?:ÏHDÞHGâGEæJKïPTñRWïNVíKXñL\ùRføOf÷Ke÷JfüMlÿQsÿRvýRvôWvîXuõXuû[wÿ\xÿZsÿWnÿVkÿbuýVgÿ\mÿ[lñFXôDXÿQeîVeÆfgªieʏ‹ç¶²øÒÏÿëçýïîüø÷ùýüùÿÿùÿÿúÿþüþýÿþüÿûøþöôþùõÿû÷ÿùöÿöôÿööÿõõöèèæØØãÕÔÞÐÍáÖÐñçÞüôçþøèÿüéÿÿóúÿùèñðØáàC?6B>3A=4?;2=90;7.:6-95,73*73*73*84+:5/=82@;5D=5H?6LB6QE7TH8VI8WJ9YK>ZMEUJNWQ_eby{¤ŠÉ”â›¦õ£®þ«´ÿ¬µÿ®¶ÿ¯·ÿ°·ÿ¯¶ü¯´ø¯²õ©ªë¢£ã˜˜ØŒŠÉ€»uq®ie c^˜`WŽ`Vˆ]TVPtMIbFCTBAIAAC<<:AB=FEACD?A?@DBEOMRWVdch†quš}¢‡}Ÿ’}œ {š¥pŠ¤`u¬Yi¶VaºQU¸HF°@4¬;)¬<&­='¨8$¨7%«8&®9(°8'²9(µ7(¸6(»3%Â4(Ê7-Ó:2Ù<3Þ=5ß<5ß<5á>9ß<7ß<7á>9åB=èC=çB<æA;å@:æB9ä@7Ü8/Õ1(Ø6+ëI>ÿ[Oñ@6î6,ê+#î)#ø-)ÿ/-þ,+ö((ú0.õ4/ï61ç6.Þ3)Ö2&Ô2%Ï6&Ë:'È;'Ê<(Í:(Ï9*Ð7)Ñ5)Ð4(Ó9/Ï5-Ô=6åPJåTQÛLHÍB?·1(¼;(»=&½<'¾;'¾9(À8(Â:,Ä:/È>4ËB8ÕOFÜWPÒRIÃD=¿C;ÌHCÛLHßJFåMLëSRíTWëPVéNVìOZ÷VføUhùSiúRküRmÿSqÿStÿRuòMmøUtÿ\zÿ_{ÿ\vÿUoûRiûReüUf÷RbÿZhÿZhóN^øScþYißS^¶`_—^W¶}Ù©¥îÈÅýáÞùééýøõúüùùÿÿøÿÿ÷ÿýúþýÿÿýÿûûÿ÷õýøôþùõþùõþöóÿ÷öÿõõöêêêÜÛäÖÓÝÐÊßÕÌïåÛüõåÿùçÿýéÿÿïúÿøèñîÛáßEA6EA5C?4A=2?;0=9.<8-;7,84+84+73*84+:5/=82?:4C<4G>5JB7ND8RF6TG6WG7YIBZEJpW]‚cs˜r—¥z§®«²{£¸vœÀp“ÂcƒÀTnÂG\ÐK\ÑHPÄ<<º5.¸9*µ<'°<%°;'°;)²:)´;*·<,»<-À<-Ä<.Ä6*Ë8.Ó<1Ù?5ßA8á>7à<3ß:4Ü71Ù4.Ø3-Þ93æA;ìE?éB<ä=5ã<4Û4,Ø4+Û7-Ô2'Ì, Ö6*éG:õK>ò@6ï4-ð-)ö,*ú,,ü,,ø*,ð*)ì/+è2.ã5.Ü4+Ø1(Õ1'Ñ3'Í7(Ë:)Í:(Ð:)Ò;*Ó:*Ô8+Ô8,Ñ4+Ö<4Õ:5Õ<7åONíYWÙEEÂ3/À;,¿<(À;*¿:)Á9)À8(À8*À8,Æ=3ÇA6ÏJAØUKÒRGÆG>ÀD:ÇG>ÖKDØICÝLIäSPåSTâPSâMSåNWòXdöZhý[pþZrüVnúRlûQlÿQpýGmÿPvÿZ}ÿ[{ÿVrýTkþWkÿ\mûYhøZhûamö`kí]gïfnìfmÉ\_ ]W{OF˜mfÁ˜”ݺ¶ðÔÑôàßÿõôùù÷ùÿýùÿÿ÷ÿýúþýÿÿÿÿýÿÿøùüùôüùòüùôýøôÿùöÿøöùîìïäâåÚÖÛÐÊÜÒÈîäØýöäÿûèÿýçÿÿíúýôêðìÞãßIE9HD8FB6D@4B>3@<1?;0>:/:6-95,95,95,:5/<71>93@;5E>6I@7LD7OF5RE4UE5WG8WI>XMKXNW^Zqpp–€†ºŒ–Ô•¡é©õ¨°ù©±ù­³ý°·ÿ±·ÿ²¹ÿ´¸ÿ´¸ÿ¯±ü«­ø¥§òŸžê—–⌋ׂÍ}yÅum¶pgªf`ž_ZYX„QQuGGcA>Q=5DH8BT=C`@EnCJ€OU–]d«fx¿kÉnšËo˜ÉiÈ`ƒÉWxÆIgÄ;UÆ2HÙAPàEMÑ;<Æ71Ä?0½@,±:$­6"­5$®5$³5&¶7(¼8+Ã;-È/Û?0Ü@3Ü@3Ò6*æLBåJEÎ50ßGFóZ\ßIKÕA?È2ÈF9ÏOBÎPDÆH<¿C7ÁC7ÎH?ÑF?ÕJEÛPKÝROÙMLÚKMÜKPëX`ó[güaqÿauúXmõOgõMgÿNkÿOuÿRyÿUwÿTqüTmý[pÿcuÿjxÿguúboõamídlãflÙhjÎghµfa^TeG<^U©ˆÍ«©åÇÅïÚÙÿóóùøöùýüøÿÿ÷ÿÿûÿÿÿþÿÿüÿÿùúþûöûûóûúõþûöÿýùÿûøþôòøíéêßÙÞÔËÝÓÉíæÖÿøåÿþèÿÿæÿÿëøúïêïèãæßNH:MG9LF8JD6HB6F@4D=3C<2?80>7/=6.=6.=60>71@93?:4C>8EA8KC8NE6QD3RE2VF6VH;ZMGVMR[Whlk‹~‚±Š“Î’Ÿãš¦î¦®÷©¯ù­°ý¯³ý°³ÿ°´þ°³ÿ¯³ý«®û¨«ø¤§ô ¢ïšœé“•âŠŒÙ†…уÉ{u»mk¬dež_a’Y[„RQsNHbWFY_CQmBLEM˜MT¬U]¼[bÊZhÙRpâRußTuÙPlÒJbÍBWÇ8JÅ.?Ô8EãCKæGKØ>>Í>6ÌF:ÃH6¶?+·>-¸=-º<-½>/Ã?0ÊB4ÐD7ÕE:ÙE9ÚB7Û>5Ù;2Ù6-Ù5,Ú3+×3*Ô1*×4-Ú7.Ý90ß80Þ7/Ý6.Ü5,Ö/&Ù5+×7+Ï2#Í1"Ò9)Õ>-Ô;)Ø<-æD7øJAýD?ù64õ*-ö*-÷/2÷67í55â30Ú1,×0*×/,Ù0-Ù0+ã81ä91â:1â;2à<0ß=0Ü?0Ú>1Ñ7+ïWLøaZÓ;6Ñ;:æPQÜFHæPQÏ<4Ê:/Æ8,Å9,Ä:-Ä<.Ã;-À;,¾:-¾<.ÃA3ÇH9ÇI;ÂD6¾@2¼>0ÉF<ÊE<ÎIBÕPI×RMÕNKÓKK×LOéZ`ð^hüfrÿhxü]qòPeóMeýNkÿVzÿTxÿRrøTmö]qûhxûjw÷erüetó_mì`kêkrßruÃjfªd\žla}fVXH9kXJ”|r½ œÞÂÁîÖÖþîïûõõûûûûÿÿùÿÿýþÿÿþÿÿûÿÿúýÿþùûþõûüöÿþùÿÿúÿþúÿûõÿ÷òñèáäÜÑáÙÌðé×ÿúäÿÿæÿþåÿÿê÷ùëíðçèéáQK=PJ1ÃE6ÃE6ÅF7ÉE8ÎF8ÑG:×G<ÚG=Ö>3Õ;1Ö8/Õ4,Ö3*Ø4+Û4,Ú6-Û81Ý<4à=4ß<3Ý90Ü5-Ü5,Û7-Ò.$Ý;0Ú=.Í1"Æ-Î7&Ò=)Í:&Ì9'Ô8)â:/ó=9ÿ@@ÿ<>þ37ó,/ê,.á+*Ø*)Ô+(×/,Þ44ä88é99ï75ð74î73è71ã7-Ü6*×5(Ñ5&Í5(çPEÿmcÛHAÈ42×CCÓ>BêVVÙA<Ò>4Ë8.Æ6+Æ:-Æ/Á=.»9+»<-¾?0ÀA2¿A2½@.¼=.»<-ÃC6ÄD9ÈH?ÐPGÓRLÐOIÒNLÕONé^cîagûitÿnzÿduõVjõQiÿUoÿWvÿVtúXpñ^pônyöw€íksÞXañ`mñ`mìboïs}숊́|ªth™yjskXON:_VGƒqg¯–’ÜÀ¿ïÕØüéëþôõýûüýþÿúþÿþýÿÿýÿÿûÿÿùþÿÿûùÿõúýöÿÿúÿÿúÿÿøÿý÷ÿþöùðçíåÚéáÔôïÜÿûåÿþåÿÿãÿÿèùúêòôçîðåSM=RL4D=3B;3A:2@93A:4A96@;7A@;CC;IE9MG7OG2RF0UF1UH5WK?RHFXR^jg‚}§‰“Ä’žÚ˜¢ç¤§ö¦§ú«©ü«¬þ¬­ÿ­®þ¬®û¬®û¨¬ö¦ªô¤¨ñ£§ð¡¨î §í¤è›¢æ™žâ’šÛ‹“Ò†ÊƒÂ„ˆ·ƒ¨ˆyšmˆšcz©Xi»Q_ÏMYàIRèAIê=Aé=;ã>8ÝC9ÖH:ÎI8ÅF3ÂC0Å@1äTIàG?Ú;7Ø64Ø88Ø:;Ñ98È74À:/¾<.¿;.À:.Â8+Ã7*Æ4'Æ2&Î4*Ð3*Ñ3(Ô3)Ö3*Ù5,Ý6.Ü8/Þ=3Û=2Ü;1Û8/Û7-Ú6,Ø4*×3)Õ3&Ó3%Ð4%Ï6&Ò=)Ñ>*Ê9$À2È:&Ê4%Õ1'ç51ú<<ÿ=@ÿ7=÷37ê-1á-.Ù--×/.Ü43ã9:é;=ð9=ö26ø03ô01í1/ä1*Þ2(Õ1%Ï3$É1$Ñ=1új_äTLÈ95Ð@?Ë:=äRSäJHÜC=Ñ:3É6.Æ8.Å;0Â<0¿=/º;*¼?-½@.¼?-º;*º;(½;+¾<,¼>0¼>2ÀD8ÈLBÌPHÊNFÌLIÐNLèaeìaføhrÿo{ÿhx÷Zk÷UjþZrÿYsû]tîaræjtë}€ñ‡‰èwyÚ_dñgtþm|óeuëlwö‘•ì¢ŸÄ”Š¢|hjUHQSK>PJ>êDFå@DÙ8=Î65ÍB;ÈD8ÉC8ÇA5Æ>2Ã9,Â6)Â2'Æ2(Ë3(Î4*Ó5,Ø5.Ù4.Û4.Û4,äB7Ý=1Ù7,Ú6,ß9-ß9-Û5)Õ1%Ø8(Í2 Ê1!Ï9(Î8'Ç4"Ê7%ÔC0È7&Î8*×6,Þ5.æ3/î53ö:9û?>ÿLKúHFòBBì>=ê<=ç7:å26æ,1ô+1ø)/ô,.ï/.è1+à4*Ù5)Ó7(Æ0!À.ôdYë]SÏ@:ÔDCË;;ßMMêRQàHEÓ;6É6/Æ8.Æ9/Ã;-¾:+¾<,Á@-ÀA.»<)·8%¸9&½<)¾?.µ7)³7+¸>1ÁG:ÅK@ÅIAÈIBËJEåa_æ^`ñdjþnwþkuó]iðXeø]mú^sõbtèdoãlrì~ù‹ö†…éqsøryÿy†õaqàXföˆ‘ÿ´´Ð®¢ ›‡]jPDR9QT?jbU›ˆÚÀ¿òØÙöàãÿô÷ÿúýÿþÿýüÿþüÿÿýÿÿûÿþùýûÿúôÿòòþòùÿôüÿöûýòÿýôÿÿôÿÿóûõç÷ñáþùåÿýçþüãþýáÿÿêÿÿñýýóüüòXO@WP@WN?UN>TK2G?2H>2F@4GC:GE9JG8NI6RJ5UJ4UJ4VK9XNDULMZTbkhƒ{~§‰Ã‘™×˜Ÿç£¤ö¥¢ù¢¢ü¡¢ü ¤ÿ¢¨ÿ£«ÿ¤­ü¡ªõ¡©ñ¡¨ì¥¨íª©ï­©ó±©ö¬©ø ©ø—§ò’¡â–ŸÖ¦£Î¶ž¾¹…œ¸gz¿L]ÑERß>Mç;Gç?ß<=ÝEBÉ:4ÊD9ÊF:º1)ÛJEèJIéCEë>Bè;?æÚ<=Ô<;ÏB;È?7ÊD;ÑMAÍK>¿=0¸6)½9,¿7+Ã6,È5-Ë2*Ñ/*Ô/+Û2/Þ5.çA5ß9+Ù1$Ý3&å9+ç;-ß8&Õ2Ï2Ì4Ê5!Ç4"Ç4"Ê4%Í5'Ï5)Ê0&Ï2)Ñ5)Ò6*Ò4(Õ3&×3'Ü4)à2)æ3.ë52ë33é/2ç-2è-4í.5ö-3ö+/ï+,ì/-ê5.ã9,Ù7(Ð4%Ã-Ä3"çXHéYNË;3ßNIÅ41ÚHHáOPÜJJÔC@Ì;6È80Æ8,Ç9+È<+Å<*Â;(¾9&¼;(»<)º=)º=+·<,´8,µ;0¹=1»?3»?3¾@4À@5ÄA7ïjaõpiêc_ômjûqqìadôgmÿpyÿlzûhxðdoébiëdjîlnîqoîqoûy{ÿ}…ùZlücwßbpû¬¯¶ªš}‘u]rQJY:LR8snZ¥•ˆË·°íÕÓÿîðÿö÷ÿ÷ûýøüüüþþÿÿþÿÿÿþÿûÿþðÿôåþéæûêïÿîøÿöüÿôþÿóÿþñÿýñÿûîÿúêÿùæÿùãÿùáÿùáüúåÿÿõÿÿûÿÿûYPAXO@XO@VM>UL=TKÌLAÁC5¸:,·9+¹7*¿7+Æ6-Ë4-Ñ2.Ø3/á53ä84ä>2á;-Þ6)ß5&á5'á5'Ú5"Ó4Ñ9$Ë9"Ç9%Ç:&É<+Ë<,Ì8,Î4*Õ3.Ö5-Ó7+Ï7)É6&Ç4"Ë4!Ï4"Ø2$Þ2&ã0+æ.,æ,-æ,/æ-2è.3ì+.í,-ì0.è2.à4*Û5'Õ8'Ò9'Õ?.»*ÖD5Ð>1ÙF>ëVPÚB?ØBAçUVâRRÜKHÔC>Í=5É9.È9+Ç8(È;*Ä;(¿:'½<)½>+º?-¹@/¶>.²:,´;0·=0¸>1º?0½?1ÁB3ÅC5ëi\òmdçb[ðkfõolèbañklütxÿq~ÿo|öirí]fêY`ñbf÷qpþzxûvwÿx~ùRdþ[pä]nö¦©©¦“jŒkZtON_;SZ;us\©ÖĸöáÜÿõñÿúúÿúûÿûüüüüúþýûÿþúþÿõÿúíÿóáÿéáýæéÿëóÿñøÿòýÿòÿÿñÿýïÿýíÿúéÿöåûóàúòÝüôßü÷äýúóüüúÿÿý\PB[OA[OAYM?XL>WK=VJDã=?å==åAá>CàBè;?ã9<Ü68Ö66Ñ96Ì;6ÕHAÄ;1¾5+ÅA5ÍK>ÆH:»=/·8)º6)¿7)Ç7,Ï6.×50Þ71æ95é=9×3*×5*Ú6*Ü6*Ý5*Ý7)Ú:*×>,Å4!¿4¹4!¹6"¼8)½8)½3(À-%ã@;å>8Þ=3Õ<.Ì9)È7$È7"Ì7#Ò7%Õ3$×/&Ù.'Û.*Ü.-Û//Ü./Û,)ß0+à5-Ü5,Õ3&Ð4%Ð9&Ñ>*ÔA/Â1 çSEÒ;0ÚA;ÞC?èJIðTUíUTçSQãOMÝJCÖC;Ï<2Ê8+Å6&Ä7&À7%¼7&¹:'¹<*·>-µ=,²=,°:,±;/´<.µ=/·=.¹?0¾C4ÃE7Ü\Qêg]äaYðlgöpmça`ìfgójqàR^ï^kõhqòemñ`gôeiùqqþxwútuÿnuóJ]øRhä[mñœ¡£œŠa€`UoHOd=W`Aww]­¥’áÑÂÿîæÿøñÿüøÿþúþÿúûÿüûÿýûÿýùÿûóÿöèÿîÜþãÚøÞáùáèûåïüèöýëýþìýúéÿúêÿ÷æúñàôèØòçÕöëÙøñáþúñýüøÿþû\PB\PB[OAZN@YM?YM?XL>XL>UI;TH:SG9RF8RF8RF8RF8PF:LE;KGEç=Fã?FÖ:>Ñ?@ÑEDÆA<º61Å>:êZYÝABã@Cæ=@ã:=Û89Ó97Ð<8ÎA8ÏE;Â:.»2(À/¸9(½8)Â9)Ë8.Ò:/Ù80à91è;7ë>8Ø1+Ù2*Ü3,Ý5,à5-ß7.Û9.Ö=/É7(Æ:)Á<+¾<,¿;.Á;0Å<6Î95ëC@í@<ä@7Ù=1Ï9*Ç9%È:&É;%Ï<(Ð7'Ï1%Ñ1%Ô1(Ö3,Ô1,Ñ/*Ó2*Ó5,Ó7+Ð7)Í5'Ê7%Ì;(Ì>*Ì;(Ï<,ô^PàF<Ò3/Ò.,æ@@ûWXÿusÿroÿjgö^YçPGÕA7Ç5(½. Ä8'À8(»8&¸;)·<,µ=-²=,°<-¯;.­<.°.¼B3ÀF7ËMAß`Wâa[ôpløtræ`aä]aæ]dÖHTçYeógrôgoöelükpþsvþvvûpsûenñDXôKbåXk뒖 •ƒ_zYQlCSh?\gEy|_°ª”çÜÊÿõèÿùðÿûñþþôýÿ÷ûÿúùÿúöÿøòüóêûëÚøÞÎóÒÊëÌÏìÎ×îÒàðÖéóÛò÷áöõáûöãüõãõìÛíáÑéÝÍíáÑñèÙüõíü÷ñþùó\PB\PB[OA[OAZN@YM?YM?YM?WK=VJ@Ð@?ÐIE¿>8³2,ÈC<àUPÜDCáACã?@á>?Ú?=Ô@<ÑD;ÏF<Ç=2À8*½5)½9*¿=-¿=-½;+½<)Â:*Ç;*Ï;/Õ;/Û8/à8/ç83é:5æ95ä52ä20æ21ç32æ40Ý2+Ô0'Ë1'Ë7-È:0Ä7.Á4-Ã40Ì:;Ý?@ë8;í76ä71Ø5,Ì4&Æ5"Ä7#Å:%Ë=)Ë8&Ì4&Î5'Ô8,Ô:0Ó9/Ð8-Ð>1Ê;-Å8'Ä7%Æ9'Ç<)Ç<)Ç:(Í>-Í:*Ø>2áC:Ô/-ä::à24ß56×53Ö;6ÞC>åKCêQIêSHèTHäUGË?0Ä?.¾<,¸=-·>-´?.°?/®>0¬<.¬<.¬<.¬=,­<,±=.·A3ºD6ÆLAÞbXâc]ðnlôrrå`cå`eç`g÷kvûoz÷kví`hð_fýlqÿx{ÿy|úmsø^jóAWôC]èUh懍£“ƒg]YtI^uIhwPˆf³²–èâÌÿúéÿýíÿþïýÿòûÿôøÿôôÿñíûêäòáØî×Åèǻ伺޺¿Þ¼ÇàÀÍâÃØæÌãëÓìîØôñÞ÷òßóêÙìàÒèÚÍêÜÏïáÖòèßñèáòéâ[OA[OA[OAZN@ZN@YM?YM?YM?XL>XL>WK=VJQI>QI>SK>UL;XM9XM7YL9XM;WK?ULGYSWe^nnjƒut–~}¥„…±†‰´‡‰¹Š‹Á‹ÈŽÏŽŽÔÕÓ”Ó‹ÊƒˆÀ|¸u|²ov­io«ljœ€lˆ“cy®YvËPoãBdð7Vö4L÷8Hï@EåFBÝJCÛJEáGGèCJò=Nð>LäCI×CCÌA>ÎIDº;4°4,ÉI@ÕLFØBAÚ?=Û;;Ú<;Ø@=ÔE?ÍG<ËG:À8*Á8(À8*¾9(¼9'»8&½:(À;(Ä;)Ê=,Ò<.×;.Ü8.á6.ä6/è50é32è./é,0î02õ47õ77î45æ21Ú.*×4/Õ62Ñ32Ï/1Ò/4Û6=ê:Dí06î02æ3/Ü3,Ñ5)Ê7'È9(É<(Æ8$É6$Î6(Ó:,Ú>2ÝA5ÝA5ØA6ÓG8ÉA1Â;(À9&Ã<)Æ=*Å<*Å8&Ì:+Í7)Í0'æC<Û2/ï?Aã/2Ú*,Õ1/Ò5.Õ81Ö90Ò8.Ì5*Æ2&À1#ÎE5ÆA2¼=.µ:*±9)¯9+«:,ª:,«;/«=0¬>/¬<.«<+­<,²>/µA2ÉSGàg^àc_êjiînoæchðjqõoxúq{ýt~ömuîbködnÿrzÿx~ÿquúipøWfùAYô@[êQfá~ƒ¬—†ykmˆ]o‰ZyŠ`—r¶·˜ßÞÂùôÞüúåÿÿïûÿïõÿïïÿëçúäÜïÙÐãÍÅÞÁ°Ö­¨Ó¦ªÐ§°Ó«¶Ô®¼Ö±ÇÚºÒßÁàæÌèêÔòíÚòéØîâÔìÛÑêÙÏìÛÓéÚÓæÙÑåØÐ[N>[N>[N>[N>ZM=ZM=ZM=ZM=YLUL=XLNÝAEÔFDÈA=ÉHB´:/±7,ÎOFÉB<Î=8Ð64Ï10Ð51Ó>8ÏE;ÈF9ÃD5¾9(Ã:(Â:*¿:'½8%¾9&¿:'Á:&Ä9&Ë:)Ó:,Ù9+Ý7+á5+ä3+ê3-ë*+ñ*-ø-3ü/4ÿ17ÿ37ÿ38ý58ù8;õ8<ò9>ò9Aô9D÷7Fû6Hþ5Eô+5ô-2í12ã4/Ù6-Ð8*Î;+Î=,Ë5&Ñ8*Ù;/ß=2â>4ä=4å>5ßA6ÙJ<ÏG7ÉA1Ä<,Â9)Â9'Æ8*È9)É2'Ó9/á@8ëD>Þ0/à..ë46è66Ø3-Õ7.×90×:1Õ;1Ò;0Í:0É;/ÖL?ÌF:¿@1´9*°6)¬6(«7*©8*¬;-­=/®>0­=/«<+«<+­<.±=0ÀKAÚdZÞc^èkiðosêinõrzüvîfp÷oyùryöjsþlvÿwÿv}ùhoùcn÷RbþB[÷ZM=ZM=ZM=ZM=ZM=YLVJ>XL>YN5É83Ç/,Å*&È/*Í:3ÌC9ÃC6¼>/À;*Ä;)Ã<)Á:'Â;(Ã<)Â;'Ã8%Ä5$Ê7%Ô8)Ù7*Ý5*á3*å3)ê2*õ33ÿ58ÿ8<ÿ4:ÿ-2ÿ(-ÿ(-þ+1ü-3ö)0ò&1÷)6ÿ,?ÿ*Aü 9ó/ö"0ó(.í,1æ0/Ú1,Ô3+Ñ5)Ð6*Ô6+Ý90æ=6ë>7ë:4è71è50â92ßH=×K<ÓE7Ë=/Ä6(Â3%È6)Ï8-Î4*Ô6-æC<ß82à21Ò ì89å63Õ1(Ò4)Ò4)Ï5)Î6+Ê6*È5+Å7+ãYNØRFÊH;¾@2·;/µ;.µ<1µ<1¯9-±;/±=0±=.¯;,­9*­9,®:-±<2ÐYQÜb]ìppôvyîmrõq|ör}ÿzƒÿ‰ÿy€ôhq÷epÿq|ÿuÿktø^jöOaÿA^÷8WéG^Ûntº‹™©„‚žn~šg—hœq¡©‚´º–ÈÍ­ÕܽÌÙ»ÁÔ´²Ì©§ÂŸž¼˜š¶–²Œ±†‰³†µ~¹„•À‹œÂŸÄ‘¨Å™²È¡¾ÎªÉÒµÚÙÄæßÍêÞÒéÖÏáÌÉÛÆÃÔÁ»Î½µÈ·°ZM=ZM=ZM=ZM=ZM=ZM=ZM=ZM=XK;XK;XK;YLYM=WMCWLHXNOZPX]Ub`Yia\rjfokŽsp›vq§{u³ƒ~ÁŠƒÉŠƒÇˆÀŠ~¼ˆy²ƒr¨†r§t«‡l£†\„HL¤B9¶A:ÍC@Þ@?è:;ô<>ÿDE÷><ó=<ì>=ê@AëBIêCMëANãALÐ>>Å@9¾?6·>3°,º7%Á:'Ã<)Â;(À9%Â9&Å:'Ç:(Ë:'Ð9(Ö6(Ø2$Ú."à/%ì7.õ=5õ82÷40÷0-ø**û&(û%'û%'û%'û&*÷!)ø".ÿ'7ÿ(>ÿ!;ÿ6ý1ÿ'8ï#,æ#+ã+-Ý--Ô+(Ò-)Ü41â62è64î66ò65ò12ï./î,,å/,Ü92Ñ:1Ò91ìSK»"Ä+#ßF>È.&Í.(Þ<7èE@â:7Ø/*Ú.*â51å<7ß>4Õ<.Ï5)Ë3&Ì5*Í;.Ë;0Å8.ìbXàZOÈC:¹6,º:/¸8-±3'´6*°0%°2&®2&¯4%°6'²:*´<.³=1°:0ºC;Ö\Wìppñsvöx|ûyƒõq|ÿ|„ýw€út}üs{ÿr~ÿr}ÿmxÿgsü`nôI\ÿ>\ÿ>[äAVÔek´•€’¡zƒm}™f~”c‡—j”Ÿwž¦ ¨ƒœ¨„’£Š£|€Ÿvzšqyšo|r vƒ¤u‚­wƒ³y‹¸‘¼„“¾†—¾‡œ¾Œ¢½§¼“¯½š¾Â§Ï̹ßÓÇãÒÊÜÇÄÔ¿¼Ìº¶Á²«¹ª¥ZM=ZM=ZM=ZM=ZM=ZM=ZM=ZM=XK;XK;XK;YL]P@[OC[NFYNJZPQ\SX_U^_Wfd\tibƒng‘qjxp¬€y¼‡€ÄŠÄ€Á~ºt«Œn¢—q¤¡u¨šjž™W{=Aª5+±5+Â<3Ó@8Ý>8è?:óA=õ=;õ;<ô;@ñ>Bî@IèAIâ@KÚAFÇ<9½=4¶<1±;/«:,®:+½A5ÐJAÚG@ÜA=Ô63Ð51Õ@9ÍC8»9+²5#½8'Â;(Ä=*Ä=*Ä;(Æ;(Ç:(Ê9(Ï9(Ï6&Ô2%Ú2%ã5*ê8.ï80ð91ç1&ç/%ê.%ï,&ö+'û+)þ,+ÿ-.ü*-ú%+ú$.ÿ'7ÿ$;ÿ7ÿ3ü0õ0ö.9õ3<å*1Û(,Ü.0Þ02Û+.ñ:>ô7=÷4:ö26ö/4ø03ù25ô87Û2-Ú;5×82äE?äE?Î/+Ñ2.Á"Ô51á?:èE@à=8Ø3-Ù2,Ý60Ý:1Ô:.Ï9*É5'Ç5(È9+Ê<0Ê<2Æ9/ícYáXNÉ@8º4+Â91Ã:0¿6,Â9/¿5+¾4*½4*»5)¸6)µ5(´6(°6)´;0»B9ÓYTèljïqtöx|þ|„øv€þ|„üyùv~þuÿsÿp}ÿkwüdqý_nöI]ÿ>\ÿ>\éCYÓeh®Žw‰˜oz•bu’\xŽ]cŠ•k˜p‹•p…”mp‡]l‰]h‰\g^k_q•ey›izŸk¬t„±vŠ·|»}¼“¼‚–½†›»‰›µ†¡³‹­¶—¾½¨ÏÆ·ØÇ¿ÖÁ¼Ï¼¸Æ·´º¬©²¤£\L<\L<\L<\L<\L<\L<\L<\Lù:Aö=Eï@GæAHÙ@EÏ@BÀ;6¸90±9+­9*©8(­9*»?3ÏF<ÙD>×96Ù74Ú;7ÜC=ÝOEÎH<µ3#¾9(Á:'Ä;)Æ=+É=,È<+É:)Ì9)Ï7)Ï2#Ó/#ß4*î=3ô?6ñ91é4+à4&ß5&â2%å/$ë,$î+%ñ+(ò+(ó+-ð(+ò&/ø(6þ%:ý7ü3ø3ô%7ò0;ó5Aò8Cð;Dðä,6ð2<ó/;ö.9ö-7õ.3õ.1ó/1í42Ü0,â=9Ú64ß;9ÿmjåCAÑ/-Î/,Ù:7ß@<àA;Û<6Õ7.Ö5-Ö5+Ò6*È6'Ã6%Â6'Ä8)Å;.Æ<1Æ<1Å;1ë`YáTMÉ<3¿0(Ë;3Ñ>6Î;3Ò=6Ø=8×<7Ô=6Ï<2É;1Ã9.¼6*¶6)¹;/¼@6ÏTMãgeíorøz~ÿˆû|ƒû|ƒûyûx€ÿwÿsÿn}ÿgvû`pü[mõG^ÿ\ìFZÎ`až~ev…Zi„Qh…OmƒRt…X{ˆ]}ˆ^x„\q‚X`zM_Pa…UeYn•`uœg} j~£mƒ¬r„²tˆ¶x‹¹y‹¹y¹z‘º~”º“±•¬€›©†©­’ºµ¢Ç¹®Ë¸²È¶´¸¬¬ª¡¢ —š[K;[K;[K;[K;[K;[K;[K;[K;ZJ:ZJ:ZJ:[K;[K;\L<\L<\L<]K=]K=]L<^M=^M;^O<^O<^O<^Q@^Q@]OB[OC\NE[NF\OI]OO^P_bTmdY{i^‰pgœ|t­…{·ˆ{³™…º¥…´¯€ª¸z¡ÆxŸÑuœÌcŒÈMlÜFRßA@ÕA=ÏE;ÌH;ÍG;ÓE9ÞA:î@Aõ0ÎD:Õ<7Õ31à;9åA?áD?èSLßUJ¿:+Á9)¾7$À7%Ä;)É=,Ê=,Ë9*Î8)Í4&Ò2&Ù2)å9/ñ>7õ>6ð5.ä/&à6)Þ6)à4*ã1'ç.)ê-)ì*(ì**ê),è',ë'1ò)9ö&<÷!;û=û%Aû6Hä(6ç.<ÿP\ÿ`lÿP\ò;åGDÛ=:Ú<9Õ:5Ò80Ñ7-Ð6*Í4&Æ3#¾5#¹6$»8&¿;,À9é=9æ?9á@8Ù?5Ð<2È:.Á9-»9,»=1ËNHàc_ìnoú|ÿ„ˆý~…øy€øy€üyÿx‚ÿt‚ÿn}ýetù^n÷VhóE\ý8Vÿ^N>\O?^NA]OB^PE^OJbNYbQdcTqdZ}le‘xr¢w¨ƒv¤”}§¬†«Â‰©Î‚žÚw”ál‰ÛXwÚD_óBTúDPïJPáIHÐE>ËE<ÐF<ÙD>èBBð@Cõ@GõBHíDGßCDÏA=Â?7¿@7µ=/®:+«:*ª9)®8*»;.Ì?6áFAâ=;îBBëAAÞ;6ãJBæXLÕK>È@2À8(¼3#Á8(È<-É:*Ë7)Ð8+Î0%×3)à8/é;4í:5í60ë0+å,'ã0,ã1-ç10ì31ó25ö37÷48÷6;ì-5ê,6í.=ñ0Có-Fö)Gý+Nÿ3Rô9Lå3?ð@Mÿ_lÿlzÿWfõCSõ>Pî3Dí3Aí3>é6<ã99Û83Î4*Ç/$Ë2*Ç.(Ð72òYTö\ZòXVÛA?âHFÜB@Ô<7Î70Í6-Ï8-Ï9+Ê7'Â5#¹8#³9$µ:(¸=-¹;,¶6)¼7.Æ=5ÛNGÙEAÎ50Ð1-á>9ç@:ã81ç51ë20î21ë52ç83á:2Ø:/Ð9.È:.¾6*º8+ÈIBÜ_Yënlû}€ÿ…‰ýƒõv}öw~üyÿx‚ÿsƒÿk}ýdvù^pôSeôF]ý8Vþ=ZïL]ÀTRz_BWhÑC?ÖEBãEFèBDîAEíCFçDEÚEAËB:¿?4»?3±;-©8(¨9(ª9)°8*¼:-Ê;3èIEé??ë=>å78Ú2/ÞA:îZPôh[ÚPCÉA3¾5%Â6'Ç9+È9+Ë7+Ò8,Ñ0&Ú6-æ;4é;4ê40è/,ê-+ë--ó49õ3;ø3=ü3=ÿ1>þ0=ý1=ù1>õ0Aò1Bô4Kõ5Nõ0Nö-Oÿ1Xÿ>_æ3HùO\ÿanÿ_nÿWfûP`ôDXé8JóAQê:GÝ2:Ò/2Ê2-Â8-½;+¼:*Ä:/À2(ÙJBúkcÝLGáPKÏ;9Ï;9àLJÔ@<Ê70Ê7-Î-±9)¯3'º:/ÊD;ÖGAØC=Ô72×2.ç;7ì:6è2.í2-ò,-ô,,ò./ï31è71â:1Ú<1Ò>2Â6)º4)ÅB:×XRçjhú|}ÿ†‰þ€„õv}÷xýz‚ÿx‚ÿqÿi{ûbtø]oòQc÷I`ÿ:Xý?[ðO_ºQNqX:Sf8]uEa|InSv†Y{ˆ]~‹`g‚—l€œl}Ÿm|¤o}¨p€©o‚ªnƒ©l…©lˆ«qˆ®qˆ°r†³r„³oƒµp…·r‰¸t‹µv‰¬tŽ¥wš¨„°´™ÈïØ̾ÚÑÌÂÂÌ«±Á›¡±ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8[L9[L9\M:\M:]L:^K<`J<^K<_L=^M;_N<^O<^O<^O:_P;`O;aP>aP>aP>aPÉ@8¾>3¸>1¯9+¨7'©:)­<*´<,Á=1Ï?7ß=:å99ã03â/2à42Û94æMEülaòh[ÙQCÆÍD>Á63É;7äUQÕF@É91È8-É:,È9(È9(Ä=)±?'¦<&¨;&¬=*«7(¬3(¼=4ÓLFÖGAÝE@Û96Ü30é73ì51ë0+ô1-ý,/ÿ+-ú./ô1/í4/æ81ß;1Ø>2É9.½3(À;2ÏNHáa^÷yzÿˆŠÿƒ‡ùzû|ƒÿ{†ÿx„ÿn~þew÷^põZlëL`õIaü9Wû=YîM]²JGhQ1Qd6\tDf~Nuˆ[Žc„h†’jˆ—n‰žsˆ¤t„¦t§r}¨p¨n©mƒ©l…©l…¨n‡«n…­o…¯o°l€²k‚¶n…·r‡³t‡­t§wœ¬…²¹šÈƯ×νÙÒÌ»¿Ê¤¬¿’š­[J8ZK8[J8ZK8[J8ZK8[J8ZK8[J8ZK8[J8[L9\K9\M:]L:]L:^K<^K<^K<^M=^M=^O<^O<\O<`Q>aR=aR?bQ?bQ?aP>aO;bL>hOKgNRbP\cWkjfuv”}|œx—‘z–«•Æ„’Ú}…ðuzþlmÿY[ýDLþ/Iÿ5Rÿ4½=0µ?1¬;+©8(­<,´?.»@1ÊA7ØC=Ù74á85Þ..â30æ:6Ó0'Ï5)ëUGÿwjë[PÑC7Ê<0Ë;0É7*Í6+Ô:0Ú70ß82å63ç32ê01í12ô36ý4<þ%6ÿ#9ÿ"9ÿ"9ÿ!8ÿ6ý5ø6ï2î9ð%Bï(Gî&Jñ'Mÿ3\ÿEhÿbuÿ`l÷WcñQ]òP]ïMZâ@MÔ2=Ú=FÌ7;»/.®/(¦5'¢;(›?&œ>%ª9'²8+ÒVJ»;2Ä?8¾41½2/ÎC@åWSÕHAÈ91Ä6*Å6(Ä5%Æ5$Ã:(±<(§:&¨7%­9*¬4&¯1%Â?5ÛRJÙIAáHBÞ;6Þ2.ê41í1/ï-+ü22þ,/ý+.ù+-ó++í-*æ1*ß4,Ö8,Ñ=1¿2(¼7.ÈIBÙ\Xówwÿ‰‹ÿ‡Šû€…þ†ÿ}ˆÿv„ÿj|þ_s÷XlöTiêD\õD^õ6Uñ:VàLZ¥HC^K-Mc5Uo?b}JtŒ\€–g‡˜lˆ›nŠ r‹¥vŒ¬z†«wªr~§m|¥i}¥g¥g‚¦i‚¥k‚¨mƒ«m‚¬l®h~°i³j„¶o‰¶s‰¯rŽ¬x™°„­»˜¿Å©ËʵËͶ½Åžªº‹—§]K7\K7]K7\K7]K7\K7]K7\K7^L8]L8^L8]L8^L8]L8^L8]L:]J<]K=^L>\L<\L<[N=]P?^SA`SB_R?`P@bQAcRBdQBdNAdLBjMIhKMdPYf[lnk†w{ž€…­‰ˆ²ƒ©¥‡©¾ˆ Ð‚’ây~ðsqújbÿa^ùJWñ>Që:Lî?NïCQê@Kæ9Ê=4Á;0¸:,§6&¯A0­<,¬6(¿A5ÌF=Ì=5Ð72Ú85Ü71Þ5.Þ6-Þ8*Ý<*×:'Ó6%Ù;0ðSLòZOÙE9Ç8*Í>.ÔB3Ò:-Ô3+ðGBá//î5:ó6=î,7ÿBMñ'3ú&2ÿ)2ÿ(2ù'ý"*ÿ'/þ'/ð&ð)ù+7ê .ì&7ñ-Aç#;ÿXrç-Dÿ]lÿ_iþZcùU\õPWëHMÝ?@Í84Ë>7ÄA7·?1¦7&™2!™6#š;'Ÿ<)§8-®7/ÂE?¿;7½31Ä64Å54ÔDCÛLHÚKEÑD;È:0Ä4)Ç5(Ë4)Å5*¼1¹=3Ö_Yésqÿû„†û‡Šÿ„Œÿxˆÿh}ÿ_wÿ[uÿUoøLføEcñ:Yô;[æ?YÛ]i‹@;VF-L^6YuBg†Mw–]}œcg€¡jƒ¦n‚¨o€§n¦m~¥l}¥i|¤h}£f£e£f¥l¦m«l¬k~­g®f±gƒ³i‡µm‹´r°vŽ®|™´‰§½™±Á¤²Á®¦²°˜žz…‹]K7]K7]K7]K7]K7]K7]K7]K7^L8^L8^L8^L8^L8^L8^L8^K:\K;^L>_M?^N>[N=[N=\Q?^RB_SC]QA]OB_OB`NDbPFcOHeNHiMJgNQeS_g_tnny~¨€‡»‡ŠÁž•Ê£‹»«£¹xÓyƒê|{ôvjöi`ø]aóOZìFRòHSøIVõEPï?Jë;Eä9?à:<Ú::Õ=8Î?7Ç>4À/Ç8(Ê8)Ó;.Þ;4öJFä01ð6;ö6Añ.<ÿ@Nï'4ó$,÷%(û),ý+,ü*+ø((ö((÷+,ï$'í%(ê%,ý;DÙ'ð4CüARØ&6ÿjuÿbjþZaüW]ôOSåBC×<8Ñ>6¾8,¿D5¹H6©>,™/)(’(ž-%°:6ÑTPÎHGÃ54Æ45Ñ==ëWUØGBÖG?ÐA9Ç9/Æ3)Ê6,Ð7/Î70Ç=3Â91Â5.Ã2-É4.Ñ83Ø?9ÞE=äJ@ÞA8Ú6-Ý0*ç0,ò21û03û03ô02ó12ô01ó/0ó0.î1-ç4-ß9-×=1¿3$¾aP@`P@]P?\O>[O?[RC[QE[QG\OG\OI_PMcQOfTTgUUgUUgV\h]nli†sv£|ƒº‚ŠËŠÔ˜‘× ŠÊª‚´¹}ŸÏ€“䄆îvósjûeg÷S\íGQðFOöHR÷EQòAKî=Eä7=à7:Ù99Ô<7Í@7ÅA4¾?0¶>-­>-ª<+«:,¸B6ÇH?À;2»0)Ê:2Í6/Ð6.Õ7,Ø8,Ù7(Ù8&Ü9&à:*Ý4-Û4.âA9éOCÞH:È5%È2#Ù@2â>5õHDè13ò5;ù7@ø4@ÿESø2?ð)0ë#&ì$'ù13õ-/ï''ì&%õ12ë)*ö8:è+1â)1ë3=ÿR^ï=Kÿ[gþ^fñV\îOTðMRêEIÝ:;Õ74Ô?9À6,Á?2¼B5³=1¬7-¥3)¡,#œ' š%©/*ÇECÂ::¼,,È35×ABô^]Ð?:ÒC;ÐA9Ë=3Ì9/Ô=4Ú@8Û@;Û@<Ø=;Ý>;ãA?ä>>à::ã?=ëIDàB9Ý<4Ù5,Ý2+ç1-ð31õ12ø02ô02ô02ô01ó/0ó0.î1-ç4-ß9-Ø>2À4%º8+µ;0Ð[Tízwÿ“’û‡Šúƒ‰ý~‰ÿr‚ÿdyÿ[tÿTqÿNmÿFgû=_ô=\îEbßTg¢AHp;3SH2Qa<]xEf‡Nr“Zu˜^tš_xžc{£g{£gy¢fy¢fy¡cx byŸby a| bz cz¢f{¤h{§h{¨e{©a{©`}«`®`‡²jŠµn‹²s‰¬t†¦w‚žuy“no†lSeYAPM2A>^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^L8`N:aP<`Q>]P?ZN>YOCXPEXOH[QO_UTbXYeX_iYcl\fk^glaildqok‚rtšy~µ†Ê…ŒÚŒŽáŽ‡×Ÿ‹Ó­ŠÄ³€©½yŽÌ{Þzò‚wÿsrÿcgùU\ôMTõGPôCMò>Gï-±=0¼F:ÌRGÇH?º5.º1)È91Í81Ó;0Ù=1Û;-Ù6'Ü6&à8+à5-Û2+à=4ìNBãK=Ò:,Ñ8*àB6ß7.ð>:é/0ð16÷4<ü8BÿNZÿLUý>Eò38â$&í/1ê,,ð22è**ë/.ò::Ñæ37Ý,2è9@ðEMÿXcóMWØ=CÚADáBFá>AÞ9=Ü89Ø88Ó97É83Â91½:2ÀA:ÍNHÖVSÐNNÃC@²72¶95ÏKIÙMLãQRïYZêRQñYVÉ51Î>6ÒB9Ð@7Ó?5ÙB9àC<â@;é?@ç8=ì9=ò?Cï:?è58ì>=öMJÞ93Û60Ú3+Þ3,å4.ì30ò21ô01ô02ö/2ö01õ/0õ/.ð0-é4-à8-Ù?3Â6'·5(³9.ËVOï|yÿ“’üˆ‹ý‰þz‡ýoücwÿXqÿOlÿFhÿ@cû9\ô?^éKdØZh…35g;0WO8WgCa{Kj‰Ps’Yt•\u˜^wby¡ez¢fw dv awŸavž`xŸ`xŸ`{Ÿaz cz¢fz£gz§fz§bz¨`z¨]|«]~­_†²g‹´nŒ³tŠ­s†¦u€qtŽii€dQcUDSL8G@^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M9]K5_M5`P9_P;\O>ZN@XOFXQKYPQ`W\g`hnfsshysg{sg}qh}ol}pq†rw—v}«z‚Á‡Ò„ŠàŠ‹å“ãŒÚ „¿žuŸ l‚¬nq¼vlÒviòsmÿllÿgiþ^`ûRWõFMï3Û=1Ú6*Ü4'â6*à3,â70ä=5åE9âF9ÞB3ÞA2â>2Û0&ê72ì0/ï.1ñ.4ú7?ÿPXÿ]dÿZ_ÿOSá.1ã03à,-÷EEè66Ü,,Û-.ë>@Ü25Ù37ÿbhà=BË*2Ê-4Á&*Õ;=á@EÛ6:Ù37ß9=Ü7;Í/0Ì43Í;;ÕGFÞRSì`cõilôekê^aÄ@>ÆE@å^[øhgÿopÿjjåKK×=;É40Ñ>7×D<ÖC;Õ>5Õ<4Ø:1Ü41î5;ñ-7ð,6ò.8ï,4ë,3ó9<þJKß3/Ü3.Ú3+Ü3,ã5.ê40ï4/ò21ô02ö/2÷/1ö.0õ/.ð0-ê3-â7-Ù?3Æ8*´2%²8-ÃNGï|yÿ’‘ÿˆŒÿ‰ÿw…úl|øatûTnýHgÿ>bÿ:_ú6\óAaàNeÂWap/+_?0[W>^lIe}Mk‰St’\u–_v™_xžcy¡cx buŸ`uŸ`u_vž_wž_xŸ`{Ÿaz¡bz¢d{¥e|¦d|§`y§^y¨Z{ª\}¬^€¬a…¯g‡®m‡ªp…¥sƒ r{•nrŠjexe[k^RbU_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N:^L4_N4`N8^O:[N>YOEZSMZTT_ZahbprmzuŒ{u‘{q“zp“vp’qt“rxšt}¨w¶zƒÄ~†Ï„‰Ú‹ŒÞ–Ü™ŠÍ›…¶¢ƒ£ª„‘«~yŸl[šQ>¼MBÔQIâWRëWUñSRñKMí>Cå4:é9<æ9;à;9Ø=8Ó@8ÊB6ÀA0º?/³9,ºA6«5+£.$¾I?Ùg\ÙdZËUI¸<2¸6)À3)Î:0Ù;0Ú6,Þ3)ä6-ß1*ä71ã;2Ý9/Þ>0ãF5äB3ß9+ß1(é4-ð31ï-.í*.ô17ÿEJÿV[ÿ]bÿ\aâ9<ã9<Õ+,ôJKâ89×//Û57Ì()Ì'+øXZÝ>BÕ9=Ñ6:º#Ä(+Ü<>æAEÝ49Ù,2Þ17Ù05Í(.Ò37äKNöaeûhnùcl÷`iú`løbkÖLLÕNJê\ZêVTçMMãHFÏ42Î3/ÙA<àKDäOHßJCÙ@8×:3×6.Ü.-õ2:û-:ø*7õ'4õ)4ø0:ÿ>CÿJJà1.Þ3,Ü3,Ý5,á4-ç4/í4/ð3/ô02÷/2ù.1ø-0ö..ñ/-ë2-â7-Ù=1É;-³1$±7,ºC=ìyvÿÿˆÿ|ˆÿqöhxö_rùRlûDcÿ9^ÿ6]ú6\ðFcÑN`¢IMe5+VD0[Y@^lIe|NkˆRt‘[w•_x™`{ždz cvž`s›]rœ\s›\tœ]v^wž_{Ÿaz¡by¡bz¤b|§b{¦_x¦[x§Yz©Y{ªZ~ª_ƒ­e…¬k‡©m‰§s‰¥u„s|”ru‰pnlfwe_P=_P=_P=_P=_P=_P=_P=_P=^O<^O<^O<^O<^O<^O<^O<_N:aP6aP6aO9^O<[OA[RK\VV_Zakgvso†}z—‚~¡|¥}w£{u¥xv§sy©s}°x¸{„¿~†Ä„‰ÉŽÎ”“Íš“Ç •½«›µ¼¦²É­©Å¦”ªˆmœfJœE2¯A4¶@4ÂB9ÖHDèNNîJKì?Cë=?é;=ä<;ß=:Ù@8Ð@5È>1Á=0½:0¾?6¯4,§1'»I?ÑcVÖh[ÕeWÃOBº>2º4)Ç7,Ö90Ù5,ß2+ç60â0,ã4/â7/Þ7.à>1åC4ä>0Þ4%æ4*é0+ð3/ð..ï-.ò14ó78öBEöMRüY^éFKöQWØ37ëFJÝ8<æAEÚ7:Î.0Ñ05äHKÒ7;Ð7:¹#%Õ;=Û8;å;>ëÿ0=ú*7ü.:ÿ;EÿCHûABã1/ß4-Ý4-Ý5,â4-æ3,í4/ñ40ô02÷/2ù.1ø-0ö..ñ/-ë2-ã7-Ø:/Í>0µ1%±7,²;5ésqÿŠŠÿ‡ÿv†þi}óató[p÷PjúCbÿ7`ÿ7aù;_ìLf¿O[~86]=0NF1VX@ZeEcxMj…RrŽ[v”^yša{ždxžas›]p˜Yp™WqšXqšXt›\uœ]y_xŸ`x¡_y¢^z¥^y¤\x¤Yx¤Wy¥V{§X©_‚¬d„«h†¨l‡¥o†¢q€šmx‘jq…ij~cbv]_P=_P=_P=_P=_P=_P=_P=_P=^O<^O<^O<^O<^O<^O<^O<_N:cQ9cQ9aP<]P@ZPG\TR_Zaa_mtrŠyx˜€¨ƒ°~~°yy¯yu°wwµw|¾x€Á}…Ä‚ˆÄ…ŠÁ¿—–¾ ¼¬§»¶¬µ¾³±È¸«Ð¾¦ÖÁ¢Ñ»–Ьˆ¯oT®\G¤G5¨>0ÂG?àWQïWVñNOé@Cê=?æ<=â=;ß=:×=5Ñ:1É90Á80Á<5¹:3¸=5ÁOEÇXMÇ]OÑeXÓcUÂL>¼:-Å8.Ò91×4-ß2,ç60æ40á2-à5.ã<3çC7æC4â:-ß3%ê5,æ.&ð0-ï/,ð31ñ54ç-.â24çBF÷X]öW\ÿouåDJëHMà@Æ02Ö:=òHKî9>ð7?ø=Fò7Bè-8ô>Jÿ]gÿmwÿjrÿcn÷]gú^kÿaoÿ]nùYeò\]ãPIâJGÕ74Ò/0Ù54Ò0.Ø95ßD?ãJDâIAÙ@8Ó6/Ö4/Ü71è66ê'/ü0<þ2=÷+6ù0:ÿ>Eý?Aì44â3.à5.Þ6-ß4,á3*è3,ï4/ô41ö01÷/2ù.1ø-0ø..ò/-ë2-ã7-×9.Ñ?2¶0%²6,°61èpoÿ‡ˆÿ†Žÿp‚ücxñ\pôXn÷OiûBbÿ9aÿ`P@`P@_O?_O?_O?aQAbRB_O?]M=]M=aQAcSCbRB`Q>dS?aP>]P@^QI[QPZSZeapsq‰yxšz|¥~€±€¹}ºxz·rs´lo¶twÈv{̀ƒÊ‹Æ–—䤾²°»¼¹´ËƳÓÌ°ÙϬÛϧÜÏ£ÝУ٘٘Ѩˆ¸€g ^FËzgÖue½H?×QN÷ccéKLå?Aâ89ä::â:9Ü75Ù61Ö;6Ë81À5.ÇB;»<3¿I?ÆXK¹OAÎdVÑcTÌXIÅG9Ä:/Í6-Ø7/á6/ã4/ß0-ß2,à70ä=4à<0Ý7)ß5(å7,ä/$ê/&ì/)î1-î20ë40è51â64×79æJNõY]íNS×8=×6<ùX`ÿ~„ÿ~†ÿouÿgoÿipÿflõ\añX[ûZ_ÿUZÿDKü8Bû7Aö2>î+9ì0>ñ=HÿS_ÿ`iÿgrÿepþbmÿcnÿ`oý]gíSSßF@Ö85Ö41×11×/.Ø31Û94áD=ÜB:Ù?7Ö<4×90Û81à93æ66ð7<ó4;ó4;ö4<õ6;ò59ë33ã1/Þ3,Þ5.ß7.à5+ä3+é2,ï2,õ20÷12ø03ú/2ù.1ù//ó0.ì3.å7.à?5Ì8,¿6,¯/&¸;7ÒXWÿ˜šþ{ƒÿm€ÿe|ø\rðPhôGeüCeÿ;dù9`õNlÓRd‰=?P, C;&CG.KM5Y_CZjEcxMqˆZx’bx–`t•\r–Yq˜Yl•Sm–Rn—So˜Tr™Xt›Zuœ]uœ[t›XtWv Xw¡Wv¢Wv¢Uu¡Tt S{¥[{£]zž^u—[m‹Ub~MXrCSj>AW0?U/`P@`P@`P@_O?`P@aQAbRB`P@_O?`P@bRBcSCbRB`P@fVG_QF\OG^TSaZad`omkƒvw–wy¢{}®}¸x|¹quµkp´lo¶nq¾uvÐ|~Չ‰Ó˜˜Î¨§Ç¸¶ÁÉźÓαÛתâÛ¥çÞ¥æÝ¢äÛ¤âØ£ÛÑ ÔǛӼš»œ€©}dŋwÊ}m´VJÒa[örpìZ[çKLã?@ç=>ë>@ç;;â66Û64Ö=8É83Ê?8¹6.¸>3½K@¶H;È]MÝo`Ô`QÆH:½5)Ä0&Ô6-Ü5-Û0)â51å95ä=7à<3Ü8.Û5)ß4*ã5*ì7.í5+í2+ë0+ç0,ã2,á4.Ý52Ö87Ø>@äJLóW[ú^bü\dþ]eÿaiôS[ïNVñQYÿ_gÿjqÿflõZ`óNTí4:ñ,5ô*6÷-9ñ'5å!-æ'6í7CþPZÿZdÿblÿdmÿenÿcmý[hõQZåEEÞ<7Û64Þ63ß55Ü30Ú2/Û62à>9Û>7Ø;4×:3Û81ß82å95ç:6é9;ê7:ë7:î79î79ì65å31ß2,Ü3,Ý6-ß7,â6,å2+ê1,ò1,õ20÷12÷03ú/2ù.1÷//ó0.ì3.å7.ß<3Ô=2Â8.¶1*·74ØZ[ÿ“ûs}ÿfzÿ^vùWo÷OiùFfû?bü^QA^QA^QA^QA_RB`SCaTD`SC_RB`SCaTDaTD`SC^PCbUM\QM[QRcYbkdtqm„vu•y{¤y{¬y~¶x|»nsµei°`g¯jn¸ruÆ}}ׇ„Ý—”Û©§Ø»¹ÏËÊÈÜØ¿åá´éäªíè¦ðé¥íå¤çá§âÛ§×Ï¡Ëܸ¯©››ƒk¨ƒp§o`œRGº]UÝmi÷uuï__äJLå@DëADì>@è8:â66ß=:Ô;6ÔA:Â70·7,·>3®=/¶F8Ûj\ßi[Ù[MÊB6Å2(Ñ4+Ù6-Ù2,Þ52éA>ìGCà=6Õ2)Õ1'Ú2'Þ0%æ4*è1)ç.)æ/)ã2,â7/á=4àB9Æ-(Ê43ÜDCðVXú^b÷ZaóS[ñQ[èFQêHSïOYü\fÿmvÿntôY_ã>Dé.5ô-4û2<ü2>õ+9í'4ö6EÿKW÷ISõPWøW_þ^fÿckÿ`i÷RYéBIÞ97Þ71ã75é<8ë;;æ95á51Ý60Ý:3Ù;2×90×90Ü71á83ç:6é<8ã99ã99å97ç98è88æ74á40Û2+Ú6-Û7-Þ8,â6,ç2)ë0)ó0,÷10õ12õ13ø02÷/1÷//ò0.î3.ç6.Ý90ÜD9Ç80»4.µ/.ä_bÿƒˆølwþbxþWsúPmþLlÿCfö:]ó;_ìIfÔSgDJl;4O>,=<':?(ED/FH0Q\U'B\/E_2Ic6WJ:ZM=\O?^QA]P@^QA_RBaTD`SC`SC`SCaTDaTD`SC_RB\PDZOMZQVbXcjcsqm†vu•xz£z|­w|´sy·mr´bi¯]d¬ag±lr¾x{ʉ‰ß•‘夡䶵áÇÄÙÕÑÎáÝÄçä¹ëæ¯îê­îè¬éâ«ãÛªÚÓ©Ë¡»¶™¥¥›™„“ˆv˜q™rc›bW³i`Ïrmû‹‰õutê[]æLNèCGí@Dìô@?ï=;æ95à72Ý82Ú91Ù80Ù80Ü71ã73è96é:7â:7à;9ã:7æ:8ç:6å84à5.Ú3+Ú6,Û7-Þ8,â6,ç2)ë0)ò/+ö0/ô22ô23÷12ö01ö0/ò0.î3.ç6.Ü8/àF<É91¾3.¶,,îfjÿy€øgtÿbyýTqþKkÿGjÿ>cò6Yë=^ãQhÄXeˆBBgC7[N;GF1AC-JH3EE-LU6Sc>btLlƒUp‹XnRkPiŽKgIhJh‘Kj“Mk”Pm–To–Wp—Vt›Xs›Uq™So—Pj“MgJeŽHdG`‡D]AWy=Rq8Mi6Lf6Ne7Of8Lf7Oi9Sm>UH8WJ:[N>\O?]P@]P@_RBaTD_RB`SCaTDaTD`SC_RB_RB^QIVMR_Xhnf{tp‰xt—xw¡xz«y{´sy·jr³`g­[c«_g°jr»v|ƀ„Γ•àžžä­®ç»½æËÉßÔÓØÝÛÎáßÆåá¾æâ¼äß¹à׶ÚеÎƱ¾µ¦­§›˜šŒŒŽ€‰…yŠ|q‘vk›si¨meºoi扄î~ósrñedñWYðMNîDEì@@ã:7à;7äB=ÞE?Ì<3Æ=3ÄB5¯1#®0"ÇI;ÜXKÖN@Ì=/Î8*Ð6*Ñ3*Ö42õUUÿkhú]XãD>Ü;3ß;2ã80â4-ã2,â1+Ý0)Ô0'Í/$Æ/$Â0#Å9,À4'Á3)Ë:5×CAÛEGÛBGÚ@HàDOëOZòVaòVaú^iÿgoóYaáBGê:<í57í38ï28ñ3=÷9CÿHSÿV_ä6?Ý4;ß6;ëADùJOüIMô;Aé13è51ë95ï<8ò<9ó;9ð:7é73â70ß;2Ü;1Û:0Ü90ß82ä73è64é75æ:8ä;8æ:8è:9è;7æ95á6/Ü3,Û7-Ü8.ß9-á7*å3)é1)ñ0)ô1-ó32ñ33ô22ô01ô1/ò0.î3.ç6.Þ7/àC:Ê70À1-À13÷jpÿqzúftû]túPmÿCfÿ=dÿ9cõ8^æEdÙZm«V[wE>dJ=aYFTO;KI4PI6GE.GP3L\8ZlFf|Nm…SmŠRlŒMhJfŽHgHg‘Ii’Lj“Ol•Sn•Vo–Ut™Vs˜Un•Rj’LfKcŒHaŠF_ˆFZBX|?St;Pn8Ok:Rl=Wn@ZqCUo?Vq>WqARE5UH8XK;ZM=[N>\O?^QA`SC`SCaTDaTDaTD`SC`SCbUEaVP^Vcje|yu}yšzy¡xy©vy°sw´jr³cj°[c«]e®hp¹v~ǁ‡ÑˆŒÓ™Ý£¥à¯³ã»¿åÆÇãÏÎÞÔÓØ×ÖÑÙ×ËÙÖÇ×ÑÅÒÉÀÌþŹ¹´¨¬£šŠ‹†x{tyvquleleogŽa[`[ÀsmØyuð{ü|yÿrpýccöSTðHGïC?ê>:á<6àA;Ñ:1ÓC:ÝTJÂ>2¸6)½9,Â=.È?/ÏB1×C5Ö@1Ñ7-Ð2/êLMú_]òWSßD?Ù:4Û81à70æ93ç92ç92â:1Ú9/Ñ9,Ê8+Ä8)°(¸3"È@2ÓI>ÒD@Ë;:Ì7;Ï:@Ñ7AâHRíV_ðYbõ^g÷`iêU[ÜAEå@>ì?;ñACúGJÿLTÿQYÿT]ÿV^á4:Ú/5Ü/3ç7:ô=Aø;?÷48ó12í42ï95ð86í42ë20ê20ç40á4.ã<4à=4ß<3Þ;2á83ä73è43è43è88ç98è88ë99ë97é75â5/Þ3,Û7-Ü8,Ý:+ß7*ã2(ç0(ï0(ò1,ñ42ð43ó32ó11ó1/ñ1.ì3.ç6.à91Ù<3Ì71Á0-Ñ@CÿnuýkuùbqðRiõHfÿ;aÿ4^ÿ6bû>däNiÊ\i‹GFjF:]L<]VCXQ>RJ7OG4ID.DJ.GU2Sc>^sHgMj‡OjŠKgŒGgŒFfŽGfHgJi’Nk”Rm”Um”Uq•Uo”Qj‘NgŽKcŒH`‰E_ˆF^†G\‚E[~DWxAVr?Uo@YpB]rG^uG[sCYtAXs@NB2QE5UI9WK;XL\P@^RBaUEbVFbVFaUE_SCaUEfZJh]YngwupŽ|x™{y wx¦vw­pu¯jo¯ah¬^f®_g°em¶pxÀ}…͉Ø—Ø™ Ö¡¨Öª±Û´¹ßº¿ßÀÁÝÃÃÛÇÆØÆÃÔÅÁÐÁ»É¼³Ä»°Áµ¨¼¦˜¯–‹œˆ…Œqqqtpopfewhe†nj„_Y•d_›ZT¹f`Ùsnðzvÿ{wÿwsÿhfüZWþRNõHBæ=6çD=Ø;4ÛG=ê\RÅ;0Ä<0½7+¾6(Ç>.ÑD3ÔB3ÔA1×A3Ò86Ø>>ÝCCÜB@Ö=7Õ81Ø7/Þ7/å:3æ93å:3â;3Û>5ÕA5ÑE8ÌG6®-¼;%ÍJ8ÑL=Æ=5»0+À00Ê9>×AJáKTëU`ðZeð]eìYaßLRÔ>@Ï4/Ø7/à;9ê@@òCHõDJñBIî?Fâ5;ß26ã36ï8<õ79ø14û/2ü14ï20ð95ð74ì0.è,*ç0,æ3.à3,ä=5à=4à=4à<3ã:5æ95ê65ì65ì57ì57í57î68î66ë54ä2.Þ1+Þ7.Ý9-Ý:+ß7*á4&æ1&í1(ñ1,ð42î53ñ42ò21ó1/ñ1.ì3.ç6.â;3Ò4+Ò:5Æ20çUXÿpxùcnòZiçI`óEfÿ8bÿ/]ÿ5bÿBhÜLe±PYj5/^G7XK:UN;[P>VI8M@0JC0@F,AO.K[6Xj@bxGfJhˆIf‹FeŠDc‹BcEeŽHgLh‘Oi‘Rk’Sn’RlPhNd‹JaŠH_ˆF_‡H_‡H_…H_‚H]~G]yF]wH`wKcxOczN]uC[vAZu@JC3MF6QH9TK.ÑE6Ë>-Á2"Ê7'ÛE7ÞE?Ó97Ì3.Í50Ô;5×=5Ý<4á=4ä;4ä92Þ5.×4+Ï5)Ê8+Å<,Â?-ÔS>ÈG2½<)¾:-Ã=2Ä;5Â74Â43ÜKNÞMRáPUåTYèY]åVXÜMOÓD@É5+Ñ7+Ø7/Ý52â24å26æ18æ.6ì4>ì3;ó5?û9Bý4>ú+5ÿ(3ÿ/9ø-3ù57ù59ð./ë*+é0.è51â5/ã<4à=4à=4á=4ä;6ç:6ë76î66ì46ë35ì25í34í55ê41ã1-Û0(Þ8,Ý:+Ý:+Þ8(à4&ã3$é3&ì4*î50î52ð42ð3/ò2/ï2,ì4,ç6.ä=4Í/&×>9Ì35ùbgÿoy÷[iðNcêC]ùEhÿ:eÿ0]ÿ6aöGhÉJ]“CFR,#VI8SL:OH6[O?UI9F?-HF1>B'@J(IU1Sd:_rEe}Ig„JeˆHcˆCa‰BbŠCcEeŽHfMhPiQlPkMfJcŠIaˆG`‡F`‡H`†I^G^F_}G`|Ia{Kd{Mf|Nf~N]xC]z@^{CDB6FD8JF;PG>RH>WI>]M>_O?`Q>aR?`SB_VGbYRgb_ojnso~wq“zt |y¨yw©pp¦gg£`a¢\_¤`b­fhµopÀyz̄‚֍‹ß–’眙栞ݡ¡×££Ù¤¤Ú¦£Ø¥¢×¥¡Ô¤ Ó¥žÑ£Í¢šÉ¢™ÈŸ–ٍ»Ž‚°ƒ|žrn}igld^`fZZkYUrWP}WNŒWO•RI¨ZPµXPÁZSØkdìyrù‚|ÿ‹†ùuqÿusí_]ßPLÙEAïZTÌ71Å2*Ä6*Ã7(À7'Ã7&Æ9(Ê;+Ð<.Õ?1Ò8.Ö<2×?4Ó;0Í5(Í3'Ø:/â@5à90á90Þ7.×7+Ï7)É:*Æ?,ÄA/Â=.Æ@4ËE:ÍG<ÌC;Å<4»2,¶+&Ç<7ÐEBÙOLàVSãYVáXRØOIÐC:Ì;*Ó:(Ü8,â5.è./ì*2ð(3ô'6ú->ú+?û*?ý)?ÿ(?ÿ&?ÿ$<ÿ$<ÿ$8ÿ'9ÿ+<þ,9ó+5í.5è45ç;9Ý84Ý:3Þ;4à;5ã:5æ95é73ë54ë35ì46ë54é54ç53â5/Ý5,Û5)Ü8,Û9*Ü9(Þ9&ß8&â7%ã6%æ4&ì5-í4/ð50ñ4.ñ5,í5+ê5*å7,à90Ø7/Õ:6Û?BÿmwÿbsûSjõIcÿKjö6[ÿ6_ÿcçNj¯IV^$"D, ?:'HE4PMC/?G/BH&EK%KS.S]8[kDavKd~NdƒJb†F`ˆBa‰@c‹BeFhJlPm‘Ql‘LiŽHgŒGf‹HfŠJe‰Ic…HaƒGdƒJdIbGc~GdJdHe~Ga}C[{<\=_‚B=?4?A6FC[K>]M=`O;`Q<^SA^VIc[Xhcinlyso†tp•vpžtp¢pm¢gfŸaaŸ]^¡\\¤ed°kjºtrÅ}{φ‚ٍ‰à”Žæ˜“å›–Ùœ˜Õ™Öžš×ž˜Ö—Õœ–Ô›•Ñž–Ñœ”Íœ“Ê›’ÇšÄ“‰»ˆ®‚xtk|mdif]^f[YiZSoWM{UJŠVKšVK°\RºYRÁXRÓfaàqjãvoí~wý‡…ÿ‡…÷usîgdãUSëZUÇ2,Â/%Å7)Ã7&À7%Á8&Ä8'È;*Ï;-Ó=/Õ9,Õ9,Ó:,Ò:,Ñ9+Ñ9+Ô8+Ø8,ß;1à90Ü8.Ö8,Ï9*È9(Á:&¾9&¾6*Á80Æ=5É@8ÊA9È?7Å<4Â91¿4-Ç>6ÑH@ØOGÚQI×NFÌC;Ã7*Ê7%Ó8$Ý7)å4,í//ô+3ù)7ý(:ÿ+@ÿ*Aÿ)Aÿ&Aÿ#@ÿ!<ÿ=ÿ:ÿ:ÿ 9ÿ%;ÿ);÷-9ð19ê7:å;;Ü94Ü:5Þ;4à;5ã:5æ95é73ë52ë35ì46ë54è64ä71ß6/Ü5,Ù5)Û9*Û9*Ü9(Ü9&Þ9&ß8%á8%ã6%ç5+ê3+ë4,ë5*ë5*ê6(ä7)á7*ß;1Õ4,Ó54óTYÿesÿ[põGbÿIhÿAdÿ;`ý3[ù;aòMmÍLb‰8?S*$A5'69(;<,B@1DA0@?-=B.>G,=CKP'\b_„?b‡B69.:<1??7DA:KB;OE/Ô>/Î6(Ë/"Ú:.Ú8-Ù7,Ö8,Ð:+É:)Â9&¾7$½5)À6,Â8.Ä:0Ç=3Ê@6ËA7ÌB8Ç:1Ê@6ÏE;ÐF<ÒH>ÑG=Ê@6Å7+Ì6%Ö6&ß7,ç4/ñ03ö-5û+9ÿ*<ü';ü'=û%=ù#;û!:ú7ü7þ6ÿ8ÿ6ÿ$8ý*;÷2<ñ6=ë8;ä::Ü94Ü:5Þ;4à;5å95ç85é73ë52í36î47í55ê65å61á6/Ü5,Ø4(Ú8)Ù9)Ú9'Û8%Ý8%Þ7$à7$á6%á5'â4)ã5*ã6(ã6(á7(Þ6)Û7+Ý<2Ð1+Ø88ÿkrÿ]nþPiñ<[ÿHlÿ7]ÿ>eù5[î>bæVqª?Qa#(L/);7+07'37&9<)@=*A<(@>)BB&?FXa4s~T€Œdw‡`hSa}La€G`ƒC`…?a‰@cŒ@hŽEjJkMl‘Nn“Mk‘HhHgŒGh‹Kh‹KfˆLd†Je„KdƒJc€FdGf‚Hf‚GeFb€Bc†DeŠEhH25*58-;<4A>7G@:KB;RE.Ñ>.Ë8(Ç/!Ò6)Ó5)Ò4(Ò6)Ñ9+Í<+È=*Ä;)Ä:-Ä:/Æ90Æ9/Ç:1È;1É<3Ë=3ÓD<ÓE;ÐA9Ë=3Ë<4ÏA7Ï@8Î;1Î5'Ù5)â5.ë31ò/5÷+6ù)7ü):ù&9÷&;÷&;ø'<û&<ý%:ÿ$:ÿ#:ÿ"7þ#7ú%7ù,;÷5>ò9?è8:à87Ü94Ü:5Þ;4à;5å95ç85é73ë54î47î47î66ê65æ72á6/Ü5,×5*Ø8*Ø8(Ø8(Ù8&Ú7&Ü7$Ý6$Ý6$Û5%Ü6(Ý7'Ü9(Ü9(Û:(Ù9)×:+×:1Ð3.ëHKÿoyÿVjøD_ø<_ÿAgÿ3\ÿ8bø>cèMlÅOe€0=J C1-11'.6'4=,=B.B@+B<$E>$HE$U\0p~MŸr—¨|ƒ˜mj„W_{J]~E_ƒCa†@bŠAfCkJl‘Lm’Om’Oo”Nl’IiŽIhHiŒLiŒLhŠNg‰Mf…LdƒJdGe‚HgƒHh„If‚Gd‚DgŠHiŽIl‘L-3'36+891<;6B=9G@:MD=QG=SI=SK>UNDZUQa^eigumklkŠjhb`XVˆPP†QQXYš`cªfj´orÁuxÉ|Ђ…Ö†‡Ù‡ˆØŠ‰Ù‹ŠÖ‹ŒÏ‹ŠÌŠ‰Í‰‡Ð‰…ш„ÑŠƒÑ‰‚ÐŒ„Ï‹„ȍ…Á†º†°‡¥~w–m…„Yj€SZnVTc\RZaOZ_HeZDxUB’LD¸TRÐSWÛRYå^dèejãklæuqäunâoh÷~vÿ‚{ÿ‡~ôl`É?2Á8(À;(¿='¿='À<'Â;'Å:'Ç8(Í7)Ø:/Ù8.Ò8,Ï9+Ì:+É:*È9)É7(Ï9+Ñ7+Ò8,Ñ7+Ï7*Ì8*Ë<,Ë>-Ê<0É=0Ê<2É;/È:0Æ8,Å7-Å5*Ð@7Ð@5Í=4É9.Ë80Î;1Í:2Ì5,Ð/%Ù0)ä20ì25ô/8ù-9û+;ü,<ü-?û.?ü/@ü/@þ/Aÿ/?ÿ-?ÿ.@ÿ)9ü)8÷+7õ0:ñ6=í8=ã77Ü43Ü94Ü:5Þ;6â:7å95ç85ê65ì44ñ48ñ48ï56í76æ72á6/Ú6,×5*Ø8*Ö9(Ö9(Ø9&Ø9&Ù8&Ú7&Ù8&Õ8%Õ:&Ö;'Õ=(Ô=(Ô=*Ô=,Ô<.Ñ7/Ú;8ÿ^eÿaqÿPi÷<[ÿAiÿ4_ÿ4`û1YôKlÛYq•>NZ%-C),:2/-0)08+7@/:B+<<"A<UH(`[5{…S£lª¾‹¨¾Ž¥wo‹[aK^F`„DcˆBeDj“Go”Np•Po“So“So”Nl’IiŽIgŒGiŒLiŒLi‹OhŠNf…Je„IdƒHe„Ig…Ih†Hg…Ge…DiŽIi‘Kl”N+1%.4*470893>:7B=:HA;KD1Î8*È4&Ê8)Ë<,É:,È:,É;/É;-Ê:/È9+È5+Ç5(Ê6,Ï;/Ò>4Ó?3Ö?6Õ>3Î7.É,#Ò+%Ü-*ç02ð39ö1;ú0<ý0?ý0?ù0@÷1@÷1@ö0=÷/<÷-9ú,9ú*7ý/<ù/;õ0:ð3:í6;æ69ß55Ù42Ü94Ý:5ß:6â:7å95ç85ê65ì44ò59ò59ð67í76æ74ß6/Ú6-Ö6*Õ7+Ô8)Ô8)Ô9'Õ8'Õ8%×7'Ô9%Ð9$Î<%Ï=&Ï?'Î@(Î@*Ð?.Ò;0Ñ61ëHIÿfrÿOdÿHfû7[ÿAmý/]ÿ7aò4XãPj¼Ufm19E(*E697325406906=-3;#38CCja:…TŸ®w©Á‡µÎ—¯Ç“’®}v”be†Q`‚F`…BcˆBgFm–Jr˜Or—Rq•Up”To”Nl‘KhHf‹Fh‹KiŒLi‹Ni‹Og†Kf…Je„If…IhˆIi‰Hi‡Gf†CjJk“Mn–P(0#+1'/4-350764<85@=8C>8IEù4>ù1>ú0@ø/?ò.<ï/<í/9í07ï-5ï,2ò+2ñ*1õ2:õ3;ò5;ì59å57á55Þ65Ü75Ü86Ý97ß:6ã:7æ87é77ê67ì46ô5:ô5:ñ7:î87æ74à70Ú6-Ô6*Ó7*Ñ8*Ð8*Ð9(Ð9(Ð9&Ñ8(Ð9&Ë9"È:"È>$Ç?%È@(È@*Ì=-Ï;1×96üU\ÿ^qÿGcÿ?aÿ:aÿ7gþ3bû8`íFdÅNa‰@IS12A64@:<:46?56<7179+4="9CSZ.‚‚P¢§q±ÅŠ¯ËŽ°Ì’¦Ã’®}{™egˆQ_E^ƒ@c‰@iDo•Js™Ps˜Sq•Uo“Sn“NkJgŒGeŠEgŠJh‹Ki‹Ni‹NfˆKd†Id†IeˆHgŠJh‹Ii‰Hf‰Ej’Ll–No™Q&.!(0%-2+13.331764:95<;6GD=DD*¾;'¼7$À4#ÑB2ãOAäN@ØB4Ë7)Ë7)Ð>/Ê;+É:*Ç8(Æ7'È6'Ê6(Î8*Ð8+Ó;.Õ;/Õ9-Ò6*Õ7,Ú<1Ý<2Ü71è88ñ8=÷:Aû9Bú4Aõ/<ò,;ï,:í/;ê19ê38ë48í57ñ56ô36ó57ð37ï6;í9<é69â45Ý33ß76à;9Ý86Þ97á96ã:7æ87é77ê67ì46ô5:ô5:ñ7:ì89æ95ß82Ø7/Ó7+Ð8+Í:*Í9+Ì;*Í:*Í:(Í:*Ì;(Å9"Â:"Ã=$Â>%Ã?(Æ?+Ê<.Ï81ß<89?48E26C41=:)>E&FU*bs?›a­½±ËŒ«É‹¦Ã‹º„Ž¬z{™ef‡PZ|@^?a‡>hŽCo•Jr˜Or—Rp”Tn’Rn“NjIf‹Fd‰Df‰Ih‹Ki‹Ni‹NfˆKe‡Jd‡GeˆFgŠHh‹Gh‹GeŠDk“Lm—OpšR(0!'/"(-&).(.0-3317839:4==5?@8DE@JLKORYVXeZ\s]^}YX‚[Y‹^]–ee£nn¶wxȁ؄…⌌ðŠŠì†‡ä‚‚Ü€€Ö‚€Óƒ‚΀ƒÈ„ǃƒË„„ΆƒÐˆƒÓ‹„ÒŒ„ÏŠ€ÅŠ€¼‰€¯‡}Ÿ€xwozkegf]Xm[Qm[Mi\Lf^Kd_IeaHhaGo_FoP;…UA¥]O¿aYÑYXÝQTîS[ø\`ùheæYPÔD<Î70Ñ7/×:1Ö=/Ô;+Ï9(Í:&Ï9(Ñ:)Ô8)Ø8*Ü5,Ü5,Ð/%Í3)Ì8,Ê>/Å@/Á@-¾=*¼9'Â9)¾0"éWJßK?Ã/#Ñ=1Î2Ü<0Ù7,Ú8-â>4ìC<õBEò9?ð2<ö4?ö2@ñ-;í-:í2=ì7>æ5;ä68å78ë99ð:9ñ78ï77ò;=î<<ê::æ87á85ß74Ü75Ü75Þ97á98ã99æ::é9;ì9<í9<ï8<ô7;ó6:ð8:í9:ç;9à;5×90Ï7,Ê8+È9)Ç9+Æ:)Ç:)Ç:(È;*Ç<)Á9#Ä='¾:#¶4¼9%ÉD3Ï?6Ê1,ÿ^eÿVgÿIbÿ<\ø1X÷0Yû6cõBiçYo¬FQo33N3,B?6>C<@78@-1L/3K2.A9&DJ(Zn=~š_ž¸w¨Å‚¬ÊŒŸ¾‚˜¶€”²~‚ nf„RXvBY{?]€>c‡AiDn”Im•Ll”Nk’Ol‘NiŽIfŠDc†Bc†Bf‰Ih‹KfŠLdˆJg‹MhŒNg‹Kf‹HeŠEf‹EjIk“Jq›QržSt U*0")/#).').(-/,130561782;<4>?7AD=HJGOPTSUaXYkZ\u\Z^]‰db”kj¤utº~·‡ß‹ŒéïŒŒð‰‰ë…„ ؀~Ҁς‚Ì…†É†‡È‡ˆË‰ˆÎ‹ˆÏŒ†Î†ÌŽ…ÈŠ€¼‰±†|¡‚x‘{s€tknlb`e]Re`Me^Kf^Kh]Ki\Ij^Hk_Gn^Ew_G[C’YF­ZLÇVPÞRSõQXÿX_ðUSãLEÙ>9Õ60Ù6/Ü90Û9,Ö9(Ó8&Ñ8&Ñ8(Ô8)×7)Ü6*ß4,Ý5,Î0'É5)È9+Æ=-ÄA/Á@-¿<*¾9(Ä8)Ë<.äREÜH<È4(Ì:-È:,Â4&Ê=,Ë<+Ê;*Ê;*Ë:)Ì9)Î8)Ï6(Ó7*Ö8,Ù7,×3)Õ1'Ø1(Þ7.ç<5øDGñ8>í/9ï/:ð0=î.;ë1<ë6?ä5:Ü36Ø22ß:8îEBøIFøDCó?>é:7ç98å97â96á85à85á98á98à87â88å99ç9:é9;ì9<í9<î7;ó6:ò59î68ê88ä;8Ü:5Ó9/Ë7+Æ8*Ã:*Â:*À;*À;*Á<)Á<+Á<)½9$Á?)»:%³5¹:'Á;/Ê:2Ø<=ÿ^gÿPdÿA[ù8Wö6[õ;`ô>dãIe«?Lƒ?>_:2G;/:>08>2F<:R>=N0.S8/VK5ciEx[°pÂ}¡Æš¹}š¹€š¶ƒ©xrŽ^YuETp=\{B_@b†@iCm“Hl”Kk“LiMiMgŒGe‰Cc†Bc†DgŠJiŒLhŒNg‹MiOiMiŽKgŒGgŒFfŽEl’Im•LpœQoRt U-1"-1#,/&,.)//-11/34/45-9;0<>1@B7EHAKMLQRWUUaVWi\Yt^]fdŒpn zx·…ƒÎ‹ßêŽïŽŒíŠ‰ç‡„߁Ó|Ë}ȀƅLjˆÆŠŠÊŒŠÉŒŠÉŒˆÅŒ„¿‹‚·‰€­†|¡€v{p€ujpndbi_Vc]M_aL_aKc^Jg\Jl[In\Ho]Gq]EwaIxX?‡S=£VDÇXOãUSøOTþMSâ><Þ<7Ý84Þ71á6/á6.Ý7+Ú7(Ô7&Ó8$Ó8&Õ8'Ø6)Ý5*à3,Ý5,Ë3(Ä6(Â9)Á<+Â?-Â?-Á<+À8(Ã5'ÜJ=ÚF:ÕA5Îå84â62à72à72à72á85â96ä;8ä;8á77ä88æ8:è8;ë8<ë8<ë8<ì8;ï58î47ì57ç77â:7Ù:4Ï8/Ç7,Â8+¿:+½;+»<+»<+»<)»<+»<)¸9&½@*³9$±6$¶;+µ0'Ã40ìPTÿ[iÿJ`õ:Uð7Vñ@]ïHfçHdÍNa‚89e?6R@2DA09=,57)>6+K9/E-#R=,g]Bˆ_’«t—»{–Áz–¿{”³xœ¸…š´…€šm\uKHb5Nh8[xB_}?cƒ@hŒDl’Gj’Ih’JgLfKd‰Dd‡Cc†DeˆFh‹KkŽNkOjŽNiOiOiMhJgHh’Hl”Ko™Ms¡Vs£Wv¤Y24&04&01)01+12-23.34.46+9;-;>-?A3DF9IJDMONRQWSS]XVd\Zoda~nl”zw¬„‚ÃŒ‰Ö‘ã”‘ꓐ뎋≅قÌ|Ã|¿€~½„‚Á†…Á‰ˆÂŠÃ‹ˆ¿‰…¸‡®…}¤…{€vŽyn~rgmmaak^Vi[Pc\J]`K]aJc^Jh[JmZKqZJtZIv[FsWAxR;ŠQ=ªYFÍ[PãTPðFIñ>AÛ2/Ü5/á51ã60ã5.á5+à6)Û8)Ö7$Ó8$Ñ8&Ô9'Ø6)Ü6*à3,Ú6-È6)½8'¼7&½:(¿>+Â?-Ã;+Ä8)Æ4'éUIÓ<1Ì8,ÑB4¾5%À=+À=+À8(Ä8'Å9(Ç:)È9)Ë7)Ì6(Í3'Ò6*Ô3)Õ2)Û4,ã:3é>7ì?9ì=:è45ì59ï6;î5;ê2:æ39ä7=â<@óUVübbÿmjÿidóVQäA<ß63Ý4/ß61Þ71Þ71ß82á85â96å97æ:8å78æ89è8;é9<ë8<ë8<ë8<ì7<î5:î68ê67å97ß<7Ö<4Ì9/Å9,¾9*º;*¶;)µ<)µ<+´=)³;*³<(³:'·@,­8&­8'³;-«+"Ã54ý`gÿTdúG\ð-=@-@C.DG4IK>MNFQPNRRRVUSYX]a_lkius›€}²ˆ†ÇŒŠÓ•’ᔑ␍܋‡Ó„Ä}º|µ|³~·„º‡„¹‰…·Š„²†¨z›€xs‡znzrfjm_^j[Ti[PjZKfZJb_Lb_Le^Li\Kn[Lr[Kw\K{ZG~UA†R=›RA¶VFÎRHÚG@â88å33Ý1-ß3/â5/ã5.á3,ß3)Ý5(Ü9(Ó8$Ð9$Ï:&Ñ:'Ô8)Ù7*Ý5,Ø7-Ä;+¹:)µ6%·8'½;+Â=.Ç;.Ç7,Ð90õ\TÖ=5É5+ÏA5¸3$·:(¼?+¿:)Ã:*Æ:+È:,Ê;-Ì:-Ï8-Ñ7-Ð3*Ò1)Ö1+Þ71å<7ê>:è;7æ74é75ï;<ðë8>è7=ê7;î7;î79ê7:ä::ß=:Ö=7Ë;2Ã;/º8*µ:*³;*¯<)¯<*¬<(¬;)¬;)ª;(¬=*¦8'§9*ª8-¬/)Ë@CÿhrôM^óH[íDYåH[ÙO^ÉT]·TWœXUdM?OL9LG4JE1FD-?B'=D#>H#KV.\g.==1==3==5;<4;=2;=/?B/@D-CG.FJ3KL:NOAQQIRRHYWJZZN_^\gerqn‰{y¡ƒ€·‡…ďŒÑŒÓŠÏŠ…ǃº~y¯zw¦yv¥{v¬|y®€|®ƒ}©ƒ}£x—|t‹zrvksrffm_\j\Sk[NlZLl[Kk[Ki]Mg^Mi]Mj]Mn]Ms^Mz]MZI“`O›VG§N@¸J=Å@7Ï6.Ø1+Þ1+á51á6/â5.â4-à2)Þ4'Ü6&Ú;(Ñ9$Í;$Ì;&Î;'Ñ:)Õ9*Ù7,Ó9-Á>,´;(°5#²5#»9)Ä<.É;/Ë7-Ù?7ø[TãIAÎ:0Ì@3¸6&¬3 µ<)¼9'¿7'À7'Ã7(Å7)É7*Î7,Ñ7-Ù<3Û:2Þ93å<7ê>:ê=9ç85ã41è96ë<9ì::è8:ì>@øPPÿbcÿppùheâTPÊ=6À1+É40Ö;7ß=:à;7â;5á:2â94á83ã73ä73å55æ66é69é69ê7;ë8<ë8>ê7=è7=é6:ï8<ì89è8:ã;:Ý>:Ó>7É<2À8ÛTXûepîK\ïI]éJ\ÛM[ÉQZ´VV ZRŠ`RPI7HM9NI5H@+;567>O%Lf6lŠTw”\„›e‰šd›f£k”­t˜°|ƒ•mn}\Q`Cg{HiƒFl‹Gm‘Gj“Gf’GbGcŽGhJlMo’Pn“PlMiŽKjJj’Ls›TsUsSržQržOs¢Rw¦Uz«Zv¦Zu¥[s£YRK;RK;RJ=RJ=RJ=RJ=RJ=RK;UNXQ?YR@[TD\UE\UEb[HaZHaYLbYRe][kaiqftuj{zn„|pˆs‹s‰|p„uj{mbre]jc`k`_g_\c_Z^^ZY^YUaZRbZOe[Og[Ki\Kk\Ik\Gm]Fm]Fj^HicMqfTqZJuOB‹WJœ\P£YL¬ZL¥N=¦E4§<,±7(Â8-Ñ80Ü41Ý1-ß6/Þ7.Þ7.Þ7.Þ7.Û7+Ø6)×7)Õ8)Ô8)Ò9)Ò9)Ò9+Ò9+Ô8+Í;,½;+¶>-®9(©1 «2!·9*ÀÔH9Â=,·2#ÝPFØJ@ÔF<ÔD;ÚG?ÞG@àC>à<:à74æ87ì::ì::ç77â64à93Ü=7ÙF>ÏB9Ä:/¼4(·1&¹5)¿;/Ã?3Ã:0É<3Ò?7Ú?:â=;ç;9ì89í9:ç7:å8:å8:å99å97å97å95å95à40á51ä65å76æ89ç9:ç9:ç9;ë;>æ9;ß99Ü=:ÖA=ÍB;ÁA6·?1©:)£<+ =*›<(™:&–:%—8&‘8&A0‹<-‡/#‘/&¼LJämoçloÍVZ½LNµNOªQM¢UO›XO—]R•aTŠjSWZ/:M7FTa)~ŽP›°oŸ¼yœ½x’µs~ah€L\mCYdBT]BHP9?D0:=,@C2<@1:>0]sBgƒHpKo“Kl’Gj’Ii“KgJlPm‘So“Sl“Pm’Mk“Jm–Jm˜IqœLqžMrŸNr¡Pt£Rv§UyªYzª^y¦cm™ZbŽOWN?WN?WN?WN?WN?WN?WN?WN?XO@YPAYPA[RC\SD]TE^UF_VGd[JcZIcYMcYOf[Uj_]nbdpdhreltgpvirvirsfmm`gg[_bXY^[VZZRYVOWTKXTIXTH\VH^WGcZKcZIf[Ig\Hi]Gj^Fk_Gh`IcbMngTv\MSFšVM«VO°RJ·QE¯H9¬C0¬=,±9)¾8,Ë80Õ62Ù40Ý6.Ü8.Ü8.Ü8.Û7-Ú8-Ù7,×7+×7+Õ7+Õ7+Õ7+Ô8+Ô8+Ô8+Î:,¾<.¶>.®9(¦1 §2 ²:)¹>.¾<.Æ:-Ç4*Ë4)Ò;0ÜE:áOBßQCÝOCÛF?Ø@;Ó<5Ò;4Ö=7Ú=8Ü86Ý33ç77ë78î79ë78ç77å97â=9ÛB:ÊA7¿?4¸:,±6'¯5&²8)¸=-¿@1ÅA4Í@6×@7ß=8ã:7é77ï56ñ7:é6:ç6<ç7:æ89æ87å95å95ã:5â92ã:3ã:5ä;6ä;8ä;8å99å99ä:;ã;;ß<=Ù?=ÐA;Ä?6·=2¬;-¥;+ =*œ=+—<)–;(’:&“8%Œ:%€9'€8)‰5*<5¿QP×eeÑ^a·MM¬NL¤TMYP˜\Q—^S—^S˜_VŒfQ`_/Sg*^r3zO™¯n¥¾|™²pˆ bj‚HauBTe;JX7FP7?H59?158-:^tEgƒHqMp”Ln’Hk”Hk“Lh‘Km‘Qn’Tm”Sm”Qk“Lk”Hl—Hm˜HpJpJp Ls¢Qu¦Tx©Xx©Xx¨^m—Xb‹QY‚H]TE]TE]TE]TE]TE]TE]TE]TE[RC\SD]TE^UF_VG`WHaXIaXGe]Je]Hd[Jd[Le[Qf[Uh]Yh][i]]j^^k__k__i^\f[YbWS_VQZVMWTKUQHRNCQMBSOCWQCXRB^WG^WEaYFc[Fg\Hi^Hk`JhbLbaMngUy_PˆXN¢[U±VQ²IE¸E@¹@7¸>1·;/¸8+¼8+Ã9,É;/Ñ:/Ù8.Û7-Û7-Û9.Ú8-Ù7,Ù7,×7+×7+Õ7+Õ7+Ô8+Ô8+Ô8+Ò9+Í;,À>0¶>.­:(£2 £3ª:&³>,¹>.Ä?0Ä8+Å2(È4*Ð<0ØF9ÜM?âNDÙ:6Ø43Ô20Ö42Û97á=<æ<<é;<í9<î5:ë27é26è58å99á<:Ù@:¾8-µ:+±6'®4%­5%°8(µ<+»=.ÈD5ÏC6ÖB8Ü=7â94è64í55ï79ê69é69é69ç77ç77æ95å95å:3ã:3ä;4ä;6ã<6ã;8â:9á99Þ88Ý9:Ü<<Ú@>ÓB=È?9¹:1­7+¥7(¡;,<+™<+”;)“:(9&7%Š9&z6#y6%ˆ9, F=¹SOÀWT¸PO«IF¢MHœSL™YP—^S—aW—aW˜_V‹ePsrFzV“¦n¤¹€«À‡ž³{|[[oaXIaXIaXIaXIaXIaXIaXIaXI_VG`WH`WHaXIbYJcZKd[Ld[Je]Hf^Gf^Ig_Lg^Of\Pf\Rf\Sh]Wh]Wh]Wh^Ug]Te[QdZPc[N]YMZVJVRFRNBPL@PM>TN@UO?WQAYTA[VC]XDaZGd]Jf_LfaMdcQleUv\OŠ[Q©b\¸ZX¶FD¹<:Ã<8Æ;6Ä:0Â8-½8)¼:*¾?.Ç?/Ó9-Ù7,Ú8-Ù9-Ú8-Ø8,Ø8,Õ7+Õ7+Ô8+Ô8+Ô8+Ô8+Ô8+Ò9+Í;,Á?1¶>.¬9'¢3 3¢8"¬=)µ@.¼?-¿:+Ã7*Å5*Ë7+Î:.Îî7<ì38é06æ25å58á77Ú65Î61·5(¯7'®6&¬7&¬7&®9(²:)µ:*ÃA1ÊB4ÔA7Ü?8â;5æ95ë76î87í68ë78ë78ê86ê86è94ç:4æ;4â92á:2ß:4à;7Þ:8Ü:8Û97Ù99Ö<:Õ@<ÒC=ÊA;»;2¯6+¤6'ž7(œ;*˜;)”;)’;(:&8$Œ7#‡9%€=*v5#5'™E:ªPH¬MG©LG¦QLPJ˜UL”ZO”^R•aV•aV—aWgT‰…_™©x­½Ž¦¸ˆ¡ts†YN`8/A->3B%:F.=F3;A3:=2:=4<=599-?@2<>39<1<@29B/?L2PbNK:NK:NK:PMTQ@VS@XWC[ZF]\H^]Kb`Qf^QmWJ†[R¬ic¾c`ÁMMÈBCÐ;=Ô89Ó84Ì70Á9+º=)µC+¼B+Î;+×7)Ø8*×:+Ù9+Ö9*Ö9*Ô8)Ô8)Ô8)Ô8)Ò9)Ò9)Ò9)Ò9)Í;,Á?1¶>0«:(¡6"š4›7 £=&¯B-³;*º;,Â:,Ç9-Ë8.Î:0Ð<0Ù:4é9<ì4<æ39ã28â38á48â38â25é6<é49ç4:ç7:ã9<Û76Ð21À0(´6(­:(­:(«:(«:(«:(¬9&¯7&¸:+Á;/Î>3Ø?7à=8ä;8è96ì87î66î66î66í74ê84è:3ç:3ä<3á:2ß;2ß<5Ü=7Û=:Ù><×=;Ô>=Ï@<ËB<ÅB:¹=5­7-£5(ž7(š:*–;)“<)‘;*:(Š9&‰8%ˆ7$ƒ8%ƒ@-u4"{3%“G:¤QI¡NFžNG¡WN˜UL’XLZN\N]R”`U—aWhW‰f˜¥z©€Žj]kHDS42@&$2-:&0;*5=.9?3?1;=28;0;?18A.>K1PbÜ87Ô70Ç;.¼?+±C*µA(Ê;*Ô7(Õ8)Õ9*Ö9*Õ9*Õ9*Ô8)Ô8)Ò9)Ò9)Ò9)Ò9)Ò9)Ò9)Í;,Á?1µ=/«<)¢9$™6•5›;"§A*²B.¹@/¿;,Ã7*Å2(Ë4+Ò;0ß=8ê5:î3<ë6=é8>ç:>ä;>ã:=â9<ß58á7:â9>á=>Û=>Ñ96Ã2/¶0'¯9+«>*«>*©>*ª=)©<(©:'«8%¯6%¹7)Å;0Ð=3Ù<5ß<7ä;8è;7î87ï75ï75î85ë:4é;4ç<4ä=4â>5à?7ÞA:ÚA;ÙA>ÕA?Ñ@=ÍB?Ã?:»@8³=3ª8-¡5(›5'˜8(•<*‘<(<)Š<(ˆ:&†9'„7%ƒ6$6%}:)t3!~9*—OA£YNœRG•OE˜VJ•YN[MŽZMŒ[MŽ\Q“_T™`W‘gW~xXyƒ^r|ZU`B;E,/;%0;*0<.3=24<16<2?1:<17:/:>07@-=J0Oa;bxIk‡Lu”Qu™Qt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:2ª8.¤8,¡:+¡=-Ÿ>+ ?,¡@-¡@-¡A+£>*¦=*©;*­:(²7(¹5)¿5+É90Ô?9àC>ä=7è;5è;5ç<4å<5ä=4á>5Þ@5ÜD9ØD:ÒC;ÊA9Ä?:¼;6¸85°93¢7-™8(•5'“6'‘:)<*‹:)…8&ˆ=*…<+ƒ<*€<)~:'|8%{6&{6&y1#€8*ŒG8–SC’PB‹L=RE™_S‘WL’YN”[R–]T–]V—\V–YTŒ^QaX;EM(6@8A&>G26BE*;:&78(=>09;069.:>06?,F7GK=IK=AE4KJ6\Q;aE/ƒJ9Àj]Üg`ãUSäFEåA@àA=Õ>5É=0Æ=-Æ4%Ë5&Ì6'Í7(Í7(Î8)Ñ;,Ó=.Ò<-Ò<-Ò<-Ò<-Ñ;,Ñ;,Ñ;,Î<-»2(¶7.±;/¨:)š7"”5•7œ9"®A-³;+º6)Á4*Í6/×<7âC?êHEèDEèEHÝCCÉ:6»61´80®8.©4+«9/©9.¤8. 8-›9,–:+“<+’<+–=+˜=*™>+š?,›@-A, A-£@-¢;*¥:(«7(°6)¶6+¾8-Ä;3Ì<4Ú=6à=6â?8âA7âA9ÞB6Ú@6×@5ØH=ÒE;ÇA8»;2²5/ª3-¦1*Ÿ2+™9-’;*‘9+:*‹:)ˆ;)‡;+…<+€9'}8(|9(|9(|9({8'y6&x3$w- ‹A4—OC“MAŽL@‘QE“UJŽRG˜\R˜\R‘UMTL—ZU•XS”WT“gZ]T5IQ*AK(BK,>H/7@+2=-4?14<1HPCZ^PW[JMO:DF.AA'==%:;)>?1;=2:=2;?14=*;H.PbF7>F7=E6@F8>E5>F1HL5MI0U?'Q:¼sbËcXà_ZëUTçGGâ@>àA=Ø?9Î:0Í9+Î=,Ï=.Ï>-Ï;-Î;+Í9+Í:*Î:,Ð:+Ð:,Ð:+Ð:,Ð:+Ð:,Í;.É?5ÅB:¼B7®=/Ÿ6#–1–1›2¨5#´6(Ã;/ÑA8ÞE?æIDéJFêKHÞCAÛEDÐB>¼<3¯9/©=0¥?1Ÿ=0Ÿ?1œ>2—>0”>/=/Š>.‡@.ˆ?,Ž=*‘;*’<+“=,”?+•>+—>,™>,Ÿ@.¡=-¤:,¨8,¬8+±8-¶:0¼9/Ê<2Ð<2Ó?5ÕA7×C9ÖC9ÔD9ÑE8ÊB6ÃA4¹=3°:0©6/¤5.Ÿ4,™7,’:.Œ=,Š;,ˆ;+†:*„;*ƒ<*<,~;*|;){9)y:)x9(w8'u6'w4$€4'D7˜NC‘K?ŒJ>QD’TIRG“SJ˜XO˜UO—VPœ]X”WRŽSOŠcT]W5Xc9_jBZfBIT66C)4@*0:<19<1<@25>+;H.PbMKD63Å?3ÅA4ÃA3ÁA4¶;,²:,ª8-£7+ž6+›6,˜7.”:/;/ˆ<,‡;-„;,‚:+€;+€;+<,};+z;*z;,w9*v8)u7(t6)v4&ˆ;1”F<–NBŽJ=ˆH<OB‘SH’RI’OI™TO™SQšVSš]Z“YU[Tl[}X~‰^€‹alxRLX46D#=J.LZ@eqYeoW]eMPU>EI0?C(=@#:<$89';<.8:/9<1=A36?,MK4Ñ>4Ò>4Ò>4Ó?5Ó?5Ó?5Ó>7Ó?;ÑB>ËD>ÆF=ÂF<ÃI>ÇM@ÎPDÙSHÝPGâMGäIEäGBâC?àA=ÛB=ÕFBÉD?º?7«=0Ÿ>.šC0•G3”I6F4ŒE3ˆC3…B1€A0}@.zA.|?-‚:,†8,…9+†:,†:,‡;-‡;+ˆ;+‰:+‹:)Ž8)8*•9,™;/=/¢<0ª:/­8.¯9/°:.°:.°:,¯9+®8*¨7)¥7(ž6)›6*•7+’8-‘9/Ž<0ˆ<.…<-ƒ;,9*:*~9*}:*};+|:,z;,y;,w9*s8*q6(r7)u5)ŒD8’H=‘K?ŠH:‡I<‹OD“TK—TL–QL›TP˜QO”SO–\X_Xh^—~j””p…’fu‚WYh?CR+?O*P`B)=A(;='78(:;-79.9<1=A37@-NKB1=I1?G/LG1S>+g=-•ZL­_Sœ>4ž3+¶?9ØXUóigödeëRUæJNèNPÙIAÓF<Í@6Ë>4Î@6ÒD:ÕG=×G>ÚJAÚJAÝJBÝJBÞKCÞKCàKDàKEëSRèTTãSRÜROØSLØSLÛULàUNàLHáIFãEBâC@äB@âC@äEBàFDÙJFÊE@¹>7¬=2¡?2˜B1’E3G4ŒE3ˆC3‡B3ƒ@0?1~?0z?/|>/€:.ƒ9.ƒ9.ƒ9.ƒ;-ƒ;-ƒ;-ƒ;-9*‚9*…9+‡:*‰:+;-<.“;/›;/ž9-Ÿ9- :,¡9,¢8+¢8*¢8*Ÿ8)œ8)˜8(”8)9*Œ:,‰:-‡;-„:-‚:,9+€8*}8)}7+|8+{9+z8,y9-x:-v8+q5*o5)q7+t9+ŒH;I<‰I=„I;…K?ŒRF“WM˜XO˜QMœUQ˜RP“VQ’`YˆbWƒg[†zdnrQZi@JY0AR(IZ0Wi?dvNj|VXiEL[:?L.:D)C-B47@-;H.L^8_uFi…Jt“Pt˜Pt˜Nr›Os›TpœQnMmžLp¡Pw¨Y|ªaz¨`rXi“QZƒA\„EaˆIeŒMgŽMgŽKhJfŠLc†PY{IRtBi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`QkbSkbSkbSkbSkbSkbSkbSkaUlbYlbYlbYlbVlbVlcRlcRldQldQldQlcRlcTlbVlbXlbXlbXocUnbRkbQlcRlcRkbQg`Pd]M^WGYSCSM?MJ;KH9GE6EB3?B/;H.?H-OC-a=-ƒE:«XR´NJž,+²:9¹=;ÓSRòpnþvvñehëX^ð^_ãUQÚPFÔG@ÐC:ÑD=ÔG>ÖGAÖG?ÙHCÚJBÜHDÝJCÞJFÞKDàKGàKGâHHáGIÜHHÙGGÖHD×HDØGBÛFBàBAäABæBAèBBçCBäB@ßA>ÛA?ÛJGÊC?¹<6®>3¢@3˜A0A0C3ŠA2ˆ@1‡?1…=1‚<0€<1=1=1;1;1ƒ:3;1;1€.™9)–9(“:*:+Š;,‡;+„;,‚:+‚:,9+7)~6({5){5){5)z6)x6*x8,w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Y5[qChƒLq“Vwž[w¡YsœVgP^IUx@WzB[~F[~F[~F]€H_‚J_‚J_‚J_‚J^I^I]€H]€JUvIJk@@a6haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlbVpg^ng_lgatqj‡„¡ œ¼¼ºÎÐÏÏÏÏàààòòòúøùû÷ö÷óðñìéðâßèÐÆÝÁµÁ«¢‘}ub^\GKM7CH2AI2AI4@G5BD7AA7B=9C97?:69<5>?7B71J.+d66QR³giÆnmÀ\\ÇZWÐVS×QNÜLKâHHæCDåBCßCFÝDFÝDFÝCEÝCEÜBDÜBBÜBBÜDCÙCB×C?ÓD>ÒE>ÐF<ÐF<ÔE=ÜC=ÛA9ÒB:ÊD;¿E:°A6œ:-‹5&ŠD69A208+/7*6<247058157247025.06,08-19,6A3:E5=J9>K9-,6..400511606718:/:<.:?+WzB[~FY|DY|D\G_‚J_‚J^I^I^I]€H]€H]LStIHhA?]7icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSjcSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUmdUmdUmdUmdUldWibZgd]vsn“’Ž¯¯­ÄÆÅÚÜÛêîïóôöö÷ùüüþÿÿÿÿÿýÿûúü÷ôýòì÷áÔòØÇàʵƶŸª ‡ˆ„ibbFEH-DH/CG0FE1GD5F<3C60F42H:9>=9>?:B:7I75cGF’jjœ’è­©Ò‹‡ÇtnÀ]XÆSPÕONßJLçFKéFKßEGßIKÚDFÔ;>Ø>@áGIàDGÖ:=Ú@@Ú@@ÙA@ÖB>ÔC>ÑB<ÐA;ÑA9ÞC>ÛA9Ó@9ÊA9¾B8°@5Ÿ:.8*Œ=0‡>/ƒ>.>-€=,<+=*<,:+9-9-~8,~8.|8-|8-|8-|90|90|90|90z:1z:1z:1z:1y=5w<4w;3u:2t91q8/p7.p7.o6-m7-m7-l8-m7-l8-m7-m7-i2+m6/p92o81k4-g2*g2*h3+e0(i7.d2)]-#`0&_/%b2(s>6ŒOJPKˆQJRJ}YMv_QfYITN>DE5>E5:C25@04&DR1WlCh‚Rs”]wž_r›Wk”R[~DXyDTu@Tu@WxCZ{F[|GZ{F^JbƒNbƒN^J\}H_€K`L^~MTsJFd@2I:3L95K<9?:7BA?MHE]RPyjg£Ž‹Î²®èÅ¿ÿ×Ñ쳪͂|Àc^ÊVVØRSßHMÚADÖDEÕEEØHHÜJKÛEFÕ<>Ö<>ÛACÙ??Ù??ÙA@×A@ÖB>ÓB=ÒA<Ó@9ÜA<Û@;Ó@9ËB:¿C;±A6 ;1’8-Œ=0‡>/ƒ>.>-€=,<+<,<,:+9-9-~8,}9.|8-|8-|8-|90|90|90|90z:1{;2{;2z;2w<4u<3u:2s:1r90n8.o6-m7-m7-l8-l8-l8-l8-j8-l8-l8-k6.n70o81n91l7/i4,g2*e3*c1(d4*_/%^.$b2(^.$`0&p>5JE‡RL‡XR~XOrVKdRDQJ:>?/:A16A05@03>04<14<15;17:379477577557246116//6./7,.9+1<.4A08E49H58G44E24B1.8/.5..3--2+23+46+8:-9=,7?(DQ3WlEh‚Ut•`wbp˜YgPY|DWxCTu@Tu@VwBYzEYzEYzE[|G_€K_€K\}H[|G^J^J^{MSnKF_A9R4icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSicSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUmdUmdUneVneVlfZed_y{x—™˜²¶·ÍÑÒäéìôùüúÿÿûÿÿüÿÿýþÿþþþÿþüÿÿûÿÿúÿÿôþüçúùÝïðÑáåÄÒØ´¼ÄŸ ¨ƒ‡‘l`gEQX7DG,DC.JD4LD7KA8I>:C;9SJKia_wvœ’¾³¯ÙÎÈêÜÓþèÝÿóéÿäÛð©£ÃecµBEÇDIÚRVÛUTÑMKÊDAÍCAÔFE×EFØDDÙCDÖ=?×>@Ø@?Ö@?ÖB@ÓB?ÓB=ÔA:Ù@:Ù@:ÒB:ËE<ÀD<²B7¡<2“9.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:/}9.|90{8/{8/{8/|<3|<3|<3{;2z;4y:3y:3w;3n70m80l7/l7/k6.h6-h6-h6-i7.h8.h8.g8.g8.g8.g8.h8.k92h6/f4-g5.i70h70e4-b1*c2+b3+_0(]1(]1(V*!b6-{ULtYRaNHN?8A7.=6,;9-9;.9<139-3;.5;/6<06<07:/58-47.69049238139/39/2:/19.19,.9+.9+/:,0;-3>.6C2:E5Qn>Qn>Qn>Qn>Qn>Sp@Sp@WtD[xH]zJ]zJ_|L_|LZwGRlECU?6D7(6)gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSkbSkbSlcTlcTmdUmdUmdUmdUmdUneVneVofWpgXpgXng]lnmz‚…“š «µ·ÄÎÐÜæèí÷ùôþÿõþýöÿüúÿúûÿùûþóøúíõöèñôãôýêôýèôüåóùßòöÛéìÍØ×¹ÅÄ¥±°’ŽregOMP;GK:FM=GOBKQG{{sŸš”ž¸ØÎÌßÓÓçÛÛóëéü÷ôðïêüüôÿÿöÿýóÿùïÿóêÿçÞÿ×Ëؓƒ¸eS£J:´TF½WIµF;·@8ÈKEÇC>ÊC?ÌB?ÎC@ÎC>ÎC>ÍD>ÍB=ÑB<ÒC?ÎDAÅD?¸A=ª=8ž;5•<4Ž;3‰<2ƒ=3=2=1~<0=1=/~:/~:/~:/}9.|90{8/{8/{8/|<3{;2{;2z:1y:3x92w81u91n70l7/l7/j8/i7.i7.h6-g7-g7-g7-f7-f7-f7-f7-f7-f7-h70h6/g5.g5.g6/h70g6/f5.a2*e6.^2)\0'`4+a5,i=4uSJXG@E>6<5/95,;8/8:/57,36+69.5;/7:/69.69.58-57,36+28,19,28.19,19.19,19,19,.9+.9+.9+/:,0;+3>.6A17B2ex\umt’lf‰_RwKBh9KkVsCZwG]zJ^{K_|L_|LVsCNg@ÉD=ÈC<ÉB<ÑC?ÐE@ÌEAÂC=³=9¦;5œ;5•<6Œ<3‡=4…<5=4<3~<0=1=1~:/~:/~:/}9.|90{8/{8/{8/{;2{;2y:3x92w81v70v70s7/n70j8/j8/j8/j8/h8.h8.h8.g7-f7-f7-f7-d8-d8-d8-f7-g6/h70i81i81h70i81j;3l=5g80k<4b6-a5,oC:xLCtI@nMDC9056.45/8918;247.14+25,58-58-57,46+46+46+46)37)/7(.9)08+.9).9+.9)08)08)19*08)08+/7*08+19,3;.4<-9B1:C0;B0:A1:<.68*24&/3$29'IU?cu[m„gf„bWyTInE?d8Hg;Li;Nk=Nk=Li;Li;Mj

      UrDYvH[xJ]zL^{M\yKQn@G_;6B4+4/#)%gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSjcSjbUlbVlbVmcWmdUmdUmdUleUmfVngWogZnh\oh^mjekormtzƒŠ¥®³ÃÌÑÕßáæîñôüþôýú÷ýùùþ÷úÿôüÿòüÿñüÿîýþðûøïþúñÿùïÿúíÿùéÿòßïàËÝηÁ²›¢—|ubb_NXZL]cWmwn|†}¦¬¢¾ÀµÚÕÏîäâüîîÿôôÿô÷þôõÿùùûúøûýøüÿúøÿõôüñ÷ýñÿÿñÿùèÿôãÿÌ»½p›QD©SFµSH²C:ÀJ@ÄH@ÇG>ÉF>ÈE=ÇD<ÆC;ÆC;ÍG>ÌG>ÇG>¼C;­>5Ÿ:2—:3‘>6Š=5†=4ƒ=5=4€<3;0;1;1~:/~:/~:1}90|90{8/{8/{8/z:1z:1x92w81v70u6/u6/q6.m80k90j8/j8/i9/i9/i9/h8.g7-f7-g7-f7-f7-f7-f7-f7-f5.j81m;4k:3j92j:0m>4oC8l@5oD;d<2c=2zVJ†dZyWMbLA>:13814927<54:0/5+25,9<336+25*24)03(13(25*46+47,.6),7)/7*-8*/7*/7*/7*/7*19,08+08-/7,/7,/7,08-08+7?09B14*00!''heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjdVjdVjdXldYlcZmeZmeXmfVg`NjeRnkXol]he\feasqr‚†Š“–ž¡«³¶ÃÈËØÝàêîïö÷ùùûúüþýþþüÿÿúýþöúýòùüñúýòûþóùúòúúòùùíüúëþüçù÷ÞéåÊÕÔ¶º¹›˜˜|qtY_dMbkXr}l„‚‘›´¹²ËÌÇãâÞòîë÷óòû÷öýùøüø÷ÿþüþþüþþüýÿúýÿúýÿúýÿúýÿúúü÷ÿÿúÿûöÿêåا £`X›D=µNE¿MCÂF<ÄD9ÊE<ÎI@ÎKAËH@ÇG<ÆG8ÃH8½J8³H8¦E5šB4‘B5‹C5†B5„B6‚@4‚>3‚<2„:1†91†9191~:1|91{80z7/z7/w7.v6-w7.w7.w8/w8/v7.u6-q5+n3+l7/i81i81h70h70g6/g6/g6/f5.g6/i70i81h70g6/e4-e3,h3-j5/m80k90j:0i;.i=0kA3gB2jI:dH:v_O~k\ŠxjŒoRJ=79.4:04:039/39/39/28.28.17-17-36-06,25,/5+14+/5+/4-.5-/4-.5-/4-/4-/4-/4-05./4-/4-.3,.3,/4-/4-/6.1;23=26@58B79D67B45@03>-4?.DQ=WeN[kQPbHEX<@T8BW6Ic>Ke>Kf=Kf=JeOj?UpGYtK\vO]wP]wRWqNHb?;O6&1+&+.$),heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVidQjhSmjWjk[gg_lll~„“š¨¯µ¸ÂÄÑÖÙâçêòóõûüþÿþÿÿþÿþýûÿþúÿÿúþÿùûüôøûòöüò÷ýó÷úñøúïøúí÷úéùûåòõÚßâÃÌЯ´¸—‘–vkqUYaI_kUtoŒ˜Š§œ¿Á¼ÓÓÑççåóóñ÷÷õûûùüüúûûùþþüþþüþþüþþüþþüþþüþþüûÿþõÿÿõÿÿþÿÿÿûúÿíêð¿ºÂ~uŸKA¯M@¹K>ÂL@ÅK>ÃE9¼=4¾?6ÃE9ÄF7ÃJ7½L:³J7¦F6™C2‘C6E7…C7‚B8A7>5‚<4ƒ:3†91„93~92}:2z:1z:1y90x8/v7.v7.u6-v7.t8.t8.t8.r6,o5*m4+l7/i81j81h70i70h70g6/g6/e3,e3,g5.h6/j81j81j81k92k60l71k90k;1k;/j>1j@0iD2gH6kP=gRAufSueŒ…s†ƒrKL<69.39/39/39/28.28.28.17-17-17-17-06,06,/5+/5+/5+/4./4./4./4./4./4./4./4.05//4..3-.3-.3-.3-/4./6/.80/:21=34@66B66B66B45B16C1CP>P]IR`IIW@AO6BP7EU:Jb@Jd?Ke@Ke>Ic6I5&1-',0$)-heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVmhUkiTmjWjk[kkcwww‘’—§¬²¿ÆÌÒÜÞìñô÷üÿþÿÿþÿÿÿþÿÿþÿþýûÿþúÿÿúýþøúûóõøïñ÷ëñ÷ëô÷ìõùëöøêõøåõ÷áîîÔÛÛ¿ÉÊ«°±’“–yuy`kpZt{iˆŸ§œ®µ­ÍÏÊÞÞÜïïíøøöûûùþþüþþüýýûþþüþþüþþüþþüþþüþþüþþüýÿþûÿÿûÿÿÿÿÿÿûùÿúôÿ÷íýÑÆ؞”L=¥RB©L;§@1·G;ÏYMÏUJ¼@4ÄD7ÆH:ÃK=¹I;ªB7?3—@7“E;‰@9„A9A8?6~>5}=4<4}=4z;4x<4w;3w;3u:2t91t91t91r90r90r90r90o9/n8.l6,k5+l7/j81l71j81k60i70i70h6/g5.g5.f5.g6/h70i81k:3k:3l;4j;3i:0h<1k?2jC4iD2fE2fI7lVAjYGujV†m‘Ž{€mEF658-28.28.28.17-17-17-06,17-17-17-06,06,/5+/5+/5+/4./4./4./4./4./4./4./4./4./4..3--2,-2,.3-/4..5.+5-+6.-9//;12>24@46B47D38E3?L:ER>CQ:;I28F->L3DT9J_@Jb@LdBKc?Ia=G`9F_8G`9RkDXpL]uS^vVZqTPgK=T8.A.&1-',0%*.heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVniVljUlkWlm]pqi€‚ž¡¦¹¾ÄÄËÑÛåçõúýûÿÿüýÿüýÿþüýüûùÿþüÿÿûÿþùûüôõöîîñæéïãçíßíñâðôåñôãñôßòñÜêêÐØؼÇÇ«²±•¡¡‰‘“}“€œž‘ª­¢¶»´ÀÅ¿ÜÜÚééçööôûûùýýûÿÿýÿÿýýýûþþüþþüþþüþþüþþüþþüþþüþþþûûýÿþÿÿþÿ÷òïüóìÿüóÿûíÿôäìñ¹p•P@¢O?¸XJ·M?µE9ÀG<ÁA6ÈE;ÅI?½G=¯@9¡<4š=6–A<?;‡@<@:}@;z?9y@9x?8x?8v=4v=4v=4u<3s=3r<2r<2q;1o;0o;0o;0n:/k9.j8-j8-i7.m82n72m61l71l71k60i70i70l:3j92h70f7/f7/f7/h91f:1j?6f>4e=1f>2hC3iE5fG3cG2cJ6hV@i\IskV…‚oŽzpq_9=,47,28.17-17-17-06,06,06,17-17-17-06,06,/5+/5+/5+.3-.3-.3-.3-.3-.3-.3-.3-.3-.3--2,-2,-2,-2,.3--4-*4,)4,*6,+7-.:.1=14@25A36C2:G5N4DX¿@7ÆC;ÅF?¿D=±>;¦:7ž:8™>;‘=;Š?<„@=}@=xA6s>6r=5r=5r=5p>5o=4n>4m=3l<2k;1j;1i:0i:0j:0n72p62p62m61m61l71i70i70l;4k:3h91e90e90e90e:1d<2fB6cA5cC4dD5dG5dI6bI3_I2^L6eV?jbMrmW„ƒo„‡r[`L3:(28,28.17-17-17-06,06,06,17-17-17-06,06,/5+/5+/5+.3-.3-.3-.3-.3-.3-.3-.3--2,-2,,1+,1+,1+,1+-2,,3,,6.+5-*4+*4++5,.8-0;-2=/2=-5@/6A05A-1=)1=)5A-8F/=O5@T8FY=H\@J]?I^=K^>K`?TgG[pQcvZauZYkSJ]G6G4&4%$-*$),"'*heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZlfVjgTkjUlnYorasvm…„Ÿ¤¨¸¿ÇÖßäí÷ùûÿÿûÿÿûüÿþÿÿÿþÿþýûÿÿûÿÿúüüôóõêëíâãçÙÝãÕÜãÑäéÓçìÕéíÖêìÔëëÓèæÏßÚÄÓθÓκÌƶËøÐÉÁ×ÒÎàÛØêæåðïíóòðùù÷ýýûýýûýýûÿÿýþþüüüúþþüþþüþþüþþüþþüþþüþþüÿýüÿûüÿøùÿþýþÿýùÿýôÿøïÿõ÷ÿöð÷çÿÿíÿîÛͧ”¤kX¢[GªWE­L;¹D:ÀD<ÀE>¼E?´A>ª=:¢:9š;9•=<?=…?=}@;wB5o?5o?5o@6n?5m>4k<2h<1h<1h<1l<2o83q62p62p62m61l71j81i81h70g80e90e:1d<2e?4f@5dB6^B4aG8cL:dM;cM8`K6]K3]M4]Q9bX?mhRss[€ƒnv{eFO:4=*39-28.28.28.17-17-17-06,17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,-2,,1++0*+0*+0*+0*,1+,3,.5.,6.*4+*4+*4++5,-7,.9+-8*0;+4?/5@/4?.3?+3>-3@,7F/9K3@O8BT:GW¸J=¹I>¸I@´G@¯D>¥=:œ:7–=9>:ˆ?9€A:xA:tD:pF:pE5j>5n=6o83r73p62p62n72l71j81i81d8/d90c;1d>3d@4cA5cA5_C5ZE4_NnlUtv^|kcmU2>(6B.3;.39/39/39/28.28.28.17-17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,,1+,1++0**/)*/)+0*,1++2+-4-+5-*4,*4,+5,+5,,6+-7,,6+/:,2=/6A17B27B15@04?.2?-4C.:G3=L5AO8DT:JX?L\BTbI\kTcqZ^mXUbPDRA2>0#/%&/,&,,$**heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjdVjdVjcYkdZlc\md[lfZlfVolYmlWjlWgkZflbr{xŽ˜š¨±¸ÊÓØãìñøýÿ÷üÿúûÿþÿÿÿþÿúùõÿÿúýýõøøîðòåéëÝåéØãêØåíÖæìÒéíÒêíÒèèÎèæÏèãÏáÚÈØÐÃØÎÄÝÒÌêßÛøíëÿôöÿõùÿõûÿùüþüýÿÿýÿÿýþþüþþüÿÿýÿÿýýýûþþüþþüþþüþþüþþüþþüþþüÿþúÿýûÿýûýüúùýüøÿÿõÿÿóÿÿíýúóÿûûÿúÿÿôÿöæÿóßÿãÍ×­•©oY¨WD®Q@¬O>¯OA±OB­K@¤C<™<5•>7?6ˆ?8A7{B7uD6qE8qE8p?8q?8s>8q?8q?8q?8q?8p?8sB;qB:o@8m>6l=5j>5m>6o>7o83q73o83m82m82i81h91f:1f;2d>3d@4bB5`C5]A3\@2WB1TG4[S>f^Gi^HbX?ZS9ZS7\W:ZV;XW;kmUsw^u}fUaI&28D03;.4:04:039/39/39/28.28.17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,,1++0*+0**/)*/)+0*+0*,1++2+)3+*4,+5-+5,,6--7.-7,,6+.8-2<16A39D69D47B46A10;+2?-5B09F22=/x=/t?/sB3tD6r=5r=7t=8s>8u@:u@:t?9q?8sA:q@9q@9q@9p?8n?7o>7o>7k92m82l:3l;4l;4h<3g<3c=2c?3^>1dG9cG9T=-N9(M8'@1WQ;PN7KI0OK2]Y>ieJeaDVU7XX<]`CosZz€fdlU=I1-9#2>*4-1=)2>*9E/BN8IU?O[GVbN]hWYdTLWI/u@8s>8u>9u@:t?9o=6p>7sA:q?8p?8p?8n?7o>7m>6n=6m>6k<4l=5m>6k?6j?6gA6eA5bB5dG9[A2^G7^I8N=+F7$G8%>6!LL4GK2DG,DD*MM1\[?baC`aBYY=dgJsw^sy_X`I:D,/;%7C/6>16<26<26<25;15;15;15;15;15;15;14:04:039/39/39/27127127116016016005/05/.3-.3--2,-2,,1+,1++0*+0**1**1*)0))0))0)*1*+2*,3+.5--4,.5-07/4;39A6?F>BJ?;F8:E57B14?.3?+6B.)r>)s@+tD0vE4q?4n<3q<4tB9sA8o?5qA7xH>n>4m>4m>4k?4l=3j>3l=3j>3g?5gA6gA6gC7eC7cC6`C5^D5bK;UB1ZI7`S@RG3C;&E=(FA+AE,BH.AE*<@%?B%NN2_`AijKaaEnqTvzagmSJO94<%4=(=F38>28>48>48>47=37=37=36<28>48>47=37=37=36<26<26<25:449349349338238238227105/05//4..3--2,,1++0*+0*).().().().().(*/)+0*,1+160/4.,1+,1+/4.6;4=BK:4.8/-4--4-,3,gdUgdUheVheVheVheVifWifWifWifWifWifWifWifWifWifWkeWkeWlcZmd[md]mf\mg[jiWkmXimVjoYjs`hthm|wˆ˜˜¦³¹¿ÊÐÓÜãëðööûÿüýÿýÿþÿÿýÿþùþþöýýñúûí÷úçô÷âîóÜåíÕâèÎÛàÀ×Ú»ÖÖ¼Ù×ÂÝ×ÇÞ×ÍåÛÙìààøìðûðöÿõûÿùþÿúýÿûûÿûûÿýüÿþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüýÿüøÿþøÿþûÿþþþþÿüþÿúÿÿùÿÿøþÿúýÿùüÿùùÿýúÿÿøÿÿøûÿõüþðÿÿíÿüéÿñßÿðÝÿïÚñÒ½´z{R>tJ4uH3vI4zM8}P;yL7nA.e7'{M@sD:qB8sD:oC8g;0d8-g=1i?3i?3i?3g?3f>2f>2f>2e?2b@4bB5`C5_C5_C5[D4ZE4WD3XI6OB/\T?oiSc^HMK4IG0IK3>D*?H-@F*48>47=37=37=39?58>48>48>48>48>48>48>47<67<67<66;56;56;55:45:438238216005//4.-2,,1+,1++0*+0**/)*/)+0*,1+-2,-2,05/.3-+0*+0*-2.2718=9;B:@K=@M;@M;=J68E13@,1?(0>'4.:0,6..5.-4-gdUgdUgdUheVheVifWifWifWifWifWifWifWifWifWifWifWkeWldWlcZmd[md]mf\mg[jiWkmXinWiqZgs_drejyt…••£²·½ÈÎÒÛâêïõôùýûüÿýÿþÿÿýÿÿúÿÿøÿÿóþÿñûþë÷úåðõÞæîÖâèÌÙÜ¿ÕÕ¹ÒйÔѾÚÔÈàÙÑêàßôéíþóùÿ÷üÿûÿÿýÿÿþÿÿþüÿþúÿþúþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüýÿþúÿÿúÿÿûÿÿþþþÿýþÿüüÿûüÿûúÿúøÿù÷ÿú÷ÿýøÿÿûÿÿûýÿúýþùùôîÿþöÿýôÿüóÿûîÿ÷çûæÕéÒÀÏ´¡¶š…”uawVCjI6lI6rM;uP>mF7iB3gB2jE5nI9nJ:oK;oK;eA1cB1cB1cB1cB1cB1bC1`C3]F6\G6\G6ZG6ZG6WH5TG4RG3PH3NH2fdM~~frrZVX@JL4GM3A.:>-;>39?59?58>48>47=37=37=38>48>48>48>48>48>48>48>49>89>89>88=78=78=77<67<66;55:449338227105//4./4.-2.-2.,1-+0,+0,,1--2.-2.,1-,1-,1-,1-.210513764;4;G9=L9@O<@O:8F71?2-9-,6--4,,3+fcTfcTgdUheVheVifWjgXjgXifWifWifWifWifWifWifWifWldWldWlcZmd[md]mf\mg[jiWkmXinWiqZgs_bpcgxr‚””£²·ÀËÑÔÝäëðöõúþûüÿýÿþÿÿýÿÿúÿÿøÿÿôÿÿóÿÿïúýèò÷àçðÕâèÌ×Ú½ÑѵÍË´Î˺ÖÏÅÞ×Ñìâã÷îóÿöþÿúÿÿýÿÿþÿÿÿýþÿúþÿùþÿúþÿúþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþüþþþýþÿýþÿýþÿýÿþýÿüþÿúþÿùÿÿ÷ýýóýýõþýøþýùÿþüþþþÿýÿÿþÿþùÿÿüÿÿûüûöóÿøòÿýôÿþñÿýíÿúéÿòà÷äÓçÒ¿Ò»©¹ŸŽŸ„srb|]K}^LtUCaD2W:(Y<*[>,X=*`E2`E2`E2_F2`G3`G3`G3]H3\K7\M:\M:YL9XM9UM8RL6QL6NL5QQ9ikS|€gmqXSY?FL2>G,48>48>48>47=37=38>48>48>48>49?59?5:?9:?9:?9:?99>89>89>88=78=78=77<66;55:4493382382/40.3/-2.,1-+0,+0,+0,+0,+0,,1--10.21/32/32/32-4-3?17F3=L7@O:?N7M:MJ9BC3=@5;A7;A7;A7:@6:@6:@69?58>48>48>49?59?5:@6:@6:@6;@:;@:;@::?9:?99>89>89>8:?9:?99>89>88=78=77<67<6495273162/40-2.,1-+/.+/.,0/,0/-10.21.23.23-12+1-+9*/@-6H2;M7=O7A6>A6>A6=@7=@79?59?59?5:@6:@6:B7:B7:B7;@9;@9;@::?8:?99>79>89>7;@:;@9;@:;@9:?9:?8:?9:?98?87=94;4382160/4..3/.3/.21.21,2.,2.+2++2*,4))6%$6)=!2F+8L1;O6;M5;M5;M58J29K3;M5H&DK*FM+EL*PV4PT3KN/HK,TT8bbFccIZZ@[Y@\ZA][B][B[Y@XV=US:SQ8HF1GD1DA0A?0@>1>>2??5>@5;>59?59?59A69A48C58C58C5:B79A69@88@58?79A69@8:B7:A9:B79@8:B7;B:E=8B:8B:7A88@56>14O<>P::L6@R8EW=FY=DX=@T;5H2+<),6+,3++2*ZgM[hN\hP]iQbjSckTglXhkXghVghVifWifWkeWlfXmeZmgYmgYkhYkg[kg\jf]jf[hfZefVhiWglVfo\erajwnzŠ‰œ«²ºÈÑÐÙàáéìò÷ûøþþùþúúÿøûþóùýïøùë÷øæõôâíìØéæÓåâÏÜ×ÄÒ˹ʿ­Á´¤¹­¡¼¯¦Á¶²ËÁÀÛÐÖæßæûóþý÷ÿþûÿÿþÿþýÿüýÿüýÿüýÿþþþþþþþþþþþþþþþþþþÿþüÿþüÿþüÿþüÿýúÿüùÿüùÿýúÿýùÿþúÿþýÿýüÿüýÿýþÿþÿÿþÿÿýþýûüÿþýÿþûÿüúÿøóøíçòåÝöèßûðêÿúýÿüÿÿýþÿÿýÿÿûýÿüýÿþüýÿýþÿýþÿÿýÿÿþüÿþõÿÿîÿþèÿÿäúöÝýûâäàNj‡lRM0SN0QK+QK+UO/UO/TO1TO1SO2SO2QP4QP4QM2PO3PN5NQ6MO7JP6HM6EM5HQ6EN1BK.?I'BI(FM+JP,KQ-NR/PT1VZ7^bA_bCY\?TWWU>XV=YW>XV=XW;WV:XT9QK3OI3LG4ID1DA2B@3A?3>@5<=59?59?59A67B48C57D37D3:B79A69A68@58@59A69A6:B7:B7:B7:B7:B7;C874>63=40>-3C)9M*BY/Ga1Op;Ln;Li=Fa>BY?F;J@?I>>I9?G8>F7>D8=B;>E>9C;6@74B19I/BV3Pg=XrB^J[}JXuIMhECZ@9O:6G54E2XR6:@6:@69A67B47B46C26C2;C8:B79A69A69A69A6:B7;C8;C8:B7:B7;C8;C8=E:>F;=G<=G?>H=>I9?G8>F7>D8=B;=D=9C;6@74B19I/DX5Ri?[uEZ{FWyFTqEIdA=T:2H3/@.->+6H2@R8L_CReGSgKOcG@W=6I30:/07/-4,YgMZhN\hP^jRblTemVinZjo[mn\lm[mk\mj[nhZnhZoi]oi[liZkhYjfZieZie\ieZig[ghXghVchRajWerao|s{‹ŠŸ¦¢°¹ÁËÔÔÝäéñôòúüôúøñöðíðçèìÞâãÕÚÛÉÒÑ¿ÌɶÉıþ«¿¸¦¼³¢Ê¾®ÓŸÜÐÄæÙÑíâàöìíÿôúÿùÿÿ÷ÿÿúÿÿüÿþýÿýüÿûüþüþýþÿÿþþþþþþþþþþþþþþþþþþÿþüÿþüþýûþýûÿýúÿýúÿýúÿûøÿúöþùõÿýüÿûúýùúþúûþüýÿýþÿþÿÿýþÿüûÿýúÿüúÿøó÷ìæòåÝøêáÿôîÿúýÿüÿÿýþÿÿýÿÿûýÿúýÿþüýÿüýÿýþÿÿþÿÿÿýÿþõÿýìÿûãþúßÿüæÿÿéçâ̌ˆoRL2TO2TM0UN1TN.UO/VQ3VQ3UQ4SO2ON2NM1PL1NM1NL3KN3LN6KQ7KP9JR:LU:IR5JS6OY7SZ9T[9]c?fnG‚’c’¦sŸ±›ª’¡zˆ”pr{\\bFLP7KM5LK6KI4LJ5PK5TN8VP:WQ;VP:SN;QL9LI:IG:GE9CE:=>6:@6:@69A67B47B46C26C2;C8;C8:B79A69A6:B7;C8;C8;C8;C8;C8;C8F;=G<=G?=G<=H8>F7=E6=C7=B;:A:7A95?64B19I/BV3Ne;Uo?Tu@RtAPmAE`=9P6-C.+<*+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b/gtkmm-osx/trunk/jpeg-6b/testorig.jpg deleted file mode 100644 index 9816a0c6231a7c5eaafd445368a9eeb1cffc63df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5770 zcmbW(S5y;DmjLjD7OF@IQiAkel%{kP4J8sV5JE?av`~c5K@n7n^ePbPA&}6K-V}sT z6$Ap(MS2lLiZsRb|9yLQ&)KKly>n(BX70IXelrg!N z0e1kjG&CR@YFZEoL`O$U&&bZi$iTqJ#mdIa&dberm6sa=;TM(_;}?_`f|9_4@od6bEKn7r$5-13uU;$FH z0RQv=`2Oyb8u+gO{AU0uD5v}?P-#-n?}3J#cObo3loIJvk*M8(7l0; zqpPP6GeMf7%*-t;9UnS5ySTccef|6c0)v7>p1+8UijH|1o0^uM@hUSb8(V}c#+Q^5 zh-Gi;>KhuHnp;}mclVHb`}zk4$HvJMlb@%iXTB~iudJ@EZ)|S;*grTt`gweEdiIYC z2%!8o>+kq)*#B^`{B==KQBhKX{&4{*0{?bO7Ak51IU3g62#~!Go1lCIExUF~VQm+k zkb?0Z*a0(2&mpY%RpiG%w13I|cd%#wFWG;={@XPJV59{8y*x@5fEHkX6&-NqEJ3S? z<#s$i(D{LY#413eeOAVPAa+U0kWstlJphrN%u^#VXy|6n@KTl<_J$Q*uxOI8hlbqK zDP}!=!sKQ-&!OyG_4ppirXlO<(FiKvWV~|;@?o?ctY?&aGu)#B9wM@=mIcwLXC zX;3_2+-1L{U}YJV%VV+Ar(9mj9P+K3FD_oZ%sn9Zc?1GGNv^OIRS#2&?}_TF>e&s- zeEWVW!?2H0;x#eQl%iEN_sV_eY$03yrAB{J)^xZIVCD18ug0ZFoB38Vyi9z^i#SNJ zC+SgSIV@BD^;N;TjOtGZ3D){kqoHeKjVHA@lbgPpi(M(j8Vvd{F;j}SE=gr^WJ}BCLveC z3P&@zLLUF_Gv(C!3XdJ+j0t?C_|v$Va(nw;9`DC@bw8LY6`#POjhd~@tFq-7iz7YG zkTtU2MfEHTUq3Jg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KT#axRtFkNP|g$g@~l>Fc1e z7|)g9h?xK)by7j8gLT4cCzq1(G9n7{tn6fiS$)!fp=8WSaIn_DFUPcg1#-bO)1}Fn6j7fX51NCTRr;^`PxmHw!KtSeua$3zrJ_lWSZ( zZ#r(9f7azW1%>yP6X|s|tZt&uBT=f$qvW7YDL~Gbz(EGL@~ppxY?dq6T4Hx$C6r zd|~6eh=)dBHMp1w8s+`J;EQoP)HAL(=gsp{fd^veoliA0c91O1mvt=%D@C+S%9-Mb zx6i8$`#xmyr-OJ^Cw&v$7mh}vEm6d`R@PHKknir(w7GH{YcUR@W6&NOO-MF~dJckQu)LnE}U_{r;`I})_ z#TiaR$#`!ylhS8w4-?12_G(W-cm=K{!A9yAkxYrqFtUa5_}!M|h?dU|zm32t9{UxY zi#1;KXA>O{u0gy>9}xRbJ~H^e@^@17T~{1O(T5s)fEv8)P#;Bi(E~9^Pv8y`kebr9 zVoGXD?v2%4`dP75QJOCGYMml}U6*fkQ*K3GyRRmOZ@Ppsc6}|B>{ktPV9O|EqX#ng9Q(i%9Qn47NBI1q+ zKt&jNMeVq+VK9Cl6e5n7iA`KhB*%NV6vdi^ZHssX<@bX7Vx&)(zx{p1+rRDoonK3> zyH+rI;A7n7@n%pyBnJUycD&g#ZW|QFV59Ic5p^J!I<>uH-JJ2VYXt#?-}EOC8;|+1 zN?SCN)iCj@m~Sd^iEe``MX^QH{?-_3eMfdrKT3X~u~^Dsuv;8( e^;Dd4QS7i5y@D0wT$xcv%Tm0kNlEL^^nU=~nbB7O diff --git a/gtkmm-osx/trunk/jpeg-6b/testprog.jpg b/gtkmm-osx/trunk/jpeg-6b/testprog.jpg deleted file mode 100644 index 920fee2e32b5a8ab0af796e010ee8a1add3eee63..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5655 zcmb7{cQjmU+s0=`?^D!47`-!$(TOfvln|nKi8@;JPDG8P6J&IW9yPk?L{IeSHIir% zk>KN;^S$&#ty6@|`>s0_)UFDt%00;y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trunk/jpeg-6b/transupp.c +++ /dev/null @@ -1,928 +0,0 @@ -/* - * transupp.c - * - * Copyright (C) 1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains image transformation routines and other utility code - * used by the jpegtran sample application. These are NOT part of the core - * JPEG library. But we keep these routines separate from jpegtran.c to - * ease the task of maintaining jpegtran-like programs that have other user - * interfaces. - */ - -/* Although this file really shouldn't have access to the library internals, - * it's helpful to let it call jround_up() and jcopy_block_row(). - */ -#define JPEG_INTERNALS - -#include "jinclude.h" -#include "jpeglib.h" -#include "transupp.h" /* My own external interface */ - - -#if TRANSFORMS_SUPPORTED - -/* - * Lossless image transformation routines. These routines work on DCT - * coefficient arrays and thus do not require any lossy decompression - * or recompression of the image. - * Thanks to Guido Vollbeding for the initial design and code of this feature. - * - * Horizontal flipping is done in-place, using a single top-to-bottom - * pass through the virtual source array. It will thus be much the - * fastest option for images larger than main memory. - * - * The other routines require a set of destination virtual arrays, so they - * need twice as much memory as jpegtran normally does. The destination - * arrays are always written in normal scan order (top to bottom) because - * the virtual array manager expects this. The source arrays will be scanned - * in the corresponding order, which means multiple passes through the source - * arrays for most of the transforms. That could result in much thrashing - * if the image is larger than main memory. - * - * Some notes about the operating environment of the individual transform - * routines: - * 1. Both the source and destination virtual arrays are allocated from the - * source JPEG object, and therefore should be manipulated by calling the - * source's memory manager. - * 2. The destination's component count should be used. It may be smaller - * than the source's when forcing to grayscale. - * 3. Likewise the destination's sampling factors should be used. When - * forcing to grayscale the destination's sampling factors will be all 1, - * and we may as well take that as the effective iMCU size. - * 4. When "trim" is in effect, the destination's dimensions will be the - * trimmed values but the source's will be untrimmed. - * 5. All the routines assume that the source and destination buffers are - * padded out to a full iMCU boundary. This is true, although for the - * source buffer it is an undocumented property of jdcoefct.c. - * Notes 2,3,4 boil down to this: generally we should use the destination's - * dimensions and ignore the source's. - */ - - -LOCAL(void) -do_flip_h (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - jvirt_barray_ptr *src_coef_arrays) -/* Horizontal flip; done in-place, so no separate dest array is required */ -{ - JDIMENSION MCU_cols, comp_width, blk_x, blk_y; - int ci, k, offset_y; - JBLOCKARRAY buffer; - JCOEFPTR ptr1, ptr2; - JCOEF temp1, temp2; - jpeg_component_info *compptr; - - /* Horizontal mirroring of DCT blocks is accomplished by swapping - * pairs of blocks in-place. Within a DCT block, we perform horizontal - * mirroring by changing the signs of odd-numbered columns. - * Partial iMCUs at the right edge are left untouched. - */ - MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE); - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - comp_width = MCU_cols * compptr->h_samp_factor; - for (blk_y = 0; blk_y < compptr->height_in_blocks; - blk_y += compptr->v_samp_factor) { - buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - for (blk_x = 0; blk_x * 2 < comp_width; blk_x++) { - ptr1 = buffer[offset_y][blk_x]; - ptr2 = buffer[offset_y][comp_width - blk_x - 1]; - /* this unrolled loop doesn't need to know which row it's on... */ - for (k = 0; k < DCTSIZE2; k += 2) { - temp1 = *ptr1; /* swap even column */ - temp2 = *ptr2; - *ptr1++ = temp2; - *ptr2++ = temp1; - temp1 = *ptr1; /* swap odd column with sign change */ - temp2 = *ptr2; - *ptr1++ = -temp2; - *ptr2++ = -temp1; - } - } - } - } - } -} - - -LOCAL(void) -do_flip_v (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - jvirt_barray_ptr *src_coef_arrays, - jvirt_barray_ptr *dst_coef_arrays) -/* Vertical flip */ -{ - JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y; - int ci, i, j, offset_y; - JBLOCKARRAY src_buffer, dst_buffer; - JBLOCKROW src_row_ptr, dst_row_ptr; - JCOEFPTR src_ptr, dst_ptr; - jpeg_component_info *compptr; - - /* We output into a separate array because we can't touch different - * rows of the source virtual array simultaneously. Otherwise, this - * is a pretty straightforward analog of horizontal flip. - * Within a DCT block, vertical mirroring is done by changing the signs - * of odd-numbered rows. - * Partial iMCUs at the bottom edge are copied verbatim. - */ - MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE); - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - comp_height = MCU_rows * compptr->v_samp_factor; - for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; - dst_blk_y += compptr->v_samp_factor) { - dst_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - if (dst_blk_y < comp_height) { - /* Row is within the mirrorable area. */ - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - comp_height - dst_blk_y - (JDIMENSION) compptr->v_samp_factor, - (JDIMENSION) compptr->v_samp_factor, FALSE); - } else { - /* Bottom-edge blocks will be copied verbatim. */ - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_y, - (JDIMENSION) compptr->v_samp_factor, FALSE); - } - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - if (dst_blk_y < comp_height) { - /* Row is within the mirrorable area. */ - dst_row_ptr = dst_buffer[offset_y]; - src_row_ptr = src_buffer[compptr->v_samp_factor - offset_y - 1]; - for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; - dst_blk_x++) { - dst_ptr = dst_row_ptr[dst_blk_x]; - src_ptr = src_row_ptr[dst_blk_x]; - for (i = 0; i < DCTSIZE; i += 2) { - /* copy even row */ - for (j = 0; j < DCTSIZE; j++) - *dst_ptr++ = *src_ptr++; - /* copy odd row with sign change */ - for (j = 0; j < DCTSIZE; j++) - *dst_ptr++ = - *src_ptr++; - } - } - } else { - /* Just copy row verbatim. */ - jcopy_block_row(src_buffer[offset_y], dst_buffer[offset_y], - compptr->width_in_blocks); - } - } - } - } -} - - -LOCAL(void) -do_transpose (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - jvirt_barray_ptr *src_coef_arrays, - jvirt_barray_ptr *dst_coef_arrays) -/* Transpose source into destination */ -{ - JDIMENSION dst_blk_x, dst_blk_y; - int ci, i, j, offset_x, offset_y; - JBLOCKARRAY src_buffer, dst_buffer; - JCOEFPTR src_ptr, dst_ptr; - jpeg_component_info *compptr; - - /* Transposing pixels within a block just requires transposing the - * DCT coefficients. - * Partial iMCUs at the edges require no special treatment; we simply - * process all the available DCT blocks for every component. - */ - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; - dst_blk_y += compptr->v_samp_factor) { - dst_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; - dst_blk_x += compptr->h_samp_factor) { - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x, - (JDIMENSION) compptr->h_samp_factor, FALSE); - for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { - src_ptr = src_buffer[offset_x][dst_blk_y + offset_y]; - dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; - for (i = 0; i < DCTSIZE; i++) - for (j = 0; j < DCTSIZE; j++) - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - } - } - } - } - } -} - - -LOCAL(void) -do_rot_90 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - jvirt_barray_ptr *src_coef_arrays, - jvirt_barray_ptr *dst_coef_arrays) -/* 90 degree rotation is equivalent to - * 1. Transposing the image; - * 2. Horizontal mirroring. - * These two steps are merged into a single processing routine. - */ -{ - JDIMENSION MCU_cols, comp_width, dst_blk_x, dst_blk_y; - int ci, i, j, offset_x, offset_y; - JBLOCKARRAY src_buffer, dst_buffer; - JCOEFPTR src_ptr, dst_ptr; - jpeg_component_info *compptr; - - /* Because of the horizontal mirror step, we can't process partial iMCUs - * at the (output) right edge properly. They just get transposed and - * not mirrored. - */ - MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE); - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - comp_width = MCU_cols * compptr->h_samp_factor; - for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; - dst_blk_y += compptr->v_samp_factor) { - dst_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; - dst_blk_x += compptr->h_samp_factor) { - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x, - (JDIMENSION) compptr->h_samp_factor, FALSE); - for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { - src_ptr = src_buffer[offset_x][dst_blk_y + offset_y]; - if (dst_blk_x < comp_width) { - /* Block is within the mirrorable area. */ - dst_ptr = dst_buffer[offset_y] - [comp_width - dst_blk_x - offset_x - 1]; - for (i = 0; i < DCTSIZE; i++) { - for (j = 0; j < DCTSIZE; j++) - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - i++; - for (j = 0; j < DCTSIZE; j++) - dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; - } - } else { - /* Edge blocks are transposed but not mirrored. */ - dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; - for (i = 0; i < DCTSIZE; i++) - for (j = 0; j < DCTSIZE; j++) - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - } - } - } - } - } - } -} - - -LOCAL(void) -do_rot_270 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - jvirt_barray_ptr *src_coef_arrays, - jvirt_barray_ptr *dst_coef_arrays) -/* 270 degree rotation is equivalent to - * 1. Horizontal mirroring; - * 2. Transposing the image. - * These two steps are merged into a single processing routine. - */ -{ - JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y; - int ci, i, j, offset_x, offset_y; - JBLOCKARRAY src_buffer, dst_buffer; - JCOEFPTR src_ptr, dst_ptr; - jpeg_component_info *compptr; - - /* Because of the horizontal mirror step, we can't process partial iMCUs - * at the (output) bottom edge properly. They just get transposed and - * not mirrored. - */ - MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE); - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - comp_height = MCU_rows * compptr->v_samp_factor; - for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; - dst_blk_y += compptr->v_samp_factor) { - dst_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; - dst_blk_x += compptr->h_samp_factor) { - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x, - (JDIMENSION) compptr->h_samp_factor, FALSE); - for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { - dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; - if (dst_blk_y < comp_height) { - /* Block is within the mirrorable area. */ - src_ptr = src_buffer[offset_x] - [comp_height - dst_blk_y - offset_y - 1]; - for (i = 0; i < DCTSIZE; i++) { - for (j = 0; j < DCTSIZE; j++) { - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - j++; - dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; - } - } - } else { - /* Edge blocks are transposed but not mirrored. */ - src_ptr = src_buffer[offset_x][dst_blk_y + offset_y]; - for (i = 0; i < DCTSIZE; i++) - for (j = 0; j < DCTSIZE; j++) - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - } - } - } - } - } - } -} - - -LOCAL(void) -do_rot_180 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - jvirt_barray_ptr *src_coef_arrays, - jvirt_barray_ptr *dst_coef_arrays) -/* 180 degree rotation is equivalent to - * 1. Vertical mirroring; - * 2. Horizontal mirroring. - * These two steps are merged into a single processing routine. - */ -{ - JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, dst_blk_x, dst_blk_y; - int ci, i, j, offset_y; - JBLOCKARRAY src_buffer, dst_buffer; - JBLOCKROW src_row_ptr, dst_row_ptr; - JCOEFPTR src_ptr, dst_ptr; - jpeg_component_info *compptr; - - MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE); - MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE); - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - comp_width = MCU_cols * compptr->h_samp_factor; - comp_height = MCU_rows * compptr->v_samp_factor; - for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; - dst_blk_y += compptr->v_samp_factor) { - dst_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - if (dst_blk_y < comp_height) { - /* Row is within the vertically mirrorable area. */ - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], - comp_height - dst_blk_y - (JDIMENSION) compptr->v_samp_factor, - (JDIMENSION) compptr->v_samp_factor, FALSE); - } else { - /* Bottom-edge rows are only mirrored horizontally. */ - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_y, - (JDIMENSION) compptr->v_samp_factor, FALSE); - } - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - if (dst_blk_y < comp_height) { - /* Row is within the mirrorable area. */ - dst_row_ptr = dst_buffer[offset_y]; - src_row_ptr = src_buffer[compptr->v_samp_factor - offset_y - 1]; - /* Process the blocks that can be mirrored both ways. */ - for (dst_blk_x = 0; dst_blk_x < comp_width; dst_blk_x++) { - dst_ptr = dst_row_ptr[dst_blk_x]; - src_ptr = src_row_ptr[comp_width - dst_blk_x - 1]; - for (i = 0; i < DCTSIZE; i += 2) { - /* For even row, negate every odd column. */ - for (j = 0; j < DCTSIZE; j += 2) { - *dst_ptr++ = *src_ptr++; - *dst_ptr++ = - *src_ptr++; - } - /* For odd row, negate every even column. */ - for (j = 0; j < DCTSIZE; j += 2) { - *dst_ptr++ = - *src_ptr++; - *dst_ptr++ = *src_ptr++; - } - } - } - /* Any remaining right-edge blocks are only mirrored vertically. */ - for (; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { - dst_ptr = dst_row_ptr[dst_blk_x]; - src_ptr = src_row_ptr[dst_blk_x]; - for (i = 0; i < DCTSIZE; i += 2) { - for (j = 0; j < DCTSIZE; j++) - *dst_ptr++ = *src_ptr++; - for (j = 0; j < DCTSIZE; j++) - *dst_ptr++ = - *src_ptr++; - } - } - } else { - /* Remaining rows are just mirrored horizontally. */ - dst_row_ptr = dst_buffer[offset_y]; - src_row_ptr = src_buffer[offset_y]; - /* Process the blocks that can be mirrored. */ - for (dst_blk_x = 0; dst_blk_x < comp_width; dst_blk_x++) { - dst_ptr = dst_row_ptr[dst_blk_x]; - src_ptr = src_row_ptr[comp_width - dst_blk_x - 1]; - for (i = 0; i < DCTSIZE2; i += 2) { - *dst_ptr++ = *src_ptr++; - *dst_ptr++ = - *src_ptr++; - } - } - /* Any remaining right-edge blocks are only copied. */ - for (; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { - dst_ptr = dst_row_ptr[dst_blk_x]; - src_ptr = src_row_ptr[dst_blk_x]; - for (i = 0; i < DCTSIZE2; i++) - *dst_ptr++ = *src_ptr++; - } - } - } - } - } -} - - -LOCAL(void) -do_transverse (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - jvirt_barray_ptr *src_coef_arrays, - jvirt_barray_ptr *dst_coef_arrays) -/* Transverse transpose is equivalent to - * 1. 180 degree rotation; - * 2. Transposition; - * or - * 1. Horizontal mirroring; - * 2. Transposition; - * 3. Horizontal mirroring. - * These steps are merged into a single processing routine. - */ -{ - JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, dst_blk_x, dst_blk_y; - int ci, i, j, offset_x, offset_y; - JBLOCKARRAY src_buffer, dst_buffer; - JCOEFPTR src_ptr, dst_ptr; - jpeg_component_info *compptr; - - MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE); - MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE); - - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - comp_width = MCU_cols * compptr->h_samp_factor; - comp_height = MCU_rows * compptr->v_samp_factor; - for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; - dst_blk_y += compptr->v_samp_factor) { - dst_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, - (JDIMENSION) compptr->v_samp_factor, TRUE); - for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { - for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; - dst_blk_x += compptr->h_samp_factor) { - src_buffer = (*srcinfo->mem->access_virt_barray) - ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x, - (JDIMENSION) compptr->h_samp_factor, FALSE); - for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { - if (dst_blk_y < comp_height) { - src_ptr = src_buffer[offset_x] - [comp_height - dst_blk_y - offset_y - 1]; - if (dst_blk_x < comp_width) { - /* Block is within the mirrorable area. */ - dst_ptr = dst_buffer[offset_y] - [comp_width - dst_blk_x - offset_x - 1]; - for (i = 0; i < DCTSIZE; i++) { - for (j = 0; j < DCTSIZE; j++) { - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - j++; - dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; - } - i++; - for (j = 0; j < DCTSIZE; j++) { - dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; - j++; - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - } - } - } else { - /* Right-edge blocks are mirrored in y only */ - dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; - for (i = 0; i < DCTSIZE; i++) { - for (j = 0; j < DCTSIZE; j++) { - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - j++; - dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; - } - } - } - } else { - src_ptr = src_buffer[offset_x][dst_blk_y + offset_y]; - if (dst_blk_x < comp_width) { - /* Bottom-edge blocks are mirrored in x only */ - dst_ptr = dst_buffer[offset_y] - [comp_width - dst_blk_x - offset_x - 1]; - for (i = 0; i < DCTSIZE; i++) { - for (j = 0; j < DCTSIZE; j++) - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - i++; - for (j = 0; j < DCTSIZE; j++) - dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; - } - } else { - /* At lower right corner, just transpose, no mirroring */ - dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; - for (i = 0; i < DCTSIZE; i++) - for (j = 0; j < DCTSIZE; j++) - dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; - } - } - } - } - } - } - } -} - - -/* Request any required workspace. - * - * We allocate the workspace virtual arrays from the source decompression - * object, so that all the arrays (both the original data and the workspace) - * will be taken into account while making memory management decisions. - * Hence, this routine must be called after jpeg_read_header (which reads - * the image dimensions) and before jpeg_read_coefficients (which realizes - * the source's virtual arrays). - */ - -GLOBAL(void) -jtransform_request_workspace (j_decompress_ptr srcinfo, - jpeg_transform_info *info) -{ - jvirt_barray_ptr *coef_arrays = NULL; - jpeg_component_info *compptr; - int ci; - - if (info->force_grayscale && - srcinfo->jpeg_color_space == JCS_YCbCr && - srcinfo->num_components == 3) { - /* We'll only process the first component */ - info->num_components = 1; - } else { - /* Process all the components */ - info->num_components = srcinfo->num_components; - } - - switch (info->transform) { - case JXFORM_NONE: - case JXFORM_FLIP_H: - /* Don't need a workspace array */ - break; - case JXFORM_FLIP_V: - case JXFORM_ROT_180: - /* Need workspace arrays having same dimensions as source image. - * Note that we allocate arrays padded out to the next iMCU boundary, - * so that transform routines need not worry about missing edge blocks. - */ - coef_arrays = (jvirt_barray_ptr *) - (*srcinfo->mem->alloc_small) ((j_common_ptr) srcinfo, JPOOL_IMAGE, - SIZEOF(jvirt_barray_ptr) * info->num_components); - for (ci = 0; ci < info->num_components; ci++) { - compptr = srcinfo->comp_info + ci; - coef_arrays[ci] = (*srcinfo->mem->request_virt_barray) - ((j_common_ptr) srcinfo, JPOOL_IMAGE, FALSE, - (JDIMENSION) jround_up((long) compptr->width_in_blocks, - (long) compptr->h_samp_factor), - (JDIMENSION) jround_up((long) compptr->height_in_blocks, - (long) compptr->v_samp_factor), - (JDIMENSION) compptr->v_samp_factor); - } - break; - case JXFORM_TRANSPOSE: - case JXFORM_TRANSVERSE: - case JXFORM_ROT_90: - case JXFORM_ROT_270: - /* Need workspace arrays having transposed dimensions. - * Note that we allocate arrays padded out to the next iMCU boundary, - * so that transform routines need not worry about missing edge blocks. - */ - coef_arrays = (jvirt_barray_ptr *) - (*srcinfo->mem->alloc_small) ((j_common_ptr) srcinfo, JPOOL_IMAGE, - SIZEOF(jvirt_barray_ptr) * info->num_components); - for (ci = 0; ci < info->num_components; ci++) { - compptr = srcinfo->comp_info + ci; - coef_arrays[ci] = (*srcinfo->mem->request_virt_barray) - ((j_common_ptr) srcinfo, JPOOL_IMAGE, FALSE, - (JDIMENSION) jround_up((long) compptr->height_in_blocks, - (long) compptr->v_samp_factor), - (JDIMENSION) jround_up((long) compptr->width_in_blocks, - (long) compptr->h_samp_factor), - (JDIMENSION) compptr->h_samp_factor); - } - break; - } - info->workspace_coef_arrays = coef_arrays; -} - - -/* Transpose destination image parameters */ - -LOCAL(void) -transpose_critical_parameters (j_compress_ptr dstinfo) -{ - int tblno, i, j, ci, itemp; - jpeg_component_info *compptr; - JQUANT_TBL *qtblptr; - JDIMENSION dtemp; - UINT16 qtemp; - - /* Transpose basic image dimensions */ - dtemp = dstinfo->image_width; - dstinfo->image_width = dstinfo->image_height; - dstinfo->image_height = dtemp; - - /* Transpose sampling factors */ - for (ci = 0; ci < dstinfo->num_components; ci++) { - compptr = dstinfo->comp_info + ci; - itemp = compptr->h_samp_factor; - compptr->h_samp_factor = compptr->v_samp_factor; - compptr->v_samp_factor = itemp; - } - - /* Transpose quantization tables */ - for (tblno = 0; tblno < NUM_QUANT_TBLS; tblno++) { - qtblptr = dstinfo->quant_tbl_ptrs[tblno]; - if (qtblptr != NULL) { - for (i = 0; i < DCTSIZE; i++) { - for (j = 0; j < i; j++) { - qtemp = qtblptr->quantval[i*DCTSIZE+j]; - qtblptr->quantval[i*DCTSIZE+j] = qtblptr->quantval[j*DCTSIZE+i]; - qtblptr->quantval[j*DCTSIZE+i] = qtemp; - } - } - } - } -} - - -/* Trim off any partial iMCUs on the indicated destination edge */ - -LOCAL(void) -trim_right_edge (j_compress_ptr dstinfo) -{ - int ci, max_h_samp_factor; - JDIMENSION MCU_cols; - - /* We have to compute max_h_samp_factor ourselves, - * because it hasn't been set yet in the destination - * (and we don't want to use the source's value). - */ - max_h_samp_factor = 1; - for (ci = 0; ci < dstinfo->num_components; ci++) { - int h_samp_factor = dstinfo->comp_info[ci].h_samp_factor; - max_h_samp_factor = MAX(max_h_samp_factor, h_samp_factor); - } - MCU_cols = dstinfo->image_width / (max_h_samp_factor * DCTSIZE); - if (MCU_cols > 0) /* can't trim to 0 pixels */ - dstinfo->image_width = MCU_cols * (max_h_samp_factor * DCTSIZE); -} - -LOCAL(void) -trim_bottom_edge (j_compress_ptr dstinfo) -{ - int ci, max_v_samp_factor; - JDIMENSION MCU_rows; - - /* We have to compute max_v_samp_factor ourselves, - * because it hasn't been set yet in the destination - * (and we don't want to use the source's value). - */ - max_v_samp_factor = 1; - for (ci = 0; ci < dstinfo->num_components; ci++) { - int v_samp_factor = dstinfo->comp_info[ci].v_samp_factor; - max_v_samp_factor = MAX(max_v_samp_factor, v_samp_factor); - } - MCU_rows = dstinfo->image_height / (max_v_samp_factor * DCTSIZE); - if (MCU_rows > 0) /* can't trim to 0 pixels */ - dstinfo->image_height = MCU_rows * (max_v_samp_factor * DCTSIZE); -} - - -/* Adjust output image parameters as needed. - * - * This must be called after jpeg_copy_critical_parameters() - * and before jpeg_write_coefficients(). - * - * The return value is the set of virtual coefficient arrays to be written - * (either the ones allocated by jtransform_request_workspace, or the - * original source data arrays). The caller will need to pass this value - * to jpeg_write_coefficients(). - */ - -GLOBAL(jvirt_barray_ptr *) -jtransform_adjust_parameters (j_decompress_ptr srcinfo, - j_compress_ptr dstinfo, - jvirt_barray_ptr *src_coef_arrays, - jpeg_transform_info *info) -{ - /* If force-to-grayscale is requested, adjust destination parameters */ - if (info->force_grayscale) { - /* We use jpeg_set_colorspace to make sure subsidiary settings get fixed - * properly. Among other things, the target h_samp_factor & v_samp_factor - * will get set to 1, which typically won't match the source. - * In fact we do this even if the source is already grayscale; that - * provides an easy way of coercing a grayscale JPEG with funny sampling - * factors to the customary 1,1. (Some decoders fail on other factors.) - */ - if ((dstinfo->jpeg_color_space == JCS_YCbCr && - dstinfo->num_components == 3) || - (dstinfo->jpeg_color_space == JCS_GRAYSCALE && - dstinfo->num_components == 1)) { - /* We have to preserve the source's quantization table number. */ - int sv_quant_tbl_no = dstinfo->comp_info[0].quant_tbl_no; - jpeg_set_colorspace(dstinfo, JCS_GRAYSCALE); - dstinfo->comp_info[0].quant_tbl_no = sv_quant_tbl_no; - } else { - /* Sorry, can't do it */ - ERREXIT(dstinfo, JERR_CONVERSION_NOTIMPL); - } - } - - /* Correct the destination's image dimensions etc if necessary */ - switch (info->transform) { - case JXFORM_NONE: - /* Nothing to do */ - break; - case JXFORM_FLIP_H: - if (info->trim) - trim_right_edge(dstinfo); - break; - case JXFORM_FLIP_V: - if (info->trim) - trim_bottom_edge(dstinfo); - break; - case JXFORM_TRANSPOSE: - transpose_critical_parameters(dstinfo); - /* transpose does NOT have to trim anything */ - break; - case JXFORM_TRANSVERSE: - transpose_critical_parameters(dstinfo); - if (info->trim) { - trim_right_edge(dstinfo); - trim_bottom_edge(dstinfo); - } - break; - case JXFORM_ROT_90: - transpose_critical_parameters(dstinfo); - if (info->trim) - trim_right_edge(dstinfo); - break; - case JXFORM_ROT_180: - if (info->trim) { - trim_right_edge(dstinfo); - trim_bottom_edge(dstinfo); - } - break; - case JXFORM_ROT_270: - transpose_critical_parameters(dstinfo); - if (info->trim) - trim_bottom_edge(dstinfo); - break; - } - - /* Return the appropriate output data set */ - if (info->workspace_coef_arrays != NULL) - return info->workspace_coef_arrays; - return src_coef_arrays; -} - - -/* Execute the actual transformation, if any. - * - * This must be called *after* jpeg_write_coefficients, because it depends - * on jpeg_write_coefficients to have computed subsidiary values such as - * the per-component width and height fields in the destination object. - * - * Note that some transformations will modify the source data arrays! - */ - -GLOBAL(void) -jtransform_execute_transformation (j_decompress_ptr srcinfo, - j_compress_ptr dstinfo, - jvirt_barray_ptr *src_coef_arrays, - jpeg_transform_info *info) -{ - jvirt_barray_ptr *dst_coef_arrays = info->workspace_coef_arrays; - - switch (info->transform) { - case JXFORM_NONE: - break; - case JXFORM_FLIP_H: - do_flip_h(srcinfo, dstinfo, src_coef_arrays); - break; - case JXFORM_FLIP_V: - do_flip_v(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays); - break; - case JXFORM_TRANSPOSE: - do_transpose(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays); - break; - case JXFORM_TRANSVERSE: - do_transverse(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays); - break; - case JXFORM_ROT_90: - do_rot_90(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays); - break; - case JXFORM_ROT_180: - do_rot_180(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays); - break; - case JXFORM_ROT_270: - do_rot_270(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays); - break; - } -} - -#endif /* TRANSFORMS_SUPPORTED */ - - -/* Setup decompression object to save desired markers in memory. - * This must be called before jpeg_read_header() to have the desired effect. - */ - -GLOBAL(void) -jcopy_markers_setup (j_decompress_ptr srcinfo, JCOPY_OPTION option) -{ -#ifdef SAVE_MARKERS_SUPPORTED - int m; - - /* Save comments except under NONE option */ - if (option != JCOPYOPT_NONE) { - jpeg_save_markers(srcinfo, JPEG_COM, 0xFFFF); - } - /* Save all types of APPn markers iff ALL option */ - if (option == JCOPYOPT_ALL) { - for (m = 0; m < 16; m++) - jpeg_save_markers(srcinfo, JPEG_APP0 + m, 0xFFFF); - } -#endif /* SAVE_MARKERS_SUPPORTED */ -} - -/* Copy markers saved in the given source object to the destination object. - * This should be called just after jpeg_start_compress() or - * jpeg_write_coefficients(). - * Note that those routines will have written the SOI, and also the - * JFIF APP0 or Adobe APP14 markers if selected. - */ - -GLOBAL(void) -jcopy_markers_execute (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JCOPY_OPTION option) -{ - jpeg_saved_marker_ptr marker; - - /* In the current implementation, we don't actually need to examine the - * option flag here; we just copy everything that got saved. - * But to avoid confusion, we do not output JFIF and Adobe APP14 markers - * if the encoder library already wrote one. - */ - for (marker = srcinfo->marker_list; marker != NULL; marker = marker->next) { - if (dstinfo->write_JFIF_header && - marker->marker == JPEG_APP0 && - marker->data_length >= 5 && - GETJOCTET(marker->data[0]) == 0x4A && - GETJOCTET(marker->data[1]) == 0x46 && - GETJOCTET(marker->data[2]) == 0x49 && - GETJOCTET(marker->data[3]) == 0x46 && - GETJOCTET(marker->data[4]) == 0) - continue; /* reject duplicate JFIF */ - if (dstinfo->write_Adobe_marker && - marker->marker == JPEG_APP0+14 && - marker->data_length >= 5 && - GETJOCTET(marker->data[0]) == 0x41 && - GETJOCTET(marker->data[1]) == 0x64 && - GETJOCTET(marker->data[2]) == 0x6F && - GETJOCTET(marker->data[3]) == 0x62 && - GETJOCTET(marker->data[4]) == 0x65) - continue; /* reject duplicate Adobe */ -#ifdef NEED_FAR_POINTERS - /* We could use jpeg_write_marker if the data weren't FAR... */ - { - unsigned int i; - jpeg_write_m_header(dstinfo, marker->marker, marker->data_length); - for (i = 0; i < marker->data_length; i++) - jpeg_write_m_byte(dstinfo, marker->data[i]); - } -#else - jpeg_write_marker(dstinfo, marker->marker, - marker->data, marker->data_length); -#endif - } -} diff --git a/gtkmm-osx/trunk/jpeg-6b/transupp.h b/gtkmm-osx/trunk/jpeg-6b/transupp.h deleted file mode 100644 index 5c2d32a..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/transupp.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - * transupp.h - * - * Copyright (C) 1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains declarations for image transformation routines and - * other utility code used by the jpegtran sample application. These are - * NOT part of the core JPEG library. But we keep these routines separate - * from jpegtran.c to ease the task of maintaining jpegtran-like programs - * that have other user interfaces. - * - * NOTE: all the routines declared here have very specific requirements - * about when they are to be executed during the reading and writing of the - * source and destination files. See the comments in transupp.c, or see - * jpegtran.c for an example of correct usage. - */ - -/* If you happen not to want the image transform support, disable it here */ -#ifndef TRANSFORMS_SUPPORTED -#define TRANSFORMS_SUPPORTED 1 /* 0 disables transform code */ -#endif - -/* Short forms of external names for systems with brain-damaged linkers. */ - -#ifdef NEED_SHORT_EXTERNAL_NAMES -#define jtransform_request_workspace jTrRequest -#define jtransform_adjust_parameters jTrAdjust -#define jtransform_execute_transformation jTrExec -#define jcopy_markers_setup jCMrkSetup -#define jcopy_markers_execute jCMrkExec -#endif /* NEED_SHORT_EXTERNAL_NAMES */ - - -/* - * Codes for supported types of image transformations. - */ - -typedef enum { - JXFORM_NONE, /* no transformation */ - JXFORM_FLIP_H, /* horizontal flip */ - JXFORM_FLIP_V, /* vertical flip */ - JXFORM_TRANSPOSE, /* transpose across UL-to-LR axis */ - JXFORM_TRANSVERSE, /* transpose across UR-to-LL axis */ - JXFORM_ROT_90, /* 90-degree clockwise rotation */ - JXFORM_ROT_180, /* 180-degree rotation */ - JXFORM_ROT_270 /* 270-degree clockwise (or 90 ccw) */ -} JXFORM_CODE; - -/* - * Although rotating and flipping data expressed as DCT coefficients is not - * hard, there is an asymmetry in the JPEG format specification for images - * whose dimensions aren't multiples of the iMCU size. The right and bottom - * image edges are padded out to the next iMCU boundary with junk data; but - * no padding is possible at the top and left edges. If we were to flip - * the whole image including the pad data, then pad garbage would become - * visible at the top and/or left, and real pixels would disappear into the - * pad margins --- perhaps permanently, since encoders & decoders may not - * bother to preserve DCT blocks that appear to be completely outside the - * nominal image area. So, we have to exclude any partial iMCUs from the - * basic transformation. - * - * Transpose is the only transformation that can handle partial iMCUs at the - * right and bottom edges completely cleanly. flip_h can flip partial iMCUs - * at the bottom, but leaves any partial iMCUs at the right edge untouched. - * Similarly flip_v leaves any partial iMCUs at the bottom edge untouched. - * The other transforms are defined as combinations of these basic transforms - * and process edge blocks in a way that preserves the equivalence. - * - * The "trim" option causes untransformable partial iMCUs to be dropped; - * this is not strictly lossless, but it usually gives the best-looking - * result for odd-size images. Note that when this option is active, - * the expected mathematical equivalences between the transforms may not hold. - * (For example, -rot 270 -trim trims only the bottom edge, but -rot 90 -trim - * followed by -rot 180 -trim trims both edges.) - * - * We also offer a "force to grayscale" option, which simply discards the - * chrominance channels of a YCbCr image. This is lossless in the sense that - * the luminance channel is preserved exactly. It's not the same kind of - * thing as the rotate/flip transformations, but it's convenient to handle it - * as part of this package, mainly because the transformation routines have to - * be aware of the option to know how many components to work on. - */ - -typedef struct { - /* Options: set by caller */ - JXFORM_CODE transform; /* image transform operator */ - boolean trim; /* if TRUE, trim partial MCUs as needed */ - boolean force_grayscale; /* if TRUE, convert color image to grayscale */ - - /* Internal workspace: caller should not touch these */ - int num_components; /* # of components in workspace */ - jvirt_barray_ptr * workspace_coef_arrays; /* workspace for transformations */ -} jpeg_transform_info; - - -#if TRANSFORMS_SUPPORTED - -/* Request any required workspace */ -EXTERN(void) jtransform_request_workspace - JPP((j_decompress_ptr srcinfo, jpeg_transform_info *info)); -/* Adjust output image parameters */ -EXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters - JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - jvirt_barray_ptr *src_coef_arrays, - jpeg_transform_info *info)); -/* Execute the actual transformation, if any */ -EXTERN(void) jtransform_execute_transformation - JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - jvirt_barray_ptr *src_coef_arrays, - jpeg_transform_info *info)); - -#endif /* TRANSFORMS_SUPPORTED */ - - -/* - * Support for copying optional markers from source to destination file. - */ - -typedef enum { - JCOPYOPT_NONE, /* copy no optional markers */ - JCOPYOPT_COMMENTS, /* copy only comment (COM) markers */ - JCOPYOPT_ALL /* copy all optional markers */ -} JCOPY_OPTION; - -#define JCOPYOPT_DEFAULT JCOPYOPT_COMMENTS /* recommended default */ - -/* Setup decompression object to save desired markers in memory */ -EXTERN(void) jcopy_markers_setup - JPP((j_decompress_ptr srcinfo, JCOPY_OPTION option)); -/* Copy markers saved in the given source object to the destination object */ -EXTERN(void) jcopy_markers_execute - JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, - JCOPY_OPTION option)); diff --git a/gtkmm-osx/trunk/jpeg-6b/usage.doc b/gtkmm-osx/trunk/jpeg-6b/usage.doc deleted file mode 100644 index 8c4970a..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/usage.doc +++ /dev/null @@ -1,562 +0,0 @@ -USAGE instructions for the Independent JPEG Group's JPEG software -================================================================= - -This file describes usage of the JPEG conversion programs cjpeg and djpeg, -as well as the utility programs jpegtran, rdjpgcom and wrjpgcom. (See -the other documentation files if you wish to use the JPEG library within -your own programs.) - -If you are on a Unix machine you may prefer to read the Unix-style manual -pages in files cjpeg.1, djpeg.1, jpegtran.1, rdjpgcom.1, wrjpgcom.1. - - -INTRODUCTION - -These programs implement JPEG image compression and decompression. JPEG -(pronounced "jay-peg") is a standardized compression method for full-color -and gray-scale images. JPEG is designed to handle "real-world" scenes, -for example scanned photographs. Cartoons, line drawings, and other -non-realistic images are not JPEG's strong suit; on that sort of material -you may get poor image quality and/or little compression. - -JPEG is lossy, meaning that the output image is not necessarily identical to -the input image. Hence you should not use JPEG if you have to have identical -output bits. However, on typical real-world images, very good compression -levels can be obtained with no visible change, and amazingly high compression -is possible if you can tolerate a low-quality image. You can trade off image -quality against file size by adjusting the compressor's "quality" setting. - - -GENERAL USAGE - -We provide two programs, cjpeg to compress an image file into JPEG format, -and djpeg to decompress a JPEG file back into a conventional image format. - -On Unix-like systems, you say: - cjpeg [switches] [imagefile] >jpegfile -or - djpeg [switches] [jpegfile] >imagefile -The programs read the specified input file, or standard input if none is -named. They always write to standard output (with trace/error messages to -standard error). These conventions are handy for piping images between -programs. - -On most non-Unix systems, you say: - cjpeg [switches] imagefile jpegfile -or - djpeg [switches] jpegfile imagefile -i.e., both the input and output files are named on the command line. This -style is a little more foolproof, and it loses no functionality if you don't -have pipes. (You can get this style on Unix too, if you prefer, by defining -TWO_FILE_COMMANDLINE when you compile the programs; see install.doc.) - -You can also say: - cjpeg [switches] -outfile jpegfile imagefile -or - djpeg [switches] -outfile imagefile jpegfile -This syntax works on all systems, so it is useful for scripts. - -The currently supported image file formats are: PPM (PBMPLUS color format), -PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster Toolkit -format). (RLE is supported only if the URT library is available.) -cjpeg recognizes the input image format automatically, with the exception -of some Targa-format files. You have to tell djpeg which format to generate. - -JPEG files are in the defacto standard JFIF file format. There are other, -less widely used JPEG-based file formats, but we don't support them. - -All switch names may be abbreviated; for example, -grayscale may be written --gray or -gr. Most of the "basic" switches can be abbreviated to as little as -one letter. Upper and lower case are equivalent (-BMP is the same as -bmp). -British spellings are also accepted (e.g., -greyscale), though for brevity -these are not mentioned below. - - -CJPEG DETAILS - -The basic command line switches for cjpeg are: - - -quality N Scale quantization tables to adjust image quality. - Quality is 0 (worst) to 100 (best); default is 75. - (See below for more info.) - - -grayscale Create monochrome JPEG file from color input. - Be sure to use this switch when compressing a grayscale - BMP file, because cjpeg isn't bright enough to notice - whether a BMP file uses only shades of gray. By - saying -grayscale, you'll get a smaller JPEG file that - takes less time to process. - - -optimize Perform optimization of entropy encoding parameters. - Without this, default encoding parameters are used. - -optimize usually makes the JPEG file a little smaller, - but cjpeg runs somewhat slower and needs much more - memory. Image quality and speed of decompression are - unaffected by -optimize. - - -progressive Create progressive JPEG file (see below). - - -targa Input file is Targa format. Targa files that contain - an "identification" field will not be automatically - recognized by cjpeg; for such files you must specify - -targa to make cjpeg treat the input as Targa format. - For most Targa files, you won't need this switch. - -The -quality switch lets you trade off compressed file size against quality of -the reconstructed image: the higher the quality setting, the larger the JPEG -file, and the closer the output image will be to the original input. Normally -you want to use the lowest quality setting (smallest file) that decompresses -into something visually indistinguishable from the original image. For this -purpose the quality setting should be between 50 and 95; the default of 75 is -often about right. If you see defects at -quality 75, then go up 5 or 10 -counts at a time until you are happy with the output image. (The optimal -setting will vary from one image to another.) - --quality 100 will generate a quantization table of all 1's, minimizing loss -in the quantization step (but there is still information loss in subsampling, -as well as roundoff error). This setting is mainly of interest for -experimental purposes. Quality values above about 95 are NOT recommended for -normal use; the compressed file size goes up dramatically for hardly any gain -in output image quality. - -In the other direction, quality values below 50 will produce very small files -of low image quality. Settings around 5 to 10 might be useful in preparing an -index of a large image library, for example. Try -quality 2 (or so) for some -amusing Cubist effects. (Note: quality values below about 25 generate 2-byte -quantization tables, which are considered optional in the JPEG standard. -cjpeg emits a warning message when you give such a quality value, because some -other JPEG programs may be unable to decode the resulting file. Use -baseline -if you need to ensure compatibility at low quality values.) - -The -progressive switch creates a "progressive JPEG" file. In this type of -JPEG file, the data is stored in multiple scans of increasing quality. If the -file is being transmitted over a slow communications link, the decoder can use -the first scan to display a low-quality image very quickly, and can then -improve the display with each subsequent scan. The final image is exactly -equivalent to a standard JPEG file of the same quality setting, and the total -file size is about the same --- often a little smaller. CAUTION: progressive -JPEG is not yet widely implemented, so many decoders will be unable to view a -progressive JPEG file at all. - -Switches for advanced users: - - -dct int Use integer DCT method (default). - -dct fast Use fast integer DCT (less accurate). - -dct float Use floating-point DCT method. - The float method is very slightly more accurate than - the int method, but is much slower unless your machine - has very fast floating-point hardware. Also note that - results of the floating-point method may vary slightly - across machines, while the integer methods should give - the same results everywhere. The fast integer method - is much less accurate than the other two. - - -restart N Emit a JPEG restart marker every N MCU rows, or every - N MCU blocks if "B" is attached to the number. - -restart 0 (the default) means no restart markers. - - -smooth N Smooth the input image to eliminate dithering noise. - N, ranging from 1 to 100, indicates the strength of - smoothing. 0 (the default) means no smoothing. - - -maxmemory N Set limit for amount of memory to use in processing - large images. Value is in thousands of bytes, or - millions of bytes if "M" is attached to the number. - For example, -max 4m selects 4000000 bytes. If more - space is needed, temporary files will be used. - - -verbose Enable debug printout. More -v's give more printout. - or -debug Also, version information is printed at startup. - -The -restart option inserts extra markers that allow a JPEG decoder to -resynchronize after a transmission error. Without restart markers, any damage -to a compressed file will usually ruin the image from the point of the error -to the end of the image; with restart markers, the damage is usually confined -to the portion of the image up to the next restart marker. Of course, the -restart markers occupy extra space. We recommend -restart 1 for images that -will be transmitted across unreliable networks such as Usenet. - -The -smooth option filters the input to eliminate fine-scale noise. This is -often useful when converting dithered images to JPEG: a moderate smoothing -factor of 10 to 50 gets rid of dithering patterns in the input file, resulting -in a smaller JPEG file and a better-looking image. Too large a smoothing -factor will visibly blur the image, however. - -Switches for wizards: - - -baseline Force baseline-compatible quantization tables to be - generated. This clamps quantization values to 8 bits - even at low quality settings. (This switch is poorly - named, since it does not ensure that the output is - actually baseline JPEG. For example, you can use - -baseline and -progressive together.) - - -qtables file Use the quantization tables given in the specified - text file. - - -qslots N[,...] Select which quantization table to use for each color - component. - - -sample HxV[,...] Set JPEG sampling factors for each color component. - - -scans file Use the scan script given in the specified text file. - -The "wizard" switches are intended for experimentation with JPEG. If you -don't know what you are doing, DON'T USE THEM. These switches are documented -further in the file wizard.doc. - - -DJPEG DETAILS - -The basic command line switches for djpeg are: - - -colors N Reduce image to at most N colors. This reduces the - or -quantize N number of colors used in the output image, so that it - can be displayed on a colormapped display or stored in - a colormapped file format. For example, if you have - an 8-bit display, you'd need to reduce to 256 or fewer - colors. (-colors is the recommended name, -quantize - is provided only for backwards compatibility.) - - -fast Select recommended processing options for fast, low - quality output. (The default options are chosen for - highest quality output.) Currently, this is equivalent - to "-dct fast -nosmooth -onepass -dither ordered". - - -grayscale Force gray-scale output even if JPEG file is color. - Useful for viewing on monochrome displays; also, - djpeg runs noticeably faster in this mode. - - -scale M/N Scale the output image by a factor M/N. Currently - the scale factor must be 1/1, 1/2, 1/4, or 1/8. - Scaling is handy if the image is larger than your - screen; also, djpeg runs much faster when scaling - down the output. - - -bmp Select BMP output format (Windows flavor). 8-bit - colormapped format is emitted if -colors or -grayscale - is specified, or if the JPEG file is gray-scale; - otherwise, 24-bit full-color format is emitted. - - -gif Select GIF output format. Since GIF does not support - more than 256 colors, -colors 256 is assumed (unless - you specify a smaller number of colors). If you - specify -fast, the default number of colors is 216. - - -os2 Select BMP output format (OS/2 1.x flavor). 8-bit - colormapped format is emitted if -colors or -grayscale - is specified, or if the JPEG file is gray-scale; - otherwise, 24-bit full-color format is emitted. - - -pnm Select PBMPLUS (PPM/PGM) output format (this is the - default format). PGM is emitted if the JPEG file is - gray-scale or if -grayscale is specified; otherwise - PPM is emitted. - - -rle Select RLE output format. (Requires URT library.) - - -targa Select Targa output format. Gray-scale format is - emitted if the JPEG file is gray-scale or if - -grayscale is specified; otherwise, colormapped format - is emitted if -colors is specified; otherwise, 24-bit - full-color format is emitted. - -Switches for advanced users: - - -dct int Use integer DCT method (default). - -dct fast Use fast integer DCT (less accurate). - -dct float Use floating-point DCT method. - The float method is very slightly more accurate than - the int method, but is much slower unless your machine - has very fast floating-point hardware. Also note that - results of the floating-point method may vary slightly - across machines, while the integer methods should give - the same results everywhere. The fast integer method - is much less accurate than the other two. - - -dither fs Use Floyd-Steinberg dithering in color quantization. - -dither ordered Use ordered dithering in color quantization. - -dither none Do not use dithering in color quantization. - By default, Floyd-Steinberg dithering is applied when - quantizing colors; this is slow but usually produces - the best results. Ordered dither is a compromise - between speed and quality; no dithering is fast but - usually looks awful. Note that these switches have - no effect unless color quantization is being done. - Ordered dither is only available in -onepass mode. - - -map FILE Quantize to the colors used in the specified image - file. This is useful for producing multiple files - with identical color maps, or for forcing a predefined - set of colors to be used. The FILE must be a GIF - or PPM file. This option overrides -colors and - -onepass. - - -nosmooth Use a faster, lower-quality upsampling routine. - - -onepass Use one-pass instead of two-pass color quantization. - The one-pass method is faster and needs less memory, - but it produces a lower-quality image. -onepass is - ignored unless you also say -colors N. Also, - the one-pass method is always used for gray-scale - output (the two-pass method is no improvement then). - - -maxmemory N Set limit for amount of memory to use in processing - large images. Value is in thousands of bytes, or - millions of bytes if "M" is attached to the number. - For example, -max 4m selects 4000000 bytes. If more - space is needed, temporary files will be used. - - -verbose Enable debug printout. More -v's give more printout. - or -debug Also, version information is printed at startup. - - -HINTS FOR CJPEG - -Color GIF files are not the ideal input for JPEG; JPEG is really intended for -compressing full-color (24-bit) images. In particular, don't try to convert -cartoons, line drawings, and other images that have only a few distinct -colors. GIF works great on these, JPEG does not. If you want to convert a -GIF to JPEG, you should experiment with cjpeg's -quality and -smooth options -to get a satisfactory conversion. -smooth 10 or so is often helpful. - -Avoid running an image through a series of JPEG compression/decompression -cycles. Image quality loss will accumulate; after ten or so cycles the image -may be noticeably worse than it was after one cycle. It's best to use a -lossless format while manipulating an image, then convert to JPEG format when -you are ready to file the image away. - -The -optimize option to cjpeg is worth using when you are making a "final" -version for posting or archiving. It's also a win when you are using low -quality settings to make very small JPEG files; the percentage improvement -is often a lot more than it is on larger files. (At present, -optimize -mode is always selected when generating progressive JPEG files.) - -GIF input files are no longer supported, to avoid the Unisys LZW patent. -Use a Unisys-licensed program if you need to read a GIF file. (Conversion -of GIF files to JPEG is usually a bad idea anyway.) - - -HINTS FOR DJPEG - -To get a quick preview of an image, use the -grayscale and/or -scale switches. -"-grayscale -scale 1/8" is the fastest case. - -Several options are available that trade off image quality to gain speed. -"-fast" turns on the recommended settings. - -"-dct fast" and/or "-nosmooth" gain speed at a small sacrifice in quality. -When producing a color-quantized image, "-onepass -dither ordered" is fast but -much lower quality than the default behavior. "-dither none" may give -acceptable results in two-pass mode, but is seldom tolerable in one-pass mode. - -If you are fortunate enough to have very fast floating point hardware, -"-dct float" may be even faster than "-dct fast". But on most machines -"-dct float" is slower than "-dct int"; in this case it is not worth using, -because its theoretical accuracy advantage is too small to be significant -in practice. - -Two-pass color quantization requires a good deal of memory; on MS-DOS machines -it may run out of memory even with -maxmemory 0. In that case you can still -decompress, with some loss of image quality, by specifying -onepass for -one-pass quantization. - -To avoid the Unisys LZW patent, djpeg produces uncompressed GIF files. These -are larger than they should be, but are readable by standard GIF decoders. - - -HINTS FOR BOTH PROGRAMS - -If more space is needed than will fit in the available main memory (as -determined by -maxmemory), temporary files will be used. (MS-DOS versions -will try to get extended or expanded memory first.) The temporary files are -often rather large: in typical cases they occupy three bytes per pixel, for -example 3*800*600 = 1.44Mb for an 800x600 image. If you don't have enough -free disk space, leave out -progressive and -optimize (for cjpeg) or specify --onepass (for djpeg). - -On MS-DOS, the temporary files are created in the directory named by the TMP -or TEMP environment variable, or in the current directory if neither of those -exist. Amiga implementations put the temp files in the directory named by -JPEGTMP:, so be sure to assign JPEGTMP: to a disk partition with adequate free -space. - -The default memory usage limit (-maxmemory) is set when the software is -compiled. If you get an "insufficient memory" error, try specifying a smaller --maxmemory value, even -maxmemory 0 to use the absolute minimum space. You -may want to recompile with a smaller default value if this happens often. - -On machines that have "environment" variables, you can define the environment -variable JPEGMEM to set the default memory limit. The value is specified as -described for the -maxmemory switch. JPEGMEM overrides the default value -specified when the program was compiled, and itself is overridden by an -explicit -maxmemory switch. - -On MS-DOS machines, -maxmemory is the amount of main (conventional) memory to -use. (Extended or expanded memory is also used if available.) Most -DOS-specific versions of this software do their own memory space estimation -and do not need you to specify -maxmemory. - - -JPEGTRAN - -jpegtran performs various useful transformations of JPEG files. -It can translate the coded representation from one variant of JPEG to another, -for example from baseline JPEG to progressive JPEG or vice versa. It can also -perform some rearrangements of the image data, for example turning an image -from landscape to portrait format by rotation. - -jpegtran works by rearranging the compressed data (DCT coefficients), without -ever fully decoding the image. Therefore, its transformations are lossless: -there is no image degradation at all, which would not be true if you used -djpeg followed by cjpeg to accomplish the same conversion. But by the same -token, jpegtran cannot perform lossy operations such as changing the image -quality. - -jpegtran uses a command line syntax similar to cjpeg or djpeg. -On Unix-like systems, you say: - jpegtran [switches] [inputfile] >outputfile -On most non-Unix systems, you say: - jpegtran [switches] inputfile outputfile -where both the input and output files are JPEG files. - -To specify the coded JPEG representation used in the output file, -jpegtran accepts a subset of the switches recognized by cjpeg: - -optimize Perform optimization of entropy encoding parameters. - -progressive Create progressive JPEG file. - -restart N Emit a JPEG restart marker every N MCU rows, or every - N MCU blocks if "B" is attached to the number. - -scans file Use the scan script given in the specified text file. -See the previous discussion of cjpeg for more details about these switches. -If you specify none of these switches, you get a plain baseline-JPEG output -file. The quality setting and so forth are determined by the input file. - -The image can be losslessly transformed by giving one of these switches: - -flip horizontal Mirror image horizontally (left-right). - -flip vertical Mirror image vertically (top-bottom). - -rotate 90 Rotate image 90 degrees clockwise. - -rotate 180 Rotate image 180 degrees. - -rotate 270 Rotate image 270 degrees clockwise (or 90 ccw). - -transpose Transpose image (across UL-to-LR axis). - -transverse Transverse transpose (across UR-to-LL axis). - -The transpose transformation has no restrictions regarding image dimensions. -The other transformations operate rather oddly if the image dimensions are not -a multiple of the iMCU size (usually 8 or 16 pixels), because they can only -transform complete blocks of DCT coefficient data in the desired way. - -jpegtran's default behavior when transforming an odd-size image is designed -to preserve exact reversibility and mathematical consistency of the -transformation set. As stated, transpose is able to flip the entire image -area. Horizontal mirroring leaves any partial iMCU column at the right edge -untouched, but is able to flip all rows of the image. Similarly, vertical -mirroring leaves any partial iMCU row at the bottom edge untouched, but is -able to flip all columns. The other transforms can be built up as sequences -of transpose and flip operations; for consistency, their actions on edge -pixels are defined to be the same as the end result of the corresponding -transpose-and-flip sequence. - -For practical use, you may prefer to discard any untransformable edge pixels -rather than having a strange-looking strip along the right and/or bottom edges -of a transformed image. To do this, add the -trim switch: - -trim Drop non-transformable edge blocks. -Obviously, a transformation with -trim is not reversible, so strictly speaking -jpegtran with this switch is not lossless. Also, the expected mathematical -equivalences between the transformations no longer hold. For example, -"-rot 270 -trim" trims only the bottom edge, but "-rot 90 -trim" followed by -"-rot 180 -trim" trims both edges. - -Another not-strictly-lossless transformation switch is: - -grayscale Force grayscale output. -This option discards the chrominance channels if the input image is YCbCr -(ie, a standard color JPEG), resulting in a grayscale JPEG file. The -luminance channel is preserved exactly, so this is a better method of reducing -to grayscale than decompression, conversion, and recompression. This switch -is particularly handy for fixing a monochrome picture that was mistakenly -encoded as a color JPEG. (In such a case, the space savings from getting rid -of the near-empty chroma channels won't be large; but the decoding time for -a grayscale JPEG is substantially less than that for a color JPEG.) - -jpegtran also recognizes these switches that control what to do with "extra" -markers, such as comment blocks: - -copy none Copy no extra markers from source file. This setting - suppresses all comments and other excess baggage - present in the source file. - -copy comments Copy only comment markers. This setting copies - comments from the source file, but discards - any other inessential data. - -copy all Copy all extra markers. This setting preserves - miscellaneous markers found in the source file, such - as JFIF thumbnails and Photoshop settings. In some - files these extra markers can be sizable. -The default behavior is -copy comments. (Note: in IJG releases v6 and v6a, -jpegtran always did the equivalent of -copy none.) - -Additional switches recognized by jpegtran are: - -outfile filename - -maxmemory N - -verbose - -debug -These work the same as in cjpeg or djpeg. - - -THE COMMENT UTILITIES - -The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. -Although the standard doesn't actually define what COM blocks are for, they -are widely used to hold user-supplied text strings. This lets you add -annotations, titles, index terms, etc to your JPEG files, and later retrieve -them as text. COM blocks do not interfere with the image stored in the JPEG -file. The maximum size of a COM block is 64K, but you can have as many of -them as you like in one JPEG file. - -We provide two utility programs to display COM block contents and add COM -blocks to a JPEG file. - -rdjpgcom searches a JPEG file and prints the contents of any COM blocks on -standard output. The command line syntax is - rdjpgcom [-verbose] [inputfilename] -The switch "-verbose" (or just "-v") causes rdjpgcom to also display the JPEG -image dimensions. If you omit the input file name from the command line, -the JPEG file is read from standard input. (This may not work on some -operating systems, if binary data can't be read from stdin.) - -wrjpgcom adds a COM block, containing text you provide, to a JPEG file. -Ordinarily, the COM block is added after any existing COM blocks, but you -can delete the old COM blocks if you wish. wrjpgcom produces a new JPEG -file; it does not modify the input file. DO NOT try to overwrite the input -file by directing wrjpgcom's output back into it; on most systems this will -just destroy your file. - -The command line syntax for wrjpgcom is similar to cjpeg's. On Unix-like -systems, it is - wrjpgcom [switches] [inputfilename] -The output file is written to standard output. The input file comes from -the named file, or from standard input if no input file is named. - -On most non-Unix systems, the syntax is - wrjpgcom [switches] inputfilename outputfilename -where both input and output file names must be given explicitly. - -wrjpgcom understands three switches: - -replace Delete any existing COM blocks from the file. - -comment "Comment text" Supply new COM text on command line. - -cfile name Read text for new COM block from named file. -(Switch names can be abbreviated.) If you have only one line of comment text -to add, you can provide it on the command line with -comment. The comment -text must be surrounded with quotes so that it is treated as a single -argument. Longer comments can be read from a text file. - -If you give neither -comment nor -cfile, then wrjpgcom will read the comment -text from standard input. (In this case an input image file name MUST be -supplied, so that the source JPEG file comes from somewhere else.) You can -enter multiple lines, up to 64KB worth. Type an end-of-file indicator -(usually control-D or control-Z) to terminate the comment text entry. - -wrjpgcom will not add a COM block if the provided comment string is empty. -Therefore -replace -comment "" can be used to delete all COM blocks from a -file. - -These utility programs do not depend on the IJG JPEG library. In -particular, the source code for rdjpgcom is intended as an illustration of -the minimum amount of code required to parse a JPEG file header correctly. diff --git a/gtkmm-osx/trunk/jpeg-6b/wizard.doc b/gtkmm-osx/trunk/jpeg-6b/wizard.doc deleted file mode 100644 index 54170b2..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/wizard.doc +++ /dev/null @@ -1,211 +0,0 @@ -Advanced usage instructions for the Independent JPEG Group's JPEG software -========================================================================== - -This file describes cjpeg's "switches for wizards". - -The "wizard" switches are intended for experimentation with JPEG by persons -who are reasonably knowledgeable about the JPEG standard. If you don't know -what you are doing, DON'T USE THESE SWITCHES. You'll likely produce files -with worse image quality and/or poorer compression than you'd get from the -default settings. Furthermore, these switches must be used with caution -when making files intended for general use, because not all JPEG decoders -will support unusual JPEG parameter settings. - - -Quantization Table Adjustment ------------------------------ - -Ordinarily, cjpeg starts with a default set of tables (the same ones given -as examples in the JPEG standard) and scales them up or down according to -the -quality setting. The details of the scaling algorithm can be found in -jcparam.c. At very low quality settings, some quantization table entries -can get scaled up to values exceeding 255. Although 2-byte quantization -values are supported by the IJG software, this feature is not in baseline -JPEG and is not supported by all implementations. If you need to ensure -wide compatibility of low-quality files, you can constrain the scaled -quantization values to no more than 255 by giving the -baseline switch. -Note that use of -baseline will result in poorer quality for the same file -size, since more bits than necessary are expended on higher AC coefficients. - -You can substitute a different set of quantization values by using the --qtables switch: - - -qtables file Use the quantization tables given in the named file. - -The specified file should be a text file containing decimal quantization -values. The file should contain one to four tables, each of 64 elements. -The tables are implicitly numbered 0,1,etc. in order of appearance. Table -entries appear in normal array order (NOT in the zigzag order in which they -will be stored in the JPEG file). - -Quantization table files are free format, in that arbitrary whitespace can -appear between numbers. Also, comments can be included: a comment starts -with '#' and extends to the end of the line. Here is an example file that -duplicates the default quantization tables: - - # Quantization tables given in JPEG spec, section K.1 - - # This is table 0 (the luminance table): - 16 11 10 16 24 40 51 61 - 12 12 14 19 26 58 60 55 - 14 13 16 24 40 57 69 56 - 14 17 22 29 51 87 80 62 - 18 22 37 56 68 109 103 77 - 24 35 55 64 81 104 113 92 - 49 64 78 87 103 121 120 101 - 72 92 95 98 112 100 103 99 - - # This is table 1 (the chrominance table): - 17 18 24 47 99 99 99 99 - 18 21 26 66 99 99 99 99 - 24 26 56 99 99 99 99 99 - 47 66 99 99 99 99 99 99 - 99 99 99 99 99 99 99 99 - 99 99 99 99 99 99 99 99 - 99 99 99 99 99 99 99 99 - 99 99 99 99 99 99 99 99 - -If the -qtables switch is used without -quality, then the specified tables -are used exactly as-is. If both -qtables and -quality are used, then the -tables taken from the file are scaled in the same fashion that the default -tables would be scaled for that quality setting. If -baseline appears, then -the quantization values are constrained to the range 1-255. - -By default, cjpeg will use quantization table 0 for luminance components and -table 1 for chrominance components. To override this choice, use the -qslots -switch: - - -qslots N[,...] Select which quantization table to use for - each color component. - -The -qslots switch specifies a quantization table number for each color -component, in the order in which the components appear in the JPEG SOF marker. -For example, to create a separate table for each of Y,Cb,Cr, you could -provide a -qtables file that defines three quantization tables and say -"-qslots 0,1,2". If -qslots gives fewer table numbers than there are color -components, then the last table number is repeated as necessary. - - -Sampling Factor Adjustment --------------------------- - -By default, cjpeg uses 2:1 horizontal and vertical downsampling when -compressing YCbCr data, and no downsampling for all other color spaces. -You can override this default with the -sample switch: - - -sample HxV[,...] Set JPEG sampling factors for each color - component. - -The -sample switch specifies the JPEG sampling factors for each color -component, in the order in which they appear in the JPEG SOF marker. -If you specify fewer HxV pairs than there are components, the remaining -components are set to 1x1 sampling. For example, the default YCbCr setting -is equivalent to "-sample 2x2,1x1,1x1", which can be abbreviated to -"-sample 2x2". - -There are still some JPEG decoders in existence that support only 2x1 -sampling (also called 4:2:2 sampling). Compatibility with such decoders can -be achieved by specifying "-sample 2x1". This is not recommended unless -really necessary, since it increases file size and encoding/decoding time -with very little quality gain. - - -Multiple Scan / Progression Control ------------------------------------ - -By default, cjpeg emits a single-scan sequential JPEG file. The --progressive switch generates a progressive JPEG file using a default series -of progression parameters. You can create multiple-scan sequential JPEG -files or progressive JPEG files with custom progression parameters by using -the -scans switch: - - -scans file Use the scan sequence given in the named file. - -The specified file should be a text file containing a "scan script". -The script specifies the contents and ordering of the scans to be emitted. -Each entry in the script defines one scan. A scan definition specifies -the components to be included in the scan, and for progressive JPEG it also -specifies the progression parameters Ss,Se,Ah,Al for the scan. Scan -definitions are separated by semicolons (';'). A semicolon after the last -scan definition is optional. - -Each scan definition contains one to four component indexes, optionally -followed by a colon (':') and the four progressive-JPEG parameters. The -component indexes denote which color component(s) are to be transmitted in -the scan. Components are numbered in the order in which they appear in the -JPEG SOF marker, with the first component being numbered 0. (Note that these -indexes are not the "component ID" codes assigned to the components, just -positional indexes.) - -The progression parameters for each scan are: - Ss Zigzag index of first coefficient included in scan - Se Zigzag index of last coefficient included in scan - Ah Zero for first scan of a coefficient, else Al of prior scan - Al Successive approximation low bit position for scan -If the progression parameters are omitted, the values 0,63,0,0 are used, -producing a sequential JPEG file. cjpeg automatically determines whether -the script represents a progressive or sequential file, by observing whether -Ss and Se values other than 0 and 63 appear. (The -progressive switch is -not needed to specify this; in fact, it is ignored when -scans appears.) -The scan script must meet the JPEG restrictions on progression sequences. -(cjpeg checks that the spec's requirements are obeyed.) - -Scan script files are free format, in that arbitrary whitespace can appear -between numbers and around punctuation. Also, comments can be included: a -comment starts with '#' and extends to the end of the line. For additional -legibility, commas or dashes can be placed between values. (Actually, any -single punctuation character other than ':' or ';' can be inserted.) For -example, the following two scan definitions are equivalent: - 0 1 2: 0 63 0 0; - 0,1,2 : 0-63, 0,0 ; - -Here is an example of a scan script that generates a partially interleaved -sequential JPEG file: - - 0; # Y only in first scan - 1 2; # Cb and Cr in second scan - -Here is an example of a progressive scan script using only spectral selection -(no successive approximation): - - # Interleaved DC scan for Y,Cb,Cr: - 0,1,2: 0-0, 0, 0 ; - # AC scans: - 0: 1-2, 0, 0 ; # First two Y AC coefficients - 0: 3-5, 0, 0 ; # Three more - 1: 1-63, 0, 0 ; # All AC coefficients for Cb - 2: 1-63, 0, 0 ; # All AC coefficients for Cr - 0: 6-9, 0, 0 ; # More Y coefficients - 0: 10-63, 0, 0 ; # Remaining Y coefficients - -Here is an example of a successive-approximation script. This is equivalent -to the default script used by "cjpeg -progressive" for YCbCr images: - - # Initial DC scan for Y,Cb,Cr (lowest bit not sent) - 0,1,2: 0-0, 0, 1 ; - # First AC scan: send first 5 Y AC coefficients, minus 2 lowest bits: - 0: 1-5, 0, 2 ; - # Send all Cr,Cb AC coefficients, minus lowest bit: - # (chroma data is usually too small to be worth subdividing further; - # but note we send Cr first since eye is least sensitive to Cb) - 2: 1-63, 0, 1 ; - 1: 1-63, 0, 1 ; - # Send remaining Y AC coefficients, minus 2 lowest bits: - 0: 6-63, 0, 2 ; - # Send next-to-lowest bit of all Y AC coefficients: - 0: 1-63, 2, 1 ; - # At this point we've sent all but the lowest bit of all coefficients. - # Send lowest bit of DC coefficients - 0,1,2: 0-0, 1, 0 ; - # Send lowest bit of AC coefficients - 2: 1-63, 1, 0 ; - 1: 1-63, 1, 0 ; - # Y AC lowest bit scan is last; it's usually the largest scan - 0: 1-63, 1, 0 ; - -It may be worth pointing out that this script is tuned for quality settings -of around 50 to 75. For lower quality settings, you'd probably want to use -a script with fewer stages of successive approximation (otherwise the -initial scans will be really bad). For higher quality settings, you might -want to use more stages of successive approximation (so that the initial -scans are not too large). diff --git a/gtkmm-osx/trunk/jpeg-6b/wrbmp.c b/gtkmm-osx/trunk/jpeg-6b/wrbmp.c deleted file mode 100644 index 3283b0f..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/wrbmp.c +++ /dev/null @@ -1,442 +0,0 @@ -/* - * wrbmp.c - * - * Copyright (C) 1994-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to write output images in Microsoft "BMP" - * format (MS Windows 3.x and OS/2 1.x flavors). - * Either 8-bit colormapped or 24-bit full-color format can be written. - * No compression is supported. - * - * These routines may need modification for non-Unix environments or - * specialized applications. As they stand, they assume output to - * an ordinary stdio stream. - * - * This code contributed by James Arthur Boucher. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef BMP_SUPPORTED - - -/* - * To support 12-bit JPEG data, we'd have to scale output down to 8 bits. - * This is not yet implemented. - */ - -#if BITS_IN_JSAMPLE != 8 - Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ -#endif - -/* - * Since BMP stores scanlines bottom-to-top, we have to invert the image - * from JPEG's top-to-bottom order. To do this, we save the outgoing data - * in a virtual array during put_pixel_row calls, then actually emit the - * BMP file during finish_output. The virtual array contains one JSAMPLE per - * pixel if the output is grayscale or colormapped, three if it is full color. - */ - -/* Private version of data destination object */ - -typedef struct { - struct djpeg_dest_struct pub; /* public fields */ - - boolean is_os2; /* saves the OS2 format request flag */ - - jvirt_sarray_ptr whole_image; /* needed to reverse row order */ - JDIMENSION data_width; /* JSAMPLEs per row */ - JDIMENSION row_width; /* physical width of one row in the BMP file */ - int pad_bytes; /* number of padding bytes needed per row */ - JDIMENSION cur_output_row; /* next row# to write to virtual array */ -} bmp_dest_struct; - -typedef bmp_dest_struct * bmp_dest_ptr; - - -/* Forward declarations */ -LOCAL(void) write_colormap - JPP((j_decompress_ptr cinfo, bmp_dest_ptr dest, - int map_colors, int map_entry_size)); - - -/* - * Write some pixel data. - * In this module rows_supplied will always be 1. - */ - -METHODDEF(void) -put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -/* This version is for writing 24-bit pixels */ -{ - bmp_dest_ptr dest = (bmp_dest_ptr) dinfo; - JSAMPARRAY image_ptr; - register JSAMPROW inptr, outptr; - register JDIMENSION col; - int pad; - - /* Access next row in virtual array */ - image_ptr = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, dest->whole_image, - dest->cur_output_row, (JDIMENSION) 1, TRUE); - dest->cur_output_row++; - - /* Transfer data. Note destination values must be in BGR order - * (even though Microsoft's own documents say the opposite). - */ - inptr = dest->pub.buffer[0]; - outptr = image_ptr[0]; - for (col = cinfo->output_width; col > 0; col--) { - outptr[2] = *inptr++; /* can omit GETJSAMPLE() safely */ - outptr[1] = *inptr++; - outptr[0] = *inptr++; - outptr += 3; - } - - /* Zero out the pad bytes. */ - pad = dest->pad_bytes; - while (--pad >= 0) - *outptr++ = 0; -} - -METHODDEF(void) -put_gray_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -/* This version is for grayscale OR quantized color output */ -{ - bmp_dest_ptr dest = (bmp_dest_ptr) dinfo; - JSAMPARRAY image_ptr; - register JSAMPROW inptr, outptr; - register JDIMENSION col; - int pad; - - /* Access next row in virtual array */ - image_ptr = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, dest->whole_image, - dest->cur_output_row, (JDIMENSION) 1, TRUE); - dest->cur_output_row++; - - /* Transfer data. */ - inptr = dest->pub.buffer[0]; - outptr = image_ptr[0]; - for (col = cinfo->output_width; col > 0; col--) { - *outptr++ = *inptr++; /* can omit GETJSAMPLE() safely */ - } - - /* Zero out the pad bytes. */ - pad = dest->pad_bytes; - while (--pad >= 0) - *outptr++ = 0; -} - - -/* - * Startup: normally writes the file header. - * In this module we may as well postpone everything until finish_output. - */ - -METHODDEF(void) -start_output_bmp (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - /* no work here */ -} - - -/* - * Finish up at the end of the file. - * - * Here is where we really output the BMP file. - * - * First, routines to write the Windows and OS/2 variants of the file header. - */ - -LOCAL(void) -write_bmp_header (j_decompress_ptr cinfo, bmp_dest_ptr dest) -/* Write a Windows-style BMP file header, including colormap if needed */ -{ - char bmpfileheader[14]; - char bmpinfoheader[40]; -#define PUT_2B(array,offset,value) \ - (array[offset] = (char) ((value) & 0xFF), \ - array[offset+1] = (char) (((value) >> 8) & 0xFF)) -#define PUT_4B(array,offset,value) \ - (array[offset] = (char) ((value) & 0xFF), \ - array[offset+1] = (char) (((value) >> 8) & 0xFF), \ - array[offset+2] = (char) (((value) >> 16) & 0xFF), \ - array[offset+3] = (char) (((value) >> 24) & 0xFF)) - INT32 headersize, bfSize; - int bits_per_pixel, cmap_entries; - - /* Compute colormap size and total file size */ - if (cinfo->out_color_space == JCS_RGB) { - if (cinfo->quantize_colors) { - /* Colormapped RGB */ - bits_per_pixel = 8; - cmap_entries = 256; - } else { - /* Unquantized, full color RGB */ - bits_per_pixel = 24; - cmap_entries = 0; - } - } else { - /* Grayscale output. We need to fake a 256-entry colormap. */ - bits_per_pixel = 8; - cmap_entries = 256; - } - /* File size */ - headersize = 14 + 40 + cmap_entries * 4; /* Header and colormap */ - bfSize = headersize + (INT32) dest->row_width * (INT32) cinfo->output_height; - - /* Set unused fields of header to 0 */ - MEMZERO(bmpfileheader, SIZEOF(bmpfileheader)); - MEMZERO(bmpinfoheader, SIZEOF(bmpinfoheader)); - - /* Fill the file header */ - bmpfileheader[0] = 0x42; /* first 2 bytes are ASCII 'B', 'M' */ - bmpfileheader[1] = 0x4D; - PUT_4B(bmpfileheader, 2, bfSize); /* bfSize */ - /* we leave bfReserved1 & bfReserved2 = 0 */ - PUT_4B(bmpfileheader, 10, headersize); /* bfOffBits */ - - /* Fill the info header (Microsoft calls this a BITMAPINFOHEADER) */ - PUT_2B(bmpinfoheader, 0, 40); /* biSize */ - PUT_4B(bmpinfoheader, 4, cinfo->output_width); /* biWidth */ - PUT_4B(bmpinfoheader, 8, cinfo->output_height); /* biHeight */ - PUT_2B(bmpinfoheader, 12, 1); /* biPlanes - must be 1 */ - PUT_2B(bmpinfoheader, 14, bits_per_pixel); /* biBitCount */ - /* we leave biCompression = 0, for none */ - /* we leave biSizeImage = 0; this is correct for uncompressed data */ - if (cinfo->density_unit == 2) { /* if have density in dots/cm, then */ - PUT_4B(bmpinfoheader, 24, (INT32) (cinfo->X_density*100)); /* XPels/M */ - PUT_4B(bmpinfoheader, 28, (INT32) (cinfo->Y_density*100)); /* XPels/M */ - } - PUT_2B(bmpinfoheader, 32, cmap_entries); /* biClrUsed */ - /* we leave biClrImportant = 0 */ - - if (JFWRITE(dest->pub.output_file, bmpfileheader, 14) != (size_t) 14) - ERREXIT(cinfo, JERR_FILE_WRITE); - if (JFWRITE(dest->pub.output_file, bmpinfoheader, 40) != (size_t) 40) - ERREXIT(cinfo, JERR_FILE_WRITE); - - if (cmap_entries > 0) - write_colormap(cinfo, dest, cmap_entries, 4); -} - - -LOCAL(void) -write_os2_header (j_decompress_ptr cinfo, bmp_dest_ptr dest) -/* Write an OS2-style BMP file header, including colormap if needed */ -{ - char bmpfileheader[14]; - char bmpcoreheader[12]; - INT32 headersize, bfSize; - int bits_per_pixel, cmap_entries; - - /* Compute colormap size and total file size */ - if (cinfo->out_color_space == JCS_RGB) { - if (cinfo->quantize_colors) { - /* Colormapped RGB */ - bits_per_pixel = 8; - cmap_entries = 256; - } else { - /* Unquantized, full color RGB */ - bits_per_pixel = 24; - cmap_entries = 0; - } - } else { - /* Grayscale output. We need to fake a 256-entry colormap. */ - bits_per_pixel = 8; - cmap_entries = 256; - } - /* File size */ - headersize = 14 + 12 + cmap_entries * 3; /* Header and colormap */ - bfSize = headersize + (INT32) dest->row_width * (INT32) cinfo->output_height; - - /* Set unused fields of header to 0 */ - MEMZERO(bmpfileheader, SIZEOF(bmpfileheader)); - MEMZERO(bmpcoreheader, SIZEOF(bmpcoreheader)); - - /* Fill the file header */ - bmpfileheader[0] = 0x42; /* first 2 bytes are ASCII 'B', 'M' */ - bmpfileheader[1] = 0x4D; - PUT_4B(bmpfileheader, 2, bfSize); /* bfSize */ - /* we leave bfReserved1 & bfReserved2 = 0 */ - PUT_4B(bmpfileheader, 10, headersize); /* bfOffBits */ - - /* Fill the info header (Microsoft calls this a BITMAPCOREHEADER) */ - PUT_2B(bmpcoreheader, 0, 12); /* bcSize */ - PUT_2B(bmpcoreheader, 4, cinfo->output_width); /* bcWidth */ - PUT_2B(bmpcoreheader, 6, cinfo->output_height); /* bcHeight */ - PUT_2B(bmpcoreheader, 8, 1); /* bcPlanes - must be 1 */ - PUT_2B(bmpcoreheader, 10, bits_per_pixel); /* bcBitCount */ - - if (JFWRITE(dest->pub.output_file, bmpfileheader, 14) != (size_t) 14) - ERREXIT(cinfo, JERR_FILE_WRITE); - if (JFWRITE(dest->pub.output_file, bmpcoreheader, 12) != (size_t) 12) - ERREXIT(cinfo, JERR_FILE_WRITE); - - if (cmap_entries > 0) - write_colormap(cinfo, dest, cmap_entries, 3); -} - - -/* - * Write the colormap. - * Windows uses BGR0 map entries; OS/2 uses BGR entries. - */ - -LOCAL(void) -write_colormap (j_decompress_ptr cinfo, bmp_dest_ptr dest, - int map_colors, int map_entry_size) -{ - JSAMPARRAY colormap = cinfo->colormap; - int num_colors = cinfo->actual_number_of_colors; - FILE * outfile = dest->pub.output_file; - int i; - - if (colormap != NULL) { - if (cinfo->out_color_components == 3) { - /* Normal case with RGB colormap */ - for (i = 0; i < num_colors; i++) { - putc(GETJSAMPLE(colormap[2][i]), outfile); - putc(GETJSAMPLE(colormap[1][i]), outfile); - putc(GETJSAMPLE(colormap[0][i]), outfile); - if (map_entry_size == 4) - putc(0, outfile); - } - } else { - /* Grayscale colormap (only happens with grayscale quantization) */ - for (i = 0; i < num_colors; i++) { - putc(GETJSAMPLE(colormap[0][i]), outfile); - putc(GETJSAMPLE(colormap[0][i]), outfile); - putc(GETJSAMPLE(colormap[0][i]), outfile); - if (map_entry_size == 4) - putc(0, outfile); - } - } - } else { - /* If no colormap, must be grayscale data. Generate a linear "map". */ - for (i = 0; i < 256; i++) { - putc(i, outfile); - putc(i, outfile); - putc(i, outfile); - if (map_entry_size == 4) - putc(0, outfile); - } - } - /* Pad colormap with zeros to ensure specified number of colormap entries */ - if (i > map_colors) - ERREXIT1(cinfo, JERR_TOO_MANY_COLORS, i); - for (; i < map_colors; i++) { - putc(0, outfile); - putc(0, outfile); - putc(0, outfile); - if (map_entry_size == 4) - putc(0, outfile); - } -} - - -METHODDEF(void) -finish_output_bmp (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - bmp_dest_ptr dest = (bmp_dest_ptr) dinfo; - register FILE * outfile = dest->pub.output_file; - JSAMPARRAY image_ptr; - register JSAMPROW data_ptr; - JDIMENSION row; - register JDIMENSION col; - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; - - /* Write the header and colormap */ - if (dest->is_os2) - write_os2_header(cinfo, dest); - else - write_bmp_header(cinfo, dest); - - /* Write the file body from our virtual array */ - for (row = cinfo->output_height; row > 0; row--) { - if (progress != NULL) { - progress->pub.pass_counter = (long) (cinfo->output_height - row); - progress->pub.pass_limit = (long) cinfo->output_height; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } - image_ptr = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, dest->whole_image, row-1, (JDIMENSION) 1, FALSE); - data_ptr = image_ptr[0]; - for (col = dest->row_width; col > 0; col--) { - putc(GETJSAMPLE(*data_ptr), outfile); - data_ptr++; - } - } - if (progress != NULL) - progress->completed_extra_passes++; - - /* Make sure we wrote the output file OK */ - fflush(outfile); - if (ferror(outfile)) - ERREXIT(cinfo, JERR_FILE_WRITE); -} - - -/* - * The module selection routine for BMP format output. - */ - -GLOBAL(djpeg_dest_ptr) -jinit_write_bmp (j_decompress_ptr cinfo, boolean is_os2) -{ - bmp_dest_ptr dest; - JDIMENSION row_width; - - /* Create module interface object, fill in method pointers */ - dest = (bmp_dest_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(bmp_dest_struct)); - dest->pub.start_output = start_output_bmp; - dest->pub.finish_output = finish_output_bmp; - dest->is_os2 = is_os2; - - if (cinfo->out_color_space == JCS_GRAYSCALE) { - dest->pub.put_pixel_rows = put_gray_rows; - } else if (cinfo->out_color_space == JCS_RGB) { - if (cinfo->quantize_colors) - dest->pub.put_pixel_rows = put_gray_rows; - else - dest->pub.put_pixel_rows = put_pixel_rows; - } else { - ERREXIT(cinfo, JERR_BMP_COLORSPACE); - } - - /* Calculate output image dimensions so we can allocate space */ - jpeg_calc_output_dimensions(cinfo); - - /* Determine width of rows in the BMP file (padded to 4-byte boundary). */ - row_width = cinfo->output_width * cinfo->output_components; - dest->data_width = row_width; - while ((row_width & 3) != 0) row_width++; - dest->row_width = row_width; - dest->pad_bytes = (int) (row_width - dest->data_width); - - /* Allocate space for inversion array, prepare for write pass */ - dest->whole_image = (*cinfo->mem->request_virt_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, - row_width, cinfo->output_height, (JDIMENSION) 1); - dest->cur_output_row = 0; - if (cinfo->progress != NULL) { - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; - progress->total_extra_passes++; /* count file input as separate pass */ - } - - /* Create decompressor output buffer. */ - dest->pub.buffer = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, row_width, (JDIMENSION) 1); - dest->pub.buffer_height = 1; - - return (djpeg_dest_ptr) dest; -} - -#endif /* BMP_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/wrgif.c b/gtkmm-osx/trunk/jpeg-6b/wrgif.c deleted file mode 100644 index 5fe8328..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/wrgif.c +++ /dev/null @@ -1,399 +0,0 @@ -/* - * wrgif.c - * - * Copyright (C) 1991-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to write output images in GIF format. - * - ************************************************************************** - * NOTE: to avoid entanglements with Unisys' patent on LZW compression, * - * this code has been modified to output "uncompressed GIF" files. * - * There is no trace of the LZW algorithm in this file. * - ************************************************************************** - * - * These routines may need modification for non-Unix environments or - * specialized applications. As they stand, they assume output to - * an ordinary stdio stream. - */ - -/* - * This code is loosely based on ppmtogif from the PBMPLUS distribution - * of Feb. 1991. That file contains the following copyright notice: - * Based on GIFENCODE by David Rowley . - * Lempel-Ziv compression based on "compress" by Spencer W. Thomas et al. - * Copyright (C) 1989 by Jef Poskanzer. - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation. This software is provided "as is" without express or - * implied warranty. - * - * We are also required to state that - * "The Graphics Interchange Format(c) is the Copyright property of - * CompuServe Incorporated. GIF(sm) is a Service Mark property of - * CompuServe Incorporated." - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef GIF_SUPPORTED - - -/* Private version of data destination object */ - -typedef struct { - struct djpeg_dest_struct pub; /* public fields */ - - j_decompress_ptr cinfo; /* back link saves passing separate parm */ - - /* State for packing variable-width codes into a bitstream */ - int n_bits; /* current number of bits/code */ - int maxcode; /* maximum code, given n_bits */ - INT32 cur_accum; /* holds bits not yet output */ - int cur_bits; /* # of bits in cur_accum */ - - /* State for GIF code assignment */ - int ClearCode; /* clear code (doesn't change) */ - int EOFCode; /* EOF code (ditto) */ - int code_counter; /* counts output symbols */ - - /* GIF data packet construction buffer */ - int bytesinpkt; /* # of bytes in current packet */ - char packetbuf[256]; /* workspace for accumulating packet */ - -} gif_dest_struct; - -typedef gif_dest_struct * gif_dest_ptr; - -/* Largest value that will fit in N bits */ -#define MAXCODE(n_bits) ((1 << (n_bits)) - 1) - - -/* - * Routines to package finished data bytes into GIF data blocks. - * A data block consists of a count byte (1..255) and that many data bytes. - */ - -LOCAL(void) -flush_packet (gif_dest_ptr dinfo) -/* flush any accumulated data */ -{ - if (dinfo->bytesinpkt > 0) { /* never write zero-length packet */ - dinfo->packetbuf[0] = (char) dinfo->bytesinpkt++; - if (JFWRITE(dinfo->pub.output_file, dinfo->packetbuf, dinfo->bytesinpkt) - != (size_t) dinfo->bytesinpkt) - ERREXIT(dinfo->cinfo, JERR_FILE_WRITE); - dinfo->bytesinpkt = 0; - } -} - - -/* Add a character to current packet; flush to disk if necessary */ -#define CHAR_OUT(dinfo,c) \ - { (dinfo)->packetbuf[++(dinfo)->bytesinpkt] = (char) (c); \ - if ((dinfo)->bytesinpkt >= 255) \ - flush_packet(dinfo); \ - } - - -/* Routine to convert variable-width codes into a byte stream */ - -LOCAL(void) -output (gif_dest_ptr dinfo, int code) -/* Emit a code of n_bits bits */ -/* Uses cur_accum and cur_bits to reblock into 8-bit bytes */ -{ - dinfo->cur_accum |= ((INT32) code) << dinfo->cur_bits; - dinfo->cur_bits += dinfo->n_bits; - - while (dinfo->cur_bits >= 8) { - CHAR_OUT(dinfo, dinfo->cur_accum & 0xFF); - dinfo->cur_accum >>= 8; - dinfo->cur_bits -= 8; - } -} - - -/* The pseudo-compression algorithm. - * - * In this module we simply output each pixel value as a separate symbol; - * thus, no compression occurs. In fact, there is expansion of one bit per - * pixel, because we use a symbol width one bit wider than the pixel width. - * - * GIF ordinarily uses variable-width symbols, and the decoder will expect - * to ratchet up the symbol width after a fixed number of symbols. - * To simplify the logic and keep the expansion penalty down, we emit a - * GIF Clear code to reset the decoder just before the width would ratchet up. - * Thus, all the symbols in the output file will have the same bit width. - * Note that emitting the Clear codes at the right times is a mere matter of - * counting output symbols and is in no way dependent on the LZW patent. - * - * With a small basic pixel width (low color count), Clear codes will be - * needed very frequently, causing the file to expand even more. So this - * simplistic approach wouldn't work too well on bilevel images, for example. - * But for output of JPEG conversions the pixel width will usually be 8 bits - * (129 to 256 colors), so the overhead added by Clear symbols is only about - * one symbol in every 256. - */ - -LOCAL(void) -compress_init (gif_dest_ptr dinfo, int i_bits) -/* Initialize pseudo-compressor */ -{ - /* init all the state variables */ - dinfo->n_bits = i_bits; - dinfo->maxcode = MAXCODE(dinfo->n_bits); - dinfo->ClearCode = (1 << (i_bits - 1)); - dinfo->EOFCode = dinfo->ClearCode + 1; - dinfo->code_counter = dinfo->ClearCode + 2; - /* init output buffering vars */ - dinfo->bytesinpkt = 0; - dinfo->cur_accum = 0; - dinfo->cur_bits = 0; - /* GIF specifies an initial Clear code */ - output(dinfo, dinfo->ClearCode); -} - - -LOCAL(void) -compress_pixel (gif_dest_ptr dinfo, int c) -/* Accept and "compress" one pixel value. - * The given value must be less than n_bits wide. - */ -{ - /* Output the given pixel value as a symbol. */ - output(dinfo, c); - /* Issue Clear codes often enough to keep the reader from ratcheting up - * its symbol size. - */ - if (dinfo->code_counter < dinfo->maxcode) { - dinfo->code_counter++; - } else { - output(dinfo, dinfo->ClearCode); - dinfo->code_counter = dinfo->ClearCode + 2; /* reset the counter */ - } -} - - -LOCAL(void) -compress_term (gif_dest_ptr dinfo) -/* Clean up at end */ -{ - /* Send an EOF code */ - output(dinfo, dinfo->EOFCode); - /* Flush the bit-packing buffer */ - if (dinfo->cur_bits > 0) { - CHAR_OUT(dinfo, dinfo->cur_accum & 0xFF); - } - /* Flush the packet buffer */ - flush_packet(dinfo); -} - - -/* GIF header construction */ - - -LOCAL(void) -put_word (gif_dest_ptr dinfo, unsigned int w) -/* Emit a 16-bit word, LSB first */ -{ - putc(w & 0xFF, dinfo->pub.output_file); - putc((w >> 8) & 0xFF, dinfo->pub.output_file); -} - - -LOCAL(void) -put_3bytes (gif_dest_ptr dinfo, int val) -/* Emit 3 copies of same byte value --- handy subr for colormap construction */ -{ - putc(val, dinfo->pub.output_file); - putc(val, dinfo->pub.output_file); - putc(val, dinfo->pub.output_file); -} - - -LOCAL(void) -emit_header (gif_dest_ptr dinfo, int num_colors, JSAMPARRAY colormap) -/* Output the GIF file header, including color map */ -/* If colormap==NULL, synthesize a gray-scale colormap */ -{ - int BitsPerPixel, ColorMapSize, InitCodeSize, FlagByte; - int cshift = dinfo->cinfo->data_precision - 8; - int i; - - if (num_colors > 256) - ERREXIT1(dinfo->cinfo, JERR_TOO_MANY_COLORS, num_colors); - /* Compute bits/pixel and related values */ - BitsPerPixel = 1; - while (num_colors > (1 << BitsPerPixel)) - BitsPerPixel++; - ColorMapSize = 1 << BitsPerPixel; - if (BitsPerPixel <= 1) - InitCodeSize = 2; - else - InitCodeSize = BitsPerPixel; - /* - * Write the GIF header. - * Note that we generate a plain GIF87 header for maximum compatibility. - */ - putc('G', dinfo->pub.output_file); - putc('I', dinfo->pub.output_file); - putc('F', dinfo->pub.output_file); - putc('8', dinfo->pub.output_file); - putc('7', dinfo->pub.output_file); - putc('a', dinfo->pub.output_file); - /* Write the Logical Screen Descriptor */ - put_word(dinfo, (unsigned int) dinfo->cinfo->output_width); - put_word(dinfo, (unsigned int) dinfo->cinfo->output_height); - FlagByte = 0x80; /* Yes, there is a global color table */ - FlagByte |= (BitsPerPixel-1) << 4; /* color resolution */ - FlagByte |= (BitsPerPixel-1); /* size of global color table */ - putc(FlagByte, dinfo->pub.output_file); - putc(0, dinfo->pub.output_file); /* Background color index */ - putc(0, dinfo->pub.output_file); /* Reserved (aspect ratio in GIF89) */ - /* Write the Global Color Map */ - /* If the color map is more than 8 bits precision, */ - /* we reduce it to 8 bits by shifting */ - for (i=0; i < ColorMapSize; i++) { - if (i < num_colors) { - if (colormap != NULL) { - if (dinfo->cinfo->out_color_space == JCS_RGB) { - /* Normal case: RGB color map */ - putc(GETJSAMPLE(colormap[0][i]) >> cshift, dinfo->pub.output_file); - putc(GETJSAMPLE(colormap[1][i]) >> cshift, dinfo->pub.output_file); - putc(GETJSAMPLE(colormap[2][i]) >> cshift, dinfo->pub.output_file); - } else { - /* Grayscale "color map": possible if quantizing grayscale image */ - put_3bytes(dinfo, GETJSAMPLE(colormap[0][i]) >> cshift); - } - } else { - /* Create a gray-scale map of num_colors values, range 0..255 */ - put_3bytes(dinfo, (i * 255 + (num_colors-1)/2) / (num_colors-1)); - } - } else { - /* fill out the map to a power of 2 */ - put_3bytes(dinfo, 0); - } - } - /* Write image separator and Image Descriptor */ - putc(',', dinfo->pub.output_file); /* separator */ - put_word(dinfo, 0); /* left/top offset */ - put_word(dinfo, 0); - put_word(dinfo, (unsigned int) dinfo->cinfo->output_width); /* image size */ - put_word(dinfo, (unsigned int) dinfo->cinfo->output_height); - /* flag byte: not interlaced, no local color map */ - putc(0x00, dinfo->pub.output_file); - /* Write Initial Code Size byte */ - putc(InitCodeSize, dinfo->pub.output_file); - - /* Initialize for "compression" of image data */ - compress_init(dinfo, InitCodeSize+1); -} - - -/* - * Startup: write the file header. - */ - -METHODDEF(void) -start_output_gif (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - gif_dest_ptr dest = (gif_dest_ptr) dinfo; - - if (cinfo->quantize_colors) - emit_header(dest, cinfo->actual_number_of_colors, cinfo->colormap); - else - emit_header(dest, 256, (JSAMPARRAY) NULL); -} - - -/* - * Write some pixel data. - * In this module rows_supplied will always be 1. - */ - -METHODDEF(void) -put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -{ - gif_dest_ptr dest = (gif_dest_ptr) dinfo; - register JSAMPROW ptr; - register JDIMENSION col; - - ptr = dest->pub.buffer[0]; - for (col = cinfo->output_width; col > 0; col--) { - compress_pixel(dest, GETJSAMPLE(*ptr++)); - } -} - - -/* - * Finish up at the end of the file. - */ - -METHODDEF(void) -finish_output_gif (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - gif_dest_ptr dest = (gif_dest_ptr) dinfo; - - /* Flush "compression" mechanism */ - compress_term(dest); - /* Write a zero-length data block to end the series */ - putc(0, dest->pub.output_file); - /* Write the GIF terminator mark */ - putc(';', dest->pub.output_file); - /* Make sure we wrote the output file OK */ - fflush(dest->pub.output_file); - if (ferror(dest->pub.output_file)) - ERREXIT(cinfo, JERR_FILE_WRITE); -} - - -/* - * The module selection routine for GIF format output. - */ - -GLOBAL(djpeg_dest_ptr) -jinit_write_gif (j_decompress_ptr cinfo) -{ - gif_dest_ptr dest; - - /* Create module interface object, fill in method pointers */ - dest = (gif_dest_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(gif_dest_struct)); - dest->cinfo = cinfo; /* make back link for subroutines */ - dest->pub.start_output = start_output_gif; - dest->pub.put_pixel_rows = put_pixel_rows; - dest->pub.finish_output = finish_output_gif; - - if (cinfo->out_color_space != JCS_GRAYSCALE && - cinfo->out_color_space != JCS_RGB) - ERREXIT(cinfo, JERR_GIF_COLORSPACE); - - /* Force quantization if color or if > 8 bits input */ - if (cinfo->out_color_space != JCS_GRAYSCALE || cinfo->data_precision > 8) { - /* Force quantization to at most 256 colors */ - cinfo->quantize_colors = TRUE; - if (cinfo->desired_number_of_colors > 256) - cinfo->desired_number_of_colors = 256; - } - - /* Calculate output image dimensions so we can allocate space */ - jpeg_calc_output_dimensions(cinfo); - - if (cinfo->output_components != 1) /* safety check: just one component? */ - ERREXIT(cinfo, JERR_GIF_BUG); - - /* Create decompressor output buffer. */ - dest->pub.buffer = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, cinfo->output_width, (JDIMENSION) 1); - dest->pub.buffer_height = 1; - - return (djpeg_dest_ptr) dest; -} - -#endif /* GIF_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/wrjpgcom.1 b/gtkmm-osx/trunk/jpeg-6b/wrjpgcom.1 deleted file mode 100644 index d419a99..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/wrjpgcom.1 +++ /dev/null @@ -1,103 +0,0 @@ -.TH WRJPGCOM 1 "15 June 1995" -.SH NAME -wrjpgcom \- insert text comments into a JPEG file -.SH SYNOPSIS -.B wrjpgcom -[ -.B \-replace -] -[ -.BI \-comment " text" -] -[ -.BI \-cfile " name" -] -[ -.I filename -] -.LP -.SH DESCRIPTION -.LP -.B wrjpgcom -reads the named JPEG/JFIF file, or the standard input if no file is named, -and generates a new JPEG/JFIF file on standard output. A comment block is -added to the file. -.PP -The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. -Although the standard doesn't actually define what COM blocks are for, they -are widely used to hold user-supplied text strings. This lets you add -annotations, titles, index terms, etc to your JPEG files, and later retrieve -them as text. COM blocks do not interfere with the image stored in the JPEG -file. The maximum size of a COM block is 64K, but you can have as many of -them as you like in one JPEG file. -.PP -.B wrjpgcom -adds a COM block, containing text you provide, to a JPEG file. -Ordinarily, the COM block is added after any existing COM blocks; but you -can delete the old COM blocks if you wish. -.SH OPTIONS -Switch names may be abbreviated, and are not case sensitive. -.TP -.B \-replace -Delete any existing COM blocks from the file. -.TP -.BI \-comment " text" -Supply text for new COM block on command line. -.TP -.BI \-cfile " name" -Read text for new COM block from named file. -.PP -If you have only one line of comment text to add, you can provide it on the -command line with -.BR \-comment . -The comment text must be surrounded with quotes so that it is treated as a -single argument. Longer comments can be read from a text file. -.PP -If you give neither -.B \-comment -nor -.BR \-cfile , -then -.B wrjpgcom -will read the comment text from standard input. (In this case an input image -file name MUST be supplied, so that the source JPEG file comes from somewhere -else.) You can enter multiple lines, up to 64KB worth. Type an end-of-file -indicator (usually control-D) to terminate the comment text entry. -.PP -.B wrjpgcom -will not add a COM block if the provided comment string is empty. Therefore -\fB\-replace \-comment ""\fR can be used to delete all COM blocks from a file. -.SH EXAMPLES -.LP -Add a short comment to in.jpg, producing out.jpg: -.IP -.B wrjpgcom \-c -\fI"View of my back yard" in.jpg -.B > -.I out.jpg -.PP -Attach a long comment previously stored in comment.txt: -.IP -.B wrjpgcom -.I in.jpg -.B < -.I comment.txt -.B > -.I out.jpg -.PP -or equivalently -.IP -.B wrjpgcom -.B -cfile -.I comment.txt -.B < -.I in.jpg -.B > -.I out.jpg -.SH SEE ALSO -.BR cjpeg (1), -.BR djpeg (1), -.BR jpegtran (1), -.BR rdjpgcom (1) -.SH AUTHOR -Independent JPEG Group diff --git a/gtkmm-osx/trunk/jpeg-6b/wrjpgcom.c b/gtkmm-osx/trunk/jpeg-6b/wrjpgcom.c deleted file mode 100644 index 8c04b05..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/wrjpgcom.c +++ /dev/null @@ -1,583 +0,0 @@ -/* - * wrjpgcom.c - * - * Copyright (C) 1994-1997, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains a very simple stand-alone application that inserts - * user-supplied text as a COM (comment) marker in a JFIF file. - * This may be useful as an example of the minimum logic needed to parse - * JPEG markers. - */ - -#define JPEG_CJPEG_DJPEG /* to get the command-line config symbols */ -#include "jinclude.h" /* get auto-config symbols, */ - -#ifndef HAVE_STDLIB_H /* should declare malloc() */ -extern void * malloc (); -#endif -#include /* to declare isupper(), tolower() */ -#ifdef USE_SETMODE -#include /* to declare setmode()'s parameter macros */ -/* If you have setmode() but not , just delete this line: */ -#include /* to declare setmode() */ -#endif - -#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ -#ifdef __MWERKS__ -#include /* Metrowerks needs this */ -#include /* ... and this */ -#endif -#ifdef THINK_C -#include /* Think declares it here */ -#endif -#endif - -#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ -#define READ_BINARY "r" -#define WRITE_BINARY "w" -#else -#ifdef VMS /* VMS is very nonstandard */ -#define READ_BINARY "rb", "ctx=stm" -#define WRITE_BINARY "wb", "ctx=stm" -#else /* standard ANSI-compliant case */ -#define READ_BINARY "rb" -#define WRITE_BINARY "wb" -#endif -#endif - -#ifndef EXIT_FAILURE /* define exit() codes if not provided */ -#define EXIT_FAILURE 1 -#endif -#ifndef EXIT_SUCCESS -#ifdef VMS -#define EXIT_SUCCESS 1 /* VMS is very nonstandard */ -#else -#define EXIT_SUCCESS 0 -#endif -#endif - -/* Reduce this value if your malloc() can't allocate blocks up to 64K. - * On DOS, compiling in large model is usually a better solution. - */ - -#ifndef MAX_COM_LENGTH -#define MAX_COM_LENGTH 65000L /* must be <= 65533 in any case */ -#endif - - -/* - * These macros are used to read the input file and write the output file. - * To reuse this code in another application, you might need to change these. - */ - -static FILE * infile; /* input JPEG file */ - -/* Return next input byte, or EOF if no more */ -#define NEXTBYTE() getc(infile) - -static FILE * outfile; /* output JPEG file */ - -/* Emit an output byte */ -#define PUTBYTE(x) putc((x), outfile) - - -/* Error exit handler */ -#define ERREXIT(msg) (fprintf(stderr, "%s\n", msg), exit(EXIT_FAILURE)) - - -/* Read one byte, testing for EOF */ -static int -read_1_byte (void) -{ - int c; - - c = NEXTBYTE(); - if (c == EOF) - ERREXIT("Premature EOF in JPEG file"); - return c; -} - -/* Read 2 bytes, convert to unsigned int */ -/* All 2-byte quantities in JPEG markers are MSB first */ -static unsigned int -read_2_bytes (void) -{ - int c1, c2; - - c1 = NEXTBYTE(); - if (c1 == EOF) - ERREXIT("Premature EOF in JPEG file"); - c2 = NEXTBYTE(); - if (c2 == EOF) - ERREXIT("Premature EOF in JPEG file"); - return (((unsigned int) c1) << 8) + ((unsigned int) c2); -} - - -/* Routines to write data to output file */ - -static void -write_1_byte (int c) -{ - PUTBYTE(c); -} - -static void -write_2_bytes (unsigned int val) -{ - PUTBYTE((val >> 8) & 0xFF); - PUTBYTE(val & 0xFF); -} - -static void -write_marker (int marker) -{ - PUTBYTE(0xFF); - PUTBYTE(marker); -} - -static void -copy_rest_of_file (void) -{ - int c; - - while ((c = NEXTBYTE()) != EOF) - PUTBYTE(c); -} - - -/* - * JPEG markers consist of one or more 0xFF bytes, followed by a marker - * code byte (which is not an FF). Here are the marker codes of interest - * in this program. (See jdmarker.c for a more complete list.) - */ - -#define M_SOF0 0xC0 /* Start Of Frame N */ -#define M_SOF1 0xC1 /* N indicates which compression process */ -#define M_SOF2 0xC2 /* Only SOF0-SOF2 are now in common use */ -#define M_SOF3 0xC3 -#define M_SOF5 0xC5 /* NB: codes C4 and CC are NOT SOF markers */ -#define M_SOF6 0xC6 -#define M_SOF7 0xC7 -#define M_SOF9 0xC9 -#define M_SOF10 0xCA -#define M_SOF11 0xCB -#define M_SOF13 0xCD -#define M_SOF14 0xCE -#define M_SOF15 0xCF -#define M_SOI 0xD8 /* Start Of Image (beginning of datastream) */ -#define M_EOI 0xD9 /* End Of Image (end of datastream) */ -#define M_SOS 0xDA /* Start Of Scan (begins compressed data) */ -#define M_COM 0xFE /* COMment */ - - -/* - * Find the next JPEG marker and return its marker code. - * We expect at least one FF byte, possibly more if the compressor used FFs - * to pad the file. (Padding FFs will NOT be replicated in the output file.) - * There could also be non-FF garbage between markers. The treatment of such - * garbage is unspecified; we choose to skip over it but emit a warning msg. - * NB: this routine must not be used after seeing SOS marker, since it will - * not deal correctly with FF/00 sequences in the compressed image data... - */ - -static int -next_marker (void) -{ - int c; - int discarded_bytes = 0; - - /* Find 0xFF byte; count and skip any non-FFs. */ - c = read_1_byte(); - while (c != 0xFF) { - discarded_bytes++; - c = read_1_byte(); - } - /* Get marker code byte, swallowing any duplicate FF bytes. Extra FFs - * are legal as pad bytes, so don't count them in discarded_bytes. - */ - do { - c = read_1_byte(); - } while (c == 0xFF); - - if (discarded_bytes != 0) { - fprintf(stderr, "Warning: garbage data found in JPEG file\n"); - } - - return c; -} - - -/* - * Read the initial marker, which should be SOI. - * For a JFIF file, the first two bytes of the file should be literally - * 0xFF M_SOI. To be more general, we could use next_marker, but if the - * input file weren't actually JPEG at all, next_marker might read the whole - * file and then return a misleading error message... - */ - -static int -first_marker (void) -{ - int c1, c2; - - c1 = NEXTBYTE(); - c2 = NEXTBYTE(); - if (c1 != 0xFF || c2 != M_SOI) - ERREXIT("Not a JPEG file"); - return c2; -} - - -/* - * Most types of marker are followed by a variable-length parameter segment. - * This routine skips over the parameters for any marker we don't otherwise - * want to process. - * Note that we MUST skip the parameter segment explicitly in order not to - * be fooled by 0xFF bytes that might appear within the parameter segment; - * such bytes do NOT introduce new markers. - */ - -static void -copy_variable (void) -/* Copy an unknown or uninteresting variable-length marker */ -{ - unsigned int length; - - /* Get the marker parameter length count */ - length = read_2_bytes(); - write_2_bytes(length); - /* Length includes itself, so must be at least 2 */ - if (length < 2) - ERREXIT("Erroneous JPEG marker length"); - length -= 2; - /* Skip over the remaining bytes */ - while (length > 0) { - write_1_byte(read_1_byte()); - length--; - } -} - -static void -skip_variable (void) -/* Skip over an unknown or uninteresting variable-length marker */ -{ - unsigned int length; - - /* Get the marker parameter length count */ - length = read_2_bytes(); - /* Length includes itself, so must be at least 2 */ - if (length < 2) - ERREXIT("Erroneous JPEG marker length"); - length -= 2; - /* Skip over the remaining bytes */ - while (length > 0) { - (void) read_1_byte(); - length--; - } -} - - -/* - * Parse the marker stream until SOFn or EOI is seen; - * copy data to output, but discard COM markers unless keep_COM is true. - */ - -static int -scan_JPEG_header (int keep_COM) -{ - int marker; - - /* Expect SOI at start of file */ - if (first_marker() != M_SOI) - ERREXIT("Expected SOI marker first"); - write_marker(M_SOI); - - /* Scan miscellaneous markers until we reach SOFn. */ - for (;;) { - marker = next_marker(); - switch (marker) { - /* Note that marker codes 0xC4, 0xC8, 0xCC are not, and must not be, - * treated as SOFn. C4 in particular is actually DHT. - */ - case M_SOF0: /* Baseline */ - case M_SOF1: /* Extended sequential, Huffman */ - case M_SOF2: /* Progressive, Huffman */ - case M_SOF3: /* Lossless, Huffman */ - case M_SOF5: /* Differential sequential, Huffman */ - case M_SOF6: /* Differential progressive, Huffman */ - case M_SOF7: /* Differential lossless, Huffman */ - case M_SOF9: /* Extended sequential, arithmetic */ - case M_SOF10: /* Progressive, arithmetic */ - case M_SOF11: /* Lossless, arithmetic */ - case M_SOF13: /* Differential sequential, arithmetic */ - case M_SOF14: /* Differential progressive, arithmetic */ - case M_SOF15: /* Differential lossless, arithmetic */ - return marker; - - case M_SOS: /* should not see compressed data before SOF */ - ERREXIT("SOS without prior SOFn"); - break; - - case M_EOI: /* in case it's a tables-only JPEG stream */ - return marker; - - case M_COM: /* Existing COM: conditionally discard */ - if (keep_COM) { - write_marker(marker); - copy_variable(); - } else { - skip_variable(); - } - break; - - default: /* Anything else just gets copied */ - write_marker(marker); - copy_variable(); /* we assume it has a parameter count... */ - break; - } - } /* end loop */ -} - - -/* Command line parsing code */ - -static const char * progname; /* program name for error messages */ - - -static void -usage (void) -/* complain about bad command line */ -{ - fprintf(stderr, "wrjpgcom inserts a textual comment in a JPEG file.\n"); - fprintf(stderr, "You can add to or replace any existing comment(s).\n"); - - fprintf(stderr, "Usage: %s [switches] ", progname); -#ifdef TWO_FILE_COMMANDLINE - fprintf(stderr, "inputfile outputfile\n"); -#else - fprintf(stderr, "[inputfile]\n"); -#endif - - fprintf(stderr, "Switches (names may be abbreviated):\n"); - fprintf(stderr, " -replace Delete any existing comments\n"); - fprintf(stderr, " -comment \"text\" Insert comment with given text\n"); - fprintf(stderr, " -cfile name Read comment from named file\n"); - fprintf(stderr, "Notice that you must put quotes around the comment text\n"); - fprintf(stderr, "when you use -comment.\n"); - fprintf(stderr, "If you do not give either -comment or -cfile on the command line,\n"); - fprintf(stderr, "then the comment text is read from standard input.\n"); - fprintf(stderr, "It can be multiple lines, up to %u characters total.\n", - (unsigned int) MAX_COM_LENGTH); -#ifndef TWO_FILE_COMMANDLINE - fprintf(stderr, "You must specify an input JPEG file name when supplying\n"); - fprintf(stderr, "comment text from standard input.\n"); -#endif - - exit(EXIT_FAILURE); -} - - -static int -keymatch (char * arg, const char * keyword, int minchars) -/* Case-insensitive matching of (possibly abbreviated) keyword switches. */ -/* keyword is the constant keyword (must be lower case already), */ -/* minchars is length of minimum legal abbreviation. */ -{ - register int ca, ck; - register int nmatched = 0; - - while ((ca = *arg++) != '\0') { - if ((ck = *keyword++) == '\0') - return 0; /* arg longer than keyword, no good */ - if (isupper(ca)) /* force arg to lcase (assume ck is already) */ - ca = tolower(ca); - if (ca != ck) - return 0; /* no good */ - nmatched++; /* count matched characters */ - } - /* reached end of argument; fail if it's too short for unique abbrev */ - if (nmatched < minchars) - return 0; - return 1; /* A-OK */ -} - - -/* - * The main program. - */ - -int -main (int argc, char **argv) -{ - int argn; - char * arg; - int keep_COM = 1; - char * comment_arg = NULL; - FILE * comment_file = NULL; - unsigned int comment_length = 0; - int marker; - - /* On Mac, fetch a command line. */ -#ifdef USE_CCOMMAND - argc = ccommand(&argv); -#endif - - progname = argv[0]; - if (progname == NULL || progname[0] == 0) - progname = "wrjpgcom"; /* in case C library doesn't provide it */ - - /* Parse switches, if any */ - for (argn = 1; argn < argc; argn++) { - arg = argv[argn]; - if (arg[0] != '-') - break; /* not switch, must be file name */ - arg++; /* advance over '-' */ - if (keymatch(arg, "replace", 1)) { - keep_COM = 0; - } else if (keymatch(arg, "cfile", 2)) { - if (++argn >= argc) usage(); - if ((comment_file = fopen(argv[argn], "r")) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); - exit(EXIT_FAILURE); - } - } else if (keymatch(arg, "comment", 1)) { - if (++argn >= argc) usage(); - comment_arg = argv[argn]; - /* If the comment text starts with '"', then we are probably running - * under MS-DOG and must parse out the quoted string ourselves. Sigh. - */ - if (comment_arg[0] == '"') { - comment_arg = (char *) malloc((size_t) MAX_COM_LENGTH); - if (comment_arg == NULL) - ERREXIT("Insufficient memory"); - strcpy(comment_arg, argv[argn]+1); - for (;;) { - comment_length = (unsigned int) strlen(comment_arg); - if (comment_length > 0 && comment_arg[comment_length-1] == '"') { - comment_arg[comment_length-1] = '\0'; /* zap terminating quote */ - break; - } - if (++argn >= argc) - ERREXIT("Missing ending quote mark"); - strcat(comment_arg, " "); - strcat(comment_arg, argv[argn]); - } - } - comment_length = (unsigned int) strlen(comment_arg); - } else - usage(); - } - - /* Cannot use both -comment and -cfile. */ - if (comment_arg != NULL && comment_file != NULL) - usage(); - /* If there is neither -comment nor -cfile, we will read the comment text - * from stdin; in this case there MUST be an input JPEG file name. - */ - if (comment_arg == NULL && comment_file == NULL && argn >= argc) - usage(); - - /* Open the input file. */ - if (argn < argc) { - if ((infile = fopen(argv[argn], READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); - exit(EXIT_FAILURE); - } - } else { - /* default input file is stdin */ -#ifdef USE_SETMODE /* need to hack file mode? */ - setmode(fileno(stdin), O_BINARY); -#endif -#ifdef USE_FDOPEN /* need to re-open in binary mode? */ - if ((infile = fdopen(fileno(stdin), READ_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open stdin\n", progname); - exit(EXIT_FAILURE); - } -#else - infile = stdin; -#endif - } - - /* Open the output file. */ -#ifdef TWO_FILE_COMMANDLINE - /* Must have explicit output file name */ - if (argn != argc-2) { - fprintf(stderr, "%s: must name one input and one output file\n", - progname); - usage(); - } - if ((outfile = fopen(argv[argn+1], WRITE_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open %s\n", progname, argv[argn+1]); - exit(EXIT_FAILURE); - } -#else - /* Unix style: expect zero or one file name */ - if (argn < argc-1) { - fprintf(stderr, "%s: only one input file\n", progname); - usage(); - } - /* default output file is stdout */ -#ifdef USE_SETMODE /* need to hack file mode? */ - setmode(fileno(stdout), O_BINARY); -#endif -#ifdef USE_FDOPEN /* need to re-open in binary mode? */ - if ((outfile = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) { - fprintf(stderr, "%s: can't open stdout\n", progname); - exit(EXIT_FAILURE); - } -#else - outfile = stdout; -#endif -#endif /* TWO_FILE_COMMANDLINE */ - - /* Collect comment text from comment_file or stdin, if necessary */ - if (comment_arg == NULL) { - FILE * src_file; - int c; - - comment_arg = (char *) malloc((size_t) MAX_COM_LENGTH); - if (comment_arg == NULL) - ERREXIT("Insufficient memory"); - comment_length = 0; - src_file = (comment_file != NULL ? comment_file : stdin); - while ((c = getc(src_file)) != EOF) { - if (comment_length >= (unsigned int) MAX_COM_LENGTH) { - fprintf(stderr, "Comment text may not exceed %u bytes\n", - (unsigned int) MAX_COM_LENGTH); - exit(EXIT_FAILURE); - } - comment_arg[comment_length++] = (char) c; - } - if (comment_file != NULL) - fclose(comment_file); - } - - /* Copy JPEG headers until SOFn marker; - * we will insert the new comment marker just before SOFn. - * This (a) causes the new comment to appear after, rather than before, - * existing comments; and (b) ensures that comments come after any JFIF - * or JFXX markers, as required by the JFIF specification. - */ - marker = scan_JPEG_header(keep_COM); - /* Insert the new COM marker, but only if nonempty text has been supplied */ - if (comment_length > 0) { - write_marker(M_COM); - write_2_bytes(comment_length + 2); - while (comment_length > 0) { - write_1_byte(*comment_arg++); - comment_length--; - } - } - /* Duplicate the remainder of the source file. - * Note that any COM markers occuring after SOF will not be touched. - */ - write_marker(marker); - copy_rest_of_file(); - - /* All done. */ - exit(EXIT_SUCCESS); - return 0; /* suppress no-return-value warnings */ -} diff --git a/gtkmm-osx/trunk/jpeg-6b/wrppm.c b/gtkmm-osx/trunk/jpeg-6b/wrppm.c deleted file mode 100644 index 6c6d908..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/wrppm.c +++ /dev/null @@ -1,268 +0,0 @@ -/* - * wrppm.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to write output images in PPM/PGM format. - * The extended 2-byte-per-sample raw PPM/PGM formats are supported. - * The PBMPLUS library is NOT required to compile this software - * (but it is highly useful as a set of PPM image manipulation programs). - * - * These routines may need modification for non-Unix environments or - * specialized applications. As they stand, they assume output to - * an ordinary stdio stream. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef PPM_SUPPORTED - - -/* - * For 12-bit JPEG data, we either downscale the values to 8 bits - * (to write standard byte-per-sample PPM/PGM files), or output - * nonstandard word-per-sample PPM/PGM files. Downscaling is done - * if PPM_NORAWWORD is defined (this can be done in the Makefile - * or in jconfig.h). - * (When the core library supports data precision reduction, a cleaner - * implementation will be to ask for that instead.) - */ - -#if BITS_IN_JSAMPLE == 8 -#define PUTPPMSAMPLE(ptr,v) *ptr++ = (char) (v) -#define BYTESPERSAMPLE 1 -#define PPM_MAXVAL 255 -#else -#ifdef PPM_NORAWWORD -#define PUTPPMSAMPLE(ptr,v) *ptr++ = (char) ((v) >> (BITS_IN_JSAMPLE-8)) -#define BYTESPERSAMPLE 1 -#define PPM_MAXVAL 255 -#else -/* The word-per-sample format always puts the LSB first. */ -#define PUTPPMSAMPLE(ptr,v) \ - { register int val_ = v; \ - *ptr++ = (char) (val_ & 0xFF); \ - *ptr++ = (char) ((val_ >> 8) & 0xFF); \ - } -#define BYTESPERSAMPLE 2 -#define PPM_MAXVAL ((1<pub.output_file, dest->iobuffer, dest->buffer_width); -} - - -/* - * This code is used when we have to copy the data and apply a pixel - * format translation. Typically this only happens in 12-bit mode. - */ - -METHODDEF(void) -copy_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -{ - ppm_dest_ptr dest = (ppm_dest_ptr) dinfo; - register char * bufferptr; - register JSAMPROW ptr; - register JDIMENSION col; - - ptr = dest->pub.buffer[0]; - bufferptr = dest->iobuffer; - for (col = dest->samples_per_row; col > 0; col--) { - PUTPPMSAMPLE(bufferptr, GETJSAMPLE(*ptr++)); - } - (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); -} - - -/* - * Write some pixel data when color quantization is in effect. - * We have to demap the color index values to straight data. - */ - -METHODDEF(void) -put_demapped_rgb (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -{ - ppm_dest_ptr dest = (ppm_dest_ptr) dinfo; - register char * bufferptr; - register int pixval; - register JSAMPROW ptr; - register JSAMPROW color_map0 = cinfo->colormap[0]; - register JSAMPROW color_map1 = cinfo->colormap[1]; - register JSAMPROW color_map2 = cinfo->colormap[2]; - register JDIMENSION col; - - ptr = dest->pub.buffer[0]; - bufferptr = dest->iobuffer; - for (col = cinfo->output_width; col > 0; col--) { - pixval = GETJSAMPLE(*ptr++); - PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map0[pixval])); - PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map1[pixval])); - PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map2[pixval])); - } - (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); -} - - -METHODDEF(void) -put_demapped_gray (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -{ - ppm_dest_ptr dest = (ppm_dest_ptr) dinfo; - register char * bufferptr; - register JSAMPROW ptr; - register JSAMPROW color_map = cinfo->colormap[0]; - register JDIMENSION col; - - ptr = dest->pub.buffer[0]; - bufferptr = dest->iobuffer; - for (col = cinfo->output_width; col > 0; col--) { - PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map[GETJSAMPLE(*ptr++)])); - } - (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); -} - - -/* - * Startup: write the file header. - */ - -METHODDEF(void) -start_output_ppm (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - ppm_dest_ptr dest = (ppm_dest_ptr) dinfo; - - /* Emit file header */ - switch (cinfo->out_color_space) { - case JCS_GRAYSCALE: - /* emit header for raw PGM format */ - fprintf(dest->pub.output_file, "P5\n%ld %ld\n%d\n", - (long) cinfo->output_width, (long) cinfo->output_height, - PPM_MAXVAL); - break; - case JCS_RGB: - /* emit header for raw PPM format */ - fprintf(dest->pub.output_file, "P6\n%ld %ld\n%d\n", - (long) cinfo->output_width, (long) cinfo->output_height, - PPM_MAXVAL); - break; - default: - ERREXIT(cinfo, JERR_PPM_COLORSPACE); - } -} - - -/* - * Finish up at the end of the file. - */ - -METHODDEF(void) -finish_output_ppm (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - /* Make sure we wrote the output file OK */ - fflush(dinfo->output_file); - if (ferror(dinfo->output_file)) - ERREXIT(cinfo, JERR_FILE_WRITE); -} - - -/* - * The module selection routine for PPM format output. - */ - -GLOBAL(djpeg_dest_ptr) -jinit_write_ppm (j_decompress_ptr cinfo) -{ - ppm_dest_ptr dest; - - /* Create module interface object, fill in method pointers */ - dest = (ppm_dest_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(ppm_dest_struct)); - dest->pub.start_output = start_output_ppm; - dest->pub.finish_output = finish_output_ppm; - - /* Calculate output image dimensions so we can allocate space */ - jpeg_calc_output_dimensions(cinfo); - - /* Create physical I/O buffer. Note we make this near on a PC. */ - dest->samples_per_row = cinfo->output_width * cinfo->out_color_components; - dest->buffer_width = dest->samples_per_row * (BYTESPERSAMPLE * SIZEOF(char)); - dest->iobuffer = (char *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, dest->buffer_width); - - if (cinfo->quantize_colors || BITS_IN_JSAMPLE != 8 || - SIZEOF(JSAMPLE) != SIZEOF(char)) { - /* When quantizing, we need an output buffer for colormap indexes - * that's separate from the physical I/O buffer. We also need a - * separate buffer if pixel format translation must take place. - */ - dest->pub.buffer = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - cinfo->output_width * cinfo->output_components, (JDIMENSION) 1); - dest->pub.buffer_height = 1; - if (! cinfo->quantize_colors) - dest->pub.put_pixel_rows = copy_pixel_rows; - else if (cinfo->out_color_space == JCS_GRAYSCALE) - dest->pub.put_pixel_rows = put_demapped_gray; - else - dest->pub.put_pixel_rows = put_demapped_rgb; - } else { - /* We will fwrite() directly from decompressor output buffer. */ - /* Synthesize a JSAMPARRAY pointer structure */ - /* Cast here implies near->far pointer conversion on PCs */ - dest->pixrow = (JSAMPROW) dest->iobuffer; - dest->pub.buffer = & dest->pixrow; - dest->pub.buffer_height = 1; - dest->pub.put_pixel_rows = put_pixel_rows; - } - - return (djpeg_dest_ptr) dest; -} - -#endif /* PPM_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/wrrle.c b/gtkmm-osx/trunk/jpeg-6b/wrrle.c deleted file mode 100644 index a4e7337..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/wrrle.c +++ /dev/null @@ -1,305 +0,0 @@ -/* - * wrrle.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to write output images in RLE format. - * The Utah Raster Toolkit library is required (version 3.1 or later). - * - * These routines may need modification for non-Unix environments or - * specialized applications. As they stand, they assume output to - * an ordinary stdio stream. - * - * Based on code contributed by Mike Lijewski, - * with updates from Robert Hutchinson. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef RLE_SUPPORTED - -/* rle.h is provided by the Utah Raster Toolkit. */ - -#include - -/* - * We assume that JSAMPLE has the same representation as rle_pixel, - * to wit, "unsigned char". Hence we can't cope with 12- or 16-bit samples. - */ - -#if BITS_IN_JSAMPLE != 8 - Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ -#endif - - -/* - * Since RLE stores scanlines bottom-to-top, we have to invert the image - * from JPEG's top-to-bottom order. To do this, we save the outgoing data - * in a virtual array during put_pixel_row calls, then actually emit the - * RLE file during finish_output. - */ - - -/* - * For now, if we emit an RLE color map then it is always 256 entries long, - * though not all of the entries need be used. - */ - -#define CMAPBITS 8 -#define CMAPLENGTH (1<<(CMAPBITS)) - -typedef struct { - struct djpeg_dest_struct pub; /* public fields */ - - jvirt_sarray_ptr image; /* virtual array to store the output image */ - rle_map *colormap; /* RLE-style color map, or NULL if none */ - rle_pixel **rle_row; /* To pass rows to rle_putrow() */ - -} rle_dest_struct; - -typedef rle_dest_struct * rle_dest_ptr; - -/* Forward declarations */ -METHODDEF(void) rle_put_pixel_rows - JPP((j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied)); - - -/* - * Write the file header. - * - * In this module it's easier to wait till finish_output to write anything. - */ - -METHODDEF(void) -start_output_rle (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - rle_dest_ptr dest = (rle_dest_ptr) dinfo; - size_t cmapsize; - int i, ci; -#ifdef PROGRESS_REPORT - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; -#endif - - /* - * Make sure the image can be stored in RLE format. - * - * - RLE stores image dimensions as *signed* 16 bit integers. JPEG - * uses unsigned, so we have to check the width. - * - * - Colorspace is expected to be grayscale or RGB. - * - * - The number of channels (components) is expected to be 1 (grayscale/ - * pseudocolor) or 3 (truecolor/directcolor). - * (could be 2 or 4 if using an alpha channel, but we aren't) - */ - - if (cinfo->output_width > 32767 || cinfo->output_height > 32767) - ERREXIT2(cinfo, JERR_RLE_DIMENSIONS, cinfo->output_width, - cinfo->output_height); - - if (cinfo->out_color_space != JCS_GRAYSCALE && - cinfo->out_color_space != JCS_RGB) - ERREXIT(cinfo, JERR_RLE_COLORSPACE); - - if (cinfo->output_components != 1 && cinfo->output_components != 3) - ERREXIT1(cinfo, JERR_RLE_TOOMANYCHANNELS, cinfo->num_components); - - /* Convert colormap, if any, to RLE format. */ - - dest->colormap = NULL; - - if (cinfo->quantize_colors) { - /* Allocate storage for RLE-style cmap, zero any extra entries */ - cmapsize = cinfo->out_color_components * CMAPLENGTH * SIZEOF(rle_map); - dest->colormap = (rle_map *) (*cinfo->mem->alloc_small) - ((j_common_ptr) cinfo, JPOOL_IMAGE, cmapsize); - MEMZERO(dest->colormap, cmapsize); - - /* Save away data in RLE format --- note 8-bit left shift! */ - /* Shifting would need adjustment for JSAMPLEs wider than 8 bits. */ - for (ci = 0; ci < cinfo->out_color_components; ci++) { - for (i = 0; i < cinfo->actual_number_of_colors; i++) { - dest->colormap[ci * CMAPLENGTH + i] = - GETJSAMPLE(cinfo->colormap[ci][i]) << 8; - } - } - } - - /* Set the output buffer to the first row */ - dest->pub.buffer = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, dest->image, (JDIMENSION) 0, (JDIMENSION) 1, TRUE); - dest->pub.buffer_height = 1; - - dest->pub.put_pixel_rows = rle_put_pixel_rows; - -#ifdef PROGRESS_REPORT - if (progress != NULL) { - progress->total_extra_passes++; /* count file writing as separate pass */ - } -#endif -} - - -/* - * Write some pixel data. - * - * This routine just saves the data away in a virtual array. - */ - -METHODDEF(void) -rle_put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -{ - rle_dest_ptr dest = (rle_dest_ptr) dinfo; - - if (cinfo->output_scanline < cinfo->output_height) { - dest->pub.buffer = (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, dest->image, - cinfo->output_scanline, (JDIMENSION) 1, TRUE); - } -} - -/* - * Finish up at the end of the file. - * - * Here is where we really output the RLE file. - */ - -METHODDEF(void) -finish_output_rle (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - rle_dest_ptr dest = (rle_dest_ptr) dinfo; - rle_hdr header; /* Output file information */ - rle_pixel **rle_row, *red, *green, *blue; - JSAMPROW output_row; - char cmapcomment[80]; - int row, col; - int ci; -#ifdef PROGRESS_REPORT - cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; -#endif - - /* Initialize the header info */ - header = *rle_hdr_init(NULL); - header.rle_file = dest->pub.output_file; - header.xmin = 0; - header.xmax = cinfo->output_width - 1; - header.ymin = 0; - header.ymax = cinfo->output_height - 1; - header.alpha = 0; - header.ncolors = cinfo->output_components; - for (ci = 0; ci < cinfo->output_components; ci++) { - RLE_SET_BIT(header, ci); - } - if (cinfo->quantize_colors) { - header.ncmap = cinfo->out_color_components; - header.cmaplen = CMAPBITS; - header.cmap = dest->colormap; - /* Add a comment to the output image with the true colormap length. */ - sprintf(cmapcomment, "color_map_length=%d", cinfo->actual_number_of_colors); - rle_putcom(cmapcomment, &header); - } - - /* Emit the RLE header and color map (if any) */ - rle_put_setup(&header); - - /* Now output the RLE data from our virtual array. - * We assume here that (a) rle_pixel is represented the same as JSAMPLE, - * and (b) we are not on a machine where FAR pointers differ from regular. - */ - -#ifdef PROGRESS_REPORT - if (progress != NULL) { - progress->pub.pass_limit = cinfo->output_height; - progress->pub.pass_counter = 0; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } -#endif - - if (cinfo->output_components == 1) { - for (row = cinfo->output_height-1; row >= 0; row--) { - rle_row = (rle_pixel **) (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, dest->image, - (JDIMENSION) row, (JDIMENSION) 1, FALSE); - rle_putrow(rle_row, (int) cinfo->output_width, &header); -#ifdef PROGRESS_REPORT - if (progress != NULL) { - progress->pub.pass_counter++; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } -#endif - } - } else { - for (row = cinfo->output_height-1; row >= 0; row--) { - rle_row = (rle_pixel **) dest->rle_row; - output_row = * (*cinfo->mem->access_virt_sarray) - ((j_common_ptr) cinfo, dest->image, - (JDIMENSION) row, (JDIMENSION) 1, FALSE); - red = rle_row[0]; - green = rle_row[1]; - blue = rle_row[2]; - for (col = cinfo->output_width; col > 0; col--) { - *red++ = GETJSAMPLE(*output_row++); - *green++ = GETJSAMPLE(*output_row++); - *blue++ = GETJSAMPLE(*output_row++); - } - rle_putrow(rle_row, (int) cinfo->output_width, &header); -#ifdef PROGRESS_REPORT - if (progress != NULL) { - progress->pub.pass_counter++; - (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); - } -#endif - } - } - -#ifdef PROGRESS_REPORT - if (progress != NULL) - progress->completed_extra_passes++; -#endif - - /* Emit file trailer */ - rle_puteof(&header); - fflush(dest->pub.output_file); - if (ferror(dest->pub.output_file)) - ERREXIT(cinfo, JERR_FILE_WRITE); -} - - -/* - * The module selection routine for RLE format output. - */ - -GLOBAL(djpeg_dest_ptr) -jinit_write_rle (j_decompress_ptr cinfo) -{ - rle_dest_ptr dest; - - /* Create module interface object, fill in method pointers */ - dest = (rle_dest_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(rle_dest_struct)); - dest->pub.start_output = start_output_rle; - dest->pub.finish_output = finish_output_rle; - - /* Calculate output image dimensions so we can allocate space */ - jpeg_calc_output_dimensions(cinfo); - - /* Allocate a work array for output to the RLE library. */ - dest->rle_row = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, - cinfo->output_width, (JDIMENSION) cinfo->output_components); - - /* Allocate a virtual array to hold the image. */ - dest->image = (*cinfo->mem->request_virt_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, - (JDIMENSION) (cinfo->output_width * cinfo->output_components), - cinfo->output_height, (JDIMENSION) 1); - - return (djpeg_dest_ptr) dest; -} - -#endif /* RLE_SUPPORTED */ diff --git a/gtkmm-osx/trunk/jpeg-6b/wrtarga.c b/gtkmm-osx/trunk/jpeg-6b/wrtarga.c deleted file mode 100644 index cf104d2..0000000 --- a/gtkmm-osx/trunk/jpeg-6b/wrtarga.c +++ /dev/null @@ -1,253 +0,0 @@ -/* - * wrtarga.c - * - * Copyright (C) 1991-1996, Thomas G. Lane. - * This file is part of the Independent JPEG Group's software. - * For conditions of distribution and use, see the accompanying README file. - * - * This file contains routines to write output images in Targa format. - * - * These routines may need modification for non-Unix environments or - * specialized applications. As they stand, they assume output to - * an ordinary stdio stream. - * - * Based on code contributed by Lee Daniel Crocker. - */ - -#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ - -#ifdef TARGA_SUPPORTED - - -/* - * To support 12-bit JPEG data, we'd have to scale output down to 8 bits. - * This is not yet implemented. - */ - -#if BITS_IN_JSAMPLE != 8 - Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ -#endif - -/* - * The output buffer needs to be writable by fwrite(). On PCs, we must - * allocate the buffer in near data space, because we are assuming small-data - * memory model, wherein fwrite() can't reach far memory. If you need to - * process very wide images on a PC, you might have to compile in large-memory - * model, or else replace fwrite() with a putc() loop --- which will be much - * slower. - */ - - -/* Private version of data destination object */ - -typedef struct { - struct djpeg_dest_struct pub; /* public fields */ - - char *iobuffer; /* physical I/O buffer */ - JDIMENSION buffer_width; /* width of one row */ -} tga_dest_struct; - -typedef tga_dest_struct * tga_dest_ptr; - - -LOCAL(void) -write_header (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, int num_colors) -/* Create and write a Targa header */ -{ - char targaheader[18]; - - /* Set unused fields of header to 0 */ - MEMZERO(targaheader, SIZEOF(targaheader)); - - if (num_colors > 0) { - targaheader[1] = 1; /* color map type 1 */ - targaheader[5] = (char) (num_colors & 0xFF); - targaheader[6] = (char) (num_colors >> 8); - targaheader[7] = 24; /* 24 bits per cmap entry */ - } - - targaheader[12] = (char) (cinfo->output_width & 0xFF); - targaheader[13] = (char) (cinfo->output_width >> 8); - targaheader[14] = (char) (cinfo->output_height & 0xFF); - targaheader[15] = (char) (cinfo->output_height >> 8); - targaheader[17] = 0x20; /* Top-down, non-interlaced */ - - if (cinfo->out_color_space == JCS_GRAYSCALE) { - targaheader[2] = 3; /* image type = uncompressed gray-scale */ - targaheader[16] = 8; /* bits per pixel */ - } else { /* must be RGB */ - if (num_colors > 0) { - targaheader[2] = 1; /* image type = colormapped RGB */ - targaheader[16] = 8; - } else { - targaheader[2] = 2; /* image type = uncompressed RGB */ - targaheader[16] = 24; - } - } - - if (JFWRITE(dinfo->output_file, targaheader, 18) != (size_t) 18) - ERREXIT(cinfo, JERR_FILE_WRITE); -} - - -/* - * Write some pixel data. - * In this module rows_supplied will always be 1. - */ - -METHODDEF(void) -put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -/* used for unquantized full-color output */ -{ - tga_dest_ptr dest = (tga_dest_ptr) dinfo; - register JSAMPROW inptr; - register char * outptr; - register JDIMENSION col; - - inptr = dest->pub.buffer[0]; - outptr = dest->iobuffer; - for (col = cinfo->output_width; col > 0; col--) { - outptr[0] = (char) GETJSAMPLE(inptr[2]); /* RGB to BGR order */ - outptr[1] = (char) GETJSAMPLE(inptr[1]); - outptr[2] = (char) GETJSAMPLE(inptr[0]); - inptr += 3, outptr += 3; - } - (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); -} - -METHODDEF(void) -put_gray_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -/* used for grayscale OR quantized color output */ -{ - tga_dest_ptr dest = (tga_dest_ptr) dinfo; - register JSAMPROW inptr; - register char * outptr; - register JDIMENSION col; - - inptr = dest->pub.buffer[0]; - outptr = dest->iobuffer; - for (col = cinfo->output_width; col > 0; col--) { - *outptr++ = (char) GETJSAMPLE(*inptr++); - } - (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); -} - - -/* - * Write some demapped pixel data when color quantization is in effect. - * For Targa, this is only applied to grayscale data. - */ - -METHODDEF(void) -put_demapped_gray (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, - JDIMENSION rows_supplied) -{ - tga_dest_ptr dest = (tga_dest_ptr) dinfo; - register JSAMPROW inptr; - register char * outptr; - register JSAMPROW color_map0 = cinfo->colormap[0]; - register JDIMENSION col; - - inptr = dest->pub.buffer[0]; - outptr = dest->iobuffer; - for (col = cinfo->output_width; col > 0; col--) { - *outptr++ = (char) GETJSAMPLE(color_map0[GETJSAMPLE(*inptr++)]); - } - (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); -} - - -/* - * Startup: write the file header. - */ - -METHODDEF(void) -start_output_tga (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - tga_dest_ptr dest = (tga_dest_ptr) dinfo; - int num_colors, i; - FILE *outfile; - - if (cinfo->out_color_space == JCS_GRAYSCALE) { - /* Targa doesn't have a mapped grayscale format, so we will */ - /* demap quantized gray output. Never emit a colormap. */ - write_header(cinfo, dinfo, 0); - if (cinfo->quantize_colors) - dest->pub.put_pixel_rows = put_demapped_gray; - else - dest->pub.put_pixel_rows = put_gray_rows; - } else if (cinfo->out_color_space == JCS_RGB) { - if (cinfo->quantize_colors) { - /* We only support 8-bit colormap indexes, so only 256 colors */ - num_colors = cinfo->actual_number_of_colors; - if (num_colors > 256) - ERREXIT1(cinfo, JERR_TOO_MANY_COLORS, num_colors); - write_header(cinfo, dinfo, num_colors); - /* Write the colormap. Note Targa uses BGR byte order */ - outfile = dest->pub.output_file; - for (i = 0; i < num_colors; i++) { - putc(GETJSAMPLE(cinfo->colormap[2][i]), outfile); - putc(GETJSAMPLE(cinfo->colormap[1][i]), outfile); - putc(GETJSAMPLE(cinfo->colormap[0][i]), outfile); - } - dest->pub.put_pixel_rows = put_gray_rows; - } else { - write_header(cinfo, dinfo, 0); - dest->pub.put_pixel_rows = put_pixel_rows; - } - } else { - ERREXIT(cinfo, JERR_TGA_COLORSPACE); - } -} - - -/* - * Finish up at the end of the file. - */ - -METHODDEF(void) -finish_output_tga (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) -{ - /* Make sure we wrote the output file OK */ - fflush(dinfo->output_file); - if (ferror(dinfo->output_file)) - ERREXIT(cinfo, JERR_FILE_WRITE); -} - - -/* - * The module selection routine for Targa format output. - */ - -GLOBAL(djpeg_dest_ptr) -jinit_write_targa (j_decompress_ptr cinfo) -{ - tga_dest_ptr dest; - - /* Create module interface object, fill in method pointers */ - dest = (tga_dest_ptr) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - SIZEOF(tga_dest_struct)); - dest->pub.start_output = start_output_tga; - dest->pub.finish_output = finish_output_tga; - - /* Calculate output image dimensions so we can allocate space */ - jpeg_calc_output_dimensions(cinfo); - - /* Create I/O buffer. Note we make this near on a PC. */ - dest->buffer_width = cinfo->output_width * cinfo->output_components; - dest->iobuffer = (char *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, - (size_t) (dest->buffer_width * SIZEOF(char))); - - /* Create decompressor output buffer. */ - dest->pub.buffer = (*cinfo->mem->alloc_sarray) - ((j_common_ptr) cinfo, JPOOL_IMAGE, dest->buffer_width, (JDIMENSION) 1); - dest->pub.buffer_height = 1; - - return (djpeg_dest_ptr) dest; -} - -#endif /* TARGA_SUPPORTED */ diff --git a/gtkmm-osx/trunk/libpng-1.2.5/ANNOUNCE b/gtkmm-osx/trunk/libpng-1.2.5/ANNOUNCE deleted file mode 100644 index 04f46ec..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/ANNOUNCE +++ /dev/null @@ -1,29 +0,0 @@ - -Libpng 1.2.5 - October 3, 2002 - -This is a public release of libpng, intended for use in production codes. - -Changes since the last public release (1.2.4): - - Revised makefile.cygwin to use DLL number 12 instead of 13. - Added code to contrib/gregbook/readpng2.c to ignore unused chunks. - Replaced toucan.png in contrib/gregbook (it has been corrupt since 1.0.11) - Removed some stray *.o files from contrib/gregbook. - Changed png_error() to png_warning() about "Too much data" in pngpread.c - and about "Extra compressed data" in pngrutil.c. - Prevent png_ptr->pass from exceeding 7 in png_push_finish_row(). - Updated makefile.hggcc - Updated png.c and pnggccrd.c handling of return from png_mmx_support() - Only issue png_warning() about "Too much data" in pngpread.c when avail_in - is nonzero. - Updated makefiles to install a separate libpng.so.3 with its own rpath. - Revised makefiles to not remove previous minor versions of shared libraries. - Revised 13 makefiles to remove "-lz" and "-L$(ZLIBLIB)", etc., from shared - library loader directive. - Revised libpng-config script. - Relocated two misplaced PNGAPI lines in pngtest.c - -Send comments/corrections/commendations to -png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu - -Glenn R-P diff --git a/gtkmm-osx/trunk/libpng-1.2.5/CHANGES b/gtkmm-osx/trunk/libpng-1.2.5/CHANGES deleted file mode 100644 index d151a41..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/CHANGES +++ /dev/null @@ -1,1184 +0,0 @@ - -CHANGES - changes for libpng - -version 0.2 - added reader into png.h - fixed small problems in stub file -version 0.3 - added pull reader - split up pngwrite.c to several files - added pnglib.txt - added example.c - cleaned up writer, adding a few new tranformations - fixed some bugs in writer - interfaced with zlib 0.5 - added K&R support - added check for 64 KB blocks for 16 bit machines -version 0.4 - cleaned up code and commented code - simplified time handling into png_time - created png_color_16 and png_color_8 to handle color needs - cleaned up color type defines - fixed various bugs - made various names more consistant - interfaced with zlib 0.71 - cleaned up zTXt reader and writer (using zlib's Reset functions) - split transformations into pngrtran.c and pngwtran.c -version 0.5 - interfaced with zlib 0.8 - fixed many reading and writing bugs - saved using 3 spaces instead of tabs -version 0.6 - added png_large_malloc() and png_large_free() - added png_size_t - cleaned up some compiler warnings - added png_start_read_image() -version 0.7 - cleaned up lots of bugs - finished dithering and other stuff - added test program - changed name from pnglib to libpng -version 0.71 [June, 1995] - changed pngtest.png for zlib 0.93 - fixed error in libpng.txt and example.c -version 0.8 - cleaned up some bugs - added png_set_filler() - split up pngstub.c into pngmem.c, pngio.c, and pngerror.c - added #define's to remove unwanted code - moved png_info_init() to png.c - added old_size into png_realloc() - added functions to manually set filtering and compression info - changed compression parameters based on image type - optimized filter selection code - added version info - changed external functions passing floats to doubles (k&r problems?) - put all the configurable stuff in pngconf.h - enabled png_set_shift to work with paletted images on read - added png_read_update_info() - updates info structure with - transformations -version 0.81 [August, 1995] - incorporated Tim Wegner's medium model code (thanks, Tim) -version 0.82 [September, 1995] - [unspecified changes] -version 0.85 [December, 1995] - added more medium model code (almost everything's a far) - added i/o, error, and memory callback functions - fixed some bugs (16 bit, 4 bit interlaced, etc.) - added first run progressive reader (barely tested) -version 0.86 [January, 1996] - fixed bugs - improved documentation -version 0.87 [January, 1996] - fixed medium model bugs - fixed other bugs introduced in 0.85 and 0.86 - added some minor documentation -version 0.88 [January, 1996] - fixed progressive bugs - replaced tabs with spaces - cleaned up documentation - added callbacks for read/write and warning/error functions -version 0.89 [July, 1996] - added new initialization API to make libpng work better with shared libs - we now have png_create_read_struct(), png_create_write_struct(), - png_create_info_struct(), png_destroy_read_struct(), and - png_destroy_write_struct() instead of the separate calls to - malloc and png_read_init(), png_info_init(), and png_write_init() - changed warning/error callback functions to fix bug - this means you - should use the new initialization API if you were using the old - png_set_message_fn() calls, and that the old API no longer exists - so that people are aware that they need to change their code - changed filter selection API to allow selection of multiple filters - since it didn't work in previous versions of libpng anyways - optimized filter selection code - fixed png_set_background() to allow using an arbitrary RGB color for - paletted images - fixed gamma and background correction for paletted images, so - png_correct_palette is not needed unless you are correcting an - external palette (you will need to #define PNG_CORRECT_PALETTE_SUPPORTED - in pngconf.h) - if nobody uses this, it may disappear in the future. - fixed bug with Borland 64K memory allocation (Alexander Lehmann) - fixed bug in interlace handling (Smarasderagd, I think) - added more error checking for writing and image to reduce invalid files - separated read and write functions so that they won't both be linked - into a binary when only reading or writing functionality is used - new pngtest image also has interlacing and zTXt - updated documentation to reflect new API -version 0.90 [January, 1997] - made CRC errors/warnings on critical and ancillary chunks configurable - libpng will use the zlib CRC routines by (compile-time) default - changed DOS small/medium model memory support - needs zlib 1.04 (Tim Wegner) - added external C++ wrapper statements to png.h (Gilles Dauphin) - allow PNG file to be read when some or all of file signature has already - been read from the beginning of the stream. ****This affects the size - of info_struct and invalidates all programs that use a shared libpng**** - fixed png_filler() declarations - fixed? background color conversions - fixed order of error function pointers to match documentation - current chunk name is now available in png_struct to reduce the number - of nearly identical error messages (will simplify multi-lingual - support when available) - try to get ready for unknown-chunk callback functions: - - previously read critical chunks are flagged, so the chunk handling - routines can determine if the chunk is in the right place - - all chunk handling routines have the same prototypes, so we will - be able to handle all chunks via a callback mechanism - try to fix Linux "setjmp" buffer size problems - removed png_large_malloc, png_large_free, and png_realloc functions. -version 0.95 [March, 1997] - fixed bug in pngwutil.c allocating "up_row" twice and "avg_row" never - fixed bug in PNG file signature compares when start != 0 - changed parameter type of png_set_filler(...filler...) from png_byte - to png_uint_32 - added test for MACOS to ensure that both math.h and fp.h are not #included - added macros for libpng to be compiled as a Windows DLL (Andreas Kupries) - added "packswap" transformation, which changes the endianness of - packed-pixel bytes (Kevin Bracey) - added "strip_alpha" transformation, which removes the alpha channel of - input images without using it (not neccesarily a good idea) - added "swap_alpha" transformation, which puts the alpha channel in front - of the color bytes instead of after - removed all implicit variable tests which assume NULL == 0 (I think) - changed several variables to "png_size_t" to show 16/32-bit limitations - added new pCAL chunk read/write support - added experimental filter selection weighting (Greg Roelofs) - removed old png_set_rgbx() and png_set_xrgb() functions that have been - obsolete for about 2 years now (use png_set_filler() instead) - added macros to read 16- and 32-bit ints directly from buffer, to be - used only on those systems that support it (namely PowerPC and 680x0) - With some testing, this may become the default for MACOS/PPC systems. - only calculate CRC on data if we are going to use it - added macros for zTXt compression type PNG_zTXt_COMPRESSION_??? - added macros for simple libpng debugging output selectable at compile time - removed PNG_READ_END_MODE in progressive reader (Smarasderagd) - more description of info_struct in libpng.txt and png.h - more instructions in example.c - more chunk types tested in pngtest.c - renamed pngrcb.c to pngset.c, and all png_read_ functions to be - png_set_. We now have corresponding png_get_ - functions in pngget.c to get infomation in info_ptr. This isolates - the application from the internal organization of png_info_struct - (good for shared library implementations). -version 0.96 [May, 1997] - fixed serious bug with < 8bpp images introduced in 0.95 - fixed 256-color transparency bug (Greg Roelofs) - fixed up documentation (Greg Roelofs, Laszlo Nyul) - fixed "error" in pngconf.h for Linux setjmp() behaviour - fixed DOS medium model support (Tim Wegner) - fixed png_check_keyword() for case with error in static string text - added read of CRC after IEND chunk for embedded PNGs (Laszlo Nyul) - added typecasts to quiet compiler errors - added more debugging info -version 0.97 [January, 1998] - removed PNG_USE_OWN_CRC capability - relocated png_set_crc_action from pngrutil.c to pngrtran.c - fixed typecasts of "new_key", etc. (Andreas Dilger) - added RFC 1152 [sic] date support - fixed bug in gamma handling of 4-bit grayscale - added 2-bit grayscale gamma handling (Glenn R-P) - added more typecasts. 65536L becomes (png_uint_32)65536L, etc. (Glenn R-P) - minor corrections in libpng.txt - added simple sRGB support (Glenn R-P) - easier conditional compiling, e.g. define PNG_READ/WRITE_NOT_FULLY_SUPPORTED; - all configurable options can be selected from command-line instead - of having to edit pngconf.h (Glenn R-P) - fixed memory leak in pngwrite.c (free info_ptr->text) (Glenn R-P) - added more conditions for png_do_background, to avoid changing - black pixels to background when a background is supplied and - no pixels are transparent - repaired PNG_NO_STDIO behaviour - tested NODIV support and made it default behaviour (Greg Roelofs) - added "-m" option and PNGTEST_DEBUG_MEMORY to pngtest (John Bowler) - regularized version numbering scheme and bumped shared-library major - version number to 2 to avoid problems with libpng 0.89 apps (Greg Roelofs) -version 0.98 [January, 1998] - cleaned up some typos in libpng.txt and in code documentation - fixed memory leaks in pCAL chunk processing (Glenn R-P and John Bowler) - cosmetic change "display_gamma" to "screen_gamma" in pngrtran.c - changed recommendation about file_gamma for PC images to .51 from .45, - in example.c and libpng.txt, added comments to distinguish between - screen_gamma, viewing_gamma, and display_gamma. - changed all references to RFC1152 to read RFC1123 and changed the - PNG_TIME_RFC1152_SUPPORTED macro to PNG_TIME_RFC1123_SUPPORTED - added png_invert_alpha capability (Glenn R-P -- suggestion by Jon Vincent) - changed srgb_intent from png_byte to int to avoid compiler bugs -version 0.99 [January 30, 1998] - free info_ptr->text instead of end_info_ptr->text in pngread.c (John Bowler) - fixed a longstanding "packswap" bug in pngtrans.c - fixed some inconsistencies in pngconf.h that prevented compiling with - PNG_READ_GAMMA_SUPPORTED and PNG_READ_hIST_SUPPORTED undefined - fixed some typos and made other minor rearrangement of libpng.txt (Andreas) - changed recommendation about file_gamma for PC images to .50 from .51 in - example.c and libpng.txt, and changed file_gamma for sRGB images to .45 - added a number of functions to access information from the png structure - png_get_image_height(), etc. (Glenn R-P, suggestion by Brad Pettit) - added TARGET_MACOS similar to zlib-1.0.8 - define PNG_ALWAYS_EXTERN when __MWERKS__ && WIN32 are defined - added type casting to all png_malloc() function calls -version 0.99a [January 31, 1998] - Added type casts and parentheses to all returns that return a value.(Tim W.) -version 0.99b [February 4, 1998] - Added type cast png_uint_32 on malloc function calls where needed. - Changed type of num_hist from png_uint_32 to int (same as num_palette). - Added checks for rowbytes overflow, in case png_size_t is less than 32 bits. - Renamed makefile.elf to makefile.lnx. -version 0.99c [February 7, 1998] - More type casting. Removed erroneous overflow test in pngmem.c. - Added png_buffered_memcpy() and png_buffered_memset(), apply them to rowbytes. - Added UNIX manual pages libpng.3 (incorporating libpng.txt) and png.5. -version 0.99d [February 11, 1998] - Renamed "far_to_near()" "png_far_to_near()" - Revised libpng.3 - Version 99c "buffered" operations didn't work as intended. Replaced them - with png_memcpy_check() and png_memset_check(). - Added many "if (png_ptr == NULL) return" to quell compiler warnings about - unused png_ptr, mostly in pngget.c and pngset.c. - Check for overlength tRNS chunk present when indexed-color PLTE is read. - Cleaned up spelling errors in libpng.3/libpng.txt - Corrected a problem with png_get_tRNS() which returned undefined trans array -version 0.99e [February 28, 1998] - Corrected png_get_tRNS() again. - Add parentheses for easier reading of pngget.c, fixed "||" should be "&&". - Touched up example.c to make more of it compileable, although the entire - file still can't be compiled (Willem van Schaik) - Fixed a bug in png_do_shift() (Bryan Tsai) - Added a space in png.h prototype for png_write_chunk_start() - Replaced pngtest.png with one created with zlib 1.1.1 - Changed pngtest to report PASS even when file size is different (Jean-loup G.) - Corrected some logic errors in png_do_invert_alpha() (Chris Patterson) -version 0.99f [March 5, 1998] - Corrected a bug in pngpread() introduced in version 99c (Kevin Bracey) - Moved makefiles into a "scripts" directory, and added INSTALL instruction file - Added makefile.os2 and pngos2.def (A. Zabolotny) and makefile.s2x (W. Sebok) - Added pointers to "note on libpng versions" in makefile.lnx and README - Added row callback feature when reading and writing nonprogressive rows - and added a test of this feature in pngtest.c - Added user transform callbacks, with test of the feature in pngtest.c -version 0.99g [March 6, 1998, morning] - Minor changes to pngtest.c to suppress compiler warnings. - Removed "beta" language from documentation. -version 0.99h [March 6, 1998, evening] - Minor changes to previous minor changes to pngtest.c - Changed PNG_READ_NOT_FULLY_SUPPORTED to PNG_READ_TRANSFORMS_NOT_SUPPORTED - and added PNG_PROGRESSIVE_READ_NOT_SUPPORTED macro - Added user transform capability -version 1.00 [March 7, 1998] - Changed several typedefs in pngrutil.c - Added makefile.wat (Pawel Mrochen), updated makefile.tc3 (Willem van Schaik) - replaced "while(1)" with "for(;;)" - added PNGARG() to prototypes in pngtest.c and removed some prototypes - updated some of the makefiles (Tom Lane) - changed some typedefs (s_start, etc.) in pngrutil.c - fixed dimensions of "short_months" array in pngwrite.c - Replaced ansi2knr.c with the one from jpeg-v6 -version 1.0.0 [March 8, 1998] - Changed name from 1.00 to 1.0.0 (Adam Costello) - Added smakefile.ppc (with SCOPTIONS.ppc) for Amiga PPC (Andreas Kleinert) -version 1.0.0a [March 9, 1998] - Fixed three bugs in pngrtran.c to make gamma+background handling consistent - (Greg Roelofs) - Changed format of the PNG_LIBPNG_VER integer to xyyzz instead of xyz - for major, minor, and bugfix releases. This is 10001. (Adam Costello, - Tom Lane) - Make months range from 1-12 in png_convert_to_rfc1123 -version 1.0.0b [March 13, 1998] - Quieted compiler complaints about two empty "for" loops in pngrutil.c - Minor changes to makefile.s2x - Removed #ifdef/#endif around a png_free() in pngread.c -version 1.0.1 [March 14, 1998] - Changed makefile.s2x to reduce security risk of using a relative pathname - Fixed some typos in the documentation (Greg). - Fixed a problem with value of "channels" returned by png_read_update_info() -version 1.0.1a [April 21, 1998] - Optimized Paeth calculations by replacing abs() function calls with intrinsics - plus other loop optimizations. Improves avg decoding speed by about 20%. - Commented out i386istic "align" compiler flags in makefile.lnx. - Reduced the default warning level in some makefiles, to make them consistent. - Removed references to IJG and JPEG in the ansi2knr.c copyright statement. - Fixed a bug in png_do_strip_filler with XXRRGGBB => RRGGBB transformation. - Added grayscale and 16-bit capability to png_do_read_filler(). - Fixed a bug in pngset.c, introduced in version 0.99c, that sets rowbytes - too large when writing an image with bit_depth < 8 (Bob Dellaca). - Corrected some bugs in the experimental weighted filtering heuristics. - Moved a misplaced pngrutil code block that truncates tRNS if it has more - than num_palette entries -- test was done before num_palette was defined. - Fixed a png_convert_to_rfc1123() bug that converts day 31 to 0 (Steve Eddins). - Changed compiler flags in makefile.wat for better optimization (Pawel Mrochen). -version 1.0.1b [May 2, 1998] - Relocated png_do_gray_to_rgb() within png_do_read_transformations() (Greg). - Relocated the png_composite macros from pngrtran.c to png.h (Greg). - Added makefile.sco (contributed by Mike Hopkirk). - Fixed two bugs (missing definitions of "istop") introduced in libpng-1.0.1a. - Fixed a bug in pngrtran.c that would set channels=5 under some circumstances. - More work on the Paeth-filtering, achieving imperceptible speedup (A Kleinert). - More work on loop optimization which may help when compiled with C++ compilers. - Added warnings when people try to use transforms they've defined out. - Collapsed 4 "i" and "c" loops into single "i" loops in pngrtran and pngwtran. - Revised paragraph about png_set_expand() in libpng.txt and libpng.3 (Greg) -version 1.0.1c [May 11, 1998] - Fixed a bug in pngrtran.c (introduced in libpng-1.0.1a) where the masks for - filler bytes should have been 0xff instead of 0xf. - Added max_pixel_depth=32 in pngrutil.c when using FILLER with palette images. - Moved PNG_WRITE_WEIGHTED_FILTER_SUPPORTED and PNG_WRITE_FLUSH_SUPPORTED - out of the PNG_WRITE_TRANSFORMS_NOT_SUPPORTED block of pngconf.h - Added "PNG_NO_WRITE_TRANSFORMS" etc., as alternatives for *_NOT_SUPPORTED, - for consistency, in pngconf.h - Added individual "ifndef PNG_NO_[CAPABILITY]" in pngconf.h to make it easier - to remove unwanted capabilities via the compile line - Made some corrections to grammar (which, it's) in documentation (Greg). - Corrected example.c, use of row_pointers in png_write_image(). -version 1.0.1d [May 24, 1998] - Corrected several statements that used side effects illegally in pngrutil.c - and pngtrans.c, that were introduced in version 1.0.1b - Revised png_read_rows() to avoid repeated if-testing for NULL (A Kleinert) - More corrections to example.c, use of row_pointers in png_write_image() - and png_read_rows(). - Added pngdll.mak and pngdef.pas to scripts directory, contributed by - Bob Dellaca, to make a png32bd.dll with Borland C++ 4.5 - Fixed error in example.c with png_set_text: num_text is 3, not 2 (Guido V.) - Changed several loops from count-down to count-up, for consistency. -version 1.0.1e [June 6, 1998] - Revised libpng.txt and libpng.3 description of png_set_read|write_fn(), and - added warnings when people try to set png_read_fn and png_write_fn in - the same structure. - Added a test such that png_do_gamma will be done when num_trans==0 - for truecolor images that have defined a background. This corrects an - error that was introduced in libpng-0.90 that can cause gamma processing - to be skipped. - Added tests in png.h to include "trans" and "trans_values" in structures - when PNG_READ_BACKGROUND_SUPPORTED or PNG_READ_EXPAND_SUPPORTED is defined. - Add png_free(png_ptr->time_buffer) in png_destroy_read_struct() - Moved png_convert_to_rfc_1123() from pngwrite.c to png.c - Added capability for user-provided malloc_fn() and free_fn() functions, - and revised pngtest.c to demonstrate their use, replacing the - PNGTEST_DEBUG_MEM feature. - Added makefile.w32, for Microsoft C++ 4.0 and later (Tim Wegner). -version 1.0.2 [June 14, 1998] - Fixed two bugs in makefile.bor . -version 1.0.2a [December 30, 1998] - Replaced and extended code that was removed from png_set_filler() in 1.0.1a. - Fixed a bug in png_do_filler() that made it fail to write filler bytes in - the left-most pixel of each row (Kevin Bracey). - Changed "static pngcharp tIME_string" to "static char tIME_string[30]" - in pngtest.c (Duncan Simpson). - Fixed a bug in pngtest.c that caused pngtest to try to write a tIME chunk - even when no tIME chunk was present in the source file. - Fixed a problem in pngrutil.c: gray_to_rgb didn't always work with 16-bit. - Fixed a problem in png_read_push_finish_row(), which would not skip some - passes that it should skip, for images that are less than 3 pixels high. - Interchanged the order of calls to png_do_swap() and png_do_shift() - in pngwtran.c (John Cromer). - Added #ifdef PNG_DEBUG/#endif surrounding use of PNG_DEBUG in png.h . - Changed "bad adaptive filter type" from error to warning in pngrutil.c . - Fixed a documentation error about default filtering with 8-bit indexed-color. - Separated the PNG_NO_STDIO macro into PNG_NO_STDIO and PNG_NO_CONSOLE_IO - (L. Peter Deutsch). - Added png_set_rgb_to_gray() and png_get_rgb_to_gray_status() functions. - Added png_get_copyright() and png_get_header_version() functions. - Revised comments on png_set_progressive_read_fn() in libpng.txt and example.c - Added information about debugging in libpng.txt and libpng.3 . - Changed "ln -sf" to "ln -s -f" in makefile.s2x, makefile.lnx, and makefile.sco. - Removed lines after Dynamic Dependencies" in makefile.aco . - Revised makefile.dec to make a shared library (Jeremie Petit). - Removed trailing blanks from all files. -version 1.0.2a [January 6, 1999] - Removed misplaced #endif and #ifdef PNG_NO_EXTERN near the end of png.h - Added "if" tests to silence complaints about unused png_ptr in png.h and png.c - Changed "check_if_png" function in example.c to return true (nonzero) if PNG. - Changed libpng.txt to demonstrate png_sig_cmp() instead of png_check_sig() - which is obsolete. -version 1.0.3 [January 14, 1999] - Added makefile.hux, for Hewlett Packard HPUX 10.20 and 11.00 (Jim Rice) - Added a statement of Y2K compliance in png.h, libpng.3, and Y2KINFO. -version 1.0.3a [August 12, 1999] - Added check for PNG_READ_INTERLACE_SUPPORTED in pngread.c; issue a warning - if an attempt is made to read an interlaced image when it's not supported. - Added check if png_ptr->trans is defined before freeing it in pngread.c - Modified the Y2K statement to include versions back to version 0.71 - Fixed a bug in the check for valid IHDR bit_depth/color_types in pngrutil.c - Modified makefile.wat (added -zp8 flag, ".symbolic", changed some comments) - Replaced leading blanks with tab characters in makefile.hux - Changed "dworkin.wustl.edu" to "ccrc.wustl.edu" in various documents. - Changed (float)red and (float)green to (double)red, (double)green - in png_set_rgb_to_gray() to avoid "promotion" problems in AIX. - Fixed a bug in pngconf.h that omitted when PNG_DEBUG==0 (K Bracey). - Reformatted libpng.3 and libpngpf.3 with proper fonts (script by J. vanZandt). - Updated documentation to refer to the PNG-1.2 specification. - Removed ansi2knr.c and left pointers to the latest source for ansi2knr.c - in makefile.knr, INSTALL, and README (L. Peter Deutsch) - Fixed bugs in calculation of the length of rowbytes when adding alpha - channels to 16-bit images, in pngrtran.c (Chris Nokleberg) - Added function png_set_user_transform_info() to store user_transform_ptr, - user_depth, and user_channels into the png_struct, and a function - png_get_user_transform_ptr() to retrieve the pointer (Chris Nokleberg) - Added function png_set_empty_plte_permitted() to make libpng useable - in MNG applications. - Corrected the typedef for png_free_ptr in png.h (Jesse Jones). - Correct gamma with srgb is 45455 instead of 45000 in pngrutil.c, to be - consistent with PNG-1.2, and allow variance of 500 before complaining. - Added assembler code contributed by Intel in file pngvcrd.c and modified - makefile.w32 to use it (Nirav Chhatrapati, INTEL Corporation, Gilles Vollant) - Changed "ln -s -f" to "ln -f -s" in the makefiles to make Solaris happy. - Added some aliases for png_set_expand() in pngrtran.c, namely - png_set_expand_PLTE(), png_set_expand_depth(), and png_set_expand_tRNS() - (Greg Roelofs, in "PNG: The Definitive Guide"). - Added makefile.beo for BEOS on X86, contributed by Sander Stok. -version 1.0.3b [August 26, 1999] - Replaced 2147483647L several places with PNG_MAX_UINT macro, defined in png.h - Changed leading blanks to tabs in all makefiles. - Define PNG_USE_PNGVCRD in makefile.w32, to get MMX assembler code. - Made alternate versions of png_set_expand() in pngrtran.c, namely - png_set_gray_1_2_4_to_8, png_set_palette_to_rgb, and png_set_tRNS_to_alpha - (Greg Roelofs, in "PNG: The Definitive Guide"). Deleted the 1.0.3a aliases. - Relocated start of 'extern "C"' block in png.h so it doesn't include pngconf.h - Revised calculation of num_blocks in pngmem.c to avoid a potentially - negative shift distance, whose results are undefined in the C language. - Added a check in pngset.c to prevent writing multiple tIME chunks. - Added a check in pngwrite.c to detect invalid small window_bits sizes. -version 1.0.3d [September 4, 1999] - Fixed type casting of igamma in pngrutil.c - Added new png_expand functions to scripts/pngdef.pas and pngos2.def - Added a demo read_user_transform_fn that examines the row filters in pngtest.c -version 1.0.4 [September 24, 1999] - Define PNG_ALWAYS_EXTERN in pngconf.h if __STDC__ is defined - Delete #define PNG_INTERNAL and include "png.h" from pngasmrd.h - Made several minor corrections to pngtest.c - Renamed the makefiles with longer but more user friendly extensions. - Copied the PNG copyright and license to a separate LICENSE file. - Revised documentation, png.h, and example.c to remove reference to - "viewing_gamma" which no longer appears in the PNG specification. - Revised pngvcrd.c to use MMX code for interlacing only on the final pass. - Updated pngvcrd.c to use the faster C filter algorithms from libpng-1.0.1a - Split makefile.win32vc into two versions, makefile.vcawin32 (uses MMX - assembler code) and makefile.vcwin32 (doesn't). - Added a CPU timing report to pngtest.c (enabled by defining PNGTEST_TIMING) - Added a copy of pngnow.png to the distribution. -version 1.0.4a [September 25, 1999] - Increase max_pixel_depth in pngrutil.c if a user transform needs it. - Changed several division operations to right-shifts in pngvcrd.c -version 1.0.4b [September 30, 1999] - Added parentheses in line 3732 of pngvcrd.c - Added a comment in makefile.linux warning about buggy -O3 in pgcc 2.95.1 -version 1.0.4c [October 1, 1999] - Added a "png_check_version" function in png.c and pngtest.c that will generate - a helpful compiler error if an old png.h is found in the search path. - Changed type of png_user_transform_depth|channels from int to png_byte. -version 1.0.4d [October 6, 1999] - Changed 0.45 to 0.45455 in png_set_sRGB() - Removed unused PLTE entries from pngnow.png - Re-enabled some parts of pngvcrd.c (png_combine_row) that work properly. -version 1.0.4e [October 10, 1999] - Fixed sign error in pngvcrd.c (Greg Roelofs) - Replaced some instances of memcpy with simple assignments in pngvcrd (GR-P) -version 1.0.4f [October 15, 1999] - Surrounded example.c code with #if 0 .. #endif to prevent people from - inadvertently trying to compile it. - Changed png_get_header_version() from a function to a macro in png.h - Added type casting mostly in pngrtran.c and pngwtran.c - Removed some pointless "ptr = NULL" in pngmem.c - Added a "contrib" directory containing the source code from Greg's book. -version 1.0.5 [October 15, 1999] - Minor editing of the INSTALL and README files. -version 1.0.5a [October 23, 1999] - Added contrib/pngsuite and contrib/pngminus (Willem van Schaik) - Fixed a typo in the png_set_sRGB() function call in example.c (Jan Nijtmans) - Further optimization and bugfix of pngvcrd.c - Revised pngset.c so that it does not allocate or free memory in the user's - text_ptr structure. Instead, it makes its own copy. - Created separate write_end_info_struct in pngtest.c for a more severe test. - Added code in pngwrite.c to free info_ptr->text[i].key to stop a memory leak. -version 1.0.5b [November 23, 1999] - Moved PNG_FLAG_HAVE_CHUNK_HEADER, PNG_FLAG_BACKGROUND_IS_GRAY and - PNG_FLAG_WROTE_tIME from flags to mode. - Added png_write_info_before_PLTE() function. - Fixed some typecasting in contrib/gregbook/*.c - Updated scripts/makevms.com and added makevms.com to contrib/gregbook - and contrib/pngminus (Martin Zinser) -version 1.0.5c [November 26, 1999] - Moved png_get_header_version from png.h to png.c, to accomodate ansi2knr. - Removed all global arrays (according to PNG_NO_GLOBAL_ARRAYS macro), to - accomodate making DLL's: Moved usr_png_ver from global variable to function - png_get_header_ver() in png.c. Moved png_sig to png_sig_bytes in png.c and - eliminated use of png_sig in pngwutil.c. Moved the various png_CHNK arrays - into pngtypes.h. Eliminated use of global png_pass arrays. Declared the - png_CHNK and png_pass arrays to be "const". Made the global arrays - available to applications (although none are used in libpng itself) when - PNG_NO_GLOBAL_ARRAYS is not defined or when PNG_GLOBAL_ARRAYS is defined. - Removed some extraneous "-I" from contrib/pngminus/makefile.std - Changed the PNG_sRGB_INTENT macros in png.h to be consistent with PNG-1.2. - Change PNG_SRGB_INTENT to PNG_sRGB_INTENT in libpng.txt and libpng.3 -version 1.0.5d [November 29, 1999] - Add type cast (png_const_charp) two places in png.c - Eliminated pngtypes.h; use macros instead to declare PNG_CHNK arrays. - Renamed "PNG_GLOBAL_ARRAYS" to "PNG_USE_GLOBAL_ARRAYS" and made available - to applications a macro "PNG_USE_LOCAL_ARRAYS". - #ifdef out all the new declarations when PNG_USE_GLOBAL_ARRAYS is defined. - Added PNG_EXPORT_VAR macro to accommodate making DLL's. -version 1.0.5e [November 30, 1999] - Added iCCP, iTXt, and sPLT support; added "lang" member to the png_text - structure; refactored the inflate/deflate support to make adding new chunks - with trailing compressed parts easier in the future, and added new functions - png_free_iCCP, png_free_pCAL, png_free_sPLT, png_free_text, png_get_iCCP, - png_get_spalettes, png_set_iCCP, png_set_spalettes (Eric S. Raymond). - NOTE: Applications that write text chunks MUST define png_text->lang - before calling png_set_text(). It must be set to NULL if you want to - write tEXt or zTXt chunks. If you want your application to be able to - run with older versions of libpng, use - - #ifdef PNG_iTXt_SUPPORTED - png_text[i].lang = NULL; - #endif - - Changed png_get_oFFs() and png_set_oFFs() to use signed rather than unsigned - offsets (Eric S. Raymond). - Combined PNG_READ_cHNK_SUPPORTED and PNG_WRITE_cHNK_SUPPORTED macros into - PNG_cHNK_SUPPORTED and combined the three types of PNG_text_SUPPORTED - macros, leaving the separate macros also available. - Removed comments on #endifs at the end of many short, non-nested #if-blocks. -version 1.0.5f [December 6, 1999] - Changed makefile.solaris to issue a warning about potential problems when - the ucb "ld" is in the path ahead of the ccs "ld". - Removed "- [date]" from the "synopsis" line in libpng.3 and libpngpf.3. - Added sCAL chunk support (Eric S. Raymond). -version 1.0.5g [December 7, 1999] - Fixed "png_free_spallettes" typo in png.h - Added code to handle new chunks in pngpread.c - Moved PNG_CHNK string macro definitions outside of PNG_NO_EXTERN block - Added "translated_key" to png_text structure and png_write_iTXt(). - Added code in pngwrite.c to work around a newly discovered zlib bug. -version 1.0.5h [December 10, 1999] - NOTE: regarding the note for version 1.0.5e, the following must also - be included in your code: - png_text[i].translated_key = NULL; - Unknown chunk handling is now supported. - Option to eliminate all floating point support was added. Some new - fixed-point functions such as png_set_gAMA_fixed() were added. - Expanded tabs and removed trailing blanks in source files. -version 1.0.5i [December 13, 1999] - Added some type casts to silence compiler warnings. - Renamed "png_free_spalette" to "png_free_spalettes" for consistency. - Removed leading blanks from a #define in pngvcrd.c - Added some parameters to the new png_set_keep_unknown_chunks() function. - Added a test for up->location != 0 in the first instance of writing - unknown chunks in pngwrite.c - Changed "num" to "i" in png_free_spalettes() and png_free_unknowns() to - prevent recursion. - Added png_free_hIST() function. - Various patches to fix bugs in the sCAL and integer cHRM processing, - and to add some convenience macros for use with sCAL. -version 1.0.5j [December 21, 1999] - Changed "unit" parameter of png_write_sCAL from png_byte to int, to work - around buggy compilers. - Added new type "png_fixed_point" for integers that hold float*100000 values - Restored backward compatibility of tEXt/zTXt chunk processing: - Restored the first four members of png_text to the same order as v.1.0.5d. - Added members "lang_key" and "itxt_length" to png_text struct. Set - text_length=0 when "text" contains iTXt data. Use the "compression" - member to distinguish among tEXt/zTXt/iTXt types. Added - PNG_ITXT_COMPRESSION_NONE (1) and PNG_ITXT_COMPRESSION_zTXt(2) macros. - The "Note" above, about backward incompatibility of libpng-1.0.5e, no - longer applies. - Fixed png_read|write_iTXt() to read|write parameters in the right order, - and to write the iTXt chunk after IDAT if it appears in the end_ptr. - Added pnggccrd.c, version of pngvcrd.c Intel assembler for gcc (Greg Roelofs) - Reversed the order of trying to write floating-point and fixed-point gAMA. -version 1.0.5k [December 27, 1999] - Added many parentheses, e.g., "if (a && b & c)" becomes "if (a && (b & c))" - Added png_handle_as_unknown() function (Glenn) - Added png_free_chunk_list() function and chunk_list and num_chunk_list members - of png_ptr. - Eliminated erroneous warnings about multiple sPLT chunks and sPLT-after-PLTE. - Fixed a libpng-1.0.5h bug in pngrutil.c that was issuing erroneous warnings - about ignoring incorrect gAMA with sRGB (gAMA was in fact not ignored) - Added png_free_tRNS(); png_set_tRNS() now malloc's its own trans array (ESR). - Define png_get_int_32 when oFFs chunk is supported as well as when pCAL is. - Changed type of proflen from png_int_32 to png_uint_32 in png_get_iCCP(). -version 1.0.5l [January 1, 2000] - Added functions png_set_read_user_chunk_fn() and png_get_user_chunk_ptr() - for setting a callback function to handle unknown chunks and for - retrieving the associated user pointer (Glenn). -version 1.0.5m [January 7, 2000] - Added high-level functions png_read_png(), png_write_png(), png_free_pixels(). -version 1.0.5n [January 9, 2000] - Added png_free_PLTE() function, and modified png_set_PLTE() to malloc its - own memory for info_ptr->palette. This makes it safe for the calling - application to free its copy of the palette any time after it calls - png_set_PLTE(). -version 1.0.5o [January 20, 2000] - Cosmetic changes only (removed some trailing blanks and TABs) -version 1.0.5p [January 31, 2000] - Renamed pngdll.mak to makefile.bd32 - Cosmetic changes in pngtest.c -version 1.0.5q [February 5, 2000] - Relocated the makefile.solaris warning about PATH problems. - Fixed pngvcrd.c bug by pushing/popping registers in mmxsupport (Bruce Oberg) - Revised makefile.gcmmx - Added PNG_SETJMP_SUPPORTED, PNG_SETJMP_NOT_SUPPORTED, and PNG_ABORT() macros -version 1.0.5r [February 7, 2000] - Removed superfluous prototype for png_get_itxt from png.h - Fixed a bug in pngrtran.c that improperly expanded the background color. - Return *num_text=0 from png_get_text() when appropriate, and fix documentation - of png_get_text() in libpng.txt/libpng.3. -version 1.0.5s [February 18, 2000] - Added "png_jmp_env()" macro to pngconf.h, to help people migrate to the - new error handler that's planned for the next libpng release, and changed - example.c, pngtest.c, and contrib programs to use this macro. - Revised some of the DLL-export macros in pngconf.h (Greg Roelofs) - Fixed a bug in png_read_png() that caused it to fail to expand some images - that it should have expanded. - Fixed some mistakes in the unused and undocumented INCH_CONVERSIONS functions - in pngget.c - Changed the allocation of palette, history, and trans arrays back to - the version 1.0.5 method (linking instead of copying) which restores - backward compatibility with version 1.0.5. Added some remarks about - that in example.c. Added "free_me" member to info_ptr and png_ptr - and added png_free_data() function. - Updated makefile.linux and makefile.gccmmx to make directories conditionally. - Made cosmetic changes to pngasmrd.h - Added png_set_rows() and png_get_rows(), for use with png_read|write_png(). - Modified png_read_png() to allocate info_ptr->row_pointers only if it - hasn't already been allocated. -version 1.0.5t [March 4, 2000] - Changed png_jmp_env() migration aiding macro to png_jmpbuf(). - Fixed "interlace" typo (should be "interlaced") in contrib/gregbook/read2-x.c - Fixed bug with use of PNG_BEFORE_IHDR bit in png_ptr->mode, introduced when - PNG_FLAG_HAVE_CHUNK_HEADER was moved into png_ptr->mode in version 1.0.5b - Files in contrib/gregbook were revised to use png_jmpbuf() and to select - a 24-bit visual if one is available, and to allow abbreviated options. - Files in contrib/pngminus were revised to use the png_jmpbuf() macro. - Removed spaces in makefile.linux and makefile.gcmmx, introduced in 1.0.5s -version 1.0.5u [March 5, 2000] - Simplified the code that detects old png.h in png.c and pngtest.c - Renamed png_spalette (_p, _pp) to png_sPLT_t (_tp, _tpp) - Increased precision of rgb_to_gray calculations from 8 to 15 bits and - added png_set_rgb_to_gray_fixed() function. - Added makefile.bc32 (32-bit Borland C++, C mode) -version 1.0.5v [March 11, 2000] - Added some parentheses to the png_jmpbuf macro definition. - Updated references to the zlib home page, which has moved to freesoftware.com. - Corrected bugs in documentation regarding png_read_row() and png_write_row(). - Updated documentation of png_rgb_to_gray calculations in libpng.3/libpng.txt. - Renamed makefile.borland,turboc3 back to makefile.bor,tc3 as in version 1.0.3, - revised borland makefiles; added makefile.ibmvac3 and makefile.gcc (Cosmin) -version 1.0.6 [March 20, 2000] - Minor revisions of makefile.bor, libpng.txt, and gregbook/rpng2-win.c - Added makefile.sggcc (SGI IRIX with gcc) -version 1.0.6d [April 7, 2000] - Changed sprintf() to strcpy() in png_write_sCAL_s() to work without STDIO - Added data_length parameter to png_decompress_chunk() function - Revised documentation to remove reference to abandoned png_free_chnk functions - Fixed an error in png_rgb_to_gray_fixed() - Revised example.c, usage of png_destroy_write_struct(). - Renamed makefile.ibmvac3 to makefile.ibmc, added libpng.icc IBM project file - Added a check for info_ptr->free_me&PNG_FREE_TEXT when freeing text in png.c - Simplify png_sig_bytes() function to remove use of non-ISO-C strdup(). -version 1.0.6e [April 9, 2000] - Added png_data_freer() function. - In the code that checks for over-length tRNS chunks, added check of - info_ptr->num_trans as well as png_ptr->num_trans (Matthias Benckmann) - Minor revisions of libpng.txt/libpng.3. - Check for existing data and free it if the free_me flag is set, in png_set_*() - and png_handle_*(). - Only define PNG_WEIGHTED_FILTERS_SUPPORTED when PNG_FLOATING_POINT_SUPPORTED - is defined. - Changed several instances of PNG_NO_CONSOLE_ID to PNG_NO_STDIO in pngrutil.c - and mentioned the purposes of the two macros in libpng.txt/libpng.3. -version 1.0.6f [April 14, 2000] - Revised png_set_iCCP() and png_set_rows() to avoid prematurely freeing data. - Add checks in png_set_text() for NULL members of the input text structure. - Revised libpng.txt/libpng.3. - Removed superfluous prototype for png_set_itxt from png.h - Removed "else" from pngread.c, after png_error(), and changed "0" to "length". - Changed several png_errors about malformed ancillary chunks to png_warnings. -version 1.0.6g [April 24, 2000] - Added png_pass-* arrays to pnggccrd.c when PNG_USE_LOCAL_ARRAYS is defined. - Relocated paragraph about png_set_background() in libpng.3/libpng.txt - and other revisions (Matthias Benckmann) - Relocated info_ptr->free_me, png_ptr->free_me, and other info_ptr and - png_ptr members to restore binary compatibility with libpng-1.0.5 - (breaks compatibility with libpng-1.0.6). -version 1.0.6h [April 24, 2000] - Changed shared library so-number pattern from 2.x.y.z to xy.z (this builds - libpng.so.10 & libpng.so.10.6h instead of libpng.so.2 & libpng.so.2.1.0.6h) - This is a temporary change for test purposes. -version 1.0.6i [May 2, 2000] - Rearranged some members at the end of png_info and png_struct, to put - unknown_chunks_num and free_me within the original size of the png_structs - and free_me, png_read_user_fn, and png_free_fn within the original png_info, - because some old applications allocate the structs directly instead of - using png_create_*(). - Added documentation of user memory functions in libpng.txt/libpng.3 - Modified png_read_png so that it will use user_allocated row_pointers - if present, unless free_me directs that it be freed, and added description - of the use of png_set_rows() and png_get_rows() in libpng.txt/libpng.3. - Added PNG_LEGACY_SUPPORTED macro, and #ifdef out all new (since version - 1.00) members of png_struct and png_info, to regain binary compatibility - when you define this macro. Capabilities lost in this event - are user transforms (new in version 1.0.0),the user transform pointer - (new in version 1.0.2), rgb_to_gray (new in 1.0.5), iCCP, sCAL, sPLT, - the high-level interface, and unknown chunks support (all new in 1.0.6). - This was necessary because of old applications that allocate the structs - directly as authors were instructed to do in libpng-0.88 and earlier, - instead of using png_create_*(). - Added modes PNG_CREATED_READ_STRUCT and PNG_CREATED_WRITE_STRUCT which - can be used to detect codes that directly allocate the structs, and - code to check these modes in png_read_init() and png_write_init() and - generate a libpng error if the modes aren't set and PNG_LEGACY_SUPPORTED - was not defined. - Added makefile.intel and updated makefile.watcom (Pawel Mrochen) -version 1.0.6j [May 3, 2000] - Overloaded png_read_init() and png_write_init() with macros that convert - calls to png_read_init_2() or png_write_init_2() that check the version - and structure sizes. -version 1.0.7beta11 [May 7, 2000] - Removed the new PNG_CREATED_READ_STRUCT and PNG_CREATED_WRITE_STRUCT modes - which are no longer used. - Eliminated the three new members of png_text when PNG_LEGACY_SUPPORTED is - defined or when neither PNG_READ_iTXt_SUPPORTED nor PNG_WRITE_iTXT_SUPPORTED - is defined. - Made PNG_NO_READ|WRITE_iTXt the default setting, to avoid memory - overrun when old applications fill the info_ptr->text structure directly. - Added PNGAPI macro, and added it to the definitions of all exported functions. - Relocated version macro definitions ahead of the includes of zlib.h and - pngconf.h in png.h. -version 1.0.7beta12 [May 12, 2000] - Revised pngset.c to avoid a problem with expanding the png_debug macro. - Deleted some extraneous defines from pngconf.h - Made PNG_NO_CONSOLE_IO the default condition when PNG_BUILD_DLL is defined. - Use MSC _RPTn debugging instead of fprintf if _MSC_VER is defined. - Added png_access_version_number() function. - Check for mask&PNG_FREE_CHNK (for TEXT, SCAL, PCAL) in png_free_data(). - Expanded libpng.3/libpng.txt information about png_data_freer(). -version 1.0.7beta14 [May 17, 2000] (beta13 was not published) - Changed pnggccrd.c and pngvcrd.c to handle bad adaptive filter types as - warnings instead of errors, as pngrutil.c does. - Set the PNG_INFO_IDAT valid flag in png_set_rows() so png_write_png() - will actually write IDATs. - Made the default PNG_USE_LOCAL_ARRAYS depend on PNG_DLL instead of WIN32. - Make png_free_data() ignore its final parameter except when freeing data - that can have multiple instances (text, sPLT, unknowns). - Fixed a new bug in png_set_rows(). - Removed info_ptr->valid tests from png_free_data(), as in version 1.0.5. - Added png_set_invalid() function. - Fixed incorrect illustrations of png_destroy_write_struct() in example.c. -version 1.0.7beta15 [May 30, 2000] - Revised the deliberately erroneous Linux setjmp code in pngconf.h to produce - fewer error messages. - Rearranged checks for Z_OK to check the most likely path first in pngpread.c - and pngwutil.c. - Added checks in pngtest.c for png_create_*() returning NULL, and mentioned - in libpng.txt/libpng.3 the need for applications to check this. - Changed names of png_default_*() functions in pngtest to pngtest_*(). - Changed return type of png_get_x|y_offset_*() from png_uint_32 to png_int_32. - Fixed some bugs in the unused PNG_INCH_CONVERSIONS functions in pngget.c - Set each pointer to NULL after freeing it in png_free_data(). - Worked around a problem in pngconf.h; AIX's strings.h defines an "index" - macro that conflicts with libpng's png_color_16.index. (Dimitri Papadapoulos) - Added "msvc" directory with MSVC++ project files (Simon-Pierre Cadieux). -version 1.0.7beta16 [June 4, 2000] - Revised the workaround of AIX string.h "index" bug. - Added a check for overlength PLTE chunk in pngrutil.c. - Added PNG_NO_POINTER_INDEXING macro to use array-indexing instead of pointer - indexing in pngrutil.c and pngwutil.c to accommodate a buggy compiler. - Added a warning in png_decompress_chunk() when it runs out of data, e.g. - when it tries to read an erroneous PhotoShop iCCP chunk. - Added PNG_USE_DLL macro. - Revised the copyright/disclaimer/license notice. - Added contrib/msvctest directory -version 1.0.7rc1 [June 9, 2000] - Corrected the definition of PNG_TRANSFORM_INVERT_ALPHA (0x0400 not 0x0200) - Added contrib/visupng directory (Willem van Schaik) -version 1.0.7beta18 [June 23, 2000] - Revised PNGAPI definition, and pngvcrd.c to work with __GCC__ - and do not redefine PNGAPI if it is passed in via a compiler directive. - Revised visupng/PngFile.c to remove returns from within the Try block. - Removed leading underscores from "_PNG_H" and "_PNG_SAVE_BSD_SOURCE" macros. - Updated contrib/visupng/cexcept.h to version 1.0.0. - Fixed bugs in pngwrite.c and pngwutil.c that prevented writing iCCP chunks. -version 1.0.7rc2 [June 28, 2000] - Updated license to include disclaimers required by UCITA. - Fixed "DJBPP" typo in pnggccrd.c introduced in beta18. -version 1.0.7 [July 1, 2000] - Revised the definition of "trans_values" in libpng.3/libpng.txt -version 1.0.8beta1 [July 8, 2000] - Added png_free(png_ptr, key) two places in pngpread.c to stop memory leaks. - Changed PNG_NO_STDIO to PNG_NO_CONSOLE_IO, several places in pngrutil.c and - pngwutil.c. - Changed PNG_EXPORT_VAR to use PNG_IMPEXP, in pngconf.h. - Removed unused "#include " from png.c - Added WindowsCE support. - Revised pnggccrd.c to work with gcc-2.95.2 and in the Cygwin environment. -version 1.0.8beta2 [July 10, 2000] - Added project files to the wince directory and made further revisions - of pngtest.c, pngrio.c, and pngwio.c in support of WindowsCE. -version 1.0.8beta3 [July 11, 2000] - Only set the PNG_FLAG_FREE_TRNS or PNG_FREE_TRNS flag in png_handle_tRNS() - for indexed-color input files to avoid potential double-freeing trans array - under some unusual conditions; problem was introduced in version 1.0.6f. - Further revisions to pngtest.c and files in the wince subdirectory. -version 1.0.8beta4 [July 14, 2000] - Added the files pngbar.png and pngbar.jpg to the distribution. - Added makefile.cygwin, and cygwin support in pngconf.h - Added PNG_NO_ZALLOC_ZERO macro (makes png_zalloc skip zeroing memory) -version 1.0.8rc1 [July 16, 2000] - Revised png_debug() macros and statements to eliminate compiler warnings. -version 1.0.8 [July 24, 2000] - Added png_flush() in pngwrite.c, after png_write_IEND(). - Updated makefile.hpux to build a shared library. -version 1.0.9beta1 [November 10, 2000] - Fixed typo in scripts/makefile.hpux - Updated makevms.com in scripts and contrib/* and contrib/* (Martin Zinser) - Fixed seqence-point bug in contrib/pngminus/png2pnm (Martin Zinser) - Changed "cdrom.com" in documentation to "libpng.org" - Revised pnggccrd.c to get it all working, and updated makefile.gcmmx (Greg). - Changed type of "params" from voidp to png_voidp in png_read|write_png(). - Make sure PNGAPI and PNG_IMPEXP are defined in pngconf.h. - Revised the 3 instances of WRITEFILE in pngtest.c. - Relocated "msvc" and "wince" project subdirectories into "dll" subdirectory. - Updated png.rc in dll/msvc project - Revised makefile.dec to define and use LIBPATH and INCPATH - Increased size of global png_libpng_ver[] array from 12 to 18 chars. - Made global png_libpng_ver[], png_sig[] and png_pass_*[] arrays const. - Removed duplicate png_crc_finish() from png_handle_bKGD() function. - Added a warning when application calls png_read_update_info() multiple times. - Revised makefile.cygwin - Fixed bugs in iCCP support in pngrutil.c and pngwutil.c. - Replaced png_set_empty_plte_permitted() with png_permit_mng_features(). -version 1.0.9beta2 [November 19, 2000] - Renamed the "dll" subdirectory "projects". - Added borland project files to "projects" subdirectory. - Set VS_FF_PRERELEASE and VS_FF_PATCHED flags in msvc/png.rc when appropriate. - Add error message in png_set_compression_buffer_size() when malloc fails. -version 1.0.9beta3 [November 23, 2000] - Revised PNG_LIBPNG_BUILD_TYPE macro in png.h, used in the msvc project. - Removed the png_flush() in pngwrite.c that crashes some applications - that don't set png_output_flush_fn. - Added makefile.macosx and makefile.aix to scripts directory. -version 1.0.9beta4 [December 1, 2000] - Change png_chunk_warning to png_warning in png_check_keyword(). - Increased the first part of msg buffer from 16 to 18 in png_chunk_error(). -version 1.0.9beta5 [December 15, 2000] - Added support for filter method 64 (for PNG datastreams embedded in MNG). -version 1.0.9beta6 [December 18, 2000] - Revised png_set_filter() to accept filter method 64 when appropriate. - Added new PNG_HAVE_PNG_SIGNATURE bit to png_ptr->mode and use it to - help prevent applications from using MNG features in PNG datastreams. - Added png_permit_mng_features() function. - Revised libpng.3/libpng.txt. Changed "filter type" to "filter method". -version 1.0.9rc1 [December 23, 2000] - Revised test for PNG_HAVE_PNG_SIGNATURE in pngrutil.c - Fixed error handling of unknown compression type in png_decompress_chunk(). - In pngconf.h, define __cdecl when _MSC_VER is defined. -version 1.0.9beta7 [December 28, 2000] - Changed PNG_TEXT_COMPRESSION_zTXt to PNG_COMPRESSION_TYPE_BASE several places. - Revised memory management in png_set_hIST and png_handle_hIST in a backward - compatible manner. PLTE and tRNS were revised similarly. - Revised the iCCP chunk reader to ignore trailing garbage. -version 1.0.9beta8 [January 12, 2001] - Moved pngasmrd.h into pngconf.h. - Improved handling of out-of-spec garbage iCCP chunks generated by PhotoShop. -version 1.0.9beta9 [January 15, 2001] - Added png_set_invalid, png_permit_mng_features, and png_mmx_supported to - wince and msvc project module definition files. - Minor revision of makefile.cygwin. - Fixed bug with progressive reading of narrow interlaced images in pngpread.c -version 1.0.9beta10 [January 16, 2001] - Do not typedef png_FILE_p in pngconf.h when PNG_NO_STDIO is defined. - Fixed "png_mmx_supported" typo in project definition files. -version 1.0.9beta11 [January 19, 2001] - Updated makefile.sgi to make shared library. - Removed png_mmx_support() function and disabled PNG_MNG_FEATURES_SUPPORTED - by default, for the benefit of DLL forward compatibility. These will - be re-enabled in version 1.2.0. -version 1.0.9rc2 [January 22, 2001] - Revised cygwin support. -version 1.0.9 [January 31, 2001] - Added check of cygwin's ALL_STATIC in pngconf.h - Added "-nommx" parameter to contrib/gregbook/rpng2-win and rpng2-x demos. -version 1.0.10beta1 [March 14, 2001] - Revised makefile.dec, makefile.sgi, and makefile.sggcc; added makefile.hpgcc. - Reformatted libpng.3 to eliminate bad line breaks. - Added checks for _mmx_supported in the read_filter_row function of pnggccrd.c - Added prototype for png_mmx_support() near the top of pnggccrd.c - Moved some error checking from png_handle_IHDR to png_set_IHDR. - Added PNG_NO_READ_SUPPORTED and PNG_NO_WRITE_SUPPORTED macros. - Revised png_mmx_support() function in pnggccrd.c - Restored version 1.0.8 PNG_WRITE_EMPTY_PLTE_SUPPORTED behavior in pngwutil.c - Fixed memory leak in contrib/visupng/PngFile.c - Fixed bugs in png_combine_row() in pnggccrd.c and pngvcrd.c (C version) - Added warnings when retrieving or setting gamma=0. - Increased the first part of msg buffer from 16 to 18 in png_chunk_warning(). -version 1.0.10rc1 [March 23, 2001] - Changed all instances of memcpy, strcpy, and strlen to png_memcpy, png_strcpy, - and png_strlen. - Revised png_mmx_supported() function in pnggccrd.c to return proper value. - Fixed bug in progressive reading (pngpread.c) with small images (height < 8). -version 1.0.10 [March 30, 2001] - Deleted extraneous space (introduced in 1.0.9) from line 42 of makefile.cygwin - Added beos project files (Chris Herborth) -version 1.0.11beta1 [April 3, 2001] - Added type casts on several png_malloc() calls (Dimitri Papadapoulos). - Removed a no-longer needed AIX work-around from pngconf.h - Changed several "//" single-line comments to C-style in pnggccrd.c -version 1.0.11beta2 [April 11, 2001] - Removed PNGAPI from several functions whose prototypes did not have PNGAPI. - Updated scripts/pngos2.def -version 1.0.11beta3 [April 14, 2001] - Added checking the results of many instances of png_malloc() for NULL -version 1.0.11beta4 [April 20, 2001] - Undid the changes from version 1.0.11beta3. Added a check for NULL return - from user's malloc_fn(). - Removed some useless type casts of the NULL pointer. - Added makefile.netbsd -version 1.0.11 [April 27, 2001] - Revised makefile.netbsd -version 1.0.12beta1 [May 14, 2001] - Test for Windows platform in pngconf.h when including malloc.h (Emmanuel Blot) - Updated makefile.cygwin and handling of Cygwin's ALL_STATIC in pngconf.h - Added some never-to-be-executed code in pnggccrd.c to quiet compiler warnings. - Eliminated the png_error about apps using png_read|write_init(). Instead, - libpng will reallocate the png_struct and info_struct if they are too small. - This retains future binary compatibility for old applications written for - libpng-0.88 and earlier. -version 1.2.0beta1 [May 6, 2001] - Bumped DLLNUM to 2. - Re-enabled PNG_MNG_FEATURES_SUPPORTED and enabled PNG_ASSEMBLER_CODE_SUPPORTED - by default. - Added runtime selection of MMX features. - Added png_set_strip_error_numbers function and related macros. -version 1.2.0beta2 [May 7, 2001] - Finished merging 1.2.0beta1 with version 1.0.11 - Added a check for attempts to read or write PLTE in grayscale PNG datastreams. -version 1.2.0beta3 [May 17, 2001] - Enabled user memory function by default. - Modified png_create_struct so it passes user mem_ptr to user memory allocator. - Increased png_mng_features flag from png_byte to png_uint_32. - Bumped shared-library (so-number) and dll-number to 3. -version 1.2.0beta4 [June 23, 2001] - Check for missing profile length field in iCCP chunk and free chunk_data - in case of truncated iCCP chunk. - Bumped shared-library number to 3 in makefile.sgi and makefile.sggcc - Bumped dll-number from 2 to 3 in makefile.cygwin - Revised contrib/gregbook/rpng*-x.c to avoid a memory leak and to exit cleanly - if user attempts to run it on an 8-bit display. - Updated contrib/gregbook - Use png_malloc instead of png_zalloc to allocate palette in pngset.c - Updated makefile.ibmc - Added some typecasts to eliminate gcc 3.0 warnings. Changed prototypes - of png_write_oFFS width and height from png_uint_32 to png_int_32. - Updated example.c - Revised prototypes for png_debug_malloc and png_debug_free in pngtest.c -version 1.2.0beta5 [August 8, 2001] - Revised contrib/gregbook - Revised makefile.gcmmx - Revised pnggccrd.c to conditionally compile some thread-unsafe code only - when PNG_THREAD_UNSAFE_OK is defined. - Added tests to prevent pngwutil.c from writing a bKGD or tRNS chunk with - value exceeding 2^bit_depth-1 - Revised makefile.sgi and makefile.sggcc - Replaced calls to fprintf(stderr,...) with png_warning() in pnggccrd.c - Removed restriction that do_invert_mono only operate on 1-bit opaque files -version 1.2.0 [September 1, 2001] - Changed a png_warning() to png_debug() in pnggccrd.c - Fixed contrib/gregbook/rpng-x.c, rpng2-x.c to avoid crash with XFreeGC(). -version 1.2.1beta1 [October 19, 2001] - Revised makefile.std in contrib/pngminus - Include background_1 in png_struct regardless of gamma support. - Revised makefile.netbsd and makefile.macosx, added makefile.darwin. - Revised example.c to provide more details about using row_callback(). -version 1.2.1beta2 [October 25, 2001] - Added type cast to each NULL appearing in a function call, except for - WINCE functions. - Added makefile.so9. -version 1.2.1beta3 [October 27, 2001] - Removed type casts from all NULLs. - Simplified png_create_struct_2(). -version 1.2.1beta4 [November 7, 2001] - Revised png_create_info_struct() and png_creat_struct_2(). - Added error message if png_write_info() was omitted. - Type cast NULLs appearing in function calls when _NO_PROTO or - PNG_TYPECAST_NULL is defined. -version 1.2.1rc1 [November 24, 2001] - Type cast NULLs appearing in function calls except when PNG_NO_TYPECAST_NULL - is defined. - Changed typecast of "size" argument to png_size_t in pngmem.c calls to - the user malloc_fn, to agree with the prototype in png.h - Added a pop/push operation to pnggccrd.c, to preserve Eflag (Maxim Sobolev) - Updated makefile.sgi to recognize LIBPATH and INCPATH. - Updated various makefiles so "make clean" does not remove previous major - version of the shared library. -version 1.2.1rc2 [December 4, 2001] - Always allocate 256-entry internal palette, hist, and trans arrays, to - avoid out-of-bounds memory reference caused by invalid PNG datastreams. - Added a check for prefix_length > data_length in iCCP chunk handler. -version 1.2.1 [December 7, 2001] - None. -version 1.2.2beta1 [February 22, 2002] - Fixed a bug with reading the length of iCCP profiles (Larry Reeves). - Revised makefile.linux, makefile.gcmmx, and makefile.sgi to generate - libpng.a, libpng12.so (not libpng.so.3), and libpng12/png.h - Revised makefile.darwin to remove "-undefined suppress" option. - Added checks for gamma and chromaticity values over 21474.83, which exceed - the limit for PNG unsigned 32-bit integers when encoded. - Revised calls to png_create_read_struct() and png_create_write_struct() - for simpler debugging. - Revised png_zalloc() so zlib handles errors (uses PNG_FLAG_MALLOC_NULL_MEM_OK) -version 1.2.2beta2 [February 23, 2002] - Check chunk_length and idat_size for invalid (over PNG_MAX_UINT) lengths. - Check for invalid image dimensions in png_get_IHDR. - Added missing "fi;" in the install target of the SGI makefiles. - Added install-static to all makefiles that make shared libraries. - Always do gamma compensation when image is partially transparent. -version 1.2.2beta3 [March 7, 2002] - Compute background.gray and background_1.gray even when color_type is RGB - in case image gets reduced to gray later. - Modified shared-library makefiles to install pkgconfig/libpngNN.pc. - Export (with PNGAPI) png_zalloc, png_zfree, and png_handle_as_unknown - Removed unused png_write_destroy_info prototype from png.h - Eliminated incorrect use of width_mmx from pnggccrd.c in pixel_bytes == 8 case - Added install-shared target to all makefiles that make shared libraries. - Stopped a double free of palette, hist, and trans when not using free_me. - Added makefile.32sunu for Sun Ultra 32 and makefile.64sunu for Sun Ultra 64. -version 1.2.2beta4 [March 8, 2002] - Compute background.gray and background_1.gray even when color_type is RGB - in case image gets reduced to gray later (Jason Summers). - Relocated a misplaced /bin/rm in the "install-shared" makefile targets - Added PNG_1_0_X macro which can be used to build a 1.0.x-compatible library. -version 1.2.2beta5 [March 26, 2002] - Added missing PNGAPI to several function definitions. - Check for invalid bit_depth or color_type in png_get_IHDR(), and - check for missing PLTE or IHDR in png_push_read_chunk() (Matthias Clasen). - Revised iTXt support to accept NULL for lang and lang_key. - Compute gamma for color components of background even when color_type is gray. - Changed "()" to "{}" in scripts/libpng.pc.in. - Revised makefiles to put png.h and pngconf.h only in $prefix/include/libpngNN - Revised makefiles to make symlink to libpng.so.NN in addition to libpngNN.so -version 1.2.2beta6 [March 31, 2002] -version 1.0.13beta1 [March 31, 2002] - Prevent png_zalloc() from trying to memset memory that it failed to acquire. - Add typecasts of PNG_MAX_UINT in pngset_cHRM_fixed() (Matt Holgate). - Ensure that the right function (user or default) is used to free the - png_struct after an error in png_create_read_struct_2(). -version 1.2.2rc1 [April 7, 2002] -version 1.0.13rc1 [April 7, 2002] - Save the ebx register in pnggccrd.c (Sami Farin) - Add "mem_ptr = png_ptr->mem_ptr" in png_destroy_write_struct() (Paul Gardner). - Updated makefiles to put headers in include/libpng and remove old include/*.h. -version 1.2.2 [April 15, 2002] -version 1.0.13 [April 15, 2002] - Revised description of png_set_filter() in libpng.3/libpng.txt. - Revised makefile.netbsd and added makefile.neNNbsd and makefile.freebsd -version 1.0.13patch01 [April 17, 2002] -version 1.2.2patch01 [April 17, 2002] - Changed ${PNGMAJ}.${PNGVER} bug to ${PNGVER} in makefile.sgi and makefile.sggcc - Fixed VER -> PNGVER typo in makefile.macosx and added install-static to install - Added install: target to makefile.32sunu and makefile.64sunu -version 1.0.13patch03 [April 18, 2002] -version 1.2.2patch03 [April 18, 2002] - Revised 15 makefiles to link libpng.a to libpngNN.a and the include libpng - subdirectory to libpngNN subdirectory without the full pathname. - Moved generation of libpng.pc from "install" to "all" in 15 makefiles. -version 1.2.3rc1 [April 28, 2002] - Added install-man target to 15 makefiles (Dimitri Papadopolous-Orfanos). - Added $(DESTDIR) feature to 24 makefiles (Tim Mooney) - Fixed bug with $prefix, should be $(prefix) in makefile.hpux. - Updated cygwin-specific portion of pngconf.h and revised makefile.cygwin - Added a link from libpngNN.pc to libpng.pc in 15 makefiles. - Added links from include/libpngNN/*.h to include/*.h in 24 makefiles. - Revised makefile.darwin to make relative links without full pathname. - Added setjmp() at the end of png_create_*_struct_2() in case user forgets - to put one in their application. - Restored png_zalloc() and png_zfree() prototypes to version 1.2.1 and - removed them from module definition files. -version 1.2.3rc2 [May 1, 2002] - Fixed bug in reporting number of channels in pngget.c and pngset.c, - that was introduced in version 1.2.2beta5. - Exported png_zalloc(), png_zfree(), png_default_read(), png_default_write(), - png_default_flush(), and png_push_fill_buffer() and included them in - module definition files. - Added "libpng.pc" dependency to the "install-shared" target in 15 makefiles. -version 1.2.3rc3 [May 1, 2002] - Revised prototype for png_default_flush() - Remove old libpng.pc and libpngNN.pc before installing new ones. -version 1.2.3rc4 [May 2, 2002] - Typos in *.def files (png_default_read|write -> png_default_read|write_data) - In makefiles, changed rm libpng.NN.pc to rm libpngNN.pc - Added libpng-config and libpngNN-config and modified makefiles to install them. - Changed $(MANPATH) to $(DESTDIR)$(MANPATH) in makefiles - Added "Win32 DLL VB" configuration to projects/msvc/libpng.dsp -version 1.2.3rc5 [May 11, 2002] - Changed "error" and "message" in prototypes to "error_message" and - "warning_message" to avoid namespace conflict. - Revised 15 makefiles to build libpng-config from libpng-config-*.in - Once more restored png_zalloc and png_zfree to regular nonexported form. - Restored png_default_read|write_data, png_default_flush, png_read_fill_buffer - to nonexported form, but with PNGAPI, and removed them from module def files. -version 1.2.3rc6 [May 14, 2002] - Removed "PNGAPI" from png_zalloc() and png_zfree() in png.c - Changed "Gz" to "Gd" in projects/msvc/libpng.dsp and zlib.dsp. - Removed leftover libpng-config "sed" script from four makefiles. - Revised libpng-config creating script in 16 makefiles. -version 1.2.3 [May 22, 2002] - Revised libpng-config target in makefile.cygwin. - Removed description of png_set_mem_fn() from documentation. - Revised makefile.freebsd. - Minor cosmetic changes to 15 makefiles, e.g., $(DI) = $(DESTDIR)/$(INCDIR). - Revised projects/msvc/README.txt - Changed -lpng to -lpngNN in LDFLAGS in several makefiles. -version 1.2.4beta1 [May 24, 2002] - Added libpng.pc and libpng-config to "all:" target in 16 makefiles. - Fixed bug in 16 makefiles: $(DESTDIR)/$(LIBPATH) to $(DESTDIR)$(LIBPATH) - Added missing "\" before closing double quote in makefile.gcmmx. - Plugged various memory leaks; added png_malloc_warn() and png_set_text_2() - functions. -version 1.2.4beta2 [June 25, 2002] - Plugged memory leak of png_ptr->current_text (Matt Holgate). - Check for buffer overflow before reading CRC in pngpread.c (Warwick Allison) - Added -soname to the loader flags in makefile.dec, makefile.sgi, and - makefile.sggcc. - Added "test-installed" target to makefile.linux, makefile.gcmmx, - makefile.sgi, and makefile.sggcc. -version 1.2.4beta3 [June 28, 2002] - Plugged memory leak of row_buf in pngtest.c when there is a png_error(). - Detect buffer overflow in pngpread.c when IDAT is corrupted with extra data. - Added "test-installed" target to makefile.32sunu, makefile.64sunu, - makefile.beos, makefile.darwin, makefile.dec, makefile.macosx, - makefile.solaris, makefile.hpux, makefile.hpgcc, and makefile.so9. -version 1.2.4rc1 and 1.0.14rc1 [July 2, 2002] - Added "test-installed" target to makefile.cygwin and makefile.sco. - Revised pnggccrd.c to be able to back out version 1.0.x via PNG_1_0_X macro. -version 1.2.4 and 1.0.14 [July 8, 2002] - Changed png_warning() to png_error() when width is too large to process. -version 1.2.4patch01 [July 20, 2002] - Revised makefile.cygwin to use DLL number 12 instead of 13. -version 1.2.5beta1 [August 6, 2002] - Added code to contrib/gregbook/readpng2.c to ignore unused chunks. - Replaced toucan.png in contrib/gregbook (it has been corrupt since 1.0.11) - Removed some stray *.o files from contrib/gregbook. - Changed png_error() to png_warning() about "Too much data" in pngpread.c - and about "Extra compressed data" in pngrutil.c. - Prevent png_ptr->pass from exceeding 7 in png_push_finish_row(). - Updated makefile.hpgcc - Updated png.c and pnggccrd.c handling of return from png_mmx_support() -version 1.2.5beta2 [August 15, 2002] - Only issue png_warning() about "Too much data" in pngpread.c when avail_in - is nonzero. - Updated makefiles to install a separate libpng.so.3 with its own rpath. -version 1.2.5rc1 and 1.0.15rc1 [August 24, 2002] - Revised makefiles to not remove previous minor versions of shared libraries. -version 1.2.5rc2 and 1.0.15rc2 [September 16, 2002] - Revised 13 makefiles to remove "-lz" and "-L$(ZLIBLIB)", etc., from shared - library loader directive. - Added missing "$OBJSDLL" line to makefile.gcmmx. - Added missing "; fi" to makefile.32sunu. -version 1.2.5rc3 and 1.0.15rc3 [September 18, 2002] - Revised libpng-config script. -version 1.2.5 and 1.0.15 [October 3, 2002] - Revised makefile.macosx, makefile.darwin, makefile.hpgcc, and makefile.hpux, - and makefile.aix. - Relocated two misplaced PNGAPI lines in pngtest.c - -Send comments/corrections/commendations to -png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu - -Glenn R-P diff --git a/gtkmm-osx/trunk/libpng-1.2.5/INSTALL b/gtkmm-osx/trunk/libpng-1.2.5/INSTALL deleted file mode 100644 index 1d6dfc5..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/INSTALL +++ /dev/null @@ -1,151 +0,0 @@ - -Installing libpng version 1.2.5 - October 3, 2002 - -Before installing libpng, you must first install zlib. zlib -can usually be found wherever you got libpng. zlib can be -placed in another directory, at the same level as libpng. -Note that your system might already have a preinstalled -zlib, but you will still need to have access to the -zlib.h and zconf.h include files that correspond to the -version of zlib that's installed. - -You can rename the directories that you downloaded (they -might be called "libpng-1.2.5" or "lpng109" and "zlib-1.1.4" -or "zlib114") so that you have directories called "zlib" and "libpng". - -Your directory structure should look like this: - - .. (the parent directory) - libpng (this directory) - INSTALL (this file) - README - *.h - *.c - contrib - gregbook - msvctest - pngminus - pngsuite - visupng - projects - beos - borland - msvc - netware.txt - wince.txt - scripts - makefile.* - libpng*.in - pngtest.png - etc. - zlib - README - *.h - *.c - contrib - etc. - -If the line endings in the files look funny, you may wish to get the other -distribution of libpng. It is available in both tar.gz (UNIX style line -endings) and zip (DOS style line endings) formats. - -If you are building libpng with MSVC, you can enter the libpng\msvc directory -and follow the instructions in msvc\README.txt. - -You can build libpng for WindowsCE by entering the downloading and installing -the libpng\wince directory as instructed in the projects\wince.txt file, and -then following the instructions in the README* files. Similarly, you can -build libpng for Netware as instructed in projects\netware.txt. - -Else enter the zlib directory and follow the instructions in zlib/README, -then come back here and choose the appropriate makefile.sys in the scripts -directory. - -The files that are presently available in the scripts directory -include - - makefile.std => Generic UNIX makefile (cc, creates static libpng.a) - makefile.linux => Linux/ELF makefile (gcc, creates libpng12.so.0.1.2.5) - makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng12.so.0.1.2.5, - uses assembler code tuned for Intel MMX platform) - makefile.gcc => Generic makefile (gcc, creates static libpng.a) - makefile.knr => Archaic UNIX Makefile that converts files with - ansi2knr (Requires ansi2knr.c from - ftp://ftp.cs.wisc.edu/ghost) - makefile.aix => AIX/gcc makefile - makefile.cygwin => Cygwin/gcc makefile - makefile.darwin => Darwin makefile - makefile.dec => DEC Alpha UNIX makefile - makefile.hpgcc => FreeBSD makefile - makefile.hpgcc => HPUX makefile using gcc - makefile.hpux => HPUX (10.20 and 11.00) makefile - makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static) - makefile.intel => Intel C/C++ version 4.0 and later - libpng.icc => Project file for IBM VisualAge/C++ version 4.0 or later - makefile.macosx => MACOS X Makefile - makefile.netbsd => NetBSD/cc makefile, uses PNGGCCRD, makes libpng.so. - makefile.ne0bsd => NetBSD/cc makefile, uses PNGGCCRD, makes libpng0.so - makefile.openbsd => OpenBSD makefile - makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib) - makefile.sggcc => Silicon Graphics (gcc, creates libpng12.so.0.1.2.5) - makefile.sunos => Sun makefile - makefile.solaris => Solaris 2.X makefile (gcc, creates libpng12.so.0.1.2.5) - makefile.so9 => Solaris 9 makefile (gcc, creates libpng12.so.0.1.2.5) - makefile.32sunu => Sun Ultra 32-bit makefile - makefile.64sunu => Sun Ultra 64-bit makefile - makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc - makefile.mips => MIPS makefile - makefile.acorn => Acorn makefile - makefile.amiga => Amiga makefile - smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC compiler - (Requires SCOPTIONS, copied from scripts/SCOPTIONS.ppc) - makefile.atari => Atari makefile - makefile.beos => BEOS makefile for X86 - makefile.bor => Borland makefile (uses bcc) - makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode) - makefile.bd32 => To make a png32bd.dll with Borland C++ 4.5 - makefile.tc3 => Turbo C 3.0 makefile - makefile.dj2 => DJGPP 2 makefile - makefile.msc => Microsoft C makefile - makefile.vcawin32 => makefile for Microsoft Visual C++ 5.0 and later (uses - assembler code tuned for Intel MMX platform) - makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and later (does - not use assembler code) - makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def) - pngos2.def => OS/2 module definition file used by makefile.os2 - makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model - makevms.com => VMS build script - descrip.mms => VMS makefile for MMS or MMK - pngdef.pas => Defines for a png32bd.dll with Borland C++ 4.5 - SCOPTIONS.ppc => Used with smakefile.ppc - -Copy the file (or files) that you need from the -scripts directory into this directory, for example - - MSDOS example: copy scripts\makefile.msc makefile - UNIX example: cp scripts/makefile.std makefile - -Read the makefile to see if you need to change any source or -target directories to match your preferences. - -Then read pngconf.h to see if you want to make any configuration -changes. - -Then just run "make test" which will create the libpng library in -this directory and run a quick test that reads the "pngtest.png" -file and writes a "pngout.png" file that should be identical to it. -Look for "9782 zero samples" in the output of the test. For more -confidence, you can run another test by typing "pngtest pngnow.png" -and looking for "289 zero samples" in the output. Also, you can -run "pngtest -m *.png" in the "contrib/pngsuite" directory and compare -your output with the result shown in contrib/pngsuite/README. - -Most of the makefiles will allow you to run "make install" to -put the library in its final resting place (if you want to -do that, run "make install" in the zlib directory first if necessary). -Some also allow you to run "make test-installed" after you have -run "make install". - -Further information can be found in the README and libpng.txt -files, in the individual makefiles, in png.h, in the README files in -subdirectories of the LIB directory, and the manual pages libpng.3 and png.5. diff --git a/gtkmm-osx/trunk/libpng-1.2.5/KNOWNBUG b/gtkmm-osx/trunk/libpng-1.2.5/KNOWNBUG deleted file mode 100644 index 3b81a6a..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/KNOWNBUG +++ /dev/null @@ -1,11 +0,0 @@ - -Known bugs in libpng version 1.2.5 - -1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when - reading interlaced PNG files, when assembler code is enabled but running - on a non-MMX i386 platform. - - STATUS: Under investigation. The change to pnggccrd.c in libpng-1.2.1 - fixed a problem under FreeBSD but not the problem with NetBSD, which - still fails as of libpng-1.2.2rc1. - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/LICENSE b/gtkmm-osx/trunk/libpng-1.2.5/LICENSE deleted file mode 100644 index 28b3b66..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/LICENSE +++ /dev/null @@ -1,102 +0,0 @@ - -This copy of the libpng notices is provided for your convenience. In case of -any discrepancy between this copy and the notices in the file png.h that is -included in the libpng distribution, the latter shall prevail. - -COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: - -If you modify libpng you may insert additional notices immediately following -this sentence. - -libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are -Copyright (c) 2000-2002 Glenn Randers-Pehrson -and are distributed according to the same disclaimer and license as libpng-1.0.6 -with the following individuals added to the list of Contributing Authors - - Simon-Pierre Cadieux - Eric S. Raymond - Gilles Vollant - -and with the following additions to the disclaimer: - - There is no warranty against interference with your enjoyment of the - library or against infringement. There is no warranty that our - efforts or the library will fulfill any of your particular purposes - or needs. This library is provided with all faults, and the entire - risk of satisfactory quality, performance, accuracy, and effort is with - the user. - -libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are -Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are -distributed according to the same disclaimer and license as libpng-0.96, -with the following individuals added to the list of Contributing Authors: - - Tom Lane - Glenn Randers-Pehrson - Willem van Schaik - -libpng versions 0.89, June 1996, through 0.96, May 1997, are -Copyright (c) 1996, 1997 Andreas Dilger -Distributed according to the same disclaimer and license as libpng-0.88, -with the following individuals added to the list of Contributing Authors: - - John Bowler - Kevin Bracey - Sam Bushell - Magnus Holmgren - Greg Roelofs - Tom Tanner - -libpng versions 0.5, May 1995, through 0.88, January 1996, are -Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - -For the purposes of this copyright and license, "Contributing Authors" -is defined as the following set of individuals: - - Andreas Dilger - Dave Martindale - Guy Eric Schalnat - Paul Schmidt - Tim Wegner - -The PNG Reference Library is supplied "AS IS". The Contributing Authors -and Group 42, Inc. disclaim all warranties, expressed or implied, -including, without limitation, the warranties of merchantability and of -fitness for any purpose. The Contributing Authors and Group 42, Inc. -assume no liability for direct, indirect, incidental, special, exemplary, -or consequential damages, which may result from the use of the PNG -Reference Library, even if advised of the possibility of such damage. - -Permission is hereby granted to use, copy, modify, and distribute this -source code, or portions hereof, for any purpose, without fee, subject -to the following restrictions: - -1. The origin of this source code must not be misrepresented. - -2. Altered versions must be plainly marked as such and must not - be misrepresented as being the original source. - -3. This Copyright notice may not be removed or altered from any - source or altered source distribution. - -The Contributing Authors and Group 42, Inc. specifically permit, without -fee, and encourage the use of this source code as a component to -supporting the PNG file format in commercial products. If you use this -source code in a product, acknowledgment is not required but would be -appreciated. - - -A "png_get_copyright" function is available, for convenient use in "about" -boxes and the like: - - printf("%s",png_get_copyright(NULL)); - -Also, the PNG logo (in PNG format, of course) is supplied in the -files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). - -Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a -certification mark of the Open Source Initiative. - -Glenn Randers-Pehrson -randeg@alum.rpi.edu -October 3, 2002 diff --git a/gtkmm-osx/trunk/libpng-1.2.5/README b/gtkmm-osx/trunk/libpng-1.2.5/README deleted file mode 100644 index 1991908..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/README +++ /dev/null @@ -1,269 +0,0 @@ -README for libpng 1.2.5 - October 3, 2002 (shared library 12.0) -See the note about version numbers near the top of png.h - -See INSTALL for instructions on how to install libpng. - -Libpng comes in two distribution formats. Get libpng-*.tar.gz if you -want UNIX-style line endings in the text files, or lpng*.zip if you want -DOS-style line endings. - -Version 0.89 was the first official release of libpng. Don't let the -fact that it's the first release fool you. The libpng library has been in -extensive use and testing since mid-1995. By late 1997 it had -finally gotten to the stage where there hadn't been significant -changes to the API in some time, and people have a bad feeling about -libraries with versions < 1.0. Version 1.0.0 was released in -March 1998. - -**** -Note that some of the changes to the png_info structure render this -version of the library binary incompatible with libpng-0.89 or -earlier versions if you are using a shared library. The type of the -"filler" parameter for png_set_filler() has changed from png_byte to -png_uint_32, which will affect shared-library applications that use -this function. - -To avoid problems with changes to the internals of png_info_struct, -new APIs have been made available in 0.95 to avoid direct application -access to info_ptr. These functions are the png_set_ and -png_get_ functions. These functions should be used when -accessing/storing the info_struct data, rather than manipulating it -directly, to avoid such problems in the future. - -It is important to note that the APIs do not make current programs -that access the info struct directly incompatible with the new -library. However, it is strongly suggested that new programs use -the new APIs (as shown in example.c and pngtest.c), and older programs -be converted to the new format, to facilitate upgrades in the future. -**** - -Additions since 0.90 include the ability to compile libpng as a -Windows DLL, and new APIs for accessing data in the info struct. -Experimental functions include the ability to set weighting and cost -factors for row filter selection, direct reads of integers from buffers -on big-endian processors that support misaligned data access, faster -methods of doing alpha composition, and more accurate 16->8 bit color -conversion. - -The additions since 0.89 include the ability to read from a PNG stream -which has had some (or all) of the signature bytes read by the calling -application. This also allows the reading of embedded PNG streams that -do not have the PNG file signature. As well, it is now possible to set -the library action on the detection of chunk CRC errors. It is possible -to set different actions based on whether the CRC error occurred in a -critical or an ancillary chunk. - -The changes made to the library, and bugs fixed are based on discussions -on the PNG implementation mailing list -and not on material submitted privately to Guy, Andreas, or Glenn. They will -forward any good suggestions to the list. - -For a detailed description on using libpng, read libpng.txt. For -examples of libpng in a program, see example.c and pngtest.c. For usage -information and restrictions (what little they are) on libpng, see -png.h. For a description on using zlib (the compression library used by -libpng) and zlib's restrictions, see zlib.h - -I have included a general makefile, as well as several machine and -compiler specific ones, but you may have to modify one for your own needs. - -You should use zlib 1.0.4 or later to run this, but it MAY work with -versions as old as zlib 0.95. Even so, there are bugs in older zlib -versions which can cause the output of invalid compression streams for -some images. You will definitely need zlib 1.0.4 or later if you are -taking advantage of the MS-DOS "far" structure allocation for the small -and medium memory models. You should also note that zlib is a -compression library that is useful for more things than just PNG files. -You can use zlib as a drop-in replacement for fread() and fwrite() if -you are so inclined. - -zlib should be available at the same place that libpng is. -If not, it should be at ftp.uu.net in /graphics/png -Eventually, it will be at ftp.uu.net in /pub/archiving/zip/zlib - -You may also want a copy of the PNG specification. It is available -as an RFC and a W3C Recommendation. Failing -these resources you can try ftp.uu.net in the /graphics/png directory. - -This code is currently being archived at ftp.uu.net in the -/graphics/png directory, and on CompuServe, Lib 20 (PNG SUPPORT) -at GO GRAPHSUP. If you can't find it in any of those places, -e-mail me, and I'll help you find it. - -If you have any code changes, requests, problems, etc., please e-mail -them to me. Also, I'd appreciate any make files or project files, -and any modifications you needed to make to get libpng to compile, -along with a #define variable to tell what compiler/system you are on. -If you needed to add transformations to libpng, or wish libpng would -provide the image in a different way, drop me a note (and code, if -possible), so I can consider supporting the transformation. -Finally, if you get any warning messages when compiling libpng -(note: not zlib), and they are easy to fix, I'd appreciate the -fix. Please mention "libpng" somewhere in the subject line. Thanks. - -This release was created and will be supported by myself (of course -based in a large way on Guy's and Andreas' earlier work), and the PNG group. - -randeg@alum.rpi.edu -png-implement@ccrc.wustl.edu - -You can't reach Guy, the original libpng author, at the addresses -given in previous versions of this document. He and Andreas will read mail -addressed to the png-implement list, however. - -Please do not send general questions about PNG. Send them to -the address in the specification (png-group@w3.org). At the same -time, please do not send libpng questions to that address, send them to me -or to png-implement@ccrc.wustl.edu. I'll -get them in the end anyway. If you have a question about something -in the PNG specification that is related to using libpng, send it -to me. Send me any questions that start with "I was using libpng, -and ...". If in doubt, send questions to me. I'll bounce them -to others, if necessary. - -Please do not send suggestions on how to change PNG. We have -been discussing PNG for three years now, and it is official and -finished. If you have suggestions for libpng, however, I'll -gladly listen. Even if your suggestion is not used for version -1.0, it may be used later. - -Files in this distribution: - - ANNOUNCE => Announcement of this version, with recent changes - CHANGES => Description of changes between libpng versions - KNOWNBUG => List of known bugs and deficiencies - LICENSE => License to use and redistribute libpng - README => This file - TODO => Things not implemented in the current library - Y2KINFO => Statement of Y2K compliance - example.c => Example code for using libpng functions - libpng.3 => manual page for libpng (includes libpng.txt) - libpng.txt => Description of libpng and its functions - libpngpf.3 => manual page for libpng's private functions - png.5 => manual page for the PNG format - png.c => Basic interface functions common to library - png.h => Library function and interface declarations - pngconf.h => System specific library configuration - pngasmrd.h => Header file for assembler-coded functions - pngerror.c => Error/warning message I/O functions - pngget.c => Functions for retrieving info from struct - pngmem.c => Memory handling functions - pngbar.png => PNG logo, 88x31 - pngnow.png => PNG logo, 98x31 - pngpread.c => Progressive reading functions - pngread.c => Read data/helper high-level functions - pngrio.c => Lowest-level data read I/O functions - pngrtran.c => Read data transformation functions - pngrutil.c => Read data utility functions - pngset.c => Functions for storing data into the info_struct - pngtest.c => Library test program - pngtest.png => Library test sample image - pngtrans.c => Common data transformation functions - pngwio.c => Lowest-level write I/O functions - pngwrite.c => High-level write functions - pngwtran.c => Write data transformations - pngwutil.c => Write utility functions - contrib => Contributions - gregbook => source code for PNG reading and writing, from - Greg Roelofs' "PNG: The Definitive Guide", - O'Reilly, 1999 - msvctest => Builds and runs pngtest using a MSVC workspace - pngminus => Simple pnm2png and png2pnm programs - pngsuite => Test images - visupng => Contains a MSVC workspace for VisualPng - projects => Contains project files and workspaces for building DLL - beos => Contains a Beos workspace for building libpng - borland => Contains a Borland workspace for building libpng - and zlib - msvc => Contains a Microsoft Visual C++ (MSVC) workspace - for building libpng and zlib - netware.txt => Contains instructions for downloading a set of - project files for building libpng and zlib on - Netware. - wince.txt => Contains instructions for downloading a Microsoft - Visual C++ (Windows CD Toolkit) workspace for - building libpng and zlib on WindowsCE - scripts => Directory containing scripts for building libpng: - descrip.mms => VMS makefile for MMS or MMK - makefile.std => Generic UNIX makefile (cc, creates static libpng.a) - makefile.linux => Linux/ELF makefile - (gcc, creates libpng12.so.0.1.2.5) - makefile.gcmmx => Linux/ELF makefile (gcc, creates - libpng12.so.0.1.2.5, uses assembler code - tuned for Intel MMX platform) - makefile.gcc => Generic makefile (gcc, creates static libpng.a) - makefile.knr => Archaic UNIX Makefile that converts files with - ansi2knr (Requires ansi2knr.c from - ftp://ftp.cs.wisc.edu/ghost) - makefile.aix => AIX makefile - makefile.cygwin => Cygwin/gcc makefile - makefile.darwin => Darwin makefile - makefile.dec => DEC Alpha UNIX makefile - makefile.freebsd => FreeBSD makefile - makefile.hpgcc => HPUX makefile using gcc - makefile.hpux => HPUX (10.20 and 11.00) makefile - makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static) - makefile.intel => Intel C/C++ version 4.0 and later - libpng.icc => Project file, IBM VisualAge/C++ 4.0 or later - makefile.macosx => MACOS X Makefile - makefile.netbsd => NetBSD/cc makefile, PNGGCCRD, makes libpng.so. - makefile.ne0bsd => NetBSD/cc makefile, PNGGCCRD, makes libpng0.so - makefile.openbsd => OpenBSD makefile - makefile.sgi => Silicon Graphics IRIX (cc, creates static lib) - makefile.sggcc => Silicon Graphics (gcc, creates libpng12.so.0.1.2.5) - makefile.sunos => Sun makefile - makefile.solaris => Solaris 2.X makefile - (gcc, creates libpng12.so.0.1.2.5) - makefile.so9 => Solaris 9 makefile - (gcc, creates libpng12.so.0.1.2.5) - makefile.32sunu => Sun Ultra 32-bit makefile - makefile.64sunu => Sun Ultra 64-bit makefile - makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc - makefile.mips => MIPS makefile - makefile.acorn => Acorn makefile - makefile.amiga => Amiga makefile - smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC - compiler (Requires SCOPTIONS, copied from - scripts/SCOPTIONS.ppc) - makefile.atari => Atari makefile - makefile.beos => BEOS makefile for X86 - makefile.bor => Borland makefile (uses bcc) - makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode) - makefile.bd32 => To make a png32bd.dll with Borland C++ 4.5 - makefile.tc3 => Turbo C 3.0 makefile - makefile.dj2 => DJGPP 2 makefile - makefile.msc => Microsoft C makefile - makefile.vcawin32 => makefile for Microsoft Visual C++ 5.0 and - later (uses assembler code tuned for Intel MMX - platform) - makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and - later (does not use assembler code) - makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def) - pngos2.def => OS/2 module definition file used by makefile.os2 - makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model - makevms.com => VMS build script - pngdef.pas => Defines for a png32bd.dll with Borland C++ 4.5 - SCOPTIONS.ppc => Used with smakefile.ppc - mangle => Directory containing scripts to build libpng12m.so: - mangle.in => Function-decoration macros added to png.h by the - makefiles. - makefile.linux => Linux/ELF makefile - (gcc, creates libpng12m.so.0.1.2.5) - makefile.gcmmx => Linux/ELF makefile (gcc, creates - libpng12.so.0m.1.2.5, uses assembler code - tuned for Intel MMX platform) - makefile.sgi => Silicon Graphics (cc, creates libpng12m.so) - makefile.sggcc => Silicon Graphics (gcc, creates libpng12m.so) - -Good luck, and happy coding. - --Glenn Randers-Pehrson - Internet: randeg@alum.rpi.edu - --Andreas Eric Dilger - Internet: adilger@enel.ucalgary.ca - Web: http://www-mddsp.enel.ucalgary.ca/People/adilger/ - --Guy Eric Schalnat - (formerly of Group 42, Inc) - Internet: gschal@infinet.com diff --git a/gtkmm-osx/trunk/libpng-1.2.5/TODO b/gtkmm-osx/trunk/libpng-1.2.5/TODO deleted file mode 100644 index a5f6395..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/TODO +++ /dev/null @@ -1,24 +0,0 @@ -TODO - list of things to do for libpng: - -Final bug fixes. -Improve API by hiding the png_struct and png_info structs. -Finish work on the no-floating-point version (including gamma compensation) -Better C++ wrapper/full C++ implementation? -Fix problem with C++ and EXTERN "C". -cHRM transformation. -Improve setjmp/longjmp usage or remove it in favor of returning error codes. -Add "grayscale->palette" transformation and "palette->grayscale" detection. -Improved dithering. -Multi-lingual error and warning message support. -Complete sRGB transformation (presently it simply uses gamma=0.45455). -Man pages for function calls. -Better documentation. -Better filter selection - (counting huffman bits/precompression? filter inertia? filter costs?). -Histogram creation. -Text conversion between different code pages (Latin-1 -> Mac and DOS). -Should we always malloc 2^bit_depth PLTE/tRNS/hIST entries for safety? -Build gamma tables using fixed point (and do away with floating point entirely). -Use greater precision when changing to linear gamma for compositing against - background and doing rgb-to-gray transformation. -Investigate pre-incremented loop counters and other loop constructions. diff --git a/gtkmm-osx/trunk/libpng-1.2.5/Y2KINFO b/gtkmm-osx/trunk/libpng-1.2.5/Y2KINFO deleted file mode 100644 index f57e962..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/Y2KINFO +++ /dev/null @@ -1,55 +0,0 @@ - Y2K compliance in libpng: - ========================= - - October 3, 2002 - - Since the PNG Development group is an ad-hoc body, we can't make - an official declaration. - - This is your unofficial assurance that libpng from version 0.71 and - upward through 1.2.5 are Y2K compliant. It is my belief that earlier - versions were also Y2K compliant. - - Libpng only has three year fields. One is a 2-byte unsigned integer - that will hold years up to 65535. The other two hold the date in text - format, and will hold years up to 9999. - - The integer is - "png_uint_16 year" in png_time_struct. - - The strings are - "png_charp time_buffer" in png_struct and - "near_time_buffer", which is a local character string in png.c. - - There are seven time-related functions: - - png_convert_to_rfc_1123() in png.c - (formerly png_convert_to_rfc_1152() in error) - png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c - png_convert_from_time_t() in pngwrite.c - png_get_tIME() in pngget.c - png_handle_tIME() in pngrutil.c, called in pngread.c - png_set_tIME() in pngset.c - png_write_tIME() in pngwutil.c, called in pngwrite.c - - All appear to handle dates properly in a Y2K environment. The - png_convert_from_time_t() function calls gmtime() to convert from system - clock time, which returns (year - 1900), which we properly convert to - the full 4-digit year. There is a possibility that applications using - libpng are not passing 4-digit years into the png_convert_to_rfc_1123() - function, or that they are incorrectly passing only a 2-digit year - instead of "year - 1900" into the png_convert_from_struct_tm() function, - but this is not under our control. The libpng documentation has always - stated that it works with 4-digit years, and the APIs have been - documented as such. - - The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned - integer to hold the year, and can hold years as large as 65535. - - zlib, upon which libpng depends, is also Y2K compliant. It contains - no date-related code. - - - Glenn Randers-Pehrson - libpng maintainer - PNG Development Group diff --git a/gtkmm-osx/trunk/libpng-1.2.5/configure b/gtkmm-osx/trunk/libpng-1.2.5/configure deleted file mode 100755 index ca05aca..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/configure +++ /dev/null @@ -1,6 +0,0 @@ -echo " - There is no \"configure\" script for Libpng-1.2.5. Instead, please - copy the appropriate makefile for your system from the \"scripts\" - directory. Read the INSTALL file for more details. -" - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/LICENSE b/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/LICENSE deleted file mode 100644 index 175ebfd..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ - --------------------------------------------------------------------------- - - Copyright (c) 1998-2001 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - --------------------------------------------------------------------------- diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/Makefile.sgi b/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/Makefile.sgi deleted file mode 100644 index e3ca6ce..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/Makefile.sgi +++ /dev/null @@ -1,104 +0,0 @@ -# Sample makefile for rpng-x / rpng2-x / wpng for SGI using cc and make. -# Greg Roelofs -# Last modified: 7 March 2002 -# -# The programs built by this makefile are described in the book, -# "PNG: The Definitive Guide," by Greg Roelofs (O'Reilly and -# Associates, 1999). Go buy a copy, eh? Buy some for friends -# and family, too. (Not that this is a blatant plug or anything.) -# -# Invoke this makefile from a shell prompt in the usual way; for example: -# -# make -f Makefile.sgi -# -# This makefile assumes libpng and zlib have already been built or downloaded -# and are both installed in /usr/local/{include,lib} (as indicated by the -# PNG* and Z* macros below). Edit as appropriate--choose only ONE each of -# the PNGINC, PNGLIB, ZINC and ZLIB lines. -# -# This makefile builds dynamically linked executables (against libpng and zlib, -# that is), but that can be changed by uncommenting the appropriate PNGLIB and -# ZLIB lines. - - -# macros -------------------------------------------------------------------- - -PNGINC = -I/usr/local/include/libpng12 -PNGLIB = -L/usr/local/lib -lpng12 # dynamically linked against libpng -#PNGLIB = /usr/local/lib/libpng12.a # statically linked against libpng -# or: -#PNGINC = -I../.. -#PNGLIB = -L../.. -lpng -#PNGLIB = ../../libpng.a - -ZINC = -I/usr/local/include -ZLIB = -L/usr/local/lib -lz # dynamically linked against zlib -#ZLIB = /usr/local/lib/libz.a # statically linked against zlib -#ZINC = -I../zlib -#ZLIB = -L../zlib -lz -#ZLIB = ../../../zlib/libz.a - -XINC = -I/usr/include/X11 # old-style, stock X distributions -XLIB = -L/usr/lib/X11 -lX11 -#XINC = -I/usr/openwin/include # Sun workstations (OpenWindows) -#XLIB = -L/usr/openwin/lib -lX11 -#XINC = -I/usr/X11R6/include # new X distributions (XFree86, etc.) -#XLIB = -L/usr/X11R6/lib -lX11 - -INCS = $(PNGINC) $(ZINC) $(XINC) -RLIBS = $(PNGLIB) $(ZLIB) $(XLIB) -lm -WLIBS = $(PNGLIB) $(ZLIB) - -CC = cc -LD = cc -RM = rm -f -# ABI must be the same as that used to build libpng. -ABI= -CFLAGS = $(ABI) -O -fullwarn $(INCS) -LDFLAGS = $(ABI) -O = .o -E = - -RPNG = rpng-x -RPNG2 = rpng2-x -WPNG = wpng - -ROBJS = $(RPNG)$(O) readpng$(O) -ROBJS2 = $(RPNG2)$(O) readpng2$(O) -WOBJS = $(WPNG)$(O) writepng$(O) - -EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E) - - -# implicit make rules ------------------------------------------------------- - -.c$(O): - $(CC) -c $(CFLAGS) $< - - -# dependencies -------------------------------------------------------------- - -all: $(EXES) - -$(RPNG)$(E): $(ROBJS) - $(LD) $(LDFLAGS) -o $@ $(ROBJS) $(RLIBS) - -$(RPNG2)$(E): $(ROBJS2) - $(LD) $(LDFLAGS) -o $@ $(ROBJS2) $(RLIBS) - -$(WPNG)$(E): $(WOBJS) - $(LD) $(LDFLAGS) -o $@ $(WOBJS) $(WLIBS) - -$(RPNG)$(O): $(RPNG).c readpng.h -$(RPNG2)$(O): $(RPNG2).c readpng2.h -$(WPNG)$(O): $(WPNG).c writepng.h - -readpng$(O): readpng.c readpng.h -readpng2$(O): readpng2.c readpng2.h -writepng$(O): writepng.c writepng.h - - -# maintenance --------------------------------------------------------------- - -clean: - $(RM) $(EXES) $(ROBJS) $(ROBJS2) $(WOBJS) diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/Makefile.unx b/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/Makefile.unx deleted file mode 100644 index c0c3fb1..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/Makefile.unx +++ /dev/null @@ -1,104 +0,0 @@ -# Sample makefile for rpng-x / rpng2-x / wpng using gcc and make. -# Greg Roelofs -# Last modified: 7 March 2002 -# -# The programs built by this makefile are described in the book, -# "PNG: The Definitive Guide," by Greg Roelofs (O'Reilly and -# Associates, 1999). Go buy a copy, eh? Buy some for friends -# and family, too. (Not that this is a blatant plug or anything.) -# -# Invoke this makefile from a shell prompt in the usual way; for example: -# -# make -f Makefile.unx -# -# This makefile assumes libpng and zlib have already been built or downloaded -# and are both installed in /usr/local/{include,lib} (as indicated by the -# PNG* and Z* macros below). Edit as appropriate--choose only ONE each of -# the PNGINC, PNGLIB, ZINC and ZLIB lines. -# -# This makefile builds statically linked executables (against libpng and zlib, -# that is), but that can be changed by uncommenting the appropriate PNGLIB and -# ZLIB lines. - - -# macros -------------------------------------------------------------------- - -PNGINC = -I/usr/local/include/libpng12 -#PNGLIB = -L/usr/local/lib -lpng12 # dynamically linked against libpng -PNGLIB = /usr/local/lib/libpng12.a # statically linked against libpng -# or: -#PNGINC = -I../libpng -#PNGLIB = -L../libpng -lpng -#PNGLIB = ../libpng/libpng.a - -ZINC = -I/usr/local/include -#ZLIB = -L/usr/local/lib -lz # dynamically linked against zlib -ZLIB = /usr/local/lib/libz.a # statically linked against zlib -#ZINC = -I../zlib -#ZLIB = -L../zlib -lz -#ZLIB = ../zlib/libz.a - -#XINC = -I/usr/include # old-style, stock X distributions -#XLIB = -L/usr/lib/X11 -lX11 -#XINC = -I/usr/openwin/include # Sun workstations (OpenWindows) -#XLIB = -L/usr/openwin/lib -lX11 -XINC = -I/usr/X11R6/include # new X distributions (XFree86, etc.) -XLIB = -L/usr/X11R6/lib -lX11 - -INCS = $(PNGINC) $(ZINC) $(XINC) -RLIBS = $(PNGLIB) $(ZLIB) $(XLIB) -lm -WLIBS = $(PNGLIB) $(ZLIB) - -CC = gcc -LD = gcc -RM = rm -f -CFLAGS = -O -Wall $(INCS) -# [note that -Wall is a gcc-specific compilation flag ("most warnings on")] -# [-ansi, -pedantic and -W can also be used] -LDFLAGS = -O = .o -E = - -RPNG = rpng-x -RPNG2 = rpng2-x -WPNG = wpng - -ROBJS = $(RPNG)$(O) readpng$(O) -ROBJS2 = $(RPNG2)$(O) readpng2$(O) -WOBJS = $(WPNG)$(O) writepng$(O) - -EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E) - - -# implicit make rules ------------------------------------------------------- - -.c$(O): - $(CC) -c $(CFLAGS) $< - - -# dependencies -------------------------------------------------------------- - -all: $(EXES) - -$(RPNG)$(E): $(ROBJS) - $(LD) $(LDFLAGS) -o $@ $(ROBJS) $(RLIBS) - -$(RPNG2)$(E): $(ROBJS2) - $(LD) $(LDFLAGS) -o $@ $(ROBJS2) $(RLIBS) - -$(WPNG)$(E): $(WOBJS) - $(LD) $(LDFLAGS) -o $@ $(WOBJS) $(WLIBS) - -$(RPNG)$(O): $(RPNG).c readpng.h -$(RPNG2)$(O): $(RPNG2).c readpng2.h -$(WPNG)$(O): $(WPNG).c writepng.h - -readpng$(O): readpng.c readpng.h -readpng2$(O): readpng2.c readpng2.h -writepng$(O): writepng.c writepng.h - - -# maintenance --------------------------------------------------------------- - -clean: - $(RM) $(EXES) $(ROBJS) $(ROBJS2) $(WOBJS) diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/Makefile.w32 b/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/Makefile.w32 deleted file mode 100644 index 62041cd..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/Makefile.w32 +++ /dev/null @@ -1,112 +0,0 @@ -# Sample makefile for rpng-win / rpng2-win / wpng using MSVC and NMAKE. -# Greg Roelofs -# Last modified: 16 February 1999 -# -# The programs built by this makefile are described in the book, -# "PNG: The Definitive Guide," by Greg Roelofs (O'Reilly and -# Associates, 1999). Go buy a copy, eh? Buy some for friends -# and family, too. (Not that this is a blatant plug or anything.) -# -# Invoke this makefile from a DOS prompt window via: -# -# %devstudio%\vc\bin\vcvars32.bat -# nmake -nologo -f Makefile.w32 -# -# where %devstudio% is the installation directory for MSVC / DevStudio. If -# you get "environment out of space" errors, create a desktop shortcut with -# "c:\windows\command.com /e:4096" as the program command line and set the -# working directory to this directory. Then double-click to open the new -# DOS-prompt window with a bigger environment and retry the commands above. -# -# This makefile assumes libpng and zlib have already been built or downloaded -# and are in subdirectories at the same level as the current subdirectory -# (as indicated by the PNGPATH and ZPATH macros below). Edit as appropriate. -# -# Note that the names of the dynamic and static libpng and zlib libraries -# used below may change in later releases of the libraries. This makefile -# builds statically linked executables, but that can be changed by uncom- -# menting the appropriate PNGLIB and ZLIB lines. - -!include - - -# macros -------------------------------------------------------------------- - -PNGPATH = ../libpng -PNGINC = -I$(PNGPATH) -#PNGLIB = $(PNGPATH)/pngdll.lib -PNGLIB = $(PNGPATH)/libpng.lib - -ZPATH = ../zlib -ZINC = -I$(ZPATH) -#ZLIB = $(ZPATH)/zlibdll.lib -ZLIB = $(ZPATH)/zlibstat.lib - -WINLIBS = -defaultlib:user32.lib gdi32.lib -# ["real" apps may also need comctl32.lib, comdlg32.lib, winmm.lib, etc.] - -INCS = $(PNGINC) $(ZINC) -RLIBS = $(PNGLIB) $(ZLIB) $(WINLIBS) -WLIBS = $(PNGLIB) $(ZLIB) - -CC = cl -LD = link -RM = del -CFLAGS = -nologo -O -W3 $(INCS) $(cvars) -# [note that -Wall is an MSVC-specific compilation flag ("all warnings on")] -# [see %devstudio%\vc\include\win32.mak for cvars macro definition] -O = .obj -E = .exe - -RLDFLAGS = -nologo -subsystem:windows -WLDFLAGS = -nologo - -RPNG = rpng-win -RPNG2 = rpng2-win -WPNG = wpng - -ROBJS = $(RPNG)$(O) readpng$(O) -ROBJS2 = $(RPNG2)$(O) readpng2$(O) -WOBJS = $(WPNG)$(O) writepng$(O) - -EXES = $(RPNG)$(E) $(RPNG2)$(E) $(WPNG)$(E) - - -# implicit make rules ------------------------------------------------------- - -.c$(O): - $(CC) -c $(CFLAGS) $< - - -# dependencies -------------------------------------------------------------- - -all: $(EXES) - -$(RPNG)$(E): $(ROBJS) - $(LD) $(RLDFLAGS) -out:$@ $(ROBJS) $(RLIBS) - -$(RPNG2)$(E): $(ROBJS2) - $(LD) $(RLDFLAGS) -out:$@ $(ROBJS2) $(RLIBS) - -$(WPNG)$(E): $(WOBJS) - $(LD) $(WLDFLAGS) -out:$@ $(WOBJS) $(WLIBS) - -$(RPNG)$(O): $(RPNG).c readpng.h -$(RPNG2)$(O): $(RPNG2).c readpng2.h -$(WPNG)$(O): $(WPNG).c writepng.h - -readpng$(O): readpng.c readpng.h -readpng2$(O): readpng2.c readpng2.h -writepng$(O): writepng.c writepng.h - - -# maintenance --------------------------------------------------------------- - -clean: -# ideally we could just do this: -# $(RM) $(EXES) $(ROBJS) $(ROBJS2) $(WOBJS) -# ...but the Windows "DEL" command is none too bright, so: - $(RM) r*$(E) - $(RM) w*$(E) - $(RM) r*$(O) - $(RM) w*$(O) diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/README b/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/README deleted file mode 100644 index c67045c..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/README +++ /dev/null @@ -1,185 +0,0 @@ - =========================== - PNG: The Definitive Guide - =========================== - - Source Code - -Chapters 13, 14 and 15 of "PNG: The Definitive Guide" discuss three free, -cross-platform demo programs that show how to use the libpng reference -library: rpng, rpng2 and wpng. rpng and rpng2 are viewers; the first is -a very simple example that that shows how a standard file-viewer might use -libpng, while the second is designed to process streaming data and shows -how a web browser might be written. wpng is a simple command-line program -that reads binary PGM and PPM files (the ``raw'' grayscale and RGB subsets -of PBMPLUS/NetPBM) and converts them to PNG. - -The source code for all three demo programs currently compiles under -Unix, OpenVMS, and 32-bit Windows. (Special thanks to Martin Zinser, -zinser@decus.de, for making the necessary changes for OpenVMS and for -providing an appropriate build script.) Build instructions can be found -below. - -Files: - - README this file - LICENSE terms of distribution and reuse (BSD-like) - - Makefile.unx Unix makefile - Makefile.w32 Windows (MSVC) makefile - makevms.com OpenVMS build script - - rpng-win.c Windows front end for the basic viewer - rpng-x.c X Window System (Unix, OpenVMS) front end - readpng.c generic back end for the basic viewer - readpng.h header file for the basic viewer - - rpng2-win.c Windows front end for the progressive viewer - rpng2-x.c X front end for the progressive viewer - readpng2.c generic back end for the progressive viewer - readpng2.h header file for the progressive viewer - - wpng.c generic (text) front end for the converter - writepng.c generic back end for the converter - writepng.h header file for the converter - - toucan.png transparent PNG for testing (by Stefan Schneider) - -Note that, although the programs are designed to be functional, their -primary purpose is to illustrate how to use libpng to add PNG support to -other programs. As such, their user interfaces are crude and definitely -are not intended for everyday use. - -Please see http://www.libpng.org/pub/png/pngbook.html for further infor- -mation and links to the latest version of the source code, and Chapters -13-15 of the book for detailed discussion of the three programs. - -Greg Roelofs -newt@pobox.com -30 June 2001 - - -BUILD INSTRUCTIONS - - - Prerequisites (in order of compilation): - - - zlib http://www.gzip.org/zlib/ - - libpng http://www.libpng.org/pub/png/libpng.html - - pngbook http://www.libpng.org/pub/png/book/sources.html - - The pngbook demo programs are explicitly designed to demonstrate proper - coding techniques for using the libpng reference library. As a result, - you need to download and build both zlib (on which libpng depends) and - libpng. A common build setup is to place the zlib, libpng and pngbook - subdirectory trees ("folders") in the same parent directory. Then the - libpng build can refer to files in ../zlib (or ..\zlib or [-.zlib]), - and similarly for the pngbook build. - - Note that all three packages are designed to be built from a command - line by default; those who wish to use a graphical or other integrated - development environments are on their own. - - - - Unix: - - Unpack the latest pngbook sources (which should correspond to this - README file) into a directory and change into that directory. - - Copy Makefile.unx to Makefile and edit the PNG* and Z* variables - appropriately (possibly also the X* variables if necessary). - - make - - There is no "install" target, so copy the three executables somewhere - in your path or run them from the current directory. All three will - print a basic usage screen when run without any command-line arguments; - see the book for more details. - - - - Windows: - - Unpack the latest pngbook sources (which should correspond to this - README file) into a folder, open a "DOS shell" or "command prompt" - or equivalent command-line window, and cd into the folder where you - unpacked the source code. - - For MSVC, set up the necessary environment variables by invoking - - %devstudio%\vc\bin\vcvars32.bat - - where where %devstudio% is the installation directory for MSVC / - DevStudio. If you get "environment out of space" errors under 95/98, - create a desktop shortcut with "c:\windows\command.com /e:4096" as - the program command line and set the working directory to the pngbook - directory. Then double-click to open the new DOS-prompt window with - a bigger environment and retry the commands above. - - Copy Makefile.w32 to Makefile and edit the PNGPATH and ZPATH variables - appropriately (possibly also the "INC" and "LIB" variables if needed). - Note that the names of the dynamic and static libpng and zlib libraries - used in the makefile may change in later releases of the libraries. - Also note that, as of libpng version 1.0.5, MSVC DLL builds do not work. - This makefile therefore builds statically linked executables, but if - the DLL problems ever get fixed, uncommenting the appropriate PNGLIB - and ZLIB lines will build dynamically linked executables instead. - - Do the build by typing - - nmake - - The result should be three executables: rpng-win.exe, rpng2-win.exe, - and wpng.exe. Copy them somewhere in your PATH or run them from the - current folder. Like the Unix versions, the two windowed programs - (rpng and rpng2) now display a usage screen in a console window when - invoked without command-line arguments; this is new behavior as of - the June 2001 release. Note that the programs use the Unix-style "-" - character to specify options, instead of the more common DOS/Windows - "/" character. (For example: "rpng2-win -bgpat 4 foo.png", not - "rpng2-win /bgpat 4 foo.png") - - - - OpenVMS: - - Unpack the pngbook sources into a subdirectory and change into that - subdirectory. - - Edit makevms.com appropriately, specifically the zpath and pngpath - variables. - - @makevms - - To run the programs, they probably first need to be set up as "foreign - symbols," with "disk" and "dir" set appropriately: - - $ rpng == "$disk:[dir]rpng-x.exe" - $ rpng2 == "$disk:[dir]rpng2-x.exe" - $ wpng == "$disk:[dir]wpng.exe" - - All three will print a basic usage screen when run without any command- - line arguments; see the book for more details. Note that the options - style is Unix-like, i.e., preceded by "-" rather than "/". - - -RUNNING THE PROGRAMS: (VERY) BRIEF INTRO - - rpng is a simple PNG viewer that can display transparent PNGs with a - specified background color; for example, - - rpng -bgcolor #ff0000 toucan.png - - would display the image with a red background. rpng2 is a progressive - viewer that simulates a web browser in some respects; it can display - images against either a background color or a dynamically generated - background image. For example: - - rpng2 -bgpat 16 toucan.png - - wpng is a purely command-line image converter from binary PBMPLUS/NetPBM - format (.pgm or .ppm) to PNG; for example, - - wpng -time < toucan.ppm > toucan.png - - would convert the specified PPM file (using redirection) to PNG, auto- - matically setting the PNG modification-time chunk. - - All options can be abbreviated to the shortest unique value; for example, - "-bgc" for -bgcolor (versus "-bgp" for -bgpat), or "-g" for -gamma. diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/makevms.com b/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/makevms.com deleted file mode 100644 index bd37dc0..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/makevms.com +++ /dev/null @@ -1,132 +0,0 @@ -$!------------------------------------------------------------------------------ -$! make "PNG: The Definitive Guide" demo programs (for X) under OpenVMS -$! -$! Script created by Martin Zinser for libpng; modified by Greg Roelofs -$! for standalone pngbook source distribution. -$! -$! -$! Set locations where zlib and libpng sources live. -$! -$ zpath = "" -$ pngpath = "" -$! -$ if f$search("[---.zlib]zlib.h").nes."" then zpath = "[---.zlib]" -$ if f$search("[--]png.h").nes."" then pngpath = "[--]" -$! -$ if f$search("[-.zlib]zlib.h").nes."" then zpath = "[-.zlib]" -$ if f$search("[-.libpng]png.h").nes."" then pngpath = "[-.libpng]" -$! -$ if zpath .eqs. "" -$ then -$ write sys$output "zlib include not found. Exiting..." -$ exit 2 -$ endif -$! -$ if pngpath .eqs. "" -$ then -$ write sys$output "libpng include not found. Exiting..." -$ exit 2 -$ endif -$! -$! Look for the compiler used. -$! -$ ccopt="/include=(''zpath',''pngpath')" -$ if f$getsyi("HW_MODEL").ge.1024 -$ then -$ ccopt = "/prefix=all"+ccopt -$ comp = "__decc__=1" -$ if f$trnlnm("SYS").eqs."" then define sys sys$library: -$ else -$ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs."" -$ then -$ if f$trnlnm("SYS").eqs."" then define sys sys$library: -$ if f$search("SYS$SYSTEM:VAXC.EXE").eqs."" -$ then -$ comp = "__gcc__=1" -$ CC :== GCC -$ else -$ comp = "__vaxc__=1" -$ endif -$ else -$ if f$trnlnm("SYS").eqs."" then define sys decc$library_include: -$ ccopt = "/decc/prefix=all"+ccopt -$ comp = "__decc__=1" -$ endif -$ endif -$ open/write lopt lib.opt -$ write lopt "''pngpath'libpng.olb/lib" -$ write lopt "''zpath'libz.olb/lib" -$ close lopt -$ open/write xopt x11.opt -$ write xopt "sys$library:decw$xlibshr.exe/share" -$ close xopt -$! -$! Build 'em. -$! -$ write sys$output "Compiling PNG book programs ..." -$ CALL MAKE readpng.OBJ "cc ''CCOPT' readpng" - - readpng.c readpng.h -$ CALL MAKE readpng2.OBJ "cc ''CCOPT' readpng2" - - readpng2.c readpng2.h -$ CALL MAKE writepng.OBJ "cc ''CCOPT' writepng" - - writepng.c writepng.h -$ write sys$output "Building rpng-x..." -$ CALL MAKE rpng-x.OBJ "cc ''CCOPT' rpng-x" - - rpng-x.c readpng.h -$ call make rpng-x.exe - - "LINK rpng-x,readpng,lib.opt/opt,x11.opt/opt" - - rpng-x.obj readpng.obj -$ write sys$output "Building rpng2-x..." -$ CALL MAKE rpng2-x.OBJ "cc ''CCOPT' rpng2-x" - - rpng2-x.c readpng2.h -$ call make rpng2-x.exe - - "LINK rpng2-x,readpng2,lib.opt/opt,x11.opt/opt" - - rpng2-x.obj readpng2.obj -$ write sys$output "Building wpng..." -$ CALL MAKE wpng.OBJ "cc ''CCOPT' wpng" - - wpng.c writepng.h -$ call make wpng.exe - - "LINK wpng,writepng,lib.opt/opt" - - wpng.obj writepng.obj -$ exit -$! -$! -$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES -$ V = 'F$Verify(0) -$! P1 = What we are trying to make -$! P2 = Command to make it -$! P3 - P8 What it depends on -$ -$ If F$Search(P1) .Eqs. "" Then Goto Makeit -$ Time = F$CvTime(F$File(P1,"RDT")) -$arg=3 -$Loop: -$ Argument = P'arg -$ If Argument .Eqs. "" Then Goto Exit -$ El=0 -$Loop2: -$ File = F$Element(El," ",Argument) -$ If File .Eqs. " " Then Goto Endl -$ AFile = "" -$Loop3: -$ OFile = AFile -$ AFile = F$Search(File) -$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl -$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit -$ Goto Loop3 -$NextEL: -$ El = El + 1 -$ Goto Loop2 -$EndL: -$ arg=arg+1 -$ If arg .Le. 8 Then Goto Loop -$ Goto Exit -$ -$Makeit: -$ VV=F$VERIFY(0) -$ write sys$output P2 -$ 'P2 -$ VV='F$Verify(VV) -$Exit: -$ If V Then Set Verify -$ENDSUBROUTINE diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/readpng.c b/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/readpng.c deleted file mode 100644 index b8e0904..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/readpng.c +++ /dev/null @@ -1,280 +0,0 @@ -/*--------------------------------------------------------------------------- - - rpng - simple PNG display program readpng.c - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2000 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - ---------------------------------------------------------------------------*/ - -#include -#include - -#include "png.h" /* libpng header; includes zlib.h */ -#include "readpng.h" /* typedefs, common macros, public prototypes */ - -/* future versions of libpng will provide this macro: */ -#ifndef png_jmpbuf -# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) -#endif - - -static png_structp png_ptr = NULL; -static png_infop info_ptr = NULL; - -png_uint_32 width, height; -int bit_depth, color_type; -uch *image_data = NULL; - - -void readpng_version_info(void) -{ - fprintf(stderr, " Compiled with libpng %s; using libpng %s.\n", - PNG_LIBPNG_VER_STRING, png_libpng_ver); - fprintf(stderr, " Compiled with zlib %s; using zlib %s.\n", - ZLIB_VERSION, zlib_version); -} - - -/* return value = 0 for success, 1 for bad sig, 2 for bad IHDR, 4 for no mem */ - -int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight) -{ - uch sig[8]; - - - /* first do a quick check that the file really is a PNG image; could - * have used slightly more general png_sig_cmp() function instead */ - - fread(sig, 1, 8, infile); - if (!png_check_sig(sig, 8)) - return 1; /* bad signature */ - - - /* could pass pointers to user-defined error handlers instead of NULLs: */ - - png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); - if (!png_ptr) - return 4; /* out of memory */ - - info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) { - png_destroy_read_struct(&png_ptr, NULL, NULL); - return 4; /* out of memory */ - } - - - /* we could create a second info struct here (end_info), but it's only - * useful if we want to keep pre- and post-IDAT chunk info separated - * (mainly for PNG-aware image editors and converters) */ - - - /* setjmp() must be called in every function that calls a PNG-reading - * libpng function */ - - if (setjmp(png_jmpbuf(png_ptr))) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return 2; - } - - - png_init_io(png_ptr, infile); - png_set_sig_bytes(png_ptr, 8); /* we already read the 8 signature bytes */ - - png_read_info(png_ptr, info_ptr); /* read all PNG info up to image data */ - - - /* alternatively, could make separate calls to png_get_image_width(), - * etc., but want bit_depth and color_type for later [don't care about - * compression_type and filter_type => NULLs] */ - - png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - NULL, NULL, NULL); - *pWidth = width; - *pHeight = height; - - - /* OK, that's all we need for now; return happy */ - - return 0; -} - - - - -/* returns 0 if succeeds, 1 if fails due to no bKGD chunk, 2 if libpng error; - * scales values to 8-bit if necessary */ - -int readpng_get_bgcolor(uch *red, uch *green, uch *blue) -{ - png_color_16p pBackground; - - - /* setjmp() must be called in every function that calls a PNG-reading - * libpng function */ - - if (setjmp(png_jmpbuf(png_ptr))) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return 2; - } - - - if (!png_get_valid(png_ptr, info_ptr, PNG_INFO_bKGD)) - return 1; - - /* it is not obvious from the libpng documentation, but this function - * takes a pointer to a pointer, and it always returns valid red, green - * and blue values, regardless of color_type: */ - - png_get_bKGD(png_ptr, info_ptr, &pBackground); - - - /* however, it always returns the raw bKGD data, regardless of any - * bit-depth transformations, so check depth and adjust if necessary */ - - if (bit_depth == 16) { - *red = pBackground->red >> 8; - *green = pBackground->green >> 8; - *blue = pBackground->blue >> 8; - } else if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { - if (bit_depth == 1) - *red = *green = *blue = pBackground->gray? 255 : 0; - else if (bit_depth == 2) - *red = *green = *blue = (255/3) * pBackground->gray; - else /* bit_depth == 4 */ - *red = *green = *blue = (255/15) * pBackground->gray; - } else { - *red = (uch)pBackground->red; - *green = (uch)pBackground->green; - *blue = (uch)pBackground->blue; - } - - return 0; -} - - - - -/* display_exponent == LUT_exponent * CRT_exponent */ - -uch *readpng_get_image(double display_exponent, int *pChannels, ulg *pRowbytes) -{ - double gamma; - png_uint_32 i, rowbytes; - png_bytepp row_pointers = NULL; - - - /* setjmp() must be called in every function that calls a PNG-reading - * libpng function */ - - if (setjmp(png_jmpbuf(png_ptr))) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return NULL; - } - - - /* expand palette images to RGB, low-bit-depth grayscale images to 8 bits, - * transparency chunks to full alpha channel; strip 16-bit-per-sample - * images to 8 bits per sample; and convert grayscale to RGB[A] */ - - if (color_type == PNG_COLOR_TYPE_PALETTE) - png_set_expand(png_ptr); - if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) - png_set_expand(png_ptr); - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) - png_set_expand(png_ptr); - if (bit_depth == 16) - png_set_strip_16(png_ptr); - if (color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - png_set_gray_to_rgb(png_ptr); - - - /* unlike the example in the libpng documentation, we have *no* idea where - * this file may have come from--so if it doesn't have a file gamma, don't - * do any correction ("do no harm") */ - - if (png_get_gAMA(png_ptr, info_ptr, &gamma)) - png_set_gamma(png_ptr, display_exponent, gamma); - - - /* all transformations have been registered; now update info_ptr data, - * get rowbytes and channels, and allocate image memory */ - - png_read_update_info(png_ptr, info_ptr); - - *pRowbytes = rowbytes = png_get_rowbytes(png_ptr, info_ptr); - *pChannels = (int)png_get_channels(png_ptr, info_ptr); - - if ((image_data = (uch *)malloc(rowbytes*height)) == NULL) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return NULL; - } - if ((row_pointers = (png_bytepp)malloc(height*sizeof(png_bytep))) == NULL) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - free(image_data); - image_data = NULL; - return NULL; - } - - Trace((stderr, "readpng_get_image: channels = %d, rowbytes = %ld, height = %ld\n", *pChannels, rowbytes, height)); - - - /* set the individual row_pointers to point at the correct offsets */ - - for (i = 0; i < height; ++i) - row_pointers[i] = image_data + i*rowbytes; - - - /* now we can go ahead and just read the whole image */ - - png_read_image(png_ptr, row_pointers); - - - /* and we're done! (png_read_end() can be omitted if no processing of - * post-IDAT text/time/etc. is desired) */ - - free(row_pointers); - row_pointers = NULL; - - png_read_end(png_ptr, NULL); - - return image_data; -} - - -void readpng_cleanup(int free_image_data) -{ - if (free_image_data && image_data) { - free(image_data); - image_data = NULL; - } - - if (png_ptr && info_ptr) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - png_ptr = NULL; - info_ptr = NULL; - } -} diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/readpng.h b/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/readpng.h deleted file mode 100644 index 1c19aca..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/readpng.h +++ /dev/null @@ -1,64 +0,0 @@ -/*--------------------------------------------------------------------------- - - rpng - simple PNG display program readpng.h - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2000 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - ---------------------------------------------------------------------------*/ - -#ifndef TRUE -# define TRUE 1 -# define FALSE 0 -#endif - -#ifndef MAX -# define MAX(a,b) ((a) > (b)? (a) : (b)) -# define MIN(a,b) ((a) < (b)? (a) : (b)) -#endif - -#ifdef DEBUG -# define Trace(x) {fprintf x ; fflush(stderr); fflush(stdout);} -#else -# define Trace(x) ; -#endif - -typedef unsigned char uch; -typedef unsigned short ush; -typedef unsigned long ulg; - - -/* prototypes for public functions in readpng.c */ - -void readpng_version_info(void); - -int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight); - -int readpng_get_bgcolor(uch *bg_red, uch *bg_green, uch *bg_blue); - -uch *readpng_get_image(double display_exponent, int *pChannels, - ulg *pRowbytes); - -void readpng_cleanup(int free_image_data); diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/readpng2.c b/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/readpng2.c deleted file mode 100644 index 9e66a0b..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/readpng2.c +++ /dev/null @@ -1,624 +0,0 @@ -/*--------------------------------------------------------------------------- - - rpng2 - progressive-model PNG display program readpng2.c - - --------------------------------------------------------------------------- - - Changelog: - - 1.01: initial public release - - 1.02: added code to skip unused chunks (GR-P) - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2002 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - ---------------------------------------------------------------------------*/ - - -#include /* for exit() prototype */ - -#include "png.h" /* libpng header; includes zlib.h and setjmp.h */ -#include "readpng2.h" /* typedefs, common macros, public prototypes */ - - -/* local prototypes */ - -static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr); -static void readpng2_row_callback(png_structp png_ptr, png_bytep new_row, - png_uint_32 row_num, int pass); -static void readpng2_end_callback(png_structp png_ptr, png_infop info_ptr); -static void readpng2_error_handler(png_structp png_ptr, png_const_charp msg); - - - - -void readpng2_version_info(void) -{ -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && \ - (defined(__i386__) || defined(_M_IX86)) && \ - defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) - /* - * WARNING: This preprocessor approach means that the following code - * cannot be used with a libpng DLL older than 1.2.0--the - * compiled-in symbols for the new functions will not exist. - * (Could use dlopen() and dlsym() on Unix and corresponding - * calls for Windows, but not portable...) - */ - { - int mmxsupport = png_mmx_support(); - if (mmxsupport < 0) - fprintf(stderr, " Compiled with libpng %s; using libpng %s " - "without MMX support.\n", PNG_LIBPNG_VER_STRING, png_libpng_ver); - else { - int compilerID; - png_uint_32 mmx_mask = png_get_mmx_flagmask( - PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID); - - fprintf(stderr, " Compiled with libpng %s; using libpng %s " - "with MMX support\n (%s version).", PNG_LIBPNG_VER_STRING, - png_libpng_ver, compilerID == 1? "MSVC++" : - (compilerID == 2? "GNU C" : "unknown")); - fprintf(stderr, " Processor %s MMX instructions.\n", - mmxsupport? "supports" : "does not support"); - if (mmxsupport > 0) { - int num_optims = 0; - - fprintf(stderr, - " Potential MMX optimizations supported by libpng:\n"); - if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_SUB) - ++num_optims; - if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_UP) - ++num_optims; - if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_AVG) - ++num_optims; - if (mmx_mask & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH) - ++num_optims; - if (num_optims) - fprintf(stderr, - " decoding %s row filters (reading)\n", - (num_optims == 4)? "all non-trivial" : "some"); - if (mmx_mask & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) { - fprintf(stderr, " combining rows (reading)\n"); - ++num_optims; - } - if (mmx_mask & PNG_ASM_FLAG_MMX_READ_INTERLACE) { - fprintf(stderr, - " expanding interlacing (reading)\n"); - ++num_optims; - } - mmx_mask &= ~( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \ - | PNG_ASM_FLAG_MMX_READ_INTERLACE \ - | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ - | PNG_ASM_FLAG_MMX_READ_FILTER_UP \ - | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ - | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ); - if (mmx_mask) { - fprintf(stderr, " other (unknown)\n"); - ++num_optims; - } - if (num_optims == 0) - fprintf(stderr, " (none)\n"); - } - } - } -#else - fprintf(stderr, " Compiled with libpng %s; using libpng %s " - "without MMX support.\n", PNG_LIBPNG_VER_STRING, png_libpng_ver); -#endif - - fprintf(stderr, " Compiled with zlib %s; using zlib %s.\n", - ZLIB_VERSION, zlib_version); -} - - - - -int readpng2_check_sig(uch *sig, int num) -{ - return png_check_sig(sig, num); -} - - - - -/* returns 0 for success, 2 for libpng problem, 4 for out of memory */ - -int readpng2_init(mainprog_info *mainprog_ptr) -{ - png_structp png_ptr; /* note: temporary variables! */ - png_infop info_ptr; - - - /* could also replace libpng warning-handler (final NULL), but no need: */ - - png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, mainprog_ptr, - readpng2_error_handler, NULL); - if (!png_ptr) - return 4; /* out of memory */ - - info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) { - png_destroy_read_struct(&png_ptr, NULL, NULL); - return 4; /* out of memory */ - } - - - /* we could create a second info struct here (end_info), but it's only - * useful if we want to keep pre- and post-IDAT chunk info separated - * (mainly for PNG-aware image editors and converters) */ - - - /* setjmp() must be called in every function that calls a PNG-reading - * libpng function, unless an alternate error handler was installed-- - * but compatible error handlers must either use longjmp() themselves - * (as in this program) or exit immediately, so here we are: */ - - if (setjmp(mainprog_ptr->jmpbuf)) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - return 2; - } - - /* prepare the reader to ignore all recognized chunks whose data isn't - * going to be used, i.e., all chunks recognized by libpng except for - * IHDR, PLTE, IDAT, IEND, tRNS, bKGD, gAMA, and sRGB : */ - -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) - { -#ifndef HANDLE_CHUNK_NEVER -/* prior to libpng-1.2.5, this macro was internal, so we define it here. */ -# define HANDLE_CHUNK_NEVER 1 -#endif - /* these byte strings were copied from png.h. - * If a future libpng version recognizes more chunks, add them - * to this list. If a future version of readpng2.c recognizes - * more chunks, delete them from this list. */ - png_byte png_chunk_types_to_ignore[]= - { 99, 72, 82, 77, '\0', /* cHRM */ - 104, 73, 83, 84, '\0', /* hIST */ - 105, 67, 67, 80, '\0', /* iCCP */ - 105, 84, 88, 116, '\0', /* iTXt */ - 111, 70, 70, 115, '\0', /* oFFs */ - 112, 67, 65, 76, '\0', /* pCAL */ - 115, 67, 65, 76, '\0', /* sCAL */ - 112, 72, 89, 115, '\0', /* pHYs */ - 115, 66, 73, 84, '\0', /* sBIT */ - 115, 80, 76, 84, '\0', /* sPLT */ - 116, 69, 88, 116, '\0', /* tEXt */ - 116, 73, 77, 69, '\0', /* tIME */ - 122, 84, 88, 116, '\0'}; /* zTXt */ -#define NUM_PNG_CHUNK_TYPES_TO_IGNORE 13 - - png_set_keep_unknown_chunks(png_ptr, HANDLE_CHUNK_NEVER, - png_chunk_types_to_ignore, NUM_PNG_CHUNK_TYPES_TO_IGNORE); - } -#endif - - /* instead of doing png_init_io() here, now we set up our callback - * functions for progressive decoding */ - - png_set_progressive_read_fn(png_ptr, mainprog_ptr, - readpng2_info_callback, readpng2_row_callback, readpng2_end_callback); - - - /* - * may as well enable or disable MMX routines here, if supported; - * - * to enable all: mask = png_get_mmx_flagmask ( - * PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID); - * flags = png_get_asm_flags (png_ptr); - * flags |= mask; - * png_set_asm_flags (png_ptr, flags); - * - * to disable all: mask = png_get_mmx_flagmask ( - * PNG_SELECT_READ | PNG_SELECT_WRITE, &compilerID); - * flags = png_get_asm_flags (png_ptr); - * flags &= ~mask; - * png_set_asm_flags (png_ptr, flags); - */ - -#if (defined(__i386__) || defined(_M_IX86)) && \ - defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) - /* - * WARNING: This preprocessor approach means that the following code - * cannot be used with a libpng DLL older than 1.2.0--the - * compiled-in symbols for the new functions will not exist. - * (Could use dlopen() and dlsym() on Unix and corresponding - * calls for Windows, but not portable...) - */ - { -#ifdef PNG_ASSEMBLER_CODE_SUPPORTED - png_uint_32 mmx_disable_mask = 0; - png_uint_32 asm_flags, mmx_mask; - int compilerID; - - if (mainprog_ptr->nommxfilters) - mmx_disable_mask |= ( PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ - | PNG_ASM_FLAG_MMX_READ_FILTER_UP \ - | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ - | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ); - if (mainprog_ptr->nommxcombine) - mmx_disable_mask |= PNG_ASM_FLAG_MMX_READ_COMBINE_ROW; - if (mainprog_ptr->nommxinterlace) - mmx_disable_mask |= PNG_ASM_FLAG_MMX_READ_INTERLACE; - asm_flags = png_get_asm_flags(png_ptr); - png_set_asm_flags(png_ptr, asm_flags & ~mmx_disable_mask); - - - /* Now query libpng's asm settings, just for yuks. Note that this - * differs from the querying of its *potential* MMX capabilities - * in readpng2_version_info(); this is true runtime verification. */ - - asm_flags = png_get_asm_flags(png_ptr); - mmx_mask = png_get_mmx_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE, - &compilerID); - if (asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_COMPILED) - fprintf(stderr, - " MMX support (%s version) is compiled into libpng\n", - compilerID == 1? "MSVC++" : - (compilerID == 2? "GNU C" : "unknown")); - else - fprintf(stderr, " MMX support is not compiled into libpng\n"); - fprintf(stderr, " MMX instructions are %ssupported by CPU\n", - (asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU)? "" : "not "); - fprintf(stderr, " MMX read support for combining rows is %sabled\n", - (asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)? "en" : "dis"); - fprintf(stderr, - " MMX read support for expanding interlacing is %sabled\n", - (asm_flags & PNG_ASM_FLAG_MMX_READ_INTERLACE)? "en" : "dis"); - fprintf(stderr, " MMX read support for \"sub\" filter is %sabled\n", - (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "en" : "dis"); - fprintf(stderr, " MMX read support for \"up\" filter is %sabled\n", - (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP)? "en" : "dis"); - fprintf(stderr, " MMX read support for \"avg\" filter is %sabled\n", - (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)? "en" : "dis"); - fprintf(stderr, " MMX read support for \"Paeth\" filter is %sabled\n", - (asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)? "en" : "dis"); - asm_flags &= (mmx_mask & ~( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \ - | PNG_ASM_FLAG_MMX_READ_INTERLACE \ - | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ - | PNG_ASM_FLAG_MMX_READ_FILTER_UP \ - | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ - | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH )); - if (asm_flags) - fprintf(stderr, - " additional MMX support is also enabled (0x%02lx)\n", - asm_flags); -#else /* !PNG_ASSEMBLER_CODE_SUPPORTED */ - fprintf(stderr, " MMX querying is disabled in libpng.\n"); -#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */ - } -#endif - - - /* make sure we save our pointers for use in readpng2_decode_data() */ - - mainprog_ptr->png_ptr = png_ptr; - mainprog_ptr->info_ptr = info_ptr; - - - /* and that's all there is to initialization */ - - return 0; -} - - - - -/* returns 0 for success, 2 for libpng (longjmp) problem */ - -int readpng2_decode_data(mainprog_info *mainprog_ptr, uch *rawbuf, ulg length) -{ - png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr; - png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr; - - - /* setjmp() must be called in every function that calls a PNG-reading - * libpng function */ - - if (setjmp(mainprog_ptr->jmpbuf)) { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - mainprog_ptr->png_ptr = NULL; - mainprog_ptr->info_ptr = NULL; - return 2; - } - - - /* hand off the next chunk of input data to libpng for decoding */ - - png_process_data(png_ptr, info_ptr, rawbuf, length); - - return 0; -} - - - - -static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr) -{ - mainprog_info *mainprog_ptr; - int color_type, bit_depth; - double gamma; - - - /* setjmp() doesn't make sense here, because we'd either have to exit(), - * longjmp() ourselves, or return control to libpng, which doesn't want - * to see us again. By not doing anything here, libpng will instead jump - * to readpng2_decode_data(), which can return an error value to the main - * program. */ - - - /* retrieve the pointer to our special-purpose struct, using the png_ptr - * that libpng passed back to us (i.e., not a global this time--there's - * no real difference for a single image, but for a multithreaded browser - * decoding several PNG images at the same time, one needs to avoid mixing - * up different images' structs) */ - - mainprog_ptr = png_get_progressive_ptr(png_ptr); - - if (mainprog_ptr == NULL) { /* we be hosed */ - fprintf(stderr, - "readpng2 error: main struct not recoverable in info_callback.\n"); - fflush(stderr); - return; - /* - * Alternatively, we could call our error-handler just like libpng - * does, which would effectively terminate the program. Since this - * can only happen if png_ptr gets redirected somewhere odd or the - * main PNG struct gets wiped, we're probably toast anyway. (If - * png_ptr itself is NULL, we would not have been called.) - */ - } - - - /* this is just like in the non-progressive case */ - - png_get_IHDR(png_ptr, info_ptr, &mainprog_ptr->width, - &mainprog_ptr->height, &bit_depth, &color_type, NULL, NULL, NULL); - - - /* since we know we've read all of the PNG file's "header" (i.e., up - * to IDAT), we can check for a background color here */ - - if (mainprog_ptr->need_bgcolor && - png_get_valid(png_ptr, info_ptr, PNG_INFO_bKGD)) - { - png_color_16p pBackground; - - /* it is not obvious from the libpng documentation, but this function - * takes a pointer to a pointer, and it always returns valid red, - * green and blue values, regardless of color_type: */ - png_get_bKGD(png_ptr, info_ptr, &pBackground); - - /* however, it always returns the raw bKGD data, regardless of any - * bit-depth transformations, so check depth and adjust if necessary */ - if (bit_depth == 16) { - mainprog_ptr->bg_red = pBackground->red >> 8; - mainprog_ptr->bg_green = pBackground->green >> 8; - mainprog_ptr->bg_blue = pBackground->blue >> 8; - } else if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { - if (bit_depth == 1) - mainprog_ptr->bg_red = mainprog_ptr->bg_green = - mainprog_ptr->bg_blue = pBackground->gray? 255 : 0; - else if (bit_depth == 2) - mainprog_ptr->bg_red = mainprog_ptr->bg_green = - mainprog_ptr->bg_blue = (255/3) * pBackground->gray; - else /* bit_depth == 4 */ - mainprog_ptr->bg_red = mainprog_ptr->bg_green = - mainprog_ptr->bg_blue = (255/15) * pBackground->gray; - } else { - mainprog_ptr->bg_red = (uch)pBackground->red; - mainprog_ptr->bg_green = (uch)pBackground->green; - mainprog_ptr->bg_blue = (uch)pBackground->blue; - } - } - - - /* as before, let libpng expand palette images to RGB, low-bit-depth - * grayscale images to 8 bits, transparency chunks to full alpha channel; - * strip 16-bit-per-sample images to 8 bits per sample; and convert - * grayscale to RGB[A] */ - - if (color_type == PNG_COLOR_TYPE_PALETTE) - png_set_expand(png_ptr); - if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) - png_set_expand(png_ptr); - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) - png_set_expand(png_ptr); - if (bit_depth == 16) - png_set_strip_16(png_ptr); - if (color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - png_set_gray_to_rgb(png_ptr); - - - /* Unlike the basic viewer, which was designed to operate on local files, - * this program is intended to simulate a web browser--even though we - * actually read from a local file, too. But because we are pretending - * that most of the images originate on the Internet, we follow the recom- - * mendation of the sRGB proposal and treat unlabelled images (no gAMA - * chunk) as existing in the sRGB color space. That is, we assume that - * such images have a file gamma of 0.45455, which corresponds to a PC-like - * display system. This change in assumptions will have no effect on a - * PC-like system, but on a Mac, SGI, NeXT or other system with a non- - * identity lookup table, it will darken unlabelled images, which effec- - * tively favors images from PC-like systems over those originating on - * the local platform. Note that mainprog_ptr->display_exponent is the - * "gamma" value for the entire display system, i.e., the product of - * LUT_exponent and CRT_exponent. */ - - if (png_get_gAMA(png_ptr, info_ptr, &gamma)) - png_set_gamma(png_ptr, mainprog_ptr->display_exponent, gamma); - else - png_set_gamma(png_ptr, mainprog_ptr->display_exponent, 0.45455); - - - /* we'll let libpng expand interlaced images, too */ - - mainprog_ptr->passes = png_set_interlace_handling(png_ptr); - - - /* all transformations have been registered; now update info_ptr data and - * then get rowbytes and channels */ - - png_read_update_info(png_ptr, info_ptr); - - mainprog_ptr->rowbytes = (int)png_get_rowbytes(png_ptr, info_ptr); - mainprog_ptr->channels = png_get_channels(png_ptr, info_ptr); - - - /* Call the main program to allocate memory for the image buffer and - * initialize windows and whatnot. (The old-style function-pointer - * invocation is used for compatibility with a few supposedly ANSI - * compilers that nevertheless barf on "fn_ptr()"-style syntax.) */ - - (*mainprog_ptr->mainprog_init)(); - - - /* and that takes care of initialization */ - - return; -} - - - - - -static void readpng2_row_callback(png_structp png_ptr, png_bytep new_row, - png_uint_32 row_num, int pass) -{ - mainprog_info *mainprog_ptr; - - - /* first check whether the row differs from the previous pass; if not, - * nothing to combine or display */ - - if (!new_row) - return; - - - /* retrieve the pointer to our special-purpose struct so we can access - * the old rows and image-display callback function */ - - mainprog_ptr = png_get_progressive_ptr(png_ptr); - - - /* save the pass number for optional use by the front end */ - - mainprog_ptr->pass = pass; - - - /* have libpng either combine the new row data with the existing row data - * from previous passes (if interlaced) or else just copy the new row - * into the main program's image buffer */ - - png_progressive_combine_row(png_ptr, mainprog_ptr->row_pointers[row_num], - new_row); - - - /* finally, call the display routine in the main program with the number - * of the row we just updated */ - - (*mainprog_ptr->mainprog_display_row)(row_num); - - - /* and we're ready for more */ - - return; -} - - - - - -static void readpng2_end_callback(png_structp png_ptr, png_infop info_ptr) -{ - mainprog_info *mainprog_ptr; - - - /* retrieve the pointer to our special-purpose struct */ - - mainprog_ptr = png_get_progressive_ptr(png_ptr); - - - /* let the main program know that it should flush any buffered image - * data to the display now and set a "done" flag or whatever, but note - * that it SHOULD NOT DESTROY THE PNG STRUCTS YET--in other words, do - * NOT call readpng2_cleanup() either here or in the finish_display() - * routine; wait until control returns to the main program via - * readpng2_decode_data() */ - - (*mainprog_ptr->mainprog_finish_display)(); - - - /* all done */ - - return; -} - - - - - -void readpng2_cleanup(mainprog_info *mainprog_ptr) -{ - png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr; - png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr; - - if (png_ptr && info_ptr) - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - - mainprog_ptr->png_ptr = NULL; - mainprog_ptr->info_ptr = NULL; -} - - - - - -static void readpng2_error_handler(png_structp png_ptr, png_const_charp msg) -{ - mainprog_info *mainprog_ptr; - - /* This function, aside from the extra step of retrieving the "error - * pointer" (below) and the fact that it exists within the application - * rather than within libpng, is essentially identical to libpng's - * default error handler. The second point is critical: since both - * setjmp() and longjmp() are called from the same code, they are - * guaranteed to have compatible notions of how big a jmp_buf is, - * regardless of whether _BSD_SOURCE or anything else has (or has not) - * been defined. */ - - fprintf(stderr, "readpng2 libpng error: %s\n", msg); - fflush(stderr); - - mainprog_ptr = png_get_error_ptr(png_ptr); - if (mainprog_ptr == NULL) { /* we are completely hosed now */ - fprintf(stderr, - "readpng2 severe error: jmpbuf not recoverable; terminating.\n"); - fflush(stderr); - exit(99); - } - - longjmp(mainprog_ptr->jmpbuf, 1); -} diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/readpng2.h b/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/readpng2.h deleted file mode 100644 index 7caa9d9..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/readpng2.h +++ /dev/null @@ -1,91 +0,0 @@ -/*--------------------------------------------------------------------------- - - rpng2 - progressive-model PNG display program readpng2.h - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2001 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - ---------------------------------------------------------------------------*/ - -#ifndef TRUE -# define TRUE 1 -# define FALSE 0 -#endif - -#ifndef MAX -# define MAX(a,b) ((a) > (b)? (a) : (b)) -# define MIN(a,b) ((a) < (b)? (a) : (b)) -#endif - -#ifdef DEBUG -# define Trace(x) {fprintf x ; fflush(stderr); fflush(stdout);} -#else -# define Trace(x) ; -#endif - -typedef unsigned char uch; -typedef unsigned short ush; -typedef unsigned long ulg; - -typedef struct _mainprog_info { - double display_exponent; - ulg width; - ulg height; - void *png_ptr; - void *info_ptr; - void (*mainprog_init)(void); - void (*mainprog_display_row)(ulg row_num); - void (*mainprog_finish_display)(void); - uch *image_data; - uch **row_pointers; - jmp_buf jmpbuf; - int passes; /* not used */ - int pass; - int rowbytes; - int channels; - int need_bgcolor; -#if (defined(__i386__) || defined(_M_IX86)) - int nommxfilters; - int nommxcombine; - int nommxinterlace; -#endif - int done; - uch bg_red; - uch bg_green; - uch bg_blue; -} mainprog_info; - - -/* prototypes for public functions in readpng2.c */ - -void readpng2_version_info(void); - -int readpng2_check_sig(uch *sig, int num); - -int readpng2_init(mainprog_info *mainprog_ptr); - -int readpng2_decode_data(mainprog_info *mainprog_ptr, uch *rawbuf, ulg length); - -void readpng2_cleanup(mainprog_info *mainprog_ptr); diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/rpng-win.c b/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/rpng-win.c deleted file mode 100644 index b84a7fc..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/rpng-win.c +++ /dev/null @@ -1,642 +0,0 @@ -/*--------------------------------------------------------------------------- - - rpng - simple PNG display program rpng-win.c - - This program decodes and displays PNG images, with gamma correction and - optionally with a user-specified background color (in case the image has - transparency). It is very nearly the most basic PNG viewer possible. - This version is for 32-bit Windows; it may compile under 16-bit Windows - with a little tweaking (or maybe not). - - to do: - - handle quoted command-line args (especially filenames with spaces) - - have minimum window width: oh well - - use %.1023s to simplify truncation of title-bar string? - - --------------------------------------------------------------------------- - - Changelog: - - 1.00: initial public release - - 1.01: modified to allow abbreviated options; fixed long/ulong mis- - match; switched to png_jmpbuf() macro - - 1.02: added extra set of parentheses to png_jmpbuf() macro; fixed - command-line parsing bug - - 1.10: enabled "message window"/console (thanks to David Geldreich) - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2001 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - ---------------------------------------------------------------------------*/ - -#define PROGNAME "rpng-win" -#define LONGNAME "Simple PNG Viewer for Windows" -#define VERSION "1.20 of 28 May 2001" - -#include -#include -#include -#include -#include -#include /* only for _getch() */ - -/* #define DEBUG : this enables the Trace() macros */ - -#include "readpng.h" /* typedefs, common macros, readpng prototypes */ - - -/* could just include png.h, but this macro is the only thing we need - * (name and typedefs changed to local versions); note that side effects - * only happen with alpha (which could easily be avoided with - * "ush acopy = (alpha);") */ - -#define alpha_composite(composite, fg, alpha, bg) { \ - ush temp = ((ush)(fg)*(ush)(alpha) + \ - (ush)(bg)*(ush)(255 - (ush)(alpha)) + (ush)128); \ - (composite) = (uch)((temp + (temp >> 8)) >> 8); \ -} - - -/* local prototypes */ -static int rpng_win_create_window(HINSTANCE hInst, int showmode); -static int rpng_win_display_image(void); -static void rpng_win_cleanup(void); -LRESULT CALLBACK rpng_win_wndproc(HWND, UINT, WPARAM, LPARAM); - - -static char titlebar[1024], *window_name = titlebar; -static char *progname = PROGNAME; -static char *appname = LONGNAME; -static char *icon_name = PROGNAME; /* GRR: not (yet) used */ -static char *filename; -static FILE *infile; - -static char *bgstr; -static uch bg_red=0, bg_green=0, bg_blue=0; - -static double display_exponent; - -static ulg image_width, image_height, image_rowbytes; -static int image_channels; -static uch *image_data; - -/* Windows-specific variables */ -static ulg wimage_rowbytes; -static uch *dib; -static uch *wimage_data; -static BITMAPINFOHEADER *bmih; - -static HWND global_hwnd; - - - - -int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) -{ - char *args[1024]; /* arbitrary limit, but should suffice */ - char *p, *q, **argv = args; - int argc = 0; - int rc, alen, flen; - int error = 0; - int have_bg = FALSE; - double LUT_exponent; /* just the lookup table */ - double CRT_exponent = 2.2; /* just the monitor */ - double default_display_exponent; /* whole display system */ - MSG msg; - - - filename = (char *)NULL; - - - /* First reenable console output, which normally goes to the bit bucket - * for windowed apps. Closing the console window will terminate the - * app. Thanks to David.Geldreich@realviz.com for supplying the magical - * incantation. */ - - AllocConsole(); - freopen("CONOUT$", "a", stderr); - freopen("CONOUT$", "a", stdout); - - - /* Next set the default value for our display-system exponent, i.e., - * the product of the CRT exponent and the exponent corresponding to - * the frame-buffer's lookup table (LUT), if any. This is not an - * exhaustive list of LUT values (e.g., OpenStep has a lot of weird - * ones), but it should cover 99% of the current possibilities. And - * yes, these ifdefs are completely wasted in a Windows program... */ - -#if defined(NeXT) - LUT_exponent = 1.0 / 2.2; - /* - if (some_next_function_that_returns_gamma(&next_gamma)) - LUT_exponent = 1.0 / next_gamma; - */ -#elif defined(sgi) - LUT_exponent = 1.0 / 1.7; - /* there doesn't seem to be any documented function to get the - * "gamma" value, so we do it the hard way */ - infile = fopen("/etc/config/system.glGammaVal", "r"); - if (infile) { - double sgi_gamma; - - fgets(tmpline, 80, infile); - fclose(infile); - sgi_gamma = atof(tmpline); - if (sgi_gamma > 0.0) - LUT_exponent = 1.0 / sgi_gamma; - } -#elif defined(Macintosh) - LUT_exponent = 1.8 / 2.61; - /* - if (some_mac_function_that_returns_gamma(&mac_gamma)) - LUT_exponent = mac_gamma / 2.61; - */ -#else - LUT_exponent = 1.0; /* assume no LUT: most PCs */ -#endif - - /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */ - default_display_exponent = LUT_exponent * CRT_exponent; - - - /* If the user has set the SCREEN_GAMMA environment variable as suggested - * (somewhat imprecisely) in the libpng documentation, use that; otherwise - * use the default value we just calculated. Either way, the user may - * override this via a command-line option. */ - - if ((p = getenv("SCREEN_GAMMA")) != NULL) - display_exponent = atof(p); - else - display_exponent = default_display_exponent; - - - /* Windows really hates command lines, so we have to set up our own argv. - * Note that we do NOT bother with quoted arguments here, so don't use - * filenames with spaces in 'em! */ - - argv[argc++] = PROGNAME; - p = cmd; - for (;;) { - if (*p == ' ') - while (*++p == ' ') - ; - /* now p points at the first non-space after some spaces */ - if (*p == '\0') - break; /* nothing after the spaces: done */ - argv[argc++] = q = p; - while (*q && *q != ' ') - ++q; - /* now q points at a space or the end of the string */ - if (*q == '\0') - break; /* last argv already terminated; quit */ - *q = '\0'; /* change space to terminator */ - p = q + 1; - } - argv[argc] = NULL; /* terminate the argv array itself */ - - - /* Now parse the command line for options and the PNG filename. */ - - while (*++argv && !error) { - if (!strncmp(*argv, "-gamma", 2)) { - if (!*++argv) - ++error; - else { - display_exponent = atof(*argv); - if (display_exponent <= 0.0) - ++error; - } - } else if (!strncmp(*argv, "-bgcolor", 2)) { - if (!*++argv) - ++error; - else { - bgstr = *argv; - if (strlen(bgstr) != 7 || bgstr[0] != '#') - ++error; - else - have_bg = TRUE; - } - } else { - if (**argv != '-') { - filename = *argv; - if (argv[1]) /* shouldn't be any more args after filename */ - ++error; - } else - ++error; /* not expecting any other options */ - } - } - - if (!filename) { - ++error; - } else if (!(infile = fopen(filename, "rb"))) { - fprintf(stderr, PROGNAME ": can't open PNG file [%s]\n", filename); - ++error; - } else { - if ((rc = readpng_init(infile, &image_width, &image_height)) != 0) { - switch (rc) { - case 1: - fprintf(stderr, PROGNAME - ": [%s] is not a PNG file: incorrect signature\n", - filename); - break; - case 2: - fprintf(stderr, PROGNAME - ": [%s] has bad IHDR (libpng longjmp)\n", - filename); - break; - case 4: - fprintf(stderr, PROGNAME ": insufficient memory\n"); - break; - default: - fprintf(stderr, PROGNAME - ": unknown readpng_init() error\n"); - break; - } - ++error; - } - if (error) - fclose(infile); - } - - - /* usage screen */ - - if (error) { - int ch; - - fprintf(stderr, "\n%s %s: %s\n\n", PROGNAME, VERSION, appname); - readpng_version_info(); - fprintf(stderr, "\n" - "Usage: %s [-gamma exp] [-bgcolor bg] file.png\n" - " exp \ttransfer-function exponent (``gamma'') of the display\n" - "\t\t system in floating-point format (e.g., ``%.1f''); equal\n" - "\t\t to the product of the lookup-table exponent (varies)\n" - "\t\t and the CRT exponent (usually 2.2); must be positive\n" - " bg \tdesired background color in 7-character hex RGB format\n" - "\t\t (e.g., ``#ff7700'' for orange: same as HTML colors);\n" - "\t\t used with transparent images\n" - "\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n" - "Press Q or Esc to quit this usage screen.\n" - "\n", PROGNAME, default_display_exponent); - do - ch = _getch(); - while (ch != 'q' && ch != 'Q' && ch != 0x1B); - exit(1); - } else { - fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, appname); - fprintf(stderr, - "\n [console window: closing this window will terminate %s]\n\n", - PROGNAME); - } - - - /* set the title-bar string, but make sure buffer doesn't overflow */ - - alen = strlen(appname); - flen = strlen(filename); - if (alen + flen + 3 > 1023) - sprintf(titlebar, "%s: ...%s", appname, filename+(alen+flen+6-1023)); - else - sprintf(titlebar, "%s: %s", appname, filename); - - - /* if the user didn't specify a background color on the command line, - * check for one in the PNG file--if not, the initialized values of 0 - * (black) will be used */ - - if (have_bg) - sscanf(bgstr+1, "%2x%2x%2x", &bg_red, &bg_green, &bg_blue); - else if (readpng_get_bgcolor(&bg_red, &bg_green, &bg_blue) > 1) { - readpng_cleanup(TRUE); - fprintf(stderr, PROGNAME - ": libpng error while checking for background color\n"); - exit(2); - } - - - /* do the basic Windows initialization stuff, make the window and fill it - * with the background color */ - - if (rpng_win_create_window(hInst, showmode)) - exit(2); - - - /* decode the image, all at once */ - - Trace((stderr, "calling readpng_get_image()\n")) - image_data = readpng_get_image(display_exponent, &image_channels, - &image_rowbytes); - Trace((stderr, "done with readpng_get_image()\n")) - - - /* done with PNG file, so clean up to minimize memory usage (but do NOT - * nuke image_data!) */ - - readpng_cleanup(FALSE); - fclose(infile); - - if (!image_data) { - fprintf(stderr, PROGNAME ": unable to decode PNG image\n"); - exit(3); - } - - - /* display image (composite with background if requested) */ - - Trace((stderr, "calling rpng_win_display_image()\n")) - if (rpng_win_display_image()) { - free(image_data); - exit(4); - } - Trace((stderr, "done with rpng_win_display_image()\n")) - - - /* wait for the user to tell us when to quit */ - - printf( - "Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n"); - fflush(stdout); - - while (GetMessage(&msg, NULL, 0, 0)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - - /* OK, we're done: clean up all image and Windows resources and go away */ - - rpng_win_cleanup(); - - return msg.wParam; -} - - - - - -static int rpng_win_create_window(HINSTANCE hInst, int showmode) -{ - uch *dest; - int extra_width, extra_height; - ulg i, j; - WNDCLASSEX wndclass; - - -/*--------------------------------------------------------------------------- - Allocate memory for the display-specific version of the image (round up - to multiple of 4 for Windows DIB). - ---------------------------------------------------------------------------*/ - - wimage_rowbytes = ((3*image_width + 3L) >> 2) << 2; - - if (!(dib = (uch *)malloc(sizeof(BITMAPINFOHEADER) + - wimage_rowbytes*image_height))) - { - return 4; /* fail */ - } - -/*--------------------------------------------------------------------------- - Initialize the DIB. Negative height means to use top-down BMP ordering - (must be uncompressed, but that's what we want). Bit count of 1, 4 or 8 - implies a colormap of RGBX quads, but 24-bit BMPs just use B,G,R values - directly => wimage_data begins immediately after BMP header. - ---------------------------------------------------------------------------*/ - - memset(dib, 0, sizeof(BITMAPINFOHEADER)); - bmih = (BITMAPINFOHEADER *)dib; - bmih->biSize = sizeof(BITMAPINFOHEADER); - bmih->biWidth = image_width; - bmih->biHeight = -((long)image_height); - bmih->biPlanes = 1; - bmih->biBitCount = 24; - bmih->biCompression = 0; - wimage_data = dib + sizeof(BITMAPINFOHEADER); - -/*--------------------------------------------------------------------------- - Fill in background color (black by default); data are in BGR order. - ---------------------------------------------------------------------------*/ - - for (j = 0; j < image_height; ++j) { - dest = wimage_data + j*wimage_rowbytes; - for (i = image_width; i > 0; --i) { - *dest++ = bg_blue; - *dest++ = bg_green; - *dest++ = bg_red; - } - } - -/*--------------------------------------------------------------------------- - Set the window parameters. - ---------------------------------------------------------------------------*/ - - memset(&wndclass, 0, sizeof(wndclass)); - - wndclass.cbSize = sizeof(wndclass); - wndclass.style = CS_HREDRAW | CS_VREDRAW; - wndclass.lpfnWndProc = rpng_win_wndproc; - wndclass.hInstance = hInst; - wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION); - wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); - wndclass.hbrBackground = (HBRUSH)GetStockObject(DKGRAY_BRUSH); - wndclass.lpszMenuName = NULL; - wndclass.lpszClassName = progname; - wndclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION); - - RegisterClassEx(&wndclass); - -/*--------------------------------------------------------------------------- - Finally, create the window. - ---------------------------------------------------------------------------*/ - - extra_width = 2*(GetSystemMetrics(SM_CXBORDER) + - GetSystemMetrics(SM_CXDLGFRAME)); - extra_height = 2*(GetSystemMetrics(SM_CYBORDER) + - GetSystemMetrics(SM_CYDLGFRAME)) + - GetSystemMetrics(SM_CYCAPTION); - - global_hwnd = CreateWindow(progname, titlebar, WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, image_width+extra_width, - image_height+extra_height, NULL, NULL, hInst, NULL); - - ShowWindow(global_hwnd, showmode); - UpdateWindow(global_hwnd); - - return 0; - -} /* end function rpng_win_create_window() */ - - - - - -static int rpng_win_display_image() -{ - uch *src, *dest; - uch r, g, b, a; - ulg i, row, lastrow; - RECT rect; - - - Trace((stderr, "beginning display loop (image_channels == %d)\n", - image_channels)) - Trace((stderr, "(width = %ld, rowbytes = %ld, wimage_rowbytes = %d)\n", - image_width, image_rowbytes, wimage_rowbytes)) - - -/*--------------------------------------------------------------------------- - Blast image data to buffer. This whole routine takes place before the - message loop begins, so there's no real point in any pseudo-progressive - display... - ---------------------------------------------------------------------------*/ - - for (lastrow = row = 0; row < image_height; ++row) { - src = image_data + row*image_rowbytes; - dest = wimage_data + row*wimage_rowbytes; - if (image_channels == 3) { - for (i = image_width; i > 0; --i) { - r = *src++; - g = *src++; - b = *src++; - *dest++ = b; - *dest++ = g; /* note reverse order */ - *dest++ = r; - } - } else /* if (image_channels == 4) */ { - for (i = image_width; i > 0; --i) { - r = *src++; - g = *src++; - b = *src++; - a = *src++; - if (a == 255) { - *dest++ = b; - *dest++ = g; - *dest++ = r; - } else if (a == 0) { - *dest++ = bg_blue; - *dest++ = bg_green; - *dest++ = bg_red; - } else { - /* this macro (copied from png.h) composites the - * foreground and background values and puts the - * result into the first argument; there are no - * side effects with the first argument */ - alpha_composite(*dest++, b, a, bg_blue); - alpha_composite(*dest++, g, a, bg_green); - alpha_composite(*dest++, r, a, bg_red); - } - } - } - /* display after every 16 lines */ - if (((row+1) & 0xf) == 0) { - rect.left = 0L; - rect.top = (LONG)lastrow; - rect.right = (LONG)image_width; /* possibly off by one? */ - rect.bottom = (LONG)lastrow + 16L; /* possibly off by one? */ - InvalidateRect(global_hwnd, &rect, FALSE); - UpdateWindow(global_hwnd); /* similar to XFlush() */ - lastrow = row + 1; - } - } - - Trace((stderr, "calling final image-flush routine\n")) - if (lastrow < image_height) { - rect.left = 0L; - rect.top = (LONG)lastrow; - rect.right = (LONG)image_width; /* possibly off by one? */ - rect.bottom = (LONG)image_height; /* possibly off by one? */ - InvalidateRect(global_hwnd, &rect, FALSE); - UpdateWindow(global_hwnd); /* similar to XFlush() */ - } - -/* - last param determines whether or not background is wiped before paint - InvalidateRect(global_hwnd, NULL, TRUE); - UpdateWindow(global_hwnd); - */ - - return 0; -} - - - - - -static void rpng_win_cleanup() -{ - if (image_data) { - free(image_data); - image_data = NULL; - } - - if (dib) { - free(dib); - dib = NULL; - } -} - - - - - -LRESULT CALLBACK rpng_win_wndproc(HWND hwnd, UINT iMsg, WPARAM wP, LPARAM lP) -{ - HDC hdc; - PAINTSTRUCT ps; - int rc; - - switch (iMsg) { - case WM_CREATE: - /* one-time processing here, if any */ - return 0; - - case WM_PAINT: - hdc = BeginPaint(hwnd, &ps); - /* dest */ - rc = StretchDIBits(hdc, 0, 0, image_width, image_height, - /* source */ - 0, 0, image_width, image_height, - wimage_data, (BITMAPINFO *)bmih, - /* iUsage: no clue */ - 0, SRCCOPY); - EndPaint(hwnd, &ps); - return 0; - - /* wait for the user to tell us when to quit */ - case WM_CHAR: - switch (wP) { /* only need one, so ignore repeat count */ - case 'q': - case 'Q': - case 0x1B: /* Esc key */ - PostQuitMessage(0); - } - return 0; - - case WM_LBUTTONDOWN: /* another way of quitting */ - case WM_DESTROY: - PostQuitMessage(0); - return 0; - } - - return DefWindowProc(hwnd, iMsg, wP, lP); -} diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/rpng-x.c b/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/rpng-x.c deleted file mode 100644 index e787ef1..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/rpng-x.c +++ /dev/null @@ -1,858 +0,0 @@ -/*--------------------------------------------------------------------------- - - rpng - simple PNG display program rpng-x.c - - This program decodes and displays PNG images, with gamma correction and - optionally with a user-specified background color (in case the image has - transparency). It is very nearly the most basic PNG viewer possible. - This version is for the X Window System (tested by author under Unix and - by Martin Zinser under OpenVMS; may work under OS/2 with some tweaking). - - to do: - - 8-bit support - - use %.1023s to simplify truncation of title-bar string? - - --------------------------------------------------------------------------- - - Changelog: - - 1.01: initial public release - - 1.02: modified to allow abbreviated options; fixed long/ulong mis- - match; switched to png_jmpbuf() macro - - 1.10: added support for non-default visuals; fixed X pixel-conversion - - 1.11: added extra set of parentheses to png_jmpbuf() macro; fixed - command-line parsing bug - - 1.12: fixed small X memory leak (thanks to Francois Petitjean) - - 1.13: fixed XFreeGC() crash bug - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2001 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - ---------------------------------------------------------------------------*/ - -#define PROGNAME "rpng-x" -#define LONGNAME "Simple PNG Viewer for X" -#define VERSION "1.13 of 16 August 2001" - -#include -#include -#include -#include -#include -#include -#include -#include - -/* #define DEBUG : this enables the Trace() macros */ - -#include "readpng.h" /* typedefs, common macros, readpng prototypes */ - - -/* could just include png.h, but this macro is the only thing we need - * (name and typedefs changed to local versions); note that side effects - * only happen with alpha (which could easily be avoided with - * "ush acopy = (alpha);") */ - -#define alpha_composite(composite, fg, alpha, bg) { \ - ush temp = ((ush)(fg)*(ush)(alpha) + \ - (ush)(bg)*(ush)(255 - (ush)(alpha)) + (ush)128); \ - (composite) = (uch)((temp + (temp >> 8)) >> 8); \ -} - - -/* local prototypes */ -static int rpng_x_create_window(void); -static int rpng_x_display_image(void); -static void rpng_x_cleanup(void); -static int rpng_x_msb(ulg u32val); - - -static char titlebar[1024], *window_name = titlebar; -static char *appname = LONGNAME; -static char *icon_name = PROGNAME; -static char *filename; -static FILE *infile; - -static char *bgstr; -static uch bg_red=0, bg_green=0, bg_blue=0; - -static double display_exponent; - -static ulg image_width, image_height, image_rowbytes; -static int image_channels; -static uch *image_data; - -/* X-specific variables */ -static char *displayname; -static XImage *ximage; -static Display *display; -static int depth; -static Visual *visual; -static XVisualInfo *visual_list; -static int RShift, GShift, BShift; -static ulg RMask, GMask, BMask; -static Window window; -static GC gc; -static Colormap colormap; - -static int have_nondefault_visual = FALSE; -static int have_colormap = FALSE; -static int have_window = FALSE; -static int have_gc = FALSE; -/* -ulg numcolors=0, pixels[256]; -ush reds[256], greens[256], blues[256]; - */ - - - - -int main(int argc, char **argv) -{ -#ifdef sgi - char tmpline[80]; -#endif - char *p; - int rc, alen, flen; - int error = 0; - int have_bg = FALSE; - double LUT_exponent; /* just the lookup table */ - double CRT_exponent = 2.2; /* just the monitor */ - double default_display_exponent; /* whole display system */ - XEvent e; - KeySym k; - - - displayname = (char *)NULL; - filename = (char *)NULL; - - - /* First set the default value for our display-system exponent, i.e., - * the product of the CRT exponent and the exponent corresponding to - * the frame-buffer's lookup table (LUT), if any. This is not an - * exhaustive list of LUT values (e.g., OpenStep has a lot of weird - * ones), but it should cover 99% of the current possibilities. */ - -#if defined(NeXT) - LUT_exponent = 1.0 / 2.2; - /* - if (some_next_function_that_returns_gamma(&next_gamma)) - LUT_exponent = 1.0 / next_gamma; - */ -#elif defined(sgi) - LUT_exponent = 1.0 / 1.7; - /* there doesn't seem to be any documented function to get the - * "gamma" value, so we do it the hard way */ - infile = fopen("/etc/config/system.glGammaVal", "r"); - if (infile) { - double sgi_gamma; - - fgets(tmpline, 80, infile); - fclose(infile); - sgi_gamma = atof(tmpline); - if (sgi_gamma > 0.0) - LUT_exponent = 1.0 / sgi_gamma; - } -#elif defined(Macintosh) - LUT_exponent = 1.8 / 2.61; - /* - if (some_mac_function_that_returns_gamma(&mac_gamma)) - LUT_exponent = mac_gamma / 2.61; - */ -#else - LUT_exponent = 1.0; /* assume no LUT: most PCs */ -#endif - - /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */ - default_display_exponent = LUT_exponent * CRT_exponent; - - - /* If the user has set the SCREEN_GAMMA environment variable as suggested - * (somewhat imprecisely) in the libpng documentation, use that; otherwise - * use the default value we just calculated. Either way, the user may - * override this via a command-line option. */ - - if ((p = getenv("SCREEN_GAMMA")) != NULL) - display_exponent = atof(p); - else - display_exponent = default_display_exponent; - - - /* Now parse the command line for options and the PNG filename. */ - - while (*++argv && !error) { - if (!strncmp(*argv, "-display", 2)) { - if (!*++argv) - ++error; - else - displayname = *argv; - } else if (!strncmp(*argv, "-gamma", 2)) { - if (!*++argv) - ++error; - else { - display_exponent = atof(*argv); - if (display_exponent <= 0.0) - ++error; - } - } else if (!strncmp(*argv, "-bgcolor", 2)) { - if (!*++argv) - ++error; - else { - bgstr = *argv; - if (strlen(bgstr) != 7 || bgstr[0] != '#') - ++error; - else - have_bg = TRUE; - } - } else { - if (**argv != '-') { - filename = *argv; - if (argv[1]) /* shouldn't be any more args after filename */ - ++error; - } else - ++error; /* not expecting any other options */ - } - } - - if (!filename) { - ++error; - } else if (!(infile = fopen(filename, "rb"))) { - fprintf(stderr, PROGNAME ": can't open PNG file [%s]\n", filename); - ++error; - } else { - if ((rc = readpng_init(infile, &image_width, &image_height)) != 0) { - switch (rc) { - case 1: - fprintf(stderr, PROGNAME - ": [%s] is not a PNG file: incorrect signature\n", - filename); - break; - case 2: - fprintf(stderr, PROGNAME - ": [%s] has bad IHDR (libpng longjmp)\n", - filename); - break; - case 4: - fprintf(stderr, PROGNAME ": insufficient memory\n"); - break; - default: - fprintf(stderr, PROGNAME - ": unknown readpng_init() error\n"); - break; - } - ++error; - } else { - display = XOpenDisplay(displayname); - if (!display) { - readpng_cleanup(TRUE); - fprintf(stderr, PROGNAME ": can't open X display [%s]\n", - displayname? displayname : "default"); - ++error; - } - } - if (error) - fclose(infile); - } - - - /* usage screen */ - - if (error) { - fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, appname); - readpng_version_info(); - fprintf(stderr, "\n" - "Usage: %s [-display xdpy] [-gamma exp] [-bgcolor bg] file.png\n" - " xdpy\tname of the target X display (e.g., ``hostname:0'')\n" - " exp \ttransfer-function exponent (``gamma'') of the display\n" - "\t\t system in floating-point format (e.g., ``%.1f''); equal\n" - "\t\t to the product of the lookup-table exponent (varies)\n" - "\t\t and the CRT exponent (usually 2.2); must be positive\n" - " bg \tdesired background color in 7-character hex RGB format\n" - "\t\t (e.g., ``#ff7700'' for orange: same as HTML colors);\n" - "\t\t used with transparent images\n" - "\nPress Q, Esc or mouse button 1 (within image window, after image\n" - "is displayed) to quit.\n" - "\n", PROGNAME, default_display_exponent); - exit(1); - } - - - /* set the title-bar string, but make sure buffer doesn't overflow */ - - alen = strlen(appname); - flen = strlen(filename); - if (alen + flen + 3 > 1023) - sprintf(titlebar, "%s: ...%s", appname, filename+(alen+flen+6-1023)); - else - sprintf(titlebar, "%s: %s", appname, filename); - - - /* if the user didn't specify a background color on the command line, - * check for one in the PNG file--if not, the initialized values of 0 - * (black) will be used */ - - if (have_bg) { - unsigned r, g, b; /* this approach quiets compiler warnings */ - - sscanf(bgstr+1, "%2x%2x%2x", &r, &g, &b); - bg_red = (uch)r; - bg_green = (uch)g; - bg_blue = (uch)b; - } else if (readpng_get_bgcolor(&bg_red, &bg_green, &bg_blue) > 1) { - readpng_cleanup(TRUE); - fprintf(stderr, PROGNAME - ": libpng error while checking for background color\n"); - exit(2); - } - - - /* do the basic X initialization stuff, make the window and fill it - * with the background color */ - - if (rpng_x_create_window()) - exit(2); - - - /* decode the image, all at once */ - - Trace((stderr, "calling readpng_get_image()\n")) - image_data = readpng_get_image(display_exponent, &image_channels, - &image_rowbytes); - Trace((stderr, "done with readpng_get_image()\n")) - - - /* done with PNG file, so clean up to minimize memory usage (but do NOT - * nuke image_data!) */ - - readpng_cleanup(FALSE); - fclose(infile); - - if (!image_data) { - fprintf(stderr, PROGNAME ": unable to decode PNG image\n"); - exit(3); - } - - - /* display image (composite with background if requested) */ - - Trace((stderr, "calling rpng_x_display_image()\n")) - if (rpng_x_display_image()) { - free(image_data); - exit(4); - } - Trace((stderr, "done with rpng_x_display_image()\n")) - - - /* wait for the user to tell us when to quit */ - - printf( - "Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n"); - fflush(stdout); - - do - XNextEvent(display, &e); - while (!(e.type == ButtonPress && e.xbutton.button == Button1) && - !(e.type == KeyPress && /* v--- or 1 for shifted keys */ - ((k = XLookupKeysym(&e.xkey, 0)) == XK_q || k == XK_Escape) )); - - - /* OK, we're done: clean up all image and X resources and go away */ - - rpng_x_cleanup(); - - return 0; -} - - - - - -static int rpng_x_create_window(void) -{ - uch *xdata; - int need_colormap = FALSE; - int screen, pad; - ulg bg_pixel = 0L; - ulg attrmask; - Window root; - XEvent e; - XGCValues gcvalues; - XSetWindowAttributes attr; - XSizeHints *size_hints; - XTextProperty windowName, *pWindowName = &windowName; - XTextProperty iconName, *pIconName = &iconName; - XVisualInfo visual_info; - XWMHints *wm_hints; - - - screen = DefaultScreen(display); - depth = DisplayPlanes(display, screen); - root = RootWindow(display, screen); - -#ifdef DEBUG - XSynchronize(display, True); -#endif - -#if 0 -/* GRR: add 8-bit support */ - if (/* depth != 8 && */ depth != 16 && depth != 24 && depth != 32) { - fprintf(stderr, - "screen depth %d not supported (only 16-, 24- or 32-bit TrueColor)\n", - depth); - return 2; - } - - XMatchVisualInfo(display, screen, depth, - (depth == 8)? PseudoColor : TrueColor, &visual_info); - visual = visual_info.visual; -#else - if (depth != 16 && depth != 24 && depth != 32) { - int visuals_matched = 0; - - Trace((stderr, "default depth is %d: checking other visuals\n", - depth)) - - /* 24-bit first */ - visual_info.screen = screen; - visual_info.depth = 24; - visual_list = XGetVisualInfo(display, - VisualScreenMask | VisualDepthMask, &visual_info, &visuals_matched); - if (visuals_matched == 0) { -/* GRR: add 15-, 16- and 32-bit TrueColor visuals (also DirectColor?) */ - fprintf(stderr, "default screen depth %d not supported, and no" - " 24-bit visuals found\n", depth); - return 2; - } - Trace((stderr, "XGetVisualInfo() returned %d 24-bit visuals\n", - visuals_matched)) - visual = visual_list[0].visual; - depth = visual_list[0].depth; -/* - colormap_size = visual_list[0].colormap_size; - visual_class = visual->class; - visualID = XVisualIDFromVisual(visual); - */ - have_nondefault_visual = TRUE; - need_colormap = TRUE; - } else { - XMatchVisualInfo(display, screen, depth, TrueColor, &visual_info); - visual = visual_info.visual; - } -#endif - - RMask = visual->red_mask; - GMask = visual->green_mask; - BMask = visual->blue_mask; - -/* GRR: add/check 8-bit support */ - if (depth == 8 || need_colormap) { - colormap = XCreateColormap(display, root, visual, AllocNone); - if (!colormap) { - fprintf(stderr, "XCreateColormap() failed\n"); - return 2; - } - have_colormap = TRUE; - } - if (depth == 15 || depth == 16) { - RShift = 15 - rpng_x_msb(RMask); /* these are right-shifts */ - GShift = 15 - rpng_x_msb(GMask); - BShift = 15 - rpng_x_msb(BMask); - } else if (depth > 16) { -#define NO_24BIT_MASKS -#ifdef NO_24BIT_MASKS - RShift = rpng_x_msb(RMask) - 7; /* these are left-shifts */ - GShift = rpng_x_msb(GMask) - 7; - BShift = rpng_x_msb(BMask) - 7; -#else - RShift = 7 - rpng_x_msb(RMask); /* these are right-shifts, too */ - GShift = 7 - rpng_x_msb(GMask); - BShift = 7 - rpng_x_msb(BMask); -#endif - } - if (depth >= 15 && (RShift < 0 || GShift < 0 || BShift < 0)) { - fprintf(stderr, "rpng internal logic error: negative X shift(s)!\n"); - return 2; - } - -/*--------------------------------------------------------------------------- - Finally, create the window. - ---------------------------------------------------------------------------*/ - - attr.backing_store = Always; - attr.event_mask = ExposureMask | KeyPressMask | ButtonPressMask; - attrmask = CWBackingStore | CWEventMask; - if (have_nondefault_visual) { - attr.colormap = colormap; - attr.background_pixel = 0; - attr.border_pixel = 1; - attrmask |= CWColormap | CWBackPixel | CWBorderPixel; - } - - window = XCreateWindow(display, root, 0, 0, image_width, image_height, 0, - depth, InputOutput, visual, attrmask, &attr); - - if (window == None) { - fprintf(stderr, "XCreateWindow() failed\n"); - return 2; - } else - have_window = TRUE; - - if (depth == 8) - XSetWindowColormap(display, window, colormap); - - if (!XStringListToTextProperty(&window_name, 1, pWindowName)) - pWindowName = NULL; - if (!XStringListToTextProperty(&icon_name, 1, pIconName)) - pIconName = NULL; - - /* OK if either hints allocation fails; XSetWMProperties() allows NULLs */ - - if ((size_hints = XAllocSizeHints()) != NULL) { - /* window will not be resizable */ - size_hints->flags = PMinSize | PMaxSize; - size_hints->min_width = size_hints->max_width = (int)image_width; - size_hints->min_height = size_hints->max_height = (int)image_height; - } - - if ((wm_hints = XAllocWMHints()) != NULL) { - wm_hints->initial_state = NormalState; - wm_hints->input = True; - /* wm_hints->icon_pixmap = icon_pixmap; */ - wm_hints->flags = StateHint | InputHint /* | IconPixmapHint */ ; - } - - XSetWMProperties(display, window, pWindowName, pIconName, NULL, 0, - size_hints, wm_hints, NULL); - - /* various properties and hints no longer needed; free memory */ - if (pWindowName) - XFree(pWindowName->value); - if (pIconName) - XFree(pIconName->value); - if (size_hints) - XFree(size_hints); - if (wm_hints) - XFree(wm_hints); - - XMapWindow(display, window); - - gc = XCreateGC(display, window, 0, &gcvalues); - have_gc = TRUE; - -/*--------------------------------------------------------------------------- - Fill window with the specified background color. - ---------------------------------------------------------------------------*/ - - if (depth == 24 || depth == 32) { - bg_pixel = ((ulg)bg_red << RShift) | - ((ulg)bg_green << GShift) | - ((ulg)bg_blue << BShift); - } else if (depth == 16) { - bg_pixel = ((((ulg)bg_red << 8) >> RShift) & RMask) | - ((((ulg)bg_green << 8) >> GShift) & GMask) | - ((((ulg)bg_blue << 8) >> BShift) & BMask); - } else /* depth == 8 */ { - - /* GRR: add 8-bit support */ - - } - - XSetForeground(display, gc, bg_pixel); - XFillRectangle(display, window, gc, 0, 0, image_width, image_height); - -/*--------------------------------------------------------------------------- - Wait for first Expose event to do any drawing, then flush. - ---------------------------------------------------------------------------*/ - - do - XNextEvent(display, &e); - while (e.type != Expose || e.xexpose.count); - - XFlush(display); - -/*--------------------------------------------------------------------------- - Allocate memory for the X- and display-specific version of the image. - ---------------------------------------------------------------------------*/ - - if (depth == 24 || depth == 32) { - xdata = (uch *)malloc(4*image_width*image_height); - pad = 32; - } else if (depth == 16) { - xdata = (uch *)malloc(2*image_width*image_height); - pad = 16; - } else /* depth == 8 */ { - xdata = (uch *)malloc(image_width*image_height); - pad = 8; - } - - if (!xdata) { - fprintf(stderr, PROGNAME ": unable to allocate image memory\n"); - return 4; - } - - ximage = XCreateImage(display, visual, depth, ZPixmap, 0, - (char *)xdata, image_width, image_height, pad, 0); - - if (!ximage) { - fprintf(stderr, PROGNAME ": XCreateImage() failed\n"); - free(xdata); - return 3; - } - - /* to avoid testing the byte order every pixel (or doubling the size of - * the drawing routine with a giant if-test), we arbitrarily set the byte - * order to MSBFirst and let Xlib worry about inverting things on little- - * endian machines (like Linux/x86, old VAXen, etc.)--this is not the most - * efficient approach (the giant if-test would be better), but in the - * interest of clarity, we take the easy way out... */ - - ximage->byte_order = MSBFirst; - - return 0; - -} /* end function rpng_x_create_window() */ - - - - - -static int rpng_x_display_image(void) -{ - uch *src; - char *dest; - uch r, g, b, a; - ulg i, row, lastrow = 0; - ulg pixel; - int ximage_rowbytes = ximage->bytes_per_line; -/* int bpp = ximage->bits_per_pixel; */ - - - Trace((stderr, "beginning display loop (image_channels == %d)\n", - image_channels)) - Trace((stderr, " (width = %ld, rowbytes = %ld, ximage_rowbytes = %d)\n", - image_width, image_rowbytes, ximage_rowbytes)) - Trace((stderr, " (bpp = %d)\n", ximage->bits_per_pixel)) - Trace((stderr, " (byte_order = %s)\n", ximage->byte_order == MSBFirst? - "MSBFirst" : (ximage->byte_order == LSBFirst? "LSBFirst" : "unknown"))) - - if (depth == 24 || depth == 32) { - ulg red, green, blue; - - for (lastrow = row = 0; row < image_height; ++row) { - src = image_data + row*image_rowbytes; - dest = ximage->data + row*ximage_rowbytes; - if (image_channels == 3) { - for (i = image_width; i > 0; --i) { - red = *src++; - green = *src++; - blue = *src++; -#ifdef NO_24BIT_MASKS - pixel = (red << RShift) | - (green << GShift) | - (blue << BShift); - /* recall that we set ximage->byte_order = MSBFirst above */ - /* GRR BUG: this assumes bpp == 32, but may be 24: */ - *dest++ = (char)((pixel >> 24) & 0xff); - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); -#else - red = (RShift < 0)? red << (-RShift) : red >> RShift; - green = (GShift < 0)? green << (-GShift) : green >> GShift; - blue = (BShift < 0)? blue << (-BShift) : blue >> BShift; - pixel = (red & RMask) | (green & GMask) | (blue & BMask); - /* recall that we set ximage->byte_order = MSBFirst above */ - *dest++ = (char)((pixel >> 24) & 0xff); - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); -#endif - } - } else /* if (image_channels == 4) */ { - for (i = image_width; i > 0; --i) { - r = *src++; - g = *src++; - b = *src++; - a = *src++; - if (a == 255) { - red = r; - green = g; - blue = b; - } else if (a == 0) { - red = bg_red; - green = bg_green; - blue = bg_blue; - } else { - /* this macro (from png.h) composites the foreground - * and background values and puts the result into the - * first argument */ - alpha_composite(red, r, a, bg_red); - alpha_composite(green, g, a, bg_green); - alpha_composite(blue, b, a, bg_blue); - } - pixel = (red << RShift) | - (green << GShift) | - (blue << BShift); - /* recall that we set ximage->byte_order = MSBFirst above */ - *dest++ = (char)((pixel >> 24) & 0xff); - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } - /* display after every 16 lines */ - if (((row+1) & 0xf) == 0) { - XPutImage(display, window, gc, ximage, 0, (int)lastrow, 0, - (int)lastrow, image_width, 16); - XFlush(display); - lastrow = row + 1; - } - } - - } else if (depth == 16) { - ush red, green, blue; - - for (lastrow = row = 0; row < image_height; ++row) { - src = image_data + row*image_rowbytes; - dest = ximage->data + row*ximage_rowbytes; - if (image_channels == 3) { - for (i = image_width; i > 0; --i) { - red = ((ush)(*src) << 8); - ++src; - green = ((ush)(*src) << 8); - ++src; - blue = ((ush)(*src) << 8); - ++src; - pixel = ((red >> RShift) & RMask) | - ((green >> GShift) & GMask) | - ((blue >> BShift) & BMask); - /* recall that we set ximage->byte_order = MSBFirst above */ - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } else /* if (image_channels == 4) */ { - for (i = image_width; i > 0; --i) { - r = *src++; - g = *src++; - b = *src++; - a = *src++; - if (a == 255) { - red = ((ush)r << 8); - green = ((ush)g << 8); - blue = ((ush)b << 8); - } else if (a == 0) { - red = ((ush)bg_red << 8); - green = ((ush)bg_green << 8); - blue = ((ush)bg_blue << 8); - } else { - /* this macro (from png.h) composites the foreground - * and background values and puts the result back into - * the first argument (== fg byte here: safe) */ - alpha_composite(r, r, a, bg_red); - alpha_composite(g, g, a, bg_green); - alpha_composite(b, b, a, bg_blue); - red = ((ush)r << 8); - green = ((ush)g << 8); - blue = ((ush)b << 8); - } - pixel = ((red >> RShift) & RMask) | - ((green >> GShift) & GMask) | - ((blue >> BShift) & BMask); - /* recall that we set ximage->byte_order = MSBFirst above */ - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } - /* display after every 16 lines */ - if (((row+1) & 0xf) == 0) { - XPutImage(display, window, gc, ximage, 0, (int)lastrow, 0, - (int)lastrow, image_width, 16); - XFlush(display); - lastrow = row + 1; - } - } - - } else /* depth == 8 */ { - - /* GRR: add 8-bit support */ - - } - - Trace((stderr, "calling final XPutImage()\n")) - if (lastrow < image_height) { - XPutImage(display, window, gc, ximage, 0, (int)lastrow, 0, - (int)lastrow, image_width, image_height-lastrow); - XFlush(display); - } - - return 0; -} - - - - -static void rpng_x_cleanup(void) -{ - if (image_data) { - free(image_data); - image_data = NULL; - } - - if (ximage) { - if (ximage->data) { - free(ximage->data); /* we allocated it, so we free it */ - ximage->data = (char *)NULL; /* instead of XDestroyImage() */ - } - XDestroyImage(ximage); - ximage = NULL; - } - - if (have_gc) - XFreeGC(display, gc); - - if (have_window) - XDestroyWindow(display, window); - - if (have_colormap) - XFreeColormap(display, colormap); - - if (have_nondefault_visual) - XFree(visual_list); -} - - - - - -static int rpng_x_msb(ulg u32val) -{ - int i; - - for (i = 31; i >= 0; --i) { - if (u32val & 0x80000000L) - break; - u32val <<= 1; - } - return i; -} diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/rpng2-win.c b/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/rpng2-win.c deleted file mode 100644 index 0c1a9d1..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/rpng2-win.c +++ /dev/null @@ -1,1166 +0,0 @@ -/*--------------------------------------------------------------------------- - - rpng2 - progressive-model PNG display program rpng2-win.c - - This program decodes and displays PNG files progressively, as if it were - a web browser (though the front end is only set up to read from files). - It supports gamma correction, user-specified background colors, and user- - specified background patterns (for transparent images). This version is - for 32-bit Windows; it may compile under 16-bit Windows with a little - tweaking (or maybe not). Thanks to Adam Costello and Pieter S. van der - Meulen for the "diamond" and "radial waves" patterns, respectively. - - to do: - - handle quoted command-line args (especially filenames with spaces) - - finish resizable checkerboard-gradient (sizes 4-128?) - - use %.1023s to simplify truncation of title-bar string? - - have minimum window width: oh well - - --------------------------------------------------------------------------- - - Changelog: - - 1.01: initial public release - - 1.02: fixed cut-and-paste error in usage screen (oops...) - - 1.03: modified to allow abbreviated options - - 1.04: removed bogus extra argument from usage fprintf() [Glenn R-P?]; - fixed command-line parsing bug - - 1.10: enabled "message window"/console (thanks to David Geldreich) - - 1.20: added runtime MMX-enabling/disabling and new -mmx* options - - 1.21: made minor tweak to usage screen to fit within 25-line console - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2001 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - ---------------------------------------------------------------------------*/ - -#define PROGNAME "rpng2-win" -#define LONGNAME "Progressive PNG Viewer for Windows" -#define VERSION "1.21 of 29 June 2001" - -#include -#include -#include -#include /* for jmpbuf declaration in readpng2.h */ -#include -#include /* only for PvdM background code */ -#include -#include /* only for _getch() */ - -/* all for PvdM background code: */ -#ifndef PI -# define PI 3.141592653589793238 -#endif -#define PI_2 (PI*0.5) -#define INV_PI_360 (360.0 / PI) -#define MAX(a,b) (a>b?a:b) -#define MIN(a,b) (a> 8)) >> 8); \ -} - - -#define INBUFSIZE 4096 /* with pseudo-timing on (1 sec delay/block), this - * block size corresponds roughly to a download - * speed 10% faster than theoretical 33.6K maximum - * (assuming 8 data bits, 1 stop bit and no other - * overhead) */ - -/* local prototypes */ -static void rpng2_win_init(void); -static int rpng2_win_create_window(void); -static int rpng2_win_load_bg_image(void); -static void rpng2_win_display_row(ulg row); -static void rpng2_win_finish_display(void); -static void rpng2_win_cleanup(void); -LRESULT CALLBACK rpng2_win_wndproc(HWND, UINT, WPARAM, LPARAM); - - -static char titlebar[1024], *window_name = titlebar; -static char *progname = PROGNAME; -static char *appname = LONGNAME; -static char *icon_name = PROGNAME; /* GRR: not (yet) used */ -static char *filename; -static FILE *infile; - -static mainprog_info rpng2_info; - -static uch inbuf[INBUFSIZE]; -static int incount; - -static int pat = 6; /* must be less than num_bgpat */ -static int bg_image = 0; -static int bgscale = 16; -static ulg bg_rowbytes; -static uch *bg_data; - -static struct rgb_color { - uch r, g, b; -} rgb[] = { - { 0, 0, 0}, /* 0: black */ - {255, 255, 255}, /* 1: white */ - {173, 132, 57}, /* 2: tan */ - { 64, 132, 0}, /* 3: medium green */ - {189, 117, 1}, /* 4: gold */ - {253, 249, 1}, /* 5: yellow */ - { 0, 0, 255}, /* 6: blue */ - { 0, 0, 120}, /* 7: medium blue */ - {255, 0, 255}, /* 8: magenta */ - { 64, 0, 64}, /* 9: dark magenta */ - {255, 0, 0}, /* 10: red */ - { 64, 0, 0}, /* 11: dark red */ - {255, 127, 0}, /* 12: orange */ - {192, 96, 0}, /* 13: darker orange */ - { 24, 60, 0}, /* 14: dark green-yellow */ - { 85, 125, 200} /* 15: ice blue */ -}; -/* not used for now, but should be for error-checking: -static int num_rgb = sizeof(rgb) / sizeof(struct rgb_color); - */ - -/* - This whole struct is a fairly cheesy way to keep the number of - command-line options to a minimum. The radial-waves background - type is a particularly poor fit to the integer elements of the - struct...but a few macros and a little fixed-point math will do - wonders for ya. - - type bits: - F E D C B A 9 8 7 6 5 4 3 2 1 0 - | | | | | - | | +-+-+-- 0 = sharp-edged checkerboard - | | 1 = soft diamonds - | | 2 = radial waves - | | 3-7 = undefined - | +-- gradient #2 inverted? - +-- alternating columns inverted? - */ -static struct background_pattern { - ush type; - int rgb1_max, rgb1_min; /* or bg_freq, bg_gray */ - int rgb2_max, rgb2_min; /* or bg_bsat, bg_brot (both scaled by 10)*/ -} bg[] = { - {0+8, 2,0, 1,15}, /* checkered: tan/black vs. white/ice blue */ - {0+24, 2,0, 1,0}, /* checkered: tan/black vs. white/black */ - {0+8, 4,5, 0,2}, /* checkered: gold/yellow vs. black/tan */ - {0+8, 4,5, 0,6}, /* checkered: gold/yellow vs. black/blue */ - {0, 7,0, 8,9}, /* checkered: deep blue/black vs. magenta */ - {0+8, 13,0, 5,14}, /* checkered: orange/black vs. yellow */ - {0+8, 12,0, 10,11}, /* checkered: orange/black vs. red */ - {1, 7,0, 8,0}, /* diamonds: deep blue/black vs. magenta */ - {1, 12,0, 11,0}, /* diamonds: orange vs. dark red */ - {1, 10,0, 7,0}, /* diamonds: red vs. medium blue */ - {1, 4,0, 5,0}, /* diamonds: gold vs. yellow */ - {1, 3,0, 0,0}, /* diamonds: medium green vs. black */ - {2, 16, 100, 20, 0}, /* radial: ~hard radial color-beams */ - {2, 18, 100, 10, 2}, /* radial: soft, curved radial color-beams */ - {2, 16, 256, 100, 250}, /* radial: very tight spiral */ - {2, 10000, 256, 11, 0} /* radial: dipole-moire' (almost fractal) */ -}; -static int num_bgpat = sizeof(bg) / sizeof(struct background_pattern); - - -/* Windows-specific global variables (could go in struct, but messy...) */ -static ulg wimage_rowbytes; -static uch *dib; -static uch *wimage_data; -static BITMAPINFOHEADER *bmih; - -static HWND global_hwnd; -static HINSTANCE global_hInst; -static int global_showmode; - - - - -int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR cmd, int showmode) -{ - char *args[1024]; /* arbitrary limit, but should suffice */ - char **argv = args; - char *p, *q, *bgstr = NULL; - int argc = 0; - int rc, alen, flen; - int error = 0; - int timing = FALSE; - int have_bg = FALSE; - double LUT_exponent; /* just the lookup table */ - double CRT_exponent = 2.2; /* just the monitor */ - double default_display_exponent; /* whole display system */ - MSG msg; - - - /* First initialize a few things, just to be sure--memset takes care of - * default background color (black), booleans (FALSE), pointers (NULL), - * etc. */ - - global_hInst = hInst; - global_showmode = showmode; - filename = (char *)NULL; - memset(&rpng2_info, 0, sizeof(mainprog_info)); - - - /* Next reenable console output, which normally goes to the bit bucket - * for windowed apps. Closing the console window will terminate the - * app. Thanks to David.Geldreich@realviz.com for supplying the magical - * incantation. */ - - AllocConsole(); - freopen("CONOUT$", "a", stderr); - freopen("CONOUT$", "a", stdout); - - - /* Set the default value for our display-system exponent, i.e., the - * product of the CRT exponent and the exponent corresponding to - * the frame-buffer's lookup table (LUT), if any. This is not an - * exhaustive list of LUT values (e.g., OpenStep has a lot of weird - * ones), but it should cover 99% of the current possibilities. And - * yes, these ifdefs are completely wasted in a Windows program... */ - -#if defined(NeXT) - /* third-party utilities can modify the default LUT exponent */ - LUT_exponent = 1.0 / 2.2; - /* - if (some_next_function_that_returns_gamma(&next_gamma)) - LUT_exponent = 1.0 / next_gamma; - */ -#elif defined(sgi) - LUT_exponent = 1.0 / 1.7; - /* there doesn't seem to be any documented function to - * get the "gamma" value, so we do it the hard way */ - infile = fopen("/etc/config/system.glGammaVal", "r"); - if (infile) { - double sgi_gamma; - - fgets(tmpline, 80, infile); - fclose(infile); - sgi_gamma = atof(tmpline); - if (sgi_gamma > 0.0) - LUT_exponent = 1.0 / sgi_gamma; - } -#elif defined(Macintosh) - LUT_exponent = 1.8 / 2.61; - /* - if (some_mac_function_that_returns_gamma(&mac_gamma)) - LUT_exponent = mac_gamma / 2.61; - */ -#else - LUT_exponent = 1.0; /* assume no LUT: most PCs */ -#endif - - /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */ - default_display_exponent = LUT_exponent * CRT_exponent; - - - /* If the user has set the SCREEN_GAMMA environment variable as suggested - * (somewhat imprecisely) in the libpng documentation, use that; otherwise - * use the default value we just calculated. Either way, the user may - * override this via a command-line option. */ - - if ((p = getenv("SCREEN_GAMMA")) != NULL) - rpng2_info.display_exponent = atof(p); - else - rpng2_info.display_exponent = default_display_exponent; - - - /* Windows really hates command lines, so we have to set up our own argv. - * Note that we do NOT bother with quoted arguments here, so don't use - * filenames with spaces in 'em! */ - - argv[argc++] = PROGNAME; - p = cmd; - for (;;) { - if (*p == ' ') - while (*++p == ' ') - ; - /* now p points at the first non-space after some spaces */ - if (*p == '\0') - break; /* nothing after the spaces: done */ - argv[argc++] = q = p; - while (*q && *q != ' ') - ++q; - /* now q points at a space or the end of the string */ - if (*q == '\0') - break; /* last argv already terminated; quit */ - *q = '\0'; /* change space to terminator */ - p = q + 1; - } - argv[argc] = NULL; /* terminate the argv array itself */ - - - /* Now parse the command line for options and the PNG filename. */ - - while (*++argv && !error) { - if (!strncmp(*argv, "-gamma", 2)) { - if (!*++argv) - ++error; - else { - rpng2_info.display_exponent = atof(*argv); - if (rpng2_info.display_exponent <= 0.0) - ++error; - } - } else if (!strncmp(*argv, "-bgcolor", 4)) { - if (!*++argv) - ++error; - else { - bgstr = *argv; - if (strlen(bgstr) != 7 || bgstr[0] != '#') - ++error; - else { - have_bg = TRUE; - bg_image = FALSE; - } - } - } else if (!strncmp(*argv, "-bgpat", 4)) { - if (!*++argv) - ++error; - else { - pat = atoi(*argv) - 1; - if (pat < 0 || pat >= num_bgpat) - ++error; - else { - bg_image = TRUE; - have_bg = FALSE; - } - } - } else if (!strncmp(*argv, "-timing", 2)) { - timing = TRUE; -#if (defined(__i386__) || defined(_M_IX86)) - } else if (!strncmp(*argv, "-nommxfilters", 7)) { - rpng2_info.nommxfilters = TRUE; - } else if (!strncmp(*argv, "-nommxcombine", 7)) { - rpng2_info.nommxcombine = TRUE; - } else if (!strncmp(*argv, "-nommxinterlace", 7)) { - rpng2_info.nommxinterlace = TRUE; - } else if (!strcmp(*argv, "-nommx")) { - rpng2_info.nommxfilters = TRUE; - rpng2_info.nommxcombine = TRUE; - rpng2_info.nommxinterlace = TRUE; -#endif - } else { - if (**argv != '-') { - filename = *argv; - if (argv[1]) /* shouldn't be any more args after filename */ - ++error; - } else - ++error; /* not expecting any other options */ - } - } - - if (!filename) { - ++error; - } else if (!(infile = fopen(filename, "rb"))) { - fprintf(stderr, PROGNAME ": can't open PNG file [%s]\n", filename); - ++error; - } else { - incount = fread(inbuf, 1, INBUFSIZE, infile); - if (incount < 8 || !readpng2_check_sig(inbuf, 8)) { - fprintf(stderr, PROGNAME - ": [%s] is not a PNG file: incorrect signature\n", - filename); - ++error; - } else if ((rc = readpng2_init(&rpng2_info)) != 0) { - switch (rc) { - case 2: - fprintf(stderr, PROGNAME - ": [%s] has bad IHDR (libpng longjmp)\n", - filename); - break; - case 4: - fprintf(stderr, PROGNAME ": insufficient memory\n"); - break; - default: - fprintf(stderr, PROGNAME - ": unknown readpng2_init() error\n"); - break; - } - ++error; - } - if (error) - fclose(infile); - } - - - /* usage screen */ - - if (error) { - int ch; - - fprintf(stderr, "\n%s %s: %s\n\n", PROGNAME, VERSION, appname); - readpng2_version_info(); - fprintf(stderr, "\n" - "Usage: %s [-gamma exp] [-bgcolor bg | -bgpat pat] [-timing]\n" -#if (defined(__i386__) || defined(_M_IX86)) - " %*s [[-nommxfilters] [-nommxcombine] [-nommxinterlace] | -nommx]\n" -#endif - " %*s file.png\n\n" - " exp \ttransfer-function exponent (``gamma'') of the display\n" - "\t\t system in floating-point format (e.g., ``%.1f''); equal\n" - "\t\t to the product of the lookup-table exponent (varies)\n" - "\t\t and the CRT exponent (usually 2.2); must be positive\n" - " bg \tdesired background color in 7-character hex RGB format\n" - "\t\t (e.g., ``#ff7700'' for orange: same as HTML colors);\n" - "\t\t used with transparent images; overrides -bgpat option\n" - " pat \tdesired background pattern number (1-%d); used with\n" - "\t\t transparent images; overrides -bgcolor option\n" - " -timing\tenables delay for every block read, to simulate modem\n" - "\t\t download of image (~36 Kbps)\n" -#if (defined(__i386__) || defined(_M_IX86)) - " -nommx*\tdisable optimized MMX routines for decoding row filters,\n" - "\t\t combining rows, and expanding interlacing, respectively\n" -#endif - "\nPress Q, Esc or mouse button 1 after image is displayed to quit.\n" - "Press Q or Esc to quit this usage screen. ", - PROGNAME, -#if (defined(__i386__) || defined(_M_IX86)) - strlen(PROGNAME), " ", -#endif - strlen(PROGNAME), " ", default_display_exponent, num_bgpat); - fflush(stderr); - do - ch = _getch(); - while (ch != 'q' && ch != 'Q' && ch != 0x1B); - exit(1); - } else { - fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, appname); - fprintf(stderr, - "\n [console window: closing this window will terminate %s]\n\n", - PROGNAME); - fflush(stderr); - } - - - /* set the title-bar string, but make sure buffer doesn't overflow */ - - alen = strlen(appname); - flen = strlen(filename); - if (alen + flen + 3 > 1023) - sprintf(titlebar, "%s: ...%s", appname, filename+(alen+flen+6-1023)); - else - sprintf(titlebar, "%s: %s", appname, filename); - - - /* set some final rpng2_info variables before entering main data loop */ - - if (have_bg) { - unsigned r, g, b; /* this approach quiets compiler warnings */ - - sscanf(bgstr+1, "%2x%2x%2x", &r, &g, &b); - rpng2_info.bg_red = (uch)r; - rpng2_info.bg_green = (uch)g; - rpng2_info.bg_blue = (uch)b; - } else - rpng2_info.need_bgcolor = TRUE; - - rpng2_info.done = FALSE; - rpng2_info.mainprog_init = rpng2_win_init; - rpng2_info.mainprog_display_row = rpng2_win_display_row; - rpng2_info.mainprog_finish_display = rpng2_win_finish_display; - - - /* OK, this is the fun part: call readpng2_decode_data() at the start of - * the loop to deal with our first buffer of data (read in above to verify - * that the file is a PNG image), then loop through the file and continue - * calling the same routine to handle each chunk of data. It in turn - * passes the data to libpng, which will invoke one or more of our call- - * backs as decoded data become available. We optionally call Sleep() for - * one second per iteration to simulate downloading the image via an analog - * modem. */ - - for (;;) { - Trace((stderr, "about to call readpng2_decode_data()\n")) - if (readpng2_decode_data(&rpng2_info, inbuf, incount)) - ++error; - Trace((stderr, "done with readpng2_decode_data()\n")) - if (error || feof(infile) || rpng2_info.done) - break; - if (timing) - Sleep(1000L); - incount = fread(inbuf, 1, INBUFSIZE, infile); - } - - - /* clean up PNG stuff and report any decoding errors */ - - fclose(infile); - Trace((stderr, "about to call readpng2_cleanup()\n")) - readpng2_cleanup(&rpng2_info); - - if (error) { - fprintf(stderr, PROGNAME ": libpng error while decoding PNG image\n"); - exit(3); - } - - - /* wait for the user to tell us when to quit */ - - while (GetMessage(&msg, NULL, 0, 0)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - - - /* we're done: clean up all image and Windows resources and go away */ - - Trace((stderr, "about to call rpng2_win_cleanup()\n")) - rpng2_win_cleanup(); - - return msg.wParam; -} - - - - - -/* this function is called by readpng2_info_callback() in readpng2.c, which - * in turn is called by libpng after all of the pre-IDAT chunks have been - * read and processed--i.e., we now have enough info to finish initializing */ - -static void rpng2_win_init() -{ - ulg i; - ulg rowbytes = rpng2_info.rowbytes; - - Trace((stderr, "beginning rpng2_win_init()\n")) - Trace((stderr, " rowbytes = %ld\n", rpng2_info.rowbytes)) - Trace((stderr, " width = %ld\n", rpng2_info.width)) - Trace((stderr, " height = %ld\n", rpng2_info.height)) - - rpng2_info.image_data = (uch *)malloc(rowbytes * rpng2_info.height); - if (!rpng2_info.image_data) { - readpng2_cleanup(&rpng2_info); - return; - } - - rpng2_info.row_pointers = (uch **)malloc(rpng2_info.height * sizeof(uch *)); - if (!rpng2_info.row_pointers) { - free(rpng2_info.image_data); - rpng2_info.image_data = NULL; - readpng2_cleanup(&rpng2_info); - return; - } - - for (i = 0; i < rpng2_info.height; ++i) - rpng2_info.row_pointers[i] = rpng2_info.image_data + i*rowbytes; - -/*--------------------------------------------------------------------------- - Do the basic Windows initialization stuff, make the window, and fill it - with the user-specified, file-specified or default background color. - ---------------------------------------------------------------------------*/ - - if (rpng2_win_create_window()) { - readpng2_cleanup(&rpng2_info); - return; - } -} - - - - - -static int rpng2_win_create_window() -{ - uch bg_red = rpng2_info.bg_red; - uch bg_green = rpng2_info.bg_green; - uch bg_blue = rpng2_info.bg_blue; - uch *dest; - int extra_width, extra_height; - ulg i, j; - WNDCLASSEX wndclass; - RECT rect; - - -/*--------------------------------------------------------------------------- - Allocate memory for the display-specific version of the image (round up - to multiple of 4 for Windows DIB). - ---------------------------------------------------------------------------*/ - - wimage_rowbytes = ((3*rpng2_info.width + 3L) >> 2) << 2; - - if (!(dib = (uch *)malloc(sizeof(BITMAPINFOHEADER) + - wimage_rowbytes*rpng2_info.height))) - { - return 4; /* fail */ - } - -/*--------------------------------------------------------------------------- - Initialize the DIB. Negative height means to use top-down BMP ordering - (must be uncompressed, but that's what we want). Bit count of 1, 4 or 8 - implies a colormap of RGBX quads, but 24-bit BMPs just use B,G,R values - directly => wimage_data begins immediately after BMP header. - ---------------------------------------------------------------------------*/ - - memset(dib, 0, sizeof(BITMAPINFOHEADER)); - bmih = (BITMAPINFOHEADER *)dib; - bmih->biSize = sizeof(BITMAPINFOHEADER); - bmih->biWidth = rpng2_info.width; - bmih->biHeight = -((long)rpng2_info.height); - bmih->biPlanes = 1; - bmih->biBitCount = 24; - bmih->biCompression = 0; - wimage_data = dib + sizeof(BITMAPINFOHEADER); - -/*--------------------------------------------------------------------------- - Fill window with the specified background color (default is black), but - defer loading faked "background image" until window is displayed (may be - slow to compute). Data are in BGR order. - ---------------------------------------------------------------------------*/ - - if (bg_image) { /* just fill with black for now */ - memset(wimage_data, 0, wimage_rowbytes*rpng2_info.height); - } else { - for (j = 0; j < rpng2_info.height; ++j) { - dest = wimage_data + j*wimage_rowbytes; - for (i = rpng2_info.width; i > 0; --i) { - *dest++ = bg_blue; - *dest++ = bg_green; - *dest++ = bg_red; - } - } - } - -/*--------------------------------------------------------------------------- - Set the window parameters. - ---------------------------------------------------------------------------*/ - - memset(&wndclass, 0, sizeof(wndclass)); - - wndclass.cbSize = sizeof(wndclass); - wndclass.style = CS_HREDRAW | CS_VREDRAW; - wndclass.lpfnWndProc = rpng2_win_wndproc; - wndclass.hInstance = global_hInst; - wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION); - wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); - wndclass.hbrBackground = (HBRUSH)GetStockObject(DKGRAY_BRUSH); - wndclass.lpszMenuName = NULL; - wndclass.lpszClassName = progname; - wndclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION); - - RegisterClassEx(&wndclass); - -/*--------------------------------------------------------------------------- - Finally, create the window. - ---------------------------------------------------------------------------*/ - - extra_width = 2*(GetSystemMetrics(SM_CXBORDER) + - GetSystemMetrics(SM_CXDLGFRAME)); - extra_height = 2*(GetSystemMetrics(SM_CYBORDER) + - GetSystemMetrics(SM_CYDLGFRAME)) + - GetSystemMetrics(SM_CYCAPTION); - - global_hwnd = CreateWindow(progname, titlebar, WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, rpng2_info.width+extra_width, - rpng2_info.height+extra_height, NULL, NULL, global_hInst, NULL); - - ShowWindow(global_hwnd, global_showmode); - UpdateWindow(global_hwnd); - -/*--------------------------------------------------------------------------- - Now compute the background image and display it. If it fails (memory - allocation), revert to a plain background color. - ---------------------------------------------------------------------------*/ - - if (bg_image) { - static const char *msg = "Computing background image..."; - int x, y, len = strlen(msg); - HDC hdc = GetDC(global_hwnd); - TEXTMETRIC tm; - - GetTextMetrics(hdc, &tm); - x = (rpng2_info.width - len*tm.tmAveCharWidth)/2; - y = (rpng2_info.height - tm.tmHeight)/2; - SetBkMode(hdc, TRANSPARENT); - SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT)); - /* this can still begin out of bounds even if x is positive (???): */ - TextOut(hdc, ((x < 0)? 0 : x), ((y < 0)? 0 : y), msg, len); - ReleaseDC(global_hwnd, hdc); - - rpng2_win_load_bg_image(); /* resets bg_image if fails */ - } - - if (!bg_image) { - for (j = 0; j < rpng2_info.height; ++j) { - dest = wimage_data + j*wimage_rowbytes; - for (i = rpng2_info.width; i > 0; --i) { - *dest++ = bg_blue; - *dest++ = bg_green; - *dest++ = bg_red; - } - } - } - - rect.left = 0L; - rect.top = 0L; - rect.right = (LONG)rpng2_info.width; /* possibly off by one? */ - rect.bottom = (LONG)rpng2_info.height; /* possibly off by one? */ - InvalidateRect(global_hwnd, &rect, FALSE); - UpdateWindow(global_hwnd); /* similar to XFlush() */ - - return 0; - -} /* end function rpng2_win_create_window() */ - - - - - -static int rpng2_win_load_bg_image() -{ - uch *src, *dest; - uch r1, r2, g1, g2, b1, b2; - uch r1_inv, r2_inv, g1_inv, g2_inv, b1_inv, b2_inv; - int k, hmax, max; - int xidx, yidx, yidx_max = (bgscale-1); - int even_odd_vert, even_odd_horiz, even_odd; - int invert_gradient2 = (bg[pat].type & 0x08); - int invert_column; - ulg i, row; - -/*--------------------------------------------------------------------------- - Allocate buffer for fake background image to be used with transparent - images; if this fails, revert to plain background color. - ---------------------------------------------------------------------------*/ - - bg_rowbytes = 3 * rpng2_info.width; - bg_data = (uch *)malloc(bg_rowbytes * rpng2_info.height); - if (!bg_data) { - fprintf(stderr, PROGNAME - ": unable to allocate memory for background image\n"); - bg_image = 0; - return 1; - } - -/*--------------------------------------------------------------------------- - Vertical gradients (ramps) in NxN squares, alternating direction and - colors (N == bgscale). - ---------------------------------------------------------------------------*/ - - if ((bg[pat].type & 0x07) == 0) { - uch r1_min = rgb[bg[pat].rgb1_min].r; - uch g1_min = rgb[bg[pat].rgb1_min].g; - uch b1_min = rgb[bg[pat].rgb1_min].b; - uch r2_min = rgb[bg[pat].rgb2_min].r; - uch g2_min = rgb[bg[pat].rgb2_min].g; - uch b2_min = rgb[bg[pat].rgb2_min].b; - int r1_diff = rgb[bg[pat].rgb1_max].r - r1_min; - int g1_diff = rgb[bg[pat].rgb1_max].g - g1_min; - int b1_diff = rgb[bg[pat].rgb1_max].b - b1_min; - int r2_diff = rgb[bg[pat].rgb2_max].r - r2_min; - int g2_diff = rgb[bg[pat].rgb2_max].g - g2_min; - int b2_diff = rgb[bg[pat].rgb2_max].b - b2_min; - - for (row = 0; row < rpng2_info.height; ++row) { - yidx = row % bgscale; - even_odd_vert = (row / bgscale) & 1; - - r1 = r1_min + (r1_diff * yidx) / yidx_max; - g1 = g1_min + (g1_diff * yidx) / yidx_max; - b1 = b1_min + (b1_diff * yidx) / yidx_max; - r1_inv = r1_min + (r1_diff * (yidx_max-yidx)) / yidx_max; - g1_inv = g1_min + (g1_diff * (yidx_max-yidx)) / yidx_max; - b1_inv = b1_min + (b1_diff * (yidx_max-yidx)) / yidx_max; - - r2 = r2_min + (r2_diff * yidx) / yidx_max; - g2 = g2_min + (g2_diff * yidx) / yidx_max; - b2 = b2_min + (b2_diff * yidx) / yidx_max; - r2_inv = r2_min + (r2_diff * (yidx_max-yidx)) / yidx_max; - g2_inv = g2_min + (g2_diff * (yidx_max-yidx)) / yidx_max; - b2_inv = b2_min + (b2_diff * (yidx_max-yidx)) / yidx_max; - - dest = bg_data + row*bg_rowbytes; - for (i = 0; i < rpng2_info.width; ++i) { - even_odd_horiz = (i / bgscale) & 1; - even_odd = even_odd_vert ^ even_odd_horiz; - invert_column = - (even_odd_horiz && (bg[pat].type & 0x10)); - if (even_odd == 0) { /* gradient #1 */ - if (invert_column) { - *dest++ = r1_inv; - *dest++ = g1_inv; - *dest++ = b1_inv; - } else { - *dest++ = r1; - *dest++ = g1; - *dest++ = b1; - } - } else { /* gradient #2 */ - if ((invert_column && invert_gradient2) || - (!invert_column && !invert_gradient2)) - { - *dest++ = r2; /* not inverted or */ - *dest++ = g2; /* doubly inverted */ - *dest++ = b2; - } else { - *dest++ = r2_inv; - *dest++ = g2_inv; /* singly inverted */ - *dest++ = b2_inv; - } - } - } - } - -/*--------------------------------------------------------------------------- - Soft gradient-diamonds with scale = bgscale. Code contributed by Adam - M. Costello. - ---------------------------------------------------------------------------*/ - - } else if ((bg[pat].type & 0x07) == 1) { - - hmax = (bgscale-1)/2; /* half the max weight of a color */ - max = 2*hmax; /* the max weight of a color */ - - r1 = rgb[bg[pat].rgb1_max].r; - g1 = rgb[bg[pat].rgb1_max].g; - b1 = rgb[bg[pat].rgb1_max].b; - r2 = rgb[bg[pat].rgb2_max].r; - g2 = rgb[bg[pat].rgb2_max].g; - b2 = rgb[bg[pat].rgb2_max].b; - - for (row = 0; row < rpng2_info.height; ++row) { - yidx = row % bgscale; - if (yidx > hmax) - yidx = bgscale-1 - yidx; - dest = bg_data + row*bg_rowbytes; - for (i = 0; i < rpng2_info.width; ++i) { - xidx = i % bgscale; - if (xidx > hmax) - xidx = bgscale-1 - xidx; - k = xidx + yidx; - *dest++ = (k*r1 + (max-k)*r2) / max; - *dest++ = (k*g1 + (max-k)*g2) / max; - *dest++ = (k*b1 + (max-k)*b2) / max; - } - } - -/*--------------------------------------------------------------------------- - Radial "starburst" with azimuthal sinusoids; [eventually number of sinu- - soids will equal bgscale?]. This one is slow but very cool. Code con- - tributed by Pieter S. van der Meulen (originally in Smalltalk). - ---------------------------------------------------------------------------*/ - - } else if ((bg[pat].type & 0x07) == 2) { - uch ch; - int ii, x, y, hw, hh, grayspot; - double freq, rotate, saturate, gray, intensity; - double angle=0.0, aoffset=0.0, maxDist, dist; - double red=0.0, green=0.0, blue=0.0, hue, s, v, f, p, q, t; - - fprintf(stderr, "%s: computing radial background...", - PROGNAME); - fflush(stderr); - - hh = rpng2_info.height / 2; - hw = rpng2_info.width / 2; - - /* variables for radial waves: - * aoffset: number of degrees to rotate hue [CURRENTLY NOT USED] - * freq: number of color beams originating from the center - * grayspot: size of the graying center area (anti-alias) - * rotate: rotation of the beams as a function of radius - * saturate: saturation of beams' shape azimuthally - */ - angle = CLIP(angle, 0.0, 360.0); - grayspot = CLIP(bg[pat].bg_gray, 1, (hh + hw)); - freq = MAX((double)bg[pat].bg_freq, 0.0); - saturate = (double)bg[pat].bg_bsat * 0.1; - rotate = (double)bg[pat].bg_brot * 0.1; - gray = 0.0; - intensity = 0.0; - maxDist = (double)((hw*hw) + (hh*hh)); - - for (row = 0; row < rpng2_info.height; ++row) { - y = row - hh; - dest = bg_data + row*bg_rowbytes; - for (i = 0; i < rpng2_info.width; ++i) { - x = i - hw; - angle = (x == 0)? PI_2 : atan((double)y / (double)x); - gray = (double)MAX(ABS(y), ABS(x)) / grayspot; - gray = MIN(1.0, gray); - dist = (double)((x*x) + (y*y)) / maxDist; - intensity = cos((angle+(rotate*dist*PI)) * freq) * - gray * saturate; - intensity = (MAX(MIN(intensity,1.0),-1.0) + 1.0) * 0.5; - hue = (angle + PI) * INV_PI_360 + aoffset; - s = gray * ((double)(ABS(x)+ABS(y)) / (double)(hw + hh)); - s = MIN(MAX(s,0.0), 1.0); - v = MIN(MAX(intensity,0.0), 1.0); - - if (s == 0.0) { - ch = (uch)(v * 255.0); - *dest++ = ch; - *dest++ = ch; - *dest++ = ch; - } else { - if ((hue < 0.0) || (hue >= 360.0)) - hue -= (((int)(hue / 360.0)) * 360.0); - hue /= 60.0; - ii = (int)hue; - f = hue - (double)ii; - p = (1.0 - s) * v; - q = (1.0 - (s * f)) * v; - t = (1.0 - (s * (1.0 - f))) * v; - if (ii == 0) { red = v; green = t; blue = p; } - else if (ii == 1) { red = q; green = v; blue = p; } - else if (ii == 2) { red = p; green = v; blue = t; } - else if (ii == 3) { red = p; green = q; blue = v; } - else if (ii == 4) { red = t; green = p; blue = v; } - else if (ii == 5) { red = v; green = p; blue = q; } - *dest++ = (uch)(red * 255.0); - *dest++ = (uch)(green * 255.0); - *dest++ = (uch)(blue * 255.0); - } - } - } - fprintf(stderr, "done.\n"); - fflush(stderr); - } - -/*--------------------------------------------------------------------------- - Blast background image to display buffer before beginning PNG decode; - calling function will handle invalidation and UpdateWindow() call. - ---------------------------------------------------------------------------*/ - - for (row = 0; row < rpng2_info.height; ++row) { - src = bg_data + row*bg_rowbytes; - dest = wimage_data + row*wimage_rowbytes; - for (i = rpng2_info.width; i > 0; --i) { - r1 = *src++; - g1 = *src++; - b1 = *src++; - *dest++ = b1; - *dest++ = g1; /* note reverse order */ - *dest++ = r1; - } - } - - return 0; - -} /* end function rpng2_win_load_bg_image() */ - - - - - -static void rpng2_win_display_row(ulg row) -{ - uch bg_red = rpng2_info.bg_red; - uch bg_green = rpng2_info.bg_green; - uch bg_blue = rpng2_info.bg_blue; - uch *src, *src2=NULL, *dest; - uch r, g, b, a; - ulg i; - static int rows=0; - static ulg firstrow; - -/*--------------------------------------------------------------------------- - rows and firstrow simply track how many rows (and which ones) have not - yet been displayed; alternatively, we could call InvalidateRect() for - every row and not bother with the records-keeping. - ---------------------------------------------------------------------------*/ - - Trace((stderr, "beginning rpng2_win_display_row()\n")) - - if (rows == 0) - firstrow = row; /* first row not yet displayed */ - - ++rows; /* count of rows received but not yet displayed */ - -/*--------------------------------------------------------------------------- - Aside from the use of the rpng2_info struct and the lack of an outer - loop (over rows), this routine is identical to rpng_win_display_image() - in the non-progressive version of the program. - ---------------------------------------------------------------------------*/ - - src = rpng2_info.image_data + row*rpng2_info.rowbytes; - if (bg_image) - src2 = bg_data + row*bg_rowbytes; - dest = wimage_data + row*wimage_rowbytes; - - if (rpng2_info.channels == 3) { - for (i = rpng2_info.width; i > 0; --i) { - r = *src++; - g = *src++; - b = *src++; - *dest++ = b; - *dest++ = g; /* note reverse order */ - *dest++ = r; - } - } else /* if (rpng2_info.channels == 4) */ { - for (i = rpng2_info.width; i > 0; --i) { - r = *src++; - g = *src++; - b = *src++; - a = *src++; - if (bg_image) { - bg_red = *src2++; - bg_green = *src2++; - bg_blue = *src2++; - } - if (a == 255) { - *dest++ = b; - *dest++ = g; - *dest++ = r; - } else if (a == 0) { - *dest++ = bg_blue; - *dest++ = bg_green; - *dest++ = bg_red; - } else { - /* this macro (copied from png.h) composites the - * foreground and background values and puts the - * result into the first argument; there are no - * side effects with the first argument */ - alpha_composite(*dest++, b, a, bg_blue); - alpha_composite(*dest++, g, a, bg_green); - alpha_composite(*dest++, r, a, bg_red); - } - } - } - -/*--------------------------------------------------------------------------- - Display after every 16 rows or when on last row. (Region may include - previously displayed lines due to interlacing--i.e., not contiguous.) - ---------------------------------------------------------------------------*/ - - if ((rows & 0xf) == 0 || row == rpng2_info.height-1) { - RECT rect; - - rect.left = 0L; - rect.top = (LONG)firstrow; - rect.right = (LONG)rpng2_info.width; /* possibly off by one? */ - rect.bottom = (LONG)row + 1L; /* possibly off by one? */ - InvalidateRect(global_hwnd, &rect, FALSE); - UpdateWindow(global_hwnd); /* similar to XFlush() */ - rows = 0; - } - -} /* end function rpng2_win_display_row() */ - - - - - -static void rpng2_win_finish_display() -{ - Trace((stderr, "beginning rpng2_win_finish_display()\n")) - - /* last row has already been displayed by rpng2_win_display_row(), so - * we have nothing to do here except set a flag and let the user know - * that the image is done */ - - rpng2_info.done = TRUE; - printf( - "Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n"); - fflush(stdout); -} - - - - - -static void rpng2_win_cleanup() -{ - if (bg_image && bg_data) { - free(bg_data); - bg_data = NULL; - } - - if (rpng2_info.image_data) { - free(rpng2_info.image_data); - rpng2_info.image_data = NULL; - } - - if (rpng2_info.row_pointers) { - free(rpng2_info.row_pointers); - rpng2_info.row_pointers = NULL; - } - - if (dib) { - free(dib); - dib = NULL; - } -} - - - - - -LRESULT CALLBACK rpng2_win_wndproc(HWND hwnd, UINT iMsg, WPARAM wP, LPARAM lP) -{ - HDC hdc; - PAINTSTRUCT ps; - int rc; - - switch (iMsg) { - case WM_CREATE: - /* one-time processing here, if any */ - return 0; - - case WM_PAINT: - hdc = BeginPaint(hwnd, &ps); - rc = StretchDIBits(hdc, 0, 0, rpng2_info.width, rpng2_info.height, - 0, 0, rpng2_info.width, rpng2_info.height, - wimage_data, (BITMAPINFO *)bmih, - 0, SRCCOPY); - EndPaint(hwnd, &ps); - return 0; - - /* wait for the user to tell us when to quit */ - case WM_CHAR: - switch (wP) { /* only need one, so ignore repeat count */ - case 'q': - case 'Q': - case 0x1B: /* Esc key */ - PostQuitMessage(0); - } - return 0; - - case WM_LBUTTONDOWN: /* another way of quitting */ - case WM_DESTROY: - PostQuitMessage(0); - return 0; - } - - return DefWindowProc(hwnd, iMsg, wP, lP); -} diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/rpng2-x.c b/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/rpng2-x.c deleted file mode 100644 index 5fc29ea..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/rpng2-x.c +++ /dev/null @@ -1,1408 +0,0 @@ -/*--------------------------------------------------------------------------- - - rpng2 - progressive-model PNG display program rpng2-x.c - - This program decodes and displays PNG files progressively, as if it were - a web browser (though the front end is only set up to read from files). - It supports gamma correction, user-specified background colors, and user- - specified background patterns (for transparent images). This version is - for the X Window System (tested by the author under Unix and by Martin - Zinser under OpenVMS; may work under OS/2 with a little tweaking). - - Thanks to Adam Costello and Pieter S. van der Meulen for the "diamond" - and "radial waves" patterns, respectively. - - to do: - - 8-bit support - - finish resizable checkerboard-gradient (sizes 4-128?) - - use %.1023s to simplify truncation of title-bar string? - - --------------------------------------------------------------------------- - - Changelog: - - 1.01: initial public release - - 1.02: modified to allow abbreviated options; fixed char/uchar mismatch - - 1.10: added support for non-default visuals; fixed X pixel-conversion - - 1.11: added -usleep option for demos; fixed command-line parsing bug - - 1.12: added -pause option for demos and testing - - 1.20: added runtime MMX-enabling/disabling and new -mmx* options - - 1.21: fixed small X memory leak (thanks to Francois Petitjean) - - 1.22: fixed XFreeGC() crash bug - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2001 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - ---------------------------------------------------------------------------*/ - -#define PROGNAME "rpng2-x" -#define LONGNAME "Progressive PNG Viewer for X" -#define VERSION "1.22 of 16 August 2001" - -#include -#include -#include -#include /* for jmpbuf declaration in readpng2.h */ -#include -#include /* only for PvdM background code */ -#include -#include -#include -#include /* defines XK_* macros */ - -#ifdef VMS -# include -#endif - -/* all for PvdM background code: */ -#ifndef PI -# define PI 3.141592653589793238 -#endif -#define PI_2 (PI*0.5) -#define INV_PI_360 (360.0 / PI) -#define MAX(a,b) (a>b?a:b) -#define MIN(a,b) (a> 8)) >> 8); \ -} - - -#define INBUFSIZE 4096 /* with pseudo-timing on (1 sec delay/block), this - * block size corresponds roughly to a download - * speed 10% faster than theoretical 33.6K maximum - * (assuming 8 data bits, 1 stop bit and no other - * overhead) */ - -/* local prototypes */ -static void rpng2_x_init(void); -static int rpng2_x_create_window(void); -static int rpng2_x_load_bg_image(void); -static void rpng2_x_display_row(ulg row); -static void rpng2_x_finish_display(void); -static void rpng2_x_cleanup(void); -static int rpng2_x_msb(ulg u32val); - - -static char titlebar[1024], *window_name = titlebar; -static char *appname = LONGNAME; -static char *icon_name = PROGNAME; -static char *filename; -static FILE *infile; - -static mainprog_info rpng2_info; - -static uch inbuf[INBUFSIZE]; -static int incount; - -static int pat = 6; /* must be less than num_bgpat */ -static int bg_image = 0; -static int bgscale = 16; -static ulg bg_rowbytes; -static uch *bg_data; - -int pause_after_pass = FALSE; -int demo_timing = FALSE; -ulg usleep_duration = 0L; - -static struct rgb_color { - uch r, g, b; -} rgb[] = { - { 0, 0, 0}, /* 0: black */ - {255, 255, 255}, /* 1: white */ - {173, 132, 57}, /* 2: tan */ - { 64, 132, 0}, /* 3: medium green */ - {189, 117, 1}, /* 4: gold */ - {253, 249, 1}, /* 5: yellow */ - { 0, 0, 255}, /* 6: blue */ - { 0, 0, 120}, /* 7: medium blue */ - {255, 0, 255}, /* 8: magenta */ - { 64, 0, 64}, /* 9: dark magenta */ - {255, 0, 0}, /* 10: red */ - { 64, 0, 0}, /* 11: dark red */ - {255, 127, 0}, /* 12: orange */ - {192, 96, 0}, /* 13: darker orange */ - { 24, 60, 0}, /* 14: dark green-yellow */ - { 85, 125, 200} /* 15: ice blue */ -}; -/* not used for now, but should be for error-checking: -static int num_rgb = sizeof(rgb) / sizeof(struct rgb_color); - */ - -/* - This whole struct is a fairly cheesy way to keep the number of - command-line options to a minimum. The radial-waves background - type is a particularly poor fit to the integer elements of the - struct...but a few macros and a little fixed-point math will do - wonders for ya. - - type bits: - F E D C B A 9 8 7 6 5 4 3 2 1 0 - | | | | | - | | +-+-+-- 0 = sharp-edged checkerboard - | | 1 = soft diamonds - | | 2 = radial waves - | | 3-7 = undefined - | +-- gradient #2 inverted? - +-- alternating columns inverted? - */ -static struct background_pattern { - ush type; - int rgb1_max, rgb1_min; /* or bg_freq, bg_gray */ - int rgb2_max, rgb2_min; /* or bg_bsat, bg_brot (both scaled by 10)*/ -} bg[] = { - {0+8, 2,0, 1,15}, /* checkered: tan/black vs. white/ice blue */ - {0+24, 2,0, 1,0}, /* checkered: tan/black vs. white/black */ - {0+8, 4,5, 0,2}, /* checkered: gold/yellow vs. black/tan */ - {0+8, 4,5, 0,6}, /* checkered: gold/yellow vs. black/blue */ - {0, 7,0, 8,9}, /* checkered: deep blue/black vs. magenta */ - {0+8, 13,0, 5,14}, /* checkered: orange/black vs. yellow */ - {0+8, 12,0, 10,11}, /* checkered: orange/black vs. red */ - {1, 7,0, 8,0}, /* diamonds: deep blue/black vs. magenta */ - {1, 12,0, 11,0}, /* diamonds: orange vs. dark red */ - {1, 10,0, 7,0}, /* diamonds: red vs. medium blue */ - {1, 4,0, 5,0}, /* diamonds: gold vs. yellow */ - {1, 3,0, 0,0}, /* diamonds: medium green vs. black */ - {2, 16, 100, 20, 0}, /* radial: ~hard radial color-beams */ - {2, 18, 100, 10, 2}, /* radial: soft, curved radial color-beams */ - {2, 16, 256, 100, 250}, /* radial: very tight spiral */ - {2, 10000, 256, 11, 0} /* radial: dipole-moire' (almost fractal) */ -}; -static int num_bgpat = sizeof(bg) / sizeof(struct background_pattern); - - -/* X-specific variables */ -static char *displayname; -static XImage *ximage; -static Display *display; -static int depth; -static Visual *visual; -static XVisualInfo *visual_list; -static int RShift, GShift, BShift; -static ulg RMask, GMask, BMask; -static Window window; -static GC gc; -static Colormap colormap; - -static int have_nondefault_visual = FALSE; -static int have_colormap = FALSE; -static int have_window = FALSE; -static int have_gc = FALSE; - - - - -int main(int argc, char **argv) -{ -#ifdef sgi - char tmpline[80]; -#endif - char *p, *bgstr = NULL; - int rc, alen, flen; - int error = 0; - int timing = FALSE; - int have_bg = FALSE; - double LUT_exponent; /* just the lookup table */ - double CRT_exponent = 2.2; /* just the monitor */ - double default_display_exponent; /* whole display system */ - XEvent e; - KeySym k; - - - /* First initialize a few things, just to be sure--memset takes care of - * default background color (black), booleans (FALSE), pointers (NULL), - * etc. */ - - displayname = (char *)NULL; - filename = (char *)NULL; - memset(&rpng2_info, 0, sizeof(mainprog_info)); - - - /* Set the default value for our display-system exponent, i.e., the - * product of the CRT exponent and the exponent corresponding to - * the frame-buffer's lookup table (LUT), if any. This is not an - * exhaustive list of LUT values (e.g., OpenStep has a lot of weird - * ones), but it should cover 99% of the current possibilities. */ - -#if defined(NeXT) - /* third-party utilities can modify the default LUT exponent */ - LUT_exponent = 1.0 / 2.2; - /* - if (some_next_function_that_returns_gamma(&next_gamma)) - LUT_exponent = 1.0 / next_gamma; - */ -#elif defined(sgi) - LUT_exponent = 1.0 / 1.7; - /* there doesn't seem to be any documented function to - * get the "gamma" value, so we do it the hard way */ - infile = fopen("/etc/config/system.glGammaVal", "r"); - if (infile) { - double sgi_gamma; - - fgets(tmpline, 80, infile); - fclose(infile); - sgi_gamma = atof(tmpline); - if (sgi_gamma > 0.0) - LUT_exponent = 1.0 / sgi_gamma; - } -#elif defined(Macintosh) - LUT_exponent = 1.8 / 2.61; - /* - if (some_mac_function_that_returns_gamma(&mac_gamma)) - LUT_exponent = mac_gamma / 2.61; - */ -#else - LUT_exponent = 1.0; /* assume no LUT: most PCs */ -#endif - - /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */ - default_display_exponent = LUT_exponent * CRT_exponent; - - - /* If the user has set the SCREEN_GAMMA environment variable as suggested - * (somewhat imprecisely) in the libpng documentation, use that; otherwise - * use the default value we just calculated. Either way, the user may - * override this via a command-line option. */ - - if ((p = getenv("SCREEN_GAMMA")) != NULL) - rpng2_info.display_exponent = atof(p); - else - rpng2_info.display_exponent = default_display_exponent; - - - /* Now parse the command line for options and the PNG filename. */ - - while (*++argv && !error) { - if (!strncmp(*argv, "-display", 2)) { - if (!*++argv) - ++error; - else - displayname = *argv; - } else if (!strncmp(*argv, "-gamma", 2)) { - if (!*++argv) - ++error; - else { - rpng2_info.display_exponent = atof(*argv); - if (rpng2_info.display_exponent <= 0.0) - ++error; - } - } else if (!strncmp(*argv, "-bgcolor", 4)) { - if (!*++argv) - ++error; - else { - bgstr = *argv; - if (strlen(bgstr) != 7 || bgstr[0] != '#') - ++error; - else { - have_bg = TRUE; - bg_image = FALSE; - } - } - } else if (!strncmp(*argv, "-bgpat", 4)) { - if (!*++argv) - ++error; - else { - pat = atoi(*argv) - 1; - if (pat < 0 || pat >= num_bgpat) - ++error; - else { - bg_image = TRUE; - have_bg = FALSE; - } - } - } else if (!strncmp(*argv, "-usleep", 2)) { - if (!*++argv) - ++error; - else { - usleep_duration = (ulg)atol(*argv); - demo_timing = TRUE; - } - } else if (!strncmp(*argv, "-pause", 2)) { - pause_after_pass = TRUE; - } else if (!strncmp(*argv, "-timing", 2)) { - timing = TRUE; -#if (defined(__i386__) || defined(_M_IX86)) - } else if (!strncmp(*argv, "-nommxfilters", 7)) { - rpng2_info.nommxfilters = TRUE; - } else if (!strncmp(*argv, "-nommxcombine", 7)) { - rpng2_info.nommxcombine = TRUE; - } else if (!strncmp(*argv, "-nommxinterlace", 7)) { - rpng2_info.nommxinterlace = TRUE; - } else if (!strcmp(*argv, "-nommx")) { - rpng2_info.nommxfilters = TRUE; - rpng2_info.nommxcombine = TRUE; - rpng2_info.nommxinterlace = TRUE; -#endif - } else { - if (**argv != '-') { - filename = *argv; - if (argv[1]) /* shouldn't be any more args after filename */ - ++error; - } else - ++error; /* not expecting any other options */ - } - } - - if (!filename) { - ++error; - } else if (!(infile = fopen(filename, "rb"))) { - fprintf(stderr, PROGNAME ": can't open PNG file [%s]\n", filename); - ++error; - } else { - incount = fread(inbuf, 1, INBUFSIZE, infile); - if (incount < 8 || !readpng2_check_sig(inbuf, 8)) { - fprintf(stderr, PROGNAME - ": [%s] is not a PNG file: incorrect signature\n", - filename); - ++error; - } else if ((rc = readpng2_init(&rpng2_info)) != 0) { - switch (rc) { - case 2: - fprintf(stderr, PROGNAME - ": [%s] has bad IHDR (libpng longjmp)\n", - filename); - break; - case 4: - fprintf(stderr, PROGNAME ": insufficient memory\n"); - break; - default: - fprintf(stderr, PROGNAME - ": unknown readpng2_init() error\n"); - break; - } - ++error; - } else { - display = XOpenDisplay(displayname); - if (!display) { - readpng2_cleanup(&rpng2_info); - fprintf(stderr, PROGNAME ": can't open X display [%s]\n", - displayname? displayname : "default"); - ++error; - } - } - if (error) - fclose(infile); - } - - - /* usage screen */ - - if (error) { - fprintf(stderr, "\n%s %s: %s\n\n", PROGNAME, VERSION, appname); - readpng2_version_info(); - fprintf(stderr, "\n" - "Usage: %s [-display xdpy] [-gamma exp] [-bgcolor bg | -bgpat pat]\n" -#if (defined(__i386__) || defined(_M_IX86)) - " %*s [[-nommxfilters] [-nommxcombine] [-nommxinterlace] | -nommx]\n" -#endif - " %*s [-usleep dur | -timing] [-pause] file.png\n\n" - " xdpy\tname of the target X display (e.g., ``hostname:0'')\n" - " exp \ttransfer-function exponent (``gamma'') of the display\n" - "\t\t system in floating-point format (e.g., ``%.1f''); equal\n" - "\t\t to the product of the lookup-table exponent (varies)\n" - "\t\t and the CRT exponent (usually 2.2); must be positive\n" - " bg \tdesired background color in 7-character hex RGB format\n" - "\t\t (e.g., ``#ff7700'' for orange: same as HTML colors);\n" - "\t\t used with transparent images; overrides -bgpat\n" - " pat \tdesired background pattern number (1-%d); used with\n" - "\t\t transparent images; overrides -bgcolor\n" -#if (defined(__i386__) || defined(_M_IX86)) - " -nommx*\tdisable optimized MMX routines for decoding row filters,\n" - "\t\t combining rows, and expanding interlacing, respectively\n" -#endif - " dur \tduration in microseconds to wait after displaying each\n" - "\t\t row (for demo purposes)\n" - " -timing\tenables delay for every block read, to simulate modem\n" - "\t\t download of image (~36 Kbps)\n" - " -pause\tpauses after displaying each pass until key pressed\n" - "\nPress Q, Esc or mouse button 1 (within image window, after image\n" - "is displayed) to quit.\n" - "\n", PROGNAME, -#if (defined(__i386__) || defined(_M_IX86)) - strlen(PROGNAME), " ", -#endif - strlen(PROGNAME), " ", default_display_exponent, num_bgpat); - exit(1); - } - - - /* set the title-bar string, but make sure buffer doesn't overflow */ - - alen = strlen(appname); - flen = strlen(filename); - if (alen + flen + 3 > 1023) - sprintf(titlebar, "%s: ...%s", appname, filename+(alen+flen+6-1023)); - else - sprintf(titlebar, "%s: %s", appname, filename); - - - /* set some final rpng2_info variables before entering main data loop */ - - if (have_bg) { - unsigned r, g, b; /* this approach quiets compiler warnings */ - - sscanf(bgstr+1, "%2x%2x%2x", &r, &g, &b); - rpng2_info.bg_red = (uch)r; - rpng2_info.bg_green = (uch)g; - rpng2_info.bg_blue = (uch)b; - } else - rpng2_info.need_bgcolor = TRUE; - - rpng2_info.done = FALSE; - rpng2_info.mainprog_init = rpng2_x_init; - rpng2_info.mainprog_display_row = rpng2_x_display_row; - rpng2_info.mainprog_finish_display = rpng2_x_finish_display; - - - /* OK, this is the fun part: call readpng2_decode_data() at the start of - * the loop to deal with our first buffer of data (read in above to verify - * that the file is a PNG image), then loop through the file and continue - * calling the same routine to handle each chunk of data. It in turn - * passes the data to libpng, which will invoke one or more of our call- - * backs as decoded data become available. We optionally call sleep() for - * one second per iteration to simulate downloading the image via an analog - * modem. */ - - for (;;) { - Trace((stderr, "about to call readpng2_decode_data()\n")) - if (readpng2_decode_data(&rpng2_info, inbuf, incount)) - ++error; - Trace((stderr, "done with readpng2_decode_data()\n")) - if (error || feof(infile) || rpng2_info.done) - break; - if (timing) - sleep(1); - incount = fread(inbuf, 1, INBUFSIZE, infile); - } - - - /* clean up PNG stuff and report any decoding errors */ - - fclose(infile); - Trace((stderr, "about to call readpng2_cleanup()\n")) - readpng2_cleanup(&rpng2_info); - - if (error) { - fprintf(stderr, PROGNAME ": libpng error while decoding PNG image\n"); - exit(3); - } - - - /* wait for the user to tell us when to quit */ - - do - XNextEvent(display, &e); - while (!(e.type == ButtonPress && e.xbutton.button == Button1) && - !(e.type == KeyPress && /* v--- or 1 for shifted keys */ - ((k = XLookupKeysym(&e.xkey, 0)) == XK_q || k == XK_Escape) )); - - - /* we're done: clean up all image and X resources and go away */ - - Trace((stderr, "about to call rpng2_x_cleanup()\n")) - rpng2_x_cleanup(); - - return 0; -} - - - - - -/* this function is called by readpng2_info_callback() in readpng2.c, which - * in turn is called by libpng after all of the pre-IDAT chunks have been - * read and processed--i.e., we now have enough info to finish initializing */ - -static void rpng2_x_init(void) -{ - ulg i; - ulg rowbytes = rpng2_info.rowbytes; - - Trace((stderr, "beginning rpng2_x_init()\n")) - Trace((stderr, " rowbytes = %ld\n", rpng2_info.rowbytes)) - Trace((stderr, " width = %ld\n", rpng2_info.width)) - Trace((stderr, " height = %ld\n", rpng2_info.height)) - - rpng2_info.image_data = (uch *)malloc(rowbytes * rpng2_info.height); - if (!rpng2_info.image_data) { - readpng2_cleanup(&rpng2_info); - return; - } - - rpng2_info.row_pointers = (uch **)malloc(rpng2_info.height * sizeof(uch *)); - if (!rpng2_info.row_pointers) { - free(rpng2_info.image_data); - rpng2_info.image_data = NULL; - readpng2_cleanup(&rpng2_info); - return; - } - - for (i = 0; i < rpng2_info.height; ++i) - rpng2_info.row_pointers[i] = rpng2_info.image_data + i*rowbytes; - - - /* do the basic X initialization stuff, make the window, and fill it with - * the user-specified, file-specified or default background color or - * pattern */ - - if (rpng2_x_create_window()) { - - /* GRR TEMPORARY HACK: this is fundamentally no different from cases - * above; libpng should longjmp() back to us when png_ptr goes away. - * If we/it segfault instead, seems like a libpng bug... */ - - /* we're here via libpng callback, so if window fails, clean and bail */ -printf("readpng2_cleanup.\n"); - readpng2_cleanup(&rpng2_info); - rpng2_x_cleanup(); - exit(2); - } -} - - - - - -static int rpng2_x_create_window(void) -{ - ulg bg_red = rpng2_info.bg_red; - ulg bg_green = rpng2_info.bg_green; - ulg bg_blue = rpng2_info.bg_blue; - ulg bg_pixel = 0L; - ulg attrmask; - int need_colormap = FALSE; - int screen, pad; - uch *xdata; - Window root; - XEvent e; - XGCValues gcvalues; - XSetWindowAttributes attr; - XSizeHints *size_hints; - XTextProperty windowName, *pWindowName = &windowName; - XTextProperty iconName, *pIconName = &iconName; - XVisualInfo visual_info; - XWMHints *wm_hints; - - - Trace((stderr, "beginning rpng2_x_create_window()\n")) - - screen = DefaultScreen(display); - depth = DisplayPlanes(display, screen); - root = RootWindow(display, screen); - -#ifdef DEBUG - XSynchronize(display, True); -#endif - - if (depth != 16 && depth != 24 && depth != 32) { - int visuals_matched = 0; - - Trace((stderr, "default depth is %d: checking other visuals\n", - depth)) - - /* 24-bit first */ - visual_info.screen = screen; - visual_info.depth = 24; - visual_list = XGetVisualInfo(display, - VisualScreenMask | VisualDepthMask, &visual_info, &visuals_matched); - if (visuals_matched == 0) { -/* GRR: add 15-, 16- and 32-bit TrueColor visuals (also DirectColor?) */ - fprintf(stderr, "default screen depth %d not supported, and no" - " 24-bit visuals found\n", depth); - return 2; - } - Trace((stderr, "XGetVisualInfo() returned %d 24-bit visuals\n", - visuals_matched)) - visual = visual_list[0].visual; - depth = visual_list[0].depth; -/* - colormap_size = visual_list[0].colormap_size; - visual_class = visual->class; - visualID = XVisualIDFromVisual(visual); - */ - have_nondefault_visual = TRUE; - need_colormap = TRUE; - } else { - XMatchVisualInfo(display, screen, depth, TrueColor, &visual_info); - visual = visual_info.visual; - } - - RMask = visual->red_mask; - GMask = visual->green_mask; - BMask = visual->blue_mask; - -/* GRR: add/check 8-bit support */ - if (depth == 8 || need_colormap) { - colormap = XCreateColormap(display, root, visual, AllocNone); - if (!colormap) { - fprintf(stderr, "XCreateColormap() failed\n"); - return 2; - } - have_colormap = TRUE; - if (depth == 8) - bg_image = FALSE; /* gradient just wastes palette entries */ - } - if (depth == 15 || depth == 16) { - RShift = 15 - rpng2_x_msb(RMask); /* these are right-shifts */ - GShift = 15 - rpng2_x_msb(GMask); - BShift = 15 - rpng2_x_msb(BMask); - } else if (depth > 16) { - RShift = rpng2_x_msb(RMask) - 7; /* these are left-shifts */ - GShift = rpng2_x_msb(GMask) - 7; - BShift = rpng2_x_msb(BMask) - 7; - } - if (depth >= 15 && (RShift < 0 || GShift < 0 || BShift < 0)) { - fprintf(stderr, "rpng2 internal logic error: negative X shift(s)!\n"); - return 2; - } - -/*--------------------------------------------------------------------------- - Finally, create the window. - ---------------------------------------------------------------------------*/ - - attr.backing_store = Always; - attr.event_mask = ExposureMask | KeyPressMask | ButtonPressMask; - attrmask = CWBackingStore | CWEventMask; - if (have_nondefault_visual) { - attr.colormap = colormap; - attr.background_pixel = 0; - attr.border_pixel = 1; - attrmask |= CWColormap | CWBackPixel | CWBorderPixel; - } - - window = XCreateWindow(display, root, 0, 0, rpng2_info.width, - rpng2_info.height, 0, depth, InputOutput, visual, attrmask, &attr); - - if (window == None) { - fprintf(stderr, "XCreateWindow() failed\n"); - return 2; - } else - have_window = TRUE; - - if (depth == 8) - XSetWindowColormap(display, window, colormap); - - if (!XStringListToTextProperty(&window_name, 1, pWindowName)) - pWindowName = NULL; - if (!XStringListToTextProperty(&icon_name, 1, pIconName)) - pIconName = NULL; - - /* OK if either hints allocation fails; XSetWMProperties() allows NULLs */ - - if ((size_hints = XAllocSizeHints()) != NULL) { - /* window will not be resizable */ - size_hints->flags = PMinSize | PMaxSize; - size_hints->min_width = size_hints->max_width = (int)rpng2_info.width; - size_hints->min_height = size_hints->max_height = - (int)rpng2_info.height; - } - - if ((wm_hints = XAllocWMHints()) != NULL) { - wm_hints->initial_state = NormalState; - wm_hints->input = True; - /* wm_hints->icon_pixmap = icon_pixmap; */ - wm_hints->flags = StateHint | InputHint /* | IconPixmapHint */ ; - } - - XSetWMProperties(display, window, pWindowName, pIconName, NULL, 0, - size_hints, wm_hints, NULL); - - /* various properties and hints no longer needed; free memory */ - if (pWindowName) - XFree(pWindowName->value); - if (pIconName) - XFree(pIconName->value); - if (size_hints) - XFree(size_hints); - if (wm_hints) - XFree(wm_hints); - - XMapWindow(display, window); - - gc = XCreateGC(display, window, 0, &gcvalues); - have_gc = TRUE; - -/*--------------------------------------------------------------------------- - Allocate memory for the X- and display-specific version of the image. - ---------------------------------------------------------------------------*/ - - if (depth == 24 || depth == 32) { - xdata = (uch *)malloc(4*rpng2_info.width*rpng2_info.height); - pad = 32; - } else if (depth == 16) { - xdata = (uch *)malloc(2*rpng2_info.width*rpng2_info.height); - pad = 16; - } else /* depth == 8 */ { - xdata = (uch *)malloc(rpng2_info.width*rpng2_info.height); - pad = 8; - } - - if (!xdata) { - fprintf(stderr, PROGNAME ": unable to allocate image memory\n"); - return 4; - } - - ximage = XCreateImage(display, visual, depth, ZPixmap, 0, - (char *)xdata, rpng2_info.width, rpng2_info.height, pad, 0); - - if (!ximage) { - fprintf(stderr, PROGNAME ": XCreateImage() failed\n"); - free(xdata); - return 3; - } - - /* to avoid testing the byte order every pixel (or doubling the size of - * the drawing routine with a giant if-test), we arbitrarily set the byte - * order to MSBFirst and let Xlib worry about inverting things on little- - * endian machines (e.g., Linux/x86, old VAXen, etc.)--this is not the - * most efficient approach (the giant if-test would be better), but in - * the interest of clarity, we'll take the easy way out... */ - - ximage->byte_order = MSBFirst; - -/*--------------------------------------------------------------------------- - Fill window with the specified background color (default is black) or - faked "background image" (but latter is disabled if 8-bit; gradients - just waste palette entries). - ---------------------------------------------------------------------------*/ - - if (bg_image) - rpng2_x_load_bg_image(); /* resets bg_image if fails */ - - if (!bg_image) { - if (depth == 24 || depth == 32) { - bg_pixel = (bg_red << RShift) | - (bg_green << GShift) | - (bg_blue << BShift); - } else if (depth == 16) { - bg_pixel = (((bg_red << 8) >> RShift) & RMask) | - (((bg_green << 8) >> GShift) & GMask) | - (((bg_blue << 8) >> BShift) & BMask); - } else /* depth == 8 */ { - - /* GRR: add 8-bit support */ - - } - XSetForeground(display, gc, bg_pixel); - XFillRectangle(display, window, gc, 0, 0, rpng2_info.width, - rpng2_info.height); - } - -/*--------------------------------------------------------------------------- - Wait for first Expose event to do any drawing, then flush and return. - ---------------------------------------------------------------------------*/ - - do - XNextEvent(display, &e); - while (e.type != Expose || e.xexpose.count); - - XFlush(display); - - return 0; - -} /* end function rpng2_x_create_window() */ - - - - - -static int rpng2_x_load_bg_image(void) -{ - uch *src; - char *dest; - uch r1, r2, g1, g2, b1, b2; - uch r1_inv, r2_inv, g1_inv, g2_inv, b1_inv, b2_inv; - int k, hmax, max; - int xidx, yidx, yidx_max = (bgscale-1); - int even_odd_vert, even_odd_horiz, even_odd; - int invert_gradient2 = (bg[pat].type & 0x08); - int invert_column; - int ximage_rowbytes = ximage->bytes_per_line; - ulg i, row; - ulg pixel; - -/*--------------------------------------------------------------------------- - Allocate buffer for fake background image to be used with transparent - images; if this fails, revert to plain background color. - ---------------------------------------------------------------------------*/ - - bg_rowbytes = 3 * rpng2_info.width; - bg_data = (uch *)malloc(bg_rowbytes * rpng2_info.height); - if (!bg_data) { - fprintf(stderr, PROGNAME - ": unable to allocate memory for background image\n"); - bg_image = 0; - return 1; - } - -/*--------------------------------------------------------------------------- - Vertical gradients (ramps) in NxN squares, alternating direction and - colors (N == bgscale). - ---------------------------------------------------------------------------*/ - - if ((bg[pat].type & 0x07) == 0) { - uch r1_min = rgb[bg[pat].rgb1_min].r; - uch g1_min = rgb[bg[pat].rgb1_min].g; - uch b1_min = rgb[bg[pat].rgb1_min].b; - uch r2_min = rgb[bg[pat].rgb2_min].r; - uch g2_min = rgb[bg[pat].rgb2_min].g; - uch b2_min = rgb[bg[pat].rgb2_min].b; - int r1_diff = rgb[bg[pat].rgb1_max].r - r1_min; - int g1_diff = rgb[bg[pat].rgb1_max].g - g1_min; - int b1_diff = rgb[bg[pat].rgb1_max].b - b1_min; - int r2_diff = rgb[bg[pat].rgb2_max].r - r2_min; - int g2_diff = rgb[bg[pat].rgb2_max].g - g2_min; - int b2_diff = rgb[bg[pat].rgb2_max].b - b2_min; - - for (row = 0; row < rpng2_info.height; ++row) { - yidx = (int)(row % bgscale); - even_odd_vert = (int)((row / bgscale) & 1); - - r1 = r1_min + (r1_diff * yidx) / yidx_max; - g1 = g1_min + (g1_diff * yidx) / yidx_max; - b1 = b1_min + (b1_diff * yidx) / yidx_max; - r1_inv = r1_min + (r1_diff * (yidx_max-yidx)) / yidx_max; - g1_inv = g1_min + (g1_diff * (yidx_max-yidx)) / yidx_max; - b1_inv = b1_min + (b1_diff * (yidx_max-yidx)) / yidx_max; - - r2 = r2_min + (r2_diff * yidx) / yidx_max; - g2 = g2_min + (g2_diff * yidx) / yidx_max; - b2 = b2_min + (b2_diff * yidx) / yidx_max; - r2_inv = r2_min + (r2_diff * (yidx_max-yidx)) / yidx_max; - g2_inv = g2_min + (g2_diff * (yidx_max-yidx)) / yidx_max; - b2_inv = b2_min + (b2_diff * (yidx_max-yidx)) / yidx_max; - - dest = (char *)bg_data + row*bg_rowbytes; - for (i = 0; i < rpng2_info.width; ++i) { - even_odd_horiz = (int)((i / bgscale) & 1); - even_odd = even_odd_vert ^ even_odd_horiz; - invert_column = - (even_odd_horiz && (bg[pat].type & 0x10)); - if (even_odd == 0) { /* gradient #1 */ - if (invert_column) { - *dest++ = r1_inv; - *dest++ = g1_inv; - *dest++ = b1_inv; - } else { - *dest++ = r1; - *dest++ = g1; - *dest++ = b1; - } - } else { /* gradient #2 */ - if ((invert_column && invert_gradient2) || - (!invert_column && !invert_gradient2)) - { - *dest++ = r2; /* not inverted or */ - *dest++ = g2; /* doubly inverted */ - *dest++ = b2; - } else { - *dest++ = r2_inv; - *dest++ = g2_inv; /* singly inverted */ - *dest++ = b2_inv; - } - } - } - } - -/*--------------------------------------------------------------------------- - Soft gradient-diamonds with scale = bgscale. Code contributed by Adam - M. Costello. - ---------------------------------------------------------------------------*/ - - } else if ((bg[pat].type & 0x07) == 1) { - - hmax = (bgscale-1)/2; /* half the max weight of a color */ - max = 2*hmax; /* the max weight of a color */ - - r1 = rgb[bg[pat].rgb1_max].r; - g1 = rgb[bg[pat].rgb1_max].g; - b1 = rgb[bg[pat].rgb1_max].b; - r2 = rgb[bg[pat].rgb2_max].r; - g2 = rgb[bg[pat].rgb2_max].g; - b2 = rgb[bg[pat].rgb2_max].b; - - for (row = 0; row < rpng2_info.height; ++row) { - yidx = (int)(row % bgscale); - if (yidx > hmax) - yidx = bgscale-1 - yidx; - dest = (char *)bg_data + row*bg_rowbytes; - for (i = 0; i < rpng2_info.width; ++i) { - xidx = (int)(i % bgscale); - if (xidx > hmax) - xidx = bgscale-1 - xidx; - k = xidx + yidx; - *dest++ = (k*r1 + (max-k)*r2) / max; - *dest++ = (k*g1 + (max-k)*g2) / max; - *dest++ = (k*b1 + (max-k)*b2) / max; - } - } - -/*--------------------------------------------------------------------------- - Radial "starburst" with azimuthal sinusoids; [eventually number of sinu- - soids will equal bgscale?]. This one is slow but very cool. Code con- - tributed by Pieter S. van der Meulen (originally in Smalltalk). - ---------------------------------------------------------------------------*/ - - } else if ((bg[pat].type & 0x07) == 2) { - uch ch; - int ii, x, y, hw, hh, grayspot; - double freq, rotate, saturate, gray, intensity; - double angle=0.0, aoffset=0.0, maxDist, dist; - double red=0.0, green=0.0, blue=0.0, hue, s, v, f, p, q, t; - - fprintf(stderr, "%s: computing radial background...", - PROGNAME); - fflush(stderr); - - hh = (int)(rpng2_info.height / 2); - hw = (int)(rpng2_info.width / 2); - - /* variables for radial waves: - * aoffset: number of degrees to rotate hue [CURRENTLY NOT USED] - * freq: number of color beams originating from the center - * grayspot: size of the graying center area (anti-alias) - * rotate: rotation of the beams as a function of radius - * saturate: saturation of beams' shape azimuthally - */ - angle = CLIP(angle, 0.0, 360.0); - grayspot = CLIP(bg[pat].bg_gray, 1, (hh + hw)); - freq = MAX((double)bg[pat].bg_freq, 0.0); - saturate = (double)bg[pat].bg_bsat * 0.1; - rotate = (double)bg[pat].bg_brot * 0.1; - gray = 0.0; - intensity = 0.0; - maxDist = (double)((hw*hw) + (hh*hh)); - - for (row = 0; row < rpng2_info.height; ++row) { - y = (int)(row - hh); - dest = (char *)bg_data + row*bg_rowbytes; - for (i = 0; i < rpng2_info.width; ++i) { - x = (int)(i - hw); - angle = (x == 0)? PI_2 : atan((double)y / (double)x); - gray = (double)MAX(ABS(y), ABS(x)) / grayspot; - gray = MIN(1.0, gray); - dist = (double)((x*x) + (y*y)) / maxDist; - intensity = cos((angle+(rotate*dist*PI)) * freq) * - gray * saturate; - intensity = (MAX(MIN(intensity,1.0),-1.0) + 1.0) * 0.5; - hue = (angle + PI) * INV_PI_360 + aoffset; - s = gray * ((double)(ABS(x)+ABS(y)) / (double)(hw + hh)); - s = MIN(MAX(s,0.0), 1.0); - v = MIN(MAX(intensity,0.0), 1.0); - - if (s == 0.0) { - ch = (uch)(v * 255.0); - *dest++ = ch; - *dest++ = ch; - *dest++ = ch; - } else { - if ((hue < 0.0) || (hue >= 360.0)) - hue -= (((int)(hue / 360.0)) * 360.0); - hue /= 60.0; - ii = (int)hue; - f = hue - (double)ii; - p = (1.0 - s) * v; - q = (1.0 - (s * f)) * v; - t = (1.0 - (s * (1.0 - f))) * v; - if (ii == 0) { red = v; green = t; blue = p; } - else if (ii == 1) { red = q; green = v; blue = p; } - else if (ii == 2) { red = p; green = v; blue = t; } - else if (ii == 3) { red = p; green = q; blue = v; } - else if (ii == 4) { red = t; green = p; blue = v; } - else if (ii == 5) { red = v; green = p; blue = q; } - *dest++ = (uch)(red * 255.0); - *dest++ = (uch)(green * 255.0); - *dest++ = (uch)(blue * 255.0); - } - } - } - fprintf(stderr, "done.\n"); - fflush(stderr); - } - -/*--------------------------------------------------------------------------- - Blast background image to display buffer before beginning PNG decode. - ---------------------------------------------------------------------------*/ - - if (depth == 24 || depth == 32) { - ulg red, green, blue; - - for (row = 0; row < rpng2_info.height; ++row) { - src = bg_data + row*bg_rowbytes; - dest = ximage->data + row*ximage_rowbytes; - for (i = rpng2_info.width; i > 0; --i) { - red = *src++; - green = *src++; - blue = *src++; - pixel = (red << RShift) | - (green << GShift) | - (blue << BShift); - /* recall that we set ximage->byte_order = MSBFirst above */ - /* GRR BUG: this assumes bpp == 32, but may be 24: */ - *dest++ = (char)((pixel >> 24) & 0xff); - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } - - } else if (depth == 16) { - ush red, green, blue; - - for (row = 0; row < rpng2_info.height; ++row) { - src = bg_data + row*bg_rowbytes; - dest = ximage->data + row*ximage_rowbytes; - for (i = rpng2_info.width; i > 0; --i) { - red = ((ush)(*src) << 8); ++src; - green = ((ush)(*src) << 8); ++src; - blue = ((ush)(*src) << 8); ++src; - pixel = ((red >> RShift) & RMask) | - ((green >> GShift) & GMask) | - ((blue >> BShift) & BMask); - /* recall that we set ximage->byte_order = MSBFirst above */ - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } - - } else /* depth == 8 */ { - - /* GRR: add 8-bit support */ - - } - - XPutImage(display, window, gc, ximage, 0, 0, 0, 0, rpng2_info.width, - rpng2_info.height); - - return 0; - -} /* end function rpng2_x_load_bg_image() */ - - - - - -static void rpng2_x_display_row(ulg row) -{ - uch bg_red = rpng2_info.bg_red; - uch bg_green = rpng2_info.bg_green; - uch bg_blue = rpng2_info.bg_blue; - uch *src, *src2=NULL; - char *dest; - uch r, g, b, a; - int ximage_rowbytes = ximage->bytes_per_line; - ulg i, pixel; - static int rows=0, prevpass=(-1); - static ulg firstrow; - -/*--------------------------------------------------------------------------- - rows and firstrow simply track how many rows (and which ones) have not - yet been displayed; alternatively, we could call XPutImage() for every - row and not bother with the records-keeping. - ---------------------------------------------------------------------------*/ - - Trace((stderr, "beginning rpng2_x_display_row()\n")) - - if (rpng2_info.pass != prevpass) { - if (pause_after_pass && rpng2_info.pass > 0) { - XEvent e; - KeySym k; - - fprintf(stderr, - "%s: end of pass %d of 7; click in image window to continue\n", - PROGNAME, prevpass + 1); - do - XNextEvent(display, &e); - while (!(e.type == ButtonPress && e.xbutton.button == Button1) - && !(e.type == KeyPress && - ((k = XLookupKeysym(&e.xkey, 0)) == XK_q - || k == XK_Escape) )) ; - } - fprintf(stderr, "%s: pass %d of 7\r", PROGNAME, rpng2_info.pass + 1); - fflush(stderr); - prevpass = rpng2_info.pass; - } - - if (rows == 0) - firstrow = row; /* first row that is not yet displayed */ - - ++rows; /* count of rows received but not yet displayed */ - -/*--------------------------------------------------------------------------- - Aside from the use of the rpng2_info struct, the lack of an outer loop - (over rows) and moving the XPutImage() call outside the "if (depth)" - tests, this routine is identical to rpng_x_display_image() in the non- - progressive version of the program. - ---------------------------------------------------------------------------*/ - - if (depth == 24 || depth == 32) { - ulg red, green, blue; - - src = rpng2_info.image_data + row*rpng2_info.rowbytes; - if (bg_image) - src2 = bg_data + row*bg_rowbytes; - dest = ximage->data + row*ximage_rowbytes; - if (rpng2_info.channels == 3) { - for (i = rpng2_info.width; i > 0; --i) { - red = *src++; - green = *src++; - blue = *src++; - pixel = (red << RShift) | - (green << GShift) | - (blue << BShift); - /* recall that we set ximage->byte_order = MSBFirst above */ - /* GRR BUG: this assumes bpp == 32, but may be 24: */ - *dest++ = (char)((pixel >> 24) & 0xff); - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } else /* if (rpng2_info.channels == 4) */ { - for (i = rpng2_info.width; i > 0; --i) { - r = *src++; - g = *src++; - b = *src++; - a = *src++; - if (bg_image) { - bg_red = *src2++; - bg_green = *src2++; - bg_blue = *src2++; - } - if (a == 255) { - red = r; - green = g; - blue = b; - } else if (a == 0) { - red = bg_red; - green = bg_green; - blue = bg_blue; - } else { - /* this macro (from png.h) composites the foreground - * and background values and puts the result into the - * first argument */ - alpha_composite(red, r, a, bg_red); - alpha_composite(green, g, a, bg_green); - alpha_composite(blue, b, a, bg_blue); - } - pixel = (red << RShift) | - (green << GShift) | - (blue << BShift); - /* recall that we set ximage->byte_order = MSBFirst above */ - /* GRR BUG: this assumes bpp == 32, but may be 24: */ - *dest++ = (char)((pixel >> 24) & 0xff); - *dest++ = (char)((pixel >> 16) & 0xff); - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } - - } else if (depth == 16) { - ush red, green, blue; - - src = rpng2_info.row_pointers[row]; - if (bg_image) - src2 = bg_data + row*bg_rowbytes; - dest = ximage->data + row*ximage_rowbytes; - if (rpng2_info.channels == 3) { - for (i = rpng2_info.width; i > 0; --i) { - red = ((ush)(*src) << 8); - ++src; - green = ((ush)(*src) << 8); - ++src; - blue = ((ush)(*src) << 8); - ++src; - pixel = ((red >> RShift) & RMask) | - ((green >> GShift) & GMask) | - ((blue >> BShift) & BMask); - /* recall that we set ximage->byte_order = MSBFirst above */ - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } else /* if (rpng2_info.channels == 4) */ { - for (i = rpng2_info.width; i > 0; --i) { - r = *src++; - g = *src++; - b = *src++; - a = *src++; - if (bg_image) { - bg_red = *src2++; - bg_green = *src2++; - bg_blue = *src2++; - } - if (a == 255) { - red = ((ush)r << 8); - green = ((ush)g << 8); - blue = ((ush)b << 8); - } else if (a == 0) { - red = ((ush)bg_red << 8); - green = ((ush)bg_green << 8); - blue = ((ush)bg_blue << 8); - } else { - /* this macro (from png.h) composites the foreground - * and background values and puts the result back into - * the first argument (== fg byte here: safe) */ - alpha_composite(r, r, a, bg_red); - alpha_composite(g, g, a, bg_green); - alpha_composite(b, b, a, bg_blue); - red = ((ush)r << 8); - green = ((ush)g << 8); - blue = ((ush)b << 8); - } - pixel = ((red >> RShift) & RMask) | - ((green >> GShift) & GMask) | - ((blue >> BShift) & BMask); - /* recall that we set ximage->byte_order = MSBFirst above */ - *dest++ = (char)((pixel >> 8) & 0xff); - *dest++ = (char)( pixel & 0xff); - } - } - - } else /* depth == 8 */ { - - /* GRR: add 8-bit support */ - - } - - -/*--------------------------------------------------------------------------- - Display after every 16 rows or when on one of last two rows. (Region - may include previously displayed lines due to interlacing--i.e., not - contiguous. Also, second-to-last row is final one in interlaced images - with odd number of rows.) For demos, flush (and delay) after every 16th - row so "sparse" passes don't go twice as fast. - ---------------------------------------------------------------------------*/ - - if (demo_timing && (row - firstrow >= 16 || row >= rpng2_info.height-2)) { - XPutImage(display, window, gc, ximage, 0, (int)firstrow, 0, - (int)firstrow, rpng2_info.width, row - firstrow + 1); - XFlush(display); - rows = 0; - usleep(usleep_duration); - } else - if (!demo_timing && ((rows & 0xf) == 0 || row >= rpng2_info.height-2)) { - XPutImage(display, window, gc, ximage, 0, (int)firstrow, 0, - (int)firstrow, rpng2_info.width, row - firstrow + 1); - XFlush(display); - rows = 0; - } - -} - - - - - -static void rpng2_x_finish_display(void) -{ - Trace((stderr, "beginning rpng2_x_finish_display()\n")) - - /* last row has already been displayed by rpng2_x_display_row(), so we - * have nothing to do here except set a flag and let the user know that - * the image is done */ - - rpng2_info.done = TRUE; - printf( - "Done. Press Q, Esc or mouse button 1 (within image window) to quit.\n"); - fflush(stdout); -} - - - - - -static void rpng2_x_cleanup(void) -{ - if (bg_image && bg_data) { - free(bg_data); - bg_data = NULL; - } - - if (rpng2_info.image_data) { - free(rpng2_info.image_data); - rpng2_info.image_data = NULL; - } - - if (rpng2_info.row_pointers) { - free(rpng2_info.row_pointers); - rpng2_info.row_pointers = NULL; - } - - if (ximage) { - if (ximage->data) { - free(ximage->data); /* we allocated it, so we free it */ - ximage->data = (char *)NULL; /* instead of XDestroyImage() */ - } - XDestroyImage(ximage); - ximage = NULL; - } - - if (have_gc) - XFreeGC(display, gc); - - if (have_window) - XDestroyWindow(display, window); - - if (have_colormap) - XFreeColormap(display, colormap); - - if (have_nondefault_visual) - XFree(visual_list); -} - - - - - -static int rpng2_x_msb(ulg u32val) -{ - int i; - - for (i = 31; i >= 0; --i) { - if (u32val & 0x80000000L) - break; - u32val <<= 1; - } - return i; -} diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/toucan.png b/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/toucan.png deleted file mode 100644 index 03960d4939938541ca3f8efee4bf13ffdecbb2f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12901 zcma*NWpo@(vMt(@TFlH07Be$5GlRv<%*<@D#mr!V#mp>=(Xz$NEcMklbI#m(>%AXu zud1#cJ2EmWGkdMBijHVyMJYr$JU9RVfG8s^uKIZ``aIKNAOHX`!oF1CrvbDSQ4j%u zMHH|cr5gbN5CCO)b%{^?{|#6GI1B*%zje6(GU5NlRXmX=`N0_(A%xV>KIS3t$)QLv zQPAKaY!jf6!6DFKA+BP;aS(tXOVE|;Uwp<0CBPxek%2QX+9N}6AR78ggv z7y<(tDDvfVZh(LUCaDtRFhN+r_B0_*rDFZ%cgL7s9GZxYKaNytiAy8o< zK4ankJ;1+)_%uHc3!1etPoK|Y|FdGB%Ksn01O8|4J{$jgBVYkwFaQWRFz_wD zcdvi$%1u>K4FFaS4p9LFfgquvVL)(YupoHQKUfBRfZqSbKFR+@Ea>gi5dR;(-VdVC4xLbxrnJC%1@d03#v_sPy`DI z#TlfBgvIoM42mg1!!%U~f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ly(JY0I)s2wqK zs4lnwlPS|!tHWJv_E^z8kB}JPNDm0hMdTqBB*hvX9_C3Egx|)B7T~n+-zWR51WFF~ zykOM&Gvu7d%$jn>t}qXVw-0sCx)1l4)Uvd1>qy|xNZ2tzL7cugWy?lA5^(SCVm2*j-lF52V@ z+T%x*`0$QnzCi=sQ)sQE))$@5i!5n_%E;WVC-CQKJ}4QyFA?w54K&f~&R7^d6jIU6 zPj`1xfXC^L*Jscf-{V`m$+~`0;&)~W=mb49C_HNA&mUfMHzy)W1G*D==8R-$N%7Zr zbF6;+e6*#WbR$n3w-0m&PQ^MyQ7YqO`kFbBryEFO%AgS@5>jnOMe3u_t_d?%4X*TH z{5+BTylYAX%v=|+#TsxTno;spmmLhP@5DYGb;_LLVILP@C>fFS;v)~!tu~=`PTn(w z@kq2sccr}peszs_a|jf~@0}a(6)VWFA|VbDn}oBIbW&_Bdy?$OI#a2_7$wSqVNMW8 zQ7moec)LT|o}Km&ELgd(qU71jCs@!EQ?R)buGTAc`(&6qv-!Bwc!oQ3r~BS{UR<7w zzki8DO>^bD?$zuVE?6~FS0Elv9U$D^?!mf^V8)z$rNjVY%ID;{EdFzTiE1K=;e9QkgXl#UrL)nNm{m6wV0io`SMJnp7jViK_}}T?)OW`2<^`_|QGc(qUi8*gRgx z{-!?xiX#CoA7{3v@;VAO`^mfBIAxo(5^u@`?- z)!O(Kd=k9Yde7M2WlPxo!YWbUs9DH}eX_B<*m^qYN+4D&rZb3)BF-KJ&P71fPk}$O zJEdAJIYUf+tAU{x4?>CGnbMGE@jD1gHO+dQh(lR=O z916my -#include -#include -#include /* for jmpbuf declaration in writepng.h */ -#include - -#ifdef DOS_OS2_W32 -# include /* for isatty(), setmode() prototypes */ -# include /* O_BINARY for fdopen() without text translation */ -# ifdef __EMX__ -# ifndef getch -# define getch() _read_kbd(0, 1, 0) /* need getche() */ -# endif -# else /* !__EMX__ */ -# ifdef __GO32__ -# include -# define getch() getkey() /* GRR: need getche() */ -# else -# include /* for getche() console input */ -# endif -# endif /* ?__EMX__ */ -# define FGETS(buf,len,stream) dos_kbd_gets(buf,len) -#else -# include /* for isatty() prototype */ -# define FGETS fgets -#endif - -/* #define DEBUG : this enables the Trace() macros */ - -/* #define FORBID_LATIN1_CTRL : this requires the user to re-enter any - text that includes control characters discouraged by the PNG spec; text - that includes an escape character (27) must be re-entered regardless */ - -#include "writepng.h" /* typedefs, common macros, writepng prototypes */ - - - -/* local prototypes */ - -static int wpng_isvalid_latin1(uch *p, int len); -static void wpng_cleanup(void); - -#ifdef DOS_OS2_W32 - static char *dos_kbd_gets(char *buf, int len); -#endif - - - -static mainprog_info wpng_info; /* lone global */ - - - -int main(int argc, char **argv) -{ -#ifndef DOS_OS2_W32 - FILE *keybd; -#endif -#ifdef sgi - FILE *tmpfile; /* or we could just use keybd, since no overlap */ - char tmpline[80]; -#endif - char *inname = NULL, outname[256]; - char *p, pnmchar, pnmline[256]; - char *bgstr, *textbuf = NULL; - ulg rowbytes; - int rc, len = 0; - int error = 0; - int text = FALSE; - int maxval; - double LUT_exponent; /* just the lookup table */ - double CRT_exponent = 2.2; /* just the monitor */ - double default_display_exponent; /* whole display system */ - double default_gamma = 0.0; - - - wpng_info.infile = NULL; - wpng_info.outfile = NULL; - wpng_info.image_data = NULL; - wpng_info.row_pointers = NULL; - wpng_info.filter = FALSE; - wpng_info.interlaced = FALSE; - wpng_info.have_bg = FALSE; - wpng_info.have_time = FALSE; - wpng_info.have_text = 0; - wpng_info.gamma = 0.0; - - - /* First get the default value for our display-system exponent, i.e., - * the product of the CRT exponent and the exponent corresponding to - * the frame-buffer's lookup table (LUT), if any. If the PNM image - * looks correct on the user's display system, its file gamma is the - * inverse of this value. (Note that this is not an exhaustive list - * of LUT values--e.g., OpenStep has a lot of weird ones--but it should - * cover 99% of the current possibilities. This section must ensure - * that default_display_exponent is positive.) */ - -#if defined(NeXT) - /* third-party utilities can modify the default LUT exponent */ - LUT_exponent = 1.0 / 2.2; - /* - if (some_next_function_that_returns_gamma(&next_gamma)) - LUT_exponent = 1.0 / next_gamma; - */ -#elif defined(sgi) - LUT_exponent = 1.0 / 1.7; - /* there doesn't seem to be any documented function to - * get the "gamma" value, so we do it the hard way */ - tmpfile = fopen("/etc/config/system.glGammaVal", "r"); - if (tmpfile) { - double sgi_gamma; - - fgets(tmpline, 80, tmpfile); - fclose(tmpfile); - sgi_gamma = atof(tmpline); - if (sgi_gamma > 0.0) - LUT_exponent = 1.0 / sgi_gamma; - } -#elif defined(Macintosh) - LUT_exponent = 1.8 / 2.61; - /* - if (some_mac_function_that_returns_gamma(&mac_gamma)) - LUT_exponent = mac_gamma / 2.61; - */ -#else - LUT_exponent = 1.0; /* assume no LUT: most PCs */ -#endif - - /* the defaults above give 1.0, 1.3, 1.5 and 2.2, respectively: */ - default_display_exponent = LUT_exponent * CRT_exponent; - - - /* If the user has set the SCREEN_GAMMA environment variable as suggested - * (somewhat imprecisely) in the libpng documentation, use that; otherwise - * use the default value we just calculated. Either way, the user may - * override this via a command-line option. */ - - if ((p = getenv("SCREEN_GAMMA")) != NULL) { - double exponent = atof(p); - - if (exponent > 0.0) - default_gamma = 1.0 / exponent; - } - - if (default_gamma == 0.0) - default_gamma = 1.0 / default_display_exponent; - - - /* Now parse the command line for options and the PNM filename. */ - - while (*++argv && !error) { - if (!strncmp(*argv, "-i", 2)) { - wpng_info.interlaced = TRUE; - } else if (!strncmp(*argv, "-time", 3)) { - wpng_info.modtime = time(NULL); - wpng_info.have_time = TRUE; - } else if (!strncmp(*argv, "-text", 3)) { - text = TRUE; - } else if (!strncmp(*argv, "-gamma", 2)) { - if (!*++argv) - ++error; - else { - wpng_info.gamma = atof(*argv); - if (wpng_info.gamma <= 0.0) - ++error; - else if (wpng_info.gamma > 1.01) - fprintf(stderr, PROGNAME - " warning: file gammas are usually less than 1.0\n"); - } - } else if (!strncmp(*argv, "-bgcolor", 4)) { - if (!*++argv) - ++error; - else { - bgstr = *argv; - if (strlen(bgstr) != 7 || bgstr[0] != '#') - ++error; - else { - unsigned r, g, b; /* this way quiets compiler warnings */ - - sscanf(bgstr+1, "%2x%2x%2x", &r, &g, &b); - wpng_info.bg_red = (uch)r; - wpng_info.bg_green = (uch)g; - wpng_info.bg_blue = (uch)b; - wpng_info.have_bg = TRUE; - } - } - } else { - if (**argv != '-') { - inname = *argv; - if (argv[1]) /* shouldn't be any more args after filename */ - ++error; - } else - ++error; /* not expecting any other options */ - } - } - - - /* open the input and output files, or register an error and abort */ - - if (!inname) { - if (isatty(0)) { - fprintf(stderr, PROGNAME - ": must give input filename or provide image data via stdin\n"); - ++error; - } else { -#ifdef DOS_OS2_W32 - /* some buggy C libraries require BOTH setmode() and fdopen(bin) */ - setmode(fileno(stdin), O_BINARY); - setmode(fileno(stdout), O_BINARY); -#endif - if ((wpng_info.infile = fdopen(fileno(stdin), "rb")) == NULL) { - fprintf(stderr, PROGNAME - ": unable to reopen stdin in binary mode\n"); - ++error; - } else - if ((wpng_info.outfile = fdopen(fileno(stdout), "wb")) == NULL) { - fprintf(stderr, PROGNAME - ": unable to reopen stdout in binary mode\n"); - fclose(wpng_info.infile); - ++error; - } else - wpng_info.filter = TRUE; - } - } else if ((len = strlen(inname)) > 250) { - fprintf(stderr, PROGNAME ": input filename is too long [%d chars]\n", - len); - ++error; - } else if (!(wpng_info.infile = fopen(inname, "rb"))) { - fprintf(stderr, PROGNAME ": can't open input file [%s]\n", inname); - ++error; - } - - if (!error) { - fgets(pnmline, 256, wpng_info.infile); - if (pnmline[0] != 'P' || ((pnmchar = pnmline[1]) != '5' && - pnmchar != '6' && pnmchar != '8')) - { - fprintf(stderr, PROGNAME - ": input file [%s] is not a binary PGM, PPM or PAM file\n", - inname); - ++error; - } else { - wpng_info.pnmtype = (int)(pnmchar - '0'); - if (wpng_info.pnmtype != 8) - wpng_info.have_bg = FALSE; /* no need for bg if opaque */ - do { - fgets(pnmline, 256, wpng_info.infile); /* lose any comments */ - } while (pnmline[0] == '#'); - sscanf(pnmline, "%ld %ld", &wpng_info.width, &wpng_info.height); - do { - fgets(pnmline, 256, wpng_info.infile); /* more comment lines */ - } while (pnmline[0] == '#'); - sscanf(pnmline, "%d", &maxval); - if (wpng_info.width <= 0L || wpng_info.height <= 0L || - maxval != 255) - { - fprintf(stderr, PROGNAME - ": only positive width/height, maxval == 255 allowed \n"); - ++error; - } - wpng_info.sample_depth = 8; /* <==> maxval 255 */ - - if (!wpng_info.filter) { - /* make outname from inname */ - if ((p = strrchr(inname, '.')) == NULL || - (p - inname) != (len - 4)) - { - strcpy(outname, inname); - strcpy(outname+len, ".png"); - } else { - len -= 4; - strncpy(outname, inname, len); - strcpy(outname+len, ".png"); - } - /* check if outname already exists; if not, open */ - if ((wpng_info.outfile = fopen(outname, "rb")) != NULL) { - fprintf(stderr, PROGNAME ": output file exists [%s]\n", - outname); - fclose(wpng_info.outfile); - ++error; - } else if (!(wpng_info.outfile = fopen(outname, "wb"))) { - fprintf(stderr, PROGNAME ": can't open output file [%s]\n", - outname); - ++error; - } - } - } - if (error) { - fclose(wpng_info.infile); - wpng_info.infile = NULL; - if (wpng_info.filter) { - fclose(wpng_info.outfile); - wpng_info.outfile = NULL; - } - } - } - - - /* if we had any errors, print usage and die horrible death...arrr! */ - - if (error) { - fprintf(stderr, "\n%s %s: %s\n", PROGNAME, VERSION, APPNAME); - writepng_version_info(); - fprintf(stderr, "\n" -"Usage: %s [-gamma exp] [-bgcolor bg] [-text] [-time] [-interlace] pnmfile\n" -"or: ... | %s [-gamma exp] [-bgcolor bg] [-text] [-time] [-interlace] | ...\n" - " exp \ttransfer-function exponent (``gamma'') of the image in\n" - "\t\t floating-point format (e.g., ``%.5f''); if image looks\n" - "\t\t correct on given display system, image gamma is equal to\n" - "\t\t inverse of display-system exponent, i.e., 1 / (LUT * CRT)\n" - "\t\t (where LUT = lookup-table exponent and CRT = CRT exponent;\n" - "\t\t first varies, second is usually 2.2, all are positive)\n" - " bg \tdesired background color for alpha-channel images, in\n" - "\t\t 7-character hex RGB format (e.g., ``#ff7700'' for orange:\n" - "\t\t same as HTML colors)\n" - " -text\tprompt interactively for text info (tEXt chunks)\n" - " -time\tinclude a tIME chunk (last modification time)\n" - " -interlace\twrite interlaced PNG image\n" - "\n" -"pnmfile or stdin must be a binary PGM (`P5'), PPM (`P6') or (extremely\n" -"unofficial and unsupported!) PAM (`P8') file. Currently it is required\n" -"to have maxval == 255 (i.e., no scaling). If pnmfile is specified, it\n" -"is converted to the corresponding PNG file with the same base name but a\n" -"``.png'' extension; files read from stdin are converted and sent to stdout.\n" -"The conversion is progressive (low memory usage) unless interlacing is\n" -"requested; in that case the whole image will be buffered in memory and\n" -"written in one call.\n" - "\n", PROGNAME, PROGNAME, default_gamma); - exit(1); - } - - - /* prepare the text buffers for libpng's use; note that even though - * PNG's png_text struct includes a length field, we don't have to fill - * it out */ - - if (text && -#ifndef DOS_OS2_W32 - (keybd = fdopen(fileno(stderr), "r")) != NULL && -#endif - (textbuf = (char *)malloc((5 + 9)*75)) != NULL) - { - int i, valid, result; - - fprintf(stderr, - "Enter text info (no more than 72 characters per line);\n"); - fprintf(stderr, "to skip a field, hit the key.\n"); - /* note: just leaves len == 1 */ - - do { - valid = TRUE; - p = textbuf + TEXT_TITLE_OFFSET; - fprintf(stderr, " Title: "); - fflush(stderr); - if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) { - if (p[len-1] == '\n') - p[--len] = '\0'; - wpng_info.title = p; - wpng_info.have_text |= TEXT_TITLE; - if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) { - fprintf(stderr, " " PROGNAME " warning: character code" - " %u is %sdiscouraged by the PNG\n specification " - "[first occurrence was at character position #%d]\n", - (unsigned)p[result], (p[result] == 27)? "strongly " : "", - result+1); - fflush(stderr); -#ifdef FORBID_LATIN1_CTRL - wpng_info.have_text &= ~TEXT_TITLE; - valid = FALSE; -#else - if (p[result] == 27) { /* escape character */ - wpng_info.have_text &= ~TEXT_TITLE; - valid = FALSE; - } -#endif - } - } - } while (!valid); - - do { - valid = TRUE; - p = textbuf + TEXT_AUTHOR_OFFSET; - fprintf(stderr, " Author: "); - fflush(stderr); - if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) { - if (p[len-1] == '\n') - p[--len] = '\0'; - wpng_info.author = p; - wpng_info.have_text |= TEXT_AUTHOR; - if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) { - fprintf(stderr, " " PROGNAME " warning: character code" - " %u is %sdiscouraged by the PNG\n specification " - "[first occurrence was at character position #%d]\n", - (unsigned)p[result], (p[result] == 27)? "strongly " : "", - result+1); - fflush(stderr); -#ifdef FORBID_LATIN1_CTRL - wpng_info.have_text &= ~TEXT_AUTHOR; - valid = FALSE; -#else - if (p[result] == 27) { /* escape character */ - wpng_info.have_text &= ~TEXT_AUTHOR; - valid = FALSE; - } -#endif - } - } - } while (!valid); - - do { - valid = TRUE; - p = textbuf + TEXT_DESC_OFFSET; - fprintf(stderr, " Description (up to 9 lines):\n"); - for (i = 1; i < 10; ++i) { - fprintf(stderr, " [%d] ", i); - fflush(stderr); - if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) - p += len; /* now points at NULL; char before is newline */ - else - break; - } - if ((len = p - (textbuf + TEXT_DESC_OFFSET)) > 1) { - if (p[-1] == '\n') { - p[-1] = '\0'; - --len; - } - wpng_info.desc = textbuf + TEXT_DESC_OFFSET; - wpng_info.have_text |= TEXT_DESC; - p = textbuf + TEXT_DESC_OFFSET; - if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) { - fprintf(stderr, " " PROGNAME " warning: character code" - " %u is %sdiscouraged by the PNG\n specification " - "[first occurrence was at character position #%d]\n", - (unsigned)p[result], (p[result] == 27)? "strongly " : "", - result+1); - fflush(stderr); -#ifdef FORBID_LATIN1_CTRL - wpng_info.have_text &= ~TEXT_DESC; - valid = FALSE; -#else - if (p[result] == 27) { /* escape character */ - wpng_info.have_text &= ~TEXT_DESC; - valid = FALSE; - } -#endif - } - } - } while (!valid); - - do { - valid = TRUE; - p = textbuf + TEXT_COPY_OFFSET; - fprintf(stderr, " Copyright: "); - fflush(stderr); - if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) { - if (p[len-1] == '\n') - p[--len] = '\0'; - wpng_info.copyright = p; - wpng_info.have_text |= TEXT_COPY; - if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) { - fprintf(stderr, " " PROGNAME " warning: character code" - " %u is %sdiscouraged by the PNG\n specification " - "[first occurrence was at character position #%d]\n", - (unsigned)p[result], (p[result] == 27)? "strongly " : "", - result+1); - fflush(stderr); -#ifdef FORBID_LATIN1_CTRL - wpng_info.have_text &= ~TEXT_COPY; - valid = FALSE; -#else - if (p[result] == 27) { /* escape character */ - wpng_info.have_text &= ~TEXT_COPY; - valid = FALSE; - } -#endif - } - } - } while (!valid); - - do { - valid = TRUE; - p = textbuf + TEXT_EMAIL_OFFSET; - fprintf(stderr, " E-mail: "); - fflush(stderr); - if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) { - if (p[len-1] == '\n') - p[--len] = '\0'; - wpng_info.email = p; - wpng_info.have_text |= TEXT_EMAIL; - if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) { - fprintf(stderr, " " PROGNAME " warning: character code" - " %u is %sdiscouraged by the PNG\n specification " - "[first occurrence was at character position #%d]\n", - (unsigned)p[result], (p[result] == 27)? "strongly " : "", - result+1); - fflush(stderr); -#ifdef FORBID_LATIN1_CTRL - wpng_info.have_text &= ~TEXT_EMAIL; - valid = FALSE; -#else - if (p[result] == 27) { /* escape character */ - wpng_info.have_text &= ~TEXT_EMAIL; - valid = FALSE; - } -#endif - } - } - } while (!valid); - - do { - valid = TRUE; - p = textbuf + TEXT_URL_OFFSET; - fprintf(stderr, " URL: "); - fflush(stderr); - if (FGETS(p, 74, keybd) && (len = strlen(p)) > 1) { - if (p[len-1] == '\n') - p[--len] = '\0'; - wpng_info.url = p; - wpng_info.have_text |= TEXT_URL; - if ((result = wpng_isvalid_latin1((uch *)p, len)) >= 0) { - fprintf(stderr, " " PROGNAME " warning: character code" - " %u is %sdiscouraged by the PNG\n specification " - "[first occurrence was at character position #%d]\n", - (unsigned)p[result], (p[result] == 27)? "strongly " : "", - result+1); - fflush(stderr); -#ifdef FORBID_LATIN1_CTRL - wpng_info.have_text &= ~TEXT_URL; - valid = FALSE; -#else - if (p[result] == 27) { /* escape character */ - wpng_info.have_text &= ~TEXT_URL; - valid = FALSE; - } -#endif - } - } - } while (!valid); - -#ifndef DOS_OS2_W32 - fclose(keybd); -#endif - - } else if (text) { - fprintf(stderr, PROGNAME ": unable to allocate memory for text\n"); - text = FALSE; - wpng_info.have_text = 0; - } - - - /* allocate libpng stuff, initialize transformations, write pre-IDAT data */ - - if ((rc = writepng_init(&wpng_info)) != 0) { - switch (rc) { - case 2: - fprintf(stderr, PROGNAME - ": libpng initialization problem (longjmp)\n"); - break; - case 4: - fprintf(stderr, PROGNAME ": insufficient memory\n"); - break; - case 11: - fprintf(stderr, PROGNAME - ": internal logic error (unexpected PNM type)\n"); - break; - default: - fprintf(stderr, PROGNAME - ": unknown writepng_init() error\n"); - break; - } - exit(rc); - } - - - /* free textbuf, since it's a completely local variable and all text info - * has just been written to the PNG file */ - - if (text && textbuf) { - free(textbuf); - textbuf = NULL; - } - - - /* calculate rowbytes on basis of image type; note that this becomes much - * more complicated if we choose to support PBM type, ASCII PNM types, or - * 16-bit-per-sample binary data [currently not an official NetPBM type] */ - - if (wpng_info.pnmtype == 5) - rowbytes = wpng_info.width; - else if (wpng_info.pnmtype == 6) - rowbytes = wpng_info.width * 3; - else /* if (wpng_info.pnmtype == 8) */ - rowbytes = wpng_info.width * 4; - - - /* read and write the image, either in its entirety (if writing interlaced - * PNG) or row by row (if non-interlaced) */ - - fprintf(stderr, "Encoding image data...\n"); - fflush(stderr); - - if (wpng_info.interlaced) { - long i; - ulg bytes; - ulg image_bytes = rowbytes * wpng_info.height; /* overflow? */ - - wpng_info.image_data = (uch *)malloc(image_bytes); - wpng_info.row_pointers = (uch **)malloc(wpng_info.height*sizeof(uch *)); - if (wpng_info.image_data == NULL || wpng_info.row_pointers == NULL) { - fprintf(stderr, PROGNAME ": insufficient memory for image data\n"); - writepng_cleanup(&wpng_info); - wpng_cleanup(); - exit(5); - } - for (i = 0; i < wpng_info.height; ++i) - wpng_info.row_pointers[i] = wpng_info.image_data + i*rowbytes; - bytes = fread(wpng_info.image_data, 1, image_bytes, wpng_info.infile); - if (bytes != image_bytes) { - fprintf(stderr, PROGNAME ": expected %lu bytes, got %lu bytes\n", - image_bytes, bytes); - fprintf(stderr, " (continuing anyway)\n"); - } - if (writepng_encode_image(&wpng_info) != 0) { - fprintf(stderr, PROGNAME - ": libpng problem (longjmp) while writing image data\n"); - writepng_cleanup(&wpng_info); - wpng_cleanup(); - exit(2); - } - - } else /* not interlaced: write progressively (row by row) */ { - long j; - ulg bytes; - - wpng_info.image_data = (uch *)malloc(rowbytes); - if (wpng_info.image_data == NULL) { - fprintf(stderr, PROGNAME ": insufficient memory for row data\n"); - writepng_cleanup(&wpng_info); - wpng_cleanup(); - exit(5); - } - error = 0; - for (j = wpng_info.height; j > 0L; --j) { - bytes = fread(wpng_info.image_data, 1, rowbytes, wpng_info.infile); - if (bytes != rowbytes) { - fprintf(stderr, PROGNAME - ": expected %lu bytes, got %lu bytes (row %ld)\n", rowbytes, - bytes, wpng_info.height-j); - ++error; - break; - } - if (writepng_encode_row(&wpng_info) != 0) { - fprintf(stderr, PROGNAME - ": libpng problem (longjmp) while writing row %ld\n", - wpng_info.height-j); - ++error; - break; - } - } - if (error) { - writepng_cleanup(&wpng_info); - wpng_cleanup(); - exit(2); - } - if (writepng_encode_finish(&wpng_info) != 0) { - fprintf(stderr, PROGNAME ": error on final libpng call\n"); - writepng_cleanup(&wpng_info); - wpng_cleanup(); - exit(2); - } - } - - - /* OK, we're done (successfully): clean up all resources and quit */ - - fprintf(stderr, "Done.\n"); - fflush(stderr); - - writepng_cleanup(&wpng_info); - wpng_cleanup(); - - return 0; -} - - - - - -static int wpng_isvalid_latin1(uch *p, int len) -{ - int i, result = -1; - - for (i = 0; i < len; ++i) { - if (p[i] == 10 || (p[i] > 31 && p[i] < 127) || p[i] > 160) - continue; /* character is completely OK */ - if (result < 0 || (p[result] != 27 && p[i] == 27)) - result = i; /* mark location of first questionable one */ - } /* or of first escape character (bad) */ - - return result; -} - - - - - -static void wpng_cleanup(void) -{ - if (wpng_info.outfile) { - fclose(wpng_info.outfile); - wpng_info.outfile = NULL; - } - - if (wpng_info.infile) { - fclose(wpng_info.infile); - wpng_info.infile = NULL; - } - - if (wpng_info.image_data) { - free(wpng_info.image_data); - wpng_info.image_data = NULL; - } - - if (wpng_info.row_pointers) { - free(wpng_info.row_pointers); - wpng_info.row_pointers = NULL; - } -} - - - - -#ifdef DOS_OS2_W32 - -static char *dos_kbd_gets(char *buf, int len) -{ - int ch, count=0; - - do { - buf[count++] = ch = getche(); - } while (ch != '\r' && count < len-1); - - buf[count--] = '\0'; /* terminate string */ - if (buf[count] == '\r') /* Enter key makes CR, so change to newline */ - buf[count] = '\n'; - - fprintf(stderr, "\n"); /* Enter key does *not* cause a newline */ - fflush(stderr); - - return buf; -} - -#endif /* DOS_OS2_W32 */ diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/writepng.c b/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/writepng.c deleted file mode 100644 index 6802b12..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/writepng.c +++ /dev/null @@ -1,368 +0,0 @@ -/*--------------------------------------------------------------------------- - - wpng - simple PNG-writing program writepng.c - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2000 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - ---------------------------------------------------------------------------*/ - - -#include /* for exit() prototype */ - -#include "png.h" /* libpng header; includes zlib.h and setjmp.h */ -#include "writepng.h" /* typedefs, common macros, public prototypes */ - - -/* local prototype */ - -static void writepng_error_handler(png_structp png_ptr, png_const_charp msg); - - - -void writepng_version_info(void) -{ - fprintf(stderr, " Compiled with libpng %s; using libpng %s.\n", - PNG_LIBPNG_VER_STRING, png_libpng_ver); - fprintf(stderr, " Compiled with zlib %s; using zlib %s.\n", - ZLIB_VERSION, zlib_version); -} - - - - -/* returns 0 for success, 2 for libpng problem, 4 for out of memory, 11 for - * unexpected pnmtype; note that outfile might be stdout */ - -int writepng_init(mainprog_info *mainprog_ptr) -{ - png_structp png_ptr; /* note: temporary variables! */ - png_infop info_ptr; - int color_type, interlace_type; - - - /* could also replace libpng warning-handler (final NULL), but no need: */ - - png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, mainprog_ptr, - writepng_error_handler, NULL); - if (!png_ptr) - return 4; /* out of memory */ - - info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) { - png_destroy_write_struct(&png_ptr, NULL); - return 4; /* out of memory */ - } - - - /* setjmp() must be called in every function that calls a PNG-writing - * libpng function, unless an alternate error handler was installed-- - * but compatible error handlers must either use longjmp() themselves - * (as in this program) or exit immediately, so here we go: */ - - if (setjmp(mainprog_ptr->jmpbuf)) { - png_destroy_write_struct(&png_ptr, &info_ptr); - return 2; - } - - - /* make sure outfile is (re)opened in BINARY mode */ - - png_init_io(png_ptr, mainprog_ptr->outfile); - - - /* set the compression levels--in general, always want to leave filtering - * turned on (except for palette images) and allow all of the filters, - * which is the default; want 32K zlib window, unless entire image buffer - * is 16K or smaller (unknown here)--also the default; usually want max - * compression (NOT the default); and remaining compression flags should - * be left alone */ - - png_set_compression_level(png_ptr, Z_BEST_COMPRESSION); -/* - >> this is default for no filtering; Z_FILTERED is default otherwise: - png_set_compression_strategy(png_ptr, Z_DEFAULT_STRATEGY); - >> these are all defaults: - png_set_compression_mem_level(png_ptr, 8); - png_set_compression_window_bits(png_ptr, 15); - png_set_compression_method(png_ptr, 8); - */ - - - /* set the image parameters appropriately */ - - if (mainprog_ptr->pnmtype == 5) - color_type = PNG_COLOR_TYPE_GRAY; - else if (mainprog_ptr->pnmtype == 6) - color_type = PNG_COLOR_TYPE_RGB; - else if (mainprog_ptr->pnmtype == 8) - color_type = PNG_COLOR_TYPE_RGB_ALPHA; - else { - png_destroy_write_struct(&png_ptr, &info_ptr); - return 11; - } - - interlace_type = mainprog_ptr->interlaced? PNG_INTERLACE_ADAM7 : - PNG_INTERLACE_NONE; - - png_set_IHDR(png_ptr, info_ptr, mainprog_ptr->width, mainprog_ptr->height, - mainprog_ptr->sample_depth, color_type, interlace_type, - PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); - - if (mainprog_ptr->gamma > 0.0) - png_set_gAMA(png_ptr, info_ptr, mainprog_ptr->gamma); - - if (mainprog_ptr->have_bg) { /* we know it's RGBA, not gray+alpha */ - png_color_16 background; - - background.red = mainprog_ptr->bg_red; - background.green = mainprog_ptr->bg_green; - background.blue = mainprog_ptr->bg_blue; - png_set_bKGD(png_ptr, info_ptr, &background); - } - - if (mainprog_ptr->have_time) { - png_time modtime; - - png_convert_from_time_t(&modtime, mainprog_ptr->modtime); - png_set_tIME(png_ptr, info_ptr, &modtime); - } - - if (mainprog_ptr->have_text) { - png_text text[6]; - int num_text = 0; - - if (mainprog_ptr->have_text & TEXT_TITLE) { - text[num_text].compression = PNG_TEXT_COMPRESSION_NONE; - text[num_text].key = "Title"; - text[num_text].text = mainprog_ptr->title; - ++num_text; - } - if (mainprog_ptr->have_text & TEXT_AUTHOR) { - text[num_text].compression = PNG_TEXT_COMPRESSION_NONE; - text[num_text].key = "Author"; - text[num_text].text = mainprog_ptr->author; - ++num_text; - } - if (mainprog_ptr->have_text & TEXT_DESC) { - text[num_text].compression = PNG_TEXT_COMPRESSION_NONE; - text[num_text].key = "Description"; - text[num_text].text = mainprog_ptr->desc; - ++num_text; - } - if (mainprog_ptr->have_text & TEXT_COPY) { - text[num_text].compression = PNG_TEXT_COMPRESSION_NONE; - text[num_text].key = "Copyright"; - text[num_text].text = mainprog_ptr->copyright; - ++num_text; - } - if (mainprog_ptr->have_text & TEXT_EMAIL) { - text[num_text].compression = PNG_TEXT_COMPRESSION_NONE; - text[num_text].key = "E-mail"; - text[num_text].text = mainprog_ptr->email; - ++num_text; - } - if (mainprog_ptr->have_text & TEXT_URL) { - text[num_text].compression = PNG_TEXT_COMPRESSION_NONE; - text[num_text].key = "URL"; - text[num_text].text = mainprog_ptr->url; - ++num_text; - } - png_set_text(png_ptr, info_ptr, text, num_text); - } - - - /* write all chunks up to (but not including) first IDAT */ - - png_write_info(png_ptr, info_ptr); - - - /* if we wanted to write any more text info *after* the image data, we - * would set up text struct(s) here and call png_set_text() again, with - * just the new data; png_set_tIME() could also go here, but it would - * have no effect since we already called it above (only one tIME chunk - * allowed) */ - - - /* set up the transformations: for now, just pack low-bit-depth pixels - * into bytes (one, two or four pixels per byte) */ - - png_set_packing(png_ptr); -/* png_set_shift(png_ptr, &sig_bit); to scale low-bit-depth values */ - - - /* make sure we save our pointers for use in writepng_encode_image() */ - - mainprog_ptr->png_ptr = png_ptr; - mainprog_ptr->info_ptr = info_ptr; - - - /* OK, that's all we need to do for now; return happy */ - - return 0; -} - - - - - -/* returns 0 for success, 2 for libpng (longjmp) problem */ - -int writepng_encode_image(mainprog_info *mainprog_ptr) -{ - png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr; - png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr; - - - /* as always, setjmp() must be called in every function that calls a - * PNG-writing libpng function */ - - if (setjmp(mainprog_ptr->jmpbuf)) { - png_destroy_write_struct(&png_ptr, &info_ptr); - mainprog_ptr->png_ptr = NULL; - mainprog_ptr->info_ptr = NULL; - return 2; - } - - - /* and now we just write the whole image; libpng takes care of interlacing - * for us */ - - png_write_image(png_ptr, mainprog_ptr->row_pointers); - - - /* since that's it, we also close out the end of the PNG file now--if we - * had any text or time info to write after the IDATs, second argument - * would be info_ptr, but we optimize slightly by sending NULL pointer: */ - - png_write_end(png_ptr, NULL); - - return 0; -} - - - - - -/* returns 0 if succeeds, 2 if libpng problem */ - -int writepng_encode_row(mainprog_info *mainprog_ptr) /* NON-interlaced only! */ -{ - png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr; - png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr; - - - /* as always, setjmp() must be called in every function that calls a - * PNG-writing libpng function */ - - if (setjmp(mainprog_ptr->jmpbuf)) { - png_destroy_write_struct(&png_ptr, &info_ptr); - mainprog_ptr->png_ptr = NULL; - mainprog_ptr->info_ptr = NULL; - return 2; - } - - - /* image_data points at our one row of image data */ - - png_write_row(png_ptr, mainprog_ptr->image_data); - - return 0; -} - - - - - -/* returns 0 if succeeds, 2 if libpng problem */ - -int writepng_encode_finish(mainprog_info *mainprog_ptr) /* NON-interlaced! */ -{ - png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr; - png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr; - - - /* as always, setjmp() must be called in every function that calls a - * PNG-writing libpng function */ - - if (setjmp(mainprog_ptr->jmpbuf)) { - png_destroy_write_struct(&png_ptr, &info_ptr); - mainprog_ptr->png_ptr = NULL; - mainprog_ptr->info_ptr = NULL; - return 2; - } - - - /* close out PNG file; if we had any text or time info to write after - * the IDATs, second argument would be info_ptr: */ - - png_write_end(png_ptr, NULL); - - return 0; -} - - - - - -void writepng_cleanup(mainprog_info *mainprog_ptr) -{ - png_structp png_ptr = (png_structp)mainprog_ptr->png_ptr; - png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr; - - if (png_ptr && info_ptr) - png_destroy_write_struct(&png_ptr, &info_ptr); -} - - - - - -static void writepng_error_handler(png_structp png_ptr, png_const_charp msg) -{ - mainprog_info *mainprog_ptr; - - /* This function, aside from the extra step of retrieving the "error - * pointer" (below) and the fact that it exists within the application - * rather than within libpng, is essentially identical to libpng's - * default error handler. The second point is critical: since both - * setjmp() and longjmp() are called from the same code, they are - * guaranteed to have compatible notions of how big a jmp_buf is, - * regardless of whether _BSD_SOURCE or anything else has (or has not) - * been defined. */ - - fprintf(stderr, "writepng libpng error: %s\n", msg); - fflush(stderr); - - mainprog_ptr = png_get_error_ptr(png_ptr); - if (mainprog_ptr == NULL) { /* we are completely hosed now */ - fprintf(stderr, - "writepng severe error: jmpbuf not recoverable; terminating.\n"); - fflush(stderr); - exit(99); - } - - longjmp(mainprog_ptr->jmpbuf, 1); -} diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/writepng.h b/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/writepng.h deleted file mode 100644 index 93c3da8..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/gregbook/writepng.h +++ /dev/null @@ -1,109 +0,0 @@ -/*--------------------------------------------------------------------------- - - wpng - simple PNG-writing program writepng.h - - --------------------------------------------------------------------------- - - Copyright (c) 1998-2000 Greg Roelofs. All rights reserved. - - This software is provided "as is," without warranty of any kind, - express or implied. In no event shall the author or contributors - be held liable for any damages arising in any way from the use of - this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. Redistributions of source code must retain the above copyright - notice, disclaimer, and this list of conditions. - 2. Redistributions in binary form must reproduce the above copyright - notice, disclaimer, and this list of conditions in the documenta- - tion and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - - This product includes software developed by Greg Roelofs - and contributors for the book, "PNG: The Definitive Guide," - published by O'Reilly and Associates. - - ---------------------------------------------------------------------------*/ - -#ifndef TRUE -# define TRUE 1 -# define FALSE 0 -#endif - -#ifndef MAX -# define MAX(a,b) ((a) > (b)? (a) : (b)) -# define MIN(a,b) ((a) < (b)? (a) : (b)) -#endif - -#ifdef DEBUG -# define Trace(x) {fprintf x ; fflush(stderr); fflush(stdout);} -#else -# define Trace(x) ; -#endif - -#define TEXT_TITLE 0x01 -#define TEXT_AUTHOR 0x02 -#define TEXT_DESC 0x04 -#define TEXT_COPY 0x08 -#define TEXT_EMAIL 0x10 -#define TEXT_URL 0x20 - -#define TEXT_TITLE_OFFSET 0 -#define TEXT_AUTHOR_OFFSET 72 -#define TEXT_COPY_OFFSET (2*72) -#define TEXT_EMAIL_OFFSET (3*72) -#define TEXT_URL_OFFSET (4*72) -#define TEXT_DESC_OFFSET (5*72) - -typedef unsigned char uch; -typedef unsigned short ush; -typedef unsigned long ulg; - -typedef struct _mainprog_info { - double gamma; - long width; - long height; - time_t modtime; - FILE *infile; - FILE *outfile; - void *png_ptr; - void *info_ptr; - uch *image_data; - uch **row_pointers; - char *title; - char *author; - char *desc; - char *copyright; - char *email; - char *url; - int filter; /* command-line-filter flag, not PNG row filter! */ - int pnmtype; - int sample_depth; - int interlaced; - int have_bg; - int have_time; - int have_text; - jmp_buf jmpbuf; - uch bg_red; - uch bg_green; - uch bg_blue; -} mainprog_info; - - -/* prototypes for public functions in writepng.c */ - -void writepng_version_info(void); - -int writepng_init(mainprog_info *mainprog_ptr); - -int writepng_encode_image(mainprog_info *mainprog_ptr); - -int writepng_encode_row(mainprog_info *mainprog_ptr); - -int writepng_encode_finish(mainprog_info *mainprog_ptr); - -void writepng_cleanup(mainprog_info *mainprog_ptr); diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/msvctest/README.txt b/gtkmm-osx/trunk/libpng-1.2.5/contrib/msvctest/README.txt deleted file mode 100644 index 09bffd3..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/msvctest/README.txt +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft Developer Studio Build File, Format Version 6.00 for -msvctest - -Assumes that libpng DLLs and LIBs are in ..\..\projects\msvc\win32\libpng -Assumes that zlib DLLs and LIBs are in ..\..\projects\msvc\win32\zlib - -To build: - -1) On the main menu Select "Build|Set Active configuration". - Choose the configuration that corresponds to the library you want to test. - This library must have been built using the libpng MS project located in - the "mscv" subdirectory. - -2) Select "Build|Clean" - -3) Select "Build|Rebuild All" - -4) The test results should appear in the "Build" pane of the Output Window. - - -Simon-Pierre Cadieux -Methodex Computer Systems Inc. diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/msvctest/msvctest.dsp b/gtkmm-osx/trunk/libpng-1.2.5/contrib/msvctest/msvctest.dsp deleted file mode 100644 index afe93a5..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/msvctest/msvctest.dsp +++ /dev/null @@ -1,247 +0,0 @@ -# Microsoft Developer Studio Project File - Name="msvctest" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=msvctest - Win32 Debug DLL -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "msvctest.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "msvctest.mak" CFG="msvctest - Win32 Debug DLL" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "msvctest - Win32 DLL" (based on "Win32 (x86) Console Application") -!MESSAGE "msvctest - Win32 Debug DLL" (based on "Win32 (x86) Console Application") -!MESSAGE "msvctest - Win32 ASM DLL" (based on "Win32 (x86) Console Application") -!MESSAGE "msvctest - Win32 Debug ASM DLL" (based on "Win32 (x86) Console Application") -!MESSAGE "msvctest - Win32 LIB" (based on "Win32 (x86) Console Application") -!MESSAGE "msvctest - Win32 Debug LIB" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "msvctest - Win32 DLL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "dll" -# PROP BASE Intermediate_Dir "dll" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "dll" -# PROP Intermediate_Dir "dll" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c -# ADD CPP /nologo /MD /W3 /O1 /I "..\..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /subsystem:console /machine:I386 -# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll\libpng13.lib /nologo /subsystem:console /machine:I386 -# Begin Special Build Tool -OutDir=.\dll -SOURCE="$(InputPath)" -PostBuild_Desc=[Run Test] -PostBuild_Cmds=set path=..\..\projects\msvc\win32\libpng\dll;..\..\projects\msvc\win32\zlib\dll; $(outdir)\msvctest.exe ..\..\pngtest.png -# End Special Build Tool - -!ELSEIF "$(CFG)" == "msvctest - Win32 Debug DLL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "dll_dbg" -# PROP BASE Intermediate_Dir "dll_dbg" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "dll_dbg" -# PROP Intermediate_Dir "dll_dbg" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "..\..\..\zlib" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbg\libpng13d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# Begin Special Build Tool -OutDir=.\dll_dbg -SOURCE="$(InputPath)" -PostBuild_Desc=[Run Test] -PostBuild_Cmds=set path=..\..\projects\msvc\win32\libpng\dll_dbg;..\..\projects\msvc\win32\zlib\dll_dbg; $(outdir)\msvctest.exe ..\..\pngtest.png -# End Special Build Tool - -!ELSEIF "$(CFG)" == "msvctest - Win32 ASM DLL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "dll_asm" -# PROP BASE Intermediate_Dir "dll_asm" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "dll_asm" -# PROP Intermediate_Dir "dll_asm" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c -# ADD CPP /nologo /MD /W3 /O1 /I "..\..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /subsystem:console /machine:I386 -# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_asm\libpng13a.lib /nologo /subsystem:console /machine:I386 -# Begin Special Build Tool -OutDir=.\dll_asm -SOURCE="$(InputPath)" -PostBuild_Desc=[Run Test] -PostBuild_Cmds=set path=..\..\projects\msvc\win32\libpng\dll_asm;..\..\projects\msvc\win32\zlib\dll_asm; $(outdir)\msvctest.exe ..\..\pngtest.png -# End Special Build Tool - -!ELSEIF "$(CFG)" == "msvctest - Win32 Debug ASM DLL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "dll_dbga" -# PROP BASE Intermediate_Dir "dll_dbga" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "dll_dbga" -# PROP Intermediate_Dir "dll_dbga" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "..\..\..\zlib" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "PNG_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 ..\..\projects\msvc\win32\libpng\dll_dbga\libpng13b.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# Begin Special Build Tool -OutDir=.\dll_dbga -SOURCE="$(InputPath)" -PostBuild_Desc=[Run Test] -PostBuild_Cmds=set path=..\..\projects\msvc\win32\libpng\dll_dbga;..\..\projects\msvc\win32\zlib\dll_dbga; $(outdir)\msvctest.exe ..\..\pngtest.png -# End Special Build Tool - -!ELSEIF "$(CFG)" == "msvctest - Win32 LIB" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "lib" -# PROP BASE Intermediate_Dir "lib" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "lib" -# PROP Intermediate_Dir "lib" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c -# ADD CPP /nologo /W3 /O1 /I "..\..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /subsystem:console /machine:I386 -# ADD LINK32 ..\..\projects\msvc\win32\libpng\lib\libpng.lib /nologo /subsystem:console /machine:I386 -# Begin Special Build Tool -OutDir=.\lib -SOURCE="$(InputPath)" -PostBuild_Desc=[Run Test] -PostBuild_Cmds=$(outdir)\msvctest.exe ..\..\pngtest.png -# End Special Build Tool - -!ELSEIF "$(CFG)" == "msvctest - Win32 Debug LIB" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "lib_dbg" -# PROP BASE Intermediate_Dir "lib_dbg" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "lib_dbg" -# PROP Intermediate_Dir "lib_dbg" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Zi /Od /I "..\..\..\zlib" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 ..\..\projects\msvc\win32\libpng\lib_dbg\libpng.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# Begin Special Build Tool -OutDir=.\lib_dbg -SOURCE="$(InputPath)" -PostBuild_Desc=[Run Test] -PostBuild_Cmds=$(outdir)\msvctest.exe ..\..\pngtest.png -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "msvctest - Win32 DLL" -# Name "msvctest - Win32 Debug DLL" -# Name "msvctest - Win32 ASM DLL" -# Name "msvctest - Win32 Debug ASM DLL" -# Name "msvctest - Win32 LIB" -# Name "msvctest - Win32 Debug LIB" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\pngtest.c -# End Source File -# Begin Source File - -SOURCE=.\README.txt -# PROP Exclude_From_Build 1 -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/msvctest/msvctest.dsw b/gtkmm-osx/trunk/libpng-1.2.5/contrib/msvctest/msvctest.dsw deleted file mode 100644 index a2bb056..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/msvctest/msvctest.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "msvctest"=.\msvctest.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/README b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/README deleted file mode 100644 index 8683a59..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/README +++ /dev/null @@ -1,153 +0,0 @@ -PngMinus --------- -(copyright Willem van Schaik, 1999) - - -License -------- - -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and -that both that copyright notice and this permission notice appear in -supporting documentation. This software is provided "as is" without -express or implied warranty. - - -Some history ------------- -Soon after the creation of PNG in 1995, the need was felt for a set of -pnmtopng / pngtopnm utilities. Independantly Alexander Lehmann and I -(Willem van Schaik) started such a project. Luckily we discovered this -and merged the two together into pnmtopng.tar.gz, which is available -from a/o ftp://swrinde.nde.swri.edu/pub/png/. - -These two utilities have many, many options and make use of most of the -features of PNG, like gamma, alpha, sbit, text-chunks, etc. This makes -the utilities quite complex and by now not anymore very maintainable. -When we wrote these programs, libpng was still in an early stage. -Therefore, lots of the functionality that we put in our software can now -be done using transform-functions in libpng. - -Finally, to compile these programs, you need to have installed and -compiled three libraries: libpng, zlib and netpbm. Especially the latter -makes the whole setup a bit bulky. But that's unavoidable given the many -features of pnmtopng. - - -What now --------- -At this moment libpng is in a very stable state and can do much of the -work done in pnmtopng. Also, pnmtopng needs to be upgraded to the new -interface of libpng. Hence, it is time for a rewrite from the ground up -of pnmtopng and pngtopnm. This will happen in the near future (stay -tuned). The new package will get a different name to distinguish it from -the old one: PngPlus. - -To experiment a bit with the new interface of libpng, I started off with -a small prototype that contains only the basic functionality. It doesn't -have any of the options to read or write special chunks and it will do -no gamma correction. But this makes it also a simple program that is -quite easy to understand and can serve well as a template for other -software developments. (By now there are of course a couple of programs, -like Greg Roelofs' rpng/wpng, that can be used just as good.) - - -Can and can not ---------------- -As this is the small brother of the future PngPlus, I called this fellow -PngMinus. Because I started this development in good-old Turbo-C, I -avoided the use the netpbm library, which requires DOS extenders. Again, -another reason to call it PngMinus (minus netpbm :-). So, part of the -program are some elementary routines to read / write pgm- and ppm-files. -It does not read b&w pbm-files. - -The downside of this approach is that you can not use them on images -that require blocks of memory bigger than 64k (the DOS version). For -larger images you will get an out-of-memory error. - -As said before, PngMinus doesn't correct for gamma. When reading -png-files you can do this just as well by piping the output of png2pnm -to pnmgamma, one of the standard PbmPlus tools. This same scenario will -most probably also be followed in the full-blown future PngPlus, with -the addition of course of the possibility to create gamma-chunks when -writing png-files. - -On the other hand it supports alpha-channels. When reading a png-image -you can write the alpha-channel into a pgm-file. And when creating an -RGB+A png-image, you just combine a ppm-file with a corresponding -pgm-file containing the alpha-channel. When reading, transparency chunks -are converted into an alpha-channel and from there on treated the same -way. - -Finally you can opt for writing ascii or binary pgm- and ppm-files. When -the bit-depth is 16, the format will always be ascii. - - -Using it --------- -To distinguish them from pnmtopng and PngPlus, the utilities are named -png2pnm and pnm2png (2 instead of to). The input- and output-files can -be given as parameters or through redirection. Therefore the programs -can be part of a pipe. - -To list the options type "png2pnm -h" or "pnm2png -h". - - -Just like Scandinavian furniture --------------------------------- -You have to put it together yourself. I did test the software under -MS-DOS with Turbo-C 3.0 and under RedHat Linux 4.2 with gcc. In both -cases I used libpng-1.0.4 and zlib-1.1.3. Later versions should be OK, -however some older libpng versions have a bug in pngmem.c when using -Turbo-C 3.0 (see below). - -You can build it using one of the two makefiles (make -f makefile.###) -or use the batch/script files pngminus.bat / pngminus.sh. This assumes -that you have built the libraries in ../libpng and ../zlib. Using Linux, -make sure that you have built libpng with makefile.std and not -makefile.linux (also called .lnx in earlier versions of libpng). The -latter creates a .so shared-library, while the PngMinus makefile assumes -a normal .a static library. - -If you create a ../pngsuite directory and then store the basn####.png -files from PngSuite (http://www.schaik.com/pngsuite/) in there, you can -test in one go the proper functioning of PngMinus, see png2pnm.bat and -pnm2png.bat (or the .sh versions). - - -Warranty -------- -Please, remember that this was just a small experiment to learn a few -things. It will have many unforeseen features . Who said bugs? Use -it when you are in need for something simple or when you want to start -developing your own stuff. - - -The Turbo bug -------------- -** pngmem.old - hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L); - hptr += 16L; -** pngmem.c - hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L); - hptr = hptr + 16L; -** - -** pngmem.old - png_ptr->offset_table_ptr[i] = (png_bytep)hptr; - hptr += (png_uint_32)65536L; -** pngmem.c - png_ptr->offset_table_ptr[i] = (png_bytep)hptr; - hptr = hptr + 65536L; -** - - -The end -------- -Willem van Schaik -mailto:willem@schaik.com -http://www.schaik.com/png/ -------- -Oct 1999 - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/makefile.std b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/makefile.std deleted file mode 100644 index 2fb061b..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/makefile.std +++ /dev/null @@ -1,65 +0,0 @@ -# Makefile for PngMinus (png2pnm and pnm2png) -# Linux / Unix - -#CC=cc -CC=gcc -LD=$(CC) - -RM=rm -f - -#PNGPATH = /usr/local -#PNGINC = -I$(PNGPATH)/include/libpng12 -#PNGLIB = -L$(PNGPATH)/lib -lpng12 -#PNGLIBS = $(PNGPATH)/lib/libpng12.a -PNGINC = -I../.. -PNGLIB = -L../.. -lpng -PNGLIBS = ../../libpng.a - -#ZPATH = /usr/local -#ZINC = -I$(ZPATH)/include -#ZLIB = -L$(ZPATH)/lib -lz -#ZLIBS = $(ZPATH)/lib/libz.a -ZINC = -I../../../zlib -ZLIB = -L../../../zlib -lz -ZLIBS = ../../../zlib/libz.a - -CFLAGS=-O3 $(PNGINC) $(ZINC) -LDFLAGS=$(PNGLIB) $(ZLIB) -LDFLAGSS=$(PNGLIBS) $(ZLIBS) -C=.c -O=.o -L=.a -E= - -# dependencies - -#all: png2pnm$(E) pnm2png$(E) -all: png2pnm$(E) pnm2png$(E) png2pnm-static$(E) pnm2png-static$(E) - -png2pnm$(O): png2pnm$(C) - $(CC) -c $(CFLAGS) png2pnm$(C) - -png2pnm$(E): png2pnm$(O) - $(LD) -o png2pnm$(E) png2pnm$(O) $(LDFLAGS) -lm - -png2pnm-static$(E): png2pnm$(O) - $(LD) -o png2pnm-static$(E) png2pnm$(O) $(LDFLAGSS) -lm - -pnm2png$(O): pnm2png$(C) - $(CC) -c $(CFLAGS) pnm2png$(C) - -pnm2png$(E): pnm2png$(O) - $(LD) -o pnm2png$(E) pnm2png$(O) $(LDFLAGS) -lm - -pnm2png-static$(E): pnm2png$(O) - $(LD) -o pnm2png-static$(E) pnm2png$(O) $(LDFLAGSS) -lm - -clean: - $(RM) png2pnm$(O) - $(RM) pnm2png$(O) - $(RM) png2pnm$(E) - $(RM) pnm2png$(E) - $(RM) png2pnm-static$(E) - $(RM) pnm2png-static$(E) - -# End of makefile for png2pnm / pnm2png diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/makefile.tc3 b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/makefile.tc3 deleted file mode 100644 index 404f18d..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/makefile.tc3 +++ /dev/null @@ -1,38 +0,0 @@ -# Makefile for PngMinus (png2pnm and pnm2png) -# TurboC++ 3.0 - -CC=tcc -Ic:\tc3\inc -LD=tcc -Lc:\tc3\lib -LB=tlib -RM=del -CP=copy -MODEL=l -CCFLAGS=-O -m$(MODEL) -I..\libpng -I..\zlib -LDFLAGS=-m$(MODEL) -L..\libpng -L..\zlib -C=.c -O=.obj -L=.lib -E=.exe - -# dependencies - -all: png2pnm$(E) pnm2png$(E) - -png2pnm$(O): png2pnm$(C) - $(CC) -c $(CCFLAGS) png2pnm$(C) - -png2pnm$(E): png2pnm$(O) - $(LD) $(LDFLAGS) png2pnm$(O) libpng$(L) zlib$(L) - -pnm2png$(O): pnm2png$(C) - $(CC) -c $(CCFLAGS) pnm2png$(C) - -pnm2png$(E): pnm2png$(O) - $(LD) $(LDFLAGS) pnm2png$(O) libpng$(L) zlib$(L) - -clean: - $(RM) *$(O) - $(RM) *$(E) - -# End of makefile for png2pnm / pnm2png - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/makevms.com b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/makevms.com deleted file mode 100644 index 00561bc..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/makevms.com +++ /dev/null @@ -1,92 +0,0 @@ -$!------------------------------------------------------------------------------ -$! make Contrib programs of libpng under OpenVMS -$! -$! -$! Look for the compiler used -$! -$ zlibsrc = "[---.zlib]" -$ ccopt="/include=(''zlibsrc',[--])" -$ if f$getsyi("HW_MODEL").ge.1024 -$ then -$ ccopt = "/prefix=all"+ccopt -$ comp = "__decc__=1" -$ if f$trnlnm("SYS").eqs."" then define sys sys$library: -$ else -$ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs."" -$ then -$ if f$trnlnm("SYS").eqs."" then define sys sys$library: -$ if f$search("SYS$SYSTEM:VAXC.EXE").eqs."" -$ then -$ comp = "__gcc__=1" -$ CC :== GCC -$ else -$ comp = "__vaxc__=1" -$ endif -$ else -$ if f$trnlnm("SYS").eqs."" then define sys decc$library_include: -$ ccopt = "/decc/prefix=all"+ccopt -$ comp = "__decc__=1" -$ endif -$ endif -$ open/write lopt lib.opt -$ write lopt "[--]libpng.olb/lib" -$ write lopt "''zlibsrc'libz.olb/lib" -$ close lopt -$ open/write xopt x11.opt -$ write xopt "sys$library:decw$xlibshr.exe/share" -$ close xopt -$ write sys$output "Compiling PNG contrib programs ..." -$ write sys$output "Building pnm2png..." -$ CALL MAKE pnm2png.OBJ "cc ''CCOPT' pnm2png" - - pnm2png.c -$ call make pnm2png.exe - - "LINK pnm2png,lib.opt/opt" - - pnm2png.obj -$ write sys$output "Building png2pnm..." -$ CALL MAKE png2pnm.OBJ "cc ''CCOPT' png2pnm" - - png2pnm.c -$ call make png2pnm.exe - - "LINK png2pnm,lib.opt/opt" - - png2pnm.obj -$ exit -$! -$! -$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES -$ V = 'F$Verify(0) -$! P1 = What we are trying to make -$! P2 = Command to make it -$! P3 - P8 What it depends on -$ -$ If F$Search(P1) .Eqs. "" Then Goto Makeit -$ Time = F$CvTime(F$File(P1,"RDT")) -$arg=3 -$Loop: -$ Argument = P'arg -$ If Argument .Eqs. "" Then Goto Exit -$ El=0 -$Loop2: -$ File = F$Element(El," ",Argument) -$ If File .Eqs. " " Then Goto Endl -$ AFile = "" -$Loop3: -$ OFile = AFile -$ AFile = F$Search(File) -$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl -$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit -$ Goto Loop3 -$NextEL: -$ El = El + 1 -$ Goto Loop2 -$EndL: -$ arg=arg+1 -$ If arg .Le. 8 Then Goto Loop -$ Goto Exit -$ -$Makeit: -$ VV=F$VERIFY(0) -$ write sys$output P2 -$ 'P2 -$ VV='F$Verify(VV) -$Exit: -$ If V Then Set Verify -$ENDSUBROUTINE diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/png2pnm.bat b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/png2pnm.bat deleted file mode 100644 index 449cf36..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/png2pnm.bat +++ /dev/null @@ -1,41 +0,0 @@ -REM -- grayscale -png2pnm.exe -noraw ..\pngsuite\basn0g01.png basn0g01.pgm -png2pnm.exe -noraw ..\pngsuite\basn0g02.png basn0g02.pgm -png2pnm.exe -noraw ..\pngsuite\basn0g04.png basn0g04.pgm -png2pnm.exe -noraw ..\pngsuite\basn0g08.png basn0g08.pgm -png2pnm.exe -noraw ..\pngsuite\basn0g16.png basn0g16.pgm -REM -- full-color -png2pnm.exe -noraw ..\pngsuite\basn2c08.png basn2c08.ppm -png2pnm.exe -noraw ..\pngsuite\basn2c16.png basn2c16.ppm -REM -- palletted -png2pnm.exe -noraw ..\pngsuite\basn3p01.png basn3p01.ppm -png2pnm.exe -noraw ..\pngsuite\basn3p02.png basn3p02.ppm -png2pnm.exe -noraw ..\pngsuite\basn3p04.png basn3p04.ppm -png2pnm.exe -noraw ..\pngsuite\basn3p08.png basn3p08.ppm -REM -- gray with alpha-channel -png2pnm.exe -noraw ..\pngsuite\basn4a08.png basn4a08.pgm -png2pnm.exe -noraw ..\pngsuite\basn4a16.png basn4a16.pgm -REM -- color with alpha-channel -png2pnm.exe -noraw -alpha basn6a08.pgm ..\pngsuite\basn6a08.png basn6a08.ppm -png2pnm.exe -noraw -alpha basn6a16.pgm ..\pngsuite\basn6a16.png basn6a16.ppm -REM -- grayscale -png2pnm.exe -raw ..\pngsuite\basn0g01.png rawn0g01.pgm -png2pnm.exe -raw ..\pngsuite\basn0g02.png rawn0g02.pgm -png2pnm.exe -raw ..\pngsuite\basn0g04.png rawn0g04.pgm -png2pnm.exe -raw ..\pngsuite\basn0g08.png rawn0g08.pgm -png2pnm.exe -raw ..\pngsuite\basn0g16.png rawn0g16.pgm -REM -- full-color -png2pnm.exe -raw ..\pngsuite\basn2c08.png rawn2c08.ppm -png2pnm.exe -raw ..\pngsuite\basn2c16.png rawn2c16.ppm -REM -- palletted -png2pnm.exe -raw ..\pngsuite\basn3p01.png rawn3p01.ppm -png2pnm.exe -raw ..\pngsuite\basn3p02.png rawn3p02.ppm -png2pnm.exe -raw ..\pngsuite\basn3p04.png rawn3p04.ppm -png2pnm.exe -raw ..\pngsuite\basn3p08.png rawn3p08.ppm -REM -- gray with alpha-channel -png2pnm.exe -raw ..\pngsuite\basn4a08.png rawn4a08.pgm -png2pnm.exe -raw ..\pngsuite\basn4a16.png rawn4a16.pgm -REM -- color with alpha-channel -png2pnm.exe -noraw -alpha rawn6a08.pgm ..\pngsuite\basn6a08.png rawn6a08.ppm -png2pnm.exe -noraw -alpha rawn6a16.pgm ..\pngsuite\basn6a16.png rawn6a16.ppm - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/png2pnm.c b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/png2pnm.c deleted file mode 100644 index 010870a..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/png2pnm.c +++ /dev/null @@ -1,430 +0,0 @@ -/* - * png2pnm.c --- conversion from PNG-file to PGM/PPM-file - * copyright (C) 1999 by Willem van Schaik - * - * version 1.0 - 1999.10.15 - First version. - * - * Permission to use, copy, modify, and distribute this software and - * its documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear in - * supporting documentation. This software is provided "as is" without - * express or implied warranty. - */ - -#include -#include -#ifdef __TURBOC__ -#include -#include -#endif - -#ifndef BOOL -#define BOOL unsigned char -#endif -#ifndef TRUE -#define TRUE (BOOL) 1 -#endif -#ifndef FALSE -#define FALSE (BOOL) 0 -#endif - -#ifdef __TURBOC__ -#define STDIN 0 -#define STDOUT 1 -#define STDERR 2 -#endif - -/* to make png2pnm verbose so we can find problems (needs to be before png.h) */ -#ifndef PNG_DEBUG -#define PNG_DEBUG 0 -#endif - -#include "png.h" - -/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */ -#ifndef png_jmpbuf -# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) -#endif - -/* function prototypes */ - -int main (int argc, char *argv[]); -void usage (); -BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL alpha); - -/* - * main - */ - -int main(int argc, char *argv[]) -{ - FILE *fp_rd = stdin; - FILE *fp_wr = stdout; - FILE *fp_al = NULL; - BOOL raw = TRUE; - BOOL alpha = FALSE; - int argi; - - for (argi = 1; argi < argc; argi++) - { - if (argv[argi][0] == '-') - { - switch (argv[argi][1]) - { - case 'n': - raw = FALSE; - break; - case 'r': - raw = TRUE; - break; - case 'a': - alpha = TRUE; - argi++; - if ((fp_al = fopen (argv[argi], "wb")) == NULL) - { - fprintf (stderr, "PNM2PNG\n"); - fprintf (stderr, "Error: can not create alpha-channel file %s\n", argv[argi]); - exit (1); - } - break; - case 'h': - case '?': - usage(); - exit(0); - break; - default: - fprintf (stderr, "PNG2PNM\n"); - fprintf (stderr, "Error: unknown option %s\n", argv[argi]); - usage(); - exit(1); - break; - } /* end switch */ - } - else if (fp_rd == stdin) - { - if ((fp_rd = fopen (argv[argi], "rb")) == NULL) - { - fprintf (stderr, "PNG2PNM\n"); - fprintf (stderr, "Error: file %s does not exist\n", argv[argi]); - exit (1); - } - } - else if (fp_wr == stdout) - { - if ((fp_wr = fopen (argv[argi], "wb")) == NULL) - { - fprintf (stderr, "PNG2PNM\n"); - fprintf (stderr, "Error: can not create file %s\n", argv[argi]); - exit (1); - } - } - else - { - fprintf (stderr, "PNG2PNM\n"); - fprintf (stderr, "Error: too many parameters\n"); - usage(); - exit(1); - } - } /* end for */ - -#ifdef __TURBOC__ - /* set stdin/stdout if required to binary */ - if (fp_rd == stdin) - { - setmode (STDIN, O_BINARY); - } - if ((raw) && (fp_wr == stdout)) - { - setmode (STDOUT, O_BINARY); - } -#endif - - /* call the conversion program itself */ - if (png2pnm (fp_rd, fp_wr, fp_al, raw, alpha) == FALSE) - { - fprintf (stderr, "PNG2PNM\n"); - fprintf (stderr, "Error: unsuccessful convertion of PNG-image\n"); - exit(1); - } - - /* close input file */ - fclose (fp_rd); - /* close output file */ - fclose (fp_wr); - /* close alpha file */ - if (alpha) - fclose (fp_al); - - return 0; -} - -/* - * usage - */ - -void usage() -{ - fprintf (stderr, "PNG2PNM\n"); - fprintf (stderr, " by Willem van Schaik, 1999\n"); -#ifdef __TURBOC__ - fprintf (stderr, " for Turbo-C and Borland-C compilers\n"); -#else - fprintf (stderr, " for Linux (and Unix) compilers\n"); -#endif - fprintf (stderr, "Usage: png2pnm [options] .png [.pnm]\n"); - fprintf (stderr, " or: ... | png2pnm [options]\n"); - fprintf (stderr, "Options:\n"); - fprintf (stderr, " -r[aw] write pnm-file in binary format (P4/P5/P6) (default)\n"); - fprintf (stderr, " -n[oraw] write pnm-file in ascii format (P1/P2/P3)\n"); - fprintf (stderr, " -a[lpha] .pgm write PNG alpha channel as pgm-file\n"); - fprintf (stderr, " -h | -? print this help-information\n"); -} - -/* - * png2pnm - */ - -BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file, BOOL raw, BOOL alpha) -{ - png_struct *png_ptr = NULL; - png_info *info_ptr = NULL; - png_byte buf[8]; - png_byte *png_pixels = NULL; - png_byte **row_pointers = NULL; - png_byte *pix_ptr = NULL; - png_uint_32 row_bytes; - - png_uint_32 width; - png_uint_32 height; - int bit_depth; - int channels; - int color_type; - int alpha_present; - int row, col; - int ret; - int i; - long dep_16; - - /* read and check signature in PNG file */ - ret = fread (buf, 1, 8, png_file); - if (ret != 8) - return FALSE; - - ret = png_check_sig (buf, 8); - if (!ret) - return FALSE; - - /* create png and info structures */ - - png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, - NULL, NULL, NULL); - if (!png_ptr) - return FALSE; /* out of memory */ - - info_ptr = png_create_info_struct (png_ptr); - if (!info_ptr) - { - png_destroy_read_struct (&png_ptr, NULL, NULL); - return FALSE; /* out of memory */ - } - - if (setjmp (png_jmpbuf(png_ptr))) - { - png_destroy_read_struct (&png_ptr, &info_ptr, NULL); - return FALSE; - } - - /* set up the input control for C streams */ - png_init_io (png_ptr, png_file); - png_set_sig_bytes (png_ptr, 8); /* we already read the 8 signature bytes */ - - /* read the file information */ - png_read_info (png_ptr, info_ptr); - - /* get size and bit-depth of the PNG-image */ - png_get_IHDR (png_ptr, info_ptr, - &width, &height, &bit_depth, &color_type, - NULL, NULL, NULL); - - /* set-up the transformations */ - - /* transform paletted images into full-color rgb */ - if (color_type == PNG_COLOR_TYPE_PALETTE) - png_set_expand (png_ptr); - /* expand images to bit-depth 8 (only applicable for grayscale images) */ - if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) - png_set_expand (png_ptr); - /* transform transparency maps into full alpha-channel */ - if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) - png_set_expand (png_ptr); - -#ifdef NJET - /* downgrade 16-bit images to 8 bit */ - if (bit_depth == 16) - png_set_strip_16 (png_ptr); - /* transform grayscale images into full-color */ - if (color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - png_set_gray_to_rgb (png_ptr); - /* only if file has a file gamma, we do a correction */ - if (png_get_gAMA (png_ptr, info_ptr, &file_gamma)) - png_set_gamma (png_ptr, (double) 2.2, file_gamma); -#endif - - /* all transformations have been registered; now update info_ptr data, - * get rowbytes and channels, and allocate image memory */ - - png_read_update_info (png_ptr, info_ptr); - - /* get the new color-type and bit-depth (after expansion/stripping) */ - png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - NULL, NULL, NULL); - - /* check for 16-bit files */ - if (bit_depth == 16) - { - raw = FALSE; -#ifdef __TURBOC__ - pnm_file->flags &= ~((unsigned) _F_BIN); -#endif - } - - /* calculate new number of channels and store alpha-presence */ - if (color_type == PNG_COLOR_TYPE_GRAY) - channels = 1; - else if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - channels = 2; - else if (color_type == PNG_COLOR_TYPE_RGB) - channels = 3; - else if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) - channels = 4; - else - channels = 0; /* should never happen */ - alpha_present = (channels - 1) % 2; - - /* check if alpha is expected to be present in file */ - if (alpha && !alpha_present) - { - fprintf (stderr, "PNG2PNM\n"); - fprintf (stderr, "Error: PNG-file doesn't contain alpha channel\n"); - exit (1); - } - - /* row_bytes is the width x number of channels x (bit-depth / 8) */ - row_bytes = png_get_rowbytes (png_ptr, info_ptr); - - if ((png_pixels = (png_byte *) malloc (row_bytes * height * sizeof (png_byte))) == NULL) { - png_destroy_read_struct (&png_ptr, &info_ptr, NULL); - return FALSE; - } - - if ((row_pointers = (png_byte **) malloc (height * sizeof (png_bytep))) == NULL) - { - png_destroy_read_struct (&png_ptr, &info_ptr, NULL); - free (png_pixels); - png_pixels = NULL; - return FALSE; - } - - /* set the individual row_pointers to point at the correct offsets */ - for (i = 0; i < (height); i++) - row_pointers[i] = png_pixels + i * row_bytes; - - /* now we can go ahead and just read the whole image */ - png_read_image (png_ptr, row_pointers); - - /* read rest of file, and get additional chunks in info_ptr - REQUIRED */ - png_read_end (png_ptr, info_ptr); - - /* clean up after the read, and free any memory allocated - REQUIRED */ - png_destroy_read_struct (&png_ptr, &info_ptr, (png_infopp) NULL); - - /* write header of PNM file */ - - if ((color_type == PNG_COLOR_TYPE_GRAY) || - (color_type == PNG_COLOR_TYPE_GRAY_ALPHA)) - { - fprintf (pnm_file, "%s\n", (raw) ? "P5" : "P2"); - fprintf (pnm_file, "%d %d\n", (int) width, (int) height); - fprintf (pnm_file, "%ld\n", ((1L << (int) bit_depth) - 1L)); - } - else if ((color_type == PNG_COLOR_TYPE_RGB) || - (color_type == PNG_COLOR_TYPE_RGB_ALPHA)) - { - fprintf (pnm_file, "%s\n", (raw) ? "P6" : "P3"); - fprintf (pnm_file, "%d %d\n", (int) width, (int) height); - fprintf (pnm_file, "%ld\n", ((1L << (int) bit_depth) - 1L)); - } - - /* write header of PGM file with alpha channel */ - - if ((alpha) && - ((color_type == PNG_COLOR_TYPE_GRAY_ALPHA) || - (color_type == PNG_COLOR_TYPE_RGB_ALPHA))) - { - fprintf (alpha_file, "%s\n", (raw) ? "P5" : "P2"); - fprintf (alpha_file, "%d %d\n", (int) width, (int) height); - fprintf (alpha_file, "%ld\n", ((1L << (int) bit_depth) - 1L)); - } - - /* write data to PNM file */ - pix_ptr = png_pixels; - - for (row = 0; row < height; row++) - { - for (col = 0; col < width; col++) - { - for (i = 0; i < (channels - alpha_present); i++) - { - if (raw) - fputc ((int) *pix_ptr++ , pnm_file); - else - if (bit_depth == 16){ - dep_16 = (long) *pix_ptr++; - fprintf (pnm_file, "%ld ", (dep_16 << 8) + ((long) *pix_ptr++)); - } - else - fprintf (pnm_file, "%ld ", (long) *pix_ptr++); - } - if (alpha_present) - { - if (!alpha) - { - pix_ptr++; /* alpha */ - if (bit_depth == 16) - pix_ptr++; - } - else /* output alpha-channel as pgm file */ - { - if (raw) - fputc ((int) *pix_ptr++ , alpha_file); - else - if (bit_depth == 16){ - dep_16 = (long) *pix_ptr++; - fprintf (alpha_file, "%ld ", (dep_16 << 8) + (long) *pix_ptr++); - } - else - fprintf (alpha_file, "%ld ", (long) *pix_ptr++); - } - } /* if alpha_present */ - - if (!raw) - if (col % 4 == 3) - fprintf (pnm_file, "\n"); - } /* end for col */ - - if (!raw) - if (col % 4 != 0) - fprintf (pnm_file, "\n"); - } /* end for row */ - - if (row_pointers != (unsigned char**) NULL) - free (row_pointers); - if (png_pixels != (unsigned char*) NULL) - free (png_pixels); - - return TRUE; - -} /* end of source */ - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/png2pnm.sh b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/png2pnm.sh deleted file mode 100644 index 854313b..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/png2pnm.sh +++ /dev/null @@ -1,41 +0,0 @@ -# -- grayscale -./png2pnm -noraw ../pngsuite/basn0g01.png basn0g01.pgm -./png2pnm -noraw ../pngsuite/basn0g02.png basn0g02.pgm -./png2pnm -noraw ../pngsuite/basn0g04.png basn0g04.pgm -./png2pnm -noraw ../pngsuite/basn0g08.png basn0g08.pgm -./png2pnm -noraw ../pngsuite/basn0g16.png basn0g16.pgm -# -- full-color -./png2pnm -noraw ../pngsuite/basn2c08.png basn2c08.ppm -./png2pnm -noraw ../pngsuite/basn2c16.png basn2c16.ppm -# -- palletted -./png2pnm -noraw ../pngsuite/basn3p01.png basn3p01.ppm -./png2pnm -noraw ../pngsuite/basn3p02.png basn3p02.ppm -./png2pnm -noraw ../pngsuite/basn3p04.png basn3p04.ppm -./png2pnm -noraw ../pngsuite/basn3p08.png basn3p08.ppm -# -- gray with alpha-channel -./png2pnm -noraw ../pngsuite/basn4a08.png basn4a08.pgm -./png2pnm -noraw ../pngsuite/basn4a16.png basn4a16.pgm -# -- color with alpha-channel -./png2pnm -noraw -alpha basn6a08.pgm ../pngsuite/basn6a08.png basn6a08.ppm -./png2pnm -noraw -alpha basn6a16.pgm ../pngsuite/basn6a16.png basn6a16.ppm -# -- grayscale -./png2pnm -raw ../pngsuite/basn0g01.png rawn0g01.pgm -./png2pnm -raw ../pngsuite/basn0g02.png rawn0g02.pgm -./png2pnm -raw ../pngsuite/basn0g04.png rawn0g04.pgm -./png2pnm -raw ../pngsuite/basn0g08.png rawn0g08.pgm -./png2pnm -raw ../pngsuite/basn0g16.png rawn0g16.pgm -# -- full-color -./png2pnm -raw ../pngsuite/basn2c08.png rawn2c08.ppm -./png2pnm -raw ../pngsuite/basn2c16.png rawn2c16.ppm -# -- palletted -./png2pnm -raw ../pngsuite/basn3p01.png rawn3p01.ppm -./png2pnm -raw ../pngsuite/basn3p02.png rawn3p02.ppm -./png2pnm -raw ../pngsuite/basn3p04.png rawn3p04.ppm -./png2pnm -raw ../pngsuite/basn3p08.png rawn3p08.ppm -# -- gray with alpha-channel -./png2pnm -raw ../pngsuite/basn4a08.png rawn4a08.pgm -./png2pnm -raw ../pngsuite/basn4a16.png rawn4a16.pgm -# -- color with alpha-channel -./png2pnm -noraw -alpha rawn6a08.pgm ../pngsuite/basn6a08.png rawn6a08.ppm -./png2pnm -noraw -alpha rawn6a16.pgm ../pngsuite/basn6a16.png rawn6a16.ppm - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pngminus.bat b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pngminus.bat deleted file mode 100644 index 911bb8d..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pngminus.bat +++ /dev/null @@ -1,4 +0,0 @@ -make -f makefile.tc3 -call png2pnm.bat -call pnm2png.bat - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pngminus.sh b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pngminus.sh deleted file mode 100644 index 6b2d8c5..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pngminus.sh +++ /dev/null @@ -1,4 +0,0 @@ -make -f makefile.std -sh png2pnm.sh -sh pnm2png.sh - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pnm2png.bat b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pnm2png.bat deleted file mode 100644 index f756cb8..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pnm2png.bat +++ /dev/null @@ -1,41 +0,0 @@ -REM -- grayscale -pnm2png.exe basn0g01.pgm basn0g01.png -pnm2png.exe basn0g02.pgm basn0g02.png -pnm2png.exe basn0g04.pgm basn0g04.png -pnm2png.exe basn0g08.pgm basn0g08.png -pnm2png.exe basn0g16.pgm basn0g16.png -REM -- full-color -pnm2png.exe basn2c08.ppm basn2c08.png -pnm2png.exe basn2c16.ppm basn2c16.png -REM -- palletted -pnm2png.exe basn3p01.ppm basn3p01.png -pnm2png.exe basn3p02.ppm basn3p02.png -pnm2png.exe basn3p04.ppm basn3p04.png -pnm2png.exe basn3p08.ppm basn3p08.png -REM -- gray with alpha-channel -pnm2png.exe -alpha basn6a08.pgm basn4a08.pgm basn4a08.png -pnm2png.exe -alpha basn6a16.pgm basn4a16.pgm basn4a16.png -REM -- color with alpha-channel -pnm2png.exe -alpha basn6a08.pgm basn6a08.ppm basn6a08.png -pnm2png.exe -alpha basn6a16.pgm basn6a16.ppm basn6a16.png -REM -- grayscale -pnm2png.exe rawn0g01.pgm rawn0g01.png -pnm2png.exe rawn0g02.pgm rawn0g02.png -pnm2png.exe rawn0g04.pgm rawn0g04.png -pnm2png.exe rawn0g08.pgm rawn0g08.png -pnm2png.exe rawn0g16.pgm rawn0g16.png -REM -- full-color -pnm2png.exe rawn2c08.ppm rawn2c08.png -pnm2png.exe rawn2c16.ppm rawn2c16.png -REM -- palletted -pnm2png.exe rawn3p01.ppm rawn3p01.png -pnm2png.exe rawn3p02.ppm rawn3p02.png -pnm2png.exe rawn3p04.ppm rawn3p04.png -pnm2png.exe rawn3p08.ppm rawn3p08.png -REM -- gray with alpha-channel -pnm2png.exe -alpha rawn6a08.pgm rawn4a08.pgm rawn4a08.png -pnm2png.exe -alpha rawn6a16.pgm rawn4a16.pgm rawn4a16.png -REM -- color with alpha-channel -pnm2png.exe -alpha rawn6a08.pgm rawn6a08.ppm rawn6a08.png -pnm2png.exe -alpha rawn6a16.pgm rawn6a16.ppm rawn6a16.png - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pnm2png.c b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pnm2png.c deleted file mode 100644 index 4cdfad8..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pnm2png.c +++ /dev/null @@ -1,533 +0,0 @@ -/* - * pnm2png.c --- conversion from PBM/PGM/PPM-file to PNG-file - * copyright (C) 1999 by Willem van Schaik - * - * version 1.0 - 1999.10.15 - First version. - * - * Permission to use, copy, modify, and distribute this software and - * its documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear in - * supporting documentation. This software is provided "as is" without - * express or implied warranty. - */ - -#include -#include -#ifdef __TURBOC__ -#include -#include -#endif - -#ifndef BOOL -#define BOOL unsigned char -#endif -#ifndef TRUE -#define TRUE (BOOL) 1 -#endif -#ifndef FALSE -#define FALSE (BOOL) 0 -#endif - -#define STDIN 0 -#define STDOUT 1 -#define STDERR 2 - -/* to make pnm2png verbose so we can find problems (needs to be before png.h) */ -#ifndef PNG_DEBUG -#define PNG_DEBUG 0 -#endif - -#include "png.h" - -/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */ -#ifndef png_jmpbuf -# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) -#endif - -/* function prototypes */ - -int main (int argc, char *argv[]); -void usage (); -BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace, BOOL alpha); -void get_token(FILE *pnm_file, char *token); -png_uint_32 get_data (FILE *pnm_file, int depth); -png_uint_32 get_value (FILE *pnm_file, int depth); - -/* - * main - */ - -int main(int argc, char *argv[]) -{ - FILE *fp_rd = stdin; - FILE *fp_al = NULL; - FILE *fp_wr = stdout; - BOOL interlace = FALSE; - BOOL alpha = FALSE; - int argi; - - for (argi = 1; argi < argc; argi++) - { - if (argv[argi][0] == '-') - { - switch (argv[argi][1]) - { - case 'i': - interlace = TRUE; - break; - case 'a': - alpha = TRUE; - argi++; - if ((fp_al = fopen (argv[argi], "rb")) == NULL) - { - fprintf (stderr, "PNM2PNG\n"); - fprintf (stderr, "Error: alpha-channel file %s does not exist\n", - argv[argi]); - exit (1); - } - break; - case 'h': - case '?': - usage(); - exit(0); - break; - default: - fprintf (stderr, "PNM2PNG\n"); - fprintf (stderr, "Error: unknown option %s\n", argv[argi]); - usage(); - exit(1); - break; - } /* end switch */ - } - else if (fp_rd == stdin) - { - if ((fp_rd = fopen (argv[argi], "rb")) == NULL) - { - fprintf (stderr, "PNM2PNG\n"); - fprintf (stderr, "Error: file %s does not exist\n", argv[argi]); - exit (1); - } - } - else if (fp_wr == stdout) - { - if ((fp_wr = fopen (argv[argi], "wb")) == NULL) - { - fprintf (stderr, "PNM2PNG\n"); - fprintf (stderr, "Error: can not create PNG-file %s\n", argv[argi]); - exit (1); - } - } - else - { - fprintf (stderr, "PNM2PNG\n"); - fprintf (stderr, "Error: too many parameters\n"); - usage(); - exit (1); - } - } /* end for */ - -#ifdef __TURBOC__ - /* set stdin/stdout to binary, we're reading the PNM always! in binary format */ - if (fp_rd == stdin) - { - setmode (STDIN, O_BINARY); - } - if (fp_wr == stdout) - { - setmode (STDOUT, O_BINARY); - } -#endif - - /* call the conversion program itself */ - if (pnm2png (fp_rd, fp_wr, fp_al, interlace, alpha) == FALSE) - { - fprintf (stderr, "PNM2PNG\n"); - fprintf (stderr, "Error: unsuccessful converting to PNG-image\n"); - exit (1); - } - - /* close input file */ - fclose (fp_rd); - /* close output file */ - fclose (fp_wr); - /* close alpha file */ - if (alpha) - fclose (fp_al); - - return 0; -} - -/* - * usage - */ - -void usage() -{ - fprintf (stderr, "PNM2PNG\n"); - fprintf (stderr, " by Willem van Schaik, 1999\n"); -#ifdef __TURBOC__ - fprintf (stderr, " for Turbo-C and Borland-C compilers\n"); -#else - fprintf (stderr, " for Linux (and Unix) compilers\n"); -#endif - fprintf (stderr, "Usage: pnm2png [options] . [.png]\n"); - fprintf (stderr, " or: ... | pnm2png [options]\n"); - fprintf (stderr, "Options:\n"); - fprintf (stderr, " -i[nterlace] write png-file with interlacing on\n"); - fprintf (stderr, " -a[lpha] .pgm read PNG alpha channel as pgm-file\n"); - fprintf (stderr, " -h | -? print this help-information\n"); -} - -/* - * pnm2png - */ - -BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace, BOOL alpha) -{ - png_struct *png_ptr = NULL; - png_info *info_ptr = NULL; - png_byte *png_pixels = NULL; - png_byte **row_pointers = NULL; - png_byte *pix_ptr = NULL; - png_uint_32 row_bytes; - - char type_token[16]; - char width_token[16]; - char height_token[16]; - char maxval_token[16]; - int color_type; - png_uint_32 width, alpha_width; - png_uint_32 height, alpha_height; - png_uint_32 maxval; - int bit_depth = 0; - int channels; - int alpha_depth = 0; - int alpha_present; - int row, col; - BOOL raw, alpha_raw = FALSE; - png_uint_32 tmp16; - int i; - - /* read header of PNM file */ - - get_token(pnm_file, type_token); - if (type_token[0] != 'P') - { - return FALSE; - } - else if ((type_token[1] == '1') || (type_token[1] == '4')) - { - raw = (type_token[1] == '4'); - color_type = PNG_COLOR_TYPE_GRAY; - bit_depth = 1; - } - else if ((type_token[1] == '2') || (type_token[1] == '5')) - { - raw = (type_token[1] == '5'); - color_type = PNG_COLOR_TYPE_GRAY; - get_token(pnm_file, width_token); - sscanf (width_token, "%lu", &width); - get_token(pnm_file, height_token); - sscanf (height_token, "%lu", &height); - get_token(pnm_file, maxval_token); - sscanf (maxval_token, "%lu", &maxval); - if (maxval <= 1) - bit_depth = 1; - else if (maxval <= 3) - bit_depth = 2; - else if (maxval <= 15) - bit_depth = 4; - else if (maxval <= 255) - bit_depth = 8; - else /* if (maxval <= 65535) */ - bit_depth = 16; - } - else if ((type_token[1] == '3') || (type_token[1] == '6')) - { - raw = (type_token[1] == '6'); - color_type = PNG_COLOR_TYPE_RGB; - get_token(pnm_file, width_token); - sscanf (width_token, "%lu", &width); - get_token(pnm_file, height_token); - sscanf (height_token, "%lu", &height); - get_token(pnm_file, maxval_token); - sscanf (maxval_token, "%lu", &maxval); - if (maxval <= 1) - bit_depth = 1; - else if (maxval <= 3) - bit_depth = 2; - else if (maxval <= 15) - bit_depth = 4; - else if (maxval <= 255) - bit_depth = 8; - else /* if (maxval <= 65535) */ - bit_depth = 16; - } - else - { - return FALSE; - } - - /* read header of PGM file with alpha channel */ - - if (alpha) - { - if (color_type == PNG_COLOR_TYPE_GRAY) - color_type = PNG_COLOR_TYPE_GRAY_ALPHA; - if (color_type == PNG_COLOR_TYPE_RGB) - color_type = PNG_COLOR_TYPE_RGB_ALPHA; - - get_token(alpha_file, type_token); - if (type_token[0] != 'P') - { - return FALSE; - } - else if ((type_token[1] == '2') || (type_token[1] == '5')) - { - alpha_raw = (type_token[1] == '5'); - get_token(alpha_file, width_token); - sscanf (width_token, "%lu", &alpha_width); - if (alpha_width != width) - return FALSE; - get_token(alpha_file, height_token); - sscanf (height_token, "%lu", &alpha_height); - if (alpha_height != height) - return FALSE; - get_token(alpha_file, maxval_token); - sscanf (maxval_token, "%lu", &maxval); - if (maxval <= 1) - alpha_depth = 1; - else if (maxval <= 3) - alpha_depth = 2; - else if (maxval <= 15) - alpha_depth = 4; - else if (maxval <= 255) - alpha_depth = 8; - else /* if (maxval <= 65535) */ - alpha_depth = 16; - if (alpha_depth != bit_depth) - return FALSE; - } - else - { - return FALSE; - } - } /* end if alpha */ - - /* calculate the number of channels and store alpha-presence */ - if (color_type == PNG_COLOR_TYPE_GRAY) - channels = 1; - else if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - channels = 2; - else if (color_type == PNG_COLOR_TYPE_RGB) - channels = 3; - else if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) - channels = 4; - else - channels = 0; /* should not happen */ - - alpha_present = (channels - 1) % 2; - - /* row_bytes is the width x number of channels x (bit-depth / 8) */ - row_bytes = width * channels * ((bit_depth <= 8) ? 1 : 2); - - if ((png_pixels = (png_byte *) malloc (row_bytes * height * sizeof (png_byte))) == NULL) - return FALSE; - - /* read data from PNM file */ - pix_ptr = png_pixels; - - for (row = 0; row < height; row++) - { - for (col = 0; col < width; col++) - { - for (i = 0; i < (channels - alpha_present); i++) - { - if (raw) - *pix_ptr++ = get_data (pnm_file, bit_depth); - else - if (bit_depth <= 8) - *pix_ptr++ = get_value (pnm_file, bit_depth); - else - { - tmp16 = get_value (pnm_file, bit_depth); - *pix_ptr = (png_byte) ((tmp16 >> 8) & 0xFF); - pix_ptr++; - *pix_ptr = (png_byte) (tmp16 & 0xFF); - pix_ptr++; - } - } - - if (alpha) /* read alpha-channel from pgm file */ - { - if (alpha_raw) - *pix_ptr++ = get_data (alpha_file, alpha_depth); - else - if (alpha_depth <= 8) - *pix_ptr++ = get_value (alpha_file, bit_depth); - else - { - tmp16 = get_value (alpha_file, bit_depth); - *pix_ptr++ = (png_byte) ((tmp16 >> 8) & 0xFF); - *pix_ptr++ = (png_byte) (tmp16 & 0xFF); - } - } /* if alpha */ - - } /* end for col */ - } /* end for row */ - - /* prepare the standard PNG structures */ - png_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); - if (!png_ptr) - { - return FALSE; - } - info_ptr = png_create_info_struct (png_ptr); - if (!info_ptr) - { - png_destroy_write_struct (&png_ptr, (png_infopp) NULL); - return FALSE; - } - - /* setjmp() must be called in every function that calls a PNG-reading libpng function */ - if (setjmp (png_jmpbuf(png_ptr))) - { - png_destroy_write_struct (&png_ptr, (png_infopp) NULL); - return FALSE; - } - - /* initialize the png structure */ - png_init_io (png_ptr, png_file); - - /* we're going to write more or less the same PNG as the input file */ - png_set_IHDR (png_ptr, info_ptr, width, height, bit_depth, color_type, - (!interlace) ? PNG_INTERLACE_NONE : PNG_INTERLACE_ADAM7, - PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); - - /* write the file header information */ - png_write_info (png_ptr, info_ptr); - - /* if needed we will allocate memory for an new array of row-pointers */ - if (row_pointers == (unsigned char**) NULL) - { - if ((row_pointers = (png_byte **) malloc (height * sizeof (png_bytep))) == NULL) - { - png_destroy_write_struct (&png_ptr, (png_infopp) NULL); - return FALSE; - } - } - - /* set the individual row_pointers to point at the correct offsets */ - for (i = 0; i < (height); i++) - row_pointers[i] = png_pixels + i * row_bytes; - - /* write out the entire image data in one call */ - png_write_image (png_ptr, row_pointers); - - /* write the additional chuncks to the PNG file (not really needed) */ - png_write_end (png_ptr, info_ptr); - - /* clean up after the write, and free any memory allocated */ - png_destroy_write_struct (&png_ptr, (png_infopp) NULL); - - if (row_pointers != (unsigned char**) NULL) - free (row_pointers); - if (png_pixels != (unsigned char*) NULL) - free (png_pixels); - - return TRUE; -} /* end of pnm2png */ - -/* - * get_token() - gets the first string after whitespace - */ - -void get_token(FILE *pnm_file, char *token) -{ - int i = 0; - - /* remove white-space */ - do - { - token[i] = (unsigned char) fgetc (pnm_file); - } - while ((token[i] == '\n') || (token[i] == '\r') || (token[i] == ' ')); - - /* read string */ - do - { - i++; - token[i] = (unsigned char) fgetc (pnm_file); - } - while ((token[i] != '\n') && (token[i] != '\r') && (token[i] != ' ')); - - token[i] = '\0'; - - return; -} - -/* - * get_data() - takes first byte and converts into next pixel value, - * taking as much bits as defined by bit-depth and - * using the bit-depth to fill up a byte (0Ah -> AAh) - */ - -png_uint_32 get_data (FILE *pnm_file, int depth) -{ - static int bits_left = 0; - static int old_value = 0; - static int mask = 0; - int i; - png_uint_32 ret_value; - - if (mask == 0) - for (i = 0; i < depth; i++) - mask = (mask >> 1) | 0x80; - - if (bits_left <= 0) - { - old_value = fgetc (pnm_file); - bits_left = 8; - } - - ret_value = old_value & mask; - for (i = 1; i < (8 / depth); i++) - ret_value = ret_value || (ret_value >> depth); - - old_value = (old_value << depth) & 0xFF; - bits_left -= depth; - - return ret_value; -} - -/* - * get_value() - takes first (numeric) string and converts into number, - * using the bit-depth to fill up a byte (0Ah -> AAh) - */ - -png_uint_32 get_value (FILE *pnm_file, int depth) -{ - static png_uint_32 mask = 0; - png_byte token[16]; - png_uint_32 ret_value; - int i = 0; - - if (mask == 0) - for (i = 0; i < depth; i++) - mask = (mask << 1) | 0x01; - - get_token (pnm_file, (char *) token); - sscanf ((const char *) token, "%lu", &ret_value); - - ret_value &= mask; - - if (depth < 8) - for (i = 0; i < (8 / depth); i++) - ret_value = (ret_value << depth) || ret_value; - - return ret_value; -} - -/* end of source */ - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pnm2png.sh b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pnm2png.sh deleted file mode 100644 index 5afda9f..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngminus/pnm2png.sh +++ /dev/null @@ -1,41 +0,0 @@ -# -- grayscale -./pnm2png basn0g01.pgm basn0g01.png -./pnm2png basn0g02.pgm basn0g02.png -./pnm2png basn0g04.pgm basn0g04.png -./pnm2png basn0g08.pgm basn0g08.png -./pnm2png basn0g16.pgm basn0g16.png -# -- full-color -./pnm2png basn2c08.ppm basn2c08.png -./pnm2png basn2c16.ppm basn2c16.png -# -- palletted -./pnm2png basn3p01.ppm basn3p01.png -./pnm2png basn3p02.ppm basn3p02.png -./pnm2png basn3p04.ppm basn3p04.png -./pnm2png basn3p08.ppm basn3p08.png -# -- gray with alpha-channel -./pnm2png -alpha basn6a08.pgm basn4a08.pgm basn4a08.png -./pnm2png -alpha basn6a16.pgm basn4a16.pgm basn4a16.png -# -- color with alpha-channel -./pnm2png -alpha basn6a08.pgm basn6a08.ppm basn6a08.png -./pnm2png -alpha basn6a16.pgm basn6a16.ppm basn6a16.png -# -- grayscale -./pnm2png rawn0g01.pgm rawn0g01.png -./pnm2png rawn0g02.pgm rawn0g02.png -./pnm2png rawn0g04.pgm rawn0g04.png -./pnm2png rawn0g08.pgm rawn0g08.png -./pnm2png rawn0g16.pgm rawn0g16.png -# -- full-color -./pnm2png rawn2c08.ppm rawn2c08.png -./pnm2png rawn2c16.ppm rawn2c16.png -# -- palletted -./pnm2png rawn3p01.ppm rawn3p01.png -./pnm2png rawn3p02.ppm rawn3p02.png -./pnm2png rawn3p04.ppm rawn3p04.png -./pnm2png rawn3p08.ppm rawn3p08.png -# -- gray with alpha-channel -./pnm2png -alpha rawn6a08.pgm rawn4a08.pgm rawn4a08.png -./pnm2png -alpha rawn6a16.pgm rawn4a16.pgm rawn4a16.png -# -- color with alpha-channel -./pnm2png -alpha rawn6a08.pgm rawn6a08.ppm rawn6a08.png -./pnm2png -alpha rawn6a16.pgm rawn6a16.ppm rawn6a16.png - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/README b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/README deleted file mode 100644 index 714d12c..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/README +++ /dev/null @@ -1,85 +0,0 @@ - -pngsuite --------- -(c) Willem van Schaik, 1999 - -Permission to use, copy, and distribute these images for any purpose and -without fee is hereby granted. - -These 15 images are part of the much larger PngSuite test-set of -images, available for developers of PNG supporting software. The -complete set, available at http:/www.schaik.com/pngsuite/, contains -a variety of images to test interlacing, gamma settings, ancillary -chunks, etc. - -The images in this directory represent the basic PNG color-types: -grayscale (1-16 bit deep), full color (8 or 16 bit), paletted -(1-8 bit) and grayscale or color images with alpha channel. You -can use them to test the proper functioning of PNG software. - - filename depth type - ------------ ------ -------------- - basn0g01.png 1-bit grayscale - basn0g02.png 2-bit grayscale - basn0g04.png 4-bit grayscale - basn0g08.png 8-bit grayscale - basn0g16.png 16-bit grayscale - basn2c08.png 8-bit truecolor - basn2c16.png 16-bit truecolor - basn3p01.png 1-bit paletted - basn3p02.png 2-bit paletted - basn3p04.png 4-bit paletted - basn3p08.png 8-bit paletted - basn4a08.png 8-bit gray with alpha - basn4a16.png 16-bit gray with alpha - basn6a08.png 8-bit RGBA - basn6a16.png 16-bit RGBA - -Here is the correct result of typing "pngtest -m *.png" in -this directory: - -Testing basn0g01.png: PASS (524 zero samples) - Filter 0 was used 32 times -Testing basn0g02.png: PASS (448 zero samples) - Filter 0 was used 32 times -Testing basn0g04.png: PASS (520 zero samples) - Filter 0 was used 32 times -Testing basn0g08.png: PASS (3 zero samples) - Filter 1 was used 9 times - Filter 4 was used 23 times -Testing basn0g16.png: PASS (1 zero samples) - Filter 1 was used 1 times - Filter 2 was used 31 times -Testing basn2c08.png: PASS (6 zero samples) - Filter 1 was used 5 times - Filter 4 was used 27 times -Testing basn2c16.png: PASS (592 zero samples) - Filter 1 was used 1 times - Filter 4 was used 31 times -Testing basn3p01.png: PASS (512 zero samples) - Filter 0 was used 32 times -Testing basn3p02.png: PASS (448 zero samples) - Filter 0 was used 32 times -Testing basn3p04.png: PASS (544 zero samples) - Filter 0 was used 32 times -Testing basn3p08.png: PASS (4 zero samples) - Filter 0 was used 32 times -Testing basn4a08.png: PASS (32 zero samples) - Filter 1 was used 1 times - Filter 4 was used 31 times -Testing basn4a16.png: PASS (64 zero samples) - Filter 0 was used 1 times - Filter 1 was used 2 times - Filter 2 was used 1 times - Filter 4 was used 28 times -Testing basn6a08.png: PASS (160 zero samples) - Filter 1 was used 1 times - Filter 4 was used 31 times -Testing basn6a16.png: PASS (1072 zero samples) - Filter 1 was used 4 times - Filter 4 was used 28 times -libpng passes test - -Willem van Schaik - -October 1999 diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn0g01.png b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn0g01.png deleted file mode 100644 index 1d722423aa5157fe2b029af4e2bb07f478ebe8bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 164 zcmeAS@N?(olHy`uVBq!ia0vp^3Lwk~Bp9L@-6Me%OS+@4BLidG0>c;6;z7cmE{-7; zb9B#azopr0C;FL=l}o! diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn0g02.png b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn0g02.png deleted file mode 100644 index 508332418fa86637d39e95268ec1d3658d120cae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 104 zcmeAS@N?(olHy`uVBq!ia0vp^3Lwk`Bp75C+I9jdmUKs7M+U~W1%@xC#RK{Bo-U3d z6?2jkIAXub_k1+y2sp$L+}6)%%qgEdVJADoUeEf*ZqCk?AR|0o{an^LB{Ts5miHSU diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn0g04.png b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn0g04.png deleted file mode 100644 index 0bf3687863d8a1f53bef0aa24b841b21b0e04d9e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 145 zcmeAS@N?(olHy`uVBq!ia0vp^3Lwk^Bp4c;6;(>fePZ!6K ziaE(C2`UUC949vOu(I~>b7=nfE^nVuX&@tFa7u7Oddi~87#=p(p8gM~{{27yqy1T- hp#)Io!PL|g7KVVQ{|ZeX-G~HP;_2$=vd$@?2>|oDDeM3M diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn0g16.png b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn0g16.png deleted file mode 100644 index e7c82f78eb954be5be51c35bd287e00018c69d82..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^3Lq>1BpBEle`W(ImUKs7M+U~W1%@xC#RK_qo-U3d z6?3j$GUPg7z~dZf8U4Qg*qsHF4`@^yUDaY)e6!!)qG9=taAD!(1y)T7vK%uR?lygM zIK}cp><*ign#1-5wiApPcd>47oWOZOH-mqPPlA0u`y2l+k{0Ld8N_aQ--utQJ^wn$ N1)i>cF6*2UngAzTID!BG diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn2c08.png b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn2c08.png deleted file mode 100644 index db5ad15865f56e48e4bae5b43661d2dbc4e847e3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 145 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1SJ1Ryj={WSkfJR9T^zg78t&m77yfmc)B=- zRLpsM^&lsM0S}Wy>zj#xw-*UpyJ&w|_~YC|?Jc}4)(u=DKV%lXeNyXF;n2v$@6|4U rsD)ibtrx; diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn2c16.png b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn2c16.png deleted file mode 100644 index 50c1cb91a0171e9f34991b079fe932f5f0bb16d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 302 zcmV+}0nz@6P)NTxus~-YE?|ew94KIo9tHTv?hhRR zwrA%J^h9UxCeRmyPjW#d?oxNFL9(uFDZ1gBle+D$rIj`J+5;}Xa zfF63WfGT3xy1iYa$zve>zUI)9x>;M1&07*qoM6N<$g8PGj A5dZ)H diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn3p01.png b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn3p01.png deleted file mode 100644 index b145c2b8eff1f4298e540bfae5c1351d015a3592..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 112 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnL3?x0byx0z;SkfJR9T^zg78t&m77ygJ1^9%x zzWcAFl=eSI>XI5zMAXy8F{ENn@&k4zHj_up0tD0@h%3W?AY}Lt#0>va?X`CSX(dk=$B>FS$v@Vz>816FsF9(VN75txh7sS~8e>Vez z3y|e3}y1F=z>r=LEEca@LnZf*~BA0ROZ5~$d#4)lIa>n+tGAx#s~NCh;!h=Q?&7t5~~Lk>mL*|1x+L`Ivp6mn?kJ^kK$c6a~%|NrOteLPR)ru^*4 zh?oc>ipx)wHw!xP<||VqG2mh2yNQ1IZKr30Xr(I7PBXU z(o_;ftk^?X5O*qmM)+A^aUR*s!>r3PlcI=3mc_D63M-aHQVj83+hHDKi)~wG8A%eb zMRFVzAa0kL4aW(lxy(-(A3@r7{KRdCcI^9^ zBwSWlMY4uMp(p@%T`0C7K$rnonuoRmLY9xP#5bTx(RKJi zCYfG^*s^*-{Ro^e4Kgw{Dlmv)JpjQ5bKwF@CLI|%59=nhA>e#HJh5GNjRLr(&Jco- zL=roU($L^w70~)&xPh+uFV&-K!K0w3W-9Hy@g@HWXL3ML4|%5ULen8 zlT@|D2@;VI*iada4446_ptp_#Sul*Cx7Y6>PlSiq8TyN-q=y}cXZX&@20)p=ihIP{CfA$Z*4W@ zEr$zzJ<~t_(0G1&!T9U{_Iz>DPFy@Dgq4(i*+1}U*ZiG1m)32#<4sRFJ5!AP>yZ}L zzdq~5lB&|C6*=qgy?nj!is#SN$*Gwo6M?qJgKJtd1_tvb_xS3qJuRh&eH)f1f0J@< z)4uq(Z_li{H~+s=+3L-xjU7X)ZvEUC-CLA+t^7d7$jI)tsK~;c&XdnBOC5Txp}1)@ zusm-vWl2G`{dnN}K>pDE=;yi{rVB@Y3B-HrtGOePxNz#}j}FD`z3|nlwikX+ZZ56= zAY&lKTUG9w&2^VN89D}o5=^>%~&6ID5>`0fk%7K&zZcY&F#znJTW|E zB5&cFwM~ly35&;HdZq5*>W9rM<&V4Wr%mNt{B`@CxYpR8I;^7!?Tc=wu6t&Du2Ec< zKIiz-xXN3dttqGahAW20Qo6MzgSk7e_{!(?CKyw`*?j|NY=7wG%F`JaWZ(VOm8CUr z$$no_)1uMK%W6)nN!IrL6EB>puUj#i+1xg}<&qUPnY6#j4&NW^MpZNn{t+Cq+^l@L JEAySt{s-!kV`~5a diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn4a08.png b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn4a08.png deleted file mode 100644 index 3e13052201c9f8b90172ea2491b18d6d121c2786..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 126 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE0wix1Z>k4UEa{HEjtq=#3k+XOiwE*eJzX3_ zD&{2rIe*{)W9ys@6GNprI`<_tn04&i_AxF_G>~EoF-$NKa6jCj#n!|2C_^IPFayJV XErr@6uUk(54Pfwe^>bP0l+XkK+-D@M diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn4a16.png b/gtkmm-osx/trunk/libpng-1.2.5/contrib/pngsuite/basn4a16.png deleted file mode 100644 index 8243644d0743ebd1fdacb7923069fefbb01dab0e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2206 zcmV;P2x0e$P)kEEkx>-b1@Qb$y-ohUek5*oTfx-A#6y^c`Q zE+sS)yU66wLTO83iFXm5i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sP1a>I`JFHHZ5 AY5)KL diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/PngFile.c b/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/PngFile.c deleted file mode 100644 index 959afe9..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/PngFile.c +++ /dev/null @@ -1,439 +0,0 @@ -//------------------------------------- -// PNGFILE.C -- Image File Functions -//------------------------------------- - -// Copyright 2000, Willem van Schaik. For conditions of distribution and -// use, see the copyright/license/disclaimer notice in png.h - -#include -#include -#include -#include - -#include "png.h" -#include "pngfile.h" -#include "cexcept.h" - -define_exception_type(const char *); -extern struct exception_context the_exception_context[1]; -struct exception_context the_exception_context[1]; -png_const_charp msg; - -static OPENFILENAME ofn; - -static png_structp png_ptr = NULL; -static png_infop info_ptr = NULL; - - -// cexcept interface - -static void -png_cexcept_error(png_structp png_ptr, png_const_charp msg) -{ - if(png_ptr) - ; -#ifndef PNG_NO_CONSOLE_IO - fprintf(stderr, "libpng error: %s\n", msg); -#endif - { - Throw msg; - } -} - -// Windows open-file functions - -void PngFileInitialize (HWND hwnd) -{ - static TCHAR szFilter[] = TEXT ("PNG Files (*.PNG)\0*.png\0") - TEXT ("All Files (*.*)\0*.*\0\0"); - - ofn.lStructSize = sizeof (OPENFILENAME); - ofn.hwndOwner = hwnd; - ofn.hInstance = NULL; - ofn.lpstrFilter = szFilter; - ofn.lpstrCustomFilter = NULL; - ofn.nMaxCustFilter = 0; - ofn.nFilterIndex = 0; - ofn.lpstrFile = NULL; // Set in Open and Close functions - ofn.nMaxFile = MAX_PATH; - ofn.lpstrFileTitle = NULL; // Set in Open and Close functions - ofn.nMaxFileTitle = MAX_PATH; - ofn.lpstrInitialDir = NULL; - ofn.lpstrTitle = NULL; - ofn.Flags = 0; // Set in Open and Close functions - ofn.nFileOffset = 0; - ofn.nFileExtension = 0; - ofn.lpstrDefExt = TEXT ("png"); - ofn.lCustData = 0; - ofn.lpfnHook = NULL; - ofn.lpTemplateName = NULL; -} - -BOOL PngFileOpenDlg (HWND hwnd, PTSTR pstrFileName, PTSTR pstrTitleName) -{ - ofn.hwndOwner = hwnd; - ofn.lpstrFile = pstrFileName; - ofn.lpstrFileTitle = pstrTitleName; - ofn.Flags = OFN_HIDEREADONLY; - - return GetOpenFileName (&ofn); -} - -BOOL PngFileSaveDlg (HWND hwnd, PTSTR pstrFileName, PTSTR pstrTitleName) -{ - ofn.hwndOwner = hwnd; - ofn.lpstrFile = pstrFileName; - ofn.lpstrFileTitle = pstrTitleName; - ofn.Flags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT; - - return GetSaveFileName (&ofn); -} - -// PNG image handler functions - -BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData, - int *piWidth, int *piHeight, int *piChannels, png_color *pBkgColor) -{ - static FILE *pfFile; - png_byte pbSig[8]; - int iBitDepth; - int iColorType; - double dGamma; - png_color_16 *pBackground; - png_uint_32 ulChannels; - png_uint_32 ulRowBytes; - png_byte *pbImageData = *ppbImageData; - static png_byte **ppbRowPointers = NULL; - int i; - - // open the PNG input file - - if (!pstrFileName) - { - *ppbImageData = pbImageData = NULL; - return FALSE; - } - - if (!(pfFile = fopen(pstrFileName, "rb"))) - { - *ppbImageData = pbImageData = NULL; - return FALSE; - } - - // first check the eight byte PNG signature - - fread(pbSig, 1, 8, pfFile); - if (!png_check_sig(pbSig, 8)) - { - *ppbImageData = pbImageData = NULL; - return FALSE; - } - - // create the two png(-info) structures - - png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, - (png_error_ptr)png_cexcept_error, (png_error_ptr)NULL); - if (!png_ptr) - { - *ppbImageData = pbImageData = NULL; - return FALSE; - } - - info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) - { - png_destroy_read_struct(&png_ptr, NULL, NULL); - *ppbImageData = pbImageData = NULL; - return FALSE; - } - - Try - { - - // initialize the png structure - -#if !defined(PNG_NO_STDIO) - png_init_io(png_ptr, pfFile); -#else - png_set_read_fn(png_ptr, (png_voidp)pfFile, png_read_data); -#endif - - png_set_sig_bytes(png_ptr, 8); - - // read all PNG info up to image data - - png_read_info(png_ptr, info_ptr); - - // get width, height, bit-depth and color-type - - png_get_IHDR(png_ptr, info_ptr, piWidth, piHeight, &iBitDepth, - &iColorType, NULL, NULL, NULL); - - // expand images of all color-type and bit-depth to 3x8 bit RGB images - // let the library process things like alpha, transparency, background - - if (iBitDepth == 16) - png_set_strip_16(png_ptr); - if (iColorType == PNG_COLOR_TYPE_PALETTE) - png_set_expand(png_ptr); - if (iBitDepth < 8) - png_set_expand(png_ptr); - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) - png_set_expand(png_ptr); - if (iColorType == PNG_COLOR_TYPE_GRAY || - iColorType == PNG_COLOR_TYPE_GRAY_ALPHA) - png_set_gray_to_rgb(png_ptr); - - // set the background color to draw transparent and alpha images over. - if (png_get_bKGD(png_ptr, info_ptr, &pBackground)) - { - png_set_background(png_ptr, pBackground, PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); - pBkgColor->red = (byte) pBackground->red; - pBkgColor->green = (byte) pBackground->green; - pBkgColor->blue = (byte) pBackground->blue; - } - else - { - pBkgColor = NULL; - } - - // if required set gamma conversion - if (png_get_gAMA(png_ptr, info_ptr, &dGamma)) - png_set_gamma(png_ptr, (double) 2.2, dGamma); - - // after the transformations have been registered update info_ptr data - - png_read_update_info(png_ptr, info_ptr); - - // get again width, height and the new bit-depth and color-type - - png_get_IHDR(png_ptr, info_ptr, piWidth, piHeight, &iBitDepth, - &iColorType, NULL, NULL, NULL); - - - // row_bytes is the width x number of channels - - ulRowBytes = png_get_rowbytes(png_ptr, info_ptr); - ulChannels = png_get_channels(png_ptr, info_ptr); - - *piChannels = ulChannels; - - // now we can allocate memory to store the image - - if (pbImageData) - { - free (pbImageData); - pbImageData = NULL; - } - if ((pbImageData = (png_byte *) malloc(ulRowBytes * (*piHeight) - * sizeof(png_byte))) == NULL) - { - png_error(png_ptr, "Visual PNG: out of memory"); - } - *ppbImageData = pbImageData; - - // and allocate memory for an array of row-pointers - - if ((ppbRowPointers = (png_bytepp) malloc((*piHeight) - * sizeof(png_bytep))) == NULL) - { - png_error(png_ptr, "Visual PNG: out of memory"); - } - - // set the individual row-pointers to point at the correct offsets - - for (i = 0; i < (*piHeight); i++) - ppbRowPointers[i] = pbImageData + i * ulRowBytes; - - // now we can go ahead and just read the whole image - - png_read_image(png_ptr, ppbRowPointers); - - // read the additional chunks in the PNG file (not really needed) - - png_read_end(png_ptr, NULL); - - // and we're done - - free (ppbRowPointers); - ppbRowPointers = NULL; - - // yepp, done - } - - Catch (msg) - { - png_destroy_read_struct(&png_ptr, &info_ptr, NULL); - - *ppbImageData = pbImageData = NULL; - - if(ppbRowPointers) - free (ppbRowPointers); - - fclose(pfFile); - - return FALSE; - } - - fclose (pfFile); - - return TRUE; -} - - -BOOL PngSaveImage (PTSTR pstrFileName, png_byte *pDiData, - int iWidth, int iHeight, png_color bkgColor) -{ - const int ciBitDepth = 8; - const int ciChannels = 3; - - static FILE *pfFile; - png_uint_32 ulRowBytes; - static png_byte **ppbRowPointers = NULL; - int i; - - // open the PNG output file - - if (!pstrFileName) - return FALSE; - - if (!(pfFile = fopen(pstrFileName, "wb"))) - return FALSE; - - // prepare the standard PNG structures - - png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, - (png_error_ptr)png_cexcept_error, (png_error_ptr)NULL); - if (!png_ptr) - { - fclose(pfFile); - return FALSE; - } - - info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) { - fclose(pfFile); - png_destroy_write_struct(&png_ptr, (png_infopp) NULL); - return FALSE; - } - - Try - { - // initialize the png structure - -#if !defined(PNG_NO_STDIO) - png_init_io(png_ptr, pfFile); -#else - png_set_write_fn(png_ptr, (png_voidp)pfFile, png_write_data, png_flush); -#endif - - // we're going to write a very simple 3x8 bit RGB image - - png_set_IHDR(png_ptr, info_ptr, iWidth, iHeight, ciBitDepth, - PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, - PNG_FILTER_TYPE_BASE); - - // write the file header information - - png_write_info(png_ptr, info_ptr); - - // swap the BGR pixels in the DiData structure to RGB - - png_set_bgr(png_ptr); - - // row_bytes is the width x number of channels - - ulRowBytes = iWidth * ciChannels; - - // we can allocate memory for an array of row-pointers - - if ((ppbRowPointers = (png_bytepp) malloc(iHeight * sizeof(png_bytep))) == NULL) - Throw "Visualpng: Out of memory"; - - // set the individual row-pointers to point at the correct offsets - - for (i = 0; i < iHeight; i++) - ppbRowPointers[i] = pDiData + i * (((ulRowBytes + 3) >> 2) << 2); - - // write out the entire image data in one call - - png_write_image (png_ptr, ppbRowPointers); - - // write the additional chunks to the PNG file (not really needed) - - png_write_end(png_ptr, info_ptr); - - // and we're done - - free (ppbRowPointers); - ppbRowPointers = NULL; - - // clean up after the write, and free any memory allocated - - png_destroy_write_struct(&png_ptr, (png_infopp) NULL); - - // yepp, done - } - - Catch (msg) - { - png_destroy_write_struct(&png_ptr, (png_infopp) NULL); - - if(ppbRowPointers) - free (ppbRowPointers); - - fclose(pfFile); - - return FALSE; - } - - fclose (pfFile); - - return TRUE; -} - -#ifdef PNG_NO_STDIO - -static void -png_read_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_size_t check; - - /* fread() returns 0 on error, so it is OK to store this in a png_size_t - * instead of an int, which is what fread() actually returns. - */ - check = (png_size_t)fread(data, (png_size_t)1, length, - (FILE *)png_ptr->io_ptr); - - if (check != length) - { - png_error(png_ptr, "Read Error"); - } -} - -static void -png_write_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_uint_32 check; - - check = fwrite(data, 1, length, (FILE *)(png_ptr->io_ptr)); - if (check != length) - { - png_error(png_ptr, "Write Error"); - } -} - -static void -png_flush(png_structp png_ptr) -{ - FILE *io_ptr; - io_ptr = (FILE *)CVT_PTR((png_ptr->io_ptr)); - if (io_ptr != NULL) - fflush(io_ptr); -} - -#endif - -//----------------- -// end of source -//----------------- diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/PngFile.h b/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/PngFile.h deleted file mode 100644 index 18acf55..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/PngFile.h +++ /dev/null @@ -1,27 +0,0 @@ -//------------------------------------------ -// PNGFILE.H -- Header File for pngfile.c -//------------------------------------------ - -// Copyright 2000, Willem van Schaik. For conditions of distribution and -// use, see the copyright/license/disclaimer notice in png.h - -#include -#include -#include -#include - -void PngFileInitialize (HWND hwnd) ; -BOOL PngFileOpenDlg (HWND hwnd, PTSTR pstrFileName, PTSTR pstrTitleName) ; -BOOL PngFileSaveDlg (HWND hwnd, PTSTR pstrFileName, PTSTR pstrTitleName) ; - -BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData, - int *piWidth, int *piHeight, int *piChannels, png_color *pBkgColor); -BOOL PngSaveImage (PTSTR pstrFileName, png_byte *pDiData, - int iWidth, int iHeight, png_color BkgColor); - -#if defined(PNG_NO_STDIO) -static void png_read_data(png_structp png_ptr, png_bytep data, png_size_t length); -static void png_write_data(png_structp png_ptr, png_bytep data, png_size_t length); -static void png_flush(png_structp png_ptr); -#endif - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/README.txt b/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/README.txt deleted file mode 100644 index 5f265cc..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/README.txt +++ /dev/null @@ -1,58 +0,0 @@ -Microsoft Developer Studio Build File, Format Version 6.00 for VisualPng ------------------------------------------------------------------------- - -Copyright 2000, Willem van Schaik. For conditions of distribution and -use, see the copyright/license/disclaimer notice in png.h - -As a PNG .dll demo VisualPng is finished. More features would only hinder -the program's objective. However, further extensions (like support for other -graphics formats) are in development. To get these, or for pre-compiled -binaries, go to "http://www.schaik.com/png/visualpng.html". - ------------------------------------------------------------------------- - -Assumes that - - libpng DLLs and LIBs are in ..\..\projects\msvc\win32\libpng - zlib DLLs and LIBs are in ..\..\projects\msvc\win32\zlib - libpng header files are in ..\..\..\libpng - zlib header files are in ..\..\..\zlib - the pngsuite images are in ..\pngsuite - -To build: - -1) On the main menu Select "Build|Set Active configuration". - Choose the configuration that corresponds to the library you want to test. - This library must have been built using the libpng MS project located in - the "..\..\mscv" subdirectory. - -2) Select "Build|Clean" - -3) Select "Build|Rebuild All" - -4) After compiling and linking VisualPng will be started to view an image - from the PngSuite directory. Press Ctrl-N (and Ctrl-V) for other images. - - -To install: - -When distributing VisualPng (or a further development) the following options -are available: - -1) Build the program with the configuration "Win32 LIB" and you only need to - include the executable from the ./lib directory in your distribution. - -2) Build the program with the configuration "Win32 DLL" and you need to put - in your distribution the executable from the ./dll directory and the dll's - libpng1.dll, zlib.dll and msvcrt.dll. These need to be in the user's PATH. - - -Willem van Schaik -Calgary, June 6th 2000 - -P.S. VisualPng was written based on preliminary work of: - - - Simon-Pierre Cadieux - - Glenn Randers-Pehrson - - Greg Roelofs - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.c b/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.c deleted file mode 100644 index f2cf6ee..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.c +++ /dev/null @@ -1,961 +0,0 @@ -//------------------------------------ -// VisualPng.C -- Shows a PNG image -//------------------------------------ - -// Copyright 2000, Willem van Schaik. For conditions of distribution and -// use, see the copyright/license/disclaimer notice in png.h - -// switches - -// defines - -#define PROGNAME "VisualPng" -#define LONGNAME "Win32 Viewer for PNG-files" -#define VERSION "1.0 of 2000 June 07" - -// constants - -#define MARGIN 8 - -// standard includes - -#include -#include -#include -#include - -// application includes - -#include "png.h" -#include "pngfile.h" -#include "resource.h" - -// macros - -// function prototypes - -LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM); -BOOL CALLBACK AboutDlgProc (HWND, UINT, WPARAM, LPARAM) ; - -BOOL CenterAbout (HWND hwndChild, HWND hwndParent); - -BOOL BuildPngList (PTSTR pstrPathName, TCHAR **ppFileList, int *pFileCount, - int *pFileIndex); - -BOOL SearchPngList (TCHAR *pFileList, int FileCount, int *pFileIndex, - PTSTR pstrPrevName, PTSTR pstrNextName); - -BOOL LoadImageFile(HWND hwnd, PTSTR pstrPathName, - png_byte **ppbImage, int *pxImgSize, int *pyImgSize, int *piChannels, - png_color *pBkgColor); - -BOOL DisplayImage (HWND hwnd, BYTE **ppDib, - BYTE **ppDiData, int cxWinSize, int cyWinSize, - BYTE *pbImage, int cxImgSize, int cyImgSize, int cImgChannels, - BOOL bStretched); - -BOOL InitBitmap ( - BYTE *pDiData, int cxWinSize, int cyWinSize); - -BOOL FillBitmap ( - BYTE *pDiData, int cxWinSize, int cyWinSize, - BYTE *pbImage, int cxImgSize, int cyImgSize, int cImgChannels, - BOOL bStretched); - -// a few global variables - -static char *szProgName = PROGNAME; -static char *szAppName = LONGNAME; -static char *szIconName = PROGNAME; -static char szCmdFileName [MAX_PATH]; - -// MAIN routine - -int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, - PSTR szCmdLine, int iCmdShow) -{ - HACCEL hAccel; - HWND hwnd; - MSG msg; - WNDCLASS wndclass; - int ixBorders, iyBorders; - - wndclass.style = CS_HREDRAW | CS_VREDRAW; - wndclass.lpfnWndProc = WndProc; - wndclass.cbClsExtra = 0; - wndclass.cbWndExtra = 0; - wndclass.hInstance = hInstance; - wndclass.hIcon = LoadIcon (hInstance, szIconName) ; - wndclass.hCursor = LoadCursor (NULL, IDC_ARROW); - wndclass.hbrBackground = NULL; // (HBRUSH) GetStockObject (GRAY_BRUSH); - wndclass.lpszMenuName = szProgName; - wndclass.lpszClassName = szProgName; - - if (!RegisterClass (&wndclass)) - { - MessageBox (NULL, TEXT ("Error: this program requires Windows NT!"), - szProgName, MB_ICONERROR); - return 0; - } - - // if filename given on commandline, store it - if ((szCmdLine != NULL) && (*szCmdLine != '\0')) - if (szCmdLine[0] == '"') - strncpy (szCmdFileName, szCmdLine + 1, strlen(szCmdLine) - 2); - else - strcpy (szCmdFileName, szCmdLine); - else - strcpy (szCmdFileName, ""); - - // calculate size of window-borders - ixBorders = 2 * (GetSystemMetrics (SM_CXBORDER) + - GetSystemMetrics (SM_CXDLGFRAME)); - iyBorders = 2 * (GetSystemMetrics (SM_CYBORDER) + - GetSystemMetrics (SM_CYDLGFRAME)) + - GetSystemMetrics (SM_CYCAPTION) + - GetSystemMetrics (SM_CYMENUSIZE) + - 1; /* WvS: don't ask me why? */ - - hwnd = CreateWindow (szProgName, szAppName, - WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, - 512 + 2 * MARGIN + ixBorders, 384 + 2 * MARGIN + iyBorders, -// CW_USEDEFAULT, CW_USEDEFAULT, - NULL, NULL, hInstance, NULL); - - ShowWindow (hwnd, iCmdShow); - UpdateWindow (hwnd); - - hAccel = LoadAccelerators (hInstance, szProgName); - - while (GetMessage (&msg, NULL, 0, 0)) - { - if (!TranslateAccelerator (hwnd, hAccel, &msg)) - { - TranslateMessage (&msg); - DispatchMessage (&msg); - } - } - return msg.wParam; -} - -LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, - LPARAM lParam) -{ - static HINSTANCE hInstance ; - static HDC hdc; - static PAINTSTRUCT ps; - static HMENU hMenu; - - static BITMAPFILEHEADER *pbmfh; - static BITMAPINFOHEADER *pbmih; - static BYTE *pbImage; - static int cxWinSize, cyWinSize; - static int cxImgSize, cyImgSize; - static int cImgChannels; - static png_color bkgColor = {127, 127, 127}; - - static BOOL bStretched = TRUE; - - static BYTE *pDib = NULL; - static BYTE *pDiData = NULL; - - static TCHAR szImgPathName [MAX_PATH]; - static TCHAR szTitleName [MAX_PATH]; - - static TCHAR *pPngFileList = NULL; - static int iPngFileCount; - static int iPngFileIndex; - - BOOL bOk; - - switch (message) - { - case WM_CREATE: - hInstance = ((LPCREATESTRUCT) lParam)->hInstance ; - PngFileInitialize (hwnd); - - strcpy (szImgPathName, ""); - - // in case we process file given on command-line - - if (szCmdFileName[0] != '\0') - { - strcpy (szImgPathName, szCmdFileName); - - // read the other png-files in the directory for later - // next/previous commands - - BuildPngList (szImgPathName, &pPngFileList, &iPngFileCount, - &iPngFileIndex); - - // load the image from file - - if (!LoadImageFile (hwnd, szImgPathName, - &pbImage, &cxImgSize, &cyImgSize, &cImgChannels, &bkgColor)) - return 0; - - // invalidate the client area for later update - - InvalidateRect (hwnd, NULL, TRUE); - - // display the PNG into the DIBitmap - - DisplayImage (hwnd, &pDib, &pDiData, cxWinSize, cyWinSize, - pbImage, cxImgSize, cyImgSize, cImgChannels, bStretched); - } - - return 0; - - case WM_SIZE: - cxWinSize = LOWORD (lParam); - cyWinSize = HIWORD (lParam); - - // invalidate the client area for later update - - InvalidateRect (hwnd, NULL, TRUE); - - // display the PNG into the DIBitmap - - DisplayImage (hwnd, &pDib, &pDiData, cxWinSize, cyWinSize, - pbImage, cxImgSize, cyImgSize, cImgChannels, bStretched); - - return 0; - - case WM_INITMENUPOPUP: - hMenu = GetMenu (hwnd); - - if (pbImage) - EnableMenuItem (hMenu, IDM_FILE_SAVE, MF_ENABLED); - else - EnableMenuItem (hMenu, IDM_FILE_SAVE, MF_GRAYED); - - return 0; - - case WM_COMMAND: - hMenu = GetMenu (hwnd); - - switch (LOWORD (wParam)) - { - case IDM_FILE_OPEN: - - // show the File Open dialog box - - if (!PngFileOpenDlg (hwnd, szImgPathName, szTitleName)) - return 0; - - // read the other png-files in the directory for later - // next/previous commands - - BuildPngList (szImgPathName, &pPngFileList, &iPngFileCount, - &iPngFileIndex); - - // load the image from file - - if (!LoadImageFile (hwnd, szImgPathName, - &pbImage, &cxImgSize, &cyImgSize, &cImgChannels, &bkgColor)) - return 0; - - // invalidate the client area for later update - - InvalidateRect (hwnd, NULL, TRUE); - - // display the PNG into the DIBitmap - - DisplayImage (hwnd, &pDib, &pDiData, cxWinSize, cyWinSize, - pbImage, cxImgSize, cyImgSize, cImgChannels, bStretched); - - return 0; - - case IDM_FILE_SAVE: - - // show the File Save dialog box - - if (!PngFileSaveDlg (hwnd, szImgPathName, szTitleName)) - return 0; - - // save the PNG to a disk file - - SetCursor (LoadCursor (NULL, IDC_WAIT)); - ShowCursor (TRUE); - - bOk = PngSaveImage (szImgPathName, pDiData, cxWinSize, cyWinSize, - bkgColor); - - ShowCursor (FALSE); - SetCursor (LoadCursor (NULL, IDC_ARROW)); - - if (!bOk) - MessageBox (hwnd, TEXT ("Error in saving the PNG image"), - szProgName, MB_ICONEXCLAMATION | MB_OK); - return 0; - - case IDM_FILE_NEXT: - - // read next entry in the directory - - if (SearchPngList (pPngFileList, iPngFileCount, &iPngFileIndex, - NULL, szImgPathName)) - { - if (strcmp (szImgPathName, "") == 0) - return 0; - - // load the image from file - - if (!LoadImageFile (hwnd, szImgPathName, &pbImage, - &cxImgSize, &cyImgSize, &cImgChannels, &bkgColor)) - return 0; - - // invalidate the client area for later update - - InvalidateRect (hwnd, NULL, TRUE); - - // display the PNG into the DIBitmap - - DisplayImage (hwnd, &pDib, &pDiData, cxWinSize, cyWinSize, - pbImage, cxImgSize, cyImgSize, cImgChannels, bStretched); - } - - return 0; - - case IDM_FILE_PREVIOUS: - - // read previous entry in the directory - - if (SearchPngList (pPngFileList, iPngFileCount, &iPngFileIndex, - szImgPathName, NULL)) - { - - if (strcmp (szImgPathName, "") == 0) - return 0; - - // load the image from file - - if (!LoadImageFile (hwnd, szImgPathName, &pbImage, &cxImgSize, - &cyImgSize, &cImgChannels, &bkgColor)) - return 0; - - // invalidate the client area for later update - - InvalidateRect (hwnd, NULL, TRUE); - - // display the PNG into the DIBitmap - - DisplayImage (hwnd, &pDib, &pDiData, cxWinSize, cyWinSize, - pbImage, cxImgSize, cyImgSize, cImgChannels, bStretched); - } - - return 0; - - case IDM_FILE_EXIT: - - // more cleanup needed... - - // free image buffer - - if (pDib != NULL) - { - free (pDib); - pDib = NULL; - } - - // free file-list - - if (pPngFileList != NULL) - { - free (pPngFileList); - pPngFileList = NULL; - } - - // let's go ... - - exit (0); - - return 0; - - case IDM_OPTIONS_STRETCH: - bStretched = !bStretched; - if (bStretched) - CheckMenuItem (hMenu, IDM_OPTIONS_STRETCH, MF_CHECKED); - else - CheckMenuItem (hMenu, IDM_OPTIONS_STRETCH, MF_UNCHECKED); - - // invalidate the client area for later update - - InvalidateRect (hwnd, NULL, TRUE); - - // display the PNG into the DIBitmap - - DisplayImage (hwnd, &pDib, &pDiData, cxWinSize, cyWinSize, - pbImage, cxImgSize, cyImgSize, cImgChannels, bStretched); - - return 0; - - case IDM_HELP_ABOUT: - DialogBox (hInstance, TEXT ("AboutBox"), hwnd, AboutDlgProc) ; - return 0; - - } // end switch - - break; - - case WM_PAINT: - hdc = BeginPaint (hwnd, &ps); - - if (pDib) - SetDIBitsToDevice (hdc, 0, 0, cxWinSize, cyWinSize, 0, 0, - 0, cyWinSize, pDiData, (BITMAPINFO *) pDib, DIB_RGB_COLORS); - - EndPaint (hwnd, &ps); - return 0; - - case WM_DESTROY: - if (pbmfh) - { - free (pbmfh); - pbmfh = NULL; - } - - PostQuitMessage (0); - return 0; - } - - return DefWindowProc (hwnd, message, wParam, lParam); -} - -BOOL CALLBACK AboutDlgProc (HWND hDlg, UINT message, - WPARAM wParam, LPARAM lParam) -{ - switch (message) - { - case WM_INITDIALOG : - ShowWindow (hDlg, SW_HIDE); - CenterAbout (hDlg, GetWindow (hDlg, GW_OWNER)); - ShowWindow (hDlg, SW_SHOW); - return TRUE ; - - case WM_COMMAND : - switch (LOWORD (wParam)) - { - case IDOK : - case IDCANCEL : - EndDialog (hDlg, 0) ; - return TRUE ; - } - break ; - } - return FALSE ; -} - -//--------------- -// CenterAbout -//--------------- - -BOOL CenterAbout (HWND hwndChild, HWND hwndParent) -{ - RECT rChild, rParent, rWorkArea; - int wChild, hChild, wParent, hParent; - int xNew, yNew; - BOOL bResult; - - // Get the Height and Width of the child window - GetWindowRect (hwndChild, &rChild); - wChild = rChild.right - rChild.left; - hChild = rChild.bottom - rChild.top; - - // Get the Height and Width of the parent window - GetWindowRect (hwndParent, &rParent); - wParent = rParent.right - rParent.left; - hParent = rParent.bottom - rParent.top; - - // Get the limits of the 'workarea' - bResult = SystemParametersInfo( - SPI_GETWORKAREA, // system parameter to query or set - sizeof(RECT), - &rWorkArea, - 0); - if (!bResult) { - rWorkArea.left = rWorkArea.top = 0; - rWorkArea.right = GetSystemMetrics(SM_CXSCREEN); - rWorkArea.bottom = GetSystemMetrics(SM_CYSCREEN); - } - - // Calculate new X position, then adjust for workarea - xNew = rParent.left + ((wParent - wChild) /2); - if (xNew < rWorkArea.left) { - xNew = rWorkArea.left; - } else if ((xNew+wChild) > rWorkArea.right) { - xNew = rWorkArea.right - wChild; - } - - // Calculate new Y position, then adjust for workarea - yNew = rParent.top + ((hParent - hChild) /2); - if (yNew < rWorkArea.top) { - yNew = rWorkArea.top; - } else if ((yNew+hChild) > rWorkArea.bottom) { - yNew = rWorkArea.bottom - hChild; - } - - // Set it, and return - return SetWindowPos (hwndChild, NULL, xNew, yNew, 0, 0, SWP_NOSIZE | - SWP_NOZORDER); -} - -//---------------- -// BuildPngList -//---------------- - -BOOL BuildPngList (PTSTR pstrPathName, TCHAR **ppFileList, int *pFileCount, - int *pFileIndex) -{ - static TCHAR szImgPathName [MAX_PATH]; - static TCHAR szImgFileName [MAX_PATH]; - static TCHAR szImgFindName [MAX_PATH]; - - WIN32_FIND_DATA finddata; - HANDLE hFind; - - static TCHAR szTmp [MAX_PATH]; - BOOL bOk; - int i, ii; - int j, jj; - - // free previous file-list - - if (*ppFileList != NULL) - { - free (*ppFileList); - *ppFileList = NULL; - } - - // extract foldername, filename and search-name - - strcpy (szImgPathName, pstrPathName); - strcpy (szImgFileName, strrchr (pstrPathName, '\\') + 1); - - strcpy (szImgFindName, szImgPathName); - *(strrchr (szImgFindName, '\\') + 1) = '\0'; - strcat (szImgFindName, "*.png"); - - // first cycle: count number of files in directory for memory allocation - - *pFileCount = 0; - - hFind = FindFirstFile(szImgFindName, &finddata); - bOk = (hFind != (HANDLE) -1); - - while (bOk) - { - *pFileCount += 1; - bOk = FindNextFile(hFind, &finddata); - } - FindClose(hFind); - - // allocation memory for file-list - - *ppFileList = (TCHAR *) malloc (*pFileCount * MAX_PATH); - - // second cycle: read directory and store filenames in file-list - - hFind = FindFirstFile(szImgFindName, &finddata); - bOk = (hFind != (HANDLE) -1); - - i = 0; - ii = 0; - while (bOk) - { - strcpy (*ppFileList + ii, szImgPathName); - strcpy (strrchr(*ppFileList + ii, '\\') + 1, finddata.cFileName); - - if (strcmp(pstrPathName, *ppFileList + ii) == 0) - *pFileIndex = i; - - ii += MAX_PATH; - i++; - - bOk = FindNextFile(hFind, &finddata); - } - FindClose(hFind); - - // finally we must sort the file-list - - for (i = 0; i < *pFileCount - 1; i++) - { - ii = i * MAX_PATH; - for (j = i+1; j < *pFileCount; j++) - { - jj = j * MAX_PATH; - if (strcmp (*ppFileList + ii, *ppFileList + jj) > 0) - { - strcpy (szTmp, *ppFileList + jj); - strcpy (*ppFileList + jj, *ppFileList + ii); - strcpy (*ppFileList + ii, szTmp); - - // check if this was the current image that we moved - - if (*pFileIndex == i) - *pFileIndex = j; - else - if (*pFileIndex == j) - *pFileIndex = i; - } - } - } - - return TRUE; -} - -//---------------- -// SearchPngList -//---------------- - -BOOL SearchPngList ( - TCHAR *pFileList, int FileCount, int *pFileIndex, - PTSTR pstrPrevName, PTSTR pstrNextName) -{ - if (FileCount > 0) - { - // get previous entry - - if (pstrPrevName != NULL) - { - if (*pFileIndex > 0) - *pFileIndex -= 1; - else - *pFileIndex = FileCount - 1; - - strcpy (pstrPrevName, pFileList + (*pFileIndex * MAX_PATH)); - } - - // get next entry - - if (pstrNextName != NULL) - { - if (*pFileIndex < FileCount - 1) - *pFileIndex += 1; - else - *pFileIndex = 0; - - strcpy (pstrNextName, pFileList + (*pFileIndex * MAX_PATH)); - } - - return TRUE; - } - else - { - return FALSE; - } -} - -//----------------- -// LoadImageFile -//----------------- - -BOOL LoadImageFile (HWND hwnd, PTSTR pstrPathName, - png_byte **ppbImage, int *pxImgSize, int *pyImgSize, - int *piChannels, png_color *pBkgColor) -{ - static TCHAR szTmp [MAX_PATH]; - - // if there's an existing PNG, free the memory - - if (*ppbImage) - { - free (*ppbImage); - *ppbImage = NULL; - } - - // Load the entire PNG into memory - - SetCursor (LoadCursor (NULL, IDC_WAIT)); - ShowCursor (TRUE); - - PngLoadImage (pstrPathName, ppbImage, pxImgSize, pyImgSize, piChannels, - pBkgColor); - - ShowCursor (FALSE); - SetCursor (LoadCursor (NULL, IDC_ARROW)); - - if (*ppbImage != NULL) - { - sprintf (szTmp, "VisualPng - %s", strrchr(pstrPathName, '\\') + 1); - SetWindowText (hwnd, szTmp); - } - else - { - MessageBox (hwnd, TEXT ("Error in loading the PNG image"), - szProgName, MB_ICONEXCLAMATION | MB_OK); - return FALSE; - } - - return TRUE; -} - -//---------------- -// DisplayImage -//---------------- - -BOOL DisplayImage (HWND hwnd, BYTE **ppDib, - BYTE **ppDiData, int cxWinSize, int cyWinSize, - BYTE *pbImage, int cxImgSize, int cyImgSize, int cImgChannels, - BOOL bStretched) -{ - BYTE *pDib = *ppDib; - BYTE *pDiData = *ppDiData; - // BITMAPFILEHEADER *pbmfh; - BITMAPINFOHEADER *pbmih; - WORD wDIRowBytes; - png_color bkgBlack = {0, 0, 0}; - png_color bkgGray = {127, 127, 127}; - png_color bkgWhite = {255, 255, 255}; - - // allocate memory for the Device Independant bitmap - - wDIRowBytes = (WORD) ((3 * cxWinSize + 3L) >> 2) << 2; - - if (pDib) - { - free (pDib); - pDib = NULL; - } - - if (!(pDib = (BYTE *) malloc (sizeof(BITMAPINFOHEADER) + - wDIRowBytes * cyWinSize))) - { - MessageBox (hwnd, TEXT ("Error in displaying the PNG image"), - szProgName, MB_ICONEXCLAMATION | MB_OK); - *ppDib = pDib = NULL; - return FALSE; - } - *ppDib = pDib; - memset (pDib, 0, sizeof(BITMAPINFOHEADER)); - - // initialize the dib-structure - - pbmih = (BITMAPINFOHEADER *) pDib; - pbmih->biSize = sizeof(BITMAPINFOHEADER); - pbmih->biWidth = cxWinSize; - pbmih->biHeight = -((long) cyWinSize); - pbmih->biPlanes = 1; - pbmih->biBitCount = 24; - pbmih->biCompression = 0; - pDiData = pDib + sizeof(BITMAPINFOHEADER); - *ppDiData = pDiData; - - // first fill bitmap with gray and image border - - InitBitmap (pDiData, cxWinSize, cyWinSize); - - // then fill bitmap with image - - if (pbImage) - { - FillBitmap ( - pDiData, cxWinSize, cyWinSize, - pbImage, cxImgSize, cyImgSize, cImgChannels, - bStretched); - } - - return TRUE; -} - -//-------------- -// InitBitmap -//-------------- - -BOOL InitBitmap (BYTE *pDiData, int cxWinSize, int cyWinSize) -{ - BYTE *dst; - int x, y, col; - - // initialize the background with gray - - dst = pDiData; - for (y = 0; y < cyWinSize; y++) - { - col = 0; - for (x = 0; x < cxWinSize; x++) - { - // fill with GRAY - *dst++ = 127; - *dst++ = 127; - *dst++ = 127; - col += 3; - } - // rows start on 4 byte boundaries - while ((col % 4) != 0) - { - dst++; - col++; - } - } - - return TRUE; -} - -//-------------- -// FillBitmap -//-------------- - -BOOL FillBitmap ( - BYTE *pDiData, int cxWinSize, int cyWinSize, - BYTE *pbImage, int cxImgSize, int cyImgSize, int cImgChannels, - BOOL bStretched) -{ - BYTE *pStretchedImage; - BYTE *pImg; - BYTE *src, *dst; - BYTE r, g, b, a; - const int cDIChannels = 3; - WORD wImgRowBytes; - WORD wDIRowBytes; - int cxNewSize, cyNewSize; - int cxImgPos, cyImgPos; - int xImg, yImg; - int xWin, yWin; - int xOld, yOld; - int xNew, yNew; - - if (bStretched) - { - cxNewSize = cxWinSize - 2 * MARGIN; - cyNewSize = cyWinSize - 2 * MARGIN; - - // stretch the image to it's window determined size - - // the following two are the same, but the first has side-effects - // because of rounding -// if ((cyNewSize / cxNewSize) > (cyImgSize / cxImgSize)) - if ((cyNewSize * cxImgSize) > (cyImgSize * cxNewSize)) - { - cyNewSize = cxNewSize * cyImgSize / cxImgSize; - cxImgPos = MARGIN; - cyImgPos = (cyWinSize - cyNewSize) / 2; - } - else - { - cxNewSize = cyNewSize * cxImgSize / cyImgSize; - cyImgPos = MARGIN; - cxImgPos = (cxWinSize - cxNewSize) / 2; - } - - pStretchedImage = malloc (cImgChannels * cxNewSize * cyNewSize); - pImg = pStretchedImage; - - for (yNew = 0; yNew < cyNewSize; yNew++) - { - yOld = yNew * cyImgSize / cyNewSize; - for (xNew = 0; xNew < cxNewSize; xNew++) - { - xOld = xNew * cxImgSize / cxNewSize; - - r = *(pbImage + cImgChannels * ((yOld * cxImgSize) + xOld) + 0); - g = *(pbImage + cImgChannels * ((yOld * cxImgSize) + xOld) + 1); - b = *(pbImage + cImgChannels * ((yOld * cxImgSize) + xOld) + 2); - *pImg++ = r; - *pImg++ = g; - *pImg++ = b; - if (cImgChannels == 4) - { - a = *(pbImage + cImgChannels * ((yOld * cxImgSize) + xOld) - + 3); - *pImg++ = a; - } - } - } - - // calculate row-bytes - - wImgRowBytes = cImgChannels * cxNewSize; - wDIRowBytes = (WORD) ((cDIChannels * cxWinSize + 3L) >> 2) << 2; - - // copy image to screen - - for (yImg = 0, yWin = cyImgPos; yImg < cyNewSize; yImg++, yWin++) - { - if (yWin >= cyWinSize - cyImgPos) - break; - src = pStretchedImage + yImg * wImgRowBytes; - dst = pDiData + yWin * wDIRowBytes + cxImgPos * cDIChannels; - - for (xImg = 0, xWin = cxImgPos; xImg < cxNewSize; xImg++, xWin++) - { - if (xWin >= cxWinSize - cxImgPos) - break; - r = *src++; - g = *src++; - b = *src++; - *dst++ = b; /* note the reverse order */ - *dst++ = g; - *dst++ = r; - if (cImgChannels == 4) - { - a = *src++; - } - } - } - - // free memory - - if (pStretchedImage != NULL) - { - free (pStretchedImage); - pStretchedImage = NULL; - } - - } - - // process the image not-stretched - - else - { - // calculate the central position - - cxImgPos = (cxWinSize - cxImgSize) / 2; - cyImgPos = (cyWinSize - cyImgSize) / 2; - - // check for image larger than window - - if (cxImgPos < MARGIN) - cxImgPos = MARGIN; - if (cyImgPos < MARGIN) - cyImgPos = MARGIN; - - // calculate both row-bytes - - wImgRowBytes = cImgChannels * cxImgSize; - wDIRowBytes = (WORD) ((cDIChannels * cxWinSize + 3L) >> 2) << 2; - - // copy image to screen - - for (yImg = 0, yWin = cyImgPos; yImg < cyImgSize; yImg++, yWin++) - { - if (yWin >= cyWinSize - MARGIN) - break; - src = pbImage + yImg * wImgRowBytes; - dst = pDiData + yWin * wDIRowBytes + cxImgPos * cDIChannels; - - for (xImg = 0, xWin = cxImgPos; xImg < cxImgSize; xImg++, xWin++) - { - if (xWin >= cxWinSize - MARGIN) - break; - r = *src++; - g = *src++; - b = *src++; - *dst++ = b; /* note the reverse order */ - *dst++ = g; - *dst++ = r; - if (cImgChannels == 4) - { - a = *src++; - } - } - } - } - - return TRUE; -} - -//----------------- -// end of source -//----------------- diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.dsp b/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.dsp deleted file mode 100644 index 0093cbf..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.dsp +++ /dev/null @@ -1,223 +0,0 @@ -# Microsoft Developer Studio Project File - Name="VisualPng" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 - -# Copyright 2000, Willem van Schaik. For conditions of distribution and -# use, see the copyright/license/disclaimer notice in png.h - -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Application" 0x0101 - -CFG=VisualPng - Win32 Debug LIB -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "VisualPng.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "VisualPng.mak" CFG="VisualPng - Win32 Debug LIB" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "VisualPng - Win32 DLL" (based on "Win32 (x86) Application") -!MESSAGE "VisualPng - Win32 Debug DLL" (based on "Win32 (x86) Application") -!MESSAGE "VisualPng - Win32 LIB" (based on "Win32 (x86) Application") -!MESSAGE "VisualPng - Win32 Debug LIB" (based on "Win32 (x86) Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "VisualPng - Win32 DLL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "VisualPng___Win32_DLL" -# PROP BASE Intermediate_Dir "VisualPng___Win32_DLL" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "dll" -# PROP Intermediate_Dir "dll" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /I "libpng" /I "zlib" /D "PNG_USE_DLL" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\libpng" /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "PNG_USE_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 libpng13.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"libpng" /libpath:"zlib" -# ADD LINK32 libpng13.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\dll" -# Begin Special Build Tool -OutDir=.\dll -SOURCE="$(InputPath)" -PostBuild_Cmds=set path=..\..\projects\msvc\win32\libpng\dll;..\..\projects\msvc\win32\zlib\dll; $(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png -# End Special Build Tool - -!ELSEIF "$(CFG)" == "VisualPng - Win32 Debug DLL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "VisualPng___Win32_Debug_DLL" -# PROP BASE Intermediate_Dir "VisualPng___Win32_Debug_DLL" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "dll_dbg" -# PROP Intermediate_Dir "dll_dbg" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "libpng" /I "zlib" /D "PNG_USE_DLL" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\libpng" /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "PNG_USE_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 libpng13.lib zlibd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"libpng" /libpath:"zlib" -# SUBTRACT BASE LINK32 /nodefaultlib -# ADD LINK32 libpng13d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\dll_dbg" -# SUBTRACT LINK32 /nodefaultlib -# Begin Special Build Tool -OutDir=.\dll_dbg -SOURCE="$(InputPath)" -PostBuild_Cmds=set path=..\..\projects\msvc\win32\libpng\dll_dbg;..\..\projects\msvc\win32\zlib\dll_dbg; $(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png -# End Special Build Tool - -!ELSEIF "$(CFG)" == "VisualPng - Win32 LIB" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "VisualPng___Win32_LIB" -# PROP BASE Intermediate_Dir "VisualPng___Win32_LIB" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "lib" -# PROP Intermediate_Dir "lib" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /I "..\..\..\libpng" /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "PNG_USE_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c -# SUBTRACT BASE CPP /YX -# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\libpng" /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 libpng13.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\dll" -# ADD LINK32 libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\..\projects\msvc\win32\libpng\lib" -# Begin Special Build Tool -OutDir=.\lib -SOURCE="$(InputPath)" -PostBuild_Cmds=$(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png -# End Special Build Tool - -!ELSEIF "$(CFG)" == "VisualPng - Win32 Debug LIB" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "VisualPng___Win32_Debug_LIB" -# PROP BASE Intermediate_Dir "VisualPng___Win32_Debug_LIB" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "lib_dbg" -# PROP Intermediate_Dir "lib_dbg" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\libpng" /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "PNG_USE_DLL" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\libpng" /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "PNG_NO_STDIO" /D "PNG_NO_GLOBAL_ARRAYS" /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 libpng13d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\dll_dbg" -# SUBTRACT BASE LINK32 /nodefaultlib -# ADD LINK32 libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept /libpath:"..\..\projects\msvc\win32\libpng\lib_dbg" -# SUBTRACT LINK32 /nodefaultlib -# Begin Special Build Tool -OutDir=.\lib_dbg -SOURCE="$(InputPath)" -PostBuild_Cmds=$(outdir)\VisualPng.exe ..\..\contrib\pngsuite\basn6a16.png -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "VisualPng - Win32 DLL" -# Name "VisualPng - Win32 Debug DLL" -# Name "VisualPng - Win32 LIB" -# Name "VisualPng - Win32 Debug LIB" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\PngFile.c -# End Source File -# Begin Source File - -SOURCE=.\VisualPng.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\cexcept.h -# End Source File -# Begin Source File - -SOURCE=.\PngFile.h -# End Source File -# Begin Source File - -SOURCE=.\resource.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# Begin Source File - -SOURCE=.\VisualPng.ico -# End Source File -# Begin Source File - -SOURCE=.\VisualPng.rc -# End Source File -# End Group -# End Target -# End Project diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.dsw b/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.dsw deleted file mode 100644 index 17ad83a..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "VisualPng"=.\VisualPng.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.ico b/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.ico deleted file mode 100644 index 68aa3719fb523eccd4c4a706e4198ca1be2b4c62..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 766 zcmb_ayGjE=6ul!BJ4Il&5f%%#i;YeE0sqBX?6q(TQ7j^}Bh9<%xts4i6 zkcy&!=Yp>fdCw6P!YMX?g~S3@L(=jS0+)s|NiKlEgL>VOVf)WTfR)85V$RN>JwSV-vWY^X3AQl6o~-A`A21P`H#(L`ua zC6p2|SPTx|B;lEdR<4J97z(@|!YJx7#d!1r3hTe|MU4YoP< Ob-aH+fF44>&V2wPTAUpK diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.png b/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.png deleted file mode 100644 index c6aa80a9bfa275137e429498bc785cb2dbcdb382..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 208 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnL3?x0byx0z;SkfJR9T^xl_H+M9WCils0(?ST zf%J9`j>RRx2|yNONswPKgTu2MX+Tbfr;B5V#O34!2UcDl9v_~y3Xga?K0NvO|~WI+Z?ismL3#z>)ClO+n69&&Pt@)((moHOva6OfZ2FlX_Z0}8s!jvZ1^ zUz2uRL2<>QLkbEXTG%~o9y17?WOH!($Y?g1Vbg3Ozf`fCd_X%HJYD@<);T3K0RUGo BL5BbU diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.rc b/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.rc deleted file mode 100644 index 151c68c..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/VisualPng.rc +++ /dev/null @@ -1,152 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -VISUALPNG MENU DISCARDABLE -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&Open Image...\tCtrl+O", IDM_FILE_OPEN - MENUITEM "Save &As...", IDM_FILE_SAVE - MENUITEM SEPARATOR - MENUITEM "&Next Image\tCtrl+N", IDM_FILE_NEXT - MENUITEM "Pre&vious Image\tCtrl+V", IDM_FILE_PREVIOUS - MENUITEM SEPARATOR - MENUITEM "E&xit\tAlt+X", IDM_FILE_EXIT - END - POPUP "&Options" - BEGIN - MENUITEM "&Stretch", IDM_OPTIONS_STRETCH, CHECKED - END - POPUP "&Help" - BEGIN - MENUITEM "&About", IDM_HELP_ABOUT - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Accelerator -// - -VISUALPNG ACCELERATORS DISCARDABLE -BEGIN - "N", IDM_FILE_NEXT, VIRTKEY, CONTROL, NOINVERT - "O", IDM_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT - "P", IDM_FILE_PREVIOUS, VIRTKEY, CONTROL, NOINVERT - "V", IDM_FILE_PREVIOUS, VIRTKEY, CONTROL, NOINVERT - "X", IDM_FILE_EXIT, VIRTKEY, ALT, NOINVERT -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -VISUALPNG ICON DISCARDABLE "VisualPng.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -ABOUTBOX DIALOG DISCARDABLE 0, 0, 186, 94 -STYLE DS_MODALFRAME | WS_POPUP -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,68,67,50,14 - CTEXT "VisualPng 1.0 - June 2000",IDC_STATIC,49,14,88,8 - LTEXT "a PNG image viewer",IDC_STATIC,60,30,66,8 - LTEXT "(c) Willem van Schaik, 2000",IDC_STATIC,48,52,90,8 - LTEXT "to demonstrate the use of libpng in Visual C", - IDC_STATIC,25,38,136,8 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - "ABOUTBOX", DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - BOTTOMMARGIN, 87 - END -END -#endif // APSTUDIO_INVOKED - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/cexcept.h b/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/cexcept.h deleted file mode 100644 index 532b23d..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/cexcept.h +++ /dev/null @@ -1,244 +0,0 @@ -/*=== -cexcept.h 1.0.0 (2000-Jun-21-Wed) -Adam M. Costello - -An interface for exception-handling in ANSI C, developed jointly with -Cosmin Truta . - - Copyright (c) 2000 Adam M. Costello and Cosmin Truta. Everyone - is hereby granted permission to do whatever they like with this - file, provided that if they modify it they take reasonable steps to - avoid confusing or misleading people about the authors, version, - and terms of use of the derived file. The copyright holders make - no guarantees about the correctness of this file, and are not - responsible for any damage resulting from its use. - -If this interface is used by multiple .c files, they shouldn't include -this header file directly. Instead, create a wrapper header file that -includes this header file and then invokes the define_exception_type -macro (see below), and let your .c files include that header file. - -The interface consists of one type, one well-known name, and six macros. - - -define_exception_type(type_name); - - This macro is used like an external declaration. It specifies - the type of object that gets copied from the exception thrower to - the exception catcher. The type_name can be any type that can be - assigned to, that is, a non-constant arithmetic type, struct, union, - or pointer. Examples: - - define_exception_type(int); - - enum exception { out_of_memory, bad_arguments, disk_full }; - define_exception_type(enum exception); - - struct exception { int code; const char *msg; }; - define_exception_type(struct exception); - - -struct exception_context; - - This type may be used after the define_exception_type() macro has - been invoked. A struct exception_context must be known to both - the thrower and the catcher. It is expected that there be one - context for each thread that uses exceptions. It would certainly - be dangerous for multiple threads to access the same context. - One thread can use multiple contexts, but that is likely to be - confusing and not typically useful. The application can allocate - this structure in any way it pleases--automatic, static, or dynamic. - The application programmer should pretend not to know the structure - members, which are subject to change. - - -struct exception_context *the_exception_context; - - The Try/Catch and Throw statements (described below) implicitly - refer to a context, using the name the_exception_context. It is - the application's responsibility to make sure that this name yields - the address of a mutable (non-constant) struct exception_context - wherever those statements are used. Subject to that constraint, the - application may declare a variable of this name anywhere it likes - (inside a function, in a parameter list, or externally), and may - use whatever storage class specifiers (static, extern, etc) or type - qualifiers (const, volatile) it likes. Examples: - - static struct exception_context - * const the_exception_context = &foo; - - { struct exception_context *the_exception_context = bar; ... } - - int blah(struct exception_context *the_exception_context, ...); - - extern struct exception_context the_exception_context[1]; - - The last example illustrates a trick that avoids creating a pointer - object separate from the structure object. - - The name could even be a macro, for example: - - struct exception_context ec_array[numthreads]; - #define the_exception_context (ec_array + thread_id) - - Be aware that the_exception_context is used several times by the - Try/Catch/Throw macros, so it shouldn't be expensive or have side - effects. The expansion must be a drop-in replacement for an - identifier, so it's safest to put parentheses around it. - - -void init_exception_context(struct exception_context *ec); - - For context structures allocated statically (by an external - definition or using the "static" keyword), the implicit - initialization to all zeros is sufficient, but contexts allocated - by other means must be initialized using this macro before they - are used by a Try/Catch statement. It does no harm to initialize - a context more than once (by using this macro on a statically - allocated context, or using this macro twice on the same context), - but a context must not be re-initialized after it has been used by a - Try/Catch statement. - - -Try statement -Catch (expression) statement - - The Try/Catch/Throw macros are capitalized in order to avoid - confusion with the C++ keywords, which have subtly different - semantics. - - A Try/Catch statement has a syntax similar to an if/else - statement, except that the parenthesized expression goes after - the second keyword rather than the first. As with if/else, - there are two clauses, each of which may be a simple statement - ending with a semicolon or a brace-enclosed compound statement. - But whereas the else clause is optional, the Catch clause is - required. The expression must be a modifiable lvalue (something - capable of being assigned to) of the exact same type passed to - define_exception_type(). - - If a Throw that uses the same exception context as the Try/Catch is - executed within the Try clause (typically within a function called - by the Try clause), and the exception is not caught by a nested - Try/Catch statement, then a copy of the exception will be assigned - to the expression, and control will jump to the Catch clause. If no - such Throw is executed, then the assignment is not performed, and - the Catch clause is not executed. - - Regardless of whether an exception is caught, the expression is - always evaluated exactly once, which is significant if it has side - effects, for example: - - Try foo(); - Catch (p[++i].e) { ... } - - IMPORTANT: Jumping into or out of a Try clause (for example via - return, break, continue, goto, longjmp) is forbidden--the compiler - will not complain, but bad things will happen at run-time. Jumping - into or out of a Catch clause is okay, and so is jumping around - inside a Try clause. In many cases where one is tempted to return - from a Try clause, it will suffice to use Throw, and then return - from the Catch clause. Another option is to set a flag variable and - use goto to jump to the end of the Try clause, then check the flag - after the Try/Catch statement. - - IMPORTANT: The values of any non-volatile automatic variables - changed within the Try clause are undefined after an exception is - caught. Therefore, variables modified inside the Try block whose - values are needed later outside the Try block must either use static - storage or be declared with the "volatile" type qualifier. - - -Throw expression; - - A Throw statement is very much like a return statement, except that - the expression is required. Whereas return jumps back to the place - where the current function was called, Throw jumps back to the Catch - clause of the innermost enclosing Try clause. The expression must - be compatible with the type passed to define_exception_type(). The - exception must be caught, otherwise the program may crash. - - Slight limitation: If the expression is a comma-expression it must - be enclosed in parentheses. - - -Try statement -Catch_anonymous statement - - When the value of the exception is not needed, a Try/Catch statement - can use Catch_anonymous instead of Catch (expression). - - -Everything below this point is for the benefit of the compiler. The -application programmer should pretend not to know any of it, because it -is subject to change. - -===*/ - - -#ifndef CEXCEPT_H -#define CEXCEPT_H - - -#include - -#define define_exception_type(etype) \ -struct exception__state { \ - etype *exception; \ - jmp_buf env; \ -} - -struct exception_context { \ - struct exception__state *last; \ - int caught; \ -}; - -#define init_exception_context(ec) ((void)((ec)->last = 0)) - -#define Catch(e) exception__catch(&(e)) -#define Catch_anonymous exception__catch(0) - -#define Try \ - { \ - struct exception__state *exception__p, exception__s; \ - int exception__i; \ - exception__p = the_exception_context->last; \ - the_exception_context->last = &exception__s; \ - for (exception__i = 0; ; exception__i = 1) \ - if (exception__i) { \ - if (setjmp(exception__s.env) == 0) { \ - if (&exception__s) - -#define exception__catch(e_addr) \ - else { } \ - the_exception_context->caught = 0; \ - } \ - else the_exception_context->caught = 1; \ - the_exception_context->last = exception__p; \ - break; \ - } \ - else exception__s.exception = e_addr; \ - } \ - if (!the_exception_context->caught) { } \ - else - -/* Try ends with if(), and Catch begins and ends with else. This */ -/* ensures that the Try/Catch syntax is really the same as the */ -/* if/else syntax. */ -/* */ -/* We use &exception__s instead of 1 to appease compilers that */ -/* warn about constant expressions inside if(). Most compilers */ -/* should still recognize that &exception__s is never zero and avoid */ -/* generating test code. */ -/* */ -/* We use the variable exception__i to start the loop at the bottom, */ -/* rather than jump into the loop using a switch statement, to */ -/* appease compilers that warn about jumping into loops. */ - -#define Throw \ - for (;; longjmp(the_exception_context->last->env, 1)) \ - if (the_exception_context->last->exception) \ - *the_exception_context->last->exception = - - -#endif /* CEXCEPT_H */ diff --git a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/resource.h b/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/resource.h deleted file mode 100644 index b62176d..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/contrib/visupng/resource.h +++ /dev/null @@ -1,23 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by VisualPng.rc -// -#define IDM_FILE_OPEN 40001 -#define IDM_FILE_SAVE 40002 -#define IDM_FILE_NEXT 40003 -#define IDM_FILE_PREVIOUS 40004 -#define IDM_FILE_EXIT 40005 -#define IDM_OPTIONS_BACKGROUND 40006 -#define IDM_OPTIONS_STRETCH 40007 -#define IDM_HELP_ABOUT 40008 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 113 -#define _APS_NEXT_COMMAND_VALUE 40009 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/gtkmm-osx/trunk/libpng-1.2.5/example.c b/gtkmm-osx/trunk/libpng-1.2.5/example.c deleted file mode 100644 index 7956cf7..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/example.c +++ /dev/null @@ -1,804 +0,0 @@ - -#if 0 /* in case someone actually tries to compile this */ - -/* example.c - an example of using libpng */ - -/* This is an example of how to use libpng to read and write PNG files. - * The file libpng.txt is much more verbose then this. If you have not - * read it, do so first. This was designed to be a starting point of an - * implementation. This is not officially part of libpng, is hereby placed - * in the public domain, and therefore does not require a copyright notice. - * - * This file does not currently compile, because it is missing certain - * parts, like allocating memory to hold an image. You will have to - * supply these parts to get it to compile. For an example of a minimal - * working PNG reader/writer, see pngtest.c, included in this distribution; - * see also the programs in the contrib directory. - */ - -#include "png.h" - - /* The png_jmpbuf() macro, used in error handling, became available in - * libpng version 1.0.6. If you want to be able to run your code with older - * versions of libpng, you must define the macro yourself (but only if it - * is not already defined by libpng!). - */ - -#ifndef png_jmpbuf -# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) -#endif - -/* Check to see if a file is a PNG file using png_sig_cmp(). png_sig_cmp() - * returns zero if the image is a PNG and nonzero if it isn't a PNG. - * - * The function check_if_png() shown here, but not used, returns nonzero (true) - * if the file can be opened and is a PNG, 0 (false) otherwise. - * - * If this call is successful, and you are going to keep the file open, - * you should call png_set_sig_bytes(png_ptr, PNG_BYTES_TO_CHECK); once - * you have created the png_ptr, so that libpng knows your application - * has read that many bytes from the start of the file. Make sure you - * don't call png_set_sig_bytes() with more than 8 bytes read or give it - * an incorrect number of bytes read, or you will either have read too - * many bytes (your fault), or you are telling libpng to read the wrong - * number of magic bytes (also your fault). - * - * Many applications already read the first 2 or 4 bytes from the start - * of the image to determine the file type, so it would be easiest just - * to pass the bytes to png_sig_cmp() or even skip that if you know - * you have a PNG file, and call png_set_sig_bytes(). - */ -#define PNG_BYTES_TO_CHECK 4 -int check_if_png(char *file_name, FILE **fp) -{ - char buf[PNG_BYTES_TO_CHECK]; - - /* Open the prospective PNG file. */ - if ((*fp = fopen(file_name, "rb")) == NULL) - return 0; - - /* Read in some of the signature bytes */ - if (fread(buf, 1, PNG_BYTES_TO_CHECK, *fp) != PNG_BYTES_TO_CHECK) - return 0; - - /* Compare the first PNG_BYTES_TO_CHECK bytes of the signature. - Return nonzero (true) if they match */ - - return(!png_sig_cmp(buf, (png_size_t)0, PNG_BYTES_TO_CHECK)); -} - -/* Read a PNG file. You may want to return an error code if the read - * fails (depending upon the failure). There are two "prototypes" given - * here - one where we are given the filename, and we need to open the - * file, and the other where we are given an open file (possibly with - * some or all of the magic bytes read - see comments above). - */ -#ifdef open_file /* prototype 1 */ -void read_png(char *file_name) /* We need to open the file */ -{ - png_structp png_ptr; - png_infop info_ptr; - unsigned int sig_read = 0; - png_uint_32 width, height; - int bit_depth, color_type, interlace_type; - FILE *fp; - - if ((fp = fopen(file_name, "rb")) == NULL) - return (ERROR); -#else no_open_file /* prototype 2 */ -void read_png(FILE *fp, unsigned int sig_read) /* file is already open */ -{ - png_structp png_ptr; - png_infop info_ptr; - png_uint_32 width, height; - int bit_depth, color_type, interlace_type; -#endif no_open_file /* only use one prototype! */ - - /* Create and initialize the png_struct with the desired error handler - * functions. If you want to use the default stderr and longjump method, - * you can supply NULL for the last three parameters. We also supply the - * the compiler header file version, so that we know if the application - * was compiled with a compatible version of the library. REQUIRED - */ - png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, - png_voidp user_error_ptr, user_error_fn, user_warning_fn); - - if (png_ptr == NULL) - { - fclose(fp); - return (ERROR); - } - - /* Allocate/initialize the memory for image information. REQUIRED. */ - info_ptr = png_create_info_struct(png_ptr); - if (info_ptr == NULL) - { - fclose(fp); - png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL); - return (ERROR); - } - - /* Set error handling if you are using the setjmp/longjmp method (this is - * the normal method of doing things with libpng). REQUIRED unless you - * set up your own error handlers in the png_create_read_struct() earlier. - */ - - if (setjmp(png_jmpbuf(png_ptr))) - { - /* Free all of the memory associated with the png_ptr and info_ptr */ - png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); - fclose(fp); - /* If we get here, we had a problem reading the file */ - return (ERROR); - } - - /* One of the following I/O initialization methods is REQUIRED */ -#ifdef streams /* PNG file I/O method 1 */ - /* Set up the input control if you are using standard C streams */ - png_init_io(png_ptr, fp); - -#else no_streams /* PNG file I/O method 2 */ - /* If you are using replacement read functions, instead of calling - * png_init_io() here you would call: - */ - png_set_read_fn(png_ptr, (void *)user_io_ptr, user_read_fn); - /* where user_io_ptr is a structure you want available to the callbacks */ -#endif no_streams /* Use only one I/O method! */ - - /* If we have already read some of the signature */ - png_set_sig_bytes(png_ptr, sig_read); - -#ifdef hilevel - /* - * If you have enough memory to read in the entire image at once, - * and you need to specify only transforms that can be controlled - * with one of the PNG_TRANSFORM_* bits (this presently excludes - * dithering, filling, setting background, and doing gamma - * adjustment), then you can read the entire image (including - * pixels) into the info structure with this call: - */ - png_read_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL); -#else - /* OK, you're doing it the hard way, with the lower-level functions */ - - /* The call to png_read_info() gives us all of the information from the - * PNG file before the first IDAT (image data chunk). REQUIRED - */ - png_read_info(png_ptr, info_ptr); - - png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - &interlace_type, int_p_NULL, int_p_NULL); - -/* Set up the data transformations you want. Note that these are all - * optional. Only call them if you want/need them. Many of the - * transformations only work on specific types of images, and many - * are mutually exclusive. - */ - - /* tell libpng to strip 16 bit/color files down to 8 bits/color */ - png_set_strip_16(png_ptr); - - /* Strip alpha bytes from the input data without combining with the - * background (not recommended). - */ - png_set_strip_alpha(png_ptr); - - /* Extract multiple pixels with bit depths of 1, 2, and 4 from a single - * byte into separate bytes (useful for paletted and grayscale images). - */ - png_set_packing(png_ptr); - - /* Change the order of packed pixels to least significant bit first - * (not useful if you are using png_set_packing). */ - png_set_packswap(png_ptr); - - /* Expand paletted colors into true RGB triplets */ - if (color_type == PNG_COLOR_TYPE_PALETTE) - png_set_palette_rgb(png_ptr); - - /* Expand grayscale images to the full 8 bits from 1, 2, or 4 bits/pixel */ - if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) - png_set_gray_1_2_4_to_8(png_ptr); - - /* Expand paletted or RGB images with transparency to full alpha channels - * so the data will be available as RGBA quartets. - */ - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) - png_set_tRNS_to_alpha(png_ptr); - - /* Set the background color to draw transparent and alpha images over. - * It is possible to set the red, green, and blue components directly - * for paletted images instead of supplying a palette index. Note that - * even if the PNG file supplies a background, you are not required to - * use it - you should use the (solid) application background if it has one. - */ - - png_color_16 my_background, *image_background; - - if (png_get_bKGD(png_ptr, info_ptr, &image_background)) - png_set_background(png_ptr, image_background, - PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); - else - png_set_background(png_ptr, &my_background, - PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); - - /* Some suggestions as to how to get a screen gamma value */ - - /* Note that screen gamma is the display_exponent, which includes - * the CRT_exponent and any correction for viewing conditions */ - if (/* We have a user-defined screen gamma value */) - { - screen_gamma = user-defined screen_gamma; - } - /* This is one way that applications share the same screen gamma value */ - else if ((gamma_str = getenv("SCREEN_GAMMA")) != NULL) - { - screen_gamma = atof(gamma_str); - } - /* If we don't have another value */ - else - { - screen_gamma = 2.2; /* A good guess for a PC monitors in a dimly - lit room */ - screen_gamma = 1.7 or 1.0; /* A good guess for Mac systems */ - } - - /* Tell libpng to handle the gamma conversion for you. The final call - * is a good guess for PC generated images, but it should be configurable - * by the user at run time by the user. It is strongly suggested that - * your application support gamma correction. - */ - - int intent; - - if (png_get_sRGB(png_ptr, info_ptr, &intent)) - png_set_gamma(png_ptr, screen_gamma, 0.45455); - else - { - double image_gamma; - if (png_get_gAMA(png_ptr, info_ptr, &image_gamma)) - png_set_gamma(png_ptr, screen_gamma, image_gamma); - else - png_set_gamma(png_ptr, screen_gamma, 0.45455); - } - - /* Dither RGB files down to 8 bit palette or reduce palettes - * to the number of colors available on your screen. - */ - if (color_type & PNG_COLOR_MASK_COLOR) - { - int num_palette; - png_colorp palette; - - /* This reduces the image to the application supplied palette */ - if (/* we have our own palette */) - { - /* An array of colors to which the image should be dithered */ - png_color std_color_cube[MAX_SCREEN_COLORS]; - - png_set_dither(png_ptr, std_color_cube, MAX_SCREEN_COLORS, - MAX_SCREEN_COLORS, png_uint_16p_NULL, 0); - } - /* This reduces the image to the palette supplied in the file */ - else if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette)) - { - png_uint_16p histogram = NULL; - - png_get_hIST(png_ptr, info_ptr, &histogram); - - png_set_dither(png_ptr, palette, num_palette, - max_screen_colors, histogram, 0); - } - } - - /* invert monochrome files to have 0 as white and 1 as black */ - png_set_invert_mono(png_ptr); - - /* If you want to shift the pixel values from the range [0,255] or - * [0,65535] to the original [0,7] or [0,31], or whatever range the - * colors were originally in: - */ - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_sBIT)) - { - png_color_8p sig_bit; - - png_get_sBIT(png_ptr, info_ptr, &sig_bit); - png_set_shift(png_ptr, sig_bit); - } - - /* flip the RGB pixels to BGR (or RGBA to BGRA) */ - if (color_type & PNG_COLOR_MASK_COLOR) - png_set_bgr(png_ptr); - - /* swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */ - png_set_swap_alpha(png_ptr); - - /* swap bytes of 16 bit files to least significant byte first */ - png_set_swap(png_ptr); - - /* Add filler (or alpha) byte (before/after each RGB triplet) */ - png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER); - - /* Turn on interlace handling. REQUIRED if you are not using - * png_read_image(). To see how to handle interlacing passes, - * see the png_read_row() method below: - */ - number_passes = png_set_interlace_handling(png_ptr); - - /* Optional call to gamma correct and add the background to the palette - * and update info structure. REQUIRED if you are expecting libpng to - * update the palette for you (ie you selected such a transform above). - */ - png_read_update_info(png_ptr, info_ptr); - - /* Allocate the memory to hold the image using the fields of info_ptr. */ - - /* The easiest way to read the image: */ - png_bytep row_pointers[height]; - - for (row = 0; row < height; row++) - { - row_pointers[row] = png_malloc(png_ptr, png_get_rowbytes(png_ptr, - info_ptr)); - } - - /* Now it's time to read the image. One of these methods is REQUIRED */ -#ifdef entire /* Read the entire image in one go */ - png_read_image(png_ptr, row_pointers); - -#else no_entire /* Read the image one or more scanlines at a time */ - /* The other way to read images - deal with interlacing: */ - - for (pass = 0; pass < number_passes; pass++) - { -#ifdef single /* Read the image a single row at a time */ - for (y = 0; y < height; y++) - { - png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL, 1); - } - -#else no_single /* Read the image several rows at a time */ - for (y = 0; y < height; y += number_of_rows) - { -#ifdef sparkle /* Read the image using the "sparkle" effect. */ - png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL, - number_of_rows); -#else no_sparkle /* Read the image using the "rectangle" effect */ - png_read_rows(png_ptr, png_bytepp_NULL, &row_pointers[y], - number_of_rows); -#endif no_sparkle /* use only one of these two methods */ - } - - /* if you want to display the image after every pass, do - so here */ -#endif no_single /* use only one of these two methods */ - } -#endif no_entire /* use only one of these two methods */ - - /* read rest of file, and get additional chunks in info_ptr - REQUIRED */ - png_read_end(png_ptr, info_ptr); -#endif hilevel - - /* At this point you have read the entire image */ - - /* clean up after the read, and free any memory allocated - REQUIRED */ - png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); - - /* close the file */ - fclose(fp); - - /* that's it */ - return (OK); -} - -/* progressively read a file */ - -int -initialize_png_reader(png_structp *png_ptr, png_infop *info_ptr) -{ - /* Create and initialize the png_struct with the desired error handler - * functions. If you want to use the default stderr and longjump method, - * you can supply NULL for the last three parameters. We also check that - * the library version is compatible in case we are using dynamically - * linked libraries. - */ - *png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, - png_voidp user_error_ptr, user_error_fn, user_warning_fn); - - if (*png_ptr == NULL) - { - *info_ptr = NULL; - return (ERROR); - } - - *info_ptr = png_create_info_struct(png_ptr); - - if (*info_ptr == NULL) - { - png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL); - return (ERROR); - } - - if (setjmp(png_jmpbuf((*png_ptr)))) - { - png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL); - return (ERROR); - } - - /* This one's new. You will need to provide all three - * function callbacks, even if you aren't using them all. - * If you aren't using all functions, you can specify NULL - * parameters. Even when all three functions are NULL, - * you need to call png_set_progressive_read_fn(). - * These functions shouldn't be dependent on global or - * static variables if you are decoding several images - * simultaneously. You should store stream specific data - * in a separate struct, given as the second parameter, - * and retrieve the pointer from inside the callbacks using - * the function png_get_progressive_ptr(png_ptr). - */ - png_set_progressive_read_fn(*png_ptr, (void *)stream_data, - info_callback, row_callback, end_callback); - - return (OK); -} - -int -process_data(png_structp *png_ptr, png_infop *info_ptr, - png_bytep buffer, png_uint_32 length) -{ - if (setjmp(png_jmpbuf((*png_ptr)))) - { - /* Free the png_ptr and info_ptr memory on error */ - png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL); - return (ERROR); - } - - /* This one's new also. Simply give it chunks of data as - * they arrive from the data stream (in order, of course). - * On Segmented machines, don't give it any more than 64K. - * The library seems to run fine with sizes of 4K, although - * you can give it much less if necessary (I assume you can - * give it chunks of 1 byte, but I haven't tried with less - * than 256 bytes yet). When this function returns, you may - * want to display any rows that were generated in the row - * callback, if you aren't already displaying them there. - */ - png_process_data(*png_ptr, *info_ptr, buffer, length); - return (OK); -} - -info_callback(png_structp png_ptr, png_infop info) -{ -/* do any setup here, including setting any of the transformations - * mentioned in the Reading PNG files section. For now, you _must_ - * call either png_start_read_image() or png_read_update_info() - * after all the transformations are set (even if you don't set - * any). You may start getting rows before png_process_data() - * returns, so this is your last chance to prepare for that. - */ -} - -row_callback(png_structp png_ptr, png_bytep new_row, - png_uint_32 row_num, int pass) -{ -/* - * This function is called for every row in the image. If the - * image is interlaced, and you turned on the interlace handler, - * this function will be called for every row in every pass. - * - * In this function you will receive a pointer to new row data from - * libpng called new_row that is to replace a corresponding row (of - * the same data format) in a buffer allocated by your application. - * - * The new row data pointer new_row may be NULL, indicating there is - * no new data to be replaced (in cases of interlace loading). - * - * If new_row is not NULL then you need to call - * png_progressive_combine_row() to replace the corresponding row as - * shown below: - */ - /* Check if row_num is in bounds. */ - if((row_num >= 0) && (row_num < height)) - { - /* Get pointer to corresponding row in our - * PNG read buffer. - */ - png_bytep old_row = ((png_bytep *)our_data)[row_num]; - - /* If both rows are allocated then copy the new row - * data to the corresponding row data. - */ - if((old_row != NULL) && (new_row != NULL)) - png_progressive_combine_row(png_ptr, old_row, new_row); - } -/* - * The rows and passes are called in order, so you don't really - * need the row_num and pass, but I'm supplying them because it - * may make your life easier. - * - * For the non-NULL rows of interlaced images, you must call - * png_progressive_combine_row() passing in the new row and the - * old row, as demonstrated above. You can call this function for - * NULL rows (it will just return) and for non-interlaced images - * (it just does the png_memcpy for you) if it will make the code - * easier. Thus, you can just do this for all cases: - */ - - png_progressive_combine_row(png_ptr, old_row, new_row); - -/* where old_row is what was displayed for previous rows. Note - * that the first pass (pass == 0 really) will completely cover - * the old row, so the rows do not have to be initialized. After - * the first pass (and only for interlaced images), you will have - * to pass the current row as new_row, and the function will combine - * the old row and the new row. - */ -} - -end_callback(png_structp png_ptr, png_infop info) -{ -/* this function is called when the whole image has been read, - * including any chunks after the image (up to and including - * the IEND). You will usually have the same info chunk as you - * had in the header, although some data may have been added - * to the comments and time fields. - * - * Most people won't do much here, perhaps setting a flag that - * marks the image as finished. - */ -} - -/* write a png file */ -void write_png(char *file_name /* , ... other image information ... */) -{ - FILE *fp; - png_structp png_ptr; - png_infop info_ptr; - png_colorp palette; - - /* open the file */ - fp = fopen(file_name, "wb"); - if (fp == NULL) - return (ERROR); - - /* Create and initialize the png_struct with the desired error handler - * functions. If you want to use the default stderr and longjump method, - * you can supply NULL for the last three parameters. We also check that - * the library version is compatible with the one used at compile time, - * in case we are using dynamically linked libraries. REQUIRED. - */ - png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, - png_voidp user_error_ptr, user_error_fn, user_warning_fn); - - if (png_ptr == NULL) - { - fclose(fp); - return (ERROR); - } - - /* Allocate/initialize the image information data. REQUIRED */ - info_ptr = png_create_info_struct(png_ptr); - if (info_ptr == NULL) - { - fclose(fp); - png_destroy_write_struct(&png_ptr, png_infopp_NULL); - return (ERROR); - } - - /* Set error handling. REQUIRED if you aren't supplying your own - * error handling functions in the png_create_write_struct() call. - */ - if (setjmp(png_jmpbuf(png_ptr))) - { - /* If we get here, we had a problem reading the file */ - fclose(fp); - png_destroy_write_struct(&png_ptr, &info_ptr); - return (ERROR); - } - - /* One of the following I/O initialization functions is REQUIRED */ -#ifdef streams /* I/O initialization method 1 */ - /* set up the output control if you are using standard C streams */ - png_init_io(png_ptr, fp); -#else no_streams /* I/O initialization method 2 */ - /* If you are using replacement read functions, instead of calling - * png_init_io() here you would call */ - png_set_write_fn(png_ptr, (void *)user_io_ptr, user_write_fn, - user_IO_flush_function); - /* where user_io_ptr is a structure you want available to the callbacks */ -#endif no_streams /* only use one initialization method */ - -#ifdef hilevel - /* This is the easy way. Use it if you already have all the - * image info living info in the structure. You could "|" many - * PNG_TRANSFORM flags into the png_transforms integer here. - */ - png_write_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL); -#else - /* This is the hard way */ - - /* Set the image information here. Width and height are up to 2^31, - * bit_depth is one of 1, 2, 4, 8, or 16, but valid values also depend on - * the color_type selected. color_type is one of PNG_COLOR_TYPE_GRAY, - * PNG_COLOR_TYPE_GRAY_ALPHA, PNG_COLOR_TYPE_PALETTE, PNG_COLOR_TYPE_RGB, - * or PNG_COLOR_TYPE_RGB_ALPHA. interlace is either PNG_INTERLACE_NONE or - * PNG_INTERLACE_ADAM7, and the compression_type and filter_type MUST - * currently be PNG_COMPRESSION_TYPE_BASE and PNG_FILTER_TYPE_BASE. REQUIRED - */ - png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, PNG_COLOR_TYPE_???, - PNG_INTERLACE_????, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); - - /* set the palette if there is one. REQUIRED for indexed-color images */ - palette = (png_colorp)png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH - * sizeof (png_color)); - /* ... set palette colors ... */ - png_set_PLTE(png_ptr, info_ptr, palette, PNG_MAX_PALETTE_LENGTH); - /* You must not free palette here, because png_set_PLTE only makes a link to - the palette that you malloced. Wait until you are about to destroy - the png structure. */ - - /* optional significant bit chunk */ - /* if we are dealing with a grayscale image then */ - sig_bit.gray = true_bit_depth; - /* otherwise, if we are dealing with a color image then */ - sig_bit.red = true_red_bit_depth; - sig_bit.green = true_green_bit_depth; - sig_bit.blue = true_blue_bit_depth; - /* if the image has an alpha channel then */ - sig_bit.alpha = true_alpha_bit_depth; - png_set_sBIT(png_ptr, info_ptr, sig_bit); - - - /* Optional gamma chunk is strongly suggested if you have any guess - * as to the correct gamma of the image. - */ - png_set_gAMA(png_ptr, info_ptr, gamma); - - /* Optionally write comments into the image */ - text_ptr[0].key = "Title"; - text_ptr[0].text = "Mona Lisa"; - text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE; - text_ptr[1].key = "Author"; - text_ptr[1].text = "Leonardo DaVinci"; - text_ptr[1].compression = PNG_TEXT_COMPRESSION_NONE; - text_ptr[2].key = "Description"; - text_ptr[2].text = ""; - text_ptr[2].compression = PNG_TEXT_COMPRESSION_zTXt; -#ifdef PNG_iTXt_SUPPORTED - text_ptr[0].lang = NULL; - text_ptr[1].lang = NULL; - text_ptr[2].lang = NULL; -#endif - png_set_text(png_ptr, info_ptr, text_ptr, 3); - - /* other optional chunks like cHRM, bKGD, tRNS, tIME, oFFs, pHYs, */ - /* note that if sRGB is present the gAMA and cHRM chunks must be ignored - * on read and must be written in accordance with the sRGB profile */ - - /* Write the file header information. REQUIRED */ - png_write_info(png_ptr, info_ptr); - - /* If you want, you can write the info in two steps, in case you need to - * write your private chunk ahead of PLTE: - * - * png_write_info_before_PLTE(write_ptr, write_info_ptr); - * write_my_chunk(); - * png_write_info(png_ptr, info_ptr); - * - * However, given the level of known- and unknown-chunk support in 1.1.0 - * and up, this should no longer be necessary. - */ - - /* Once we write out the header, the compression type on the text - * chunks gets changed to PNG_TEXT_COMPRESSION_NONE_WR or - * PNG_TEXT_COMPRESSION_zTXt_WR, so it doesn't get written out again - * at the end. - */ - - /* set up the transformations you want. Note that these are - * all optional. Only call them if you want them. - */ - - /* invert monochrome pixels */ - png_set_invert_mono(png_ptr); - - /* Shift the pixels up to a legal bit depth and fill in - * as appropriate to correctly scale the image. - */ - png_set_shift(png_ptr, &sig_bit); - - /* pack pixels into bytes */ - png_set_packing(png_ptr); - - /* swap location of alpha bytes from ARGB to RGBA */ - png_set_swap_alpha(png_ptr); - - /* Get rid of filler (OR ALPHA) bytes, pack XRGB/RGBX/ARGB/RGBA into - * RGB (4 channels -> 3 channels). The second parameter is not used. - */ - png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); - - /* flip BGR pixels to RGB */ - png_set_bgr(png_ptr); - - /* swap bytes of 16-bit files to most significant byte first */ - png_set_swap(png_ptr); - - /* swap bits of 1, 2, 4 bit packed pixel formats */ - png_set_packswap(png_ptr); - - /* turn on interlace handling if you are not using png_write_image() */ - if (interlacing) - number_passes = png_set_interlace_handling(png_ptr); - else - number_passes = 1; - - /* The easiest way to write the image (you may have a different memory - * layout, however, so choose what fits your needs best). You need to - * use the first method if you aren't handling interlacing yourself. - */ - png_uint_32 k, height, width; - png_byte image[height][width*bytes_per_pixel]; - png_bytep row_pointers[height]; - for (k = 0; k < height; k++) - row_pointers[k] = image + k*width*bytes_per_pixel; - - /* One of the following output methods is REQUIRED */ -#ifdef entire /* write out the entire image data in one call */ - png_write_image(png_ptr, row_pointers); - - /* the other way to write the image - deal with interlacing */ - -#else no_entire /* write out the image data by one or more scanlines */ - /* The number of passes is either 1 for non-interlaced images, - * or 7 for interlaced images. - */ - for (pass = 0; pass < number_passes; pass++) - { - /* Write a few rows at a time. */ - png_write_rows(png_ptr, &row_pointers[first_row], number_of_rows); - - /* If you are only writing one row at a time, this works */ - for (y = 0; y < height; y++) - { - png_write_rows(png_ptr, &row_pointers[y], 1); - } - } -#endif no_entire /* use only one output method */ - - /* You can write optional chunks like tEXt, zTXt, and tIME at the end - * as well. Shouldn't be necessary in 1.1.0 and up as all the public - * chunks are supported and you can use png_set_unknown_chunks() to - * register unknown chunks into the info structure to be written out. - */ - - /* It is REQUIRED to call this to finish writing the rest of the file */ - png_write_end(png_ptr, info_ptr); -#endif hilevel - - /* If you png_malloced a palette, free it here (don't free info_ptr->palette, - as recommended in versions 1.0.5m and earlier of this example; if - libpng mallocs info_ptr->palette, libpng will free it). If you - allocated it with malloc() instead of png_malloc(), use free() instead - of png_free(). */ - png_free(png_ptr, palette); - palette=NULL; - - /* Similarly, if you png_malloced any data that you passed in with - png_set_something(), such as a hist or trans array, free it here, - when you can be sure that libpng is through with it. */ - png_free(png_ptr, trans); - trans=NULL; - - /* clean up after the write, and free any memory allocated */ - png_destroy_write_struct(&png_ptr, &info_ptr); - - /* close the file */ - fclose(fp); - - /* that's it */ - return (OK); -} - -#endif /* if 0 */ diff --git a/gtkmm-osx/trunk/libpng-1.2.5/libpng-config b/gtkmm-osx/trunk/libpng-1.2.5/libpng-config deleted file mode 100755 index 04ec9a7..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/libpng-config +++ /dev/null @@ -1,121 +0,0 @@ -#! /bin/sh - -# libpng-config -# provides configuration info for libpng. - -# Copyright (C) 2002 Glenn Randers-Pehrson -# For conditions of distribution and use, see copyright notice in png.h - -# Modeled after libxml-config. - -version=1.2.5 -prefix="" -libdir="" -libs="" -I_opts="" -L_opts="" -R_opts="" -cppflags="" -ccopts="" -ldopts="" - -prefix="/Users/darco/Projects/GTK/output" -I_opts="-I/Users/darco/Projects/GTK/output/include/libpng12" -L_opts="-L/Users/darco/Projects/GTK/output/lib" -libs="-lpng12 -lz" - -usage() -{ - cat <\fP - -\fI\fB - -\fBpng_uint_32 png_access_version_number \fI(void\fP\fB);\fP - -\fI\fB - -\fBint png_check_sig (png_bytep \fP\fIsig\fP\fB, int \fInum\fP\fB);\fP - -\fI\fB - -\fBvoid png_chunk_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP - -\fI\fB - -\fBvoid png_chunk_warning (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fImessage\fP\fB);\fP - -\fI\fB - -\fBvoid png_convert_from_struct_tm (png_timep \fP\fIptime\fP\fB, struct tm FAR * \fIttime\fP\fB);\fP - -\fI\fB - -\fBvoid png_convert_from_time_t (png_timep \fP\fIptime\fP\fB, time_t \fIttime\fP\fB);\fP - -\fI\fB - -\fBpng_charp png_convert_to_rfc1123 (png_structp \fP\fIpng_ptr\fP\fB, png_timep \fIptime\fP\fB);\fP - -\fI\fB - -\fBpng_infop png_create_info_struct (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_structp png_create_read_struct (png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarn_fn\fP\fB);\fP - -\fI\fB - -\fBpng_structp png_create_read_struct_2(png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP - -\fI\fB - -\fBpng_structp png_create_write_struct (png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarn_fn\fP\fB);\fP - -\fI\fB - -\fBpng_structp png_create_write_struct_2(png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP - -\fI\fB - -\fBint png_debug(int \fP\fIlevel\fP\fB, png_const_charp \fImessage\fP\fB);\fP - -\fI\fB - -\fBint png_debug1(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fIp1\fP\fB);\fP - -\fI\fB - -\fBint png_debug2(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fP\fIp1\fP\fB, \fIp2\fP\fB);\fP - -\fI\fB - -\fBvoid png_destroy_info_struct (png_structp \fP\fIpng_ptr\fP\fB, png_infopp \fIinfo_ptr_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_destroy_read_struct (png_structpp \fP\fIpng_ptr_ptr\fP\fB, png_infopp \fP\fIinfo_ptr_ptr\fP\fB, png_infopp \fIend_info_ptr_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_destroy_write_struct (png_structpp \fP\fIpng_ptr_ptr\fP\fB, png_infopp \fIinfo_ptr_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP - -\fI\fB - -\fBvoid png_free (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fIptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_free_chunk_list (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_free_default(png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fIptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_free_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fInum\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_asm_flags (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_bit_depth (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_16p \fI*background\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_channels (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fP\fI*white_x\fP\fB, double \fP\fI*white_y\fP\fB, double \fP\fI*red_x\fP\fB, double \fP\fI*red_y\fP\fB, double \fP\fI*green_x\fP\fB, double \fP\fI*green_y\fP\fB, double \fP\fI*blue_x\fP\fB, double \fI*blue_y\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*white_x\fP\fB, png_uint_32 \fP\fI*white_y\fP\fB, png_uint_32 \fP\fI*red_x\fP\fB, png_uint_32 \fP\fI*red_y\fP\fB, png_uint_32 \fP\fI*green_x\fP\fB, png_uint_32 \fP\fI*green_y\fP\fB, png_uint_32 \fP\fI*blue_x\fP\fB, png_uint_32 \fI*blue_y\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_color_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_compression_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_copyright (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_get_error_ptr (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_filter_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_gAMA (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fI*file_gamma\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_gAMA_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fI*int_file_gamma\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_header_ver (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_header_version (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fI*hist\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charpp \fP\fIname\fP\fB, int \fP\fI*compression_type\fP\fB, png_charpp \fP\fIprofile\fP\fB, png_uint_32 \fI*proflen\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*width\fP\fB, png_uint_32 \fP\fI*height\fP\fB, int \fP\fI*bit_depth\fP\fB, int \fP\fI*color_type\fP\fB, int \fP\fI*interlace_type\fP\fB, int \fP\fI*compression_type\fP\fB, int \fI*filter_type\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_image_height (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_image_width (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_interlace_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_get_io_ptr (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_libpng_ver (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_get_mem_ptr(png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_mmx_bitdepth_threshold (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_mmx_flagmask (int \fP\fIflag_select\fP\fB, int \fI*compilerID\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_mmx_rowbytes_threshold (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*offset_x\fP\fB, png_uint_32 \fP\fI*offset_y\fP\fB, int \fI*unit_type\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fI*purpose\fP\fB, png_int_32 \fP\fI*X0\fP\fB, png_int_32 \fP\fI*X1\fP\fB, int \fP\fI*type\fP\fB, int \fP\fI*nparams\fP\fB, png_charp \fP\fI*units\fP\fB, png_charpp \fI*params\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*res_x\fP\fB, png_uint_32 \fP\fI*res_y\fP\fB, int \fI*unit_type\fP\fB);\fP - -\fI\fB - -\fBfloat png_get_pixel_aspect_ratio (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_pixels_per_meter (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_get_progressive_ptr (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_colorp \fP\fI*palette\fP\fB, int \fI*num_palette\fP\fB);\fP - -\fI\fB - -\fBpng_byte png_get_rgb_to_gray_status (png_structp \fIpng_ptr) - -\fBpng_uint_32 png_get_rowbytes (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_bytepp png_get_rows (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_8p \fI*sig_bit\fP\fB);\fP - -\fI\fB - -\fBpng_bytep png_get_signature (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_spalette_p \fI*splt_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fI*intent\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_text (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fI*text_ptr\fP\fB, int \fI*num_text\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_timep \fI*mod_time\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fI*trans\fP\fB, int \fP\fI*num_trans\fP\fB, png_color_16p \fI*trans_values\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_unknown_chunkpp \fIunknowns\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_get_user_chunk_ptr (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_get_user_transform_ptr (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_valid (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIflag\fP\fB);\fP - -\fI\fB - -\fBpng_int_32 png_get_x_offset_microns (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_int_32 png_get_x_offset_pixels (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_x_pixels_per_meter (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_int_32 png_get_y_offset_microns (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_int_32 png_get_y_offset_pixels (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_y_pixels_per_meter (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_compression_buffer_size (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBint png_handle_as_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP - -\fI\fB - -\fBvoid png_init_io (png_structp \fP\fIpng_ptr\fP\fB, FILE \fI*fp\fP\fB);\fP - -\fI\fB - -\fBDEPRECATED: void png_info_init (png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBDEPRECATED: void png_info_init_2 (png_infopp \fP\fIptr_ptr\fP\fB, png_size_t \fIpng_info_struct_size\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_malloc (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_malloc_default(png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_malloc_warn (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP - -\fI\fB - -\fBvoidp png_memcpy (png_voidp \fP\fIs1\fP\fB, png_voidp \fP\fIs2\fP\fB, png_size_t \fIsize\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_memcpy_check (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIs1\fP\fB, png_voidp \fP\fIs2\fP\fB, png_uint_32 \fIsize\fP\fB);\fP - -\fI\fB - -\fBvoidp png_memset (png_voidp \fP\fIs1\fP\fB, int \fP\fIvalue\fP\fB, png_size_t \fIsize\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_memset_check (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIs1\fP\fB, int \fP\fIvalue\fP\fB, png_uint_32 \fIsize\fP\fB);\fP - -\fI\fB - -\fBint png_mmx_support \fI(void\fP\fB);\fP - -\fI\fB - -\fBDEPRECATED: void png_permit_empty_plte (png_structp \fP\fIpng_ptr\fP\fB, int \fIempty_plte_permitted\fP\fB);\fP - -\fI\fB - -\fBvoid png_process_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_size\fP\fB);\fP - -\fI\fB - -\fBvoid png_progressive_combine_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIold_row\fP\fB, png_bytep \fInew_row\fP\fB);\fP - -\fI\fB - -\fBvoid png_read_destroy (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_infop \fIend_info_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_read_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_read_image (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fIimage\fP\fB);\fP - -\fI\fB - -\fBDEPRECATED: void png_read_init (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBDEPRECATED: void png_read_init_2 (png_structpp \fP\fIptr_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP - -\fI\fB - -\fBvoid png_read_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_read_png (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fItransforms\fP\fB, png_voidp \fIparams\fP\fB);\fP - -\fI\fB - -\fBvoid png_read_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fIdisplay_row\fP\fB);\fP - -\fI\fB - -\fBvoid png_read_rows (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fP\fIrow\fP\fB, png_bytepp \fP\fIdisplay_row\fP\fB, png_uint_32 \fInum_rows\fP\fB);\fP - -\fI\fB - -\fBvoid png_read_update_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_set_asm_flags (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIasm_flags\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_background (png_structp \fP\fIpng_ptr\fP\fB, png_color_16p \fP\fIbackground_color\fP\fB, int \fP\fIbackground_gamma_code\fP\fB, int \fP\fIneed_expand\fP\fB, double \fIbackground_gamma\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_bgr (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_16p \fIbackground\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fP\fIwhite_x\fP\fB, double \fP\fIwhite_y\fP\fB, double \fP\fIred_x\fP\fB, double \fP\fIred_y\fP\fB, double \fP\fIgreen_x\fP\fB, double \fP\fIgreen_y\fP\fB, double \fP\fIblue_x\fP\fB, double \fIblue_y\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIwhite_x\fP\fB, png_uint_32 \fP\fIwhite_y\fP\fB, png_uint_32 \fP\fIred_x\fP\fB, png_uint_32 \fP\fIred_y\fP\fB, png_uint_32 \fP\fIgreen_x\fP\fB, png_uint_32 \fP\fIgreen_y\fP\fB, png_uint_32 \fP\fIblue_x\fP\fB, png_uint_32 \fIblue_y\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_compression_level (png_structp \fP\fIpng_ptr\fP\fB, int \fIlevel\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_compression_mem_level (png_structp \fP\fIpng_ptr\fP\fB, int \fImem_level\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_compression_method (png_structp \fP\fIpng_ptr\fP\fB, int \fImethod\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_compression_strategy (png_structp \fP\fIpng_ptr\fP\fB, int \fIstrategy\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_compression_window_bits (png_structp \fP\fIpng_ptr\fP\fB, int \fIwindow_bits\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_crc_action (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcrit_action\fP\fB, int \fIancil_action\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_dither (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fP\fInum_palette\fP\fB, int \fP\fImaximum_colors\fP\fB, png_uint_16p \fP\fIhistogram\fP\fB, int \fIfull_dither\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_error_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarning_fn\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_expand (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_filler (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, int \fIflags\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_filter (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fImethod\fP\fB, int \fIfilters\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_filter_heuristics (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIheuristic_method\fP\fB, int \fP\fInum_weights\fP\fB, png_doublep \fP\fIfilter_weights\fP\fB, png_doublep \fIfilter_costs\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_flush (png_structp \fP\fIpng_ptr\fP\fB, int \fInrows\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_gamma (png_structp \fP\fIpng_ptr\fP\fB, double \fP\fIscreen_gamma\fP\fB, double \fIdefault_file_gamma\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_gAMA (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fIfile_gamma\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_gAMA_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIfile_gamma\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_gray_1_2_4_to_8(png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_gray_to_rgb (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fIhist\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fIname\fP\fB, int \fP\fIcompression_type\fP\fB, png_charp \fP\fIprofile\fP\fB, png_uint_32 \fIproflen\fP\fB);\fP - -\fI\fB - -\fBint png_set_interlace_handling (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_invalid (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fImask\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_invert_alpha (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_invert_mono (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIwidth\fP\fB, png_uint_32 \fP\fIheight\fP\fB, int \fP\fIbit_depth\fP\fB, int \fP\fIcolor_type\fP\fB, int \fP\fIinterlace_type\fP\fB, int \fP\fIcompression_type\fP\fB, int \fIfilter_type\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_keep_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIkeep\fP\fB, png_bytep \fP\fIchunk_list\fP\fB, int \fInum_chunks\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_mem_fn(png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP - -\fI\fB - -\fBpng_set_mmx_thresholds (png_structp \fP\fIpng_ptr\fP\fB, png_byte \fP\fImmx_bitdepth_threshold\fP\fB, png_uint_32 \fImmx_rowbytes_threshold\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIoffset_x\fP\fB, png_uint_32 \fP\fIoffset_y\fP\fB, int \fIunit_type\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_packing (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_packswap (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_palette_to_rgb(png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fIpurpose\fP\fB, png_int_32 \fP\fIX0\fP\fB, png_int_32 \fP\fIX1\fP\fB, int \fP\fItype\fP\fB, int \fP\fInparams\fP\fB, png_charp \fP\fIunits\fP\fB, png_charpp \fIparams\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fIres_x\fP\fB, png_uint_32 \fP\fIres_y\fP\fB, int \fIunit_type\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_progressive_read_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIprogressive_ptr\fP\fB, png_progressive_info_ptr \fP\fIinfo_fn\fP\fB, png_progressive_row_ptr \fP\fIrow_fn\fP\fB, png_progressive_end_ptr \fIend_fn\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fInum_palette\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_read_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIio_ptr\fP\fB, png_rw_ptr \fIread_data_fn\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_read_status_fn (png_structp \fP\fIpng_ptr\fP\fB, png_read_status_ptr \fIread_row_fn\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_read_user_transform_fn (png_structp \fP\fIpng_ptr\fP\fB, png_user_transform_ptr \fIread_user_transform_fn\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_rgb_to_gray (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIerror_action\fP\fB, double \fP\fIred\fP\fB, double \fIgreen\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_rgb_to_gray_fixed (png_structp \fP\fIpng_ptr\fP\fB, int error_action png_fixed_point \fP\fIred\fP\fB, png_fixed_point \fIgreen\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_rows (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytepp \fIrow_pointers\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_8p \fIsig_bit\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fIunit\fP\fB, double \fP\fIwidth\fP\fB, double \fIheight\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_shift (png_structp \fP\fIpng_ptr\fP\fB, png_color_8p \fItrue_bits\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_sig_bytes (png_structp \fP\fIpng_ptr\fP\fB, int \fInum_bytes\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_spalette_p \fP\fIsplt_ptr\fP\fB, int \fInum_spalettes\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fIintent\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_sRGB_gAMA_and_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fIintent\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_strip_16 (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_strip_alpha (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_strip_error_numbers (png_structp \fIpng_ptr, - -\fBpng_uint_32 \fIstrip_mode\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_swap (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_swap_alpha (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_text (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fItext_ptr\fP\fB, int \fInum_text\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_timep \fImod_time\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fItrans\fP\fB, int \fP\fInum_trans\fP\fB, png_color_16p \fItrans_values\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_tRNS_to_alpha(png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_set_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_unknown_chunkp \fP\fIunknowns\fP\fB, int \fP\fInum\fP\fB, int \fIlocation\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_unknown_chunk_location(png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIchunk\fP\fB, int \fIlocation\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_read_user_chunk_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIuser_chunk_ptr\fP\fB, png_user_chunk_ptr \fIread_user_chunk_fn\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_user_transform_info (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIuser_transform_ptr\fP\fB, int \fP\fIuser_transform_depth\fP\fB, int \fIuser_transform_channels\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_write_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIio_ptr\fP\fB, png_rw_ptr \fP\fIwrite_data_fn\fP\fB, png_flush_ptr \fIoutput_flush_fn\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_write_status_fn (png_structp \fP\fIpng_ptr\fP\fB, png_write_status_ptr \fIwrite_row_fn\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_write_user_transform_fn (png_structp \fP\fIpng_ptr\fP\fB, png_user_transform_ptr \fIwrite_user_transform_fn\fP\fB);\fP - -\fI\fB - -\fBvoid png_set_compression_buffer_size(png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP - -\fI\fB - -\fBint png_sig_cmp (png_bytep \fP\fIsig\fP\fB, png_size_t \fP\fIstart\fP\fB, png_size_t \fInum_to_check\fP\fB);\fP - -\fI\fB - -\fBvoid png_start_read_image (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_warning (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fImessage\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_chunk (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIchunk_name\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_chunk_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_chunk_end (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_chunk_start (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIchunk_name\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_destroy (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_flush (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_image (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fIimage\fP\fB);\fP - -\fI\fB - -\fBDEPRECATED: void png_write_init (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBDEPRECATED: void png_write_init_2 (png_structpp \fP\fIptr_ptr\fP\fB, png_const_charp \fP\fIuser_png_ver\fP\fB, png_size_t \fP\fIpng_struct_size\fP\fB, png_size_t \fIpng_info_size\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_info_before_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_png (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fItransforms\fP\fB, png_voidp \fIparams\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIrow\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_rows (png_structp \fP\fIpng_ptr\fP\fB, png_bytepp \fP\fIrow\fP\fB, png_uint_32 \fInum_rows\fP\fB);\fP - -\fI\fB - -.SH DESCRIPTION -The -.I libpng -library supports encoding, decoding, and various manipulations of -the Portable Network Graphics (PNG) format image files. It uses the -.IR zlib(3) -compression library. -Following is a copy of the libpng.txt file that accompanies libpng. -.SH LIBPNG.TXT -libpng.txt - A description on how to use and modify libpng - - libpng version 1.2.5 - October 3, 2002 - Updated and distributed by Glenn Randers-Pehrson - - Copyright (c) 1998-2002 Glenn Randers-Pehrson - For conditions of distribution and use, see copyright - notice in png.h. - - based on: - - libpng 1.0 beta 6 version 0.96 May 28, 1997 - Updated and distributed by Andreas Dilger - Copyright (c) 1996, 1997 Andreas Dilger - - libpng 1.0 beta 2 - version 0.88 January 26, 1996 - For conditions of distribution and use, see copyright - notice in png.h. Copyright (c) 1995, 1996 Guy Eric - Schalnat, Group 42, Inc. - - Updated/rewritten per request in the libpng FAQ - Copyright (c) 1995, 1996 Frank J. T. Wojcik - December 18, 1995 & January 20, 1996 - -.SH I. Introduction - -This file describes how to use and modify the PNG reference library -(known as libpng) for your own use. There are five sections to this -file: introduction, structures, reading, writing, and modification and -configuration notes for various special platforms. In addition to this -file, example.c is a good starting point for using the library, as -it is heavily commented and should include everything most people -will need. We assume that libpng is already installed; see the -INSTALL file for instructions on how to install libpng. - -Libpng was written as a companion to the PNG specification, as a way -of reducing the amount of time and effort it takes to support the PNG -file format in application programs. - -The PNG-1.2 specification is available at -and at . - -The PNG-1.0 specification is available -as RFC 2083 and as a -W3C Recommendation . Some -additional chunks are described in the special-purpose public chunks -documents at . - -Other information -about PNG, and the latest version of libpng, can be found at the PNG home -page, -and at . - -Most users will not have to modify the library significantly; advanced -users may want to modify it more. All attempts were made to make it as -complete as possible, while keeping the code easy to understand. -Currently, this library only supports C. Support for other languages -is being considered. - -Libpng has been designed to handle multiple sessions at one time, -to be easily modifiable, to be portable to the vast majority of -machines (ANSI, K&R, 16-, 32-, and 64-bit) available, and to be easy -to use. The ultimate goal of libpng is to promote the acceptance of -the PNG file format in whatever way possible. While there is still -work to be done (see the TODO file), libpng should cover the -majority of the needs of its users. - -Libpng uses zlib for its compression and decompression of PNG files. -Further information about zlib, and the latest version of zlib, can -be found at the zlib home page, . -The zlib compression utility is a general purpose utility that is -useful for more than PNG files, and can be used without libpng. -See the documentation delivered with zlib for more details. -You can usually find the source files for the zlib utility wherever you -find the libpng source files. - -Libpng is thread safe, provided the threads are using different -instances of the structures. Each thread should have its own -png_struct and png_info instances, and thus its own image. -Libpng does not protect itself against two threads using the -same instance of a structure. Note: thread safety may be defeated -by use of some of the MMX assembler code in pnggccrd.c, which is only -compiled when the user defines PNG_THREAD_UNSAFE_OK. - - -.SH II. Structures - -There are two main structures that are important to libpng, png_struct -and png_info. The first, png_struct, is an internal structure that -will not, for the most part, be used by a user except as the first -variable passed to every libpng function call. - -The png_info structure is designed to provide information about the -PNG file. At one time, the fields of png_info were intended to be -directly accessible to the user. However, this tended to cause problems -with applications using dynamically loaded libraries, and as a result -a set of interface functions for png_info (the png_get_*() and png_set_*() -functions) was developed. The fields of png_info are still available for -older applications, but it is suggested that applications use the new -interfaces if at all possible. - -Applications that do make direct access to the members of png_struct (except -for png_ptr->jmpbuf) must be recompiled whenever the library is updated, -and applications that make direct access to the members of png_info must -be recompiled if they were compiled or loaded with libpng version 1.0.6, -in which the members were in a different order. In version 1.0.7, the -members of the png_info structure reverted to the old order, as they were -in versions 0.97c through 1.0.5. Starting with version 2.0.0, both -structures are going to be hidden, and the contents of the structures will -only be accessible through the png_get/png_set functions. - -The png.h header file is an invaluable reference for programming with libpng. -And while I'm on the topic, make sure you include the libpng header file: - -#include - -.SH III. Reading - -We'll now walk you through the possible functions to call when reading -in a PNG file sequentially, briefly explaining the syntax and purpose -of each one. See example.c and png.h for more detail. While -progressive reading is covered in the next section, you will still -need some of the functions discussed in this section to read a PNG -file. - -.SS Setup - -You will want to do the I/O initialization(*) before you get into libpng, -so if it doesn't work, you don't have much to undo. Of course, you -will also want to insure that you are, in fact, dealing with a PNG -file. Libpng provides a simple check to see if a file is a PNG file. -To use it, pass in the first 1 to 8 bytes of the file to the function -png_sig_cmp(), and it will return 0 if the bytes match the corresponding -bytes of the PNG signature, or nonzero otherwise. Of course, the more bytes -you pass in, the greater the accuracy of the prediction. - -If you are intending to keep the file pointer open for use in libpng, -you must ensure you don't read more than 8 bytes from the beginning -of the file, and you also have to make a call to png_set_sig_bytes_read() -with the number of bytes you read from the beginning. Libpng will -then only check the bytes (if any) that your program didn't read. - -(*): If you are not using the standard I/O functions, you will need -to replace them with custom functions. See the discussion under -Customizing libpng. - - - FILE *fp = fopen(file_name, "rb"); - if (!fp) - { - return (ERROR); - } - fread(header, 1, number, fp); - is_png = !png_sig_cmp(header, 0, number); - if (!is_png) - { - return (NOT_PNG); - } - - -Next, png_struct and png_info need to be allocated and initialized. In -order to ensure that the size of these structures is correct even with a -dynamically linked libpng, there are functions to initialize and -allocate the structures. We also pass the library version, optional -pointers to error handling functions, and a pointer to a data struct for -use by the error functions, if necessary (the pointer and functions can -be NULL if the default error handlers are to be used). See the section -on Changes to Libpng below regarding the old initialization functions. -The structure allocation functions quietly return NULL if they fail to -create the structure, so your application should check for that. - - png_structp png_ptr = png_create_read_struct - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn); - if (!png_ptr) - return (ERROR); - - png_infop info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) - { - png_destroy_read_struct(&png_ptr, - (png_infopp)NULL, (png_infopp)NULL); - return (ERROR); - } - - png_infop end_info = png_create_info_struct(png_ptr); - if (!end_info) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - return (ERROR); - } - -If you want to use your own memory allocation routines, -define PNG_USER_MEM_SUPPORTED and use -png_create_read_struct_2() instead of png_create_read_struct(): - - png_structp png_ptr = png_create_read_struct_2 - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn, (png_voidp) - user_mem_ptr, user_malloc_fn, user_free_fn); - -The error handling routines passed to png_create_read_struct() -and the memory alloc/free routines passed to png_create_struct_2() -are only necessary if you are not using the libpng supplied error -handling and memory alloc/free functions. - -When libpng encounters an error, it expects to longjmp back -to your routine. Therefore, you will need to call setjmp and pass -your png_jmpbuf(png_ptr). If you read the file from different -routines, you will need to update the jmpbuf field every time you enter -a new routine that will call a png_*() function. - -See your documentation of setjmp/longjmp for your compiler for more -information on setjmp/longjmp. See the discussion on libpng error -handling in the Customizing Libpng section below for more information -on the libpng error handling. If an error occurs, and libpng longjmp's -back to your setjmp, you will want to call png_destroy_read_struct() to -free any memory. - - if (setjmp(png_jmpbuf(png_ptr))) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - &end_info); - fclose(fp); - return (ERROR); - } - -If you would rather avoid the complexity of setjmp/longjmp issues, -you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case -errors will result in a call to PNG_ABORT() which defaults to abort(). - -Now you need to set up the input code. The default for libpng is to -use the C function fread(). If you use this, you will need to pass a -valid FILE * in the function png_init_io(). Be sure that the file is -opened in binary mode. If you wish to handle reading data in another -way, you need not call the png_init_io() function, but you must then -implement the libpng I/O methods discussed in the Customizing Libpng -section below. - - png_init_io(png_ptr, fp); - -If you had previously opened the file and read any of the signature from -the beginning in order to see if this was a PNG file, you need to let -libpng know that there are some bytes missing from the start of the file. - - png_set_sig_bytes(png_ptr, number); - -.SS Setting up callback code - -You can set up a callback function to handle any unknown chunks in the -input stream. You must supply the function - - read_chunk_callback(png_ptr ptr, - png_unknown_chunkp chunk); - { - /* The unknown chunk structure contains your - chunk data: */ - png_byte name[5]; - png_byte *data; - png_size_t size; - /* Note that libpng has already taken care of - the CRC handling */ - - /* put your code here. Return one of the - following: */ - - return (-n); /* chunk had an error */ - return (0); /* did not recognize */ - return (n); /* success */ - } - -(You can give your function another name that you like instead of -"read_chunk_callback") - -To inform libpng about your function, use - - png_set_read_user_chunk_fn(png_ptr, user_chunk_ptr, - read_chunk_callback); - -This names not only the callback function, but also a user pointer that -you can retrieve with - - png_get_user_chunk_ptr(png_ptr); - -At this point, you can set up a callback function that will be -called after each row has been read, which you can use to control -a progress meter or the like. It's demonstrated in pngtest.c. -You must supply a function - - void read_row_callback(png_ptr ptr, png_uint_32 row, - int pass); - { - /* put your code here */ - } - -(You can give it another name that you like instead of "read_row_callback") - -To inform libpng about your function, use - - png_set_read_status_fn(png_ptr, read_row_callback); - -.SS Unknown-chunk handling - -Now you get to set the way the library processes unknown chunks in the -input PNG stream. Both known and unknown chunks will be read. Normal -behavior is that known chunks will be parsed into information in -various info_ptr members; unknown chunks will be discarded. To change -this, you can call: - - png_set_keep_unknown_chunks(png_ptr, info_ptr, keep, - chunk_list, num_chunks); - keep - 0: do not keep - 1: keep only if safe-to-copy - 2: keep even if unsafe-to-copy - chunk_list - list of chunks affected (a byte string, - five bytes per chunk, NULL or '\0' if - num_chunks is 0) - num_chunks - number of chunks affected; if 0, all - unknown chunks are affected - -Unknown chunks declared in this way will be saved as raw data onto a -list of png_unknown_chunk structures. If a chunk that is normally -known to libpng is named in the list, it will be handled as unknown, -according to the "keep" directive. If a chunk is named in successive -instances of png_set_keep_unknown_chunks(), the final instance will -take precedence. - -.SS The high-level read interface - -At this point there are two ways to proceed; through the high-level -read interface, or through a sequence of low-level read operations. -You can use the high-level interface if (a) you are willing to read -the entire image into memory, and (b) the input transformations -you want to do are limited to the following set: - - PNG_TRANSFORM_IDENTITY No transformation - PNG_TRANSFORM_STRIP_16 Strip 16-bit samples to - 8 bits - PNG_TRANSFORM_STRIP_ALPHA Discard the alpha channel - PNG_TRANSFORM_PACKING Expand 1, 2 and 4-bit - samples to bytes - PNG_TRANSFORM_PACKSWAP Change order of packed - pixels to LSB first - PNG_TRANSFORM_EXPAND Perform set_expand() - PNG_TRANSFORM_INVERT_MONO Invert monochrome images - PNG_TRANSFORM_SHIFT Normalize pixels to the - sBIT depth - PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA - to BGRA - PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA - to AG - PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity - to transparency - PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples - -(This excludes setting a background color, doing gamma transformation, -dithering, and setting filler.) If this is the case, simply do this: - - png_read_png(png_ptr, info_ptr, png_transforms, NULL) - -where png_transforms is an integer containing the logical OR of -some set of transformation flags. This call is equivalent to png_read_info(), -followed the set of transformations indicated by the transform mask, -then png_read_image(), and finally png_read_end(). - -(The final parameter of this call is not yet used. Someday it might point -to transformation parameters required by some future input transform.) - -After you have called png_read_png(), you can retrieve the image data -with - - row_pointers = png_get_rows(png_ptr, info_ptr); - -where row_pointers is an array of pointers to the pixel data for each row: - - png_bytep row_pointers[height]; - -If you know your image size and pixel size ahead of time, you can allocate -row_pointers prior to calling png_read_png() with - - row_pointers = png_malloc(png_ptr, - height*sizeof(png_bytep)); - for (int i=0; i) and -png_get_(png_ptr, info_ptr, ...) functions return non-zero if the -data has been read, or zero if it is missing. The parameters to the -png_get_ are set directly if they are simple data types, or a pointer -into the info_ptr is returned for any complex types. - - png_get_PLTE(png_ptr, info_ptr, &palette, - &num_palette); - palette - the palette for the file - (array of png_color) - num_palette - number of entries in the palette - - png_get_gAMA(png_ptr, info_ptr, &gamma); - gamma - the gamma the file is written - at (PNG_INFO_gAMA) - - png_get_sRGB(png_ptr, info_ptr, &srgb_intent); - srgb_intent - the rendering intent (PNG_INFO_sRGB) - The presence of the sRGB chunk - means that the pixel data is in the - sRGB color space. This chunk also - implies specific values of gAMA and - cHRM. - - png_get_iCCP(png_ptr, info_ptr, &name, - &compression_type, &profile, &proflen); - name - The profile name. - compression - The compression type; always - PNG_COMPRESSION_TYPE_BASE for PNG 1.0. - You may give NULL to this argument to - ignore it. - profile - International Color Consortium color - profile data. May contain NULs. - proflen - length of profile data in bytes. - - png_get_sBIT(png_ptr, info_ptr, &sig_bit); - sig_bit - the number of significant bits for - (PNG_INFO_sBIT) each of the gray, - red, green, and blue channels, - whichever are appropriate for the - given color type (png_color_16) - - png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, - &trans_values); - trans - array of transparent entries for - palette (PNG_INFO_tRNS) - trans_values - graylevel or color sample values of - the single transparent color for - non-paletted images (PNG_INFO_tRNS) - num_trans - number of transparent entries - (PNG_INFO_tRNS) - - png_get_hIST(png_ptr, info_ptr, &hist); - (PNG_INFO_hIST) - hist - histogram of palette (array of - png_uint_16) - - png_get_tIME(png_ptr, info_ptr, &mod_time); - mod_time - time image was last modified - (PNG_VALID_tIME) - - png_get_bKGD(png_ptr, info_ptr, &background); - background - background color (PNG_VALID_bKGD) - valid 16-bit red, green and blue - values, regardless of color_type - - num_comments = png_get_text(png_ptr, info_ptr, - &text_ptr, &num_text); - num_comments - number of comments - text_ptr - array of png_text holding image - comments - text_ptr[i].compression - type of compression used - on "text" PNG_TEXT_COMPRESSION_NONE - PNG_TEXT_COMPRESSION_zTXt - PNG_ITXT_COMPRESSION_NONE - PNG_ITXT_COMPRESSION_zTXt - text_ptr[i].key - keyword for comment. Must contain - 1-79 characters. - text_ptr[i].text - text comments for current - keyword. Can be empty. - text_ptr[i].text_length - length of text string, - after decompression, 0 for iTXt - text_ptr[i].itxt_length - length of itxt string, - after decompression, 0 for tEXt/zTXt - text_ptr[i].lang - language of comment (empty - string for unknown). - text_ptr[i].lang_key - keyword in UTF-8 - (empty string for unknown). - num_text - number of comments (same as - num_comments; you can put NULL here - to avoid the duplication) - Note while png_set_text() will accept text, language, - and translated keywords that can be NULL pointers, the - structure returned by png_get_text will always contain - regular zero-terminated C strings. They might be - empty strings but they will never be NULL pointers. - - num_spalettes = png_get_sPLT(png_ptr, info_ptr, - &palette_ptr); - palette_ptr - array of palette structures holding - contents of one or more sPLT chunks - read. - num_spalettes - number of sPLT chunks read. - - png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y, - &unit_type); - offset_x - positive offset from the left edge - of the screen - offset_y - positive offset from the top edge - of the screen - unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER - - png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y, - &unit_type); - res_x - pixels/unit physical resolution in - x direction - res_y - pixels/unit physical resolution in - x direction - unit_type - PNG_RESOLUTION_UNKNOWN, - PNG_RESOLUTION_METER - - png_get_sCAL(png_ptr, info_ptr, &unit, &width, - &height) - unit - physical scale units (an integer) - width - width of a pixel in physical scale units - height - height of a pixel in physical scale units - (width and height are doubles) - - png_get_sCAL_s(png_ptr, info_ptr, &unit, &width, - &height) - unit - physical scale units (an integer) - width - width of a pixel in physical scale units - height - height of a pixel in physical scale units - (width and height are strings like "2.54") - - num_unknown_chunks = png_get_unknown_chunks(png_ptr, - info_ptr, &unknowns) - unknowns - array of png_unknown_chunk - structures holding unknown chunks - unknowns[i].name - name of unknown chunk - unknowns[i].data - data of unknown chunk - unknowns[i].size - size of unknown chunk's data - unknowns[i].location - position of chunk in file - - The value of "i" corresponds to the order in which the - chunks were read from the PNG file or inserted with the - png_set_unknown_chunks() function. - -The data from the pHYs chunk can be retrieved in several convenient -forms: - - res_x = png_get_x_pixels_per_meter(png_ptr, - info_ptr) - res_y = png_get_y_pixels_per_meter(png_ptr, - info_ptr) - res_x_and_y = png_get_pixels_per_meter(png_ptr, - info_ptr) - res_x = png_get_x_pixels_per_inch(png_ptr, - info_ptr) - res_y = png_get_y_pixels_per_inch(png_ptr, - info_ptr) - res_x_and_y = png_get_pixels_per_inch(png_ptr, - info_ptr) - aspect_ratio = png_get_pixel_aspect_ratio(png_ptr, - info_ptr) - - (Each of these returns 0 [signifying "unknown"] if - the data is not present or if res_x is 0; - res_x_and_y is 0 if res_x != res_y) - -The data from the oFFs chunk can be retrieved in several convenient -forms: - - x_offset = png_get_x_offset_microns(png_ptr, info_ptr); - y_offset = png_get_y_offset_microns(png_ptr, info_ptr); - x_offset = png_get_x_offset_inches(png_ptr, info_ptr); - y_offset = png_get_y_offset_inches(png_ptr, info_ptr); - - (Each of these returns 0 [signifying "unknown" if both - x and y are 0] if the data is not present or if the - chunk is present but the unit is the pixel) - -For more information, see the png_info definition in png.h and the -PNG specification for chunk contents. Be careful with trusting -rowbytes, as some of the transformations could increase the space -needed to hold a row (expand, filler, gray_to_rgb, etc.). -See png_read_update_info(), below. - -A quick word about text_ptr and num_text. PNG stores comments in -keyword/text pairs, one pair per chunk, with no limit on the number -of text chunks, and a 2^31 byte limit on their size. While there are -suggested keywords, there is no requirement to restrict the use to these -strings. It is strongly suggested that keywords and text be sensible -to humans (that's the point), so don't use abbreviations. Non-printing -symbols are not allowed. See the PNG specification for more details. -There is also no requirement to have text after the keyword. - -Keywords should be limited to 79 Latin-1 characters without leading or -trailing spaces, but non-consecutive spaces are allowed within the -keyword. It is possible to have the same keyword any number of times. -The text_ptr is an array of png_text structures, each holding a -pointer to a language string, a pointer to a keyword and a pointer to -a text string. The text string, language code, and translated -keyword may be empty or NULL pointers. The keyword/text -pairs are put into the array in the order that they are received. -However, some or all of the text chunks may be after the image, so, to -make sure you have read all the text chunks, don't mess with these -until after you read the stuff after the image. This will be -mentioned again below in the discussion that goes with png_read_end(). - -.SS Input transformations - -After you've read the header information, you can set up the library -to handle any special transformations of the image data. The various -ways to transform the data will be described in the order that they -should occur. This is important, as some of these change the color -type and/or bit depth of the data, and some others only work on -certain color types and bit depths. Even though each transformation -checks to see if it has data that it can do something with, you should -make sure to only enable a transformation if it will be valid for the -data. For example, don't swap red and blue on grayscale data. - -The colors used for the background and transparency values should be -supplied in the same format/depth as the current image data. They -are stored in the same format/depth as the image data in a bKGD or tRNS -chunk, so this is what libpng expects for this data. The colors are -transformed to keep in sync with the image data when an application -calls the png_read_update_info() routine (see below). - -Data will be decoded into the supplied row buffers packed into bytes -unless the library has been told to transform it into another format. -For example, 4 bit/pixel paletted or grayscale data will be returned -2 pixels/byte with the leftmost pixel in the high-order bits of the -byte, unless png_set_packing() is called. 8-bit RGB data will be stored -in RGB RGB RGB format unless png_set_filler() is called to insert filler -bytes, either before or after each RGB triplet. 16-bit RGB data will -be returned RRGGBB RRGGBB, with the most significant byte of the color -value first, unless png_set_strip_16() is called to transform it to -regular RGB RGB triplets, or png_set_filler() is called to insert -filler bytes, either before or after each RRGGBB triplet. Similarly, -8-bit or 16-bit grayscale data can be modified with png_set_filler() -or png_set_strip_16(). - -The following code transforms grayscale images of less than 8 to 8 bits, -changes paletted images to RGB, and adds a full alpha channel if there is -transparency information in a tRNS chunk. This is most useful on -grayscale images with bit depths of 2 or 4 or if there is a multiple-image -viewing application that wishes to treat all images in the same way. - - if (color_type == PNG_COLOR_TYPE_PALETTE) - png_set_palette_to_rgb(png_ptr); - - if (color_type == PNG_COLOR_TYPE_GRAY && - bit_depth < 8) png_set_gray_1_2_4_to_8(png_ptr); - - if (png_get_valid(png_ptr, info_ptr, - PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr); - -These three functions are actually aliases for png_set_expand(), added -in libpng version 1.0.4, with the function names expanded to improve code -readability. In some future version they may actually do different -things. - -PNG can have files with 16 bits per channel. If you only can handle -8 bits per channel, this will strip the pixels down to 8 bit. - - if (bit_depth == 16) - png_set_strip_16(png_ptr); - -If, for some reason, you don't need the alpha channel on an image, -and you want to remove it rather than combining it with the background -(but the image author certainly had in mind that you *would* combine -it with the background, so that's what you should probably do): - - if (color_type & PNG_COLOR_MASK_ALPHA) - png_set_strip_alpha(png_ptr); - -In PNG files, the alpha channel in an image -is the level of opacity. If you need the alpha channel in an image to -be the level of transparency instead of opacity, you can invert the -alpha channel (or the tRNS chunk data) after it's read, so that 0 is -fully opaque and 255 (in 8-bit or paletted images) or 65535 (in 16-bit -images) is fully transparent, with - - png_set_invert_alpha(png_ptr); - -PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as -they can, resulting in, for example, 8 pixels per byte for 1 bit -files. This code expands to 1 pixel per byte without changing the -values of the pixels: - - if (bit_depth < 8) - png_set_packing(png_ptr); - -PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels -stored in a PNG image have been "scaled" or "shifted" up to the next -higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] to -8 bits/sample in the range [0, 255]). However, it is also possible to -convert the PNG pixel data back to the original bit depth of the image. -This call reduces the pixels back down to the original bit depth: - - png_color_8p sig_bit; - - if (png_get_sBIT(png_ptr, info_ptr, &sig_bit)) - png_set_shift(png_ptr, sig_bit); - -PNG files store 3-color pixels in red, green, blue order. This code -changes the storage of the pixels to blue, green, red: - - if (color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_RGB_ALPHA) - png_set_bgr(png_ptr); - -PNG files store RGB pixels packed into 3 or 6 bytes. This code expands them -into 4 or 8 bytes for windowing systems that need them in this format: - - if (color_type == PNG_COLOR_TYPE_RGB) - png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE); - -where "filler" is the 8 or 16-bit number to fill with, and the location is -either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether -you want the filler before the RGB or after. This transformation -does not affect images that already have full alpha channels. To add an -opaque alpha channel, use filler=0xff or 0xffff and PNG_FILLER_AFTER which -will generate RGBA pixels. - -If you are reading an image with an alpha channel, and you need the -data as ARGB instead of the normal PNG format RGBA: - - if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) - png_set_swap_alpha(png_ptr); - -For some uses, you may want a grayscale image to be represented as -RGB. This code will do that conversion: - - if (color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - png_set_gray_to_rgb(png_ptr); - -Conversely, you can convert an RGB or RGBA image to grayscale or grayscale -with alpha. - - if (color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_RGB_ALPHA) - png_set_rgb_to_gray_fixed(png_ptr, error_action, - int red_weight, int green_weight); - - error_action = 1: silently do the conversion - error_action = 2: issue a warning if the original - image has any pixel where - red != green or red != blue - error_action = 3: issue an error and abort the - conversion if the original - image has any pixel where - red != green or red != blue - - red_weight: weight of red component times 100000 - green_weight: weight of green component times 100000 - If either weight is negative, default - weights (21268, 71514) are used. - -If you have set error_action = 1 or 2, you can -later check whether the image really was gray, after processing -the image rows, with the png_get_rgb_to_gray_status(png_ptr) function. -It will return a png_byte that is zero if the image was gray or -1 if there were any non-gray pixels. bKGD and sBIT data -will be silently converted to grayscale, using the green channel -data, regardless of the error_action setting. - -With red_weight+green_weight<=100000, -the normalized graylevel is computed: - - int rw = red_weight * 65536; - int gw = green_weight * 65536; - int bw = 65536 - (rw + gw); - gray = (rw*red + gw*green + bw*blue)/65536; - -The default values approximate those recommended in the Charles -Poynton's Color FAQ, -Copyright (c) 1998-01-04 Charles Poynton poynton@inforamp.net - - Y = 0.212671 * R + 0.715160 * G + 0.072169 * B - -Libpng approximates this with - - Y = 0.21268 * R + 0.7151 * G + 0.07217 * B - -which can be expressed with integers as - - Y = (6969 * R + 23434 * G + 2365 * B)/32768 - -The calculation is done in a linear colorspace, if the image gamma -is known. - -If you have a grayscale and you are using png_set_expand_depth(), -png_set_expand(), or png_set_gray_to_rgb to change to truecolor or to -a higher bit-depth, you must either supply the background color as a gray -value at the original file bit-depth (need_expand = 1) or else supply the -background color as an RGB triplet at the final, expanded bit depth -(need_expand = 0). Similarly, if you are reading a paletted image, you -must either supply the background color as a palette index (need_expand = 1) -or as an RGB triplet that may or may not be in the palette (need_expand = 0). - - png_color_16 my_background; - png_color_16p image_background; - - if (png_get_bKGD(png_ptr, info_ptr, &image_background)) - png_set_background(png_ptr, image_background, - PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); - else - png_set_background(png_ptr, &my_background, - PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); - -The png_set_background() function tells libpng to composite images -with alpha or simple transparency against the supplied background -color. If the PNG file contains a bKGD chunk (PNG_INFO_bKGD valid), -you may use this color, or supply another color more suitable for -the current display (e.g., the background color from a web page). You -need to tell libpng whether the color is in the gamma space of the -display (PNG_BACKGROUND_GAMMA_SCREEN for colors you supply), the file -(PNG_BACKGROUND_GAMMA_FILE for colors from the bKGD chunk), or one -that is neither of these gammas (PNG_BACKGROUND_GAMMA_UNIQUE - I don't -know why anyone would use this, but it's here). - -To properly display PNG images on any kind of system, the application needs -to know what the display gamma is. Ideally, the user will know this, and -the application will allow them to set it. One method of allowing the user -to set the display gamma separately for each system is to check for a -SCREEN_GAMMA or DISPLAY_GAMMA environment variable, which will hopefully be -correctly set. - -Note that display_gamma is the overall gamma correction required to produce -pleasing results, which depends on the lighting conditions in the surrounding -environment. In a dim or brightly lit room, no compensation other than -the physical gamma exponent of the monitor is needed, while in a dark room -a slightly smaller exponent is better. - - double gamma, screen_gamma; - - if (/* We have a user-defined screen - gamma value */) - { - screen_gamma = user_defined_screen_gamma; - } - /* One way that applications can share the same - screen gamma value */ - else if ((gamma_str = getenv("SCREEN_GAMMA")) - != NULL) - { - screen_gamma = (double)atof(gamma_str); - } - /* If we don't have another value */ - else - { - screen_gamma = 2.2; /* A good guess for a - PC monitor in a bright office or a dim room */ - screen_gamma = 2.0; /* A good guess for a - PC monitor in a dark room */ - screen_gamma = 1.7 or 1.0; /* A good - guess for Mac systems */ - } - -The png_set_gamma() function handles gamma transformations of the data. -Pass both the file gamma and the current screen_gamma. If the file does -not have a gamma value, you can pass one anyway if you have an idea what -it is (usually 0.45455 is a good guess for GIF images on PCs). Note -that file gammas are inverted from screen gammas. See the discussions -on gamma in the PNG specification for an excellent description of what -gamma is, and why all applications should support it. It is strongly -recommended that PNG viewers support gamma correction. - - if (png_get_gAMA(png_ptr, info_ptr, &gamma)) - png_set_gamma(png_ptr, screen_gamma, gamma); - else - png_set_gamma(png_ptr, screen_gamma, 0.45455); - -If you need to reduce an RGB file to a paletted file, or if a paletted -file has more entries then will fit on your screen, png_set_dither() -will do that. Note that this is a simple match dither that merely -finds the closest color available. This should work fairly well with -optimized palettes, and fairly badly with linear color cubes. If you -pass a palette that is larger then maximum_colors, the file will -reduce the number of colors in the palette so it will fit into -maximum_colors. If there is a histogram, it will use it to make -more intelligent choices when reducing the palette. If there is no -histogram, it may not do as good a job. - - if (color_type & PNG_COLOR_MASK_COLOR) - { - if (png_get_valid(png_ptr, info_ptr, - PNG_INFO_PLTE)) - { - png_uint_16p histogram = NULL; - - png_get_hIST(png_ptr, info_ptr, - &histogram); - png_set_dither(png_ptr, palette, num_palette, - max_screen_colors, histogram, 1); - } - else - { - png_color std_color_cube[MAX_SCREEN_COLORS] = - { ... colors ... }; - - png_set_dither(png_ptr, std_color_cube, - MAX_SCREEN_COLORS, MAX_SCREEN_COLORS, - NULL,0); - } - } - -PNG files describe monochrome as black being zero and white being one. -The following code will reverse this (make black be one and white be -zero): - - if (bit_depth == 1 && color_type == PNG_COLOR_TYPE_GRAY) - png_set_invert_mono(png_ptr); - -This function can also be used to invert grayscale and gray-alpha images: - - if (color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - png_set_invert_mono(png_ptr); - -PNG files store 16 bit pixels in network byte order (big-endian, -ie. most significant bits first). This code changes the storage to the -other way (little-endian, i.e. least significant bits first, the -way PCs store them): - - if (bit_depth == 16) - png_set_swap(png_ptr); - -If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you -need to change the order the pixels are packed into bytes, you can use: - - if (bit_depth < 8) - png_set_packswap(png_ptr); - -Finally, you can write your own transformation function if none of -the existing ones meets your needs. This is done by setting a callback -with - - png_set_read_user_transform_fn(png_ptr, - read_transform_fn); - -You must supply the function - - void read_transform_fn(png_ptr ptr, row_info_ptr - row_info, png_bytep data) - -See pngtest.c for a working example. Your function will be called -after all of the other transformations have been processed. - -You can also set up a pointer to a user structure for use by your -callback function, and you can inform libpng that your transform -function will change the number of channels or bit depth with the -function - - png_set_user_transform_info(png_ptr, user_ptr, - user_depth, user_channels); - -The user's application, not libpng, is responsible for allocating and -freeing any memory required for the user structure. - -You can retrieve the pointer via the function -png_get_user_transform_ptr(). For example: - - voidp read_user_transform_ptr = - png_get_user_transform_ptr(png_ptr); - -The last thing to handle is interlacing; this is covered in detail below, -but you must call the function here if you want libpng to handle expansion -of the interlaced image. - - number_of_passes = png_set_interlace_handling(png_ptr); - -After setting the transformations, libpng can update your png_info -structure to reflect any transformations you've requested with this -call. This is most useful to update the info structure's rowbytes -field so you can use it to allocate your image memory. This function -will also update your palette with the correct screen_gamma and -background if these have been given with the calls above. - - png_read_update_info(png_ptr, info_ptr); - -After you call png_read_update_info(), you can allocate any -memory you need to hold the image. The row data is simply -raw byte data for all forms of images. As the actual allocation -varies among applications, no example will be given. If you -are allocating one large chunk, you will need to build an -array of pointers to each row, as it will be needed for some -of the functions below. - -.SS Reading image data - -After you've allocated memory, you can read the image data. -The simplest way to do this is in one function call. If you are -allocating enough memory to hold the whole image, you can just -call png_read_image() and libpng will read in all the image data -and put it in the memory area supplied. You will need to pass in -an array of pointers to each row. - -This function automatically handles interlacing, so you don't need -to call png_set_interlace_handling() or call this function multiple -times, or any of that other stuff necessary with png_read_rows(). - - png_read_image(png_ptr, row_pointers); - -where row_pointers is: - - png_bytep row_pointers[height]; - -You can point to void or char or whatever you use for pixels. - -If you don't want to read in the whole image at once, you can -use png_read_rows() instead. If there is no interlacing (check -interlace_type == PNG_INTERLACE_NONE), this is simple: - - png_read_rows(png_ptr, row_pointers, NULL, - number_of_rows); - -where row_pointers is the same as in the png_read_image() call. - -If you are doing this just one row at a time, you can do this with -a single row_pointer instead of an array of row_pointers: - - png_bytep row_pointer = row; - png_read_row(png_ptr, row_pointer, NULL); - -If the file is interlaced (interlace_type != 0 in the IHDR chunk), things -get somewhat harder. The only current (PNG Specification version 1.2) -interlacing type for PNG is (interlace_type == PNG_INTERLACE_ADAM7) -is a somewhat complicated 2D interlace scheme, known as Adam7, that -breaks down an image into seven smaller images of varying size, based -on an 8x8 grid. - -libpng can fill out those images or it can give them to you "as is". -If you want them filled out, there are two ways to do that. The one -mentioned in the PNG specification is to expand each pixel to cover -those pixels that have not been read yet (the "rectangle" method). -This results in a blocky image for the first pass, which gradually -smooths out as more pixels are read. The other method is the "sparkle" -method, where pixels are drawn only in their final locations, with the -rest of the image remaining whatever colors they were initialized to -before the start of the read. The first method usually looks better, -but tends to be slower, as there are more pixels to put in the rows. - -If you don't want libpng to handle the interlacing details, just call -png_read_rows() seven times to read in all seven images. Each of the -images is a valid image by itself, or they can all be combined on an -8x8 grid to form a single image (although if you intend to combine them -you would be far better off using the libpng interlace handling). - -The first pass will return an image 1/8 as wide as the entire image -(every 8th column starting in column 0) and 1/8 as high as the original -(every 8th row starting in row 0), the second will be 1/8 as wide -(starting in column 4) and 1/8 as high (also starting in row 0). The -third pass will be 1/4 as wide (every 4th pixel starting in column 0) and -1/8 as high (every 8th row starting in row 4), and the fourth pass will -be 1/4 as wide and 1/4 as high (every 4th column starting in column 2, -and every 4th row starting in row 0). The fifth pass will return an -image 1/2 as wide, and 1/4 as high (starting at column 0 and row 2), -while the sixth pass will be 1/2 as wide and 1/2 as high as the original -(starting in column 1 and row 0). The seventh and final pass will be as -wide as the original, and 1/2 as high, containing all of the odd -numbered scanlines. Phew! - -If you want libpng to expand the images, call this before calling -png_start_read_image() or png_read_update_info(): - - if (interlace_type == PNG_INTERLACE_ADAM7) - number_of_passes - = png_set_interlace_handling(png_ptr); - -This will return the number of passes needed. Currently, this -is seven, but may change if another interlace type is added. -This function can be called even if the file is not interlaced, -where it will return one pass. - -If you are not going to display the image after each pass, but are -going to wait until the entire image is read in, use the sparkle -effect. This effect is faster and the end result of either method -is exactly the same. If you are planning on displaying the image -after each pass, the "rectangle" effect is generally considered the -better looking one. - -If you only want the "sparkle" effect, just call png_read_rows() as -normal, with the third parameter NULL. Make sure you make pass over -the image number_of_passes times, and you don't change the data in the -rows between calls. You can change the locations of the data, just -not the data. Each pass only writes the pixels appropriate for that -pass, and assumes the data from previous passes is still valid. - - png_read_rows(png_ptr, row_pointers, NULL, - number_of_rows); - -If you only want the first effect (the rectangles), do the same as -before except pass the row buffer in the third parameter, and leave -the second parameter NULL. - - png_read_rows(png_ptr, NULL, row_pointers, - number_of_rows); - -.SS Finishing a sequential read - -After you are finished reading the image through either the high- or -low-level interfaces, you can finish reading the file. If you are -interested in comments or time, which may be stored either before or -after the image data, you should pass the separate png_info struct if -you want to keep the comments from before and after the image -separate. If you are not interested, you can pass NULL. - - png_read_end(png_ptr, end_info); - -When you are done, you can free all memory allocated by libpng like this: - - png_destroy_read_struct(&png_ptr, &info_ptr, - &end_info); - -It is also possible to individually free the info_ptr members that -point to libpng-allocated storage with the following function: - - png_free_data(png_ptr, info_ptr, mask, seq) - mask - identifies data to be freed, a mask - containing the logical OR of one or - more of - PNG_FREE_PLTE, PNG_FREE_TRNS, - PNG_FREE_HIST, PNG_FREE_ICCP, - PNG_FREE_PCAL, PNG_FREE_ROWS, - PNG_FREE_SCAL, PNG_FREE_SPLT, - PNG_FREE_TEXT, PNG_FREE_UNKN, - or simply PNG_FREE_ALL - seq - sequence number of item to be freed - (-1 for all items) - -This function may be safely called when the relevant storage has -already been freed, or has not yet been allocated, or was allocated -by the user and not by libpng, and will in those -cases do nothing. The "seq" parameter is ignored if only one item -of the selected data type, such as PLTE, is allowed. If "seq" is not --1, and multiple items are allowed for the data type identified in -the mask, such as text or sPLT, only the n'th item in the structure -is freed, where n is "seq". - -The default behavior is only to free data that was allocated internally -by libpng. This can be changed, so that libpng will not free the data, -or so that it will free data that was allocated by the user with png_malloc() -or png_zalloc() and passed in via a png_set_*() function, with - - png_data_freer(png_ptr, info_ptr, freer, mask) - mask - which data elements are affected - same choices as in png_free_data() - freer - one of - PNG_DESTROY_WILL_FREE_DATA - PNG_SET_WILL_FREE_DATA - PNG_USER_WILL_FREE_DATA - -This function only affects data that has already been allocated. -You can call this function after reading the PNG data but before calling -any png_set_*() functions, to control whether the user or the png_set_*() -function is responsible for freeing any existing data that might be present, -and again after the png_set_*() functions to control whether the user -or png_destroy_*() is supposed to free the data. When the user assumes -responsibility for libpng-allocated data, the application must use -png_free() to free it, and when the user transfers responsibility to libpng -for data that the user has allocated, the user must have used png_malloc() -or png_zalloc() to allocate it. - -If you allocated your row_pointers in a single block, as suggested above in -the description of the high level read interface, you must not transfer -responsibility for freeing it to the png_set_rows or png_read_destroy function, -because they would also try to free the individual row_pointers[i]. - -If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword -separately, do not transfer responsibility for freeing text_ptr to libpng, -because when libpng fills a png_text structure it combines these members with -the key member, and png_free_data() will free only text_ptr.key. Similarly, -if you transfer responsibility for free'ing text_ptr from libpng to your -application, your application must not separately free those members. - -The png_free_data() function will turn off the "valid" flag for anything -it frees. If you need to turn the flag off for a chunk that was freed by your -application instead of by libpng, you can use - - png_set_invalid(png_ptr, info_ptr, mask); - mask - identifies the chunks to be made invalid, - containing the logical OR of one or - more of - PNG_INFO_gAMA, PNG_INFO_sBIT, - PNG_INFO_cHRM, PNG_INFO_PLTE, - PNG_INFO_tRNS, PNG_INFO_bKGD, - PNG_INFO_hIST, PNG_INFO_pHYs, - PNG_INFO_oFFs, PNG_INFO_tIME, - PNG_INFO_pCAL, PNG_INFO_sRGB, - PNG_INFO_iCCP, PNG_INFO_sPLT, - PNG_INFO_sCAL, PNG_INFO_IDAT - -For a more compact example of reading a PNG image, see the file example.c. - -.SS Reading PNG files progressively - -The progressive reader is slightly different then the non-progressive -reader. Instead of calling png_read_info(), png_read_rows(), and -png_read_end(), you make one call to png_process_data(), which calls -callbacks when it has the info, a row, or the end of the image. You -set up these callbacks with png_set_progressive_read_fn(). You don't -have to worry about the input/output functions of libpng, as you are -giving the library the data directly in png_process_data(). I will -assume that you have read the section on reading PNG files above, -so I will only highlight the differences (although I will show -all of the code). - -png_structp png_ptr; -png_infop info_ptr; - - /* An example code fragment of how you would - initialize the progressive reader in your - application. */ - int - initialize_png_reader() - { - png_ptr = png_create_read_struct - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn); - if (!png_ptr) - return (ERROR); - info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) - { - png_destroy_read_struct(&png_ptr, (png_infopp)NULL, - (png_infopp)NULL); - return (ERROR); - } - - if (setjmp(png_jmpbuf(png_ptr))) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - return (ERROR); - } - - /* This one's new. You can provide functions - to be called when the header info is valid, - when each row is completed, and when the image - is finished. If you aren't using all functions, - you can specify NULL parameters. Even when all - three functions are NULL, you need to call - png_set_progressive_read_fn(). You can use - any struct as the user_ptr (cast to a void pointer - for the function call), and retrieve the pointer - from inside the callbacks using the function - - png_get_progressive_ptr(png_ptr); - - which will return a void pointer, which you have - to cast appropriately. - */ - png_set_progressive_read_fn(png_ptr, (void *)user_ptr, - info_callback, row_callback, end_callback); - - return 0; - } - - /* A code fragment that you call as you receive blocks - of data */ - int - process_data(png_bytep buffer, png_uint_32 length) - { - if (setjmp(png_jmpbuf(png_ptr))) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - return (ERROR); - } - - /* This one's new also. Simply give it a chunk - of data from the file stream (in order, of - course). On machines with segmented memory - models machines, don't give it any more than - 64K. The library seems to run fine with sizes - of 4K. Although you can give it much less if - necessary (I assume you can give it chunks of - 1 byte, I haven't tried less then 256 bytes - yet). When this function returns, you may - want to display any rows that were generated - in the row callback if you don't already do - so there. - */ - png_process_data(png_ptr, info_ptr, buffer, length); - return 0; - } - - /* This function is called (as set by - png_set_progressive_read_fn() above) when enough data - has been supplied so all of the header has been - read. - */ - void - info_callback(png_structp png_ptr, png_infop info) - { - /* Do any setup here, including setting any of - the transformations mentioned in the Reading - PNG files section. For now, you _must_ call - either png_start_read_image() or - png_read_update_info() after all the - transformations are set (even if you don't set - any). You may start getting rows before - png_process_data() returns, so this is your - last chance to prepare for that. - */ - } - - /* This function is called when each row of image - data is complete */ - void - row_callback(png_structp png_ptr, png_bytep new_row, - png_uint_32 row_num, int pass) - { - /* If the image is interlaced, and you turned - on the interlace handler, this function will - be called for every row in every pass. Some - of these rows will not be changed from the - previous pass. When the row is not changed, - the new_row variable will be NULL. The rows - and passes are called in order, so you don't - really need the row_num and pass, but I'm - supplying them because it may make your life - easier. - - For the non-NULL rows of interlaced images, - you must call png_progressive_combine_row() - passing in the row and the old row. You can - call this function for NULL rows (it will just - return) and for non-interlaced images (it just - does the memcpy for you) if it will make the - code easier. Thus, you can just do this for - all cases: - */ - - png_progressive_combine_row(png_ptr, old_row, - new_row); - - /* where old_row is what was displayed for - previously for the row. Note that the first - pass (pass == 0, really) will completely cover - the old row, so the rows do not have to be - initialized. After the first pass (and only - for interlaced images), you will have to pass - the current row, and the function will combine - the old row and the new row. - */ - } - - void - end_callback(png_structp png_ptr, png_infop info) - { - /* This function is called after the whole image - has been read, including any chunks after the - image (up to and including the IEND). You - will usually have the same info chunk as you - had in the header, although some data may have - been added to the comments and time fields. - - Most people won't do much here, perhaps setting - a flag that marks the image as finished. - */ - } - - - -.SH IV. Writing - -Much of this is very similar to reading. However, everything of -importance is repeated here, so you won't have to constantly look -back up in the reading section to understand writing. - -.SS Setup - -You will want to do the I/O initialization before you get into libpng, -so if it doesn't work, you don't have anything to undo. If you are not -using the standard I/O functions, you will need to replace them with -custom writing functions. See the discussion under Customizing libpng. - - FILE *fp = fopen(file_name, "wb"); - if (!fp) - { - return (ERROR); - } - -Next, png_struct and png_info need to be allocated and initialized. -As these can be both relatively large, you may not want to store these -on the stack, unless you have stack space to spare. Of course, you -will want to check if they return NULL. If you are also reading, -you won't want to name your read structure and your write structure -both "png_ptr"; you can call them anything you like, such as -"read_ptr" and "write_ptr". Look at pngtest.c, for example. - - png_structp png_ptr = png_create_write_struct - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn); - if (!png_ptr) - return (ERROR); - - png_infop info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) - { - png_destroy_write_struct(&png_ptr, - (png_infopp)NULL); - return (ERROR); - } - -If you want to use your own memory allocation routines, -define PNG_USER_MEM_SUPPORTED and use -png_create_write_struct_2() instead of png_create_write_struct(): - - png_structp png_ptr = png_create_write_struct_2 - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn, (png_voidp) - user_mem_ptr, user_malloc_fn, user_free_fn); - -After you have these structures, you will need to set up the -error handling. When libpng encounters an error, it expects to -longjmp() back to your routine. Therefore, you will need to call -setjmp() and pass the png_jmpbuf(png_ptr). If you -write the file from different routines, you will need to update -the png_jmpbuf(png_ptr) every time you enter a new routine that will -call a png_*() function. See your documentation of setjmp/longjmp -for your compiler for more information on setjmp/longjmp. See -the discussion on libpng error handling in the Customizing Libpng -section below for more information on the libpng error handling. - - if (setjmp(png_jmpbuf(png_ptr))) - { - png_destroy_write_struct(&png_ptr, &info_ptr); - fclose(fp); - return (ERROR); - } - ... - return; - -If you would rather avoid the complexity of setjmp/longjmp issues, -you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case -errors will result in a call to PNG_ABORT() which defaults to abort(). - -Now you need to set up the output code. The default for libpng is to -use the C function fwrite(). If you use this, you will need to pass a -valid FILE * in the function png_init_io(). Be sure that the file is -opened in binary mode. Again, if you wish to handle writing data in -another way, see the discussion on libpng I/O handling in the Customizing -Libpng section below. - - png_init_io(png_ptr, fp); - -.SS Write callbacks - -At this point, you can set up a callback function that will be -called after each row has been written, which you can use to control -a progress meter or the like. It's demonstrated in pngtest.c. -You must supply a function - - void write_row_callback(png_ptr, png_uint_32 row, - int pass); - { - /* put your code here */ - } - -(You can give it another name that you like instead of "write_row_callback") - -To inform libpng about your function, use - - png_set_write_status_fn(png_ptr, write_row_callback); - -You now have the option of modifying how the compression library will -run. The following functions are mainly for testing, but may be useful -in some cases, like if you need to write PNG files extremely fast and -are willing to give up some compression, or if you want to get the -maximum possible compression at the expense of slower writing. If you -have no special needs in this area, let the library do what it wants by -not calling this function at all, as it has been tuned to deliver a good -speed/compression ratio. The second parameter to png_set_filter() is -the filter method, for which the only valid values are 0 (as of the -July 1999 PNG specification, version 1.2) or 64 (if you are writing -a PNG datastream that is to be embedded in a MNG datastream). The third -parameter is a flag that indicates which filter type(s) are to be tested -for each scanline. See the PNG specification for details on the specific filter -types. - - - /* turn on or off filtering, and/or choose - specific filters. You can use either a single - PNG_FILTER_VALUE_NAME or the logical OR of one - or more PNG_FILTER_NAME masks. */ - png_set_filter(png_ptr, 0, - PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE | - PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB | - PNG_FILTER_UP | PNG_FILTER_VALUE_UP | - PNG_FILTER_AVE | PNG_FILTER_VALUE_AVE | - PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH| - PNG_ALL_FILTERS); - -If an application -wants to start and stop using particular filters during compression, -it should start out with all of the filters (to ensure that the previous -row of pixels will be stored in case it's needed later), and then add -and remove them after the start of compression. - -If you are writing a PNG datastream that is to be embedded in a MNG -datastream, the second parameter can be either 0 or 64. - -The png_set_compression_*() functions interface to the zlib compression -library, and should mostly be ignored unless you really know what you are -doing. The only generally useful call is png_set_compression_level() -which changes how much time zlib spends on trying to compress the image -data. See the Compression Library (zlib.h and algorithm.txt, distributed -with zlib) for details on the compression levels. - - /* set the zlib compression level */ - png_set_compression_level(png_ptr, - Z_BEST_COMPRESSION); - - /* set other zlib parameters */ - png_set_compression_mem_level(png_ptr, 8); - png_set_compression_strategy(png_ptr, - Z_DEFAULT_STRATEGY); - png_set_compression_window_bits(png_ptr, 15); - png_set_compression_method(png_ptr, 8); - png_set_compression_buffer_size(png_ptr, 8192) - -extern PNG_EXPORT(void,png_set_zbuf_size) - -.SS Setting the contents of info for output - -You now need to fill in the png_info structure with all the data you -wish to write before the actual image. Note that the only thing you -are allowed to write after the image is the text chunks and the time -chunk (as of PNG Specification 1.2, anyway). See png_write_end() and -the latest PNG specification for more information on that. If you -wish to write them before the image, fill them in now, and flag that -data as being valid. If you want to wait until after the data, don't -fill them until png_write_end(). For all the fields in png_info and -their data types, see png.h. For explanations of what the fields -contain, see the PNG specification. - -Some of the more important parts of the png_info are: - - png_set_IHDR(png_ptr, info_ptr, width, height, - bit_depth, color_type, interlace_type, - compression_type, filter_method) - width - holds the width of the image - in pixels (up to 2^31). - height - holds the height of the image - in pixels (up to 2^31). - bit_depth - holds the bit depth of one of the - image channels. - (valid values are 1, 2, 4, 8, 16 - and depend also on the - color_type. See also significant - bits (sBIT) below). - color_type - describes which color/alpha - channels are present. - PNG_COLOR_TYPE_GRAY - (bit depths 1, 2, 4, 8, 16) - PNG_COLOR_TYPE_GRAY_ALPHA - (bit depths 8, 16) - PNG_COLOR_TYPE_PALETTE - (bit depths 1, 2, 4, 8) - PNG_COLOR_TYPE_RGB - (bit_depths 8, 16) - PNG_COLOR_TYPE_RGB_ALPHA - (bit_depths 8, 16) - - PNG_COLOR_MASK_PALETTE - PNG_COLOR_MASK_COLOR - PNG_COLOR_MASK_ALPHA - - interlace_type - PNG_INTERLACE_NONE or - PNG_INTERLACE_ADAM7 - compression_type - (must be - PNG_COMPRESSION_TYPE_DEFAULT) - filter_method - (must be PNG_FILTER_TYPE_DEFAULT - or, if you are writing a PNG to - be embedded in a MNG datastream, - can also be - PNG_INTRAPIXEL_DIFFERENCING) - - png_set_PLTE(png_ptr, info_ptr, palette, - num_palette); - palette - the palette for the file - (array of png_color) - num_palette - number of entries in the palette - - png_set_gAMA(png_ptr, info_ptr, gamma); - gamma - the gamma the image was created - at (PNG_INFO_gAMA) - - png_set_sRGB(png_ptr, info_ptr, srgb_intent); - srgb_intent - the rendering intent - (PNG_INFO_sRGB) The presence of - the sRGB chunk means that the pixel - data is in the sRGB color space. - This chunk also implies specific - values of gAMA and cHRM. Rendering - intent is the CSS-1 property that - has been defined by the International - Color Consortium - (http://www.color.org). - It can be one of - PNG_sRGB_INTENT_SATURATION, - PNG_sRGB_INTENT_PERCEPTUAL, - PNG_sRGB_INTENT_ABSOLUTE, or - PNG_sRGB_INTENT_RELATIVE. - - - png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, - srgb_intent); - srgb_intent - the rendering intent - (PNG_INFO_sRGB) The presence of the - sRGB chunk means that the pixel - data is in the sRGB color space. - This function also causes gAMA and - cHRM chunks with the specific values - that are consistent with sRGB to be - written. - - png_set_iCCP(png_ptr, info_ptr, name, compression_type, - profile, proflen); - name - The profile name. - compression - The compression type; always - PNG_COMPRESSION_TYPE_BASE for PNG 1.0. - You may give NULL to this argument to - ignore it. - profile - International Color Consortium color - profile data. May contain NULs. - proflen - length of profile data in bytes. - - png_set_sBIT(png_ptr, info_ptr, sig_bit); - sig_bit - the number of significant bits for - (PNG_INFO_sBIT) each of the gray, red, - green, and blue channels, whichever are - appropriate for the given color type - (png_color_16) - - png_set_tRNS(png_ptr, info_ptr, trans, num_trans, - trans_values); - trans - array of transparent entries for - palette (PNG_INFO_tRNS) - trans_values - graylevel or color sample values of - the single transparent color for - non-paletted images (PNG_INFO_tRNS) - num_trans - number of transparent entries - (PNG_INFO_tRNS) - - png_set_hIST(png_ptr, info_ptr, hist); - (PNG_INFO_hIST) - hist - histogram of palette (array of - png_uint_16) - - png_set_tIME(png_ptr, info_ptr, mod_time); - mod_time - time image was last modified - (PNG_VALID_tIME) - - png_set_bKGD(png_ptr, info_ptr, background); - background - background color (PNG_VALID_bKGD) - - png_set_text(png_ptr, info_ptr, text_ptr, num_text); - text_ptr - array of png_text holding image - comments - text_ptr[i].compression - type of compression used - on "text" PNG_TEXT_COMPRESSION_NONE - PNG_TEXT_COMPRESSION_zTXt - PNG_ITXT_COMPRESSION_NONE - PNG_ITXT_COMPRESSION_zTXt - text_ptr[i].key - keyword for comment. Must contain - 1-79 characters. - text_ptr[i].text - text comments for current - keyword. Can be NULL or empty. - text_ptr[i].text_length - length of text string, - after decompression, 0 for iTXt - text_ptr[i].itxt_length - length of itxt string, - after decompression, 0 for tEXt/zTXt - text_ptr[i].lang - language of comment (NULL or - empty for unknown). - text_ptr[i].translated_keyword - keyword in UTF-8 (NULL - or empty for unknown). - num_text - number of comments - - png_set_sPLT(png_ptr, info_ptr, &palette_ptr, - num_spalettes); - palette_ptr - array of png_sPLT_struct structures - to be added to the list of palettes - in the info structure. - num_spalettes - number of palette structures to be - added. - - png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y, - unit_type); - offset_x - positive offset from the left - edge of the screen - offset_y - positive offset from the top - edge of the screen - unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER - - png_set_pHYs(png_ptr, info_ptr, res_x, res_y, - unit_type); - res_x - pixels/unit physical resolution - in x direction - res_y - pixels/unit physical resolution - in y direction - unit_type - PNG_RESOLUTION_UNKNOWN, - PNG_RESOLUTION_METER - - png_set_sCAL(png_ptr, info_ptr, unit, width, height) - unit - physical scale units (an integer) - width - width of a pixel in physical scale units - height - height of a pixel in physical scale units - (width and height are doubles) - - png_set_sCAL_s(png_ptr, info_ptr, unit, width, height) - unit - physical scale units (an integer) - width - width of a pixel in physical scale units - height - height of a pixel in physical scale units - (width and height are strings like "2.54") - - png_set_unknown_chunks(png_ptr, info_ptr, &unknowns, - num_unknowns) - unknowns - array of png_unknown_chunk - structures holding unknown chunks - unknowns[i].name - name of unknown chunk - unknowns[i].data - data of unknown chunk - unknowns[i].size - size of unknown chunk's data - unknowns[i].location - position to write chunk in file - 0: do not write chunk - PNG_HAVE_IHDR: before PLTE - PNG_HAVE_PLTE: before IDAT - PNG_AFTER_IDAT: after IDAT - -The "location" member is set automatically according to -what part of the output file has already been written. -You can change its value after calling png_set_unknown_chunks() -as demonstrated in pngtest.c. Within each of the "locations", -the chunks are sequenced according to their position in the -structure (that is, the value of "i", which is the order in which -the chunk was either read from the input file or defined with -png_set_unknown_chunks). - -A quick word about text and num_text. text is an array of png_text -structures. num_text is the number of valid structures in the array. -Each png_text structure holds a language code, a keyword, a text value, -and a compression type. - -The compression types have the same valid numbers as the compression -types of the image data. Currently, the only valid number is zero. -However, you can store text either compressed or uncompressed, unlike -images, which always have to be compressed. So if you don't want the -text compressed, set the compression type to PNG_TEXT_COMPRESSION_NONE. -Because tEXt and zTXt chunks don't have a language field, if you -specify PNG_TEXT_COMPRESSION_NONE or PNG_TEXT_COMPRESSION_zTXt -any language code or translated keyword will not be written out. - -Until text gets around 1000 bytes, it is not worth compressing it. -After the text has been written out to the file, the compression type -is set to PNG_TEXT_COMPRESSION_NONE_WR or PNG_TEXT_COMPRESSION_zTXt_WR, -so that it isn't written out again at the end (in case you are calling -png_write_end() with the same struct. - -The keywords that are given in the PNG Specification are: - - Title Short (one line) title or - caption for image - Author Name of image's creator - Description Description of image (possibly long) - Copyright Copyright notice - Creation Time Time of original image creation - (usually RFC 1123 format, see below) - Software Software used to create the image - Disclaimer Legal disclaimer - Warning Warning of nature of content - Source Device used to create the image - Comment Miscellaneous comment; conversion - from other image format - -The keyword-text pairs work like this. Keywords should be short -simple descriptions of what the comment is about. Some typical -keywords are found in the PNG specification, as is some recommendations -on keywords. You can repeat keywords in a file. You can even write -some text before the image and some after. For example, you may want -to put a description of the image before the image, but leave the -disclaimer until after, so viewers working over modem connections -don't have to wait for the disclaimer to go over the modem before -they start seeing the image. Finally, keywords should be full -words, not abbreviations. Keywords and text are in the ISO 8859-1 -(Latin-1) character set (a superset of regular ASCII) and can not -contain NUL characters, and should not contain control or other -unprintable characters. To make the comments widely readable, stick -with basic ASCII, and avoid machine specific character set extensions -like the IBM-PC character set. The keyword must be present, but -you can leave off the text string on non-compressed pairs. -Compressed pairs must have a text string, as only the text string -is compressed anyway, so the compression would be meaningless. - -PNG supports modification time via the png_time structure. Two -conversion routines are provided, png_convert_from_time_t() for -time_t and png_convert_from_struct_tm() for struct tm. The -time_t routine uses gmtime(). You don't have to use either of -these, but if you wish to fill in the png_time structure directly, -you should provide the time in universal time (GMT) if possible -instead of your local time. Note that the year number is the full -year (e.g. 1998, rather than 98 - PNG is year 2000 compliant!), and -that months start with 1. - -If you want to store the time of the original image creation, you should -use a plain tEXt chunk with the "Creation Time" keyword. This is -necessary because the "creation time" of a PNG image is somewhat vague, -depending on whether you mean the PNG file, the time the image was -created in a non-PNG format, a still photo from which the image was -scanned, or possibly the subject matter itself. In order to facilitate -machine-readable dates, it is recommended that the "Creation Time" -tEXt chunk use RFC 1123 format dates (e.g. "22 May 1997 18:07:10 GMT"), -although this isn't a requirement. Unlike the tIME chunk, the -"Creation Time" tEXt chunk is not expected to be automatically changed -by the software. To facilitate the use of RFC 1123 dates, a function -png_convert_to_rfc1123(png_timep) is provided to convert from PNG -time to an RFC 1123 format string. - -.SS Writing unknown chunks - -You can use the png_set_unknown_chunks function to queue up chunks -for writing. You give it a chunk name, raw data, and a size; that's -all there is to it. The chunks will be written by the next following -png_write_info_before_PLTE, png_write_info, or png_write_end function. -Any chunks previously read into the info structure's unknown-chunk -list will also be written out in a sequence that satisfies the PNG -specification's ordering rules. - -.SS The high-level write interface - -At this point there are two ways to proceed; through the high-level -write interface, or through a sequence of low-level write operations. -You can use the high-level interface if your image data is present -in the info structure. All defined output -transformations are permitted, enabled by the following masks. - - PNG_TRANSFORM_IDENTITY No transformation - PNG_TRANSFORM_PACKING Pack 1, 2 and 4-bit samples - PNG_TRANSFORM_PACKSWAP Change order of packed - pixels to LSB first - PNG_TRANSFORM_INVERT_MONO Invert monochrome images - PNG_TRANSFORM_SHIFT Normalize pixels to the - sBIT depth - PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA - to BGRA - PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA - to AG - PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity - to transparency - PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples - PNG_TRANSFORM_STRIP_FILLER Strip out filler bytes. - -If you have valid image data in the info structure (you can use -png_set_rows() to put image data in the info structure), simply do this: - - png_write_png(png_ptr, info_ptr, png_transforms, NULL) - -where png_transforms is an integer containing the logical OR of some set of -transformation flags. This call is equivalent to png_write_info(), -followed the set of transformations indicated by the transform mask, -then png_write_image(), and finally png_write_end(). - -(The final parameter of this call is not yet used. Someday it might point -to transformation parameters required by some future output transform.) - -.SS The low-level write interface - -If you are going the low-level route instead, you are now ready to -write all the file information up to the actual image data. You do -this with a call to png_write_info(). - - png_write_info(png_ptr, info_ptr); - -Note that there is one transformation you may need to do before -png_write_info(). In PNG files, the alpha channel in an image is the -level of opacity. If your data is supplied as a level of -transparency, you can invert the alpha channel before you write it, so -that 0 is fully transparent and 255 (in 8-bit or paletted images) or -65535 (in 16-bit images) is fully opaque, with - - png_set_invert_alpha(png_ptr); - -This must appear before png_write_info() instead of later with the -other transformations because in the case of paletted images the tRNS -chunk data has to be inverted before the tRNS chunk is written. If -your image is not a paletted image, the tRNS data (which in such cases -represents a single color to be rendered as transparent) won't need to -be changed, and you can safely do this transformation after your -png_write_info() call. - -If you need to write a private chunk that you want to appear before -the PLTE chunk when PLTE is present, you can write the PNG info in -two steps, and insert code to write your own chunk between them: - - png_write_info_before_PLTE(png_ptr, info_ptr); - png_set_unknown_chunks(png_ptr, info_ptr, ...); - png_write_info(png_ptr, info_ptr); - -After you've written the file information, you can set up the library -to handle any special transformations of the image data. The various -ways to transform the data will be described in the order that they -should occur. This is important, as some of these change the color -type and/or bit depth of the data, and some others only work on -certain color types and bit depths. Even though each transformation -checks to see if it has data that it can do something with, you should -make sure to only enable a transformation if it will be valid for the -data. For example, don't swap red and blue on grayscale data. - -PNG files store RGB pixels packed into 3 or 6 bytes. This code tells -the library to strip input data that has 4 or 8 bytes per pixel down -to 3 or 6 bytes (or strip 2 or 4-byte grayscale+filler data to 1 or 2 -bytes per pixel). - - png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); - -where the 0 is unused, and the location is either PNG_FILLER_BEFORE or -PNG_FILLER_AFTER, depending upon whether the filler byte in the pixel -is stored XRGB or RGBX. - -PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as -they can, resulting in, for example, 8 pixels per byte for 1 bit files. -If the data is supplied at 1 pixel per byte, use this code, which will -correctly pack the pixels into a single byte: - - png_set_packing(png_ptr); - -PNG files reduce possible bit depths to 1, 2, 4, 8, and 16. If your -data is of another bit depth, you can write an sBIT chunk into the -file so that decoders can recover the original data if desired. - - /* Set the true bit depth of the image data */ - if (color_type & PNG_COLOR_MASK_COLOR) - { - sig_bit.red = true_bit_depth; - sig_bit.green = true_bit_depth; - sig_bit.blue = true_bit_depth; - } - else - { - sig_bit.gray = true_bit_depth; - } - if (color_type & PNG_COLOR_MASK_ALPHA) - { - sig_bit.alpha = true_bit_depth; - } - - png_set_sBIT(png_ptr, info_ptr, &sig_bit); - -If the data is stored in the row buffer in a bit depth other than -one supported by PNG (e.g. 3 bit data in the range 0-7 for a 4-bit PNG), -this will scale the values to appear to be the correct bit depth as -is required by PNG. - - png_set_shift(png_ptr, &sig_bit); - -PNG files store 16 bit pixels in network byte order (big-endian, -ie. most significant bits first). This code would be used if they are -supplied the other way (little-endian, i.e. least significant bits -first, the way PCs store them): - - if (bit_depth > 8) - png_set_swap(png_ptr); - -If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you -need to change the order the pixels are packed into bytes, you can use: - - if (bit_depth < 8) - png_set_packswap(png_ptr); - -PNG files store 3 color pixels in red, green, blue order. This code -would be used if they are supplied as blue, green, red: - - png_set_bgr(png_ptr); - -PNG files describe monochrome as black being zero and white being -one. This code would be used if the pixels are supplied with this reversed -(black being one and white being zero): - - png_set_invert_mono(png_ptr); - -Finally, you can write your own transformation function if none of -the existing ones meets your needs. This is done by setting a callback -with - - png_set_write_user_transform_fn(png_ptr, - write_transform_fn); - -You must supply the function - - void write_transform_fn(png_ptr ptr, row_info_ptr - row_info, png_bytep data) - -See pngtest.c for a working example. Your function will be called -before any of the other transformations are processed. - -You can also set up a pointer to a user structure for use by your -callback function. - - png_set_user_transform_info(png_ptr, user_ptr, 0, 0); - -The user_channels and user_depth parameters of this function are ignored -when writing; you can set them to zero as shown. - -You can retrieve the pointer via the function png_get_user_transform_ptr(). -For example: - - voidp write_user_transform_ptr = - png_get_user_transform_ptr(png_ptr); - -It is possible to have libpng flush any pending output, either manually, -or automatically after a certain number of lines have been written. To -flush the output stream a single time call: - - png_write_flush(png_ptr); - -and to have libpng flush the output stream periodically after a certain -number of scanlines have been written, call: - - png_set_flush(png_ptr, nrows); - -Note that the distance between rows is from the last time png_write_flush() -was called, or the first row of the image if it has never been called. -So if you write 50 lines, and then png_set_flush 25, it will flush the -output on the next scanline, and every 25 lines thereafter, unless -png_write_flush() is called before 25 more lines have been written. -If nrows is too small (less than about 10 lines for a 640 pixel wide -RGB image) the image compression may decrease noticeably (although this -may be acceptable for real-time applications). Infrequent flushing will -only degrade the compression performance by a few percent over images -that do not use flushing. - -.SS Writing the image data - -That's it for the transformations. Now you can write the image data. -The simplest way to do this is in one function call. If you have the -whole image in memory, you can just call png_write_image() and libpng -will write the image. You will need to pass in an array of pointers to -each row. This function automatically handles interlacing, so you don't -need to call png_set_interlace_handling() or call this function multiple -times, or any of that other stuff necessary with png_write_rows(). - - png_write_image(png_ptr, row_pointers); - -where row_pointers is: - - png_byte *row_pointers[height]; - -You can point to void or char or whatever you use for pixels. - -If you don't want to write the whole image at once, you can -use png_write_rows() instead. If the file is not interlaced, -this is simple: - - png_write_rows(png_ptr, row_pointers, - number_of_rows); - -row_pointers is the same as in the png_write_image() call. - -If you are just writing one row at a time, you can do this with -a single row_pointer instead of an array of row_pointers: - - png_bytep row_pointer = row; - - png_write_row(png_ptr, row_pointer); - -When the file is interlaced, things can get a good deal more -complicated. The only currently (as of the PNG Specification -version 1.2, dated July 1999) defined interlacing scheme for PNG files -is the "Adam7" interlace scheme, that breaks down an -image into seven smaller images of varying size. libpng will build -these images for you, or you can do them yourself. If you want to -build them yourself, see the PNG specification for details of which -pixels to write when. - -If you don't want libpng to handle the interlacing details, just -use png_set_interlace_handling() and call png_write_rows() the -correct number of times to write all seven sub-images. - -If you want libpng to build the sub-images, call this before you start -writing any rows: - - number_of_passes = - png_set_interlace_handling(png_ptr); - -This will return the number of passes needed. Currently, this -is seven, but may change if another interlace type is added. - -Then write the complete image number_of_passes times. - - png_write_rows(png_ptr, row_pointers, - number_of_rows); - -As some of these rows are not used, and thus return immediately, -you may want to read about interlacing in the PNG specification, -and only update the rows that are actually used. - -.SS Finishing a sequential write - -After you are finished writing the image, you should finish writing -the file. If you are interested in writing comments or time, you should -pass an appropriately filled png_info pointer. If you are not interested, -you can pass NULL. - - png_write_end(png_ptr, info_ptr); - -When you are done, you can free all memory used by libpng like this: - - png_destroy_write_struct(&png_ptr, &info_ptr); - -It is also possible to individually free the info_ptr members that -point to libpng-allocated storage with the following function: - - png_free_data(png_ptr, info_ptr, mask, seq) - mask - identifies data to be freed, a mask - containing the logical OR of one or - more of - PNG_FREE_PLTE, PNG_FREE_TRNS, - PNG_FREE_HIST, PNG_FREE_ICCP, - PNG_FREE_PCAL, PNG_FREE_ROWS, - PNG_FREE_SCAL, PNG_FREE_SPLT, - PNG_FREE_TEXT, PNG_FREE_UNKN, - or simply PNG_FREE_ALL - seq - sequence number of item to be freed - (-1 for all items) - -This function may be safely called when the relevant storage has -already been freed, or has not yet been allocated, or was allocated -by the user and not by libpng, and will in those -cases do nothing. The "seq" parameter is ignored if only one item -of the selected data type, such as PLTE, is allowed. If "seq" is not --1, and multiple items are allowed for the data type identified in -the mask, such as text or sPLT, only the n'th item in the structure -is freed, where n is "seq". - -If you allocated data such as a palette that you passed -in to libpng with png_set_*, you must not free it until just before the call to -png_destroy_write_struct(). - -The default behavior is only to free data that was allocated internally -by libpng. This can be changed, so that libpng will not free the data, -or so that it will free data that was allocated by the user with png_malloc() -or png_zalloc() and passed in via a png_set_*() function, with - - png_data_freer(png_ptr, info_ptr, freer, mask) - mask - which data elements are affected - same choices as in png_free_data() - freer - one of - PNG_DESTROY_WILL_FREE_DATA - PNG_SET_WILL_FREE_DATA - PNG_USER_WILL_FREE_DATA - -For example, to transfer responsibility for some data from a read structure -to a write structure, you could use - - png_data_freer(read_ptr, read_info_ptr, - PNG_USER_WILL_FREE_DATA, - PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST) - png_data_freer(write_ptr, write_info_ptr, - PNG_DESTROY_WILL_FREE_DATA, - PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST) - -thereby briefly reassigning responsibility for freeing to the user but -immediately afterwards reassigning it once more to the write_destroy -function. Having done this, it would then be safe to destroy the read -structure and continue to use the PLTE, tRNS, and hIST data in the write -structure. - -This function only affects data that has already been allocated. -You can call this function before calling after the png_set_*() functions -to control whether the user or png_destroy_*() is supposed to free the data. -When the user assumes responsibility for libpng-allocated data, the -application must use -png_free() to free it, and when the user transfers responsibility to libpng -for data that the user has allocated, the user must have used png_malloc() -or png_zalloc() to allocate it. - -If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword -separately, do not transfer responsibility for freeing text_ptr to libpng, -because when libpng fills a png_text structure it combines these members with -the key member, and png_free_data() will free only text_ptr.key. Similarly, -if you transfer responsibility for free'ing text_ptr from libpng to your -application, your application must not separately free those members. -For a more compact example of writing a PNG image, see the file example.c. - -.SH V. Modifying/Customizing libpng: - -There are three issues here. The first is changing how libpng does -standard things like memory allocation, input/output, and error handling. -The second deals with more complicated things like adding new chunks, -adding new transformations, and generally changing how libpng works. -Both of those are compile-time issues; that is, they are generally -determined at the time the code is written, and there is rarely a need -to provide the user with a means of changing them. The third is a -run-time issue: choosing between and/or tuning one or more alternate -versions of computationally intensive routines; specifically, optimized -assembly-language (and therefore compiler- and platform-dependent) -versions. - -Memory allocation, input/output, and error handling - -All of the memory allocation, input/output, and error handling in libpng -goes through callbacks that are user-settable. The default routines are -in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change -these functions, call the appropriate png_set_*_fn() function. - -Memory allocation is done through the functions png_malloc() -and png_free(). These currently just call the standard C functions. If -your pointers can't access more then 64K at a time, you will want to set -MAXSEG_64K in zlib.h. Since it is unlikely that the method of handling -memory allocation on a platform will change between applications, these -functions must be modified in the library at compile time. If you prefer -to use a different method of allocating and freeing data, you can use -png_create_read_struct_2() or png_create_write_struct_2() to register -your own functions as described above. - -These functions also provide a void pointer that can be retrieved via - - mem_ptr=png_get_mem_ptr(png_ptr); - -Your replacement memory functions must have prototypes as follows: - - png_voidp malloc_fn(png_structp png_ptr, - png_size_t size); - void free_fn(png_structp png_ptr, png_voidp ptr); - -Your malloc_fn() should return NULL in case of failure. The png_malloc() -function will call png_error() if it receives a NULL from the system -memory allocator or from your replacement malloc_fn(). - -Input/Output in libpng is done through png_read() and png_write(), -which currently just call fread() and fwrite(). The FILE * is stored in -png_struct and is initialized via png_init_io(). If you wish to change -the method of I/O, the library supplies callbacks that you can set -through the function png_set_read_fn() and png_set_write_fn() at run -time, instead of calling the png_init_io() function. These functions -also provide a void pointer that can be retrieved via the function -png_get_io_ptr(). For example: - - png_set_read_fn(png_structp read_ptr, - voidp read_io_ptr, png_rw_ptr read_data_fn) - - png_set_write_fn(png_structp write_ptr, - voidp write_io_ptr, png_rw_ptr write_data_fn, - png_flush_ptr output_flush_fn); - - voidp read_io_ptr = png_get_io_ptr(read_ptr); - voidp write_io_ptr = png_get_io_ptr(write_ptr); - -The replacement I/O functions must have prototypes as follows: - - void user_read_data(png_structp png_ptr, - png_bytep data, png_size_t length); - void user_write_data(png_structp png_ptr, - png_bytep data, png_size_t length); - void user_flush_data(png_structp png_ptr); - -Supplying NULL for the read, write, or flush functions sets them back -to using the default C stream functions. It is an error to read from -a write stream, and vice versa. - -Error handling in libpng is done through png_error() and png_warning(). -Errors handled through png_error() are fatal, meaning that png_error() -should never return to its caller. Currently, this is handled via -setjmp() and longjmp() (unless you have compiled libpng with -PNG_SETJMP_NOT_SUPPORTED, in which case it is handled via PNG_ABORT()), -but you could change this to do things like exit() if you should wish. - -On non-fatal errors, png_warning() is called -to print a warning message, and then control returns to the calling code. -By default png_error() and png_warning() print a message on stderr via -fprintf() unless the library is compiled with PNG_NO_CONSOLE_IO defined -(because you don't want the messages) or PNG_NO_STDIO defined (because -fprintf() isn't available). If you wish to change the behavior of the error -functions, you will need to set up your own message callbacks. These -functions are normally supplied at the time that the png_struct is created. -It is also possible to redirect errors and warnings to your own replacement -functions after png_create_*_struct() has been called by calling: - - png_set_error_fn(png_structp png_ptr, - png_voidp error_ptr, png_error_ptr error_fn, - png_error_ptr warning_fn); - - png_voidp error_ptr = png_get_error_ptr(png_ptr); - -If NULL is supplied for either error_fn or warning_fn, then the libpng -default function will be used, calling fprintf() and/or longjmp() if a -problem is encountered. The replacement error functions should have -parameters as follows: - - void user_error_fn(png_structp png_ptr, - png_const_charp error_msg); - void user_warning_fn(png_structp png_ptr, - png_const_charp warning_msg); - -The motivation behind using setjmp() and longjmp() is the C++ throw and -catch exception handling methods. This makes the code much easier to write, -as there is no need to check every return code of every function call. -However, there are some uncertainties about the status of local variables -after a longjmp, so the user may want to be careful about doing anything after -setjmp returns non-zero besides returning itself. Consult your compiler -documentation for more details. For an alternative approach, you may wish -to use the "cexcept" facility (see http://cexcept.sourceforge.net). - -.SS Custom chunks - -If you need to read or write custom chunks, you may need to get deeper -into the libpng code. The library now has mechanisms for storing -and writing chunks of unknown type; you can even declare callbacks -for custom chunks. Hoewver, this may not be good enough if the -library code itself needs to know about interactions between your -chunk and existing `intrinsic' chunks. - -If you need to write a new intrinsic chunk, first read the PNG -specification. Acquire a first level of -understanding of how it works. Pay particular attention to the -sections that describe chunk names, and look at how other chunks were -designed, so you can do things similarly. Second, check out the -sections of libpng that read and write chunks. Try to find a chunk -that is similar to yours and use it as a template. More details can -be found in the comments inside the code. It is best to handle unknown -chunks in a generic method, via callback functions, instead of by -modifying libpng functions. - -If you wish to write your own transformation for the data, look through -the part of the code that does the transformations, and check out some of -the simpler ones to get an idea of how they work. Try to find a similar -transformation to the one you want to add and copy off of it. More details -can be found in the comments inside the code itself. - -.SS Configuring for 16 bit platforms - -You will want to look into zconf.h to tell zlib (and thus libpng) that -it cannot allocate more then 64K at a time. Even if you can, the memory -won't be accessible. So limit zlib and libpng to 64K by defining MAXSEG_64K. - -.SS Configuring for DOS - -For DOS users who only have access to the lower 640K, you will -have to limit zlib's memory usage via a png_set_compression_mem_level() -call. See zlib.h or zconf.h in the zlib library for more information. - -.SS Configuring for Medium Model - -Libpng's support for medium model has been tested on most of the popular -compilers. Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets -defined, and FAR gets defined to far in pngconf.h, and you should be -all set. Everything in the library (except for zlib's structure) is -expecting far data. You must use the typedefs with the p or pp on -the end for pointers (or at least look at them and be careful). Make -note that the rows of data are defined as png_bytepp, which is an -unsigned char far * far *. - -.SS Configuring for gui/windowing platforms: - -You will need to write new error and warning functions that use the GUI -interface, as described previously, and set them to be the error and -warning functions at the time that png_create_*_struct() is called, -in order to have them available during the structure initialization. -They can be changed later via png_set_error_fn(). On some compilers, -you may also have to change the memory allocators (png_malloc, etc.). - -.SS Configuring for compiler xxx: - -All includes for libpng are in pngconf.h. If you need to add/change/delete -an include, this is the place to do it. The includes that are not -needed outside libpng are protected by the PNG_INTERNAL definition, -which is only defined for those routines inside libpng itself. The -files in libpng proper only include png.h, which includes pngconf.h. - -.SS Configuring zlib: - -There are special functions to configure the compression. Perhaps the -most useful one changes the compression level, which currently uses -input compression values in the range 0 - 9. The library normally -uses the default compression level (Z_DEFAULT_COMPRESSION = 6). Tests -have shown that for a large majority of images, compression values in -the range 3-6 compress nearly as well as higher levels, and do so much -faster. For online applications it may be desirable to have maximum speed -(Z_BEST_SPEED = 1). With versions of zlib after v0.99, you can also -specify no compression (Z_NO_COMPRESSION = 0), but this would create -files larger than just storing the raw bitmap. You can specify the -compression level by calling: - - png_set_compression_level(png_ptr, level); - -Another useful one is to reduce the memory level used by the library. -The memory level defaults to 8, but it can be lowered if you are -short on memory (running DOS, for example, where you only have 640K). -Note that the memory level does have an effect on compression; among -other things, lower levels will result in sections of incompressible -data being emitted in smaller stored blocks, with a correspondingly -larger relative overhead of up to 15% in the worst case. - - png_set_compression_mem_level(png_ptr, level); - -The other functions are for configuring zlib. They are not recommended -for normal use and may result in writing an invalid PNG file. See -zlib.h for more information on what these mean. - - png_set_compression_strategy(png_ptr, - strategy); - png_set_compression_window_bits(png_ptr, - window_bits); - png_set_compression_method(png_ptr, method); - png_set_compression_buffer_size(png_ptr, size); - -.SS Controlling row filtering - -If you want to control whether libpng uses filtering or not, which -filters are used, and how it goes about picking row filters, you -can call one of these functions. The selection and configuration -of row filters can have a significant impact on the size and -encoding speed and a somewhat lesser impact on the decoding speed -of an image. Filtering is enabled by default for RGB and grayscale -images (with and without alpha), but not for paletted images nor -for any images with bit depths less than 8 bits/pixel. - -The 'method' parameter sets the main filtering method, which is -currently only '0' in the PNG 1.2 specification. The 'filters' -parameter sets which filter(s), if any, should be used for each -scanline. Possible values are PNG_ALL_FILTERS and PNG_NO_FILTERS -to turn filtering on and off, respectively. - -Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB, -PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise -ORed together with '|' to specify one or more filters to use. -These filters are described in more detail in the PNG specification. -If you intend to change the filter type during the course of writing -the image, you should start with flags set for all of the filters -you intend to use so that libpng can initialize its internal -structures appropriately for all of the filter types. (Note that this -means the first row must always be adaptively filtered, because libpng -currently does not allocate the filter buffers until png_write_row() -is called for the first time.) - - filters = PNG_FILTER_NONE | PNG_FILTER_SUB - PNG_FILTER_UP | PNG_FILTER_AVE | - PNG_FILTER_PAETH | PNG_ALL_FILTERS; - - png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, - filters); - The second parameter can also be - PNG_INTRAPIXEL_DIFFERENCING if you are - writing a PNG to be embedded in a MNG - datastream. This parameter must be the - same as the value of filter_method used - in png_set_IHDR(). - -It is also possible to influence how libpng chooses from among the -available filters. This is done in one or both of two ways - by -telling it how important it is to keep the same filter for successive -rows, and by telling it the relative computational costs of the filters. - - double weights[3] = {1.5, 1.3, 1.1}, - costs[PNG_FILTER_VALUE_LAST] = - {1.0, 1.3, 1.3, 1.5, 1.7}; - - png_set_filter_heuristics(png_ptr, - PNG_FILTER_HEURISTIC_WEIGHTED, 3, - weights, costs); - -The weights are multiplying factors that indicate to libpng that the -row filter should be the same for successive rows unless another row filter -is that many times better than the previous filter. In the above example, -if the previous 3 filters were SUB, SUB, NONE, the SUB filter could have a -"sum of absolute differences" 1.5 x 1.3 times higher than other filters -and still be chosen, while the NONE filter could have a sum 1.1 times -higher than other filters and still be chosen. Unspecified weights are -taken to be 1.0, and the specified weights should probably be declining -like those above in order to emphasize recent filters over older filters. - -The filter costs specify for each filter type a relative decoding cost -to be considered when selecting row filters. This means that filters -with higher costs are less likely to be chosen over filters with lower -costs, unless their "sum of absolute differences" is that much smaller. -The costs do not necessarily reflect the exact computational speeds of -the various filters, since this would unduly influence the final image -size. - -Note that the numbers above were invented purely for this example and -are given only to help explain the function usage. Little testing has -been done to find optimum values for either the costs or the weights. - -.SS Removing unwanted object code - -There are a bunch of #define's in pngconf.h that control what parts of -libpng are compiled. All the defines end in _SUPPORTED. If you are -never going to use a capability, you can change the #define to #undef -before recompiling libpng and save yourself code and data space, or -you can turn off individual capabilities with defines that begin with -PNG_NO_. - -You can also turn all of the transforms and ancillary chunk capabilities -off en masse with compiler directives that define -PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS, -or all four, -along with directives to turn on any of the capabilities that you do -want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable -the extra transformations but still leave the library fully capable of reading -and writing PNG files with all known public chunks -Use of the PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive -produces a library that is incapable of reading or writing ancillary chunks. -If you are not using the progressive reading capability, you can -turn that off with PNG_NO_PROGRESSIVE_READ (don't confuse -this with the INTERLACING capability, which you'll still have). - -All the reading and writing specific code are in separate files, so the -linker should only grab the files it needs. However, if you want to -make sure, or if you are building a stand alone library, all the -reading files start with pngr and all the writing files start with -pngw. The files that don't match either (like png.c, pngtrans.c, etc.) -are used for both reading and writing, and always need to be included. -The progressive reader is in pngpread.c - -If you are creating or distributing a dynamically linked library (a .so -or DLL file), you should not remove or disable any parts of the library, -as this will cause applications linked with different versions of the -library to fail if they call functions not available in your library. -The size of the library itself should not be an issue, because only -those sections that are actually used will be loaded into memory. - -.SS Requesting debug printout - -The macro definition PNG_DEBUG can be used to request debugging -printout. Set it to an integer value in the range 0 to 3. Higher -numbers result in increasing amounts of debugging information. The -information is printed to the "stderr" file, unless another file -name is specified in the PNG_DEBUG_FILE macro definition. - -When PNG_DEBUG > 0, the following functions (macros) become available: - - png_debug(level, message) - png_debug1(level, message, p1) - png_debug2(level, message, p1, p2) - -in which "level" is compared to PNG_DEBUG to decide whether to print -the message, "message" is the formatted string to be printed, -and p1 and p2 are parameters that are to be embedded in the string -according to printf-style formatting directives. For example, - - png_debug1(2, "foo=%d\n", foo); - -is expanded to - - if(PNG_DEBUG > 2) - fprintf(PNG_DEBUG_FILE, "foo=%d\n", foo); - -When PNG_DEBUG is defined but is zero, the macros aren't defined, but you -can still use PNG_DEBUG to control your own debugging: - - #ifdef PNG_DEBUG - fprintf(stderr, ... - #endif - -When PNG_DEBUG = 1, the macros are defined, but only png_debug statements -having level = 0 will be printed. There aren't any such statements in -this version of libpng, but if you insert some they will be printed. - -.SH VI. Runtime optimization - -A new feature in libpng 1.2.0 is the ability to dynamically switch between -standard and optimized versions of some routines. Currently these are -limited to three computationally intensive tasks when reading PNG files: -decoding row filters, expanding interlacing, and combining interlaced or -transparent row data with previous row data. Currently the optimized -versions are available only for x86 (Intel, AMD, etc.) platforms with -MMX support, though this may change in future versions. (For example, -the non-MMX assembler optimizations for zlib might become similarly -runtime-selectable in future releases, in which case libpng could be -extended to support them. Alternatively, the compile-time choice of -floating-point versus integer routines for gamma correction might become -runtime-selectable.) - -Because such optimizations tend to be very platform- and compiler-dependent, -both in how they are written and in how they perform, the new runtime code -in libpng has been written to allow programs to query, enable, and disable -either specific optimizations or all such optimizations. For example, to -enable all possible optimizations (bearing in mind that some "optimizations" -may actually run more slowly in rare cases): - - #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) - png_uint_32 mask, flags; - - flags = png_get_asm_flags(png_ptr); - mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE); - png_set_asm_flags(png_ptr, flags | mask); - #endif - -To enable only optimizations relevant to reading PNGs, use PNG_SELECT_READ -by itself when calling png_get_asm_flagmask(); similarly for optimizing -only writing. To disable all optimizations: - - #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) - flags = png_get_asm_flags(png_ptr); - mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE); - png_set_asm_flags(png_ptr, flags & ~mask); - #endif - -To enable or disable only MMX-related features, use png_get_mmx_flagmask() -in place of png_get_asm_flagmask(). The mmx version takes one additional -parameter: - - #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) - int selection = PNG_SELECT_READ | PNG_SELECT_WRITE; - int compilerID; - - mask = png_get_mmx_flagmask(selection, &compilerID); - #endif - -On return, compilerID will indicate which version of the MMX assembler -optimizations was compiled. Currently two flavors exist: Microsoft -Visual C++ (compilerID == 1) and GNU C (a.k.a. gcc/gas, compilerID == 2). -On non-x86 platforms or on systems compiled without MMX optimizations, a -value of -1 is used. - -Note that both png_get_asm_flagmask() and png_get_mmx_flagmask() return -all valid, settable optimization bits for the version of the library that's -currently in use. In the case of shared (dynamically linked) libraries, -this may include optimizations that did not exist at the time the code was -written and compiled. It is also possible, of course, to enable only known, -specific optimizations; for example: - - #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) - flags = PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \ - | PNG_ASM_FLAG_MMX_READ_INTERLACE \ - | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ - | PNG_ASM_FLAG_MMX_READ_FILTER_UP \ - | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ - | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ; - png_set_asm_flags(png_ptr, flags); - #endif - -This method would enable only the MMX read-optimizations available at the -time of libpng 1.2.0's release, regardless of whether a later version of -the DLL were actually being used. (Also note that these functions did not -exist in versions older than 1.2.0, so any attempt to run a dynamically -linked app on such an older version would fail.) - -To determine whether the processor supports MMX instructions at all, use -the png_mmx_support() function: - - #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) - mmxsupport = png_mmx_support(); - #endif - -It returns -1 if MMX support is not compiled into libpng, 0 if MMX code -is compiled but MMX is not supported by the processor, or 1 if MMX support -is fully available. Note that png_mmx_support(), png_get_mmx_flagmask(), -and png_get_asm_flagmask() all may be called without allocating and ini- -tializing any PNG structures (for example, as part of a usage screen or -"about" box). - -The following code can be used to prevent an application from using the -thread_unsafe features, even if libpng was built with PNG_THREAD_UNSAFE_OK -defined: - -#if defined(PNG_USE_PNGGCCRD) && defined(PNG_ASSEMBLER_CODE_SUPPORTED) \ - && defined(PNG_THREAD_UNSAFE_OK) - /* Disable thread-unsafe features of pnggccrd */ - if (png_access_version() >= 10200) - { - png_uint_32 mmx_disable_mask = 0; - png_uint_32 asm_flags; - - mmx_disable_mask |= ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \ - | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ - | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ - | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ); - asm_flags = png_get_asm_flags(png_ptr); - png_set_asm_flags(png_ptr, asm_flags & ~mmx_disable_mask); - } -#endif - -For more extensive examples of runtime querying, enabling and disabling -of optimized features, see contrib/gregbook/readpng2.c in the libpng -source-code distribution. - - -.SH VII. MNG support - -The MNG specification (available at http://www.libpng.org/pub/mng) allows -certain extensions to PNG for PNG images that are embedded in MNG datastreams. -Libpng can support some of these extensions. To enable them, use the -png_permit_mng_features() function: - - feature_set = png_permit_mng_features(png_ptr, mask) - mask is a png_uint_32 containing the logical OR of the - features you want to enable. These include - PNG_FLAG_MNG_EMPTY_PLTE - PNG_FLAG_MNG_FILTER_64 - PNG_ALL_MNG_FEATURES - feature_set is a png_32_uint that is the logical AND of - your mask with the set of MNG features that is - supported by the version of libpng that you are using. - -It is an error to use this function when reading or writing a standalone -PNG file with the PNG 8-byte signature. The PNG datastream must be wrapped -in a MNG datastream. As a minimum, it must have the MNG 8-byte signature -and the MHDR and MEND chunks. Libpng does not provide support for these -or any other MNG chunks; your application must provide its own support for -them. You may wish to consider using libmng (available at -http://www.libmng.com) instead. - -.SH VIII. Changes to Libpng from version 0.88 - -It should be noted that versions of libpng later than 0.96 are not -distributed by the original libpng author, Guy Schalnat, nor by -Andreas Dilger, who had taken over from Guy during 1996 and 1997, and -distributed versions 0.89 through 0.96, but rather by another member -of the original PNG Group, Glenn Randers-Pehrson. Guy and Andreas are -still alive and well, but they have moved on to other things. - -The old libpng functions png_read_init(), png_write_init(), -png_info_init(), png_read_destroy(), and png_write_destroy() have been -moved to PNG_INTERNAL in version 0.95 to discourage their use. These -functions will be removed from libpng version 2.0.0. - -The preferred method of creating and initializing the libpng structures is -via the png_create_read_struct(), png_create_write_struct(), and -png_create_info_struct() because they isolate the size of the structures -from the application, allow version error checking, and also allow the -use of custom error handling routines during the initialization, which -the old functions do not. The functions png_read_destroy() and -png_write_destroy() do not actually free the memory that libpng -allocated for these structs, but just reset the data structures, so they -can be used instead of png_destroy_read_struct() and -png_destroy_write_struct() if you feel there is too much system overhead -allocating and freeing the png_struct for each image read. - -Setting the error callbacks via png_set_message_fn() before -png_read_init() as was suggested in libpng-0.88 is no longer supported -because this caused applications that do not use custom error functions -to fail if the png_ptr was not initialized to zero. It is still possible -to set the error callbacks AFTER png_read_init(), or to change them with -png_set_error_fn(), which is essentially the same function, but with a new -name to force compilation errors with applications that try to use the old -method. - -Starting with version 1.0.7, you can find out which version of the library -you are using at run-time: - - png_uint_32 libpng_vn = png_access_version_number(); - -The number libpng_vn is constructed from the major version, minor -version with leading zero, and release number with leading zero, -(e.g., libpng_vn for version 1.0.7 is 10007). - -You can also check which version of png.h you used when compiling your -application: - - png_uint_32 application_vn = PNG_LIBPNG_VER; - -.SH IX. Y2K Compliance in libpng - -October 3, 2002 - -Since the PNG Development group is an ad-hoc body, we can't make -an official declaration. - -This is your unofficial assurance that libpng from version 0.71 and -upward through 1.2.5 are Y2K compliant. It is my belief that earlier -versions were also Y2K compliant. - -Libpng only has three year fields. One is a 2-byte unsigned integer that -will hold years up to 65535. The other two hold the date in text -format, and will hold years up to 9999. - -The integer is - "png_uint_16 year" in png_time_struct. - -The strings are - "png_charp time_buffer" in png_struct and - "near_time_buffer", which is a local character string in png.c. - -There are seven time-related functions: - - png_convert_to_rfc_1123() in png.c - (formerly png_convert_to_rfc_1152() in error) - png_convert_from_struct_tm() in pngwrite.c, called - in pngwrite.c - png_convert_from_time_t() in pngwrite.c - png_get_tIME() in pngget.c - png_handle_tIME() in pngrutil.c, called in pngread.c - png_set_tIME() in pngset.c - png_write_tIME() in pngwutil.c, called in pngwrite.c - -All appear to handle dates properly in a Y2K environment. The -png_convert_from_time_t() function calls gmtime() to convert from system -clock time, which returns (year - 1900), which we properly convert to -the full 4-digit year. There is a possibility that applications using -libpng are not passing 4-digit years into the png_convert_to_rfc_1123() -function, or that they are incorrectly passing only a 2-digit year -instead of "year - 1900" into the png_convert_from_struct_tm() function, -but this is not under our control. The libpng documentation has always -stated that it works with 4-digit years, and the APIs have been -documented as such. - -The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned -integer to hold the year, and can hold years as large as 65535. - -zlib, upon which libpng depends, is also Y2K compliant. It contains -no date-related code. - - - Glenn Randers-Pehrson - libpng maintainer - PNG Development Group - -.SH NOTE - -Note about libpng version numbers: - -Due to various miscommunications, unforeseen code incompatibilities -and occasional factors outside the authors' control, version numbering -on the library has not always been consistent and straightforward. -The following table summarizes matters since version 0.89c, which was -the first widely used release: - - source png.h png.h shared-lib - version string int version - ------- ------ ----- ---------- - 0.89c ("beta 3") 0.89 89 1.0.89 - 0.90 ("beta 4") 0.90 90 0.90 - 0.95 ("beta 5") 0.95 95 0.95 - 0.96 ("beta 6") 0.96 96 0.96 - 0.97b ("beta 7") 1.00.97 97 1.0.1 - 0.97c 0.97 97 2.0.97 - 0.98 0.98 98 2.0.98 - 0.99 0.99 98 2.0.99 - 0.99a-m 0.99 99 2.0.99 - 1.00 1.00 100 2.1.0 - 1.0.0 1.0.0 100 2.1.0 - 1.0.0 (from here on, the 100 2.1.0 - 1.0.1 png.h string is 10001 2.1.0 - 1.0.1a-e identical to the 10002 from here on, the - 1.0.2 source version) 10002 shared library is 2.V - 1.0.2a-b 10003 where V is the source - 1.0.1 10001 code version except as - 1.0.1a-e 10002 2.1.0.1a-e noted. - 1.0.2 10002 2.1.0.2 - 1.0.2a-b 10003 2.1.0.2a-b - 1.0.3 10003 2.1.0.3 - 1.0.3a-d 10004 2.1.0.3a-d - 1.0.4 10004 2.1.0.4 - 1.0.4a-f 10005 2.1.0.4a-f - 1.0.5 (+ 2 patches) 10005 2.1.0.5 - 1.0.5a-d 10006 2.1.0.5a-d - 1.0.5e-r 10100 2.1.0.5e-r - 1.0.5s-v 10006 2.1.0.5s-v - 1.0.6 (+ 3 patches) 10006 2.1.0.6 - 1.0.6d-g 10007 2.1.0.6d-g - 1.0.6h 10007 10.6h - 1.0.6i 10007 10.6i - 1.0.6j 10007 2.1.0.6j - 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 - 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 - 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 - 1.0.7 1 10007 2.1.0.7 - 1.0.8beta1-4 1 10008 2.1.0.8beta1-4 - 1.0.8rc1 1 10008 2.1.0.8rc1 - 1.0.8 1 10008 2.1.0.8 - 1.0.9beta1-6 1 10009 2.1.0.9beta1-6 - 1.0.9rc1 1 10009 2.1.0.9rc1 - 1.0.9beta7-10 1 10009 2.1.0.9beta7-10 - 1.0.9rc2 1 10009 2.1.0.9rc2 - 1.0.9 1 10009 2.1.0.9 - 1.0.10beta1 1 10010 2.1.0.10beta1 - 1.0.10rc1 1 10010 2.1.0.10rc1 - 1.0.10 1 10010 2.1.0.10 - 1.0.11beta1-3 1 10011 2.1.0.11beta1-3 - 1.0.11rc1 1 10011 2.1.0.11rc1 - 1.0.11 1 10011 2.1.0.11 - 1.0.12beta1-2 2 10012 2.1.0.12beta1-2 - 1.0.12rc1 2 10012 2.1.0.12rc1 - 1.0.12 2 10012 2.1.0.12 - 1.1.0a-f - 10100 2.1.1.0a-f abandoned - 1.2.0beta1-2 2 10200 2.1.2.0beta1-2 - 1.2.0beta3-5 3 10200 3.1.2.0beta3-5 - 1.2.0rc1 3 10200 3.1.2.0rc1 - 1.2.0 3 10200 3.1.2.0 - 1.2.1beta-4 3 10201 3.1.2.1beta1-4 - 1.2.1rc1-2 3 10201 3.1.2.1rc1-2 - 1.2.1 3 10201 3.1.2.1 - 1.2.2beta1-6 12 10202 12.so.0.1.2.2beta1-6 - 1.0.13beta1 10 10013 10.so.0.1.0.13beta1 - 1.0.13rc1 10 10013 10.so.0.1.0.13rc1 - 1.2.2rc1 12 10202 12.so.0.1.2.2rc1 - 1.0.13 10 10013 10.so.0.1.0.13 - 1.2.2 12 10202 12.so.0.1.2.2 - 1.2.3rc1-6 12 10203 12.so.0.1.2.3rc1-6 - 1.2.3 12 10203 12.so.0.1.2.3 - 1.2.4beta1-3 13 10204 12.so.0.1.2.4beta1-3 - 1.2.4rc1 13 10204 12.so.0.1.2.4rc1 - 1.0.14 10 10014 10.so.0.1.0.14 - 1.2.4 13 10204 12.so.0.1.2.4 - 1.0.15rc1-3 10 10015 10.so.0.1.0.15rc1-3 - 1.2.5rc1-3 13 10205 12.so.0.1.2.5rc1-3 - 1.0.15 10 10015 10.so.0.1.0.15 - 1.2.5 13 10205 12.so.0.1.2.5 - -Henceforth the source version will match the shared-library minor -and patch numbers; the shared-library major version number will be -used for changes in backward compatibility, as it is intended. The -PNG_PNGLIB_VER macro, which is not used within libpng but is available -for applications, is an unsigned integer of the form xyyzz corresponding -to the source version x.y.z (leading zeros in y and z). Beta versions -were given the previous public release number plus a letter, until -version 1.0.6j; from then on they were given the upcoming public -release number plus "betaNN" or "rcN". - -.SH "SEE ALSO" -libpngpf(3), png(5) -.LP -.IR libpng : -.IP -ftp://ftp.uu.net/graphics/png -http://www.libpng.org/pub/png - -.LP -.IR zlib : -.IP -(generally) at the same location as -.I libpng -or at -.br -ftp://ftp.uu.net/pub/archiving/zip/zlib -.br -ftp://ftp.info-zip.org/pub/infozip/zlib - -.LP -.IR PNG specification: RFC 2083 -.IP -(generally) at the same location as -.I libpng -or at -.br -ftp://ds.internic.net/rfc/rfc2083.txt -.br -or (as a W3C Recommendation) at -.br -http://www.w3.org/TR/REC-png.html - -.LP -In the case of any inconsistency between the PNG specification -and this library, the specification takes precedence. - -.SH AUTHORS -This man page: Glenn Randers-Pehrson - - -The contributing authors would like to thank all those who helped -with testing, bug fixes, and patience. This wouldn't have been -possible without all of you. - -Thanks to Frank J. T. Wojcik for helping with the documentation. - -Libpng version 1.2.5 - October 3, 2002: -Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. -Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu). - -Supported by the PNG development group -.br -(png-implement@ccrc.wustl.edu). - -.SH COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: - -(This copy of the libpng notices is provided for your convenience. In case of -any discrepancy between this copy and the notices in the file png.h that is -included in the libpng distribution, the latter shall prevail.) - -If you modify libpng you may insert additional notices immediately following -this sentence. - -libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are -Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are -distributed according to the same disclaimer and license as libpng-1.0.6 -with the following individuals added to the list of Contributing Authors - - Simon-Pierre Cadieux - Eric S. Raymond - Gilles Vollant - -and with the following additions to the disclaimer: - - There is no warranty against interference with your - enjoyment of the library or against infringement. - There is no warranty that our efforts or the library - will fulfill any of your particular purposes or needs. - This library is provided with all faults, and the entire - risk of satisfactory quality, performance, accuracy, and - effort is with the user. - -libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are -Copyright (c) 1998, 1999 Glenn Randers-Pehrson -Distributed according to the same disclaimer and license as libpng-0.96, -with the following individuals added to the list of Contributing Authors: - - Tom Lane - Glenn Randers-Pehrson - Willem van Schaik - -libpng versions 0.89, June 1996, through 0.96, May 1997, are -Copyright (c) 1996, 1997 Andreas Dilger -Distributed according to the same disclaimer and license as libpng-0.88, -with the following individuals added to the list of Contributing Authors: - - John Bowler - Kevin Bracey - Sam Bushell - Magnus Holmgren - Greg Roelofs - Tom Tanner - -libpng versions 0.5, May 1995, through 0.88, January 1996, are -Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - -For the purposes of this copyright and license, "Contributing Authors" -is defined as the following set of individuals: - - Andreas Dilger - Dave Martindale - Guy Eric Schalnat - Paul Schmidt - Tim Wegner - -The PNG Reference Library is supplied "AS IS". The Contributing Authors -and Group 42, Inc. disclaim all warranties, expressed or implied, -including, without limitation, the warranties of merchantability and of -fitness for any purpose. The Contributing Authors and Group 42, Inc. -assume no liability for direct, indirect, incidental, special, exemplary, -or consequential damages, which may result from the use of the PNG -Reference Library, even if advised of the possibility of such damage. - -Permission is hereby granted to use, copy, modify, and distribute this -source code, or portions hereof, for any purpose, without fee, subject -to the following restrictions: - -1. The origin of this source code must not be misrepresented. - -2. Altered versions must be plainly marked as such and - must not be misrepresented as being the original source. - -3. This Copyright notice may not be removed or altered from - any source or altered source distribution. - -The Contributing Authors and Group 42, Inc. specifically permit, without -fee, and encourage the use of this source code as a component to -supporting the PNG file format in commercial products. If you use this -source code in a product, acknowledgment is not required but would be -appreciated. - - -A "png_get_copyright" function is available, for convenient use in "about" -boxes and the like: - - printf("%s",png_get_copyright(NULL)); - -Also, the PNG logo (in PNG format, of course) is supplied in the -files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). - -Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a -certification mark of the Open Source Initiative. - -Glenn Randers-Pehrson -randeg@alum.rpi.edu -October 3, 2002 - -.\" end of man page - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/libpng.pc b/gtkmm-osx/trunk/libpng-1.2.5/libpng.pc deleted file mode 100644 index 2407538..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/libpng.pc +++ /dev/null @@ -1,11 +0,0 @@ - -prefix=/Applications/SynfigStudio.app/Contents/synfig -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${exec_prefix}/include - -Name: libpng12 -Description: Loads and saves PNG files -Version: 1.2.5 -Libs: -L${libdir} -lpng12 -lz -Cflags: -I${includedir}/libpng12 diff --git a/gtkmm-osx/trunk/libpng-1.2.5/libpng.txt b/gtkmm-osx/trunk/libpng-1.2.5/libpng.txt deleted file mode 100644 index 689b564..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/libpng.txt +++ /dev/null @@ -1,2905 +0,0 @@ -libpng.txt - A description on how to use and modify libpng - - libpng version 1.2.5 - October 3, 2002 - Updated and distributed by Glenn Randers-Pehrson - - Copyright (c) 1998-2002 Glenn Randers-Pehrson - For conditions of distribution and use, see copyright - notice in png.h. - - based on: - - libpng 1.0 beta 6 version 0.96 May 28, 1997 - Updated and distributed by Andreas Dilger - Copyright (c) 1996, 1997 Andreas Dilger - - libpng 1.0 beta 2 - version 0.88 January 26, 1996 - For conditions of distribution and use, see copyright - notice in png.h. Copyright (c) 1995, 1996 Guy Eric - Schalnat, Group 42, Inc. - - Updated/rewritten per request in the libpng FAQ - Copyright (c) 1995, 1996 Frank J. T. Wojcik - December 18, 1995 & January 20, 1996 - -I. Introduction - -This file describes how to use and modify the PNG reference library -(known as libpng) for your own use. There are five sections to this -file: introduction, structures, reading, writing, and modification and -configuration notes for various special platforms. In addition to this -file, example.c is a good starting point for using the library, as -it is heavily commented and should include everything most people -will need. We assume that libpng is already installed; see the -INSTALL file for instructions on how to install libpng. - -Libpng was written as a companion to the PNG specification, as a way -of reducing the amount of time and effort it takes to support the PNG -file format in application programs. - -The PNG-1.2 specification is available at -and at . - -The PNG-1.0 specification is available -as RFC 2083 and as a -W3C Recommendation . Some -additional chunks are described in the special-purpose public chunks -documents at . - -Other information -about PNG, and the latest version of libpng, can be found at the PNG home -page, -and at . - -Most users will not have to modify the library significantly; advanced -users may want to modify it more. All attempts were made to make it as -complete as possible, while keeping the code easy to understand. -Currently, this library only supports C. Support for other languages -is being considered. - -Libpng has been designed to handle multiple sessions at one time, -to be easily modifiable, to be portable to the vast majority of -machines (ANSI, K&R, 16-, 32-, and 64-bit) available, and to be easy -to use. The ultimate goal of libpng is to promote the acceptance of -the PNG file format in whatever way possible. While there is still -work to be done (see the TODO file), libpng should cover the -majority of the needs of its users. - -Libpng uses zlib for its compression and decompression of PNG files. -Further information about zlib, and the latest version of zlib, can -be found at the zlib home page, . -The zlib compression utility is a general purpose utility that is -useful for more than PNG files, and can be used without libpng. -See the documentation delivered with zlib for more details. -You can usually find the source files for the zlib utility wherever you -find the libpng source files. - -Libpng is thread safe, provided the threads are using different -instances of the structures. Each thread should have its own -png_struct and png_info instances, and thus its own image. -Libpng does not protect itself against two threads using the -same instance of a structure. Note: thread safety may be defeated -by use of some of the MMX assembler code in pnggccrd.c, which is only -compiled when the user defines PNG_THREAD_UNSAFE_OK. - - -II. Structures - -There are two main structures that are important to libpng, png_struct -and png_info. The first, png_struct, is an internal structure that -will not, for the most part, be used by a user except as the first -variable passed to every libpng function call. - -The png_info structure is designed to provide information about the -PNG file. At one time, the fields of png_info were intended to be -directly accessible to the user. However, this tended to cause problems -with applications using dynamically loaded libraries, and as a result -a set of interface functions for png_info (the png_get_*() and png_set_*() -functions) was developed. The fields of png_info are still available for -older applications, but it is suggested that applications use the new -interfaces if at all possible. - -Applications that do make direct access to the members of png_struct (except -for png_ptr->jmpbuf) must be recompiled whenever the library is updated, -and applications that make direct access to the members of png_info must -be recompiled if they were compiled or loaded with libpng version 1.0.6, -in which the members were in a different order. In version 1.0.7, the -members of the png_info structure reverted to the old order, as they were -in versions 0.97c through 1.0.5. Starting with version 2.0.0, both -structures are going to be hidden, and the contents of the structures will -only be accessible through the png_get/png_set functions. - -The png.h header file is an invaluable reference for programming with libpng. -And while I'm on the topic, make sure you include the libpng header file: - -#include - -III. Reading - -We'll now walk you through the possible functions to call when reading -in a PNG file sequentially, briefly explaining the syntax and purpose -of each one. See example.c and png.h for more detail. While -progressive reading is covered in the next section, you will still -need some of the functions discussed in this section to read a PNG -file. - -Setup - -You will want to do the I/O initialization(*) before you get into libpng, -so if it doesn't work, you don't have much to undo. Of course, you -will also want to insure that you are, in fact, dealing with a PNG -file. Libpng provides a simple check to see if a file is a PNG file. -To use it, pass in the first 1 to 8 bytes of the file to the function -png_sig_cmp(), and it will return 0 if the bytes match the corresponding -bytes of the PNG signature, or nonzero otherwise. Of course, the more bytes -you pass in, the greater the accuracy of the prediction. - -If you are intending to keep the file pointer open for use in libpng, -you must ensure you don't read more than 8 bytes from the beginning -of the file, and you also have to make a call to png_set_sig_bytes_read() -with the number of bytes you read from the beginning. Libpng will -then only check the bytes (if any) that your program didn't read. - -(*): If you are not using the standard I/O functions, you will need -to replace them with custom functions. See the discussion under -Customizing libpng. - - - FILE *fp = fopen(file_name, "rb"); - if (!fp) - { - return (ERROR); - } - fread(header, 1, number, fp); - is_png = !png_sig_cmp(header, 0, number); - if (!is_png) - { - return (NOT_PNG); - } - - -Next, png_struct and png_info need to be allocated and initialized. In -order to ensure that the size of these structures is correct even with a -dynamically linked libpng, there are functions to initialize and -allocate the structures. We also pass the library version, optional -pointers to error handling functions, and a pointer to a data struct for -use by the error functions, if necessary (the pointer and functions can -be NULL if the default error handlers are to be used). See the section -on Changes to Libpng below regarding the old initialization functions. -The structure allocation functions quietly return NULL if they fail to -create the structure, so your application should check for that. - - png_structp png_ptr = png_create_read_struct - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn); - if (!png_ptr) - return (ERROR); - - png_infop info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) - { - png_destroy_read_struct(&png_ptr, - (png_infopp)NULL, (png_infopp)NULL); - return (ERROR); - } - - png_infop end_info = png_create_info_struct(png_ptr); - if (!end_info) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - return (ERROR); - } - -If you want to use your own memory allocation routines, -define PNG_USER_MEM_SUPPORTED and use -png_create_read_struct_2() instead of png_create_read_struct(): - - png_structp png_ptr = png_create_read_struct_2 - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn, (png_voidp) - user_mem_ptr, user_malloc_fn, user_free_fn); - -The error handling routines passed to png_create_read_struct() -and the memory alloc/free routines passed to png_create_struct_2() -are only necessary if you are not using the libpng supplied error -handling and memory alloc/free functions. - -When libpng encounters an error, it expects to longjmp back -to your routine. Therefore, you will need to call setjmp and pass -your png_jmpbuf(png_ptr). If you read the file from different -routines, you will need to update the jmpbuf field every time you enter -a new routine that will call a png_*() function. - -See your documentation of setjmp/longjmp for your compiler for more -information on setjmp/longjmp. See the discussion on libpng error -handling in the Customizing Libpng section below for more information -on the libpng error handling. If an error occurs, and libpng longjmp's -back to your setjmp, you will want to call png_destroy_read_struct() to -free any memory. - - if (setjmp(png_jmpbuf(png_ptr))) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - &end_info); - fclose(fp); - return (ERROR); - } - -If you would rather avoid the complexity of setjmp/longjmp issues, -you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case -errors will result in a call to PNG_ABORT() which defaults to abort(). - -Now you need to set up the input code. The default for libpng is to -use the C function fread(). If you use this, you will need to pass a -valid FILE * in the function png_init_io(). Be sure that the file is -opened in binary mode. If you wish to handle reading data in another -way, you need not call the png_init_io() function, but you must then -implement the libpng I/O methods discussed in the Customizing Libpng -section below. - - png_init_io(png_ptr, fp); - -If you had previously opened the file and read any of the signature from -the beginning in order to see if this was a PNG file, you need to let -libpng know that there are some bytes missing from the start of the file. - - png_set_sig_bytes(png_ptr, number); - -Setting up callback code - -You can set up a callback function to handle any unknown chunks in the -input stream. You must supply the function - - read_chunk_callback(png_ptr ptr, - png_unknown_chunkp chunk); - { - /* The unknown chunk structure contains your - chunk data: */ - png_byte name[5]; - png_byte *data; - png_size_t size; - /* Note that libpng has already taken care of - the CRC handling */ - - /* put your code here. Return one of the - following: */ - - return (-n); /* chunk had an error */ - return (0); /* did not recognize */ - return (n); /* success */ - } - -(You can give your function another name that you like instead of -"read_chunk_callback") - -To inform libpng about your function, use - - png_set_read_user_chunk_fn(png_ptr, user_chunk_ptr, - read_chunk_callback); - -This names not only the callback function, but also a user pointer that -you can retrieve with - - png_get_user_chunk_ptr(png_ptr); - -At this point, you can set up a callback function that will be -called after each row has been read, which you can use to control -a progress meter or the like. It's demonstrated in pngtest.c. -You must supply a function - - void read_row_callback(png_ptr ptr, png_uint_32 row, - int pass); - { - /* put your code here */ - } - -(You can give it another name that you like instead of "read_row_callback") - -To inform libpng about your function, use - - png_set_read_status_fn(png_ptr, read_row_callback); - -Unknown-chunk handling - -Now you get to set the way the library processes unknown chunks in the -input PNG stream. Both known and unknown chunks will be read. Normal -behavior is that known chunks will be parsed into information in -various info_ptr members; unknown chunks will be discarded. To change -this, you can call: - - png_set_keep_unknown_chunks(png_ptr, info_ptr, keep, - chunk_list, num_chunks); - keep - 0: do not keep - 1: keep only if safe-to-copy - 2: keep even if unsafe-to-copy - chunk_list - list of chunks affected (a byte string, - five bytes per chunk, NULL or '\0' if - num_chunks is 0) - num_chunks - number of chunks affected; if 0, all - unknown chunks are affected - -Unknown chunks declared in this way will be saved as raw data onto a -list of png_unknown_chunk structures. If a chunk that is normally -known to libpng is named in the list, it will be handled as unknown, -according to the "keep" directive. If a chunk is named in successive -instances of png_set_keep_unknown_chunks(), the final instance will -take precedence. - -The high-level read interface - -At this point there are two ways to proceed; through the high-level -read interface, or through a sequence of low-level read operations. -You can use the high-level interface if (a) you are willing to read -the entire image into memory, and (b) the input transformations -you want to do are limited to the following set: - - PNG_TRANSFORM_IDENTITY No transformation - PNG_TRANSFORM_STRIP_16 Strip 16-bit samples to - 8 bits - PNG_TRANSFORM_STRIP_ALPHA Discard the alpha channel - PNG_TRANSFORM_PACKING Expand 1, 2 and 4-bit - samples to bytes - PNG_TRANSFORM_PACKSWAP Change order of packed - pixels to LSB first - PNG_TRANSFORM_EXPAND Perform set_expand() - PNG_TRANSFORM_INVERT_MONO Invert monochrome images - PNG_TRANSFORM_SHIFT Normalize pixels to the - sBIT depth - PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA - to BGRA - PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA - to AG - PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity - to transparency - PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples - -(This excludes setting a background color, doing gamma transformation, -dithering, and setting filler.) If this is the case, simply do this: - - png_read_png(png_ptr, info_ptr, png_transforms, NULL) - -where png_transforms is an integer containing the logical OR of -some set of transformation flags. This call is equivalent to png_read_info(), -followed the set of transformations indicated by the transform mask, -then png_read_image(), and finally png_read_end(). - -(The final parameter of this call is not yet used. Someday it might point -to transformation parameters required by some future input transform.) - -After you have called png_read_png(), you can retrieve the image data -with - - row_pointers = png_get_rows(png_ptr, info_ptr); - -where row_pointers is an array of pointers to the pixel data for each row: - - png_bytep row_pointers[height]; - -If you know your image size and pixel size ahead of time, you can allocate -row_pointers prior to calling png_read_png() with - - row_pointers = png_malloc(png_ptr, - height*sizeof(png_bytep)); - for (int i=0; i) and -png_get_(png_ptr, info_ptr, ...) functions return non-zero if the -data has been read, or zero if it is missing. The parameters to the -png_get_ are set directly if they are simple data types, or a pointer -into the info_ptr is returned for any complex types. - - png_get_PLTE(png_ptr, info_ptr, &palette, - &num_palette); - palette - the palette for the file - (array of png_color) - num_palette - number of entries in the palette - - png_get_gAMA(png_ptr, info_ptr, &gamma); - gamma - the gamma the file is written - at (PNG_INFO_gAMA) - - png_get_sRGB(png_ptr, info_ptr, &srgb_intent); - srgb_intent - the rendering intent (PNG_INFO_sRGB) - The presence of the sRGB chunk - means that the pixel data is in the - sRGB color space. This chunk also - implies specific values of gAMA and - cHRM. - - png_get_iCCP(png_ptr, info_ptr, &name, - &compression_type, &profile, &proflen); - name - The profile name. - compression - The compression type; always - PNG_COMPRESSION_TYPE_BASE for PNG 1.0. - You may give NULL to this argument to - ignore it. - profile - International Color Consortium color - profile data. May contain NULs. - proflen - length of profile data in bytes. - - png_get_sBIT(png_ptr, info_ptr, &sig_bit); - sig_bit - the number of significant bits for - (PNG_INFO_sBIT) each of the gray, - red, green, and blue channels, - whichever are appropriate for the - given color type (png_color_16) - - png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, - &trans_values); - trans - array of transparent entries for - palette (PNG_INFO_tRNS) - trans_values - graylevel or color sample values of - the single transparent color for - non-paletted images (PNG_INFO_tRNS) - num_trans - number of transparent entries - (PNG_INFO_tRNS) - - png_get_hIST(png_ptr, info_ptr, &hist); - (PNG_INFO_hIST) - hist - histogram of palette (array of - png_uint_16) - - png_get_tIME(png_ptr, info_ptr, &mod_time); - mod_time - time image was last modified - (PNG_VALID_tIME) - - png_get_bKGD(png_ptr, info_ptr, &background); - background - background color (PNG_VALID_bKGD) - valid 16-bit red, green and blue - values, regardless of color_type - - num_comments = png_get_text(png_ptr, info_ptr, - &text_ptr, &num_text); - num_comments - number of comments - text_ptr - array of png_text holding image - comments - text_ptr[i].compression - type of compression used - on "text" PNG_TEXT_COMPRESSION_NONE - PNG_TEXT_COMPRESSION_zTXt - PNG_ITXT_COMPRESSION_NONE - PNG_ITXT_COMPRESSION_zTXt - text_ptr[i].key - keyword for comment. Must contain - 1-79 characters. - text_ptr[i].text - text comments for current - keyword. Can be empty. - text_ptr[i].text_length - length of text string, - after decompression, 0 for iTXt - text_ptr[i].itxt_length - length of itxt string, - after decompression, 0 for tEXt/zTXt - text_ptr[i].lang - language of comment (empty - string for unknown). - text_ptr[i].lang_key - keyword in UTF-8 - (empty string for unknown). - num_text - number of comments (same as - num_comments; you can put NULL here - to avoid the duplication) - Note while png_set_text() will accept text, language, - and translated keywords that can be NULL pointers, the - structure returned by png_get_text will always contain - regular zero-terminated C strings. They might be - empty strings but they will never be NULL pointers. - - num_spalettes = png_get_sPLT(png_ptr, info_ptr, - &palette_ptr); - palette_ptr - array of palette structures holding - contents of one or more sPLT chunks - read. - num_spalettes - number of sPLT chunks read. - - png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y, - &unit_type); - offset_x - positive offset from the left edge - of the screen - offset_y - positive offset from the top edge - of the screen - unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER - - png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y, - &unit_type); - res_x - pixels/unit physical resolution in - x direction - res_y - pixels/unit physical resolution in - x direction - unit_type - PNG_RESOLUTION_UNKNOWN, - PNG_RESOLUTION_METER - - png_get_sCAL(png_ptr, info_ptr, &unit, &width, - &height) - unit - physical scale units (an integer) - width - width of a pixel in physical scale units - height - height of a pixel in physical scale units - (width and height are doubles) - - png_get_sCAL_s(png_ptr, info_ptr, &unit, &width, - &height) - unit - physical scale units (an integer) - width - width of a pixel in physical scale units - height - height of a pixel in physical scale units - (width and height are strings like "2.54") - - num_unknown_chunks = png_get_unknown_chunks(png_ptr, - info_ptr, &unknowns) - unknowns - array of png_unknown_chunk - structures holding unknown chunks - unknowns[i].name - name of unknown chunk - unknowns[i].data - data of unknown chunk - unknowns[i].size - size of unknown chunk's data - unknowns[i].location - position of chunk in file - - The value of "i" corresponds to the order in which the - chunks were read from the PNG file or inserted with the - png_set_unknown_chunks() function. - -The data from the pHYs chunk can be retrieved in several convenient -forms: - - res_x = png_get_x_pixels_per_meter(png_ptr, - info_ptr) - res_y = png_get_y_pixels_per_meter(png_ptr, - info_ptr) - res_x_and_y = png_get_pixels_per_meter(png_ptr, - info_ptr) - res_x = png_get_x_pixels_per_inch(png_ptr, - info_ptr) - res_y = png_get_y_pixels_per_inch(png_ptr, - info_ptr) - res_x_and_y = png_get_pixels_per_inch(png_ptr, - info_ptr) - aspect_ratio = png_get_pixel_aspect_ratio(png_ptr, - info_ptr) - - (Each of these returns 0 [signifying "unknown"] if - the data is not present or if res_x is 0; - res_x_and_y is 0 if res_x != res_y) - -The data from the oFFs chunk can be retrieved in several convenient -forms: - - x_offset = png_get_x_offset_microns(png_ptr, info_ptr); - y_offset = png_get_y_offset_microns(png_ptr, info_ptr); - x_offset = png_get_x_offset_inches(png_ptr, info_ptr); - y_offset = png_get_y_offset_inches(png_ptr, info_ptr); - - (Each of these returns 0 [signifying "unknown" if both - x and y are 0] if the data is not present or if the - chunk is present but the unit is the pixel) - -For more information, see the png_info definition in png.h and the -PNG specification for chunk contents. Be careful with trusting -rowbytes, as some of the transformations could increase the space -needed to hold a row (expand, filler, gray_to_rgb, etc.). -See png_read_update_info(), below. - -A quick word about text_ptr and num_text. PNG stores comments in -keyword/text pairs, one pair per chunk, with no limit on the number -of text chunks, and a 2^31 byte limit on their size. While there are -suggested keywords, there is no requirement to restrict the use to these -strings. It is strongly suggested that keywords and text be sensible -to humans (that's the point), so don't use abbreviations. Non-printing -symbols are not allowed. See the PNG specification for more details. -There is also no requirement to have text after the keyword. - -Keywords should be limited to 79 Latin-1 characters without leading or -trailing spaces, but non-consecutive spaces are allowed within the -keyword. It is possible to have the same keyword any number of times. -The text_ptr is an array of png_text structures, each holding a -pointer to a language string, a pointer to a keyword and a pointer to -a text string. The text string, language code, and translated -keyword may be empty or NULL pointers. The keyword/text -pairs are put into the array in the order that they are received. -However, some or all of the text chunks may be after the image, so, to -make sure you have read all the text chunks, don't mess with these -until after you read the stuff after the image. This will be -mentioned again below in the discussion that goes with png_read_end(). - -Input transformations - -After you've read the header information, you can set up the library -to handle any special transformations of the image data. The various -ways to transform the data will be described in the order that they -should occur. This is important, as some of these change the color -type and/or bit depth of the data, and some others only work on -certain color types and bit depths. Even though each transformation -checks to see if it has data that it can do something with, you should -make sure to only enable a transformation if it will be valid for the -data. For example, don't swap red and blue on grayscale data. - -The colors used for the background and transparency values should be -supplied in the same format/depth as the current image data. They -are stored in the same format/depth as the image data in a bKGD or tRNS -chunk, so this is what libpng expects for this data. The colors are -transformed to keep in sync with the image data when an application -calls the png_read_update_info() routine (see below). - -Data will be decoded into the supplied row buffers packed into bytes -unless the library has been told to transform it into another format. -For example, 4 bit/pixel paletted or grayscale data will be returned -2 pixels/byte with the leftmost pixel in the high-order bits of the -byte, unless png_set_packing() is called. 8-bit RGB data will be stored -in RGB RGB RGB format unless png_set_filler() is called to insert filler -bytes, either before or after each RGB triplet. 16-bit RGB data will -be returned RRGGBB RRGGBB, with the most significant byte of the color -value first, unless png_set_strip_16() is called to transform it to -regular RGB RGB triplets, or png_set_filler() is called to insert -filler bytes, either before or after each RRGGBB triplet. Similarly, -8-bit or 16-bit grayscale data can be modified with png_set_filler() -or png_set_strip_16(). - -The following code transforms grayscale images of less than 8 to 8 bits, -changes paletted images to RGB, and adds a full alpha channel if there is -transparency information in a tRNS chunk. This is most useful on -grayscale images with bit depths of 2 or 4 or if there is a multiple-image -viewing application that wishes to treat all images in the same way. - - if (color_type == PNG_COLOR_TYPE_PALETTE) - png_set_palette_to_rgb(png_ptr); - - if (color_type == PNG_COLOR_TYPE_GRAY && - bit_depth < 8) png_set_gray_1_2_4_to_8(png_ptr); - - if (png_get_valid(png_ptr, info_ptr, - PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr); - -These three functions are actually aliases for png_set_expand(), added -in libpng version 1.0.4, with the function names expanded to improve code -readability. In some future version they may actually do different -things. - -PNG can have files with 16 bits per channel. If you only can handle -8 bits per channel, this will strip the pixels down to 8 bit. - - if (bit_depth == 16) - png_set_strip_16(png_ptr); - -If, for some reason, you don't need the alpha channel on an image, -and you want to remove it rather than combining it with the background -(but the image author certainly had in mind that you *would* combine -it with the background, so that's what you should probably do): - - if (color_type & PNG_COLOR_MASK_ALPHA) - png_set_strip_alpha(png_ptr); - -In PNG files, the alpha channel in an image -is the level of opacity. If you need the alpha channel in an image to -be the level of transparency instead of opacity, you can invert the -alpha channel (or the tRNS chunk data) after it's read, so that 0 is -fully opaque and 255 (in 8-bit or paletted images) or 65535 (in 16-bit -images) is fully transparent, with - - png_set_invert_alpha(png_ptr); - -PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as -they can, resulting in, for example, 8 pixels per byte for 1 bit -files. This code expands to 1 pixel per byte without changing the -values of the pixels: - - if (bit_depth < 8) - png_set_packing(png_ptr); - -PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels -stored in a PNG image have been "scaled" or "shifted" up to the next -higher possible bit depth (e.g. from 5 bits/sample in the range [0,31] to -8 bits/sample in the range [0, 255]). However, it is also possible to -convert the PNG pixel data back to the original bit depth of the image. -This call reduces the pixels back down to the original bit depth: - - png_color_8p sig_bit; - - if (png_get_sBIT(png_ptr, info_ptr, &sig_bit)) - png_set_shift(png_ptr, sig_bit); - -PNG files store 3-color pixels in red, green, blue order. This code -changes the storage of the pixels to blue, green, red: - - if (color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_RGB_ALPHA) - png_set_bgr(png_ptr); - -PNG files store RGB pixels packed into 3 or 6 bytes. This code expands them -into 4 or 8 bytes for windowing systems that need them in this format: - - if (color_type == PNG_COLOR_TYPE_RGB) - png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE); - -where "filler" is the 8 or 16-bit number to fill with, and the location is -either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether -you want the filler before the RGB or after. This transformation -does not affect images that already have full alpha channels. To add an -opaque alpha channel, use filler=0xff or 0xffff and PNG_FILLER_AFTER which -will generate RGBA pixels. - -If you are reading an image with an alpha channel, and you need the -data as ARGB instead of the normal PNG format RGBA: - - if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) - png_set_swap_alpha(png_ptr); - -For some uses, you may want a grayscale image to be represented as -RGB. This code will do that conversion: - - if (color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - png_set_gray_to_rgb(png_ptr); - -Conversely, you can convert an RGB or RGBA image to grayscale or grayscale -with alpha. - - if (color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_RGB_ALPHA) - png_set_rgb_to_gray_fixed(png_ptr, error_action, - int red_weight, int green_weight); - - error_action = 1: silently do the conversion - error_action = 2: issue a warning if the original - image has any pixel where - red != green or red != blue - error_action = 3: issue an error and abort the - conversion if the original - image has any pixel where - red != green or red != blue - - red_weight: weight of red component times 100000 - green_weight: weight of green component times 100000 - If either weight is negative, default - weights (21268, 71514) are used. - -If you have set error_action = 1 or 2, you can -later check whether the image really was gray, after processing -the image rows, with the png_get_rgb_to_gray_status(png_ptr) function. -It will return a png_byte that is zero if the image was gray or -1 if there were any non-gray pixels. bKGD and sBIT data -will be silently converted to grayscale, using the green channel -data, regardless of the error_action setting. - -With red_weight+green_weight<=100000, -the normalized graylevel is computed: - - int rw = red_weight * 65536; - int gw = green_weight * 65536; - int bw = 65536 - (rw + gw); - gray = (rw*red + gw*green + bw*blue)/65536; - -The default values approximate those recommended in the Charles -Poynton's Color FAQ, -Copyright (c) 1998-01-04 Charles Poynton poynton@inforamp.net - - Y = 0.212671 * R + 0.715160 * G + 0.072169 * B - -Libpng approximates this with - - Y = 0.21268 * R + 0.7151 * G + 0.07217 * B - -which can be expressed with integers as - - Y = (6969 * R + 23434 * G + 2365 * B)/32768 - -The calculation is done in a linear colorspace, if the image gamma -is known. - -If you have a grayscale and you are using png_set_expand_depth(), -png_set_expand(), or png_set_gray_to_rgb to change to truecolor or to -a higher bit-depth, you must either supply the background color as a gray -value at the original file bit-depth (need_expand = 1) or else supply the -background color as an RGB triplet at the final, expanded bit depth -(need_expand = 0). Similarly, if you are reading a paletted image, you -must either supply the background color as a palette index (need_expand = 1) -or as an RGB triplet that may or may not be in the palette (need_expand = 0). - - png_color_16 my_background; - png_color_16p image_background; - - if (png_get_bKGD(png_ptr, info_ptr, &image_background)) - png_set_background(png_ptr, image_background, - PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); - else - png_set_background(png_ptr, &my_background, - PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); - -The png_set_background() function tells libpng to composite images -with alpha or simple transparency against the supplied background -color. If the PNG file contains a bKGD chunk (PNG_INFO_bKGD valid), -you may use this color, or supply another color more suitable for -the current display (e.g., the background color from a web page). You -need to tell libpng whether the color is in the gamma space of the -display (PNG_BACKGROUND_GAMMA_SCREEN for colors you supply), the file -(PNG_BACKGROUND_GAMMA_FILE for colors from the bKGD chunk), or one -that is neither of these gammas (PNG_BACKGROUND_GAMMA_UNIQUE - I don't -know why anyone would use this, but it's here). - -To properly display PNG images on any kind of system, the application needs -to know what the display gamma is. Ideally, the user will know this, and -the application will allow them to set it. One method of allowing the user -to set the display gamma separately for each system is to check for a -SCREEN_GAMMA or DISPLAY_GAMMA environment variable, which will hopefully be -correctly set. - -Note that display_gamma is the overall gamma correction required to produce -pleasing results, which depends on the lighting conditions in the surrounding -environment. In a dim or brightly lit room, no compensation other than -the physical gamma exponent of the monitor is needed, while in a dark room -a slightly smaller exponent is better. - - double gamma, screen_gamma; - - if (/* We have a user-defined screen - gamma value */) - { - screen_gamma = user_defined_screen_gamma; - } - /* One way that applications can share the same - screen gamma value */ - else if ((gamma_str = getenv("SCREEN_GAMMA")) - != NULL) - { - screen_gamma = (double)atof(gamma_str); - } - /* If we don't have another value */ - else - { - screen_gamma = 2.2; /* A good guess for a - PC monitor in a bright office or a dim room */ - screen_gamma = 2.0; /* A good guess for a - PC monitor in a dark room */ - screen_gamma = 1.7 or 1.0; /* A good - guess for Mac systems */ - } - -The png_set_gamma() function handles gamma transformations of the data. -Pass both the file gamma and the current screen_gamma. If the file does -not have a gamma value, you can pass one anyway if you have an idea what -it is (usually 0.45455 is a good guess for GIF images on PCs). Note -that file gammas are inverted from screen gammas. See the discussions -on gamma in the PNG specification for an excellent description of what -gamma is, and why all applications should support it. It is strongly -recommended that PNG viewers support gamma correction. - - if (png_get_gAMA(png_ptr, info_ptr, &gamma)) - png_set_gamma(png_ptr, screen_gamma, gamma); - else - png_set_gamma(png_ptr, screen_gamma, 0.45455); - -If you need to reduce an RGB file to a paletted file, or if a paletted -file has more entries then will fit on your screen, png_set_dither() -will do that. Note that this is a simple match dither that merely -finds the closest color available. This should work fairly well with -optimized palettes, and fairly badly with linear color cubes. If you -pass a palette that is larger then maximum_colors, the file will -reduce the number of colors in the palette so it will fit into -maximum_colors. If there is a histogram, it will use it to make -more intelligent choices when reducing the palette. If there is no -histogram, it may not do as good a job. - - if (color_type & PNG_COLOR_MASK_COLOR) - { - if (png_get_valid(png_ptr, info_ptr, - PNG_INFO_PLTE)) - { - png_uint_16p histogram = NULL; - - png_get_hIST(png_ptr, info_ptr, - &histogram); - png_set_dither(png_ptr, palette, num_palette, - max_screen_colors, histogram, 1); - } - else - { - png_color std_color_cube[MAX_SCREEN_COLORS] = - { ... colors ... }; - - png_set_dither(png_ptr, std_color_cube, - MAX_SCREEN_COLORS, MAX_SCREEN_COLORS, - NULL,0); - } - } - -PNG files describe monochrome as black being zero and white being one. -The following code will reverse this (make black be one and white be -zero): - - if (bit_depth == 1 && color_type == PNG_COLOR_TYPE_GRAY) - png_set_invert_mono(png_ptr); - -This function can also be used to invert grayscale and gray-alpha images: - - if (color_type == PNG_COLOR_TYPE_GRAY || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - png_set_invert_mono(png_ptr); - -PNG files store 16 bit pixels in network byte order (big-endian, -ie. most significant bits first). This code changes the storage to the -other way (little-endian, i.e. least significant bits first, the -way PCs store them): - - if (bit_depth == 16) - png_set_swap(png_ptr); - -If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you -need to change the order the pixels are packed into bytes, you can use: - - if (bit_depth < 8) - png_set_packswap(png_ptr); - -Finally, you can write your own transformation function if none of -the existing ones meets your needs. This is done by setting a callback -with - - png_set_read_user_transform_fn(png_ptr, - read_transform_fn); - -You must supply the function - - void read_transform_fn(png_ptr ptr, row_info_ptr - row_info, png_bytep data) - -See pngtest.c for a working example. Your function will be called -after all of the other transformations have been processed. - -You can also set up a pointer to a user structure for use by your -callback function, and you can inform libpng that your transform -function will change the number of channels or bit depth with the -function - - png_set_user_transform_info(png_ptr, user_ptr, - user_depth, user_channels); - -The user's application, not libpng, is responsible for allocating and -freeing any memory required for the user structure. - -You can retrieve the pointer via the function -png_get_user_transform_ptr(). For example: - - voidp read_user_transform_ptr = - png_get_user_transform_ptr(png_ptr); - -The last thing to handle is interlacing; this is covered in detail below, -but you must call the function here if you want libpng to handle expansion -of the interlaced image. - - number_of_passes = png_set_interlace_handling(png_ptr); - -After setting the transformations, libpng can update your png_info -structure to reflect any transformations you've requested with this -call. This is most useful to update the info structure's rowbytes -field so you can use it to allocate your image memory. This function -will also update your palette with the correct screen_gamma and -background if these have been given with the calls above. - - png_read_update_info(png_ptr, info_ptr); - -After you call png_read_update_info(), you can allocate any -memory you need to hold the image. The row data is simply -raw byte data for all forms of images. As the actual allocation -varies among applications, no example will be given. If you -are allocating one large chunk, you will need to build an -array of pointers to each row, as it will be needed for some -of the functions below. - -Reading image data - -After you've allocated memory, you can read the image data. -The simplest way to do this is in one function call. If you are -allocating enough memory to hold the whole image, you can just -call png_read_image() and libpng will read in all the image data -and put it in the memory area supplied. You will need to pass in -an array of pointers to each row. - -This function automatically handles interlacing, so you don't need -to call png_set_interlace_handling() or call this function multiple -times, or any of that other stuff necessary with png_read_rows(). - - png_read_image(png_ptr, row_pointers); - -where row_pointers is: - - png_bytep row_pointers[height]; - -You can point to void or char or whatever you use for pixels. - -If you don't want to read in the whole image at once, you can -use png_read_rows() instead. If there is no interlacing (check -interlace_type == PNG_INTERLACE_NONE), this is simple: - - png_read_rows(png_ptr, row_pointers, NULL, - number_of_rows); - -where row_pointers is the same as in the png_read_image() call. - -If you are doing this just one row at a time, you can do this with -a single row_pointer instead of an array of row_pointers: - - png_bytep row_pointer = row; - png_read_row(png_ptr, row_pointer, NULL); - -If the file is interlaced (interlace_type != 0 in the IHDR chunk), things -get somewhat harder. The only current (PNG Specification version 1.2) -interlacing type for PNG is (interlace_type == PNG_INTERLACE_ADAM7) -is a somewhat complicated 2D interlace scheme, known as Adam7, that -breaks down an image into seven smaller images of varying size, based -on an 8x8 grid. - -libpng can fill out those images or it can give them to you "as is". -If you want them filled out, there are two ways to do that. The one -mentioned in the PNG specification is to expand each pixel to cover -those pixels that have not been read yet (the "rectangle" method). -This results in a blocky image for the first pass, which gradually -smooths out as more pixels are read. The other method is the "sparkle" -method, where pixels are drawn only in their final locations, with the -rest of the image remaining whatever colors they were initialized to -before the start of the read. The first method usually looks better, -but tends to be slower, as there are more pixels to put in the rows. - -If you don't want libpng to handle the interlacing details, just call -png_read_rows() seven times to read in all seven images. Each of the -images is a valid image by itself, or they can all be combined on an -8x8 grid to form a single image (although if you intend to combine them -you would be far better off using the libpng interlace handling). - -The first pass will return an image 1/8 as wide as the entire image -(every 8th column starting in column 0) and 1/8 as high as the original -(every 8th row starting in row 0), the second will be 1/8 as wide -(starting in column 4) and 1/8 as high (also starting in row 0). The -third pass will be 1/4 as wide (every 4th pixel starting in column 0) and -1/8 as high (every 8th row starting in row 4), and the fourth pass will -be 1/4 as wide and 1/4 as high (every 4th column starting in column 2, -and every 4th row starting in row 0). The fifth pass will return an -image 1/2 as wide, and 1/4 as high (starting at column 0 and row 2), -while the sixth pass will be 1/2 as wide and 1/2 as high as the original -(starting in column 1 and row 0). The seventh and final pass will be as -wide as the original, and 1/2 as high, containing all of the odd -numbered scanlines. Phew! - -If you want libpng to expand the images, call this before calling -png_start_read_image() or png_read_update_info(): - - if (interlace_type == PNG_INTERLACE_ADAM7) - number_of_passes - = png_set_interlace_handling(png_ptr); - -This will return the number of passes needed. Currently, this -is seven, but may change if another interlace type is added. -This function can be called even if the file is not interlaced, -where it will return one pass. - -If you are not going to display the image after each pass, but are -going to wait until the entire image is read in, use the sparkle -effect. This effect is faster and the end result of either method -is exactly the same. If you are planning on displaying the image -after each pass, the "rectangle" effect is generally considered the -better looking one. - -If you only want the "sparkle" effect, just call png_read_rows() as -normal, with the third parameter NULL. Make sure you make pass over -the image number_of_passes times, and you don't change the data in the -rows between calls. You can change the locations of the data, just -not the data. Each pass only writes the pixels appropriate for that -pass, and assumes the data from previous passes is still valid. - - png_read_rows(png_ptr, row_pointers, NULL, - number_of_rows); - -If you only want the first effect (the rectangles), do the same as -before except pass the row buffer in the third parameter, and leave -the second parameter NULL. - - png_read_rows(png_ptr, NULL, row_pointers, - number_of_rows); - -Finishing a sequential read - -After you are finished reading the image through either the high- or -low-level interfaces, you can finish reading the file. If you are -interested in comments or time, which may be stored either before or -after the image data, you should pass the separate png_info struct if -you want to keep the comments from before and after the image -separate. If you are not interested, you can pass NULL. - - png_read_end(png_ptr, end_info); - -When you are done, you can free all memory allocated by libpng like this: - - png_destroy_read_struct(&png_ptr, &info_ptr, - &end_info); - -It is also possible to individually free the info_ptr members that -point to libpng-allocated storage with the following function: - - png_free_data(png_ptr, info_ptr, mask, seq) - mask - identifies data to be freed, a mask - containing the logical OR of one or - more of - PNG_FREE_PLTE, PNG_FREE_TRNS, - PNG_FREE_HIST, PNG_FREE_ICCP, - PNG_FREE_PCAL, PNG_FREE_ROWS, - PNG_FREE_SCAL, PNG_FREE_SPLT, - PNG_FREE_TEXT, PNG_FREE_UNKN, - or simply PNG_FREE_ALL - seq - sequence number of item to be freed - (-1 for all items) - -This function may be safely called when the relevant storage has -already been freed, or has not yet been allocated, or was allocated -by the user and not by libpng, and will in those -cases do nothing. The "seq" parameter is ignored if only one item -of the selected data type, such as PLTE, is allowed. If "seq" is not --1, and multiple items are allowed for the data type identified in -the mask, such as text or sPLT, only the n'th item in the structure -is freed, where n is "seq". - -The default behavior is only to free data that was allocated internally -by libpng. This can be changed, so that libpng will not free the data, -or so that it will free data that was allocated by the user with png_malloc() -or png_zalloc() and passed in via a png_set_*() function, with - - png_data_freer(png_ptr, info_ptr, freer, mask) - mask - which data elements are affected - same choices as in png_free_data() - freer - one of - PNG_DESTROY_WILL_FREE_DATA - PNG_SET_WILL_FREE_DATA - PNG_USER_WILL_FREE_DATA - -This function only affects data that has already been allocated. -You can call this function after reading the PNG data but before calling -any png_set_*() functions, to control whether the user or the png_set_*() -function is responsible for freeing any existing data that might be present, -and again after the png_set_*() functions to control whether the user -or png_destroy_*() is supposed to free the data. When the user assumes -responsibility for libpng-allocated data, the application must use -png_free() to free it, and when the user transfers responsibility to libpng -for data that the user has allocated, the user must have used png_malloc() -or png_zalloc() to allocate it. - -If you allocated your row_pointers in a single block, as suggested above in -the description of the high level read interface, you must not transfer -responsibility for freeing it to the png_set_rows or png_read_destroy function, -because they would also try to free the individual row_pointers[i]. - -If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword -separately, do not transfer responsibility for freeing text_ptr to libpng, -because when libpng fills a png_text structure it combines these members with -the key member, and png_free_data() will free only text_ptr.key. Similarly, -if you transfer responsibility for free'ing text_ptr from libpng to your -application, your application must not separately free those members. - -The png_free_data() function will turn off the "valid" flag for anything -it frees. If you need to turn the flag off for a chunk that was freed by your -application instead of by libpng, you can use - - png_set_invalid(png_ptr, info_ptr, mask); - mask - identifies the chunks to be made invalid, - containing the logical OR of one or - more of - PNG_INFO_gAMA, PNG_INFO_sBIT, - PNG_INFO_cHRM, PNG_INFO_PLTE, - PNG_INFO_tRNS, PNG_INFO_bKGD, - PNG_INFO_hIST, PNG_INFO_pHYs, - PNG_INFO_oFFs, PNG_INFO_tIME, - PNG_INFO_pCAL, PNG_INFO_sRGB, - PNG_INFO_iCCP, PNG_INFO_sPLT, - PNG_INFO_sCAL, PNG_INFO_IDAT - -For a more compact example of reading a PNG image, see the file example.c. - -Reading PNG files progressively - -The progressive reader is slightly different then the non-progressive -reader. Instead of calling png_read_info(), png_read_rows(), and -png_read_end(), you make one call to png_process_data(), which calls -callbacks when it has the info, a row, or the end of the image. You -set up these callbacks with png_set_progressive_read_fn(). You don't -have to worry about the input/output functions of libpng, as you are -giving the library the data directly in png_process_data(). I will -assume that you have read the section on reading PNG files above, -so I will only highlight the differences (although I will show -all of the code). - -png_structp png_ptr; -png_infop info_ptr; - - /* An example code fragment of how you would - initialize the progressive reader in your - application. */ - int - initialize_png_reader() - { - png_ptr = png_create_read_struct - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn); - if (!png_ptr) - return (ERROR); - info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) - { - png_destroy_read_struct(&png_ptr, (png_infopp)NULL, - (png_infopp)NULL); - return (ERROR); - } - - if (setjmp(png_jmpbuf(png_ptr))) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - return (ERROR); - } - - /* This one's new. You can provide functions - to be called when the header info is valid, - when each row is completed, and when the image - is finished. If you aren't using all functions, - you can specify NULL parameters. Even when all - three functions are NULL, you need to call - png_set_progressive_read_fn(). You can use - any struct as the user_ptr (cast to a void pointer - for the function call), and retrieve the pointer - from inside the callbacks using the function - - png_get_progressive_ptr(png_ptr); - - which will return a void pointer, which you have - to cast appropriately. - */ - png_set_progressive_read_fn(png_ptr, (void *)user_ptr, - info_callback, row_callback, end_callback); - - return 0; - } - - /* A code fragment that you call as you receive blocks - of data */ - int - process_data(png_bytep buffer, png_uint_32 length) - { - if (setjmp(png_jmpbuf(png_ptr))) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - return (ERROR); - } - - /* This one's new also. Simply give it a chunk - of data from the file stream (in order, of - course). On machines with segmented memory - models machines, don't give it any more than - 64K. The library seems to run fine with sizes - of 4K. Although you can give it much less if - necessary (I assume you can give it chunks of - 1 byte, I haven't tried less then 256 bytes - yet). When this function returns, you may - want to display any rows that were generated - in the row callback if you don't already do - so there. - */ - png_process_data(png_ptr, info_ptr, buffer, length); - return 0; - } - - /* This function is called (as set by - png_set_progressive_read_fn() above) when enough data - has been supplied so all of the header has been - read. - */ - void - info_callback(png_structp png_ptr, png_infop info) - { - /* Do any setup here, including setting any of - the transformations mentioned in the Reading - PNG files section. For now, you _must_ call - either png_start_read_image() or - png_read_update_info() after all the - transformations are set (even if you don't set - any). You may start getting rows before - png_process_data() returns, so this is your - last chance to prepare for that. - */ - } - - /* This function is called when each row of image - data is complete */ - void - row_callback(png_structp png_ptr, png_bytep new_row, - png_uint_32 row_num, int pass) - { - /* If the image is interlaced, and you turned - on the interlace handler, this function will - be called for every row in every pass. Some - of these rows will not be changed from the - previous pass. When the row is not changed, - the new_row variable will be NULL. The rows - and passes are called in order, so you don't - really need the row_num and pass, but I'm - supplying them because it may make your life - easier. - - For the non-NULL rows of interlaced images, - you must call png_progressive_combine_row() - passing in the row and the old row. You can - call this function for NULL rows (it will just - return) and for non-interlaced images (it just - does the memcpy for you) if it will make the - code easier. Thus, you can just do this for - all cases: - */ - - png_progressive_combine_row(png_ptr, old_row, - new_row); - - /* where old_row is what was displayed for - previously for the row. Note that the first - pass (pass == 0, really) will completely cover - the old row, so the rows do not have to be - initialized. After the first pass (and only - for interlaced images), you will have to pass - the current row, and the function will combine - the old row and the new row. - */ - } - - void - end_callback(png_structp png_ptr, png_infop info) - { - /* This function is called after the whole image - has been read, including any chunks after the - image (up to and including the IEND). You - will usually have the same info chunk as you - had in the header, although some data may have - been added to the comments and time fields. - - Most people won't do much here, perhaps setting - a flag that marks the image as finished. - */ - } - - - -IV. Writing - -Much of this is very similar to reading. However, everything of -importance is repeated here, so you won't have to constantly look -back up in the reading section to understand writing. - -Setup - -You will want to do the I/O initialization before you get into libpng, -so if it doesn't work, you don't have anything to undo. If you are not -using the standard I/O functions, you will need to replace them with -custom writing functions. See the discussion under Customizing libpng. - - FILE *fp = fopen(file_name, "wb"); - if (!fp) - { - return (ERROR); - } - -Next, png_struct and png_info need to be allocated and initialized. -As these can be both relatively large, you may not want to store these -on the stack, unless you have stack space to spare. Of course, you -will want to check if they return NULL. If you are also reading, -you won't want to name your read structure and your write structure -both "png_ptr"; you can call them anything you like, such as -"read_ptr" and "write_ptr". Look at pngtest.c, for example. - - png_structp png_ptr = png_create_write_struct - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn); - if (!png_ptr) - return (ERROR); - - png_infop info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) - { - png_destroy_write_struct(&png_ptr, - (png_infopp)NULL); - return (ERROR); - } - -If you want to use your own memory allocation routines, -define PNG_USER_MEM_SUPPORTED and use -png_create_write_struct_2() instead of png_create_write_struct(): - - png_structp png_ptr = png_create_write_struct_2 - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, - user_error_fn, user_warning_fn, (png_voidp) - user_mem_ptr, user_malloc_fn, user_free_fn); - -After you have these structures, you will need to set up the -error handling. When libpng encounters an error, it expects to -longjmp() back to your routine. Therefore, you will need to call -setjmp() and pass the png_jmpbuf(png_ptr). If you -write the file from different routines, you will need to update -the png_jmpbuf(png_ptr) every time you enter a new routine that will -call a png_*() function. See your documentation of setjmp/longjmp -for your compiler for more information on setjmp/longjmp. See -the discussion on libpng error handling in the Customizing Libpng -section below for more information on the libpng error handling. - - if (setjmp(png_jmpbuf(png_ptr))) - { - png_destroy_write_struct(&png_ptr, &info_ptr); - fclose(fp); - return (ERROR); - } - ... - return; - -If you would rather avoid the complexity of setjmp/longjmp issues, -you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case -errors will result in a call to PNG_ABORT() which defaults to abort(). - -Now you need to set up the output code. The default for libpng is to -use the C function fwrite(). If you use this, you will need to pass a -valid FILE * in the function png_init_io(). Be sure that the file is -opened in binary mode. Again, if you wish to handle writing data in -another way, see the discussion on libpng I/O handling in the Customizing -Libpng section below. - - png_init_io(png_ptr, fp); - -Write callbacks - -At this point, you can set up a callback function that will be -called after each row has been written, which you can use to control -a progress meter or the like. It's demonstrated in pngtest.c. -You must supply a function - - void write_row_callback(png_ptr, png_uint_32 row, - int pass); - { - /* put your code here */ - } - -(You can give it another name that you like instead of "write_row_callback") - -To inform libpng about your function, use - - png_set_write_status_fn(png_ptr, write_row_callback); - -You now have the option of modifying how the compression library will -run. The following functions are mainly for testing, but may be useful -in some cases, like if you need to write PNG files extremely fast and -are willing to give up some compression, or if you want to get the -maximum possible compression at the expense of slower writing. If you -have no special needs in this area, let the library do what it wants by -not calling this function at all, as it has been tuned to deliver a good -speed/compression ratio. The second parameter to png_set_filter() is -the filter method, for which the only valid values are 0 (as of the -July 1999 PNG specification, version 1.2) or 64 (if you are writing -a PNG datastream that is to be embedded in a MNG datastream). The third -parameter is a flag that indicates which filter type(s) are to be tested -for each scanline. See the PNG specification for details on the specific filter -types. - - - /* turn on or off filtering, and/or choose - specific filters. You can use either a single - PNG_FILTER_VALUE_NAME or the logical OR of one - or more PNG_FILTER_NAME masks. */ - png_set_filter(png_ptr, 0, - PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE | - PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB | - PNG_FILTER_UP | PNG_FILTER_VALUE_UP | - PNG_FILTER_AVE | PNG_FILTER_VALUE_AVE | - PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH| - PNG_ALL_FILTERS); - -If an application -wants to start and stop using particular filters during compression, -it should start out with all of the filters (to ensure that the previous -row of pixels will be stored in case it's needed later), and then add -and remove them after the start of compression. - -If you are writing a PNG datastream that is to be embedded in a MNG -datastream, the second parameter can be either 0 or 64. - -The png_set_compression_*() functions interface to the zlib compression -library, and should mostly be ignored unless you really know what you are -doing. The only generally useful call is png_set_compression_level() -which changes how much time zlib spends on trying to compress the image -data. See the Compression Library (zlib.h and algorithm.txt, distributed -with zlib) for details on the compression levels. - - /* set the zlib compression level */ - png_set_compression_level(png_ptr, - Z_BEST_COMPRESSION); - - /* set other zlib parameters */ - png_set_compression_mem_level(png_ptr, 8); - png_set_compression_strategy(png_ptr, - Z_DEFAULT_STRATEGY); - png_set_compression_window_bits(png_ptr, 15); - png_set_compression_method(png_ptr, 8); - png_set_compression_buffer_size(png_ptr, 8192) - -extern PNG_EXPORT(void,png_set_zbuf_size) - -Setting the contents of info for output - -You now need to fill in the png_info structure with all the data you -wish to write before the actual image. Note that the only thing you -are allowed to write after the image is the text chunks and the time -chunk (as of PNG Specification 1.2, anyway). See png_write_end() and -the latest PNG specification for more information on that. If you -wish to write them before the image, fill them in now, and flag that -data as being valid. If you want to wait until after the data, don't -fill them until png_write_end(). For all the fields in png_info and -their data types, see png.h. For explanations of what the fields -contain, see the PNG specification. - -Some of the more important parts of the png_info are: - - png_set_IHDR(png_ptr, info_ptr, width, height, - bit_depth, color_type, interlace_type, - compression_type, filter_method) - width - holds the width of the image - in pixels (up to 2^31). - height - holds the height of the image - in pixels (up to 2^31). - bit_depth - holds the bit depth of one of the - image channels. - (valid values are 1, 2, 4, 8, 16 - and depend also on the - color_type. See also significant - bits (sBIT) below). - color_type - describes which color/alpha - channels are present. - PNG_COLOR_TYPE_GRAY - (bit depths 1, 2, 4, 8, 16) - PNG_COLOR_TYPE_GRAY_ALPHA - (bit depths 8, 16) - PNG_COLOR_TYPE_PALETTE - (bit depths 1, 2, 4, 8) - PNG_COLOR_TYPE_RGB - (bit_depths 8, 16) - PNG_COLOR_TYPE_RGB_ALPHA - (bit_depths 8, 16) - - PNG_COLOR_MASK_PALETTE - PNG_COLOR_MASK_COLOR - PNG_COLOR_MASK_ALPHA - - interlace_type - PNG_INTERLACE_NONE or - PNG_INTERLACE_ADAM7 - compression_type - (must be - PNG_COMPRESSION_TYPE_DEFAULT) - filter_method - (must be PNG_FILTER_TYPE_DEFAULT - or, if you are writing a PNG to - be embedded in a MNG datastream, - can also be - PNG_INTRAPIXEL_DIFFERENCING) - - png_set_PLTE(png_ptr, info_ptr, palette, - num_palette); - palette - the palette for the file - (array of png_color) - num_palette - number of entries in the palette - - png_set_gAMA(png_ptr, info_ptr, gamma); - gamma - the gamma the image was created - at (PNG_INFO_gAMA) - - png_set_sRGB(png_ptr, info_ptr, srgb_intent); - srgb_intent - the rendering intent - (PNG_INFO_sRGB) The presence of - the sRGB chunk means that the pixel - data is in the sRGB color space. - This chunk also implies specific - values of gAMA and cHRM. Rendering - intent is the CSS-1 property that - has been defined by the International - Color Consortium - (http://www.color.org). - It can be one of - PNG_sRGB_INTENT_SATURATION, - PNG_sRGB_INTENT_PERCEPTUAL, - PNG_sRGB_INTENT_ABSOLUTE, or - PNG_sRGB_INTENT_RELATIVE. - - - png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, - srgb_intent); - srgb_intent - the rendering intent - (PNG_INFO_sRGB) The presence of the - sRGB chunk means that the pixel - data is in the sRGB color space. - This function also causes gAMA and - cHRM chunks with the specific values - that are consistent with sRGB to be - written. - - png_set_iCCP(png_ptr, info_ptr, name, compression_type, - profile, proflen); - name - The profile name. - compression - The compression type; always - PNG_COMPRESSION_TYPE_BASE for PNG 1.0. - You may give NULL to this argument to - ignore it. - profile - International Color Consortium color - profile data. May contain NULs. - proflen - length of profile data in bytes. - - png_set_sBIT(png_ptr, info_ptr, sig_bit); - sig_bit - the number of significant bits for - (PNG_INFO_sBIT) each of the gray, red, - green, and blue channels, whichever are - appropriate for the given color type - (png_color_16) - - png_set_tRNS(png_ptr, info_ptr, trans, num_trans, - trans_values); - trans - array of transparent entries for - palette (PNG_INFO_tRNS) - trans_values - graylevel or color sample values of - the single transparent color for - non-paletted images (PNG_INFO_tRNS) - num_trans - number of transparent entries - (PNG_INFO_tRNS) - - png_set_hIST(png_ptr, info_ptr, hist); - (PNG_INFO_hIST) - hist - histogram of palette (array of - png_uint_16) - - png_set_tIME(png_ptr, info_ptr, mod_time); - mod_time - time image was last modified - (PNG_VALID_tIME) - - png_set_bKGD(png_ptr, info_ptr, background); - background - background color (PNG_VALID_bKGD) - - png_set_text(png_ptr, info_ptr, text_ptr, num_text); - text_ptr - array of png_text holding image - comments - text_ptr[i].compression - type of compression used - on "text" PNG_TEXT_COMPRESSION_NONE - PNG_TEXT_COMPRESSION_zTXt - PNG_ITXT_COMPRESSION_NONE - PNG_ITXT_COMPRESSION_zTXt - text_ptr[i].key - keyword for comment. Must contain - 1-79 characters. - text_ptr[i].text - text comments for current - keyword. Can be NULL or empty. - text_ptr[i].text_length - length of text string, - after decompression, 0 for iTXt - text_ptr[i].itxt_length - length of itxt string, - after decompression, 0 for tEXt/zTXt - text_ptr[i].lang - language of comment (NULL or - empty for unknown). - text_ptr[i].translated_keyword - keyword in UTF-8 (NULL - or empty for unknown). - num_text - number of comments - - png_set_sPLT(png_ptr, info_ptr, &palette_ptr, - num_spalettes); - palette_ptr - array of png_sPLT_struct structures - to be added to the list of palettes - in the info structure. - num_spalettes - number of palette structures to be - added. - - png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y, - unit_type); - offset_x - positive offset from the left - edge of the screen - offset_y - positive offset from the top - edge of the screen - unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER - - png_set_pHYs(png_ptr, info_ptr, res_x, res_y, - unit_type); - res_x - pixels/unit physical resolution - in x direction - res_y - pixels/unit physical resolution - in y direction - unit_type - PNG_RESOLUTION_UNKNOWN, - PNG_RESOLUTION_METER - - png_set_sCAL(png_ptr, info_ptr, unit, width, height) - unit - physical scale units (an integer) - width - width of a pixel in physical scale units - height - height of a pixel in physical scale units - (width and height are doubles) - - png_set_sCAL_s(png_ptr, info_ptr, unit, width, height) - unit - physical scale units (an integer) - width - width of a pixel in physical scale units - height - height of a pixel in physical scale units - (width and height are strings like "2.54") - - png_set_unknown_chunks(png_ptr, info_ptr, &unknowns, - num_unknowns) - unknowns - array of png_unknown_chunk - structures holding unknown chunks - unknowns[i].name - name of unknown chunk - unknowns[i].data - data of unknown chunk - unknowns[i].size - size of unknown chunk's data - unknowns[i].location - position to write chunk in file - 0: do not write chunk - PNG_HAVE_IHDR: before PLTE - PNG_HAVE_PLTE: before IDAT - PNG_AFTER_IDAT: after IDAT - -The "location" member is set automatically according to -what part of the output file has already been written. -You can change its value after calling png_set_unknown_chunks() -as demonstrated in pngtest.c. Within each of the "locations", -the chunks are sequenced according to their position in the -structure (that is, the value of "i", which is the order in which -the chunk was either read from the input file or defined with -png_set_unknown_chunks). - -A quick word about text and num_text. text is an array of png_text -structures. num_text is the number of valid structures in the array. -Each png_text structure holds a language code, a keyword, a text value, -and a compression type. - -The compression types have the same valid numbers as the compression -types of the image data. Currently, the only valid number is zero. -However, you can store text either compressed or uncompressed, unlike -images, which always have to be compressed. So if you don't want the -text compressed, set the compression type to PNG_TEXT_COMPRESSION_NONE. -Because tEXt and zTXt chunks don't have a language field, if you -specify PNG_TEXT_COMPRESSION_NONE or PNG_TEXT_COMPRESSION_zTXt -any language code or translated keyword will not be written out. - -Until text gets around 1000 bytes, it is not worth compressing it. -After the text has been written out to the file, the compression type -is set to PNG_TEXT_COMPRESSION_NONE_WR or PNG_TEXT_COMPRESSION_zTXt_WR, -so that it isn't written out again at the end (in case you are calling -png_write_end() with the same struct. - -The keywords that are given in the PNG Specification are: - - Title Short (one line) title or - caption for image - Author Name of image's creator - Description Description of image (possibly long) - Copyright Copyright notice - Creation Time Time of original image creation - (usually RFC 1123 format, see below) - Software Software used to create the image - Disclaimer Legal disclaimer - Warning Warning of nature of content - Source Device used to create the image - Comment Miscellaneous comment; conversion - from other image format - -The keyword-text pairs work like this. Keywords should be short -simple descriptions of what the comment is about. Some typical -keywords are found in the PNG specification, as is some recommendations -on keywords. You can repeat keywords in a file. You can even write -some text before the image and some after. For example, you may want -to put a description of the image before the image, but leave the -disclaimer until after, so viewers working over modem connections -don't have to wait for the disclaimer to go over the modem before -they start seeing the image. Finally, keywords should be full -words, not abbreviations. Keywords and text are in the ISO 8859-1 -(Latin-1) character set (a superset of regular ASCII) and can not -contain NUL characters, and should not contain control or other -unprintable characters. To make the comments widely readable, stick -with basic ASCII, and avoid machine specific character set extensions -like the IBM-PC character set. The keyword must be present, but -you can leave off the text string on non-compressed pairs. -Compressed pairs must have a text string, as only the text string -is compressed anyway, so the compression would be meaningless. - -PNG supports modification time via the png_time structure. Two -conversion routines are provided, png_convert_from_time_t() for -time_t and png_convert_from_struct_tm() for struct tm. The -time_t routine uses gmtime(). You don't have to use either of -these, but if you wish to fill in the png_time structure directly, -you should provide the time in universal time (GMT) if possible -instead of your local time. Note that the year number is the full -year (e.g. 1998, rather than 98 - PNG is year 2000 compliant!), and -that months start with 1. - -If you want to store the time of the original image creation, you should -use a plain tEXt chunk with the "Creation Time" keyword. This is -necessary because the "creation time" of a PNG image is somewhat vague, -depending on whether you mean the PNG file, the time the image was -created in a non-PNG format, a still photo from which the image was -scanned, or possibly the subject matter itself. In order to facilitate -machine-readable dates, it is recommended that the "Creation Time" -tEXt chunk use RFC 1123 format dates (e.g. "22 May 1997 18:07:10 GMT"), -although this isn't a requirement. Unlike the tIME chunk, the -"Creation Time" tEXt chunk is not expected to be automatically changed -by the software. To facilitate the use of RFC 1123 dates, a function -png_convert_to_rfc1123(png_timep) is provided to convert from PNG -time to an RFC 1123 format string. - -Writing unknown chunks - -You can use the png_set_unknown_chunks function to queue up chunks -for writing. You give it a chunk name, raw data, and a size; that's -all there is to it. The chunks will be written by the next following -png_write_info_before_PLTE, png_write_info, or png_write_end function. -Any chunks previously read into the info structure's unknown-chunk -list will also be written out in a sequence that satisfies the PNG -specification's ordering rules. - -The high-level write interface - -At this point there are two ways to proceed; through the high-level -write interface, or through a sequence of low-level write operations. -You can use the high-level interface if your image data is present -in the info structure. All defined output -transformations are permitted, enabled by the following masks. - - PNG_TRANSFORM_IDENTITY No transformation - PNG_TRANSFORM_PACKING Pack 1, 2 and 4-bit samples - PNG_TRANSFORM_PACKSWAP Change order of packed - pixels to LSB first - PNG_TRANSFORM_INVERT_MONO Invert monochrome images - PNG_TRANSFORM_SHIFT Normalize pixels to the - sBIT depth - PNG_TRANSFORM_BGR Flip RGB to BGR, RGBA - to BGRA - PNG_TRANSFORM_SWAP_ALPHA Flip RGBA to ARGB or GA - to AG - PNG_TRANSFORM_INVERT_ALPHA Change alpha from opacity - to transparency - PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples - PNG_TRANSFORM_STRIP_FILLER Strip out filler bytes. - -If you have valid image data in the info structure (you can use -png_set_rows() to put image data in the info structure), simply do this: - - png_write_png(png_ptr, info_ptr, png_transforms, NULL) - -where png_transforms is an integer containing the logical OR of some set of -transformation flags. This call is equivalent to png_write_info(), -followed the set of transformations indicated by the transform mask, -then png_write_image(), and finally png_write_end(). - -(The final parameter of this call is not yet used. Someday it might point -to transformation parameters required by some future output transform.) - -The low-level write interface - -If you are going the low-level route instead, you are now ready to -write all the file information up to the actual image data. You do -this with a call to png_write_info(). - - png_write_info(png_ptr, info_ptr); - -Note that there is one transformation you may need to do before -png_write_info(). In PNG files, the alpha channel in an image is the -level of opacity. If your data is supplied as a level of -transparency, you can invert the alpha channel before you write it, so -that 0 is fully transparent and 255 (in 8-bit or paletted images) or -65535 (in 16-bit images) is fully opaque, with - - png_set_invert_alpha(png_ptr); - -This must appear before png_write_info() instead of later with the -other transformations because in the case of paletted images the tRNS -chunk data has to be inverted before the tRNS chunk is written. If -your image is not a paletted image, the tRNS data (which in such cases -represents a single color to be rendered as transparent) won't need to -be changed, and you can safely do this transformation after your -png_write_info() call. - -If you need to write a private chunk that you want to appear before -the PLTE chunk when PLTE is present, you can write the PNG info in -two steps, and insert code to write your own chunk between them: - - png_write_info_before_PLTE(png_ptr, info_ptr); - png_set_unknown_chunks(png_ptr, info_ptr, ...); - png_write_info(png_ptr, info_ptr); - -After you've written the file information, you can set up the library -to handle any special transformations of the image data. The various -ways to transform the data will be described in the order that they -should occur. This is important, as some of these change the color -type and/or bit depth of the data, and some others only work on -certain color types and bit depths. Even though each transformation -checks to see if it has data that it can do something with, you should -make sure to only enable a transformation if it will be valid for the -data. For example, don't swap red and blue on grayscale data. - -PNG files store RGB pixels packed into 3 or 6 bytes. This code tells -the library to strip input data that has 4 or 8 bytes per pixel down -to 3 or 6 bytes (or strip 2 or 4-byte grayscale+filler data to 1 or 2 -bytes per pixel). - - png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); - -where the 0 is unused, and the location is either PNG_FILLER_BEFORE or -PNG_FILLER_AFTER, depending upon whether the filler byte in the pixel -is stored XRGB or RGBX. - -PNG files pack pixels of bit depths 1, 2, and 4 into bytes as small as -they can, resulting in, for example, 8 pixels per byte for 1 bit files. -If the data is supplied at 1 pixel per byte, use this code, which will -correctly pack the pixels into a single byte: - - png_set_packing(png_ptr); - -PNG files reduce possible bit depths to 1, 2, 4, 8, and 16. If your -data is of another bit depth, you can write an sBIT chunk into the -file so that decoders can recover the original data if desired. - - /* Set the true bit depth of the image data */ - if (color_type & PNG_COLOR_MASK_COLOR) - { - sig_bit.red = true_bit_depth; - sig_bit.green = true_bit_depth; - sig_bit.blue = true_bit_depth; - } - else - { - sig_bit.gray = true_bit_depth; - } - if (color_type & PNG_COLOR_MASK_ALPHA) - { - sig_bit.alpha = true_bit_depth; - } - - png_set_sBIT(png_ptr, info_ptr, &sig_bit); - -If the data is stored in the row buffer in a bit depth other than -one supported by PNG (e.g. 3 bit data in the range 0-7 for a 4-bit PNG), -this will scale the values to appear to be the correct bit depth as -is required by PNG. - - png_set_shift(png_ptr, &sig_bit); - -PNG files store 16 bit pixels in network byte order (big-endian, -ie. most significant bits first). This code would be used if they are -supplied the other way (little-endian, i.e. least significant bits -first, the way PCs store them): - - if (bit_depth > 8) - png_set_swap(png_ptr); - -If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you -need to change the order the pixels are packed into bytes, you can use: - - if (bit_depth < 8) - png_set_packswap(png_ptr); - -PNG files store 3 color pixels in red, green, blue order. This code -would be used if they are supplied as blue, green, red: - - png_set_bgr(png_ptr); - -PNG files describe monochrome as black being zero and white being -one. This code would be used if the pixels are supplied with this reversed -(black being one and white being zero): - - png_set_invert_mono(png_ptr); - -Finally, you can write your own transformation function if none of -the existing ones meets your needs. This is done by setting a callback -with - - png_set_write_user_transform_fn(png_ptr, - write_transform_fn); - -You must supply the function - - void write_transform_fn(png_ptr ptr, row_info_ptr - row_info, png_bytep data) - -See pngtest.c for a working example. Your function will be called -before any of the other transformations are processed. - -You can also set up a pointer to a user structure for use by your -callback function. - - png_set_user_transform_info(png_ptr, user_ptr, 0, 0); - -The user_channels and user_depth parameters of this function are ignored -when writing; you can set them to zero as shown. - -You can retrieve the pointer via the function png_get_user_transform_ptr(). -For example: - - voidp write_user_transform_ptr = - png_get_user_transform_ptr(png_ptr); - -It is possible to have libpng flush any pending output, either manually, -or automatically after a certain number of lines have been written. To -flush the output stream a single time call: - - png_write_flush(png_ptr); - -and to have libpng flush the output stream periodically after a certain -number of scanlines have been written, call: - - png_set_flush(png_ptr, nrows); - -Note that the distance between rows is from the last time png_write_flush() -was called, or the first row of the image if it has never been called. -So if you write 50 lines, and then png_set_flush 25, it will flush the -output on the next scanline, and every 25 lines thereafter, unless -png_write_flush() is called before 25 more lines have been written. -If nrows is too small (less than about 10 lines for a 640 pixel wide -RGB image) the image compression may decrease noticeably (although this -may be acceptable for real-time applications). Infrequent flushing will -only degrade the compression performance by a few percent over images -that do not use flushing. - -Writing the image data - -That's it for the transformations. Now you can write the image data. -The simplest way to do this is in one function call. If you have the -whole image in memory, you can just call png_write_image() and libpng -will write the image. You will need to pass in an array of pointers to -each row. This function automatically handles interlacing, so you don't -need to call png_set_interlace_handling() or call this function multiple -times, or any of that other stuff necessary with png_write_rows(). - - png_write_image(png_ptr, row_pointers); - -where row_pointers is: - - png_byte *row_pointers[height]; - -You can point to void or char or whatever you use for pixels. - -If you don't want to write the whole image at once, you can -use png_write_rows() instead. If the file is not interlaced, -this is simple: - - png_write_rows(png_ptr, row_pointers, - number_of_rows); - -row_pointers is the same as in the png_write_image() call. - -If you are just writing one row at a time, you can do this with -a single row_pointer instead of an array of row_pointers: - - png_bytep row_pointer = row; - - png_write_row(png_ptr, row_pointer); - -When the file is interlaced, things can get a good deal more -complicated. The only currently (as of the PNG Specification -version 1.2, dated July 1999) defined interlacing scheme for PNG files -is the "Adam7" interlace scheme, that breaks down an -image into seven smaller images of varying size. libpng will build -these images for you, or you can do them yourself. If you want to -build them yourself, see the PNG specification for details of which -pixels to write when. - -If you don't want libpng to handle the interlacing details, just -use png_set_interlace_handling() and call png_write_rows() the -correct number of times to write all seven sub-images. - -If you want libpng to build the sub-images, call this before you start -writing any rows: - - number_of_passes = - png_set_interlace_handling(png_ptr); - -This will return the number of passes needed. Currently, this -is seven, but may change if another interlace type is added. - -Then write the complete image number_of_passes times. - - png_write_rows(png_ptr, row_pointers, - number_of_rows); - -As some of these rows are not used, and thus return immediately, -you may want to read about interlacing in the PNG specification, -and only update the rows that are actually used. - -Finishing a sequential write - -After you are finished writing the image, you should finish writing -the file. If you are interested in writing comments or time, you should -pass an appropriately filled png_info pointer. If you are not interested, -you can pass NULL. - - png_write_end(png_ptr, info_ptr); - -When you are done, you can free all memory used by libpng like this: - - png_destroy_write_struct(&png_ptr, &info_ptr); - -It is also possible to individually free the info_ptr members that -point to libpng-allocated storage with the following function: - - png_free_data(png_ptr, info_ptr, mask, seq) - mask - identifies data to be freed, a mask - containing the logical OR of one or - more of - PNG_FREE_PLTE, PNG_FREE_TRNS, - PNG_FREE_HIST, PNG_FREE_ICCP, - PNG_FREE_PCAL, PNG_FREE_ROWS, - PNG_FREE_SCAL, PNG_FREE_SPLT, - PNG_FREE_TEXT, PNG_FREE_UNKN, - or simply PNG_FREE_ALL - seq - sequence number of item to be freed - (-1 for all items) - -This function may be safely called when the relevant storage has -already been freed, or has not yet been allocated, or was allocated -by the user and not by libpng, and will in those -cases do nothing. The "seq" parameter is ignored if only one item -of the selected data type, such as PLTE, is allowed. If "seq" is not --1, and multiple items are allowed for the data type identified in -the mask, such as text or sPLT, only the n'th item in the structure -is freed, where n is "seq". - -If you allocated data such as a palette that you passed -in to libpng with png_set_*, you must not free it until just before the call to -png_destroy_write_struct(). - -The default behavior is only to free data that was allocated internally -by libpng. This can be changed, so that libpng will not free the data, -or so that it will free data that was allocated by the user with png_malloc() -or png_zalloc() and passed in via a png_set_*() function, with - - png_data_freer(png_ptr, info_ptr, freer, mask) - mask - which data elements are affected - same choices as in png_free_data() - freer - one of - PNG_DESTROY_WILL_FREE_DATA - PNG_SET_WILL_FREE_DATA - PNG_USER_WILL_FREE_DATA - -For example, to transfer responsibility for some data from a read structure -to a write structure, you could use - - png_data_freer(read_ptr, read_info_ptr, - PNG_USER_WILL_FREE_DATA, - PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST) - png_data_freer(write_ptr, write_info_ptr, - PNG_DESTROY_WILL_FREE_DATA, - PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST) - -thereby briefly reassigning responsibility for freeing to the user but -immediately afterwards reassigning it once more to the write_destroy -function. Having done this, it would then be safe to destroy the read -structure and continue to use the PLTE, tRNS, and hIST data in the write -structure. - -This function only affects data that has already been allocated. -You can call this function before calling after the png_set_*() functions -to control whether the user or png_destroy_*() is supposed to free the data. -When the user assumes responsibility for libpng-allocated data, the -application must use -png_free() to free it, and when the user transfers responsibility to libpng -for data that the user has allocated, the user must have used png_malloc() -or png_zalloc() to allocate it. - -If you allocated text_ptr.text, text_ptr.lang, and text_ptr.translated_keyword -separately, do not transfer responsibility for freeing text_ptr to libpng, -because when libpng fills a png_text structure it combines these members with -the key member, and png_free_data() will free only text_ptr.key. Similarly, -if you transfer responsibility for free'ing text_ptr from libpng to your -application, your application must not separately free those members. -For a more compact example of writing a PNG image, see the file example.c. - -V. Modifying/Customizing libpng: - -There are three issues here. The first is changing how libpng does -standard things like memory allocation, input/output, and error handling. -The second deals with more complicated things like adding new chunks, -adding new transformations, and generally changing how libpng works. -Both of those are compile-time issues; that is, they are generally -determined at the time the code is written, and there is rarely a need -to provide the user with a means of changing them. The third is a -run-time issue: choosing between and/or tuning one or more alternate -versions of computationally intensive routines; specifically, optimized -assembly-language (and therefore compiler- and platform-dependent) -versions. - -Memory allocation, input/output, and error handling - -All of the memory allocation, input/output, and error handling in libpng -goes through callbacks that are user-settable. The default routines are -in pngmem.c, pngrio.c, pngwio.c, and pngerror.c, respectively. To change -these functions, call the appropriate png_set_*_fn() function. - -Memory allocation is done through the functions png_malloc() -and png_free(). These currently just call the standard C functions. If -your pointers can't access more then 64K at a time, you will want to set -MAXSEG_64K in zlib.h. Since it is unlikely that the method of handling -memory allocation on a platform will change between applications, these -functions must be modified in the library at compile time. If you prefer -to use a different method of allocating and freeing data, you can use -png_create_read_struct_2() or png_create_write_struct_2() to register -your own functions as described above. - -These functions also provide a void pointer that can be retrieved via - - mem_ptr=png_get_mem_ptr(png_ptr); - -Your replacement memory functions must have prototypes as follows: - - png_voidp malloc_fn(png_structp png_ptr, - png_size_t size); - void free_fn(png_structp png_ptr, png_voidp ptr); - -Your malloc_fn() should return NULL in case of failure. The png_malloc() -function will call png_error() if it receives a NULL from the system -memory allocator or from your replacement malloc_fn(). - -Input/Output in libpng is done through png_read() and png_write(), -which currently just call fread() and fwrite(). The FILE * is stored in -png_struct and is initialized via png_init_io(). If you wish to change -the method of I/O, the library supplies callbacks that you can set -through the function png_set_read_fn() and png_set_write_fn() at run -time, instead of calling the png_init_io() function. These functions -also provide a void pointer that can be retrieved via the function -png_get_io_ptr(). For example: - - png_set_read_fn(png_structp read_ptr, - voidp read_io_ptr, png_rw_ptr read_data_fn) - - png_set_write_fn(png_structp write_ptr, - voidp write_io_ptr, png_rw_ptr write_data_fn, - png_flush_ptr output_flush_fn); - - voidp read_io_ptr = png_get_io_ptr(read_ptr); - voidp write_io_ptr = png_get_io_ptr(write_ptr); - -The replacement I/O functions must have prototypes as follows: - - void user_read_data(png_structp png_ptr, - png_bytep data, png_size_t length); - void user_write_data(png_structp png_ptr, - png_bytep data, png_size_t length); - void user_flush_data(png_structp png_ptr); - -Supplying NULL for the read, write, or flush functions sets them back -to using the default C stream functions. It is an error to read from -a write stream, and vice versa. - -Error handling in libpng is done through png_error() and png_warning(). -Errors handled through png_error() are fatal, meaning that png_error() -should never return to its caller. Currently, this is handled via -setjmp() and longjmp() (unless you have compiled libpng with -PNG_SETJMP_NOT_SUPPORTED, in which case it is handled via PNG_ABORT()), -but you could change this to do things like exit() if you should wish. - -On non-fatal errors, png_warning() is called -to print a warning message, and then control returns to the calling code. -By default png_error() and png_warning() print a message on stderr via -fprintf() unless the library is compiled with PNG_NO_CONSOLE_IO defined -(because you don't want the messages) or PNG_NO_STDIO defined (because -fprintf() isn't available). If you wish to change the behavior of the error -functions, you will need to set up your own message callbacks. These -functions are normally supplied at the time that the png_struct is created. -It is also possible to redirect errors and warnings to your own replacement -functions after png_create_*_struct() has been called by calling: - - png_set_error_fn(png_structp png_ptr, - png_voidp error_ptr, png_error_ptr error_fn, - png_error_ptr warning_fn); - - png_voidp error_ptr = png_get_error_ptr(png_ptr); - -If NULL is supplied for either error_fn or warning_fn, then the libpng -default function will be used, calling fprintf() and/or longjmp() if a -problem is encountered. The replacement error functions should have -parameters as follows: - - void user_error_fn(png_structp png_ptr, - png_const_charp error_msg); - void user_warning_fn(png_structp png_ptr, - png_const_charp warning_msg); - -The motivation behind using setjmp() and longjmp() is the C++ throw and -catch exception handling methods. This makes the code much easier to write, -as there is no need to check every return code of every function call. -However, there are some uncertainties about the status of local variables -after a longjmp, so the user may want to be careful about doing anything after -setjmp returns non-zero besides returning itself. Consult your compiler -documentation for more details. For an alternative approach, you may wish -to use the "cexcept" facility (see http://cexcept.sourceforge.net). - -Custom chunks - -If you need to read or write custom chunks, you may need to get deeper -into the libpng code. The library now has mechanisms for storing -and writing chunks of unknown type; you can even declare callbacks -for custom chunks. Hoewver, this may not be good enough if the -library code itself needs to know about interactions between your -chunk and existing `intrinsic' chunks. - -If you need to write a new intrinsic chunk, first read the PNG -specification. Acquire a first level of -understanding of how it works. Pay particular attention to the -sections that describe chunk names, and look at how other chunks were -designed, so you can do things similarly. Second, check out the -sections of libpng that read and write chunks. Try to find a chunk -that is similar to yours and use it as a template. More details can -be found in the comments inside the code. It is best to handle unknown -chunks in a generic method, via callback functions, instead of by -modifying libpng functions. - -If you wish to write your own transformation for the data, look through -the part of the code that does the transformations, and check out some of -the simpler ones to get an idea of how they work. Try to find a similar -transformation to the one you want to add and copy off of it. More details -can be found in the comments inside the code itself. - -Configuring for 16 bit platforms - -You will want to look into zconf.h to tell zlib (and thus libpng) that -it cannot allocate more then 64K at a time. Even if you can, the memory -won't be accessible. So limit zlib and libpng to 64K by defining MAXSEG_64K. - -Configuring for DOS - -For DOS users who only have access to the lower 640K, you will -have to limit zlib's memory usage via a png_set_compression_mem_level() -call. See zlib.h or zconf.h in the zlib library for more information. - -Configuring for Medium Model - -Libpng's support for medium model has been tested on most of the popular -compilers. Make sure MAXSEG_64K gets defined, USE_FAR_KEYWORD gets -defined, and FAR gets defined to far in pngconf.h, and you should be -all set. Everything in the library (except for zlib's structure) is -expecting far data. You must use the typedefs with the p or pp on -the end for pointers (or at least look at them and be careful). Make -note that the rows of data are defined as png_bytepp, which is an -unsigned char far * far *. - -Configuring for gui/windowing platforms: - -You will need to write new error and warning functions that use the GUI -interface, as described previously, and set them to be the error and -warning functions at the time that png_create_*_struct() is called, -in order to have them available during the structure initialization. -They can be changed later via png_set_error_fn(). On some compilers, -you may also have to change the memory allocators (png_malloc, etc.). - -Configuring for compiler xxx: - -All includes for libpng are in pngconf.h. If you need to add/change/delete -an include, this is the place to do it. The includes that are not -needed outside libpng are protected by the PNG_INTERNAL definition, -which is only defined for those routines inside libpng itself. The -files in libpng proper only include png.h, which includes pngconf.h. - -Configuring zlib: - -There are special functions to configure the compression. Perhaps the -most useful one changes the compression level, which currently uses -input compression values in the range 0 - 9. The library normally -uses the default compression level (Z_DEFAULT_COMPRESSION = 6). Tests -have shown that for a large majority of images, compression values in -the range 3-6 compress nearly as well as higher levels, and do so much -faster. For online applications it may be desirable to have maximum speed -(Z_BEST_SPEED = 1). With versions of zlib after v0.99, you can also -specify no compression (Z_NO_COMPRESSION = 0), but this would create -files larger than just storing the raw bitmap. You can specify the -compression level by calling: - - png_set_compression_level(png_ptr, level); - -Another useful one is to reduce the memory level used by the library. -The memory level defaults to 8, but it can be lowered if you are -short on memory (running DOS, for example, where you only have 640K). -Note that the memory level does have an effect on compression; among -other things, lower levels will result in sections of incompressible -data being emitted in smaller stored blocks, with a correspondingly -larger relative overhead of up to 15% in the worst case. - - png_set_compression_mem_level(png_ptr, level); - -The other functions are for configuring zlib. They are not recommended -for normal use and may result in writing an invalid PNG file. See -zlib.h for more information on what these mean. - - png_set_compression_strategy(png_ptr, - strategy); - png_set_compression_window_bits(png_ptr, - window_bits); - png_set_compression_method(png_ptr, method); - png_set_compression_buffer_size(png_ptr, size); - -Controlling row filtering - -If you want to control whether libpng uses filtering or not, which -filters are used, and how it goes about picking row filters, you -can call one of these functions. The selection and configuration -of row filters can have a significant impact on the size and -encoding speed and a somewhat lesser impact on the decoding speed -of an image. Filtering is enabled by default for RGB and grayscale -images (with and without alpha), but not for paletted images nor -for any images with bit depths less than 8 bits/pixel. - -The 'method' parameter sets the main filtering method, which is -currently only '0' in the PNG 1.2 specification. The 'filters' -parameter sets which filter(s), if any, should be used for each -scanline. Possible values are PNG_ALL_FILTERS and PNG_NO_FILTERS -to turn filtering on and off, respectively. - -Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB, -PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise -ORed together with '|' to specify one or more filters to use. -These filters are described in more detail in the PNG specification. -If you intend to change the filter type during the course of writing -the image, you should start with flags set for all of the filters -you intend to use so that libpng can initialize its internal -structures appropriately for all of the filter types. (Note that this -means the first row must always be adaptively filtered, because libpng -currently does not allocate the filter buffers until png_write_row() -is called for the first time.) - - filters = PNG_FILTER_NONE | PNG_FILTER_SUB - PNG_FILTER_UP | PNG_FILTER_AVE | - PNG_FILTER_PAETH | PNG_ALL_FILTERS; - - png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, - filters); - The second parameter can also be - PNG_INTRAPIXEL_DIFFERENCING if you are - writing a PNG to be embedded in a MNG - datastream. This parameter must be the - same as the value of filter_method used - in png_set_IHDR(). - -It is also possible to influence how libpng chooses from among the -available filters. This is done in one or both of two ways - by -telling it how important it is to keep the same filter for successive -rows, and by telling it the relative computational costs of the filters. - - double weights[3] = {1.5, 1.3, 1.1}, - costs[PNG_FILTER_VALUE_LAST] = - {1.0, 1.3, 1.3, 1.5, 1.7}; - - png_set_filter_heuristics(png_ptr, - PNG_FILTER_HEURISTIC_WEIGHTED, 3, - weights, costs); - -The weights are multiplying factors that indicate to libpng that the -row filter should be the same for successive rows unless another row filter -is that many times better than the previous filter. In the above example, -if the previous 3 filters were SUB, SUB, NONE, the SUB filter could have a -"sum of absolute differences" 1.5 x 1.3 times higher than other filters -and still be chosen, while the NONE filter could have a sum 1.1 times -higher than other filters and still be chosen. Unspecified weights are -taken to be 1.0, and the specified weights should probably be declining -like those above in order to emphasize recent filters over older filters. - -The filter costs specify for each filter type a relative decoding cost -to be considered when selecting row filters. This means that filters -with higher costs are less likely to be chosen over filters with lower -costs, unless their "sum of absolute differences" is that much smaller. -The costs do not necessarily reflect the exact computational speeds of -the various filters, since this would unduly influence the final image -size. - -Note that the numbers above were invented purely for this example and -are given only to help explain the function usage. Little testing has -been done to find optimum values for either the costs or the weights. - -Removing unwanted object code - -There are a bunch of #define's in pngconf.h that control what parts of -libpng are compiled. All the defines end in _SUPPORTED. If you are -never going to use a capability, you can change the #define to #undef -before recompiling libpng and save yourself code and data space, or -you can turn off individual capabilities with defines that begin with -PNG_NO_. - -You can also turn all of the transforms and ancillary chunk capabilities -off en masse with compiler directives that define -PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS, -or all four, -along with directives to turn on any of the capabilities that you do -want. The PNG_NO_READ[or WRITE]_TRANSFORMS directives disable -the extra transformations but still leave the library fully capable of reading -and writing PNG files with all known public chunks -Use of the PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS directive -produces a library that is incapable of reading or writing ancillary chunks. -If you are not using the progressive reading capability, you can -turn that off with PNG_NO_PROGRESSIVE_READ (don't confuse -this with the INTERLACING capability, which you'll still have). - -All the reading and writing specific code are in separate files, so the -linker should only grab the files it needs. However, if you want to -make sure, or if you are building a stand alone library, all the -reading files start with pngr and all the writing files start with -pngw. The files that don't match either (like png.c, pngtrans.c, etc.) -are used for both reading and writing, and always need to be included. -The progressive reader is in pngpread.c - -If you are creating or distributing a dynamically linked library (a .so -or DLL file), you should not remove or disable any parts of the library, -as this will cause applications linked with different versions of the -library to fail if they call functions not available in your library. -The size of the library itself should not be an issue, because only -those sections that are actually used will be loaded into memory. - -Requesting debug printout - -The macro definition PNG_DEBUG can be used to request debugging -printout. Set it to an integer value in the range 0 to 3. Higher -numbers result in increasing amounts of debugging information. The -information is printed to the "stderr" file, unless another file -name is specified in the PNG_DEBUG_FILE macro definition. - -When PNG_DEBUG > 0, the following functions (macros) become available: - - png_debug(level, message) - png_debug1(level, message, p1) - png_debug2(level, message, p1, p2) - -in which "level" is compared to PNG_DEBUG to decide whether to print -the message, "message" is the formatted string to be printed, -and p1 and p2 are parameters that are to be embedded in the string -according to printf-style formatting directives. For example, - - png_debug1(2, "foo=%d\n", foo); - -is expanded to - - if(PNG_DEBUG > 2) - fprintf(PNG_DEBUG_FILE, "foo=%d\n", foo); - -When PNG_DEBUG is defined but is zero, the macros aren't defined, but you -can still use PNG_DEBUG to control your own debugging: - - #ifdef PNG_DEBUG - fprintf(stderr, ... - #endif - -When PNG_DEBUG = 1, the macros are defined, but only png_debug statements -having level = 0 will be printed. There aren't any such statements in -this version of libpng, but if you insert some they will be printed. - -VI. Runtime optimization - -A new feature in libpng 1.2.0 is the ability to dynamically switch between -standard and optimized versions of some routines. Currently these are -limited to three computationally intensive tasks when reading PNG files: -decoding row filters, expanding interlacing, and combining interlaced or -transparent row data with previous row data. Currently the optimized -versions are available only for x86 (Intel, AMD, etc.) platforms with -MMX support, though this may change in future versions. (For example, -the non-MMX assembler optimizations for zlib might become similarly -runtime-selectable in future releases, in which case libpng could be -extended to support them. Alternatively, the compile-time choice of -floating-point versus integer routines for gamma correction might become -runtime-selectable.) - -Because such optimizations tend to be very platform- and compiler-dependent, -both in how they are written and in how they perform, the new runtime code -in libpng has been written to allow programs to query, enable, and disable -either specific optimizations or all such optimizations. For example, to -enable all possible optimizations (bearing in mind that some "optimizations" -may actually run more slowly in rare cases): - - #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) - png_uint_32 mask, flags; - - flags = png_get_asm_flags(png_ptr); - mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE); - png_set_asm_flags(png_ptr, flags | mask); - #endif - -To enable only optimizations relevant to reading PNGs, use PNG_SELECT_READ -by itself when calling png_get_asm_flagmask(); similarly for optimizing -only writing. To disable all optimizations: - - #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) - flags = png_get_asm_flags(png_ptr); - mask = png_get_asm_flagmask(PNG_SELECT_READ | PNG_SELECT_WRITE); - png_set_asm_flags(png_ptr, flags & ~mask); - #endif - -To enable or disable only MMX-related features, use png_get_mmx_flagmask() -in place of png_get_asm_flagmask(). The mmx version takes one additional -parameter: - - #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) - int selection = PNG_SELECT_READ | PNG_SELECT_WRITE; - int compilerID; - - mask = png_get_mmx_flagmask(selection, &compilerID); - #endif - -On return, compilerID will indicate which version of the MMX assembler -optimizations was compiled. Currently two flavors exist: Microsoft -Visual C++ (compilerID == 1) and GNU C (a.k.a. gcc/gas, compilerID == 2). -On non-x86 platforms or on systems compiled without MMX optimizations, a -value of -1 is used. - -Note that both png_get_asm_flagmask() and png_get_mmx_flagmask() return -all valid, settable optimization bits for the version of the library that's -currently in use. In the case of shared (dynamically linked) libraries, -this may include optimizations that did not exist at the time the code was -written and compiled. It is also possible, of course, to enable only known, -specific optimizations; for example: - - #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) - flags = PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \ - | PNG_ASM_FLAG_MMX_READ_INTERLACE \ - | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ - | PNG_ASM_FLAG_MMX_READ_FILTER_UP \ - | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ - | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ; - png_set_asm_flags(png_ptr, flags); - #endif - -This method would enable only the MMX read-optimizations available at the -time of libpng 1.2.0's release, regardless of whether a later version of -the DLL were actually being used. (Also note that these functions did not -exist in versions older than 1.2.0, so any attempt to run a dynamically -linked app on such an older version would fail.) - -To determine whether the processor supports MMX instructions at all, use -the png_mmx_support() function: - - #if defined(PNG_LIBPNG_VER) && (PNG_LIBPNG_VER >= 10200) - mmxsupport = png_mmx_support(); - #endif - -It returns -1 if MMX support is not compiled into libpng, 0 if MMX code -is compiled but MMX is not supported by the processor, or 1 if MMX support -is fully available. Note that png_mmx_support(), png_get_mmx_flagmask(), -and png_get_asm_flagmask() all may be called without allocating and ini- -tializing any PNG structures (for example, as part of a usage screen or -"about" box). - -The following code can be used to prevent an application from using the -thread_unsafe features, even if libpng was built with PNG_THREAD_UNSAFE_OK -defined: - -#if defined(PNG_USE_PNGGCCRD) && defined(PNG_ASSEMBLER_CODE_SUPPORTED) \ - && defined(PNG_THREAD_UNSAFE_OK) - /* Disable thread-unsafe features of pnggccrd */ - if (png_access_version() >= 10200) - { - png_uint_32 mmx_disable_mask = 0; - png_uint_32 asm_flags; - - mmx_disable_mask |= ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \ - | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ - | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ - | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ); - asm_flags = png_get_asm_flags(png_ptr); - png_set_asm_flags(png_ptr, asm_flags & ~mmx_disable_mask); - } -#endif - -For more extensive examples of runtime querying, enabling and disabling -of optimized features, see contrib/gregbook/readpng2.c in the libpng -source-code distribution. - - -VII. MNG support - -The MNG specification (available at http://www.libpng.org/pub/mng) allows -certain extensions to PNG for PNG images that are embedded in MNG datastreams. -Libpng can support some of these extensions. To enable them, use the -png_permit_mng_features() function: - - feature_set = png_permit_mng_features(png_ptr, mask) - mask is a png_uint_32 containing the logical OR of the - features you want to enable. These include - PNG_FLAG_MNG_EMPTY_PLTE - PNG_FLAG_MNG_FILTER_64 - PNG_ALL_MNG_FEATURES - feature_set is a png_32_uint that is the logical AND of - your mask with the set of MNG features that is - supported by the version of libpng that you are using. - -It is an error to use this function when reading or writing a standalone -PNG file with the PNG 8-byte signature. The PNG datastream must be wrapped -in a MNG datastream. As a minimum, it must have the MNG 8-byte signature -and the MHDR and MEND chunks. Libpng does not provide support for these -or any other MNG chunks; your application must provide its own support for -them. You may wish to consider using libmng (available at -http://www.libmng.com) instead. - -VIII. Changes to Libpng from version 0.88 - -It should be noted that versions of libpng later than 0.96 are not -distributed by the original libpng author, Guy Schalnat, nor by -Andreas Dilger, who had taken over from Guy during 1996 and 1997, and -distributed versions 0.89 through 0.96, but rather by another member -of the original PNG Group, Glenn Randers-Pehrson. Guy and Andreas are -still alive and well, but they have moved on to other things. - -The old libpng functions png_read_init(), png_write_init(), -png_info_init(), png_read_destroy(), and png_write_destroy() have been -moved to PNG_INTERNAL in version 0.95 to discourage their use. These -functions will be removed from libpng version 2.0.0. - -The preferred method of creating and initializing the libpng structures is -via the png_create_read_struct(), png_create_write_struct(), and -png_create_info_struct() because they isolate the size of the structures -from the application, allow version error checking, and also allow the -use of custom error handling routines during the initialization, which -the old functions do not. The functions png_read_destroy() and -png_write_destroy() do not actually free the memory that libpng -allocated for these structs, but just reset the data structures, so they -can be used instead of png_destroy_read_struct() and -png_destroy_write_struct() if you feel there is too much system overhead -allocating and freeing the png_struct for each image read. - -Setting the error callbacks via png_set_message_fn() before -png_read_init() as was suggested in libpng-0.88 is no longer supported -because this caused applications that do not use custom error functions -to fail if the png_ptr was not initialized to zero. It is still possible -to set the error callbacks AFTER png_read_init(), or to change them with -png_set_error_fn(), which is essentially the same function, but with a new -name to force compilation errors with applications that try to use the old -method. - -Starting with version 1.0.7, you can find out which version of the library -you are using at run-time: - - png_uint_32 libpng_vn = png_access_version_number(); - -The number libpng_vn is constructed from the major version, minor -version with leading zero, and release number with leading zero, -(e.g., libpng_vn for version 1.0.7 is 10007). - -You can also check which version of png.h you used when compiling your -application: - - png_uint_32 application_vn = PNG_LIBPNG_VER; - -IX. Y2K Compliance in libpng - -October 3, 2002 - -Since the PNG Development group is an ad-hoc body, we can't make -an official declaration. - -This is your unofficial assurance that libpng from version 0.71 and -upward through 1.2.5 are Y2K compliant. It is my belief that earlier -versions were also Y2K compliant. - -Libpng only has three year fields. One is a 2-byte unsigned integer that -will hold years up to 65535. The other two hold the date in text -format, and will hold years up to 9999. - -The integer is - "png_uint_16 year" in png_time_struct. - -The strings are - "png_charp time_buffer" in png_struct and - "near_time_buffer", which is a local character string in png.c. - -There are seven time-related functions: - - png_convert_to_rfc_1123() in png.c - (formerly png_convert_to_rfc_1152() in error) - png_convert_from_struct_tm() in pngwrite.c, called - in pngwrite.c - png_convert_from_time_t() in pngwrite.c - png_get_tIME() in pngget.c - png_handle_tIME() in pngrutil.c, called in pngread.c - png_set_tIME() in pngset.c - png_write_tIME() in pngwutil.c, called in pngwrite.c - -All appear to handle dates properly in a Y2K environment. The -png_convert_from_time_t() function calls gmtime() to convert from system -clock time, which returns (year - 1900), which we properly convert to -the full 4-digit year. There is a possibility that applications using -libpng are not passing 4-digit years into the png_convert_to_rfc_1123() -function, or that they are incorrectly passing only a 2-digit year -instead of "year - 1900" into the png_convert_from_struct_tm() function, -but this is not under our control. The libpng documentation has always -stated that it works with 4-digit years, and the APIs have been -documented as such. - -The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned -integer to hold the year, and can hold years as large as 65535. - -zlib, upon which libpng depends, is also Y2K compliant. It contains -no date-related code. - - - Glenn Randers-Pehrson - libpng maintainer - PNG Development Group diff --git a/gtkmm-osx/trunk/libpng-1.2.5/libpngpf.3 b/gtkmm-osx/trunk/libpng-1.2.5/libpngpf.3 deleted file mode 100644 index 3c1f379..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/libpngpf.3 +++ /dev/null @@ -1,552 +0,0 @@ -.TH LIBPNGPF 3 "October 3, 2002" -.SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.2.5 -(private functions) -.SH SYNOPSIS -\fB#include \fP - -\fI\fB - -\fBvoid png_build_gamma_table (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_build_grayscale_palette (int \fP\fIbit_depth\fP\fB, png_colorp \fIpalette\fP\fB);\fP - -\fI\fB - -\fBvoid png_calculate_crc (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIptr\fP\fB, png_size_t \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_check_chunk_name (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP - -\fI\fB - -\fBpng_size_t png_check_keyword (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIkey\fP\fB, png_charpp \fInew_key\fP\fB);\fP - -\fI\fB - -\fBvoid png_combine_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fImask\fP\fB);\fP - -\fI\fB - -\fBvoid png_correct_palette (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fInum_palette\fP\fB);\fP - -\fI\fB - -\fBint png_crc_error (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBint png_crc_finish (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIskip\fP\fB);\fP - -\fI\fB - -\fBvoid png_crc_read (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuf\fP\fB, png_size_t \fIlength\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_create_struct (int \fItype\fP\fB);\fP - -\fI\fB - -\fBpng_voidp png_create_struct_2 (int \fP\fItype\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_voidp \fImem_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_charp png_decompress_chunk (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcomp_type\fP\fB, png_charp \fP\fIchunkdata\fP\fB, png_size_t \fP\fIchunklength\fP\fB, png_size_t \fP\fIprefix_length\fP\fB, png_size_t \fI*data_length\fP\fB);\fP - -\fI\fB - -\fBvoid png_destroy_struct (png_voidp \fIstruct_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_destroy_struct_2 (png_voidp \fP\fIstruct_ptr\fP\fB, png_free_ptr \fP\fIfree_fn\fP\fB, png_voidp \fImem_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_background (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fP\fItrans_values\fP\fB, png_color_16p \fP\fIbackground\fP\fB, png_color_16p \fP\fIbackground_1\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_bytep \fP\fIgamma_from_1\fP\fB, png_bytep \fP\fIgamma_to_1\fP\fB, png_uint_16pp \fP\fIgamma_16\fP\fB, png_uint_16pp \fP\fIgamma_16_from_1\fP\fB, png_uint_16pp \fP\fIgamma_16_to_1\fP\fB, int \fIgamma_shift\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_bgr (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_chop (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_dither (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIpalette_lookup\fP\fB, png_bytep \fIdither_lookup\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_expand (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fItrans_value\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_expand_palette (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_colorp \fP\fIpalette\fP\fB, png_bytep \fP\fItrans\fP\fB, int \fInum_trans\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_gamma (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_uint_16pp \fP\fIgamma_16_table\fP\fB, int \fIgamma_shift\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_gray_to_rgb (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_invert (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_pack (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fIbit_depth\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_packswap (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_read_filler (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, png_uint_32 \fIflags\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_read_interlace (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fP\fIpass\fP\fB, png_uint_32 \fItransformations\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_read_invert_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_read_swap_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_read_transformations (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBint png_do_rgb_to_gray (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_shift (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_8p \fIbit_depth\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_strip_filler (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fIflags\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_swap (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_unpack (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_unshift (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_8p \fIsig_bits\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_write_interlace (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fIpass\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_write_invert_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_write_swap_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP - -\fI\fB - -\fBvoid png_do_write_transformations (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid *png_far_to_near (png_structp png_ptr,png_voidp \fP\fIptr\fP\fB, int \fIcheck\fP\fB);\fP - -\fI\fB - -\fBvoid png_flush (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBpng_int_32 png_get_int_32 (png_bytep \fIbuf\fP\fB);\fP - -\fI\fB - -\fBpng_uint_16 png_get_uint_16 (png_bytep \fIbuf\fP\fB);\fP - -\fI\fB - -\fBpng_uint_32 png_get_uint_32 (png_bytep \fIbuf\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_gAMA (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_IEND (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_iTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_handle_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_info_destroy (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_init_mmx_flags (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_init_read_transformations (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_process_IDAT_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_length\fP\fB);\fP - -\fI\fB - -\fBvoid png_process_some_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_push_check_crc (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_push_crc_finish (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_push_crc_skip (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_push_fill_buffer (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_push_handle_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_push_handle_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_push_handle_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_push_have_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_push_have_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_push_have_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIrow\fP\fB);\fP - -\fI\fB - -\fBvoid png_push_process_row (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_push_read_chunk (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_push_read_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_push_read_IDAT (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_push_read_sig (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_push_read_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_push_read_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_push_restore_buffer (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_length\fP\fB);\fP - -\fI\fB - -\fBvoid png_push_save_buffer (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_read_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_read_filter_row (png_structp \fP\fIpng_ptr\fP\fB, png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIprev_row\fP\fB, int \fIfilter\fP\fB);\fP - -\fI\fB - -\fBvoid png_read_finish_row (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_read_push_finish_row (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_read_start_row (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_read_transform_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_reset_crc (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_save_int_32 (png_bytep \fP\fIbuf\fP\fB, png_int_32 \fIi\fP\fB);\fP - -\fI\fB - -\fBvoid png_save_uint_16 (png_bytep \fP\fIbuf\fP\fB, unsigned int \fIi\fP\fB);\fP - -\fI\fB - -\fBvoid png_save_uint_32 (png_bytep \fP\fIbuf\fP\fB, png_uint_32 \fIi\fP\fB);\fP - -\fI\fB - -\fBint png_set_text_2 (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fItext_ptr\fP\fB, int \fInum_text)\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_cHRM (png_structp \fP\fIpng_ptr\fP\fB, double \fP\fIwhite_x\fP\fB, double \fP\fIwhite_y\fP\fB, double \fP\fIred_x\fP\fB, double \fP\fIred_y\fP\fB, double \fP\fIgreen_x\fP\fB, double \fP\fIgreen_y\fP\fB, double \fP\fIblue_x\fP\fB, double \fIblue_y\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIwhite_x\fP\fB, png_uint_32 \fP\fIwhite_y\fP\fB, png_uint_32 \fP\fIred_x\fP\fB, png_uint_32 \fP\fIred_y\fP\fB, png_uint_32 \fP\fIgreen_x\fP\fB, png_uint_32 \fP\fIgreen_y\fP\fB, png_uint_32 \fP\fIblue_x\fP\fB, png_uint_32 \fIblue_y\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_filtered_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIfiltered_row\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_find_filter (png_structp \fP\fIpng_ptr\fP\fB, png_row_infop \fIrow_info\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_finish_row (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_gAMA (png_structp \fP\fIpng_ptr\fP\fB, double \fIfile_gamma\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_gAMA_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIint_file_gamma\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_uint_16p \fP\fIhist\fP\fB, int \fInum_hist\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIname\fP\fB, int \fP\fIcompression_type\fP\fB, png_charp \fP\fIprofile\fP\fB, int \fIproflen\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_IDAT (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_IEND (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIwidth\fP\fB, png_uint_32 \fP\fIheight\fP\fB, int \fP\fIbit_depth\fP\fB, int \fP\fIcolor_type\fP\fB, int \fP\fIcompression_type\fP\fB, int \fP\fIfilter_type\fP\fB, int \fIinterlace_type\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_iTXt (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcompression\fP\fB, png_charp \fP\fIkey\fP\fB, png_charp \fP\fIlang\fP\fB, png_charp \fP\fItranslated_key\fP\fB, png_charp \fItext)\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIx_offset\fP\fB, png_uint_32 \fP\fIy_offset\fP\fB, int \fIunit_type\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIpurpose\fP\fB, png_int_32 \fP\fIX0\fP\fB, png_int_32 \fP\fIX1\fP\fB, int \fP\fItype\fP\fB, int \fP\fInparams\fP\fB, png_charp \fP\fIunits\fP\fB, png_charpp \fIparams\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIx_pixels_per_unit\fP\fB, png_uint_32 \fP\fIy_pixels_per_unit\fP\fB, int \fIunit_type\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, png_uint_32 \fInum_pal\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_color_8p \fP\fIsbit\fP\fB, int \fIcolor_type\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIunit\fP\fB, double \fP\fIwidth\fP\fB, double \fIheight\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_sCAL_s (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIunit\fP\fB, png_charp \fP\fIwidth\fP\fB, png_charp \fIheight\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_sig (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_sRGB (png_structp \fP\fIpng_ptr\fP\fB, int \fIintent\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_spalette_p \fIpalette\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_start_row (png_structp \fIpng_ptr\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIkey\fP\fB, png_charp \fP\fItext\fP\fB, png_size_t \fItext_len\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_timep \fImod_time\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fItrans\fP\fB, png_color_16p \fP\fIvalues\fP\fB, int \fP\fInumber\fP\fB, int \fIcolor_type\fP\fB);\fP - -\fI\fB - -\fBvoid png_write_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIkey\fP\fB, png_charp \fP\fItext\fP\fB, png_size_t \fP\fItext_len\fP\fB, int \fIcompression\fP\fB);\fP - -\fI\fB - -\fBvoidpf png_zalloc (voidpf \fP\fIpng_ptr\fP\fB, uInt \fP\fIitems\fP\fB, uInt \fIsize\fP\fB);\fP - -\fI\fB - -\fBvoid png_zfree (voidpf \fP\fIpng_ptr\fP\fB, voidpf \fIptr\fP\fB);\fP - -\fI\fB - -.SH DESCRIPTION -The functions listed above are used privately by libpng -and are not recommended for use by applications. They are -not "exported" to applications using shared libraries. They -are listed alphabetically here as an aid to libpng maintainers. -See png.h for more information on these functions. - -.SH SEE ALSO -libpng(3), png(5) -.SH AUTHOR -Glenn Randers-Pehrson diff --git a/gtkmm-osx/trunk/libpng-1.2.5/makefile.macosx b/gtkmm-osx/trunk/libpng-1.2.5/makefile.macosx deleted file mode 100644 index 2ea2382..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/makefile.macosx +++ /dev/null @@ -1,198 +0,0 @@ -# makefile for libpng, MACOS X -# Copyright (C) 2002 Glenn Randers-Pehrson -# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. -# Modified by Karin Kosina 20011010: -# build shared library (*.dylib) -# For conditions of distribution and use, see copyright notice in png.h - -# where make install puts libpng.a and png.h -#prefix=/usr/local - -# Where the zlib library and include files are located -#ZLIBLIB=/usr/local/lib -#ZLIBINC=/usr/local/include -ZLIBLIB=/usr/lib -ZLIBINC=/usr/include - -CC=cc - -PNGMAJ = 0 -PNGMIN = 1.2.5 -PNGVER = $(PNGMAJ).$(PNGMIN) - -CFLAGS+=-fno-common -I$(ZLIBINC) -O # -g -DPNG_DEBUG=5 -LDFLAGS+=-L. -L$(ZLIBLIB) -lpng -lz - -LIBNAME=libpng12 -SHAREDLIB_POSTFIX=dylib -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - -#RANLIB=echo -RANLIB=ranlib - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -all: libpng.a pngtest shared libpng.pc libpng-config - -shared: $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) - -libpng.pc: - cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! | \ - sed -e s/-lm// > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - -libpng.a: $(OBJS) - $(CC) -static -nodefaultlibs -o $@ $(OBJS) -# ar rc $(ARCHFLAGS) $@ $(OBJS) -# $(RANLIB) $@ - -$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX): $(OBJS) - $(CC) -dynamiclib -flat_namespace -undefined suppress -o $@ $(OBJS) - -libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX): $(OBJS) - $(CC) -dynamiclib -compatibility_version 3 -flat_namespace \ - -undefined suppress -o $@ $(OBJS) - -pngtest: pngtest.o libpng.a - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - ./pngtest - -install-headers: png.h pngconf.h - -@if [ ! -d $(DI) ]; then mkdir $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi - cp png.h pngconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h - -@/bin/rm -f $(DI)/libpng - (cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@/bin/rm -f $(DL)/libpng.a - (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \ - libpng.pc libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - -@/bin/rm -f \ - $(DL)/$(LIBNAME).$(PNGVER)*.$(SHAREDLIB_POSTFIX) - -@/bin/rm -f $(DL)/$(LIBNAME).$(SHAREDLIB_POSTFIX) -# -@/bin/rm -f libpng.$(SHAREDLIB_POSTFIX) -# -@/bin/rm -f libpng.3.$(SHAREDLIB_POSTFIX) -# -@/bin/rm -f libpng.3.$(PNGMIN)*.$(SHAREDLIB_POSTFIX) - cp libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) $(DL) - cp $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) $(DL) - chmod 755 $(DL)/$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) - chmod 755 $(DL)/libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) - (cd $(DL); \ - ln -f -s libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) \ - libpng.3.$(SHAREDLIB_POSTFIX); \ - ln -f -s libpng.3.$(SHAREDLIB_POSTFIX) libpng.$(SHAREDLIB_POSTFIX); \ - ln -f -s $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \ - libpng.$(SHAREDLIB_POSTFIX); \ - ln -f -s libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) \ - libpng.3.$(SHAREDLIB_POSTFIX); \ - ln -f -s $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \ - $(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX); \ - ln -f -s $(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX) \ - $(LIBNAME).$(SHAREDLIB_POSTFIX)) - -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then mkdir $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi - -@/bin/rm -f $(DM)/man3/libpng.3 - -@/bin/rm -f $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi - -@/bin/rm -f $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then mkdir $(DB); fi - -@/bin/rm -f $(DB)/libpng-config - -@/bin/rm -f $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. - -test-installed: - $(CC) $(CFLAGS) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ - -L$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/libpng12-config --ldflags` - ./pngtesti pngtest.png - -clean: - rm -f *.o libpng.a pngtest pngout.png libpng-config \ - $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \ - $(LIBNAME).$(SHAREDLIB_POSTFIX) \ - libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) \ - libpng.pc - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtest.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h -pngpread.o: png.h pngconf.h - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/png.5 b/gtkmm-osx/trunk/libpng-1.2.5/png.5 deleted file mode 100644 index 11ab244..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/png.5 +++ /dev/null @@ -1,60 +0,0 @@ -.TH PNG 5 "October 3, 2002" -.SH NAME -png \- Portable Network Graphics (PNG) format -.SH DESCRIPTION -PNG (Portable Network Graphics) is an extensible file format for the -lossless, portable, well-compressed storage of raster images. PNG provides -a patent-free replacement for GIF and can also replace many -common uses of TIFF. Indexed-color, grayscale, and truecolor images are -supported, plus an optional alpha channel. Sample depths range from -1 to 16 bits. -.br - -PNG is designed to work well in online viewing applications, such as the -World Wide Web, so it is fully streamable with a progressive display -option. PNG is robust, providing both full file integrity checking and -fast, simple detection of common transmission errors. Also, PNG can store -gamma and chromaticity data for improved color matching on heterogeneous -platforms. - -.SH "SEE ALSO" -.IR libpng(3), zlib(3), deflate(5), and zlib(5) -.LP -PNG 1.2 specification, July 1999: -.IP -.br -http://www.libpng.org/pub/png -.br -or ftp://ftp.uu.net/graphics/png/documents -.LP -PNG 1.0 specification, October 1996: -.IP -.br -RFC 2083 -.IP -.br -ftp://ds.internic.net/rfc/rfc2083.txt -.br -or (as a W3C Recommendation) at -.br -http://www.w3.org/TR/REC-png.html -.SH AUTHORS -This man page: Glenn Randers-Pehrson -.LP -Portable Network Graphics (PNG) Specification Version 1.2 (July 8, 1999): -Glenn Randers-Pehrson and others (png-list@ccrc.wustl.edu). -.LP -Portable Network Graphics (PNG) Specification Version 1.0 (October 1, 1996): -Thomas Boutell and others (png-list@ccrc.wustl.edu). -.LP - - -.SH COPYRIGHT NOTICE -The PNG-1.2 specification is copyright (c) 1999 Glenn Randers-Pehrson. -See the specification for conditions of use and distribution. -.LP -The PNG-1.0 specification is copyright (c) 1996 Massachusetts Institute of -Technology. See the specification for conditions of use and distribution. -.LP -.\" end of man page - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/png.c b/gtkmm-osx/trunk/libpng-1.2.5/png.c deleted file mode 100644 index 2a55ccb..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/png.c +++ /dev/null @@ -1,805 +0,0 @@ - -/* png.c - location for general purpose libpng functions - * - * libpng version 1.2.5 - October 3, 2002 - * Copyright (c) 1998-2002 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) - * - */ - -#define PNG_INTERNAL -#define PNG_NO_EXTERN -#include "png.h" - -/* Generate a compiler error if there is an old png.h in the search path. */ -typedef version_1_2_5 Your_png_h_is_not_version_1_2_5; - -/* Version information for C files. This had better match the version - * string defined in png.h. */ - -#ifdef PNG_USE_GLOBAL_ARRAYS -/* png_libpng_ver was changed to a function in version 1.0.5c */ -const char png_libpng_ver[18] = "1.2.5"; - -/* png_sig was changed to a function in version 1.0.5c */ -/* Place to hold the signature string for a PNG file. */ -const png_byte FARDATA png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10}; - -/* Invoke global declarations for constant strings for known chunk types */ -PNG_IHDR; -PNG_IDAT; -PNG_IEND; -PNG_PLTE; -PNG_bKGD; -PNG_cHRM; -PNG_gAMA; -PNG_hIST; -PNG_iCCP; -PNG_iTXt; -PNG_oFFs; -PNG_pCAL; -PNG_sCAL; -PNG_pHYs; -PNG_sBIT; -PNG_sPLT; -PNG_sRGB; -PNG_tEXt; -PNG_tIME; -PNG_tRNS; -PNG_zTXt; - -/* arrays to facilitate easy interlacing - use pass (0 - 6) as index */ - -/* start of interlace block */ -const int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; - -/* offset to next interlace block */ -const int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; - -/* start of interlace block in the y direction */ -const int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1}; - -/* offset to next interlace block in the y direction */ -const int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2}; - -/* width of interlace block (used in assembler routines only) */ -#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW -const int FARDATA png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; -#endif - -/* Height of interlace block. This is not currently used - if you need - * it, uncomment it here and in png.h -const int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1}; -*/ - -/* Mask to determine which pixels are valid in a pass */ -const int FARDATA png_pass_mask[] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff}; - -/* Mask to determine which pixels to overwrite while displaying */ -const int FARDATA png_pass_dsp_mask[] - = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff}; - -#endif - -/* Tells libpng that we have already handled the first "num_bytes" bytes - * of the PNG file signature. If the PNG data is embedded into another - * stream we can set num_bytes = 8 so that libpng will not attempt to read - * or write any of the magic bytes before it starts on the IHDR. - */ - -void PNGAPI -png_set_sig_bytes(png_structp png_ptr, int num_bytes) -{ - png_debug(1, "in png_set_sig_bytes\n"); - if (num_bytes > 8) - png_error(png_ptr, "Too many bytes for PNG signature."); - - png_ptr->sig_bytes = (png_byte)(num_bytes < 0 ? 0 : num_bytes); -} - -/* Checks whether the supplied bytes match the PNG signature. We allow - * checking less than the full 8-byte signature so that those apps that - * already read the first few bytes of a file to determine the file type - * can simply check the remaining bytes for extra assurance. Returns - * an integer less than, equal to, or greater than zero if sig is found, - * respectively, to be less than, to match, or be greater than the correct - * PNG signature (this is the same behaviour as strcmp, memcmp, etc). - */ -int PNGAPI -png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check) -{ - png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10}; - if (num_to_check > 8) - num_to_check = 8; - else if (num_to_check < 1) - return (0); - - if (start > 7) - return (0); - - if (start + num_to_check > 8) - num_to_check = 8 - start; - - return ((int)(png_memcmp(&sig[start], &png_signature[start], num_to_check))); -} - -/* (Obsolete) function to check signature bytes. It does not allow one - * to check a partial signature. This function might be removed in the - * future - use png_sig_cmp(). Returns true (nonzero) if the file is a PNG. - */ -int PNGAPI -png_check_sig(png_bytep sig, int num) -{ - return ((int)!png_sig_cmp(sig, (png_size_t)0, (png_size_t)num)); -} - -/* Function to allocate memory for zlib and clear it to 0. */ -#ifdef PNG_1_0_X -voidpf PNGAPI -#else -voidpf /* private */ -#endif -png_zalloc(voidpf png_ptr, uInt items, uInt size) -{ - png_uint_32 num_bytes = (png_uint_32)items * size; - png_voidp ptr; - png_structp p=png_ptr; - png_uint_32 save_flags=p->flags; - - p->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK; - ptr = (png_voidp)png_malloc((png_structp)png_ptr, num_bytes); - p->flags=save_flags; - -#ifndef PNG_NO_ZALLOC_ZERO - if (ptr == NULL) - return ((voidpf)ptr); - - if (num_bytes > (png_uint_32)0x8000L) - { - png_memset(ptr, 0, (png_size_t)0x8000L); - png_memset((png_bytep)ptr + (png_size_t)0x8000L, 0, - (png_size_t)(num_bytes - (png_uint_32)0x8000L)); - } - else - { - png_memset(ptr, 0, (png_size_t)num_bytes); - } -#endif - return ((voidpf)ptr); -} - -/* function to free memory for zlib */ -#ifdef PNG_1_0_X -void PNGAPI -#else -void /* private */ -#endif -png_zfree(voidpf png_ptr, voidpf ptr) -{ - png_free((png_structp)png_ptr, (png_voidp)ptr); -} - -/* Reset the CRC variable to 32 bits of 1's. Care must be taken - * in case CRC is > 32 bits to leave the top bits 0. - */ -void /* PRIVATE */ -png_reset_crc(png_structp png_ptr) -{ - png_ptr->crc = crc32(0, Z_NULL, 0); -} - -/* Calculate the CRC over a section of data. We can only pass as - * much data to this routine as the largest single buffer size. We - * also check that this data will actually be used before going to the - * trouble of calculating it. - */ -void /* PRIVATE */ -png_calculate_crc(png_structp png_ptr, png_bytep ptr, png_size_t length) -{ - int need_crc = 1; - - if (png_ptr->chunk_name[0] & 0x20) /* ancillary */ - { - if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_MASK) == - (PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN)) - need_crc = 0; - } - else /* critical */ - { - if (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE) - need_crc = 0; - } - - if (need_crc) - png_ptr->crc = crc32(png_ptr->crc, ptr, (uInt)length); -} - -/* Allocate the memory for an info_struct for the application. We don't - * really need the png_ptr, but it could potentially be useful in the - * future. This should be used in favour of malloc(sizeof(png_info)) - * and png_info_init() so that applications that want to use a shared - * libpng don't have to be recompiled if png_info changes size. - */ -png_infop PNGAPI -png_create_info_struct(png_structp png_ptr) -{ - png_infop info_ptr; - - png_debug(1, "in png_create_info_struct\n"); - if(png_ptr == NULL) return (NULL); -#ifdef PNG_USER_MEM_SUPPORTED - info_ptr = (png_infop)png_create_struct_2(PNG_STRUCT_INFO, - png_ptr->malloc_fn, png_ptr->mem_ptr); -#else - info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO); -#endif - if (info_ptr != NULL) - png_info_init_3(&info_ptr, sizeof(png_info)); - - return (info_ptr); -} - -/* This function frees the memory associated with a single info struct. - * Normally, one would use either png_destroy_read_struct() or - * png_destroy_write_struct() to free an info struct, but this may be - * useful for some applications. - */ -void PNGAPI -png_destroy_info_struct(png_structp png_ptr, png_infopp info_ptr_ptr) -{ - png_infop info_ptr = NULL; - - png_debug(1, "in png_destroy_info_struct\n"); - if (info_ptr_ptr != NULL) - info_ptr = *info_ptr_ptr; - - if (info_ptr != NULL) - { - png_info_destroy(png_ptr, info_ptr); - -#ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2((png_voidp)info_ptr, png_ptr->free_fn, - png_ptr->mem_ptr); -#else - png_destroy_struct((png_voidp)info_ptr); -#endif - *info_ptr_ptr = NULL; - } -} - -/* Initialize the info structure. This is now an internal function (0.89) - * and applications using it are urged to use png_create_info_struct() - * instead. - */ -#undef png_info_init -void PNGAPI -png_info_init(png_infop info_ptr) -{ - /* We only come here via pre-1.0.12-compiled applications */ - png_info_init_3(&info_ptr, 0); -} - -void PNGAPI -png_info_init_3(png_infopp ptr_ptr, png_size_t png_info_struct_size) -{ - png_infop info_ptr = *ptr_ptr; - - png_debug(1, "in png_info_init_3\n"); - - if(sizeof(png_info) > png_info_struct_size) - { - png_destroy_struct(info_ptr); - info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO); - *ptr_ptr = info_ptr; - } - - /* set everything to 0 */ - png_memset(info_ptr, 0, sizeof (png_info)); -} - -#ifdef PNG_FREE_ME_SUPPORTED -void PNGAPI -png_data_freer(png_structp png_ptr, png_infop info_ptr, - int freer, png_uint_32 mask) -{ - png_debug(1, "in png_data_freer\n"); - if (png_ptr == NULL || info_ptr == NULL) - return; - if(freer == PNG_DESTROY_WILL_FREE_DATA) - info_ptr->free_me |= mask; - else if(freer == PNG_USER_WILL_FREE_DATA) - info_ptr->free_me &= ~mask; - else - png_warning(png_ptr, - "Unknown freer parameter in png_data_freer."); -} -#endif - -void PNGAPI -png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, - int num) -{ - png_debug(1, "in png_free_data\n"); - if (png_ptr == NULL || info_ptr == NULL) - return; - -#if defined(PNG_TEXT_SUPPORTED) -/* free text item num or (if num == -1) all text items */ -#ifdef PNG_FREE_ME_SUPPORTED -if ((mask & PNG_FREE_TEXT) & info_ptr->free_me) -#else -if (mask & PNG_FREE_TEXT) -#endif -{ - if (num != -1) - { - if (info_ptr->text && info_ptr->text[num].key) - { - png_free(png_ptr, info_ptr->text[num].key); - info_ptr->text[num].key = NULL; - } - } - else - { - int i; - for (i = 0; i < info_ptr->num_text; i++) - png_free_data(png_ptr, info_ptr, PNG_FREE_TEXT, i); - png_free(png_ptr, info_ptr->text); - info_ptr->text = NULL; - info_ptr->num_text=0; - } -} -#endif - -#if defined(PNG_tRNS_SUPPORTED) -/* free any tRNS entry */ -#ifdef PNG_FREE_ME_SUPPORTED -if ((mask & PNG_FREE_TRNS) & info_ptr->free_me) -#else -if ((mask & PNG_FREE_TRNS) && (png_ptr->flags & PNG_FLAG_FREE_TRNS)) -#endif -{ - png_free(png_ptr, info_ptr->trans); - info_ptr->valid &= ~PNG_INFO_tRNS; -#ifndef PNG_FREE_ME_SUPPORTED - png_ptr->flags &= ~PNG_FLAG_FREE_TRNS; -#endif - info_ptr->trans = NULL; -} -#endif - -#if defined(PNG_sCAL_SUPPORTED) -/* free any sCAL entry */ -#ifdef PNG_FREE_ME_SUPPORTED -if ((mask & PNG_FREE_SCAL) & info_ptr->free_me) -#else -if (mask & PNG_FREE_SCAL) -#endif -{ -#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED) - png_free(png_ptr, info_ptr->scal_s_width); - png_free(png_ptr, info_ptr->scal_s_height); - info_ptr->scal_s_width = NULL; - info_ptr->scal_s_height = NULL; -#endif - info_ptr->valid &= ~PNG_INFO_sCAL; -} -#endif - -#if defined(PNG_pCAL_SUPPORTED) -/* free any pCAL entry */ -#ifdef PNG_FREE_ME_SUPPORTED -if ((mask & PNG_FREE_PCAL) & info_ptr->free_me) -#else -if (mask & PNG_FREE_PCAL) -#endif -{ - png_free(png_ptr, info_ptr->pcal_purpose); - png_free(png_ptr, info_ptr->pcal_units); - info_ptr->pcal_purpose = NULL; - info_ptr->pcal_units = NULL; - if (info_ptr->pcal_params != NULL) - { - int i; - for (i = 0; i < (int)info_ptr->pcal_nparams; i++) - { - png_free(png_ptr, info_ptr->pcal_params[i]); - info_ptr->pcal_params[i]=NULL; - } - png_free(png_ptr, info_ptr->pcal_params); - info_ptr->pcal_params = NULL; - } - info_ptr->valid &= ~PNG_INFO_pCAL; -} -#endif - -#if defined(PNG_iCCP_SUPPORTED) -/* free any iCCP entry */ -#ifdef PNG_FREE_ME_SUPPORTED -if ((mask & PNG_FREE_ICCP) & info_ptr->free_me) -#else -if (mask & PNG_FREE_ICCP) -#endif -{ - png_free(png_ptr, info_ptr->iccp_name); - png_free(png_ptr, info_ptr->iccp_profile); - info_ptr->iccp_name = NULL; - info_ptr->iccp_profile = NULL; - info_ptr->valid &= ~PNG_INFO_iCCP; -} -#endif - -#if defined(PNG_sPLT_SUPPORTED) -/* free a given sPLT entry, or (if num == -1) all sPLT entries */ -#ifdef PNG_FREE_ME_SUPPORTED -if ((mask & PNG_FREE_SPLT) & info_ptr->free_me) -#else -if (mask & PNG_FREE_SPLT) -#endif -{ - if (num != -1) - { - if(info_ptr->splt_palettes) - { - png_free(png_ptr, info_ptr->splt_palettes[num].name); - png_free(png_ptr, info_ptr->splt_palettes[num].entries); - info_ptr->splt_palettes[num].name = NULL; - info_ptr->splt_palettes[num].entries = NULL; - } - } - else - { - if(info_ptr->splt_palettes_num) - { - int i; - for (i = 0; i < (int)info_ptr->splt_palettes_num; i++) - png_free_data(png_ptr, info_ptr, PNG_FREE_SPLT, i); - - png_free(png_ptr, info_ptr->splt_palettes); - info_ptr->splt_palettes = NULL; - info_ptr->splt_palettes_num = 0; - } - info_ptr->valid &= ~PNG_INFO_sPLT; - } -} -#endif - -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) -#ifdef PNG_FREE_ME_SUPPORTED -if ((mask & PNG_FREE_UNKN) & info_ptr->free_me) -#else -if (mask & PNG_FREE_UNKN) -#endif -{ - if (num != -1) - { - if(info_ptr->unknown_chunks) - { - png_free(png_ptr, info_ptr->unknown_chunks[num].data); - info_ptr->unknown_chunks[num].data = NULL; - } - } - else - { - int i; - - if(info_ptr->unknown_chunks_num) - { - for (i = 0; i < (int)info_ptr->unknown_chunks_num; i++) - png_free_data(png_ptr, info_ptr, PNG_FREE_UNKN, i); - - png_free(png_ptr, info_ptr->unknown_chunks); - info_ptr->unknown_chunks = NULL; - info_ptr->unknown_chunks_num = 0; - } - } -} -#endif - -#if defined(PNG_hIST_SUPPORTED) -/* free any hIST entry */ -#ifdef PNG_FREE_ME_SUPPORTED -if ((mask & PNG_FREE_HIST) & info_ptr->free_me) -#else -if ((mask & PNG_FREE_HIST) && (png_ptr->flags & PNG_FLAG_FREE_HIST)) -#endif -{ - png_free(png_ptr, info_ptr->hist); - info_ptr->hist = NULL; - info_ptr->valid &= ~PNG_INFO_hIST; -#ifndef PNG_FREE_ME_SUPPORTED - png_ptr->flags &= ~PNG_FLAG_FREE_HIST; -#endif -} -#endif - -/* free any PLTE entry that was internally allocated */ -#ifdef PNG_FREE_ME_SUPPORTED -if ((mask & PNG_FREE_PLTE) & info_ptr->free_me) -#else -if ((mask & PNG_FREE_PLTE) && (png_ptr->flags & PNG_FLAG_FREE_PLTE)) -#endif -{ - png_zfree(png_ptr, info_ptr->palette); - info_ptr->palette = NULL; - info_ptr->valid &= ~PNG_INFO_PLTE; -#ifndef PNG_FREE_ME_SUPPORTED - png_ptr->flags &= ~PNG_FLAG_FREE_PLTE; -#endif - info_ptr->num_palette = 0; -} - -#if defined(PNG_INFO_IMAGE_SUPPORTED) -/* free any image bits attached to the info structure */ -#ifdef PNG_FREE_ME_SUPPORTED -if ((mask & PNG_FREE_ROWS) & info_ptr->free_me) -#else -if (mask & PNG_FREE_ROWS) -#endif -{ - if(info_ptr->row_pointers) - { - int row; - for (row = 0; row < (int)info_ptr->height; row++) - { - png_free(png_ptr, info_ptr->row_pointers[row]); - info_ptr->row_pointers[row]=NULL; - } - png_free(png_ptr, info_ptr->row_pointers); - info_ptr->row_pointers=NULL; - } - info_ptr->valid &= ~PNG_INFO_IDAT; -} -#endif - -#ifdef PNG_FREE_ME_SUPPORTED - if(num == -1) - info_ptr->free_me &= ~mask; - else - info_ptr->free_me &= ~(mask & ~PNG_FREE_MUL); -#endif -} - -/* This is an internal routine to free any memory that the info struct is - * pointing to before re-using it or freeing the struct itself. Recall - * that png_free() checks for NULL pointers for us. - */ -void /* PRIVATE */ -png_info_destroy(png_structp png_ptr, png_infop info_ptr) -{ - png_debug(1, "in png_info_destroy\n"); - - png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1); - -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) - if (png_ptr->num_chunk_list) - { - png_free(png_ptr, png_ptr->chunk_list); - png_ptr->chunk_list=NULL; - png_ptr->num_chunk_list=0; - } -#endif - - png_info_init_3(&info_ptr, sizeof(png_info)); -} - -/* This function returns a pointer to the io_ptr associated with the user - * functions. The application should free any memory associated with this - * pointer before png_write_destroy() or png_read_destroy() are called. - */ -png_voidp PNGAPI -png_get_io_ptr(png_structp png_ptr) -{ - return (png_ptr->io_ptr); -} - -#if !defined(PNG_NO_STDIO) -/* Initialize the default input/output functions for the PNG file. If you - * use your own read or write routines, you can call either png_set_read_fn() - * or png_set_write_fn() instead of png_init_io(). If you have defined - * PNG_NO_STDIO, you must use a function of your own because "FILE *" isn't - * necessarily available. - */ -void PNGAPI -png_init_io(png_structp png_ptr, png_FILE_p fp) -{ - png_debug(1, "in png_init_io\n"); - png_ptr->io_ptr = (png_voidp)fp; -} -#endif - -#if defined(PNG_TIME_RFC1123_SUPPORTED) -/* Convert the supplied time into an RFC 1123 string suitable for use in - * a "Creation Time" or other text-based time string. - */ -png_charp PNGAPI -png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime) -{ - static PNG_CONST char short_months[12][4] = - {"Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; - - if (png_ptr->time_buffer == NULL) - { - png_ptr->time_buffer = (png_charp)png_malloc(png_ptr, (png_uint_32)(29* - sizeof(char))); - } - -#if defined(_WIN32_WCE) - { - wchar_t time_buf[29]; - wsprintf(time_buf, TEXT("%d %S %d %02d:%02d:%02d +0000"), - ptime->day % 32, short_months[(ptime->month - 1) % 12], - ptime->year, ptime->hour % 24, ptime->minute % 60, - ptime->second % 61); - WideCharToMultiByte(CP_ACP, 0, time_buf, -1, png_ptr->time_buffer, 29, - NULL, NULL); - } -#else -#ifdef USE_FAR_KEYWORD - { - char near_time_buf[29]; - sprintf(near_time_buf, "%d %s %d %02d:%02d:%02d +0000", - ptime->day % 32, short_months[(ptime->month - 1) % 12], - ptime->year, ptime->hour % 24, ptime->minute % 60, - ptime->second % 61); - png_memcpy(png_ptr->time_buffer, near_time_buf, - 29*sizeof(char)); - } -#else - sprintf(png_ptr->time_buffer, "%d %s %d %02d:%02d:%02d +0000", - ptime->day % 32, short_months[(ptime->month - 1) % 12], - ptime->year, ptime->hour % 24, ptime->minute % 60, - ptime->second % 61); -#endif -#endif /* _WIN32_WCE */ - return ((png_charp)png_ptr->time_buffer); -} -#endif /* PNG_TIME_RFC1123_SUPPORTED */ - -#if 0 -/* Signature string for a PNG file. */ -png_bytep PNGAPI -png_sig_bytes(void) -{ - return ((png_bytep)"\211\120\116\107\015\012\032\012"); -} -#endif - -png_charp PNGAPI -png_get_copyright(png_structp png_ptr) -{ - if (png_ptr != NULL || png_ptr == NULL) /* silence compiler warning */ - return ((png_charp) "\n libpng version 1.2.5 - October 3, 2002\n\ - Copyright (c) 1998-2002 Glenn Randers-Pehrson\n\ - Copyright (c) 1996-1997 Andreas Dilger\n\ - Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n"); - return ((png_charp) ""); -} - -/* The following return the library version as a short string in the - * format 1.0.0 through 99.99.99zz. To get the version of *.h files used - * with your application, print out PNG_LIBPNG_VER_STRING, which is defined - * in png.h. - */ - -png_charp PNGAPI -png_get_libpng_ver(png_structp png_ptr) -{ - /* Version of *.c files used when building libpng */ - if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */ - return((png_charp) "1.2.5"); - return((png_charp) "1.2.5"); -} - -png_charp PNGAPI -png_get_header_ver(png_structp png_ptr) -{ - /* Version of *.h files used when building libpng */ - if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */ - return((png_charp) PNG_LIBPNG_VER_STRING); - return((png_charp) PNG_LIBPNG_VER_STRING); -} - -png_charp PNGAPI -png_get_header_version(png_structp png_ptr) -{ - /* Returns longer string containing both version and date */ - if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */ - return((png_charp) PNG_HEADER_VERSION_STRING); - return((png_charp) PNG_HEADER_VERSION_STRING); -} - -#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED -int PNGAPI -png_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name) -{ - /* check chunk_name and return "keep" value if it's on the list, else 0 */ - int i; - png_bytep p; - if((png_ptr == NULL && chunk_name == NULL) || png_ptr->num_chunk_list<=0) - return 0; - p=png_ptr->chunk_list+png_ptr->num_chunk_list*5-5; - for (i = png_ptr->num_chunk_list; i; i--, p-=5) - if (!png_memcmp(chunk_name, p, 4)) - return ((int)*(p+4)); - return 0; -} -#endif - -/* This function, added to libpng-1.0.6g, is untested. */ -int PNGAPI -png_reset_zstream(png_structp png_ptr) -{ - return (inflateReset(&png_ptr->zstream)); -} - -/* This function was added to libpng-1.0.7 */ -png_uint_32 PNGAPI -png_access_version_number(void) -{ - /* Version of *.c files used when building libpng */ - return((png_uint_32) 10205L); -} - - -#if !defined(PNG_1_0_X) -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) - /* GRR: could add this: && defined(PNG_MMX_CODE_SUPPORTED) */ -/* this INTERNAL function was added to libpng 1.2.0 */ -void /* PRIVATE */ -png_init_mmx_flags (png_structp png_ptr) -{ - png_ptr->mmx_rowbytes_threshold = 0; - png_ptr->mmx_bitdepth_threshold = 0; - -# if (defined(PNG_USE_PNGVCRD) || defined(PNG_USE_PNGGCCRD)) - - png_ptr->asm_flags |= PNG_ASM_FLAG_MMX_SUPPORT_COMPILED; - - if (png_mmx_support() > 0) { - png_ptr->asm_flags |= PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU -# ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW - | PNG_ASM_FLAG_MMX_READ_COMBINE_ROW -# endif -# ifdef PNG_HAVE_ASSEMBLER_READ_INTERLACE - | PNG_ASM_FLAG_MMX_READ_INTERLACE -# endif -# ifndef PNG_HAVE_ASSEMBLER_READ_FILTER_ROW - ; -# else - | PNG_ASM_FLAG_MMX_READ_FILTER_SUB - | PNG_ASM_FLAG_MMX_READ_FILTER_UP - | PNG_ASM_FLAG_MMX_READ_FILTER_AVG - | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ; - - png_ptr->mmx_rowbytes_threshold = PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT; - png_ptr->mmx_bitdepth_threshold = PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT; -# endif - } else { - png_ptr->asm_flags &= ~( PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU - | PNG_MMX_READ_FLAGS - | PNG_MMX_WRITE_FLAGS ); - } - -# else /* !((PNGVCRD || PNGGCCRD) && PNG_ASSEMBLER_CODE_SUPPORTED)) */ - - /* clear all MMX flags; no support is compiled in */ - png_ptr->asm_flags &= ~( PNG_MMX_FLAGS ); - -# endif /* ?(PNGVCRD || PNGGCCRD) */ -} - -#endif /* !(PNG_ASSEMBLER_CODE_SUPPORTED) */ - -/* this function was added to libpng 1.2.0 */ -#if !defined(PNG_USE_PNGGCCRD) && \ - !(defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_USE_PNGVCRD)) -int PNGAPI -png_mmx_support(void) -{ - return -1; -} -#endif -#endif /* PNG_1_0_X */ diff --git a/gtkmm-osx/trunk/libpng-1.2.5/png.h b/gtkmm-osx/trunk/libpng-1.2.5/png.h deleted file mode 100644 index f059910..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/png.h +++ /dev/null @@ -1,3283 +0,0 @@ -/* png.h - header file for PNG reference library - * - * libpng version 1.2.5 - October 3, 2002 - * Copyright (c) 1998-2002 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) - * - * Authors and maintainers: - * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat - * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger - * libpng versions 0.97, January 1998, through 1.2.5 - October 3, 2002: Glenn - * See also "Contributing Authors", below. - * - * Note about libpng version numbers: - * - * Due to various miscommunications, unforeseen code incompatibilities - * and occasional factors outside the authors' control, version numbering - * on the library has not always been consistent and straightforward. - * The following table summarizes matters since version 0.89c, which was - * the first widely used release: - * - * source png.h png.h shared-lib - * version string int version - * ------- ------ ----- ---------- - * 0.89c "1.0 beta 3" 0.89 89 1.0.89 - * 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90] - * 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95] - * 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96] - * 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97] - * 0.97c 0.97 97 2.0.97 - * 0.98 0.98 98 2.0.98 - * 0.99 0.99 98 2.0.99 - * 0.99a-m 0.99 99 2.0.99 - * 1.00 1.00 100 2.1.0 [100 should be 10000] - * 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000] - * 1.0.1 png.h string is 10001 2.1.0 - * 1.0.1a-e identical to the 10002 from here on, the shared library - * 1.0.2 source version) 10002 is 2.V where V is the source code - * 1.0.2a-b 10003 version, except as noted. - * 1.0.3 10003 - * 1.0.3a-d 10004 - * 1.0.4 10004 - * 1.0.4a-f 10005 - * 1.0.5 (+ 2 patches) 10005 - * 1.0.5a-d 10006 - * 1.0.5e-r 10100 (not source compatible) - * 1.0.5s-v 10006 (not binary compatible) - * 1.0.6 (+ 3 patches) 10006 (still binary incompatible) - * 1.0.6d-f 10007 (still binary incompatible) - * 1.0.6g 10007 - * 1.0.6h 10007 10.6h (testing xy.z so-numbering) - * 1.0.6i 10007 10.6i - * 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0) - * 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible) - * 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible) - * 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible) - * 1.0.7 1 10007 (still compatible) - * 1.0.8beta1-4 1 10008 2.1.0.8beta1-4 - * 1.0.8rc1 1 10008 2.1.0.8rc1 - * 1.0.8 1 10008 2.1.0.8 - * 1.0.9beta1-6 1 10009 2.1.0.9beta1-6 - * 1.0.9rc1 1 10009 2.1.0.9rc1 - * 1.0.9beta7-10 1 10009 2.1.0.9beta7-10 - * 1.0.9rc2 1 10009 2.1.0.9rc2 - * 1.0.9 1 10009 2.1.0.9 - * 1.0.10beta1 1 10010 2.1.0.10beta1 - * 1.0.10rc1 1 10010 2.1.0.10rc1 - * 1.0.10 1 10010 2.1.0.10 - * 1.0.11beta1-3 1 10011 2.1.0.11beta1-3 - * 1.0.11rc1 1 10011 2.1.0.11rc1 - * 1.0.11 1 10011 2.1.0.11 - * 1.0.12beta1-2 2 10012 2.1.0.12beta1-2 - * 1.0.12rc1 2 10012 2.1.0.12rc1 - * 1.0.12 2 10012 2.1.0.12 - * 1.1.0a-f - 10100 2.1.1.0a-f (branch abandoned) - * 1.2.0beta1-2 2 10200 2.1.2.0beta1-2 - * 1.2.0beta3-5 3 10200 3.1.2.0beta3-5 - * 1.2.0rc1 3 10200 3.1.2.0rc1 - * 1.2.0 3 10200 3.1.2.0 - * 1.2.1beta1-4 3 10201 3.1.2.1beta1-4 - * 1.2.1rc1-2 3 10201 3.1.2.1rc1-2 - * 1.2.1 3 10201 3.1.2.1 - * 1.2.2beta1-6 12 10202 12.so.0.1.2.2beta1-6 - * 1.0.13beta1 10 10013 10.so.0.1.0.13beta1 - * 1.0.13rc1 10 10013 10.so.0.1.0.13rc1 - * 1.2.2rc1 12 10202 12.so.0.1.2.2rc1 - * 1.0.13 10 10013 10.so.0.1.0.13 - * 1.2.2 12 10202 12.so.0.1.2.2 - * 1.2.3rc1-6 12 10203 12.so.0.1.2.3rc1-6 - * 1.2.3 12 10203 12.so.0.1.2.3 - * 1.2.4beta1-3 13 10204 12.so.0.1.2.4beta1-3 - * 1.0.14rc1 13 10014 10.so.0.1.0.14rc1 - * 1.2.4rc1 13 10204 12.so.0.1.2.4rc1 - * 1.0.14 10 10014 10.so.0.1.0.14 - * 1.2.4 13 10204 12.so.0.1.2.4 - * 1.2.5beta1-2 13 10205 12.so.0.1.2.5beta1-2 - * 1.0.15rc1-3 10 10015 10.so.0.1.0.15rc1-3 - * 1.2.5rc1-3 13 10205 12.so.0.1.2.5rc1-3 - * 1.0.15 10 10015 10.so.0.1.0.15 - * 1.2.5 13 10205 12.so.0.1.2.5 - * - * Henceforth the source version will match the shared-library major - * and minor numbers; the shared-library major version number will be - * used for changes in backward compatibility, as it is intended. The - * PNG_LIBPNG_VER macro, which is not used within libpng but is available - * for applications, is an unsigned integer of the form xyyzz corresponding - * to the source version x.y.z (leading zeros in y and z). Beta versions - * were given the previous public release number plus a letter, until - * version 1.0.6j; from then on they were given the upcoming public - * release number plus "betaNN" or "rcN". - * - * Binary incompatibility exists only when applications make direct access - * to the info_ptr or png_ptr members through png.h, and the compiled - * application is loaded with a different version of the library. - * - * DLLNUM will change each time there are forward or backward changes - * in binary compatibility (e.g., when a new feature is added). - * - * See libpng.txt or libpng.3 for more information. The PNG specification - * is available as RFC 2083 - * and as a W3C Recommendation - */ - -/* - * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: - * - * If you modify libpng you may insert additional notices immediately following - * this sentence. - * - * libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are - * Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are - * distributed according to the same disclaimer and license as libpng-1.0.6 - * with the following individuals added to the list of Contributing Authors - * - * Simon-Pierre Cadieux - * Eric S. Raymond - * Gilles Vollant - * - * and with the following additions to the disclaimer: - * - * There is no warranty against interference with your enjoyment of the - * library or against infringement. There is no warranty that our - * efforts or the library will fulfill any of your particular purposes - * or needs. This library is provided with all faults, and the entire - * risk of satisfactory quality, performance, accuracy, and effort is with - * the user. - * - * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are - * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson - * Distributed according to the same disclaimer and license as libpng-0.96, - * with the following individuals added to the list of Contributing Authors: - * - * Tom Lane - * Glenn Randers-Pehrson - * Willem van Schaik - * - * libpng versions 0.89, June 1996, through 0.96, May 1997, are - * Copyright (c) 1996, 1997 Andreas Dilger - * Distributed according to the same disclaimer and license as libpng-0.88, - * with the following individuals added to the list of Contributing Authors: - * - * John Bowler - * Kevin Bracey - * Sam Bushell - * Magnus Holmgren - * Greg Roelofs - * Tom Tanner - * - * libpng versions 0.5, May 1995, through 0.88, January 1996, are - * Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - * - * For the purposes of this copyright and license, "Contributing Authors" - * is defined as the following set of individuals: - * - * Andreas Dilger - * Dave Martindale - * Guy Eric Schalnat - * Paul Schmidt - * Tim Wegner - * - * The PNG Reference Library is supplied "AS IS". The Contributing Authors - * and Group 42, Inc. disclaim all warranties, expressed or implied, - * including, without limitation, the warranties of merchantability and of - * fitness for any purpose. The Contributing Authors and Group 42, Inc. - * assume no liability for direct, indirect, incidental, special, exemplary, - * or consequential damages, which may result from the use of the PNG - * Reference Library, even if advised of the possibility of such damage. - * - * Permission is hereby granted to use, copy, modify, and distribute this - * source code, or portions hereof, for any purpose, without fee, subject - * to the following restrictions: - * - * 1. The origin of this source code must not be misrepresented. - * - * 2. Altered versions must be plainly marked as such and - * must not be misrepresented as being the original source. - * - * 3. This Copyright notice may not be removed or altered from - * any source or altered source distribution. - * - * The Contributing Authors and Group 42, Inc. specifically permit, without - * fee, and encourage the use of this source code as a component to - * supporting the PNG file format in commercial products. If you use this - * source code in a product, acknowledgment is not required but would be - * appreciated. - */ - -/* - * A "png_get_copyright" function is available, for convenient use in "about" - * boxes and the like: - * - * printf("%s",png_get_copyright(NULL)); - * - * Also, the PNG logo (in PNG format, of course) is supplied in the - * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). - */ - -/* - * Libpng is OSI Certified Open Source Software. OSI Certified is a - * certification mark of the Open Source Initiative. - */ - -/* - * The contributing authors would like to thank all those who helped - * with testing, bug fixes, and patience. This wouldn't have been - * possible without all of you. - * - * Thanks to Frank J. T. Wojcik for helping with the documentation. - */ - -/* - * Y2K compliance in libpng: - * ========================= - * - * October 3, 2002 - * - * Since the PNG Development group is an ad-hoc body, we can't make - * an official declaration. - * - * This is your unofficial assurance that libpng from version 0.71 and - * upward through 1.2.5 are Y2K compliant. It is my belief that earlier - * versions were also Y2K compliant. - * - * Libpng only has three year fields. One is a 2-byte unsigned integer - * that will hold years up to 65535. The other two hold the date in text - * format, and will hold years up to 9999. - * - * The integer is - * "png_uint_16 year" in png_time_struct. - * - * The strings are - * "png_charp time_buffer" in png_struct and - * "near_time_buffer", which is a local character string in png.c. - * - * There are seven time-related functions: - * png.c: png_convert_to_rfc_1123() in png.c - * (formerly png_convert_to_rfc_1152() in error) - * png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c - * png_convert_from_time_t() in pngwrite.c - * png_get_tIME() in pngget.c - * png_handle_tIME() in pngrutil.c, called in pngread.c - * png_set_tIME() in pngset.c - * png_write_tIME() in pngwutil.c, called in pngwrite.c - * - * All handle dates properly in a Y2K environment. The - * png_convert_from_time_t() function calls gmtime() to convert from system - * clock time, which returns (year - 1900), which we properly convert to - * the full 4-digit year. There is a possibility that applications using - * libpng are not passing 4-digit years into the png_convert_to_rfc_1123() - * function, or that they are incorrectly passing only a 2-digit year - * instead of "year - 1900" into the png_convert_from_struct_tm() function, - * but this is not under our control. The libpng documentation has always - * stated that it works with 4-digit years, and the APIs have been - * documented as such. - * - * The tIME chunk itself is also Y2K compliant. It uses a 2-byte unsigned - * integer to hold the year, and can hold years as large as 65535. - * - * zlib, upon which libpng depends, is also Y2K compliant. It contains - * no date-related code. - * - * Glenn Randers-Pehrson - * libpng maintainer - * PNG Development Group - */ - -#ifndef PNG_H -#define PNG_H - -/* This is not the place to learn how to use libpng. The file libpng.txt - * describes how to use libpng, and the file example.c summarizes it - * with some code on which to build. This file is useful for looking - * at the actual function definitions and structure components. - */ - -/* Version information for png.h - this should match the version in png.c */ -#define PNG_LIBPNG_VER_STRING "1.2.5" - -#define PNG_LIBPNG_VER_SONUM 0 -#define PNG_LIBPNG_VER_DLLNUM %DLLNUM% - -/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ -#define PNG_LIBPNG_VER_MAJOR 1 -#define PNG_LIBPNG_VER_MINOR 2 -#define PNG_LIBPNG_VER_RELEASE 5 -/* This should match the numeric part of the final component of - * PNG_LIBPNG_VER_STRING, omitting any leading zero: */ - -#define PNG_LIBPNG_VER_BUILD 0 - -#define PNG_LIBPNG_BUILD_ALPHA 1 -#define PNG_LIBPNG_BUILD_BETA 2 -#define PNG_LIBPNG_BUILD_RC 3 -#define PNG_LIBPNG_BUILD_STABLE 4 -#define PNG_LIBPNG_BUILD_TYPEMASK 7 -#define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with STABLE only */ -#define PNG_LIBPNG_BUILD_TYPE 4 - -/* Careful here. At one time, Guy wanted to use 082, but that would be octal. - * We must not include leading zeros. - * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only - * version 1.0.0 was mis-numbered 100 instead of 10000). From - * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */ -#define PNG_LIBPNG_VER 10205 /* 1.2.5 */ - -#ifndef PNG_VERSION_INFO_ONLY - -/* include the compression library's header */ -#include "zlib.h" - -/* include all user configurable info, including optional assembler routines */ -#include "pngconf.h" - -/* Inhibit C++ name-mangling for libpng functions but not for system calls. */ -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* This file is arranged in several sections. The first section contains - * structure and type definitions. The second section contains the external - * library functions, while the third has the internal library functions, - * which applications aren't expected to use directly. - */ - -#ifndef PNG_NO_TYPECAST_NULL -#define int_p_NULL (int *)NULL -#define png_bytep_NULL (png_bytep)NULL -#define png_bytepp_NULL (png_bytepp)NULL -#define png_doublep_NULL (png_doublep)NULL -#define png_error_ptr_NULL (png_error_ptr)NULL -#define png_flush_ptr_NULL (png_flush_ptr)NULL -#define png_free_ptr_NULL (png_free_ptr)NULL -#define png_infopp_NULL (png_infopp)NULL -#define png_malloc_ptr_NULL (png_malloc_ptr)NULL -#define png_read_status_ptr_NULL (png_read_status_ptr)NULL -#define png_rw_ptr_NULL (png_rw_ptr)NULL -#define png_structp_NULL (png_structp)NULL -#define png_uint_16p_NULL (png_uint_16p)NULL -#define png_voidp_NULL (png_voidp)NULL -#define png_write_status_ptr_NULL (png_write_status_ptr)NULL -#else -#define int_p_NULL NULL -#define png_bytep_NULL NULL -#define png_bytepp_NULL NULL -#define png_doublep_NULL NULL -#define png_error_ptr_NULL NULL -#define png_flush_ptr_NULL NULL -#define png_free_ptr_NULL NULL -#define png_infopp_NULL NULL -#define png_malloc_ptr_NULL NULL -#define png_read_status_ptr_NULL NULL -#define png_rw_ptr_NULL NULL -#define png_structp_NULL NULL -#define png_uint_16p_NULL NULL -#define png_voidp_NULL NULL -#define png_write_status_ptr_NULL NULL -#endif - -/* variables declared in png.c - only it needs to define PNG_NO_EXTERN */ -#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN) -/* Version information for C files, stored in png.c. This had better match - * the version above. - */ -#ifdef PNG_USE_GLOBAL_ARRAYS -PNG_EXPORT_VAR (const char) png_libpng_ver[18]; - /* need room for 99.99.99beta99z */ -#else -#define png_libpng_ver png_get_header_ver(NULL) -#endif - -#ifdef PNG_USE_GLOBAL_ARRAYS -/* This was removed in version 1.0.5c */ -/* Structures to facilitate easy interlacing. See png.c for more details */ -PNG_EXPORT_VAR (const int FARDATA) png_pass_start[7]; -PNG_EXPORT_VAR (const int FARDATA) png_pass_inc[7]; -PNG_EXPORT_VAR (const int FARDATA) png_pass_ystart[7]; -PNG_EXPORT_VAR (const int FARDATA) png_pass_yinc[7]; -PNG_EXPORT_VAR (const int FARDATA) png_pass_mask[7]; -PNG_EXPORT_VAR (const int FARDATA) png_pass_dsp_mask[7]; -#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW -PNG_EXPORT_VAR (const int FARDATA) png_pass_width[7]; -#endif -/* This isn't currently used. If you need it, see png.c for more details. -PNG_EXPORT_VAR (const int FARDATA) png_pass_height[7]; -*/ -#endif - -#endif /* PNG_NO_EXTERN */ - -/* Three color definitions. The order of the red, green, and blue, (and the - * exact size) is not important, although the size of the fields need to - * be png_byte or png_uint_16 (as defined below). - */ -typedef struct png_color_struct -{ - png_byte red; - png_byte green; - png_byte blue; -} png_color; -typedef png_color FAR * png_colorp; -typedef png_color FAR * FAR * png_colorpp; - -typedef struct png_color_16_struct -{ - png_byte index; /* used for palette files */ - png_uint_16 red; /* for use in red green blue files */ - png_uint_16 green; - png_uint_16 blue; - png_uint_16 gray; /* for use in grayscale files */ -} png_color_16; -typedef png_color_16 FAR * png_color_16p; -typedef png_color_16 FAR * FAR * png_color_16pp; - -typedef struct png_color_8_struct -{ - png_byte red; /* for use in red green blue files */ - png_byte green; - png_byte blue; - png_byte gray; /* for use in grayscale files */ - png_byte alpha; /* for alpha channel files */ -} png_color_8; -typedef png_color_8 FAR * png_color_8p; -typedef png_color_8 FAR * FAR * png_color_8pp; - -/* - * The following two structures are used for the in-core representation - * of sPLT chunks. - */ -typedef struct png_sPLT_entry_struct -{ - png_uint_16 red; - png_uint_16 green; - png_uint_16 blue; - png_uint_16 alpha; - png_uint_16 frequency; -} png_sPLT_entry; -typedef png_sPLT_entry FAR * png_sPLT_entryp; -typedef png_sPLT_entry FAR * FAR * png_sPLT_entrypp; - -/* When the depth of the sPLT palette is 8 bits, the color and alpha samples - * occupy the LSB of their respective members, and the MSB of each member - * is zero-filled. The frequency member always occupies the full 16 bits. - */ - -typedef struct png_sPLT_struct -{ - png_charp name; /* palette name */ - png_byte depth; /* depth of palette samples */ - png_sPLT_entryp entries; /* palette entries */ - png_int_32 nentries; /* number of palette entries */ -} png_sPLT_t; -typedef png_sPLT_t FAR * png_sPLT_tp; -typedef png_sPLT_t FAR * FAR * png_sPLT_tpp; - -#ifdef PNG_TEXT_SUPPORTED -/* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file, - * and whether that contents is compressed or not. The "key" field - * points to a regular zero-terminated C string. The "text", "lang", and - * "lang_key" fields can be regular C strings, empty strings, or NULL pointers. - * However, the * structure returned by png_get_text() will always contain - * regular zero-terminated C strings (possibly empty), never NULL pointers, - * so they can be safely used in printf() and other string-handling functions. - */ -typedef struct png_text_struct -{ - int compression; /* compression value: - -1: tEXt, none - 0: zTXt, deflate - 1: iTXt, none - 2: iTXt, deflate */ - png_charp key; /* keyword, 1-79 character description of "text" */ - png_charp text; /* comment, may be an empty string (ie "") - or a NULL pointer */ - png_size_t text_length; /* length of the text string */ -#ifdef PNG_iTXt_SUPPORTED - png_size_t itxt_length; /* length of the itxt string */ - png_charp lang; /* language code, 0-79 characters - or a NULL pointer */ - png_charp lang_key; /* keyword translated UTF-8 string, 0 or more - chars or a NULL pointer */ -#endif -} png_text; -typedef png_text FAR * png_textp; -typedef png_text FAR * FAR * png_textpp; -#endif - -/* Supported compression types for text in PNG files (tEXt, and zTXt). - * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. */ -#define PNG_TEXT_COMPRESSION_NONE_WR -3 -#define PNG_TEXT_COMPRESSION_zTXt_WR -2 -#define PNG_TEXT_COMPRESSION_NONE -1 -#define PNG_TEXT_COMPRESSION_zTXt 0 -#define PNG_ITXT_COMPRESSION_NONE 1 -#define PNG_ITXT_COMPRESSION_zTXt 2 -#define PNG_TEXT_COMPRESSION_LAST 3 /* Not a valid value */ - -/* png_time is a way to hold the time in an machine independent way. - * Two conversions are provided, both from time_t and struct tm. There - * is no portable way to convert to either of these structures, as far - * as I know. If you know of a portable way, send it to me. As a side - * note - PNG has always been Year 2000 compliant! - */ -typedef struct png_time_struct -{ - png_uint_16 year; /* full year, as in, 1995 */ - png_byte month; /* month of year, 1 - 12 */ - png_byte day; /* day of month, 1 - 31 */ - png_byte hour; /* hour of day, 0 - 23 */ - png_byte minute; /* minute of hour, 0 - 59 */ - png_byte second; /* second of minute, 0 - 60 (for leap seconds) */ -} png_time; -typedef png_time FAR * png_timep; -typedef png_time FAR * FAR * png_timepp; - -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) -/* png_unknown_chunk is a structure to hold queued chunks for which there is - * no specific support. The idea is that we can use this to queue - * up private chunks for output even though the library doesn't actually - * know about their semantics. - */ -typedef struct png_unknown_chunk_t -{ - png_byte name[5]; - png_byte *data; - png_size_t size; - - /* libpng-using applications should NOT directly modify this byte. */ - png_byte location; /* mode of operation at read time */ -} -png_unknown_chunk; -typedef png_unknown_chunk FAR * png_unknown_chunkp; -typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp; -#endif - -/* png_info is a structure that holds the information in a PNG file so - * that the application can find out the characteristics of the image. - * If you are reading the file, this structure will tell you what is - * in the PNG file. If you are writing the file, fill in the information - * you want to put into the PNG file, then call png_write_info(). - * The names chosen should be very close to the PNG specification, so - * consult that document for information about the meaning of each field. - * - * With libpng < 0.95, it was only possible to directly set and read the - * the values in the png_info_struct, which meant that the contents and - * order of the values had to remain fixed. With libpng 0.95 and later, - * however, there are now functions that abstract the contents of - * png_info_struct from the application, so this makes it easier to use - * libpng with dynamic libraries, and even makes it possible to use - * libraries that don't have all of the libpng ancillary chunk-handing - * functionality. - * - * In any case, the order of the parameters in png_info_struct should NOT - * be changed for as long as possible to keep compatibility with applications - * that use the old direct-access method with png_info_struct. - * - * The following members may have allocated storage attached that should be - * cleaned up before the structure is discarded: palette, trans, text, - * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile, - * splt_palettes, scal_unit, row_pointers, and unknowns. By default, these - * are automatically freed when the info structure is deallocated, if they were - * allocated internally by libpng. This behavior can be changed by means - * of the png_data_freer() function. - * - * More allocation details: all the chunk-reading functions that - * change these members go through the corresponding png_set_* - * functions. A function to clear these members is available: see - * png_free_data(). The png_set_* functions do not depend on being - * able to point info structure members to any of the storage they are - * passed (they make their own copies), EXCEPT that the png_set_text - * functions use the same storage passed to them in the text_ptr or - * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns - * functions do not make their own copies. - */ -typedef struct png_info_struct -{ - /* the following are necessary for every PNG file */ - png_uint_32 width; /* width of image in pixels (from IHDR) */ - png_uint_32 height; /* height of image in pixels (from IHDR) */ - png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */ - png_uint_32 rowbytes; /* bytes needed to hold an untransformed row */ - png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */ - png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */ - png_uint_16 num_trans; /* number of transparent palette color (tRNS) */ - png_byte bit_depth; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */ - png_byte color_type; /* see PNG_COLOR_TYPE_ below (from IHDR) */ - /* The following three should have been named *_method not *_type */ - png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */ - png_byte filter_type; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */ - png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ - - /* The following is informational only on read, and not used on writes. */ - png_byte channels; /* number of data channels per pixel (1, 2, 3, 4) */ - png_byte pixel_depth; /* number of bits per pixel */ - png_byte spare_byte; /* to align the data, and for future use */ - png_byte signature[8]; /* magic bytes read by libpng from start of file */ - - /* The rest of the data is optional. If you are reading, check the - * valid field to see if the information in these are valid. If you - * are writing, set the valid field to those chunks you want written, - * and initialize the appropriate fields below. - */ - -#if defined(PNG_gAMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED) - /* The gAMA chunk describes the gamma characteristics of the system - * on which the image was created, normally in the range [1.0, 2.5]. - * Data is valid if (valid & PNG_INFO_gAMA) is non-zero. - */ - float gamma; /* gamma value of image, if (valid & PNG_INFO_gAMA) */ -#endif - -#if defined(PNG_sRGB_SUPPORTED) - /* GR-P, 0.96a */ - /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */ - png_byte srgb_intent; /* sRGB rendering intent [0, 1, 2, or 3] */ -#endif - -#if defined(PNG_TEXT_SUPPORTED) - /* The tEXt, and zTXt chunks contain human-readable textual data in - * uncompressed, compressed, and optionally compressed forms, respectively. - * The data in "text" is an array of pointers to uncompressed, - * null-terminated C strings. Each chunk has a keyword that describes the - * textual data contained in that chunk. Keywords are not required to be - * unique, and the text string may be empty. Any number of text chunks may - * be in an image. - */ - int num_text; /* number of comments read/to write */ - int max_text; /* current size of text array */ - png_textp text; /* array of comments read/to write */ -#endif /* PNG_TEXT_SUPPORTED */ - -#if defined(PNG_tIME_SUPPORTED) - /* The tIME chunk holds the last time the displayed image data was - * modified. See the png_time struct for the contents of this struct. - */ - png_time mod_time; -#endif - -#if defined(PNG_sBIT_SUPPORTED) - /* The sBIT chunk specifies the number of significant high-order bits - * in the pixel data. Values are in the range [1, bit_depth], and are - * only specified for the channels in the pixel data. The contents of - * the low-order bits is not specified. Data is valid if - * (valid & PNG_INFO_sBIT) is non-zero. - */ - png_color_8 sig_bit; /* significant bits in color channels */ -#endif - -#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \ -defined(PNG_READ_BACKGROUND_SUPPORTED) - /* The tRNS chunk supplies transparency data for paletted images and - * other image types that don't need a full alpha channel. There are - * "num_trans" transparency values for a paletted image, stored in the - * same order as the palette colors, starting from index 0. Values - * for the data are in the range [0, 255], ranging from fully transparent - * to fully opaque, respectively. For non-paletted images, there is a - * single color specified that should be treated as fully transparent. - * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. - */ - png_bytep trans; /* transparent values for paletted image */ - png_color_16 trans_values; /* transparent color for non-palette image */ -#endif - -#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - /* The bKGD chunk gives the suggested image background color if the - * display program does not have its own background color and the image - * is needs to composited onto a background before display. The colors - * in "background" are normally in the same color space/depth as the - * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero. - */ - png_color_16 background; -#endif - -#if defined(PNG_oFFs_SUPPORTED) - /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards - * and downwards from the top-left corner of the display, page, or other - * application-specific co-ordinate space. See the PNG_OFFSET_ defines - * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero. - */ - png_int_32 x_offset; /* x offset on page */ - png_int_32 y_offset; /* y offset on page */ - png_byte offset_unit_type; /* offset units type */ -#endif - -#if defined(PNG_pHYs_SUPPORTED) - /* The pHYs chunk gives the physical pixel density of the image for - * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_ - * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. - */ - png_uint_32 x_pixels_per_unit; /* horizontal pixel density */ - png_uint_32 y_pixels_per_unit; /* vertical pixel density */ - png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */ -#endif - -#if defined(PNG_hIST_SUPPORTED) - /* The hIST chunk contains the relative frequency or importance of the - * various palette entries, so that a viewer can intelligently select a - * reduced-color palette, if required. Data is an array of "num_palette" - * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST) - * is non-zero. - */ - png_uint_16p hist; -#endif - -#ifdef PNG_cHRM_SUPPORTED - /* The cHRM chunk describes the CIE color characteristics of the monitor - * on which the PNG was created. This data allows the viewer to do gamut - * mapping of the input image to ensure that the viewer sees the same - * colors in the image as the creator. Values are in the range - * [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero. - */ -#ifdef PNG_FLOATING_POINT_SUPPORTED - float x_white; - float y_white; - float x_red; - float y_red; - float x_green; - float y_green; - float x_blue; - float y_blue; -#endif -#endif - -#if defined(PNG_pCAL_SUPPORTED) - /* The pCAL chunk describes a transformation between the stored pixel - * values and original physical data values used to create the image. - * The integer range [0, 2^bit_depth - 1] maps to the floating-point - * range given by [pcal_X0, pcal_X1], and are further transformed by a - * (possibly non-linear) transformation function given by "pcal_type" - * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_ - * defines below, and the PNG-Group's PNG extensions document for a - * complete description of the transformations and how they should be - * implemented, and for a description of the ASCII parameter strings. - * Data values are valid if (valid & PNG_INFO_pCAL) non-zero. - */ - png_charp pcal_purpose; /* pCAL chunk description string */ - png_int_32 pcal_X0; /* minimum value */ - png_int_32 pcal_X1; /* maximum value */ - png_charp pcal_units; /* Latin-1 string giving physical units */ - png_charpp pcal_params; /* ASCII strings containing parameter values */ - png_byte pcal_type; /* equation type (see PNG_EQUATION_ below) */ - png_byte pcal_nparams; /* number of parameters given in pcal_params */ -#endif - -/* New members added in libpng-1.0.6 */ -#ifdef PNG_FREE_ME_SUPPORTED - png_uint_32 free_me; /* flags items libpng is responsible for freeing */ -#endif - -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) - /* storage for unknown chunks that the library doesn't recognize. */ - png_unknown_chunkp unknown_chunks; - png_size_t unknown_chunks_num; -#endif - -#if defined(PNG_iCCP_SUPPORTED) - /* iCCP chunk data. */ - png_charp iccp_name; /* profile name */ - png_charp iccp_profile; /* International Color Consortium profile data */ - /* Note to maintainer: should be png_bytep */ - png_uint_32 iccp_proflen; /* ICC profile data length */ - png_byte iccp_compression; /* Always zero */ -#endif - -#if defined(PNG_sPLT_SUPPORTED) - /* data on sPLT chunks (there may be more than one). */ - png_sPLT_tp splt_palettes; - png_uint_32 splt_palettes_num; -#endif - -#if defined(PNG_sCAL_SUPPORTED) - /* The sCAL chunk describes the actual physical dimensions of the - * subject matter of the graphic. The chunk contains a unit specification - * a byte value, and two ASCII strings representing floating-point - * values. The values are width and height corresponsing to one pixel - * in the image. This external representation is converted to double - * here. Data values are valid if (valid & PNG_INFO_sCAL) is non-zero. - */ - png_byte scal_unit; /* unit of physical scale */ -#ifdef PNG_FLOATING_POINT_SUPPORTED - double scal_pixel_width; /* width of one pixel */ - double scal_pixel_height; /* height of one pixel */ -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED - png_charp scal_s_width; /* string containing height */ - png_charp scal_s_height; /* string containing width */ -#endif -#endif - -#if defined(PNG_INFO_IMAGE_SUPPORTED) - /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) non-zero */ - /* Data valid if (valid & PNG_INFO_IDAT) non-zero */ - png_bytepp row_pointers; /* the image bits */ -#endif - -#if defined(PNG_FIXED_POINT_SUPPORTED) && defined(PNG_gAMA_SUPPORTED) - png_fixed_point int_gamma; /* gamma of image, if (valid & PNG_INFO_gAMA) */ -#endif - -#if defined(PNG_cHRM_SUPPORTED) && defined(PNG_FIXED_POINT_SUPPORTED) - png_fixed_point int_x_white; - png_fixed_point int_y_white; - png_fixed_point int_x_red; - png_fixed_point int_y_red; - png_fixed_point int_x_green; - png_fixed_point int_y_green; - png_fixed_point int_x_blue; - png_fixed_point int_y_blue; -#endif - -} png_info; - -typedef png_info FAR * png_infop; -typedef png_info FAR * FAR * png_infopp; - -/* Maximum positive integer used in PNG is (2^31)-1 */ -#define PNG_MAX_UINT ((png_uint_32)0x7fffffffL) - -/* These describe the color_type field in png_info. */ -/* color type masks */ -#define PNG_COLOR_MASK_PALETTE 1 -#define PNG_COLOR_MASK_COLOR 2 -#define PNG_COLOR_MASK_ALPHA 4 - -/* color types. Note that not all combinations are legal */ -#define PNG_COLOR_TYPE_GRAY 0 -#define PNG_COLOR_TYPE_PALETTE (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_PALETTE) -#define PNG_COLOR_TYPE_RGB (PNG_COLOR_MASK_COLOR) -#define PNG_COLOR_TYPE_RGB_ALPHA (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA) -#define PNG_COLOR_TYPE_GRAY_ALPHA (PNG_COLOR_MASK_ALPHA) -/* aliases */ -#define PNG_COLOR_TYPE_RGBA PNG_COLOR_TYPE_RGB_ALPHA -#define PNG_COLOR_TYPE_GA PNG_COLOR_TYPE_GRAY_ALPHA - -/* This is for compression type. PNG 1.0-1.2 only define the single type. */ -#define PNG_COMPRESSION_TYPE_BASE 0 /* Deflate method 8, 32K window */ -#define PNG_COMPRESSION_TYPE_DEFAULT PNG_COMPRESSION_TYPE_BASE - -/* This is for filter type. PNG 1.0-1.2 only define the single type. */ -#define PNG_FILTER_TYPE_BASE 0 /* Single row per-byte filtering */ -#define PNG_INTRAPIXEL_DIFFERENCING 64 /* Used only in MNG datastreams */ -#define PNG_FILTER_TYPE_DEFAULT PNG_FILTER_TYPE_BASE - -/* These are for the interlacing type. These values should NOT be changed. */ -#define PNG_INTERLACE_NONE 0 /* Non-interlaced image */ -#define PNG_INTERLACE_ADAM7 1 /* Adam7 interlacing */ -#define PNG_INTERLACE_LAST 2 /* Not a valid value */ - -/* These are for the oFFs chunk. These values should NOT be changed. */ -#define PNG_OFFSET_PIXEL 0 /* Offset in pixels */ -#define PNG_OFFSET_MICROMETER 1 /* Offset in micrometers (1/10^6 meter) */ -#define PNG_OFFSET_LAST 2 /* Not a valid value */ - -/* These are for the pCAL chunk. These values should NOT be changed. */ -#define PNG_EQUATION_LINEAR 0 /* Linear transformation */ -#define PNG_EQUATION_BASE_E 1 /* Exponential base e transform */ -#define PNG_EQUATION_ARBITRARY 2 /* Arbitrary base exponential transform */ -#define PNG_EQUATION_HYPERBOLIC 3 /* Hyperbolic sine transformation */ -#define PNG_EQUATION_LAST 4 /* Not a valid value */ - -/* These are for the sCAL chunk. These values should NOT be changed. */ -#define PNG_SCALE_UNKNOWN 0 /* unknown unit (image scale) */ -#define PNG_SCALE_METER 1 /* meters per pixel */ -#define PNG_SCALE_RADIAN 2 /* radians per pixel */ -#define PNG_SCALE_LAST 3 /* Not a valid value */ - -/* These are for the pHYs chunk. These values should NOT be changed. */ -#define PNG_RESOLUTION_UNKNOWN 0 /* pixels/unknown unit (aspect ratio) */ -#define PNG_RESOLUTION_METER 1 /* pixels/meter */ -#define PNG_RESOLUTION_LAST 2 /* Not a valid value */ - -/* These are for the sRGB chunk. These values should NOT be changed. */ -#define PNG_sRGB_INTENT_PERCEPTUAL 0 -#define PNG_sRGB_INTENT_RELATIVE 1 -#define PNG_sRGB_INTENT_SATURATION 2 -#define PNG_sRGB_INTENT_ABSOLUTE 3 -#define PNG_sRGB_INTENT_LAST 4 /* Not a valid value */ - -/* This is for text chunks */ -#define PNG_KEYWORD_MAX_LENGTH 79 - -/* Maximum number of entries in PLTE/sPLT/tRNS arrays */ -#define PNG_MAX_PALETTE_LENGTH 256 - -/* These determine if an ancillary chunk's data has been successfully read - * from the PNG header, or if the application has filled in the corresponding - * data in the info_struct to be written into the output file. The values - * of the PNG_INFO_ defines should NOT be changed. - */ -#define PNG_INFO_gAMA 0x0001 -#define PNG_INFO_sBIT 0x0002 -#define PNG_INFO_cHRM 0x0004 -#define PNG_INFO_PLTE 0x0008 -#define PNG_INFO_tRNS 0x0010 -#define PNG_INFO_bKGD 0x0020 -#define PNG_INFO_hIST 0x0040 -#define PNG_INFO_pHYs 0x0080 -#define PNG_INFO_oFFs 0x0100 -#define PNG_INFO_tIME 0x0200 -#define PNG_INFO_pCAL 0x0400 -#define PNG_INFO_sRGB 0x0800 /* GR-P, 0.96a */ -#define PNG_INFO_iCCP 0x1000 /* ESR, 1.0.6 */ -#define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */ -#define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */ -#define PNG_INFO_IDAT 0x8000L /* ESR, 1.0.6 */ - -/* This is used for the transformation routines, as some of them - * change these values for the row. It also should enable using - * the routines for other purposes. - */ -typedef struct png_row_info_struct -{ - png_uint_32 width; /* width of row */ - png_uint_32 rowbytes; /* number of bytes in row */ - png_byte color_type; /* color type of row */ - png_byte bit_depth; /* bit depth of row */ - png_byte channels; /* number of channels (1, 2, 3, or 4) */ - png_byte pixel_depth; /* bits per pixel (depth * channels) */ -} png_row_info; - -typedef png_row_info FAR * png_row_infop; -typedef png_row_info FAR * FAR * png_row_infopp; - -/* These are the function types for the I/O functions and for the functions - * that allow the user to override the default I/O functions with his or her - * own. The png_error_ptr type should match that of user-supplied warning - * and error functions, while the png_rw_ptr type should match that of the - * user read/write data functions. - */ -typedef struct png_struct_def png_struct; -typedef png_struct FAR * png_structp; - -typedef void (PNGAPI *png_error_ptr) PNGARG((png_structp, png_const_charp)); -typedef void (PNGAPI *png_rw_ptr) PNGARG((png_structp, png_bytep, png_size_t)); -typedef void (PNGAPI *png_flush_ptr) PNGARG((png_structp)); -typedef void (PNGAPI *png_read_status_ptr) PNGARG((png_structp, png_uint_32, - int)); -typedef void (PNGAPI *png_write_status_ptr) PNGARG((png_structp, png_uint_32, - int)); - -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED -typedef void (PNGAPI *png_progressive_info_ptr) PNGARG((png_structp, png_infop)); -typedef void (PNGAPI *png_progressive_end_ptr) PNGARG((png_structp, png_infop)); -typedef void (PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep, - png_uint_32, int)); -#endif - -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_LEGACY_SUPPORTED) -typedef void (PNGAPI *png_user_transform_ptr) PNGARG((png_structp, - png_row_infop, png_bytep)); -#endif - -#if defined(PNG_USER_CHUNKS_SUPPORTED) -typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, png_unknown_chunkp)); -#endif -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) -typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp)); -#endif - -/* Transform masks for the high-level interface */ -#define PNG_TRANSFORM_IDENTITY 0x0000 /* read and write */ -#define PNG_TRANSFORM_STRIP_16 0x0001 /* read only */ -#define PNG_TRANSFORM_STRIP_ALPHA 0x0002 /* read only */ -#define PNG_TRANSFORM_PACKING 0x0004 /* read and write */ -#define PNG_TRANSFORM_PACKSWAP 0x0008 /* read and write */ -#define PNG_TRANSFORM_EXPAND 0x0010 /* read only */ -#define PNG_TRANSFORM_INVERT_MONO 0x0020 /* read and write */ -#define PNG_TRANSFORM_SHIFT 0x0040 /* read and write */ -#define PNG_TRANSFORM_BGR 0x0080 /* read and write */ -#define PNG_TRANSFORM_SWAP_ALPHA 0x0100 /* read and write */ -#define PNG_TRANSFORM_SWAP_ENDIAN 0x0200 /* read and write */ -#define PNG_TRANSFORM_INVERT_ALPHA 0x0400 /* read and write */ -#define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* WRITE only */ - -/* Flags for MNG supported features */ -#define PNG_FLAG_MNG_EMPTY_PLTE 0x01 -#define PNG_FLAG_MNG_FILTER_64 0x04 -#define PNG_ALL_MNG_FEATURES 0x05 - -typedef png_voidp (*png_malloc_ptr) PNGARG((png_structp, png_size_t)); -typedef void (*png_free_ptr) PNGARG((png_structp, png_voidp)); - -/* The structure that holds the information to read and write PNG files. - * The only people who need to care about what is inside of this are the - * people who will be modifying the library for their own special needs. - * It should NOT be accessed directly by an application, except to store - * the jmp_buf. - */ - -struct png_struct_def -{ -#ifdef PNG_SETJMP_SUPPORTED - jmp_buf jmpbuf; /* used in png_error */ -#endif - png_error_ptr error_fn; /* function for printing errors and aborting */ - png_error_ptr warning_fn; /* function for printing warnings */ - png_voidp error_ptr; /* user supplied struct for error functions */ - png_rw_ptr write_data_fn; /* function for writing output data */ - png_rw_ptr read_data_fn; /* function for reading input data */ - png_voidp io_ptr; /* ptr to application struct for I/O functions */ - -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) - png_user_transform_ptr read_user_transform_fn; /* user read transform */ -#endif - -#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) - png_user_transform_ptr write_user_transform_fn; /* user write transform */ -#endif - -/* These were added in libpng-1.0.2 */ -#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) - png_voidp user_transform_ptr; /* user supplied struct for user transform */ - png_byte user_transform_depth; /* bit depth of user transformed pixels */ - png_byte user_transform_channels; /* channels in user transformed pixels */ -#endif -#endif - - png_uint_32 mode; /* tells us where we are in the PNG file */ - png_uint_32 flags; /* flags indicating various things to libpng */ - png_uint_32 transformations; /* which transformations to perform */ - - z_stream zstream; /* pointer to decompression structure (below) */ - png_bytep zbuf; /* buffer for zlib */ - png_size_t zbuf_size; /* size of zbuf */ - int zlib_level; /* holds zlib compression level */ - int zlib_method; /* holds zlib compression method */ - int zlib_window_bits; /* holds zlib compression window bits */ - int zlib_mem_level; /* holds zlib compression memory level */ - int zlib_strategy; /* holds zlib compression strategy */ - - png_uint_32 width; /* width of image in pixels */ - png_uint_32 height; /* height of image in pixels */ - png_uint_32 num_rows; /* number of rows in current pass */ - png_uint_32 usr_width; /* width of row at start of write */ - png_uint_32 rowbytes; /* size of row in bytes */ - png_uint_32 irowbytes; /* size of current interlaced row in bytes */ - png_uint_32 iwidth; /* width of current interlaced row in pixels */ - png_uint_32 row_number; /* current row in interlace pass */ - png_bytep prev_row; /* buffer to save previous (unfiltered) row */ - png_bytep row_buf; /* buffer to save current (unfiltered) row */ - png_bytep sub_row; /* buffer to save "sub" row when filtering */ - png_bytep up_row; /* buffer to save "up" row when filtering */ - png_bytep avg_row; /* buffer to save "avg" row when filtering */ - png_bytep paeth_row; /* buffer to save "Paeth" row when filtering */ - png_row_info row_info; /* used for transformation routines */ - - png_uint_32 idat_size; /* current IDAT size for read */ - png_uint_32 crc; /* current chunk CRC value */ - png_colorp palette; /* palette from the input file */ - png_uint_16 num_palette; /* number of color entries in palette */ - png_uint_16 num_trans; /* number of transparency values */ - png_byte chunk_name[5]; /* null-terminated name of current chunk */ - png_byte compression; /* file compression type (always 0) */ - png_byte filter; /* file filter type (always 0) */ - png_byte interlaced; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ - png_byte pass; /* current interlace pass (0 - 6) */ - png_byte do_filter; /* row filter flags (see PNG_FILTER_ below ) */ - png_byte color_type; /* color type of file */ - png_byte bit_depth; /* bit depth of file */ - png_byte usr_bit_depth; /* bit depth of users row */ - png_byte pixel_depth; /* number of bits per pixel */ - png_byte channels; /* number of channels in file */ - png_byte usr_channels; /* channels at start of write */ - png_byte sig_bytes; /* magic bytes read/written from start of file */ - -#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) -#ifdef PNG_LEGACY_SUPPORTED - png_byte filler; /* filler byte for pixel expansion */ -#else - png_uint_16 filler; /* filler bytes for pixel expansion */ -#endif -#endif - -#if defined(PNG_bKGD_SUPPORTED) - png_byte background_gamma_type; -# ifdef PNG_FLOATING_POINT_SUPPORTED - float background_gamma; -# endif - png_color_16 background; /* background color in screen gamma space */ -#if defined(PNG_READ_GAMMA_SUPPORTED) - png_color_16 background_1; /* background normalized to gamma 1.0 */ -#endif -#endif /* PNG_bKGD_SUPPORTED */ - -#if defined(PNG_WRITE_FLUSH_SUPPORTED) - png_flush_ptr output_flush_fn;/* Function for flushing output */ - png_uint_32 flush_dist; /* how many rows apart to flush, 0 - no flush */ - png_uint_32 flush_rows; /* number of rows written since last flush */ -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - int gamma_shift; /* number of "insignificant" bits 16-bit gamma */ -#ifdef PNG_FLOATING_POINT_SUPPORTED - float gamma; /* file gamma value */ - float screen_gamma; /* screen gamma value (display_exponent) */ -#endif -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - png_bytep gamma_table; /* gamma table for 8-bit depth files */ - png_bytep gamma_from_1; /* converts from 1.0 to screen */ - png_bytep gamma_to_1; /* converts from file to 1.0 */ - png_uint_16pp gamma_16_table; /* gamma table for 16-bit depth files */ - png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */ - png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */ -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED) - png_color_8 sig_bit; /* significant bits in each available channel */ -#endif - -#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) - png_color_8 shift; /* shift for significant bit tranformation */ -#endif - -#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \ - || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - png_bytep trans; /* transparency values for paletted files */ - png_color_16 trans_values; /* transparency values for non-paletted files */ -#endif - - png_read_status_ptr read_row_fn; /* called after each row is decoded */ - png_write_status_ptr write_row_fn; /* called after each row is encoded */ -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED - png_progressive_info_ptr info_fn; /* called after header data fully read */ - png_progressive_row_ptr row_fn; /* called after each prog. row is decoded */ - png_progressive_end_ptr end_fn; /* called after image is complete */ - png_bytep save_buffer_ptr; /* current location in save_buffer */ - png_bytep save_buffer; /* buffer for previously read data */ - png_bytep current_buffer_ptr; /* current location in current_buffer */ - png_bytep current_buffer; /* buffer for recently used data */ - png_uint_32 push_length; /* size of current input chunk */ - png_uint_32 skip_length; /* bytes to skip in input data */ - png_size_t save_buffer_size; /* amount of data now in save_buffer */ - png_size_t save_buffer_max; /* total size of save_buffer */ - png_size_t buffer_size; /* total amount of available input data */ - png_size_t current_buffer_size; /* amount of data now in current_buffer */ - int process_mode; /* what push library is currently doing */ - int cur_palette; /* current push library palette index */ - -# if defined(PNG_TEXT_SUPPORTED) - png_size_t current_text_size; /* current size of text input data */ - png_size_t current_text_left; /* how much text left to read in input */ - png_charp current_text; /* current text chunk buffer */ - png_charp current_text_ptr; /* current location in current_text */ -# endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */ - -#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ - -#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) -/* for the Borland special 64K segment handler */ - png_bytepp offset_table_ptr; - png_bytep offset_table; - png_uint_16 offset_table_number; - png_uint_16 offset_table_count; - png_uint_16 offset_table_count_free; -#endif - -#if defined(PNG_READ_DITHER_SUPPORTED) - png_bytep palette_lookup; /* lookup table for dithering */ - png_bytep dither_index; /* index translation for palette files */ -#endif - -#if defined(PNG_READ_DITHER_SUPPORTED) || defined(PNG_hIST_SUPPORTED) - png_uint_16p hist; /* histogram */ -#endif - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - png_byte heuristic_method; /* heuristic for row filter selection */ - png_byte num_prev_filters; /* number of weights for previous rows */ - png_bytep prev_filters; /* filter type(s) of previous row(s) */ - png_uint_16p filter_weights; /* weight(s) for previous line(s) */ - png_uint_16p inv_filter_weights; /* 1/weight(s) for previous line(s) */ - png_uint_16p filter_costs; /* relative filter calculation cost */ - png_uint_16p inv_filter_costs; /* 1/relative filter calculation cost */ -#endif - -#if defined(PNG_TIME_RFC1123_SUPPORTED) - png_charp time_buffer; /* String to hold RFC 1123 time text */ -#endif - -/* New members added in libpng-1.0.6 */ - -#ifdef PNG_FREE_ME_SUPPORTED - png_uint_32 free_me; /* flags items libpng is responsible for freeing */ -#endif - -#if defined(PNG_USER_CHUNKS_SUPPORTED) - png_voidp user_chunk_ptr; - png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */ -#endif - -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) - int num_chunk_list; - png_bytep chunk_list; -#endif - -/* New members added in libpng-1.0.3 */ -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) - png_byte rgb_to_gray_status; - /* These were changed from png_byte in libpng-1.0.6 */ - png_uint_16 rgb_to_gray_red_coeff; - png_uint_16 rgb_to_gray_green_coeff; - png_uint_16 rgb_to_gray_blue_coeff; -#endif - -/* New member added in libpng-1.0.4 (renamed in 1.0.9) */ -#if defined(PNG_MNG_FEATURES_SUPPORTED) || \ - defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ - defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) -/* changed from png_byte to png_uint_32 at version 1.2.0 */ -#ifdef PNG_1_0_X - png_byte mng_features_permitted; -#else - png_uint_32 mng_features_permitted; -#endif /* PNG_1_0_X */ -#endif - -/* New member added in libpng-1.0.7 */ -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - png_fixed_point int_gamma; -#endif - -/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */ -#if defined(PNG_MNG_FEATURES_SUPPORTED) - png_byte filter_type; -#endif - -#if defined(PNG_1_0_X) || (defined(PNG_DEBUG) && defined(PNG_USE_PNGGCCRD)) -/* New member added in libpng-1.0.10, ifdef'ed out in 1.2.0 */ - png_uint_32 row_buf_size; -#endif - -/* New members added in libpng-1.2.0 */ -#if !defined(PNG_1_0_X) && defined(PNG_ASSEMBLER_CODE_SUPPORTED) - png_byte mmx_bitdepth_threshold; - png_uint_32 mmx_rowbytes_threshold; - png_uint_32 asm_flags; -#endif - -/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ -#ifdef PNG_USER_MEM_SUPPORTED - png_voidp mem_ptr; /* user supplied struct for mem functions */ - png_malloc_ptr malloc_fn; /* function for allocating memory */ - png_free_ptr free_fn; /* function for freeing memory */ -#endif - -/* New member added in libpng-1.0.13 and 1.2.0 */ - png_bytep big_row_buf; /* buffer to save current (unfiltered) row */ - -#if defined(PNG_READ_DITHER_SUPPORTED) -/* The following three members were added at version 1.0.14 and 1.2.4 */ - png_bytep dither_sort; /* working sort array */ - png_bytep index_to_palette; /* where the original index currently is */ - /* in the palette */ - png_bytep palette_to_index; /* which original index points to this */ - /* palette color */ -#endif - -}; - - -/* This prevents a compiler error in png.c if png.c and png.h are both at - version 1.2.5 - */ -typedef png_structp version_1_2_5; - -typedef png_struct FAR * FAR * png_structpp; - -/* Here are the function definitions most commonly used. This is not - * the place to find out how to use libpng. See libpng.txt for the - * full explanation, see example.c for the summary. This just provides - * a simple one line description of the use of each function. - */ - -/* Returns the version number of the library */ -extern PNG_EXPORT(png_uint_32,png_access_version_number) PNGARG((void)); - -/* Tell lib we have already handled the first magic bytes. - * Handling more than 8 bytes from the beginning of the file is an error. - */ -extern PNG_EXPORT(void,png_set_sig_bytes) PNGARG((png_structp png_ptr, - int num_bytes)); - -/* Check sig[start] through sig[start + num_to_check - 1] to see if it's a - * PNG file. Returns zero if the supplied bytes match the 8-byte PNG - * signature, and non-zero otherwise. Having num_to_check == 0 or - * start > 7 will always fail (ie return non-zero). - */ -extern PNG_EXPORT(int,png_sig_cmp) PNGARG((png_bytep sig, png_size_t start, - png_size_t num_to_check)); - -/* Simple signature checking function. This is the same as calling - * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n). - */ -extern PNG_EXPORT(int,png_check_sig) PNGARG((png_bytep sig, int num)); - -/* Allocate and initialize png_ptr struct for reading, and any other memory. */ -extern PNG_EXPORT(png_structp,png_create_read_struct) - PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn)); - -/* Allocate and initialize png_ptr struct for writing, and any other memory */ -extern PNG_EXPORT(png_structp,png_create_write_struct) - PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn)); - -extern PNG_EXPORT(png_uint_32,png_get_compression_buffer_size) - PNGARG((png_structp png_ptr)); - -extern PNG_EXPORT(void,png_set_compression_buffer_size) - PNGARG((png_structp png_ptr, png_uint_32 size)); - -/* Reset the compression stream */ -extern PNG_EXPORT(int,png_reset_zstream) PNGARG((png_structp png_ptr)); - -/* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */ -#ifdef PNG_USER_MEM_SUPPORTED -extern PNG_EXPORT(png_structp,png_create_read_struct_2) - PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, - png_malloc_ptr malloc_fn, png_free_ptr free_fn)); -extern PNG_EXPORT(png_structp,png_create_write_struct_2) - PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, - png_malloc_ptr malloc_fn, png_free_ptr free_fn)); -#endif - -/* Write a PNG chunk - size, type, (optional) data, CRC. */ -extern PNG_EXPORT(void,png_write_chunk) PNGARG((png_structp png_ptr, - png_bytep chunk_name, png_bytep data, png_size_t length)); - -/* Write the start of a PNG chunk - length and chunk name. */ -extern PNG_EXPORT(void,png_write_chunk_start) PNGARG((png_structp png_ptr, - png_bytep chunk_name, png_uint_32 length)); - -/* Write the data of a PNG chunk started with png_write_chunk_start(). */ -extern PNG_EXPORT(void,png_write_chunk_data) PNGARG((png_structp png_ptr, - png_bytep data, png_size_t length)); - -/* Finish a chunk started with png_write_chunk_start() (includes CRC). */ -extern PNG_EXPORT(void,png_write_chunk_end) PNGARG((png_structp png_ptr)); - -/* Allocate and initialize the info structure */ -extern PNG_EXPORT(png_infop,png_create_info_struct) - PNGARG((png_structp png_ptr)); - -/* Initialize the info structure (old interface - DEPRECATED) */ -extern PNG_EXPORT(void,png_info_init) PNGARG((png_infop info_ptr)); -#undef png_info_init -#define png_info_init(info_ptr) png_info_init_3(&info_ptr, sizeof(png_info)); -extern PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr, - png_size_t png_info_struct_size)); - -/* Writes all the PNG information before the image. */ -extern PNG_EXPORT(void,png_write_info_before_PLTE) PNGARG((png_structp png_ptr, - png_infop info_ptr)); -extern PNG_EXPORT(void,png_write_info) PNGARG((png_structp png_ptr, - png_infop info_ptr)); - -/* read the information before the actual image data. */ -extern PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr, - png_infop info_ptr)); - -#if defined(PNG_TIME_RFC1123_SUPPORTED) -extern PNG_EXPORT(png_charp,png_convert_to_rfc1123) - PNGARG((png_structp png_ptr, png_timep ptime)); -#endif - -#if !defined(_WIN32_WCE) -/* "time.h" functions are not supported on WindowsCE */ -#if defined(PNG_WRITE_tIME_SUPPORTED) -/* convert from a struct tm to png_time */ -extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime, - struct tm FAR * ttime)); - -/* convert from time_t to png_time. Uses gmtime() */ -extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime, - time_t ttime)); -#endif /* PNG_WRITE_tIME_SUPPORTED */ -#endif /* _WIN32_WCE */ - -#if defined(PNG_READ_EXPAND_SUPPORTED) -/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */ -extern PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(void,png_set_gray_1_2_4_to_8) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(void,png_set_palette_to_rgb) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(void,png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr)); -#endif - -#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) -/* Use blue, green, red order for pixels. */ -extern PNG_EXPORT(void,png_set_bgr) PNGARG((png_structp png_ptr)); -#endif - -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) -/* Expand the grayscale to 24-bit RGB if necessary. */ -extern PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr)); -#endif - -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) -/* Reduce RGB to grayscale. */ -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr, - int error_action, double red, double green )); -#endif -extern PNG_EXPORT(void,png_set_rgb_to_gray_fixed) PNGARG((png_structp png_ptr, - int error_action, png_fixed_point red, png_fixed_point green )); -extern PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_structp - png_ptr)); -#endif - -extern PNG_EXPORT(void,png_build_grayscale_palette) PNGARG((int bit_depth, - png_colorp palette)); - -#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) -extern PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr)); -#endif - -#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ - defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) -extern PNG_EXPORT(void,png_set_swap_alpha) PNGARG((png_structp png_ptr)); -#endif - -#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ - defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) -extern PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr)); -#endif - -#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) -/* Add a filler byte to 24-bit RGB images. */ -extern PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr, - png_uint_32 filler, int flags)); -/* The values of the PNG_FILLER_ defines should NOT be changed */ -#define PNG_FILLER_BEFORE 0 -#define PNG_FILLER_AFTER 1 -#endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */ - -#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) -/* Swap bytes in 16-bit depth files. */ -extern PNG_EXPORT(void,png_set_swap) PNGARG((png_structp png_ptr)); -#endif - -#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) -/* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */ -extern PNG_EXPORT(void,png_set_packing) PNGARG((png_structp png_ptr)); -#endif - -#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED) -/* Swap packing order of pixels in bytes. */ -extern PNG_EXPORT(void,png_set_packswap) PNGARG((png_structp png_ptr)); -#endif - -#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) -/* Converts files to legal bit depths. */ -extern PNG_EXPORT(void,png_set_shift) PNGARG((png_structp png_ptr, - png_color_8p true_bits)); -#endif - -#if defined(PNG_READ_INTERLACING_SUPPORTED) || \ - defined(PNG_WRITE_INTERLACING_SUPPORTED) -/* Have the code handle the interlacing. Returns the number of passes. */ -extern PNG_EXPORT(int,png_set_interlace_handling) PNGARG((png_structp png_ptr)); -#endif - -#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) -/* Invert monochrome files */ -extern PNG_EXPORT(void,png_set_invert_mono) PNGARG((png_structp png_ptr)); -#endif - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) -/* Handle alpha and tRNS by replacing with a background color. */ -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr, - png_color_16p background_color, int background_gamma_code, - int need_expand, double background_gamma)); -#endif -#define PNG_BACKGROUND_GAMMA_UNKNOWN 0 -#define PNG_BACKGROUND_GAMMA_SCREEN 1 -#define PNG_BACKGROUND_GAMMA_FILE 2 -#define PNG_BACKGROUND_GAMMA_UNIQUE 3 -#endif - -#if defined(PNG_READ_16_TO_8_SUPPORTED) -/* strip the second byte of information from a 16-bit depth file. */ -extern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr)); -#endif - -#if defined(PNG_READ_DITHER_SUPPORTED) -/* Turn on dithering, and reduce the palette to the number of colors available. */ -extern PNG_EXPORT(void,png_set_dither) PNGARG((png_structp png_ptr, - png_colorp palette, int num_palette, int maximum_colors, - png_uint_16p histogram, int full_dither)); -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) -/* Handle gamma correction. Screen_gamma=(display_exponent) */ -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr, - double screen_gamma, double default_file_gamma)); -#endif -#endif - -#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ - defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) -/* Permit or disallow empty PLTE (0: not permitted, 1: permitted) */ -/* Deprecated and will be removed. Use png_permit_mng_features() instead. */ -extern PNG_EXPORT(void,png_permit_empty_plte) PNGARG((png_structp png_ptr, - int empty_plte_permitted)); -#endif - -#if defined(PNG_WRITE_FLUSH_SUPPORTED) -/* Set how many lines between output flushes - 0 for no flushing */ -extern PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows)); -/* Flush the current PNG output buffer */ -extern PNG_EXPORT(void,png_write_flush) PNGARG((png_structp png_ptr)); -#endif - -/* optional update palette with requested transformations */ -extern PNG_EXPORT(void,png_start_read_image) PNGARG((png_structp png_ptr)); - -/* optional call to update the users info structure */ -extern PNG_EXPORT(void,png_read_update_info) PNGARG((png_structp png_ptr, - png_infop info_ptr)); - -/* read one or more rows of image data. */ -extern PNG_EXPORT(void,png_read_rows) PNGARG((png_structp png_ptr, - png_bytepp row, png_bytepp display_row, png_uint_32 num_rows)); - -/* read a row of data. */ -extern PNG_EXPORT(void,png_read_row) PNGARG((png_structp png_ptr, - png_bytep row, - png_bytep display_row)); - -/* read the whole image into memory at once. */ -extern PNG_EXPORT(void,png_read_image) PNGARG((png_structp png_ptr, - png_bytepp image)); - -/* write a row of image data */ -extern PNG_EXPORT(void,png_write_row) PNGARG((png_structp png_ptr, - png_bytep row)); - -/* write a few rows of image data */ -extern PNG_EXPORT(void,png_write_rows) PNGARG((png_structp png_ptr, - png_bytepp row, png_uint_32 num_rows)); - -/* write the image data */ -extern PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr, - png_bytepp image)); - -/* writes the end of the PNG file. */ -extern PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr, - png_infop info_ptr)); - -/* read the end of the PNG file. */ -extern PNG_EXPORT(void,png_read_end) PNGARG((png_structp png_ptr, - png_infop info_ptr)); - -/* free any memory associated with the png_info_struct */ -extern PNG_EXPORT(void,png_destroy_info_struct) PNGARG((png_structp png_ptr, - png_infopp info_ptr_ptr)); - -/* free any memory associated with the png_struct and the png_info_structs */ -extern PNG_EXPORT(void,png_destroy_read_struct) PNGARG((png_structpp - png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); - -/* free all memory used by the read (old method - NOT DLL EXPORTED) */ -extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr, - png_infop end_info_ptr)); - -/* free any memory associated with the png_struct and the png_info_structs */ -extern PNG_EXPORT(void,png_destroy_write_struct) - PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)); - -/* free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */ -extern void png_write_destroy PNGARG((png_structp png_ptr)); - -/* set the libpng method of handling chunk CRC errors */ -extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr, - int crit_action, int ancil_action)); - -/* Values for png_set_crc_action() to say how to handle CRC errors in - * ancillary and critical chunks, and whether to use the data contained - * therein. Note that it is impossible to "discard" data in a critical - * chunk. For versions prior to 0.90, the action was always error/quit, - * whereas in version 0.90 and later, the action for CRC errors in ancillary - * chunks is warn/discard. These values should NOT be changed. - * - * value action:critical action:ancillary - */ -#define PNG_CRC_DEFAULT 0 /* error/quit warn/discard data */ -#define PNG_CRC_ERROR_QUIT 1 /* error/quit error/quit */ -#define PNG_CRC_WARN_DISCARD 2 /* (INVALID) warn/discard data */ -#define PNG_CRC_WARN_USE 3 /* warn/use data warn/use data */ -#define PNG_CRC_QUIET_USE 4 /* quiet/use data quiet/use data */ -#define PNG_CRC_NO_CHANGE 5 /* use current value use current value */ - -/* These functions give the user control over the scan-line filtering in - * libpng and the compression methods used by zlib. These functions are - * mainly useful for testing, as the defaults should work with most users. - * Those users who are tight on memory or want faster performance at the - * expense of compression can modify them. See the compression library - * header file (zlib.h) for an explination of the compression functions. - */ - -/* set the filtering method(s) used by libpng. Currently, the only valid - * value for "method" is 0. - */ -extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method, - int filters)); - -/* Flags for png_set_filter() to say which filters to use. The flags - * are chosen so that they don't conflict with real filter types - * below, in case they are supplied instead of the #defined constants. - * These values should NOT be changed. - */ -#define PNG_NO_FILTERS 0x00 -#define PNG_FILTER_NONE 0x08 -#define PNG_FILTER_SUB 0x10 -#define PNG_FILTER_UP 0x20 -#define PNG_FILTER_AVG 0x40 -#define PNG_FILTER_PAETH 0x80 -#define PNG_ALL_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | \ - PNG_FILTER_AVG | PNG_FILTER_PAETH) - -/* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now. - * These defines should NOT be changed. - */ -#define PNG_FILTER_VALUE_NONE 0 -#define PNG_FILTER_VALUE_SUB 1 -#define PNG_FILTER_VALUE_UP 2 -#define PNG_FILTER_VALUE_AVG 3 -#define PNG_FILTER_VALUE_PAETH 4 -#define PNG_FILTER_VALUE_LAST 5 - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) /* EXPERIMENTAL */ -/* The "heuristic_method" is given by one of the PNG_FILTER_HEURISTIC_ - * defines, either the default (minimum-sum-of-absolute-differences), or - * the experimental method (weighted-minimum-sum-of-absolute-differences). - * - * Weights are factors >= 1.0, indicating how important it is to keep the - * filter type consistent between rows. Larger numbers mean the current - * filter is that many times as likely to be the same as the "num_weights" - * previous filters. This is cumulative for each previous row with a weight. - * There needs to be "num_weights" values in "filter_weights", or it can be - * NULL if the weights aren't being specified. Weights have no influence on - * the selection of the first row filter. Well chosen weights can (in theory) - * improve the compression for a given image. - * - * Costs are factors >= 1.0 indicating the relative decoding costs of a - * filter type. Higher costs indicate more decoding expense, and are - * therefore less likely to be selected over a filter with lower computational - * costs. There needs to be a value in "filter_costs" for each valid filter - * type (given by PNG_FILTER_VALUE_LAST), or it can be NULL if you aren't - * setting the costs. Costs try to improve the speed of decompression without - * unduly increasing the compressed image size. - * - * A negative weight or cost indicates the default value is to be used, and - * values in the range [0.0, 1.0) indicate the value is to remain unchanged. - * The default values for both weights and costs are currently 1.0, but may - * change if good general weighting/cost heuristics can be found. If both - * the weights and costs are set to 1.0, this degenerates the WEIGHTED method - * to the UNWEIGHTED method, but with added encoding time/computation. - */ -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr, - int heuristic_method, int num_weights, png_doublep filter_weights, - png_doublep filter_costs)); -#endif -#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */ - -/* Heuristic used for row filter selection. These defines should NOT be - * changed. - */ -#define PNG_FILTER_HEURISTIC_DEFAULT 0 /* Currently "UNWEIGHTED" */ -#define PNG_FILTER_HEURISTIC_UNWEIGHTED 1 /* Used by libpng < 0.95 */ -#define PNG_FILTER_HEURISTIC_WEIGHTED 2 /* Experimental feature */ -#define PNG_FILTER_HEURISTIC_LAST 3 /* Not a valid value */ - -/* Set the library compression level. Currently, valid values range from - * 0 - 9, corresponding directly to the zlib compression levels 0 - 9 - * (0 - no compression, 9 - "maximal" compression). Note that tests have - * shown that zlib compression levels 3-6 usually perform as well as level 9 - * for PNG images, and do considerably fewer caclulations. In the future, - * these values may not correspond directly to the zlib compression levels. - */ -extern PNG_EXPORT(void,png_set_compression_level) PNGARG((png_structp png_ptr, - int level)); - -extern PNG_EXPORT(void,png_set_compression_mem_level) - PNGARG((png_structp png_ptr, int mem_level)); - -extern PNG_EXPORT(void,png_set_compression_strategy) - PNGARG((png_structp png_ptr, int strategy)); - -extern PNG_EXPORT(void,png_set_compression_window_bits) - PNGARG((png_structp png_ptr, int window_bits)); - -extern PNG_EXPORT(void,png_set_compression_method) PNGARG((png_structp png_ptr, - int method)); - -/* These next functions are called for input/output, memory, and error - * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c, - * and call standard C I/O routines such as fread(), fwrite(), and - * fprintf(). These functions can be made to use other I/O routines - * at run time for those applications that need to handle I/O in a - * different manner by calling png_set_???_fn(). See libpng.txt for - * more information. - */ - -#if !defined(PNG_NO_STDIO) -/* Initialize the input/output for the PNG file to the default functions. */ -extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, png_FILE_p fp)); -#endif - -/* Replace the (error and abort), and warning functions with user - * supplied functions. If no messages are to be printed you must still - * write and use replacement functions. The replacement error_fn should - * still do a longjmp to the last setjmp location if you are using this - * method of error handling. If error_fn or warning_fn is NULL, the - * default function will be used. - */ - -extern PNG_EXPORT(void,png_set_error_fn) PNGARG((png_structp png_ptr, - png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn)); - -/* Return the user pointer associated with the error functions */ -extern PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr)); - -/* Replace the default data output functions with a user supplied one(s). - * If buffered output is not used, then output_flush_fn can be set to NULL. - * If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time - * output_flush_fn will be ignored (and thus can be NULL). - */ -extern PNG_EXPORT(void,png_set_write_fn) PNGARG((png_structp png_ptr, - png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); - -/* Replace the default data input function with a user supplied one. */ -extern PNG_EXPORT(void,png_set_read_fn) PNGARG((png_structp png_ptr, - png_voidp io_ptr, png_rw_ptr read_data_fn)); - -/* Return the user pointer associated with the I/O functions */ -extern PNG_EXPORT(png_voidp,png_get_io_ptr) PNGARG((png_structp png_ptr)); - -extern PNG_EXPORT(void,png_set_read_status_fn) PNGARG((png_structp png_ptr, - png_read_status_ptr read_row_fn)); - -extern PNG_EXPORT(void,png_set_write_status_fn) PNGARG((png_structp png_ptr, - png_write_status_ptr write_row_fn)); - -#ifdef PNG_USER_MEM_SUPPORTED -/* Replace the default memory allocation functions with user supplied one(s). */ -extern PNG_EXPORT(void,png_set_mem_fn) PNGARG((png_structp png_ptr, - png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn)); -/* Return the user pointer associated with the memory functions */ -extern PNG_EXPORT(png_voidp,png_get_mem_ptr) PNGARG((png_structp png_ptr)); -#endif - -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_LEGACY_SUPPORTED) -extern PNG_EXPORT(void,png_set_read_user_transform_fn) PNGARG((png_structp - png_ptr, png_user_transform_ptr read_user_transform_fn)); -#endif - -#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_LEGACY_SUPPORTED) -extern PNG_EXPORT(void,png_set_write_user_transform_fn) PNGARG((png_structp - png_ptr, png_user_transform_ptr write_user_transform_fn)); -#endif - -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_LEGACY_SUPPORTED) -extern PNG_EXPORT(void,png_set_user_transform_info) PNGARG((png_structp - png_ptr, png_voidp user_transform_ptr, int user_transform_depth, - int user_transform_channels)); -/* Return the user pointer associated with the user transform functions */ -extern PNG_EXPORT(png_voidp,png_get_user_transform_ptr) - PNGARG((png_structp png_ptr)); -#endif - -#ifdef PNG_USER_CHUNKS_SUPPORTED -extern PNG_EXPORT(void,png_set_read_user_chunk_fn) PNGARG((png_structp png_ptr, - png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)); -extern PNG_EXPORT(png_voidp,png_get_user_chunk_ptr) PNGARG((png_structp - png_ptr)); -#endif - -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED -/* Sets the function callbacks for the push reader, and a pointer to a - * user-defined structure available to the callback functions. - */ -extern PNG_EXPORT(void,png_set_progressive_read_fn) PNGARG((png_structp png_ptr, - png_voidp progressive_ptr, - png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, - png_progressive_end_ptr end_fn)); - -/* returns the user pointer associated with the push read functions */ -extern PNG_EXPORT(png_voidp,png_get_progressive_ptr) - PNGARG((png_structp png_ptr)); - -/* function to be called when data becomes available */ -extern PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_bytep buffer, png_size_t buffer_size)); - -/* function that combines rows. Not very much different than the - * png_combine_row() call. Is this even used????? - */ -extern PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr, - png_bytep old_row, png_bytep new_row)); -#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ - -extern PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr, - png_uint_32 size)); - -#if defined(PNG_1_0_X) -# define png_malloc_warn png_malloc -#else -/* Added at libpng version 1.2.4 */ -extern PNG_EXPORT(png_voidp,png_malloc_warn) PNGARG((png_structp png_ptr, - png_uint_32 size)); -#endif - -/* frees a pointer allocated by png_malloc() */ -extern PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr)); - -#if defined(PNG_1_0_X) -/* Function to allocate memory for zlib. */ -extern PNG_EXPORT(voidpf,png_zalloc) PNGARG((voidpf png_ptr, uInt items, - uInt size)); - -/* Function to free memory for zlib */ -extern PNG_EXPORT(void,png_zfree) PNGARG((voidpf png_ptr, voidpf ptr)); -#endif - -/* Free data that was allocated internally */ -extern PNG_EXPORT(void,png_free_data) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 free_me, int num)); -#ifdef PNG_FREE_ME_SUPPORTED -/* Reassign responsibility for freeing existing data, whether allocated - * by libpng or by the application */ -extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr, - png_infop info_ptr, int freer, png_uint_32 mask)); -#endif -/* assignments for png_data_freer */ -#define PNG_DESTROY_WILL_FREE_DATA 1 -#define PNG_SET_WILL_FREE_DATA 1 -#define PNG_USER_WILL_FREE_DATA 2 -/* Flags for png_ptr->free_me and info_ptr->free_me */ -#define PNG_FREE_HIST 0x0008 -#define PNG_FREE_ICCP 0x0010 -#define PNG_FREE_SPLT 0x0020 -#define PNG_FREE_ROWS 0x0040 -#define PNG_FREE_PCAL 0x0080 -#define PNG_FREE_SCAL 0x0100 -#define PNG_FREE_UNKN 0x0200 -#define PNG_FREE_LIST 0x0400 -#define PNG_FREE_PLTE 0x1000 -#define PNG_FREE_TRNS 0x2000 -#define PNG_FREE_TEXT 0x4000 -#define PNG_FREE_ALL 0x7fff -#define PNG_FREE_MUL 0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */ - -#ifdef PNG_USER_MEM_SUPPORTED -extern PNG_EXPORT(png_voidp,png_malloc_default) PNGARG((png_structp png_ptr, - png_uint_32 size)); -extern PNG_EXPORT(void,png_free_default) PNGARG((png_structp png_ptr, - png_voidp ptr)); -#endif - -extern PNG_EXPORT(png_voidp,png_memcpy_check) PNGARG((png_structp png_ptr, - png_voidp s1, png_voidp s2, png_uint_32 size)); - -extern PNG_EXPORT(png_voidp,png_memset_check) PNGARG((png_structp png_ptr, - png_voidp s1, int value, png_uint_32 size)); - -#if defined(USE_FAR_KEYWORD) /* memory model conversion function */ -extern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr, - int check)); -#endif /* USE_FAR_KEYWORD */ - -/* Fatal error in PNG image of libpng - can't continue */ -extern PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr, - png_const_charp error_message)); - -/* The same, but the chunk name is prepended to the error string. */ -extern PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr, - png_const_charp error_message)); - -/* Non-fatal error in libpng. Can continue, but may have a problem. */ -extern PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr, - png_const_charp warning_message)); - -/* Non-fatal error in libpng, chunk name is prepended to message. */ -extern PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr, - png_const_charp warning_message)); - -/* The png_set_ functions are for storing values in the png_info_struct. - * Similarly, the png_get_ calls are used to read values from the - * png_info_struct, either storing the parameters in the passed variables, or - * setting pointers into the png_info_struct where the data is stored. The - * png_get_ functions return a non-zero value if the data was available - * in info_ptr, or return zero and do not change any of the parameters if the - * data was not available. - * - * These functions should be used instead of directly accessing png_info - * to avoid problems with future changes in the size and internal layout of - * png_info_struct. - */ -/* Returns "flag" if chunk data is valid in info_ptr. */ -extern PNG_EXPORT(png_uint_32,png_get_valid) PNGARG((png_structp png_ptr, -png_infop info_ptr, png_uint_32 flag)); - -/* Returns number of bytes needed to hold a transformed row. */ -extern PNG_EXPORT(png_uint_32,png_get_rowbytes) PNGARG((png_structp png_ptr, -png_infop info_ptr)); - -#if defined(PNG_INFO_IMAGE_SUPPORTED) -/* Returns row_pointers, which is an array of pointers to scanlines that was -returned from png_read_png(). */ -extern PNG_EXPORT(png_bytepp,png_get_rows) PNGARG((png_structp png_ptr, -png_infop info_ptr)); -/* Set row_pointers, which is an array of pointers to scanlines for use -by png_write_png(). */ -extern PNG_EXPORT(void,png_set_rows) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_bytepp row_pointers)); -#endif - -/* Returns number of color channels in image. */ -extern PNG_EXPORT(png_byte,png_get_channels) PNGARG((png_structp png_ptr, -png_infop info_ptr)); - -#ifdef PNG_EASY_ACCESS_SUPPORTED -/* Returns image width in pixels. */ -extern PNG_EXPORT(png_uint_32, png_get_image_width) PNGARG((png_structp -png_ptr, png_infop info_ptr)); - -/* Returns image height in pixels. */ -extern PNG_EXPORT(png_uint_32, png_get_image_height) PNGARG((png_structp -png_ptr, png_infop info_ptr)); - -/* Returns image bit_depth. */ -extern PNG_EXPORT(png_byte, png_get_bit_depth) PNGARG((png_structp -png_ptr, png_infop info_ptr)); - -/* Returns image color_type. */ -extern PNG_EXPORT(png_byte, png_get_color_type) PNGARG((png_structp -png_ptr, png_infop info_ptr)); - -/* Returns image filter_type. */ -extern PNG_EXPORT(png_byte, png_get_filter_type) PNGARG((png_structp -png_ptr, png_infop info_ptr)); - -/* Returns image interlace_type. */ -extern PNG_EXPORT(png_byte, png_get_interlace_type) PNGARG((png_structp -png_ptr, png_infop info_ptr)); - -/* Returns image compression_type. */ -extern PNG_EXPORT(png_byte, png_get_compression_type) PNGARG((png_structp -png_ptr, png_infop info_ptr)); - -/* Returns image resolution in pixels per meter, from pHYs chunk data. */ -extern PNG_EXPORT(png_uint_32, png_get_pixels_per_meter) PNGARG((png_structp -png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_uint_32, png_get_x_pixels_per_meter) PNGARG((png_structp -png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_uint_32, png_get_y_pixels_per_meter) PNGARG((png_structp -png_ptr, png_infop info_ptr)); - -/* Returns pixel aspect ratio, computed from pHYs chunk data. */ -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(float, png_get_pixel_aspect_ratio) PNGARG((png_structp -png_ptr, png_infop info_ptr)); -#endif - -/* Returns image x, y offset in pixels or microns, from oFFs chunk data. */ -extern PNG_EXPORT(png_int_32, png_get_x_offset_pixels) PNGARG((png_structp -png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_int_32, png_get_y_offset_pixels) PNGARG((png_structp -png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_int_32, png_get_x_offset_microns) PNGARG((png_structp -png_ptr, png_infop info_ptr)); -extern PNG_EXPORT(png_int_32, png_get_y_offset_microns) PNGARG((png_structp -png_ptr, png_infop info_ptr)); - -#endif /* PNG_EASY_ACCESS_SUPPORTED */ - -/* Returns pointer to signature string read from PNG header */ -extern PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_structp png_ptr, -png_infop info_ptr)); - -#if defined(PNG_bKGD_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_color_16p *background)); -#endif - -#if defined(PNG_bKGD_SUPPORTED) -extern PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_color_16p background)); -#endif - -#if defined(PNG_cHRM_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_structp png_ptr, - png_infop info_ptr, double *white_x, double *white_y, double *red_x, - double *red_y, double *green_x, double *green_y, double *blue_x, - double *blue_y)); -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_fixed_point *int_white_x, png_fixed_point - *int_white_y, png_fixed_point *int_red_x, png_fixed_point *int_red_y, - png_fixed_point *int_green_x, png_fixed_point *int_green_y, png_fixed_point - *int_blue_x, png_fixed_point *int_blue_y)); -#endif -#endif - -#if defined(PNG_cHRM_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_cHRM) PNGARG((png_structp png_ptr, - png_infop info_ptr, double white_x, double white_y, double red_x, - double red_y, double green_x, double green_y, double blue_x, double blue_y)); -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y, - png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point - int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, - png_fixed_point int_blue_y)); -#endif -#endif - -#if defined(PNG_gAMA_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr, - png_infop info_ptr, double *file_gamma)); -#endif -extern PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_fixed_point *int_file_gamma)); -#endif - -#if defined(PNG_gAMA_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr, - png_infop info_ptr, double file_gamma)); -#endif -extern PNG_EXPORT(void,png_set_gAMA_fixed) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_fixed_point int_file_gamma)); -#endif - -#if defined(PNG_hIST_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_16p *hist)); -#endif - -#if defined(PNG_hIST_SUPPORTED) -extern PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_16p hist)); -#endif - -extern PNG_EXPORT(png_uint_32,png_get_IHDR) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, - int *bit_depth, int *color_type, int *interlace_method, - int *compression_method, int *filter_method)); - -extern PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, - int color_type, int interlace_method, int compression_method, - int filter_method)); - -#if defined(PNG_oFFs_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, - int *unit_type)); -#endif - -#if defined(PNG_oFFs_SUPPORTED) -extern PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y, - int unit_type)); -#endif - -#if defined(PNG_pCAL_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1, - int *type, int *nparams, png_charp *units, png_charpp *params)); -#endif - -#if defined(PNG_pCAL_SUPPORTED) -extern PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, - int type, int nparams, png_charp units, png_charpp params)); -#endif - -#if defined(PNG_pHYs_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); -#endif - -#if defined(PNG_pHYs_SUPPORTED) -extern PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); -#endif - -extern PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_colorp *palette, int *num_palette)); - -extern PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_colorp palette, int num_palette)); - -#if defined(PNG_sBIT_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_color_8p *sig_bit)); -#endif - -#if defined(PNG_sBIT_SUPPORTED) -extern PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_color_8p sig_bit)); -#endif - -#if defined(PNG_sRGB_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr, - png_infop info_ptr, int *intent)); -#endif - -#if defined(PNG_sRGB_SUPPORTED) -extern PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr, - png_infop info_ptr, int intent)); -extern PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr, - png_infop info_ptr, int intent)); -#endif - -#if defined(PNG_iCCP_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_charpp name, int *compression_type, - png_charpp profile, png_uint_32 *proflen)); - /* Note to maintainer: profile should be png_bytepp */ -#endif - -#if defined(PNG_iCCP_SUPPORTED) -extern PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_charp name, int compression_type, - png_charp profile, png_uint_32 proflen)); - /* Note to maintainer: profile should be png_bytep */ -#endif - -#if defined(PNG_sPLT_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_sPLT_tpp entries)); -#endif - -#if defined(PNG_sPLT_SUPPORTED) -extern PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_sPLT_tp entries, int nentries)); -#endif - -#if defined(PNG_TEXT_SUPPORTED) -/* png_get_text also returns the number of text chunks in *num_text */ -extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_textp *text_ptr, int *num_text)); -#endif - -/* - * Note while png_set_text() will accept a structure whose text, - * language, and translated keywords are NULL pointers, the structure - * returned by png_get_text will always contain regular - * zero-terminated C strings. They might be empty strings but - * they will never be NULL pointers. - */ - -#if defined(PNG_TEXT_SUPPORTED) -extern PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_textp text_ptr, int num_text)); -#endif - -#if defined(PNG_tIME_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_timep *mod_time)); -#endif - -#if defined(PNG_tIME_SUPPORTED) -extern PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_timep mod_time)); -#endif - -#if defined(PNG_tRNS_SUPPORTED) -extern PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_bytep *trans, int *num_trans, - png_color_16p *trans_values)); -#endif - -#if defined(PNG_tRNS_SUPPORTED) -extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_bytep trans, int num_trans, - png_color_16p trans_values)); -#endif - -#if defined(PNG_tRNS_SUPPORTED) -#endif - -#if defined(PNG_sCAL_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_structp png_ptr, - png_infop info_ptr, int *unit, double *width, double *height)); -#else -#ifdef PNG_FIXED_POINT_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr, - png_infop info_ptr, int *unit, png_charpp swidth, png_charpp sheight)); -#endif -#endif -#endif /* PNG_sCAL_SUPPORTED */ - -#if defined(PNG_sCAL_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr, - png_infop info_ptr, int unit, double width, double height)); -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED -extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr, - png_infop info_ptr, int unit, png_charp swidth, png_charp sheight)); -#endif -#endif /* PNG_sCAL_SUPPORTED || PNG_WRITE_sCAL_SUPPORTED */ - -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) -/* provide a list of chunks and how they are to be handled, if the built-in - handling or default unknown chunk handling is not desired. Any chunks not - listed will be handled in the default manner. The IHDR and IEND chunks - must not be listed. - keep = 0: follow default behavour - = 1: do not keep - = 2: keep only if safe-to-copy - = 3: keep even if unsafe-to-copy -*/ -extern PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp - png_ptr, int keep, png_bytep chunk_list, int num_chunks)); -extern PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr, - png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)); -extern PNG_EXPORT(void, png_set_unknown_chunk_location) - PNGARG((png_structp png_ptr, png_infop info_ptr, int chunk, int location)); -extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp - png_ptr, png_infop info_ptr, png_unknown_chunkpp entries)); -#endif -#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED -PNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep - chunk_name)); -#endif - -/* Png_free_data() will turn off the "valid" flag for anything it frees. - If you need to turn it off for a chunk that your application has freed, - you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK); */ -extern PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr, - png_infop info_ptr, int mask)); - -#if defined(PNG_INFO_IMAGE_SUPPORTED) -/* The "params" pointer is currently not used and is for future expansion. */ -extern PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr, - png_infop info_ptr, - int transforms, - png_voidp params)); -extern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr, - png_infop info_ptr, - int transforms, - png_voidp params)); -#endif - -/* Define PNG_DEBUG at compile time for debugging information. Higher - * numbers for PNG_DEBUG mean more debugging information. This has - * only been added since version 0.95 so it is not implemented throughout - * libpng yet, but more support will be added as needed. - */ -#ifdef PNG_DEBUG -#if (PNG_DEBUG > 0) -#if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER) -#include -#if (PNG_DEBUG > 1) -#define png_debug(l,m) _RPT0(_CRT_WARN,m) -#define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m,p1) -#define png_debug2(l,m,p1,p2) _RPT2(_CRT_WARN,m,p1,p2) -#endif -#else /* PNG_DEBUG_FILE || !_MSC_VER */ -#ifndef PNG_DEBUG_FILE -#define PNG_DEBUG_FILE stderr -#endif /* PNG_DEBUG_FILE */ -#if (PNG_DEBUG > 1) -#define png_debug(l,m) \ -{ \ - int num_tabs=l; \ - fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \ -} -#define png_debug1(l,m,p1) \ -{ \ - int num_tabs=l; \ - fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \ -} -#define png_debug2(l,m,p1,p2) \ -{ \ - int num_tabs=l; \ - fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \ - (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \ -} -#endif /* (PNG_DEBUG > 1) */ -#endif /* _MSC_VER */ -#endif /* (PNG_DEBUG > 0) */ -#endif /* PNG_DEBUG */ -#ifndef png_debug -#define png_debug(l, m) -#endif -#ifndef png_debug1 -#define png_debug1(l, m, p1) -#endif -#ifndef png_debug2 -#define png_debug2(l, m, p1, p2) -#endif - -extern PNG_EXPORT(png_bytep,png_sig_bytes) PNGARG((void)); - -extern PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr)); - -#ifdef PNG_MNG_FEATURES_SUPPORTED -extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp - png_ptr, png_uint_32 mng_features_permitted)); -#endif - -/* Added to version 1.2.0 */ -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) -#define PNG_ASM_FLAG_MMX_SUPPORT_COMPILED 0x01 /* not user-settable */ -#define PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU 0x02 /* not user-settable */ -#define PNG_ASM_FLAG_MMX_READ_COMBINE_ROW 0x04 -#define PNG_ASM_FLAG_MMX_READ_INTERLACE 0x08 -#define PNG_ASM_FLAG_MMX_READ_FILTER_SUB 0x10 -#define PNG_ASM_FLAG_MMX_READ_FILTER_UP 0x20 -#define PNG_ASM_FLAG_MMX_READ_FILTER_AVG 0x40 -#define PNG_ASM_FLAG_MMX_READ_FILTER_PAETH 0x80 -#define PNG_ASM_FLAGS_INITIALIZED 0x80000000 /* not user-settable */ - -#define PNG_MMX_READ_FLAGS ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW \ - | PNG_ASM_FLAG_MMX_READ_INTERLACE \ - | PNG_ASM_FLAG_MMX_READ_FILTER_SUB \ - | PNG_ASM_FLAG_MMX_READ_FILTER_UP \ - | PNG_ASM_FLAG_MMX_READ_FILTER_AVG \ - | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ) -#define PNG_MMX_WRITE_FLAGS ( 0 ) - -#define PNG_MMX_FLAGS ( PNG_ASM_FLAG_MMX_SUPPORT_COMPILED \ - | PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU \ - | PNG_MMX_READ_FLAGS \ - | PNG_MMX_WRITE_FLAGS ) - -#define PNG_SELECT_READ 1 -#define PNG_SELECT_WRITE 2 - - -#if !defined(PNG_1_0_X) -/* pngget.c */ -extern PNG_EXPORT(png_uint_32,png_get_mmx_flagmask) - PNGARG((int flag_select, int *compilerID)); - -/* pngget.c */ -extern PNG_EXPORT(png_uint_32,png_get_asm_flagmask) - PNGARG((int flag_select)); - -/* pngget.c */ -extern PNG_EXPORT(png_uint_32,png_get_asm_flags) - PNGARG((png_structp png_ptr)); - -/* pngget.c */ -extern PNG_EXPORT(png_byte,png_get_mmx_bitdepth_threshold) - PNGARG((png_structp png_ptr)); - -/* pngget.c */ -extern PNG_EXPORT(png_uint_32,png_get_mmx_rowbytes_threshold) - PNGARG((png_structp png_ptr)); - -/* pngset.c */ -extern PNG_EXPORT(void,png_set_asm_flags) - PNGARG((png_structp png_ptr, png_uint_32 asm_flags)); - -/* pngset.c */ -extern PNG_EXPORT(void,png_set_mmx_thresholds) - PNGARG((png_structp png_ptr, png_byte mmx_bitdepth_threshold, - png_uint_32 mmx_rowbytes_threshold)); - -#endif /* PNG_1_0_X */ -#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ - -#if !defined(PNG_1_0_X) -/* png.c, pnggccrd.c, or pngvcrd.c */ -extern PNG_EXPORT(int,png_mmx_support) PNGARG((void)); - -/* Strip the prepended error numbers ("#nnn ") from error and warning - * messages before passing them to the error or warning handler. */ -#ifdef PNG_ERROR_NUMBERS_SUPPORTED -extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp - png_ptr, png_uint_32 strip_mode)); -#endif -#endif /* PNG_1_0_X */ - -/* Maintainer: Put new public prototypes here ^, in libpng.3, and project defs */ - -#define PNG_HEADER_VERSION_STRING \ - " libpng version 1.2.5 - October 3, 2002 (header)\n" - -#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED -/* With these routines we avoid an integer divide, which will be slower on - * most machines. However, it does take more operations than the corresponding - * divide method, so it may be slower on a few RISC systems. There are two - * shifts (by 8 or 16 bits) and an addition, versus a single integer divide. - * - * Note that the rounding factors are NOT supposed to be the same! 128 and - * 32768 are correct for the NODIV code; 127 and 32767 are correct for the - * standard method. - * - * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ] - */ - - /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ - -# define png_composite(composite, fg, alpha, bg) \ - { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) * (png_uint_16)(alpha) \ - + (png_uint_16)(bg)*(png_uint_16)(255 - \ - (png_uint_16)(alpha)) + (png_uint_16)128); \ - (composite) = (png_byte)((temp + (temp >> 8)) >> 8); } - -# define png_composite_16(composite, fg, alpha, bg) \ - { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) * (png_uint_32)(alpha) \ - + (png_uint_32)(bg)*(png_uint_32)(65535L - \ - (png_uint_32)(alpha)) + (png_uint_32)32768L); \ - (composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); } - -#else /* standard method using integer division */ - -# define png_composite(composite, fg, alpha, bg) \ - (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) + \ - (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \ - (png_uint_16)127) / 255) - -# define png_composite_16(composite, fg, alpha, bg) \ - (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \ - (png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) + \ - (png_uint_32)32767) / (png_uint_32)65535L) - -#endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */ - -/* These next functions are used internally in the code. They generally - * shouldn't be used unless you are writing code to add or replace some - * functionality in libpng. More information about most functions can - * be found in the files where the functions are located. - */ - -#if defined(PNG_INTERNAL) - -/* Various modes of operation. Note that after an init, mode is set to - * zero automatically when the structure is created. - */ -#define PNG_HAVE_IHDR 0x01 -#define PNG_HAVE_PLTE 0x02 -#define PNG_HAVE_IDAT 0x04 -#define PNG_AFTER_IDAT 0x08 -#define PNG_HAVE_IEND 0x10 -#define PNG_HAVE_gAMA 0x20 -#define PNG_HAVE_cHRM 0x40 -#define PNG_HAVE_sRGB 0x80 -#define PNG_HAVE_CHUNK_HEADER 0x100 -#define PNG_WROTE_tIME 0x200 -#define PNG_WROTE_INFO_BEFORE_PLTE 0x400 -#define PNG_BACKGROUND_IS_GRAY 0x800 -#define PNG_HAVE_PNG_SIGNATURE 0x1000 - -/* flags for the transformations the PNG library does on the image data */ -#define PNG_BGR 0x0001 -#define PNG_INTERLACE 0x0002 -#define PNG_PACK 0x0004 -#define PNG_SHIFT 0x0008 -#define PNG_SWAP_BYTES 0x0010 -#define PNG_INVERT_MONO 0x0020 -#define PNG_DITHER 0x0040 -#define PNG_BACKGROUND 0x0080 -#define PNG_BACKGROUND_EXPAND 0x0100 - /* 0x0200 unused */ -#define PNG_16_TO_8 0x0400 -#define PNG_RGBA 0x0800 -#define PNG_EXPAND 0x1000 -#define PNG_GAMMA 0x2000 -#define PNG_GRAY_TO_RGB 0x4000 -#define PNG_FILLER 0x8000L -#define PNG_PACKSWAP 0x10000L -#define PNG_SWAP_ALPHA 0x20000L -#define PNG_STRIP_ALPHA 0x40000L -#define PNG_INVERT_ALPHA 0x80000L -#define PNG_USER_TRANSFORM 0x100000L -#define PNG_RGB_TO_GRAY_ERR 0x200000L -#define PNG_RGB_TO_GRAY_WARN 0x400000L -#define PNG_RGB_TO_GRAY 0x600000L /* two bits, RGB_TO_GRAY_ERR|WARN */ - -/* flags for png_create_struct */ -#define PNG_STRUCT_PNG 0x0001 -#define PNG_STRUCT_INFO 0x0002 - -/* Scaling factor for filter heuristic weighting calculations */ -#define PNG_WEIGHT_SHIFT 8 -#define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT)) -#define PNG_COST_SHIFT 3 -#define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT)) - -/* flags for the png_ptr->flags rather than declaring a byte for each one */ -#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001 -#define PNG_FLAG_ZLIB_CUSTOM_LEVEL 0x0002 -#define PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL 0x0004 -#define PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS 0x0008 -#define PNG_FLAG_ZLIB_CUSTOM_METHOD 0x0010 -#define PNG_FLAG_ZLIB_FINISHED 0x0020 -#define PNG_FLAG_ROW_INIT 0x0040 -#define PNG_FLAG_FILLER_AFTER 0x0080 -#define PNG_FLAG_CRC_ANCILLARY_USE 0x0100 -#define PNG_FLAG_CRC_ANCILLARY_NOWARN 0x0200 -#define PNG_FLAG_CRC_CRITICAL_USE 0x0400 -#define PNG_FLAG_CRC_CRITICAL_IGNORE 0x0800 -#define PNG_FLAG_FREE_PLTE 0x1000 -#define PNG_FLAG_FREE_TRNS 0x2000 -#define PNG_FLAG_FREE_HIST 0x4000 -#define PNG_FLAG_KEEP_UNKNOWN_CHUNKS 0x8000L -#define PNG_FLAG_KEEP_UNSAFE_CHUNKS 0x10000L -#define PNG_FLAG_LIBRARY_MISMATCH 0x20000L -#define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000L -#define PNG_FLAG_STRIP_ERROR_TEXT 0x80000L -#define PNG_FLAG_MALLOC_NULL_MEM_OK 0x100000L - -/* For use in png_set_keep_unknown, png_handle_as_unknown */ -#define HANDLE_CHUNK_AS_DEFAULT 0 -#define HANDLE_CHUNK_NEVER 1 -#define HANDLE_CHUNK_IF_SAFE 2 -#define HANDLE_CHUNK_ALWAYS 3 - -#define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \ - PNG_FLAG_CRC_ANCILLARY_NOWARN) - -#define PNG_FLAG_CRC_CRITICAL_MASK (PNG_FLAG_CRC_CRITICAL_USE | \ - PNG_FLAG_CRC_CRITICAL_IGNORE) - -#define PNG_FLAG_CRC_MASK (PNG_FLAG_CRC_ANCILLARY_MASK | \ - PNG_FLAG_CRC_CRITICAL_MASK) - -/* save typing and make code easier to understand */ -#define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \ - abs((int)((c1).green) - (int)((c2).green)) + \ - abs((int)((c1).blue) - (int)((c2).blue))) - -/* variables declared in png.c - only it needs to define PNG_NO_EXTERN */ -#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN) -/* place to hold the signature string for a PNG file. */ -#ifdef PNG_USE_GLOBAL_ARRAYS - PNG_EXPORT_VAR (const png_byte FARDATA) png_sig[8]; -#else -#define png_sig png_sig_bytes(NULL) -#endif -#endif /* PNG_NO_EXTERN */ - -/* Constant strings for known chunk types. If you need to add a chunk, - * define the name here, and add an invocation of the macro in png.c and - * wherever it's needed. - */ -#define PNG_IHDR const png_byte png_IHDR[5] = { 73, 72, 68, 82, '\0'} -#define PNG_IDAT const png_byte png_IDAT[5] = { 73, 68, 65, 84, '\0'} -#define PNG_IEND const png_byte png_IEND[5] = { 73, 69, 78, 68, '\0'} -#define PNG_PLTE const png_byte png_PLTE[5] = { 80, 76, 84, 69, '\0'} -#define PNG_bKGD const png_byte png_bKGD[5] = { 98, 75, 71, 68, '\0'} -#define PNG_cHRM const png_byte png_cHRM[5] = { 99, 72, 82, 77, '\0'} -#define PNG_gAMA const png_byte png_gAMA[5] = {103, 65, 77, 65, '\0'} -#define PNG_hIST const png_byte png_hIST[5] = {104, 73, 83, 84, '\0'} -#define PNG_iCCP const png_byte png_iCCP[5] = {105, 67, 67, 80, '\0'} -#define PNG_iTXt const png_byte png_iTXt[5] = {105, 84, 88, 116, '\0'} -#define PNG_oFFs const png_byte png_oFFs[5] = {111, 70, 70, 115, '\0'} -#define PNG_pCAL const png_byte png_pCAL[5] = {112, 67, 65, 76, '\0'} -#define PNG_sCAL const png_byte png_sCAL[5] = {115, 67, 65, 76, '\0'} -#define PNG_pHYs const png_byte png_pHYs[5] = {112, 72, 89, 115, '\0'} -#define PNG_sBIT const png_byte png_sBIT[5] = {115, 66, 73, 84, '\0'} -#define PNG_sPLT const png_byte png_sPLT[5] = {115, 80, 76, 84, '\0'} -#define PNG_sRGB const png_byte png_sRGB[5] = {115, 82, 71, 66, '\0'} -#define PNG_tEXt const png_byte png_tEXt[5] = {116, 69, 88, 116, '\0'} -#define PNG_tIME const png_byte png_tIME[5] = {116, 73, 77, 69, '\0'} -#define PNG_tRNS const png_byte png_tRNS[5] = {116, 82, 78, 83, '\0'} -#define PNG_zTXt const png_byte png_zTXt[5] = {122, 84, 88, 116, '\0'} - -#ifdef PNG_USE_GLOBAL_ARRAYS -PNG_EXPORT_VAR (const png_byte FARDATA) png_IHDR[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_IDAT[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_IEND[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_PLTE[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_bKGD[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_cHRM[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_gAMA[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_hIST[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_iCCP[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_iTXt[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_oFFs[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_pCAL[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_sCAL[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_pHYs[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_sBIT[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_sPLT[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_sRGB[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_tEXt[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_tIME[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_tRNS[5]; -PNG_EXPORT_VAR (const png_byte FARDATA) png_zTXt[5]; -#endif /* PNG_USE_GLOBAL_ARRAYS */ - - -/* Inline macros to do direct reads of bytes from the input buffer. These - * require that you are using an architecture that uses PNG byte ordering - * (MSB first) and supports unaligned data storage. I think that PowerPC - * in big-endian mode and 680x0 are the only ones that will support this. - * The x86 line of processors definitely do not. The png_get_int_32() - * routine also assumes we are using two's complement format for negative - * values, which is almost certainly true. - */ -#if defined(PNG_READ_BIG_ENDIAN_SUPPORTED) -# if defined(PNG_pCAL_SUPPORTED) || defined(PNG_oFFs_SUPPORTED) -# define png_get_int_32(buf) ( *((png_int_32p) (buf))) -# endif -# define png_get_uint_32(buf) ( *((png_uint_32p) (buf))) -# define png_get_uint_16(buf) ( *((png_uint_16p) (buf))) -#else -# if defined(PNG_pCAL_SUPPORTED) || defined(PNG_oFFs_SUPPORTED) -PNG_EXTERN png_int_32 png_get_int_32 PNGARG((png_bytep buf)); -# endif -PNG_EXTERN png_uint_32 png_get_uint_32 PNGARG((png_bytep buf)); -PNG_EXTERN png_uint_16 png_get_uint_16 PNGARG((png_bytep buf)); -#endif /* !PNG_READ_BIG_ENDIAN_SUPPORTED */ - -/* Initialize png_ptr struct for reading, and allocate any other memory. - * (old interface - DEPRECATED - use png_create_read_struct instead). - */ -extern PNG_EXPORT(void,png_read_init) PNGARG((png_structp png_ptr)); -#undef png_read_init -#define png_read_init(png_ptr) png_read_init_3(&png_ptr, \ - PNG_LIBPNG_VER_STRING, sizeof(png_struct)); -extern PNG_EXPORT(void,png_read_init_3) PNGARG((png_structpp ptr_ptr, - png_const_charp user_png_ver, png_size_t png_struct_size)); -extern PNG_EXPORT(void,png_read_init_2) PNGARG((png_structp png_ptr, - png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t - png_info_size)); - -/* Initialize png_ptr struct for writing, and allocate any other memory. - * (old interface - DEPRECATED - use png_create_write_struct instead). - */ -extern PNG_EXPORT(void,png_write_init) PNGARG((png_structp png_ptr)); -#undef png_write_init -#define png_write_init(png_ptr) png_write_init_3(&png_ptr, \ - PNG_LIBPNG_VER_STRING, sizeof(png_struct)); -extern PNG_EXPORT(void,png_write_init_3) PNGARG((png_structpp ptr_ptr, - png_const_charp user_png_ver, png_size_t png_struct_size)); -extern PNG_EXPORT(void,png_write_init_2) PNGARG((png_structp png_ptr, - png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t - png_info_size)); - -/* Allocate memory for an internal libpng struct */ -PNG_EXTERN png_voidp png_create_struct PNGARG((int type)); - -/* Free memory from internal libpng struct */ -PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr)); - -PNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr - malloc_fn, png_voidp mem_ptr)); -PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr, - png_free_ptr free_fn, png_voidp mem_ptr)); - -/* Free any memory that info_ptr points to and reset struct. */ -PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr, - png_infop info_ptr)); - -#ifndef PNG_1_0_X -/* Function to allocate memory for zlib. */ -PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, uInt size)); - -/* Function to free memory for zlib */ -PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr)); - -/* Next four functions are used internally as callbacks. PNGAPI is required - * but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3. */ - -PNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr, - png_bytep data, png_size_t length)); - -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED -PNG_EXTERN void PNGAPI png_push_fill_buffer PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t length)); -#endif - -PNG_EXTERN void PNGAPI png_default_write_data PNGARG((png_structp png_ptr, - png_bytep data, png_size_t length)); - -#if defined(PNG_WRITE_FLUSH_SUPPORTED) -#if !defined(PNG_NO_STDIO) -PNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr)); -#endif -#endif -#else /* PNG_1_0_X */ -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED -PNG_EXTERN void png_push_fill_buffer PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t length)); -#endif -#endif /* PNG_1_0_X */ - -/* Reset the CRC variable */ -PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr)); - -/* Write the "data" buffer to whatever output you are using. */ -PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)); - -/* Read data from whatever input you are using into the "data" buffer */ -PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)); - -/* Read bytes into buf, and update png_ptr->crc */ -PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf, - png_size_t length)); - -/* Decompress data in a chunk that uses compression */ -#if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \ - defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) -PNG_EXTERN png_charp png_decompress_chunk PNGARG((png_structp png_ptr, - int comp_type, png_charp chunkdata, png_size_t chunklength, - png_size_t prefix_length, png_size_t *data_length)); -#endif - -/* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */ -PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip)); - -/* Read the CRC from the file and compare it to the libpng calculated CRC */ -PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr)); - -/* Calculate the CRC over a section of data. Note that we are only - * passing a maximum of 64K on systems that have this as a memory limit, - * since this is the maximum buffer size we can specify. - */ -PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr, - png_size_t length)); - -#if defined(PNG_WRITE_FLUSH_SUPPORTED) -PNG_EXTERN void png_flush PNGARG((png_structp png_ptr)); -#endif - - -/* Place a 32-bit number into a buffer in PNG byte order (big-endian). - * The only currently known PNG chunks that use signed numbers are - * the ancillary extension chunks, oFFs and pCAL. - */ -PNG_EXTERN void png_save_uint_32 PNGARG((png_bytep buf, png_uint_32 i)); - -#if defined(PNG_WRITE_pCAL_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED) -PNG_EXTERN void png_save_int_32 PNGARG((png_bytep buf, png_int_32 i)); -#endif - -/* Place a 16-bit number into a buffer in PNG byte order. - * The parameter is declared unsigned int, not png_uint_16, - * just to avoid potential problems on pre-ANSI C compilers. - */ -PNG_EXTERN void png_save_uint_16 PNGARG((png_bytep buf, unsigned int i)); - -/* simple function to write the signature */ -PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr)); - -/* write various chunks */ - -/* Write the IHDR chunk, and update the png_struct with the necessary - * information. - */ -PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width, - png_uint_32 height, - int bit_depth, int color_type, int compression_method, int filter_method, - int interlace_method)); - -PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette, - png_uint_32 num_pal)); - -PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data, - png_size_t length)); - -PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr)); - -#if defined(PNG_WRITE_gAMA_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED -PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma)); -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED -PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, png_fixed_point - file_gamma)); -#endif -#endif - -#if defined(PNG_WRITE_sBIT_SUPPORTED) -PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit, - int color_type)); -#endif - -#if defined(PNG_WRITE_cHRM_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED -PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr, - double white_x, double white_y, - double red_x, double red_y, double green_x, double green_y, - double blue_x, double blue_y)); -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED -PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr, - png_fixed_point int_white_x, png_fixed_point int_white_y, - png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point - int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, - png_fixed_point int_blue_y)); -#endif -#endif - -#if defined(PNG_WRITE_sRGB_SUPPORTED) -PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr, - int intent)); -#endif - -#if defined(PNG_WRITE_iCCP_SUPPORTED) -PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr, - png_charp name, int compression_type, - png_charp profile, int proflen)); - /* Note to maintainer: profile should be png_bytep */ -#endif - -#if defined(PNG_WRITE_sPLT_SUPPORTED) -PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr, - png_sPLT_tp palette)); -#endif - -#if defined(PNG_WRITE_tRNS_SUPPORTED) -PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans, - png_color_16p values, int number, int color_type)); -#endif - -#if defined(PNG_WRITE_bKGD_SUPPORTED) -PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr, - png_color_16p values, int color_type)); -#endif - -#if defined(PNG_WRITE_hIST_SUPPORTED) -PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist, - int num_hist)); -#endif - -#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \ - defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) -PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr, - png_charp key, png_charpp new_key)); -#endif - -#if defined(PNG_WRITE_tEXt_SUPPORTED) -PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key, - png_charp text, png_size_t text_len)); -#endif - -#if defined(PNG_WRITE_zTXt_SUPPORTED) -PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key, - png_charp text, png_size_t text_len, int compression)); -#endif - -#if defined(PNG_WRITE_iTXt_SUPPORTED) -PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr, - int compression, png_charp key, png_charp lang, png_charp lang_key, - png_charp text)); -#endif - -#if defined(PNG_TEXT_SUPPORTED) /* Added at version 1.0.14 and 1.2.4 */ -PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr, - png_infop info_ptr, png_textp text_ptr, int num_text)); -#endif - -#if defined(PNG_WRITE_oFFs_SUPPORTED) -PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr, - png_int_32 x_offset, png_int_32 y_offset, int unit_type)); -#endif - -#if defined(PNG_WRITE_pCAL_SUPPORTED) -PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose, - png_int_32 X0, png_int_32 X1, int type, int nparams, - png_charp units, png_charpp params)); -#endif - -#if defined(PNG_WRITE_pHYs_SUPPORTED) -PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr, - png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, - int unit_type)); -#endif - -#if defined(PNG_WRITE_tIME_SUPPORTED) -PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr, - png_timep mod_time)); -#endif - -#if defined(PNG_WRITE_sCAL_SUPPORTED) -#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO) -PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr, - int unit, double width, double height)); -#else -#ifdef PNG_FIXED_POINT_SUPPORTED -PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr, - int unit, png_charp width, png_charp height)); -#endif -#endif -#endif - -/* Called when finished processing a row of data */ -PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr)); - -/* Internal use only. Called before first row of data */ -PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr)); - -#if defined(PNG_READ_GAMMA_SUPPORTED) -PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr)); -#endif - -/* combine a row of data, dealing with alpha, etc. if requested */ -PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row, - int mask)); - -#if defined(PNG_READ_INTERLACING_SUPPORTED) -/* expand an interlaced row */ -/* OLD pre-1.0.9 interface: -PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info, - png_bytep row, int pass, png_uint_32 transformations)); - */ -PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr)); -#endif - -/* GRR TO DO (2.0 or whenever): simplify other internal calling interfaces */ - -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) -/* grab pixels out of a row for an interlaced pass */ -PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info, - png_bytep row, int pass)); -#endif - -/* unfilter a row */ -PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr, - png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter)); - -/* Choose the best filter to use and filter the row data */ -PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr, - png_row_infop row_info)); - -/* Write out the filtered row. */ -PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr, - png_bytep filtered_row)); -/* finish a row while reading, dealing with interlacing passes, etc. */ -PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr)); - -/* initialize the row buffers, etc. */ -PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr)); -/* optional call to update the users info structure */ -PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr, - png_infop info_ptr)); - -/* these are the functions that do the transformations */ -#if defined(PNG_READ_FILLER_SUPPORTED) -PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info, - png_bytep row, png_uint_32 filler, png_uint_32 flags)); -#endif - -#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) -PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) -PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) -PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) -PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#if defined(PNG_WRITE_FILLER_SUPPORTED) || \ - defined(PNG_READ_STRIP_ALPHA_SUPPORTED) -PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info, - png_bytep row, png_uint_32 flags)); -#endif - -#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) -PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row)); -#endif - -#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED) -PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row)); -#endif - -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) -PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop - row_info, png_bytep row)); -#endif - -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) -PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#if defined(PNG_READ_PACK_SUPPORTED) -PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, png_bytep row)); -#endif - -#if defined(PNG_READ_SHIFT_SUPPORTED) -PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row, - png_color_8p sig_bits)); -#endif - -#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) -PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, png_bytep row)); -#endif - -#if defined(PNG_READ_16_TO_8_SUPPORTED) -PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, png_bytep row)); -#endif - -#if defined(PNG_READ_DITHER_SUPPORTED) -PNG_EXTERN void png_do_dither PNGARG((png_row_infop row_info, - png_bytep row, png_bytep palette_lookup, png_bytep dither_lookup)); - -# if defined(PNG_CORRECT_PALETTE_SUPPORTED) -PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr, - png_colorp palette, int num_palette)); -# endif -#endif - -#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) -PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, png_bytep row)); -#endif - -#if defined(PNG_WRITE_PACK_SUPPORTED) -PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info, - png_bytep row, png_uint_32 bit_depth)); -#endif - -#if defined(PNG_WRITE_SHIFT_SUPPORTED) -PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row, - png_color_8p bit_depth)); -#endif - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) -#if defined(PNG_READ_GAMMA_SUPPORTED) -PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, - png_color_16p trans_values, png_color_16p background, - png_color_16p background_1, - png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1, - png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1, - png_uint_16pp gamma_16_to_1, int gamma_shift)); -#else -PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, - png_color_16p trans_values, png_color_16p background)); -#endif -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) -PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row, - png_bytep gamma_table, png_uint_16pp gamma_16_table, - int gamma_shift)); -#endif - -#if defined(PNG_READ_EXPAND_SUPPORTED) -PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info, - png_bytep row, png_colorp palette, png_bytep trans, int num_trans)); -PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info, - png_bytep row, png_color_16p trans_value)); -#endif - -/* The following decodes the appropriate chunks, and does error correction, - * then calls the appropriate callback for the chunk if it is valid. - */ - -/* decode the IHDR chunk */ -PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); - -#if defined(PNG_READ_bKGD_SUPPORTED) -PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_cHRM_SUPPORTED) -PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_gAMA_SUPPORTED) -PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_hIST_SUPPORTED) -PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_iCCP_SUPPORTED) -extern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif /* PNG_READ_iCCP_SUPPORTED */ - -#if defined(PNG_READ_iTXt_SUPPORTED) -PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_oFFs_SUPPORTED) -PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_pCAL_SUPPORTED) -PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_pHYs_SUPPORTED) -PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_sBIT_SUPPORTED) -PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_sCAL_SUPPORTED) -PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_sPLT_SUPPORTED) -extern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif /* PNG_READ_sPLT_SUPPORTED */ - -#if defined(PNG_READ_sRGB_SUPPORTED) -PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_tEXt_SUPPORTED) -PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_tIME_SUPPORTED) -PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_tRNS_SUPPORTED) -PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -#if defined(PNG_READ_zTXt_SUPPORTED) -PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr, - png_uint_32 length)); -#endif - -PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); - -PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr, - png_bytep chunk_name)); - -/* handle the transformations for reading and writing */ -PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_do_write_transformations PNGARG((png_structp png_ptr)); - -PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr)); - -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED -PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr, - png_uint_32 length)); -PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t buffer_length)); -PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr, - png_bytep buffer, png_size_t buffer_length)); -PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr)); -PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); -PNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row)); -PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr, - png_infop info_ptr)); -PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr)); -#if defined(PNG_READ_tEXt_SUPPORTED) -PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); -PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr, - png_infop info_ptr)); -#endif -#if defined(PNG_READ_zTXt_SUPPORTED) -PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); -PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr, - png_infop info_ptr)); -#endif -#if defined(PNG_READ_iTXt_SUPPORTED) -PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr, - png_infop info_ptr, png_uint_32 length)); -PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr, - png_infop info_ptr)); -#endif - -#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ - -#ifdef PNG_MNG_FEATURES_SUPPORTED -PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info, - png_bytep row)); -PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info, - png_bytep row)); -#endif - -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) -/* png.c */ /* PRIVATE */ -PNG_EXTERN void png_init_mmx_flags PNGARG((png_structp png_ptr)); -#endif -/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */ - -#endif /* PNG_INTERNAL */ - -#ifdef __cplusplus -} -#endif - -#endif /* PNG_VERSION_INFO_ONLY */ -/* do not put anything past this line */ -#endif /* PNG_H */ diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngasmrd.h b/gtkmm-osx/trunk/libpng-1.2.5/pngasmrd.h deleted file mode 100644 index d086d8c..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/pngasmrd.h +++ /dev/null @@ -1,11 +0,0 @@ -/* pngasmrd.h - assembler version of utilities to read a PNG file - * - * libpng 1.2.5 - October 3, 2002 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 2002 Glenn Randers-Pehrson - * - */ - -/* This file is obsolete in libpng-1.0.9 and later; its contents now appear - * at the end of pngconf.h. - */ diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngbar.jpg b/gtkmm-osx/trunk/libpng-1.2.5/pngbar.jpg deleted file mode 100644 index 70ba8d817ce433788c7933dbe3c29c3e384b2b0a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2498 zcmb79cR1UN8veLX-}`>=f8Y0x?_}m=8Q`%n#hU_5OiaM90Zxtq1>=CgTfsNH zyhE`{nwsjeShHXcFRV>~hi`yq2v*YHBRtd~Fu*+^LY^4lCw1}#Lva_%-vvRO=aKPAMFitLB9!@Se7YxRO;(_xakVqs4H@^T1A;613B7T`LfloCM zC>s>YhTw#8BK~ij^a5~J00TIJ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UG0>1pkOx7k6gb9<~7 zEJCZ>+w;OZRw?IW&lmbl5aqEGH3-e+iMsSUx=|fB7lp(Cl}Z05;e)elg=25lhPU3OFC-`X4O~Pp z(+u8SxX6@Nu-gU$cM%?iDf;}>eg@uPwZ7NbAfwc4%LKv$AESApwMAQTgR)Bj)d}7P zwCAfKkJo5opoC@6Lg<3Mcwvcs4!^5<=}qW6{9VgWp{KyaBpI7crIgaZ7IUp RQSJZ$002ovPDHLkV1iCKFfIT9 diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngconf.h b/gtkmm-osx/trunk/libpng-1.2.5/pngconf.h deleted file mode 100644 index 0e94c40..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/pngconf.h +++ /dev/null @@ -1,1348 +0,0 @@ -/* pngconf.h - machine configurable file for libpng - * - * libpng 1.2.5 - October 3, 2002 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2002 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) - */ - -/* Any machine specific code is near the front of this file, so if you - * are configuring libpng for a machine, you may want to read the section - * starting here down to where it starts to typedef png_color, png_text, - * and png_info. - */ - -#ifndef PNGCONF_H -#define PNGCONF_H - -/* This is the size of the compression buffer, and thus the size of - * an IDAT chunk. Make this whatever size you feel is best for your - * machine. One of these will be allocated per png_struct. When this - * is full, it writes the data to the disk, and does some other - * calculations. Making this an extremely small size will slow - * the library down, but you may want to experiment to determine - * where it becomes significant, if you are concerned with memory - * usage. Note that zlib allocates at least 32Kb also. For readers, - * this describes the size of the buffer available to read the data in. - * Unless this gets smaller than the size of a row (compressed), - * it should not make much difference how big this is. - */ - -#ifndef PNG_ZBUF_SIZE -# define PNG_ZBUF_SIZE 8192 -#endif - -/* Enable if you want a write-only libpng */ - -#ifndef PNG_NO_READ_SUPPORTED -# define PNG_READ_SUPPORTED -#endif - -/* Enable if you want a read-only libpng */ - -#ifndef PNG_NO_WRITE_SUPPORTED -# define PNG_WRITE_SUPPORTED -#endif - -/* Enabled by default in 1.2.0. You can disable this if you don't need to - support PNGs that are embedded in MNG datastreams */ -#if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES) -# ifndef PNG_MNG_FEATURES_SUPPORTED -# define PNG_MNG_FEATURES_SUPPORTED -# endif -#endif - -#ifndef PNG_NO_FLOATING_POINT_SUPPORTED -# ifndef PNG_FLOATING_POINT_SUPPORTED -# define PNG_FLOATING_POINT_SUPPORTED -# endif -#endif - -/* If you are running on a machine where you cannot allocate more - * than 64K of memory at once, uncomment this. While libpng will not - * normally need that much memory in a chunk (unless you load up a very - * large file), zlib needs to know how big of a chunk it can use, and - * libpng thus makes sure to check any memory allocation to verify it - * will fit into memory. -#define PNG_MAX_MALLOC_64K - */ -#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K) -# define PNG_MAX_MALLOC_64K -#endif - -/* Special munging to support doing things the 'cygwin' way: - * 'Normal' png-on-win32 defines/defaults: - * PNG_BUILD_DLL -- building dll - * PNG_USE_DLL -- building an application, linking to dll - * (no define) -- building static library, or building an - * application and linking to the static lib - * 'Cygwin' defines/defaults: - * PNG_BUILD_DLL -- (ignored) building the dll - * (no define) -- (ignored) building an application, linking to the dll - * PNG_STATIC -- (ignored) building the static lib, or building an - * application that links to the static lib. - * ALL_STATIC -- (ignored) building various static libs, or building an - * application that links to the static libs. - * Thus, - * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and - * this bit of #ifdefs will define the 'correct' config variables based on - * that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but - * unnecessary. - * - * Also, the precedence order is: - * ALL_STATIC (since we can't #undef something outside our namespace) - * PNG_BUILD_DLL - * PNG_STATIC - * (nothing) == PNG_USE_DLL - * - * CYGWIN (2002-01-20): The preceding is now obsolete. With the advent - * of auto-import in binutils, we no longer need to worry about - * __declspec(dllexport) / __declspec(dllimport) and friends. Therefore, - * we don't need to worry about PNG_STATIC or ALL_STATIC when it comes - * to __declspec() stuff. However, we DO need to worry about - * PNG_BUILD_DLL and PNG_STATIC because those change some defaults - * such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed. - */ -#if defined(__CYGWIN__) -# if defined(ALL_STATIC) -# if defined(PNG_BUILD_DLL) -# undef PNG_BUILD_DLL -# endif -# if defined(PNG_USE_DLL) -# undef PNG_USE_DLL -# endif -# if defined(PNG_DLL) -# undef PNG_DLL -# endif -# if !defined(PNG_STATIC) -# define PNG_STATIC -# endif -# else -# if defined (PNG_BUILD_DLL) -# if defined(PNG_STATIC) -# undef PNG_STATIC -# endif -# if defined(PNG_USE_DLL) -# undef PNG_USE_DLL -# endif -# if !defined(PNG_DLL) -# define PNG_DLL -# endif -# else -# if defined(PNG_STATIC) -# if defined(PNG_USE_DLL) -# undef PNG_USE_DLL -# endif -# if defined(PNG_DLL) -# undef PNG_DLL -# endif -# else -# if !defined(PNG_USE_DLL) -# define PNG_USE_DLL -# endif -# if !defined(PNG_DLL) -# define PNG_DLL -# endif -# endif -# endif -# endif -#endif - -/* This protects us against compilers that run on a windowing system - * and thus don't have or would rather us not use the stdio types: - * stdin, stdout, and stderr. The only one currently used is stderr - * in png_error() and png_warning(). #defining PNG_NO_CONSOLE_IO will - * prevent these from being compiled and used. #defining PNG_NO_STDIO - * will also prevent these, plus will prevent the entire set of stdio - * macros and functions (FILE *, printf, etc.) from being compiled and used, - * unless (PNG_DEBUG > 0) has been #defined. - * - * #define PNG_NO_CONSOLE_IO - * #define PNG_NO_STDIO - */ - -#if defined(_WIN32_WCE) -# include - /* Console I/O functions are not supported on WindowsCE */ -# define PNG_NO_CONSOLE_IO -# ifdef PNG_DEBUG -# undef PNG_DEBUG -# endif -#endif - -#ifdef PNG_BUILD_DLL -# ifndef PNG_CONSOLE_IO_SUPPORTED -# ifndef PNG_NO_CONSOLE_IO -# define PNG_NO_CONSOLE_IO -# endif -# endif -#endif - -# ifdef PNG_NO_STDIO -# ifndef PNG_NO_CONSOLE_IO -# define PNG_NO_CONSOLE_IO -# endif -# ifdef PNG_DEBUG -# if (PNG_DEBUG > 0) -# include -# endif -# endif -# else -# if !defined(_WIN32_WCE) -/* "stdio.h" functions are not supported on WindowsCE */ -# include -# endif -# endif - -/* This macro protects us against machines that don't have function - * prototypes (ie K&R style headers). If your compiler does not handle - * function prototypes, define this macro and use the included ansi2knr. - * I've always been able to use _NO_PROTO as the indicator, but you may - * need to drag the empty declaration out in front of here, or change the - * ifdef to suit your own needs. - */ -#ifndef PNGARG - -#ifdef OF /* zlib prototype munger */ -# define PNGARG(arglist) OF(arglist) -#else - -#ifdef _NO_PROTO -# define PNGARG(arglist) () -# ifndef PNG_TYPECAST_NULL -# define PNG_TYPECAST_NULL -# endif -#else -# define PNGARG(arglist) arglist -#endif /* _NO_PROTO */ - -#endif /* OF */ - -#endif /* PNGARG */ - -/* Try to determine if we are compiling on a Mac. Note that testing for - * just __MWERKS__ is not good enough, because the Codewarrior is now used - * on non-Mac platforms. - */ -#ifndef MACOS -# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \ - defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC) -# define MACOS -# endif -#endif - -/* enough people need this for various reasons to include it here */ -#if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE) -# include -#endif - -#if !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED) -# define PNG_SETJMP_SUPPORTED -#endif - -#ifdef PNG_SETJMP_SUPPORTED -/* This is an attempt to force a single setjmp behaviour on Linux. If - * the X config stuff didn't define _BSD_SOURCE we wouldn't need this. - */ - -# ifdef __linux__ -# ifdef _BSD_SOURCE -# define PNG_SAVE_BSD_SOURCE -# undef _BSD_SOURCE -# endif -# ifdef _SETJMP_H - __png.h__ already includes setjmp.h; - __dont__ include it again.; -# endif -# endif /* __linux__ */ - - /* include setjmp.h for error handling */ -# include - -# ifdef __linux__ -# ifdef PNG_SAVE_BSD_SOURCE -# define _BSD_SOURCE -# undef PNG_SAVE_BSD_SOURCE -# endif -# endif /* __linux__ */ -#endif /* PNG_SETJMP_SUPPORTED */ - -#ifdef BSD -# include -#else -# include -#endif - -/* Other defines for things like memory and the like can go here. */ -#ifdef PNG_INTERNAL - -#include - -/* The functions exported by PNG_EXTERN are PNG_INTERNAL functions, which - * aren't usually used outside the library (as far as I know), so it is - * debatable if they should be exported at all. In the future, when it is - * possible to have run-time registry of chunk-handling functions, some of - * these will be made available again. -#define PNG_EXTERN extern - */ -#define PNG_EXTERN - -/* Other defines specific to compilers can go here. Try to keep - * them inside an appropriate ifdef/endif pair for portability. - */ - -#if defined(PNG_FLOATING_POINT_SUPPORTED) -# if defined(MACOS) - /* We need to check that hasn't already been included earlier - * as it seems it doesn't agree with , yet we should really use - * if possible. - */ -# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__) -# include -# endif -# else -# include -# endif -# if defined(_AMIGA) && defined(__SASC) && defined(_M68881) - /* Amiga SAS/C: We must include builtin FPU functions when compiling using - * MATH=68881 - */ -# include -# endif -#endif - -/* Codewarrior on NT has linking problems without this. */ -#if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__) -# define PNG_ALWAYS_EXTERN -#endif - -/* For some reason, Borland C++ defines memcmp, etc. in mem.h, not - * stdlib.h like it should (I think). Or perhaps this is a C++ - * "feature"? - */ -#ifdef __TURBOC__ -# include -# include "alloc.h" -#endif - -#if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \ - defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__)) -# include -#endif - -/* This controls how fine the dithering gets. As this allocates - * a largish chunk of memory (32K), those who are not as concerned - * with dithering quality can decrease some or all of these. - */ -#ifndef PNG_DITHER_RED_BITS -# define PNG_DITHER_RED_BITS 5 -#endif -#ifndef PNG_DITHER_GREEN_BITS -# define PNG_DITHER_GREEN_BITS 5 -#endif -#ifndef PNG_DITHER_BLUE_BITS -# define PNG_DITHER_BLUE_BITS 5 -#endif - -/* This controls how fine the gamma correction becomes when you - * are only interested in 8 bits anyway. Increasing this value - * results in more memory being used, and more pow() functions - * being called to fill in the gamma tables. Don't set this value - * less then 8, and even that may not work (I haven't tested it). - */ - -#ifndef PNG_MAX_GAMMA_8 -# define PNG_MAX_GAMMA_8 11 -#endif - -/* This controls how much a difference in gamma we can tolerate before - * we actually start doing gamma conversion. - */ -#ifndef PNG_GAMMA_THRESHOLD -# define PNG_GAMMA_THRESHOLD 0.05 -#endif - -#endif /* PNG_INTERNAL */ - -/* The following uses const char * instead of char * for error - * and warning message functions, so some compilers won't complain. - * If you do not want to use const, define PNG_NO_CONST here. - */ - -#ifndef PNG_NO_CONST -# define PNG_CONST const -#else -# define PNG_CONST -#endif - -/* The following defines give you the ability to remove code from the - * library that you will not be using. I wish I could figure out how to - * automate this, but I can't do that without making it seriously hard - * on the users. So if you are not using an ability, change the #define - * to and #undef, and that part of the library will not be compiled. If - * your linker can't find a function, you may want to make sure the - * ability is defined here. Some of these depend upon some others being - * defined. I haven't figured out all the interactions here, so you may - * have to experiment awhile to get everything to compile. If you are - * creating or using a shared library, you probably shouldn't touch this, - * as it will affect the size of the structures, and this will cause bad - * things to happen if the library and/or application ever change. - */ - -/* Any features you will not be using can be undef'ed here */ - -/* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user - * to turn it off with "*TRANSFORMS_NOT_SUPPORTED" or *PNG_NO_*_TRANSFORMS - * on the compile line, then pick and choose which ones to define without - * having to edit this file. It is safe to use the *TRANSFORMS_NOT_SUPPORTED - * if you only want to have a png-compliant reader/writer but don't need - * any of the extra transformations. This saves about 80 kbytes in a - * typical installation of the library. (PNG_NO_* form added in version - * 1.0.1c, for consistency) - */ - -/* The size of the png_text structure changed in libpng-1.0.6 when - * iTXt is supported. It is turned off by default, to support old apps - * that malloc the png_text structure instead of calling png_set_text() - * and letting libpng malloc it. It will be turned on by default in - * libpng-1.3.0. - */ - -#ifndef PNG_iTXt_SUPPORTED -# if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt) -# define PNG_NO_READ_iTXt -# endif -# if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt) -# define PNG_NO_WRITE_iTXt -# endif -#endif - -/* The following support, added after version 1.0.0, can be turned off here en - * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility - * with old applications that require the length of png_struct and png_info - * to remain unchanged. - */ - -#ifdef PNG_LEGACY_SUPPORTED -# define PNG_NO_FREE_ME -# define PNG_NO_READ_UNKNOWN_CHUNKS -# define PNG_NO_WRITE_UNKNOWN_CHUNKS -# define PNG_NO_READ_USER_CHUNKS -# define PNG_NO_READ_iCCP -# define PNG_NO_WRITE_iCCP -# define PNG_NO_READ_iTXt -# define PNG_NO_WRITE_iTXt -# define PNG_NO_READ_sCAL -# define PNG_NO_WRITE_sCAL -# define PNG_NO_READ_sPLT -# define PNG_NO_WRITE_sPLT -# define PNG_NO_INFO_IMAGE -# define PNG_NO_READ_RGB_TO_GRAY -# define PNG_NO_READ_USER_TRANSFORM -# define PNG_NO_WRITE_USER_TRANSFORM -# define PNG_NO_USER_MEM -# define PNG_NO_READ_EMPTY_PLTE -# define PNG_NO_MNG_FEATURES -# define PNG_NO_FIXED_POINT_SUPPORTED -#endif - -/* Ignore attempt to turn off both floating and fixed point support */ -#if !defined(PNG_FLOATING_POINT_SUPPORTED) || \ - !defined(PNG_NO_FIXED_POINT_SUPPORTED) -# define PNG_FIXED_POINT_SUPPORTED -#endif - -#ifndef PNG_NO_FREE_ME -# define PNG_FREE_ME_SUPPORTED -#endif - -#if defined(PNG_READ_SUPPORTED) - -#if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \ - !defined(PNG_NO_READ_TRANSFORMS) -# define PNG_READ_TRANSFORMS_SUPPORTED -#endif - -#ifdef PNG_READ_TRANSFORMS_SUPPORTED -# ifndef PNG_NO_READ_EXPAND -# define PNG_READ_EXPAND_SUPPORTED -# endif -# ifndef PNG_NO_READ_SHIFT -# define PNG_READ_SHIFT_SUPPORTED -# endif -# ifndef PNG_NO_READ_PACK -# define PNG_READ_PACK_SUPPORTED -# endif -# ifndef PNG_NO_READ_BGR -# define PNG_READ_BGR_SUPPORTED -# endif -# ifndef PNG_NO_READ_SWAP -# define PNG_READ_SWAP_SUPPORTED -# endif -# ifndef PNG_NO_READ_PACKSWAP -# define PNG_READ_PACKSWAP_SUPPORTED -# endif -# ifndef PNG_NO_READ_INVERT -# define PNG_READ_INVERT_SUPPORTED -# endif -# ifndef PNG_NO_READ_DITHER -# define PNG_READ_DITHER_SUPPORTED -# endif -# ifndef PNG_NO_READ_BACKGROUND -# define PNG_READ_BACKGROUND_SUPPORTED -# endif -# ifndef PNG_NO_READ_16_TO_8 -# define PNG_READ_16_TO_8_SUPPORTED -# endif -# ifndef PNG_NO_READ_FILLER -# define PNG_READ_FILLER_SUPPORTED -# endif -# ifndef PNG_NO_READ_GAMMA -# define PNG_READ_GAMMA_SUPPORTED -# endif -# ifndef PNG_NO_READ_GRAY_TO_RGB -# define PNG_READ_GRAY_TO_RGB_SUPPORTED -# endif -# ifndef PNG_NO_READ_SWAP_ALPHA -# define PNG_READ_SWAP_ALPHA_SUPPORTED -# endif -# ifndef PNG_NO_READ_INVERT_ALPHA -# define PNG_READ_INVERT_ALPHA_SUPPORTED -# endif -# ifndef PNG_NO_READ_STRIP_ALPHA -# define PNG_READ_STRIP_ALPHA_SUPPORTED -# endif -# ifndef PNG_NO_READ_USER_TRANSFORM -# define PNG_READ_USER_TRANSFORM_SUPPORTED -# endif -# ifndef PNG_NO_READ_RGB_TO_GRAY -# define PNG_READ_RGB_TO_GRAY_SUPPORTED -# endif -#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ - -#if !defined(PNG_NO_PROGRESSIVE_READ) && \ - !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED) /* if you don't do progressive */ -# define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */ -#endif /* about interlacing capability! You'll */ - /* still have interlacing unless you change the following line: */ - -#define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */ - -#ifndef PNG_NO_READ_COMPOSITE_NODIV -# ifndef PNG_NO_READ_COMPOSITED_NODIV /* libpng-1.0.x misspelling */ -# define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */ -# endif -#endif - -/* Deprecated, will be removed from version 2.0.0. - Use PNG_MNG_FEATURES_SUPPORTED instead. */ -#ifndef PNG_NO_READ_EMPTY_PLTE -# define PNG_READ_EMPTY_PLTE_SUPPORTED -#endif - -#endif /* PNG_READ_SUPPORTED */ - -#if defined(PNG_WRITE_SUPPORTED) - -# if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \ - !defined(PNG_NO_WRITE_TRANSFORMS) -# define PNG_WRITE_TRANSFORMS_SUPPORTED -#endif - -#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED -# ifndef PNG_NO_WRITE_SHIFT -# define PNG_WRITE_SHIFT_SUPPORTED -# endif -# ifndef PNG_NO_WRITE_PACK -# define PNG_WRITE_PACK_SUPPORTED -# endif -# ifndef PNG_NO_WRITE_BGR -# define PNG_WRITE_BGR_SUPPORTED -# endif -# ifndef PNG_NO_WRITE_SWAP -# define PNG_WRITE_SWAP_SUPPORTED -# endif -# ifndef PNG_NO_WRITE_PACKSWAP -# define PNG_WRITE_PACKSWAP_SUPPORTED -# endif -# ifndef PNG_NO_WRITE_INVERT -# define PNG_WRITE_INVERT_SUPPORTED -# endif -# ifndef PNG_NO_WRITE_FILLER -# define PNG_WRITE_FILLER_SUPPORTED /* same as WRITE_STRIP_ALPHA */ -# endif -# ifndef PNG_NO_WRITE_SWAP_ALPHA -# define PNG_WRITE_SWAP_ALPHA_SUPPORTED -# endif -# ifndef PNG_NO_WRITE_INVERT_ALPHA -# define PNG_WRITE_INVERT_ALPHA_SUPPORTED -# endif -# ifndef PNG_NO_WRITE_USER_TRANSFORM -# define PNG_WRITE_USER_TRANSFORM_SUPPORTED -# endif -#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */ - -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) -# ifndef PNG_NO_USER_TRANSFORM_PTR -# define PNG_USER_TRANSFORM_PTR_SUPPORTED -# endif -#endif - -#define PNG_WRITE_INTERLACING_SUPPORTED /* not required for PNG-compliant - encoders, but can cause trouble - if left undefined */ - -#if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \ - defined(PNG_FLOATING_POINT_SUPPORTED) -# define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED -#endif - -#ifndef PNG_1_0_X -#ifndef PNG_NO_ERROR_NUMBERS -#define PNG_ERROR_NUMBERS_SUPPORTED -#endif -#endif /* PNG_1_0_X */ - -#ifndef PNG_NO_WRITE_FLUSH -# define PNG_WRITE_FLUSH_SUPPORTED -#endif - -/* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */ -#ifndef PNG_NO_WRITE_EMPTY_PLTE -# define PNG_WRITE_EMPTY_PLTE_SUPPORTED -#endif - -#endif /* PNG_WRITE_SUPPORTED */ - -#ifndef PNG_NO_STDIO -# define PNG_TIME_RFC1123_SUPPORTED -#endif - -/* This adds extra functions in pngget.c for accessing data from the - * info pointer (added in version 0.99) - * png_get_image_width() - * png_get_image_height() - * png_get_bit_depth() - * png_get_color_type() - * png_get_compression_type() - * png_get_filter_type() - * png_get_interlace_type() - * png_get_pixel_aspect_ratio() - * png_get_pixels_per_meter() - * png_get_x_offset_pixels() - * png_get_y_offset_pixels() - * png_get_x_offset_microns() - * png_get_y_offset_microns() - */ -#if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED) -# define PNG_EASY_ACCESS_SUPPORTED -#endif - -/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0 - even when PNG_USE_PNGVCRD or PNG_USE_PNGGCCRD is not defined */ -#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE) -# ifndef PNG_ASSEMBLER_CODE_SUPPORTED -# define PNG_ASSEMBLER_CODE_SUPPORTED -# endif -# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) -# define PNG_MMX_CODE_SUPPORTED -# endif -#endif - -/* If you are sure that you don't need thread safety and you are compiling - with PNG_USE_PNGCCRD for an MMX application, you can define this for - faster execution. See pnggccrd.c. -#define PNG_THREAD_UNSAFE_OK -*/ - -#if !defined(PNG_1_0_X) -#if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED) -# define PNG_USER_MEM_SUPPORTED -#endif -#endif /* PNG_1_0_X */ - -/* These are currently experimental features, define them if you want */ - -/* very little testing */ -/* -#ifdef PNG_READ_SUPPORTED -# ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED -# define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED -# endif -#endif -*/ - -/* This is only for PowerPC big-endian and 680x0 systems */ -/* some testing */ -/* -#ifdef PNG_READ_SUPPORTED -# ifndef PNG_PNG_READ_BIG_ENDIAN_SUPPORTED -# define PNG_READ_BIG_ENDIAN_SUPPORTED -# endif -#endif -*/ - -/* Buggy compilers (e.g., gcc 2.7.2.2) need this */ -/* -#define PNG_NO_POINTER_INDEXING -*/ - -/* These functions are turned off by default, as they will be phased out. */ -/* -#define PNG_USELESS_TESTS_SUPPORTED -#define PNG_CORRECT_PALETTE_SUPPORTED -*/ - -/* Any chunks you are not interested in, you can undef here. The - * ones that allocate memory may be expecially important (hIST, - * tEXt, zTXt, tRNS, pCAL). Others will just save time and make png_info - * a bit smaller. - */ - -#if defined(PNG_READ_SUPPORTED) && \ - !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \ - !defined(PNG_NO_READ_ANCILLARY_CHUNKS) -# define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED -#endif - -#if defined(PNG_WRITE_SUPPORTED) && \ - !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \ - !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS) -# define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED -#endif - -#ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED - -#ifdef PNG_NO_READ_TEXT -# define PNG_NO_READ_iTXt -# define PNG_NO_READ_tEXt -# define PNG_NO_READ_zTXt -#endif -#ifndef PNG_NO_READ_bKGD -# define PNG_READ_bKGD_SUPPORTED -# define PNG_bKGD_SUPPORTED -#endif -#ifndef PNG_NO_READ_cHRM -# define PNG_READ_cHRM_SUPPORTED -# define PNG_cHRM_SUPPORTED -#endif -#ifndef PNG_NO_READ_gAMA -# define PNG_READ_gAMA_SUPPORTED -# define PNG_gAMA_SUPPORTED -#endif -#ifndef PNG_NO_READ_hIST -# define PNG_READ_hIST_SUPPORTED -# define PNG_hIST_SUPPORTED -#endif -#ifndef PNG_NO_READ_iCCP -# define PNG_READ_iCCP_SUPPORTED -# define PNG_iCCP_SUPPORTED -#endif -#ifndef PNG_NO_READ_iTXt -# ifndef PNG_READ_iTXt_SUPPORTED -# define PNG_READ_iTXt_SUPPORTED -# endif -# ifndef PNG_iTXt_SUPPORTED -# define PNG_iTXt_SUPPORTED -# endif -#endif -#ifndef PNG_NO_READ_oFFs -# define PNG_READ_oFFs_SUPPORTED -# define PNG_oFFs_SUPPORTED -#endif -#ifndef PNG_NO_READ_pCAL -# define PNG_READ_pCAL_SUPPORTED -# define PNG_pCAL_SUPPORTED -#endif -#ifndef PNG_NO_READ_sCAL -# define PNG_READ_sCAL_SUPPORTED -# define PNG_sCAL_SUPPORTED -#endif -#ifndef PNG_NO_READ_pHYs -# define PNG_READ_pHYs_SUPPORTED -# define PNG_pHYs_SUPPORTED -#endif -#ifndef PNG_NO_READ_sBIT -# define PNG_READ_sBIT_SUPPORTED -# define PNG_sBIT_SUPPORTED -#endif -#ifndef PNG_NO_READ_sPLT -# define PNG_READ_sPLT_SUPPORTED -# define PNG_sPLT_SUPPORTED -#endif -#ifndef PNG_NO_READ_sRGB -# define PNG_READ_sRGB_SUPPORTED -# define PNG_sRGB_SUPPORTED -#endif -#ifndef PNG_NO_READ_tEXt -# define PNG_READ_tEXt_SUPPORTED -# define PNG_tEXt_SUPPORTED -#endif -#ifndef PNG_NO_READ_tIME -# define PNG_READ_tIME_SUPPORTED -# define PNG_tIME_SUPPORTED -#endif -#ifndef PNG_NO_READ_tRNS -# define PNG_READ_tRNS_SUPPORTED -# define PNG_tRNS_SUPPORTED -#endif -#ifndef PNG_NO_READ_zTXt -# define PNG_READ_zTXt_SUPPORTED -# define PNG_zTXt_SUPPORTED -#endif -#ifndef PNG_NO_READ_UNKNOWN_CHUNKS -# define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED -# ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED -# define PNG_UNKNOWN_CHUNKS_SUPPORTED -# endif -# ifndef PNG_NO_HANDLE_AS_UNKNOWN -# define PNG_HANDLE_AS_UNKNOWN_SUPPORTED -# endif -#endif -#if !defined(PNG_NO_READ_USER_CHUNKS) && \ - defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) -# define PNG_READ_USER_CHUNKS_SUPPORTED -# define PNG_USER_CHUNKS_SUPPORTED -# ifdef PNG_NO_READ_UNKNOWN_CHUNKS -# undef PNG_NO_READ_UNKNOWN_CHUNKS -# endif -# ifdef PNG_NO_HANDLE_AS_UNKNOWN -# undef PNG_NO_HANDLE_AS_UNKNOWN -# endif -#endif -#ifndef PNG_NO_READ_OPT_PLTE -# define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */ -#endif /* optional PLTE chunk in RGB and RGBA images */ -#if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \ - defined(PNG_READ_zTXt_SUPPORTED) -# define PNG_READ_TEXT_SUPPORTED -# define PNG_TEXT_SUPPORTED -#endif - -#endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */ - -#ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED - -#ifdef PNG_NO_WRITE_TEXT -# define PNG_NO_WRITE_iTXt -# define PNG_NO_WRITE_tEXt -# define PNG_NO_WRITE_zTXt -#endif -#ifndef PNG_NO_WRITE_bKGD -# define PNG_WRITE_bKGD_SUPPORTED -# ifndef PNG_bKGD_SUPPORTED -# define PNG_bKGD_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_cHRM -# define PNG_WRITE_cHRM_SUPPORTED -# ifndef PNG_cHRM_SUPPORTED -# define PNG_cHRM_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_gAMA -# define PNG_WRITE_gAMA_SUPPORTED -# ifndef PNG_gAMA_SUPPORTED -# define PNG_gAMA_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_hIST -# define PNG_WRITE_hIST_SUPPORTED -# ifndef PNG_hIST_SUPPORTED -# define PNG_hIST_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_iCCP -# define PNG_WRITE_iCCP_SUPPORTED -# ifndef PNG_iCCP_SUPPORTED -# define PNG_iCCP_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_iTXt -# ifndef PNG_WRITE_iTXt_SUPPORTED -# define PNG_WRITE_iTXt_SUPPORTED -# endif -# ifndef PNG_iTXt_SUPPORTED -# define PNG_iTXt_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_oFFs -# define PNG_WRITE_oFFs_SUPPORTED -# ifndef PNG_oFFs_SUPPORTED -# define PNG_oFFs_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_pCAL -# define PNG_WRITE_pCAL_SUPPORTED -# ifndef PNG_pCAL_SUPPORTED -# define PNG_pCAL_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_sCAL -# define PNG_WRITE_sCAL_SUPPORTED -# ifndef PNG_sCAL_SUPPORTED -# define PNG_sCAL_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_pHYs -# define PNG_WRITE_pHYs_SUPPORTED -# ifndef PNG_pHYs_SUPPORTED -# define PNG_pHYs_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_sBIT -# define PNG_WRITE_sBIT_SUPPORTED -# ifndef PNG_sBIT_SUPPORTED -# define PNG_sBIT_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_sPLT -# define PNG_WRITE_sPLT_SUPPORTED -# ifndef PNG_sPLT_SUPPORTED -# define PNG_sPLT_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_sRGB -# define PNG_WRITE_sRGB_SUPPORTED -# ifndef PNG_sRGB_SUPPORTED -# define PNG_sRGB_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_tEXt -# define PNG_WRITE_tEXt_SUPPORTED -# ifndef PNG_tEXt_SUPPORTED -# define PNG_tEXt_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_tIME -# define PNG_WRITE_tIME_SUPPORTED -# ifndef PNG_tIME_SUPPORTED -# define PNG_tIME_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_tRNS -# define PNG_WRITE_tRNS_SUPPORTED -# ifndef PNG_tRNS_SUPPORTED -# define PNG_tRNS_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_zTXt -# define PNG_WRITE_zTXt_SUPPORTED -# ifndef PNG_zTXt_SUPPORTED -# define PNG_zTXt_SUPPORTED -# endif -#endif -#ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS -# define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED -# ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED -# define PNG_UNKNOWN_CHUNKS_SUPPORTED -# endif -# ifndef PNG_NO_HANDLE_AS_UNKNOWN -# ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED -# define PNG_HANDLE_AS_UNKNOWN_SUPPORTED -# endif -# endif -#endif -#if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \ - defined(PNG_WRITE_zTXt_SUPPORTED) -# define PNG_WRITE_TEXT_SUPPORTED -# ifndef PNG_TEXT_SUPPORTED -# define PNG_TEXT_SUPPORTED -# endif -#endif - -#endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */ - -/* Turn this off to disable png_read_png() and - * png_write_png() and leave the row_pointers member - * out of the info structure. - */ -#ifndef PNG_NO_INFO_IMAGE -# define PNG_INFO_IMAGE_SUPPORTED -#endif - -/* need the time information for reading tIME chunks */ -#if defined(PNG_tIME_SUPPORTED) -# if !defined(_WIN32_WCE) - /* "time.h" functions are not supported on WindowsCE */ -# include -# endif -#endif - -/* Some typedefs to get us started. These should be safe on most of the - * common platforms. The typedefs should be at least as large as the - * numbers suggest (a png_uint_32 must be at least 32 bits long), but they - * don't have to be exactly that size. Some compilers dislike passing - * unsigned shorts as function parameters, so you may be better off using - * unsigned int for png_uint_16. Likewise, for 64-bit systems, you may - * want to have unsigned int for png_uint_32 instead of unsigned long. - */ - -typedef unsigned long png_uint_32; -typedef long png_int_32; -typedef unsigned short png_uint_16; -typedef short png_int_16; -typedef unsigned char png_byte; - -/* This is usually size_t. It is typedef'ed just in case you need it to - change (I'm not sure if you will or not, so I thought I'd be safe) */ -typedef size_t png_size_t; - -/* The following is needed for medium model support. It cannot be in the - * PNG_INTERNAL section. Needs modification for other compilers besides - * MSC. Model independent support declares all arrays and pointers to be - * large using the far keyword. The zlib version used must also support - * model independent data. As of version zlib 1.0.4, the necessary changes - * have been made in zlib. The USE_FAR_KEYWORD define triggers other - * changes that are needed. (Tim Wegner) - */ - -/* Separate compiler dependencies (problem here is that zlib.h always - defines FAR. (SJT) */ -#ifdef __BORLANDC__ -# if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__) -# define LDATA 1 -# else -# define LDATA 0 -# endif - /* GRR: why is Cygwin in here? Cygwin is not Borland C... */ -# if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__) -# define PNG_MAX_MALLOC_64K -# if (LDATA != 1) -# ifndef FAR -# define FAR __far -# endif -# define USE_FAR_KEYWORD -# endif /* LDATA != 1 */ - /* Possibly useful for moving data out of default segment. - * Uncomment it if you want. Could also define FARDATA as - * const if your compiler supports it. (SJT) -# define FARDATA FAR - */ -# endif /* __WIN32__, __FLAT__, __CYGWIN__ */ -#endif /* __BORLANDC__ */ - - -/* Suggest testing for specific compiler first before testing for - * FAR. The Watcom compiler defines both __MEDIUM__ and M_I86MM, - * making reliance oncertain keywords suspect. (SJT) - */ - -/* MSC Medium model */ -#if defined(FAR) -# if defined(M_I86MM) -# define USE_FAR_KEYWORD -# define FARDATA FAR -# include -# endif -#endif - -/* SJT: default case */ -#ifndef FAR -# define FAR -#endif - -/* At this point FAR is always defined */ -#ifndef FARDATA -# define FARDATA -#endif - -/* Typedef for floating-point numbers that are converted - to fixed-point with a multiple of 100,000, e.g., int_gamma */ -typedef png_int_32 png_fixed_point; - -/* Add typedefs for pointers */ -typedef void FAR * png_voidp; -typedef png_byte FAR * png_bytep; -typedef png_uint_32 FAR * png_uint_32p; -typedef png_int_32 FAR * png_int_32p; -typedef png_uint_16 FAR * png_uint_16p; -typedef png_int_16 FAR * png_int_16p; -typedef PNG_CONST char FAR * png_const_charp; -typedef char FAR * png_charp; -typedef png_fixed_point FAR * png_fixed_point_p; - -#ifndef PNG_NO_STDIO -#if defined(_WIN32_WCE) -typedef HANDLE png_FILE_p; -#else -typedef FILE * png_FILE_p; -#endif -#endif - -#ifdef PNG_FLOATING_POINT_SUPPORTED -typedef double FAR * png_doublep; -#endif - -/* Pointers to pointers; i.e. arrays */ -typedef png_byte FAR * FAR * png_bytepp; -typedef png_uint_32 FAR * FAR * png_uint_32pp; -typedef png_int_32 FAR * FAR * png_int_32pp; -typedef png_uint_16 FAR * FAR * png_uint_16pp; -typedef png_int_16 FAR * FAR * png_int_16pp; -typedef PNG_CONST char FAR * FAR * png_const_charpp; -typedef char FAR * FAR * png_charpp; -typedef png_fixed_point FAR * FAR * png_fixed_point_pp; -#ifdef PNG_FLOATING_POINT_SUPPORTED -typedef double FAR * FAR * png_doublepp; -#endif - -/* Pointers to pointers to pointers; i.e., pointer to array */ -typedef char FAR * FAR * FAR * png_charppp; - -/* libpng typedefs for types in zlib. If zlib changes - * or another compression library is used, then change these. - * Eliminates need to change all the source files. - */ -typedef charf * png_zcharp; -typedef charf * FAR * png_zcharpp; -typedef z_stream FAR * png_zstreamp; - -/* - * Define PNG_BUILD_DLL if the module being built is a Windows - * LIBPNG DLL. - * - * Define PNG_USE_DLL if you want to *link* to the Windows LIBPNG DLL. - * It is equivalent to Microsoft predefined macro _DLL that is - * automatically defined when you compile using the share - * version of the CRT (C Run-Time library) - * - * The cygwin mods make this behavior a little different: - * Define PNG_BUILD_DLL if you are building a dll for use with cygwin - * Define PNG_STATIC if you are building a static library for use with cygwin, - * -or- if you are building an application that you want to link to the - * static library. - * PNG_USE_DLL is defined by default (no user action needed) unless one of - * the other flags is defined. - */ - -#if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL)) -# define PNG_DLL -#endif -/* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib. - * When building a static lib, default to no GLOBAL ARRAYS, but allow - * command-line override - */ -#if defined(__CYGWIN__) -# if !defined(PNG_STATIC) -# if defined(PNG_USE_GLOBAL_ARRAYS) -# undef PNG_USE_GLOBAL_ARRAYS -# endif -# if !defined(PNG_USE_LOCAL_ARRAYS) -# define PNG_USE_LOCAL_ARRAYS -# endif -# else -# if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS) -# if defined(PNG_USE_GLOBAL_ARRAYS) -# undef PNG_USE_GLOBAL_ARRAYS -# endif -# endif -# endif -# if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS) -# define PNG_USE_LOCAL_ARRAYS -# endif -#endif - -/* Do not use global arrays (helps with building DLL's) - * They are no longer used in libpng itself, since version 1.0.5c, - * but might be required for some pre-1.0.5c applications. - */ -#if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS) -# if defined(PNG_NO_GLOBAL_ARRAYS) || (defined(__GNUC__) && defined(PNG_DLL)) -# define PNG_USE_LOCAL_ARRAYS -# else -# define PNG_USE_GLOBAL_ARRAYS -# endif -#endif - -#if defined(__CYGWIN__) -# undef PNGAPI -# define PNGAPI __cdecl -# undef PNG_IMPEXP -# define PNG_IMPEXP -#endif - -/* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall", - * you may get warnings regarding the linkage of png_zalloc and png_zfree. - * Don't ignore those warnings; you must also reset the default calling - * convention in your compiler to match your PNGAPI, and you must build - * zlib and your applications the same way you build libpng. - */ - -#ifndef PNGAPI - -#if defined(__MINGW32__) && !defined(PNG_MODULEDEF) -# ifndef PNG_NO_MODULEDEF -# define PNG_NO_MODULEDEF -# endif -#endif - -#if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF) -# define PNG_IMPEXP -#endif - -#if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \ - (( defined(_Windows) || defined(_WINDOWS) || \ - defined(WIN32) || defined(_WIN32) || defined(__WIN32__) )) - -# if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800)) -# define PNGAPI __cdecl -# else -# define PNGAPI _cdecl -# endif - -# if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \ - 0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */) -# define PNG_IMPEXP -# endif - -# if !defined(PNG_IMPEXP) - -# define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol -# define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol - - /* Borland/Microsoft */ -# if defined(_MSC_VER) || defined(__BORLANDC__) -# if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500) -# define PNG_EXPORT PNG_EXPORT_TYPE1 -# else -# define PNG_EXPORT PNG_EXPORT_TYPE2 -# if defined(PNG_BUILD_DLL) -# define PNG_IMPEXP __export -# else -# define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in - VC++ */ -# endif /* Exists in Borland C++ for - C++ classes (== huge) */ -# endif -# endif - -# if !defined(PNG_IMPEXP) -# if defined(PNG_BUILD_DLL) -# define PNG_IMPEXP __declspec(dllexport) -# else -# define PNG_IMPEXP __declspec(dllimport) -# endif -# endif -# endif /* PNG_IMPEXP */ -#else /* !(DLL || non-cygwin WINDOWS) */ -# if (defined(__IBMC__) || defined(IBMCPP__)) && defined(__OS2__) -# define PNGAPI _System -# define PNG_IMPEXP -# else -# if 0 /* ... other platforms, with other meanings */ -# else -# define PNGAPI -# define PNG_IMPEXP -# endif -# endif -#endif -#endif - -#ifndef PNGAPI -# define PNGAPI -#endif -#ifndef PNG_IMPEXP -# define PNG_IMPEXP -#endif - -#ifndef PNG_EXPORT -# define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol -#endif - -#ifdef PNG_USE_GLOBAL_ARRAYS -# ifndef PNG_EXPORT_VAR -# define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type -# endif -#endif - -/* User may want to use these so they are not in PNG_INTERNAL. Any library - * functions that are passed far data must be model independent. - */ - -#ifndef PNG_ABORT -# define PNG_ABORT() abort() -#endif - -#ifdef PNG_SETJMP_SUPPORTED -# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) -#else -# define png_jmpbuf(png_ptr) \ - (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED) -#endif - -#if defined(USE_FAR_KEYWORD) /* memory model independent fns */ -/* use this to make far-to-near assignments */ -# define CHECK 1 -# define NOCHECK 0 -# define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK)) -# define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK)) -# define png_strcpy _fstrcpy -# define png_strlen _fstrlen -# define png_memcmp _fmemcmp /* SJT: added */ -# define png_memcpy _fmemcpy -# define png_memset _fmemset -#else /* use the usual functions */ -# define CVT_PTR(ptr) (ptr) -# define CVT_PTR_NOCHECK(ptr) (ptr) -# define png_strcpy strcpy -# define png_strlen strlen -# define png_memcmp memcmp /* SJT: added */ -# define png_memcpy memcpy -# define png_memset memset -#endif -/* End of memory model independent support */ - -/* Just a little check that someone hasn't tried to define something - * contradictory. - */ -#if (PNG_ZBUF_SIZE > 65536) && defined(PNG_MAX_MALLOC_64K) -# undef PNG_ZBUF_SIZE -# define PNG_ZBUF_SIZE 65536 -#endif - -#ifdef PNG_READ_SUPPORTED -/* Prior to libpng-1.0.9, this block was in pngasmrd.h */ -#if defined(PNG_INTERNAL) - -/* These are the default thresholds before the MMX code kicks in; if either - * rowbytes or bitdepth is below the threshold, plain C code is used. These - * can be overridden at runtime via the png_set_mmx_thresholds() call in - * libpng 1.2.0 and later. The values below were chosen by Intel. - */ - -#ifndef PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT -# define PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT 128 /* >= */ -#endif -#ifndef PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT -# define PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT 9 /* >= */ -#endif - -/* Set this in the makefile for VC++ on Pentium, not here. */ -/* Platform must be Pentium. Makefile must assemble and load pngvcrd.c . - * MMX will be detected at run time and used if present. - */ -#ifdef PNG_USE_PNGVCRD -# define PNG_HAVE_ASSEMBLER_COMBINE_ROW -# define PNG_HAVE_ASSEMBLER_READ_INTERLACE -# define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW -#endif - -/* Set this in the makefile for gcc/as on Pentium, not here. */ -/* Platform must be Pentium. Makefile must assemble and load pnggccrd.c . - * MMX will be detected at run time and used if present. - */ -#ifdef PNG_USE_PNGGCCRD -# define PNG_HAVE_ASSEMBLER_COMBINE_ROW -# define PNG_HAVE_ASSEMBLER_READ_INTERLACE -# define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW -#endif -/* - see pnggccrd.c for info about what is currently enabled */ - -#endif /* PNG_INTERNAL */ -#endif /* PNG_READ_SUPPORTED */ - -#endif /* PNGCONF_H */ - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngerror.c b/gtkmm-osx/trunk/libpng-1.2.5/pngerror.c deleted file mode 100644 index fc3c304..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/pngerror.c +++ /dev/null @@ -1,291 +0,0 @@ - -/* pngerror.c - stub functions for i/o and memory allocation - * - * libpng 1.2.5 - October 3, 2002 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2002 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) - * - * This file provides a location for all error handling. Users who - * need special error handling are expected to write replacement functions - * and use png_set_error_fn() to use those functions. See the instructions - * at each function. - */ - -#define PNG_INTERNAL -#include "png.h" - -static void /* PRIVATE */ -png_default_error PNGARG((png_structp png_ptr, - png_const_charp error_message)); -static void /* PRIVATE */ -png_default_warning PNGARG((png_structp png_ptr, - png_const_charp warning_message)); - -/* This function is called whenever there is a fatal error. This function - * should not be changed. If there is a need to handle errors differently, - * you should supply a replacement error function and use png_set_error_fn() - * to replace the error function at run-time. - */ -void PNGAPI -png_error(png_structp png_ptr, png_const_charp error_message) -{ -#ifdef PNG_ERROR_NUMBERS_SUPPORTED - char msg[16]; - if (png_ptr->flags&(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT)) - { - int offset = 0; - if (*error_message == '#') - { - for (offset=1; offset<15; offset++) - if (*(error_message+offset) == ' ') - break; - if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT) - { - int i; - for (i=0; iflags&PNG_FLAG_STRIP_ERROR_TEXT) - { - msg[0]='0'; - msg[1]='\0'; - error_message=msg; - } - } - } -#endif - if (png_ptr->error_fn != NULL) - (*(png_ptr->error_fn))(png_ptr, error_message); - - /* if the following returns or doesn't exist, use the default function, - which will not return */ - png_default_error(png_ptr, error_message); -} - -/* This function is called whenever there is a non-fatal error. This function - * should not be changed. If there is a need to handle warnings differently, - * you should supply a replacement warning function and use - * png_set_error_fn() to replace the warning function at run-time. - */ -void PNGAPI -png_warning(png_structp png_ptr, png_const_charp warning_message) -{ - int offset = 0; -#ifdef PNG_ERROR_NUMBERS_SUPPORTED - if (png_ptr->flags&(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT)) -#endif - { - if (*warning_message == '#') - { - for (offset=1; offset<15; offset++) - if (*(warning_message+offset) == ' ') - break; - } - } - if (png_ptr->warning_fn != NULL) - (*(png_ptr->warning_fn))(png_ptr, - (png_const_charp)(warning_message+offset)); - else - png_default_warning(png_ptr, (png_const_charp)(warning_message+offset)); -} - -/* These utilities are used internally to build an error message that relates - * to the current chunk. The chunk name comes from png_ptr->chunk_name, - * this is used to prefix the message. The message is limited in length - * to 63 bytes, the name characters are output as hex digits wrapped in [] - * if the character is invalid. - */ -#define isnonalpha(c) ((c) < 41 || (c) > 122 || ((c) > 90 && (c) < 97)) -static PNG_CONST char png_digit[16] = { - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', - 'F' }; - -static void /* PRIVATE */ -png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp - error_message) -{ - int iout = 0, iin = 0; - - while (iin < 4) - { - int c = png_ptr->chunk_name[iin++]; - if (isnonalpha(c)) - { - buffer[iout++] = '['; - buffer[iout++] = png_digit[(c & 0xf0) >> 4]; - buffer[iout++] = png_digit[c & 0x0f]; - buffer[iout++] = ']'; - } - else - { - buffer[iout++] = (png_byte)c; - } - } - - if (error_message == NULL) - buffer[iout] = 0; - else - { - buffer[iout++] = ':'; - buffer[iout++] = ' '; - png_memcpy(buffer+iout, error_message, 64); - buffer[iout+63] = 0; - } -} - -void PNGAPI -png_chunk_error(png_structp png_ptr, png_const_charp error_message) -{ - char msg[18+64]; - png_format_buffer(png_ptr, msg, error_message); - png_error(png_ptr, msg); -} - -void PNGAPI -png_chunk_warning(png_structp png_ptr, png_const_charp warning_message) -{ - char msg[18+64]; - png_format_buffer(png_ptr, msg, warning_message); - png_warning(png_ptr, msg); -} - -/* This is the default error handling function. Note that replacements for - * this function MUST NOT RETURN, or the program will likely crash. This - * function is used by default, or if the program supplies NULL for the - * error function pointer in png_set_error_fn(). - */ -static void /* PRIVATE */ -png_default_error(png_structp png_ptr, png_const_charp error_message) -{ -#ifndef PNG_NO_CONSOLE_IO -#ifdef PNG_ERROR_NUMBERS_SUPPORTED - if (*error_message == '#') - { - int offset; - char error_number[16]; - for (offset=0; offset<15; offset++) - { - error_number[offset] = *(error_message+offset+1); - if (*(error_message+offset) == ' ') - break; - } - if((offset > 1) && (offset < 15)) - { - error_number[offset-1]='\0'; - fprintf(stderr, "libpng error no. %s: %s\n", error_number, - error_message+offset); - } - else - fprintf(stderr, "libpng error: %s, offset=%d\n", error_message,offset); - } - else -#endif - fprintf(stderr, "libpng error: %s\n", error_message); -#else - if (error_message) - /* make compiler happy */ ; -#endif - -#ifdef PNG_SETJMP_SUPPORTED -# ifdef USE_FAR_KEYWORD - { - jmp_buf jmpbuf; - png_memcpy(jmpbuf,png_ptr->jmpbuf,sizeof(jmp_buf)); - longjmp(jmpbuf, 1); - } -# else - longjmp(png_ptr->jmpbuf, 1); -# endif -#else - if (png_ptr) - /* make compiler happy */ ; - PNG_ABORT(); -#endif -} - -/* This function is called when there is a warning, but the library thinks - * it can continue anyway. Replacement functions don't have to do anything - * here if you don't want them to. In the default configuration, png_ptr is - * not used, but it is passed in case it may be useful. - */ -static void /* PRIVATE */ -png_default_warning(png_structp png_ptr, png_const_charp warning_message) -{ -#ifndef PNG_NO_CONSOLE_IO -# ifdef PNG_ERROR_NUMBERS_SUPPORTED - if (*warning_message == '#') - { - int offset; - char warning_number[16]; - for (offset=0; offset<15; offset++) - { - warning_number[offset]=*(warning_message+offset+1); - if (*(warning_message+offset) == ' ') - break; - } - if((offset > 1) && (offset < 15)) - { - warning_number[offset-1]='\0'; - fprintf(stderr, "libpng warning no. %s: %s\n", warning_number, - warning_message+offset); - } - else - fprintf(stderr, "libpng warning: %s\n", warning_message); - } - else -# endif - fprintf(stderr, "libpng warning: %s\n", warning_message); -#else - if (warning_message) - /* appease compiler */ ; -#endif - if (png_ptr) - return; -} - -/* This function is called when the application wants to use another method - * of handling errors and warnings. Note that the error function MUST NOT - * return to the calling routine or serious problems will occur. The return - * method used in the default routine calls longjmp(png_ptr->jmpbuf, 1) - */ -void PNGAPI -png_set_error_fn(png_structp png_ptr, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warning_fn) -{ - png_ptr->error_ptr = error_ptr; - png_ptr->error_fn = error_fn; - png_ptr->warning_fn = warning_fn; -} - - -/* This function returns a pointer to the error_ptr associated with the user - * functions. The application should free any memory associated with this - * pointer before png_write_destroy and png_read_destroy are called. - */ -png_voidp PNGAPI -png_get_error_ptr(png_structp png_ptr) -{ - return ((png_voidp)png_ptr->error_ptr); -} - - -#ifdef PNG_ERROR_NUMBERS_SUPPORTED -void PNGAPI -png_set_strip_error_numbers(png_structp png_ptr, png_uint_32 strip_mode) -{ - if(png_ptr != NULL) - { - png_ptr->flags &= - ((~(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))&strip_mode); - } -} -#endif diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pnggccrd.c b/gtkmm-osx/trunk/libpng-1.2.5/pnggccrd.c deleted file mode 100644 index 8d81c31..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/pnggccrd.c +++ /dev/null @@ -1,5397 +0,0 @@ -/* pnggccrd.c - mixed C/assembler version of utilities to read a PNG file - * - * For Intel x86 CPU (Pentium-MMX or later) and GNU C compiler. - * - * See http://www.intel.com/drg/pentiumII/appnotes/916/916.htm - * and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm - * for Intel's performance analysis of the MMX vs. non-MMX code. - * - * libpng version 1.2.5 - October 3, 2002 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2002 Glenn Randers-Pehrson - * Copyright (c) 1998, Intel Corporation - * - * Based on MSVC code contributed by Nirav Chhatrapati, Intel Corp., 1998. - * Interface to libpng contributed by Gilles Vollant, 1999. - * GNU C port by Greg Roelofs, 1999-2001. - * - * Lines 2350-4300 converted in place with intel2gas 1.3.1: - * - * intel2gas -mdI pnggccrd.c.partially-msvc -o pnggccrd.c - * - * and then cleaned up by hand. See http://hermes.terminal.at/intel2gas/ . - * - * NOTE: A sufficiently recent version of GNU as (or as.exe under DOS/Windows) - * is required to assemble the newer MMX instructions such as movq. - * For djgpp, see - * - * ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bnu281b.zip - * - * (or a later version in the same directory). For Linux, check your - * distribution's web site(s) or try these links: - * - * http://rufus.w3.org/linux/RPM/binutils.html - * http://www.debian.org/Packages/stable/devel/binutils.html - * ftp://ftp.slackware.com/pub/linux/slackware/slackware/slakware/d1/ - * binutils.tgz - * - * For other platforms, see the main GNU site: - * - * ftp://ftp.gnu.org/pub/gnu/binutils/ - * - * Version 2.5.2l.15 is definitely too old... - */ - -/* - * TEMPORARY PORTING NOTES AND CHANGELOG (mostly by Greg Roelofs) - * ===================================== - * - * 19991006: - * - fixed sign error in post-MMX cleanup code (16- & 32-bit cases) - * - * 19991007: - * - additional optimizations (possible or definite): - * x [DONE] write MMX code for 64-bit case (pixel_bytes == 8) [not tested] - * - write MMX code for 48-bit case (pixel_bytes == 6) - * - figure out what's up with 24-bit case (pixel_bytes == 3): - * why subtract 8 from width_mmx in the pass 4/5 case? - * (only width_mmx case) (near line 1606) - * x [DONE] replace pixel_bytes within each block with the true - * constant value (or are compilers smart enough to do that?) - * - rewrite all MMX interlacing code so it's aligned with - * the *beginning* of the row buffer, not the end. This - * would not only allow one to eliminate half of the memory - * writes for odd passes (that is, pass == odd), it may also - * eliminate some unaligned-data-access exceptions (assuming - * there's a penalty for not aligning 64-bit accesses on - * 64-bit boundaries). The only catch is that the "leftover" - * pixel(s) at the end of the row would have to be saved, - * but there are enough unused MMX registers in every case, - * so this is not a problem. A further benefit is that the - * post-MMX cleanup code (C code) in at least some of the - * cases could be done within the assembler block. - * x [DONE] the "v3 v2 v1 v0 v7 v6 v5 v4" comments are confusing, - * inconsistent, and don't match the MMX Programmer's Reference - * Manual conventions anyway. They should be changed to - * "b7 b6 b5 b4 b3 b2 b1 b0," where b0 indicates the byte that - * was lowest in memory (e.g., corresponding to a left pixel) - * and b7 is the byte that was highest (e.g., a right pixel). - * - * 19991016: - * - Brennan's Guide notwithstanding, gcc under Linux does *not* - * want globals prefixed by underscores when referencing them-- - * i.e., if the variable is const4, then refer to it as const4, - * not _const4. This seems to be a djgpp-specific requirement. - * Also, such variables apparently *must* be declared outside - * of functions; neither static nor automatic variables work if - * defined within the scope of a single function, but both - * static and truly global (multi-module) variables work fine. - * - * 19991023: - * - fixed png_combine_row() non-MMX replication bug (odd passes only?) - * - switched from string-concatenation-with-macros to cleaner method of - * renaming global variables for djgpp--i.e., always use prefixes in - * inlined assembler code (== strings) and conditionally rename the - * variables, not the other way around. Hence _const4, _mask8_0, etc. - * - * 19991024: - * - fixed mmxsupport()/png_do_read_interlace() first-row bug - * This one was severely weird: even though mmxsupport() doesn't touch - * ebx (where "row" pointer was stored), it nevertheless managed to zero - * the register (even in static/non-fPIC code--see below), which in turn - * caused png_do_read_interlace() to return prematurely on the first row of - * interlaced images (i.e., without expanding the interlaced pixels). - * Inspection of the generated assembly code didn't turn up any clues, - * although it did point at a minor optimization (i.e., get rid of - * mmx_supported_local variable and just use eax). Possibly the CPUID - * instruction is more destructive than it looks? (Not yet checked.) - * - "info gcc" was next to useless, so compared fPIC and non-fPIC assembly - * listings... Apparently register spillage has to do with ebx, since - * it's used to index the global offset table. Commenting it out of the - * input-reg lists in png_combine_row() eliminated compiler barfage, so - * ifdef'd with __PIC__ macro: if defined, use a global for unmask - * - * 19991107: - * - verified CPUID clobberage: 12-char string constant ("GenuineIntel", - * "AuthenticAMD", etc.) placed in ebx:ecx:edx. Still need to polish. - * - * 19991120: - * - made "diff" variable (now "_dif") global to simplify conversion of - * filtering routines (running out of regs, sigh). "diff" is still used - * in interlacing routines, however. - * - fixed up both versions of mmxsupport() (ORIG_THAT_USED_TO_CLOBBER_EBX - * macro determines which is used); original not yet tested. - * - * 20000213: - * - when compiling with gcc, be sure to use -fomit-frame-pointer - * - * 20000319: - * - fixed a register-name typo in png_do_read_interlace(), default (MMX) case, - * pass == 4 or 5, that caused visible corruption of interlaced images - * - * 20000623: - * - Various problems were reported with gcc 2.95.2 in the Cygwin environment, - * many of the form "forbidden register 0 (ax) was spilled for class AREG." - * This is explained at http://gcc.gnu.org/fom_serv/cache/23.html, and - * Chuck Wilson supplied a patch involving dummy output registers. See - * http://sourceforge.net/bugs/?func=detailbug&bug_id=108741&group_id=5624 - * for the original (anonymous) SourceForge bug report. - * - * 20000706: - * - Chuck Wilson passed along these remaining gcc 2.95.2 errors: - * pnggccrd.c: In function `png_combine_row': - * pnggccrd.c:525: more than 10 operands in `asm' - * pnggccrd.c:669: more than 10 operands in `asm' - * pnggccrd.c:828: more than 10 operands in `asm' - * pnggccrd.c:994: more than 10 operands in `asm' - * pnggccrd.c:1177: more than 10 operands in `asm' - * They are all the same problem and can be worked around by using the - * global _unmask variable unconditionally, not just in the -fPIC case. - * Reportedly earlier versions of gcc also have the problem with more than - * 10 operands; they just don't report it. Much strangeness ensues, etc. - * - * 20000729: - * - enabled png_read_filter_row_mmx_up() (shortest remaining unconverted - * MMX routine); began converting png_read_filter_row_mmx_sub() - * - to finish remaining sections: - * - clean up indentation and comments - * - preload local variables - * - add output and input regs (order of former determines numerical - * mapping of latter) - * - avoid all usage of ebx (including bx, bh, bl) register [20000823] - * - remove "$" from addressing of Shift and Mask variables [20000823] - * - * 20000731: - * - global union vars causing segfaults in png_read_filter_row_mmx_sub()? - * - * 20000822: - * - ARGH, stupid png_read_filter_row_mmx_sub() segfault only happens with - * shared-library (-fPIC) version! Code works just fine as part of static - * library. Damn damn damn damn damn, should have tested that sooner. - * ebx is getting clobbered again (explicitly this time); need to save it - * on stack or rewrite asm code to avoid using it altogether. Blargh! - * - * 20000823: - * - first section was trickiest; all remaining sections have ebx -> edx now. - * (-fPIC works again.) Also added missing underscores to various Shift* - * and *Mask* globals and got rid of leading "$" signs. - * - * 20000826: - * - added visual separators to help navigate microscopic printed copies - * (http://pobox.com/~newt/code/gpr-latest.zip, mode 10); started working - * on png_read_filter_row_mmx_avg() - * - * 20000828: - * - finished png_read_filter_row_mmx_avg(): only Paeth left! (930 lines...) - * What the hell, did png_read_filter_row_mmx_paeth(), too. Comments not - * cleaned up/shortened in either routine, but functionality is complete - * and seems to be working fine. - * - * 20000829: - * - ahhh, figured out last(?) bit of gcc/gas asm-fu: if register is listed - * as an input reg (with dummy output variables, etc.), then it *cannot* - * also appear in the clobber list or gcc 2.95.2 will barf. The solution - * is simple enough... - * - * 20000914: - * - bug in png_read_filter_row_mmx_avg(): 16-bit grayscale not handled - * correctly (but 48-bit RGB just fine) - * - * 20000916: - * - fixed bug in png_read_filter_row_mmx_avg(), bpp == 2 case; three errors: - * - "_ShiftBpp.use = 24;" should have been "_ShiftBpp.use = 16;" - * - "_ShiftRem.use = 40;" should have been "_ShiftRem.use = 48;" - * - "psllq _ShiftRem, %%mm2" should have been "psrlq _ShiftRem, %%mm2" - * - * 20010101: - * - added new png_init_mmx_flags() function (here only because it needs to - * call mmxsupport(), which should probably become global png_mmxsupport()); - * modified other MMX routines to run conditionally (png_ptr->asm_flags) - * - * 20010103: - * - renamed mmxsupport() to png_mmx_support(), with auto-set of mmx_supported, - * and made it public; moved png_init_mmx_flags() to png.c as internal func - * - * 20010104: - * - removed dependency on png_read_filter_row_c() (C code already duplicated - * within MMX version of png_read_filter_row()) so no longer necessary to - * compile it into pngrutil.o - * - * 20010310: - * - fixed buffer-overrun bug in png_combine_row() C code (non-MMX) - * - * 20020304: - * - eliminated incorrect use of width_mmx in pixel_bytes == 8 case - * - * STILL TO DO: - * - test png_do_read_interlace() 64-bit case (pixel_bytes == 8) - * - write MMX code for 48-bit case (pixel_bytes == 6) - * - figure out what's up with 24-bit case (pixel_bytes == 3): - * why subtract 8 from width_mmx in the pass 4/5 case? - * (only width_mmx case) (near line 1606) - * - rewrite all MMX interlacing code so it's aligned with beginning - * of the row buffer, not the end (see 19991007 for details) - * x pick one version of mmxsupport() and get rid of the other - * - add error messages to any remaining bogus default cases - * - enable pixel_depth == 8 cases in png_read_filter_row()? (test speed) - * x add support for runtime enable/disable/query of various MMX routines - */ - -#define PNG_INTERNAL -#include "png.h" - -#if defined(PNG_USE_PNGGCCRD) - -int PNGAPI png_mmx_support(void); - -#ifdef PNG_USE_LOCAL_ARRAYS -static const int FARDATA png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; -static const int FARDATA png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; -static const int FARDATA png_pass_width[7] = {8, 4, 4, 2, 2, 1, 1}; -#endif - -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) -/* djgpp, Win32, and Cygwin add their own underscores to global variables, - * so define them without: */ -#if defined(__DJGPP__) || defined(WIN32) || defined(__CYGWIN__) -# define _mmx_supported mmx_supported -# define _const4 const4 -# define _const6 const6 -# define _mask8_0 mask8_0 -# define _mask16_1 mask16_1 -# define _mask16_0 mask16_0 -# define _mask24_2 mask24_2 -# define _mask24_1 mask24_1 -# define _mask24_0 mask24_0 -# define _mask32_3 mask32_3 -# define _mask32_2 mask32_2 -# define _mask32_1 mask32_1 -# define _mask32_0 mask32_0 -# define _mask48_5 mask48_5 -# define _mask48_4 mask48_4 -# define _mask48_3 mask48_3 -# define _mask48_2 mask48_2 -# define _mask48_1 mask48_1 -# define _mask48_0 mask48_0 -# define _LBCarryMask LBCarryMask -# define _HBClearMask HBClearMask -# define _ActiveMask ActiveMask -# define _ActiveMask2 ActiveMask2 -# define _ActiveMaskEnd ActiveMaskEnd -# define _ShiftBpp ShiftBpp -# define _ShiftRem ShiftRem -#ifdef PNG_THREAD_UNSAFE_OK -# define _unmask unmask -# define _FullLength FullLength -# define _MMXLength MMXLength -# define _dif dif -# define _patemp patemp -# define _pbtemp pbtemp -# define _pctemp pctemp -#endif -#endif - - -/* These constants are used in the inlined MMX assembly code. - Ignore gcc's "At top level: defined but not used" warnings. */ - -/* GRR 20000706: originally _unmask was needed only when compiling with -fPIC, - * since that case uses the %ebx register for indexing the Global Offset Table - * and there were no other registers available. But gcc 2.95 and later emit - * "more than 10 operands in `asm'" errors when %ebx is used to preload unmask - * in the non-PIC case, so we'll just use the global unconditionally now. - */ -#ifdef PNG_THREAD_UNSAFE_OK -static int _unmask; -#endif - -static unsigned long long _mask8_0 = 0x0102040810204080LL; - -static unsigned long long _mask16_1 = 0x0101020204040808LL; -static unsigned long long _mask16_0 = 0x1010202040408080LL; - -static unsigned long long _mask24_2 = 0x0101010202020404LL; -static unsigned long long _mask24_1 = 0x0408080810101020LL; -static unsigned long long _mask24_0 = 0x2020404040808080LL; - -static unsigned long long _mask32_3 = 0x0101010102020202LL; -static unsigned long long _mask32_2 = 0x0404040408080808LL; -static unsigned long long _mask32_1 = 0x1010101020202020LL; -static unsigned long long _mask32_0 = 0x4040404080808080LL; - -static unsigned long long _mask48_5 = 0x0101010101010202LL; -static unsigned long long _mask48_4 = 0x0202020204040404LL; -static unsigned long long _mask48_3 = 0x0404080808080808LL; -static unsigned long long _mask48_2 = 0x1010101010102020LL; -static unsigned long long _mask48_1 = 0x2020202040404040LL; -static unsigned long long _mask48_0 = 0x4040808080808080LL; - -static unsigned long long _const4 = 0x0000000000FFFFFFLL; -//static unsigned long long _const5 = 0x000000FFFFFF0000LL; // NOT USED -static unsigned long long _const6 = 0x00000000000000FFLL; - -// These are used in the row-filter routines and should/would be local -// variables if not for gcc addressing limitations. -// WARNING: Their presence probably defeats the thread safety of libpng. - -#ifdef PNG_THREAD_UNSAFE_OK -static png_uint_32 _FullLength; -static png_uint_32 _MMXLength; -static int _dif; -static int _patemp; // temp variables for Paeth routine -static int _pbtemp; -static int _pctemp; -#endif - -void /* PRIVATE */ -png_squelch_warnings(void) -{ -#ifdef PNG_THREAD_UNSAFE_OK - _dif = _dif; - _patemp = _patemp; - _pbtemp = _pbtemp; - _pctemp = _pctemp; - _MMXLength = _MMXLength; -#endif - _const4 = _const4; - _const6 = _const6; - _mask8_0 = _mask8_0; - _mask16_1 = _mask16_1; - _mask16_0 = _mask16_0; - _mask24_2 = _mask24_2; - _mask24_1 = _mask24_1; - _mask24_0 = _mask24_0; - _mask32_3 = _mask32_3; - _mask32_2 = _mask32_2; - _mask32_1 = _mask32_1; - _mask32_0 = _mask32_0; - _mask48_5 = _mask48_5; - _mask48_4 = _mask48_4; - _mask48_3 = _mask48_3; - _mask48_2 = _mask48_2; - _mask48_1 = _mask48_1; - _mask48_0 = _mask48_0; -} -#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ - - -static int _mmx_supported = 2; - -/*===========================================================================*/ -/* */ -/* P N G _ C O M B I N E _ R O W */ -/* */ -/*===========================================================================*/ - -#if defined(PNG_HAVE_ASSEMBLER_COMBINE_ROW) - -#define BPP2 2 -#define BPP3 3 /* bytes per pixel (a.k.a. pixel_bytes) */ -#define BPP4 4 -#define BPP6 6 /* (defined only to help avoid cut-and-paste errors) */ -#define BPP8 8 - -/* Combines the row recently read in with the previous row. - This routine takes care of alpha and transparency if requested. - This routine also handles the two methods of progressive display - of interlaced images, depending on the mask value. - The mask value describes which pixels are to be combined with - the row. The pattern always repeats every 8 pixels, so just 8 - bits are needed. A one indicates the pixel is to be combined; a - zero indicates the pixel is to be skipped. This is in addition - to any alpha or transparency value associated with the pixel. - If you want all pixels to be combined, pass 0xff (255) in mask. */ - -/* Use this routine for the x86 platform - it uses a faster MMX routine - if the machine supports MMX. */ - -void /* PRIVATE */ -png_combine_row(png_structp png_ptr, png_bytep row, int mask) -{ - png_debug(1, "in png_combine_row (pnggccrd.c)\n"); - -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) - if (_mmx_supported == 2) { - /* this should have happened in png_init_mmx_flags() already */ - png_warning(png_ptr, "asm_flags may not have been initialized"); - png_mmx_support(); - } -#endif - - if (mask == 0xff) - { - png_debug(2,"mask == 0xff: doing single png_memcpy()\n"); - png_memcpy(row, png_ptr->row_buf + 1, - (png_size_t)((png_ptr->width * png_ptr->row_info.pixel_depth + 7) >> 3)); - } - else /* (png_combine_row() is never called with mask == 0) */ - { - switch (png_ptr->row_info.pixel_depth) - { - case 1: /* png_ptr->row_info.pixel_depth */ - { - png_bytep sp; - png_bytep dp; - int s_inc, s_start, s_end; - int m; - int shift; - png_uint_32 i; - - sp = png_ptr->row_buf + 1; - dp = row; - m = 0x80; -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (png_ptr->transformations & PNG_PACKSWAP) - { - s_start = 0; - s_end = 7; - s_inc = 1; - } - else -#endif - { - s_start = 7; - s_end = 0; - s_inc = -1; - } - - shift = s_start; - - for (i = 0; i < png_ptr->width; i++) - { - if (m & mask) - { - int value; - - value = (*sp >> shift) & 0x1; - *dp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff); - *dp |= (png_byte)(value << shift); - } - - if (shift == s_end) - { - shift = s_start; - sp++; - dp++; - } - else - shift += s_inc; - - if (m == 1) - m = 0x80; - else - m >>= 1; - } - break; - } - - case 2: /* png_ptr->row_info.pixel_depth */ - { - png_bytep sp; - png_bytep dp; - int s_start, s_end, s_inc; - int m; - int shift; - png_uint_32 i; - int value; - - sp = png_ptr->row_buf + 1; - dp = row; - m = 0x80; -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (png_ptr->transformations & PNG_PACKSWAP) - { - s_start = 0; - s_end = 6; - s_inc = 2; - } - else -#endif - { - s_start = 6; - s_end = 0; - s_inc = -2; - } - - shift = s_start; - - for (i = 0; i < png_ptr->width; i++) - { - if (m & mask) - { - value = (*sp >> shift) & 0x3; - *dp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); - *dp |= (png_byte)(value << shift); - } - - if (shift == s_end) - { - shift = s_start; - sp++; - dp++; - } - else - shift += s_inc; - if (m == 1) - m = 0x80; - else - m >>= 1; - } - break; - } - - case 4: /* png_ptr->row_info.pixel_depth */ - { - png_bytep sp; - png_bytep dp; - int s_start, s_end, s_inc; - int m; - int shift; - png_uint_32 i; - int value; - - sp = png_ptr->row_buf + 1; - dp = row; - m = 0x80; -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (png_ptr->transformations & PNG_PACKSWAP) - { - s_start = 0; - s_end = 4; - s_inc = 4; - } - else -#endif - { - s_start = 4; - s_end = 0; - s_inc = -4; - } - shift = s_start; - - for (i = 0; i < png_ptr->width; i++) - { - if (m & mask) - { - value = (*sp >> shift) & 0xf; - *dp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); - *dp |= (png_byte)(value << shift); - } - - if (shift == s_end) - { - shift = s_start; - sp++; - dp++; - } - else - shift += s_inc; - if (m == 1) - m = 0x80; - else - m >>= 1; - } - break; - } - - case 8: /* png_ptr->row_info.pixel_depth */ - { - png_bytep srcptr; - png_bytep dstptr; - -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) -#if !defined(PNG_1_0_X) - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) - /* && _mmx_supported */ ) -#else - if (_mmx_supported) -#endif - { - png_uint_32 len; - int diff; - int dummy_value_a; // fix 'forbidden register spilled' error - int dummy_value_d; - int dummy_value_c; - int dummy_value_S; - int dummy_value_D; - _unmask = ~mask; // global variable for -fPIC version - srcptr = png_ptr->row_buf + 1; - dstptr = row; - len = png_ptr->width &~7; // reduce to multiple of 8 - diff = (int) (png_ptr->width & 7); // amount lost - - __asm__ __volatile__ ( - "movd _unmask, %%mm7 \n\t" // load bit pattern - "psubb %%mm6, %%mm6 \n\t" // zero mm6 - "punpcklbw %%mm7, %%mm7 \n\t" - "punpcklwd %%mm7, %%mm7 \n\t" - "punpckldq %%mm7, %%mm7 \n\t" // fill reg with 8 masks - - "movq _mask8_0, %%mm0 \n\t" - "pand %%mm7, %%mm0 \n\t" // nonzero if keep byte - "pcmpeqb %%mm6, %%mm0 \n\t" // zeros->1s, v versa - -// preload "movl len, %%ecx \n\t" // load length of line -// preload "movl srcptr, %%esi \n\t" // load source -// preload "movl dstptr, %%edi \n\t" // load dest - - "cmpl $0, %%ecx \n\t" // len == 0 ? - "je mainloop8end \n\t" - - "mainloop8: \n\t" - "movq (%%esi), %%mm4 \n\t" // *srcptr - "pand %%mm0, %%mm4 \n\t" - "movq %%mm0, %%mm6 \n\t" - "pandn (%%edi), %%mm6 \n\t" // *dstptr - "por %%mm6, %%mm4 \n\t" - "movq %%mm4, (%%edi) \n\t" - "addl $8, %%esi \n\t" // inc by 8 bytes processed - "addl $8, %%edi \n\t" - "subl $8, %%ecx \n\t" // dec by 8 pixels processed - "ja mainloop8 \n\t" - - "mainloop8end: \n\t" -// preload "movl diff, %%ecx \n\t" // (diff is in eax) - "movl %%eax, %%ecx \n\t" - "cmpl $0, %%ecx \n\t" - "jz end8 \n\t" -// preload "movl mask, %%edx \n\t" - "sall $24, %%edx \n\t" // make low byte, high byte - - "secondloop8: \n\t" - "sall %%edx \n\t" // move high bit to CF - "jnc skip8 \n\t" // if CF = 0 - "movb (%%esi), %%al \n\t" - "movb %%al, (%%edi) \n\t" - - "skip8: \n\t" - "incl %%esi \n\t" - "incl %%edi \n\t" - "decl %%ecx \n\t" - "jnz secondloop8 \n\t" - - "end8: \n\t" - "EMMS \n\t" // DONE - - : "=a" (dummy_value_a), // output regs (dummy) - "=d" (dummy_value_d), - "=c" (dummy_value_c), - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "3" (srcptr), // esi // input regs - "4" (dstptr), // edi - "0" (diff), // eax -// was (unmask) "b" RESERVED // ebx // Global Offset Table idx - "2" (len), // ecx - "1" (mask) // edx - -#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0", "%mm4", "%mm6", "%mm7" // clobber list -#endif - ); - } - else /* mmx _not supported - Use modified C routine */ -#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ - { - register png_uint_32 i; - png_uint_32 initial_val = png_pass_start[png_ptr->pass]; - /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ - register int stride = png_pass_inc[png_ptr->pass]; - /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ - register int rep_bytes = png_pass_width[png_ptr->pass]; - /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ - png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ - int diff = (int) (png_ptr->width & 7); /* amount lost */ - register png_uint_32 final_val = len; /* GRR bugfix */ - - srcptr = png_ptr->row_buf + 1 + initial_val; - dstptr = row + initial_val; - - for (i = initial_val; i < final_val; i += stride) - { - png_memcpy(dstptr, srcptr, rep_bytes); - srcptr += stride; - dstptr += stride; - } - if (diff) /* number of leftover pixels: 3 for pngtest */ - { - final_val+=diff /* *BPP1 */ ; - for (; i < final_val; i += stride) - { - if (rep_bytes > (int)(final_val-i)) - rep_bytes = (int)(final_val-i); - png_memcpy(dstptr, srcptr, rep_bytes); - srcptr += stride; - dstptr += stride; - } - } - - } /* end of else (_mmx_supported) */ - - break; - } /* end 8 bpp */ - - case 16: /* png_ptr->row_info.pixel_depth */ - { - png_bytep srcptr; - png_bytep dstptr; - -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) -#if !defined(PNG_1_0_X) - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) - /* && _mmx_supported */ ) -#else - if (_mmx_supported) -#endif - { - png_uint_32 len; - int diff; - int dummy_value_a; // fix 'forbidden register spilled' error - int dummy_value_d; - int dummy_value_c; - int dummy_value_S; - int dummy_value_D; - _unmask = ~mask; // global variable for -fPIC version - srcptr = png_ptr->row_buf + 1; - dstptr = row; - len = png_ptr->width &~7; // reduce to multiple of 8 - diff = (int) (png_ptr->width & 7); // amount lost // - - __asm__ __volatile__ ( - "movd _unmask, %%mm7 \n\t" // load bit pattern - "psubb %%mm6, %%mm6 \n\t" // zero mm6 - "punpcklbw %%mm7, %%mm7 \n\t" - "punpcklwd %%mm7, %%mm7 \n\t" - "punpckldq %%mm7, %%mm7 \n\t" // fill reg with 8 masks - - "movq _mask16_0, %%mm0 \n\t" - "movq _mask16_1, %%mm1 \n\t" - - "pand %%mm7, %%mm0 \n\t" - "pand %%mm7, %%mm1 \n\t" - - "pcmpeqb %%mm6, %%mm0 \n\t" - "pcmpeqb %%mm6, %%mm1 \n\t" - -// preload "movl len, %%ecx \n\t" // load length of line -// preload "movl srcptr, %%esi \n\t" // load source -// preload "movl dstptr, %%edi \n\t" // load dest - - "cmpl $0, %%ecx \n\t" - "jz mainloop16end \n\t" - - "mainloop16: \n\t" - "movq (%%esi), %%mm4 \n\t" - "pand %%mm0, %%mm4 \n\t" - "movq %%mm0, %%mm6 \n\t" - "movq (%%edi), %%mm7 \n\t" - "pandn %%mm7, %%mm6 \n\t" - "por %%mm6, %%mm4 \n\t" - "movq %%mm4, (%%edi) \n\t" - - "movq 8(%%esi), %%mm5 \n\t" - "pand %%mm1, %%mm5 \n\t" - "movq %%mm1, %%mm7 \n\t" - "movq 8(%%edi), %%mm6 \n\t" - "pandn %%mm6, %%mm7 \n\t" - "por %%mm7, %%mm5 \n\t" - "movq %%mm5, 8(%%edi) \n\t" - - "addl $16, %%esi \n\t" // inc by 16 bytes processed - "addl $16, %%edi \n\t" - "subl $8, %%ecx \n\t" // dec by 8 pixels processed - "ja mainloop16 \n\t" - - "mainloop16end: \n\t" -// preload "movl diff, %%ecx \n\t" // (diff is in eax) - "movl %%eax, %%ecx \n\t" - "cmpl $0, %%ecx \n\t" - "jz end16 \n\t" -// preload "movl mask, %%edx \n\t" - "sall $24, %%edx \n\t" // make low byte, high byte - - "secondloop16: \n\t" - "sall %%edx \n\t" // move high bit to CF - "jnc skip16 \n\t" // if CF = 0 - "movw (%%esi), %%ax \n\t" - "movw %%ax, (%%edi) \n\t" - - "skip16: \n\t" - "addl $2, %%esi \n\t" - "addl $2, %%edi \n\t" - "decl %%ecx \n\t" - "jnz secondloop16 \n\t" - - "end16: \n\t" - "EMMS \n\t" // DONE - - : "=a" (dummy_value_a), // output regs (dummy) - "=c" (dummy_value_c), - "=d" (dummy_value_d), - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "0" (diff), // eax // input regs -// was (unmask) " " RESERVED // ebx // Global Offset Table idx - "1" (len), // ecx - "2" (mask), // edx - "3" (srcptr), // esi - "4" (dstptr) // edi - -#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0", "%mm1", "%mm4" // clobber list - , "%mm5", "%mm6", "%mm7" -#endif - ); - } - else /* mmx _not supported - Use modified C routine */ -#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ - { - register png_uint_32 i; - png_uint_32 initial_val = BPP2 * png_pass_start[png_ptr->pass]; - /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ - register int stride = BPP2 * png_pass_inc[png_ptr->pass]; - /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ - register int rep_bytes = BPP2 * png_pass_width[png_ptr->pass]; - /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ - png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ - int diff = (int) (png_ptr->width & 7); /* amount lost */ - register png_uint_32 final_val = BPP2 * len; /* GRR bugfix */ - - srcptr = png_ptr->row_buf + 1 + initial_val; - dstptr = row + initial_val; - - for (i = initial_val; i < final_val; i += stride) - { - png_memcpy(dstptr, srcptr, rep_bytes); - srcptr += stride; - dstptr += stride; - } - if (diff) /* number of leftover pixels: 3 for pngtest */ - { - final_val+=diff*BPP2; - for (; i < final_val; i += stride) - { - if (rep_bytes > (int)(final_val-i)) - rep_bytes = (int)(final_val-i); - png_memcpy(dstptr, srcptr, rep_bytes); - srcptr += stride; - dstptr += stride; - } - } - } /* end of else (_mmx_supported) */ - - break; - } /* end 16 bpp */ - - case 24: /* png_ptr->row_info.pixel_depth */ - { - png_bytep srcptr; - png_bytep dstptr; - -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) -#if !defined(PNG_1_0_X) - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) - /* && _mmx_supported */ ) -#else - if (_mmx_supported) -#endif - { - png_uint_32 len; - int diff; - int dummy_value_a; // fix 'forbidden register spilled' error - int dummy_value_d; - int dummy_value_c; - int dummy_value_S; - int dummy_value_D; - _unmask = ~mask; // global variable for -fPIC version - srcptr = png_ptr->row_buf + 1; - dstptr = row; - len = png_ptr->width &~7; // reduce to multiple of 8 - diff = (int) (png_ptr->width & 7); // amount lost // - - __asm__ __volatile__ ( - "movd _unmask, %%mm7 \n\t" // load bit pattern - "psubb %%mm6, %%mm6 \n\t" // zero mm6 - "punpcklbw %%mm7, %%mm7 \n\t" - "punpcklwd %%mm7, %%mm7 \n\t" - "punpckldq %%mm7, %%mm7 \n\t" // fill reg with 8 masks - - "movq _mask24_0, %%mm0 \n\t" - "movq _mask24_1, %%mm1 \n\t" - "movq _mask24_2, %%mm2 \n\t" - - "pand %%mm7, %%mm0 \n\t" - "pand %%mm7, %%mm1 \n\t" - "pand %%mm7, %%mm2 \n\t" - - "pcmpeqb %%mm6, %%mm0 \n\t" - "pcmpeqb %%mm6, %%mm1 \n\t" - "pcmpeqb %%mm6, %%mm2 \n\t" - -// preload "movl len, %%ecx \n\t" // load length of line -// preload "movl srcptr, %%esi \n\t" // load source -// preload "movl dstptr, %%edi \n\t" // load dest - - "cmpl $0, %%ecx \n\t" - "jz mainloop24end \n\t" - - "mainloop24: \n\t" - "movq (%%esi), %%mm4 \n\t" - "pand %%mm0, %%mm4 \n\t" - "movq %%mm0, %%mm6 \n\t" - "movq (%%edi), %%mm7 \n\t" - "pandn %%mm7, %%mm6 \n\t" - "por %%mm6, %%mm4 \n\t" - "movq %%mm4, (%%edi) \n\t" - - "movq 8(%%esi), %%mm5 \n\t" - "pand %%mm1, %%mm5 \n\t" - "movq %%mm1, %%mm7 \n\t" - "movq 8(%%edi), %%mm6 \n\t" - "pandn %%mm6, %%mm7 \n\t" - "por %%mm7, %%mm5 \n\t" - "movq %%mm5, 8(%%edi) \n\t" - - "movq 16(%%esi), %%mm6 \n\t" - "pand %%mm2, %%mm6 \n\t" - "movq %%mm2, %%mm4 \n\t" - "movq 16(%%edi), %%mm7 \n\t" - "pandn %%mm7, %%mm4 \n\t" - "por %%mm4, %%mm6 \n\t" - "movq %%mm6, 16(%%edi) \n\t" - - "addl $24, %%esi \n\t" // inc by 24 bytes processed - "addl $24, %%edi \n\t" - "subl $8, %%ecx \n\t" // dec by 8 pixels processed - - "ja mainloop24 \n\t" - - "mainloop24end: \n\t" -// preload "movl diff, %%ecx \n\t" // (diff is in eax) - "movl %%eax, %%ecx \n\t" - "cmpl $0, %%ecx \n\t" - "jz end24 \n\t" -// preload "movl mask, %%edx \n\t" - "sall $24, %%edx \n\t" // make low byte, high byte - - "secondloop24: \n\t" - "sall %%edx \n\t" // move high bit to CF - "jnc skip24 \n\t" // if CF = 0 - "movw (%%esi), %%ax \n\t" - "movw %%ax, (%%edi) \n\t" - "xorl %%eax, %%eax \n\t" - "movb 2(%%esi), %%al \n\t" - "movb %%al, 2(%%edi) \n\t" - - "skip24: \n\t" - "addl $3, %%esi \n\t" - "addl $3, %%edi \n\t" - "decl %%ecx \n\t" - "jnz secondloop24 \n\t" - - "end24: \n\t" - "EMMS \n\t" // DONE - - : "=a" (dummy_value_a), // output regs (dummy) - "=d" (dummy_value_d), - "=c" (dummy_value_c), - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "3" (srcptr), // esi // input regs - "4" (dstptr), // edi - "0" (diff), // eax -// was (unmask) "b" RESERVED // ebx // Global Offset Table idx - "2" (len), // ecx - "1" (mask) // edx - -#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0", "%mm1", "%mm2" // clobber list - , "%mm4", "%mm5", "%mm6", "%mm7" -#endif - ); - } - else /* mmx _not supported - Use modified C routine */ -#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ - { - register png_uint_32 i; - png_uint_32 initial_val = BPP3 * png_pass_start[png_ptr->pass]; - /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ - register int stride = BPP3 * png_pass_inc[png_ptr->pass]; - /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ - register int rep_bytes = BPP3 * png_pass_width[png_ptr->pass]; - /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ - png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ - int diff = (int) (png_ptr->width & 7); /* amount lost */ - register png_uint_32 final_val = BPP3 * len; /* GRR bugfix */ - - srcptr = png_ptr->row_buf + 1 + initial_val; - dstptr = row + initial_val; - - for (i = initial_val; i < final_val; i += stride) - { - png_memcpy(dstptr, srcptr, rep_bytes); - srcptr += stride; - dstptr += stride; - } - if (diff) /* number of leftover pixels: 3 for pngtest */ - { - final_val+=diff*BPP3; - for (; i < final_val; i += stride) - { - if (rep_bytes > (int)(final_val-i)) - rep_bytes = (int)(final_val-i); - png_memcpy(dstptr, srcptr, rep_bytes); - srcptr += stride; - dstptr += stride; - } - } - } /* end of else (_mmx_supported) */ - - break; - } /* end 24 bpp */ - - case 32: /* png_ptr->row_info.pixel_depth */ - { - png_bytep srcptr; - png_bytep dstptr; - -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) -#if !defined(PNG_1_0_X) - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) - /* && _mmx_supported */ ) -#else - if (_mmx_supported) -#endif - { - png_uint_32 len; - int diff; - int dummy_value_a; // fix 'forbidden register spilled' error - int dummy_value_d; - int dummy_value_c; - int dummy_value_S; - int dummy_value_D; - _unmask = ~mask; // global variable for -fPIC version - srcptr = png_ptr->row_buf + 1; - dstptr = row; - len = png_ptr->width &~7; // reduce to multiple of 8 - diff = (int) (png_ptr->width & 7); // amount lost // - - __asm__ __volatile__ ( - "movd _unmask, %%mm7 \n\t" // load bit pattern - "psubb %%mm6, %%mm6 \n\t" // zero mm6 - "punpcklbw %%mm7, %%mm7 \n\t" - "punpcklwd %%mm7, %%mm7 \n\t" - "punpckldq %%mm7, %%mm7 \n\t" // fill reg with 8 masks - - "movq _mask32_0, %%mm0 \n\t" - "movq _mask32_1, %%mm1 \n\t" - "movq _mask32_2, %%mm2 \n\t" - "movq _mask32_3, %%mm3 \n\t" - - "pand %%mm7, %%mm0 \n\t" - "pand %%mm7, %%mm1 \n\t" - "pand %%mm7, %%mm2 \n\t" - "pand %%mm7, %%mm3 \n\t" - - "pcmpeqb %%mm6, %%mm0 \n\t" - "pcmpeqb %%mm6, %%mm1 \n\t" - "pcmpeqb %%mm6, %%mm2 \n\t" - "pcmpeqb %%mm6, %%mm3 \n\t" - -// preload "movl len, %%ecx \n\t" // load length of line -// preload "movl srcptr, %%esi \n\t" // load source -// preload "movl dstptr, %%edi \n\t" // load dest - - "cmpl $0, %%ecx \n\t" // lcr - "jz mainloop32end \n\t" - - "mainloop32: \n\t" - "movq (%%esi), %%mm4 \n\t" - "pand %%mm0, %%mm4 \n\t" - "movq %%mm0, %%mm6 \n\t" - "movq (%%edi), %%mm7 \n\t" - "pandn %%mm7, %%mm6 \n\t" - "por %%mm6, %%mm4 \n\t" - "movq %%mm4, (%%edi) \n\t" - - "movq 8(%%esi), %%mm5 \n\t" - "pand %%mm1, %%mm5 \n\t" - "movq %%mm1, %%mm7 \n\t" - "movq 8(%%edi), %%mm6 \n\t" - "pandn %%mm6, %%mm7 \n\t" - "por %%mm7, %%mm5 \n\t" - "movq %%mm5, 8(%%edi) \n\t" - - "movq 16(%%esi), %%mm6 \n\t" - "pand %%mm2, %%mm6 \n\t" - "movq %%mm2, %%mm4 \n\t" - "movq 16(%%edi), %%mm7 \n\t" - "pandn %%mm7, %%mm4 \n\t" - "por %%mm4, %%mm6 \n\t" - "movq %%mm6, 16(%%edi) \n\t" - - "movq 24(%%esi), %%mm7 \n\t" - "pand %%mm3, %%mm7 \n\t" - "movq %%mm3, %%mm5 \n\t" - "movq 24(%%edi), %%mm4 \n\t" - "pandn %%mm4, %%mm5 \n\t" - "por %%mm5, %%mm7 \n\t" - "movq %%mm7, 24(%%edi) \n\t" - - "addl $32, %%esi \n\t" // inc by 32 bytes processed - "addl $32, %%edi \n\t" - "subl $8, %%ecx \n\t" // dec by 8 pixels processed - "ja mainloop32 \n\t" - - "mainloop32end: \n\t" -// preload "movl diff, %%ecx \n\t" // (diff is in eax) - "movl %%eax, %%ecx \n\t" - "cmpl $0, %%ecx \n\t" - "jz end32 \n\t" -// preload "movl mask, %%edx \n\t" - "sall $24, %%edx \n\t" // low byte => high byte - - "secondloop32: \n\t" - "sall %%edx \n\t" // move high bit to CF - "jnc skip32 \n\t" // if CF = 0 - "movl (%%esi), %%eax \n\t" - "movl %%eax, (%%edi) \n\t" - - "skip32: \n\t" - "addl $4, %%esi \n\t" - "addl $4, %%edi \n\t" - "decl %%ecx \n\t" - "jnz secondloop32 \n\t" - - "end32: \n\t" - "EMMS \n\t" // DONE - - : "=a" (dummy_value_a), // output regs (dummy) - "=d" (dummy_value_d), - "=c" (dummy_value_c), - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "3" (srcptr), // esi // input regs - "4" (dstptr), // edi - "0" (diff), // eax -// was (unmask) "b" RESERVED // ebx // Global Offset Table idx - "2" (len), // ecx - "1" (mask) // edx - -#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0", "%mm1", "%mm2", "%mm3" // clobber list - , "%mm4", "%mm5", "%mm6", "%mm7" -#endif - ); - } - else /* mmx _not supported - Use modified C routine */ -#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ - { - register png_uint_32 i; - png_uint_32 initial_val = BPP4 * png_pass_start[png_ptr->pass]; - /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ - register int stride = BPP4 * png_pass_inc[png_ptr->pass]; - /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ - register int rep_bytes = BPP4 * png_pass_width[png_ptr->pass]; - /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ - png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ - int diff = (int) (png_ptr->width & 7); /* amount lost */ - register png_uint_32 final_val = BPP4 * len; /* GRR bugfix */ - - srcptr = png_ptr->row_buf + 1 + initial_val; - dstptr = row + initial_val; - - for (i = initial_val; i < final_val; i += stride) - { - png_memcpy(dstptr, srcptr, rep_bytes); - srcptr += stride; - dstptr += stride; - } - if (diff) /* number of leftover pixels: 3 for pngtest */ - { - final_val+=diff*BPP4; - for (; i < final_val; i += stride) - { - if (rep_bytes > (int)(final_val-i)) - rep_bytes = (int)(final_val-i); - png_memcpy(dstptr, srcptr, rep_bytes); - srcptr += stride; - dstptr += stride; - } - } - } /* end of else (_mmx_supported) */ - - break; - } /* end 32 bpp */ - - case 48: /* png_ptr->row_info.pixel_depth */ - { - png_bytep srcptr; - png_bytep dstptr; - -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) -#if !defined(PNG_1_0_X) - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) - /* && _mmx_supported */ ) -#else - if (_mmx_supported) -#endif - { - png_uint_32 len; - int diff; - int dummy_value_a; // fix 'forbidden register spilled' error - int dummy_value_d; - int dummy_value_c; - int dummy_value_S; - int dummy_value_D; - _unmask = ~mask; // global variable for -fPIC version - srcptr = png_ptr->row_buf + 1; - dstptr = row; - len = png_ptr->width &~7; // reduce to multiple of 8 - diff = (int) (png_ptr->width & 7); // amount lost // - - __asm__ __volatile__ ( - "movd _unmask, %%mm7 \n\t" // load bit pattern - "psubb %%mm6, %%mm6 \n\t" // zero mm6 - "punpcklbw %%mm7, %%mm7 \n\t" - "punpcklwd %%mm7, %%mm7 \n\t" - "punpckldq %%mm7, %%mm7 \n\t" // fill reg with 8 masks - - "movq _mask48_0, %%mm0 \n\t" - "movq _mask48_1, %%mm1 \n\t" - "movq _mask48_2, %%mm2 \n\t" - "movq _mask48_3, %%mm3 \n\t" - "movq _mask48_4, %%mm4 \n\t" - "movq _mask48_5, %%mm5 \n\t" - - "pand %%mm7, %%mm0 \n\t" - "pand %%mm7, %%mm1 \n\t" - "pand %%mm7, %%mm2 \n\t" - "pand %%mm7, %%mm3 \n\t" - "pand %%mm7, %%mm4 \n\t" - "pand %%mm7, %%mm5 \n\t" - - "pcmpeqb %%mm6, %%mm0 \n\t" - "pcmpeqb %%mm6, %%mm1 \n\t" - "pcmpeqb %%mm6, %%mm2 \n\t" - "pcmpeqb %%mm6, %%mm3 \n\t" - "pcmpeqb %%mm6, %%mm4 \n\t" - "pcmpeqb %%mm6, %%mm5 \n\t" - -// preload "movl len, %%ecx \n\t" // load length of line -// preload "movl srcptr, %%esi \n\t" // load source -// preload "movl dstptr, %%edi \n\t" // load dest - - "cmpl $0, %%ecx \n\t" - "jz mainloop48end \n\t" - - "mainloop48: \n\t" - "movq (%%esi), %%mm7 \n\t" - "pand %%mm0, %%mm7 \n\t" - "movq %%mm0, %%mm6 \n\t" - "pandn (%%edi), %%mm6 \n\t" - "por %%mm6, %%mm7 \n\t" - "movq %%mm7, (%%edi) \n\t" - - "movq 8(%%esi), %%mm6 \n\t" - "pand %%mm1, %%mm6 \n\t" - "movq %%mm1, %%mm7 \n\t" - "pandn 8(%%edi), %%mm7 \n\t" - "por %%mm7, %%mm6 \n\t" - "movq %%mm6, 8(%%edi) \n\t" - - "movq 16(%%esi), %%mm6 \n\t" - "pand %%mm2, %%mm6 \n\t" - "movq %%mm2, %%mm7 \n\t" - "pandn 16(%%edi), %%mm7 \n\t" - "por %%mm7, %%mm6 \n\t" - "movq %%mm6, 16(%%edi) \n\t" - - "movq 24(%%esi), %%mm7 \n\t" - "pand %%mm3, %%mm7 \n\t" - "movq %%mm3, %%mm6 \n\t" - "pandn 24(%%edi), %%mm6 \n\t" - "por %%mm6, %%mm7 \n\t" - "movq %%mm7, 24(%%edi) \n\t" - - "movq 32(%%esi), %%mm6 \n\t" - "pand %%mm4, %%mm6 \n\t" - "movq %%mm4, %%mm7 \n\t" - "pandn 32(%%edi), %%mm7 \n\t" - "por %%mm7, %%mm6 \n\t" - "movq %%mm6, 32(%%edi) \n\t" - - "movq 40(%%esi), %%mm7 \n\t" - "pand %%mm5, %%mm7 \n\t" - "movq %%mm5, %%mm6 \n\t" - "pandn 40(%%edi), %%mm6 \n\t" - "por %%mm6, %%mm7 \n\t" - "movq %%mm7, 40(%%edi) \n\t" - - "addl $48, %%esi \n\t" // inc by 48 bytes processed - "addl $48, %%edi \n\t" - "subl $8, %%ecx \n\t" // dec by 8 pixels processed - - "ja mainloop48 \n\t" - - "mainloop48end: \n\t" -// preload "movl diff, %%ecx \n\t" // (diff is in eax) - "movl %%eax, %%ecx \n\t" - "cmpl $0, %%ecx \n\t" - "jz end48 \n\t" -// preload "movl mask, %%edx \n\t" - "sall $24, %%edx \n\t" // make low byte, high byte - - "secondloop48: \n\t" - "sall %%edx \n\t" // move high bit to CF - "jnc skip48 \n\t" // if CF = 0 - "movl (%%esi), %%eax \n\t" - "movl %%eax, (%%edi) \n\t" - - "skip48: \n\t" - "addl $4, %%esi \n\t" - "addl $4, %%edi \n\t" - "decl %%ecx \n\t" - "jnz secondloop48 \n\t" - - "end48: \n\t" - "EMMS \n\t" // DONE - - : "=a" (dummy_value_a), // output regs (dummy) - "=d" (dummy_value_d), - "=c" (dummy_value_c), - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "3" (srcptr), // esi // input regs - "4" (dstptr), // edi - "0" (diff), // eax -// was (unmask) "b" RESERVED // ebx // Global Offset Table idx - "2" (len), // ecx - "1" (mask) // edx - -#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0", "%mm1", "%mm2", "%mm3" // clobber list - , "%mm4", "%mm5", "%mm6", "%mm7" -#endif - ); - } - else /* mmx _not supported - Use modified C routine */ -#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ - { - register png_uint_32 i; - png_uint_32 initial_val = BPP6 * png_pass_start[png_ptr->pass]; - /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ - register int stride = BPP6 * png_pass_inc[png_ptr->pass]; - /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ - register int rep_bytes = BPP6 * png_pass_width[png_ptr->pass]; - /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ - png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ - int diff = (int) (png_ptr->width & 7); /* amount lost */ - register png_uint_32 final_val = BPP6 * len; /* GRR bugfix */ - - srcptr = png_ptr->row_buf + 1 + initial_val; - dstptr = row + initial_val; - - for (i = initial_val; i < final_val; i += stride) - { - png_memcpy(dstptr, srcptr, rep_bytes); - srcptr += stride; - dstptr += stride; - } - if (diff) /* number of leftover pixels: 3 for pngtest */ - { - final_val+=diff*BPP6; - for (; i < final_val; i += stride) - { - if (rep_bytes > (int)(final_val-i)) - rep_bytes = (int)(final_val-i); - png_memcpy(dstptr, srcptr, rep_bytes); - srcptr += stride; - dstptr += stride; - } - } - } /* end of else (_mmx_supported) */ - - break; - } /* end 48 bpp */ - - case 64: /* png_ptr->row_info.pixel_depth */ - { - png_bytep srcptr; - png_bytep dstptr; - register png_uint_32 i; - png_uint_32 initial_val = BPP8 * png_pass_start[png_ptr->pass]; - /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */ - register int stride = BPP8 * png_pass_inc[png_ptr->pass]; - /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */ - register int rep_bytes = BPP8 * png_pass_width[png_ptr->pass]; - /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */ - png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */ - int diff = (int) (png_ptr->width & 7); /* amount lost */ - register png_uint_32 final_val = BPP8 * len; /* GRR bugfix */ - - srcptr = png_ptr->row_buf + 1 + initial_val; - dstptr = row + initial_val; - - for (i = initial_val; i < final_val; i += stride) - { - png_memcpy(dstptr, srcptr, rep_bytes); - srcptr += stride; - dstptr += stride; - } - if (diff) /* number of leftover pixels: 3 for pngtest */ - { - final_val+=diff*BPP8; - for (; i < final_val; i += stride) - { - if (rep_bytes > (int)(final_val-i)) - rep_bytes = (int)(final_val-i); - png_memcpy(dstptr, srcptr, rep_bytes); - srcptr += stride; - dstptr += stride; - } - } - - break; - } /* end 64 bpp */ - - default: /* png_ptr->row_info.pixel_depth != 1,2,4,8,16,24,32,48,64 */ - { - /* this should never happen */ - png_warning(png_ptr, "Invalid row_info.pixel_depth in pnggccrd"); - break; - } - } /* end switch (png_ptr->row_info.pixel_depth) */ - - } /* end if (non-trivial mask) */ - -} /* end png_combine_row() */ - -#endif /* PNG_HAVE_ASSEMBLER_COMBINE_ROW */ - - - - -/*===========================================================================*/ -/* */ -/* P N G _ D O _ R E A D _ I N T E R L A C E */ -/* */ -/*===========================================================================*/ - -#if defined(PNG_READ_INTERLACING_SUPPORTED) -#if defined(PNG_HAVE_ASSEMBLER_READ_INTERLACE) - -/* png_do_read_interlace() is called after any 16-bit to 8-bit conversion - * has taken place. [GRR: what other steps come before and/or after?] - */ - -void /* PRIVATE */ -png_do_read_interlace(png_structp png_ptr) -{ - png_row_infop row_info = &(png_ptr->row_info); - png_bytep row = png_ptr->row_buf + 1; - int pass = png_ptr->pass; -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - png_uint_32 transformations = png_ptr->transformations; -#endif - - png_debug(1, "in png_do_read_interlace (pnggccrd.c)\n"); - -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) - if (_mmx_supported == 2) { -#if !defined(PNG_1_0_X) - /* this should have happened in png_init_mmx_flags() already */ - png_warning(png_ptr, "asm_flags may not have been initialized"); -#endif - png_mmx_support(); - } -#endif - - if (row != NULL && row_info != NULL) - { - png_uint_32 final_width; - - final_width = row_info->width * png_pass_inc[pass]; - - switch (row_info->pixel_depth) - { - case 1: - { - png_bytep sp, dp; - int sshift, dshift; - int s_start, s_end, s_inc; - png_byte v; - png_uint_32 i; - int j; - - sp = row + (png_size_t)((row_info->width - 1) >> 3); - dp = row + (png_size_t)((final_width - 1) >> 3); -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (transformations & PNG_PACKSWAP) - { - sshift = (int)((row_info->width + 7) & 7); - dshift = (int)((final_width + 7) & 7); - s_start = 7; - s_end = 0; - s_inc = -1; - } - else -#endif - { - sshift = 7 - (int)((row_info->width + 7) & 7); - dshift = 7 - (int)((final_width + 7) & 7); - s_start = 0; - s_end = 7; - s_inc = 1; - } - - for (i = row_info->width; i; i--) - { - v = (png_byte)((*sp >> sshift) & 0x1); - for (j = 0; j < png_pass_inc[pass]; j++) - { - *dp &= (png_byte)((0x7f7f >> (7 - dshift)) & 0xff); - *dp |= (png_byte)(v << dshift); - if (dshift == s_end) - { - dshift = s_start; - dp--; - } - else - dshift += s_inc; - } - if (sshift == s_end) - { - sshift = s_start; - sp--; - } - else - sshift += s_inc; - } - break; - } - - case 2: - { - png_bytep sp, dp; - int sshift, dshift; - int s_start, s_end, s_inc; - png_uint_32 i; - - sp = row + (png_size_t)((row_info->width - 1) >> 2); - dp = row + (png_size_t)((final_width - 1) >> 2); -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (transformations & PNG_PACKSWAP) - { - sshift = (png_size_t)(((row_info->width + 3) & 3) << 1); - dshift = (png_size_t)(((final_width + 3) & 3) << 1); - s_start = 6; - s_end = 0; - s_inc = -2; - } - else -#endif - { - sshift = (png_size_t)((3 - ((row_info->width + 3) & 3)) << 1); - dshift = (png_size_t)((3 - ((final_width + 3) & 3)) << 1); - s_start = 0; - s_end = 6; - s_inc = 2; - } - - for (i = row_info->width; i; i--) - { - png_byte v; - int j; - - v = (png_byte)((*sp >> sshift) & 0x3); - for (j = 0; j < png_pass_inc[pass]; j++) - { - *dp &= (png_byte)((0x3f3f >> (6 - dshift)) & 0xff); - *dp |= (png_byte)(v << dshift); - if (dshift == s_end) - { - dshift = s_start; - dp--; - } - else - dshift += s_inc; - } - if (sshift == s_end) - { - sshift = s_start; - sp--; - } - else - sshift += s_inc; - } - break; - } - - case 4: - { - png_bytep sp, dp; - int sshift, dshift; - int s_start, s_end, s_inc; - png_uint_32 i; - - sp = row + (png_size_t)((row_info->width - 1) >> 1); - dp = row + (png_size_t)((final_width - 1) >> 1); -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (transformations & PNG_PACKSWAP) - { - sshift = (png_size_t)(((row_info->width + 1) & 1) << 2); - dshift = (png_size_t)(((final_width + 1) & 1) << 2); - s_start = 4; - s_end = 0; - s_inc = -4; - } - else -#endif - { - sshift = (png_size_t)((1 - ((row_info->width + 1) & 1)) << 2); - dshift = (png_size_t)((1 - ((final_width + 1) & 1)) << 2); - s_start = 0; - s_end = 4; - s_inc = 4; - } - - for (i = row_info->width; i; i--) - { - png_byte v; - int j; - - v = (png_byte)((*sp >> sshift) & 0xf); - for (j = 0; j < png_pass_inc[pass]; j++) - { - *dp &= (png_byte)((0xf0f >> (4 - dshift)) & 0xff); - *dp |= (png_byte)(v << dshift); - if (dshift == s_end) - { - dshift = s_start; - dp--; - } - else - dshift += s_inc; - } - if (sshift == s_end) - { - sshift = s_start; - sp--; - } - else - sshift += s_inc; - } - break; - } - - /*====================================================================*/ - - default: /* 8-bit or larger (this is where the routine is modified) */ - { -#if 0 -// static unsigned long long _const4 = 0x0000000000FFFFFFLL; no good -// static unsigned long long const4 = 0x0000000000FFFFFFLL; no good -// unsigned long long _const4 = 0x0000000000FFFFFFLL; no good -// unsigned long long const4 = 0x0000000000FFFFFFLL; no good -#endif - png_bytep sptr, dp; - png_uint_32 i; - png_size_t pixel_bytes; - int width = (int)row_info->width; - - pixel_bytes = (row_info->pixel_depth >> 3); - - /* point sptr at the last pixel in the pre-expanded row: */ - sptr = row + (width - 1) * pixel_bytes; - - /* point dp at the last pixel position in the expanded row: */ - dp = row + (final_width - 1) * pixel_bytes; - - /* New code by Nirav Chhatrapati - Intel Corporation */ - -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) -#if !defined(PNG_1_0_X) - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_INTERLACE) - /* && _mmx_supported */ ) -#else - if (_mmx_supported) -#endif - { - //-------------------------------------------------------------- - if (pixel_bytes == 3) - { - if (((pass == 0) || (pass == 1)) && width) - { - int dummy_value_c; // fix 'forbidden register spilled' - int dummy_value_S; - int dummy_value_D; - - __asm__ __volatile__ ( - "subl $21, %%edi \n\t" - // (png_pass_inc[pass] - 1)*pixel_bytes - - ".loop3_pass0: \n\t" - "movd (%%esi), %%mm0 \n\t" // x x x x x 2 1 0 - "pand _const4, %%mm0 \n\t" // z z z z z 2 1 0 - "movq %%mm0, %%mm1 \n\t" // z z z z z 2 1 0 - "psllq $16, %%mm0 \n\t" // z z z 2 1 0 z z - "movq %%mm0, %%mm2 \n\t" // z z z 2 1 0 z z - "psllq $24, %%mm0 \n\t" // 2 1 0 z z z z z - "psrlq $8, %%mm1 \n\t" // z z z z z z 2 1 - "por %%mm2, %%mm0 \n\t" // 2 1 0 2 1 0 z z - "por %%mm1, %%mm0 \n\t" // 2 1 0 2 1 0 2 1 - "movq %%mm0, %%mm3 \n\t" // 2 1 0 2 1 0 2 1 - "psllq $16, %%mm0 \n\t" // 0 2 1 0 2 1 z z - "movq %%mm3, %%mm4 \n\t" // 2 1 0 2 1 0 2 1 - "punpckhdq %%mm0, %%mm3 \n\t" // 0 2 1 0 2 1 0 2 - "movq %%mm4, 16(%%edi) \n\t" - "psrlq $32, %%mm0 \n\t" // z z z z 0 2 1 0 - "movq %%mm3, 8(%%edi) \n\t" - "punpckldq %%mm4, %%mm0 \n\t" // 1 0 2 1 0 2 1 0 - "subl $3, %%esi \n\t" - "movq %%mm0, (%%edi) \n\t" - "subl $24, %%edi \n\t" - "decl %%ecx \n\t" - "jnz .loop3_pass0 \n\t" - "EMMS \n\t" // DONE - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "1" (sptr), // esi // input regs - "2" (dp), // edi - "0" (width) // ecx -// doesn't work "i" (0x0000000000FFFFFFLL) // %1 (a.k.a. _const4) - -#if 0 /* %mm0, ..., %mm4 not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0", "%mm1", "%mm2" // clobber list - , "%mm3", "%mm4" -#endif - ); - } - else if (((pass == 2) || (pass == 3)) && width) - { - int dummy_value_c; // fix 'forbidden register spilled' - int dummy_value_S; - int dummy_value_D; - - __asm__ __volatile__ ( - "subl $9, %%edi \n\t" - // (png_pass_inc[pass] - 1)*pixel_bytes - - ".loop3_pass2: \n\t" - "movd (%%esi), %%mm0 \n\t" // x x x x x 2 1 0 - "pand _const4, %%mm0 \n\t" // z z z z z 2 1 0 - "movq %%mm0, %%mm1 \n\t" // z z z z z 2 1 0 - "psllq $16, %%mm0 \n\t" // z z z 2 1 0 z z - "movq %%mm0, %%mm2 \n\t" // z z z 2 1 0 z z - "psllq $24, %%mm0 \n\t" // 2 1 0 z z z z z - "psrlq $8, %%mm1 \n\t" // z z z z z z 2 1 - "por %%mm2, %%mm0 \n\t" // 2 1 0 2 1 0 z z - "por %%mm1, %%mm0 \n\t" // 2 1 0 2 1 0 2 1 - "movq %%mm0, 4(%%edi) \n\t" - "psrlq $16, %%mm0 \n\t" // z z 2 1 0 2 1 0 - "subl $3, %%esi \n\t" - "movd %%mm0, (%%edi) \n\t" - "subl $12, %%edi \n\t" - "decl %%ecx \n\t" - "jnz .loop3_pass2 \n\t" - "EMMS \n\t" // DONE - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "1" (sptr), // esi // input regs - "2" (dp), // edi - "0" (width) // ecx - -#if 0 /* %mm0, ..., %mm2 not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0", "%mm1", "%mm2" // clobber list -#endif - ); - } - else if (width) /* && ((pass == 4) || (pass == 5)) */ - { - int width_mmx = ((width >> 1) << 1) - 8; // GRR: huh? - if (width_mmx < 0) - width_mmx = 0; - width -= width_mmx; // 8 or 9 pix, 24 or 27 bytes - if (width_mmx) - { - // png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; - // sptr points at last pixel in pre-expanded row - // dp points at last pixel position in expanded row - int dummy_value_c; // fix 'forbidden register spilled' - int dummy_value_S; - int dummy_value_D; - - __asm__ __volatile__ ( - "subl $3, %%esi \n\t" - "subl $9, %%edi \n\t" - // (png_pass_inc[pass] + 1)*pixel_bytes - - ".loop3_pass4: \n\t" - "movq (%%esi), %%mm0 \n\t" // x x 5 4 3 2 1 0 - "movq %%mm0, %%mm1 \n\t" // x x 5 4 3 2 1 0 - "movq %%mm0, %%mm2 \n\t" // x x 5 4 3 2 1 0 - "psllq $24, %%mm0 \n\t" // 4 3 2 1 0 z z z - "pand _const4, %%mm1 \n\t" // z z z z z 2 1 0 - "psrlq $24, %%mm2 \n\t" // z z z x x 5 4 3 - "por %%mm1, %%mm0 \n\t" // 4 3 2 1 0 2 1 0 - "movq %%mm2, %%mm3 \n\t" // z z z x x 5 4 3 - "psllq $8, %%mm2 \n\t" // z z x x 5 4 3 z - "movq %%mm0, (%%edi) \n\t" - "psrlq $16, %%mm3 \n\t" // z z z z z x x 5 - "pand _const6, %%mm3 \n\t" // z z z z z z z 5 - "por %%mm3, %%mm2 \n\t" // z z x x 5 4 3 5 - "subl $6, %%esi \n\t" - "movd %%mm2, 8(%%edi) \n\t" - "subl $12, %%edi \n\t" - "subl $2, %%ecx \n\t" - "jnz .loop3_pass4 \n\t" - "EMMS \n\t" // DONE - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "1" (sptr), // esi // input regs - "2" (dp), // edi - "0" (width_mmx) // ecx - -#if 0 /* %mm0, ..., %mm3 not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0", "%mm1" // clobber list - , "%mm2", "%mm3" -#endif - ); - } - - sptr -= width_mmx*3; - dp -= width_mmx*6; - for (i = width; i; i--) - { - png_byte v[8]; - int j; - - png_memcpy(v, sptr, 3); - for (j = 0; j < png_pass_inc[pass]; j++) - { - png_memcpy(dp, v, 3); - dp -= 3; - } - sptr -= 3; - } - } - } /* end of pixel_bytes == 3 */ - - //-------------------------------------------------------------- - else if (pixel_bytes == 1) - { - if (((pass == 0) || (pass == 1)) && width) - { - int width_mmx = ((width >> 2) << 2); - width -= width_mmx; // 0-3 pixels => 0-3 bytes - if (width_mmx) - { - int dummy_value_c; // fix 'forbidden register spilled' - int dummy_value_S; - int dummy_value_D; - - __asm__ __volatile__ ( - "subl $3, %%esi \n\t" - "subl $31, %%edi \n\t" - - ".loop1_pass0: \n\t" - "movd (%%esi), %%mm0 \n\t" // x x x x 3 2 1 0 - "movq %%mm0, %%mm1 \n\t" // x x x x 3 2 1 0 - "punpcklbw %%mm0, %%mm0 \n\t" // 3 3 2 2 1 1 0 0 - "movq %%mm0, %%mm2 \n\t" // 3 3 2 2 1 1 0 0 - "punpcklwd %%mm0, %%mm0 \n\t" // 1 1 1 1 0 0 0 0 - "movq %%mm0, %%mm3 \n\t" // 1 1 1 1 0 0 0 0 - "punpckldq %%mm0, %%mm0 \n\t" // 0 0 0 0 0 0 0 0 - "punpckhdq %%mm3, %%mm3 \n\t" // 1 1 1 1 1 1 1 1 - "movq %%mm0, (%%edi) \n\t" - "punpckhwd %%mm2, %%mm2 \n\t" // 3 3 3 3 2 2 2 2 - "movq %%mm3, 8(%%edi) \n\t" - "movq %%mm2, %%mm4 \n\t" // 3 3 3 3 2 2 2 2 - "punpckldq %%mm2, %%mm2 \n\t" // 2 2 2 2 2 2 2 2 - "punpckhdq %%mm4, %%mm4 \n\t" // 3 3 3 3 3 3 3 3 - "movq %%mm2, 16(%%edi) \n\t" - "subl $4, %%esi \n\t" - "movq %%mm4, 24(%%edi) \n\t" - "subl $32, %%edi \n\t" - "subl $4, %%ecx \n\t" - "jnz .loop1_pass0 \n\t" - "EMMS \n\t" // DONE - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "1" (sptr), // esi // input regs - "2" (dp), // edi - "0" (width_mmx) // ecx - -#if 0 /* %mm0, ..., %mm4 not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0", "%mm1", "%mm2" // clobber list - , "%mm3", "%mm4" -#endif - ); - } - - sptr -= width_mmx; - dp -= width_mmx*8; - for (i = width; i; i--) - { - int j; - - /* I simplified this part in version 1.0.4e - * here and in several other instances where - * pixel_bytes == 1 -- GR-P - * - * Original code: - * - * png_byte v[8]; - * png_memcpy(v, sptr, pixel_bytes); - * for (j = 0; j < png_pass_inc[pass]; j++) - * { - * png_memcpy(dp, v, pixel_bytes); - * dp -= pixel_bytes; - * } - * sptr -= pixel_bytes; - * - * Replacement code is in the next three lines: - */ - - for (j = 0; j < png_pass_inc[pass]; j++) - { - *dp-- = *sptr; - } - --sptr; - } - } - else if (((pass == 2) || (pass == 3)) && width) - { - int width_mmx = ((width >> 2) << 2); - width -= width_mmx; // 0-3 pixels => 0-3 bytes - if (width_mmx) - { - int dummy_value_c; // fix 'forbidden register spilled' - int dummy_value_S; - int dummy_value_D; - - __asm__ __volatile__ ( - "subl $3, %%esi \n\t" - "subl $15, %%edi \n\t" - - ".loop1_pass2: \n\t" - "movd (%%esi), %%mm0 \n\t" // x x x x 3 2 1 0 - "punpcklbw %%mm0, %%mm0 \n\t" // 3 3 2 2 1 1 0 0 - "movq %%mm0, %%mm1 \n\t" // 3 3 2 2 1 1 0 0 - "punpcklwd %%mm0, %%mm0 \n\t" // 1 1 1 1 0 0 0 0 - "punpckhwd %%mm1, %%mm1 \n\t" // 3 3 3 3 2 2 2 2 - "movq %%mm0, (%%edi) \n\t" - "subl $4, %%esi \n\t" - "movq %%mm1, 8(%%edi) \n\t" - "subl $16, %%edi \n\t" - "subl $4, %%ecx \n\t" - "jnz .loop1_pass2 \n\t" - "EMMS \n\t" // DONE - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "1" (sptr), // esi // input regs - "2" (dp), // edi - "0" (width_mmx) // ecx - -#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0", "%mm1" // clobber list -#endif - ); - } - - sptr -= width_mmx; - dp -= width_mmx*4; - for (i = width; i; i--) - { - int j; - - for (j = 0; j < png_pass_inc[pass]; j++) - { - *dp-- = *sptr; - } - --sptr; - } - } - else if (width) /* && ((pass == 4) || (pass == 5)) */ - { - int width_mmx = ((width >> 3) << 3); - width -= width_mmx; // 0-3 pixels => 0-3 bytes - if (width_mmx) - { - int dummy_value_c; // fix 'forbidden register spilled' - int dummy_value_S; - int dummy_value_D; - - __asm__ __volatile__ ( - "subl $7, %%esi \n\t" - "subl $15, %%edi \n\t" - - ".loop1_pass4: \n\t" - "movq (%%esi), %%mm0 \n\t" // 7 6 5 4 3 2 1 0 - "movq %%mm0, %%mm1 \n\t" // 7 6 5 4 3 2 1 0 - "punpcklbw %%mm0, %%mm0 \n\t" // 3 3 2 2 1 1 0 0 - "punpckhbw %%mm1, %%mm1 \n\t" // 7 7 6 6 5 5 4 4 - "movq %%mm1, 8(%%edi) \n\t" - "subl $8, %%esi \n\t" - "movq %%mm0, (%%edi) \n\t" - "subl $16, %%edi \n\t" - "subl $8, %%ecx \n\t" - "jnz .loop1_pass4 \n\t" - "EMMS \n\t" // DONE - - : "=c" (dummy_value_c), // output regs (none) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "1" (sptr), // esi // input regs - "2" (dp), // edi - "0" (width_mmx) // ecx - -#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0", "%mm1" // clobber list -#endif - ); - } - - sptr -= width_mmx; - dp -= width_mmx*2; - for (i = width; i; i--) - { - int j; - - for (j = 0; j < png_pass_inc[pass]; j++) - { - *dp-- = *sptr; - } - --sptr; - } - } - } /* end of pixel_bytes == 1 */ - - //-------------------------------------------------------------- - else if (pixel_bytes == 2) - { - if (((pass == 0) || (pass == 1)) && width) - { - int width_mmx = ((width >> 1) << 1); - width -= width_mmx; // 0,1 pixels => 0,2 bytes - if (width_mmx) - { - int dummy_value_c; // fix 'forbidden register spilled' - int dummy_value_S; - int dummy_value_D; - - __asm__ __volatile__ ( - "subl $2, %%esi \n\t" - "subl $30, %%edi \n\t" - - ".loop2_pass0: \n\t" - "movd (%%esi), %%mm0 \n\t" // x x x x 3 2 1 0 - "punpcklwd %%mm0, %%mm0 \n\t" // 3 2 3 2 1 0 1 0 - "movq %%mm0, %%mm1 \n\t" // 3 2 3 2 1 0 1 0 - "punpckldq %%mm0, %%mm0 \n\t" // 1 0 1 0 1 0 1 0 - "punpckhdq %%mm1, %%mm1 \n\t" // 3 2 3 2 3 2 3 2 - "movq %%mm0, (%%edi) \n\t" - "movq %%mm0, 8(%%edi) \n\t" - "movq %%mm1, 16(%%edi) \n\t" - "subl $4, %%esi \n\t" - "movq %%mm1, 24(%%edi) \n\t" - "subl $32, %%edi \n\t" - "subl $2, %%ecx \n\t" - "jnz .loop2_pass0 \n\t" - "EMMS \n\t" // DONE - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "1" (sptr), // esi // input regs - "2" (dp), // edi - "0" (width_mmx) // ecx - -#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0", "%mm1" // clobber list -#endif - ); - } - - sptr -= (width_mmx*2 - 2); // sign fixed - dp -= (width_mmx*16 - 2); // sign fixed - for (i = width; i; i--) - { - png_byte v[8]; - int j; - sptr -= 2; - png_memcpy(v, sptr, 2); - for (j = 0; j < png_pass_inc[pass]; j++) - { - dp -= 2; - png_memcpy(dp, v, 2); - } - } - } - else if (((pass == 2) || (pass == 3)) && width) - { - int width_mmx = ((width >> 1) << 1) ; - width -= width_mmx; // 0,1 pixels => 0,2 bytes - if (width_mmx) - { - int dummy_value_c; // fix 'forbidden register spilled' - int dummy_value_S; - int dummy_value_D; - - __asm__ __volatile__ ( - "subl $2, %%esi \n\t" - "subl $14, %%edi \n\t" - - ".loop2_pass2: \n\t" - "movd (%%esi), %%mm0 \n\t" // x x x x 3 2 1 0 - "punpcklwd %%mm0, %%mm0 \n\t" // 3 2 3 2 1 0 1 0 - "movq %%mm0, %%mm1 \n\t" // 3 2 3 2 1 0 1 0 - "punpckldq %%mm0, %%mm0 \n\t" // 1 0 1 0 1 0 1 0 - "punpckhdq %%mm1, %%mm1 \n\t" // 3 2 3 2 3 2 3 2 - "movq %%mm0, (%%edi) \n\t" - "subl $4, %%esi \n\t" - "movq %%mm1, 8(%%edi) \n\t" - "subl $16, %%edi \n\t" - "subl $2, %%ecx \n\t" - "jnz .loop2_pass2 \n\t" - "EMMS \n\t" // DONE - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "1" (sptr), // esi // input regs - "2" (dp), // edi - "0" (width_mmx) // ecx - -#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0", "%mm1" // clobber list -#endif - ); - } - - sptr -= (width_mmx*2 - 2); // sign fixed - dp -= (width_mmx*8 - 2); // sign fixed - for (i = width; i; i--) - { - png_byte v[8]; - int j; - sptr -= 2; - png_memcpy(v, sptr, 2); - for (j = 0; j < png_pass_inc[pass]; j++) - { - dp -= 2; - png_memcpy(dp, v, 2); - } - } - } - else if (width) // pass == 4 or 5 - { - int width_mmx = ((width >> 1) << 1) ; - width -= width_mmx; // 0,1 pixels => 0,2 bytes - if (width_mmx) - { - int dummy_value_c; // fix 'forbidden register spilled' - int dummy_value_S; - int dummy_value_D; - - __asm__ __volatile__ ( - "subl $2, %%esi \n\t" - "subl $6, %%edi \n\t" - - ".loop2_pass4: \n\t" - "movd (%%esi), %%mm0 \n\t" // x x x x 3 2 1 0 - "punpcklwd %%mm0, %%mm0 \n\t" // 3 2 3 2 1 0 1 0 - "subl $4, %%esi \n\t" - "movq %%mm0, (%%edi) \n\t" - "subl $8, %%edi \n\t" - "subl $2, %%ecx \n\t" - "jnz .loop2_pass4 \n\t" - "EMMS \n\t" // DONE - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "1" (sptr), // esi // input regs - "2" (dp), // edi - "0" (width_mmx) // ecx - -#if 0 /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0" // clobber list -#endif - ); - } - - sptr -= (width_mmx*2 - 2); // sign fixed - dp -= (width_mmx*4 - 2); // sign fixed - for (i = width; i; i--) - { - png_byte v[8]; - int j; - sptr -= 2; - png_memcpy(v, sptr, 2); - for (j = 0; j < png_pass_inc[pass]; j++) - { - dp -= 2; - png_memcpy(dp, v, 2); - } - } - } - } /* end of pixel_bytes == 2 */ - - //-------------------------------------------------------------- - else if (pixel_bytes == 4) - { - if (((pass == 0) || (pass == 1)) && width) - { - int width_mmx = ((width >> 1) << 1); - width -= width_mmx; // 0,1 pixels => 0,4 bytes - if (width_mmx) - { - int dummy_value_c; // fix 'forbidden register spilled' - int dummy_value_S; - int dummy_value_D; - - __asm__ __volatile__ ( - "subl $4, %%esi \n\t" - "subl $60, %%edi \n\t" - - ".loop4_pass0: \n\t" - "movq (%%esi), %%mm0 \n\t" // 7 6 5 4 3 2 1 0 - "movq %%mm0, %%mm1 \n\t" // 7 6 5 4 3 2 1 0 - "punpckldq %%mm0, %%mm0 \n\t" // 3 2 1 0 3 2 1 0 - "punpckhdq %%mm1, %%mm1 \n\t" // 7 6 5 4 7 6 5 4 - "movq %%mm0, (%%edi) \n\t" - "movq %%mm0, 8(%%edi) \n\t" - "movq %%mm0, 16(%%edi) \n\t" - "movq %%mm0, 24(%%edi) \n\t" - "movq %%mm1, 32(%%edi) \n\t" - "movq %%mm1, 40(%%edi) \n\t" - "movq %%mm1, 48(%%edi) \n\t" - "subl $8, %%esi \n\t" - "movq %%mm1, 56(%%edi) \n\t" - "subl $64, %%edi \n\t" - "subl $2, %%ecx \n\t" - "jnz .loop4_pass0 \n\t" - "EMMS \n\t" // DONE - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "1" (sptr), // esi // input regs - "2" (dp), // edi - "0" (width_mmx) // ecx - -#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0", "%mm1" // clobber list -#endif - ); - } - - sptr -= (width_mmx*4 - 4); // sign fixed - dp -= (width_mmx*32 - 4); // sign fixed - for (i = width; i; i--) - { - png_byte v[8]; - int j; - sptr -= 4; - png_memcpy(v, sptr, 4); - for (j = 0; j < png_pass_inc[pass]; j++) - { - dp -= 4; - png_memcpy(dp, v, 4); - } - } - } - else if (((pass == 2) || (pass == 3)) && width) - { - int width_mmx = ((width >> 1) << 1); - width -= width_mmx; // 0,1 pixels => 0,4 bytes - if (width_mmx) - { - int dummy_value_c; // fix 'forbidden register spilled' - int dummy_value_S; - int dummy_value_D; - - __asm__ __volatile__ ( - "subl $4, %%esi \n\t" - "subl $28, %%edi \n\t" - - ".loop4_pass2: \n\t" - "movq (%%esi), %%mm0 \n\t" // 7 6 5 4 3 2 1 0 - "movq %%mm0, %%mm1 \n\t" // 7 6 5 4 3 2 1 0 - "punpckldq %%mm0, %%mm0 \n\t" // 3 2 1 0 3 2 1 0 - "punpckhdq %%mm1, %%mm1 \n\t" // 7 6 5 4 7 6 5 4 - "movq %%mm0, (%%edi) \n\t" - "movq %%mm0, 8(%%edi) \n\t" - "movq %%mm1, 16(%%edi) \n\t" - "movq %%mm1, 24(%%edi) \n\t" - "subl $8, %%esi \n\t" - "subl $32, %%edi \n\t" - "subl $2, %%ecx \n\t" - "jnz .loop4_pass2 \n\t" - "EMMS \n\t" // DONE - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "1" (sptr), // esi // input regs - "2" (dp), // edi - "0" (width_mmx) // ecx - -#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0", "%mm1" // clobber list -#endif - ); - } - - sptr -= (width_mmx*4 - 4); // sign fixed - dp -= (width_mmx*16 - 4); // sign fixed - for (i = width; i; i--) - { - png_byte v[8]; - int j; - sptr -= 4; - png_memcpy(v, sptr, 4); - for (j = 0; j < png_pass_inc[pass]; j++) - { - dp -= 4; - png_memcpy(dp, v, 4); - } - } - } - else if (width) // pass == 4 or 5 - { - int width_mmx = ((width >> 1) << 1) ; - width -= width_mmx; // 0,1 pixels => 0,4 bytes - if (width_mmx) - { - int dummy_value_c; // fix 'forbidden register spilled' - int dummy_value_S; - int dummy_value_D; - - __asm__ __volatile__ ( - "subl $4, %%esi \n\t" - "subl $12, %%edi \n\t" - - ".loop4_pass4: \n\t" - "movq (%%esi), %%mm0 \n\t" // 7 6 5 4 3 2 1 0 - "movq %%mm0, %%mm1 \n\t" // 7 6 5 4 3 2 1 0 - "punpckldq %%mm0, %%mm0 \n\t" // 3 2 1 0 3 2 1 0 - "punpckhdq %%mm1, %%mm1 \n\t" // 7 6 5 4 7 6 5 4 - "movq %%mm0, (%%edi) \n\t" - "subl $8, %%esi \n\t" - "movq %%mm1, 8(%%edi) \n\t" - "subl $16, %%edi \n\t" - "subl $2, %%ecx \n\t" - "jnz .loop4_pass4 \n\t" - "EMMS \n\t" // DONE - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "1" (sptr), // esi // input regs - "2" (dp), // edi - "0" (width_mmx) // ecx - -#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0", "%mm1" // clobber list -#endif - ); - } - - sptr -= (width_mmx*4 - 4); // sign fixed - dp -= (width_mmx*8 - 4); // sign fixed - for (i = width; i; i--) - { - png_byte v[8]; - int j; - sptr -= 4; - png_memcpy(v, sptr, 4); - for (j = 0; j < png_pass_inc[pass]; j++) - { - dp -= 4; - png_memcpy(dp, v, 4); - } - } - } - } /* end of pixel_bytes == 4 */ - - //-------------------------------------------------------------- - else if (pixel_bytes == 8) - { -// GRR TEST: should work, but needs testing (special 64-bit version of rpng2?) - // GRR NOTE: no need to combine passes here! - if (((pass == 0) || (pass == 1)) && width) - { - int dummy_value_c; // fix 'forbidden register spilled' - int dummy_value_S; - int dummy_value_D; - - // source is 8-byte RRGGBBAA - // dest is 64-byte RRGGBBAA RRGGBBAA RRGGBBAA RRGGBBAA ... - __asm__ __volatile__ ( - "subl $56, %%edi \n\t" // start of last block - - ".loop8_pass0: \n\t" - "movq (%%esi), %%mm0 \n\t" // 7 6 5 4 3 2 1 0 - "movq %%mm0, (%%edi) \n\t" - "movq %%mm0, 8(%%edi) \n\t" - "movq %%mm0, 16(%%edi) \n\t" - "movq %%mm0, 24(%%edi) \n\t" - "movq %%mm0, 32(%%edi) \n\t" - "movq %%mm0, 40(%%edi) \n\t" - "movq %%mm0, 48(%%edi) \n\t" - "subl $8, %%esi \n\t" - "movq %%mm0, 56(%%edi) \n\t" - "subl $64, %%edi \n\t" - "decl %%ecx \n\t" - "jnz .loop8_pass0 \n\t" - "EMMS \n\t" // DONE - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "1" (sptr), // esi // input regs - "2" (dp), // edi - "0" (width) // ecx - -#if 0 /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0" // clobber list -#endif - ); - } - else if (((pass == 2) || (pass == 3)) && width) - { - // source is 8-byte RRGGBBAA - // dest is 32-byte RRGGBBAA RRGGBBAA RRGGBBAA RRGGBBAA - // (recall that expansion is _in place_: sptr and dp - // both point at locations within same row buffer) - { - int dummy_value_c; // fix 'forbidden register spilled' - int dummy_value_S; - int dummy_value_D; - - __asm__ __volatile__ ( - "subl $24, %%edi \n\t" // start of last block - - ".loop8_pass2: \n\t" - "movq (%%esi), %%mm0 \n\t" // 7 6 5 4 3 2 1 0 - "movq %%mm0, (%%edi) \n\t" - "movq %%mm0, 8(%%edi) \n\t" - "movq %%mm0, 16(%%edi) \n\t" - "subl $8, %%esi \n\t" - "movq %%mm0, 24(%%edi) \n\t" - "subl $32, %%edi \n\t" - "decl %%ecx \n\t" - "jnz .loop8_pass2 \n\t" - "EMMS \n\t" // DONE - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "1" (sptr), // esi // input regs - "2" (dp), // edi - "0" (width) // ecx - -#if 0 /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0" // clobber list -#endif - ); - } - } - else if (width) // pass == 4 or 5 - { - // source is 8-byte RRGGBBAA - // dest is 16-byte RRGGBBAA RRGGBBAA - { - int dummy_value_c; // fix 'forbidden register spilled' - int dummy_value_S; - int dummy_value_D; - - __asm__ __volatile__ ( - "subl $8, %%edi \n\t" // start of last block - - ".loop8_pass4: \n\t" - "movq (%%esi), %%mm0 \n\t" // 7 6 5 4 3 2 1 0 - "movq %%mm0, (%%edi) \n\t" - "subl $8, %%esi \n\t" - "movq %%mm0, 8(%%edi) \n\t" - "subl $16, %%edi \n\t" - "decl %%ecx \n\t" - "jnz .loop8_pass4 \n\t" - "EMMS \n\t" // DONE - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "1" (sptr), // esi // input regs - "2" (dp), // edi - "0" (width) // ecx - -#if 0 /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */ - : "%mm0" // clobber list -#endif - ); - } - } - - } /* end of pixel_bytes == 8 */ - - //-------------------------------------------------------------- - else if (pixel_bytes == 6) - { - for (i = width; i; i--) - { - png_byte v[8]; - int j; - png_memcpy(v, sptr, 6); - for (j = 0; j < png_pass_inc[pass]; j++) - { - png_memcpy(dp, v, 6); - dp -= 6; - } - sptr -= 6; - } - } /* end of pixel_bytes == 6 */ - - //-------------------------------------------------------------- - else - { - for (i = width; i; i--) - { - png_byte v[8]; - int j; - png_memcpy(v, sptr, pixel_bytes); - for (j = 0; j < png_pass_inc[pass]; j++) - { - png_memcpy(dp, v, pixel_bytes); - dp -= pixel_bytes; - } - sptr-= pixel_bytes; - } - } - } // end of _mmx_supported ======================================== - - else /* MMX not supported: use modified C code - takes advantage - * of inlining of png_memcpy for a constant */ - /* GRR 19991007: does it? or should pixel_bytes in each - * block be replaced with immediate value (e.g., 1)? */ - /* GRR 19991017: replaced with constants in each case */ -#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ - { - if (pixel_bytes == 1) - { - for (i = width; i; i--) - { - int j; - for (j = 0; j < png_pass_inc[pass]; j++) - { - *dp-- = *sptr; - } - --sptr; - } - } - else if (pixel_bytes == 3) - { - for (i = width; i; i--) - { - png_byte v[8]; - int j; - png_memcpy(v, sptr, 3); - for (j = 0; j < png_pass_inc[pass]; j++) - { - png_memcpy(dp, v, 3); - dp -= 3; - } - sptr -= 3; - } - } - else if (pixel_bytes == 2) - { - for (i = width; i; i--) - { - png_byte v[8]; - int j; - png_memcpy(v, sptr, 2); - for (j = 0; j < png_pass_inc[pass]; j++) - { - png_memcpy(dp, v, 2); - dp -= 2; - } - sptr -= 2; - } - } - else if (pixel_bytes == 4) - { - for (i = width; i; i--) - { - png_byte v[8]; - int j; - png_memcpy(v, sptr, 4); - for (j = 0; j < png_pass_inc[pass]; j++) - { -#ifdef PNG_DEBUG - if (dp < row || dp+3 > row+png_ptr->row_buf_size) - { - printf("dp out of bounds: row=%d, dp=%d, rp=%d\n", - row, dp, row+png_ptr->row_buf_size); - printf("row_buf=%d\n",png_ptr->row_buf_size); - } -#endif - png_memcpy(dp, v, 4); - dp -= 4; - } - sptr -= 4; - } - } - else if (pixel_bytes == 6) - { - for (i = width; i; i--) - { - png_byte v[8]; - int j; - png_memcpy(v, sptr, 6); - for (j = 0; j < png_pass_inc[pass]; j++) - { - png_memcpy(dp, v, 6); - dp -= 6; - } - sptr -= 6; - } - } - else if (pixel_bytes == 8) - { - for (i = width; i; i--) - { - png_byte v[8]; - int j; - png_memcpy(v, sptr, 8); - for (j = 0; j < png_pass_inc[pass]; j++) - { - png_memcpy(dp, v, 8); - dp -= 8; - } - sptr -= 8; - } - } - else /* GRR: should never be reached */ - { - for (i = width; i; i--) - { - png_byte v[8]; - int j; - png_memcpy(v, sptr, pixel_bytes); - for (j = 0; j < png_pass_inc[pass]; j++) - { - png_memcpy(dp, v, pixel_bytes); - dp -= pixel_bytes; - } - sptr -= pixel_bytes; - } - } - - } /* end if (MMX not supported) */ - break; - } - } /* end switch (row_info->pixel_depth) */ - - row_info->width = final_width; - row_info->rowbytes = ((final_width * - (png_uint_32)row_info->pixel_depth + 7) >> 3); - } - -} /* end png_do_read_interlace() */ - -#endif /* PNG_HAVE_ASSEMBLER_READ_INTERLACE */ -#endif /* PNG_READ_INTERLACING_SUPPORTED */ - - - -#if defined(PNG_HAVE_ASSEMBLER_READ_FILTER_ROW) -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) - -// These variables are utilized in the functions below. They are declared -// globally here to ensure alignment on 8-byte boundaries. - -union uAll { - long long use; - double align; -} _LBCarryMask = {0x0101010101010101LL}, - _HBClearMask = {0x7f7f7f7f7f7f7f7fLL}, - _ActiveMask, _ActiveMask2, _ActiveMaskEnd, _ShiftBpp, _ShiftRem; - -#ifdef PNG_THREAD_UNSAFE_OK -//===========================================================================// -// // -// P N G _ R E A D _ F I L T E R _ R O W _ M M X _ A V G // -// // -//===========================================================================// - -// Optimized code for PNG Average filter decoder - -static void /* PRIVATE */ -png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row, - png_bytep prev_row) -{ - int bpp; - int dummy_value_c; // fix 'forbidden register 2 (cx) was spilled' error - int dummy_value_S; - int dummy_value_D; - - bpp = (row_info->pixel_depth + 7) >> 3; // get # bytes per pixel - _FullLength = row_info->rowbytes; // # of bytes to filter - - __asm__ __volatile__ ( - // initialize address pointers and offset -#ifdef __PIC__ - "pushl %%ebx \n\t" // save index to Global Offset Table -#endif -//pre "movl row, %%edi \n\t" // edi: Avg(x) - "xorl %%ebx, %%ebx \n\t" // ebx: x - "movl %%edi, %%edx \n\t" -//pre "movl prev_row, %%esi \n\t" // esi: Prior(x) -//pre "subl bpp, %%edx \n\t" // (bpp is preloaded into ecx) - "subl %%ecx, %%edx \n\t" // edx: Raw(x-bpp) - - "xorl %%eax,%%eax \n\t" - - // Compute the Raw value for the first bpp bytes - // Raw(x) = Avg(x) + (Prior(x)/2) - "avg_rlp: \n\t" - "movb (%%esi,%%ebx,),%%al \n\t" // load al with Prior(x) - "incl %%ebx \n\t" - "shrb %%al \n\t" // divide by 2 - "addb -1(%%edi,%%ebx,),%%al \n\t" // add Avg(x); -1 to offset inc ebx -//pre "cmpl bpp, %%ebx \n\t" // (bpp is preloaded into ecx) - "cmpl %%ecx, %%ebx \n\t" - "movb %%al,-1(%%edi,%%ebx,) \n\t" // write Raw(x); -1 to offset inc ebx - "jb avg_rlp \n\t" // mov does not affect flags - - // get # of bytes to alignment - "movl %%edi, _dif \n\t" // take start of row - "addl %%ebx, _dif \n\t" // add bpp - "addl $0xf, _dif \n\t" // add 7+8 to incr past alignment bdry - "andl $0xfffffff8, _dif \n\t" // mask to alignment boundary - "subl %%edi, _dif \n\t" // subtract from start => value ebx at - "jz avg_go \n\t" // alignment - - // fix alignment - // Compute the Raw value for the bytes up to the alignment boundary - // Raw(x) = Avg(x) + ((Raw(x-bpp) + Prior(x))/2) - "xorl %%ecx, %%ecx \n\t" - - "avg_lp1: \n\t" - "xorl %%eax, %%eax \n\t" - "movb (%%esi,%%ebx,), %%cl \n\t" // load cl with Prior(x) - "movb (%%edx,%%ebx,), %%al \n\t" // load al with Raw(x-bpp) - "addw %%cx, %%ax \n\t" - "incl %%ebx \n\t" - "shrw %%ax \n\t" // divide by 2 - "addb -1(%%edi,%%ebx,), %%al \n\t" // add Avg(x); -1 to offset inc ebx - "cmpl _dif, %%ebx \n\t" // check if at alignment boundary - "movb %%al, -1(%%edi,%%ebx,) \n\t" // write Raw(x); -1 to offset inc ebx - "jb avg_lp1 \n\t" // repeat until at alignment boundary - - "avg_go: \n\t" - "movl _FullLength, %%eax \n\t" - "movl %%eax, %%ecx \n\t" - "subl %%ebx, %%eax \n\t" // subtract alignment fix - "andl $0x00000007, %%eax \n\t" // calc bytes over mult of 8 - "subl %%eax, %%ecx \n\t" // drop over bytes from original length - "movl %%ecx, _MMXLength \n\t" -#ifdef __PIC__ - "popl %%ebx \n\t" // restore index to Global Offset Table -#endif - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "0" (bpp), // ecx // input regs - "1" (prev_row), // esi - "2" (row) // edi - - : "%eax", "%edx" // clobber list -#ifndef __PIC__ - , "%ebx" -#endif - // GRR: INCLUDE "memory" as clobbered? (_dif, _MMXLength) - // (seems to work fine without...) - ); - - // now do the math for the rest of the row - switch (bpp) - { - case 3: - { - _ActiveMask.use = 0x0000000000ffffffLL; - _ShiftBpp.use = 24; // == 3 * 8 - _ShiftRem.use = 40; // == 64 - 24 - - __asm__ __volatile__ ( - // re-init address pointers and offset - "movq _ActiveMask, %%mm7 \n\t" - "movl _dif, %%ecx \n\t" // ecx: x = offset to - "movq _LBCarryMask, %%mm5 \n\t" // alignment boundary -// preload "movl row, %%edi \n\t" // edi: Avg(x) - "movq _HBClearMask, %%mm4 \n\t" -// preload "movl prev_row, %%esi \n\t" // esi: Prior(x) - - // prime the pump: load the first Raw(x-bpp) data set - "movq -8(%%edi,%%ecx,), %%mm2 \n\t" // load previous aligned 8 bytes - // (correct pos. in loop below) - "avg_3lp: \n\t" - "movq (%%edi,%%ecx,), %%mm0 \n\t" // load mm0 with Avg(x) - "movq %%mm5, %%mm3 \n\t" - "psrlq _ShiftRem, %%mm2 \n\t" // correct position Raw(x-bpp) - // data - "movq (%%esi,%%ecx,), %%mm1 \n\t" // load mm1 with Prior(x) - "movq %%mm7, %%mm6 \n\t" - "pand %%mm1, %%mm3 \n\t" // get lsb for each prev_row byte - "psrlq $1, %%mm1 \n\t" // divide prev_row bytes by 2 - "pand %%mm4, %%mm1 \n\t" // clear invalid bit 7 of each - // byte - "paddb %%mm1, %%mm0 \n\t" // add (Prev_row/2) to Avg for - // each byte - // add 1st active group (Raw(x-bpp)/2) to average with LBCarry - "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting - // LBCarrys - "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte - // where both - // lsb's were == 1 (only valid for active group) - "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 - "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each - // byte - "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2) - // for each byte - "pand %%mm6, %%mm2 \n\t" // leave only Active Group 1 - // bytes to add to Avg - "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to - // Avg for each Active - // byte - // add 2nd active group (Raw(x-bpp)/2) to average with _LBCarry - "psllq _ShiftBpp, %%mm6 \n\t" // shift the mm6 mask to cover - // bytes 3-5 - "movq %%mm0, %%mm2 \n\t" // mov updated Raws to mm2 - "psllq _ShiftBpp, %%mm2 \n\t" // shift data to pos. correctly - "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting - // LBCarrys - "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte - // where both - // lsb's were == 1 (only valid for active group) - "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 - "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each - // byte - "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2) - // for each byte - "pand %%mm6, %%mm2 \n\t" // leave only Active Group 2 - // bytes to add to Avg - "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to - // Avg for each Active - // byte - - // add 3rd active group (Raw(x-bpp)/2) to average with _LBCarry - "psllq _ShiftBpp, %%mm6 \n\t" // shift mm6 mask to cover last - // two - // bytes - "movq %%mm0, %%mm2 \n\t" // mov updated Raws to mm2 - "psllq _ShiftBpp, %%mm2 \n\t" // shift data to pos. correctly - // Data only needs to be shifted once here to - // get the correct x-bpp offset. - "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting - // LBCarrys - "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte - // where both - // lsb's were == 1 (only valid for active group) - "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 - "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each - // byte - "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2) - // for each byte - "pand %%mm6, %%mm2 \n\t" // leave only Active Group 2 - // bytes to add to Avg - "addl $8, %%ecx \n\t" - "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to - // Avg for each Active - // byte - // now ready to write back to memory - "movq %%mm0, -8(%%edi,%%ecx,) \n\t" - // move updated Raw(x) to use as Raw(x-bpp) for next loop - "cmpl _MMXLength, %%ecx \n\t" - "movq %%mm0, %%mm2 \n\t" // mov updated Raw(x) to mm2 - "jb avg_3lp \n\t" - - : "=S" (dummy_value_S), // output regs (dummy) - "=D" (dummy_value_D) - - : "0" (prev_row), // esi // input regs - "1" (row) // edi - - : "%ecx" // clobber list -#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */ - , "%mm0", "%mm1", "%mm2", "%mm3" - , "%mm4", "%mm5", "%mm6", "%mm7" -#endif - ); - } - break; // end 3 bpp - - case 6: - case 4: - //case 7: // who wrote this? PNG doesn't support 5 or 7 bytes/pixel - //case 5: // GRR BOGUS - { - _ActiveMask.use = 0xffffffffffffffffLL; // use shift below to clear - // appropriate inactive bytes - _ShiftBpp.use = bpp << 3; - _ShiftRem.use = 64 - _ShiftBpp.use; - - __asm__ __volatile__ ( - "movq _HBClearMask, %%mm4 \n\t" - - // re-init address pointers and offset - "movl _dif, %%ecx \n\t" // ecx: x = offset to - // alignment boundary - - // load _ActiveMask and clear all bytes except for 1st active group - "movq _ActiveMask, %%mm7 \n\t" -// preload "movl row, %%edi \n\t" // edi: Avg(x) - "psrlq _ShiftRem, %%mm7 \n\t" -// preload "movl prev_row, %%esi \n\t" // esi: Prior(x) - "movq %%mm7, %%mm6 \n\t" - "movq _LBCarryMask, %%mm5 \n\t" - "psllq _ShiftBpp, %%mm6 \n\t" // create mask for 2nd active - // group - - // prime the pump: load the first Raw(x-bpp) data set - "movq -8(%%edi,%%ecx,), %%mm2 \n\t" // load previous aligned 8 bytes - // (we correct pos. in loop below) - "avg_4lp: \n\t" - "movq (%%edi,%%ecx,), %%mm0 \n\t" - "psrlq _ShiftRem, %%mm2 \n\t" // shift data to pos. correctly - "movq (%%esi,%%ecx,), %%mm1 \n\t" - // add (Prev_row/2) to average - "movq %%mm5, %%mm3 \n\t" - "pand %%mm1, %%mm3 \n\t" // get lsb for each prev_row byte - "psrlq $1, %%mm1 \n\t" // divide prev_row bytes by 2 - "pand %%mm4, %%mm1 \n\t" // clear invalid bit 7 of each - // byte - "paddb %%mm1, %%mm0 \n\t" // add (Prev_row/2) to Avg for - // each byte - // add 1st active group (Raw(x-bpp)/2) to average with _LBCarry - "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting - // LBCarrys - "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte - // where both - // lsb's were == 1 (only valid for active group) - "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 - "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each - // byte - "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2) - // for each byte - "pand %%mm7, %%mm2 \n\t" // leave only Active Group 1 - // bytes to add to Avg - "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to Avg - // for each Active - // byte - // add 2nd active group (Raw(x-bpp)/2) to average with _LBCarry - "movq %%mm0, %%mm2 \n\t" // mov updated Raws to mm2 - "psllq _ShiftBpp, %%mm2 \n\t" // shift data to pos. correctly - "addl $8, %%ecx \n\t" - "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting - // LBCarrys - "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte - // where both - // lsb's were == 1 (only valid for active group) - "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 - "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each - // byte - "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2) - // for each byte - "pand %%mm6, %%mm2 \n\t" // leave only Active Group 2 - // bytes to add to Avg - "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to - // Avg for each Active - // byte - "cmpl _MMXLength, %%ecx \n\t" - // now ready to write back to memory - "movq %%mm0, -8(%%edi,%%ecx,) \n\t" - // prep Raw(x-bpp) for next loop - "movq %%mm0, %%mm2 \n\t" // mov updated Raws to mm2 - "jb avg_4lp \n\t" - - : "=S" (dummy_value_S), // output regs (dummy) - "=D" (dummy_value_D) - - : "0" (prev_row), // esi // input regs - "1" (row) // edi - - : "%ecx" // clobber list -#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */ - , "%mm0", "%mm1", "%mm2", "%mm3" - , "%mm4", "%mm5", "%mm6", "%mm7" -#endif - ); - } - break; // end 4,6 bpp - - case 2: - { - _ActiveMask.use = 0x000000000000ffffLL; - _ShiftBpp.use = 16; // == 2 * 8 - _ShiftRem.use = 48; // == 64 - 16 - - __asm__ __volatile__ ( - // load _ActiveMask - "movq _ActiveMask, %%mm7 \n\t" - // re-init address pointers and offset - "movl _dif, %%ecx \n\t" // ecx: x = offset to alignment - // boundary - "movq _LBCarryMask, %%mm5 \n\t" -// preload "movl row, %%edi \n\t" // edi: Avg(x) - "movq _HBClearMask, %%mm4 \n\t" -// preload "movl prev_row, %%esi \n\t" // esi: Prior(x) - - // prime the pump: load the first Raw(x-bpp) data set - "movq -8(%%edi,%%ecx,), %%mm2 \n\t" // load previous aligned 8 bytes - // (we correct pos. in loop below) - "avg_2lp: \n\t" - "movq (%%edi,%%ecx,), %%mm0 \n\t" - "psrlq _ShiftRem, %%mm2 \n\t" // shift data to pos. correctly - "movq (%%esi,%%ecx,), %%mm1 \n\t" // (GRR BUGFIX: was psllq) - // add (Prev_row/2) to average - "movq %%mm5, %%mm3 \n\t" - "pand %%mm1, %%mm3 \n\t" // get lsb for each prev_row byte - "psrlq $1, %%mm1 \n\t" // divide prev_row bytes by 2 - "pand %%mm4, %%mm1 \n\t" // clear invalid bit 7 of each - // byte - "movq %%mm7, %%mm6 \n\t" - "paddb %%mm1, %%mm0 \n\t" // add (Prev_row/2) to Avg for - // each byte - - // add 1st active group (Raw(x-bpp)/2) to average with _LBCarry - "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting - // LBCarrys - "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte - // where both - // lsb's were == 1 (only valid - // for active group) - "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 - "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each - // byte - "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2) - // for each byte - "pand %%mm6, %%mm2 \n\t" // leave only Active Group 1 - // bytes to add to Avg - "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to Avg - // for each Active byte - - // add 2nd active group (Raw(x-bpp)/2) to average with _LBCarry - "psllq _ShiftBpp, %%mm6 \n\t" // shift the mm6 mask to cover - // bytes 2 & 3 - "movq %%mm0, %%mm2 \n\t" // mov updated Raws to mm2 - "psllq _ShiftBpp, %%mm2 \n\t" // shift data to pos. correctly - "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting - // LBCarrys - "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte - // where both - // lsb's were == 1 (only valid - // for active group) - "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 - "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each - // byte - "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2) - // for each byte - "pand %%mm6, %%mm2 \n\t" // leave only Active Group 2 - // bytes to add to Avg - "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to - // Avg for each Active byte - - // add 3rd active group (Raw(x-bpp)/2) to average with _LBCarry - "psllq _ShiftBpp, %%mm6 \n\t" // shift the mm6 mask to cover - // bytes 4 & 5 - "movq %%mm0, %%mm2 \n\t" // mov updated Raws to mm2 - "psllq _ShiftBpp, %%mm2 \n\t" // shift data to pos. correctly - "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting - // LBCarrys - "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte - // where both lsb's were == 1 - // (only valid for active group) - "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 - "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each - // byte - "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2) - // for each byte - "pand %%mm6, %%mm2 \n\t" // leave only Active Group 2 - // bytes to add to Avg - "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to - // Avg for each Active byte - - // add 4th active group (Raw(x-bpp)/2) to average with _LBCarry - "psllq _ShiftBpp, %%mm6 \n\t" // shift the mm6 mask to cover - // bytes 6 & 7 - "movq %%mm0, %%mm2 \n\t" // mov updated Raws to mm2 - "psllq _ShiftBpp, %%mm2 \n\t" // shift data to pos. correctly - "addl $8, %%ecx \n\t" - "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting - // LBCarrys - "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte - // where both - // lsb's were == 1 (only valid - // for active group) - "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 - "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each - // byte - "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2) - // for each byte - "pand %%mm6, %%mm2 \n\t" // leave only Active Group 2 - // bytes to add to Avg - "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to - // Avg for each Active byte - - "cmpl _MMXLength, %%ecx \n\t" - // now ready to write back to memory - "movq %%mm0, -8(%%edi,%%ecx,) \n\t" - // prep Raw(x-bpp) for next loop - "movq %%mm0, %%mm2 \n\t" // mov updated Raws to mm2 - "jb avg_2lp \n\t" - - : "=S" (dummy_value_S), // output regs (dummy) - "=D" (dummy_value_D) - - : "0" (prev_row), // esi // input regs - "1" (row) // edi - - : "%ecx" // clobber list -#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */ - , "%mm0", "%mm1", "%mm2", "%mm3" - , "%mm4", "%mm5", "%mm6", "%mm7" -#endif - ); - } - break; // end 2 bpp - - case 1: - { - __asm__ __volatile__ ( - // re-init address pointers and offset -#ifdef __PIC__ - "pushl %%ebx \n\t" // save Global Offset Table index -#endif - "movl _dif, %%ebx \n\t" // ebx: x = offset to alignment - // boundary -// preload "movl row, %%edi \n\t" // edi: Avg(x) - "cmpl _FullLength, %%ebx \n\t" // test if offset at end of array - "jnb avg_1end \n\t" - // do Paeth decode for remaining bytes -// preload "movl prev_row, %%esi \n\t" // esi: Prior(x) - "movl %%edi, %%edx \n\t" -// preload "subl bpp, %%edx \n\t" // (bpp is preloaded into ecx) - "subl %%ecx, %%edx \n\t" // edx: Raw(x-bpp) - "xorl %%ecx, %%ecx \n\t" // zero ecx before using cl & cx - // in loop below - "avg_1lp: \n\t" - // Raw(x) = Avg(x) + ((Raw(x-bpp) + Prior(x))/2) - "xorl %%eax, %%eax \n\t" - "movb (%%esi,%%ebx,), %%cl \n\t" // load cl with Prior(x) - "movb (%%edx,%%ebx,), %%al \n\t" // load al with Raw(x-bpp) - "addw %%cx, %%ax \n\t" - "incl %%ebx \n\t" - "shrw %%ax \n\t" // divide by 2 - "addb -1(%%edi,%%ebx,), %%al \n\t" // add Avg(x); -1 to offset - // inc ebx - "cmpl _FullLength, %%ebx \n\t" // check if at end of array - "movb %%al, -1(%%edi,%%ebx,) \n\t" // write back Raw(x); - // mov does not affect flags; -1 to offset inc ebx - "jb avg_1lp \n\t" - - "avg_1end: \n\t" -#ifdef __PIC__ - "popl %%ebx \n\t" // Global Offset Table index -#endif - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "0" (bpp), // ecx // input regs - "1" (prev_row), // esi - "2" (row) // edi - - : "%eax", "%edx" // clobber list -#ifndef __PIC__ - , "%ebx" -#endif - ); - } - return; // end 1 bpp - - case 8: - { - __asm__ __volatile__ ( - // re-init address pointers and offset - "movl _dif, %%ecx \n\t" // ecx: x == offset to alignment - "movq _LBCarryMask, %%mm5 \n\t" // boundary -// preload "movl row, %%edi \n\t" // edi: Avg(x) - "movq _HBClearMask, %%mm4 \n\t" -// preload "movl prev_row, %%esi \n\t" // esi: Prior(x) - - // prime the pump: load the first Raw(x-bpp) data set - "movq -8(%%edi,%%ecx,), %%mm2 \n\t" // load previous aligned 8 bytes - // (NO NEED to correct pos. in loop below) - - "avg_8lp: \n\t" - "movq (%%edi,%%ecx,), %%mm0 \n\t" - "movq %%mm5, %%mm3 \n\t" - "movq (%%esi,%%ecx,), %%mm1 \n\t" - "addl $8, %%ecx \n\t" - "pand %%mm1, %%mm3 \n\t" // get lsb for each prev_row byte - "psrlq $1, %%mm1 \n\t" // divide prev_row bytes by 2 - "pand %%mm2, %%mm3 \n\t" // get LBCarrys for each byte - // where both lsb's were == 1 - "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 - "pand %%mm4, %%mm1 \n\t" // clear invalid bit 7, each byte - "paddb %%mm3, %%mm0 \n\t" // add LBCarrys to Avg, each byte - "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7, each byte - "paddb %%mm1, %%mm0 \n\t" // add (Prev_row/2) to Avg, each - "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) to Avg for each - "cmpl _MMXLength, %%ecx \n\t" - "movq %%mm0, -8(%%edi,%%ecx,) \n\t" - "movq %%mm0, %%mm2 \n\t" // reuse as Raw(x-bpp) - "jb avg_8lp \n\t" - - : "=S" (dummy_value_S), // output regs (dummy) - "=D" (dummy_value_D) - - : "0" (prev_row), // esi // input regs - "1" (row) // edi - - : "%ecx" // clobber list -#if 0 /* %mm0, ..., %mm5 not supported by gcc 2.7.2.3 or egcs 1.1 */ - , "%mm0", "%mm1", "%mm2" - , "%mm3", "%mm4", "%mm5" -#endif - ); - } - break; // end 8 bpp - - default: // bpp greater than 8 (!= 1,2,3,4,[5],6,[7],8) - { - -#ifdef PNG_DEBUG - // GRR: PRINT ERROR HERE: SHOULD NEVER BE REACHED - png_debug(1, - "Internal logic error in pnggccrd (png_read_filter_row_mmx_avg())\n"); -#endif - -#if 0 - __asm__ __volatile__ ( - "movq _LBCarryMask, %%mm5 \n\t" - // re-init address pointers and offset - "movl _dif, %%ebx \n\t" // ebx: x = offset to - // alignment boundary - "movl row, %%edi \n\t" // edi: Avg(x) - "movq _HBClearMask, %%mm4 \n\t" - "movl %%edi, %%edx \n\t" - "movl prev_row, %%esi \n\t" // esi: Prior(x) - "subl bpp, %%edx \n\t" // edx: Raw(x-bpp) - "avg_Alp: \n\t" - "movq (%%edi,%%ebx,), %%mm0 \n\t" - "movq %%mm5, %%mm3 \n\t" - "movq (%%esi,%%ebx,), %%mm1 \n\t" - "pand %%mm1, %%mm3 \n\t" // get lsb for each prev_row byte - "movq (%%edx,%%ebx,), %%mm2 \n\t" - "psrlq $1, %%mm1 \n\t" // divide prev_row bytes by 2 - "pand %%mm2, %%mm3 \n\t" // get LBCarrys for each byte - // where both lsb's were == 1 - "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2 - "pand %%mm4, %%mm1 \n\t" // clear invalid bit 7 of each - // byte - "paddb %%mm3, %%mm0 \n\t" // add LBCarrys to Avg for each - // byte - "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each - // byte - "paddb %%mm1, %%mm0 \n\t" // add (Prev_row/2) to Avg for - // each byte - "addl $8, %%ebx \n\t" - "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) to Avg for each - // byte - "cmpl _MMXLength, %%ebx \n\t" - "movq %%mm0, -8(%%edi,%%ebx,) \n\t" - "jb avg_Alp \n\t" - - : // FIXASM: output regs/vars go here, e.g.: "=m" (memory_var) - - : // FIXASM: input regs, e.g.: "c" (count), "S" (src), "D" (dest) - - : "%ebx", "%edx", "%edi", "%esi" // CHECKASM: clobber list - ); -#endif /* 0 - NEVER REACHED */ - } - break; - - } // end switch (bpp) - - __asm__ __volatile__ ( - // MMX acceleration complete; now do clean-up - // check if any remaining bytes left to decode -#ifdef __PIC__ - "pushl %%ebx \n\t" // save index to Global Offset Table -#endif - "movl _MMXLength, %%ebx \n\t" // ebx: x == offset bytes after MMX -//pre "movl row, %%edi \n\t" // edi: Avg(x) - "cmpl _FullLength, %%ebx \n\t" // test if offset at end of array - "jnb avg_end \n\t" - - // do Avg decode for remaining bytes -//pre "movl prev_row, %%esi \n\t" // esi: Prior(x) - "movl %%edi, %%edx \n\t" -//pre "subl bpp, %%edx \n\t" // (bpp is preloaded into ecx) - "subl %%ecx, %%edx \n\t" // edx: Raw(x-bpp) - "xorl %%ecx, %%ecx \n\t" // zero ecx before using cl & cx below - - "avg_lp2: \n\t" - // Raw(x) = Avg(x) + ((Raw(x-bpp) + Prior(x))/2) - "xorl %%eax, %%eax \n\t" - "movb (%%esi,%%ebx,), %%cl \n\t" // load cl with Prior(x) - "movb (%%edx,%%ebx,), %%al \n\t" // load al with Raw(x-bpp) - "addw %%cx, %%ax \n\t" - "incl %%ebx \n\t" - "shrw %%ax \n\t" // divide by 2 - "addb -1(%%edi,%%ebx,), %%al \n\t" // add Avg(x); -1 to offset inc ebx - "cmpl _FullLength, %%ebx \n\t" // check if at end of array - "movb %%al, -1(%%edi,%%ebx,) \n\t" // write back Raw(x) [mov does not - "jb avg_lp2 \n\t" // affect flags; -1 to offset inc ebx] - - "avg_end: \n\t" - "EMMS \n\t" // end MMX; prep for poss. FP instrs. -#ifdef __PIC__ - "popl %%ebx \n\t" // restore index to Global Offset Table -#endif - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "0" (bpp), // ecx // input regs - "1" (prev_row), // esi - "2" (row) // edi - - : "%eax", "%edx" // clobber list -#ifndef __PIC__ - , "%ebx" -#endif - ); - -} /* end png_read_filter_row_mmx_avg() */ -#endif - - - -#ifdef PNG_THREAD_UNSAFE_OK -//===========================================================================// -// // -// P N G _ R E A D _ F I L T E R _ R O W _ M M X _ P A E T H // -// // -//===========================================================================// - -// Optimized code for PNG Paeth filter decoder - -static void /* PRIVATE */ -png_read_filter_row_mmx_paeth(png_row_infop row_info, png_bytep row, - png_bytep prev_row) -{ - int bpp; - int dummy_value_c; // fix 'forbidden register 2 (cx) was spilled' error - int dummy_value_S; - int dummy_value_D; - - bpp = (row_info->pixel_depth + 7) >> 3; // Get # bytes per pixel - _FullLength = row_info->rowbytes; // # of bytes to filter - - __asm__ __volatile__ ( -#ifdef __PIC__ - "pushl %%ebx \n\t" // save index to Global Offset Table -#endif - "xorl %%ebx, %%ebx \n\t" // ebx: x offset -//pre "movl row, %%edi \n\t" - "xorl %%edx, %%edx \n\t" // edx: x-bpp offset -//pre "movl prev_row, %%esi \n\t" - "xorl %%eax, %%eax \n\t" - - // Compute the Raw value for the first bpp bytes - // Note: the formula works out to be always - // Paeth(x) = Raw(x) + Prior(x) where x < bpp - "paeth_rlp: \n\t" - "movb (%%edi,%%ebx,), %%al \n\t" - "addb (%%esi,%%ebx,), %%al \n\t" - "incl %%ebx \n\t" -//pre "cmpl bpp, %%ebx \n\t" (bpp is preloaded into ecx) - "cmpl %%ecx, %%ebx \n\t" - "movb %%al, -1(%%edi,%%ebx,) \n\t" - "jb paeth_rlp \n\t" - // get # of bytes to alignment - "movl %%edi, _dif \n\t" // take start of row - "addl %%ebx, _dif \n\t" // add bpp - "xorl %%ecx, %%ecx \n\t" - "addl $0xf, _dif \n\t" // add 7 + 8 to incr past alignment - // boundary - "andl $0xfffffff8, _dif \n\t" // mask to alignment boundary - "subl %%edi, _dif \n\t" // subtract from start ==> value ebx - // at alignment - "jz paeth_go \n\t" - // fix alignment - - "paeth_lp1: \n\t" - "xorl %%eax, %%eax \n\t" - // pav = p - a = (a + b - c) - a = b - c - "movb (%%esi,%%ebx,), %%al \n\t" // load Prior(x) into al - "movb (%%esi,%%edx,), %%cl \n\t" // load Prior(x-bpp) into cl - "subl %%ecx, %%eax \n\t" // subtract Prior(x-bpp) - "movl %%eax, _patemp \n\t" // Save pav for later use - "xorl %%eax, %%eax \n\t" - // pbv = p - b = (a + b - c) - b = a - c - "movb (%%edi,%%edx,), %%al \n\t" // load Raw(x-bpp) into al - "subl %%ecx, %%eax \n\t" // subtract Prior(x-bpp) - "movl %%eax, %%ecx \n\t" - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - "addl _patemp, %%eax \n\t" // pcv = pav + pbv - // pc = abs(pcv) - "testl $0x80000000, %%eax \n\t" - "jz paeth_pca \n\t" - "negl %%eax \n\t" // reverse sign of neg values - - "paeth_pca: \n\t" - "movl %%eax, _pctemp \n\t" // save pc for later use - // pb = abs(pbv) - "testl $0x80000000, %%ecx \n\t" - "jz paeth_pba \n\t" - "negl %%ecx \n\t" // reverse sign of neg values - - "paeth_pba: \n\t" - "movl %%ecx, _pbtemp \n\t" // save pb for later use - // pa = abs(pav) - "movl _patemp, %%eax \n\t" - "testl $0x80000000, %%eax \n\t" - "jz paeth_paa \n\t" - "negl %%eax \n\t" // reverse sign of neg values - - "paeth_paa: \n\t" - "movl %%eax, _patemp \n\t" // save pa for later use - // test if pa <= pb - "cmpl %%ecx, %%eax \n\t" - "jna paeth_abb \n\t" - // pa > pb; now test if pb <= pc - "cmpl _pctemp, %%ecx \n\t" - "jna paeth_bbc \n\t" - // pb > pc; Raw(x) = Paeth(x) + Prior(x-bpp) - "movb (%%esi,%%edx,), %%cl \n\t" // load Prior(x-bpp) into cl - "jmp paeth_paeth \n\t" - - "paeth_bbc: \n\t" - // pb <= pc; Raw(x) = Paeth(x) + Prior(x) - "movb (%%esi,%%ebx,), %%cl \n\t" // load Prior(x) into cl - "jmp paeth_paeth \n\t" - - "paeth_abb: \n\t" - // pa <= pb; now test if pa <= pc - "cmpl _pctemp, %%eax \n\t" - "jna paeth_abc \n\t" - // pa > pc; Raw(x) = Paeth(x) + Prior(x-bpp) - "movb (%%esi,%%edx,), %%cl \n\t" // load Prior(x-bpp) into cl - "jmp paeth_paeth \n\t" - - "paeth_abc: \n\t" - // pa <= pc; Raw(x) = Paeth(x) + Raw(x-bpp) - "movb (%%edi,%%edx,), %%cl \n\t" // load Raw(x-bpp) into cl - - "paeth_paeth: \n\t" - "incl %%ebx \n\t" - "incl %%edx \n\t" - // Raw(x) = (Paeth(x) + Paeth_Predictor( a, b, c )) mod 256 - "addb %%cl, -1(%%edi,%%ebx,) \n\t" - "cmpl _dif, %%ebx \n\t" - "jb paeth_lp1 \n\t" - - "paeth_go: \n\t" - "movl _FullLength, %%ecx \n\t" - "movl %%ecx, %%eax \n\t" - "subl %%ebx, %%eax \n\t" // subtract alignment fix - "andl $0x00000007, %%eax \n\t" // calc bytes over mult of 8 - "subl %%eax, %%ecx \n\t" // drop over bytes from original length - "movl %%ecx, _MMXLength \n\t" -#ifdef __PIC__ - "popl %%ebx \n\t" // restore index to Global Offset Table -#endif - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "0" (bpp), // ecx // input regs - "1" (prev_row), // esi - "2" (row) // edi - - : "%eax", "%edx" // clobber list -#ifndef __PIC__ - , "%ebx" -#endif - ); - - // now do the math for the rest of the row - switch (bpp) - { - case 3: - { - _ActiveMask.use = 0x0000000000ffffffLL; - _ActiveMaskEnd.use = 0xffff000000000000LL; - _ShiftBpp.use = 24; // == bpp(3) * 8 - _ShiftRem.use = 40; // == 64 - 24 - - __asm__ __volatile__ ( - "movl _dif, %%ecx \n\t" -// preload "movl row, %%edi \n\t" -// preload "movl prev_row, %%esi \n\t" - "pxor %%mm0, %%mm0 \n\t" - // prime the pump: load the first Raw(x-bpp) data set - "movq -8(%%edi,%%ecx,), %%mm1 \n\t" - "paeth_3lp: \n\t" - "psrlq _ShiftRem, %%mm1 \n\t" // shift last 3 bytes to 1st - // 3 bytes - "movq (%%esi,%%ecx,), %%mm2 \n\t" // load b=Prior(x) - "punpcklbw %%mm0, %%mm1 \n\t" // unpack High bytes of a - "movq -8(%%esi,%%ecx,), %%mm3 \n\t" // prep c=Prior(x-bpp) bytes - "punpcklbw %%mm0, %%mm2 \n\t" // unpack High bytes of b - "psrlq _ShiftRem, %%mm3 \n\t" // shift last 3 bytes to 1st - // 3 bytes - // pav = p - a = (a + b - c) - a = b - c - "movq %%mm2, %%mm4 \n\t" - "punpcklbw %%mm0, %%mm3 \n\t" // unpack High bytes of c - // pbv = p - b = (a + b - c) - b = a - c - "movq %%mm1, %%mm5 \n\t" - "psubw %%mm3, %%mm4 \n\t" - "pxor %%mm7, %%mm7 \n\t" - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - "movq %%mm4, %%mm6 \n\t" - "psubw %%mm3, %%mm5 \n\t" - - // pa = abs(p-a) = abs(pav) - // pb = abs(p-b) = abs(pbv) - // pc = abs(p-c) = abs(pcv) - "pcmpgtw %%mm4, %%mm0 \n\t" // create mask pav bytes < 0 - "paddw %%mm5, %%mm6 \n\t" - "pand %%mm4, %%mm0 \n\t" // only pav bytes < 0 in mm7 - "pcmpgtw %%mm5, %%mm7 \n\t" // create mask pbv bytes < 0 - "psubw %%mm0, %%mm4 \n\t" - "pand %%mm5, %%mm7 \n\t" // only pbv bytes < 0 in mm0 - "psubw %%mm0, %%mm4 \n\t" - "psubw %%mm7, %%mm5 \n\t" - "pxor %%mm0, %%mm0 \n\t" - "pcmpgtw %%mm6, %%mm0 \n\t" // create mask pcv bytes < 0 - "pand %%mm6, %%mm0 \n\t" // only pav bytes < 0 in mm7 - "psubw %%mm7, %%mm5 \n\t" - "psubw %%mm0, %%mm6 \n\t" - // test pa <= pb - "movq %%mm4, %%mm7 \n\t" - "psubw %%mm0, %%mm6 \n\t" - "pcmpgtw %%mm5, %%mm7 \n\t" // pa > pb? - "movq %%mm7, %%mm0 \n\t" - // use mm7 mask to merge pa & pb - "pand %%mm7, %%mm5 \n\t" - // use mm0 mask copy to merge a & b - "pand %%mm0, %%mm2 \n\t" - "pandn %%mm4, %%mm7 \n\t" - "pandn %%mm1, %%mm0 \n\t" - "paddw %%mm5, %%mm7 \n\t" - "paddw %%mm2, %%mm0 \n\t" - // test ((pa <= pb)? pa:pb) <= pc - "pcmpgtw %%mm6, %%mm7 \n\t" // pab > pc? - "pxor %%mm1, %%mm1 \n\t" - "pand %%mm7, %%mm3 \n\t" - "pandn %%mm0, %%mm7 \n\t" - "paddw %%mm3, %%mm7 \n\t" - "pxor %%mm0, %%mm0 \n\t" - "packuswb %%mm1, %%mm7 \n\t" - "movq (%%esi,%%ecx,), %%mm3 \n\t" // load c=Prior(x-bpp) - "pand _ActiveMask, %%mm7 \n\t" - "movq %%mm3, %%mm2 \n\t" // load b=Prior(x) step 1 - "paddb (%%edi,%%ecx,), %%mm7 \n\t" // add Paeth predictor with Raw(x) - "punpcklbw %%mm0, %%mm3 \n\t" // unpack High bytes of c - "movq %%mm7, (%%edi,%%ecx,) \n\t" // write back updated value - "movq %%mm7, %%mm1 \n\t" // now mm1 will be used as - // Raw(x-bpp) - // now do Paeth for 2nd set of bytes (3-5) - "psrlq _ShiftBpp, %%mm2 \n\t" // load b=Prior(x) step 2 - "punpcklbw %%mm0, %%mm1 \n\t" // unpack High bytes of a - "pxor %%mm7, %%mm7 \n\t" - "punpcklbw %%mm0, %%mm2 \n\t" // unpack High bytes of b - // pbv = p - b = (a + b - c) - b = a - c - "movq %%mm1, %%mm5 \n\t" - // pav = p - a = (a + b - c) - a = b - c - "movq %%mm2, %%mm4 \n\t" - "psubw %%mm3, %%mm5 \n\t" - "psubw %%mm3, %%mm4 \n\t" - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = - // pav + pbv = pbv + pav - "movq %%mm5, %%mm6 \n\t" - "paddw %%mm4, %%mm6 \n\t" - - // pa = abs(p-a) = abs(pav) - // pb = abs(p-b) = abs(pbv) - // pc = abs(p-c) = abs(pcv) - "pcmpgtw %%mm5, %%mm0 \n\t" // create mask pbv bytes < 0 - "pcmpgtw %%mm4, %%mm7 \n\t" // create mask pav bytes < 0 - "pand %%mm5, %%mm0 \n\t" // only pbv bytes < 0 in mm0 - "pand %%mm4, %%mm7 \n\t" // only pav bytes < 0 in mm7 - "psubw %%mm0, %%mm5 \n\t" - "psubw %%mm7, %%mm4 \n\t" - "psubw %%mm0, %%mm5 \n\t" - "psubw %%mm7, %%mm4 \n\t" - "pxor %%mm0, %%mm0 \n\t" - "pcmpgtw %%mm6, %%mm0 \n\t" // create mask pcv bytes < 0 - "pand %%mm6, %%mm0 \n\t" // only pav bytes < 0 in mm7 - "psubw %%mm0, %%mm6 \n\t" - // test pa <= pb - "movq %%mm4, %%mm7 \n\t" - "psubw %%mm0, %%mm6 \n\t" - "pcmpgtw %%mm5, %%mm7 \n\t" // pa > pb? - "movq %%mm7, %%mm0 \n\t" - // use mm7 mask to merge pa & pb - "pand %%mm7, %%mm5 \n\t" - // use mm0 mask copy to merge a & b - "pand %%mm0, %%mm2 \n\t" - "pandn %%mm4, %%mm7 \n\t" - "pandn %%mm1, %%mm0 \n\t" - "paddw %%mm5, %%mm7 \n\t" - "paddw %%mm2, %%mm0 \n\t" - // test ((pa <= pb)? pa:pb) <= pc - "pcmpgtw %%mm6, %%mm7 \n\t" // pab > pc? - "movq (%%esi,%%ecx,), %%mm2 \n\t" // load b=Prior(x) - "pand %%mm7, %%mm3 \n\t" - "pandn %%mm0, %%mm7 \n\t" - "pxor %%mm1, %%mm1 \n\t" - "paddw %%mm3, %%mm7 \n\t" - "pxor %%mm0, %%mm0 \n\t" - "packuswb %%mm1, %%mm7 \n\t" - "movq %%mm2, %%mm3 \n\t" // load c=Prior(x-bpp) step 1 - "pand _ActiveMask, %%mm7 \n\t" - "punpckhbw %%mm0, %%mm2 \n\t" // unpack High bytes of b - "psllq _ShiftBpp, %%mm7 \n\t" // shift bytes to 2nd group of - // 3 bytes - // pav = p - a = (a + b - c) - a = b - c - "movq %%mm2, %%mm4 \n\t" - "paddb (%%edi,%%ecx,), %%mm7 \n\t" // add Paeth predictor with Raw(x) - "psllq _ShiftBpp, %%mm3 \n\t" // load c=Prior(x-bpp) step 2 - "movq %%mm7, (%%edi,%%ecx,) \n\t" // write back updated value - "movq %%mm7, %%mm1 \n\t" - "punpckhbw %%mm0, %%mm3 \n\t" // unpack High bytes of c - "psllq _ShiftBpp, %%mm1 \n\t" // shift bytes - // now mm1 will be used as Raw(x-bpp) - // now do Paeth for 3rd, and final, set of bytes (6-7) - "pxor %%mm7, %%mm7 \n\t" - "punpckhbw %%mm0, %%mm1 \n\t" // unpack High bytes of a - "psubw %%mm3, %%mm4 \n\t" - // pbv = p - b = (a + b - c) - b = a - c - "movq %%mm1, %%mm5 \n\t" - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - "movq %%mm4, %%mm6 \n\t" - "psubw %%mm3, %%mm5 \n\t" - "pxor %%mm0, %%mm0 \n\t" - "paddw %%mm5, %%mm6 \n\t" - - // pa = abs(p-a) = abs(pav) - // pb = abs(p-b) = abs(pbv) - // pc = abs(p-c) = abs(pcv) - "pcmpgtw %%mm4, %%mm0 \n\t" // create mask pav bytes < 0 - "pcmpgtw %%mm5, %%mm7 \n\t" // create mask pbv bytes < 0 - "pand %%mm4, %%mm0 \n\t" // only pav bytes < 0 in mm7 - "pand %%mm5, %%mm7 \n\t" // only pbv bytes < 0 in mm0 - "psubw %%mm0, %%mm4 \n\t" - "psubw %%mm7, %%mm5 \n\t" - "psubw %%mm0, %%mm4 \n\t" - "psubw %%mm7, %%mm5 \n\t" - "pxor %%mm0, %%mm0 \n\t" - "pcmpgtw %%mm6, %%mm0 \n\t" // create mask pcv bytes < 0 - "pand %%mm6, %%mm0 \n\t" // only pav bytes < 0 in mm7 - "psubw %%mm0, %%mm6 \n\t" - // test pa <= pb - "movq %%mm4, %%mm7 \n\t" - "psubw %%mm0, %%mm6 \n\t" - "pcmpgtw %%mm5, %%mm7 \n\t" // pa > pb? - "movq %%mm7, %%mm0 \n\t" - // use mm0 mask copy to merge a & b - "pand %%mm0, %%mm2 \n\t" - // use mm7 mask to merge pa & pb - "pand %%mm7, %%mm5 \n\t" - "pandn %%mm1, %%mm0 \n\t" - "pandn %%mm4, %%mm7 \n\t" - "paddw %%mm2, %%mm0 \n\t" - "paddw %%mm5, %%mm7 \n\t" - // test ((pa <= pb)? pa:pb) <= pc - "pcmpgtw %%mm6, %%mm7 \n\t" // pab > pc? - "pand %%mm7, %%mm3 \n\t" - "pandn %%mm0, %%mm7 \n\t" - "paddw %%mm3, %%mm7 \n\t" - "pxor %%mm1, %%mm1 \n\t" - "packuswb %%mm7, %%mm1 \n\t" - // step ecx to next set of 8 bytes and repeat loop til done - "addl $8, %%ecx \n\t" - "pand _ActiveMaskEnd, %%mm1 \n\t" - "paddb -8(%%edi,%%ecx,), %%mm1 \n\t" // add Paeth predictor with - // Raw(x) - - "cmpl _MMXLength, %%ecx \n\t" - "pxor %%mm0, %%mm0 \n\t" // pxor does not affect flags - "movq %%mm1, -8(%%edi,%%ecx,) \n\t" // write back updated value - // mm1 will be used as Raw(x-bpp) next loop - // mm3 ready to be used as Prior(x-bpp) next loop - "jb paeth_3lp \n\t" - - : "=S" (dummy_value_S), // output regs (dummy) - "=D" (dummy_value_D) - - : "0" (prev_row), // esi // input regs - "1" (row) // edi - - : "%ecx" // clobber list -#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */ - , "%mm0", "%mm1", "%mm2", "%mm3" - , "%mm4", "%mm5", "%mm6", "%mm7" -#endif - ); - } - break; // end 3 bpp - - case 6: - //case 7: // GRR BOGUS - //case 5: // GRR BOGUS - { - _ActiveMask.use = 0x00000000ffffffffLL; - _ActiveMask2.use = 0xffffffff00000000LL; - _ShiftBpp.use = bpp << 3; // == bpp * 8 - _ShiftRem.use = 64 - _ShiftBpp.use; - - __asm__ __volatile__ ( - "movl _dif, %%ecx \n\t" -// preload "movl row, %%edi \n\t" -// preload "movl prev_row, %%esi \n\t" - // prime the pump: load the first Raw(x-bpp) data set - "movq -8(%%edi,%%ecx,), %%mm1 \n\t" - "pxor %%mm0, %%mm0 \n\t" - - "paeth_6lp: \n\t" - // must shift to position Raw(x-bpp) data - "psrlq _ShiftRem, %%mm1 \n\t" - // do first set of 4 bytes - "movq -8(%%esi,%%ecx,), %%mm3 \n\t" // read c=Prior(x-bpp) bytes - "punpcklbw %%mm0, %%mm1 \n\t" // unpack Low bytes of a - "movq (%%esi,%%ecx,), %%mm2 \n\t" // load b=Prior(x) - "punpcklbw %%mm0, %%mm2 \n\t" // unpack Low bytes of b - // must shift to position Prior(x-bpp) data - "psrlq _ShiftRem, %%mm3 \n\t" - // pav = p - a = (a + b - c) - a = b - c - "movq %%mm2, %%mm4 \n\t" - "punpcklbw %%mm0, %%mm3 \n\t" // unpack Low bytes of c - // pbv = p - b = (a + b - c) - b = a - c - "movq %%mm1, %%mm5 \n\t" - "psubw %%mm3, %%mm4 \n\t" - "pxor %%mm7, %%mm7 \n\t" - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - "movq %%mm4, %%mm6 \n\t" - "psubw %%mm3, %%mm5 \n\t" - // pa = abs(p-a) = abs(pav) - // pb = abs(p-b) = abs(pbv) - // pc = abs(p-c) = abs(pcv) - "pcmpgtw %%mm4, %%mm0 \n\t" // create mask pav bytes < 0 - "paddw %%mm5, %%mm6 \n\t" - "pand %%mm4, %%mm0 \n\t" // only pav bytes < 0 in mm7 - "pcmpgtw %%mm5, %%mm7 \n\t" // create mask pbv bytes < 0 - "psubw %%mm0, %%mm4 \n\t" - "pand %%mm5, %%mm7 \n\t" // only pbv bytes < 0 in mm0 - "psubw %%mm0, %%mm4 \n\t" - "psubw %%mm7, %%mm5 \n\t" - "pxor %%mm0, %%mm0 \n\t" - "pcmpgtw %%mm6, %%mm0 \n\t" // create mask pcv bytes < 0 - "pand %%mm6, %%mm0 \n\t" // only pav bytes < 0 in mm7 - "psubw %%mm7, %%mm5 \n\t" - "psubw %%mm0, %%mm6 \n\t" - // test pa <= pb - "movq %%mm4, %%mm7 \n\t" - "psubw %%mm0, %%mm6 \n\t" - "pcmpgtw %%mm5, %%mm7 \n\t" // pa > pb? - "movq %%mm7, %%mm0 \n\t" - // use mm7 mask to merge pa & pb - "pand %%mm7, %%mm5 \n\t" - // use mm0 mask copy to merge a & b - "pand %%mm0, %%mm2 \n\t" - "pandn %%mm4, %%mm7 \n\t" - "pandn %%mm1, %%mm0 \n\t" - "paddw %%mm5, %%mm7 \n\t" - "paddw %%mm2, %%mm0 \n\t" - // test ((pa <= pb)? pa:pb) <= pc - "pcmpgtw %%mm6, %%mm7 \n\t" // pab > pc? - "pxor %%mm1, %%mm1 \n\t" - "pand %%mm7, %%mm3 \n\t" - "pandn %%mm0, %%mm7 \n\t" - "paddw %%mm3, %%mm7 \n\t" - "pxor %%mm0, %%mm0 \n\t" - "packuswb %%mm1, %%mm7 \n\t" - "movq -8(%%esi,%%ecx,), %%mm3 \n\t" // load c=Prior(x-bpp) - "pand _ActiveMask, %%mm7 \n\t" - "psrlq _ShiftRem, %%mm3 \n\t" - "movq (%%esi,%%ecx,), %%mm2 \n\t" // load b=Prior(x) step 1 - "paddb (%%edi,%%ecx,), %%mm7 \n\t" // add Paeth predictor and Raw(x) - "movq %%mm2, %%mm6 \n\t" - "movq %%mm7, (%%edi,%%ecx,) \n\t" // write back updated value - "movq -8(%%edi,%%ecx,), %%mm1 \n\t" - "psllq _ShiftBpp, %%mm6 \n\t" - "movq %%mm7, %%mm5 \n\t" - "psrlq _ShiftRem, %%mm1 \n\t" - "por %%mm6, %%mm3 \n\t" - "psllq _ShiftBpp, %%mm5 \n\t" - "punpckhbw %%mm0, %%mm3 \n\t" // unpack High bytes of c - "por %%mm5, %%mm1 \n\t" - // do second set of 4 bytes - "punpckhbw %%mm0, %%mm2 \n\t" // unpack High bytes of b - "punpckhbw %%mm0, %%mm1 \n\t" // unpack High bytes of a - // pav = p - a = (a + b - c) - a = b - c - "movq %%mm2, %%mm4 \n\t" - // pbv = p - b = (a + b - c) - b = a - c - "movq %%mm1, %%mm5 \n\t" - "psubw %%mm3, %%mm4 \n\t" - "pxor %%mm7, %%mm7 \n\t" - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - "movq %%mm4, %%mm6 \n\t" - "psubw %%mm3, %%mm5 \n\t" - // pa = abs(p-a) = abs(pav) - // pb = abs(p-b) = abs(pbv) - // pc = abs(p-c) = abs(pcv) - "pcmpgtw %%mm4, %%mm0 \n\t" // create mask pav bytes < 0 - "paddw %%mm5, %%mm6 \n\t" - "pand %%mm4, %%mm0 \n\t" // only pav bytes < 0 in mm7 - "pcmpgtw %%mm5, %%mm7 \n\t" // create mask pbv bytes < 0 - "psubw %%mm0, %%mm4 \n\t" - "pand %%mm5, %%mm7 \n\t" // only pbv bytes < 0 in mm0 - "psubw %%mm0, %%mm4 \n\t" - "psubw %%mm7, %%mm5 \n\t" - "pxor %%mm0, %%mm0 \n\t" - "pcmpgtw %%mm6, %%mm0 \n\t" // create mask pcv bytes < 0 - "pand %%mm6, %%mm0 \n\t" // only pav bytes < 0 in mm7 - "psubw %%mm7, %%mm5 \n\t" - "psubw %%mm0, %%mm6 \n\t" - // test pa <= pb - "movq %%mm4, %%mm7 \n\t" - "psubw %%mm0, %%mm6 \n\t" - "pcmpgtw %%mm5, %%mm7 \n\t" // pa > pb? - "movq %%mm7, %%mm0 \n\t" - // use mm7 mask to merge pa & pb - "pand %%mm7, %%mm5 \n\t" - // use mm0 mask copy to merge a & b - "pand %%mm0, %%mm2 \n\t" - "pandn %%mm4, %%mm7 \n\t" - "pandn %%mm1, %%mm0 \n\t" - "paddw %%mm5, %%mm7 \n\t" - "paddw %%mm2, %%mm0 \n\t" - // test ((pa <= pb)? pa:pb) <= pc - "pcmpgtw %%mm6, %%mm7 \n\t" // pab > pc? - "pxor %%mm1, %%mm1 \n\t" - "pand %%mm7, %%mm3 \n\t" - "pandn %%mm0, %%mm7 \n\t" - "pxor %%mm1, %%mm1 \n\t" - "paddw %%mm3, %%mm7 \n\t" - "pxor %%mm0, %%mm0 \n\t" - // step ecx to next set of 8 bytes and repeat loop til done - "addl $8, %%ecx \n\t" - "packuswb %%mm7, %%mm1 \n\t" - "paddb -8(%%edi,%%ecx,), %%mm1 \n\t" // add Paeth predictor with Raw(x) - "cmpl _MMXLength, %%ecx \n\t" - "movq %%mm1, -8(%%edi,%%ecx,) \n\t" // write back updated value - // mm1 will be used as Raw(x-bpp) next loop - "jb paeth_6lp \n\t" - - : "=S" (dummy_value_S), // output regs (dummy) - "=D" (dummy_value_D) - - : "0" (prev_row), // esi // input regs - "1" (row) // edi - - : "%ecx" // clobber list -#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */ - , "%mm0", "%mm1", "%mm2", "%mm3" - , "%mm4", "%mm5", "%mm6", "%mm7" -#endif - ); - } - break; // end 6 bpp - - case 4: - { - _ActiveMask.use = 0x00000000ffffffffLL; - - __asm__ __volatile__ ( - "movl _dif, %%ecx \n\t" -// preload "movl row, %%edi \n\t" -// preload "movl prev_row, %%esi \n\t" - "pxor %%mm0, %%mm0 \n\t" - // prime the pump: load the first Raw(x-bpp) data set - "movq -8(%%edi,%%ecx,), %%mm1 \n\t" // only time should need to read - // a=Raw(x-bpp) bytes - "paeth_4lp: \n\t" - // do first set of 4 bytes - "movq -8(%%esi,%%ecx,), %%mm3 \n\t" // read c=Prior(x-bpp) bytes - "punpckhbw %%mm0, %%mm1 \n\t" // unpack Low bytes of a - "movq (%%esi,%%ecx,), %%mm2 \n\t" // load b=Prior(x) - "punpcklbw %%mm0, %%mm2 \n\t" // unpack High bytes of b - // pav = p - a = (a + b - c) - a = b - c - "movq %%mm2, %%mm4 \n\t" - "punpckhbw %%mm0, %%mm3 \n\t" // unpack High bytes of c - // pbv = p - b = (a + b - c) - b = a - c - "movq %%mm1, %%mm5 \n\t" - "psubw %%mm3, %%mm4 \n\t" - "pxor %%mm7, %%mm7 \n\t" - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - "movq %%mm4, %%mm6 \n\t" - "psubw %%mm3, %%mm5 \n\t" - // pa = abs(p-a) = abs(pav) - // pb = abs(p-b) = abs(pbv) - // pc = abs(p-c) = abs(pcv) - "pcmpgtw %%mm4, %%mm0 \n\t" // create mask pav bytes < 0 - "paddw %%mm5, %%mm6 \n\t" - "pand %%mm4, %%mm0 \n\t" // only pav bytes < 0 in mm7 - "pcmpgtw %%mm5, %%mm7 \n\t" // create mask pbv bytes < 0 - "psubw %%mm0, %%mm4 \n\t" - "pand %%mm5, %%mm7 \n\t" // only pbv bytes < 0 in mm0 - "psubw %%mm0, %%mm4 \n\t" - "psubw %%mm7, %%mm5 \n\t" - "pxor %%mm0, %%mm0 \n\t" - "pcmpgtw %%mm6, %%mm0 \n\t" // create mask pcv bytes < 0 - "pand %%mm6, %%mm0 \n\t" // only pav bytes < 0 in mm7 - "psubw %%mm7, %%mm5 \n\t" - "psubw %%mm0, %%mm6 \n\t" - // test pa <= pb - "movq %%mm4, %%mm7 \n\t" - "psubw %%mm0, %%mm6 \n\t" - "pcmpgtw %%mm5, %%mm7 \n\t" // pa > pb? - "movq %%mm7, %%mm0 \n\t" - // use mm7 mask to merge pa & pb - "pand %%mm7, %%mm5 \n\t" - // use mm0 mask copy to merge a & b - "pand %%mm0, %%mm2 \n\t" - "pandn %%mm4, %%mm7 \n\t" - "pandn %%mm1, %%mm0 \n\t" - "paddw %%mm5, %%mm7 \n\t" - "paddw %%mm2, %%mm0 \n\t" - // test ((pa <= pb)? pa:pb) <= pc - "pcmpgtw %%mm6, %%mm7 \n\t" // pab > pc? - "pxor %%mm1, %%mm1 \n\t" - "pand %%mm7, %%mm3 \n\t" - "pandn %%mm0, %%mm7 \n\t" - "paddw %%mm3, %%mm7 \n\t" - "pxor %%mm0, %%mm0 \n\t" - "packuswb %%mm1, %%mm7 \n\t" - "movq (%%esi,%%ecx,), %%mm3 \n\t" // load c=Prior(x-bpp) - "pand _ActiveMask, %%mm7 \n\t" - "movq %%mm3, %%mm2 \n\t" // load b=Prior(x) step 1 - "paddb (%%edi,%%ecx,), %%mm7 \n\t" // add Paeth predictor with Raw(x) - "punpcklbw %%mm0, %%mm3 \n\t" // unpack High bytes of c - "movq %%mm7, (%%edi,%%ecx,) \n\t" // write back updated value - "movq %%mm7, %%mm1 \n\t" // now mm1 will be used as Raw(x-bpp) - // do second set of 4 bytes - "punpckhbw %%mm0, %%mm2 \n\t" // unpack Low bytes of b - "punpcklbw %%mm0, %%mm1 \n\t" // unpack Low bytes of a - // pav = p - a = (a + b - c) - a = b - c - "movq %%mm2, %%mm4 \n\t" - // pbv = p - b = (a + b - c) - b = a - c - "movq %%mm1, %%mm5 \n\t" - "psubw %%mm3, %%mm4 \n\t" - "pxor %%mm7, %%mm7 \n\t" - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - "movq %%mm4, %%mm6 \n\t" - "psubw %%mm3, %%mm5 \n\t" - // pa = abs(p-a) = abs(pav) - // pb = abs(p-b) = abs(pbv) - // pc = abs(p-c) = abs(pcv) - "pcmpgtw %%mm4, %%mm0 \n\t" // create mask pav bytes < 0 - "paddw %%mm5, %%mm6 \n\t" - "pand %%mm4, %%mm0 \n\t" // only pav bytes < 0 in mm7 - "pcmpgtw %%mm5, %%mm7 \n\t" // create mask pbv bytes < 0 - "psubw %%mm0, %%mm4 \n\t" - "pand %%mm5, %%mm7 \n\t" // only pbv bytes < 0 in mm0 - "psubw %%mm0, %%mm4 \n\t" - "psubw %%mm7, %%mm5 \n\t" - "pxor %%mm0, %%mm0 \n\t" - "pcmpgtw %%mm6, %%mm0 \n\t" // create mask pcv bytes < 0 - "pand %%mm6, %%mm0 \n\t" // only pav bytes < 0 in mm7 - "psubw %%mm7, %%mm5 \n\t" - "psubw %%mm0, %%mm6 \n\t" - // test pa <= pb - "movq %%mm4, %%mm7 \n\t" - "psubw %%mm0, %%mm6 \n\t" - "pcmpgtw %%mm5, %%mm7 \n\t" // pa > pb? - "movq %%mm7, %%mm0 \n\t" - // use mm7 mask to merge pa & pb - "pand %%mm7, %%mm5 \n\t" - // use mm0 mask copy to merge a & b - "pand %%mm0, %%mm2 \n\t" - "pandn %%mm4, %%mm7 \n\t" - "pandn %%mm1, %%mm0 \n\t" - "paddw %%mm5, %%mm7 \n\t" - "paddw %%mm2, %%mm0 \n\t" - // test ((pa <= pb)? pa:pb) <= pc - "pcmpgtw %%mm6, %%mm7 \n\t" // pab > pc? - "pxor %%mm1, %%mm1 \n\t" - "pand %%mm7, %%mm3 \n\t" - "pandn %%mm0, %%mm7 \n\t" - "pxor %%mm1, %%mm1 \n\t" - "paddw %%mm3, %%mm7 \n\t" - "pxor %%mm0, %%mm0 \n\t" - // step ecx to next set of 8 bytes and repeat loop til done - "addl $8, %%ecx \n\t" - "packuswb %%mm7, %%mm1 \n\t" - "paddb -8(%%edi,%%ecx,), %%mm1 \n\t" // add predictor with Raw(x) - "cmpl _MMXLength, %%ecx \n\t" - "movq %%mm1, -8(%%edi,%%ecx,) \n\t" // write back updated value - // mm1 will be used as Raw(x-bpp) next loop - "jb paeth_4lp \n\t" - - : "=S" (dummy_value_S), // output regs (dummy) - "=D" (dummy_value_D) - - : "0" (prev_row), // esi // input regs - "1" (row) // edi - - : "%ecx" // clobber list -#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */ - , "%mm0", "%mm1", "%mm2", "%mm3" - , "%mm4", "%mm5", "%mm6", "%mm7" -#endif - ); - } - break; // end 4 bpp - - case 8: // bpp == 8 - { - _ActiveMask.use = 0x00000000ffffffffLL; - - __asm__ __volatile__ ( - "movl _dif, %%ecx \n\t" -// preload "movl row, %%edi \n\t" -// preload "movl prev_row, %%esi \n\t" - "pxor %%mm0, %%mm0 \n\t" - // prime the pump: load the first Raw(x-bpp) data set - "movq -8(%%edi,%%ecx,), %%mm1 \n\t" // only time should need to read - // a=Raw(x-bpp) bytes - "paeth_8lp: \n\t" - // do first set of 4 bytes - "movq -8(%%esi,%%ecx,), %%mm3 \n\t" // read c=Prior(x-bpp) bytes - "punpcklbw %%mm0, %%mm1 \n\t" // unpack Low bytes of a - "movq (%%esi,%%ecx,), %%mm2 \n\t" // load b=Prior(x) - "punpcklbw %%mm0, %%mm2 \n\t" // unpack Low bytes of b - // pav = p - a = (a + b - c) - a = b - c - "movq %%mm2, %%mm4 \n\t" - "punpcklbw %%mm0, %%mm3 \n\t" // unpack Low bytes of c - // pbv = p - b = (a + b - c) - b = a - c - "movq %%mm1, %%mm5 \n\t" - "psubw %%mm3, %%mm4 \n\t" - "pxor %%mm7, %%mm7 \n\t" - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - "movq %%mm4, %%mm6 \n\t" - "psubw %%mm3, %%mm5 \n\t" - // pa = abs(p-a) = abs(pav) - // pb = abs(p-b) = abs(pbv) - // pc = abs(p-c) = abs(pcv) - "pcmpgtw %%mm4, %%mm0 \n\t" // create mask pav bytes < 0 - "paddw %%mm5, %%mm6 \n\t" - "pand %%mm4, %%mm0 \n\t" // only pav bytes < 0 in mm7 - "pcmpgtw %%mm5, %%mm7 \n\t" // create mask pbv bytes < 0 - "psubw %%mm0, %%mm4 \n\t" - "pand %%mm5, %%mm7 \n\t" // only pbv bytes < 0 in mm0 - "psubw %%mm0, %%mm4 \n\t" - "psubw %%mm7, %%mm5 \n\t" - "pxor %%mm0, %%mm0 \n\t" - "pcmpgtw %%mm6, %%mm0 \n\t" // create mask pcv bytes < 0 - "pand %%mm6, %%mm0 \n\t" // only pav bytes < 0 in mm7 - "psubw %%mm7, %%mm5 \n\t" - "psubw %%mm0, %%mm6 \n\t" - // test pa <= pb - "movq %%mm4, %%mm7 \n\t" - "psubw %%mm0, %%mm6 \n\t" - "pcmpgtw %%mm5, %%mm7 \n\t" // pa > pb? - "movq %%mm7, %%mm0 \n\t" - // use mm7 mask to merge pa & pb - "pand %%mm7, %%mm5 \n\t" - // use mm0 mask copy to merge a & b - "pand %%mm0, %%mm2 \n\t" - "pandn %%mm4, %%mm7 \n\t" - "pandn %%mm1, %%mm0 \n\t" - "paddw %%mm5, %%mm7 \n\t" - "paddw %%mm2, %%mm0 \n\t" - // test ((pa <= pb)? pa:pb) <= pc - "pcmpgtw %%mm6, %%mm7 \n\t" // pab > pc? - "pxor %%mm1, %%mm1 \n\t" - "pand %%mm7, %%mm3 \n\t" - "pandn %%mm0, %%mm7 \n\t" - "paddw %%mm3, %%mm7 \n\t" - "pxor %%mm0, %%mm0 \n\t" - "packuswb %%mm1, %%mm7 \n\t" - "movq -8(%%esi,%%ecx,), %%mm3 \n\t" // read c=Prior(x-bpp) bytes - "pand _ActiveMask, %%mm7 \n\t" - "movq (%%esi,%%ecx,), %%mm2 \n\t" // load b=Prior(x) - "paddb (%%edi,%%ecx,), %%mm7 \n\t" // add Paeth predictor with Raw(x) - "punpckhbw %%mm0, %%mm3 \n\t" // unpack High bytes of c - "movq %%mm7, (%%edi,%%ecx,) \n\t" // write back updated value - "movq -8(%%edi,%%ecx,), %%mm1 \n\t" // read a=Raw(x-bpp) bytes - - // do second set of 4 bytes - "punpckhbw %%mm0, %%mm2 \n\t" // unpack High bytes of b - "punpckhbw %%mm0, %%mm1 \n\t" // unpack High bytes of a - // pav = p - a = (a + b - c) - a = b - c - "movq %%mm2, %%mm4 \n\t" - // pbv = p - b = (a + b - c) - b = a - c - "movq %%mm1, %%mm5 \n\t" - "psubw %%mm3, %%mm4 \n\t" - "pxor %%mm7, %%mm7 \n\t" - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - "movq %%mm4, %%mm6 \n\t" - "psubw %%mm3, %%mm5 \n\t" - // pa = abs(p-a) = abs(pav) - // pb = abs(p-b) = abs(pbv) - // pc = abs(p-c) = abs(pcv) - "pcmpgtw %%mm4, %%mm0 \n\t" // create mask pav bytes < 0 - "paddw %%mm5, %%mm6 \n\t" - "pand %%mm4, %%mm0 \n\t" // only pav bytes < 0 in mm7 - "pcmpgtw %%mm5, %%mm7 \n\t" // create mask pbv bytes < 0 - "psubw %%mm0, %%mm4 \n\t" - "pand %%mm5, %%mm7 \n\t" // only pbv bytes < 0 in mm0 - "psubw %%mm0, %%mm4 \n\t" - "psubw %%mm7, %%mm5 \n\t" - "pxor %%mm0, %%mm0 \n\t" - "pcmpgtw %%mm6, %%mm0 \n\t" // create mask pcv bytes < 0 - "pand %%mm6, %%mm0 \n\t" // only pav bytes < 0 in mm7 - "psubw %%mm7, %%mm5 \n\t" - "psubw %%mm0, %%mm6 \n\t" - // test pa <= pb - "movq %%mm4, %%mm7 \n\t" - "psubw %%mm0, %%mm6 \n\t" - "pcmpgtw %%mm5, %%mm7 \n\t" // pa > pb? - "movq %%mm7, %%mm0 \n\t" - // use mm7 mask to merge pa & pb - "pand %%mm7, %%mm5 \n\t" - // use mm0 mask copy to merge a & b - "pand %%mm0, %%mm2 \n\t" - "pandn %%mm4, %%mm7 \n\t" - "pandn %%mm1, %%mm0 \n\t" - "paddw %%mm5, %%mm7 \n\t" - "paddw %%mm2, %%mm0 \n\t" - // test ((pa <= pb)? pa:pb) <= pc - "pcmpgtw %%mm6, %%mm7 \n\t" // pab > pc? - "pxor %%mm1, %%mm1 \n\t" - "pand %%mm7, %%mm3 \n\t" - "pandn %%mm0, %%mm7 \n\t" - "pxor %%mm1, %%mm1 \n\t" - "paddw %%mm3, %%mm7 \n\t" - "pxor %%mm0, %%mm0 \n\t" - // step ecx to next set of 8 bytes and repeat loop til done - "addl $8, %%ecx \n\t" - "packuswb %%mm7, %%mm1 \n\t" - "paddb -8(%%edi,%%ecx,), %%mm1 \n\t" // add Paeth predictor with Raw(x) - "cmpl _MMXLength, %%ecx \n\t" - "movq %%mm1, -8(%%edi,%%ecx,) \n\t" // write back updated value - // mm1 will be used as Raw(x-bpp) next loop - "jb paeth_8lp \n\t" - - : "=S" (dummy_value_S), // output regs (dummy) - "=D" (dummy_value_D) - - : "0" (prev_row), // esi // input regs - "1" (row) // edi - - : "%ecx" // clobber list -#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */ - , "%mm0", "%mm1", "%mm2", "%mm3" - , "%mm4", "%mm5", "%mm6", "%mm7" -#endif - ); - } - break; // end 8 bpp - - case 1: // bpp = 1 - case 2: // bpp = 2 - default: // bpp > 8 - { - __asm__ __volatile__ ( -#ifdef __PIC__ - "pushl %%ebx \n\t" // save Global Offset Table index -#endif - "movl _dif, %%ebx \n\t" - "cmpl _FullLength, %%ebx \n\t" - "jnb paeth_dend \n\t" - -// preload "movl row, %%edi \n\t" -// preload "movl prev_row, %%esi \n\t" - // do Paeth decode for remaining bytes - "movl %%ebx, %%edx \n\t" -// preload "subl bpp, %%edx \n\t" // (bpp is preloaded into ecx) - "subl %%ecx, %%edx \n\t" // edx = ebx - bpp - "xorl %%ecx, %%ecx \n\t" // zero ecx before using cl & cx - - "paeth_dlp: \n\t" - "xorl %%eax, %%eax \n\t" - // pav = p - a = (a + b - c) - a = b - c - "movb (%%esi,%%ebx,), %%al \n\t" // load Prior(x) into al - "movb (%%esi,%%edx,), %%cl \n\t" // load Prior(x-bpp) into cl - "subl %%ecx, %%eax \n\t" // subtract Prior(x-bpp) - "movl %%eax, _patemp \n\t" // Save pav for later use - "xorl %%eax, %%eax \n\t" - // pbv = p - b = (a + b - c) - b = a - c - "movb (%%edi,%%edx,), %%al \n\t" // load Raw(x-bpp) into al - "subl %%ecx, %%eax \n\t" // subtract Prior(x-bpp) - "movl %%eax, %%ecx \n\t" - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - "addl _patemp, %%eax \n\t" // pcv = pav + pbv - // pc = abs(pcv) - "testl $0x80000000, %%eax \n\t" - "jz paeth_dpca \n\t" - "negl %%eax \n\t" // reverse sign of neg values - - "paeth_dpca: \n\t" - "movl %%eax, _pctemp \n\t" // save pc for later use - // pb = abs(pbv) - "testl $0x80000000, %%ecx \n\t" - "jz paeth_dpba \n\t" - "negl %%ecx \n\t" // reverse sign of neg values - - "paeth_dpba: \n\t" - "movl %%ecx, _pbtemp \n\t" // save pb for later use - // pa = abs(pav) - "movl _patemp, %%eax \n\t" - "testl $0x80000000, %%eax \n\t" - "jz paeth_dpaa \n\t" - "negl %%eax \n\t" // reverse sign of neg values - - "paeth_dpaa: \n\t" - "movl %%eax, _patemp \n\t" // save pa for later use - // test if pa <= pb - "cmpl %%ecx, %%eax \n\t" - "jna paeth_dabb \n\t" - // pa > pb; now test if pb <= pc - "cmpl _pctemp, %%ecx \n\t" - "jna paeth_dbbc \n\t" - // pb > pc; Raw(x) = Paeth(x) + Prior(x-bpp) - "movb (%%esi,%%edx,), %%cl \n\t" // load Prior(x-bpp) into cl - "jmp paeth_dpaeth \n\t" - - "paeth_dbbc: \n\t" - // pb <= pc; Raw(x) = Paeth(x) + Prior(x) - "movb (%%esi,%%ebx,), %%cl \n\t" // load Prior(x) into cl - "jmp paeth_dpaeth \n\t" - - "paeth_dabb: \n\t" - // pa <= pb; now test if pa <= pc - "cmpl _pctemp, %%eax \n\t" - "jna paeth_dabc \n\t" - // pa > pc; Raw(x) = Paeth(x) + Prior(x-bpp) - "movb (%%esi,%%edx,), %%cl \n\t" // load Prior(x-bpp) into cl - "jmp paeth_dpaeth \n\t" - - "paeth_dabc: \n\t" - // pa <= pc; Raw(x) = Paeth(x) + Raw(x-bpp) - "movb (%%edi,%%edx,), %%cl \n\t" // load Raw(x-bpp) into cl - - "paeth_dpaeth: \n\t" - "incl %%ebx \n\t" - "incl %%edx \n\t" - // Raw(x) = (Paeth(x) + Paeth_Predictor( a, b, c )) mod 256 - "addb %%cl, -1(%%edi,%%ebx,) \n\t" - "cmpl _FullLength, %%ebx \n\t" - "jb paeth_dlp \n\t" - - "paeth_dend: \n\t" -#ifdef __PIC__ - "popl %%ebx \n\t" // index to Global Offset Table -#endif - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "0" (bpp), // ecx // input regs - "1" (prev_row), // esi - "2" (row) // edi - - : "%eax", "%edx" // clobber list -#ifndef __PIC__ - , "%ebx" -#endif - ); - } - return; // No need to go further with this one - - } // end switch (bpp) - - __asm__ __volatile__ ( - // MMX acceleration complete; now do clean-up - // check if any remaining bytes left to decode -#ifdef __PIC__ - "pushl %%ebx \n\t" // save index to Global Offset Table -#endif - "movl _MMXLength, %%ebx \n\t" - "cmpl _FullLength, %%ebx \n\t" - "jnb paeth_end \n\t" -//pre "movl row, %%edi \n\t" -//pre "movl prev_row, %%esi \n\t" - // do Paeth decode for remaining bytes - "movl %%ebx, %%edx \n\t" -//pre "subl bpp, %%edx \n\t" // (bpp is preloaded into ecx) - "subl %%ecx, %%edx \n\t" // edx = ebx - bpp - "xorl %%ecx, %%ecx \n\t" // zero ecx before using cl & cx below - - "paeth_lp2: \n\t" - "xorl %%eax, %%eax \n\t" - // pav = p - a = (a + b - c) - a = b - c - "movb (%%esi,%%ebx,), %%al \n\t" // load Prior(x) into al - "movb (%%esi,%%edx,), %%cl \n\t" // load Prior(x-bpp) into cl - "subl %%ecx, %%eax \n\t" // subtract Prior(x-bpp) - "movl %%eax, _patemp \n\t" // Save pav for later use - "xorl %%eax, %%eax \n\t" - // pbv = p - b = (a + b - c) - b = a - c - "movb (%%edi,%%edx,), %%al \n\t" // load Raw(x-bpp) into al - "subl %%ecx, %%eax \n\t" // subtract Prior(x-bpp) - "movl %%eax, %%ecx \n\t" - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - "addl _patemp, %%eax \n\t" // pcv = pav + pbv - // pc = abs(pcv) - "testl $0x80000000, %%eax \n\t" - "jz paeth_pca2 \n\t" - "negl %%eax \n\t" // reverse sign of neg values - - "paeth_pca2: \n\t" - "movl %%eax, _pctemp \n\t" // save pc for later use - // pb = abs(pbv) - "testl $0x80000000, %%ecx \n\t" - "jz paeth_pba2 \n\t" - "negl %%ecx \n\t" // reverse sign of neg values - - "paeth_pba2: \n\t" - "movl %%ecx, _pbtemp \n\t" // save pb for later use - // pa = abs(pav) - "movl _patemp, %%eax \n\t" - "testl $0x80000000, %%eax \n\t" - "jz paeth_paa2 \n\t" - "negl %%eax \n\t" // reverse sign of neg values - - "paeth_paa2: \n\t" - "movl %%eax, _patemp \n\t" // save pa for later use - // test if pa <= pb - "cmpl %%ecx, %%eax \n\t" - "jna paeth_abb2 \n\t" - // pa > pb; now test if pb <= pc - "cmpl _pctemp, %%ecx \n\t" - "jna paeth_bbc2 \n\t" - // pb > pc; Raw(x) = Paeth(x) + Prior(x-bpp) - "movb (%%esi,%%edx,), %%cl \n\t" // load Prior(x-bpp) into cl - "jmp paeth_paeth2 \n\t" - - "paeth_bbc2: \n\t" - // pb <= pc; Raw(x) = Paeth(x) + Prior(x) - "movb (%%esi,%%ebx,), %%cl \n\t" // load Prior(x) into cl - "jmp paeth_paeth2 \n\t" - - "paeth_abb2: \n\t" - // pa <= pb; now test if pa <= pc - "cmpl _pctemp, %%eax \n\t" - "jna paeth_abc2 \n\t" - // pa > pc; Raw(x) = Paeth(x) + Prior(x-bpp) - "movb (%%esi,%%edx,), %%cl \n\t" // load Prior(x-bpp) into cl - "jmp paeth_paeth2 \n\t" - - "paeth_abc2: \n\t" - // pa <= pc; Raw(x) = Paeth(x) + Raw(x-bpp) - "movb (%%edi,%%edx,), %%cl \n\t" // load Raw(x-bpp) into cl - - "paeth_paeth2: \n\t" - "incl %%ebx \n\t" - "incl %%edx \n\t" - // Raw(x) = (Paeth(x) + Paeth_Predictor( a, b, c )) mod 256 - "addb %%cl, -1(%%edi,%%ebx,) \n\t" - "cmpl _FullLength, %%ebx \n\t" - "jb paeth_lp2 \n\t" - - "paeth_end: \n\t" - "EMMS \n\t" // end MMX; prep for poss. FP instrs. -#ifdef __PIC__ - "popl %%ebx \n\t" // restore index to Global Offset Table -#endif - - : "=c" (dummy_value_c), // output regs (dummy) - "=S" (dummy_value_S), - "=D" (dummy_value_D) - - : "0" (bpp), // ecx // input regs - "1" (prev_row), // esi - "2" (row) // edi - - : "%eax", "%edx" // clobber list (no input regs!) -#ifndef __PIC__ - , "%ebx" -#endif - ); - -} /* end png_read_filter_row_mmx_paeth() */ -#endif - - - - -#ifdef PNG_THREAD_UNSAFE_OK -//===========================================================================// -// // -// P N G _ R E A D _ F I L T E R _ R O W _ M M X _ S U B // -// // -//===========================================================================// - -// Optimized code for PNG Sub filter decoder - -static void /* PRIVATE */ -png_read_filter_row_mmx_sub(png_row_infop row_info, png_bytep row) -{ - int bpp; - int dummy_value_a; - int dummy_value_D; - - bpp = (row_info->pixel_depth + 7) >> 3; // calc number of bytes per pixel - _FullLength = row_info->rowbytes - bpp; // number of bytes to filter - - __asm__ __volatile__ ( -//pre "movl row, %%edi \n\t" - "movl %%edi, %%esi \n\t" // lp = row -//pre "movl bpp, %%eax \n\t" - "addl %%eax, %%edi \n\t" // rp = row + bpp -//irr "xorl %%eax, %%eax \n\t" - // get # of bytes to alignment - "movl %%edi, _dif \n\t" // take start of row - "addl $0xf, _dif \n\t" // add 7 + 8 to incr past - // alignment boundary - "xorl %%ecx, %%ecx \n\t" - "andl $0xfffffff8, _dif \n\t" // mask to alignment boundary - "subl %%edi, _dif \n\t" // subtract from start ==> value - "jz sub_go \n\t" // ecx at alignment - - "sub_lp1: \n\t" // fix alignment - "movb (%%esi,%%ecx,), %%al \n\t" - "addb %%al, (%%edi,%%ecx,) \n\t" - "incl %%ecx \n\t" - "cmpl _dif, %%ecx \n\t" - "jb sub_lp1 \n\t" - - "sub_go: \n\t" - "movl _FullLength, %%eax \n\t" - "movl %%eax, %%edx \n\t" - "subl %%ecx, %%edx \n\t" // subtract alignment fix - "andl $0x00000007, %%edx \n\t" // calc bytes over mult of 8 - "subl %%edx, %%eax \n\t" // drop over bytes from length - "movl %%eax, _MMXLength \n\t" - - : "=a" (dummy_value_a), // 0 // output regs (dummy) - "=D" (dummy_value_D) // 1 - - : "0" (bpp), // eax // input regs - "1" (row) // edi - - : "%ebx", "%ecx", "%edx" // clobber list - , "%esi" - -#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ - , "%mm0", "%mm1", "%mm2", "%mm3" - , "%mm4", "%mm5", "%mm6", "%mm7" -#endif - ); - - // now do the math for the rest of the row - switch (bpp) - { - case 3: - { - _ActiveMask.use = 0x0000ffffff000000LL; - _ShiftBpp.use = 24; // == 3 * 8 - _ShiftRem.use = 40; // == 64 - 24 - - __asm__ __volatile__ ( -// preload "movl row, %%edi \n\t" - "movq _ActiveMask, %%mm7 \n\t" // load _ActiveMask for 2nd - // active byte group - "movl %%edi, %%esi \n\t" // lp = row -// preload "movl bpp, %%eax \n\t" - "addl %%eax, %%edi \n\t" // rp = row + bpp - "movq %%mm7, %%mm6 \n\t" - "movl _dif, %%edx \n\t" - "psllq _ShiftBpp, %%mm6 \n\t" // move mask in mm6 to cover - // 3rd active byte group - // prime the pump: load the first Raw(x-bpp) data set - "movq -8(%%edi,%%edx,), %%mm1 \n\t" - - "sub_3lp: \n\t" // shift data for adding first - "psrlq _ShiftRem, %%mm1 \n\t" // bpp bytes (no need for mask; - // shift clears inactive bytes) - // add 1st active group - "movq (%%edi,%%edx,), %%mm0 \n\t" - "paddb %%mm1, %%mm0 \n\t" - - // add 2nd active group - "movq %%mm0, %%mm1 \n\t" // mov updated Raws to mm1 - "psllq _ShiftBpp, %%mm1 \n\t" // shift data to pos. correctly - "pand %%mm7, %%mm1 \n\t" // mask to use 2nd active group - "paddb %%mm1, %%mm0 \n\t" - - // add 3rd active group - "movq %%mm0, %%mm1 \n\t" // mov updated Raws to mm1 - "psllq _ShiftBpp, %%mm1 \n\t" // shift data to pos. correctly - "pand %%mm6, %%mm1 \n\t" // mask to use 3rd active group - "addl $8, %%edx \n\t" - "paddb %%mm1, %%mm0 \n\t" - - "cmpl _MMXLength, %%edx \n\t" - "movq %%mm0, -8(%%edi,%%edx,) \n\t" // write updated Raws to array - "movq %%mm0, %%mm1 \n\t" // prep 1st add at top of loop - "jb sub_3lp \n\t" - - : "=a" (dummy_value_a), // 0 // output regs (dummy) - "=D" (dummy_value_D) // 1 - - : "0" (bpp), // eax // input regs - "1" (row) // edi - - : "%edx", "%esi" // clobber list -#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ - , "%mm0", "%mm1", "%mm6", "%mm7" -#endif - ); - } - break; - - case 1: - { - __asm__ __volatile__ ( - "movl _dif, %%edx \n\t" -// preload "movl row, %%edi \n\t" - "cmpl _FullLength, %%edx \n\t" - "jnb sub_1end \n\t" - "movl %%edi, %%esi \n\t" // lp = row - "xorl %%eax, %%eax \n\t" -// preload "movl bpp, %%eax \n\t" - "addl %%eax, %%edi \n\t" // rp = row + bpp - - "sub_1lp: \n\t" - "movb (%%esi,%%edx,), %%al \n\t" - "addb %%al, (%%edi,%%edx,) \n\t" - "incl %%edx \n\t" - "cmpl _FullLength, %%edx \n\t" - "jb sub_1lp \n\t" - - "sub_1end: \n\t" - - : "=a" (dummy_value_a), // 0 // output regs (dummy) - "=D" (dummy_value_D) // 1 - - : "0" (bpp), // eax // input regs - "1" (row) // edi - - : "%edx", "%esi" // clobber list - ); - } - return; - - case 6: - case 4: - //case 7: // GRR BOGUS - //case 5: // GRR BOGUS - { - _ShiftBpp.use = bpp << 3; - _ShiftRem.use = 64 - _ShiftBpp.use; - - __asm__ __volatile__ ( -// preload "movl row, %%edi \n\t" - "movl _dif, %%edx \n\t" - "movl %%edi, %%esi \n\t" // lp = row -// preload "movl bpp, %%eax \n\t" - "addl %%eax, %%edi \n\t" // rp = row + bpp - - // prime the pump: load the first Raw(x-bpp) data set - "movq -8(%%edi,%%edx,), %%mm1 \n\t" - - "sub_4lp: \n\t" // shift data for adding first - "psrlq _ShiftRem, %%mm1 \n\t" // bpp bytes (no need for mask; - // shift clears inactive bytes) - "movq (%%edi,%%edx,), %%mm0 \n\t" - "paddb %%mm1, %%mm0 \n\t" - - // add 2nd active group - "movq %%mm0, %%mm1 \n\t" // mov updated Raws to mm1 - "psllq _ShiftBpp, %%mm1 \n\t" // shift data to pos. correctly - "addl $8, %%edx \n\t" - "paddb %%mm1, %%mm0 \n\t" - - "cmpl _MMXLength, %%edx \n\t" - "movq %%mm0, -8(%%edi,%%edx,) \n\t" - "movq %%mm0, %%mm1 \n\t" // prep 1st add at top of loop - "jb sub_4lp \n\t" - - : "=a" (dummy_value_a), // 0 // output regs (dummy) - "=D" (dummy_value_D) // 1 - - : "0" (bpp), // eax // input regs - "1" (row) // edi - - : "%edx", "%esi" // clobber list -#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ - , "%mm0", "%mm1" -#endif - ); - } - break; - - case 2: - { - _ActiveMask.use = 0x00000000ffff0000LL; - _ShiftBpp.use = 16; // == 2 * 8 - _ShiftRem.use = 48; // == 64 - 16 - - __asm__ __volatile__ ( - "movq _ActiveMask, %%mm7 \n\t" // load _ActiveMask for 2nd - // active byte group - "movl _dif, %%edx \n\t" - "movq %%mm7, %%mm6 \n\t" -// preload "movl row, %%edi \n\t" - "psllq _ShiftBpp, %%mm6 \n\t" // move mask in mm6 to cover - // 3rd active byte group - "movl %%edi, %%esi \n\t" // lp = row - "movq %%mm6, %%mm5 \n\t" -// preload "movl bpp, %%eax \n\t" - "addl %%eax, %%edi \n\t" // rp = row + bpp - "psllq _ShiftBpp, %%mm5 \n\t" // move mask in mm5 to cover - // 4th active byte group - // prime the pump: load the first Raw(x-bpp) data set - "movq -8(%%edi,%%edx,), %%mm1 \n\t" - - "sub_2lp: \n\t" // shift data for adding first - "psrlq _ShiftRem, %%mm1 \n\t" // bpp bytes (no need for mask; - // shift clears inactive bytes) - // add 1st active group - "movq (%%edi,%%edx,), %%mm0 \n\t" - "paddb %%mm1, %%mm0 \n\t" - - // add 2nd active group - "movq %%mm0, %%mm1 \n\t" // mov updated Raws to mm1 - "psllq _ShiftBpp, %%mm1 \n\t" // shift data to pos. correctly - "pand %%mm7, %%mm1 \n\t" // mask to use 2nd active group - "paddb %%mm1, %%mm0 \n\t" - - // add 3rd active group - "movq %%mm0, %%mm1 \n\t" // mov updated Raws to mm1 - "psllq _ShiftBpp, %%mm1 \n\t" // shift data to pos. correctly - "pand %%mm6, %%mm1 \n\t" // mask to use 3rd active group - "paddb %%mm1, %%mm0 \n\t" - - // add 4th active group - "movq %%mm0, %%mm1 \n\t" // mov updated Raws to mm1 - "psllq _ShiftBpp, %%mm1 \n\t" // shift data to pos. correctly - "pand %%mm5, %%mm1 \n\t" // mask to use 4th active group - "addl $8, %%edx \n\t" - "paddb %%mm1, %%mm0 \n\t" - "cmpl _MMXLength, %%edx \n\t" - "movq %%mm0, -8(%%edi,%%edx,) \n\t" // write updated Raws to array - "movq %%mm0, %%mm1 \n\t" // prep 1st add at top of loop - "jb sub_2lp \n\t" - - : "=a" (dummy_value_a), // 0 // output regs (dummy) - "=D" (dummy_value_D) // 1 - - : "0" (bpp), // eax // input regs - "1" (row) // edi - - : "%edx", "%esi" // clobber list -#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ - , "%mm0", "%mm1", "%mm5", "%mm6", "%mm7" -#endif - ); - } - break; - - case 8: - { - __asm__ __volatile__ ( -// preload "movl row, %%edi \n\t" - "movl _dif, %%edx \n\t" - "movl %%edi, %%esi \n\t" // lp = row -// preload "movl bpp, %%eax \n\t" - "addl %%eax, %%edi \n\t" // rp = row + bpp - "movl _MMXLength, %%ecx \n\t" - - // prime the pump: load the first Raw(x-bpp) data set - "movq -8(%%edi,%%edx,), %%mm7 \n\t" - "andl $0x0000003f, %%ecx \n\t" // calc bytes over mult of 64 - - "sub_8lp: \n\t" - "movq (%%edi,%%edx,), %%mm0 \n\t" // load Sub(x) for 1st 8 bytes - "paddb %%mm7, %%mm0 \n\t" - "movq 8(%%edi,%%edx,), %%mm1 \n\t" // load Sub(x) for 2nd 8 bytes - "movq %%mm0, (%%edi,%%edx,) \n\t" // write Raw(x) for 1st 8 bytes - - // Now mm0 will be used as Raw(x-bpp) for the 2nd group of 8 bytes. - // This will be repeated for each group of 8 bytes with the 8th - // group being used as the Raw(x-bpp) for the 1st group of the - // next loop. - - "paddb %%mm0, %%mm1 \n\t" - "movq 16(%%edi,%%edx,), %%mm2 \n\t" // load Sub(x) for 3rd 8 bytes - "movq %%mm1, 8(%%edi,%%edx,) \n\t" // write Raw(x) for 2nd 8 bytes - "paddb %%mm1, %%mm2 \n\t" - "movq 24(%%edi,%%edx,), %%mm3 \n\t" // load Sub(x) for 4th 8 bytes - "movq %%mm2, 16(%%edi,%%edx,) \n\t" // write Raw(x) for 3rd 8 bytes - "paddb %%mm2, %%mm3 \n\t" - "movq 32(%%edi,%%edx,), %%mm4 \n\t" // load Sub(x) for 5th 8 bytes - "movq %%mm3, 24(%%edi,%%edx,) \n\t" // write Raw(x) for 4th 8 bytes - "paddb %%mm3, %%mm4 \n\t" - "movq 40(%%edi,%%edx,), %%mm5 \n\t" // load Sub(x) for 6th 8 bytes - "movq %%mm4, 32(%%edi,%%edx,) \n\t" // write Raw(x) for 5th 8 bytes - "paddb %%mm4, %%mm5 \n\t" - "movq 48(%%edi,%%edx,), %%mm6 \n\t" // load Sub(x) for 7th 8 bytes - "movq %%mm5, 40(%%edi,%%edx,) \n\t" // write Raw(x) for 6th 8 bytes - "paddb %%mm5, %%mm6 \n\t" - "movq 56(%%edi,%%edx,), %%mm7 \n\t" // load Sub(x) for 8th 8 bytes - "movq %%mm6, 48(%%edi,%%edx,) \n\t" // write Raw(x) for 7th 8 bytes - "addl $64, %%edx \n\t" - "paddb %%mm6, %%mm7 \n\t" - "cmpl %%ecx, %%edx \n\t" - "movq %%mm7, -8(%%edi,%%edx,) \n\t" // write Raw(x) for 8th 8 bytes - "jb sub_8lp \n\t" - - "cmpl _MMXLength, %%edx \n\t" - "jnb sub_8lt8 \n\t" - - "sub_8lpA: \n\t" - "movq (%%edi,%%edx,), %%mm0 \n\t" - "addl $8, %%edx \n\t" - "paddb %%mm7, %%mm0 \n\t" - "cmpl _MMXLength, %%edx \n\t" - "movq %%mm0, -8(%%edi,%%edx,) \n\t" // -8 to offset early addl edx - "movq %%mm0, %%mm7 \n\t" // move calculated Raw(x) data - // to mm1 to be new Raw(x-bpp) - // for next loop - "jb sub_8lpA \n\t" - - "sub_8lt8: \n\t" - - : "=a" (dummy_value_a), // 0 // output regs (dummy) - "=D" (dummy_value_D) // 1 - - : "0" (bpp), // eax // input regs - "1" (row) // edi - - : "%ecx", "%edx", "%esi" // clobber list -#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ - , "%mm0", "%mm1", "%mm2", "%mm3", "%mm4", "%mm5", "%mm6", "%mm7" -#endif - ); - } - break; - - default: // bpp greater than 8 bytes GRR BOGUS - { - __asm__ __volatile__ ( - "movl _dif, %%edx \n\t" -// preload "movl row, %%edi \n\t" - "movl %%edi, %%esi \n\t" // lp = row -// preload "movl bpp, %%eax \n\t" - "addl %%eax, %%edi \n\t" // rp = row + bpp - - "sub_Alp: \n\t" - "movq (%%edi,%%edx,), %%mm0 \n\t" - "movq (%%esi,%%edx,), %%mm1 \n\t" - "addl $8, %%edx \n\t" - "paddb %%mm1, %%mm0 \n\t" - "cmpl _MMXLength, %%edx \n\t" - "movq %%mm0, -8(%%edi,%%edx,) \n\t" // mov does not affect flags; - // -8 to offset addl edx - "jb sub_Alp \n\t" - - : "=a" (dummy_value_a), // 0 // output regs (dummy) - "=D" (dummy_value_D) // 1 - - : "0" (bpp), // eax // input regs - "1" (row) // edi - - : "%edx", "%esi" // clobber list -#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ - , "%mm0", "%mm1" -#endif - ); - } - break; - - } // end switch (bpp) - - __asm__ __volatile__ ( - "movl _MMXLength, %%edx \n\t" -//pre "movl row, %%edi \n\t" - "cmpl _FullLength, %%edx \n\t" - "jnb sub_end \n\t" - - "movl %%edi, %%esi \n\t" // lp = row -//pre "movl bpp, %%eax \n\t" - "addl %%eax, %%edi \n\t" // rp = row + bpp - "xorl %%eax, %%eax \n\t" - - "sub_lp2: \n\t" - "movb (%%esi,%%edx,), %%al \n\t" - "addb %%al, (%%edi,%%edx,) \n\t" - "incl %%edx \n\t" - "cmpl _FullLength, %%edx \n\t" - "jb sub_lp2 \n\t" - - "sub_end: \n\t" - "EMMS \n\t" // end MMX instructions - - : "=a" (dummy_value_a), // 0 // output regs (dummy) - "=D" (dummy_value_D) // 1 - - : "0" (bpp), // eax // input regs - "1" (row) // edi - - : "%edx", "%esi" // clobber list - ); - -} // end of png_read_filter_row_mmx_sub() -#endif - - - - -//===========================================================================// -// // -// P N G _ R E A D _ F I L T E R _ R O W _ M M X _ U P // -// // -//===========================================================================// - -// Optimized code for PNG Up filter decoder - -static void /* PRIVATE */ -png_read_filter_row_mmx_up(png_row_infop row_info, png_bytep row, - png_bytep prev_row) -{ - png_uint_32 len; - int dummy_value_d; // fix 'forbidden register 3 (dx) was spilled' error - int dummy_value_S; - int dummy_value_D; - - len = row_info->rowbytes; // number of bytes to filter - - __asm__ __volatile__ ( -//pre "movl row, %%edi \n\t" - // get # of bytes to alignment -#ifdef __PIC__ - "pushl %%ebx \n\t" -#endif - "movl %%edi, %%ecx \n\t" - "xorl %%ebx, %%ebx \n\t" - "addl $0x7, %%ecx \n\t" - "xorl %%eax, %%eax \n\t" - "andl $0xfffffff8, %%ecx \n\t" -//pre "movl prev_row, %%esi \n\t" - "subl %%edi, %%ecx \n\t" - "jz up_go \n\t" - - "up_lp1: \n\t" // fix alignment - "movb (%%edi,%%ebx,), %%al \n\t" - "addb (%%esi,%%ebx,), %%al \n\t" - "incl %%ebx \n\t" - "cmpl %%ecx, %%ebx \n\t" - "movb %%al, -1(%%edi,%%ebx,) \n\t" // mov does not affect flags; -1 to - "jb up_lp1 \n\t" // offset incl ebx - - "up_go: \n\t" -//pre "movl len, %%edx \n\t" - "movl %%edx, %%ecx \n\t" - "subl %%ebx, %%edx \n\t" // subtract alignment fix - "andl $0x0000003f, %%edx \n\t" // calc bytes over mult of 64 - "subl %%edx, %%ecx \n\t" // drop over bytes from length - - // unrolled loop - use all MMX registers and interleave to reduce - // number of branch instructions (loops) and reduce partial stalls - "up_loop: \n\t" - "movq (%%esi,%%ebx,), %%mm1 \n\t" - "movq (%%edi,%%ebx,), %%mm0 \n\t" - "movq 8(%%esi,%%ebx,), %%mm3 \n\t" - "paddb %%mm1, %%mm0 \n\t" - "movq 8(%%edi,%%ebx,), %%mm2 \n\t" - "movq %%mm0, (%%edi,%%ebx,) \n\t" - "paddb %%mm3, %%mm2 \n\t" - "movq 16(%%esi,%%ebx,), %%mm5 \n\t" - "movq %%mm2, 8(%%edi,%%ebx,) \n\t" - "movq 16(%%edi,%%ebx,), %%mm4 \n\t" - "movq 24(%%esi,%%ebx,), %%mm7 \n\t" - "paddb %%mm5, %%mm4 \n\t" - "movq 24(%%edi,%%ebx,), %%mm6 \n\t" - "movq %%mm4, 16(%%edi,%%ebx,) \n\t" - "paddb %%mm7, %%mm6 \n\t" - "movq 32(%%esi,%%ebx,), %%mm1 \n\t" - "movq %%mm6, 24(%%edi,%%ebx,) \n\t" - "movq 32(%%edi,%%ebx,), %%mm0 \n\t" - "movq 40(%%esi,%%ebx,), %%mm3 \n\t" - "paddb %%mm1, %%mm0 \n\t" - "movq 40(%%edi,%%ebx,), %%mm2 \n\t" - "movq %%mm0, 32(%%edi,%%ebx,) \n\t" - "paddb %%mm3, %%mm2 \n\t" - "movq 48(%%esi,%%ebx,), %%mm5 \n\t" - "movq %%mm2, 40(%%edi,%%ebx,) \n\t" - "movq 48(%%edi,%%ebx,), %%mm4 \n\t" - "movq 56(%%esi,%%ebx,), %%mm7 \n\t" - "paddb %%mm5, %%mm4 \n\t" - "movq 56(%%edi,%%ebx,), %%mm6 \n\t" - "movq %%mm4, 48(%%edi,%%ebx,) \n\t" - "addl $64, %%ebx \n\t" - "paddb %%mm7, %%mm6 \n\t" - "cmpl %%ecx, %%ebx \n\t" - "movq %%mm6, -8(%%edi,%%ebx,) \n\t" // (+56)movq does not affect flags; - "jb up_loop \n\t" // -8 to offset addl ebx - - "cmpl $0, %%edx \n\t" // test for bytes over mult of 64 - "jz up_end \n\t" - - "cmpl $8, %%edx \n\t" // test for less than 8 bytes - "jb up_lt8 \n\t" // [added by lcreeve@netins.net] - - "addl %%edx, %%ecx \n\t" - "andl $0x00000007, %%edx \n\t" // calc bytes over mult of 8 - "subl %%edx, %%ecx \n\t" // drop over bytes from length - "jz up_lt8 \n\t" - - "up_lpA: \n\t" // use MMX regs to update 8 bytes sim. - "movq (%%esi,%%ebx,), %%mm1 \n\t" - "movq (%%edi,%%ebx,), %%mm0 \n\t" - "addl $8, %%ebx \n\t" - "paddb %%mm1, %%mm0 \n\t" - "cmpl %%ecx, %%ebx \n\t" - "movq %%mm0, -8(%%edi,%%ebx,) \n\t" // movq does not affect flags; -8 to - "jb up_lpA \n\t" // offset add ebx - "cmpl $0, %%edx \n\t" // test for bytes over mult of 8 - "jz up_end \n\t" - - "up_lt8: \n\t" - "xorl %%eax, %%eax \n\t" - "addl %%edx, %%ecx \n\t" // move over byte count into counter - - "up_lp2: \n\t" // use x86 regs for remaining bytes - "movb (%%edi,%%ebx,), %%al \n\t" - "addb (%%esi,%%ebx,), %%al \n\t" - "incl %%ebx \n\t" - "cmpl %%ecx, %%ebx \n\t" - "movb %%al, -1(%%edi,%%ebx,) \n\t" // mov does not affect flags; -1 to - "jb up_lp2 \n\t" // offset inc ebx - - "up_end: \n\t" - "EMMS \n\t" // conversion of filtered row complete -#ifdef __PIC__ - "popl %%ebx \n\t" -#endif - - : "=d" (dummy_value_d), // 0 // output regs (dummy) - "=S" (dummy_value_S), // 1 - "=D" (dummy_value_D) // 2 - - : "0" (len), // edx // input regs - "1" (prev_row), // esi - "2" (row) // edi - - : "%eax", "%ebx", "%ecx" // clobber list (no input regs!) - -#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */ - , "%mm0", "%mm1", "%mm2", "%mm3" - , "%mm4", "%mm5", "%mm6", "%mm7" -#endif - ); - -} // end of png_read_filter_row_mmx_up() - -#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ - - - - -/*===========================================================================*/ -/* */ -/* P N G _ R E A D _ F I L T E R _ R O W */ -/* */ -/*===========================================================================*/ - - -/* Optimized png_read_filter_row routines */ - -void /* PRIVATE */ -png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep - row, png_bytep prev_row, int filter) -{ -#ifdef PNG_DEBUG - char filnm[10]; -#endif - -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) -/* GRR: these are superseded by png_ptr->asm_flags: */ -#define UseMMX_sub 1 // GRR: converted 20000730 -#define UseMMX_up 1 // GRR: converted 20000729 -#define UseMMX_avg 1 // GRR: converted 20000828 (+ 16-bit bugfix 20000916) -#define UseMMX_paeth 1 // GRR: converted 20000828 - - if (_mmx_supported == 2) { - /* this should have happened in png_init_mmx_flags() already */ -#if !defined(PNG_1_0_X) - png_warning(png_ptr, "asm_flags may not have been initialized"); -#endif - png_mmx_support(); - } -#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ - -#ifdef PNG_DEBUG - png_debug(1, "in png_read_filter_row (pnggccrd.c)\n"); - switch (filter) - { - case 0: sprintf(filnm, "none"); - break; - case 1: sprintf(filnm, "sub-%s", -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) -#if !defined(PNG_1_0_X) - (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "MMX" : -#endif -#endif -"x86"); - break; - case 2: sprintf(filnm, "up-%s", -#ifdef PNG_ASSEMBLER_CODE_SUPPORTED -#if !defined(PNG_1_0_X) - (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP)? "MMX" : -#endif -#endif - "x86"); - break; - case 3: sprintf(filnm, "avg-%s", -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) -#if !defined(PNG_1_0_X) - (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)? "MMX" : -#endif -#endif - "x86"); - break; - case 4: sprintf(filnm, "Paeth-%s", -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) -#if !defined(PNG_1_0_X) - (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)? "MMX": -#endif -#endif -"x86"); - break; - default: sprintf(filnm, "unknw"); - break; - } - png_debug2(0, "row_number=%5ld, %5s, ", png_ptr->row_number, filnm); - png_debug1(0, "row=0x%08lx, ", (unsigned long)row); - png_debug2(0, "pixdepth=%2d, bytes=%d, ", (int)row_info->pixel_depth, - (int)((row_info->pixel_depth + 7) >> 3)); - png_debug1(0,"rowbytes=%8ld\n", row_info->rowbytes); -#endif /* PNG_DEBUG */ - - switch (filter) - { - case PNG_FILTER_VALUE_NONE: - break; - - case PNG_FILTER_VALUE_SUB: -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) -#if !defined(PNG_1_0_X) - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB) && - (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) && - (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold)) -#else - if (_mmx_supported) -#endif - { - png_read_filter_row_mmx_sub(row_info, row); - } - else -#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ - { - png_uint_32 i; - png_uint_32 istop = row_info->rowbytes; - png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; - png_bytep rp = row + bpp; - png_bytep lp = row; - - for (i = bpp; i < istop; i++) - { - *rp = (png_byte)(((int)(*rp) + (int)(*lp++)) & 0xff); - rp++; - } - } /* end !UseMMX_sub */ - break; - - case PNG_FILTER_VALUE_UP: -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) -#if !defined(PNG_1_0_X) - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP) && - (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) && - (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold)) -#else - if (_mmx_supported) -#endif - { - png_read_filter_row_mmx_up(row_info, row, prev_row); - } - else -#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ - { - png_uint_32 i; - png_uint_32 istop = row_info->rowbytes; - png_bytep rp = row; - png_bytep pp = prev_row; - - for (i = 0; i < istop; ++i) - { - *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff); - rp++; - } - } /* end !UseMMX_up */ - break; - - case PNG_FILTER_VALUE_AVG: -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) -#if !defined(PNG_1_0_X) - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG) && - (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) && - (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold)) -#else - if (_mmx_supported) -#endif - { - png_read_filter_row_mmx_avg(row_info, row, prev_row); - } - else -#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ - { - png_uint_32 i; - png_bytep rp = row; - png_bytep pp = prev_row; - png_bytep lp = row; - png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; - png_uint_32 istop = row_info->rowbytes - bpp; - - for (i = 0; i < bpp; i++) - { - *rp = (png_byte)(((int)(*rp) + - ((int)(*pp++) >> 1)) & 0xff); - rp++; - } - - for (i = 0; i < istop; i++) - { - *rp = (png_byte)(((int)(*rp) + - ((int)(*pp++ + *lp++) >> 1)) & 0xff); - rp++; - } - } /* end !UseMMX_avg */ - break; - - case PNG_FILTER_VALUE_PAETH: -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK) -#if !defined(PNG_1_0_X) - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH) && - (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) && - (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold)) -#else - if (_mmx_supported) -#endif - { - png_read_filter_row_mmx_paeth(row_info, row, prev_row); - } - else -#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ - { - png_uint_32 i; - png_bytep rp = row; - png_bytep pp = prev_row; - png_bytep lp = row; - png_bytep cp = prev_row; - png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; - png_uint_32 istop = row_info->rowbytes - bpp; - - for (i = 0; i < bpp; i++) - { - *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff); - rp++; - } - - for (i = 0; i < istop; i++) /* use leftover rp,pp */ - { - int a, b, c, pa, pb, pc, p; - - a = *lp++; - b = *pp++; - c = *cp++; - - p = b - c; - pc = a - c; - -#ifdef PNG_USE_ABS - pa = abs(p); - pb = abs(pc); - pc = abs(p + pc); -#else - pa = p < 0 ? -p : p; - pb = pc < 0 ? -pc : pc; - pc = (p + pc) < 0 ? -(p + pc) : p + pc; -#endif - - /* - if (pa <= pb && pa <= pc) - p = a; - else if (pb <= pc) - p = b; - else - p = c; - */ - - p = (pa <= pb && pa <= pc) ? a : (pb <= pc) ? b : c; - - *rp = (png_byte)(((int)(*rp) + p) & 0xff); - rp++; - } - } /* end !UseMMX_paeth */ - break; - - default: - png_warning(png_ptr, "Ignoring bad row-filter type"); - *row=0; - break; - } -} - -#endif /* PNG_HAVE_ASSEMBLER_READ_FILTER_ROW */ - - -/*===========================================================================*/ -/* */ -/* P N G _ M M X _ S U P P O R T */ -/* */ -/*===========================================================================*/ - -/* GRR NOTES: (1) the following code assumes 386 or better (pushfl/popfl) - * (2) all instructions compile with gcc 2.7.2.3 and later - * (3) the function is moved down here to prevent gcc from - * inlining it in multiple places and then barfing be- - * cause the ".NOT_SUPPORTED" label is multiply defined - * [is there a way to signal that a *single* function should - * not be inlined? is there a way to modify the label for - * each inlined instance, e.g., by appending _1, _2, etc.? - * maybe if don't use leading "." in label name? (nope...sigh)] - */ - -int PNGAPI -png_mmx_support(void) -{ -#if defined(PNG_MMX_CODE_SUPPORTED) - __asm__ __volatile__ ( - "pushl %%ebx \n\t" // ebx gets clobbered by CPUID instruction - "pushl %%ecx \n\t" // so does ecx... - "pushl %%edx \n\t" // ...and edx (but ecx & edx safe on Linux) -// ".byte 0x66 \n\t" // convert 16-bit pushf to 32-bit pushfd -// "pushf \n\t" // 16-bit pushf - "pushfl \n\t" // save Eflag to stack - "popl %%eax \n\t" // get Eflag from stack into eax - "movl %%eax, %%ecx \n\t" // make another copy of Eflag in ecx - "xorl $0x200000, %%eax \n\t" // toggle ID bit in Eflag (i.e., bit 21) - "pushl %%eax \n\t" // save modified Eflag back to stack -// ".byte 0x66 \n\t" // convert 16-bit popf to 32-bit popfd -// "popf \n\t" // 16-bit popf - "popfl \n\t" // restore modified value to Eflag reg - "pushfl \n\t" // save Eflag to stack - "popl %%eax \n\t" // get Eflag from stack - "pushl %%ecx \n\t" // save original Eflag to stack - "popfl \n\t" // restore original Eflag - "xorl %%ecx, %%eax \n\t" // compare new Eflag with original Eflag - "jz 0f \n\t" // if same, CPUID instr. is not supported - - "xorl %%eax, %%eax \n\t" // set eax to zero -// ".byte 0x0f, 0xa2 \n\t" // CPUID instruction (two-byte opcode) - "cpuid \n\t" // get the CPU identification info - "cmpl $1, %%eax \n\t" // make sure eax return non-zero value - "jl 0f \n\t" // if eax is zero, MMX is not supported - - "xorl %%eax, %%eax \n\t" // set eax to zero and... - "incl %%eax \n\t" // ...increment eax to 1. This pair is - // faster than the instruction "mov eax, 1" - "cpuid \n\t" // get the CPU identification info again - "andl $0x800000, %%edx \n\t" // mask out all bits but MMX bit (23) - "cmpl $0, %%edx \n\t" // 0 = MMX not supported - "jz 0f \n\t" // non-zero = yes, MMX IS supported - - "movl $1, %%eax \n\t" // set return value to 1 - "jmp 1f \n\t" // DONE: have MMX support - - "0: \n\t" // .NOT_SUPPORTED: target label for jump instructions - "movl $0, %%eax \n\t" // set return value to 0 - "1: \n\t" // .RETURN: target label for jump instructions - "movl %%eax, _mmx_supported \n\t" // save in global static variable, too - "popl %%edx \n\t" // restore edx - "popl %%ecx \n\t" // restore ecx - "popl %%ebx \n\t" // restore ebx - -// "ret \n\t" // DONE: no MMX support - // (fall through to standard C "ret") - - : // output list (none) - - : // any variables used on input (none) - - : "%eax" // clobber list -// , "%ebx", "%ecx", "%edx" // GRR: we handle these manually -// , "memory" // if write to a variable gcc thought was in a reg -// , "cc" // "condition codes" (flag bits) - ); -#else - _mmx_supported = 0; -#endif /* PNG_MMX_CODE_SUPPORTED */ - - return _mmx_supported; -} - - -#endif /* PNG_USE_PNGGCCRD */ diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngget.c b/gtkmm-osx/trunk/libpng-1.2.5/pngget.c deleted file mode 100644 index f7f5c67..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/pngget.c +++ /dev/null @@ -1,927 +0,0 @@ - -/* pngget.c - retrieval of values from info struct - * - * libpng 1.2.5 - October 3, 2002 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2002 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) - */ - -#define PNG_INTERNAL -#include "png.h" - -png_uint_32 PNGAPI -png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag) -{ - if (png_ptr != NULL && info_ptr != NULL) - return(info_ptr->valid & flag); - else - return(0); -} - -png_uint_32 PNGAPI -png_get_rowbytes(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - return(info_ptr->rowbytes); - else - return(0); -} - -#if defined(PNG_INFO_IMAGE_SUPPORTED) -png_bytepp PNGAPI -png_get_rows(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - return(info_ptr->row_pointers); - else - return(0); -} -#endif - -#ifdef PNG_EASY_ACCESS_SUPPORTED -/* easy access to info, added in libpng-0.99 */ -png_uint_32 PNGAPI -png_get_image_width(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - { - return info_ptr->width; - } - return (0); -} - -png_uint_32 PNGAPI -png_get_image_height(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - { - return info_ptr->height; - } - return (0); -} - -png_byte PNGAPI -png_get_bit_depth(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - { - return info_ptr->bit_depth; - } - return (0); -} - -png_byte PNGAPI -png_get_color_type(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - { - return info_ptr->color_type; - } - return (0); -} - -png_byte PNGAPI -png_get_filter_type(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - { - return info_ptr->filter_type; - } - return (0); -} - -png_byte PNGAPI -png_get_interlace_type(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - { - return info_ptr->interlace_type; - } - return (0); -} - -png_byte PNGAPI -png_get_compression_type(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - { - return info_ptr->compression_type; - } - return (0); -} - -png_uint_32 PNGAPI -png_get_x_pixels_per_meter(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) -#if defined(PNG_pHYs_SUPPORTED) - if (info_ptr->valid & PNG_INFO_pHYs) - { - png_debug1(1, "in %s retrieval function\n", "png_get_x_pixels_per_meter"); - if(info_ptr->phys_unit_type != PNG_RESOLUTION_METER) - return (0); - else return (info_ptr->x_pixels_per_unit); - } -#else - return (0); -#endif - return (0); -} - -png_uint_32 PNGAPI -png_get_y_pixels_per_meter(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) -#if defined(PNG_pHYs_SUPPORTED) - if (info_ptr->valid & PNG_INFO_pHYs) - { - png_debug1(1, "in %s retrieval function\n", "png_get_y_pixels_per_meter"); - if(info_ptr->phys_unit_type != PNG_RESOLUTION_METER) - return (0); - else return (info_ptr->y_pixels_per_unit); - } -#else - return (0); -#endif - return (0); -} - -png_uint_32 PNGAPI -png_get_pixels_per_meter(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) -#if defined(PNG_pHYs_SUPPORTED) - if (info_ptr->valid & PNG_INFO_pHYs) - { - png_debug1(1, "in %s retrieval function\n", "png_get_pixels_per_meter"); - if(info_ptr->phys_unit_type != PNG_RESOLUTION_METER || - info_ptr->x_pixels_per_unit != info_ptr->y_pixels_per_unit) - return (0); - else return (info_ptr->x_pixels_per_unit); - } -#else - return (0); -#endif - return (0); -} - -#ifdef PNG_FLOATING_POINT_SUPPORTED -float PNGAPI -png_get_pixel_aspect_ratio(png_structp png_ptr, png_infop info_ptr) - { - if (png_ptr != NULL && info_ptr != NULL) -#if defined(PNG_pHYs_SUPPORTED) - if (info_ptr->valid & PNG_INFO_pHYs) - { - png_debug1(1, "in %s retrieval function\n", "png_get_aspect_ratio"); - if (info_ptr->x_pixels_per_unit == 0) - return ((float)0.0); - else - return ((float)((float)info_ptr->y_pixels_per_unit - /(float)info_ptr->x_pixels_per_unit)); - } -#else - return (0.0); -#endif - return ((float)0.0); -} -#endif - -png_int_32 PNGAPI -png_get_x_offset_microns(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) -#if defined(PNG_oFFs_SUPPORTED) - if (info_ptr->valid & PNG_INFO_oFFs) - { - png_debug1(1, "in %s retrieval function\n", "png_get_x_offset_microns"); - if(info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER) - return (0); - else return (info_ptr->x_offset); - } -#else - return (0); -#endif - return (0); -} - -png_int_32 PNGAPI -png_get_y_offset_microns(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) -#if defined(PNG_oFFs_SUPPORTED) - if (info_ptr->valid & PNG_INFO_oFFs) - { - png_debug1(1, "in %s retrieval function\n", "png_get_y_offset_microns"); - if(info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER) - return (0); - else return (info_ptr->y_offset); - } -#else - return (0); -#endif - return (0); -} - -png_int_32 PNGAPI -png_get_x_offset_pixels(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) -#if defined(PNG_oFFs_SUPPORTED) - if (info_ptr->valid & PNG_INFO_oFFs) - { - png_debug1(1, "in %s retrieval function\n", "png_get_x_offset_microns"); - if(info_ptr->offset_unit_type != PNG_OFFSET_PIXEL) - return (0); - else return (info_ptr->x_offset); - } -#else - return (0); -#endif - return (0); -} - -png_int_32 PNGAPI -png_get_y_offset_pixels(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) -#if defined(PNG_oFFs_SUPPORTED) - if (info_ptr->valid & PNG_INFO_oFFs) - { - png_debug1(1, "in %s retrieval function\n", "png_get_y_offset_microns"); - if(info_ptr->offset_unit_type != PNG_OFFSET_PIXEL) - return (0); - else return (info_ptr->y_offset); - } -#else - return (0); -#endif - return (0); -} - -#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED) -png_uint_32 PNGAPI -png_get_pixels_per_inch(png_structp png_ptr, png_infop info_ptr) -{ - return ((png_uint_32)((float)png_get_pixels_per_meter(png_ptr, info_ptr) - *.0254 +.5)); -} - -png_uint_32 PNGAPI -png_get_x_pixels_per_inch(png_structp png_ptr, png_infop info_ptr) -{ - return ((png_uint_32)((float)png_get_x_pixels_per_meter(png_ptr, info_ptr) - *.0254 +.5)); -} - -png_uint_32 PNGAPI -png_get_y_pixels_per_inch(png_structp png_ptr, png_infop info_ptr) -{ - return ((png_uint_32)((float)png_get_y_pixels_per_meter(png_ptr, info_ptr) - *.0254 +.5)); -} - -float PNGAPI -png_get_x_offset_inches(png_structp png_ptr, png_infop info_ptr) -{ - return ((float)png_get_x_offset_microns(png_ptr, info_ptr) - *.00003937); -} - -float PNGAPI -png_get_y_offset_inches(png_structp png_ptr, png_infop info_ptr) -{ - return ((float)png_get_y_offset_microns(png_ptr, info_ptr) - *.00003937); -} - -#if defined(PNG_pHYs_SUPPORTED) -png_uint_32 PNGAPI -png_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr, - png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type) -{ - png_uint_32 retval = 0; - - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) - { - png_debug1(1, "in %s retrieval function\n", "pHYs"); - if (res_x != NULL) - { - *res_x = info_ptr->x_pixels_per_unit; - retval |= PNG_INFO_pHYs; - } - if (res_y != NULL) - { - *res_y = info_ptr->y_pixels_per_unit; - retval |= PNG_INFO_pHYs; - } - if (unit_type != NULL) - { - *unit_type = (int)info_ptr->phys_unit_type; - retval |= PNG_INFO_pHYs; - if(*unit_type == 1) - { - if (res_x != NULL) *res_x = (png_uint_32)(*res_x * .0254 + .50); - if (res_y != NULL) *res_y = (png_uint_32)(*res_y * .0254 + .50); - } - } - } - return (retval); -} -#endif /* PNG_pHYs_SUPPORTED */ -#endif /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */ - -/* png_get_channels really belongs in here, too, but it's been around longer */ - -#endif /* PNG_EASY_ACCESS_SUPPORTED */ - -png_byte PNGAPI -png_get_channels(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - return(info_ptr->channels); - else - return (0); -} - -png_bytep PNGAPI -png_get_signature(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr != NULL && info_ptr != NULL) - return(info_ptr->signature); - else - return (NULL); -} - -#if defined(PNG_bKGD_SUPPORTED) -png_uint_32 PNGAPI -png_get_bKGD(png_structp png_ptr, png_infop info_ptr, - png_color_16p *background) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD) - && background != NULL) - { - png_debug1(1, "in %s retrieval function\n", "bKGD"); - *background = &(info_ptr->background); - return (PNG_INFO_bKGD); - } - return (0); -} -#endif - -#if defined(PNG_cHRM_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED -png_uint_32 PNGAPI -png_get_cHRM(png_structp png_ptr, png_infop info_ptr, - double *white_x, double *white_y, double *red_x, double *red_y, - double *green_x, double *green_y, double *blue_x, double *blue_y) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM)) - { - png_debug1(1, "in %s retrieval function\n", "cHRM"); - if (white_x != NULL) - *white_x = (double)info_ptr->x_white; - if (white_y != NULL) - *white_y = (double)info_ptr->y_white; - if (red_x != NULL) - *red_x = (double)info_ptr->x_red; - if (red_y != NULL) - *red_y = (double)info_ptr->y_red; - if (green_x != NULL) - *green_x = (double)info_ptr->x_green; - if (green_y != NULL) - *green_y = (double)info_ptr->y_green; - if (blue_x != NULL) - *blue_x = (double)info_ptr->x_blue; - if (blue_y != NULL) - *blue_y = (double)info_ptr->y_blue; - return (PNG_INFO_cHRM); - } - return (0); -} -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED -png_uint_32 PNGAPI -png_get_cHRM_fixed(png_structp png_ptr, png_infop info_ptr, - png_fixed_point *white_x, png_fixed_point *white_y, png_fixed_point *red_x, - png_fixed_point *red_y, png_fixed_point *green_x, png_fixed_point *green_y, - png_fixed_point *blue_x, png_fixed_point *blue_y) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM)) - { - png_debug1(1, "in %s retrieval function\n", "cHRM"); - if (white_x != NULL) - *white_x = info_ptr->int_x_white; - if (white_y != NULL) - *white_y = info_ptr->int_y_white; - if (red_x != NULL) - *red_x = info_ptr->int_x_red; - if (red_y != NULL) - *red_y = info_ptr->int_y_red; - if (green_x != NULL) - *green_x = info_ptr->int_x_green; - if (green_y != NULL) - *green_y = info_ptr->int_y_green; - if (blue_x != NULL) - *blue_x = info_ptr->int_x_blue; - if (blue_y != NULL) - *blue_y = info_ptr->int_y_blue; - return (PNG_INFO_cHRM); - } - return (0); -} -#endif -#endif - -#if defined(PNG_gAMA_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED -png_uint_32 PNGAPI -png_get_gAMA(png_structp png_ptr, png_infop info_ptr, double *file_gamma) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA) - && file_gamma != NULL) - { - png_debug1(1, "in %s retrieval function\n", "gAMA"); - *file_gamma = (double)info_ptr->gamma; - return (PNG_INFO_gAMA); - } - return (0); -} -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED -png_uint_32 PNGAPI -png_get_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, - png_fixed_point *int_file_gamma) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA) - && int_file_gamma != NULL) - { - png_debug1(1, "in %s retrieval function\n", "gAMA"); - *int_file_gamma = info_ptr->int_gamma; - return (PNG_INFO_gAMA); - } - return (0); -} -#endif -#endif - -#if defined(PNG_sRGB_SUPPORTED) -png_uint_32 PNGAPI -png_get_sRGB(png_structp png_ptr, png_infop info_ptr, int *file_srgb_intent) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB) - && file_srgb_intent != NULL) - { - png_debug1(1, "in %s retrieval function\n", "sRGB"); - *file_srgb_intent = (int)info_ptr->srgb_intent; - return (PNG_INFO_sRGB); - } - return (0); -} -#endif - -#if defined(PNG_iCCP_SUPPORTED) -png_uint_32 PNGAPI -png_get_iCCP(png_structp png_ptr, png_infop info_ptr, - png_charpp name, int *compression_type, - png_charpp profile, png_uint_32 *proflen) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP) - && name != NULL && profile != NULL && proflen != NULL) - { - png_debug1(1, "in %s retrieval function\n", "iCCP"); - *name = info_ptr->iccp_name; - *profile = info_ptr->iccp_profile; - /* compression_type is a dummy so the API won't have to change - if we introduce multiple compression types later. */ - *proflen = (int)info_ptr->iccp_proflen; - *compression_type = (int)info_ptr->iccp_compression; - return (PNG_INFO_iCCP); - } - return (0); -} -#endif - -#if defined(PNG_sPLT_SUPPORTED) -png_uint_32 PNGAPI -png_get_sPLT(png_structp png_ptr, png_infop info_ptr, - png_sPLT_tpp spalettes) -{ - if (png_ptr != NULL && info_ptr != NULL && spalettes != NULL) - *spalettes = info_ptr->splt_palettes; - return ((png_uint_32)info_ptr->splt_palettes_num); -} -#endif - -#if defined(PNG_hIST_SUPPORTED) -png_uint_32 PNGAPI -png_get_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST) - && hist != NULL) - { - png_debug1(1, "in %s retrieval function\n", "hIST"); - *hist = info_ptr->hist; - return (PNG_INFO_hIST); - } - return (0); -} -#endif - -png_uint_32 PNGAPI -png_get_IHDR(png_structp png_ptr, png_infop info_ptr, - png_uint_32 *width, png_uint_32 *height, int *bit_depth, - int *color_type, int *interlace_type, int *compression_type, - int *filter_type) - -{ - if (png_ptr != NULL && info_ptr != NULL && width != NULL && height != NULL && - bit_depth != NULL && color_type != NULL) - { - int pixel_depth, channels; - png_uint_32 rowbytes_per_pixel; - - png_debug1(1, "in %s retrieval function\n", "IHDR"); - *width = info_ptr->width; - *height = info_ptr->height; - *bit_depth = info_ptr->bit_depth; - if (info_ptr->bit_depth < 1 || info_ptr->bit_depth > 16) - png_error(png_ptr, "Invalid bit depth"); - *color_type = info_ptr->color_type; - if (info_ptr->color_type > 6) - png_error(png_ptr, "Invalid color type"); - if (compression_type != NULL) - *compression_type = info_ptr->compression_type; - if (filter_type != NULL) - *filter_type = info_ptr->filter_type; - if (interlace_type != NULL) - *interlace_type = info_ptr->interlace_type; - - /* check for potential overflow of rowbytes */ - if (*color_type == PNG_COLOR_TYPE_PALETTE) - channels = 1; - else if (*color_type & PNG_COLOR_MASK_COLOR) - channels = 3; - else - channels = 1; - if (*color_type & PNG_COLOR_MASK_ALPHA) - channels++; - pixel_depth = *bit_depth * channels; - rowbytes_per_pixel = (pixel_depth + 7) >> 3; - if (width == 0 || *width > PNG_MAX_UINT) - png_error(png_ptr, "Invalid image width"); - if (height == 0 || *height > PNG_MAX_UINT) - png_error(png_ptr, "Invalid image height"); - if (*width > PNG_MAX_UINT/rowbytes_per_pixel - 64) - { - png_error(png_ptr, - "Width too large for libpng to process image data."); - } - return (1); - } - return (0); -} - -#if defined(PNG_oFFs_SUPPORTED) -png_uint_32 PNGAPI -png_get_oFFs(png_structp png_ptr, png_infop info_ptr, - png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs) - && offset_x != NULL && offset_y != NULL && unit_type != NULL) - { - png_debug1(1, "in %s retrieval function\n", "oFFs"); - *offset_x = info_ptr->x_offset; - *offset_y = info_ptr->y_offset; - *unit_type = (int)info_ptr->offset_unit_type; - return (PNG_INFO_oFFs); - } - return (0); -} -#endif - -#if defined(PNG_pCAL_SUPPORTED) -png_uint_32 PNGAPI -png_get_pCAL(png_structp png_ptr, png_infop info_ptr, - png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams, - png_charp *units, png_charpp *params) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL) - && purpose != NULL && X0 != NULL && X1 != NULL && type != NULL && - nparams != NULL && units != NULL && params != NULL) - { - png_debug1(1, "in %s retrieval function\n", "pCAL"); - *purpose = info_ptr->pcal_purpose; - *X0 = info_ptr->pcal_X0; - *X1 = info_ptr->pcal_X1; - *type = (int)info_ptr->pcal_type; - *nparams = (int)info_ptr->pcal_nparams; - *units = info_ptr->pcal_units; - *params = info_ptr->pcal_params; - return (PNG_INFO_pCAL); - } - return (0); -} -#endif - -#if defined(PNG_sCAL_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED -png_uint_32 PNGAPI -png_get_sCAL(png_structp png_ptr, png_infop info_ptr, - int *unit, double *width, double *height) -{ - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->valid & PNG_INFO_sCAL)) - { - *unit = info_ptr->scal_unit; - *width = info_ptr->scal_pixel_width; - *height = info_ptr->scal_pixel_height; - return (PNG_INFO_sCAL); - } - return(0); -} -#else -#ifdef PNG_FIXED_POINT_SUPPORTED -png_uint_32 PNGAPI -png_get_sCAL_s(png_structp png_ptr, png_infop info_ptr, - int *unit, png_charpp width, png_charpp height) -{ - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->valid & PNG_INFO_sCAL)) - { - *unit = info_ptr->scal_unit; - *width = info_ptr->scal_s_width; - *height = info_ptr->scal_s_height; - return (PNG_INFO_sCAL); - } - return(0); -} -#endif -#endif -#endif - -#if defined(PNG_pHYs_SUPPORTED) -png_uint_32 PNGAPI -png_get_pHYs(png_structp png_ptr, png_infop info_ptr, - png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type) -{ - png_uint_32 retval = 0; - - if (png_ptr != NULL && info_ptr != NULL && - (info_ptr->valid & PNG_INFO_pHYs)) - { - png_debug1(1, "in %s retrieval function\n", "pHYs"); - if (res_x != NULL) - { - *res_x = info_ptr->x_pixels_per_unit; - retval |= PNG_INFO_pHYs; - } - if (res_y != NULL) - { - *res_y = info_ptr->y_pixels_per_unit; - retval |= PNG_INFO_pHYs; - } - if (unit_type != NULL) - { - *unit_type = (int)info_ptr->phys_unit_type; - retval |= PNG_INFO_pHYs; - } - } - return (retval); -} -#endif - -png_uint_32 PNGAPI -png_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette, - int *num_palette) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_PLTE) - && palette != NULL) - { - png_debug1(1, "in %s retrieval function\n", "PLTE"); - *palette = info_ptr->palette; - *num_palette = info_ptr->num_palette; - png_debug1(3, "num_palette = %d\n", *num_palette); - return (PNG_INFO_PLTE); - } - return (0); -} - -#if defined(PNG_sBIT_SUPPORTED) -png_uint_32 PNGAPI -png_get_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT) - && sig_bit != NULL) - { - png_debug1(1, "in %s retrieval function\n", "sBIT"); - *sig_bit = &(info_ptr->sig_bit); - return (PNG_INFO_sBIT); - } - return (0); -} -#endif - -#if defined(PNG_TEXT_SUPPORTED) -png_uint_32 PNGAPI -png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr, - int *num_text) -{ - if (png_ptr != NULL && info_ptr != NULL && info_ptr->num_text > 0) - { - png_debug1(1, "in %s retrieval function\n", - (png_ptr->chunk_name[0] == '\0' ? "text" - : (png_const_charp)png_ptr->chunk_name)); - if (text_ptr != NULL) - *text_ptr = info_ptr->text; - if (num_text != NULL) - *num_text = info_ptr->num_text; - return ((png_uint_32)info_ptr->num_text); - } - if (num_text != NULL) - *num_text = 0; - return(0); -} -#endif - -#if defined(PNG_tIME_SUPPORTED) -png_uint_32 PNGAPI -png_get_tIME(png_structp png_ptr, png_infop info_ptr, png_timep *mod_time) -{ - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME) - && mod_time != NULL) - { - png_debug1(1, "in %s retrieval function\n", "tIME"); - *mod_time = &(info_ptr->mod_time); - return (PNG_INFO_tIME); - } - return (0); -} -#endif - -#if defined(PNG_tRNS_SUPPORTED) -png_uint_32 PNGAPI -png_get_tRNS(png_structp png_ptr, png_infop info_ptr, - png_bytep *trans, int *num_trans, png_color_16p *trans_values) -{ - png_uint_32 retval = 0; - if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS)) - { - png_debug1(1, "in %s retrieval function\n", "tRNS"); - if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - if (trans != NULL) - { - *trans = info_ptr->trans; - retval |= PNG_INFO_tRNS; - } - if (trans_values != NULL) - *trans_values = &(info_ptr->trans_values); - } - else /* if (info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) */ - { - if (trans_values != NULL) - { - *trans_values = &(info_ptr->trans_values); - retval |= PNG_INFO_tRNS; - } - if(trans != NULL) - *trans = NULL; - } - if(num_trans != NULL) - { - *num_trans = info_ptr->num_trans; - retval |= PNG_INFO_tRNS; - } - } - return (retval); -} -#endif - -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) -png_uint_32 PNGAPI -png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr, - png_unknown_chunkpp unknowns) -{ - if (png_ptr != NULL && info_ptr != NULL && unknowns != NULL) - *unknowns = info_ptr->unknown_chunks; - return ((png_uint_32)info_ptr->unknown_chunks_num); -} -#endif - -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) -png_byte PNGAPI -png_get_rgb_to_gray_status (png_structp png_ptr) -{ - return (png_byte)(png_ptr? png_ptr->rgb_to_gray_status : 0); -} -#endif - -#if defined(PNG_USER_CHUNKS_SUPPORTED) -png_voidp PNGAPI -png_get_user_chunk_ptr(png_structp png_ptr) -{ - return (png_ptr? png_ptr->user_chunk_ptr : NULL); -} -#endif - - -png_uint_32 PNGAPI -png_get_compression_buffer_size(png_structp png_ptr) -{ - return (png_uint_32)(png_ptr? png_ptr->zbuf_size : 0L); -} - - -#ifndef PNG_1_0_X -#ifdef PNG_ASSEMBLER_CODE_SUPPORTED -/* this function was added to libpng 1.2.0 and should exist by default */ -png_uint_32 PNGAPI -png_get_asm_flags (png_structp png_ptr) -{ - return (png_uint_32)(png_ptr? png_ptr->asm_flags : 0L); -} - -/* this function was added to libpng 1.2.0 and should exist by default */ -png_uint_32 PNGAPI -png_get_asm_flagmask (int flag_select) -{ - png_uint_32 settable_asm_flags = 0; - - if (flag_select & PNG_SELECT_READ) - settable_asm_flags |= - PNG_ASM_FLAG_MMX_READ_COMBINE_ROW | - PNG_ASM_FLAG_MMX_READ_INTERLACE | - PNG_ASM_FLAG_MMX_READ_FILTER_SUB | - PNG_ASM_FLAG_MMX_READ_FILTER_UP | - PNG_ASM_FLAG_MMX_READ_FILTER_AVG | - PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ; - /* no non-MMX flags yet */ - -#if 0 - /* GRR: no write-flags yet, either, but someday... */ - if (flag_select & PNG_SELECT_WRITE) - settable_asm_flags |= - PNG_ASM_FLAG_MMX_WRITE_ [whatever] ; -#endif /* 0 */ - - return settable_asm_flags; /* _theoretically_ settable capabilities only */ -} -#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ - - -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) - /* GRR: could add this: && defined(PNG_MMX_CODE_SUPPORTED) */ -/* this function was added to libpng 1.2.0 */ -png_uint_32 PNGAPI -png_get_mmx_flagmask (int flag_select, int *compilerID) -{ - png_uint_32 settable_mmx_flags = 0; - - if (flag_select & PNG_SELECT_READ) - settable_mmx_flags |= - PNG_ASM_FLAG_MMX_READ_COMBINE_ROW | - PNG_ASM_FLAG_MMX_READ_INTERLACE | - PNG_ASM_FLAG_MMX_READ_FILTER_SUB | - PNG_ASM_FLAG_MMX_READ_FILTER_UP | - PNG_ASM_FLAG_MMX_READ_FILTER_AVG | - PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ; -#if 0 - /* GRR: no MMX write support yet, but someday... */ - if (flag_select & PNG_SELECT_WRITE) - settable_mmx_flags |= - PNG_ASM_FLAG_MMX_WRITE_ [whatever] ; -#endif /* 0 */ - - if (compilerID != NULL) { -#ifdef PNG_USE_PNGVCRD - *compilerID = 1; /* MSVC */ -#else -#ifdef PNG_USE_PNGGCCRD - *compilerID = 2; /* gcc/gas */ -#else - *compilerID = -1; /* unknown (i.e., no asm/MMX code compiled) */ -#endif -#endif - } - - return settable_mmx_flags; /* _theoretically_ settable capabilities only */ -} - -/* this function was added to libpng 1.2.0 */ -png_byte PNGAPI -png_get_mmx_bitdepth_threshold (png_structp png_ptr) -{ - return (png_byte)(png_ptr? png_ptr->mmx_bitdepth_threshold : 0); -} - -/* this function was added to libpng 1.2.0 */ -png_uint_32 PNGAPI -png_get_mmx_rowbytes_threshold (png_structp png_ptr) -{ - return (png_uint_32)(png_ptr? png_ptr->mmx_rowbytes_threshold : 0L); -} -#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */ -#endif /* PNG_1_0_X */ diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngmem.c b/gtkmm-osx/trunk/libpng-1.2.5/pngmem.c deleted file mode 100644 index 66eec0b..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/pngmem.c +++ /dev/null @@ -1,566 +0,0 @@ - -/* pngmem.c - stub functions for memory allocation - * - * libpng 1.2.5 - October 3, 2002 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2002 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) - * - * This file provides a location for all memory allocation. Users who - * need special memory handling are expected to supply replacement - * functions for png_malloc() and png_free(), and to use - * png_create_read_struct_2() and png_create_write_struct_2() to - * identify the replacement functions. - */ - -#define PNG_INTERNAL -#include "png.h" - -/* Borland DOS special memory handler */ -#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) -/* if you change this, be sure to change the one in png.h also */ - -/* Allocate memory for a png_struct. The malloc and memset can be replaced - by a single call to calloc() if this is thought to improve performance. */ -png_voidp /* PRIVATE */ -png_create_struct(int type) -{ -#ifdef PNG_USER_MEM_SUPPORTED - return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL)); -} - -/* Alternate version of png_create_struct, for use with user-defined malloc. */ -png_voidp /* PRIVATE */ -png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr) -{ -#endif /* PNG_USER_MEM_SUPPORTED */ - png_size_t size; - png_voidp struct_ptr; - - if (type == PNG_STRUCT_INFO) - size = sizeof(png_info); - else if (type == PNG_STRUCT_PNG) - size = sizeof(png_struct); - else - return (png_get_copyright()); - -#ifdef PNG_USER_MEM_SUPPORTED - if(malloc_fn != NULL) - { - png_struct dummy_struct; - png_structp png_ptr = &dummy_struct; - png_ptr->mem_ptr=mem_ptr; - struct_ptr = (*(malloc_fn))(png_ptr, (png_uint_32)size); - } - else -#endif /* PNG_USER_MEM_SUPPORTED */ - struct_ptr = (png_voidp)farmalloc(size)); - if (struct_ptr != NULL) - png_memset(struct_ptr, 0, size); - return (struct_ptr); -} - -/* Free memory allocated by a png_create_struct() call */ -void /* PRIVATE */ -png_destroy_struct(png_voidp struct_ptr) -{ -#ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL); -} - -/* Free memory allocated by a png_create_struct() call */ -void /* PRIVATE */ -png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn, - png_voidp mem_ptr) -{ -#endif - if (struct_ptr != NULL) - { -#ifdef PNG_USER_MEM_SUPPORTED - if(free_fn != NULL) - { - png_struct dummy_struct; - png_structp png_ptr = &dummy_struct; - png_ptr->mem_ptr=mem_ptr; - (*(free_fn))(png_ptr, struct_ptr); - return; - } -#endif /* PNG_USER_MEM_SUPPORTED */ - farfree (struct_ptr); - } -} - -/* Allocate memory. For reasonable files, size should never exceed - * 64K. However, zlib may allocate more then 64K if you don't tell - * it not to. See zconf.h and png.h for more information. zlib does - * need to allocate exactly 64K, so whatever you call here must - * have the ability to do that. - * - * Borland seems to have a problem in DOS mode for exactly 64K. - * It gives you a segment with an offset of 8 (perhaps to store its - * memory stuff). zlib doesn't like this at all, so we have to - * detect and deal with it. This code should not be needed in - * Windows or OS/2 modes, and only in 16 bit mode. This code has - * been updated by Alexander Lehmann for version 0.89 to waste less - * memory. - * - * Note that we can't use png_size_t for the "size" declaration, - * since on some systems a png_size_t is a 16-bit quantity, and as a - * result, we would be truncating potentially larger memory requests - * (which should cause a fatal error) and introducing major problems. - */ - -png_voidp PNGAPI -png_malloc(png_structp png_ptr, png_uint_32 size) -{ - png_voidp ret; - - if (png_ptr == NULL || size == 0) - return (NULL); - -#ifdef PNG_USER_MEM_SUPPORTED - if(png_ptr->malloc_fn != NULL) - { - ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size)); - if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out of memory!"); - return (ret); - } - else - return png_malloc_default(png_ptr, size); -} - -png_voidp PNGAPI -png_malloc_default(png_structp png_ptr, png_uint_32 size) -{ - png_voidp ret; -#endif /* PNG_USER_MEM_SUPPORTED */ - -#ifdef PNG_MAX_MALLOC_64K - if (size > (png_uint_32)65536L) - png_error(png_ptr, "Cannot Allocate > 64K"); -#endif - - if (size == (png_uint_32)65536L) - { - if (png_ptr->offset_table == NULL) - { - /* try to see if we need to do any of this fancy stuff */ - ret = farmalloc(size); - if (ret == NULL || ((png_size_t)ret & 0xffff)) - { - int num_blocks; - png_uint_32 total_size; - png_bytep table; - int i; - png_byte huge * hptr; - - if (ret != NULL) - { - farfree(ret); - ret = NULL; - } - - if(png_ptr->zlib_window_bits > 14) - num_blocks = (int)(1 << (png_ptr->zlib_window_bits - 14)); - else - num_blocks = 1; - if (png_ptr->zlib_mem_level >= 7) - num_blocks += (int)(1 << (png_ptr->zlib_mem_level - 7)); - else - num_blocks++; - - total_size = ((png_uint_32)65536L) * (png_uint_32)num_blocks+16; - - table = farmalloc(total_size); - - if (table == NULL) - { - if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out Of Memory."); /* Note "O" and "M" */ - else - png_warning(png_ptr, "Out Of Memory."); - return (NULL); - } - - if ((png_size_t)table & 0xfff0) - { - if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, - "Farmalloc didn't return normalized pointer"); - else - png_warning(png_ptr, - "Farmalloc didn't return normalized pointer"); - return (NULL); - } - - png_ptr->offset_table = table; - png_ptr->offset_table_ptr = farmalloc(num_blocks * - sizeof (png_bytep)); - - if (png_ptr->offset_table_ptr == NULL) - { - if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out Of memory."); /* Note "O" and "M" */ - else - png_warning(png_ptr, "Out Of memory."); - return (NULL); - } - - hptr = (png_byte huge *)table; - if ((png_size_t)hptr & 0xf) - { - hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L); - hptr = hptr + 16L; /* "hptr += 16L" fails on Turbo C++ 3.0 */ - } - for (i = 0; i < num_blocks; i++) - { - png_ptr->offset_table_ptr[i] = (png_bytep)hptr; - hptr = hptr + (png_uint_32)65536L; /* "+=" fails on TC++3.0 */ - } - - png_ptr->offset_table_number = num_blocks; - png_ptr->offset_table_count = 0; - png_ptr->offset_table_count_free = 0; - } - } - - if (png_ptr->offset_table_count >= png_ptr->offset_table_number) - { - if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out of Memory."); /* Note "o" and "M" */ - else - png_warning(png_ptr, "Out of Memory."); - return (NULL); - } - - ret = png_ptr->offset_table_ptr[png_ptr->offset_table_count++]; - } - else - ret = farmalloc(size); - - if (ret == NULL) - { - if (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out of memory."); /* Note "o" and "m" */ - else - png_warning(png_ptr, "Out of memory."); /* Note "o" and "m" */ - } - - return (ret); -} - -/* free a pointer allocated by png_malloc(). In the default - configuration, png_ptr is not used, but is passed in case it - is needed. If ptr is NULL, return without taking any action. */ -void PNGAPI -png_free(png_structp png_ptr, png_voidp ptr) -{ - if (png_ptr == NULL || ptr == NULL) - return; - -#ifdef PNG_USER_MEM_SUPPORTED - if (png_ptr->free_fn != NULL) - { - (*(png_ptr->free_fn))(png_ptr, ptr); - return; - } - else png_free_default(png_ptr, ptr); -} - -void PNGAPI -png_free_default(png_structp png_ptr, png_voidp ptr) -{ -#endif /* PNG_USER_MEM_SUPPORTED */ - - if (png_ptr->offset_table != NULL) - { - int i; - - for (i = 0; i < png_ptr->offset_table_count; i++) - { - if (ptr == png_ptr->offset_table_ptr[i]) - { - ptr = NULL; - png_ptr->offset_table_count_free++; - break; - } - } - if (png_ptr->offset_table_count_free == png_ptr->offset_table_count) - { - farfree(png_ptr->offset_table); - farfree(png_ptr->offset_table_ptr); - png_ptr->offset_table = NULL; - png_ptr->offset_table_ptr = NULL; - } - } - - if (ptr != NULL) - { - farfree(ptr); - } -} - -#else /* Not the Borland DOS special memory handler */ - -/* Allocate memory for a png_struct or a png_info. The malloc and - memset can be replaced by a single call to calloc() if this is thought - to improve performance noticably. */ -png_voidp /* PRIVATE */ -png_create_struct(int type) -{ -#ifdef PNG_USER_MEM_SUPPORTED - return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL)); -} - -/* Allocate memory for a png_struct or a png_info. The malloc and - memset can be replaced by a single call to calloc() if this is thought - to improve performance noticably. */ -png_voidp /* PRIVATE */ -png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr) -{ -#endif /* PNG_USER_MEM_SUPPORTED */ - png_size_t size; - png_voidp struct_ptr; - - if (type == PNG_STRUCT_INFO) - size = sizeof(png_info); - else if (type == PNG_STRUCT_PNG) - size = sizeof(png_struct); - else - return (NULL); - -#ifdef PNG_USER_MEM_SUPPORTED - if(malloc_fn != NULL) - { - png_struct dummy_struct; - png_structp png_ptr = &dummy_struct; - png_ptr->mem_ptr=mem_ptr; - struct_ptr = (*(malloc_fn))(png_ptr, size); - if (struct_ptr != NULL) - png_memset(struct_ptr, 0, size); - return (struct_ptr); - } -#endif /* PNG_USER_MEM_SUPPORTED */ - -#if defined(__TURBOC__) && !defined(__FLAT__) - if ((struct_ptr = (png_voidp)farmalloc(size)) != NULL) -#else -# if defined(_MSC_VER) && defined(MAXSEG_64K) - if ((struct_ptr = (png_voidp)halloc(size,1)) != NULL) -# else - if ((struct_ptr = (png_voidp)malloc(size)) != NULL) -# endif -#endif - { - png_memset(struct_ptr, 0, size); - } - - return (struct_ptr); -} - - -/* Free memory allocated by a png_create_struct() call */ -void /* PRIVATE */ -png_destroy_struct(png_voidp struct_ptr) -{ -#ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL); -} - -/* Free memory allocated by a png_create_struct() call */ -void /* PRIVATE */ -png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn, - png_voidp mem_ptr) -{ -#endif /* PNG_USER_MEM_SUPPORTED */ - if (struct_ptr != NULL) - { -#ifdef PNG_USER_MEM_SUPPORTED - if(free_fn != NULL) - { - png_struct dummy_struct; - png_structp png_ptr = &dummy_struct; - png_ptr->mem_ptr=mem_ptr; - (*(free_fn))(png_ptr, struct_ptr); - return; - } -#endif /* PNG_USER_MEM_SUPPORTED */ -#if defined(__TURBOC__) && !defined(__FLAT__) - farfree(struct_ptr); -#else -# if defined(_MSC_VER) && defined(MAXSEG_64K) - hfree(struct_ptr); -# else - free(struct_ptr); -# endif -#endif - } -} - -/* Allocate memory. For reasonable files, size should never exceed - 64K. However, zlib may allocate more then 64K if you don't tell - it not to. See zconf.h and png.h for more information. zlib does - need to allocate exactly 64K, so whatever you call here must - have the ability to do that. */ - -png_voidp PNGAPI -png_malloc(png_structp png_ptr, png_uint_32 size) -{ - png_voidp ret; - - if (png_ptr == NULL || size == 0) - return (NULL); - -#ifdef PNG_USER_MEM_SUPPORTED - if(png_ptr->malloc_fn != NULL) - { - ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size)); - if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out of Memory!"); - return (ret); - } - else - return (png_malloc_default(png_ptr, size)); -} - -png_voidp PNGAPI -png_malloc_default(png_structp png_ptr, png_uint_32 size) -{ - png_voidp ret; -#endif /* PNG_USER_MEM_SUPPORTED */ - -#ifdef PNG_MAX_MALLOC_64K - if (size > (png_uint_32)65536L) - { - if(png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Cannot Allocate > 64K"); - else - return NULL; - } -#endif - -#if defined(__TURBOC__) && !defined(__FLAT__) - ret = farmalloc(size); -#else -# if defined(_MSC_VER) && defined(MAXSEG_64K) - ret = halloc(size, 1); -# else - ret = malloc((size_t)size); -# endif -#endif - - if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out of Memory"); - - return (ret); -} - -/* Free a pointer allocated by png_malloc(). If ptr is NULL, return - without taking any action. */ -void PNGAPI -png_free(png_structp png_ptr, png_voidp ptr) -{ - if (png_ptr == NULL || ptr == NULL) - return; - -#ifdef PNG_USER_MEM_SUPPORTED - if (png_ptr->free_fn != NULL) - { - (*(png_ptr->free_fn))(png_ptr, ptr); - return; - } - else png_free_default(png_ptr, ptr); -} -void PNGAPI -png_free_default(png_structp png_ptr, png_voidp ptr) -{ - if (png_ptr == NULL || ptr == NULL) - return; - -#endif /* PNG_USER_MEM_SUPPORTED */ - -#if defined(__TURBOC__) && !defined(__FLAT__) - farfree(ptr); -#else -# if defined(_MSC_VER) && defined(MAXSEG_64K) - hfree(ptr); -# else - free(ptr); -# endif -#endif -} - -#endif /* Not Borland DOS special memory handler */ - -#if defined(PNG_1_0_X) -# define png_malloc_warn png_malloc -#else -/* This function was added at libpng version 1.2.3. The png_malloc_warn() - * function will issue a png_warning and return NULL instead of issuing a - * png_error, if it fails to allocate the requested memory. - */ -png_voidp PNGAPI -png_malloc_warn(png_structp png_ptr, png_uint_32 size) -{ - png_voidp ptr; - png_uint_32 save_flags=png_ptr->flags; - - png_ptr->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK; - ptr = (png_voidp)png_malloc((png_structp)png_ptr, size); - png_ptr->flags=save_flags; - return(ptr); -} -#endif - -png_voidp PNGAPI -png_memcpy_check (png_structp png_ptr, png_voidp s1, png_voidp s2, - png_uint_32 length) -{ - png_size_t size; - - size = (png_size_t)length; - if ((png_uint_32)size != length) - png_error(png_ptr,"Overflow in png_memcpy_check."); - - return(png_memcpy (s1, s2, size)); -} - -png_voidp PNGAPI -png_memset_check (png_structp png_ptr, png_voidp s1, int value, - png_uint_32 length) -{ - png_size_t size; - - size = (png_size_t)length; - if ((png_uint_32)size != length) - png_error(png_ptr,"Overflow in png_memset_check."); - - return (png_memset (s1, value, size)); - -} - -#ifdef PNG_USER_MEM_SUPPORTED -/* This function is called when the application wants to use another method - * of allocating and freeing memory. - */ -void PNGAPI -png_set_mem_fn(png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr - malloc_fn, png_free_ptr free_fn) -{ - png_ptr->mem_ptr = mem_ptr; - png_ptr->malloc_fn = malloc_fn; - png_ptr->free_fn = free_fn; -} - -/* This function returns a pointer to the mem_ptr associated with the user - * functions. The application should free any memory associated with this - * pointer before png_write_destroy and png_read_destroy are called. - */ -png_voidp PNGAPI -png_get_mem_ptr(png_structp png_ptr) -{ - return ((png_voidp)png_ptr->mem_ptr); -} -#endif /* PNG_USER_MEM_SUPPORTED */ diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngnow.png b/gtkmm-osx/trunk/libpng-1.2.5/pngnow.png deleted file mode 100644 index 174b5fa057f0e755d9d68f07d6ae385e387d5a95..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2018 zcmV<82Oao{P)Px%VNgs|Mg0E!1Of!i&dkgL1e^i{%mOrgigZ+7TwH2w zRC;7&euP|Vd|YaDRAOXIQmkZV@CJ4M* z6zq;9Od41Nq;S`3Vqq-17fl$w+*Dla4=3{*NCTs|aRW(*W63=D1* z3@!v@E)*;l1Y~9m93l)1S_}+g3>+o|G%_44E+j-oOdJ*z93BKDDlIfRJQNlLOiD}? z78x`?L<9x|WMXWDlB85xV@z6H93CVb8XR0+XiQdI3<3l!E;M9zd|YO4gl25CYHVzB zBrGljymEYef;>D54BSpsjGlB%Ry;%s1nedxL`qInVtiz7bPN&{Oj1-dDlB9+JVZ`Z ze1>E+CM-lsG$aZHTp}c7YBVe^43v6=RAyXkdSpC8EEF0XEHX4?YIHnCOq8Ci1PT;< zevC9SG<1TDY;JrUDkNNDbTm3dM0!*_W=te5EG#B0L`Iy1j{Gz>3{0L(G&U?$T8wml z+#E6-RI+50n$#>Vj4Uo}go+qMc1(PN6huM{JVsnhQhbz>6ciRb97ZHeUOX%+1Y~YR zBqAnMR$nwWJQNxP6cQ9nQe<>`jQnO~6cPj+9voC&WIQ@R92zWKVr*m<6g(0Td>RxK z0t7S)1Z)-*3?2+59t4~g6nu6J90ml078I106g)Z%#2zF}78JZ9BrFC5e0mHl3JipX zkQ5FCY;u5XYJ9SkgWp{KyaBpI7crIgaZ7E9LgP8yT1m8(SK~zY`wN{CL6Garxn@ut;kffcY zsl{E}Dj1X* zJh-%>=AnmIJ+gYu+7*Q?++JLmD*Vu9tbMvzU`2BOckMeq8OHITmti2-?E*)#~(Xn~a6ZE+sMoyL%Ecz(`NR zV&TO=c?e@zmXtDTFsIl>3CDv714`JS9nNd9h@^(X0}J|-O>#NJVgq~jzW&DOzBj`$ zOvG4L7d{jQ`XY>IDr*)wP7=oBZxKF*$Z=6wB*}@DiweKJqN*qtss7a4``y|&tUds} z2M@h-XlLN?fp?)nA4s~&QdUJxczteS)lw2cnGgpPUuH#dw8MsYHc%3&l!_}VIy9De z@BP3BE7u%ZcJ#wz9}Vm{x_sY}Egz5XZ5b+Svvh%F>qC#6Tk_zVs_`6zhUG;-8_Yo1 zMVtyMO4Wm|*cg10)_e6&KO6Zxm_9aiuvI_Y9sNRvFpXAQEJWQ3VTUYvVEuAa8H6{X znS;=WrerHhLSf{aIh|zDs4McNKGJ@?ad#s-G4)j}MIjuEoHQ17$6QlpMR`mZs*1;^ zLdr--{J^PY;4I$3k))N2X4XW&FDocRuVt2@u0(|cj|d-&mefx3k*Jag5BU9#KkQb~`xaN*p= zi$B)=G;`_l?9abkzI6WVuUA(6mg`Z5**_)>pn#>1S}=D;c9IbGaUP;_Uft7GrJZ*1 z6$s#?|E`a(@0{(N8P|trJJvUpJ?AX2&^=4W?0nwEA3UKxu`v^{}KB0WK;0!Wa8?n zkv+2V*W~23$y_eH9`nFAjY4LVA5p(G%b7Fbuffer_size) - { - png_process_some_data(png_ptr, info_ptr); - } -} - -/* What we do with the incoming data depends on what we were previously - * doing before we ran out of data... - */ -void /* PRIVATE */ -png_process_some_data(png_structp png_ptr, png_infop info_ptr) -{ - switch (png_ptr->process_mode) - { - case PNG_READ_SIG_MODE: - { - png_push_read_sig(png_ptr, info_ptr); - break; - } - case PNG_READ_CHUNK_MODE: - { - png_push_read_chunk(png_ptr, info_ptr); - break; - } - case PNG_READ_IDAT_MODE: - { - png_push_read_IDAT(png_ptr); - break; - } -#if defined(PNG_READ_tEXt_SUPPORTED) - case PNG_READ_tEXt_MODE: - { - png_push_read_tEXt(png_ptr, info_ptr); - break; - } -#endif -#if defined(PNG_READ_zTXt_SUPPORTED) - case PNG_READ_zTXt_MODE: - { - png_push_read_zTXt(png_ptr, info_ptr); - break; - } -#endif -#if defined(PNG_READ_iTXt_SUPPORTED) - case PNG_READ_iTXt_MODE: - { - png_push_read_iTXt(png_ptr, info_ptr); - break; - } -#endif - case PNG_SKIP_MODE: - { - png_push_crc_finish(png_ptr); - break; - } - default: - { - png_ptr->buffer_size = 0; - break; - } - } -} - -/* Read any remaining signature bytes from the stream and compare them with - * the correct PNG signature. It is possible that this routine is called - * with bytes already read from the signature, either because they have been - * checked by the calling application, or because of multiple calls to this - * routine. - */ -void /* PRIVATE */ -png_push_read_sig(png_structp png_ptr, png_infop info_ptr) -{ - png_size_t num_checked = png_ptr->sig_bytes, - num_to_check = 8 - num_checked; - - if (png_ptr->buffer_size < num_to_check) - { - num_to_check = png_ptr->buffer_size; - } - - png_push_fill_buffer(png_ptr, &(info_ptr->signature[num_checked]), - num_to_check); - png_ptr->sig_bytes = (png_byte)(png_ptr->sig_bytes+num_to_check); - - if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check)) - { - if (num_checked < 4 && - png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4)) - png_error(png_ptr, "Not a PNG file"); - else - png_error(png_ptr, "PNG file corrupted by ASCII conversion"); - } - else - { - if (png_ptr->sig_bytes >= 8) - { - png_ptr->process_mode = PNG_READ_CHUNK_MODE; - } - } -} - -void /* PRIVATE */ -png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_IHDR; - PNG_IDAT; - PNG_IEND; - PNG_PLTE; -#if defined(PNG_READ_bKGD_SUPPORTED) - PNG_bKGD; -#endif -#if defined(PNG_READ_cHRM_SUPPORTED) - PNG_cHRM; -#endif -#if defined(PNG_READ_gAMA_SUPPORTED) - PNG_gAMA; -#endif -#if defined(PNG_READ_hIST_SUPPORTED) - PNG_hIST; -#endif -#if defined(PNG_READ_iCCP_SUPPORTED) - PNG_iCCP; -#endif -#if defined(PNG_READ_iTXt_SUPPORTED) - PNG_iTXt; -#endif -#if defined(PNG_READ_oFFs_SUPPORTED) - PNG_oFFs; -#endif -#if defined(PNG_READ_pCAL_SUPPORTED) - PNG_pCAL; -#endif -#if defined(PNG_READ_pHYs_SUPPORTED) - PNG_pHYs; -#endif -#if defined(PNG_READ_sBIT_SUPPORTED) - PNG_sBIT; -#endif -#if defined(PNG_READ_sCAL_SUPPORTED) - PNG_sCAL; -#endif -#if defined(PNG_READ_sRGB_SUPPORTED) - PNG_sRGB; -#endif -#if defined(PNG_READ_sPLT_SUPPORTED) - PNG_sPLT; -#endif -#if defined(PNG_READ_tEXt_SUPPORTED) - PNG_tEXt; -#endif -#if defined(PNG_READ_tIME_SUPPORTED) - PNG_tIME; -#endif -#if defined(PNG_READ_tRNS_SUPPORTED) - PNG_tRNS; -#endif -#if defined(PNG_READ_zTXt_SUPPORTED) - PNG_zTXt; -#endif -#endif /* PNG_USE_LOCAL_ARRAYS */ - /* First we make sure we have enough data for the 4 byte chunk name - * and the 4 byte chunk length before proceeding with decoding the - * chunk data. To fully decode each of these chunks, we also make - * sure we have enough data in the buffer for the 4 byte CRC at the - * end of every chunk (except IDAT, which is handled separately). - */ - if (!(png_ptr->mode & PNG_HAVE_CHUNK_HEADER)) - { - png_byte chunk_length[4]; - - if (png_ptr->buffer_size < 8) - { - png_push_save_buffer(png_ptr); - return; - } - - png_push_fill_buffer(png_ptr, chunk_length, 4); - png_ptr->push_length = png_get_uint_32(chunk_length); - png_reset_crc(png_ptr); - png_crc_read(png_ptr, png_ptr->chunk_name, 4); - png_ptr->mode |= PNG_HAVE_CHUNK_HEADER; - } - - if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_handle_IHDR(png_ptr, info_ptr, png_ptr->push_length); - } - else if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_handle_PLTE(png_ptr, info_ptr, png_ptr->push_length); - } - else if (!png_memcmp(png_ptr->chunk_name, (png_bytep)png_IDAT, 4)) - { - /* If we reach an IDAT chunk, this means we have read all of the - * header chunks, and we can start reading the image (or if this - * is called after the image has been read - we have an error). - */ - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before IDAT"); - else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && - !(png_ptr->mode & PNG_HAVE_PLTE)) - png_error(png_ptr, "Missing PLTE before IDAT"); - - if (png_ptr->mode & PNG_HAVE_IDAT) - { - if (png_ptr->push_length == 0) - return; - - if (png_ptr->mode & PNG_AFTER_IDAT) - png_error(png_ptr, "Too many IDAT's found"); - } - - png_ptr->idat_size = png_ptr->push_length; - png_ptr->mode |= PNG_HAVE_IDAT; - png_ptr->process_mode = PNG_READ_IDAT_MODE; - png_push_have_info(png_ptr, info_ptr); - png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes; - png_ptr->zstream.next_out = png_ptr->row_buf; - return; - } - else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_handle_IEND(png_ptr, info_ptr, png_ptr->push_length); - - png_ptr->process_mode = PNG_READ_DONE_MODE; - png_push_have_end(png_ptr, info_ptr); - } -#if defined(PNG_READ_gAMA_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_gAMA, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_handle_gAMA(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_sBIT_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_sBIT, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_handle_sBIT(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_cHRM_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_cHRM, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_handle_cHRM(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_sRGB_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_sRGB, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_handle_sRGB(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_iCCP_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_iCCP, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_handle_iCCP(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_sPLT_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_sPLT, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_handle_sPLT(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_tRNS_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_tRNS, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_handle_tRNS(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_bKGD_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_bKGD, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_handle_bKGD(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_hIST_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_hIST, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_handle_hIST(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_pHYs_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_pHYs, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_handle_pHYs(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_oFFs_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_oFFs, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_handle_oFFs(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_pCAL_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_pCAL, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_handle_pCAL(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_sCAL_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_sCAL, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_handle_sCAL(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_tIME_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_tIME, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_handle_tIME(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_tEXt_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_tEXt, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_push_handle_tEXt(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_zTXt_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_zTXt, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_push_handle_zTXt(png_ptr, info_ptr, png_ptr->push_length); - } -#endif -#if defined(PNG_READ_iTXt_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_iTXt, 4)) - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_push_handle_iTXt(png_ptr, info_ptr, png_ptr->push_length); - } -#endif - else - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) - { - png_push_save_buffer(png_ptr); - return; - } - png_push_handle_unknown(png_ptr, info_ptr, png_ptr->push_length); - } - - png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; -} - -void /* PRIVATE */ -png_push_crc_skip(png_structp png_ptr, png_uint_32 skip) -{ - png_ptr->process_mode = PNG_SKIP_MODE; - png_ptr->skip_length = skip; -} - -void /* PRIVATE */ -png_push_crc_finish(png_structp png_ptr) -{ - if (png_ptr->skip_length && png_ptr->save_buffer_size) - { - png_size_t save_size; - - if (png_ptr->skip_length < (png_uint_32)png_ptr->save_buffer_size) - save_size = (png_size_t)png_ptr->skip_length; - else - save_size = png_ptr->save_buffer_size; - - png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size); - - png_ptr->skip_length -= save_size; - png_ptr->buffer_size -= save_size; - png_ptr->save_buffer_size -= save_size; - png_ptr->save_buffer_ptr += save_size; - } - if (png_ptr->skip_length && png_ptr->current_buffer_size) - { - png_size_t save_size; - - if (png_ptr->skip_length < (png_uint_32)png_ptr->current_buffer_size) - save_size = (png_size_t)png_ptr->skip_length; - else - save_size = png_ptr->current_buffer_size; - - png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size); - - png_ptr->skip_length -= save_size; - png_ptr->buffer_size -= save_size; - png_ptr->current_buffer_size -= save_size; - png_ptr->current_buffer_ptr += save_size; - } - if (!png_ptr->skip_length) - { - if (png_ptr->buffer_size < 4) - { - png_push_save_buffer(png_ptr); - return; - } - - png_crc_finish(png_ptr, 0); - png_ptr->process_mode = PNG_READ_CHUNK_MODE; - } -} - -void PNGAPI -png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length) -{ - png_bytep ptr; - - ptr = buffer; - if (png_ptr->save_buffer_size) - { - png_size_t save_size; - - if (length < png_ptr->save_buffer_size) - save_size = length; - else - save_size = png_ptr->save_buffer_size; - - png_memcpy(ptr, png_ptr->save_buffer_ptr, save_size); - length -= save_size; - ptr += save_size; - png_ptr->buffer_size -= save_size; - png_ptr->save_buffer_size -= save_size; - png_ptr->save_buffer_ptr += save_size; - } - if (length && png_ptr->current_buffer_size) - { - png_size_t save_size; - - if (length < png_ptr->current_buffer_size) - save_size = length; - else - save_size = png_ptr->current_buffer_size; - - png_memcpy(ptr, png_ptr->current_buffer_ptr, save_size); - png_ptr->buffer_size -= save_size; - png_ptr->current_buffer_size -= save_size; - png_ptr->current_buffer_ptr += save_size; - } -} - -void /* PRIVATE */ -png_push_save_buffer(png_structp png_ptr) -{ - if (png_ptr->save_buffer_size) - { - if (png_ptr->save_buffer_ptr != png_ptr->save_buffer) - { - png_size_t i,istop; - png_bytep sp; - png_bytep dp; - - istop = png_ptr->save_buffer_size; - for (i = 0, sp = png_ptr->save_buffer_ptr, dp = png_ptr->save_buffer; - i < istop; i++, sp++, dp++) - { - *dp = *sp; - } - } - } - if (png_ptr->save_buffer_size + png_ptr->current_buffer_size > - png_ptr->save_buffer_max) - { - png_size_t new_max; - png_bytep old_buffer; - - new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + 256; - old_buffer = png_ptr->save_buffer; - png_ptr->save_buffer = (png_bytep)png_malloc(png_ptr, - (png_uint_32)new_max); - png_memcpy(png_ptr->save_buffer, old_buffer, png_ptr->save_buffer_size); - png_free(png_ptr, old_buffer); - png_ptr->save_buffer_max = new_max; - } - if (png_ptr->current_buffer_size) - { - png_memcpy(png_ptr->save_buffer + png_ptr->save_buffer_size, - png_ptr->current_buffer_ptr, png_ptr->current_buffer_size); - png_ptr->save_buffer_size += png_ptr->current_buffer_size; - png_ptr->current_buffer_size = 0; - } - png_ptr->save_buffer_ptr = png_ptr->save_buffer; - png_ptr->buffer_size = 0; -} - -void /* PRIVATE */ -png_push_restore_buffer(png_structp png_ptr, png_bytep buffer, - png_size_t buffer_length) -{ - png_ptr->current_buffer = buffer; - png_ptr->current_buffer_size = buffer_length; - png_ptr->buffer_size = buffer_length + png_ptr->save_buffer_size; - png_ptr->current_buffer_ptr = png_ptr->current_buffer; -} - -void /* PRIVATE */ -png_push_read_IDAT(png_structp png_ptr) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_IDAT; -#endif - if (!(png_ptr->mode & PNG_HAVE_CHUNK_HEADER)) - { - png_byte chunk_length[4]; - - if (png_ptr->buffer_size < 8) - { - png_push_save_buffer(png_ptr); - return; - } - - png_push_fill_buffer(png_ptr, chunk_length, 4); - png_ptr->push_length = png_get_uint_32(chunk_length); - - png_reset_crc(png_ptr); - png_crc_read(png_ptr, png_ptr->chunk_name, 4); - png_ptr->mode |= PNG_HAVE_CHUNK_HEADER; - - if (png_memcmp(png_ptr->chunk_name, (png_bytep)png_IDAT, 4)) - { - png_ptr->process_mode = PNG_READ_CHUNK_MODE; - if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) - png_error(png_ptr, "Not enough compressed data"); - return; - } - - png_ptr->idat_size = png_ptr->push_length; - } - if (png_ptr->idat_size && png_ptr->save_buffer_size) - { - png_size_t save_size; - - if (png_ptr->idat_size < (png_uint_32)png_ptr->save_buffer_size) - { - save_size = (png_size_t)png_ptr->idat_size; - /* check for overflow */ - if((png_uint_32)save_size != png_ptr->idat_size) - png_error(png_ptr, "save_size overflowed in pngpread"); - } - else - save_size = png_ptr->save_buffer_size; - - png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size); - if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) - png_process_IDAT_data(png_ptr, png_ptr->save_buffer_ptr, save_size); - png_ptr->idat_size -= save_size; - png_ptr->buffer_size -= save_size; - png_ptr->save_buffer_size -= save_size; - png_ptr->save_buffer_ptr += save_size; - } - if (png_ptr->idat_size && png_ptr->current_buffer_size) - { - png_size_t save_size; - - if (png_ptr->idat_size < (png_uint_32)png_ptr->current_buffer_size) - { - save_size = (png_size_t)png_ptr->idat_size; - /* check for overflow */ - if((png_uint_32)save_size != png_ptr->idat_size) - png_error(png_ptr, "save_size overflowed in pngpread"); - } - else - save_size = png_ptr->current_buffer_size; - - png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size); - if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) - png_process_IDAT_data(png_ptr, png_ptr->current_buffer_ptr, save_size); - - png_ptr->idat_size -= save_size; - png_ptr->buffer_size -= save_size; - png_ptr->current_buffer_size -= save_size; - png_ptr->current_buffer_ptr += save_size; - } - if (!png_ptr->idat_size) - { - if (png_ptr->buffer_size < 4) - { - png_push_save_buffer(png_ptr); - return; - } - - png_crc_finish(png_ptr, 0); - png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; - png_ptr->mode |= PNG_AFTER_IDAT; - } -} - -void /* PRIVATE */ -png_process_IDAT_data(png_structp png_ptr, png_bytep buffer, - png_size_t buffer_length) -{ - int ret; - - if ((png_ptr->flags & PNG_FLAG_ZLIB_FINISHED) && buffer_length) - png_error(png_ptr, "Extra compression data"); - - png_ptr->zstream.next_in = buffer; - png_ptr->zstream.avail_in = (uInt)buffer_length; - for(;;) - { - ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); - if (ret != Z_OK) - { - if (ret == Z_STREAM_END) - { - if (png_ptr->zstream.avail_in) - png_error(png_ptr, "Extra compressed data"); - if (!(png_ptr->zstream.avail_out)) - { - png_push_process_row(png_ptr); - } - - png_ptr->mode |= PNG_AFTER_IDAT; - png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; - break; - } - else if (ret == Z_BUF_ERROR) - break; - else - png_error(png_ptr, "Decompression Error"); - } - if (!(png_ptr->zstream.avail_out)) - { - if (( -#if defined(PNG_READ_INTERLACING_SUPPORTED) - png_ptr->interlaced && png_ptr->pass > 6) || - (!png_ptr->interlaced && -#endif - png_ptr->row_number == png_ptr->num_rows-1)) - { - if (png_ptr->zstream.avail_in) - png_warning(png_ptr, "Too much data in IDAT chunks"); - png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; - break; - } - png_push_process_row(png_ptr); - png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes; - png_ptr->zstream.next_out = png_ptr->row_buf; - } - else - break; - } -} - -void /* PRIVATE */ -png_push_process_row(png_structp png_ptr) -{ - png_ptr->row_info.color_type = png_ptr->color_type; - png_ptr->row_info.width = png_ptr->iwidth; - png_ptr->row_info.channels = png_ptr->channels; - png_ptr->row_info.bit_depth = png_ptr->bit_depth; - png_ptr->row_info.pixel_depth = png_ptr->pixel_depth; - - png_ptr->row_info.rowbytes = ((png_ptr->row_info.width * - (png_uint_32)png_ptr->row_info.pixel_depth + 7) >> 3); - - png_read_filter_row(png_ptr, &(png_ptr->row_info), - png_ptr->row_buf + 1, png_ptr->prev_row + 1, - (int)(png_ptr->row_buf[0])); - - png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf, - png_ptr->rowbytes + 1); - - if (png_ptr->transformations) - png_do_read_transformations(png_ptr); - -#if defined(PNG_READ_INTERLACING_SUPPORTED) - /* blow up interlaced rows to full size */ - if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) - { - if (png_ptr->pass < 6) -/* old interface (pre-1.0.9): - png_do_read_interlace(&(png_ptr->row_info), - png_ptr->row_buf + 1, png_ptr->pass, png_ptr->transformations); - */ - png_do_read_interlace(png_ptr); - - switch (png_ptr->pass) - { - case 0: - { - int i; - for (i = 0; i < 8 && png_ptr->pass == 0; i++) - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); /* updates png_ptr->pass */ - } - if (png_ptr->pass == 2) /* pass 1 might be empty */ - { - for (i = 0; i < 4 && png_ptr->pass == 2; i++) - { - png_push_have_row(png_ptr, png_bytep_NULL); - png_read_push_finish_row(png_ptr); - } - } - if (png_ptr->pass == 4 && png_ptr->height <= 4) - { - for (i = 0; i < 2 && png_ptr->pass == 4; i++) - { - png_push_have_row(png_ptr, png_bytep_NULL); - png_read_push_finish_row(png_ptr); - } - } - if (png_ptr->pass == 6 && png_ptr->height <= 4) - { - png_push_have_row(png_ptr, png_bytep_NULL); - png_read_push_finish_row(png_ptr); - } - break; - } - case 1: - { - int i; - for (i = 0; i < 8 && png_ptr->pass == 1; i++) - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - } - if (png_ptr->pass == 2) /* skip top 4 generated rows */ - { - for (i = 0; i < 4 && png_ptr->pass == 2; i++) - { - png_push_have_row(png_ptr, png_bytep_NULL); - png_read_push_finish_row(png_ptr); - } - } - break; - } - case 2: - { - int i; - for (i = 0; i < 4 && png_ptr->pass == 2; i++) - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - } - for (i = 0; i < 4 && png_ptr->pass == 2; i++) - { - png_push_have_row(png_ptr, png_bytep_NULL); - png_read_push_finish_row(png_ptr); - } - if (png_ptr->pass == 4) /* pass 3 might be empty */ - { - for (i = 0; i < 2 && png_ptr->pass == 4; i++) - { - png_push_have_row(png_ptr, png_bytep_NULL); - png_read_push_finish_row(png_ptr); - } - } - break; - } - case 3: - { - int i; - for (i = 0; i < 4 && png_ptr->pass == 3; i++) - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - } - if (png_ptr->pass == 4) /* skip top two generated rows */ - { - for (i = 0; i < 2 && png_ptr->pass == 4; i++) - { - png_push_have_row(png_ptr, png_bytep_NULL); - png_read_push_finish_row(png_ptr); - } - } - break; - } - case 4: - { - int i; - for (i = 0; i < 2 && png_ptr->pass == 4; i++) - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - } - for (i = 0; i < 2 && png_ptr->pass == 4; i++) - { - png_push_have_row(png_ptr, png_bytep_NULL); - png_read_push_finish_row(png_ptr); - } - if (png_ptr->pass == 6) /* pass 5 might be empty */ - { - png_push_have_row(png_ptr, png_bytep_NULL); - png_read_push_finish_row(png_ptr); - } - break; - } - case 5: - { - int i; - for (i = 0; i < 2 && png_ptr->pass == 5; i++) - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - } - if (png_ptr->pass == 6) /* skip top generated row */ - { - png_push_have_row(png_ptr, png_bytep_NULL); - png_read_push_finish_row(png_ptr); - } - break; - } - case 6: - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - if (png_ptr->pass != 6) - break; - png_push_have_row(png_ptr, png_bytep_NULL); - png_read_push_finish_row(png_ptr); - } - } - } - else -#endif - { - png_push_have_row(png_ptr, png_ptr->row_buf + 1); - png_read_push_finish_row(png_ptr); - } -} - -void /* PRIVATE */ -png_read_push_finish_row(png_structp png_ptr) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */ - - /* start of interlace block */ - const int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; - - /* offset to next interlace block */ - const int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; - - /* start of interlace block in the y direction */ - const int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1}; - - /* offset to next interlace block in the y direction */ - const int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2}; - - /* Width of interlace block. This is not currently used - if you need - * it, uncomment it here and in png.h - const int FARDATA png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; - */ - - /* Height of interlace block. This is not currently used - if you need - * it, uncomment it here and in png.h - const int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1}; - */ -#endif - - png_ptr->row_number++; - if (png_ptr->row_number < png_ptr->num_rows) - return; - - if (png_ptr->interlaced) - { - png_ptr->row_number = 0; - png_memset_check(png_ptr, png_ptr->prev_row, 0, - png_ptr->rowbytes + 1); - do - { - png_ptr->pass++; - if ((png_ptr->pass == 1 && png_ptr->width < 5) || - (png_ptr->pass == 3 && png_ptr->width < 3) || - (png_ptr->pass == 5 && png_ptr->width < 2)) - png_ptr->pass++; - - if (png_ptr->pass > 7) - png_ptr->pass--; - if (png_ptr->pass >= 7) - break; - - png_ptr->iwidth = (png_ptr->width + - png_pass_inc[png_ptr->pass] - 1 - - png_pass_start[png_ptr->pass]) / - png_pass_inc[png_ptr->pass]; - - png_ptr->irowbytes = ((png_ptr->iwidth * - png_ptr->pixel_depth + 7) >> 3) + 1; - - if (png_ptr->transformations & PNG_INTERLACE) - break; - - png_ptr->num_rows = (png_ptr->height + - png_pass_yinc[png_ptr->pass] - 1 - - png_pass_ystart[png_ptr->pass]) / - png_pass_yinc[png_ptr->pass]; - - } while (png_ptr->iwidth == 0 || png_ptr->num_rows == 0); - } -} - -#if defined(PNG_READ_tEXt_SUPPORTED) -void /* PRIVATE */ -png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 - length) -{ - if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND)) - { - png_error(png_ptr, "Out of place tEXt"); - /* to quiet some compiler warnings */ - if(info_ptr == NULL) return; - } - -#ifdef PNG_MAX_MALLOC_64K - png_ptr->skip_length = 0; /* This may not be necessary */ - - if (length > (png_uint_32)65535L) /* Can't hold entire string in memory */ - { - png_warning(png_ptr, "tEXt chunk too large to fit in memory"); - png_ptr->skip_length = length - (png_uint_32)65535L; - length = (png_uint_32)65535L; - } -#endif - - png_ptr->current_text = (png_charp)png_malloc(png_ptr, - (png_uint_32)(length+1)); - png_ptr->current_text[length] = '\0'; - png_ptr->current_text_ptr = png_ptr->current_text; - png_ptr->current_text_size = (png_size_t)length; - png_ptr->current_text_left = (png_size_t)length; - png_ptr->process_mode = PNG_READ_tEXt_MODE; -} - -void /* PRIVATE */ -png_push_read_tEXt(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr->buffer_size && png_ptr->current_text_left) - { - png_size_t text_size; - - if (png_ptr->buffer_size < png_ptr->current_text_left) - text_size = png_ptr->buffer_size; - else - text_size = png_ptr->current_text_left; - png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size); - png_ptr->current_text_left -= text_size; - png_ptr->current_text_ptr += text_size; - } - if (!(png_ptr->current_text_left)) - { - png_textp text_ptr; - png_charp text; - png_charp key; - int ret; - - if (png_ptr->buffer_size < 4) - { - png_push_save_buffer(png_ptr); - return; - } - - png_push_crc_finish(png_ptr); - -#if defined(PNG_MAX_MALLOC_64K) - if (png_ptr->skip_length) - return; -#endif - - key = png_ptr->current_text; - - for (text = key; *text; text++) - /* empty loop */ ; - - if (text != key + png_ptr->current_text_size) - text++; - - text_ptr = (png_textp)png_malloc(png_ptr, (png_uint_32)sizeof(png_text)); - text_ptr->compression = PNG_TEXT_COMPRESSION_NONE; - text_ptr->key = key; -#ifdef PNG_iTXt_SUPPORTED - text_ptr->lang = NULL; - text_ptr->lang_key = NULL; -#endif - text_ptr->text = text; - - ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1); - - png_free(png_ptr, key); - png_free(png_ptr, text_ptr); - png_ptr->current_text = NULL; - - if (ret) - png_warning(png_ptr, "Insufficient memory to store text chunk."); - } -} -#endif - -#if defined(PNG_READ_zTXt_SUPPORTED) -void /* PRIVATE */ -png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 - length) -{ - if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND)) - { - png_error(png_ptr, "Out of place zTXt"); - /* to quiet some compiler warnings */ - if(info_ptr == NULL) return; - } - -#ifdef PNG_MAX_MALLOC_64K - /* We can't handle zTXt chunks > 64K, since we don't have enough space - * to be able to store the uncompressed data. Actually, the threshold - * is probably around 32K, but it isn't as definite as 64K is. - */ - if (length > (png_uint_32)65535L) - { - png_warning(png_ptr, "zTXt chunk too large to fit in memory"); - png_push_crc_skip(png_ptr, length); - return; - } -#endif - - png_ptr->current_text = (png_charp)png_malloc(png_ptr, - (png_uint_32)(length+1)); - png_ptr->current_text[length] = '\0'; - png_ptr->current_text_ptr = png_ptr->current_text; - png_ptr->current_text_size = (png_size_t)length; - png_ptr->current_text_left = (png_size_t)length; - png_ptr->process_mode = PNG_READ_zTXt_MODE; -} - -void /* PRIVATE */ -png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr->buffer_size && png_ptr->current_text_left) - { - png_size_t text_size; - - if (png_ptr->buffer_size < (png_uint_32)png_ptr->current_text_left) - text_size = png_ptr->buffer_size; - else - text_size = png_ptr->current_text_left; - png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size); - png_ptr->current_text_left -= text_size; - png_ptr->current_text_ptr += text_size; - } - if (!(png_ptr->current_text_left)) - { - png_textp text_ptr; - png_charp text; - png_charp key; - int ret; - png_size_t text_size, key_size; - - if (png_ptr->buffer_size < 4) - { - png_push_save_buffer(png_ptr); - return; - } - - png_push_crc_finish(png_ptr); - - key = png_ptr->current_text; - - for (text = key; *text; text++) - /* empty loop */ ; - - /* zTXt can't have zero text */ - if (text == key + png_ptr->current_text_size) - { - png_ptr->current_text = NULL; - png_free(png_ptr, key); - return; - } - - text++; - - if (*text != PNG_TEXT_COMPRESSION_zTXt) /* check compression byte */ - { - png_ptr->current_text = NULL; - png_free(png_ptr, key); - return; - } - - text++; - - png_ptr->zstream.next_in = (png_bytep )text; - png_ptr->zstream.avail_in = (uInt)(png_ptr->current_text_size - - (text - key)); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - - key_size = text - key; - text_size = 0; - text = NULL; - ret = Z_STREAM_END; - - while (png_ptr->zstream.avail_in) - { - ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); - if (ret != Z_OK && ret != Z_STREAM_END) - { - inflateReset(&png_ptr->zstream); - png_ptr->zstream.avail_in = 0; - png_ptr->current_text = NULL; - png_free(png_ptr, key); - png_free(png_ptr, text); - return; - } - if (!(png_ptr->zstream.avail_out) || ret == Z_STREAM_END) - { - if (text == NULL) - { - text = (png_charp)png_malloc(png_ptr, - (png_uint_32)(png_ptr->zbuf_size - png_ptr->zstream.avail_out - + key_size + 1)); - png_memcpy(text + key_size, png_ptr->zbuf, - png_ptr->zbuf_size - png_ptr->zstream.avail_out); - png_memcpy(text, key, key_size); - text_size = key_size + png_ptr->zbuf_size - - png_ptr->zstream.avail_out; - *(text + text_size) = '\0'; - } - else - { - png_charp tmp; - - tmp = text; - text = (png_charp)png_malloc(png_ptr, text_size + - (png_uint_32)(png_ptr->zbuf_size - png_ptr->zstream.avail_out - + 1)); - png_memcpy(text, tmp, text_size); - png_free(png_ptr, tmp); - png_memcpy(text + text_size, png_ptr->zbuf, - png_ptr->zbuf_size - png_ptr->zstream.avail_out); - text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out; - *(text + text_size) = '\0'; - } - if (ret != Z_STREAM_END) - { - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - } - } - else - { - break; - } - - if (ret == Z_STREAM_END) - break; - } - - inflateReset(&png_ptr->zstream); - png_ptr->zstream.avail_in = 0; - - if (ret != Z_STREAM_END) - { - png_ptr->current_text = NULL; - png_free(png_ptr, key); - png_free(png_ptr, text); - return; - } - - png_ptr->current_text = NULL; - png_free(png_ptr, key); - key = text; - text += key_size; - - text_ptr = (png_textp)png_malloc(png_ptr, (png_uint_32)sizeof(png_text)); - text_ptr->compression = PNG_TEXT_COMPRESSION_zTXt; - text_ptr->key = key; -#ifdef PNG_iTXt_SUPPORTED - text_ptr->lang = NULL; - text_ptr->lang_key = NULL; -#endif - text_ptr->text = text; - - ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1); - - png_free(png_ptr, key); - png_free(png_ptr, text_ptr); - - if (ret) - png_warning(png_ptr, "Insufficient memory to store text chunk."); - } -} -#endif - -#if defined(PNG_READ_iTXt_SUPPORTED) -void /* PRIVATE */ -png_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 - length) -{ - if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND)) - { - png_error(png_ptr, "Out of place iTXt"); - /* to quiet some compiler warnings */ - if(info_ptr == NULL) return; - } - -#ifdef PNG_MAX_MALLOC_64K - png_ptr->skip_length = 0; /* This may not be necessary */ - - if (length > (png_uint_32)65535L) /* Can't hold entire string in memory */ - { - png_warning(png_ptr, "iTXt chunk too large to fit in memory"); - png_ptr->skip_length = length - (png_uint_32)65535L; - length = (png_uint_32)65535L; - } -#endif - - png_ptr->current_text = (png_charp)png_malloc(png_ptr, - (png_uint_32)(length+1)); - png_ptr->current_text[length] = '\0'; - png_ptr->current_text_ptr = png_ptr->current_text; - png_ptr->current_text_size = (png_size_t)length; - png_ptr->current_text_left = (png_size_t)length; - png_ptr->process_mode = PNG_READ_iTXt_MODE; -} - -void /* PRIVATE */ -png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr) -{ - - if (png_ptr->buffer_size && png_ptr->current_text_left) - { - png_size_t text_size; - - if (png_ptr->buffer_size < png_ptr->current_text_left) - text_size = png_ptr->buffer_size; - else - text_size = png_ptr->current_text_left; - png_crc_read(png_ptr, (png_bytep)png_ptr->current_text_ptr, text_size); - png_ptr->current_text_left -= text_size; - png_ptr->current_text_ptr += text_size; - } - if (!(png_ptr->current_text_left)) - { - png_textp text_ptr; - png_charp key; - int comp_flag; - png_charp lang; - png_charp lang_key; - png_charp text; - int ret; - - if (png_ptr->buffer_size < 4) - { - png_push_save_buffer(png_ptr); - return; - } - - png_push_crc_finish(png_ptr); - -#if defined(PNG_MAX_MALLOC_64K) - if (png_ptr->skip_length) - return; -#endif - - key = png_ptr->current_text; - - for (lang = key; *lang; lang++) - /* empty loop */ ; - - if (lang != key + png_ptr->current_text_size) - lang++; - - comp_flag = *lang++; - lang++; /* skip comp_type, always zero */ - - for (lang_key = lang; *lang_key; lang_key++) - /* empty loop */ ; - lang_key++; /* skip NUL separator */ - - for (text = lang_key; *text; text++) - /* empty loop */ ; - - if (text != key + png_ptr->current_text_size) - text++; - - text_ptr = (png_textp)png_malloc(png_ptr, (png_uint_32)sizeof(png_text)); - text_ptr->compression = comp_flag + 2; - text_ptr->key = key; - text_ptr->lang = lang; - text_ptr->lang_key = lang_key; - text_ptr->text = text; - text_ptr->text_length = 0; - text_ptr->itxt_length = png_strlen(text); - - ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1); - - png_ptr->current_text = NULL; - - png_free(png_ptr, text_ptr); - if (ret) - png_warning(png_ptr, "Insufficient memory to store iTXt chunk."); - } -} -#endif - -/* This function is called when we haven't found a handler for this - * chunk. If there isn't a problem with the chunk itself (ie a bad chunk - * name or a critical chunk), the chunk is (currently) silently ignored. - */ -void /* PRIVATE */ -png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 - length) -{ - png_uint_32 skip=0; - png_check_chunk_name(png_ptr, png_ptr->chunk_name); - - if (!(png_ptr->chunk_name[0] & 0x20)) - { -#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) - if(png_handle_as_unknown(png_ptr, png_ptr->chunk_name) != - HANDLE_CHUNK_ALWAYS -#if defined(PNG_READ_USER_CHUNKS_SUPPORTED) - && png_ptr->read_user_chunk_fn == NULL -#endif - ) -#endif - png_chunk_error(png_ptr, "unknown critical chunk"); - - /* to quiet compiler warnings about unused info_ptr */ - if (info_ptr == NULL) - return; - } - -#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) - if (png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS) - { - png_unknown_chunk chunk; - -#ifdef PNG_MAX_MALLOC_64K - if (length > (png_uint_32)65535L) - { - png_warning(png_ptr, "unknown chunk too large to fit in memory"); - skip = length - (png_uint_32)65535L; - length = (png_uint_32)65535L; - } -#endif - - png_strcpy((png_charp)chunk.name, (png_charp)png_ptr->chunk_name); - chunk.data = (png_bytep)png_malloc(png_ptr, length); - png_crc_read(png_ptr, chunk.data, length); - chunk.size = length; -#if defined(PNG_READ_USER_CHUNKS_SUPPORTED) - if(png_ptr->read_user_chunk_fn != NULL) - { - /* callback to user unknown chunk handler */ - if ((*(png_ptr->read_user_chunk_fn)) (png_ptr, &chunk) <= 0) - { - if (!(png_ptr->chunk_name[0] & 0x20)) - if(png_handle_as_unknown(png_ptr, png_ptr->chunk_name) != - HANDLE_CHUNK_ALWAYS) - png_chunk_error(png_ptr, "unknown critical chunk"); - } - png_set_unknown_chunks(png_ptr, info_ptr, &chunk, 1); - } - else -#endif - png_set_unknown_chunks(png_ptr, info_ptr, &chunk, 1); - png_free(png_ptr, chunk.data); - } - else -#endif - skip=length; - png_push_crc_skip(png_ptr, skip); -} - -void /* PRIVATE */ -png_push_have_info(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr->info_fn != NULL) - (*(png_ptr->info_fn))(png_ptr, info_ptr); -} - -void /* PRIVATE */ -png_push_have_end(png_structp png_ptr, png_infop info_ptr) -{ - if (png_ptr->end_fn != NULL) - (*(png_ptr->end_fn))(png_ptr, info_ptr); -} - -void /* PRIVATE */ -png_push_have_row(png_structp png_ptr, png_bytep row) -{ - if (png_ptr->row_fn != NULL) - (*(png_ptr->row_fn))(png_ptr, row, png_ptr->row_number, - (int)png_ptr->pass); -} - -void PNGAPI -png_progressive_combine_row (png_structp png_ptr, - png_bytep old_row, png_bytep new_row) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - const int FARDATA png_pass_dsp_mask[7] = - {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff}; -#endif - if (new_row != NULL) /* new_row must == png_ptr->row_buf here. */ - png_combine_row(png_ptr, old_row, png_pass_dsp_mask[png_ptr->pass]); -} - -void PNGAPI -png_set_progressive_read_fn(png_structp png_ptr, png_voidp progressive_ptr, - png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, - png_progressive_end_ptr end_fn) -{ - png_ptr->info_fn = info_fn; - png_ptr->row_fn = row_fn; - png_ptr->end_fn = end_fn; - - png_set_read_fn(png_ptr, progressive_ptr, png_push_fill_buffer); -} - -png_voidp PNGAPI -png_get_progressive_ptr(png_structp png_ptr) -{ - return png_ptr->io_ptr; -} -#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngread.c b/gtkmm-osx/trunk/libpng-1.2.5/pngread.c deleted file mode 100644 index e91d3e8..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/pngread.c +++ /dev/null @@ -1,1424 +0,0 @@ - -/* pngread.c - read a PNG file - * - * libpng 1.2.5 - October 3, 2002 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2002 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) - * - * This file contains routines that an application calls directly to - * read a PNG file or stream. - */ - -#define PNG_INTERNAL -#include "png.h" - -/* Create a PNG structure for reading, and allocate any memory needed. */ -png_structp PNGAPI -png_create_read_struct(png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn) -{ - -#ifdef PNG_USER_MEM_SUPPORTED - return (png_create_read_struct_2(user_png_ver, error_ptr, error_fn, - warn_fn, png_voidp_NULL, png_malloc_ptr_NULL, png_free_ptr_NULL)); -} - -/* Alternate create PNG structure for reading, and allocate any memory needed. */ -png_structp PNGAPI -png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, - png_malloc_ptr malloc_fn, png_free_ptr free_fn) -{ -#endif /* PNG_USER_MEM_SUPPORTED */ - - png_structp png_ptr; - -#ifdef PNG_SETJMP_SUPPORTED -#ifdef USE_FAR_KEYWORD - jmp_buf jmpbuf; -#endif -#endif - - int i; - - png_debug(1, "in png_create_read_struct\n"); -#ifdef PNG_USER_MEM_SUPPORTED - png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG, - (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr); -#else - png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG); -#endif - if (png_ptr == NULL) - return (NULL); - -#if !defined(PNG_1_0_X) -#ifdef PNG_ASSEMBLER_CODE_SUPPORTED - png_init_mmx_flags(png_ptr); /* 1.2.0 addition */ -#endif -#endif /* PNG_1_0_X */ - -#ifdef PNG_SETJMP_SUPPORTED -#ifdef USE_FAR_KEYWORD - if (setjmp(jmpbuf)) -#else - if (setjmp(png_ptr->jmpbuf)) -#endif - { - png_free(png_ptr, png_ptr->zbuf); - png_ptr->zbuf=NULL; -#ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2((png_voidp)png_ptr, - (png_free_ptr)free_fn, (png_voidp)mem_ptr); -#else - png_destroy_struct((png_voidp)png_ptr); -#endif - return (NULL); - } -#ifdef USE_FAR_KEYWORD - png_memcpy(png_ptr->jmpbuf,jmpbuf,sizeof(jmp_buf)); -#endif -#endif - -#ifdef PNG_USER_MEM_SUPPORTED - png_set_mem_fn(png_ptr, mem_ptr, malloc_fn, free_fn); -#endif - - png_set_error_fn(png_ptr, error_ptr, error_fn, warn_fn); - - i=0; - do - { - if(user_png_ver[i] != png_libpng_ver[i]) - png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; - } while (png_libpng_ver[i++]); - - if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH) - { - /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so - * we must recompile any applications that use any older library version. - * For versions after libpng 1.0, we will be compatible, so we need - * only check the first digit. - */ - if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] || - (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) || - (user_png_ver[0] == '0' && user_png_ver[2] < '9')) - { -#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) - char msg[80]; - if (user_png_ver) - { - sprintf(msg, "Application was compiled with png.h from libpng-%.20s", - user_png_ver); - png_warning(png_ptr, msg); - } - sprintf(msg, "Application is running with png.c from libpng-%.20s", - png_libpng_ver); - png_warning(png_ptr, msg); -#endif -#ifdef PNG_ERROR_NUMBERS_SUPPORTED - png_ptr->flags=0; -#endif - png_error(png_ptr, - "Incompatible libpng version in application and library"); - } - } - - /* initialize zbuf - compression buffer */ - png_ptr->zbuf_size = PNG_ZBUF_SIZE; - png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, - (png_uint_32)png_ptr->zbuf_size); - png_ptr->zstream.zalloc = png_zalloc; - png_ptr->zstream.zfree = png_zfree; - png_ptr->zstream.opaque = (voidpf)png_ptr; - - switch (inflateInit(&png_ptr->zstream)) - { - case Z_OK: /* Do nothing */ break; - case Z_MEM_ERROR: - case Z_STREAM_ERROR: png_error(png_ptr, "zlib memory error"); break; - case Z_VERSION_ERROR: png_error(png_ptr, "zlib version error"); break; - default: png_error(png_ptr, "Unknown zlib error"); - } - - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - - png_set_read_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL); - -#ifdef PNG_SETJMP_SUPPORTED -/* Applications that neglect to set up their own setjmp() and then encounter - a png_error() will longjmp here. Since the jmpbuf is then meaningless we - abort instead of returning. */ -#ifdef USE_FAR_KEYWORD - if (setjmp(jmpbuf)) - PNG_ABORT(); - png_memcpy(png_ptr->jmpbuf,jmpbuf,sizeof(jmp_buf)); -#else - if (setjmp(png_ptr->jmpbuf)) - PNG_ABORT(); -#endif -#endif - return (png_ptr); -} - -/* Initialize PNG structure for reading, and allocate any memory needed. - This interface is deprecated in favour of the png_create_read_struct(), - and it will eventually disappear. */ -#undef png_read_init -void PNGAPI -png_read_init(png_structp png_ptr) -{ - /* We only come here via pre-1.0.7-compiled applications */ - png_read_init_2(png_ptr, "1.0.6 or earlier", 0, 0); -} - -void PNGAPI -png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver, - png_size_t png_struct_size, png_size_t png_info_size) -{ - /* We only come here via pre-1.0.12-compiled applications */ -#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) - if(sizeof(png_struct) > png_struct_size || sizeof(png_info) > png_info_size) - { - char msg[80]; - png_ptr->warning_fn=NULL; - if (user_png_ver) - { - sprintf(msg, "Application was compiled with png.h from libpng-%.20s", - user_png_ver); - png_warning(png_ptr, msg); - } - sprintf(msg, "Application is running with png.c from libpng-%.20s", - png_libpng_ver); - png_warning(png_ptr, msg); - } -#endif - if(sizeof(png_struct) > png_struct_size) - { - png_ptr->error_fn=NULL; -#ifdef PNG_ERROR_NUMBERS_SUPPORTED - png_ptr->flags=0; -#endif - png_error(png_ptr, - "The png struct allocated by the application for reading is too small."); - } - if(sizeof(png_info) > png_info_size) - { - png_ptr->error_fn=NULL; -#ifdef PNG_ERROR_NUMBERS_SUPPORTED - png_ptr->flags=0; -#endif - png_error(png_ptr, - "The info struct allocated by application for reading is too small."); - } - png_read_init_3(&png_ptr, user_png_ver, png_struct_size); -} - -void PNGAPI -png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver, - png_size_t png_struct_size) -{ -#ifdef PNG_SETJMP_SUPPORTED - jmp_buf tmp_jmp; /* to save current jump buffer */ -#endif - - int i=0; - - png_structp png_ptr=*ptr_ptr; - - do - { - if(user_png_ver[i] != png_libpng_ver[i]) - { -#ifdef PNG_LEGACY_SUPPORTED - png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; -#else - png_ptr->warning_fn=NULL; - png_warning(png_ptr, - "Application uses deprecated png_read_init() and should be recompiled."); - break; -#endif - } - } while (png_libpng_ver[i++]); - - png_debug(1, "in png_read_init_3\n"); - -#ifdef PNG_SETJMP_SUPPORTED - /* save jump buffer and error functions */ - png_memcpy(tmp_jmp, png_ptr->jmpbuf, sizeof (jmp_buf)); -#endif - - if(sizeof(png_struct) > png_struct_size) - { - png_destroy_struct(png_ptr); - *ptr_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG); - png_ptr = *ptr_ptr; - } - - /* reset all variables to 0 */ - png_memset(png_ptr, 0, sizeof (png_struct)); - -#ifdef PNG_SETJMP_SUPPORTED - /* restore jump buffer */ - png_memcpy(png_ptr->jmpbuf, tmp_jmp, sizeof (jmp_buf)); -#endif - - /* initialize zbuf - compression buffer */ - png_ptr->zbuf_size = PNG_ZBUF_SIZE; - png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, - (png_uint_32)png_ptr->zbuf_size); - png_ptr->zstream.zalloc = png_zalloc; - png_ptr->zstream.zfree = png_zfree; - png_ptr->zstream.opaque = (voidpf)png_ptr; - - switch (inflateInit(&png_ptr->zstream)) - { - case Z_OK: /* Do nothing */ break; - case Z_MEM_ERROR: - case Z_STREAM_ERROR: png_error(png_ptr, "zlib memory"); break; - case Z_VERSION_ERROR: png_error(png_ptr, "zlib version"); break; - default: png_error(png_ptr, "Unknown zlib error"); - } - - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - - png_set_read_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL); -} - -/* Read the information before the actual image data. This has been - * changed in v0.90 to allow reading a file that already has the magic - * bytes read from the stream. You can tell libpng how many bytes have - * been read from the beginning of the stream (up to the maximum of 8) - * via png_set_sig_bytes(), and we will only check the remaining bytes - * here. The application can then have access to the signature bytes we - * read if it is determined that this isn't a valid PNG file. - */ -void PNGAPI -png_read_info(png_structp png_ptr, png_infop info_ptr) -{ - png_debug(1, "in png_read_info\n"); - /* If we haven't checked all of the PNG signature bytes, do so now. */ - if (png_ptr->sig_bytes < 8) - { - png_size_t num_checked = png_ptr->sig_bytes, - num_to_check = 8 - num_checked; - - png_read_data(png_ptr, &(info_ptr->signature[num_checked]), num_to_check); - png_ptr->sig_bytes = 8; - - if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check)) - { - if (num_checked < 4 && - png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4)) - png_error(png_ptr, "Not a PNG file"); - else - png_error(png_ptr, "PNG file corrupted by ASCII conversion"); - } - if (num_checked < 3) - png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE; - } - - for(;;) - { -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_IHDR; - PNG_IDAT; - PNG_IEND; - PNG_PLTE; -#if defined(PNG_READ_bKGD_SUPPORTED) - PNG_bKGD; -#endif -#if defined(PNG_READ_cHRM_SUPPORTED) - PNG_cHRM; -#endif -#if defined(PNG_READ_gAMA_SUPPORTED) - PNG_gAMA; -#endif -#if defined(PNG_READ_hIST_SUPPORTED) - PNG_hIST; -#endif -#if defined(PNG_READ_iCCP_SUPPORTED) - PNG_iCCP; -#endif -#if defined(PNG_READ_iTXt_SUPPORTED) - PNG_iTXt; -#endif -#if defined(PNG_READ_oFFs_SUPPORTED) - PNG_oFFs; -#endif -#if defined(PNG_READ_pCAL_SUPPORTED) - PNG_pCAL; -#endif -#if defined(PNG_READ_pHYs_SUPPORTED) - PNG_pHYs; -#endif -#if defined(PNG_READ_sBIT_SUPPORTED) - PNG_sBIT; -#endif -#if defined(PNG_READ_sCAL_SUPPORTED) - PNG_sCAL; -#endif -#if defined(PNG_READ_sPLT_SUPPORTED) - PNG_sPLT; -#endif -#if defined(PNG_READ_sRGB_SUPPORTED) - PNG_sRGB; -#endif -#if defined(PNG_READ_tEXt_SUPPORTED) - PNG_tEXt; -#endif -#if defined(PNG_READ_tIME_SUPPORTED) - PNG_tIME; -#endif -#if defined(PNG_READ_tRNS_SUPPORTED) - PNG_tRNS; -#endif -#if defined(PNG_READ_zTXt_SUPPORTED) - PNG_zTXt; -#endif -#endif /* PNG_GLOBAL_ARRAYS */ - png_byte chunk_length[4]; - png_uint_32 length; - - png_read_data(png_ptr, chunk_length, 4); - length = png_get_uint_32(chunk_length); - - png_reset_crc(png_ptr); - png_crc_read(png_ptr, png_ptr->chunk_name, 4); - - png_debug2(0, "Reading %s chunk, length=%lu.\n", png_ptr->chunk_name, - length); - - if (length > PNG_MAX_UINT) - png_error(png_ptr, "Invalid chunk length."); - - /* This should be a binary subdivision search or a hash for - * matching the chunk name rather than a linear search. - */ - if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4)) - png_handle_IHDR(png_ptr, info_ptr, length); - else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4)) - png_handle_IEND(png_ptr, info_ptr, length); -#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED - else if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name)) - { - if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) - png_ptr->mode |= PNG_HAVE_IDAT; - png_handle_unknown(png_ptr, info_ptr, length); - if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4)) - png_ptr->mode |= PNG_HAVE_PLTE; - else if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) - { - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before IDAT"); - else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && - !(png_ptr->mode & PNG_HAVE_PLTE)) - png_error(png_ptr, "Missing PLTE before IDAT"); - break; - } - } -#endif - else if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4)) - png_handle_PLTE(png_ptr, info_ptr, length); - else if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) - { - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before IDAT"); - else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && - !(png_ptr->mode & PNG_HAVE_PLTE)) - png_error(png_ptr, "Missing PLTE before IDAT"); - - png_ptr->idat_size = length; - png_ptr->mode |= PNG_HAVE_IDAT; - break; - } -#if defined(PNG_READ_bKGD_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_bKGD, 4)) - png_handle_bKGD(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_cHRM_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_cHRM, 4)) - png_handle_cHRM(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_gAMA_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_gAMA, 4)) - png_handle_gAMA(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_hIST_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_hIST, 4)) - png_handle_hIST(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_oFFs_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_oFFs, 4)) - png_handle_oFFs(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_pCAL_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_pCAL, 4)) - png_handle_pCAL(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_sCAL_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_sCAL, 4)) - png_handle_sCAL(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_pHYs_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_pHYs, 4)) - png_handle_pHYs(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_sBIT_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_sBIT, 4)) - png_handle_sBIT(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_sRGB_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_sRGB, 4)) - png_handle_sRGB(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_iCCP_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_iCCP, 4)) - png_handle_iCCP(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_sPLT_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_sPLT, 4)) - png_handle_sPLT(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_tEXt_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_tEXt, 4)) - png_handle_tEXt(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_tIME_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_tIME, 4)) - png_handle_tIME(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_tRNS_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_tRNS, 4)) - png_handle_tRNS(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_zTXt_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_zTXt, 4)) - png_handle_zTXt(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_iTXt_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_iTXt, 4)) - png_handle_iTXt(png_ptr, info_ptr, length); -#endif - else - png_handle_unknown(png_ptr, info_ptr, length); - } -} - -/* optional call to update the users info_ptr structure */ -void PNGAPI -png_read_update_info(png_structp png_ptr, png_infop info_ptr) -{ - png_debug(1, "in png_read_update_info\n"); - if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) - png_read_start_row(png_ptr); - else - png_warning(png_ptr, - "Ignoring extra png_read_update_info() call; row buffer not reallocated"); - png_read_transform_info(png_ptr, info_ptr); -} - -/* Initialize palette, background, etc, after transformations - * are set, but before any reading takes place. This allows - * the user to obtain a gamma-corrected palette, for example. - * If the user doesn't call this, we will do it ourselves. - */ -void PNGAPI -png_start_read_image(png_structp png_ptr) -{ - png_debug(1, "in png_start_read_image\n"); - if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) - png_read_start_row(png_ptr); -} - -void PNGAPI -png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_IDAT; - const int png_pass_dsp_mask[7] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff}; - const int png_pass_mask[7] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff}; -#endif - int ret; - png_debug2(1, "in png_read_row (row %lu, pass %d)\n", - png_ptr->row_number, png_ptr->pass); - if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) - png_read_start_row(png_ptr); - if (png_ptr->row_number == 0 && png_ptr->pass == 0) - { - /* check for transforms that have been set but were defined out */ -#if defined(PNG_WRITE_INVERT_SUPPORTED) && !defined(PNG_READ_INVERT_SUPPORTED) - if (png_ptr->transformations & PNG_INVERT_MONO) - png_warning(png_ptr, "PNG_READ_INVERT_SUPPORTED is not defined."); -#endif -#if defined(PNG_WRITE_FILLER_SUPPORTED) && !defined(PNG_READ_FILLER_SUPPORTED) - if (png_ptr->transformations & PNG_FILLER) - png_warning(png_ptr, "PNG_READ_FILLER_SUPPORTED is not defined."); -#endif -#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && !defined(PNG_READ_PACKSWAP_SUPPORTED) - if (png_ptr->transformations & PNG_PACKSWAP) - png_warning(png_ptr, "PNG_READ_PACKSWAP_SUPPORTED is not defined."); -#endif -#if defined(PNG_WRITE_PACK_SUPPORTED) && !defined(PNG_READ_PACK_SUPPORTED) - if (png_ptr->transformations & PNG_PACK) - png_warning(png_ptr, "PNG_READ_PACK_SUPPORTED is not defined."); -#endif -#if defined(PNG_WRITE_SHIFT_SUPPORTED) && !defined(PNG_READ_SHIFT_SUPPORTED) - if (png_ptr->transformations & PNG_SHIFT) - png_warning(png_ptr, "PNG_READ_SHIFT_SUPPORTED is not defined."); -#endif -#if defined(PNG_WRITE_BGR_SUPPORTED) && !defined(PNG_READ_BGR_SUPPORTED) - if (png_ptr->transformations & PNG_BGR) - png_warning(png_ptr, "PNG_READ_BGR_SUPPORTED is not defined."); -#endif -#if defined(PNG_WRITE_SWAP_SUPPORTED) && !defined(PNG_READ_SWAP_SUPPORTED) - if (png_ptr->transformations & PNG_SWAP_BYTES) - png_warning(png_ptr, "PNG_READ_SWAP_SUPPORTED is not defined."); -#endif - } - -#if defined(PNG_READ_INTERLACING_SUPPORTED) - /* if interlaced and we do not need a new row, combine row and return */ - if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) - { - switch (png_ptr->pass) - { - case 0: - if (png_ptr->row_number & 0x07) - { - if (dsp_row != NULL) - png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); - png_read_finish_row(png_ptr); - return; - } - break; - case 1: - if ((png_ptr->row_number & 0x07) || png_ptr->width < 5) - { - if (dsp_row != NULL) - png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); - png_read_finish_row(png_ptr); - return; - } - break; - case 2: - if ((png_ptr->row_number & 0x07) != 4) - { - if (dsp_row != NULL && (png_ptr->row_number & 4)) - png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); - png_read_finish_row(png_ptr); - return; - } - break; - case 3: - if ((png_ptr->row_number & 3) || png_ptr->width < 3) - { - if (dsp_row != NULL) - png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); - png_read_finish_row(png_ptr); - return; - } - break; - case 4: - if ((png_ptr->row_number & 3) != 2) - { - if (dsp_row != NULL && (png_ptr->row_number & 2)) - png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); - png_read_finish_row(png_ptr); - return; - } - break; - case 5: - if ((png_ptr->row_number & 1) || png_ptr->width < 2) - { - if (dsp_row != NULL) - png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); - png_read_finish_row(png_ptr); - return; - } - break; - case 6: - if (!(png_ptr->row_number & 1)) - { - png_read_finish_row(png_ptr); - return; - } - break; - } - } -#endif - - if (!(png_ptr->mode & PNG_HAVE_IDAT)) - png_error(png_ptr, "Invalid attempt to read row data"); - - png_ptr->zstream.next_out = png_ptr->row_buf; - png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes; - do - { - if (!(png_ptr->zstream.avail_in)) - { - while (!png_ptr->idat_size) - { - png_byte chunk_length[4]; - - png_crc_finish(png_ptr, 0); - - png_read_data(png_ptr, chunk_length, 4); - png_ptr->idat_size = png_get_uint_32(chunk_length); - - if (png_ptr->idat_size > PNG_MAX_UINT) - png_error(png_ptr, "Invalid chunk length."); - - png_reset_crc(png_ptr); - png_crc_read(png_ptr, png_ptr->chunk_name, 4); - if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) - png_error(png_ptr, "Not enough image data"); - } - png_ptr->zstream.avail_in = (uInt)png_ptr->zbuf_size; - png_ptr->zstream.next_in = png_ptr->zbuf; - if (png_ptr->zbuf_size > png_ptr->idat_size) - png_ptr->zstream.avail_in = (uInt)png_ptr->idat_size; - png_crc_read(png_ptr, png_ptr->zbuf, - (png_size_t)png_ptr->zstream.avail_in); - png_ptr->idat_size -= png_ptr->zstream.avail_in; - } - ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); - if (ret == Z_STREAM_END) - { - if (png_ptr->zstream.avail_out || png_ptr->zstream.avail_in || - png_ptr->idat_size) - png_error(png_ptr, "Extra compressed data"); - png_ptr->mode |= PNG_AFTER_IDAT; - png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; - break; - } - if (ret != Z_OK) - png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg : - "Decompression error"); - - } while (png_ptr->zstream.avail_out); - - png_ptr->row_info.color_type = png_ptr->color_type; - png_ptr->row_info.width = png_ptr->iwidth; - png_ptr->row_info.channels = png_ptr->channels; - png_ptr->row_info.bit_depth = png_ptr->bit_depth; - png_ptr->row_info.pixel_depth = png_ptr->pixel_depth; - png_ptr->row_info.rowbytes = ((png_ptr->row_info.width * - (png_uint_32)png_ptr->row_info.pixel_depth + 7) >> 3); - - if(png_ptr->row_buf[0]) - png_read_filter_row(png_ptr, &(png_ptr->row_info), - png_ptr->row_buf + 1, png_ptr->prev_row + 1, - (int)(png_ptr->row_buf[0])); - - png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf, - png_ptr->rowbytes + 1); - -#if defined(PNG_MNG_FEATURES_SUPPORTED) - if((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && - (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING)) - { - /* Intrapixel differencing */ - png_do_read_intrapixel(&(png_ptr->row_info), png_ptr->row_buf + 1); - } -#endif - - if (png_ptr->transformations) - png_do_read_transformations(png_ptr); - -#if defined(PNG_READ_INTERLACING_SUPPORTED) - /* blow up interlaced rows to full size */ - if (png_ptr->interlaced && - (png_ptr->transformations & PNG_INTERLACE)) - { - if (png_ptr->pass < 6) -/* old interface (pre-1.0.9): - png_do_read_interlace(&(png_ptr->row_info), - png_ptr->row_buf + 1, png_ptr->pass, png_ptr->transformations); - */ - png_do_read_interlace(png_ptr); - - if (dsp_row != NULL) - png_combine_row(png_ptr, dsp_row, - png_pass_dsp_mask[png_ptr->pass]); - if (row != NULL) - png_combine_row(png_ptr, row, - png_pass_mask[png_ptr->pass]); - } - else -#endif - { - if (row != NULL) - png_combine_row(png_ptr, row, 0xff); - if (dsp_row != NULL) - png_combine_row(png_ptr, dsp_row, 0xff); - } - png_read_finish_row(png_ptr); - - if (png_ptr->read_row_fn != NULL) - (*(png_ptr->read_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass); -} - -/* Read one or more rows of image data. If the image is interlaced, - * and png_set_interlace_handling() has been called, the rows need to - * contain the contents of the rows from the previous pass. If the - * image has alpha or transparency, and png_handle_alpha()[*] has been - * called, the rows contents must be initialized to the contents of the - * screen. - * - * "row" holds the actual image, and pixels are placed in it - * as they arrive. If the image is displayed after each pass, it will - * appear to "sparkle" in. "display_row" can be used to display a - * "chunky" progressive image, with finer detail added as it becomes - * available. If you do not want this "chunky" display, you may pass - * NULL for display_row. If you do not want the sparkle display, and - * you have not called png_handle_alpha(), you may pass NULL for rows. - * If you have called png_handle_alpha(), and the image has either an - * alpha channel or a transparency chunk, you must provide a buffer for - * rows. In this case, you do not have to provide a display_row buffer - * also, but you may. If the image is not interlaced, or if you have - * not called png_set_interlace_handling(), the display_row buffer will - * be ignored, so pass NULL to it. - * - * [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.5 - */ - -void PNGAPI -png_read_rows(png_structp png_ptr, png_bytepp row, - png_bytepp display_row, png_uint_32 num_rows) -{ - png_uint_32 i; - png_bytepp rp; - png_bytepp dp; - - png_debug(1, "in png_read_rows\n"); - rp = row; - dp = display_row; - if (rp != NULL && dp != NULL) - for (i = 0; i < num_rows; i++) - { - png_bytep rptr = *rp++; - png_bytep dptr = *dp++; - - png_read_row(png_ptr, rptr, dptr); - } - else if(rp != NULL) - for (i = 0; i < num_rows; i++) - { - png_bytep rptr = *rp; - png_read_row(png_ptr, rptr, png_bytep_NULL); - rp++; - } - else if(dp != NULL) - for (i = 0; i < num_rows; i++) - { - png_bytep dptr = *dp; - png_read_row(png_ptr, png_bytep_NULL, dptr); - dp++; - } -} - -/* Read the entire image. If the image has an alpha channel or a tRNS - * chunk, and you have called png_handle_alpha()[*], you will need to - * initialize the image to the current image that PNG will be overlaying. - * We set the num_rows again here, in case it was incorrectly set in - * png_read_start_row() by a call to png_read_update_info() or - * png_start_read_image() if png_set_interlace_handling() wasn't called - * prior to either of these functions like it should have been. You can - * only call this function once. If you desire to have an image for - * each pass of a interlaced image, use png_read_rows() instead. - * - * [*] png_handle_alpha() does not exist yet, as of libpng version 1.2.5 - */ -void PNGAPI -png_read_image(png_structp png_ptr, png_bytepp image) -{ - png_uint_32 i,image_height; - int pass, j; - png_bytepp rp; - - png_debug(1, "in png_read_image\n"); - -#ifdef PNG_READ_INTERLACING_SUPPORTED - pass = png_set_interlace_handling(png_ptr); -#else - if (png_ptr->interlaced) - png_error(png_ptr, - "Cannot read interlaced image -- interlace handler disabled."); - pass = 1; -#endif - - - image_height=png_ptr->height; - png_ptr->num_rows = image_height; /* Make sure this is set correctly */ - - for (j = 0; j < pass; j++) - { - rp = image; - for (i = 0; i < image_height; i++) - { - png_read_row(png_ptr, *rp, png_bytep_NULL); - rp++; - } - } -} - -/* Read the end of the PNG file. Will not read past the end of the - * file, will verify the end is accurate, and will read any comments - * or time information at the end of the file, if info is not NULL. - */ -void PNGAPI -png_read_end(png_structp png_ptr, png_infop info_ptr) -{ - png_byte chunk_length[4]; - png_uint_32 length; - - png_debug(1, "in png_read_end\n"); - png_crc_finish(png_ptr, 0); /* Finish off CRC from last IDAT chunk */ - - do - { -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_IHDR; - PNG_IDAT; - PNG_IEND; - PNG_PLTE; -#if defined(PNG_READ_bKGD_SUPPORTED) - PNG_bKGD; -#endif -#if defined(PNG_READ_cHRM_SUPPORTED) - PNG_cHRM; -#endif -#if defined(PNG_READ_gAMA_SUPPORTED) - PNG_gAMA; -#endif -#if defined(PNG_READ_hIST_SUPPORTED) - PNG_hIST; -#endif -#if defined(PNG_READ_iCCP_SUPPORTED) - PNG_iCCP; -#endif -#if defined(PNG_READ_iTXt_SUPPORTED) - PNG_iTXt; -#endif -#if defined(PNG_READ_oFFs_SUPPORTED) - PNG_oFFs; -#endif -#if defined(PNG_READ_pCAL_SUPPORTED) - PNG_pCAL; -#endif -#if defined(PNG_READ_pHYs_SUPPORTED) - PNG_pHYs; -#endif -#if defined(PNG_READ_sBIT_SUPPORTED) - PNG_sBIT; -#endif -#if defined(PNG_READ_sCAL_SUPPORTED) - PNG_sCAL; -#endif -#if defined(PNG_READ_sPLT_SUPPORTED) - PNG_sPLT; -#endif -#if defined(PNG_READ_sRGB_SUPPORTED) - PNG_sRGB; -#endif -#if defined(PNG_READ_tEXt_SUPPORTED) - PNG_tEXt; -#endif -#if defined(PNG_READ_tIME_SUPPORTED) - PNG_tIME; -#endif -#if defined(PNG_READ_tRNS_SUPPORTED) - PNG_tRNS; -#endif -#if defined(PNG_READ_zTXt_SUPPORTED) - PNG_zTXt; -#endif -#endif /* PNG_GLOBAL_ARRAYS */ - - png_read_data(png_ptr, chunk_length, 4); - length = png_get_uint_32(chunk_length); - - png_reset_crc(png_ptr); - png_crc_read(png_ptr, png_ptr->chunk_name, 4); - - png_debug1(0, "Reading %s chunk.\n", png_ptr->chunk_name); - - if (length > PNG_MAX_UINT) - png_error(png_ptr, "Invalid chunk length."); - - if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4)) - png_handle_IHDR(png_ptr, info_ptr, length); - else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4)) - png_handle_IEND(png_ptr, info_ptr, length); -#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED - else if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name)) - { - if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) - { - if (length > 0 || png_ptr->mode & PNG_AFTER_IDAT) - png_error(png_ptr, "Too many IDAT's found"); - } - else - png_ptr->mode |= PNG_AFTER_IDAT; - png_handle_unknown(png_ptr, info_ptr, length); - if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4)) - png_ptr->mode |= PNG_HAVE_PLTE; - } -#endif - else if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) - { - /* Zero length IDATs are legal after the last IDAT has been - * read, but not after other chunks have been read. - */ - if (length > 0 || png_ptr->mode & PNG_AFTER_IDAT) - png_error(png_ptr, "Too many IDAT's found"); - png_crc_finish(png_ptr, length); - } - else if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4)) - png_handle_PLTE(png_ptr, info_ptr, length); -#if defined(PNG_READ_bKGD_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_bKGD, 4)) - png_handle_bKGD(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_cHRM_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_cHRM, 4)) - png_handle_cHRM(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_gAMA_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_gAMA, 4)) - png_handle_gAMA(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_hIST_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_hIST, 4)) - png_handle_hIST(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_oFFs_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_oFFs, 4)) - png_handle_oFFs(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_pCAL_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_pCAL, 4)) - png_handle_pCAL(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_sCAL_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_sCAL, 4)) - png_handle_sCAL(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_pHYs_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_pHYs, 4)) - png_handle_pHYs(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_sBIT_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_sBIT, 4)) - png_handle_sBIT(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_sRGB_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_sRGB, 4)) - png_handle_sRGB(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_iCCP_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_iCCP, 4)) - png_handle_iCCP(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_sPLT_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_sPLT, 4)) - png_handle_sPLT(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_tEXt_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_tEXt, 4)) - png_handle_tEXt(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_tIME_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_tIME, 4)) - png_handle_tIME(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_tRNS_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_tRNS, 4)) - png_handle_tRNS(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_zTXt_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_zTXt, 4)) - png_handle_zTXt(png_ptr, info_ptr, length); -#endif -#if defined(PNG_READ_iTXt_SUPPORTED) - else if (!png_memcmp(png_ptr->chunk_name, png_iTXt, 4)) - png_handle_iTXt(png_ptr, info_ptr, length); -#endif - else - png_handle_unknown(png_ptr, info_ptr, length); - } while (!(png_ptr->mode & PNG_HAVE_IEND)); -} - -/* free all memory used by the read */ -void PNGAPI -png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, - png_infopp end_info_ptr_ptr) -{ - png_structp png_ptr = NULL; - png_infop info_ptr = NULL, end_info_ptr = NULL; -#ifdef PNG_USER_MEM_SUPPORTED - png_free_ptr free_fn = NULL; - png_voidp mem_ptr = NULL; -#endif - - png_debug(1, "in png_destroy_read_struct\n"); - if (png_ptr_ptr != NULL) - png_ptr = *png_ptr_ptr; - - if (info_ptr_ptr != NULL) - info_ptr = *info_ptr_ptr; - - if (end_info_ptr_ptr != NULL) - end_info_ptr = *end_info_ptr_ptr; - -#ifdef PNG_USER_MEM_SUPPORTED - free_fn = png_ptr->free_fn; - mem_ptr = png_ptr->mem_ptr; -#endif - - png_read_destroy(png_ptr, info_ptr, end_info_ptr); - - if (info_ptr != NULL) - { -#if defined(PNG_TEXT_SUPPORTED) - png_free_data(png_ptr, info_ptr, PNG_FREE_TEXT, -1); -#endif - -#ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2((png_voidp)info_ptr, (png_free_ptr)free_fn, - (png_voidp)mem_ptr); -#else - png_destroy_struct((png_voidp)info_ptr); -#endif - *info_ptr_ptr = NULL; - } - - if (end_info_ptr != NULL) - { -#if defined(PNG_READ_TEXT_SUPPORTED) - png_free_data(png_ptr, end_info_ptr, PNG_FREE_TEXT, -1); -#endif -#ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2((png_voidp)end_info_ptr, (png_free_ptr)free_fn, - (png_voidp)mem_ptr); -#else - png_destroy_struct((png_voidp)end_info_ptr); -#endif - *end_info_ptr_ptr = NULL; - } - - if (png_ptr != NULL) - { -#ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2((png_voidp)png_ptr, (png_free_ptr)free_fn, - (png_voidp)mem_ptr); -#else - png_destroy_struct((png_voidp)png_ptr); -#endif - *png_ptr_ptr = NULL; - } -} - -/* free all memory used by the read (old method) */ -void /* PRIVATE */ -png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr) -{ -#ifdef PNG_SETJMP_SUPPORTED - jmp_buf tmp_jmp; -#endif - png_error_ptr error_fn; - png_error_ptr warning_fn; - png_voidp error_ptr; -#ifdef PNG_USER_MEM_SUPPORTED - png_free_ptr free_fn; -#endif - - png_debug(1, "in png_read_destroy\n"); - if (info_ptr != NULL) - png_info_destroy(png_ptr, info_ptr); - - if (end_info_ptr != NULL) - png_info_destroy(png_ptr, end_info_ptr); - - png_free(png_ptr, png_ptr->zbuf); - png_free(png_ptr, png_ptr->big_row_buf); - png_free(png_ptr, png_ptr->prev_row); -#if defined(PNG_READ_DITHER_SUPPORTED) - png_free(png_ptr, png_ptr->palette_lookup); - png_free(png_ptr, png_ptr->dither_index); -#endif -#if defined(PNG_READ_GAMMA_SUPPORTED) - png_free(png_ptr, png_ptr->gamma_table); -#endif -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - png_free(png_ptr, png_ptr->gamma_from_1); - png_free(png_ptr, png_ptr->gamma_to_1); -#endif -#ifdef PNG_FREE_ME_SUPPORTED - if (png_ptr->free_me & PNG_FREE_PLTE) - png_zfree(png_ptr, png_ptr->palette); - png_ptr->free_me &= ~PNG_FREE_PLTE; -#else - if (png_ptr->flags & PNG_FLAG_FREE_PLTE) - png_zfree(png_ptr, png_ptr->palette); - png_ptr->flags &= ~PNG_FLAG_FREE_PLTE; -#endif -#if defined(PNG_tRNS_SUPPORTED) || \ - defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) -#ifdef PNG_FREE_ME_SUPPORTED - if (png_ptr->free_me & PNG_FREE_TRNS) - png_free(png_ptr, png_ptr->trans); - png_ptr->free_me &= ~PNG_FREE_TRNS; -#else - if (png_ptr->flags & PNG_FLAG_FREE_TRNS) - png_free(png_ptr, png_ptr->trans); - png_ptr->flags &= ~PNG_FLAG_FREE_TRNS; -#endif -#endif -#if defined(PNG_READ_hIST_SUPPORTED) -#ifdef PNG_FREE_ME_SUPPORTED - if (png_ptr->free_me & PNG_FREE_HIST) - png_free(png_ptr, png_ptr->hist); - png_ptr->free_me &= ~PNG_FREE_HIST; -#else - if (png_ptr->flags & PNG_FLAG_FREE_HIST) - png_free(png_ptr, png_ptr->hist); - png_ptr->flags &= ~PNG_FLAG_FREE_HIST; -#endif -#endif -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (png_ptr->gamma_16_table != NULL) - { - int i; - int istop = (1 << (8 - png_ptr->gamma_shift)); - for (i = 0; i < istop; i++) - { - png_free(png_ptr, png_ptr->gamma_16_table[i]); - } - png_free(png_ptr, png_ptr->gamma_16_table); - } -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - if (png_ptr->gamma_16_from_1 != NULL) - { - int i; - int istop = (1 << (8 - png_ptr->gamma_shift)); - for (i = 0; i < istop; i++) - { - png_free(png_ptr, png_ptr->gamma_16_from_1[i]); - } - png_free(png_ptr, png_ptr->gamma_16_from_1); - } - if (png_ptr->gamma_16_to_1 != NULL) - { - int i; - int istop = (1 << (8 - png_ptr->gamma_shift)); - for (i = 0; i < istop; i++) - { - png_free(png_ptr, png_ptr->gamma_16_to_1[i]); - } - png_free(png_ptr, png_ptr->gamma_16_to_1); - } -#endif -#endif -#if defined(PNG_TIME_RFC1123_SUPPORTED) - png_free(png_ptr, png_ptr->time_buffer); -#endif - - inflateEnd(&png_ptr->zstream); -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED - png_free(png_ptr, png_ptr->save_buffer); -#endif - -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED -#ifdef PNG_TEXT_SUPPORTED - png_free(png_ptr, png_ptr->current_text); -#endif /* PNG_TEXT_SUPPORTED */ -#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ - - /* Save the important info out of the png_struct, in case it is - * being used again. - */ -#ifdef PNG_SETJMP_SUPPORTED - png_memcpy(tmp_jmp, png_ptr->jmpbuf, sizeof (jmp_buf)); -#endif - - error_fn = png_ptr->error_fn; - warning_fn = png_ptr->warning_fn; - error_ptr = png_ptr->error_ptr; -#ifdef PNG_USER_MEM_SUPPORTED - free_fn = png_ptr->free_fn; -#endif - - png_memset(png_ptr, 0, sizeof (png_struct)); - - png_ptr->error_fn = error_fn; - png_ptr->warning_fn = warning_fn; - png_ptr->error_ptr = error_ptr; -#ifdef PNG_USER_MEM_SUPPORTED - png_ptr->free_fn = free_fn; -#endif - -#ifdef PNG_SETJMP_SUPPORTED - png_memcpy(png_ptr->jmpbuf, tmp_jmp, sizeof (jmp_buf)); -#endif - -} - -void PNGAPI -png_set_read_status_fn(png_structp png_ptr, png_read_status_ptr read_row_fn) -{ - png_ptr->read_row_fn = read_row_fn; -} - -#if defined(PNG_INFO_IMAGE_SUPPORTED) -void PNGAPI -png_read_png(png_structp png_ptr, png_infop info_ptr, - int transforms, - voidp params) -{ - int row; - -#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) - /* invert the alpha channel from opacity to transparency */ - if (transforms & PNG_TRANSFORM_INVERT_ALPHA) - png_set_invert_alpha(png_ptr); -#endif - - /* The call to png_read_info() gives us all of the information from the - * PNG file before the first IDAT (image data chunk). - */ - png_read_info(png_ptr, info_ptr); - - /* -------------- image transformations start here ------------------- */ - -#if defined(PNG_READ_16_TO_8_SUPPORTED) - /* tell libpng to strip 16 bit/color files down to 8 bits/color */ - if (transforms & PNG_TRANSFORM_STRIP_16) - png_set_strip_16(png_ptr); -#endif - -#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) - /* Strip alpha bytes from the input data without combining with the - * background (not recommended). - */ - if (transforms & PNG_TRANSFORM_STRIP_ALPHA) - png_set_strip_alpha(png_ptr); -#endif - -#if defined(PNG_READ_PACK_SUPPORTED) && !defined(PNG_READ_EXPAND_SUPPORTED) - /* Extract multiple pixels with bit depths of 1, 2, and 4 from a single - * byte into separate bytes (useful for paletted and grayscale images). - */ - if (transforms & PNG_TRANSFORM_PACKING) - png_set_packing(png_ptr); -#endif - -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - /* Change the order of packed pixels to least significant bit first - * (not useful if you are using png_set_packing). */ - if (transforms & PNG_TRANSFORM_PACKSWAP) - png_set_packswap(png_ptr); -#endif - -#if defined(PNG_READ_EXPAND_SUPPORTED) - /* Expand paletted colors into true RGB triplets - * Expand grayscale images to full 8 bits from 1, 2, or 4 bits/pixel - * Expand paletted or RGB images with transparency to full alpha - * channels so the data will be available as RGBA quartets. - */ - if (transforms & PNG_TRANSFORM_EXPAND) - if ((png_ptr->bit_depth < 8) || - (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) || - (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))) - png_set_expand(png_ptr); -#endif - - /* We don't handle background color or gamma transformation or dithering. */ - -#if defined(PNG_READ_INVERT_SUPPORTED) - /* invert monochrome files to have 0 as white and 1 as black */ - if (transforms & PNG_TRANSFORM_INVERT_MONO) - png_set_invert_mono(png_ptr); -#endif - -#if defined(PNG_READ_SHIFT_SUPPORTED) - /* If you want to shift the pixel values from the range [0,255] or - * [0,65535] to the original [0,7] or [0,31], or whatever range the - * colors were originally in: - */ - if ((transforms & PNG_TRANSFORM_SHIFT) - && png_get_valid(png_ptr, info_ptr, PNG_INFO_sBIT)) - { - png_color_8p sig_bit; - - png_get_sBIT(png_ptr, info_ptr, &sig_bit); - png_set_shift(png_ptr, sig_bit); - } -#endif - -#if defined(PNG_READ_BGR_SUPPORTED) - /* flip the RGB pixels to BGR (or RGBA to BGRA) */ - if (transforms & PNG_TRANSFORM_BGR) - png_set_bgr(png_ptr); -#endif - -#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) - /* swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */ - if (transforms & PNG_TRANSFORM_SWAP_ALPHA) - png_set_swap_alpha(png_ptr); -#endif - -#if defined(PNG_READ_SWAP_SUPPORTED) - /* swap bytes of 16 bit files to least significant byte first */ - if (transforms & PNG_TRANSFORM_SWAP_ENDIAN) - png_set_swap(png_ptr); -#endif - - /* We don't handle adding filler bytes */ - - /* Optional call to gamma correct and add the background to the palette - * and update info structure. REQUIRED if you are expecting libpng to - * update the palette for you (i.e., you selected such a transform above). - */ - png_read_update_info(png_ptr, info_ptr); - - /* -------------- image transformations end here ------------------- */ - -#ifdef PNG_FREE_ME_SUPPORTED - png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0); -#endif - if(info_ptr->row_pointers == NULL) - { - info_ptr->row_pointers = (png_bytepp)png_malloc(png_ptr, - info_ptr->height * sizeof(png_bytep)); -#ifdef PNG_FREE_ME_SUPPORTED - info_ptr->free_me |= PNG_FREE_ROWS; -#endif - for (row = 0; row < (int)info_ptr->height; row++) - { - info_ptr->row_pointers[row] = (png_bytep)png_malloc(png_ptr, - png_get_rowbytes(png_ptr, info_ptr)); - } - } - - png_read_image(png_ptr, info_ptr->row_pointers); - info_ptr->valid |= PNG_INFO_IDAT; - - /* read rest of file, and get additional chunks in info_ptr - REQUIRED */ - png_read_end(png_ptr, info_ptr); - - if(transforms == 0 || params == NULL) - /* quiet compiler warnings */ return; - -} -#endif diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngrio.c b/gtkmm-osx/trunk/libpng-1.2.5/pngrio.c deleted file mode 100644 index c33b1cd..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/pngrio.c +++ /dev/null @@ -1,161 +0,0 @@ - -/* pngrio.c - functions for data input - * - * libpng 1.2.5 - October 3, 2002 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2002 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) - * - * This file provides a location for all input. Users who need - * special handling are expected to write a function that has the same - * arguments as this and performs a similar function, but that possibly - * has a different input method. Note that you shouldn't change this - * function, but rather write a replacement function and then make - * libpng use it at run time with png_set_read_fn(...). - */ - -#define PNG_INTERNAL -#include "png.h" - -/* Read the data from whatever input you are using. The default routine - reads from a file pointer. Note that this routine sometimes gets called - with very small lengths, so you should implement some kind of simple - buffering if you are using unbuffered reads. This should never be asked - to read more then 64K on a 16 bit machine. */ -void /* PRIVATE */ -png_read_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_debug1(4,"reading %d bytes\n", (int)length); - if (png_ptr->read_data_fn != NULL) - (*(png_ptr->read_data_fn))(png_ptr, data, length); - else - png_error(png_ptr, "Call to NULL read function"); -} - -#if !defined(PNG_NO_STDIO) -/* This is the function that does the actual reading of data. If you are - not reading from a standard C stream, you should create a replacement - read_data function and use it at run time with png_set_read_fn(), rather - than changing the library. */ -#ifndef USE_FAR_KEYWORD -void PNGAPI -png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_size_t check; - - /* fread() returns 0 on error, so it is OK to store this in a png_size_t - * instead of an int, which is what fread() actually returns. - */ -#if defined(_WIN32_WCE) - if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) ) - check = 0; -#else - check = (png_size_t)fread(data, (png_size_t)1, length, - (png_FILE_p)png_ptr->io_ptr); -#endif - - if (check != length) - png_error(png_ptr, "Read Error"); -} -#else -/* this is the model-independent version. Since the standard I/O library - can't handle far buffers in the medium and small models, we have to copy - the data. -*/ - -#define NEAR_BUF_SIZE 1024 -#define MIN(a,b) (a <= b ? a : b) - -static void /* PRIVATE */ -png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - int check; - png_byte *n_data; - png_FILE_p io_ptr; - - /* Check if data really is near. If so, use usual code. */ - n_data = (png_byte *)CVT_PTR_NOCHECK(data); - io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); - if ((png_bytep)n_data == data) - { -#if defined(_WIN32_WCE) - if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) ) - check = 0; -#else - check = fread(n_data, 1, length, io_ptr); -#endif - } - else - { - png_byte buf[NEAR_BUF_SIZE]; - png_size_t read, remaining, err; - check = 0; - remaining = length; - do - { - read = MIN(NEAR_BUF_SIZE, remaining); -#if defined(_WIN32_WCE) - if ( !ReadFile((HANDLE)(io_ptr), buf, read, &err, NULL) ) - err = 0; -#else - err = fread(buf, (png_size_t)1, read, io_ptr); -#endif - png_memcpy(data, buf, read); /* copy far buffer to near buffer */ - if(err != read) - break; - else - check += err; - data += read; - remaining -= read; - } - while (remaining != 0); - } - if ((png_uint_32)check != (png_uint_32)length) - png_error(png_ptr, "read Error"); -} -#endif -#endif - -/* This function allows the application to supply a new input function - for libpng if standard C streams aren't being used. - - This function takes as its arguments: - png_ptr - pointer to a png input data structure - io_ptr - pointer to user supplied structure containing info about - the input functions. May be NULL. - read_data_fn - pointer to a new input function that takes as its - arguments a pointer to a png_struct, a pointer to - a location where input data can be stored, and a 32-bit - unsigned int that is the number of bytes to be read. - To exit and output any fatal error messages the new write - function should call png_error(png_ptr, "Error msg"). */ -void PNGAPI -png_set_read_fn(png_structp png_ptr, png_voidp io_ptr, - png_rw_ptr read_data_fn) -{ - png_ptr->io_ptr = io_ptr; - -#if !defined(PNG_NO_STDIO) - if (read_data_fn != NULL) - png_ptr->read_data_fn = read_data_fn; - else - png_ptr->read_data_fn = png_default_read_data; -#else - png_ptr->read_data_fn = read_data_fn; -#endif - - /* It is an error to write to a read device */ - if (png_ptr->write_data_fn != NULL) - { - png_ptr->write_data_fn = NULL; - png_warning(png_ptr, - "It's an error to set both read_data_fn and write_data_fn in the "); - png_warning(png_ptr, - "same structure. Resetting write_data_fn to NULL."); - } - -#if defined(PNG_WRITE_FLUSH_SUPPORTED) - png_ptr->output_flush_fn = NULL; -#endif -} diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngrtran.c b/gtkmm-osx/trunk/libpng-1.2.5/pngrtran.c deleted file mode 100644 index 3de9120..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/pngrtran.c +++ /dev/null @@ -1,4175 +0,0 @@ - -/* pngrtran.c - transforms the data in a row for PNG readers - * - * libpng 1.2.5 - October 3, 2002 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2002 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) - * - * This file contains functions optionally called by an application - * in order to tell libpng how to handle data when reading a PNG. - * Transformations that are used in both reading and writing are - * in pngtrans.c. - */ - -#define PNG_INTERNAL -#include "png.h" - -/* Set the action on getting a CRC error for an ancillary or critical chunk. */ -void PNGAPI -png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action) -{ - png_debug(1, "in png_set_crc_action\n"); - /* Tell libpng how we react to CRC errors in critical chunks */ - switch (crit_action) - { - case PNG_CRC_NO_CHANGE: /* leave setting as is */ - break; - case PNG_CRC_WARN_USE: /* warn/use data */ - png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; - png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE; - break; - case PNG_CRC_QUIET_USE: /* quiet/use data */ - png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; - png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE | - PNG_FLAG_CRC_CRITICAL_IGNORE; - break; - case PNG_CRC_WARN_DISCARD: /* not a valid action for critical data */ - png_warning(png_ptr, "Can't discard critical data on CRC error."); - case PNG_CRC_ERROR_QUIT: /* error/quit */ - case PNG_CRC_DEFAULT: - default: - png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; - break; - } - - switch (ancil_action) - { - case PNG_CRC_NO_CHANGE: /* leave setting as is */ - break; - case PNG_CRC_WARN_USE: /* warn/use data */ - png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; - png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_USE; - break; - case PNG_CRC_QUIET_USE: /* quiet/use data */ - png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; - png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_USE | - PNG_FLAG_CRC_ANCILLARY_NOWARN; - break; - case PNG_CRC_ERROR_QUIT: /* error/quit */ - png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; - png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_NOWARN; - break; - case PNG_CRC_WARN_DISCARD: /* warn/discard data */ - case PNG_CRC_DEFAULT: - default: - png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; - break; - } -} - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \ - defined(PNG_FLOATING_POINT_SUPPORTED) -/* handle alpha and tRNS via a background color */ -void PNGAPI -png_set_background(png_structp png_ptr, - png_color_16p background_color, int background_gamma_code, - int need_expand, double background_gamma) -{ - png_debug(1, "in png_set_background\n"); - if (background_gamma_code == PNG_BACKGROUND_GAMMA_UNKNOWN) - { - png_warning(png_ptr, "Application must supply a known background gamma"); - return; - } - - png_ptr->transformations |= PNG_BACKGROUND; - png_memcpy(&(png_ptr->background), background_color, sizeof(png_color_16)); - png_ptr->background_gamma = (float)background_gamma; - png_ptr->background_gamma_type = (png_byte)(background_gamma_code); - png_ptr->transformations |= (need_expand ? PNG_BACKGROUND_EXPAND : 0); - - /* Note: if need_expand is set and color_type is either RGB or RGB_ALPHA - * (in which case need_expand is superfluous anyway), the background color - * might actually be gray yet not be flagged as such. This is not a problem - * for the current code, which uses PNG_BACKGROUND_IS_GRAY only to - * decide when to do the png_do_gray_to_rgb() transformation. - */ - if ((need_expand && !(png_ptr->color_type & PNG_COLOR_MASK_COLOR)) || - (!need_expand && background_color->red == background_color->green && - background_color->red == background_color->blue)) - png_ptr->mode |= PNG_BACKGROUND_IS_GRAY; -} -#endif - -#if defined(PNG_READ_16_TO_8_SUPPORTED) -/* strip 16 bit depth files to 8 bit depth */ -void PNGAPI -png_set_strip_16(png_structp png_ptr) -{ - png_debug(1, "in png_set_strip_16\n"); - png_ptr->transformations |= PNG_16_TO_8; -} -#endif - -#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) -void PNGAPI -png_set_strip_alpha(png_structp png_ptr) -{ - png_debug(1, "in png_set_strip_alpha\n"); - png_ptr->transformations |= PNG_STRIP_ALPHA; -} -#endif - -#if defined(PNG_READ_DITHER_SUPPORTED) -/* Dither file to 8 bit. Supply a palette, the current number - * of elements in the palette, the maximum number of elements - * allowed, and a histogram if possible. If the current number - * of colors is greater then the maximum number, the palette will be - * modified to fit in the maximum number. "full_dither" indicates - * whether we need a dithering cube set up for RGB images, or if we - * simply are reducing the number of colors in a paletted image. - */ - -typedef struct png_dsort_struct -{ - struct png_dsort_struct FAR * next; - png_byte left; - png_byte right; -} png_dsort; -typedef png_dsort FAR * png_dsortp; -typedef png_dsort FAR * FAR * png_dsortpp; - -void PNGAPI -png_set_dither(png_structp png_ptr, png_colorp palette, - int num_palette, int maximum_colors, png_uint_16p histogram, - int full_dither) -{ - png_debug(1, "in png_set_dither\n"); - png_ptr->transformations |= PNG_DITHER; - - if (!full_dither) - { - int i; - - png_ptr->dither_index = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(num_palette * sizeof (png_byte))); - for (i = 0; i < num_palette; i++) - png_ptr->dither_index[i] = (png_byte)i; - } - - if (num_palette > maximum_colors) - { - if (histogram != NULL) - { - /* This is easy enough, just throw out the least used colors. - Perhaps not the best solution, but good enough. */ - - int i; - - /* initialize an array to sort colors */ - png_ptr->dither_sort = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(num_palette * sizeof (png_byte))); - - /* initialize the dither_sort array */ - for (i = 0; i < num_palette; i++) - png_ptr->dither_sort[i] = (png_byte)i; - - /* Find the least used palette entries by starting a - bubble sort, and running it until we have sorted - out enough colors. Note that we don't care about - sorting all the colors, just finding which are - least used. */ - - for (i = num_palette - 1; i >= maximum_colors; i--) - { - int done; /* to stop early if the list is pre-sorted */ - int j; - - done = 1; - for (j = 0; j < i; j++) - { - if (histogram[png_ptr->dither_sort[j]] - < histogram[png_ptr->dither_sort[j + 1]]) - { - png_byte t; - - t = png_ptr->dither_sort[j]; - png_ptr->dither_sort[j] = png_ptr->dither_sort[j + 1]; - png_ptr->dither_sort[j + 1] = t; - done = 0; - } - } - if (done) - break; - } - - /* swap the palette around, and set up a table, if necessary */ - if (full_dither) - { - int j = num_palette; - - /* put all the useful colors within the max, but don't - move the others */ - for (i = 0; i < maximum_colors; i++) - { - if ((int)png_ptr->dither_sort[i] >= maximum_colors) - { - do - j--; - while ((int)png_ptr->dither_sort[j] >= maximum_colors); - palette[i] = palette[j]; - } - } - } - else - { - int j = num_palette; - - /* move all the used colors inside the max limit, and - develop a translation table */ - for (i = 0; i < maximum_colors; i++) - { - /* only move the colors we need to */ - if ((int)png_ptr->dither_sort[i] >= maximum_colors) - { - png_color tmp_color; - - do - j--; - while ((int)png_ptr->dither_sort[j] >= maximum_colors); - - tmp_color = palette[j]; - palette[j] = palette[i]; - palette[i] = tmp_color; - /* indicate where the color went */ - png_ptr->dither_index[j] = (png_byte)i; - png_ptr->dither_index[i] = (png_byte)j; - } - } - - /* find closest color for those colors we are not using */ - for (i = 0; i < num_palette; i++) - { - if ((int)png_ptr->dither_index[i] >= maximum_colors) - { - int min_d, k, min_k, d_index; - - /* find the closest color to one we threw out */ - d_index = png_ptr->dither_index[i]; - min_d = PNG_COLOR_DIST(palette[d_index], palette[0]); - for (k = 1, min_k = 0; k < maximum_colors; k++) - { - int d; - - d = PNG_COLOR_DIST(palette[d_index], palette[k]); - - if (d < min_d) - { - min_d = d; - min_k = k; - } - } - /* point to closest color */ - png_ptr->dither_index[i] = (png_byte)min_k; - } - } - } - png_free(png_ptr, png_ptr->dither_sort); - png_ptr->dither_sort=NULL; - } - else - { - /* This is much harder to do simply (and quickly). Perhaps - we need to go through a median cut routine, but those - don't always behave themselves with only a few colors - as input. So we will just find the closest two colors, - and throw out one of them (chosen somewhat randomly). - [We don't understand this at all, so if someone wants to - work on improving it, be our guest - AED, GRP] - */ - int i; - int max_d; - int num_new_palette; - png_dsortp t; - png_dsortpp hash; - - t=NULL; - - /* initialize palette index arrays */ - png_ptr->index_to_palette = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(num_palette * sizeof (png_byte))); - png_ptr->palette_to_index = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(num_palette * sizeof (png_byte))); - - /* initialize the sort array */ - for (i = 0; i < num_palette; i++) - { - png_ptr->index_to_palette[i] = (png_byte)i; - png_ptr->palette_to_index[i] = (png_byte)i; - } - - hash = (png_dsortpp)png_malloc(png_ptr, (png_uint_32)(769 * - sizeof (png_dsortp))); - for (i = 0; i < 769; i++) - hash[i] = NULL; -/* png_memset(hash, 0, 769 * sizeof (png_dsortp)); */ - - num_new_palette = num_palette; - - /* initial wild guess at how far apart the farthest pixel - pair we will be eliminating will be. Larger - numbers mean more areas will be allocated, Smaller - numbers run the risk of not saving enough data, and - having to do this all over again. - - I have not done extensive checking on this number. - */ - max_d = 96; - - while (num_new_palette > maximum_colors) - { - for (i = 0; i < num_new_palette - 1; i++) - { - int j; - - for (j = i + 1; j < num_new_palette; j++) - { - int d; - - d = PNG_COLOR_DIST(palette[i], palette[j]); - - if (d <= max_d) - { - - t = (png_dsortp)png_malloc_warn(png_ptr, - (png_uint_32)(sizeof(png_dsort))); - if (t == NULL) - break; - t->next = hash[d]; - t->left = (png_byte)i; - t->right = (png_byte)j; - hash[d] = t; - } - } - if (t == NULL) - break; - } - - if (t != NULL) - for (i = 0; i <= max_d; i++) - { - if (hash[i] != NULL) - { - png_dsortp p; - - for (p = hash[i]; p; p = p->next) - { - if ((int)png_ptr->index_to_palette[p->left] - < num_new_palette && - (int)png_ptr->index_to_palette[p->right] - < num_new_palette) - { - int j, next_j; - - if (num_new_palette & 0x01) - { - j = p->left; - next_j = p->right; - } - else - { - j = p->right; - next_j = p->left; - } - - num_new_palette--; - palette[png_ptr->index_to_palette[j]] - = palette[num_new_palette]; - if (!full_dither) - { - int k; - - for (k = 0; k < num_palette; k++) - { - if (png_ptr->dither_index[k] == - png_ptr->index_to_palette[j]) - png_ptr->dither_index[k] = - png_ptr->index_to_palette[next_j]; - if ((int)png_ptr->dither_index[k] == - num_new_palette) - png_ptr->dither_index[k] = - png_ptr->index_to_palette[j]; - } - } - - png_ptr->index_to_palette[png_ptr->palette_to_index - [num_new_palette]] = png_ptr->index_to_palette[j]; - png_ptr->palette_to_index[png_ptr->index_to_palette[j]] - = png_ptr->palette_to_index[num_new_palette]; - - png_ptr->index_to_palette[j] = (png_byte)num_new_palette; - png_ptr->palette_to_index[num_new_palette] = (png_byte)j; - } - if (num_new_palette <= maximum_colors) - break; - } - if (num_new_palette <= maximum_colors) - break; - } - } - - for (i = 0; i < 769; i++) - { - if (hash[i] != NULL) - { - png_dsortp p = hash[i]; - while (p) - { - t = p->next; - png_free(png_ptr, p); - p = t; - } - } - hash[i] = 0; - } - max_d += 96; - } - png_free(png_ptr, hash); - png_free(png_ptr, png_ptr->palette_to_index); - png_free(png_ptr, png_ptr->index_to_palette); - png_ptr->palette_to_index=NULL; - png_ptr->index_to_palette=NULL; - } - num_palette = maximum_colors; - } - if (png_ptr->palette == NULL) - { - png_ptr->palette = palette; - } - png_ptr->num_palette = (png_uint_16)num_palette; - - if (full_dither) - { - int i; - png_bytep distance; - int total_bits = PNG_DITHER_RED_BITS + PNG_DITHER_GREEN_BITS + - PNG_DITHER_BLUE_BITS; - int num_red = (1 << PNG_DITHER_RED_BITS); - int num_green = (1 << PNG_DITHER_GREEN_BITS); - int num_blue = (1 << PNG_DITHER_BLUE_BITS); - png_size_t num_entries = ((png_size_t)1 << total_bits); - - png_ptr->palette_lookup = (png_bytep )png_malloc(png_ptr, - (png_uint_32)(num_entries * sizeof (png_byte))); - - png_memset(png_ptr->palette_lookup, 0, num_entries * sizeof (png_byte)); - - distance = (png_bytep)png_malloc(png_ptr, (png_uint_32)(num_entries * - sizeof(png_byte))); - - png_memset(distance, 0xff, num_entries * sizeof(png_byte)); - - for (i = 0; i < num_palette; i++) - { - int ir, ig, ib; - int r = (palette[i].red >> (8 - PNG_DITHER_RED_BITS)); - int g = (palette[i].green >> (8 - PNG_DITHER_GREEN_BITS)); - int b = (palette[i].blue >> (8 - PNG_DITHER_BLUE_BITS)); - - for (ir = 0; ir < num_red; ir++) - { - int dr = abs(ir - r); - int index_r = (ir << (PNG_DITHER_BLUE_BITS + PNG_DITHER_GREEN_BITS)); - - for (ig = 0; ig < num_green; ig++) - { - int dg = abs(ig - g); - int dt = dr + dg; - int dm = ((dr > dg) ? dr : dg); - int index_g = index_r | (ig << PNG_DITHER_BLUE_BITS); - - for (ib = 0; ib < num_blue; ib++) - { - int d_index = index_g | ib; - int db = abs(ib - b); - int dmax = ((dm > db) ? dm : db); - int d = dmax + dt + db; - - if (d < (int)distance[d_index]) - { - distance[d_index] = (png_byte)d; - png_ptr->palette_lookup[d_index] = (png_byte)i; - } - } - } - } - } - - png_free(png_ptr, distance); - } -} -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED) -/* Transform the image from the file_gamma to the screen_gamma. We - * only do transformations on images where the file_gamma and screen_gamma - * are not close reciprocals, otherwise it slows things down slightly, and - * also needlessly introduces small errors. - * - * We will turn off gamma transformation later if no semitransparent entries - * are present in the tRNS array for palette images. We can't do it here - * because we don't necessarily have the tRNS chunk yet. - */ -void PNGAPI -png_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma) -{ - png_debug(1, "in png_set_gamma\n"); - if ((fabs(scrn_gamma * file_gamma - 1.0) > PNG_GAMMA_THRESHOLD) || - (png_ptr->color_type & PNG_COLOR_MASK_ALPHA) || - (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)) - png_ptr->transformations |= PNG_GAMMA; - png_ptr->gamma = (float)file_gamma; - png_ptr->screen_gamma = (float)scrn_gamma; -} -#endif - -#if defined(PNG_READ_EXPAND_SUPPORTED) -/* Expand paletted images to RGB, expand grayscale images of - * less than 8-bit depth to 8-bit depth, and expand tRNS chunks - * to alpha channels. - */ -void PNGAPI -png_set_expand(png_structp png_ptr) -{ - png_debug(1, "in png_set_expand\n"); - png_ptr->transformations |= PNG_EXPAND; -} - -/* GRR 19990627: the following three functions currently are identical - * to png_set_expand(). However, it is entirely reasonable that someone - * might wish to expand an indexed image to RGB but *not* expand a single, - * fully transparent palette entry to a full alpha channel--perhaps instead - * convert tRNS to the grayscale/RGB format (16-bit RGB value), or replace - * the transparent color with a particular RGB value, or drop tRNS entirely. - * IOW, a future version of the library may make the transformations flag - * a bit more fine-grained, with separate bits for each of these three - * functions. - * - * More to the point, these functions make it obvious what libpng will be - * doing, whereas "expand" can (and does) mean any number of things. - */ - -/* Expand paletted images to RGB. */ -void PNGAPI -png_set_palette_to_rgb(png_structp png_ptr) -{ - png_debug(1, "in png_set_expand\n"); - png_ptr->transformations |= PNG_EXPAND; -} - -/* Expand grayscale images of less than 8-bit depth to 8 bits. */ -void PNGAPI -png_set_gray_1_2_4_to_8(png_structp png_ptr) -{ - png_debug(1, "in png_set_expand\n"); - png_ptr->transformations |= PNG_EXPAND; -} - -/* Expand tRNS chunks to alpha channels. */ -void PNGAPI -png_set_tRNS_to_alpha(png_structp png_ptr) -{ - png_debug(1, "in png_set_expand\n"); - png_ptr->transformations |= PNG_EXPAND; -} -#endif /* defined(PNG_READ_EXPAND_SUPPORTED) */ - -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) -void PNGAPI -png_set_gray_to_rgb(png_structp png_ptr) -{ - png_debug(1, "in png_set_gray_to_rgb\n"); - png_ptr->transformations |= PNG_GRAY_TO_RGB; -} -#endif - -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) -#if defined(PNG_FLOATING_POINT_SUPPORTED) -/* Convert a RGB image to a grayscale of the same width. This allows us, - * for example, to convert a 24 bpp RGB image into an 8 bpp grayscale image. - */ - -void PNGAPI -png_set_rgb_to_gray(png_structp png_ptr, int error_action, double red, - double green) -{ - int red_fixed = (int)((float)red*100000.0 + 0.5); - int green_fixed = (int)((float)green*100000.0 + 0.5); - png_set_rgb_to_gray_fixed(png_ptr, error_action, red_fixed, green_fixed); -} -#endif - -void PNGAPI -png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action, - png_fixed_point red, png_fixed_point green) -{ - png_debug(1, "in png_set_rgb_to_gray\n"); - switch(error_action) - { - case 1: png_ptr->transformations |= PNG_RGB_TO_GRAY; - break; - case 2: png_ptr->transformations |= PNG_RGB_TO_GRAY_WARN; - break; - case 3: png_ptr->transformations |= PNG_RGB_TO_GRAY_ERR; - } - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) -#if defined(PNG_READ_EXPAND_SUPPORTED) - png_ptr->transformations |= PNG_EXPAND; -#else - { - png_warning(png_ptr, "Cannot do RGB_TO_GRAY without EXPAND_SUPPORTED."); - png_ptr->transformations &= ~PNG_RGB_TO_GRAY; - } -#endif - { - png_uint_16 red_int, green_int; - if(red < 0 || green < 0) - { - red_int = 6968; /* .212671 * 32768 + .5 */ - green_int = 23434; /* .715160 * 32768 + .5 */ - } - else if(red + green < 100000L) - { - red_int = (png_uint_16)(((png_uint_32)red*32768L)/100000L); - green_int = (png_uint_16)(((png_uint_32)green*32768L)/100000L); - } - else - { - png_warning(png_ptr, "ignoring out of range rgb_to_gray coefficients"); - red_int = 6968; - green_int = 23434; - } - png_ptr->rgb_to_gray_red_coeff = red_int; - png_ptr->rgb_to_gray_green_coeff = green_int; - png_ptr->rgb_to_gray_blue_coeff = (png_uint_16)(32768-red_int-green_int); - } -} -#endif - -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_LEGACY_SUPPORTED) -void PNGAPI -png_set_read_user_transform_fn(png_structp png_ptr, png_user_transform_ptr - read_user_transform_fn) -{ - png_debug(1, "in png_set_read_user_transform_fn\n"); -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) - png_ptr->transformations |= PNG_USER_TRANSFORM; - png_ptr->read_user_transform_fn = read_user_transform_fn; -#endif -#ifdef PNG_LEGACY_SUPPORTED - if(read_user_transform_fn) - png_warning(png_ptr, - "This version of libpng does not support user transforms"); -#endif -} -#endif - -/* Initialize everything needed for the read. This includes modifying - * the palette. - */ -void /* PRIVATE */ -png_init_read_transformations(png_structp png_ptr) -{ - png_debug(1, "in png_init_read_transformations\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if(png_ptr != NULL) -#endif - { -#if defined(PNG_READ_BACKGROUND_SUPPORTED) || defined(PNG_READ_SHIFT_SUPPORTED) \ - || defined(PNG_READ_GAMMA_SUPPORTED) - int color_type = png_ptr->color_type; -#endif - -#if defined(PNG_READ_EXPAND_SUPPORTED) && defined(PNG_READ_BACKGROUND_SUPPORTED) - if ((png_ptr->transformations & PNG_BACKGROUND_EXPAND) && - (png_ptr->transformations & PNG_EXPAND)) - { - if (!(color_type & PNG_COLOR_MASK_COLOR)) /* i.e., GRAY or GRAY_ALPHA */ - { - /* expand background chunk. */ - switch (png_ptr->bit_depth) - { - case 1: - png_ptr->background.gray *= (png_uint_16)0xff; - png_ptr->background.red = png_ptr->background.green - = png_ptr->background.blue = png_ptr->background.gray; - break; - case 2: - png_ptr->background.gray *= (png_uint_16)0x55; - png_ptr->background.red = png_ptr->background.green - = png_ptr->background.blue = png_ptr->background.gray; - break; - case 4: - png_ptr->background.gray *= (png_uint_16)0x11; - png_ptr->background.red = png_ptr->background.green - = png_ptr->background.blue = png_ptr->background.gray; - break; - case 8: - case 16: - png_ptr->background.red = png_ptr->background.green - = png_ptr->background.blue = png_ptr->background.gray; - break; - } - } - else if (color_type == PNG_COLOR_TYPE_PALETTE) - { - png_ptr->background.red = - png_ptr->palette[png_ptr->background.index].red; - png_ptr->background.green = - png_ptr->palette[png_ptr->background.index].green; - png_ptr->background.blue = - png_ptr->palette[png_ptr->background.index].blue; - -#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) - if (png_ptr->transformations & PNG_INVERT_ALPHA) - { -#if defined(PNG_READ_EXPAND_SUPPORTED) - if (!(png_ptr->transformations & PNG_EXPAND)) -#endif - { - /* invert the alpha channel (in tRNS) unless the pixels are - going to be expanded, in which case leave it for later */ - int i,istop; - istop=(int)png_ptr->num_trans; - for (i=0; itrans[i] = (png_byte)(255 - png_ptr->trans[i]); - } - } -#endif - - } - } -#endif - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED) - png_ptr->background_1 = png_ptr->background; -#endif -#if defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED) - - if ((color_type == PNG_COLOR_TYPE_PALETTE && png_ptr->num_trans != 0) - && (fabs(png_ptr->screen_gamma * png_ptr->gamma - 1.0) - < PNG_GAMMA_THRESHOLD)) - { - int i,k; - k=0; - for (i=0; inum_trans; i++) - { - if (png_ptr->trans[i] != 0 && png_ptr->trans[i] != 0xff) - k=1; /* partial transparency is present */ - } - if (k == 0) - png_ptr->transformations &= (~PNG_GAMMA); - } - - if (png_ptr->transformations & (PNG_GAMMA | PNG_RGB_TO_GRAY)) - { - png_build_gamma_table(png_ptr); -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - if (png_ptr->transformations & PNG_BACKGROUND) - { - if (color_type == PNG_COLOR_TYPE_PALETTE) - { - /* could skip if no transparency and - */ - png_color back, back_1; - png_colorp palette = png_ptr->palette; - int num_palette = png_ptr->num_palette; - int i; - if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_FILE) - { - back.red = png_ptr->gamma_table[png_ptr->background.red]; - back.green = png_ptr->gamma_table[png_ptr->background.green]; - back.blue = png_ptr->gamma_table[png_ptr->background.blue]; - - back_1.red = png_ptr->gamma_to_1[png_ptr->background.red]; - back_1.green = png_ptr->gamma_to_1[png_ptr->background.green]; - back_1.blue = png_ptr->gamma_to_1[png_ptr->background.blue]; - } - else - { - double g, gs; - - switch (png_ptr->background_gamma_type) - { - case PNG_BACKGROUND_GAMMA_SCREEN: - g = (png_ptr->screen_gamma); - gs = 1.0; - break; - case PNG_BACKGROUND_GAMMA_FILE: - g = 1.0 / (png_ptr->gamma); - gs = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); - break; - case PNG_BACKGROUND_GAMMA_UNIQUE: - g = 1.0 / (png_ptr->background_gamma); - gs = 1.0 / (png_ptr->background_gamma * - png_ptr->screen_gamma); - break; - default: - g = 1.0; /* back_1 */ - gs = 1.0; /* back */ - } - - if ( fabs(gs - 1.0) < PNG_GAMMA_THRESHOLD) - { - back.red = (png_byte)png_ptr->background.red; - back.green = (png_byte)png_ptr->background.green; - back.blue = (png_byte)png_ptr->background.blue; - } - else - { - back.red = (png_byte)(pow( - (double)png_ptr->background.red/255, gs) * 255.0 + .5); - back.green = (png_byte)(pow( - (double)png_ptr->background.green/255, gs) * 255.0 + .5); - back.blue = (png_byte)(pow( - (double)png_ptr->background.blue/255, gs) * 255.0 + .5); - } - - back_1.red = (png_byte)(pow( - (double)png_ptr->background.red/255, g) * 255.0 + .5); - back_1.green = (png_byte)(pow( - (double)png_ptr->background.green/255, g) * 255.0 + .5); - back_1.blue = (png_byte)(pow( - (double)png_ptr->background.blue/255, g) * 255.0 + .5); - } - for (i = 0; i < num_palette; i++) - { - if (i < (int)png_ptr->num_trans && png_ptr->trans[i] != 0xff) - { - if (png_ptr->trans[i] == 0) - { - palette[i] = back; - } - else /* if (png_ptr->trans[i] != 0xff) */ - { - png_byte v, w; - - v = png_ptr->gamma_to_1[palette[i].red]; - png_composite(w, v, png_ptr->trans[i], back_1.red); - palette[i].red = png_ptr->gamma_from_1[w]; - - v = png_ptr->gamma_to_1[palette[i].green]; - png_composite(w, v, png_ptr->trans[i], back_1.green); - palette[i].green = png_ptr->gamma_from_1[w]; - - v = png_ptr->gamma_to_1[palette[i].blue]; - png_composite(w, v, png_ptr->trans[i], back_1.blue); - palette[i].blue = png_ptr->gamma_from_1[w]; - } - } - else - { - palette[i].red = png_ptr->gamma_table[palette[i].red]; - palette[i].green = png_ptr->gamma_table[palette[i].green]; - palette[i].blue = png_ptr->gamma_table[palette[i].blue]; - } - } - } - /* if (png_ptr->background_gamma_type!=PNG_BACKGROUND_GAMMA_UNKNOWN) */ - else - /* color_type != PNG_COLOR_TYPE_PALETTE */ - { - double m = (double)(((png_uint_32)1 << png_ptr->bit_depth) - 1); - double g = 1.0; - double gs = 1.0; - - switch (png_ptr->background_gamma_type) - { - case PNG_BACKGROUND_GAMMA_SCREEN: - g = (png_ptr->screen_gamma); - gs = 1.0; - break; - case PNG_BACKGROUND_GAMMA_FILE: - g = 1.0 / (png_ptr->gamma); - gs = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); - break; - case PNG_BACKGROUND_GAMMA_UNIQUE: - g = 1.0 / (png_ptr->background_gamma); - gs = 1.0 / (png_ptr->background_gamma * - png_ptr->screen_gamma); - break; - } - - png_ptr->background_1.gray = (png_uint_16)(pow( - (double)png_ptr->background.gray / m, g) * m + .5); - png_ptr->background.gray = (png_uint_16)(pow( - (double)png_ptr->background.gray / m, gs) * m + .5); - - if ((png_ptr->background.red != png_ptr->background.green) || - (png_ptr->background.red != png_ptr->background.blue) || - (png_ptr->background.red != png_ptr->background.gray)) - { - /* RGB or RGBA with color background */ - png_ptr->background_1.red = (png_uint_16)(pow( - (double)png_ptr->background.red / m, g) * m + .5); - png_ptr->background_1.green = (png_uint_16)(pow( - (double)png_ptr->background.green / m, g) * m + .5); - png_ptr->background_1.blue = (png_uint_16)(pow( - (double)png_ptr->background.blue / m, g) * m + .5); - png_ptr->background.red = (png_uint_16)(pow( - (double)png_ptr->background.red / m, gs) * m + .5); - png_ptr->background.green = (png_uint_16)(pow( - (double)png_ptr->background.green / m, gs) * m + .5); - png_ptr->background.blue = (png_uint_16)(pow( - (double)png_ptr->background.blue / m, gs) * m + .5); - } - else - { - /* GRAY, GRAY ALPHA, RGB, or RGBA with gray background */ - png_ptr->background_1.red = png_ptr->background_1.green - = png_ptr->background_1.blue = png_ptr->background_1.gray; - png_ptr->background.red = png_ptr->background.green - = png_ptr->background.blue = png_ptr->background.gray; - } - } - } - else - /* transformation does not include PNG_BACKGROUND */ -#endif /* PNG_READ_BACKGROUND_SUPPORTED */ - if (color_type == PNG_COLOR_TYPE_PALETTE) - { - png_colorp palette = png_ptr->palette; - int num_palette = png_ptr->num_palette; - int i; - - for (i = 0; i < num_palette; i++) - { - palette[i].red = png_ptr->gamma_table[palette[i].red]; - palette[i].green = png_ptr->gamma_table[palette[i].green]; - palette[i].blue = png_ptr->gamma_table[palette[i].blue]; - } - } - } -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - else -#endif -#endif /* PNG_READ_GAMMA_SUPPORTED && PNG_FLOATING_POINT_SUPPORTED */ -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - /* No GAMMA transformation */ - if ((png_ptr->transformations & PNG_BACKGROUND) && - (color_type == PNG_COLOR_TYPE_PALETTE)) - { - int i; - int istop = (int)png_ptr->num_trans; - png_color back; - png_colorp palette = png_ptr->palette; - - back.red = (png_byte)png_ptr->background.red; - back.green = (png_byte)png_ptr->background.green; - back.blue = (png_byte)png_ptr->background.blue; - - for (i = 0; i < istop; i++) - { - if (png_ptr->trans[i] == 0) - { - palette[i] = back; - } - else if (png_ptr->trans[i] != 0xff) - { - /* The png_composite() macro is defined in png.h */ - png_composite(palette[i].red, palette[i].red, - png_ptr->trans[i], back.red); - png_composite(palette[i].green, palette[i].green, - png_ptr->trans[i], back.green); - png_composite(palette[i].blue, palette[i].blue, - png_ptr->trans[i], back.blue); - } - } - } -#endif /* PNG_READ_BACKGROUND_SUPPORTED */ - -#if defined(PNG_READ_SHIFT_SUPPORTED) - if ((png_ptr->transformations & PNG_SHIFT) && - (color_type == PNG_COLOR_TYPE_PALETTE)) - { - png_uint_16 i; - png_uint_16 istop = png_ptr->num_palette; - int sr = 8 - png_ptr->sig_bit.red; - int sg = 8 - png_ptr->sig_bit.green; - int sb = 8 - png_ptr->sig_bit.blue; - - if (sr < 0 || sr > 8) - sr = 0; - if (sg < 0 || sg > 8) - sg = 0; - if (sb < 0 || sb > 8) - sb = 0; - for (i = 0; i < istop; i++) - { - png_ptr->palette[i].red >>= sr; - png_ptr->palette[i].green >>= sg; - png_ptr->palette[i].blue >>= sb; - } - } -#endif /* PNG_READ_SHIFT_SUPPORTED */ - } -#if !defined(PNG_READ_GAMMA_SUPPORTED) && !defined(PNG_READ_SHIFT_SUPPORTED) \ - && !defined(PNG_READ_BACKGROUND_SUPPORTED) - if(png_ptr) - return; -#endif -} - -/* Modify the info structure to reflect the transformations. The - * info should be updated so a PNG file could be written with it, - * assuming the transformations result in valid PNG data. - */ -void /* PRIVATE */ -png_read_transform_info(png_structp png_ptr, png_infop info_ptr) -{ - png_debug(1, "in png_read_transform_info\n"); -#if defined(PNG_READ_EXPAND_SUPPORTED) - if (png_ptr->transformations & PNG_EXPAND) - { - if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - if (png_ptr->num_trans) - info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA; - else - info_ptr->color_type = PNG_COLOR_TYPE_RGB; - info_ptr->bit_depth = 8; - info_ptr->num_trans = 0; - } - else - { - if (png_ptr->num_trans) - info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; - if (info_ptr->bit_depth < 8) - info_ptr->bit_depth = 8; - info_ptr->num_trans = 0; - } - } -#endif - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - if (png_ptr->transformations & PNG_BACKGROUND) - { - info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA; - info_ptr->num_trans = 0; - info_ptr->background = png_ptr->background; - } -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (png_ptr->transformations & PNG_GAMMA) - { -#ifdef PNG_FLOATING_POINT_SUPPORTED - info_ptr->gamma = png_ptr->gamma; -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED - info_ptr->int_gamma = png_ptr->int_gamma; -#endif - } -#endif - -#if defined(PNG_READ_16_TO_8_SUPPORTED) - if ((png_ptr->transformations & PNG_16_TO_8) && (info_ptr->bit_depth == 16)) - info_ptr->bit_depth = 8; -#endif - -#if defined(PNG_READ_DITHER_SUPPORTED) - if (png_ptr->transformations & PNG_DITHER) - { - if (((info_ptr->color_type == PNG_COLOR_TYPE_RGB) || - (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)) && - png_ptr->palette_lookup && info_ptr->bit_depth == 8) - { - info_ptr->color_type = PNG_COLOR_TYPE_PALETTE; - } - } -#endif - -#if defined(PNG_READ_PACK_SUPPORTED) - if ((png_ptr->transformations & PNG_PACK) && (info_ptr->bit_depth < 8)) - info_ptr->bit_depth = 8; -#endif - -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) - if (png_ptr->transformations & PNG_GRAY_TO_RGB) - info_ptr->color_type |= PNG_COLOR_MASK_COLOR; -#endif - -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) - if (png_ptr->transformations & PNG_RGB_TO_GRAY) - info_ptr->color_type &= ~PNG_COLOR_MASK_COLOR; -#endif - - if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - info_ptr->channels = 1; - else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR) - info_ptr->channels = 3; - else - info_ptr->channels = 1; - -#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) - if (png_ptr->transformations & PNG_STRIP_ALPHA) - info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA; -#endif - - if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) - info_ptr->channels++; - -#if defined(PNG_READ_FILLER_SUPPORTED) - /* STRIP_ALPHA and FILLER allowed: MASK_ALPHA bit stripped above */ - if ((png_ptr->transformations & PNG_FILLER) && - ((info_ptr->color_type == PNG_COLOR_TYPE_RGB) || - (info_ptr->color_type == PNG_COLOR_TYPE_GRAY))) - { - info_ptr->channels++; -#if 0 /* if adding a true alpha channel not just filler */ - info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; -#endif - } -#endif - -#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) && \ -defined(PNG_READ_USER_TRANSFORM_SUPPORTED) - if(png_ptr->transformations & PNG_USER_TRANSFORM) - { - if(info_ptr->bit_depth < png_ptr->user_transform_depth) - info_ptr->bit_depth = png_ptr->user_transform_depth; - if(info_ptr->channels < png_ptr->user_transform_channels) - info_ptr->channels = png_ptr->user_transform_channels; - } -#endif - - info_ptr->pixel_depth = (png_byte)(info_ptr->channels * - info_ptr->bit_depth); - info_ptr->rowbytes = ((info_ptr->width * info_ptr->pixel_depth + 7) >> 3); - -#if !defined(PNG_READ_EXPAND_SUPPORTED) - if(png_ptr) - return; -#endif -} - -/* Transform the row. The order of transformations is significant, - * and is very touchy. If you add a transformation, take care to - * decide how it fits in with the other transformations here. - */ -void /* PRIVATE */ -png_do_read_transformations(png_structp png_ptr) -{ - png_debug(1, "in png_do_read_transformations\n"); -#if !defined(PNG_USELESS_TESTS_SUPPORTED) - if (png_ptr->row_buf == NULL) - { -#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) - char msg[50]; - - sprintf(msg, "NULL row buffer for row %ld, pass %d", png_ptr->row_number, - png_ptr->pass); - png_error(png_ptr, msg); -#else - png_error(png_ptr, "NULL row buffer"); -#endif - } -#endif - -#if defined(PNG_READ_EXPAND_SUPPORTED) - if (png_ptr->transformations & PNG_EXPAND) - { - if (png_ptr->row_info.color_type == PNG_COLOR_TYPE_PALETTE) - { - png_do_expand_palette(&(png_ptr->row_info), png_ptr->row_buf + 1, - png_ptr->palette, png_ptr->trans, png_ptr->num_trans); - } - else - { - if (png_ptr->num_trans) - png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1, - &(png_ptr->trans_values)); - else - png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1, - NULL); - } - } -#endif - -#if defined(PNG_READ_STRIP_ALPHA_SUPPORTED) - if (png_ptr->transformations & PNG_STRIP_ALPHA) - png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, - PNG_FLAG_FILLER_AFTER); -#endif - -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) - if (png_ptr->transformations & PNG_RGB_TO_GRAY) - { - int rgb_error = - png_do_rgb_to_gray(png_ptr, &(png_ptr->row_info), png_ptr->row_buf + 1); - if(rgb_error) - { - png_ptr->rgb_to_gray_status=1; - if(png_ptr->transformations == PNG_RGB_TO_GRAY_WARN) - png_warning(png_ptr, "png_do_rgb_to_gray found nongray pixel"); - if(png_ptr->transformations == PNG_RGB_TO_GRAY_ERR) - png_error(png_ptr, "png_do_rgb_to_gray found nongray pixel"); - } - } -#endif - -/* -From Andreas Dilger e-mail to png-implement, 26 March 1998: - - In most cases, the "simple transparency" should be done prior to doing - gray-to-RGB, or you will have to test 3x as many bytes to check if a - pixel is transparent. You would also need to make sure that the - transparency information is upgraded to RGB. - - To summarize, the current flow is: - - Gray + simple transparency -> compare 1 or 2 gray bytes and composite - with background "in place" if transparent, - convert to RGB if necessary - - Gray + alpha -> composite with gray background and remove alpha bytes, - convert to RGB if necessary - - To support RGB backgrounds for gray images we need: - - Gray + simple transparency -> convert to RGB + simple transparency, compare - 3 or 6 bytes and composite with background - "in place" if transparent (3x compare/pixel - compared to doing composite with gray bkgrnd) - - Gray + alpha -> convert to RGB + alpha, composite with background and - remove alpha bytes (3x float operations/pixel - compared with composite on gray background) - - Greg's change will do this. The reason it wasn't done before is for - performance, as this increases the per-pixel operations. If we would check - in advance if the background was gray or RGB, and position the gray-to-RGB - transform appropriately, then it would save a lot of work/time. - */ - -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) - /* if gray -> RGB, do so now only if background is non-gray; else do later - * for performance reasons */ - if ((png_ptr->transformations & PNG_GRAY_TO_RGB) && - !(png_ptr->mode & PNG_BACKGROUND_IS_GRAY)) - png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - if ((png_ptr->transformations & PNG_BACKGROUND) && - ((png_ptr->num_trans != 0 ) || - (png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) - png_do_background(&(png_ptr->row_info), png_ptr->row_buf + 1, - &(png_ptr->trans_values), &(png_ptr->background) -#if defined(PNG_READ_GAMMA_SUPPORTED) - , &(png_ptr->background_1), - png_ptr->gamma_table, png_ptr->gamma_from_1, - png_ptr->gamma_to_1, png_ptr->gamma_16_table, - png_ptr->gamma_16_from_1, png_ptr->gamma_16_to_1, - png_ptr->gamma_shift -#endif -); -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) - if ((png_ptr->transformations & PNG_GAMMA) && -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - !((png_ptr->transformations & PNG_BACKGROUND) && - ((png_ptr->num_trans != 0) || - (png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) && -#endif - (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE)) - png_do_gamma(&(png_ptr->row_info), png_ptr->row_buf + 1, - png_ptr->gamma_table, png_ptr->gamma_16_table, - png_ptr->gamma_shift); -#endif - -#if defined(PNG_READ_16_TO_8_SUPPORTED) - if (png_ptr->transformations & PNG_16_TO_8) - png_do_chop(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_DITHER_SUPPORTED) - if (png_ptr->transformations & PNG_DITHER) - { - png_do_dither((png_row_infop)&(png_ptr->row_info), png_ptr->row_buf + 1, - png_ptr->palette_lookup, png_ptr->dither_index); - if(png_ptr->row_info.rowbytes == (png_uint_32)0) - png_error(png_ptr, "png_do_dither returned rowbytes=0"); - } -#endif - -#if defined(PNG_READ_INVERT_SUPPORTED) - if (png_ptr->transformations & PNG_INVERT_MONO) - png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_SHIFT_SUPPORTED) - if (png_ptr->transformations & PNG_SHIFT) - png_do_unshift(&(png_ptr->row_info), png_ptr->row_buf + 1, - &(png_ptr->shift)); -#endif - -#if defined(PNG_READ_PACK_SUPPORTED) - if (png_ptr->transformations & PNG_PACK) - png_do_unpack(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_BGR_SUPPORTED) - if (png_ptr->transformations & PNG_BGR) - png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (png_ptr->transformations & PNG_PACKSWAP) - png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) - /* if gray -> RGB, do so now only if we did not do so above */ - if ((png_ptr->transformations & PNG_GRAY_TO_RGB) && - (png_ptr->mode & PNG_BACKGROUND_IS_GRAY)) - png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_FILLER_SUPPORTED) - if (png_ptr->transformations & PNG_FILLER) - png_do_read_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, - (png_uint_32)png_ptr->filler, png_ptr->flags); -#endif - -#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) - if (png_ptr->transformations & PNG_INVERT_ALPHA) - png_do_read_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) - if (png_ptr->transformations & PNG_SWAP_ALPHA) - png_do_read_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_SWAP_SUPPORTED) - if (png_ptr->transformations & PNG_SWAP_BYTES) - png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) - if (png_ptr->transformations & PNG_USER_TRANSFORM) - { - if(png_ptr->read_user_transform_fn != NULL) - (*(png_ptr->read_user_transform_fn)) /* user read transform function */ - (png_ptr, /* png_ptr */ - &(png_ptr->row_info), /* row_info: */ - /* png_uint_32 width; width of row */ - /* png_uint_32 rowbytes; number of bytes in row */ - /* png_byte color_type; color type of pixels */ - /* png_byte bit_depth; bit depth of samples */ - /* png_byte channels; number of channels (1-4) */ - /* png_byte pixel_depth; bits per pixel (depth*channels) */ - png_ptr->row_buf + 1); /* start of pixel data for row */ -#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) - if(png_ptr->user_transform_depth) - png_ptr->row_info.bit_depth = png_ptr->user_transform_depth; - if(png_ptr->user_transform_channels) - png_ptr->row_info.channels = png_ptr->user_transform_channels; -#endif - png_ptr->row_info.pixel_depth = (png_byte)(png_ptr->row_info.bit_depth * - png_ptr->row_info.channels); - png_ptr->row_info.rowbytes = (png_ptr->row_info.width * - png_ptr->row_info.pixel_depth+7)>>3; - } -#endif - -} - -#if defined(PNG_READ_PACK_SUPPORTED) -/* Unpack pixels of 1, 2, or 4 bits per pixel into 1 byte per pixel, - * without changing the actual values. Thus, if you had a row with - * a bit depth of 1, you would end up with bytes that only contained - * the numbers 0 or 1. If you would rather they contain 0 and 255, use - * png_do_shift() after this. - */ -void /* PRIVATE */ -png_do_unpack(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_unpack\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL && row_info->bit_depth < 8) -#else - if (row_info->bit_depth < 8) -#endif - { - png_uint_32 i; - png_uint_32 row_width=row_info->width; - - switch (row_info->bit_depth) - { - case 1: - { - png_bytep sp = row + (png_size_t)((row_width - 1) >> 3); - png_bytep dp = row + (png_size_t)row_width - 1; - png_uint_32 shift = 7 - (int)((row_width + 7) & 0x07); - for (i = 0; i < row_width; i++) - { - *dp = (png_byte)((*sp >> shift) & 0x01); - if (shift == 7) - { - shift = 0; - sp--; - } - else - shift++; - - dp--; - } - break; - } - case 2: - { - - png_bytep sp = row + (png_size_t)((row_width - 1) >> 2); - png_bytep dp = row + (png_size_t)row_width - 1; - png_uint_32 shift = (int)((3 - ((row_width + 3) & 0x03)) << 1); - for (i = 0; i < row_width; i++) - { - *dp = (png_byte)((*sp >> shift) & 0x03); - if (shift == 6) - { - shift = 0; - sp--; - } - else - shift += 2; - - dp--; - } - break; - } - case 4: - { - png_bytep sp = row + (png_size_t)((row_width - 1) >> 1); - png_bytep dp = row + (png_size_t)row_width - 1; - png_uint_32 shift = (int)((1 - ((row_width + 1) & 0x01)) << 2); - for (i = 0; i < row_width; i++) - { - *dp = (png_byte)((*sp >> shift) & 0x0f); - if (shift == 4) - { - shift = 0; - sp--; - } - else - shift = 4; - - dp--; - } - break; - } - } - row_info->bit_depth = 8; - row_info->pixel_depth = (png_byte)(8 * row_info->channels); - row_info->rowbytes = row_width * row_info->channels; - } -} -#endif - -#if defined(PNG_READ_SHIFT_SUPPORTED) -/* Reverse the effects of png_do_shift. This routine merely shifts the - * pixels back to their significant bits values. Thus, if you have - * a row of bit depth 8, but only 5 are significant, this will shift - * the values back to 0 through 31. - */ -void /* PRIVATE */ -png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits) -{ - png_debug(1, "in png_do_unshift\n"); - if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && sig_bits != NULL && -#endif - row_info->color_type != PNG_COLOR_TYPE_PALETTE) - { - int shift[4]; - int channels = 0; - int c; - png_uint_16 value = 0; - png_uint_32 row_width = row_info->width; - - if (row_info->color_type & PNG_COLOR_MASK_COLOR) - { - shift[channels++] = row_info->bit_depth - sig_bits->red; - shift[channels++] = row_info->bit_depth - sig_bits->green; - shift[channels++] = row_info->bit_depth - sig_bits->blue; - } - else - { - shift[channels++] = row_info->bit_depth - sig_bits->gray; - } - if (row_info->color_type & PNG_COLOR_MASK_ALPHA) - { - shift[channels++] = row_info->bit_depth - sig_bits->alpha; - } - - for (c = 0; c < channels; c++) - { - if (shift[c] <= 0) - shift[c] = 0; - else - value = 1; - } - - if (!value) - return; - - switch (row_info->bit_depth) - { - case 2: - { - png_bytep bp; - png_uint_32 i; - png_uint_32 istop = row_info->rowbytes; - - for (bp = row, i = 0; i < istop; i++) - { - *bp >>= 1; - *bp++ &= 0x55; - } - break; - } - case 4: - { - png_bytep bp = row; - png_uint_32 i; - png_uint_32 istop = row_info->rowbytes; - png_byte mask = (png_byte)((((int)0xf0 >> shift[0]) & (int)0xf0) | - (png_byte)((int)0xf >> shift[0])); - - for (i = 0; i < istop; i++) - { - *bp >>= shift[0]; - *bp++ &= mask; - } - break; - } - case 8: - { - png_bytep bp = row; - png_uint_32 i; - png_uint_32 istop = row_width * channels; - - for (i = 0; i < istop; i++) - { - *bp++ >>= shift[i%channels]; - } - break; - } - case 16: - { - png_bytep bp = row; - png_uint_32 i; - png_uint_32 istop = channels * row_width; - - for (i = 0; i < istop; i++) - { - value = (png_uint_16)((*bp << 8) + *(bp + 1)); - value >>= shift[i%channels]; - *bp++ = (png_byte)(value >> 8); - *bp++ = (png_byte)(value & 0xff); - } - break; - } - } - } -} -#endif - -#if defined(PNG_READ_16_TO_8_SUPPORTED) -/* chop rows of bit depth 16 down to 8 */ -void /* PRIVATE */ -png_do_chop(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_chop\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL && row_info->bit_depth == 16) -#else - if (row_info->bit_depth == 16) -#endif - { - png_bytep sp = row; - png_bytep dp = row; - png_uint_32 i; - png_uint_32 istop = row_info->width * row_info->channels; - - for (i = 0; i> 8)) >> 8; - * - * Approximate calculation with shift/add instead of multiply/divide: - * *dp = ((((png_uint_32)(*sp) << 8) | - * (png_uint_32)((int)(*(sp + 1)) - *sp)) + 128) >> 8; - * - * What we actually do to avoid extra shifting and conversion: - */ - - *dp = *sp + ((((int)(*(sp + 1)) - *sp) > 128) ? 1 : 0); -#else - /* Simply discard the low order byte */ - *dp = *sp; -#endif - } - row_info->bit_depth = 8; - row_info->pixel_depth = (png_byte)(8 * row_info->channels); - row_info->rowbytes = row_info->width * row_info->channels; - } -} -#endif - -#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) -void /* PRIVATE */ -png_do_read_swap_alpha(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_read_swap_alpha\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif - { - png_uint_32 row_width = row_info->width; - if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - { - /* This converts from RGBA to ARGB */ - if (row_info->bit_depth == 8) - { - png_bytep sp = row + row_info->rowbytes; - png_bytep dp = sp; - png_byte save; - png_uint_32 i; - - for (i = 0; i < row_width; i++) - { - save = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = save; - } - } - /* This converts from RRGGBBAA to AARRGGBB */ - else - { - png_bytep sp = row + row_info->rowbytes; - png_bytep dp = sp; - png_byte save[2]; - png_uint_32 i; - - for (i = 0; i < row_width; i++) - { - save[0] = *(--sp); - save[1] = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = save[0]; - *(--dp) = save[1]; - } - } - } - else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - { - /* This converts from GA to AG */ - if (row_info->bit_depth == 8) - { - png_bytep sp = row + row_info->rowbytes; - png_bytep dp = sp; - png_byte save; - png_uint_32 i; - - for (i = 0; i < row_width; i++) - { - save = *(--sp); - *(--dp) = *(--sp); - *(--dp) = save; - } - } - /* This converts from GGAA to AAGG */ - else - { - png_bytep sp = row + row_info->rowbytes; - png_bytep dp = sp; - png_byte save[2]; - png_uint_32 i; - - for (i = 0; i < row_width; i++) - { - save[0] = *(--sp); - save[1] = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = save[0]; - *(--dp) = save[1]; - } - } - } - } -} -#endif - -#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) -void /* PRIVATE */ -png_do_read_invert_alpha(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_read_invert_alpha\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif - { - png_uint_32 row_width = row_info->width; - if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - { - /* This inverts the alpha channel in RGBA */ - if (row_info->bit_depth == 8) - { - png_bytep sp = row + row_info->rowbytes; - png_bytep dp = sp; - png_uint_32 i; - - for (i = 0; i < row_width; i++) - { - *(--dp) = (png_byte)(255 - *(--sp)); - -/* This does nothing: - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - We can replace it with: -*/ - sp-=3; - dp=sp; - } - } - /* This inverts the alpha channel in RRGGBBAA */ - else - { - png_bytep sp = row + row_info->rowbytes; - png_bytep dp = sp; - png_uint_32 i; - - for (i = 0; i < row_width; i++) - { - *(--dp) = (png_byte)(255 - *(--sp)); - *(--dp) = (png_byte)(255 - *(--sp)); - -/* This does nothing: - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - We can replace it with: -*/ - sp-=6; - dp=sp; - } - } - } - else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - { - /* This inverts the alpha channel in GA */ - if (row_info->bit_depth == 8) - { - png_bytep sp = row + row_info->rowbytes; - png_bytep dp = sp; - png_uint_32 i; - - for (i = 0; i < row_width; i++) - { - *(--dp) = (png_byte)(255 - *(--sp)); - *(--dp) = *(--sp); - } - } - /* This inverts the alpha channel in GGAA */ - else - { - png_bytep sp = row + row_info->rowbytes; - png_bytep dp = sp; - png_uint_32 i; - - for (i = 0; i < row_width; i++) - { - *(--dp) = (png_byte)(255 - *(--sp)); - *(--dp) = (png_byte)(255 - *(--sp)); -/* - *(--dp) = *(--sp); - *(--dp) = *(--sp); -*/ - sp-=2; - dp=sp; - } - } - } - } -} -#endif - -#if defined(PNG_READ_FILLER_SUPPORTED) -/* Add filler channel if we have RGB color */ -void /* PRIVATE */ -png_do_read_filler(png_row_infop row_info, png_bytep row, - png_uint_32 filler, png_uint_32 flags) -{ - png_uint_32 i; - png_uint_32 row_width = row_info->width; - - png_byte hi_filler = (png_byte)((filler>>8) & 0xff); - png_byte lo_filler = (png_byte)(filler & 0xff); - - png_debug(1, "in png_do_read_filler\n"); - if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - row_info->color_type == PNG_COLOR_TYPE_GRAY) - { - if(row_info->bit_depth == 8) - { - /* This changes the data from G to GX */ - if (flags & PNG_FLAG_FILLER_AFTER) - { - png_bytep sp = row + (png_size_t)row_width; - png_bytep dp = sp + (png_size_t)row_width; - for (i = 1; i < row_width; i++) - { - *(--dp) = lo_filler; - *(--dp) = *(--sp); - } - *(--dp) = lo_filler; - row_info->channels = 2; - row_info->pixel_depth = 16; - row_info->rowbytes = row_width * 2; - } - /* This changes the data from G to XG */ - else - { - png_bytep sp = row + (png_size_t)row_width; - png_bytep dp = sp + (png_size_t)row_width; - for (i = 0; i < row_width; i++) - { - *(--dp) = *(--sp); - *(--dp) = lo_filler; - } - row_info->channels = 2; - row_info->pixel_depth = 16; - row_info->rowbytes = row_width * 2; - } - } - else if(row_info->bit_depth == 16) - { - /* This changes the data from GG to GGXX */ - if (flags & PNG_FLAG_FILLER_AFTER) - { - png_bytep sp = row + (png_size_t)row_width; - png_bytep dp = sp + (png_size_t)row_width; - for (i = 1; i < row_width; i++) - { - *(--dp) = hi_filler; - *(--dp) = lo_filler; - *(--dp) = *(--sp); - *(--dp) = *(--sp); - } - *(--dp) = hi_filler; - *(--dp) = lo_filler; - row_info->channels = 2; - row_info->pixel_depth = 32; - row_info->rowbytes = row_width * 4; - } - /* This changes the data from GG to XXGG */ - else - { - png_bytep sp = row + (png_size_t)row_width; - png_bytep dp = sp + (png_size_t)row_width; - for (i = 0; i < row_width; i++) - { - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = hi_filler; - *(--dp) = lo_filler; - } - row_info->channels = 2; - row_info->pixel_depth = 32; - row_info->rowbytes = row_width * 4; - } - } - } /* COLOR_TYPE == GRAY */ - else if (row_info->color_type == PNG_COLOR_TYPE_RGB) - { - if(row_info->bit_depth == 8) - { - /* This changes the data from RGB to RGBX */ - if (flags & PNG_FLAG_FILLER_AFTER) - { - png_bytep sp = row + (png_size_t)row_width * 3; - png_bytep dp = sp + (png_size_t)row_width; - for (i = 1; i < row_width; i++) - { - *(--dp) = lo_filler; - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - } - *(--dp) = lo_filler; - row_info->channels = 4; - row_info->pixel_depth = 32; - row_info->rowbytes = row_width * 4; - } - /* This changes the data from RGB to XRGB */ - else - { - png_bytep sp = row + (png_size_t)row_width * 3; - png_bytep dp = sp + (png_size_t)row_width; - for (i = 0; i < row_width; i++) - { - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = lo_filler; - } - row_info->channels = 4; - row_info->pixel_depth = 32; - row_info->rowbytes = row_width * 4; - } - } - else if(row_info->bit_depth == 16) - { - /* This changes the data from RRGGBB to RRGGBBXX */ - if (flags & PNG_FLAG_FILLER_AFTER) - { - png_bytep sp = row + (png_size_t)row_width * 3; - png_bytep dp = sp + (png_size_t)row_width; - for (i = 1; i < row_width; i++) - { - *(--dp) = hi_filler; - *(--dp) = lo_filler; - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - } - *(--dp) = hi_filler; - *(--dp) = lo_filler; - row_info->channels = 4; - row_info->pixel_depth = 64; - row_info->rowbytes = row_width * 8; - } - /* This changes the data from RRGGBB to XXRRGGBB */ - else - { - png_bytep sp = row + (png_size_t)row_width * 3; - png_bytep dp = sp + (png_size_t)row_width; - for (i = 0; i < row_width; i++) - { - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = *(--sp); - *(--dp) = hi_filler; - *(--dp) = lo_filler; - } - row_info->channels = 4; - row_info->pixel_depth = 64; - row_info->rowbytes = row_width * 8; - } - } - } /* COLOR_TYPE == RGB */ -} -#endif - -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) -/* expand grayscale files to RGB, with or without alpha */ -void /* PRIVATE */ -png_do_gray_to_rgb(png_row_infop row_info, png_bytep row) -{ - png_uint_32 i; - png_uint_32 row_width = row_info->width; - - png_debug(1, "in png_do_gray_to_rgb\n"); - if (row_info->bit_depth >= 8 && -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - !(row_info->color_type & PNG_COLOR_MASK_COLOR)) - { - if (row_info->color_type == PNG_COLOR_TYPE_GRAY) - { - if (row_info->bit_depth == 8) - { - png_bytep sp = row + (png_size_t)row_width - 1; - png_bytep dp = sp + (png_size_t)row_width * 2; - for (i = 0; i < row_width; i++) - { - *(dp--) = *sp; - *(dp--) = *sp; - *(dp--) = *(sp--); - } - } - else - { - png_bytep sp = row + (png_size_t)row_width * 2 - 1; - png_bytep dp = sp + (png_size_t)row_width * 4; - for (i = 0; i < row_width; i++) - { - *(dp--) = *sp; - *(dp--) = *(sp - 1); - *(dp--) = *sp; - *(dp--) = *(sp - 1); - *(dp--) = *(sp--); - *(dp--) = *(sp--); - } - } - } - else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - { - if (row_info->bit_depth == 8) - { - png_bytep sp = row + (png_size_t)row_width * 2 - 1; - png_bytep dp = sp + (png_size_t)row_width * 2; - for (i = 0; i < row_width; i++) - { - *(dp--) = *(sp--); - *(dp--) = *sp; - *(dp--) = *sp; - *(dp--) = *(sp--); - } - } - else - { - png_bytep sp = row + (png_size_t)row_width * 4 - 1; - png_bytep dp = sp + (png_size_t)row_width * 4; - for (i = 0; i < row_width; i++) - { - *(dp--) = *(sp--); - *(dp--) = *(sp--); - *(dp--) = *sp; - *(dp--) = *(sp - 1); - *(dp--) = *sp; - *(dp--) = *(sp - 1); - *(dp--) = *(sp--); - *(dp--) = *(sp--); - } - } - } - row_info->channels += (png_byte)2; - row_info->color_type |= PNG_COLOR_MASK_COLOR; - row_info->pixel_depth = (png_byte)(row_info->channels * - row_info->bit_depth); - row_info->rowbytes = ((row_width * - row_info->pixel_depth + 7) >> 3); - } -} -#endif - -#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) -/* reduce RGB files to grayscale, with or without alpha - * using the equation given in Poynton's ColorFAQ at - * - * Copyright (c) 1998-01-04 Charles Poynton poynton@inforamp.net - * - * Y = 0.212671 * R + 0.715160 * G + 0.072169 * B - * - * We approximate this with - * - * Y = 0.21268 * R + 0.7151 * G + 0.07217 * B - * - * which can be expressed with integers as - * - * Y = (6969 * R + 23434 * G + 2365 * B)/32768 - * - * The calculation is to be done in a linear colorspace. - * - * Other integer coefficents can be used via png_set_rgb_to_gray(). - */ -int /* PRIVATE */ -png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row) - -{ - png_uint_32 i; - - png_uint_32 row_width = row_info->width; - int rgb_error = 0; - - png_debug(1, "in png_do_rgb_to_gray\n"); - if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - (row_info->color_type & PNG_COLOR_MASK_COLOR)) - { - png_uint_32 rc = png_ptr->rgb_to_gray_red_coeff; - png_uint_32 gc = png_ptr->rgb_to_gray_green_coeff; - png_uint_32 bc = png_ptr->rgb_to_gray_blue_coeff; - - if (row_info->color_type == PNG_COLOR_TYPE_RGB) - { - if (row_info->bit_depth == 8) - { -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - if (png_ptr->gamma_from_1 != NULL && png_ptr->gamma_to_1 != NULL) - { - png_bytep sp = row; - png_bytep dp = row; - - for (i = 0; i < row_width; i++) - { - png_byte red = png_ptr->gamma_to_1[*(sp++)]; - png_byte green = png_ptr->gamma_to_1[*(sp++)]; - png_byte blue = png_ptr->gamma_to_1[*(sp++)]; - if(red != green || red != blue) - { - rgb_error |= 1; - *(dp++) = png_ptr->gamma_from_1[ - (rc*red+gc*green+bc*blue)>>15]; - } - else - *(dp++) = *(sp-1); - } - } - else -#endif - { - png_bytep sp = row; - png_bytep dp = row; - for (i = 0; i < row_width; i++) - { - png_byte red = *(sp++); - png_byte green = *(sp++); - png_byte blue = *(sp++); - if(red != green || red != blue) - { - rgb_error |= 1; - *(dp++) = (png_byte)((rc*red+gc*green+bc*blue)>>15); - } - else - *(dp++) = *(sp-1); - } - } - } - - else /* RGB bit_depth == 16 */ - { -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - if (png_ptr->gamma_16_to_1 != NULL && - png_ptr->gamma_16_from_1 != NULL) - { - png_bytep sp = row; - png_bytep dp = row; - for (i = 0; i < row_width; i++) - { - png_uint_16 red, green, blue, w; - - red = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; - green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; - blue = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; - - if(red == green && red == blue) - w = red; - else - { - png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) >> - png_ptr->gamma_shift][red>>8]; - png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >> - png_ptr->gamma_shift][green>>8]; - png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >> - png_ptr->gamma_shift][blue>>8]; - png_uint_16 gray16 = (png_uint_16)((rc*red_1 + gc*green_1 - + bc*blue_1)>>15); - w = png_ptr->gamma_16_from_1[(gray16&0xff) >> - png_ptr->gamma_shift][gray16 >> 8]; - rgb_error |= 1; - } - - *(dp++) = (png_byte)((w>>8) & 0xff); - *(dp++) = (png_byte)(w & 0xff); - } - } - else -#endif - { - png_bytep sp = row; - png_bytep dp = row; - for (i = 0; i < row_width; i++) - { - png_uint_16 red, green, blue, gray16; - - red = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; - green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; - blue = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; - - if(red != green || red != blue) - rgb_error |= 1; - gray16 = (png_uint_16)((rc*red + gc*green + bc*blue)>>15); - *(dp++) = (png_byte)((gray16>>8) & 0xff); - *(dp++) = (png_byte)(gray16 & 0xff); - } - } - } - } - if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - { - if (row_info->bit_depth == 8) - { -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - if (png_ptr->gamma_from_1 != NULL && png_ptr->gamma_to_1 != NULL) - { - png_bytep sp = row; - png_bytep dp = row; - for (i = 0; i < row_width; i++) - { - png_byte red = png_ptr->gamma_to_1[*(sp++)]; - png_byte green = png_ptr->gamma_to_1[*(sp++)]; - png_byte blue = png_ptr->gamma_to_1[*(sp++)]; - if(red != green || red != blue) - rgb_error |= 1; - *(dp++) = png_ptr->gamma_from_1 - [(rc*red + gc*green + bc*blue)>>15]; - *(dp++) = *(sp++); /* alpha */ - } - } - else -#endif - { - png_bytep sp = row; - png_bytep dp = row; - for (i = 0; i < row_width; i++) - { - png_byte red = *(sp++); - png_byte green = *(sp++); - png_byte blue = *(sp++); - if(red != green || red != blue) - rgb_error |= 1; - *(dp++) = (png_byte)((gc*red + gc*green + bc*blue)>>8); - *(dp++) = *(sp++); /* alpha */ - } - } - } - else /* RGBA bit_depth == 16 */ - { -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - if (png_ptr->gamma_16_to_1 != NULL && - png_ptr->gamma_16_from_1 != NULL) - { - png_bytep sp = row; - png_bytep dp = row; - for (i = 0; i < row_width; i++) - { - png_uint_16 red, green, blue, w; - - red = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; - green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; - blue = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2; - - if(red == green && red == blue) - w = red; - else - { - png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) >> - png_ptr->gamma_shift][red>>8]; - png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >> - png_ptr->gamma_shift][green>>8]; - png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >> - png_ptr->gamma_shift][blue>>8]; - png_uint_16 gray16 = (png_uint_16)((rc * red_1 - + gc * green_1 + bc * blue_1)>>15); - w = png_ptr->gamma_16_from_1[(gray16&0xff) >> - png_ptr->gamma_shift][gray16 >> 8]; - rgb_error |= 1; - } - - *(dp++) = (png_byte)((w>>8) & 0xff); - *(dp++) = (png_byte)(w & 0xff); - *(dp++) = *(sp++); /* alpha */ - *(dp++) = *(sp++); - } - } - else -#endif - { - png_bytep sp = row; - png_bytep dp = row; - for (i = 0; i < row_width; i++) - { - png_uint_16 red, green, blue, gray16; - red = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2; - green = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2; - blue = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2; - if(red != green || red != blue) - rgb_error |= 1; - gray16 = (png_uint_16)((rc*red + gc*green + bc*blue)>>15); - *(dp++) = (png_byte)((gray16>>8) & 0xff); - *(dp++) = (png_byte)(gray16 & 0xff); - *(dp++) = *(sp++); /* alpha */ - *(dp++) = *(sp++); - } - } - } - } - row_info->channels -= (png_byte)2; - row_info->color_type &= ~PNG_COLOR_MASK_COLOR; - row_info->pixel_depth = (png_byte)(row_info->channels * - row_info->bit_depth); - row_info->rowbytes = ((row_width * - row_info->pixel_depth + 7) >> 3); - } - return rgb_error; -} -#endif - -/* Build a grayscale palette. Palette is assumed to be 1 << bit_depth - * large of png_color. This lets grayscale images be treated as - * paletted. Most useful for gamma correction and simplification - * of code. - */ -void PNGAPI -png_build_grayscale_palette(int bit_depth, png_colorp palette) -{ - int num_palette; - int color_inc; - int i; - int v; - - png_debug(1, "in png_do_build_grayscale_palette\n"); - if (palette == NULL) - return; - - switch (bit_depth) - { - case 1: - num_palette = 2; - color_inc = 0xff; - break; - case 2: - num_palette = 4; - color_inc = 0x55; - break; - case 4: - num_palette = 16; - color_inc = 0x11; - break; - case 8: - num_palette = 256; - color_inc = 1; - break; - default: - num_palette = 0; - color_inc = 0; - break; - } - - for (i = 0, v = 0; i < num_palette; i++, v += color_inc) - { - palette[i].red = (png_byte)v; - palette[i].green = (png_byte)v; - palette[i].blue = (png_byte)v; - } -} - -/* This function is currently unused. Do we really need it? */ -#if defined(PNG_READ_DITHER_SUPPORTED) && defined(PNG_CORRECT_PALETTE_SUPPORTED) -void /* PRIVATE */ -png_correct_palette(png_structp png_ptr, png_colorp palette, - int num_palette) -{ - png_debug(1, "in png_correct_palette\n"); -#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \ - defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED) - if (png_ptr->transformations & (PNG_GAMMA | PNG_BACKGROUND)) - { - png_color back, back_1; - - if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_FILE) - { - back.red = png_ptr->gamma_table[png_ptr->background.red]; - back.green = png_ptr->gamma_table[png_ptr->background.green]; - back.blue = png_ptr->gamma_table[png_ptr->background.blue]; - - back_1.red = png_ptr->gamma_to_1[png_ptr->background.red]; - back_1.green = png_ptr->gamma_to_1[png_ptr->background.green]; - back_1.blue = png_ptr->gamma_to_1[png_ptr->background.blue]; - } - else - { - double g; - - g = 1.0 / (png_ptr->background_gamma * png_ptr->screen_gamma); - - if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_SCREEN || - fabs(g - 1.0) < PNG_GAMMA_THRESHOLD) - { - back.red = png_ptr->background.red; - back.green = png_ptr->background.green; - back.blue = png_ptr->background.blue; - } - else - { - back.red = - (png_byte)(pow((double)png_ptr->background.red/255, g) * - 255.0 + 0.5); - back.green = - (png_byte)(pow((double)png_ptr->background.green/255, g) * - 255.0 + 0.5); - back.blue = - (png_byte)(pow((double)png_ptr->background.blue/255, g) * - 255.0 + 0.5); - } - - g = 1.0 / png_ptr->background_gamma; - - back_1.red = - (png_byte)(pow((double)png_ptr->background.red/255, g) * - 255.0 + 0.5); - back_1.green = - (png_byte)(pow((double)png_ptr->background.green/255, g) * - 255.0 + 0.5); - back_1.blue = - (png_byte)(pow((double)png_ptr->background.blue/255, g) * - 255.0 + 0.5); - } - - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - png_uint_32 i; - - for (i = 0; i < (png_uint_32)num_palette; i++) - { - if (i < png_ptr->num_trans && png_ptr->trans[i] == 0) - { - palette[i] = back; - } - else if (i < png_ptr->num_trans && png_ptr->trans[i] != 0xff) - { - png_byte v, w; - - v = png_ptr->gamma_to_1[png_ptr->palette[i].red]; - png_composite(w, v, png_ptr->trans[i], back_1.red); - palette[i].red = png_ptr->gamma_from_1[w]; - - v = png_ptr->gamma_to_1[png_ptr->palette[i].green]; - png_composite(w, v, png_ptr->trans[i], back_1.green); - palette[i].green = png_ptr->gamma_from_1[w]; - - v = png_ptr->gamma_to_1[png_ptr->palette[i].blue]; - png_composite(w, v, png_ptr->trans[i], back_1.blue); - palette[i].blue = png_ptr->gamma_from_1[w]; - } - else - { - palette[i].red = png_ptr->gamma_table[palette[i].red]; - palette[i].green = png_ptr->gamma_table[palette[i].green]; - palette[i].blue = png_ptr->gamma_table[palette[i].blue]; - } - } - } - else - { - int i; - - for (i = 0; i < num_palette; i++) - { - if (palette[i].red == (png_byte)png_ptr->trans_values.gray) - { - palette[i] = back; - } - else - { - palette[i].red = png_ptr->gamma_table[palette[i].red]; - palette[i].green = png_ptr->gamma_table[palette[i].green]; - palette[i].blue = png_ptr->gamma_table[palette[i].blue]; - } - } - } - } - else -#endif -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (png_ptr->transformations & PNG_GAMMA) - { - int i; - - for (i = 0; i < num_palette; i++) - { - palette[i].red = png_ptr->gamma_table[palette[i].red]; - palette[i].green = png_ptr->gamma_table[palette[i].green]; - palette[i].blue = png_ptr->gamma_table[palette[i].blue]; - } - } -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - else -#endif -#endif -#if defined(PNG_READ_BACKGROUND_SUPPORTED) - if (png_ptr->transformations & PNG_BACKGROUND) - { - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - png_color back; - - back.red = (png_byte)png_ptr->background.red; - back.green = (png_byte)png_ptr->background.green; - back.blue = (png_byte)png_ptr->background.blue; - - for (i = 0; i < (int)png_ptr->num_trans; i++) - { - if (png_ptr->trans[i] == 0) - { - palette[i].red = back.red; - palette[i].green = back.green; - palette[i].blue = back.blue; - } - else if (png_ptr->trans[i] != 0xff) - { - png_composite(palette[i].red, png_ptr->palette[i].red, - png_ptr->trans[i], back.red); - png_composite(palette[i].green, png_ptr->palette[i].green, - png_ptr->trans[i], back.green); - png_composite(palette[i].blue, png_ptr->palette[i].blue, - png_ptr->trans[i], back.blue); - } - } - } - else /* assume grayscale palette (what else could it be?) */ - { - int i; - - for (i = 0; i < num_palette; i++) - { - if (i == (png_byte)png_ptr->trans_values.gray) - { - palette[i].red = (png_byte)png_ptr->background.red; - palette[i].green = (png_byte)png_ptr->background.green; - palette[i].blue = (png_byte)png_ptr->background.blue; - } - } - } - } -#endif -} -#endif - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) -/* Replace any alpha or transparency with the supplied background color. - * "background" is already in the screen gamma, while "background_1" is - * at a gamma of 1.0. Paletted files have already been taken care of. - */ -void /* PRIVATE */ -png_do_background(png_row_infop row_info, png_bytep row, - png_color_16p trans_values, png_color_16p background -#if defined(PNG_READ_GAMMA_SUPPORTED) - , png_color_16p background_1, - png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1, - png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1, - png_uint_16pp gamma_16_to_1, int gamma_shift -#endif - ) -{ - png_bytep sp, dp; - png_uint_32 i; - png_uint_32 row_width=row_info->width; - int shift; - - png_debug(1, "in png_do_background\n"); - if (background != NULL && -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - (!(row_info->color_type & PNG_COLOR_MASK_ALPHA) || - (row_info->color_type != PNG_COLOR_TYPE_PALETTE && trans_values))) - { - switch (row_info->color_type) - { - case PNG_COLOR_TYPE_GRAY: - { - switch (row_info->bit_depth) - { - case 1: - { - sp = row; - shift = 7; - for (i = 0; i < row_width; i++) - { - if ((png_uint_16)((*sp >> shift) & 0x01) - == trans_values->gray) - { - *sp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff); - *sp |= (png_byte)(background->gray << shift); - } - if (!shift) - { - shift = 7; - sp++; - } - else - shift--; - } - break; - } - case 2: - { -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (gamma_table != NULL) - { - sp = row; - shift = 6; - for (i = 0; i < row_width; i++) - { - if ((png_uint_16)((*sp >> shift) & 0x03) - == trans_values->gray) - { - *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); - *sp |= (png_byte)(background->gray << shift); - } - else - { - png_byte p = (png_byte)((*sp >> shift) & 0x03); - png_byte g = (png_byte)((gamma_table [p | (p << 2) | - (p << 4) | (p << 6)] >> 6) & 0x03); - *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); - *sp |= (png_byte)(g << shift); - } - if (!shift) - { - shift = 6; - sp++; - } - else - shift -= 2; - } - } - else -#endif - { - sp = row; - shift = 6; - for (i = 0; i < row_width; i++) - { - if ((png_uint_16)((*sp >> shift) & 0x03) - == trans_values->gray) - { - *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); - *sp |= (png_byte)(background->gray << shift); - } - if (!shift) - { - shift = 6; - sp++; - } - else - shift -= 2; - } - } - break; - } - case 4: - { -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (gamma_table != NULL) - { - sp = row; - shift = 4; - for (i = 0; i < row_width; i++) - { - if ((png_uint_16)((*sp >> shift) & 0x0f) - == trans_values->gray) - { - *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); - *sp |= (png_byte)(background->gray << shift); - } - else - { - png_byte p = (png_byte)((*sp >> shift) & 0x0f); - png_byte g = (png_byte)((gamma_table[p | - (p << 4)] >> 4) & 0x0f); - *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); - *sp |= (png_byte)(g << shift); - } - if (!shift) - { - shift = 4; - sp++; - } - else - shift -= 4; - } - } - else -#endif - { - sp = row; - shift = 4; - for (i = 0; i < row_width; i++) - { - if ((png_uint_16)((*sp >> shift) & 0x0f) - == trans_values->gray) - { - *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); - *sp |= (png_byte)(background->gray << shift); - } - if (!shift) - { - shift = 4; - sp++; - } - else - shift -= 4; - } - } - break; - } - case 8: - { -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (gamma_table != NULL) - { - sp = row; - for (i = 0; i < row_width; i++, sp++) - { - if (*sp == trans_values->gray) - { - *sp = (png_byte)background->gray; - } - else - { - *sp = gamma_table[*sp]; - } - } - } - else -#endif - { - sp = row; - for (i = 0; i < row_width; i++, sp++) - { - if (*sp == trans_values->gray) - { - *sp = (png_byte)background->gray; - } - } - } - break; - } - case 16: - { -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (gamma_16 != NULL) - { - sp = row; - for (i = 0; i < row_width; i++, sp += 2) - { - png_uint_16 v; - - v = (png_uint_16)(((*sp) << 8) + *(sp + 1)); - if (v == trans_values->gray) - { - /* background is already in screen gamma */ - *sp = (png_byte)((background->gray >> 8) & 0xff); - *(sp + 1) = (png_byte)(background->gray & 0xff); - } - else - { - v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - } - } - } - else -#endif - { - sp = row; - for (i = 0; i < row_width; i++, sp += 2) - { - png_uint_16 v; - - v = (png_uint_16)(((*sp) << 8) + *(sp + 1)); - if (v == trans_values->gray) - { - *sp = (png_byte)((background->gray >> 8) & 0xff); - *(sp + 1) = (png_byte)(background->gray & 0xff); - } - } - } - break; - } - } - break; - } - case PNG_COLOR_TYPE_RGB: - { - if (row_info->bit_depth == 8) - { -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (gamma_table != NULL) - { - sp = row; - for (i = 0; i < row_width; i++, sp += 3) - { - if (*sp == trans_values->red && - *(sp + 1) == trans_values->green && - *(sp + 2) == trans_values->blue) - { - *sp = (png_byte)background->red; - *(sp + 1) = (png_byte)background->green; - *(sp + 2) = (png_byte)background->blue; - } - else - { - *sp = gamma_table[*sp]; - *(sp + 1) = gamma_table[*(sp + 1)]; - *(sp + 2) = gamma_table[*(sp + 2)]; - } - } - } - else -#endif - { - sp = row; - for (i = 0; i < row_width; i++, sp += 3) - { - if (*sp == trans_values->red && - *(sp + 1) == trans_values->green && - *(sp + 2) == trans_values->blue) - { - *sp = (png_byte)background->red; - *(sp + 1) = (png_byte)background->green; - *(sp + 2) = (png_byte)background->blue; - } - } - } - } - else /* if (row_info->bit_depth == 16) */ - { -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (gamma_16 != NULL) - { - sp = row; - for (i = 0; i < row_width; i++, sp += 6) - { - png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1)); - png_uint_16 g = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3)); - png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5)); - if (r == trans_values->red && g == trans_values->green && - b == trans_values->blue) - { - /* background is already in screen gamma */ - *sp = (png_byte)((background->red >> 8) & 0xff); - *(sp + 1) = (png_byte)(background->red & 0xff); - *(sp + 2) = (png_byte)((background->green >> 8) & 0xff); - *(sp + 3) = (png_byte)(background->green & 0xff); - *(sp + 4) = (png_byte)((background->blue >> 8) & 0xff); - *(sp + 5) = (png_byte)(background->blue & 0xff); - } - else - { - png_uint_16 v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)]; - *(sp + 2) = (png_byte)((v >> 8) & 0xff); - *(sp + 3) = (png_byte)(v & 0xff); - v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)]; - *(sp + 4) = (png_byte)((v >> 8) & 0xff); - *(sp + 5) = (png_byte)(v & 0xff); - } - } - } - else -#endif - { - sp = row; - for (i = 0; i < row_width; i++, sp += 6) - { - png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp+1)); - png_uint_16 g = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3)); - png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5)); - - if (r == trans_values->red && g == trans_values->green && - b == trans_values->blue) - { - *sp = (png_byte)((background->red >> 8) & 0xff); - *(sp + 1) = (png_byte)(background->red & 0xff); - *(sp + 2) = (png_byte)((background->green >> 8) & 0xff); - *(sp + 3) = (png_byte)(background->green & 0xff); - *(sp + 4) = (png_byte)((background->blue >> 8) & 0xff); - *(sp + 5) = (png_byte)(background->blue & 0xff); - } - } - } - } - break; - } - case PNG_COLOR_TYPE_GRAY_ALPHA: - { - if (row_info->bit_depth == 8) - { -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (gamma_to_1 != NULL && gamma_from_1 != NULL && - gamma_table != NULL) - { - sp = row; - dp = row; - for (i = 0; i < row_width; i++, sp += 2, dp++) - { - png_uint_16 a = *(sp + 1); - - if (a == 0xff) - { - *dp = gamma_table[*sp]; - } - else if (a == 0) - { - /* background is already in screen gamma */ - *dp = (png_byte)background->gray; - } - else - { - png_byte v, w; - - v = gamma_to_1[*sp]; - png_composite(w, v, a, background_1->gray); - *dp = gamma_from_1[w]; - } - } - } - else -#endif - { - sp = row; - dp = row; - for (i = 0; i < row_width; i++, sp += 2, dp++) - { - png_byte a = *(sp + 1); - - if (a == 0xff) - { - *dp = *sp; - } -#if defined(PNG_READ_GAMMA_SUPPORTED) - else if (a == 0) - { - *dp = (png_byte)background->gray; - } - else - { - png_composite(*dp, *sp, a, background_1->gray); - } -#else - *dp = (png_byte)background->gray; -#endif - } - } - } - else /* if (png_ptr->bit_depth == 16) */ - { -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (gamma_16 != NULL && gamma_16_from_1 != NULL && - gamma_16_to_1 != NULL) - { - sp = row; - dp = row; - for (i = 0; i < row_width; i++, sp += 4, dp += 2) - { - png_uint_16 a = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3)); - - if (a == (png_uint_16)0xffff) - { - png_uint_16 v; - - v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; - *dp = (png_byte)((v >> 8) & 0xff); - *(dp + 1) = (png_byte)(v & 0xff); - } -#if defined(PNG_READ_GAMMA_SUPPORTED) - else if (a == 0) -#else - else -#endif - { - /* background is already in screen gamma */ - *dp = (png_byte)((background->gray >> 8) & 0xff); - *(dp + 1) = (png_byte)(background->gray & 0xff); - } -#if defined(PNG_READ_GAMMA_SUPPORTED) - else - { - png_uint_16 g, v, w; - - g = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp]; - png_composite_16(v, g, a, background_1->gray); - w = gamma_16_from_1[(v&0xff) >> gamma_shift][v >> 8]; - *dp = (png_byte)((w >> 8) & 0xff); - *(dp + 1) = (png_byte)(w & 0xff); - } -#endif - } - } - else -#endif - { - sp = row; - dp = row; - for (i = 0; i < row_width; i++, sp += 4, dp += 2) - { - png_uint_16 a = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3)); - if (a == (png_uint_16)0xffff) - { - png_memcpy(dp, sp, 2); - } -#if defined(PNG_READ_GAMMA_SUPPORTED) - else if (a == 0) -#else - else -#endif - { - *dp = (png_byte)((background->gray >> 8) & 0xff); - *(dp + 1) = (png_byte)(background->gray & 0xff); - } -#if defined(PNG_READ_GAMMA_SUPPORTED) - else - { - png_uint_16 g, v; - - g = (png_uint_16)(((*sp) << 8) + *(sp + 1)); - png_composite_16(v, g, a, background_1->gray); - *dp = (png_byte)((v >> 8) & 0xff); - *(dp + 1) = (png_byte)(v & 0xff); - } -#endif - } - } - } - break; - } - case PNG_COLOR_TYPE_RGB_ALPHA: - { - if (row_info->bit_depth == 8) - { -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (gamma_to_1 != NULL && gamma_from_1 != NULL && - gamma_table != NULL) - { - sp = row; - dp = row; - for (i = 0; i < row_width; i++, sp += 4, dp += 3) - { - png_byte a = *(sp + 3); - - if (a == 0xff) - { - *dp = gamma_table[*sp]; - *(dp + 1) = gamma_table[*(sp + 1)]; - *(dp + 2) = gamma_table[*(sp + 2)]; - } - else if (a == 0) - { - /* background is already in screen gamma */ - *dp = (png_byte)background->red; - *(dp + 1) = (png_byte)background->green; - *(dp + 2) = (png_byte)background->blue; - } - else - { - png_byte v, w; - - v = gamma_to_1[*sp]; - png_composite(w, v, a, background_1->red); - *dp = gamma_from_1[w]; - v = gamma_to_1[*(sp + 1)]; - png_composite(w, v, a, background_1->green); - *(dp + 1) = gamma_from_1[w]; - v = gamma_to_1[*(sp + 2)]; - png_composite(w, v, a, background_1->blue); - *(dp + 2) = gamma_from_1[w]; - } - } - } - else -#endif - { - sp = row; - dp = row; - for (i = 0; i < row_width; i++, sp += 4, dp += 3) - { - png_byte a = *(sp + 3); - - if (a == 0xff) - { - *dp = *sp; - *(dp + 1) = *(sp + 1); - *(dp + 2) = *(sp + 2); - } - else if (a == 0) - { - *dp = (png_byte)background->red; - *(dp + 1) = (png_byte)background->green; - *(dp + 2) = (png_byte)background->blue; - } - else - { - png_composite(*dp, *sp, a, background->red); - png_composite(*(dp + 1), *(sp + 1), a, - background->green); - png_composite(*(dp + 2), *(sp + 2), a, - background->blue); - } - } - } - } - else /* if (row_info->bit_depth == 16) */ - { -#if defined(PNG_READ_GAMMA_SUPPORTED) - if (gamma_16 != NULL && gamma_16_from_1 != NULL && - gamma_16_to_1 != NULL) - { - sp = row; - dp = row; - for (i = 0; i < row_width; i++, sp += 8, dp += 6) - { - png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6)) - << 8) + (png_uint_16)(*(sp + 7))); - if (a == (png_uint_16)0xffff) - { - png_uint_16 v; - - v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; - *dp = (png_byte)((v >> 8) & 0xff); - *(dp + 1) = (png_byte)(v & 0xff); - v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)]; - *(dp + 2) = (png_byte)((v >> 8) & 0xff); - *(dp + 3) = (png_byte)(v & 0xff); - v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)]; - *(dp + 4) = (png_byte)((v >> 8) & 0xff); - *(dp + 5) = (png_byte)(v & 0xff); - } - else if (a == 0) - { - /* background is already in screen gamma */ - *dp = (png_byte)((background->red >> 8) & 0xff); - *(dp + 1) = (png_byte)(background->red & 0xff); - *(dp + 2) = (png_byte)((background->green >> 8) & 0xff); - *(dp + 3) = (png_byte)(background->green & 0xff); - *(dp + 4) = (png_byte)((background->blue >> 8) & 0xff); - *(dp + 5) = (png_byte)(background->blue & 0xff); - } - else - { - png_uint_16 v, w, x; - - v = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp]; - png_composite_16(w, v, a, background_1->red); - x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8]; - *dp = (png_byte)((x >> 8) & 0xff); - *(dp + 1) = (png_byte)(x & 0xff); - v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)]; - png_composite_16(w, v, a, background_1->green); - x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8]; - *(dp + 2) = (png_byte)((x >> 8) & 0xff); - *(dp + 3) = (png_byte)(x & 0xff); - v = gamma_16_to_1[*(sp + 5) >> gamma_shift][*(sp + 4)]; - png_composite_16(w, v, a, background_1->blue); - x = gamma_16_from_1[(w & 0xff) >> gamma_shift][w >> 8]; - *(dp + 4) = (png_byte)((x >> 8) & 0xff); - *(dp + 5) = (png_byte)(x & 0xff); - } - } - } - else -#endif - { - sp = row; - dp = row; - for (i = 0; i < row_width; i++, sp += 8, dp += 6) - { - png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6)) - << 8) + (png_uint_16)(*(sp + 7))); - if (a == (png_uint_16)0xffff) - { - png_memcpy(dp, sp, 6); - } - else if (a == 0) - { - *dp = (png_byte)((background->red >> 8) & 0xff); - *(dp + 1) = (png_byte)(background->red & 0xff); - *(dp + 2) = (png_byte)((background->green >> 8) & 0xff); - *(dp + 3) = (png_byte)(background->green & 0xff); - *(dp + 4) = (png_byte)((background->blue >> 8) & 0xff); - *(dp + 5) = (png_byte)(background->blue & 0xff); - } - else - { - png_uint_16 v; - - png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1)); - png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8) - + *(sp + 3)); - png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8) - + *(sp + 5)); - - png_composite_16(v, r, a, background->red); - *dp = (png_byte)((v >> 8) & 0xff); - *(dp + 1) = (png_byte)(v & 0xff); - png_composite_16(v, g, a, background->green); - *(dp + 2) = (png_byte)((v >> 8) & 0xff); - *(dp + 3) = (png_byte)(v & 0xff); - png_composite_16(v, b, a, background->blue); - *(dp + 4) = (png_byte)((v >> 8) & 0xff); - *(dp + 5) = (png_byte)(v & 0xff); - } - } - } - } - break; - } - } - - if (row_info->color_type & PNG_COLOR_MASK_ALPHA) - { - row_info->color_type &= ~PNG_COLOR_MASK_ALPHA; - row_info->channels--; - row_info->pixel_depth = (png_byte)(row_info->channels * - row_info->bit_depth); - row_info->rowbytes = ((row_width * - row_info->pixel_depth + 7) >> 3); - } - } -} -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) -/* Gamma correct the image, avoiding the alpha channel. Make sure - * you do this after you deal with the transparency issue on grayscale - * or RGB images. If your bit depth is 8, use gamma_table, if it - * is 16, use gamma_16_table and gamma_shift. Build these with - * build_gamma_table(). - */ -void /* PRIVATE */ -png_do_gamma(png_row_infop row_info, png_bytep row, - png_bytep gamma_table, png_uint_16pp gamma_16_table, - int gamma_shift) -{ - png_bytep sp; - png_uint_32 i; - png_uint_32 row_width=row_info->width; - - png_debug(1, "in png_do_gamma\n"); - if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - ((row_info->bit_depth <= 8 && gamma_table != NULL) || - (row_info->bit_depth == 16 && gamma_16_table != NULL))) - { - switch (row_info->color_type) - { - case PNG_COLOR_TYPE_RGB: - { - if (row_info->bit_depth == 8) - { - sp = row; - for (i = 0; i < row_width; i++) - { - *sp = gamma_table[*sp]; - sp++; - *sp = gamma_table[*sp]; - sp++; - *sp = gamma_table[*sp]; - sp++; - } - } - else /* if (row_info->bit_depth == 16) */ - { - sp = row; - for (i = 0; i < row_width; i++) - { - png_uint_16 v; - - v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - sp += 2; - v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - sp += 2; - v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - sp += 2; - } - } - break; - } - case PNG_COLOR_TYPE_RGB_ALPHA: - { - if (row_info->bit_depth == 8) - { - sp = row; - for (i = 0; i < row_width; i++) - { - *sp = gamma_table[*sp]; - sp++; - *sp = gamma_table[*sp]; - sp++; - *sp = gamma_table[*sp]; - sp++; - sp++; - } - } - else /* if (row_info->bit_depth == 16) */ - { - sp = row; - for (i = 0; i < row_width; i++) - { - png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - sp += 2; - v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - sp += 2; - v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - sp += 4; - } - } - break; - } - case PNG_COLOR_TYPE_GRAY_ALPHA: - { - if (row_info->bit_depth == 8) - { - sp = row; - for (i = 0; i < row_width; i++) - { - *sp = gamma_table[*sp]; - sp += 2; - } - } - else /* if (row_info->bit_depth == 16) */ - { - sp = row; - for (i = 0; i < row_width; i++) - { - png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - sp += 4; - } - } - break; - } - case PNG_COLOR_TYPE_GRAY: - { - if (row_info->bit_depth == 2) - { - sp = row; - for (i = 0; i < row_width; i += 4) - { - int a = *sp & 0xc0; - int b = *sp & 0x30; - int c = *sp & 0x0c; - int d = *sp & 0x03; - - *sp = (png_byte)( - ((((int)gamma_table[a|(a>>2)|(a>>4)|(a>>6)]) ) & 0xc0)| - ((((int)gamma_table[(b<<2)|b|(b>>2)|(b>>4)])>>2) & 0x30)| - ((((int)gamma_table[(c<<4)|(c<<2)|c|(c>>2)])>>4) & 0x0c)| - ((((int)gamma_table[(d<<6)|(d<<4)|(d<<2)|d])>>6) )); - sp++; - } - } - if (row_info->bit_depth == 4) - { - sp = row; - for (i = 0; i < row_width; i += 2) - { - int msb = *sp & 0xf0; - int lsb = *sp & 0x0f; - - *sp = (png_byte)((((int)gamma_table[msb | (msb >> 4)]) & 0xf0) - | (((int)gamma_table[(lsb << 4) | lsb]) >> 4)); - sp++; - } - } - else if (row_info->bit_depth == 8) - { - sp = row; - for (i = 0; i < row_width; i++) - { - *sp = gamma_table[*sp]; - sp++; - } - } - else if (row_info->bit_depth == 16) - { - sp = row; - for (i = 0; i < row_width; i++) - { - png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; - *sp = (png_byte)((v >> 8) & 0xff); - *(sp + 1) = (png_byte)(v & 0xff); - sp += 2; - } - } - break; - } - } - } -} -#endif - -#if defined(PNG_READ_EXPAND_SUPPORTED) -/* Expands a palette row to an RGB or RGBA row depending - * upon whether you supply trans and num_trans. - */ -void /* PRIVATE */ -png_do_expand_palette(png_row_infop row_info, png_bytep row, - png_colorp palette, png_bytep trans, int num_trans) -{ - int shift, value; - png_bytep sp, dp; - png_uint_32 i; - png_uint_32 row_width=row_info->width; - - png_debug(1, "in png_do_expand_palette\n"); - if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - row_info->color_type == PNG_COLOR_TYPE_PALETTE) - { - if (row_info->bit_depth < 8) - { - switch (row_info->bit_depth) - { - case 1: - { - sp = row + (png_size_t)((row_width - 1) >> 3); - dp = row + (png_size_t)row_width - 1; - shift = 7 - (int)((row_width + 7) & 0x07); - for (i = 0; i < row_width; i++) - { - if ((*sp >> shift) & 0x01) - *dp = 1; - else - *dp = 0; - if (shift == 7) - { - shift = 0; - sp--; - } - else - shift++; - - dp--; - } - break; - } - case 2: - { - sp = row + (png_size_t)((row_width - 1) >> 2); - dp = row + (png_size_t)row_width - 1; - shift = (int)((3 - ((row_width + 3) & 0x03)) << 1); - for (i = 0; i < row_width; i++) - { - value = (*sp >> shift) & 0x03; - *dp = (png_byte)value; - if (shift == 6) - { - shift = 0; - sp--; - } - else - shift += 2; - - dp--; - } - break; - } - case 4: - { - sp = row + (png_size_t)((row_width - 1) >> 1); - dp = row + (png_size_t)row_width - 1; - shift = (int)((row_width & 0x01) << 2); - for (i = 0; i < row_width; i++) - { - value = (*sp >> shift) & 0x0f; - *dp = (png_byte)value; - if (shift == 4) - { - shift = 0; - sp--; - } - else - shift += 4; - - dp--; - } - break; - } - } - row_info->bit_depth = 8; - row_info->pixel_depth = 8; - row_info->rowbytes = row_width; - } - switch (row_info->bit_depth) - { - case 8: - { - if (trans != NULL) - { - sp = row + (png_size_t)row_width - 1; - dp = row + (png_size_t)(row_width << 2) - 1; - - for (i = 0; i < row_width; i++) - { - if ((int)(*sp) >= num_trans) - *dp-- = 0xff; - else - *dp-- = trans[*sp]; - *dp-- = palette[*sp].blue; - *dp-- = palette[*sp].green; - *dp-- = palette[*sp].red; - sp--; - } - row_info->bit_depth = 8; - row_info->pixel_depth = 32; - row_info->rowbytes = row_width * 4; - row_info->color_type = 6; - row_info->channels = 4; - } - else - { - sp = row + (png_size_t)row_width - 1; - dp = row + (png_size_t)(row_width * 3) - 1; - - for (i = 0; i < row_width; i++) - { - *dp-- = palette[*sp].blue; - *dp-- = palette[*sp].green; - *dp-- = palette[*sp].red; - sp--; - } - row_info->bit_depth = 8; - row_info->pixel_depth = 24; - row_info->rowbytes = row_width * 3; - row_info->color_type = 2; - row_info->channels = 3; - } - break; - } - } - } -} - -/* If the bit depth < 8, it is expanded to 8. Also, if the - * transparency value is supplied, an alpha channel is built. - */ -void /* PRIVATE */ -png_do_expand(png_row_infop row_info, png_bytep row, - png_color_16p trans_value) -{ - int shift, value; - png_bytep sp, dp; - png_uint_32 i; - png_uint_32 row_width=row_info->width; - - png_debug(1, "in png_do_expand\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif - { - if (row_info->color_type == PNG_COLOR_TYPE_GRAY) - { - png_uint_16 gray = (png_uint_16)(trans_value ? trans_value->gray : 0); - - if (row_info->bit_depth < 8) - { - switch (row_info->bit_depth) - { - case 1: - { - gray = (png_uint_16)(gray*0xff); - sp = row + (png_size_t)((row_width - 1) >> 3); - dp = row + (png_size_t)row_width - 1; - shift = 7 - (int)((row_width + 7) & 0x07); - for (i = 0; i < row_width; i++) - { - if ((*sp >> shift) & 0x01) - *dp = 0xff; - else - *dp = 0; - if (shift == 7) - { - shift = 0; - sp--; - } - else - shift++; - - dp--; - } - break; - } - case 2: - { - gray = (png_uint_16)(gray*0x55); - sp = row + (png_size_t)((row_width - 1) >> 2); - dp = row + (png_size_t)row_width - 1; - shift = (int)((3 - ((row_width + 3) & 0x03)) << 1); - for (i = 0; i < row_width; i++) - { - value = (*sp >> shift) & 0x03; - *dp = (png_byte)(value | (value << 2) | (value << 4) | - (value << 6)); - if (shift == 6) - { - shift = 0; - sp--; - } - else - shift += 2; - - dp--; - } - break; - } - case 4: - { - gray = (png_uint_16)(gray*0x11); - sp = row + (png_size_t)((row_width - 1) >> 1); - dp = row + (png_size_t)row_width - 1; - shift = (int)((1 - ((row_width + 1) & 0x01)) << 2); - for (i = 0; i < row_width; i++) - { - value = (*sp >> shift) & 0x0f; - *dp = (png_byte)(value | (value << 4)); - if (shift == 4) - { - shift = 0; - sp--; - } - else - shift = 4; - - dp--; - } - break; - } - } - row_info->bit_depth = 8; - row_info->pixel_depth = 8; - row_info->rowbytes = row_width; - } - - if (trans_value != NULL) - { - if (row_info->bit_depth == 8) - { - sp = row + (png_size_t)row_width - 1; - dp = row + (png_size_t)(row_width << 1) - 1; - for (i = 0; i < row_width; i++) - { - if (*sp == gray) - *dp-- = 0; - else - *dp-- = 0xff; - *dp-- = *sp--; - } - } - else if (row_info->bit_depth == 16) - { - sp = row + row_info->rowbytes - 1; - dp = row + (row_info->rowbytes << 1) - 1; - for (i = 0; i < row_width; i++) - { - if (((png_uint_16)*(sp) | - ((png_uint_16)*(sp - 1) << 8)) == gray) - { - *dp-- = 0; - *dp-- = 0; - } - else - { - *dp-- = 0xff; - *dp-- = 0xff; - } - *dp-- = *sp--; - *dp-- = *sp--; - } - } - row_info->color_type = PNG_COLOR_TYPE_GRAY_ALPHA; - row_info->channels = 2; - row_info->pixel_depth = (png_byte)(row_info->bit_depth << 1); - row_info->rowbytes = - ((row_width * row_info->pixel_depth) >> 3); - } - } - else if (row_info->color_type == PNG_COLOR_TYPE_RGB && trans_value) - { - if (row_info->bit_depth == 8) - { - sp = row + (png_size_t)row_info->rowbytes - 1; - dp = row + (png_size_t)(row_width << 2) - 1; - for (i = 0; i < row_width; i++) - { - if (*(sp - 2) == trans_value->red && - *(sp - 1) == trans_value->green && - *(sp - 0) == trans_value->blue) - *dp-- = 0; - else - *dp-- = 0xff; - *dp-- = *sp--; - *dp-- = *sp--; - *dp-- = *sp--; - } - } - else if (row_info->bit_depth == 16) - { - sp = row + row_info->rowbytes - 1; - dp = row + (png_size_t)(row_width << 3) - 1; - for (i = 0; i < row_width; i++) - { - if ((((png_uint_16)*(sp - 4) | - ((png_uint_16)*(sp - 5) << 8)) == trans_value->red) && - (((png_uint_16)*(sp - 2) | - ((png_uint_16)*(sp - 3) << 8)) == trans_value->green) && - (((png_uint_16)*(sp - 0) | - ((png_uint_16)*(sp - 1) << 8)) == trans_value->blue)) - { - *dp-- = 0; - *dp-- = 0; - } - else - { - *dp-- = 0xff; - *dp-- = 0xff; - } - *dp-- = *sp--; - *dp-- = *sp--; - *dp-- = *sp--; - *dp-- = *sp--; - *dp-- = *sp--; - *dp-- = *sp--; - } - } - row_info->color_type = PNG_COLOR_TYPE_RGB_ALPHA; - row_info->channels = 4; - row_info->pixel_depth = (png_byte)(row_info->bit_depth << 2); - row_info->rowbytes = - ((row_width * row_info->pixel_depth) >> 3); - } - } -} -#endif - -#if defined(PNG_READ_DITHER_SUPPORTED) -void /* PRIVATE */ -png_do_dither(png_row_infop row_info, png_bytep row, - png_bytep palette_lookup, png_bytep dither_lookup) -{ - png_bytep sp, dp; - png_uint_32 i; - png_uint_32 row_width=row_info->width; - - png_debug(1, "in png_do_dither\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif - { - if (row_info->color_type == PNG_COLOR_TYPE_RGB && - palette_lookup && row_info->bit_depth == 8) - { - int r, g, b, p; - sp = row; - dp = row; - for (i = 0; i < row_width; i++) - { - r = *sp++; - g = *sp++; - b = *sp++; - - /* this looks real messy, but the compiler will reduce - it down to a reasonable formula. For example, with - 5 bits per color, we get: - p = (((r >> 3) & 0x1f) << 10) | - (((g >> 3) & 0x1f) << 5) | - ((b >> 3) & 0x1f); - */ - p = (((r >> (8 - PNG_DITHER_RED_BITS)) & - ((1 << PNG_DITHER_RED_BITS) - 1)) << - (PNG_DITHER_GREEN_BITS + PNG_DITHER_BLUE_BITS)) | - (((g >> (8 - PNG_DITHER_GREEN_BITS)) & - ((1 << PNG_DITHER_GREEN_BITS) - 1)) << - (PNG_DITHER_BLUE_BITS)) | - ((b >> (8 - PNG_DITHER_BLUE_BITS)) & - ((1 << PNG_DITHER_BLUE_BITS) - 1)); - - *dp++ = palette_lookup[p]; - } - row_info->color_type = PNG_COLOR_TYPE_PALETTE; - row_info->channels = 1; - row_info->pixel_depth = row_info->bit_depth; - row_info->rowbytes = - ((row_width * row_info->pixel_depth + 7) >> 3); - } - else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA && - palette_lookup != NULL && row_info->bit_depth == 8) - { - int r, g, b, p; - sp = row; - dp = row; - for (i = 0; i < row_width; i++) - { - r = *sp++; - g = *sp++; - b = *sp++; - sp++; - - p = (((r >> (8 - PNG_DITHER_RED_BITS)) & - ((1 << PNG_DITHER_RED_BITS) - 1)) << - (PNG_DITHER_GREEN_BITS + PNG_DITHER_BLUE_BITS)) | - (((g >> (8 - PNG_DITHER_GREEN_BITS)) & - ((1 << PNG_DITHER_GREEN_BITS) - 1)) << - (PNG_DITHER_BLUE_BITS)) | - ((b >> (8 - PNG_DITHER_BLUE_BITS)) & - ((1 << PNG_DITHER_BLUE_BITS) - 1)); - - *dp++ = palette_lookup[p]; - } - row_info->color_type = PNG_COLOR_TYPE_PALETTE; - row_info->channels = 1; - row_info->pixel_depth = row_info->bit_depth; - row_info->rowbytes = - ((row_width * row_info->pixel_depth + 7) >> 3); - } - else if (row_info->color_type == PNG_COLOR_TYPE_PALETTE && - dither_lookup && row_info->bit_depth == 8) - { - sp = row; - for (i = 0; i < row_width; i++, sp++) - { - *sp = dither_lookup[*sp]; - } - } - } -} -#endif - -#ifdef PNG_FLOATING_POINT_SUPPORTED -#if defined(PNG_READ_GAMMA_SUPPORTED) -static int png_gamma_shift[] = - {0x10, 0x21, 0x42, 0x84, 0x110, 0x248, 0x550, 0xff0}; - -/* We build the 8- or 16-bit gamma tables here. Note that for 16-bit - * tables, we don't make a full table if we are reducing to 8-bit in - * the future. Note also how the gamma_16 tables are segmented so that - * we don't need to allocate > 64K chunks for a full 16-bit table. - */ -void /* PRIVATE */ -png_build_gamma_table(png_structp png_ptr) -{ - png_debug(1, "in png_build_gamma_table\n"); - if(png_ptr->gamma != 0.0) - { - if (png_ptr->bit_depth <= 8) - { - int i; - double g; - - if (png_ptr->screen_gamma > .000001) - g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); - else - g = 1.0; - - png_ptr->gamma_table = (png_bytep)png_malloc(png_ptr, - (png_uint_32)256); - - for (i = 0; i < 256; i++) - { - png_ptr->gamma_table[i] = (png_byte)(pow((double)i / 255.0, - g) * 255.0 + .5); - } - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ - defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) - if (png_ptr->transformations & ((PNG_BACKGROUND) | PNG_RGB_TO_GRAY)) - { - - g = 1.0 / (png_ptr->gamma); - - png_ptr->gamma_to_1 = (png_bytep)png_malloc(png_ptr, - (png_uint_32)256); - - for (i = 0; i < 256; i++) - { - png_ptr->gamma_to_1[i] = (png_byte)(pow((double)i / 255.0, - g) * 255.0 + .5); - } - - - png_ptr->gamma_from_1 = (png_bytep)png_malloc(png_ptr, - (png_uint_32)256); - - if(png_ptr->screen_gamma > 0.000001) - g = 1.0 / png_ptr->screen_gamma; - else - g = png_ptr->gamma; /* probably doing rgb_to_gray */ - - for (i = 0; i < 256; i++) - { - png_ptr->gamma_from_1[i] = (png_byte)(pow((double)i / 255.0, - g) * 255.0 + .5); - - } - } -#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */ - } - else - { - double g; - int i, j, shift, num; - int sig_bit; - png_uint_32 ig; - - if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) - { - sig_bit = (int)png_ptr->sig_bit.red; - if ((int)png_ptr->sig_bit.green > sig_bit) - sig_bit = png_ptr->sig_bit.green; - if ((int)png_ptr->sig_bit.blue > sig_bit) - sig_bit = png_ptr->sig_bit.blue; - } - else - { - sig_bit = (int)png_ptr->sig_bit.gray; - } - - if (sig_bit > 0) - shift = 16 - sig_bit; - else - shift = 0; - - if (png_ptr->transformations & PNG_16_TO_8) - { - if (shift < (16 - PNG_MAX_GAMMA_8)) - shift = (16 - PNG_MAX_GAMMA_8); - } - - if (shift > 8) - shift = 8; - if (shift < 0) - shift = 0; - - png_ptr->gamma_shift = (png_byte)shift; - - num = (1 << (8 - shift)); - - if (png_ptr->screen_gamma > .000001) - g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma); - else - g = 1.0; - - png_ptr->gamma_16_table = (png_uint_16pp)png_malloc(png_ptr, - (png_uint_32)(num * sizeof (png_uint_16p))); - - if (png_ptr->transformations & (PNG_16_TO_8 | PNG_BACKGROUND)) - { - double fin, fout; - png_uint_32 last, max; - - for (i = 0; i < num; i++) - { - png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(256 * sizeof (png_uint_16))); - } - - g = 1.0 / g; - last = 0; - for (i = 0; i < 256; i++) - { - fout = ((double)i + 0.5) / 256.0; - fin = pow(fout, g); - max = (png_uint_32)(fin * (double)((png_uint_32)num << 8)); - while (last <= max) - { - png_ptr->gamma_16_table[(int)(last & (0xff >> shift))] - [(int)(last >> (8 - shift))] = (png_uint_16)( - (png_uint_16)i | ((png_uint_16)i << 8)); - last++; - } - } - while (last < ((png_uint_32)num << 8)) - { - png_ptr->gamma_16_table[(int)(last & (0xff >> shift))] - [(int)(last >> (8 - shift))] = (png_uint_16)65535L; - last++; - } - } - else - { - for (i = 0; i < num; i++) - { - png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(256 * sizeof (png_uint_16))); - - ig = (((png_uint_32)i * (png_uint_32)png_gamma_shift[shift]) >> 4); - for (j = 0; j < 256; j++) - { - png_ptr->gamma_16_table[i][j] = - (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / - 65535.0, g) * 65535.0 + .5); - } - } - } - -#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ - defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) - if (png_ptr->transformations & (PNG_BACKGROUND | PNG_RGB_TO_GRAY)) - { - - g = 1.0 / (png_ptr->gamma); - - png_ptr->gamma_16_to_1 = (png_uint_16pp)png_malloc(png_ptr, - (png_uint_32)(num * sizeof (png_uint_16p ))); - - for (i = 0; i < num; i++) - { - png_ptr->gamma_16_to_1[i] = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(256 * sizeof (png_uint_16))); - - ig = (((png_uint_32)i * - (png_uint_32)png_gamma_shift[shift]) >> 4); - for (j = 0; j < 256; j++) - { - png_ptr->gamma_16_to_1[i][j] = - (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / - 65535.0, g) * 65535.0 + .5); - } - } - - if(png_ptr->screen_gamma > 0.000001) - g = 1.0 / png_ptr->screen_gamma; - else - g = png_ptr->gamma; /* probably doing rgb_to_gray */ - - png_ptr->gamma_16_from_1 = (png_uint_16pp)png_malloc(png_ptr, - (png_uint_32)(num * sizeof (png_uint_16p))); - - for (i = 0; i < num; i++) - { - png_ptr->gamma_16_from_1[i] = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(256 * sizeof (png_uint_16))); - - ig = (((png_uint_32)i * - (png_uint_32)png_gamma_shift[shift]) >> 4); - for (j = 0; j < 256; j++) - { - png_ptr->gamma_16_from_1[i][j] = - (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) / - 65535.0, g) * 65535.0 + .5); - } - } - } -#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */ - } - } -} -#endif -/* To do: install integer version of png_build_gamma_table here */ -#endif - -#if defined(PNG_MNG_FEATURES_SUPPORTED) -/* undoes intrapixel differencing */ -void /* PRIVATE */ -png_do_read_intrapixel(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_read_intrapixel\n"); - if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - (row_info->color_type & PNG_COLOR_MASK_COLOR)) - { - int bytes_per_pixel; - png_uint_32 row_width = row_info->width; - if (row_info->bit_depth == 8) - { - png_bytep rp; - png_uint_32 i; - - if (row_info->color_type == PNG_COLOR_TYPE_RGB) - bytes_per_pixel = 3; - else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - bytes_per_pixel = 4; - else - return; - - for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) - { - *(rp) = (png_byte)((256 + *rp + *(rp+1))&0xff); - *(rp+2) = (png_byte)((256 + *(rp+2) + *(rp+1))&0xff); - } - } - else if (row_info->bit_depth == 16) - { - png_bytep rp; - png_uint_32 i; - - if (row_info->color_type == PNG_COLOR_TYPE_RGB) - bytes_per_pixel = 6; - else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - bytes_per_pixel = 8; - else - return; - - for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) - { - png_uint_32 s0=*(rp )<<8 | *(rp+1); - png_uint_32 s1=*(rp+2)<<8 | *(rp+3); - png_uint_32 s2=*(rp+4)<<8 | *(rp+5); - png_uint_32 red=(65536+s0+s1)&0xffff; - png_uint_32 blue=(65536+s2+s1)&0xffff; - *(rp ) = (png_byte)((red>>8)&0xff); - *(rp+1) = (png_byte)(red&0xff); - *(rp+4) = (png_byte)((blue>>8)&0xff); - *(rp+5) = (png_byte)(blue&0xff); - } - } - } -} -#endif /* PNG_MNG_FEATURES_SUPPORTED */ diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngrutil.c b/gtkmm-osx/trunk/libpng-1.2.5/pngrutil.c deleted file mode 100644 index 9cbfed6..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/pngrutil.c +++ /dev/null @@ -1,3101 +0,0 @@ - -/* pngrutil.c - utilities to read a PNG file - * - * libpng 1.2.5 - October 3, 2002 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2002 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) - * - * This file contains routines that are only called from within - * libpng itself during the course of reading an image. - */ - -#define PNG_INTERNAL -#include "png.h" - -#if defined(_WIN32_WCE) -/* strtod() function is not supported on WindowsCE */ -# ifdef PNG_FLOATING_POINT_SUPPORTED -__inline double strtod(const char *nptr, char **endptr) -{ - double result = 0; - int len; - wchar_t *str, *end; - - len = MultiByteToWideChar(CP_ACP, 0, nptr, -1, NULL, 0); - str = (wchar_t *)malloc(len * sizeof(wchar_t)); - if ( NULL != str ) - { - MultiByteToWideChar(CP_ACP, 0, nptr, -1, str, len); - result = wcstod(str, &end); - len = WideCharToMultiByte(CP_ACP, 0, end, -1, NULL, 0, NULL, NULL); - *endptr = (char *)nptr + (png_strlen(nptr) - len + 1); - free(str); - } - return result; -} -# endif -#endif - -#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED -/* Grab an unsigned 32-bit integer from a buffer in big-endian format. */ -png_uint_32 /* PRIVATE */ -png_get_uint_32(png_bytep buf) -{ - png_uint_32 i = ((png_uint_32)(*buf) << 24) + - ((png_uint_32)(*(buf + 1)) << 16) + - ((png_uint_32)(*(buf + 2)) << 8) + - (png_uint_32)(*(buf + 3)); - - return (i); -} - -#if defined(PNG_READ_pCAL_SUPPORTED) || defined(PNG_READ_oFFs_SUPPORTED) -/* Grab a signed 32-bit integer from a buffer in big-endian format. The - * data is stored in the PNG file in two's complement format, and it is - * assumed that the machine format for signed integers is the same. */ -png_int_32 /* PRIVATE */ -png_get_int_32(png_bytep buf) -{ - png_int_32 i = ((png_int_32)(*buf) << 24) + - ((png_int_32)(*(buf + 1)) << 16) + - ((png_int_32)(*(buf + 2)) << 8) + - (png_int_32)(*(buf + 3)); - - return (i); -} -#endif /* PNG_READ_pCAL_SUPPORTED */ - -/* Grab an unsigned 16-bit integer from a buffer in big-endian format. */ -png_uint_16 /* PRIVATE */ -png_get_uint_16(png_bytep buf) -{ - png_uint_16 i = (png_uint_16)(((png_uint_16)(*buf) << 8) + - (png_uint_16)(*(buf + 1))); - - return (i); -} -#endif /* PNG_READ_BIG_ENDIAN_SUPPORTED */ - -/* Read data, and (optionally) run it through the CRC. */ -void /* PRIVATE */ -png_crc_read(png_structp png_ptr, png_bytep buf, png_size_t length) -{ - png_read_data(png_ptr, buf, length); - png_calculate_crc(png_ptr, buf, length); -} - -/* Optionally skip data and then check the CRC. Depending on whether we - are reading a ancillary or critical chunk, and how the program has set - things up, we may calculate the CRC on the data and print a message. - Returns '1' if there was a CRC error, '0' otherwise. */ -int /* PRIVATE */ -png_crc_finish(png_structp png_ptr, png_uint_32 skip) -{ - png_size_t i; - png_size_t istop = png_ptr->zbuf_size; - - for (i = (png_size_t)skip; i > istop; i -= istop) - { - png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size); - } - if (i) - { - png_crc_read(png_ptr, png_ptr->zbuf, i); - } - - if (png_crc_error(png_ptr)) - { - if (((png_ptr->chunk_name[0] & 0x20) && /* Ancillary */ - !(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN)) || - (!(png_ptr->chunk_name[0] & 0x20) && /* Critical */ - (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_USE))) - { - png_chunk_warning(png_ptr, "CRC error"); - } - else - { - png_chunk_error(png_ptr, "CRC error"); - } - return (1); - } - - return (0); -} - -/* Compare the CRC stored in the PNG file with that calculated by libpng from - the data it has read thus far. */ -int /* PRIVATE */ -png_crc_error(png_structp png_ptr) -{ - png_byte crc_bytes[4]; - png_uint_32 crc; - int need_crc = 1; - - if (png_ptr->chunk_name[0] & 0x20) /* ancillary */ - { - if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_MASK) == - (PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN)) - need_crc = 0; - } - else /* critical */ - { - if (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE) - need_crc = 0; - } - - png_read_data(png_ptr, crc_bytes, 4); - - if (need_crc) - { - crc = png_get_uint_32(crc_bytes); - return ((int)(crc != png_ptr->crc)); - } - else - return (0); -} - -#if defined(PNG_READ_zTXt_SUPPORTED) || defined(PNG_READ_iTXt_SUPPORTED) || \ - defined(PNG_READ_iCCP_SUPPORTED) -/* - * Decompress trailing data in a chunk. The assumption is that chunkdata - * points at an allocated area holding the contents of a chunk with a - * trailing compressed part. What we get back is an allocated area - * holding the original prefix part and an uncompressed version of the - * trailing part (the malloc area passed in is freed). - */ -png_charp /* PRIVATE */ -png_decompress_chunk(png_structp png_ptr, int comp_type, - png_charp chunkdata, png_size_t chunklength, - png_size_t prefix_size, png_size_t *newlength) -{ - static char msg[] = "Error decoding compressed text"; - png_charp text = NULL; - png_size_t text_size; - - if (comp_type == PNG_COMPRESSION_TYPE_BASE) - { - int ret = Z_OK; - png_ptr->zstream.next_in = (png_bytep)(chunkdata + prefix_size); - png_ptr->zstream.avail_in = (uInt)(chunklength - prefix_size); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - - text_size = 0; - text = NULL; - - while (png_ptr->zstream.avail_in) - { - ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); - if (ret != Z_OK && ret != Z_STREAM_END) - { - if (png_ptr->zstream.msg != NULL) - png_warning(png_ptr, png_ptr->zstream.msg); - else - png_warning(png_ptr, msg); - inflateReset(&png_ptr->zstream); - png_ptr->zstream.avail_in = 0; - - if (text == NULL) - { - text_size = prefix_size + sizeof(msg) + 1; - text = (png_charp)png_malloc_warn(png_ptr, text_size); - if (text == NULL) - { - png_free(png_ptr,chunkdata); - png_error(png_ptr,"Not enough memory to decompress chunk"); - } - png_memcpy(text, chunkdata, prefix_size); - } - - text[text_size - 1] = 0x00; - - /* Copy what we can of the error message into the text chunk */ - text_size = (png_size_t)(chunklength - (text - chunkdata) - 1); - text_size = sizeof(msg) > text_size ? text_size : sizeof(msg); - png_memcpy(text + prefix_size, msg, text_size + 1); - break; - } - if (!png_ptr->zstream.avail_out || ret == Z_STREAM_END) - { - if (text == NULL) - { - text_size = prefix_size + - png_ptr->zbuf_size - png_ptr->zstream.avail_out; - text = (png_charp)png_malloc_warn(png_ptr, text_size + 1); - if (text == NULL) - { - png_free(png_ptr,chunkdata); - png_error(png_ptr,"Not enough memory to decompress chunk."); - } - png_memcpy(text + prefix_size, png_ptr->zbuf, - text_size - prefix_size); - png_memcpy(text, chunkdata, prefix_size); - *(text + text_size) = 0x00; - } - else - { - png_charp tmp; - - tmp = text; - text = (png_charp)png_malloc_warn(png_ptr, - (png_uint_32)(text_size + - png_ptr->zbuf_size - png_ptr->zstream.avail_out + 1)); - if (text == NULL) - { - png_free(png_ptr, tmp); - png_free(png_ptr, chunkdata); - png_error(png_ptr,"Not enough memory to decompress chunk.."); - } - png_memcpy(text, tmp, text_size); - png_free(png_ptr, tmp); - png_memcpy(text + text_size, png_ptr->zbuf, - (png_ptr->zbuf_size - png_ptr->zstream.avail_out)); - text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out; - *(text + text_size) = 0x00; - } - if (ret == Z_STREAM_END) - break; - else - { - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - } - } - } - if (ret != Z_STREAM_END) - { -#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) - char umsg[50]; - - if (ret == Z_BUF_ERROR) - sprintf(umsg,"Buffer error in compressed datastream in %s chunk", - png_ptr->chunk_name); - else if (ret == Z_DATA_ERROR) - sprintf(umsg,"Data error in compressed datastream in %s chunk", - png_ptr->chunk_name); - else - sprintf(umsg,"Incomplete compressed datastream in %s chunk", - png_ptr->chunk_name); - png_warning(png_ptr, umsg); -#else - png_warning(png_ptr, - "Incomplete compressed datastream in chunk other than IDAT"); -#endif - text_size=prefix_size; - if (text == NULL) - { - text = (png_charp)png_malloc_warn(png_ptr, text_size+1); - if (text == NULL) - { - png_free(png_ptr, chunkdata); - png_error(png_ptr,"Not enough memory for text."); - } - png_memcpy(text, chunkdata, prefix_size); - } - *(text + text_size) = 0x00; - } - - inflateReset(&png_ptr->zstream); - png_ptr->zstream.avail_in = 0; - - png_free(png_ptr, chunkdata); - chunkdata = text; - *newlength=text_size; - } - else /* if (comp_type != PNG_COMPRESSION_TYPE_BASE) */ - { -#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) - char umsg[50]; - - sprintf(umsg, "Unknown zTXt compression type %d", comp_type); - png_warning(png_ptr, umsg); -#else - png_warning(png_ptr, "Unknown zTXt compression type"); -#endif - - *(chunkdata + prefix_size) = 0x00; - *newlength=prefix_size; - } - - return chunkdata; -} -#endif - -/* read and check the IDHR chunk */ -void /* PRIVATE */ -png_handle_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_byte buf[13]; - png_uint_32 width, height; - int bit_depth, color_type, compression_type, filter_type; - int interlace_type; - - png_debug(1, "in png_handle_IHDR\n"); - - if (png_ptr->mode & PNG_HAVE_IHDR) - png_error(png_ptr, "Out of place IHDR"); - - /* check the length */ - if (length != 13) - png_error(png_ptr, "Invalid IHDR chunk"); - - png_ptr->mode |= PNG_HAVE_IHDR; - - png_crc_read(png_ptr, buf, 13); - png_crc_finish(png_ptr, 0); - - width = png_get_uint_32(buf); - height = png_get_uint_32(buf + 4); - bit_depth = buf[8]; - color_type = buf[9]; - compression_type = buf[10]; - filter_type = buf[11]; - interlace_type = buf[12]; - - - /* set internal variables */ - png_ptr->width = width; - png_ptr->height = height; - png_ptr->bit_depth = (png_byte)bit_depth; - png_ptr->interlaced = (png_byte)interlace_type; - png_ptr->color_type = (png_byte)color_type; -#if defined(PNG_MNG_FEATURES_SUPPORTED) - png_ptr->filter_type = (png_byte)filter_type; -#endif - - /* find number of channels */ - switch (png_ptr->color_type) - { - case PNG_COLOR_TYPE_GRAY: - case PNG_COLOR_TYPE_PALETTE: - png_ptr->channels = 1; - break; - case PNG_COLOR_TYPE_RGB: - png_ptr->channels = 3; - break; - case PNG_COLOR_TYPE_GRAY_ALPHA: - png_ptr->channels = 2; - break; - case PNG_COLOR_TYPE_RGB_ALPHA: - png_ptr->channels = 4; - break; - } - - /* set up other useful info */ - png_ptr->pixel_depth = (png_byte)(png_ptr->bit_depth * - png_ptr->channels); - png_ptr->rowbytes = ((png_ptr->width * - (png_uint_32)png_ptr->pixel_depth + 7) >> 3); - png_debug1(3,"bit_depth = %d\n", png_ptr->bit_depth); - png_debug1(3,"channels = %d\n", png_ptr->channels); - png_debug1(3,"rowbytes = %lu\n", png_ptr->rowbytes); - png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, - color_type, interlace_type, compression_type, filter_type); -} - -/* read and check the palette */ -void /* PRIVATE */ -png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_color palette[PNG_MAX_PALETTE_LENGTH]; - int num, i; -#ifndef PNG_NO_POINTER_INDEXING - png_colorp pal_ptr; -#endif - - png_debug(1, "in png_handle_PLTE\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before PLTE"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid PLTE after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (png_ptr->mode & PNG_HAVE_PLTE) - png_error(png_ptr, "Duplicate PLTE chunk"); - - png_ptr->mode |= PNG_HAVE_PLTE; - - if (!(png_ptr->color_type&PNG_COLOR_MASK_COLOR)) - { - png_warning(png_ptr, - "Ignoring PLTE chunk in grayscale PNG"); - png_crc_finish(png_ptr, length); - return; - } -#if !defined(PNG_READ_OPT_PLTE_SUPPORTED) - if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE) - { - png_crc_finish(png_ptr, length); - return; - } -#endif - - if (length > 3*PNG_MAX_PALETTE_LENGTH || length % 3) - { - if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE) - { - png_warning(png_ptr, "Invalid palette chunk"); - png_crc_finish(png_ptr, length); - return; - } - else - { - png_error(png_ptr, "Invalid palette chunk"); - } - } - - num = (int)length / 3; - -#ifndef PNG_NO_POINTER_INDEXING - for (i = 0, pal_ptr = palette; i < num; i++, pal_ptr++) - { - png_byte buf[3]; - - png_crc_read(png_ptr, buf, 3); - pal_ptr->red = buf[0]; - pal_ptr->green = buf[1]; - pal_ptr->blue = buf[2]; - } -#else - for (i = 0; i < num; i++) - { - png_byte buf[3]; - - png_crc_read(png_ptr, buf, 3); - /* don't depend upon png_color being any order */ - palette[i].red = buf[0]; - palette[i].green = buf[1]; - palette[i].blue = buf[2]; - } -#endif - - /* If we actually NEED the PLTE chunk (ie for a paletted image), we do - whatever the normal CRC configuration tells us. However, if we - have an RGB image, the PLTE can be considered ancillary, so - we will act as though it is. */ -#if !defined(PNG_READ_OPT_PLTE_SUPPORTED) - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) -#endif - { - png_crc_finish(png_ptr, 0); - } -#if !defined(PNG_READ_OPT_PLTE_SUPPORTED) - else if (png_crc_error(png_ptr)) /* Only if we have a CRC error */ - { - /* If we don't want to use the data from an ancillary chunk, - we have two options: an error abort, or a warning and we - ignore the data in this chunk (which should be OK, since - it's considered ancillary for a RGB or RGBA image). */ - if (!(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_USE)) - { - if (png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN) - { - png_chunk_error(png_ptr, "CRC error"); - } - else - { - png_chunk_warning(png_ptr, "CRC error"); - return; - } - } - /* Otherwise, we (optionally) emit a warning and use the chunk. */ - else if (!(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN)) - { - png_chunk_warning(png_ptr, "CRC error"); - } - } -#endif - - png_set_PLTE(png_ptr, info_ptr, palette, num); - -#if defined(PNG_READ_tRNS_SUPPORTED) - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS)) - { - if (png_ptr->num_trans > (png_uint_16)num) - { - png_warning(png_ptr, "Truncating incorrect tRNS chunk length"); - png_ptr->num_trans = (png_uint_16)num; - } - if (info_ptr->num_trans > (png_uint_16)num) - { - png_warning(png_ptr, "Truncating incorrect info tRNS chunk length"); - info_ptr->num_trans = (png_uint_16)num; - } - } - } -#endif - -} - -void /* PRIVATE */ -png_handle_IEND(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_debug(1, "in png_handle_IEND\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR) || !(png_ptr->mode & PNG_HAVE_IDAT)) - { - png_error(png_ptr, "No image in file"); - - info_ptr = info_ptr; /* quiet compiler warnings about unused info_ptr */ - } - - png_ptr->mode |= (PNG_AFTER_IDAT | PNG_HAVE_IEND); - - if (length != 0) - { - png_warning(png_ptr, "Incorrect IEND chunk length"); - } - png_crc_finish(png_ptr, length); -} - -#if defined(PNG_READ_gAMA_SUPPORTED) -void /* PRIVATE */ -png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_fixed_point igamma; -#ifdef PNG_FLOATING_POINT_SUPPORTED - float file_gamma; -#endif - png_byte buf[4]; - - png_debug(1, "in png_handle_gAMA\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before gAMA"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid gAMA after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (png_ptr->mode & PNG_HAVE_PLTE) - /* Should be an error, but we can cope with it */ - png_warning(png_ptr, "Out of place gAMA chunk"); - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA) -#if defined(PNG_READ_sRGB_SUPPORTED) - && !(info_ptr->valid & PNG_INFO_sRGB) -#endif - ) - { - png_warning(png_ptr, "Duplicate gAMA chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (length != 4) - { - png_warning(png_ptr, "Incorrect gAMA chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 4); - if (png_crc_finish(png_ptr, 0)) - return; - - igamma = (png_fixed_point)png_get_uint_32(buf); - /* check for zero gamma */ - if (igamma == 0) - { - png_warning(png_ptr, - "Ignoring gAMA chunk with gamma=0"); - return; - } - -#if defined(PNG_READ_sRGB_SUPPORTED) - if (info_ptr->valid & PNG_INFO_sRGB) - if(igamma < 45000L || igamma > 46000L) - { - png_warning(png_ptr, - "Ignoring incorrect gAMA value when sRGB is also present"); -#ifndef PNG_NO_CONSOLE_IO - fprintf(stderr, "gamma = (%d/100000)\n", (int)igamma); -#endif - return; - } -#endif /* PNG_READ_sRGB_SUPPORTED */ - -#ifdef PNG_FLOATING_POINT_SUPPORTED - file_gamma = (float)igamma / (float)100000.0; -# ifdef PNG_READ_GAMMA_SUPPORTED - png_ptr->gamma = file_gamma; -# endif - png_set_gAMA(png_ptr, info_ptr, file_gamma); -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED - png_set_gAMA_fixed(png_ptr, info_ptr, igamma); -#endif -} -#endif - -#if defined(PNG_READ_sBIT_SUPPORTED) -void /* PRIVATE */ -png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_size_t truelen; - png_byte buf[4]; - - png_debug(1, "in png_handle_sBIT\n"); - - buf[0] = buf[1] = buf[2] = buf[3] = 0; - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before sBIT"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid sBIT after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (png_ptr->mode & PNG_HAVE_PLTE) - { - /* Should be an error, but we can cope with it */ - png_warning(png_ptr, "Out of place sBIT chunk"); - } - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT)) - { - png_warning(png_ptr, "Duplicate sBIT chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - truelen = 3; - else - truelen = (png_size_t)png_ptr->channels; - - if (length != truelen) - { - png_warning(png_ptr, "Incorrect sBIT chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, truelen); - if (png_crc_finish(png_ptr, 0)) - return; - - if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) - { - png_ptr->sig_bit.red = buf[0]; - png_ptr->sig_bit.green = buf[1]; - png_ptr->sig_bit.blue = buf[2]; - png_ptr->sig_bit.alpha = buf[3]; - } - else - { - png_ptr->sig_bit.gray = buf[0]; - png_ptr->sig_bit.red = buf[0]; - png_ptr->sig_bit.green = buf[0]; - png_ptr->sig_bit.blue = buf[0]; - png_ptr->sig_bit.alpha = buf[1]; - } - png_set_sBIT(png_ptr, info_ptr, &(png_ptr->sig_bit)); -} -#endif - -#if defined(PNG_READ_cHRM_SUPPORTED) -void /* PRIVATE */ -png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_byte buf[4]; -#ifdef PNG_FLOATING_POINT_SUPPORTED - float white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y; -#endif - png_fixed_point int_x_white, int_y_white, int_x_red, int_y_red, int_x_green, - int_y_green, int_x_blue, int_y_blue; - - png_uint_32 uint_x, uint_y; - - png_debug(1, "in png_handle_cHRM\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before cHRM"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid cHRM after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (png_ptr->mode & PNG_HAVE_PLTE) - /* Should be an error, but we can cope with it */ - png_warning(png_ptr, "Missing PLTE before cHRM"); - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM) -#if defined(PNG_READ_sRGB_SUPPORTED) - && !(info_ptr->valid & PNG_INFO_sRGB) -#endif - ) - { - png_warning(png_ptr, "Duplicate cHRM chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (length != 32) - { - png_warning(png_ptr, "Incorrect cHRM chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 4); - uint_x = png_get_uint_32(buf); - - png_crc_read(png_ptr, buf, 4); - uint_y = png_get_uint_32(buf); - - if (uint_x > 80000L || uint_y > 80000L || - uint_x + uint_y > 100000L) - { - png_warning(png_ptr, "Invalid cHRM white point"); - png_crc_finish(png_ptr, 24); - return; - } - int_x_white = (png_fixed_point)uint_x; - int_y_white = (png_fixed_point)uint_y; - - png_crc_read(png_ptr, buf, 4); - uint_x = png_get_uint_32(buf); - - png_crc_read(png_ptr, buf, 4); - uint_y = png_get_uint_32(buf); - - if (uint_x > 80000L || uint_y > 80000L || - uint_x + uint_y > 100000L) - { - png_warning(png_ptr, "Invalid cHRM red point"); - png_crc_finish(png_ptr, 16); - return; - } - int_x_red = (png_fixed_point)uint_x; - int_y_red = (png_fixed_point)uint_y; - - png_crc_read(png_ptr, buf, 4); - uint_x = png_get_uint_32(buf); - - png_crc_read(png_ptr, buf, 4); - uint_y = png_get_uint_32(buf); - - if (uint_x > 80000L || uint_y > 80000L || - uint_x + uint_y > 100000L) - { - png_warning(png_ptr, "Invalid cHRM green point"); - png_crc_finish(png_ptr, 8); - return; - } - int_x_green = (png_fixed_point)uint_x; - int_y_green = (png_fixed_point)uint_y; - - png_crc_read(png_ptr, buf, 4); - uint_x = png_get_uint_32(buf); - - png_crc_read(png_ptr, buf, 4); - uint_y = png_get_uint_32(buf); - - if (uint_x > 80000L || uint_y > 80000L || - uint_x + uint_y > 100000L) - { - png_warning(png_ptr, "Invalid cHRM blue point"); - png_crc_finish(png_ptr, 0); - return; - } - int_x_blue = (png_fixed_point)uint_x; - int_y_blue = (png_fixed_point)uint_y; - -#ifdef PNG_FLOATING_POINT_SUPPORTED - white_x = (float)int_x_white / (float)100000.0; - white_y = (float)int_y_white / (float)100000.0; - red_x = (float)int_x_red / (float)100000.0; - red_y = (float)int_y_red / (float)100000.0; - green_x = (float)int_x_green / (float)100000.0; - green_y = (float)int_y_green / (float)100000.0; - blue_x = (float)int_x_blue / (float)100000.0; - blue_y = (float)int_y_blue / (float)100000.0; -#endif - -#if defined(PNG_READ_sRGB_SUPPORTED) - if (info_ptr->valid & PNG_INFO_sRGB) - { - if (abs(int_x_white - 31270L) > 1000 || - abs(int_y_white - 32900L) > 1000 || - abs(int_x_red - 64000L) > 1000 || - abs(int_y_red - 33000L) > 1000 || - abs(int_x_green - 30000L) > 1000 || - abs(int_y_green - 60000L) > 1000 || - abs(int_x_blue - 15000L) > 1000 || - abs(int_y_blue - 6000L) > 1000) - { - - png_warning(png_ptr, - "Ignoring incorrect cHRM value when sRGB is also present"); -#ifndef PNG_NO_CONSOLE_IO -#ifdef PNG_FLOATING_POINT_SUPPORTED - fprintf(stderr,"wx=%f, wy=%f, rx=%f, ry=%f\n", - white_x, white_y, red_x, red_y); - fprintf(stderr,"gx=%f, gy=%f, bx=%f, by=%f\n", - green_x, green_y, blue_x, blue_y); -#else - fprintf(stderr,"wx=%ld, wy=%ld, rx=%ld, ry=%ld\n", - int_x_white, int_y_white, int_x_red, int_y_red); - fprintf(stderr,"gx=%ld, gy=%ld, bx=%ld, by=%ld\n", - int_x_green, int_y_green, int_x_blue, int_y_blue); -#endif -#endif /* PNG_NO_CONSOLE_IO */ - } - png_crc_finish(png_ptr, 0); - return; - } -#endif /* PNG_READ_sRGB_SUPPORTED */ - -#ifdef PNG_FLOATING_POINT_SUPPORTED - png_set_cHRM(png_ptr, info_ptr, - white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y); -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED - png_set_cHRM_fixed(png_ptr, info_ptr, - int_x_white, int_y_white, int_x_red, int_y_red, int_x_green, - int_y_green, int_x_blue, int_y_blue); -#endif - if (png_crc_finish(png_ptr, 0)) - return; -} -#endif - -#if defined(PNG_READ_sRGB_SUPPORTED) -void /* PRIVATE */ -png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - int intent; - png_byte buf[1]; - - png_debug(1, "in png_handle_sRGB\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before sRGB"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid sRGB after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (png_ptr->mode & PNG_HAVE_PLTE) - /* Should be an error, but we can cope with it */ - png_warning(png_ptr, "Out of place sRGB chunk"); - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB)) - { - png_warning(png_ptr, "Duplicate sRGB chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (length != 1) - { - png_warning(png_ptr, "Incorrect sRGB chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 1); - if (png_crc_finish(png_ptr, 0)) - return; - - intent = buf[0]; - /* check for bad intent */ - if (intent >= PNG_sRGB_INTENT_LAST) - { - png_warning(png_ptr, "Unknown sRGB intent"); - return; - } - -#if defined(PNG_READ_gAMA_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED) - if ((info_ptr->valid & PNG_INFO_gAMA)) - { - int igamma; -#ifdef PNG_FIXED_POINT_SUPPORTED - igamma=(int)info_ptr->int_gamma; -#else -# ifdef PNG_FLOATING_POINT_SUPPORTED - igamma=(int)(info_ptr->gamma * 100000.); -# endif -#endif - if(igamma < 45000L || igamma > 46000L) - { - png_warning(png_ptr, - "Ignoring incorrect gAMA value when sRGB is also present"); -#ifndef PNG_NO_CONSOLE_IO -# ifdef PNG_FIXED_POINT_SUPPORTED - fprintf(stderr,"incorrect gamma=(%d/100000)\n",(int)png_ptr->int_gamma); -# else -# ifdef PNG_FLOATING_POINT_SUPPORTED - fprintf(stderr,"incorrect gamma=%f\n",png_ptr->gamma); -# endif -# endif -#endif - } - } -#endif /* PNG_READ_gAMA_SUPPORTED */ - -#ifdef PNG_READ_cHRM_SUPPORTED -#ifdef PNG_FIXED_POINT_SUPPORTED - if (info_ptr->valid & PNG_INFO_cHRM) - if (abs(info_ptr->int_x_white - 31270L) > 1000 || - abs(info_ptr->int_y_white - 32900L) > 1000 || - abs(info_ptr->int_x_red - 64000L) > 1000 || - abs(info_ptr->int_y_red - 33000L) > 1000 || - abs(info_ptr->int_x_green - 30000L) > 1000 || - abs(info_ptr->int_y_green - 60000L) > 1000 || - abs(info_ptr->int_x_blue - 15000L) > 1000 || - abs(info_ptr->int_y_blue - 6000L) > 1000) - { - png_warning(png_ptr, - "Ignoring incorrect cHRM value when sRGB is also present"); - } -#endif /* PNG_FIXED_POINT_SUPPORTED */ -#endif /* PNG_READ_cHRM_SUPPORTED */ - - png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, intent); -} -#endif /* PNG_READ_sRGB_SUPPORTED */ - -#if defined(PNG_READ_iCCP_SUPPORTED) -void /* PRIVATE */ -png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -/* Note: this does not properly handle chunks that are > 64K under DOS */ -{ - png_charp chunkdata; - png_byte compression_type; - png_bytep pC; - png_charp profile; - png_uint_32 skip = 0; - png_uint_32 profile_size = 0; - png_uint_32 profile_length = 0; - png_size_t slength, prefix_length, data_length; - - png_debug(1, "in png_handle_iCCP\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before iCCP"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid iCCP after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (png_ptr->mode & PNG_HAVE_PLTE) - /* Should be an error, but we can cope with it */ - png_warning(png_ptr, "Out of place iCCP chunk"); - - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP)) - { - png_warning(png_ptr, "Duplicate iCCP chunk"); - png_crc_finish(png_ptr, length); - return; - } - -#ifdef PNG_MAX_MALLOC_64K - if (length > (png_uint_32)65535L) - { - png_warning(png_ptr, "iCCP chunk too large to fit in memory"); - skip = length - (png_uint_32)65535L; - length = (png_uint_32)65535L; - } -#endif - - chunkdata = (png_charp)png_malloc(png_ptr, length + 1); - slength = (png_size_t)length; - png_crc_read(png_ptr, (png_bytep)chunkdata, slength); - - if (png_crc_finish(png_ptr, skip)) - { - png_free(png_ptr, chunkdata); - return; - } - - chunkdata[slength] = 0x00; - - for (profile = chunkdata; *profile; profile++) - /* empty loop to find end of name */ ; - - ++profile; - - /* there should be at least one zero (the compression type byte) - following the separator, and we should be on it */ - if ( profile >= chunkdata + slength) - { - png_free(png_ptr, chunkdata); - png_warning(png_ptr, "Malformed iCCP chunk"); - return; - } - - /* compression_type should always be zero */ - compression_type = *profile++; - if (compression_type) - { - png_warning(png_ptr, "Ignoring nonzero compression type in iCCP chunk"); - compression_type=0x00; /* Reset it to zero (libpng-1.0.6 through 1.0.8 - wrote nonzero) */ - } - - prefix_length = profile - chunkdata; - chunkdata = png_decompress_chunk(png_ptr, compression_type, chunkdata, - slength, prefix_length, &data_length); - - profile_length = data_length - prefix_length; - - if ( prefix_length > data_length || profile_length < 4) - { - png_free(png_ptr, chunkdata); - png_warning(png_ptr, "Profile size field missing from iCCP chunk"); - return; - } - - /* Check the profile_size recorded in the first 32 bits of the ICC profile */ - pC = (png_bytep)(chunkdata+prefix_length); - profile_size = ((*(pC ))<<24) | - ((*(pC+1))<<16) | - ((*(pC+2))<< 8) | - ((*(pC+3)) ); - - if(profile_size < profile_length) - profile_length = profile_size; - - if(profile_size > profile_length) - { - png_free(png_ptr, chunkdata); - png_warning(png_ptr, "Ignoring truncated iCCP profile.\n"); - return; - } - - png_set_iCCP(png_ptr, info_ptr, chunkdata, compression_type, - chunkdata + prefix_length, profile_length); - png_free(png_ptr, chunkdata); -} -#endif /* PNG_READ_iCCP_SUPPORTED */ - -#if defined(PNG_READ_sPLT_SUPPORTED) -void /* PRIVATE */ -png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -/* Note: this does not properly handle chunks that are > 64K under DOS */ -{ - png_bytep chunkdata; - png_bytep entry_start; - png_sPLT_t new_palette; -#ifdef PNG_NO_POINTER_INDEXING - png_sPLT_entryp pp; -#endif - int data_length, entry_size, i; - png_uint_32 skip = 0; - png_size_t slength; - - png_debug(1, "in png_handle_sPLT\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before sPLT"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid sPLT after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - -#ifdef PNG_MAX_MALLOC_64K - if (length > (png_uint_32)65535L) - { - png_warning(png_ptr, "sPLT chunk too large to fit in memory"); - skip = length - (png_uint_32)65535L; - length = (png_uint_32)65535L; - } -#endif - - chunkdata = (png_bytep)png_malloc(png_ptr, length + 1); - slength = (png_size_t)length; - png_crc_read(png_ptr, (png_bytep)chunkdata, slength); - - if (png_crc_finish(png_ptr, skip)) - { - png_free(png_ptr, chunkdata); - return; - } - - chunkdata[slength] = 0x00; - - for (entry_start = chunkdata; *entry_start; entry_start++) - /* empty loop to find end of name */ ; - ++entry_start; - - /* a sample depth should follow the separator, and we should be on it */ - if (entry_start > chunkdata + slength) - { - png_free(png_ptr, chunkdata); - png_warning(png_ptr, "malformed sPLT chunk"); - return; - } - - new_palette.depth = *entry_start++; - entry_size = (new_palette.depth == 8 ? 6 : 10); - data_length = (slength - (entry_start - chunkdata)); - - /* integrity-check the data length */ - if (data_length % entry_size) - { - png_free(png_ptr, chunkdata); - png_warning(png_ptr, "sPLT chunk has bad length"); - return; - } - - new_palette.nentries = data_length / entry_size; - new_palette.entries = (png_sPLT_entryp)png_malloc( - png_ptr, new_palette.nentries * sizeof(png_sPLT_entry)); - -#ifndef PNG_NO_POINTER_INDEXING - for (i = 0; i < new_palette.nentries; i++) - { - png_sPLT_entryp pp = new_palette.entries + i; - - if (new_palette.depth == 8) - { - pp->red = *entry_start++; - pp->green = *entry_start++; - pp->blue = *entry_start++; - pp->alpha = *entry_start++; - } - else - { - pp->red = png_get_uint_16(entry_start); entry_start += 2; - pp->green = png_get_uint_16(entry_start); entry_start += 2; - pp->blue = png_get_uint_16(entry_start); entry_start += 2; - pp->alpha = png_get_uint_16(entry_start); entry_start += 2; - } - pp->frequency = png_get_uint_16(entry_start); entry_start += 2; - } -#else - pp = new_palette.entries; - for (i = 0; i < new_palette.nentries; i++) - { - - if (new_palette.depth == 8) - { - pp[i].red = *entry_start++; - pp[i].green = *entry_start++; - pp[i].blue = *entry_start++; - pp[i].alpha = *entry_start++; - } - else - { - pp[i].red = png_get_uint_16(entry_start); entry_start += 2; - pp[i].green = png_get_uint_16(entry_start); entry_start += 2; - pp[i].blue = png_get_uint_16(entry_start); entry_start += 2; - pp[i].alpha = png_get_uint_16(entry_start); entry_start += 2; - } - pp->frequency = png_get_uint_16(entry_start); entry_start += 2; - } -#endif - - /* discard all chunk data except the name and stash that */ - new_palette.name = (png_charp)chunkdata; - - png_set_sPLT(png_ptr, info_ptr, &new_palette, 1); - - png_free(png_ptr, chunkdata); - png_free(png_ptr, new_palette.entries); -} -#endif /* PNG_READ_sPLT_SUPPORTED */ - -#if defined(PNG_READ_tRNS_SUPPORTED) -void /* PRIVATE */ -png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_byte readbuf[PNG_MAX_PALETTE_LENGTH]; - - png_debug(1, "in png_handle_tRNS\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before tRNS"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid tRNS after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS)) - { - png_warning(png_ptr, "Duplicate tRNS chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - if (!(png_ptr->mode & PNG_HAVE_PLTE)) - { - /* Should be an error, but we can cope with it */ - png_warning(png_ptr, "Missing PLTE before tRNS"); - } - else if (length > (png_uint_32)png_ptr->num_palette) - { - png_warning(png_ptr, "Incorrect tRNS chunk length"); - png_crc_finish(png_ptr, length); - return; - } - if (length == 0) - { - png_warning(png_ptr, "Zero length tRNS chunk"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, readbuf, (png_size_t)length); - png_ptr->num_trans = (png_uint_16)length; - } - else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) - { - png_byte buf[6]; - - if (length != 6) - { - png_warning(png_ptr, "Incorrect tRNS chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, (png_size_t)length); - png_ptr->num_trans = 1; - png_ptr->trans_values.red = png_get_uint_16(buf); - png_ptr->trans_values.green = png_get_uint_16(buf + 2); - png_ptr->trans_values.blue = png_get_uint_16(buf + 4); - } - else if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY) - { - png_byte buf[6]; - - if (length != 2) - { - png_warning(png_ptr, "Incorrect tRNS chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 2); - png_ptr->num_trans = 1; - png_ptr->trans_values.gray = png_get_uint_16(buf); - } - else - { - png_warning(png_ptr, "tRNS chunk not allowed with alpha channel"); - png_crc_finish(png_ptr, length); - return; - } - - if (png_crc_finish(png_ptr, 0)) - return; - - png_set_tRNS(png_ptr, info_ptr, readbuf, png_ptr->num_trans, - &(png_ptr->trans_values)); -} -#endif - -#if defined(PNG_READ_bKGD_SUPPORTED) -void /* PRIVATE */ -png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_size_t truelen; - png_byte buf[6]; - - png_debug(1, "in png_handle_bKGD\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before bKGD"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid bKGD after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && - !(png_ptr->mode & PNG_HAVE_PLTE)) - { - png_warning(png_ptr, "Missing PLTE before bKGD"); - png_crc_finish(png_ptr, length); - return; - } - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD)) - { - png_warning(png_ptr, "Duplicate bKGD chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - truelen = 1; - else if (png_ptr->color_type & PNG_COLOR_MASK_COLOR) - truelen = 6; - else - truelen = 2; - - if (length != truelen) - { - png_warning(png_ptr, "Incorrect bKGD chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, truelen); - if (png_crc_finish(png_ptr, 0)) - return; - - /* We convert the index value into RGB components so that we can allow - * arbitrary RGB values for background when we have transparency, and - * so it is easy to determine the RGB values of the background color - * from the info_ptr struct. */ - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - png_ptr->background.index = buf[0]; - if(info_ptr->num_palette) - { - if(buf[0] > info_ptr->num_palette) - { - png_warning(png_ptr, "Incorrect bKGD chunk index value"); - return; - } - png_ptr->background.red = - (png_uint_16)png_ptr->palette[buf[0]].red; - png_ptr->background.green = - (png_uint_16)png_ptr->palette[buf[0]].green; - png_ptr->background.blue = - (png_uint_16)png_ptr->palette[buf[0]].blue; - } - } - else if (!(png_ptr->color_type & PNG_COLOR_MASK_COLOR)) /* GRAY */ - { - png_ptr->background.red = - png_ptr->background.green = - png_ptr->background.blue = - png_ptr->background.gray = png_get_uint_16(buf); - } - else - { - png_ptr->background.red = png_get_uint_16(buf); - png_ptr->background.green = png_get_uint_16(buf + 2); - png_ptr->background.blue = png_get_uint_16(buf + 4); - } - - png_set_bKGD(png_ptr, info_ptr, &(png_ptr->background)); -} -#endif - -#if defined(PNG_READ_hIST_SUPPORTED) -void /* PRIVATE */ -png_handle_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - int num, i; - png_uint_16 readbuf[PNG_MAX_PALETTE_LENGTH]; - - png_debug(1, "in png_handle_hIST\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before hIST"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid hIST after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (!(png_ptr->mode & PNG_HAVE_PLTE)) - { - png_warning(png_ptr, "Missing PLTE before hIST"); - png_crc_finish(png_ptr, length); - return; - } - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST)) - { - png_warning(png_ptr, "Duplicate hIST chunk"); - png_crc_finish(png_ptr, length); - return; - } - - num = (int)length / 2 ; - if (num != png_ptr->num_palette) - { - png_warning(png_ptr, "Incorrect hIST chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - for (i = 0; i < num; i++) - { - png_byte buf[2]; - - png_crc_read(png_ptr, buf, 2); - readbuf[i] = png_get_uint_16(buf); - } - - if (png_crc_finish(png_ptr, 0)) - return; - - png_set_hIST(png_ptr, info_ptr, readbuf); -} -#endif - -#if defined(PNG_READ_pHYs_SUPPORTED) -void /* PRIVATE */ -png_handle_pHYs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_byte buf[9]; - png_uint_32 res_x, res_y; - int unit_type; - - png_debug(1, "in png_handle_pHYs\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before pHYs"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid pHYs after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)) - { - png_warning(png_ptr, "Duplicate pHYs chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (length != 9) - { - png_warning(png_ptr, "Incorrect pHYs chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 9); - if (png_crc_finish(png_ptr, 0)) - return; - - res_x = png_get_uint_32(buf); - res_y = png_get_uint_32(buf + 4); - unit_type = buf[8]; - png_set_pHYs(png_ptr, info_ptr, res_x, res_y, unit_type); -} -#endif - -#if defined(PNG_READ_oFFs_SUPPORTED) -void /* PRIVATE */ -png_handle_oFFs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_byte buf[9]; - png_int_32 offset_x, offset_y; - int unit_type; - - png_debug(1, "in png_handle_oFFs\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before oFFs"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid oFFs after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)) - { - png_warning(png_ptr, "Duplicate oFFs chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (length != 9) - { - png_warning(png_ptr, "Incorrect oFFs chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 9); - if (png_crc_finish(png_ptr, 0)) - return; - - offset_x = png_get_int_32(buf); - offset_y = png_get_int_32(buf + 4); - unit_type = buf[8]; - png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y, unit_type); -} -#endif - -#if defined(PNG_READ_pCAL_SUPPORTED) -/* read the pCAL chunk (described in the PNG Extensions document) */ -void /* PRIVATE */ -png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_charp purpose; - png_int_32 X0, X1; - png_byte type, nparams; - png_charp buf, units, endptr; - png_charpp params; - png_size_t slength; - int i; - - png_debug(1, "in png_handle_pCAL\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before pCAL"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid pCAL after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL)) - { - png_warning(png_ptr, "Duplicate pCAL chunk"); - png_crc_finish(png_ptr, length); - return; - } - - png_debug1(2, "Allocating and reading pCAL chunk data (%lu bytes)\n", - length + 1); - purpose = (png_charp)png_malloc_warn(png_ptr, length + 1); - if (purpose == NULL) - { - png_warning(png_ptr, "No memory for pCAL purpose."); - return; - } - slength = (png_size_t)length; - png_crc_read(png_ptr, (png_bytep)purpose, slength); - - if (png_crc_finish(png_ptr, 0)) - { - png_free(png_ptr, purpose); - return; - } - - purpose[slength] = 0x00; /* null terminate the last string */ - - png_debug(3, "Finding end of pCAL purpose string\n"); - for (buf = purpose; *buf; buf++) - /* empty loop */ ; - - endptr = purpose + slength; - - /* We need to have at least 12 bytes after the purpose string - in order to get the parameter information. */ - if (endptr <= buf + 12) - { - png_warning(png_ptr, "Invalid pCAL data"); - png_free(png_ptr, purpose); - return; - } - - png_debug(3, "Reading pCAL X0, X1, type, nparams, and units\n"); - X0 = png_get_int_32((png_bytep)buf+1); - X1 = png_get_int_32((png_bytep)buf+5); - type = buf[9]; - nparams = buf[10]; - units = buf + 11; - - png_debug(3, "Checking pCAL equation type and number of parameters\n"); - /* Check that we have the right number of parameters for known - equation types. */ - if ((type == PNG_EQUATION_LINEAR && nparams != 2) || - (type == PNG_EQUATION_BASE_E && nparams != 3) || - (type == PNG_EQUATION_ARBITRARY && nparams != 3) || - (type == PNG_EQUATION_HYPERBOLIC && nparams != 4)) - { - png_warning(png_ptr, "Invalid pCAL parameters for equation type"); - png_free(png_ptr, purpose); - return; - } - else if (type >= PNG_EQUATION_LAST) - { - png_warning(png_ptr, "Unrecognized equation type for pCAL chunk"); - } - - for (buf = units; *buf; buf++) - /* Empty loop to move past the units string. */ ; - - png_debug(3, "Allocating pCAL parameters array\n"); - params = (png_charpp)png_malloc_warn(png_ptr, (png_uint_32)(nparams - *sizeof(png_charp))) ; - if (params == NULL) - { - png_free(png_ptr, purpose); - png_warning(png_ptr, "No memory for pCAL params."); - return; - } - - /* Get pointers to the start of each parameter string. */ - for (i = 0; i < (int)nparams; i++) - { - buf++; /* Skip the null string terminator from previous parameter. */ - - png_debug1(3, "Reading pCAL parameter %d\n", i); - for (params[i] = buf; *buf != 0x00 && buf <= endptr; buf++) - /* Empty loop to move past each parameter string */ ; - - /* Make sure we haven't run out of data yet */ - if (buf > endptr) - { - png_warning(png_ptr, "Invalid pCAL data"); - png_free(png_ptr, purpose); - png_free(png_ptr, params); - return; - } - } - - png_set_pCAL(png_ptr, info_ptr, purpose, X0, X1, type, nparams, - units, params); - - png_free(png_ptr, purpose); - png_free(png_ptr, params); -} -#endif - -#if defined(PNG_READ_sCAL_SUPPORTED) -/* read the sCAL chunk */ -void /* PRIVATE */ -png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_charp buffer, ep; -#ifdef PNG_FLOATING_POINT_SUPPORTED - double width, height; - png_charp vp; -#else -#ifdef PNG_FIXED_POINT_SUPPORTED - png_charp swidth, sheight; -#endif -#endif - png_size_t slength; - - png_debug(1, "in png_handle_sCAL\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before sCAL"); - else if (png_ptr->mode & PNG_HAVE_IDAT) - { - png_warning(png_ptr, "Invalid sCAL after IDAT"); - png_crc_finish(png_ptr, length); - return; - } - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sCAL)) - { - png_warning(png_ptr, "Duplicate sCAL chunk"); - png_crc_finish(png_ptr, length); - return; - } - - png_debug1(2, "Allocating and reading sCAL chunk data (%lu bytes)\n", - length + 1); - buffer = (png_charp)png_malloc_warn(png_ptr, length + 1); - if (buffer == NULL) - { - png_warning(png_ptr, "Out of memory while processing sCAL chunk"); - return; - } - slength = (png_size_t)length; - png_crc_read(png_ptr, (png_bytep)buffer, slength); - - if (png_crc_finish(png_ptr, 0)) - { - png_free(png_ptr, buffer); - return; - } - - buffer[slength] = 0x00; /* null terminate the last string */ - - ep = buffer + 1; /* skip unit byte */ - -#ifdef PNG_FLOATING_POINT_SUPPORTED - width = strtod(ep, &vp); - if (*vp) - { - png_warning(png_ptr, "malformed width string in sCAL chunk"); - return; - } -#else -#ifdef PNG_FIXED_POINT_SUPPORTED - swidth = (png_charp)png_malloc_warn(png_ptr, png_strlen(ep) + 1); - if (swidth == NULL) - { - png_warning(png_ptr, "Out of memory while processing sCAL chunk width"); - return; - } - png_memcpy(swidth, ep, (png_size_t)png_strlen(ep)); -#endif -#endif - - for (ep = buffer; *ep; ep++) - /* empty loop */ ; - ep++; - -#ifdef PNG_FLOATING_POINT_SUPPORTED - height = strtod(ep, &vp); - if (*vp) - { - png_warning(png_ptr, "malformed height string in sCAL chunk"); - return; - } -#else -#ifdef PNG_FIXED_POINT_SUPPORTED - sheight = (png_charp)png_malloc_warn(png_ptr, png_strlen(ep) + 1); - if (swidth == NULL) - { - png_warning(png_ptr, "Out of memory while processing sCAL chunk height"); - return; - } - png_memcpy(sheight, ep, (png_size_t)png_strlen(ep)); -#endif -#endif - - if (buffer + slength < ep -#ifdef PNG_FLOATING_POINT_SUPPORTED - || width <= 0. || height <= 0. -#endif - ) - { - png_warning(png_ptr, "Invalid sCAL data"); - png_free(png_ptr, buffer); -#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED) - png_free(png_ptr, swidth); - png_free(png_ptr, sheight); -#endif - return; - } - - -#ifdef PNG_FLOATING_POINT_SUPPORTED - png_set_sCAL(png_ptr, info_ptr, buffer[0], width, height); -#else -#ifdef PNG_FIXED_POINT_SUPPORTED - png_set_sCAL_s(png_ptr, info_ptr, buffer[0], swidth, sheight); -#endif -#endif - - png_free(png_ptr, buffer); -#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED) - png_free(png_ptr, swidth); - png_free(png_ptr, sheight); -#endif -} -#endif - -#if defined(PNG_READ_tIME_SUPPORTED) -void /* PRIVATE */ -png_handle_tIME(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_byte buf[7]; - png_time mod_time; - - png_debug(1, "in png_handle_tIME\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Out of place tIME chunk"); - else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME)) - { - png_warning(png_ptr, "Duplicate tIME chunk"); - png_crc_finish(png_ptr, length); - return; - } - - if (png_ptr->mode & PNG_HAVE_IDAT) - png_ptr->mode |= PNG_AFTER_IDAT; - - if (length != 7) - { - png_warning(png_ptr, "Incorrect tIME chunk length"); - png_crc_finish(png_ptr, length); - return; - } - - png_crc_read(png_ptr, buf, 7); - if (png_crc_finish(png_ptr, 0)) - return; - - mod_time.second = buf[6]; - mod_time.minute = buf[5]; - mod_time.hour = buf[4]; - mod_time.day = buf[3]; - mod_time.month = buf[2]; - mod_time.year = png_get_uint_16(buf); - - png_set_tIME(png_ptr, info_ptr, &mod_time); -} -#endif - -#if defined(PNG_READ_tEXt_SUPPORTED) -/* Note: this does not properly handle chunks that are > 64K under DOS */ -void /* PRIVATE */ -png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_textp text_ptr; - png_charp key; - png_charp text; - png_uint_32 skip = 0; - png_size_t slength; - int ret; - - png_debug(1, "in png_handle_tEXt\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before tEXt"); - - if (png_ptr->mode & PNG_HAVE_IDAT) - png_ptr->mode |= PNG_AFTER_IDAT; - -#ifdef PNG_MAX_MALLOC_64K - if (length > (png_uint_32)65535L) - { - png_warning(png_ptr, "tEXt chunk too large to fit in memory"); - skip = length - (png_uint_32)65535L; - length = (png_uint_32)65535L; - } -#endif - - key = (png_charp)png_malloc_warn(png_ptr, length + 1); - if (key == NULL) - { - png_warning(png_ptr, "No memory to process text chunk."); - return; - } - slength = (png_size_t)length; - png_crc_read(png_ptr, (png_bytep)key, slength); - - if (png_crc_finish(png_ptr, skip)) - { - png_free(png_ptr, key); - return; - } - - key[slength] = 0x00; - - for (text = key; *text; text++) - /* empty loop to find end of key */ ; - - if (text != key + slength) - text++; - - text_ptr = (png_textp)png_malloc_warn(png_ptr, (png_uint_32)sizeof(png_text)); - if (text_ptr == NULL) - { - png_warning(png_ptr, "Not enough memory to process text chunk."); - png_free(png_ptr, key); - return; - } - text_ptr->compression = PNG_TEXT_COMPRESSION_NONE; - text_ptr->key = key; -#ifdef PNG_iTXt_SUPPORTED - text_ptr->lang = NULL; - text_ptr->lang_key = NULL; - text_ptr->itxt_length = 0; -#endif - text_ptr->text = text; - text_ptr->text_length = png_strlen(text); - - ret=png_set_text_2(png_ptr, info_ptr, text_ptr, 1); - - png_free(png_ptr, key); - png_free(png_ptr, text_ptr); - if (ret) - png_warning(png_ptr, "Insufficient memory to process text chunk."); -} -#endif - -#if defined(PNG_READ_zTXt_SUPPORTED) -/* note: this does not correctly handle chunks that are > 64K under DOS */ -void /* PRIVATE */ -png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_textp text_ptr; - png_charp chunkdata; - png_charp text; - int comp_type; - int ret; - png_size_t slength, prefix_len, data_len; - - png_debug(1, "in png_handle_zTXt\n"); - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before zTXt"); - - if (png_ptr->mode & PNG_HAVE_IDAT) - png_ptr->mode |= PNG_AFTER_IDAT; - -#ifdef PNG_MAX_MALLOC_64K - /* We will no doubt have problems with chunks even half this size, but - there is no hard and fast rule to tell us where to stop. */ - if (length > (png_uint_32)65535L) - { - png_warning(png_ptr,"zTXt chunk too large to fit in memory"); - png_crc_finish(png_ptr, length); - return; - } -#endif - - chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); - if (chunkdata == NULL) - { - png_warning(png_ptr,"Out of memory processing zTXt chunk."); - return; - } - slength = (png_size_t)length; - png_crc_read(png_ptr, (png_bytep)chunkdata, slength); - if (png_crc_finish(png_ptr, 0)) - { - png_free(png_ptr, chunkdata); - return; - } - - chunkdata[slength] = 0x00; - - for (text = chunkdata; *text; text++) - /* empty loop */ ; - - /* zTXt must have some text after the chunkdataword */ - if (text == chunkdata + slength) - { - comp_type = PNG_TEXT_COMPRESSION_NONE; - png_warning(png_ptr, "Zero length zTXt chunk"); - } - else - { - comp_type = *(++text); - if (comp_type != PNG_TEXT_COMPRESSION_zTXt) - { - png_warning(png_ptr, "Unknown compression type in zTXt chunk"); - comp_type = PNG_TEXT_COMPRESSION_zTXt; - } - text++; /* skip the compression_method byte */ - } - prefix_len = text - chunkdata; - - chunkdata = (png_charp)png_decompress_chunk(png_ptr, comp_type, chunkdata, - (png_size_t)length, prefix_len, &data_len); - - text_ptr = (png_textp)png_malloc_warn(png_ptr, (png_uint_32)sizeof(png_text)); - if (text_ptr == NULL) - { - png_warning(png_ptr,"Not enough memory to process zTXt chunk."); - png_free(png_ptr, chunkdata); - return; - } - text_ptr->compression = comp_type; - text_ptr->key = chunkdata; -#ifdef PNG_iTXt_SUPPORTED - text_ptr->lang = NULL; - text_ptr->lang_key = NULL; - text_ptr->itxt_length = 0; -#endif - text_ptr->text = chunkdata + prefix_len; - text_ptr->text_length = data_len; - - ret=png_set_text_2(png_ptr, info_ptr, text_ptr, 1); - - png_free(png_ptr, text_ptr); - png_free(png_ptr, chunkdata); - if (ret) - png_error(png_ptr, "Insufficient memory to store zTXt chunk."); -} -#endif - -#if defined(PNG_READ_iTXt_SUPPORTED) -/* note: this does not correctly handle chunks that are > 64K under DOS */ -void /* PRIVATE */ -png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_textp text_ptr; - png_charp chunkdata; - png_charp key, lang, text, lang_key; - int comp_flag; - int comp_type = 0; - int ret; - png_size_t slength, prefix_len, data_len; - - png_debug(1, "in png_handle_iTXt\n"); - - if (!(png_ptr->mode & PNG_HAVE_IHDR)) - png_error(png_ptr, "Missing IHDR before iTXt"); - - if (png_ptr->mode & PNG_HAVE_IDAT) - png_ptr->mode |= PNG_AFTER_IDAT; - -#ifdef PNG_MAX_MALLOC_64K - /* We will no doubt have problems with chunks even half this size, but - there is no hard and fast rule to tell us where to stop. */ - if (length > (png_uint_32)65535L) - { - png_warning(png_ptr,"iTXt chunk too large to fit in memory"); - png_crc_finish(png_ptr, length); - return; - } -#endif - - chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1); - if (chunkdata == NULL) - { - png_warning(png_ptr, "No memory to process iTXt chunk."); - return; - } - slength = (png_size_t)length; - png_crc_read(png_ptr, (png_bytep)chunkdata, slength); - if (png_crc_finish(png_ptr, 0)) - { - png_free(png_ptr, chunkdata); - return; - } - - chunkdata[slength] = 0x00; - - for (lang = chunkdata; *lang; lang++) - /* empty loop */ ; - lang++; /* skip NUL separator */ - - /* iTXt must have a language tag (possibly empty), two compression bytes, - translated keyword (possibly empty), and possibly some text after the - keyword */ - - if (lang >= chunkdata + slength) - { - comp_flag = PNG_TEXT_COMPRESSION_NONE; - png_warning(png_ptr, "Zero length iTXt chunk"); - } - else - { - comp_flag = *lang++; - comp_type = *lang++; - } - - for (lang_key = lang; *lang_key; lang_key++) - /* empty loop */ ; - lang_key++; /* skip NUL separator */ - - for (text = lang_key; *text; text++) - /* empty loop */ ; - text++; /* skip NUL separator */ - - prefix_len = text - chunkdata; - - key=chunkdata; - if (comp_flag) - chunkdata = png_decompress_chunk(png_ptr, comp_type, chunkdata, - (size_t)length, prefix_len, &data_len); - else - data_len=png_strlen(chunkdata + prefix_len); - text_ptr = (png_textp)png_malloc_warn(png_ptr, (png_uint_32)sizeof(png_text)); - if (text_ptr == NULL) - { - png_warning(png_ptr,"Not enough memory to process iTXt chunk."); - png_free(png_ptr, chunkdata); - return; - } - text_ptr->compression = (int)comp_flag + 1; - text_ptr->lang_key = chunkdata+(lang_key-key); - text_ptr->lang = chunkdata+(lang-key); - text_ptr->itxt_length = data_len; - text_ptr->text_length = 0; - text_ptr->key = chunkdata; - text_ptr->text = chunkdata + prefix_len; - - ret=png_set_text_2(png_ptr, info_ptr, text_ptr, 1); - - png_free(png_ptr, text_ptr); - png_free(png_ptr, chunkdata); - if (ret) - png_error(png_ptr, "Insufficient memory to store iTXt chunk."); -} -#endif - -/* This function is called when we haven't found a handler for a - chunk. If there isn't a problem with the chunk itself (ie bad - chunk name, CRC, or a critical chunk), the chunk is silently ignored - -- unless the PNG_FLAG_UNKNOWN_CHUNKS_SUPPORTED flag is on in which - case it will be saved away to be written out later. */ -void /* PRIVATE */ -png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -{ - png_uint_32 skip = 0; - - png_debug(1, "in png_handle_unknown\n"); - - if (png_ptr->mode & PNG_HAVE_IDAT) - { -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_IDAT; -#endif - if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) /* not an IDAT */ - png_ptr->mode |= PNG_AFTER_IDAT; - } - - png_check_chunk_name(png_ptr, png_ptr->chunk_name); - - if (!(png_ptr->chunk_name[0] & 0x20)) - { -#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) - if(png_handle_as_unknown(png_ptr, png_ptr->chunk_name) != - HANDLE_CHUNK_ALWAYS -#if defined(PNG_READ_USER_CHUNKS_SUPPORTED) - && png_ptr->read_user_chunk_fn == NULL -#endif - ) -#endif - png_chunk_error(png_ptr, "unknown critical chunk"); - } - -#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) - if (png_ptr->flags & PNG_FLAG_KEEP_UNKNOWN_CHUNKS) - { - png_unknown_chunk chunk; - -#ifdef PNG_MAX_MALLOC_64K - if (length > (png_uint_32)65535L) - { - png_warning(png_ptr, "unknown chunk too large to fit in memory"); - skip = length - (png_uint_32)65535L; - length = (png_uint_32)65535L; - } -#endif - png_strcpy((png_charp)chunk.name, (png_charp)png_ptr->chunk_name); - chunk.data = (png_bytep)png_malloc(png_ptr, length); - chunk.size = (png_size_t)length; - png_crc_read(png_ptr, (png_bytep)chunk.data, length); -#if defined(PNG_READ_USER_CHUNKS_SUPPORTED) - if(png_ptr->read_user_chunk_fn != NULL) - { - /* callback to user unknown chunk handler */ - if ((*(png_ptr->read_user_chunk_fn)) (png_ptr, &chunk) <= 0) - { - if (!(png_ptr->chunk_name[0] & 0x20)) - if(png_handle_as_unknown(png_ptr, png_ptr->chunk_name) != - HANDLE_CHUNK_ALWAYS) - { - png_free(png_ptr, chunk.data); - png_chunk_error(png_ptr, "unknown critical chunk"); - } - png_set_unknown_chunks(png_ptr, info_ptr, &chunk, 1); - } - } - else -#endif - png_set_unknown_chunks(png_ptr, info_ptr, &chunk, 1); - png_free(png_ptr, chunk.data); - } - else -#endif - skip = length; - - png_crc_finish(png_ptr, skip); - -#if !defined(PNG_READ_USER_CHUNKS_SUPPORTED) - info_ptr = info_ptr; /* quiet compiler warnings about unused info_ptr */ -#endif -} - -/* This function is called to verify that a chunk name is valid. - This function can't have the "critical chunk check" incorporated - into it, since in the future we will need to be able to call user - functions to handle unknown critical chunks after we check that - the chunk name itself is valid. */ - -#define isnonalpha(c) ((c) < 41 || (c) > 122 || ((c) > 90 && (c) < 97)) - -void /* PRIVATE */ -png_check_chunk_name(png_structp png_ptr, png_bytep chunk_name) -{ - png_debug(1, "in png_check_chunk_name\n"); - if (isnonalpha(chunk_name[0]) || isnonalpha(chunk_name[1]) || - isnonalpha(chunk_name[2]) || isnonalpha(chunk_name[3])) - { - png_chunk_error(png_ptr, "invalid chunk type"); - } -} - -/* Combines the row recently read in with the existing pixels in the - row. This routine takes care of alpha and transparency if requested. - This routine also handles the two methods of progressive display - of interlaced images, depending on the mask value. - The mask value describes which pixels are to be combined with - the row. The pattern always repeats every 8 pixels, so just 8 - bits are needed. A one indicates the pixel is to be combined, - a zero indicates the pixel is to be skipped. This is in addition - to any alpha or transparency value associated with the pixel. If - you want all pixels to be combined, pass 0xff (255) in mask. */ -#ifndef PNG_HAVE_ASSEMBLER_COMBINE_ROW -void /* PRIVATE */ -png_combine_row(png_structp png_ptr, png_bytep row, int mask) -{ - png_debug(1,"in png_combine_row\n"); - if (mask == 0xff) - { - png_memcpy(row, png_ptr->row_buf + 1, - (png_size_t)((png_ptr->width * - png_ptr->row_info.pixel_depth + 7) >> 3)); - } - else - { - switch (png_ptr->row_info.pixel_depth) - { - case 1: - { - png_bytep sp = png_ptr->row_buf + 1; - png_bytep dp = row; - int s_inc, s_start, s_end; - int m = 0x80; - int shift; - png_uint_32 i; - png_uint_32 row_width = png_ptr->width; - -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (png_ptr->transformations & PNG_PACKSWAP) - { - s_start = 0; - s_end = 7; - s_inc = 1; - } - else -#endif - { - s_start = 7; - s_end = 0; - s_inc = -1; - } - - shift = s_start; - - for (i = 0; i < row_width; i++) - { - if (m & mask) - { - int value; - - value = (*sp >> shift) & 0x01; - *dp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff); - *dp |= (png_byte)(value << shift); - } - - if (shift == s_end) - { - shift = s_start; - sp++; - dp++; - } - else - shift += s_inc; - - if (m == 1) - m = 0x80; - else - m >>= 1; - } - break; - } - case 2: - { - png_bytep sp = png_ptr->row_buf + 1; - png_bytep dp = row; - int s_start, s_end, s_inc; - int m = 0x80; - int shift; - png_uint_32 i; - png_uint_32 row_width = png_ptr->width; - int value; - -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (png_ptr->transformations & PNG_PACKSWAP) - { - s_start = 0; - s_end = 6; - s_inc = 2; - } - else -#endif - { - s_start = 6; - s_end = 0; - s_inc = -2; - } - - shift = s_start; - - for (i = 0; i < row_width; i++) - { - if (m & mask) - { - value = (*sp >> shift) & 0x03; - *dp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); - *dp |= (png_byte)(value << shift); - } - - if (shift == s_end) - { - shift = s_start; - sp++; - dp++; - } - else - shift += s_inc; - if (m == 1) - m = 0x80; - else - m >>= 1; - } - break; - } - case 4: - { - png_bytep sp = png_ptr->row_buf + 1; - png_bytep dp = row; - int s_start, s_end, s_inc; - int m = 0x80; - int shift; - png_uint_32 i; - png_uint_32 row_width = png_ptr->width; - int value; - -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (png_ptr->transformations & PNG_PACKSWAP) - { - s_start = 0; - s_end = 4; - s_inc = 4; - } - else -#endif - { - s_start = 4; - s_end = 0; - s_inc = -4; - } - shift = s_start; - - for (i = 0; i < row_width; i++) - { - if (m & mask) - { - value = (*sp >> shift) & 0xf; - *dp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); - *dp |= (png_byte)(value << shift); - } - - if (shift == s_end) - { - shift = s_start; - sp++; - dp++; - } - else - shift += s_inc; - if (m == 1) - m = 0x80; - else - m >>= 1; - } - break; - } - default: - { - png_bytep sp = png_ptr->row_buf + 1; - png_bytep dp = row; - png_size_t pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); - png_uint_32 i; - png_uint_32 row_width = png_ptr->width; - png_byte m = 0x80; - - - for (i = 0; i < row_width; i++) - { - if (m & mask) - { - png_memcpy(dp, sp, pixel_bytes); - } - - sp += pixel_bytes; - dp += pixel_bytes; - - if (m == 1) - m = 0x80; - else - m >>= 1; - } - break; - } - } - } -} -#endif /* !PNG_HAVE_ASSEMBLER_COMBINE_ROW */ - -#ifdef PNG_READ_INTERLACING_SUPPORTED -#ifndef PNG_HAVE_ASSEMBLER_READ_INTERLACE /* else in pngvcrd.c, pnggccrd.c */ -/* OLD pre-1.0.9 interface: -void png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass, - png_uint_32 transformations) - */ -void /* PRIVATE */ -png_do_read_interlace(png_structp png_ptr) -{ - png_row_infop row_info = &(png_ptr->row_info); - png_bytep row = png_ptr->row_buf + 1; - int pass = png_ptr->pass; - png_uint_32 transformations = png_ptr->transformations; -#ifdef PNG_USE_LOCAL_ARRAYS - /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */ - /* offset to next interlace block */ - const int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; -#endif - - png_debug(1,"in png_do_read_interlace (stock C version)\n"); - if (row != NULL && row_info != NULL) - { - png_uint_32 final_width; - - final_width = row_info->width * png_pass_inc[pass]; - - switch (row_info->pixel_depth) - { - case 1: - { - png_bytep sp = row + (png_size_t)((row_info->width - 1) >> 3); - png_bytep dp = row + (png_size_t)((final_width - 1) >> 3); - int sshift, dshift; - int s_start, s_end, s_inc; - int jstop = png_pass_inc[pass]; - png_byte v; - png_uint_32 i; - int j; - -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (transformations & PNG_PACKSWAP) - { - sshift = (int)((row_info->width + 7) & 0x07); - dshift = (int)((final_width + 7) & 0x07); - s_start = 7; - s_end = 0; - s_inc = -1; - } - else -#endif - { - sshift = 7 - (int)((row_info->width + 7) & 0x07); - dshift = 7 - (int)((final_width + 7) & 0x07); - s_start = 0; - s_end = 7; - s_inc = 1; - } - - for (i = 0; i < row_info->width; i++) - { - v = (png_byte)((*sp >> sshift) & 0x01); - for (j = 0; j < jstop; j++) - { - *dp &= (png_byte)((0x7f7f >> (7 - dshift)) & 0xff); - *dp |= (png_byte)(v << dshift); - if (dshift == s_end) - { - dshift = s_start; - dp--; - } - else - dshift += s_inc; - } - if (sshift == s_end) - { - sshift = s_start; - sp--; - } - else - sshift += s_inc; - } - break; - } - case 2: - { - png_bytep sp = row + (png_uint_32)((row_info->width - 1) >> 2); - png_bytep dp = row + (png_uint_32)((final_width - 1) >> 2); - int sshift, dshift; - int s_start, s_end, s_inc; - int jstop = png_pass_inc[pass]; - png_uint_32 i; - -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (transformations & PNG_PACKSWAP) - { - sshift = (int)(((row_info->width + 3) & 0x03) << 1); - dshift = (int)(((final_width + 3) & 0x03) << 1); - s_start = 6; - s_end = 0; - s_inc = -2; - } - else -#endif - { - sshift = (int)((3 - ((row_info->width + 3) & 0x03)) << 1); - dshift = (int)((3 - ((final_width + 3) & 0x03)) << 1); - s_start = 0; - s_end = 6; - s_inc = 2; - } - - for (i = 0; i < row_info->width; i++) - { - png_byte v; - int j; - - v = (png_byte)((*sp >> sshift) & 0x03); - for (j = 0; j < jstop; j++) - { - *dp &= (png_byte)((0x3f3f >> (6 - dshift)) & 0xff); - *dp |= (png_byte)(v << dshift); - if (dshift == s_end) - { - dshift = s_start; - dp--; - } - else - dshift += s_inc; - } - if (sshift == s_end) - { - sshift = s_start; - sp--; - } - else - sshift += s_inc; - } - break; - } - case 4: - { - png_bytep sp = row + (png_size_t)((row_info->width - 1) >> 1); - png_bytep dp = row + (png_size_t)((final_width - 1) >> 1); - int sshift, dshift; - int s_start, s_end, s_inc; - png_uint_32 i; - int jstop = png_pass_inc[pass]; - -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (transformations & PNG_PACKSWAP) - { - sshift = (int)(((row_info->width + 1) & 0x01) << 2); - dshift = (int)(((final_width + 1) & 0x01) << 2); - s_start = 4; - s_end = 0; - s_inc = -4; - } - else -#endif - { - sshift = (int)((1 - ((row_info->width + 1) & 0x01)) << 2); - dshift = (int)((1 - ((final_width + 1) & 0x01)) << 2); - s_start = 0; - s_end = 4; - s_inc = 4; - } - - for (i = 0; i < row_info->width; i++) - { - png_byte v = (png_byte)((*sp >> sshift) & 0xf); - int j; - - for (j = 0; j < jstop; j++) - { - *dp &= (png_byte)((0xf0f >> (4 - dshift)) & 0xff); - *dp |= (png_byte)(v << dshift); - if (dshift == s_end) - { - dshift = s_start; - dp--; - } - else - dshift += s_inc; - } - if (sshift == s_end) - { - sshift = s_start; - sp--; - } - else - sshift += s_inc; - } - break; - } - default: - { - png_size_t pixel_bytes = (row_info->pixel_depth >> 3); - png_bytep sp = row + (png_size_t)(row_info->width - 1) * pixel_bytes; - png_bytep dp = row + (png_size_t)(final_width - 1) * pixel_bytes; - - int jstop = png_pass_inc[pass]; - png_uint_32 i; - - for (i = 0; i < row_info->width; i++) - { - png_byte v[8]; - int j; - - png_memcpy(v, sp, pixel_bytes); - for (j = 0; j < jstop; j++) - { - png_memcpy(dp, v, pixel_bytes); - dp -= pixel_bytes; - } - sp -= pixel_bytes; - } - break; - } - } - row_info->width = final_width; - row_info->rowbytes = ((final_width * - (png_uint_32)row_info->pixel_depth + 7) >> 3); - } -#if !defined(PNG_READ_PACKSWAP_SUPPORTED) - transformations = transformations; /* silence compiler warning */ -#endif -} -#endif /* !PNG_HAVE_ASSEMBLER_READ_INTERLACE */ -#endif /* PNG_READ_INTERLACING_SUPPORTED */ - -#ifndef PNG_HAVE_ASSEMBLER_READ_FILTER_ROW -void /* PRIVATE */ -png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row, - png_bytep prev_row, int filter) -{ - png_debug(1, "in png_read_filter_row\n"); - png_debug2(2,"row = %lu, filter = %d\n", png_ptr->row_number, filter); - switch (filter) - { - case PNG_FILTER_VALUE_NONE: - break; - case PNG_FILTER_VALUE_SUB: - { - png_uint_32 i; - png_uint_32 istop = row_info->rowbytes; - png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; - png_bytep rp = row + bpp; - png_bytep lp = row; - - for (i = bpp; i < istop; i++) - { - *rp = (png_byte)(((int)(*rp) + (int)(*lp++)) & 0xff); - rp++; - } - break; - } - case PNG_FILTER_VALUE_UP: - { - png_uint_32 i; - png_uint_32 istop = row_info->rowbytes; - png_bytep rp = row; - png_bytep pp = prev_row; - - for (i = 0; i < istop; i++) - { - *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff); - rp++; - } - break; - } - case PNG_FILTER_VALUE_AVG: - { - png_uint_32 i; - png_bytep rp = row; - png_bytep pp = prev_row; - png_bytep lp = row; - png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; - png_uint_32 istop = row_info->rowbytes - bpp; - - for (i = 0; i < bpp; i++) - { - *rp = (png_byte)(((int)(*rp) + - ((int)(*pp++) / 2 )) & 0xff); - rp++; - } - - for (i = 0; i < istop; i++) - { - *rp = (png_byte)(((int)(*rp) + - (int)(*pp++ + *lp++) / 2 ) & 0xff); - rp++; - } - break; - } - case PNG_FILTER_VALUE_PAETH: - { - png_uint_32 i; - png_bytep rp = row; - png_bytep pp = prev_row; - png_bytep lp = row; - png_bytep cp = prev_row; - png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; - png_uint_32 istop=row_info->rowbytes - bpp; - - for (i = 0; i < bpp; i++) - { - *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff); - rp++; - } - - for (i = 0; i < istop; i++) /* use leftover rp,pp */ - { - int a, b, c, pa, pb, pc, p; - - a = *lp++; - b = *pp++; - c = *cp++; - - p = b - c; - pc = a - c; - -#ifdef PNG_USE_ABS - pa = abs(p); - pb = abs(pc); - pc = abs(p + pc); -#else - pa = p < 0 ? -p : p; - pb = pc < 0 ? -pc : pc; - pc = (p + pc) < 0 ? -(p + pc) : p + pc; -#endif - - /* - if (pa <= pb && pa <= pc) - p = a; - else if (pb <= pc) - p = b; - else - p = c; - */ - - p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c; - - *rp = (png_byte)(((int)(*rp) + p) & 0xff); - rp++; - } - break; - } - default: - png_warning(png_ptr, "Ignoring bad adaptive filter type"); - *row=0; - break; - } -} -#endif /* !PNG_HAVE_ASSEMBLER_READ_FILTER_ROW */ - -void /* PRIVATE */ -png_read_finish_row(png_structp png_ptr) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */ - - /* start of interlace block */ - const int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; - - /* offset to next interlace block */ - const int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; - - /* start of interlace block in the y direction */ - const int png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; - - /* offset to next interlace block in the y direction */ - const int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; -#endif - - png_debug(1, "in png_read_finish_row\n"); - png_ptr->row_number++; - if (png_ptr->row_number < png_ptr->num_rows) - return; - - if (png_ptr->interlaced) - { - png_ptr->row_number = 0; - png_memset_check(png_ptr, png_ptr->prev_row, 0, png_ptr->rowbytes + 1); - do - { - png_ptr->pass++; - if (png_ptr->pass >= 7) - break; - png_ptr->iwidth = (png_ptr->width + - png_pass_inc[png_ptr->pass] - 1 - - png_pass_start[png_ptr->pass]) / - png_pass_inc[png_ptr->pass]; - png_ptr->irowbytes = ((png_ptr->iwidth * - (png_uint_32)png_ptr->pixel_depth + 7) >> 3) +1; - - if (!(png_ptr->transformations & PNG_INTERLACE)) - { - png_ptr->num_rows = (png_ptr->height + - png_pass_yinc[png_ptr->pass] - 1 - - png_pass_ystart[png_ptr->pass]) / - png_pass_yinc[png_ptr->pass]; - if (!(png_ptr->num_rows)) - continue; - } - else /* if (png_ptr->transformations & PNG_INTERLACE) */ - break; - } while (png_ptr->iwidth == 0); - - if (png_ptr->pass < 7) - return; - } - - if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) - { -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_IDAT; -#endif - char extra; - int ret; - - png_ptr->zstream.next_out = (Byte *)&extra; - png_ptr->zstream.avail_out = (uInt)1; - for(;;) - { - if (!(png_ptr->zstream.avail_in)) - { - while (!png_ptr->idat_size) - { - png_byte chunk_length[4]; - - png_crc_finish(png_ptr, 0); - - png_read_data(png_ptr, chunk_length, 4); - png_ptr->idat_size = png_get_uint_32(chunk_length); - - png_reset_crc(png_ptr); - png_crc_read(png_ptr, png_ptr->chunk_name, 4); - if (png_memcmp(png_ptr->chunk_name, (png_bytep)png_IDAT, 4)) - png_error(png_ptr, "Not enough image data"); - - } - png_ptr->zstream.avail_in = (uInt)png_ptr->zbuf_size; - png_ptr->zstream.next_in = png_ptr->zbuf; - if (png_ptr->zbuf_size > png_ptr->idat_size) - png_ptr->zstream.avail_in = (uInt)png_ptr->idat_size; - png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zstream.avail_in); - png_ptr->idat_size -= png_ptr->zstream.avail_in; - } - ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); - if (ret == Z_STREAM_END) - { - if (!(png_ptr->zstream.avail_out) || png_ptr->zstream.avail_in || - png_ptr->idat_size) - png_warning(png_ptr, "Extra compressed data"); - png_ptr->mode |= PNG_AFTER_IDAT; - png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; - break; - } - if (ret != Z_OK) - png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg : - "Decompression Error"); - - if (!(png_ptr->zstream.avail_out)) - { - png_warning(png_ptr, "Extra compressed data."); - png_ptr->mode |= PNG_AFTER_IDAT; - png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; - break; - } - - } - png_ptr->zstream.avail_out = 0; - } - - if (png_ptr->idat_size || png_ptr->zstream.avail_in) - png_warning(png_ptr, "Extra compression data"); - - inflateReset(&png_ptr->zstream); - - png_ptr->mode |= PNG_AFTER_IDAT; -} - -void /* PRIVATE */ -png_read_start_row(png_structp png_ptr) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */ - - /* start of interlace block */ - const int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; - - /* offset to next interlace block */ - const int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; - - /* start of interlace block in the y direction */ - const int png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; - - /* offset to next interlace block in the y direction */ - const int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; -#endif - - int max_pixel_depth; - png_uint_32 row_bytes; - - png_debug(1, "in png_read_start_row\n"); - png_ptr->zstream.avail_in = 0; - png_init_read_transformations(png_ptr); - if (png_ptr->interlaced) - { - if (!(png_ptr->transformations & PNG_INTERLACE)) - png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 - - png_pass_ystart[0]) / png_pass_yinc[0]; - else - png_ptr->num_rows = png_ptr->height; - - png_ptr->iwidth = (png_ptr->width + - png_pass_inc[png_ptr->pass] - 1 - - png_pass_start[png_ptr->pass]) / - png_pass_inc[png_ptr->pass]; - - row_bytes = ((png_ptr->iwidth * - (png_uint_32)png_ptr->pixel_depth + 7) >> 3) +1; - png_ptr->irowbytes = (png_size_t)row_bytes; - if((png_uint_32)png_ptr->irowbytes != row_bytes) - png_error(png_ptr, "Rowbytes overflow in png_read_start_row"); - } - else - { - png_ptr->num_rows = png_ptr->height; - png_ptr->iwidth = png_ptr->width; - png_ptr->irowbytes = png_ptr->rowbytes + 1; - } - max_pixel_depth = png_ptr->pixel_depth; - -#if defined(PNG_READ_PACK_SUPPORTED) - if ((png_ptr->transformations & PNG_PACK) && png_ptr->bit_depth < 8) - max_pixel_depth = 8; -#endif - -#if defined(PNG_READ_EXPAND_SUPPORTED) - if (png_ptr->transformations & PNG_EXPAND) - { - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - if (png_ptr->num_trans) - max_pixel_depth = 32; - else - max_pixel_depth = 24; - } - else if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY) - { - if (max_pixel_depth < 8) - max_pixel_depth = 8; - if (png_ptr->num_trans) - max_pixel_depth *= 2; - } - else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) - { - if (png_ptr->num_trans) - { - max_pixel_depth *= 4; - max_pixel_depth /= 3; - } - } - } -#endif - -#if defined(PNG_READ_FILLER_SUPPORTED) - if (png_ptr->transformations & (PNG_FILLER)) - { - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - max_pixel_depth = 32; - else if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY) - { - if (max_pixel_depth <= 8) - max_pixel_depth = 16; - else - max_pixel_depth = 32; - } - else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) - { - if (max_pixel_depth <= 32) - max_pixel_depth = 32; - else - max_pixel_depth = 64; - } - } -#endif - -#if defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) - if (png_ptr->transformations & PNG_GRAY_TO_RGB) - { - if ( -#if defined(PNG_READ_EXPAND_SUPPORTED) - (png_ptr->num_trans && (png_ptr->transformations & PNG_EXPAND)) || -#endif -#if defined(PNG_READ_FILLER_SUPPORTED) - (png_ptr->transformations & (PNG_FILLER)) || -#endif - png_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - { - if (max_pixel_depth <= 16) - max_pixel_depth = 32; - else - max_pixel_depth = 64; - } - else - { - if (max_pixel_depth <= 8) - { - if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - max_pixel_depth = 32; - else - max_pixel_depth = 24; - } - else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - max_pixel_depth = 64; - else - max_pixel_depth = 48; - } - } -#endif - -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) && \ -defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) - if(png_ptr->transformations & PNG_USER_TRANSFORM) - { - int user_pixel_depth=png_ptr->user_transform_depth* - png_ptr->user_transform_channels; - if(user_pixel_depth > max_pixel_depth) - max_pixel_depth=user_pixel_depth; - } -#endif - - /* align the width on the next larger 8 pixels. Mainly used - for interlacing */ - row_bytes = ((png_ptr->width + 7) & ~((png_uint_32)7)); - /* calculate the maximum bytes needed, adding a byte and a pixel - for safety's sake */ - row_bytes = ((row_bytes * (png_uint_32)max_pixel_depth + 7) >> 3) + - 1 + ((max_pixel_depth + 7) >> 3); -#ifdef PNG_MAX_MALLOC_64K - if (row_bytes > (png_uint_32)65536L) - png_error(png_ptr, "This image requires a row greater than 64KB"); -#endif - png_ptr->big_row_buf = (png_bytep)png_malloc(png_ptr, row_bytes+64); - png_ptr->row_buf = png_ptr->big_row_buf+32; -#if defined(PNG_DEBUG) && defined(PNG_USE_PNGGCCRD) - png_ptr->row_buf_size = row_bytes; -#endif - -#ifdef PNG_MAX_MALLOC_64K - if ((png_uint_32)png_ptr->rowbytes + 1 > (png_uint_32)65536L) - png_error(png_ptr, "This image requires a row greater than 64KB"); -#endif - png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, (png_uint_32)( - png_ptr->rowbytes + 1)); - - png_memset_check(png_ptr, png_ptr->prev_row, 0, png_ptr->rowbytes + 1); - - png_debug1(3, "width = %lu,\n", png_ptr->width); - png_debug1(3, "height = %lu,\n", png_ptr->height); - png_debug1(3, "iwidth = %lu,\n", png_ptr->iwidth); - png_debug1(3, "num_rows = %lu\n", png_ptr->num_rows); - png_debug1(3, "rowbytes = %lu,\n", png_ptr->rowbytes); - png_debug1(3, "irowbytes = %lu,\n", png_ptr->irowbytes); - - png_ptr->flags |= PNG_FLAG_ROW_INIT; -} diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngset.c b/gtkmm-osx/trunk/libpng-1.2.5/pngset.c deleted file mode 100644 index 8e4e619..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/pngset.c +++ /dev/null @@ -1,1160 +0,0 @@ - -/* pngset.c - storage of image information into info struct - * - * libpng 1.2.5 - October 3, 2002 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2002 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) - * - * The functions here are used during reads to store data from the file - * into the info struct, and during writes to store application data - * into the info struct for writing into the file. This abstracts the - * info struct and allows us to change the structure in the future. - */ - -#define PNG_INTERNAL -#include "png.h" - -#if defined(PNG_bKGD_SUPPORTED) -void PNGAPI -png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background) -{ - png_debug1(1, "in %s storage function\n", "bKGD"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - png_memcpy(&(info_ptr->background), background, sizeof(png_color_16)); - info_ptr->valid |= PNG_INFO_bKGD; -} -#endif - -#if defined(PNG_cHRM_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED -void PNGAPI -png_set_cHRM(png_structp png_ptr, png_infop info_ptr, - double white_x, double white_y, double red_x, double red_y, - double green_x, double green_y, double blue_x, double blue_y) -{ - png_debug1(1, "in %s storage function\n", "cHRM"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - if (white_x < 0.0 || white_y < 0.0 || - red_x < 0.0 || red_y < 0.0 || - green_x < 0.0 || green_y < 0.0 || - blue_x < 0.0 || blue_y < 0.0) - { - png_warning(png_ptr, - "Ignoring attempt to set negative chromaticity value"); - return; - } - if (white_x > 21474.83 || white_y > 21474.83 || - red_x > 21474.83 || red_y > 21474.83 || - green_x > 21474.83 || green_y > 21474.83 || - blue_x > 21474.83 || blue_y > 21474.83) - { - png_warning(png_ptr, - "Ignoring attempt to set chromaticity value exceeding 21474.83"); - return; - } - - info_ptr->x_white = (float)white_x; - info_ptr->y_white = (float)white_y; - info_ptr->x_red = (float)red_x; - info_ptr->y_red = (float)red_y; - info_ptr->x_green = (float)green_x; - info_ptr->y_green = (float)green_y; - info_ptr->x_blue = (float)blue_x; - info_ptr->y_blue = (float)blue_y; -#ifdef PNG_FIXED_POINT_SUPPORTED - info_ptr->int_x_white = (png_fixed_point)(white_x*100000.+0.5); - info_ptr->int_y_white = (png_fixed_point)(white_y*100000.+0.5); - info_ptr->int_x_red = (png_fixed_point)( red_x*100000.+0.5); - info_ptr->int_y_red = (png_fixed_point)( red_y*100000.+0.5); - info_ptr->int_x_green = (png_fixed_point)(green_x*100000.+0.5); - info_ptr->int_y_green = (png_fixed_point)(green_y*100000.+0.5); - info_ptr->int_x_blue = (png_fixed_point)( blue_x*100000.+0.5); - info_ptr->int_y_blue = (png_fixed_point)( blue_y*100000.+0.5); -#endif - info_ptr->valid |= PNG_INFO_cHRM; -} -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED -void PNGAPI -png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr, - png_fixed_point white_x, png_fixed_point white_y, png_fixed_point red_x, - png_fixed_point red_y, png_fixed_point green_x, png_fixed_point green_y, - png_fixed_point blue_x, png_fixed_point blue_y) -{ - png_debug1(1, "in %s storage function\n", "cHRM"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - if (white_x < 0 || white_y < 0 || - red_x < 0 || red_y < 0 || - green_x < 0 || green_y < 0 || - blue_x < 0 || blue_y < 0) - { - png_warning(png_ptr, - "Ignoring attempt to set negative chromaticity value"); - return; - } - if (white_x > (double) PNG_MAX_UINT || white_y > (double) PNG_MAX_UINT || - red_x > (double) PNG_MAX_UINT || red_y > (double) PNG_MAX_UINT || - green_x > (double) PNG_MAX_UINT || green_y > (double) PNG_MAX_UINT || - blue_x > (double) PNG_MAX_UINT || blue_y > (double) PNG_MAX_UINT) - { - png_warning(png_ptr, - "Ignoring attempt to set chromaticity value exceeding 21474.83"); - return; - } - info_ptr->int_x_white = white_x; - info_ptr->int_y_white = white_y; - info_ptr->int_x_red = red_x; - info_ptr->int_y_red = red_y; - info_ptr->int_x_green = green_x; - info_ptr->int_y_green = green_y; - info_ptr->int_x_blue = blue_x; - info_ptr->int_y_blue = blue_y; -#ifdef PNG_FLOATING_POINT_SUPPORTED - info_ptr->x_white = (float)(white_x/100000.); - info_ptr->y_white = (float)(white_y/100000.); - info_ptr->x_red = (float)( red_x/100000.); - info_ptr->y_red = (float)( red_y/100000.); - info_ptr->x_green = (float)(green_x/100000.); - info_ptr->y_green = (float)(green_y/100000.); - info_ptr->x_blue = (float)( blue_x/100000.); - info_ptr->y_blue = (float)( blue_y/100000.); -#endif - info_ptr->valid |= PNG_INFO_cHRM; -} -#endif -#endif - -#if defined(PNG_gAMA_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED -void PNGAPI -png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma) -{ - double gamma; - png_debug1(1, "in %s storage function\n", "gAMA"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - /* Check for overflow */ - if (file_gamma > 21474.83) - { - png_warning(png_ptr, "Limiting gamma to 21474.83"); - gamma=21474.83; - } - else - gamma=file_gamma; - info_ptr->gamma = (float)gamma; -#ifdef PNG_FIXED_POINT_SUPPORTED - info_ptr->int_gamma = (int)(gamma*100000.+.5); -#endif - info_ptr->valid |= PNG_INFO_gAMA; - if(gamma == 0.0) - png_warning(png_ptr, "Setting gamma=0"); -} -#endif -void PNGAPI -png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point - int_gamma) -{ - png_fixed_point gamma; - - png_debug1(1, "in %s storage function\n", "gAMA"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - if (int_gamma > (png_fixed_point) PNG_MAX_UINT) - { - png_warning(png_ptr, "Limiting gamma to 21474.83"); - gamma=PNG_MAX_UINT; - } - else - { - if (int_gamma < 0) - { - png_warning(png_ptr, "Setting negative gamma to zero"); - gamma=0; - } - else - gamma=int_gamma; - } -#ifdef PNG_FLOATING_POINT_SUPPORTED - info_ptr->gamma = (float)(gamma/100000.); -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED - info_ptr->int_gamma = gamma; -#endif - info_ptr->valid |= PNG_INFO_gAMA; - if(gamma == 0) - png_warning(png_ptr, "Setting gamma=0"); -} -#endif - -#if defined(PNG_hIST_SUPPORTED) -void PNGAPI -png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist) -{ - int i; - - png_debug1(1, "in %s storage function\n", "hIST"); - if (png_ptr == NULL || info_ptr == NULL) - return; - if (info_ptr->num_palette == 0) - { - png_warning(png_ptr, - "Palette size 0, hIST allocation skipped."); - return; - } - -#ifdef PNG_FREE_ME_SUPPORTED - png_free_data(png_ptr, info_ptr, PNG_FREE_HIST, 0); -#endif - /* Changed from info->num_palette to 256 in version 1.2.1 */ - png_ptr->hist = (png_uint_16p)png_malloc_warn(png_ptr, - (png_uint_32)(256 * sizeof (png_uint_16))); - if (png_ptr->hist == NULL) - { - png_warning(png_ptr, "Insufficient memory for hIST chunk data."); - return; - } - - for (i = 0; i < info_ptr->num_palette; i++) - png_ptr->hist[i] = hist[i]; - info_ptr->hist = png_ptr->hist; - info_ptr->valid |= PNG_INFO_hIST; - -#ifdef PNG_FREE_ME_SUPPORTED - info_ptr->free_me |= PNG_FREE_HIST; -#else - png_ptr->flags |= PNG_FLAG_FREE_HIST; -#endif -} -#endif - -void PNGAPI -png_set_IHDR(png_structp png_ptr, png_infop info_ptr, - png_uint_32 width, png_uint_32 height, int bit_depth, - int color_type, int interlace_type, int compression_type, - int filter_type) -{ - int rowbytes_per_pixel; - png_debug1(1, "in %s storage function\n", "IHDR"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - /* check for width and height valid values */ - if (width == 0 || height == 0) - png_error(png_ptr, "Image width or height is zero in IHDR"); - if (width > PNG_MAX_UINT || height > PNG_MAX_UINT) - png_error(png_ptr, "Invalid image size in IHDR"); - - /* check other values */ - if (bit_depth != 1 && bit_depth != 2 && bit_depth != 4 && - bit_depth != 8 && bit_depth != 16) - png_error(png_ptr, "Invalid bit depth in IHDR"); - - if (color_type < 0 || color_type == 1 || - color_type == 5 || color_type > 6) - png_error(png_ptr, "Invalid color type in IHDR"); - - if (((color_type == PNG_COLOR_TYPE_PALETTE) && bit_depth > 8) || - ((color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_GRAY_ALPHA || - color_type == PNG_COLOR_TYPE_RGB_ALPHA) && bit_depth < 8)) - png_error(png_ptr, "Invalid color type/bit depth combination in IHDR"); - - if (interlace_type >= PNG_INTERLACE_LAST) - png_error(png_ptr, "Unknown interlace method in IHDR"); - - if (compression_type != PNG_COMPRESSION_TYPE_BASE) - png_error(png_ptr, "Unknown compression method in IHDR"); - -#if defined(PNG_MNG_FEATURES_SUPPORTED) - /* Accept filter_method 64 (intrapixel differencing) only if - * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and - * 2. Libpng did not read a PNG signature (this filter_method is only - * used in PNG datastreams that are embedded in MNG datastreams) and - * 3. The application called png_permit_mng_features with a mask that - * included PNG_FLAG_MNG_FILTER_64 and - * 4. The filter_method is 64 and - * 5. The color_type is RGB or RGBA - */ - if((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)&&png_ptr->mng_features_permitted) - png_warning(png_ptr,"MNG features are not allowed in a PNG datastream\n"); - if(filter_type != PNG_FILTER_TYPE_BASE) - { - if(!((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && - (filter_type == PNG_INTRAPIXEL_DIFFERENCING) && - ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) && - (color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_RGB_ALPHA))) - png_error(png_ptr, "Unknown filter method in IHDR"); - if(png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) - png_warning(png_ptr, "Invalid filter method in IHDR"); - } -#else - if(filter_type != PNG_FILTER_TYPE_BASE) - png_error(png_ptr, "Unknown filter method in IHDR"); -#endif - - info_ptr->width = width; - info_ptr->height = height; - info_ptr->bit_depth = (png_byte)bit_depth; - info_ptr->color_type =(png_byte) color_type; - info_ptr->compression_type = (png_byte)compression_type; - info_ptr->filter_type = (png_byte)filter_type; - info_ptr->interlace_type = (png_byte)interlace_type; - if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - info_ptr->channels = 1; - else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR) - info_ptr->channels = 3; - else - info_ptr->channels = 1; - if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) - info_ptr->channels++; - info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth); - - /* check for overflow */ - rowbytes_per_pixel = (info_ptr->pixel_depth + 7) >> 3; - if ( width > PNG_MAX_UINT/rowbytes_per_pixel - 64) - { - png_warning(png_ptr, - "Width too large to process image data; rowbytes will overflow."); - info_ptr->rowbytes = (png_size_t)0; - } - else - info_ptr->rowbytes = (info_ptr->width * info_ptr->pixel_depth + 7) >> 3; -} - -#if defined(PNG_oFFs_SUPPORTED) -void PNGAPI -png_set_oFFs(png_structp png_ptr, png_infop info_ptr, - png_int_32 offset_x, png_int_32 offset_y, int unit_type) -{ - png_debug1(1, "in %s storage function\n", "oFFs"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - info_ptr->x_offset = offset_x; - info_ptr->y_offset = offset_y; - info_ptr->offset_unit_type = (png_byte)unit_type; - info_ptr->valid |= PNG_INFO_oFFs; -} -#endif - -#if defined(PNG_pCAL_SUPPORTED) -void PNGAPI -png_set_pCAL(png_structp png_ptr, png_infop info_ptr, - png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, - png_charp units, png_charpp params) -{ - png_uint_32 length; - int i; - - png_debug1(1, "in %s storage function\n", "pCAL"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - length = png_strlen(purpose) + 1; - png_debug1(3, "allocating purpose for info (%lu bytes)\n", length); - info_ptr->pcal_purpose = (png_charp)png_malloc_warn(png_ptr, length); - if (info_ptr->pcal_purpose == NULL) - { - png_warning(png_ptr, "Insufficient memory for pCAL purpose."); - return; - } - png_memcpy(info_ptr->pcal_purpose, purpose, (png_size_t)length); - - png_debug(3, "storing X0, X1, type, and nparams in info\n"); - info_ptr->pcal_X0 = X0; - info_ptr->pcal_X1 = X1; - info_ptr->pcal_type = (png_byte)type; - info_ptr->pcal_nparams = (png_byte)nparams; - - length = png_strlen(units) + 1; - png_debug1(3, "allocating units for info (%lu bytes)\n", length); - info_ptr->pcal_units = (png_charp)png_malloc_warn(png_ptr, length); - if (info_ptr->pcal_units == NULL) - { - png_warning(png_ptr, "Insufficient memory for pCAL units."); - return; - } - png_memcpy(info_ptr->pcal_units, units, (png_size_t)length); - - info_ptr->pcal_params = (png_charpp)png_malloc_warn(png_ptr, - (png_uint_32)((nparams + 1) * sizeof(png_charp))); - if (info_ptr->pcal_params == NULL) - { - png_warning(png_ptr, "Insufficient memory for pCAL params."); - return; - } - - info_ptr->pcal_params[nparams] = NULL; - - for (i = 0; i < nparams; i++) - { - length = png_strlen(params[i]) + 1; - png_debug2(3, "allocating parameter %d for info (%lu bytes)\n", i, length); - info_ptr->pcal_params[i] = (png_charp)png_malloc_warn(png_ptr, length); - if (info_ptr->pcal_params[i] == NULL) - { - png_warning(png_ptr, "Insufficient memory for pCAL parameter."); - return; - } - png_memcpy(info_ptr->pcal_params[i], params[i], (png_size_t)length); - } - - info_ptr->valid |= PNG_INFO_pCAL; -#ifdef PNG_FREE_ME_SUPPORTED - info_ptr->free_me |= PNG_FREE_PCAL; -#endif -} -#endif - -#if defined(PNG_READ_sCAL_SUPPORTED) || defined(PNG_WRITE_sCAL_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED -void PNGAPI -png_set_sCAL(png_structp png_ptr, png_infop info_ptr, - int unit, double width, double height) -{ - png_debug1(1, "in %s storage function\n", "sCAL"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - info_ptr->scal_unit = (png_byte)unit; - info_ptr->scal_pixel_width = width; - info_ptr->scal_pixel_height = height; - - info_ptr->valid |= PNG_INFO_sCAL; -} -#else -#ifdef PNG_FIXED_POINT_SUPPORTED -void PNGAPI -png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr, - int unit, png_charp swidth, png_charp sheight) -{ - png_uint_32 length; - - png_debug1(1, "in %s storage function\n", "sCAL"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - info_ptr->scal_unit = (png_byte)unit; - - length = png_strlen(swidth) + 1; - png_debug1(3, "allocating unit for info (%d bytes)\n", length); - info_ptr->scal_s_width = (png_charp)png_malloc(png_ptr, length); - png_memcpy(info_ptr->scal_s_width, swidth, (png_size_t)length); - - length = png_strlen(sheight) + 1; - png_debug1(3, "allocating unit for info (%d bytes)\n", length); - info_ptr->scal_s_height = (png_charp)png_malloc(png_ptr, length); - png_memcpy(info_ptr->scal_s_height, sheight, (png_size_t)length); - - info_ptr->valid |= PNG_INFO_sCAL; -#ifdef PNG_FREE_ME_SUPPORTED - info_ptr->free_me |= PNG_FREE_SCAL; -#endif -} -#endif -#endif -#endif - -#if defined(PNG_pHYs_SUPPORTED) -void PNGAPI -png_set_pHYs(png_structp png_ptr, png_infop info_ptr, - png_uint_32 res_x, png_uint_32 res_y, int unit_type) -{ - png_debug1(1, "in %s storage function\n", "pHYs"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - info_ptr->x_pixels_per_unit = res_x; - info_ptr->y_pixels_per_unit = res_y; - info_ptr->phys_unit_type = (png_byte)unit_type; - info_ptr->valid |= PNG_INFO_pHYs; -} -#endif - -void PNGAPI -png_set_PLTE(png_structp png_ptr, png_infop info_ptr, - png_colorp palette, int num_palette) -{ - - png_debug1(1, "in %s storage function\n", "PLTE"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - /* - * It may not actually be necessary to set png_ptr->palette here; - * we do it for backward compatibility with the way the png_handle_tRNS - * function used to do the allocation. - */ -#ifdef PNG_FREE_ME_SUPPORTED - png_free_data(png_ptr, info_ptr, PNG_FREE_PLTE, 0); -#endif - /* Changed in libpng-1.2.1 to allocate 256 instead of num_palette entries, - in case of an invalid PNG file that has too-large sample values. */ - png_ptr->palette = (png_colorp)png_zalloc(png_ptr, (uInt)256, - sizeof (png_color)); - if (png_ptr->palette == NULL) - png_error(png_ptr, "Unable to malloc palette"); - png_memcpy(png_ptr->palette, palette, num_palette * sizeof (png_color)); - info_ptr->palette = png_ptr->palette; - info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette; - -#ifdef PNG_FREE_ME_SUPPORTED - info_ptr->free_me |= PNG_FREE_PLTE; -#else - png_ptr->flags |= PNG_FLAG_FREE_PLTE; -#endif - - info_ptr->valid |= PNG_INFO_PLTE; -} - -#if defined(PNG_sBIT_SUPPORTED) -void PNGAPI -png_set_sBIT(png_structp png_ptr, png_infop info_ptr, - png_color_8p sig_bit) -{ - png_debug1(1, "in %s storage function\n", "sBIT"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - png_memcpy(&(info_ptr->sig_bit), sig_bit, sizeof (png_color_8)); - info_ptr->valid |= PNG_INFO_sBIT; -} -#endif - -#if defined(PNG_sRGB_SUPPORTED) -void PNGAPI -png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int intent) -{ - png_debug1(1, "in %s storage function\n", "sRGB"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - info_ptr->srgb_intent = (png_byte)intent; - info_ptr->valid |= PNG_INFO_sRGB; -} - -void PNGAPI -png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr, - int intent) -{ -#if defined(PNG_gAMA_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED - float file_gamma; -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED - png_fixed_point int_file_gamma; -#endif -#endif -#if defined(PNG_cHRM_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED - float white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y; -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED - png_fixed_point int_white_x, int_white_y, int_red_x, int_red_y, int_green_x, - int_green_y, int_blue_x, int_blue_y; -#endif -#endif - png_debug1(1, "in %s storage function\n", "sRGB_gAMA_and_cHRM"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - png_set_sRGB(png_ptr, info_ptr, intent); - -#if defined(PNG_gAMA_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED - file_gamma = (float).45455; - png_set_gAMA(png_ptr, info_ptr, file_gamma); -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED - int_file_gamma = 45455L; - png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma); -#endif -#endif - -#if defined(PNG_cHRM_SUPPORTED) -#ifdef PNG_FIXED_POINT_SUPPORTED - int_white_x = 31270L; - int_white_y = 32900L; - int_red_x = 64000L; - int_red_y = 33000L; - int_green_x = 30000L; - int_green_y = 60000L; - int_blue_x = 15000L; - int_blue_y = 6000L; - - png_set_cHRM_fixed(png_ptr, info_ptr, - int_white_x, int_white_y, int_red_x, int_red_y, int_green_x, int_green_y, - int_blue_x, int_blue_y); -#endif -#ifdef PNG_FLOATING_POINT_SUPPORTED - white_x = (float).3127; - white_y = (float).3290; - red_x = (float).64; - red_y = (float).33; - green_x = (float).30; - green_y = (float).60; - blue_x = (float).15; - blue_y = (float).06; - - png_set_cHRM(png_ptr, info_ptr, - white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y); -#endif -#endif -} -#endif - - -#if defined(PNG_iCCP_SUPPORTED) -void PNGAPI -png_set_iCCP(png_structp png_ptr, png_infop info_ptr, - png_charp name, int compression_type, - png_charp profile, png_uint_32 proflen) -{ - png_charp new_iccp_name; - png_charp new_iccp_profile; - - png_debug1(1, "in %s storage function\n", "iCCP"); - if (png_ptr == NULL || info_ptr == NULL || name == NULL || profile == NULL) - return; - - new_iccp_name = (png_charp)png_malloc(png_ptr, png_strlen(name)+1); - png_strcpy(new_iccp_name, name); - new_iccp_profile = (png_charp)png_malloc(png_ptr, proflen); - png_memcpy(new_iccp_profile, profile, (png_size_t)proflen); - - png_free_data(png_ptr, info_ptr, PNG_FREE_ICCP, 0); - - info_ptr->iccp_proflen = proflen; - info_ptr->iccp_name = new_iccp_name; - info_ptr->iccp_profile = new_iccp_profile; - /* Compression is always zero but is here so the API and info structure - * does not have to change if we introduce multiple compression types */ - info_ptr->iccp_compression = (png_byte)compression_type; -#ifdef PNG_FREE_ME_SUPPORTED - info_ptr->free_me |= PNG_FREE_ICCP; -#endif - info_ptr->valid |= PNG_INFO_iCCP; -} -#endif - -#if defined(PNG_TEXT_SUPPORTED) -void PNGAPI -png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, - int num_text) -{ - int ret; - ret=png_set_text_2(png_ptr, info_ptr, text_ptr, num_text); - if (ret) - png_error(png_ptr, "Insufficient memory to store text"); -} - -int /* PRIVATE */ -png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, - int num_text) -{ - int i; - - png_debug1(1, "in %s storage function\n", (png_ptr->chunk_name[0] == '\0' ? - "text" : (png_const_charp)png_ptr->chunk_name)); - - if (png_ptr == NULL || info_ptr == NULL || num_text == 0) - return(0); - - /* Make sure we have enough space in the "text" array in info_struct - * to hold all of the incoming text_ptr objects. - */ - if (info_ptr->num_text + num_text > info_ptr->max_text) - { - if (info_ptr->text != NULL) - { - png_textp old_text; - int old_max; - - old_max = info_ptr->max_text; - info_ptr->max_text = info_ptr->num_text + num_text + 8; - old_text = info_ptr->text; - info_ptr->text = (png_textp)png_malloc_warn(png_ptr, - (png_uint_32)(info_ptr->max_text * sizeof (png_text))); - if (info_ptr->text == NULL) - { - png_free(png_ptr, old_text); - return(1); - } - png_memcpy(info_ptr->text, old_text, (png_size_t)(old_max * - sizeof(png_text))); - png_free(png_ptr, old_text); - } - else - { - info_ptr->max_text = num_text + 8; - info_ptr->num_text = 0; - info_ptr->text = (png_textp)png_malloc_warn(png_ptr, - (png_uint_32)(info_ptr->max_text * sizeof (png_text))); - if (info_ptr->text == NULL) - return(1); -#ifdef PNG_FREE_ME_SUPPORTED - info_ptr->free_me |= PNG_FREE_TEXT; -#endif - } - png_debug1(3, "allocated %d entries for info_ptr->text\n", - info_ptr->max_text); - } - for (i = 0; i < num_text; i++) - { - png_size_t text_length,key_len; - png_size_t lang_len,lang_key_len; - png_textp textp = &(info_ptr->text[info_ptr->num_text]); - - if (text_ptr[i].key == NULL) - continue; - - key_len = png_strlen(text_ptr[i].key); - - if(text_ptr[i].compression <= 0) - { - lang_len = 0; - lang_key_len = 0; - } - else -#ifdef PNG_iTXt_SUPPORTED - { - /* set iTXt data */ - if (text_ptr[i].lang != NULL) - lang_len = png_strlen(text_ptr[i].lang); - else - lang_len = 0; - if (text_ptr[i].lang_key != NULL) - lang_key_len = png_strlen(text_ptr[i].lang_key); - else - lang_key_len = 0; - } -#else - { - png_warning(png_ptr, "iTXt chunk not supported."); - continue; - } -#endif - - if (text_ptr[i].text == NULL || text_ptr[i].text[0] == '\0') - { - text_length = 0; -#ifdef PNG_iTXt_SUPPORTED - if(text_ptr[i].compression > 0) - textp->compression = PNG_ITXT_COMPRESSION_NONE; - else -#endif - textp->compression = PNG_TEXT_COMPRESSION_NONE; - } - else - { - text_length = png_strlen(text_ptr[i].text); - textp->compression = text_ptr[i].compression; - } - - textp->key = (png_charp)png_malloc_warn(png_ptr, - (png_uint_32)(key_len + text_length + lang_len + lang_key_len + 4)); - if (textp->key == NULL) - return(1); - png_debug2(2, "Allocated %lu bytes at %x in png_set_text\n", - (png_uint_32)(key_len + lang_len + lang_key_len + text_length + 4), - (int)textp->key); - - png_memcpy(textp->key, text_ptr[i].key, - (png_size_t)(key_len)); - *(textp->key+key_len) = '\0'; -#ifdef PNG_iTXt_SUPPORTED - if (text_ptr[i].compression > 0) - { - textp->lang=textp->key + key_len + 1; - png_memcpy(textp->lang, text_ptr[i].lang, lang_len); - *(textp->lang+lang_len) = '\0'; - textp->lang_key=textp->lang + lang_len + 1; - png_memcpy(textp->lang_key, text_ptr[i].lang_key, lang_key_len); - *(textp->lang_key+lang_key_len) = '\0'; - textp->text=textp->lang_key + lang_key_len + 1; - } - else -#endif - { -#ifdef PNG_iTXt_SUPPORTED - textp->lang=NULL; - textp->lang_key=NULL; -#endif - textp->text=textp->key + key_len + 1; - } - if(text_length) - png_memcpy(textp->text, text_ptr[i].text, - (png_size_t)(text_length)); - *(textp->text+text_length) = '\0'; - -#ifdef PNG_iTXt_SUPPORTED - if(textp->compression > 0) - { - textp->text_length = 0; - textp->itxt_length = text_length; - } - else -#endif - { - textp->text_length = text_length; -#ifdef PNG_iTXt_SUPPORTED - textp->itxt_length = 0; -#endif - } - info_ptr->text[info_ptr->num_text]= *textp; - info_ptr->num_text++; - png_debug1(3, "transferred text chunk %d\n", info_ptr->num_text); - } - return(0); -} -#endif - -#if defined(PNG_tIME_SUPPORTED) -void PNGAPI -png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time) -{ - png_debug1(1, "in %s storage function\n", "tIME"); - if (png_ptr == NULL || info_ptr == NULL || - (png_ptr->mode & PNG_WROTE_tIME)) - return; - - png_memcpy(&(info_ptr->mod_time), mod_time, sizeof (png_time)); - info_ptr->valid |= PNG_INFO_tIME; -} -#endif - -#if defined(PNG_tRNS_SUPPORTED) -void PNGAPI -png_set_tRNS(png_structp png_ptr, png_infop info_ptr, - png_bytep trans, int num_trans, png_color_16p trans_values) -{ - png_debug1(1, "in %s storage function\n", "tRNS"); - if (png_ptr == NULL || info_ptr == NULL) - return; - - if (trans != NULL) - { - /* - * It may not actually be necessary to set png_ptr->trans here; - * we do it for backward compatibility with the way the png_handle_tRNS - * function used to do the allocation. - */ -#ifdef PNG_FREE_ME_SUPPORTED - png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0); -#endif - /* Changed from num_trans to 256 in version 1.2.1 */ - png_ptr->trans = info_ptr->trans = (png_bytep)png_malloc(png_ptr, - (png_uint_32)256); - png_memcpy(info_ptr->trans, trans, (png_size_t)num_trans); -#ifdef PNG_FREE_ME_SUPPORTED - info_ptr->free_me |= PNG_FREE_TRNS; -#else - png_ptr->flags |= PNG_FLAG_FREE_TRNS; -#endif - } - - if (trans_values != NULL) - { - png_memcpy(&(info_ptr->trans_values), trans_values, - sizeof(png_color_16)); - if (num_trans == 0) - num_trans = 1; - } - info_ptr->num_trans = (png_uint_16)num_trans; - info_ptr->valid |= PNG_INFO_tRNS; -} -#endif - -#if defined(PNG_sPLT_SUPPORTED) -void PNGAPI -png_set_sPLT(png_structp png_ptr, - png_infop info_ptr, png_sPLT_tp entries, int nentries) -{ - png_sPLT_tp np; - int i; - - np = (png_sPLT_tp)png_malloc_warn(png_ptr, - (info_ptr->splt_palettes_num + nentries) * sizeof(png_sPLT_t)); - if (np == NULL) - { - png_warning(png_ptr, "No memory for sPLT palettes."); - return; - } - - png_memcpy(np, info_ptr->splt_palettes, - info_ptr->splt_palettes_num * sizeof(png_sPLT_t)); - png_free(png_ptr, info_ptr->splt_palettes); - info_ptr->splt_palettes=NULL; - - for (i = 0; i < nentries; i++) - { - png_sPLT_tp to = np + info_ptr->splt_palettes_num + i; - png_sPLT_tp from = entries + i; - - to->name = (png_charp)png_malloc(png_ptr, - png_strlen(from->name) + 1); - png_strcpy(to->name, from->name); - to->entries = (png_sPLT_entryp)png_malloc(png_ptr, - from->nentries * sizeof(png_sPLT_t)); - png_memcpy(to->entries, from->entries, - from->nentries * sizeof(png_sPLT_t)); - to->nentries = from->nentries; - to->depth = from->depth; - } - - info_ptr->splt_palettes = np; - info_ptr->splt_palettes_num += nentries; - info_ptr->valid |= PNG_INFO_sPLT; -#ifdef PNG_FREE_ME_SUPPORTED - info_ptr->free_me |= PNG_FREE_SPLT; -#endif -} -#endif /* PNG_sPLT_SUPPORTED */ - -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) -void PNGAPI -png_set_unknown_chunks(png_structp png_ptr, - png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns) -{ - png_unknown_chunkp np; - int i; - - if (png_ptr == NULL || info_ptr == NULL || num_unknowns == 0) - return; - - np = (png_unknown_chunkp)png_malloc_warn(png_ptr, - (info_ptr->unknown_chunks_num + num_unknowns) * - sizeof(png_unknown_chunk)); - if (np == NULL) - { - png_warning(png_ptr, "Out of memory while processing unknown chunk."); - return; - } - - png_memcpy(np, info_ptr->unknown_chunks, - info_ptr->unknown_chunks_num * sizeof(png_unknown_chunk)); - png_free(png_ptr, info_ptr->unknown_chunks); - info_ptr->unknown_chunks=NULL; - - for (i = 0; i < num_unknowns; i++) - { - png_unknown_chunkp to = np + info_ptr->unknown_chunks_num + i; - png_unknown_chunkp from = unknowns + i; - - png_strcpy((png_charp)to->name, (png_charp)from->name); - to->data = (png_bytep)png_malloc(png_ptr, from->size); - if (to->data == NULL) - png_warning(png_ptr, "Out of memory while processing unknown chunk."); - else - { - png_memcpy(to->data, from->data, from->size); - to->size = from->size; - - /* note our location in the read or write sequence */ - to->location = (png_byte)(png_ptr->mode & 0xff); - } - } - - info_ptr->unknown_chunks = np; - info_ptr->unknown_chunks_num += num_unknowns; -#ifdef PNG_FREE_ME_SUPPORTED - info_ptr->free_me |= PNG_FREE_UNKN; -#endif -} -void PNGAPI -png_set_unknown_chunk_location(png_structp png_ptr, png_infop info_ptr, - int chunk, int location) -{ - if(png_ptr != NULL && info_ptr != NULL && chunk >= 0 && chunk < - (int)info_ptr->unknown_chunks_num) - info_ptr->unknown_chunks[chunk].location = (png_byte)location; -} -#endif - -#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ - defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) -void PNGAPI -png_permit_empty_plte (png_structp png_ptr, int empty_plte_permitted) -{ - /* This function is deprecated in favor of png_permit_mng_features() - and will be removed from libpng-2.0.0 */ - png_debug(1, "in png_permit_empty_plte, DEPRECATED.\n"); - if (png_ptr == NULL) - return; - png_ptr->mng_features_permitted = (png_byte) - ((png_ptr->mng_features_permitted & (~(PNG_FLAG_MNG_EMPTY_PLTE))) | - ((empty_plte_permitted & PNG_FLAG_MNG_EMPTY_PLTE))); -} -#endif - -#if defined(PNG_MNG_FEATURES_SUPPORTED) -png_uint_32 PNGAPI -png_permit_mng_features (png_structp png_ptr, png_uint_32 mng_features) -{ - png_debug(1, "in png_permit_mng_features\n"); - if (png_ptr == NULL) - return (png_uint_32)0; - png_ptr->mng_features_permitted = - (png_byte)(mng_features & PNG_ALL_MNG_FEATURES); - return (png_uint_32)png_ptr->mng_features_permitted; -} -#endif - -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) -void PNGAPI -png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep - chunk_list, int num_chunks) -{ - png_bytep new_list, p; - int i, old_num_chunks; - if (num_chunks == 0) - { - if(keep == HANDLE_CHUNK_ALWAYS || keep == HANDLE_CHUNK_IF_SAFE) - png_ptr->flags |= PNG_FLAG_KEEP_UNKNOWN_CHUNKS; - else - png_ptr->flags &= ~PNG_FLAG_KEEP_UNKNOWN_CHUNKS; - - if(keep == HANDLE_CHUNK_ALWAYS) - png_ptr->flags |= PNG_FLAG_KEEP_UNSAFE_CHUNKS; - else - png_ptr->flags &= ~PNG_FLAG_KEEP_UNSAFE_CHUNKS; - return; - } - if (chunk_list == NULL) - return; - old_num_chunks=png_ptr->num_chunk_list; - new_list=(png_bytep)png_malloc(png_ptr, - (png_uint_32)(5*(num_chunks+old_num_chunks))); - if(png_ptr->chunk_list != NULL) - { - png_memcpy(new_list, png_ptr->chunk_list, - (png_size_t)(5*old_num_chunks)); - png_free(png_ptr, png_ptr->chunk_list); - png_ptr->chunk_list=NULL; - } - png_memcpy(new_list+5*old_num_chunks, chunk_list, - (png_size_t)(5*num_chunks)); - for (p=new_list+5*old_num_chunks+4, i=0; inum_chunk_list=old_num_chunks+num_chunks; - png_ptr->chunk_list=new_list; -#ifdef PNG_FREE_ME_SUPPORTED - png_ptr->free_me |= PNG_FREE_LIST; -#endif -} -#endif - -#if defined(PNG_READ_USER_CHUNKS_SUPPORTED) -void PNGAPI -png_set_read_user_chunk_fn(png_structp png_ptr, png_voidp user_chunk_ptr, - png_user_chunk_ptr read_user_chunk_fn) -{ - png_debug(1, "in png_set_read_user_chunk_fn\n"); - png_ptr->read_user_chunk_fn = read_user_chunk_fn; - png_ptr->user_chunk_ptr = user_chunk_ptr; -} -#endif - -#if defined(PNG_INFO_IMAGE_SUPPORTED) -void PNGAPI -png_set_rows(png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers) -{ - png_debug1(1, "in %s storage function\n", "rows"); - - if (png_ptr == NULL || info_ptr == NULL) - return; - - if(info_ptr->row_pointers && (info_ptr->row_pointers != row_pointers)) - png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0); - info_ptr->row_pointers = row_pointers; - if(row_pointers) - info_ptr->valid |= PNG_INFO_IDAT; -} -#endif - -void PNGAPI -png_set_compression_buffer_size(png_structp png_ptr, png_uint_32 size) -{ - if(png_ptr->zbuf) - png_free(png_ptr, png_ptr->zbuf); - png_ptr->zbuf_size = (png_size_t)size; - png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, size); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; -} - -void PNGAPI -png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask) -{ - if (png_ptr && info_ptr) - info_ptr->valid &= ~(mask); -} - - -#ifndef PNG_1_0_X -#ifdef PNG_ASSEMBLER_CODE_SUPPORTED -/* this function was added to libpng 1.2.0 and should always exist by default */ -void PNGAPI -png_set_asm_flags (png_structp png_ptr, png_uint_32 asm_flags) -{ - png_uint_32 settable_asm_flags; - png_uint_32 settable_mmx_flags; - - settable_mmx_flags = -#ifdef PNG_HAVE_ASSEMBLER_COMBINE_ROW - PNG_ASM_FLAG_MMX_READ_COMBINE_ROW | -#endif -#ifdef PNG_HAVE_ASSEMBLER_READ_INTERLACE - PNG_ASM_FLAG_MMX_READ_INTERLACE | -#endif -#ifdef PNG_HAVE_ASSEMBLER_READ_FILTER_ROW - PNG_ASM_FLAG_MMX_READ_FILTER_SUB | - PNG_ASM_FLAG_MMX_READ_FILTER_UP | - PNG_ASM_FLAG_MMX_READ_FILTER_AVG | - PNG_ASM_FLAG_MMX_READ_FILTER_PAETH | -#endif - 0; - - /* could be some non-MMX ones in the future, but not currently: */ - settable_asm_flags = settable_mmx_flags; - - if (!(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_COMPILED) || - !(png_ptr->asm_flags & PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU)) - { - /* clear all MMX flags if MMX isn't supported */ - settable_asm_flags &= ~settable_mmx_flags; - png_ptr->asm_flags &= ~settable_mmx_flags; - } - - /* we're replacing the settable bits with those passed in by the user, - * so first zero them out of the master copy, then logical-OR in the - * allowed subset that was requested */ - - png_ptr->asm_flags &= ~settable_asm_flags; /* zero them */ - png_ptr->asm_flags |= (asm_flags & settable_asm_flags); /* set them */ -} -#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */ - -#ifdef PNG_ASSEMBLER_CODE_SUPPORTED -/* this function was added to libpng 1.2.0 */ -void PNGAPI -png_set_mmx_thresholds (png_structp png_ptr, - png_byte mmx_bitdepth_threshold, - png_uint_32 mmx_rowbytes_threshold) -{ - png_ptr->mmx_bitdepth_threshold = mmx_bitdepth_threshold; - png_ptr->mmx_rowbytes_threshold = mmx_rowbytes_threshold; -} -#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */ -#endif /* ?PNG_1_0_X */ diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngtest.c b/gtkmm-osx/trunk/libpng-1.2.5/pngtest.c deleted file mode 100644 index cc8209e..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/pngtest.c +++ /dev/null @@ -1,1541 +0,0 @@ - -/* pngtest.c - a simple test program to test libpng - * - * libpng 1.2.5 - October 3, 2002 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2002 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) - * - * This program reads in a PNG image, writes it out again, and then - * compares the two files. If the files are identical, this shows that - * the basic chunk handling, filtering, and (de)compression code is working - * properly. It does not currently test all of the transforms, although - * it probably should. - * - * The program will report "FAIL" in certain legitimate cases: - * 1) when the compression level or filter selection method is changed. - * 2) when the maximum IDAT size (PNG_ZBUF_SIZE in pngconf.h) is not 8192. - * 3) unknown unsafe-to-copy ancillary chunks or unknown critical chunks - * exist in the input file. - * 4) others not listed here... - * In these cases, it is best to check with another tool such as "pngcheck" - * to see what the differences between the two files are. - * - * If a filename is given on the command-line, then this file is used - * for the input, rather than the default "pngtest.png". This allows - * testing a wide variety of files easily. You can also test a number - * of files at once by typing "pngtest -m file1.png file2.png ..." - */ - -#if defined(_WIN32_WCE) -# if _WIN32_WCE < 211 - __error__ (f|w)printf functions are not supported on old WindowsCE.; -# endif -# include -# include -# define READFILE(file, data, length, check) \ - if (ReadFile(file, data, length, &check,NULL)) check = 0 -# define WRITEFILE(file, data, length, check)) \ - if (WriteFile(file, data, length, &check, NULL)) check = 0 -# define FCLOSE(file) CloseHandle(file) -#else -# include -# include -# include -# define READFILE(file, data, length, check) \ - check=(png_size_t)fread(data,(png_size_t)1,length,file) -# define WRITEFILE(file, data, length, check) \ - check=(png_size_t)fwrite(data,(png_size_t)1, length, file) -# define FCLOSE(file) fclose(file) -#endif - -#if defined(PNG_NO_STDIO) -# if defined(_WIN32_WCE) - typedef HANDLE png_FILE_p; -# else - typedef FILE * png_FILE_p; -# endif -#endif - -/* Makes pngtest verbose so we can find problems (needs to be before png.h) */ -#ifndef PNG_DEBUG -# define PNG_DEBUG 0 -#endif - -#if !PNG_DEBUG -# define SINGLE_ROWBUF_ALLOC /* makes buffer overruns easier to nail */ -#endif - -/* Turn on CPU timing -#define PNGTEST_TIMING -*/ - -#ifdef PNG_NO_FLOATING_POINT_SUPPORTED -#undef PNGTEST_TIMING -#endif - -#ifdef PNGTEST_TIMING -static float t_start, t_stop, t_decode, t_encode, t_misc; -#include -#endif - -#include "png.h" - -/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */ -#ifndef png_jmpbuf -# define png_jmpbuf(png_ptr) png_ptr->jmpbuf -#endif - -#ifdef PNGTEST_TIMING -static float t_start, t_stop, t_decode, t_encode, t_misc; -#if !defined(PNG_tIME_SUPPORTED) -#include -#endif -#endif - -#if defined(PNG_TIME_RFC1123_SUPPORTED) -static int tIME_chunk_present=0; -static char tIME_string[30] = "no tIME chunk present in file"; -#endif - -static int verbose = 0; - -int test_one_file PNGARG((PNG_CONST char *inname, PNG_CONST char *outname)); - -#ifdef __TURBOC__ -#include -#endif - -/* defined so I can write to a file on gui/windowing platforms */ -/* #define STDERR stderr */ -#define STDERR stdout /* for DOS */ - -/* example of using row callbacks to make a simple progress meter */ -static int status_pass=1; -static int status_dots_requested=0; -static int status_dots=1; - -void -#ifdef PNG_1_0_X -PNGAPI -#endif -read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass); -void -#ifdef PNG_1_0_X -PNGAPI -#endif -read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) -{ - if(png_ptr == NULL || row_number > PNG_MAX_UINT) return; - if(status_pass != pass) - { - fprintf(stdout,"\n Pass %d: ",pass); - status_pass = pass; - status_dots = 31; - } - status_dots--; - if(status_dots == 0) - { - fprintf(stdout, "\n "); - status_dots=30; - } - fprintf(stdout, "r"); -} - -void -#ifdef PNG_1_0_X -PNGAPI -#endif -write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass); -void -#ifdef PNG_1_0_X -PNGAPI -#endif -write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass) -{ - if(png_ptr == NULL || row_number > PNG_MAX_UINT || pass > 7) return; - fprintf(stdout, "w"); -} - - -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) -/* Example of using user transform callback (we don't transform anything, - but merely examine the row filters. We set this to 256 rather than - 5 in case illegal filter values are present.) */ -static png_uint_32 filters_used[256]; -void -#ifdef PNG_1_0_X -PNGAPI -#endif -count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data); -void -#ifdef PNG_1_0_X -PNGAPI -#endif -count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data) -{ - if(png_ptr != NULL && row_info != NULL) - ++filters_used[*(data-1)]; -} -#endif - -#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) -/* example of using user transform callback (we don't transform anything, - but merely count the zero samples) */ - -static png_uint_32 zero_samples; - -void -#ifdef PNG_1_0_X -PNGAPI -#endif -count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data); -void -#ifdef PNG_1_0_X -PNGAPI -#endif -count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data) -{ - png_bytep dp = data; - if(png_ptr == NULL)return; - - /* contents of row_info: - * png_uint_32 width width of row - * png_uint_32 rowbytes number of bytes in row - * png_byte color_type color type of pixels - * png_byte bit_depth bit depth of samples - * png_byte channels number of channels (1-4) - * png_byte pixel_depth bits per pixel (depth*channels) - */ - - - /* counts the number of zero samples (or zero pixels if color_type is 3 */ - - if(row_info->color_type == 0 || row_info->color_type == 3) - { - int pos=0; - png_uint_32 n, nstop; - for (n=0, nstop=row_info->width; nbit_depth == 1) - { - if(((*dp << pos++ ) & 0x80) == 0) zero_samples++; - if(pos == 8) - { - pos = 0; - dp++; - } - } - if(row_info->bit_depth == 2) - { - if(((*dp << (pos+=2)) & 0xc0) == 0) zero_samples++; - if(pos == 8) - { - pos = 0; - dp++; - } - } - if(row_info->bit_depth == 4) - { - if(((*dp << (pos+=4)) & 0xf0) == 0) zero_samples++; - if(pos == 8) - { - pos = 0; - dp++; - } - } - if(row_info->bit_depth == 8) - if(*dp++ == 0) zero_samples++; - if(row_info->bit_depth == 16) - { - if((*dp | *(dp+1)) == 0) zero_samples++; - dp+=2; - } - } - } - else /* other color types */ - { - png_uint_32 n, nstop; - int channel; - int color_channels = row_info->channels; - if(row_info->color_type > 3)color_channels--; - - for (n=0, nstop=row_info->width; nbit_depth == 8) - if(*dp++ == 0) zero_samples++; - if(row_info->bit_depth == 16) - { - if((*dp | *(dp+1)) == 0) zero_samples++; - dp+=2; - } - } - if(row_info->color_type > 3) - { - dp++; - if(row_info->bit_depth == 16)dp++; - } - } - } -} -#endif /* PNG_WRITE_USER_TRANSFORM_SUPPORTED */ - -static int wrote_question = 0; - -#if defined(PNG_NO_STDIO) -/* START of code to validate stdio-free compilation */ -/* These copies of the default read/write functions come from pngrio.c and */ -/* pngwio.c. They allow "don't include stdio" testing of the library. */ -/* This is the function that does the actual reading of data. If you are - not reading from a standard C stream, you should create a replacement - read_data function and use it at run time with png_set_read_fn(), rather - than changing the library. */ - -#ifndef USE_FAR_KEYWORD -static void -pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_size_t check; - - /* fread() returns 0 on error, so it is OK to store this in a png_size_t - * instead of an int, which is what fread() actually returns. - */ - READFILE((png_FILE_p)png_ptr->io_ptr, data, length, check); - - if (check != length) - { - png_error(png_ptr, "Read Error!"); - } -} -#else -/* this is the model-independent version. Since the standard I/O library - can't handle far buffers in the medium and small models, we have to copy - the data. -*/ - -#define NEAR_BUF_SIZE 1024 -#define MIN(a,b) (a <= b ? a : b) - -static void -pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - int check; - png_byte *n_data; - png_FILE_p io_ptr; - - /* Check if data really is near. If so, use usual code. */ - n_data = (png_byte *)CVT_PTR_NOCHECK(data); - io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); - if ((png_bytep)n_data == data) - { - READFILE(io_ptr, n_data, length, check); - } - else - { - png_byte buf[NEAR_BUF_SIZE]; - png_size_t read, remaining, err; - check = 0; - remaining = length; - do - { - read = MIN(NEAR_BUF_SIZE, remaining); - READFILE(io_ptr, buf, 1, err); - png_memcpy(data, buf, read); /* copy far buffer to near buffer */ - if(err != read) - break; - else - check += err; - data += read; - remaining -= read; - } - while (remaining != 0); - } - if (check != length) - { - png_error(png_ptr, "read Error"); - } -} -#endif /* USE_FAR_KEYWORD */ - -#if defined(PNG_WRITE_FLUSH_SUPPORTED) -static void -pngtest_flush(png_structp png_ptr) -{ -#if !defined(_WIN32_WCE) - png_FILE_p io_ptr; - io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr)); - if (io_ptr != NULL) - fflush(io_ptr); -#endif -} -#endif - -/* This is the function that does the actual writing of data. If you are - not writing to a standard C stream, you should create a replacement - write_data function and use it at run time with png_set_write_fn(), rather - than changing the library. */ -#ifndef USE_FAR_KEYWORD -static void -pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_uint_32 check; - - WRITEFILE((png_FILE_p)png_ptr->io_ptr, data, length, check); - if (check != length) - { - png_error(png_ptr, "Write Error"); - } -} -#else -/* this is the model-independent version. Since the standard I/O library - can't handle far buffers in the medium and small models, we have to copy - the data. -*/ - -#define NEAR_BUF_SIZE 1024 -#define MIN(a,b) (a <= b ? a : b) - -static void -pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_uint_32 check; - png_byte *near_data; /* Needs to be "png_byte *" instead of "png_bytep" */ - png_FILE_p io_ptr; - - /* Check if data really is near. If so, use usual code. */ - near_data = (png_byte *)CVT_PTR_NOCHECK(data); - io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); - if ((png_bytep)near_data == data) - { - WRITEFILE(io_ptr, near_data, length, check); - } - else - { - png_byte buf[NEAR_BUF_SIZE]; - png_size_t written, remaining, err; - check = 0; - remaining = length; - do - { - written = MIN(NEAR_BUF_SIZE, remaining); - png_memcpy(buf, data, written); /* copy far buffer to near buffer */ - WRITEFILE(io_ptr, buf, written, err); - if (err != written) - break; - else - check += err; - data += written; - remaining -= written; - } - while (remaining != 0); - } - if (check != length) - { - png_error(png_ptr, "Write Error"); - } -} - -#endif /* USE_FAR_KEYWORD */ - -/* This function is called when there is a warning, but the library thinks - * it can continue anyway. Replacement functions don't have to do anything - * here if you don't want to. In the default configuration, png_ptr is - * not used, but it is passed in case it may be useful. - */ -static void -pngtest_warning(png_structp png_ptr, png_const_charp message) -{ - PNG_CONST char *name = "UNKNOWN (ERROR!)"; - if (png_ptr != NULL && png_ptr->error_ptr != NULL) - name = png_ptr->error_ptr; - fprintf(STDERR, "%s: libpng warning: %s\n", name, message); -} - -/* This is the default error handling function. Note that replacements for - * this function MUST NOT RETURN, or the program will likely crash. This - * function is used by default, or if the program supplies NULL for the - * error function pointer in png_set_error_fn(). - */ -static void -pngtest_error(png_structp png_ptr, png_const_charp message) -{ - pngtest_warning(png_ptr, message); - /* We can return because png_error calls the default handler, which is - * actually OK in this case. */ -} -#endif /* PNG_NO_STDIO */ -/* END of code to validate stdio-free compilation */ - -/* START of code to validate memory allocation and deallocation */ -#ifdef PNG_USER_MEM_SUPPORTED - -/* Allocate memory. For reasonable files, size should never exceed - 64K. However, zlib may allocate more then 64K if you don't tell - it not to. See zconf.h and png.h for more information. zlib does - need to allocate exactly 64K, so whatever you call here must - have the ability to do that. - - This piece of code can be compiled to validate max 64K allocations - by setting MAXSEG_64K in zlib zconf.h *or* PNG_MAX_MALLOC_64K. */ -typedef struct memory_information -{ - png_uint_32 size; - png_voidp pointer; - struct memory_information FAR *next; -} memory_information; -typedef memory_information FAR *memory_infop; - -static memory_infop pinformation = NULL; -static int current_allocation = 0; -static int maximum_allocation = 0; -static int total_allocation = 0; -static int num_allocations = 0; - -png_voidp png_debug_malloc PNGARG((png_structp png_ptr, png_uint_32 size)); -void png_debug_free PNGARG((png_structp png_ptr, png_voidp ptr)); - -png_voidp -png_debug_malloc(png_structp png_ptr, png_uint_32 size) -{ - - /* png_malloc has already tested for NULL; png_create_struct calls - png_debug_malloc directly, with png_ptr == NULL which is OK */ - - if (size == 0) - return (NULL); - - /* This calls the library allocator twice, once to get the requested - buffer and once to get a new free list entry. */ - { - memory_infop pinfo = (memory_infop)png_malloc_default(png_ptr, - (png_uint_32)sizeof *pinfo); - pinfo->size = size; - current_allocation += size; - total_allocation += size; - num_allocations ++; - if (current_allocation > maximum_allocation) - maximum_allocation = current_allocation; - pinfo->pointer = (png_voidp)png_malloc_default(png_ptr, size); - pinfo->next = pinformation; - pinformation = pinfo; - /* Make sure the caller isn't assuming zeroed memory. */ - png_memset(pinfo->pointer, 0xdd, pinfo->size); -#if PNG_DEBUG - if(verbose) - printf("png_malloc %lu bytes at %x\n",size,pinfo->pointer); -#endif - assert(pinfo->size != 12345678); - return (png_voidp)(pinfo->pointer); - } -} - -/* Free a pointer. It is removed from the list at the same time. */ -void -png_debug_free(png_structp png_ptr, png_voidp ptr) -{ - if (png_ptr == NULL) - fprintf(STDERR, "NULL pointer to png_debug_free.\n"); - if (ptr == 0) - { -#if 0 /* This happens all the time. */ - fprintf(STDERR, "WARNING: freeing NULL pointer\n"); -#endif - return; - } - - /* Unlink the element from the list. */ - { - memory_infop FAR *ppinfo = &pinformation; - for (;;) - { - memory_infop pinfo = *ppinfo; - if (pinfo->pointer == ptr) - { - *ppinfo = pinfo->next; - current_allocation -= pinfo->size; - if (current_allocation < 0) - fprintf(STDERR, "Duplicate free of memory\n"); - /* We must free the list element too, but first kill - the memory that is to be freed. */ - png_memset(ptr, 0x55, pinfo->size); - png_free_default(png_ptr, pinfo); - pinfo=NULL; - break; - } - if (pinfo->next == NULL) - { - fprintf(STDERR, "Pointer %x not found\n", (unsigned int)ptr); - break; - } - ppinfo = &pinfo->next; - } - } - - /* Finally free the data. */ -#if PNG_DEBUG - if(verbose) - printf("Freeing %x\n",ptr); -#endif - png_free_default(png_ptr, ptr); - ptr=NULL; -} -#endif /* PNG_USER_MEM_SUPPORTED */ -/* END of code to test memory allocation/deallocation */ - -/* Test one file */ -int -test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) -{ - static png_FILE_p fpin; - static png_FILE_p fpout; /* "static" prevents setjmp corruption */ - png_structp read_ptr; - png_infop read_info_ptr, end_info_ptr; -#ifdef PNG_WRITE_SUPPORTED - png_structp write_ptr; - png_infop write_info_ptr; - png_infop write_end_info_ptr; -#else - png_structp write_ptr = NULL; - png_infop write_info_ptr = NULL; - png_infop write_end_info_ptr = NULL; -#endif - png_bytep row_buf; - png_uint_32 y; - png_uint_32 width, height; - int num_pass, pass; - int bit_depth, color_type; -#ifdef PNG_SETJMP_SUPPORTED -#ifdef USE_FAR_KEYWORD - jmp_buf jmpbuf; -#endif -#endif - -#if defined(_WIN32_WCE) - TCHAR path[MAX_PATH]; -#endif - char inbuf[256], outbuf[256]; - - row_buf = NULL; - -#if defined(_WIN32_WCE) - MultiByteToWideChar(CP_ACP, 0, inname, -1, path, MAX_PATH); - if ((fpin = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE) -#else - if ((fpin = fopen(inname, "rb")) == NULL) -#endif - { - fprintf(STDERR, "Could not find input file %s\n", inname); - return (1); - } - -#if defined(_WIN32_WCE) - MultiByteToWideChar(CP_ACP, 0, outname, -1, path, MAX_PATH); - if ((fpout = CreateFile(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL)) == INVALID_HANDLE_VALUE) -#else - if ((fpout = fopen(outname, "wb")) == NULL) -#endif - { - fprintf(STDERR, "Could not open output file %s\n", outname); - FCLOSE(fpin); - return (1); - } - - png_debug(0, "Allocating read and write structures\n"); -#ifdef PNG_USER_MEM_SUPPORTED - read_ptr = png_create_read_struct_2(PNG_LIBPNG_VER_STRING, png_voidp_NULL, - png_error_ptr_NULL, png_error_ptr_NULL, png_voidp_NULL, - (png_malloc_ptr)png_debug_malloc, (png_free_ptr)png_debug_free); -#else - read_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, png_voidp_NULL, - png_error_ptr_NULL, png_error_ptr_NULL); -#endif -#if defined(PNG_NO_STDIO) - png_set_error_fn(read_ptr, (png_voidp)inname, pngtest_error, - pngtest_warning); -#endif -#ifdef PNG_WRITE_SUPPORTED -#ifdef PNG_USER_MEM_SUPPORTED - write_ptr = png_create_write_struct_2(PNG_LIBPNG_VER_STRING, png_voidp_NULL, - png_error_ptr_NULL, png_error_ptr_NULL, png_voidp_NULL, - (png_malloc_ptr)png_debug_malloc, (png_free_ptr)png_debug_free); -#else - write_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, png_voidp_NULL, - png_error_ptr_NULL, png_error_ptr_NULL); -#endif -#if defined(PNG_NO_STDIO) - png_set_error_fn(write_ptr, (png_voidp)inname, pngtest_error, - pngtest_warning); -#endif -#endif - png_debug(0, "Allocating read_info, write_info and end_info structures\n"); - read_info_ptr = png_create_info_struct(read_ptr); - end_info_ptr = png_create_info_struct(read_ptr); -#ifdef PNG_WRITE_SUPPORTED - write_info_ptr = png_create_info_struct(write_ptr); - write_end_info_ptr = png_create_info_struct(write_ptr); -#endif - -#ifdef PNG_SETJMP_SUPPORTED - png_debug(0, "Setting jmpbuf for read struct\n"); -#ifdef USE_FAR_KEYWORD - if (setjmp(jmpbuf)) -#else - if (setjmp(png_jmpbuf(read_ptr))) -#endif - { - fprintf(STDERR, "%s -> %s: libpng read error\n", inname, outname); - if (row_buf) - png_free(read_ptr, row_buf); - png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr); -#ifdef PNG_WRITE_SUPPORTED - png_destroy_info_struct(write_ptr, &write_end_info_ptr); - png_destroy_write_struct(&write_ptr, &write_info_ptr); -#endif - FCLOSE(fpin); - FCLOSE(fpout); - return (1); - } -#ifdef USE_FAR_KEYWORD - png_memcpy(png_jmpbuf(read_ptr),jmpbuf,sizeof(jmp_buf)); -#endif - -#ifdef PNG_WRITE_SUPPORTED - png_debug(0, "Setting jmpbuf for write struct\n"); -#ifdef USE_FAR_KEYWORD - if (setjmp(jmpbuf)) -#else - if (setjmp(png_jmpbuf(write_ptr))) -#endif - { - fprintf(STDERR, "%s -> %s: libpng write error\n", inname, outname); - png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr); - png_destroy_info_struct(write_ptr, &write_end_info_ptr); -#ifdef PNG_WRITE_SUPPORTED - png_destroy_write_struct(&write_ptr, &write_info_ptr); -#endif - FCLOSE(fpin); - FCLOSE(fpout); - return (1); - } -#ifdef USE_FAR_KEYWORD - png_memcpy(png_jmpbuf(write_ptr),jmpbuf,sizeof(jmp_buf)); -#endif -#endif -#endif - - png_debug(0, "Initializing input and output streams\n"); -#if !defined(PNG_NO_STDIO) - png_init_io(read_ptr, fpin); -# ifdef PNG_WRITE_SUPPORTED - png_init_io(write_ptr, fpout); -# endif -#else - png_set_read_fn(read_ptr, (png_voidp)fpin, pngtest_read_data); -# ifdef PNG_WRITE_SUPPORTED - png_set_write_fn(write_ptr, (png_voidp)fpout, pngtest_write_data, -# if defined(PNG_WRITE_FLUSH_SUPPORTED) - pngtest_flush); -# else - NULL); -# endif -# endif -#endif - if(status_dots_requested == 1) - { -#ifdef PNG_WRITE_SUPPORTED - png_set_write_status_fn(write_ptr, write_row_callback); -#endif - png_set_read_status_fn(read_ptr, read_row_callback); - } - else - { -#ifdef PNG_WRITE_SUPPORTED - png_set_write_status_fn(write_ptr, png_write_status_ptr_NULL); -#endif - png_set_read_status_fn(read_ptr, png_read_status_ptr_NULL); - } - -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) - { - int i; - for(i=0; i<256; i++) - filters_used[i]=0; - png_set_read_user_transform_fn(read_ptr, count_filters); - } -#endif -#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) - zero_samples=0; - png_set_write_user_transform_fn(write_ptr, count_zero_samples); -#endif - -#define HANDLE_CHUNK_IF_SAFE 2 -#define HANDLE_CHUNK_ALWAYS 3 -#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) - png_set_keep_unknown_chunks(read_ptr, HANDLE_CHUNK_ALWAYS, - png_bytep_NULL, 0); -#endif -#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) - png_set_keep_unknown_chunks(write_ptr, HANDLE_CHUNK_IF_SAFE, - png_bytep_NULL, 0); -#endif - - png_debug(0, "Reading info struct\n"); - png_read_info(read_ptr, read_info_ptr); - - png_debug(0, "Transferring info struct\n"); - { - int interlace_type, compression_type, filter_type; - - if (png_get_IHDR(read_ptr, read_info_ptr, &width, &height, &bit_depth, - &color_type, &interlace_type, &compression_type, &filter_type)) - { - png_set_IHDR(write_ptr, write_info_ptr, width, height, bit_depth, -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) - color_type, interlace_type, compression_type, filter_type); -#else - color_type, PNG_INTERLACE_NONE, compression_type, filter_type); -#endif - } - } -#if defined(PNG_FIXED_POINT_SUPPORTED) -#if defined(PNG_cHRM_SUPPORTED) - { - png_fixed_point white_x, white_y, red_x, red_y, green_x, green_y, blue_x, - blue_y; - if (png_get_cHRM_fixed(read_ptr, read_info_ptr, &white_x, &white_y, &red_x, - &red_y, &green_x, &green_y, &blue_x, &blue_y)) - { - png_set_cHRM_fixed(write_ptr, write_info_ptr, white_x, white_y, red_x, - red_y, green_x, green_y, blue_x, blue_y); - } - } -#endif -#if defined(PNG_gAMA_SUPPORTED) - { - png_fixed_point gamma; - - if (png_get_gAMA_fixed(read_ptr, read_info_ptr, &gamma)) - { - png_set_gAMA_fixed(write_ptr, write_info_ptr, gamma); - } - } -#endif -#else /* Use floating point versions */ -#if defined(PNG_FLOATING_POINT_SUPPORTED) -#if defined(PNG_cHRM_SUPPORTED) - { - double white_x, white_y, red_x, red_y, green_x, green_y, blue_x, - blue_y; - if (png_get_cHRM(read_ptr, read_info_ptr, &white_x, &white_y, &red_x, - &red_y, &green_x, &green_y, &blue_x, &blue_y)) - { - png_set_cHRM(write_ptr, write_info_ptr, white_x, white_y, red_x, - red_y, green_x, green_y, blue_x, blue_y); - } - } -#endif -#if defined(PNG_gAMA_SUPPORTED) - { - double gamma; - - if (png_get_gAMA(read_ptr, read_info_ptr, &gamma)) - { - png_set_gAMA(write_ptr, write_info_ptr, gamma); - } - } -#endif -#endif /* floating point */ -#endif /* fixed point */ -#if defined(PNG_iCCP_SUPPORTED) - { - png_charp name; - png_charp profile; - png_uint_32 proflen; - int compression_type; - - if (png_get_iCCP(read_ptr, read_info_ptr, &name, &compression_type, - &profile, &proflen)) - { - png_set_iCCP(write_ptr, write_info_ptr, name, compression_type, - profile, proflen); - } - } -#endif -#if defined(PNG_sRGB_SUPPORTED) - { - int intent; - - if (png_get_sRGB(read_ptr, read_info_ptr, &intent)) - { - png_set_sRGB(write_ptr, write_info_ptr, intent); - } - } -#endif - { - png_colorp palette; - int num_palette; - - if (png_get_PLTE(read_ptr, read_info_ptr, &palette, &num_palette)) - { - png_set_PLTE(write_ptr, write_info_ptr, palette, num_palette); - } - } -#if defined(PNG_bKGD_SUPPORTED) - { - png_color_16p background; - - if (png_get_bKGD(read_ptr, read_info_ptr, &background)) - { - png_set_bKGD(write_ptr, write_info_ptr, background); - } - } -#endif -#if defined(PNG_hIST_SUPPORTED) - { - png_uint_16p hist; - - if (png_get_hIST(read_ptr, read_info_ptr, &hist)) - { - png_set_hIST(write_ptr, write_info_ptr, hist); - } - } -#endif -#if defined(PNG_oFFs_SUPPORTED) - { - png_int_32 offset_x, offset_y; - int unit_type; - - if (png_get_oFFs(read_ptr, read_info_ptr,&offset_x,&offset_y,&unit_type)) - { - png_set_oFFs(write_ptr, write_info_ptr, offset_x, offset_y, unit_type); - } - } -#endif -#if defined(PNG_pCAL_SUPPORTED) - { - png_charp purpose, units; - png_charpp params; - png_int_32 X0, X1; - int type, nparams; - - if (png_get_pCAL(read_ptr, read_info_ptr, &purpose, &X0, &X1, &type, - &nparams, &units, ¶ms)) - { - png_set_pCAL(write_ptr, write_info_ptr, purpose, X0, X1, type, - nparams, units, params); - } - } -#endif -#if defined(PNG_pHYs_SUPPORTED) - { - png_uint_32 res_x, res_y; - int unit_type; - - if (png_get_pHYs(read_ptr, read_info_ptr, &res_x, &res_y, &unit_type)) - { - png_set_pHYs(write_ptr, write_info_ptr, res_x, res_y, unit_type); - } - } -#endif -#if defined(PNG_sBIT_SUPPORTED) - { - png_color_8p sig_bit; - - if (png_get_sBIT(read_ptr, read_info_ptr, &sig_bit)) - { - png_set_sBIT(write_ptr, write_info_ptr, sig_bit); - } - } -#endif -#if defined(PNG_sCAL_SUPPORTED) -#ifdef PNG_FLOATING_POINT_SUPPORTED - { - int unit; - double scal_width, scal_height; - - if (png_get_sCAL(read_ptr, read_info_ptr, &unit, &scal_width, - &scal_height)) - { - png_set_sCAL(write_ptr, write_info_ptr, unit, scal_width, scal_height); - } - } -#else -#ifdef PNG_FIXED_POINT_SUPPORTED - { - int unit; - png_charp scal_width, scal_height; - - if (png_get_sCAL_s(read_ptr, read_info_ptr, &unit, &scal_width, - &scal_height)) - { - png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width, scal_height); - } - } -#endif -#endif -#endif -#if defined(PNG_TEXT_SUPPORTED) - { - png_textp text_ptr; - int num_text; - - if (png_get_text(read_ptr, read_info_ptr, &text_ptr, &num_text) > 0) - { - png_debug1(0, "Handling %d iTXt/tEXt/zTXt chunks\n", num_text); - png_set_text(write_ptr, write_info_ptr, text_ptr, num_text); - } - } -#endif -#if defined(PNG_tIME_SUPPORTED) - { - png_timep mod_time; - - if (png_get_tIME(read_ptr, read_info_ptr, &mod_time)) - { - png_set_tIME(write_ptr, write_info_ptr, mod_time); -#if defined(PNG_TIME_RFC1123_SUPPORTED) - /* we have to use png_strcpy instead of "=" because the string - pointed to by png_convert_to_rfc1123() gets free'ed before - we use it */ - png_strcpy(tIME_string,png_convert_to_rfc1123(read_ptr, mod_time)); - tIME_chunk_present++; -#endif /* PNG_TIME_RFC1123_SUPPORTED */ - } - } -#endif -#if defined(PNG_tRNS_SUPPORTED) - { - png_bytep trans; - int num_trans; - png_color_16p trans_values; - - if (png_get_tRNS(read_ptr, read_info_ptr, &trans, &num_trans, - &trans_values)) - { - png_set_tRNS(write_ptr, write_info_ptr, trans, num_trans, - trans_values); - } - } -#endif -#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) - { - png_unknown_chunkp unknowns; - int num_unknowns = (int)png_get_unknown_chunks(read_ptr, read_info_ptr, - &unknowns); - if (num_unknowns) - { - png_size_t i; - png_set_unknown_chunks(write_ptr, write_info_ptr, unknowns, - num_unknowns); - /* copy the locations from the read_info_ptr. The automatically - generated locations in write_info_ptr are wrong because we - haven't written anything yet */ - for (i = 0; i < (png_size_t)num_unknowns; i++) - png_set_unknown_chunk_location(write_ptr, write_info_ptr, i, - unknowns[i].location); - } - } -#endif - -#ifdef PNG_WRITE_SUPPORTED - png_debug(0, "\nWriting info struct\n"); - -/* If we wanted, we could write info in two steps: - png_write_info_before_PLTE(write_ptr, write_info_ptr); - */ - png_write_info(write_ptr, write_info_ptr); -#endif - -#ifdef SINGLE_ROWBUF_ALLOC - png_debug(0, "\nAllocating row buffer..."); - row_buf = (png_bytep)png_malloc(read_ptr, - png_get_rowbytes(read_ptr, read_info_ptr)); - png_debug1(0, "0x%08lx\n\n", (unsigned long)row_buf); -#endif /* SINGLE_ROWBUF_ALLOC */ - png_debug(0, "Writing row data\n"); - -#if defined(PNG_READ_INTERLACING_SUPPORTED) || \ - defined(PNG_WRITE_INTERLACING_SUPPORTED) - num_pass = png_set_interlace_handling(read_ptr); -# ifdef PNG_WRITE_SUPPORTED - png_set_interlace_handling(write_ptr); -# endif -#else - num_pass=1; -#endif - -#ifdef PNGTEST_TIMING - t_stop = (float)clock(); - t_misc += (t_stop - t_start); - t_start = t_stop; -#endif - for (pass = 0; pass < num_pass; pass++) - { - png_debug1(0, "Writing row data for pass %d\n",pass); - for (y = 0; y < height; y++) - { -#ifndef SINGLE_ROWBUF_ALLOC - png_debug2(0, "\nAllocating row buffer (pass %d, y = %ld)...", pass,y); - row_buf = (png_bytep)png_malloc(read_ptr, - png_get_rowbytes(read_ptr, read_info_ptr)); - png_debug2(0, "0x%08lx (%ld bytes)\n", (unsigned long)row_buf, - png_get_rowbytes(read_ptr, read_info_ptr)); -#endif /* !SINGLE_ROWBUF_ALLOC */ - png_read_rows(read_ptr, (png_bytepp)&row_buf, png_bytepp_NULL, 1); - -#ifdef PNG_WRITE_SUPPORTED -#ifdef PNGTEST_TIMING - t_stop = (float)clock(); - t_decode += (t_stop - t_start); - t_start = t_stop; -#endif - png_write_rows(write_ptr, (png_bytepp)&row_buf, 1); -#ifdef PNGTEST_TIMING - t_stop = (float)clock(); - t_encode += (t_stop - t_start); - t_start = t_stop; -#endif -#endif /* PNG_WRITE_SUPPORTED */ - -#ifndef SINGLE_ROWBUF_ALLOC - png_debug2(0, "Freeing row buffer (pass %d, y = %ld)\n\n", pass, y); - png_free(read_ptr, row_buf); -#endif /* !SINGLE_ROWBUF_ALLOC */ - } - } - -#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) - png_free_data(read_ptr, read_info_ptr, PNG_FREE_UNKN, -1); -#endif -#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) - png_free_data(write_ptr, write_info_ptr, PNG_FREE_UNKN, -1); -#endif - - png_debug(0, "Reading and writing end_info data\n"); - - png_read_end(read_ptr, end_info_ptr); -#if defined(PNG_TEXT_SUPPORTED) - { - png_textp text_ptr; - int num_text; - - if (png_get_text(read_ptr, end_info_ptr, &text_ptr, &num_text) > 0) - { - png_debug1(0, "Handling %d iTXt/tEXt/zTXt chunks\n", num_text); - png_set_text(write_ptr, write_end_info_ptr, text_ptr, num_text); - } - } -#endif -#if defined(PNG_tIME_SUPPORTED) - { - png_timep mod_time; - - if (png_get_tIME(read_ptr, end_info_ptr, &mod_time)) - { - png_set_tIME(write_ptr, write_end_info_ptr, mod_time); -#if defined(PNG_TIME_RFC1123_SUPPORTED) - /* we have to use png_strcpy instead of "=" because the string - pointed to by png_convert_to_rfc1123() gets free'ed before - we use it */ - png_strcpy(tIME_string,png_convert_to_rfc1123(read_ptr, mod_time)); - tIME_chunk_present++; -#endif /* PNG_TIME_RFC1123_SUPPORTED */ - } - } -#endif -#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) - { - png_unknown_chunkp unknowns; - int num_unknowns; - num_unknowns = (int)png_get_unknown_chunks(read_ptr, end_info_ptr, - &unknowns); - if (num_unknowns) - { - png_size_t i; - png_set_unknown_chunks(write_ptr, write_end_info_ptr, unknowns, - num_unknowns); - /* copy the locations from the read_info_ptr. The automatically - generated locations in write_end_info_ptr are wrong because we - haven't written the end_info yet */ - for (i = 0; i < (png_size_t)num_unknowns; i++) - png_set_unknown_chunk_location(write_ptr, write_end_info_ptr, i, - unknowns[i].location); - } - } -#endif -#ifdef PNG_WRITE_SUPPORTED - png_write_end(write_ptr, write_end_info_ptr); -#endif - -#ifdef PNG_EASY_ACCESS_SUPPORTED - if(verbose) - { - png_uint_32 iwidth, iheight; - iwidth = png_get_image_width(write_ptr, write_info_ptr); - iheight = png_get_image_height(write_ptr, write_info_ptr); - fprintf(STDERR, "Image width = %lu, height = %lu\n", - iwidth, iheight); - } -#endif - - png_debug(0, "Destroying data structs\n"); -#ifdef SINGLE_ROWBUF_ALLOC - png_debug(1, "destroying row_buf for read_ptr\n"); - png_free(read_ptr, row_buf); - row_buf=NULL; -#endif /* SINGLE_ROWBUF_ALLOC */ - png_debug(1, "destroying read_ptr, read_info_ptr, end_info_ptr\n"); - png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr); -#ifdef PNG_WRITE_SUPPORTED - png_debug(1, "destroying write_end_info_ptr\n"); - png_destroy_info_struct(write_ptr, &write_end_info_ptr); - png_debug(1, "destroying write_ptr, write_info_ptr\n"); - png_destroy_write_struct(&write_ptr, &write_info_ptr); -#endif - png_debug(0, "Destruction complete.\n"); - - FCLOSE(fpin); - FCLOSE(fpout); - - png_debug(0, "Opening files for comparison\n"); -#if defined(_WIN32_WCE) - MultiByteToWideChar(CP_ACP, 0, inname, -1, path, MAX_PATH); - if ((fpin = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE) -#else - if ((fpin = fopen(inname, "rb")) == NULL) -#endif - { - fprintf(STDERR, "Could not find file %s\n", inname); - return (1); - } - -#if defined(_WIN32_WCE) - MultiByteToWideChar(CP_ACP, 0, outname, -1, path, MAX_PATH); - if ((fpout = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE) -#else - if ((fpout = fopen(outname, "rb")) == NULL) -#endif - { - fprintf(STDERR, "Could not find file %s\n", outname); - FCLOSE(fpin); - return (1); - } - - for(;;) - { - png_size_t num_in, num_out; - - READFILE(fpin, inbuf, 1, num_in); - READFILE(fpout, outbuf, 1, num_out); - - if (num_in != num_out) - { - fprintf(STDERR, "\nFiles %s and %s are of a different size\n", - inname, outname); - if(wrote_question == 0) - { - fprintf(STDERR, - " Was %s written with the same maximum IDAT chunk size (%d bytes),", - inname,PNG_ZBUF_SIZE); - fprintf(STDERR, - "\n filtering heuristic (libpng default), compression"); - fprintf(STDERR, - " level (zlib default),\n and zlib version (%s)?\n\n", - ZLIB_VERSION); - wrote_question=1; - } - FCLOSE(fpin); - FCLOSE(fpout); - return (0); - } - - if (!num_in) - break; - - if (png_memcmp(inbuf, outbuf, num_in)) - { - fprintf(STDERR, "\nFiles %s and %s are different\n", inname, outname); - if(wrote_question == 0) - { - fprintf(STDERR, - " Was %s written with the same maximum IDAT chunk size (%d bytes),", - inname,PNG_ZBUF_SIZE); - fprintf(STDERR, - "\n filtering heuristic (libpng default), compression"); - fprintf(STDERR, - " level (zlib default),\n and zlib version (%s)?\n\n", - ZLIB_VERSION); - wrote_question=1; - } - FCLOSE(fpin); - FCLOSE(fpout); - return (0); - } - } - - FCLOSE(fpin); - FCLOSE(fpout); - - return (0); -} - -/* input and output filenames */ -#ifdef RISCOS -static PNG_CONST char *inname = "pngtest/png"; -static PNG_CONST char *outname = "pngout/png"; -#else -static PNG_CONST char *inname = "pngtest.png"; -static PNG_CONST char *outname = "pngout.png"; -#endif - -int -main(int argc, char *argv[]) -{ - int multiple = 0; - int ierror = 0; - - fprintf(STDERR, "Testing libpng version %s\n", PNG_LIBPNG_VER_STRING); - fprintf(STDERR, " with zlib version %s\n", ZLIB_VERSION); - fprintf(STDERR,"%s",png_get_copyright(NULL)); - /* Show the version of libpng used in building the library */ - fprintf(STDERR," library (%lu):%s", png_access_version_number(), - png_get_header_version(NULL)); - /* Show the version of libpng used in building the application */ - fprintf(STDERR," pngtest (%lu):%s", (unsigned long)PNG_LIBPNG_VER, - PNG_HEADER_VERSION_STRING); - fprintf(STDERR," sizeof(png_struct)=%ld, sizeof(png_info)=%ld\n", - (long)sizeof(png_struct), (long)sizeof(png_info)); - - /* Do some consistency checking on the memory allocation settings, I'm - not sure this matters, but it is nice to know, the first of these - tests should be impossible because of the way the macros are set - in pngconf.h */ -#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K) - fprintf(STDERR, " NOTE: Zlib compiled for max 64k, libpng not\n"); -#endif - /* I think the following can happen. */ -#if !defined(MAXSEG_64K) && defined(PNG_MAX_MALLOC_64K) - fprintf(STDERR, " NOTE: libpng compiled for max 64k, zlib not\n"); -#endif - - if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING)) - { - fprintf(STDERR, - "Warning: versions are different between png.h and png.c\n"); - fprintf(STDERR, " png.h version: %s\n", PNG_LIBPNG_VER_STRING); - fprintf(STDERR, " png.c version: %s\n\n", png_libpng_ver); - ++ierror; - } - - if (argc > 1) - { - if (strcmp(argv[1], "-m") == 0) - { - multiple = 1; - status_dots_requested = 0; - } - else if (strcmp(argv[1], "-mv") == 0 || - strcmp(argv[1], "-vm") == 0 ) - { - multiple = 1; - verbose = 1; - status_dots_requested = 1; - } - else if (strcmp(argv[1], "-v") == 0) - { - verbose = 1; - status_dots_requested = 1; - inname = argv[2]; - } - else - { - inname = argv[1]; - status_dots_requested = 0; - } - } - - if (!multiple && argc == 3+verbose) - outname = argv[2+verbose]; - - if ((!multiple && argc > 3+verbose) || (multiple && argc < 2)) - { - fprintf(STDERR, - "usage: %s [infile.png] [outfile.png]\n\t%s -m {infile.png}\n", - argv[0], argv[0]); - fprintf(STDERR, - " reads/writes one PNG file (without -m) or multiple files (-m)\n"); - fprintf(STDERR, - " with -m %s is used as a temporary file\n", outname); - exit(1); - } - - if (multiple) - { - int i; -#ifdef PNG_USER_MEM_SUPPORTED - int allocation_now = current_allocation; -#endif - for (i=2; isize, - (unsigned int) pinfo->pointer); - pinfo = pinfo->next; - } - } -#endif - } -#ifdef PNG_USER_MEM_SUPPORTED - fprintf(STDERR, " Current memory allocation: %10d bytes\n", - current_allocation); - fprintf(STDERR, " Maximum memory allocation: %10d bytes\n", - maximum_allocation); - fprintf(STDERR, " Total memory allocation: %10d bytes\n", - total_allocation); - fprintf(STDERR, " Number of allocations: %10d\n", - num_allocations); -#endif - } - else - { - int i; - for (i=0; i<3; ++i) - { - int kerror; -#ifdef PNG_USER_MEM_SUPPORTED - int allocation_now = current_allocation; -#endif - if (i == 1) status_dots_requested = 1; - else if(verbose == 0)status_dots_requested = 0; - if (i == 0 || verbose == 1 || ierror != 0) - fprintf(STDERR, "Testing %s:",inname); - kerror = test_one_file(inname, outname); - if(kerror == 0) - { - if(verbose == 1 || i == 2) - { -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) - int k; -#endif -#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) - fprintf(STDERR, "\n PASS (%lu zero samples)\n",zero_samples); -#else - fprintf(STDERR, " PASS\n"); -#endif -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) - for (k=0; k<256; k++) - if(filters_used[k]) - fprintf(STDERR, " Filter %d was used %lu times\n", - k,filters_used[k]); -#endif -#if defined(PNG_TIME_RFC1123_SUPPORTED) - if(tIME_chunk_present != 0) - fprintf(STDERR, " tIME = %s\n",tIME_string); -#endif /* PNG_TIME_RFC1123_SUPPORTED */ - } - } - else - { - if(verbose == 0 && i != 2) - fprintf(STDERR, "Testing %s:",inname); - fprintf(STDERR, " FAIL\n"); - ierror += kerror; - } -#ifdef PNG_USER_MEM_SUPPORTED - if (allocation_now != current_allocation) - fprintf(STDERR, "MEMORY ERROR: %d bytes lost\n", - current_allocation-allocation_now); - if (current_allocation != 0) - { - memory_infop pinfo = pinformation; - - fprintf(STDERR, "MEMORY ERROR: %d bytes still allocated\n", - current_allocation); - while (pinfo != NULL) - { - fprintf(STDERR," %lu bytes at %x\n", - pinfo->size, (unsigned int)pinfo->pointer); - pinfo = pinfo->next; - } - } -#endif - } -#ifdef PNG_USER_MEM_SUPPORTED - fprintf(STDERR, " Current memory allocation: %10d bytes\n", - current_allocation); - fprintf(STDERR, " Maximum memory allocation: %10d bytes\n", - maximum_allocation); - fprintf(STDERR, " Total memory allocation: %10d bytes\n", - total_allocation); - fprintf(STDERR, " Number of allocations: %10d\n", - num_allocations); -#endif - } - -#ifdef PNGTEST_TIMING - t_stop = (float)clock(); - t_misc += (t_stop - t_start); - t_start = t_stop; - fprintf(STDERR," CPU time used = %.3f seconds", - (t_misc+t_decode+t_encode)/(float)CLOCKS_PER_SEC); - fprintf(STDERR," (decoding %.3f,\n", - t_decode/(float)CLOCKS_PER_SEC); - fprintf(STDERR," encoding %.3f ,", - t_encode/(float)CLOCKS_PER_SEC); - fprintf(STDERR," other %.3f seconds)\n\n", - t_misc/(float)CLOCKS_PER_SEC); -#endif - - if (ierror == 0) - fprintf(STDERR, "libpng passes test\n"); - else - fprintf(STDERR, "libpng FAILS test\n"); - return (int)(ierror != 0); -} - -/* Generate a compiler error if there is an old png.h in the search path. */ -typedef version_1_2_5 your_png_h_is_not_version_1_2_5; diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngtest.png b/gtkmm-osx/trunk/libpng-1.2.5/pngtest.png deleted file mode 100644 index f3a6df4483fc9d020c028d4e4f417767bfa72877..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8574 zcmV-^A%WhB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-m2eb0qJxd`(s`31~|MB_n$YOo3Zqm}%-nS1qiLE`m0U4yOJ(ALM zlhS38b#G1NbTT)0DLPlue>f=o8iQElFIo$x-Qm?8Ps(_cR3XkjJe_pv7%MIBW=g&b zd9R&a*U?#(SU^?@d6se2Tz8OIqmb6lRw0q)s}Px7y2HC3D*{Q;_xJ78w(SLVOhwpB zUvCPlSN_dZ@3+Z^rxWwdpZf0PJvWrz-E|AZ@PtpBxRRuHD(Ck0_lG!4M<9iI_Hxe^Z$D zpIP2Hsp(mDa{M>@r!N-~Ba(pkua^n@2X=P_mdn}aU(~-C|N1xoH7=K5{sHIxCn?{! zvqybfFDZ*Bkpc$`hkK}y6x5CzbEPVtutGhsmR1maE|;tALppG4DYJDWn~N!4`pXHsi_VCJxXDJxCx0>6mK2j| zAZfwd$NP_2dF{Jz(M(*w#`BO46r)2eP^2-halrRltp!AbZB3a4wnyFL)Wsr>NmgP> zjytKyrVqAYK^T($U$Ui{ct}F(s(GAivrKo<86K?tA8rU&BlmN~0000007*qoM6N<$ Ef`FLc{r~^~ diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngtrans.c b/gtkmm-osx/trunk/libpng-1.2.5/pngtrans.c deleted file mode 100644 index f08fb4e..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/pngtrans.c +++ /dev/null @@ -1,640 +0,0 @@ - -/* pngtrans.c - transforms the data in a row (used by both readers and writers) - * - * libpng 1.2.5 - October 3, 2002 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2002 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) - */ - -#define PNG_INTERNAL -#include "png.h" - -#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) -/* turn on BGR-to-RGB mapping */ -void PNGAPI -png_set_bgr(png_structp png_ptr) -{ - png_debug(1, "in png_set_bgr\n"); - png_ptr->transformations |= PNG_BGR; -} -#endif - -#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) -/* turn on 16 bit byte swapping */ -void PNGAPI -png_set_swap(png_structp png_ptr) -{ - png_debug(1, "in png_set_swap\n"); - if (png_ptr->bit_depth == 16) - png_ptr->transformations |= PNG_SWAP_BYTES; -} -#endif - -#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) -/* turn on pixel packing */ -void PNGAPI -png_set_packing(png_structp png_ptr) -{ - png_debug(1, "in png_set_packing\n"); - if (png_ptr->bit_depth < 8) - { - png_ptr->transformations |= PNG_PACK; - png_ptr->usr_bit_depth = 8; - } -} -#endif - -#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED) -/* turn on packed pixel swapping */ -void PNGAPI -png_set_packswap(png_structp png_ptr) -{ - png_debug(1, "in png_set_packswap\n"); - if (png_ptr->bit_depth < 8) - png_ptr->transformations |= PNG_PACKSWAP; -} -#endif - -#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) -void PNGAPI -png_set_shift(png_structp png_ptr, png_color_8p true_bits) -{ - png_debug(1, "in png_set_shift\n"); - png_ptr->transformations |= PNG_SHIFT; - png_ptr->shift = *true_bits; -} -#endif - -#if defined(PNG_READ_INTERLACING_SUPPORTED) || \ - defined(PNG_WRITE_INTERLACING_SUPPORTED) -int PNGAPI -png_set_interlace_handling(png_structp png_ptr) -{ - png_debug(1, "in png_set_interlace handling\n"); - if (png_ptr->interlaced) - { - png_ptr->transformations |= PNG_INTERLACE; - return (7); - } - - return (1); -} -#endif - -#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) -/* Add a filler byte on read, or remove a filler or alpha byte on write. - * The filler type has changed in v0.95 to allow future 2-byte fillers - * for 48-bit input data, as well as to avoid problems with some compilers - * that don't like bytes as parameters. - */ -void PNGAPI -png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc) -{ - png_debug(1, "in png_set_filler\n"); - png_ptr->transformations |= PNG_FILLER; - png_ptr->filler = (png_byte)filler; - if (filler_loc == PNG_FILLER_AFTER) - png_ptr->flags |= PNG_FLAG_FILLER_AFTER; - else - png_ptr->flags &= ~PNG_FLAG_FILLER_AFTER; - - /* This should probably go in the "do_filler" routine. - * I attempted to do that in libpng-1.0.1a but that caused problems - * so I restored it in libpng-1.0.2a - */ - - if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) - { - png_ptr->usr_channels = 4; - } - - /* Also I added this in libpng-1.0.2a (what happens when we expand - * a less-than-8-bit grayscale to GA? */ - - if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY && png_ptr->bit_depth >= 8) - { - png_ptr->usr_channels = 2; - } -} -#endif - -#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ - defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) -void PNGAPI -png_set_swap_alpha(png_structp png_ptr) -{ - png_debug(1, "in png_set_swap_alpha\n"); - png_ptr->transformations |= PNG_SWAP_ALPHA; -} -#endif - -#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ - defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) -void PNGAPI -png_set_invert_alpha(png_structp png_ptr) -{ - png_debug(1, "in png_set_invert_alpha\n"); - png_ptr->transformations |= PNG_INVERT_ALPHA; -} -#endif - -#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) -void PNGAPI -png_set_invert_mono(png_structp png_ptr) -{ - png_debug(1, "in png_set_invert_mono\n"); - png_ptr->transformations |= PNG_INVERT_MONO; -} - -/* invert monochrome grayscale data */ -void /* PRIVATE */ -png_do_invert(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_invert\n"); - /* This test removed from libpng version 1.0.13 and 1.2.0: - * if (row_info->bit_depth == 1 && - */ -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row == NULL || row_info == NULL) - return; -#endif - if (row_info->color_type == PNG_COLOR_TYPE_GRAY) - { - png_bytep rp = row; - png_uint_32 i; - png_uint_32 istop = row_info->rowbytes; - - for (i = 0; i < istop; i++) - { - *rp = (png_byte)(~(*rp)); - rp++; - } - } - else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA && - row_info->bit_depth == 8) - { - png_bytep rp = row; - png_uint_32 i; - png_uint_32 istop = row_info->rowbytes; - - for (i = 0; i < istop; i+=2) - { - *rp = (png_byte)(~(*rp)); - rp+=2; - } - } - else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA && - row_info->bit_depth == 16) - { - png_bytep rp = row; - png_uint_32 i; - png_uint_32 istop = row_info->rowbytes; - - for (i = 0; i < istop; i+=4) - { - *rp = (png_byte)(~(*rp)); - *(rp+1) = (png_byte)(~(*(rp+1))); - rp+=4; - } - } -} -#endif - -#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) -/* swaps byte order on 16 bit depth images */ -void /* PRIVATE */ -png_do_swap(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_swap\n"); - if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - row_info->bit_depth == 16) - { - png_bytep rp = row; - png_uint_32 i; - png_uint_32 istop= row_info->width * row_info->channels; - - for (i = 0; i < istop; i++, rp += 2) - { - png_byte t = *rp; - *rp = *(rp + 1); - *(rp + 1) = t; - } - } -} -#endif - -#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED) -static png_byte onebppswaptable[256] = { - 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, - 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, - 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, -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xD3, 0x33, 0xB3, 0x73, 0xF3, - 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, - 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB, - 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, - 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7, - 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, - 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF -}; - -static png_byte twobppswaptable[256] = { - 0x00, 0x40, 0x80, 0xC0, 0x10, 0x50, 0x90, 0xD0, - 0x20, 0x60, 0xA0, 0xE0, 0x30, 0x70, 0xB0, 0xF0, - 0x04, 0x44, 0x84, 0xC4, 0x14, 0x54, 0x94, 0xD4, - 0x24, 0x64, 0xA4, 0xE4, 0x34, 0x74, 0xB4, 0xF4, - 0x08, 0x48, 0x88, 0xC8, 0x18, 0x58, 0x98, 0xD8, - 0x28, 0x68, 0xA8, 0xE8, 0x38, 0x78, 0xB8, 0xF8, - 0x0C, 0x4C, 0x8C, 0xCC, 0x1C, 0x5C, 0x9C, 0xDC, - 0x2C, 0x6C, 0xAC, 0xEC, 0x3C, 0x7C, 0xBC, 0xFC, - 0x01, 0x41, 0x81, 0xC1, 0x11, 0x51, 0x91, 0xD1, - 0x21, 0x61, 0xA1, 0xE1, 0x31, 0x71, 0xB1, 0xF1, - 0x05, 0x45, 0x85, 0xC5, 0x15, 0x55, 0x95, 0xD5, - 0x25, 0x65, 0xA5, 0xE5, 0x35, 0x75, 0xB5, 0xF5, - 0x09, 0x49, 0x89, 0xC9, 0x19, 0x59, 0x99, 0xD9, - 0x29, 0x69, 0xA9, 0xE9, 0x39, 0x79, 0xB9, 0xF9, - 0x0D, 0x4D, 0x8D, 0xCD, 0x1D, 0x5D, 0x9D, 0xDD, - 0x2D, 0x6D, 0xAD, 0xED, 0x3D, 0x7D, 0xBD, 0xFD, - 0x02, 0x42, 0x82, 0xC2, 0x12, 0x52, 0x92, 0xD2, - 0x22, 0x62, 0xA2, 0xE2, 0x32, 0x72, 0xB2, 0xF2, - 0x06, 0x46, 0x86, 0xC6, 0x16, 0x56, 0x96, 0xD6, - 0x26, 0x66, 0xA6, 0xE6, 0x36, 0x76, 0xB6, 0xF6, - 0x0A, 0x4A, 0x8A, 0xCA, 0x1A, 0x5A, 0x9A, 0xDA, - 0x2A, 0x6A, 0xAA, 0xEA, 0x3A, 0x7A, 0xBA, 0xFA, - 0x0E, 0x4E, 0x8E, 0xCE, 0x1E, 0x5E, 0x9E, 0xDE, - 0x2E, 0x6E, 0xAE, 0xEE, 0x3E, 0x7E, 0xBE, 0xFE, - 0x03, 0x43, 0x83, 0xC3, 0x13, 0x53, 0x93, 0xD3, - 0x23, 0x63, 0xA3, 0xE3, 0x33, 0x73, 0xB3, 0xF3, - 0x07, 0x47, 0x87, 0xC7, 0x17, 0x57, 0x97, 0xD7, - 0x27, 0x67, 0xA7, 0xE7, 0x37, 0x77, 0xB7, 0xF7, - 0x0B, 0x4B, 0x8B, 0xCB, 0x1B, 0x5B, 0x9B, 0xDB, - 0x2B, 0x6B, 0xAB, 0xEB, 0x3B, 0x7B, 0xBB, 0xFB, - 0x0F, 0x4F, 0x8F, 0xCF, 0x1F, 0x5F, 0x9F, 0xDF, - 0x2F, 0x6F, 0xAF, 0xEF, 0x3F, 0x7F, 0xBF, 0xFF -}; - -static png_byte fourbppswaptable[256] = { - 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, - 0x80, 0x90, 0xA0, 0xB0, 0xC0, 0xD0, 0xE0, 0xF0, - 0x01, 0x11, 0x21, 0x31, 0x41, 0x51, 0x61, 0x71, - 0x81, 0x91, 0xA1, 0xB1, 0xC1, 0xD1, 0xE1, 0xF1, - 0x02, 0x12, 0x22, 0x32, 0x42, 0x52, 0x62, 0x72, - 0x82, 0x92,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D, 0xDD, 0xED, 0xFD, - 0x0E, 0x1E, 0x2E, 0x3E, 0x4E, 0x5E, 0x6E, 0x7E, - 0x8E, 0x9E, 0xAE, 0xBE, 0xCE, 0xDE, 0xEE, 0xFE, - 0x0F, 0x1F, 0x2F, 0x3F, 0x4F, 0x5F, 0x6F, 0x7F, - 0x8F, 0x9F, 0xAF, 0xBF, 0xCF, 0xDF, 0xEF, 0xFF -}; - -/* swaps pixel packing order within bytes */ -void /* PRIVATE */ -png_do_packswap(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_packswap\n"); - if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - row_info->bit_depth < 8) - { - png_bytep rp, end, table; - - end = row + row_info->rowbytes; - - if (row_info->bit_depth == 1) - table = onebppswaptable; - else if (row_info->bit_depth == 2) - table = twobppswaptable; - else if (row_info->bit_depth == 4) - table = fourbppswaptable; - else - return; - - for (rp = row; rp < end; rp++) - *rp = table[*rp]; - } -} -#endif /* PNG_READ_PACKSWAP_SUPPORTED or PNG_WRITE_PACKSWAP_SUPPORTED */ - -#if defined(PNG_WRITE_FILLER_SUPPORTED) || \ - defined(PNG_READ_STRIP_ALPHA_SUPPORTED) -/* remove filler or alpha byte(s) */ -void /* PRIVATE */ -png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags) -{ - png_debug(1, "in png_do_strip_filler\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif - { -/* - if (row_info->color_type == PNG_COLOR_TYPE_RGB || - row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) -*/ - png_bytep sp=row; - png_bytep dp=row; - png_uint_32 row_width=row_info->width; - png_uint_32 i; - - if (row_info->channels == 4) - { - if (row_info->bit_depth == 8) - { - /* This converts from RGBX or RGBA to RGB */ - if (flags & PNG_FLAG_FILLER_AFTER) - { - dp+=3; sp+=4; - for (i = 1; i < row_width; i++) - { - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - sp++; - } - } - /* This converts from XRGB or ARGB to RGB */ - else - { - for (i = 0; i < row_width; i++) - { - sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - } - } - row_info->pixel_depth = 24; - row_info->rowbytes = row_width * 3; - } - else /* if (row_info->bit_depth == 16) */ - { - if (flags & PNG_FLAG_FILLER_AFTER) - { - /* This converts from RRGGBBXX or RRGGBBAA to RRGGBB */ - sp += 8; dp += 6; - for (i = 1; i < row_width; i++) - { - /* This could be (although png_memcpy is probably slower): - png_memcpy(dp, sp, 6); - sp += 8; - dp += 6; - */ - - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - sp += 2; - } - } - else - { - /* This converts from XXRRGGBB or AARRGGBB to RRGGBB */ - for (i = 0; i < row_width; i++) - { - /* This could be (although png_memcpy is probably slower): - png_memcpy(dp, sp, 6); - sp += 8; - dp += 6; - */ - - sp+=2; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - } - } - row_info->pixel_depth = 48; - row_info->rowbytes = row_width * 6; - } - row_info->channels = 3; - row_info->color_type &= ~PNG_COLOR_MASK_ALPHA; - } -/* - else if (row_info->color_type == PNG_COLOR_TYPE_GRAY || - row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) -*/ - else if (row_info->channels == 2) - { - if (row_info->bit_depth == 8) - { - /* This converts from GX or GA to G */ - if (flags & PNG_FLAG_FILLER_AFTER) - { - for (i = 0; i < row_width; i++) - { - *dp++ = *sp++; - sp++; - } - } - /* This converts from XG or AG to G */ - else - { - for (i = 0; i < row_width; i++) - { - sp++; - *dp++ = *sp++; - } - } - row_info->pixel_depth = 8; - row_info->rowbytes = row_width; - } - else /* if (row_info->bit_depth == 16) */ - { - if (flags & PNG_FLAG_FILLER_AFTER) - { - /* This converts from GGXX or GGAA to GG */ - sp += 4; dp += 2; - for (i = 1; i < row_width; i++) - { - *dp++ = *sp++; - *dp++ = *sp++; - sp += 2; - } - } - else - { - /* This converts from XXGG or AAGG to GG */ - for (i = 0; i < row_width; i++) - { - sp += 2; - *dp++ = *sp++; - *dp++ = *sp++; - } - } - row_info->pixel_depth = 16; - row_info->rowbytes = row_width * 2; - } - row_info->channels = 1; - row_info->color_type &= ~PNG_COLOR_MASK_ALPHA; - } - } -} -#endif - -#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) -/* swaps red and blue bytes within a pixel */ -void /* PRIVATE */ -png_do_bgr(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_bgr\n"); - if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - (row_info->color_type & PNG_COLOR_MASK_COLOR)) - { - png_uint_32 row_width = row_info->width; - if (row_info->bit_depth == 8) - { - if (row_info->color_type == PNG_COLOR_TYPE_RGB) - { - png_bytep rp; - png_uint_32 i; - - for (i = 0, rp = row; i < row_width; i++, rp += 3) - { - png_byte save = *rp; - *rp = *(rp + 2); - *(rp + 2) = save; - } - } - else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - { - png_bytep rp; - png_uint_32 i; - - for (i = 0, rp = row; i < row_width; i++, rp += 4) - { - png_byte save = *rp; - *rp = *(rp + 2); - *(rp + 2) = save; - } - } - } - else if (row_info->bit_depth == 16) - { - if (row_info->color_type == PNG_COLOR_TYPE_RGB) - { - png_bytep rp; - png_uint_32 i; - - for (i = 0, rp = row; i < row_width; i++, rp += 6) - { - png_byte save = *rp; - *rp = *(rp + 4); - *(rp + 4) = save; - save = *(rp + 1); - *(rp + 1) = *(rp + 5); - *(rp + 5) = save; - } - } - else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - { - png_bytep rp; - png_uint_32 i; - - for (i = 0, rp = row; i < row_width; i++, rp += 8) - { - png_byte save = *rp; - *rp = *(rp + 4); - *(rp + 4) = save; - save = *(rp + 1); - *(rp + 1) = *(rp + 5); - *(rp + 5) = save; - } - } - } - } -} -#endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */ - -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_LEGACY_SUPPORTED) -void PNGAPI -png_set_user_transform_info(png_structp png_ptr, png_voidp - user_transform_ptr, int user_transform_depth, int user_transform_channels) -{ - png_debug(1, "in png_set_user_transform_info\n"); -#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) - png_ptr->user_transform_ptr = user_transform_ptr; - png_ptr->user_transform_depth = (png_byte)user_transform_depth; - png_ptr->user_transform_channels = (png_byte)user_transform_channels; -#else - if(user_transform_ptr || user_transform_depth || user_transform_channels) - png_warning(png_ptr, - "This version of libpng does not support user transform info"); -#endif -} -#endif - -/* This function returns a pointer to the user_transform_ptr associated with - * the user transform functions. The application should free any memory - * associated with this pointer before png_write_destroy and png_read_destroy - * are called. - */ -png_voidp PNGAPI -png_get_user_transform_ptr(png_structp png_ptr) -{ -#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) - return ((png_voidp)png_ptr->user_transform_ptr); -#else - if(png_ptr) - return (NULL); - return (NULL); -#endif -} diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngvcrd.c b/gtkmm-osx/trunk/libpng-1.2.5/pngvcrd.c deleted file mode 100644 index 4f513eb..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/pngvcrd.c +++ /dev/null @@ -1,3845 +0,0 @@ -/* pngvcrd.c - mixed C/assembler version of utilities to read a PNG file - * - * For Intel x86 CPU and Microsoft Visual C++ compiler - * - * libpng version 1.2.5 - October 3, 2002 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2002 Glenn Randers-Pehrson - * Copyright (c) 1998, Intel Corporation - * - * Contributed by Nirav Chhatrapati, Intel Corporation, 1998 - * Interface to libpng contributed by Gilles Vollant, 1999 - * - * - * In png_do_read_interlace() in libpng versions 1.0.3a through 1.0.4d, - * a sign error in the post-MMX cleanup code for each pixel_depth resulted - * in bad pixels at the beginning of some rows of some images, and also - * (due to out-of-range memory reads and writes) caused heap corruption - * when compiled with MSVC 6.0. The error was fixed in version 1.0.4e. - * - * [png_read_filter_row_mmx_avg() bpp == 2 bugfix, GRR 20000916] - * - * [runtime MMX configuration, GRR 20010102] - * - */ - -#define PNG_INTERNAL -#include "png.h" - -#if defined(PNG_ASSEMBLER_CODE_SUPPORTED) && defined(PNG_USE_PNGVCRD) - -static int mmx_supported=2; - - -int PNGAPI -png_mmx_support(void) -{ - int mmx_supported_local = 0; - _asm { - push ebx //CPUID will trash these - push ecx - push edx - - pushfd //Save Eflag to stack - pop eax //Get Eflag from stack into eax - mov ecx, eax //Make another copy of Eflag in ecx - xor eax, 0x200000 //Toggle ID bit in Eflag [i.e. bit(21)] - push eax //Save modified Eflag back to stack - - popfd //Restored modified value back to Eflag reg - pushfd //Save Eflag to stack - pop eax //Get Eflag from stack - push ecx // save original Eflag to stack - popfd // restore original Eflag - xor eax, ecx //Compare the new Eflag with the original Eflag - jz NOT_SUPPORTED //If the same, CPUID instruction is not supported, - //skip following instructions and jump to - //NOT_SUPPORTED label - - xor eax, eax //Set eax to zero - - _asm _emit 0x0f //CPUID instruction (two bytes opcode) - _asm _emit 0xa2 - - cmp eax, 1 //make sure eax return non-zero value - jl NOT_SUPPORTED //If eax is zero, mmx not supported - - xor eax, eax //set eax to zero - inc eax //Now increment eax to 1. This instruction is - //faster than the instruction "mov eax, 1" - - _asm _emit 0x0f //CPUID instruction - _asm _emit 0xa2 - - and edx, 0x00800000 //mask out all bits but mmx bit(24) - cmp edx, 0 // 0 = mmx not supported - jz NOT_SUPPORTED // non-zero = Yes, mmx IS supported - - mov mmx_supported_local, 1 //set return value to 1 - -NOT_SUPPORTED: - mov eax, mmx_supported_local //move return value to eax - pop edx //CPUID trashed these - pop ecx - pop ebx - } - - //mmx_supported_local=0; // test code for force don't support MMX - //printf("MMX : %u (1=MMX supported)\n",mmx_supported_local); - - mmx_supported = mmx_supported_local; - return mmx_supported_local; -} - -/* Combines the row recently read in with the previous row. - This routine takes care of alpha and transparency if requested. - This routine also handles the two methods of progressive display - of interlaced images, depending on the mask value. - The mask value describes which pixels are to be combined with - the row. The pattern always repeats every 8 pixels, so just 8 - bits are needed. A one indicates the pixel is to be combined; a - zero indicates the pixel is to be skipped. This is in addition - to any alpha or transparency value associated with the pixel. If - you want all pixels to be combined, pass 0xff (255) in mask. */ - -/* Use this routine for x86 platform - uses faster MMX routine if machine - supports MMX */ - -void /* PRIVATE */ -png_combine_row(png_structp png_ptr, png_bytep row, int mask) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - const int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; -#endif - - png_debug(1,"in png_combine_row_asm\n"); - - if (mmx_supported == 2) { - /* this should have happened in png_init_mmx_flags() already */ - png_warning(png_ptr, "asm_flags may not have been initialized"); - png_mmx_support(); - } - - if (mask == 0xff) - { - png_memcpy(row, png_ptr->row_buf + 1, - (png_size_t)((png_ptr->width * png_ptr->row_info.pixel_depth + 7) >> 3)); - } - /* GRR: add "else if (mask == 0)" case? - * or does png_combine_row() not even get called in that case? */ - else - { - switch (png_ptr->row_info.pixel_depth) - { - case 1: - { - png_bytep sp; - png_bytep dp; - int s_inc, s_start, s_end; - int m; - int shift; - png_uint_32 i; - - sp = png_ptr->row_buf + 1; - dp = row; - m = 0x80; -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (png_ptr->transformations & PNG_PACKSWAP) - { - s_start = 0; - s_end = 7; - s_inc = 1; - } - else -#endif - { - s_start = 7; - s_end = 0; - s_inc = -1; - } - - shift = s_start; - - for (i = 0; i < png_ptr->width; i++) - { - if (m & mask) - { - int value; - - value = (*sp >> shift) & 0x1; - *dp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff); - *dp |= (png_byte)(value << shift); - } - - if (shift == s_end) - { - shift = s_start; - sp++; - dp++; - } - else - shift += s_inc; - - if (m == 1) - m = 0x80; - else - m >>= 1; - } - break; - } - - case 2: - { - png_bytep sp; - png_bytep dp; - int s_start, s_end, s_inc; - int m; - int shift; - png_uint_32 i; - int value; - - sp = png_ptr->row_buf + 1; - dp = row; - m = 0x80; -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (png_ptr->transformations & PNG_PACKSWAP) - { - s_start = 0; - s_end = 6; - s_inc = 2; - } - else -#endif - { - s_start = 6; - s_end = 0; - s_inc = -2; - } - - shift = s_start; - - for (i = 0; i < png_ptr->width; i++) - { - if (m & mask) - { - value = (*sp >> shift) & 0x3; - *dp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); - *dp |= (png_byte)(value << shift); - } - - if (shift == s_end) - { - shift = s_start; - sp++; - dp++; - } - else - shift += s_inc; - if (m == 1) - m = 0x80; - else - m >>= 1; - } - break; - } - - case 4: - { - png_bytep sp; - png_bytep dp; - int s_start, s_end, s_inc; - int m; - int shift; - png_uint_32 i; - int value; - - sp = png_ptr->row_buf + 1; - dp = row; - m = 0x80; -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (png_ptr->transformations & PNG_PACKSWAP) - { - s_start = 0; - s_end = 4; - s_inc = 4; - } - else -#endif - { - s_start = 4; - s_end = 0; - s_inc = -4; - } - shift = s_start; - - for (i = 0; i < png_ptr->width; i++) - { - if (m & mask) - { - value = (*sp >> shift) & 0xf; - *dp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); - *dp |= (png_byte)(value << shift); - } - - if (shift == s_end) - { - shift = s_start; - sp++; - dp++; - } - else - shift += s_inc; - if (m == 1) - m = 0x80; - else - m >>= 1; - } - break; - } - - case 8: - { - png_bytep srcptr; - png_bytep dstptr; - png_uint_32 len; - int m; - int diff, unmask; - - __int64 mask0=0x0102040810204080; - - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) - /* && mmx_supported */ ) - { - srcptr = png_ptr->row_buf + 1; - dstptr = row; - m = 0x80; - unmask = ~mask; - len = png_ptr->width &~7; //reduce to multiple of 8 - diff = png_ptr->width & 7; //amount lost - - _asm - { - movd mm7, unmask //load bit pattern - psubb mm6,mm6 //zero mm6 - punpcklbw mm7,mm7 - punpcklwd mm7,mm7 - punpckldq mm7,mm7 //fill register with 8 masks - - movq mm0,mask0 - - pand mm0,mm7 //nonzero if keep byte - pcmpeqb mm0,mm6 //zeros->1s, v versa - - mov ecx,len //load length of line (pixels) - mov esi,srcptr //load source - mov ebx,dstptr //load dest - cmp ecx,0 //lcr - je mainloop8end - -mainloop8: - movq mm4,[esi] - pand mm4,mm0 - movq mm6,mm0 - pandn mm6,[ebx] - por mm4,mm6 - movq [ebx],mm4 - - add esi,8 //inc by 8 bytes processed - add ebx,8 - sub ecx,8 //dec by 8 pixels processed - - ja mainloop8 -mainloop8end: - - mov ecx,diff - cmp ecx,0 - jz end8 - - mov edx,mask - sal edx,24 //make low byte the high byte - -secondloop8: - sal edx,1 //move high bit to CF - jnc skip8 //if CF = 0 - mov al,[esi] - mov [ebx],al -skip8: - inc esi - inc ebx - - dec ecx - jnz secondloop8 -end8: - emms - } - } - else /* mmx not supported - use modified C routine */ - { - register unsigned int incr1, initial_val, final_val; - png_size_t pixel_bytes; - png_uint_32 i; - register int disp = png_pass_inc[png_ptr->pass]; - int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; - - pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); - srcptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]* - pixel_bytes; - dstptr = row + offset_table[png_ptr->pass]*pixel_bytes; - initial_val = offset_table[png_ptr->pass]*pixel_bytes; - final_val = png_ptr->width*pixel_bytes; - incr1 = (disp)*pixel_bytes; - for (i = initial_val; i < final_val; i += incr1) - { - png_memcpy(dstptr, srcptr, pixel_bytes); - srcptr += incr1; - dstptr += incr1; - } - } /* end of else */ - - break; - } // end 8 bpp - - case 16: - { - png_bytep srcptr; - png_bytep dstptr; - png_uint_32 len; - int unmask, diff; - __int64 mask1=0x0101020204040808, - mask0=0x1010202040408080; - - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) - /* && mmx_supported */ ) - { - srcptr = png_ptr->row_buf + 1; - dstptr = row; - - unmask = ~mask; - len = (png_ptr->width)&~7; - diff = (png_ptr->width)&7; - _asm - { - movd mm7, unmask //load bit pattern - psubb mm6,mm6 //zero mm6 - punpcklbw mm7,mm7 - punpcklwd mm7,mm7 - punpckldq mm7,mm7 //fill register with 8 masks - - movq mm0,mask0 - movq mm1,mask1 - - pand mm0,mm7 - pand mm1,mm7 - - pcmpeqb mm0,mm6 - pcmpeqb mm1,mm6 - - mov ecx,len //load length of line - mov esi,srcptr //load source - mov ebx,dstptr //load dest - cmp ecx,0 //lcr - jz mainloop16end - -mainloop16: - movq mm4,[esi] - pand mm4,mm0 - movq mm6,mm0 - movq mm7,[ebx] - pandn mm6,mm7 - por mm4,mm6 - movq [ebx],mm4 - - movq mm5,[esi+8] - pand mm5,mm1 - movq mm7,mm1 - movq mm6,[ebx+8] - pandn mm7,mm6 - por mm5,mm7 - movq [ebx+8],mm5 - - add esi,16 //inc by 16 bytes processed - add ebx,16 - sub ecx,8 //dec by 8 pixels processed - - ja mainloop16 - -mainloop16end: - mov ecx,diff - cmp ecx,0 - jz end16 - - mov edx,mask - sal edx,24 //make low byte the high byte -secondloop16: - sal edx,1 //move high bit to CF - jnc skip16 //if CF = 0 - mov ax,[esi] - mov [ebx],ax -skip16: - add esi,2 - add ebx,2 - - dec ecx - jnz secondloop16 -end16: - emms - } - } - else /* mmx not supported - use modified C routine */ - { - register unsigned int incr1, initial_val, final_val; - png_size_t pixel_bytes; - png_uint_32 i; - register int disp = png_pass_inc[png_ptr->pass]; - int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; - - pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); - srcptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]* - pixel_bytes; - dstptr = row + offset_table[png_ptr->pass]*pixel_bytes; - initial_val = offset_table[png_ptr->pass]*pixel_bytes; - final_val = png_ptr->width*pixel_bytes; - incr1 = (disp)*pixel_bytes; - for (i = initial_val; i < final_val; i += incr1) - { - png_memcpy(dstptr, srcptr, pixel_bytes); - srcptr += incr1; - dstptr += incr1; - } - } /* end of else */ - - break; - } // end 16 bpp - - case 24: - { - png_bytep srcptr; - png_bytep dstptr; - png_uint_32 len; - int unmask, diff; - - __int64 mask2=0x0101010202020404, //24bpp - mask1=0x0408080810101020, - mask0=0x2020404040808080; - - srcptr = png_ptr->row_buf + 1; - dstptr = row; - - unmask = ~mask; - len = (png_ptr->width)&~7; - diff = (png_ptr->width)&7; - - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) - /* && mmx_supported */ ) - { - _asm - { - movd mm7, unmask //load bit pattern - psubb mm6,mm6 //zero mm6 - punpcklbw mm7,mm7 - punpcklwd mm7,mm7 - punpckldq mm7,mm7 //fill register with 8 masks - - movq mm0,mask0 - movq mm1,mask1 - movq mm2,mask2 - - pand mm0,mm7 - pand mm1,mm7 - pand mm2,mm7 - - pcmpeqb mm0,mm6 - pcmpeqb mm1,mm6 - pcmpeqb mm2,mm6 - - mov ecx,len //load length of line - mov esi,srcptr //load source - mov ebx,dstptr //load dest - cmp ecx,0 - jz mainloop24end - -mainloop24: - movq mm4,[esi] - pand mm4,mm0 - movq mm6,mm0 - movq mm7,[ebx] - pandn mm6,mm7 - por mm4,mm6 - movq [ebx],mm4 - - - movq mm5,[esi+8] - pand mm5,mm1 - movq mm7,mm1 - movq mm6,[ebx+8] - pandn mm7,mm6 - por mm5,mm7 - movq [ebx+8],mm5 - - movq mm6,[esi+16] - pand mm6,mm2 - movq mm4,mm2 - movq mm7,[ebx+16] - pandn mm4,mm7 - por mm6,mm4 - movq [ebx+16],mm6 - - add esi,24 //inc by 24 bytes processed - add ebx,24 - sub ecx,8 //dec by 8 pixels processed - - ja mainloop24 - -mainloop24end: - mov ecx,diff - cmp ecx,0 - jz end24 - - mov edx,mask - sal edx,24 //make low byte the high byte -secondloop24: - sal edx,1 //move high bit to CF - jnc skip24 //if CF = 0 - mov ax,[esi] - mov [ebx],ax - xor eax,eax - mov al,[esi+2] - mov [ebx+2],al -skip24: - add esi,3 - add ebx,3 - - dec ecx - jnz secondloop24 - -end24: - emms - } - } - else /* mmx not supported - use modified C routine */ - { - register unsigned int incr1, initial_val, final_val; - png_size_t pixel_bytes; - png_uint_32 i; - register int disp = png_pass_inc[png_ptr->pass]; - int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; - - pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); - srcptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]* - pixel_bytes; - dstptr = row + offset_table[png_ptr->pass]*pixel_bytes; - initial_val = offset_table[png_ptr->pass]*pixel_bytes; - final_val = png_ptr->width*pixel_bytes; - incr1 = (disp)*pixel_bytes; - for (i = initial_val; i < final_val; i += incr1) - { - png_memcpy(dstptr, srcptr, pixel_bytes); - srcptr += incr1; - dstptr += incr1; - } - } /* end of else */ - - break; - } // end 24 bpp - - case 32: - { - png_bytep srcptr; - png_bytep dstptr; - png_uint_32 len; - int unmask, diff; - - __int64 mask3=0x0101010102020202, //32bpp - mask2=0x0404040408080808, - mask1=0x1010101020202020, - mask0=0x4040404080808080; - - srcptr = png_ptr->row_buf + 1; - dstptr = row; - - unmask = ~mask; - len = (png_ptr->width)&~7; - diff = (png_ptr->width)&7; - - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) - /* && mmx_supported */ ) - { - _asm - { - movd mm7, unmask //load bit pattern - psubb mm6,mm6 //zero mm6 - punpcklbw mm7,mm7 - punpcklwd mm7,mm7 - punpckldq mm7,mm7 //fill register with 8 masks - - movq mm0,mask0 - movq mm1,mask1 - movq mm2,mask2 - movq mm3,mask3 - - pand mm0,mm7 - pand mm1,mm7 - pand mm2,mm7 - pand mm3,mm7 - - pcmpeqb mm0,mm6 - pcmpeqb mm1,mm6 - pcmpeqb mm2,mm6 - pcmpeqb mm3,mm6 - - mov ecx,len //load length of line - mov esi,srcptr //load source - mov ebx,dstptr //load dest - - cmp ecx,0 //lcr - jz mainloop32end - -mainloop32: - movq mm4,[esi] - pand mm4,mm0 - movq mm6,mm0 - movq mm7,[ebx] - pandn mm6,mm7 - por mm4,mm6 - movq [ebx],mm4 - - movq mm5,[esi+8] - pand mm5,mm1 - movq mm7,mm1 - movq mm6,[ebx+8] - pandn mm7,mm6 - por mm5,mm7 - movq [ebx+8],mm5 - - movq mm6,[esi+16] - pand mm6,mm2 - movq mm4,mm2 - movq mm7,[ebx+16] - pandn mm4,mm7 - por mm6,mm4 - movq [ebx+16],mm6 - - movq mm7,[esi+24] - pand mm7,mm3 - movq mm5,mm3 - movq mm4,[ebx+24] - pandn mm5,mm4 - por mm7,mm5 - movq [ebx+24],mm7 - - add esi,32 //inc by 32 bytes processed - add ebx,32 - sub ecx,8 //dec by 8 pixels processed - - ja mainloop32 - -mainloop32end: - mov ecx,diff - cmp ecx,0 - jz end32 - - mov edx,mask - sal edx,24 //make low byte the high byte -secondloop32: - sal edx,1 //move high bit to CF - jnc skip32 //if CF = 0 - mov eax,[esi] - mov [ebx],eax -skip32: - add esi,4 - add ebx,4 - - dec ecx - jnz secondloop32 - -end32: - emms - } - } - else /* mmx _not supported - Use modified C routine */ - { - register unsigned int incr1, initial_val, final_val; - png_size_t pixel_bytes; - png_uint_32 i; - register int disp = png_pass_inc[png_ptr->pass]; - int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; - - pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); - srcptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]* - pixel_bytes; - dstptr = row + offset_table[png_ptr->pass]*pixel_bytes; - initial_val = offset_table[png_ptr->pass]*pixel_bytes; - final_val = png_ptr->width*pixel_bytes; - incr1 = (disp)*pixel_bytes; - for (i = initial_val; i < final_val; i += incr1) - { - png_memcpy(dstptr, srcptr, pixel_bytes); - srcptr += incr1; - dstptr += incr1; - } - } /* end of else */ - - break; - } // end 32 bpp - - case 48: - { - png_bytep srcptr; - png_bytep dstptr; - png_uint_32 len; - int unmask, diff; - - __int64 mask5=0x0101010101010202, - mask4=0x0202020204040404, - mask3=0x0404080808080808, - mask2=0x1010101010102020, - mask1=0x2020202040404040, - mask0=0x4040808080808080; - - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW) - /* && mmx_supported */ ) - { - srcptr = png_ptr->row_buf + 1; - dstptr = row; - - unmask = ~mask; - len = (png_ptr->width)&~7; - diff = (png_ptr->width)&7; - _asm - { - movd mm7, unmask //load bit pattern - psubb mm6,mm6 //zero mm6 - punpcklbw mm7,mm7 - punpcklwd mm7,mm7 - punpckldq mm7,mm7 //fill register with 8 masks - - movq mm0,mask0 - movq mm1,mask1 - movq mm2,mask2 - movq mm3,mask3 - movq mm4,mask4 - movq mm5,mask5 - - pand mm0,mm7 - pand mm1,mm7 - pand mm2,mm7 - pand mm3,mm7 - pand mm4,mm7 - pand mm5,mm7 - - pcmpeqb mm0,mm6 - pcmpeqb mm1,mm6 - pcmpeqb mm2,mm6 - pcmpeqb mm3,mm6 - pcmpeqb mm4,mm6 - pcmpeqb mm5,mm6 - - mov ecx,len //load length of line - mov esi,srcptr //load source - mov ebx,dstptr //load dest - - cmp ecx,0 - jz mainloop48end - -mainloop48: - movq mm7,[esi] - pand mm7,mm0 - movq mm6,mm0 - pandn mm6,[ebx] - por mm7,mm6 - movq [ebx],mm7 - - movq mm6,[esi+8] - pand mm6,mm1 - movq mm7,mm1 - pandn mm7,[ebx+8] - por mm6,mm7 - movq [ebx+8],mm6 - - movq mm6,[esi+16] - pand mm6,mm2 - movq mm7,mm2 - pandn mm7,[ebx+16] - por mm6,mm7 - movq [ebx+16],mm6 - - movq mm7,[esi+24] - pand mm7,mm3 - movq mm6,mm3 - pandn mm6,[ebx+24] - por mm7,mm6 - movq [ebx+24],mm7 - - movq mm6,[esi+32] - pand mm6,mm4 - movq mm7,mm4 - pandn mm7,[ebx+32] - por mm6,mm7 - movq [ebx+32],mm6 - - movq mm7,[esi+40] - pand mm7,mm5 - movq mm6,mm5 - pandn mm6,[ebx+40] - por mm7,mm6 - movq [ebx+40],mm7 - - add esi,48 //inc by 32 bytes processed - add ebx,48 - sub ecx,8 //dec by 8 pixels processed - - ja mainloop48 -mainloop48end: - - mov ecx,diff - cmp ecx,0 - jz end48 - - mov edx,mask - sal edx,24 //make low byte the high byte - -secondloop48: - sal edx,1 //move high bit to CF - jnc skip48 //if CF = 0 - mov eax,[esi] - mov [ebx],eax -skip48: - add esi,4 - add ebx,4 - - dec ecx - jnz secondloop48 - -end48: - emms - } - } - else /* mmx _not supported - Use modified C routine */ - { - register unsigned int incr1, initial_val, final_val; - png_size_t pixel_bytes; - png_uint_32 i; - register int disp = png_pass_inc[png_ptr->pass]; - int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; - - pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); - srcptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]* - pixel_bytes; - dstptr = row + offset_table[png_ptr->pass]*pixel_bytes; - initial_val = offset_table[png_ptr->pass]*pixel_bytes; - final_val = png_ptr->width*pixel_bytes; - incr1 = (disp)*pixel_bytes; - for (i = initial_val; i < final_val; i += incr1) - { - png_memcpy(dstptr, srcptr, pixel_bytes); - srcptr += incr1; - dstptr += incr1; - } - } /* end of else */ - - break; - } // end 48 bpp - - default: - { - png_bytep sptr; - png_bytep dp; - png_size_t pixel_bytes; - int offset_table[7] = {0, 4, 0, 2, 0, 1, 0}; - unsigned int i; - register int disp = png_pass_inc[png_ptr->pass]; // get the offset - register unsigned int incr1, initial_val, final_val; - - pixel_bytes = (png_ptr->row_info.pixel_depth >> 3); - sptr = png_ptr->row_buf + 1 + offset_table[png_ptr->pass]* - pixel_bytes; - dp = row + offset_table[png_ptr->pass]*pixel_bytes; - initial_val = offset_table[png_ptr->pass]*pixel_bytes; - final_val = png_ptr->width*pixel_bytes; - incr1 = (disp)*pixel_bytes; - for (i = initial_val; i < final_val; i += incr1) - { - png_memcpy(dp, sptr, pixel_bytes); - sptr += incr1; - dp += incr1; - } - break; - } - } /* end switch (png_ptr->row_info.pixel_depth) */ - } /* end if (non-trivial mask) */ - -} /* end png_combine_row() */ - - -#if defined(PNG_READ_INTERLACING_SUPPORTED) - -void /* PRIVATE */ -png_do_read_interlace(png_structp png_ptr) -{ - png_row_infop row_info = &(png_ptr->row_info); - png_bytep row = png_ptr->row_buf + 1; - int pass = png_ptr->pass; - png_uint_32 transformations = png_ptr->transformations; -#ifdef PNG_USE_LOCAL_ARRAYS - const int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; -#endif - - png_debug(1,"in png_do_read_interlace\n"); - - if (mmx_supported == 2) { - /* this should have happened in png_init_mmx_flags() already */ - png_warning(png_ptr, "asm_flags may not have been initialized"); - png_mmx_support(); - } - - if (row != NULL && row_info != NULL) - { - png_uint_32 final_width; - - final_width = row_info->width * png_pass_inc[pass]; - - switch (row_info->pixel_depth) - { - case 1: - { - png_bytep sp, dp; - int sshift, dshift; - int s_start, s_end, s_inc; - png_byte v; - png_uint_32 i; - int j; - - sp = row + (png_size_t)((row_info->width - 1) >> 3); - dp = row + (png_size_t)((final_width - 1) >> 3); -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (transformations & PNG_PACKSWAP) - { - sshift = (int)((row_info->width + 7) & 7); - dshift = (int)((final_width + 7) & 7); - s_start = 7; - s_end = 0; - s_inc = -1; - } - else -#endif - { - sshift = 7 - (int)((row_info->width + 7) & 7); - dshift = 7 - (int)((final_width + 7) & 7); - s_start = 0; - s_end = 7; - s_inc = 1; - } - - for (i = row_info->width; i; i--) - { - v = (png_byte)((*sp >> sshift) & 0x1); - for (j = 0; j < png_pass_inc[pass]; j++) - { - *dp &= (png_byte)((0x7f7f >> (7 - dshift)) & 0xff); - *dp |= (png_byte)(v << dshift); - if (dshift == s_end) - { - dshift = s_start; - dp--; - } - else - dshift += s_inc; - } - if (sshift == s_end) - { - sshift = s_start; - sp--; - } - else - sshift += s_inc; - } - break; - } - - case 2: - { - png_bytep sp, dp; - int sshift, dshift; - int s_start, s_end, s_inc; - png_uint_32 i; - - sp = row + (png_size_t)((row_info->width - 1) >> 2); - dp = row + (png_size_t)((final_width - 1) >> 2); -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (transformations & PNG_PACKSWAP) - { - sshift = (png_size_t)(((row_info->width + 3) & 3) << 1); - dshift = (png_size_t)(((final_width + 3) & 3) << 1); - s_start = 6; - s_end = 0; - s_inc = -2; - } - else -#endif - { - sshift = (png_size_t)((3 - ((row_info->width + 3) & 3)) << 1); - dshift = (png_size_t)((3 - ((final_width + 3) & 3)) << 1); - s_start = 0; - s_end = 6; - s_inc = 2; - } - - for (i = row_info->width; i; i--) - { - png_byte v; - int j; - - v = (png_byte)((*sp >> sshift) & 0x3); - for (j = 0; j < png_pass_inc[pass]; j++) - { - *dp &= (png_byte)((0x3f3f >> (6 - dshift)) & 0xff); - *dp |= (png_byte)(v << dshift); - if (dshift == s_end) - { - dshift = s_start; - dp--; - } - else - dshift += s_inc; - } - if (sshift == s_end) - { - sshift = s_start; - sp--; - } - else - sshift += s_inc; - } - break; - } - - case 4: - { - png_bytep sp, dp; - int sshift, dshift; - int s_start, s_end, s_inc; - png_uint_32 i; - - sp = row + (png_size_t)((row_info->width - 1) >> 1); - dp = row + (png_size_t)((final_width - 1) >> 1); -#if defined(PNG_READ_PACKSWAP_SUPPORTED) - if (transformations & PNG_PACKSWAP) - { - sshift = (png_size_t)(((row_info->width + 1) & 1) << 2); - dshift = (png_size_t)(((final_width + 1) & 1) << 2); - s_start = 4; - s_end = 0; - s_inc = -4; - } - else -#endif - { - sshift = (png_size_t)((1 - ((row_info->width + 1) & 1)) << 2); - dshift = (png_size_t)((1 - ((final_width + 1) & 1)) << 2); - s_start = 0; - s_end = 4; - s_inc = 4; - } - - for (i = row_info->width; i; i--) - { - png_byte v; - int j; - - v = (png_byte)((*sp >> sshift) & 0xf); - for (j = 0; j < png_pass_inc[pass]; j++) - { - *dp &= (png_byte)((0xf0f >> (4 - dshift)) & 0xff); - *dp |= (png_byte)(v << dshift); - if (dshift == s_end) - { - dshift = s_start; - dp--; - } - else - dshift += s_inc; - } - if (sshift == s_end) - { - sshift = s_start; - sp--; - } - else - sshift += s_inc; - } - break; - } - - default: // This is the place where the routine is modified - { - __int64 const4 = 0x0000000000FFFFFF; - // __int64 const5 = 0x000000FFFFFF0000; // unused... - __int64 const6 = 0x00000000000000FF; - png_bytep sptr, dp; - png_uint_32 i; - png_size_t pixel_bytes; - int width = row_info->width; - - pixel_bytes = (row_info->pixel_depth >> 3); - - sptr = row + (width - 1) * pixel_bytes; - dp = row + (final_width - 1) * pixel_bytes; - // New code by Nirav Chhatrapati - Intel Corporation - // sign fix by GRR - // NOTE: there is NO MMX code for 48-bit and 64-bit images - - // use MMX routine if machine supports it - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_INTERLACE) - /* && mmx_supported */ ) - { - if (pixel_bytes == 3) - { - if (((pass == 0) || (pass == 1)) && width) - { - _asm - { - mov esi, sptr - mov edi, dp - mov ecx, width - sub edi, 21 // (png_pass_inc[pass] - 1)*pixel_bytes -loop_pass0: - movd mm0, [esi] ; X X X X X v2 v1 v0 - pand mm0, const4 ; 0 0 0 0 0 v2 v1 v0 - movq mm1, mm0 ; 0 0 0 0 0 v2 v1 v0 - psllq mm0, 16 ; 0 0 0 v2 v1 v0 0 0 - movq mm2, mm0 ; 0 0 0 v2 v1 v0 0 0 - psllq mm0, 24 ; v2 v1 v0 0 0 0 0 0 - psrlq mm1, 8 ; 0 0 0 0 0 0 v2 v1 - por mm0, mm2 ; v2 v1 v0 v2 v1 v0 0 0 - por mm0, mm1 ; v2 v1 v0 v2 v1 v0 v2 v1 - movq mm3, mm0 ; v2 v1 v0 v2 v1 v0 v2 v1 - psllq mm0, 16 ; v0 v2 v1 v0 v2 v1 0 0 - movq mm4, mm3 ; v2 v1 v0 v2 v1 v0 v2 v1 - punpckhdq mm3, mm0 ; v0 v2 v1 v0 v2 v1 v0 v2 - movq [edi+16] , mm4 - psrlq mm0, 32 ; 0 0 0 0 v0 v2 v1 v0 - movq [edi+8] , mm3 - punpckldq mm0, mm4 ; v1 v0 v2 v1 v0 v2 v1 v0 - sub esi, 3 - movq [edi], mm0 - sub edi, 24 - //sub esi, 3 - dec ecx - jnz loop_pass0 - EMMS - } - } - else if (((pass == 2) || (pass == 3)) && width) - { - _asm - { - mov esi, sptr - mov edi, dp - mov ecx, width - sub edi, 9 // (png_pass_inc[pass] - 1)*pixel_bytes -loop_pass2: - movd mm0, [esi] ; X X X X X v2 v1 v0 - pand mm0, const4 ; 0 0 0 0 0 v2 v1 v0 - movq mm1, mm0 ; 0 0 0 0 0 v2 v1 v0 - psllq mm0, 16 ; 0 0 0 v2 v1 v0 0 0 - movq mm2, mm0 ; 0 0 0 v2 v1 v0 0 0 - psllq mm0, 24 ; v2 v1 v0 0 0 0 0 0 - psrlq mm1, 8 ; 0 0 0 0 0 0 v2 v1 - por mm0, mm2 ; v2 v1 v0 v2 v1 v0 0 0 - por mm0, mm1 ; v2 v1 v0 v2 v1 v0 v2 v1 - movq [edi+4], mm0 ; move to memory - psrlq mm0, 16 ; 0 0 v2 v1 v0 v2 v1 v0 - movd [edi], mm0 ; move to memory - sub esi, 3 - sub edi, 12 - dec ecx - jnz loop_pass2 - EMMS - } - } - else if (width) /* && ((pass == 4) || (pass == 5)) */ - { - int width_mmx = ((width >> 1) << 1) - 8; - if (width_mmx < 0) - width_mmx = 0; - width -= width_mmx; // 8 or 9 pix, 24 or 27 bytes - if (width_mmx) - { - _asm - { - mov esi, sptr - mov edi, dp - mov ecx, width_mmx - sub esi, 3 - sub edi, 9 -loop_pass4: - movq mm0, [esi] ; X X v2 v1 v0 v5 v4 v3 - movq mm7, mm0 ; X X v2 v1 v0 v5 v4 v3 - movq mm6, mm0 ; X X v2 v1 v0 v5 v4 v3 - psllq mm0, 24 ; v1 v0 v5 v4 v3 0 0 0 - pand mm7, const4 ; 0 0 0 0 0 v5 v4 v3 - psrlq mm6, 24 ; 0 0 0 X X v2 v1 v0 - por mm0, mm7 ; v1 v0 v5 v4 v3 v5 v4 v3 - movq mm5, mm6 ; 0 0 0 X X v2 v1 v0 - psllq mm6, 8 ; 0 0 X X v2 v1 v0 0 - movq [edi], mm0 ; move quad to memory - psrlq mm5, 16 ; 0 0 0 0 0 X X v2 - pand mm5, const6 ; 0 0 0 0 0 0 0 v2 - por mm6, mm5 ; 0 0 X X v2 v1 v0 v2 - movd [edi+8], mm6 ; move double to memory - sub esi, 6 - sub edi, 12 - sub ecx, 2 - jnz loop_pass4 - EMMS - } - } - - sptr -= width_mmx*3; - dp -= width_mmx*6; - for (i = width; i; i--) - { - png_byte v[8]; - int j; - - png_memcpy(v, sptr, 3); - for (j = 0; j < png_pass_inc[pass]; j++) - { - png_memcpy(dp, v, 3); - dp -= 3; - } - sptr -= 3; - } - } - } /* end of pixel_bytes == 3 */ - - else if (pixel_bytes == 1) - { - if (((pass == 0) || (pass == 1)) && width) - { - int width_mmx = ((width >> 2) << 2); - width -= width_mmx; - if (width_mmx) - { - _asm - { - mov esi, sptr - mov edi, dp - mov ecx, width_mmx - sub edi, 31 - sub esi, 3 -loop1_pass0: - movd mm0, [esi] ; X X X X v0 v1 v2 v3 - movq mm1, mm0 ; X X X X v0 v1 v2 v3 - punpcklbw mm0, mm0 ; v0 v0 v1 v1 v2 v2 v3 v3 - movq mm2, mm0 ; v0 v0 v1 v1 v2 v2 v3 v3 - punpcklwd mm0, mm0 ; v2 v2 v2 v2 v3 v3 v3 v3 - movq mm3, mm0 ; v2 v2 v2 v2 v3 v3 v3 v3 - punpckldq mm0, mm0 ; v3 v3 v3 v3 v3 v3 v3 v3 - punpckhdq mm3, mm3 ; v2 v2 v2 v2 v2 v2 v2 v2 - movq [edi], mm0 ; move to memory v3 - punpckhwd mm2, mm2 ; v0 v0 v0 v0 v1 v1 v1 v1 - movq [edi+8], mm3 ; move to memory v2 - movq mm4, mm2 ; v0 v0 v0 v0 v1 v1 v1 v1 - punpckldq mm2, mm2 ; v1 v1 v1 v1 v1 v1 v1 v1 - punpckhdq mm4, mm4 ; v0 v0 v0 v0 v0 v0 v0 v0 - movq [edi+16], mm2 ; move to memory v1 - movq [edi+24], mm4 ; move to memory v0 - sub esi, 4 - sub edi, 32 - sub ecx, 4 - jnz loop1_pass0 - EMMS - } - } - - sptr -= width_mmx; - dp -= width_mmx*8; - for (i = width; i; i--) - { - int j; - - /* I simplified this part in version 1.0.4e - * here and in several other instances where - * pixel_bytes == 1 -- GR-P - * - * Original code: - * - * png_byte v[8]; - * png_memcpy(v, sptr, pixel_bytes); - * for (j = 0; j < png_pass_inc[pass]; j++) - * { - * png_memcpy(dp, v, pixel_bytes); - * dp -= pixel_bytes; - * } - * sptr -= pixel_bytes; - * - * Replacement code is in the next three lines: - */ - - for (j = 0; j < png_pass_inc[pass]; j++) - *dp-- = *sptr; - sptr--; - } - } - else if (((pass == 2) || (pass == 3)) && width) - { - int width_mmx = ((width >> 2) << 2); - width -= width_mmx; - if (width_mmx) - { - _asm - { - mov esi, sptr - mov edi, dp - mov ecx, width_mmx - sub edi, 15 - sub esi, 3 -loop1_pass2: - movd mm0, [esi] ; X X X X v0 v1 v2 v3 - punpcklbw mm0, mm0 ; v0 v0 v1 v1 v2 v2 v3 v3 - movq mm1, mm0 ; v0 v0 v1 v1 v2 v2 v3 v3 - punpcklwd mm0, mm0 ; v2 v2 v2 v2 v3 v3 v3 v3 - punpckhwd mm1, mm1 ; v0 v0 v0 v0 v1 v1 v1 v1 - movq [edi], mm0 ; move to memory v2 and v3 - sub esi, 4 - movq [edi+8], mm1 ; move to memory v1 and v0 - sub edi, 16 - sub ecx, 4 - jnz loop1_pass2 - EMMS - } - } - - sptr -= width_mmx; - dp -= width_mmx*4; - for (i = width; i; i--) - { - int j; - - for (j = 0; j < png_pass_inc[pass]; j++) - { - *dp-- = *sptr; - } - sptr --; - } - } - else if (width) /* && ((pass == 4) || (pass == 5))) */ - { - int width_mmx = ((width >> 3) << 3); - width -= width_mmx; - if (width_mmx) - { - _asm - { - mov esi, sptr - mov edi, dp - mov ecx, width_mmx - sub edi, 15 - sub esi, 7 -loop1_pass4: - movq mm0, [esi] ; v0 v1 v2 v3 v4 v5 v6 v7 - movq mm1, mm0 ; v0 v1 v2 v3 v4 v5 v6 v7 - punpcklbw mm0, mm0 ; v4 v4 v5 v5 v6 v6 v7 v7 - //movq mm1, mm0 ; v0 v0 v1 v1 v2 v2 v3 v3 - punpckhbw mm1, mm1 ;v0 v0 v1 v1 v2 v2 v3 v3 - movq [edi+8], mm1 ; move to memory v0 v1 v2 and v3 - sub esi, 8 - movq [edi], mm0 ; move to memory v4 v5 v6 and v7 - //sub esi, 4 - sub edi, 16 - sub ecx, 8 - jnz loop1_pass4 - EMMS - } - } - - sptr -= width_mmx; - dp -= width_mmx*2; - for (i = width; i; i--) - { - int j; - - for (j = 0; j < png_pass_inc[pass]; j++) - { - *dp-- = *sptr; - } - sptr --; - } - } - } /* end of pixel_bytes == 1 */ - - else if (pixel_bytes == 2) - { - if (((pass == 0) || (pass == 1)) && width) - { - int width_mmx = ((width >> 1) << 1); - width -= width_mmx; - if (width_mmx) - { - _asm - { - mov esi, sptr - mov edi, dp - mov ecx, width_mmx - sub esi, 2 - sub edi, 30 -loop2_pass0: - movd mm0, [esi] ; X X X X v1 v0 v3 v2 - punpcklwd mm0, mm0 ; v1 v0 v1 v0 v3 v2 v3 v2 - movq mm1, mm0 ; v1 v0 v1 v0 v3 v2 v3 v2 - punpckldq mm0, mm0 ; v3 v2 v3 v2 v3 v2 v3 v2 - punpckhdq mm1, mm1 ; v1 v0 v1 v0 v1 v0 v1 v0 - movq [edi], mm0 - movq [edi + 8], mm0 - movq [edi + 16], mm1 - movq [edi + 24], mm1 - sub esi, 4 - sub edi, 32 - sub ecx, 2 - jnz loop2_pass0 - EMMS - } - } - - sptr -= (width_mmx*2 - 2); // sign fixed - dp -= (width_mmx*16 - 2); // sign fixed - for (i = width; i; i--) - { - png_byte v[8]; - int j; - sptr -= 2; - png_memcpy(v, sptr, 2); - for (j = 0; j < png_pass_inc[pass]; j++) - { - dp -= 2; - png_memcpy(dp, v, 2); - } - } - } - else if (((pass == 2) || (pass == 3)) && width) - { - int width_mmx = ((width >> 1) << 1) ; - width -= width_mmx; - if (width_mmx) - { - _asm - { - mov esi, sptr - mov edi, dp - mov ecx, width_mmx - sub esi, 2 - sub edi, 14 -loop2_pass2: - movd mm0, [esi] ; X X X X v1 v0 v3 v2 - punpcklwd mm0, mm0 ; v1 v0 v1 v0 v3 v2 v3 v2 - movq mm1, mm0 ; v1 v0 v1 v0 v3 v2 v3 v2 - punpckldq mm0, mm0 ; v3 v2 v3 v2 v3 v2 v3 v2 - punpckhdq mm1, mm1 ; v1 v0 v1 v0 v1 v0 v1 v0 - movq [edi], mm0 - sub esi, 4 - movq [edi + 8], mm1 - //sub esi, 4 - sub edi, 16 - sub ecx, 2 - jnz loop2_pass2 - EMMS - } - } - - sptr -= (width_mmx*2 - 2); // sign fixed - dp -= (width_mmx*8 - 2); // sign fixed - for (i = width; i; i--) - { - png_byte v[8]; - int j; - sptr -= 2; - png_memcpy(v, sptr, 2); - for (j = 0; j < png_pass_inc[pass]; j++) - { - dp -= 2; - png_memcpy(dp, v, 2); - } - } - } - else if (width) // pass == 4 or 5 - { - int width_mmx = ((width >> 1) << 1) ; - width -= width_mmx; - if (width_mmx) - { - _asm - { - mov esi, sptr - mov edi, dp - mov ecx, width_mmx - sub esi, 2 - sub edi, 6 -loop2_pass4: - movd mm0, [esi] ; X X X X v1 v0 v3 v2 - punpcklwd mm0, mm0 ; v1 v0 v1 v0 v3 v2 v3 v2 - sub esi, 4 - movq [edi], mm0 - sub edi, 8 - sub ecx, 2 - jnz loop2_pass4 - EMMS - } - } - - sptr -= (width_mmx*2 - 2); // sign fixed - dp -= (width_mmx*4 - 2); // sign fixed - for (i = width; i; i--) - { - png_byte v[8]; - int j; - sptr -= 2; - png_memcpy(v, sptr, 2); - for (j = 0; j < png_pass_inc[pass]; j++) - { - dp -= 2; - png_memcpy(dp, v, 2); - } - } - } - } /* end of pixel_bytes == 2 */ - - else if (pixel_bytes == 4) - { - if (((pass == 0) || (pass == 1)) && width) - { - int width_mmx = ((width >> 1) << 1) ; - width -= width_mmx; - if (width_mmx) - { - _asm - { - mov esi, sptr - mov edi, dp - mov ecx, width_mmx - sub esi, 4 - sub edi, 60 -loop4_pass0: - movq mm0, [esi] ; v3 v2 v1 v0 v7 v6 v5 v4 - movq mm1, mm0 ; v3 v2 v1 v0 v7 v6 v5 v4 - punpckldq mm0, mm0 ; v7 v6 v5 v4 v7 v6 v5 v4 - punpckhdq mm1, mm1 ; v3 v2 v1 v0 v3 v2 v1 v0 - movq [edi], mm0 - movq [edi + 8], mm0 - movq [edi + 16], mm0 - movq [edi + 24], mm0 - movq [edi+32], mm1 - movq [edi + 40], mm1 - movq [edi+ 48], mm1 - sub esi, 8 - movq [edi + 56], mm1 - sub edi, 64 - sub ecx, 2 - jnz loop4_pass0 - EMMS - } - } - - sptr -= (width_mmx*4 - 4); // sign fixed - dp -= (width_mmx*32 - 4); // sign fixed - for (i = width; i; i--) - { - png_byte v[8]; - int j; - sptr -= 4; - png_memcpy(v, sptr, 4); - for (j = 0; j < png_pass_inc[pass]; j++) - { - dp -= 4; - png_memcpy(dp, v, 4); - } - } - } - else if (((pass == 2) || (pass == 3)) && width) - { - int width_mmx = ((width >> 1) << 1) ; - width -= width_mmx; - if (width_mmx) - { - _asm - { - mov esi, sptr - mov edi, dp - mov ecx, width_mmx - sub esi, 4 - sub edi, 28 -loop4_pass2: - movq mm0, [esi] ; v3 v2 v1 v0 v7 v6 v5 v4 - movq mm1, mm0 ; v3 v2 v1 v0 v7 v6 v5 v4 - punpckldq mm0, mm0 ; v7 v6 v5 v4 v7 v6 v5 v4 - punpckhdq mm1, mm1 ; v3 v2 v1 v0 v3 v2 v1 v0 - movq [edi], mm0 - movq [edi + 8], mm0 - movq [edi+16], mm1 - movq [edi + 24], mm1 - sub esi, 8 - sub edi, 32 - sub ecx, 2 - jnz loop4_pass2 - EMMS - } - } - - sptr -= (width_mmx*4 - 4); // sign fixed - dp -= (width_mmx*16 - 4); // sign fixed - for (i = width; i; i--) - { - png_byte v[8]; - int j; - sptr -= 4; - png_memcpy(v, sptr, 4); - for (j = 0; j < png_pass_inc[pass]; j++) - { - dp -= 4; - png_memcpy(dp, v, 4); - } - } - } - else if (width) // pass == 4 or 5 - { - int width_mmx = ((width >> 1) << 1) ; - width -= width_mmx; - if (width_mmx) - { - _asm - { - mov esi, sptr - mov edi, dp - mov ecx, width_mmx - sub esi, 4 - sub edi, 12 -loop4_pass4: - movq mm0, [esi] ; v3 v2 v1 v0 v7 v6 v5 v4 - movq mm1, mm0 ; v3 v2 v1 v0 v7 v6 v5 v4 - punpckldq mm0, mm0 ; v7 v6 v5 v4 v7 v6 v5 v4 - punpckhdq mm1, mm1 ; v3 v2 v1 v0 v3 v2 v1 v0 - movq [edi], mm0 - sub esi, 8 - movq [edi + 8], mm1 - sub edi, 16 - sub ecx, 2 - jnz loop4_pass4 - EMMS - } - } - - sptr -= (width_mmx*4 - 4); // sign fixed - dp -= (width_mmx*8 - 4); // sign fixed - for (i = width; i; i--) - { - png_byte v[8]; - int j; - sptr -= 4; - png_memcpy(v, sptr, 4); - for (j = 0; j < png_pass_inc[pass]; j++) - { - dp -= 4; - png_memcpy(dp, v, 4); - } - } - } - - } /* end of pixel_bytes == 4 */ - - else if (pixel_bytes == 6) - { - for (i = width; i; i--) - { - png_byte v[8]; - int j; - png_memcpy(v, sptr, 6); - for (j = 0; j < png_pass_inc[pass]; j++) - { - png_memcpy(dp, v, 6); - dp -= 6; - } - sptr -= 6; - } - } /* end of pixel_bytes == 6 */ - - else - { - for (i = width; i; i--) - { - png_byte v[8]; - int j; - png_memcpy(v, sptr, pixel_bytes); - for (j = 0; j < png_pass_inc[pass]; j++) - { - png_memcpy(dp, v, pixel_bytes); - dp -= pixel_bytes; - } - sptr-= pixel_bytes; - } - } - } /* end of mmx_supported */ - - else /* MMX not supported: use modified C code - takes advantage - * of inlining of memcpy for a constant */ - { - if (pixel_bytes == 1) - { - for (i = width; i; i--) - { - int j; - for (j = 0; j < png_pass_inc[pass]; j++) - *dp-- = *sptr; - sptr--; - } - } - else if (pixel_bytes == 3) - { - for (i = width; i; i--) - { - png_byte v[8]; - int j; - png_memcpy(v, sptr, pixel_bytes); - for (j = 0; j < png_pass_inc[pass]; j++) - { - png_memcpy(dp, v, pixel_bytes); - dp -= pixel_bytes; - } - sptr -= pixel_bytes; - } - } - else if (pixel_bytes == 2) - { - for (i = width; i; i--) - { - png_byte v[8]; - int j; - png_memcpy(v, sptr, pixel_bytes); - for (j = 0; j < png_pass_inc[pass]; j++) - { - png_memcpy(dp, v, pixel_bytes); - dp -= pixel_bytes; - } - sptr -= pixel_bytes; - } - } - else if (pixel_bytes == 4) - { - for (i = width; i; i--) - { - png_byte v[8]; - int j; - png_memcpy(v, sptr, pixel_bytes); - for (j = 0; j < png_pass_inc[pass]; j++) - { - png_memcpy(dp, v, pixel_bytes); - dp -= pixel_bytes; - } - sptr -= pixel_bytes; - } - } - else if (pixel_bytes == 6) - { - for (i = width; i; i--) - { - png_byte v[8]; - int j; - png_memcpy(v, sptr, pixel_bytes); - for (j = 0; j < png_pass_inc[pass]; j++) - { - png_memcpy(dp, v, pixel_bytes); - dp -= pixel_bytes; - } - sptr -= pixel_bytes; - } - } - else - { - for (i = width; i; i--) - { - png_byte v[8]; - int j; - png_memcpy(v, sptr, pixel_bytes); - for (j = 0; j < png_pass_inc[pass]; j++) - { - png_memcpy(dp, v, pixel_bytes); - dp -= pixel_bytes; - } - sptr -= pixel_bytes; - } - } - - } /* end of MMX not supported */ - break; - } - } /* end switch (row_info->pixel_depth) */ - - row_info->width = final_width; - row_info->rowbytes = ((final_width * - (png_uint_32)row_info->pixel_depth + 7) >> 3); - } - -} - -#endif /* PNG_READ_INTERLACING_SUPPORTED */ - - -// These variables are utilized in the functions below. They are declared -// globally here to ensure alignment on 8-byte boundaries. - -union uAll { - __int64 use; - double align; -} LBCarryMask = {0x0101010101010101}, - HBClearMask = {0x7f7f7f7f7f7f7f7f}, - ActiveMask, ActiveMask2, ActiveMaskEnd, ShiftBpp, ShiftRem; - - -// Optimized code for PNG Average filter decoder -void /* PRIVATE */ -png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row - , png_bytep prev_row) -{ - int bpp; - png_uint_32 FullLength; - png_uint_32 MMXLength; - //png_uint_32 len; - int diff; - - bpp = (row_info->pixel_depth + 7) >> 3; // Get # bytes per pixel - FullLength = row_info->rowbytes; // # of bytes to filter - _asm { - // Init address pointers and offset - mov edi, row // edi ==> Avg(x) - xor ebx, ebx // ebx ==> x - mov edx, edi - mov esi, prev_row // esi ==> Prior(x) - sub edx, bpp // edx ==> Raw(x-bpp) - - xor eax, eax - // Compute the Raw value for the first bpp bytes - // Raw(x) = Avg(x) + (Prior(x)/2) -davgrlp: - mov al, [esi + ebx] // Load al with Prior(x) - inc ebx - shr al, 1 // divide by 2 - add al, [edi+ebx-1] // Add Avg(x); -1 to offset inc ebx - cmp ebx, bpp - mov [edi+ebx-1], al // Write back Raw(x); - // mov does not affect flags; -1 to offset inc ebx - jb davgrlp - // get # of bytes to alignment - mov diff, edi // take start of row - add diff, ebx // add bpp - add diff, 0xf // add 7 + 8 to incr past alignment boundary - and diff, 0xfffffff8 // mask to alignment boundary - sub diff, edi // subtract from start ==> value ebx at alignment - jz davggo - // fix alignment - // Compute the Raw value for the bytes upto the alignment boundary - // Raw(x) = Avg(x) + ((Raw(x-bpp) + Prior(x))/2) - xor ecx, ecx -davglp1: - xor eax, eax - mov cl, [esi + ebx] // load cl with Prior(x) - mov al, [edx + ebx] // load al with Raw(x-bpp) - add ax, cx - inc ebx - shr ax, 1 // divide by 2 - add al, [edi+ebx-1] // Add Avg(x); -1 to offset inc ebx - cmp ebx, diff // Check if at alignment boundary - mov [edi+ebx-1], al // Write back Raw(x); - // mov does not affect flags; -1 to offset inc ebx - jb davglp1 // Repeat until at alignment boundary -davggo: - mov eax, FullLength - mov ecx, eax - sub eax, ebx // subtract alignment fix - and eax, 0x00000007 // calc bytes over mult of 8 - sub ecx, eax // drop over bytes from original length - mov MMXLength, ecx - } // end _asm block - // Now do the math for the rest of the row - switch ( bpp ) - { - case 3: - { - ActiveMask.use = 0x0000000000ffffff; - ShiftBpp.use = 24; // == 3 * 8 - ShiftRem.use = 40; // == 64 - 24 - _asm { - // Re-init address pointers and offset - movq mm7, ActiveMask - mov ebx, diff // ebx ==> x = offset to alignment boundary - movq mm5, LBCarryMask - mov edi, row // edi ==> Avg(x) - movq mm4, HBClearMask - mov esi, prev_row // esi ==> Prior(x) - // PRIME the pump (load the first Raw(x-bpp) data set - movq mm2, [edi + ebx - 8] // Load previous aligned 8 bytes - // (we correct position in loop below) -davg3lp: - movq mm0, [edi + ebx] // Load mm0 with Avg(x) - // Add (Prev_row/2) to Average - movq mm3, mm5 - psrlq mm2, ShiftRem // Correct position Raw(x-bpp) data - movq mm1, [esi + ebx] // Load mm1 with Prior(x) - movq mm6, mm7 - pand mm3, mm1 // get lsb for each prev_row byte - psrlq mm1, 1 // divide prev_row bytes by 2 - pand mm1, mm4 // clear invalid bit 7 of each byte - paddb mm0, mm1 // add (Prev_row/2) to Avg for each byte - // Add 1st active group (Raw(x-bpp)/2) to Average with LBCarry - movq mm1, mm3 // now use mm1 for getting LBCarrys - pand mm1, mm2 // get LBCarrys for each byte where both - // lsb's were == 1 (Only valid for active group) - psrlq mm2, 1 // divide raw bytes by 2 - pand mm2, mm4 // clear invalid bit 7 of each byte - paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte - pand mm2, mm6 // Leave only Active Group 1 bytes to add to Avg - paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active - // byte - // Add 2nd active group (Raw(x-bpp)/2) to Average with LBCarry - psllq mm6, ShiftBpp // shift the mm6 mask to cover bytes 3-5 - movq mm2, mm0 // mov updated Raws to mm2 - psllq mm2, ShiftBpp // shift data to position correctly - movq mm1, mm3 // now use mm1 for getting LBCarrys - pand mm1, mm2 // get LBCarrys for each byte where both - // lsb's were == 1 (Only valid for active group) - psrlq mm2, 1 // divide raw bytes by 2 - pand mm2, mm4 // clear invalid bit 7 of each byte - paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte - pand mm2, mm6 // Leave only Active Group 2 bytes to add to Avg - paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active - // byte - - // Add 3rd active group (Raw(x-bpp)/2) to Average with LBCarry - psllq mm6, ShiftBpp // shift the mm6 mask to cover the last two - // bytes - movq mm2, mm0 // mov updated Raws to mm2 - psllq mm2, ShiftBpp // shift data to position correctly - // Data only needs to be shifted once here to - // get the correct x-bpp offset. - movq mm1, mm3 // now use mm1 for getting LBCarrys - pand mm1, mm2 // get LBCarrys for each byte where both - // lsb's were == 1 (Only valid for active group) - psrlq mm2, 1 // divide raw bytes by 2 - pand mm2, mm4 // clear invalid bit 7 of each byte - paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte - pand mm2, mm6 // Leave only Active Group 2 bytes to add to Avg - add ebx, 8 - paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active - // byte - - // Now ready to write back to memory - movq [edi + ebx - 8], mm0 - // Move updated Raw(x) to use as Raw(x-bpp) for next loop - cmp ebx, MMXLength - movq mm2, mm0 // mov updated Raw(x) to mm2 - jb davg3lp - } // end _asm block - } - break; - - case 6: - case 4: - case 7: - case 5: - { - ActiveMask.use = 0xffffffffffffffff; // use shift below to clear - // appropriate inactive bytes - ShiftBpp.use = bpp << 3; - ShiftRem.use = 64 - ShiftBpp.use; - _asm { - movq mm4, HBClearMask - // Re-init address pointers and offset - mov ebx, diff // ebx ==> x = offset to alignment boundary - // Load ActiveMask and clear all bytes except for 1st active group - movq mm7, ActiveMask - mov edi, row // edi ==> Avg(x) - psrlq mm7, ShiftRem - mov esi, prev_row // esi ==> Prior(x) - movq mm6, mm7 - movq mm5, LBCarryMask - psllq mm6, ShiftBpp // Create mask for 2nd active group - // PRIME the pump (load the first Raw(x-bpp) data set - movq mm2, [edi + ebx - 8] // Load previous aligned 8 bytes - // (we correct position in loop below) -davg4lp: - movq mm0, [edi + ebx] - psrlq mm2, ShiftRem // shift data to position correctly - movq mm1, [esi + ebx] - // Add (Prev_row/2) to Average - movq mm3, mm5 - pand mm3, mm1 // get lsb for each prev_row byte - psrlq mm1, 1 // divide prev_row bytes by 2 - pand mm1, mm4 // clear invalid bit 7 of each byte - paddb mm0, mm1 // add (Prev_row/2) to Avg for each byte - // Add 1st active group (Raw(x-bpp)/2) to Average with LBCarry - movq mm1, mm3 // now use mm1 for getting LBCarrys - pand mm1, mm2 // get LBCarrys for each byte where both - // lsb's were == 1 (Only valid for active group) - psrlq mm2, 1 // divide raw bytes by 2 - pand mm2, mm4 // clear invalid bit 7 of each byte - paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte - pand mm2, mm7 // Leave only Active Group 1 bytes to add to Avg - paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active - // byte - // Add 2nd active group (Raw(x-bpp)/2) to Average with LBCarry - movq mm2, mm0 // mov updated Raws to mm2 - psllq mm2, ShiftBpp // shift data to position correctly - add ebx, 8 - movq mm1, mm3 // now use mm1 for getting LBCarrys - pand mm1, mm2 // get LBCarrys for each byte where both - // lsb's were == 1 (Only valid for active group) - psrlq mm2, 1 // divide raw bytes by 2 - pand mm2, mm4 // clear invalid bit 7 of each byte - paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte - pand mm2, mm6 // Leave only Active Group 2 bytes to add to Avg - paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active - // byte - cmp ebx, MMXLength - // Now ready to write back to memory - movq [edi + ebx - 8], mm0 - // Prep Raw(x-bpp) for next loop - movq mm2, mm0 // mov updated Raws to mm2 - jb davg4lp - } // end _asm block - } - break; - case 2: - { - ActiveMask.use = 0x000000000000ffff; - ShiftBpp.use = 16; // == 2 * 8 [BUGFIX] - ShiftRem.use = 48; // == 64 - 16 [BUGFIX] - _asm { - // Load ActiveMask - movq mm7, ActiveMask - // Re-init address pointers and offset - mov ebx, diff // ebx ==> x = offset to alignment boundary - movq mm5, LBCarryMask - mov edi, row // edi ==> Avg(x) - movq mm4, HBClearMask - mov esi, prev_row // esi ==> Prior(x) - // PRIME the pump (load the first Raw(x-bpp) data set - movq mm2, [edi + ebx - 8] // Load previous aligned 8 bytes - // (we correct position in loop below) -davg2lp: - movq mm0, [edi + ebx] - psrlq mm2, ShiftRem // shift data to position correctly [BUGFIX] - movq mm1, [esi + ebx] - // Add (Prev_row/2) to Average - movq mm3, mm5 - pand mm3, mm1 // get lsb for each prev_row byte - psrlq mm1, 1 // divide prev_row bytes by 2 - pand mm1, mm4 // clear invalid bit 7 of each byte - movq mm6, mm7 - paddb mm0, mm1 // add (Prev_row/2) to Avg for each byte - // Add 1st active group (Raw(x-bpp)/2) to Average with LBCarry - movq mm1, mm3 // now use mm1 for getting LBCarrys - pand mm1, mm2 // get LBCarrys for each byte where both - // lsb's were == 1 (Only valid for active group) - psrlq mm2, 1 // divide raw bytes by 2 - pand mm2, mm4 // clear invalid bit 7 of each byte - paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte - pand mm2, mm6 // Leave only Active Group 1 bytes to add to Avg - paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active byte - // Add 2nd active group (Raw(x-bpp)/2) to Average with LBCarry - psllq mm6, ShiftBpp // shift the mm6 mask to cover bytes 2 & 3 - movq mm2, mm0 // mov updated Raws to mm2 - psllq mm2, ShiftBpp // shift data to position correctly - movq mm1, mm3 // now use mm1 for getting LBCarrys - pand mm1, mm2 // get LBCarrys for each byte where both - // lsb's were == 1 (Only valid for active group) - psrlq mm2, 1 // divide raw bytes by 2 - pand mm2, mm4 // clear invalid bit 7 of each byte - paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte - pand mm2, mm6 // Leave only Active Group 2 bytes to add to Avg - paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active byte - - // Add rdd active group (Raw(x-bpp)/2) to Average with LBCarry - psllq mm6, ShiftBpp // shift the mm6 mask to cover bytes 4 & 5 - movq mm2, mm0 // mov updated Raws to mm2 - psllq mm2, ShiftBpp // shift data to position correctly - // Data only needs to be shifted once here to - // get the correct x-bpp offset. - movq mm1, mm3 // now use mm1 for getting LBCarrys - pand mm1, mm2 // get LBCarrys for each byte where both - // lsb's were == 1 (Only valid for active group) - psrlq mm2, 1 // divide raw bytes by 2 - pand mm2, mm4 // clear invalid bit 7 of each byte - paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte - pand mm2, mm6 // Leave only Active Group 2 bytes to add to Avg - paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active byte - - // Add 4th active group (Raw(x-bpp)/2) to Average with LBCarry - psllq mm6, ShiftBpp // shift the mm6 mask to cover bytes 6 & 7 - movq mm2, mm0 // mov updated Raws to mm2 - psllq mm2, ShiftBpp // shift data to position correctly - // Data only needs to be shifted once here to - // get the correct x-bpp offset. - add ebx, 8 - movq mm1, mm3 // now use mm1 for getting LBCarrys - pand mm1, mm2 // get LBCarrys for each byte where both - // lsb's were == 1 (Only valid for active group) - psrlq mm2, 1 // divide raw bytes by 2 - pand mm2, mm4 // clear invalid bit 7 of each byte - paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte - pand mm2, mm6 // Leave only Active Group 2 bytes to add to Avg - paddb mm0, mm2 // add (Raw/2) + LBCarrys to Avg for each Active byte - - cmp ebx, MMXLength - // Now ready to write back to memory - movq [edi + ebx - 8], mm0 - // Prep Raw(x-bpp) for next loop - movq mm2, mm0 // mov updated Raws to mm2 - jb davg2lp - } // end _asm block - } - break; - - case 1: // bpp == 1 - { - _asm { - // Re-init address pointers and offset - mov ebx, diff // ebx ==> x = offset to alignment boundary - mov edi, row // edi ==> Avg(x) - cmp ebx, FullLength // Test if offset at end of array - jnb davg1end - // Do Paeth decode for remaining bytes - mov esi, prev_row // esi ==> Prior(x) - mov edx, edi - xor ecx, ecx // zero ecx before using cl & cx in loop below - sub edx, bpp // edx ==> Raw(x-bpp) -davg1lp: - // Raw(x) = Avg(x) + ((Raw(x-bpp) + Prior(x))/2) - xor eax, eax - mov cl, [esi + ebx] // load cl with Prior(x) - mov al, [edx + ebx] // load al with Raw(x-bpp) - add ax, cx - inc ebx - shr ax, 1 // divide by 2 - add al, [edi+ebx-1] // Add Avg(x); -1 to offset inc ebx - cmp ebx, FullLength // Check if at end of array - mov [edi+ebx-1], al // Write back Raw(x); - // mov does not affect flags; -1 to offset inc ebx - jb davg1lp -davg1end: - } // end _asm block - } - return; - - case 8: // bpp == 8 - { - _asm { - // Re-init address pointers and offset - mov ebx, diff // ebx ==> x = offset to alignment boundary - movq mm5, LBCarryMask - mov edi, row // edi ==> Avg(x) - movq mm4, HBClearMask - mov esi, prev_row // esi ==> Prior(x) - // PRIME the pump (load the first Raw(x-bpp) data set - movq mm2, [edi + ebx - 8] // Load previous aligned 8 bytes - // (NO NEED to correct position in loop below) -davg8lp: - movq mm0, [edi + ebx] - movq mm3, mm5 - movq mm1, [esi + ebx] - add ebx, 8 - pand mm3, mm1 // get lsb for each prev_row byte - psrlq mm1, 1 // divide prev_row bytes by 2 - pand mm3, mm2 // get LBCarrys for each byte where both - // lsb's were == 1 - psrlq mm2, 1 // divide raw bytes by 2 - pand mm1, mm4 // clear invalid bit 7 of each byte - paddb mm0, mm3 // add LBCarrys to Avg for each byte - pand mm2, mm4 // clear invalid bit 7 of each byte - paddb mm0, mm1 // add (Prev_row/2) to Avg for each byte - paddb mm0, mm2 // add (Raw/2) to Avg for each byte - cmp ebx, MMXLength - movq [edi + ebx - 8], mm0 - movq mm2, mm0 // reuse as Raw(x-bpp) - jb davg8lp - } // end _asm block - } - break; - default: // bpp greater than 8 - { - _asm { - movq mm5, LBCarryMask - // Re-init address pointers and offset - mov ebx, diff // ebx ==> x = offset to alignment boundary - mov edi, row // edi ==> Avg(x) - movq mm4, HBClearMask - mov edx, edi - mov esi, prev_row // esi ==> Prior(x) - sub edx, bpp // edx ==> Raw(x-bpp) -davgAlp: - movq mm0, [edi + ebx] - movq mm3, mm5 - movq mm1, [esi + ebx] - pand mm3, mm1 // get lsb for each prev_row byte - movq mm2, [edx + ebx] - psrlq mm1, 1 // divide prev_row bytes by 2 - pand mm3, mm2 // get LBCarrys for each byte where both - // lsb's were == 1 - psrlq mm2, 1 // divide raw bytes by 2 - pand mm1, mm4 // clear invalid bit 7 of each byte - paddb mm0, mm3 // add LBCarrys to Avg for each byte - pand mm2, mm4 // clear invalid bit 7 of each byte - paddb mm0, mm1 // add (Prev_row/2) to Avg for each byte - add ebx, 8 - paddb mm0, mm2 // add (Raw/2) to Avg for each byte - cmp ebx, MMXLength - movq [edi + ebx - 8], mm0 - jb davgAlp - } // end _asm block - } - break; - } // end switch ( bpp ) - - _asm { - // MMX acceleration complete now do clean-up - // Check if any remaining bytes left to decode - mov ebx, MMXLength // ebx ==> x = offset bytes remaining after MMX - mov edi, row // edi ==> Avg(x) - cmp ebx, FullLength // Test if offset at end of array - jnb davgend - // Do Paeth decode for remaining bytes - mov esi, prev_row // esi ==> Prior(x) - mov edx, edi - xor ecx, ecx // zero ecx before using cl & cx in loop below - sub edx, bpp // edx ==> Raw(x-bpp) -davglp2: - // Raw(x) = Avg(x) + ((Raw(x-bpp) + Prior(x))/2) - xor eax, eax - mov cl, [esi + ebx] // load cl with Prior(x) - mov al, [edx + ebx] // load al with Raw(x-bpp) - add ax, cx - inc ebx - shr ax, 1 // divide by 2 - add al, [edi+ebx-1] // Add Avg(x); -1 to offset inc ebx - cmp ebx, FullLength // Check if at end of array - mov [edi+ebx-1], al // Write back Raw(x); - // mov does not affect flags; -1 to offset inc ebx - jb davglp2 -davgend: - emms // End MMX instructions; prep for possible FP instrs. - } // end _asm block -} - -// Optimized code for PNG Paeth filter decoder -void /* PRIVATE */ -png_read_filter_row_mmx_paeth(png_row_infop row_info, png_bytep row, - png_bytep prev_row) -{ - png_uint_32 FullLength; - png_uint_32 MMXLength; - //png_uint_32 len; - int bpp; - int diff; - //int ptemp; - int patemp, pbtemp, pctemp; - - bpp = (row_info->pixel_depth + 7) >> 3; // Get # bytes per pixel - FullLength = row_info->rowbytes; // # of bytes to filter - _asm - { - xor ebx, ebx // ebx ==> x offset - mov edi, row - xor edx, edx // edx ==> x-bpp offset - mov esi, prev_row - xor eax, eax - - // Compute the Raw value for the first bpp bytes - // Note: the formula works out to be always - // Paeth(x) = Raw(x) + Prior(x) where x < bpp -dpthrlp: - mov al, [edi + ebx] - add al, [esi + ebx] - inc ebx - cmp ebx, bpp - mov [edi + ebx - 1], al - jb dpthrlp - // get # of bytes to alignment - mov diff, edi // take start of row - add diff, ebx // add bpp - xor ecx, ecx - add diff, 0xf // add 7 + 8 to incr past alignment boundary - and diff, 0xfffffff8 // mask to alignment boundary - sub diff, edi // subtract from start ==> value ebx at alignment - jz dpthgo - // fix alignment -dpthlp1: - xor eax, eax - // pav = p - a = (a + b - c) - a = b - c - mov al, [esi + ebx] // load Prior(x) into al - mov cl, [esi + edx] // load Prior(x-bpp) into cl - sub eax, ecx // subtract Prior(x-bpp) - mov patemp, eax // Save pav for later use - xor eax, eax - // pbv = p - b = (a + b - c) - b = a - c - mov al, [edi + edx] // load Raw(x-bpp) into al - sub eax, ecx // subtract Prior(x-bpp) - mov ecx, eax - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - add eax, patemp // pcv = pav + pbv - // pc = abs(pcv) - test eax, 0x80000000 - jz dpthpca - neg eax // reverse sign of neg values -dpthpca: - mov pctemp, eax // save pc for later use - // pb = abs(pbv) - test ecx, 0x80000000 - jz dpthpba - neg ecx // reverse sign of neg values -dpthpba: - mov pbtemp, ecx // save pb for later use - // pa = abs(pav) - mov eax, patemp - test eax, 0x80000000 - jz dpthpaa - neg eax // reverse sign of neg values -dpthpaa: - mov patemp, eax // save pa for later use - // test if pa <= pb - cmp eax, ecx - jna dpthabb - // pa > pb; now test if pb <= pc - cmp ecx, pctemp - jna dpthbbc - // pb > pc; Raw(x) = Paeth(x) + Prior(x-bpp) - mov cl, [esi + edx] // load Prior(x-bpp) into cl - jmp dpthpaeth -dpthbbc: - // pb <= pc; Raw(x) = Paeth(x) + Prior(x) - mov cl, [esi + ebx] // load Prior(x) into cl - jmp dpthpaeth -dpthabb: - // pa <= pb; now test if pa <= pc - cmp eax, pctemp - jna dpthabc - // pa > pc; Raw(x) = Paeth(x) + Prior(x-bpp) - mov cl, [esi + edx] // load Prior(x-bpp) into cl - jmp dpthpaeth -dpthabc: - // pa <= pc; Raw(x) = Paeth(x) + Raw(x-bpp) - mov cl, [edi + edx] // load Raw(x-bpp) into cl -dpthpaeth: - inc ebx - inc edx - // Raw(x) = (Paeth(x) + Paeth_Predictor( a, b, c )) mod 256 - add [edi + ebx - 1], cl - cmp ebx, diff - jb dpthlp1 -dpthgo: - mov ecx, FullLength - mov eax, ecx - sub eax, ebx // subtract alignment fix - and eax, 0x00000007 // calc bytes over mult of 8 - sub ecx, eax // drop over bytes from original length - mov MMXLength, ecx - } // end _asm block - // Now do the math for the rest of the row - switch ( bpp ) - { - case 3: - { - ActiveMask.use = 0x0000000000ffffff; - ActiveMaskEnd.use = 0xffff000000000000; - ShiftBpp.use = 24; // == bpp(3) * 8 - ShiftRem.use = 40; // == 64 - 24 - _asm - { - mov ebx, diff - mov edi, row - mov esi, prev_row - pxor mm0, mm0 - // PRIME the pump (load the first Raw(x-bpp) data set - movq mm1, [edi+ebx-8] -dpth3lp: - psrlq mm1, ShiftRem // shift last 3 bytes to 1st 3 bytes - movq mm2, [esi + ebx] // load b=Prior(x) - punpcklbw mm1, mm0 // Unpack High bytes of a - movq mm3, [esi+ebx-8] // Prep c=Prior(x-bpp) bytes - punpcklbw mm2, mm0 // Unpack High bytes of b - psrlq mm3, ShiftRem // shift last 3 bytes to 1st 3 bytes - // pav = p - a = (a + b - c) - a = b - c - movq mm4, mm2 - punpcklbw mm3, mm0 // Unpack High bytes of c - // pbv = p - b = (a + b - c) - b = a - c - movq mm5, mm1 - psubw mm4, mm3 - pxor mm7, mm7 - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - movq mm6, mm4 - psubw mm5, mm3 - - // pa = abs(p-a) = abs(pav) - // pb = abs(p-b) = abs(pbv) - // pc = abs(p-c) = abs(pcv) - pcmpgtw mm0, mm4 // Create mask pav bytes < 0 - paddw mm6, mm5 - pand mm0, mm4 // Only pav bytes < 0 in mm7 - pcmpgtw mm7, mm5 // Create mask pbv bytes < 0 - psubw mm4, mm0 - pand mm7, mm5 // Only pbv bytes < 0 in mm0 - psubw mm4, mm0 - psubw mm5, mm7 - pxor mm0, mm0 - pcmpgtw mm0, mm6 // Create mask pcv bytes < 0 - pand mm0, mm6 // Only pav bytes < 0 in mm7 - psubw mm5, mm7 - psubw mm6, mm0 - // test pa <= pb - movq mm7, mm4 - psubw mm6, mm0 - pcmpgtw mm7, mm5 // pa > pb? - movq mm0, mm7 - // use mm7 mask to merge pa & pb - pand mm5, mm7 - // use mm0 mask copy to merge a & b - pand mm2, mm0 - pandn mm7, mm4 - pandn mm0, mm1 - paddw mm7, mm5 - paddw mm0, mm2 - // test ((pa <= pb)? pa:pb) <= pc - pcmpgtw mm7, mm6 // pab > pc? - pxor mm1, mm1 - pand mm3, mm7 - pandn mm7, mm0 - paddw mm7, mm3 - pxor mm0, mm0 - packuswb mm7, mm1 - movq mm3, [esi + ebx] // load c=Prior(x-bpp) - pand mm7, ActiveMask - movq mm2, mm3 // load b=Prior(x) step 1 - paddb mm7, [edi + ebx] // add Paeth predictor with Raw(x) - punpcklbw mm3, mm0 // Unpack High bytes of c - movq [edi + ebx], mm7 // write back updated value - movq mm1, mm7 // Now mm1 will be used as Raw(x-bpp) - // Now do Paeth for 2nd set of bytes (3-5) - psrlq mm2, ShiftBpp // load b=Prior(x) step 2 - punpcklbw mm1, mm0 // Unpack High bytes of a - pxor mm7, mm7 - punpcklbw mm2, mm0 // Unpack High bytes of b - // pbv = p - b = (a + b - c) - b = a - c - movq mm5, mm1 - // pav = p - a = (a + b - c) - a = b - c - movq mm4, mm2 - psubw mm5, mm3 - psubw mm4, mm3 - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = - // pav + pbv = pbv + pav - movq mm6, mm5 - paddw mm6, mm4 - - // pa = abs(p-a) = abs(pav) - // pb = abs(p-b) = abs(pbv) - // pc = abs(p-c) = abs(pcv) - pcmpgtw mm0, mm5 // Create mask pbv bytes < 0 - pcmpgtw mm7, mm4 // Create mask pav bytes < 0 - pand mm0, mm5 // Only pbv bytes < 0 in mm0 - pand mm7, mm4 // Only pav bytes < 0 in mm7 - psubw mm5, mm0 - psubw mm4, mm7 - psubw mm5, mm0 - psubw mm4, mm7 - pxor mm0, mm0 - pcmpgtw mm0, mm6 // Create mask pcv bytes < 0 - pand mm0, mm6 // Only pav bytes < 0 in mm7 - psubw mm6, mm0 - // test pa <= pb - movq mm7, mm4 - psubw mm6, mm0 - pcmpgtw mm7, mm5 // pa > pb? - movq mm0, mm7 - // use mm7 mask to merge pa & pb - pand mm5, mm7 - // use mm0 mask copy to merge a & b - pand mm2, mm0 - pandn mm7, mm4 - pandn mm0, mm1 - paddw mm7, mm5 - paddw mm0, mm2 - // test ((pa <= pb)? pa:pb) <= pc - pcmpgtw mm7, mm6 // pab > pc? - movq mm2, [esi + ebx] // load b=Prior(x) - pand mm3, mm7 - pandn mm7, mm0 - pxor mm1, mm1 - paddw mm7, mm3 - pxor mm0, mm0 - packuswb mm7, mm1 - movq mm3, mm2 // load c=Prior(x-bpp) step 1 - pand mm7, ActiveMask - punpckhbw mm2, mm0 // Unpack High bytes of b - psllq mm7, ShiftBpp // Shift bytes to 2nd group of 3 bytes - // pav = p - a = (a + b - c) - a = b - c - movq mm4, mm2 - paddb mm7, [edi + ebx] // add Paeth predictor with Raw(x) - psllq mm3, ShiftBpp // load c=Prior(x-bpp) step 2 - movq [edi + ebx], mm7 // write back updated value - movq mm1, mm7 - punpckhbw mm3, mm0 // Unpack High bytes of c - psllq mm1, ShiftBpp // Shift bytes - // Now mm1 will be used as Raw(x-bpp) - // Now do Paeth for 3rd, and final, set of bytes (6-7) - pxor mm7, mm7 - punpckhbw mm1, mm0 // Unpack High bytes of a - psubw mm4, mm3 - // pbv = p - b = (a + b - c) - b = a - c - movq mm5, mm1 - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - movq mm6, mm4 - psubw mm5, mm3 - pxor mm0, mm0 - paddw mm6, mm5 - - // pa = abs(p-a) = abs(pav) - // pb = abs(p-b) = abs(pbv) - // pc = abs(p-c) = abs(pcv) - pcmpgtw mm0, mm4 // Create mask pav bytes < 0 - pcmpgtw mm7, mm5 // Create mask pbv bytes < 0 - pand mm0, mm4 // Only pav bytes < 0 in mm7 - pand mm7, mm5 // Only pbv bytes < 0 in mm0 - psubw mm4, mm0 - psubw mm5, mm7 - psubw mm4, mm0 - psubw mm5, mm7 - pxor mm0, mm0 - pcmpgtw mm0, mm6 // Create mask pcv bytes < 0 - pand mm0, mm6 // Only pav bytes < 0 in mm7 - psubw mm6, mm0 - // test pa <= pb - movq mm7, mm4 - psubw mm6, mm0 - pcmpgtw mm7, mm5 // pa > pb? - movq mm0, mm7 - // use mm0 mask copy to merge a & b - pand mm2, mm0 - // use mm7 mask to merge pa & pb - pand mm5, mm7 - pandn mm0, mm1 - pandn mm7, mm4 - paddw mm0, mm2 - paddw mm7, mm5 - // test ((pa <= pb)? pa:pb) <= pc - pcmpgtw mm7, mm6 // pab > pc? - pand mm3, mm7 - pandn mm7, mm0 - paddw mm7, mm3 - pxor mm1, mm1 - packuswb mm1, mm7 - // Step ebx to next set of 8 bytes and repeat loop til done - add ebx, 8 - pand mm1, ActiveMaskEnd - paddb mm1, [edi + ebx - 8] // add Paeth predictor with Raw(x) - - cmp ebx, MMXLength - pxor mm0, mm0 // pxor does not affect flags - movq [edi + ebx - 8], mm1 // write back updated value - // mm1 will be used as Raw(x-bpp) next loop - // mm3 ready to be used as Prior(x-bpp) next loop - jb dpth3lp - } // end _asm block - } - break; - - case 6: - case 7: - case 5: - { - ActiveMask.use = 0x00000000ffffffff; - ActiveMask2.use = 0xffffffff00000000; - ShiftBpp.use = bpp << 3; // == bpp * 8 - ShiftRem.use = 64 - ShiftBpp.use; - _asm - { - mov ebx, diff - mov edi, row - mov esi, prev_row - // PRIME the pump (load the first Raw(x-bpp) data set - movq mm1, [edi+ebx-8] - pxor mm0, mm0 -dpth6lp: - // Must shift to position Raw(x-bpp) data - psrlq mm1, ShiftRem - // Do first set of 4 bytes - movq mm3, [esi+ebx-8] // read c=Prior(x-bpp) bytes - punpcklbw mm1, mm0 // Unpack Low bytes of a - movq mm2, [esi + ebx] // load b=Prior(x) - punpcklbw mm2, mm0 // Unpack Low bytes of b - // Must shift to position Prior(x-bpp) data - psrlq mm3, ShiftRem - // pav = p - a = (a + b - c) - a = b - c - movq mm4, mm2 - punpcklbw mm3, mm0 // Unpack Low bytes of c - // pbv = p - b = (a + b - c) - b = a - c - movq mm5, mm1 - psubw mm4, mm3 - pxor mm7, mm7 - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - movq mm6, mm4 - psubw mm5, mm3 - // pa = abs(p-a) = abs(pav) - // pb = abs(p-b) = abs(pbv) - // pc = abs(p-c) = abs(pcv) - pcmpgtw mm0, mm4 // Create mask pav bytes < 0 - paddw mm6, mm5 - pand mm0, mm4 // Only pav bytes < 0 in mm7 - pcmpgtw mm7, mm5 // Create mask pbv bytes < 0 - psubw mm4, mm0 - pand mm7, mm5 // Only pbv bytes < 0 in mm0 - psubw mm4, mm0 - psubw mm5, mm7 - pxor mm0, mm0 - pcmpgtw mm0, mm6 // Create mask pcv bytes < 0 - pand mm0, mm6 // Only pav bytes < 0 in mm7 - psubw mm5, mm7 - psubw mm6, mm0 - // test pa <= pb - movq mm7, mm4 - psubw mm6, mm0 - pcmpgtw mm7, mm5 // pa > pb? - movq mm0, mm7 - // use mm7 mask to merge pa & pb - pand mm5, mm7 - // use mm0 mask copy to merge a & b - pand mm2, mm0 - pandn mm7, mm4 - pandn mm0, mm1 - paddw mm7, mm5 - paddw mm0, mm2 - // test ((pa <= pb)? pa:pb) <= pc - pcmpgtw mm7, mm6 // pab > pc? - pxor mm1, mm1 - pand mm3, mm7 - pandn mm7, mm0 - paddw mm7, mm3 - pxor mm0, mm0 - packuswb mm7, mm1 - movq mm3, [esi + ebx - 8] // load c=Prior(x-bpp) - pand mm7, ActiveMask - psrlq mm3, ShiftRem - movq mm2, [esi + ebx] // load b=Prior(x) step 1 - paddb mm7, [edi + ebx] // add Paeth predictor with Raw(x) - movq mm6, mm2 - movq [edi + ebx], mm7 // write back updated value - movq mm1, [edi+ebx-8] - psllq mm6, ShiftBpp - movq mm5, mm7 - psrlq mm1, ShiftRem - por mm3, mm6 - psllq mm5, ShiftBpp - punpckhbw mm3, mm0 // Unpack High bytes of c - por mm1, mm5 - // Do second set of 4 bytes - punpckhbw mm2, mm0 // Unpack High bytes of b - punpckhbw mm1, mm0 // Unpack High bytes of a - // pav = p - a = (a + b - c) - a = b - c - movq mm4, mm2 - // pbv = p - b = (a + b - c) - b = a - c - movq mm5, mm1 - psubw mm4, mm3 - pxor mm7, mm7 - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - movq mm6, mm4 - psubw mm5, mm3 - // pa = abs(p-a) = abs(pav) - // pb = abs(p-b) = abs(pbv) - // pc = abs(p-c) = abs(pcv) - pcmpgtw mm0, mm4 // Create mask pav bytes < 0 - paddw mm6, mm5 - pand mm0, mm4 // Only pav bytes < 0 in mm7 - pcmpgtw mm7, mm5 // Create mask pbv bytes < 0 - psubw mm4, mm0 - pand mm7, mm5 // Only pbv bytes < 0 in mm0 - psubw mm4, mm0 - psubw mm5, mm7 - pxor mm0, mm0 - pcmpgtw mm0, mm6 // Create mask pcv bytes < 0 - pand mm0, mm6 // Only pav bytes < 0 in mm7 - psubw mm5, mm7 - psubw mm6, mm0 - // test pa <= pb - movq mm7, mm4 - psubw mm6, mm0 - pcmpgtw mm7, mm5 // pa > pb? - movq mm0, mm7 - // use mm7 mask to merge pa & pb - pand mm5, mm7 - // use mm0 mask copy to merge a & b - pand mm2, mm0 - pandn mm7, mm4 - pandn mm0, mm1 - paddw mm7, mm5 - paddw mm0, mm2 - // test ((pa <= pb)? pa:pb) <= pc - pcmpgtw mm7, mm6 // pab > pc? - pxor mm1, mm1 - pand mm3, mm7 - pandn mm7, mm0 - pxor mm1, mm1 - paddw mm7, mm3 - pxor mm0, mm0 - // Step ex to next set of 8 bytes and repeat loop til done - add ebx, 8 - packuswb mm1, mm7 - paddb mm1, [edi + ebx - 8] // add Paeth predictor with Raw(x) - cmp ebx, MMXLength - movq [edi + ebx - 8], mm1 // write back updated value - // mm1 will be used as Raw(x-bpp) next loop - jb dpth6lp - } // end _asm block - } - break; - - case 4: - { - ActiveMask.use = 0x00000000ffffffff; - _asm { - mov ebx, diff - mov edi, row - mov esi, prev_row - pxor mm0, mm0 - // PRIME the pump (load the first Raw(x-bpp) data set - movq mm1, [edi+ebx-8] // Only time should need to read - // a=Raw(x-bpp) bytes -dpth4lp: - // Do first set of 4 bytes - movq mm3, [esi+ebx-8] // read c=Prior(x-bpp) bytes - punpckhbw mm1, mm0 // Unpack Low bytes of a - movq mm2, [esi + ebx] // load b=Prior(x) - punpcklbw mm2, mm0 // Unpack High bytes of b - // pav = p - a = (a + b - c) - a = b - c - movq mm4, mm2 - punpckhbw mm3, mm0 // Unpack High bytes of c - // pbv = p - b = (a + b - c) - b = a - c - movq mm5, mm1 - psubw mm4, mm3 - pxor mm7, mm7 - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - movq mm6, mm4 - psubw mm5, mm3 - // pa = abs(p-a) = abs(pav) - // pb = abs(p-b) = abs(pbv) - // pc = abs(p-c) = abs(pcv) - pcmpgtw mm0, mm4 // Create mask pav bytes < 0 - paddw mm6, mm5 - pand mm0, mm4 // Only pav bytes < 0 in mm7 - pcmpgtw mm7, mm5 // Create mask pbv bytes < 0 - psubw mm4, mm0 - pand mm7, mm5 // Only pbv bytes < 0 in mm0 - psubw mm4, mm0 - psubw mm5, mm7 - pxor mm0, mm0 - pcmpgtw mm0, mm6 // Create mask pcv bytes < 0 - pand mm0, mm6 // Only pav bytes < 0 in mm7 - psubw mm5, mm7 - psubw mm6, mm0 - // test pa <= pb - movq mm7, mm4 - psubw mm6, mm0 - pcmpgtw mm7, mm5 // pa > pb? - movq mm0, mm7 - // use mm7 mask to merge pa & pb - pand mm5, mm7 - // use mm0 mask copy to merge a & b - pand mm2, mm0 - pandn mm7, mm4 - pandn mm0, mm1 - paddw mm7, mm5 - paddw mm0, mm2 - // test ((pa <= pb)? pa:pb) <= pc - pcmpgtw mm7, mm6 // pab > pc? - pxor mm1, mm1 - pand mm3, mm7 - pandn mm7, mm0 - paddw mm7, mm3 - pxor mm0, mm0 - packuswb mm7, mm1 - movq mm3, [esi + ebx] // load c=Prior(x-bpp) - pand mm7, ActiveMask - movq mm2, mm3 // load b=Prior(x) step 1 - paddb mm7, [edi + ebx] // add Paeth predictor with Raw(x) - punpcklbw mm3, mm0 // Unpack High bytes of c - movq [edi + ebx], mm7 // write back updated value - movq mm1, mm7 // Now mm1 will be used as Raw(x-bpp) - // Do second set of 4 bytes - punpckhbw mm2, mm0 // Unpack Low bytes of b - punpcklbw mm1, mm0 // Unpack Low bytes of a - // pav = p - a = (a + b - c) - a = b - c - movq mm4, mm2 - // pbv = p - b = (a + b - c) - b = a - c - movq mm5, mm1 - psubw mm4, mm3 - pxor mm7, mm7 - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - movq mm6, mm4 - psubw mm5, mm3 - // pa = abs(p-a) = abs(pav) - // pb = abs(p-b) = abs(pbv) - // pc = abs(p-c) = abs(pcv) - pcmpgtw mm0, mm4 // Create mask pav bytes < 0 - paddw mm6, mm5 - pand mm0, mm4 // Only pav bytes < 0 in mm7 - pcmpgtw mm7, mm5 // Create mask pbv bytes < 0 - psubw mm4, mm0 - pand mm7, mm5 // Only pbv bytes < 0 in mm0 - psubw mm4, mm0 - psubw mm5, mm7 - pxor mm0, mm0 - pcmpgtw mm0, mm6 // Create mask pcv bytes < 0 - pand mm0, mm6 // Only pav bytes < 0 in mm7 - psubw mm5, mm7 - psubw mm6, mm0 - // test pa <= pb - movq mm7, mm4 - psubw mm6, mm0 - pcmpgtw mm7, mm5 // pa > pb? - movq mm0, mm7 - // use mm7 mask to merge pa & pb - pand mm5, mm7 - // use mm0 mask copy to merge a & b - pand mm2, mm0 - pandn mm7, mm4 - pandn mm0, mm1 - paddw mm7, mm5 - paddw mm0, mm2 - // test ((pa <= pb)? pa:pb) <= pc - pcmpgtw mm7, mm6 // pab > pc? - pxor mm1, mm1 - pand mm3, mm7 - pandn mm7, mm0 - pxor mm1, mm1 - paddw mm7, mm3 - pxor mm0, mm0 - // Step ex to next set of 8 bytes and repeat loop til done - add ebx, 8 - packuswb mm1, mm7 - paddb mm1, [edi + ebx - 8] // add Paeth predictor with Raw(x) - cmp ebx, MMXLength - movq [edi + ebx - 8], mm1 // write back updated value - // mm1 will be used as Raw(x-bpp) next loop - jb dpth4lp - } // end _asm block - } - break; - case 8: // bpp == 8 - { - ActiveMask.use = 0x00000000ffffffff; - _asm { - mov ebx, diff - mov edi, row - mov esi, prev_row - pxor mm0, mm0 - // PRIME the pump (load the first Raw(x-bpp) data set - movq mm1, [edi+ebx-8] // Only time should need to read - // a=Raw(x-bpp) bytes -dpth8lp: - // Do first set of 4 bytes - movq mm3, [esi+ebx-8] // read c=Prior(x-bpp) bytes - punpcklbw mm1, mm0 // Unpack Low bytes of a - movq mm2, [esi + ebx] // load b=Prior(x) - punpcklbw mm2, mm0 // Unpack Low bytes of b - // pav = p - a = (a + b - c) - a = b - c - movq mm4, mm2 - punpcklbw mm3, mm0 // Unpack Low bytes of c - // pbv = p - b = (a + b - c) - b = a - c - movq mm5, mm1 - psubw mm4, mm3 - pxor mm7, mm7 - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - movq mm6, mm4 - psubw mm5, mm3 - // pa = abs(p-a) = abs(pav) - // pb = abs(p-b) = abs(pbv) - // pc = abs(p-c) = abs(pcv) - pcmpgtw mm0, mm4 // Create mask pav bytes < 0 - paddw mm6, mm5 - pand mm0, mm4 // Only pav bytes < 0 in mm7 - pcmpgtw mm7, mm5 // Create mask pbv bytes < 0 - psubw mm4, mm0 - pand mm7, mm5 // Only pbv bytes < 0 in mm0 - psubw mm4, mm0 - psubw mm5, mm7 - pxor mm0, mm0 - pcmpgtw mm0, mm6 // Create mask pcv bytes < 0 - pand mm0, mm6 // Only pav bytes < 0 in mm7 - psubw mm5, mm7 - psubw mm6, mm0 - // test pa <= pb - movq mm7, mm4 - psubw mm6, mm0 - pcmpgtw mm7, mm5 // pa > pb? - movq mm0, mm7 - // use mm7 mask to merge pa & pb - pand mm5, mm7 - // use mm0 mask copy to merge a & b - pand mm2, mm0 - pandn mm7, mm4 - pandn mm0, mm1 - paddw mm7, mm5 - paddw mm0, mm2 - // test ((pa <= pb)? pa:pb) <= pc - pcmpgtw mm7, mm6 // pab > pc? - pxor mm1, mm1 - pand mm3, mm7 - pandn mm7, mm0 - paddw mm7, mm3 - pxor mm0, mm0 - packuswb mm7, mm1 - movq mm3, [esi+ebx-8] // read c=Prior(x-bpp) bytes - pand mm7, ActiveMask - movq mm2, [esi + ebx] // load b=Prior(x) - paddb mm7, [edi + ebx] // add Paeth predictor with Raw(x) - punpckhbw mm3, mm0 // Unpack High bytes of c - movq [edi + ebx], mm7 // write back updated value - movq mm1, [edi+ebx-8] // read a=Raw(x-bpp) bytes - - // Do second set of 4 bytes - punpckhbw mm2, mm0 // Unpack High bytes of b - punpckhbw mm1, mm0 // Unpack High bytes of a - // pav = p - a = (a + b - c) - a = b - c - movq mm4, mm2 - // pbv = p - b = (a + b - c) - b = a - c - movq mm5, mm1 - psubw mm4, mm3 - pxor mm7, mm7 - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - movq mm6, mm4 - psubw mm5, mm3 - // pa = abs(p-a) = abs(pav) - // pb = abs(p-b) = abs(pbv) - // pc = abs(p-c) = abs(pcv) - pcmpgtw mm0, mm4 // Create mask pav bytes < 0 - paddw mm6, mm5 - pand mm0, mm4 // Only pav bytes < 0 in mm7 - pcmpgtw mm7, mm5 // Create mask pbv bytes < 0 - psubw mm4, mm0 - pand mm7, mm5 // Only pbv bytes < 0 in mm0 - psubw mm4, mm0 - psubw mm5, mm7 - pxor mm0, mm0 - pcmpgtw mm0, mm6 // Create mask pcv bytes < 0 - pand mm0, mm6 // Only pav bytes < 0 in mm7 - psubw mm5, mm7 - psubw mm6, mm0 - // test pa <= pb - movq mm7, mm4 - psubw mm6, mm0 - pcmpgtw mm7, mm5 // pa > pb? - movq mm0, mm7 - // use mm7 mask to merge pa & pb - pand mm5, mm7 - // use mm0 mask copy to merge a & b - pand mm2, mm0 - pandn mm7, mm4 - pandn mm0, mm1 - paddw mm7, mm5 - paddw mm0, mm2 - // test ((pa <= pb)? pa:pb) <= pc - pcmpgtw mm7, mm6 // pab > pc? - pxor mm1, mm1 - pand mm3, mm7 - pandn mm7, mm0 - pxor mm1, mm1 - paddw mm7, mm3 - pxor mm0, mm0 - // Step ex to next set of 8 bytes and repeat loop til done - add ebx, 8 - packuswb mm1, mm7 - paddb mm1, [edi + ebx - 8] // add Paeth predictor with Raw(x) - cmp ebx, MMXLength - movq [edi + ebx - 8], mm1 // write back updated value - // mm1 will be used as Raw(x-bpp) next loop - jb dpth8lp - } // end _asm block - } - break; - - case 1: // bpp = 1 - case 2: // bpp = 2 - default: // bpp > 8 - { - _asm { - mov ebx, diff - cmp ebx, FullLength - jnb dpthdend - mov edi, row - mov esi, prev_row - // Do Paeth decode for remaining bytes - mov edx, ebx - xor ecx, ecx // zero ecx before using cl & cx in loop below - sub edx, bpp // Set edx = ebx - bpp -dpthdlp: - xor eax, eax - // pav = p - a = (a + b - c) - a = b - c - mov al, [esi + ebx] // load Prior(x) into al - mov cl, [esi + edx] // load Prior(x-bpp) into cl - sub eax, ecx // subtract Prior(x-bpp) - mov patemp, eax // Save pav for later use - xor eax, eax - // pbv = p - b = (a + b - c) - b = a - c - mov al, [edi + edx] // load Raw(x-bpp) into al - sub eax, ecx // subtract Prior(x-bpp) - mov ecx, eax - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - add eax, patemp // pcv = pav + pbv - // pc = abs(pcv) - test eax, 0x80000000 - jz dpthdpca - neg eax // reverse sign of neg values -dpthdpca: - mov pctemp, eax // save pc for later use - // pb = abs(pbv) - test ecx, 0x80000000 - jz dpthdpba - neg ecx // reverse sign of neg values -dpthdpba: - mov pbtemp, ecx // save pb for later use - // pa = abs(pav) - mov eax, patemp - test eax, 0x80000000 - jz dpthdpaa - neg eax // reverse sign of neg values -dpthdpaa: - mov patemp, eax // save pa for later use - // test if pa <= pb - cmp eax, ecx - jna dpthdabb - // pa > pb; now test if pb <= pc - cmp ecx, pctemp - jna dpthdbbc - // pb > pc; Raw(x) = Paeth(x) + Prior(x-bpp) - mov cl, [esi + edx] // load Prior(x-bpp) into cl - jmp dpthdpaeth -dpthdbbc: - // pb <= pc; Raw(x) = Paeth(x) + Prior(x) - mov cl, [esi + ebx] // load Prior(x) into cl - jmp dpthdpaeth -dpthdabb: - // pa <= pb; now test if pa <= pc - cmp eax, pctemp - jna dpthdabc - // pa > pc; Raw(x) = Paeth(x) + Prior(x-bpp) - mov cl, [esi + edx] // load Prior(x-bpp) into cl - jmp dpthdpaeth -dpthdabc: - // pa <= pc; Raw(x) = Paeth(x) + Raw(x-bpp) - mov cl, [edi + edx] // load Raw(x-bpp) into cl -dpthdpaeth: - inc ebx - inc edx - // Raw(x) = (Paeth(x) + Paeth_Predictor( a, b, c )) mod 256 - add [edi + ebx - 1], cl - cmp ebx, FullLength - jb dpthdlp -dpthdend: - } // end _asm block - } - return; // No need to go further with this one - } // end switch ( bpp ) - _asm - { - // MMX acceleration complete now do clean-up - // Check if any remaining bytes left to decode - mov ebx, MMXLength - cmp ebx, FullLength - jnb dpthend - mov edi, row - mov esi, prev_row - // Do Paeth decode for remaining bytes - mov edx, ebx - xor ecx, ecx // zero ecx before using cl & cx in loop below - sub edx, bpp // Set edx = ebx - bpp -dpthlp2: - xor eax, eax - // pav = p - a = (a + b - c) - a = b - c - mov al, [esi + ebx] // load Prior(x) into al - mov cl, [esi + edx] // load Prior(x-bpp) into cl - sub eax, ecx // subtract Prior(x-bpp) - mov patemp, eax // Save pav for later use - xor eax, eax - // pbv = p - b = (a + b - c) - b = a - c - mov al, [edi + edx] // load Raw(x-bpp) into al - sub eax, ecx // subtract Prior(x-bpp) - mov ecx, eax - // pcv = p - c = (a + b - c) -c = (a - c) + (b - c) = pav + pbv - add eax, patemp // pcv = pav + pbv - // pc = abs(pcv) - test eax, 0x80000000 - jz dpthpca2 - neg eax // reverse sign of neg values -dpthpca2: - mov pctemp, eax // save pc for later use - // pb = abs(pbv) - test ecx, 0x80000000 - jz dpthpba2 - neg ecx // reverse sign of neg values -dpthpba2: - mov pbtemp, ecx // save pb for later use - // pa = abs(pav) - mov eax, patemp - test eax, 0x80000000 - jz dpthpaa2 - neg eax // reverse sign of neg values -dpthpaa2: - mov patemp, eax // save pa for later use - // test if pa <= pb - cmp eax, ecx - jna dpthabb2 - // pa > pb; now test if pb <= pc - cmp ecx, pctemp - jna dpthbbc2 - // pb > pc; Raw(x) = Paeth(x) + Prior(x-bpp) - mov cl, [esi + edx] // load Prior(x-bpp) into cl - jmp dpthpaeth2 -dpthbbc2: - // pb <= pc; Raw(x) = Paeth(x) + Prior(x) - mov cl, [esi + ebx] // load Prior(x) into cl - jmp dpthpaeth2 -dpthabb2: - // pa <= pb; now test if pa <= pc - cmp eax, pctemp - jna dpthabc2 - // pa > pc; Raw(x) = Paeth(x) + Prior(x-bpp) - mov cl, [esi + edx] // load Prior(x-bpp) into cl - jmp dpthpaeth2 -dpthabc2: - // pa <= pc; Raw(x) = Paeth(x) + Raw(x-bpp) - mov cl, [edi + edx] // load Raw(x-bpp) into cl -dpthpaeth2: - inc ebx - inc edx - // Raw(x) = (Paeth(x) + Paeth_Predictor( a, b, c )) mod 256 - add [edi + ebx - 1], cl - cmp ebx, FullLength - jb dpthlp2 -dpthend: - emms // End MMX instructions; prep for possible FP instrs. - } // end _asm block -} - -// Optimized code for PNG Sub filter decoder -void /* PRIVATE */ -png_read_filter_row_mmx_sub(png_row_infop row_info, png_bytep row) -{ - //int test; - int bpp; - png_uint_32 FullLength; - png_uint_32 MMXLength; - int diff; - - bpp = (row_info->pixel_depth + 7) >> 3; // Get # bytes per pixel - FullLength = row_info->rowbytes - bpp; // # of bytes to filter - _asm { - mov edi, row - mov esi, edi // lp = row - add edi, bpp // rp = row + bpp - xor eax, eax - // get # of bytes to alignment - mov diff, edi // take start of row - add diff, 0xf // add 7 + 8 to incr past - // alignment boundary - xor ebx, ebx - and diff, 0xfffffff8 // mask to alignment boundary - sub diff, edi // subtract from start ==> value - // ebx at alignment - jz dsubgo - // fix alignment -dsublp1: - mov al, [esi+ebx] - add [edi+ebx], al - inc ebx - cmp ebx, diff - jb dsublp1 -dsubgo: - mov ecx, FullLength - mov edx, ecx - sub edx, ebx // subtract alignment fix - and edx, 0x00000007 // calc bytes over mult of 8 - sub ecx, edx // drop over bytes from length - mov MMXLength, ecx - } // end _asm block - - // Now do the math for the rest of the row - switch ( bpp ) - { - case 3: - { - ActiveMask.use = 0x0000ffffff000000; - ShiftBpp.use = 24; // == 3 * 8 - ShiftRem.use = 40; // == 64 - 24 - _asm { - mov edi, row - movq mm7, ActiveMask // Load ActiveMask for 2nd active byte group - mov esi, edi // lp = row - add edi, bpp // rp = row + bpp - movq mm6, mm7 - mov ebx, diff - psllq mm6, ShiftBpp // Move mask in mm6 to cover 3rd active - // byte group - // PRIME the pump (load the first Raw(x-bpp) data set - movq mm1, [edi+ebx-8] -dsub3lp: - psrlq mm1, ShiftRem // Shift data for adding 1st bpp bytes - // no need for mask; shift clears inactive bytes - // Add 1st active group - movq mm0, [edi+ebx] - paddb mm0, mm1 - // Add 2nd active group - movq mm1, mm0 // mov updated Raws to mm1 - psllq mm1, ShiftBpp // shift data to position correctly - pand mm1, mm7 // mask to use only 2nd active group - paddb mm0, mm1 - // Add 3rd active group - movq mm1, mm0 // mov updated Raws to mm1 - psllq mm1, ShiftBpp // shift data to position correctly - pand mm1, mm6 // mask to use only 3rd active group - add ebx, 8 - paddb mm0, mm1 - cmp ebx, MMXLength - movq [edi+ebx-8], mm0 // Write updated Raws back to array - // Prep for doing 1st add at top of loop - movq mm1, mm0 - jb dsub3lp - } // end _asm block - } - break; - - case 1: - { - // Placed here just in case this is a duplicate of the - // non-MMX code for the SUB filter in png_read_filter_row below - // - // png_bytep rp; - // png_bytep lp; - // png_uint_32 i; - // bpp = (row_info->pixel_depth + 7) >> 3; - // for (i = (png_uint_32)bpp, rp = row + bpp, lp = row; - // i < row_info->rowbytes; i++, rp++, lp++) - // { - // *rp = (png_byte)(((int)(*rp) + (int)(*lp)) & 0xff); - // } - _asm { - mov ebx, diff - mov edi, row - cmp ebx, FullLength - jnb dsub1end - mov esi, edi // lp = row - xor eax, eax - add edi, bpp // rp = row + bpp -dsub1lp: - mov al, [esi+ebx] - add [edi+ebx], al - inc ebx - cmp ebx, FullLength - jb dsub1lp -dsub1end: - } // end _asm block - } - return; - - case 6: - case 7: - case 4: - case 5: - { - ShiftBpp.use = bpp << 3; - ShiftRem.use = 64 - ShiftBpp.use; - _asm { - mov edi, row - mov ebx, diff - mov esi, edi // lp = row - add edi, bpp // rp = row + bpp - // PRIME the pump (load the first Raw(x-bpp) data set - movq mm1, [edi+ebx-8] -dsub4lp: - psrlq mm1, ShiftRem // Shift data for adding 1st bpp bytes - // no need for mask; shift clears inactive bytes - movq mm0, [edi+ebx] - paddb mm0, mm1 - // Add 2nd active group - movq mm1, mm0 // mov updated Raws to mm1 - psllq mm1, ShiftBpp // shift data to position correctly - // there is no need for any mask - // since shift clears inactive bits/bytes - add ebx, 8 - paddb mm0, mm1 - cmp ebx, MMXLength - movq [edi+ebx-8], mm0 - movq mm1, mm0 // Prep for doing 1st add at top of loop - jb dsub4lp - } // end _asm block - } - break; - - case 2: - { - ActiveMask.use = 0x00000000ffff0000; - ShiftBpp.use = 16; // == 2 * 8 - ShiftRem.use = 48; // == 64 - 16 - _asm { - movq mm7, ActiveMask // Load ActiveMask for 2nd active byte group - mov ebx, diff - movq mm6, mm7 - mov edi, row - psllq mm6, ShiftBpp // Move mask in mm6 to cover 3rd active - // byte group - mov esi, edi // lp = row - movq mm5, mm6 - add edi, bpp // rp = row + bpp - psllq mm5, ShiftBpp // Move mask in mm5 to cover 4th active - // byte group - // PRIME the pump (load the first Raw(x-bpp) data set - movq mm1, [edi+ebx-8] -dsub2lp: - // Add 1st active group - psrlq mm1, ShiftRem // Shift data for adding 1st bpp bytes - // no need for mask; shift clears inactive - // bytes - movq mm0, [edi+ebx] - paddb mm0, mm1 - // Add 2nd active group - movq mm1, mm0 // mov updated Raws to mm1 - psllq mm1, ShiftBpp // shift data to position correctly - pand mm1, mm7 // mask to use only 2nd active group - paddb mm0, mm1 - // Add 3rd active group - movq mm1, mm0 // mov updated Raws to mm1 - psllq mm1, ShiftBpp // shift data to position correctly - pand mm1, mm6 // mask to use only 3rd active group - paddb mm0, mm1 - // Add 4th active group - movq mm1, mm0 // mov updated Raws to mm1 - psllq mm1, ShiftBpp // shift data to position correctly - pand mm1, mm5 // mask to use only 4th active group - add ebx, 8 - paddb mm0, mm1 - cmp ebx, MMXLength - movq [edi+ebx-8], mm0 // Write updated Raws back to array - movq mm1, mm0 // Prep for doing 1st add at top of loop - jb dsub2lp - } // end _asm block - } - break; - case 8: - { - _asm { - mov edi, row - mov ebx, diff - mov esi, edi // lp = row - add edi, bpp // rp = row + bpp - mov ecx, MMXLength - movq mm7, [edi+ebx-8] // PRIME the pump (load the first - // Raw(x-bpp) data set - and ecx, 0x0000003f // calc bytes over mult of 64 -dsub8lp: - movq mm0, [edi+ebx] // Load Sub(x) for 1st 8 bytes - paddb mm0, mm7 - movq mm1, [edi+ebx+8] // Load Sub(x) for 2nd 8 bytes - movq [edi+ebx], mm0 // Write Raw(x) for 1st 8 bytes - // Now mm0 will be used as Raw(x-bpp) for - // the 2nd group of 8 bytes. This will be - // repeated for each group of 8 bytes with - // the 8th group being used as the Raw(x-bpp) - // for the 1st group of the next loop. - paddb mm1, mm0 - movq mm2, [edi+ebx+16] // Load Sub(x) for 3rd 8 bytes - movq [edi+ebx+8], mm1 // Write Raw(x) for 2nd 8 bytes - paddb mm2, mm1 - movq mm3, [edi+ebx+24] // Load Sub(x) for 4th 8 bytes - movq [edi+ebx+16], mm2 // Write Raw(x) for 3rd 8 bytes - paddb mm3, mm2 - movq mm4, [edi+ebx+32] // Load Sub(x) for 5th 8 bytes - movq [edi+ebx+24], mm3 // Write Raw(x) for 4th 8 bytes - paddb mm4, mm3 - movq mm5, [edi+ebx+40] // Load Sub(x) for 6th 8 bytes - movq [edi+ebx+32], mm4 // Write Raw(x) for 5th 8 bytes - paddb mm5, mm4 - movq mm6, [edi+ebx+48] // Load Sub(x) for 7th 8 bytes - movq [edi+ebx+40], mm5 // Write Raw(x) for 6th 8 bytes - paddb mm6, mm5 - movq mm7, [edi+ebx+56] // Load Sub(x) for 8th 8 bytes - movq [edi+ebx+48], mm6 // Write Raw(x) for 7th 8 bytes - add ebx, 64 - paddb mm7, mm6 - cmp ebx, ecx - movq [edi+ebx-8], mm7 // Write Raw(x) for 8th 8 bytes - jb dsub8lp - cmp ebx, MMXLength - jnb dsub8lt8 -dsub8lpA: - movq mm0, [edi+ebx] - add ebx, 8 - paddb mm0, mm7 - cmp ebx, MMXLength - movq [edi+ebx-8], mm0 // use -8 to offset early add to ebx - movq mm7, mm0 // Move calculated Raw(x) data to mm1 to - // be the new Raw(x-bpp) for the next loop - jb dsub8lpA -dsub8lt8: - } // end _asm block - } - break; - - default: // bpp greater than 8 bytes - { - _asm { - mov ebx, diff - mov edi, row - mov esi, edi // lp = row - add edi, bpp // rp = row + bpp -dsubAlp: - movq mm0, [edi+ebx] - movq mm1, [esi+ebx] - add ebx, 8 - paddb mm0, mm1 - cmp ebx, MMXLength - movq [edi+ebx-8], mm0 // mov does not affect flags; -8 to offset - // add ebx - jb dsubAlp - } // end _asm block - } - break; - - } // end switch ( bpp ) - - _asm { - mov ebx, MMXLength - mov edi, row - cmp ebx, FullLength - jnb dsubend - mov esi, edi // lp = row - xor eax, eax - add edi, bpp // rp = row + bpp -dsublp2: - mov al, [esi+ebx] - add [edi+ebx], al - inc ebx - cmp ebx, FullLength - jb dsublp2 -dsubend: - emms // End MMX instructions; prep for possible FP instrs. - } // end _asm block -} - -// Optimized code for PNG Up filter decoder -void /* PRIVATE */ -png_read_filter_row_mmx_up(png_row_infop row_info, png_bytep row, - png_bytep prev_row) -{ - png_uint_32 len; - len = row_info->rowbytes; // # of bytes to filter - _asm { - mov edi, row - // get # of bytes to alignment - mov ecx, edi - xor ebx, ebx - add ecx, 0x7 - xor eax, eax - and ecx, 0xfffffff8 - mov esi, prev_row - sub ecx, edi - jz dupgo - // fix alignment -duplp1: - mov al, [edi+ebx] - add al, [esi+ebx] - inc ebx - cmp ebx, ecx - mov [edi + ebx-1], al // mov does not affect flags; -1 to offset inc ebx - jb duplp1 -dupgo: - mov ecx, len - mov edx, ecx - sub edx, ebx // subtract alignment fix - and edx, 0x0000003f // calc bytes over mult of 64 - sub ecx, edx // drop over bytes from length - // Unrolled loop - use all MMX registers and interleave to reduce - // number of branch instructions (loops) and reduce partial stalls -duploop: - movq mm1, [esi+ebx] - movq mm0, [edi+ebx] - movq mm3, [esi+ebx+8] - paddb mm0, mm1 - movq mm2, [edi+ebx+8] - movq [edi+ebx], mm0 - paddb mm2, mm3 - movq mm5, [esi+ebx+16] - movq [edi+ebx+8], mm2 - movq mm4, [edi+ebx+16] - movq mm7, [esi+ebx+24] - paddb mm4, mm5 - movq mm6, [edi+ebx+24] - movq [edi+ebx+16], mm4 - paddb mm6, mm7 - movq mm1, [esi+ebx+32] - movq [edi+ebx+24], mm6 - movq mm0, [edi+ebx+32] - movq mm3, [esi+ebx+40] - paddb mm0, mm1 - movq mm2, [edi+ebx+40] - movq [edi+ebx+32], mm0 - paddb mm2, mm3 - movq mm5, [esi+ebx+48] - movq [edi+ebx+40], mm2 - movq mm4, [edi+ebx+48] - movq mm7, [esi+ebx+56] - paddb mm4, mm5 - movq mm6, [edi+ebx+56] - movq [edi+ebx+48], mm4 - add ebx, 64 - paddb mm6, mm7 - cmp ebx, ecx - movq [edi+ebx-8], mm6 // (+56)movq does not affect flags; - // -8 to offset add ebx - jb duploop - - cmp edx, 0 // Test for bytes over mult of 64 - jz dupend - - - // 2 lines added by lcreeve@netins.net - // (mail 11 Jul 98 in png-implement list) - cmp edx, 8 //test for less than 8 bytes - jb duplt8 - - - add ecx, edx - and edx, 0x00000007 // calc bytes over mult of 8 - sub ecx, edx // drop over bytes from length - jz duplt8 - // Loop using MMX registers mm0 & mm1 to update 8 bytes simultaneously -duplpA: - movq mm1, [esi+ebx] - movq mm0, [edi+ebx] - add ebx, 8 - paddb mm0, mm1 - cmp ebx, ecx - movq [edi+ebx-8], mm0 // movq does not affect flags; -8 to offset add ebx - jb duplpA - cmp edx, 0 // Test for bytes over mult of 8 - jz dupend -duplt8: - xor eax, eax - add ecx, edx // move over byte count into counter - // Loop using x86 registers to update remaining bytes -duplp2: - mov al, [edi + ebx] - add al, [esi + ebx] - inc ebx - cmp ebx, ecx - mov [edi + ebx-1], al // mov does not affect flags; -1 to offset inc ebx - jb duplp2 -dupend: - // Conversion of filtered row completed - emms // End MMX instructions; prep for possible FP instrs. - } // end _asm block -} - - -// Optimized png_read_filter_row routines -void /* PRIVATE */ -png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep - row, png_bytep prev_row, int filter) -{ -#ifdef PNG_DEBUG - char filnm[10]; -#endif - - if (mmx_supported == 2) { - /* this should have happened in png_init_mmx_flags() already */ - png_warning(png_ptr, "asm_flags may not have been initialized"); - png_mmx_support(); - } - -#ifdef PNG_DEBUG - png_debug(1, "in png_read_filter_row\n"); - switch (filter) - { - case 0: sprintf(filnm, "none"); - break; - case 1: sprintf(filnm, "sub-%s", - (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB)? "MMX" : "x86"); - break; - case 2: sprintf(filnm, "up-%s", - (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP)? "MMX" : "x86"); - break; - case 3: sprintf(filnm, "avg-%s", - (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG)? "MMX" : "x86"); - break; - case 4: sprintf(filnm, "Paeth-%s", - (png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH)? "MMX":"x86"); - break; - default: sprintf(filnm, "unknw"); - break; - } - png_debug2(0,"row=%5d, %s, ", png_ptr->row_number, filnm); - png_debug2(0, "pd=%2d, b=%d, ", (int)row_info->pixel_depth, - (int)((row_info->pixel_depth + 7) >> 3)); - png_debug1(0,"len=%8d, ", row_info->rowbytes); -#endif /* PNG_DEBUG */ - - switch (filter) - { - case PNG_FILTER_VALUE_NONE: - break; - - case PNG_FILTER_VALUE_SUB: - { - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_SUB) && - (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) && - (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold)) - { - png_read_filter_row_mmx_sub(row_info, row); - } - else - { - png_uint_32 i; - png_uint_32 istop = row_info->rowbytes; - png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; - png_bytep rp = row + bpp; - png_bytep lp = row; - - for (i = bpp; i < istop; i++) - { - *rp = (png_byte)(((int)(*rp) + (int)(*lp++)) & 0xff); - rp++; - } - } - break; - } - - case PNG_FILTER_VALUE_UP: - { - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_UP) && - (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) && - (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold)) - { - png_read_filter_row_mmx_up(row_info, row, prev_row); - } - else - { - png_uint_32 i; - png_uint_32 istop = row_info->rowbytes; - png_bytep rp = row; - png_bytep pp = prev_row; - - for (i = 0; i < istop; ++i) - { - *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff); - rp++; - } - } - break; - } - - case PNG_FILTER_VALUE_AVG: - { - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_AVG) && - (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) && - (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold)) - { - png_read_filter_row_mmx_avg(row_info, row, prev_row); - } - else - { - png_uint_32 i; - png_bytep rp = row; - png_bytep pp = prev_row; - png_bytep lp = row; - png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; - png_uint_32 istop = row_info->rowbytes - bpp; - - for (i = 0; i < bpp; i++) - { - *rp = (png_byte)(((int)(*rp) + - ((int)(*pp++) >> 1)) & 0xff); - rp++; - } - - for (i = 0; i < istop; i++) - { - *rp = (png_byte)(((int)(*rp) + - ((int)(*pp++ + *lp++) >> 1)) & 0xff); - rp++; - } - } - break; - } - - case PNG_FILTER_VALUE_PAETH: - { - if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_FILTER_PAETH) && - (row_info->pixel_depth >= png_ptr->mmx_bitdepth_threshold) && - (row_info->rowbytes >= png_ptr->mmx_rowbytes_threshold)) - { - png_read_filter_row_mmx_paeth(row_info, row, prev_row); - } - else - { - png_uint_32 i; - png_bytep rp = row; - png_bytep pp = prev_row; - png_bytep lp = row; - png_bytep cp = prev_row; - png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3; - png_uint_32 istop=row_info->rowbytes - bpp; - - for (i = 0; i < bpp; i++) - { - *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff); - rp++; - } - - for (i = 0; i < istop; i++) // use leftover rp,pp - { - int a, b, c, pa, pb, pc, p; - - a = *lp++; - b = *pp++; - c = *cp++; - - p = b - c; - pc = a - c; - -#ifdef PNG_USE_ABS - pa = abs(p); - pb = abs(pc); - pc = abs(p + pc); -#else - pa = p < 0 ? -p : p; - pb = pc < 0 ? -pc : pc; - pc = (p + pc) < 0 ? -(p + pc) : p + pc; -#endif - - /* - if (pa <= pb && pa <= pc) - p = a; - else if (pb <= pc) - p = b; - else - p = c; - */ - - p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c; - - *rp = (png_byte)(((int)(*rp) + p) & 0xff); - rp++; - } - } - break; - } - - default: - png_warning(png_ptr, "Ignoring bad row filter type"); - *row=0; - break; - } -} - -#endif /* PNG_ASSEMBLER_CODE_SUPPORTED && PNG_USE_PNGVCRD */ diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngwio.c b/gtkmm-osx/trunk/libpng-1.2.5/pngwio.c deleted file mode 100644 index b39b414..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/pngwio.c +++ /dev/null @@ -1,228 +0,0 @@ - -/* pngwio.c - functions for data output - * - * libpng 1.2.5 - October 3, 2002 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2002 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) - * - * This file provides a location for all output. Users who need - * special handling are expected to write functions that have the same - * arguments as these and perform similar functions, but that possibly - * use different output methods. Note that you shouldn't change these - * functions, but rather write replacement functions and then change - * them at run time with png_set_write_fn(...). - */ - -#define PNG_INTERNAL -#include "png.h" -#ifdef PNG_WRITE_SUPPORTED - -/* Write the data to whatever output you are using. The default routine - writes to a file pointer. Note that this routine sometimes gets called - with very small lengths, so you should implement some kind of simple - buffering if you are using unbuffered writes. This should never be asked - to write more than 64K on a 16 bit machine. */ - -void /* PRIVATE */ -png_write_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - if (png_ptr->write_data_fn != NULL ) - (*(png_ptr->write_data_fn))(png_ptr, data, length); - else - png_error(png_ptr, "Call to NULL write function"); -} - -#if !defined(PNG_NO_STDIO) -/* This is the function that does the actual writing of data. If you are - not writing to a standard C stream, you should create a replacement - write_data function and use it at run time with png_set_write_fn(), rather - than changing the library. */ -#ifndef USE_FAR_KEYWORD -void PNGAPI -png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_uint_32 check; - -#if defined(_WIN32_WCE) - if ( !WriteFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) ) - check = 0; -#else - check = fwrite(data, 1, length, (png_FILE_p)(png_ptr->io_ptr)); -#endif - if (check != length) - png_error(png_ptr, "Write Error"); -} -#else -/* this is the model-independent version. Since the standard I/O library - can't handle far buffers in the medium and small models, we have to copy - the data. -*/ - -#define NEAR_BUF_SIZE 1024 -#define MIN(a,b) (a <= b ? a : b) - -void PNGAPI -png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_uint_32 check; - png_byte *near_data; /* Needs to be "png_byte *" instead of "png_bytep" */ - png_FILE_p io_ptr; - - /* Check if data really is near. If so, use usual code. */ - near_data = (png_byte *)CVT_PTR_NOCHECK(data); - io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); - if ((png_bytep)near_data == data) - { -#if defined(_WIN32_WCE) - if ( !WriteFile(io_ptr, near_data, length, &check, NULL) ) - check = 0; -#else - check = fwrite(near_data, 1, length, io_ptr); -#endif - } - else - { - png_byte buf[NEAR_BUF_SIZE]; - png_size_t written, remaining, err; - check = 0; - remaining = length; - do - { - written = MIN(NEAR_BUF_SIZE, remaining); - png_memcpy(buf, data, written); /* copy far buffer to near buffer */ -#if defined(_WIN32_WCE) - if ( !WriteFile(io_ptr, buf, written, &err, NULL) ) - err = 0; -#else - err = fwrite(buf, 1, written, io_ptr); -#endif - if (err != written) - break; - else - check += err; - data += written; - remaining -= written; - } - while (remaining != 0); - } - if (check != length) - png_error(png_ptr, "Write Error"); -} - -#endif -#endif - -/* This function is called to output any data pending writing (normally - to disk). After png_flush is called, there should be no data pending - writing in any buffers. */ -#if defined(PNG_WRITE_FLUSH_SUPPORTED) -void /* PRIVATE */ -png_flush(png_structp png_ptr) -{ - if (png_ptr->output_flush_fn != NULL) - (*(png_ptr->output_flush_fn))(png_ptr); -} - -#if !defined(PNG_NO_STDIO) -void PNGAPI -png_default_flush(png_structp png_ptr) -{ -#if !defined(_WIN32_WCE) - png_FILE_p io_ptr; - io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr)); - if (io_ptr != NULL) - fflush(io_ptr); -#endif -} -#endif -#endif - -/* This function allows the application to supply new output functions for - libpng if standard C streams aren't being used. - - This function takes as its arguments: - png_ptr - pointer to a png output data structure - io_ptr - pointer to user supplied structure containing info about - the output functions. May be NULL. - write_data_fn - pointer to a new output function that takes as its - arguments a pointer to a png_struct, a pointer to - data to be written, and a 32-bit unsigned int that is - the number of bytes to be written. The new write - function should call png_error(png_ptr, "Error msg") - to exit and output any fatal error messages. - flush_data_fn - pointer to a new flush function that takes as its - arguments a pointer to a png_struct. After a call to - the flush function, there should be no data in any buffers - or pending transmission. If the output method doesn't do - any buffering of ouput, a function prototype must still be - supplied although it doesn't have to do anything. If - PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile - time, output_flush_fn will be ignored, although it must be - supplied for compatibility. */ -void PNGAPI -png_set_write_fn(png_structp png_ptr, png_voidp io_ptr, - png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn) -{ - png_ptr->io_ptr = io_ptr; - -#if !defined(PNG_NO_STDIO) - if (write_data_fn != NULL) - png_ptr->write_data_fn = write_data_fn; - else - png_ptr->write_data_fn = png_default_write_data; -#else - png_ptr->write_data_fn = write_data_fn; -#endif - -#if defined(PNG_WRITE_FLUSH_SUPPORTED) -#if !defined(PNG_NO_STDIO) - if (output_flush_fn != NULL) - png_ptr->output_flush_fn = output_flush_fn; - else - png_ptr->output_flush_fn = png_default_flush; -#else - png_ptr->output_flush_fn = output_flush_fn; -#endif -#endif /* PNG_WRITE_FLUSH_SUPPORTED */ - - /* It is an error to read while writing a png file */ - if (png_ptr->read_data_fn != NULL) - { - png_ptr->read_data_fn = NULL; - png_warning(png_ptr, - "Attempted to set both read_data_fn and write_data_fn in"); - png_warning(png_ptr, - "the same structure. Resetting read_data_fn to NULL."); - } -} - -#if defined(USE_FAR_KEYWORD) -#if defined(_MSC_VER) -void *png_far_to_near(png_structp png_ptr,png_voidp ptr, int check) -{ - void *near_ptr; - void FAR *far_ptr; - FP_OFF(near_ptr) = FP_OFF(ptr); - far_ptr = (void FAR *)near_ptr; - if(check != 0) - if(FP_SEG(ptr) != FP_SEG(far_ptr)) - png_error(png_ptr,"segment lost in conversion"); - return(near_ptr); -} -# else -void *png_far_to_near(png_structp png_ptr,png_voidp ptr, int check) -{ - void *near_ptr; - void FAR *far_ptr; - near_ptr = (void FAR *)ptr; - far_ptr = (void FAR *)near_ptr; - if(check != 0) - if(far_ptr != ptr) - png_error(png_ptr,"segment lost in conversion"); - return(near_ptr); -} -# endif -# endif -#endif /* PNG_WRITE_SUPPORTED */ diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngwrite.c b/gtkmm-osx/trunk/libpng-1.2.5/pngwrite.c deleted file mode 100644 index 10c9ea4..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/pngwrite.c +++ /dev/null @@ -1,1450 +0,0 @@ - -/* pngwrite.c - general routines to write a PNG file - * - * libpng 1.2.5 - October 3, 2002 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2002 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) - */ - -/* get internal access to png.h */ -#define PNG_INTERNAL -#include "png.h" -#ifdef PNG_WRITE_SUPPORTED - -/* Writes all the PNG information. This is the suggested way to use the - * library. If you have a new chunk to add, make a function to write it, - * and put it in the correct location here. If you want the chunk written - * after the image data, put it in png_write_end(). I strongly encourage - * you to supply a PNG_INFO_ flag, and check info_ptr->valid before writing - * the chunk, as that will keep the code from breaking if you want to just - * write a plain PNG file. If you have long comments, I suggest writing - * them in png_write_end(), and compressing them. - */ -void PNGAPI -png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr) -{ - png_debug(1, "in png_write_info_before_PLTE\n"); - if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE)) - { - png_write_sig(png_ptr); /* write PNG signature */ -#if defined(PNG_MNG_FEATURES_SUPPORTED) - if((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)&&(png_ptr->mng_features_permitted)) - { - png_warning(png_ptr,"MNG features are not allowed in a PNG datastream\n"); - png_ptr->mng_features_permitted=0; - } -#endif - /* write IHDR information. */ - png_write_IHDR(png_ptr, info_ptr->width, info_ptr->height, - info_ptr->bit_depth, info_ptr->color_type, info_ptr->compression_type, - info_ptr->filter_type, -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) - info_ptr->interlace_type); -#else - 0); -#endif - /* the rest of these check to see if the valid field has the appropriate - flag set, and if it does, writes the chunk. */ -#if defined(PNG_WRITE_gAMA_SUPPORTED) - if (info_ptr->valid & PNG_INFO_gAMA) - { -# ifdef PNG_FLOATING_POINT_SUPPORTED - png_write_gAMA(png_ptr, info_ptr->gamma); -#else -#ifdef PNG_FIXED_POINT_SUPPORTED - png_write_gAMA_fixed(png_ptr, info_ptr->int_gamma); -# endif -#endif - } -#endif -#if defined(PNG_WRITE_sRGB_SUPPORTED) - if (info_ptr->valid & PNG_INFO_sRGB) - png_write_sRGB(png_ptr, (int)info_ptr->srgb_intent); -#endif -#if defined(PNG_WRITE_iCCP_SUPPORTED) - if (info_ptr->valid & PNG_INFO_iCCP) - png_write_iCCP(png_ptr, info_ptr->iccp_name, PNG_COMPRESSION_TYPE_BASE, - info_ptr->iccp_profile, (int)info_ptr->iccp_proflen); -#endif -#if defined(PNG_WRITE_sBIT_SUPPORTED) - if (info_ptr->valid & PNG_INFO_sBIT) - png_write_sBIT(png_ptr, &(info_ptr->sig_bit), info_ptr->color_type); -#endif -#if defined(PNG_WRITE_cHRM_SUPPORTED) - if (info_ptr->valid & PNG_INFO_cHRM) - { -#ifdef PNG_FLOATING_POINT_SUPPORTED - png_write_cHRM(png_ptr, - info_ptr->x_white, info_ptr->y_white, - info_ptr->x_red, info_ptr->y_red, - info_ptr->x_green, info_ptr->y_green, - info_ptr->x_blue, info_ptr->y_blue); -#else -# ifdef PNG_FIXED_POINT_SUPPORTED - png_write_cHRM_fixed(png_ptr, - info_ptr->int_x_white, info_ptr->int_y_white, - info_ptr->int_x_red, info_ptr->int_y_red, - info_ptr->int_x_green, info_ptr->int_y_green, - info_ptr->int_x_blue, info_ptr->int_y_blue); -# endif -#endif - } -#endif -#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) - if (info_ptr->unknown_chunks_num) - { - png_unknown_chunk *up; - - png_debug(5, "writing extra chunks\n"); - - for (up = info_ptr->unknown_chunks; - up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; - up++) - { - int keep=png_handle_as_unknown(png_ptr, up->name); - if (keep != HANDLE_CHUNK_NEVER && - up->location && (!(up->location & PNG_HAVE_PLTE)) && - ((up->name[3] & 0x20) || keep == HANDLE_CHUNK_ALWAYS || - (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS))) - { - png_write_chunk(png_ptr, up->name, up->data, up->size); - } - } - } -#endif - png_ptr->mode |= PNG_WROTE_INFO_BEFORE_PLTE; - } -} - -void PNGAPI -png_write_info(png_structp png_ptr, png_infop info_ptr) -{ -#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) - int i; -#endif - - png_debug(1, "in png_write_info\n"); - - png_write_info_before_PLTE(png_ptr, info_ptr); - - if (info_ptr->valid & PNG_INFO_PLTE) - png_write_PLTE(png_ptr, info_ptr->palette, - (png_uint_32)info_ptr->num_palette); - else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - png_error(png_ptr, "Valid palette required for paletted images\n"); - -#if defined(PNG_WRITE_tRNS_SUPPORTED) - if (info_ptr->valid & PNG_INFO_tRNS) - { -#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) - /* invert the alpha channel (in tRNS) */ - if ((png_ptr->transformations & PNG_INVERT_ALPHA) && - info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - int j; - for (j=0; j<(int)info_ptr->num_trans; j++) - info_ptr->trans[j] = (png_byte)(255 - info_ptr->trans[j]); - } -#endif - png_write_tRNS(png_ptr, info_ptr->trans, &(info_ptr->trans_values), - info_ptr->num_trans, info_ptr->color_type); - } -#endif -#if defined(PNG_WRITE_bKGD_SUPPORTED) - if (info_ptr->valid & PNG_INFO_bKGD) - png_write_bKGD(png_ptr, &(info_ptr->background), info_ptr->color_type); -#endif -#if defined(PNG_WRITE_hIST_SUPPORTED) - if (info_ptr->valid & PNG_INFO_hIST) - png_write_hIST(png_ptr, info_ptr->hist, info_ptr->num_palette); -#endif -#if defined(PNG_WRITE_oFFs_SUPPORTED) - if (info_ptr->valid & PNG_INFO_oFFs) - png_write_oFFs(png_ptr, info_ptr->x_offset, info_ptr->y_offset, - info_ptr->offset_unit_type); -#endif -#if defined(PNG_WRITE_pCAL_SUPPORTED) - if (info_ptr->valid & PNG_INFO_pCAL) - png_write_pCAL(png_ptr, info_ptr->pcal_purpose, info_ptr->pcal_X0, - info_ptr->pcal_X1, info_ptr->pcal_type, info_ptr->pcal_nparams, - info_ptr->pcal_units, info_ptr->pcal_params); -#endif -#if defined(PNG_WRITE_sCAL_SUPPORTED) - if (info_ptr->valid & PNG_INFO_sCAL) -#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO) - png_write_sCAL(png_ptr, (int)info_ptr->scal_unit, - info_ptr->scal_pixel_width, info_ptr->scal_pixel_height); -#else -#ifdef PNG_FIXED_POINT_SUPPORTED - png_write_sCAL_s(png_ptr, (int)info_ptr->scal_unit, - info_ptr->scal_s_width, info_ptr->scal_s_height); -#else - png_warning(png_ptr, - "png_write_sCAL not supported; sCAL chunk not written.\n"); -#endif -#endif -#endif -#if defined(PNG_WRITE_pHYs_SUPPORTED) - if (info_ptr->valid & PNG_INFO_pHYs) - png_write_pHYs(png_ptr, info_ptr->x_pixels_per_unit, - info_ptr->y_pixels_per_unit, info_ptr->phys_unit_type); -#endif -#if defined(PNG_WRITE_tIME_SUPPORTED) - if (info_ptr->valid & PNG_INFO_tIME) - { - png_write_tIME(png_ptr, &(info_ptr->mod_time)); - png_ptr->mode |= PNG_WROTE_tIME; - } -#endif -#if defined(PNG_WRITE_sPLT_SUPPORTED) - if (info_ptr->valid & PNG_INFO_sPLT) - for (i = 0; i < (int)info_ptr->splt_palettes_num; i++) - png_write_sPLT(png_ptr, info_ptr->splt_palettes + i); -#endif -#if defined(PNG_WRITE_TEXT_SUPPORTED) - /* Check to see if we need to write text chunks */ - for (i = 0; i < info_ptr->num_text; i++) - { - png_debug2(2, "Writing header text chunk %d, type %d\n", i, - info_ptr->text[i].compression); - /* an internationalized chunk? */ - if (info_ptr->text[i].compression > 0) - { -#if defined(PNG_WRITE_iTXt_SUPPORTED) - /* write international chunk */ - png_write_iTXt(png_ptr, - info_ptr->text[i].compression, - info_ptr->text[i].key, - info_ptr->text[i].lang, - info_ptr->text[i].lang_key, - info_ptr->text[i].text); -#else - png_warning(png_ptr, "Unable to write international text\n"); -#endif - /* Mark this chunk as written */ - info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; - } - /* If we want a compressed text chunk */ - else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_zTXt) - { -#if defined(PNG_WRITE_zTXt_SUPPORTED) - /* write compressed chunk */ - png_write_zTXt(png_ptr, info_ptr->text[i].key, - info_ptr->text[i].text, 0, - info_ptr->text[i].compression); -#else - png_warning(png_ptr, "Unable to write compressed text\n"); -#endif - /* Mark this chunk as written */ - info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR; - } - else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE) - { -#if defined(PNG_WRITE_tEXt_SUPPORTED) - /* write uncompressed chunk */ - png_write_tEXt(png_ptr, info_ptr->text[i].key, - info_ptr->text[i].text, - 0); -#else - png_warning(png_ptr, "Unable to write uncompressed text\n"); -#endif - /* Mark this chunk as written */ - info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; - } - } -#endif -#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) - if (info_ptr->unknown_chunks_num) - { - png_unknown_chunk *up; - - png_debug(5, "writing extra chunks\n"); - - for (up = info_ptr->unknown_chunks; - up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; - up++) - { - int keep=png_handle_as_unknown(png_ptr, up->name); - if (keep != HANDLE_CHUNK_NEVER && - up->location && (up->location & PNG_HAVE_PLTE) && - !(up->location & PNG_HAVE_IDAT) && - ((up->name[3] & 0x20) || keep == HANDLE_CHUNK_ALWAYS || - (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS))) - { - png_write_chunk(png_ptr, up->name, up->data, up->size); - } - } - } -#endif -} - -/* Writes the end of the PNG file. If you don't want to write comments or - * time information, you can pass NULL for info. If you already wrote these - * in png_write_info(), do not write them again here. If you have long - * comments, I suggest writing them here, and compressing them. - */ -void PNGAPI -png_write_end(png_structp png_ptr, png_infop info_ptr) -{ - png_debug(1, "in png_write_end\n"); - if (!(png_ptr->mode & PNG_HAVE_IDAT)) - png_error(png_ptr, "No IDATs written into file"); - - /* see if user wants us to write information chunks */ - if (info_ptr != NULL) - { -#if defined(PNG_WRITE_TEXT_SUPPORTED) - int i; /* local index variable */ -#endif -#if defined(PNG_WRITE_tIME_SUPPORTED) - /* check to see if user has supplied a time chunk */ - if ((info_ptr->valid & PNG_INFO_tIME) && - !(png_ptr->mode & PNG_WROTE_tIME)) - png_write_tIME(png_ptr, &(info_ptr->mod_time)); -#endif -#if defined(PNG_WRITE_TEXT_SUPPORTED) - /* loop through comment chunks */ - for (i = 0; i < info_ptr->num_text; i++) - { - png_debug2(2, "Writing trailer text chunk %d, type %d\n", i, - info_ptr->text[i].compression); - /* an internationalized chunk? */ - if (info_ptr->text[i].compression > 0) - { -#if defined(PNG_WRITE_iTXt_SUPPORTED) - /* write international chunk */ - png_write_iTXt(png_ptr, - info_ptr->text[i].compression, - info_ptr->text[i].key, - info_ptr->text[i].lang, - info_ptr->text[i].lang_key, - info_ptr->text[i].text); -#else - png_warning(png_ptr, "Unable to write international text\n"); -#endif - /* Mark this chunk as written */ - info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; - } - else if (info_ptr->text[i].compression >= PNG_TEXT_COMPRESSION_zTXt) - { -#if defined(PNG_WRITE_zTXt_SUPPORTED) - /* write compressed chunk */ - png_write_zTXt(png_ptr, info_ptr->text[i].key, - info_ptr->text[i].text, 0, - info_ptr->text[i].compression); -#else - png_warning(png_ptr, "Unable to write compressed text\n"); -#endif - /* Mark this chunk as written */ - info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR; - } - else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE) - { -#if defined(PNG_WRITE_tEXt_SUPPORTED) - /* write uncompressed chunk */ - png_write_tEXt(png_ptr, info_ptr->text[i].key, - info_ptr->text[i].text, 0); -#else - png_warning(png_ptr, "Unable to write uncompressed text\n"); -#endif - - /* Mark this chunk as written */ - info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; - } - } -#endif -#if defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) - if (info_ptr->unknown_chunks_num) - { - png_unknown_chunk *up; - - png_debug(5, "writing extra chunks\n"); - - for (up = info_ptr->unknown_chunks; - up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; - up++) - { - int keep=png_handle_as_unknown(png_ptr, up->name); - if (keep != HANDLE_CHUNK_NEVER && - up->location && (up->location & PNG_AFTER_IDAT) && - ((up->name[3] & 0x20) || keep == HANDLE_CHUNK_ALWAYS || - (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS))) - { - png_write_chunk(png_ptr, up->name, up->data, up->size); - } - } - } -#endif - } - - png_ptr->mode |= PNG_AFTER_IDAT; - - /* write end of PNG file */ - png_write_IEND(png_ptr); -#if 0 -/* This flush, added in libpng-1.0.8, causes some applications to crash - because they do not set png_ptr->output_flush_fn */ - png_flush(png_ptr); -#endif -} - -#if defined(PNG_WRITE_tIME_SUPPORTED) -#if !defined(_WIN32_WCE) -/* "time.h" functions are not supported on WindowsCE */ -void PNGAPI -png_convert_from_struct_tm(png_timep ptime, struct tm FAR * ttime) -{ - png_debug(1, "in png_convert_from_struct_tm\n"); - ptime->year = (png_uint_16)(1900 + ttime->tm_year); - ptime->month = (png_byte)(ttime->tm_mon + 1); - ptime->day = (png_byte)ttime->tm_mday; - ptime->hour = (png_byte)ttime->tm_hour; - ptime->minute = (png_byte)ttime->tm_min; - ptime->second = (png_byte)ttime->tm_sec; -} - -void PNGAPI -png_convert_from_time_t(png_timep ptime, time_t ttime) -{ - struct tm *tbuf; - - png_debug(1, "in png_convert_from_time_t\n"); - tbuf = gmtime(&ttime); - png_convert_from_struct_tm(ptime, tbuf); -} -#endif -#endif - -/* Initialize png_ptr structure, and allocate any memory needed */ -png_structp PNGAPI -png_create_write_struct(png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn) -{ -#ifdef PNG_USER_MEM_SUPPORTED - return (png_create_write_struct_2(user_png_ver, error_ptr, error_fn, - warn_fn, png_voidp_NULL, png_malloc_ptr_NULL, png_free_ptr_NULL)); -} - -/* Alternate initialize png_ptr structure, and allocate any memory needed */ -png_structp PNGAPI -png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, - png_malloc_ptr malloc_fn, png_free_ptr free_fn) -{ -#endif /* PNG_USER_MEM_SUPPORTED */ - png_structp png_ptr; -#ifdef PNG_SETJMP_SUPPORTED -#ifdef USE_FAR_KEYWORD - jmp_buf jmpbuf; -#endif -#endif - int i; - png_debug(1, "in png_create_write_struct\n"); -#ifdef PNG_USER_MEM_SUPPORTED - png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG, - (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr); -#else - png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG); -#endif /* PNG_USER_MEM_SUPPORTED */ - if (png_ptr == NULL) - return (NULL); - -#if !defined(PNG_1_0_X) -#ifdef PNG_ASSEMBLER_CODE_SUPPORTED - png_init_mmx_flags(png_ptr); /* 1.2.0 addition */ -#endif -#endif /* PNG_1_0_X */ - -#ifdef PNG_SETJMP_SUPPORTED -#ifdef USE_FAR_KEYWORD - if (setjmp(jmpbuf)) -#else - if (setjmp(png_ptr->jmpbuf)) -#endif - { - png_free(png_ptr, png_ptr->zbuf); - png_ptr->zbuf=NULL; - png_destroy_struct(png_ptr); - return (NULL); - } -#ifdef USE_FAR_KEYWORD - png_memcpy(png_ptr->jmpbuf,jmpbuf,sizeof(jmp_buf)); -#endif -#endif - -#ifdef PNG_USER_MEM_SUPPORTED - png_set_mem_fn(png_ptr, mem_ptr, malloc_fn, free_fn); -#endif /* PNG_USER_MEM_SUPPORTED */ - png_set_error_fn(png_ptr, error_ptr, error_fn, warn_fn); - - i=0; - do - { - if(user_png_ver[i] != png_libpng_ver[i]) - png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; - } while (png_libpng_ver[i++]); - - if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH) - { - /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so - * we must recompile any applications that use any older library version. - * For versions after libpng 1.0, we will be compatible, so we need - * only check the first digit. - */ - if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] || - (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) || - (user_png_ver[0] == '0' && user_png_ver[2] < '9')) - { -#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) - char msg[80]; - if (user_png_ver) - { - sprintf(msg, "Application was compiled with png.h from libpng-%.20s", - user_png_ver); - png_warning(png_ptr, msg); - } - sprintf(msg, "Application is running with png.c from libpng-%.20s", - png_libpng_ver); - png_warning(png_ptr, msg); -#endif -#ifdef PNG_ERROR_NUMBERS_SUPPORTED - png_ptr->flags=0; -#endif - png_error(png_ptr, - "Incompatible libpng version in application and library"); - } - } - - /* initialize zbuf - compression buffer */ - png_ptr->zbuf_size = PNG_ZBUF_SIZE; - png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, - (png_uint_32)png_ptr->zbuf_size); - - png_set_write_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL, - png_flush_ptr_NULL); - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - png_set_filter_heuristics(png_ptr, PNG_FILTER_HEURISTIC_DEFAULT, - 1, png_doublep_NULL, png_doublep_NULL); -#endif - -#ifdef PNG_SETJMP_SUPPORTED -/* Applications that neglect to set up their own setjmp() and then encounter - a png_error() will longjmp here. Since the jmpbuf is then meaningless we - abort instead of returning. */ -#ifdef USE_FAR_KEYWORD - if (setjmp(jmpbuf)) - PNG_ABORT(); - png_memcpy(png_ptr->jmpbuf,jmpbuf,sizeof(jmp_buf)); -#else - if (setjmp(png_ptr->jmpbuf)) - PNG_ABORT(); -#endif -#endif - return (png_ptr); -} - -/* Initialize png_ptr structure, and allocate any memory needed */ -#undef png_write_init -void PNGAPI -png_write_init(png_structp png_ptr) -{ - /* We only come here via pre-1.0.7-compiled applications */ - png_write_init_2(png_ptr, "1.0.6 or earlier", 0, 0); -} - -void PNGAPI -png_write_init_2(png_structp png_ptr, png_const_charp user_png_ver, - png_size_t png_struct_size, png_size_t png_info_size) -{ - /* We only come here via pre-1.0.12-compiled applications */ -#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) - if(sizeof(png_struct) > png_struct_size || sizeof(png_info) > png_info_size) - { - char msg[80]; - png_ptr->warning_fn=NULL; - if (user_png_ver) - { - sprintf(msg, "Application was compiled with png.h from libpng-%.20s", - user_png_ver); - png_warning(png_ptr, msg); - } - sprintf(msg, "Application is running with png.c from libpng-%.20s", - png_libpng_ver); - png_warning(png_ptr, msg); - } -#endif - if(sizeof(png_struct) > png_struct_size) - { - png_ptr->error_fn=NULL; -#ifdef PNG_ERROR_NUMBERS_SUPPORTED - png_ptr->flags=0; -#endif - png_error(png_ptr, - "The png struct allocated by the application for writing is too small."); - } - if(sizeof(png_info) > png_info_size) - { - png_ptr->error_fn=NULL; -#ifdef PNG_ERROR_NUMBERS_SUPPORTED - png_ptr->flags=0; -#endif - png_error(png_ptr, - "The info struct allocated by the application for writing is too small."); - } - png_write_init_3(&png_ptr, user_png_ver, png_struct_size); -} - - -void PNGAPI -png_write_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver, - png_size_t png_struct_size) -{ - png_structp png_ptr=*ptr_ptr; -#ifdef PNG_SETJMP_SUPPORTED - jmp_buf tmp_jmp; /* to save current jump buffer */ -#endif - int i = 0; - do - { - if (user_png_ver[i] != png_libpng_ver[i]) - { -#ifdef PNG_LEGACY_SUPPORTED - png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; -#else - png_ptr->warning_fn=NULL; - png_warning(png_ptr, - "Application uses deprecated png_write_init() and should be recompiled."); - break; -#endif - } - } while (png_libpng_ver[i++]); - - png_debug(1, "in png_write_init_3\n"); - -#ifdef PNG_SETJMP_SUPPORTED - /* save jump buffer and error functions */ - png_memcpy(tmp_jmp, png_ptr->jmpbuf, sizeof (jmp_buf)); -#endif - - if (sizeof(png_struct) > png_struct_size) - { - png_destroy_struct(png_ptr); - png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG); - *ptr_ptr = png_ptr; - } - - /* reset all variables to 0 */ - png_memset(png_ptr, 0, sizeof (png_struct)); - -#if !defined(PNG_1_0_X) -#ifdef PNG_ASSEMBLER_CODE_SUPPORTED - png_init_mmx_flags(png_ptr); /* 1.2.0 addition */ -#endif -#endif /* PNG_1_0_X */ - -#ifdef PNG_SETJMP_SUPPORTED - /* restore jump buffer */ - png_memcpy(png_ptr->jmpbuf, tmp_jmp, sizeof (jmp_buf)); -#endif - - png_set_write_fn(png_ptr, png_voidp_NULL, png_rw_ptr_NULL, - png_flush_ptr_NULL); - - /* initialize zbuf - compression buffer */ - png_ptr->zbuf_size = PNG_ZBUF_SIZE; - png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, - (png_uint_32)png_ptr->zbuf_size); - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - png_set_filter_heuristics(png_ptr, PNG_FILTER_HEURISTIC_DEFAULT, - 1, png_doublep_NULL, png_doublep_NULL); -#endif -} - -/* Write a few rows of image data. If the image is interlaced, - * either you will have to write the 7 sub images, or, if you - * have called png_set_interlace_handling(), you will have to - * "write" the image seven times. - */ -void PNGAPI -png_write_rows(png_structp png_ptr, png_bytepp row, - png_uint_32 num_rows) -{ - png_uint_32 i; /* row counter */ - png_bytepp rp; /* row pointer */ - - png_debug(1, "in png_write_rows\n"); - /* loop through the rows */ - for (i = 0, rp = row; i < num_rows; i++, rp++) - { - png_write_row(png_ptr, *rp); - } -} - -/* Write the image. You only need to call this function once, even - * if you are writing an interlaced image. - */ -void PNGAPI -png_write_image(png_structp png_ptr, png_bytepp image) -{ - png_uint_32 i; /* row index */ - int pass, num_pass; /* pass variables */ - png_bytepp rp; /* points to current row */ - - png_debug(1, "in png_write_image\n"); -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) - /* intialize interlace handling. If image is not interlaced, - this will set pass to 1 */ - num_pass = png_set_interlace_handling(png_ptr); -#else - num_pass = 1; -#endif - /* loop through passes */ - for (pass = 0; pass < num_pass; pass++) - { - /* loop through image */ - for (i = 0, rp = image; i < png_ptr->height; i++, rp++) - { - png_write_row(png_ptr, *rp); - } - } -} - -/* called by user to write a row of image data */ -void PNGAPI -png_write_row(png_structp png_ptr, png_bytep row) -{ - png_debug2(1, "in png_write_row (row %ld, pass %d)\n", - png_ptr->row_number, png_ptr->pass); - /* initialize transformations and other stuff if first time */ - if (png_ptr->row_number == 0 && png_ptr->pass == 0) - { - /* make sure we wrote the header info */ - if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE)) - png_error(png_ptr, - "png_write_info was never called before png_write_row."); - - /* check for transforms that have been set but were defined out */ -#if !defined(PNG_WRITE_INVERT_SUPPORTED) && defined(PNG_READ_INVERT_SUPPORTED) - if (png_ptr->transformations & PNG_INVERT_MONO) - png_warning(png_ptr, "PNG_WRITE_INVERT_SUPPORTED is not defined."); -#endif -#if !defined(PNG_WRITE_FILLER_SUPPORTED) && defined(PNG_READ_FILLER_SUPPORTED) - if (png_ptr->transformations & PNG_FILLER) - png_warning(png_ptr, "PNG_WRITE_FILLER_SUPPORTED is not defined."); -#endif -#if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && defined(PNG_READ_PACKSWAP_SUPPORTED) - if (png_ptr->transformations & PNG_PACKSWAP) - png_warning(png_ptr, "PNG_WRITE_PACKSWAP_SUPPORTED is not defined."); -#endif -#if !defined(PNG_WRITE_PACK_SUPPORTED) && defined(PNG_READ_PACK_SUPPORTED) - if (png_ptr->transformations & PNG_PACK) - png_warning(png_ptr, "PNG_WRITE_PACK_SUPPORTED is not defined."); -#endif -#if !defined(PNG_WRITE_SHIFT_SUPPORTED) && defined(PNG_READ_SHIFT_SUPPORTED) - if (png_ptr->transformations & PNG_SHIFT) - png_warning(png_ptr, "PNG_WRITE_SHIFT_SUPPORTED is not defined."); -#endif -#if !defined(PNG_WRITE_BGR_SUPPORTED) && defined(PNG_READ_BGR_SUPPORTED) - if (png_ptr->transformations & PNG_BGR) - png_warning(png_ptr, "PNG_WRITE_BGR_SUPPORTED is not defined."); -#endif -#if !defined(PNG_WRITE_SWAP_SUPPORTED) && defined(PNG_READ_SWAP_SUPPORTED) - if (png_ptr->transformations & PNG_SWAP_BYTES) - png_warning(png_ptr, "PNG_WRITE_SWAP_SUPPORTED is not defined."); -#endif - - png_write_start_row(png_ptr); - } - -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) - /* if interlaced and not interested in row, return */ - if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE)) - { - switch (png_ptr->pass) - { - case 0: - if (png_ptr->row_number & 0x07) - { - png_write_finish_row(png_ptr); - return; - } - break; - case 1: - if ((png_ptr->row_number & 0x07) || png_ptr->width < 5) - { - png_write_finish_row(png_ptr); - return; - } - break; - case 2: - if ((png_ptr->row_number & 0x07) != 4) - { - png_write_finish_row(png_ptr); - return; - } - break; - case 3: - if ((png_ptr->row_number & 0x03) || png_ptr->width < 3) - { - png_write_finish_row(png_ptr); - return; - } - break; - case 4: - if ((png_ptr->row_number & 0x03) != 2) - { - png_write_finish_row(png_ptr); - return; - } - break; - case 5: - if ((png_ptr->row_number & 0x01) || png_ptr->width < 2) - { - png_write_finish_row(png_ptr); - return; - } - break; - case 6: - if (!(png_ptr->row_number & 0x01)) - { - png_write_finish_row(png_ptr); - return; - } - break; - } - } -#endif - - /* set up row info for transformations */ - png_ptr->row_info.color_type = png_ptr->color_type; - png_ptr->row_info.width = png_ptr->usr_width; - png_ptr->row_info.channels = png_ptr->usr_channels; - png_ptr->row_info.bit_depth = png_ptr->usr_bit_depth; - png_ptr->row_info.pixel_depth = (png_byte)(png_ptr->row_info.bit_depth * - png_ptr->row_info.channels); - - png_ptr->row_info.rowbytes = ((png_ptr->row_info.width * - (png_uint_32)png_ptr->row_info.pixel_depth + 7) >> 3); - - png_debug1(3, "row_info->color_type = %d\n", png_ptr->row_info.color_type); - png_debug1(3, "row_info->width = %lu\n", png_ptr->row_info.width); - png_debug1(3, "row_info->channels = %d\n", png_ptr->row_info.channels); - png_debug1(3, "row_info->bit_depth = %d\n", png_ptr->row_info.bit_depth); - png_debug1(3, "row_info->pixel_depth = %d\n", png_ptr->row_info.pixel_depth); - png_debug1(3, "row_info->rowbytes = %lu\n", png_ptr->row_info.rowbytes); - - /* Copy user's row into buffer, leaving room for filter byte. */ - png_memcpy_check(png_ptr, png_ptr->row_buf + 1, row, - png_ptr->row_info.rowbytes); - -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) - /* handle interlacing */ - if (png_ptr->interlaced && png_ptr->pass < 6 && - (png_ptr->transformations & PNG_INTERLACE)) - { - png_do_write_interlace(&(png_ptr->row_info), - png_ptr->row_buf + 1, png_ptr->pass); - /* this should always get caught above, but still ... */ - if (!(png_ptr->row_info.width)) - { - png_write_finish_row(png_ptr); - return; - } - } -#endif - - /* handle other transformations */ - if (png_ptr->transformations) - png_do_write_transformations(png_ptr); - -#if defined(PNG_MNG_FEATURES_SUPPORTED) - /* Write filter_method 64 (intrapixel differencing) only if - * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and - * 2. Libpng did not write a PNG signature (this filter_method is only - * used in PNG datastreams that are embedded in MNG datastreams) and - * 3. The application called png_permit_mng_features with a mask that - * included PNG_FLAG_MNG_FILTER_64 and - * 4. The filter_method is 64 and - * 5. The color_type is RGB or RGBA - */ - if((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && - (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING)) - { - /* Intrapixel differencing */ - png_do_write_intrapixel(&(png_ptr->row_info), png_ptr->row_buf + 1); - } -#endif - - /* Find a filter if necessary, filter the row and write it out. */ - png_write_find_filter(png_ptr, &(png_ptr->row_info)); - - if (png_ptr->write_row_fn != NULL) - (*(png_ptr->write_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass); -} - -#if defined(PNG_WRITE_FLUSH_SUPPORTED) -/* Set the automatic flush interval or 0 to turn flushing off */ -void PNGAPI -png_set_flush(png_structp png_ptr, int nrows) -{ - png_debug(1, "in png_set_flush\n"); - png_ptr->flush_dist = (nrows < 0 ? 0 : nrows); -} - -/* flush the current output buffers now */ -void PNGAPI -png_write_flush(png_structp png_ptr) -{ - int wrote_IDAT; - - png_debug(1, "in png_write_flush\n"); - /* We have already written out all of the data */ - if (png_ptr->row_number >= png_ptr->num_rows) - return; - - do - { - int ret; - - /* compress the data */ - ret = deflate(&png_ptr->zstream, Z_SYNC_FLUSH); - wrote_IDAT = 0; - - /* check for compression errors */ - if (ret != Z_OK) - { - if (png_ptr->zstream.msg != NULL) - png_error(png_ptr, png_ptr->zstream.msg); - else - png_error(png_ptr, "zlib error"); - } - - if (!(png_ptr->zstream.avail_out)) - { - /* write the IDAT and reset the zlib output buffer */ - png_write_IDAT(png_ptr, png_ptr->zbuf, - png_ptr->zbuf_size); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - wrote_IDAT = 1; - } - } while(wrote_IDAT == 1); - - /* If there is any data left to be output, write it into a new IDAT */ - if (png_ptr->zbuf_size != png_ptr->zstream.avail_out) - { - /* write the IDAT and reset the zlib output buffer */ - png_write_IDAT(png_ptr, png_ptr->zbuf, - png_ptr->zbuf_size - png_ptr->zstream.avail_out); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - } - png_ptr->flush_rows = 0; - png_flush(png_ptr); -} -#endif /* PNG_WRITE_FLUSH_SUPPORTED */ - -/* free all memory used by the write */ -void PNGAPI -png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr) -{ - png_structp png_ptr = NULL; - png_infop info_ptr = NULL; -#ifdef PNG_USER_MEM_SUPPORTED - png_free_ptr free_fn = NULL; - png_voidp mem_ptr = NULL; -#endif - - png_debug(1, "in png_destroy_write_struct\n"); - if (png_ptr_ptr != NULL) - { - png_ptr = *png_ptr_ptr; -#ifdef PNG_USER_MEM_SUPPORTED - free_fn = png_ptr->free_fn; - mem_ptr = png_ptr->mem_ptr; -#endif - } - - if (info_ptr_ptr != NULL) - info_ptr = *info_ptr_ptr; - - if (info_ptr != NULL) - { - png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1); - -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) - if (png_ptr->num_chunk_list) - { - png_free(png_ptr, png_ptr->chunk_list); - png_ptr->chunk_list=NULL; - png_ptr->num_chunk_list=0; - } -#endif - -#ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2((png_voidp)info_ptr, (png_free_ptr)free_fn, - (png_voidp)mem_ptr); -#else - png_destroy_struct((png_voidp)info_ptr); -#endif - *info_ptr_ptr = NULL; - } - - if (png_ptr != NULL) - { - png_write_destroy(png_ptr); -#ifdef PNG_USER_MEM_SUPPORTED - png_destroy_struct_2((png_voidp)png_ptr, (png_free_ptr)free_fn, - (png_voidp)mem_ptr); -#else - png_destroy_struct((png_voidp)png_ptr); -#endif - *png_ptr_ptr = NULL; - } -} - - -/* Free any memory used in png_ptr struct (old method) */ -void /* PRIVATE */ -png_write_destroy(png_structp png_ptr) -{ -#ifdef PNG_SETJMP_SUPPORTED - jmp_buf tmp_jmp; /* save jump buffer */ -#endif - png_error_ptr error_fn; - png_error_ptr warning_fn; - png_voidp error_ptr; -#ifdef PNG_USER_MEM_SUPPORTED - png_free_ptr free_fn; -#endif - - png_debug(1, "in png_write_destroy\n"); - /* free any memory zlib uses */ - deflateEnd(&png_ptr->zstream); - - /* free our memory. png_free checks NULL for us. */ - png_free(png_ptr, png_ptr->zbuf); - png_free(png_ptr, png_ptr->row_buf); - png_free(png_ptr, png_ptr->prev_row); - png_free(png_ptr, png_ptr->sub_row); - png_free(png_ptr, png_ptr->up_row); - png_free(png_ptr, png_ptr->avg_row); - png_free(png_ptr, png_ptr->paeth_row); - -#if defined(PNG_TIME_RFC1123_SUPPORTED) - png_free(png_ptr, png_ptr->time_buffer); -#endif - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - png_free(png_ptr, png_ptr->prev_filters); - png_free(png_ptr, png_ptr->filter_weights); - png_free(png_ptr, png_ptr->inv_filter_weights); - png_free(png_ptr, png_ptr->filter_costs); - png_free(png_ptr, png_ptr->inv_filter_costs); -#endif - -#ifdef PNG_SETJMP_SUPPORTED - /* reset structure */ - png_memcpy(tmp_jmp, png_ptr->jmpbuf, sizeof (jmp_buf)); -#endif - - error_fn = png_ptr->error_fn; - warning_fn = png_ptr->warning_fn; - error_ptr = png_ptr->error_ptr; -#ifdef PNG_USER_MEM_SUPPORTED - free_fn = png_ptr->free_fn; -#endif - - png_memset(png_ptr, 0, sizeof (png_struct)); - - png_ptr->error_fn = error_fn; - png_ptr->warning_fn = warning_fn; - png_ptr->error_ptr = error_ptr; -#ifdef PNG_USER_MEM_SUPPORTED - png_ptr->free_fn = free_fn; -#endif - -#ifdef PNG_SETJMP_SUPPORTED - png_memcpy(png_ptr->jmpbuf, tmp_jmp, sizeof (jmp_buf)); -#endif -} - -/* Allow the application to select one or more row filters to use. */ -void PNGAPI -png_set_filter(png_structp png_ptr, int method, int filters) -{ - png_debug(1, "in png_set_filter\n"); -#if defined(PNG_MNG_FEATURES_SUPPORTED) - if((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && - (method == PNG_INTRAPIXEL_DIFFERENCING)) - method = PNG_FILTER_TYPE_BASE; -#endif - if (method == PNG_FILTER_TYPE_BASE) - { - switch (filters & (PNG_ALL_FILTERS | 0x07)) - { - case 5: - case 6: - case 7: png_warning(png_ptr, "Unknown row filter for method 0"); - case PNG_FILTER_VALUE_NONE: png_ptr->do_filter=PNG_FILTER_NONE; break; - case PNG_FILTER_VALUE_SUB: png_ptr->do_filter=PNG_FILTER_SUB; break; - case PNG_FILTER_VALUE_UP: png_ptr->do_filter=PNG_FILTER_UP; break; - case PNG_FILTER_VALUE_AVG: png_ptr->do_filter=PNG_FILTER_AVG; break; - case PNG_FILTER_VALUE_PAETH: png_ptr->do_filter=PNG_FILTER_PAETH;break; - default: png_ptr->do_filter = (png_byte)filters; break; - } - - /* If we have allocated the row_buf, this means we have already started - * with the image and we should have allocated all of the filter buffers - * that have been selected. If prev_row isn't already allocated, then - * it is too late to start using the filters that need it, since we - * will be missing the data in the previous row. If an application - * wants to start and stop using particular filters during compression, - * it should start out with all of the filters, and then add and - * remove them after the start of compression. - */ - if (png_ptr->row_buf != NULL) - { - if ((png_ptr->do_filter & PNG_FILTER_SUB) && png_ptr->sub_row == NULL) - { - png_ptr->sub_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB; - } - - if ((png_ptr->do_filter & PNG_FILTER_UP) && png_ptr->up_row == NULL) - { - if (png_ptr->prev_row == NULL) - { - png_warning(png_ptr, "Can't add Up filter after starting"); - png_ptr->do_filter &= ~PNG_FILTER_UP; - } - else - { - png_ptr->up_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->up_row[0] = PNG_FILTER_VALUE_UP; - } - } - - if ((png_ptr->do_filter & PNG_FILTER_AVG) && png_ptr->avg_row == NULL) - { - if (png_ptr->prev_row == NULL) - { - png_warning(png_ptr, "Can't add Average filter after starting"); - png_ptr->do_filter &= ~PNG_FILTER_AVG; - } - else - { - png_ptr->avg_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG; - } - } - - if ((png_ptr->do_filter & PNG_FILTER_PAETH) && - png_ptr->paeth_row == NULL) - { - if (png_ptr->prev_row == NULL) - { - png_warning(png_ptr, "Can't add Paeth filter after starting"); - png_ptr->do_filter &= (png_byte)(~PNG_FILTER_PAETH); - } - else - { - png_ptr->paeth_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH; - } - } - - if (png_ptr->do_filter == PNG_NO_FILTERS) - png_ptr->do_filter = PNG_FILTER_NONE; - } - } - else - png_error(png_ptr, "Unknown custom filter method"); -} - -/* This allows us to influence the way in which libpng chooses the "best" - * filter for the current scanline. While the "minimum-sum-of-absolute- - * differences metric is relatively fast and effective, there is some - * question as to whether it can be improved upon by trying to keep the - * filtered data going to zlib more consistent, hopefully resulting in - * better compression. - */ -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) /* GRR 970116 */ -void PNGAPI -png_set_filter_heuristics(png_structp png_ptr, int heuristic_method, - int num_weights, png_doublep filter_weights, - png_doublep filter_costs) -{ - int i; - - png_debug(1, "in png_set_filter_heuristics\n"); - if (heuristic_method >= PNG_FILTER_HEURISTIC_LAST) - { - png_warning(png_ptr, "Unknown filter heuristic method"); - return; - } - - if (heuristic_method == PNG_FILTER_HEURISTIC_DEFAULT) - { - heuristic_method = PNG_FILTER_HEURISTIC_UNWEIGHTED; - } - - if (num_weights < 0 || filter_weights == NULL || - heuristic_method == PNG_FILTER_HEURISTIC_UNWEIGHTED) - { - num_weights = 0; - } - - png_ptr->num_prev_filters = (png_byte)num_weights; - png_ptr->heuristic_method = (png_byte)heuristic_method; - - if (num_weights > 0) - { - if (png_ptr->prev_filters == NULL) - { - png_ptr->prev_filters = (png_bytep)png_malloc(png_ptr, - (png_uint_32)(sizeof(png_byte) * num_weights)); - - /* To make sure that the weighting starts out fairly */ - for (i = 0; i < num_weights; i++) - { - png_ptr->prev_filters[i] = 255; - } - } - - if (png_ptr->filter_weights == NULL) - { - png_ptr->filter_weights = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(sizeof(png_uint_16) * num_weights)); - - png_ptr->inv_filter_weights = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(sizeof(png_uint_16) * num_weights)); - for (i = 0; i < num_weights; i++) - { - png_ptr->inv_filter_weights[i] = - png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR; - } - } - - for (i = 0; i < num_weights; i++) - { - if (filter_weights[i] < 0.0) - { - png_ptr->inv_filter_weights[i] = - png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR; - } - else - { - png_ptr->inv_filter_weights[i] = - (png_uint_16)((double)PNG_WEIGHT_FACTOR*filter_weights[i]+0.5); - png_ptr->filter_weights[i] = - (png_uint_16)((double)PNG_WEIGHT_FACTOR/filter_weights[i]+0.5); - } - } - } - - /* If, in the future, there are other filter methods, this would - * need to be based on png_ptr->filter. - */ - if (png_ptr->filter_costs == NULL) - { - png_ptr->filter_costs = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST)); - - png_ptr->inv_filter_costs = (png_uint_16p)png_malloc(png_ptr, - (png_uint_32)(sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST)); - - for (i = 0; i < PNG_FILTER_VALUE_LAST; i++) - { - png_ptr->inv_filter_costs[i] = - png_ptr->filter_costs[i] = PNG_COST_FACTOR; - } - } - - /* Here is where we set the relative costs of the different filters. We - * should take the desired compression level into account when setting - * the costs, so that Paeth, for instance, has a high relative cost at low - * compression levels, while it has a lower relative cost at higher - * compression settings. The filter types are in order of increasing - * relative cost, so it would be possible to do this with an algorithm. - */ - for (i = 0; i < PNG_FILTER_VALUE_LAST; i++) - { - if (filter_costs == NULL || filter_costs[i] < 0.0) - { - png_ptr->inv_filter_costs[i] = - png_ptr->filter_costs[i] = PNG_COST_FACTOR; - } - else if (filter_costs[i] >= 1.0) - { - png_ptr->inv_filter_costs[i] = - (png_uint_16)((double)PNG_COST_FACTOR / filter_costs[i] + 0.5); - png_ptr->filter_costs[i] = - (png_uint_16)((double)PNG_COST_FACTOR * filter_costs[i] + 0.5); - } - } -} -#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */ - -void PNGAPI -png_set_compression_level(png_structp png_ptr, int level) -{ - png_debug(1, "in png_set_compression_level\n"); - png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_LEVEL; - png_ptr->zlib_level = level; -} - -void PNGAPI -png_set_compression_mem_level(png_structp png_ptr, int mem_level) -{ - png_debug(1, "in png_set_compression_mem_level\n"); - png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL; - png_ptr->zlib_mem_level = mem_level; -} - -void PNGAPI -png_set_compression_strategy(png_structp png_ptr, int strategy) -{ - png_debug(1, "in png_set_compression_strategy\n"); - png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_STRATEGY; - png_ptr->zlib_strategy = strategy; -} - -void PNGAPI -png_set_compression_window_bits(png_structp png_ptr, int window_bits) -{ - if (window_bits > 15) - png_warning(png_ptr, "Only compression windows <= 32k supported by PNG"); - else if (window_bits < 8) - png_warning(png_ptr, "Only compression windows >= 256 supported by PNG"); -#ifndef WBITS_8_OK - /* avoid libpng bug with 256-byte windows */ - if (window_bits == 8) - { - png_warning(png_ptr, "Compression window is being reset to 512"); - window_bits=9; - } -#endif - png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS; - png_ptr->zlib_window_bits = window_bits; -} - -void PNGAPI -png_set_compression_method(png_structp png_ptr, int method) -{ - png_debug(1, "in png_set_compression_method\n"); - if (method != 8) - png_warning(png_ptr, "Only compression method 8 is supported by PNG"); - png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_METHOD; - png_ptr->zlib_method = method; -} - -void PNGAPI -png_set_write_status_fn(png_structp png_ptr, png_write_status_ptr write_row_fn) -{ - png_ptr->write_row_fn = write_row_fn; -} - -#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) -void PNGAPI -png_set_write_user_transform_fn(png_structp png_ptr, png_user_transform_ptr - write_user_transform_fn) -{ - png_debug(1, "in png_set_write_user_transform_fn\n"); - png_ptr->transformations |= PNG_USER_TRANSFORM; - png_ptr->write_user_transform_fn = write_user_transform_fn; -} -#endif - - -#if defined(PNG_INFO_IMAGE_SUPPORTED) -void PNGAPI -png_write_png(png_structp png_ptr, png_infop info_ptr, - int transforms, voidp params) -{ -#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) - /* invert the alpha channel from opacity to transparency */ - if (transforms & PNG_TRANSFORM_INVERT_ALPHA) - png_set_invert_alpha(png_ptr); -#endif - - /* Write the file header information. */ - png_write_info(png_ptr, info_ptr); - - /* ------ these transformations don't touch the info structure ------- */ - -#if defined(PNG_WRITE_INVERT_SUPPORTED) - /* invert monochrome pixels */ - if (transforms & PNG_TRANSFORM_INVERT_MONO) - png_set_invert_mono(png_ptr); -#endif - -#if defined(PNG_WRITE_SHIFT_SUPPORTED) - /* Shift the pixels up to a legal bit depth and fill in - * as appropriate to correctly scale the image. - */ - if ((transforms & PNG_TRANSFORM_SHIFT) - && (info_ptr->valid & PNG_INFO_sBIT)) - png_set_shift(png_ptr, &info_ptr->sig_bit); -#endif - -#if defined(PNG_WRITE_PACK_SUPPORTED) - /* pack pixels into bytes */ - if (transforms & PNG_TRANSFORM_PACKING) - png_set_packing(png_ptr); -#endif - -#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) - /* swap location of alpha bytes from ARGB to RGBA */ - if (transforms & PNG_TRANSFORM_SWAP_ALPHA) - png_set_swap_alpha(png_ptr); -#endif - -#if defined(PNG_WRITE_FILLER_SUPPORTED) - /* Get rid of filler (OR ALPHA) bytes, pack XRGB/RGBX/ARGB/RGBA into - * RGB (4 channels -> 3 channels). The second parameter is not used. - */ - if (transforms & PNG_TRANSFORM_STRIP_FILLER) - png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); -#endif - -#if defined(PNG_WRITE_BGR_SUPPORTED) - /* flip BGR pixels to RGB */ - if (transforms & PNG_TRANSFORM_BGR) - png_set_bgr(png_ptr); -#endif - -#if defined(PNG_WRITE_SWAP_SUPPORTED) - /* swap bytes of 16-bit files to most significant byte first */ - if (transforms & PNG_TRANSFORM_SWAP_ENDIAN) - png_set_swap(png_ptr); -#endif - -#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) - /* swap bits of 1, 2, 4 bit packed pixel formats */ - if (transforms & PNG_TRANSFORM_PACKSWAP) - png_set_packswap(png_ptr); -#endif - - /* ----------------------- end of transformations ------------------- */ - - /* write the bits */ - if (info_ptr->valid & PNG_INFO_IDAT) - png_write_image(png_ptr, info_ptr->row_pointers); - - /* It is REQUIRED to call this to finish writing the rest of the file */ - png_write_end(png_ptr, info_ptr); - - if(transforms == 0 || params == NULL) - /* quiet compiler warnings */ return; -} -#endif -#endif /* PNG_WRITE_SUPPORTED */ diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngwtran.c b/gtkmm-osx/trunk/libpng-1.2.5/pngwtran.c deleted file mode 100644 index c28da11..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/pngwtran.c +++ /dev/null @@ -1,563 +0,0 @@ - -/* pngwtran.c - transforms the data in a row for PNG writers - * - * libpng 1.2.5 - October 3, 2002 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2002 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) - */ - -#define PNG_INTERNAL -#include "png.h" -#ifdef PNG_WRITE_SUPPORTED - -/* Transform the data according to the user's wishes. The order of - * transformations is significant. - */ -void /* PRIVATE */ -png_do_write_transformations(png_structp png_ptr) -{ - png_debug(1, "in png_do_write_transformations\n"); - - if (png_ptr == NULL) - return; - -#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) - if (png_ptr->transformations & PNG_USER_TRANSFORM) - if(png_ptr->write_user_transform_fn != NULL) - (*(png_ptr->write_user_transform_fn)) /* user write transform function */ - (png_ptr, /* png_ptr */ - &(png_ptr->row_info), /* row_info: */ - /* png_uint_32 width; width of row */ - /* png_uint_32 rowbytes; number of bytes in row */ - /* png_byte color_type; color type of pixels */ - /* png_byte bit_depth; bit depth of samples */ - /* png_byte channels; number of channels (1-4) */ - /* png_byte pixel_depth; bits per pixel (depth*channels) */ - png_ptr->row_buf + 1); /* start of pixel data for row */ -#endif -#if defined(PNG_WRITE_FILLER_SUPPORTED) - if (png_ptr->transformations & PNG_FILLER) - png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, - png_ptr->flags); -#endif -#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) - if (png_ptr->transformations & PNG_PACKSWAP) - png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif -#if defined(PNG_WRITE_PACK_SUPPORTED) - if (png_ptr->transformations & PNG_PACK) - png_do_pack(&(png_ptr->row_info), png_ptr->row_buf + 1, - (png_uint_32)png_ptr->bit_depth); -#endif -#if defined(PNG_WRITE_SWAP_SUPPORTED) - if (png_ptr->transformations & PNG_SWAP_BYTES) - png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif -#if defined(PNG_WRITE_SHIFT_SUPPORTED) - if (png_ptr->transformations & PNG_SHIFT) - png_do_shift(&(png_ptr->row_info), png_ptr->row_buf + 1, - &(png_ptr->shift)); -#endif -#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) - if (png_ptr->transformations & PNG_INVERT_ALPHA) - png_do_write_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif -#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) - if (png_ptr->transformations & PNG_SWAP_ALPHA) - png_do_write_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif -#if defined(PNG_WRITE_BGR_SUPPORTED) - if (png_ptr->transformations & PNG_BGR) - png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif -#if defined(PNG_WRITE_INVERT_SUPPORTED) - if (png_ptr->transformations & PNG_INVERT_MONO) - png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif -} - -#if defined(PNG_WRITE_PACK_SUPPORTED) -/* Pack pixels into bytes. Pass the true bit depth in bit_depth. The - * row_info bit depth should be 8 (one pixel per byte). The channels - * should be 1 (this only happens on grayscale and paletted images). - */ -void /* PRIVATE */ -png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) -{ - png_debug(1, "in png_do_pack\n"); - if (row_info->bit_depth == 8 && -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - row_info->channels == 1) - { - switch ((int)bit_depth) - { - case 1: - { - png_bytep sp, dp; - int mask, v; - png_uint_32 i; - png_uint_32 row_width = row_info->width; - - sp = row; - dp = row; - mask = 0x80; - v = 0; - - for (i = 0; i < row_width; i++) - { - if (*sp != 0) - v |= mask; - sp++; - if (mask > 1) - mask >>= 1; - else - { - mask = 0x80; - *dp = (png_byte)v; - dp++; - v = 0; - } - } - if (mask != 0x80) - *dp = (png_byte)v; - break; - } - case 2: - { - png_bytep sp, dp; - int shift, v; - png_uint_32 i; - png_uint_32 row_width = row_info->width; - - sp = row; - dp = row; - shift = 6; - v = 0; - for (i = 0; i < row_width; i++) - { - png_byte value; - - value = (png_byte)(*sp & 0x03); - v |= (value << shift); - if (shift == 0) - { - shift = 6; - *dp = (png_byte)v; - dp++; - v = 0; - } - else - shift -= 2; - sp++; - } - if (shift != 6) - *dp = (png_byte)v; - break; - } - case 4: - { - png_bytep sp, dp; - int shift, v; - png_uint_32 i; - png_uint_32 row_width = row_info->width; - - sp = row; - dp = row; - shift = 4; - v = 0; - for (i = 0; i < row_width; i++) - { - png_byte value; - - value = (png_byte)(*sp & 0x0f); - v |= (value << shift); - - if (shift == 0) - { - shift = 4; - *dp = (png_byte)v; - dp++; - v = 0; - } - else - shift -= 4; - - sp++; - } - if (shift != 4) - *dp = (png_byte)v; - break; - } - } - row_info->bit_depth = (png_byte)bit_depth; - row_info->pixel_depth = (png_byte)(bit_depth * row_info->channels); - row_info->rowbytes = - ((row_info->width * row_info->pixel_depth + 7) >> 3); - } -} -#endif - -#if defined(PNG_WRITE_SHIFT_SUPPORTED) -/* Shift pixel values to take advantage of whole range. Pass the - * true number of bits in bit_depth. The row should be packed - * according to row_info->bit_depth. Thus, if you had a row of - * bit depth 4, but the pixels only had values from 0 to 7, you - * would pass 3 as bit_depth, and this routine would translate the - * data to 0 to 15. - */ -void /* PRIVATE */ -png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth) -{ - png_debug(1, "in png_do_shift\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL && -#else - if ( -#endif - row_info->color_type != PNG_COLOR_TYPE_PALETTE) - { - int shift_start[4], shift_dec[4]; - int channels = 0; - - if (row_info->color_type & PNG_COLOR_MASK_COLOR) - { - shift_start[channels] = row_info->bit_depth - bit_depth->red; - shift_dec[channels] = bit_depth->red; - channels++; - shift_start[channels] = row_info->bit_depth - bit_depth->green; - shift_dec[channels] = bit_depth->green; - channels++; - shift_start[channels] = row_info->bit_depth - bit_depth->blue; - shift_dec[channels] = bit_depth->blue; - channels++; - } - else - { - shift_start[channels] = row_info->bit_depth - bit_depth->gray; - shift_dec[channels] = bit_depth->gray; - channels++; - } - if (row_info->color_type & PNG_COLOR_MASK_ALPHA) - { - shift_start[channels] = row_info->bit_depth - bit_depth->alpha; - shift_dec[channels] = bit_depth->alpha; - channels++; - } - - /* with low row depths, could only be grayscale, so one channel */ - if (row_info->bit_depth < 8) - { - png_bytep bp = row; - png_uint_32 i; - png_byte mask; - png_uint_32 row_bytes = row_info->rowbytes; - - if (bit_depth->gray == 1 && row_info->bit_depth == 2) - mask = 0x55; - else if (row_info->bit_depth == 4 && bit_depth->gray == 3) - mask = 0x11; - else - mask = 0xff; - - for (i = 0; i < row_bytes; i++, bp++) - { - png_uint_16 v; - int j; - - v = *bp; - *bp = 0; - for (j = shift_start[0]; j > -shift_dec[0]; j -= shift_dec[0]) - { - if (j > 0) - *bp |= (png_byte)((v << j) & 0xff); - else - *bp |= (png_byte)((v >> (-j)) & mask); - } - } - } - else if (row_info->bit_depth == 8) - { - png_bytep bp = row; - png_uint_32 i; - png_uint_32 istop = channels * row_info->width; - - for (i = 0; i < istop; i++, bp++) - { - - png_uint_16 v; - int j; - int c = (int)(i%channels); - - v = *bp; - *bp = 0; - for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c]) - { - if (j > 0) - *bp |= (png_byte)((v << j) & 0xff); - else - *bp |= (png_byte)((v >> (-j)) & 0xff); - } - } - } - else - { - png_bytep bp; - png_uint_32 i; - png_uint_32 istop = channels * row_info->width; - - for (bp = row, i = 0; i < istop; i++) - { - int c = (int)(i%channels); - png_uint_16 value, v; - int j; - - v = (png_uint_16)(((png_uint_16)(*bp) << 8) + *(bp + 1)); - value = 0; - for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c]) - { - if (j > 0) - value |= (png_uint_16)((v << j) & (png_uint_16)0xffff); - else - value |= (png_uint_16)((v >> (-j)) & (png_uint_16)0xffff); - } - *bp++ = (png_byte)(value >> 8); - *bp++ = (png_byte)(value & 0xff); - } - } - } -} -#endif - -#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) -void /* PRIVATE */ -png_do_write_swap_alpha(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_write_swap_alpha\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif - { - if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - { - /* This converts from ARGB to RGBA */ - if (row_info->bit_depth == 8) - { - png_bytep sp, dp; - png_uint_32 i; - png_uint_32 row_width = row_info->width; - for (i = 0, sp = dp = row; i < row_width; i++) - { - png_byte save = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = save; - } - } - /* This converts from AARRGGBB to RRGGBBAA */ - else - { - png_bytep sp, dp; - png_uint_32 i; - png_uint_32 row_width = row_info->width; - - for (i = 0, sp = dp = row; i < row_width; i++) - { - png_byte save[2]; - save[0] = *(sp++); - save[1] = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = save[0]; - *(dp++) = save[1]; - } - } - } - else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - { - /* This converts from AG to GA */ - if (row_info->bit_depth == 8) - { - png_bytep sp, dp; - png_uint_32 i; - png_uint_32 row_width = row_info->width; - - for (i = 0, sp = dp = row; i < row_width; i++) - { - png_byte save = *(sp++); - *(dp++) = *(sp++); - *(dp++) = save; - } - } - /* This converts from AAGG to GGAA */ - else - { - png_bytep sp, dp; - png_uint_32 i; - png_uint_32 row_width = row_info->width; - - for (i = 0, sp = dp = row; i < row_width; i++) - { - png_byte save[2]; - save[0] = *(sp++); - save[1] = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = save[0]; - *(dp++) = save[1]; - } - } - } - } -} -#endif - -#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) -void /* PRIVATE */ -png_do_write_invert_alpha(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_write_invert_alpha\n"); -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL) -#endif - { - if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - { - /* This inverts the alpha channel in RGBA */ - if (row_info->bit_depth == 8) - { - png_bytep sp, dp; - png_uint_32 i; - png_uint_32 row_width = row_info->width; - for (i = 0, sp = dp = row; i < row_width; i++) - { - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = (png_byte)(255 - *(sp++)); - } - } - /* This inverts the alpha channel in RRGGBBAA */ - else - { - png_bytep sp, dp; - png_uint_32 i; - png_uint_32 row_width = row_info->width; - - for (i = 0, sp = dp = row; i < row_width; i++) - { - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = (png_byte)(255 - *(sp++)); - *(dp++) = (png_byte)(255 - *(sp++)); - } - } - } - else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - { - /* This inverts the alpha channel in GA */ - if (row_info->bit_depth == 8) - { - png_bytep sp, dp; - png_uint_32 i; - png_uint_32 row_width = row_info->width; - - for (i = 0, sp = dp = row; i < row_width; i++) - { - *(dp++) = *(sp++); - *(dp++) = (png_byte)(255 - *(sp++)); - } - } - /* This inverts the alpha channel in GGAA */ - else - { - png_bytep sp, dp; - png_uint_32 i; - png_uint_32 row_width = row_info->width; - - for (i = 0, sp = dp = row; i < row_width; i++) - { - *(dp++) = *(sp++); - *(dp++) = *(sp++); - *(dp++) = (png_byte)(255 - *(sp++)); - *(dp++) = (png_byte)(255 - *(sp++)); - } - } - } - } -} -#endif - -#if defined(PNG_MNG_FEATURES_SUPPORTED) -/* undoes intrapixel differencing */ -void /* PRIVATE */ -png_do_write_intrapixel(png_row_infop row_info, png_bytep row) -{ - png_debug(1, "in png_do_write_intrapixel\n"); - if ( -#if defined(PNG_USELESS_TESTS_SUPPORTED) - row != NULL && row_info != NULL && -#endif - (row_info->color_type & PNG_COLOR_MASK_COLOR)) - { - int bytes_per_pixel; - png_uint_32 row_width = row_info->width; - if (row_info->bit_depth == 8) - { - png_bytep rp; - png_uint_32 i; - - if (row_info->color_type == PNG_COLOR_TYPE_RGB) - bytes_per_pixel = 3; - else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - bytes_per_pixel = 4; - else - return; - - for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) - { - *(rp) = (png_byte)((*rp - *(rp+1))&0xff); - *(rp+2) = (png_byte)((*(rp+2) - *(rp+1))&0xff); - } - } - else if (row_info->bit_depth == 16) - { - png_bytep rp; - png_uint_32 i; - - if (row_info->color_type == PNG_COLOR_TYPE_RGB) - bytes_per_pixel = 6; - else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) - bytes_per_pixel = 8; - else - return; - - for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) - { - png_uint_32 s0=*(rp )<<8 | *(rp+1); - png_uint_32 s1=*(rp+2)<<8 | *(rp+3); - png_uint_32 s2=*(rp+4)<<8 | *(rp+5); - png_uint_32 red=(s0-s1)&0xffff; - png_uint_32 blue=(s2-s1)&0xffff; - *(rp ) = (png_byte)((red>>8)&0xff); - *(rp+1) = (png_byte)(red&0xff); - *(rp+4) = (png_byte)((blue>>8)&0xff); - *(rp+5) = (png_byte)(blue&0xff); - } - } - } -} -#endif /* PNG_MNG_FEATURES_SUPPORTED */ -#endif /* PNG_WRITE_SUPPORTED */ diff --git a/gtkmm-osx/trunk/libpng-1.2.5/pngwutil.c b/gtkmm-osx/trunk/libpng-1.2.5/pngwutil.c deleted file mode 100644 index 4b5ab6c..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/pngwutil.c +++ /dev/null @@ -1,2675 +0,0 @@ - -/* pngwutil.c - utilities to write a PNG file - * - * libpng 1.2.5 - October 3, 2002 - * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2002 Glenn Randers-Pehrson - * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) - * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) - */ - -#define PNG_INTERNAL -#include "png.h" -#ifdef PNG_WRITE_SUPPORTED - -/* Place a 32-bit number into a buffer in PNG byte order. We work - * with unsigned numbers for convenience, although one supported - * ancillary chunk uses signed (two's complement) numbers. - */ -void /* PRIVATE */ -png_save_uint_32(png_bytep buf, png_uint_32 i) -{ - buf[0] = (png_byte)((i >> 24) & 0xff); - buf[1] = (png_byte)((i >> 16) & 0xff); - buf[2] = (png_byte)((i >> 8) & 0xff); - buf[3] = (png_byte)(i & 0xff); -} - -#if defined(PNG_WRITE_pCAL_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED) -/* The png_save_int_32 function assumes integers are stored in two's - * complement format. If this isn't the case, then this routine needs to - * be modified to write data in two's complement format. - */ -void /* PRIVATE */ -png_save_int_32(png_bytep buf, png_int_32 i) -{ - buf[0] = (png_byte)((i >> 24) & 0xff); - buf[1] = (png_byte)((i >> 16) & 0xff); - buf[2] = (png_byte)((i >> 8) & 0xff); - buf[3] = (png_byte)(i & 0xff); -} -#endif - -/* Place a 16-bit number into a buffer in PNG byte order. - * The parameter is declared unsigned int, not png_uint_16, - * just to avoid potential problems on pre-ANSI C compilers. - */ -void /* PRIVATE */ -png_save_uint_16(png_bytep buf, unsigned int i) -{ - buf[0] = (png_byte)((i >> 8) & 0xff); - buf[1] = (png_byte)(i & 0xff); -} - -/* Write a PNG chunk all at once. The type is an array of ASCII characters - * representing the chunk name. The array must be at least 4 bytes in - * length, and does not need to be null terminated. To be safe, pass the - * pre-defined chunk names here, and if you need a new one, define it - * where the others are defined. The length is the length of the data. - * All the data must be present. If that is not possible, use the - * png_write_chunk_start(), png_write_chunk_data(), and png_write_chunk_end() - * functions instead. - */ -void PNGAPI -png_write_chunk(png_structp png_ptr, png_bytep chunk_name, - png_bytep data, png_size_t length) -{ - png_write_chunk_start(png_ptr, chunk_name, (png_uint_32)length); - png_write_chunk_data(png_ptr, data, length); - png_write_chunk_end(png_ptr); -} - -/* Write the start of a PNG chunk. The type is the chunk type. - * The total_length is the sum of the lengths of all the data you will be - * passing in png_write_chunk_data(). - */ -void PNGAPI -png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name, - png_uint_32 length) -{ - png_byte buf[4]; - png_debug2(0, "Writing %s chunk (%lu bytes)\n", chunk_name, length); - - /* write the length */ - png_save_uint_32(buf, length); - png_write_data(png_ptr, buf, (png_size_t)4); - - /* write the chunk name */ - png_write_data(png_ptr, chunk_name, (png_size_t)4); - /* reset the crc and run it over the chunk name */ - png_reset_crc(png_ptr); - png_calculate_crc(png_ptr, chunk_name, (png_size_t)4); -} - -/* Write the data of a PNG chunk started with png_write_chunk_start(). - * Note that multiple calls to this function are allowed, and that the - * sum of the lengths from these calls *must* add up to the total_length - * given to png_write_chunk_start(). - */ -void PNGAPI -png_write_chunk_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - /* write the data, and run the CRC over it */ - if (data != NULL && length > 0) - { - png_calculate_crc(png_ptr, data, length); - png_write_data(png_ptr, data, length); - } -} - -/* Finish a chunk started with png_write_chunk_start(). */ -void PNGAPI -png_write_chunk_end(png_structp png_ptr) -{ - png_byte buf[4]; - - /* write the crc */ - png_save_uint_32(buf, png_ptr->crc); - - png_write_data(png_ptr, buf, (png_size_t)4); -} - -/* Simple function to write the signature. If we have already written - * the magic bytes of the signature, or more likely, the PNG stream is - * being embedded into another stream and doesn't need its own signature, - * we should call png_set_sig_bytes() to tell libpng how many of the - * bytes have already been written. - */ -void /* PRIVATE */ -png_write_sig(png_structp png_ptr) -{ - png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10}; - /* write the rest of the 8 byte signature */ - png_write_data(png_ptr, &png_signature[png_ptr->sig_bytes], - (png_size_t)8 - png_ptr->sig_bytes); - if(png_ptr->sig_bytes < 3) - png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE; -} - -#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_iCCP_SUPPORTED) -/* - * This pair of functions encapsulates the operation of (a) compressing a - * text string, and (b) issuing it later as a series of chunk data writes. - * The compression_state structure is shared context for these functions - * set up by the caller in order to make the whole mess thread-safe. - */ - -typedef struct -{ - char *input; /* the uncompressed input data */ - int input_len; /* its length */ - int num_output_ptr; /* number of output pointers used */ - int max_output_ptr; /* size of output_ptr */ - png_charpp output_ptr; /* array of pointers to output */ -} compression_state; - -/* compress given text into storage in the png_ptr structure */ -static int /* PRIVATE */ -png_text_compress(png_structp png_ptr, - png_charp text, png_size_t text_len, int compression, - compression_state *comp) -{ - int ret; - - comp->num_output_ptr = comp->max_output_ptr = 0; - comp->output_ptr = NULL; - comp->input = NULL; - - /* we may just want to pass the text right through */ - if (compression == PNG_TEXT_COMPRESSION_NONE) - { - comp->input = text; - comp->input_len = text_len; - return((int)text_len); - } - - if (compression >= PNG_TEXT_COMPRESSION_LAST) - { -#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) - char msg[50]; - sprintf(msg, "Unknown compression type %d", compression); - png_warning(png_ptr, msg); -#else - png_warning(png_ptr, "Unknown compression type"); -#endif - } - - /* We can't write the chunk until we find out how much data we have, - * which means we need to run the compressor first and save the - * output. This shouldn't be a problem, as the vast majority of - * comments should be reasonable, but we will set up an array of - * malloc'd pointers to be sure. - * - * If we knew the application was well behaved, we could simplify this - * greatly by assuming we can always malloc an output buffer large - * enough to hold the compressed text ((1001 * text_len / 1000) + 12) - * and malloc this directly. The only time this would be a bad idea is - * if we can't malloc more than 64K and we have 64K of random input - * data, or if the input string is incredibly large (although this - * wouldn't cause a failure, just a slowdown due to swapping). - */ - - /* set up the compression buffers */ - png_ptr->zstream.avail_in = (uInt)text_len; - png_ptr->zstream.next_in = (Bytef *)text; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - png_ptr->zstream.next_out = (Bytef *)png_ptr->zbuf; - - /* this is the same compression loop as in png_write_row() */ - do - { - /* compress the data */ - ret = deflate(&png_ptr->zstream, Z_NO_FLUSH); - if (ret != Z_OK) - { - /* error */ - if (png_ptr->zstream.msg != NULL) - png_error(png_ptr, png_ptr->zstream.msg); - else - png_error(png_ptr, "zlib error"); - } - /* check to see if we need more room */ - if (!png_ptr->zstream.avail_out && png_ptr->zstream.avail_in) - { - /* make sure the output array has room */ - if (comp->num_output_ptr >= comp->max_output_ptr) - { - int old_max; - - old_max = comp->max_output_ptr; - comp->max_output_ptr = comp->num_output_ptr + 4; - if (comp->output_ptr != NULL) - { - png_charpp old_ptr; - - old_ptr = comp->output_ptr; - comp->output_ptr = (png_charpp)png_malloc(png_ptr, - (png_uint_32)(comp->max_output_ptr * sizeof (png_charpp))); - png_memcpy(comp->output_ptr, old_ptr, old_max - * sizeof (png_charp)); - png_free(png_ptr, old_ptr); - } - else - comp->output_ptr = (png_charpp)png_malloc(png_ptr, - (png_uint_32)(comp->max_output_ptr * sizeof (png_charp))); - } - - /* save the data */ - comp->output_ptr[comp->num_output_ptr] = (png_charp)png_malloc(png_ptr, - (png_uint_32)png_ptr->zbuf_size); - png_memcpy(comp->output_ptr[comp->num_output_ptr], png_ptr->zbuf, - png_ptr->zbuf_size); - comp->num_output_ptr++; - - /* and reset the buffer */ - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - png_ptr->zstream.next_out = png_ptr->zbuf; - } - /* continue until we don't have any more to compress */ - } while (png_ptr->zstream.avail_in); - - /* finish the compression */ - do - { - /* tell zlib we are finished */ - ret = deflate(&png_ptr->zstream, Z_FINISH); - - if (ret == Z_OK) - { - /* check to see if we need more room */ - if (!(png_ptr->zstream.avail_out)) - { - /* check to make sure our output array has room */ - if (comp->num_output_ptr >= comp->max_output_ptr) - { - int old_max; - - old_max = comp->max_output_ptr; - comp->max_output_ptr = comp->num_output_ptr + 4; - if (comp->output_ptr != NULL) - { - png_charpp old_ptr; - - old_ptr = comp->output_ptr; - /* This could be optimized to realloc() */ - comp->output_ptr = (png_charpp)png_malloc(png_ptr, - (png_uint_32)(comp->max_output_ptr * sizeof (png_charpp))); - png_memcpy(comp->output_ptr, old_ptr, - old_max * sizeof (png_charp)); - png_free(png_ptr, old_ptr); - } - else - comp->output_ptr = (png_charpp)png_malloc(png_ptr, - (png_uint_32)(comp->max_output_ptr * sizeof (png_charp))); - } - - /* save off the data */ - comp->output_ptr[comp->num_output_ptr] = - (png_charp)png_malloc(png_ptr, (png_uint_32)png_ptr->zbuf_size); - png_memcpy(comp->output_ptr[comp->num_output_ptr], png_ptr->zbuf, - png_ptr->zbuf_size); - comp->num_output_ptr++; - - /* and reset the buffer pointers */ - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - png_ptr->zstream.next_out = png_ptr->zbuf; - } - } - else if (ret != Z_STREAM_END) - { - /* we got an error */ - if (png_ptr->zstream.msg != NULL) - png_error(png_ptr, png_ptr->zstream.msg); - else - png_error(png_ptr, "zlib error"); - } - } while (ret != Z_STREAM_END); - - /* text length is number of buffers plus last buffer */ - text_len = png_ptr->zbuf_size * comp->num_output_ptr; - if (png_ptr->zstream.avail_out < png_ptr->zbuf_size) - text_len += png_ptr->zbuf_size - (png_size_t)png_ptr->zstream.avail_out; - - return((int)text_len); -} - -/* ship the compressed text out via chunk writes */ -static void /* PRIVATE */ -png_write_compressed_data_out(png_structp png_ptr, compression_state *comp) -{ - int i; - - /* handle the no-compression case */ - if (comp->input) - { - png_write_chunk_data(png_ptr, (png_bytep)comp->input, - (png_size_t)comp->input_len); - return; - } - - /* write saved output buffers, if any */ - for (i = 0; i < comp->num_output_ptr; i++) - { - png_write_chunk_data(png_ptr,(png_bytep)comp->output_ptr[i], - png_ptr->zbuf_size); - png_free(png_ptr, comp->output_ptr[i]); - comp->output_ptr[i]=NULL; - } - if (comp->max_output_ptr != 0) - png_free(png_ptr, comp->output_ptr); - comp->output_ptr=NULL; - /* write anything left in zbuf */ - if (png_ptr->zstream.avail_out < (png_uint_32)png_ptr->zbuf_size) - png_write_chunk_data(png_ptr, png_ptr->zbuf, - png_ptr->zbuf_size - png_ptr->zstream.avail_out); - - /* reset zlib for another zTXt/iTXt or the image data */ - deflateReset(&png_ptr->zstream); - -} -#endif - -/* Write the IHDR chunk, and update the png_struct with the necessary - * information. Note that the rest of this code depends upon this - * information being correct. - */ -void /* PRIVATE */ -png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height, - int bit_depth, int color_type, int compression_type, int filter_type, - int interlace_type) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_IHDR; -#endif - png_byte buf[13]; /* buffer to store the IHDR info */ - - png_debug(1, "in png_write_IHDR\n"); - /* Check that we have valid input data from the application info */ - switch (color_type) - { - case PNG_COLOR_TYPE_GRAY: - switch (bit_depth) - { - case 1: - case 2: - case 4: - case 8: - case 16: png_ptr->channels = 1; break; - default: png_error(png_ptr,"Invalid bit depth for grayscale image"); - } - break; - case PNG_COLOR_TYPE_RGB: - if (bit_depth != 8 && bit_depth != 16) - png_error(png_ptr, "Invalid bit depth for RGB image"); - png_ptr->channels = 3; - break; - case PNG_COLOR_TYPE_PALETTE: - switch (bit_depth) - { - case 1: - case 2: - case 4: - case 8: png_ptr->channels = 1; break; - default: png_error(png_ptr, "Invalid bit depth for paletted image"); - } - break; - case PNG_COLOR_TYPE_GRAY_ALPHA: - if (bit_depth != 8 && bit_depth != 16) - png_error(png_ptr, "Invalid bit depth for grayscale+alpha image"); - png_ptr->channels = 2; - break; - case PNG_COLOR_TYPE_RGB_ALPHA: - if (bit_depth != 8 && bit_depth != 16) - png_error(png_ptr, "Invalid bit depth for RGBA image"); - png_ptr->channels = 4; - break; - default: - png_error(png_ptr, "Invalid image color type specified"); - } - - if (compression_type != PNG_COMPRESSION_TYPE_BASE) - { - png_warning(png_ptr, "Invalid compression type specified"); - compression_type = PNG_COMPRESSION_TYPE_BASE; - } - - /* Write filter_method 64 (intrapixel differencing) only if - * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and - * 2. Libpng did not write a PNG signature (this filter_method is only - * used in PNG datastreams that are embedded in MNG datastreams) and - * 3. The application called png_permit_mng_features with a mask that - * included PNG_FLAG_MNG_FILTER_64 and - * 4. The filter_method is 64 and - * 5. The color_type is RGB or RGBA - */ - if ( -#if defined(PNG_MNG_FEATURES_SUPPORTED) - !((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) && - ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) && - (color_type == PNG_COLOR_TYPE_RGB || - color_type == PNG_COLOR_TYPE_RGB_ALPHA) && - (filter_type == PNG_INTRAPIXEL_DIFFERENCING)) && -#endif - filter_type != PNG_FILTER_TYPE_BASE) - { - png_warning(png_ptr, "Invalid filter type specified"); - filter_type = PNG_FILTER_TYPE_BASE; - } - -#ifdef PNG_WRITE_INTERLACING_SUPPORTED - if (interlace_type != PNG_INTERLACE_NONE && - interlace_type != PNG_INTERLACE_ADAM7) - { - png_warning(png_ptr, "Invalid interlace type specified"); - interlace_type = PNG_INTERLACE_ADAM7; - } -#else - interlace_type=PNG_INTERLACE_NONE; -#endif - - /* save off the relevent information */ - png_ptr->bit_depth = (png_byte)bit_depth; - png_ptr->color_type = (png_byte)color_type; - png_ptr->interlaced = (png_byte)interlace_type; -#if defined(PNG_MNG_FEATURES_SUPPORTED) - png_ptr->filter_type = (png_byte)filter_type; -#endif - png_ptr->width = width; - png_ptr->height = height; - - png_ptr->pixel_depth = (png_byte)(bit_depth * png_ptr->channels); - png_ptr->rowbytes = ((width * (png_size_t)png_ptr->pixel_depth + 7) >> 3); - /* set the usr info, so any transformations can modify it */ - png_ptr->usr_width = png_ptr->width; - png_ptr->usr_bit_depth = png_ptr->bit_depth; - png_ptr->usr_channels = png_ptr->channels; - - /* pack the header information into the buffer */ - png_save_uint_32(buf, width); - png_save_uint_32(buf + 4, height); - buf[8] = (png_byte)bit_depth; - buf[9] = (png_byte)color_type; - buf[10] = (png_byte)compression_type; - buf[11] = (png_byte)filter_type; - buf[12] = (png_byte)interlace_type; - - /* write the chunk */ - png_write_chunk(png_ptr, (png_bytep)png_IHDR, buf, (png_size_t)13); - - /* initialize zlib with PNG info */ - png_ptr->zstream.zalloc = png_zalloc; - png_ptr->zstream.zfree = png_zfree; - png_ptr->zstream.opaque = (voidpf)png_ptr; - if (!(png_ptr->do_filter)) - { - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE || - png_ptr->bit_depth < 8) - png_ptr->do_filter = PNG_FILTER_NONE; - else - png_ptr->do_filter = PNG_ALL_FILTERS; - } - if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_STRATEGY)) - { - if (png_ptr->do_filter != PNG_FILTER_NONE) - png_ptr->zlib_strategy = Z_FILTERED; - else - png_ptr->zlib_strategy = Z_DEFAULT_STRATEGY; - } - if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_LEVEL)) - png_ptr->zlib_level = Z_DEFAULT_COMPRESSION; - if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL)) - png_ptr->zlib_mem_level = 8; - if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS)) - png_ptr->zlib_window_bits = 15; - if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_METHOD)) - png_ptr->zlib_method = 8; - deflateInit2(&png_ptr->zstream, png_ptr->zlib_level, - png_ptr->zlib_method, png_ptr->zlib_window_bits, - png_ptr->zlib_mem_level, png_ptr->zlib_strategy); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - - png_ptr->mode = PNG_HAVE_IHDR; -} - -/* write the palette. We are careful not to trust png_color to be in the - * correct order for PNG, so people can redefine it to any convenient - * structure. - */ -void /* PRIVATE */ -png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_PLTE; -#endif - png_uint_32 i; - png_colorp pal_ptr; - png_byte buf[3]; - - png_debug(1, "in png_write_PLTE\n"); - if (( -#if defined(PNG_MNG_FEATURES_SUPPORTED) - !(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) && -#endif - num_pal == 0) || num_pal > 256) - { - if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) - { - png_error(png_ptr, "Invalid number of colors in palette"); - } - else - { - png_warning(png_ptr, "Invalid number of colors in palette"); - return; - } - } - - if (!(png_ptr->color_type&PNG_COLOR_MASK_COLOR)) - { - png_warning(png_ptr, - "Ignoring request to write a PLTE chunk in grayscale PNG"); - return; - } - - png_ptr->num_palette = (png_uint_16)num_pal; - png_debug1(3, "num_palette = %d\n", png_ptr->num_palette); - - png_write_chunk_start(png_ptr, (png_bytep)png_PLTE, num_pal * 3); -#ifndef PNG_NO_POINTER_INDEXING - for (i = 0, pal_ptr = palette; i < num_pal; i++, pal_ptr++) - { - buf[0] = pal_ptr->red; - buf[1] = pal_ptr->green; - buf[2] = pal_ptr->blue; - png_write_chunk_data(png_ptr, buf, (png_size_t)3); - } -#else - /* This is a little slower but some buggy compilers need to do this instead */ - pal_ptr=palette; - for (i = 0; i < num_pal; i++) - { - buf[0] = pal_ptr[i].red; - buf[1] = pal_ptr[i].green; - buf[2] = pal_ptr[i].blue; - png_write_chunk_data(png_ptr, buf, (png_size_t)3); - } -#endif - png_write_chunk_end(png_ptr); - png_ptr->mode |= PNG_HAVE_PLTE; -} - -/* write an IDAT chunk */ -void /* PRIVATE */ -png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_IDAT; -#endif - png_debug(1, "in png_write_IDAT\n"); - png_write_chunk(png_ptr, (png_bytep)png_IDAT, data, length); - png_ptr->mode |= PNG_HAVE_IDAT; -} - -/* write an IEND chunk */ -void /* PRIVATE */ -png_write_IEND(png_structp png_ptr) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_IEND; -#endif - png_debug(1, "in png_write_IEND\n"); - png_write_chunk(png_ptr, (png_bytep)png_IEND, png_bytep_NULL, - (png_size_t)0); - png_ptr->mode |= PNG_HAVE_IEND; -} - -#if defined(PNG_WRITE_gAMA_SUPPORTED) -/* write a gAMA chunk */ -#ifdef PNG_FLOATING_POINT_SUPPORTED -void /* PRIVATE */ -png_write_gAMA(png_structp png_ptr, double file_gamma) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_gAMA; -#endif - png_uint_32 igamma; - png_byte buf[4]; - - png_debug(1, "in png_write_gAMA\n"); - /* file_gamma is saved in 1/100,000ths */ - igamma = (png_uint_32)(file_gamma * 100000.0 + 0.5); - png_save_uint_32(buf, igamma); - png_write_chunk(png_ptr, (png_bytep)png_gAMA, buf, (png_size_t)4); -} -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED -void /* PRIVATE */ -png_write_gAMA_fixed(png_structp png_ptr, png_fixed_point file_gamma) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_gAMA; -#endif - png_byte buf[4]; - - png_debug(1, "in png_write_gAMA\n"); - /* file_gamma is saved in 1/100,000ths */ - png_save_uint_32(buf, (png_uint_32)file_gamma); - png_write_chunk(png_ptr, (png_bytep)png_gAMA, buf, (png_size_t)4); -} -#endif -#endif - -#if defined(PNG_WRITE_sRGB_SUPPORTED) -/* write a sRGB chunk */ -void /* PRIVATE */ -png_write_sRGB(png_structp png_ptr, int srgb_intent) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_sRGB; -#endif - png_byte buf[1]; - - png_debug(1, "in png_write_sRGB\n"); - if(srgb_intent >= PNG_sRGB_INTENT_LAST) - png_warning(png_ptr, - "Invalid sRGB rendering intent specified"); - buf[0]=(png_byte)srgb_intent; - png_write_chunk(png_ptr, (png_bytep)png_sRGB, buf, (png_size_t)1); -} -#endif - -#if defined(PNG_WRITE_iCCP_SUPPORTED) -/* write an iCCP chunk */ -void /* PRIVATE */ -png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type, - png_charp profile, int profile_len) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_iCCP; -#endif - png_size_t name_len; - png_charp new_name; - compression_state comp; - - png_debug(1, "in png_write_iCCP\n"); - if (name == NULL || (name_len = png_check_keyword(png_ptr, name, - &new_name)) == 0) - { - png_warning(png_ptr, "Empty keyword in iCCP chunk"); - return; - } - - if (compression_type != PNG_COMPRESSION_TYPE_BASE) - png_warning(png_ptr, "Unknown compression type in iCCP chunk"); - - if (profile == NULL) - profile_len = 0; - - if (profile_len) - profile_len = png_text_compress(png_ptr, profile, (png_size_t)profile_len, - PNG_COMPRESSION_TYPE_BASE, &comp); - - /* make sure we include the NULL after the name and the compression type */ - png_write_chunk_start(png_ptr, (png_bytep)png_iCCP, - (png_uint_32)name_len+profile_len+2); - new_name[name_len+1]=0x00; - png_write_chunk_data(png_ptr, (png_bytep)new_name, name_len + 2); - - if (profile_len) - png_write_compressed_data_out(png_ptr, &comp); - - png_write_chunk_end(png_ptr); - png_free(png_ptr, new_name); -} -#endif - -#if defined(PNG_WRITE_sPLT_SUPPORTED) -/* write a sPLT chunk */ -void /* PRIVATE */ -png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_sPLT; -#endif - png_size_t name_len; - png_charp new_name; - png_byte entrybuf[10]; - int entry_size = (spalette->depth == 8 ? 6 : 10); - int palette_size = entry_size * spalette->nentries; - png_sPLT_entryp ep; -#ifdef PNG_NO_POINTER_INDEXING - int i; -#endif - - png_debug(1, "in png_write_sPLT\n"); - if (spalette->name == NULL || (name_len = png_check_keyword(png_ptr, - spalette->name, &new_name))==0) - { - png_warning(png_ptr, "Empty keyword in sPLT chunk"); - return; - } - - /* make sure we include the NULL after the name */ - png_write_chunk_start(png_ptr, (png_bytep)png_sPLT, - (png_uint_32)(name_len + 2 + palette_size)); - png_write_chunk_data(png_ptr, (png_bytep)new_name, name_len + 1); - png_write_chunk_data(png_ptr, (png_bytep)&spalette->depth, 1); - - /* loop through each palette entry, writing appropriately */ -#ifndef PNG_NO_POINTER_INDEXING - for (ep = spalette->entries; epentries+spalette->nentries; ep++) - { - if (spalette->depth == 8) - { - entrybuf[0] = (png_byte)ep->red; - entrybuf[1] = (png_byte)ep->green; - entrybuf[2] = (png_byte)ep->blue; - entrybuf[3] = (png_byte)ep->alpha; - png_save_uint_16(entrybuf + 4, ep->frequency); - } - else - { - png_save_uint_16(entrybuf + 0, ep->red); - png_save_uint_16(entrybuf + 2, ep->green); - png_save_uint_16(entrybuf + 4, ep->blue); - png_save_uint_16(entrybuf + 6, ep->alpha); - png_save_uint_16(entrybuf + 8, ep->frequency); - } - png_write_chunk_data(png_ptr, entrybuf, (png_size_t)entry_size); - } -#else - ep=spalette->entries; - for (i=0; i>spalette->nentries; i++) - { - if (spalette->depth == 8) - { - entrybuf[0] = (png_byte)ep[i].red; - entrybuf[1] = (png_byte)ep[i].green; - entrybuf[2] = (png_byte)ep[i].blue; - entrybuf[3] = (png_byte)ep[i].alpha; - png_save_uint_16(entrybuf + 4, ep[i].frequency); - } - else - { - png_save_uint_16(entrybuf + 0, ep[i].red); - png_save_uint_16(entrybuf + 2, ep[i].green); - png_save_uint_16(entrybuf + 4, ep[i].blue); - png_save_uint_16(entrybuf + 6, ep[i].alpha); - png_save_uint_16(entrybuf + 8, ep[i].frequency); - } - png_write_chunk_data(png_ptr, entrybuf, entry_size); - } -#endif - - png_write_chunk_end(png_ptr); - png_free(png_ptr, new_name); -} -#endif - -#if defined(PNG_WRITE_sBIT_SUPPORTED) -/* write the sBIT chunk */ -void /* PRIVATE */ -png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_sBIT; -#endif - png_byte buf[4]; - png_size_t size; - - png_debug(1, "in png_write_sBIT\n"); - /* make sure we don't depend upon the order of PNG_COLOR_8 */ - if (color_type & PNG_COLOR_MASK_COLOR) - { - png_byte maxbits; - - maxbits = (png_byte)(color_type==PNG_COLOR_TYPE_PALETTE ? 8 : - png_ptr->usr_bit_depth); - if (sbit->red == 0 || sbit->red > maxbits || - sbit->green == 0 || sbit->green > maxbits || - sbit->blue == 0 || sbit->blue > maxbits) - { - png_warning(png_ptr, "Invalid sBIT depth specified"); - return; - } - buf[0] = sbit->red; - buf[1] = sbit->green; - buf[2] = sbit->blue; - size = 3; - } - else - { - if (sbit->gray == 0 || sbit->gray > png_ptr->usr_bit_depth) - { - png_warning(png_ptr, "Invalid sBIT depth specified"); - return; - } - buf[0] = sbit->gray; - size = 1; - } - - if (color_type & PNG_COLOR_MASK_ALPHA) - { - if (sbit->alpha == 0 || sbit->alpha > png_ptr->usr_bit_depth) - { - png_warning(png_ptr, "Invalid sBIT depth specified"); - return; - } - buf[size++] = sbit->alpha; - } - - png_write_chunk(png_ptr, (png_bytep)png_sBIT, buf, size); -} -#endif - -#if defined(PNG_WRITE_cHRM_SUPPORTED) -/* write the cHRM chunk */ -#ifdef PNG_FLOATING_POINT_SUPPORTED -void /* PRIVATE */ -png_write_cHRM(png_structp png_ptr, double white_x, double white_y, - double red_x, double red_y, double green_x, double green_y, - double blue_x, double blue_y) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_cHRM; -#endif - png_byte buf[32]; - png_uint_32 itemp; - - png_debug(1, "in png_write_cHRM\n"); - /* each value is saved in 1/100,000ths */ - if (white_x < 0 || white_x > 0.8 || white_y < 0 || white_y > 0.8 || - white_x + white_y > 1.0) - { - png_warning(png_ptr, "Invalid cHRM white point specified"); -#if !defined(PNG_NO_CONSOLE_IO) - fprintf(stderr,"white_x=%f, white_y=%f\n",white_x, white_y); -#endif - return; - } - itemp = (png_uint_32)(white_x * 100000.0 + 0.5); - png_save_uint_32(buf, itemp); - itemp = (png_uint_32)(white_y * 100000.0 + 0.5); - png_save_uint_32(buf + 4, itemp); - - if (red_x < 0 || red_x > 0.8 || red_y < 0 || red_y > 0.8 || - red_x + red_y > 1.0) - { - png_warning(png_ptr, "Invalid cHRM red point specified"); - return; - } - itemp = (png_uint_32)(red_x * 100000.0 + 0.5); - png_save_uint_32(buf + 8, itemp); - itemp = (png_uint_32)(red_y * 100000.0 + 0.5); - png_save_uint_32(buf + 12, itemp); - - if (green_x < 0 || green_x > 0.8 || green_y < 0 || green_y > 0.8 || - green_x + green_y > 1.0) - { - png_warning(png_ptr, "Invalid cHRM green point specified"); - return; - } - itemp = (png_uint_32)(green_x * 100000.0 + 0.5); - png_save_uint_32(buf + 16, itemp); - itemp = (png_uint_32)(green_y * 100000.0 + 0.5); - png_save_uint_32(buf + 20, itemp); - - if (blue_x < 0 || blue_x > 0.8 || blue_y < 0 || blue_y > 0.8 || - blue_x + blue_y > 1.0) - { - png_warning(png_ptr, "Invalid cHRM blue point specified"); - return; - } - itemp = (png_uint_32)(blue_x * 100000.0 + 0.5); - png_save_uint_32(buf + 24, itemp); - itemp = (png_uint_32)(blue_y * 100000.0 + 0.5); - png_save_uint_32(buf + 28, itemp); - - png_write_chunk(png_ptr, (png_bytep)png_cHRM, buf, (png_size_t)32); -} -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED -void /* PRIVATE */ -png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x, - png_fixed_point white_y, png_fixed_point red_x, png_fixed_point red_y, - png_fixed_point green_x, png_fixed_point green_y, png_fixed_point blue_x, - png_fixed_point blue_y) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_cHRM; -#endif - png_byte buf[32]; - - png_debug(1, "in png_write_cHRM\n"); - /* each value is saved in 1/100,000ths */ - if (white_x > 80000L || white_y > 80000L || white_x + white_y > 100000L) - { - png_warning(png_ptr, "Invalid fixed cHRM white point specified"); -#if !defined(PNG_NO_CONSOLE_IO) - fprintf(stderr,"white_x=%ld, white_y=%ld\n",white_x, white_y); -#endif - return; - } - png_save_uint_32(buf, (png_uint_32)white_x); - png_save_uint_32(buf + 4, (png_uint_32)white_y); - - if (red_x > 80000L || red_y > 80000L || red_x + red_y > 100000L) - { - png_warning(png_ptr, "Invalid cHRM fixed red point specified"); - return; - } - png_save_uint_32(buf + 8, (png_uint_32)red_x); - png_save_uint_32(buf + 12, (png_uint_32)red_y); - - if (green_x > 80000L || green_y > 80000L || green_x + green_y > 100000L) - { - png_warning(png_ptr, "Invalid fixed cHRM green point specified"); - return; - } - png_save_uint_32(buf + 16, (png_uint_32)green_x); - png_save_uint_32(buf + 20, (png_uint_32)green_y); - - if (blue_x > 80000L || blue_y > 80000L || blue_x + blue_y > 100000L) - { - png_warning(png_ptr, "Invalid fixed cHRM blue point specified"); - return; - } - png_save_uint_32(buf + 24, (png_uint_32)blue_x); - png_save_uint_32(buf + 28, (png_uint_32)blue_y); - - png_write_chunk(png_ptr, (png_bytep)png_cHRM, buf, (png_size_t)32); -} -#endif -#endif - -#if defined(PNG_WRITE_tRNS_SUPPORTED) -/* write the tRNS chunk */ -void /* PRIVATE */ -png_write_tRNS(png_structp png_ptr, png_bytep trans, png_color_16p tran, - int num_trans, int color_type) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_tRNS; -#endif - png_byte buf[6]; - - png_debug(1, "in png_write_tRNS\n"); - if (color_type == PNG_COLOR_TYPE_PALETTE) - { - if (num_trans <= 0 || num_trans > (int)png_ptr->num_palette) - { - png_warning(png_ptr,"Invalid number of transparent colors specified"); - return; - } - /* write the chunk out as it is */ - png_write_chunk(png_ptr, (png_bytep)png_tRNS, trans, (png_size_t)num_trans); - } - else if (color_type == PNG_COLOR_TYPE_GRAY) - { - /* one 16 bit value */ - if(tran->gray >= (1 << png_ptr->bit_depth)) - { - png_warning(png_ptr, - "Ignoring attempt to write tRNS chunk out-of-range for bit_depth"); - return; - } - png_save_uint_16(buf, tran->gray); - png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)2); - } - else if (color_type == PNG_COLOR_TYPE_RGB) - { - /* three 16 bit values */ - png_save_uint_16(buf, tran->red); - png_save_uint_16(buf + 2, tran->green); - png_save_uint_16(buf + 4, tran->blue); - if(png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4])) - { - png_warning(png_ptr, - "Ignoring attempt to write 16-bit tRNS chunk when bit_depth is 8"); - return; - } - png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)6); - } - else - { - png_warning(png_ptr, "Can't write tRNS with an alpha channel"); - } -} -#endif - -#if defined(PNG_WRITE_bKGD_SUPPORTED) -/* write the background chunk */ -void /* PRIVATE */ -png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_bKGD; -#endif - png_byte buf[6]; - - png_debug(1, "in png_write_bKGD\n"); - if (color_type == PNG_COLOR_TYPE_PALETTE) - { - if ( -#if defined(PNG_MNG_FEATURES_SUPPORTED) - (png_ptr->num_palette || - (!(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE))) && -#endif - back->index > png_ptr->num_palette) - { - png_warning(png_ptr, "Invalid background palette index"); - return; - } - buf[0] = back->index; - png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)1); - } - else if (color_type & PNG_COLOR_MASK_COLOR) - { - png_save_uint_16(buf, back->red); - png_save_uint_16(buf + 2, back->green); - png_save_uint_16(buf + 4, back->blue); - if(png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4])) - { - png_warning(png_ptr, - "Ignoring attempt to write 16-bit bKGD chunk when bit_depth is 8"); - return; - } - png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)6); - } - else - { - if(back->gray >= (1 << png_ptr->bit_depth)) - { - png_warning(png_ptr, - "Ignoring attempt to write bKGD chunk out-of-range for bit_depth"); - return; - } - png_save_uint_16(buf, back->gray); - png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)2); - } -} -#endif - -#if defined(PNG_WRITE_hIST_SUPPORTED) -/* write the histogram */ -void /* PRIVATE */ -png_write_hIST(png_structp png_ptr, png_uint_16p hist, int num_hist) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_hIST; -#endif - int i; - png_byte buf[3]; - - png_debug(1, "in png_write_hIST\n"); - if (num_hist > (int)png_ptr->num_palette) - { - png_debug2(3, "num_hist = %d, num_palette = %d\n", num_hist, - png_ptr->num_palette); - png_warning(png_ptr, "Invalid number of histogram entries specified"); - return; - } - - png_write_chunk_start(png_ptr, (png_bytep)png_hIST, (png_uint_32)(num_hist * 2)); - for (i = 0; i < num_hist; i++) - { - png_save_uint_16(buf, hist[i]); - png_write_chunk_data(png_ptr, buf, (png_size_t)2); - } - png_write_chunk_end(png_ptr); -} -#endif - -#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \ - defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) -/* Check that the tEXt or zTXt keyword is valid per PNG 1.0 specification, - * and if invalid, correct the keyword rather than discarding the entire - * chunk. The PNG 1.0 specification requires keywords 1-79 characters in - * length, forbids leading or trailing whitespace, multiple internal spaces, - * and the non-break space (0x80) from ISO 8859-1. Returns keyword length. - * - * The new_key is allocated to hold the corrected keyword and must be freed - * by the calling routine. This avoids problems with trying to write to - * static keywords without having to have duplicate copies of the strings. - */ -png_size_t /* PRIVATE */ -png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key) -{ - png_size_t key_len; - png_charp kp, dp; - int kflag; - int kwarn=0; - - png_debug(1, "in png_check_keyword\n"); - *new_key = NULL; - - if (key == NULL || (key_len = png_strlen(key)) == 0) - { - png_warning(png_ptr, "zero length keyword"); - return ((png_size_t)0); - } - - png_debug1(2, "Keyword to be checked is '%s'\n", key); - - *new_key = (png_charp)png_malloc(png_ptr, (png_uint_32)(key_len + 2)); - - /* Replace non-printing characters with a blank and print a warning */ - for (kp = key, dp = *new_key; *kp != '\0'; kp++, dp++) - { - if (*kp < 0x20 || (*kp > 0x7E && (png_byte)*kp < 0xA1)) - { -#if !defined(PNG_NO_STDIO) && !defined(_WIN32_WCE) - char msg[40]; - - sprintf(msg, "invalid keyword character 0x%02X", *kp); - png_warning(png_ptr, msg); -#else - png_warning(png_ptr, "invalid character in keyword"); -#endif - *dp = ' '; - } - else - { - *dp = *kp; - } - } - *dp = '\0'; - - /* Remove any trailing white space. */ - kp = *new_key + key_len - 1; - if (*kp == ' ') - { - png_warning(png_ptr, "trailing spaces removed from keyword"); - - while (*kp == ' ') - { - *(kp--) = '\0'; - key_len--; - } - } - - /* Remove any leading white space. */ - kp = *new_key; - if (*kp == ' ') - { - png_warning(png_ptr, "leading spaces removed from keyword"); - - while (*kp == ' ') - { - kp++; - key_len--; - } - } - - png_debug1(2, "Checking for multiple internal spaces in '%s'\n", kp); - - /* Remove multiple internal spaces. */ - for (kflag = 0, dp = *new_key; *kp != '\0'; kp++) - { - if (*kp == ' ' && kflag == 0) - { - *(dp++) = *kp; - kflag = 1; - } - else if (*kp == ' ') - { - key_len--; - kwarn=1; - } - else - { - *(dp++) = *kp; - kflag = 0; - } - } - *dp = '\0'; - if(kwarn) - png_warning(png_ptr, "extra interior spaces removed from keyword"); - - if (key_len == 0) - { - png_free(png_ptr, *new_key); - *new_key=NULL; - png_warning(png_ptr, "Zero length keyword"); - } - - if (key_len > 79) - { - png_warning(png_ptr, "keyword length must be 1 - 79 characters"); - new_key[79] = '\0'; - key_len = 79; - } - - return (key_len); -} -#endif - -#if defined(PNG_WRITE_tEXt_SUPPORTED) -/* write a tEXt chunk */ -void /* PRIVATE */ -png_write_tEXt(png_structp png_ptr, png_charp key, png_charp text, - png_size_t text_len) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_tEXt; -#endif - png_size_t key_len; - png_charp new_key; - - png_debug(1, "in png_write_tEXt\n"); - if (key == NULL || (key_len = png_check_keyword(png_ptr, key, &new_key))==0) - { - png_warning(png_ptr, "Empty keyword in tEXt chunk"); - return; - } - - if (text == NULL || *text == '\0') - text_len = 0; - else - text_len = png_strlen(text); - - /* make sure we include the 0 after the key */ - png_write_chunk_start(png_ptr, (png_bytep)png_tEXt, (png_uint_32)key_len+text_len+1); - /* - * We leave it to the application to meet PNG-1.0 requirements on the - * contents of the text. PNG-1.0 through PNG-1.2 discourage the use of - * any non-Latin-1 characters except for NEWLINE. ISO PNG will forbid them. - * The NUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG. - */ - png_write_chunk_data(png_ptr, (png_bytep)new_key, key_len + 1); - if (text_len) - png_write_chunk_data(png_ptr, (png_bytep)text, text_len); - - png_write_chunk_end(png_ptr); - png_free(png_ptr, new_key); -} -#endif - -#if defined(PNG_WRITE_zTXt_SUPPORTED) -/* write a compressed text chunk */ -void /* PRIVATE */ -png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text, - png_size_t text_len, int compression) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_zTXt; -#endif - png_size_t key_len; - char buf[1]; - png_charp new_key; - compression_state comp; - - png_debug(1, "in png_write_zTXt\n"); - - if (key == NULL || (key_len = png_check_keyword(png_ptr, key, &new_key))==0) - { - png_warning(png_ptr, "Empty keyword in zTXt chunk"); - return; - } - - if (text == NULL || *text == '\0' || compression==PNG_TEXT_COMPRESSION_NONE) - { - png_write_tEXt(png_ptr, new_key, text, (png_size_t)0); - png_free(png_ptr, new_key); - return; - } - - text_len = png_strlen(text); - - png_free(png_ptr, new_key); - - /* compute the compressed data; do it now for the length */ - text_len = png_text_compress(png_ptr, text, text_len, compression, - &comp); - - /* write start of chunk */ - png_write_chunk_start(png_ptr, (png_bytep)png_zTXt, (png_uint_32) - (key_len+text_len+2)); - /* write key */ - png_write_chunk_data(png_ptr, (png_bytep)key, key_len + 1); - buf[0] = (png_byte)compression; - /* write compression */ - png_write_chunk_data(png_ptr, (png_bytep)buf, (png_size_t)1); - /* write the compressed data */ - png_write_compressed_data_out(png_ptr, &comp); - - /* close the chunk */ - png_write_chunk_end(png_ptr); -} -#endif - -#if defined(PNG_WRITE_iTXt_SUPPORTED) -/* write an iTXt chunk */ -void /* PRIVATE */ -png_write_iTXt(png_structp png_ptr, int compression, png_charp key, - png_charp lang, png_charp lang_key, png_charp text) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_iTXt; -#endif - png_size_t lang_len, key_len, lang_key_len, text_len; - png_charp new_lang, new_key; - png_byte cbuf[2]; - compression_state comp; - - png_debug(1, "in png_write_iTXt\n"); - - if (key == NULL || (key_len = png_check_keyword(png_ptr, key, &new_key))==0) - { - png_warning(png_ptr, "Empty keyword in iTXt chunk"); - return; - } - if (lang == NULL || (lang_len = png_check_keyword(png_ptr, lang, &new_lang))==0) - { - png_warning(png_ptr, "Empty language field in iTXt chunk"); - new_lang = NULL; - lang_len = 0; - } - - if (lang_key == NULL) - lang_key_len = 0; - else - lang_key_len = png_strlen(lang_key); - - if (text == NULL) - text_len = 0; - else - text_len = png_strlen(text); - - /* compute the compressed data; do it now for the length */ - text_len = png_text_compress(png_ptr, text, text_len, compression-2, - &comp); - - - /* make sure we include the compression flag, the compression byte, - * and the NULs after the key, lang, and lang_key parts */ - - png_write_chunk_start(png_ptr, (png_bytep)png_iTXt, - (png_uint_32)( - 5 /* comp byte, comp flag, terminators for key, lang and lang_key */ - + key_len - + lang_len - + lang_key_len - + text_len)); - - /* - * We leave it to the application to meet PNG-1.0 requirements on the - * contents of the text. PNG-1.0 through PNG-1.2 discourage the use of - * any non-Latin-1 characters except for NEWLINE. ISO PNG will forbid them. - * The NUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG. - */ - png_write_chunk_data(png_ptr, (png_bytep)new_key, key_len + 1); - - /* set the compression flag */ - if (compression == PNG_ITXT_COMPRESSION_NONE || \ - compression == PNG_TEXT_COMPRESSION_NONE) - cbuf[0] = 0; - else /* compression == PNG_ITXT_COMPRESSION_zTXt */ - cbuf[0] = 1; - /* set the compression method */ - cbuf[1] = 0; - png_write_chunk_data(png_ptr, cbuf, 2); - - cbuf[0] = 0; - png_write_chunk_data(png_ptr, (new_lang ? (png_bytep)new_lang : cbuf), lang_len + 1); - png_write_chunk_data(png_ptr, (lang_key ? (png_bytep)lang_key : cbuf), lang_key_len + 1); - png_write_compressed_data_out(png_ptr, &comp); - - png_write_chunk_end(png_ptr); - png_free(png_ptr, new_key); - if (new_lang) - png_free(png_ptr, new_lang); -} -#endif - -#if defined(PNG_WRITE_oFFs_SUPPORTED) -/* write the oFFs chunk */ -void /* PRIVATE */ -png_write_oFFs(png_structp png_ptr, png_int_32 x_offset, png_int_32 y_offset, - int unit_type) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_oFFs; -#endif - png_byte buf[9]; - - png_debug(1, "in png_write_oFFs\n"); - if (unit_type >= PNG_OFFSET_LAST) - png_warning(png_ptr, "Unrecognized unit type for oFFs chunk"); - - png_save_int_32(buf, x_offset); - png_save_int_32(buf + 4, y_offset); - buf[8] = (png_byte)unit_type; - - png_write_chunk(png_ptr, (png_bytep)png_oFFs, buf, (png_size_t)9); -} -#endif - -#if defined(PNG_WRITE_pCAL_SUPPORTED) -/* write the pCAL chunk (described in the PNG extensions document) */ -void /* PRIVATE */ -png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0, - png_int_32 X1, int type, int nparams, png_charp units, png_charpp params) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_pCAL; -#endif - png_size_t purpose_len, units_len, total_len; - png_uint_32p params_len; - png_byte buf[10]; - png_charp new_purpose; - int i; - - png_debug1(1, "in png_write_pCAL (%d parameters)\n", nparams); - if (type >= PNG_EQUATION_LAST) - png_warning(png_ptr, "Unrecognized equation type for pCAL chunk"); - - purpose_len = png_check_keyword(png_ptr, purpose, &new_purpose) + 1; - png_debug1(3, "pCAL purpose length = %d\n", (int)purpose_len); - units_len = png_strlen(units) + (nparams == 0 ? 0 : 1); - png_debug1(3, "pCAL units length = %d\n", (int)units_len); - total_len = purpose_len + units_len + 10; - - params_len = (png_uint_32p)png_malloc(png_ptr, (png_uint_32)(nparams - *sizeof(png_uint_32))); - - /* Find the length of each parameter, making sure we don't count the - null terminator for the last parameter. */ - for (i = 0; i < nparams; i++) - { - params_len[i] = png_strlen(params[i]) + (i == nparams - 1 ? 0 : 1); - png_debug2(3, "pCAL parameter %d length = %lu\n", i, params_len[i]); - total_len += (png_size_t)params_len[i]; - } - - png_debug1(3, "pCAL total length = %d\n", (int)total_len); - png_write_chunk_start(png_ptr, (png_bytep)png_pCAL, (png_uint_32)total_len); - png_write_chunk_data(png_ptr, (png_bytep)new_purpose, purpose_len); - png_save_int_32(buf, X0); - png_save_int_32(buf + 4, X1); - buf[8] = (png_byte)type; - buf[9] = (png_byte)nparams; - png_write_chunk_data(png_ptr, buf, (png_size_t)10); - png_write_chunk_data(png_ptr, (png_bytep)units, (png_size_t)units_len); - - png_free(png_ptr, new_purpose); - - for (i = 0; i < nparams; i++) - { - png_write_chunk_data(png_ptr, (png_bytep)params[i], - (png_size_t)params_len[i]); - } - - png_free(png_ptr, params_len); - png_write_chunk_end(png_ptr); -} -#endif - -#if defined(PNG_WRITE_sCAL_SUPPORTED) -/* write the sCAL chunk */ -#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO) -void /* PRIVATE */ -png_write_sCAL(png_structp png_ptr, int unit, double width,double height) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_sCAL; -#endif - png_size_t total_len; - char wbuf[32], hbuf[32]; - - png_debug(1, "in png_write_sCAL\n"); - -#if defined(_WIN32_WCE) -/* sprintf() function is not supported on WindowsCE */ - { - wchar_t wc_buf[32]; - swprintf(wc_buf, TEXT("%12.12e"), width); - WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, wbuf, 32, NULL, NULL); - swprintf(wc_buf, TEXT("%12.12e"), height); - WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, hbuf, 32, NULL, NULL); - } -#else - sprintf(wbuf, "%12.12e", width); - sprintf(hbuf, "%12.12e", height); -#endif - total_len = 1 + png_strlen(wbuf)+1 + png_strlen(hbuf); - - png_debug1(3, "sCAL total length = %d\n", (int)total_len); - png_write_chunk_start(png_ptr, (png_bytep)png_sCAL, (png_uint_32)total_len); - png_write_chunk_data(png_ptr, (png_bytep)&unit, 1); - png_write_chunk_data(png_ptr, (png_bytep)wbuf, png_strlen(wbuf)+1); - png_write_chunk_data(png_ptr, (png_bytep)hbuf, png_strlen(hbuf)); - - png_write_chunk_end(png_ptr); -} -#else -#ifdef PNG_FIXED_POINT_SUPPORTED -void /* PRIVATE */ -png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width, - png_charp height) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_sCAL; -#endif - png_size_t total_len; - char wbuf[32], hbuf[32]; - - png_debug(1, "in png_write_sCAL_s\n"); - - png_strcpy(wbuf,(const char *)width); - png_strcpy(hbuf,(const char *)height); - total_len = 1 + png_strlen(wbuf)+1 + png_strlen(hbuf); - - png_debug1(3, "sCAL total length = %d\n", total_len); - png_write_chunk_start(png_ptr, (png_bytep)png_sCAL, (png_uint_32)total_len); - png_write_chunk_data(png_ptr, (png_bytep)&unit, 1); - png_write_chunk_data(png_ptr, (png_bytep)wbuf, png_strlen(wbuf)+1); - png_write_chunk_data(png_ptr, (png_bytep)hbuf, png_strlen(hbuf)); - - png_write_chunk_end(png_ptr); -} -#endif -#endif -#endif - -#if defined(PNG_WRITE_pHYs_SUPPORTED) -/* write the pHYs chunk */ -void /* PRIVATE */ -png_write_pHYs(png_structp png_ptr, png_uint_32 x_pixels_per_unit, - png_uint_32 y_pixels_per_unit, - int unit_type) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_pHYs; -#endif - png_byte buf[9]; - - png_debug(1, "in png_write_pHYs\n"); - if (unit_type >= PNG_RESOLUTION_LAST) - png_warning(png_ptr, "Unrecognized unit type for pHYs chunk"); - - png_save_uint_32(buf, x_pixels_per_unit); - png_save_uint_32(buf + 4, y_pixels_per_unit); - buf[8] = (png_byte)unit_type; - - png_write_chunk(png_ptr, (png_bytep)png_pHYs, buf, (png_size_t)9); -} -#endif - -#if defined(PNG_WRITE_tIME_SUPPORTED) -/* Write the tIME chunk. Use either png_convert_from_struct_tm() - * or png_convert_from_time_t(), or fill in the structure yourself. - */ -void /* PRIVATE */ -png_write_tIME(png_structp png_ptr, png_timep mod_time) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - PNG_tIME; -#endif - png_byte buf[7]; - - png_debug(1, "in png_write_tIME\n"); - if (mod_time->month > 12 || mod_time->month < 1 || - mod_time->day > 31 || mod_time->day < 1 || - mod_time->hour > 23 || mod_time->second > 60) - { - png_warning(png_ptr, "Invalid time specified for tIME chunk"); - return; - } - - png_save_uint_16(buf, mod_time->year); - buf[2] = mod_time->month; - buf[3] = mod_time->day; - buf[4] = mod_time->hour; - buf[5] = mod_time->minute; - buf[6] = mod_time->second; - - png_write_chunk(png_ptr, (png_bytep)png_tIME, buf, (png_size_t)7); -} -#endif - -/* initializes the row writing capability of libpng */ -void /* PRIVATE */ -png_write_start_row(png_structp png_ptr) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */ - - /* start of interlace block */ - int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; - - /* offset to next interlace block */ - int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; - - /* start of interlace block in the y direction */ - int png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; - - /* offset to next interlace block in the y direction */ - int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; -#endif - - png_size_t buf_size; - - png_debug(1, "in png_write_start_row\n"); - buf_size = (png_size_t)(((png_ptr->width * png_ptr->usr_channels * - png_ptr->usr_bit_depth + 7) >> 3) + 1); - - /* set up row buffer */ - png_ptr->row_buf = (png_bytep)png_malloc(png_ptr, (png_uint_32)buf_size); - png_ptr->row_buf[0] = PNG_FILTER_VALUE_NONE; - - /* set up filtering buffer, if using this filter */ - if (png_ptr->do_filter & PNG_FILTER_SUB) - { - png_ptr->sub_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB; - } - - /* We only need to keep the previous row if we are using one of these. */ - if (png_ptr->do_filter & (PNG_FILTER_AVG | PNG_FILTER_UP | PNG_FILTER_PAETH)) - { - /* set up previous row buffer */ - png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, (png_uint_32)buf_size); - png_memset(png_ptr->prev_row, 0, buf_size); - - if (png_ptr->do_filter & PNG_FILTER_UP) - { - png_ptr->up_row = (png_bytep )png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->up_row[0] = PNG_FILTER_VALUE_UP; - } - - if (png_ptr->do_filter & PNG_FILTER_AVG) - { - png_ptr->avg_row = (png_bytep)png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG; - } - - if (png_ptr->do_filter & PNG_FILTER_PAETH) - { - png_ptr->paeth_row = (png_bytep )png_malloc(png_ptr, - (png_ptr->rowbytes + 1)); - png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH; - } - } - -#ifdef PNG_WRITE_INTERLACING_SUPPORTED - /* if interlaced, we need to set up width and height of pass */ - if (png_ptr->interlaced) - { - if (!(png_ptr->transformations & PNG_INTERLACE)) - { - png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 - - png_pass_ystart[0]) / png_pass_yinc[0]; - png_ptr->usr_width = (png_ptr->width + png_pass_inc[0] - 1 - - png_pass_start[0]) / png_pass_inc[0]; - } - else - { - png_ptr->num_rows = png_ptr->height; - png_ptr->usr_width = png_ptr->width; - } - } - else -#endif - { - png_ptr->num_rows = png_ptr->height; - png_ptr->usr_width = png_ptr->width; - } - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - png_ptr->zstream.next_out = png_ptr->zbuf; -} - -/* Internal use only. Called when finished processing a row of data. */ -void /* PRIVATE */ -png_write_finish_row(png_structp png_ptr) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */ - - /* start of interlace block */ - int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; - - /* offset to next interlace block */ - int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; - - /* start of interlace block in the y direction */ - int png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; - - /* offset to next interlace block in the y direction */ - int png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; -#endif - - int ret; - - png_debug(1, "in png_write_finish_row\n"); - /* next row */ - png_ptr->row_number++; - - /* see if we are done */ - if (png_ptr->row_number < png_ptr->num_rows) - return; - -#ifdef PNG_WRITE_INTERLACING_SUPPORTED - /* if interlaced, go to next pass */ - if (png_ptr->interlaced) - { - png_ptr->row_number = 0; - if (png_ptr->transformations & PNG_INTERLACE) - { - png_ptr->pass++; - } - else - { - /* loop until we find a non-zero width or height pass */ - do - { - png_ptr->pass++; - if (png_ptr->pass >= 7) - break; - png_ptr->usr_width = (png_ptr->width + - png_pass_inc[png_ptr->pass] - 1 - - png_pass_start[png_ptr->pass]) / - png_pass_inc[png_ptr->pass]; - png_ptr->num_rows = (png_ptr->height + - png_pass_yinc[png_ptr->pass] - 1 - - png_pass_ystart[png_ptr->pass]) / - png_pass_yinc[png_ptr->pass]; - if (png_ptr->transformations & PNG_INTERLACE) - break; - } while (png_ptr->usr_width == 0 || png_ptr->num_rows == 0); - - } - - /* reset the row above the image for the next pass */ - if (png_ptr->pass < 7) - { - if (png_ptr->prev_row != NULL) - png_memset(png_ptr->prev_row, 0, - (png_size_t) (((png_uint_32)png_ptr->usr_channels * - (png_uint_32)png_ptr->usr_bit_depth * - png_ptr->width + 7) >> 3) + 1); - return; - } - } -#endif - - /* if we get here, we've just written the last row, so we need - to flush the compressor */ - do - { - /* tell the compressor we are done */ - ret = deflate(&png_ptr->zstream, Z_FINISH); - /* check for an error */ - if (ret == Z_OK) - { - /* check to see if we need more room */ - if (!(png_ptr->zstream.avail_out)) - { - png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - } - } - else if (ret != Z_STREAM_END) - { - if (png_ptr->zstream.msg != NULL) - png_error(png_ptr, png_ptr->zstream.msg); - else - png_error(png_ptr, "zlib error"); - } - } while (ret != Z_STREAM_END); - - /* write any extra space */ - if (png_ptr->zstream.avail_out < png_ptr->zbuf_size) - { - png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size - - png_ptr->zstream.avail_out); - } - - deflateReset(&png_ptr->zstream); -} - -#if defined(PNG_WRITE_INTERLACING_SUPPORTED) -/* Pick out the correct pixels for the interlace pass. - * The basic idea here is to go through the row with a source - * pointer and a destination pointer (sp and dp), and copy the - * correct pixels for the pass. As the row gets compacted, - * sp will always be >= dp, so we should never overwrite anything. - * See the default: case for the easiest code to understand. - */ -void /* PRIVATE */ -png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass) -{ -#ifdef PNG_USE_LOCAL_ARRAYS - /* arrays to facilitate easy interlacing - use pass (0 - 6) as index */ - - /* start of interlace block */ - int png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; - - /* offset to next interlace block */ - int png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; -#endif - - png_debug(1, "in png_do_write_interlace\n"); - /* we don't have to do anything on the last pass (6) */ -#if defined(PNG_USELESS_TESTS_SUPPORTED) - if (row != NULL && row_info != NULL && pass < 6) -#else - if (pass < 6) -#endif - { - /* each pixel depth is handled separately */ - switch (row_info->pixel_depth) - { - case 1: - { - png_bytep sp; - png_bytep dp; - int shift; - int d; - int value; - png_uint_32 i; - png_uint_32 row_width = row_info->width; - - dp = row; - d = 0; - shift = 7; - for (i = png_pass_start[pass]; i < row_width; - i += png_pass_inc[pass]) - { - sp = row + (png_size_t)(i >> 3); - value = (int)(*sp >> (7 - (int)(i & 0x07))) & 0x01; - d |= (value << shift); - - if (shift == 0) - { - shift = 7; - *dp++ = (png_byte)d; - d = 0; - } - else - shift--; - - } - if (shift != 7) - *dp = (png_byte)d; - break; - } - case 2: - { - png_bytep sp; - png_bytep dp; - int shift; - int d; - int value; - png_uint_32 i; - png_uint_32 row_width = row_info->width; - - dp = row; - shift = 6; - d = 0; - for (i = png_pass_start[pass]; i < row_width; - i += png_pass_inc[pass]) - { - sp = row + (png_size_t)(i >> 2); - value = (*sp >> ((3 - (int)(i & 0x03)) << 1)) & 0x03; - d |= (value << shift); - - if (shift == 0) - { - shift = 6; - *dp++ = (png_byte)d; - d = 0; - } - else - shift -= 2; - } - if (shift != 6) - *dp = (png_byte)d; - break; - } - case 4: - { - png_bytep sp; - png_bytep dp; - int shift; - int d; - int value; - png_uint_32 i; - png_uint_32 row_width = row_info->width; - - dp = row; - shift = 4; - d = 0; - for (i = png_pass_start[pass]; i < row_width; - i += png_pass_inc[pass]) - { - sp = row + (png_size_t)(i >> 1); - value = (*sp >> ((1 - (int)(i & 0x01)) << 2)) & 0x0f; - d |= (value << shift); - - if (shift == 0) - { - shift = 4; - *dp++ = (png_byte)d; - d = 0; - } - else - shift -= 4; - } - if (shift != 4) - *dp = (png_byte)d; - break; - } - default: - { - png_bytep sp; - png_bytep dp; - png_uint_32 i; - png_uint_32 row_width = row_info->width; - png_size_t pixel_bytes; - - /* start at the beginning */ - dp = row; - /* find out how many bytes each pixel takes up */ - pixel_bytes = (row_info->pixel_depth >> 3); - /* loop through the row, only looking at the pixels that - matter */ - for (i = png_pass_start[pass]; i < row_width; - i += png_pass_inc[pass]) - { - /* find out where the original pixel is */ - sp = row + (png_size_t)i * pixel_bytes; - /* move the pixel */ - if (dp != sp) - png_memcpy(dp, sp, pixel_bytes); - /* next pixel */ - dp += pixel_bytes; - } - break; - } - } - /* set new row width */ - row_info->width = (row_info->width + - png_pass_inc[pass] - 1 - - png_pass_start[pass]) / - png_pass_inc[pass]; - row_info->rowbytes = ((row_info->width * - row_info->pixel_depth + 7) >> 3); - } -} -#endif - -/* This filters the row, chooses which filter to use, if it has not already - * been specified by the application, and then writes the row out with the - * chosen filter. - */ -#define PNG_MAXSUM (~((png_uint_32)0) >> 1) -#define PNG_HISHIFT 10 -#define PNG_LOMASK ((png_uint_32)0xffffL) -#define PNG_HIMASK ((png_uint_32)(~PNG_LOMASK >> PNG_HISHIFT)) -void /* PRIVATE */ -png_write_find_filter(png_structp png_ptr, png_row_infop row_info) -{ - png_bytep prev_row, best_row, row_buf; - png_uint_32 mins, bpp; - png_byte filter_to_do = png_ptr->do_filter; - png_uint_32 row_bytes = row_info->rowbytes; -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - int num_p_filters = (int)png_ptr->num_prev_filters; -#endif - - png_debug(1, "in png_write_find_filter\n"); - /* find out how many bytes offset each pixel is */ - bpp = (row_info->pixel_depth + 7) / 8; - - prev_row = png_ptr->prev_row; - best_row = row_buf = png_ptr->row_buf; - mins = PNG_MAXSUM; - - /* The prediction method we use is to find which method provides the - * smallest value when summing the absolute values of the distances - * from zero, using anything >= 128 as negative numbers. This is known - * as the "minimum sum of absolute differences" heuristic. Other - * heuristics are the "weighted minimum sum of absolute differences" - * (experimental and can in theory improve compression), and the "zlib - * predictive" method (not implemented yet), which does test compressions - * of lines using different filter methods, and then chooses the - * (series of) filter(s) that give minimum compressed data size (VERY - * computationally expensive). - * - * GRR 980525: consider also - * (1) minimum sum of absolute differences from running average (i.e., - * keep running sum of non-absolute differences & count of bytes) - * [track dispersion, too? restart average if dispersion too large?] - * (1b) minimum sum of absolute differences from sliding average, probably - * with window size <= deflate window (usually 32K) - * (2) minimum sum of squared differences from zero or running average - * (i.e., ~ root-mean-square approach) - */ - - - /* We don't need to test the 'no filter' case if this is the only filter - * that has been chosen, as it doesn't actually do anything to the data. - */ - if ((filter_to_do & PNG_FILTER_NONE) && - filter_to_do != PNG_FILTER_NONE) - { - png_bytep rp; - png_uint_32 sum = 0; - png_uint_32 i; - int v; - - for (i = 0, rp = row_buf + 1; i < row_bytes; i++, rp++) - { - v = *rp; - sum += (v < 128) ? v : 256 - v; - } - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - png_uint_32 sumhi, sumlo; - int j; - sumlo = sum & PNG_LOMASK; - sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; /* Gives us some footroom */ - - /* Reduce the sum if we match any of the previous rows */ - for (j = 0; j < num_p_filters; j++) - { - if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_NONE) - { - sumlo = (sumlo * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - sumhi = (sumhi * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - } - } - - /* Factor in the cost of this filter (this is here for completeness, - * but it makes no sense to have a "cost" for the NONE filter, as - * it has the minimum possible computational cost - none). - */ - sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_NONE]) >> - PNG_COST_SHIFT; - sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_NONE]) >> - PNG_COST_SHIFT; - - if (sumhi > PNG_HIMASK) - sum = PNG_MAXSUM; - else - sum = (sumhi << PNG_HISHIFT) + sumlo; - } -#endif - mins = sum; - } - - /* sub filter */ - if (filter_to_do == PNG_FILTER_SUB) - /* it's the only filter so no testing is needed */ - { - png_bytep rp, lp, dp; - png_uint_32 i; - for (i = 0, rp = row_buf + 1, dp = png_ptr->sub_row + 1; i < bpp; - i++, rp++, dp++) - { - *dp = *rp; - } - for (lp = row_buf + 1; i < row_bytes; - i++, rp++, lp++, dp++) - { - *dp = (png_byte)(((int)*rp - (int)*lp) & 0xff); - } - best_row = png_ptr->sub_row; - } - - else if (filter_to_do & PNG_FILTER_SUB) - { - png_bytep rp, dp, lp; - png_uint_32 sum = 0, lmins = mins; - png_uint_32 i; - int v; - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - /* We temporarily increase the "minimum sum" by the factor we - * would reduce the sum of this filter, so that we can do the - * early exit comparison without scaling the sum each time. - */ - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - int j; - png_uint_32 lmhi, lmlo; - lmlo = lmins & PNG_LOMASK; - lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; - - for (j = 0; j < num_p_filters; j++) - { - if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_SUB) - { - lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - } - } - - lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> - PNG_COST_SHIFT; - lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> - PNG_COST_SHIFT; - - if (lmhi > PNG_HIMASK) - lmins = PNG_MAXSUM; - else - lmins = (lmhi << PNG_HISHIFT) + lmlo; - } -#endif - - for (i = 0, rp = row_buf + 1, dp = png_ptr->sub_row + 1; i < bpp; - i++, rp++, dp++) - { - v = *dp = *rp; - - sum += (v < 128) ? v : 256 - v; - } - for (lp = row_buf + 1; i < row_info->rowbytes; - i++, rp++, lp++, dp++) - { - v = *dp = (png_byte)(((int)*rp - (int)*lp) & 0xff); - - sum += (v < 128) ? v : 256 - v; - - if (sum > lmins) /* We are already worse, don't continue. */ - break; - } - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - int j; - png_uint_32 sumhi, sumlo; - sumlo = sum & PNG_LOMASK; - sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; - - for (j = 0; j < num_p_filters; j++) - { - if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_SUB) - { - sumlo = (sumlo * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - sumhi = (sumhi * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - } - } - - sumlo = (sumlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> - PNG_COST_SHIFT; - sumhi = (sumhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >> - PNG_COST_SHIFT; - - if (sumhi > PNG_HIMASK) - sum = PNG_MAXSUM; - else - sum = (sumhi << PNG_HISHIFT) + sumlo; - } -#endif - - if (sum < mins) - { - mins = sum; - best_row = png_ptr->sub_row; - } - } - - /* up filter */ - if (filter_to_do == PNG_FILTER_UP) - { - png_bytep rp, dp, pp; - png_uint_32 i; - - for (i = 0, rp = row_buf + 1, dp = png_ptr->up_row + 1, - pp = prev_row + 1; i < row_bytes; - i++, rp++, pp++, dp++) - { - *dp = (png_byte)(((int)*rp - (int)*pp) & 0xff); - } - best_row = png_ptr->up_row; - } - - else if (filter_to_do & PNG_FILTER_UP) - { - png_bytep rp, dp, pp; - png_uint_32 sum = 0, lmins = mins; - png_uint_32 i; - int v; - - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - int j; - png_uint_32 lmhi, lmlo; - lmlo = lmins & PNG_LOMASK; - lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; - - for (j = 0; j < num_p_filters; j++) - { - if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_UP) - { - lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - } - } - - lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_UP]) >> - PNG_COST_SHIFT; - lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_UP]) >> - PNG_COST_SHIFT; - - if (lmhi > PNG_HIMASK) - lmins = PNG_MAXSUM; - else - lmins = (lmhi << PNG_HISHIFT) + lmlo; - } -#endif - - for (i = 0, rp = row_buf + 1, dp = png_ptr->up_row + 1, - pp = prev_row + 1; i < row_bytes; i++) - { - v = *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff); - - sum += (v < 128) ? v : 256 - v; - - if (sum > lmins) /* We are already worse, don't continue. */ - break; - } - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - int j; - png_uint_32 sumhi, sumlo; - sumlo = sum & PNG_LOMASK; - sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; - - for (j = 0; j < num_p_filters; j++) - { - if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_UP) - { - sumlo = (sumlo * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - sumhi = (sumhi * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - } - } - - sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_UP]) >> - PNG_COST_SHIFT; - sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_UP]) >> - PNG_COST_SHIFT; - - if (sumhi > PNG_HIMASK) - sum = PNG_MAXSUM; - else - sum = (sumhi << PNG_HISHIFT) + sumlo; - } -#endif - - if (sum < mins) - { - mins = sum; - best_row = png_ptr->up_row; - } - } - - /* avg filter */ - if (filter_to_do == PNG_FILTER_AVG) - { - png_bytep rp, dp, pp, lp; - png_uint_32 i; - for (i = 0, rp = row_buf + 1, dp = png_ptr->avg_row + 1, - pp = prev_row + 1; i < bpp; i++) - { - *dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff); - } - for (lp = row_buf + 1; i < row_bytes; i++) - { - *dp++ = (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2)) - & 0xff); - } - best_row = png_ptr->avg_row; - } - - else if (filter_to_do & PNG_FILTER_AVG) - { - png_bytep rp, dp, pp, lp; - png_uint_32 sum = 0, lmins = mins; - png_uint_32 i; - int v; - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - int j; - png_uint_32 lmhi, lmlo; - lmlo = lmins & PNG_LOMASK; - lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; - - for (j = 0; j < num_p_filters; j++) - { - if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_AVG) - { - lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - } - } - - lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_AVG]) >> - PNG_COST_SHIFT; - lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_AVG]) >> - PNG_COST_SHIFT; - - if (lmhi > PNG_HIMASK) - lmins = PNG_MAXSUM; - else - lmins = (lmhi << PNG_HISHIFT) + lmlo; - } -#endif - - for (i = 0, rp = row_buf + 1, dp = png_ptr->avg_row + 1, - pp = prev_row + 1; i < bpp; i++) - { - v = *dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff); - - sum += (v < 128) ? v : 256 - v; - } - for (lp = row_buf + 1; i < row_bytes; i++) - { - v = *dp++ = - (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2)) & 0xff); - - sum += (v < 128) ? v : 256 - v; - - if (sum > lmins) /* We are already worse, don't continue. */ - break; - } - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - int j; - png_uint_32 sumhi, sumlo; - sumlo = sum & PNG_LOMASK; - sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; - - for (j = 0; j < num_p_filters; j++) - { - if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_NONE) - { - sumlo = (sumlo * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - sumhi = (sumhi * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - } - } - - sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_AVG]) >> - PNG_COST_SHIFT; - sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_AVG]) >> - PNG_COST_SHIFT; - - if (sumhi > PNG_HIMASK) - sum = PNG_MAXSUM; - else - sum = (sumhi << PNG_HISHIFT) + sumlo; - } -#endif - - if (sum < mins) - { - mins = sum; - best_row = png_ptr->avg_row; - } - } - - /* Paeth filter */ - if (filter_to_do == PNG_FILTER_PAETH) - { - png_bytep rp, dp, pp, cp, lp; - png_uint_32 i; - for (i = 0, rp = row_buf + 1, dp = png_ptr->paeth_row + 1, - pp = prev_row + 1; i < bpp; i++) - { - *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff); - } - - for (lp = row_buf + 1, cp = prev_row + 1; i < row_bytes; i++) - { - int a, b, c, pa, pb, pc, p; - - b = *pp++; - c = *cp++; - a = *lp++; - - p = b - c; - pc = a - c; - -#ifdef PNG_USE_ABS - pa = abs(p); - pb = abs(pc); - pc = abs(p + pc); -#else - pa = p < 0 ? -p : p; - pb = pc < 0 ? -pc : pc; - pc = (p + pc) < 0 ? -(p + pc) : p + pc; -#endif - - p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c; - - *dp++ = (png_byte)(((int)*rp++ - p) & 0xff); - } - best_row = png_ptr->paeth_row; - } - - else if (filter_to_do & PNG_FILTER_PAETH) - { - png_bytep rp, dp, pp, cp, lp; - png_uint_32 sum = 0, lmins = mins; - png_uint_32 i; - int v; - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - int j; - png_uint_32 lmhi, lmlo; - lmlo = lmins & PNG_LOMASK; - lmhi = (lmins >> PNG_HISHIFT) & PNG_HIMASK; - - for (j = 0; j < num_p_filters; j++) - { - if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_PAETH) - { - lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - } - } - - lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_PAETH]) >> - PNG_COST_SHIFT; - lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_PAETH]) >> - PNG_COST_SHIFT; - - if (lmhi > PNG_HIMASK) - lmins = PNG_MAXSUM; - else - lmins = (lmhi << PNG_HISHIFT) + lmlo; - } -#endif - - for (i = 0, rp = row_buf + 1, dp = png_ptr->paeth_row + 1, - pp = prev_row + 1; i < bpp; i++) - { - v = *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff); - - sum += (v < 128) ? v : 256 - v; - } - - for (lp = row_buf + 1, cp = prev_row + 1; i < row_bytes; i++) - { - int a, b, c, pa, pb, pc, p; - - b = *pp++; - c = *cp++; - a = *lp++; - -#ifndef PNG_SLOW_PAETH - p = b - c; - pc = a - c; -#ifdef PNG_USE_ABS - pa = abs(p); - pb = abs(pc); - pc = abs(p + pc); -#else - pa = p < 0 ? -p : p; - pb = pc < 0 ? -pc : pc; - pc = (p + pc) < 0 ? -(p + pc) : p + pc; -#endif - p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c; -#else /* PNG_SLOW_PAETH */ - p = a + b - c; - pa = abs(p - a); - pb = abs(p - b); - pc = abs(p - c); - if (pa <= pb && pa <= pc) - p = a; - else if (pb <= pc) - p = b; - else - p = c; -#endif /* PNG_SLOW_PAETH */ - - v = *dp++ = (png_byte)(((int)*rp++ - p) & 0xff); - - sum += (v < 128) ? v : 256 - v; - - if (sum > lmins) /* We are already worse, don't continue. */ - break; - } - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - if (png_ptr->heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED) - { - int j; - png_uint_32 sumhi, sumlo; - sumlo = sum & PNG_LOMASK; - sumhi = (sum >> PNG_HISHIFT) & PNG_HIMASK; - - for (j = 0; j < num_p_filters; j++) - { - if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_PAETH) - { - sumlo = (sumlo * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - sumhi = (sumhi * png_ptr->filter_weights[j]) >> - PNG_WEIGHT_SHIFT; - } - } - - sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_PAETH]) >> - PNG_COST_SHIFT; - sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_PAETH]) >> - PNG_COST_SHIFT; - - if (sumhi > PNG_HIMASK) - sum = PNG_MAXSUM; - else - sum = (sumhi << PNG_HISHIFT) + sumlo; - } -#endif - - if (sum < mins) - { - best_row = png_ptr->paeth_row; - } - } - - /* Do the actual writing of the filtered row data from the chosen filter. */ - - png_write_filtered_row(png_ptr, best_row); - -#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) - /* Save the type of filter we picked this time for future calculations */ - if (png_ptr->num_prev_filters > 0) - { - int j; - for (j = 1; j < num_p_filters; j++) - { - png_ptr->prev_filters[j] = png_ptr->prev_filters[j - 1]; - } - png_ptr->prev_filters[j] = best_row[0]; - } -#endif -} - - -/* Do the actual writing of a previously filtered row. */ -void /* PRIVATE */ -png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row) -{ - png_debug(1, "in png_write_filtered_row\n"); - png_debug1(2, "filter = %d\n", filtered_row[0]); - /* set up the zlib input buffer */ - - png_ptr->zstream.next_in = filtered_row; - png_ptr->zstream.avail_in = (uInt)png_ptr->row_info.rowbytes + 1; - /* repeat until we have compressed all the data */ - do - { - int ret; /* return of zlib */ - - /* compress the data */ - ret = deflate(&png_ptr->zstream, Z_NO_FLUSH); - /* check for compression errors */ - if (ret != Z_OK) - { - if (png_ptr->zstream.msg != NULL) - png_error(png_ptr, png_ptr->zstream.msg); - else - png_error(png_ptr, "zlib error"); - } - - /* see if it is time to write another IDAT */ - if (!(png_ptr->zstream.avail_out)) - { - /* write the IDAT and reset the zlib output buffer */ - png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - } - /* repeat until all data has been compressed */ - } while (png_ptr->zstream.avail_in); - - /* swap the current and previous rows */ - if (png_ptr->prev_row != NULL) - { - png_bytep tptr; - - tptr = png_ptr->prev_row; - png_ptr->prev_row = png_ptr->row_buf; - png_ptr->row_buf = tptr; - } - - /* finish row - updates counters and flushes zlib if last row */ - png_write_finish_row(png_ptr); - -#if defined(PNG_WRITE_FLUSH_SUPPORTED) - png_ptr->flush_rows++; - - if (png_ptr->flush_dist > 0 && - png_ptr->flush_rows >= png_ptr->flush_dist) - { - png_write_flush(png_ptr); - } -#endif -} -#endif /* PNG_WRITE_SUPPORTED */ diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/beos/x86-shared.proj b/gtkmm-osx/trunk/libpng-1.2.5/projects/beos/x86-shared.proj deleted file mode 100644 index 6d2e3c31998f36b1fc44eb440f0c730f011d53f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17031 zcmeHPUu+yl8K3QKle25bm&E^KJI#f(32kIwt3pMSqQuELPN?mid~VaCHrMsu`n-5= z_cXiylU9g*h@gtf15lyx#zP+p52!qW5JGu~0HLZceKBf?O5-|Vct zcFxIh=cv~CMxNdI^L;bl{C4Ks@4lJ!_=WTcV`sjT&hQz=j{hRVM{LHJ`Z+>|zr-nx z7|U>T0rxoKZUvY0u&(2lK-`5$;bBB2oAG9GBRZy}rX9yi<&6cya!RRLL(3c7O-&nA zxkEw}4^|luy;RyEU|^V4;8Aj1b7`j_at}N#b9$$sur|&LcuX6Pn{uzXo>5HgI7~8Y z`cz>I*!;HOo zwqtZ6JKmd^;+j5Z@Rv+uamtx9>^Ug&?=giPl8<0O+!Yo(H!?XH%c$I#aeGikFM+F_ zbY-k$7c{rX^Fz?|%gFCT+)z(d70Y!t-wshOj;Xt+=RMD{U3!}Y!tKp*qhwvl6%E%l z?1I5_QR$up-L*eW@j`*ImNsN|BPNz^4fq9J&snBDhkR{;MA)LBl}Z3!^GwH1Ee#eI z2TR=fmZ9S@R2gDxboGvFy(|lMe&~!bXjn7GlA+Ig+O&1Q7x4p@Wk}kSvt49SnZjZ0)H|dt z;Ri0R1m=r=Mx)}ld;h;i4f_nnmKwj5q2KMj!==(l-t-)vAuCSUOJp@JFE4-Iih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CAoVxM=fNC7e zAmaZM?>hoZIUjsyPw86ye-{eEJ@*Rj3Q(Z7DEMfe?$s^nd$`zS2bY89YwaM=8IVZ+ z<_eu>;n%6Mm)Gj+Ca1RA^Rt5!egB76pqA)8$9 zM-IO9jDB4y9kLa5EY4lhXVq^EX-sxWACIgHzRbzTehk?omAc&UajER}2yxT2kxz-X PZ8~JH9RDDKPHFxR(DFj< diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/beos/x86-shared.txt b/gtkmm-osx/trunk/libpng-1.2.5/projects/beos/x86-shared.txt deleted file mode 100644 index 0cd4d9d..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/beos/x86-shared.txt +++ /dev/null @@ -1,22 +0,0 @@ -This project builds a shared library version of libpng on x86 BeOS. - -It defines PNG_USE_PNGGCCRD, which activates the assembly code in -pnggccrd.c; this hasn't been extensively tested on BeOS. - -To install: - -1) build - - Note: As of version 1.0.10, you'll get a fair number of warnings when - you compile pnggccrd.c. As far as I know, these are harmless, - but it would be better if someone fixed them. - -2) copy and png.h, pngconf.h somewhere; /boot/home/config/include (which - you'll have to make) is a good choice - -3) copy libpng.so to /boot/home/config/lib - -4) build your libpng.so applications (remember to include libz.a as - well when you link) - -- Chris Herborth, March 27, 2001 diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/beos/x86-static.proj b/gtkmm-osx/trunk/libpng-1.2.5/projects/beos/x86-static.proj deleted file mode 100644 index 37c0753664a682120b138d997f0886ba4354e9b5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16706 zcmeHOO>7&-6`nOWHl`CW7}Rb&lkCAmy&Z_%X7y~&T#77 zA*mVWnp6Av)jQP))!j8&Ya7bJg7CARMH5JLI4xe@V&_)k|t3C9~ zSjj4AZqdmP!P2jy{t)tpe(I{(uCs+Mh;s3Qx@Ts=^K8qdr%52(zMR8L=9OHLyDqm1 z+{sl-_c-XT{bkxI6d3E+i^?A4*viR4zo6?m)3D}IZ!D1rTa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{0^((Kh*Iz*Wk*7OEe~1zBQklIs z;ERlUcyH)6l<=hSLTqW=S0v8tvwolI8}AMK;eh`~%oW}n8YkqZtB@HqnOM9se!91O zQkGSyM3@{#oyH(O>ZA4^(7rv{TfPnx7ekqNsr|$8$gM9Pj@+6?dpZ{HSRoS#9;%<} zkK7`9>L)7@^5DeAEwFxF&+0Z9Rnk4Q522orm!(w`YUSEXcq zQtT)y`2>DnE{y9kEH$YW5xSyJXGl?eO$$%{58@L}q{n#D2 z5fof!4uo5udQG^s;g4(>{z23`A-)tsVswnL2;Ejn4PX?Wy9*JZXYRK!33nXZX*Hlu zeGKhZwiYPFDR2_8l~xp%L}##l8(L9^fv-q%Pj#WvffZHYUaP^Rkl~|Lz43gwJsZN+S+joxVXjZEMmA?#-NaJdtM(bNon*xRRFSDh9f~LLi z03=Ec0JYfz&uuZk02}WC7+=I18iHxF^+fy5ZK?GXCxm3GUQc87ZM@AMc#AFQk1M&x zaoTL(Ew$bQ@4!!Lz%*Xpa@uU)EjfnATWa6IKt(Uz2cTNfGdOeQJ^8k)G8jF&T;ptl6mcB!XO-^t*7{1X70-FJe - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=1 -Locale=2057 -CodePage=1252 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion= -Comments= - -[HistoryLists\hlIncludePath] -Count=18 -Item0=..\..;..\..\..\zlib;$(BCB)\include -Item1=..\..;P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include -Item2=..\..;..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression\external;$(BCB)\include -Item3=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression\external;$(BCB)\include -Item4=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression;$(BCB)\include -Item5=..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression;$(BCB)\include -Item6=..\Source\ThirdParty\PortableNetworkGraphics;P:\Development\Source\ThirdParty\ZLibCompression;$(BCB)\include -Item7=..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\include -Item8=$(BCB)\include -Item9=..\Source;..\Source\General\Templates;..\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl -Item10=P:\Development\Source\;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl -Item11=P:\Development\Source;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl -Item12=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl -Item13=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl -Item14=P:\Development\Source\General\Templates\;$(BCB)\include;$(BCB)\include\vcl -Item15=P:\Development\Source\General\Templates;$(BCB)\include;$(BCB)\include\vcl -Item16=P:\Development\Source;$(BCB)\include;$(BCB)\include\vcl -Item17=$(BCB)\include;$(BCB)\include\vcl - -[HistoryLists\hlLibraryPath] -Count=10 -Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib -Item1=..\..;..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib -Item2=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib -Item3=..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib -Item4=$(BCB)\lib\obj;$(BCB)\lib -Item5=..\Source\SIMUtilities;..\Source;$(BCB)\lib\obj;$(BCB)\lib -Item6=P:\Development\Source\SIMUtilities\;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib -Item7=P:\Development\Source\SIMUtilities;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib -Item8=P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib -Item9=P:\Development\Source;$(BCB)\lib\obj;$(BCB)\lib - -[HistoryLists\hlDebugSourcePath] -Count=1 -Item0=$(BCB)\source\vcl - -[HistoryLists\hlConditionals] -Count=20 -Item0=ZLIB_DLL;Z_PREFIX;PNG_BUILD_DLL;PNG_NO_MODULEDEF -Item1=_DEBUG;ZLIB_DLL;Z_PREFIX;PNG_BUILD_DLL;PNG_NO_MODULEDEF -Item2=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_NO_MODULEDEF -Item3=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_NO_GLOBAL_ARRAYS -Item4=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED;PNG_DEBUG_FILE=stderr -Item5=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED -Item6=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED -Item7=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF -Item8=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5 -Item9=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG -Item10=PNG_BUILD_DLL;ZLIB_DLL -Item11=PNG_BUILD_DLL -Item12=PNG_DLL;PNG_BUILD_DLL;ZLIB_DLL -Item13=PNG_DLL;PNG_BUILD_DLL;PNG_NO_GLOBAL_ARRAYS;ZLIB_DLL -Item14=PNG_DLL;PNG_BUILD_DLL;PNG_NO_GLOBAL_ARRAYS -Item15=PNG_DLL;PNG_BUILD_DLL -Item16=PNG_DLL;PNG_BUILD_DLL;PNG_MODULEDEF -Item17=_HTML_FORM -Item18=_DEBUG;_HTML_FORM -Item19=_DEBUG - -[HistoryLists\hlIntOutputDir] -Count=2 -Item0=..\Obj -Item1=P:\Development\Obj - -[Debugging] -DebugSourceDirs= - -[Parameters] -RunParams= -HostApplication=P:\Development\Executables\LibPNGTestApp.exe -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -ShowInfoMsgs=0 -LinkDebugVcl=0 -LinkCGLIB=0 - - \ No newline at end of file diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/libpng.cpp b/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/libpng.cpp deleted file mode 100644 index 2708ad4..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/libpng.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//--------------------------------------------------------------------------- -#include -//--------------------------------------------------------------------------- -// Important note about DLL memory management when your DLL uses the -// static version of the RunTime Library: -// -// If your DLL exports any functions that pass String objects (or structs/ -// classes containing nested Strings) as parameter or function results, -// you will need to add the library MEMMGR.LIB to both the DLL project and -// any other projects that use the DLL. You will also need to use MEMMGR.LIB -// if any other projects which use the DLL will be performing new or delete -// operations on any non-TObject-derived classes which are exported from the -// DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling -// EXE's to use the BORLNDMM.DLL as their memory manager. In these cases, -// the file BORLNDMM.DLL should be deployed along with your DLL. -// -// To avoid using BORLNDMM.DLL, pass string information using "char *" or -// ShortString parameters. -// -// If your DLL uses the dynamic version of the RTL, you do not need to -// explicitly add MEMMGR.LIB as this will be done implicitly for you -//--------------------------------------------------------------------------- - -int WINAPI DllEntryPoint(HINSTANCE, unsigned long, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/libpng.readme.txt b/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/libpng.readme.txt deleted file mode 100644 index efe7cbd..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/libpng.readme.txt +++ /dev/null @@ -1,19 +0,0 @@ -Project files to build libpng using Borland C++ Builder v5.0 - -To use this dll, you will need to: - -1) add the following conditional defines to your project - -PNG_USE_DLL -Z_PREFIX - -2) add the paths to png.h and zlib.h to your include path - -3) add libpng.lib or libpngstat.lib to the project. - -If you are using libpng.dll, libpng.dll and zlib.dll will be required for the code to run. - -Alternatively, the libpng.dll can be built using zlibstat.lib to produce one dll containing both the zlib and png code. - -See the libpng documentation for instructions on how to use the code. - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/libpngstat.bpf b/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/libpngstat.bpf deleted file mode 100644 index 9159d02..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/libpngstat.bpf +++ /dev/null @@ -1,22 +0,0 @@ -USELIB("zlibstat.lib"); -USEUNIT("..\..\pngerror.c"); -USEUNIT("..\..\png.c"); -USEUNIT("..\..\pngwutil.c"); -USEUNIT("..\..\pngmem.c"); -USEUNIT("..\..\pngpread.c"); -USEUNIT("..\..\pngread.c"); -USEUNIT("..\..\pngrio.c"); -USEUNIT("..\..\pngrtran.c"); -USEUNIT("..\..\pngrutil.c"); -USEUNIT("..\..\pngset.c"); -USEUNIT("..\..\pngtrans.c"); -USEUNIT("..\..\pngwio.c"); -USEUNIT("..\..\pngwrite.c"); -USEUNIT("..\..\pngwtran.c"); -USEUNIT("..\..\pngget.c"); -//--------------------------------------------------------------------------- -#define Library - -// To add a file to the library use the Project menu 'Add to Project'. - - \ No newline at end of file diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/libpngstat.bpr b/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/libpngstat.bpr deleted file mode 100644 index 0b97981..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/libpngstat.bpr +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=2057 -CodePage=1252 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[HistoryLists\hlIncludePath] -Count=2 -Item0=..\..;P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include -Item1=..\..;$(BCB)\include;$(BCB)\include\vcl - -[HistoryLists\hlLibraryPath] -Count=1 -Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib - -[HistoryLists\hlDebugSourcePath] -Count=1 -Item0=$(BCB)\source\vcl - -[HistoryLists\hlConditionals] -Count=1 -Item0=_DEBUG - -[HistoryLists\hlTlibPageSize] -Count=1 -Item0=0x0010 - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -ShowInfoMsgs=0 -LinkDebugVcl=0 -LinkCGLIB=0 - -[Language] -ActiveLang= -ProjectLang= -RootDir= - - \ No newline at end of file diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib+libpng.bpg b/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib+libpng.bpg deleted file mode 100644 index f8f4702..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib+libpng.bpg +++ /dev/null @@ -1,33 +0,0 @@ -#------------------------------------------------------------------------------ -VERSION = BWS.01 -#------------------------------------------------------------------------------ -!ifndef ROOT -ROOT = $(MAKEDIR)\.. -!endif -#------------------------------------------------------------------------------ -MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** -DCC = $(ROOT)\bin\dcc32.exe $** -BRCC = $(ROOT)\bin\brcc32.exe $** -#------------------------------------------------------------------------------ -PROJECTS = zlibstat.lib libpngstat.lib zlib.dll libpng.dll -#------------------------------------------------------------------------------ -default: $(PROJECTS) -#------------------------------------------------------------------------------ - -libpng.dll: libpng.bpr - $(ROOT)\bin\bpr2mak $** - $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak - -zlibstat.lib: zlibstat.bpr - $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** - $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak - -zlib.dll: zlib.bpr - $(ROOT)\bin\bpr2mak $** - $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak - -libpngstat.lib: libpngstat.bpr - $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** - $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak - - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib.bpf b/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib.bpf deleted file mode 100644 index 7dca899..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib.bpf +++ /dev/null @@ -1,20 +0,0 @@ -USEUNIT("zlib.cpp"); -USEUNIT("..\..\..\zlib\zutil.c"); -USEUNIT("..\..\..\zlib\compress.c"); -USEUNIT("..\..\..\zlib\crc32.c"); -USEUNIT("..\..\..\zlib\deflate.c"); -USEUNIT("..\..\..\zlib\gzio.c"); -USEUNIT("..\..\..\zlib\infblock.c"); -USEUNIT("..\..\..\zlib\infcodes.c"); -USEUNIT("..\..\..\zlib\inffast.c"); -USEUNIT("..\..\..\zlib\inflate.c"); -USEUNIT("..\..\..\zlib\inftrees.c"); -USEUNIT("..\..\..\zlib\infutil.c"); -USEUNIT("..\..\..\zlib\trees.c"); -USEUNIT("..\..\..\zlib\uncompr.c"); -USEUNIT("..\..\..\zlib\adler32.c"); -//--------------------------------------------------------------------------- -This file is used by the project manager only and should be treated like the project file - - -DllEntryPoint \ No newline at end of file diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib.bpg b/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib.bpg deleted file mode 100644 index 0292b48..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib.bpg +++ /dev/null @@ -1,25 +0,0 @@ -#------------------------------------------------------------------------------ -VERSION = BWS.01 -#------------------------------------------------------------------------------ -!ifndef ROOT -ROOT = $(MAKEDIR)\.. -!endif -#------------------------------------------------------------------------------ -MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** -DCC = $(ROOT)\bin\dcc32.exe $** -BRCC = $(ROOT)\bin\brcc32.exe $** -#------------------------------------------------------------------------------ -PROJECTS = zlibstat.lib zlib.dll -#------------------------------------------------------------------------------ -default: $(PROJECTS) -#------------------------------------------------------------------------------ - -zlibstat.lib: zlibstat.bpr - $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** - $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak - -zlib.dll: zlib.bpr - $(ROOT)\bin\bpr2mak $** - $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak - - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib.bpr b/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib.bpr deleted file mode 100644 index b3dda39..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib.bpr +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=1 -Locale=2057 -CodePage=1252 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[HistoryLists\hlIncludePath] -Count=16 -Item0=..\..\..\zlib;$(BCB)\include -Item1=..\..\..;..\Source\ThirdParty\ZLibCompression\external;..\Source\ThirdParty\ZLibCompression;..\..\..\zlib;$(BCB)\include -Item2=..\Source\ThirdParty\ZLibCompression\external;..\Source\ThirdParty\ZLibCompression;..\..\..\zlib;$(BCB)\include -Item3=P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include -Item4=..\Source\ThirdParty\ZLibCompression\external;..\Source\ThirdParty\ZLibCompression;$(BCB)\include -Item5=..\Source\ThirdParty\ZLibCompression;$(BCB)\include -Item6=$(BCB)\include -Item7=..\Source;..\Source\General\Templates;..\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl -Item8=P:\Development\Source\;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl -Item9=P:\Development\Source;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl -Item10=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl -Item11=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl -Item12=P:\Development\Source\General\Templates\;$(BCB)\include;$(BCB)\include\vcl -Item13=P:\Development\Source\General\Templates;$(BCB)\include;$(BCB)\include\vcl -Item14=P:\Development\Source;$(BCB)\include;$(BCB)\include\vcl -Item15=$(BCB)\include;$(BCB)\include\vcl - -[HistoryLists\hlLibraryPath] -Count=12 -Item0=..\..\..\zlib;$(BCB)\lib\obj;$(BCB)\lib -Item1=..\..\..;..\Source\ThirdParty\ZLibCompression\external;..\Source\ThirdParty\ZLibCompression;..\..\..\zlib;$(BCB)\lib\obj;$(BCB)\lib -Item2=..\Source\ThirdParty\ZLibCompression\external;..\Source\ThirdParty\ZLibCompression;..\..\..\zlib;$(BCB)\lib\obj;$(BCB)\lib -Item3=P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\lib\obj;$(BCB)\lib -Item4=..\Source\ThirdParty\ZLibCompression\external;..\Source\ThirdParty\ZLibCompression;$(BCB)\lib\obj;$(BCB)\lib -Item5=$(BCB)\lib\obj;$(BCB)\lib -Item6=..\Source\ThirdParty\ZLibCompression;$(BCB)\lib\obj;$(BCB)\lib -Item7=..\Source\SIMUtilities;..\Source;$(BCB)\lib\obj;$(BCB)\lib -Item8=P:\Development\Source\SIMUtilities\;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib -Item9=P:\Development\Source\SIMUtilities;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib -Item10=P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib -Item11=P:\Development\Source;$(BCB)\lib\obj;$(BCB)\lib - -[HistoryLists\hlDebugSourcePath] -Count=1 -Item0=$(BCB)\source\vcl - -[HistoryLists\hlConditionals] -Count=8 -Item0=ZLIB_DLL;Z_PREFIX -Item1=ZLIB_DLL;_DEBUG;Z_PREFIX -Item2=ZLIB_DLL;_DEBUG -Item3=ZLIB_DLL -Item4=_WINDOWS;ZLIB_DLL -Item5=_HTML_FORM -Item6=_DEBUG;_HTML_FORM -Item7=_DEBUG - -[HistoryLists\hlIntOutputDir] -Count=2 -Item0=..\Obj -Item1=P:\Development\Obj - -[Debugging] -DebugSourceDirs= - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -ShowInfoMsgs=0 -LinkDebugVcl=0 -LinkCGLIB=0 - - \ No newline at end of file diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib.cpp b/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib.cpp deleted file mode 100644 index 3df1532..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlib.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//--------------------------------------------------------------------------- - -#include -//--------------------------------------------------------------------------- -// Important note about DLL memory management when your DLL uses the -// static version of the RunTime Library: -// -// If your DLL exports any functions that pass String objects (or structs/ -// classes containing nested Strings) as parameter or function results, -// you will need to add the library MEMMGR.LIB to both the DLL project and -// any other projects that use the DLL. You will also need to use MEMMGR.LIB -// if any other projects which use the DLL will be performing new or delete -// operations on any non-TObject-derived classes which are exported from the -// DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling -// EXE's to use the BORLNDMM.DLL as their memory manager. In these cases, -// the file BORLNDMM.DLL should be deployed along with your DLL. -// -// To avoid using BORLNDMM.DLL, pass string information using "char *" or -// ShortString parameters. -// -// If your DLL uses the dynamic version of the RTL, you do not need to -// explicitly add MEMMGR.LIB as this will be done implicitly for you -//--------------------------------------------------------------------------- - -int WINAPI DllEntryPoint(HINSTANCE, unsigned long, void*) -{ - return 1; -} -//--------------------------------------------------------------------------- diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlibstat.bpf b/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlibstat.bpf deleted file mode 100644 index 14c36bc..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlibstat.bpf +++ /dev/null @@ -1,20 +0,0 @@ -USEUNIT("..\..\..\zlib\zutil.c"); -USEUNIT("..\..\..\zlib\compress.c"); -USEUNIT("..\..\..\zlib\crc32.c"); -USEUNIT("..\..\..\zlib\deflate.c"); -USEUNIT("..\..\..\zlib\gzio.c"); -USEUNIT("..\..\..\zlib\infblock.c"); -USEUNIT("..\..\..\zlib\infcodes.c"); -USEUNIT("..\..\..\zlib\inffast.c"); -USEUNIT("..\..\..\zlib\inflate.c"); -USEUNIT("..\..\..\zlib\inftrees.c"); -USEUNIT("..\..\..\zlib\infutil.c"); -USEUNIT("..\..\..\zlib\trees.c"); -USEUNIT("..\..\..\zlib\uncompr.c"); -USEUNIT("..\..\..\zlib\adler32.c"); -//--------------------------------------------------------------------------- -#define Library - -// To add a file to the library use the Project menu 'Add to Project'. - - \ No newline at end of file diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlibstat.bpr b/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlibstat.bpr deleted file mode 100644 index 9e09038..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/borland/zlibstat.bpr +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=2057 -CodePage=1252 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[HistoryLists\hlIncludePath] -Count=8 -Item0=..\..\..\zlib;$(BCB)\include -Item1=..\Source\ThirdParty\ZLibCompression\external;..\..\..\zlib;$(BCB)\include -Item2=P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include -Item3=..\Source\ThirdParty\ZLibCompression\external;$(BCB)\include -Item4=..\Source\ThirdParty\ZLibCompression\external;..\Source\ThirdParty\ZLibCompression\ext;..\Source\ThirdParty\ZLibCompression;$(BCB)\include -Item5=..\Source\ThirdParty\ZLibCompression;$(BCB)\include -Item6=$(BCB)\include -Item7=$(BCB)\include;$(BCB)\include\vcl - -[HistoryLists\hlLibraryPath] -Count=7 -Item0=..\..\..\zlib;$(BCB)\lib\obj;$(BCB)\lib -Item1=$(BCB)\lib\obj;$(BCB)\lib -Item2=..\Source\ThirdParty\ZLibCompression\external;..\..\..\zlib;$(BCB)\lib\obj;$(BCB)\lib -Item3=P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\lib\obj;$(BCB)\lib -Item4=..\Source\ThirdParty\ZLibCompression\external;$(BCB)\lib\obj;$(BCB)\lib -Item5=..\Source\ThirdParty\ZLibCompression\external;..\Source\ThirdParty\ZLibCompression\ext;..\Source\ThirdParty\ZLibCompression;$(BCB)\lib\obj;$(BCB)\lib -Item6=..\Source\ThirdParty\ZLibCompression;$(BCB)\lib\obj;$(BCB)\lib - -[HistoryLists\hlDebugSourcePath] -Count=1 -Item0=$(BCB)\source\vcl - -[HistoryLists\hlConditionals] -Count=3 -Item0=Z_PREFIX -Item1=ZLIB_DLL -Item2=_WINDOWS;ZLIB_DLL - -[HistoryLists\hlIntOutputDir] -Count=2 -Item0=..\Obj -Item1=P:\Development\Obj - -[HistoryLists\hlTlibPageSize] -Count=1 -Item0=0x0010 - -[Debugging] -DebugSourceDirs= - -[Parameters] -RunParams= -HostApplication= -RemoteHost= -RemotePath= -RemoteDebug=0 - -[Compiler] -ShowInfoMsgs=0 -LinkDebugVcl=0 -LinkCGLIB=0 - -[Language] -ActiveLang= -ProjectLang= -RootDir= - - \ No newline at end of file diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/README.txt b/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/README.txt deleted file mode 100644 index d684b6b..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/README.txt +++ /dev/null @@ -1,57 +0,0 @@ -Microsoft Developer Studio Build File, Format Version 6.00 for -libpng 1.2.5 (October 3, 2002) and zlib - -Copyright (C) 2000 Simon-Pierre Cadieux -For conditions of distribution and use, see copyright notice in png.h - -Assumes that libpng sources are in ..\.. -Assumes that zlib sources have been copied to ..\..\..\zlib - -To build: - -0) On the main menu, select "File | Open Workspace" and then - select "libpng.dsw". - -1) On the main menu Select "Build | Set Active configuration". - Among the configurations beginning with "libpng" select the - one you wish to build (the corresponding "zlib" configuration - will be built automatically). - -2) Select "Build | Clean" - -3) Select "Build | Rebuild All". Ignore warning messages about - not being able to find certain include files (e.g., m68881.h, - alloc.h). - -4) Look in the appropriate "win32" subdirectories for both "zlib" - and "libpng" binaries. - -This project will build the PNG Development Group's "official" versions of -libpng and zlib libraries: - - libpng13.dll (default version, currently C code only) - libpng13a.dll (C + Assembler version) - libpng13b.dll (C + Assembler debug version) - libpng13d.dll (C code debug version) - libpng13vb.dll (version for VB, uses "stdcall" protocol) - libpng13[c,e-m].dll (reserved for official versions) - libpng13[n-z].dll (available for private versions) - zlib.dll (default version, currently C code only) - zlibd.dll (debug version) - zlibvb.dll (version for Visual Basic, uses "stdcall" protocol) - -If you change anything in libpng, or select different compiler settings, -please change the library name to an unreserved name, and define -DLLFNAME_POSTFIX and (PRIVATEBUILD or SPECIALBUILD) accordingly. DLLFNAME_POSTFIX -should correspond to a string in the range of "N" to "Z" depending on the letter -you choose for your private version. - -All DLLs built by this project use the Microsoft dynamic C runtime library -MSVCRT.DLL (MSVCRTD.DLL for debug versions). If you distribute any of the -above mentioned libraries you should also include this DLL in your package. -For a list of files that are redistributable in Visual C++ 6.0, see -Common\Redist\Redist.txt on Disc 1 of the Visual C++ 6.0 product CDs. - -5) For an example workspace that builds an application using the resulting - DLLs, go to Libpng's contrib\msvctest directory and use it to build - and run "pngtest". diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/libpng.dsp b/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/libpng.dsp deleted file mode 100644 index d08d3d5..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/libpng.dsp +++ /dev/null @@ -1,439 +0,0 @@ -# Microsoft Developer Studio Project File - Name="libpng" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=libpng - Win32 DLL -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "libpng.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "libpng.mak" CFG="libpng - Win32 DLL" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "libpng - Win32 DLL" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libpng - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libpng - Win32 DLL ASM" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libpng - Win32 DLL Debug ASM" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "libpng - Win32 LIB" (based on "Win32 (x86) Static Library") -!MESSAGE "libpng - Win32 LIB Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "libpng - Win32 DLL VB" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" - -!IF "$(CFG)" == "libpng - Win32 DLL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir ".\win32\libpng\dll" -# PROP Intermediate_Dir ".\win32\libpng\dll" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c -# ADD CPP /nologo /MD /W3 /O1 /I "..\.." /I "..\..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /Yu"png.h" /FD /c -MTL=midl.exe -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /dll /machine:I386 -# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll\libpng13.dll" -# SUBTRACT LINK32 /pdb:none - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir ".\win32\libpng\dll_dbg" -# PROP Intermediate_Dir ".\win32\libpng\dll_dbg" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "DEBUG" /D "_DEBUG" /D PNG_DEBUG=1 /D "WIN32" /D "_WINDOWS" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /Yu"png.h" /FD /GZ /c -MTL=midl.exe -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /i "..\.." /d "_DEBUG" /d PNG_DEBUG=1 -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /dll /debug /machine:I386 /out:".\win32\libpng\dll_dbg\libpng13d.dll" - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir ".\win32\libpng\dll_asm" -# PROP Intermediate_Dir ".\win32\libpng\dll_asm" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c -# ADD CPP /nologo /MD /W3 /O1 /I "..\.." /I "..\..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "PNG_USE_PNGVCRD" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /Yu"png.h" /FD /c -MTL=midl.exe -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG" /d "PNG_USE_PNGVCRD" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /dll /machine:I386 -# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll_asm\libpng13a.dll" -# SUBTRACT LINK32 /pdb:none - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug ASM" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir ".\win32\libpng\dll_dbga" -# PROP Intermediate_Dir ".\win32\libpng\dll_dbga" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "DEBUG" /D "_DEBUG" /D PNG_DEBUG=1 /D "WIN32" /D "_WINDOWS" /D "PNG_USE_PNGVCRD" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /Yu"png.h" /FD /GZ /c -MTL=midl.exe -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /i "..\.." /d "_DEBUG" /d PNG_DEBUG=1 /d "PNG_USE_PNGVCRD" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /dll /debug /machine:I386 /out:".\win32\libpng\dll_dbga\libpng13b.dll" - -!ELSEIF "$(CFG)" == "libpng - Win32 LIB" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir ".\win32\libpng\lib" -# PROP Intermediate_Dir ".\win32\libpng\lib" -# PROP Target_Dir "" -MTL=midl.exe -CPP=cl.exe -# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_LIB" /FD /c -# ADD CPP /nologo /W3 /O1 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /Yu"png.h" /FD /c -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "libpng - Win32 LIB Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir ".\win32\libpng\lib_dbg" -# PROP Intermediate_Dir ".\win32\libpng\lib_dbg" -# PROP Target_Dir "" -MTL=midl.exe -CPP=cl.exe -# ADD BASE CPP /nologo /W3 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_LIB" /FD /GZ /c -# ADD CPP /nologo /W3 /Zi /Od /I "..\.." /I "..\..\..\zlib" /D "DEBUG" /D "_DEBUG" /D PNG_DEBUG=1 /D "WIN32" /Yu"png.h" /FD /GZ /c -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "libpng___Win32_DLL_VB" -# PROP BASE Intermediate_Dir "libpng___Win32_DLL_VB" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir ".\win32\libpng\dll_vb" -# PROP Intermediate_Dir ".\win32\libpng\dll_vb" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O1 /I "..\.." /I "..\..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /Yu"png.h" /FD /c -# ADD CPP /nologo /Gd /MD /W3 /O1 /I "..\.." /I "..\..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /D PNGAPI=__stdcall /Yu"png.h" /FD /c -MTL=midl.exe -RSC=rc.exe -# ADD BASE RSC /l 0x409 /i "..\.." /d "NDEBUG" -# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll\libpng13.dll" -# SUBTRACT BASE LINK32 /pdb:none -# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\libpng\dll_vb\libpngvb13.dll" -# SUBTRACT LINK32 /pdb:none - -!ENDIF - -# Begin Target - -# Name "libpng - Win32 DLL" -# Name "libpng - Win32 DLL Debug" -# Name "libpng - Win32 DLL ASM" -# Name "libpng - Win32 DLL Debug ASM" -# Name "libpng - Win32 LIB" -# Name "libpng - Win32 LIB Debug" -# Name "libpng - Win32 DLL VB" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\png.c -# SUBTRACT CPP /YX /Yc /Yu -# End Source File -# Begin Source File - -SOURCE=.\png.rc - -!IF "$(CFG)" == "libpng - Win32 DLL" - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug" - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM" - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug ASM" - -!ELSEIF "$(CFG)" == "libpng - Win32 LIB" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "libpng - Win32 LIB Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\png32ms.def - -!IF "$(CFG)" == "libpng - Win32 DLL" - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug" - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM" - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug ASM" - -!ELSEIF "$(CFG)" == "libpng - Win32 LIB" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "libpng - Win32 LIB Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\pngerror.c -# ADD CPP /Yc"png.h" -# End Source File -# Begin Source File - -SOURCE=..\..\pngget.c -# End Source File -# Begin Source File - -SOURCE=..\..\pngmem.c -# End Source File -# Begin Source File - -SOURCE=..\..\pngpread.c -# End Source File -# Begin Source File - -SOURCE=..\..\pngread.c -# End Source File -# Begin Source File - -SOURCE=..\..\pngrio.c -# End Source File -# Begin Source File - -SOURCE=..\..\pngrtran.c -# End Source File -# Begin Source File - -SOURCE=..\..\pngrutil.c -# End Source File -# Begin Source File - -SOURCE=..\..\pngset.c -# End Source File -# Begin Source File - -SOURCE=..\..\pngtrans.c -# End Source File -# Begin Source File - -SOURCE=..\..\pngvcrd.c - -!IF "$(CFG)" == "libpng - Win32 DLL" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM" - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug ASM" - -!ELSEIF "$(CFG)" == "libpng - Win32 LIB" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "libpng - Win32 LIB Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB" - -# PROP BASE Exclude_From_Build 1 -# PROP Exclude_From_Build 1 - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\pngwio.c -# End Source File -# Begin Source File - -SOURCE=..\..\pngwrite.c -# End Source File -# Begin Source File - -SOURCE=..\..\pngwtran.c -# End Source File -# Begin Source File - -SOURCE=..\..\pngwutil.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\png.h -# End Source File -# Begin Source File - -SOURCE=..\..\pngconf.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=.\readme.txt - -!IF "$(CFG)" == "libpng - Win32 DLL" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL ASM" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug ASM" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "libpng - Win32 LIB" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "libpng - Win32 LIB Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB" - -# PROP BASE Exclude_From_Build 1 -# PROP Exclude_From_Build 1 - -!ENDIF - -# End Source File -# End Target -# End Project diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/libpng.dsw b/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/libpng.dsw deleted file mode 100644 index eca5b77..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/libpng.dsw +++ /dev/null @@ -1,44 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "libpng"=.\libpng.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name zlib - End Project Dependency -}}} - -############################################################################### - -Project: "zlib"=.\zlib.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/png.rc b/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/png.rc deleted file mode 100644 index 9912471..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/png.rc +++ /dev/null @@ -1,100 +0,0 @@ -#define PNG_VERSION_INFO_ONLY - -#include -#include "png.h" - -#define _QUOTE(x) # x -#define QUOTE(x) _QUOTE(x) - -#define PNG_LIBPNG_DLLFNAME "LIBPNG" - -#if defined(DLLFNAME_POSTFIX) && !defined(PRIVATEBUILD) && !defined(SPECIALBUILD) -# error PRIVATEBUILD or SPECIALBUILD must be defined as a string describing the type of change brought to the standard library -#endif /* defined(DLLFNAME_POSTFIX)... */ - -#if !defined(DLLFNAME_POSTFIX) && defined(PNG_USE_PNGVCRD) -# if defined(PNG_DEBUG) && (PNG_DEBUG > 0) -# define DLLFNAME_POSTFIX "B" -# else -# define DLLFNAME_POSTFIX "A" -# endif /* !defined(DLLFNAME_POSTFIX)... */ -# if !defined(SPECIALBUILD) -# define SPECIALBUILD "Use MMX instructions" -# endif /* SPECIALBUILD */ -#endif - -#if defined(PNG_DEBUG) && (PNG_DEBUG > 0) -# define VS_DEBUG VS_FF_DEBUG -# ifndef DLLFNAME_POSTFIX -# define DLLFNAME_POSTFIX "D" -# endif /* DLLFNAME_POSTFIX */ -# ifndef COMMENTS -# define COMMENTS "PNG_DEBUG=" QUOTE(PNG_DEBUG) -# endif /* COMMENTS */ -#else -# define VS_DEBUG 0 -# ifndef DLLFNAME_POSTFIX -# define DLLFNAME_POSTFIX -# endif /* DLLFNAME_POSTFIX */ -#endif /* defined(DEBUG)... */ - -#ifdef PRIVATEBUILD -# define VS_PRIVATEBUILD VS_FF_PRIVATEBUILD -#else -# define VS_PRIVATEBUILD 0 -#endif /* PRIVATEBUILD */ - -#ifdef SPECIALBUILD -# define VS_SPECIALBUILD VS_FF_SPECIALBUILD -#else -# define VS_SPECIALBUILD 0 -#endif /* SPECIALBUILD */ - -#if ((PNG_LIBPNG_BUILD_TYPE & PNG_LIBPNG_BUILD_TYPEMASK) != \ - PNG_LIBPNG_BUILD_STABLE) -# define VS_PRERELEASE VS_FF_PRERELEASE -# define VS_PATCHED 0 -#else -# define VS_PRERELEASE 0 -# if (PNG_LIBPNG_BUILD_TYPE & PNG_LIBPNG_BUILD_PATCHED) -# define VS_PATCHED VS_FF_PATCHED -# else -# define VS_PATCHED 0 -# endif -#endif - -VS_VERSION_INFO VERSIONINFO -FILEVERSION PNG_LIBPNG_VER_MAJOR, PNG_LIBPNG_VER_MINOR, PNG_LIBPNG_VER_RELEASE, PNG_LIBPNG_VER_BUILD -PRODUCTVERSION PNG_LIBPNG_VER_MAJOR, PNG_LIBPNG_VER_MINOR, PNG_LIBPNG_VER_RELEASE, PNG_LIBPNG_VER_BUILD -FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -FILEFLAGS VS_DEBUG | VS_PRIVATEBUILD | VS_SPECIALBUILD | VS_PRERELEASE | VS_PATCHED -FILEOS VOS__WINDOWS32 -FILETYPE VFT_DLL -FILESUBTYPE VFT2_UNKNOWN -BEGIN - BLOCK "StringFileInfo" - BEGIN BLOCK "040904E4" /* Language type = U.S English(0x0409) and Character Set = Windows, Multilingual(0x04E4) */ - BEGIN -#ifdef COMMENTS - VALUE "Comments", COMMENTS "\000" -#endif /* COMMENTS */ - VALUE "FileDescription", "PNG image compression library\000" - VALUE "FileVersion", PNG_LIBPNG_VER_STRING "\000" - VALUE "InternalName", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_MAJOR) DLLFNAME_POSTFIX " (Windows 32 bit)\000" - VALUE "LegalCopyright", "\251 1998-2002 Glenn Randers-Pehrson\000" - VALUE "OriginalFilename", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_MAJOR) DLLFNAME_POSTFIX ".DLL\000" -#ifdef PRIVATEBUILD - VALUE "PrivateBuild", PRIVATEBUILD -#endif /* PRIVATEBUILD */ - VALUE "ProductName", "LibPNG\000" - VALUE "ProductVersion", "1\000" -#ifdef SPECIALBUILD - VALUE "SpecialBuild", SPECIALBUILD -#endif /* SPECIALBUILD */ - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 0x04E4 - END -END diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/png32ms.def b/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/png32ms.def deleted file mode 100644 index c995371..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/png32ms.def +++ /dev/null @@ -1,220 +0,0 @@ -;------------------------------------------ -; LIBPNG module definition file for Windows -;------------------------------------------ - -LIBRARY -DESCRIPTION "PNG image compression library for Windows" - -EXPORTS -;Version 1.2.5 - png_build_grayscale_palette @1 - png_check_sig @2 - png_chunk_error @3 - png_chunk_warning @4 - png_convert_from_struct_tm @5 - png_convert_from_time_t @6 - png_create_info_struct @7 - png_create_read_struct @8 - png_create_write_struct @9 - png_data_freer @10 - png_destroy_info_struct @11 - png_destroy_read_struct @12 - png_destroy_write_struct @13 - png_error @14 - png_free @15 - png_free_data @16 - png_get_IHDR @17 - png_get_PLTE @18 - png_get_bKGD @19 - png_get_bit_depth @20 - png_get_cHRM @21 - png_get_cHRM_fixed @22 - png_get_channels @23 - png_get_color_type @24 - png_get_compression_buffer_size @25 - png_get_compression_type @26 - png_get_copyright @27 - png_get_error_ptr @28 - png_get_filter_type @29 - png_get_gAMA @30 - png_get_gAMA_fixed @31 - png_get_hIST @32 - png_get_header_ver @33 - png_get_header_version @34 - png_get_iCCP @35 - png_get_image_height @36 - png_get_image_width @37 - png_get_interlace_type @38 - png_get_io_ptr @39 - png_get_libpng_ver @40 - png_get_oFFs @41 - png_get_pCAL @42 - png_get_pHYs @43 - png_get_pixel_aspect_ratio @44 - png_get_pixels_per_meter @45 - png_get_progressive_ptr @46 - png_get_rgb_to_gray_status @47 - png_get_rowbytes @48 - png_get_rows @49 - png_get_sBIT @50 - png_get_sCAL @51 - png_get_sPLT @52 - png_get_sRGB @53 - png_get_signature @54 - png_get_tIME @55 - png_get_tRNS @56 - png_get_text @57 - png_get_unknown_chunks @58 - png_get_user_chunk_ptr @59 - png_get_user_transform_ptr @60 - png_get_valid @61 - png_get_x_offset_microns @62 - png_get_x_offset_pixels @63 - png_get_x_pixels_per_meter @64 - png_get_y_offset_microns @65 - png_get_y_offset_pixels @66 - png_get_y_pixels_per_meter @67 - png_malloc @68 - png_memcpy_check @69 - png_memset_check @70 -; png_permit_empty_plte is deprecated - png_permit_empty_plte @71 - png_process_data @72 - png_progressive_combine_row @73 - png_read_end @74 - png_read_image @75 - png_read_info @76 -; png_read_init is deprecated - png_read_init @77 - png_read_png @78 - png_read_row @79 - png_read_rows @80 - png_read_update_info @81 - png_reset_zstream @82 - png_set_IHDR @83 - png_set_PLTE @84 - png_set_bKGD @85 - png_set_background @86 - png_set_bgr @87 - png_set_cHRM @88 - png_set_cHRM_fixed @89 - png_set_compression_buffer_size @90 - png_set_compression_level @91 - png_set_compression_mem_level @92 - png_set_compression_method @93 - png_set_compression_strategy @94 - png_set_compression_window_bits @95 - png_set_crc_action @96 - png_set_dither @97 - png_set_error_fn @98 - png_set_expand @99 - png_set_filler @100 - png_set_filter @101 - png_set_filter_heuristics @102 - png_set_flush @103 - png_set_gAMA @104 - png_set_gAMA_fixed @105 - png_set_gamma @106 - png_set_gray_1_2_4_to_8 @107 - png_set_gray_to_rgb @108 - png_set_hIST @109 - png_set_iCCP @110 - png_set_interlace_handling @111 - png_set_invert_alpha @112 - png_set_invert_mono @113 - png_set_keep_unknown_chunks @114 - png_set_oFFs @115 - png_set_pCAL @116 - png_set_pHYs @117 - png_set_packing @118 - png_set_packswap @119 - png_set_palette_to_rgb @120 - png_set_progressive_read_fn @121 - png_set_read_fn @122 - png_set_read_status_fn @123 - png_set_read_user_chunk_fn @124 - png_set_read_user_transform_fn @125 - png_set_rgb_to_gray @126 - png_set_rgb_to_gray_fixed @127 - png_set_rows @128 - png_set_sBIT @129 - png_set_sCAL @130 - png_set_sPLT @131 - png_set_sRGB @132 - png_set_sRGB_gAMA_and_cHRM @133 - png_set_shift @134 - png_set_sig_bytes @135 - png_set_strip_16 @136 - png_set_strip_alpha @137 - png_set_swap @138 - png_set_swap_alpha @139 - png_set_tIME @140 - png_set_tRNS @141 - png_set_tRNS_to_alpha @142 - png_set_text @143 - png_set_unknown_chunk_location @144 - png_set_unknown_chunks @145 - png_set_user_transform_info @146 - png_set_write_fn @147 - png_set_write_status_fn @148 - png_set_write_user_transform_fn @149 - png_sig_cmp @150 - png_start_read_image @151 - png_warning @152 - png_write_chunk @153 - png_write_chunk_data @154 - png_write_chunk_end @155 - png_write_chunk_start @156 - png_write_end @157 - png_write_flush @158 - png_write_image @159 - png_write_info @160 - png_write_info_before_PLTE @161 -; png_write_init is deprecated - png_write_init @162 - png_write_png @163 - png_write_row @164 - png_write_rows @165 -; png_read_init_2 and png_write_init_2 are deprecated. - png_read_init_2 @166 - png_write_init_2 @167 - png_access_version_number @168 -; png_sig_bytes @169 -; png_libpng_ver @170 - png_init_io @171 - png_convert_to_rfc1123 @172 - png_set_invalid @173 -; Added at version 1.0.12 -; For compatiblity with 1.0.7-1.0.11 - png_info_init @174 - png_read_init_3 @175 - png_write_init_3 @176 - png_info_init_3 @177 - png_destroy_struct @178 -; Added at version 1.2.0 -; For use with PNG_USER_MEM_SUPPORTED - png_destroy_struct_2 @179 - png_create_read_struct_2 @180 - png_create_write_struct_2 @181 - png_malloc_default @182 - png_free_default @183 -; MNG features - png_permit_mng_features @184 -; MMX support - png_mmx_support @185 - png_get_mmx_flagmask @186 - png_get_asm_flagmask @187 - png_get_asm_flags @188 - png_get_mmx_bitdepth_threshold @189 - png_get_mmx_rowbytes_threshold @190 - png_set_asm_flags @191 - png_init_mmx_flags @192 -; Strip error numbers - png_set_strip_error_numbers @193 -; Added at version 1.2.2 - png_handle_as_unknown @194 -; Added at version 1.2.2 and deleted from 1.2.3 -; png_zalloc @195 -; png_zfree @196 -; Added at version 1.2.4 - png_malloc_warn @195 diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/zlib.def b/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/zlib.def deleted file mode 100644 index 022aa45..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/zlib.def +++ /dev/null @@ -1,45 +0,0 @@ -LIBRARY -DESCRIPTION "zlib compression library for Windows" - -EXPORTS - adler32 @1 - compress @2 - crc32 @3 - deflate @4 - deflateCopy @5 - deflateEnd @6 - deflateInit2_ @7 - deflateInit_ @8 - deflateParams @9 - deflateReset @10 - deflateSetDictionary @11 - gzclose @12 - gzdopen @13 - gzerror @14 - gzflush @15 - gzopen @16 - gzread @17 - gzwrite @18 - inflate @19 - inflateEnd @20 - inflateInit2_ @21 - inflateInit_ @22 - inflateReset @23 - inflateSetDictionary @24 - inflateSync @25 - uncompress @26 - zlibVersion @27 - gzprintf @28 - gzputc @29 - gzgetc @30 - gzseek @31 - gzrewind @32 - gztell @33 - gzeof @34 - gzsetparams @35 - zError @36 - inflateSyncPoint @37 - get_crc_table @38 - compress2 @39 - gzputs @40 - gzgets @41 diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/zlib.dsp b/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/zlib.dsp deleted file mode 100644 index df9a5db..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/msvc/zlib.dsp +++ /dev/null @@ -1,441 +0,0 @@ -# Microsoft Developer Studio Project File - Name="zlib" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=zlib - Win32 DLL -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "zlib.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "zlib.mak" CFG="zlib - Win32 DLL" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "zlib - Win32 DLL" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "zlib - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "zlib - Win32 DLL ASM" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "zlib - Win32 DLL Debug ASM" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "zlib - Win32 LIB" (based on "Win32 (x86) Static Library") -!MESSAGE "zlib - Win32 LIB Debug" (based on "Win32 (x86) Static Library") -!MESSAGE "zlib - Win32 DLL VB" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" - -!IF "$(CFG)" == "zlib - Win32 DLL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir ".\win32\zlib\dll" -# PROP Intermediate_Dir ".\win32\zlib\dll" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /FD /c -# ADD CPP /nologo /MD /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ZLIB_DLL" /FD /c -MTL=midl.exe -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /dll /machine:I386 -# ADD LINK32 /nologo /dll /machine:I386 -# SUBTRACT LINK32 /pdb:none - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir ".\win32\zlib\dll_dbg" -# PROP Intermediate_Dir ".\win32\zlib\dll_dbg" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /D "DEBUG" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ZLIB_DLL" /FD /GZ /c -MTL=midl.exe -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 /nologo /dll /debug /machine:I386 /out:".\win32\zlib\dll_dbg\zlibd.dll" - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir ".\win32\zlib\dll_asm" -# PROP Intermediate_Dir ".\win32\zlib\dll_asm" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /c -# ADD CPP /nologo /MD /W3 /O1 /I "..\..\..\zlib" /D "NDEBUG" /D "WIN32" /D "_WIN32" /D "_WINDOWS" /D "ZLIB_DLL" /D "DYNAMIC_CRC_TABLE" /D "ASMV" /FAcs /FD /c -MTL=midl.exe -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /i "..\.." /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /dll /machine:I386 -# ADD LINK32 gvmat32.obj /nologo /dll /machine:I386 /out:".\win32\zlib\dll_asm\zliba.dll" -# SUBTRACT LINK32 /pdb:none - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug ASM" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir ".\win32\zlib\dll_dbga" -# PROP Intermediate_Dir ".\win32\zlib\dll_dbga" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MDd /W3 /Zi /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Zi /Od /I "..\..\..\zlib" /D "_DEBUG" /D "WIN32" /D "_WIN32" /D "_WINDOWS" /D "ZLIB_DLL" /D "DYNAMIC_CRC_TABLE" /D "ASMV" /FAcs /FD /GZ /c -MTL=midl.exe -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /i "..\.." /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 gvmat32d.obj /nologo /dll /debug /machine:I386 /out:".\win32\zlib\dll_dbga\zlibb.dll" - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir ".\win32\zlib\lib" -# PROP Intermediate_Dir ".\win32\zlib\lib" -# PROP Target_Dir "" -MTL=midl.exe -CPP=cl.exe -# ADD BASE CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_LIB" /FD /c -# ADD CPP /nologo /W3 /O1 /D "WIN32" /D "NDEBUG" /FD /c -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir ".\win32\zlib\lib_dbg" -# PROP Intermediate_Dir ".\win32\zlib\lib_dbg" -# PROP Target_Dir "" -MTL=midl.exe -CPP=cl.exe -# ADD BASE CPP /nologo /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_LIB" /FD /GZ /c -# ADD CPP /nologo /W3 /Zi /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL VB" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "zlib___Win32_DLL_VB" -# PROP BASE Intermediate_Dir "zlib___Win32_DLL_VB" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir ".\win32\zlib\dll_vb" -# PROP Intermediate_Dir ".\win32\zlib\dll_vb" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -CPP=cl.exe -# ADD BASE CPP /nologo /MD /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ZLIB_DLL" /FD /c -# ADD CPP /nologo /Gd /MD /W3 /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ZLIB_DLL" /FD /c -MTL=midl.exe -RSC=rc.exe -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /dll /machine:I386 -# SUBTRACT BASE LINK32 /pdb:none -# ADD LINK32 /nologo /dll /machine:I386 /out:".\win32\zlib\dll_vb/zlibvb.dll" -# SUBTRACT LINK32 /pdb:none - -!ENDIF - -# Begin Target - -# Name "zlib - Win32 DLL" -# Name "zlib - Win32 DLL Debug" -# Name "zlib - Win32 DLL ASM" -# Name "zlib - Win32 DLL Debug ASM" -# Name "zlib - Win32 LIB" -# Name "zlib - Win32 LIB Debug" -# Name "zlib - Win32 DLL VB" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\..\zlib\adler32.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\compress.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\crc32.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\deflate.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\contrib\asm386\gvmat32c.c - -!IF "$(CFG)" == "zlib - Win32 DLL" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM" - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug ASM" - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL VB" - -# PROP BASE Exclude_From_Build 1 -# PROP Exclude_From_Build 1 - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\gzio.c -# ADD CPP /Yc"zutil.h" -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\infblock.c -# ADD CPP /Yu"zutil.h" -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\infcodes.c -# ADD CPP /Yu"zutil.h" -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\inffast.c -# ADD CPP /Yu"zutil.h" -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\inflate.c -# ADD CPP /Yu"zutil.h" -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\inftrees.c -# ADD CPP /Yu"zutil.h" -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\infutil.c -# ADD CPP /Yu"zutil.h" -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\trees.c -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\uncompr.c -# End Source File -# Begin Source File - -SOURCE=.\zlib.def - -!IF "$(CFG)" == "zlib - Win32 DLL" - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM" - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug ASM" - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL VB" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\msdos\zlib.rc - -!IF "$(CFG)" == "zlib - Win32 DLL" - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM" - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug ASM" - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" - -# PROP Exclude_From_Build 1 - -!ELSEIF "$(CFG)" == "zlib - Win32 DLL VB" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\zutil.c -# ADD CPP /Yu"zutil.h" -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\..\zlib\deflate.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\infblock.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\infcodes.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\inffast.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\inffixed.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\inftrees.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\infutil.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\trees.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\zconf.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\zlib.h -# End Source File -# Begin Source File - -SOURCE=..\..\..\zlib\zutil.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/netware.txt b/gtkmm-osx/trunk/libpng-1.2.5/projects/netware.txt deleted file mode 100644 index 178361d..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/netware.txt +++ /dev/null @@ -1,6 +0,0 @@ -A set of project files is available for Netware. Get -libpng-1.2.5-project-netware.zip from a libpng distribution -site such as http://libpng.sourceforge.net - -Put the zip file in this directory (projects) and then run -"unzip -a libpng-1.2.5-project-netware.zip" diff --git a/gtkmm-osx/trunk/libpng-1.2.5/projects/wince.txt b/gtkmm-osx/trunk/libpng-1.2.5/projects/wince.txt deleted file mode 100644 index a1a26c0..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/projects/wince.txt +++ /dev/null @@ -1,6 +0,0 @@ -A set of project files is available for WinCE. Get -libpng-1.2.5-project-wince.zip from a libpng distribution -site such as http://libpng.sourceforge.net - -Put the zip file in this directory (projects) and then run -"unzip -a libpng-1.2.5-project-wince.zip" diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/SCOPTIONS.ppc b/gtkmm-osx/trunk/libpng-1.2.5/scripts/SCOPTIONS.ppc deleted file mode 100644 index 2c3503e..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/SCOPTIONS.ppc +++ /dev/null @@ -1,7 +0,0 @@ -OPTIMIZE -OPTPEEP -OPTTIME -OPTSCHED -AUTOREGISTER -PARMS=REGISTERS -INCLUDEDIR=hlp:ppc/include diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/descrip.mms b/gtkmm-osx/trunk/libpng-1.2.5/scripts/descrip.mms deleted file mode 100644 index 3584b0d..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/descrip.mms +++ /dev/null @@ -1,52 +0,0 @@ - -cc_defs = /inc=$(ZLIBSRC) -c_deb = - -.ifdef __DECC__ -pref = /prefix=all -.endif - - - -OBJS = png.obj, pngset.obj, pngget.obj, pngrutil.obj, pngtrans.obj,\ - pngwutil.obj, pngread.obj, pngmem.obj, pngwrite.obj, pngrtran.obj,\ - pngwtran.obj, pngrio.obj, pngwio.obj, pngerror.obj, pngpread.obj - - -CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF) - -all : pngtest.exe libpng.olb - @ write sys$output " pngtest available" - -libpng.olb : libpng.olb($(OBJS)) - @ write sys$output " Libpng available" - - -pngtest.exe : pngtest.obj libpng.olb - link pngtest,libpng.olb/lib,$(ZLIBSRC)libz.olb/lib - -test : pngtest.exe - run pngtest - -clean : - delete *.obj;*,*.exe;* - - -# Other dependencies. -png.obj : png.h, pngconf.h -pngpread.obj : png.h, pngconf.h -pngset.obj : png.h, pngconf.h -pngget.obj : png.h, pngconf.h -pngread.obj : png.h, pngconf.h -pngrtran.obj : png.h, pngconf.h -pngrutil.obj : png.h, pngconf.h -pngerror.obj : png.h, pngconf.h -pngmem.obj : png.h, pngconf.h -pngrio.obj : png.h, pngconf.h -pngwio.obj : png.h, pngconf.h -pngtest.obj : png.h, pngconf.h -pngtrans.obj : png.h, pngconf.h -pngwrite.obj : png.h, pngconf.h -pngwtran.obj : png.h, pngconf.h -pngwutil.obj : png.h, pngconf.h - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/libpng-config-body.in b/gtkmm-osx/trunk/libpng-1.2.5/scripts/libpng-config-body.in deleted file mode 100755 index b466432..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/libpng-config-body.in +++ /dev/null @@ -1,96 +0,0 @@ - -usage() -{ - cat < libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo libdir=\"$(LIBPATH)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo R_opts=\"-R$(LIBPATH)\"; \ - echo ccopts=\"-xtarget=ultra\"; \ - echo ldopts=\"-xtarget=ultra\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - -$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) - ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so - -$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) - ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) - -$(LIBNAME).so.$(PNGVER): $(OBJSDLL) - @case "`type ld`" in *ucb*) \ - echo; \ - echo '## WARNING:'; \ - echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ - echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \ - echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \ - echo '## The environment variable LD_LIBRARY_PATH should not be set'; \ - echo '## at all. If it is, things are likely to break because of'; \ - echo '## the libucb dependency that is created.'; \ - echo; \ - ;; \ - esac - $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \ - -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) - -libpng.so.3.$(PNGMIN): $(OBJS) - $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.3 \ - -o libpng.so.3.$(PNGMIN) $(OBJSDLL) - -pngtest: pngtest.o $(LIBNAME).so - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - ./pngtest - -install-headers: png.h pngconf.h - -@if [ ! -d $(DI) ]; then mkdir $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi - cp png.h pngconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h - -@/bin/rm $(DI)/libpng - (cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@/bin/rm -f $(DL)/libpng.a - (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3 - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so - -@/bin/rm -f $(DL)/libpng.so - -@/bin/rm -f $(DL)/libpng.so.3 - -@/bin/rm -f $(DL)/libpng.so.3.$(PNGVER)* - cp $(LIBNAME).so.$(PNGVER) $(DL) - cp libpng.so.3.$(PNGMIN) $(DL) - chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) - chmod 755 $(DL)/libpng.so.3.$(PNGMIN) - (cd $(DL); \ - ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -f -s libpng.so.3 libpng.so; \ - ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ - ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/libpng12.pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/libpng12.pc - chmod 644 $(DL)/pkgconfig/libpng12.pc - (cd $(DL)/pkgconfig; ln -f -s libpng12.pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then mkdir $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi - -@/bin/rm -f $(DM)/man3/libpng.3 - -@/bin/rm -f $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi - -@/bin/rm -f $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then mkdir $(DB); fi - -@/bin/rm -f $(DB)/libpng-config - -@/bin/rm -f $(DB)/libpng12-config - cp libpng-config $(DB)/libpng12-config - chmod 755 $(DB)/libpng12-config - (cd $(DB); ln -sf libpng12-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ - -o pngtesti `$(BINPATH)/libpng12-config --ldflags` \ - $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) - ./pngtesti pngtest.png - -clean: - /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ - libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ - libpng.so.3.$(PNGMIN) \ - libpng.pc - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h - -pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.64sunu b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.64sunu deleted file mode 100644 index a9b40f2..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.64sunu +++ /dev/null @@ -1,224 +0,0 @@ -# makefile for libpng on Solaris 2.x with cc -# Contributed by William L. Sebok, based on makefile.linux -# Copyright (C) 2002 Glenn Randers-Pehrson -# Copyright (C) 1998 Greg Roelofs -# Copyright (C) 1996, 1997 Andreas Dilger -# For conditions of distribution and use, see copyright notice in png.h - -CC=cc -SUN_CC_FLAGS=-fast -xtarget=ultra -xarch=v9 -SUN_LD_FLAGS=-fast -xtarget=ultra -xarch=v9 - -# where make install puts libpng.a, libpng12.so and libpng12/png.h -prefix=/a - -# Where the zlib library and include files are located -# Changing these to ../zlib poses a security risk. If you want -# to have zlib in an adjacent directory, specify the full path instead of "..". -#ZLIBLIB=../zlib -#ZLIBINC=../zlib - -ZLIBLIB=/usr/lib -ZLIBINC=/usr/include - -WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ - -Wmissing-declarations -Wtraditional -Wcast-align \ - -Wstrict-prototypes -Wmissing-prototypes #-Wconversion -CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \ - # $(WARNMORE) -g -DPNG_DEBUG=5 -LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm - -#RANLIB=ranlib -RANLIB=echo - -LIBNAME=libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.5 -PNGVER = $(PNGMAJ).$(PNGMIN) - -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -OBJSDLL = $(OBJS:.o=.pic.o) - -.SUFFIXES: .c .o .pic.o - -.c.pic.o: - $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c - -all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -libpng.pc: - cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo libdir=\"$(LIBPATH)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo R_opts=\"-R$(LIBPATH)\"; \ - echo ccopts=\"-xtarget=ultra -xarch=v9\"; \ - echo ldopts=\"-xtarget=ultra -xarch=v9\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - -$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) - ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so - -$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) - ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) - -$(LIBNAME).so.$(PNGVER): $(OBJSDLL) - @case "`type ld`" in *ucb*) \ - echo; \ - echo '## WARNING:'; \ - echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ - echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \ - echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \ - echo '## The environment variable LD_LIBRARY_PATH should not be set'; \ - echo '## at all. If it is, things are likely to break because of'; \ - echo '## the libucb dependency that is created.'; \ - echo; \ - ;; \ - esac - $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBNAME).so.$(PNGMAJ) \ - -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) - -libpng.so.3.$(PNGMIN): $(OBJSDLL) - $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h libpng.so.3 \ - -o libpng.so.3.$(PNGMIN) $(OBJSDLL) - -pngtest: pngtest.o $(LIBNAME).so - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - ./pngtest - -install-headers: png.h pngconf.h - -@if [ ! -d $(DI) ]; then mkdir $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi - cp png.h pngconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h - -@/bin/rm $(DI)/libpng - (cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@/bin/rm -f $(DL)/libpng.a - (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ).$(PNGVER)* $(DL)/$(LIBNAME).so - -@/bin/rm -f $(DL)/libpng.so - -@/bin/rm -f $(DL)/libpng.so.3 - -@/bin/rm -f $(DL)/libpng.so.3.$(PNGVER)* - cp $(LIBNAME).so.$(PNGVER) $(DL) - cp libpng.so.3.$(PNGMIN) $(DL) - chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) - chmod 755 $(DL)/libpng.so.3.$(PNGMIN) - (cd $(DL); \ - ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -f -s libpng.so.3 libpng.so; \ - ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ - ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then mkdir $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi - -@/bin/rm -f $(DM)/man3/libpng.3 - -@/bin/rm -f $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi - -@/bin/rm -f $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then mkdir $(DB); fi - -@/bin/rm -f $(DB)/libpng-config - -@/bin/rm -f $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ - -o pngtesti `$(BINPATH)/libpng12-config --ldflags ` \ - $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) - ./pngtesti pngtest.png - -clean: - /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ - libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ - libpng.so.3.$(PNGMIN) \ - libpng.pc - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h - -pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.acorn b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.acorn deleted file mode 100644 index 470cf89..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.acorn +++ /dev/null @@ -1,51 +0,0 @@ -# Project: libpng - - -# Toolflags: -CCflags = -c -depend !Depend -IC:,Zlib: -g -throwback -DRISCOS -fnah -C++flags = -c -depend !Depend -IC: -throwback -Linkflags = -aif -c++ -o $@ -ObjAsmflags = -throwback -NoCache -depend !Depend -CMHGflags = -LibFileflags = -c -l -o $@ -Squeezeflags = -o $@ - - -# Final targets: -@.libpng-lib: @.o.png @.o.pngerror @.o.pngrio @.o.pngwio @.o.pngmem \ - @.o.pngpread @.o.pngset @.o.pngget @.o.pngread @.o.pngrtran \ - @.o.pngrutil @.o.pngtrans @.o.pngwrite @.o.pngwtran @.o.pngwutil - LibFile $(LibFileflags) @.o.png @.o.pngerror @.o.pngrio @.o.pngrtran \ - @.o.pngmem @.o.pngpread @.o.pngset @.o.pngget @.o.pngread @.o.pngwio \ - @.o.pngrutil @.o.pngtrans @.o.pngwrite @.o.pngwtran @.o.pngwutil -@.mm-libpng-lib: @.mm.png @.mm.pngerror @.mm.pngrio @.mm.pngwio @.mm.pngmem \ - @.mm.pngpread @.mm.pngset @.mm.pngget @.mm.pngread @.mm.pngrtran \ - @.mm.pngrutil @.mm.pngtrans @.mm.pngwrite @.mm.pngwtran @.mm.pngwutil - LibFile $(LibFileflags) @.mm.png @.mm.pngerror @.mm.pngrio \ - @.mm.pngwio @.mm.pngmem @.mm.pngpread @.mm.pngset @.mm.pngget \ - @.mm.pngread @.mm.pngrtran @.mm.pngrutil @.mm.pngtrans @.mm.pngwrite \ - @.mm.pngwtran @.mm.pngwutil - - -# User-editable dependencies: -# (C) Copyright 1997 Tom Tanner -Test: @.pngtest - .pngtest - @remove .pngtest - -#It would be nice if you could stop "make" listing from here on! -@.pngtest: @.o.pngtest @.libpng-lib C:o.Stubs Zlib:zlib_lib - Link $(Linkflags) @.o.pngtest @.libpng-lib C:o.Stubs Zlib:zlib_lib - -.SUFFIXES: .o .mm .c - -.c.mm: - MemCheck.CC cc $(ccflags) -o $@ LibPng:$< -.c.o: - cc $(ccflags) -o $@ $< - - -# Static dependencies: - - -# Dynamic dependencies: diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.aix b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.aix deleted file mode 100644 index 29cc6eb..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.aix +++ /dev/null @@ -1,104 +0,0 @@ -# makefile for libpng using gcc (generic, static library) -# Copyright (C) 2002 Glenn Randers-Pehrson -# Copyright (C) 2000 Cosmin Truta -# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc) -# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. -# For conditions of distribution and use, see copyright notice in png.h - -# Location of the zlib library and include files -ZLIBINC = ../zlib -ZLIBLIB = ../zlib - -# Compiler, linker, lib and other tools -CC = gcc -LD = $(CC) -AR = ar rcs -RANLIB = ranlib -RM = rm -f - -LIBNAME=libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.5 -PNGVER = $(PNGMAJ).$(PNGMIN) - -prefix=/usr/local -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DI=$(DESTDIR)/$(INCPATH) -DL=$(DESTDIR)/$(LIBPATH) - -CDEBUG = -g -DPNG_DEBUG=5 -LDDEBUG = -CRELEASE = -O2 -LDRELEASE = -s -WARNMORE=-Wall -CFLAGS = -I$(ZLIBINC) $(WARNMORE) $(CRELEASE) -LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm $(LDRELEASE) - -# File extensions -O=.o -A=.a -E= - -# Variables -OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \ - pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \ - pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) - -# Targets -all: libpng$(A) pngtest$(E) - -$(LIBNAME)$(A): $(OBJS) - $(AR) $@ $(OBJS) - $(RANLIB) $@ - -test: pngtest$(E) - ./pngtest$(E) - -pngtest$(E): pngtest$(O) $(LIBNAME)$(A) - $(LD) -o $@ pngtest$(O) $(LDFLAGS) - -install: $(LIBNAME)$(A) - -@if [ ! -d $(DI) ]; then mkdir $(DI); fi - -@if [ ! -d $(DI)/libpng ]; then mkdir $(DI)/libpng; fi - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - -@rm $(DI)/png.h - -@rm $(DI)/pngconf.h - cp png.h pngconf.h $(DI)/libpng - chmod 644 $(DI)/libpng/png.h \ - cp $(LIBNAME)$(A) $(DL) - (cd $(DL); ln -f -s $(LIBNAME)$(A) libpng$(A)) - $(DI)/libpng/pngconf.h - (cd $(DI); ln -f -s libpng/* .;) - -clean: - /bin/rm -f *.o $(LIBNAME)$(A) pngtest pngout.png - -png$(O): png.h pngconf.h -pngerror$(O): png.h pngconf.h -pngget$(O): png.h pngconf.h -pngmem$(O): png.h pngconf.h -pngpread$(O): png.h pngconf.h -pngread$(O): png.h pngconf.h -pngrio$(O): png.h pngconf.h -pngrtran$(O): png.h pngconf.h -pngrutil$(O): png.h pngconf.h -pngset$(O): png.h pngconf.h -pngtest$(O): png.h pngconf.h -pngtrans$(O): png.h pngconf.h -pngwio$(O): png.h pngconf.h -pngwrite$(O): png.h pngconf.h -pngwtran$(O): png.h pngconf.h -pngwutil$(O): png.h pngconf.h - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.amiga b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.amiga deleted file mode 100644 index 79cb424..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.amiga +++ /dev/null @@ -1,48 +0,0 @@ -# Commodore Amiga Makefile -# makefile for libpng and SAS C V6.5x compiler -# Copyright (C) 1995-2000 Wolf Faust -# For conditions of distribution and use, see copyright notice in png.h -# -# Note: Use #define PNG_READ_BIG_ENDIAN_SUPPORTED in pngconf.h -# -# Location/path of zlib include files -ZLIB=/zlib -#compiler -CC=sc -#compiler flags -# WARNING: a bug in V6.51 causes bad code with OPTGO -# So use V6.55 or set NOOPTGO!!!!!!!!! -CFLAGS= NOSTKCHK PARMS=REG OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL\ - OPTLOOP OPTRDEP=4 OPTDEP=4 OPTCOMP=4 INCLUDEDIR=$(ZLIB) \ - DEFINE=PNG_INTERNAL -#linker flags -LDFLAGS= SD ND BATCH -#link libs -LDLIBS= libpng.lib libgz.lib LIB:scm.lib LIB:sc.lib Lib:amiga.lib -# linker -LN= slink -# file deletion command -RM= delete quiet -# library (.lib) file creation command -AR= oml -# make directory command -MKDIR= makedir - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -all: libpng.lib pngtest - -libpng.lib: $(OBJS) --$(RM) libpng.lib -$(AR) libpng.lib r $(OBJS) - -pngtest: pngtest.o libpng.lib -$(LN) libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - -$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) - ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so - cp $(LIBNAME).so* /boot/home/config/lib - -$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) - ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) - -$(LIBNAME).so.$(PNGVER): $(OBJSDLL) - $(CC) -nostart -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) -o \ - $(LIBNAME).so.$(PNGVER) $(OBJSDLL) - -libpng.so.3.$(PNGMIN): $(OBJSDLL) - $(CC) -nostart -Wl,-soname,libpng.so.3 -o \ - libpng.so.3.$(PNGMIN) $(OBJSDLL) - -pngtest: pngtest.o $(LIBNAME).so - $(CC) -L$(ZLIBLIB) -lz -lpng12 -o pngtest pngtest.o - -test: pngtest - ./pngtest - -install-headers: png.h pngconf.h - -@if [ ! -d $(DI) ]; then mkdir $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi - cp png.h pngconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h - -@/bin/rm -f $(DI)/libpng - (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@/bin/rm -f $(DL)/libpng.a - (cd $(DL); ln -sf $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so - -@/bin/rm -f $(DL)/libpng.so - -@/bin/rm -f $(DL)/libpng.so.3 - -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* - cp $(LIBNAME).so.$(PNGVER) $(DL) - cp libpng.so.3.$(PNGMIN) $(DL) - chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) - chmod 755 $(DL)/libpng.so.3.$(PNGMIN) - (cd $(DL); \ - ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -sf libpng.so.3 libpng.so; \ - ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ - ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then mkdir $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi - -@/bin/rm -f $(DM)/man3/libpng.3 - -@/bin/rm -f $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi - -@/bin/rm -f $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then mkdir $(DB); fi - -@/bin/rm -f $(DB)/libpng-config - -@/bin/rm -f $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. - -test-installed: - $(CC) $(CFLAGS) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ - -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/libpng12-config --ldflags` - ./pngtesti pngtest.png - -clean: - /bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \ - $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtesti \ - libpng.so.3.$(PNGMIN) \ - libpng.pc - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h -pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.bor b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.bor deleted file mode 100644 index a5651aa..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.bor +++ /dev/null @@ -1,162 +0,0 @@ -# Makefile for libpng -# 16-bit Borland C++ (Note: All modules are compiled in C mode) -# To build the library, do: -# "make -fmakefile.bor -DMODEL=c" -# or: "make -fmakefile.bor -DMODEL=l" -# -# ------------ Borland C++ ------------ - -### Absolutely necessary for this makefile to work -.AUTODEPEND - -## Where zlib.h, zconf.h and zlib_MODEL.lib are -ZLIB_DIR=..\zlib - - -## Compiler, linker and lib stuff -CC=bcc -LD=bcc -LIB=tlib - -!ifndef MODEL -MODEL=l -!endif - -MODEL_ARG=-m$(MODEL) - -#TARGET_CPU=3 -# 2 = 286, 3 = 386, etc. -!ifndef TARGET_CPU -TARGET_CPU=2 -!endif - -# Use this if you don't want Borland's fancy exception handling -# (for Borland C++ 4.0 or later) -#NOEHLIB=noeh$(MODEL).lib - -!ifdef DEBUG -CDEBUG=-v -LDEBUG=-v -!else -CDEBUG= -LDEBUG= -!endif - -# STACKOFLOW=1 -!ifdef STACKOFLOW -CDEBUG=$(CDEBUG) -N -LDEBUG=$(LDEBUG) -N -!endif - -# -X- turn on dependency generation in the object file -# -w set all warnings on -# -O2 optimize for speed -# -Z global optimization -CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG) - -# -M generate map file -LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG) - - -## Variables -OBJS = \ - png.obj \ - pngerror.obj \ - pngget.obj \ - pngmem.obj \ - pngpread.obj \ - pngread.obj \ - pngrio.obj \ - pngrtran.obj \ - pngrutil.obj \ - pngset.obj \ - pngtrans.obj \ - pngwio.obj \ - pngwrite.obj \ - pngwtran.obj \ - pngwutil.obj - -LIBOBJS = \ - +png.obj \ - +pngerror.obj \ - +pngget.obj \ - +pngmem.obj \ - +pngpread.obj \ - +pngread.obj \ - +pngrio.obj \ - +pngrtran.obj \ - +pngrutil.obj \ - +pngset.obj \ - +pngtrans.obj \ - +pngwio.obj \ - +pngwrite.obj \ - +pngwtran.obj \ - +pngwutil.obj - -LIBNAME=libpng$(MODEL).lib - - -## Implicit rules -# Braces let make "batch" calls to the compiler, -# 2 calls instead of 12; space is important. -.c.obj: - $(CC) $(CFLAGS) -c {$*.c } - -.c.exe: - $(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB) - - -## Major targets -all: libpng pngtest - -libpng: $(LIBNAME) - -pngtest: pngtest$(MODEL).exe - -test: pngtest$(MODEL).exe - pngtest$(MODEL) - - -## Minor Targets - -png.obj: png.c -pngerror.obj: pngerror.c -pngget.obj: pngget.c -pngmem.obj: pngmem.c -pngpread.obj: pngpread.c -pngread.obj: pngread.c -pngrio.obj: pngrio.c -pngrtran.obj: pngrtran.c -pngrutil.obj: pngrutil.c -pngset.obj: pngset.c -pngtrans.obj: pngtrans.c -pngwio.obj: pngwio.c -pngwrite.obj: pngwrite.c -pngwtran.obj: pngwtran.c -pngwutil.obj: pngwutil.c - - -$(LIBNAME): $(OBJS) - -del $(LIBNAME) - $(LIB) $(LIBNAME) @&&| -$(LIBOBJS), libpng$(MODEL) -| - - -pngtest$(MODEL).obj: pngtest.c - $(CC) $(CFLAGS) -opngtest$(MODEL) -c pngtest.c - -pngtest$(MODEL).exe: pngtest$(MODEL).obj - $(LD) $(LDFLAGS) pngtest$(MODEL).obj $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB) - - -# Clean up anything else you want -clean: - -del *.obj - -del *.exe - -del *.lib - -del *.lst - -del *.map - - -# End of makefile for libpng diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.cygwin b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.cygwin deleted file mode 100644 index a282bef..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.cygwin +++ /dev/null @@ -1,305 +0,0 @@ -# makefile for cygwin on x86 -# Builds both dll (with import lib) and static lib versions -# of the library, and builds two copies of pngtest: one -# statically linked and one dynamically linked. -# -# Copyright (C) 2002 Soren Anderson, Charles Wilson, and Glenn Randers-Pehrson -# based on makefile for linux-elf w/mmx by: -# Copyright (C) 1998-2000 Greg Roelofs -# Copyright (C) 1996, 1997 Andreas Dilger -# For conditions of distribution and use, see copyright notice in png.h - -# This makefile intends to support building outside the src directory -# if desired. When invoking it, specify an argument to SRCDIR on the -# command line that points to the top of the directory where your source -# is located. - -ifdef SRCDIR -VPATH = $(SRCDIR) -else -SRCDIR = . -endif - -# Override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. - -DESTDIR= - -# To enable assembler optimizations, add '-DPNG_USE_PNGGCCRD' to -# $CFLAGS, and include pnggccrd.o in $OBJS, below, and in the dependency -# list at the bottom of this makefile. - -CC=gcc -ifdef MINGW -MINGW_CCFLAGS=-mno-cygwin -I/usr/include/mingw -MINGW_LDFLAGS=-mno-cygwin -L/usr/lib/mingw -endif - -# Where "make install" puts libpng*.a, *png*.dll, png.h, and pngconf.h -ifndef prefix -prefix=/usr -$(warning You haven't specified a 'prefix=' location. Defaulting to "/usr") -endif - -# Where the zlib library and include files are located -ZLIBLIB= /usr/lib -ZLIBINC= -#ZLIBLIB=../zlib -#ZLIBINC=../zlib - -ALIGN= -# for i386: -#ALIGN=-malign-loops=2 -malign-functions=2 - -WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ - -Wmissing-declarations -Wtraditional -Wcast-align \ - -Wstrict-prototypes -Wmissing-prototypes #-Wconversion - -### if you use the asm, add pnggccrd.o to the OBJS list -### -### if you don't need thread safety, but want the asm accel -#CFLAGS= $(strip $(MINGW_CCFLAGS) -DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD \ -# $(addprefix -I,$(ZLIBINC)) -Wall -O3 $(ALIGN) -funroll-loops \ -# -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5 -### if you need thread safety and want (minimal) asm accel -#CFLAGS= $(strip $(MINGW_CCFLAGS) -DPNG_USE_PNGGCCRD $(addprefix -I,$(ZLIBINC)) \ -# -Wall -O3 $(ALIGN) -funroll-loops \ -# -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5 -### Normal (non-asm) compilation -CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \ - -Wall -O3 $(ALIGN) -funroll-loops \ - -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5 - -LIBNAME = libpng12 -PNGMAJ = 0 -CYGDLL = 12 -PNGMIN = 1.2.5 -PNGVER = $(PNGMAJ).$(PNGMIN) - -SHAREDLIB=cygpng$(CYGDLL).dll -STATLIB=libpng.a -IMPLIB=libpng.dll.a -SHAREDDEF=libpng.def -LIBS=$(SHAREDLIB) $(STATLIB) -EXE=.exe - -LDFLAGS=$(strip -L. $(MINGW_LDFLAGS) -lpng $(addprefix -L,$(ZLIBLIB)) -lz) -LDSFLAGS=$(strip -shared -L. $(MINGW_LDFLAGS) -Wl,--export-all) -LDEXTRA=-Wl,--out-implib=$(IMPLIB) $(addprefix -L,$(ZLIBLIB)) -lz - -MKDIR=/bin/mkdir -pv -RANLIB=ranlib -#RANLIB=echo - -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib - -BINPATH=$(prefix)/bin -MANPATH=$(prefix)/man -MAN3PATH=$(MANPATH)/man3 -MAN5PATH=$(MANPATH)/man5 - -# cosmetic: shortened strings: -S =$(SRCDIR) -D =$(DESTDIR) -DB =$(D)$(BINPATH) -DI =$(D)$(INCPATH) -DL =$(D)$(LIBPATH) - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o # pnggccrd.o - -OBJSDLL = $(OBJS:.o=.pic.o) - -.SUFFIXES: .c .o .pic.o - -%.o : %.c - $(CC) -c $(CFLAGS) -o $@ $< -%.pic.o : CFLAGS += -DPNG_BUILD_DLL -%.pic.o : %.c - $(CC) -c $(CFLAGS) -o $@ $< - -all: all-static all-shared libpng.pc libpng-config libpng.pc libpng-config - -# Make this to verify that "make [...] install" will do what you want. -buildsetup-tell: - @echo VPATH is set to: \"$(VPATH)\" - @echo prefix is set to: \"$(prefix)\" - @echo -e INCPATH,LIBPATH, etc. are set to:'\n' \ - $(addprefix $(D),$(INCPATH)'\n' $(LIBPATH)'\n' $(BINPATH)'\n' \ - $(MANPATH)'\n' $(MAN3PATH)'\n' $(MAN5PATH)'\n')'\n' - -libpng.pc: scripts/libpng.pc.in - @echo -e Making pkg-config file for this libpng installation..'\n' \ - using PREFIX=\"$(prefix)\"'\n' - cat $(S)/scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! | \ - sed -e s/-lm// > libpng.pc - -libpng-config: scripts/libpng-config-head.in scripts/libpng-config-body.in - @echo -e Making $(LIBNAME) libpng-config file for this libpng \ - installation..'\n' using PREFIX=\"$(prefix)\"'\n' - ( cat $(S)/scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo libs=\"-lpng$(CYGDLL) -lz\"; \ - cat $(S)/scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - -static: all-static -shared: all-shared -all-static: $(STATLIB) pngtest-stat$(EXE) -all-shared: $(SHAREDLIB) pngtest$(EXE) - -pnggccrd.o: pnggccrd.c png.h pngconf.h - @echo "" - @echo ' You can ignore the "control reaches end of non-void function"' - @echo ' warning and " defined but not used" warnings:' - @echo "" - $(CC) -c $(CFLAGS) -o $@ $< - -pnggccrd.pic.o: pnggccrd.c png.h pngconf.h - @echo "" - @echo ' You can ignore the "control reaches end of non-void function"' - @echo ' warning and " defined but not used" warnings:' - @echo "" - $(CC) -c $(CFLAGS) -DPNG_BUILD_DLL -o $@ $< - -$(STATLIB): $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -$(SHAREDDEF): projects/msvc/png32ms.def - cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' | \ - sed -e 's/\([^;]*\);/;/' > $@ - -$(SHAREDLIB): $(OBJSDLL) $(SHAREDDEF) - $(CC) $(LDSFLAGS) -o $@ $(OBJSDLL) -L. $(LDEXTRA) - -pngtest$(EXE): pngtest.pic.o $(SHAREDLIB) - $(CC) $(CFLAGS) $< $(LDFLAGS) -o $@ - -pngtest-stat$(EXE): pngtest.o $(STATLIB) - $(CC) -static $(CFLAGS) $< $(LDFLAGS) -o $@ - -pngtest.pic.o: pngtest.c - $(CC) $(CFLAGS) -c $< -o $@ - -pngtest.o: pngtest.c - $(CC) $(CFLAGS) -c $< -o $@ - -test: test-static test-shared - -test-static: pngtest-stat$(EXE) - ./pngtest-stat $(S)/pngtest.png - -test-shared: pngtest$(EXE) - ./pngtest $(S)/pngtest.png - -install-static: $(STATLIB) install-headers install-man - -@if [ ! -d $(DL) ]; then $(MKDIR) $(DL); fi - install -m 644 $(STATLIB) $(DL)/$(LIBNAME).a - -@rm -f $(DL)/$(STATLIB) - (cd $(DL); ln -sf $(LIBNAME).a $(STATLIB)) - -install-shared: $(SHAREDLIB) libpng.pc libpng-config install-headers install-man - -@if [ ! -d $(DL) ]; then $(MKDIR) $(DL); fi - -@if [ ! -d $(DB) ]; then $(MKDIR) $(DB); fi - -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR) $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc - install -m 644 $(IMPLIB) $(DL)/$(LIBNAME).dll.a - -@rm -f $(DL)/$(IMPLIB) - (cd $(DL); ln -sf $(LIBNAME).dll.a $(IMPLIB)) - install -s -m 755 $(SHAREDLIB) $(DB) - install -m 644 libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) - -install-headers: - -@if [ ! -d $(DI) ]; then $(MKDIR) $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR) $(DI)/$(LIBNAME); fi - -@rm -f $(DI)/png.h - -@rm -f $(DI)/pngconf.h - install -m 644 $(S)/png.h $(S)/pngconf.h $(DI)/$(LIBNAME) - -@rm -f $(DI)/libpng - (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) - -install-man: - -@if [ ! -d $(D)$(MAN3PATH) ]; then $(MKDIR) $(D)$(MAN3PATH); fi - -@if [ ! -d $(D)$(MAN5PATH) ]; then $(MKDIR) $(D)$(MAN5PATH); fi - install -m 644 $(S)/libpngpf.3 $(S)/libpng.3 $(D)$(MAN3PATH) - install -m 644 $(S)/png.5 $(D)$(MAN5PATH) - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then mkdir $(DB); fi - -@/bin/rm -f $(DB)/libpng-config - -@/bin/rm -f $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) - -# Run this to verify that a future `configure' run will pick up the settings -# you want. -test-config-install: SHELL=/bin/bash -test-config-install: $(DB)/libpng-config - @echo -e Testing libpng-config functions...'\n' - @ for TYRA in LDFLAGS CPPFLAGS CFLAGS LIBS VERSION; \ - do \ - printf "(%d)\t %10s =%s\n" $$(($$gytiu + 1)) $$TYRA \ - "$$($(DB)/libpng-config `echo --$$TYRA |tr '[:upper:]' '[:lower:]'`)"; \ - gytiu=$$(( $$gytiu + 1 )); \ - done - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. - -test-installed: - $(CC) $(CFLAGS) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ - -L$(ZLIBLIB) \ - -o pngtesti$(EXE) `$(BINPATH)/libpng12-config --ldflags` - ./pngtesti$(EXE) pngtest.png - -clean: - /bin/rm -f *.pic.o *.o $(STATLIB) $(IMPLIB) $(SHAREDLIB) \ - pngtest-stat$(EXE) pngtest$(EXE) pngout.png $(SHAREDDEF) \ - libpng-config libpng.pc pngtesti$(EXE) - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -.PHONY: buildsetup-tell libpng.pc libpng-config test-config-install clean - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o png.pic.o: png.h pngconf.h png.c -pngerror.o pngerror.pic.o: png.h pngconf.h pngerror.c -pngrio.o pngrio.pic.o: png.h pngconf.h pngrio.c -pngwio.o pngwio.pic.o: png.h pngconf.h pngwio.c -pngmem.o pngmem.pic.o: png.h pngconf.h pngmem.c -pngset.o pngset.pic.o: png.h pngconf.h pngset.c -pngget.o pngget.pic.o: png.h pngconf.h pngget.c -pngread.o pngread.pic.o: png.h pngconf.h pngread.c -pngrtran.o pngrtran.pic.o: png.h pngconf.h pngrtran.c -pngrutil.o pngrutil.pic.o: png.h pngconf.h pngrutil.c -pngtrans.o pngtrans.pic.o: png.h pngconf.h pngtrans.c -pngwrite.o pngwrite.pic.o: png.h pngconf.h pngwrite.c -pngwtran.o pngwtran.pic.o: png.h pngconf.h pngwtran.c -pngwutil.o pngwutil.pic.o: png.h pngconf.h pngwutil.c -pngpread.o pngpread.pic.o: png.h pngconf.h pngpread.c - -pngtest.o: png.h pngconf.h pngtest.c -pngtest-stat.o: png.h pngconf.h pngtest.c - - - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.darwin b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.darwin deleted file mode 100644 index b04044f..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.darwin +++ /dev/null @@ -1,205 +0,0 @@ -# makefile for libpng on Darwin / Mac OS X -# Copyright (C) 2002 Glenn Randers-Pehrson -# Copyright (C) 2001 Christoph Pfisterer -# derived from makefile.linux: -# Copyright (C) 1998, 1999 Greg Roelofs -# Copyright (C) 1996, 1997 Andreas Dilger -# For conditions of distribution and use, see copyright notice in png.h - -# where "make install" puts libpng.a, libpng12.dylib, png.h and pngconf.h -prefix=/usr/local - -# Where the zlib library and include files are located -#ZLIBLIB=/usr/local/lib -#ZLIBINC=/usr/local/include -ZLIBLIB=../zlib -ZLIBINC=../zlib - -CC=cc -CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops -LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz - -#RANLIB=echo -RANLIB=ranlib - -PNGMAJ = 0 -PNGMIN = 1.2.5 -PNGVER = $(PNGMAJ).$(PNGMIN) -LIBNAME = libpng12 - -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -OBJSDLL = $(OBJS:.o=.pic.o) - -.SUFFIXES: .c .o .pic.o - -.c.pic.o: - $(CC) -c $(CFLAGS) -fno-common -o $@ $*.c - -all: libpng.a $(LIBNAME).dylib pngtest libpng.pc libpng-config - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -libpng.pc: - cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! | \ - sed -e s/-lm// > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - -$(LIBNAME).dylib: $(LIBNAME).$(PNGMAJ).dylib - ln -sf $(LIBNAME).$(PNGMAJ).dylib $(LIBNAME).dylib - -$(LIBNAME).$(PNGMAJ).dylib: $(LIBNAME).$(PNGVER).dylib - ln -sf $(LIBNAME).$(PNGVER).dylib $(LIBNAME).$(PNGMAJ).dylib - -$(LIBNAME).$(PNGVER).dylib: $(OBJSDLL) - $(CC) -dynamiclib \ - -install_name $(DL)/$(LIBNAME).$(PNGMAJ).dylib \ - -flat_namespace -undefined suppress \ - -o $(LIBNAME).$(PNGVER).dylib \ - $(OBJSDLL) - -libpng.3.$(PNGMIN).dylib: $(OBJSDLL) - $(CC) -dynamiclib \ - -install_name $(DL)/libpng.3.dylib \ - -current_version 3 -compatibility_version 3 \ - -flat_namespace -undefined suppress \ - -o libpng.3.$(PNGMIN).dylib \ - $(OBJSDLL) - -pngtest: pngtest.o $(LIBNAME).dylib - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - ./pngtest - -install-headers: png.h pngconf.h - -@if [ ! -d $(DI) ]; then mkdir $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi - cp png.h pngconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h - -@/bin/rm -f $(DI)/libpng - (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@/bin/rm -f $(DL)/libpng.a - (cd $(DL); ln -sf $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBNAME).dylib libpng.pc \ - libpng.3.$(PNGMIN).dylib - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - -@/bin/rm -f $(DL)/$(LIBNAME).$(PNGVER)*.dylib - -@/bin/rm -f $(DL)/$(LIBNAME).dylib - -@/bin/rm -f $(DL)/libpng.dylib - -@/bin/rm -f $(DL)/libpng.3.dylib - -@/bin/rm -f $(DL)/libpng.3.$(PNGMIN)*.dylib - cp $(LIBNAME).$(PNGVER).dylib $(DL) - cp libpng.3.$(PNGMIN).dylib $(DL) - chmod 755 $(DL)/$(LIBNAME).$(PNGVER).dylib - chmod 755 $(DL)/libpng.3.$(PNGMIN).dylib - (cd $(DL); \ - ln -sf libpng.3.$(PNGMIN).dylib libpng.3.dylib; \ - ln -sf libpng.3.dylib libpng.dylib; \ - ln -sf $(LIBNAME).$(PNGVER).dylib $(LIBNAME).$(PNGMAJ).dylib; \ - ln -sf $(LIBNAME).$(PNGMAJ).dylib $(LIBNAME).dylib) - -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then mkdir $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi - -@/bin/rm -f $(DM)/man3/libpng.3 - -@/bin/rm -f $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi - -@/bin/rm -f $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then mkdir $(DB); fi - -@/bin/rm -f $(DB)/libpng-config - -@/bin/rm -f $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. - -test-installed: - $(CC) $(CFLAGS) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ - -L$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/libpng12-config --ldflags` - ./pngtesti pngtest.png - -clean: - rm -f *.o libpng.a pngtest pngout.png libpng-config \ - libpng.3.$(PNGMIN).dylib \ - libpng.pc $(LIBNAME).*dylib pngtesti - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h - -pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.dec b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.dec deleted file mode 100644 index 5d7a11e..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.dec +++ /dev/null @@ -1,185 +0,0 @@ -# makefile for libpng on DEC Alpha Unix -# Copyright (C) 2000-2002 Glenn Randers-Pehrson -# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. -# For conditions of distribution and use, see copyright notice in png.h - -# where make install puts libpng.a and png.h -prefix=/usr/local -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - -# Where the zlib library and include files are located -#ZLIBLIB=/usr/local/lib -#ZLIBINC=/usr/local/include -ZLIBLIB=../zlib -ZLIBINC=../zlib - -PNGMAJ = 0 -PNGMIN = 1.2.5 -PNGVER = $(PNGMAJ).$(PNGMIN) -LIBNAME = libpng12 - -CC=cc -CFLAGS=-std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1 -LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm - -#RANLIB=echo -RANLIB=ranlib - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -all: $(LIBNAME).so libpng.a pngtest libpng.pc libpng-config - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -libpng.pc: - cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo ccopts=\"-std\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - -$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) - ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so - -$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) - ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) - -$(LIBNAME).so.$(PNGVER): $(OBJS) - $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) - -soname $(LIBNAME).so.$(PNGMAJ) - -libpng.so.3.$(PNGMIN): $(OBJS) - $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) - -soname libpng.so.3 - -pngtest: pngtest.o libpng.a - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - ./pngtest - -install-headers: png.h pngconf.h - -@if [ ! -d $(DI) ]; then mkdir $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi - cp png.h pngconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h - -@/bin/rm -f $(DI)/libpng - (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@/bin/rm -f $(DL)/libpng.a - (cd $(DL); ln -sf $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so - -@/bin/rm -f $(DL)/libpng.so - -@/bin/rm -f $(DL)/libpng.so.3 - -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* - cp $(LIBNAME).so.$(PNGVER) $(DL) - cp libpng.so.3.$(PNGMIN) $(DL) - chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) - chmod 755 $(DL)/libpng.so.3.$(PNGMIN) - (cd $(DL); \ - ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -f -s libpng.so.3 libpng.so; \ - ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ - ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then mkdir $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi - -@/bin/rm -f $(DM)/man3/libpng.3 - -@/bin/rm -f $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi - -@/bin/rm -f $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then mkdir $(DB); fi - -@/bin/rm -f $(DB)/libpng-config - -@/bin/rm -f $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) -w1 -I$(ZLIBINC) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ - -L$(ZLIBLIB) -R$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/libpng12-config --ldflags` - ./pngtesti pngtest.png - -clean: - /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ - libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ - libpng.so.3.$(PNGMIN) \ - libpng.pc - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtest.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h -pngpread.o: png.h pngconf.h - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.dj2 b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.dj2 deleted file mode 100644 index 09045c2..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.dj2 +++ /dev/null @@ -1,55 +0,0 @@ -# DJGPP (DOS gcc) makefile for libpng -# Copyright (C) 2002 Glenn Randers-Pehrson -# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. -# For conditions of distribution and use, see copyright notice in png.h - -# where make install will put libpng.a and png.h -#prefix=/usr/local -prefix=. -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib - -CC=gcc -CFLAGS=-I../zlib -O -LDFLAGS=-L. -L../zlib/ -lpng -lz -lm - -RANLIB=ranlib - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o pngwtran.o \ - pngmem.o pngerror.o pngpread.o - -all: libpng.a pngtest - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -pngtest: pngtest.o libpng.a - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - coff2exe pngtest - -test: pngtest - ./pngtest -clean: - rm -f *.o libpng.a pngtest pngout.png - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngpread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtest.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.freebsd b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.freebsd deleted file mode 100644 index d7d5fae..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.freebsd +++ /dev/null @@ -1,48 +0,0 @@ -# makefile for libpng under FreeBSD -# Copyright (C) 2002 Glenn Randers-Pehrson and Andrey A. Chernov -# For conditions of distribution and use, see copyright notice in png.h - -PREFIX?= /usr/local -SHLIB_VER?= 5 - -LIB= png -SHLIB_MAJOR= ${SHLIB_VER} -SHLIB_MINOR= 0 -NOPROFILE= YES -NOOBJ= YES - -# where make install puts libpng.a and png.h -DESTDIR= ${PREFIX} -LIBDIR= /lib -INCS= png.h pngconf.h -INCSDIR= /include/libpng -INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk -MAN= libpng.3 libpngpf.3 png.5 -MANDIR= /man/man -SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \ - libpng/pngconf.h ${INCSDIR}/../pngconf.h -LDADD+= -lm -lz -DPADD+= ${LIBM} ${LIBZ} - -CFLAGS+= -I. -DPNG_USE_PNGGCCRD -.if (${MACHINE_ARCH} != "i386") -CFLAGS+= -DPNG_NO_ASSEMBLER_CODE -.endif - -SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ - pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ - pngwtran.c pngmem.c pngerror.c pngpread.c pnggccrd.c - -pngtest: pngtest.o libpng.a - ${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -lpng -lz -lm - -CLEANFILES= pngtest pngtest.o pngout.png - -test: pngtest - ./pngtest - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -.include diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.gcc b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.gcc deleted file mode 100644 index f7fc368..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.gcc +++ /dev/null @@ -1,66 +0,0 @@ -# makefile for libpng using gcc (generic, static library) -# Copyright (C) 2000 Cosmin Truta -# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. -# For conditions of distribution and use, see copyright notice in png.h - -# Location of the zlib library and include files -ZLIBINC = ../zlib -ZLIBLIB = ../zlib - -# Compiler, linker, lib and other tools -CC = gcc -LD = $(CC) -AR = ar rcs -RANLIB = ranlib -RM = rm -f - -CDEBUG = -g -DPNG_DEBUG=5 -LDDEBUG = -CRELEASE = -O2 -LDRELEASE = -s -CFLAGS = -I$(ZLIBINC) -Wall $(CRELEASE) -LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm $(LDRELEASE) - -# File extensions -O=.o -A=.a -E= - -# Variables -OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \ - pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \ - pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) - -# Targets -all: libpng$(A) pngtest$(E) - -libpng$(A): $(OBJS) - $(AR) $@ $(OBJS) - $(RANLIB) $@ - -test: pngtest$(E) - ./pngtest$(E) - -pngtest$(E): pngtest$(O) libpng$(A) - $(LD) -o $@ pngtest$(O) $(LDFLAGS) - -clean: - $(RM) *$(O) libpng$(A) pngtest$(E) pngout.png - -png$(O): png.h pngconf.h -pngerror$(O): png.h pngconf.h -pngget$(O): png.h pngconf.h -pngmem$(O): png.h pngconf.h -pngpread$(O): png.h pngconf.h -pngread$(O): png.h pngconf.h -pngrio$(O): png.h pngconf.h -pngrtran$(O): png.h pngconf.h -pngrutil$(O): png.h pngconf.h -pngset$(O): png.h pngconf.h -pngtest$(O): png.h pngconf.h -pngtrans$(O): png.h pngconf.h -pngwio$(O): png.h pngconf.h -pngwrite$(O): png.h pngconf.h -pngwtran$(O): png.h pngconf.h -pngwutil$(O): png.h pngconf.h - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.gcmmx b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.gcmmx deleted file mode 100644 index d0dfdd9..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.gcmmx +++ /dev/null @@ -1,249 +0,0 @@ -# makefile for libpng.a and libpng12.so on Linux ELF with gcc using MMX -# assembler code -# Copyright 2002 Greg Roelofs and Glenn Randers-Pehrson -# Copyright 1998-2001 Greg Roelofs -# Copyright 1996-1997 Andreas Dilger -# For conditions of distribution and use, see copyright notice in png.h - -# CAUTION: Do not use this makefile with gcc versions 2.7.2.2 and earlier. - -# WARNING: The assembler code in pnggccrd.c may not be thread safe. - -# NOTE: When testing MMX performance on a multitasking system, make sure -# there are no floating-point programs (e.g., SETI@Home) running in -# the background! Context switches between MMX and FPU are expensive. - -LIBNAME = libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.5 -PNGVER = $(PNGMAJ).$(PNGMIN) - -CC=gcc - -# where "make install" puts libpng12.a, libpng12.so*, -# libpng12/png.h and libpng12/pngconf.h -# Prefix must be a full pathname. -prefix=/usr/local - -# Where the zlib library and include files are located. -#ZLIBLIB=/usr/local/lib -#ZLIBINC=/usr/local/include -ZLIBLIB=../zlib -ZLIBINC=../zlib - -ALIGN= -# for i386: -#ALIGN=-malign-loops=2 -malign-functions=2 - -WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ - -Wmissing-declarations -Wtraditional -Wcast-align \ - -Wstrict-prototypes -Wmissing-prototypes #-Wconversion - -# for pgcc version 2.95.1, -O3 is buggy; don't use it. - -# Remove -DPNG_THREAD_UNSAFE_OK if you need thread safety -### for generic gcc: -CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall \ - -O3 $(ALIGN) -funroll-loops \ - -fomit-frame-pointer # $(WARNMORE) -g -DPNG_DEBUG=5 -### for gcc 2.95.2 on 686: -#CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \ -# -mcpu=i686 -malign-double -ffast-math -fstrict-aliasing \ -# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer -### for gcc 2.7.2.3 on 486 and up: -#CFLAGS=-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD -I$(ZLIBINC) -Wall -O3 \ -# -m486 -malign-double -ffast-math \ -# $(ALIGN) -funroll-loops -funroll-all-loops -fomit-frame-pointer - -LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm -LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm - -RANLIB=ranlib -#RANLIB=echo - -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o pnggccrd.o - -OBJSDLL = $(OBJS:.o=.pic.o) - -.SUFFIXES: .c .o .pic.o - -.c.pic.o: - $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c - -all: libpng.a $(LIBNAME).so pngtest pngtest-static libpng.pc libpng-config - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -libpng.pc: - cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo cppflags=\"-DPNG_THREAD_UNSAFE_OK -DPNG_USE_PNGGCCRD\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - -pnggccrd.o: pnggccrd.c png.h pngconf.h - $(CC) -c $(CFLAGS) -o $@ $*.c - -pnggccrd.pic.o: pnggccrd.c png.h pngconf.h - $(CC) -c $(CFLAGS) -fPIC -o $@ pnggccrd.c - -$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) - ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so - -$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) - ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) - -$(LIBNAME).so.$(PNGVER): $(OBJSDLL) - $(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) \ - -o $(LIBNAME).so.$(PNGVER) \ - $(OBJSDLL) - -libpng.so.3.$(PNGMIN): $(OBJSDLL) - $(CC) -shared -Wl,-soname,libpng.so.3 \ - -o libpng.so.3.$(PNGMIN) \ - $(OBJSDLL) - -pngtest: pngtest.o $(LIBNAME).so - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -pngtest-static: pngtest.o libpng.a - $(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A) - -test: pngtest pngtest-static - @echo "" - @echo " Running pngtest dynamically linked with $(LIBNAME).so:" - @echo "" - ./pngtest - @echo "" - @echo " Running pngtest statically linked with libpng.a:" - @echo "" - ./pngtest-static - -install-headers: png.h pngconf.h - -@if [ ! -d $(DI) ]; then mkdir $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi - cp png.h pngconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h - -@/bin/rm -f $(DI)/libpng - (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@/bin/rm -f $(DL)/libpng.a - (cd $(DL); ln -sf $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so - -@/bin/rm -f $(DL)/libpng.so - -@/bin/rm -f $(DL)/libpng.so.3 - -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* - cp $(LIBNAME).so.$(PNGVER) $(DL) - cp libpng.so.3.$(PNGMIN) $(DL) - chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) - chmod 755 $(DL)/libpng.so.3.$(PNGMIN) - (cd $(DL); \ - ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -sf libpng.so.3 libpng.so; \ - ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ - ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then mkdir $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi - -@/bin/rm -f $(DM)/man3/libpng.3 - -@/bin/rm -f $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi - -@/bin/rm -f $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then mkdir $(DB); fi - -@/bin/rm -f $(DB)/libpng-config - -@/bin/rm -f $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. - -test-installed: - $(CC) -I$(ZLIBINC) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ - -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/libpng12-config --ldflags` - ./pngtesti pngtest.png - -clean: - /bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \ - $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \ - libpng.so.3.$(PNGMIN) \ - libpng.pc - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -png.o png.pic.o: png.h pngconf.h png.c -pngerror.o pngerror.pic.o: png.h pngconf.h pngerror.c -pngrio.o pngrio.pic.o: png.h pngconf.h pngrio.c -pngwio.o pngwio.pic.o: png.h pngconf.h pngwio.c -pngmem.o pngmem.pic.o: png.h pngconf.h pngmem.c -pngset.o pngset.pic.o: png.h pngconf.h pngset.c -pngget.o pngget.pic.o: png.h pngconf.h pngget.c -pngread.o pngread.pic.o: png.h pngconf.h pngread.c -pngrtran.o pngrtran.pic.o: png.h pngconf.h pngrtran.c -pngrutil.o pngrutil.pic.o: png.h pngconf.h pngrutil.c -pngtrans.o pngtrans.pic.o: png.h pngconf.h pngtrans.c -pngwrite.o pngwrite.pic.o: png.h pngconf.h pngwrite.c -pngwtran.o pngwtran.pic.o: png.h pngconf.h pngwtran.c -pngwutil.o pngwutil.pic.o: png.h pngconf.h pngwutil.c -pngpread.o pngpread.pic.o: png.h pngconf.h pngpread.c - -pngtest.o: png.h pngconf.h pngtest.c diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.hpgcc b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.hpgcc deleted file mode 100644 index f677308..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.hpgcc +++ /dev/null @@ -1,217 +0,0 @@ -# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker. -# Copyright (C) 2002, Glenn Randers-Pehrson -# Copyright (C) 2001, Laurent faillie -# Copyright (C) 1998, 1999 Greg Roelofs -# Copyright (C) 1996, 1997 Andreas Dilger -# For conditions of distribution and use, see copyright notice in png.h - -CC=gcc -LD=ld - -# where "make install" puts libpng.a, libpng.sl*, png.h and pngconf.h -prefix=/usr/local - -# Where the zlib library and include files are located -ZLIBLIB=/opt/zlib/lib -ZLIBINC=/opt/zlib/include - -# Note that if you plan to build a libpng shared library, zlib must also -# be a shared library, which zlib's configure does not do. After running -# zlib's configure, edit the appropriate lines of makefile to read: -# CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \ -# LDSHARED=ld -b -# SHAREDLIB=libz.sl - -ALIGN= -# for i386: -#ALIGN=-malign-loops=2 -malign-functions=2 - -WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ - -Wmissing-declarations -Wtraditional -Wcast-align \ - -Wstrict-prototypes -Wmissing-prototypes #-Wconversion - -# for pgcc version 2.95.1, -O3 is buggy; don't use it. - -CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \ - $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5 -#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm -LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm - -RANLIB=ranlib -#RANLIB=echo - -PNGMAJ = 0 -PNGMIN = 1.2.5 -PNGVER = $(PNGMAJ).$(PNGMIN) -LIBNAME = libpng12 - -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -OBJSDLL = $(OBJS:.o=.pic.o) - -.SUFFIXES: .c .o .pic.o - -.c.pic.o: - $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c - -all: libpng.a $(LIBNAME).sl pngtest libpng.pc libpng-config - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -libpng.pc: - cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - -$(LIBNAME).sl: $(LIBNAME).sl.$(PNGMAJ) - ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl - -$(LIBNAME).sl.$(PNGMAJ): $(LIBNAME).sl.$(PNGVER) - ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ) - -$(LIBNAME).sl.$(PNGVER): $(OBJSDLL) - $(LD) -b +s \ - +h $(LIBNAME).sl.$(PNGMAJ) -o $(LIBNAME).sl.$(PNGVER) $(OBJSDLL) - -libpng.sl.3.$(PNGMIN): $(OBJSDLL) - $(LD) -b +s \ - +h libpng.sl.3 -o libpng.sl.3.$(PNGMIN) $(OBJSDLL) - -pngtest: pngtest.o $(LIBNAME).sl - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - ./pngtest - - -install-headers: png.h pngconf.h - -@if [ ! -d $(DI) ]; then mkdir $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi - cp png.h pngconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h - -@/bin/rm -f $(DI)/libpng - (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@/bin/rm -f $(DL)/libpng.a - (cd $(DL); ln -sf $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBNAME).sl.$(PNGVER) libpng.pc \ - libpng.sl.3.$(PNGMIN) - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - -@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGVER)* $(DL)/$(LIBNAME).sl - -@/bin/rm -f $(DL)/libpng.sl - -@/bin/rm -f $(DL)/libpng.sl.3 - -@/bin/rm -f $(DL)/libpng.sl.3.$(PNGMIN)* - cp $(LIBNAME).sl.$(PNGVER) $(DL) - cp libpng.sl.3.$(PNGMIN) $(DL) - chmod 755 $(DL)/$(LIBNAME).sl.$(PNGVER) - chmod 755 $(DL)/libpng.sl.3.$(PNGMIN) - (cd $(DL); \ - ln -sf libpng.sl.3.$(PNGMIN) libpng.sl.3; \ - ln -sf libpng.sl.3 libpng.sl; \ - ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ); \ - ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl) - -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then mkdir $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi - -@/bin/rm -f $(DM)/man3/libpng.3 - -@/bin/rm -f $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi - -@/bin/rm -f $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then mkdir $(DB); fi - -@/bin/rm -f $(DB)/libpng-config - -@/bin/rm -f $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) -I$(ZLIBINC) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ - -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/libpng12-config --ldflags` - ./pngtesti pngtest.png - -clean: - /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ - libpng-config $(LIBNAME).sl $(LIBNAME).sl.$(PNGMAJ)* \ - libpng.sl.3.$(PNGMIN) \ - libpng.pc - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h - -pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.hpux b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.hpux deleted file mode 100644 index a9c4d35..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.hpux +++ /dev/null @@ -1,202 +0,0 @@ -# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product. -# Copyright (C) 1999-2002 Glenn Randers-Pehrson -# Copyright (C) 1995 Guy Eric Schalnat, Group 42 -# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard -# For conditions of distribution and use, see copyright notice in png.h - -# Where the zlib library and include files are located -ZLIBLIB=/opt/zlib/lib -ZLIBINC=/opt/zlib/include - -# Note that if you plan to build a libpng shared library, zlib must also -# be a shared library, which zlib's configure does not do. After running -# zlib's configure, edit the appropriate lines of makefile to read: -# CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \ -# LDSHARED=ld -b -# SHAREDLIB=libz.sl - -CC=cc -CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0 -# Caution: be sure you have built zlib with the same CFLAGS. -CCFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0 -LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm - -RANLIB=ranlib - -PNGMAJ = 0 -PNGMIN = 1.2.5 -PNGVER = $(PNGMAJ).$(PNGMIN) -LIBNAME = libpng12 - -# where make install puts libpng.a, libpng12.sl, and png.h -prefix=/opt/libpng -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -OBJSDLL = $(OBJS:.o=.pic.o) - -.SUFFIXES: .c .o .pic.o - -.c.pic.o: - $(CC) -c $(CFLAGS) +z -o $@ $*.c - -all: libpng.a $(LIBNAME).sl pngtest libpng.pc libpng-config - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -libpng.pc: - cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo ccopts=\"-Ae +DA1.1 +DS2.0\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - -$(LIBNAME).sl: $(LIBNAME).sl.$(PNGMAJ) - ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl - -$(LIBNAME).sl.$(PNGMAJ): $(LIBNAME).sl.$(PNGVER) - ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ) - -$(LIBNAME).sl.$(PNGVER): $(OBJSDLL) - $(LD) -b +s \ - +h $(LIBNAME).sl.$(PNGMAJ) -o $(LIBNAME).sl.$(PNGVER) $(OBJSDLL) - -libpng.sl.3.$(PNGMIN): $(OBJSDLL) - $(LD) -b +s \ - +h libpng.sl.3 -o libpng.sl.3.$(PNGMIN) $(OBJSDLL) - -pngtest: pngtest.o libpng.a - $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - ./pngtest - -install-headers: png.h pngconf.h - -@if [ ! -d $(DI) ]; then mkdir $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi - cp png.h pngconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h - -@/bin/rm -f $(DI)/libpng - (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@/bin/rm -f $(DL)/libpng.a - (cd $(DL); ln -sf $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBNAME).sl.$(PNGVER) libpng.pc \ - libpng.sl.3.$(PNGMIN) - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - -@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGVER)* $(DL)/$(LIBNAME).sl - -@/bin/rm -f $(DL)/libpng.sl - -@/bin/rm -f $(DL)/libpng.sl.3 - -@/bin/rm -f $(DL)/libpng.sl.3.$(PNGMIN)* - cp $(LIBNAME).sl.$(PNGVER) $(DL) - cp libpng.sl.3.$(PNGMIN) $(DL) - chmod 755 $(DL)/$(LIBNAME).sl.$(PNGVER) - chmod 755 $(DL)/libpng.sl.3.$(PNGMIN) - (cd $(DL); \ - ln -sf libpng.sl.3.$(PNGMIN) libpng.sl.3; \ - ln -sf libpng.sl.3 libpng.sl; \ - ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ); \ - ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl) - -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then mkdir $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi - -@/bin/rm -f $(DM)/man3/libpng.3 - -@/bin/rm -f $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi - -@/bin/rm -f $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then mkdir $(DB); fi - -@/bin/rm -f $(DB)/libpng-config - -@/bin/rm -f $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) $(CCFLAGS) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ - -L$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/libpng12-config --ldflags` - ./pngtesti pngtest.png - -clean: - /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ - libpng-config $(LIBNAME).sl $(LIBNAME).sl.$(PNGMAJ)* \ - libpng.sl.3.$(PNGMIN) \ - libpng.pc - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtest.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h -pngpread.o: png.h pngconf.h diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.ibmc b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.ibmc deleted file mode 100644 index f09a62c..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.ibmc +++ /dev/null @@ -1,71 +0,0 @@ -# Makefile for libpng (static) -# IBM C version 3.x for Win32 and OS/2 -# Copyright (C) 2000 Cosmin Truta -# For conditions of distribution and use, see copyright notice in png.h -# Notes: -# Derived from makefile.std -# All modules are compiled in C mode -# Tested under Win32, expected to work under OS/2 -# Can be easily adapted for IBM VisualAge/C++ for AIX - -# Location of the zlib library and include files -ZLIBINC = ../zlib -ZLIBLIB = ../zlib - -# Compiler, linker, lib and other tools -CC = icc -LD = ilink -AR = ilib -RM = del - -CFLAGS = -I$(ZLIBINC) -Mc -O2 -W3 -LDFLAGS = - -# File extensions -O=.obj -A=.lib -E=.exe - -# Variables -OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \ - pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \ - pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O) - -LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A) - -# Targets -all: libpng$(A) pngtest$(E) - -libpng$(A): $(OBJS) - $(AR) -out:$@ $(OBJS) - -test: pngtest$(E) - pngtest$(E) - -pngtest: pngtest$(E) - -pngtest$(E): pngtest$(O) libpng$(A) - $(LD) $(LDFLAGS) pngtest$(O) $(LIBS) - -clean: - $(RM) *$(O) - $(RM) libpng$(A) - $(RM) pngtest$(E) - $(RM) pngout.png - -png$(O): png.h pngconf.h -pngerror$(O): png.h pngconf.h -pngget$(O): png.h pngconf.h -pngmem$(O): png.h pngconf.h -pngpread$(O): png.h pngconf.h -pngread$(O): png.h pngconf.h -pngrio$(O): png.h pngconf.h -pngrtran$(O): png.h pngconf.h -pngrutil$(O): png.h pngconf.h -pngset$(O): png.h pngconf.h -pngtest$(O): png.h pngconf.h -pngtrans$(O): png.h pngconf.h -pngwio$(O): png.h pngconf.h -pngwrite$(O): png.h pngconf.h -pngwtran$(O): png.h pngconf.h -pngwutil$(O): png.h pngconf.h diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.intel b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.intel deleted file mode 100644 index 1cabe77..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.intel +++ /dev/null @@ -1,114 +0,0 @@ -# Makefile for libpng -# Microsoft Visual C++ with Intel C/C++ Compiler 4.0 and later - -# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is -# copyright 1995 Guy Eric Schalnat, Group 42, Inc. -# For conditions of distribution and use, see copyright notice in png.h - -# To use, do "nmake /f scripts\makefile.intel" - - -# ------------------- Intel C/C++ Compiler 4.0 and later ------------------- - -# Caution: the assembler code was introduced at libpng version 1.0.4 and has -# not yet been thoroughly tested. - -# Use assembler code -ASMCODE=-DPNG_USE_PNGVCRD - -# Where the zlib library and include files are located -ZLIBLIB=..\zlib -ZLIBINC=..\zlib - -# Target CPU -CPU=6 # Pentium II -#CPU=5 # Pentium - -# Calling convention -CALLING=r # __fastcall -#CALLING=z # __stdcall -#CALLING=d # __cdecl - -# Uncomment next to put error messages in a file -#ERRFILE=>>pngerrs - -# -------------------------------------------------------------------------- - - -CC=icl -c -CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -I$(ZLIBINC) $(ASMCODE) -nologo -LD=link -LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO - -O=.obj - -OBJS=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) \ -pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) \ -pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) pngvcrd$(O) - - -all: test - -png$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngset$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngget$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngread$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngpread$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngrtran$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngrutil$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngvcrd$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngerror$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngmem$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngrio$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngwio$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngtest$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngtrans$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngwrite$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngwtran$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngwutil$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -libpng.lib: $(OBJS) - if exist libpng.lib del libpng.lib - lib /NOLOGO /OUT:libpng.lib $(OBJS) - -pngtest.exe: pngtest.obj libpng.lib - $(LD) $(LDFLAGS) /OUT:pngtest.exe pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib - -test: pngtest.exe - pngtest.exe - - -# End of makefile for libpng diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.knr b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.knr deleted file mode 100644 index 44ee538..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.knr +++ /dev/null @@ -1,99 +0,0 @@ -# makefile for libpng -# Copyright (C) 2002 Glenn Randers-Pehrson -# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. -# For conditions of distribution and use, see copyright notice in png.h - -# This makefile requires the file ansi2knr.c, which you can get -# from the Ghostscript ftp site at ftp://ftp.cs.wisc.edu/ghost/ -# If you have libjpeg, you probably already have ansi2knr.c in the jpeg -# source distribution. - -# where make install puts libpng.a and png.h -prefix=/usr/local -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -CC=cc -CFLAGS=-I../zlib -O -LDFLAGS=-L. -L../zlib/ -lpng -lz -lm -# flags for ansi2knr -ANSI2KNRFLAGS= - -RANLIB=ranlib -#RANLIB=echo - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -all: ansi2knr libpng.a pngtest - -# general rule to allow ansi2knr to work -.c.o: - ./ansi2knr $*.c T$*.c - $(CC) $(CFLAGS) -c T$*.c - rm -f T$*.c $*.o - mv T$*.o $*.o - -ansi2knr: ansi2knr.c - $(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c - -libpng.a: ansi2knr $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -pngtest: pngtest.o libpng.a - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - ./pngtest - -install: libpng.a - -@mkdir $(DESTDIR)$(INCPATH) - -@mkdir $(DESTDIR)$(INCPATH)/libpng - -@mkdir $(DESTDIR)$(LIBPATH) - -@rm -f $(DESTDIR)$(INCPATH)/png.h - -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h - cp png.h $(DESTDIR)$(INCPATH)/libpng - cp pngconf.h $(DESTDIR)$(INCPATH)/libpng - chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h - chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h - (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .) - cp libpng.a $(DESTDIR)$(LIBPATH) - chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a - -clean: - rm -f *.o libpng.a pngtest pngout.png ansi2knr - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngpread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtest.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.linux b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.linux deleted file mode 100644 index 7ec8125..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.linux +++ /dev/null @@ -1,223 +0,0 @@ -# makefile for libpng.a and libpng12.so on Linux ELF with gcc -# Copyright (C) 1998, 1999, 2002 Greg Roelofs and Glenn Randers-Pehrson -# Copyright (C) 1996, 1997 Andreas Dilger -# For conditions of distribution and use, see copyright notice in png.h - -LIBNAME = libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.5 -PNGVER = $(PNGMAJ).$(PNGMIN) - -CC=gcc - -# where "make install" puts libpng12.a, libpng12.so*, -# libpng12/png.h and libpng12/pngconf.h -# Prefix must be a full pathname. -prefix=/usr/local - -# Where the zlib library and include files are located. -#ZLIBLIB=/usr/local/lib -#ZLIBINC=/usr/local/include -ZLIBLIB=../zlib -ZLIBINC=../zlib - -ALIGN= -# for i386: -#ALIGN=-malign-loops=2 -malign-functions=2 - -WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ - -Wmissing-declarations -Wtraditional -Wcast-align \ - -Wstrict-prototypes -Wmissing-prototypes #-Wconversion - -# for pgcc version 2.95.1, -O3 is buggy; don't use it. - -CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \ - $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5 - -LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng12 -lz -lm -LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm - -RANLIB=ranlib -#RANLIB=echo - -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -OBJSDLL = $(OBJS:.o=.pic.o) - -.SUFFIXES: .c .o .pic.o - -.c.pic.o: - $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c - -all: libpng.a $(LIBNAME).so pngtest pngtest-static libpng.pc libpng-config - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -libpng.pc: - cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - -$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) - ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so - -$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) - ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) - -$(LIBNAME).so.$(PNGVER): $(OBJSDLL) - $(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) \ - -o $(LIBNAME).so.$(PNGVER) \ - $(OBJSDLL) - -libpng.so.3.$(PNGMIN): $(OBJSDLL) - $(CC) -shared -Wl,-soname,libpng.so.3 \ - -o libpng.so.3.$(PNGMIN) \ - $(OBJSDLL) - -pngtest: pngtest.o $(LIBNAME).so - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -pngtest-static: pngtest.o libpng.a - $(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A) - -test: pngtest pngtest-static - @echo "" - @echo " Running pngtest dynamically linked with $(LIBNAME).so:" - @echo "" - ./pngtest - @echo "" - @echo " Running pngtest statically linked with libpng.a:" - @echo "" - ./pngtest-static - -install-headers: png.h pngconf.h - -@if [ ! -d $(DI) ]; then mkdir $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi - cp png.h pngconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h - -@/bin/rm -f $(DI)/libpng - (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@/bin/rm -f $(DL)/libpng.a - (cd $(DL); ln -sf $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so - -@/bin/rm -f $(DL)/libpng.so - -@/bin/rm -f $(DL)/libpng.so.3 - -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* - cp $(LIBNAME).so.$(PNGVER) $(DL) - cp libpng.so.3.$(PNGMIN) $(DL) - chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) - chmod 755 $(DL)/libpng.so.3.$(PNGMIN) - (cd $(DL); \ - ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -sf libpng.so.3 libpng.so; \ - ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ - ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then mkdir $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi - -@/bin/rm -f $(DM)/man3/libpng.3 - -@/bin/rm -f $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi - -@/bin/rm -f $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then mkdir $(DB); fi - -@/bin/rm -f $(DB)/libpng-config - -@/bin/rm -f $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. - -test-installed: - $(CC) -I$(ZLIBINC) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ - -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/libpng12-config --ldflags` - ./pngtesti pngtest.png - -clean: - /bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \ - $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \ - libpng.so.3.$(PNGMIN) \ - libpng.pc - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h - -pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.macosx b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.macosx deleted file mode 100644 index e348ecf..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.macosx +++ /dev/null @@ -1,197 +0,0 @@ -# makefile for libpng, MACOS X -# Copyright (C) 2002 Glenn Randers-Pehrson -# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. -# Modified by Karin Kosina 20011010: -# build shared library (*.dylib) -# For conditions of distribution and use, see copyright notice in png.h - -# where make install puts libpng.a and png.h -prefix=/usr/local - -# Where the zlib library and include files are located -#ZLIBLIB=/usr/local/lib -#ZLIBINC=/usr/local/include -ZLIBLIB=../zlib -ZLIBINC=../zlib - -CC=cc - -PNGMAJ = 0 -PNGMIN = 1.2.5 -PNGVER = $(PNGMAJ).$(PNGMIN) - -CFLAGS=-fno-common -I$(ZLIBINC) -O # -g -DPNG_DEBUG=5 -LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -current_version $(PNGVER) - -LIBNAME=libpng12 -SHAREDLIB_POSTFIX=dylib -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - -#RANLIB=echo -RANLIB=ranlib - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -all: libpng.a pngtest shared libpng.pc libpng-config - -shared: $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) - -libpng.pc: - cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! | \ - sed -e s/-lm// > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX): $(OBJS) - cc -dynamiclib -flat_namespace -undefined suppress -o $@ $(OBJS) - -libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX): $(OBJS) - cc -dynamiclib -compatibility_version 3 -flat_namespace \ - -undefined suppress -o $@ $(OBJS) - -pngtest: pngtest.o libpng.a - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - ./pngtest - -install-headers: png.h pngconf.h - -@if [ ! -d $(DI) ]; then mkdir $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi - cp png.h pngconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h - -@/bin/rm -f $(DI)/libpng - (cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@/bin/rm -f $(DL)/libpng.a - (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \ - libpng.pc libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - -@/bin/rm -f \ - $(DL)/$(LIBNAME).$(PNGVER)*.$(SHAREDLIB_POSTFIX) - -@/bin/rm -f $(DL)/$(LIBNAME).$(SHAREDLIB_POSTFIX) - -@/bin/rm -f libpng.$(SHARED_POSTFIX) - -@/bin/rm -f libpng.3.$(SHARED_POSTFIX) - -@/bin/rm -f libpng.3.$(PNGMIN)*.$(SHARED_POSTFIX) - cp libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) $(DL) - cp $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) $(DL) - chmod 755 $(DL)/$(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) - chmod 755 $(DL)/libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) - (cd $(DL); \ - ln -f -s libpng.3.$(PNGMIN).$(SHARED_POSTFIX) \ - libpng.3.$(SHARED_POSTFIX); \ - ln -f -s libpng.3.$(SHARED_POSTFIX) libpng.$(SHARED_POSTFIX); \ - ln -f -s $(LIBNAME).$(PNGVER).$(SHARED_POSTFIX) \ - libpng.$(SHARED_POSTFIX); \ - ln -f -s libpng.3.$(PNGMIN).$(SHARED_POSTFIX) \ - libpng.3.$(SHARED_POSTFIX); \ - ln -f -s $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \ - $(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX); \ - ln -f -s $(LIBNAME).$(PNGMAJ).$(SHAREDLIB_POSTFIX) \ - $(LIBNAME).$(SHAREDLIB_POSTFIX)) - -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then mkdir $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi - -@/bin/rm -f $(DM)/man3/libpng.3 - -@/bin/rm -f $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi - -@/bin/rm -f $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then mkdir $(DB); fi - -@/bin/rm -f $(DB)/libpng-config - -@/bin/rm -f $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. - -test-installed: - $(CC) $(CFLAGS) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ - -L$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/libpng12-config --ldflags` - ./pngtesti pngtest.png - -clean: - rm -f *.o libpng.a pngtest pngout.png libpng-config \ - $(LIBNAME).$(PNGVER).$(SHAREDLIB_POSTFIX) \ - $(LIBNAME).$(SHAREDLIB_POSTFIX) \ - libpng.3.$(PNGMIN).$(SHAREDLIB_POSTFIX) \ - libpng.pc - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtest.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h -pngpread.o: png.h pngconf.h - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.mips b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.mips deleted file mode 100644 index f1a557d..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.mips +++ /dev/null @@ -1,83 +0,0 @@ -# makefile for libpng -# Copyright (C) Glenn Randers-Pehrson -# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. -# For conditions of distribution and use, see copyright notice in png.h - -# where make install puts libpng.a and png.h -prefix=/usr/local -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -CC=cc -CFLAGS=-I../zlib -O -systype sysv -DSYSV -w -Dmips -#CFLAGS=-O -LDFLAGS=-L. -L../zlib/ -lpng -lz -lm - -#RANLIB=ranlib -RANLIB=echo - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -all: libpng.a pngtest - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -pngtest: pngtest.o libpng.a - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - ./pngtest - -install: libpng.a - -@mkdir $(DESTDIR)$(INCPATH) - -@mkdir $(DESTDIR)$(INCPATH)/libpng - -@mkdir $(DESTDIR)$(LIBPATH) - -@rm -f $(DESTDIR)$(INCPATH)/png.h - -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h - cp png.h $(DESTDIR)$(INCPATH)/libpng - cp pngconf.h $(DESTDIR)$(INCPATH)/libpng - chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h - chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h - (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .) - cp libpng.a $(DESTDIR)$(LIBPATH) - chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a - -clean: - rm -f *.o libpng.a pngtest pngout.png - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngpread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtest.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.msc b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.msc deleted file mode 100644 index 1cbfd91..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.msc +++ /dev/null @@ -1,86 +0,0 @@ -# makefile for libpng -# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. -# For conditions of distribution and use, see copyright notice in png.h -# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib - -# -------- Microsoft C 5.1 and later, does not use assembler code -------- -MODEL=L -CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL) -I..\zlib -#-Ox generates bad code with MSC 5.1 -CC=cl -LD=link -LDFLAGS=/e/st:0x1500/noe -O=.obj - -#uncomment next to put error messages in a file -ERRFILE= >> pngerrs - -# variables -OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) -OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) -OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) - -all: libpng.lib - -png$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngset$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngget$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngread$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngpread$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngrtran$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngrutil$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngerror$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngmem$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngrio$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwio$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngtest$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngtrans$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwrite$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwtran$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwutil$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) - del libpng.lib - lib libpng $(OBJS1); - lib libpng $(OBJS2); - lib libpng $(OBJS3); - -pngtest.exe: pngtest.obj libpng.lib - $(LD) $(LDFLAGS) pngtest.obj,,,libpng.lib ..\zlib\zlib.lib ; - -test: pngtest.exe - pngtest - -# End of makefile for libpng - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.ne12bsd b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.ne12bsd deleted file mode 100644 index 4cccc6d..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.ne12bsd +++ /dev/null @@ -1,44 +0,0 @@ -# makefile for libpng for NetBSD for the standard -# make obj && make depend && make && make test -# make includes && make install -# Copyright (C) 2002 Patrick R.L. Welche -# For conditions of distribution and use, see copyright notice in png.h - -# You should also run makefile.netbsd - -LOCALBASE?=/usr/local -LIBDIR= ${LOCALBASE}/lib -MANDIR= ${LOCALBASE}/man -INCSDIR=${LOCALBASE}/include/libpng12 - -LIB= png12 -SHLIB_MAJOR= 0 -SHLIB_MINOR= 1.2.5 -SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ - pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ - pngwtran.c pngmem.c pngerror.c pngpread.c -INCS= png.h pngconf.h -MAN= libpng.3 libpngpf.3 png.5 - -CPPFLAGS+=-I${.CURDIR} -DPNG_USE_PNGGCCRD - -# something like this for mmx assembler, but it core dumps for me at the moment -# .if ${MACHINE_ARCH} == "i386" -# CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK -# MKLINT= no -# .else - CPPFLAGS+=-DPNG_NO_ASSEMBLER_CODE -# .endif - -CLEANFILES+=pngtest.o pngtest - -pngtest.o: pngtest.c - ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} - -pngtest: pngtest.o libpng.a - ${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm - -test: pngtest - cd ${.CURDIR} && ${.OBJDIR}/pngtest - -.include diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.netbsd b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.netbsd deleted file mode 100644 index 6b53c4e..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.netbsd +++ /dev/null @@ -1,44 +0,0 @@ -# makefile for libpng for NetBSD for the standard -# make obj && make depend && make && make test -# make includes && make install -# Copyright (C) 2002 Patrick R.L. Welche -# For conditions of distribution and use, see copyright notice in png.h - -# You should also run makefile.ne0bsd - -LOCALBASE?=/usr/local -LIBDIR= ${LOCALBASE}/lib -MANDIR= ${LOCALBASE}/man -INCSDIR=${LOCALBASE}/include/libpng - -LIB= png -SHLIB_MAJOR= 3 -SHLIB_MINOR= 1.2.5 -SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ - pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ - pngwtran.c pngmem.c pngerror.c pngpread.c -INCS= png.h pngconf.h -MAN= libpng.3 libpngpf.3 png.5 - -CPPFLAGS+=-I${.CURDIR} -DPNG_USE_PNGGCCRD - -# something like this for mmx assembler, but it core dumps for me at the moment -# .if ${MACHINE_ARCH} == "i386" -# CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK -# MKLINT= no -# .else - CPPFLAGS+=-DPNG_NO_ASSEMBLER_CODE -# .endif - -CLEANFILES+=pngtest.o pngtest - -pngtest.o: pngtest.c - ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} - -pngtest: pngtest.o libpng.a - ${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm - -test: pngtest - cd ${.CURDIR} && ${.OBJDIR}/pngtest - -.include diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.openbsd b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.openbsd deleted file mode 100644 index af94f40..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.openbsd +++ /dev/null @@ -1,72 +0,0 @@ -# makefile for libpng -# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. -# For conditions of distribution and use, see copyright notice in png.h - -PREFIX?= /usr/local -LIBDIR= ${PREFIX}/lib -MANDIR= ${PREFIX}/man/cat - -SHLIB_MAJOR= 0 -SHLIB_MINOR= 1.2.5 - -LIB= png -SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \ - pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c \ - pngwio.c pngwrite.c pngwtran.c pngwutil.c - -HDRS= png.h pngconf.h - -CFLAGS+= -Wall -CPPFLAGS+= -I${.CURDIR} -DPNG_NO_ASSEMBLER_CODE -DPNG_USE_PNGGCCRD - -NOPROFILE= Yes - -CLEANFILES+= pngtest.o pngtest - -MAN= libpng.3 libpngpf.3 png.5 -DOCS= ANNOUNCE CHANGES LICENSE README libpng.txt - -pngtest.o: pngtest.c - ${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} - -pngtest: pngtest.o - ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm - -test: pngtest - cd ${.OBJDIR} && env \ - LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest - -beforeinstall: - if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \ - ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include/libpng; \ - fi - if [ ! -d ${DESTDIR}${LIBDIR} ]; then \ - ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \ - fi - if [ ! -d ${DESTDIR}${LIBDIR}/debug ]; then \ - ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}/debug; \ - fi - if [ ! -d ${DESTDIR}${MANDIR}3 ]; then \ - ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}3; \ - fi - if [ ! -d ${DESTDIR}${MANDIR}5 ]; then \ - ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}5; \ - fi - if [ ! -d ${DESTDIR}${PREFIX}/share/doc/png ]; then \ - ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/share/doc/png; \ - fi - -afterinstall: - @rm -f ${DESTDIR}${LIBDIR}/libpng_pic.a - @rm -f ${DESTDIR}${LIBDIR}/debug/libpng.a - @rm -f ${DESTDIR}${PREFIX}/include/png.h - @rm -f ${DESTDIR}${PREFIX}/include/pngconf.h - @rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true - ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ - -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include/libpng - ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ - -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include - ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ - -m ${NONBINMODE} ${DOCS} ${DESTDIR}${PREFIX}/share/doc/png - -.include diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.os2 b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.os2 deleted file mode 100644 index 588067d..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.os2 +++ /dev/null @@ -1,69 +0,0 @@ -# makefile for libpng on OS/2 with gcc -# For conditions of distribution and use, see copyright notice in png.h - -# Related files: pngos2.def - -CC=gcc -Zomf -s - -# Where the zlib library and include files are located -ZLIBLIB=../zlib -ZLIBINC=../zlib - -WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ - -Wmissing-declarations -Wtraditional -Wcast-align \ - -Wstrict-prototypes -Wmissing-prototypes #-Wconversion -CFLAGS=-I$(ZLIBINC) -Wall -O6 -funroll-loops -malign-loops=2 \ - -malign-functions=2 #$(WARNMORE) -g -DPNG_DEBUG=5 -LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lzdll -Zcrtdll -AR=emxomfar - -PNGLIB=png.lib -IMPLIB=emximp -SHAREDLIB=png.dll -SHAREDLIBIMP=pngdll.lib - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -.SUFFIXES: .c .o - -all: $(PNGLIB) $(SHAREDLIB) $(SHAREDLIBIMP) - -$(PNGLIB): $(OBJS) - $(AR) rc $@ $(OBJS) - -$(SHAREDLIB): $(OBJS) pngos2.def - $(CC) $(LDFLAGS) -Zdll -o $@ $^ - -$(SHAREDLIBIMP): pngos2.def - $(IMPLIB) -o $@ $^ - -pngtest.exe: pngtest.o png.dll pngdll.lib - $(CC) -o $@ $(CFLAGS) $< $(LDFLAGS) - -test: pngtest.exe - ./pngtest.exe - -clean: - rm -f *.o $(PNGLIB) png.dll pngdll.lib pngtest.exe pngout.png - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h - -pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.sco b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.sco deleted file mode 100644 index 74068a2..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.sco +++ /dev/null @@ -1,201 +0,0 @@ -# makefile for SCO OSr5 ELF and Unixware 7 with Native cc -# Contributed by Mike Hopkirk (hops@sco.com) modified from Makefile.lnx -# force ELF build dynamic linking, SONAME setting in lib and RPATH in app -# Copyright (C) 2002 Glenn Randers-Pehrson -# Copyright (C) 1998 Greg Roelofs -# Copyright (C) 1996, 1997 Andreas Dilger -# For conditions of distribution and use, see copyright notice in png.h - -CC=cc - -# where make install puts libpng.a, libpng.so*, and png.h -prefix=/usr/local - -# Where the zlib library and include files are located -#ZLIBLIB=/usr/local/lib -#ZLIBINC=/usr/local/include -ZLIBLIB=../zlib -ZLIBINC=../zlib - -CFLAGS= -dy -belf -I$(ZLIBINC) -O3 -LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm - -#RANLIB=ranlib -RANLIB=echo - -PNGMAJ = 0 -PNGMIN = 1.2.5 -PNGVER = $(PNGMAJ).$(PNGMIN) -LIBNAME = libpng12 - -INCPATH=$(prefix)/include/libpng -LIBPATH=$(prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -OBJSDLL = $(OBJS:.o=.pic.o) - -.SUFFIXES: .c .o .pic.o - -.c.pic.o: - $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c - -all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -libpng.pc: - cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo ccopts=\"-belf\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - -$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) - ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so - -$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) - ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) - -$(LIBNAME).so.$(PNGVER): $(OBJSDLL) - $(CC) -G -Wl,-h,$(LIBNAME).so.$(PNGMAJ) -o $(LIBNAME).so.$(PNGVER) \ - $(OBJSDLL) - -libpng.so.3.$(PNGMIN): $(OBJSDLL) - $(CC) -G -Wl,-h,libpng.so.3 -o libpng.so.3.$(PNGMIN) \ - $(OBJSDLL) - -pngtest: pngtest.o $(LIBNAME).so - LD_RUN_PATH=.:$(ZLIBLIB) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - ./pngtest - -install-headers: png.h pngconf.h - -@if [ ! -d $(DI) ]; then mkdir $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi - -@/bin/rm -f $(DI)/png.h - -@/bin/rm -f $(DI)/pngconf.h - cp png.h pngconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h - -@/bin/rm -f $(DI)/libpng - (cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@/bin/rm -f $(DL)/libpng.a - (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so - -@/bin/rm -f $(DL)/libpng.so - -@/bin/rm -f $(DL)/libpng.so.3 - -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* - cp $(LIBNAME).so.$(PNGVER) $(DL) - cp libpng.so.3.$(PNGMIN) $(DL) - chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) - chmod 755 $(DL)/libpng.so.3.$(PNGMIN) - (cd $(DL); \ - ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -f -s libpng.so.3 libpng.so; \ - ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ - ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then mkdir $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi - -@/bin/rm -f $(DM)/man3/libpng.3 - -@/bin/rm -f $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi - -@/bin/rm -f $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then mkdir $(DB); fi - -@/bin/rm -f $(DB)/libpng-config - -@/bin/rm -f $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. - -test-installed: - $(CC) $(CFLAGS) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ - -L$(ZLIBLIB) \ - -o pngtesti `$(BINPATH)/libpng12-config --ldflags` - ./pngtesti pngtest.png - -clean: - /bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \ - $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \ - libpng.so.3.$(PNGMIN) \ - libpng.pc - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h - -pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.sggcc b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.sggcc deleted file mode 100644 index 082de1b..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.sggcc +++ /dev/null @@ -1,211 +0,0 @@ -# makefile for libpng.a and libpng12.so, SGI IRIX with 'cc' -# Copyright (C) 2001-2002 Glenn Randers-Pehrson -# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. -# For conditions of distribution and use, see copyright notice in png.h - -# Where make install puts libpng.a, libpng12.so, and libpng12/png.h -# Prefix must be a full pathname. - -prefix=/usr/local - -# Where the zlib library and include files are located -#ZLIBLIB=/usr/local/lib32 -#ZLIBINC=/usr/local/include -#ZLIBLIB=/usr/local/lib -#ZLIBINC=/usr/local/include -ZLIBLIB=../zlib -ZLIBINC=../zlib - -LIBNAME=libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.5 -PNGVER = $(PNGMAJ).$(PNGMIN) -CC=gcc - -# ABI can be blank to use default for your system, -32, -o32, -n32, or -64 -# See "man abi". zlib must be built with the same ABI. -ABI= - -WARNMORE= # -g -DPNG_DEBUG=5 -CFLAGS=$(ABI) -I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32 -LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm -LDSHARED=cc $(ABI) -shared -soname $(LIBNAME).so.$(PNGMAJ) \ - -set_version sgi$(PNGMAJ).0 -LDLEGACY=cc $(ABI) -shared -soname libpng.so.3 \ - -set_version sgi$3.0 -# See "man dso" for info about shared objects - -RANLIB=echo -#RANLIB=ranlib - -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib -#LIBPATH=$(prefix)/lib32 -MANPATH=$(prefix)/man -BINPATH=$(prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - -OBJS = pnggccrd.o png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -all: libpng.a pngtest shared libpng.pc libpng-config - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -shared: $(LIBNAME).so.$(PNGVER) - -libpng.pc: - cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo ccopts=\"$(ABI)\"; \ - echo ldopts=\"$(ABI)\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo libdir=\"$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - -$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) - ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so - -$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) - ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) - -$(LIBNAME).so.$(PNGVER): $(OBJS) - $(LDSHARED) -o $@ $(OBJS) - rm -f $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ) - -libpng.so.3.$(PNGMIN): $(OBJS) - $(LDLEGACY) -o $@ $(OBJS) - -pngtest: pngtest.o libpng.a - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - echo - echo Testing local static library. - ./pngtest - -install-headers: png.h pngconf.h - -@if [ ! -d $(DI) ]; then mkdir $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi - cp png.h pngconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h - -@/bin/rm -f $(DI)/libpng - (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@/bin/rm -f $(DL)/libpng.a - (cd $(DL); ln -sf $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so - -@/bin/rm -f $(DL)/libpng.so - -@/bin/rm -f $(DL)/libpng.so.3 - -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* - cp $(LIBNAME).so.$(PNGVER) $(DL) - cp libpng.so.3.$(PNGMIN) $(DL) - chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) - chmod 755 $(DL)/libpng.so.3.$(PNGMIN) - (cd $(DL); \ - ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -sf libpng.so.3 libpng.so; \ - ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ - ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then mkdir $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi - -@/bin/rm -f $(DM)/man3/libpng.3 - -@/bin/rm -f $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi - -@/bin/rm -f $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then mkdir $(DB); fi - -@/bin/rm -f $(DB)/libpng-config - -@/bin/rm -f $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) -I$(ZLIBINC) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ - -L$(ZLIBLIB) -rpath $(ZLIBLIB):`$(BINPATH)/libpng12-config --libdir` \ - -o pngtesti `$(BINPATH)/libpng12-config --ldflags` - ./pngtesti pngtest.png - -clean: - rm -f *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \ - $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ - libpng.so.3.$(PNGMIN) \ - so_locations - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtest.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h -pngpread.o: png.h pngconf.h -pnggccrd.o: png.h pngconf.h - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.sgi b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.sgi deleted file mode 100644 index 219b8ad..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.sgi +++ /dev/null @@ -1,217 +0,0 @@ -# makefile for libpng.a and libpng12.so, SGI IRIX with 'cc' -# Copyright (C) 2001-2002 Glenn Randers-Pehrson -# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. -# For conditions of distribution and use, see copyright notice in png.h - -LIBNAME=libpng12 -PNGMAJ = 0 -PNGMIN = 1.2.5 -PNGVER = $(PNGMAJ).$(PNGMIN) - -# Where make install puts libpng.a, libpng12.so, and libpng12/png.h -# Prefix must be a full pathname. - -prefix=/usr/local - -# Where the zlib library and include files are located -#ZLIBLIB=/usr/local/lib32 -#ZLIBINC=/usr/local/include -#ZLIBLIB=/usr/local/lib -#ZLIBINC=/usr/local/include -ZLIBLIB=../zlib -ZLIBINC=../zlib - -CC=cc - -# ABI can be blank to use default for your system, -32, -o32, -n32, or -64 -# See "man abi". zlib must be built with the same ABI. -ABI= - -WARNMORE=-fullwarn -# Note: -KPIC is the default anyhow -#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC -DPNG_USE_PNGGCCRD # -g -DPNG_DEBUG=5 -CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -DPNG_USE_PNGGCCRD \ - -DPNG_NO_ASSEMBLER_CODE -LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng12 -lz -lm -LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm -LDSHARED=cc $(ABI) -shared -soname $(LIBNAME).so.$(PNGMAJ) \ - -set_version sgi$(PNGMAJ).0 -LDLEGACY=cc $(ABI) -shared -soname libpng.so.3 \ - -set_version sgi$3.0 -# See "man dso" for info about shared objects - -RANLIB=echo -#RANLIB=ranlib - -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib -#LIBPATH=$(prefix)/lib32 -MANPATH=$(prefix)/man -BINPATH=$(prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - -OBJS = pnggccrd.o png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -all: libpng.a pngtest shared libpng.pc libpng-config - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -shared: $(LIBNAME).so.$(PNGVER) - -libpng.pc: - cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo cppflags=\"-DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE\"; \ - echo ccopts=\"$(ABI)\"; \ - echo ldopts=\"$(ABI)\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo libdir=\"$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - -$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) - ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so - -$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) - ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) - -$(LIBNAME).so.$(PNGVER): $(OBJS) - $(LDSHARED) -o $@ $(OBJS) - rm -f $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ) - -libpng.so.3.$(PNGMIN): $(OBJS) - $(LDLEGACY) -o $@ $(OBJS) - -pngtest: pngtest.o libpng.a - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - echo - echo Testing local static library. - ./pngtest - -install-headers: png.h pngconf.h - -@if [ ! -d $(DI) ]; then mkdir $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi - cp png.h pngconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h - -@/bin/rm -f $(DI)/libpng - (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@/bin/rm -f $(DL)/libpng.a - (cd $(DL); ln -sf $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so - -@/bin/rm -f $(DL)/libpng.so - -@/bin/rm -f $(DL)/libpng.so.3 - -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* - cp $(LIBNAME).so.$(PNGVER) $(DL) - cp libpng.so.3.$(PNGMIN) $(DL) - chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) - chmod 755 $(DL)/libpng.so.3.$(PNGMIN) - (cd $(DL); \ - ln -sf libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -sf libpng.so.3 libpng.so; \ - ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ - ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then mkdir $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi - -@/bin/rm -f $(DM)/man3/libpng.3 - -@/bin/rm -f $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi - -@/bin/rm -f $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then mkdir $(DB); fi - -@/bin/rm -f $(DB)/libpng-config - -@/bin/rm -f $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) -I$(ZLIBINC) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ - -L$(ZLIBLIB) -rpath $(ZLIBLIB):`$(BINPATH)/libpng12-config --libdir` \ - -o pngtesti `$(BINPATH)/libpng12-config --ldflags` - ./pngtesti pngtest.png - -clean: - rm -f *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \ - $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ - libpng.so.3.$(PNGMIN) \ - so_locations - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtest.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h -pngpread.o: png.h pngconf.h -pnggccrd.o: png.h pngconf.h - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.so9 b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.so9 deleted file mode 100644 index f1ca807..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.so9 +++ /dev/null @@ -1,223 +0,0 @@ -# makefile for libpng on Solaris 9 (beta) with Forte cc -# Updated by Chad Schrock for Solaris 9 -# Contributed by William L. Sebok, based on makefile.linux -# Copyright (C) 2002 Glenn Randers-Pehrson -# Copyright (C) 1998-2001 Greg Roelofs -# Copyright (C) 1996-1997 Andreas Dilger -# For conditions of distribution and use, see copyright notice in png.h - -# gcc 2.95 doesn't work. -CC=cc - -# Where make install puts libpng.a, libpng.so*, and png.h -prefix=/usr/local - -# Where the zlib library and include files are located -# Changing these to ../zlib poses a security risk. If you want -# to have zlib in an adjacent directory, specify the full path instead of "..". -#ZLIBLIB=../zlib -#ZLIBINC=../zlib -#ZLIBLIB=/usr/local/lib -#ZLIBINC=/usr/local/include -#Use the preinstalled zlib that comes with Solaris 9: -ZLIBLIB=/usr/lib -ZLIBINC=/usr/include - -#WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ - -Wmissing-declarations -Wtraditional -Wcast-align \ - -Wstrict-prototypes -Wmissing-prototypes #-Wconversion -#CFLAGS=-I$(ZLIBINC) -Wall -O3 $(WARNMORE) -g -DPNG_DEBUG=5 -CFLAGS=-I$(ZLIBINC) -O3 -LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm - -#RANLIB=ranlib -RANLIB=echo - -PNGMAJ = 0 -PNGMIN = 1.2.5 -PNGVER = $(PNGMAJ).$(PNGMIN) -LIBNAME = libpng12 - -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -OBJSDLL = $(OBJS:.o=.pic.o) - -.SUFFIXES: .c .o .pic.o - -.c.pic.o: - $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c - -all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -libpng.pc: - cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo R_opts=\"-R$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - -$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) - ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so - -$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) - ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) - -$(LIBNAME).so.$(PNGVER): $(OBJSDLL) - @case "`type ld`" in *ucb*) \ - echo; \ - echo '## WARNING:'; \ - echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ - echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \ - echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \ - echo '## The environment variable LD_LIBRARY_PATH should not be set'; \ - echo '## at all. If it is, things are likely to break because of'; \ - echo '## the libucb dependency that is created.'; \ - echo; \ - ;; \ - esac - $(LD) -G -h $(LIBNAME).so.$(PNGMAJ) \ - -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) - -libpng.so.3.$(PNGMIN): $(OBJS) - $(LD) -G -h libpng.so.3 \ - -o libpng.so.3.$(PNGMIN) $(OBJSDLL) - -pngtest: pngtest.o $(LIBNAME).so - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - ./pngtest - -install-headers: png.h pngconf.h - -@if [ ! -d $(DI) ]; then mkdir $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi - cp png.h pngconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h - -@/bin/rm -f $(DI)/libpng - (cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@/bin/rm -f $(DL)/libpng.a - (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so - -@/bin/rm -f $(DL)/libpng.so - -@/bin/rm -f $(DL)/libpng.so.3 - -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* - cp $(LIBNAME).so.$(PNGVER) $(DL) - cp libpng.so.3.$(PNGMIN) $(DL) - chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) - chmod 755 $(DL)/libpng.so.3.$(PNGMIN) - (cd $(DL); \ - ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -f -s libpng.so.3 libpng.so; \ - ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \ - ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so) - -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then mkdir $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi - -@/bin/rm -f $(DM)/man3/libpng.3 - -@/bin/rm -f $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi - -@/bin/rm -f $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then mkdir $(DB); fi - -@/bin/rm -f $(DB)/libpng-config - -@/bin/rm -f $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) -I$(ZLIBINC) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ - -o pngtesti `$(BINPATH)/libpng12-config --ldflags` \ - -L$(ZLIBLIB) -R$(ZLIBLIB) - ./pngtesti pngtest.png - -clean: - /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ - libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ - libpng.so.3.$(PNGMIN) \ - libpng.pc - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h - -pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.solaris b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.solaris deleted file mode 100644 index 9c5a844..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.solaris +++ /dev/null @@ -1,220 +0,0 @@ -# makefile for libpng on Solaris 2.x with gcc -# Copyright (C) 2002 Glenn Randers-Pehrson -# Contributed by William L. Sebok, based on makefile.linux -# Copyright (C) 1998 Greg Roelofs -# Copyright (C) 1996, 1997 Andreas Dilger -# For conditions of distribution and use, see copyright notice in png.h - -CC=gcc - -# Where make install puts libpng.a, libpng12.so*, and png.h -prefix=/usr/local - -# Where the zlib library and include files are located -# Changing these to ../zlib poses a security risk. If you want -# to have zlib in an adjacent directory, specify the full path instead of "..". -#ZLIBLIB=../zlib -#ZLIBINC=../zlib - -ZLIBLIB=/usr/local/lib -ZLIBINC=/usr/local/include - -WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \ - -Wmissing-declarations -Wtraditional -Wcast-align \ - -Wstrict-prototypes -Wmissing-prototypes #-Wconversion -CFLAGS=-I$(ZLIBINC) -Wall -O3 \ - # $(WARNMORE) -g -DPNG_DEBUG=5 -LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng12 -lz -lm - -#RANLIB=ranlib -RANLIB=echo - -PNGMAJ = 0 -PNGMIN = 1.2.5 -PNGVER = $(PNGMAJ).$(PNGMIN) -LIBNAME = libpng12 - -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib -MANPATH=$(prefix)/man -BINPATH=$(prefix)/bin - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -DB=$(DESTDIR)$(BINPATH) -DI=$(DESTDIR)$(INCPATH) -DL=$(DESTDIR)$(LIBPATH) -DM=$(DESTDIR)$(MANPATH) - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -OBJSDLL = $(OBJS:.o=.pic.o) - -.SUFFIXES: .c .o .pic.o - -.c.pic.o: - $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c - -all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -libpng.pc: - cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc - -libpng-config: - ( cat scripts/libpng-config-head.in; \ - echo prefix=\"$(prefix)\"; \ - echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ - echo cppflags=\"-DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE\"; \ - echo L_opts=\"-L$(LIBPATH)\"; \ - echo R_opts=\"-R$(LIBPATH)\"; \ - echo libs=\"-lpng12 -lz -lm\"; \ - cat scripts/libpng-config-body.in ) > libpng-config - chmod +x libpng-config - -$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ) - ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so - -$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER) - ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ) - -$(LIBNAME).so.$(PNGVER): $(OBJSDLL) - @case "`type ld`" in *ucb*) \ - echo; \ - echo '## WARNING:'; \ - echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ - echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \ - echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \ - echo '## The environment variable LD_LIBRARY_PATH should not be set'; \ - echo '## at all. If it is, things are likely to break because of'; \ - echo '## the libucb dependency that is created.'; \ - echo; \ - ;; \ - esac - $(LD) -G -h $(LIBNAME).so.$(PNGMAJ) \ - -o $(LIBNAME).so.$(PNGVER) $(OBJSDLL) - -libpng.so.3.$(PNGMIN): $(OBJS) - $(LD) -G -h libpng.so.3 \ - -o libpng.so.3.$(PNGMIN) $(OBJSDLL) - -pngtest: pngtest.o $(LIBNAME).so - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - ./pngtest - -install-headers: png.h pngconf.h - -@if [ ! -d $(DI) ]; then mkdir $(DI); fi - -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi - cp png.h pngconf.h $(DI)/$(LIBNAME) - chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h - -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h - -@/bin/rm -f $(DI)/libpng - (cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .) - -install-static: install-headers libpng.a - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - cp libpng.a $(DL)/$(LIBNAME).a - chmod 644 $(DL)/$(LIBNAME).a - -@/bin/rm -f $(DL)/libpng.a - (cd $(DL); ln -f -s $(LIBNAME).a libpng.a) - -install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \ - libpng.so.3.$(PNGMIN) - -@if [ ! -d $(DL) ]; then mkdir $(DL); fi - -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so - -@/bin/rm -f $(DL)/libpng.so - -@/bin/rm -f $(DL)/libpng.so.3 - -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)* - cp $(LIBNAME).so.$(PNGVER) $(DL) - cp libpng.so.3.$(PNGMIN) $(DL) - chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER) - chmod 755 $(DL)/libpng.so.3.$(PNGMIN) - (cd $(DL); \ - ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \ - ln -f -s libpng.so.3 libpng.so; \ - ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so; \ - ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)) - -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc - cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc - chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc) - -install-man: libpng.3 libpngpf.3 png.5 - -@if [ ! -d $(DM) ]; then mkdir $(DM); fi - -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi - -@/bin/rm -f $(DM)/man3/libpng.3 - -@/bin/rm -f $(DM)/man3/libpngpf.3 - cp libpng.3 $(DM)/man3 - cp libpngpf.3 $(DM)/man3 - -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi - -@/bin/rm -f $(DM)/man5/png.5 - cp png.5 $(DM)/man5 - -install-config: libpng-config - -@if [ ! -d $(DB) ]; then mkdir $(DB); fi - -@/bin/rm -f $(DB)/libpng-config - -@/bin/rm -f $(DB)/$(LIBNAME)-config - cp libpng-config $(DB)/$(LIBNAME)-config - chmod 755 $(DB)/$(LIBNAME)-config - (cd $(DB); ln -sf $(LIBNAME)-config libpng-config) - -install: install-static install-shared install-man install-config - -# If you installed in $(DESTDIR), test-installed won't work until you -# move the library to its final location. - -test-installed: - echo - echo Testing installed dynamic shared library. - $(CC) -I$(ZLIBINC) \ - `$(BINPATH)/libpng12-config --cflags` pngtest.c \ - -o pngtesti `$(BINPATH)/libpng12-config --ldflags` \ - -L$(ZLIBLIB) -R$(ZLIBLIB) - ./pngtesti pngtest.png - -clean: - /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ - libpng-config $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* \ - libpng.so.3.$(PNGMIN) \ - libpng.pc - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o png.pic.o: png.h pngconf.h -pngerror.o pngerror.pic.o: png.h pngconf.h -pngrio.o pngrio.pic.o: png.h pngconf.h -pngwio.o pngwio.pic.o: png.h pngconf.h -pngmem.o pngmem.pic.o: png.h pngconf.h -pngset.o pngset.pic.o: png.h pngconf.h -pngget.o pngget.pic.o: png.h pngconf.h -pngread.o pngread.pic.o: png.h pngconf.h -pngrtran.o pngrtran.pic.o: png.h pngconf.h -pngrutil.o pngrutil.pic.o: png.h pngconf.h -pngtrans.o pngtrans.pic.o: png.h pngconf.h -pngwrite.o pngwrite.pic.o: png.h pngconf.h -pngwtran.o pngwtran.pic.o: png.h pngconf.h -pngwutil.o pngwutil.pic.o: png.h pngconf.h -pngpread.o pngpread.pic.o: png.h pngconf.h - -pngtest.o: png.h pngconf.h diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.std b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.std deleted file mode 100644 index 5d1f529..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.std +++ /dev/null @@ -1,89 +0,0 @@ -# makefile for libpng -# Copyright (C) 2002 Glenn Randers-Pehrson -# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. -# For conditions of distribution and use, see copyright notice in png.h - -# where make install puts libpng.a and png.h -prefix=/usr/local -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -# Where the zlib library and include files are located -#ZLIBLIB=/usr/local/lib -#ZLIBINC=/usr/local/include -ZLIBLIB=../zlib -ZLIBINC=../zlib - -CC=cc -CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=5 -LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm - -#RANLIB=echo -RANLIB=ranlib - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -all: libpng.a pngtest - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -pngtest: pngtest.o libpng.a - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - ./pngtest - -install: libpng.a - -@mkdir $(DESTDIR)$(INCPATH) - -@mkdir $(DESTDIR)$(INCPATH)/libpng - -@mkdir $(DESTDIR)$(LIBPATH) - -@rm -f $(DESTDIR)$(INCPATH)/png.h - -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h - cp png.h $(DESTDIR)$(INCPATH)/libpng - cp pngconf.h $(DESTDIR)$(INCPATH)/libpng - chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h - chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h - (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .) - cp libpng.a $(DESTDIR)$(LIBPATH) - chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a - -clean: - rm -f *.o libpng.a pngtest pngout.png - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtest.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h -pngpread.o: png.h pngconf.h - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.sunos b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.sunos deleted file mode 100644 index 70a6e88..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.sunos +++ /dev/null @@ -1,93 +0,0 @@ -# makefile for libpng -# Copyright (C) 2002 Glenn Randers-Pehrson -# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. -# For conditions of distribution and use, see copyright notice in png.h - -# where make install puts libpng.a and png.h -prefix=/usr/local -INCPATH=$(prefix)/include -LIBPATH=$(prefix)/lib - -# override DESTDIR= on the make install command line to easily support -# installing into a temporary location. Example: -# -# make install DESTDIR=/tmp/build/libpng -# -# If you're going to install into a temporary location -# via DESTDIR, $(DESTDIR)$(prefix) must already exist before -# you execute make install. -DESTDIR= - -# Where the zlib library and include files are located -#ZLIBLIB=/usr/local/lib -#ZLIBINC=/usr/local/include -ZLIBLIB=../zlib -ZLIBINC=../zlib - - -WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow -Wconversion \ - -Wmissing-declarations -Wtraditional -Wcast-align \ - -Wstrict-prototypes -Wmissing-prototypes -CC=gcc -CFLAGS=-I$(ZLIBINC) -O # $(WARNMORE) -DPNG_DEBUG=5 -LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm - -RANLIB=ranlib -#RANLIB=echo - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ - pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ - pngwtran.o pngmem.o pngerror.o pngpread.o - -all: libpng.a pngtest - -libpng.a: $(OBJS) - ar rc $@ $(OBJS) - $(RANLIB) $@ - -pngtest: pngtest.o libpng.a - $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) - -test: pngtest - ./pngtest - -install: libpng.a - -@mkdir $(DESTDIR)$(INCPATH) - -@mkdir $(DESTDIR)$(INCPATH)/libpng - -@mkdir $(DESTDIR)$(LIBPATH) - -@rm -f $(DESTDIR)$(INCPATH)/png.h - -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h - cp png.h $(DESTDIR)$(INCPATH)/libpng - cp pngconf.h $(DESTDIR)$(INCPATH)/libpng - chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h - chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h - (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .) - cp libpng.a $(DESTDIR)$(LIBPATH) - chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a - -clean: - rm -f *.o libpng.a pngtest pngout.png - -DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO -writelock: - chmod a-w *.[ch35] $(DOCS) scripts/* - -# DO NOT DELETE THIS LINE -- make depend depends on it. - -png.o: png.h pngconf.h -pngerror.o: png.h pngconf.h -pngrio.o: png.h pngconf.h -pngwio.o: png.h pngconf.h -pngmem.o: png.h pngconf.h -pngset.o: png.h pngconf.h -pngget.o: png.h pngconf.h -pngread.o: png.h pngconf.h -pngrtran.o: png.h pngconf.h -pngrutil.o: png.h pngconf.h -pngtest.o: png.h pngconf.h -pngtrans.o: png.h pngconf.h -pngwrite.o: png.h pngconf.h -pngwtran.o: png.h pngconf.h -pngwutil.o: png.h pngconf.h -pngpread.o: png.h pngconf.h - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.tc3 b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.tc3 deleted file mode 100644 index 21435a6..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.tc3 +++ /dev/null @@ -1,89 +0,0 @@ -# Makefile for libpng -# TurboC/C++ (Note: All modules are compiled in C mode) - -# To use, do "make -fmakefile.tc3" - -# ----- Turbo C 3.00 (can be modified to work with earlier versions) ----- - -MODEL=l -CFLAGS=-O2 -Z -m$(MODEL) -I..\zlib -#CFLAGS=-D_NO_PROTO -O2 -Z -m$(MODEL) -I..\zlib # Turbo C older than 3.00 -CC=tcc -LD=tcc -LIB=tlib -LDFLAGS=-m$(MODEL) -L..\zlib -O=.obj -E=.exe - -# variables -OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) -OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) -OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) -OBJSL1 = +png$(O) +pngset$(O) +pngget$(O) +pngrutil$(O) +pngtrans$(O) -OBJSL2 = +pngwutil$(O) +pngmem$(O) +pngpread$(O) +pngread$(O) +pngerror$(O) -OBJSL3 = +pngwrite$(O) +pngrtran$(O) +pngwtran$(O) +pngrio$(O) +pngwio$(O) - -all: libpng$(MODEL).lib pngtest$(E) - -pngtest: pngtest$(E) - -test: pngtest$(E) - pngtest$(E) - -png$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngset$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngget$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngread$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngpread$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngrtran$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngrutil$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngerror$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngmem$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngrio$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngwio$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngtest$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngtrans$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngwrite$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngwtran$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -pngwutil$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c - -libpng$(MODEL).lib: $(OBJS1) $(OBJS2) $(OBJS3) - $(LIB) libpng$(MODEL) +$(OBJSL1) - $(LIB) libpng$(MODEL) +$(OBJSL2) - $(LIB) libpng$(MODEL) +$(OBJSL3) - -pngtest$(E): pngtest$(O) libpng$(MODEL).lib - $(LD) $(LDFLAGS) pngtest.obj libpng$(MODEL).lib zlib_$(MODEL).lib - -# End of makefile for libpng diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.vcawin32 b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.vcawin32 deleted file mode 100644 index 812dd8f..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.vcawin32 +++ /dev/null @@ -1,94 +0,0 @@ -# makefile for libpng -# Copyright (C) 1998 Tim Wegner -# For conditions of distribution and use, see copyright notice in png.h -# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib -# To use, do "nmake /f scripts\makefile.vcawin32" - -# -------- Microsoft Visual C++ 5.0 and later, uses assembler code -------- - -# Caution: the assembler code was introduced at libpng version 1.0.4 and has -# not yet been thoroughly tested. - -# If you don't want to use assembler code, use makefile.vcwin32 instead. - -CFLAGS=-DPNG_USE_PNGVCRD -Ox -GA3s -nologo -W3 -I..\zlib - -CC=cl -LD=link -LDFLAGS= -O=.obj - -#uncomment next to put error messages in a file -#ERRFILE= >> pngerrs - -# variables -OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) -OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) -OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) pngvcrd$(O) - -all: libpng.lib - -png$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngset$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngget$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngread$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngpread$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngrtran$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngrutil$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngvcrd$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngerror$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngmem$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngrio$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwio$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngtest$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngtrans$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwrite$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwtran$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwutil$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) - echo something to del > libpng.lib - del libpng.lib - lib /OUT:libpng.lib $(OBJS1) $(OBJS2) $(OBJS3) - -pngtest.exe: pngtest.obj libpng.lib - $(LD) $(LDFLAGS) pngtest.obj libpng.lib ..\zlib\zlib.lib /OUT:pngtest.exe /SUBSYSTEM:CONSOLE - -test: pngtest.exe - pngtest - -# End of makefile for libpng - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.vcwin32 b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.vcwin32 deleted file mode 100644 index 64b762e..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.vcwin32 +++ /dev/null @@ -1,87 +0,0 @@ -# makefile for libpng -# Copyright (C) 1998 Tim Wegner -# For conditions of distribution and use, see copyright notice in png.h -# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib -# To use, do "nmake /f scripts\makefile.vcwin32" - -# -------- Microsoft Visual C++ 4.0 and later, no assembler code -------- -# If you want to use assembler code, use makefile.vcawin32 instead. - -CFLAGS= -Ox -GA3s -nologo -W3 -I..\zlib - -CC=cl -LD=link -LDFLAGS= -O=.obj - -#uncomment next to put error messages in a file -#ERRFILE= >> pngerrs - -# variables -OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) -OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) -OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) - -all: libpng.lib - -png$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngset$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngget$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngread$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngpread$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngrtran$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngrutil$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngerror$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngmem$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngrio$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwio$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngtest$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngtrans$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwrite$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwtran$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -pngwutil$(O): png.h pngconf.h - $(CC) -c $(CFLAGS) $*.c $(ERRFILE) - -libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) - echo something to del > libpng.lib - del libpng.lib - lib /OUT:libpng.lib $(OBJS1) $(OBJS2) $(OBJS3) - -pngtest.exe: pngtest.obj libpng.lib - $(LD) $(LDFLAGS) pngtest.obj libpng.lib ..\zlib\zlib.lib /OUT:pngtest.exe /SUBSYSTEM:CONSOLE - -test: pngtest.exe - pngtest - -# End of makefile for libpng - diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.watcom b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.watcom deleted file mode 100644 index 5e860fc..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makefile.watcom +++ /dev/null @@ -1,109 +0,0 @@ -# Makefile for libpng -# Watcom C/C++ 10.0 and later, 32-bit protected mode, flat memory model - -# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is -# copyright 1995 Guy Eric Schalnat, Group 42, Inc. -# For conditions of distribution and use, see copyright notice in png.h - -# To use, do "wmake /f scripts\makefile.watcom" - - -# ---------------------- Watcom C/C++ 10.0 and later ----------------------- - -# Where the zlib library and include files are located -ZLIBLIB=..\zlib -ZLIBINC=..\zlib - -# Target OS -OS=DOS -#OS=NT - -# Target CPU -CPU=6 # Pentium Pro -#CPU=5 # Pentium - -# Calling convention -CALLING=r # registers -#CALLING=s # stack - -# Uncomment next to put error messages in a file -#ERRFILE=>>pngerrs - -# -------------------------------------------------------------------------- - - -CC=wcc386 -CFLAGS=-$(CPU)$(CALLING) -fp$(CPU) -fpi87 -oneatx -mf -bt=$(OS) -i=$(ZLIBINC) -zq -LD=wcl386 -LDFLAGS=-zq - -O=.obj - -OBJS1=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) -OBJS2=pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) -OBJS3=pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O) - - -all: test - -png$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngset$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngget$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngread$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngpread$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngrtran$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngrutil$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngerror$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngmem$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngrio$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngwio$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngtest$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngtrans$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngwrite$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngwtran$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -pngwutil$(O): png.h pngconf.h - $(CC) $(CFLAGS) $*.c $(ERRFILE) - -libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) - wlib -b -c -n -q libpng.lib $(OBJS1) - wlib -b -c -q libpng.lib $(OBJS2) - wlib -b -c -q libpng.lib $(OBJS3) - -pngtest.exe: pngtest.obj libpng.lib - $(LD) $(LDFLAGS) pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib - -test: pngtest.exe .symbolic - pngtest.exe - - -# End of makefile for libpng diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makevms.com b/gtkmm-osx/trunk/libpng-1.2.5/scripts/makevms.com deleted file mode 100644 index b9e3895..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/makevms.com +++ /dev/null @@ -1,144 +0,0 @@ -$! make libpng under VMS -$! -$! -$! Check for MMK/MMS -$! -$! This procedure accepts one parameter (contrib), which causes it to build -$! the programs from the contrib directory instead of libpng. -$! -$ p1 = f$edit(p1,"UPCASE") -$ if p1 .eqs. "CONTRIB" -$ then -$ set def [.contrib.gregbook] -$ @makevms -$ set def [-.pngminus] -$ @makevms -$ set def [--] -$ exit -$ endif -$ Make = "" -$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS" -$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK" -$! -$! Look for the compiler used -$! -$ zlibsrc = "[-.zlib]" -$ ccopt="/include=''zlibsrc'" -$ if f$getsyi("HW_MODEL").ge.1024 -$ then -$ ccopt = "/prefix=all"+ccopt -$ comp = "__decc__=1" -$ if f$trnlnm("SYS").eqs."" then define sys sys$library: -$ else -$ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs."" -$ then -$ if f$trnlnm("SYS").eqs."" then define sys sys$library: -$ if f$search("SYS$SYSTEM:VAXC.EXE").eqs."" -$ then -$ comp = "__gcc__=1" -$ CC :== GCC -$ else -$ comp = "__vaxc__=1" -$ endif -$ else -$ if f$trnlnm("SYS").eqs."" then define sys decc$library_include: -$ ccopt = "/decc/prefix=all"+ccopt -$ comp = "__decc__=1" -$ endif -$ endif -$! -$! Build the thing plain or with mms/mmk -$! -$ write sys$output "Compiling Libpng sources ..." -$ if make.eqs."" -$ then -$ dele pngtest.obj;* -$ CALL MAKE png.OBJ "cc ''CCOPT' png" - - png.c png.h pngconf.h -$ CALL MAKE pngpread.OBJ "cc ''CCOPT' pngpread" - - pngpread.c png.h pngconf.h -$ CALL MAKE pngset.OBJ "cc ''CCOPT' pngset" - - pngset.c png.h pngconf.h -$ CALL MAKE pngget.OBJ "cc ''CCOPT' pngget" - - pngget.c png.h pngconf.h -$ CALL MAKE pngread.OBJ "cc ''CCOPT' pngread" - - pngread.c png.h pngconf.h -$ CALL MAKE pngpread.OBJ "cc ''CCOPT' pngpread" - - pngpread.c png.h pngconf.h -$ CALL MAKE pngrtran.OBJ "cc ''CCOPT' pngrtran" - - pngrtran.c png.h pngconf.h -$ CALL MAKE pngrutil.OBJ "cc ''CCOPT' pngrutil" - - pngrutil.c png.h pngconf.h -$ CALL MAKE pngerror.OBJ "cc ''CCOPT' pngerror" - - pngerror.c png.h pngconf.h -$ CALL MAKE pngmem.OBJ "cc ''CCOPT' pngmem" - - pngmem.c png.h pngconf.h -$ CALL MAKE pngrio.OBJ "cc ''CCOPT' pngrio" - - pngrio.c png.h pngconf.h -$ CALL MAKE pngwio.OBJ "cc ''CCOPT' pngwio" - - pngwio.c png.h pngconf.h -$ CALL MAKE pngtrans.OBJ "cc ''CCOPT' pngtrans" - - pngtrans.c png.h pngconf.h -$ CALL MAKE pngwrite.OBJ "cc ''CCOPT' pngwrite" - - pngwrite.c png.h pngconf.h -$ CALL MAKE pngwtran.OBJ "cc ''CCOPT' pngwtran" - - pngwtran.c png.h pngconf.h -$ CALL MAKE pngwutil.OBJ "cc ''CCOPT' pngwutil" - - pngwutil.c png.h pngconf.h -$ write sys$output "Building Libpng ..." -$ CALL MAKE libpng.OLB "lib/crea libpng.olb *.obj" *.OBJ -$ write sys$output "Building pngtest..." -$ CALL MAKE pngtest.OBJ "cc ''CCOPT' pngtest" - - pngtest.c png.h pngconf.h -$ call make pngtest.exe - - "LINK pngtest,libpng.olb/lib,''zlibsrc'libz.olb/lib" - - pngtest.obj libpng.olb -$ write sys$output "Testing Libpng..." -$ run pngtest -$ else -$ if f$search("DESCRIP.MMS") .eqs. "" then copy/nolog [.SCRIPTS]DESCRIP.MMS [] -$ 'make'/macro=('comp',zlibsrc='zlibsrc') -$ endif -$ write sys$output "Libpng build completed" -$ exit -$! -$! -$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES -$ V = 'F$Verify(0) -$! P1 = What we are trying to make -$! P2 = Command to make it -$! P3 - P8 What it depends on -$ -$ If F$Search(P1) .Eqs. "" Then Goto Makeit -$ Time = F$CvTime(F$File(P1,"RDT")) -$arg=3 -$Loop: -$ Argument = P'arg -$ If Argument .Eqs. "" Then Goto Exit -$ El=0 -$Loop2: -$ File = F$Element(El," ",Argument) -$ If File .Eqs. " " Then Goto Endl -$ AFile = "" -$Loop3: -$ OFile = AFile -$ AFile = F$Search(File) -$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl -$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit -$ Goto Loop3 -$NextEL: -$ El = El + 1 -$ Goto Loop2 -$EndL: -$ arg=arg+1 -$ If arg .Le. 8 Then Goto Loop -$ Goto Exit -$ -$Makeit: -$ VV=F$VERIFY(0) -$ write sys$output P2 -$ 'P2 -$ VV='F$Verify(VV) -$Exit: -$ If V Then Set Verify -$ENDSUBROUTINE diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/pngdef.pas b/gtkmm-osx/trunk/libpng-1.2.5/scripts/pngdef.pas deleted file mode 100644 index 6e20683..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/pngdef.pas +++ /dev/null @@ -1,795 +0,0 @@ -unit pngdef; - -// Caution: this file has fallen out of date since version 1.0.5. Write to -// png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu about volunteering -// to it up to date. - -interface - -const - PNG_LIBPNG_VER_STRING = '1.2.5'; - PNG_LIBPNG_VER = 10205; - -type - png_uint_32 = Cardinal; - png_int_32 = Longint; - png_uint_16 = Word; - png_int_16 = Smallint; - png_byte = Byte; - png_size_t = png_uint_32; - png_charpp = ^png_charp; - png_charp = PChar; - float = single; - int = Integer; - png_bytepp = ^png_bytep; - png_bytep = ^png_byte; - png_uint_16p = ^png_uint_16; - png_uint_16pp = ^png_uint_16p; - png_voidp = pointer; - time_t = Longint; - png_doublep = ^png_double; - png_double = double; - - user_error_ptr = Pointer; - png_error_ptrp = ^png_error_ptr; - png_error_ptr = procedure(png_ptr: Pointer; msg: Pointer); - stdcall; - png_rw_ptrp = ^png_rw_ptr; - png_rw_ptr = procedure(png_ptr: Pointer; data: Pointer; - length: png_size_t); - stdcall; - png_flush_ptrp = ^png_flush_ptr; - png_flush_ptr = procedure(png_ptr: Pointer); - stdcall; - png_progressive_info_ptrp = ^png_progressive_info_ptr; - png_progressive_info_ptr = procedure(png_ptr: Pointer; - info_ptr: Pointer); - stdcall; - png_progressive_end_ptrp = ^png_progressive_end_ptr; - png_progressive_end_ptr = procedure(png_ptr: Pointer; - info_ptr: Pointer); - stdcall; - png_progressive_row_ptrp = ^png_progressive_row_ptr; - png_progressive_row_ptr = procedure(png_ptr: Pointer; - data: Pointer; length: png_uint_32; - count: int); - stdcall; - png_read_status_ptr = procedure(png_ptr: Pointer; - row_number: png_uint_32; pass: int); - stdcall; - png_write_status_ptr = procedure(png_ptr: Pointer; - row_number: png_uint_32; pass: int); - stdcall; - png_user_chunk_ptr = procedure(png_ptr: Pointer; - data: png_unknown_chunkp); - stdcall; - png_user_transform_ptr = procedure(png_ptr: Pointer; - row_info: Pointer; data: png_bytep); - stdcall; - - png_colorpp = ^png_colorp; - png_colorp = ^png_color; - png_color = packed record - red, green, blue: png_byte; - end; - - png_color_16pp = ^png_color_16p; - png_color_16p = ^png_color_16; - png_color_16 = packed record - index: png_byte; //used for palette files - red, green, blue: png_uint_16; //for use in red green blue files - gray: png_uint_16; //for use in grayscale files - end; - - png_color_8pp = ^png_color_8p; - png_color_8p = ^png_color_8; - png_color_8 = packed record - red, green, blue: png_byte; //for use in red green blue files - gray: png_byte; //for use in grayscale files - alpha: png_byte; //for alpha channel files - end; - - png_textpp = ^png_textp; - png_textp = ^png_text; - png_text = packed record - compression: int; //compression value - key: png_charp; //keyword, 1-79 character description of "text" - text: png_charp; //comment, may be empty ("") - text_length: png_size_t; //length of text field - end; - - png_timepp = ^png_timep; - png_timep = ^png_time; - png_time = packed record - year: png_uint_16; //yyyy - month: png_byte; //1..12 - day: png_byte; //1..31 - hour: png_byte; //0..23 - minute: png_byte; //0..59 - second: png_byte; //0..60 (leap seconds) - end; - - png_infopp = ^png_infop; - png_infop = Pointer; - - png_row_infopp = ^png_row_infop; - png_row_infop = ^png_row_info; - png_row_info = packed record - width: png_uint_32; //width of row - rowbytes: png_size_t; //number of bytes in row - color_type: png_byte; //color type of row - bit_depth: png_byte; //bit depth of row - channels: png_byte; //number of channels (1, 2, 3, or 4) - pixel_depth: png_byte; //bits per pixel (depth * channels) - end; - - png_structpp = ^png_structp; - png_structp = Pointer; - -const - -// Supported compression types for text in PNG files (tEXt, and zTXt). -// The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. - - PNG_TEXT_COMPRESSION_NONE_WR = -3; - PNG_TEXT_COMPRESSION_zTXt_WR = -2; - PNG_TEXT_COMPRESSION_NONE = -1; - PNG_TEXT_COMPRESSION_zTXt = 0; - -// These describe the color_type field in png_info. -// color type masks - - PNG_COLOR_MASK_PALETTE = 1; - PNG_COLOR_MASK_COLOR = 2; - PNG_COLOR_MASK_ALPHA = 4; - -// color types. Note that not all combinations are legal - - PNG_COLOR_TYPE_GRAY = 0; - PNG_COLOR_TYPE_PALETTE = PNG_COLOR_MASK_COLOR or - PNG_COLOR_MASK_PALETTE; - PNG_COLOR_TYPE_RGB = PNG_COLOR_MASK_COLOR; - PNG_COLOR_TYPE_RGB_ALPHA = PNG_COLOR_MASK_COLOR or - PNG_COLOR_MASK_ALPHA; - PNG_COLOR_TYPE_GRAY_ALPHA = PNG_COLOR_MASK_ALPHA; - -// This is for compression type. PNG 1.0 only defines the single type. - - PNG_COMPRESSION_TYPE_BASE = 0; // Deflate method 8, 32K window - PNG_COMPRESSION_TYPE_DEFAULT = PNG_COMPRESSION_TYPE_BASE; - -// This is for filter type. PNG 1.0 only defines the single type. - - PNG_FILTER_TYPE_BASE = 0; // Single row per-byte filtering - PNG_FILTER_TYPE_DEFAULT = PNG_FILTER_TYPE_BASE; - -// These are for the interlacing type. These values should NOT be changed. - - PNG_INTERLACE_NONE = 0; // Non-interlaced image - PNG_INTERLACE_ADAM7 = 1; // Adam7 interlacing - -// These are for the oFFs chunk. These values should NOT be changed. - - PNG_OFFSET_PIXEL = 0; // Offset in pixels - PNG_OFFSET_MICROMETER = 1; // Offset in micrometers (1/10^6 meter) - -// These are for the pCAL chunk. These values should NOT be changed. - - PNG_EQUATION_LINEAR = 0; // Linear transformation - PNG_EQUATION_BASE_E = 1; // Exponential base e transform - PNG_EQUATION_ARBITRARY = 2; // Arbitrary base exponential transform - PNG_EQUATION_HYPERBOLIC = 3; // Hyperbolic sine transformation - -// These are for the pHYs chunk. These values should NOT be changed. - - PNG_RESOLUTION_UNKNOWN = 0; // pixels/unknown unit (aspect ratio) - PNG_RESOLUTION_METER = 1; // pixels/meter - -// These are for the sRGB chunk. These values should NOT be changed. - PNG_sRGB_INTENT_PERCEPTUAL = 0; - PNG_sRGB_INTENT_RELATIVE = 1; - PNG_sRGB_INTENT_SATURATION = 2; - PNG_sRGB_INTENT_ABSOLUTE = 3; - -// Handle alpha and tRNS by replacing with a background color. - PNG_BACKGROUND_GAMMA_UNKNOWN = 0; - PNG_BACKGROUND_GAMMA_SCREEN = 1; - PNG_BACKGROUND_GAMMA_FILE = 2; - PNG_BACKGROUND_GAMMA_UNIQUE = 3; - -// Values for png_set_crc_action() to say how to handle CRC errors in -// ancillary and critical chunks, and whether to use the data contained -// therein. Note that it is impossible to "discard" data in a critical -// chunk. For versions prior to 0.90, the action was always error/quit, -// whereas in version 0.90 and later, the action for CRC errors in ancillary -// chunks is warn/discard. These values should NOT be changed. - -// value action:critical action:ancillary - - PNG_CRC_DEFAULT = 0; // error/quit warn/discard data - PNG_CRC_ERROR_QUIT = 1; // error/quit error/quit - PNG_CRC_WARN_DISCARD = 2; // (INVALID) warn/discard data - PNG_CRC_WARN_USE = 3; // warn/use data warn/use data - PNG_CRC_QUIET_USE = 4; // quiet/use data quiet/use data - PNG_CRC_NO_CHANGE = 5; // use current value use current value - -// Flags for png_set_filter() to say which filters to use. The flags -// are chosen so that they don't conflict with real filter types -// below, in case they are supplied instead of the #defined constants. -// These values should NOT be changed. - - PNG_NO_FILTERS = $00; - PNG_FILTER_NONE = $08; - PNG_FILTER_SUB = $10; - PNG_FILTER_UP = $20; - PNG_FILTER_AVG = $40; - PNG_FILTER_PAETH = $80; - PNG_ALL_FILTERS = PNG_FILTER_NONE or PNG_FILTER_SUB or - PNG_FILTER_UP or PNG_FILTER_AVG or - PNG_FILTER_PAETH; - -// Filter values (not flags) - used in pngwrite.c, pngwutil.c for now. -// These defines should NOT be changed. - - PNG_FILTER_VALUE_NONE = 0; - PNG_FILTER_VALUE_SUB = 1; - PNG_FILTER_VALUE_UP = 2; - PNG_FILTER_VALUE_AVG = 3; - PNG_FILTER_VALUE_PAETH = 4; - -// Heuristic used for row filter selection. These defines should NOT be -// changed. - - PNG_FILTER_HEURISTIC_DEFAULT = 0; // Currently "UNWEIGHTED" - PNG_FILTER_HEURISTIC_UNWEIGHTED = 1; // Used by libpng < 0.95 - PNG_FILTER_HEURISTIC_WEIGHTED = 2; // Experimental feature - PNG_FILTER_HEURISTIC_LAST = 3; // Not a valid value - -procedure png_build_grayscale_palette(bit_depth: int; palette: png_colorp); - stdcall; -function png_check_sig(sig: png_bytep; num: int): int; - stdcall; -procedure png_chunk_error(png_ptr: png_structp; - const mess: png_charp); - stdcall; -procedure png_chunk_warning(png_ptr: png_structp; - const mess: png_charp); - stdcall; -procedure png_convert_from_time_t(ptime: png_timep; ttime: time_t); - stdcall; -function png_convert_to_rfc1123(png_ptr: png_structp; ptime: png_timep): - png_charp; - stdcall; -function png_create_info_struct(png_ptr: png_structp): png_infop; - stdcall; -function png_create_read_struct(user_png_ver: png_charp; - error_ptr: user_error_ptr; error_fn: png_error_ptr; - warn_fn: png_error_ptr): png_structp; - stdcall; -function png_get_copyright(png_ptr: png_structp): png_charp; - stdcall; -function png_get_header_ver(png_ptr: png_structp): png_charp; - stdcall; -function png_get_header_version(png_ptr: png_structp): png_charp; - stdcall; -function png_get_libpng_ver(png_ptr: png_structp): png_charp; - stdcall; -function png_create_write_struct(user_png_ver: png_charp; - error_ptr: user_error_ptr; error_fn: png_error_ptr; - warn_fn: png_error_ptr): png_structp; - stdcall; -procedure png_destroy_info_struct(png_ptr: png_structp; - info_ptr_ptr: png_infopp); - stdcall; -procedure png_destroy_read_struct(png_ptr_ptr: png_structpp; - info_ptr_ptr, end_info_ptr_ptr: png_infopp); - stdcall; -procedure png_destroy_write_struct(png_ptr_ptr: png_structpp; - info_ptr_ptr: png_infopp); - stdcall; -function png_get_IHDR(png_ptr: png_structp; info_ptr: png_infop; - var width, height: png_uint_32; var bit_depth, - color_type, interlace_type, compression_type, - filter_type: int): png_uint_32; - stdcall; -function png_get_PLTE(png_ptr: png_structp; info_ptr: png_infop; - var palette: png_colorp; var num_palette: int): - png_uint_32; - stdcall; -function png_get_bKGD(png_ptr: png_structp; info_ptr: png_infop; - var background: png_color_16p): png_uint_32; - stdcall; -function png_get_bit_depth(png_ptr: png_structp; info_ptr: png_infop): - png_byte; - stdcall; -function png_get_cHRM(png_ptr: png_structp; info_ptr: png_infop; - var white_x, white_y, red_x, red_y, green_x, green_y, - blue_x, blue_y: double): png_uint_32; - stdcall; -function png_get_channels(png_ptr: png_structp; info_ptr: png_infop): - png_byte; - stdcall; -function png_get_color_type(png_ptr: png_structp; info_ptr: png_infop): - png_byte; - stdcall; -function png_get_compression_type(png_ptr: png_structp; - info_ptr: png_infop): png_byte; - stdcall; -function png_get_error_ptr(png_ptr: png_structp): png_voidp; - stdcall; -function png_get_filter_type(png_ptr: png_structp; info_ptr: png_infop): - png_byte; - stdcall; -function png_get_gAMA(png_ptr: png_structp; info_ptr: png_infop; - var file_gamma: double): png_uint_32; - stdcall; -function png_get_hIST(png_ptr: png_structp; info_ptr: png_infop; - var hist: png_uint_16p): png_uint_32; - stdcall; -function png_get_image_height(png_ptr: png_structp; info_ptr: png_infop): - png_uint_32; - stdcall; -function png_get_image_width(png_ptr: png_structp; info_ptr: png_infop): - png_uint_32; - stdcall; -function png_get_interlace_type(png_ptr: png_structp; - info_ptr: png_infop): png_byte; - stdcall; -function png_get_io_ptr(png_ptr: png_structp): png_voidp; - stdcall; -function png_get_oFFs(png_ptr: png_structp; info_ptr: png_infop; - var offset_x, offset_y: png_uint_32; - var unit_type: int): png_uint_32; - stdcall; -function png_get_sCAL(png_ptr: png_structp; info_ptr: png_infop; - var unit:int; var width: png_uint_32; height: png_uint_32): - png_uint_32; - stdcall -function png_get_pCAL(png_ptr: png_structp; info_ptr: png_infop; - var purpose: png_charp; var X0, X1: png_int_32; - var typ, nparams: int; var units: png_charp; - var params: png_charpp): png_uint_32; - stdcall; -function png_get_pHYs(png_ptr: png_structp; info_ptr: png_infop; - var res_x, res_y: png_uint_32; var unit_type: int): - png_uint_32; - stdcall; -function png_get_pixel_aspect_ratio(png_ptr: png_structp; - info_ptr: png_infop): float; - stdcall; -function png_get_pixels_per_meter(png_ptr: png_structp; - info_ptr: png_infop): png_uint_32; - stdcall; -function png_get_progressive_ptr(png_ptr: png_structp): png_voidp; - stdcall; -function png_get_rgb_to_gray_status(png_ptr: png_structp); - stdcall; -function png_get_rowbytes(png_ptr: png_structp; info_ptr: png_infop): - png_uint_32; - stdcall; -function png_get_rows(png_ptr: png_structp; info_ptr: png_infop): - png_bytepp; - stdcall; -function png_get_sBIT(png_ptr: png_structp; info_ptr: png_infop; - var sig_bits: png_color_8p): png_uint_32; - stdcall; -function png_get_sRGB(png_ptr: png_structp; info_ptr: png_infop; - var file_srgb_intent: int): png_uint_32; - stdcall; -function png_get_signature(png_ptr: png_structp; info_ptr: png_infop): - png_bytep; - stdcall; -function png_get_tIME(png_ptr: png_structp; info_ptr: png_infop; - var mod_time: png_timep): png_uint_32; - stdcall; -function png_get_tRNS(png_ptr: png_structp; info_ptr: png_infop; - var trans: png_bytep; var num_trans: int; - var trans_values: png_color_16p): png_uint_32; - stdcall; -function png_get_text(png_ptr: png_structp; info_ptr: png_infop; - var text_ptr: png_textp; var num_text: int): - png_uint_32; - stdcall; -function png_get_user_chunk_ptr(png_ptr: png_structp): - png_voidp; - stdcall; -function png_get_valid(png_ptr: png_structp; info_ptr: png_infop; - flag: png_uint_32): png_uint_32; - stdcall; -function png_get_x_offset_microns(png_ptr: png_structp; - info_ptr: png_infop): png_uint_32; - stdcall; -function png_get_x_offset_pixels(png_ptr: png_structp; - info_ptr: png_infop): png_uint_32; - stdcall; -function png_get_x_pixels_per_meter(png_ptr: png_structp; - info_ptr: png_infop): png_uint_32; - stdcall; -function png_get_y_offset_microns(png_ptr: png_structp; - info_ptr: png_infop): png_uint_32; - stdcall; -function png_get_y_offset_pixels(png_ptr: png_structp; - info_ptr: png_infop): png_uint_32; - stdcall; -function png_get_y_pixels_per_meter(png_ptr: png_structp; - info_ptr: png_infop): png_uint_32; - stdcall; -procedure png_process_data(png_ptr: png_structp; info_ptr: png_infop; - buffer: png_bytep; buffer_size: png_size_t); - stdcall; -procedure png_progressive_combine_row(png_ptr: png_structp; - old_row, new_row: png_bytep); - stdcall; -procedure png_read_end(png_ptr: png_structp; info_ptr: png_infop); - stdcall; -procedure png_read_image(png_ptr: png_structp; image: png_bytepp); - stdcall; -procedure png_read_info(png_ptr: png_structp; info_ptr: png_infop); - stdcall; -procedure png_read_row(png_ptr: png_structp; row, dsp_row: png_bytep); - stdcall; -procedure png_read_rows(png_ptr: png_structp; row, display_row: - png_bytepp; num_rows: png_uint_32); - stdcall; -procedure png_read_update_info(png_ptr: png_structp; info_ptr: png_infop); - stdcall; -procedure png_set_IHDR(png_ptr: png_structp; info_ptr: png_infop; - width, height: png_uint_32; bit_depth, color_type, - interlace_type, compression_type, filter_type: int); - stdcall; -procedure png_set_PLTE(png_ptr: png_structp; info_ptr: png_infop; - palette: png_colorp; num_palette: int); - stdcall; -procedure png_set_bKGD(png_ptr: png_structp; info_ptr: png_infop; - background: png_color_16p); - stdcall; -procedure png_set_background(png_ptr: png_structp; - background_color: png_color_16p; - background_gamma_code, need_expand: int; - background_gamma: double); - stdcall; -procedure png_set_bgr(png_ptr: png_structp); - stdcall; -procedure png_set_cHRM(png_ptr: png_structp; info_ptr: png_infop; - white_x, white_y, red_x, red_y, green_x, green_y, - blue_x, blue_y: double); - stdcall; -procedure png_set_cHRM_fixed(png_ptr: png_structp; info_ptr: png_infop; - white_x, white_y, red_x, red_y, green_x, green_y, - blue_x, blue_y: png_fixed_point); - stdcall; -procedure png_set_compression_level(png_ptr: png_structp; level: int); - stdcall; -procedure png_set_compression_mem_level(png_ptr: png_structp; - mem_level: int); - stdcall; -procedure png_set_compression_method(png_ptr: png_structp; method: int); - stdcall; -procedure png_set_compression_strategy(png_ptr: png_structp; - strategy: int); - stdcall; -procedure png_set_compression_window_bits(png_ptr: png_structp; - window_bits: int); - stdcall; -procedure png_set_crc_action(png_ptr: png_structp; - crit_action, ancil_action: int); - stdcall; -procedure png_set_dither(png_ptr: png_structp; plaette: png_colorp; - num_palette, maximum_colors: int; - histogram: png_uint_16p; full_dither: int); - stdcall; -procedure png_set_error_fn(png_ptr: png_structp; error_ptr: png_voidp; - error_fn, warning_fn: png_error_ptr); - stdcall; -procedure png_set_expand(png_ptr: png_structp); - stdcall; -procedure png_set_filler(png_ptr: png_structp; filler: png_uint_32; - filler_loc: int); - stdcall; -procedure png_set_filter(png_ptr: png_structp; method, filters: int); - stdcall; -procedure png_set_filter_heuristics(png_ptr: png_structp; - heuristic_method, num_weights: int; - filter_weights, filter_costs: png_doublep); - stdcall; -procedure png_set_flush(png_ptr: png_structp; nrows: int); - stdcall; -procedure png_set_gAMA(png_ptr: png_structp; info_ptr: png_infop; - file_gamma: double); - stdcall; -procedure png_set_gAMA_fixed(png_ptr: png_structp; info_ptr: png_infop; - file_gamma: png_fixed_point); - stdcall; -procedure png_set_gamma(png_ptr: png_structp; screen_gamma, - default_file_gamma: double); - stdcall; -procedure png_set_gray_1_2_4_to_8(png_ptr: png_structp); - stdcall; -procedure png_set_gray_to_rgb(png_ptr: png_structp); - stdcall; -procedure png_set_hIST(png_ptr: png_structp; info_ptr: png_infop; - hist: png_uint_16p); - stdcall; -function png_set_interlace_handling(png_ptr: png_structp): int; - stdcall; -procedure png_set_invalid(png_ptr: png_structp; info_ptr:png_infop; - mask: int); - stdcall; -procedure png_set_invert_alpha(png_ptr: png_structp); - stdcall; -procedure png_set_invert_mono(png_ptr: png_structp); - stdcall; -procedure png_set_oFFs(png_ptr: png_structp; info_ptr: png_infop; - offset_x, offset_y: png_uint_32; unit_type: int); - stdcall; -procedure png_set_palette_to_rgb(png_ptr: png_structp); - stdcall; -procedure png_set_pCAL(png_ptr: png_structp; info_ptr: png_infop; - purpose: png_charp; X0, X1: png_int_32; - typ, nparams: int; units: png_charp; - params: png_charpp); - stdcall; -procedure png_set_pHYs(png_ptr: png_structp; info_ptr: png_infop; - res_x, res_y: png_uint_32; unit_type: int); - stdcall; -procedure png_set_packing(png_ptr: png_structp); - stdcall; -procedure png_set_packswap(png_ptr: png_structp); - stdcall; -procedure png_set_progressive_read_fn(png_ptr: png_structp; - progressive_ptr: png_voidp; - info_fn: png_progressive_info_ptr; - row_fn: png_progressive_row_ptr; - end_fn: png_progressive_end_ptr); - stdcall; -procedure png_set_read_fn(png_ptr: png_structp; - io_ptr: png_voidp; read_data_fn: png_rw_ptr); - stdcall; -procedure png_set_read_status_fn(png_ptr: png_structp; - read_row_fn: png_read_status_ptr); - stdcall; -procedure png_set_read_user_chunk_fn(png_ptr: png_structp; - read_user_chunk_fn: png_user_chunk_ptr); - stdcall; -procedure png_set_read_user_transform_fn(png_ptr: png_structp; - read_user_transform_fn: png_user_transform_ptr); - stdcall; -procedure png_set_rgb_to_gray(png_ptr: png_structp; int: error_action; - red_weight, green_weight: double); - stdcall; -procedure png_set_rgb_to_gray_fixed(png_ptr: png_structp; int: error_action; - red_weight, green_weight: png_fixed_point); - stdcall; -procedure png_set_rows(png_ptr: png_structp; info_ptr: png_infop; - row_pointers: png_bytepp); - stdcall; -procedure png_set_sBIT(png_ptr: png_structp; info_ptr: png_infop; - sig_bits: png_color_8p); - stdcall; -procedure png_set_sRGB(png_ptr: png_structp; info_ptr: png_infop; - intent: int); - stdcall; -procedure png_set_sRGB_gAMA_and_cHRM(png_ptr: png_structp; - info_ptr: png_infop; intent: int); - stdcall; -procedure png_set_shift(png_ptr: png_structp; true_bits: png_color_8p); - stdcall; -procedure png_set_sig_bytes(png_ptr: png_structp; num_bytes: int); - stdcall; -procedure png_set_strip_16(png_ptr: png_structp); - stdcall; -procedure png_set_strip_alpha(png_ptr: png_structp); - stdcall; -procedure png_set_swap(png_ptr: png_structp); - stdcall; -procedure png_set_swap_alpha(png_ptr: png_structp); - stdcall; -procedure png_set_tIME(png_ptr: png_structp; info_ptr: png_infop; - mod_time: png_timep); - stdcall; -procedure png_set_tRNS(png_ptr: png_structp; info_ptr: png_infop; - trans: png_bytep; num_trans: int; - trans_values: png_color_16p); - stdcall; -procedure png_set_tRNS_to_alpha(png_ptr: png_structp); - stdcall; -procedure png_set_text(png_ptr: png_structp; info_ptr: png_infop; - text_ptr: png_textp; num_text: int); - stdcall; -procedure png_set_write_fn(png_ptr: png_structp; - io_ptr: png_voidp; write_data_fn: png_rw_ptr; - output_flush_fn: png_flush_ptr); - stdcall; -procedure png_set_write_status_fn(png_ptr: png_structp; - write_row_fn: png_write_status_ptr); - stdcall; -procedure png_set_write_user_transform_fn(png_ptr: png_structp; - write_user_transform_fn: png_user_transform_ptr); - stdcall; -function png_sig_cmp(sig: png_bytep; start, num_to_check: png_size_t): - int; - stdcall; -procedure png_start_read_image(png_ptr: png_structp); - stdcall; -procedure png_write_chunk(png_ptr: png_structp; - chunk_name, data: png_bytep; length: png_size_t); - stdcall; -procedure png_write_chunk_data(png_ptr: png_structp; - data: png_bytep; length: png_size_t); - stdcall; -procedure png_write_chunk_end(png_ptr: png_structp); - stdcall; -procedure png_write_chunk_start(png_ptr: png_structp; - chunk_name: png_bytep; length: png_uint_32); - stdcall; -procedure png_write_end(png_ptr: png_structp; info_ptr: png_infop); - stdcall; -procedure png_write_flush(png_ptr: png_structp); - stdcall; -procedure png_write_image(png_ptr: png_structp; image: png_bytepp); - stdcall; -procedure png_write_info(png_ptr: png_structp; info_ptr: png_infop); - stdcall; -procedure png_write_info_before_PLTE(png_ptr: png_structp; info_ptr: png_infop); - stdcall; -procedure png_write_row(png_ptr: png_structp; row: png_bytep); - stdcall; -procedure png_write_rows(png_ptr: png_structp; row: png_bytepp; - num_rows: png_uint_32); - stdcall; -procedure png_get_iCCP(png_ptr: png_structp; info_ptr: png_infop; - name: png_charpp; compression_type: int *; profile: png_charpp; - proflen: png_int_32): png_bytep; - stdcall; -procedure png_get_sPLT(png_ptr: png_structp; - info_ptr: png_infop; entries: png_spalette_pp): png_uint_32; - stdcall; -procedure png_set_iCCP(png_ptr: png_structp; info_ptr: png_infop; - name: png_charp; compression_type: int; profile: png_charp; - proflen: int); - stdcall; -procedure png_free_data(png_ptr: png_structp; info_ptr: png_infop; num: int); - stdcall; -procedure png_set_sPLT(png_ptr: png_structp; info_ptr: png_infop; - entries: png_spalette_p; nentries: int); - stdcall; - -implementation - -const - pngDLL = 'png32bd.dll'; - -procedure png_build_grayscale_palette; external pngDLL; -function png_check_sig; external pngDLL; -procedure png_chunk_error; external pngDLL; -procedure png_chunk_warning; external pngDLL; -procedure png_convert_from_time_t; external pngDLL; -function png_convert_to_rfc1123; external pngDLL; -function png_create_info_struct; external pngDLL; -function png_create_read_struct; external pngDLL; -function png_create_write_struct; external pngDLL; -procedure png_destroy_info_struct; external pngDLL; -procedure png_destroy_read_struct; external pngDLL; -procedure png_destroy_write_struct; external pngDLL; -function png_get_IHDR; external pngDLL; -function png_get_PLTE; external pngDLL; -function png_get_bKGD; external pngDLL; -function png_get_bit_depth; external pngDLL; -function png_get_cHRM; external pngDLL; -function png_get_channels; external pngDLL; -function png_get_color_type; external pngDLL; -function png_get_compression_type; external pngDLL; -function png_get_error_ptr; external pngDLL; -function png_get_filter_type; external pngDLL; -function png_get_gAMA; external pngDLL; -function png_get_hIST; external pngDLL; -function png_get_image_height; external pngDLL; -function png_get_image_width; external pngDLL; -function png_get_interlace_type; external pngDLL; -function png_get_io_ptr; external pngDLL; -function png_get_oFFs; external pngDLL; -function png_get_pCAL; external pngDLL; -function png_get_pHYs; external pngDLL; -function png_get_pixel_aspect_ratio; external pngDLL; -function png_get_pixels_per_meter; external pngDLL; -function png_get_progressive_ptr; external pngDLL; -function png_get_rowbytes; external pngDLL; -function png_get_rows; external pngDLL; -function png_get_sBIT; external pngDLL; -function png_get_sRGB; external pngDLL; -function png_get_signature; external pngDLL; -function png_get_tIME; external pngDLL; -function png_get_tRNS; external pngDLL; -function png_get_text; external pngDLL; -function png_get_user_chunk_ptr; external pngDLL; -function png_get_valid; external pngDLL; -function png_get_x_offset_microns; external pngDLL; -function png_get_x_offset_pixels; external pngDLL; -function png_get_x_pixels_per_meter; external pngDLL; -function png_get_y_offset_microns; external pngDLL; -function png_get_y_offset_pixels; external pngDLL; -function png_get_y_pixels_per_meter; external pngDLL; -procedure png_process_data; external pngDLL; -procedure png_progressive_combine_row; external pngDLL; -procedure png_read_end; external pngDLL; -procedure png_read_image; external pngDLL; -procedure png_read_info; external pngDLL; -procedure png_read_row; external pngDLL; -procedure png_read_rows; external pngDLL; -procedure png_read_update_info; external pngDLL; -procedure png_set_IHDR; external pngDLL; -procedure png_set_PLTE; external pngDLL; -procedure png_set_bKGD; external pngDLL; -procedure png_set_background; external pngDLL; -procedure png_set_bgr; external pngDLL; -procedure png_set_cHRM; external pngDLL; -procedure png_set_cHRM_fixed; external pngDLL; -procedure png_set_compression_level; external pngDLL; -procedure png_set_compression_mem_level; external pngDLL; -procedure png_set_compression_method; external pngDLL; -procedure png_set_compression_strategy; external pngDLL; -procedure png_set_compression_window_bits; external pngDLL; -procedure png_set_crc_action; external pngDLL; -procedure png_set_dither; external pngDLL; -procedure png_set_error_fn; external pngDLL; -procedure png_set_expand; external pngDLL; -procedure png_set_filler; external pngDLL; -procedure png_set_filter; external pngDLL; -procedure png_set_filter_heuristics; external pngDLL; -procedure png_set_flush; external pngDLL; -procedure png_set_gAMA; external pngDLL; -procedure png_set_gAMA_fixed; external pngDLL; -procedure png_set_gamma; external pngDLL; -procedure png_set_gray_to_rgb; external pngDLL; -procedure png_set_hIST; external pngDLL; -function png_set_interlace_handling; external pngDLL; -procedure png_set_invert_alpha; external pngDLL; -procedure png_set_invert_mono; external pngDLL; -procedure png_set_oFFs; external pngDLL; -procedure png_set_pCAL; external pngDLL; -procedure png_set_pHYs; external pngDLL; -procedure png_set_packing; external pngDLL; -procedure png_set_packswap; external pngDLL; -procedure png_set_progressive_read_fn; external pngDLL; -procedure png_set_read_fn; external pngDLL; -procedure png_set_read_status_fn; external pngDLL; -procedure png_set_read_user_transform_fn; external pngDLL; -procedure png_set_rgb_to_gray; external pngDLL; -procedure png_set_rgb_to_gray_fixed; external pngDLL; -procedure png_set_rows; external pngDLL; -procedure png_set_sBIT; external pngDLL; -procedure png_set_sRGB; external pngDLL; -procedure png_set_sRGB_gAMA_and_cHRM; external pngDLL; -procedure png_set_shift; external pngDLL; -procedure png_set_sig_bytes; external pngDLL; -procedure png_set_strip_16; external pngDLL; -procedure png_set_strip_alpha; external pngDLL; -procedure png_set_swap; external pngDLL; -procedure png_set_swap_alpha; external pngDLL; -procedure png_set_tIME; external pngDLL; -procedure png_set_tRNS; external pngDLL; -procedure png_set_text; external pngDLL; -procedure png_set_user_chunk_fn; external pngDLL; -procedure png_set_write_fn; external pngDLL; -procedure png_set_write_status_fn; external pngDLL; -procedure png_set_write_user_transform_fn; external pngDLL; -function png_sig_cmp; external pngDLL; -procedure png_start_read_image; external pngDLL; -procedure png_write_chunk; external pngDLL; -procedure png_write_chunk_data; external pngDLL; -procedure png_write_chunk_end; external pngDLL; -procedure png_write_chunk_start; external pngDLL; -procedure png_write_end; external pngDLL; -procedure png_write_flush; external pngDLL; -procedure png_write_image; external pngDLL; -procedure png_write_info; external pngDLL; -procedure png_write_info_before_PLTE; external pngDLL; -procedure png_write_row; external pngDLL; -procedure png_write_rows; external pngDLL; -procedure png_get_iCCP; external pngDLL; -procedure png_get_sPLT; external pngDLL; -procedure png_set_iCCP; external pngDLL; -procedure png_set_sPLT; external pngDLL; -procedure png_free_data; external pngDLL; - -end. diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/pngos2.def b/gtkmm-osx/trunk/libpng-1.2.5/scripts/pngos2.def deleted file mode 100644 index 3c4a3c8..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/pngos2.def +++ /dev/null @@ -1,241 +0,0 @@ -;---------------------------------------- -; PNG.LIB module definition file for OS/2 -;---------------------------------------- - -; Version 1.2.5 - -LIBRARY PNG -DESCRIPTION "PNG image compression library for OS/2" -CODE PRELOAD MOVEABLE DISCARDABLE -DATA PRELOAD MOVEABLE MULTIPLE - -EXPORTS - - - png_build_grayscale_palette - png_check_sig - png_chunk_error - png_chunk_warning - png_convert_from_struct_tm - png_convert_from_time_t - png_create_info_struct - png_create_read_struct - png_create_write_struct - png_data_freer - png_destroy_info_struct - png_destroy_read_struct - png_destroy_write_struct - png_error - png_free - png_free_data - png_get_IHDR - png_get_PLTE - png_get_bKGD - png_get_bit_depth - png_get_cHRM - png_get_cHRM_fixed - png_get_channels - png_get_color_type - png_get_compression_buffer_size - png_get_compression_type - png_get_copyright - png_get_error_ptr - png_get_filter_type - png_get_gAMA - png_get_gAMA_fixed - png_get_hIST - png_get_header_ver - png_get_header_version - png_get_iCCP - png_get_image_height - png_get_image_width - png_get_interlace_type - png_get_io_ptr - png_get_libpng_ver - png_get_oFFs - png_get_pCAL - png_get_pHYs - png_get_pixel_aspect_ratio - png_get_pixels_per_meter - png_get_progressive_ptr - png_get_rgb_to_gray_status - png_get_rowbytes - png_get_rows - png_get_sBIT - png_get_sCAL - png_get_sPLT - png_get_sRGB - png_get_signature - png_get_tIME - png_get_tRNS - png_get_text - png_get_unknown_chunks - png_get_user_chunk_ptr - png_get_user_transform_ptr - png_get_valid - png_get_x_offset_microns - png_get_x_offset_pixels - png_get_x_pixels_per_meter - png_get_y_offset_microns - png_get_y_offset_pixels - png_get_y_pixels_per_meter - png_malloc - png_memcpy_check - png_memset_check - png_permit_empty_plte - png_process_data - png_progressive_combine_row - png_read_end - png_read_image - png_read_info - png_read_init ; deprecated - png_read_png - png_read_row - png_read_rows - png_read_update_info - png_reset_zstream - png_set_IHDR - png_set_PLTE - png_set_bKGD - png_set_background - png_set_bgr - png_set_cHRM - png_set_cHRM_fixed - png_set_compression_buffer_size - png_set_compression_level - png_set_compression_mem_level - png_set_compression_method - png_set_compression_strategy - png_set_compression_window_bits - png_set_crc_action - png_set_dither - png_set_error_fn - png_set_expand - png_set_filler - png_set_filter - png_set_filter_heuristics - png_set_flush - png_set_gAMA - png_set_gAMA_fixed - png_set_gamma - png_set_gray_1_2_4_to_8 - png_set_gray_to_rgb - png_set_hIST - png_set_iCCP - png_set_interlace_handling - png_set_invert_alpha - png_set_invert_mono - png_set_keep_unknown_chunks - png_set_oFFs - png_set_pCAL - png_set_pHYs - png_set_packing - png_set_packswap - png_set_palette_to_rgb - png_set_progressive_read_fn - png_set_read_fn - png_set_read_status_fn - png_set_read_user_chunk_fn - png_set_read_user_transform_fn - png_set_rgb_to_gray - png_set_rgb_to_gray_fixed - png_set_rows - png_set_sBIT - png_set_sCAL - png_set_sPLT - png_set_sRGB - png_set_sRGB_gAMA_and_cHRM - png_set_shift - png_set_sig_bytes - png_set_strip_16 - png_set_strip_alpha - png_set_swap - png_set_swap_alpha - png_set_tIME - png_set_tRNS - png_set_tRNS_to_alpha - png_set_text - png_set_unknown_chunk_location - png_set_unknown_chunks - png_set_user_transform_info - png_set_write_fn - png_set_write_status_fn - png_set_write_user_transform_fn - png_sig_cmp - png_start_read_image - png_warning - png_write_chunk - png_write_chunk_data - png_write_chunk_end - png_write_chunk_start - png_write_end - png_write_flush - png_write_image - png_write_info - png_write_info_before_PLTE - png_write_init ; deprecated - png_write_png - png_write_row - png_write_rows - png_read_init_2 - png_write_init_2 - png_access_version_number - png_init_io - png_convert_to_rfc1123 - png_set_invalid - -; Added at version 1.2.0: - png_mmx_support - png_permit_empty_plte - png_permit_mng_features - png_get_mmx_flagmask - png_get_asm_flagmask - png_get_asm_flags - png_get_mmx_bitdepth_threshold - png_get_mmx_rowbytes_threshold - png_set_asm_flags - png_init_mmx_flags - -; Added at version 1.2.2: - png_handle_as_unknown - -; Added at version 1.2.2 and deleted from 1.2.3: -; png_zalloc -; png_zfree - -; Added at version 1.2.4 - png_malloc_warn - -; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS - png_libpng_ver - png_pass_start - png_pass_inc - png_pass_ystart - png_pass_yinc - png_pass_mask - png_pass_dsp_mask -; png_pass_width -; png_pass_height - -; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS - png_IHDR - png_IDAT - png_IEND - png_PLTE - png_bKGD - png_cHRM - png_gAMA - png_hIST - png_iCCP - png_iTXt - png_oFFs - png_pCAL - png_pHYs - png_sBIT - png_sCAL - png_sPLT - png_sRGB - png_tEXt - png_tIME - png_tRNS - png_zTXt diff --git a/gtkmm-osx/trunk/libpng-1.2.5/scripts/smakefile.ppc b/gtkmm-osx/trunk/libpng-1.2.5/scripts/smakefile.ppc deleted file mode 100644 index e5c0278..0000000 --- a/gtkmm-osx/trunk/libpng-1.2.5/scripts/smakefile.ppc +++ /dev/null @@ -1,30 +0,0 @@ -# Amiga powerUP (TM) Makefile -# makefile for libpng and SAS C V6.58/7.00 PPC compiler -# Copyright (C) 1998 by Andreas R. Kleinert -# For conditions of distribution and use, see copyright notice in png.h - -CC = scppc -CFLAGS = NOSTKCHK NOSINT OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL IDIR /zlib \ - OPTLOOP OPTRDEP=8 OPTDEP=8 OPTCOMP=8 -LIBNAME = libpng.a -AR = ppc-amigaos-ar -AR_FLAGS = cr -RANLIB = ppc-amigaos-ranlib -LDFLAGS = -r -o -LDLIBS = ../zlib/libzip.a LIB:scppc.a -LN = ppc-amigaos-ld -RM = delete quiet -MKDIR = makedir - -OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o pngread.o \ -pngerror.o pngpread.o pngwrite.o pngrtran.o pngwtran.o pngrio.o pngwio.o pngmem.o - -all: $(LIBNAME) pngtest - -$(LIBNAME): $(OBJS) - $(AR) $(AR_FLAGS) $@ $(OBJS) - $(RANLIB) $@ - -pngtest: pngtest.o $(LIBNAME) - $(LN) $(LDFLAGS) pngtest LIB:c_ppc.o pngtest.o $(LIBNAME) $(LDLIBS) \ -LIB:end.o diff --git a/gtkmm-osx/trunk/package b/gtkmm-osx/trunk/package deleted file mode 100755 index 4681714..0000000 --- a/gtkmm-osx/trunk/package +++ /dev/null @@ -1,292 +0,0 @@ -#! /bin/csh -ef -# this file was orignally distributed by Apple in the Developer Tools package -#it is distributed under the Apple Open Source License -set version=0.2 -set prog = `/usr/bin/basename $0` -set usage = "Usage: $prog [-f] root-dir info-file [tiff-file] [-d dest-dir] [-r resource-dir] [-traditional | -gnutar] [-bzip]" -set noglob - -if (-x /usr/bin/mkbom) then - set mkbom=/usr/bin/mkbom - set lsbom=/usr/bin/lsbom -else - set mkbom=/usr/etc/mkbom - set lsbom=/usr/etc/lsbom -endif - -if (-x /usr/bin/awk) then - set awk=/usr/bin/awk -else - set awk=/bin/awk -endif -set bzip2=`which bzip2` -set gnutar=/usr/bin/gnutar -set tar=/usr/bin/tar -set pax=/bin/pax - -# gather parameters -if ($#argv == 0) then - echo $usage - exit(1) -endif -unset usebzip -while ( $#argv > 0 ) - switch ( $argv[1] ) - case -d: - if ( $?destDir ) then - echo ${prog}: dest-dir parameter already set to ${destDir}. - echo $usage - exit(1) - else if ( $#argv < 2 ) then - echo ${prog}: -d option requires destination directory. - echo $usage - exit(1) - else - set destDir = $argv[2] - shift; shift - breaksw - endif - case -f: - if ( $?rootDir ) then - echo ${prog}: root-dir parameter already set to ${rootDir}. - echo $usage - exit(1) - else if ( $#argv < 2 ) then - echo ${prog}: -f option requires package root directory. - echo $usage - exit(1) - else - set rootDir = $argv[2] - set fflag - shift; shift - breaksw - endif - case -r: - if ( $?resDir ) then - echo ${prog}: resource-dir parameter already set to ${resDir}. - echo $usage - exit(1) - else if ( $#argv < 2 ) then - echo ${prog}: -r option requires package resource directory. - echo $usage - exit(1) - else - set resDir = $argv[2] - shift; shift - breaksw - endif - case -traditional: - echo useing standard tar - set usetar - unset usegnutar - unset usepax - breaksw - case -gnutar: - echo using gnutar - set usegnutar - unset usepax - unset usetar - shift - case -bzip: - if (-x $bzip2) then - set usebzip - echo using bzip compression - else - echo COMPRESSION ERROR: You can not use BZIP2 you do not have it installed - exit(1) - endif - shift - breaksw - case -*: - echo ${prog}: Unknown option: $argv[1] - echo $usage - exit(1) - case *.info: - if ( $?info ) then - echo ${prog}: info-file parameter already set to ${info}. - echo $usage - exit(1) - else - set info = "$argv[1]" - shift - breaksw - endif - case *.tiff: - if ( $?tiff ) then - echo ${prog}: tiff-file parameter already set to ${tiff}. - echo $usage - exit(1) - else - set tiff = "$argv[1]" - shift - breaksw - endif - default: - if ( $?rootDir ) then - echo ${prog}: unrecognized parameter: $argv[1] - echo $usage - exit(1) - else - set rootDir = "$argv[1]" - shift - breaksw - endif - endsw -end - -# check for mandatory parameters -if ( ! $?rootDir ) then - echo ${prog}: missing root-dir parameter. - echo $usage - exit(1) -else if ( ! $?info) then - echo ${prog}: missing info-file parameter. - echo $usage - exit(1) -endif - -# destDir gets default value if unset on command line -if ( $?destDir ) then - /bin/mkdir -p $destDir -else - set destDir = . -endif - -# derive the root name for the package from the root name of the info file -set root = `/usr/bin/basename $info .info` - -# create package directory -set pkg = ${destDir}/${root}.pkg -echo Generating Installer package $pkg ... -if ( -e $pkg ) /bin/rm -rf $pkg -/bin/mkdir -p -m 755 $pkg -/bin/mkdir -p -m 755 $pkg/Contents -/bin/mkdir -p -m 755 $pkg/Contents/Resources -/bin/mkdir -p -m 755 $pkg/Contents/Resources/English.lproj/ -echo "gxpmpkg2" >$pkg/Contents/PkgInfo -chmod 755 $pkg/Contents/PkgInfo -# (gnu)tar/pax and compress root directory to package archive -echo -n " creating package archive ... " -if ( $?fflag ) then - set pkgTop = ${rootDir:t} - set parent = ${rootDir:h} - if ( "$parent" == "$pkgTop" ) set parent = "." -else - set parent = $rootDir - set pkgTop = . -endif -if ( $?usetar ) then - set pkgArchive = $pkg/Contents/Resources/$root.tar.Z - (cd $parent; $tar -w $pkgTop) | /usr/bin/tar -f -c > $pkgArchive -else if ( $?usegnutar ) then - if ( $?usebzip ) then - set pkgArchive = $pkg/Contents/Resources/$root.tar.bz2 - (cd $parent; $gnutar c $pkgTop) | $bzip2 -f -c > $pkgArchive - else - set pkgArchive = $pkg/Contents/Resources/$root.tar.gz - (cd $parent; $gnutar zcf $pkgArchive $pkgTop) - endif -else - set pkgArchive = $pkg/Contents/Resources/$root.pax.gz - (cd $parent; $pax -w -z -x cpio $pkgTop) > $pkgArchive -endif -/bin/chmod 755 $pkgArchive -echo done. - -# copy info file to package -set pkgInfo = $pkg/Contents/Resources/English.lproj/$root.info -echo -n " copying ${info:t} ... " -/bin/cp $info $pkgInfo -/bin/chmod 755 $pkgInfo -echo done. - -# copy tiff file to package -if ( $?tiff ) then - set pkgTiff = $pkg/$root.tiff - echo -n " copying ${tiff:t} ... " - /bin/cp $tiff $pkgTiff - /bin/chmod 444 $pkgTiff - echo done. -endif - -# copy resources to package -if ( $?resDir ) then - echo -n " copying ${resDir:t} ... " - - # don't want to see push/pop output - pushd $resDir > /dev/null - # get lists of resources. We'll want to change - # permissions on just these things later. - set directoriesInResDir = `find . -type d | grep -v svn` - set filesInResDir = `find . -type f | grep -v svn` - popd > /dev/null - - # copy the resource directory contents into the package directory - foreach resFile (`ls $resDir | grep -v svn`) - cp -r "$resDir/$resFile" "$pkg/Contents/Resources" - end - - pushd $pkg/Contents/Resources > /dev/null - # Change all directories to +r+x, except the package - # directory itself - foreach resFileItem ($directoriesInResDir) - if ( $resFileItem != "." ) then - chmod 755 "$resFileItem" - endif - end - # change all flat files to read only - foreach resFileItem ($filesInResDir) - if ( $resFileItem != "./.DS_Store" ) then - chmod 755 "$resFileItem" - endif - end - popd > /dev/null - - echo done. -endif - -# generate bom file -set pkgBom = $pkg/Contents/Resources/$root.bom -echo -n " generating bom file ... " -/bin/rm -f $pkgBom -if ( $?fflag ) then - $mkbom $parent $pkgBom >& /dev/null -else - $mkbom $rootDir $pkgBom >& /dev/null -endif -/bin/chmod 444 $pkgArchive -echo done. - -# generate sizes file -set pkgSizes = $pkg/Contents/Resources/$root.sizes -echo -n " generating sizes file ... " - -# compute number of files in package -set numFiles = `$lsbom -s $pkgBom | /usr/bin/wc -l` - -# compute package size when compressed -@ compressedSize = `/usr/bin/du -k -s $pkg | $awk '{print $1}'` -@ compressedSize += 3 # add 1KB each for sizes, location, status files - -@ infoSize = `/bin/ls -s $pkgInfo | $awk '{print $1}'` -@ bomSize = `/bin/ls -s $pkgBom | $awk '{print $1}'` -if ( $?tiff ) then - @ tiffSize = `/bin/ls -s $pkgTiff | $awk '{print $1}'` -else - @ tiffSize = 0 -endif - -@ installedSize = `/usr/bin/du -k -s $rootDir | $awk '{print $1}'` -@ installedSize += $infoSize + $bomSize + $tiffSize + 3 - -# echo size parameters to sizes file -echo NumFiles $numFiles > $pkgSizes -echo InstalledSize $installedSize >> $pkgSizes -echo CompressedSize $compressedSize >> $pkgSizes -echo done. -echo " ... finished generating $pkg." - -exit(0) - -# end package - diff --git a/gtkmm-osx/trunk/package.info b/gtkmm-osx/trunk/package.info deleted file mode 100644 index b1682ed..0000000 --- a/gtkmm-osx/trunk/package.info +++ /dev/null @@ -1,14 +0,0 @@ -Title @PACKAGE@-@VERSION@ -Version @VERSION@ -Description @PACKAGE@ -DefaultLocation /usr/local -DeleteWarning -NeedsAuthorization YES -DisableStop NO -UseUserMask YES -Application NO -Relocatable NO -Required NO -InstallOnly NO -RequiresReboot NO -InstallFat NO diff --git a/synfig-core/AUTHORS b/synfig-core/AUTHORS new file mode 100644 index 0000000..d6d0efc --- /dev/null +++ b/synfig-core/AUTHORS @@ -0,0 +1,25 @@ +Developers: + +Robert B. Quattlebaum Jr (darco) +Adrian Bentley + +Contributors: + +Paul Wise (pabs) +Dmitriy Pomerantsev (Atrus) +Daniel Fort +Luka Pravica +Andreas Jochens +Chris Moore (dooglus) +Martin Michlmayr +Carlos López González (genete) +Gerco Ballintijn +Daniel Hornung (rubikcube) +Sean Bartell (wtachi) +Cyril Brulebois (KiBi) +Nikita Kitaev (nikitakit) + +Translators: + +Español: Carlos López González (genete) +Français: Aurore D (rore), Cyril Brulebois (KiBi) diff --git a/synfig-core/ChangeLog.old b/synfig-core/ChangeLog.old new file mode 100644 index 0000000..01dbac5 --- /dev/null +++ b/synfig-core/ChangeLog.old @@ -0,0 +1,136 @@ +2005-11-28 Robert Quattlebaum + * src/modules/lyr_std/sphere_distort.cpp/h: Clarified namespace issues +2005-11-08 Robert Quattlebaum + * src/modules/lyr_std/stretch.cpp/h: Clarified namespace issues +2005-11-03 Robert Quattlebaum + * src/synfig/savecanvas.cpp: added #include + * src/synfig/value.cpp: Various GCC 4.0 fixes + * src/modules/mod_bmp/trgt_bmp.cpp: The BMP target was broken. It's now fixed. + * examples: Removed SFAutomaton font due to licensing issues. + * All: Updated copyright notice to reflect new license + +2004-04-07 (darco): Foldy... Powers? +2004-03-30 (darco): Fix for weird keyframe problem +2004-03-24 (darco): Speed improvements for both the pastecanvas layer and the checkerboard layer +2004-03-15 (darco): "Noise" layer split into two different layers: NoiseGradient, and NoiseDistort, which can be found in the Gradients and Distortions categories respectively. +2004-03-05 (darco): New stuff tangents should interpolate using polar coordinates. Awesome. +2004-03-05 (darco): Added "Bevel" Layer +2004-03-05 (darco): Added "Shade" Layer +2004-03-04 (darco): Fixed problem with tangents not animating correctly +2004-02-25 (darco): Added the "time_offset" parameter to the Paste Canvas layer +2004-02-20 (darco): Significantly improved the BLine (which will be later called "outline") layer +2004-02-16 (darco): Added some under-the-hood-updates +2004-02-16 (darco): Improved renddesc editing slightly +2004-02-16 (darco): fixed the hit checks for the gradient layers. You can now more easily click on layers under them +2004-02-11 (darco): fixed a memory leak in the freetype layer +2004-02-11 (darco): fixed the onto blend method +2004-02-10 (adruab): Added shape specific blurs +2004-01-23 (darco) : Fixed minor loop problem +2004-01-23 (darco) : Added "Cosine" falloff to circle. (should be better than sigmond) +2004-01-21 (darco) : Support for paletted PNG files added +2004-01-15 (darco) : BLine Layer: Added "width" parameter, removed "width_list" parameter +2004-01-13 (darco) : Font layer largely re-written--now supports multiple lines. Also much more consistent. +2004-01-09 (darco) : fixed all the loose ends with the rectangle layer +2004-01-09 (darco) : Added expand parameter to rectangle layer +2004-01-09 (darco) : Adjusted the rectangle layer -- you can now invert it +2004-01-09 (darco) : You can now duplicate inline canvases +2004-01-05 (darco) : Both ends of a BLine can now have round edges (which are now on by default) +2004-01-05 (darco) : Increased threshold for cusp cut-off of tangents are too sharp +2003-12-29 (darco) : Added support for sharp cusp points (on by default now) +2003-12-24 (darco) : Adjusted Copyright Notice +2003-12-24 (darco) : Improved the horizontal placement consistancy of the Text layer. +2003-12-24 (darco) : Fix for obscure bug in scale valuenode that would cause a failure to load a saved file +2003-11-25 (darco) : Improved the Text layer again. *sigh* +2003-11-20 (darco) : Improved the consistancy of the Text layer again. :P +2003-11-18 (darco) : Improved the consistancy of the Text layer. You should be able to use it without worrying about the layout going weird anymore. +2003-11-12 (darco) : Added "--dpi", "--dpi-x", and "--dpi-y" arguments to the SINFG command line tool. these allow you to change the DPI of what you are rendering. +2003-11-10 (darco) : Fixed odd animation behavior +2003-11-10 (darco) : Fixed a bug in the PasteCanvas layer where mouse clicks wouldn't match up if the "origin" was changed from 0,0. +2003-11-04 (darco) : Inserting points into a polygon is now smarter -- puts the new point between the original two +2003-10-28 (darco) : Added support for physical dimension information in file format (xres/yres) +2003-10-20 (adruab) : Added support for video encoding through use of FFMPEG (avi,mpg,asf,rm,wmv) +2003-10-07 (darco) : Changed dynamic list/bline pad the index with zeros (001, 002, etc.) +2003-10-06 (darco) : Added Red-Blue color-corection adjustment to gamma +2003-10-06 (darco) : Added "displacement" mode for noise +2003-10-06 (darco) : The "scale" valuenode will now NOT scale the alpha channel of a color. (Otherwise, it's kinda useless) +2003-10-05 (darco) : The noise layer is now... Animated! +2003-10-05 (darco) : Added new layer... Noise! +2003-10-04 (darco) : You should now be able to create polygons layers without crashing. (Regions and BLines are another story though...) +2003-10-03 (darco) : Implemented layer descriptions +2003-09-30 (darco) : Fixed bug where BLine would "warp" when introducing new vertices. +2003-09-30 (darco) : Editing stuff while the work area refreshes in SINFG Studio should now be smoother +2003-09-24 (darco) : Adjusted the hit check in PasteCanvas layer to support inline canvases +2003-09-23 (darco) : ConicalGradient had incorrect angle, it was 90 degrees off. Fixed. +2003-09-17 (darco) : Fixed bewildering "wobble" animation bug +2003-09-02 (darco) : Added antialiasing to the gradient layers +2003-09-01 (darco) : Added Twirl Layer +2003-09-01 (darco) : Added Star Layer +2003-08-31 (darco) : Negative values are now clamped to the black point rather than having some kind of visualization. +2003-08-13 (darco) : Fixed some gamma issues on the PNG and ImageMagick image importers +2003-08-13 (darco) : Again, Improved support for clickable layers +2003-08-12 (darco) : Improved support for clickable layers +2003-08-06 (darco) : Added accelerated renderer for all gradient layers, they are now much faster. (Needs adaptive supersampling though...) +2003-07-31 (darco) : Added support for black level adjustment in gamma correction +2003-07-30 (darco) : Added support for gamma correction +2003-07-30 (darco) : Adjusted the mandelbrot layer to support gradients +2003-07-29 (darco) : Improved blend methods: Brighten, Darken +2003-07-29 (darco) : Added new blend methods: Screen, Overlay, and Difference +2003-07-24 (darco) : Added gradients!!! +2003-07-16 (darco) : Tiled Renderer now implemented +2003-07-14 (darco) : TCB controls now implemented +2003-05-05 (darco) : Dynamic List entries can now have multiple start times and end times +2003-05-05 (darco) : Phasing out Timed Stamp Value Node, because the animated value node is now capable. +2003-05-05 (darco) : The Animated Value Node can now use exported values in waypoints. +2003-04-23 (darco) : Added "stretch" layer. (Allows distortions to things like circles) +2003-04-18 (darco) : Added "exposure" parameter to color correct layer +2003-04-17 (darco) : Added native suport for JPEG files +2003-04-15 (darco) : The parametric renderer is now multi-threaded, meaning it can take advantage of multiple processors. Doesn't work in Win32. +2003-04-14 (darco) : Added "ColorCorrect" layer +2003-04-14 (darco) : Added "bailout" parameter to Mandelbrot and Julia layers. Use larger values to improve smoothing. +2003-04-14 (darco) : Improved clamp layer +2003-04-14 (darco) : Fix a bug with the "Color" blend method +2003-04-11 (darco) : Added "XORPattern" layer +2003-04-11 (darco) : Added "clamp" layer for clamping colors +2003-04-10 (darco) : Fixed a bug with the "smooth outside" parameter of the Julia and Mandelbrot layers +2003-04-10 (darco) : Major under-the-hood changes +2003-04-07 (darco) : Implemented support for inline (nested) canvases in parameters +2003-04-07 (darco) : Removed "time blur" option from "blur" layer +2003-04-07 (darco) : Created "motion blur" layer +2003-04-04 (darco) : Added layer "julia" +2003-04-04 (darco) : Added layer "inside out" +2003-04-03 (darco) : Fixed some minor issues with the polygon layer +2003-04-03 (darco) : Improvements to the way that time is handed +2003-04-02 (darco) : Added "offset" parameter to polygon layer + +2003-04-01 (darco) : Added a new value type, "Time" +2003-04-01 (darco) : Fixed a bug where values were not getting clamped +2003-03-31 (darco) : Tons of under-the-hood changes +2003-03-27 (darco) : Added "-c" argument to sinfg tool. +2003-03-26 (darco) : Added "antialias" attribute to in SIF file format. +2003-03-26 (darco) : Fixed bug #0000010 ("DataNode_Subtract always reverts 'scalar' to constant after save/load") +2003-03-25 (darco) : Added support for linking to DataNodes/Canvases in other Compositions. +2003-03-24 (darco) : Added support for linking to DataNodes in different Canvases. + +2003-03-23 (darco) : Fixed a small bug in circle layer that caused inconsistant results when the feather was set to zero and the parametric renderer used. +2003-03-23 (darco) : Added "zoom" parameter to PasteCanvas layer + +2003-03-22 (darco) : Fixed color-order bug in ImageMagick importer +2003-03-22 (darco) : Fixed a layer-cloning bug (For example, attempting to clone the Import layer would crash SINFG Studio) + +2003-03-20 (darco) : Fixed bug where numbers would be appended to filename when using bitmap target +2003-03-20 (darco) : PPM Module wasn't being loaded. Fixed. +2003-03-20 (darco) : Version Increment + +2003-03-19 (darco) : Added BMP importer +2003-03-19 (darco) : Added PNG importer + +2003-03-19 (darco) : Added "--importers" option to sinfg tool, for listing loaded importers + +2003-03-17 (darco) : Slight optimization to Region layer +2003-03-17 (darco) : Slight optimization to BLine layer + +2003-03-04 (darco) : Improved some layers to improve responsiveness during rendering. +2003-03-04 (darco) : Added rotate layer. +2003-03-04 (darco) : Fully implemented the "angle" type in loading and saving. + +2003-03-01 (darco) : Changed the default zoom amount from 1.0 to 0.0 diff --git a/synfig-core/Makefile.am b/synfig-core/Makefile.am new file mode 100644 index 0000000..22ad14d --- /dev/null +++ b/synfig-core/Makefile.am @@ -0,0 +1,188 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + COPYING \ + INSTALL \ + synfig.pc \ + synfig-$(VERSION).tar.gz \ + doxygen.cfg \ + config/config.guess \ + config/config.sub \ + config/ltmain.sh \ + config/ltmain.sh.orig \ + config/ltmain.sh.rej \ + config/install-sh \ + config/mkinstalldirs \ + config/aclocal.m4 \ + config/missing \ + config/texinfo.tex \ + config/depcomp \ + aclocal.m4 \ + config.h.in \ + configure \ + stamp-h.in \ + Makefile.in \ + config.log \ + config.status \ + .doc_stamp \ + .DS_Store \ + include/etl_profile.h.in \ + libltdl/COPYING.LIB \ + libltdl/Makefile.in \ + libltdl/acinclude.m4 \ + libltdl/config-h.in \ + libltdl/configure.in \ + libltdl/ltdl.h \ + libltdl/Makefile.am \ + libltdl/README \ + libltdl/aclocal.m4 \ + libltdl/configure \ + libltdl/ltdl.c \ + libltdl/stamp-h.in + + +SUBDIRS = \ + libltdl \ + build_tools \ + src \ + examples \ + po + + +# Install the pkg-config file: +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = synfig.pc + +bin_SCRIPTS = synfig-config + +ACLOCAL_AMFLAGS = -I m4 + +EXTRA_DIST = \ + ChangeLog.old \ + TODO \ + m4/subs.m4 \ + config/package \ + doc/hw-gfx-mapping.txt \ + win32build.sh \ + macosxbuild.sh \ + win32inst.nsi.in \ + COPYING \ + config/depcomp \ + m4/synfig.m4 \ + m4/cxx_macros.m4 \ + synfig.kdevprj \ + synfig-config.in \ + m4/ETL.m4 \ + doxygen.cfg.in \ + doxygen.cfg \ + synfig.pc.in \ + m4/pkgconfig.m4 \ + m4/libxml++.m4 \ + @PACKAGE_TARNAME@.pc.in \ + pkg-info/macosx/core-resources/ReadMe.txt \ + pkg-info/macosx/core-resources/Welcome.txt \ + pkg-info/macosx/core-resources/install.sh + + +GREP=grep +PRINTF=printf +SH=sh +DOXYGEN=doxygen + +SVN=svn +TAG=@PACKAGE_TARNAME@_@VERSION_MAJ@_@VERSION_MIN@_@VERSION_REV@ + + +tagstable: + -$(SVN) delete $(SVN_REPOSITORY)/tags/stable -m "Stable Tag: Removing old tag" + $(SVN) copy $(top_srcdir) $(SVN_REPOSITORY)/tags/stable -m "Stable Tag: Copying everything over" + +tagrelease: + $(SVN) copy $(top_srcdir) $(SVN_REPOSITORY)/tags/$(TAG) -m "Release $(TAG)" + +stats: + -@echo + -@echo -- Stats + -@echo + -@$(PRINTF) "Total lines: " + -@wc -l $(shell find $(top_srcdir)/src -name '*.[ch]*') | $(GREP) total + -@$(PRINTF) "Total size: " + -@du -hcs $(shell find $(top_srcdir)/src -name '*.[ch]*') | $(GREP) total + -@echo + +ChangeLog: + -svn update + svn2cl --include-rev || touch ChangeLog + +listfixmes: + -@echo + -@echo -- List of pending FIXMEs + -@echo + -@$(GREP) -e FIXME -e "\\fixme" -n $(shell find $(top_srcdir) -name '*.[ch]*') + -@echo + +listhacks: + -@echo + -@echo -- List of pending HACKs + -@echo + -@$(GREP) -e HACK -e "\\hack" -n $(shell find $(top_srcdir) -name '*.[ch]*') + -@echo + +listtodos: + -@echo + -@echo -- List of pending TODOs + -@echo + -@$(GREP) -e TODO -e "\\todo" -n $(shell find $(top_srcdir) -name '*.[ch]*') + -@echo + +listoptimizes: + -@echo + -@echo -- List of pending optimizations + -@echo + -@$(GREP) -e OPTIMIZE -e "\\optimize" -n $(shell find $(top_srcdir) -name '*.[ch]*') + -@echo + +listwritemes: + -@echo + -@echo -- List of pending WRITEMEs + -@echo + -@$(GREP) -e WRITEME -e "\\writeme" -n $(shell find $(top_srcdir) -name '*.[ch]*') + -@echo + +install-bin: + make -C src/synfig install-libLTLIBRARIES + +RMDIR=rm -fr + +if WIN32_PKG +package: all win32inst.nsi + cp -fu `which libHalf-6.dll` src/modules/mod_openexr/.libs/ + cp -fu `which libIlmImf-6.dll` src/modules/mod_openexr/.libs/ + cp -fu `which libIlmThread-6.dll` src/modules/mod_openexr/.libs/ + cp -fu `which libIex-6.dll` src/modules/mod_openexr/.libs/ + makensis win32inst.nsi +else +if MACOSX_PKG +package: all pkg-info/macosx/synfig-core.info + [ -d pkg_root ] && $(RMDIR) pkg_root || true + make install-strip prefix="`pwd`/pkg_root" + $(srcdir)/config/package pkg_root pkg-info/macosx/synfig-core.info -r $(srcdir)/pkg-info/macosx/core-resources +endif +endif + +run: check + +.doc_stamp: doxygen.cfg + $(DOXYGEN) doxygen.cfg + touch .doc_stamp + +benchmark: + synfig -b -t null -q --time 0 $(srcdir)/examples/*.sif + +html: .doc_stamp + +rtf: .doc_stamp + +docs: html + +.PHONY: stats tagstable tagrelease listfixmes listhacks check docs pdf html rtf diff --git a/synfig-core/NEWS b/synfig-core/NEWS new file mode 100644 index 0000000..e3773a3 --- /dev/null +++ b/synfig-core/NEWS @@ -0,0 +1,127 @@ + synfig releases + +More detailed notes are available on the releases page: + +http://synfig.org/Releases + + 0.61.09 (SVN 2113) - October 21, 2008 - Bug fixes, features. + + * Segment and Blines tangents are calculated more accurately + * Don't allow feather to be negative in any layer + * New Logarithm, Int String, Angle String, Joined List, Real String, + Time String, Dot Product, Gradient Colour, Vector X, Vector Y, + Vector Length, Vector Angle convert types + * Remove TENSION from TCB modes as it is the same as TEMPORAL TENSION + * Unless OpenEXR half mode is used, don't ask synfigstudio to depend on it + * Added "Link to Bline" feature + * Fix several bugs: plant layer, libavformat, time format FFf, libswscale + straight onto method, eyedrop tool and straight blend method for shape type layers + * Fix some compiler warnings + * Rename 'offset' and 'pos' to 'origin' + * Add French and Spanish translations + * Update the Windows builds to use OpenEXR 1.6.1 + * The JPEG target can be switched on/off now + * Fix typos and other issues + + 0.61.08 (SVN 1839) - March 3, 2008 - Bug fixes, features + + * Update the website URL to synfig.org instead of synfig.com + * Synfig is now translatable using gettext + * Removed the 'bootstrap' script for building. Use autoreconf instead + * Fixed errors and warnings detected by a pre-release version of GCC 4.3 + * New Duplicate layer. This is an experimental feature, but works well + * New reverse, offset parameters and misc fixes for the Plant layer. + * Fix a crash and use relative ducks with the Stretch layer + * Allow multibyte characters in the Text layer + * Misc fixes & features on Shade, Shape, Spherize, Star, Time Loop, Warp layers + * Add aTan2, Bline Width, Cos, Duplicate, From Integer, Random, + Reciprocal, Reverse Tangent, Step, Switch, Time Loop convert types + * Add and Subtract convert types now work with gradients + * Security fixes for ffmpeg/dv/imagemagick targets/importers (except on Win32) + * Add new magick++ target that does better gif rendering with libmagick++ 7.3 + * Misc fixes for the rendering targets, blend methods and canvases + * Allow importing of lipsynced voice animations from Papagayo + * Various changes to related to SIF file compatibility + * Fix typos, several crashes and other issues + + 0.61.07 (SVN 878) - October 10, 2007 - Bug fixes + + * Fix importing on amd64 (#1692825) + * Fixes for the PasteCanvas layer (#1356449) + * Clean up Layer menu and displayed layer names + * Allow exported canvases to be used in more than one place within a canvas (#1785296) + * Fix, extend, and enable the 'XOR Pattern' layer + * Fix and extend the 'Plant' layer (#1790903) + * Turn on plant layer (gunsmoke) in macwolfen.sifz example + * Use 'fast gaussian' rather than 'gaussian' for blurs in pirates.sifz - it's faster! + * Fix and enable the 'Timed Swap' valuenode conversion + * Extend the 'Linear' valuenode conversion to work with colors and integers. + * Enable basic motion blur display at all qualities + * Fix an artifact on the curve gradient layer (#1792063, r663) + * Add the 'Range', 'Repeat Gradient', 'Add', 'Exponent' valuenode conversions + * Add the 'BLine Vector', and 'BLine Tangent' valuenode conversions (#1781903) + * Fix problems with valuenode conversion (#1794374, #1795913, #1795922, #1796068, #1797488) + * Allow gradients to be animated (#1568818, #1795802) + * Stop TCB angle waypoints changing to type Linear on load (#1778930) + * Use compression when saving to files with .sifz extension + * Compressed example .sif files to .sifz to save space + * Fixed Motion Blur layer (#1800783) + * Allow building studio with gcc -O2 (#1509627) + * Allow encapsulated layers to animate their z-depth, even when time-shifted (#1806852) + * Fixed the Radial Blur layer when zooming in on the canvas (#1807709) + * Fix several other bugs and crashes + + 0.61.06 (SVN 536) - June 20, 2007 - Bug fixes + + * Add fontconfig support + * Fix amd64 issue + * Fix ffmpeg, gif, libav targets + * Include more target modules in the Win32 package + * Fix some crashes in synfigstudio + * Fix some render artifacts + * Fix some doxygen warnings + * Some MacOS fixes + * Misc bug fixes + * Fix random number generation for 64 bit CPUs (#1698604) + * Add parameter 'fast' to curve gradients to choose fast or accurate rendering (#1672033) + * Add new odd/even winding style for regions + + 0.61.05 (SVN 126) - February 27, 2005 - Misc fixes + + * Use system libltdl when available (#1423944) + * Update doxygen config file (#1402909) + * Fix fontconfig/xft FTBFS + * Misc fix (#1414370) + + 0.61.04 (SVN 102) - January 10, 2005 - Misc fixes + + * Check for imagemagick at build time + * Clarify mod_openexr copyright + * Fix mod_openexr building + * Don't add 'Copyright Voria' to PNG output + * Don't write localised numbers when generating SIF files + + 0.61.03 - December 8, 2005 - Copyright update + + * Update more old copyright and licence notices + * Remove broken walk example + * Misc code fixes + + 0.61.02 - November 26, 2005 - Misc fixes + + * Small cygwin/optimization/code fixes + + 0.61.01 - November 3, 2005 - Copyright update + + * Update old copyright and licence notices + * Fix some GCC 4.0 build issues + * Include errno.h where needed + * Add ./configure options for debug, warnings, optimisation, profiling + * Add about_dialog.sif as another example + * Remove SFAutomaton.ttf due to licence issues + * Fix BMP rendering target + + 0.61.00-39 - November 1, 2005 - Developer preview + + * First public release! + diff --git a/synfig-core/README b/synfig-core/README new file mode 100644 index 0000000..d7ce63c --- /dev/null +++ b/synfig-core/README @@ -0,0 +1,51 @@ + synfig -- vector animation renderer + +synfig is a vector based 2D animation package. It is designed to be +capable of producing feature-film quality animation. It eliminates the +need for tweening, preventing the need to hand-draw each frame. synfig +features spatial and temporal resolution independence (sharp and smooth +at any resolution or framerate), high dynamic range images, and a +flexible plugin system. + +This package contains the renderer used to convert synfig .sif files to +raster images, videos and other formats. Layer types include geometric, +gradient, filter, distortion, transformation, fractal and others. Output +targets include JPEG, PNG, GIF, BMP, PPM, DV, OpenEXR, ffmpeg (MPEG1), +libavcodec (AVI), imagemagick (MIFF), yuv420p, MNG and others. + +Links + +Web: http://synfig.org/ +Code: http://synfig.org/Source_code +Proj: http://sf.net/projects/synfig/ +IRC: irc://irc.freenode.net/synfig + +Please use the IRC channel and the sf.net tracker to get support and +report bugs, request features and submit patches. + +Copyright + +Copyright 2002 Robert B. Quattlebaum Jr. +Copyright 2002 Adrian Bentley +Copyright 2006-2007 Paul Wise +Copyright 2007-2008 Chris Moore +Copyright 2008 Carlos López +Copyright 2008 Gerco Ballintijn +Copyright 2009 Nikita Kitaev + +Licence + +This package is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of +the License, or (at your option) any later version. + +This package is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +or visit http://www.gnu.org/licenses/gpl.html diff --git a/synfig-core/TODO b/synfig-core/TODO new file mode 100644 index 0000000..0e2d248 --- /dev/null +++ b/synfig-core/TODO @@ -0,0 +1,38 @@ + +## General ## + +* Re-write font system. (The "simple text" layer is a dirty,dirty hack) +* Use pre-multiplied alpha to speed up compositing +* Solidify plug in system to be more robust (Auto-detect and load?) +* Solidify and codify XML file format into XML schema +* Make layer and value-node parameters handled in the same way. (currently different) +* Move to a garbage-collected system rather than reference counted +* Integrate a scripting language (Possibly better suited for libsynfigapp?) +* Finish and migrate to a new surface layer class + - Arbitrary color/alpha channels + - Surface locking/unlocking + - Copy-on-write +* Make the "Value" class extendable by plug-ins +* Add parameter mechanism to render target class to allow user to control things like: + - Color depth + - Codec + - etc. +* Review/rewrite error-handling and reporting mechanism +* Migrate public API to be more language agnostic in nature +* Network-distributed rendering +* Solid multi-threaded rendering +* mod_png: 16-bit pixel support + + +## Wanted Plug-Ins ## + +* mod_svg: SVG Import/Export +* mod_quicktime: Support for importing/rendering-to quicktime movies (MacOS X and Windows Only) +* mod_imageio: Support for Apple's ImageIO framework (MacOS X Only) +* mod_tiff: Using libtiff +* mod_wmv: Support for Windows Media for importing/rendering-to wmv/avi movies (Windows only) + +## User-requested features ## + +http://synfig.org/Bugs +http://sf.net/tracker/?group_id=144022&atid=757419 diff --git a/synfig-core/build_tools/Makefile.am b/synfig-core/build_tools/Makefile.am new file mode 100644 index 0000000..29b053f --- /dev/null +++ b/synfig-core/build_tools/Makefile.am @@ -0,0 +1,8 @@ +dist_noinst_SCRIPTS = autorevision.sh + +all-local: + sh $(srcdir)/autorevision.sh "$(top_srcdir)" "$(top_builddir)" + +clean-local: + -rm -f $(top_builddir)/autorevision.h + diff --git a/synfig-core/build_tools/autorevision.sh b/synfig-core/build_tools/autorevision.sh new file mode 100644 index 0000000..c8f4cf2 --- /dev/null +++ b/synfig-core/build_tools/autorevision.sh @@ -0,0 +1,107 @@ +#!/bin/sh + +# Copyright 2008 Paul Wise +# Copyright 2009 Konstantin Dmitriev +# +# This package is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This package is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +get_git_id(){ + export SCM=git + export REVISION_ID=`cd "$1"; git log --no-color -1 | head -n 1 | cut -f 2 -d ' '` + export BRANCH="`cd "$1"; git branch -a --no-color --contains HEAD | sed -e s/\*\ // | sed -e s/\(no\ branch\)// | tr '\n' ' ' | tr -s ' ' | sed s/^' '//`" + if ( echo $BRANCH | egrep origin/master > /dev/null ); then + #give a priority to master branch + BRANCH='master' + else + BRANCH=`echo $BRANCH | cut -d ' ' -f 1` + BRANCH=${BRANCH##*/} + fi + export REVISION=`git show --pretty=format:%ci HEAD | head -c 10 | tr -d '-'` + export COMPARE=`git rev-parse --git-dir` + # The extra * at the end is for Modified + #REVISION="$REVISION"`cd "$1"; [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"` +} + +get_git_svn_id(){ + export SCM=git-svn + export REVISION=`cd "$1"; git svn find-rev HEAD` + export COMPARE="$1/.git/" + if [ x = "x$REVISION" ] ; then + # The extra M at the end is for Modified + export REVISION=`cd "$1"; git svn find-rev \`git rev-list --max-count=1 --grep='git-svn-id: ' HEAD\``M + else + export REVISION="$REVISION"`cd "$1"; git diff --quiet HEAD || echo M` + fi +} + +get_svn_id(){ + export SCM=svn + export REVISION=`cd "$1"; svnversion || svn info | sed -n 's/^Revision: \(.*\)/\1/p'` +} + + +HEADER="$2/autorevision.h" +SCM=none + + +if [ ! -f "$HEADER" ] ; then + touch -t 197001010101 "$HEADER" +fi + + +# Extract the revision from SVN/git/etc +if git rev-parse --git-dir > /dev/null 2>&1 ; then + get_git_id "." +elif [ -d "$1/.git/svn" ] ; then + get_git_svn_id "$1" +elif [ -d "$1/../.git/svn" ] ; then + get_git_svn_id "$1/.." +elif [ -d "$1/../../.git/svn" ] ; then + get_git_svn_id "$1/../.." +elif [ -d "$1/.svn" ] ; then + COMPARE="$1/.svn" + get_svn_id "$1" +elif [ -d "$1/_svn" ] ; then + COMPARE="$1/_svn" + get_svn_id "$1" +fi + + +# Allow overriding both REVISION and DEVEL_VERSION +if [ -f "$2/autorevision.conf" ] ; then + SCM=manual + . "$2/autorevision.conf" +fi + + +# Abort if the header is newer +if [ "$COMPARE" -ot "$HEADER" ] ; then exit; fi + +# Set the development version string +if [ x = "x$DEVEL_VERSION" ] ; then + if [ x != "x$REVISION" ] ; then + if [ $SCM = svn ] ; then + DEVEL_VERSION="SVN r$REVISION" + elif [ $SCM = git-svn ] ; then + DEVEL_VERSION="SVN r$REVISION (via git)" + elif [ $SCM = git ] ; then + DEVEL_VERSION="Revision: ${REVISION}\\\\nBranch: ${BRANCH}\\\\nRevision ID: ${REVISION_ID}" + elif [ $SCM = manual ] ; then + DEVEL_VERSION="$REVISION (manually configured)" + fi + fi +fi + + +# Output the header +if [ x != "x$DEVEL_VERSION" ] ; then + printf "#define DEVEL_VERSION \"$DEVEL_VERSION\"\n" > "$HEADER" +fi diff --git a/synfig-core/config/ltmain.patch b/synfig-core/config/ltmain.patch new file mode 100644 index 0000000..9d51a5c --- /dev/null +++ b/synfig-core/config/ltmain.patch @@ -0,0 +1,17 @@ +--- ltmain.bak Thu Apr 7 19:12:55 2005 ++++ ltmain.sh Thu Apr 7 19:20:28 2005 +@@ -5362,10 +5362,10 @@ + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. +- if test "$inst_prefix_dir" = "$destdir"; then +- $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 +- exit 1 +- fi ++# if test "$inst_prefix_dir" = "$destdir"; then ++# $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 ++# exit 1 ++# fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. diff --git a/synfig-core/config/package b/synfig-core/config/package new file mode 100755 index 0000000..ae31c14 --- /dev/null +++ b/synfig-core/config/package @@ -0,0 +1,292 @@ +#! /bin/csh -ef +# this file was orignally distributed by Apple in the Developer Tools package +#it is distributed under the Apple Open Source License +set version=0.2 +set prog = `/usr/bin/basename $0` +set usage = "Usage: $prog [-f] root-dir info-file [tiff-file] [-d dest-dir] [-r resource-dir] [-traditional | -gnutar] [-bzip]" +set noglob + +if (-x /usr/bin/mkbom) then + set mkbom=/usr/bin/mkbom + set lsbom=/usr/bin/lsbom +else + set mkbom=/usr/etc/mkbom + set lsbom=/usr/etc/lsbom +endif + +if (-x /usr/bin/awk) then + set awk=/usr/bin/awk +else + set awk=/bin/awk +endif +set bzip2=`which bzip2` +set gnutar=/usr/bin/gnutar +set tar=/usr/bin/tar +set pax=/bin/pax + +# gather parameters +if ($#argv == 0) then + echo $usage + exit(1) +endif +unset usebzip +while ( $#argv > 0 ) + switch ( $argv[1] ) + case -d: + if ( $?destDir ) then + echo ${prog}: dest-dir parameter already set to ${destDir}. + echo $usage + exit(1) + else if ( $#argv < 2 ) then + echo ${prog}: -d option requires destination directory. + echo $usage + exit(1) + else + set destDir = $argv[2] + shift; shift + breaksw + endif + case -f: + if ( $?rootDir ) then + echo ${prog}: root-dir parameter already set to ${rootDir}. + echo $usage + exit(1) + else if ( $#argv < 2 ) then + echo ${prog}: -f option requires package root directory. + echo $usage + exit(1) + else + set rootDir = $argv[2] + set fflag + shift; shift + breaksw + endif + case -r: + if ( $?resDir ) then + echo ${prog}: resource-dir parameter already set to ${resDir}. + echo $usage + exit(1) + else if ( $#argv < 2 ) then + echo ${prog}: -r option requires package resource directory. + echo $usage + exit(1) + else + set resDir = $argv[2] + shift; shift + breaksw + endif + case -traditional: + echo useing standard tar + set usetar + unset usegnutar + unset usepax + breaksw + case -gnutar: + echo using gnutar + set usegnutar + unset usepax + unset usetar + shift + case -bzip: + if (-x $bzip2) then + set usebzip + echo using bzip compression + else + echo COMPRESSION ERROR: You can not use BZIP2 you do not have it installed + exit(1) + endif + shift + breaksw + case -*: + echo ${prog}: Unknown option: $argv[1] + echo $usage + exit(1) + case *.info: + if ( $?info ) then + echo ${prog}: info-file parameter already set to ${info}. + echo $usage + exit(1) + else + set info = "$argv[1]" + shift + breaksw + endif + case *.tiff: + if ( $?tiff ) then + echo ${prog}: tiff-file parameter already set to ${tiff}. + echo $usage + exit(1) + else + set tiff = "$argv[1]" + shift + breaksw + endif + default: + if ( $?rootDir ) then + echo ${prog}: unrecognized parameter: $argv[1] + echo $usage + exit(1) + else + set rootDir = "$argv[1]" + shift + breaksw + endif + endsw +end + +# check for mandatory parameters +if ( ! $?rootDir ) then + echo ${prog}: missing root-dir parameter. + echo $usage + exit(1) +else if ( ! $?info) then + echo ${prog}: missing info-file parameter. + echo $usage + exit(1) +endif + +# destDir gets default value if unset on command line +if ( $?destDir ) then + /bin/mkdir -p $destDir +else + set destDir = . +endif + +# derive the root name for the package from the root name of the info file +set root = `/usr/bin/basename $info .info` + +# create package directory +set pkg = ${destDir}/${root}.pkg +echo Generating Installer package $pkg ... +if ( -e $pkg ) /bin/rm -rf $pkg +/bin/mkdir -p -m 755 $pkg +/bin/mkdir -p -m 755 $pkg/Contents +/bin/mkdir -p -m 755 $pkg/Contents/Resources +/bin/mkdir -p -m 755 $pkg/Contents/Resources/English.lproj/ +echo "gxpmpkg2" >$pkg/Contents/PkgInfo +chmod 755 $pkg/Contents/PkgInfo +# (gnu)tar/pax and compress root directory to package archive +echo -n " creating package archive ... " +if ( $?fflag ) then + set pkgTop = ${rootDir:t} + set parent = ${rootDir:h} + if ( "$parent" == "$pkgTop" ) set parent = "." +else + set parent = $rootDir + set pkgTop = . +endif +if ( $?usetar ) then + set pkgArchive = $pkg/Contents/Resources/$root.tar.Z + (cd $parent; $tar -w $pkgTop) | /usr/bin/tar -f -c > $pkgArchive +else if ( $?usegnutar ) then + if ( $?usebzip ) then + set pkgArchive = $pkg/Contents/Resources/$root.tar.bz2 + (cd $parent; $gnutar c $pkgTop) | $bzip2 -f -c > $pkgArchive + else + set pkgArchive = $pkg/Contents/Resources/$root.tar.gz + (cd $parent; $gnutar zcf $pkgArchive $pkgTop) + endif +else + set pkgArchive = $pkg/Contents/Resources/$root.pax.gz + (cd $parent; $pax -w -z -x cpio $pkgTop) > $pkgArchive +endif +/bin/chmod 755 $pkgArchive +echo done. + +# copy info file to package +set pkgInfo = $pkg/Contents/Resources/English.lproj/$root.info +echo -n " copying ${info:t} ... " +/bin/cp $info $pkgInfo +/bin/chmod 755 $pkgInfo +echo done. + +# copy tiff file to package +if ( $?tiff ) then + set pkgTiff = $pkg/$root.tiff + echo -n " copying ${tiff:t} ... " + /bin/cp $tiff $pkgTiff + /bin/chmod 444 $pkgTiff + echo done. +endif + +# copy resources to package +if ( $?resDir ) then + echo -n " copying ${resDir:t} ... " + + # don't want to see push/pop output + pushd $resDir > /dev/null + # get lists of resources. We'll want to change + # permissions on just these things later. + set directoriesInResDir = `find . -type d | grep -v -e .svn -e CVS` + set filesInResDir = `find . -type f` + popd > /dev/null + + # copy the resource directory contents into the package directory + foreach resFile (`cd $resDir && find . | grep -v -e .svn -e CVS`) + cp -r "$resDir/$resFile" "$pkg/Contents/Resources" + end + + pushd $pkg/Contents/Resources > /dev/null + # Change all directories to +r+x, except the package + # directory itself + foreach resFileItem ($directoriesInResDir) + if ( $resFileItem != "." ) then + chmod 755 "$resFileItem" + endif + end + # change all flat files to read only + foreach resFileItem ($filesInResDir) + if ( $resFileItem != "./.DS_Store" ) then + chmod 755 "$resFileItem" + endif + end + popd > /dev/null + + echo done. +endif + +# generate bom file +set pkgBom = $pkg/Contents/Resources/$root.bom +echo -n " generating bom file ... " +/bin/rm -f $pkgBom +if ( $?fflag ) then + $mkbom $parent $pkgBom >& /dev/null +else + $mkbom $rootDir $pkgBom >& /dev/null +endif +/bin/chmod 444 $pkgArchive +echo done. + +# generate sizes file +set pkgSizes = $pkg/Contents/Resources/$root.sizes +echo -n " generating sizes file ... " + +# compute number of files in package +set numFiles = `$lsbom -s $pkgBom | /usr/bin/wc -l` + +# compute package size when compressed +@ compressedSize = `/usr/bin/du -k -s $pkg | $awk '{print $1}'` +@ compressedSize += 3 # add 1KB each for sizes, location, status files + +@ infoSize = `/bin/ls -s $pkgInfo | $awk '{print $1}'` +@ bomSize = `/bin/ls -s $pkgBom | $awk '{print $1}'` +if ( $?tiff ) then + @ tiffSize = `/bin/ls -s $pkgTiff | $awk '{print $1}'` +else + @ tiffSize = 0 +endif + +@ installedSize = `/usr/bin/du -k -s $rootDir | $awk '{print $1}'` +@ installedSize += $infoSize + $bomSize + $tiffSize + 3 + +# echo size parameters to sizes file +echo NumFiles $numFiles > $pkgSizes +echo InstalledSize $installedSize >> $pkgSizes +echo CompressedSize $compressedSize >> $pkgSizes +echo done. +echo " ... finished generating $pkg." + +exit(0) + +# end package + diff --git a/synfig-core/configure.ac b/synfig-core/configure.ac new file mode 100644 index 0000000..3f1b7b6 --- /dev/null +++ b/synfig-core/configure.ac @@ -0,0 +1,734 @@ +# $Id$ + +# -- I N I T -------------------------------------------------- + +AC_INIT([Synfig Core],[0.61.09],[http://synfig.org/Bugs],[synfig]) +AC_REVISION + +AC_CONFIG_AUX_DIR(config) +AC_CONFIG_HEADERS([config.h]) +AC_CANONICAL_HOST +dnl AC_CANONICAL_TARGET + +AM_INIT_AUTOMAKE([nostdinc]) +AM_MAINTAINER_MODE + +AC_LIBLTDL_CONVENIENCE +AC_SUBST(INCLTDL) +AC_SUBST(LIBLTDL) + +API_VERSION=0.0 + + +AC_DEFINE(LT_SCOPE,[extern],[LibLTDL is linked staticly]) + + + + +# -- V A R I A B L E S ---------------------------------------- + +SVN_REPOSITORY=https://synfig.svn.sourceforge.net/svnroot/synfig/synfig-core +AC_SUBST(SVN_REPOSITORY) + + +# -- P R O G R A M S ------------------------------------------ + +AC_PROG_CC +AC_GNU_SOURCE +AC_PROG_CXX +AC_PROG_CPP +AC_PROG_CXXCPP +AC_PROG_INSTALL + +AC_LANG([C++]) + +AC_C_BIGENDIAN + + +# -- A R G U M E N T S ---------------------------------------- + + +AC_ARG_DEBUG +AC_ARG_OPTIMIZATION +AC_ARG_WARNINGS +AC_ARG_PROFILING +AC_ARG_PROFILE_ARCS +AC_ARG_BRANCH_PROBABILITIES + +AC_ARG_ENABLE(g5opt,[ + --enable-g5opt enable optimizations specific to G5 proc],[ +# CXXFLAGS="$CXXFLAGS -fastf -fPIC" +# CFLAGS="$CFLAGS -fastf -fPIC" + CXXFLAGS="$CXXFLAGS -mtune=G5 -falign-loops=32" + CFLAGS="$CFLAGS -mtune=G5" +], +[ + true +]) + +#MINGW_FLAGS="-mno-cygwin" + +AC_WIN32_QUIRKS + +# If we are in debug mode, use the debugging version of the +# Microsoft Visual C Runtime Library +#if [[ $debug = "yes" ]] ; then { +# WIN32_DEBUG_LIBRARY="msvcr70d" +# WIN32_DEBUG_LIBRARY="msvcrtd" +# LIBTOOL_PATCH_SED="$LIBTOOL_PATCH_SED +# s/-lmsvcrt/-l$WIN32_DEBUG_LIBRARY/g; +# "; +#} ; fi + +AC_LIBTOOL_WIN32_DLL +AC_LIBTOOL_DLOPEN +AC_DISABLE_STATIC +AC_ENABLE_SHARED +AC_PROG_LIBTOOL +AC_SUBST(LIBTOOL_DEPS) +AC_LIBTOOL_PATCH + +#if [[ "$LIBTOOL_PATCH_SED""x" != "x" ]] ; then { +# printf "Patching libtool... " +# cat libtool | sed "$LIBTOOL_PATCH_SED" > libtool2 +# rm libtool +# mv libtool2 libtool +# chmod +x libtool +# AC_MSG_RESULT([patched]) +#} fi ; + + +dnl +dnl dynamic linker +dnl +AC_CHECK_LIB(c, dlopen, + DYNAMIC_LD_LIBS="", + AC_CHECK_LIB( + dl, + dlopen, + DYNAMIC_LD_LIBS="-ldl", + DYNAMIC_LD_LIBS="" + ) +) + +AC_SUBST(DYNAMIC_LD_LIBS) + +AC_ARG_ENABLE(half,[ + --enable-half Use OpenEXR's "half" type for color],[ + use_openexr_half=$enableval +], +[ + use_openexr_half="no" +]) + + + +AC_ARG_ENABLE(layer-profiling,[ + --enable-layer-profiling Enable layer profiling],[ + use_layerprofiling=$enableval +], +[ + use_layerprofiling="no" +]) +if test $use_layerprofiling = "yes" ; then { + AC_DEFINE(SYNFIG_PROFILE_LAYERS,[1],[enable layer profiling]) +} ; fi + + + + +AC_ARG_WITH(imagemagick,[ + --without-imagemagick Disable support for ImageMagick],[ +],[ + AC_CHECK_PROG([imagemagick_convert],[convert],[yes],[no]) + with_imagemagick=$imagemagick_convert +]) +if test $with_imagemagick = "no" ; then { + AM_CONDITIONAL(WITH_IMAGEMAGICK,false) +} else { + AM_CONDITIONAL(WITH_IMAGEMAGICK,true) +} ; fi + + + + + +AC_ARG_WITH(magickpp,[ + --without-magickpp Disable support for Magick++],[ +],[ + with_magickpp="yes" +]) +if test $with_magickpp = "yes" ; then { + AC_CHECK_HEADER([Magick++.h],[ + MAGICKPP_LIBS="-lMagick++" + AC_DEFINE(HAVE_MAGICKPP,[], [ Define if Magick++ library is available ] ) + AC_SUBST(MAGICKPP_LIBS) + AM_CONDITIONAL(HAVE_LIBMAGICKPP,true) + AC_CHECK_LIB(Magick,OptimizeImageTransparency,[ + AC_DEFINE(HAVE_MAGICK_OPTIMIZE,[], [ Define if Magick++ defines OptimizeImageTransparency() ] ) + AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,true) + ],[ + AC_MSG_RESULT([ *** OptimizeImageTransparency() not available - need ImageMagick 6.3 or newer ]) + AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,false) + ]) + ],[ + with_magickpp="no" + AC_MSG_RESULT([ *** Magick++ Output target disabled]) + TARGET_MAGICKPP="no" + AM_CONDITIONAL(HAVE_LIBMAGICKPP,false) + AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,false) + ]) +} else { + AM_CONDITIONAL(HAVE_LIBMAGICKPP,false) + AM_CONDITIONAL(HAVE_MAGICK_OPTIMIZE,false) +} ; fi + + + + +AC_ARG_WITH(ffmpeg,[ + --without-ffmpeg Disable support for FFMPEG],[ +],[ + with_ffmpeg="yes" +]) +if test $with_ffmpeg = "no" ; then { + AM_CONDITIONAL(WITH_FFMPEG,false) +} else { + AM_CONDITIONAL(WITH_FFMPEG,true) +} ; fi + + + + +AC_ARG_WITH(vimage,[ + --with-vimage Enable support for apple vImage],[ +],[ + with_vimage="no" +]) +if test $with_vimage = "no" ; then { + AM_CONDITIONAL(WITH_VIMAGE,false) +} else { + AM_CONDITIONAL(WITH_VIMAGE,true) + AC_DEFINE(HAS_VIMAGE,[1],[enable apple vImage]) + VIMAGE_LIBS="-Wc,-framework -Wc,Accelerate" + +} ; fi + + + +AC_ARG_WITH(libdv,[ + --without-libdv Disable support for libdv],[ +],[ + with_libdv="yes" +]) +if test $with_libdv = "no" ; then { + AM_CONDITIONAL(WITH_LIBDV,false) +} else { + AM_CONDITIONAL(WITH_LIBDV,true) +} ; fi + + + + +# LIBAVCODEC CHECK-------------------- + +AC_ARG_WITH(libavcodec,[ + --without-libavcodec disable support for libavcodec (Default=auto)],[ +],[ + with_libavcodec="yes" +]) + +if test $with_libavcodec != "no" ; then { + PKG_CHECK_MODULES(LIBAVCODEC, [libavcodec libavformat],[],[echo no; with_libavcodec="no"]) +} ; fi +if test $with_libavcodec = "yes" ; then { + AC_DEFINE(WITH_LIBAVCODEC,[],[enable libavcodec support]) + AM_CONDITIONAL(WITH_LIBAVCODEC,true) +} else { + AM_CONDITIONAL(WITH_LIBAVCODEC,false) +} ; fi + + +if test $with_libavcodec = "yes" ; then { + + # Need to check both the new and old locations for the avformat header + # Need to save flags, add avformat flags, check headers and restore flags + ac_save_CPPFLAGS="$CPPFLAGS" + ac_save_CFLAGS="$CFLAGS" + CPPFLAGS="${CPPFLAGS} ${LIBAVCODEC_CFLAGS}" + CFLAGS="${CFLAGS} ${LIBAVCODEC_CFLAGS}" + AC_CHECK_HEADERS(libavformat/avformat.h avformat.h ffmpeg/avformat.h) + CPPFLAGS="${ac_save_CPPFLAGS}" + CFLAGS="${ac_save_CFLAGS}" + + AC_ARG_WITH(libswscale, + [AS_HELP_STRING([--without-libswscale], + [disable support for libswscale (Default=auto)])], + [], + [with_libswscale="yes"] + ) + + if test $with_libswscale != "no" ; then { + PKG_CHECK_MODULES(LIBSWSCALE, [libswscale], [], [echo no; with_libswscale="no"]) + } ; fi + + if test $with_libswscale = "yes" ; then { + AC_DEFINE(WITH_LIBSWSCALE, [], [enable libswscale support]) + + # Need to check both the new and old locations for the swscale header + # Need to save flags, add swscale flags, check headers and restore flags + ac_save_CPPFLAGS="$CPPFLAGS" + ac_save_CFLAGS="$CFLAGS" + CPPFLAGS="${CPPFLAGS} ${LIBSWSCALE_CFLAGS}" + CFLAGS="${CFLAGS} ${LIBSWSCALE_CFLAGS}" + AC_CHECK_HEADERS(libswscale/swscale.h swscale.h ffmpeg/swscale.h) + CPPFLAGS="${ac_save_CPPFLAGS}" + CFLAGS="${ac_save_CFLAGS}" + } else { + AC_CHECK_LIB(avcodec, img_convert, + [AC_MSG_RESULT([ *** Using deprecated function img_convert.])], + [AC_MSG_FAILURE([Neither libswscale nor function img_convert was found.])], + [] + ) + } ; fi +} ; fi +AM_CONDITIONAL(WITH_LIBSWSCALE, test "x$with_libswscale" = "xyes") + + +# FREETYPE2 CHECK-------------------- + +AC_ARG_WITH(freetype,[ + --without-freetype disable support for freetype (Default=auto)],[ +],[ + with_freetype="yes" +]) + +if test $with_freetype != "no" ; then { + PKG_CHECK_MODULES(FREETYPE, freetype2,[ + with_freetype="yes" + ],[ + PKG_CHECK_MODULES(FREETYPE, xft,[ + with_freetype="yes" + ],[ + with_freetype="no" + ]) + ]) +} ; fi + +if test $with_freetype = "no" ; then { + AM_CONDITIONAL(WITH_FREETYPE,false) +} else { + AM_CONDITIONAL(WITH_FREETYPE,true) +} ; fi + + +# FONTCONFIG CHECK-------------------- + +AC_ARG_WITH(fontconfig,[ + --without-fontconfig disable support for fontconfig (Default=auto)],[ +],[ + with_fontconfig="yes" +]) + +if test $with_fontconfig != "no" ; then { + PKG_CHECK_MODULES(FONTCONFIG, fontconfig,[ + with_fontconfig="yes" + ],[ + with_fontconfig="no" + ]) +} ; fi + +if test $with_fontconfig = "yes" ; then { + AC_DEFINE(WITH_FONTCONFIG,[],[enable fontconfig support]) + AM_CONDITIONAL(WITH_FONTCONFIG,true) +} else { + AM_CONDITIONAL(WITH_FONTCONFIG,false) +} ; fi + + +# OPENEXR CHECK------------------------ +AC_ARG_WITH(openexr,[ + --without-openexr Disable support for ILM's OpenEXR],[ +],[ + with_openexr="yes" +]) +if test $with_openexr = "yes" ; then { + PKG_CHECK_MODULES(OPENEXR, OpenEXR,[ + AC_DEFINE(HAVE_OPENEXR,[], [ Define if OpenEXR is available ] ) + AM_CONDITIONAL(WITH_OPENEXR,true) + ], + [ + with_openexr="no" + ]) +} ; fi +if test $with_openexr = "no" ; then { + AM_CONDITIONAL(WITH_OPENEXR,false) + use_openexr_half="no" +} ; fi +if test $use_openexr_half = yes ; then { + AC_MSG_RESULT([ ** Using OpenEXR Half.]) + CONFIG_DEPS="$CONFIG_DEPS OpenEXR" + CONFIG_CFLAGS="$CONFIG_CFLAGS -DUSE_HALF_TYPE" + OPENEXR_HALF_LIBS="-lHalf" +} else { + OPENEXR_HALF_LIBS="" +} ; fi + + +# JPEG CHECK (commandline switch) ------------------------ +AC_ARG_WITH(jpeg,[ + --without-jpeg Disable support for JPEG],[ +],[ + with_jpeg="yes" +]) +if test $with_jpeg = "no" ; then { + AM_CONDITIONAL(WITH_JPEG,false) +} else { + AM_CONDITIONAL(WITH_JPEG,true) +} ; fi + + + + + +# -- L I B R A R I E S ---------------------------------------- + +AC_LIB_LTDL + +ALL_LINGUAS="es fr ru" +AM_GNU_GETTEXT([external]) +# This is here so autoreconf will run autopoint +AM_GNU_GETTEXT_VERSION([0.15]) +localedir="$datadir/locale" + +PKG_CHECK_MODULES(ETL, [ETL >= 0.04.12],,[ + AC_MSG_ERROR([ ** You need to install the ETL (version 0.04.12 or greater).]) +]) +CONFIG_DEPS="$CONFIG_DEPS ETL" + + +PKG_CHECK_MODULES(LIBXMLPP, libxml++-2.6,[ + CONFIG_DEPS="$CONFIG_DEPS libxml++-2.6" +],[ + PKG_CHECK_MODULES(LIBXMLPP, libxml++-1.0,[ + CONFIG_DEPS="$CONFIG_DEPS libxml++-1.0" + ],[ + AC_MSG_ERROR([ ** You need to install libxml++, either verison 2.6 or 1.0.]) + ]) +]) + +PKG_CHECK_MODULES(LIBSIGC, [sigc++-2.0],,[ + AC_MSG_ERROR([ ** libsigc++-2.0 not found. It is required. You should really install it.]) +dnl PKG_CHECK_MODULES(LIBSIGC, [sigc++-1.2],,[ +dnl AC_MSG_ERROR([ ** At least libsigc++-1.2 is required.]) +dnl ]) +]) +CONFIG_DEPS="$CONFIG_DEPS sigc++-2.0" + +dnl PKG_CHECK_MODULES(GLIB, glib-2.0,[GLIB="yes"],[GLIB="no"]) + + + + + +TARGET_PNG="yes" +TARGET_MNG="yes" + +AC_CHECK_LIB(png, png_write_row,[ + PNG_LIBS="-lpng" + AC_DEFINE(HAVE_LIBPNG,[], [ Define if PNG library is available ] ) + AC_SUBST(PNG_LIBS) + AM_CONDITIONAL(HAVE_LIBPNG,true) +],[ + AC_CHECK_LIB(png12, png_write_row,[ + PNG_LIBS="-lpng12" + AC_DEFINE(HAVE_LIBPNG,[]) + AC_SUBST(PNG_LIBS) + AM_CONDITIONAL(HAVE_LIBPNG,true) + ],[ + AC_MSG_RESULT([ *** PNG Output target disabled]) + TARGET_PNG="no" + AM_CONDITIONAL(HAVE_LIBPNG,false) + ],[-lz -L${exec_prefix}/lib]) +],[-lz -L${exec_prefix}/lib]) + +AC_CHECK_LIB(mng, mng_initialize,[ + MNG_LIBS="-lmng -lz" + AC_DEFINE(HAVE_LIBMNG,[], [ Define if MNG library is available ] ) + AC_SUBST(MNG_LIBS) + AM_CONDITIONAL(HAVE_LIBMNG,true) +],[ + AC_MSG_RESULT([ *** MNG Output target disabled]) + TARGET_MNG="no" + AM_CONDITIONAL(HAVE_LIBMNG,false) +],[-lz -L${exec_prefix}/lib]) + +# check for JPEG availability +if test $with_jpeg = "yes" ; then { + AC_CHECK_LIB(jpeg, jpeg_CreateCompress,[ + JPEG_LIBS="-ljpeg" + AC_DEFINE(HAVE_LIBJPEG,[], [ Define if JPEG library is available ] ) + AC_SUBST(JPEG_LIBS) + TARGET_JPEG="yes" + AM_CONDITIONAL(HAVE_LIBJPEG,true) + ],[ + AC_MSG_RESULT([ *** JPEG Output target disabled]) + TARGET_JPEG="no" + AM_CONDITIONAL(HAVE_LIBJPEG,false) + ],[ + -L${exec_prefix}/lib + ]) +} else { + AC_MSG_RESULT([ *** JPEG Output target disabled]) + TARGET_JPEG="no" + AM_CONDITIONAL(HAVE_LIBJPEG,false) +} ; fi + + + +MODULE_DIR='${libdir}/synfig/modules' +moduledir=$libdir/synfig/modules +AC_SUBST(MODULE_DIR) +SYNFIGLIB_DIR=$libdir/synfig +AC_SUBST(SYNFIGLIB_DIR) + +# Check for unordered_map or hash_map headers +AC_MSG_CHECKING([for unordered_map::const_iterator]) +AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([ + [#include ] + ],[ + [std::tr1::unordered_map::const_iterator iter;] + ])],[ + AC_MSG_RESULT([yes]) + AC_DEFINE([HASH_MAP_CLASS],[HASH_MAP_NAMESPACE::unordered_map],[The template name for unordered maps.]) + AC_DEFINE([HASH_MAP_H],[],[The header file to include for unordered maps.]) + AC_DEFINE([HASH_MAP_NAMESPACE],[std::tr1],[The namespace for unordered maps.]) + AC_DEFINE([FUNCTIONAL_H],[],[The header file for hash.]) + AC_DEFINE([FUNCTIONAL_HASH_ON_STRING],[1],[Define to 1 if hash needs to use T=String rather than T=char* to hash strings.]) +],[ + AC_MSG_RESULT([no]) + AC_CHECK_HEADERS([ext/hash_map],[ + AC_DEFINE([HASH_MAP_CLASS],[HASH_MAP_NAMESPACE::hash_map],[The template name for unordered maps.]) + AC_DEFINE([HASH_MAP_H],[],[The header file to include for unordered maps.]) + AC_DEFINE([HASH_MAP_NAMESPACE],[__gnu_cxx],[The namespace for unordered maps.]) + AC_DEFINE([FUNCTIONAL_H],[],[The header file for hash.]) + ],[ + AC_MSG_ERROR([C++ compiler does not seem to support unordered containers]) + ]) +]) + +# Check for unordered_set or hash_set headers +AC_MSG_CHECKING([for unordered_set::const_iterator]) +AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([ + [#include ] + ],[ + [std::tr1::unordered_set::const_iterator iter;] + ])],[ + AC_MSG_RESULT([yes]) + AC_DEFINE([HASH_SET_CLASS],[HASH_SET_NAMESPACE::unordered_set],[The template name for unordered sets.]) + AC_DEFINE([HASH_SET_H],[],[The header file to include for unordered sets.]) + AC_DEFINE([HASH_SET_NAMESPACE],[std::tr1],[The namespace for unordered sets.]) +],[ + AC_MSG_RESULT([no]) + AC_CHECK_HEADERS([ext/hash_set],[ + AC_DEFINE([HASH_SET_CLASS],[HASH_SET_NAMESPACE::hash_set],[The template name for unordered sets.]) + AC_DEFINE([HASH_SET_H],[],[The header file to include for unordered sets.]) + AC_DEFINE([HASH_SET_NAMESPACE],[__gnu_cxx],[The namespace for unordered sets.]) + ],[ + AC_MSG_ERROR([C++ compiler does not seem to support unordered containers]) + ]) +]) + + + + + +AC_CHECK_HEADERS(signal.h termios.h sys/errno.h) + + +case "$host" in + *mingw* | *cygwin*) + AM_CONDITIONAL(WIN32_PKG, true) + AM_CONDITIONAL(MACOSX_PKG, false) + ;; + *darwin*) + AM_CONDITIONAL(WIN32_PKG, false) + AM_CONDITIONAL(MACOSX_PKG, true) + ;; + *) + AM_CONDITIONAL(WIN32_PKG, false) + AM_CONDITIONAL(MACOSX_PKG, false) + ;; +esac + + + +# -- H E A D E R S -------------------------------------------- + +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS([process.h io.h fcntl.h]) + +# -- T Y P E S & S T R U C T S -------------------------------- + +# -- F U N C T I O N S ---------------------------------------- + +dnl AC_CHECK_FUNCS([floor pow sqrt],[],[ +dnl AC_MSG_ERROR([ ** Could not find proper math functions.]) +dnl ]) + +AC_CHECK_FUNCS([fork]) +AC_CHECK_FUNCS([kill]) +AC_CHECK_FUNCS([pipe]) +AC_CHECK_FUNCS([waitpid]) + +AC_CHECK_FUNCS( + [isnan], + [], + [ + AC_CHECK_FUNCS( + [_isnan] + ) + ] +) + +AC_CHECK_FUNCS( + [isnanf], + [], + [ + AC_CHECK_FUNCS( + [_isnanf] + ) + ] +) + +AC_CHECK_FUNCS( + [floorl], + [], + [ + AC_CHECK_FUNCS( + [_floorl] + ) + ] +) + +AC_CHECK_LIB([pthread],[pthread_create]) + +# -- O U T P U T ---------------------------------------------- + +AC_SUBST(CFLAGS) +AC_SUBST(CXXFLAGS) +AC_SUBST(CPPFLAGS) +AC_SUBST(LDFLAGS) + +# this line is required for libtool 1.5.26 but must not be present for libtool 2.2.4... +AC_CONFIG_SUBDIRS(libltdl) + +CONFIG_LIBS="-lsynfig" +CONFIG_CFLAGS="$CONFIG_CFLAGS" +AC_SUBST(CONFIG_LIBS) +AC_SUBST(CONFIG_CFLAGS) +AC_SUBST(CONFIG_DEPS) +AC_SUBST(ETL_CFLAGS) + +SYNFIG_LIBS="$VIMAGE_LIBS $LIBXMLPP_LIBS $ETL_LIBS $LIBSIGC_LIBS $LTLIBINTL" +SYNFIG_CFLAGS="$LIBXMLPP_CFLAGS $ETL_CFLAGS $LIBSIGC_CFLAGS $CONFIG_CFLAGS -DSYNFIG_NO_DEPRECATED -DLOCALEDIR=\\\"$localedir\\\"" + +CONFIG_CFLAGS="`echo $CONFIG_CFLAGS | sed s/-mno-cygwin//g | sed s/-mwindows//g`" +SYNFIG_CFLAGS="`echo $SYNFIG_CFLAGS | sed s/-mno-cygwin//g | sed s/-mwindows//g`" +SYNFIG_LIBS="`echo $SYNFIG_LIBS | sed s/-mno-cygwin//g | sed s/-mwindows//g`" + +AC_SUBST(LIBADD_DL) + +AC_SUBST(SYNFIG_LIBS) +AC_SUBST(SYNFIG_CFLAGS) +AC_SUBST(OPENEXR_HALF_LIBS) + +AC_SUBST(API_VERSION) + +synfigincludedir=$includedir/synfig-$API_VERSION +AC_SUBST(synfigincludedir) + +AC_CONFIG_FILES([synfig-config +build_tools/Makefile +synfig.pc +doxygen.cfg +Makefile +po/Makefile.in +src/Makefile +src/synfig/Makefile +src/modules/Makefile +src/modules/lyr_freetype/Makefile +src/modules/lyr_std/Makefile +src/modules/mod_bmp/Makefile +src/modules/mod_dv/Makefile +src/modules/mod_ffmpeg/Makefile +src/modules/mod_filter/Makefile +src/modules/mod_geometry/Makefile +src/modules/mod_gif/Makefile +src/modules/mod_gradient/Makefile +src/modules/mod_imagemagick/Makefile +src/modules/mod_jpeg/Makefile +src/modules/mod_libavcodec/Makefile +src/modules/mod_magickpp/Makefile +src/modules/mod_mng/Makefile +src/modules/mod_noise/Makefile +src/modules/mod_openexr/Makefile +src/modules/mod_particle/Makefile +src/modules/mod_png/Makefile +src/modules/mod_ppm/Makefile +src/modules/mod_yuv420p/Makefile +src/modules/mod_svg/Makefile +src/modules/example/Makefile +src/tool/Makefile +src/modules/synfig_modules.cfg +examples/walk/Makefile +examples/Makefile +win32inst.nsi +pkg-info/macosx/synfig-core.info +]) +## src/modules/trgt_mpg/Makefile +## src/modules/mptr_mplayer/Makefile +AC_OUTPUT + +# -- S U M M A R Y -------------------------------------------- + +echo " +$PACKAGE_NAME v.$VERSION +Configuration Summary +- - - - - - + +Install Prefix -------------------> $prefix +Module directory -----------------> $moduledir +Build Platform -------------------> $build +Host Platform --------------------> $host +Arc Profiling --------------------> $profile_arcs +GProf Profiling ------------------> $profiling +Debug Mode -----------------------> $debug ($debug_flags) +Optimization ---------------------> $optimization +PNG output target support --------> $TARGET_PNG +MNG output target support --------> $TARGET_MNG +JPEG output target support -------> $TARGET_JPEG +ETL_CFLAGS -----------------------> $ETL_CFLAGS +FreeType2 ------------------------> $with_freetype +fontconfig -----------------------> $with_fontconfig +libavcodec -----------------------> $with_libavcodec +libswscale -----------------------> $with_libswscale +vImage ---------------------------> $with_vimage +ImageMagick ----------------------> $with_imagemagick +Magick++ -------------------------> $with_magickpp +FFMPEG ---------------------------> $with_ffmpeg +libdv ----------------------------> $with_libdv +OpenEXR --------------------------> $with_openexr +Using OpenEXR's \"half\" type ------> $use_openexr_half + +"'$'"CXX -----------------------------> '$CXX' +"'$'"CXXFLAGS ------------------------> '$CXXFLAGS' +"'$'"SYNFIG_LIBS ---------------------> '$SYNFIG_LIBS' +"'$'"LIBXMLPP_LIBS -------------------> '$LIBXMLPP_LIBS' +"'$'"ETL_LIBS ------------------------> '$ETL_LIBS' +"'$'"LIBSIGC_LIBS --------------------> '$LIBSIGC_LIBS' +"'$'"SYNFIG_CFLAGS -------------------> '$SYNFIG_CFLAGS' +"'$'"LIBADD_DL -----------------------> '$LIBADD_DL' +" diff --git a/synfig-core/doc/hw-gfx-mapping.txt b/synfig-core/doc/hw-gfx-mapping.txt new file mode 100644 index 0000000..cbb9075 --- /dev/null +++ b/synfig-core/doc/hw-gfx-mapping.txt @@ -0,0 +1,75 @@ +Shader Calculation Model: + +inputs - variables that control the object +shader - joint vertex and pixel shader necessary for calculation + +Parameter Types: + Uniforms - things that are constant for the entire render setup + +Layer render properties: + +Blend - blends with layer behind (amount,blend-method), if complicated must use (pixel shader...). +Algorithmic - gets colors without sampling textures (exception for function look ups...). + +Sampling - samples a texture map as part of the color calc process. + Behind - use result(s) below to calculate color. + Internal - + Functions/Inputs - CPU generated internal texture maps (uniform) + Dependent - GPU generated texture maps (unknown use...) + +Parameters: + Uniforms - layer-wide stats (color, blend-mode, amount, below texture, coverage map, etc.) + Varying - pixel coordinate (in canv-space), texture coordinates for samplers, etc. + +For optimized stuff: + For layer constants that aren't simple calculations (i.e. changing the blend type), + we can use global constants (however since OpenGL doesn't allow you to define those + manually, we can probably do it with #defines or the like)... Just in time compiling + (optimized by caching these changes of course) would allow us to operate in an optimal + manner (rather than having dynamic branching at run time). + +Considerations for Framework: + +For truly optimal rendering, caching textures would be great, but it would take up a lot of space. So an intelligent resource system should be implemented. The resource eviction routine should be intelligent and should deal with the resources deepest in the tree (of course this doesn't entirely count for CPU generated stuff). A priority system should be generated, mostly depending on how often it's used and even more, how expensive it is to generate (cpu and gpu side...). + +Shader considerations for Operations: + +Blend functionality can be done in a separate pass unless the blending shader part is also programmable (requires less JIT compiling). + +Sampling function should be abstracted to use different forms of interpolation (for nearest and linear, the built in support is probably plenty). + +Iterated calculations: either done using dynamic looping in GLSL or multipass rendering. + + +Shader considerations for layers: + +solid_color - just use blend with an input global color parameter + +circle - can calculate alpha in falloff based on interpolated pixel values and then use that and the amount... color to blend (must work out whether or not to out put an amount map + color blend, or a color map + amount blend... currently using the first on CPU side). + +checker_board - same as circle, but a simpler calculation (antialiasing will require a few calculations using the values of the derivatives of the pixel coordinates) + +rectangle - same thing as the checker_board, but only need to worry about 2 edges per dimension. + +Coverage Map Based: outline,polygon,region,star,text +and Internal Samplers: import, noise + - would require CPU side computation of the coverage map/color map + (tiling would be a little more difficult... we'll see how effective it would be...) + +Modifiers (algorithmic w/ direct below sample): clamp,colorcorrect (blend also classifies as this) + - modification of the colors underneath using math... easy.... + +Basic Transform: translate,stretch,zoom (should require no sampling),super_sample (simple down sample) + - simply requires the repositioning (and resizing in the case of the super sample) of the window + +Behind Samplers: + Basic Transform: rotate,twirl, + In-place: bevel,blur,halftone2,shade + Warpers: inside_out, spherize, noise_distort (internal and behind sampler) + - requires access to the background texture (with increased window in order to not find distortions). + +Iterated: mandelbrot,julia (used to warp, index into gradient, etc.) + - requires iterative refinement of the fractal values (with crazy swapping to consider stopping points) + +Gradients (complicated... could require a CPU side color map, unless we have dynamic looping): + conical_gradient, linear_gradient, radial_gradient, spiral_gradient diff --git a/synfig-core/doxygen.cfg.in b/synfig-core/doxygen.cfg.in new file mode 100644 index 0000000..dadf96b --- /dev/null +++ b/synfig-core/doxygen.cfg.in @@ -0,0 +1,1220 @@ +# Doxyfile 1.4.6 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = @PACKAGE@ + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = @VERSION@ + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = doc + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, +# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, +# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, +# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, +# Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explicit @brief command for a brief description. + +JAVADOC_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = "legal=\if legal" \ + endlegal=\endif \ + "writeme=\todo This needs to be documented further." \ + "stub=\todo This is a non-functional stub." \ + "optimize=\todo This needs to be optimized further." + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to +# include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = YES + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = NO + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = YES + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = NO + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = src + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py + +FILE_PATTERNS = *.h \ + *.hxx \ + *.hpp \ + *.cpp \ + *.cxx + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = src/synfig/surfacenew.cpp src/synfig/surfacenew.h src/template.cpp src/template.h + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = SYNFIG_NO_DEPRECATED \ + DOXYGEN_SKIP + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = gif + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that a graph may be further truncated if the graph's +# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH +# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), +# the graph is not depth-constrained. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, which results in a white background. +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO diff --git a/synfig-core/examples/Makefile.am b/synfig-core/examples/Makefile.am new file mode 100644 index 0000000..c006360 --- /dev/null +++ b/synfig-core/examples/Makefile.am @@ -0,0 +1,36 @@ +SUBDIRS = \ + walk + +MAINTAINERCLEANFILES = \ + Makefile.in + +EXTRA_DIST = \ + about_dialog.sifz \ + backdrop.sifz \ + business_card.sifz \ + candy.sifz \ + cells.sifz \ + eye.sifz \ + eyes.sifz \ + gamma.sifz \ + gradient.sifz \ + headmo.sifz \ + installer-logo.sifz \ + japan.sifz \ + logo.sifz \ + macwolfen.sifz \ + Makefile.am \ + mandelbrot.sifz \ + newjulia.sifz \ + newjulia2.sifz \ + noise.sifz \ + pirates.sifz \ + preambletaffy.sifz \ + prologue_kid.sifz \ + sparkle.sifz \ + splat.sifz \ + star.sifz \ + wallpaper.sifz \ + warpcube.sifz \ + warptext.sifz \ + z_depth_test.sifz diff --git a/synfig-core/examples/about_dialog.sifz b/synfig-core/examples/about_dialog.sifz new file mode 100644 index 0000000000000000000000000000000000000000..98278cd4493a8af2d2010722e6ced6022fcc6393 GIT binary patch literal 3668 zcmV-a4y*AWiwFRp<(EeQ1MMAYZ=*=|`}_*z{cMN2IHV+_Ow#FTX)aBAS3939Vq+UM z1~1@F(!YL-%f?Vu+>RZSRx1v#{CK>2cfBgEe|}xt(s$GIE!Vjjfr&i&`Sz#lnc;jl z{QY%#0!Gq{H4j!dBP7csX=Pf=RY3nB^p981^lwH`Cvc(?qKELe;-&AF`7(ZXUvEZZ zFd=gIBf<2;?h1uPALthhC$J3LGD1WnX|bWd0h~mjXLD&e>C4-I`M|Uvik{^wgJacV1b6;AUlDm+6m$G4HIZJ8bxohcnWA^8h^xw(# zRfHtPXd7>)Ck1aC%Bv^Ww&wRCPAaCe!1_+F1>Tmj;y`86@6vB?49{36oc=MLo10*j z0n-7VX;4Kp>}@E-$Bi9ndQxFa}b616NMDU5``4jnJDBQ!87L8*6*6x3)2Xwt?C->#?4Xs-JAsl zcE8?cR^B2Spzo`pG+VYKD>@ zjdZH$S~7!ZaOi`cGqIkbo&$lN1A(5OfB_UeKO8&~OYORd9`|{NaLd9>kIF&Ua zf%zH;49F07aD9BpxC2~%;DxJn;fm(XNW+j2{SJc%jMWEKB}mnO(UJ0q@8JEzJ>~1u zKYu)a`7AvJ+qvalU&Y_PAnUa-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J_6aSZ;3hIy>Sts@KP`4DI(jjKgCF^E!Ec8y;%*+CNfsLyP?hZCb}iDnUJx@&s>;Qt5BO7!1WzW@L&&qRIz literal 0 HcmV?d00001 diff --git a/synfig-core/examples/backdrop.sifz b/synfig-core/examples/backdrop.sifz new file mode 100755 index 0000000000000000000000000000000000000000..10b7b4bf46282615b1dd447d306a3b75910950ef GIT binary patch literal 79099 zcmZU4by!qg_cn-#h@{e~fT%PQ(kP`MCDIJtDGXhMAR#H;C8fa7Ig~U=cY|~@#83kR zzk|=CKJWMabGWXvIeV|O*1hkw*1gZr2H(DYHNPu$1H(Yy(9+1>_B|We+{6uSI|XD* zSrh3G?=K?ofb#~c7)5wL!+Lf$5j@+*AKzxcj)!-5Qq@ZTe%I&aH(ZTglcgz-D`9Q1 zM}yS$QfvmY7I{g_$|~%^ZHJAJGww}Knm48`U8lX+#H-8j#*3YcJkiUUG|#KrC+k@! zYkO{9=c^Jv{2Q}){(M!3d`zmt?7BI=8c18cCw0#qkF!pWR?1t<5gYw zQ1;biS}&F@slp@An*6gpFmlPmP4v0zae5(ESw0_ABdTL@YU80Z%KS>XsBSeWs*$Y_ z%lUA+BW@^o_=TvW7{o!>>#T#l;?%%2JWWK)!=o)5nfB;p>1>l(DU%r#HiS`k${jy1 zU)ZQ?`#crjW@uK_v*u_#;Z49d-3Hx-!=Dx+2_mS(%e|Gj6)hpr^HRjrxM`6m$|<32 zW$RtlC5KsK)#cv#Tb%BcGtsEQJ)|}Nn^I&c7~^ zC|GoBzsIY;_V@>9u?fR6=xnp?9dd2vba@syz4VEawflcbPF{G@QyV1dm{0h;15nFV*`Q@Eh>J01!xIn8`>Q;kgM zYb`Zmh1xs%vUFf6Mt@>Dt!8q;ZY9;9R@fHpW%tT%SZocdVpl&3*E`r>vQiwZ$ zmFP(d8;vUM0^RK}mr@{tU8iqAw`+bjjxgW3`C|i(JJ0yGlO~n2_rH(uut>M_?0d+;`5wmB$Bi0}Ufzpq3G3S{^|wT$;-; zlI+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al 0 HcmV?d00001 diff --git a/synfig-core/examples/business_card.sifz b/synfig-core/examples/business_card.sifz new file mode 100644 index 0000000000000000000000000000000000000000..62d7173d03dbfde89403d73c0a845e9089f45678 GIT binary patch literal 2662 zcmV-s3YqmEiwFQI=a)wS1MOW~bE7yGe$TH^u`jb#Z5!<1%a)Vbbh@*(Q<p#LllDfx!`=3kICvY4uBNBp)55Pv@qi)6<`KYX>|dKfs=QqZwUY`}y{2 zx`6I84BnpWT|)ye*a}yqk8bK3SRrh$Lh{WVnHt#nD7ewgiEegH!x)=G4eX1Lo-umq z%)Q->)){n7J^BaCZa@A6j!!!2BMm?|#L&Tz5F+C*H{|a?@5W7YWMj7z;x!`NEj55# zi~2UV7oOw!5#tHf;s>J}|JAkID*&c0T%+6nk?}$YS^BgWe~%j0D1;#TcB9!owr0V~ zd(ptcb3^2k_t&)^yBmH*bhq?1(+|9#xo|`M%wTleVhiQD;P=bYV+`xLWQAwJckD9y zS!fwVAIQf964<)Y{_R@$8CzTE+(X|w0>kW^Z@3sli$pEB(H)tYX$QwAo#RTJzHTvV z4%{Ojg!>J7ohQ%1)_p{Tz-JNSXYwrcw`46cU`~Hae!YP{Tql$9It|#0sV|D<;t_Nv@uymn@mYczC6u%`m@C1 zNA#13`P-D`X)oVqQ*CyxZBDh#b8V1ngBcEbITmuSFzv+vV8Y>d7=-9PhVBL7LGKO@ zBn@M720Wa=spn%NXS39v(IPA$Vs}eV#k9A}weNH7`|JwmX-ZIfSkNp?5ArFIMMFvw zX*pJCd^p%e(4W~pv@nr;0*nypWT9YjqkSV?$x=N=)Uj*p`gLxA5*T8xIU7lw`Ctsh zKow&go~$W94i{%hUlH2MkFqgXv{~3ons&EDkqizxg$2Q++y2(z12JWfJxnRK`{!c2 zb5_2OJAgqp2z|UkL9%58JyUIAu$tJaglhGVBBG#Fs9rYJ%jWi)Q@!TgUXbbqIXvf; zPoatVvWHjgU(7skR4>&>IuFd3O|iovniCa+eoZYBhHn`m94#5n|6U})(Jbzm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QV zOzwe|jFiY|3%o8#bVNqEP@9=!w3nz_D9e3jS?W^u3WdGuuqRG%uEHOuf^yk9%iJ2v zE%0-N^_01OF8hVJHI!TMp4I$$_6zZAB$ug=%r8yMt7TliCNi@gGIKx~^hOglb4wmiR1Ml65Pno~E2+ zE?qakBlG%CLwki8X;T7336M(^AnlhQeepd=B|Z*cX-}8$A7=vcH3AQ;AUr1kFL2hG zfp`8?lnBc->C*pI0&hb(A<8djMr;PWq9|ndne`$zl+Vo?nwxi1f8>InT%!uOv;sK4 z2o%5g6Tj#aPiGX59%Pli`Ff47)A;(VB43P(-XAhw`O4jV>}1?hu0tx2!&xV^mdtB^ zDEbUi?Oj6AwCJfCiaw-K<^Jc>9&0WB;;LD}v@%RZDD5biDwwt(rV6DBrR_keQ0Mm* zOchL90aJxih0^w;R47b2w^S5N6--+sOchEMO51@_p)l4xB2ODwtjXOvU0< U1*GcX^eyAyPnE@l{R@x)0F~ArU;qFB literal 0 HcmV?d00001 diff --git a/synfig-core/examples/candy.sifz b/synfig-core/examples/candy.sifz new file mode 100644 index 0000000000000000000000000000000000000000..cdfc5b0835d5bec65689d18a4127442699142a81 GIT binary patch literal 1316 zcmV+<1>5=`iwFqf-0nsK17l%sWO*)gX=Zu=?OI!tsyGmSKfi+FT_FkKQiYy!Ji4!2 zyS2|&)QD6eScr4R`SlwjYJ>n8hq;}R7fDCHbUOVt9XkHcr%j|i(sUOl@jwTCQ~x>q z;V(%1NOl*w*$2AzJ6vY#fo{2`uB~Ypth0d*9oBeC>5kpH$m-h`b}-bnLsj$`(%-## z@-)zUR^Q~82Kx~6o3o^M66qR=vyem~VL)v3)t3Dtv(LNcGzjBf7H%lhZKZ28UJ9*w zut=gL&DF+7)anf=2GoZ?G|i96h7SK@<7E+Dn!dr?c}GMJG}W@hmO(GVbP-Xe*CGoa zSvyPjtaWXpCEYCs`k4RIw2tTuW=m4C(Q?#*{ybaKZMH7DSZ7KJTLKd8bM*_gxN1i6 zw80;jK#@(dk25(EcoEV(VkVqzXtqw47rZdeXu#%wQm!3`8~y^oo2OQ;;P5m--w@>i zlOullMj*)NOm63w;~R59PKMx&L(Zca!f^E}reqoJcXFe_7a46uNw%hG7c03<1dSf) zBD*r%(@;e7jVGb+Q0hBe%pu~`4;{wLg#{;?C&_sdD-!Lff+0v0C974f<3I_7Z*Xo^ zShib}WfRHZ2Xe|RVpE5lvO3@tsNvK_e$AupT%KJwjT0}cZ$)DeGx0)dh=WU2N?dFOE-BJh{Dg%QLxOxdO&iBN0@rwYyT7-2z0CL3G%Q8Bwp2mU|4#esCR{O&s==0bMV)eH9_`bs*G9|B zLlrfQE0A1Rgcg23+a_!nU5k=rTNtLY_B77YLs`lRvSC}iFp~jR|DHbpWa6`1YQa8S z4)pOafW~8hrc=wtqp9bzd*F_KS;zzK#KyWDM8%D-+!@!qbCX*OoCNY&!WuBOC@A1V zIX+UrHzk>A1s}=rts49mY6`%X92nOrPL_`6HvJZg3kNc*zp*F@9|S9tL)v=%6nS* z(MiueuY7A0f1R|_H+Zyb{6H$y$t0DQ{Be@bf?Q{se-f=NxtOPt%U`Gee(PEbKre&d z0(n*9*3Z9+)eGEh^l@8_OSh>F8~0?Sd)$b literal 0 HcmV?d00001 diff --git a/synfig-core/examples/cells.sifz b/synfig-core/examples/cells.sifz new file mode 100644 index 0000000000000000000000000000000000000000..e428f187d1e738cc4990cac7fc58874e02cdaf38 GIT binary patch literal 1417 zcmV;41$O!$iwFqg-0nsK17l@uY;!JiX=Zu=?On@~syY;%_g7HN(FEjGrJnLRJ%e-a z*oqpFdl4+aZtbr>fq+IKwsvFpd2C0LRCZRfvv&3hg57WXO`tr}IPs&fr{We;zxAKG z3lct)U3wDNomUNr0iz-$bQ^FPi33l1giV4XlrCqdc=gn(OkxjG<(|SwzE=%)(IdHb2={j1T z?D=6zJvQXh2uYUqwEa(AeBo$F?uohg(=LDji@Sun*YR zJo_9s|JasZ-TMr#I*?%j`+$AGzUJAdTRHn2}!;L z;v`z`yPC=y|86f9`9ot zBRt;+>;v{aGWFD@&-ZDd{D6KyzsKHkuwBkDY*x=*Y{U;eoxkYUE`c9X63@KMpOmpc zPDAvEy<)<-VLjnfa}xR+lG0@{Z+uad4lxGK#5N~G3ymj(k!9-R>Cl-BCf0O{Y}>I_ zVWqv0!!}}Iir2RM`2LSjTeEJDvPtq@hT|PGvo3e5E@56$qL2eatDA70_xlOBidW|- zDGmA3)XE@n6JG7p0rU6yG=fcQ9Gv~J+5CLK#cPg!fu+ed%_1he8AtRR;|O-_@nq}_ zSbVpv=>VIP!O*ftI&!c(K||a?9MRqiB-&R+k}p{O`tP>-c`SJp-d`=ce15FHBf30% zx!xXMj@jF>X;~uJ&(nH^rO2nm?0lROSs@n|a%mwG7Z>v45*L=>!ctsViVJ@T7qfRZ zgYvl#qG~30XEj4|c*!{&;IKhu8l)DV_MQ^o;{iT!5;Rgks&@k}&g$ z6g&FkL>de2JlTiO!5I*o0l^v2%^EFziP9*fMKGz< zm(mEIVY*OH*9Fow>2^)L$z@WVfNNjE?msML;&&yComL zSv3o(N3wPw8cmL1wxB*!DUw0uGUaVUmnPn?9#_mq@w@bnbe^-dvWViCg@k+WRj+q+ zMwb8Wl2lA3yntR}x;?We` Xx#m8`?)+~l`cFRrW2v9FwqgJPCePBG literal 0 HcmV?d00001 diff --git a/synfig-core/examples/eye.sifz b/synfig-core/examples/eye.sifz new file mode 100644 index 0000000000000000000000000000000000000000..4ed5b2aee3e35b3508c95058f029234ce79363db GIT binary patch literal 127203 zcmagEV|Zmj*EX1>W81cEJ007$?WAKnIkBB|Y}F0T8u50F-`R326TBzE! z_o@4?wf5NrQIL=vJ6GZ$KTJJM>76ajynrrrt?l=@0U!K5!siH4Sb6)ke~;|i8TNP? zVJ3|j>=2G7jOH9Dq>LJkA(|Ij7J7UoS7Q$wZ4w$uwdD@Cz>Os03aRVQ;$1~^KA!d+ z(|*ZQEcAIi)cw$%f4N-HpSF7~y#6>n^PUfpyF1=-d%CF`U^^v6INkX)e5w;k{AtW{*in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zj+x;>U}KrG)n%Ax>B!^P8osi#7yeN zF3Rog+>8Vt zgUzO*&w=CulSqBdjXU!^(9h80OX+`s+=vsfg#$32GiFkwJwqexG?W00-YT1C*`XDC zBmU+c_-{L-Yu2uGfZ~p0Y@oP>$`6=rc5#eJFvs)O>wFWHq0D=B@FJu+P21GuANog# zz_)c}bXAP!CxGdMmX+t9cyJSo9o32eo_o8gafro1B6;kv1EXtylA~%7oBgZ9*kxPB zPz^mPf$s82{j_S{R?{o0q)}yZ3_98E?dRrI6qSBZgtrC+iHQ>sHwF`kP*n zGVkr*6u&~MKGpdZdE2wX5n8FZ?;75^Rz7HQT|nr*>%Qzex!=j}M({0OW#Pv8_T^uG z5x;PnQ8t^(;9Y-2?d;!{kf0J?Una< zzJ9&<5v{QVEsM&zf&%wJk>Iy|$2AMf<`Fis_LZ9*G3g6nxYOy}b~%NcIi>AuBk++! zD}5Vt!i~d3|6}Y%LI>sJ!ou0Wy4E19S@pTr-=r~pV{~+xeed)$szC|<}h{3Js^wsc}Ekn~?I-72D#Hbjb6AjD^e&GdCi=U=(t|@IBy0NTk zclP&z_Jg}tC3i&b-ed?rGE}33- zj4GSBst>1>udeRs{a`B|hGPm4#p-Exspkm`I!ny(5nXxEcl1I4Rnn29l z_kjz>IPjfmNb)UGWv)?wt*N{axRI@AKx#bg2eLUXq zCr|ul2j-!zY5d1+V?Xv&W!f;|5jvh&hkKZ`B6RLnTYI$ z5hstOTy5+RNUF%wugu;6wZveechDK-oKlZmCh-n-?L5?rT{CEu=OoJh5H`_xpPC4= zrNM`v|9S!8!BnkvPo1XCDmpLIgt+FzWtLCV)Q Ng*zkAZaYpX{Rf<-Puu_i literal 0 HcmV?d00001 diff --git a/synfig-core/examples/eyes.sifz b/synfig-core/examples/eyes.sifz new file mode 100644 index 0000000000000000000000000000000000000000..7d4a441dca6af827f2f5ecb087fc38c70cd2e9ec GIT binary patch literal 1753 zcmV;~1}6C*iwFqi-0nsK17&$-b1rjfW_keaT}zMRI1s+i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Ejyj zhA8e!NN4ke4ouf1&^ntCFS9(>Igw64W;%g8e{O$e^9fhVCqSD|c;0-%Mo_;kpZHjfV*x(1I*%M&b6zVqFYGFcUyt+6p-FC}Ir4 zM~D;z<3d8lE}l~8Q0Z~Ok&w3-D;Um8{`V+#o)pBJi=$>QD4qGqVlY~!ix2sBiH-`! zgDhD53;w$d4*U?#+G$%wDox)Nso22G24*%evw@jS$v&d1g**-jWSCHPaUTK_=3yWu v<~A_1fthjAYvZzejLYb?jwU+tkxp=ITxR34Pm9YA<^BHyjUKeKRCE9UVk%m> literal 0 HcmV?d00001 diff --git a/synfig-core/examples/gamma.sifz b/synfig-core/examples/gamma.sifz new file mode 100644 index 0000000000000000000000000000000000000000..b5ebd2b3a054f0362163da35e01587caeb51ff47 GIT binary patch literal 740 zcmVl(_f?WeMyT8q0ow zwWwt@c8+>RiY8h7D!5_Ss;rdZmTr~NFjJc4F49sYm$}crXUrD3wHBmIj3^nTzn8{h z$||iY)ME3=&Eis`W(n7cKxPWH6e)wMLeR`Aigc3<(I6+J$Ox{sfJUG%wUjC2){n-H zV9iv(h5+rRqWk-)1W&J(P?`ivEMJk$>Lq#)7psn=$O<%+tiI*B2PHwaKqiGCb-zqipE`g-m&K$ zd)%?d9XoXF&}18T(sd|CW2g3>?n!~kAJjLo0-e4C>4O33g8}J-=S$zCNG;hCTw!7# zFkCko@6p#C-=^o=w3)j&!>J9w!^d)89?5-qO75YG6I{}kag%FEIa2iu*IaNOHCKgC zUeC$%*0Y*CIrHe5shj0%0*%$YLbF}vJ^!v7!`86hpvU&dV|(PWeR8;A_nNk22>ZMz z|G+yq!aF#^J9s(X9h$opc@Wks@7Ziu-}e~3ke*?<9E4I;TMDsKO;5V6ezb?~czy@@ zVT25XIRr6yq`4=QcX5_Y2hOtTz*#nZ;j^r6@}+qR(J};jSk#B1f|H>B;{nShm6<)Q zjQc`>5Gu<~Dx9HCIP_3`Pvfn%!H;uKw0v6aWCn4tgd4 literal 0 HcmV?d00001 diff --git a/synfig-core/examples/gradient.sifz b/synfig-core/examples/gradient.sifz new file mode 100644 index 0000000000000000000000000000000000000000..ab9014a7d90acfcd830efcbae0c519fb1daf8017 GIT binary patch literal 2343 zcmV+?3E1`@iwFqk-0nsK17~t!WNBq?bS`sgW_keaTw8D2NECkWuRy#zc*Y)IRwUK7 zyQ)@Nt*W-~$lw928XMUr3H|juHn+L@f(jtdj6c4v!of36(jbl= zhu}dUeth~co_W!;m!8J;2QVDG1b()B92&Yl94v9LSZ4b-uL({chtNgv!A8i$A? z_w->f7)Ra;KYd9&KfqBo_<_@GJSxWWNgvPC{2%h~;_#8ce;j_p{?}lQhr2m4JB!0O z8LZUVmjoP z#{yj!noxqpav?$zEYQ{gYK_IVplb?PbQ76Kg2l9re7yuLz%ecBJz;SS!-fWr#dLsf z0TBxTz%Wb+7Sk}H+ZqdUZOh`Z*ogdC5-c_{pln?%$8h1h!eU#d1$ZouO@15^i(xp> zkmwg^n!s((FRlR)X9j>$*CCxS3>2}LunS#But3pmaBbT_l0C9afLw{LLyqNw)>w!l zMZoRH9=Xtg!0ZR_UJ^@Fx4|VWpxb@G0u(Oqb+8aRd*6KjKFt#1oTr0qyC#nQVRBe_ z?w>+$_VfGh1DyK~sH-x!TIK_(y&$z8q`E6{jYll79V~cNoS;6=Be25`P+th53@>mp zc=o~#*%UM!oxaR`nt#imyS^kCN1q6h28S>3M&2uuU{N~upt)a9q=lSg+R13Ml>uk2 zj3A@?z(KyLU(@Yu8Gp_{Oo?RZZ3(;VMEH9g27d7Ya@e0`!7~}l62by(;DJK4_7ZP3 z$j|YQLvIyti1@Qog1zv-iwEq*>WpY6FQ_P}PD32|lNHXEvCq=xSRK@-Su7Y!Oc3yc zDVB-&e(M~Wknb7Wk%_rl&;^zfZectsc1pT$VGv<2nVdARa`W`QZk}DA=o+x3p7AUb z_U`qGMm!$9a`Rhme#`C!PqP9Mtc6Icf~0kb>BJ11l)U|eQRySam%=z+v$ryh<0B8u zy)eb~_vu%#_~k9mC-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Ielfd^|T5KkoU*c`2VS$G2X1oR1 zeFa4{o3Rc;f8lS+OxbRzej8hdO0yhXt+=J1zr?7jXUSt)ctUsXyQ`N){C_WoJnIGM z_v97jFNarZtPCWKS^}^a`~@eJhgMEhljLa>68L?6Dd@fEWB&kyDIlpg#?lf8rU1=VJ?nku8GGFl4NX02A6orbb@v)IhB zRNc00{g#W(lI7$GSho|QncO4eOUi0m%7fOKcB)6ngR+}5NUUzoXN^jfGR-+M3a{Qve5CoLuIlO=O2 zp}$z}yKo^xDr1d+$U__8}*M)c*Vy?t1OYbf#yu*(THC!6AUM++6Mu z0Flp4v~qW%yM2m^eC`T&!My-d74G8sMoV{2%{5&>{zXO|JK~TsM&*KzHjg-H4Mmkv zAHuE-5m%>)tJ1{PXrc-bM(s!KsSTz+i)8vBu>S=_y5;q=jP}k^ie~$ zDjh}9!uS}a5;a8VnofpU=zOw zD}O#p6j@*x^Fq9TE#vrq=+1sDl5>td){2!(pF literal 0 HcmV?d00001 diff --git a/synfig-core/examples/japan.sifz b/synfig-core/examples/japan.sifz new file mode 100644 index 0000000000000000000000000000000000000000..debec61a32ffa6afa8304302d1594aaf157ceab7 GIT binary patch literal 548 zcmV+<0^9u`iwFqn-0nsK18QM#VQwySX=Zu=Xb3JBEP69D)BV?N4bX5=$t4&=gEd`%mhO?MZLgek`?(jURro*;i-kE z7EUaj%+-9WoFy^xhi-5Bo(WDf!rn_satfx8|9to7oy;6cOIm{(cf83@76l8ib?u&W zqkDMIz0pCu=iqG@H%?kWu+|-ZQFm}hckt(QTQVm{u9mHx{ytfK;aDwM0e6PcSPj-R zHjwEnb#3Be?`b}$k>6U$Zg%dH>z4X9(e3htmkgHbLpW`5qW=6$tFAJGA!)WSr9#Yu zRuHCOhvnwbQ<)i6|L;YMZ(Owa>lf`xVt?73)qc~k`9c2urWHW+$v(-~RFCw(7V57J m1m)(O>Br9Tx)X#kQ4|lIoOu+CZ^J*T<{$sSgkU literal 0 HcmV?d00001 diff --git a/synfig-core/examples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7qmb z(D1Pyp@CQz*Be;I%wc`5n9AIj1n+0h``g6szer=p<2^!;rMdoJ8GmhLp07XW7W$KK zT-o^PVXyt15t(`kbHEv4w5!M)-*A05qUmm{`z(}N3gI`fDKp=i6p6jE5YUG-j=MiN btr?yQE?yoP9zWTIzWCd%Ptq3wJpum*@mwn4 literal 0 HcmV?d00001 diff --git a/synfig-core/examples/mandelbrot.sifz b/synfig-core/examples/mandelbrot.sifz new file mode 100644 index 0000000000000000000000000000000000000000..91c5623c5d33f06393c906e08efcb2b1be506606 GIT binary patch literal 1353 zcmV-P1-AMhiwFqq-0nsK18re$WMyn(a&L4lb7^LJ0PR}aZlgLBeeYKw-a~xBfTc9^ zFrP3w&y^G01P$N_NZZWUpKU@C60UBo>PTnuRBTvYUi-o}yQ?1`S?avWqD)l&>|zhO zKh{sHt;pX*c^gL_cAfVmuJ+F^MaXsbGTH5`XP4-Uk3yF4CuhV98RL5B)E#%& zD}qV~M%GV`v&uy#*Z%-YmC6{cmi4usNX1DOPIWrK1HV+7#6MN43RrPlC2ufR6-Vjb z?_NI#PaZ@eGDibFyCPG^ylQ4(u8;zx6zNgcLSBFFvUzw}Kiz}0NnryonXL9IzTqW# zC3nE{0y&Mdt+#Ons4p*9n&29NH8iEwvOT_Qjqh6Ho7VWIH7?ed?X8yLy4td}T#Mpr zS*zXAeY=<2-?DhwC{e`!3+Wl^m;N&TDE(#p)6zdsJgD+U@J(*3JBA;yA|?!7&_7yp zr-!-IZRIx3@X}@SM^3DLh3{FrJvY7fkjG^rk7c?kR5jvmq|e=wN*1DmJIX;9;ryP2^{SU7FOyjIL)G$3B9(g)OB*;k6_4V~ z+**=@MJpRfyF$c?%)3~ZiI%6L!9Z6`*b^ zct{41yzsa1!ZUaQ-kpLoOrTz0OWCzVJBW}`5M7Z|r4APS_YzSM<90&I22dSSqd;as zWdrJF(nqkrVf9^MRc1<6dmAqH7@!?U3lUmwMJmUUC+fbTs^E`O*;mU?ktdm`WZXb% zRxMXpy^GU9LA~Hy4=ne7G9k}-BNvci+}6>j7n_i#ny19a=QY-&nXByf}*H07CwfiWNVf7Re-*Ex&5f2daaUa12l*W`1?qeJVRu~dsh&_VmGmI$4%#T7%pqC-y z5jYdUEVRPVFCC0MM&>d^9!H!-0UTF`G_2VLaEl#=Au#k9olh`AVBsM22^}Da1FnA| zw?>fo9_RBJQi3T18H0g1v8-SO3i?Ji4ni$qL?geSAfZ+Rnb%H8qWJ_72??bX@c{)J z`Fw`$WExaU2u?qrp&vw$NEpHW44KanhFlazb{Il3#LS~6ae~KIrI z-=X{Xlj!>8OnN-w4t=4I*E)!?DLmB3x~v^Vha-)?1z~224h1gt;7vD%9uSX4y6iW$ z>bdsg;ka2@y+7m|lgHYy%nR`-K8fau^NF|KCOx+L!spMMlkK9h?&PJTYOy=XW_$&n z?!RF)+<(IeeZKdng*57{4%wowQ{T17f1zI-Sm+m%zHi5?U2FWlUrhSG8{28sm&b!F zUP_T2QfVxG{a+)4N|9-$&i`ui6@+pt@-)f6*0T`lVJ}|9yC}>)mS05$)$9MNSwH;? LO#a;Abt3=({TYg+ literal 0 HcmV?d00001 diff --git a/synfig-core/examples/newjulia.sifz b/synfig-core/examples/newjulia.sifz new file mode 100644 index 0000000000000000000000000000000000000000..cf16504feeae9cb10bb7e8819b8aa4d326ebe3e1 GIT binary patch literal 1534 zcmV93%wY5rpi?^CtP1XDWDnf+3Mq&l% z*7xft;lqYV0zta9yLF=`cye>^IX5=}S3i&YP5WRr-t=$-# zy7r2^Bv|Wn!_c(=B0oshy3M{E35?gewVYYwr`c@DnogHZF9^Plw)nW#N7i`0u&srq znPYou&Znk!ZW)zLx(1>Ife---Wb4}Qz}}6q!LYW_N6{!jdq{2D=^Bi@%D1iW;t&&N z_RL@}?ec>;&fX1u^Fz~C5!l1c-%$do*$Ik#?Vpqmto>!KCRrD|#)G?8}rffW5}1x7PnS9y}yLrJG(rAfVI$VanWE44xS|qjMua1pq1bym~623cT=KeZZ)>Lg_#&1eTtR{S)Py6hm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6)ElvaOFRgUTngx;af+2B|@{l|iHO=9FQYOMZN%y**{~KROG{(tthy0Q=MMFaQ7m literal 0 HcmV?d00001 diff --git a/synfig-core/examples/newjulia2.sifz b/synfig-core/examples/newjulia2.sifz new file mode 100644 index 0000000000000000000000000000000000000000..f69a0929389dea78bcd6f6e0b4bd542a9337c85d GIT binary patch literal 1250 zcmV<81ReVyiwFqs-0nsK18!w^YISUBVKOdrX=Zu=?OI)vno1CT&#$0(7l93KtWxuk zKai@_eWpfeVX^~b%?w8K>+j46%D14zZ0?OOtF)f!=|0_k26pxNm=NOtjANRvO~gJWYtvnNuJ!79OLghgymY|uW45Ko zwK;Pv&sHy^`Q~CX4U`Iu2u2b}uD;vLzc03>OD$gUAPq~OwoyO{WyAF>RXwU>_PfOKPZ;RaWyubo z%Jy+S^%V|IIS#?6nYgEFD8q8D4BX(A>FpaV+aK7VB#j)t+bvqw~1?duIU`$9KTYd@&>f&n4@igkHjdJu zQ#h29eFCJ2p%6pb#3~G>g4MItkVErYFg2lasp#6Q*OT6EoAi3l+ii1RPI+QI)g(x|tfoN9>uL(9YgX%E ze=F-*mBkZEMckjxVV%2PqYcOjij)V4KtJ*gmDeQUjaWb>*S8ssQk(&ed zG?Ca9gzp)_XlxX4^^{vb;db%Ai~U{PZ)bjm_dO!~5Aacc$>%ZNl_-VMh+H)D%)NBJ z+im)`Tzzo|%ng9BmzFchilwWaa$cLfTr3va_Gxj);iXqBd*fQj5UD#*q5gN3?wNv* zZ|%t%XiU7{nFKmVd^)7y6p#nwJ((c5=YZNZnF4~6{pch6IZr7>Nd4@Qz3BD*05HL6 z^jMzi828_z+Q~BuyGvhnhFOs)pp41>JXQz98Tcstp7E~nTwSLB?(X}W^(4;bUOS00#yE7$k*2$CZzuMNv9A`1r{nr6^ z+$v8C+J$wI{zZ$hF55;67?qPzzIWCoW~#6EB-Z(@iGB4ZzOnAu11H}5*7WM!n(;|` zJs=SSn*yr*NbkvyBhC}~kwGk(Pv~yfNgQ`XRjKSC;#Yg-yLx10Ti&^{9B28wmic=h zSydZ$H5%@iipkFnquBNb>(7Be|6BQKPbfaegz1*}9E0^F@o8I&rG9;SdFe~v_1^;i M1uFZ(_QNLt0J<=KUH||9 literal 0 HcmV?d00001 diff --git a/synfig-core/examples/noise.sifz b/synfig-core/examples/noise.sifz new file mode 100644 index 0000000000000000000000000000000000000000..8505d7a65824af423946ed8a6aeeea390c01421a GIT binary patch literal 699 zcmV;s0z~~EiwFqt-0nsK18#3=b7d}bX=Zu=?N`B$n=lZ)?^js92Mhs{NQ6~Ysi&%! z_8u9SfVF@TIN4;szP2|6lVmq!x7(^!eZp_z_uhCWOcLJj$^vbnX&JAU*s%z{kM6>R zR$JQkII$dz9$6~#CH4rxCb@?sW$C;k2!fU!bBT-&Eo2WVC?r%n35 zinmqK@n&A&oma8LPpjDBZ?58r#hSOh!7U_W;BcoDU7vL9J0rF~iS2u3ljmjWmOa50 z?IZmKZ8LUV`=#cs)EnxRrX~MY(~jWD8k#aNJ#~mt0Nq zgGg*d;z8tMhoAKLU*u~scfDY|FJcA$RJQxMuL=33#@wk-=JWB!4Ec|C7RWU_b!LeC zIcxq@tq-?GZnoz9mM_26)ozVUglWSq8&lf hZfg1CvZZBRz->gwnJ?Q>|7VNtegYz01IyD5008kaTU7u6 literal 0 HcmV?d00001 diff --git a/synfig-core/examples/pirates.sifz b/synfig-core/examples/pirates.sifz new file mode 100644 index 0000000000000000000000000000000000000000..5e0f409c1f94c3c2f2222afc25c876f3f39255dc GIT binary patch literal 654072 zcmce-Ra9I}w*?v?gdo8sxVr^+cM0y$5Zv7zLI_T93-0a?jU>3ccN5$pxWjGu&UgO* zjBy|C(|y?kYS*q>Yu1``)!wU`IO6?#*Dvr=&@c{`PKGX~&P>jhW^WEN0QQ)JaoMb znyO2v@uS6}rH(&8-G^)d$A_ou@@5AkeDS89R{d|6&$%Mv$0O?Ovx)+*uAh7_t{xsE ze6dzny*v4Nef*z{I;)RQ9{pPR%lxC%zKd=a_+4!E{}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Q8CsvTbzpi?8EKSoc0-}&%+eqKdswM=B8lN!+miJR*YabLyyJiUeABGM`Jyyr zI0*|1=Y)3~{MUcwG)z{7Cd<{)o3eM>blB>Dj;r+Qtv&cNlK*!rHw|lo*nyKKFKD=S z7zq>pROvZ_>gX+X-sc1+?9ijR$0xsT#hJt(C{QeBg}tx>=!Q*8zjB#lc9-vKx-@8> zL1rmpxP3j&%6SUJB{QUvS^ljw2#&d2f3uMNQFC|`& zR#VwoM-r)&M!fazvzdar@WB0*QMlcirWzgm)oY7(Ovl|Q@aj+>Mwh#!Y$*I1nCF6> vxy0@BUN=vyuZREx@D4{K5zZWa_RHKq!Raud+2?ArQUa|xG%AmP4UGPO+M@46 literal 0 HcmV?d00001 diff --git a/synfig-core/examples/preambletaffy.sifz b/synfig-core/examples/preambletaffy.sifz new file mode 100644 index 0000000000000000000000000000000000000000..740bbb65cad25302823862086b140346ed56942f GIT binary patch literal 1030 zcmV+h1o`_PiwFqv-0nsK18{O>VQpe;WprU?W_d1iX=Zu=%~;)z+B^`w&r?{rUPAr> z38<<*LRIy0Ws(W_YhqK|0n(@M#0$afCJPAksks5q#AlA@%-DwcmqS&O9Z1ClU$}wi zyI+>hJfnO^)!FWQflKx**PDeKPkoncfUP%r;f50&93&|GI*np4jgv_dx}^DN+A-LV zR^qU5N3rLdhlF03m@l1WbTYYwa?NPTC<0;hVvC=V?-|z$){Kuds{pwbE&-k&M~Nb6 zSUQBvIjvy%13`2Nc|0GRaqIX6O(AhWI)HJXJupzcu5j2D4ZGrDS7NzJ+JGdw*`ocs zC|UkZltN-YGR<~q)3OHlQk!-j&fHRjB<(sEF0Dk(_0fYq2^583yw0Z$y5^V_d@;d7dDz<78$T9e^30MlHeRiPn5<+t-$TZP{0reP!9HWv5-V zu@%muI3JsAf5^LrgZ{@eeglqKMK@n*$@qHt6JChk0NH}rmOw;dMn5>ykdyD4YEUl@ z<3z~3O@|PDCpi?rak7K{N@y^?HE@ua!9A1(m55AvenfX#KPE{jT##y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z@XcV()T2>mjuC`#&e4_u$ z{D^6Pdo*O93zKlWo*;C2b!*Ak!LfSAMA^~1B`f{H%anc=EcB=+7?(gm$1K&Z@ zFz%hZ`zgFLExooWUT+4x+*?liM_>tu@+m1A74^ds(5P^`iftX1kz_f~;0%Q32kmB7{1SE8`>W@tFwO0Jg;k5rVdPj`)-Xsz-dN zHGhMKN-G37XehZtgoB3KD};E?6k1;(#819U?N5d>+`bZHyCL|TKg+6QIiFW&8iKH) zqbki)c2{LzRkk`-SbtTaxBF>H_e2X4p`OQQMqaRG>O>`v7A4auVv?24%cZml&TL&Uv=3JWp=z zc%J9 zY%X)3lAM=6WKCbyKqA^3h>pB9Tf5#OWd4H}%pa?Yo7v8hw^s?wcRk6^Z?OIe8S}Lt zZ0YgM$%P;4DytP46_|JdG?e3@5&>+^ zky^Ug)(*C{du=`jRIsYD`wmL}{WH?(!qoR&bRavzCA(tGb<`>WICWXm4+q)ilt8ui1-^VKWy#d zd^;cIONXvp`pTuNkXJV_$v&HcRAvGt31OvlXQwz?zI94`L3uN%>(3@HS2yI0_aB1I9JEh~kW6o$5 z+vf7?4sn0qudL|GiZVfo6@lWHw+4}XujaQNF{;jZJ_{=<-=M00N?E!!J>e&+vO7}6 c?P$aAI;A(F>ZOqVruPu|{}~wY*f>G}014)RJpcdz literal 0 HcmV?d00001 diff --git a/synfig-core/examples/splat.sifz b/synfig-core/examples/splat.sifz new file mode 100644 index 0000000000000000000000000000000000000000..a0f3e902f7fd766d4a55d57c9b86267e1159b1bc GIT binary patch literal 860 zcmV-i1Ec&OiwFqy-0nsK19Na}VRSBYX=Zu=?O4rrsxT1V_bIsS)qrB_IcgX85&8h0 z03+l!B%CB#?bF|cf>00D301tZX9(F=3?z!x%AT6VL4aJ@?!t4&kDj+MqGMCEC-64%`C(;`+%d{7%Nctg zHz&!c5ZM-HieO5x2GZ8IsWj%snaYQVu#qAOXl`5E0v1+QeiU%Zg`u6pH*cKWpuK*u ztR=$}Ae%SjfvMhJr# zf>#h5pJNgJMzLQMJ#;>bg}ffcLVj};YZOy1OM-g{)F*}qZP9T(RG=R!x?@duEG<`Y z+D%LH4jr~n@MmmSb=|hxk~hID1nLW}E@ZBIE^~JGCK9k`V4ek}(cp2pscyxQMgGR9*o@n2x6!0x1$WB*2!r1m+HI)pk@omn*eGyfxHc%W*f*F0ctjaS}UmYa=wL^a|JJr_sN4- zgn)0i5}J{?{Tp&ZrktlkWJ^&}y2gj8sUd)}q8b1wFRF`3eXFVg_FGopRaP?LT*X5q zM!i5AkONex3^0Yu$Q@H(+f48y&m`_3<1A_!XHm;Ii_ljcN+?d!-Xq;dKVuMKv+b^i zmJ!$lKqz6+eMohT+f!kyKWpNq>}>P15|~MSzK6c0!Uc&4>zMz&`69dAr~3RqLgVS< z2iw`xJqLhy&Xc~}FV&__t=x-KbWLn^8Hx@sl!0lUf~vaPo$wPo-h7aTH=R9Bo%xx+ zFlg>MPtAt6n7OX=B@NF!9dIFZXb@yL$2sJ-28Av%qN(7wg m1|tVa3OMM&Y$t{pLU5Ac`(_Ru-|T1b`r$v5@1xi(761U}tD;N* literal 0 HcmV?d00001 diff --git a/synfig-core/examples/star.sifz b/synfig-core/examples/star.sifz new file mode 100644 index 0000000000000000000000000000000000000000..ad4a8e551438326cc6da4dba4c4ef183acebc5b4 GIT binary patch literal 2179 zcmV-}2z>V+iwFqz-0nsK19Nm?axQaeW_keaT}^YNI1s(hub?=OYyn}CRFTYKtM>jqZwo=5FZE7*N04MRkUxB|cv4bNAr{B1Jv5_Uw5>j{bT2BgozD{H7S!H>YCU>^e zllIU1Z^0l;p2K{bE_;q`y+p%ea%W#jX#SCN173 zJxA(AJf*L9ws3p0`dCiSU;fynh;@=}g-H>GaTMx`^xa3Zyu4kn`s+!JqeK+ZRB72p zwxyEc>dMb8opArnvVtU>s{6lmB}J@;GU!*=re3k^C^xJU1l-UWvbtgvouNy+lte4c4rsa zT-jDMyt5xB;Y``fQo5WD{@-z{e|s#cW`(&;SCqhg<6+iYb875_H)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W6GL-Cnz0O~jyI_4b>7&(v6VF7ZB>U(o0B^geHhn2tuds&!g( z8oswz{^5zeJDm^TJxcULt=+wj#f`!^SM7Z~QeiPs+5X2aKls?^SvdetnP#~fPqmJD zjHA4;t$AK*kx4jPHRRBMPv=FciY{Qp%L5}`@`(Q>M|>mmOEfGdpD|$bNtn$Z2lITE z@9)eylz+IIOi!TUV-d~%k^i3bP_`90AFSw*P8dYlAXXRPcznG|$iiVXuZ^Py{!{j0 zeJxAt%llC@o_(%u`+N0)u-CP3P<7McZ`8ew7aG*vd>j3=y1lmEKB?;K?yCNz-fq76 zoW)M)x2P6_>2F>G-x|yxwg0}vV1{w5t^S9U7;9zL%Ensxq^eu=gfCeuvsOM*E8iZ} z%0l)$m(?<><@2lMmMJGYRB-0XlNB6E1$P*y(F*SN$GUZ_;8?+(Pr%4aLBHZo-twa9On1m{s-V%?0`1` F0RR*~Pyqk{ literal 0 HcmV?d00001 diff --git a/synfig-core/examples/walk/Makefile.am b/synfig-core/examples/walk/Makefile.am new file mode 100644 index 0000000..7ac6f9e --- /dev/null +++ b/synfig-core/examples/walk/Makefile.am @@ -0,0 +1,10 @@ +MAINTAINERCLEANFILES = \ + Makefile.in + +EXTRA_DIST = \ + animation.lst \ + frame_01.jpg \ + frame_02.jpg \ + frame_03.jpg \ + frame_04.jpg \ + walk.sifz diff --git a/synfig-core/examples/walk/animation.lst b/synfig-core/examples/walk/animation.lst new file mode 100755 index 0000000..4456c0a --- /dev/null +++ b/synfig-core/examples/walk/animation.lst @@ -0,0 +1,53 @@ +FPS 4 +frame_01.jpg +frame_02.jpg +frame_03.jpg +frame_04.jpg +frame_01.jpg +frame_02.jpg +frame_03.jpg +frame_04.jpg +frame_01.jpg +frame_02.jpg +frame_03.jpg +frame_04.jpg +frame_01.jpg +frame_02.jpg +frame_03.jpg +frame_04.jpg +frame_01.jpg +frame_02.jpg +frame_03.jpg +frame_04.jpg +frame_01.jpg +frame_02.jpg +frame_03.jpg +frame_04.jpg +frame_01.jpg +frame_02.jpg +frame_03.jpg +frame_04.jpg +frame_01.jpg +frame_02.jpg +frame_03.jpg +frame_04.jpg +frame_01.jpg +frame_02.jpg +frame_03.jpg +frame_04.jpg +frame_01.jpg +frame_02.jpg +frame_03.jpg +frame_04.jpg +frame_01.jpg +frame_02.jpg +frame_03.jpg +frame_04.jpg +frame_01.jpg +frame_02.jpg +frame_03.jpg +frame_04.jpg +frame_01.jpg +frame_02.jpg +frame_03.jpg +frame_04.jpg diff --git a/synfig-core/examples/walk/frame_01.jpg b/synfig-core/examples/walk/frame_01.jpg new file mode 100755 index 0000000000000000000000000000000000000000..e59b8da072640315b2e6cae020c79796858f908c GIT binary patch literal 5934 zcmZu#2UJtZ*MEp&!38N21%(w12toqV1ri$|%`9E|Qi6se0#YSlK{`gdG$UOgfB^vs zO==)WiJ>T=EQA)Sl+Ym`y5+xn&i9*h=Dv5&nYq7v-^|=QkNK7P2XIPTLrVi-IRpR> z2Mu7(16;Sf?4A7p7T_=d0D=dqMS$bFgPR=^aQJkfVPR5%VBi!xJNrrYQzuWJ0&)Jr z2@>Evb&6L&2=oI&f*}3_fCL3az+zw#K`2yK77D%gU$Ag-a&qx-o#y5~&C7Mr_<8yG zc=<*7`Ooq5i%N?K9zaC;GDJ*F402gsURqjS{@OM8zo%e+0=SN`ya&2jS%iT@Tr8|y zEX-!$Ex_^@4w(Ll!z@Qw53wEnss3B{Q?eXlJp~*(bRbxd9c4Rw_~;Mq!P{Z3BNt@2 zuj}*Jx<8G{5WaE)-(X<(OoW&05i5K1bY`jNMMHZz`R8$EMh;*$E|vp}Y)4pGS&y*% zIXes21)1ym?s(g$F%5^lXONe#c-*jiHpVS%kXgzc1WvND9MEOu0^q>@6970V_vfe| zJxj=Iwgc7w3)Wx$QU5dKXo!jN-2@evzGeL=;qv&2Ese{yPv?*c14mUZW*l3N&;Fv* z^$oNk0P+8wrX$S1OmJ%~yt7HtBH4sUk}3uQvH~aiHpFmF`_X~7iIrU)TP%F36a)0# z_d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atPL2s)b zNs!%v>WM7*%y@^0az==Us7YtmKl}KO*y9hd!PpJZb!umnmKTfR*B9*R#RiLdJ0~;M zw0!LI4}b@V%WHjS=sL}jPH=&QALFv{GG z+POfD%l#Y$O-yDO@29_6u?{WZ37)h)LzMpmfFaLxL3p(FW660fa&6KJ)qIS~iAps? z-+}r!mnV`&Fdt@krtNM*&-d?rBaRk0r-=#5#DczBxf!#?EchuP|LF7T(BXIT_jmx! zDWC3n4@mc@mP+{OBlS~@x*!tn{z?^9nQ94!)|WHoTX7LKcW#+BPt|#kg8DjTGjAq` zyG4{eTr>O4Tw97RV7m@x$ONEVKzAyO4}bOhFxl|YS>V^Tiu~_s;Ngn~N7L7gV|4Qg zYQ~+Yi)d3$j*ktBkod&X@safDgWn^pO$t_Ld^!kKaNGIBaLBmYaQ(u1EBti2dD48QGM#RxR)S;jnCdhXVpEf{w%N^Jcv5W7a7G)~BDHBa=-<;F0_%k4zI`J_mT3k3L$tE<$Jk77juVtfU74i9Kex7X8 z@I#Y$_#*Fa`8P0o*5>GOf8W%-Rlegjgr#N_eXCDLb1I(ql?45ee6_1vA`+G=T$hLr z@}vfBJPMk+x&Cyz3Z*=*-`z}*DgmRqXCcZumjx7ka^)=8?J-7ELl?6N*}W>Np+&jYNr?{u5%#1Q3BjU@T15JprU{e+Fgk~44 z`-OoA;p4=FSu3?DB0hT*8@uvLX)@_bS8ZS*q9$(o#QyETFJqR)qv5(s47&hyJtto~ zHQLB2AzXazAp%j|mfdu1rLC^U=^nb|wn@3mYD25<*I8M#NoN%mvegk4jQ-KyE%_yWPXbX(8TSq2ofJ6=7z)H^b6YxxILC{M`aIz}&qhN4~vaye>1W vRmNQXVs#Rr`fxcb62osdltL4)^N6E~!&TH8p8PBA{AB%S_g7f~XMX!XPTC5$ literal 0 HcmV?d00001 diff --git a/synfig-core/examples/walk/frame_02.jpg b/synfig-core/examples/walk/frame_02.jpg new file mode 100755 index 0000000000000000000000000000000000000000..145d8193c2ee221b776da9eaa53d645d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np$`mJgBk z^6m>n?3fa9=R%TT@dmT|f3#fo*555sJYi8IsuoU2gyUP8n(lp#` zO?bH9XdoYEO?WOLrAF?sjAqYPLcV*Pq29e4_n;pis_5HZwy#QpucKsb-gAUx%k$q! z2f-CJu>f!!Xq=?(@IQu~nw_BI<}guFtME7eqnW^}TOR+e)}&O{G~R6#E-oCG=AhhU z`W;jSOnafLhh4K+FH` zGt5fs6s7aVu(T~9SWePV;p?9O&Gr9o4#&R&SegF9k6YDtwnca2hl;NUrPPyM4nAyS z6a5@=Rjfp^Z@ot=&sHMfSyD#;<+HMBys?r2=FhT9&3yI=jKjIX?e?x)4Ry|o!;4YI z_Mox-x$4VY1X3L)^M2uq6G=iAE9=S9OL#!QhvxN1cuC0)WNhOx;AbhraskBHuOe=?%eMGe1TtOB>j$Z1ICf8hCVqGA8(~3U-WE)NS}8F zK{$XE+({Wb5C{W+=O@j6t=$vAO@MzXQ#?E20+Yzh4J`^;fQ5QR-IskeDPCY_Xq6Pm zUlA|MvJnOTav}4M8p$rvd@(tf5!35Q(ttKws~x1nxdp@jNC>fie(^MirRG9 zryqNiS?eH+Or|TzLI)hIW8!wBd=d67?(g~niWyMa{3MTMUvsZ>yiC*8yjw=62H$Vxjf`=k+>&x^mg0>CfGSpX86J{S0u9NdEy`=N=~j literal 0 HcmV?d00001 diff --git a/synfig-core/examples/walk/frame_03.jpg b/synfig-core/examples/walk/frame_03.jpg new file mode 100755 index 0000000000000000000000000000000000000000..57b583ebe81f3ee0a4762caf2c097bf7b71426c3 GIT binary patch literal 5842 zcmZ8l2|QF^`@e%qlBFz#Mv-LSvK2;){E%gcjKNeh60&dEq6Jwedo*^DJ%btRNV0Fq zmLal?eVxJBz2n#Kec%84|K9t#_j8|f?)g05=Q-y*&vOoc9{vW{wC`%&1weEFfTCT% z;Ud6(#~o?s1%Lns006)=(K5ht6Xp2W3P63KNkE6gz#D+=)TvX#}1-r2OWL` z-UFaNpegzfKn(Q9=uR9-|1J6R2GOwrbaWsP!!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Ms;!?>9Lag7!RD8_d-7C!t1)nz_J*uYNb%gfPPPvgJ6W7EA2W+@hyFW<@a zN~c*Up_w8l+;d|zwffvQcp~S%b&UdTp|H{H9kVGk(qW!(2;?^}dsF8-I~rQcO|?%i z6?xoV?F@63x}iur{qiu{7AImKuIFE|%^&|hHJGb*@VZB3^wGY_69s0ECRrHw=3Q`` zADL^fu44mV`FxCc(EZoZ7VF&Bo_VI2YuhP%Jrr&wqS_M*hs&-~RF+C(zBKt{o(A8x zzRf{MzEh^k<50Ad z?rvyUWM|symhBhF$(d!S^(5s*x!r@(z{=mUSzh=M1nL5UveDg zw^3THFW?9`I<5gRs}yTcjNKXp{O5llU}JI$;n(|?>?_rH7D5MHW2i`QOm{O{DPK@f zQmK3k#v;4z1^*b*=(LdcI;g+rQ<7_Q{R>kM@824D4&u1Iy@kaG;P?;S+7SC^t?jwd zZ?J`CC@UM~{r9`?$bvJ8ZLUQ%*HdEJ66pO;+u27`o+*Uj5w9%+j^eV{&~qws%Ku#h znqyr@08M>Z^?<0Ep{|TX^~BwC$S`+G(AW0Ub(70|EtoKL$`T=!lyhkbi{Hy9?7&lP zuTQx0`6i4nTEPUeA}RJ%(K?RO$rHbLLbh=YZKs4LMmFD6s~<3FRZA@v( zua?3n%_3lb87z#eA>NP}mmelzHxSo02P!FSuLgAp4C_Bz-@P}g zy%6XW;iN773K|NJ*5Gqj(uk#_#R5hq207Bh$J1B0R`r~QPjTlfK}vjLfK8pGJU23RN-VOUvK^ZFPuH92}*g zmaLLkmpLQsd#US~&MErVHneJ2Q!+F!T0B!{^T)jv;O$-EXy#gH$ F{R_iV(`Wzy literal 0 HcmV?d00001 diff --git a/synfig-core/examples/walk/frame_04.jpg b/synfig-core/examples/walk/frame_04.jpg new file mode 100755 index 0000000000000000000000000000000000000000..e4ed4d6da62516fa2d49aa2a4b557ca4fa882402 GIT binary patch literal 4891 zcmZ8l2{@G9`+f&mN_M6X@nv6P!XSjU;TuA>ghAG_mSq&#DlL{w*2$8|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7E1LU zIFCDlcq}IJWHDaRUHlU~=t83!=AJ&B9(TH{v-IvRpsb+1nRqy8yw+_P9p-*P9fB2$ zxt2oR1=7{YV+oH)MN+QAQ2>ihdt^)MljlYnMe9k{M4(O6t1O&&%L^6?WpTtsGz=gGr+;G*k($oWGt-6gZqrkLKwOyp|LLx0)Joy z0Jbz!*p26=45!-%Y>G6;>fisBoNAzCN~gZr*ETR39urLPQc-StNnPa7k?hO>AF`ZS zE0|bR;};&Cw90;QfCA`-?kUBQ;JU!}A~M3JAGPH4>v)e5EZmR}CrW&pzrFl+1<%Y{g0x0iN!1x0i;ZMq3BJk*w7`o6 zylgfcbU2nZmi^?Rp;=4>RN7J3ngo+Ot>PIlq{Mwv1!ujY^%45w_r3WK-v4oT$^Qqu CF__Q* literal 0 HcmV?d00001 diff --git a/synfig-core/examples/walk/walk.sifz b/synfig-core/examples/walk/walk.sifz new file mode 100644 index 0000000000000000000000000000000000000000..673ca7a540df0e4c853f5538e1313f010068c494 GIT binary patch literal 10574 zcmYj#1yCGOw=}j`kOh`NaM$4O?(Tsg!8H(AB)Gdn(vh@6!G#tE}v7Ie5*xCYS*5I=PVN-&SNQd~v4D+|`YUWm0 zISkjDPbWPvp5H9|+=;#uQM1vscV6mWoi{Efm@JK*sjgiuEF;un%QZyq4#aBpHMc$v z7%k-J_*R^E=&!A}3Kf9e?qc11J;Cmd*8_bi0}E?>SwCM}J^o%Co_-K;Yj~<}e|k9F zI!*KVGhuXp%yQ>}ErfYg0Ii!_cvbM#|M}PJ_W0DuVZv~!>hQJVA=CRl)}g9(xy`wu z`M3M;<_9kqW066hKcOvGqtLa_9hD-6Ypou?n+-GUNXNC0GwxUZUZy0sU7R_T&t+sp z9^bZ*R#l!0SLuitdA**F9iJs%%{v@dk)EB3lskxQuf<{>x8Sz9w|SP|@hy4B42a;l z<|JND?5#napTYGXW~F=QI$jpe-Eyj!SxDypzOFfVCOzajcoKDrZQSu@-#P5`*R&b= zKB&JM|84!<)ZC!bY9!>I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I|4@)+ZEvx`Aj=9)OdV(DK4L5@c%5~; z&sK+6wse6Z!V)4ZA;J_?#sMj0cPd zj0cRr662v9f(7LeZa^8zA^e)<5HSDgWIfQ7naKj|^vnWtE zikeh*U_iA}eOog*lC~tz(l#cBJs6Cn7zy$-D?6M7fLB`N zbD291&a6@r;(lvppsv`EAynO{W(K*sXh!RHLDSVW@=7Ck;na5vC1#rfFxcD)vHuNX za#8F*Rz!21hsiAcG#~q4<+bkDtL$n#G#WAA@)8h@WHy+e_{Q!j5q|O^XKLbpbNvby zO#3uTqV>}c#=1GpQq$bOeNsoN3hQ^`L(jI((}bjzyIja5mVm1W-C1fMqBr(Lhya2z?Ws}k!ogPqfpzg(EgAJ4{+ r{s@K0tl~)$+%>+R9F0`q~2h literal 0 HcmV?d00001 diff --git a/synfig-core/examples/warptext.sifz b/synfig-core/examples/warptext.sifz new file mode 100644 index 0000000000000000000000000000000000000000..44eb6aeebbfbe31d662e0e4a9b0e4e6bbe236427 GIT binary patch literal 690 zcmV;j0!{rNiwFq#-0nsK19xF^aCBvObS`sgW_kdvR?BjuFc7@wD^%PK2qb~3F!_PK zW%uk7AY;|?Dj`3}*RN1)%m!>6C-#MzvASn^G=rnpQ(1rmm#wI)wFPb0dW~PAlvM}T zUj42OEpQZ>+N~`Vx)#`Rk?+*n@&av~ByaU&=p&mT9AM7^-PCmu{J2W$)7n}g+ch8H z*&a3zgJ*SdS%6hautG2mq}jJk4`_a8frRIxS}9R-o!iy|yvjyalBac1%RX)VfjWJF zXF@A}0U)Ya$>TqoPZc~vkz?#WP_T|mpt?pwD}GWst5k_YZ^=Ek#tL}`N}p+%WF_b! z*4Fzb(_@YzfjQ#n@pO5^>$e)b- zEQW)h4Q$Sc?ske>R*IsV)cVG%7QAsOwvX1@s;=NSHGiOYM>BXg5zr(3PwTSL^V$By zT{`?ESS#K~;v9IY{<{e$-Pw=j@X^K7DAs+7b=MA$ac*q?<2&aufK>)b%dA_&!r(oPw3dwC-N@6X7@shF!en8nSG_{3B<%l z0eq&78E@5M`Mw=cOh^!hB$$>T`mT>c5BvVp{P*kkZ5#%KV2p!F{hsZH-=$BM=mXtd zs#8ESLqwrZLfEVGH2tFbkP<>sh}~)Xp-l-T7!pe16A7e+XudXjp8$4x0lwGO{2E91 Y*Z45S`gLmlImR#l0AmrLm01b^0O~4Xu>b%7 literal 0 HcmV?d00001 diff --git a/synfig-core/examples/z_depth_test.sifz b/synfig-core/examples/z_depth_test.sifz new file mode 100644 index 0000000000000000000000000000000000000000..aad89648e77f13e3c1af618611a844f6a233623c GIT binary patch literal 1330 zcmV-21&iwFQE-6;_OOT1toDo?;(#?F zK}n#YfBia60w(X!q&pg%6Mj{dtIA)MT};0pw>CH+&&RGa6QsTR1%O2I2K4m#tf$wc6tHcA|jh50OXi)OZ7q6VXRlK?Ruf) zT0}VeLyCC{^KSr59k@mF{|L*#My5C&&~`YmMF9k1YbLBcY%cwc`zC;u>jcOl8W4p+ z{xtlK*lB6@MavwxtDwHeCMufu3!N;FOao`#%zx~?osGah$O`@fy1hr>XK1_WAeo!D zP@-x~*6L`39g{9DUnXBIqkLkXA^Y;RO0<^Fju}RD%9p8EEYrILe?0GZHeSI1{h6X; z!xQpAaM}?f|GG9d7oo=xw_64HK>7l2PYif<1j2P>Zn0`1poYtsaJ50JU&vb;F7(Wf zT2bsP(f&ns+$k%H1y&RbtSEleiYXCyu745mfL6hkgh#?rilPFgeq_c@sj<_AGfStK zHO1+2-e>YTyxFm8-bK#)1Ns44(4brDy1+#KicF_q_i%9JdYFX$3S(Ua%NmOvYwRdd zPQ;ue+GaRhp%M00#6q=g2^P_U3%Lrz)--RjMP^eu#8alOY4CcqbB&+x0#Y-|*SMBg z|Rt(;Hl6~@J*1xOc<8Vs%(nbBO-OXSZ8Q?(@znt1QGV+aeuV1qIWyN?I40G?>Z z!CR7cnemB;4w(SL^p$XubyZgMCs7%Vhw5bV^rCB$JXxrkJkljy6*7u`gQuNK9EQnk zQ&Vyfff+i^ds6=l*4N;`Oe=&5Ru}nfrh`PrD&gbox}p4q*p?DsYg>HzChP_;0mG=`^jDesDo?wT>%1lHuT=$Gs7PNiT5CNfWyH;9t=_n*u5M^?>xZ}3K z|F`?_@qW^3z)zgGdBD%T;KZY!9q?H|;Q>GObrbSc~3*T_FEnsStG5cEqUy;E{H&WmGXld`a@XoO4ht;l+(kw?se*?|3TTrJ_aYDb*uqrTo z02LdO{ta(FBrf|XV~K)PgH~Z;gDZK-Oq7YSQ%-3Kv!pA}30oTaxPW(;@BXp!K3P}_ z8i;c+rIO+T%e(7t?@_o4ljdd0y{2L3nVgkFFG3GfFjY0>b)>zFUiHOd@ghCx%IouFsB2?!`1~|f7j3+scIE-E&F9n4c)+{u z{j@vJ*KIzacJ}?0KcDh?X~)7nua`bdy_Cm$9`AX)zfF7|@4FlCdAYPa#Pf0~9p&Xx oUM_7+otI0CG} +# + +AC_DEFUN([ETL_DEPS], +[ + AC_C_BIGENDIAN + + AC_CHECK_LIB(user32, main) + AC_CHECK_LIB([kernel32], [CreateMutex]) + AC_CHECK_LIB([pthread], [pthread_mutex_init]) + + AC_HEADER_STDC + + AC_CHECK_HEADERS(pthread.h) + AC_CHECK_HEADERS(sched.h) + AC_CHECK_HEADERS(sys/times.h) + AC_CHECK_HEADERS(sys/time.h) + AC_CHECK_HEADERS(unistd.h) + AC_CHECK_HEADERS(windows.h) + AC_CHECK_FUNCS([pthread_create]) + AC_CHECK_FUNCS([pthread_rwlock_init]) + AC_CHECK_FUNCS([pthread_yield]) + AC_CHECK_FUNCS([sched_yield]) + AC_CHECK_FUNCS([CreateThread]) + AC_CHECK_FUNCS([__clone]) + AC_CHECK_FUNCS([QueryPerformanceCounter]) + + AC_CHECK_FUNCS([gettimeofday]) + AC_CHECK_FUNCS([vsscanf]) + AC_CHECK_FUNCS([vsprintf]) + AC_CHECK_FUNCS([vasprintf]) + AC_CHECK_FUNCS([vsnprintf],[],[ + AC_CHECK_FUNC([_vsnprintf],[ + AC_DEFINE(vsnprintf,_vsnprintf,[define if the vsnprintf function is mangled]) + AC_DEFINE(HAVE_VSNPRINTF,1) + ]) + ]) + + $1 +]) + +AC_DEFUN([USING_ETL], +[ + AC_ARG_WITH(ETL-includes, + [ --with-ETL-includes Specify location of ETL headers],[ + CXXFLAGS="$CXXFLAGS -I$withval" + ]) + + AC_PATH_PROG(ETL_CONFIG,ETL-config,no) + + if test "$ETL_CONFIG" = "no"; then + no_ETL_config="yes" + $2 + else + AC_MSG_CHECKING([if $ETL_CONFIG works]) + if $ETL_CONFIG --libs >/dev/null 2>&1; then + ETL_VERSION="`$ETL_CONFIG --version`" + AC_MSG_RESULT([yes, $ETL_VERSION]) + CXXFLAGS="$CXXFLAGS `$ETL_CONFIG --cxxflags`" + $1 + else + AC_MSG_RESULT(no) + no_ETL_config="yes" + $2 + fi + fi + + ETL_DEPS($1,$2) +]) + + diff --git a/synfig-core/m4/cxx_macros.m4 b/synfig-core/m4/cxx_macros.m4 new file mode 100644 index 0000000..8fc247a --- /dev/null +++ b/synfig-core/m4/cxx_macros.m4 @@ -0,0 +1,88 @@ +AC_DEFUN([AC_CXX_FUNCTION_NONTYPE_PARAMETERS], +[AC_CACHE_CHECK(whether the compiler supports function templates with non-type parameters, +ac_cv_cxx_function_nontype_parameters, +[AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([ +template class A {}; +template int f(const A& x) { return 0; } +],[A z; return f(z);], + ac_cv_cxx_function_nontype_parameters=yes, ac_cv_cxx_function_nontype_parameters=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_function_nontype_parameters" = yes; then + AC_DEFINE(HAVE_FUNCTION_NONTYPE_PARAMETERS,, + [define if the compiler supports function templates with non-type parameters]) +fi +]) + +AC_DEFUN([AC_CXX_NAMESPACES], +[AC_CACHE_CHECK(whether the compiler implements namespaces, +ac_cv_cxx_namespaces, +[AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], + [using namespace Outer::Inner; return i;], + ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_namespaces" = yes; then + AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) +fi +]) + +AC_DEFUN([AC_CXX_HAVE_COMPLEX], +[AC_CACHE_CHECK(whether the compiler has complex, +ac_cv_cxx_have_complex, +[AC_REQUIRE([AC_CXX_NAMESPACES]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif],[complex a; complex b; return 0;], + ac_cv_cxx_have_complex=yes, ac_cv_cxx_have_complex=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_have_complex" = yes; then + AC_DEFINE(HAVE_COMPLEX,,[define if the compiler has complex]) +fi +]) + +AC_DEFUN([AC_CXX_HAVE_SSTREAM], +[AC_CACHE_CHECK(whether the compiler has stringstream, +ac_cv_cxx_have_sstream, +[AC_REQUIRE([AC_CXX_NAMESPACES]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif],[stringstream message; message << "Hello"; return 0;], + ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_have_sstream" = yes; then + AC_DEFINE(HAVE_SSTREAM,,[define if the compiler has stringstream]) +fi +]) + +AC_DEFUN([AC_CXX_MUTABLE], +[AC_CACHE_CHECK(whether the compiler supports the mutable keyword, +ac_cv_cxx_mutable, +[AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([ +class A { mutable int i; + public: + int f (int n) const { i = n; return i; } + }; +],[A a; return a.f (1);], + ac_cv_cxx_mutable=yes, ac_cv_cxx_mutable=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_mutable" = yes; then + AC_DEFINE(HAVE_MUTABLE,,[define if the compiler supports the mutable keyword]) +fi +]) + diff --git a/synfig-core/m4/freetype2.m4 b/synfig-core/m4/freetype2.m4 new file mode 100644 index 0000000..14c3b3a --- /dev/null +++ b/synfig-core/m4/freetype2.m4 @@ -0,0 +1,146 @@ +# Configure paths for FreeType2 +# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor + +dnl AC_CHECK_FT2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for FreeType2, and define FT2_CFLAGS and FT2_LIBS +dnl +AC_DEFUN([AC_CHECK_FT2], +[dnl +dnl Get the cflags and libraries from the freetype-config script +dnl +AC_ARG_WITH(ft-prefix, +[ --with-ft-prefix=PREFIX + Prefix where FreeType is installed (optional)], + ft_config_prefix="$withval", ft_config_prefix="") +AC_ARG_WITH(ft-exec-prefix, +[ --with-ft-exec-prefix=PREFIX + Exec prefix where FreeType is installed (optional)], + ft_config_exec_prefix="$withval", ft_config_exec_prefix="") +AC_ARG_ENABLE(freetypetest, +[ --disable-freetypetest Do not try to compile and run + a test FreeType program], + [], enable_fttest=yes) + +if test x$ft_config_exec_prefix != x ; then + ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix" + if test x${FT2_CONFIG+set} != xset ; then + FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config + fi +fi +if test x$ft_config_prefix != x ; then + ft_config_args="$ft_config_args --prefix=$ft_config_prefix" + if test x${FT2_CONFIG+set} != xset ; then + FT2_CONFIG=$ft_config_prefix/bin/freetype-config + fi +fi +AC_PATH_PROG(FT2_CONFIG, freetype-config, no) + +min_ft_version=ifelse([$1], ,6.1.0,$1) +AC_MSG_CHECKING(for FreeType - version >= $min_ft_version) +no_ft="" +if test "$FT2_CONFIG" = "no" ; then + no_ft=yes +else + FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags` + FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs` + ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + ft_min_major_version=`echo $min_ft_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + ft_min_minor_version=`echo $min_ft_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + ft_min_micro_version=`echo $min_ft_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test x$enable_fttest = xyes ; then + ft_config_is_lt="" + if test $ft_config_major_version -lt $ft_min_major_version ; then + ft_config_is_lt=yes + else + if test $ft_config_major_version -eq $ft_min_major_version ; then + if test $ft_config_minor_version -lt $ft_min_minor_version ; then + ft_config_is_lt=yes + else + if test $ft_config_minor_version -eq $ft_min_minor_version ; then + if test $ft_config_micro_version -lt $ft_min_micro_version ; then + ft_config_is_lt=yes + fi + fi + fi + fi + fi + if test x$ft_config_is_lt = xyes ; then + no_ft=yes + else + ac_save_CFLAGS="$CFLAGS" + ac_save_CXXFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $FT2_CFLAGS" + CXXFLAGS="$CXXFLAGS $FT2_CFLAGS" + LIBS="$FT2_LIBS $LIBS" +dnl +dnl Sanity checks for the results of freetype-config to some extent +dnl + AC_TRY_RUN([ +#include +#include FT_FREETYPE_H +#include +#include + +int +main() +{ + FT_Library library; + FT_Error error; + + error = FT_Init_FreeType(&library); + + if (error) + return 1; + else + { + FT_Done_FreeType(library); + return 0; + } +} +],, no_ft=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi # test $ft_config_version -lt $ft_min_version + fi # test x$enable_fttest = xyes +fi # test "$FT2_CONFIG" = "no" +if test x$no_ft = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) +else + AC_MSG_RESULT(no) + if test "$FT2_CONFIG" = "no" ; then + echo "*** The freetype-config script installed by FreeType 2 could not be found." + echo "*** If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the FT2_CONFIG environment variable to the" + echo "*** full path to freetype-config." + else + if test x$ft_config_is_lt = xyes ; then + echo "*** Your installed version of the FreeType 2 library is too old." + echo "*** If you have different versions of FreeType 2, make sure that" + echo "*** correct values for --with-ft-prefix or --with-ft-exec-prefix" + echo "*** are used, or set the FT2_CONFIG environment variable to the" + echo "*** full path to freetype-config." + else + echo "*** The FreeType test program failed to run. If your system uses" + echo "*** shared libraries and they are installed outside the normal" + echo "*** system library path, make sure the variable LD_LIBRARY_PATH" + echo "*** (or whatever is appropiate for your system) is correctly set." + fi + fi + FT2_CFLAGS="" + FT2_LIBS="" + ifelse([$3], , :, [$3]) +fi +AC_SUBST(FT2_CFLAGS) +AC_SUBST(FT2_LIBS) +]) diff --git a/synfig-core/m4/libxml++.m4 b/synfig-core/m4/libxml++.m4 new file mode 100644 index 0000000..71843d8 --- /dev/null +++ b/synfig-core/m4/libxml++.m4 @@ -0,0 +1,23 @@ +dnl AC_LIBXMLPP([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) + +AC_DEFUN([AM_LIBXMLPP], +[ + +AC_PATH_PROG(XMLPP_CONFIG,xml++-config,no) + +AC_MSG_CHECKING(for libxml++) + +if $XMLPP_CONFIG --libs print > /dev/null 2>&1; then + AC_MSG_RESULT(yes) + LIBXMLPP_CFLAGS=`xml++-config --cflags` + LIBXMLPP_LIBS=`xml++-config --libs` + AC_SUBST(LIBXMLPP_CFLAGS) + AC_SUBST(LIBXMLPP_LIBS) + ifelse([$1], , :, [$1]) +else + AC_MSG_RESULT(no) + ifelse([$2], , , [$2]) +fi + +]) + diff --git a/synfig-core/m4/libxml.m4 b/synfig-core/m4/libxml.m4 new file mode 100644 index 0000000..8b0e006 --- /dev/null +++ b/synfig-core/m4/libxml.m4 @@ -0,0 +1,389 @@ +# Configure paths for LIBXML2 +# Toshio Kuratomi 2001-04-21 +# Adapted from: +# Configure paths for GLIB +# Owen Taylor 97-11-3 + +dnl AM_PATH_XML([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for XML, and define XML_CFLAGS and XML_LIBS +dnl +AC_DEFUN([AM_PATH_XML],[ +AC_ARG_WITH(xml-prefix, + [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)], + xml_config_prefix="$withval", xml_config_prefix="") +AC_ARG_WITH(xml-exec-prefix, + [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)], + xml_config_exec_prefix="$withval", xml_config_exec_prefix="") +AC_ARG_ENABLE(xmltest, + [ --disable-xmltest Do not try to compile and run a test LIBXML program],, + enable_xmltest=yes) + + if test x$xml_config_exec_prefix != x ; then + xml_config_args="$xml_config_args --exec-prefix=$xml_config_exec_prefix" + if test x${XML_CONFIG+set} != xset ; then + XML_CONFIG=$xml_config_exec_prefix/bin/xml-config + fi + fi + if test x$xml_config_prefix != x ; then + xml_config_args="$xml_config_args --prefix=$xml_config_prefix" + if test x${XML_CONFIG+set} != xset ; then + XML_CONFIG=$xml_config_prefix/bin/xml-config + fi + fi + + AC_PATH_PROG(XML_CONFIG, xml-config, no) + min_xml_version=ifelse([$1], ,1.0.0,[$1]) + AC_MSG_CHECKING(for libxml - version >= $min_xml_version) + no_xml="" + if test "$XML_CONFIG" = "no" ; then + no_xml=yes + else + XML_CFLAGS=`$XML_CONFIG $xml_config_args --cflags` + XML_LIBS=`$XML_CONFIG $xml_config_args --libs` + xml_config_major_version=`$XML_CONFIG $xml_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + xml_config_minor_version=`$XML_CONFIG $xml_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + xml_config_micro_version=`$XML_CONFIG $xml_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_xmltest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $XML_CFLAGS" + LIBS="$XML_LIBS $LIBS" +dnl +dnl Now check if the installed libxml is sufficiently new. +dnl (Also sanity checks the results of xml-config to some extent) +dnl + rm -f conf.xmltest + AC_TRY_RUN([ +#include +#include +#include +#include + +int +main() +{ + int xml_major_version, xml_minor_version, xml_micro_version; + int major, minor, micro; + char *tmp_version; + int tmp_int_version; + + system("touch conf.xmltest"); + + /* Capture xml-config output via autoconf/configure variables */ + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = (char *)strdup("$min_xml_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string from xml-config\n", "$min_xml_version"); + exit(1); + } + free(tmp_version); + + /* Capture the version information from the header files */ + tmp_int_version = LIBXML_VERSION; + xml_major_version=tmp_int_version / 10000; + xml_minor_version=(tmp_int_version - xml_major_version * 10000) / 100; + xml_micro_version=(tmp_int_version - xml_minor_version * 100 - xml_major_version * 10000); + + /* Compare xml-config output to the libxml headers */ + if ((xml_major_version != $xml_config_major_version) || + (xml_minor_version != $xml_config_minor_version) +#if 0 + || +/* The last released version of libxml-1.x has an incorrect micro version in + * the header file so neither the includes nor the library will match the + * micro_version to the output of xml-config + */ + (xml_micro_version != $xml_config_micro_version) +#endif + ) + + { + printf("*** libxml header files (version %d.%d.%d) do not match\n", + xml_major_version, xml_minor_version, xml_micro_version); + printf("*** xml-config (version %d.%d.%d)\n", + $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version); + return 1; + } +/* Compare the headers to the library to make sure we match */ + /* Less than ideal -- doesn't provide us with return value feedback, + * only exits if there's a serious mismatch between header and library. + */ + LIBXML_TEST_VERSION; + + /* Test that the library is greater than our minimum version */ + if (($xml_config_major_version > major) || + (($xml_config_major_version == major) && ($xml_config_minor_version > minor)) || + (($xml_config_major_version == major) && ($xml_config_minor_version == minor) && + ($xml_config_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of libxml (%d.%d.%d) was found.\n", + xml_major_version, xml_minor_version, xml_micro_version); + printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the xml-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of LIBXML, but you can also set the XML_CONFIG environment to point to the\n"); + printf("*** correct copy of xml-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + return 1; +} +],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + + if test "x$no_xml" = x ; then + AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version)) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$XML_CONFIG" = "no" ; then + echo "*** The xml-config script installed by LIBXML could not be found" + echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the XML_CONFIG environment variable to the" + echo "*** full path to xml-config." + else + if test -f conf.xmltest ; then + : + else + echo "*** Could not run libxml test program, checking why..." + CFLAGS="$CFLAGS $XML_CFLAGS" + LIBS="$LIBS $XML_LIBS" + AC_TRY_LINK([ +#include +#include +], [ LIBXML_TEST_VERSION; return 0;], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding LIBXML or finding the wrong" + echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means LIBXML was incorrectly installed" + echo "*** or that you have moved LIBXML since it was installed. In the latter case, you" + echo "*** may want to edit the xml-config script: $XML_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + + XML_CFLAGS="" + XML_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(XML_CFLAGS) + AC_SUBST(XML_LIBS) + rm -f conf.xmltest +]) + +# Configure paths for LIBXML2 +# Toshio Kuratomi 2001-04-21 +# Adapted from: +# Configure paths for GLIB +# Owen Taylor 97-11-3 + +dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for XML, and define XML_CFLAGS and XML_LIBS +dnl +AC_DEFUN([AM_PATH_XML2],[ +AC_ARG_WITH(xml-prefix, + [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)], + xml_config_prefix="$withval", xml_config_prefix="") +AC_ARG_WITH(xml-exec-prefix, + [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)], + xml_config_exec_prefix="$withval", xml_config_exec_prefix="") +AC_ARG_ENABLE(xmltest, + [ --disable-xmltest Do not try to compile and run a test LIBXML program],, + enable_xmltest=yes) + + if test x$xml_config_exec_prefix != x ; then + xml_config_args="$xml_config_args --exec-prefix=$xml_config_exec_prefix" + if test x${XML2_CONFIG+set} != xset ; then + XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config + fi + fi + if test x$xml_config_prefix != x ; then + xml_config_args="$xml_config_args --prefix=$xml_config_prefix" + if test x${XML2_CONFIG+set} != xset ; then + XML2_CONFIG=$xml_config_prefix/bin/xml2-config + fi + fi + + AC_PATH_PROG(XML2_CONFIG, xml2-config, no) + min_xml_version=ifelse([$1], ,2.0.0,[$1]) + AC_MSG_CHECKING(for libxml - version >= $min_xml_version) + no_xml="" + if test "$XML2_CONFIG" = "no" ; then + no_xml=yes + else + XML_CFLAGS=`$XML2_CONFIG $xml_config_args --cflags` + XML_LIBS=`$XML2_CONFIG $xml_config_args --libs` + xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_xmltest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_CXXFLAGS="$CXXFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $XML_CFLAGS" + CXXFLAGS="$CXXFLAGS $XML_CFLAGS" + LIBS="$XML_LIBS $LIBS" +dnl +dnl Now check if the installed libxml is sufficiently new. +dnl (Also sanity checks the results of xml2-config to some extent) +dnl + rm -f conf.xmltest + AC_TRY_RUN([ +#include +#include +#include +#include + +int +main() +{ + int xml_major_version, xml_minor_version, xml_micro_version; + int major, minor, micro; + char *tmp_version; + + system("touch conf.xmltest"); + + /* Capture xml2-config output via autoconf/configure variables */ + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = (char *)strdup("$min_xml_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string from xml2-config\n", "$min_xml_version"); + exit(1); + } + free(tmp_version); + + /* Capture the version information from the header files */ + tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION); + if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) { + printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION"); + exit(1); + } + free(tmp_version); + + /* Compare xml2-config output to the libxml headers */ + if ((xml_major_version != $xml_config_major_version) || + (xml_minor_version != $xml_config_minor_version) || + (xml_micro_version != $xml_config_micro_version)) + { + printf("*** libxml header files (version %d.%d.%d) do not match\n", + xml_major_version, xml_minor_version, xml_micro_version); + printf("*** xml2-config (version %d.%d.%d)\n", + $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version); + return 1; + } +/* Compare the headers to the library to make sure we match */ + /* Less than ideal -- doesn't provide us with return value feedback, + * only exits if there's a serious mismatch between header and library. + */ + LIBXML_TEST_VERSION; + + /* Test that the library is greater than our minimum version */ + if ((xml_major_version > major) || + ((xml_major_version == major) && (xml_minor_version > minor)) || + ((xml_major_version == major) && (xml_minor_version == minor) && + (xml_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of libxml (%d.%d.%d) was found.\n", + xml_major_version, xml_minor_version, xml_micro_version); + printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the xml2-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n"); + printf("*** correct copy of xml2-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + return 1; +} +],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + + if test "x$no_xml" = x ; then + AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version)) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$XML2_CONFIG" = "no" ; then + echo "*** The xml2-config script installed by LIBXML could not be found" + echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the XML2_CONFIG environment variable to the" + echo "*** full path to xml2-config." + else + if test -f conf.xmltest ; then + : + else + echo "*** Could not run libxml test program, checking why..." + CFLAGS="$CFLAGS $XML_CFLAGS" + CXXFLAGS="$CXXFLAGS $XML_CFLAGS" + LIBS="$LIBS $XML_LIBS" + AC_TRY_LINK([ +#include +#include +], [ LIBXML_TEST_VERSION; return 0;], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding LIBXML or finding the wrong" + echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means LIBXML was incorrectly installed" + echo "*** or that you have moved LIBXML since it was installed. In the latter case, you" + echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + + XML_CFLAGS="" + XML_LIBS="" + $3 + + + ifelse([$3], , :, [$3]) + fi + AC_SUBST(XML_CFLAGS) + AC_SUBST(XML_LIBS) + rm -f conf.xmltest +]) diff --git a/synfig-core/m4/pkgconfig.m4 b/synfig-core/m4/pkgconfig.m4 new file mode 100644 index 0000000..f2bfc2d --- /dev/null +++ b/synfig-core/m4/pkgconfig.m4 @@ -0,0 +1,57 @@ + +dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) +dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page +dnl also defines GSTUFF_PKG_ERRORS on error +AC_DEFUN([PKG_CHECK_MODULES], [ + succeeded=no + + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + AC_MSG_CHECKING(for $2) + + if $PKG_CONFIG --exists "$2" ; then + AC_MSG_RESULT(yes) + succeeded=yes + + AC_MSG_CHECKING($1_CFLAGS) + $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` + AC_MSG_RESULT($$1_CFLAGS) + + AC_MSG_CHECKING($1_LIBS) + $1_LIBS=`$PKG_CONFIG --libs "$2"` + AC_MSG_RESULT($$1_LIBS) + else + $1_CFLAGS="" + $1_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + ifelse([$4], ,echo $$1_PKG_ERRORS,) + fi + + AC_SUBST($1_CFLAGS) + AC_SUBST($1_LIBS) + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + ifelse([$3], , :, [$3]) + else + ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) + fi +]) + + diff --git a/synfig-core/m4/subs.m4 b/synfig-core/m4/subs.m4 new file mode 100644 index 0000000..9421a8c --- /dev/null +++ b/synfig-core/m4/subs.m4 @@ -0,0 +1,246 @@ + +## AC_ARG_WARNINGS() +## +## Provide the --enable-warnings configure argument, set to 'minimum' +## by default. +## +AC_DEFUN([AC_ARG_WARNINGS], +[ + AC_ARG_ENABLE([warnings], + [ --enable-warnings=[[none|minimum|maximum|hardcore]] + Control compiler pickyness. [[default=maximum]]], + [gtkmm_enable_warnings="$enableval"], + gtkmm_enable_warnings="maximum") + + AC_MSG_CHECKING([for compiler warning flags to use]) + + gtkmm_warning_flags='' + + # -W is now known as -Wextra, but that's not known by gcc 2 or 3 + case "$gtkmm_enable_warnings" in + none|no) gtkmm_warning_flags='';; + minimum|yes) gtkmm_warning_flags='-Wall -Wno-unused-parameter';; + maximum) gtkmm_warning_flags='-W -Wall';; + hardcore) gtkmm_warning_flags='-W -Wall -Werror';; + esac + + gtkmm_use_flags='' + + if test "x$gtkmm_warning_flags" != "x" + then + echo 'int foo() { return 0; }' > conftest.cc + + for flag in $gtkmm_warning_flags + do + # Test whether the compiler accepts the flag. GCC doesn't bail + # out when given an unsupported flag but prints a warning, so + # check the compiler output instead. + gtkmm_cxx_out="`$CXX $flag -c conftest.cc 2>&1`" + rm -f conftest.$OBJEXT + test "x${gtkmm_cxx_out}" = "x" && \ + gtkmm_use_flags="${gtkmm_use_flags:+$gtkmm_use_flags }$flag" + done + + rm -f conftest.cc + gtkmm_cxx_out='' + fi + + if test "x$gtkmm_use_flags" != "x" + then + for flag in $gtkmm_use_flags + do + case " $CXXFLAGS " in + *" $flag "*) ;; # don't add flags twice + *) CXXFLAGS="${CXXFLAGS:+$CXXFLAGS }$flag";; + esac + done + else + gtkmm_use_flags='none' + fi + + AC_MSG_RESULT([$gtkmm_use_flags]) +]) + + + + +AC_DEFUN([AC_ARG_DEBUG], +[ + AC_MSG_CHECKING([for debug flags]) + + AC_ARG_ENABLE(debug,[ --enable-debug Build in debugging mode],[ + debug=$enableval + ],[ + debug="no" + ]) + debug_flags='' + + case "$debug" in + yes) + debug_flags="-D_DEBUG -g" + ;; + half) + debug_flags="-DNDEBUG -g" + ;; + no|*) + debug_flags="-DNDEBUG" + ;; + esac + + + CXXFLAGS="`echo $CXXFLAGS | sed s:-g::` $debug_flags" + CFLAGS="`echo $CFLAGS | sed s:-g::` $debug_flags" + + AC_MSG_RESULT([$debug_flags]) +]) + + + + +## Optimisation level 2 in g++ 4.1 or g++ 4.2 breaks composition loading in the vector parsing function in loadcanvas.cpp (1509627) +AC_DEFUN([AC_ARG_OPTIMIZATION], +[ + AC_MSG_CHECKING([for optimization flags]) + + AC_ARG_ENABLE(optimization,[ --enable-optimization=[[0,1,2,3,4]] Select optimization level (default=2)],[ + optimization=$enableval + ],[ + optimization="2" + ]) + optimization_flags='' + case "$optimization" in + 0|no) optimization_flags="-O0";; + 1) optimization_flags="-O1";; + 2|yes) optimization_flags="-O2";; + pass1) optimization_flags="-O2 -fprofile-arcs";; + pass2) optimization_flags="-O2 -fbranch-probabilities";; + 3) optimization_flags="-O3";; + *) optimization_flags="-O4";; + esac + CXXFLAGS="`echo $CXXFLAGS | sed 's:-O.::g'` $optimization_flags" + CFLAGS="`echo $CFLAGS | sed 's:-O.::g'` $optimization_flags" + AC_MSG_RESULT([$optimization_flags]) +]) + +AC_DEFUN([AC_ARG_PROFILE_ARCS], +[ + AC_MSG_CHECKING([for arc profiling]) + + AC_ARG_ENABLE(profile-arcs,[ --enable-profile-arcs Enable arc profiling],[ + profile_arcs=$enableval + ],[ + profile_arcs=no + ]) + + if test $profile_arcs = "yes" ; then { + CXXFLAGS="$CXXFLAGS -fprofile-arcs"; + CFLAGS="$CFLAGS -fprofile-arcs"; + } ; fi + + AC_MSG_RESULT([$profile_arcs]) +]) + +AC_DEFUN([AC_ARG_BRANCH_PROBABILITIES], +[ + AC_MSG_CHECKING([for branch-probabilities]) + + AC_ARG_ENABLE(branch-probabilities,[ --enable-branch-probabilities Enable branch-probabilities],[ + branch_probabilities=$enableval + ],[ + branch_probabilities=no + ]) + + if test $branch_probabilities = "yes" ; then { + CXXFLAGS="$CXXFLAGS -fbranch-probabilities"; + CFLAGS="$CFLAGS -fbranch-probabilities"; + } ; fi + + AC_MSG_RESULT([$branch_probabilities]) +]) + +AC_DEFUN([AC_ARG_PROFILING], +[ + AC_MSG_CHECKING([for profiling]) + + AC_ARG_ENABLE(profiling,[ --enable-profiling Enable profiling using gprof],[ + profiling=$enableval + ],[ + profiling=no + ]) + + if test $profiling = "yes" ; then { + CFLAGS="$CFLAGS -pg"; + CXXFLAGS="$CXXFLAGS -pg"; + LDFLAGS="$LDFLAGS -pg"; + LIBS="$LIBS"; + } ; fi + + AC_MSG_RESULT([$profiling]) +]) + +MINGW_FLAGS="-mno-cygwin" + + +AC_DEFUN([AC_WIN32_QUIRKS], +[ + +case "$host" in + *mingw*) + AC_MSG_CHECKING([the flavor of the compiler]) + if ( $CC --version | grep -q mingw ) ; then { + AC_MSG_RESULT([compiler is mingw special]) + LIBTOOL_PATCH_SED=" + s/dir=\"\$absdir\"/dir=\`cygpath -d -m \"\$absdir\"\`/; + s/absdir=\`cd \"\$dir\" && pwd\`/absdir=\`cygpath -d -m \"\$dir\"\`/; + s/# We need an absolute path/dir=\`cygpath -d -m \"\$dir\"\` # We need an absolute path/; + s- /usr/lib- C:/mingw/lib-g; + s-\"/lib -\"C:/mingw/lib -g; + s- /lib/ - -g; + "; + sys_lib_dlsearch_path_spec="C:/mingw/lib" + ac_default_prefix=`cygpath -d -m "$ac_default_prefix"`; + } else { + AC_MSG_RESULT([compiler is cygwin stock, adding -mno-cygwin]) + CPP="$CPP $MINGW_FLAGS" + CC="$CC $MINGW_FLAGS" + CXX="$CXX $MINGW_FLAGS -L/usr/$host/lib -I/usr/include/c++/3.3.3/$host" + CXXCPP="$CXXCPP $MINGW_FLAGS" + + +} ; fi + + LTCC="gcc" + CXXFLAGS="$CXXFLAGS -LC:/GTK/lib" + CFLAGS="$CFLAGS -LC:/GTK/lib" + LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols -Wl,--subsystem=console -Wl,--enable-runtime-pseudo-reloc" +dnl LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--subsystem=console -Wl,--enable-runtime-pseudo-reloc" + ;; + *cygwin*) + LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols" +dnl LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--subsystem=console" + CXXFLAGS="$CXXFLAGS -I/target/include" + CFLAGS="$CFLAGS -I/target/include" + ;; + powerpc-apple*) + echo Adding mac-specific optimization flags. . . + CXXFLAGS="$CXXFLAGS $G5OPTFLAGS" + ;; +esac + + +]) + +AC_DEFUN([AC_LIBTOOL_PATCH], +[ + +if [[ "$LIBTOOL_PATCH_SED""x" != "x" ]] ; then { + printf "Patching libtool... " + cat libtool | sed "$LIBTOOL_PATCH_SED" > libtool2 + rm libtool + mv libtool2 libtool + chmod +x libtool + AC_MSG_RESULT([patched]) +} fi ; + + +]) diff --git a/synfig-core/m4/synfig.m4 b/synfig-core/m4/synfig.m4 new file mode 100644 index 0000000..f4f364b --- /dev/null +++ b/synfig-core/m4/synfig.m4 @@ -0,0 +1,51 @@ +# SYNFIG M4 Macro +# For GNU Autotools +# $Id$ +# +# By Robert B. Quattlebaum Jr. +# AM_LIBXMLPP(,$2) + + +AC_DEFUN([SYNFIG_DEPS], +[ + USING_ETL(,$2) + AM_PATH_XML2(,,$2) + AC_CHECK_FUNCS([floor pow sqrt],,$2) + AM_LIBXMLPP(,$2) + + CXXFLAGS="$CXXFLAGS $LIBXMLPP_CFLAGS" + LIBS="$LIBS $LIBXMLPP_LIBS" + + $1 +]) + +AC_DEFUN([USING_SYNFIG], +[ + AC_ARG_WITH(synfig-includes, + [ --with-synfig-includes Specify location of synfig headers],[ + CXXFLAGS="$CXXFLAGS -I$withval" + ]) + + AC_PATH_PROG(SYNFIG_CONFIG,synfig-config,no) + + if test "$SYNFIG_CONFIG" = "no"; then + no_SYNFIG_config="yes" + $2 + else + AC_MSG_CHECKING([if $SYNFIG_CONFIG works]) + if $SYNFIG_CONFIG --libs >/dev/null 2>&1; then + SYNFIG_VERSION="`$SYNFIG_CONFIG --version`" + AC_MSG_RESULT([yes, $SYNFIG_VERSION]) + CXXFLAGS="$CXXFLAGS `$SYNFIG_CONFIG --cxxflags`" + $1 + else + AC_MSG_RESULT(no) + no_SYNFIG_config="yes" + $2 + fi + fi + + SYNFIG_DEPS($1,$2) +]) + + diff --git a/synfig-core/macosxbuild.sh b/synfig-core/macosxbuild.sh new file mode 100755 index 0000000..702ce31 --- /dev/null +++ b/synfig-core/macosxbuild.sh @@ -0,0 +1,59 @@ +#!/bin/sh + +#OPTIONS="--disable-optimization --enable-debug" + +PREFIX=/Users/darco/Projects/Voria/synfig-build + +export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11R6/lib/pkgconfig +OPTIONS="--prefix=$PREFIX" +#OPTIONS="$OPTIONS --enable-optimization=2" +OPTIONS="$OPTIONS --enable-optimization=3" +#OPTIONS="$OPTIONS --enable-g5opt" +#OPTIONS="$OPTIONS --disable-optimization" +OPTIONS="$OPTIONS --disable-debug" +#OPTIONS="$OPTIONS --with-vimage" +OPTIONS="$OPTIONS --without-openexr" +OPTIONS="$OPTIONS --disable-dependency-tracking" +#OPTIONS="$OPTIONS --enable-universal" + +ARCH_FLAGS="" +#ARCH_FLAGS="$ARCH_FLAGS -arch ppc" +ARCH_FLAGS="$ARCH_FLAGS -arch i386" + +LDFLAGS="-L$PREFIX/lib" +CFLAGS="-I$PREFIX/include" +CXXFLAGS="-I$PREFIX/include" + +CC="gcc $LDFLAGS $CFLAGS $ARCH_FLAGS" +CXX="g++ $LDFLAGS $CFLAGS $ARCH_FLAGS" +CPP="gcc -E" +CXXCPP="g++ -E" + +#distcc --version && { +# CC=distcc +# CXX="distcc g++" +#} + + +BUILDDIR=macosxbuild + +[ -e configure ] || ( libtoolize --ltdl --copy --force && autoreconf --force --install ) || exit 1 + +[ -d $BUILDDIR ] && rm -fr $BUILDDIR + +mkdir $BUILDDIR + +cd $BUILDDIR + +echo ../configure $OPTIONS CC=\"$CC\" CXX=\"$CXX\" CPP=\"$CPP\" CXXCPP=\"$CXXCPP\" LDFLAGS=\"$LDFLAGS\" CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" + +../configure $OPTIONS CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" MACOS_DEPLOYMENT_TARGET=10.4 || exit 1 + +make -j2 +make install-strip + +#make package $MAKEFLAGS + +#make installer + + diff --git a/synfig-core/pkg-info/macosx/core-resources/License.txt b/synfig-core/pkg-info/macosx/core-resources/License.txt new file mode 100644 index 0000000..c4792dd --- /dev/null +++ b/synfig-core/pkg-info/macosx/core-resources/License.txt @@ -0,0 +1,515 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. +^L + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. +^L + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. +^L + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. +^L + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. +^L + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. +^L + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. +^L + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS +^L + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper +mail. + +You should also get your employer (if you work as a programmer) or +your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James +Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/synfig-core/pkg-info/macosx/core-resources/ReadMe.txt b/synfig-core/pkg-info/macosx/core-resources/ReadMe.txt new file mode 100644 index 0000000..cdb5c31 --- /dev/null +++ b/synfig-core/pkg-info/macosx/core-resources/ReadMe.txt @@ -0,0 +1 @@ +This is the readme for Synfig Core. diff --git a/synfig-core/pkg-info/macosx/core-resources/Welcome.txt b/synfig-core/pkg-info/macosx/core-resources/Welcome.txt new file mode 100644 index 0000000..f1e8e92 --- /dev/null +++ b/synfig-core/pkg-info/macosx/core-resources/Welcome.txt @@ -0,0 +1 @@ +This is the welcome for Synfig. diff --git a/synfig-core/pkg-info/macosx/core-resources/install.sh b/synfig-core/pkg-info/macosx/core-resources/install.sh new file mode 100755 index 0000000..5a537cc --- /dev/null +++ b/synfig-core/pkg-info/macosx/core-resources/install.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# finish up the installation +# this script should be executed using the sudo command +# this file is copied to synfig-devel.post_install and synfig-devel.post_upgrade +# inside the .pkg bundle +LOGFILE="/synfig_install.log" + +exit 0 + + +umask 022 + +RESOURCE_DIR=`dirname $0` +PREFIX=/usr/local + +cd $RESOURCE_DIR + +echo "Creating synfig-config script" +[ -d $PREFIX ] || mkdir $PREFIX +[ -d $PREFIX/bin ] || mkdir $PREFIX/bin +[ -d $PREFIX/include ] || mkdir $PREFIX/include +[ -d $PREFIX/lib ] || mkdir $PREFIX/lib +[ -d $PREFIX/sbin ] || mkdir $PREFIX/sbin + +echo "Cleaning up any previous installation" +[ -d $PREFIX/include/synfig ] && rm -fr $PREFIX/include/synfig +ln -s /Library/Frameworks/synfig.framework/Headers $PREFIX/include/synfig + +sed ' +s:@exec_prefix@:/usr/local:g; +s:@prefix@:/usr/local:g; +s:@bindir@:$exec_prefix/bin:g; +s:@libdir@:$exec_prefix/lib:g; +s:@includedir@:$prefix/include:g; +s:@VERSION@:@_VERSION_@:g; +s:@PACKAGE@:@_PACKAGE_@:g; +s:@LIBS@::g; +s:@VERSION@:@_VERSION_@:; +s:@PACKAGE@:@_PACKAGE_@:; +s:@CONFIG_LIBS@:-F/Library/Frameworks/synfig.framework:; +s:@SYNFIG_LIBS@:-F/Library/Frameworks/synfig.framework:; +s:@CONFIG_CFLAGS@:-framework synfig:; +' < $RESOURCE_DIR/synfig-config.in > $PREFIX/bin/synfig-config +chmod 775 $PREFIX/bin/synfig-config + +echo "Precompiling Headers" +#/usr/bin/c++ -precomp /Library/Frameworks/synfig.framework/Headers/synfig.h -o /Library/Frameworks/synfig.framework/Headers/synfig.p + +echo "Moving synfig tool" +cp $RESOURCE_DIR/synfig $PREFIX/bin || exit 1 + +echo "Done with shell script" + + +exit 0 + + + diff --git a/synfig-core/pkg-info/macosx/core-resources/upgrade.sh b/synfig-core/pkg-info/macosx/core-resources/upgrade.sh new file mode 100755 index 0000000..5a537cc --- /dev/null +++ b/synfig-core/pkg-info/macosx/core-resources/upgrade.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# finish up the installation +# this script should be executed using the sudo command +# this file is copied to synfig-devel.post_install and synfig-devel.post_upgrade +# inside the .pkg bundle +LOGFILE="/synfig_install.log" + +exit 0 + + +umask 022 + +RESOURCE_DIR=`dirname $0` +PREFIX=/usr/local + +cd $RESOURCE_DIR + +echo "Creating synfig-config script" +[ -d $PREFIX ] || mkdir $PREFIX +[ -d $PREFIX/bin ] || mkdir $PREFIX/bin +[ -d $PREFIX/include ] || mkdir $PREFIX/include +[ -d $PREFIX/lib ] || mkdir $PREFIX/lib +[ -d $PREFIX/sbin ] || mkdir $PREFIX/sbin + +echo "Cleaning up any previous installation" +[ -d $PREFIX/include/synfig ] && rm -fr $PREFIX/include/synfig +ln -s /Library/Frameworks/synfig.framework/Headers $PREFIX/include/synfig + +sed ' +s:@exec_prefix@:/usr/local:g; +s:@prefix@:/usr/local:g; +s:@bindir@:$exec_prefix/bin:g; +s:@libdir@:$exec_prefix/lib:g; +s:@includedir@:$prefix/include:g; +s:@VERSION@:@_VERSION_@:g; +s:@PACKAGE@:@_PACKAGE_@:g; +s:@LIBS@::g; +s:@VERSION@:@_VERSION_@:; +s:@PACKAGE@:@_PACKAGE_@:; +s:@CONFIG_LIBS@:-F/Library/Frameworks/synfig.framework:; +s:@SYNFIG_LIBS@:-F/Library/Frameworks/synfig.framework:; +s:@CONFIG_CFLAGS@:-framework synfig:; +' < $RESOURCE_DIR/synfig-config.in > $PREFIX/bin/synfig-config +chmod 775 $PREFIX/bin/synfig-config + +echo "Precompiling Headers" +#/usr/bin/c++ -precomp /Library/Frameworks/synfig.framework/Headers/synfig.h -o /Library/Frameworks/synfig.framework/Headers/synfig.p + +echo "Moving synfig tool" +cp $RESOURCE_DIR/synfig $PREFIX/bin || exit 1 + +echo "Done with shell script" + + +exit 0 + + + diff --git a/synfig-core/pkg-info/macosx/synfig-core.info.in b/synfig-core/pkg-info/macosx/synfig-core.info.in new file mode 100644 index 0000000..7dc1a3b --- /dev/null +++ b/synfig-core/pkg-info/macosx/synfig-core.info.in @@ -0,0 +1,14 @@ +Title @PACKAGE_NAME@ @VERSION@ +Version @VERSION@ +Description @PACKAGE_NAME@ +DefaultLocation /usr/local +DeleteWarning +NeedsAuthorization YES +DisableStop NO +UseUserMask YES +Application NO +Relocatable NO +Required NO +InstallOnly NO +RequiresReboot NO +InstallFat NO diff --git a/synfig-core/po/Makevars b/synfig-core/po/Makevars new file mode 100644 index 0000000..ad1de62 --- /dev/null +++ b/synfig-core/po/Makevars @@ -0,0 +1,7 @@ +DOMAIN = synfig +subdir = po +top_builddir = .. +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --add-comments=TRANSLATORS +COPYRIGHT_HOLDER = Synfig Contributors +MSGID_BUGS_ADDRESS = http://synfig.org/Bugs +EXTRA_LOCALE_CATEGORIES = diff --git a/synfig-core/po/POTFILES.in b/synfig-core/po/POTFILES.in new file mode 100644 index 0000000..5da5584 --- /dev/null +++ b/synfig-core/po/POTFILES.in @@ -0,0 +1,367 @@ +# FIXME: move libsynfig into a separate domain +# Disabled since they are not built +# src/modules/example/filledrect.cpp +# src/modules/example/filledrect.cpp +# src/modules/example/filledrect.h +# src/modules/example/main.cpp +# src/modules/example/metaballs.cpp +# src/modules/example/metaballs.h +# src/modules/example/simplecircle.cpp +# src/modules/example/simplecircle.h +src/modules/lyr_freetype/lyr_freetype.cpp +src/modules/lyr_freetype/lyr_freetype.h +src/modules/lyr_freetype/main.cpp +src/modules/lyr_std/bevel.cpp +src/modules/lyr_std/bevel.h +src/modules/lyr_std/booleancurve.cpp +src/modules/lyr_std/booleancurve.h +src/modules/lyr_std/clamp.cpp +src/modules/lyr_std/clamp.h +src/modules/lyr_std/import.cpp +src/modules/lyr_std/import.h +src/modules/lyr_std/insideout.cpp +src/modules/lyr_std/insideout.h +src/modules/lyr_std/julia.cpp +src/modules/lyr_std/julia.h +src/modules/lyr_std/main.cpp +src/modules/lyr_std/mandelbrot.cpp +src/modules/lyr_std/mandelbrot.h +src/modules/lyr_std/rotate.cpp +src/modules/lyr_std/rotate.h +src/modules/lyr_std/shade.cpp +src/modules/lyr_std/shade.h +src/modules/lyr_std/sphere_distort.cpp +src/modules/lyr_std/sphere_distort.h +src/modules/lyr_std/stretch.cpp +src/modules/lyr_std/stretch.h +src/modules/lyr_std/supersample.cpp +src/modules/lyr_std/supersample.h +src/modules/lyr_std/timeloop.cpp +src/modules/lyr_std/timeloop.h +src/modules/lyr_std/translate.cpp +src/modules/lyr_std/translate.h +src/modules/lyr_std/twirl.cpp +src/modules/lyr_std/twirl.h +src/modules/lyr_std/warp.cpp +src/modules/lyr_std/warp.h +src/modules/lyr_std/xorpattern.cpp +src/modules/lyr_std/xorpattern.h +src/modules/lyr_std/zoom.cpp +src/modules/lyr_std/zoom.h +src/modules/mod_bmp/main.cpp +src/modules/mod_bmp/mptr_bmp.cpp +src/modules/mod_bmp/mptr_bmp.h +src/modules/mod_bmp/trgt_bmp.cpp +src/modules/mod_bmp/trgt_bmp.h +src/modules/mod_dv/main.cpp +src/modules/mod_dv/trgt_dv.cpp +src/modules/mod_dv/trgt_dv.h +src/modules/mod_ffmpeg/main.cpp +src/modules/mod_ffmpeg/mptr_ffmpeg.cpp +src/modules/mod_ffmpeg/mptr_ffmpeg.h +src/modules/mod_ffmpeg/trgt_ffmpeg.cpp +src/modules/mod_ffmpeg/trgt_ffmpeg.h +src/modules/mod_filter/blur.cpp +src/modules/mod_filter/blur.h +src/modules/mod_filter/colorcorrect.cpp +src/modules/mod_filter/colorcorrect.h +src/modules/mod_filter/halftone.cpp +src/modules/mod_filter/halftone.h +src/modules/mod_filter/halftone2.cpp +src/modules/mod_filter/halftone2.h +src/modules/mod_filter/halftone3.cpp +src/modules/mod_filter/halftone3.h +src/modules/mod_filter/lumakey.cpp +src/modules/mod_filter/lumakey.h +src/modules/mod_filter/main.cpp +src/modules/mod_filter/radialblur.cpp +src/modules/mod_filter/radialblur.h +src/modules/mod_geometry/checkerboard.cpp +src/modules/mod_geometry/checkerboard.h +src/modules/mod_geometry/circle.cpp +src/modules/mod_geometry/circle.h +src/modules/mod_geometry/main.cpp +src/modules/mod_geometry/outline.cpp +src/modules/mod_geometry/outline.h +src/modules/mod_geometry/rectangle.cpp +src/modules/mod_geometry/rectangle.h +src/modules/mod_geometry/region.cpp +src/modules/mod_geometry/region.h +src/modules/mod_geometry/star.cpp +src/modules/mod_geometry/star.h +src/modules/mod_gif/main.cpp +src/modules/mod_gif/trgt_gif.cpp +src/modules/mod_gif/trgt_gif.h +src/modules/mod_gradient/conicalgradient.cpp +src/modules/mod_gradient/conicalgradient.h +src/modules/mod_gradient/curvegradient.cpp +src/modules/mod_gradient/curvegradient.h +src/modules/mod_gradient/lineargradient.cpp +src/modules/mod_gradient/lineargradient.h +src/modules/mod_gradient/main.cpp +src/modules/mod_gradient/radialgradient.cpp +src/modules/mod_gradient/radialgradient.h +src/modules/mod_gradient/spiralgradient.cpp +src/modules/mod_gradient/spiralgradient.h +src/modules/mod_imagemagick/main.cpp +src/modules/mod_imagemagick/mptr_imagemagick.cpp +src/modules/mod_imagemagick/mptr_imagemagick.h +src/modules/mod_imagemagick/trgt_imagemagick.cpp +src/modules/mod_imagemagick/trgt_imagemagick.h +src/modules/mod_jpeg/main.cpp +src/modules/mod_jpeg/mptr_jpeg.cpp +src/modules/mod_jpeg/mptr_jpeg.h +src/modules/mod_jpeg/trgt_jpeg.cpp +src/modules/mod_jpeg/trgt_jpeg.h +src/modules/mod_libavcodec/main.cpp +src/modules/mod_libavcodec/mptr.cpp +src/modules/mod_libavcodec/mptr.h +src/modules/mod_libavcodec/trgt_av.cpp +src/modules/mod_libavcodec/trgt_av.h +src/modules/mod_magickpp/main.cpp +src/modules/mod_magickpp/trgt_magickpp.cpp +src/modules/mod_magickpp/trgt_magickpp.h +src/modules/mod_mng/main.cpp +src/modules/mod_mng/trgt_mng.cpp +src/modules/mod_mng/trgt_mng.h +src/modules/mod_noise/distort.cpp +src/modules/mod_noise/distort.h +src/modules/mod_noise/main.cpp +src/modules/mod_noise/noise.cpp +src/modules/mod_noise/noise.h +src/modules/mod_noise/random_noise.cpp +src/modules/mod_noise/random_noise.h +src/modules/mod_noise/valuenode_random.cpp +src/modules/mod_noise/valuenode_random.h +src/modules/mod_openexr/main.cpp +src/modules/mod_openexr/mptr_openexr.cpp +src/modules/mod_openexr/mptr_openexr.h +src/modules/mod_openexr/trgt_openexr.cpp +src/modules/mod_openexr/trgt_openexr.h +src/modules/mod_particle/main.cpp +src/modules/mod_particle/plant.cpp +src/modules/mod_particle/plant.h +src/modules/mod_particle/random.cpp +src/modules/mod_particle/random.h +src/modules/mod_png/main.cpp +src/modules/mod_png/mptr_png.cpp +src/modules/mod_png/mptr_png.h +src/modules/mod_png/trgt_png.cpp +src/modules/mod_png/trgt_png.h +src/modules/mod_ppm/main.cpp +src/modules/mod_ppm/mptr_ppm.cpp +src/modules/mod_ppm/mptr_ppm.h +src/modules/mod_ppm/trgt_ppm.cpp +src/modules/mod_ppm/trgt_ppm.h +src/modules/mod_yuv420p/main.cpp +src/modules/mod_yuv420p/trgt_yuv.cpp +src/modules/mod_yuv420p/trgt_yuv.h +src/modules/mptr_mplayer/main.cpp +src/modules/mptr_mplayer/mptr_mplayer.cpp +src/modules/mptr_mplayer/mptr_mplayer.h +src/synfig/activepoint.cpp +src/synfig/activepoint.h +src/synfig/angle.h +src/synfig/blinepoint.cpp +src/synfig/blinepoint.h +src/synfig/blur.cpp +src/synfig/blur.h +src/synfig/canvas.cpp +src/synfig/canvas.h +src/synfig/canvasbase.h +src/synfig/color.cpp +src/synfig/color.h +src/synfig/context.cpp +src/synfig/context.h +src/synfig/curve_helper.cpp +src/synfig/curve_helper.h +src/synfig/curveset.cpp +src/synfig/curveset.h +src/synfig/distance.cpp +src/synfig/distance.h +src/synfig/exception.cpp +src/synfig/exception.h +src/synfig/gamma.cpp +src/synfig/gamma.h +src/synfig/general.h +src/synfig/gradient.cpp +src/synfig/gradient.h +src/synfig/guid.cpp +src/synfig/guid.h +src/synfig/guidset.h +src/synfig/importer.cpp +src/synfig/importer.h +src/synfig/interpolation.h +src/synfig/keyframe.cpp +src/synfig/keyframe.h +src/synfig/layer.cpp +src/synfig/layer.h +src/synfig/layer_bitmap.cpp +src/synfig/layer_bitmap.h +src/synfig/layer_composite.cpp +src/synfig/layer_composite.h +src/synfig/layer_duplicate.cpp +src/synfig/layer_duplicate.h +src/synfig/layer_mime.cpp +src/synfig/layer_mime.h +src/synfig/layer_motionblur.cpp +src/synfig/layer_motionblur.h +src/synfig/layer_pastecanvas.cpp +src/synfig/layer_pastecanvas.h +src/synfig/layer_polygon.cpp +src/synfig/layer_polygon.h +src/synfig/layer_shape.cpp +src/synfig/layer_shape.h +src/synfig/layer_solidcolor.cpp +src/synfig/layer_solidcolor.h +src/synfig/listimporter.cpp +src/synfig/listimporter.h +src/synfig/loadcanvas.cpp +src/synfig/loadcanvas.h +src/synfig/main.cpp +src/synfig/main.h +src/synfig/module.cpp +src/synfig/module.h +src/synfig/mutex.cpp +src/synfig/mutex.h +src/synfig/node.cpp +src/synfig/node.h +src/synfig/nodebase.h +src/synfig/palette.cpp +src/synfig/palette.h +src/synfig/paramdesc.cpp +src/synfig/paramdesc.h +src/synfig/pch.h +src/synfig/polynomial_root.cpp +src/synfig/polynomial_root.h +src/synfig/protocol.h +src/synfig/quick_rng.h +src/synfig/real.h +src/synfig/rect.cpp +src/synfig/rect.h +src/synfig/renddesc.cpp +src/synfig/renddesc.h +src/synfig/render.cpp +src/synfig/render.h +src/synfig/savecanvas.cpp +src/synfig/savecanvas.h +src/synfig/segment.h +src/synfig/smartfile.h +src/synfig/string.h +src/synfig/string_decl.h +src/synfig/surface.cpp +src/synfig/surface.h +src/synfig/surfacenew.cpp +src/synfig/surfacenew.h +src/synfig/synfig.h +src/synfig/target.cpp +src/synfig/target.h +src/synfig/target_multi.cpp +src/synfig/target_multi.h +src/synfig/target_null.cpp +src/synfig/target_null.h +src/synfig/target_null_tile.cpp +src/synfig/target_null_tile.h +src/synfig/target_scanline.cpp +src/synfig/target_scanline.h +src/synfig/target_tile.cpp +src/synfig/target_tile.h +src/synfig/time.cpp +src/synfig/time.h +src/synfig/timepointcollect.cpp +src/synfig/timepointcollect.h +src/synfig/transform.cpp +src/synfig/transform.h +src/synfig/types.h +src/synfig/uniqueid.cpp +src/synfig/uniqueid.h +src/synfig/value.cpp +src/synfig/value.h +src/synfig/valuenode.cpp +src/synfig/valuenode.h +src/synfig/valuenode_add.cpp +src/synfig/valuenode_add.h +src/synfig/valuenode_and.cpp +src/synfig/valuenode_and.h +src/synfig/valuenode_animated.cpp +src/synfig/valuenode_animated.h +src/synfig/valuenode_bline.cpp +src/synfig/valuenode_bline.h +src/synfig/valuenode_blinecalctangent.cpp +src/synfig/valuenode_blinecalctangent.h +src/synfig/valuenode_blinecalcvertex.cpp +src/synfig/valuenode_blinecalcvertex.h +src/synfig/valuenode_blinecalcwidth.cpp +src/synfig/valuenode_blinecalcwidth.h +src/synfig/valuenode_composite.cpp +src/synfig/valuenode_composite.h +src/synfig/valuenode_const.cpp +src/synfig/valuenode_const.h +src/synfig/valuenode_compare.cpp +src/synfig/valuenode_compare.h +src/synfig/valuenode_cos.cpp +src/synfig/valuenode_cos.h +src/synfig/valuenode_duplicate.cpp +src/synfig/valuenode_duplicate.h +src/synfig/valuenode_dynamiclist.cpp +src/synfig/valuenode_dynamiclist.h +src/synfig/valuenode_exp.cpp +src/synfig/valuenode_exp.h +src/synfig/valuenode_gradientrotate.cpp +src/synfig/valuenode_gradientrotate.h +src/synfig/valuenode_integer.cpp +src/synfig/valuenode_integer.h +src/synfig/valuenode_join.cpp +src/synfig/valuenode_join.h +src/synfig/valuenode_linear.cpp +src/synfig/valuenode_linear.h +src/synfig/valuenode_not.cpp +src/synfig/valuenode_not.h +src/synfig/valuenode_or.cpp +src/synfig/valuenode_or.h +src/synfig/valuenode_pow.cpp +src/synfig/valuenode_pow.h +src/synfig/valuenode_radialcomposite.cpp +src/synfig/valuenode_radialcomposite.h +src/synfig/valuenode_range.cpp +src/synfig/valuenode_range.h +src/synfig/valuenode_realstring.cpp +src/synfig/valuenode_realstring.h +src/synfig/valuenode_reciprocal.cpp +src/synfig/valuenode_reciprocal.h +src/synfig/valuenode_reference.cpp +src/synfig/valuenode_reference.h +src/synfig/valuenode_repeat_gradient.cpp +src/synfig/valuenode_repeat_gradient.h +src/synfig/valuenode_scale.cpp +src/synfig/valuenode_scale.h +src/synfig/valuenode_segcalctangent.cpp +src/synfig/valuenode_segcalctangent.h +src/synfig/valuenode_segcalcvertex.cpp +src/synfig/valuenode_segcalcvertex.h +src/synfig/valuenode_sine.cpp +src/synfig/valuenode_sine.h +src/synfig/valuenode_step.cpp +src/synfig/valuenode_step.h +src/synfig/valuenode_stripes.cpp +src/synfig/valuenode_stripes.h +src/synfig/valuenode_subtract.cpp +src/synfig/valuenode_subtract.h +src/synfig/valuenode_switch.cpp +src/synfig/valuenode_switch.h +src/synfig/valuenode_timedswap.cpp +src/synfig/valuenode_timedswap.h +src/synfig/valuenode_timeloop.cpp +src/synfig/valuenode_timeloop.h +src/synfig/valuenode_timestring.cpp +src/synfig/valuenode_timestring.h +src/synfig/valuenode_twotone.cpp +src/synfig/valuenode_twotone.h +src/synfig/vector.h +src/synfig/version.h +src/synfig/waypoint.cpp +src/synfig/waypoint.h +# Disabled because they are not built +# src/template.cpp +# src/template.h +src/tool/main.cpp diff --git a/synfig-core/po/es.po b/synfig-core/po/es.po new file mode 100644 index 0000000..bc8aae6 --- /dev/null +++ b/synfig-core/po/es.po @@ -0,0 +1,3145 @@ +# translation of es.po to Español +# Spanish translations for Synfig Core package +# Traducciones al español para el paquete Synfig Core. +# Copyright (C) 2007 Synfig Contributors +# This file is distributed under the same license as the Synfig Core package. +# +# Carlos López González , 2007, 2008. +msgid "" +msgstr "" +"Project-Id-Version: es\n" +"Report-Msgid-Bugs-To: http://synfig.org/Bugs\n" +"POT-Creation-Date: 2008-09-29 21:46+0200\n" +"PO-Revision-Date: 2008-10-01 00:16+0200\n" +"Last-Translator: Carlos López González \n" +"Language-Team: Español \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: KBabel 1.11.4\n" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:63 +#: src/modules/lyr_freetype/lyr_freetype.cpp:507 +msgid "Text" +msgstr "Texto" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:64 +#: src/modules/lyr_std/import.cpp:59 src/modules/lyr_std/supersample.cpp:56 +#: src/modules/lyr_std/timeloop.cpp:58 src/modules/lyr_std/xorpattern.cpp:55 +#: src/modules/mod_particle/plant.cpp:69 src/synfig/layer_duplicate.cpp:57 +#: src/synfig/layer_pastecanvas.cpp:78 +msgid "Other" +msgstr "Otro" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:94 +msgid "Text Layer" +msgstr "Capa de texto" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:380 +msgid "unable to initialize" +msgstr "imposible inicializar" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:399 +msgid "empty font set" +msgstr "juego de fuentes vacio" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:508 +msgid "Text to Render" +msgstr "Texto para Mostrar" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:513 +#: src/modules/lyr_std/shade.cpp:375 +#: src/modules/mod_geometry/checkerboard.cpp:121 +#: src/modules/mod_geometry/circle.cpp:125 +#: src/modules/mod_geometry/rectangle.cpp:122 src/synfig/layer_shape.cpp:1192 +#: src/synfig/layer_solidcolor.cpp:99 +msgid "Color" +msgstr "Color" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:514 +msgid "Color of the text" +msgstr "Color del texto" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:518 +msgid "Font Family" +msgstr "Familia de la Fuente" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:523 +msgid "Style" +msgstr "Estilo" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:525 +#: src/modules/lyr_freetype/lyr_freetype.cpp:535 +msgid "Normal" +msgstr "Normal" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:526 +msgid "Oblique" +msgstr "Oblicua" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:527 +msgid "Italic" +msgstr "Cursiva" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:531 +msgid "Weight" +msgstr "Peso" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:533 +msgid "Ultralight" +msgstr "Ultraligera" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:534 +msgid "light" +msgstr "Ligera" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:536 +msgid "Bold" +msgstr "Negrita" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:537 +msgid "Ultrabold" +msgstr "Ultranegrita" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:538 +msgid "Heavy" +msgstr "Pesada" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:541 +msgid "Horizontal Spacing" +msgstr "Espaciado horizontal" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:542 +msgid "Describes how close glyphs are horizontally" +msgstr "Describe como de juntos estan los glifos horizontalmente" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:546 +msgid "Vertical Spacing" +msgstr "Espaciado Vertical" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:547 +msgid "Describes how close lines of text are vertically" +msgstr "Describe como de juntos estan los glifos verticalmente" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:551 +#: src/modules/lyr_std/shade.cpp:381 src/modules/lyr_std/xorpattern.cpp:125 +#: src/modules/mod_filter/blur.cpp:242 +#: src/modules/mod_filter/radialblur.cpp:111 +#: src/modules/mod_geometry/checkerboard.cpp:128 +#: src/modules/mod_noise/distort.cpp:201 src/modules/mod_noise/noise.cpp:256 +msgid "Size" +msgstr "Tamaño" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:552 +msgid "Size of the text" +msgstr "Tamaño del texto" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:559 +msgid "Orientation" +msgstr "Orientación" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:560 +msgid "Text Orientation" +msgstr "Orientación del texto" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:565 +#: src/modules/lyr_std/insideout.cpp:141 src/modules/lyr_std/rotate.cpp:112 +#: src/modules/lyr_std/shade.cpp:378 src/modules/lyr_std/translate.cpp:97 +#: src/modules/lyr_std/xorpattern.cpp:122 +#: src/modules/mod_filter/radialblur.cpp:106 +#: src/modules/mod_geometry/checkerboard.cpp:125 +#: src/modules/mod_geometry/circle.cpp:137 +#: src/modules/mod_gradient/curvegradient.cpp:490 +#: src/modules/mod_particle/plant.cpp:390 src/synfig/layer_pastecanvas.cpp:127 +#: src/synfig/layer_shape.cpp:1196 src/synfig/valuenode_composite.cpp:291 +msgid "Origin" +msgstr "Origen" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:566 +msgid "Text Position" +msgstr "Posición del texto" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:570 +msgid "Font" +msgstr "Fuente" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:571 +msgid "Filename of the font to use" +msgstr "Nomber del fichero de la fuente a usar" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:578 +msgid "Kerning" +msgstr "Solape" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:579 +msgid "Enables/Disables font kerning (If the font supports it)" +msgstr "Habilita/Deshabilita el solape de la fuente (si la fuente lo soporta)" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:583 +msgid "Sharpen Edges" +msgstr "Bordes afilados" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:584 +msgid "Turn this off if you are going to be animating the text" +msgstr "Desmarque esto si va a animar el texto" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:587 +#: src/modules/lyr_std/shade.cpp:398 src/modules/mod_geometry/circle.cpp:140 +#: src/synfig/layer_shape.cpp:1199 +msgid "Invert" +msgstr "Invertir" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:644 +msgid "No face loaded, no text will be rendered." +msgstr "Niguna fuente cargada, no se mostrará ningún texto" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:670 +msgid "Text too small, no text will be rendered." +msgstr "Texto demasiado pequeño, no se mostrará ningún texto" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:694 +msgid "Unable to set face size." +msgstr "Imposible establecer el tamaño de fuente" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:737 +msgid "Invalid multibyte sequence - is the locale set?\n" +msgstr "Secuencia multibye inválida - se ha establecido el lenguaje local?\n" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:744 +msgid "Can't parse multibyte character.\n" +msgstr "No puedo traducir carácter multibyte.\n" + +#: src/modules/lyr_std/bevel.cpp:67 +msgid "Bevel" +msgstr "Bisel" + +#: src/modules/lyr_std/bevel.cpp:68 src/modules/lyr_std/shade.cpp:67 +msgid "Stylize" +msgstr "Estilizar" + +#: src/modules/lyr_std/bevel.cpp:356 src/modules/lyr_std/shade.cpp:387 +#: src/modules/mod_filter/blur.cpp:246 +#: src/modules/mod_filter/halftone2.cpp:166 +msgid "Type" +msgstr "Tipo" + +#: src/modules/lyr_std/bevel.cpp:357 src/modules/lyr_std/shade.cpp:388 +#: src/modules/mod_filter/blur.cpp:247 +msgid "Type of blur to use" +msgstr "Tipo de desenfoque a usar" + +#: src/modules/lyr_std/bevel.cpp:359 src/modules/lyr_std/shade.cpp:390 +#: src/modules/mod_filter/blur.cpp:249 src/synfig/layer_shape.cpp:1212 +msgid "Box Blur" +msgstr "Desenfoque \"Box\"" + +#: src/modules/lyr_std/bevel.cpp:360 src/modules/lyr_std/shade.cpp:391 +#: src/modules/mod_filter/blur.cpp:250 src/synfig/layer_shape.cpp:1213 +msgid "Fast Gaussian Blur" +msgstr "Desenfoque Gaussiano rápido" + +#: src/modules/lyr_std/bevel.cpp:361 src/modules/lyr_std/shade.cpp:392 +#: src/modules/mod_filter/blur.cpp:251 src/synfig/layer_shape.cpp:1214 +msgid "Cross-Hatch Blur" +msgstr "Desenfoque Mallado" + +#: src/modules/lyr_std/bevel.cpp:362 src/modules/lyr_std/shade.cpp:393 +#: src/modules/mod_filter/blur.cpp:252 src/synfig/layer_shape.cpp:1215 +msgid "Gaussian Blur" +msgstr "Desenfoque Gaussiano" + +#: src/modules/lyr_std/bevel.cpp:363 src/modules/lyr_std/shade.cpp:394 +#: src/modules/mod_filter/blur.cpp:253 src/synfig/layer_shape.cpp:1216 +msgid "Disc Blur" +msgstr "Desenfoque Disco" + +#: src/modules/lyr_std/bevel.cpp:367 +msgid "Hi-Color" +msgstr "Color Claro" + +#: src/modules/lyr_std/bevel.cpp:370 +msgid "Lo-Color" +msgstr "Color Oscuro" + +#: src/modules/lyr_std/bevel.cpp:373 +msgid "Light Angle" +msgstr "Angulo de la Luz" + +#: src/modules/lyr_std/bevel.cpp:377 +msgid "Depth of Bevel" +msgstr "Profundidad del Bisel" + +#: src/modules/lyr_std/bevel.cpp:381 +msgid "Softness" +msgstr "Suavidad" + +#: src/modules/lyr_std/bevel.cpp:384 +msgid "Use Luma" +msgstr "Usar \"Luma\"" + +#: src/modules/lyr_std/bevel.cpp:387 +msgid "Solid" +msgstr "Sólido" + +#: src/modules/lyr_std/booleancurve.cpp:104 +msgid "Region Set" +msgstr "Conjunto Región" + +#: src/modules/lyr_std/booleancurve.cpp:105 +msgid "Set of regions to combine" +msgstr "Conjunto de Regiones a combinar" + +#: src/modules/lyr_std/clamp.cpp:54 src/tool/main.cpp:1079 +msgid "Clamp" +msgstr "Recortar" + +#: src/modules/lyr_std/clamp.cpp:55 src/modules/mod_filter/colorcorrect.cpp:55 +#: src/modules/mod_filter/halftone2.cpp:58 +#: src/modules/mod_filter/halftone3.cpp:58 +#: src/modules/mod_filter/lumakey.cpp:58 +msgid "Filters" +msgstr "Filtros" + +#: src/modules/lyr_std/clamp.cpp:155 +msgid "Invert Negative" +msgstr "Invertir Negativo" + +#: src/modules/lyr_std/clamp.cpp:159 +msgid "Clamp Ceiling" +msgstr "Recortar Superior" + +#: src/modules/lyr_std/clamp.cpp:163 +msgid "Ceiling" +msgstr "Superior" + +#: src/modules/lyr_std/clamp.cpp:167 +msgid "Floor" +msgstr "Inferior" + +#: src/modules/lyr_std/import.cpp:58 +msgid "Import Image" +msgstr "Importar Imagen" + +#: src/modules/lyr_std/import.cpp:138 +#, c-format +msgid "Filename seems to already be set to \"%s\" (%s)" +msgstr "Parece que el archivo ya ha sido llamado \"%s\" (%s)" + +#: src/modules/lyr_std/import.cpp:209 +msgid "Filename" +msgstr "Nombre del Archivo" + +#: src/modules/lyr_std/import.cpp:210 +msgid "File to import" +msgstr "Archivo a importar" + +#: src/modules/lyr_std/import.cpp:214 src/synfig/layer_pastecanvas.cpp:140 +msgid "Time Offset" +msgstr "Desfase de Tiempo" + +#: src/modules/lyr_std/insideout.cpp:55 +msgid "Inside Out" +msgstr "Al revés" + +#: src/modules/lyr_std/insideout.cpp:56 +#: src/modules/lyr_std/sphere_distort.cpp:73 +#: src/modules/lyr_std/stretch.cpp:59 src/modules/lyr_std/twirl.cpp:56 +#: src/modules/lyr_std/warp.cpp:56 src/modules/mod_noise/distort.cpp:57 +msgid "Distortions" +msgstr "Distorsiones" + +#: src/modules/lyr_std/insideout.cpp:142 +msgid "Defines the where the center will be" +msgstr "Define donde estará el centro" + +#: src/modules/lyr_std/julia.cpp:56 +msgid "Julia Set" +msgstr "Conjunto de Julia" + +#: src/modules/lyr_std/julia.cpp:57 src/modules/lyr_std/mandelbrot.cpp:57 +msgid "Fractals" +msgstr "Fractales" + +#: src/modules/lyr_std/julia.cpp:300 +msgid "Inside Color" +msgstr "Color Interior" + +#: src/modules/lyr_std/julia.cpp:301 +msgid "Color of the Set" +msgstr "Color del Conjunto" + +#: src/modules/lyr_std/julia.cpp:304 +msgid "Outside Color" +msgstr "Color Exterior" + +#: src/modules/lyr_std/julia.cpp:305 +msgid "Color outside the Set" +msgstr "Color fuera del Conjunto" + +#: src/modules/lyr_std/julia.cpp:308 +msgid "Color Shift" +msgstr "Desplazamiento de Color" + +#: src/modules/lyr_std/julia.cpp:311 src/modules/lyr_std/mandelbrot.cpp:213 +msgid "Iterations" +msgstr "Iteraciones" + +#: src/modules/lyr_std/julia.cpp:314 +msgid "Seed Point" +msgstr "Punto de Semilla" + +#: src/modules/lyr_std/julia.cpp:317 src/modules/lyr_std/mandelbrot.cpp:216 +msgid "Bailout ValueBase" +msgstr "Valor Base de Baliout" + +#: src/modules/lyr_std/julia.cpp:321 src/modules/lyr_std/mandelbrot.cpp:226 +#: src/modules/lyr_std/twirl.cpp:125 +msgid "Distort Inside" +msgstr "Distorsionar dentro" + +#: src/modules/lyr_std/julia.cpp:324 src/modules/lyr_std/mandelbrot.cpp:230 +msgid "Shade Inside" +msgstr "Sombrear Interior" + +#: src/modules/lyr_std/julia.cpp:327 src/modules/lyr_std/mandelbrot.cpp:234 +msgid "Solid Inside" +msgstr "Interior Sólido" + +#: src/modules/lyr_std/julia.cpp:330 src/modules/lyr_std/mandelbrot.cpp:238 +msgid "Invert Inside" +msgstr "Invertir Interior" + +#: src/modules/lyr_std/julia.cpp:333 +msgid "Color Inside" +msgstr "Colorear Interior" + +#: src/modules/lyr_std/julia.cpp:336 src/modules/lyr_std/mandelbrot.cpp:255 +#: src/modules/lyr_std/twirl.cpp:129 +msgid "Distort Outside" +msgstr "Distorsionar Exterior" + +#: src/modules/lyr_std/julia.cpp:339 src/modules/lyr_std/mandelbrot.cpp:259 +msgid "Shade Outside" +msgstr "Sombrear Exterior" + +#: src/modules/lyr_std/julia.cpp:342 src/modules/lyr_std/mandelbrot.cpp:263 +msgid "Solid Outside" +msgstr "Exterior Sólido" + +#: src/modules/lyr_std/julia.cpp:345 src/modules/lyr_std/mandelbrot.cpp:267 +msgid "Invert Outside" +msgstr "Invertir Exterior" + +#: src/modules/lyr_std/julia.cpp:348 +msgid "Color Outside" +msgstr "Colorear Exterior" + +#: src/modules/lyr_std/julia.cpp:352 +msgid "Color Cycle" +msgstr "Ciclar Color" + +#: src/modules/lyr_std/julia.cpp:355 src/modules/lyr_std/mandelbrot.cpp:275 +msgid "Smooth Outside" +msgstr "Exterior Suave" + +#: src/modules/lyr_std/julia.cpp:356 src/modules/lyr_std/mandelbrot.cpp:276 +msgid "Smooth the coloration outside the set" +msgstr "Suavizar el coloreado fuera del Conjunto" + +#: src/modules/lyr_std/julia.cpp:359 src/modules/lyr_std/mandelbrot.cpp:220 +msgid "Break Set" +msgstr "Romper el Conjunto" + +#: src/modules/lyr_std/julia.cpp:360 src/modules/lyr_std/mandelbrot.cpp:221 +msgid "Modify equation to achieve interesting results" +msgstr "Modificar la ecuación para obtener resultados interesantes" + +#: src/modules/lyr_std/mandelbrot.cpp:56 +msgid "Mandelbrot Set" +msgstr "Conjunto de Mandelbrot" + +#: src/modules/lyr_std/mandelbrot.cpp:227 +#: src/modules/lyr_std/mandelbrot.cpp:231 +#: src/modules/lyr_std/mandelbrot.cpp:235 +#: src/modules/lyr_std/mandelbrot.cpp:239 +#: src/modules/lyr_std/mandelbrot.cpp:243 +#: src/modules/lyr_std/mandelbrot.cpp:247 +#: src/modules/lyr_std/mandelbrot.cpp:251 +msgid "Inside" +msgstr "Inteior" + +#: src/modules/lyr_std/mandelbrot.cpp:242 +msgid "Gradient Inside" +msgstr "Gradiente Interior" + +#: src/modules/lyr_std/mandelbrot.cpp:246 +msgid "Offset Inside" +msgstr "Desplazamiento Interior" + +#: src/modules/lyr_std/mandelbrot.cpp:250 +msgid "Loop Inside" +msgstr "Bucle Interior" + +#: src/modules/lyr_std/mandelbrot.cpp:256 +#: src/modules/lyr_std/mandelbrot.cpp:260 +#: src/modules/lyr_std/mandelbrot.cpp:264 +#: src/modules/lyr_std/mandelbrot.cpp:268 +#: src/modules/lyr_std/mandelbrot.cpp:272 +#: src/modules/lyr_std/mandelbrot.cpp:277 +#: src/modules/lyr_std/mandelbrot.cpp:281 +#: src/modules/lyr_std/mandelbrot.cpp:285 +msgid "Outside" +msgstr "Exterior" + +#: src/modules/lyr_std/mandelbrot.cpp:271 +msgid "Gradient outside" +msgstr "Gradiente Exterior" + +#: src/modules/lyr_std/mandelbrot.cpp:280 +msgid "Offset Outside" +msgstr "Desplazamiento Exterior" + +#: src/modules/lyr_std/mandelbrot.cpp:284 +msgid "Scale Outside" +msgstr "Escala Exterior" + +#: src/modules/lyr_std/rotate.cpp:55 +msgid "Rotate" +msgstr "Rotar" + +#: src/modules/lyr_std/rotate.cpp:56 src/modules/lyr_std/translate.cpp:55 +#: src/modules/lyr_std/zoom.cpp:52 +msgid "Transform" +msgstr "Transformar" + +#: src/modules/lyr_std/rotate.cpp:113 src/modules/lyr_std/translate.cpp:98 +#: src/modules/mod_filter/radialblur.cpp:107 +#: src/synfig/layer_pastecanvas.cpp:128 +msgid "Point where you want the origin to be" +msgstr "Apunta donde ud. quiera que esté el origen" + +#: src/modules/lyr_std/rotate.cpp:117 +#: src/modules/lyr_std/sphere_distort.cpp:153 +#: src/modules/lyr_std/stretch.cpp:103 src/modules/lyr_std/zoom.cpp:96 +#: src/synfig/layer_composite.cpp:142 +#: src/synfig/valuenode_blinecalctangent.cpp:242 +#: src/synfig/valuenode_blinecalcvertex.cpp:201 +#: src/synfig/valuenode_blinecalcwidth.cpp:207 +#: src/synfig/valuenode_segcalctangent.cpp:161 +#: src/synfig/valuenode_segcalcvertex.cpp:159 +msgid "Amount" +msgstr "Cantidad" + +#: src/modules/lyr_std/rotate.cpp:118 +msgid "Amount of rotation" +msgstr "Cantidad de Rotación" + +#: src/modules/lyr_std/shade.cpp:66 +msgid "Shade" +msgstr "Sombra" + +#: src/modules/lyr_std/shade.cpp:382 +msgid "Size of Shade" +msgstr "Tamaño de Sombra" + +#: src/modules/lyr_std/sphere_distort.cpp:72 +#: src/modules/lyr_std/sphere_distort.cpp:165 +msgid "Spherize" +msgstr "Esferizar" + +#: src/modules/lyr_std/sphere_distort.cpp:143 +msgid "Position" +msgstr "Posición" + +#: src/modules/lyr_std/sphere_distort.cpp:147 +#: src/modules/lyr_std/twirl.cpp:113 src/modules/mod_geometry/circle.cpp:128 +#: src/modules/mod_gradient/radialgradient.cpp:118 +#: src/modules/mod_gradient/spiralgradient.cpp:117 +#: src/modules/mod_noise/valuenode_random.cpp:244 +#: src/synfig/valuenode_radialcomposite.cpp:197 +msgid "Radius" +msgstr "Radio" + +#: src/modules/lyr_std/sphere_distort.cpp:158 src/modules/lyr_std/warp.cpp:400 +msgid "Clip" +msgstr "Recortar" + +#: src/modules/lyr_std/sphere_distort.cpp:162 +msgid "Distort Type" +msgstr "Tipo de Distorsión" + +#: src/modules/lyr_std/sphere_distort.cpp:163 +msgid "The direction of the distortion" +msgstr "La dirección de la distorsión" + +#: src/modules/lyr_std/sphere_distort.cpp:166 +msgid "Vertical Bar" +msgstr "Barra Vertical" + +#: src/modules/lyr_std/sphere_distort.cpp:167 +msgid "Horizontal Bar" +msgstr "Barra Horizontal" + +#: src/modules/lyr_std/stretch.cpp:58 +msgid "Stretch" +msgstr "Encoger" + +#: src/modules/lyr_std/stretch.cpp:108 src/modules/lyr_std/twirl.cpp:109 +#: src/modules/lyr_std/zoom.cpp:101 +#: src/modules/mod_gradient/conicalgradient.cpp:110 +#: src/modules/mod_gradient/radialgradient.cpp:114 +#: src/modules/mod_gradient/spiralgradient.cpp:113 +msgid "Center" +msgstr "Centro" + +#: src/modules/lyr_std/supersample.cpp:55 +msgid "Super Sample" +msgstr "Super Muestreo" + +#: src/modules/lyr_std/supersample.cpp:119 +msgid "Unable to create SurfaceTarget" +msgstr "Imposible crear Superficie Objetivo" + +#: src/modules/lyr_std/supersample.cpp:215 +#: src/modules/mod_gradient/curvegradient.cpp:494 +#: src/synfig/valuenode_composite.cpp:289 +#: src/synfig/valuenode_realstring.cpp:184 +#: src/synfig/valuenode_repeat_gradient.cpp:185 +#: src/synfig/valuenode_stripes.cpp:176 src/tool/main.cpp:978 +msgid "Width" +msgstr "Espesor" + +#: src/modules/lyr_std/supersample.cpp:216 +msgid "Width of sample area (In pixels)" +msgstr "Espesor del area de muestreo (en pixels)" + +#: src/modules/lyr_std/supersample.cpp:219 src/tool/main.cpp:984 +msgid "Height" +msgstr "Altura" + +#: src/modules/lyr_std/supersample.cpp:220 +msgid "Height of sample area (In pixels)" +msgstr "Altura del áre a de muestreo (en pixels)" + +#: src/modules/lyr_std/supersample.cpp:223 +msgid "Use Parametric" +msgstr "Usa Paramétrico" + +#: src/modules/lyr_std/supersample.cpp:224 +msgid "Use the Parametric Renderer" +msgstr "Usa el Muestreo Paramétrico" + +#: src/modules/lyr_std/supersample.cpp:227 +msgid "Be Alpha Safe" +msgstr "Estar a salvo de Transparencia" + +#: src/modules/lyr_std/timeloop.cpp:57 src/synfig/valuenode.cpp:161 +#: src/synfig/valuenode_timeloop.cpp:188 +msgid "Time Loop" +msgstr "Bucle de Tiempo" + +#: src/modules/lyr_std/timeloop.cpp:120 src/synfig/valuenode_timeloop.cpp:124 +msgid "Link Time" +msgstr "Tiempo del Enlace" + +#: src/modules/lyr_std/timeloop.cpp:124 src/synfig/valuenode_timeloop.cpp:125 +msgid "Local Time" +msgstr "Tiempo Local" + +#: src/modules/lyr_std/timeloop.cpp:128 src/synfig/valuenode_step.cpp:214 +#: src/synfig/valuenode_timeloop.cpp:126 +msgid "Duration" +msgstr "Duración" + +#: src/modules/lyr_std/timeloop.cpp:132 +msgid "Only For Positive Duration" +msgstr "Solo para Duración positiva" + +#: src/modules/lyr_std/timeloop.cpp:136 +msgid "Symmetrical" +msgstr "Simétrico" + +#: src/modules/lyr_std/translate.cpp:54 +msgid "Translate" +msgstr "Trasladar" + +#: src/modules/lyr_std/twirl.cpp:55 +msgid "Twirl" +msgstr "Torbellino" + +#: src/modules/lyr_std/twirl.cpp:114 +#: src/modules/mod_gradient/radialgradient.cpp:119 +#: src/modules/mod_gradient/spiralgradient.cpp:118 +msgid "This is the radius of the circle" +msgstr "Este es el radio del círculo" + +#: src/modules/lyr_std/twirl.cpp:120 +msgid "Rotations" +msgstr "Rotaciones" + +#: src/modules/lyr_std/warp.cpp:55 +msgid "Warp" +msgstr "Combar" + +#: src/modules/lyr_std/warp.cpp:371 +msgid "Source TL" +msgstr "Origen TL" + +#: src/modules/lyr_std/warp.cpp:376 +msgid "Source BR" +msgstr "Origen BR" + +#: src/modules/lyr_std/warp.cpp:380 +msgid "Dest TL" +msgstr "Destino TL" + +#: src/modules/lyr_std/warp.cpp:385 +msgid "Dest TR" +msgstr "Destino TR" + +#: src/modules/lyr_std/warp.cpp:390 +msgid "Dest BR" +msgstr "Destino BR" + +#: src/modules/lyr_std/warp.cpp:395 +msgid "Dest BL" +msgstr "Destino BL" + +#: src/modules/lyr_std/warp.cpp:404 +msgid "Horizon" +msgstr "Horizonte" + +#: src/modules/lyr_std/xorpattern.cpp:54 +msgid "XOR Pattern" +msgstr "Estampado XOR" + +#: src/modules/lyr_std/zoom.cpp:51 src/synfig/layer_pastecanvas.cpp:135 +msgid "Zoom" +msgstr "Aumento" + +#: src/modules/lyr_std/zoom.cpp:97 +msgid "Amount to zoom in" +msgstr "Cantidad de aumento" + +#: src/modules/lyr_std/zoom.cpp:102 +msgid "Point to zoom in to" +msgstr "Punto donde centrar aumento" + +#: src/modules/mod_bmp/mptr_bmp.cpp:133 src/modules/mod_bmp/mptr_bmp.cpp:134 +#: src/modules/mod_ppm/mptr_ppm.cpp:78 +#, c-format +msgid "Unable to open %s" +msgstr "Imposible abrir %s" + +#: src/modules/mod_bmp/mptr_bmp.cpp:145 src/modules/mod_bmp/mptr_bmp.cpp:146 +#, c-format +msgid "%s is not in BMP format" +msgstr "%s no está en formato BMP" + +#: src/modules/mod_bmp/mptr_bmp.cpp:152 +#, c-format +msgid "Failure while reading BITMAPFILEHEADER from %s" +msgstr "Falló mientras leía BITMAPFILEHEADER desde %s" + +#: src/modules/mod_bmp/mptr_bmp.cpp:160 +#, c-format +msgid "Failure while reading BITMAPINFOHEADER from %s" +msgstr "Falló mientras leía BITMAPINFOHEADER desde %s" + +#: src/modules/mod_bmp/mptr_bmp.cpp:170 +#, c-format +msgid "Bad BITMAPFILEHEADER in %s. (bfOffsetBits=%d, should be %d)" +msgstr "Mal BITMAPFILEHEADER en %s. (bfOffsetBits=%d, debería ser %d)" + +#: src/modules/mod_bmp/mptr_bmp.cpp:178 +#, c-format +msgid "Bad BITMAPINFOHEADER in %s. (biSize=%d, should be 40)" +msgstr "Mal BITMAPINFOHEADER en %s. (biSize=%d, debería ser 40)" + +#: src/modules/mod_bmp/mptr_bmp.cpp:196 src/modules/mod_bmp/mptr_bmp.cpp:197 +msgid "Reading compressed bitmaps is not supported" +msgstr "Lectura de bitmaps comprimidos no esta soportado" + +#: src/modules/mod_bmp/mptr_bmp.cpp:203 src/modules/mod_bmp/mptr_bmp.cpp:204 +#, c-format +msgid "Unsupported bit depth (bit_count=%d, should be 24 or 32)" +msgstr "Profundidad de bit no soportado (bit_count=%d, debería ser 24 o 32)" + +#: src/modules/mod_bmp/trgt_bmp.cpp:185 +msgid " (animated)" +msgstr " (animado)" + +#: src/modules/mod_bmp/trgt_bmp.cpp:195 src/modules/mod_bmp/trgt_bmp.cpp:196 +msgid "Unable to open file" +msgstr "Imposible abrir archivo" + +#: src/modules/mod_bmp/trgt_bmp.cpp:226 src/modules/mod_bmp/trgt_bmp.cpp:227 +msgid "Unable to write file header to file" +msgstr "Imposible escribir la cabecera al archivo" + +#: src/modules/mod_bmp/trgt_bmp.cpp:233 src/modules/mod_bmp/trgt_bmp.cpp:234 +msgid "Unable to write info header" +msgstr "Imposible escribir la información de cabecera" + +#: src/modules/mod_dv/trgt_dv.cpp:166 src/modules/mod_dv/trgt_dv.cpp:175 +#: src/modules/mod_dv/trgt_dv.cpp:182 src/modules/mod_dv/trgt_dv.cpp:192 +#: src/modules/mod_dv/trgt_dv.cpp:200 src/modules/mod_dv/trgt_dv.cpp:205 +#: src/modules/mod_dv/trgt_dv.cpp:209 src/modules/mod_dv/trgt_dv.cpp:218 +#: src/modules/mod_dv/trgt_dv.cpp:227 +msgid "Unable to open pipe to encodedv" +msgstr "Imposible abrir tubería para encodedv" + +#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:172 +#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:179 +#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:189 +#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:199 +#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:217 +msgid "Unable to open pipe to ffmpeg" +msgstr "Imposible abrir tubería para ffmpeg" + +#: src/modules/mod_filter/blur.cpp:67 +msgid "Blur" +msgstr "Desenfoque" + +#: src/modules/mod_filter/blur.cpp:68 src/modules/mod_filter/radialblur.cpp:56 +#: src/synfig/layer_motionblur.cpp:57 +msgid "Blurs" +msgstr "Desenfoques" + +#: src/modules/mod_filter/blur.cpp:243 +msgid "Size of Blur" +msgstr "Tamaño del Desenfoque" + +#: src/modules/mod_filter/colorcorrect.cpp:54 +msgid "Color Correct" +msgstr "Corregir Color" + +#: src/modules/mod_filter/colorcorrect.cpp:203 +msgid "Hue Adjust" +msgstr "Ajuste del Matiz" + +#: src/modules/mod_filter/colorcorrect.cpp:207 +msgid "Brightness" +msgstr "Brillo" + +#: src/modules/mod_filter/colorcorrect.cpp:211 +msgid "Contrast" +msgstr "Contraste" + +#: src/modules/mod_filter/colorcorrect.cpp:215 +msgid "Exposure Adjust" +msgstr "Ajuste de Exposición" + +#: src/modules/mod_filter/colorcorrect.cpp:219 src/synfig/layer_bitmap.cpp:138 +msgid "Gamma Adjustment" +msgstr "Ajuste de Gamma" + +#: src/modules/mod_filter/halftone2.cpp:57 +msgid "Halftone 2" +msgstr "Medios Tonos 2" + +#: src/modules/mod_filter/halftone2.cpp:147 +msgid "Mask Origin" +msgstr "Origen Máscara" + +#: src/modules/mod_filter/halftone2.cpp:151 +msgid "Mask Angle" +msgstr "Ángulo Máscara" + +#: src/modules/mod_filter/halftone2.cpp:155 +#: src/modules/mod_filter/halftone3.cpp:305 +msgid "Mask Size" +msgstr "Tamaño Máscara" + +#: src/modules/mod_filter/halftone2.cpp:160 +msgid "Light Color" +msgstr "Color Claro" + +#: src/modules/mod_filter/halftone2.cpp:163 +msgid "Dark Color" +msgstr "Color Oscuro" + +#: src/modules/mod_filter/halftone2.cpp:168 +#: src/modules/mod_filter/halftone3.cpp:310 +#: src/modules/mod_gradient/conicalgradient.cpp:119 +msgid "Symmetric" +msgstr "Simétrico" + +#: src/modules/mod_filter/halftone2.cpp:169 +#: src/modules/mod_filter/halftone3.cpp:311 +msgid "Light On Dark" +msgstr "Claroscuro" + +#: src/modules/mod_filter/halftone2.cpp:171 +#: src/modules/mod_filter/halftone3.cpp:313 +msgid "Diamond" +msgstr "Diamante" + +#: src/modules/mod_filter/halftone2.cpp:172 +#: src/modules/mod_filter/halftone3.cpp:314 +msgid "Stripe" +msgstr "Rayas" + +#: src/modules/mod_filter/halftone3.cpp:57 +msgid "Halftone 3" +msgstr "Medios Tonos 3" + +#: src/modules/mod_filter/halftone3.cpp:308 +msgid " Type" +msgstr "Tipo" + +#: src/modules/mod_filter/halftone3.cpp:317 +msgid "Subtractive Flag" +msgstr "Sustractivo" + +#: src/modules/mod_filter/halftone3.cpp:325 +msgid " Color" +msgstr "Color" + +#: src/modules/mod_filter/halftone3.cpp:329 +msgid " Mask Origin" +msgstr "Origen Máscara" + +#: src/modules/mod_filter/halftone3.cpp:333 +msgid " Mask Angle" +msgstr "Ángulo Máscara" + +#: src/modules/mod_filter/lumakey.cpp:57 +msgid "Luma Key" +msgstr "Clave Luma" + +#: src/modules/mod_filter/radialblur.cpp:55 +msgid "Radial Blur" +msgstr "Desenfoque Radial" + +#: src/modules/mod_filter/radialblur.cpp:112 +msgid "Size of blur" +msgstr "Tamaña del Desenfoque" + +#: src/modules/mod_filter/radialblur.cpp:117 +msgid "Fade Out" +msgstr "Fundido" + +#: src/modules/mod_geometry/checkerboard.cpp:57 +msgid "Checkerboard" +msgstr "Cuadrícula" + +#: src/modules/mod_geometry/checkerboard.cpp:58 +#: src/modules/mod_geometry/circle.cpp:56 +#: src/modules/mod_geometry/outline.cpp:71 +#: src/modules/mod_geometry/rectangle.cpp:59 +#: src/modules/mod_geometry/region.cpp:64 src/modules/mod_geometry/star.cpp:63 +#: src/synfig/layer_polygon.cpp:60 src/synfig/layer_solidcolor.cpp:56 +msgid "Geometry" +msgstr "Geometría" + +#: src/modules/mod_geometry/checkerboard.cpp:122 +msgid "Color of checkers" +msgstr "Color de los cuadros" + +#: src/modules/mod_geometry/checkerboard.cpp:129 +msgid "Size of checkers" +msgstr "Tamaño de los cuadros" + +#: src/modules/mod_geometry/circle.cpp:55 +msgid "Circle" +msgstr "Círculo" + +#: src/modules/mod_geometry/circle.cpp:133 src/synfig/layer_shape.cpp:1205 +msgid "Feather" +msgstr "Desvanecimiento" + +#: src/modules/mod_geometry/circle.cpp:141 +msgid "Invert the circle" +msgstr "Invertir el círculo" + +#: src/modules/mod_geometry/circle.cpp:145 +msgid "Falloff" +msgstr "Caída" + +#: src/modules/mod_geometry/circle.cpp:146 +msgid "Determines the falloff function for the feather" +msgstr "Determina la función de caida del desvanecimiento" + +#: src/modules/mod_geometry/circle.cpp:148 +#: src/modules/mod_noise/distort.cpp:211 src/modules/mod_noise/noise.cpp:263 +#: src/synfig/layer_bitmap.cpp:132 src/synfig/valuenode.cpp:134 +#: src/synfig/valuenode_linear.cpp:142 +msgid "Linear" +msgstr "Linear" + +#: src/modules/mod_geometry/circle.cpp:149 +msgid "Squared" +msgstr "Cuadrado" + +#: src/modules/mod_geometry/circle.cpp:150 +msgid "Square Root" +msgstr "Raíz Cuadrada" + +#: src/modules/mod_geometry/circle.cpp:151 +msgid "Sigmond" +msgstr "Sigmoidea" + +#: src/modules/mod_geometry/circle.cpp:152 +#: src/modules/mod_noise/distort.cpp:212 src/modules/mod_noise/noise.cpp:264 +#: src/synfig/layer_bitmap.cpp:133 +msgid "Cosine" +msgstr "Coseno" + +#: src/modules/mod_geometry/outline.cpp:70 +msgid "Outline" +msgstr "Contorno" + +#: src/modules/mod_geometry/outline.cpp:178 +msgid "No vertices in outline " +msgstr "No hay vértices en el contorno " + +#: src/modules/mod_geometry/outline.cpp:807 +#: src/modules/mod_geometry/region.cpp:232 +#: src/modules/mod_gradient/curvegradient.cpp:497 +#: src/modules/mod_particle/plant.cpp:383 +msgid "Vertices" +msgstr "Vértices" + +#: src/modules/mod_geometry/outline.cpp:810 +#: src/modules/mod_gradient/curvegradient.cpp:500 +#: src/modules/mod_particle/plant.cpp:384 +msgid "A list of BLine Points" +msgstr "Una lista de Puntos de línea Beizer" + +#: src/modules/mod_geometry/outline.cpp:824 +msgid "Outline Width" +msgstr "Ancho del Contorno" + +#: src/modules/mod_geometry/outline.cpp:829 +msgid "Expand" +msgstr "Expandir" + +#: src/modules/mod_geometry/outline.cpp:833 +msgid "Sharp Cusps" +msgstr "Esquinas Afiladas" + +#: src/modules/mod_geometry/outline.cpp:834 +msgid "Determines cusp type" +msgstr "Determina el tipo de esquina" + +#: src/modules/mod_geometry/outline.cpp:838 +msgid "Rounded Begin" +msgstr "Comienzo Redondeado" + +#: src/modules/mod_geometry/outline.cpp:839 +#: src/modules/mod_geometry/outline.cpp:844 +msgid "Round off the tip" +msgstr "Redondeo de la punta" + +#: src/modules/mod_geometry/outline.cpp:843 +msgid "Rounded End" +msgstr "Fin Redondeado" + +#: src/modules/mod_geometry/outline.cpp:847 +msgid "Loopyness" +msgstr "Loopyness" + +#: src/modules/mod_geometry/outline.cpp:850 +msgid "Homogeneous" +msgstr "Homogeneo" + +#: src/modules/mod_geometry/rectangle.cpp:58 +msgid "Rectangle" +msgstr "Rectángulo" + +#: src/modules/mod_geometry/rectangle.cpp:126 +#: src/modules/mod_gradient/lineargradient.cpp:184 +msgid "Point 1" +msgstr "Punto 1" + +#: src/modules/mod_geometry/rectangle.cpp:131 +#: src/modules/mod_gradient/lineargradient.cpp:188 +msgid "Point 2" +msgstr "Punto 2" + +#: src/modules/mod_geometry/rectangle.cpp:136 +msgid "Expand amount" +msgstr "Cantidad de expansión" + +#: src/modules/mod_geometry/rectangle.cpp:140 +msgid "Invert the rectangle" +msgstr "Invertir el Rectángulo" + +#: src/modules/mod_geometry/region.cpp:63 +msgid "Region" +msgstr "Región" + +#: src/modules/mod_geometry/star.cpp:62 +msgid "Star" +msgstr "Estrella" + +#: src/modules/mod_geometry/star.cpp:174 +msgid "Outer Radius" +msgstr "Radio Exterior" + +#: src/modules/mod_geometry/star.cpp:175 +msgid "The radius of the outer points in the star" +msgstr "El radio de los puntos exteriores de la estrella" + +#: src/modules/mod_geometry/star.cpp:181 +msgid "Inner Radius" +msgstr "Radio Interior" + +#: src/modules/mod_geometry/star.cpp:182 +msgid "The radius of the inner points in the star" +msgstr "El radio de los puntos interiores de la estrella" + +#: src/modules/mod_geometry/star.cpp:188 +#: src/modules/mod_gradient/conicalgradient.cpp:114 +#: src/modules/mod_gradient/spiralgradient.cpp:124 +#: src/synfig/valuenode_cos.cpp:165 src/synfig/valuenode_sine.cpp:165 +msgid "Angle" +msgstr "Ángulo" + +#: src/modules/mod_geometry/star.cpp:189 +msgid "The orientation of the star" +msgstr "La orientación de la estrella" + +#: src/modules/mod_geometry/star.cpp:194 src/synfig/distance.cpp:247 +msgid "Points" +msgstr "Puntos" + +#: src/modules/mod_geometry/star.cpp:195 +msgid "The number of points in the star" +msgstr "El número de puntos de la estrella" + +#: src/modules/mod_geometry/star.cpp:199 +msgid "Regular Polygon" +msgstr "Polígono Regular" + +#: src/modules/mod_geometry/star.cpp:200 +msgid "Whether to draw a star or a regular polygon" +msgstr "Si dibuja un polígono regular o una estrella" + +#: src/modules/mod_gif/trgt_gif.cpp:107 +#, c-format +msgid "Unable to open \"%s\" for write access!" +msgstr "Imposible abrir \"%s\" para acceso de escritura!" + +#: src/modules/mod_gif/trgt_gif.cpp:195 +msgid "Description not set!" +msgstr "¡Sin descripción!" + +#: src/modules/mod_gradient/conicalgradient.cpp:56 +msgid "Conical Gradient" +msgstr "Gradiente Cónico" + +#: src/modules/mod_gradient/conicalgradient.cpp:57 +#: src/modules/mod_gradient/curvegradient.cpp:58 +#: src/modules/mod_gradient/lineargradient.cpp:54 +#: src/modules/mod_gradient/radialgradient.cpp:57 +#: src/modules/mod_gradient/spiralgradient.cpp:56 +#: src/modules/mod_noise/noise.cpp:57 +msgid "Gradients" +msgstr "Gradientes" + +#: src/modules/mod_gradient/conicalgradient.cpp:106 +#: src/modules/mod_gradient/curvegradient.cpp:503 +#: src/modules/mod_gradient/lineargradient.cpp:191 +#: src/modules/mod_gradient/radialgradient.cpp:110 +#: src/modules/mod_gradient/spiralgradient.cpp:109 +#: src/modules/mod_noise/noise.cpp:250 src/modules/mod_particle/plant.cpp:394 +#: src/synfig/valuenode_gradientrotate.cpp:146 +#: src/synfig/valuenode_repeat_gradient.cpp:183 +msgid "Gradient" +msgstr "Gradiente" + +#: src/modules/mod_gradient/curvegradient.cpp:57 +msgid "Curve Gradient" +msgstr "Gradiente Curvado" + +#: src/modules/mod_gradient/curvegradient.cpp:505 +#: src/modules/mod_gradient/lineargradient.cpp:194 +#: src/modules/mod_gradient/radialgradient.cpp:125 +#: src/synfig/valuenode_blinecalctangent.cpp:241 +#: src/synfig/valuenode_blinecalcvertex.cpp:200 +#: src/synfig/valuenode_blinecalcwidth.cpp:206 +msgid "Loop" +msgstr "Bucle" + +#: src/modules/mod_gradient/curvegradient.cpp:507 +#: src/modules/mod_gradient/lineargradient.cpp:197 +#: src/modules/mod_gradient/radialgradient.cpp:129 +msgid "ZigZag" +msgstr "Zig Zag" + +#: src/modules/mod_gradient/curvegradient.cpp:509 +msgid "Perpendicular" +msgstr "Perpendicular" + +#: src/modules/mod_gradient/curvegradient.cpp:511 +msgid "Fast" +msgstr "Rápido" + +#: src/modules/mod_gradient/lineargradient.cpp:53 +msgid "Linear Gradient" +msgstr "Gradiente Linear" + +#: src/modules/mod_gradient/radialgradient.cpp:56 +msgid "Radial Gradient" +msgstr "Gradiente Radial" + +#: src/modules/mod_gradient/spiralgradient.cpp:55 +msgid "Spiral Gradient" +msgstr "Gradiente Espiral" + +#: src/modules/mod_gradient/spiralgradient.cpp:129 +msgid "Clockwise" +msgstr "Horario" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:103 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:104 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:216 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:217 +msgid "No file to load" +msgstr "Sin archivo a cargar" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:157 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:158 +#: src/synfig/listimporter.cpp:182 src/synfig/listimporter.cpp:183 +#: src/tool/main.cpp:1181 +msgid "Unable to open " +msgstr "Imposible abrir " + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:164 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:165 +#: src/synfig/listimporter.cpp:189 src/synfig/listimporter.cpp:190 +msgid "Unable to get frame from " +msgstr "Imposible obtener fotograma desde " + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:171 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:172 +msgid "Bad surface from " +msgstr "Mala superficie desde " + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:227 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:228 +msgid "Unable to open pipe to imagemagick" +msgstr "Imposible abrir tubería a imagemagick" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:239 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:240 +msgid "Reached end of stream without finding PPM header" +msgstr "Alcanzado fin del flujo sin encontrar cabecera PPM" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:248 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:249 +msgid "stream not in PPM format" +msgstr "flujo sin formato PPM" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:260 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:261 +msgid "Premature end of file (after header)" +msgstr "Prematuro fin de archivo (después de cabecera)" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:273 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:274 +msgid "Premature end of file" +msgstr "Prematuro fin de archivo" + +#: src/modules/mod_imagemagick/trgt_imagemagick.cpp:157 +msgid "Unable to open pipe to imagemagick's convert utility" +msgstr "Imposible abrir tubería hacia la utilidad de conversión de imagemagick" + +#: src/modules/mod_noise/distort.cpp:56 +msgid "Noise Distort" +msgstr "Distrosión Ruidosa" + +#: src/modules/mod_noise/distort.cpp:197 +msgid "Displacement" +msgstr "Desplazamiento" + +#: src/modules/mod_noise/distort.cpp:204 src/modules/mod_noise/noise.cpp:253 +msgid "Random Seed" +msgstr "Semilla de Aleatoriedad" + +#: src/modules/mod_noise/distort.cpp:207 src/modules/mod_noise/noise.cpp:259 +#: src/modules/mod_noise/valuenode_random.cpp:247 +#: src/synfig/layer_bitmap.cpp:128 +msgid "Interpolation" +msgstr "Interpolación" + +#: src/modules/mod_noise/distort.cpp:208 src/modules/mod_noise/noise.cpp:260 +#: src/synfig/layer_bitmap.cpp:129 +msgid "What type of interpolation to use" +msgstr "Que tipo de interpolación usar" + +#: src/modules/mod_noise/distort.cpp:210 src/modules/mod_noise/noise.cpp:262 +#: src/synfig/layer_bitmap.cpp:131 +msgid "Nearest Neighbor" +msgstr "Vecino más cercano" + +#: src/modules/mod_noise/distort.cpp:213 src/modules/mod_noise/noise.cpp:265 +msgid "Spline" +msgstr "Spline" + +#: src/modules/mod_noise/distort.cpp:214 src/modules/mod_noise/noise.cpp:266 +#: src/synfig/layer_bitmap.cpp:134 +msgid "Cubic" +msgstr "Cúbico" + +#: src/modules/mod_noise/distort.cpp:217 src/modules/mod_noise/noise.cpp:269 +msgid "Detail" +msgstr "Detalle" + +#: src/modules/mod_noise/distort.cpp:220 src/modules/mod_noise/noise.cpp:272 +#: src/modules/mod_noise/valuenode_random.cpp:246 +msgid "Animation Speed" +msgstr "Velocidad Animación" + +#: src/modules/mod_noise/distort.cpp:223 src/modules/mod_noise/noise.cpp:275 +msgid "Turbulent" +msgstr "Turbulento" + +#: src/modules/mod_noise/main.cpp:66 +#: src/modules/mod_noise/valuenode_random.cpp:179 +msgid "Random" +msgstr "Aleatorio" + +#: src/modules/mod_noise/noise.cpp:56 +msgid "Noise Gradient" +msgstr "Gradiente Ruidoso" + +#: src/modules/mod_noise/noise.cpp:278 +msgid "Do Alpha" +msgstr "Hacer Transparencia" + +#: src/modules/mod_noise/noise.cpp:281 +msgid "Super Sampling" +msgstr "Super Muestreo" + +#: src/modules/mod_noise/valuenode_random.cpp:243 +#: src/synfig/valuenode_range.cpp:193 src/synfig/valuenode_reciprocal.cpp:124 +#: src/synfig/valuenode_reference.cpp:114 src/synfig/valuenode_scale.cpp:179 +#: src/synfig/valuenode_step.cpp:213 src/synfig/valuenode_timeloop.cpp:123 +msgid "Link" +msgstr "Enlace" + +#: src/modules/mod_noise/valuenode_random.cpp:245 +#: src/modules/mod_particle/plant.cpp:441 +msgid "Seed" +msgstr "Semilla" + +#: src/modules/mod_particle/plant.cpp:68 +msgid "Plant" +msgstr "Planta" + +#: src/modules/mod_particle/plant.cpp:395 +msgid "Gradient to be used for coloring the plant" +msgstr "Gradiente usado para colorear la planta" + +#: src/modules/mod_particle/plant.cpp:399 +msgid "Split Angle" +msgstr "Ángulo de división" + +#: src/modules/mod_particle/plant.cpp:400 +msgid "Angle by which each split deviates from its parent" +msgstr "Ángulo mediante el cual cada división se desvía de su predecesora" + +#: src/modules/mod_particle/plant.cpp:404 +msgid "Gravity" +msgstr "Gravedad" + +#: src/modules/mod_particle/plant.cpp:405 +msgid "Direction in which the shoots tend to face" +msgstr "Dirección hacia la cual las ramas tienden a apuntar" + +#: src/modules/mod_particle/plant.cpp:410 +msgid "Tangential Velocity" +msgstr "Velocidad Tangencial" + +#: src/modules/mod_particle/plant.cpp:411 +msgid "Amount to which shoots tend to grow along the tangent to the BLine" +msgstr "" +"Cantidad que tienden a crecer las ramas en la dirección tangente al la línea " +"Beizer" + +#: src/modules/mod_particle/plant.cpp:415 +msgid "Perpendicular Velocity" +msgstr "Velocidad Perpendicular" + +#: src/modules/mod_particle/plant.cpp:416 +msgid "Amount to which shoots tend to grow perpendicular to the tangent to the BLine" +msgstr "" +"Cantidad que tienden a crecer las ramas en la dirección perpendicular a la " +"tangente a la línea Beizer" + +#: src/modules/mod_particle/plant.cpp:420 +msgid "Stem Size" +msgstr "Tamaño del Tallo" + +#: src/modules/mod_particle/plant.cpp:421 +msgid "Size of the stem" +msgstr "Tamaño del Tallo" + +#: src/modules/mod_particle/plant.cpp:426 +msgid "Size As Alpha" +msgstr "Tamaño como Transparencia" + +#: src/modules/mod_particle/plant.cpp:427 +msgid "" +"If enabled, the alpha channel from the gradient is multiplied by the stem " +"size, and an alpha of 1.0 is used when rendering" +msgstr "" +"Si se habilita, el canal de transparencia del gradiente es multiplicado por " +"el tamaño de tallo y un valor de transparencia de 1,0 se usa al mostrar el " +"gradiente" + +#: src/modules/mod_particle/plant.cpp:431 +msgid "Reverse" +msgstr "Inversa" + +#: src/modules/mod_particle/plant.cpp:432 +msgid "If enabled, render the plant in the opposite direction" +msgstr "Si se habilita la planta se muestra en la dirección opuesta" + +#: src/modules/mod_particle/plant.cpp:436 src/synfig/valuenode.cpp:165 +#: src/synfig/valuenode_duplicate.cpp:123 src/synfig/valuenode_step.cpp:138 +msgid "Step" +msgstr "Paso" + +#: src/modules/mod_particle/plant.cpp:437 +msgid "Measure of the distance between points when rendering" +msgstr "Medida de la distancia entre puntos cuendo se hace la muestra" + +#: src/modules/mod_particle/plant.cpp:442 +msgid "Used to seed the pseudo-random number generator" +msgstr "Usado para alimentar el generador de números seudoaleatorios" + +#: src/modules/mod_particle/plant.cpp:446 +msgid "Splits" +msgstr "Divisiones" + +#: src/modules/mod_particle/plant.cpp:447 +msgid "Maximum number of times that each sprout can sprout recursively" +msgstr "Máximo número de veces que cada brote puede brotar recursivamente" + +#: src/modules/mod_particle/plant.cpp:451 +msgid "Sprouts" +msgstr "Brotes" + +#: src/modules/mod_particle/plant.cpp:452 +msgid "Number of places that growth occurs on each bline section" +msgstr "" +"Número de veces que aparece un brote en cada sección de segmento de línea " +"Beizer" + +#: src/modules/mod_particle/plant.cpp:456 +msgid "Random Factor" +msgstr "Factor de Aleatoriedad" + +#: src/modules/mod_particle/plant.cpp:457 +msgid "Used to scale down all random effects. Set to zero to disable randomness" +msgstr "" +"Usado para escalar todos los efectos aleatorios. Establecer a cero para " +"desactivar la aleatoriedad" + +#: src/modules/mod_particle/plant.cpp:461 +msgid "Drag" +msgstr "Arrastre" + +#: src/modules/mod_particle/plant.cpp:462 +msgid "Drag slows the growth" +msgstr "\"Arrastre\" enlentece el crecimiento" + +#: src/modules/mod_particle/plant.cpp:466 +msgid "Use Width" +msgstr "Usar Espesor" + +#: src/modules/mod_particle/plant.cpp:467 +msgid "Scale the velocity by the bline's width" +msgstr "Escala la velocidad mediante el espesor de línea beizer" + +#: src/modules/mod_ppm/mptr_ppm.cpp:86 +#, c-format +msgid "%s was not in PPM format" +msgstr "%s no estaba en formato PPM" + +#: src/synfig/distance.cpp:245 +msgid "Units" +msgstr "Unidades" + +#: src/synfig/distance.cpp:246 +msgid "Pixels" +msgstr "Pixels" + +#: src/synfig/distance.cpp:248 +msgid "Inches" +msgstr "Pulgadas" + +#: src/synfig/distance.cpp:249 +msgid "Meters" +msgstr "Metros" + +#: src/synfig/distance.cpp:250 +msgid "Millimeters" +msgstr "Milimetros" + +#: src/synfig/distance.cpp:251 +msgid "Centimeters" +msgstr "Centímetros" + +#: src/synfig/importer.cpp:89 +msgid "Importer::open(): Cannot open empty filename" +msgstr "Importer::open(): No puede Abrir un Archivo vacío" + +#: src/synfig/importer.cpp:103 +msgid "Importer::open(): Couldn't find extension" +msgstr "Importer::open(): No puede econtrar la extensión" + +#: src/synfig/importer.cpp:114 +msgid "Importer::open(): Unknown file type -- " +msgstr "Importer::open(): Tipo de archivo desconocido -- " + +#: src/synfig/layer.cpp:499 src/synfig/layer_composite.cpp:114 +msgid "Unable to create surface target" +msgstr "Imposible crear superficie objetivo" + +#: src/synfig/layer.cpp:537 +msgid "Z Depth" +msgstr "Profundidad Z" + +#: src/synfig/layer_bitmap.cpp:118 +msgid "Top-Left" +msgstr "Arriba-Izquierda" + +#: src/synfig/layer_bitmap.cpp:119 +msgid "Upper left-hand Corner of image" +msgstr "Esquina superior izquierda de la imagen" + +#: src/synfig/layer_bitmap.cpp:123 +msgid "Bottom-Right" +msgstr "Abajo-Derecha" + +#: src/synfig/layer_bitmap.cpp:124 +msgid "Lower right-hand Corner of image" +msgstr "Esquina inferior derecha de la imagen" + +#: src/synfig/layer_composite.cpp:145 src/synfig/paramdesc.cpp:62 +msgid "Blend Method" +msgstr "Metodo de Mezcla" + +#: src/synfig/layer_duplicate.cpp:56 src/synfig/valuenode.cpp:163 +#: src/synfig/valuenode_duplicate.cpp:206 +msgid "Duplicate" +msgstr "Duplicar" + +#: src/synfig/layer_duplicate.cpp:132 +msgid "Index" +msgstr "Índice" + +#: src/synfig/layer_duplicate.cpp:133 +msgid "Copy Index" +msgstr "Copiar Índice" + +#: src/synfig/layer_mime.cpp:86 +msgid "[MIME]" +msgstr "[MIME]" + +#: src/synfig/layer_motionblur.cpp:56 +msgid "Motion Blur" +msgstr "Desenfoque de Movimiento" + +#: src/synfig/layer_motionblur.cpp:122 +msgid "Aperture" +msgstr "Apertura" + +#: src/synfig/layer_motionblur.cpp:123 +msgid "Shutter Time" +msgstr "Tiempo de disparo" + +#: src/synfig/layer_pastecanvas.cpp:77 +msgid "Paste Canvas" +msgstr "Pegar Lienzo" + +#: src/synfig/layer_pastecanvas.cpp:114 +msgid "Pasted Canvas" +msgstr "Lienzo Pegado" + +#: src/synfig/layer_pastecanvas.cpp:115 +msgid "Inline Canvas" +msgstr "Lienzo en Línea" + +#: src/synfig/layer_pastecanvas.cpp:131 +msgid "Canvas" +msgstr "Lienzo" + +#: src/synfig/layer_pastecanvas.cpp:132 +msgid "Canvas to paste" +msgstr "Lienzo a pegar" + +#: src/synfig/layer_pastecanvas.cpp:136 +msgid "Size of canvas" +msgstr "Tamaño del Lienzo" + +#: src/synfig/layer_pastecanvas.cpp:144 +msgid "Children Lock" +msgstr "Bloquear Descendientes" + +#: src/synfig/layer_pastecanvas.cpp:154 +msgid "Current Time" +msgstr "Tiempo Actual" + +#: src/synfig/layer_polygon.cpp:59 +msgid "Polygon" +msgstr "Polígono" + +#: src/synfig/layer_polygon.cpp:171 +msgid "Vector List" +msgstr "Lista de Vectores" + +#: src/synfig/layer_shape.cpp:63 +msgid "Shape" +msgstr "Forma" + +#: src/synfig/layer_shape.cpp:64 +msgid "Internal" +msgstr "Interno" + +#: src/synfig/layer_shape.cpp:1193 +msgid "Layer_Shape Color" +msgstr "Color de la Capa de Forma" + +#: src/synfig/layer_shape.cpp:1202 +msgid "Antialiasing" +msgstr "Antialiasing" + +#: src/synfig/layer_shape.cpp:1209 +msgid "Type of Feather" +msgstr "Tipo de Desvanecimiento" + +#: src/synfig/layer_shape.cpp:1210 +msgid "Type of feathering to use" +msgstr "Tipo de desvanecimiento a usar" + +#: src/synfig/layer_shape.cpp:1219 +msgid "Winding Style" +msgstr "Estilo de Solape" + +#: src/synfig/layer_shape.cpp:1220 +msgid "Winding style to use" +msgstr "Estilo de solape a usar" + +#: src/synfig/layer_shape.cpp:1222 +msgid "Non Zero" +msgstr "No Cero" + +#: src/synfig/layer_shape.cpp:1223 +msgid "Even/Odd" +msgstr "Par/Impar" + +#: src/synfig/layer_solidcolor.cpp:55 +msgid "Solid Color" +msgstr "Color Sólido" + +#: src/synfig/listimporter.cpp:159 src/synfig/listimporter.cpp:160 +msgid "No images in list" +msgstr "Sin imágenes en la lista" + +#: src/synfig/loadcanvas.cpp:173 +#, c-format +msgid "Unexpected element <%s>, Expected <%s>" +msgstr "Elemento inesperado <%s>, Esperado <%s>" + +#: src/synfig/loadcanvas.cpp:179 +#, c-format +msgid "Unexpected element <%s>" +msgstr "Elemento inesperado <%s>" + +#: src/synfig/loadcanvas.cpp:190 +msgid "Too many warnings" +msgstr "Demasiados avisos" + +#: src/synfig/loadcanvas.cpp:220 +#, c-format +msgid "<%s> is missing \"%s\" attribute" +msgstr "<%s> no se encuentra atributo \"%s\"" + +#: src/synfig/loadcanvas.cpp:245 src/synfig/loadcanvas.cpp:264 +#: src/synfig/loadcanvas.cpp:283 src/synfig/loadcanvas.cpp:447 +#: src/synfig/loadcanvas.cpp:802 +#, c-format +msgid "<%s> should not contain anything" +msgstr "<%s> no debería contener nada" + +#: src/synfig/loadcanvas.cpp:249 src/synfig/loadcanvas.cpp:268 +#: src/synfig/loadcanvas.cpp:287 src/synfig/loadcanvas.cpp:451 +#: src/synfig/loadcanvas.cpp:806 +#, c-format +msgid "<%s> is missing \"value\" attribute" +msgstr "<%s>no se encuentra atributo \"value\"" + +#: src/synfig/loadcanvas.cpp:462 +#, c-format +msgid "Bad value \"%s\" in <%s>" +msgstr "Mal valor \"%s\" en <%s>" + +#: src/synfig/loadcanvas.cpp:486 +#, c-format +msgid "<%s> is missing \"pos\" attribute" +msgstr "<%s> no se encuentra atributo \"pos\"" + +#: src/synfig/loadcanvas.cpp:893 +#, c-format +msgid "Unable to create with type \"%s\"" +msgstr "Imposible crear con el tipo \"%s \"" + +#: src/synfig/loadcanvas.cpp:910 +msgid " is missing attribute \"time\"" +msgstr " ha perdido el atributo \"time\"" + +#: src/synfig/loadcanvas.cpp:923 +msgid "" +"Found \"use\" attribute for , but it wasn't empty. Ignoring " +"contents..." +msgstr "" +"Encontrado \"use\" atributo para , pero no estaba vacío. Ingorando " +"contenidos..." + +#: src/synfig/loadcanvas.cpp:939 src/synfig/loadcanvas.cpp:951 +#, c-format +msgid "<%s> is missing its data" +msgstr "<%s> esta perdiendo sus datos" + +#: src/synfig/loadcanvas.cpp:968 +msgid "Bad data for " +msgstr "Mal dato para " + +#: src/synfig/loadcanvas.cpp:983 +#, c-format +msgid "Unexpected element <%s> after data, ignoring..." +msgstr "Inesperado elemento <%s> después del dato , ingnorando..." + +#: src/synfig/loadcanvas.cpp:1025 src/synfig/loadcanvas.cpp:1042 +#, c-format +msgid "\"%s\" not a valid value for attribute \"%s\" in <%s>" +msgstr "\"%s\" no un valor válido para el atributo \"%s\" en <%s>" + +#: src/synfig/loadcanvas.cpp:1103 +#, c-format +msgid "Missing attribute \"type\" in <%s>" +msgstr "Perdido atributo \"type\" en <%s>" + +#: src/synfig/loadcanvas.cpp:1111 +#, c-format +msgid "Bad type in <%s>" +msgstr "Mal tipo en <%s>" + +#: src/synfig/loadcanvas.cpp:1120 +#, c-format +msgid "Error creating ValueNode <%s> with type '%s'. Refer to '%s'" +msgstr "Error creando el Valor de Nodo <%s> con el tipo '%s'. Refiere a '%s'" + +#: src/synfig/loadcanvas.cpp:1129 +#, c-format +msgid "<%s> did not accept type '%s'" +msgstr "<%s> no acepta este tipo '%s'" + +#: src/synfig/loadcanvas.cpp:1155 src/synfig/loadcanvas.cpp:1223 +#, c-format +msgid "'%s' was already defined in <%s>" +msgstr "'%s' fue ya definido en <%s>" + +#: src/synfig/loadcanvas.cpp:1165 +#, c-format +msgid "'%s' attribute in <%s> references unknown ID '%s'" +msgstr "Atributo '%s' en <%s> hace referencia a un ID desconocido '%s'" + +#: src/synfig/loadcanvas.cpp:1174 +#, c-format +msgid "Unable to set link '\"%s\" to ValueNode \"%s\" (link #%d in \"%s\")" +msgstr "Imposible enlazar \"%s\" al Valor de Nodo \"%s\" (enlace #%d en \"%s\")" + +#: src/synfig/loadcanvas.cpp:1198 +#, c-format +msgid "Unknown Exception thrown when referencing ValueNode \"%s\"" +msgstr "Lanzada excepción desconocida cuando se referencia al Valor de Nodo \"%s\"" + +#: src/synfig/loadcanvas.cpp:1238 +#, c-format +msgid "element <%s> is missing its contents" +msgstr "El elemento <%s> esta perdiendo su contenido" + +#: src/synfig/loadcanvas.cpp:1247 +#, c-format +msgid "Parse of '%s' failed" +msgstr "Interpretación de '%s' falló" + +#: src/synfig/loadcanvas.cpp:1254 +#, c-format +msgid "Unable to connect value node ('%s' of type '%s') to link %d (%s)" +msgstr "Imposible conectar el valor de nodo ('%s' de tipo '%s') para enlazar %d (%s)" + +#: src/synfig/loadcanvas.cpp:1272 +#, c-format +msgid "Unknown Exception thrown when working on element \"%s\"" +msgstr "Lanzada excepción desconocida al trabajar con el elemento \"%s\"" + +#: src/synfig/loadcanvas.cpp:1307 +#, c-format +msgid "<%s> is missing link %d (%s)" +msgstr "<%s>esta perdiendo el enlace %d (%s)" + +#: src/synfig/loadcanvas.cpp:1373 +msgid "Unable to create " +msgstr "Imposible crear " + +#: src/synfig/loadcanvas.cpp:1523 +msgid " is missing its contents or missing \"use\" element" +msgstr " esta perdiendo su contenido o perdiendo el elemento \"use\"" + +#: src/synfig/loadcanvas.cpp:1568 +#, c-format +msgid "Bad data in <%s>" +msgstr "Mal dato en <%s>" + +#: src/synfig/loadcanvas.cpp:1600 +#, c-format +msgid "Expected a ValueNode. Refer to '%s'" +msgstr "Esperado un Valor de Nodo. Refiere a '%s'" + +#: src/synfig/loadcanvas.cpp:1621 +#, c-format +msgid "Bad ID \"%s\"" +msgstr "Mal ID \"%s\"" + +#: src/synfig/loadcanvas.cpp:1626 +#, c-format +msgid "Duplicate ID \"%s\"" +msgstr "Duplicado ID \"%s\"" + +#: src/synfig/loadcanvas.cpp:1631 +#, c-format +msgid "Unknown Exception thrown when adding ValueNode \"%s\"" +msgstr "Lanzada excepción desconocida al añadir el Valor de Nodo \"%s\"" + +#: src/synfig/loadcanvas.cpp:1666 +msgid "Missing \"type\" attribute to \"layer\" element" +msgstr "Perdido atributo \"type\" al elemento \"layer\"" + +#: src/synfig/loadcanvas.cpp:1685 +msgid "Installed layer version is smaller than layer version in file" +msgstr "Versión de capa instalada es menor que la versión de capa en el fichero" + +#: src/synfig/loadcanvas.cpp:1705 +msgid " entry for is not yet supported. Ignoring..." +msgstr "Entrada para no está aún soportada. Ingorando..." + +#: src/synfig/loadcanvas.cpp:1708 +msgid " entry for is not yet supported. Ignoring..." +msgstr "Entrada para no está aún soportada. Ingorando..." + +#: src/synfig/loadcanvas.cpp:1716 +msgid "Missing \"name\" attribute for ." +msgstr "Pedido atributo \"name\" para " + +#: src/synfig/loadcanvas.cpp:1733 +msgid "" +"Found \"use\" attribute for , but it wasn't empty. Ignoring " +"contents..." +msgstr "" +"Encontrado atributo \"use\" para , pero no estaba vacío. Ingnorando " +"contenidos..." + +#: src/synfig/loadcanvas.cpp:1738 +msgid "Empty use=\"\" value in " +msgstr "Uso vacío=\"\" valor en " + +#: src/synfig/loadcanvas.cpp:1742 +msgid "Layer rejected canvas link" +msgstr "La capa rechazó el enlace al lienzo" + +#: src/synfig/loadcanvas.cpp:1760 +#, c-format +msgid "Unknown ID (%s) referenced in " +msgstr "Desconocido ID (%s) refernciado en " + +#: src/synfig/loadcanvas.cpp:1776 +msgid " is either missing its contents, or missing a \"use\" attribute." +msgstr " esta perdiendo su contenido o perdiendo un atributo \"use\"." + +#: src/synfig/loadcanvas.cpp:1788 src/synfig/loadcanvas.cpp:1808 +msgid "Bad data for " +msgstr "Mal dato para " + +#: src/synfig/loadcanvas.cpp:1796 +#, c-format +msgid "Layer '%s' rejected value for parameter '%s'" +msgstr "La capa '%s' rechazó el valor para el párametro '%s'" + +#: src/synfig/loadcanvas.cpp:1819 +#, c-format +msgid "Unexpected element <%s> after data, ignoring..." +msgstr "Inesperado elemento <%s> después del dato , ignorando..." + +#: src/synfig/loadcanvas.cpp:1974 +msgid "Inline canvas cannot have a section" +msgstr "Lienzo en línea no puede tener una sección " + +#: src/synfig/loadcanvas.cpp:1982 +msgid "Inline canvas cannot have keyframes" +msgstr "Lienzo en línea no puede tener fotogramas clave" + +#: src/synfig/loadcanvas.cpp:1994 +msgid "Inline canvases cannot have metadata" +msgstr "Lienzos en línea no pueden tener meta datos" + +#: src/synfig/loadcanvas.cpp:2002 +msgid " must have a name" +msgstr " debe tener un nombre" + +#: src/synfig/loadcanvas.cpp:2008 +msgid " must have content" +msgstr " debe tener conenido" + +#: src/synfig/loadcanvas.cpp:2020 +msgid "blank \"name\" entity" +msgstr "entidad \"name\" vacía" + +#: src/synfig/loadcanvas.cpp:2035 +msgid "blank \"desc\" entity" +msgstr "entidad \"desc\" vacía" + +#: src/synfig/loadcanvas.cpp:2050 +msgid "blank \"author\" entity" +msgstr "entidad \"author\" vacía" + +#: src/synfig/loadcanvas.cpp:2082 +#, c-format +msgid "Canvas '%s' has undefined %s: %s" +msgstr "Lienzo '%s' tiene sin definir '%s':'%s'" + +#: src/synfig/loadcanvas.cpp:2084 src/synfig/valuenode.cpp:351 +msgid "ValueNode" +msgstr "Valor de Nodo" + +#: src/synfig/loadcanvas.cpp:2084 +msgid "ValueNodes" +msgstr "Valores de Nodos" + +#: src/synfig/loadcanvas.cpp:2164 +msgid "" +msgstr "" + +#: src/synfig/main.cpp:103 +#, c-format +msgid "API Version mismatch (LIB:%d, PROG:%d)" +msgstr "Desajuste en la versión API (LIB:%d, PROG:%d)" + +#: src/synfig/main.cpp:108 +#, c-format +msgid "Size of Vector mismatch (app:%d, lib:%d)" +msgstr "Desajuste en el tamaño del Vector (app:%d, lib:%d)" + +#: src/synfig/main.cpp:113 +#, c-format +msgid "Size of Color mismatch (app:%d, lib:%d)" +msgstr "Desajuste en el tamaño del Color (app:%d, lib:%d)" + +#: src/synfig/main.cpp:118 +#, c-format +msgid "Size of Canvas mismatch (app:%d, lib:%d)" +msgstr "Desajuste en el tamaño del Lienzo (app:%d, lib:%d)" + +#: src/synfig/main.cpp:123 +#, c-format +msgid "Size of Layer mismatch (app:%d, lib:%d)" +msgstr "Desajuste en el tamaño de la Capa (app:%d, lib:%d)" + +#: src/synfig/main.cpp:213 +msgid "Starting Subsystem \"Modules\"" +msgstr "Comenzando Subsistema \"Modules\"" + +#: src/synfig/main.cpp:215 +msgid "Unable to initialize subsystem \"Module\"" +msgstr "Imposible comenzar el subsistema \"Module\"" + +#: src/synfig/main.cpp:217 +msgid "Starting Subsystem \"Layers\"" +msgstr "Comenzando subsistema \"Layers\"" + +#: src/synfig/main.cpp:221 +msgid "Unable to initialize subsystem \"Layers\"" +msgstr "Imposible comenzar el subsistema \"Layers\"" + +#: src/synfig/main.cpp:224 +msgid "Starting Subsystem \"Targets\"" +msgstr "Comenzando subsistema \"Targets\"" + +#: src/synfig/main.cpp:229 +msgid "Unable to initialize subsystem \"Targets\"" +msgstr "Imposible comenzar el subsistema \"Targets\"" + +#: src/synfig/main.cpp:232 +msgid "Starting Subsystem \"Importers\"" +msgstr "Comenzando subsistema \"Importers\"" + +#: src/synfig/main.cpp:238 +msgid "Unable to initialize subsystem \"Importers\"" +msgstr "Imposible comenzar el subsistema \"Importers\"" + +#: src/synfig/main.cpp:241 +msgid "Starting Subsystem \"ValueNodes\"" +msgstr "Comenzando subsistema \"ValueNodes\"" + +#: src/synfig/main.cpp:248 +msgid "Unable to initialize subsystem \"ValueNodes\"" +msgstr "Imposible comenzar el subsistema \"ValueNodes\"" + +#: src/synfig/main.cpp:307 +#, c-format +msgid "Loading modules from %s" +msgstr "Cargando módulos desde %s" + +#: src/synfig/main.cpp:320 src/tool/main.cpp:243 +msgid "DONE" +msgstr "HECHO" + +#: src/synfig/main.cpp:386 src/tool/main.cpp:123 src/tool/main.cpp:164 +msgid "error" +msgstr "error" + +#: src/synfig/main.cpp:401 src/tool/main.cpp:130 src/tool/main.cpp:171 +msgid "warning" +msgstr "precaución" + +#: src/synfig/main.cpp:416 +msgid "info" +msgstr "información" + +#: src/synfig/module.cpp:66 +msgid "Errors on lt_dlinit()" +msgstr "Errores en lt_dlinit()" + +#: src/synfig/module.cpp:122 +#, c-format +msgid "Attempting to register \"%s\"" +msgstr "Intentando registrar \"%s\"" + +#: src/synfig/module.cpp:129 +#, c-format +msgid "Unable to find module \"%s\" (%s)" +msgstr "Imposible encontrar módulo \"%s\" (%s)" + +#: src/synfig/module.cpp:133 +#, c-format +msgid "Found module \"%s\"" +msgstr "Encontrado módulo \"%s\"" + +#: src/synfig/module.cpp:167 +#, c-format +msgid "Unable to find entrypoint in module \"%s\" (%s)" +msgstr "Imposible encontrar punto de entrada en módulo \"%s\" (%s)" + +#: src/synfig/module.cpp:180 +msgid "Entrypoint did not return a module." +msgstr "Punto de entrada no devuelve un módulo." + +#: src/synfig/module.cpp:184 +#, c-format +msgid "Success for \"%s\"" +msgstr "Éxito para \"%s\"" + +#: src/synfig/palette.cpp:72 +msgid "Unnamed" +msgstr "Sin nombre" + +#: src/synfig/palette.cpp:89 +msgid "Surface Palette" +msgstr "Paleta Superficial" + +#: src/synfig/palette.cpp:284 +#, c-format +msgid "%0.2f%% Gray" +msgstr "%0.2f%% Gray" + +#: src/synfig/palette.cpp:299 +#, c-format +msgid "Unable to open %s for write" +msgstr "Imposible abrir %s para escribir" + +#: src/synfig/palette.cpp:321 +#, c-format +msgid "Unable to open %s for read" +msgstr "Imposible abrir %s para leer" + +#: src/synfig/palette.cpp:329 +#, c-format +msgid "%s does not appear to be a palette file" +msgstr "%s no parece ser un archivo de paleta" + +#: src/synfig/paramdesc.cpp:64 +msgid "_Composite" +msgstr "_Componer" + +#: src/synfig/paramdesc.cpp:65 +msgid "_Straight" +msgstr "_Directo" + +#: src/synfig/paramdesc.cpp:66 +msgid "_Onto" +msgstr "_Encima" + +#: src/synfig/paramdesc.cpp:67 +msgid "S_traight Onto" +msgstr "Direc_to Encima" + +#: src/synfig/paramdesc.cpp:68 +msgid "_Behind" +msgstr "_Debajo" + +#: src/synfig/paramdesc.cpp:69 +msgid "Sc_reen" +msgstr "_Pantalla" + +#: src/synfig/paramdesc.cpp:70 +msgid "Overla_y" +msgstr "_Solapar" + +#: src/synfig/paramdesc.cpp:71 +msgid "_Hard Light" +msgstr "Clarear _Fuerte" + +#: src/synfig/paramdesc.cpp:72 +msgid "_Multiply" +msgstr "_Multiplicar" + +#: src/synfig/paramdesc.cpp:73 +msgid "_Divide" +msgstr "Di_vidir" + +#: src/synfig/paramdesc.cpp:74 +msgid "_Add" +msgstr "S_umar" + +#: src/synfig/paramdesc.cpp:75 +msgid "S_ubtract" +msgstr "_Restar" + +#: src/synfig/paramdesc.cpp:76 +msgid "Di_fference" +msgstr "D_iferencia" + +#: src/synfig/paramdesc.cpp:77 +msgid "Bri_ghten" +msgstr "C_larear" + +#: src/synfig/paramdesc.cpp:78 +msgid "Dar_ken" +msgstr "_Oscurecer" + +#: src/synfig/paramdesc.cpp:79 +msgid "Co_lor" +msgstr "Colo_r" + +#: src/synfig/paramdesc.cpp:80 +msgid "Hu_e" +msgstr "_Tono" + +#: src/synfig/paramdesc.cpp:81 +msgid "Saturatio_n" +msgstr "Saturació_n" + +#: src/synfig/paramdesc.cpp:82 +msgid "Lum_inance" +msgstr "Lum_inancia" + +#: src/synfig/paramdesc.cpp:84 +msgid "Alpha O_ver" +msgstr "Tr_ansparentar" + +#: src/synfig/paramdesc.cpp:85 +msgid "Al_pha Brighten" +msgstr "_Clarear Transp." + +#: src/synfig/paramdesc.cpp:86 +msgid "Al_pha Darken" +msgstr "Osc_urecer Transp." + +#: src/synfig/render.cpp:247 src/synfig/render.cpp:248 +#: src/synfig/render.cpp:302 src/synfig/render.cpp:303 +#: src/synfig/render.cpp:423 src/synfig/render.cpp:424 +#: src/synfig/render.cpp:450 src/synfig/render.cpp:451 +msgid "Target panic" +msgstr "Pánico en Formato" + +#: src/synfig/savecanvas.cpp:254 +#, c-format +msgid "Unknown value(%s), cannot create XML representation!" +msgstr "Desconocido valor (%s), ¡no puedo crear una representación XML!" + +#: src/synfig/savecanvas.cpp:529 +#, c-format +msgid "Unknown ValueNode Type (%s), cannot create an XML representation" +msgstr "Desconocido Tipo de Valor de Nodo (%s), no puedo crear una representación XML" + +#: src/synfig/target_scanline.cpp:129 src/synfig/target_tile.cpp:312 +msgid "Target initialization failure" +msgstr "Fallo de inicialización de formato" + +#: src/synfig/target_scanline.cpp:245 src/synfig/target_scanline.cpp:291 +#: src/synfig/target_scanline.cpp:389 src/synfig/target_scanline.cpp:437 +#: src/synfig/target_tile.cpp:254 +msgid "Accelerated Renderer Failure" +msgstr "Fallo de Muestreo Acelerado" + +#: src/synfig/target_scanline.cpp:300 src/synfig/target_scanline.cpp:446 +msgid "Unable to put surface on target" +msgstr "Imposible poner superficie en el objetivo" + +#: src/synfig/target_scanline.cpp:459 src/synfig/target_tile.cpp:435 +msgid "Caught string :" +msgstr "Cadena cogida :" + +#: src/synfig/target_scanline.cpp:464 src/synfig/target_tile.cpp:440 +msgid "Ran out of memory (Probably a bug)" +msgstr "Sin memoria (Probablemente un bug)" + +#: src/synfig/target_scanline.cpp:469 src/synfig/target_tile.cpp:445 +msgid "Caught unknown error, rethrowing..." +msgstr "Cogido error desconocido, relanzando..." + +#: src/synfig/target_tile.cpp:141 +msgid "Bad Tile Size" +msgstr "Mal tamaño de enlosado" + +#: src/synfig/target_tile.cpp:191 +msgid "Parametric Renderer Failure" +msgstr "Fallo de Muestreo Paramétrico" + +#: src/synfig/target_tile.cpp:198 src/synfig/target_tile.cpp:262 +msgid "Bad surface" +msgstr "Mala superficie" + +#: src/synfig/target_tile.cpp:208 src/synfig/target_tile.cpp:274 +msgid "add_tile():Unable to put surface on target" +msgstr "add_tile():Imposible poner la superficie en el objetivo" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:234 src/synfig/value.cpp:289 +msgid "bool" +msgstr "Booleano" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:236 src/synfig/value.cpp:287 +msgid "integer" +msgstr "Entero" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:238 +msgid "angle" +msgstr "Ángulo" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:240 src/synfig/value.cpp:281 +msgid "time" +msgstr "Tiempo" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:242 src/synfig/value.cpp:284 +msgid "real" +msgstr "Real" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:244 +msgid "vector" +msgstr "Vector" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:246 +msgid "color" +msgstr "Color" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:248 +msgid "segment" +msgstr "Segmento" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:250 +msgid "bline_point" +msgstr "Punto de línea Beizer" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:252 +msgid "list" +msgstr "Lista" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:254 +msgid "canvas" +msgstr "Lienzo" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:256 +msgid "string" +msgstr "Cadena" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:258 +msgid "gradient" +msgstr "Gradiente" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:260 +msgid "nil" +msgstr "nulo" + +#: src/synfig/valuenode.cpp:135 src/synfig/valuenode_composite.cpp:431 +msgid "Composite" +msgstr "Componer" + +#: src/synfig/valuenode.cpp:136 src/synfig/valuenode_radialcomposite.cpp:303 +msgid "Radial Composite" +msgstr "Composición Radial" + +#: src/synfig/valuenode.cpp:137 src/synfig/valuenode_reference.cpp:156 +msgid "Reference" +msgstr "Referencia" + +#: src/synfig/valuenode.cpp:138 src/synfig/valuenode_blinecalctangent.cpp:244 +#: src/synfig/valuenode_blinecalcwidth.cpp:208 +#: src/synfig/valuenode_exp.cpp:157 src/synfig/valuenode_scale.cpp:217 +msgid "Scale" +msgstr "Escala" + +#: src/synfig/valuenode.cpp:139 src/synfig/valuenode_segcalctangent.cpp:100 +msgid "Segment Tangent" +msgstr "Tangente de Segmento" + +#: src/synfig/valuenode.cpp:140 src/synfig/valuenode_segcalcvertex.cpp:98 +msgid "Segment Vertex" +msgstr "Vértice de Segmento" + +#: src/synfig/valuenode.cpp:141 src/synfig/valuenode_stripes.cpp:78 +#: src/synfig/valuenode_stripes.cpp:225 +msgid "Stripes" +msgstr "Bandas" + +#: src/synfig/valuenode.cpp:142 src/synfig/valuenode_subtract.cpp:233 +msgid "Subtract" +msgstr "Restar" + +#: src/synfig/valuenode.cpp:143 src/synfig/valuenode_twotone.cpp:179 +msgid "Two-Tone" +msgstr "Dos Tonos" + +#: src/synfig/valuenode.cpp:144 src/synfig/valuenode_bline.cpp:850 +#: src/synfig/valuenode_blinecalctangent.cpp:240 +#: src/synfig/valuenode_blinecalcvertex.cpp:199 +#: src/synfig/valuenode_blinecalcwidth.cpp:205 +msgid "BLine" +msgstr "Línea Beizer" + +#: src/synfig/valuenode.cpp:145 src/synfig/valuenode_dynamiclist.cpp:713 +msgid "Dynamic List" +msgstr "Lista Dinámica" + +#: src/synfig/valuenode.cpp:146 src/synfig/valuenode_gradientrotate.cpp:76 +#: src/synfig/valuenode_gradientrotate.cpp:188 +msgid "Gradient Rotate" +msgstr "Rotar Gradiente" + +#: src/synfig/valuenode.cpp:147 src/synfig/valuenode_sine.cpp:106 +msgid "Sine" +msgstr "Seno" + +#: src/synfig/valuenode.cpp:149 src/synfig/valuenode_timedswap.cpp:264 +msgid "Timed Swap" +msgstr "Intercambio Temporizado" + +#: src/synfig/valuenode.cpp:150 src/synfig/valuenode_repeat_gradient.cpp:81 +#: src/synfig/valuenode_repeat_gradient.cpp:234 +msgid "Repeat Gradient" +msgstr "Repetir Gradiente" + +#: src/synfig/valuenode.cpp:151 src/synfig/valuenode_exp.cpp:102 +msgid "Exponential" +msgstr "Exponencial" + +#: src/synfig/valuenode.cpp:152 src/synfig/valuenode_add.cpp:227 +msgid "Add" +msgstr "Sumar" + +#: src/synfig/valuenode.cpp:153 src/synfig/valuenode_blinecalctangent.cpp:172 +msgid "BLine Tangent" +msgstr "Tangente de Linea Beizer" + +#: src/synfig/valuenode.cpp:154 src/synfig/valuenode_blinecalcvertex.cpp:140 +msgid "BLine Vertex" +msgstr "Vértice de Línea Beizer" + +#: src/synfig/valuenode.cpp:155 src/synfig/valuenode_range.cpp:230 +msgid "Range" +msgstr "Rango" + +#: src/synfig/valuenode.cpp:157 src/synfig/valuenode_switch.cpp:170 +msgid "Switch" +msgstr "Interruptor" + +#: src/synfig/valuenode.cpp:158 src/synfig/valuenode_cos.cpp:106 +msgid "Cos" +msgstr "Coseno" + +#: src/synfig/valuenode.cpp:159 +msgid "aTan2" +msgstr "aTan2" + +#: src/synfig/valuenode.cpp:160 +msgid "Reverse Tangent" +msgstr "Revertir Tangente" + +#: src/synfig/valuenode.cpp:162 src/synfig/valuenode_reciprocal.cpp:179 +msgid "Reciprocal" +msgstr "Recíproco" + +#: src/synfig/valuenode.cpp:164 src/synfig/valuenode_integer.cpp:183 +msgid "From Integer" +msgstr "Desde Entero" + +#: src/synfig/valuenode.cpp:166 src/synfig/valuenode_blinecalcwidth.cpp:143 +msgid "BLine Width" +msgstr "Ancho del Contorno" + +#: src/synfig/valuenode.cpp:168 +msgid "Vector Angle" +msgstr "Ángulo de Vector" + +#: src/synfig/valuenode.cpp:169 +msgid "Vector Length" +msgstr "Longitud de Vector" + +#: src/synfig/valuenode.cpp:170 +msgid "Vector X" +msgstr "X de Vector" + +#: src/synfig/valuenode.cpp:171 +msgid "Vector Y" +msgstr "Y de Vector" + +#: src/synfig/valuenode.cpp:172 +msgid "Gradient Color" +msgstr "Color de Gradiente" + +#: src/synfig/valuenode.cpp:173 +msgid "Dot Product" +msgstr "Producto Escalar" + +#: src/synfig/valuenode.cpp:174 src/synfig/valuenode_timestring.cpp:115 +msgid "Time String" +msgstr "Cadena de Tiempo" + +#: src/synfig/valuenode.cpp:175 src/synfig/valuenode_realstring.cpp:121 +msgid "Real String" +msgstr "Cadena de Real" + +#: src/synfig/valuenode.cpp:176 src/synfig/valuenode_join.cpp:140 +msgid "Joined List" +msgstr "Lista Unida" + +#: src/synfig/valuenode.cpp:177 +msgid "Angle String" +msgstr "Cadena de Ángulo" + +#: src/synfig/valuenode.cpp:178 +msgid "Int String" +msgstr "Cadena de Entero" + +#: src/synfig/valuenode.cpp:179 +msgid "Logarithm" +msgstr "Logaritmo" + +#: src/synfig/valuenode.cpp:246 +#, c-format +msgid "Bad type: ValueNode '%s' doesn't accept type '%s'" +msgstr "Mal tipo: Valor de Nodo %s no acepta el tipo %s" + +#: src/synfig/valuenode.cpp:511 +msgid "Placeholder" +msgstr "Casilla" + +#: src/synfig/valuenode.h:74 +#, c-format +msgid "%s:%d wrong type for %s: need %s but got %s" +msgstr "%s:%d mal tipo para %s: necesito %s pero obtengo %s" + +#: src/synfig/valuenode_add.cpp:98 src/synfig/valuenode_gradientrotate.cpp:76 +#: src/synfig/valuenode_integer.cpp:78 src/synfig/valuenode_integer.cpp:170 +#: src/synfig/valuenode_range.cpp:86 +#: src/synfig/valuenode_repeat_gradient.cpp:81 +#: src/synfig/valuenode_scale.cpp:87 src/synfig/valuenode_stripes.cpp:78 +#: src/synfig/valuenode_subtract.cpp:98 +msgid ":Bad type " +msgstr "Mal tipo " + +#: src/synfig/valuenode_add.cpp:123 src/synfig/valuenode_scale.cpp:116 +#: src/synfig/valuenode_subtract.cpp:129 +msgid "One or both of my parameters aren't set!" +msgstr "Uno o ámbos de mis parámetros no esán establecidos!" + +#: src/synfig/valuenode_add.cpp:188 src/synfig/valuenode_subtract.cpp:194 +msgid "LHS" +msgstr "LHS" + +#: src/synfig/valuenode_add.cpp:189 src/synfig/valuenode_subtract.cpp:195 +msgid "RHS" +msgstr "RHS" + +#: src/synfig/valuenode_add.cpp:190 src/synfig/valuenode_scale.cpp:181 +#: src/synfig/valuenode_subtract.cpp:196 +msgid "Scalar" +msgstr "Escalar" + +#: src/synfig/valuenode_animated.cpp:261 src/synfig/valuenode_animated.cpp:285 +#: src/synfig/valuenode_animated.cpp:561 src/synfig/valuenode_animated.cpp:579 +#: src/synfig/valuenode_animated.cpp:659 src/synfig/valuenode_animated.cpp:678 +msgid "A waypoint already exists at this point in time" +msgstr "Un punto de interpolación existe actualmente en este punto de tiempo" + +#: src/synfig/valuenode_animated.cpp:1056 +#, c-format +msgid "%s: You cannot use a %s in an animated ValueNode" +msgstr "%s: No puede usar %s en un Valor de Nodo animado" + +#: src/synfig/valuenode_animated.cpp:1091 +msgid "Animated" +msgstr "Animado" + +#: src/synfig/valuenode_bline.cpp:797 src/synfig/valuenode_dynamiclist.cpp:619 +msgid "No entries in list" +msgstr "Sin entradas en la lista" + +#: src/synfig/valuenode_bline.cpp:800 src/synfig/valuenode_dynamiclist.cpp:622 +msgid "No entries in ret_list" +msgstr "Sin entradas en ret_list" + +#: src/synfig/valuenode_bline.cpp:809 +#, c-format +msgid "Vertex %03d" +msgstr "Vértice %03d" + +#: src/synfig/valuenode_blinecalctangent.cpp:243 +#: src/synfig/valuenode_gradientrotate.cpp:148 +#: src/synfig/valuenode_linear.cpp:215 +msgid "Offset" +msgstr "Desplazamiento" + +#: src/synfig/valuenode_blinecalctangent.cpp:245 +msgid "Fixed Length" +msgstr "Longitud Fija" + +#: src/synfig/valuenode_composite.cpp:161 +#: src/synfig/valuenode_composite.cpp:181 +msgid "Bad type for composite" +msgstr "Mal tipo para componer" + +#: src/synfig/valuenode_composite.cpp:267 +msgid "Red" +msgstr "Rojo" + +#: src/synfig/valuenode_composite.cpp:269 +msgid "Green" +msgstr "Verde" + +#: src/synfig/valuenode_composite.cpp:271 +msgid "Blue" +msgstr "Azul" + +#: src/synfig/valuenode_composite.cpp:273 +#: src/synfig/valuenode_radialcomposite.cpp:210 +msgid "Alpha" +msgstr "Alfa" + +#: src/synfig/valuenode_composite.cpp:277 +msgid "Vertex 1" +msgstr "Vértice 1" + +#: src/synfig/valuenode_composite.cpp:279 +#: src/synfig/valuenode_composite.cpp:295 +msgid "Tangent 1" +msgstr "Tangente 1" + +#: src/synfig/valuenode_composite.cpp:281 +msgid "Vertex 2" +msgstr "Vértice 2" + +#: src/synfig/valuenode_composite.cpp:283 +#: src/synfig/valuenode_composite.cpp:297 +msgid "Tangent 2" +msgstr "Tangente 2" + +#: src/synfig/valuenode_composite.cpp:287 +msgid "Vertex" +msgstr "Vértice" + +#: src/synfig/valuenode_composite.cpp:293 +msgid "Split Tangents" +msgstr "Separar Tangentes" + +#: src/synfig/valuenode_composite.cpp:304 +#: src/synfig/valuenode_radialcomposite.cpp:221 +#, c-format +msgid "C%d" +msgstr "C%d" + +#: src/synfig/valuenode_const.cpp:126 +msgid "Constant" +msgstr "Constante" + +#: src/synfig/valuenode_cos.cpp:167 src/synfig/valuenode_sine.cpp:167 +msgid "Amplitude" +msgstr "Amplitud" + +#: src/synfig/valuenode_duplicate.cpp:121 +msgid "From" +msgstr "Desde" + +#: src/synfig/valuenode_duplicate.cpp:122 +msgid "To" +msgstr "Hasta" + +#: src/synfig/valuenode_dynamiclist.cpp:613 +msgid "List type/item type mismatch, throwing away mismatch" +msgstr "" +"Typo de lista/Tipo de elemento mal emparejado, lanzando lejos el " +"desemparejamiento " + +#: src/synfig/valuenode_dynamiclist.cpp:661 +#, c-format +msgid "Item %03d" +msgstr "Elemento %03d" + +#: src/synfig/valuenode_exp.cpp:155 +msgid "Exponent" +msgstr "Exponente" + +#: src/synfig/valuenode_integer.cpp:132 +msgid "Integer" +msgstr "Entero" + +#: src/synfig/valuenode_join.cpp:202 +msgid "Strings" +msgstr "Cadenas" + +#: src/synfig/valuenode_join.cpp:203 src/synfig/valuenode_timedswap.cpp:221 +msgid "Before" +msgstr "Antes" + +#: src/synfig/valuenode_join.cpp:204 +msgid "Separator" +msgstr "Separador" + +#: src/synfig/valuenode_join.cpp:205 src/synfig/valuenode_timedswap.cpp:222 +msgid "After" +msgstr "Después" + +#: src/synfig/valuenode_linear.cpp:209 +msgid "Rate" +msgstr "Ratio" + +#: src/synfig/valuenode_linear.cpp:212 +msgid "Slope" +msgstr "Pendiente" + +#: src/synfig/valuenode_radialcomposite.cpp:121 +#: src/synfig/valuenode_radialcomposite.cpp:137 +msgid "Bad type for radialcomposite" +msgstr "Mal tipo para composición radial" + +#: src/synfig/valuenode_radialcomposite.cpp:199 +msgid "Theta" +msgstr "Theta" + +#: src/synfig/valuenode_radialcomposite.cpp:204 +msgid "Luma" +msgstr "Luma" + +#: src/synfig/valuenode_radialcomposite.cpp:206 +msgid "Saturation" +msgstr "Saturación" + +#: src/synfig/valuenode_radialcomposite.cpp:208 +msgid "Hue" +msgstr "Tono" + +#: src/synfig/valuenode_range.cpp:118 +msgid "Some of my parameters aren't set!" +msgstr "¡Algunos de mis parámetros no han sido establecidos!" + +#: src/synfig/valuenode_range.cpp:191 +msgid "Min" +msgstr "Min" + +#: src/synfig/valuenode_range.cpp:192 +msgid "Max" +msgstr "Max" + +#: src/synfig/valuenode_realstring.cpp:183 +msgid "Real" +msgstr "Real" + +#: src/synfig/valuenode_realstring.cpp:185 +msgid "Precision" +msgstr "Precisión" + +#: src/synfig/valuenode_realstring.cpp:186 +msgid "Zero Padded" +msgstr "Relleno con Ceros" + +#: src/synfig/valuenode_reciprocal.cpp:125 +msgid "Epsilon" +msgstr "Epsilon" + +#: src/synfig/valuenode_reciprocal.cpp:126 +msgid "Infinite" +msgstr "Infinito" + +#: src/synfig/valuenode_repeat_gradient.cpp:184 +msgid "Count" +msgstr "Contador" + +#: src/synfig/valuenode_repeat_gradient.cpp:186 +msgid "Specify Start" +msgstr "Especificar Comienzo" + +#: src/synfig/valuenode_repeat_gradient.cpp:187 +msgid "Specify End" +msgstr "Especificar Fin" + +#: src/synfig/valuenode_repeat_gradient.cpp:188 +msgid "Start Color" +msgstr "Color de Comienzo" + +#: src/synfig/valuenode_repeat_gradient.cpp:189 +msgid "End Color" +msgstr "Color de Fin" + +#: src/synfig/valuenode_segcalctangent.cpp:159 +#: src/synfig/valuenode_segcalcvertex.cpp:157 +msgid "Segment" +msgstr "Segmento" + +#: src/synfig/valuenode_step.cpp:215 src/tool/main.cpp:945 +msgid "Start Time" +msgstr "Tiempo de Inicio" + +#: src/synfig/valuenode_step.cpp:216 +msgid "Intersection" +msgstr "Intersección" + +#: src/synfig/valuenode_stripes.cpp:170 +msgid "Color 1" +msgstr "Color 1" + +#: src/synfig/valuenode_stripes.cpp:172 +msgid "Color 2" +msgstr "Color 2" + +#: src/synfig/valuenode_stripes.cpp:174 +msgid "Stripe Count" +msgstr "Contador de Bandas" + +#: src/synfig/valuenode_timedswap.cpp:223 +msgid "Swap Time" +msgstr "Tiempo de Intercambio" + +#: src/synfig/valuenode_timedswap.cpp:224 +msgid "Swap Duration" +msgstr "Duración del Intercambio" + +#: src/synfig/valuenode_timestring.cpp:168 +msgid "Time" +msgstr "Tiempo" + +#: src/synfig/valuenode_twotone.cpp:136 +msgid "Color1" +msgstr "Color1" + +#: src/synfig/valuenode_twotone.cpp:138 +msgid "Color2" +msgstr "Color2" + +#: src/tool/main.cpp:216 +msgid "Line" +msgstr "Línea" + +#: src/tool/main.cpp:216 +msgid " of " +msgstr " de " + +#: src/tool/main.cpp:322 +msgid "syntax: " +msgstr "sintaxis: " + +#: src/tool/main.cpp:325 +msgid "Print out usage and syntax info" +msgstr "Imprimir información de uso y sintaxis" + +#: src/tool/main.cpp:328 +msgid "Specify output target (Default:unknown)" +msgstr "Especificar formato de salida (Por defecto desconocido)" + +#: src/tool/main.cpp:329 +msgid "Set the image width (Use zero for file default)" +msgstr "Establecer el ancho de la imagen (Usar cero para el de defecto del fichero)" + +#: src/tool/main.cpp:330 +msgid "Set the image height (Use zero for file default)" +msgstr "Establecer el alto de la imagen (Usar cero para el de defecto del fichero)" + +#: src/tool/main.cpp:331 +msgid "Set the diagonal size of image window (Span)" +msgstr "Establecer el tamaño de la diagonal del a ventana de la imagen (Span)" + +#: src/tool/main.cpp:332 +msgid "Set antialias amount for parametric renderer." +msgstr "Establecer el valor de antialias para el muestreo paramétrico" + +#: src/tool/main.cpp:333 +#, c-format +msgid "Specify image quality for accelerated renderer (default=%d)" +msgstr "" +"Especificar la calidad de la imagen para el muestreo acelerado (por defecto=%" +"d)" + +#: src/tool/main.cpp:334 +msgid "Gamma (default=2.2)" +msgstr "Gamma (por defecto = 2.2)" + +#: src/tool/main.cpp:335 +msgid "Verbose Output (add more for more verbosity)" +msgstr "Salida detallada (añadir 'more' para más detalles)" + +#: src/tool/main.cpp:336 +msgid "Quiet mode (No progress/time-remaining display)" +msgstr "Modo silencioso (sin mostrar el progreso/tiempo restante)" + +#: src/tool/main.cpp:337 +msgid "Render the canvas with the given id instead of the root." +msgstr "Mostrar el lienzo con el ID dado en lugar del raíz." + +#: src/tool/main.cpp:338 +msgid "Specify output filename" +msgstr "Especificar nombre del fichero de salida" + +#: src/tool/main.cpp:339 +msgid "Enable multithreaded renderer using specified # of threads" +msgstr "Habilitar muestreo multihilo usando un número de hilos especificado." + +#: src/tool/main.cpp:340 +msgid "Print Benchmarks" +msgstr "Imprimir Records" + +#: src/tool/main.cpp:341 +msgid "Set the frame rate" +msgstr "Establecer el ratio de fotogramas" + +#: src/tool/main.cpp:342 +msgid "Render a single frame at " +msgstr "Mostrar un solo fotograma en " + +#: src/tool/main.cpp:343 src/tool/main.cpp:344 +msgid "Set the starting time" +msgstr "Establecer el tiempo de comienzo" + +#: src/tool/main.cpp:345 +msgid "Set the ending time" +msgstr "Establecer el tiempo de finalización" + +#: src/tool/main.cpp:346 +msgid "Set the physical resolution (dots-per-inch)" +msgstr "Establecer la resolución física (puntos por pulgada)" + +#: src/tool/main.cpp:347 +msgid "Set the physical X resolution (dots-per-inch)" +msgstr "Establecer la resolución física en X (puntos por pulgada)" + +#: src/tool/main.cpp:348 +msgid "Set the physical Y resolution (dots-per-inch)" +msgstr "Establecer la resolución física en Y (puntos por pulgada)" + +#: src/tool/main.cpp:350 +msgid "List the exported canvases in the composition" +msgstr "Lista los lienzos exportados en la composición" + +#: src/tool/main.cpp:351 +msgid "Print out specified details of the root canvas" +msgstr "Imprime detalles específicos del lienzo raíz" + +#: src/tool/main.cpp:352 +msgid "Append layers in to composition" +msgstr "Añade las capas en a la composición" + +#: src/tool/main.cpp:354 +msgid "Print out layer's description, parameter info, etc." +msgstr "Imprimir la descripión de la capa, información del parámetro, etc." + +#: src/tool/main.cpp:355 +msgid "Print out the list of available layers" +msgstr "Imprimir la lista de capas disponibles" + +#: src/tool/main.cpp:356 +msgid "Print out the list of available targets" +msgstr "Imprimir la lista de formatos disponibles" + +#: src/tool/main.cpp:357 +msgid "Print out the list of available importers" +msgstr "Imprimir la lista de importadores disponibles" + +#: src/tool/main.cpp:358 +msgid "Print out the list of available ValueNodes" +msgstr "Imprimis la lista de Valores de Nodo disponibles" + +#: src/tool/main.cpp:359 +msgid "Print out the list of loaded modules" +msgstr "Imprimir la lista de módulos cargados" + +#: src/tool/main.cpp:360 +msgid "Print out version information" +msgstr "Imprimir información de la versión" + +#: src/tool/main.cpp:361 +msgid "Print out misc build information" +msgstr "Imprimir información de construcción miscelánea" + +#: src/tool/main.cpp:362 +msgid "Print out license information" +msgstr "Imprimir información de la licencia" + +#: src/tool/main.cpp:365 +msgid "Test GUID generation" +msgstr "Probar la generación del GUID" + +#: src/tool/main.cpp:366 +msgid "Test signal implementation" +msgstr "Probar la implementación de la señal" + +#: src/tool/main.cpp:616 +#, c-format +msgid "Antialiasing set to %d, (%d samples per pixel)" +msgstr "Establecer el antialias a %d, (%d muestreos por pixel)" + +#: src/tool/main.cpp:624 +#, c-format +msgid "Span set to %d units" +msgstr "Establecer la envergadura a %d unidades" + +#: src/tool/main.cpp:634 +#, c-format +msgid "Frame rate set to %d frames per second" +msgstr "Establecer el ratio de fotogramas a %d fotogramas por segundo" + +#: src/tool/main.cpp:644 +#, c-format +msgid "Physical resolution set to %f dpi" +msgstr "Establecer resolución física a %f dpi" + +#: src/tool/main.cpp:654 +#, c-format +msgid "Physical X resolution set to %f dpi" +msgstr "Establecer resolución X física a %f dpi" + +#: src/tool/main.cpp:664 +#, c-format +msgid "Physical Y resolution set to %f dpi" +msgstr "Establecer resolución Y física a %f dpi" + +#: src/tool/main.cpp:685 +msgid "Rendering frame at " +msgstr "Muestreando fotograma en " + +#: src/tool/main.cpp:707 +#, c-format +msgid "Resolution set to %dx%d" +msgstr "Establecida resolución a %dx%d" + +#: src/tool/main.cpp:724 +#, c-format +msgid "Quality set to %d" +msgstr "Establecida calidad a %d" + +#: src/tool/main.cpp:744 +#, c-format +msgid "Threads set to %d" +msgstr "Establecido número de hilos a %d" + +#: src/tool/main.cpp:914 +msgid "Unrecognised canvas variable: " +msgstr "Variable de lienzo desconocida" + +#: src/tool/main.cpp:915 +msgid "Recognized variables are:" +msgstr "Las variables reconocidas son:" + +#: src/tool/main.cpp:951 +msgid "End Time" +msgstr "Tiempo del Fin" + +#: src/tool/main.cpp:957 +msgid "Frame Rate" +msgstr "Frecuencia de Fotogramas" + +#: src/tool/main.cpp:963 +msgid "Start Frame" +msgstr "Fotograma de Inicio" + +#: src/tool/main.cpp:969 +msgid "End Frame" +msgstr "Fotograma de Fin" + +#: src/tool/main.cpp:990 +msgid "Image Aspect Ratio" +msgstr "Relación de Aspecto de la Imagen" + +#: src/tool/main.cpp:999 +msgid "Pixel Width" +msgstr "Ancho del Pixel" + +#: src/tool/main.cpp:1005 +msgid "Pixel Height" +msgstr "Alto del Pixel" + +#: src/tool/main.cpp:1011 +msgid "Pixel Aspect Ratio" +msgstr "Relación de Aspecto del Pixel" + +#: src/tool/main.cpp:1020 +msgid "Top Left" +msgstr "Arriba Izquierda" + +#: src/tool/main.cpp:1027 +msgid "Bottom Right" +msgstr "Abajo Derecha" + +#: src/tool/main.cpp:1034 +msgid "Physical Width" +msgstr "Ancho Físico" + +#: src/tool/main.cpp:1040 +msgid "Physical Height" +msgstr "Alto Físico" + +#: src/tool/main.cpp:1046 +msgid "X Resolution" +msgstr "Resolución en X" + +#: src/tool/main.cpp:1052 +msgid "Y Resolution" +msgstr "Resolución en Y" + +#: src/tool/main.cpp:1058 +msgid "Diagonal Image Span" +msgstr "Expansión de la diagonal de la Imagen" + +#: src/tool/main.cpp:1067 +msgid "Interlaced" +msgstr "Enterlazado" + +#: src/tool/main.cpp:1073 +msgid "Antialias" +msgstr "Antialias" + +#: src/tool/main.cpp:1085 +msgid "Flags" +msgstr "Banderas" + +#: src/tool/main.cpp:1091 +msgid "Focus" +msgstr "Foco" + +#: src/tool/main.cpp:1098 +msgid "Background Color" +msgstr "Color de Fondo" + +#: src/tool/main.cpp:1108 +msgid "Metadata" +msgstr "Metadatos" + +#: src/tool/main.cpp:1136 +msgid "FATAL: Synfig Version Mismatch" +msgstr "FATAL: Version de Synfig no concordante" + +#: src/tool/main.cpp:1152 +msgid "verbosity set to " +msgstr "Establecido información detallada a " + +#: src/tool/main.cpp:1182 src/tool/main.cpp:1206 src/tool/main.cpp:1214 +#: src/tool/main.cpp:1315 src/tool/main.cpp:1341 +msgid "Throwing out job..." +msgstr "Lanzando trabajo..." + +#: src/tool/main.cpp:1205 +msgid "Unable to find canvas with ID \"" +msgstr "Imposible encontrar lienzo con ID \"" + +#: src/tool/main.cpp:1205 src/tool/main.cpp:1213 +msgid "\" in " +msgstr "\" en " + +#: src/tool/main.cpp:1213 +msgid "Invalid canvas name \"" +msgstr "Nombre de lienzo no válido\"" + +#: src/tool/main.cpp:1227 +msgid "Quality set to " +msgstr "Establecida calidad a " + +#: src/tool/main.cpp:1247 +msgid "Appended contents of " +msgstr "Añadido contenido de " + +#: src/tool/main.cpp:1251 +msgid "Attempting to determine target/outfile..." +msgstr "Intentando derterminar formato/fichero de salida..." + +#: src/tool/main.cpp:1257 +msgid "Target name undefined, attempting to figure it out" +msgstr "Nombre de formato de salida sin definir, intentando imaginarlo" + +#: src/tool/main.cpp:1286 +msgid "Defaulting to PNG target..." +msgstr "Por defecto a formato PNG..." + +#: src/tool/main.cpp:1305 +msgid "Creating the target..." +msgstr "Creando el formato..." + +#: src/tool/main.cpp:1314 +msgid "Unknown target for " +msgstr "Formato desconocido para " + +#: src/tool/main.cpp:1325 +msgid "Setting the canvas on the target..." +msgstr "Estableciendo el lienzo para el formato..." + +#: src/tool/main.cpp:1327 +msgid "Setting the quality of the target..." +msgstr "Estableciendo la calidad para el formato..." + +#: src/tool/main.cpp:1337 +msgid "Unidentified arguments for " +msgstr "Argumentos no identificados para " + +#: src/tool/main.cpp:1350 +msgid "Unidentified arguments:" +msgstr "Argumentos no identificados:" + +#: src/tool/main.cpp:1359 +msgid "Nothing to do!" +msgstr "¡Nada para hacer!" + +#: src/tool/main.cpp:1402 +msgid "Rendering..." +msgstr "Muestreando..." + +#: src/tool/main.cpp:1418 +msgid "Done." +msgstr "Hecho." + diff --git a/synfig-core/po/fr.po b/synfig-core/po/fr.po new file mode 100644 index 0000000..516a8a3 --- /dev/null +++ b/synfig-core/po/fr.po @@ -0,0 +1,3152 @@ +# translation of fr.po to +# French translations for Synfig Core package +# Traductions françaises du paquet Synfig Core. +# Copyright (C) 2007 Synfig Contributors +# This file is distributed under the same license as the Synfig Core package. +# Aurore D , 2007. +# +msgid "" +msgstr "" +"Project-Id-Version: fr\n" +"Report-Msgid-Bugs-To: http://synfig.org/Bugs\n" +"POT-Creation-Date: 2008-09-10 14:52+0200\n" +"PO-Revision-Date: 2008-10-02 13:48+0200\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: KBabel 1.11.4\n" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:63 +#: src/modules/lyr_freetype/lyr_freetype.cpp:507 +msgid "Text" +msgstr "Texte" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:64 +#: src/modules/lyr_std/import.cpp:59 src/modules/lyr_std/supersample.cpp:56 +#: src/modules/lyr_std/timeloop.cpp:58 src/modules/lyr_std/xorpattern.cpp:55 +#: src/modules/mod_particle/plant.cpp:69 src/synfig/layer_duplicate.cpp:57 +#: src/synfig/layer_pastecanvas.cpp:78 +msgid "Other" +msgstr "Autre" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:94 +msgid "Text Layer" +msgstr "Calque de texte" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:380 +msgid "unable to initialize" +msgstr "Initialisation impossible" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:399 +msgid "empty font set" +msgstr "Jeu de polices vide" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:508 +msgid "Text to Render" +msgstr "Texte à rendre" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:513 +#: src/modules/lyr_std/shade.cpp:375 +#: src/modules/mod_geometry/checkerboard.cpp:121 +#: src/modules/mod_geometry/circle.cpp:125 +#: src/modules/mod_geometry/rectangle.cpp:122 src/synfig/layer_shape.cpp:1192 +#: src/synfig/layer_solidcolor.cpp:99 +msgid "Color" +msgstr "Couleur" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:514 +msgid "Color of the text" +msgstr "Couleur du texte" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:518 +msgid "Font Family" +msgstr "Famille de police" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:523 +msgid "Style" +msgstr "Style" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:525 +#: src/modules/lyr_freetype/lyr_freetype.cpp:535 +msgid "Normal" +msgstr "Normal" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:526 +msgid "Oblique" +msgstr "Oblique" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:527 +msgid "Italic" +msgstr "Italique" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:531 +msgid "Weight" +msgstr "Graisse" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:533 +msgid "Ultralight" +msgstr "Ultra-léger" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:534 +msgid "light" +msgstr "Léger" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:536 +msgid "Bold" +msgstr "Gras" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:537 +msgid "Ultrabold" +msgstr "Extra-gras" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:538 +msgid "Heavy" +msgstr "Noir" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:541 +msgid "Horizontal Spacing" +msgstr "Espacement horizontal" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:542 +msgid "Describes how close glyphs are horizontally" +msgstr "Défini la proximité horizontale des glyphes" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:546 +msgid "Vertical Spacing" +msgstr "Espacement vertical" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:547 +msgid "Describes how close lines of text are vertically" +msgstr "Défini la proximité verticale des lignes de texte" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:551 +#: src/modules/lyr_std/shade.cpp:381 src/modules/lyr_std/xorpattern.cpp:125 +#: src/modules/mod_filter/blur.cpp:242 +#: src/modules/mod_filter/radialblur.cpp:111 +#: src/modules/mod_geometry/checkerboard.cpp:128 +#: src/modules/mod_noise/distort.cpp:201 src/modules/mod_noise/noise.cpp:256 +msgid "Size" +msgstr "Taille" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:552 +msgid "Size of the text" +msgstr "Taille du texte" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:559 +msgid "Orientation" +msgstr "Orientation" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:560 +msgid "Text Orientation" +msgstr "Orientation du texte" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:565 +#: src/modules/lyr_std/insideout.cpp:141 src/modules/lyr_std/rotate.cpp:112 +#: src/modules/lyr_std/shade.cpp:378 src/modules/lyr_std/translate.cpp:97 +#: src/modules/lyr_std/xorpattern.cpp:122 +#: src/modules/mod_filter/radialblur.cpp:106 +#: src/modules/mod_geometry/checkerboard.cpp:125 +#: src/modules/mod_geometry/circle.cpp:137 +#: src/modules/mod_gradient/curvegradient.cpp:490 +#: src/modules/mod_particle/plant.cpp:390 src/synfig/layer_pastecanvas.cpp:127 +#: src/synfig/layer_shape.cpp:1196 src/synfig/valuenode_composite.cpp:291 +msgid "Origin" +msgstr "Origine" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:566 +msgid "Text Position" +msgstr "Position du texte" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:570 +msgid "Font" +msgstr "Police" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:571 +msgid "Filename of the font to use" +msgstr "Nom de la police à utiliser" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:578 +msgid "Kerning" +msgstr "Crénage" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:579 +msgid "Enables/Disables font kerning (If the font supports it)" +msgstr "Active/Désactive le crénage (si la police le supporte)" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:583 +msgid "Sharpen Edges" +msgstr "Durcir les bords" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:584 +msgid "Turn this off if you are going to be animating the text" +msgstr "À désactiver si vous animez le texte" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:587 +#: src/modules/lyr_std/shade.cpp:398 src/modules/mod_geometry/circle.cpp:140 +#: src/synfig/layer_shape.cpp:1199 +msgid "Invert" +msgstr "Inverser" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:644 +msgid "No face loaded, no text will be rendered." +msgstr "Aucune police de chargée, aucun texte ne sera rendu" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:670 +msgid "Text too small, no text will be rendered." +msgstr "Texte trop petit, aucun texte ne sera rendu" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:694 +msgid "Unable to set face size." +msgstr "Impossible de définir la taille de la police" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:737 +msgid "Invalid multibyte sequence - is the locale set?\n" +msgstr "Séquence multi-octets invalide - La locale est-elle définie ?\n" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:744 +msgid "Can't parse multibyte character.\n" +msgstr "Impossible d'analyser la séquence multi-octets.\n" + +#: src/modules/lyr_std/bevel.cpp:67 +msgid "Bevel" +msgstr "Biseauter" + +#: src/modules/lyr_std/bevel.cpp:68 src/modules/lyr_std/shade.cpp:67 +msgid "Stylize" +msgstr "Styliser " + +#: src/modules/lyr_std/bevel.cpp:356 src/modules/lyr_std/shade.cpp:387 +#: src/modules/mod_filter/blur.cpp:246 +#: src/modules/mod_filter/halftone2.cpp:166 +msgid "Type" +msgstr "Type" + +#: src/modules/lyr_std/bevel.cpp:357 src/modules/lyr_std/shade.cpp:388 +#: src/modules/mod_filter/blur.cpp:247 +msgid "Type of blur to use" +msgstr "Type de flou à utiliser" + +#: src/modules/lyr_std/bevel.cpp:359 src/modules/lyr_std/shade.cpp:390 +#: src/modules/mod_filter/blur.cpp:249 src/synfig/layer_shape.cpp:1212 +msgid "Box Blur" +msgstr "Flou \"boîte\"" + +#: src/modules/lyr_std/bevel.cpp:360 src/modules/lyr_std/shade.cpp:391 +#: src/modules/mod_filter/blur.cpp:250 src/synfig/layer_shape.cpp:1213 +msgid "Fast Gaussian Blur" +msgstr "Flou gaussien rapide" + +#: src/modules/lyr_std/bevel.cpp:361 src/modules/lyr_std/shade.cpp:392 +#: src/modules/mod_filter/blur.cpp:251 src/synfig/layer_shape.cpp:1214 +msgid "Cross-Hatch Blur" +msgstr "Flou hachuré" + +#: src/modules/lyr_std/bevel.cpp:362 src/modules/lyr_std/shade.cpp:393 +#: src/modules/mod_filter/blur.cpp:252 src/synfig/layer_shape.cpp:1215 +msgid "Gaussian Blur" +msgstr "Flou gaussien" + +#: src/modules/lyr_std/bevel.cpp:363 src/modules/lyr_std/shade.cpp:394 +#: src/modules/mod_filter/blur.cpp:253 src/synfig/layer_shape.cpp:1216 +msgid "Disc Blur" +msgstr "Flou circulaire" + +#: src/modules/lyr_std/bevel.cpp:367 +msgid "Hi-Color" +msgstr "Éclaircissement" + +#: src/modules/lyr_std/bevel.cpp:370 +msgid "Lo-Color" +msgstr "Ombrage" + +#: src/modules/lyr_std/bevel.cpp:373 +msgid "Light Angle" +msgstr "Angle d'éclairage" + +#: src/modules/lyr_std/bevel.cpp:377 +msgid "Depth of Bevel" +msgstr "Profondeur du biseau" + +#: src/modules/lyr_std/bevel.cpp:381 +msgid "Softness" +msgstr "Adoucissement" + +#: src/modules/lyr_std/bevel.cpp:384 +msgid "Use Luma" +msgstr "Utiliser la luminance" + +#: src/modules/lyr_std/bevel.cpp:387 +msgid "Solid" +msgstr "Solide" + +#: src/modules/lyr_std/booleancurve.cpp:104 +msgid "Region Set" +msgstr "Jeu de région" + +#: src/modules/lyr_std/booleancurve.cpp:105 +msgid "Set of regions to combine" +msgstr "Jeu de régions à combiner" + +#: src/modules/lyr_std/clamp.cpp:54 src/tool/main.cpp:1079 +msgid "Clamp" +msgstr "Limiter" + +#: src/modules/lyr_std/clamp.cpp:55 src/modules/mod_filter/colorcorrect.cpp:55 +#: src/modules/mod_filter/halftone2.cpp:58 +#: src/modules/mod_filter/halftone3.cpp:58 +#: src/modules/mod_filter/lumakey.cpp:58 +msgid "Filters" +msgstr "Filtres" + +#: src/modules/lyr_std/clamp.cpp:155 +msgid "Invert Negative" +msgstr "Inverser le négatif" + +#: src/modules/lyr_std/clamp.cpp:159 +msgid "Clamp Ceiling" +msgstr "Limiter à la valeur plafond" + +#: src/modules/lyr_std/clamp.cpp:163 +msgid "Ceiling" +msgstr "Plafond" + +#: src/modules/lyr_std/clamp.cpp:167 +msgid "Floor" +msgstr "Plancher" + +#: src/modules/lyr_std/import.cpp:58 +msgid "Import Image" +msgstr "Importer une image" + +#: src/modules/lyr_std/import.cpp:138 +#, c-format +msgid "Filename seems to already be set to \"%s\" (%s)" +msgstr "Il semble que le nom de fichier soit déjà \"%s\" (%s)" + +#: src/modules/lyr_std/import.cpp:209 +msgid "Filename" +msgstr "Nom de fichier" + +#: src/modules/lyr_std/import.cpp:210 +msgid "File to import" +msgstr "Fichier à importer" + +#: src/modules/lyr_std/import.cpp:214 src/synfig/layer_pastecanvas.cpp:140 +msgid "Time Offset" +msgstr "Décalage temporel" + +#: src/modules/lyr_std/insideout.cpp:55 +msgid "Inside Out" +msgstr "À l'envers" + +#: src/modules/lyr_std/insideout.cpp:56 +#: src/modules/lyr_std/sphere_distort.cpp:73 +#: src/modules/lyr_std/stretch.cpp:59 src/modules/lyr_std/twirl.cpp:56 +#: src/modules/lyr_std/warp.cpp:56 src/modules/mod_noise/distort.cpp:57 +msgid "Distortions" +msgstr "Distortions" + +#: src/modules/lyr_std/insideout.cpp:142 +msgid "Defines the where the center will be" +msgstr "Défini le centre" + +#: src/modules/lyr_std/julia.cpp:56 +msgid "Julia Set" +msgstr "Ensemble de Julia" + +#: src/modules/lyr_std/julia.cpp:57 src/modules/lyr_std/mandelbrot.cpp:57 +msgid "Fractals" +msgstr "Fractales" + +#: src/modules/lyr_std/julia.cpp:300 +msgid "Inside Color" +msgstr "Couleur interne" + +#: src/modules/lyr_std/julia.cpp:301 +msgid "Color of the Set" +msgstr "Couleur de l'ensemble" + +#: src/modules/lyr_std/julia.cpp:304 +msgid "Outside Color" +msgstr "Couleur externe" + +#: src/modules/lyr_std/julia.cpp:305 +msgid "Color outside the Set" +msgstr "Couleur en dehors de l'ensemble" + +#: src/modules/lyr_std/julia.cpp:308 +msgid "Color Shift" +msgstr "Décalage de couleur" + +#: src/modules/lyr_std/julia.cpp:311 src/modules/lyr_std/mandelbrot.cpp:213 +msgid "Iterations" +msgstr "Itérations" + +#: src/modules/lyr_std/julia.cpp:314 +msgid "Seed Point" +msgstr "Point graine" + +#: src/modules/lyr_std/julia.cpp:317 src/modules/lyr_std/mandelbrot.cpp:216 +msgid "Bailout ValueBase" +msgstr "Valeur d'arrêt" + +#: src/modules/lyr_std/julia.cpp:321 src/modules/lyr_std/mandelbrot.cpp:226 +#: src/modules/lyr_std/twirl.cpp:125 +msgid "Distort Inside" +msgstr "Distordre l'intérieur" + +#: src/modules/lyr_std/julia.cpp:324 src/modules/lyr_std/mandelbrot.cpp:230 +msgid "Shade Inside" +msgstr "Ombrer l'interieur" + +#: src/modules/lyr_std/julia.cpp:327 src/modules/lyr_std/mandelbrot.cpp:234 +msgid "Solid Inside" +msgstr "Intérieur solide" + +#: src/modules/lyr_std/julia.cpp:330 src/modules/lyr_std/mandelbrot.cpp:238 +msgid "Invert Inside" +msgstr "Inverser l'intérieur" + +#: src/modules/lyr_std/julia.cpp:333 +msgid "Color Inside" +msgstr "Colorer l'intérieur" + +#: src/modules/lyr_std/julia.cpp:336 src/modules/lyr_std/mandelbrot.cpp:255 +#: src/modules/lyr_std/twirl.cpp:129 +msgid "Distort Outside" +msgstr "Distordre l'extérieur" + +#: src/modules/lyr_std/julia.cpp:339 src/modules/lyr_std/mandelbrot.cpp:259 +msgid "Shade Outside" +msgstr "Ombrer l'extérieur" + +#: src/modules/lyr_std/julia.cpp:342 src/modules/lyr_std/mandelbrot.cpp:263 +msgid "Solid Outside" +msgstr "Extérieur solide" + +#: src/modules/lyr_std/julia.cpp:345 src/modules/lyr_std/mandelbrot.cpp:267 +msgid "Invert Outside" +msgstr "Inverser l'extérieur" + +#: src/modules/lyr_std/julia.cpp:348 +msgid "Color Outside" +msgstr "Colorer l'extérieur" + +#: src/modules/lyr_std/julia.cpp:352 +msgid "Color Cycle" +msgstr "Cycle de couleurs" + +#: src/modules/lyr_std/julia.cpp:355 src/modules/lyr_std/mandelbrot.cpp:275 +msgid "Smooth Outside" +msgstr "Lisser l'extérieur" + +#: src/modules/lyr_std/julia.cpp:356 src/modules/lyr_std/mandelbrot.cpp:276 +msgid "Smooth the coloration outside the set" +msgstr "Lisser la couleur à l'intérieur de l'ensemble" + +#: src/modules/lyr_std/julia.cpp:359 src/modules/lyr_std/mandelbrot.cpp:220 +msgid "Break Set" +msgstr "Briser l'ensemble" + +#: src/modules/lyr_std/julia.cpp:360 src/modules/lyr_std/mandelbrot.cpp:221 +msgid "Modify equation to achieve interesting results" +msgstr "Modifier l'équation pour obtenir des résultats intéressants" + +#: src/modules/lyr_std/mandelbrot.cpp:56 +msgid "Mandelbrot Set" +msgstr "Ensemble de Mandelbrot" + +#: src/modules/lyr_std/mandelbrot.cpp:227 +#: src/modules/lyr_std/mandelbrot.cpp:231 +#: src/modules/lyr_std/mandelbrot.cpp:235 +#: src/modules/lyr_std/mandelbrot.cpp:239 +#: src/modules/lyr_std/mandelbrot.cpp:243 +#: src/modules/lyr_std/mandelbrot.cpp:247 +#: src/modules/lyr_std/mandelbrot.cpp:251 +msgid "Inside" +msgstr "Intérieur" + +#: src/modules/lyr_std/mandelbrot.cpp:242 +msgid "Gradient Inside" +msgstr "Dégradé intérieur" + +#: src/modules/lyr_std/mandelbrot.cpp:246 +msgid "Offset Inside" +msgstr "Décalage intérieur" + +#: src/modules/lyr_std/mandelbrot.cpp:250 +msgid "Loop Inside" +msgstr "Boucle intérieur" + +#: src/modules/lyr_std/mandelbrot.cpp:256 +#: src/modules/lyr_std/mandelbrot.cpp:260 +#: src/modules/lyr_std/mandelbrot.cpp:264 +#: src/modules/lyr_std/mandelbrot.cpp:268 +#: src/modules/lyr_std/mandelbrot.cpp:272 +#: src/modules/lyr_std/mandelbrot.cpp:277 +#: src/modules/lyr_std/mandelbrot.cpp:281 +#: src/modules/lyr_std/mandelbrot.cpp:285 +msgid "Outside" +msgstr "Extérieur" + +#: src/modules/lyr_std/mandelbrot.cpp:271 +msgid "Gradient outside" +msgstr "Dégradé extérieur" + +#: src/modules/lyr_std/mandelbrot.cpp:280 +msgid "Offset Outside" +msgstr "Décalage extérieur" + +#: src/modules/lyr_std/mandelbrot.cpp:284 +msgid "Scale Outside" +msgstr "Échelle extérieure" + +#: src/modules/lyr_std/rotate.cpp:55 +msgid "Rotate" +msgstr "Rotation" + +#: src/modules/lyr_std/rotate.cpp:56 src/modules/lyr_std/translate.cpp:55 +#: src/modules/lyr_std/zoom.cpp:52 +msgid "Transform" +msgstr "Transformer" + +#: src/modules/lyr_std/rotate.cpp:113 src/modules/lyr_std/translate.cpp:98 +#: src/modules/mod_filter/radialblur.cpp:107 +#: src/synfig/layer_pastecanvas.cpp:128 +msgid "Point where you want the origin to be" +msgstr "Point où vous souhaitez que l'origine soit" + +#: src/modules/lyr_std/rotate.cpp:117 +#: src/modules/lyr_std/sphere_distort.cpp:153 +#: src/modules/lyr_std/stretch.cpp:103 src/modules/lyr_std/zoom.cpp:96 +#: src/synfig/layer_composite.cpp:142 +#: src/synfig/valuenode_blinecalctangent.cpp:242 +#: src/synfig/valuenode_blinecalcvertex.cpp:201 +#: src/synfig/valuenode_blinecalcwidth.cpp:207 +#: src/synfig/valuenode_segcalctangent.cpp:161 +#: src/synfig/valuenode_segcalcvertex.cpp:159 +msgid "Amount" +msgstr "Quantité" + +#: src/modules/lyr_std/rotate.cpp:118 +msgid "Amount of rotation" +msgstr "Angle de rotation" + +#: src/modules/lyr_std/shade.cpp:66 +msgid "Shade" +msgstr "Ombrage" + +#: src/modules/lyr_std/shade.cpp:382 +msgid "Size of Shade" +msgstr "Taille de l'ombre" + +#: src/modules/lyr_std/sphere_distort.cpp:72 +#: src/modules/lyr_std/sphere_distort.cpp:165 +msgid "Spherize" +msgstr "Rendre sphérique" + +#: src/modules/lyr_std/sphere_distort.cpp:143 +msgid "Position" +msgstr "Position" + +#: src/modules/lyr_std/sphere_distort.cpp:147 +#: src/modules/lyr_std/twirl.cpp:113 src/modules/mod_geometry/circle.cpp:128 +#: src/modules/mod_gradient/radialgradient.cpp:118 +#: src/modules/mod_gradient/spiralgradient.cpp:117 +#: src/modules/mod_noise/valuenode_random.cpp:244 +#: src/synfig/valuenode_radialcomposite.cpp:197 +msgid "Radius" +msgstr "Rayon" + +#: src/modules/lyr_std/sphere_distort.cpp:158 src/modules/lyr_std/warp.cpp:400 +msgid "Clip" +msgstr "Couper" + +#: src/modules/lyr_std/sphere_distort.cpp:162 +msgid "Distort Type" +msgstr "Type de distorsion" + +#: src/modules/lyr_std/sphere_distort.cpp:163 +msgid "The direction of the distortion" +msgstr "Sens de la distorsion" + +#: src/modules/lyr_std/sphere_distort.cpp:166 +msgid "Vertical Bar" +msgstr "Barre verticale" + +#: src/modules/lyr_std/sphere_distort.cpp:167 +msgid "Horizontal Bar" +msgstr "Barre horizontale" + +#: src/modules/lyr_std/stretch.cpp:58 +msgid "Stretch" +msgstr "Étirer" + +#: src/modules/lyr_std/stretch.cpp:108 src/modules/lyr_std/twirl.cpp:109 +#: src/modules/lyr_std/zoom.cpp:101 +#: src/modules/mod_gradient/conicalgradient.cpp:110 +#: src/modules/mod_gradient/radialgradient.cpp:114 +#: src/modules/mod_gradient/spiralgradient.cpp:113 +msgid "Center" +msgstr "Centre" + +#: src/modules/lyr_std/supersample.cpp:55 +msgid "Super Sample" +msgstr "Sur-échantillonner " + +#: src/modules/lyr_std/supersample.cpp:119 +msgid "Unable to create SurfaceTarget" +msgstr "Impossible de créer une Surface Cible" + +#: src/modules/lyr_std/supersample.cpp:215 +#: src/modules/mod_gradient/curvegradient.cpp:494 +#: src/synfig/valuenode_composite.cpp:289 +#: src/synfig/valuenode_realstring.cpp:184 +#: src/synfig/valuenode_repeat_gradient.cpp:185 +#: src/synfig/valuenode_stripes.cpp:176 src/tool/main.cpp:978 +msgid "Width" +msgstr "Largeur" + +#: src/modules/lyr_std/supersample.cpp:216 +msgid "Width of sample area (In pixels)" +msgstr "Largeur de l'échantillon (en pixels)" + +#: src/modules/lyr_std/supersample.cpp:219 src/tool/main.cpp:984 +msgid "Height" +msgstr "Hauteur" + +#: src/modules/lyr_std/supersample.cpp:220 +msgid "Height of sample area (In pixels)" +msgstr "Hauteur de l'échantillon (en pixels)" + +#: src/modules/lyr_std/supersample.cpp:223 +msgid "Use Parametric" +msgstr "Paramétrique" + +#: src/modules/lyr_std/supersample.cpp:224 +msgid "Use the Parametric Renderer" +msgstr "Utiliser le moteur de rendu paramétrique" + +#: src/modules/lyr_std/supersample.cpp:227 +msgid "Be Alpha Safe" +msgstr "" + +#: src/modules/lyr_std/timeloop.cpp:57 src/synfig/valuenode.cpp:161 +#: src/synfig/valuenode_timeloop.cpp:188 +msgid "Time Loop" +msgstr "Boucle temporelle" + +#: src/modules/lyr_std/timeloop.cpp:120 src/synfig/valuenode_timeloop.cpp:124 +msgid "Link Time" +msgstr "Début du lien" + +#: src/modules/lyr_std/timeloop.cpp:124 src/synfig/valuenode_timeloop.cpp:125 +msgid "Local Time" +msgstr "Temps local" + +#: src/modules/lyr_std/timeloop.cpp:128 src/synfig/valuenode_step.cpp:214 +#: src/synfig/valuenode_timeloop.cpp:126 +msgid "Duration" +msgstr "Durée" + +#: src/modules/lyr_std/timeloop.cpp:132 +msgid "Only For Positive Duration" +msgstr "Seulement pour les durées positives" + +#: src/modules/lyr_std/timeloop.cpp:136 +msgid "Symmetrical" +msgstr "Symétrique" + +#: src/modules/lyr_std/translate.cpp:54 +msgid "Translate" +msgstr "Décaler" + +#: src/modules/lyr_std/twirl.cpp:55 +msgid "Twirl" +msgstr "Tourbillon" + +#: src/modules/lyr_std/twirl.cpp:114 +#: src/modules/mod_gradient/radialgradient.cpp:119 +#: src/modules/mod_gradient/spiralgradient.cpp:118 +msgid "This is the radius of the circle" +msgstr "Le rayon du cercle" + +#: src/modules/lyr_std/twirl.cpp:120 +msgid "Rotations" +msgstr "Rotations" + +#: src/modules/lyr_std/warp.cpp:55 +msgid "Warp" +msgstr "Déformation" + +#: src/modules/lyr_std/warp.cpp:371 +msgid "Source TL" +msgstr "Haut-Gauche source" + +#: src/modules/lyr_std/warp.cpp:376 +msgid "Source BR" +msgstr "Bas-Droite source" + +#: src/modules/lyr_std/warp.cpp:380 +msgid "Dest TL" +msgstr "Haut-Gauche dest." + +#: src/modules/lyr_std/warp.cpp:385 +msgid "Dest TR" +msgstr "Haut-Droite dest." + +#: src/modules/lyr_std/warp.cpp:390 +msgid "Dest BR" +msgstr "Bas-Droite dest." + +#: src/modules/lyr_std/warp.cpp:395 +msgid "Dest BL" +msgstr "Bas-Gauche dest." + +#: src/modules/lyr_std/warp.cpp:404 +msgid "Horizon" +msgstr "Horizon" + +#: src/modules/lyr_std/xorpattern.cpp:54 +msgid "XOR Pattern" +msgstr "Motif XOR" + +#: src/modules/lyr_std/zoom.cpp:51 src/synfig/layer_pastecanvas.cpp:135 +msgid "Zoom" +msgstr "Zoom" + +#: src/modules/lyr_std/zoom.cpp:97 +msgid "Amount to zoom in" +msgstr "Quantité de zoom" + +#: src/modules/lyr_std/zoom.cpp:102 +msgid "Point to zoom in to" +msgstr "Point de zoom" + +#: src/modules/mod_bmp/mptr_bmp.cpp:133 src/modules/mod_bmp/mptr_bmp.cpp:134 +#: src/modules/mod_ppm/mptr_ppm.cpp:78 +#, c-format +msgid "Unable to open %s" +msgstr "Impossible d'ouvrir %s" + +#: src/modules/mod_bmp/mptr_bmp.cpp:145 src/modules/mod_bmp/mptr_bmp.cpp:146 +#, c-format +msgid "%s is not in BMP format" +msgstr "%s n'est pas au format BMP" + +#: src/modules/mod_bmp/mptr_bmp.cpp:152 +#, c-format +msgid "Failure while reading BITMAPFILEHEADER from %s" +msgstr "Échec lors de la lecture de BITMAPFILEHEADER depuis %s" + +#: src/modules/mod_bmp/mptr_bmp.cpp:160 +#, c-format +msgid "Failure while reading BITMAPINFOHEADER from %s" +msgstr "Échec lors de la lecture de BITMAPINFOHEADER depuis %s" + +#: src/modules/mod_bmp/mptr_bmp.cpp:170 +#, c-format +msgid "Bad BITMAPFILEHEADER in %s. (bfOffsetBits=%d, should be %d)" +msgstr "BITMAPFILEHEADER invalide dans %s (bfOffsetBits=%d, au lieu de %d)" + +#: src/modules/mod_bmp/mptr_bmp.cpp:178 +#, c-format +msgid "Bad BITMAPINFOHEADER in %s. (biSize=%d, should be 40)" +msgstr "BITMAPINFOHEADER invalide dans %s (biSize=%d, au lieu de 40)" + +#: src/modules/mod_bmp/mptr_bmp.cpp:196 src/modules/mod_bmp/mptr_bmp.cpp:197 +msgid "Reading compressed bitmaps is not supported" +msgstr "La lecture des bitmpas compressés n'est pas disponible" + +#: src/modules/mod_bmp/mptr_bmp.cpp:203 src/modules/mod_bmp/mptr_bmp.cpp:204 +#, c-format +msgid "Unsupported bit depth (bit_count=%d, should be 24 or 32)" +msgstr "Profondeur de bit non supportée (bit_count=%d, au lieu de 24 ou 32)" + +#: src/modules/mod_bmp/trgt_bmp.cpp:185 +msgid " (animated)" +msgstr "(animé)" + +#: src/modules/mod_bmp/trgt_bmp.cpp:195 src/modules/mod_bmp/trgt_bmp.cpp:196 +msgid "Unable to open file" +msgstr "Impossible d'ouvrir le fichier" + +#: src/modules/mod_bmp/trgt_bmp.cpp:226 src/modules/mod_bmp/trgt_bmp.cpp:227 +msgid "Unable to write file header to file" +msgstr "Impossible d'écrire l'entête du fichier dans ce fichier" + +#: src/modules/mod_bmp/trgt_bmp.cpp:233 src/modules/mod_bmp/trgt_bmp.cpp:234 +msgid "Unable to write info header" +msgstr "Impossible d'écrire l'entête d'information" + +#: src/modules/mod_dv/trgt_dv.cpp:166 src/modules/mod_dv/trgt_dv.cpp:175 +#: src/modules/mod_dv/trgt_dv.cpp:182 src/modules/mod_dv/trgt_dv.cpp:192 +#: src/modules/mod_dv/trgt_dv.cpp:200 src/modules/mod_dv/trgt_dv.cpp:205 +#: src/modules/mod_dv/trgt_dv.cpp:209 src/modules/mod_dv/trgt_dv.cpp:218 +#: src/modules/mod_dv/trgt_dv.cpp:227 +msgid "Unable to open pipe to encodedv" +msgstr "Impossible d'établir le transfert vers encodedv" + +#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:172 +#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:179 +#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:189 +#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:199 +#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:217 +msgid "Unable to open pipe to ffmpeg" +msgstr "Impossible d'établir le transfert vers ffmpeg" + +#: src/modules/mod_filter/blur.cpp:67 +msgid "Blur" +msgstr "Flou" + +#: src/modules/mod_filter/blur.cpp:68 src/modules/mod_filter/radialblur.cpp:56 +#: src/synfig/layer_motionblur.cpp:57 +msgid "Blurs" +msgstr "Flous" + +#: src/modules/mod_filter/blur.cpp:243 +msgid "Size of Blur" +msgstr "Taille du flou" + +#: src/modules/mod_filter/colorcorrect.cpp:54 +msgid "Color Correct" +msgstr "Correction de couleur" + +#: src/modules/mod_filter/colorcorrect.cpp:203 +msgid "Hue Adjust" +msgstr "Ajustement de teinte" + +#: src/modules/mod_filter/colorcorrect.cpp:207 +msgid "Brightness" +msgstr "Luminosité" + +#: src/modules/mod_filter/colorcorrect.cpp:211 +msgid "Contrast" +msgstr "Constraste" + +#: src/modules/mod_filter/colorcorrect.cpp:215 +msgid "Exposure Adjust" +msgstr "Ajustement de l'exposition" + +#: src/modules/mod_filter/colorcorrect.cpp:219 src/synfig/layer_bitmap.cpp:138 +msgid "Gamma Adjustment" +msgstr "Ajustement du gamma" + +#: src/modules/mod_filter/halftone2.cpp:57 +msgid "Halftone 2" +msgstr "Demi-teinte 2" + +#: src/modules/mod_filter/halftone2.cpp:147 +msgid "Mask Origin" +msgstr "Origine du masque" + +#: src/modules/mod_filter/halftone2.cpp:151 +msgid "Mask Angle" +msgstr "Angle du masque" + +#: src/modules/mod_filter/halftone2.cpp:155 +#: src/modules/mod_filter/halftone3.cpp:305 +msgid "Mask Size" +msgstr "Taille du masque" + +#: src/modules/mod_filter/halftone2.cpp:160 +msgid "Light Color" +msgstr "Couleur claire" + +#: src/modules/mod_filter/halftone2.cpp:163 +msgid "Dark Color" +msgstr "Couleur sombre" + +#: src/modules/mod_filter/halftone2.cpp:168 +#: src/modules/mod_filter/halftone3.cpp:310 +#: src/modules/mod_gradient/conicalgradient.cpp:119 +msgid "Symmetric" +msgstr "Symétrique" + +#: src/modules/mod_filter/halftone2.cpp:169 +#: src/modules/mod_filter/halftone3.cpp:311 +msgid "Light On Dark" +msgstr "Clair sur sombre" + +#: src/modules/mod_filter/halftone2.cpp:171 +#: src/modules/mod_filter/halftone3.cpp:313 +msgid "Diamond" +msgstr "Diamant" + +#: src/modules/mod_filter/halftone2.cpp:172 +#: src/modules/mod_filter/halftone3.cpp:314 +msgid "Stripe" +msgstr "Bande" + +#: src/modules/mod_filter/halftone3.cpp:57 +msgid "Halftone 3" +msgstr "Demi-teinte 3" + +#: src/modules/mod_filter/halftone3.cpp:308 +msgid " Type" +msgstr "Type" + +#: src/modules/mod_filter/halftone3.cpp:317 +msgid "Subtractive Flag" +msgstr "Soustraire" + +#: src/modules/mod_filter/halftone3.cpp:325 +msgid " Color" +msgstr "Couleur" + +#: src/modules/mod_filter/halftone3.cpp:329 +msgid " Mask Origin" +msgstr "Origine du masque" + +#: src/modules/mod_filter/halftone3.cpp:333 +msgid " Mask Angle" +msgstr "Angle du masque" + +#: src/modules/mod_filter/lumakey.cpp:57 +msgid "Luma Key" +msgstr "Clé de luminance" + +#: src/modules/mod_filter/radialblur.cpp:55 +msgid "Radial Blur" +msgstr "Flou radial" + +#: src/modules/mod_filter/radialblur.cpp:112 +msgid "Size of blur" +msgstr "Taille du flou" + +#: src/modules/mod_filter/radialblur.cpp:117 +msgid "Fade Out" +msgstr "Fondu en fermeture" + +#: src/modules/mod_geometry/checkerboard.cpp:57 +msgid "Checkerboard" +msgstr "Damier" + +#: src/modules/mod_geometry/checkerboard.cpp:58 +#: src/modules/mod_geometry/circle.cpp:56 +#: src/modules/mod_geometry/outline.cpp:71 +#: src/modules/mod_geometry/rectangle.cpp:59 +#: src/modules/mod_geometry/region.cpp:64 src/modules/mod_geometry/star.cpp:63 +#: src/synfig/layer_polygon.cpp:60 src/synfig/layer_solidcolor.cpp:56 +msgid "Geometry" +msgstr "Géométrie" + +#: src/modules/mod_geometry/checkerboard.cpp:122 +msgid "Color of checkers" +msgstr "Couleur des carreaux" + +#: src/modules/mod_geometry/checkerboard.cpp:129 +msgid "Size of checkers" +msgstr "Taille des carreaux" + +#: src/modules/mod_geometry/circle.cpp:55 +msgid "Circle" +msgstr "Cercle" + +#: src/modules/mod_geometry/circle.cpp:133 src/synfig/layer_shape.cpp:1205 +msgid "Feather" +msgstr "Adoucissement" + +#: src/modules/mod_geometry/circle.cpp:141 +msgid "Invert the circle" +msgstr "Inverser le cercle" + +#: src/modules/mod_geometry/circle.cpp:145 +msgid "Falloff" +msgstr "Atténuation " + +#: src/modules/mod_geometry/circle.cpp:146 +msgid "Determines the falloff function for the feather" +msgstr "Détermine la fonction d'atténuation pour l'adoucissement" + +#: src/modules/mod_geometry/circle.cpp:148 +#: src/modules/mod_noise/distort.cpp:211 src/modules/mod_noise/noise.cpp:263 +#: src/synfig/layer_bitmap.cpp:132 src/synfig/valuenode.cpp:134 +#: src/synfig/valuenode_linear.cpp:142 +msgid "Linear" +msgstr "Linéaire" + +#: src/modules/mod_geometry/circle.cpp:149 +msgid "Squared" +msgstr "Carré" + +#: src/modules/mod_geometry/circle.cpp:150 +msgid "Square Root" +msgstr "Racine carrée" + +#: src/modules/mod_geometry/circle.cpp:151 +msgid "Sigmond" +msgstr "Sigmoïde" + +#: src/modules/mod_geometry/circle.cpp:152 +#: src/modules/mod_noise/distort.cpp:212 src/modules/mod_noise/noise.cpp:264 +#: src/synfig/layer_bitmap.cpp:133 +msgid "Cosine" +msgstr "Cosinus" + +#: src/modules/mod_geometry/outline.cpp:70 +msgid "Outline" +msgstr "Contour" + +#: src/modules/mod_geometry/outline.cpp:178 +msgid "No vertices in outline " +msgstr "Pas de vertices dans le contour" + +#: src/modules/mod_geometry/outline.cpp:807 +#: src/modules/mod_geometry/region.cpp:232 +#: src/modules/mod_gradient/curvegradient.cpp:497 +#: src/modules/mod_particle/plant.cpp:383 +msgid "Vertices" +msgstr "Vertices" + +#: src/modules/mod_geometry/outline.cpp:810 +#: src/modules/mod_gradient/curvegradient.cpp:500 +#: src/modules/mod_particle/plant.cpp:384 +msgid "A list of BLine Points" +msgstr "Une liste de points BLine" + +#: src/modules/mod_geometry/outline.cpp:824 +msgid "Outline Width" +msgstr "Épaisseur du contour" + +#: src/modules/mod_geometry/outline.cpp:829 +msgid "Expand" +msgstr "Étendre" + +#: src/modules/mod_geometry/outline.cpp:833 +msgid "Sharp Cusps" +msgstr "Angles durs" + +#: src/modules/mod_geometry/outline.cpp:834 +msgid "Determines cusp type" +msgstr "Détermine l'aspect des angles" + +#: src/modules/mod_geometry/outline.cpp:838 +msgid "Rounded Begin" +msgstr "Début arrondi" + +#: src/modules/mod_geometry/outline.cpp:839 +#: src/modules/mod_geometry/outline.cpp:844 +msgid "Round off the tip" +msgstr "Arrondir la pointe" + +#: src/modules/mod_geometry/outline.cpp:843 +msgid "Rounded End" +msgstr "Fin arrondie" + +#: src/modules/mod_geometry/outline.cpp:847 +msgid "Loopyness" +msgstr "Boucle" + +#: src/modules/mod_geometry/outline.cpp:850 +msgid "Homogeneous" +msgstr "Homogène" + +#: src/modules/mod_geometry/rectangle.cpp:58 +msgid "Rectangle" +msgstr "Rectangle" + +#: src/modules/mod_geometry/rectangle.cpp:126 +#: src/modules/mod_gradient/lineargradient.cpp:184 +msgid "Point 1" +msgstr "Point 1" + +#: src/modules/mod_geometry/rectangle.cpp:131 +#: src/modules/mod_gradient/lineargradient.cpp:188 +msgid "Point 2" +msgstr "Point 2" + +#: src/modules/mod_geometry/rectangle.cpp:136 +msgid "Expand amount" +msgstr "Quantité d'extention" + +#: src/modules/mod_geometry/rectangle.cpp:140 +msgid "Invert the rectangle" +msgstr "Inverser le rectangle" + +#: src/modules/mod_geometry/region.cpp:63 +msgid "Region" +msgstr "Région" + +#: src/modules/mod_geometry/star.cpp:62 +msgid "Star" +msgstr "Étoile" + +#: src/modules/mod_geometry/star.cpp:174 +msgid "Outer Radius" +msgstr "Rayon externe" + +#: src/modules/mod_geometry/star.cpp:175 +msgid "The radius of the outer points in the star" +msgstr "Le rayon des pointes de l'étoile" + +#: src/modules/mod_geometry/star.cpp:181 +msgid "Inner Radius" +msgstr "Rayon interne" + +#: src/modules/mod_geometry/star.cpp:182 +msgid "The radius of the inner points in the star" +msgstr "Le rayon du corps de l'étoile" + +#: src/modules/mod_geometry/star.cpp:188 +#: src/modules/mod_gradient/conicalgradient.cpp:114 +#: src/modules/mod_gradient/spiralgradient.cpp:124 +#: src/synfig/valuenode_cos.cpp:165 src/synfig/valuenode_sine.cpp:165 +msgid "Angle" +msgstr "Angle" + +#: src/modules/mod_geometry/star.cpp:189 +msgid "The orientation of the star" +msgstr "L'orientation de l'étoile" + +#: src/modules/mod_geometry/star.cpp:194 src/synfig/distance.cpp:243 +msgid "Points" +msgstr "Points" + +#: src/modules/mod_geometry/star.cpp:195 +msgid "The number of points in the star" +msgstr "Nombres de pointes de l'étoile" + +#: src/modules/mod_geometry/star.cpp:199 +msgid "Regular Polygon" +msgstr "Polygone standard" + +#: src/modules/mod_geometry/star.cpp:200 +msgid "Whether to draw a star or a regular polygon" +msgstr "Dessine un polygone ou une étoile" + +#: src/modules/mod_gif/trgt_gif.cpp:107 +#, c-format +msgid "Unable to open \"%s\" for write access!" +msgstr "Impossible d'ouvrir \"%s\" en écriture !" + +#: src/modules/mod_gif/trgt_gif.cpp:195 +msgid "Description not set!" +msgstr "Description non définie !" + +#: src/modules/mod_gradient/conicalgradient.cpp:56 +msgid "Conical Gradient" +msgstr "Dégradé conique" + +#: src/modules/mod_gradient/conicalgradient.cpp:57 +#: src/modules/mod_gradient/curvegradient.cpp:58 +#: src/modules/mod_gradient/lineargradient.cpp:54 +#: src/modules/mod_gradient/radialgradient.cpp:57 +#: src/modules/mod_gradient/spiralgradient.cpp:56 +#: src/modules/mod_noise/noise.cpp:57 +msgid "Gradients" +msgstr "Dégradés" + +#: src/modules/mod_gradient/conicalgradient.cpp:106 +#: src/modules/mod_gradient/curvegradient.cpp:503 +#: src/modules/mod_gradient/lineargradient.cpp:191 +#: src/modules/mod_gradient/radialgradient.cpp:110 +#: src/modules/mod_gradient/spiralgradient.cpp:109 +#: src/modules/mod_noise/noise.cpp:250 src/modules/mod_particle/plant.cpp:394 +#: src/synfig/valuenode_gradientrotate.cpp:146 +#: src/synfig/valuenode_repeat_gradient.cpp:183 +msgid "Gradient" +msgstr "Dégradé" + +#: src/modules/mod_gradient/curvegradient.cpp:57 +msgid "Curve Gradient" +msgstr "Dégradé selon une courbe" + +#: src/modules/mod_gradient/curvegradient.cpp:505 +#: src/modules/mod_gradient/lineargradient.cpp:194 +#: src/modules/mod_gradient/radialgradient.cpp:125 +#: src/synfig/valuenode_blinecalctangent.cpp:241 +#: src/synfig/valuenode_blinecalcvertex.cpp:200 +#: src/synfig/valuenode_blinecalcwidth.cpp:206 +msgid "Loop" +msgstr "Boucle" + +#: src/modules/mod_gradient/curvegradient.cpp:507 +#: src/modules/mod_gradient/lineargradient.cpp:197 +#: src/modules/mod_gradient/radialgradient.cpp:129 +msgid "ZigZag" +msgstr "Zigzag" + +#: src/modules/mod_gradient/curvegradient.cpp:509 +msgid "Perpendicular" +msgstr "Perpendiculaire" + +#: src/modules/mod_gradient/curvegradient.cpp:511 +msgid "Fast" +msgstr "Rapide" + +#: src/modules/mod_gradient/lineargradient.cpp:53 +msgid "Linear Gradient" +msgstr "Dégradé linéaire" + +#: src/modules/mod_gradient/radialgradient.cpp:56 +msgid "Radial Gradient" +msgstr "Dégradé radial" + +#: src/modules/mod_gradient/spiralgradient.cpp:55 +msgid "Spiral Gradient" +msgstr "Dégradé spirale" + +#: src/modules/mod_gradient/spiralgradient.cpp:129 +msgid "Clockwise" +msgstr "Sens horaire" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:103 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:104 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:216 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:217 +msgid "No file to load" +msgstr "Pas de fichier à charger" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:157 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:158 +#: src/synfig/listimporter.cpp:182 src/synfig/listimporter.cpp:183 +#: src/tool/main.cpp:1181 +msgid "Unable to open " +msgstr "Impossible d'ouvrir " + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:164 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:165 +#: src/synfig/listimporter.cpp:189 src/synfig/listimporter.cpp:190 +msgid "Unable to get frame from " +msgstr "Impossible de récupérer l'image clé de " + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:171 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:172 +msgid "Bad surface from " +msgstr "Mauvaise surface depuis " + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:227 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:228 +msgid "Unable to open pipe to imagemagick" +msgstr "Impossible d'établir le transfert vers imagemagick" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:239 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:240 +msgid "Reached end of stream without finding PPM header" +msgstr "Fin de flux atteinte sans trouver l'entête PPM" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:248 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:249 +msgid "stream not in PPM format" +msgstr "Le flux n'est pas au format PPM" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:260 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:261 +msgid "Premature end of file (after header)" +msgstr "Fin de fichier prématurée (après l'entête)" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:273 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:274 +msgid "Premature end of file" +msgstr "Fin de fichier prématurée" + +#: src/modules/mod_imagemagick/trgt_imagemagick.cpp:157 +msgid "Unable to open pipe to imagemagick's convert utility" +msgstr "" +"Impossible d'établir le tranfert vers l'utilitaire de conversion (convert) " +"d'imagemagick" + +#: src/modules/mod_noise/distort.cpp:56 +msgid "Noise Distort" +msgstr "Distortion bruitée" + +#: src/modules/mod_noise/distort.cpp:197 +msgid "Displacement" +msgstr "Déplacement" + +#: src/modules/mod_noise/distort.cpp:204 src/modules/mod_noise/noise.cpp:253 +msgid "Random Seed" +msgstr "Graine aléatoire" + +#: src/modules/mod_noise/distort.cpp:207 src/modules/mod_noise/noise.cpp:259 +#: src/modules/mod_noise/valuenode_random.cpp:247 +#: src/synfig/layer_bitmap.cpp:128 +msgid "Interpolation" +msgstr "Interpolation" + +#: src/modules/mod_noise/distort.cpp:208 src/modules/mod_noise/noise.cpp:260 +#: src/synfig/layer_bitmap.cpp:129 +msgid "What type of interpolation to use" +msgstr "Quel type d'interpolation utiliser" + +#: src/modules/mod_noise/distort.cpp:210 src/modules/mod_noise/noise.cpp:262 +#: src/synfig/layer_bitmap.cpp:131 +msgid "Nearest Neighbor" +msgstr "Voisinage de plus proche" + +#: src/modules/mod_noise/distort.cpp:213 src/modules/mod_noise/noise.cpp:265 +msgid "Spline" +msgstr "Spline" + +#: src/modules/mod_noise/distort.cpp:214 src/modules/mod_noise/noise.cpp:266 +#: src/synfig/layer_bitmap.cpp:134 +msgid "Cubic" +msgstr "Cubique" + +#: src/modules/mod_noise/distort.cpp:217 src/modules/mod_noise/noise.cpp:269 +msgid "Detail" +msgstr "Détail" + +#: src/modules/mod_noise/distort.cpp:220 src/modules/mod_noise/noise.cpp:272 +#: src/modules/mod_noise/valuenode_random.cpp:246 +msgid "Animation Speed" +msgstr "Vitesse d'animation" + +#: src/modules/mod_noise/distort.cpp:223 src/modules/mod_noise/noise.cpp:275 +msgid "Turbulent" +msgstr "Turbulent" + +#: src/modules/mod_noise/main.cpp:66 +#: src/modules/mod_noise/valuenode_random.cpp:179 +msgid "Random" +msgstr "Aléatoire" + +#: src/modules/mod_noise/noise.cpp:56 +msgid "Noise Gradient" +msgstr "Dégradé bruité" + +#: src/modules/mod_noise/noise.cpp:278 +msgid "Do Alpha" +msgstr "Transparence" + +#: src/modules/mod_noise/noise.cpp:281 +msgid "Super Sampling" +msgstr "Sur-échantillonage " + +#: src/modules/mod_noise/valuenode_random.cpp:243 +#: src/synfig/valuenode_range.cpp:193 src/synfig/valuenode_reciprocal.cpp:124 +#: src/synfig/valuenode_reference.cpp:114 src/synfig/valuenode_scale.cpp:179 +#: src/synfig/valuenode_step.cpp:213 src/synfig/valuenode_timeloop.cpp:123 +msgid "Link" +msgstr "Lien" + +#: src/modules/mod_noise/valuenode_random.cpp:245 +#: src/modules/mod_particle/plant.cpp:441 +msgid "Seed" +msgstr "Graine" + +#: src/modules/mod_particle/plant.cpp:68 +msgid "Plant" +msgstr "Plante" + +#: src/modules/mod_particle/plant.cpp:395 +msgid "Gradient to be used for coloring the plant" +msgstr "Dégradé à utiliser pour colorer la plante" + +#: src/modules/mod_particle/plant.cpp:399 +msgid "Split Angle" +msgstr "Angle de séparation" + +#: src/modules/mod_particle/plant.cpp:400 +msgid "Angle by which each split deviates from its parent" +msgstr "Angle selon lequel chaque branche dévie de sa parente" + +#: src/modules/mod_particle/plant.cpp:404 +msgid "Gravity" +msgstr "Gravité" + +#: src/modules/mod_particle/plant.cpp:405 +msgid "Direction in which the shoots tend to face" +msgstr "Direction vers laquelle les \"pousses\" s'orienteront" + +#: src/modules/mod_particle/plant.cpp:410 +msgid "Tangential Velocity" +msgstr "Vitesse tangente" + +#: src/modules/mod_particle/plant.cpp:411 +msgid "Amount to which shoots tend to grow along the tangent to the BLine" +msgstr "Quantité de croissance des \"pousses\" le long de la tangente à la BLine" + +#: src/modules/mod_particle/plant.cpp:415 +msgid "Perpendicular Velocity" +msgstr "Vitesse perpendiculaire" + +#: src/modules/mod_particle/plant.cpp:416 +msgid "Amount to which shoots tend to grow perpendicular to the tangent to the BLine" +msgstr "Quantité de croissance des \"pousses\" perpendiculairement à la BLine" + +#: src/modules/mod_particle/plant.cpp:420 +msgid "Stem Size" +msgstr "Taille de tige" + +#: src/modules/mod_particle/plant.cpp:421 +msgid "Size of the stem" +msgstr "Taille de tige" + +#: src/modules/mod_particle/plant.cpp:426 +msgid "Size As Alpha" +msgstr "Taille en tant qu'alpha" + +#: src/modules/mod_particle/plant.cpp:427 +msgid "" +"If enabled, the alpha channel from the gradient is multiplied by the stem " +"size, and an alpha of 1.0 is used when rendering" +msgstr "" +"Le canal alpha du dégradé est multiplié par la taille de la tige, et une " +"valeur alpha de 1 est utilisée pour le rendu." + +#: src/modules/mod_particle/plant.cpp:431 +msgid "Reverse" +msgstr "Inverser" + +#: src/modules/mod_particle/plant.cpp:432 +msgid "If enabled, render the plant in the opposite direction" +msgstr "Si actif, rend la plante dans la direction opposée " + +#: src/modules/mod_particle/plant.cpp:436 src/synfig/valuenode.cpp:165 +#: src/synfig/valuenode_duplicate.cpp:123 src/synfig/valuenode_step.cpp:138 +msgid "Step" +msgstr "Pas" + +#: src/modules/mod_particle/plant.cpp:437 +msgid "Measure of the distance between points when rendering" +msgstr "Distance du pas entre chaque point lors du rendu" + +#: src/modules/mod_particle/plant.cpp:442 +msgid "Used to seed the pseudo-random number generator" +msgstr "Utilisé pour initialiser le générateur de nombres pseudo-aléatoire" + +#: src/modules/mod_particle/plant.cpp:446 +msgid "Splits" +msgstr "Branches" + +#: src/modules/mod_particle/plant.cpp:447 +msgid "Maximum number of times that each sprout can sprout recursively" +msgstr "" +"Nombre maximum de fois qu'une branche peut générer d'autres branches " +"récursivement" + +#: src/modules/mod_particle/plant.cpp:451 +msgid "Sprouts" +msgstr "Pousses" + +#: src/modules/mod_particle/plant.cpp:452 +msgid "Number of places that growth occurs on each bline section" +msgstr "Nombre d'endroits où des pousses apparaissent sur chaque section de BLine" + +#: src/modules/mod_particle/plant.cpp:456 +msgid "Random Factor" +msgstr "Facteur d'aléa" + +#: src/modules/mod_particle/plant.cpp:457 +msgid "Used to scale down all random effects. Set to zero to disable randomness" +msgstr "" +"Utilisé pour amoindrir les effets aléatoires. Placer le à zéro pour " +"désactiver les aléas." + +#: src/modules/mod_particle/plant.cpp:461 +msgid "Drag" +msgstr "Inertie" + +#: src/modules/mod_particle/plant.cpp:462 +msgid "Drag slows the growth" +msgstr "L'inertie ralenti la croissance" + +#: src/modules/mod_particle/plant.cpp:466 +msgid "Use Width" +msgstr "Utiliser la largeur" + +#: src/modules/mod_particle/plant.cpp:467 +msgid "Scale the velocity by the bline's width" +msgstr "Détermine la vitesse à partir de la largeur de la BLine" + +#: src/modules/mod_ppm/mptr_ppm.cpp:86 +#, c-format +msgid "%s was not in PPM format" +msgstr "%s n'était pas au format PPM" + +#: src/synfig/distance.cpp:241 +msgid "Units" +msgstr "Unités" + +#: src/synfig/distance.cpp:242 +msgid "Pixels" +msgstr "Pixels" + +#: src/synfig/distance.cpp:244 +msgid "Inches" +msgstr "Pouces" + +#: src/synfig/distance.cpp:245 +msgid "Meters" +msgstr "Mètres" + +#: src/synfig/distance.cpp:246 +msgid "Millimeters" +msgstr "Millimètres" + +#: src/synfig/distance.cpp:247 +msgid "Centimeters" +msgstr "Centimètres" + +#: src/synfig/importer.cpp:89 +msgid "Importer::open(): Cannot open empty filename" +msgstr "Importer::open() : Impossible d'ouvrir un fichier vide" + +#: src/synfig/importer.cpp:103 +msgid "Importer::open(): Couldn't find extension" +msgstr "Importer::open() : Extension non trouvée" + +#: src/synfig/importer.cpp:114 +msgid "Importer::open(): Unknown file type -- " +msgstr "Importer::open() : Type de fichier inconnu" + +#: src/synfig/layer.cpp:499 src/synfig/layer_composite.cpp:114 +msgid "Unable to create surface target" +msgstr "Impossible de créer une surface cible" + +#: src/synfig/layer.cpp:537 +msgid "Z Depth" +msgstr "Pronfondeur Z" + +#: src/synfig/layer_bitmap.cpp:118 +msgid "Top-Left" +msgstr "Haut-gauche" + +#: src/synfig/layer_bitmap.cpp:119 +msgid "Upper left-hand Corner of image" +msgstr "Le coin en haut à gauche de l'image" + +#: src/synfig/layer_bitmap.cpp:123 +msgid "Bottom-Right" +msgstr "Bas-droite" + +#: src/synfig/layer_bitmap.cpp:124 +msgid "Lower right-hand Corner of image" +msgstr "Le coin en bas à droite de l'image" + +#: src/synfig/layer_composite.cpp:145 src/synfig/paramdesc.cpp:62 +msgid "Blend Method" +msgstr "Mode de fusion" + +#: src/synfig/layer_duplicate.cpp:56 src/synfig/valuenode.cpp:163 +#: src/synfig/valuenode_duplicate.cpp:206 +msgid "Duplicate" +msgstr "Dupliquer" + +#: src/synfig/layer_duplicate.cpp:132 +msgid "Index" +msgstr "Index" + +#: src/synfig/layer_duplicate.cpp:133 +msgid "Copy Index" +msgstr "Index de copie" + +#: src/synfig/layer_mime.cpp:86 +msgid "[MIME]" +msgstr "[MIME]" + +#: src/synfig/layer_motionblur.cpp:56 +msgid "Motion Blur" +msgstr "Flou cinétique" + +#: src/synfig/layer_motionblur.cpp:122 +msgid "Aperture" +msgstr "Ouverture" + +#: src/synfig/layer_motionblur.cpp:123 +msgid "Shutter Time" +msgstr "Temps d'exposition" + +#: src/synfig/layer_pastecanvas.cpp:77 +msgid "Paste Canvas" +msgstr "Coller un canevas" + +#: src/synfig/layer_pastecanvas.cpp:114 +msgid "Pasted Canvas" +msgstr "Canevas collé" + +#: src/synfig/layer_pastecanvas.cpp:115 +msgid "Inline Canvas" +msgstr "Sous-canevas" + +#: src/synfig/layer_pastecanvas.cpp:131 +msgid "Canvas" +msgstr "Canevas" + +#: src/synfig/layer_pastecanvas.cpp:132 +msgid "Canvas to paste" +msgstr "Canevas à coller" + +#: src/synfig/layer_pastecanvas.cpp:136 +msgid "Size of canvas" +msgstr "Taille du canevas" + +#: src/synfig/layer_pastecanvas.cpp:144 +msgid "Children Lock" +msgstr "Verrouillage des enfants" + +#: src/synfig/layer_pastecanvas.cpp:154 +msgid "Current Time" +msgstr "Heure courante" + +#: src/synfig/layer_polygon.cpp:59 +msgid "Polygon" +msgstr "Polygone" + +#: src/synfig/layer_polygon.cpp:171 +msgid "Vector List" +msgstr "Liste de vecteurs" + +#: src/synfig/layer_shape.cpp:63 +msgid "Shape" +msgstr "Forme" + +#: src/synfig/layer_shape.cpp:64 +msgid "Internal" +msgstr "Interne" + +#: src/synfig/layer_shape.cpp:1193 +msgid "Layer_Shape Color" +msgstr "Couleur du calque forme" + +#: src/synfig/layer_shape.cpp:1202 +msgid "Antialiasing" +msgstr "Anti-crénelage " + +#: src/synfig/layer_shape.cpp:1209 +msgid "Type of Feather" +msgstr "Type d'adoucissement" + +#: src/synfig/layer_shape.cpp:1210 +msgid "Type of feathering to use" +msgstr "Type d'adoucissement à utiliser" + +#: src/synfig/layer_shape.cpp:1219 +msgid "Winding Style" +msgstr "Mode de superposition" + +#: src/synfig/layer_shape.cpp:1220 +msgid "Winding style to use" +msgstr "Mode de superposition à utiliser" + +#: src/synfig/layer_shape.cpp:1222 +msgid "Non Zero" +msgstr "Non zéro" + +#: src/synfig/layer_shape.cpp:1223 +msgid "Even/Odd" +msgstr "Pair/Impair" + +#: src/synfig/layer_solidcolor.cpp:55 +msgid "Solid Color" +msgstr "Couleur pleine" + +#: src/synfig/listimporter.cpp:159 src/synfig/listimporter.cpp:160 +msgid "No images in list" +msgstr "Pas d'images dans la liste" + +#: src/synfig/loadcanvas.cpp:173 +#, c-format +msgid "Unexpected element <%s>, Expected <%s>" +msgstr "Élément <%s> indattendu, <%s> attendu" + +#: src/synfig/loadcanvas.cpp:179 +#, c-format +msgid "Unexpected element <%s>" +msgstr "Élément <%s> indattendu" + +#: src/synfig/loadcanvas.cpp:190 +msgid "Too many warnings" +msgstr "Trop d'avertissements" + +#: src/synfig/loadcanvas.cpp:220 +#, c-format +msgid "<%s> is missing \"%s\" attribute" +msgstr "<%s> a un attribut \"%s\" manquant" + +#: src/synfig/loadcanvas.cpp:245 src/synfig/loadcanvas.cpp:264 +#: src/synfig/loadcanvas.cpp:283 src/synfig/loadcanvas.cpp:447 +#: src/synfig/loadcanvas.cpp:802 +#, c-format +msgid "<%s> should not contain anything" +msgstr "<%s> devrait être vide" + +#: src/synfig/loadcanvas.cpp:249 src/synfig/loadcanvas.cpp:268 +#: src/synfig/loadcanvas.cpp:287 src/synfig/loadcanvas.cpp:451 +#: src/synfig/loadcanvas.cpp:806 +#, c-format +msgid "<%s> is missing \"value\" attribute" +msgstr "Il manque un attribut \"value\" à <%s>" + +#: src/synfig/loadcanvas.cpp:462 +#, c-format +msgid "Bad value \"%s\" in <%s>" +msgstr "Valeur \"%s\" incorrecte dans <%s>" + +#: src/synfig/loadcanvas.cpp:486 +#, c-format +msgid "<%s> is missing \"pos\" attribute" +msgstr "Il manque un attribut \"pos\" dans <%s>" + +#: src/synfig/loadcanvas.cpp:893 +#, c-format +msgid "Unable to create with type \"%s\"" +msgstr "Impossible de créer de type \"%s\"" + +#: src/synfig/loadcanvas.cpp:910 +msgid " is missing attribute \"time\"" +msgstr "Il manque un attribut \"time\" à " + +#: src/synfig/loadcanvas.cpp:923 +msgid "" +"Found \"use\" attribute for , but it wasn't empty. Ignoring " +"contents..." +msgstr "" +"Attribut \"use\" trouvé pour , mais il n'était pas vide. Contenu " +"ignoré" + +#: src/synfig/loadcanvas.cpp:939 src/synfig/loadcanvas.cpp:951 +#, c-format +msgid "<%s> is missing its data" +msgstr "Il manque des données dans <%s>" + +#: src/synfig/loadcanvas.cpp:968 +msgid "Bad data for " +msgstr "Données incorrectes pour " + +#: src/synfig/loadcanvas.cpp:983 +#, c-format +msgid "Unexpected element <%s> after data, ignoring..." +msgstr "Élément <%s> inattendu après les données de . Ignoré ..." + +#: src/synfig/loadcanvas.cpp:1025 src/synfig/loadcanvas.cpp:1042 +#, c-format +msgid "\"%s\" not a valid value for attribute \"%s\" in <%s>" +msgstr "\"%s\" n'est pas un attribut valide pour \"%s\" dans <%s>" + +#: src/synfig/loadcanvas.cpp:1103 +#, c-format +msgid "Missing attribute \"type\" in <%s>" +msgstr "Il manque un attribut \"type\" dans <%s>" + +#: src/synfig/loadcanvas.cpp:1111 +#, c-format +msgid "Bad type in <%s>" +msgstr "Mauvaises type dans <%s>" + +#: src/synfig/loadcanvas.cpp:1120 +#, c-format +msgid "Error creating ValueNode <%s> with type '%s'. Refer to '%s'" +msgstr "" +"Erreur lors de la création du nœud de valeur <%s> avec le type \"%s\". Voir " +"\"%s\"." + +#: src/synfig/loadcanvas.cpp:1129 +#, c-format +msgid "<%s> did not accept type '%s'" +msgstr "<%s> n'accepte pas le type \"%s\"" + +#: src/synfig/loadcanvas.cpp:1155 src/synfig/loadcanvas.cpp:1223 +#, c-format +msgid "'%s' was already defined in <%s>" +msgstr "\"%s\" est déjà défini dans <%s>" + +#: src/synfig/loadcanvas.cpp:1165 +#, c-format +msgid "'%s' attribute in <%s> references unknown ID '%s'" +msgstr "L'attribut \"%s\" dans <%s> fait référence à un ID inconnu \"%s\"" + +#: src/synfig/loadcanvas.cpp:1174 +#, c-format +msgid "Unable to set link '\"%s\" to ValueNode \"%s\" (link #%d in \"%s\")" +msgstr "" +"Impossible de définir le lien \"%s\" vers le nœud de valeur \"%s\" (lien n°%" +"d dans \"%s\")" + +#: src/synfig/loadcanvas.cpp:1198 +#, c-format +msgid "Unknown Exception thrown when referencing ValueNode \"%s\"" +msgstr "" +"Une exception inconnue est survenue lors de la référence au nœud de valeur " +"\"%s\"" + +#: src/synfig/loadcanvas.cpp:1238 +#, c-format +msgid "element <%s> is missing its contents" +msgstr "Le contenu de l'élément <%s>manque" + +#: src/synfig/loadcanvas.cpp:1247 +#, c-format +msgid "Parse of '%s' failed" +msgstr "L'analyse de \"%s\" a échoué" + +#: src/synfig/loadcanvas.cpp:1254 +#, c-format +msgid "Unable to connect value node ('%s' of type '%s') to link %d (%s)" +msgstr "Impossible de lier le nœud de valeur (\"%s\" de type \"%s\") au lien %d (%s)" + +#: src/synfig/loadcanvas.cpp:1272 +#, c-format +msgid "Unknown Exception thrown when working on element \"%s\"" +msgstr "Une exception inconnue est survenue lors du travail sur l'élément \"%s\"" + +#: src/synfig/loadcanvas.cpp:1295 +#, c-format +msgid "<%s> is missing link %d (%s)" +msgstr "<%s> n'a pas de lien %d (%s)" + +#: src/synfig/loadcanvas.cpp:1361 +msgid "Unable to create " +msgstr "Impossible de créer " + +#: src/synfig/loadcanvas.cpp:1511 +msgid " is missing its contents or missing \"use\" element" +msgstr "Le contenu de est manquant, ou il manque un élément \"use\"" + +#: src/synfig/loadcanvas.cpp:1556 +#, c-format +msgid "Bad data in <%s>" +msgstr "Mauvaises données dans <%s>" + +#: src/synfig/loadcanvas.cpp:1588 +#, c-format +msgid "Expected a ValueNode. Refer to '%s'" +msgstr "Noeud de valeur attendu. Voir %s" + +#: src/synfig/loadcanvas.cpp:1609 +#, c-format +msgid "Bad ID \"%s\"" +msgstr "Mauvais ID \"%s\"" + +#: src/synfig/loadcanvas.cpp:1614 +#, c-format +msgid "Duplicate ID \"%s\"" +msgstr "ID dupliqué \"%s\"" + +#: src/synfig/loadcanvas.cpp:1619 +#, c-format +msgid "Unknown Exception thrown when adding ValueNode \"%s\"" +msgstr "Une exception inconnue est survenue lors de l'ajout du Nœud de valeur \"%s\"" + +#: src/synfig/loadcanvas.cpp:1654 +msgid "Missing \"type\" attribute to \"layer\" element" +msgstr "Il manque un attribut \"type\" à l'élément \"layer\"" + +#: src/synfig/loadcanvas.cpp:1673 +msgid "Installed layer version is smaller than layer version in file" +msgstr "La version de calque installée est plus petite que la version du fichier" + +#: src/synfig/loadcanvas.cpp:1693 +msgid " entry for is not yet supported. Ignoring..." +msgstr "" +"La valeur (nom) n'est pas encore supportée pour (calque). " +"Ignorée." + +#: src/synfig/loadcanvas.cpp:1696 +msgid " entry for is not yet supported. Ignoring..." +msgstr "La valeur n'est pas encore supportée pour (calque). Ignorée." + +#: src/synfig/loadcanvas.cpp:1704 +msgid "Missing \"name\" attribute for ." +msgstr "Attribut \"name\" manquant pour ." + +#: src/synfig/loadcanvas.cpp:1716 +msgid "" +"Found \"use\" attribute for , but it wasn't empty. Ignoring " +"contents..." +msgstr "" +"Attribut \"use\" trouvé pour , mais il n'était pas vide. Contenu " +"ignoré." + +#: src/synfig/loadcanvas.cpp:1721 +msgid "Empty use=\"\" value in " +msgstr "Valeur vide use=\"\" dans " + +#: src/synfig/loadcanvas.cpp:1725 +msgid "Layer rejected canvas link" +msgstr "Le calque a rejeté le lien vers le canevas." + +#: src/synfig/loadcanvas.cpp:1743 +#, c-format +msgid "Unknown ID (%s) referenced in " +msgstr "ID (%s) inconnu référencé par " + +#: src/synfig/loadcanvas.cpp:1759 +msgid " is either missing its contents, or missing a \"use\" attribute." +msgstr "Il manque soit le contenu, soit un attribut \"use\" dans ." + +#: src/synfig/loadcanvas.cpp:1771 src/synfig/loadcanvas.cpp:1791 +msgid "Bad data for " +msgstr "Mauvaises données pour " + +#: src/synfig/loadcanvas.cpp:1779 +#, c-format +msgid "Layer '%s' rejected value for parameter '%s'" +msgstr "Le calque '%s' a rejeté la valeur du paramètre '%s'" + +#: src/synfig/loadcanvas.cpp:1802 +#, c-format +msgid "Unexpected element <%s> after data, ignoring..." +msgstr "Élément <%s> inattendu après les données de . Ignoré. " + +#: src/synfig/loadcanvas.cpp:1957 +msgid "Inline canvas cannot have a section" +msgstr "Un sous-canevas ne peut avoir de section " + +#: src/synfig/loadcanvas.cpp:1965 +msgid "Inline canvas cannot have keyframes" +msgstr "Un sous-canevas ne peut avoir de points clés." + +#: src/synfig/loadcanvas.cpp:1977 +msgid "Inline canvases cannot have metadata" +msgstr "Un sous-canevas ne peut avoir de métadonnées" + +#: src/synfig/loadcanvas.cpp:1985 +msgid " must have a name" +msgstr " doit avoir un nom" + +#: src/synfig/loadcanvas.cpp:1991 +msgid " must have content" +msgstr " doit avoir un contenu" + +#: src/synfig/loadcanvas.cpp:2003 +msgid "blank \"name\" entity" +msgstr "Entité \"name\" vide" + +#: src/synfig/loadcanvas.cpp:2018 +msgid "blank \"desc\" entity" +msgstr "Entité \"desc\" vide" + +#: src/synfig/loadcanvas.cpp:2033 +msgid "blank \"author\" entity" +msgstr "Entité \"author\" vide" + +#: src/synfig/loadcanvas.cpp:2065 +#, c-format +msgid "Canvas '%s' has undefined %s: %s" +msgstr "Le canevas \"%s\" a des valeurs %s:%s non définies" + +#: src/synfig/loadcanvas.cpp:2067 src/synfig/valuenode.cpp:351 +msgid "ValueNode" +msgstr "Nœud de valeur" + +#: src/synfig/loadcanvas.cpp:2067 +msgid "ValueNodes" +msgstr "Nœuds de valeur" + +#: src/synfig/loadcanvas.cpp:2147 +msgid "" +msgstr "" + +#: src/synfig/main.cpp:103 +#, c-format +msgid "API Version mismatch (LIB:%d, PROG:%d)" +msgstr "Version d'API non correspondante (LIB: %d, PROG: %d)" + +#: src/synfig/main.cpp:108 +#, c-format +msgid "Size of Vector mismatch (app:%d, lib:%d)" +msgstr "Taille de Vecteur non correspondante (app: %d, lib: %d)" + +#: src/synfig/main.cpp:113 +#, c-format +msgid "Size of Color mismatch (app:%d, lib:%d)" +msgstr "Taille de Couleur non correspondante (app: %d, lib: %d)" + +#: src/synfig/main.cpp:118 +#, c-format +msgid "Size of Canvas mismatch (app:%d, lib:%d)" +msgstr "Taille de Canevas non correspondante (app: %d, lib: %d)" + +#: src/synfig/main.cpp:123 +#, c-format +msgid "Size of Layer mismatch (app:%d, lib:%d)" +msgstr "Taille de Calque non correspondante (app: %d, lib: %d)" + +#: src/synfig/main.cpp:213 +msgid "Starting Subsystem \"Modules\"" +msgstr "Démarage du sous-système \"Modules\"" + +#: src/synfig/main.cpp:215 +msgid "Unable to initialize subsystem \"Module\"" +msgstr "Impossible d'initialiser le sous-système \"Module\"" + +#: src/synfig/main.cpp:217 +msgid "Starting Subsystem \"Layers\"" +msgstr "Démarage du sous-système \"Layers\"" + +#: src/synfig/main.cpp:221 +msgid "Unable to initialize subsystem \"Layers\"" +msgstr "Impossible d'initialiser le sous-système \"Layers\"" + +#: src/synfig/main.cpp:224 +msgid "Starting Subsystem \"Targets\"" +msgstr "Démarage du sous-système \"Targets\"" + +#: src/synfig/main.cpp:229 +msgid "Unable to initialize subsystem \"Targets\"" +msgstr "Impossible d'initialiser le sous-système \"Targets\"" + +#: src/synfig/main.cpp:232 +msgid "Starting Subsystem \"Importers\"" +msgstr "Démarage du sous-système \"Importers\"" + +#: src/synfig/main.cpp:238 +msgid "Unable to initialize subsystem \"Importers\"" +msgstr "Impossible d'initialiser le sous-système \"Importers\"" + +#: src/synfig/main.cpp:241 +msgid "Starting Subsystem \"ValueNodes\"" +msgstr "Démarage du sous-système \"ValueNodes\"" + +#: src/synfig/main.cpp:248 +msgid "Unable to initialize subsystem \"ValueNodes\"" +msgstr "Impossible d'initialiser le sous-système \"ValueNodes\"" + +#: src/synfig/main.cpp:307 +#, c-format +msgid "Loading modules from %s" +msgstr "Chargement des modules depuis %s" + +#: src/synfig/main.cpp:320 src/tool/main.cpp:243 +msgid "DONE" +msgstr "FINI" + +#: src/synfig/main.cpp:386 src/tool/main.cpp:123 src/tool/main.cpp:164 +msgid "error" +msgstr "erreur" + +#: src/synfig/main.cpp:401 src/tool/main.cpp:130 src/tool/main.cpp:171 +msgid "warning" +msgstr "avertissement" + +#: src/synfig/main.cpp:416 +msgid "info" +msgstr "info" + +#: src/synfig/module.cpp:66 +msgid "Errors on lt_dlinit()" +msgstr "Erreurs lors de lt_dlinit()" + +#: src/synfig/module.cpp:122 +#, c-format +msgid "Attempting to register \"%s\"" +msgstr "Tentative d'enregistrement de \"%s\"" + +#: src/synfig/module.cpp:129 +#, c-format +msgid "Unable to find module \"%s\" (%s)" +msgstr "Impossible de trouver le module \"%s\" (%s)" + +#: src/synfig/module.cpp:133 +#, c-format +msgid "Found module \"%s\"" +msgstr "Module \"%s\" trouvé" + +#: src/synfig/module.cpp:167 +#, c-format +msgid "Unable to find entrypoint in module \"%s\" (%s)" +msgstr "Impossible de trouver le point d'entrée du module \"%s\" (%s)" + +#: src/synfig/module.cpp:180 +msgid "Entrypoint did not return a module." +msgstr "Le point d'entré n'a pas renvoyé un module." + +#: src/synfig/module.cpp:184 +#, c-format +msgid "Success for \"%s\"" +msgstr "Succès pour \"%s\"" + +#: src/synfig/palette.cpp:72 +msgid "Unnamed" +msgstr "SansNom" + +#: src/synfig/palette.cpp:89 +msgid "Surface Palette" +msgstr "Palette de surface" + +#: src/synfig/palette.cpp:284 +#, c-format +msgid "%0.2f%% Gray" +msgstr "Gris %0.2f%%" + +#: src/synfig/palette.cpp:299 +#, c-format +msgid "Unable to open %s for write" +msgstr "Impossible d'ouvrir %s en écriture" + +#: src/synfig/palette.cpp:321 +#, c-format +msgid "Unable to open %s for read" +msgstr "Impossible d'ouvrir %s en lecture" + +#: src/synfig/palette.cpp:329 +#, c-format +msgid "%s does not appear to be a palette file" +msgstr "Il semble que %s ne soit pas un fichier de palette" + +#: src/synfig/paramdesc.cpp:64 +msgid "_Composite" +msgstr "_Composé" + +#: src/synfig/paramdesc.cpp:65 +msgid "_Straight" +msgstr "_Direct" + +#: src/synfig/paramdesc.cpp:66 +msgid "_Onto" +msgstr "De_ssus" + +#: src/synfig/paramdesc.cpp:67 +msgid "S_traight Onto" +msgstr "Direct dessus" + +#: src/synfig/paramdesc.cpp:68 +msgid "_Behind" +msgstr "D_errière" + +#: src/synfig/paramdesc.cpp:69 +msgid "Sc_reen" +msgstr "Éc_ran" + +#: src/synfig/paramdesc.cpp:70 +msgid "Overla_y" +msgstr "Super_poser" + +#: src/synfig/paramdesc.cpp:71 +msgid "_Hard Light" +msgstr "L_umière dure" + +#: src/synfig/paramdesc.cpp:72 +msgid "_Multiply" +msgstr "_Multiplier" + +#: src/synfig/paramdesc.cpp:73 +msgid "_Divide" +msgstr "Di_viser" + +#: src/synfig/paramdesc.cpp:74 +msgid "_Add" +msgstr "_Addition" + +#: src/synfig/paramdesc.cpp:75 +msgid "S_ubtract" +msgstr "S_oustraction" + +#: src/synfig/paramdesc.cpp:76 +msgid "Di_fference" +msgstr "Di_fférence" + +#: src/synfig/paramdesc.cpp:77 +msgid "Bri_ghten" +msgstr "Éc_laircir" + +#: src/synfig/paramdesc.cpp:78 +msgid "Dar_ken" +msgstr "Assombr_ir" + +#: src/synfig/paramdesc.cpp:79 +msgid "Co_lor" +msgstr "Couleur" + +#: src/synfig/paramdesc.cpp:80 +msgid "Hu_e" +msgstr "_Teinte" + +#: src/synfig/paramdesc.cpp:81 +msgid "Saturatio_n" +msgstr "Saturatio_n" + +#: src/synfig/paramdesc.cpp:82 +msgid "Lum_inance" +msgstr "Luminance" + +#: src/synfig/paramdesc.cpp:84 +msgid "Alpha O_ver" +msgstr "Soustraire l'alpha" + +#: src/synfig/paramdesc.cpp:85 +msgid "Al_pha Brighten" +msgstr "Multiplier l'alpha" + +#: src/synfig/paramdesc.cpp:86 +msgid "Al_pha Darken" +msgstr "Ajouter l'alpha" + +#: src/synfig/render.cpp:247 src/synfig/render.cpp:248 +#: src/synfig/render.cpp:302 src/synfig/render.cpp:303 +#: src/synfig/render.cpp:423 src/synfig/render.cpp:424 +#: src/synfig/render.cpp:450 src/synfig/render.cpp:451 +msgid "Target panic" +msgstr "" + +#: src/synfig/savecanvas.cpp:254 +#, c-format +msgid "Unknown value(%s), cannot create XML representation!" +msgstr "Valeur inconnue (%s), impossible d'en créer une représentation XML" + +#: src/synfig/savecanvas.cpp:529 +#, c-format +msgid "Unknown ValueNode Type (%s), cannot create an XML representation" +msgstr "" +"Type de nœud de valeur inconnu (%s), impossible d'en créer une " +"représentation XML" + +#: src/synfig/target_scanline.cpp:129 src/synfig/target_tile.cpp:312 +msgid "Target initialization failure" +msgstr "Échec de l'initialisation de la cible" + +#: src/synfig/target_scanline.cpp:245 src/synfig/target_scanline.cpp:291 +#: src/synfig/target_scanline.cpp:389 src/synfig/target_scanline.cpp:437 +#: src/synfig/target_tile.cpp:254 +msgid "Accelerated Renderer Failure" +msgstr "Échec du rendu accéléré" + +#: src/synfig/target_scanline.cpp:300 src/synfig/target_scanline.cpp:446 +msgid "Unable to put surface on target" +msgstr "Impossible d'appliquer la surface à la cible" + +#: src/synfig/target_scanline.cpp:459 src/synfig/target_tile.cpp:435 +msgid "Caught string :" +msgstr "Chaîne récupérée :" + +#: src/synfig/target_scanline.cpp:464 src/synfig/target_tile.cpp:440 +msgid "Ran out of memory (Probably a bug)" +msgstr "À court de mémoire (Certainement un bogue)" + +#: src/synfig/target_scanline.cpp:469 src/synfig/target_tile.cpp:445 +msgid "Caught unknown error, rethrowing..." +msgstr "Erreur inconnue récupérée, relancée..." + +#: src/synfig/target_tile.cpp:141 +msgid "Bad Tile Size" +msgstr "Mauvaise taille de \"tuile\" d''image" + +#: src/synfig/target_tile.cpp:191 +msgid "Parametric Renderer Failure" +msgstr "Échec du moteur de rendu paramétrique" + +#: src/synfig/target_tile.cpp:198 src/synfig/target_tile.cpp:262 +msgid "Bad surface" +msgstr "Mauvaise surface" + +#: src/synfig/target_tile.cpp:208 src/synfig/target_tile.cpp:274 +msgid "add_tile():Unable to put surface on target" +msgstr "add_tile(): Impossible d'appliquer la surface à la cible" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:234 src/synfig/value.cpp:289 +msgid "bool" +msgstr "booléen" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:236 src/synfig/value.cpp:287 +msgid "integer" +msgstr "entier" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:238 +msgid "angle" +msgstr "angle" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:240 src/synfig/value.cpp:281 +msgid "time" +msgstr "temps" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:242 src/synfig/value.cpp:284 +msgid "real" +msgstr "réel" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:244 +msgid "vector" +msgstr "vecteur" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:246 +msgid "color" +msgstr "couleur" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:248 +msgid "segment" +msgstr "segment" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:250 +msgid "bline_point" +msgstr "point de BLine" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:252 +msgid "list" +msgstr "liste" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:254 +msgid "canvas" +msgstr "canevas" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:256 +msgid "string" +msgstr "chaîne" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:258 +msgid "gradient" +msgstr "dégradé" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:260 +msgid "nil" +msgstr "nul" + +#: src/synfig/valuenode.cpp:135 src/synfig/valuenode_composite.cpp:431 +msgid "Composite" +msgstr "Composé" + +#: src/synfig/valuenode.cpp:136 src/synfig/valuenode_radialcomposite.cpp:303 +msgid "Radial Composite" +msgstr "Composé radial" + +#: src/synfig/valuenode.cpp:137 src/synfig/valuenode_reference.cpp:156 +msgid "Reference" +msgstr "Référence" + +#: src/synfig/valuenode.cpp:138 src/synfig/valuenode_blinecalctangent.cpp:244 +#: src/synfig/valuenode_blinecalcwidth.cpp:208 +#: src/synfig/valuenode_exp.cpp:157 src/synfig/valuenode_scale.cpp:217 +msgid "Scale" +msgstr "Échelle" + +#: src/synfig/valuenode.cpp:139 src/synfig/valuenode_segcalctangent.cpp:100 +msgid "Segment Tangent" +msgstr "Tangente du segment" + +#: src/synfig/valuenode.cpp:140 src/synfig/valuenode_segcalcvertex.cpp:98 +msgid "Segment Vertex" +msgstr "Vertex du segment" + +#: src/synfig/valuenode.cpp:141 src/synfig/valuenode_stripes.cpp:78 +#: src/synfig/valuenode_stripes.cpp:225 +msgid "Stripes" +msgstr "Rayures" + +#: src/synfig/valuenode.cpp:142 src/synfig/valuenode_subtract.cpp:233 +msgid "Subtract" +msgstr "Soustraction" + +#: src/synfig/valuenode.cpp:143 src/synfig/valuenode_twotone.cpp:179 +msgid "Two-Tone" +msgstr "Deux-tons" + +#: src/synfig/valuenode.cpp:144 src/synfig/valuenode_bline.cpp:850 +#: src/synfig/valuenode_blinecalctangent.cpp:240 +#: src/synfig/valuenode_blinecalcvertex.cpp:199 +#: src/synfig/valuenode_blinecalcwidth.cpp:205 +msgid "BLine" +msgstr "BLine" + +#: src/synfig/valuenode.cpp:145 src/synfig/valuenode_dynamiclist.cpp:713 +msgid "Dynamic List" +msgstr "Liste dynamique" + +#: src/synfig/valuenode.cpp:146 src/synfig/valuenode_gradientrotate.cpp:76 +#: src/synfig/valuenode_gradientrotate.cpp:188 +msgid "Gradient Rotate" +msgstr "Rotation de dégradé" + +#: src/synfig/valuenode.cpp:147 src/synfig/valuenode_sine.cpp:106 +msgid "Sine" +msgstr "Sinus" + +#: src/synfig/valuenode.cpp:149 src/synfig/valuenode_timedswap.cpp:264 +msgid "Timed Swap" +msgstr "Échange temporisé" + +#: src/synfig/valuenode.cpp:150 src/synfig/valuenode_repeat_gradient.cpp:81 +#: src/synfig/valuenode_repeat_gradient.cpp:234 +msgid "Repeat Gradient" +msgstr "Répéter le dégrader" + +#: src/synfig/valuenode.cpp:151 src/synfig/valuenode_exp.cpp:102 +msgid "Exponential" +msgstr "Exponentiel" + +#: src/synfig/valuenode.cpp:152 src/synfig/valuenode_add.cpp:227 +msgid "Add" +msgstr "Addition" + +#: src/synfig/valuenode.cpp:153 src/synfig/valuenode_blinecalctangent.cpp:172 +msgid "BLine Tangent" +msgstr "Tangente de BLine" + +#: src/synfig/valuenode.cpp:154 src/synfig/valuenode_blinecalcvertex.cpp:140 +msgid "BLine Vertex" +msgstr "Vertex de BLine" + +#: src/synfig/valuenode.cpp:155 src/synfig/valuenode_range.cpp:230 +msgid "Range" +msgstr "Plage de valeurs" + +#: src/synfig/valuenode.cpp:157 src/synfig/valuenode_switch.cpp:170 +msgid "Switch" +msgstr "Commutateur" + +#: src/synfig/valuenode.cpp:158 src/synfig/valuenode_cos.cpp:106 +msgid "Cos" +msgstr "Cos" + +#: src/synfig/valuenode.cpp:159 +msgid "aTan2" +msgstr "aTan2" + +#: src/synfig/valuenode.cpp:160 +msgid "Reverse Tangent" +msgstr "Inverser la tangente" + +#: src/synfig/valuenode.cpp:162 src/synfig/valuenode_reciprocal.cpp:179 +msgid "Reciprocal" +msgstr "Réciproque" + +#: src/synfig/valuenode.cpp:164 src/synfig/valuenode_integer.cpp:183 +msgid "From Integer" +msgstr "Depuis un entier" + +#: src/synfig/valuenode.cpp:166 src/synfig/valuenode_blinecalcwidth.cpp:143 +msgid "BLine Width" +msgstr "Épaisseur de BLine" + +#: src/synfig/valuenode.cpp:168 +msgid "Vector Angle" +msgstr "Angle du vecteur" + +#: src/synfig/valuenode.cpp:169 +msgid "Vector Length" +msgstr "Longueur du vecteur" + +#: src/synfig/valuenode.cpp:170 +msgid "Vector X" +msgstr "X vecteur" + +#: src/synfig/valuenode.cpp:171 +msgid "Vector Y" +msgstr "Y vecteur" + +#: src/synfig/valuenode.cpp:172 +msgid "Gradient Color" +msgstr "Couleur de dégradé" + +#: src/synfig/valuenode.cpp:173 +msgid "Dot Product" +msgstr "" + +#: src/synfig/valuenode.cpp:174 src/synfig/valuenode_timestring.cpp:115 +msgid "Time String" +msgstr "" + +#: src/synfig/valuenode.cpp:175 src/synfig/valuenode_realstring.cpp:121 +msgid "Real String" +msgstr "" + +#: src/synfig/valuenode.cpp:176 src/synfig/valuenode_join.cpp:140 +msgid "Joined List" +msgstr "" + +#: src/synfig/valuenode.cpp:177 +msgid "Angle String" +msgstr "" + +#: src/synfig/valuenode.cpp:178 +msgid "Int String" +msgstr "" + +#: src/synfig/valuenode.cpp:179 +msgid "Logarithm" +msgstr "Logarithme" + +#: src/synfig/valuenode.cpp:246 +#, c-format +msgid "Bad type: ValueNode '%s' doesn't accept type '%s'" +msgstr "Mauvais type : Le nœud de valeur \"%s\" n'accepte pas le type \"%s\"" + +#: src/synfig/valuenode.cpp:511 +msgid "Placeholder" +msgstr "" + +#: src/synfig/valuenode.h:74 +#, c-format +msgid "%s:%d wrong type for %s: need %s but got %s" +msgstr "%s:%d mauvais type pour %s : besoin de %s et non %s" + +#: src/synfig/valuenode_add.cpp:98 src/synfig/valuenode_gradientrotate.cpp:76 +#: src/synfig/valuenode_integer.cpp:78 src/synfig/valuenode_integer.cpp:170 +#: src/synfig/valuenode_range.cpp:86 +#: src/synfig/valuenode_repeat_gradient.cpp:81 +#: src/synfig/valuenode_scale.cpp:87 src/synfig/valuenode_stripes.cpp:78 +#: src/synfig/valuenode_subtract.cpp:98 +msgid ":Bad type " +msgstr ": Mauvais type" + +#: src/synfig/valuenode_add.cpp:123 src/synfig/valuenode_scale.cpp:116 +#: src/synfig/valuenode_subtract.cpp:129 +msgid "One or both of my parameters aren't set!" +msgstr "Un ou deux de mes paramètres ne sont pas définis" + +#: src/synfig/valuenode_add.cpp:188 src/synfig/valuenode_subtract.cpp:194 +msgid "LHS" +msgstr "LHS" + +#: src/synfig/valuenode_add.cpp:189 src/synfig/valuenode_subtract.cpp:195 +msgid "RHS" +msgstr "RHS" + +#: src/synfig/valuenode_add.cpp:190 src/synfig/valuenode_scale.cpp:181 +#: src/synfig/valuenode_subtract.cpp:196 +msgid "Scalar" +msgstr "Scalaire" + +#: src/synfig/valuenode_animated.cpp:261 src/synfig/valuenode_animated.cpp:285 +#: src/synfig/valuenode_animated.cpp:561 src/synfig/valuenode_animated.cpp:579 +#: src/synfig/valuenode_animated.cpp:659 src/synfig/valuenode_animated.cpp:678 +msgid "A waypoint already exists at this point in time" +msgstr "Un point de passage existe déjà à ce moment" + +#: src/synfig/valuenode_animated.cpp:1056 +#, c-format +msgid "%s: You cannot use a %s in an animated ValueNode" +msgstr "%s : Vous ne pouvez pas utiliser un %s dans un nœud de valeur animé." + +#: src/synfig/valuenode_animated.cpp:1091 +msgid "Animated" +msgstr "Animé" + +#: src/synfig/valuenode_bline.cpp:797 src/synfig/valuenode_dynamiclist.cpp:619 +msgid "No entries in list" +msgstr "Pas d'entrées dans la liste" + +#: src/synfig/valuenode_bline.cpp:800 src/synfig/valuenode_dynamiclist.cpp:622 +msgid "No entries in ret_list" +msgstr "Pas d'entrées dans la liste ret_list" + +#: src/synfig/valuenode_bline.cpp:809 +#, c-format +msgid "Vertex %03d" +msgstr "Vertex %03d" + +#: src/synfig/valuenode_blinecalctangent.cpp:243 +#: src/synfig/valuenode_gradientrotate.cpp:148 +#: src/synfig/valuenode_linear.cpp:215 +msgid "Offset" +msgstr "Décalage" + +#: src/synfig/valuenode_blinecalctangent.cpp:245 +msgid "Fixed Length" +msgstr "Longueur fixe" + +#: src/synfig/valuenode_composite.cpp:161 +#: src/synfig/valuenode_composite.cpp:181 +msgid "Bad type for composite" +msgstr "Erreur de type pour un composé" + +#: src/synfig/valuenode_composite.cpp:267 +msgid "Red" +msgstr "Rouge" + +#: src/synfig/valuenode_composite.cpp:269 +msgid "Green" +msgstr "Vert" + +#: src/synfig/valuenode_composite.cpp:271 +msgid "Blue" +msgstr "Bleu" + +#: src/synfig/valuenode_composite.cpp:273 +#: src/synfig/valuenode_radialcomposite.cpp:210 +msgid "Alpha" +msgstr "Alpha" + +#: src/synfig/valuenode_composite.cpp:277 +msgid "Vertex 1" +msgstr "Vertex 1" + +#: src/synfig/valuenode_composite.cpp:279 +#: src/synfig/valuenode_composite.cpp:295 +msgid "Tangent 1" +msgstr "Tangente 1" + +#: src/synfig/valuenode_composite.cpp:281 +msgid "Vertex 2" +msgstr "Vertex 2" + +#: src/synfig/valuenode_composite.cpp:283 +#: src/synfig/valuenode_composite.cpp:297 +msgid "Tangent 2" +msgstr "Tangente 2" + +#: src/synfig/valuenode_composite.cpp:287 +msgid "Vertex" +msgstr "Vertex" + +#: src/synfig/valuenode_composite.cpp:293 +msgid "Split Tangents" +msgstr "Sépater les tangentes" + +#: src/synfig/valuenode_composite.cpp:304 +#: src/synfig/valuenode_radialcomposite.cpp:221 +#, c-format +msgid "C%d" +msgstr "" + +#: src/synfig/valuenode_const.cpp:126 +msgid "Constant" +msgstr "Constante" + +#: src/synfig/valuenode_cos.cpp:167 src/synfig/valuenode_sine.cpp:167 +msgid "Amplitude" +msgstr "Amplitude" + +#: src/synfig/valuenode_duplicate.cpp:121 +msgid "From" +msgstr "Depuis" + +#: src/synfig/valuenode_duplicate.cpp:122 +msgid "To" +msgstr "Vers" + +#: src/synfig/valuenode_dynamiclist.cpp:613 +msgid "List type/item type mismatch, throwing away mismatch" +msgstr "Incompatibilité entre type et élement de liste, rejet de l'erreur" + +#: src/synfig/valuenode_dynamiclist.cpp:661 +#, c-format +msgid "Item %03d" +msgstr "Élément %03d" + +#: src/synfig/valuenode_exp.cpp:155 +msgid "Exponent" +msgstr "Exposant" + +#: src/synfig/valuenode_integer.cpp:132 +msgid "Integer" +msgstr "Entier" + +#: src/synfig/valuenode_join.cpp:202 +msgid "Strings" +msgstr "Chaînes" + +#: src/synfig/valuenode_join.cpp:203 src/synfig/valuenode_timedswap.cpp:221 +msgid "Before" +msgstr "Avant" + +#: src/synfig/valuenode_join.cpp:204 +msgid "Separator" +msgstr "Séparateur" + +#: src/synfig/valuenode_join.cpp:205 src/synfig/valuenode_timedswap.cpp:222 +msgid "After" +msgstr "Après" + +#: src/synfig/valuenode_linear.cpp:209 +msgid "Rate" +msgstr "Taux" + +#: src/synfig/valuenode_linear.cpp:212 +msgid "Slope" +msgstr "Pente" + +#: src/synfig/valuenode_radialcomposite.cpp:121 +#: src/synfig/valuenode_radialcomposite.cpp:137 +msgid "Bad type for radialcomposite" +msgstr "Mauvais type de composé radial" + +#: src/synfig/valuenode_radialcomposite.cpp:199 +msgid "Theta" +msgstr "Theta" + +#: src/synfig/valuenode_radialcomposite.cpp:204 +msgid "Luma" +msgstr "Luminance" + +#: src/synfig/valuenode_radialcomposite.cpp:206 +msgid "Saturation" +msgstr "Saturation" + +#: src/synfig/valuenode_radialcomposite.cpp:208 +msgid "Hue" +msgstr "Teinte" + +#: src/synfig/valuenode_range.cpp:118 +msgid "Some of my parameters aren't set!" +msgstr "Certains de mes paramètres ne sont pas définis" + +#: src/synfig/valuenode_range.cpp:191 +msgid "Min" +msgstr "Min" + +#: src/synfig/valuenode_range.cpp:192 +msgid "Max" +msgstr "Max" + +#: src/synfig/valuenode_realstring.cpp:183 +msgid "Real" +msgstr "Réel" + +#: src/synfig/valuenode_realstring.cpp:185 +msgid "Precision" +msgstr "Précision" + +#: src/synfig/valuenode_realstring.cpp:186 +msgid "Zero Padded" +msgstr "Compléter avec des zéros" + +#: src/synfig/valuenode_reciprocal.cpp:125 +msgid "Epsilon" +msgstr "Epsilon" + +#: src/synfig/valuenode_reciprocal.cpp:126 +msgid "Infinite" +msgstr "Infini" + +#: src/synfig/valuenode_repeat_gradient.cpp:184 +msgid "Count" +msgstr "Nombre" + +#: src/synfig/valuenode_repeat_gradient.cpp:186 +msgid "Specify Start" +msgstr "Définir le début" + +#: src/synfig/valuenode_repeat_gradient.cpp:187 +msgid "Specify End" +msgstr "Définir la fin" + +#: src/synfig/valuenode_repeat_gradient.cpp:188 +msgid "Start Color" +msgstr "Couleur de début" + +#: src/synfig/valuenode_repeat_gradient.cpp:189 +msgid "End Color" +msgstr "Couleur de fin" + +#: src/synfig/valuenode_segcalctangent.cpp:159 +#: src/synfig/valuenode_segcalcvertex.cpp:157 +msgid "Segment" +msgstr "Segment" + +#: src/synfig/valuenode_step.cpp:215 src/tool/main.cpp:945 +msgid "Start Time" +msgstr "Heure de début" + +#: src/synfig/valuenode_step.cpp:216 +msgid "Intersection" +msgstr "Intersection" + +#: src/synfig/valuenode_stripes.cpp:170 +msgid "Color 1" +msgstr "Couleur 1" + +#: src/synfig/valuenode_stripes.cpp:172 +msgid "Color 2" +msgstr "Couleur 2" + +#: src/synfig/valuenode_stripes.cpp:174 +msgid "Stripe Count" +msgstr "Nombre de rayures" + +#: src/synfig/valuenode_timedswap.cpp:223 +msgid "Swap Time" +msgstr "Moment de l'échange" + +#: src/synfig/valuenode_timedswap.cpp:224 +msgid "Swap Duration" +msgstr "Durée de l'échange" + +#: src/synfig/valuenode_timestring.cpp:168 +msgid "Time" +msgstr "Temps" + +#: src/synfig/valuenode_twotone.cpp:136 +msgid "Color1" +msgstr "Couleur1" + +#: src/synfig/valuenode_twotone.cpp:138 +msgid "Color2" +msgstr "Couleur2" + +#: src/tool/main.cpp:216 +msgid "Line" +msgstr "Ligne" + +#: src/tool/main.cpp:216 +msgid " of " +msgstr " de " + +#: src/tool/main.cpp:322 +msgid "syntax: " +msgstr "syntaxe : " + +#: src/tool/main.cpp:325 +msgid "Print out usage and syntax info" +msgstr "Afficher les informations d'utilisation et de syntaxe" + +#: src/tool/main.cpp:328 +msgid "Specify output target (Default:unknown)" +msgstr "Définir la cible en sortie (Défaut : inconnue)" + +#: src/tool/main.cpp:329 +msgid "Set the image width (Use zero for file default)" +msgstr "" +"Définir la largeur de l'image (Utiliser zéro pour les valeurs par défaut du " +"fichier)" + +#: src/tool/main.cpp:330 +msgid "Set the image height (Use zero for file default)" +msgstr "" +"Définir la hauteur de l'image (Utiliser zéro pour les valeurs par défaut du " +"fichier)" + +#: src/tool/main.cpp:331 +msgid "Set the diagonal size of image window (Span)" +msgstr "Définir la diagonale de la fenêtre d'image (Étendue)" + +#: src/tool/main.cpp:332 +msgid "Set antialias amount for parametric renderer." +msgstr "Définir la valeur d'anticrénelage pour le moteur de rendu paramétrique." + +#: src/tool/main.cpp:333 +#, c-format +msgid "Specify image quality for accelerated renderer (default=%d)" +msgstr "Définir la qualité d'image pour accélérer le rendu (défaut = %d )" + +#: src/tool/main.cpp:334 +msgid "Gamma (default=2.2)" +msgstr "Gamma (défaut = 2.2)" + +#: src/tool/main.cpp:335 +msgid "Verbose Output (add more for more verbosity)" +msgstr "Sortie verbeuse (en ajouter pour avoir une sortie encore plus détaillée)" + +#: src/tool/main.cpp:336 +msgid "Quiet mode (No progress/time-remaining display)" +msgstr "Mode silencieux (Pas de barre de progression/de temps restant affiché)" + +#: src/tool/main.cpp:337 +msgid "Render the canvas with the given id instead of the root." +msgstr "Rendre le canevas avec l'identifiant donné au lieu de l'id racine." + +#: src/tool/main.cpp:338 +msgid "Specify output filename" +msgstr "Spécifier le nom de fichier de sortie" + +#: src/tool/main.cpp:339 +msgid "Enable multithreaded renderer using specified # of threads" +msgstr "Activer le rendu multiprocessus en utilisant le nombre donné de processus" + +#: src/tool/main.cpp:340 +msgid "Print Benchmarks" +msgstr "Afficher les tests de performance" + +#: src/tool/main.cpp:341 +msgid "Set the frame rate" +msgstr "Définir le nombre d'images par seconde" + +#: src/tool/main.cpp:342 +msgid "Render a single frame at " +msgstr "Rendre une seule image à un nombre de secondes " + +#: src/tool/main.cpp:343 src/tool/main.cpp:344 +msgid "Set the starting time" +msgstr "Définir l'heure de début" + +#: src/tool/main.cpp:345 +msgid "Set the ending time" +msgstr "Définir l'heure de fin" + +#: src/tool/main.cpp:346 +msgid "Set the physical resolution (dots-per-inch)" +msgstr "Définir la résolution physique (points par pouce)" + +#: src/tool/main.cpp:347 +msgid "Set the physical X resolution (dots-per-inch)" +msgstr "Définir la résolution physique X (points par pouce)" + +#: src/tool/main.cpp:348 +msgid "Set the physical Y resolution (dots-per-inch)" +msgstr "Définir la résolution physique Y (points par pouce)" + +#: src/tool/main.cpp:350 +msgid "List the exported canvases in the composition" +msgstr "Lister les canevas exportés dans la composition" + +#: src/tool/main.cpp:351 +msgid "Print out specified details of the root canvas" +msgstr "Imprimer les détails spécifiés du canevas racine" + +#: src/tool/main.cpp:352 +msgid "Append layers in to composition" +msgstr "Ajouter les calques de dans la composition" + +#: src/tool/main.cpp:354 +msgid "Print out layer's description, parameter info, etc." +msgstr "Afficher les descriptions, infos des paramètres, etc. du calque" + +#: src/tool/main.cpp:355 +msgid "Print out the list of available layers" +msgstr "Afficher la liste des calques disponibles" + +#: src/tool/main.cpp:356 +msgid "Print out the list of available targets" +msgstr "Afficher la liste des cibles disponibles" + +#: src/tool/main.cpp:357 +msgid "Print out the list of available importers" +msgstr "Afficher la liste des importeurs disponibles" + +#: src/tool/main.cpp:358 +msgid "Print out the list of available ValueNodes" +msgstr "Afficher la liste des nœuds de valeur disponibles" + +#: src/tool/main.cpp:359 +msgid "Print out the list of loaded modules" +msgstr "Afficher la liste des modules chargés" + +#: src/tool/main.cpp:360 +msgid "Print out version information" +msgstr "Afficher les informations de version" + +#: src/tool/main.cpp:361 +msgid "Print out misc build information" +msgstr "Affichier diverses informations de compilation" + +#: src/tool/main.cpp:362 +msgid "Print out license information" +msgstr "Afficher les informations de licence" + +#: src/tool/main.cpp:365 +msgid "Test GUID generation" +msgstr "Tester la génération de GUID" + +#: src/tool/main.cpp:366 +msgid "Test signal implementation" +msgstr "Tester l'implémentation des signaux" + +#: src/tool/main.cpp:616 +#, c-format +msgid "Antialiasing set to %d, (%d samples per pixel)" +msgstr "Anti-crénelage à %d (%d échantillons par pixel)" + +#: src/tool/main.cpp:624 +#, c-format +msgid "Span set to %d units" +msgstr "Étendue de l'image à %d unités" + +#: src/tool/main.cpp:634 +#, c-format +msgid "Frame rate set to %d frames per second" +msgstr "Nombre d'images par secondes défini à %d" + +#: src/tool/main.cpp:644 +#, c-format +msgid "Physical resolution set to %f dpi" +msgstr "Résolution physique à %f ppp" + +#: src/tool/main.cpp:654 +#, c-format +msgid "Physical X resolution set to %f dpi" +msgstr "Résolution physique X à %f ppp" + +#: src/tool/main.cpp:664 +#, c-format +msgid "Physical Y resolution set to %f dpi" +msgstr "Résolution physique Y à %f ppp" + +#: src/tool/main.cpp:685 +msgid "Rendering frame at " +msgstr "Rendu de l'image à " + +#: src/tool/main.cpp:707 +#, c-format +msgid "Resolution set to %dx%d" +msgstr "Résolution à %dx%d" + +#: src/tool/main.cpp:724 +#, c-format +msgid "Quality set to %d" +msgstr "Qualité à %d" + +#: src/tool/main.cpp:744 +#, c-format +msgid "Threads set to %d" +msgstr "Processus (threads) à %d" + +#: src/tool/main.cpp:914 +msgid "Unrecognised canvas variable: " +msgstr "Variable de canevas inconnue :" + +#: src/tool/main.cpp:915 +msgid "Recognized variables are:" +msgstr "Les variables connues sont :" + +#: src/tool/main.cpp:951 +msgid "End Time" +msgstr "Heure de fin" + +#: src/tool/main.cpp:957 +msgid "Frame Rate" +msgstr "Images par seconde" + +#: src/tool/main.cpp:963 +msgid "Start Frame" +msgstr "Image de début" + +#: src/tool/main.cpp:969 +msgid "End Frame" +msgstr "Image de fin" + +#: src/tool/main.cpp:990 +msgid "Image Aspect Ratio" +msgstr "Ratio d'aspect d'image" + +#: src/tool/main.cpp:999 +msgid "Pixel Width" +msgstr "Largeur de pixel" + +#: src/tool/main.cpp:1005 +msgid "Pixel Height" +msgstr "Hauteur de pixel" + +#: src/tool/main.cpp:1011 +msgid "Pixel Aspect Ratio" +msgstr "Ratio d'aspect des pixels" + +#: src/tool/main.cpp:1020 +msgid "Top Left" +msgstr "Haut-Gauche" + +#: src/tool/main.cpp:1027 +msgid "Bottom Right" +msgstr "Bas-Droite" + +#: src/tool/main.cpp:1034 +msgid "Physical Width" +msgstr "Largeur physique" + +#: src/tool/main.cpp:1040 +msgid "Physical Height" +msgstr "Hauteur physique" + +#: src/tool/main.cpp:1046 +msgid "X Resolution" +msgstr "Résolution X" + +#: src/tool/main.cpp:1052 +msgid "Y Resolution" +msgstr "Résolution Y" + +#: src/tool/main.cpp:1058 +msgid "Diagonal Image Span" +msgstr "Étendue de l'image (Diagonale)" + +#: src/tool/main.cpp:1067 +msgid "Interlaced" +msgstr "Entrelacé" + +#: src/tool/main.cpp:1073 +msgid "Antialias" +msgstr "Anti-crénelage" + +#: src/tool/main.cpp:1085 +msgid "Flags" +msgstr "Drapeaux" + +#: src/tool/main.cpp:1091 +msgid "Focus" +msgstr "Centre" + +#: src/tool/main.cpp:1098 +msgid "Background Color" +msgstr "Couleur de fond" + +#: src/tool/main.cpp:1108 +msgid "Metadata" +msgstr "Métadonnée" + +#: src/tool/main.cpp:1136 +msgid "FATAL: Synfig Version Mismatch" +msgstr "Erreur Fatale : Incompatibilité avec la version de Synfig" + +#: src/tool/main.cpp:1152 +msgid "verbosity set to " +msgstr "Verbosité à " + +#: src/tool/main.cpp:1182 src/tool/main.cpp:1206 src/tool/main.cpp:1214 +#: src/tool/main.cpp:1315 src/tool/main.cpp:1341 +msgid "Throwing out job..." +msgstr "Rejet du job ..." + +#: src/tool/main.cpp:1205 +msgid "Unable to find canvas with ID \"" +msgstr "Impossible de trouver le canevas ayant l'ID \"" + +#: src/tool/main.cpp:1205 src/tool/main.cpp:1213 +msgid "\" in " +msgstr "\" dans " + +#: src/tool/main.cpp:1213 +msgid "Invalid canvas name \"" +msgstr "Nom de canevas invalide \"" + +#: src/tool/main.cpp:1227 +msgid "Quality set to " +msgstr "Qualité à " + +#: src/tool/main.cpp:1247 +msgid "Appended contents of " +msgstr "Ajout des contenus de " + +#: src/tool/main.cpp:1251 +msgid "Attempting to determine target/outfile..." +msgstr "Tentative de déterminer le type de cible/fichier de sortie ..." + +#: src/tool/main.cpp:1257 +msgid "Target name undefined, attempting to figure it out" +msgstr "Nom de cible non défini, tentative pour le déterminer" + +#: src/tool/main.cpp:1286 +msgid "Defaulting to PNG target..." +msgstr "Passage par défaut à la cible PNG ..." + +#: src/tool/main.cpp:1305 +msgid "Creating the target..." +msgstr "Création de la cible ..." + +#: src/tool/main.cpp:1314 +msgid "Unknown target for " +msgstr "Cible inconnue pour " + +#: src/tool/main.cpp:1325 +msgid "Setting the canvas on the target..." +msgstr "Définition du canevas de la cible ..." + +#: src/tool/main.cpp:1327 +msgid "Setting the quality of the target..." +msgstr "Définition de la qualité de la cible ..." + +#: src/tool/main.cpp:1337 +msgid "Unidentified arguments for " +msgstr "Paramètres inconnus pour " + +#: src/tool/main.cpp:1350 +msgid "Unidentified arguments:" +msgstr "Paramètres inconnus :" + +#: src/tool/main.cpp:1359 +msgid "Nothing to do!" +msgstr "Rien à faire." + +#: src/tool/main.cpp:1402 +msgid "Rendering..." +msgstr "Rendu en cours ..." + +#: src/tool/main.cpp:1418 +msgid "Done." +msgstr "Fini." + diff --git a/synfig-core/po/ru.po b/synfig-core/po/ru.po new file mode 100644 index 0000000..db497d9 --- /dev/null +++ b/synfig-core/po/ru.po @@ -0,0 +1,3151 @@ +msgid "" +msgstr "" +"Project-Id-Version: Synfig Backend\n" +"Report-Msgid-Bugs-To: http://synfig.org/Bugs\n" +"POT-Creation-Date: 2008-11-25 23:27+0100\n" +"PO-Revision-Date: 2008-11-22 04:22+0300\n" +"Last-Translator: Alexandre Prokoudine \n" +"Language-Team: GNOME Cyrillic \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Russian\n" +"X-Poedit-Country: RUSSIAN FEDERATION\n" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:63 +#: src/modules/lyr_freetype/lyr_freetype.cpp:507 +msgid "Text" +msgstr "Текст" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:64 +#: src/modules/lyr_std/import.cpp:59 src/modules/lyr_std/supersample.cpp:56 +#: src/modules/lyr_std/timeloop.cpp:58 src/modules/lyr_std/xorpattern.cpp:55 +#: src/modules/mod_particle/plant.cpp:69 src/synfig/layer_duplicate.cpp:57 +#: src/synfig/layer_pastecanvas.cpp:78 +msgid "Other" +msgstr "Прочие" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:94 +msgid "Text Layer" +msgstr "Текстовый слой" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:380 +msgid "unable to initialize" +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:399 +msgid "empty font set" +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:508 +msgid "Text to Render" +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:513 +#: src/modules/lyr_std/shade.cpp:375 +#: src/modules/mod_geometry/checkerboard.cpp:121 +#: src/modules/mod_geometry/circle.cpp:125 +#: src/modules/mod_geometry/rectangle.cpp:122 src/synfig/layer_shape.cpp:1192 +#: src/synfig/layer_solidcolor.cpp:99 +msgid "Color" +msgstr "Цвет" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:514 +msgid "Color of the text" +msgstr "Цвет текста" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:518 +msgid "Font Family" +msgstr "Гарнитура" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:523 +msgid "Style" +msgstr "Начертание" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:525 +#: src/modules/lyr_freetype/lyr_freetype.cpp:535 +msgid "Normal" +msgstr "Обычное" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:526 +msgid "Oblique" +msgstr "Полужирное" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:527 +msgid "Italic" +msgstr "Курсивное" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:531 +msgid "Weight" +msgstr "Насыщенность" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:533 +msgid "Ultralight" +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:534 +msgid "light" +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:536 +msgid "Bold" +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:537 +msgid "Ultrabold" +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:538 +msgid "Heavy" +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:541 +msgid "Horizontal Spacing" +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:542 +msgid "Describes how close glyphs are horizontally" +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:546 +msgid "Vertical Spacing" +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:547 +msgid "Describes how close lines of text are vertically" +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:551 +#: src/modules/lyr_std/shade.cpp:381 src/modules/lyr_std/xorpattern.cpp:125 +#: src/modules/mod_filter/blur.cpp:242 +#: src/modules/mod_filter/radialblur.cpp:111 +#: src/modules/mod_geometry/checkerboard.cpp:128 +#: src/modules/mod_noise/distort.cpp:201 src/modules/mod_noise/noise.cpp:256 +msgid "Size" +msgstr "Размер" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:552 +msgid "Size of the text" +msgstr "Кегль текста" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:559 +msgid "Orientation" +msgstr "Ориентация" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:560 +msgid "Text Orientation" +msgstr "Ориентация текста" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:565 +#: src/modules/lyr_std/insideout.cpp:141 src/modules/lyr_std/rotate.cpp:112 +#: src/modules/lyr_std/shade.cpp:378 src/modules/lyr_std/translate.cpp:97 +#: src/modules/lyr_std/xorpattern.cpp:122 +#: src/modules/mod_filter/radialblur.cpp:106 +#: src/modules/mod_geometry/checkerboard.cpp:125 +#: src/modules/mod_geometry/circle.cpp:137 +#: src/modules/mod_gradient/curvegradient.cpp:533 +#: src/modules/mod_particle/plant.cpp:390 src/synfig/layer_pastecanvas.cpp:127 +#: src/synfig/layer_shape.cpp:1196 src/synfig/valuenode_composite.cpp:291 +msgid "Origin" +msgstr "Исходная точка" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:566 +msgid "Text Position" +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:570 +msgid "Font" +msgstr "Шрифт" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:571 +msgid "Filename of the font to use" +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:578 +msgid "Kerning" +msgstr "Кернинг" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:579 +msgid "Enables/Disables font kerning (If the font supports it)" +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:583 +msgid "Sharpen Edges" +msgstr "Резкость краёв" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:584 +msgid "Turn this off if you are going to be animating the text" +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:587 +#: src/modules/lyr_std/shade.cpp:398 src/modules/mod_geometry/circle.cpp:140 +#: src/synfig/layer_shape.cpp:1199 +msgid "Invert" +msgstr "Инвертировать" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:644 +msgid "No face loaded, no text will be rendered." +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:670 +msgid "Text too small, no text will be rendered." +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:694 +msgid "Unable to set face size." +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:737 +msgid "Invalid multibyte sequence - is the locale set?\n" +msgstr "" + +#: src/modules/lyr_freetype/lyr_freetype.cpp:744 +msgid "Can't parse multibyte character.\n" +msgstr "" + +#: src/modules/lyr_std/bevel.cpp:67 +msgid "Bevel" +msgstr "Фаска" + +#: src/modules/lyr_std/bevel.cpp:68 src/modules/lyr_std/shade.cpp:67 +msgid "Stylize" +msgstr "Стилизация" + +#: src/modules/lyr_std/bevel.cpp:356 src/modules/lyr_std/shade.cpp:387 +#: src/modules/mod_filter/blur.cpp:246 +#: src/modules/mod_filter/halftone2.cpp:166 +msgid "Type" +msgstr "Тип" + +#: src/modules/lyr_std/bevel.cpp:357 src/modules/lyr_std/shade.cpp:388 +#: src/modules/mod_filter/blur.cpp:247 +msgid "Type of blur to use" +msgstr "Тип используемого размывания" + +#: src/modules/lyr_std/bevel.cpp:359 src/modules/lyr_std/shade.cpp:390 +#: src/modules/mod_filter/blur.cpp:249 src/synfig/layer_shape.cpp:1212 +msgid "Box Blur" +msgstr "" + +#: src/modules/lyr_std/bevel.cpp:360 src/modules/lyr_std/shade.cpp:391 +#: src/modules/mod_filter/blur.cpp:250 src/synfig/layer_shape.cpp:1213 +msgid "Fast Gaussian Blur" +msgstr "Быстрое гауссово" + +#: src/modules/lyr_std/bevel.cpp:361 src/modules/lyr_std/shade.cpp:392 +#: src/modules/mod_filter/blur.cpp:251 src/synfig/layer_shape.cpp:1214 +msgid "Cross-Hatch Blur" +msgstr "" + +#: src/modules/lyr_std/bevel.cpp:362 src/modules/lyr_std/shade.cpp:393 +#: src/modules/mod_filter/blur.cpp:252 src/synfig/layer_shape.cpp:1215 +msgid "Gaussian Blur" +msgstr "Гауссово" + +#: src/modules/lyr_std/bevel.cpp:363 src/modules/lyr_std/shade.cpp:394 +#: src/modules/mod_filter/blur.cpp:253 src/synfig/layer_shape.cpp:1216 +msgid "Disc Blur" +msgstr "" + +#: src/modules/lyr_std/bevel.cpp:367 +msgid "Hi-Color" +msgstr "Цвет света" + +#: src/modules/lyr_std/bevel.cpp:370 +msgid "Lo-Color" +msgstr "Цвет тени" + +#: src/modules/lyr_std/bevel.cpp:373 +msgid "Light Angle" +msgstr "Угол освещения" + +#: src/modules/lyr_std/bevel.cpp:377 +msgid "Depth of Bevel" +msgstr "Глубина фаски" + +#: src/modules/lyr_std/bevel.cpp:381 +msgid "Softness" +msgstr "Мягкость" + +#: src/modules/lyr_std/bevel.cpp:384 +msgid "Use Luma" +msgstr "Светимость" + +#: src/modules/lyr_std/bevel.cpp:387 +msgid "Solid" +msgstr "" + +#: src/modules/lyr_std/booleancurve.cpp:104 +msgid "Region Set" +msgstr "" + +#: src/modules/lyr_std/booleancurve.cpp:105 +msgid "Set of regions to combine" +msgstr "" + +#: src/modules/lyr_std/clamp.cpp:54 src/tool/main.cpp:1079 +msgid "Clamp" +msgstr "Куча" + +#: src/modules/lyr_std/clamp.cpp:55 src/modules/mod_filter/colorcorrect.cpp:55 +#: src/modules/mod_filter/halftone2.cpp:58 +#: src/modules/mod_filter/halftone3.cpp:58 +#: src/modules/mod_filter/lumakey.cpp:58 +msgid "Filters" +msgstr "Фильтры" + +#: src/modules/lyr_std/clamp.cpp:155 +msgid "Invert Negative" +msgstr "Инвертировать негатив" + +#: src/modules/lyr_std/clamp.cpp:159 +msgid "Clamp Ceiling" +msgstr "Потолок кучи" + +#: src/modules/lyr_std/clamp.cpp:163 +msgid "Ceiling" +msgstr "Потолок" + +#: src/modules/lyr_std/clamp.cpp:167 +msgid "Floor" +msgstr "Пол" + +#: src/modules/lyr_std/import.cpp:58 +msgid "Import Image" +msgstr "Импортировать изображение" + +#: src/modules/lyr_std/import.cpp:138 +#, c-format +msgid "Filename seems to already be set to \"%s\" (%s)" +msgstr "" + +#: src/modules/lyr_std/import.cpp:209 +msgid "Filename" +msgstr "Имя файла" + +#: src/modules/lyr_std/import.cpp:210 +msgid "File to import" +msgstr "Импортируемый файл" + +#: src/modules/lyr_std/import.cpp:214 src/synfig/layer_pastecanvas.cpp:140 +msgid "Time Offset" +msgstr "Смещение во времени" + +#: src/modules/lyr_std/insideout.cpp:55 +msgid "Inside Out" +msgstr "Наизнанку" + +#: src/modules/lyr_std/insideout.cpp:56 +#: src/modules/lyr_std/sphere_distort.cpp:73 +#: src/modules/lyr_std/stretch.cpp:59 src/modules/lyr_std/twirl.cpp:56 +#: src/modules/lyr_std/warp.cpp:56 src/modules/mod_noise/distort.cpp:57 +msgid "Distortions" +msgstr "Искажение" + +#: src/modules/lyr_std/insideout.cpp:142 +msgid "Defines the where the center will be" +msgstr "" + +#: src/modules/lyr_std/julia.cpp:56 +msgid "Julia Set" +msgstr "Жюлиа" + +#: src/modules/lyr_std/julia.cpp:57 src/modules/lyr_std/mandelbrot.cpp:57 +msgid "Fractals" +msgstr "Фракталы" + +#: src/modules/lyr_std/julia.cpp:300 +msgid "Inside Color" +msgstr "Внутренний цвет" + +#: src/modules/lyr_std/julia.cpp:301 +msgid "Color of the Set" +msgstr "Цвет внутри набора" + +#: src/modules/lyr_std/julia.cpp:304 +msgid "Outside Color" +msgstr "Внешний цвет" + +#: src/modules/lyr_std/julia.cpp:305 +msgid "Color outside the Set" +msgstr "Цвет вне набора" + +#: src/modules/lyr_std/julia.cpp:308 +msgid "Color Shift" +msgstr "Смещение цвета" + +#: src/modules/lyr_std/julia.cpp:311 src/modules/lyr_std/mandelbrot.cpp:213 +msgid "Iterations" +msgstr "Итераций" + +#: src/modules/lyr_std/julia.cpp:314 +msgid "Seed Point" +msgstr "" + +#: src/modules/lyr_std/julia.cpp:317 src/modules/lyr_std/mandelbrot.cpp:216 +msgid "Bailout ValueBase" +msgstr "" + +#: src/modules/lyr_std/julia.cpp:321 src/modules/lyr_std/mandelbrot.cpp:226 +#: src/modules/lyr_std/twirl.cpp:125 +msgid "Distort Inside" +msgstr "Искажать внутри" + +#: src/modules/lyr_std/julia.cpp:324 src/modules/lyr_std/mandelbrot.cpp:230 +msgid "Shade Inside" +msgstr "Тень изнутри" + +#: src/modules/lyr_std/julia.cpp:327 src/modules/lyr_std/mandelbrot.cpp:234 +msgid "Solid Inside" +msgstr "Заливка изнутри" + +#: src/modules/lyr_std/julia.cpp:330 src/modules/lyr_std/mandelbrot.cpp:238 +msgid "Invert Inside" +msgstr "" + +#: src/modules/lyr_std/julia.cpp:333 +msgid "Color Inside" +msgstr "Цвет изнутри" + +#: src/modules/lyr_std/julia.cpp:336 src/modules/lyr_std/mandelbrot.cpp:255 +#: src/modules/lyr_std/twirl.cpp:129 +msgid "Distort Outside" +msgstr "Искажать снаружи" + +#: src/modules/lyr_std/julia.cpp:339 src/modules/lyr_std/mandelbrot.cpp:259 +msgid "Shade Outside" +msgstr "Тень снаружи" + +#: src/modules/lyr_std/julia.cpp:342 src/modules/lyr_std/mandelbrot.cpp:263 +msgid "Solid Outside" +msgstr "" + +#: src/modules/lyr_std/julia.cpp:345 src/modules/lyr_std/mandelbrot.cpp:267 +msgid "Invert Outside" +msgstr "Инвертировать снаружи" + +#: src/modules/lyr_std/julia.cpp:348 +msgid "Color Outside" +msgstr "В цвете снаружи" + +#: src/modules/lyr_std/julia.cpp:352 +msgid "Color Cycle" +msgstr "" + +#: src/modules/lyr_std/julia.cpp:355 src/modules/lyr_std/mandelbrot.cpp:275 +msgid "Smooth Outside" +msgstr "" + +#: src/modules/lyr_std/julia.cpp:356 src/modules/lyr_std/mandelbrot.cpp:276 +msgid "Smooth the coloration outside the set" +msgstr "" + +#: src/modules/lyr_std/julia.cpp:359 src/modules/lyr_std/mandelbrot.cpp:220 +msgid "Break Set" +msgstr "" + +#: src/modules/lyr_std/julia.cpp:360 src/modules/lyr_std/mandelbrot.cpp:221 +msgid "Modify equation to achieve interesting results" +msgstr "" + +#: src/modules/lyr_std/mandelbrot.cpp:56 +msgid "Mandelbrot Set" +msgstr "Мандельброт" + +#: src/modules/lyr_std/mandelbrot.cpp:227 +#: src/modules/lyr_std/mandelbrot.cpp:231 +#: src/modules/lyr_std/mandelbrot.cpp:235 +#: src/modules/lyr_std/mandelbrot.cpp:239 +#: src/modules/lyr_std/mandelbrot.cpp:243 +#: src/modules/lyr_std/mandelbrot.cpp:247 +#: src/modules/lyr_std/mandelbrot.cpp:251 +msgid "Inside" +msgstr "Изнутри" + +#: src/modules/lyr_std/mandelbrot.cpp:242 +msgid "Gradient Inside" +msgstr "Градиент изнутри" + +#: src/modules/lyr_std/mandelbrot.cpp:246 +msgid "Offset Inside" +msgstr "Сместить внутри" + +#: src/modules/lyr_std/mandelbrot.cpp:250 +msgid "Loop Inside" +msgstr "" + +#: src/modules/lyr_std/mandelbrot.cpp:256 +#: src/modules/lyr_std/mandelbrot.cpp:260 +#: src/modules/lyr_std/mandelbrot.cpp:264 +#: src/modules/lyr_std/mandelbrot.cpp:268 +#: src/modules/lyr_std/mandelbrot.cpp:272 +#: src/modules/lyr_std/mandelbrot.cpp:277 +#: src/modules/lyr_std/mandelbrot.cpp:281 +#: src/modules/lyr_std/mandelbrot.cpp:285 +msgid "Outside" +msgstr "Снаружи" + +#: src/modules/lyr_std/mandelbrot.cpp:271 +msgid "Gradient outside" +msgstr "Градиент снаружи" + +#: src/modules/lyr_std/mandelbrot.cpp:280 +msgid "Offset Outside" +msgstr "Смещение снаружи" + +#: src/modules/lyr_std/mandelbrot.cpp:284 +msgid "Scale Outside" +msgstr "Масштаб снаружи" + +#: src/modules/lyr_std/rotate.cpp:55 +msgid "Rotate" +msgstr "Вращение" + +#: src/modules/lyr_std/rotate.cpp:56 src/modules/lyr_std/translate.cpp:55 +#: src/modules/lyr_std/zoom.cpp:52 +msgid "Transform" +msgstr "Преобразование" + +#: src/modules/lyr_std/rotate.cpp:113 src/modules/lyr_std/translate.cpp:98 +#: src/modules/mod_filter/radialblur.cpp:107 +#: src/synfig/layer_pastecanvas.cpp:128 +msgid "Point where you want the origin to be" +msgstr "" + +#: src/modules/lyr_std/rotate.cpp:117 +#: src/modules/lyr_std/sphere_distort.cpp:153 +#: src/modules/lyr_std/stretch.cpp:103 src/modules/lyr_std/zoom.cpp:96 +#: src/synfig/layer_composite.cpp:142 +#: src/synfig/valuenode_blinecalctangent.cpp:242 +#: src/synfig/valuenode_blinecalcvertex.cpp:201 +#: src/synfig/valuenode_blinecalcwidth.cpp:207 +#: src/synfig/valuenode_segcalctangent.cpp:161 +#: src/synfig/valuenode_segcalcvertex.cpp:159 +msgid "Amount" +msgstr "Величина" + +#: src/modules/lyr_std/rotate.cpp:118 +msgid "Amount of rotation" +msgstr "Угол вращения" + +#: src/modules/lyr_std/shade.cpp:66 +msgid "Shade" +msgstr "Тень" + +#: src/modules/lyr_std/shade.cpp:382 +msgid "Size of Shade" +msgstr "Размер тени" + +#: src/modules/lyr_std/sphere_distort.cpp:72 +#: src/modules/lyr_std/sphere_distort.cpp:165 +msgid "Spherize" +msgstr "Сферизация" + +#: src/modules/lyr_std/sphere_distort.cpp:143 +msgid "Position" +msgstr "Положение" + +#: src/modules/lyr_std/sphere_distort.cpp:147 +#: src/modules/lyr_std/twirl.cpp:113 src/modules/mod_geometry/circle.cpp:128 +#: src/modules/mod_gradient/radialgradient.cpp:118 +#: src/modules/mod_gradient/spiralgradient.cpp:117 +#: src/modules/mod_noise/valuenode_random.cpp:244 +#: src/synfig/valuenode_radialcomposite.cpp:197 +msgid "Radius" +msgstr "Радиус" + +#: src/modules/lyr_std/sphere_distort.cpp:158 src/modules/lyr_std/warp.cpp:400 +msgid "Clip" +msgstr "Обрезка" + +#: src/modules/lyr_std/sphere_distort.cpp:162 +msgid "Distort Type" +msgstr "Тип искажения" + +#: src/modules/lyr_std/sphere_distort.cpp:163 +msgid "The direction of the distortion" +msgstr "Направление искажения" + +#: src/modules/lyr_std/sphere_distort.cpp:166 +msgid "Vertical Bar" +msgstr "" + +#: src/modules/lyr_std/sphere_distort.cpp:167 +msgid "Horizontal Bar" +msgstr "" + +#: src/modules/lyr_std/stretch.cpp:58 +msgid "Stretch" +msgstr "Растяжение" + +#: src/modules/lyr_std/stretch.cpp:108 src/modules/lyr_std/twirl.cpp:109 +#: src/modules/lyr_std/zoom.cpp:101 +#: src/modules/mod_gradient/conicalgradient.cpp:110 +#: src/modules/mod_gradient/radialgradient.cpp:114 +#: src/modules/mod_gradient/spiralgradient.cpp:113 +msgid "Center" +msgstr "Центр" + +#: src/modules/lyr_std/supersample.cpp:55 +msgid "Super Sample" +msgstr "" + +#: src/modules/lyr_std/supersample.cpp:119 +msgid "Unable to create SurfaceTarget" +msgstr "" + +#: src/modules/lyr_std/supersample.cpp:215 +#: src/modules/mod_gradient/curvegradient.cpp:537 +#: src/synfig/valuenode_composite.cpp:289 +#: src/synfig/valuenode_realstring.cpp:184 +#: src/synfig/valuenode_repeat_gradient.cpp:185 +#: src/synfig/valuenode_stripes.cpp:176 src/tool/main.cpp:978 +msgid "Width" +msgstr "Ширина" + +#: src/modules/lyr_std/supersample.cpp:216 +msgid "Width of sample area (In pixels)" +msgstr "" + +#: src/modules/lyr_std/supersample.cpp:219 src/tool/main.cpp:984 +msgid "Height" +msgstr "Высота" + +#: src/modules/lyr_std/supersample.cpp:220 +msgid "Height of sample area (In pixels)" +msgstr "" + +#: src/modules/lyr_std/supersample.cpp:223 +msgid "Use Parametric" +msgstr "" + +#: src/modules/lyr_std/supersample.cpp:224 +msgid "Use the Parametric Renderer" +msgstr "" + +#: src/modules/lyr_std/supersample.cpp:227 +msgid "Be Alpha Safe" +msgstr "" + +#: src/modules/lyr_std/timeloop.cpp:57 src/synfig/valuenode.cpp:162 +#: src/synfig/valuenode_timeloop.cpp:188 +msgid "Time Loop" +msgstr "Временная петля" + +#: src/modules/lyr_std/timeloop.cpp:120 src/synfig/valuenode_timeloop.cpp:124 +msgid "Link Time" +msgstr "Время связывания" + +#: src/modules/lyr_std/timeloop.cpp:124 src/synfig/valuenode_timeloop.cpp:125 +msgid "Local Time" +msgstr "Локальное время" + +#: src/modules/lyr_std/timeloop.cpp:128 src/synfig/valuenode_step.cpp:214 +#: src/synfig/valuenode_timeloop.cpp:126 +msgid "Duration" +msgstr "Длительность" + +#: src/modules/lyr_std/timeloop.cpp:132 +msgid "Only For Positive Duration" +msgstr "Только для положительной длительности" + +#: src/modules/lyr_std/timeloop.cpp:136 +msgid "Symmetrical" +msgstr "Симметрично" + +#: src/modules/lyr_std/translate.cpp:54 +msgid "Translate" +msgstr "Перемещение" + +#: src/modules/lyr_std/twirl.cpp:55 +msgid "Twirl" +msgstr "Вихрь" + +#: src/modules/lyr_std/twirl.cpp:114 +#: src/modules/mod_gradient/radialgradient.cpp:119 +#: src/modules/mod_gradient/spiralgradient.cpp:118 +msgid "This is the radius of the circle" +msgstr "Радиус окружности" + +#: src/modules/lyr_std/twirl.cpp:120 +msgid "Rotations" +msgstr "Вращение" + +#: src/modules/lyr_std/warp.cpp:55 +msgid "Warp" +msgstr "Искажение" + +#: src/modules/lyr_std/warp.cpp:371 +msgid "Source TL" +msgstr "" + +#: src/modules/lyr_std/warp.cpp:376 +msgid "Source BR" +msgstr "" + +#: src/modules/lyr_std/warp.cpp:380 +msgid "Dest TL" +msgstr "" + +#: src/modules/lyr_std/warp.cpp:385 +msgid "Dest TR" +msgstr "" + +#: src/modules/lyr_std/warp.cpp:390 +msgid "Dest BR" +msgstr "" + +#: src/modules/lyr_std/warp.cpp:395 +msgid "Dest BL" +msgstr "" + +#: src/modules/lyr_std/warp.cpp:404 +msgid "Horizon" +msgstr "Горизонт" + +#: src/modules/lyr_std/xorpattern.cpp:54 +msgid "XOR Pattern" +msgstr "Узор Исключающего ИЛИ" + +#: src/modules/lyr_std/zoom.cpp:51 src/synfig/layer_pastecanvas.cpp:135 +msgid "Zoom" +msgstr "Увеличение" + +#: src/modules/lyr_std/zoom.cpp:97 +msgid "Amount to zoom in" +msgstr "" + +#: src/modules/lyr_std/zoom.cpp:102 +msgid "Point to zoom in to" +msgstr "Точка, в которую увеличить отображение" + +#: src/modules/mod_bmp/mptr_bmp.cpp:133 src/modules/mod_bmp/mptr_bmp.cpp:134 +#: src/modules/mod_ppm/mptr_ppm.cpp:78 +#, c-format +msgid "Unable to open %s" +msgstr "" + +#: src/modules/mod_bmp/mptr_bmp.cpp:145 src/modules/mod_bmp/mptr_bmp.cpp:146 +#, c-format +msgid "%s is not in BMP format" +msgstr "" + +#: src/modules/mod_bmp/mptr_bmp.cpp:152 +#, c-format +msgid "Failure while reading BITMAPFILEHEADER from %s" +msgstr "" + +#: src/modules/mod_bmp/mptr_bmp.cpp:160 +#, c-format +msgid "Failure while reading BITMAPINFOHEADER from %s" +msgstr "" + +#: src/modules/mod_bmp/mptr_bmp.cpp:170 +#, c-format +msgid "Bad BITMAPFILEHEADER in %s. (bfOffsetBits=%d, should be %d)" +msgstr "" + +#: src/modules/mod_bmp/mptr_bmp.cpp:178 +#, c-format +msgid "Bad BITMAPINFOHEADER in %s. (biSize=%d, should be 40)" +msgstr "" + +#: src/modules/mod_bmp/mptr_bmp.cpp:196 src/modules/mod_bmp/mptr_bmp.cpp:197 +msgid "Reading compressed bitmaps is not supported" +msgstr "" + +#: src/modules/mod_bmp/mptr_bmp.cpp:203 src/modules/mod_bmp/mptr_bmp.cpp:204 +#, c-format +msgid "Unsupported bit depth (bit_count=%d, should be 24 or 32)" +msgstr "" + +#: src/modules/mod_bmp/trgt_bmp.cpp:185 +msgid " (animated)" +msgstr "" + +#: src/modules/mod_bmp/trgt_bmp.cpp:195 src/modules/mod_bmp/trgt_bmp.cpp:196 +msgid "Unable to open file" +msgstr "" + +#: src/modules/mod_bmp/trgt_bmp.cpp:226 src/modules/mod_bmp/trgt_bmp.cpp:227 +msgid "Unable to write file header to file" +msgstr "" + +#: src/modules/mod_bmp/trgt_bmp.cpp:233 src/modules/mod_bmp/trgt_bmp.cpp:234 +msgid "Unable to write info header" +msgstr "" + +#: src/modules/mod_dv/trgt_dv.cpp:166 src/modules/mod_dv/trgt_dv.cpp:175 +#: src/modules/mod_dv/trgt_dv.cpp:182 src/modules/mod_dv/trgt_dv.cpp:192 +#: src/modules/mod_dv/trgt_dv.cpp:200 src/modules/mod_dv/trgt_dv.cpp:205 +#: src/modules/mod_dv/trgt_dv.cpp:209 src/modules/mod_dv/trgt_dv.cpp:218 +#: src/modules/mod_dv/trgt_dv.cpp:227 +msgid "Unable to open pipe to encodedv" +msgstr "" + +#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:172 +#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:179 +#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:189 +#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:199 +#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:217 +msgid "Unable to open pipe to ffmpeg" +msgstr "" + +#: src/modules/mod_filter/blur.cpp:67 +msgid "Blur" +msgstr "Размывание" + +#: src/modules/mod_filter/blur.cpp:68 src/modules/mod_filter/radialblur.cpp:56 +#: src/synfig/layer_motionblur.cpp:57 +msgid "Blurs" +msgstr "Размывание" + +#: src/modules/mod_filter/blur.cpp:243 +msgid "Size of Blur" +msgstr "" + +#: src/modules/mod_filter/colorcorrect.cpp:54 +msgid "Color Correct" +msgstr "Цветокоррекция" + +#: src/modules/mod_filter/colorcorrect.cpp:203 +msgid "Hue Adjust" +msgstr "Коррекция тона" + +#: src/modules/mod_filter/colorcorrect.cpp:207 +msgid "Brightness" +msgstr "Яркость" + +#: src/modules/mod_filter/colorcorrect.cpp:211 +msgid "Contrast" +msgstr "Контраст" + +#: src/modules/mod_filter/colorcorrect.cpp:215 +msgid "Exposure Adjust" +msgstr "Коррекция экспозиции" + +#: src/modules/mod_filter/colorcorrect.cpp:219 src/synfig/layer_bitmap.cpp:141 +msgid "Gamma Adjustment" +msgstr "Коррекция гаммы" + +#: src/modules/mod_filter/halftone2.cpp:57 +msgid "Halftone 2" +msgstr "Полутон 2" + +#: src/modules/mod_filter/halftone2.cpp:147 +msgid "Mask Origin" +msgstr "" + +#: src/modules/mod_filter/halftone2.cpp:151 +msgid "Mask Angle" +msgstr "Угол маски" + +#: src/modules/mod_filter/halftone2.cpp:155 +#: src/modules/mod_filter/halftone3.cpp:305 +msgid "Mask Size" +msgstr "Размер маски" + +#: src/modules/mod_filter/halftone2.cpp:160 +msgid "Light Color" +msgstr "Цвет света" + +#: src/modules/mod_filter/halftone2.cpp:163 +msgid "Dark Color" +msgstr "Цвет тени" + +#: src/modules/mod_filter/halftone2.cpp:168 +#: src/modules/mod_filter/halftone3.cpp:310 +#: src/modules/mod_gradient/conicalgradient.cpp:119 +msgid "Symmetric" +msgstr "" + +#: src/modules/mod_filter/halftone2.cpp:169 +#: src/modules/mod_filter/halftone3.cpp:311 +msgid "Light On Dark" +msgstr "" + +#: src/modules/mod_filter/halftone2.cpp:171 +#: src/modules/mod_filter/halftone3.cpp:313 +msgid "Diamond" +msgstr "" + +#: src/modules/mod_filter/halftone2.cpp:172 +#: src/modules/mod_filter/halftone3.cpp:314 +msgid "Stripe" +msgstr "" + +#: src/modules/mod_filter/halftone3.cpp:57 +msgid "Halftone 3" +msgstr "Полутон 3" + +#: src/modules/mod_filter/halftone3.cpp:308 +msgid " Type" +msgstr "Тип" + +#: src/modules/mod_filter/halftone3.cpp:317 +msgid "Subtractive Flag" +msgstr "" + +#: src/modules/mod_filter/halftone3.cpp:325 +msgid " Color" +msgstr "Цвет" + +#: src/modules/mod_filter/halftone3.cpp:329 +msgid " Mask Origin" +msgstr "" + +#: src/modules/mod_filter/halftone3.cpp:333 +msgid " Mask Angle" +msgstr "Угол маски" + +#: src/modules/mod_filter/lumakey.cpp:57 +msgid "Luma Key" +msgstr "" + +#: src/modules/mod_filter/radialblur.cpp:55 +msgid "Radial Blur" +msgstr "Радиальное размывание" + +#: src/modules/mod_filter/radialblur.cpp:112 +msgid "Size of blur" +msgstr "" + +#: src/modules/mod_filter/radialblur.cpp:117 +msgid "Fade Out" +msgstr "Спадание" + +#: src/modules/mod_geometry/checkerboard.cpp:57 +msgid "Checkerboard" +msgstr "Шахматная доска" + +#: src/modules/mod_geometry/checkerboard.cpp:58 +#: src/modules/mod_geometry/circle.cpp:56 +#: src/modules/mod_geometry/outline.cpp:71 +#: src/modules/mod_geometry/rectangle.cpp:59 +#: src/modules/mod_geometry/region.cpp:64 src/modules/mod_geometry/star.cpp:63 +#: src/synfig/layer_polygon.cpp:61 src/synfig/layer_solidcolor.cpp:56 +msgid "Geometry" +msgstr "Геометрия" + +#: src/modules/mod_geometry/checkerboard.cpp:122 +msgid "Color of checkers" +msgstr "" + +#: src/modules/mod_geometry/checkerboard.cpp:129 +msgid "Size of checkers" +msgstr "" + +#: src/modules/mod_geometry/circle.cpp:55 +msgid "Circle" +msgstr "Окружность" + +#: src/modules/mod_geometry/circle.cpp:133 src/synfig/layer_shape.cpp:1205 +msgid "Feather" +msgstr "Растушёвка" + +#: src/modules/mod_geometry/circle.cpp:141 +msgid "Invert the circle" +msgstr "Инвертировать окружность" + +#: src/modules/mod_geometry/circle.cpp:145 +msgid "Falloff" +msgstr "Спадание" + +#: src/modules/mod_geometry/circle.cpp:146 +msgid "Determines the falloff function for the feather" +msgstr "" + +#: src/modules/mod_geometry/circle.cpp:148 +#: src/modules/mod_noise/distort.cpp:211 src/modules/mod_noise/noise.cpp:263 +#: src/synfig/layer_bitmap.cpp:135 src/synfig/valuenode.cpp:135 +#: src/synfig/valuenode_linear.cpp:142 +msgid "Linear" +msgstr "Линейная" + +#: src/modules/mod_geometry/circle.cpp:149 +msgid "Squared" +msgstr "" + +#: src/modules/mod_geometry/circle.cpp:150 +msgid "Square Root" +msgstr "" + +#: src/modules/mod_geometry/circle.cpp:151 +msgid "Sigmond" +msgstr "" + +#: src/modules/mod_geometry/circle.cpp:152 +#: src/modules/mod_noise/distort.cpp:212 src/modules/mod_noise/noise.cpp:264 +#: src/synfig/layer_bitmap.cpp:136 +msgid "Cosine" +msgstr "" + +#: src/modules/mod_geometry/outline.cpp:70 +msgid "Outline" +msgstr "Абрис" + +#: src/modules/mod_geometry/outline.cpp:178 +msgid "No vertices in outline " +msgstr "Нет вершин в абрисе" + +#: src/modules/mod_geometry/outline.cpp:807 +#: src/modules/mod_geometry/region.cpp:232 +#: src/modules/mod_gradient/curvegradient.cpp:540 +#: src/modules/mod_particle/plant.cpp:383 +msgid "Vertices" +msgstr "Вершины" + +#: src/modules/mod_geometry/outline.cpp:810 +#: src/modules/mod_gradient/curvegradient.cpp:543 +#: src/modules/mod_particle/plant.cpp:384 +msgid "A list of BLine Points" +msgstr "Список узлов кривой Безье" + +#: src/modules/mod_geometry/outline.cpp:824 +msgid "Outline Width" +msgstr "Толщина абриса" + +#: src/modules/mod_geometry/outline.cpp:829 +msgid "Expand" +msgstr "Расширение" + +#: src/modules/mod_geometry/outline.cpp:833 +msgid "Sharp Cusps" +msgstr "Острые пики" + +#: src/modules/mod_geometry/outline.cpp:834 +msgid "Determines cusp type" +msgstr "Определяет тип пиков" + +#: src/modules/mod_geometry/outline.cpp:838 +msgid "Rounded Begin" +msgstr "Закругленное начало" + +#: src/modules/mod_geometry/outline.cpp:839 +#: src/modules/mod_geometry/outline.cpp:844 +msgid "Round off the tip" +msgstr "" + +#: src/modules/mod_geometry/outline.cpp:843 +msgid "Rounded End" +msgstr "Закругленное окончание" + +#: src/modules/mod_geometry/outline.cpp:847 +msgid "Loopyness" +msgstr "Петлистость" + +#: src/modules/mod_geometry/outline.cpp:850 +msgid "Homogeneous" +msgstr "Однородность" + +#: src/modules/mod_geometry/rectangle.cpp:58 +msgid "Rectangle" +msgstr "Прямоугольник" + +#: src/modules/mod_geometry/rectangle.cpp:126 +#: src/modules/mod_gradient/lineargradient.cpp:184 +msgid "Point 1" +msgstr "Точка 1" + +#: src/modules/mod_geometry/rectangle.cpp:131 +#: src/modules/mod_gradient/lineargradient.cpp:188 +msgid "Point 2" +msgstr "Точка 2" + +#: src/modules/mod_geometry/rectangle.cpp:136 +msgid "Expand amount" +msgstr "Величина расширения" + +#: src/modules/mod_geometry/rectangle.cpp:140 +msgid "Invert the rectangle" +msgstr "Инвертировать прямоугольник" + +#: src/modules/mod_geometry/region.cpp:63 +msgid "Region" +msgstr "Область" + +#: src/modules/mod_geometry/star.cpp:62 +msgid "Star" +msgstr "Звезда" + +#: src/modules/mod_geometry/star.cpp:174 +msgid "Outer Radius" +msgstr "Внешний радиус" + +#: src/modules/mod_geometry/star.cpp:175 +msgid "The radius of the outer points in the star" +msgstr "Радиус внешних точек звезды" + +#: src/modules/mod_geometry/star.cpp:181 +msgid "Inner Radius" +msgstr "Внутренний радиус" + +#: src/modules/mod_geometry/star.cpp:182 +msgid "The radius of the inner points in the star" +msgstr "Радиус внутренних точек звезды" + +#: src/modules/mod_geometry/star.cpp:188 +#: src/modules/mod_gradient/conicalgradient.cpp:114 +#: src/modules/mod_gradient/spiralgradient.cpp:124 +#: src/synfig/valuenode_cos.cpp:165 src/synfig/valuenode_sine.cpp:165 +msgid "Angle" +msgstr "Угол" + +#: src/modules/mod_geometry/star.cpp:189 +msgid "The orientation of the star" +msgstr "Ориентация звезды" + +#: src/modules/mod_geometry/star.cpp:194 src/synfig/distance.cpp:248 +msgid "Points" +msgstr "Точек" + +#: src/modules/mod_geometry/star.cpp:195 +msgid "The number of points in the star" +msgstr "Количество лучей звезды" + +#: src/modules/mod_geometry/star.cpp:199 +msgid "Regular Polygon" +msgstr "Многоугольник" + +#: src/modules/mod_geometry/star.cpp:200 +msgid "Whether to draw a star or a regular polygon" +msgstr "Рисовать ли многоугольник вместо звезды" + +#: src/modules/mod_gif/trgt_gif.cpp:107 +#, c-format +msgid "Unable to open \"%s\" for write access!" +msgstr "" + +#: src/modules/mod_gif/trgt_gif.cpp:195 +msgid "Description not set!" +msgstr "" + +#: src/modules/mod_gradient/conicalgradient.cpp:56 +msgid "Conical Gradient" +msgstr "Конический градиент" + +#: src/modules/mod_gradient/conicalgradient.cpp:57 +#: src/modules/mod_gradient/curvegradient.cpp:60 +#: src/modules/mod_gradient/lineargradient.cpp:54 +#: src/modules/mod_gradient/radialgradient.cpp:57 +#: src/modules/mod_gradient/spiralgradient.cpp:56 +#: src/modules/mod_noise/noise.cpp:57 +msgid "Gradients" +msgstr "Градиенты" + +#: src/modules/mod_gradient/conicalgradient.cpp:106 +#: src/modules/mod_gradient/curvegradient.cpp:546 +#: src/modules/mod_gradient/lineargradient.cpp:191 +#: src/modules/mod_gradient/radialgradient.cpp:110 +#: src/modules/mod_gradient/spiralgradient.cpp:109 +#: src/modules/mod_noise/noise.cpp:250 src/modules/mod_particle/plant.cpp:394 +#: src/synfig/valuenode_gradientrotate.cpp:146 +#: src/synfig/valuenode_repeat_gradient.cpp:183 +msgid "Gradient" +msgstr "Градиент" + +#: src/modules/mod_gradient/curvegradient.cpp:59 +msgid "Curve Gradient" +msgstr "Искривленный градиент" + +#: src/modules/mod_gradient/curvegradient.cpp:548 +#: src/modules/mod_gradient/lineargradient.cpp:194 +#: src/modules/mod_gradient/radialgradient.cpp:125 +#: src/synfig/valuenode_blinecalctangent.cpp:241 +#: src/synfig/valuenode_blinecalcvertex.cpp:200 +#: src/synfig/valuenode_blinecalcwidth.cpp:206 +msgid "Loop" +msgstr "Повтор" + +#: src/modules/mod_gradient/curvegradient.cpp:550 +#: src/modules/mod_gradient/lineargradient.cpp:197 +#: src/modules/mod_gradient/radialgradient.cpp:129 +msgid "ZigZag" +msgstr "Зигзаг" + +#: src/modules/mod_gradient/curvegradient.cpp:552 +msgid "Perpendicular" +msgstr "" + +#: src/modules/mod_gradient/curvegradient.cpp:554 +msgid "Fast" +msgstr "" + +#: src/modules/mod_gradient/lineargradient.cpp:53 +msgid "Linear Gradient" +msgstr "Линейный градиент" + +#: src/modules/mod_gradient/radialgradient.cpp:56 +msgid "Radial Gradient" +msgstr "Радиальный градиент" + +#: src/modules/mod_gradient/spiralgradient.cpp:55 +msgid "Spiral Gradient" +msgstr "Спиральный градиент" + +#: src/modules/mod_gradient/spiralgradient.cpp:129 +msgid "Clockwise" +msgstr "По часовой стрелке" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:103 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:104 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:216 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:217 +msgid "No file to load" +msgstr "" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:157 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:158 +#: src/synfig/listimporter.cpp:182 src/synfig/listimporter.cpp:183 +msgid "Unable to open " +msgstr "" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:164 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:165 +#: src/synfig/listimporter.cpp:189 src/synfig/listimporter.cpp:190 +msgid "Unable to get frame from " +msgstr "" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:171 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:172 +msgid "Bad surface from " +msgstr "" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:227 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:228 +msgid "Unable to open pipe to imagemagick" +msgstr "" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:239 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:240 +msgid "Reached end of stream without finding PPM header" +msgstr "" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:248 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:249 +msgid "stream not in PPM format" +msgstr "" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:260 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:261 +msgid "Premature end of file (after header)" +msgstr "" + +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:273 +#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:274 +msgid "Premature end of file" +msgstr "" + +#: src/modules/mod_imagemagick/trgt_imagemagick.cpp:157 +msgid "Unable to open pipe to imagemagick's convert utility" +msgstr "" + +#: src/modules/mod_noise/distort.cpp:56 +msgid "Noise Distort" +msgstr "Искажение шумом" + +#: src/modules/mod_noise/distort.cpp:197 +msgid "Displacement" +msgstr "Смещение" + +#: src/modules/mod_noise/distort.cpp:204 src/modules/mod_noise/noise.cpp:253 +msgid "Random Seed" +msgstr "Случайное зерно" + +#: src/modules/mod_noise/distort.cpp:207 src/modules/mod_noise/noise.cpp:259 +#: src/modules/mod_noise/valuenode_random.cpp:247 +#: src/synfig/layer_bitmap.cpp:131 +msgid "Interpolation" +msgstr "Интерполяция" + +#: src/modules/mod_noise/distort.cpp:208 src/modules/mod_noise/noise.cpp:260 +#: src/synfig/layer_bitmap.cpp:132 +msgid "What type of interpolation to use" +msgstr "Какой тип интерполяции использовать" + +#: src/modules/mod_noise/distort.cpp:210 src/modules/mod_noise/noise.cpp:262 +#: src/synfig/layer_bitmap.cpp:134 +msgid "Nearest Neighbor" +msgstr "Ближайший сосед" + +#: src/modules/mod_noise/distort.cpp:213 src/modules/mod_noise/noise.cpp:265 +msgid "Spline" +msgstr "Сплайн" + +#: src/modules/mod_noise/distort.cpp:214 src/modules/mod_noise/noise.cpp:266 +#: src/synfig/layer_bitmap.cpp:137 +msgid "Cubic" +msgstr "Кубическая" + +#: src/modules/mod_noise/distort.cpp:217 src/modules/mod_noise/noise.cpp:269 +msgid "Detail" +msgstr "Детализация" + +#: src/modules/mod_noise/distort.cpp:220 src/modules/mod_noise/noise.cpp:272 +#: src/modules/mod_noise/valuenode_random.cpp:246 +msgid "Animation Speed" +msgstr "Скорость анимации" + +#: src/modules/mod_noise/distort.cpp:223 src/modules/mod_noise/noise.cpp:275 +msgid "Turbulent" +msgstr "Турбулентность" + +#: src/modules/mod_noise/main.cpp:66 +#: src/modules/mod_noise/valuenode_random.cpp:179 +msgid "Random" +msgstr "" + +#: src/modules/mod_noise/noise.cpp:56 +msgid "Noise Gradient" +msgstr "Градиентный шум" + +#: src/modules/mod_noise/noise.cpp:278 +msgid "Do Alpha" +msgstr "С альфа-каналом" + +#: src/modules/mod_noise/noise.cpp:281 +msgid "Super Sampling" +msgstr "" + +#: src/modules/mod_noise/valuenode_random.cpp:243 +#: src/synfig/valuenode_range.cpp:193 src/synfig/valuenode_reciprocal.cpp:124 +#: src/synfig/valuenode_reference.cpp:114 src/synfig/valuenode_scale.cpp:179 +#: src/synfig/valuenode_step.cpp:213 src/synfig/valuenode_timeloop.cpp:123 +msgid "Link" +msgstr "" + +#: src/modules/mod_noise/valuenode_random.cpp:245 +#: src/modules/mod_particle/plant.cpp:441 +msgid "Seed" +msgstr "" + +#: src/modules/mod_particle/plant.cpp:68 +msgid "Plant" +msgstr "Растение" + +#: src/modules/mod_particle/plant.cpp:395 +msgid "Gradient to be used for coloring the plant" +msgstr "" + +#: src/modules/mod_particle/plant.cpp:399 +msgid "Split Angle" +msgstr "Угол разделения" + +#: src/modules/mod_particle/plant.cpp:400 +msgid "Angle by which each split deviates from its parent" +msgstr "" + +#: src/modules/mod_particle/plant.cpp:404 +msgid "Gravity" +msgstr "Сила тяжести" + +#: src/modules/mod_particle/plant.cpp:405 +msgid "Direction in which the shoots tend to face" +msgstr "Направление, в котором тянутся побеги" + +#: src/modules/mod_particle/plant.cpp:410 +msgid "Tangential Velocity" +msgstr "Скорость по касательной" + +#: src/modules/mod_particle/plant.cpp:411 +msgid "Amount to which shoots tend to grow along the tangent to the BLine" +msgstr "Число, до которого побеги растут по касательной к кривой Безье" + +#: src/modules/mod_particle/plant.cpp:415 +msgid "Perpendicular Velocity" +msgstr "Скорость по перпендикуляру" + +#: src/modules/mod_particle/plant.cpp:416 +msgid "" +"Amount to which shoots tend to grow perpendicular to the tangent to the BLine" +msgstr "Число, до которого побеги растут перпендикулярно кривой Безье" + +#: src/modules/mod_particle/plant.cpp:420 +msgid "Stem Size" +msgstr "" + +#: src/modules/mod_particle/plant.cpp:421 +msgid "Size of the stem" +msgstr "" + +#: src/modules/mod_particle/plant.cpp:426 +msgid "Size As Alpha" +msgstr "" + +#: src/modules/mod_particle/plant.cpp:427 +msgid "" +"If enabled, the alpha channel from the gradient is multiplied by the stem " +"size, and an alpha of 1.0 is used when rendering" +msgstr "" + +#: src/modules/mod_particle/plant.cpp:431 +msgid "Reverse" +msgstr "" + +#: src/modules/mod_particle/plant.cpp:432 +msgid "If enabled, render the plant in the opposite direction" +msgstr "" + +#: src/modules/mod_particle/plant.cpp:436 src/synfig/valuenode.cpp:166 +#: src/synfig/valuenode_duplicate.cpp:123 src/synfig/valuenode_step.cpp:138 +msgid "Step" +msgstr "Шаг" + +#: src/modules/mod_particle/plant.cpp:437 +msgid "Measure of the distance between points when rendering" +msgstr "Единица измерения расстояния между точками при рендеринге" + +#: src/modules/mod_particle/plant.cpp:442 +msgid "Used to seed the pseudo-random number generator" +msgstr "" + +#: src/modules/mod_particle/plant.cpp:446 +msgid "Splits" +msgstr "Делений" + +#: src/modules/mod_particle/plant.cpp:447 +msgid "Maximum number of times that each sprout can sprout recursively" +msgstr "Максимальное число раз рекурсивного создания побегов" + +#: src/modules/mod_particle/plant.cpp:451 +msgid "Sprouts" +msgstr "Побегов" + +#: src/modules/mod_particle/plant.cpp:452 +msgid "Number of places that growth occurs on each bline section" +msgstr "" + +#: src/modules/mod_particle/plant.cpp:456 +msgid "Random Factor" +msgstr "Фактор случайности" + +#: src/modules/mod_particle/plant.cpp:457 +msgid "" +"Used to scale down all random effects. Set to zero to disable randomness" +msgstr "" + +#: src/modules/mod_particle/plant.cpp:461 +msgid "Drag" +msgstr "" + +#: src/modules/mod_particle/plant.cpp:462 +msgid "Drag slows the growth" +msgstr "" + +#: src/modules/mod_particle/plant.cpp:466 +msgid "Use Width" +msgstr "Использовать ширину" + +#: src/modules/mod_particle/plant.cpp:467 +msgid "Scale the velocity by the bline's width" +msgstr "" + +#: src/modules/mod_ppm/mptr_ppm.cpp:86 +#, c-format +msgid "%s was not in PPM format" +msgstr "%s был не в формате PPM" + +#: src/synfig/distance.cpp:246 +msgid "Units" +msgstr "Единицы измерения" + +#: src/synfig/distance.cpp:247 +msgid "Pixels" +msgstr "Пикселы" + +#: src/synfig/distance.cpp:249 +msgid "Inches" +msgstr "Дюймы" + +#: src/synfig/distance.cpp:250 +msgid "Meters" +msgstr "Метры" + +#: src/synfig/distance.cpp:251 +msgid "Millimeters" +msgstr "Миллиметры" + +#: src/synfig/distance.cpp:252 +msgid "Centimeters" +msgstr "Сантиметры" + +#: src/synfig/importer.cpp:89 +msgid "Importer::open(): Cannot open empty filename" +msgstr "" + +#: src/synfig/importer.cpp:103 +msgid "Importer::open(): Couldn't find extension" +msgstr "" + +#: src/synfig/importer.cpp:114 +msgid "Importer::open(): Unknown file type -- " +msgstr "" + +#: src/synfig/layer.cpp:500 src/synfig/layer_composite.cpp:114 +msgid "Unable to create surface target" +msgstr "" + +#: src/synfig/layer.cpp:538 +msgid "Z Depth" +msgstr "Глубина на оси Z" + +#: src/synfig/layer_bitmap.cpp:121 +msgid "Top-Left" +msgstr "Левый верхний угол" + +#: src/synfig/layer_bitmap.cpp:122 +msgid "Upper left-hand Corner of image" +msgstr "Левый верхний угол изображения" + +#: src/synfig/layer_bitmap.cpp:126 +msgid "Bottom-Right" +msgstr "Правый нижний угол" + +#: src/synfig/layer_bitmap.cpp:127 +msgid "Lower right-hand Corner of image" +msgstr "Правый нижний угол изображения" + +#: src/synfig/layer_composite.cpp:145 src/synfig/paramdesc.cpp:62 +msgid "Blend Method" +msgstr "Режим наложения" + +#: src/synfig/layer_duplicate.cpp:56 src/synfig/valuenode.cpp:164 +#: src/synfig/valuenode_duplicate.cpp:206 +msgid "Duplicate" +msgstr "Дубликат" + +#: src/synfig/layer_duplicate.cpp:132 +msgid "Index" +msgstr "" + +#: src/synfig/layer_duplicate.cpp:133 +msgid "Copy Index" +msgstr "" + +#: src/synfig/layer_mime.cpp:86 +msgid "[MIME]" +msgstr "" + +#: src/synfig/layer_motionblur.cpp:56 +msgid "Motion Blur" +msgstr "Размывание движением" + +#: src/synfig/layer_motionblur.cpp:122 +msgid "Aperture" +msgstr "Апертура" + +#: src/synfig/layer_motionblur.cpp:123 +msgid "Shutter Time" +msgstr "Выдержка" + +#: src/synfig/layer_pastecanvas.cpp:77 +msgid "Paste Canvas" +msgstr "Вставка холста" + +#: src/synfig/layer_pastecanvas.cpp:114 +msgid "Pasted Canvas" +msgstr "Вставленный холст" + +#: src/synfig/layer_pastecanvas.cpp:115 +msgid "Inline Canvas" +msgstr "" + +#: src/synfig/layer_pastecanvas.cpp:131 +msgid "Canvas" +msgstr "Холст" + +#: src/synfig/layer_pastecanvas.cpp:132 +msgid "Canvas to paste" +msgstr "Вставляемый холст" + +#: src/synfig/layer_pastecanvas.cpp:136 +msgid "Size of canvas" +msgstr "Размерхолста" + +#: src/synfig/layer_pastecanvas.cpp:144 +msgid "Children Lock" +msgstr "Запереть потомков" + +#: src/synfig/layer_pastecanvas.cpp:154 +msgid "Current Time" +msgstr "Текущее время" + +#: src/synfig/layer_polygon.cpp:60 +msgid "Polygon" +msgstr "Многоугольник" + +#: src/synfig/layer_polygon.cpp:172 +msgid "Vector List" +msgstr "Список вершин" + +#: src/synfig/layer_shape.cpp:63 +msgid "Shape" +msgstr "Фигура" + +#: src/synfig/layer_shape.cpp:64 +msgid "Internal" +msgstr "" + +#: src/synfig/layer_shape.cpp:1193 +msgid "Layer_Shape Color" +msgstr "" + +#: src/synfig/layer_shape.cpp:1202 +msgid "Antialiasing" +msgstr "Сглаживание" + +#: src/synfig/layer_shape.cpp:1209 +msgid "Type of Feather" +msgstr "Тип растушевки" + +#: src/synfig/layer_shape.cpp:1210 +msgid "Type of feathering to use" +msgstr "Используемый тип растушевки" + +#: src/synfig/layer_shape.cpp:1219 +msgid "Winding Style" +msgstr "Стиль изгибов" + +#: src/synfig/layer_shape.cpp:1220 +msgid "Winding style to use" +msgstr "Используемый стиль изгибов" + +#: src/synfig/layer_shape.cpp:1222 +msgid "Non Zero" +msgstr "Ненулевые" + +#: src/synfig/layer_shape.cpp:1223 +msgid "Even/Odd" +msgstr "Чёт/Нечет" + +#: src/synfig/layer_solidcolor.cpp:55 +msgid "Solid Color" +msgstr "Сплошная заливка" + +#: src/synfig/listimporter.cpp:159 src/synfig/listimporter.cpp:160 +msgid "No images in list" +msgstr "Нет изображений в списке" + +#: src/synfig/loadcanvas.cpp:137 +#, c-format +msgid "cannot load '%s' recursively" +msgstr "" + +#: src/synfig/loadcanvas.cpp:180 +#, c-format +msgid "Unexpected element <%s>, Expected <%s>" +msgstr "" + +#: src/synfig/loadcanvas.cpp:186 +#, c-format +msgid "Unexpected element <%s>" +msgstr "" + +#: src/synfig/loadcanvas.cpp:200 +msgid "Too many warnings" +msgstr "" + +#: src/synfig/loadcanvas.cpp:231 +#, c-format +msgid "<%s> is missing \"%s\" attribute" +msgstr "" + +#: src/synfig/loadcanvas.cpp:256 src/synfig/loadcanvas.cpp:275 +#: src/synfig/loadcanvas.cpp:294 src/synfig/loadcanvas.cpp:458 +#: src/synfig/loadcanvas.cpp:813 +#, c-format +msgid "<%s> should not contain anything" +msgstr "" + +#: src/synfig/loadcanvas.cpp:260 src/synfig/loadcanvas.cpp:279 +#: src/synfig/loadcanvas.cpp:298 src/synfig/loadcanvas.cpp:462 +#: src/synfig/loadcanvas.cpp:817 +#, c-format +msgid "<%s> is missing \"value\" attribute" +msgstr "" + +#: src/synfig/loadcanvas.cpp:473 +#, c-format +msgid "Bad value \"%s\" in <%s>" +msgstr "" + +#: src/synfig/loadcanvas.cpp:497 +#, c-format +msgid "<%s> is missing \"pos\" attribute" +msgstr "" + +#: src/synfig/loadcanvas.cpp:904 +#, c-format +msgid "Unable to create with type \"%s\"" +msgstr "" + +#: src/synfig/loadcanvas.cpp:921 +msgid " is missing attribute \"time\"" +msgstr "" + +#: src/synfig/loadcanvas.cpp:934 +msgid "" +"Found \"use\" attribute for , but it wasn't empty. Ignoring " +"contents..." +msgstr "" + +#: src/synfig/loadcanvas.cpp:954 src/synfig/loadcanvas.cpp:966 +#, c-format +msgid "<%s> is missing its data" +msgstr "" + +#: src/synfig/loadcanvas.cpp:983 +msgid "Bad data for " +msgstr "" + +#: src/synfig/loadcanvas.cpp:998 +#, c-format +msgid "Unexpected element <%s> after data, ignoring..." +msgstr "" + +#: src/synfig/loadcanvas.cpp:1040 src/synfig/loadcanvas.cpp:1057 +#, c-format +msgid "\"%s\" not a valid value for attribute \"%s\" in <%s>" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1118 +#, c-format +msgid "Missing attribute \"type\" in <%s>" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1126 +#, c-format +msgid "Bad type in <%s>" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1135 +#, c-format +msgid "Error creating ValueNode <%s> with type '%s'. Refer to '%s'" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1144 +#, c-format +msgid "<%s> did not accept type '%s'" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1170 src/synfig/loadcanvas.cpp:1238 +#, c-format +msgid "'%s' was already defined in <%s>" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1180 +#, c-format +msgid "'%s' attribute in <%s> references unknown ID '%s'" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1189 +#, c-format +msgid "Unable to set link '\"%s\" to ValueNode \"%s\" (link #%d in \"%s\")" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1213 +#, c-format +msgid "Unknown Exception thrown when referencing ValueNode \"%s\"" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1253 +#, c-format +msgid "element <%s> is missing its contents" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1262 +#, c-format +msgid "Parse of '%s' failed" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1269 +#, c-format +msgid "Unable to connect value node ('%s' of type '%s') to link %d (%s)" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1287 +#, c-format +msgid "Unknown Exception thrown when working on element \"%s\"" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1322 +#, c-format +msgid "<%s> is missing link %d (%s)" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1388 +msgid "Unable to create " +msgstr "" + +#: src/synfig/loadcanvas.cpp:1538 +msgid " is missing its contents or missing \"use\" element" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1583 +#, c-format +msgid "Bad data in <%s>" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1615 +#, c-format +msgid "Expected a ValueNode. Refer to '%s'" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1636 +#, c-format +msgid "Bad ID \"%s\"" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1641 +#, c-format +msgid "Duplicate ID \"%s\"" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1646 +#, c-format +msgid "Unknown Exception thrown when adding ValueNode \"%s\"" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1681 +msgid "Missing \"type\" attribute to \"layer\" element" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1700 +msgid "Installed layer version is smaller than layer version in file" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1720 +msgid " entry for is not yet supported. Ignoring..." +msgstr "" + +#: src/synfig/loadcanvas.cpp:1723 +msgid " entry for is not yet supported. Ignoring..." +msgstr "" + +#: src/synfig/loadcanvas.cpp:1731 +msgid "Missing \"name\" attribute for ." +msgstr "" + +#: src/synfig/loadcanvas.cpp:1748 +msgid "" +"Found \"use\" attribute for , but it wasn't empty. Ignoring " +"contents..." +msgstr "" + +#: src/synfig/loadcanvas.cpp:1753 +msgid "Empty use=\"\" value in " +msgstr "" + +#: src/synfig/loadcanvas.cpp:1759 +#, c-format +msgid "Failed to load subcanvas '%s'" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1761 +msgid "Layer rejected canvas link" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1779 +#, c-format +msgid "Unknown ID (%s) referenced in " +msgstr "" + +#: src/synfig/loadcanvas.cpp:1795 +msgid " is either missing its contents, or missing a \"use\" attribute." +msgstr "" + +#: src/synfig/loadcanvas.cpp:1807 src/synfig/loadcanvas.cpp:1827 +msgid "Bad data for " +msgstr "" + +#: src/synfig/loadcanvas.cpp:1815 +#, c-format +msgid "Layer '%s' rejected value for parameter '%s'" +msgstr "" + +#: src/synfig/loadcanvas.cpp:1838 +#, c-format +msgid "Unexpected element <%s> after data, ignoring..." +msgstr "" + +#: src/synfig/loadcanvas.cpp:1911 src/synfig/loadcanvas.cpp:1919 +msgid "Canvas with width or height less than one is not allowed" +msgstr "" + +#: src/synfig/loadcanvas.cpp:2005 +msgid "Inline canvas cannot have a section" +msgstr "" + +#: src/synfig/loadcanvas.cpp:2013 +msgid "Inline canvas cannot have keyframes" +msgstr "" + +#: src/synfig/loadcanvas.cpp:2025 +msgid "Inline canvases cannot have metadata" +msgstr "" + +#: src/synfig/loadcanvas.cpp:2033 +msgid " must have a name" +msgstr "" + +#: src/synfig/loadcanvas.cpp:2039 +msgid " must have content" +msgstr "" + +#: src/synfig/loadcanvas.cpp:2051 +msgid "blank \"name\" entity" +msgstr "" + +#: src/synfig/loadcanvas.cpp:2066 +msgid "blank \"desc\" entity" +msgstr "" + +#: src/synfig/loadcanvas.cpp:2081 +msgid "blank \"author\" entity" +msgstr "" + +#: src/synfig/loadcanvas.cpp:2113 +#, c-format +msgid "Canvas '%s' has undefined %s: %s" +msgstr "" + +#: src/synfig/loadcanvas.cpp:2115 src/synfig/valuenode.cpp:352 +msgid "ValueNode" +msgstr "" + +#: src/synfig/loadcanvas.cpp:2115 +msgid "ValueNodes" +msgstr "" + +#: src/synfig/loadcanvas.cpp:2195 +msgid "Can't open file" +msgstr "" + +#: src/synfig/main.cpp:103 +#, c-format +msgid "API Version mismatch (LIB:%d, PROG:%d)" +msgstr "" + +#: src/synfig/main.cpp:108 +#, c-format +msgid "Size of Vector mismatch (app:%d, lib:%d)" +msgstr "" + +#: src/synfig/main.cpp:113 +#, c-format +msgid "Size of Color mismatch (app:%d, lib:%d)" +msgstr "" + +#: src/synfig/main.cpp:118 +#, c-format +msgid "Size of Canvas mismatch (app:%d, lib:%d)" +msgstr "" + +#: src/synfig/main.cpp:123 +#, c-format +msgid "Size of Layer mismatch (app:%d, lib:%d)" +msgstr "" + +#: src/synfig/main.cpp:184 +msgid "Starting Subsystem \"Modules\"" +msgstr "" + +#: src/synfig/main.cpp:186 +msgid "Unable to initialize subsystem \"Module\"" +msgstr "" + +#: src/synfig/main.cpp:188 +msgid "Starting Subsystem \"Layers\"" +msgstr "" + +#: src/synfig/main.cpp:192 +msgid "Unable to initialize subsystem \"Layers\"" +msgstr "" + +#: src/synfig/main.cpp:195 +msgid "Starting Subsystem \"Targets\"" +msgstr "" + +#: src/synfig/main.cpp:200 +msgid "Unable to initialize subsystem \"Targets\"" +msgstr "" + +#: src/synfig/main.cpp:203 +msgid "Starting Subsystem \"Importers\"" +msgstr "" + +#: src/synfig/main.cpp:209 +msgid "Unable to initialize subsystem \"Importers\"" +msgstr "" + +#: src/synfig/main.cpp:212 +msgid "Starting Subsystem \"ValueNodes\"" +msgstr "" + +#: src/synfig/main.cpp:219 +msgid "Unable to initialize subsystem \"ValueNodes\"" +msgstr "" + +#: src/synfig/main.cpp:256 src/synfig/main.cpp:257 +#, c-format +msgid "Loading modules from %s" +msgstr "" + +#: src/synfig/main.cpp:267 +#, fuzzy, c-format +msgid "Unable to open module list file '%s'" +msgstr "Невозможно найти модуль \"%s\" (%s)" + +#: src/synfig/main.cpp:281 src/tool/main.cpp:243 +msgid "DONE" +msgstr "ГОТОВО" + +#: src/synfig/main.cpp:347 src/tool/main.cpp:123 src/tool/main.cpp:164 +msgid "error" +msgstr "ошибка" + +#: src/synfig/main.cpp:362 src/tool/main.cpp:130 src/tool/main.cpp:171 +msgid "warning" +msgstr "" + +#: src/synfig/main.cpp:377 +msgid "info" +msgstr "" + +#: src/synfig/module.cpp:66 +msgid "Errors on lt_dlinit()" +msgstr "" + +#: src/synfig/module.cpp:103 +#, fuzzy, c-format +msgid "Unable to load module '%s'" +msgstr "Невозможно найти модуль \"%s\" (%s)" + +#: src/synfig/module.cpp:128 +#, c-format +msgid "Attempting to register \"%s\"" +msgstr "Попытка зарегистрировать \"%s\"" + +#: src/synfig/module.cpp:135 +#, c-format +msgid "Unable to find module \"%s\" (%s)" +msgstr "Невозможно найти модуль \"%s\" (%s)" + +#: src/synfig/module.cpp:139 +#, c-format +msgid "Found module \"%s\"" +msgstr "Найден модуль \"%s\"" + +#: src/synfig/module.cpp:173 +#, c-format +msgid "Unable to find entrypoint in module \"%s\" (%s)" +msgstr "" + +#: src/synfig/module.cpp:186 +msgid "Entrypoint did not return a module." +msgstr "" + +#: src/synfig/module.cpp:190 +#, c-format +msgid "Success for \"%s\"" +msgstr "" + +#: src/synfig/palette.cpp:72 +msgid "Unnamed" +msgstr "" + +#: src/synfig/palette.cpp:89 +msgid "Surface Palette" +msgstr "" + +#: src/synfig/palette.cpp:284 +#, c-format +msgid "%0.2f%% Gray" +msgstr "" + +#: src/synfig/palette.cpp:299 +#, c-format +msgid "Unable to open %s for write" +msgstr "" + +#: src/synfig/palette.cpp:321 +#, c-format +msgid "Unable to open %s for read" +msgstr "" + +#: src/synfig/palette.cpp:329 +#, c-format +msgid "%s does not appear to be a palette file" +msgstr "" + +#: src/synfig/paramdesc.cpp:64 +msgid "_Composite" +msgstr "_Составной" + +#: src/synfig/paramdesc.cpp:65 +msgid "_Straight" +msgstr "" + +#: src/synfig/paramdesc.cpp:66 +msgid "_Onto" +msgstr "" + +#: src/synfig/paramdesc.cpp:67 +msgid "S_traight Onto" +msgstr "" + +#: src/synfig/paramdesc.cpp:68 +msgid "_Behind" +msgstr "_Позади" + +#: src/synfig/paramdesc.cpp:69 +msgid "Sc_reen" +msgstr "_Экран" + +#: src/synfig/paramdesc.cpp:70 +msgid "Overla_y" +msgstr "П_ерекрытие" + +#: src/synfig/paramdesc.cpp:71 +msgid "_Hard Light" +msgstr "_Направленный свет" + +#: src/synfig/paramdesc.cpp:72 +msgid "_Multiply" +msgstr "_Умножение" + +#: src/synfig/paramdesc.cpp:73 +msgid "_Divide" +msgstr "_Деление" + +#: src/synfig/paramdesc.cpp:74 +msgid "_Add" +msgstr "_Сложение" + +#: src/synfig/paramdesc.cpp:75 +msgid "S_ubtract" +msgstr "_Вычитание" + +#: src/synfig/paramdesc.cpp:76 +msgid "Di_fference" +msgstr "_Разница" + +#: src/synfig/paramdesc.cpp:77 +msgid "Bri_ghten" +msgstr "_Осветление" + +#: src/synfig/paramdesc.cpp:78 +msgid "Dar_ken" +msgstr "_Затемнение" + +#: src/synfig/paramdesc.cpp:79 +msgid "Co_lor" +msgstr "_Цвет" + +#: src/synfig/paramdesc.cpp:80 +msgid "Hu_e" +msgstr "_Тон" + +#: src/synfig/paramdesc.cpp:81 +msgid "Saturatio_n" +msgstr "Н_асыщенность" + +#: src/synfig/paramdesc.cpp:82 +msgid "Lum_inance" +msgstr "Свет_имость" + +#: src/synfig/paramdesc.cpp:84 +msgid "Alpha O_ver" +msgstr "А_льфа над" + +#: src/synfig/paramdesc.cpp:85 +msgid "Al_pha Brighten" +msgstr "Осветление аль_фы" + +#: src/synfig/paramdesc.cpp:86 +msgid "Al_pha Darken" +msgstr "Затемнение альф_ы" + +#: src/synfig/render.cpp:247 src/synfig/render.cpp:248 +#: src/synfig/render.cpp:302 src/synfig/render.cpp:303 +#: src/synfig/render.cpp:423 src/synfig/render.cpp:424 +#: src/synfig/render.cpp:450 src/synfig/render.cpp:451 +msgid "Target panic" +msgstr "" + +#: src/synfig/savecanvas.cpp:254 +#, c-format +msgid "Unknown value(%s), cannot create XML representation!" +msgstr "" + +#: src/synfig/savecanvas.cpp:529 +#, c-format +msgid "Unknown ValueNode Type (%s), cannot create an XML representation" +msgstr "" + +#: src/synfig/target_scanline.cpp:135 src/synfig/target_tile.cpp:319 +msgid "Target initialization failure" +msgstr "" + +#: src/synfig/target_scanline.cpp:251 src/synfig/target_scanline.cpp:297 +#: src/synfig/target_scanline.cpp:395 src/synfig/target_scanline.cpp:443 +#: src/synfig/target_tile.cpp:261 +msgid "Accelerated Renderer Failure" +msgstr "" + +#: src/synfig/target_scanline.cpp:306 src/synfig/target_scanline.cpp:452 +msgid "Unable to put surface on target" +msgstr "" + +#: src/synfig/target_scanline.cpp:465 src/synfig/target_tile.cpp:442 +msgid "Caught string :" +msgstr "" + +#: src/synfig/target_scanline.cpp:470 src/synfig/target_tile.cpp:447 +msgid "Ran out of memory (Probably a bug)" +msgstr "" + +#: src/synfig/target_scanline.cpp:475 src/synfig/target_tile.cpp:452 +msgid "Caught unknown error, rethrowing..." +msgstr "" + +#: src/synfig/target_tile.cpp:148 +msgid "Bad Tile Size" +msgstr "" + +#: src/synfig/target_tile.cpp:198 +msgid "Parametric Renderer Failure" +msgstr "" + +#: src/synfig/target_tile.cpp:205 src/synfig/target_tile.cpp:269 +msgid "Bad surface" +msgstr "" + +#: src/synfig/target_tile.cpp:215 src/synfig/target_tile.cpp:281 +msgid "add_tile():Unable to put surface on target" +msgstr "" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:234 src/synfig/value.cpp:289 +msgid "bool" +msgstr "" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:236 src/synfig/value.cpp:287 +msgid "integer" +msgstr "" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:238 +msgid "angle" +msgstr "" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:240 src/synfig/value.cpp:281 +msgid "time" +msgstr "" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:242 src/synfig/value.cpp:284 +msgid "real" +msgstr "" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:244 +msgid "vector" +msgstr "" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:246 +msgid "color" +msgstr "" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:248 +msgid "segment" +msgstr "" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:250 +msgid "bline_point" +msgstr "" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:252 +msgid "list" +msgstr "" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:254 +msgid "canvas" +msgstr "" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:256 +msgid "string" +msgstr "" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:258 +msgid "gradient" +msgstr "" + +#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types +#: src/synfig/value.cpp:260 +msgid "nil" +msgstr "" + +#: src/synfig/valuenode.cpp:136 src/synfig/valuenode_composite.cpp:431 +msgid "Composite" +msgstr "" + +#: src/synfig/valuenode.cpp:137 src/synfig/valuenode_radialcomposite.cpp:303 +msgid "Radial Composite" +msgstr "" + +#: src/synfig/valuenode.cpp:138 src/synfig/valuenode_reference.cpp:156 +msgid "Reference" +msgstr "" + +#: src/synfig/valuenode.cpp:139 src/synfig/valuenode_blinecalctangent.cpp:244 +#: src/synfig/valuenode_blinecalcwidth.cpp:208 +#: src/synfig/valuenode_exp.cpp:157 src/synfig/valuenode_scale.cpp:217 +msgid "Scale" +msgstr "" + +#: src/synfig/valuenode.cpp:140 src/synfig/valuenode_segcalctangent.cpp:100 +msgid "Segment Tangent" +msgstr "" + +#: src/synfig/valuenode.cpp:141 src/synfig/valuenode_segcalcvertex.cpp:98 +msgid "Segment Vertex" +msgstr "Вершина сегмента" + +#: src/synfig/valuenode.cpp:142 src/synfig/valuenode_stripes.cpp:78 +#: src/synfig/valuenode_stripes.cpp:225 +msgid "Stripes" +msgstr "" + +#: src/synfig/valuenode.cpp:143 src/synfig/valuenode_subtract.cpp:233 +msgid "Subtract" +msgstr "" + +#: src/synfig/valuenode.cpp:144 src/synfig/valuenode_twotone.cpp:179 +msgid "Two-Tone" +msgstr "" + +#: src/synfig/valuenode.cpp:145 src/synfig/valuenode_bline.cpp:826 +#: src/synfig/valuenode_blinecalctangent.cpp:240 +#: src/synfig/valuenode_blinecalcvertex.cpp:199 +#: src/synfig/valuenode_blinecalcwidth.cpp:205 +msgid "BLine" +msgstr "Кривая" + +#: src/synfig/valuenode.cpp:146 src/synfig/valuenode_dynamiclist.cpp:713 +msgid "Dynamic List" +msgstr "Динамический список" + +#: src/synfig/valuenode.cpp:147 src/synfig/valuenode_gradientrotate.cpp:76 +#: src/synfig/valuenode_gradientrotate.cpp:188 +msgid "Gradient Rotate" +msgstr "" + +#: src/synfig/valuenode.cpp:148 src/synfig/valuenode_sine.cpp:106 +msgid "Sine" +msgstr "" + +#: src/synfig/valuenode.cpp:150 src/synfig/valuenode_timedswap.cpp:264 +msgid "Timed Swap" +msgstr "" + +#: src/synfig/valuenode.cpp:151 src/synfig/valuenode_repeat_gradient.cpp:81 +#: src/synfig/valuenode_repeat_gradient.cpp:234 +msgid "Repeat Gradient" +msgstr "" + +#: src/synfig/valuenode.cpp:152 src/synfig/valuenode_exp.cpp:102 +msgid "Exponential" +msgstr "" + +#: src/synfig/valuenode.cpp:153 src/synfig/valuenode_add.cpp:227 +msgid "Add" +msgstr "" + +#: src/synfig/valuenode.cpp:154 src/synfig/valuenode_blinecalctangent.cpp:172 +msgid "BLine Tangent" +msgstr "Касательная кривой" + +#: src/synfig/valuenode.cpp:155 src/synfig/valuenode_blinecalcvertex.cpp:140 +msgid "BLine Vertex" +msgstr "Вершина кривой" + +#: src/synfig/valuenode.cpp:156 src/synfig/valuenode_range.cpp:230 +msgid "Range" +msgstr "Диапазон" + +#: src/synfig/valuenode.cpp:158 src/synfig/valuenode_switch.cpp:170 +msgid "Switch" +msgstr "" + +#: src/synfig/valuenode.cpp:159 src/synfig/valuenode_cos.cpp:106 +msgid "Cos" +msgstr "" + +#: src/synfig/valuenode.cpp:160 +msgid "aTan2" +msgstr "" + +#: src/synfig/valuenode.cpp:161 +msgid "Reverse Tangent" +msgstr "" + +#: src/synfig/valuenode.cpp:163 src/synfig/valuenode_reciprocal.cpp:179 +msgid "Reciprocal" +msgstr "" + +#: src/synfig/valuenode.cpp:165 src/synfig/valuenode_integer.cpp:183 +msgid "From Integer" +msgstr "Текст" + +#: src/synfig/valuenode.cpp:167 src/synfig/valuenode_blinecalcwidth.cpp:143 +msgid "BLine Width" +msgstr "" + +#: src/synfig/valuenode.cpp:169 +msgid "Vector Angle" +msgstr "" + +#: src/synfig/valuenode.cpp:170 +msgid "Vector Length" +msgstr "" + +#: src/synfig/valuenode.cpp:171 +msgid "Vector X" +msgstr "" + +#: src/synfig/valuenode.cpp:172 +msgid "Vector Y" +msgstr "" + +#: src/synfig/valuenode.cpp:173 +msgid "Gradient Color" +msgstr "" + +#: src/synfig/valuenode.cpp:174 +msgid "Dot Product" +msgstr "" + +#: src/synfig/valuenode.cpp:175 src/synfig/valuenode_timestring.cpp:115 +msgid "Time String" +msgstr "" + +#: src/synfig/valuenode.cpp:176 src/synfig/valuenode_realstring.cpp:121 +msgid "Real String" +msgstr "" + +#: src/synfig/valuenode.cpp:177 src/synfig/valuenode_join.cpp:140 +msgid "Joined List" +msgstr "" + +#: src/synfig/valuenode.cpp:178 +msgid "Angle String" +msgstr "" + +#: src/synfig/valuenode.cpp:179 +msgid "Int String" +msgstr "" + +#: src/synfig/valuenode.cpp:180 +msgid "Logarithm" +msgstr "Логарифм" + +#: src/synfig/valuenode.cpp:247 +#, c-format +msgid "Bad type: ValueNode '%s' doesn't accept type '%s'" +msgstr "" + +#: src/synfig/valuenode.cpp:512 +msgid "Placeholder" +msgstr "" + +#: src/synfig/valuenode.h:74 +#, c-format +msgid "%s:%d wrong type for %s: need %s but got %s" +msgstr "" + +#: src/synfig/valuenode_add.cpp:98 src/synfig/valuenode_gradientrotate.cpp:76 +#: src/synfig/valuenode_integer.cpp:78 src/synfig/valuenode_integer.cpp:170 +#: src/synfig/valuenode_range.cpp:86 +#: src/synfig/valuenode_repeat_gradient.cpp:81 +#: src/synfig/valuenode_scale.cpp:87 src/synfig/valuenode_stripes.cpp:78 +#: src/synfig/valuenode_subtract.cpp:98 +msgid ":Bad type " +msgstr "" + +#: src/synfig/valuenode_add.cpp:123 src/synfig/valuenode_scale.cpp:116 +#: src/synfig/valuenode_subtract.cpp:129 +msgid "One or both of my parameters aren't set!" +msgstr "" + +#: src/synfig/valuenode_add.cpp:188 src/synfig/valuenode_subtract.cpp:194 +msgid "LHS" +msgstr "" + +#: src/synfig/valuenode_add.cpp:189 src/synfig/valuenode_subtract.cpp:195 +msgid "RHS" +msgstr "" + +#: src/synfig/valuenode_add.cpp:190 src/synfig/valuenode_scale.cpp:181 +#: src/synfig/valuenode_subtract.cpp:196 +msgid "Scalar" +msgstr "" + +#: src/synfig/valuenode_animated.cpp:261 src/synfig/valuenode_animated.cpp:285 +#: src/synfig/valuenode_animated.cpp:561 src/synfig/valuenode_animated.cpp:579 +#: src/synfig/valuenode_animated.cpp:659 src/synfig/valuenode_animated.cpp:678 +msgid "A waypoint already exists at this point in time" +msgstr "" + +#: src/synfig/valuenode_animated.cpp:1056 +#, c-format +msgid "%s: You cannot use a %s in an animated ValueNode" +msgstr "" + +#: src/synfig/valuenode_animated.cpp:1091 +msgid "Animated" +msgstr "" + +#: src/synfig/valuenode_bline.cpp:802 src/synfig/valuenode_dynamiclist.cpp:619 +msgid "No entries in list" +msgstr "" + +#: src/synfig/valuenode_bline.cpp:805 src/synfig/valuenode_dynamiclist.cpp:622 +msgid "No entries in ret_list" +msgstr "" + +#: src/synfig/valuenode_bline.cpp:814 +#, c-format +msgid "Vertex %03d" +msgstr "Вершина %03d" + +#: src/synfig/valuenode_blinecalctangent.cpp:243 +#: src/synfig/valuenode_gradientrotate.cpp:148 +#: src/synfig/valuenode_linear.cpp:215 +msgid "Offset" +msgstr "Смещение" + +#: src/synfig/valuenode_blinecalctangent.cpp:245 +msgid "Fixed Length" +msgstr "" + +#: src/synfig/valuenode_composite.cpp:161 +#: src/synfig/valuenode_composite.cpp:181 +msgid "Bad type for composite" +msgstr "" + +#: src/synfig/valuenode_composite.cpp:267 +msgid "Red" +msgstr "Красный" + +#: src/synfig/valuenode_composite.cpp:269 +msgid "Green" +msgstr "Зеленый" + +#: src/synfig/valuenode_composite.cpp:271 +msgid "Blue" +msgstr "Синий" + +#: src/synfig/valuenode_composite.cpp:273 +#: src/synfig/valuenode_radialcomposite.cpp:210 +msgid "Alpha" +msgstr "Альфа" + +#: src/synfig/valuenode_composite.cpp:277 +msgid "Vertex 1" +msgstr "Вершина 1" + +#: src/synfig/valuenode_composite.cpp:279 +#: src/synfig/valuenode_composite.cpp:295 +msgid "Tangent 1" +msgstr "Касательная 1" + +#: src/synfig/valuenode_composite.cpp:281 +msgid "Vertex 2" +msgstr "Вершина 2" + +#: src/synfig/valuenode_composite.cpp:283 +#: src/synfig/valuenode_composite.cpp:297 +msgid "Tangent 2" +msgstr "Касательная 2" + +#: src/synfig/valuenode_composite.cpp:287 +msgid "Vertex" +msgstr "Вершина" + +#: src/synfig/valuenode_composite.cpp:293 +msgid "Split Tangents" +msgstr "Разделить касательные" + +#: src/synfig/valuenode_composite.cpp:304 +#: src/synfig/valuenode_radialcomposite.cpp:221 +#, c-format +msgid "C%d" +msgstr "" + +#: src/synfig/valuenode_const.cpp:126 +msgid "Constant" +msgstr "Константа" + +#: src/synfig/valuenode_cos.cpp:167 src/synfig/valuenode_sine.cpp:167 +msgid "Amplitude" +msgstr "Амплитуда" + +#: src/synfig/valuenode_duplicate.cpp:121 +msgid "From" +msgstr "" + +#: src/synfig/valuenode_duplicate.cpp:122 +msgid "To" +msgstr "" + +#: src/synfig/valuenode_dynamiclist.cpp:613 +msgid "List type/item type mismatch, throwing away mismatch" +msgstr "" + +#: src/synfig/valuenode_dynamiclist.cpp:661 +#, c-format +msgid "Item %03d" +msgstr "" + +#: src/synfig/valuenode_exp.cpp:155 +msgid "Exponent" +msgstr "" + +#: src/synfig/valuenode_integer.cpp:132 +msgid "Integer" +msgstr "" + +#: src/synfig/valuenode_join.cpp:202 +msgid "Strings" +msgstr "" + +#: src/synfig/valuenode_join.cpp:203 src/synfig/valuenode_timedswap.cpp:221 +msgid "Before" +msgstr "До" + +#: src/synfig/valuenode_join.cpp:204 +msgid "Separator" +msgstr "" + +#: src/synfig/valuenode_join.cpp:205 src/synfig/valuenode_timedswap.cpp:222 +msgid "After" +msgstr "После" + +#: src/synfig/valuenode_linear.cpp:209 +msgid "Rate" +msgstr "Частота" + +#: src/synfig/valuenode_linear.cpp:212 +msgid "Slope" +msgstr "" + +#: src/synfig/valuenode_radialcomposite.cpp:121 +#: src/synfig/valuenode_radialcomposite.cpp:137 +msgid "Bad type for radialcomposite" +msgstr "" + +#: src/synfig/valuenode_radialcomposite.cpp:199 +msgid "Theta" +msgstr "" + +#: src/synfig/valuenode_radialcomposite.cpp:204 +msgid "Luma" +msgstr "" + +#: src/synfig/valuenode_radialcomposite.cpp:206 +msgid "Saturation" +msgstr "Насыщенность" + +#: src/synfig/valuenode_radialcomposite.cpp:208 +msgid "Hue" +msgstr "Тон" + +#: src/synfig/valuenode_range.cpp:118 +msgid "Some of my parameters aren't set!" +msgstr "" + +#: src/synfig/valuenode_range.cpp:191 +msgid "Min" +msgstr "" + +#: src/synfig/valuenode_range.cpp:192 +msgid "Max" +msgstr "" + +#: src/synfig/valuenode_realstring.cpp:183 +msgid "Real" +msgstr "" + +#: src/synfig/valuenode_realstring.cpp:185 +msgid "Precision" +msgstr "Точность" + +#: src/synfig/valuenode_realstring.cpp:186 +msgid "Zero Padded" +msgstr "" + +#: src/synfig/valuenode_reciprocal.cpp:125 +msgid "Epsilon" +msgstr "" + +#: src/synfig/valuenode_reciprocal.cpp:126 +msgid "Infinite" +msgstr "" + +#: src/synfig/valuenode_repeat_gradient.cpp:184 +msgid "Count" +msgstr "" + +#: src/synfig/valuenode_repeat_gradient.cpp:186 +msgid "Specify Start" +msgstr "" + +#: src/synfig/valuenode_repeat_gradient.cpp:187 +msgid "Specify End" +msgstr "" + +#: src/synfig/valuenode_repeat_gradient.cpp:188 +msgid "Start Color" +msgstr "" + +#: src/synfig/valuenode_repeat_gradient.cpp:189 +msgid "End Color" +msgstr "" + +#: src/synfig/valuenode_segcalctangent.cpp:159 +#: src/synfig/valuenode_segcalcvertex.cpp:157 +msgid "Segment" +msgstr "" + +#: src/synfig/valuenode_step.cpp:215 src/tool/main.cpp:945 +msgid "Start Time" +msgstr "" + +#: src/synfig/valuenode_step.cpp:216 +msgid "Intersection" +msgstr "Пересечение" + +#: src/synfig/valuenode_stripes.cpp:170 +msgid "Color 1" +msgstr "" + +#: src/synfig/valuenode_stripes.cpp:172 +msgid "Color 2" +msgstr "" + +#: src/synfig/valuenode_stripes.cpp:174 +msgid "Stripe Count" +msgstr "" + +#: src/synfig/valuenode_timedswap.cpp:223 +msgid "Swap Time" +msgstr "" + +#: src/synfig/valuenode_timedswap.cpp:224 +msgid "Swap Duration" +msgstr "" + +#: src/synfig/valuenode_timestring.cpp:168 +msgid "Time" +msgstr "" + +#: src/synfig/valuenode_twotone.cpp:136 +msgid "Color1" +msgstr "" + +#: src/synfig/valuenode_twotone.cpp:138 +msgid "Color2" +msgstr "" + +#: src/tool/main.cpp:216 +msgid "Line" +msgstr "" + +#: src/tool/main.cpp:216 +msgid " of " +msgstr "" + +#: src/tool/main.cpp:322 +msgid "syntax: " +msgstr "" + +#: src/tool/main.cpp:325 +msgid "Print out usage and syntax info" +msgstr "" + +#: src/tool/main.cpp:328 +msgid "Specify output target (Default:unknown)" +msgstr "" + +#: src/tool/main.cpp:329 +msgid "Set the image width (Use zero for file default)" +msgstr "" + +#: src/tool/main.cpp:330 +msgid "Set the image height (Use zero for file default)" +msgstr "" + +#: src/tool/main.cpp:331 +msgid "Set the diagonal size of image window (Span)" +msgstr "" + +#: src/tool/main.cpp:332 +msgid "Set antialias amount for parametric renderer." +msgstr "" + +#: src/tool/main.cpp:333 +#, c-format +msgid "Specify image quality for accelerated renderer (default=%d)" +msgstr "" + +#: src/tool/main.cpp:334 +msgid "Gamma (default=2.2)" +msgstr "" + +#: src/tool/main.cpp:335 +msgid "Verbose Output (add more for more verbosity)" +msgstr "" + +#: src/tool/main.cpp:336 +msgid "Quiet mode (No progress/time-remaining display)" +msgstr "" + +#: src/tool/main.cpp:337 +msgid "Render the canvas with the given id instead of the root." +msgstr "" + +#: src/tool/main.cpp:338 +msgid "Specify output filename" +msgstr "" + +#: src/tool/main.cpp:339 +msgid "Enable multithreaded renderer using specified # of threads" +msgstr "" + +#: src/tool/main.cpp:340 +msgid "Print Benchmarks" +msgstr "" + +#: src/tool/main.cpp:341 +msgid "Set the frame rate" +msgstr "" + +#: src/tool/main.cpp:342 +msgid "Render a single frame at " +msgstr "" + +#: src/tool/main.cpp:343 src/tool/main.cpp:344 +msgid "Set the starting time" +msgstr "" + +#: src/tool/main.cpp:345 +msgid "Set the ending time" +msgstr "" + +#: src/tool/main.cpp:346 +msgid "Set the physical resolution (dots-per-inch)" +msgstr "" + +#: src/tool/main.cpp:347 +msgid "Set the physical X resolution (dots-per-inch)" +msgstr "" + +#: src/tool/main.cpp:348 +msgid "Set the physical Y resolution (dots-per-inch)" +msgstr "" + +#: src/tool/main.cpp:350 +msgid "List the exported canvases in the composition" +msgstr "" + +#: src/tool/main.cpp:351 +msgid "Print out specified details of the root canvas" +msgstr "" + +#: src/tool/main.cpp:352 +msgid "Append layers in to composition" +msgstr "" + +#: src/tool/main.cpp:354 +msgid "Print out layer's description, parameter info, etc." +msgstr "" + +#: src/tool/main.cpp:355 +msgid "Print out the list of available layers" +msgstr "" + +#: src/tool/main.cpp:356 +msgid "Print out the list of available targets" +msgstr "" + +#: src/tool/main.cpp:357 +msgid "Print out the list of available importers" +msgstr "" + +#: src/tool/main.cpp:358 +msgid "Print out the list of available ValueNodes" +msgstr "" + +#: src/tool/main.cpp:359 +msgid "Print out the list of loaded modules" +msgstr "" + +#: src/tool/main.cpp:360 +msgid "Print out version information" +msgstr "" + +#: src/tool/main.cpp:361 +msgid "Print out misc build information" +msgstr "" + +#: src/tool/main.cpp:362 +msgid "Print out license information" +msgstr "" + +#: src/tool/main.cpp:365 +msgid "Test GUID generation" +msgstr "" + +#: src/tool/main.cpp:366 +msgid "Test signal implementation" +msgstr "" + +#: src/tool/main.cpp:616 +#, c-format +msgid "Antialiasing set to %d, (%d samples per pixel)" +msgstr "" + +#: src/tool/main.cpp:624 +#, c-format +msgid "Span set to %d units" +msgstr "" + +#: src/tool/main.cpp:634 +#, c-format +msgid "Frame rate set to %d frames per second" +msgstr "" + +#: src/tool/main.cpp:644 +#, c-format +msgid "Physical resolution set to %f dpi" +msgstr "" + +#: src/tool/main.cpp:654 +#, c-format +msgid "Physical X resolution set to %f dpi" +msgstr "" + +#: src/tool/main.cpp:664 +#, c-format +msgid "Physical Y resolution set to %f dpi" +msgstr "" + +#: src/tool/main.cpp:685 +msgid "Rendering frame at " +msgstr "" + +#: src/tool/main.cpp:707 +#, c-format +msgid "Resolution set to %dx%d" +msgstr "" + +#: src/tool/main.cpp:724 +#, c-format +msgid "Quality set to %d" +msgstr "" + +#: src/tool/main.cpp:744 +#, c-format +msgid "Threads set to %d" +msgstr "" + +#: src/tool/main.cpp:914 +msgid "Unrecognised canvas variable: " +msgstr "" + +#: src/tool/main.cpp:915 +msgid "Recognized variables are:" +msgstr "" + +#: src/tool/main.cpp:951 +msgid "End Time" +msgstr "" + +#: src/tool/main.cpp:957 +msgid "Frame Rate" +msgstr "" + +#: src/tool/main.cpp:963 +msgid "Start Frame" +msgstr "" + +#: src/tool/main.cpp:969 +msgid "End Frame" +msgstr "" + +#: src/tool/main.cpp:990 +msgid "Image Aspect Ratio" +msgstr "" + +#: src/tool/main.cpp:999 +msgid "Pixel Width" +msgstr "Ширина пиксела" + +#: src/tool/main.cpp:1005 +msgid "Pixel Height" +msgstr "Высота пиксела" + +#: src/tool/main.cpp:1011 +msgid "Pixel Aspect Ratio" +msgstr "Соотношение сторон пиксела" + +#: src/tool/main.cpp:1020 +msgid "Top Left" +msgstr "Верхний левый" + +#: src/tool/main.cpp:1027 +msgid "Bottom Right" +msgstr "Нижний правый" + +#: src/tool/main.cpp:1034 +msgid "Physical Width" +msgstr "Физическая ширина" + +#: src/tool/main.cpp:1040 +msgid "Physical Height" +msgstr "Физическая высота" + +#: src/tool/main.cpp:1046 +msgid "X Resolution" +msgstr "" + +#: src/tool/main.cpp:1052 +msgid "Y Resolution" +msgstr "" + +#: src/tool/main.cpp:1058 +msgid "Diagonal Image Span" +msgstr "" + +#: src/tool/main.cpp:1067 +msgid "Interlaced" +msgstr "" + +#: src/tool/main.cpp:1073 +msgid "Antialias" +msgstr "" + +#: src/tool/main.cpp:1085 +msgid "Flags" +msgstr "" + +#: src/tool/main.cpp:1091 +msgid "Focus" +msgstr "" + +#: src/tool/main.cpp:1098 +msgid "Background Color" +msgstr "Цвет фона" + +#: src/tool/main.cpp:1108 +msgid "Metadata" +msgstr "Метаданные" + +#: src/tool/main.cpp:1136 +msgid "FATAL: Synfig Version Mismatch" +msgstr "" + +#: src/tool/main.cpp:1152 +msgid "verbosity set to " +msgstr "" + +#: src/tool/main.cpp:1189 +msgid "Unable to load '" +msgstr "" + +#: src/tool/main.cpp:1190 src/tool/main.cpp:1215 src/tool/main.cpp:1223 +#: src/tool/main.cpp:1328 src/tool/main.cpp:1354 +msgid "Throwing out job..." +msgstr "" + +#: src/tool/main.cpp:1214 +msgid "Unable to find canvas with ID \"" +msgstr "" + +#: src/tool/main.cpp:1214 src/tool/main.cpp:1222 +msgid "\" in " +msgstr "" + +#: src/tool/main.cpp:1222 +msgid "Invalid canvas name \"" +msgstr "" + +#: src/tool/main.cpp:1236 +msgid "Quality set to " +msgstr "" + +#: src/tool/main.cpp:1250 +msgid "Unable to append '" +msgstr "" + +#: src/tool/main.cpp:1260 +msgid "Appended contents of " +msgstr "" + +#: src/tool/main.cpp:1264 +msgid "Attempting to determine target/outfile..." +msgstr "" + +#: src/tool/main.cpp:1270 +msgid "Target name undefined, attempting to figure it out" +msgstr "" + +#: src/tool/main.cpp:1299 +msgid "Defaulting to PNG target..." +msgstr "" + +#: src/tool/main.cpp:1318 +msgid "Creating the target..." +msgstr "" + +#: src/tool/main.cpp:1327 +msgid "Unknown target for " +msgstr "" + +#: src/tool/main.cpp:1338 +msgid "Setting the canvas on the target..." +msgstr "" + +#: src/tool/main.cpp:1340 +msgid "Setting the quality of the target..." +msgstr "" + +#: src/tool/main.cpp:1350 +msgid "Unidentified arguments for " +msgstr "" + +#: src/tool/main.cpp:1363 +msgid "Unidentified arguments:" +msgstr "" + +#: src/tool/main.cpp:1372 +msgid "Nothing to do!" +msgstr "" + +#: src/tool/main.cpp:1415 +msgid "Rendering..." +msgstr "Рендеринг..." + +#: src/tool/main.cpp:1431 +msgid "Done." +msgstr "Готово" diff --git a/synfig-core/src/Makefile.am b/synfig-core/src/Makefile.am new file mode 100644 index 0000000..8639170 --- /dev/null +++ b/synfig-core/src/Makefile.am @@ -0,0 +1,13 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +SUBDIRS = \ + synfig \ + modules \ + tool + +EXTRA_DIST = \ + template.cpp \ + template.h diff --git a/synfig-core/src/modules/Makefile.am b/synfig-core/src/modules/Makefile.am new file mode 100644 index 0000000..4a40d3e --- /dev/null +++ b/synfig-core/src/modules/Makefile.am @@ -0,0 +1,60 @@ +# $Id$ + +synfiglibdir = @SYNFIGLIB_DIR@ + +MAINTAINERCLEANFILES = \ + Makefile.in + +SUBDIRS = \ + mod_particle \ + mod_filter \ + mod_yuv420p \ + mod_gif \ + mod_gradient \ + mod_geometry \ + mod_noise \ + mod_libavcodec \ + mod_jpeg \ + mod_openexr \ + mod_bmp \ + mod_ppm \ + mod_png \ + mod_dv \ + mod_imagemagick \ + mod_ffmpeg \ + lyr_freetype \ + lyr_std \ + mod_mng \ + mod_svg \ + mod_magickpp \ + example + +EXTRA_DIST = \ + untemplate.nsh \ + template.nsh \ + example/simplecircle.h \ + example/simplecircle.cpp \ + example/filledrect.h \ + example/main.cpp \ + example/Makefile.am \ + example/filledrect.cpp \ + example/metaballs.cpp \ + example/metaballs.h \ + mod_mng/trgt_mng.h \ + mod_mng/unmod_mng.nsh \ + mod_mng/main.cpp \ + mod_mng/Makefile.am \ + mod_mng/mod_mng.nsh \ + mod_mng/trgt_mng.cpp \ + mptr_mplayer/main.cpp \ + mptr_mplayer/mptr_mplayer.h \ + mptr_mplayer/Makefile.am \ + mptr_mplayer/mptr_mplayer.cpp \ + mod_magickpp/trgt_magickpp.h \ + mod_magickpp/unmod_magickpp.nsh \ + mod_magickpp/main.cpp \ + mod_magickpp/Makefile.am \ + mod_magickpp/mod_magickpp.nsh \ + mod_magickpp/trgt_magickpp.cpp + +sysconf_DATA = synfig_modules.cfg diff --git a/synfig-core/src/modules/example/Makefile.am b/synfig-core/src/modules/example/Makefile.am new file mode 100644 index 0000000..1d38d74 --- /dev/null +++ b/synfig-core/src/modules/example/Makefile.am @@ -0,0 +1,34 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +moduledir = @MODULE_DIR@ + +module_LTLIBRARIES = libexample.la + +libexample_la_SOURCES = \ + main.cpp \ + simplecircle.cpp \ + simplecircle.h \ + filledrect.h \ + filledrect.cpp \ + metaballs.h \ + metaballs.cpp + +libexample_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @SYNFIG_LIBS@ + +libexample_la_LDFLAGS = \ + -module \ + -no-undefined \ + -avoid-version + +libexample_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ diff --git a/synfig-core/src/modules/example/filledrect.cpp b/synfig-core/src/modules/example/filledrect.cpp new file mode 100644 index 0000000..329012f --- /dev/null +++ b/synfig-core/src/modules/example/filledrect.cpp @@ -0,0 +1,586 @@ +/* === S Y N F I G ========================================================= */ +/*! \file filledrect.cpp +** \brief Implementation of the "Rectangle" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "filledrect.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace etl; +using namespace std; +using namespace synfig; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(FilledRect); +SYNFIG_LAYER_SET_NAME(FilledRect,"filled_rectangle"); +SYNFIG_LAYER_SET_LOCAL_NAME(FilledRect,N_("Filled Rectangle")); +SYNFIG_LAYER_SET_CATEGORY(FilledRect,N_("Example")); +SYNFIG_LAYER_SET_VERSION(FilledRect,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(FilledRect,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +FilledRect::FilledRect(): + Layer_Composite(1.0,Color::BLEND_STRAIGHT), + color(Color::black()), + point1(0,0), + point2(1,1), + feather_x(0), + feather_y(0), + bevel(0), + bevCircle(0) +{ +} + +bool +FilledRect::set_param(const String & param, const ValueBase &value) +{ + IMPORT(color); + IMPORT(point1); + IMPORT(point2); + IMPORT_PLUS(feather_x, if(feather_x<0)feather_x=0;); + IMPORT_PLUS(feather_y, if(feather_y<0)feather_y=0;); + IMPORT(bevel); + IMPORT(bevCircle); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +FilledRect::get_param(const String ¶m)const +{ + EXPORT(color); + EXPORT(point1); + EXPORT(point2); + EXPORT(feather_x); + EXPORT(feather_y); + EXPORT(bevel); + EXPORT(bevCircle); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +FilledRect::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("color") + .set_local_name(_("Color")) + ); + + ret.push_back(ParamDesc("point1") + .set_local_name(_("Point 1")) + .set_box("point2") + ); + + ret.push_back(ParamDesc("point2") + .set_local_name(_("Point 2")) + ); + + ret.push_back(ParamDesc("feather_x") + .set_local_name(_("Feather X")) + ); + + ret.push_back(ParamDesc("feather_y") + .set_local_name(_("Feather Y")) + ); + + ret.push_back(ParamDesc("bevel") + .set_local_name(_("Bevel")) + ); + + ret.push_back(ParamDesc("bevCircle") + .set_local_name(_("Keep Bevel Circular")) + ); + + return ret; +} + +synfig::Layer::Handle +FilledRect::hit_check(synfig::Context context, const synfig::Point &point)const +{ + Color clr; + Real amt; + + if (!get_color(point,clr,amt)) + return context.hit_check(point); + + synfig::Layer::Handle tmp; + + if (get_blend_method()==Color::BLEND_BEHIND && (tmp=context.hit_check(point))) + return tmp; + + if (Color::is_onto(get_blend_method()) && !(context.hit_check(point))) + return 0; + + return const_cast(this); +} + +bool +FilledRect::get_color(const Point &pos, Color &out, Real &outamount) const +{ + Point p[2] = {point1,point2}; + Real swap; + + if(p[0][0] > p[1][0]) + { + swap = p[0][0]; + p[0][0] = p[1][0]; + p[1][0] = swap; + } + + if(p[0][1] > p[1][1]) + { + swap = p[0][1]; + p[0][1] = p[1][1]; + p[1][1] = swap; + } + + /* + p[0][0] -= feather_x; + p[1][0] += feather_x; + p[0][1] -= feather_y; + p[1][1] += feather_y;*/ + const Real w = p[1][0] - p[0][0]; + const Real h = p[1][1] - p[0][1]; + + if(pos[0] >= p[0][0] && pos[0] <= p[1][0] && pos[1] >= p[0][1] && pos[1] <= p[1][1]) + { + Real value = 1; + + if(feather_x > 0) + { + Real xdist = pos[0] - p[0][0]; + xdist = min(xdist,p[1][0]-pos[0]); + + if(xdist < feather_x) + { + value = xdist/feather_x; + } + } + + if(feather_y > 0) + { + Real ydist = pos[1]-p[0][1]; + ydist = min(ydist,p[1][1]-pos[1]); + + if(ydist < feather_y) + { + value = min(value,(ydist/feather_y)); + } + } + + //if we're beveled then check with ellipse code... + if(bevel > 0) + { + const Real bev = (bevel > 1) ? 1 : bevel; + const Real bevx = bevCircle ? min(w*bev/2,h*bev/2) : w*bev/2; + const Real bevy = bevCircle ? min(w*bev/2,h*bev/2) : h*bev/2;; + + Vector v(0,0); + bool in = false; + + //based on which quarter it is in (and because it's x/y symmetric) get a positive vector (x/y) + if(pos[0] < p[0][0] + bevx) + { + if(pos[1] < p[0][1] + bevy) + { + v[0] = p[0][0] + bevx - pos[0]; + v[1] = p[0][1] + bevy - pos[1]; + in = true; + }else if(pos[1] > p[1][1] - bevy) + { + v[0] = p[0][0] + bevx - pos[0]; + v[1] = pos[1] - (p[1][1] - bevy); + in = true; + } + } + else if(pos[0] > p[1][0] - bevx) + { + if(pos[1] < p[0][1] + bevy) + { + v[0] = pos[0] - (p[1][0] - bevx); + v[1] = p[0][1] + bevy - pos[1]; + in = true; + }else if(pos[1] > p[1][1] - bevy) + { + v[0] = pos[0] - (p[1][0] - bevx); + v[1] = pos[1] - (p[1][1] - bevy); + in = true; + } + } + + //if it's inside a bevelled block + if(in) + { + const Vector scale(bevx,bevy); + + Vector vc(v[0]/scale[0],v[1]/scale[1]); + Real d = vc.mag(); + + //if it's inside the ellipse + if(d < 1) + { + Real val = atan2(vc[1],vc[0]); + val /= (PI/2); //< will always be (0,pi/2) because both components are positive + + Real fthx=1,fthy=1; + + //change d into distance away from edge + d = 1 - d; + + if(feather_x > 0) + { + if(scale[0] < feather_x) + { + fthy = scale[0]/feather_x; + } + + if(d*scale[0] < feather_x) + { + fthx = d*scale[0]/feather_x; + } + } + + if(feather_y > 0) + { + if(scale[1] < feather_y) + { + fthx = min(fthx,scale[1]/feather_y); + } + + if(d*scale[1] < feather_y) + { + fthy = min(fthy,d*scale[1]/feather_y); + } + } + + //interpolate + outamount = min(value,((1-val)*fthx + val*fthy)) * get_amount(); + out = color; + return true; + + }else return false; + } + } + + outamount = value * get_amount(); + out = color; + + return true; + }else + return false; +} + +Color +FilledRect::get_color(Context context, const Point &pos)const +{ + Color clr; + Real amt; + + if(get_color(pos,clr,amt)) + { + if(amt==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + return clr; + else + return Color::blend(clr,context.get_color(pos),amt,get_blend_method()); + } + else + return context.get_color(pos); +} + +bool +FilledRect::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + // Width and Height of a pixel + const Point br(renddesc.get_br()), tl(renddesc.get_tl()); + const int w = renddesc.get_w(), h = renddesc.get_h(); + + Real wpp = (br[0]-tl[0])/w; + Real hpp = (br[1]-tl[1])/h; + //const Real xneg = wpp<0?-1:1; + //const Real yneg = hpp<0?-1:1; + + //the bounds of the rectangle + Point p[2] = {point1,point2}; + + if((p[0][0] > p[1][0]) ^ (wpp < 0)) + { + swap(p[0][0],p[1][0]); + } + + if((p[0][1] > p[1][1]) ^ (hpp < 0)) + { + swap(p[0][1],p[1][1]); + } + + /*p[0][0] -= xneg*feather_x; + p[1][0] += xneg*feather_x; + p[0][1] -= yneg*feather_y; + p[1][1] += yneg*feather_y;*/ + + //the integer coordinates + int y_start = (int)((p[0][1] - tl[1])/hpp +.5); //round start up + int x_start = (int)((p[0][0] - tl[0])/wpp +.5); + int y_end = (int)((p[1][1] - tl[1])/hpp +.5); //and ends up + int x_end = (int)((p[1][0] - tl[0])/wpp +.5); + + y_start = max(0,y_start); + x_start = max(0,x_start); + y_end = min(h,y_end); + x_end = min(w,x_end); + + SuperCallback supercb(cb,0,9000,10000); + + if(y_start >= h || x_start > w || x_end < 0 || y_end < 0) + { + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + { + if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); + return false; + } + + return true; + } + + Real xf_start = tl[0] + x_start*wpp; + Point pos(xf_start,tl[1] + y_start*hpp); + + Color clr = Color::black(); + Real amt; + + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + { + if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); + return false; + } + + for(int y = y_start; y < y_end; y++, pos[1] += hpp) + { + pos[0] = xf_start; + for(int x = x_start; x < x_end; x++, pos[0] += wpp) + { + if(get_color(pos,clr,amt)) + { + if(amt==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + (*surface)[y][x] = clr; + else + (*surface)[y][x] = Color::blend(clr,(*surface)[y][x],amt,get_blend_method()); + } + } + } + + return true; + +#if 0 + //faster version but much more complex + //the floating point + Real y1,y2,y3; + Real x1,x2,x3; + Real dx1,dx2; //reversed in 3rd y section, not used in 2nd + + //the transparent + Real fx = 0, fy = 0; + Real dfx,dfy; + + //Get the slopes of the lines we need to worry about + if(feather_x) + { + dfx = 1/(fxsize); + + if(fxsize*2 > xfw) + { + x1 = xfw/2; + x2 = 0; + x3 = xfw; + }else + { + x1 = fxsize; + x2 = xfw - fxsize; + x3 = xfw; + } + }else + { + fx = 1; + dfx = 0; + x1=0; + x2=xfw; + x3=0; + } + + if(feather_y) + { + dfy = 1/(fysize); + + if(fysize*2 > yfh) + { + y1 = yfh/2; + y2 = 0; + y3 = yfh; + }else + { + y1 = fysize; + y2 = yfh - fysize; + y3 = yfh; + } + + dx1 = ph*feather_x/feather_y; + dx2 = -2*dx1; + + }else + { + fy = 1; + dfy = 0; + y1=0; + y2=yfh; + y3=0; + } + + fy = yf*dfy; + + int x,y; + Real value = 0; + SuperCallback supercb(cb,0,9000,10000); + Surface::pen p; + + Real tx1 = 0,tx2 = + for(y = y_start;yf < y1; y++,yf++,fy+=dfy, tx1+=dx1) + { + fx = xf*dfx; + + p = surface->get_pen(x_start,y); + for(; xf < x1; xf++,p.inc_x(), fx+=dfx) + { + //we are in the x portion... use fx + value = fx*get_amount(); + if(value==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + p.put_value(color); + else + p.put_value(Color::blend(color,p.get_value(),value,get_blend_method())); + } + + for(;xf < x2; xf++,p.inc_x()) + { + //we are now in y... use fy + value = fy*get_amount(); + if(value==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + p.put_value(color); + else + p.put_value(Color::blend(color,p.get_value(),value,get_blend_method())); + } + + fx = xfw?(xfw - xf)/xfw:1; + for(;xf < x3 && ; xf++,p.inc_x(), fx-=dfx) + { + //we are in the x portion... use fx + value = max(0,fx*get_amount()); + if(value==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + p.put_value(color); + else + p.put_value(Color::blend(color,p.get_value(),value,get_blend_method())); + } + } + + x1 = + for(;fy < 1.0; y++,yf++,fy+=dfy) + { + fx = xf*dfx; + + p = surface->get_pen(x_start,y); + for(; xf < x1; xf++,p.inc_x(), fx+=dfx) + { + //we are in the x portion... use fx + value = fx*get_amount(); + if(value==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + p.put_value(color); + else + p.put_value(Color::blend(color,p.get_value(),value,get_blend_method())); + } + + for(;xf < x2; xf++,p.inc_x()) + { + //we are now in y... use fy + value = fy*get_amount(); + if(value==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + p.put_value(color); + else + p.put_value(Color::blend(color,p.get_value(),value,get_blend_method())); + } + + fx = xfw?(xfw - xf)/xfw:1; + for(;xf < x3 && ; xf++,p.inc_x(), fx-=dfx) + { + //we are in the x portion... use fx + value = max(0,fx*get_amount()); + if(value==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + p.put_value(color); + else + p.put_value(Color::blend(color,p.get_value(),value,get_blend_method())); + } + } + + for() + { + for(int x = x_start; x < x_end; x++) + { + + } + } + +#endif + + // Mark our progress as finished + if(cb && !cb->amount_complete(10000,10000)) + return false; + + return true; +} diff --git a/synfig-core/src/modules/example/filledrect.h b/synfig-core/src/modules/example/filledrect.h new file mode 100644 index 0000000..b540105 --- /dev/null +++ b/synfig-core/src/modules/example/filledrect.h @@ -0,0 +1,81 @@ +/* === S Y N F I G ========================================================= */ +/*! \file filledrect.h +** \brief Header file for implementation of the "Rectangle" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_FILLEDRECT_H +#define __SYNFIG_FILLEDRECT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class FilledRect : public synfig::Layer_Composite +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + synfig::Color color; + + synfig::Point point1; + synfig::Point point2; + + synfig::Real feather_x; + synfig::Real feather_y; + + synfig::Real bevel; + + bool bevCircle; + + bool get_color(const synfig::Point &pos, synfig::Color &out, synfig::Real &outamount)const; + +public: + + FilledRect(); + + virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); + + virtual synfig::ValueBase get_param(const synfig::String & param)const; + + virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; + + virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; + + virtual Vocab get_param_vocab()const; + + virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; +}; // END of class FilledRect + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/example/main.cpp b/synfig-core/src/modules/example/main.cpp new file mode 100644 index 0000000..2a57384 --- /dev/null +++ b/synfig-core/src/modules/example/main.cpp @@ -0,0 +1,61 @@ +/* === S Y N F I G ========================================================= */ +/*! \file example/main.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include "simplecircle.h" +#include "filledrect.h" +#include "metaballs.h" + +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(example) + MODULE_NAME("Example Module") + MODULE_DESCRIPTION("A dummy module that serves as a starting point for writing other modules.") + MODULE_AUTHOR("Robert B. Quattlebaum") + MODULE_VERSION("1.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(example) + BEGIN_LAYERS + LAYER(SimpleCircle) + LAYER(FilledRect) + LAYER(Metaballs) + END_LAYERS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/example/metaballs.cpp b/synfig-core/src/modules/example/metaballs.cpp new file mode 100644 index 0000000..0cfa6c3 --- /dev/null +++ b/synfig-core/src/modules/example/metaballs.cpp @@ -0,0 +1,252 @@ +/* === S Y N F I G ========================================================= */ +/*! \file metaballs.cpp +** \brief Implementation of the "Metaballs" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "metaballs.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace etl; +using namespace std; +using namespace synfig; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Metaballs); +SYNFIG_LAYER_SET_NAME(Metaballs,"metaballs"); +SYNFIG_LAYER_SET_LOCAL_NAME(Metaballs,N_("Metaballs")); +SYNFIG_LAYER_SET_CATEGORY(Metaballs,N_("Example")); +SYNFIG_LAYER_SET_VERSION(Metaballs,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Metaballs,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +Metaballs::Metaballs(): + Layer_Composite(1.0,Color::BLEND_STRAIGHT), + gradient(Color::black(), Color::white()), + threshold(0), + threshold2(1), + positive(false) +{ + centers.push_back(Point( 0, -1.5)); radii.push_back(2.5); weights.push_back(1); + centers.push_back(Point(-2, 1)); radii.push_back(2.5); weights.push_back(1); + centers.push_back(Point( 2, 1)); radii.push_back(2.5); weights.push_back(1); +} + +bool +Metaballs::set_param(const String & param, const ValueBase &value) +{ + if( param=="centers" && value.same_type_as(centers)) + { + centers = value; + return true; + } + + if( param=="weights" && value.same_type_as(weights)) + { + weights = value; + return true; + } + + if( param=="radii" && value.same_type_as(radii)) + { + radii = value; + return true; + } + + IMPORT(gradient); + IMPORT(threshold); + IMPORT(threshold2); + IMPORT(positive); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +Metaballs::get_param(const String ¶m)const +{ + EXPORT(gradient); + + EXPORT(radii); + EXPORT(weights); + EXPORT(centers); + EXPORT(threshold); + EXPORT(threshold2); + EXPORT(positive); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +Metaballs::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("gradient") + .set_local_name(_("Gradient")) + ); + + ret.push_back(ParamDesc("centers") + .set_local_name(_("Points")) + ); + + ret.push_back(ParamDesc("radii") + .set_local_name(_("Radii")) + ); + + ret.push_back(ParamDesc("weights") + .set_local_name(_("Weights")) + ); + + ret.push_back(ParamDesc("threshold") + .set_local_name(_("Gradient Left")) + ); + + ret.push_back(ParamDesc("threshold2") + .set_local_name(_("Gradient Right")) + ); + + ret.push_back(ParamDesc("positive") + .set_local_name(_("Positive Only")) + ); + + return ret; +} + +synfig::Layer::Handle +Metaballs::hit_check(synfig::Context context, const synfig::Point &point)const +{ + Real density(totaldensity(point)); + + if (density <= 0 || density > 1 || get_amount() == 0) + return context.hit_check(point); + + synfig::Layer::Handle tmp; + + if (get_blend_method()==Color::BLEND_BEHIND && (tmp=context.hit_check(point))) + return tmp; + + if (Color::is_onto(get_blend_method()) && !(context.hit_check(point))) + return 0; + + return const_cast(this); +} + +Real +Metaballs::densityfunc(const synfig::Point &p, const synfig::Point &c, Real R)const +{ + const Real dx = p[0] - c[0]; + const Real dy = p[1] - c[1]; + + const Real n = (1 - (dx*dx + dy*dy)/(R*R)); + if (positive && n < 0) return 0; + return (n*n*n); + + /* + f(d) = (1 - d^2)^3 + f'(d) = -6d * (1 - d^2)^2 + + could use this too... + f(d) = (1 - d^2)^2 + f'(d) = -6d * (1 - d^2) + */ +} + +Real +Metaballs::totaldensity(const Point &pos)const +{ + Real density = 0; + + //sum up weighted functions + for(unsigned int i=0;ierror(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); + return false; + } + + for(int y = 0; y < h; y++, pos[1] += ph) + { + pos[0] = tl[0]; + for(int x = 0; x < w; x++, pos[0] += pw) + (*surface)[y][x] = Color::blend(gradient(totaldensity(pos)),(*surface)[y][x],get_amount(),get_blend_method()); + } + + // Mark our progress as finished + if(cb && !cb->amount_complete(10000,10000)) + return false; + + return true; +} diff --git a/synfig-core/src/modules/example/metaballs.h b/synfig-core/src/modules/example/metaballs.h new file mode 100644 index 0000000..d9ae649 --- /dev/null +++ b/synfig-core/src/modules/example/metaballs.h @@ -0,0 +1,81 @@ +/* === S Y N F I G ========================================================= */ +/*! \file metaballs.h +** \brief Header file for implementation of the "Metaballs" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_METABALLS_H +#define __SYNFIG_METABALLS_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ +class Metaballs : public synfig::Layer_Composite +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + synfig::Gradient gradient; + + std::vector centers; + std::vector radii; + std::vector weights; + + synfig::Real threshold; + synfig::Real threshold2; + + bool positive; + + synfig::Real densityfunc(const synfig::Point &p, const synfig::Point &c, synfig::Real R)const; + + synfig::Real totaldensity(const synfig::Point &pos)const; + +public: + + Metaballs(); + + virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); + + virtual synfig::ValueBase get_param(const synfig::String & param)const; + + virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; + + virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; + + virtual Vocab get_param_vocab()const; + + virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; +}; // END of class Metaballs + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/example/simplecircle.cpp b/synfig-core/src/modules/example/simplecircle.cpp new file mode 100644 index 0000000..e2eb896 --- /dev/null +++ b/synfig-core/src/modules/example/simplecircle.cpp @@ -0,0 +1,187 @@ +/* === S Y N F I G ========================================================= */ +/*! \file simplecircle.cpp +** \brief Implementation of the "Simple Circle" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "simplecircle.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace etl; +using namespace std; +using namespace synfig; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(SimpleCircle); +SYNFIG_LAYER_SET_NAME(SimpleCircle,"simple_circle"); +SYNFIG_LAYER_SET_LOCAL_NAME(SimpleCircle,N_("Simple Circle")); +SYNFIG_LAYER_SET_CATEGORY(SimpleCircle,N_("Example")); +SYNFIG_LAYER_SET_VERSION(SimpleCircle,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(SimpleCircle,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +SimpleCircle::SimpleCircle(): + Layer_Composite(1.0,Color::BLEND_STRAIGHT), + color(Color::black()), + center(0,0), + radius(0.5) +{ +} + +bool +SimpleCircle::set_param(const String & param, const ValueBase &value) +{ + IMPORT(color); + IMPORT(center); + IMPORT(radius); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +SimpleCircle::get_param(const String ¶m)const +{ + EXPORT(color); + EXPORT(center); + EXPORT(radius); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +SimpleCircle::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("color") + .set_local_name(_("Color")) + ); + + ret.push_back(ParamDesc("center") + .set_local_name(_("Center")) + ); + + ret.push_back(ParamDesc("radius") + .set_local_name(_("Radius")) + .set_description(_("This is the radius of the circle")) + .set_origin("center") + ); + + return ret; +} + +Color +SimpleCircle::get_color(Context context, const Point &pos)const +{ + + if((pos-center).mag()(this); + else + return context.hit_check(pos); +} + +/* +bool +SimpleCircle::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + { + // Mark our progress as starting + if(cb && !cb->amount_complete(0,1000)) + return false; + + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + surface->fill(color); + + // Mark our progress as finished + if(cb && !cb->amount_complete(1000,1000)) + return false; + + return true; + } + + SuperCallback supercb(cb,0,9500,10000); + + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + return false; + + int x,y; + + Surface::alpha_pen apen(surface->begin()); + + apen.set_value(color); + apen.set_alpha(get_amount()); + apen.set_blend_method(get_blend_method()); + + for(y=0;yamount_complete(10000,10000)) + return false; + + return true; +} +*/ diff --git a/synfig-core/src/modules/example/simplecircle.h b/synfig-core/src/modules/example/simplecircle.h new file mode 100644 index 0000000..48c555c --- /dev/null +++ b/synfig-core/src/modules/example/simplecircle.h @@ -0,0 +1,73 @@ +/* === S Y N F I G ========================================================= */ +/*! \file simplecircle.h +** \brief Header file for implementation of the "Simple Circle" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_SIMPLECIRCLE_H +#define __SYNFIG_SIMPLECIRCLE_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class SimpleCircle : public synfig::Layer_Composite +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + synfig::Color color; + + synfig::Point center; + + synfig::Real radius; + +public: + + SimpleCircle(); + + virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); + + virtual synfig::ValueBase get_param(const synfig::String & param)const; + + virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; + + //virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; + + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + + virtual Vocab get_param_vocab()const; +}; // END of class SimpleCircle + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/lyr_freetype/Makefile.am b/synfig-core/src/modules/lyr_freetype/Makefile.am new file mode 100644 index 0000000..a778e78 --- /dev/null +++ b/synfig-core/src/modules/lyr_freetype/Makefile.am @@ -0,0 +1,49 @@ +# $Id$ + +MAINTAINERCLEANFILES = Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + +AM_CXXFLAGS = \ + @CXXFLAGS@ \ + @FREETYPE_CFLAGS@ + + +moduledir=@MODULE_DIR@ + +if WITH_FREETYPE + +module_LTLIBRARIES = liblyr_freetype.la + +liblyr_freetype_la_SOURCES = \ + main.cpp \ + lyr_freetype.cpp \ + lyr_freetype.h + +liblyr_freetype_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @FREETYPE_LIBS@ \ + @SYNFIG_LIBS@ + +liblyr_freetype_la_LDFLAGS = \ + -module \ + -no-undefined \ + -avoid-version + +liblyr_freetype_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ \ + @FREETYPE_CFLAGS@ + +if WITH_FONTCONFIG +liblyr_freetype_la_LIBADD += @FONTCONFIG_LIBS@ +liblyr_freetype_la_CXXFLAGS += @FONTCONFIG_CFLAGS@ +endif + +endif + + +EXTRA_DIST = \ + lyr_freetype.nsh \ + unlyr_freetype.nsh diff --git a/synfig-core/src/modules/lyr_freetype/lyr_freetype.cpp b/synfig-core/src/modules/lyr_freetype/lyr_freetype.cpp new file mode 100644 index 0000000..2da592a --- /dev/null +++ b/synfig-core/src/modules/lyr_freetype/lyr_freetype.cpp @@ -0,0 +1,919 @@ +/* === S Y N F I G ========================================================= */ +/*! \file lyr_freetype.cpp +** \brief Implementation of the "Text" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2006 Paul Wise +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_LAYER + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif +#ifdef WITH_FONTCONFIG +#include +#endif + +#include "lyr_freetype.h" +#endif + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +#define MAX_GLYPHS 2000 + +#define PANGO_STYLE_NORMAL (0) +#define PANGO_STYLE_OBLIQUE (1) +#define PANGO_STYLE_ITALIC (2) + +#define WEIGHT_NORMAL (400) +#define WEIGHT_BOLD (700) + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Layer_Freetype); +SYNFIG_LAYER_SET_NAME(Layer_Freetype,"text"); +SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Freetype,N_("Text")); +SYNFIG_LAYER_SET_CATEGORY(Layer_Freetype,N_("Other")); +SYNFIG_LAYER_SET_VERSION(Layer_Freetype,"0.2"); +SYNFIG_LAYER_SET_CVS_ID(Layer_Freetype,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/*Glyph::~Glyph() +{ + if(glyph)FT_Done_Glyph(glyph); +} +*/ +void +TextLine::clear_and_free() +{ + std::vector::iterator iter; + for(iter=glyph_table.begin();iter!=glyph_table.end();++iter) + { + if(iter->glyph)FT_Done_Glyph(iter->glyph); + iter->glyph=0; + } + glyph_table.clear(); +} + +/* === M E T H O D S ======================================================= */ + +Layer_Freetype::Layer_Freetype() +{ + face=0; + + size=Vector(0.25,0.25); + text=_("Text Layer"); + color=Color::black(); + origin=Vector(0,0); + orient=Vector(0.5,0.5); + compress=1.0; + vcompress=1.0; + weight=WEIGHT_NORMAL; + style=PANGO_STYLE_NORMAL; + family="Sans Serif"; + use_kerning=true; + grid_fit=false; + old_version=false; + set_blend_method(Color::BLEND_COMPOSITE); + needs_sync_=true; + + new_font(family,style,weight); + + invert=false; +} + +Layer_Freetype::~Layer_Freetype() +{ + if(face) + FT_Done_Face(face); +} + +void +Layer_Freetype::new_font(const synfig::String &family, int style, int weight) +{ + if( + !new_font_(family,style,weight) && + !new_font_(family,style,WEIGHT_NORMAL) && + !new_font_(family,PANGO_STYLE_NORMAL,weight) && + !new_font_(family,PANGO_STYLE_NORMAL,WEIGHT_NORMAL) && + !new_font_("sans serif",style,weight) && + !new_font_("sans serif",style,WEIGHT_NORMAL) && + !new_font_("sans serif",PANGO_STYLE_NORMAL,weight) + ) + new_font_("sans serif",PANGO_STYLE_NORMAL,WEIGHT_NORMAL); +} + +bool +Layer_Freetype::new_font_(const synfig::String &font_fam_, int style, int weight) +{ + synfig::String font_fam(font_fam_); + + if(new_face(font_fam_)) + return true; + + //start evil hack + for(unsigned int i=0;iWEIGHT_NORMAL) + arial+='b'; + if(style==PANGO_STYLE_ITALIC||style==PANGO_STYLE_OBLIQUE) + arial+='i'; + else + if(weight>WEIGHT_NORMAL) arial+='d'; + + if(new_face(arial)) + return true; +#ifdef __APPLE__ + if(new_face("Helvetica RO")) + return true; +#endif + } + + if(font_fam=="comic" || font_fam=="comic sans") + { + String filename("comic"); + if(weight>WEIGHT_NORMAL) + filename+='b'; + if(style==PANGO_STYLE_ITALIC||style==PANGO_STYLE_OBLIQUE) + filename+='i'; + else if(weight>WEIGHT_NORMAL) filename+='d'; + + if(new_face(filename)) + return true; + } + + if(font_fam=="courier" || font_fam=="courier new") + { + String filename("cour"); + if(weight>WEIGHT_NORMAL) + filename+='b'; + if(style==PANGO_STYLE_ITALIC||style==PANGO_STYLE_OBLIQUE) + filename+='i'; + else if(weight>WEIGHT_NORMAL) filename+='d'; + + if(new_face(filename)) + return true; + } + + if(font_fam=="serif" || font_fam=="times" || font_fam=="times new roman") + { + String filename("times"); + if(weight>WEIGHT_NORMAL) + filename+='b'; + if(style==PANGO_STYLE_ITALIC||style==PANGO_STYLE_OBLIQUE) + filename+='i'; + else if(weight>WEIGHT_NORMAL) filename+='d'; + + if(new_face(filename)) + return true; + } + + if(font_fam=="trebuchet") + { + String filename("trebuc"); + if(weight>WEIGHT_NORMAL) + filename+='b'; + if(style==PANGO_STYLE_ITALIC||style==PANGO_STYLE_OBLIQUE) + { + filename+='i'; + if(weight<=WEIGHT_NORMAL) filename+='t'; + } + else if(weight>WEIGHT_NORMAL) filename+='d'; + + if(new_face(filename)) + return true; + } + + if(font_fam=="sans serif" || font_fam=="luxi sans") + { + { + String luxi("luxis"); + if(weight>WEIGHT_NORMAL) + luxi+='b'; + else + luxi+='r'; + if(style==PANGO_STYLE_ITALIC||style==PANGO_STYLE_OBLIQUE) + luxi+='i'; + + if(new_face(luxi)) + return true; + } + if(new_face("arial")) + return true; + if(new_face("Arial")) + return true; + } + if(font_fam=="serif" || font_fam=="times" || font_fam=="times new roman" || font_fam=="luxi serif") + { + { + String luxi("luxir"); + if(weight>WEIGHT_NORMAL) + luxi+='b'; + else + luxi+='r'; + if(style==PANGO_STYLE_ITALIC||style==PANGO_STYLE_OBLIQUE) + luxi+='i'; + + if(new_face(luxi)) + return true; + } + if(new_face("Times New Roman")) + return true; + if(new_face("Times")) + return true; + } + if(font_fam=="luxi") + { + { + String luxi("luxim"); + if(weight>WEIGHT_NORMAL) + luxi+='b'; + else + luxi+='r'; + if(style==PANGO_STYLE_ITALIC||style==PANGO_STYLE_OBLIQUE) + luxi+='i'; + + if(new_face(luxi)) + return true; + } + + if(new_face("Times New Roman")) + return true; + if(new_face("Times")) + return true; + } + + return new_face(font_fam_) || new_face(font_fam); + + return false; +} + +#ifdef USE_MAC_FT_FUNCS +void fss2path(char *path, FSSpec *fss) +{ + int l; //fss->name contains name of last item in path + for(l=0; l<(fss->name[0]); l++) path[l] = fss->name[l + 1]; + path[l] = 0; + + if(fss->parID != fsRtParID) //path is more than just a volume name + { + int i, len; + CInfoPBRec pb; + + pb.dirInfo.ioNamePtr = fss->name; + pb.dirInfo.ioVRefNum = fss->vRefNum; + pb.dirInfo.ioDrParID = fss->parID; + do + { + pb.dirInfo.ioFDirIndex = -1; //get parent directory name + pb.dirInfo.ioDrDirID = pb.dirInfo.ioDrParID; + if(PBGetCatInfoSync(&pb) != noErr) break; + + len = fss->name[0] + 1; + for(i=l; i>=0; i--) path[i + len] = path[i]; + for(i=1; iname[i]; //add to start of path + path[i - 1] = ':'; + l += len; +} while(pb.dirInfo.ioDrDirID != fsRtDirID); //while more directory levels + } +} +#endif + +bool +Layer_Freetype::new_face(const String &newfont) +{ + int error; + FT_Long face_index=0; + + // If we are already loaded, don't bother reloading. + if(face && font==newfont) + return true; + + if(face) + { + FT_Done_Face(face); + face=0; + } + + error=FT_New_Face(ft_library,newfont.c_str(),face_index,&face); + if(error)error=FT_New_Face(ft_library,(newfont+".ttf").c_str(),face_index,&face); + + if(get_canvas()) + { + if(error)error=FT_New_Face(ft_library,(get_canvas()->get_file_path()+ETL_DIRECTORY_SEPARATOR+newfont).c_str(),face_index,&face); + if(error)error=FT_New_Face(ft_library,(get_canvas()->get_file_path()+ETL_DIRECTORY_SEPARATOR+newfont+".ttf").c_str(),face_index,&face); + } + +#ifdef USE_MAC_FT_FUNCS + if(error) + { + FSSpec fs_spec; + error=FT_GetFile_From_Mac_Name(newfont.c_str(),&fs_spec,&face_index); + if(!error) + { + char filename[512]; + fss2path(filename,&fs_spec); + //FSSpecToNativePathName(fs_spec,filename,sizeof(filename)-1, 0); + + error=FT_New_Face(ft_library, filename, face_index,&face); + //error=FT_New_Face_From_FSSpec(ft_library, &fs_spec, face_index,&face); + synfig::info(__FILE__":%d: \"%s\" (%s) -- ft_error=%d",__LINE__,newfont.c_str(),filename,error); + } + else + { + synfig::info(__FILE__":%d: \"%s\" -- ft_error=%d",__LINE__,newfont.c_str(),error); + // Unable to generate fs_spec + } + } +#endif + +#ifdef WITH_FONTCONFIG + if(error) + { + FcFontSet *fs; + FcResult result; + if( !FcInit() ) + { + synfig::warning("Layer_Freetype: fontconfig: %s",_("unable to initialize")); + error = 1; + } else { + FcPattern* pat = FcNameParse((FcChar8 *) newfont.c_str()); + FcConfigSubstitute(0, pat, FcMatchPattern); + FcDefaultSubstitute(pat); + FcPattern *match; + fs = FcFontSetCreate(); + match = FcFontMatch(0, pat, &result); + if (match) + FcFontSetAdd(fs, match); + if (pat) + FcPatternDestroy(pat); + if(fs){ + FcChar8* file; + if( FcPatternGetString (fs->fonts[0], FC_FILE, 0, &file) == FcResultMatch ) + error=FT_New_Face(ft_library,(const char*)file,face_index,&face); + FcFontSetDestroy(fs); + } else + synfig::warning("Layer_Freetype: fontconfig: %s",_("empty font set")); + } + } +#endif + +#ifdef WIN32 + if(error)error=FT_New_Face(ft_library,("C:\\WINDOWS\\FONTS\\"+newfont).c_str(),face_index,&face); + if(error)error=FT_New_Face(ft_library,("C:\\WINDOWS\\FONTS\\"+newfont+".ttf").c_str(),face_index,&face); +#else + +#ifdef __APPLE__ + if(error)error=FT_New_Face(ft_library,("~/Library/Fonts/"+newfont).c_str(),face_index,&face); + if(error)error=FT_New_Face(ft_library,("~/Library/Fonts/"+newfont+".ttf").c_str(),face_index,&face); + if(error)error=FT_New_Face(ft_library,("~/Library/Fonts/"+newfont+".dfont").c_str(),face_index,&face); + + if(error)error=FT_New_Face(ft_library,("/Library/Fonts/"+newfont).c_str(),face_index,&face); + if(error)error=FT_New_Face(ft_library,("/Library/Fonts/"+newfont+".ttf").c_str(),face_index,&face); + if(error)error=FT_New_Face(ft_library,("/Library/Fonts/"+newfont+".dfont").c_str(),face_index,&face); +#endif + + if(error)error=FT_New_Face(ft_library,("/usr/X11R6/lib/X11/fonts/type1/"+newfont).c_str(),face_index,&face); + if(error)error=FT_New_Face(ft_library,("/usr/X11R6/lib/X11/fonts/type1/"+newfont+".ttf").c_str(),face_index,&face); + + if(error)error=FT_New_Face(ft_library,("/usr/share/fonts/truetype/"+newfont).c_str(),face_index,&face); + if(error)error=FT_New_Face(ft_library,("/usr/share/fonts/truetype/"+newfont+".ttf").c_str(),face_index,&face); + + if(error)error=FT_New_Face(ft_library,("/usr/X11R6/lib/X11/fonts/TTF/"+newfont).c_str(),face_index,&face); + if(error)error=FT_New_Face(ft_library,("/usr/X11R6/lib/X11/fonts/TTF/"+newfont+".ttf").c_str(),face_index,&face); + + if(error)error=FT_New_Face(ft_library,("/usr/X11R6/lib/X11/fonts/truetype/"+newfont).c_str(),face_index,&face); + if(error)error=FT_New_Face(ft_library,("/usr/X11R6/lib/X11/fonts/truetype/"+newfont+".ttf").c_str(),face_index,&face); + +#endif + if(error) + { + //synfig::error(strprintf("Layer_Freetype:%s (err=%d)",_("Unable to open face."),error)); + return false; + } + + font=newfont; + + needs_sync_=true; + return true; +} + +bool +Layer_Freetype::set_param(const String & param, const ValueBase &value) +{ + Mutex::Lock lock(mutex); +/* + if(param=="font" && value.same_type_as(font)) + { + new_font(etl::basename(value.get(font)),style,weight); + family=etl::basename(value.get(font)); + return true; + } +*/ + IMPORT_PLUS(family,new_font(family,style,weight)); + IMPORT_PLUS(weight,new_font(family,style,weight)); + IMPORT_PLUS(style,new_font(family,style,weight)); + IMPORT_PLUS(size, if(old_version){size/=2.0;} needs_sync_=true ); + IMPORT_PLUS(text,needs_sync_=true); + IMPORT_PLUS(origin,needs_sync_=true); + IMPORT_PLUS(color, { if (color.get_a() == 0) { if (converted_blend_) { + set_blend_method(Color::BLEND_ALPHA_OVER); + color.set_a(1); } else transparent_color_ = true; } }); + IMPORT(invert); + IMPORT_PLUS(orient,needs_sync_=true); + IMPORT_PLUS(compress,needs_sync_=true); + IMPORT_PLUS(vcompress,needs_sync_=true); + IMPORT_PLUS(use_kerning,needs_sync_=true); + IMPORT_PLUS(grid_fit,needs_sync_=true); + + IMPORT_AS(origin,"pos"); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +Layer_Freetype::get_param(const String& param)const +{ + EXPORT(font); + EXPORT(family); + EXPORT(style); + EXPORT(weight); + EXPORT(size); + EXPORT(text); + EXPORT(color); + EXPORT(origin); + EXPORT(orient); + EXPORT(compress); + EXPORT(vcompress); + EXPORT(use_kerning); + EXPORT(grid_fit); + EXPORT(invert); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +Layer_Freetype::get_param_vocab(void)const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("text") + .set_local_name(_("Text")) + .set_description(_("Text to Render")) + .set_hint("paragraph") + ); + + ret.push_back(ParamDesc("color") + .set_local_name(_("Color")) + .set_description(_("Color of the text")) + ); + + ret.push_back(ParamDesc("family") + .set_local_name(_("Font Family")) + .set_hint("font_family") + ); + + ret.push_back(ParamDesc("style") + .set_local_name(_("Style")) + .set_hint("enum") + .add_enum_value(PANGO_STYLE_NORMAL, "normal" ,_("Normal")) + .add_enum_value(PANGO_STYLE_OBLIQUE, "oblique" ,_("Oblique")) + .add_enum_value(PANGO_STYLE_ITALIC, "italic" ,_("Italic")) + ); + + ret.push_back(ParamDesc("weight") + .set_local_name(_("Weight")) + .set_hint("enum") + .add_enum_value(200, "ultralight" ,_("Ultralight")) + .add_enum_value(300, "light" ,_("light")) + .add_enum_value(400, "normal" ,_("Normal")) + .add_enum_value(700, "bold" ,_("Bold")) + .add_enum_value(800, "ultrabold" ,_("Ultrabold")) + .add_enum_value(900, "heavy" ,_("Heavy")) + ); + ret.push_back(ParamDesc("compress") + .set_local_name(_("Horizontal Spacing")) + .set_description(_("Describes how close glyphs are horizontally")) + ); + + ret.push_back(ParamDesc("vcompress") + .set_local_name(_("Vertical Spacing")) + .set_description(_("Describes how close lines of text are vertically")) + ); + + ret.push_back(ParamDesc("size") + .set_local_name(_("Size")) + .set_description(_("Size of the text")) + .set_hint("size") + .set_origin("origin") + .set_scalar(1) + ); + + ret.push_back(ParamDesc("orient") + .set_local_name(_("Orientation")) + .set_description(_("Text Orientation")) + .set_invisible_duck() + ); + + ret.push_back(ParamDesc("origin") + .set_local_name(_("Origin")) + .set_description(_("Text Position")) + ); + + ret.push_back(ParamDesc("font") + .set_local_name(_("Font")) + .set_description(_("Filename of the font to use")) + .set_hint("filename") + .not_critical() + .hidden() + ); + + ret.push_back(ParamDesc("use_kerning") + .set_local_name(_("Kerning")) + .set_description(_("Enables/Disables font kerning (If the font supports it)")) + ); + + ret.push_back(ParamDesc("grid_fit") + .set_local_name(_("Sharpen Edges")) + .set_description(_("Turn this off if you are going to be animating the text")) + ); + ret.push_back(ParamDesc("invert") + .set_local_name(_("Invert")) + ); + return ret; +} + +void +Layer_Freetype::sync() +{ + needs_sync_=false; +} + +inline Color +Layer_Freetype::color_func(const Point &point_ __attribute__ ((unused)), int quality __attribute__ ((unused)), float supersample __attribute__ ((unused)))const +{ + if (invert) + return color; + else + return Color::alpha(); +} + +Color +Layer_Freetype::get_color(Context context, const synfig::Point &pos)const +{ + if(needs_sync_) + const_cast(this)->sync(); + + const Color color(color_func(pos,0)); + + if(!face) + return context.get_color(pos); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + return color; + else + return Color::blend(color,context.get_color(pos),get_amount(),get_blend_method()); +} + +bool +Layer_Freetype::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + static synfig::RecMutex freetype_mutex; + + if(needs_sync_) + const_cast(this)->sync(); + + int error; + Vector size(Layer_Freetype::size*2); + + if(!context.accelerated_render(surface,quality,renddesc,cb)) + return false; + + if(is_disabled() || text.empty()) + return true; + + // If there is no font loaded, just bail + if(!face) + { + if(cb)cb->warning(string("Layer_Freetype:")+_("No face loaded, no text will be rendered.")); + return true; + } + + String text(Layer_Freetype::text); + if(text=="@_FILENAME_@" && get_canvas() && !get_canvas()->get_file_name().empty()) + { + text=basename(get_canvas()->get_file_name()); + } + + // Width and Height of a pixel + Vector::value_type pw=renddesc.get_w()/(renddesc.get_br()[0]-renddesc.get_tl()[0]); + Vector::value_type ph=renddesc.get_h()/(renddesc.get_br()[1]-renddesc.get_tl()[1]); + + // Calculate character width and height + int w=abs(round_to_int(size[0]*pw)); + int h=abs(round_to_int(size[1]*ph)); + + //int bx=(int)((origin[0]-renddesc.get_tl()[0])*pw*64+0.5); + //int by=(int)((origin[1]-renddesc.get_tl()[1])*ph*64+0.5); + int bx=0; + int by=0; + + // If the font is the size of a pixel, don't bother rendering any text + if(w<=1 || h<=1) + { + if(cb)cb->warning(string("Layer_Freetype:")+_("Text too small, no text will be rendered.")); + return true; + } + + synfig::RecMutex::Lock lock(freetype_mutex); + +#define CHAR_RESOLUTION (64) + error = FT_Set_Char_Size( + face, // handle to face object + (int)CHAR_RESOLUTION, // char_width in 1/64th of points + (int)CHAR_RESOLUTION, // char_height in 1/64th of points + round_to_int(abs(size[0]*pw*CHAR_RESOLUTION)), // horizontal device resolution + round_to_int(abs(size[1]*ph*CHAR_RESOLUTION)) ); // vertical device resolution + + // Here is where we can compensate for the + // error in freetype's rendering engine. + const float xerror(abs(size[0]*pw)/(float)face->size->metrics.x_ppem/1.13f/0.996); + const float yerror(abs(size[1]*ph)/(float)face->size->metrics.y_ppem/1.13f/0.996); + //synfig::info("xerror=%f, yerror=%f",xerror,yerror); + const float compress(Layer_Freetype::compress*xerror); + const float vcompress(Layer_Freetype::vcompress*yerror); + + if(error) + { + if(cb)cb->warning(string("Layer_Freetype:")+_("Unable to set face size.")+strprintf(" (err=%d)",error)); + } + + FT_GlyphSlot slot = face->glyph; // a small shortcut + FT_UInt glyph_index(0); + FT_UInt previous(0); + int u,v; + + std::list lines; + + /* + -- ** -- CREATE GLYPHS ------------------------------------------------------- + */ + + mbstate_t ps; + memset(&ps, 0, sizeof(ps)); + + lines.push_front(TextLine()); + string::const_iterator iter; + for (iter=text.begin(); iter!=text.end(); ++iter) + { + int multiplier(1); + if(*iter=='\n') + { + lines.push_front(TextLine()); + bx=0; + by=0; + previous=0; + continue; + } + if(*iter=='\t') + { + multiplier=8; + glyph_index = FT_Get_Char_Index( face, ' ' ); + } + else + { + wchar_t wc; + size_t converted = mbrtowc(&wc, &(*iter), text.end() - iter, &ps); + + if(converted == (size_t)(-1)) + { + synfig::warning("Layer_Freetype: multibyte: %s", + _("Invalid multibyte sequence - is the locale set?\n")); + continue; + } + + if(converted == (size_t)(-2)) + { + synfig::warning("Layer_Freetype: multibyte: %s", + _("Can't parse multibyte character.\n")); + continue; + } + + glyph_index = FT_Get_Char_Index( face, wc ); + + if(converted > 1) + iter += converted - 1; + } + + // retrieve kerning distance and move pen position + if ( FT_HAS_KERNING(face) && use_kerning && previous && glyph_index ) + { + FT_Vector delta; + + if(grid_fit) + FT_Get_Kerning( face, previous, glyph_index, ft_kerning_default, &delta ); + else + FT_Get_Kerning( face, previous, glyph_index, ft_kerning_unfitted, &delta ); + + if(compress<1.0f) + { + bx += round_to_int(delta.x*compress); + by += round_to_int(delta.y*compress); + } + else + { + bx += delta.x; + by += delta.y; + } + } + + Glyph curr_glyph; + + // store current pen position + curr_glyph.pos.x = bx; + curr_glyph.pos.y = by; + + // load glyph image into the slot. DO NOT RENDER IT !! + if(grid_fit) + error = FT_Load_Glyph( face, glyph_index, FT_LOAD_DEFAULT); + else + error = FT_Load_Glyph( face, glyph_index, FT_LOAD_DEFAULT|FT_LOAD_NO_HINTING ); + if (error) continue; // ignore errors, jump to next glyph + + // extract glyph image and store it in our table + error = FT_Get_Glyph( face->glyph, &curr_glyph.glyph ); + if (error) continue; // ignore errors, jump to next glyph + + // record current glyph index + previous = glyph_index; + + // Update the line width + lines.front().width=bx+slot->advance.x; + + // increment pen position + if(multiplier>1) + bx += round_to_int(slot->advance.x*multiplier*compress)-bx%round_to_int(slot->advance.x*multiplier*compress); + else + bx += round_to_int(slot->advance.x*compress*multiplier); + + //bx += round_to_int(slot->advance.x*compress*multiplier); + //by += round_to_int(slot->advance.y*compress); + by += slot->advance.y*multiplier; + + lines.front().glyph_table.push_back(curr_glyph); + + } + + //float string_height; + //string_height=(((lines.size()-1)*face->size->metrics.height+lines.back().actual_height())); + + //int string_height=face->size->metrics.ascender; +//#define METRICS_SCALE_ONE (65536.0f) +#define METRICS_SCALE_ONE ((float)(1<<16)) + + float line_height; + line_height=vcompress*((float)face->height*(((float)face->size->metrics.y_scale/METRICS_SCALE_ONE))); + + // This module sees to expect pixel height to be negative, as it + // usually is. But rendering to .bmp format causes ph to be + // positive, which was causing text to be rendered upside down. + if (ph>0) line_height = -line_height; + + int string_height; + string_height=round_to_int(((lines.size()-1)*line_height+lines.back().actual_height())); + //synfig::info("string_height=%d",string_height); + //synfig::info("line_height=%f",line_height); + + /* + -- ** -- RENDER THE GLYPHS --------------------------------------------------- + */ + + Surface src_; + Surface *src_surface; + + src_surface=surface; + + if(invert) + { + src_=*surface; + Surface::alpha_pen pen(surface->begin(),get_amount(),get_blend_method()); + + surface->fill(color,pen,src_.get_w(),src_.get_h()); + + src_surface=&src_; + } + + { + std::list::iterator iter; + int curr_line; + for(curr_line=0,iter=lines.begin();iter!=lines.end();++iter,curr_line++) + { + bx=round_to_int((origin[0]-renddesc.get_tl()[0])*pw*CHAR_RESOLUTION-orient[0]*iter->width); + // I've no idea why 1.5, but it kind of works. Otherwise, + // rendering to .bmp (which renders from bottom to top, due to + // the .bmp format describing the image from bottom to top, + // renders text in the wrong place. + by=round_to_int((origin[1]-renddesc.get_tl()[1])*ph*CHAR_RESOLUTION + + (1.0-orient[1])*string_height-line_height*curr_line + + ((ph>0) ? line_height/1.5 : 0)); + + //by=round_to_int(vcompress*((origin[1]-renddesc.get_tl()[1])*ph*64+(1.0-orient[1])*string_height-face->size->metrics.height*curr_line)); + //synfig::info("curr_line=%d, bx=%d, by=%d",curr_line,bx,by); + + std::vector::iterator iter2; + for(iter2=iter->glyph_table.begin();iter2!=iter->glyph_table.end();++iter2) + { + FT_Glyph image(iter2->glyph); + FT_Vector pen; + FT_BitmapGlyph bit; + + pen.x = bx + iter2->pos.x; + pen.y = by + iter2->pos.y; + + //synfig::info("GLYPH: line %d, pen.x=%d, pen,y=%d",curr_line,(pen.x+32)>>6,(pen.y+32)>>6); + + error = FT_Glyph_To_Bitmap( &image, ft_render_mode_normal,0/*&pen*/, 1 ); + if(error) { FT_Done_Glyph( image ); continue; } + + bit = (FT_BitmapGlyph)image; + + for(v=0;vbitmap.rows;v++) + for(u=0;ubitmap.width;u++) + { + int x=u+((pen.x+32)>>6)+ bit->left; + int y=((pen.y+32)>>6) + (bit->top - v) * ((ph<0) ? -1 : 1); + if( y>=0 && + x>=0 && + yget_h() && + xget_w()) + { + float myamount=(float)bit->bitmap.buffer[v*bit->bitmap.pitch+u]/255.0f; + if(invert) + myamount=1.0f-myamount; + (*surface)[y][x]=Color::blend(color,(*src_surface)[y][x],myamount*get_amount(),get_blend_method()); + } + } + + FT_Done_Glyph( image ); + } + //iter->clear_and_free(); + } + } + + return true; +} + +synfig::Rect +Layer_Freetype::get_bounding_rect()const +{ + if(needs_sync_) + const_cast(this)->sync(); +// if(!is_disabled()) + return synfig::Rect::full_plane(); +} diff --git a/synfig-core/src/modules/lyr_freetype/lyr_freetype.h b/synfig-core/src/modules/lyr_freetype/lyr_freetype.h new file mode 100644 index 0000000..81261bc --- /dev/null +++ b/synfig-core/src/modules/lyr_freetype/lyr_freetype.h @@ -0,0 +1,167 @@ +/* === S Y N F I G ========================================================= */ +/*! \file lyr_freetype.h +** \brief Header file for implementation of the "Text" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_LYR_FREETYPE_H +#define __SYNFIG_LYR_FREETYPE_H + +/* === H E A D E R S ======================================================= */ + +//#ifdef __APPLE__ +//#define USE_MAC_FT_FUNCS (1) +//#endif + +#include +#include +#include +#include + +#include +#include FT_FREETYPE_H +#include FT_GLYPH_H +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include + +#ifdef USE_MAC_FT_FUNCS + #include + #include FT_MAC_H +#endif + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + + +struct Glyph +{ + FT_Glyph glyph; + FT_Vector pos; + //int width; +}; +struct TextLine +{ + int width; + std::vector glyph_table; + + TextLine():width(0) { } + void clear_and_free(); + + int actual_height()const + { + int height(0); + + std::vector::const_iterator iter; + for(iter=glyph_table.begin();iter!=glyph_table.end();++iter) + { + FT_BBox glyph_bbox; + + //FT_Glyph_Get_CBox( glyphs[n], ft_glyph_bbox_pixels, &glyph_bbox ); + FT_Glyph_Get_CBox( iter->glyph, ft_glyph_bbox_subpixels, &glyph_bbox ); + + if(glyph_bbox.yMax>height) + height=glyph_bbox.yMax; + } + return height; + } +}; + + +class Layer_Freetype : public synfig::Layer_Composite, public synfig::Layer_NoDeform +{ + SYNFIG_LAYER_MODULE_EXT +private: + + FT_Face face; + synfig::String font; + synfig::String family; + synfig::String text; + synfig::Vector size; + synfig::Vector orient; + synfig::Color color; + synfig::Point origin; + synfig::Real compress; + synfig::Real vcompress; + + int style; + int weight; + bool use_kerning; + bool grid_fit; + bool invert; + + bool old_version; + bool needs_sync_; + + void sync(); + + synfig::Color color_func(const synfig::Point &x, int quality=10, float supersample=0)const; + + mutable synfig::Mutex mutex; + +public: + Layer_Freetype(); + virtual ~Layer_Freetype(); + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + virtual ValueBase get_param(const String & param)const; + virtual Color get_color(Context context, const synfig::Point &pos)const; + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + + virtual Vocab get_param_vocab()const; + + virtual bool set_version(const String &ver){if(ver=="0.1")old_version=true;return true;} + virtual void reset_version(){old_version=false;} + + virtual synfig::Rect get_bounding_rect()const; + +private: + void new_font(const synfig::String &family, int style=0, int weight=400); + bool new_font_(const synfig::String &family, int style=0, int weight=400); + bool new_face(const synfig::String &newfont); +}; + +extern FT_Library ft_library; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/lyr_freetype/lyr_freetype.nsh b/synfig-core/src/modules/lyr_freetype/lyr_freetype.nsh new file mode 100644 index 0000000..8188231 --- /dev/null +++ b/synfig-core/src/modules/lyr_freetype/lyr_freetype.nsh @@ -0,0 +1,21 @@ +; The stuff to install +Section "lyr_freetype" Sec_lyr_freetype + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=lyr_freetype.dll "src\modules\lyr_freetype\.libs\liblyr_freetype.dll" + + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "lyr_freetype" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd + diff --git a/synfig-core/src/modules/lyr_freetype/main.cpp b/synfig-core/src/modules/lyr_freetype/main.cpp new file mode 100644 index 0000000..469beb8 --- /dev/null +++ b/synfig-core/src/modules/lyr_freetype/main.cpp @@ -0,0 +1,91 @@ +/* === S Y N F I G ========================================================= */ +/*! \file lyr_freetype/main.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include "lyr_freetype.h" +#include +#include + +#include +#include FT_FREETYPE_H + +#endif + +using namespace etl; +using namespace std; +using namespace synfig; + +FT_Library ft_library; + +/* === E N T R Y P O I N T ================================================= */ + +bool freetype_constructor(synfig::ProgressCallback *cb) +{ + int error; + if(cb)cb->task("Initializing FreeType..."); + if ( (error = FT_Init_FreeType( &ft_library )) ) + { + if(cb)cb->error(strprintf("Layer_Freetype: FreeType initialization failed. (err=%d)",error)); + return false; + } + return true; +} + +void freetype_destructor() +{ + std::cerr<<"freetype_destructor()"< +#endif + +#include "bevel.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#endif + +using namespace synfig; +using namespace etl; +using namespace std; + +/*#define TYPE_BOX 0 +#define TYPE_FASTGUASSIAN 1 +#define TYPE_FASTGAUSSIAN 1 +#define TYPE_CROSS 2 +#define TYPE_GUASSIAN 3 +#define TYPE_GAUSSIAN 3 +#define TYPE_DISC 4 +*/ + +/* -- G L O B A L S --------------------------------------------------------- */ + +SYNFIG_LAYER_INIT(Layer_Bevel); +SYNFIG_LAYER_SET_NAME(Layer_Bevel,"bevel"); +SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Bevel,N_("Bevel")); +SYNFIG_LAYER_SET_CATEGORY(Layer_Bevel,N_("Stylize")); +SYNFIG_LAYER_SET_VERSION(Layer_Bevel,"0.2"); +SYNFIG_LAYER_SET_CVS_ID(Layer_Bevel,"$Id$"); + +/* -- F U N C T I O N S ----------------------------------------------------- */ + +inline void clamp(synfig::Vector &v) +{ + if(v[0]<0.0)v[0]=0.0; + if(v[1]<0.0)v[1]=0.0; +} + +Layer_Bevel::Layer_Bevel(): + Layer_Composite (0.75,Color::BLEND_ONTO), + softness(0.1), + type(Blur::FASTGAUSSIAN), + color1(Color::white()), + color2(Color::black()), + depth(0.2) +{ + angle=Angle::deg(135); + calc_offset(); + use_luma=false; + solid=false; +} + +void +Layer_Bevel::calc_offset() +{ + offset[0]=Angle::cos(angle).get()*depth; + offset[1]=Angle::sin(angle).get()*depth; + + offset45[0]=Angle::cos(angle-Angle::deg(45)).get()*depth*0.707106781; + offset45[1]=Angle::sin(angle-Angle::deg(45)).get()*depth*0.707106781; +} + +bool +Layer_Bevel::set_param(const String ¶m, const ValueBase &value) +{ + IMPORT_PLUS(softness,softness=softness>0?softness:0); + IMPORT(color1); + IMPORT(color2); + IMPORT_PLUS(depth,calc_offset()); + IMPORT_PLUS(angle,calc_offset()); + IMPORT(type); + IMPORT(use_luma); + IMPORT(solid); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +Layer_Bevel::get_param(const String ¶m)const +{ + EXPORT(type); + EXPORT(softness); + EXPORT(color1); + EXPORT(color2); + EXPORT(depth); + EXPORT(angle); + EXPORT(use_luma); + EXPORT(solid); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Color +Layer_Bevel::get_color(Context context, const Point &pos)const +{ + const Vector size(softness,softness); + Point blurpos = Blur(size,type)(pos); + + if(get_amount()==0.0) + return context.get_color(pos); + + Color shade; + + Real hi_alpha(1.0f-context.get_color(blurpos+offset).get_a()); + Real lo_alpha(1.0f-context.get_color(blurpos-offset).get_a()); + + Real shade_alpha(hi_alpha-lo_alpha); + if(shade_alpha>0) + shade=color1,shade.set_a(shade_alpha); + else + shade=color2,shade.set_a(-shade_alpha); + + return Color::blend(shade,context.get_color(pos),get_amount(),get_blend_method()); +} + +bool +Layer_Bevel::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + int x,y; + SuperCallback stageone(cb,0,5000,10000); + SuperCallback stagetwo(cb,5000,10000,10000); + + const int w = renddesc.get_w(), + h = renddesc.get_h(); + const Real pw = renddesc.get_pw(), + ph = renddesc.get_ph(); + const Vector size(softness,softness); + + RendDesc workdesc(renddesc); + Surface worksurface; + etl::surface blurred; + + //callbacks depend on how long the blur takes + if(size[0] || size[1]) + { + if(type == Blur::DISC) + { + stageone = SuperCallback(cb,0,5000,10000); + stagetwo = SuperCallback(cb,5000,10000,10000); + } + else + { + stageone = SuperCallback(cb,0,9000,10000); + stagetwo = SuperCallback(cb,9000,10000,10000); + } + } + else + { + stageone = SuperCallback(cb,0,9999,10000); + stagetwo = SuperCallback(cb,9999,10000,10000); + } + + //expand the working surface to accommodate the blur + + //the expanded size = 1/2 the size in each direction rounded up + int halfsizex = (int) (abs(size[0]*.5/pw) + 3), + halfsizey = (int) (abs(size[1]*.5/ph) + 3); + + int offset_u(round_to_int(offset[0]/pw)),offset_v(round_to_int(offset[1]/ph)); + int offset_w(w+abs(offset_u)*2),offset_h(h+abs(offset_v)*2); + + workdesc.set_subwindow( + -abs(offset_u), + -abs(offset_v), + w+abs(offset_u), + h+abs(offset_v) + ); + + //expand by 1/2 size in each direction on either side + switch(type) + { + case Blur::DISC: + case Blur::BOX: + case Blur::CROSS: + { + workdesc.set_subwindow(-max(1,halfsizex),-max(1,halfsizey),offset_w+2*max(1,halfsizex),offset_h+2*max(1,halfsizey)); + break; + } + case Blur::FASTGAUSSIAN: + { + if(quality < 4) + { + halfsizex*=2; + halfsizey*=2; + } + workdesc.set_subwindow(-max(1,halfsizex),-max(1,halfsizey),offset_w+2*max(1,halfsizex),offset_h+2*max(1,halfsizey)); + break; + } + case Blur::GAUSSIAN: + { + #define GAUSSIAN_ADJUSTMENT (0.05) + Real pw = (Real)workdesc.get_w()/(workdesc.get_br()[0]-workdesc.get_tl()[0]); + Real ph = (Real)workdesc.get_h()/(workdesc.get_br()[1]-workdesc.get_tl()[1]); + + pw=pw*pw; + ph=ph*ph; + + halfsizex = (int)(abs(pw)*size[0]*GAUSSIAN_ADJUSTMENT+0.5); + halfsizey = (int)(abs(ph)*size[1]*GAUSSIAN_ADJUSTMENT+0.5); + + halfsizex = (halfsizex + 1)/2; + halfsizey = (halfsizey + 1)/2; + workdesc.set_subwindow( -halfsizex, -halfsizey, offset_w+2*halfsizex, offset_h+2*halfsizey ); + + break; + } + } + + //render the background onto the expanded surface + if(!context.accelerated_render(&worksurface,quality,workdesc,&stageone)) + return false; + + // Copy over the alpha + blurred.set_wh(worksurface.get_w(),worksurface.get_h()); + if(!use_luma) + { + for(int j=0;jset_wh(renddesc.get_w(),renddesc.get_h()); + + int u = halfsizex+abs(offset_u), v = halfsizey+abs(offset_v); + for(y=0;y0) + shade=color1,shade.set_a(shade.get_a()*alpha); + else + shade=color2,shade.set_a(shade.get_a()*-alpha); + } + + + + if(shade.get_a()) + { + (*surface)[y][x]=Color::blend(shade,worksurface[v][u],get_amount(),get_blend_method()); + } + else (*surface)[y][x] = worksurface[v][u]; + } + } + + if(cb && !cb->amount_complete(10000,10000)) + { + //if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); + return false; + } + + return true; +} + +Layer::Vocab +Layer_Bevel::get_param_vocab(void)const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("type") + .set_local_name(_("Type")) + .set_description(_("Type of blur to use")) + .set_hint("enum") + .add_enum_value(Blur::BOX,"box",_("Box Blur")) + .add_enum_value(Blur::FASTGAUSSIAN,"fastgaussian",_("Fast Gaussian Blur")) + .add_enum_value(Blur::CROSS,"cross",_("Cross-Hatch Blur")) + .add_enum_value(Blur::GAUSSIAN,"gaussian",_("Gaussian Blur")) + .add_enum_value(Blur::DISC,"disc",_("Disc Blur")) + ); + + ret.push_back(ParamDesc("color1") + .set_local_name(_("Hi-Color")) + ); + ret.push_back(ParamDesc("color2") + .set_local_name(_("Lo-Color")) + ); + ret.push_back(ParamDesc("angle") + .set_local_name(_("Light Angle")) + ); + ret.push_back(ParamDesc("depth") + .set_is_distance() + .set_local_name(_("Depth of Bevel")) + ); + ret.push_back(ParamDesc("softness") + .set_is_distance() + .set_local_name(_("Softness")) + ); + ret.push_back(ParamDesc("use_luma") + .set_local_name(_("Use Luma")) + ); + ret.push_back(ParamDesc("solid") + .set_local_name(_("Solid")) + ); + + return ret; +} + +Rect +Layer_Bevel::get_full_bounding_rect(Context context)const +{ + if(is_disabled()) + return context.get_full_bounding_rect(); + + Rect under(context.get_full_bounding_rect()); + + if(Color::is_onto(get_blend_method())) + return under; + + Rect bounds(under.expand(softness)); + bounds.expand_x(abs(depth)); + bounds.expand_y(abs(depth)); + + return bounds; +} diff --git a/synfig-core/src/modules/lyr_std/bevel.h b/synfig-core/src/modules/lyr_std/bevel.h new file mode 100644 index 0000000..0774b75 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/bevel.h @@ -0,0 +1,81 @@ +/* === S Y N F I G ========================================================= */ +/*! \file bevel.h +** \brief Header file for implementation of the "Bevel" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifndef __SYNFIG_LAYER_BEVEL_H__ +#define __SYNFIG_LAYER_BEVEL_H__ + +/* -- H E A D E R S --------------------------------------------------------- */ + +#include +#include +#include +#include +#include + +using namespace synfig; +using namespace std; +using namespace etl; + +class Layer_Bevel : public synfig::Layer_Composite +{ + SYNFIG_LAYER_MODULE_EXT +private: + synfig::Real softness; + int type; + + synfig::Color color1; + synfig::Color color2; + + synfig::Angle angle; + synfig::Real depth; + + synfig::Vector offset; + synfig::Vector offset45; + + bool use_luma; + bool solid; + + void calc_offset(); +public: + Layer_Bevel(); + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + + virtual ValueBase get_param(const String & param)const; + + virtual Color get_color(Context context, const Point &pos)const; + + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + + virtual synfig::Rect get_full_bounding_rect(Context context)const; + virtual Vocab get_param_vocab()const; + virtual bool reads_context()const { return true; } +}; // END of class Layer_Bevel + +/* -- E X T E R N S --------------------------------------------------------- */ + +/* -- E N D ----------------------------------------------------------------- */ + +#endif diff --git a/synfig-core/src/modules/lyr_std/booleancurve.cpp b/synfig-core/src/modules/lyr_std/booleancurve.cpp new file mode 100644 index 0000000..d7b87db --- /dev/null +++ b/synfig-core/src/modules/lyr_std/booleancurve.cpp @@ -0,0 +1,121 @@ +/* === S Y N F I G ========================================================= */ +/*! \file booleancurve.cpp +** \brief Boolean Curve Implementation File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "booleancurve.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +BooleanCurve::BooleanCurve() +{ +} + +BooleanCurve::~BooleanCurve() +{ +} + +bool BooleanCurve::set_param(const String & param, const synfig::ValueBase &value) +{ + if(param=="regions" && value.same_type_as(regions)) + { + vector bv; + int size = value.get_list().size(); + + const vector &vlist = value.get_list(); + + regions.clear(); + for(int i = 0; i < size; ++i) + { + regions.push_back(vector(vlist[i].get_list().begin(),vlist[i].get_list().end())); + } + return true; + } + + return Layer_Shape::set_param(param,value); +} + +ValueBase BooleanCurve::get_param(const String & param)const +{ + EXPORT(regions); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Shape::get_param(param); +} + +Layer::Vocab BooleanCurve::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Shape::get_param_vocab()); + + ret.push_back(ParamDesc("regions") + .set_local_name(_("Region Set")) + .set_description(_("Set of regions to combine")) + ); + + return ret; +} + +Color BooleanCurve::get_color(Context /*context*/, const Point &/*pos*/)const +{ + Color c(Color::alpha()); + + return c; +} + +bool BooleanCurve::accelerated_render(Context /*context*/,Surface */*surface*/,int /*quality*/, const RendDesc &/*renddesc*/, ProgressCallback */*cb*/)const +{ + return false; +} diff --git a/synfig-core/src/modules/lyr_std/booleancurve.h b/synfig-core/src/modules/lyr_std/booleancurve.h new file mode 100644 index 0000000..5896e7d --- /dev/null +++ b/synfig-core/src/modules/lyr_std/booleancurve.h @@ -0,0 +1,75 @@ +/* === S Y N F I G ========================================================= */ +/*! \file booleancurve.h +** \brief Boolean Curve Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_BOOLEAN_CURVE_H +#define __SYNFIG_BOOLEAN_CURVE_H + +/* === H E A D E R S ======================================================= */ +#include +#include + +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ +namespace synfig +{ + +class BooleanCurve : public Layer_Shape +{ + //dynamic list of regions and such + typedef std::vector< std::vector > region_list_type; + region_list_type regions; + + enum BOOLEAN_OP + { + Union = 0, + Intersection, + MutualExclude, + Num_Boolean_Ops + }; + + int operation; + +public: + + BooleanCurve(); + ~BooleanCurve(); + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + virtual ValueBase get_param(const String & param)const; + + virtual Vocab get_param_vocab()const; + + virtual Color get_color(Context context, const Point &pos)const; + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; +}; + +} //end of namespace synfig +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/lyr_std/clamp.cpp b/synfig-core/src/modules/lyr_std/clamp.cpp new file mode 100644 index 0000000..14b4c41 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/clamp.cpp @@ -0,0 +1,207 @@ +/* === S Y N F I G ========================================================= */ +/*! \file clamp.cpp +** \brief Implementation of the "Clamp" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "clamp.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace etl; +using namespace std; +using namespace synfig; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Layer_Clamp); +SYNFIG_LAYER_SET_NAME(Layer_Clamp,"clamp"); +SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Clamp,N_("Clamp")); +SYNFIG_LAYER_SET_CATEGORY(Layer_Clamp,N_("Filters")); +SYNFIG_LAYER_SET_VERSION(Layer_Clamp,"0.2"); +SYNFIG_LAYER_SET_CVS_ID(Layer_Clamp,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +Layer_Clamp::Layer_Clamp(): + invert_negative(false), + clamp_ceiling(true), + ceiling(1.0f), + floor(0.0f) +{ +} + +inline Color +Layer_Clamp::clamp_color(const Color &in)const +{ + Color ret(in); + + if(ret.get_a()==0) + return Color::alpha(); + + if(invert_negative) + { + if(ret.get_a()ceiling) ret.set_r(ceiling); + if(ret.get_g()>ceiling) ret.set_g(ceiling); + if(ret.get_b()>ceiling) ret.set_b(ceiling); + if(ret.get_a()>ceiling) ret.set_a(ceiling); + } + return ret; +} + +bool +Layer_Clamp::set_param(const String & param, const ValueBase &value) +{ + IMPORT(invert_negative); + IMPORT(clamp_ceiling); + IMPORT(ceiling); + IMPORT(floor); + + return false; +} + +ValueBase +Layer_Clamp::get_param(const String ¶m)const +{ + EXPORT(invert_negative); + EXPORT(clamp_ceiling); + + EXPORT(ceiling); + EXPORT(floor); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return ValueBase(); +} + +Layer::Vocab +Layer_Clamp::get_param_vocab()const +{ + Layer::Vocab ret; + + ret.push_back(ParamDesc("invert_negative") + .set_local_name(_("Invert Negative")) + ); + + ret.push_back(ParamDesc("clamp_ceiling") + .set_local_name(_("Clamp Ceiling")) + ); + + ret.push_back(ParamDesc("ceiling") + .set_local_name(_("Ceiling")) + ); + + ret.push_back(ParamDesc("floor") + .set_local_name(_("Floor")) + ); + + return ret; +} + +Color +Layer_Clamp::get_color(Context context, const Point &pos)const +{ + return clamp_color(context.get_color(pos)); +} + +bool +Layer_Clamp::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + SuperCallback supercb(cb,0,9500,10000); + + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + return false; + + int x,y; + + Surface::pen pen(surface->begin()); + + for(y=0;yamount_complete(10000,10000)) + return false; + + return true; +} + + +Rect +Layer_Clamp::get_full_bounding_rect(Context context)const +{ + return context.get_full_bounding_rect(); +} diff --git a/synfig-core/src/modules/lyr_std/clamp.h b/synfig-core/src/modules/lyr_std/clamp.h new file mode 100644 index 0000000..7a8fad8 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/clamp.h @@ -0,0 +1,75 @@ +/* === S Y N F I G ========================================================= */ +/*! \file clamp.h +** \brief Header file for implementation of the "Clamp" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_LAYER_SOLIDCOLOR_H +#define __SYNFIG_LAYER_SOLIDCOLOR_H + +/* === H E A D E R S ======================================================= */ + +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class Layer_Clamp : public Layer +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + bool invert_negative; + bool clamp_ceiling; + + float ceiling; + float floor; + + Color clamp_color(const Color &in)const; + +public: + + Layer_Clamp(); + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + + virtual ValueBase get_param(const String & param)const; + + virtual Color get_color(Context context, const Point &pos)const; + + virtual Rect get_full_bounding_rect(Context context)const; + + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + + virtual Vocab get_param_vocab()const; +}; // END of class Layer_Clamp + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/lyr_std/curvewarp.cpp b/synfig-core/src/modules/lyr_std/curvewarp.cpp new file mode 100644 index 0000000..82c213d --- /dev/null +++ b/synfig-core/src/modules/lyr_std/curvewarp.cpp @@ -0,0 +1,591 @@ +/* === S Y N F I G ========================================================= */ +/*! \file curvewarp.cpp +** \brief Implementation of the "Curve Warp" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007-2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "curvewarp.h" + +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +#define FAKE_TANGENT_STEP 0.000001 +#define TOO_THIN 0.01 + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(CurveWarp); +SYNFIG_LAYER_SET_NAME(CurveWarp,"curve_warp"); +SYNFIG_LAYER_SET_LOCAL_NAME(CurveWarp,N_("Curve Warp")); +SYNFIG_LAYER_SET_CATEGORY(CurveWarp,N_("Distortions")); +SYNFIG_LAYER_SET_VERSION(CurveWarp,"0.0"); +SYNFIG_LAYER_SET_CVS_ID(CurveWarp,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +inline float calculate_distance(const std::vector& bline) +{ + std::vector::const_iterator iter,next,ret; + std::vector::const_iterator end(bline.end()); + + float dist(0); + + if (bline.empty()) return dist; + + next=bline.begin(); + iter=next++; + + for(;next!=end;iter=next++) + { + // Setup the curve + etl::hermite curve(iter->get_vertex(), next->get_vertex(), iter->get_tangent2(), next->get_tangent1()); + dist+=curve.length(); + } + + return dist; +} + +std::vector::const_iterator +find_closest_to_bline(bool fast, const std::vector& bline,const Point& p,float& t, float& len, bool& extreme) +{ + std::vector::const_iterator iter,next,ret; + std::vector::const_iterator end(bline.end()); + + ret=bline.end(); + float dist(100000000000.0); + next=bline.begin(); + float best_pos(0), best_len(0); + etl::hermite best_curve; + iter=next++; + Point bp; + float total_len(0); + bool first = true, last = false; + extreme = false; + + for(;next!=end;iter=next++) + { + // Setup the curve + etl::hermite curve(iter->get_vertex(), next->get_vertex(), iter->get_tangent2(), next->get_tangent1()); + float thisdist(0); + last = false; + + if (fast) + { +#define POINT_CHECK(x) bp=curve(x); thisdist=(bp-p).mag_squared(); if(thisdist .99) extreme = true; + } + else + { + len = best_len + best_curve.find_distance(0,best_pos); + if (last && t == 1) extreme = true; + } + return ret; +} + +/* === M E T H O D S ======================================================= */ + +inline void +CurveWarp::sync() +{ + curve_length_=calculate_distance(bline); + perp_ = (end_point - start_point).perp().norm(); +} + +CurveWarp::CurveWarp(): + origin(0,0), + perp_width(1), + start_point(-2.5,-0.5), + end_point(2.5,-0.3), + fast(true) +{ + bline.push_back(BLinePoint()); + bline.push_back(BLinePoint()); + bline[0].set_vertex(Point(-2.5,0)); + bline[1].set_vertex(Point( 2.5,0)); + bline[0].set_tangent(Point(1, 0.1)); + bline[1].set_tangent(Point(1, -0.1)); + bline[0].set_width(1.0f); + bline[1].set_width(1.0f); + + sync(); +} + +inline Point +CurveWarp::transform(const Point &point_, Real *dist, Real *along, int quality)const +{ + Vector tangent; + Vector diff; + Point p1; + Real thickness; + bool edge_case = false; + float len(0); + bool extreme; + float t; + + if(bline.size()==0) + return Point(); + else if(bline.size()==1) + { + tangent=bline.front().get_tangent1(); + p1=bline.front().get_vertex(); + thickness=bline.front().get_width(); + t = 0.5; + extreme = false; + } + else + { + Point point(point_-origin); + + std::vector::const_iterator iter,next; + + // Figure out the BLinePoint we will be using, + next=find_closest_to_bline(fast,bline,point,t,len,extreme); + + iter=next++; + if(next==bline.end()) next=bline.begin(); + + // Setup the curve + etl::hermite curve(iter->get_vertex(), next->get_vertex(), iter->get_tangent2(), next->get_tangent1()); + + // Setup the derivative function + etl::derivative > deriv(curve); + + int search_iterations(7); + + if(quality<=6)search_iterations=7; + else if(quality<=7)search_iterations=6; + else if(quality<=8)search_iterations=5; + else search_iterations=4; + + // Figure out the closest point on the curve + if (fast) t = curve.find_closest(fast, point,search_iterations); + + // Calculate our values + p1=curve(t); // the closest point on the curve + tangent=deriv(t); // the tangent at that point + + // if the point we're nearest to is at either end of the + // bline, our distance from the curve is the distance from the + // point on the curve. we need to know which side of the + // curve we're on, so find the average of the two tangents at + // this point + if (t<0.00001 || t>0.99999) + { + bool zero_tangent = (tangent[0] == 0 && tangent[1] == 0); + + if (t<0.5) + { + if (iter->get_split_tangent_flag() || zero_tangent) + { + // fake the current tangent if we need to + if (zero_tangent) tangent = curve(FAKE_TANGENT_STEP) - curve(0); + + // calculate the other tangent + Vector other_tangent(iter->get_tangent1()); + if (other_tangent[0] == 0 && other_tangent[1] == 0) + { + // find the previous blinepoint + std::vector::const_iterator prev; + if (iter != bline.begin()) (prev = iter)--; + else prev = iter; + + etl::hermite other_curve(prev->get_vertex(), iter->get_vertex(), prev->get_tangent2(), iter->get_tangent1()); + other_tangent = other_curve(1) - other_curve(1-FAKE_TANGENT_STEP); + } + + // normalise and sum the two tangents + tangent=(other_tangent.norm()+tangent.norm()); + edge_case=true; + } + } + else + { + if (next->get_split_tangent_flag() || zero_tangent) + { + // fake the current tangent if we need to + if (zero_tangent) tangent = curve(1) - curve(1-FAKE_TANGENT_STEP); + + // calculate the other tangent + Vector other_tangent(next->get_tangent2()); + if (other_tangent[0] == 0 && other_tangent[1] == 0) + { + // find the next blinepoint + std::vector::const_iterator next2(next); + if (++next2 == bline.end()) + next2 = next; + + etl::hermite other_curve(next->get_vertex(), next2->get_vertex(), next->get_tangent2(), next2->get_tangent1()); + other_tangent = other_curve(FAKE_TANGENT_STEP) - other_curve(0); + } + + // normalise and sum the two tangents + tangent=(other_tangent.norm()+tangent.norm()); + edge_case=true; + } + } + } + tangent = tangent.norm(); + + // the width of the bline at the closest point on the curve + thickness=(next->get_width()-iter->get_width())*t+iter->get_width(); + } + + if (thickness < TOO_THIN && thickness > -TOO_THIN) + { + if (thickness > 0) thickness = TOO_THIN; + else thickness = -TOO_THIN; + } + + if (extreme) + { + Vector tangent; + + if (t < 0.5) + { + std::vector::const_iterator iter(bline.begin()); + tangent = iter->get_tangent1().norm(); + len = 0; + } + else + { + std::vector::const_iterator iter(--bline.end()); + tangent = iter->get_tangent2().norm(); + len = curve_length_; + } + len += (point_-origin - p1)*tangent; + diff = tangent.perp(); + } + else if (edge_case) + { + diff=(p1-(point_-origin)); + if(diff*tangent.perp()<0) diff=-diff; + diff=diff.norm(); + } + else + diff=tangent.perp(); + + // diff is a unit vector perpendicular to the bline + const Real unscaled_distance((point_-origin - p1)*diff); + if (dist) *dist = unscaled_distance; + if (along) *along = len; + return ((start_point + (end_point - start_point) * len / curve_length_) + + perp_ * unscaled_distance/(thickness*perp_width)); +} + +synfig::Layer::Handle +CurveWarp::hit_check(synfig::Context context, const synfig::Point &point)const +{ + return context.hit_check(transform(point)); +} + +bool +CurveWarp::set_param(const String & param, const ValueBase &value) +{ + IMPORT(origin); + IMPORT(start_point); + IMPORT(end_point); + IMPORT(fast); + IMPORT(perp_width); + + if(param=="bline" && value.get_type()==ValueBase::TYPE_LIST) + { + bline=value; + sync(); + + return true; + } + + IMPORT_AS(origin,"offset"); + + return false; +} + +ValueBase +CurveWarp::get_param(const String & param)const +{ + EXPORT(origin); + EXPORT(start_point); + EXPORT(end_point); + EXPORT(bline); + EXPORT(fast); + EXPORT(perp_width); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return ValueBase(); +} + +Layer::Vocab +CurveWarp::get_param_vocab()const +{ + Layer::Vocab ret; + + ret.push_back(ParamDesc("origin") + .set_local_name(_("Origin"))); + + ret.push_back(ParamDesc("perp_width") + .set_local_name(_("Width")) + .set_origin("start_point")); + + ret.push_back(ParamDesc("start_point") + .set_local_name(_("Start Point")) + .set_connect("end_point")); + + ret.push_back(ParamDesc("end_point") + .set_local_name(_("End Point"))); + + ret.push_back(ParamDesc("bline") + .set_local_name(_("Vertices")) + .set_origin("origin") + .set_hint("width") + .set_description(_("A list of BLine Points"))); + + ret.push_back(ParamDesc("fast") + .set_local_name(_("Fast"))); + + return ret; +} + +Color +CurveWarp::get_color(Context context, const Point &point)const +{ + return context.get_color(transform(point)); +} + +bool +CurveWarp::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + SuperCallback stageone(cb,0,9000,10000); + SuperCallback stagetwo(cb,9000,10000,10000); + + int x,y; + + const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); + Point tl(renddesc.get_tl()); + Point br(renddesc.get_br()); + const int w(renddesc.get_w()); + const int h(renddesc.get_h()); + + // find a bounding rectangle for the context we need to render + // todo: find a better way of doing this - this way doesn't work + Rect src_rect(transform(tl)); + Point pos1, pos2; + Real dist, along; + Real min_dist(999999), max_dist(-999999), min_along(999999), max_along(-999999); + +#define UPDATE_DIST \ + if (dist < min_dist) min_dist = dist; \ + if (dist > max_dist) max_dist = dist; \ + if (along < min_along) min_along = along; \ + if (along > max_along) max_along = along + + // look along the top and bottom edges + pos1[0] = pos2[0] = tl[0]; pos1[1] = tl[1]; pos2[1] = br[1]; + for (x = 0; x < w; x++, pos1[0] += pw, pos2[0] += pw) + { + src_rect.expand(transform(pos1, &dist, &along)); UPDATE_DIST; + src_rect.expand(transform(pos2, &dist, &along)); UPDATE_DIST; + } + + // look along the left and right edges + pos1[0] = tl[0]; pos2[0] = br[0]; pos1[1] = pos2[1] = tl[1]; + for (y = 0; y < h; y++, pos1[1] += ph, pos2[1] += ph) + { + src_rect.expand(transform(pos1, &dist, &along)); UPDATE_DIST; + src_rect.expand(transform(pos2, &dist, &along)); UPDATE_DIST; + } + + // look along the diagonals + const int max_wh(std::max(w,h)); + const Real inc_x((br[0]-tl[0])/max_wh),inc_y((br[1]-tl[1])/max_wh); + pos1[0] = pos2[0] = tl[0]; pos1[1] = tl[1]; pos2[1] = br[1]; + for (x = 0; x < max_wh; x++, pos1[0] += inc_x, pos2[0] = pos1[0], pos1[1]+=inc_y, pos2[1]-=inc_y) + { + src_rect.expand(transform(pos1, &dist, &along)); UPDATE_DIST; + src_rect.expand(transform(pos2, &dist, &along)); UPDATE_DIST; + } + +#if 0 + // look at each blinepoint + std::vector::const_iterator iter; + for (iter=bline.begin(); iter!=bline.end(); iter++) + src_rect.expand(transform(iter->get_vertex()+origin, &dist, &along)); UPDATE_DIST; +#endif + + Point src_tl(src_rect.get_min()); + Point src_br(src_rect.get_max()); + + Vector ab((end_point - start_point).norm()); + Angle::tan ab_angle(ab[1], ab[0]); + + Real used_length = max_along - min_along; + Real render_width = max_dist - min_dist; + + int src_w = (abs(used_length*Angle::cos(ab_angle).get()) + + abs(render_width*Angle::sin(ab_angle).get())) / abs(pw); + int src_h = (abs(used_length*Angle::sin(ab_angle).get()) + + abs(render_width*Angle::cos(ab_angle).get())) / abs(ph); + + Real src_pw((src_br[0] - src_tl[0]) / src_w); + Real src_ph((src_br[1] - src_tl[1]) / src_h); + + if (src_pw > abs(pw)) + { + src_w = int((src_br[0] - src_tl[0]) / abs(pw)); + src_pw = (src_br[0] - src_tl[0]) / src_w; + } + + if (src_ph > abs(ph)) + { + src_h = int((src_br[1] - src_tl[1]) / abs(ph)); + src_ph = (src_br[1] - src_tl[1]) / src_h; + } + +#define MAXPIX 10000 + if (src_w > MAXPIX) src_w = MAXPIX; + if (src_h > MAXPIX) src_h = MAXPIX; + + // this is an attempt to remove artifacts around tile edges - the + // cubic interpolation uses at most 2 pixels either side of the + // target pixel, so add an extra 2 pixels around the tile on all + // sides + src_tl -= (Point(src_pw,src_ph)*2); + src_br += (Point(src_pw,src_ph)*2); + src_w += 4; + src_h += 4; + src_pw = (src_br[0] - src_tl[0]) / src_w; + src_ph = (src_br[1] - src_tl[1]) / src_h; + + // set up a renddesc for the context to render + RendDesc src_desc(renddesc); + src_desc.clear_flags(); + src_desc.set_tl(src_tl); + src_desc.set_br(src_br); + src_desc.set_wh(src_w, src_h); + + // render the context onto a new surface + Surface source; + source.set_wh(src_w,src_h); + if(!context.accelerated_render(&source,quality,src_desc,&stageone)) + return false; + + float u,v; + Point pos, tmp; + + surface->set_wh(w,h); + surface->clear(); + + if(quality<=4) // CUBIC + for(y=0,pos[1]=tl[1];y=src_w || v>=src_h || isnan(u) || isnan(v)) + (*surface)[y][x]=context.get_color(tmp); + else + (*surface)[y][x]=source.cubic_sample(u,v); + } + if((y&31)==0 && cb && !stagetwo.amount_complete(y,h)) return false; + } + else if (quality<=6) // INTERPOLATION_LINEAR + for(y=0,pos[1]=tl[1];y=src_w || v>=src_h || isnan(u) || isnan(v)) + (*surface)[y][x]=context.get_color(tmp); + else + (*surface)[y][x]=source.linear_sample(u,v); + } + if((y&31)==0 && cb && !stagetwo.amount_complete(y,h)) return false; + } + else // NEAREST_NEIGHBOR + for(y=0,pos[1]=tl[1];y=src_w || v>=src_h || isnan(u) || isnan(v)) + (*surface)[y][x]=context.get_color(tmp); + else + (*surface)[y][x]=source[floor_to_int(v)][floor_to_int(u)]; + } + if((y&31)==0 && cb && !stagetwo.amount_complete(y,h)) return false; + } + + // Mark our progress as finished + if(cb && !cb->amount_complete(10000,10000)) + return false; + + return true; +} diff --git a/synfig-core/src/modules/lyr_std/curvewarp.h b/synfig-core/src/modules/lyr_std/curvewarp.h new file mode 100644 index 0000000..a287887 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/curvewarp.h @@ -0,0 +1,80 @@ +/* === S Y N F I G ========================================================= */ +/*! \file curvewarp.h +** \brief Header file for implementation of the "Curve Warp" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007-2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_CURVEWARP_H +#define __SYNFIG_CURVEWARP_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +class CurveWarp : public Layer +{ + SYNFIG_LAYER_MODULE_EXT + +private: + std::vector bline; + + Point origin; + Real perp_width; + Point start_point; + Point end_point; + Real curve_length_; + Vector perp_; + bool fast; + + void sync(); + +public: + CurveWarp(); + + virtual bool set_param(const String ¶m, const ValueBase &value); + virtual ValueBase get_param(const String ¶m)const; + virtual Point transform(const Point &point_, Real *dist=NULL, Real *along=0, int quality=10)const; + virtual Color get_color(Context context, const Point &pos)const; + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + + virtual Vocab get_param_vocab()const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/lyr_std/import.cpp b/synfig-core/src/modules/lyr_std/import.cpp new file mode 100644 index 0000000..f7385a9 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/import.cpp @@ -0,0 +1,238 @@ +/* === S Y N F I G ========================================================= */ +/*! \file import.cpp +** \brief Implementation of the "Import Image" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "import.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Import); +SYNFIG_LAYER_SET_NAME(Import,"import"); +SYNFIG_LAYER_SET_LOCAL_NAME(Import,N_("Import Image")); +SYNFIG_LAYER_SET_CATEGORY(Import,N_("Other")); +SYNFIG_LAYER_SET_VERSION(Import,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Import,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +Import::Import() +{ + time_offset=0; +} + +Import::~Import() +{ +} + +void +Import::on_canvas_set() +{ + if(get_canvas())set_param("filename",filename); +} + +bool +Import::set_param(const String & param, const ValueBase &value) +{ + try{ + IMPORT(time_offset); + if(param=="filename" && value.same_type_as(filename)) + { + if(!get_canvas()) + { + filename=value.get(filename); + importer=0; + surface.clear(); + return true; + } + + String newfilename=value.get(string()); + String filename_with_path; + + // Get rid of any %20 crap + { + String::size_type n; + while((n=newfilename.find("%20"))!=String::npos) + newfilename.replace(n,3," "); + } + + //if(get_canvas()->get_file_path()==dirname(newfilename)) + //{ + // synfig::info("Image seems to be in local directory. Adjusting path..."); + // newfilename=basename(newfilename); + //} + +#ifndef WIN32 + if(is_absolute_path(newfilename)) + { + string curpath(cleanup_path(absolute_path(get_canvas()->get_file_path()))); + while(basename(curpath)==".")curpath=dirname(curpath); + + newfilename=relative_path(curpath,newfilename); + synfig::info("basename(curpath)=%s, Path adjusted to %s",basename(curpath).c_str(),newfilename.c_str()); + } +#endif + + if(filename.empty()) + filename=newfilename; + + if(newfilename.empty()) + { + filename=newfilename; + importer=0; + surface.clear(); + return true; + } + + // If we are already loaded, don't reload + if(filename==newfilename && importer) + { + synfig::warning(strprintf(_("Filename seems to already be set to \"%s\" (%s)"),filename.c_str(),newfilename.c_str())); + return true; + } + + assert(get_canvas()); + + if(is_absolute_path(newfilename)) + filename_with_path=newfilename; + else + filename_with_path=get_canvas()->get_file_path()+ETL_DIRECTORY_SEPARATOR+newfilename; + + handle newimporter; + + newimporter=Importer::open(absolute_path(filename_with_path)); + + if(!newimporter) + { + newimporter=Importer::open(get_canvas()->get_file_path()+ETL_DIRECTORY_SEPARATOR+basename(newfilename)); + if(!newimporter) + { + synfig::error(strprintf("Unable to create an importer object with file \"%s\"",filename_with_path.c_str())); + surface.clear(); + return false; + } + } + + surface.clear(); + if(!newimporter->get_frame(surface,Time(0),trimmed,width,height,top,left)) + { + synfig::warning(strprintf("Unable to get frame from \"%s\"",filename_with_path.c_str())); + } + + importer=newimporter; + filename=newfilename; + abs_filename=absolute_path(filename_with_path); + + return true; + } + } catch(...) { set_amount(0); return false; } + + return Layer_Bitmap::set_param(param,value); +} + +ValueBase +Import::get_param(const String & param)const +{ + EXPORT(time_offset); + + if(get_canvas()) + { + if(param=="filename") + { + string curpath(cleanup_path(absolute_path(get_canvas()->get_file_path()))); + return relative_path(curpath,abs_filename); + } + } + else + EXPORT(filename); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Bitmap::get_param(param); +} + +Layer::Vocab +Import::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Bitmap::get_param_vocab()); + + ret.push_back(ParamDesc("filename") + .set_local_name(_("Filename")) + .set_description(_("File to import")) + .set_hint("filename") + ); + ret.push_back(ParamDesc("time_offset") + .set_local_name(_("Time Offset")) + ); + + return ret; +} + +void +Import::set_time(Context context, Time time)const +{ + if(get_amount() && importer && + importer->is_animated()) + importer->get_frame(surface,time+time_offset,trimmed,width,height,top,left); + + context.set_time(time); +} + +void +Import::set_time(Context context, Time time, const Point &pos)const +{ + if(get_amount() && importer && + importer->is_animated()) + importer->get_frame(surface,time+time_offset,trimmed,width,height,top,left); + + context.set_time(time,pos); +} diff --git a/synfig-core/src/modules/lyr_std/import.h b/synfig-core/src/modules/lyr_std/import.h new file mode 100644 index 0000000..2452319 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/import.h @@ -0,0 +1,72 @@ +/* === S Y N F I G ========================================================= */ +/*! \file import.h +** \brief Header file for implementation of the "Import Image" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_IMPORT_H +#define __SYNFIG_IMPORT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class Import : public synfig::Layer_Bitmap +{ + SYNFIG_LAYER_MODULE_EXT + +private: + synfig::String filename; + synfig::String abs_filename; + synfig::Importer::Handle importer; + synfig::Time time_offset; + +protected: + Import(); + +public: + ~Import(); + + virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); + + virtual synfig::ValueBase get_param(const synfig::String & param)const; + + virtual Vocab get_param_vocab()const; + + virtual void on_canvas_set(); + + virtual void set_time(synfig::Context context, synfig::Time time)const; + + virtual void set_time(synfig::Context context, synfig::Time time, const synfig::Point &point)const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/lyr_std/insideout.cpp b/synfig-core/src/modules/lyr_std/insideout.cpp new file mode 100644 index 0000000..1ed9c2c --- /dev/null +++ b/synfig-core/src/modules/lyr_std/insideout.cpp @@ -0,0 +1,146 @@ +/* === S Y N F I G ========================================================= */ +/*! \file insideout.cpp +** \brief Implementation of the "Inside Out" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "insideout.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(InsideOut); +SYNFIG_LAYER_SET_NAME(InsideOut,"inside_out"); +SYNFIG_LAYER_SET_LOCAL_NAME(InsideOut,N_("Inside Out")); +SYNFIG_LAYER_SET_CATEGORY(InsideOut,N_("Distortions")); +SYNFIG_LAYER_SET_VERSION(InsideOut,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(InsideOut,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +InsideOut::InsideOut(): + origin(0,0) +{ +} + +bool +InsideOut::set_param(const String & param, const ValueBase &value) +{ + IMPORT(origin); + return false; +} + +ValueBase +InsideOut::get_param(const String & param)const +{ + EXPORT(origin); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return ValueBase(); +} + +synfig::Layer::Handle +InsideOut::hit_check(synfig::Context context, const synfig::Point &p)const +{ + Point pos(p-origin); + Real inv_mag=pos.inv_mag(); + Point invpos(pos*inv_mag*inv_mag); + return context.hit_check(invpos+origin); +} + +Color +InsideOut::get_color(Context context, const Point &p)const +{ + Point pos(p-origin); + Real inv_mag=pos.inv_mag(); + Point invpos(pos*inv_mag*inv_mag); + return context.get_color(invpos+origin); +} + +class InsideOut_Trans : public Transform +{ + etl::handle layer; +public: + InsideOut_Trans(const InsideOut* x):Transform(x->get_guid()),layer(x) { } + + synfig::Vector perform(const synfig::Vector& x)const + { + Point pos(x-layer->origin); + Real inv_mag=pos.inv_mag(); + if(!isnan(inv_mag)) + return (pos*(inv_mag*inv_mag)+layer->origin); + return x; + } + + synfig::Vector unperform(const synfig::Vector& x)const + { + Point pos(x-layer->origin); + Real inv_mag=pos.inv_mag(); + if(!isnan(inv_mag)) + return (pos*(inv_mag*inv_mag)+layer->origin); + return x; + } +}; +etl::handle +InsideOut::get_transform()const +{ + return new InsideOut_Trans(this); +} + +Layer::Vocab +InsideOut::get_param_vocab()const +{ + Layer::Vocab ret; + + ret.push_back(ParamDesc("origin") + .set_local_name(_("Origin")) + .set_description(_("Defines the where the center will be")) + ); + + return ret; +} diff --git a/synfig-core/src/modules/lyr_std/insideout.h b/synfig-core/src/modules/lyr_std/insideout.h new file mode 100644 index 0000000..9cae33b --- /dev/null +++ b/synfig-core/src/modules/lyr_std/insideout.h @@ -0,0 +1,69 @@ +/* === S Y N F I G ========================================================= */ +/*! \file insideout.h +** \brief Header file for implementation of the "Inside Out" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_INSIDEOUT_H +#define __SYNFIG_INSIDEOUT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; +class InsideOut_Trans; + +class InsideOut : public Layer +{ + SYNFIG_LAYER_MODULE_EXT + friend class InsideOut_Trans; + +private: + + Point origin; + +public: + InsideOut(); + + virtual bool set_param(const String ¶m, const ValueBase &value); + virtual ValueBase get_param(const String ¶m)const; + virtual Color get_color(Context context, const Point &pos)const; + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + virtual Vocab get_param_vocab()const; + virtual etl::handle get_transform()const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/lyr_std/julia.cpp b/synfig-core/src/modules/lyr_std/julia.cpp new file mode 100644 index 0000000..ad2478e --- /dev/null +++ b/synfig-core/src/modules/lyr_std/julia.cpp @@ -0,0 +1,365 @@ +/* === S Y N F I G ========================================================= */ +/*! \file julia.cpp +** \brief Implementation of the "Julia Set" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "julia.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +#define LOG_OF_2 0.69314718055994528623 + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Julia); +SYNFIG_LAYER_SET_NAME(Julia,"julia"); +SYNFIG_LAYER_SET_LOCAL_NAME(Julia,N_("Julia Set")); +SYNFIG_LAYER_SET_CATEGORY(Julia,N_("Fractals")); +SYNFIG_LAYER_SET_VERSION(Julia,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Julia,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +inline void +color_neg_flip(Color &color) +{ + if(color.get_a()==0) + { + color=Color::alpha(); + return; + } + + if(color.get_a()<0) + color=-color; + + if(color.get_r()<0) + { + color.set_g(color.get_g()-color.get_r()); + color.set_b(color.get_b()-color.get_r()); + color.set_r(0); + } + if(color.get_g()<0) + { + color.set_r(color.get_r()-color.get_g()); + color.set_b(color.get_b()-color.get_g()); + color.set_g(0); + } + if(color.get_b()<0) + { + color.set_r(color.get_r()-color.get_b()); + color.set_g(color.get_g()-color.get_b()); + color.set_b(0); + } +} + +/* === M E T H O D S ======================================================= */ + +Julia::Julia():color_shift(angle::degrees(0)) +{ + icolor=Color::black(); + ocolor=Color::black(); + iterations=32; + color_shift=Angle::deg(0); + + distort_inside=true; + distort_outside=true; + shade_inside=true; + shade_outside=true; + solid_inside=false; + solid_outside=false; + invert_inside=false; + invert_outside=false; + color_inside=true; + color_outside=false; + color_cycle=false; + smooth_outside=true; + broken=false; + seed=Point(0,0); + + bailout=4; + lp=log(log(bailout)); +} + +bool +Julia::set_param(const String & param, const ValueBase &value) +{ + + IMPORT(icolor); + IMPORT(ocolor); + IMPORT(color_shift); + IMPORT(seed); + + IMPORT(distort_inside); + IMPORT(distort_outside); + IMPORT(shade_inside); + IMPORT(shade_outside); + IMPORT(solid_inside); + IMPORT(solid_outside); + IMPORT(invert_inside); + IMPORT(invert_outside); + IMPORT(color_inside); + IMPORT(color_outside); + + IMPORT(color_cycle); + IMPORT(smooth_outside); + IMPORT(broken); + + if(param=="iterations" && value.same_type_as(iterations)) + { + iterations=value.get(iterations); + if(iterations<0) + iterations=0; + if(iterations>500000) + iterations=500000; + return true; + } + if(param=="bailout" && value.same_type_as(bailout)) + { + bailout=value.get(bailout); + bailout*=bailout; + lp=log(log(bailout)); + return true; + } + + return false; +} + +ValueBase +Julia::get_param(const String & param)const +{ + EXPORT(icolor); + EXPORT(ocolor); + EXPORT(color_shift); + EXPORT(iterations); + EXPORT(seed); + + EXPORT(distort_inside); + EXPORT(distort_outside); + EXPORT(shade_inside); + EXPORT(shade_outside); + EXPORT(solid_inside); + EXPORT(solid_outside); + EXPORT(invert_inside); + EXPORT(invert_outside); + EXPORT(color_inside); + EXPORT(color_outside); + EXPORT(color_cycle); + EXPORT(smooth_outside); + EXPORT(broken); + + if(param=="bailout") + return sqrt(bailout); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return ValueBase(); +} + +Color +Julia::get_color(Context context, const Point &pos)const +{ + Real + cr, ci, + zr, zi, + zr_hold; + + ColorReal + depth, mag(0); + + Color + ret; + + cr=seed[0]; + ci=seed[1]; + zr=pos[0]; + zi=pos[1]; + + for(int i=0;i4) + { + if(smooth_outside) + { + // Darco's original mandelbrot smoothing algo + // depth=((Point::value_type)i+(2.0-sqrt(mag))/PI); + + // Linas Vepstas algo (Better than darco's) + // See (http://linas.org/art-gallery/escape/smooth.html) + depth= (ColorReal)i - log(log(sqrt(mag))) / LOG_OF_2; + + // Clamp + if(depth<0) depth=0; + } + else + depth=static_cast(i); + + if(solid_outside) + ret=ocolor; + else + if(distort_outside) + ret=context.get_color(Point(zr,zi)); + else + ret=context.get_color(pos); + + if(invert_outside) + ret=~ret; + + if(color_outside) + ret=ret.set_uv(zr,zi).clamped_negative(); + + if(color_cycle) + ret=ret.rotate_uv(color_shift.operator*(depth)).clamped_negative(); + + if(shade_outside) + { + ColorReal alpha=depth/static_cast(iterations); + ret=(ocolor-ret)*alpha+ret; + } + return ret; + } + } + + if(solid_inside) + ret=icolor; + else + if(distort_inside) + ret=context.get_color(Point(zr,zi)); + else + ret=context.get_color(pos); + + if(invert_inside) + ret=~ret; + + if(color_inside) + ret=ret.set_uv(zr,zi).clamped_negative(); + + if(shade_inside) + ret=(icolor-ret)*mag+ret; + + return ret; +} + +Layer::Vocab +Julia::get_param_vocab()const +{ + Layer::Vocab ret; + + ret.push_back(ParamDesc("icolor") + .set_local_name(_("Inside Color")) + .set_description(_("Color of the Set")) + ); + ret.push_back(ParamDesc("ocolor") + .set_local_name(_("Outside Color")) + .set_description(_("Color outside the Set")) + ); + ret.push_back(ParamDesc("color_shift") + .set_local_name(_("Color Shift")) + ); + ret.push_back(ParamDesc("iterations") + .set_local_name(_("Iterations")) + ); + ret.push_back(ParamDesc("seed") + .set_local_name(_("Seed Point")) + ); + ret.push_back(ParamDesc("bailout") + .set_local_name(_("Bailout ValueBase")) + ); + + ret.push_back(ParamDesc("distort_inside") + .set_local_name(_("Distort Inside")) + ); + ret.push_back(ParamDesc("shade_inside") + .set_local_name(_("Shade Inside")) + ); + ret.push_back(ParamDesc("solid_inside") + .set_local_name(_("Solid Inside")) + ); + ret.push_back(ParamDesc("invert_inside") + .set_local_name(_("Invert Inside")) + ); + ret.push_back(ParamDesc("color_inside") + .set_local_name(_("Color Inside")) + ); + ret.push_back(ParamDesc("distort_outside") + .set_local_name(_("Distort Outside")) + ); + ret.push_back(ParamDesc("shade_outside") + .set_local_name(_("Shade Outside")) + ); + ret.push_back(ParamDesc("solid_outside") + .set_local_name(_("Solid Outside")) + ); + ret.push_back(ParamDesc("invert_outside") + .set_local_name(_("Invert Outside")) + ); + ret.push_back(ParamDesc("color_outside") + .set_local_name(_("Color Outside")) + ); + + ret.push_back(ParamDesc("color_cycle") + .set_local_name(_("Color Cycle")) + ); + ret.push_back(ParamDesc("smooth_outside") + .set_local_name(_("Smooth Outside")) + .set_description(_("Smooth the coloration outside the set")) + ); + ret.push_back(ParamDesc("broken") + .set_local_name(_("Break Set")) + .set_description(_("Modify equation to achieve interesting results")) + ); + + + return ret; +} diff --git a/synfig-core/src/modules/lyr_std/julia.h b/synfig-core/src/modules/lyr_std/julia.h new file mode 100644 index 0000000..317ffb8 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/julia.h @@ -0,0 +1,90 @@ +/* === S Y N F I G ========================================================= */ +/*! \file julia.h +** \brief Header file for implementation of the "Julia Set" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_JULIA_H +#define __SYNFIG_JULIA_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +class Julia : public synfig::Layer +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + synfig::Color icolor; + synfig::Color ocolor; + synfig::Angle color_shift; + Real bailout; + Real lp; + int iterations; + synfig::Point seed; + + bool distort_inside; + bool distort_outside; + bool shade_inside; + bool shade_outside; + bool solid_inside; + bool solid_outside; + bool invert_inside; + bool invert_outside; + bool color_inside; + bool color_outside; + + bool color_cycle; + bool smooth_outside; + bool broken; + +public: + Julia(); + + virtual bool set_param(const synfig::String ¶m, const synfig::ValueBase &value); + + virtual ValueBase get_param(const synfig::String ¶m)const; + + virtual Color get_color(synfig::Context context, const synfig::Point &pos)const; + + virtual Vocab get_param_vocab()const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/lyr_std/lyr_std.nsh b/synfig-core/src/modules/lyr_std/lyr_std.nsh new file mode 100644 index 0000000..3a0765d --- /dev/null +++ b/synfig-core/src/modules/lyr_std/lyr_std.nsh @@ -0,0 +1,21 @@ +; The stuff to install +Section "lyr_std" Sec_lyr_std + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=lyr_std.dll "src\modules\lyr_std\.libs\liblyr_std.dll" + + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "lyr_std" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd + diff --git a/synfig-core/src/modules/lyr_std/main.cpp b/synfig-core/src/modules/lyr_std/main.cpp new file mode 100644 index 0000000..faa0d7a --- /dev/null +++ b/synfig-core/src/modules/lyr_std/main.cpp @@ -0,0 +1,104 @@ +/* === S Y N F I G ========================================================= */ +/*! \file lyr_std/main.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#include "zoom.h" +//#include "blur.h" +#include "import.h" +#include "translate.h" +#include "rotate.h" +#include "clamp.h" +#include "stretch.h" + +//#include "colorcorrect.h" + +#include "supersample.h" + +#include "mandelbrot.h" +#include "julia.h" +#include "insideout.h" +#include "xorpattern.h" +#include "twirl.h" +#include "sphere_distort.h" + + + +#include "shade.h" +#include "bevel.h" +//#include "halftone2.h" + +//#include "radialblur.h" + +#include "warp.h" +#include "timeloop.h" +#include "curvewarp.h" + +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(liblyr_std) + MODULE_NAME("Standard Layers") + MODULE_DESCRIPTION("Provides a basic set of standard layers") + MODULE_AUTHOR("Robert B. Quattlebaum") + MODULE_VERSION("1.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(liblyr_std) + BEGIN_LAYERS + LAYER(Zoom) LAYER_ALIAS(Zoom,"Zoom") + LAYER(Import) LAYER_ALIAS(Import,"Import") + LAYER(Translate) LAYER_ALIAS(Translate,"Translate") + LAYER(SuperSample) LAYER_ALIAS(SuperSample,"SuperSample") + LAYER(Rotate) LAYER_ALIAS(Rotate,"Rotate") + LAYER(Warp) + LAYER(Julia) + LAYER(InsideOut) + LAYER(Mandelbrot) + LAYER(Layer_Clamp) + LAYER(Layer_Stretch) + LAYER(XORPattern) LAYER_ALIAS(XORPattern,"XORPattern") + LAYER(Twirl) + LAYER(Layer_Shade) + LAYER(Layer_Bevel) + LAYER(Layer_TimeLoop) + LAYER(Layer_SphereDistort) + LAYER(CurveWarp) + END_LAYERS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/lyr_std/mandelbrot.cpp b/synfig-core/src/modules/lyr_std/mandelbrot.cpp new file mode 100644 index 0000000..bacbbda --- /dev/null +++ b/synfig-core/src/modules/lyr_std/mandelbrot.cpp @@ -0,0 +1,385 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mandelbrot.cpp +** \brief Implementation of the "Mandelbrot Set" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "mandelbrot.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +#define LOG_OF_2 0.69314718055994528623 + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Mandelbrot); +SYNFIG_LAYER_SET_NAME(Mandelbrot,"mandelbrot"); +SYNFIG_LAYER_SET_LOCAL_NAME(Mandelbrot,N_("Mandelbrot Set")); +SYNFIG_LAYER_SET_CATEGORY(Mandelbrot,N_("Fractals")); +SYNFIG_LAYER_SET_VERSION(Mandelbrot,"0.2"); +SYNFIG_LAYER_SET_CVS_ID(Mandelbrot,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +inline void +color_neg_flip(Color &color) +{ + if(color.get_a()==0) + { + color=Color::alpha(); + return; + } + + if(color.get_a()<0) + color=-color; + + if(color.get_r()<0) + { + color.set_g(color.get_g()-color.get_r()); + color.set_b(color.get_b()-color.get_r()); + color.set_r(0); + } + if(color.get_g()<0) + { + color.set_r(color.get_r()-color.get_g()); + color.set_b(color.get_b()-color.get_g()); + color.set_g(0); + } + if(color.get_b()<0) + { + color.set_r(color.get_r()-color.get_b()); + color.set_g(color.get_g()-color.get_b()); + color.set_b(0); + } +} + +/* === M E T H O D S ======================================================= */ + +Mandelbrot::Mandelbrot(): + gradient_offset_inside(0.0), + gradient_offset_outside(0.0), + gradient_loop_inside(true), + gradient_scale_outside(1.0), + gradient_inside(Color::alpha(),Color::black()), + gradient_outside(Color::alpha(),Color::black()) +{ + iterations=32; +// color_shift=Angle::deg(0); + + distort_inside=true; + distort_outside=true; + solid_inside=false; + solid_outside=false; + invert_inside=false; + invert_outside=false; + shade_inside=true; + shade_outside=true; + + smooth_outside=true; + broken=false; + + bailout=4; + lp=log(log(bailout)); +} + +bool +Mandelbrot::set_param(const String & param, const ValueBase &value) +{ + +// IMPORT(color_shift); + + IMPORT(gradient_offset_inside); + IMPORT(gradient_offset_outside); + IMPORT(gradient_loop_inside); + IMPORT(gradient_scale_outside); + + IMPORT(distort_inside); + IMPORT(distort_outside); + IMPORT(solid_inside); + IMPORT(solid_outside); + IMPORT(invert_inside); + IMPORT(invert_outside); + IMPORT(shade_inside); + IMPORT(shade_outside); + + IMPORT(smooth_outside); + IMPORT(broken); + + IMPORT(gradient_inside); + IMPORT(gradient_outside); + + if(param=="iterations" && value.same_type_as(iterations)) + { + iterations=value.get(iterations); + if(iterations<0) + iterations=0; + if(iterations>500000) + iterations=500000; + return true; + } + if(param=="bailout" && value.same_type_as(bailout)) + { + bailout=value.get(bailout); + bailout*=bailout; + lp=log(log(bailout)); + return true; + } + + return false; +} + +ValueBase +Mandelbrot::get_param(const String & param)const +{ +// EXPORT(icolor); +// EXPORT(ocolor); +// EXPORT(color_shift); + EXPORT(iterations); + + EXPORT(gradient_offset_inside); + EXPORT(gradient_offset_outside); + EXPORT(gradient_loop_inside); + EXPORT(gradient_scale_outside); + + EXPORT(distort_inside); + EXPORT(distort_outside); + EXPORT(solid_inside); + EXPORT(solid_outside); + EXPORT(invert_inside); + EXPORT(invert_outside); + EXPORT(shade_inside); + EXPORT(shade_outside); + EXPORT(smooth_outside); + EXPORT(broken); + + EXPORT(gradient_inside); + EXPORT(gradient_outside); + + if(param=="bailout") + return sqrt(bailout); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return ValueBase(); +} + +Layer::Vocab +Mandelbrot::get_param_vocab()const +{ + Layer::Vocab ret; + + + ret.push_back(ParamDesc("iterations") + .set_local_name(_("Iterations")) + ); + ret.push_back(ParamDesc("bailout") + .set_local_name(_("Bailout ValueBase")) + ); + + ret.push_back(ParamDesc("broken") + .set_local_name(_("Break Set")) + .set_description(_("Modify equation to achieve interesting results")) + ); + + + ret.push_back(ParamDesc("distort_inside") + .set_local_name(_("Distort Inside")) + .set_group(_("Inside")) + ); + ret.push_back(ParamDesc("shade_inside") + .set_local_name(_("Shade Inside")) + .set_group(_("Inside")) + ); + ret.push_back(ParamDesc("solid_inside") + .set_local_name(_("Solid Inside")) + .set_group(_("Inside")) + ); + ret.push_back(ParamDesc("invert_inside") + .set_local_name(_("Invert Inside")) + .set_group(_("Inside")) + ); + ret.push_back(ParamDesc("gradient_inside") + .set_local_name(_("Gradient Inside")) + .set_group(_("Inside")) + ); + ret.push_back(ParamDesc("gradient_offset_inside") + .set_local_name(_("Offset Inside")) + .set_group(_("Inside")) + ); + ret.push_back(ParamDesc("gradient_loop_inside") + .set_local_name(_("Loop Inside")) + .set_group(_("Inside")) + ); + + ret.push_back(ParamDesc("distort_outside") + .set_local_name(_("Distort Outside")) + .set_group(_("Outside")) + ); + ret.push_back(ParamDesc("shade_outside") + .set_local_name(_("Shade Outside")) + .set_group(_("Outside")) + ); + ret.push_back(ParamDesc("solid_outside") + .set_local_name(_("Solid Outside")) + .set_group(_("Outside")) + ); + ret.push_back(ParamDesc("invert_outside") + .set_local_name(_("Invert Outside")) + .set_group(_("Outside")) + ); + ret.push_back(ParamDesc("gradient_outside") + .set_local_name(_("Gradient outside")) + .set_group(_("Outside")) + ); + ret.push_back(ParamDesc("smooth_outside") + .set_local_name(_("Smooth Outside")) + .set_description(_("Smooth the coloration outside the set")) + .set_group(_("Outside")) + ); + ret.push_back(ParamDesc("gradient_offset_outside") + .set_local_name(_("Offset Outside")) + .set_group(_("Outside")) + ); + ret.push_back(ParamDesc("gradient_scale_outside") + .set_local_name(_("Scale Outside")) + .set_group(_("Outside")) + ); + + return ret; +} + +Color +Mandelbrot::get_color(Context context, const Point &pos)const +{ + Real + cr, ci, + zr, zi, + zr_hold; + + ColorReal + depth, mag(0); + + Color + ret; + + + zr=zi=0; + cr=pos[0]; + ci=pos[1]; + + for(int i=0;ibailout) + { + if(smooth_outside) + { + // Darco's original mandelbrot smoothing algo + // depth=((Point::value_type)i+(2.0-sqrt(mag))/PI); + + // Linas Vepstas algo (Better than darco's) + // See (http://linas.org/art-gallery/escape/smooth.html) + depth= (ColorReal)i + LOG_OF_2*lp - log(log(sqrt(mag))) / LOG_OF_2; + + // Clamp + if(depth<0) depth=0; + } + else + depth=static_cast(i); + + ColorReal amount(depth/static_cast(iterations)); + amount=amount*gradient_scale_outside+gradient_offset_outside; + amount-=floor(amount); + + if(solid_outside) + ret=gradient_outside(amount); + else + { + if(distort_outside) + ret=context.get_color(Point(pos[0]+zr,pos[1]+zi)); + else + ret=context.get_color(pos); + + if(invert_outside) + ret=~ret; + + if(shade_outside) + ret=Color::blend(gradient_outside(amount), ret, 1.0); + } + + + return ret; + } + } + + ColorReal amount(abs(mag+gradient_offset_inside)); + if(gradient_loop_inside) + amount-=floor(amount); + + if(solid_inside) + ret=gradient_inside(amount); + else + { + if(distort_inside) + ret=context.get_color(Point(pos[0]+zr,pos[1]+zi)); + else + ret=context.get_color(pos); + + if(invert_inside) + ret=~ret; + + if(shade_inside) + ret=Color::blend(gradient_inside(amount), ret, 1.0); + } + + return ret; +} diff --git a/synfig-core/src/modules/lyr_std/mandelbrot.h b/synfig-core/src/modules/lyr_std/mandelbrot.h new file mode 100644 index 0000000..a5f514b --- /dev/null +++ b/synfig-core/src/modules/lyr_std/mandelbrot.h @@ -0,0 +1,86 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mandelbrot.h +** \brief Header file for implementation of the "Mandelbrot Set" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_MANDELBROT_H +#define __SYNFIG_MANDELBROT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +class Mandelbrot : public Layer +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + Real bailout; + Real lp; + int iterations; + + bool smooth_outside; + bool broken; + + bool distort_inside; + bool distort_outside; + bool solid_inside; + bool solid_outside; + bool invert_inside; + bool invert_outside; + bool shade_outside; + bool shade_inside; + Real gradient_offset_inside; + Real gradient_offset_outside; + bool gradient_loop_inside; + Real gradient_scale_outside; + Gradient gradient_inside; + Gradient gradient_outside; + +public: + Mandelbrot(); + + virtual bool set_param(const String ¶m, const ValueBase &value); + virtual ValueBase get_param(const String ¶m)const; + virtual Color get_color(Context context, const Point &pos)const; + virtual Vocab get_param_vocab()const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/lyr_std/rotate.cpp b/synfig-core/src/modules/lyr_std/rotate.cpp new file mode 100644 index 0000000..fd13f92 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/rotate.cpp @@ -0,0 +1,337 @@ +/* === S Y N F I G ========================================================= */ +/*! \file rotate.cpp +** \brief Implementation of the "Rotate" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "rotate.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Rotate); +SYNFIG_LAYER_SET_NAME(Rotate,"rotate"); +SYNFIG_LAYER_SET_LOCAL_NAME(Rotate,N_("Rotate")); +SYNFIG_LAYER_SET_CATEGORY(Rotate,N_("Transform")); +SYNFIG_LAYER_SET_VERSION(Rotate,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Rotate,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +Rotate::Rotate(): + origin (0,0), + amount (Angle::deg(0)), + sin_val (0), + cos_val (1) +{ +} + +Rotate::~Rotate() +{ +} + +bool +Rotate::set_param(const String & param, const ValueBase &value) +{ + IMPORT(origin); + + if(param=="amount" && value.same_type_as(amount)) + { + amount=value.get(amount); + sin_val=Angle::sin(amount).get(); + cos_val=Angle::cos(amount).get(); + return true; + } + + return false; +} + +ValueBase +Rotate::get_param(const String ¶m)const +{ + EXPORT(origin); + EXPORT(amount); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return ValueBase(); +} + +Layer::Vocab +Rotate::get_param_vocab()const +{ + Layer::Vocab ret; + + ret.push_back(ParamDesc("origin") + .set_local_name(_("Origin")) + .set_description(_("Point where you want the origin to be")) + ); + + ret.push_back(ParamDesc("amount") + .set_local_name(_("Amount")) + .set_description(_("Amount of rotation")) + .set_origin("origin") + ); + + return ret; +} + +class Rotate_Trans : public Transform +{ + etl::handle layer; +public: + Rotate_Trans(const Rotate* x):Transform(x->get_guid()),layer(x) { } + + synfig::Vector perform(const synfig::Vector& x)const + { + Point pos(x-layer->origin); + return Point(layer->cos_val*pos[0]-layer->sin_val*pos[1],layer->sin_val*pos[0]+layer->cos_val*pos[1])+layer->origin; + } + + synfig::Vector unperform(const synfig::Vector& x)const + { + Point pos(x-layer->origin); + return Point(layer->cos_val*pos[0]+layer->sin_val*pos[1],-layer->sin_val*pos[0]+layer->cos_val*pos[1])+layer->origin; + } +}; +etl::handle +Rotate::get_transform()const +{ + return new Rotate_Trans(this); +} + +synfig::Layer::Handle +Rotate::hit_check(synfig::Context context, const synfig::Point &p)const +{ + Point pos(p-origin); + Point newpos(cos_val*pos[0]+sin_val*pos[1],-sin_val*pos[0]+cos_val*pos[1]); + newpos+=origin; + return context.hit_check(newpos); +} + +Color +Rotate::get_color(Context context, const Point &p)const +{ + Point pos(p-origin); + Point newpos(cos_val*pos[0]+sin_val*pos[1],-sin_val*pos[0]+cos_val*pos[1]); + newpos+=origin; + return context.get_color(newpos); +} + +bool +Rotate::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + if(amount.dist(Angle::deg(0))==Angle::deg(0)) + return context.accelerated_render(surface,quality,renddesc,cb); + if(amount.dist(Angle::deg(180))==Angle::deg(0)) + { + RendDesc desc(renddesc); + desc.clear_flags(); + Point tmp; + tmp=renddesc.get_tl()-origin; + desc.set_tl(Point(-tmp[0],-tmp[1])+origin); + tmp=renddesc.get_br()-origin; + desc.set_br(Point(-tmp[0],-tmp[1])+origin); + return context.accelerated_render(surface,quality,desc,cb); + } + + SuperCallback stageone(cb,0,9000,10000); + SuperCallback stagetwo(cb,9000,10000,10000); + + if(cb && !cb->amount_complete(0,10000)) + return false; + + Point tl(renddesc.get_tl()-origin); + Point br(renddesc.get_br()-origin); + + { + Point rot_tl(cos_val*tl[0]+sin_val*tl[1],-sin_val*tl[0]+cos_val*tl[1]); + Point rot_br(cos_val*br[0]+sin_val*br[1],-sin_val*br[0]+cos_val*br[1]); + Point rot_tr(cos_val*br[0]+sin_val*tl[1],-sin_val*br[0]+cos_val*tl[1]); + Point rot_bl(cos_val*tl[0]+sin_val*br[1],-sin_val*tl[0]+cos_val*br[1]); + rot_tl+=origin; + rot_br+=origin; + rot_tr+=origin; + rot_bl+=origin; + + Point min_point(min(min(min(rot_tl[0],rot_br[0]),rot_tr[0]),rot_bl[0]),min(min(min(rot_tl[1],rot_br[1]),rot_tr[1]),rot_bl[1])); + Point max_point(max(max(max(rot_tl[0],rot_br[0]),rot_tr[0]),rot_bl[0]),max(max(max(rot_tl[1],rot_br[1]),rot_tr[1]),rot_bl[1])); + + if(tl[0]>br[0]) + { + tl[0]=max_point[0]; + br[0]=min_point[0]; + } + else + { + br[0]=max_point[0]; + tl[0]=min_point[0]; + } + if(tl[1]>br[1]) + { + tl[1]=max_point[1]; + br[1]=min_point[1]; + } + else + { + br[1]=max_point[1]; + tl[1]=min_point[1]; + } + } + + Real pw=(renddesc.get_w())/(renddesc.get_br()[0]-renddesc.get_tl()[0]); + Real ph=(renddesc.get_h())/(renddesc.get_br()[1]-renddesc.get_tl()[1]); + + // we're going to round the canvas size to an integer number of pixels, so round the + // tl-br rectangle accordingly - otherwise we see the jittering described in bug 2152666 + br[0] -= (pw*(br[0]-tl[0]) - round_to_int(pw*(br[0]-tl[0]))) / pw; + br[1] -= (ph*(br[1]-tl[1]) - round_to_int(ph*(br[1]-tl[1]))) / ph; + + RendDesc desc(renddesc); + desc.clear_flags(); + //desc.set_flags(RendDesc::PX_ASPECT); + desc.set_tl(tl); + desc.set_br(br); + desc.set_wh(round_to_int(pw*(br[0]-tl[0])),round_to_int(ph*(br[1]-tl[1]))); + + //synfig::warning("given window: [%f,%f]-[%f,%f] %dx%d",renddesc.get_tl()[0],renddesc.get_tl()[1],renddesc.get_br()[0],renddesc.get_br()[1],renddesc.get_w(),renddesc.get_h()); + //synfig::warning("surface to render: [%f,%f]-[%f,%f] %dx%d",desc.get_tl()[0],desc.get_tl()[1],desc.get_br()[0],desc.get_br()[1],desc.get_w(),desc.get_h()); + + Surface source; + source.set_wh(desc.get_w(),desc.get_h()); + + if(!context.accelerated_render(&source,quality,desc,&stageone)) + return false; + + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + + Surface::pen pen(surface->begin()); + + if(quality<=4) + { + // CUBIC + int x,y;//,u,v,u2,v2; + Point point,tmp; + for(y=0,point[1]=renddesc.get_tl()[1];yget_h();y++,pen.inc_y(),pen.dec_x(x),point[1]+=1.0/ph) + { + for(x=0,point[0]=renddesc.get_tl()[0];xget_w();x++,pen.inc_x(),point[0]+=1.0/pw) + { + tmp=Point(cos_val*(point[0]-origin[0])+sin_val*(point[1]-origin[1]),-sin_val*(point[0]-origin[0])+cos_val*(point[1]-origin[1])) +origin; + (*surface)[y][x]=source.cubic_sample((tmp[0]-tl[0])*pw,(tmp[1]-tl[1])*ph); + } + if((y&31)==0 && cb) + { + if(!stagetwo.amount_complete(y,surface->get_h())) + return false; + } + } + } + else + if(quality<=6) + { + // INTERPOLATION_LINEAR + int x,y;//,u,v,u2,v2; + Point point,tmp; + for(y=0,point[1]=renddesc.get_tl()[1];yget_h();y++,pen.inc_y(),pen.dec_x(x),point[1]+=1.0/ph) + { + for(x=0,point[0]=renddesc.get_tl()[0];xget_w();x++,pen.inc_x(),point[0]+=1.0/pw) + { + tmp=Point(cos_val*(point[0]-origin[0])+sin_val*(point[1]-origin[1]),-sin_val*(point[0]-origin[0])+cos_val*(point[1]-origin[1])) +origin; + (*surface)[y][x]=source.linear_sample((tmp[0]-tl[0])*pw,(tmp[1]-tl[1])*ph); + } + if((y&31)==0 && cb) + { + if(!stagetwo.amount_complete(y,surface->get_h())) + return false; + } + } + } + else + { + // NEAREST_NEIGHBOR + int x,y,u,v; + Point point,tmp; + for(y=0,point[1]=renddesc.get_tl()[1];yget_h();y++,pen.inc_y(),pen.dec_x(x),point[1]+=1.0/ph) + { + for(x=0,point[0]=renddesc.get_tl()[0];xget_w();x++,pen.inc_x(),point[0]+=1.0/pw) + { + tmp=Point(cos_val*(point[0]-origin[0])+sin_val*(point[1]-origin[1]),-sin_val*(point[0]-origin[0])+cos_val*(point[1]-origin[1])) +origin; + u=int((tmp[0]-tl[0])*pw); + v=int((tmp[1]-tl[1])*ph); + if(u<0) + u=0; + if(v<0) + v=0; + if(u>=source.get_w()) + u=source.get_w()-1; + if(v>=source.get_h()) + v=source.get_h()-1; + //pen.set_value(source[v][u]); + (*surface)[y][x]=source[v][u]; + } + if((y&31)==0 && cb) + { + if(!stagetwo.amount_complete(y,surface->get_h())) + return false; + } + } + } + + if(cb && !cb->amount_complete(10000,10000)) return false; + + return true; +} + +Rect +Rotate::get_full_bounding_rect(Context context)const +{ + Rect under(context.get_full_bounding_rect()); + return get_transform()->perform(under); +} + diff --git a/synfig-core/src/modules/lyr_std/rotate.h b/synfig-core/src/modules/lyr_std/rotate.h new file mode 100644 index 0000000..a80d3de --- /dev/null +++ b/synfig-core/src/modules/lyr_std/rotate.h @@ -0,0 +1,74 @@ +/* === S Y N F I G ========================================================= */ +/*! \file rotate.h +** \brief Header file for implementation of the "Rotate" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_ROTATE_H +#define __SYNFIG_ROTATE_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; +class Rotate_Trans; + +class Rotate : public Layer +{ + SYNFIG_LAYER_MODULE_EXT + friend class Rotate_Trans; +private: + Vector origin; + Angle amount; + + Real sin_val; + Real cos_val; +public: + Rotate(); + ~Rotate(); + + virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); + virtual ValueBase get_param(const synfig::String & param)const; + virtual Color get_color(Context context, const Point &pos)const; + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + virtual Vocab get_param_vocab()const; + virtual Rect get_full_bounding_rect(Context context)const; + + virtual etl::handle get_transform()const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/lyr_std/shade.cpp b/synfig-core/src/modules/lyr_std/shade.cpp new file mode 100644 index 0000000..4ab3917 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/shade.cpp @@ -0,0 +1,424 @@ +/* === S Y N F I G ========================================================= */ +/*! \file shade.cpp +** \brief Implementation of the "Shade" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "shade.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#endif + +using namespace synfig; +using namespace etl; +using namespace std; + +/*#define TYPE_BOX 0 +#define TYPE_FASTGUASSIAN 1 +#define TYPE_CROSS 2 +#define TYPE_GAUSSIAN 3 +#define TYPE_DISC 4 +*/ + +/* -- G L O B A L S --------------------------------------------------------- */ + +SYNFIG_LAYER_INIT(Layer_Shade); +SYNFIG_LAYER_SET_NAME(Layer_Shade,"shade"); +SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Shade,N_("Shade")); +SYNFIG_LAYER_SET_CATEGORY(Layer_Shade,N_("Stylize")); +SYNFIG_LAYER_SET_VERSION(Layer_Shade,"0.2"); +SYNFIG_LAYER_SET_CVS_ID(Layer_Shade,"$Id$"); + +/* -- F U N C T I O N S ----------------------------------------------------- */ + +inline void clamp(synfig::Vector &v) +{ + if(v[0]<0.0)v[0]=0.0; + if(v[1]<0.0)v[1]=0.0; +} + +Layer_Shade::Layer_Shade(): + Layer_Composite (0.75,Color::BLEND_BEHIND), + size(0.1,0.1), + type(Blur::FASTGAUSSIAN), + color(Color::black()), + origin(0.2,-0.2), + invert(false) +{ +} + +bool +Layer_Shade::set_param(const String ¶m, const ValueBase &value) +{ + IMPORT_PLUS(size,clamp(size)); + IMPORT(type); + IMPORT_PLUS(color, { if (color.get_a() == 0) { if (converted_blend_) { + set_blend_method(Color::BLEND_ALPHA_OVER); + color.set_a(1); } else transparent_color_ = true; } }); + IMPORT(origin); + IMPORT(invert); + + IMPORT_AS(origin,"offset"); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +Layer_Shade::get_param(const String ¶m)const +{ + EXPORT(size); + EXPORT(type); + EXPORT(color); + EXPORT(origin); + EXPORT(invert); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Color +Layer_Shade::get_color(Context context, const Point &pos)const +{ + Point blurpos = Blur(size,type)(pos); + + if(get_amount()==0.0) + return context.get_color(pos); + + Color shade(color); + + if(!invert) + shade.set_a(context.get_color(blurpos-origin).get_a()); + else + shade.set_a(1.0f-context.get_color(blurpos-origin).get_a()); + + return Color::blend(shade,context.get_color(pos),get_amount(),get_blend_method()); +} + +bool +Layer_Shade::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + int x,y; + + const int w = renddesc.get_w(), + h = renddesc.get_h(); + const Real pw = renddesc.get_pw(), + ph = renddesc.get_ph(); + + RendDesc workdesc(renddesc); + Surface worksurface; + etl::surface blurred; + + //expand the working surface to accommodate the blur + + //the expanded size = 1/2 the size in each direction rounded up + int halfsizex = (int) (abs(size[0]*.5/pw) + 3), + halfsizey = (int) (abs(size[1]*.5/ph) + 3); + + int origin_u(-round_to_int(origin[0]/pw)),origin_v(-round_to_int(origin[1]/ph)); + + int origin_w(w+abs(origin_u)),origin_h(h+abs(origin_v)); + + workdesc.set_subwindow( + origin_u<0?origin_u:0, + origin_v<0?origin_v:0, + (origin_u>0?origin_u:0)+w, + (origin_v>0?origin_v:0)+h + ); + + if(quality >= 10) + { + halfsizex=1; + halfsizey=1; + } + else if (quality == 9) + { + halfsizex/=4; + halfsizey/=4; + } + + //expand by 1/2 size in each direction on either side + switch(type) + { + case Blur::DISC: + case Blur::BOX: + case Blur::CROSS: + { + workdesc.set_subwindow(-max(1,halfsizex),-max(1,halfsizey),origin_w+2*max(1,halfsizex),origin_h+2*max(1,halfsizey)); + break; + } + case Blur::FASTGAUSSIAN: + { + if(quality < 4) + { + halfsizex*=2; + halfsizey*=2; + } + workdesc.set_subwindow(-max(1,halfsizex),-max(1,halfsizey),origin_w+2*max(1,halfsizex),origin_h+2*max(1,halfsizey)); + break; + } + case Blur::GAUSSIAN: + { + #define GAUSSIAN_ADJUSTMENT (0.05) + Real pw = (Real)workdesc.get_w()/(workdesc.get_br()[0]-workdesc.get_tl()[0]); + Real ph = (Real)workdesc.get_h()/(workdesc.get_br()[1]-workdesc.get_tl()[1]); + + pw=pw*pw; + ph=ph*ph; + + halfsizex = (int)(abs(pw)*size[0]*GAUSSIAN_ADJUSTMENT+0.5); + halfsizey = (int)(abs(ph)*size[1]*GAUSSIAN_ADJUSTMENT+0.5); + + halfsizex = (halfsizex + 1)/2; + halfsizey = (halfsizey + 1)/2; + workdesc.set_subwindow( -halfsizex, -halfsizey, origin_w+2*halfsizex, origin_h+2*halfsizey ); + + break; + } + } +#define SCALE_FACTOR (64.0) + if(/*quality>9 || */size[0]<=pw*SCALE_FACTOR) + { + SuperCallback stageone(cb,0,5000,10000); + SuperCallback stagetwo(cb,5000,10000,10000); + + //callbacks depend on how long the blur takes + if(size[0] || size[1]) + { + if(type == Blur::DISC) + { + stageone = SuperCallback(cb,0,5000,10000); + stagetwo = SuperCallback(cb,5000,10000,10000); + } + else + { + stageone = SuperCallback(cb,0,9000,10000); + stagetwo = SuperCallback(cb,9000,10000,10000); + } + } + else + { + stageone = SuperCallback(cb,0,9999,10000); + stagetwo = SuperCallback(cb,9999,10000,10000); + } + + + + //render the background onto the expanded surface + if(!context.accelerated_render(&worksurface,quality,workdesc,&stageone)) + return false; + + // Copy over the alpha + blurred.set_wh(worksurface.get_w(),worksurface.get_h()); + for(int j=0;jset_wh(renddesc.get_w(),renddesc.get_h()); + + int u = halfsizex-(origin_u<0?origin_u:0), v = halfsizey-(origin_v<0?origin_v:0); + for(y=0;yamount_complete(10000,10000)) + { + //if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); + return false; + } + + return true; +} + +Layer::Vocab +Layer_Shade::get_param_vocab(void)const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("color") + .set_local_name(_("Color")) + ); + ret.push_back(ParamDesc("origin") + .set_local_name(_("Origin")) + ); + ret.push_back(ParamDesc("size") + .set_local_name(_("Size")) + .set_description(_("Size of Shade")) + .set_is_distance() + .set_origin("origin") + ); + ret.push_back(ParamDesc("type") + .set_local_name(_("Type")) + .set_description(_("Type of blur to use")) + .set_hint("enum") + .add_enum_value(Blur::BOX,"box",_("Box Blur")) + .add_enum_value(Blur::FASTGAUSSIAN,"fastgaussian",_("Fast Gaussian Blur")) + .add_enum_value(Blur::CROSS,"cross",_("Cross-Hatch Blur")) + .add_enum_value(Blur::GAUSSIAN,"gaussian",_("Gaussian Blur")) + .add_enum_value(Blur::DISC,"disc",_("Disc Blur")) + ); + + ret.push_back(ParamDesc("invert") + .set_local_name(_("Invert")) + ); + + return ret; +} + +Rect +Layer_Shade::get_full_bounding_rect(Context context)const +{ + if(is_disabled()) + return context.get_full_bounding_rect(); + + if(invert) + return Rect::full_plane(); + + Rect under(context.get_full_bounding_rect()); + + if(Color::is_onto(get_blend_method())) + return under; + + Rect bounds((under+origin).expand_x(size[0]).expand_y(size[1])); + + if(is_solid_color()) + return bounds; + + return bounds|under; +} diff --git a/synfig-core/src/modules/lyr_std/shade.h b/synfig-core/src/modules/lyr_std/shade.h new file mode 100644 index 0000000..ec16ad1 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/shade.h @@ -0,0 +1,69 @@ +/* === S Y N F I G ========================================================= */ +/*! \file shade.h +** \brief Header file for implementation of the "Shade" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifndef __SYNFIG_LAYER_SHADE_H__ +#define __SYNFIG_LAYER_SHADE_H__ + +/* -- H E A D E R S --------------------------------------------------------- */ + +#include +#include +#include +#include + +using namespace synfig; +using namespace std; +using namespace etl; + +class Layer_Shade : public synfig::Layer_Composite +{ + SYNFIG_LAYER_MODULE_EXT +private: + synfig::Vector size; + int type; + synfig::Color color; + synfig::Vector origin; + bool invert; + +public: + Layer_Shade(); + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + + virtual ValueBase get_param(const String & param)const; + + virtual Color get_color(Context context, const Point &pos)const; + + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + virtual Rect get_full_bounding_rect(Context context)const; + virtual Vocab get_param_vocab()const; + virtual bool reads_context()const { return true; } +}; // END of class Layer_Shade + +/* -- E X T E R N S --------------------------------------------------------- */ + +/* -- E N D ----------------------------------------------------------------- */ + +#endif diff --git a/synfig-core/src/modules/lyr_std/sphere_distort.cpp b/synfig-core/src/modules/lyr_std/sphere_distort.cpp new file mode 100644 index 0000000..9c0003e --- /dev/null +++ b/synfig-core/src/modules/lyr_std/sphere_distort.cpp @@ -0,0 +1,578 @@ +/* === S Y N F I G ========================================================= */ +/*! \file sphere_distort.cpp +** \brief Implementation of the "Spherize" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "sphere_distort.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +#ifndef PI +const double PI = 3.14159265; +#endif + +enum +{ + TYPE_NORMAL = 0, + TYPE_DISTH = 1, //axe the horizontal axis + TYPE_DISTV = 2, //axe the vertical axis + N_TYPES +}; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Layer_SphereDistort); +SYNFIG_LAYER_SET_NAME(Layer_SphereDistort,"spherize"); +SYNFIG_LAYER_SET_LOCAL_NAME(Layer_SphereDistort,N_("Spherize")); +SYNFIG_LAYER_SET_CATEGORY(Layer_SphereDistort,N_("Distortions")); +SYNFIG_LAYER_SET_VERSION(Layer_SphereDistort,"0.2"); +SYNFIG_LAYER_SET_CVS_ID(Layer_SphereDistort,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +Layer_SphereDistort::Layer_SphereDistort() +:center(0,0), +radius(1), +percent(1.0), +type(TYPE_NORMAL), +clip(false) +{ +} + + +bool +Layer_SphereDistort::set_param(const String & param, const ValueBase &value) +{ + IMPORT_PLUS(center,sync()); + IMPORT_PLUS(radius,sync()); + IMPORT(type); + IMPORT_AS(percent,"amount"); + IMPORT(clip); + + if(param=="percent") + { + if(dynamic_param_list().count("percent")) + { + connect_dynamic_param("amount",dynamic_param_list().find("percent")->second); + disconnect_dynamic_param("percent"); + synfig::warning("Layer_SphereDistort::::set_param(): Updated valuenode connection to use the new \"amount\" parameter."); + } + else + synfig::warning("Layer_SphereDistort::::set_param(): The parameter \"segment_list\" is deprecated. Use \"bline\" instead."); + } + + return false; +} + +ValueBase +Layer_SphereDistort::get_param(const String ¶m)const +{ + EXPORT(center); + EXPORT(radius); + EXPORT(type); + EXPORT_AS(percent,"amount"); + EXPORT(clip); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return ValueBase(); +} + +void +Layer_SphereDistort::sync() +{ +} + +Layer::Vocab +Layer_SphereDistort::get_param_vocab()const +{ + Layer::Vocab ret; + + ret.push_back(ParamDesc("center") + .set_local_name(_("Position")) + ); + + ret.push_back(ParamDesc("radius") + .set_local_name(_("Radius")) + .set_origin("center") + .set_is_distance() + ); + + ret.push_back(ParamDesc("amount") + .set_local_name(_("Amount")) + .set_is_distance(false) + ); + + ret.push_back(ParamDesc("clip") + .set_local_name(_("Clip")) + ); + + ret.push_back(ParamDesc("type") + .set_local_name(_("Distort Type")) + .set_description(_("The direction of the distortion")) + .set_hint("enum") + .add_enum_value(TYPE_NORMAL,"normal",_("Spherize")) + .add_enum_value(TYPE_DISTH,"honly",_("Vertical Bar")) + .add_enum_value(TYPE_DISTV,"vonly",_("Horizontal Bar")) + ); + + return ret; +} + +/* + Spherical Distortion: maps an image onto a ellipsoid of some sort + + so the image coordinate (i.e. distance away from the center) + will determine how things get mapped + + so with the radius and position the mapping would go as follows + + r = (pos - center) / radius clamped to [-1,1] + + if it's outside of that range then it's not distorted + but if it's inside of that range then it goes as follows + + angle = r * pi/2 (-pi/2,pi/2) + + newr = cos(angle)*radius + + the inverse of this is (which is actually what we'd be transforming it from + + +*/ + +inline float spherify(float f) +{ + if(f > -1 && f < 1 && f!=0) + return sinf(f*(PI/2)); + else return f; +} + +inline float unspherify(float f) +{ + if(f > -1 && f < 1 && f!=0) + return asin(f)/(PI/2); + else return f; +} + +Point sphtrans(const Point &p, const Point ¢er, const float &radius, + const Real &percent, int type, bool& clipped) +{ + const Vector v = (p - center) / radius; + + Point newp = p; + const float t = percent; + + clipped=false; + + if(type == TYPE_NORMAL) + { + const float m = v.mag(); + float lerp(0); + + if(m <= -1 || m >= 1) + { + clipped=true; + return newp; + }else + if(m==0) + return newp; + else + if(t > 0) + { + lerp = (t*unspherify(m) + (1-t)*m); + }else if(t < 0) + { + lerp = ((1+t)*m - t*spherify(m)); + }else lerp = m; + + const float d = lerp*radius; + newp = center + v*(d/m); + } + + else if(type == TYPE_DISTH) + { + float lerp(0); + if(v[0] <= -1 || v[0] >= 1) + { + clipped=true; + return newp; + }else + if(v[0]==0) + return newp; + else + if(t > 0) + { + lerp = (t*unspherify(v[0]) + (1-t)*v[0]); + }else if(t < 0) + { + lerp = ((1+t)*v[0] - t*spherify(v[0])); + }else lerp = v[0]; + + newp[0] = center[0] + lerp*radius; + } + + else if(type == TYPE_DISTV) + { + float lerp(0); + if(v[1] <= -1 || v[1] >= 1) + { + clipped=true; + return newp; + } + else + if(v[1]==0) + return newp; + else + if(t > 0) + { + lerp = (t*unspherify(v[1]) + (1-t)*v[1]); + }else if(t < 0) + { + lerp = ((1+t)*v[1] - t*spherify(v[1])); + }else lerp = v[1]; + + newp[1] = center[1] + lerp*radius; + } + + return newp; +} + +inline Point sphtrans(const Point &p, const Point ¢er, const Real &radius, + const Real &percent, int type) +{ + bool tmp; + return sphtrans(p, center, radius, percent, type, tmp); +} + +synfig::Layer::Handle +Layer_SphereDistort::hit_check(synfig::Context context, const synfig::Point &pos)const +{ + bool clipped; + Point point(sphtrans(pos,center,radius,percent,type,clipped)); + if(clip && clipped) + return 0; + return context.hit_check(point); +} + +Color +Layer_SphereDistort::get_color(Context context, const Point &pos)const +{ + bool clipped; + Point point(sphtrans(pos,center,radius,percent,type,clipped)); + if(clip && clipped) + return Color::alpha(); + return context.get_color(point); +} + +#if 1 +bool Layer_SphereDistort::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + /* Things to consider: + 1) Block expansion for distortion (ouch... quality level??) + 2) Bounding box clipping + 3) Super sampling for better visual quality (based on the quality level?) + 4) Interpolation type for sampling (based on quality level?) + + //things to defer until after + super sampling, non-linear interpolation + */ + + //bounding box reject + { + Rect sphr; + + sphr.set_point(center[0]-radius,center[1]-radius); + sphr.expand(center[0]+radius,center[1]+radius); + + //get the bounding box of the transform + Rect windr; + + //and the bounding box of the rendering + windr.set_point(renddesc.get_tl()[0],renddesc.get_tl()[1]); + windr.expand(renddesc.get_br()[0],renddesc.get_br()[1]); + + //test bounding boxes for collision + if( (type == TYPE_NORMAL && !intersect(sphr,windr)) || + (type == TYPE_DISTH && (sphr.minx >= windr.maxx || windr.minx >= sphr.maxx)) || + (type == TYPE_DISTV && (sphr.miny >= windr.maxy || windr.miny >= sphr.maxy)) ) + { + //synfig::warning("Spherize: Bounding box reject"); + if (clip) + { + surface->set_wh(renddesc.get_w(), renddesc.get_h()); + surface->clear(); + return true; + } + else + return context.accelerated_render(surface,quality,renddesc,cb); + } + + //synfig::warning("Spherize: Bounding box accept"); + } + + //Ok, so we overlap some... now expand the window for rendering + RendDesc r = renddesc; + Surface background; + Real pw = renddesc.get_pw(),ph = renddesc.get_ph(); + + int nl=0,nt=0,nr=0,nb=0, nw=0,nh=0; + Point tl = renddesc.get_tl(), br = renddesc.get_br(); + + { + //must enlarge window by pixel coordinates so go! + + //need to figure out closest and farthest point and distort THOSE + + Point origin[4] = {tl,tl,br,br}; + Vector v[4] = {Vector(0,br[1]-tl[1]), + Vector(br[0]-tl[0],0), + Vector(0,tl[1]-br[1]), + Vector(tl[0]-br[0],0)}; + + Point close(0,0); + Real t = 0; + Rect expandr(tl,br); + + //expandr.set_point(tl[0],tl[1]); + //expandr.expand(br[0],br[1]); + + //synfig::warning("Spherize: Loop through lines and stuff"); + for(int i=0; i<4; ++i) + { + //synfig::warning("Spherize: %d", i); + Vector p_o = center-origin[i]; + + //project onto left line + t = (p_o*v[i])/v[i].mag_squared(); + + //clamp + if(t < 0) t = 0; if(t > 1) t = 1; + + close = origin[i] + v[i]*t; + + //now get transforms and expand the rectangle to accommodate + Point p = sphtrans(close,center,radius,percent,type); + expandr.expand(p[0],p[1]); + p = sphtrans(origin[i],center,radius,percent,type); + expandr.expand(p[0],p[1]); + p = sphtrans(origin[i]+v[i],center,radius,percent,type); + expandr.expand(p[0],p[1]); + } + + /*synfig::warning("Spherize: Bounding box (%f,%f)-(%f,%f)", + expandr.minx,expandr.miny,expandr.maxx,expandr.maxy);*/ + + //now that we have the bounding rectangle of ALL the pixels (should be...) + //order it so that it's in the same orientation as the tl,br pair + + //synfig::warning("Spherize: Organize like tl,br"); + Point ntl(0,0),nbr(0,0); + + //sort x + if(tl[0] < br[0]) + { + ntl[0] = expandr.minx; + nbr[0] = expandr.maxx; + } + else + { + ntl[0] = expandr.maxx; + nbr[0] = expandr.minx; + } + + //sort y + if(tl[1] < br[1]) + { + ntl[1] = expandr.miny; + nbr[1] = expandr.maxy; + } + else + { + ntl[1] = expandr.maxy; + nbr[1] = expandr.miny; + } + + //now expand the window as needed + Vector temp = ntl-tl; + + //pixel offset + nl = (int)(temp[0]/pw)-1; + nt = (int)(temp[1]/ph)-1; + + temp = nbr - br; + nr = (int)(temp[0]/pw)+1; + nb = (int)(temp[1]/ph)+1; + + nw = renddesc.get_w() + nr - nl; + nh = renddesc.get_h() + nb - nt; + + //synfig::warning("Spherize: Setting subwindow (%d,%d) (%d,%d) (%d,%d)",nl,nt,nr,nb,nw,nh); + r.set_subwindow(nl,nt,nw,nh); + + /*r = renddesc; + nw = r.get_w(), nh = r.get_h(); + nl = 0, nt = 0;*/ + } + + //synfig::warning("Spherize: render background"); + if(!context.accelerated_render(&background,quality,r,cb)) + { + synfig::warning("SphereDistort: Layer below failed"); + return false; + } + + //now distort and check to make sure we aren't overshooting our bounds here + int w = renddesc.get_w(), h = renddesc.get_h(); + surface->set_wh(w,h); + + Point sample = tl, sub = tl, trans(0,0); + float xs = 0,ys = 0; + int y=0,x=0; + Real invpw = 1/pw, invph = 1/ph; + Surface::pen p = surface->begin(); + + Point rtl = r.get_tl(); + + //synfig::warning("Spherize: About to transform"); + + for(y = 0; y < h; ++y, sample[1] += ph, p.inc_y()) + { + sub = sample; + for(x = 0; x < w; ++x, sub[0] += pw, p.inc_x()) + { + bool clipped; + trans=sphtrans(sub,center,radius,percent,type,clipped); + if(clip && clipped) + { + p.put_value(Color::alpha()); + continue; + } + + xs = (trans[0]-rtl[0])*invpw; + ys = (trans[1]-rtl[1])*invph; + + if(!(xs >= 0 && xs < nw && ys >= 0 && ys < nh)) + { + //synfig::warning("Spherize: we failed to account for %f,%f",xs,ys); + p.put_value(context.get_color(trans));//Color::alpha()); + continue; + } + + //sample at that pixel location based on the quality + if(quality <= 4) // cubic + p.put_value(background.cubic_sample(xs,ys)); + else if(quality <= 5) // cosine + p.put_value(background.cosine_sample(xs,ys)); + else if(quality <= 6) // linear + p.put_value(background.linear_sample(xs,ys)); + else // nearest + p.put_value(background[round_to_int(ys)][round_to_int(xs)]); + } + p.dec_x(w); + } + + return true; +} +#endif + +class synfig::Spherize_Trans : public synfig::Transform +{ + etl::handle layer; +public: + Spherize_Trans(const Layer_SphereDistort* x):Transform(x->get_guid()),layer(x) { } + + synfig::Vector perform(const synfig::Vector& x)const + { + return sphtrans(x,layer->center,layer->radius,-layer->percent,layer->type); + } + + synfig::Vector unperform(const synfig::Vector& x)const + { + return sphtrans(x,layer->center,layer->radius,layer->percent,layer->type); + } +}; + +etl::handle +Layer_SphereDistort::get_transform()const +{ + return new Spherize_Trans(this); +} + +Rect +Layer_SphereDistort::get_bounding_rect()const +{ + Rect bounds(Rect::full_plane()); + + if (clip) + return bounds; + + switch(type) + { + case TYPE_NORMAL: + bounds=Rect(center[0]+radius, center[1]+radius, + center[0]-radius, center[1]-radius); + break; + case TYPE_DISTH: + bounds = Rect::vertical_strip(center[0]-radius, center[0]+radius); + break; + case TYPE_DISTV: + bounds = Rect::horizontal_strip(center[1]-radius, center[1]+radius); + break; + default: + break; + } + + return bounds; +} diff --git a/synfig-core/src/modules/lyr_std/sphere_distort.h b/synfig-core/src/modules/lyr_std/sphere_distort.h new file mode 100644 index 0000000..acf2b0b --- /dev/null +++ b/synfig-core/src/modules/lyr_std/sphere_distort.h @@ -0,0 +1,92 @@ +/* === S Y N F I G ========================================================= */ +/*! \file sphere_distort.h +** \brief Header file for implementation of the "Spherize" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_SPHERE_DISTORT_H +#define __SYNFIG_SPHERE_DISTORT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ +namespace synfig +{ +class Spherize_Trans; + +class Layer_SphereDistort : public Layer +{ + SYNFIG_LAYER_MODULE_EXT + friend class Spherize_Trans; + +private: + + Vector center; + double radius; + + double percent; + + int type; + +// static Point sphtrans(const Point &xoff, const Point ¢er, const Real &radius, const Real &percent, int type); + +// static double spherify(double xoff); +// static double unspherify(double xoff); + + bool clip; + + synfig::Rect bounds; + + void sync(); + +public: + + Layer_SphereDistort(); + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + + virtual ValueBase get_param(const String & param)const; + + virtual Color get_color(Context context, const Point &pos)const; + + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + + virtual Rect get_bounding_rect()const; + + virtual Vocab get_param_vocab()const; + virtual etl::handle get_transform()const; +}; // END of class Layer_SphereDistort + +} + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/lyr_std/stretch.cpp b/synfig-core/src/modules/lyr_std/stretch.cpp new file mode 100644 index 0000000..de0de94 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/stretch.cpp @@ -0,0 +1,192 @@ +/* === S Y N F I G ========================================================= */ +/*! \file stretch.cpp +** \brief Implementation of the "Stretch" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_NO_ANGLE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "stretch.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace etl; +using namespace std; +using namespace synfig; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Layer_Stretch); +SYNFIG_LAYER_SET_NAME(Layer_Stretch,"stretch"); +SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Stretch,N_("Stretch")); +SYNFIG_LAYER_SET_CATEGORY(Layer_Stretch,N_("Distortions")); +SYNFIG_LAYER_SET_VERSION(Layer_Stretch,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Layer_Stretch,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +Layer_Stretch::Layer_Stretch(): + amount(1,1), + center(0,0) +{ +} + + +bool +Layer_Stretch::set_param(const String & param, const ValueBase &value) +{ + IMPORT(amount); + IMPORT(center); + + return false; +} + +ValueBase +Layer_Stretch::get_param(const String ¶m)const +{ + EXPORT(amount); + EXPORT(center); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return ValueBase(); +} + +Layer::Vocab +Layer_Stretch::get_param_vocab()const +{ + Layer::Vocab ret; + + ret.push_back(ParamDesc("amount") + .set_local_name(_("Amount")) + .set_origin("center") + ); + + ret.push_back(ParamDesc("center") + .set_local_name(_("Center")) + ); + + return ret; +} + +synfig::Layer::Handle +Layer_Stretch::hit_check(synfig::Context context, const synfig::Point &pos)const +{ + Point npos(pos); + npos[0]=(npos[0]-center[0])/amount[0]+center[0]; + npos[1]=(npos[1]-center[1])/amount[1]+center[1]; + return context.hit_check(npos); +} + +Color +Layer_Stretch::get_color(Context context, const Point &pos)const +{ + Point npos(pos); + npos[0]=(npos[0]-center[0])/amount[0]+center[0]; + npos[1]=(npos[1]-center[1])/amount[1]+center[1]; + return context.get_color(npos); +} + +class Stretch_Trans : public Transform +{ + etl::handle layer; +public: + Stretch_Trans(const Layer_Stretch* x):Transform(x->get_guid()),layer(x) { } + + synfig::Vector perform(const synfig::Vector& x)const + { + return Vector((x[0]-layer->center[0])*layer->amount[0]+layer->center[0], + (x[1]-layer->center[1])*layer->amount[1]+layer->center[1]); + } + + synfig::Vector unperform(const synfig::Vector& x)const + { + return Vector((x[0]-layer->center[0])/layer->amount[0]+layer->center[0], + (x[1]-layer->center[1])/layer->amount[1]+layer->center[1]); + } +}; +etl::handle +Layer_Stretch::get_transform()const +{ + return new Stretch_Trans(this); +} + +bool +Layer_Stretch::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + if (amount[0] == 0 || amount[1] == 0) + { + surface->set_wh(renddesc.get_w(), renddesc.get_h()); + surface->clear(); + return true; + } + + RendDesc desc(renddesc); + desc.clear_flags(); + // Adjust the top_left and bottom_right points + // for our zoom amount + Point npos; + npos[0]=(desc.get_tl()[0]-center[0])/amount[0]+center[0]; + npos[1]=(desc.get_tl()[1]-center[1])/amount[1]+center[1]; + desc.set_tl(npos); + npos[0]=(desc.get_br()[0]-center[0])/amount[0]+center[0]; + npos[1]=(desc.get_br()[1]-center[1])/amount[1]+center[1]; + desc.set_br(npos); + + // Render the scene + return context.accelerated_render(surface,quality,desc,cb); +} + +Rect +Layer_Stretch::get_full_bounding_rect(Context context)const +{ + Rect rect(context.get_full_bounding_rect()); + Point min(rect.get_min()), max(rect.get_max()); + + return Rect(Point((min[0]-center[0])*amount[0]+center[0], + (min[1]-center[1])*amount[1]+center[1]), + Point((max[0]-center[0])*amount[0]+center[0], + (max[1]-center[1])*amount[1]+center[1])); +} diff --git a/synfig-core/src/modules/lyr_std/stretch.h b/synfig-core/src/modules/lyr_std/stretch.h new file mode 100644 index 0000000..10054c4 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/stretch.h @@ -0,0 +1,75 @@ +/* === S Y N F I G ========================================================= */ +/*! \file stretch.h +** \brief Header file for implementation of the "Stretch" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_LAYER_STRETCH_H +#define __SYNFIG_LAYER_STRETCH_H + +/* === H E A D E R S ======================================================= */ + +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class Stretch_Trans; +namespace synfig { + +class Layer_Stretch : public Layer +{ + SYNFIG_LAYER_MODULE_EXT + friend class ::Stretch_Trans; + +private: + + Vector amount; + Point center; + +public: + + Layer_Stretch(); + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + + virtual ValueBase get_param(const String & param)const; + + virtual Color get_color(Context context, const Point &pos)const; + + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + + virtual Vocab get_param_vocab()const; + virtual etl::handle get_transform()const; + virtual synfig::Rect get_full_bounding_rect(Context context)const; +}; // END of class Layer_Stretch + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/lyr_std/supersample.cpp b/synfig-core/src/modules/lyr_std/supersample.cpp new file mode 100644 index 0000000..608a242 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/supersample.cpp @@ -0,0 +1,237 @@ +/* === S Y N F I G ========================================================= */ +/*! \file supersample.cpp +** \brief Implementation of the "Super Sample" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "supersample.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(SuperSample); +SYNFIG_LAYER_SET_NAME(SuperSample,"super_sample"); +SYNFIG_LAYER_SET_LOCAL_NAME(SuperSample,N_("Super Sample")); +SYNFIG_LAYER_SET_CATEGORY(SuperSample,N_("Other")); +SYNFIG_LAYER_SET_VERSION(SuperSample,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(SuperSample,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +SuperSample::SuperSample():width(2),height(2) +{ + scanline=false; + alpha_aware=true; +} + +bool +SuperSample::set_param(const String & param, const ValueBase &value) +{ + + IMPORT(width); + IMPORT(height); + IMPORT(scanline); + IMPORT(alpha_aware); + + return false; +} + +ValueBase +SuperSample::get_param(const String& param)const +{ + EXPORT(width); + EXPORT(height); + EXPORT(scanline); + EXPORT(alpha_aware); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return ValueBase(); +} + +bool +SuperSample::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + // don't bother supersampling if our quality is too low. + if(quality>=10) + return context.accelerated_render(surface,quality,renddesc,cb); + + RendDesc desc(renddesc); + + SuperCallback subcb(cb,1,9000,10000); + SuperCallback stagetwo(cb,9000,10000,10000); + + desc.clear_flags(); + desc.set_wh(desc.get_w()*width,desc.get_h()*height); + + Surface tempsurface; + + // Render the scene + if(scanline) + { + handle target=surface_target(&tempsurface); + if(!target) + { + if(cb)cb->error(_("Unable to create SurfaceTarget")); + return false; + } + target->set_rend_desc(&desc); + + if(!render(context-1,target,desc,&subcb)) + { + if(cb)cb->error(strprintf(__FILE__"%d: Scanline Renderer Failure",__LINE__)); + return false; + } + } + else + if(!context.accelerated_render(&tempsurface,quality,desc,cb)) + { + //if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); + return false; + } + + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + + Surface::pen pen(surface->begin()); + Surface::pen temp_pen(tempsurface.begin()); + + if(cb && !cb->amount_complete(9001,10000)) return false; + + if(alpha_aware) + { + int x,y,u,v; + float sum; + Color pool; + for(y=0;yget_h();y++,pen.inc_y(),pen.dec_x(x),temp_pen.inc_y(height),temp_pen.dec_x(x*width)) + { + for(x=0;xget_w();x++,pen.inc_x(),temp_pen.inc_x(width)) + { + pool=Color(0,0,0,0); + sum=0; + + for(v=0;vget_h())) + return false; + } + } + } + else + { + int x,y,u,v; + Color pool; + float multiplier=1.0f/float(width*height); + for(y=0;yget_h();y++,pen.inc_y(),pen.dec_x(x),temp_pen.inc_y(height),temp_pen.dec_x(x*width)) + { + for(x=0;xget_w();x++,pen.inc_x(),temp_pen.inc_x(width)) + { + pool=Color(0,0,0,0); + for(v=0;vget_h())) + return false; + } + } + } + + if(cb && !cb->amount_complete(10000,10000)) return false; + + return true; +} + +Layer::Vocab +SuperSample::get_param_vocab(void)const +{ + Layer::Vocab ret; + + ret.push_back(ParamDesc("width") + .set_local_name(_("Width")) + .set_description(_("Width of sample area (In pixels)")) + ); + ret.push_back(ParamDesc("height") + .set_local_name(_("Height")) + .set_description(_("Height of sample area (In pixels)")) + ); + ret.push_back(ParamDesc("scanline") + .set_local_name(_("Use Parametric")) + .set_description(_("Use the Parametric Renderer")) + ); + ret.push_back(ParamDesc("alpha_aware") + .set_local_name(_("Be Alpha Safe")) + ); + + return ret; +} + +Rect +SuperSample::get_bounding_rect(Context context)const +{ + return context.get_full_bounding_rect(); +} diff --git a/synfig-core/src/modules/lyr_std/supersample.h b/synfig-core/src/modules/lyr_std/supersample.h new file mode 100644 index 0000000..564d0d9 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/supersample.h @@ -0,0 +1,66 @@ +/* === S Y N F I G ========================================================= */ +/*! \file supersample.h +** \brief Header file for implementation of the "Super Sample" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_SUPERSAMPLE_H +#define __SYNFIG_SUPERSAMPLE_H + +/* === H E A D E R S ======================================================= */ + +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +class SuperSample : public synfig::Layer +{ + SYNFIG_LAYER_MODULE_EXT + +private: + int width, height; + bool scanline,alpha_aware; +public: + SuperSample(); + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + + virtual ValueBase get_param(const String & param)const; + + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + virtual synfig::Rect get_bounding_rect(Context context)const; + + virtual Vocab get_param_vocab()const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/lyr_std/timeloop.cpp b/synfig-core/src/modules/lyr_std/timeloop.cpp new file mode 100644 index 0000000..4306c4a --- /dev/null +++ b/synfig-core/src/modules/lyr_std/timeloop.cpp @@ -0,0 +1,252 @@ +/* === S Y N F I G ========================================================= */ +/*! \file timeloop.cpp +** \brief Implementation of the "Time Loop" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "timeloop.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Layer_TimeLoop); +SYNFIG_LAYER_SET_NAME(Layer_TimeLoop,"timeloop"); +SYNFIG_LAYER_SET_LOCAL_NAME(Layer_TimeLoop,N_("Time Loop")); +SYNFIG_LAYER_SET_CATEGORY(Layer_TimeLoop,N_("Other")); +SYNFIG_LAYER_SET_VERSION(Layer_TimeLoop,"0.2"); +SYNFIG_LAYER_SET_CVS_ID(Layer_TimeLoop,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +Layer_TimeLoop::Layer_TimeLoop() +{ + old_version=false; + only_for_positive_duration=false; + symmetrical=true; + link_time=0; + local_time=0; + duration=1; +} + +Layer_TimeLoop::~Layer_TimeLoop() +{ +} + +bool +Layer_TimeLoop::set_param(const String & param, const ValueBase &value) +{ + if(old_version) + { + IMPORT(start_time); + IMPORT(end_time); + } + else + { + IMPORT(local_time); + IMPORT(link_time); + IMPORT(duration); + IMPORT(only_for_positive_duration); + IMPORT(symmetrical); + } + + return Layer::set_param(param,value); +} + +ValueBase +Layer_TimeLoop::get_param(const String & param)const +{ + EXPORT(link_time); + EXPORT(local_time); + EXPORT(duration); + EXPORT(only_for_positive_duration); + EXPORT(symmetrical); + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer::get_param(param); +} + +Layer::Vocab +Layer_TimeLoop::get_param_vocab()const +{ + Layer::Vocab ret(Layer::get_param_vocab()); + + ret.push_back(ParamDesc("link_time") + .set_local_name(_("Link Time")) + ); + + ret.push_back(ParamDesc("local_time") + .set_local_name(_("Local Time")) + ); + + ret.push_back(ParamDesc("duration") + .set_local_name(_("Duration")) + ); + + ret.push_back(ParamDesc("only_for_positive_duration") + .set_local_name(_("Only For Positive Duration")) + ); + + ret.push_back(ParamDesc("symmetrical") + .set_local_name(_("Symmetrical")) + ); + + return ret; +} + +bool +Layer_TimeLoop::set_version(const String &ver) +{ + if (ver=="0.1") + old_version = true; + + return true; +} + +void +Layer_TimeLoop::reset_version() +{ + // if we're not converting from an old version of the layer, there's nothing to do + if (!old_version) + return; + + old_version = false; + + // these are the conversions to go from 0.1 to 0.2: + // + // local_time = start_time + // duration = end_time - start_time + // if (time < start_time) + // link_time = -duration : if we want to reproduce the old behaviour - do we? + // else + // link_time = 0 + + // convert the static parameters + local_time = start_time; + duration = end_time - start_time; + only_for_positive_duration = true; + symmetrical = false; + + //! \todo layer version 0.1 acted differently before start_time was reached - possibly due to a bug + link_time = 0; + + // convert the dynamic parameters + const DynamicParamList &dpl = dynamic_param_list(); + + // if neither start_time nor end_time are dynamic, there's nothing more to do + if (dpl.count("start_time") == 0 && dpl.count("end_time") == 0) + return; + + etl::rhandle start_time_value_node, end_time_value_node; + LinkableValueNode* duration_value_node; + + if (dpl.count("start_time")) + { + start_time_value_node = dpl.find("start_time")->second; + disconnect_dynamic_param("start_time"); + } + else + start_time_value_node = ValueNode_Const::create(start_time); + + if (dpl.count("end_time")) + { + end_time_value_node = dpl.find("end_time")->second; + disconnect_dynamic_param("end_time"); + } + else + end_time_value_node = ValueNode_Const::create(end_time); + + duration_value_node = ValueNode_Subtract::create(Time(0)); + duration_value_node->set_link("lhs", end_time_value_node); + duration_value_node->set_link("rhs", start_time_value_node); + + connect_dynamic_param("local_time", start_time_value_node); + connect_dynamic_param("duration", duration_value_node); +} + +void +Layer_TimeLoop::set_time(Context context, Time t)const +{ + Time time = t; + + if (!only_for_positive_duration || duration > 0) + { + if (duration == 0) + t = link_time; + else if (duration > 0) + { + t -= local_time; + t -= floor(t / duration) * duration; + t = link_time + t; + } + else + { + t -= local_time; + t -= floor(t / -duration) * -duration; + t = link_time - t; + } + + // for compatibility with v0.1 layers; before local_time is reached, take a step back + if (!symmetrical && time < local_time) + t -= duration; + } + + context.set_time(t); +} + +Color +Layer_TimeLoop::get_color(Context context, const Point &pos)const +{ + return context.get_color(pos); +} + +bool +Layer_TimeLoop::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + return context.accelerated_render(surface,quality,renddesc,cb); +} diff --git a/synfig-core/src/modules/lyr_std/timeloop.h b/synfig-core/src/modules/lyr_std/timeloop.h new file mode 100644 index 0000000..16bbe2a --- /dev/null +++ b/synfig-core/src/modules/lyr_std/timeloop.h @@ -0,0 +1,78 @@ +/* === S Y N F I G ========================================================= */ +/*! \file timeloop.h +** \brief Header file for implementation of the "Time Loop" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TIMELOOP_H +#define __SYNFIG_TIMELOOP_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class Layer_TimeLoop : public synfig::Layer +{ + SYNFIG_LAYER_MODULE_EXT + +private: + synfig::Time link_time; + synfig::Time local_time; + synfig::Time duration; + + synfig::Time start_time; + synfig::Time end_time; + bool old_version; + bool only_for_positive_duration; + bool symmetrical; // the 0.1 version of this layer behaved differently before 'start_time' was reached + +protected: + Layer_TimeLoop(); + +public: + ~Layer_TimeLoop(); + + virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); + + virtual synfig::ValueBase get_param(const synfig::String & param)const; + + virtual Vocab get_param_vocab()const; + virtual bool set_version(const synfig::String &ver); + virtual void reset_version(); + virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; + + virtual void set_time(synfig::Context context, synfig::Time time)const; + virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/lyr_std/translate.cpp b/synfig-core/src/modules/lyr_std/translate.cpp new file mode 100644 index 0000000..b0f65db --- /dev/null +++ b/synfig-core/src/modules/lyr_std/translate.cpp @@ -0,0 +1,161 @@ +/* === S Y N F I G ========================================================= */ +/*! \file translate.cpp +** \brief Implementation of the "Translate" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "translate.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Translate); +SYNFIG_LAYER_SET_NAME(Translate,"translate"); +SYNFIG_LAYER_SET_LOCAL_NAME(Translate,N_("Translate")); +SYNFIG_LAYER_SET_CATEGORY(Translate,N_("Transform")); +SYNFIG_LAYER_SET_VERSION(Translate,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Translate,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +Translate::Translate():origin(0,0) +{ +} + +Translate::~Translate() +{ +} + +bool +Translate::set_param(const String & param, const ValueBase &value) +{ + IMPORT(origin); + + return false; +} + +ValueBase +Translate::get_param(const String& param)const +{ + EXPORT(origin); + EXPORT_NAME(); + EXPORT_VERSION(); + + return ValueBase(); +} + +Layer::Vocab +Translate::get_param_vocab()const +{ + Layer::Vocab ret; + + ret.push_back(ParamDesc("origin") + .set_local_name(_("Origin")) + .set_description(_("Point where you want the origin to be")) + ); + + return ret; +} + +synfig::Layer::Handle +Translate::hit_check(synfig::Context context, const synfig::Point &pos)const +{ + return context.hit_check(pos-origin); +} + +Color +Translate::get_color(Context context, const Point &pos)const +{ + return context.get_color(pos-origin); +} + +class Translate_Trans : public Transform +{ + etl::handle layer; +public: + Translate_Trans(const Translate* x):Transform(x->get_guid()),layer(x) { } + + synfig::Vector perform(const synfig::Vector& x)const + { + return x+layer->origin; + } + + synfig::Vector unperform(const synfig::Vector& x)const + { + return x-layer->origin; + } +}; +etl::handle +Translate::get_transform()const +{ + return new Translate_Trans(this); +} + +bool +Translate::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + RendDesc desc(renddesc); + + desc.clear_flags(); + desc.set_tl(desc.get_tl()-origin); + desc.set_br(desc.get_br()-origin); + + // Render the scene + if(!context.accelerated_render(surface,quality,desc,cb)) + { + if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); + return false; + } + + return true; +} + +Rect +Translate::get_full_bounding_rect(Context context)const +{ + return context.get_full_bounding_rect() + origin; +} diff --git a/synfig-core/src/modules/lyr_std/translate.h b/synfig-core/src/modules/lyr_std/translate.h new file mode 100644 index 0000000..ce1b6a9 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/translate.h @@ -0,0 +1,71 @@ +/* === S Y N F I G ========================================================= */ +/*! \file translate.h +** \brief Header file for implementation of the "Translate" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TRANSLATE_H +#define __SYNFIG_TRANSLATE_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +class Translate_Trans; + +class Translate : public Layer +{ + SYNFIG_LAYER_MODULE_EXT + friend class Translate_Trans; +private: + Vector origin; +public: + Translate(); + ~Translate(); + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + virtual ValueBase get_param(const String & param)const; + virtual Color get_color(Context context, const Point &pos)const; + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + virtual Vocab get_param_vocab()const; + virtual synfig::Rect get_full_bounding_rect(Context context)const; + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + virtual etl::handle get_transform()const; + +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/lyr_std/twirl.cpp b/synfig-core/src/modules/lyr_std/twirl.cpp new file mode 100644 index 0000000..38d2097 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/twirl.cpp @@ -0,0 +1,241 @@ +/* === S Y N F I G ========================================================= */ +/*! \file twirl.cpp +** \brief Implementation of the "Twirl" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "twirl.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace etl; +using namespace std; +using namespace synfig; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Twirl); +SYNFIG_LAYER_SET_NAME(Twirl,"twirl"); +SYNFIG_LAYER_SET_LOCAL_NAME(Twirl,N_("Twirl")); +SYNFIG_LAYER_SET_CATEGORY(Twirl,N_("Distortions")); +SYNFIG_LAYER_SET_VERSION(Twirl,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Twirl,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +Twirl::Twirl(): + Layer_Composite(1.0,Color::BLEND_STRAIGHT), + center(0,0), + radius(1.0), + rotations(Angle::zero()), + distort_inside(true), + distort_outside(false) +{ +} + +bool +Twirl::set_param(const String & param, const ValueBase &value) +{ + IMPORT(center); + IMPORT(radius); + IMPORT(rotations); + IMPORT(distort_inside); + IMPORT(distort_outside); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +Twirl::get_param(const String ¶m)const +{ + EXPORT(center); + EXPORT(radius); + EXPORT(rotations); + EXPORT(distort_inside); + EXPORT(distort_outside); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return false; +} + +Layer::Vocab +Twirl::get_param_vocab()const +{ + Layer::Vocab ret; + + ret.push_back(ParamDesc("center") + .set_local_name(_("Center")) + ); + + ret.push_back(ParamDesc("radius") + .set_local_name(_("Radius")) + .set_description(_("This is the radius of the circle")) + .set_is_distance() + .set_origin("center") + ); + + ret.push_back(ParamDesc("rotations") + .set_local_name(_("Rotations")) + .set_origin("center") + ); + + ret.push_back(ParamDesc("distort_inside") + .set_local_name(_("Distort Inside")) + ); + + ret.push_back(ParamDesc("distort_outside") + .set_local_name(_("Distort Outside")) + ); + + return ret; +} + +synfig::Point +Twirl::distort(const synfig::Point &pos,bool reverse)const +{ + Point centered(pos-center); + Real mag(centered.mag()); + + Angle a; + + if((distort_inside || mag>radius) && (distort_outside || mag layer; +public: + Twirl_Trans(const Twirl* x):Transform(x->get_guid()),layer(x) { } + + synfig::Vector perform(const synfig::Vector& x)const + { + return layer->distort(x,true); + } + + synfig::Vector unperform(const synfig::Vector& x)const + { + return layer->distort(x,false); + } +}; +etl::handle +Twirl::get_transform()const +{ + return new Twirl_Trans(this); +} + +/* +bool +Twirl::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + SuperCallback supercb(cb,0,9500,10000); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + { + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + } + else + { + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + return false; + if(get_amount()==0) + return true; + } + + + int x,y; + + Surface::pen pen(surface->begin()); + const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); + Point pos; + Point tl(renddesc.get_tl()); + const int w(surface->get_w()); + const int h(surface->get_h()); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + { + for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) + return false; + + return true; +} +*/ diff --git a/synfig-core/src/modules/lyr_std/twirl.h b/synfig-core/src/modules/lyr_std/twirl.h new file mode 100644 index 0000000..11d893e --- /dev/null +++ b/synfig-core/src/modules/lyr_std/twirl.h @@ -0,0 +1,84 @@ +/* === S Y N F I G ========================================================= */ +/*! \file twirl.h +** \brief Header file for implementation of the "Twirl" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TWIRL_H +#define __SYNFIG_TWIRL_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ +class Twirl_Trans; + +class Twirl : public synfig::Layer_Composite +{ + SYNFIG_LAYER_MODULE_EXT + friend class Twirl_Trans; + +private: + + synfig::Point center; + + synfig::Real radius; + + synfig::Angle rotations; + + bool distort_inside; + + bool distort_outside; + + synfig::Point distort(const synfig::Point &pos, bool reverse=false)const; +public: + + Twirl(); + + virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); + + virtual synfig::ValueBase get_param(const synfig::String & param)const; + + virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; + + //virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; + + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + + virtual Vocab get_param_vocab()const; + virtual etl::handle get_transform()const; + virtual bool reads_context()const { return true; } +}; // END of class Twirl + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/lyr_std/unlyr_std.nsh b/synfig-core/src/modules/lyr_std/unlyr_std.nsh new file mode 100644 index 0000000..b8b5c04 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/unlyr_std.nsh @@ -0,0 +1,8 @@ +Section "un.lyr_std" + Delete "$INSTDIR\lib\synfig\modules\lyr_std.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/modules/lyr_std/warp.cpp b/synfig-core/src/modules/lyr_std/warp.cpp new file mode 100644 index 0000000..f11c290 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/warp.cpp @@ -0,0 +1,851 @@ +/* === S Y N F I G ========================================================= */ +/*! \file warp.cpp +** \brief Implementation of the "Warp" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "warp.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Warp); +SYNFIG_LAYER_SET_NAME(Warp,"warp"); +SYNFIG_LAYER_SET_LOCAL_NAME(Warp,N_("Warp")); +SYNFIG_LAYER_SET_CATEGORY(Warp,N_("Distortions")); +SYNFIG_LAYER_SET_VERSION(Warp,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Warp,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +Warp::Warp(): + src_tl (-2,2), + src_br (2,-2), + dest_tl (-1.8,2.1), + dest_tr (1.8,2.1), + dest_bl (-2.2,-2), + dest_br (2.2,-2), + clip (true) +{ + sync(); + horizon=4; +} + +Warp::~Warp() +{ +} + +inline Point +Warp::transform_forward(const Point& p)const +{ + return Point( + (inv_matrix[0][0]*p[0] + inv_matrix[0][1]*p[1] + inv_matrix[0][2])/(inv_matrix[2][0]*p[0] + inv_matrix[2][1]*p[1] + inv_matrix[2][2]), + (inv_matrix[1][0]*p[0] + inv_matrix[1][1]*p[1] + inv_matrix[1][2])/(inv_matrix[2][0]*p[0] + inv_matrix[2][1]*p[1] + inv_matrix[2][2]) + ); +} + +inline Point +Warp::transform_backward(const Point& p)const +{ + return Point( + (matrix[0][0]*p[0] + matrix[0][1]*p[1] + matrix[0][2])/(matrix[2][0]*p[0] + matrix[2][1]*p[1] + matrix[2][2]), + (matrix[1][0]*p[0] + matrix[1][1]*p[1] + matrix[1][2])/(matrix[2][0]*p[0] + matrix[2][1]*p[1] + matrix[2][2]) + ); +} + +inline Real +Warp::transform_forward_z(const Point& p)const +{ + return inv_matrix[2][0]*p[0] + inv_matrix[2][1]*p[1] + inv_matrix[2][2]; +} + +inline Real +Warp::transform_backward_z(const Point& p)const +{ + return matrix[2][0]*p[0] + matrix[2][1]*p[1] + matrix[2][2]; +} + +/* +#define transform_forward(p) Point( \ + cache_a*p[0] + cache_b*p[1] + cache_c*p[0]*p[1] + cache_d, \ + cache_e*p[0] + cache_f*p[1] + cache_i*p[0]*p[1] + cache_j ) + +#define transform_backward(p) Point( \ + cache_a*p[0] + cache_b*p[1] + cache_c*p[0]*p[1] + cache_d, \ + cache_e*p[0] + cache_f*p[1] + cache_i*p[0]*p[1] + cache_j ) +*/ + +#define triangle_area(a,b,c) (0.5*(-b[0]*a[1]+c[0]*a[1]+a[0]*b[1]-c[0]*b[1]-a[0]*c[1]+b[0]*c[1])) +#define quad_area(a,b,c,d) (triangle_area(a,b,c)+triangle_area(a,c,d)) + +Real mat3_determinant(Real matrix[3][3]) +{ + Real ret; + + ret = (matrix[0][0] * + (matrix[1][1] * matrix[2][2] - + matrix[1][2] * matrix[2][1])); + ret -= (matrix[1][0] * + (matrix[0][1] * matrix[2][2] - + matrix[0][2] * matrix[2][1])); + ret += (matrix[2][0] * + (matrix[0][1] * matrix[1][2] - + matrix[0][2] * matrix[1][1])); + +return ret; +} + +void mat3_invert(Real in[3][3], Real out[3][3]) +{ + Real det(mat3_determinant(in)); + + if (det == 0.0) + return; + + det = 1.0 / det; + + out[0][0] = (in[1][1] * in[2][2] - + in[1][2] * in[2][1]) * det; + + out[1][0] = - (in[1][0] * in[2][2] - + in[1][2] * in[2][0]) * det; + + out[2][0] = (in[1][0] * in[2][1] - + in[1][1] * in[2][0]) * det; + + out[0][1] = - (in[0][1] * in[2][2] - + in[0][2] * in[2][1]) * det; + + out[1][1] = (in[0][0] * in[2][2] - + in[0][2] * in[2][0]) * det; + + out[2][1] = - (in[0][0] * in[2][1] - + in[0][1] * in[2][0]) * det; + + out[0][2] = (in[0][1] * in[1][2] - + in[0][2] * in[1][1]) * det; + + out[1][2] = - (in[0][0] * in[1][2] - + in[0][2] * in[1][0]) * det; + + out[2][2] = (in[0][0] * in[1][1] - + in[0][1] * in[1][0]) * det; + +} + +void +Warp::sync() +{ +/* cache_a=(-dest_tl[0]+dest_tr[0])/(src_br[1]-src_tl[1]); + cache_b=(-dest_tl[0]+dest_bl[0])/(src_br[0]-src_tl[0]); + cache_c=(dest_tl[0]-dest_tr[0]+dest_br[0]-dest_bl[0])/((src_br[1]-src_tl[1])*(src_br[0]-src_tl[0])); + cache_d=dest_tl[0]; + + cache_e=(-dest_tl[1]+dest_tr[1])/(src_br[0]-src_tl[0]); + cache_f=(-dest_tl[1]+dest_bl[1])/(src_br[1]-src_tl[1]); + cache_i=(dest_tl[1]-dest_tr[1]+dest_br[1]-dest_bl[1])/((src_br[1]-src_tl[1])*(src_br[0]-src_tl[0])); + cache_j=dest_tl[1]; +*/ + +/* matrix[2][0]=(dest_tl[0]-dest_tr[0]+dest_br[0]-dest_bl[0])/((src_br[1]-src_tl[1])*(src_br[0]-src_tl[0])); + matrix[2][1]=(dest_tl[1]-dest_tr[1]+dest_br[1]-dest_bl[1])/((src_br[1]-src_tl[1])*(src_br[0]-src_tl[0])); + matrix[2][2]=quad_area(dest_tl,dest_tr,dest_br,dest_bl)/((src_br[1]-src_tl[1])*(src_br[0]-src_tl[0])); + + matrix[0][0]=-(-dest_tl[1]+dest_tr[1])/(src_br[0]-src_tl[0]); + matrix[0][1]=-(-dest_tl[1]+dest_bl[1])/(src_br[1]-src_tl[1]); + + matrix[1][0]=-(-dest_tl[0]+dest_tr[0])/(src_br[1]-src_tl[1]); + matrix[1][1]=-(-dest_tl[0]+dest_bl[0])/(src_br[0]-src_tl[0]); + + matrix[0][2]=matrix[0][0]*dest_tl[0] + matrix[0][1]*dest_tl[1]; + matrix[1][2]=matrix[1][0]*dest_tl[0] + matrix[1][1]*dest_tl[1]; +*/ + +#define matrix tmp + Real tmp[3][3]; + + const Real& x1(min(src_br[0],src_tl[0])); + const Real& y1(min(src_br[1],src_tl[1])); + const Real& x2(max(src_br[0],src_tl[0])); + const Real& y2(max(src_br[1],src_tl[1])); + + Real tx1(dest_bl[0]); + Real ty1(dest_bl[1]); + Real tx2(dest_br[0]); + Real ty2(dest_br[1]); + Real tx3(dest_tl[0]); + Real ty3(dest_tl[1]); + Real tx4(dest_tr[0]); + Real ty4(dest_tr[1]); + + if(src_br[0]src_tl[1]) + swap(tx3,tx1),swap(ty3,ty1),swap(tx4,tx2),swap(ty4,ty2); + + Real scalex; + Real scaley; + + scalex = scaley = 1.0; + + if ((x2 - x1) > 0) + scalex = 1.0 / (Real) (x2 - x1); + + if ((y2 - y1) > 0) + scaley = 1.0 / (Real) (y2 - y1); + + /* Determine the perspective transform that maps from + * the unit cube to the transformed coordinates + */ + { + Real dx1, dx2, dx3, dy1, dy2, dy3; + + dx1 = tx2 - tx4; + dx2 = tx3 - tx4; + dx3 = tx1 - tx2 + tx4 - tx3; + + dy1 = ty2 - ty4; + dy2 = ty3 - ty4; + dy3 = ty1 - ty2 + ty4 - ty3; + + /* Is the mapping affine? */ + if ((dx3 == 0.0) && (dy3 == 0.0)) + { + matrix[0][0] = tx2 - tx1; + matrix[0][1] = tx4 - tx2; + matrix[0][2] = tx1; + matrix[1][0] = ty2 - ty1; + matrix[1][1] = ty4 - ty2; + matrix[1][2] = ty1; + matrix[2][0] = 0.0; + matrix[2][1] = 0.0; + } + else + { + Real det1, det2; + + det1 = dx3 * dy2 - dy3 * dx2; + det2 = dx1 * dy2 - dy1 * dx2; + + if (det1 == 0.0 && det2 == 0.0) + matrix[2][0] = 1.0; + else + matrix[2][0] = det1 / det2; + + det1 = dx1 * dy3 - dy1 * dx3; + + if (det1 == 0.0 && det2 == 0.0) + matrix[2][1] = 1.0; + else + matrix[2][1] = det1 / det2; + + matrix[0][0] = tx2 - tx1 + matrix[2][0] * tx2; + matrix[0][1] = tx3 - tx1 + matrix[2][1] * tx3; + matrix[0][2] = tx1; + + matrix[1][0] = ty2 - ty1 + matrix[2][0] * ty2; + matrix[1][1] = ty3 - ty1 + matrix[2][1] * ty3; + matrix[1][2] = ty1; + } + + matrix[2][2] = 1.0; + } +#undef matrix + + Real scaletrans[3][3]={ + { scalex, 0, -x1*scalex }, + { 0, scaley, -y1*scaley }, + { 0, 0, 1 } + }; + + Real t1,t2,t3; + + for (int i = 0; i < 3; i++) + { + t1 = tmp[i][0]; + t2 = tmp[i][1]; + t3 = tmp[i][2]; + + for (int j = 0; j < 3; j++) + { + matrix[i][j] = t1 * scaletrans[0][j]; + matrix[i][j] += t2 * scaletrans[1][j]; + matrix[i][j] += t3 * scaletrans[2][j]; + } + } + + mat3_invert(matrix, inv_matrix); +/* + gimp_matrix3_identity (result); + gimp_matrix3_translate (result, -x1, -y1); + gimp_matrix3_scale (result, scalex, scaley); + gimp_matrix3_mult (&matrix, result); +*/ +} + +bool +Warp::set_param(const String & param, const ValueBase &value) +{ + IMPORT_PLUS(src_tl,sync()); + IMPORT_PLUS(src_br,sync()); + IMPORT_PLUS(dest_tl,sync()); + IMPORT_PLUS(dest_tr,sync()); + IMPORT_PLUS(dest_bl,sync()); + IMPORT_PLUS(dest_br,sync()); + IMPORT(clip); + IMPORT(horizon); + + return false; +} + +ValueBase +Warp::get_param(const String ¶m)const +{ + EXPORT(src_tl); + EXPORT(src_br); + EXPORT(dest_tl); + EXPORT(dest_tr); + EXPORT(dest_bl); + EXPORT(dest_br); + EXPORT(clip); + EXPORT(horizon); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return ValueBase(); +} + +Layer::Vocab +Warp::get_param_vocab()const +{ + Layer::Vocab ret; + + ret.push_back(ParamDesc("src_tl") + .set_local_name(_("Source TL")) + .set_box("src_br") + ); + + ret.push_back(ParamDesc("src_br") + .set_local_name(_("Source BR")) + ); + + ret.push_back(ParamDesc("dest_tl") + .set_local_name(_("Dest TL")) + .set_connect("dest_tr") + ); + + ret.push_back(ParamDesc("dest_tr") + .set_local_name(_("Dest TR")) + .set_connect("dest_br") + ); + + ret.push_back(ParamDesc("dest_br") + .set_local_name(_("Dest BR")) + .set_connect("dest_bl") + ); + + ret.push_back(ParamDesc("dest_bl") + .set_local_name(_("Dest BL")) + .set_connect("dest_tl") + ); + + ret.push_back(ParamDesc("clip") + .set_local_name(_("Clip")) + ); + + ret.push_back(ParamDesc("horizon") + .set_local_name(_("Horizon")) + ); + + return ret; +} + + +class Warp_Trans : public Transform +{ + etl::handle layer; +public: + Warp_Trans(const Warp* x):Transform(x->get_guid()),layer(x) { } + + synfig::Vector perform(const synfig::Vector& x)const + { + return layer->transform_backward(x); + //Point pos(x-layer->origin); + //return Point(layer->cos_val*pos[0]-layer->sin_val*pos[1],layer->sin_val*pos[0]+layer->cos_val*pos[1])+layer->origin; + } + + synfig::Vector unperform(const synfig::Vector& x)const + { + + return layer->transform_forward(x); + //Point pos(x-layer->origin); + //return Point(layer->cos_val*pos[0]+layer->sin_val*pos[1],-layer->sin_val*pos[0]+layer->cos_val*pos[1])+layer->origin; + } +}; +etl::handle +Warp::get_transform()const +{ + return new Warp_Trans(this); +} + +synfig::Layer::Handle +Warp::hit_check(synfig::Context context, const synfig::Point &p)const +{ + Point newpos(transform_forward(p)); + + if(clip) + { + Rect rect(src_tl,src_br); + if(!rect.is_inside(newpos)) + return 0; + } + + return context.hit_check(newpos); +} + +Color +Warp::get_color(Context context, const Point &p)const +{ + Point newpos(transform_forward(p)); + + if(clip) + { + Rect rect(src_tl,src_br); + if(!rect.is_inside(newpos)) + return Color::alpha(); + } + + const float z(transform_backward_z(newpos)); + if(z>0 && zamount_complete(0,10000)) + return false; + + Point tl(renddesc.get_tl()); + Point br(renddesc.get_br()); + + Rect bounding_rect; + + Rect render_rect(tl,br); + Rect clip_rect(Rect::full_plane()); + Rect dest_rect(dest_tl,dest_br); dest_rect.expand(dest_tr).expand(dest_bl); + + Real zoom_factor(1.0); + + // Quick exclusion clip, if necessary + if(clip && !intersect(render_rect,dest_rect)) + { + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + surface->clear(); + return true; + } + + { + Rect other(render_rect); + if(clip) + other&=dest_rect; + + Point min(other.get_min()); + Point max(other.get_max()); + + bool init_point_set=false; + + // Point trans_point[4]; + Point p; + // Real trans_z[4]; + Real z,minz(10000000000000.0f),maxz(0); + + //! \todo checking the 4 corners for 0<=z0 && z0 && z0 && z0 && zset_wh(renddesc.get_w(),renddesc.get_h()); + surface->clear(); + return true; + } + zoom_factor=(1+(maxz-minz)); + + } + +#ifdef ACCEL_WARP_IS_BROKEN + return Layer::accelerated_render(context,surface,quality,renddesc, cb); +#else + + /*swap(tl[1],br[1]); + bounding_rect + .expand(transform_forward(tl)) + .expand(transform_forward(br)) + ; + swap(tl[1],br[1]);*/ + + //synfig::warning("given window: [%f,%f]-[%f,%f] %dx%d",tl[0],tl[1],br[0],br[1],renddesc.get_w(),renddesc.get_h()); + //synfig::warning("Projected: [%f,%f]-[%f,%f]",bounding_rect.get_min()[0],bounding_rect.get_min()[1],bounding_rect.get_max()[0],bounding_rect.get_max()[1]); + + // If we are clipping, then go ahead and clip to the + // source rectangle + if(clip) + clip_rect&=Rect(src_tl,src_br); + + // Bound ourselves to the bounding rectangle of + // what is under us + clip_rect&=context.get_full_bounding_rect();//.expand_x(abs(zoom_factor/pw)).expand_y(abs(zoom_factor/ph)); + + bounding_rect&=clip_rect; + + Point min_point(bounding_rect.get_min()); + Point max_point(bounding_rect.get_max()); + + // we're going to divide by the difference of these pairs soon; + // if they're the same, we'll be dividing by zero, and we don't + // want to do that! + // \todo what should we do in this case? + if (min_point[0] == max_point[0]) max_point[0] += 0.001; + if (min_point[1] == max_point[1]) max_point[1] += 0.001; + + if(tl[0]>br[0]) + { + tl[0]=max_point[0]; + br[0]=min_point[0]; + } + else + { + br[0]=max_point[0]; + tl[0]=min_point[0]; + } + if(tl[1]>br[1]) + { + tl[1]=max_point[1]; + br[1]=min_point[1]; + } + else + { + br[1]=max_point[1]; + tl[1]=min_point[1]; + } + + + + const int tmp_d(max(renddesc.get_w(),renddesc.get_h())); + Real src_pw=(tmp_d*zoom_factor)/(br[0]-tl[0]); + Real src_ph=(tmp_d*zoom_factor)/(br[1]-tl[1]); + + + RendDesc desc(renddesc); + desc.clear_flags(); + //desc.set_flags(RendDesc::PX_ASPECT); + desc.set_tl(tl); + desc.set_br(br); + desc.set_wh(ceil_to_int(src_pw*(br[0]-tl[0])),ceil_to_int(src_ph*(br[1]-tl[1]))); + + //synfig::warning("surface to render: [%f,%f]-[%f,%f] %dx%d",desc.get_tl()[0],desc.get_tl()[1],desc.get_br()[0],desc.get_br()[1],desc.get_w(),desc.get_h()); + if(desc.get_w()==0 && desc.get_h()==0) + { + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + surface->clear(); + return true; + } + + // Recalculate the pixel widths for the src renddesc + src_pw=(desc.get_w())/(desc.get_br()[0]-desc.get_tl()[0]); + src_ph=(desc.get_h())/(desc.get_br()[1]-desc.get_tl()[1]); + + + Surface source; + source.set_wh(desc.get_w(),desc.get_h()); + + if(!context.accelerated_render(&source,quality,desc,&stageone)) + return false; + + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + surface->clear(); + + Surface::pen pen(surface->begin()); + + if(quality<=4) + { + // CUBIC + int x,y; + float u,v; + Point point,tmp; + for(y=0,point[1]=renddesc.get_tl()[1];yget_h();y++,pen.inc_y(),pen.dec_x(x),point[1]+=1.0/ph) + { + for(x=0,point[0]=renddesc.get_tl()[0];xget_w();x++,pen.inc_x(),point[0]+=1.0/pw) + { + tmp=transform_forward(point); + const float z(transform_backward_z(tmp)); + if(!clip_rect.is_inside(tmp) || !(z>0 && z=source.get_w() || v>=source.get_h() || isnan(u) || isnan(v)) + (*surface)[y][x]=context.get_color(tmp); + else + (*surface)[y][x]=source.cubic_sample(u,v); + } + if((y&31)==0 && cb) + { + if(!stagetwo.amount_complete(y,surface->get_h())) + return false; + } + } + } + else + if(quality<=6) + { + // INTERPOLATION_LINEAR + int x,y; + float u,v; + Point point,tmp; + for(y=0,point[1]=renddesc.get_tl()[1];yget_h();y++,pen.inc_y(),pen.dec_x(x),point[1]+=1.0/ph) + { + for(x=0,point[0]=renddesc.get_tl()[0];xget_w();x++,pen.inc_x(),point[0]+=1.0/pw) + { + tmp=transform_forward(point); + const float z(transform_backward_z(tmp)); + if(!clip_rect.is_inside(tmp) || !(z>0 && z=source.get_w() || v>=source.get_h() || isnan(u) || isnan(v)) + (*surface)[y][x]=context.get_color(tmp); + else + (*surface)[y][x]=source.linear_sample(u,v); + } + if((y&31)==0 && cb) + { + if(!stagetwo.amount_complete(y,surface->get_h())) + return false; + } + } + } + else + { + // NEAREST_NEIGHBOR + int x,y; + float u,v; + Point point,tmp; + for(y=0,point[1]=renddesc.get_tl()[1];yget_h();y++,pen.inc_y(),pen.dec_x(x),point[1]+=1.0/ph) + { + for(x=0,point[0]=renddesc.get_tl()[0];xget_w();x++,pen.inc_x(),point[0]+=1.0/pw) + { + tmp=transform_forward(point); + const float z(transform_backward_z(tmp)); + if(!clip_rect.is_inside(tmp) || !(z>0 && z=source.get_w() || v>=source.get_h() || isnan(u) || isnan(v)) + (*surface)[y][x]=context.get_color(tmp); + else + //pen.set_value(source[v][u]); + (*surface)[y][x]=source[floor_to_int(v)][floor_to_int(u)]; + } + if((y&31)==0 && cb) + { + if(!stagetwo.amount_complete(y,surface->get_h())) + return false; + } + } + } + +#endif + + if(cb && !cb->amount_complete(10000,10000)) return false; + + return true; +} + +synfig::Rect +Warp::get_bounding_rect()const +{ + return Rect::full_plane(); +} + +synfig::Rect +Warp::get_full_bounding_rect(Context context)const +{ +// return Rect::full_plane(); + + Rect under(context.get_full_bounding_rect()); + + if(clip) + { + under&=Rect(src_tl,src_br); + } + + return get_transform()->perform(under); + + /* + Rect under(context.get_full_bounding_rect()); + Rect ret(Rect::zero()); + + if(under.area()==HUGE_VAL) + return Rect::full_plane(); + + ret.expand( + transform_backward( + under.get_min() + ) + ); + ret.expand( + transform_backward( + under.get_max() + ) + ); + ret.expand( + transform_backward( + Vector( + under.get_min()[0], + under.get_max()[1] + ) + ) + ); + ret.expand( + transform_backward( + Vector( + under.get_max()[0], + under.get_min()[1] + ) + ) + ); + + if(ret.area()==HUGE_VAL) + return Rect::full_plane(); + + return ret; + */ +} diff --git a/synfig-core/src/modules/lyr_std/warp.h b/synfig-core/src/modules/lyr_std/warp.h new file mode 100644 index 0000000..08e6844 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/warp.h @@ -0,0 +1,91 @@ +/* === S Y N F I G ========================================================= */ +/*! \file warp.h +** \brief Header file for implementation of the "Warp" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_WARP_H +#define __SYNFIG_WARP_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; +class Warp_Trans; + +class Warp : public Layer +{ + SYNFIG_LAYER_MODULE_EXT + friend class Warp_Trans; +private: + + Point src_tl,src_br,dest_tl,dest_tr,dest_bl,dest_br; + + Real horizon; + + Real cache_a,cache_b,cache_c,cache_d,cache_e,cache_f,cache_i,cache_j; + + Real matrix[3][3]; + Real inv_matrix[3][3]; + + Point transform_forward(const Point& p)const; + Point transform_backward(const Point& p)const; + + Real transform_forward_z(const Point& p)const; + Real transform_backward_z(const Point& p)const; + + bool clip; + +public: + void sync(); + + Warp(); + ~Warp(); + + virtual synfig::Rect get_full_bounding_rect(synfig::Context context)const; + virtual synfig::Rect get_bounding_rect()const; + + virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); + virtual ValueBase get_param(const synfig::String & param)const; + virtual Color get_color(Context context, const Point &pos)const; + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + virtual Vocab get_param_vocab()const; + virtual etl::handle get_transform()const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/lyr_std/xorpattern.cpp b/synfig-core/src/modules/lyr_std/xorpattern.cpp new file mode 100644 index 0000000..df7c6bd --- /dev/null +++ b/synfig-core/src/modules/lyr_std/xorpattern.cpp @@ -0,0 +1,153 @@ +/* === S Y N F I G ========================================================= */ +/*! \file xorpattern.cpp +** \brief Implementation of the "XOR Pattern" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007-2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "xorpattern.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(XORPattern); +SYNFIG_LAYER_SET_NAME(XORPattern,"xor_pattern"); +SYNFIG_LAYER_SET_LOCAL_NAME(XORPattern,N_("XOR Pattern")); +SYNFIG_LAYER_SET_CATEGORY(XORPattern,N_("Other")); +SYNFIG_LAYER_SET_VERSION(XORPattern,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(XORPattern,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +XORPattern::XORPattern(): + Layer_Composite (1.0,Color::BLEND_STRAIGHT), + origin(0.125,0.125), + size(0.25,0.25) +{ +} + +bool +XORPattern::set_param(const String & param, const ValueBase &value) +{ + IMPORT(origin); + IMPORT(size); + + IMPORT_AS(origin,"pos"); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +XORPattern::get_param(const String & param)const +{ + EXPORT(origin); + EXPORT(size); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Color +XORPattern::get_color(Context context, const Point &point)const +{ + if(get_amount()==0.0) + return context.get_color(point); + + unsigned int a=(unsigned int)floor((point[0]-origin[0])/size[0]), b=(unsigned int)floor((point[1]-origin[1])/size[1]); + unsigned char rindex=(a^b); + unsigned char gindex=(a^(~b))*4; + unsigned char bindex=~(a^b)*2; + + Color color((Color::value_type)rindex/(Color::value_type)255.0, + (Color::value_type)gindex/(Color::value_type)255.0, + (Color::value_type)bindex/(Color::value_type)255.0, + 1.0); + + if(get_amount() == 1 && get_blend_method() == Color::BLEND_STRAIGHT) + return color; + else + return Color::blend(color,context.get_color(point),get_amount(),get_blend_method()); + +} + +Layer::Vocab +XORPattern::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("origin") + .set_local_name(_("Origin")) + ); + ret.push_back(ParamDesc("size") + .set_local_name(_("Size")) + .set_origin("origin") + ); + + return ret; +} + +synfig::Layer::Handle +XORPattern::hit_check(synfig::Context context, const synfig::Point &getpos)const +{ + // if we have a zero amount + if(get_amount()==0.0) + // then the click passes down to our context + return context.hit_check(getpos); + + synfig::Layer::Handle tmp; + // if we are behind the context, and the click hits something in the context + if(get_blend_method()==Color::BLEND_BEHIND && (tmp=context.hit_check(getpos))) + // then return the thing it hit in the context + return tmp; + + // if we're using an 'onto' blend method and the click missed the context + if(Color::is_onto(get_blend_method()) && !(tmp=context.hit_check(getpos))) + // then it misses everything + return 0; + + // otherwise the click hit us, since we're the size of the whole plane + return const_cast(this); +} diff --git a/synfig-core/src/modules/lyr_std/xorpattern.h b/synfig-core/src/modules/lyr_std/xorpattern.h new file mode 100644 index 0000000..0780c0e --- /dev/null +++ b/synfig-core/src/modules/lyr_std/xorpattern.h @@ -0,0 +1,69 @@ +/* === S Y N F I G ========================================================= */ +/*! \file xorpattern.h +** \brief Header file for implementation of the "XOR Pattern" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007-2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_XORPATTERN_H +#define __SYNFIG_XORPATTERN_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +class XORPattern : public synfig::Layer_Composite, public synfig::Layer_NoDeform +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + Point origin; + Point size; + +public: + XORPattern(); + + virtual bool set_param(const String ¶m, const ValueBase &value); + virtual ValueBase get_param(const String ¶m)const; + virtual Color get_color(Context context, const Point &pos)const; + virtual Vocab get_param_vocab()const; + virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/lyr_std/zoom.cpp b/synfig-core/src/modules/lyr_std/zoom.cpp new file mode 100644 index 0000000..ff73c4c --- /dev/null +++ b/synfig-core/src/modules/lyr_std/zoom.cpp @@ -0,0 +1,162 @@ +/* === S Y N F I G ========================================================= */ +/*! \file zoom.cpp +** \brief Implementation of the "Zoom" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "zoom.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Zoom); +SYNFIG_LAYER_SET_NAME(Zoom,"zoom"); +SYNFIG_LAYER_SET_LOCAL_NAME(Zoom,N_("Zoom")); +SYNFIG_LAYER_SET_CATEGORY(Zoom,N_("Transform")); +SYNFIG_LAYER_SET_VERSION(Zoom,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Zoom,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +Zoom::Zoom(): + center(0,0), + amount(0) +{ +} + +bool +Zoom::set_param(const String & param, const ValueBase &value) +{ + + IMPORT(center); + IMPORT(amount); + + return false; +} + +ValueBase +Zoom::get_param(const String ¶m)const +{ + EXPORT(center); + EXPORT(amount); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return ValueBase(); +} + +Layer::Vocab +Zoom::get_param_vocab()const +{ + Layer::Vocab ret; + + ret.push_back(ParamDesc("amount") + .set_local_name(_("Amount")) + .set_description(_("Amount to zoom in")) + ); + + ret.push_back(ParamDesc("center") + .set_local_name(_("Center")) + .set_description(_("Point to zoom in to")) + ); + + return ret; +} + +synfig::Layer::Handle +Zoom::hit_check(synfig::Context context, const synfig::Point &pos)const +{ + return context.hit_check((pos-center)/exp(amount)+center); +} + +Color +Zoom::get_color(Context context, const Point &pos)const +{ + return context.get_color((pos-center)/exp(amount)+center); +} + +class Zoom_Trans : public Transform +{ + etl::handle layer; +public: + Zoom_Trans(const Zoom* x):Transform(x->get_guid()),layer(x) { } + + synfig::Vector perform(const synfig::Vector& x)const + { + return (x-layer->center)*exp(layer->amount)+layer->center; + } + + synfig::Vector unperform(const synfig::Vector& x)const + { + return (x-layer->center)/exp(layer->amount)+layer->center; + } +}; +etl::handle +Zoom::get_transform()const +{ + return new Zoom_Trans(this); +} + +bool +Zoom::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + Vector::value_type zoomfactor=1.0/exp(amount); + RendDesc desc(renddesc); + desc.clear_flags(); + + // Adjust the top_left and bottom_right points + // for our zoom amount + desc.set_tl((desc.get_tl()-center)*zoomfactor+center); + desc.set_br((desc.get_br()-center)*zoomfactor+center); + + // Render the scene + return context.accelerated_render(surface,quality,desc,cb); +} + +synfig::Rect +Zoom::get_full_bounding_rect(synfig::Context context)const +{ + return (context.get_full_bounding_rect()-center)*exp(amount)+center; +} diff --git a/synfig-core/src/modules/lyr_std/zoom.h b/synfig-core/src/modules/lyr_std/zoom.h new file mode 100644 index 0000000..aaced17 --- /dev/null +++ b/synfig-core/src/modules/lyr_std/zoom.h @@ -0,0 +1,68 @@ +/* === S Y N F I G ========================================================= */ +/*! \file zoom.h +** \brief Header file for implementation of the "Zoom" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_ZOOM_H +#define __SYNFIG_ZOOM_H + +/* === H E A D E R S ======================================================= */ + +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +class Zoom_Trans; + +class Zoom : public Layer +{ + SYNFIG_LAYER_MODULE_EXT + friend class Zoom_Trans; +private: + Vector center; + Real amount; +public: + Zoom(); + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + virtual ValueBase get_param(const String & param)const; + virtual Color get_color(Context context, const Point &pos)const; + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + virtual Vocab get_param_vocab()const; + virtual synfig::Rect get_full_bounding_rect(synfig::Context context)const; + virtual etl::handle get_transform()const; + +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_bmp/Makefile.am b/synfig-core/src/modules/mod_bmp/Makefile.am new file mode 100644 index 0000000..d367d2e --- /dev/null +++ b/synfig-core/src/modules/mod_bmp/Makefile.am @@ -0,0 +1,37 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +moduledir = @MODULE_DIR@ + +module_LTLIBRARIES = libmod_bmp.la + +libmod_bmp_la_SOURCES = \ + main.cpp \ + trgt_bmp.cpp \ + trgt_bmp.h \ + mptr_bmp.cpp \ + mptr_bmp.h + +libmod_bmp_la_LDFLAGS = \ + -module \ + -no-undefined \ + -avoid-version + +libmod_bmp_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ + +libmod_bmp_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @SYNFIG_LIBS@ + + +EXTRA_DIST = \ + mod_bmp.nsh \ + unmod_bmp.nsh diff --git a/synfig-core/src/modules/mod_bmp/main.cpp b/synfig-core/src/modules/mod_bmp/main.cpp new file mode 100644 index 0000000..88fbbbd --- /dev/null +++ b/synfig-core/src/modules/mod_bmp/main.cpp @@ -0,0 +1,58 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_bmp/main.cpp +** \brief writeme +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_NO_ANGLE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include "trgt_bmp.h" +#include "mptr_bmp.h" + +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(mod_bmp) + MODULE_NAME("Microsoft BMP File Format Module") + MODULE_DESCRIPTION("Provides a Microsoft BMP output target and importer") + MODULE_AUTHOR("Robert B. Quattlebaum") + MODULE_VERSION("1.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(mod_bmp) + BEGIN_TARGETS + TARGET(bmp) + END_TARGETS + BEGIN_IMPORTERS + IMPORTER(bmp_mptr) + END_IMPORTERS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mod_bmp/mod_bmp.nsh b/synfig-core/src/modules/mod_bmp/mod_bmp.nsh new file mode 100644 index 0000000..9624d4b --- /dev/null +++ b/synfig-core/src/modules/mod_bmp/mod_bmp.nsh @@ -0,0 +1,21 @@ +; The stuff to install +Section "mod_bmp" Sec_mod_bmp + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=mod_bmp.dll "src\modules\mod_bmp\.libs\libmod_bmp.dll" + + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "mod_bmp" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd + diff --git a/synfig-core/src/modules/mod_bmp/mptr_bmp.cpp b/synfig-core/src/modules/mod_bmp/mptr_bmp.cpp new file mode 100644 index 0000000..9151cfe --- /dev/null +++ b/synfig-core/src/modules/mod_bmp/mptr_bmp.cpp @@ -0,0 +1,235 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mptr_bmp.cpp +** \brief bmp Target Module +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_NO_ANGLE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "mptr_bmp.h" +#include +#include + +#include +#include +#endif + +/* === U S I N G =========================================================== */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_IMPORTER_INIT(bmp_mptr); +SYNFIG_IMPORTER_SET_NAME(bmp_mptr,"bmp"); +SYNFIG_IMPORTER_SET_EXT(bmp_mptr,"bmp"); +SYNFIG_IMPORTER_SET_VERSION(bmp_mptr,"0.1"); +SYNFIG_IMPORTER_SET_CVS_ID(bmp_mptr,"$Id$"); + +/* === M E T H O D S ======================================================= */ +namespace synfig { + +struct BITMAPFILEHEADER +{ + unsigned char bfType[2]; + unsigned long bfSize; + unsigned short bfReserved1; + unsigned short bfReserved2; + unsigned long bfOffsetBits; +}; + +struct BITMAPINFOHEADER +{ + unsigned long biSize; + long biWidth; + long biHeight; + unsigned short biPlanes; + unsigned short biBitCount; + unsigned long biCompression; + unsigned long biSizeImage; + long biXPelsPerMeter; + long biYPelsPerMeter; + unsigned long biClrUsed; + unsigned long biClrImportant; +}; + +} + +#ifdef WORDS_BIGENDIAN +inline long little_endian(const long &x) +{ + long ret; + char *big_e=(char *)&ret; + char *lit_e=(char *)&x; + big_e[0]=lit_e[3]; + big_e[1]=lit_e[2]; + big_e[2]=lit_e[1]; + big_e[3]=lit_e[0]; + return ret; +} +inline short little_endian_short(const short &x) +{ + short ret; + char *big_e=(char *)&ret; + char *lit_e=(char *)&x; + big_e[0]=lit_e[1]; + big_e[1]=lit_e[0]; + return ret; +} +#else +#define little_endian(x) (x) +#define little_endian_short(x) (x) +#endif + + + + + + +bmp_mptr::bmp_mptr(const char *file) +{ + filename=file; +} + +bmp_mptr::~bmp_mptr() +{ +} + +bool +bmp_mptr::get_frame(synfig::Surface &surface,Time /*time*/, synfig::ProgressCallback *cb) +{ + FILE *file=fopen(filename.c_str(),"rb"); + if(!file) + { + if(cb)cb->error("bmp_mptr::GetFrame(): "+strprintf(_("Unable to open %s"),filename.c_str())); + else synfig::error("bmp_mptr::GetFrame(): "+strprintf(_("Unable to open %s"),filename.c_str())); + return false; + } + + synfig::BITMAPFILEHEADER fileheader; + synfig::BITMAPINFOHEADER infoheader; + char b_char=fgetc(file); + char m_char=fgetc(file); + + if(b_char!='B' || m_char!='M') + { + if(cb)cb->error("bmp_mptr::GetFrame(): "+strprintf(_("%s is not in BMP format"),filename.c_str())); + else synfig::error("bmp_mptr::GetFrame(): "+strprintf(_("%s is not in BMP format"),filename.c_str())); + return false; + } + + if(fread(&fileheader.bfSize, 1, sizeof(synfig::BITMAPFILEHEADER)-4, file)!=sizeof(synfig::BITMAPFILEHEADER)-4) + { + String str("bmp_mptr::get_frame(): "+strprintf(_("Failure while reading BITMAPFILEHEADER from %s"),filename.c_str())); + if(cb)cb->error(str); + else synfig::error(str); + return false; + } + + if(fread(&infoheader, 1, sizeof(synfig::BITMAPINFOHEADER), file)!=sizeof(synfig::BITMAPINFOHEADER)) + { + String str("bmp_mptr::get_frame(): "+strprintf(_("Failure while reading BITMAPINFOHEADER from %s"),filename.c_str())); + if(cb)cb->error(str); + else synfig::error(str); + return false; + } + + int offset=little_endian(fileheader.bfOffsetBits); + + if(offset!=sizeof(synfig::BITMAPFILEHEADER)+sizeof(synfig::BITMAPINFOHEADER)-2) + { + String str("bmp_mptr::get_frame(): "+strprintf(_("Bad BITMAPFILEHEADER in %s. (bfOffsetBits=%d, should be %d)"),filename.c_str(),offset,sizeof(synfig::BITMAPFILEHEADER)+sizeof(synfig::BITMAPINFOHEADER)-2)); + if(cb)cb->error(str); + else synfig::error(str); + return false; + } + + if(little_endian(infoheader.biSize)!=little_endian(40)) + { + String str("bmp_mptr::get_frame(): "+strprintf(_("Bad BITMAPINFOHEADER in %s. (biSize=%d, should be 40)"),filename.c_str(),little_endian(infoheader.biSize))); + if(cb)cb->error(str); + else synfig::error(str); + return false; + } + + int w,h,bit_count; + + w=little_endian(infoheader.biWidth); + h=little_endian(infoheader.biHeight); + bit_count=little_endian_short(infoheader.biBitCount); + + synfig::warning("w:%d\n",w); + synfig::warning("h:%d\n",h); + synfig::warning("bit_count:%d\n",bit_count); + + if(little_endian(infoheader.biCompression)) + { + if(cb)cb->error("bmp_mptr::GetFrame(): "+string(_("Reading compressed bitmaps is not supported"))); + else synfig::error("bmp_mptr::GetFrame(): "+string(_("Reading compressed bitmaps is not supported"))); + return false; + } + + if(bit_count!=24 && bit_count!=32) + { + if(cb)cb->error("bmp_mptr::GetFrame(): "+strprintf(_("Unsupported bit depth (bit_count=%d, should be 24 or 32)"),bit_count)); + else synfig::error("bmp_mptr::GetFrame(): "+strprintf(_("Unsupported bit depth (bit_count=%d, should be 24 or 32)"),bit_count)); + return false; + } + + int x; + int y; + surface.set_wh(w,h); + for(y=0;y +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class bmp_mptr : public synfig::Importer +{ +SYNFIG_IMPORTER_MODULE_EXT + +private: + synfig::String filename; + +public: + bmp_mptr(const char *filename); + ~bmp_mptr(); + + virtual bool get_frame(synfig::Surface &surface,synfig::Time time, synfig::ProgressCallback *callback); +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_bmp/trgt_bmp.cpp b/synfig-core/src/modules/mod_bmp/trgt_bmp.cpp new file mode 100644 index 0000000..2985c53 --- /dev/null +++ b/synfig-core/src/modules/mod_bmp/trgt_bmp.cpp @@ -0,0 +1,265 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_bmp.cpp +** \brief Bitmap Target +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_NO_ANGLE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "trgt_bmp.h" +#include + +#include +#include +#include +#endif + +/* === U S I N G =========================================================== */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === I N F O ============================================================= */ + +SYNFIG_TARGET_INIT(bmp); +SYNFIG_TARGET_SET_NAME(bmp,"bmp"); +SYNFIG_TARGET_SET_EXT(bmp,"bmp"); +SYNFIG_TARGET_SET_VERSION(bmp,"0.1"); +SYNFIG_TARGET_SET_CVS_ID(bmp,"$Id$"); + +/* === C L A S S E S & S T R U C T S ======================================= */ +namespace synfig { + +struct BITMAPFILEHEADER +{ + unsigned char bfType[2]; + unsigned long bfSize; + unsigned short bfReserved1; + unsigned short bfReserved2; + unsigned long bfOffsetBits; +}; + +struct BITMAPINFOHEADER +{ + unsigned long biSize; + long biWidth; + long biHeight; + unsigned short biPlanes; + unsigned short biBitCount; + unsigned long biCompression; + unsigned long biSizeImage; + long biXPelsPerMeter; + long biYPelsPerMeter; + unsigned long biClrUsed; + unsigned long biClrImportant; +}; + +} +/* === M E T H O D S ======================================================= */ + +#ifdef WORDS_BIGENDIAN +inline long little_endian(const long &x) +{ + long ret; + char *big_e=(char *)&ret; + char *lit_e=(char *)&x; + big_e[0]=lit_e[3]; + big_e[1]=lit_e[2]; + big_e[2]=lit_e[1]; + big_e[3]=lit_e[0]; + return ret; +} +inline short little_endian_short(const short &x) +{ + short ret; + char *big_e=(char *)&ret; + char *lit_e=(char *)&x; + big_e[0]=lit_e[1]; + big_e[1]=lit_e[0]; + return ret; +} +#else +#define little_endian(x) (x) +#define little_endian_short(x) (x) +#endif + +bmp::bmp(const char *Filename) +{ + file=NULL; + filename=Filename; + multi_image=false; + buffer=0; + color_buffer=0; + set_remove_alpha(); + +} + +bmp::~bmp() +{ + if(file) + fclose(file); + file=NULL; + delete [] buffer; + delete [] color_buffer; +} + +bool +bmp::set_rend_desc(RendDesc *given_desc) +{ + pf=PF_BGR; + + // Flip the image upside down, + // because bitmaps are upside down. + given_desc->set_flags(0); + Point tl=given_desc->get_tl(); + Point br=given_desc->get_br(); + Point::value_type tmp; + tmp=tl[1]; + tl[1]=br[1]; + br[1]=tmp; + given_desc->set_tl(tl); + given_desc->set_br(br); + + desc=*given_desc; + if(desc.get_frame_end()-desc.get_frame_start()>0) + { + multi_image=true; + imagecount=desc.get_frame_start(); + } + else + multi_image=false; + + return true; +} + +void +bmp::end_frame() +{ + if(file) + fclose(file); + delete [] color_buffer; + color_buffer=0; + file=NULL; + imagecount++; +} + +bool +bmp::start_frame(synfig::ProgressCallback *callback) +{ + int w=desc.get_w(),h=desc.get_h(); + + rowspan=4*((w*(channels(pf)*8)+31)/32); + if(multi_image) + { + String newfilename(filename_sans_extension(filename) + + etl::strprintf(".%04d",imagecount) + + filename_extension(filename)); + file=fopen(newfilename.c_str(),POPEN_BINARY_WRITE_TYPE); + if(callback)callback->task(newfilename+_(" (animated)")); + } + else + { + file=fopen(filename.c_str(),POPEN_BINARY_WRITE_TYPE); + if(callback)callback->task(filename); + } + + if(!file) + { + if(callback)callback->error(_("Unable to open file")); + else synfig::error(_("Unable to open file")); + return false; + } + + synfig::BITMAPFILEHEADER fileheader; + synfig::BITMAPINFOHEADER infoheader; + + fileheader.bfType[0]='B'; + fileheader.bfType[1]='M'; + fileheader.bfSize=little_endian(sizeof(synfig::BITMAPFILEHEADER)+sizeof(synfig::BITMAPINFOHEADER)+rowspan*h); + fileheader.bfReserved1=0; + fileheader.bfReserved2=0; + fileheader.bfOffsetBits=little_endian(sizeof(synfig::BITMAPFILEHEADER)+sizeof(synfig::BITMAPINFOHEADER)-2); + + infoheader.biSize=little_endian(40); + infoheader.biWidth=little_endian(w); + infoheader.biHeight=little_endian(h); + infoheader.biPlanes=little_endian_short((short)1); + infoheader.biBitCount=little_endian_short((short)(channels(pf)*8)); + infoheader.biCompression=little_endian(0); + infoheader.biSizeImage=little_endian(0); + infoheader.biXPelsPerMeter=little_endian((int)rend_desc().get_x_res()); + infoheader.biYPelsPerMeter=little_endian((int)rend_desc().get_y_res()); // pels per meter...? + infoheader.biClrUsed=little_endian(0); + infoheader.biClrImportant=little_endian(0); + + fprintf(file,"BM"); + + if(!fwrite(&fileheader.bfSize,sizeof(synfig::BITMAPFILEHEADER)-4,1,file)) + { + if(callback)callback->error(_("Unable to write file header to file")); + else synfig::error(_("Unable to write file header to file")); + return false; + } + + if(!fwrite(&infoheader,sizeof(synfig::BITMAPINFOHEADER),1,file)) + { + if(callback)callback->error(_("Unable to write info header")); + else synfig::error(_("Unable to write info header")); + return false; + } + + delete [] buffer; + buffer=new unsigned char[rowspan]; + + delete [] color_buffer; + color_buffer=new Color[desc.get_w()]; + + return true; +} + +Color * +bmp::start_scanline(int /*scanline*/) +{ + return color_buffer; +} + +bool +bmp::end_scanline() +{ + if(!file) + return false; + + convert_color_format(buffer, color_buffer, desc.get_w(), pf, gamma()); + + if(!fwrite(buffer,1,rowspan,file)) + return false; + + return true; +} diff --git a/synfig-core/src/modules/mod_bmp/trgt_bmp.h b/synfig-core/src/modules/mod_bmp/trgt_bmp.h new file mode 100644 index 0000000..8a045c7 --- /dev/null +++ b/synfig-core/src/modules/mod_bmp/trgt_bmp.h @@ -0,0 +1,67 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_bmp.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TRGT_BMP_H +#define __SYNFIG_TRGT_BMP_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class bmp : public synfig::Target_Scanline +{ + SYNFIG_TARGET_MODULE_EXT +private: + int rowspan; + int imagecount; + bool multi_image; + FILE *file; + synfig::String filename; + unsigned char *buffer; + synfig::Color *color_buffer; + synfig::PixelFormat pf; + +public: + bmp(const char *filename); + virtual ~bmp(); + + virtual bool set_rend_desc(synfig::RendDesc *desc); + virtual bool start_frame(synfig::ProgressCallback *cb); + virtual void end_frame(); + virtual synfig::Color * start_scanline(int scanline); + virtual bool end_scanline(); + +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_bmp/unmod_bmp.nsh b/synfig-core/src/modules/mod_bmp/unmod_bmp.nsh new file mode 100644 index 0000000..1df228a --- /dev/null +++ b/synfig-core/src/modules/mod_bmp/unmod_bmp.nsh @@ -0,0 +1,8 @@ +Section "un.mod_bmp" + Delete "$INSTDIR\lib\synfig\modules\mod_bmp.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/modules/mod_dv/Makefile.am b/synfig-core/src/modules/mod_dv/Makefile.am new file mode 100644 index 0000000..bbd1f63 --- /dev/null +++ b/synfig-core/src/modules/mod_dv/Makefile.am @@ -0,0 +1,39 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +moduledir = @MODULE_DIR@ + +if WITH_LIBDV + +module_LTLIBRARIES = libmod_dv.la + +libmod_dv_la_SOURCES = \ + main.cpp \ + trgt_dv.cpp \ + trgt_dv.h + +libmod_dv_la_LDFLAGS = \ + -module \ + -no-undefined \ + -avoid-version + +libmod_dv_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ + +libmod_dv_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @SYNFIG_LIBS@ + +endif + + +EXTRA_DIST = \ + mod_dv.nsh \ + unmod_dv.nsh diff --git a/synfig-core/src/modules/mod_dv/main.cpp b/synfig-core/src/modules/mod_dv/main.cpp new file mode 100644 index 0000000..8d3abbf --- /dev/null +++ b/synfig-core/src/modules/mod_dv/main.cpp @@ -0,0 +1,54 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_dv/main.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "trgt_dv.h" +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(mod_dv) + MODULE_NAME("DV Target") + MODULE_DESCRIPTION("Provides a DV Stream target (ie: for miniDV stuff)") + MODULE_AUTHOR("Robert B. Quattlebaum") + MODULE_VERSION("1.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(mod_dv) + BEGIN_TARGETS + TARGET(dv_trgt) + END_TARGETS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mod_dv/mod_dv.nsh b/synfig-core/src/modules/mod_dv/mod_dv.nsh new file mode 100644 index 0000000..6a0967b --- /dev/null +++ b/synfig-core/src/modules/mod_dv/mod_dv.nsh @@ -0,0 +1,21 @@ +; The stuff to install +Section "mod_dv" Sec_mod_dv + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=mod_dv.dll "src\modules\mod_dv\.libs\libmod_dv.dll" + + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "mod_dv" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd + diff --git a/synfig-core/src/modules/mod_dv/trgt_dv.cpp b/synfig-core/src/modules/mod_dv/trgt_dv.cpp new file mode 100644 index 0000000..13fed5c --- /dev/null +++ b/synfig-core/src/modules/mod_dv/trgt_dv.cpp @@ -0,0 +1,290 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_dv.cpp +** \brief ppm Target Module +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_TARGET + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "trgt_dv.h" +#include +#include +#if HAVE_SYS_WAIT_H + #include +#endif +#if HAVE_IO_H + #include +#endif +#if HAVE_PROCESS_H + #include +#endif +#if HAVE_FCNTL_H + #include +#endif +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +#if defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID) + #define UNIX_PIPE_TO_PROCESSES +#else + #define WIN32_PIPE_TO_PROCESSES +#endif + +/* === G L O B A L S ======================================================= */ + +SYNFIG_TARGET_INIT(dv_trgt); +SYNFIG_TARGET_SET_NAME(dv_trgt,"dv"); +SYNFIG_TARGET_SET_EXT(dv_trgt,"dv"); +SYNFIG_TARGET_SET_VERSION(dv_trgt,"0.1"); +SYNFIG_TARGET_SET_CVS_ID(dv_trgt,"$Id$"); + +/* === M E T H O D S ======================================================= */ + + +dv_trgt::dv_trgt(const char *Filename) +{ + pid=-1; + file=NULL; + filename=Filename; + buffer=NULL; + wide_aspect=false; + color_buffer=0; + set_remove_alpha(); + +} + +dv_trgt::~dv_trgt() +{ + if(file){ +#if defined(WIN32_PIPE_TO_PROCESSES) + pclose(file); +#elif defined(UNIX_PIPE_TO_PROCESSES) + fclose(file); + int status; + waitpid(pid,&status,0); +#endif + } + file=NULL; + delete [] buffer; + delete [] color_buffer; +} + +bool +dv_trgt::set_rend_desc(RendDesc *given_desc) +{ + // Set the aspect ratio + if(wide_aspect) + { + // 16:9 Aspect + given_desc->set_wh(160,90); + + // Widescreen should be progressive scan + given_desc->set_interlaced(false); + } + else + { + // 4:3 Aspect + given_desc->set_wh(400,300); + + // We should be interlaced + given_desc->set_interlaced(true); + } + + // but the pixel res should be 720x480 + given_desc->clear_flags(),given_desc->set_wh(720,480); + + // NTSC Frame rate is 29.97 + given_desc->set_frame_rate(29.97); + + // The pipe to encodedv is PPM, which needs RGB data + //given_desc->set_pixel_format(PF_RGB); + + // Set the description + desc=*given_desc; + + return true; +} + +bool +dv_trgt::init() +{ + imagecount=desc.get_frame_start(); + +#if defined(WIN32_PIPE_TO_PROCESSES) + + string command; + + if(wide_aspect) + command=strprintf("encodedv -w 1 - > \"%s\"\n",filename.c_str()); + else + command=strprintf("encodedv - > \"%s\"\n",filename.c_str()); + + // Open the pipe to encodedv + file=popen(command.c_str(),POPEN_BINARY_WRITE_TYPE); + + if(!file) + { + synfig::error(_("Unable to open pipe to encodedv")); + return false; + } + +#elif defined(UNIX_PIPE_TO_PROCESSES) + + int p[2]; + + if (pipe(p)) { + synfig::error(_("Unable to open pipe to encodedv")); + return false; + }; + + pid_t pid = fork(); + + if (pid == -1) { + synfig::error(_("Unable to open pipe to encodedv")); + return false; + } + + if (pid == 0){ + // Child process + // Close pipeout, not needed + close(p[1]); + // Dup pipeout to stdin + if( dup2( p[0], STDIN_FILENO ) == -1 ){ + synfig::error(_("Unable to open pipe to encodedv")); + return false; + } + // Close the unneeded pipeout + close(p[0]); + // Open filename to stdout + FILE* outfile = fopen(filename.c_str(),"wb"); + if( outfile == NULL ){ + synfig::error(_("Unable to open pipe to encodedv")); + return false; + } + int outfilefd = fileno(outfile); + if( outfilefd == -1 ){ + synfig::error(_("Unable to open pipe to encodedv")); + return false; + } + if( dup2( outfilefd, STDOUT_FILENO ) == -1 ){ + synfig::error(_("Unable to open pipe to encodedv")); + return false; + } + + if(wide_aspect) + execlp("encodedv", "encodedv", "-w", "1", "-", (const char *)NULL); + else + execlp("encodedv", "encodedv", "-", (const char *)NULL); + // We should never reach here unless the exec failed + synfig::error(_("Unable to open pipe to encodedv")); + return false; + } else { + // Parent process + // Close pipein, not needed + close(p[0]); + // Save pipeout to file handle, will write to it later + file = fdopen(p[1], "wb"); + if (file == NULL) { + synfig::error(_("Unable to open pipe to encodedv")); + return false; + } + } + +#else + #error There are no known APIs for creating child processes +#endif + + + // Sleep for a moment to let the pipe catch up + etl::clock().sleep(0.25f); + + return true; +} + +void +dv_trgt::end_frame() +{ + fprintf(file, " "); + fflush(file); + imagecount++; +} + +bool +dv_trgt::start_frame(synfig::ProgressCallback */*callback*/) +{ + int w=desc.get_w(),h=desc.get_h(); + + if(!file) + return false; + + fprintf(file, "P6\n"); + fprintf(file, "%d %d\n", w, h); + fprintf(file, "%d\n", 255); + + delete [] buffer; + buffer=new unsigned char[3*w]; + + delete [] color_buffer; + color_buffer=new Color[w]; + + return true; +} + +Color * +dv_trgt::start_scanline(int /*scanline*/) +{ + return color_buffer; +} + +bool +dv_trgt::end_scanline() +{ + if(!file) + return false; + + convert_color_format(buffer, color_buffer, desc.get_w(), PF_RGB, gamma()); + + if(!fwrite(buffer,1,desc.get_w()*3,file)) + return false; + + return true; +} diff --git a/synfig-core/src/modules/mod_dv/trgt_dv.h b/synfig-core/src/modules/mod_dv/trgt_dv.h new file mode 100644 index 0000000..11ba75e --- /dev/null +++ b/synfig-core/src/modules/mod_dv/trgt_dv.h @@ -0,0 +1,71 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_dv.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TRGT_DV_H +#define __SYNFIG_TRGT_DV_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + + +class dv_trgt : public synfig::Target_Scanline +{ + SYNFIG_TARGET_MODULE_EXT +private: + pid_t pid; + int imagecount; + bool wide_aspect; + FILE *file; + synfig::String filename; + unsigned char *buffer; + synfig::Color *color_buffer; +public: + dv_trgt(const char *filename); + virtual ~dv_trgt(); + + + virtual bool set_rend_desc(synfig::RendDesc *desc); + virtual bool init(); + virtual bool start_frame(synfig::ProgressCallback *cb); + virtual void end_frame(); + + virtual synfig::Color * start_scanline(int scanline); + virtual bool end_scanline(); +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_dv/unmod_dv.nsh b/synfig-core/src/modules/mod_dv/unmod_dv.nsh new file mode 100644 index 0000000..39b1299 --- /dev/null +++ b/synfig-core/src/modules/mod_dv/unmod_dv.nsh @@ -0,0 +1,8 @@ +Section "un.mod_dv" + Delete "$INSTDIR\lib\synfig\modules\mod_dv.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/modules/mod_ffmpeg/Makefile.am b/synfig-core/src/modules/mod_ffmpeg/Makefile.am new file mode 100644 index 0000000..d67be26 --- /dev/null +++ b/synfig-core/src/modules/mod_ffmpeg/Makefile.am @@ -0,0 +1,41 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +moduledir = @MODULE_DIR@ + +if WITH_FFMPEG + +module_LTLIBRARIES = libmod_ffmpeg.la + +libmod_ffmpeg_la_SOURCES = \ + main.cpp \ + mptr_ffmpeg.cpp \ + mptr_ffmpeg.h \ + trgt_ffmpeg.cpp \ + trgt_ffmpeg.h + +libmod_ffmpeg_la_LDFLAGS = \ + -module \ + -no-undefined \ + -avoid-version + +libmod_ffmpeg_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ + +libmod_ffmpeg_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @SYNFIG_LIBS@ + +endif + + +EXTRA_DIST = \ + mod_ffmpeg.nsh \ + unmod_ffmpeg.nsh diff --git a/synfig-core/src/modules/mod_ffmpeg/main.cpp b/synfig-core/src/modules/mod_ffmpeg/main.cpp new file mode 100644 index 0000000..0f0cb82 --- /dev/null +++ b/synfig-core/src/modules/mod_ffmpeg/main.cpp @@ -0,0 +1,70 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_ffmpeg/main.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "mptr_ffmpeg.h" +#include "trgt_ffmpeg.h" +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(mod_ffmpeg) + MODULE_NAME("FFMPEG Module") + MODULE_DESCRIPTION("Provides output targets for each format that FFMPEG supports") + MODULE_AUTHOR("Robert B. Quattlebaum Jr.") + MODULE_VERSION("1.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(mod_ffmpeg) + BEGIN_TARGETS + TARGET(ffmpeg_trgt) + TARGET_EXT(ffmpeg_trgt,"avi") + TARGET_EXT(ffmpeg_trgt,"mpg") + TARGET_EXT(ffmpeg_trgt,"rm") + TARGET_EXT(ffmpeg_trgt,"asf") + TARGET_EXT(ffmpeg_trgt,"swf") + TARGET_EXT(ffmpeg_trgt,"yuv") + TARGET_EXT(ffmpeg_trgt,"rgb") + END_TARGETS + BEGIN_IMPORTERS + IMPORTER_EXT(ffmpeg_mptr,"avi") + IMPORTER_EXT(ffmpeg_mptr,"mpg") + IMPORTER_EXT(ffmpeg_mptr,"mpeg") + IMPORTER_EXT(ffmpeg_mptr,"mov") + IMPORTER_EXT(ffmpeg_mptr,"rm") + IMPORTER_EXT(ffmpeg_mptr,"dv") + END_IMPORTERS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mod_ffmpeg/mod_ffmpeg.nsh b/synfig-core/src/modules/mod_ffmpeg/mod_ffmpeg.nsh new file mode 100644 index 0000000..8a8f197 --- /dev/null +++ b/synfig-core/src/modules/mod_ffmpeg/mod_ffmpeg.nsh @@ -0,0 +1,21 @@ +; The stuff to install +Section "mod_ffmpeg" Sec_mod_ffmpeg + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=mod_ffmpeg.dll "src\modules\mod_ffmpeg\.libs\libmod_ffmpeg.dll" + + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "mod_ffmpeg" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd + diff --git a/synfig-core/src/modules/mod_ffmpeg/mptr_ffmpeg.cpp b/synfig-core/src/modules/mod_ffmpeg/mptr_ffmpeg.cpp new file mode 100644 index 0000000..f837c7b --- /dev/null +++ b/synfig-core/src/modules/mod_ffmpeg/mptr_ffmpeg.cpp @@ -0,0 +1,274 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mptr_ffmpeg.cpp +** \brief ppm Target Module +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "mptr_ffmpeg.h" +#include +#include +#if HAVE_SYS_WAIT_H + #include +#endif +#if HAVE_IO_H + #include +#endif +#if HAVE_PROCESS_H + #include +#endif +#if HAVE_FCNTL_H + #include +#endif +#include +#include +#include +#include +#include +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +#if defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID) + #define UNIX_PIPE_TO_PROCESSES +#else + #define WIN32_PIPE_TO_PROCESSES +#endif + +/* === G L O B A L S ======================================================= */ + +SYNFIG_IMPORTER_INIT(ffmpeg_mptr); +SYNFIG_IMPORTER_SET_NAME(ffmpeg_mptr,"ffmpeg"); +SYNFIG_IMPORTER_SET_EXT(ffmpeg_mptr,"avi"); +SYNFIG_IMPORTER_SET_VERSION(ffmpeg_mptr,"0.1"); +SYNFIG_IMPORTER_SET_CVS_ID(ffmpeg_mptr,"$Id$"); + +/* === M E T H O D S ======================================================= */ + +bool ffmpeg_mptr::is_animated() +{ + return true; +} + +bool +ffmpeg_mptr::seek_to(int frame) +{ + if(frame +#include +#include +#include "string.h" +#ifdef HAVE_TERMIOS_H +#include + +#endif + +#include +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class ffmpeg_mptr : public synfig::Importer +{ + SYNFIG_IMPORTER_MODULE_EXT +public: +private: + pid_t pid; + synfig::String filename; + FILE *file; + int cur_frame; + synfig::Surface frame; + float fps; +#ifdef HAVE_TERMIOS_H + struct termios oldtty; +#endif + + bool seek_to(int frame); + bool grab_frame(void); + +public: + ffmpeg_mptr(const char *filename); + ~ffmpeg_mptr(); + + virtual bool is_animated(); + + virtual bool get_frame(synfig::Surface &surface,synfig::Time time, synfig::ProgressCallback *callback); +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_ffmpeg/trgt_ffmpeg.cpp b/synfig-core/src/modules/mod_ffmpeg/trgt_ffmpeg.cpp new file mode 100644 index 0000000..5b5b2bc --- /dev/null +++ b/synfig-core/src/modules/mod_ffmpeg/trgt_ffmpeg.cpp @@ -0,0 +1,270 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_ffmpeg.cpp +** \brief ppm Target Module +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_TARGET + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "trgt_ffmpeg.h" +#include +#include +#if HAVE_SYS_WAIT_H + #include +#endif +#if HAVE_IO_H + #include +#endif +#if HAVE_PROCESS_H + #include +#endif +#if HAVE_FCNTL_H + #include +#endif +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +#if defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID) + #define UNIX_PIPE_TO_PROCESSES +#else + #define WIN32_PIPE_TO_PROCESSES +#endif + +/* === G L O B A L S ======================================================= */ + +SYNFIG_TARGET_INIT(ffmpeg_trgt); +SYNFIG_TARGET_SET_NAME(ffmpeg_trgt,"ffmpeg"); +SYNFIG_TARGET_SET_EXT(ffmpeg_trgt,"mpg"); +SYNFIG_TARGET_SET_VERSION(ffmpeg_trgt,"0.1"); +SYNFIG_TARGET_SET_CVS_ID(ffmpeg_trgt,"$Id$"); + +/* === M E T H O D S ======================================================= */ + +ffmpeg_trgt::ffmpeg_trgt(const char *Filename) +{ + pid=-1; + file=NULL; + filename=Filename; + multi_image=false; + buffer=NULL; + color_buffer=0; + set_remove_alpha(); +} + +ffmpeg_trgt::~ffmpeg_trgt() +{ + if(file) + { + etl::yield(); + sleep(1); +#if defined(WIN32_PIPE_TO_PROCESSES) + pclose(file); +#elif defined(UNIX_PIPE_TO_PROCESSES) + fclose(file); + int status; + waitpid(pid,&status,0); +#endif + } + file=NULL; + delete [] buffer; + delete [] color_buffer; +} + +bool +ffmpeg_trgt::set_rend_desc(RendDesc *given_desc) +{ + //given_desc->set_pixel_format(PF_RGB); + + // Make sure that the width and height + // are multiples of 8 + given_desc->set_w((given_desc->get_w()+4)/8*8); + given_desc->set_h((given_desc->get_h()+4)/8*8); + + /* + // Valid framerates: + // 23.976, 24, 25, 29.97, 30, 50 ,59.94, 60 + float fps=given_desc->get_frame_rate(); + if(fps <24.0) + given_desc->set_frame_rate(23.976); + if(fps>=24.0 && fps <25.0) + given_desc->set_frame_rate(24); + if(fps>=25.0 && fps <29.97) + given_desc->set_frame_rate(25); + if(fps>=29.97 && fps <30.0) + given_desc->set_frame_rate(29.97); + if(fps>=29.97 && fps <30.0) + given_desc->set_frame_rate(29.97); + if(fps>=30.0 && fps <50.0) + given_desc->set_frame_rate(30.0); + if(fps>=50.0 && fps <59.94) + given_desc->set_frame_rate(50); + if(fps>=59.94) + given_desc->set_frame_rate(59.94); + */ + + desc=*given_desc; + + return true; +} + +bool +ffmpeg_trgt::init() +{ + imagecount=desc.get_frame_start(); + if(desc.get_frame_end()-desc.get_frame_start()>0) + multi_image=true; + +#if defined(WIN32_PIPE_TO_PROCESSES) + + string command; + + if( filename.c_str()[0] == '-' ) + command=strprintf("ffmpeg -f image2pipe -vcodec ppm -an -r %f -i pipe: -loop -hq -title \"%s\" -vcodec mpeg1video -y -- \"%s\"\n",desc.get_frame_rate(),get_canvas()->get_name().c_str(),filename.c_str()); + else + command=strprintf("ffmpeg -f image2pipe -vcodec ppm -an -r %f -i pipe: -loop -hq -title \"%s\" -vcodec mpeg1video -y \"%s\"\n",desc.get_frame_rate(),get_canvas()->get_name().c_str(),filename.c_str()); + + file=popen(command.c_str(),POPEN_BINARY_WRITE_TYPE); + +#elif defined(UNIX_PIPE_TO_PROCESSES) + + int p[2]; + + if (pipe(p)) { + synfig::error(_("Unable to open pipe to ffmpeg")); + return false; + }; + + pid = fork(); + + if (pid == -1) { + synfig::error(_("Unable to open pipe to ffmpeg")); + return false; + } + + if (pid == 0){ + // Child process + // Close pipeout, not needed + close(p[1]); + // Dup pipeout to stdin + if( dup2( p[0], STDIN_FILENO ) == -1 ){ + synfig::error(_("Unable to open pipe to ffmpeg")); + return false; + } + // Close the unneeded pipeout + close(p[0]); + if( filename.c_str()[0] == '-' ) + execlp("ffmpeg", "ffmpeg", "-f", "image2pipe", "-vcodec", "ppm", "-an", "-r", strprintf("%f", desc.get_frame_rate()).c_str(), "-i", "pipe:", "-loop", "-hq", "-title", get_canvas()->get_name().c_str(), "-vcodec", "mpeg1video", "-y", "--", filename.c_str(), (const char *)NULL); + else + execlp("ffmpeg", "ffmpeg", "-f", "image2pipe", "-vcodec", "ppm", "-an", "-r", strprintf("%f", desc.get_frame_rate()).c_str(), "-i", "pipe:", "-loop", "-hq", "-title", get_canvas()->get_name().c_str(), "-vcodec", "mpeg1video", "-y", filename.c_str(), (const char *)NULL); + // We should never reach here unless the exec failed + synfig::error(_("Unable to open pipe to ffmpeg")); + return false; + } else { + // Parent process + // Close pipein, not needed + close(p[0]); + // Save pipeout to file handle, will write to it later + file = fdopen(p[1], "wb"); + } + +#else + #error There are no known APIs for creating child processes +#endif + + // etl::yield(); + + if(!file) + { + synfig::error(_("Unable to open pipe to ffmpeg")); + return false; + } + + return true; +} + +void +ffmpeg_trgt::end_frame() +{ + //fprintf(file, " "); + fflush(file); + imagecount++; +} + +bool +ffmpeg_trgt::start_frame(synfig::ProgressCallback */*callback*/) +{ + int w=desc.get_w(),h=desc.get_h(); + + if(!file) + return false; + + fprintf(file, "P6\n"); + fprintf(file, "%d %d\n", w, h); + fprintf(file, "%d\n", 255); + + delete [] buffer; + buffer=new unsigned char[3*w]; + delete [] color_buffer; + color_buffer=new Color[w]; + + return true; +} + +Color * +ffmpeg_trgt::start_scanline(int /*scanline*/) +{ + return color_buffer; +} + +bool +ffmpeg_trgt::end_scanline() +{ + if(!file) + return false; + + convert_color_format(buffer, color_buffer, desc.get_w(), PF_RGB, gamma()); + + if(!fwrite(buffer,1,desc.get_w()*3,file)) + return false; + + return true; +} diff --git a/synfig-core/src/modules/mod_ffmpeg/trgt_ffmpeg.h b/synfig-core/src/modules/mod_ffmpeg/trgt_ffmpeg.h new file mode 100644 index 0000000..c5fc1ae --- /dev/null +++ b/synfig-core/src/modules/mod_ffmpeg/trgt_ffmpeg.h @@ -0,0 +1,70 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_ffmpeg.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TRGT_FFMPEG_H +#define __SYNFIG_TRGT_FFMPEG_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class ffmpeg_trgt : public synfig::Target_Scanline +{ + SYNFIG_TARGET_MODULE_EXT +private: + pid_t pid; + int imagecount; + bool multi_image; + FILE *file; + synfig::String filename; + unsigned char *buffer; + synfig::Color *color_buffer; +public: + ffmpeg_trgt(const char *filename); + + virtual bool set_rend_desc(synfig::RendDesc *desc); + virtual bool init(); + virtual bool start_frame(synfig::ProgressCallback *cb); + virtual void end_frame(); + + virtual ~ffmpeg_trgt(); + + virtual synfig::Color * start_scanline(int scanline); + virtual bool end_scanline(); +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_ffmpeg/unmod_ffmpeg.nsh b/synfig-core/src/modules/mod_ffmpeg/unmod_ffmpeg.nsh new file mode 100644 index 0000000..09ed59b --- /dev/null +++ b/synfig-core/src/modules/mod_ffmpeg/unmod_ffmpeg.nsh @@ -0,0 +1,8 @@ +Section "un.mod_ffmpeg" + Delete "$INSTDIR\lib\synfig\modules\mod_ffmpeg.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/modules/mod_filter/Makefile.am b/synfig-core/src/modules/mod_filter/Makefile.am new file mode 100644 index 0000000..45f06e1 --- /dev/null +++ b/synfig-core/src/modules/mod_filter/Makefile.am @@ -0,0 +1,46 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +moduledir = @MODULE_DIR@ + +module_LTLIBRARIES = libmod_filter.la + +libmod_filter_la_SOURCES = \ + blur.cpp \ + blur.h \ + colorcorrect.cpp \ + colorcorrect.h \ + halftone2.cpp \ + halftone2.h \ + lumakey.cpp \ + lumakey.h \ + radialblur.cpp \ + radialblur.h \ + main.cpp \ + halftone.cpp \ + halftone.h \ + halftone3.cpp \ + halftone3.h + +libmod_filter_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ + +libmod_filter_la_LIBADD = \ + ../../synfig/libsynfig.la @SYNFIG_LIBS@ + +libmod_filter_la_LDFLAGS = \ + -module \ + -no-undefined \ + -avoid-version + + +EXTRA_DIST = \ + mod_filter.nsh \ + unmod_filter.nsh diff --git a/synfig-core/src/modules/mod_filter/blur.cpp b/synfig-core/src/modules/mod_filter/blur.cpp new file mode 100644 index 0000000..e5104b0 --- /dev/null +++ b/synfig-core/src/modules/mod_filter/blur.cpp @@ -0,0 +1,268 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_filter/blur.cpp +** \brief Implementation of the "Blur" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "blur.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#endif + +using namespace synfig; +using namespace etl; +using namespace std; + +/*#define TYPE_BOX 0 +#define TYPE_FASTGUASSIAN 1 +#define TYPE_FASTGAUSSIAN 1 +#define TYPE_CROSS 2 +#define TYPE_GUASSIAN 3 +#define TYPE_GAUSSIAN 3 +#define TYPE_DISC 4 +*/ + +/* -- G L O B A L S --------------------------------------------------------- */ + +SYNFIG_LAYER_INIT(Blur_Layer); +SYNFIG_LAYER_SET_NAME(Blur_Layer,"blur"); +SYNFIG_LAYER_SET_LOCAL_NAME(Blur_Layer,N_("Blur")); +SYNFIG_LAYER_SET_CATEGORY(Blur_Layer,N_("Blurs")); +SYNFIG_LAYER_SET_VERSION(Blur_Layer,"0.2"); +SYNFIG_LAYER_SET_CVS_ID(Blur_Layer,"$Id$"); + +/* -- F U N C T I O N S ----------------------------------------------------- */ + +inline void clamp(synfig::Vector &v) +{ + if(v[0]<0.0)v[0]=0.0; + if(v[1]<0.0)v[1]=0.0; +} + +Blur_Layer::Blur_Layer(): + Layer_Composite (1.0,Color::BLEND_STRAIGHT), + size(0.1,0.1), + type(Blur::FASTGAUSSIAN) +{ +} + +bool +Blur_Layer::set_param(const String ¶m, const ValueBase &value) +{ + IMPORT_PLUS(size,clamp(size)); + IMPORT(type); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +Blur_Layer::get_param(const String ¶m)const +{ + EXPORT(size); + EXPORT(type); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Color +Blur_Layer::get_color(Context context, const Point &pos)const +{ + Point blurpos = Blur(size,type)(pos); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + return context.get_color(blurpos); + + if(get_amount()==0.0) + return context.get_color(pos); + + return Color::blend(context.get_color(blurpos),context.get_color(pos),get_amount(),get_blend_method()); +} + +bool +Blur_Layer::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + // don't do anything at quality 10 + if (quality == 10) + return context.accelerated_render(surface,quality,renddesc,cb); + + // int x,y; + SuperCallback stageone(cb,0,5000,10000); + SuperCallback stagetwo(cb,5000,10000,10000); + + const int w = renddesc.get_w(), + h = renddesc.get_h(); + const Real pw = renddesc.get_pw(), + ph = renddesc.get_ph(); + + RendDesc workdesc(renddesc); + Surface worksurface,blurred; + + //callbacks depend on how long the blur takes + if(size[0] || size[1]) + { + if(type == Blur::DISC) + { + stageone = SuperCallback(cb,0,5000,10000); + stagetwo = SuperCallback(cb,5000,10000,10000); + } + else + { + stageone = SuperCallback(cb,0,9000,10000); + stagetwo = SuperCallback(cb,9000,10000,10000); + } + } + else + { + stageone = SuperCallback(cb,0,9999,10000); + stagetwo = SuperCallback(cb,9999,10000,10000); + } + + //expand the working surface to accommodate the blur + + //the expanded size = 1/2 the size in each direction rounded up + int halfsizex = (int) (abs(size[0]*.5/pw) + 3), + halfsizey = (int) (abs(size[1]*.5/ph) + 3); + + //expand by 1/2 size in each direction on either side + switch(type) + { + case Blur::DISC: + case Blur::BOX: + case Blur::CROSS: + { + workdesc.set_subwindow(-max(1,halfsizex),-max(1,halfsizey),w+2*max(1,halfsizex),h+2*max(1,halfsizey)); + break; + } + case Blur::FASTGAUSSIAN: + { + if(quality < 4) + { + halfsizex*=2; + halfsizey*=2; + } + workdesc.set_subwindow(-max(1,halfsizex),-max(1,halfsizey),w+2*max(1,halfsizex),h+2*max(1,halfsizey)); + break; + } + case Blur::GAUSSIAN: + { + #define GAUSSIAN_ADJUSTMENT (0.05) + Real pw = (Real)workdesc.get_w()/(workdesc.get_br()[0]-workdesc.get_tl()[0]); + Real ph = (Real)workdesc.get_h()/(workdesc.get_br()[1]-workdesc.get_tl()[1]); + + pw=pw*pw; + ph=ph*ph; + + halfsizex = (int)(abs(pw)*size[0]*GAUSSIAN_ADJUSTMENT+0.5); + halfsizey = (int)(abs(ph)*size[1]*GAUSSIAN_ADJUSTMENT+0.5); + + halfsizex = (halfsizex + 1)/2; + halfsizey = (halfsizey + 1)/2; + workdesc.set_subwindow( -halfsizex, -halfsizey, w+2*halfsizex, h+2*halfsizey ); + + break; + } + } + + //render the background onto the expanded surface + if(!context.accelerated_render(&worksurface,quality,workdesc,&stageone)) + return false; + + //blur the image + Blur(size,type,&stagetwo)(worksurface,workdesc.get_br()-workdesc.get_tl(),blurred); + + //be sure the surface is of the correct size + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + + { + Surface::pen pen(surface->begin()); + worksurface.blit_to(pen,halfsizex,halfsizey,renddesc.get_w(),renddesc.get_h()); + } + { + Surface::alpha_pen pen(surface->begin()); + pen.set_alpha(get_amount()); + pen.set_blend_method(get_blend_method()); + blurred.blit_to(pen,halfsizex,halfsizey,renddesc.get_w(),renddesc.get_h()); + } + if(cb && !cb->amount_complete(10000,10000)) + { + //if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); + return false; + } + + return true; +} + +Layer::Vocab +Blur_Layer::get_param_vocab(void)const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("size") + .set_local_name(_("Size")) + .set_description(_("Size of Blur")) + ); + ret.push_back(ParamDesc("type") + .set_local_name(_("Type")) + .set_description(_("Type of blur to use")) + .set_hint("enum") + .add_enum_value(Blur::BOX,"box",_("Box Blur")) + .add_enum_value(Blur::FASTGAUSSIAN,"fastgaussian",_("Fast Gaussian Blur")) + .add_enum_value(Blur::CROSS,"cross",_("Cross-Hatch Blur")) + .add_enum_value(Blur::GAUSSIAN,"gaussian",_("Gaussian Blur")) + .add_enum_value(Blur::DISC,"disc",_("Disc Blur")) + ); + + return ret; +} + +Rect +Blur_Layer::get_full_bounding_rect(Context context)const +{ + if(is_disabled() || Color::is_onto(get_blend_method())) + return context.get_full_bounding_rect(); + + Rect bounds(context.get_full_bounding_rect().expand_x(size[0]).expand_y(size[1])); + + return bounds; +} diff --git a/synfig-core/src/modules/mod_filter/blur.h b/synfig-core/src/modules/mod_filter/blur.h new file mode 100644 index 0000000..cfe8a2f --- /dev/null +++ b/synfig-core/src/modules/mod_filter/blur.h @@ -0,0 +1,68 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_filter/blur.h +** \brief Header file for implementation of the "Blur" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifndef __SYNFIG_LAYER_BLUR_H__ +#define __SYNFIG_LAYER_BLUR_H__ + +/* -- H E A D E R S --------------------------------------------------------- */ + +#include +#include +#include +#include + +using namespace synfig; +using namespace std; +using namespace etl; + +class Blur_Layer : public synfig::Layer_Composite +{ + SYNFIG_LAYER_MODULE_EXT +private: + synfig::Point size; + int type; + +public: + Blur_Layer(); + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + + virtual ValueBase get_param(const String & param)const; + + virtual Color get_color(Context context, const Point &pos)const; + + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + virtual synfig::Rect get_full_bounding_rect(Context context)const; + + virtual Vocab get_param_vocab()const; + + virtual bool reads_context()const { return true; } +}; // END of class Blur + +/* -- E X T E R N S --------------------------------------------------------- */ + +/* -- E N D ----------------------------------------------------------------- */ + +#endif diff --git a/synfig-core/src/modules/mod_filter/colorcorrect.cpp b/synfig-core/src/modules/mod_filter/colorcorrect.cpp new file mode 100644 index 0000000..3a0468e --- /dev/null +++ b/synfig-core/src/modules/mod_filter/colorcorrect.cpp @@ -0,0 +1,258 @@ +/* === S Y N F I G ========================================================= */ +/*! \file colorcorrect.cpp +** \brief Implementation of the "Color Correct" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "colorcorrect.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace etl; +using namespace std; +using namespace synfig; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Layer_ColorCorrect); +SYNFIG_LAYER_SET_NAME(Layer_ColorCorrect,"colorcorrect"); +SYNFIG_LAYER_SET_LOCAL_NAME(Layer_ColorCorrect,N_("Color Correct")); +SYNFIG_LAYER_SET_CATEGORY(Layer_ColorCorrect,N_("Filters")); +SYNFIG_LAYER_SET_VERSION(Layer_ColorCorrect,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Layer_ColorCorrect,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +Layer_ColorCorrect::Layer_ColorCorrect(): + hue_adjust(Angle::zero()), + brightness(0), + contrast(1.0), + exposure(0.0) +{ +} + +inline Color +Layer_ColorCorrect::correct_color(const Color &in)const +{ + Color ret(in); + Real brightness((this->brightness-0.5)*this->contrast+0.5); + + if(gamma.get_gamma_r()!=1.0) + { + if(ret.get_r() < 0) + { + ret.set_r(-gamma.r_F32_to_F32(-ret.get_r())); + }else + { + ret.set_r(gamma.r_F32_to_F32(ret.get_r())); + } + } + if(gamma.get_gamma_g()!=1.0) + { + if(ret.get_g() < 0) + { + ret.set_g(-gamma.g_F32_to_F32(-ret.get_g())); + }else + { + ret.set_g(gamma.g_F32_to_F32(ret.get_g())); + } + } + if(gamma.get_gamma_b()!=1.0) + { + if(ret.get_b() < 0) + { + ret.set_b(-gamma.b_F32_to_F32(-ret.get_b())); + }else + { + ret.set_b(gamma.b_F32_to_F32(ret.get_b())); + } + } + + assert(!isnan(ret.get_r())); + assert(!isnan(ret.get_g())); + assert(!isnan(ret.get_b())); + + if(exposure!=0.0) + { + const float factor(exp(exposure)); + ret.set_r(ret.get_r()*factor); + ret.set_g(ret.get_g()*factor); + ret.set_b(ret.get_b()*factor); + } + + // Adjust Contrast + if(contrast!=1.0) + { + ret.set_r(ret.get_r()*contrast); + ret.set_g(ret.get_g()*contrast); + ret.set_b(ret.get_b()*contrast); + } + + if(brightness) + { + // Adjust R Channel Brightness + if(ret.get_r()>-brightness) + ret.set_r(ret.get_r()+brightness); + else if(ret.get_r()-brightness) + ret.set_g(ret.get_g()+brightness); + else if(ret.get_g()-brightness) + ret.set_b(ret.get_b()+brightness); + else if(ret.get_b()begin()); + + for(y=0;yamount_complete(10000,10000)) + return false; + + return true; +} + +Rect +Layer_ColorCorrect::get_full_bounding_rect(Context context)const +{ + return context.get_full_bounding_rect(); +} diff --git a/synfig-core/src/modules/mod_filter/colorcorrect.h b/synfig-core/src/modules/mod_filter/colorcorrect.h new file mode 100644 index 0000000..8617e4c --- /dev/null +++ b/synfig-core/src/modules/mod_filter/colorcorrect.h @@ -0,0 +1,79 @@ +/* === S Y N F I G ========================================================= */ +/*! \file colorcorrect.h +** \brief Header file for implementation of the "Color Correct" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_LAYER_COLORCORRECT_H +#define __SYNFIG_LAYER_COLORCORRECT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class Layer_ColorCorrect : public Layer +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + Angle hue_adjust; + Real brightness; + Real contrast; + Real exposure; + + Gamma gamma; + + Color correct_color(const Color &in)const; + +public: + + Layer_ColorCorrect(); + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + + virtual ValueBase get_param(const String & param)const; + + virtual Color get_color(Context context, const Point &pos)const; + + virtual Rect get_full_bounding_rect(Context context)const; + + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + + virtual Vocab get_param_vocab()const; +}; // END of class Layer_ColorCorrect + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_filter/halftone.cpp b/synfig-core/src/modules/mod_filter/halftone.cpp new file mode 100644 index 0000000..8e8ba9e --- /dev/null +++ b/synfig-core/src/modules/mod_filter/halftone.cpp @@ -0,0 +1,168 @@ +/* === S Y N F I G ========================================================= */ +/*! \file halftone.cpp +** \brief blehh +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "halftone.h" + +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + + +/* === P R O C E D U R E S ================================================= */ + +#define SQRT2 (1.414213562f) + +/* === M E T H O D S ======================================================= */ + +float +Halftone::operator()(const Point &point, const float& luma, float supersample)const +{ + float halftone(mask(point)); + + if(supersample>=0.5f) + supersample=0.4999999999f; + + halftone=(halftone-0.5f)*(1.0f-supersample*2.0f)+0.5f; + + const float diff(halftone-luma); + + if(supersample) + { + const float amount(diff/(supersample*2.0f)+0.5f); + + if(amount<=0.0f+0.01f) + return 1.0f; + else if(amount>=1.0f-0.01f) + return 0.0f; + else + return 1.0f-amount; + } + else + { + if(diff>=0) + return 0.0f; + else + return 1.0f; + } + + return 0.0f; +} + +float +Halftone::mask(synfig::Point point)const +{ + float radius1; + float radius2; + + point-=origin; + + { + const float a(Angle::sin(-angle).get()), b(Angle::cos(-angle).get()); + const float u(point[0]),v(point[1]); + + point[0]=b*u-a*v; + point[1]=a*u+b*v; + } + + if(type==TYPE_STRIPE) + { + Point pnt(fmod(point[0],size[0]),fmod(point[1],size[1])); + while(pnt[0]<0)pnt[0]+=abs(size[0]); + while(pnt[1]<0)pnt[1]+=abs(size[1]); + + float x(pnt[1]/size[1]); + if(x>0.5)x=1.0-x; + x*=2; + return x; + } + + { + Point pnt(fmod(point[0],size[0]),fmod(point[1],size[1])); + while(pnt[0]<0)pnt[0]+=abs(size[0]); + while(pnt[1]<0)pnt[1]+=abs(size[1]); + pnt-=Vector(size[0]*0.5,size[1]*0.5); + pnt*=2.0; + pnt[0]/=size[0]; + pnt[1]/=size[1]; + + radius1=pnt.mag()/SQRT2; + radius1*=radius1; + } + if(type==TYPE_DARKONLIGHT || type== TYPE_LIGHTONDARK) + return radius1; + + { + Point pnt(fmod(point[0]+size[0]*0.5,size[0]),fmod(point[1]+size[0]*0.5,size[1])); + while(pnt[0]<0)pnt[0]+=abs(size[0]); + while(pnt[1]<0)pnt[1]+=abs(size[1]); + pnt-=Vector(size[0]*0.5,size[1]*0.5); + pnt*=2.0; + pnt[0]/=size[0]; + pnt[1]/=size[1]; + + radius2=pnt.mag()/SQRT2; + radius2*=radius2; + } + + if(type==TYPE_DIAMOND) + { + //return (radius1+(1.0f-radius2))*0.5; + float x((radius1+(1.0f-radius2))*0.5); + //float x(((radius2-radius1)*((radius1+(1.0f-radius2))*0.5)+radius1)*2.0f); + x-=0.5; + x*=2.0; + if(x<0)x=-sqrt(-x);else x=sqrt(x); + x*=1.01f; + x/=2.0; + x+=0.5; + return x; + } + + if(type==TYPE_SYMMETRIC) + { + float x(((radius2-radius1)*((radius1+(1.0f-radius2))*0.5)+radius1)*2.0f); + x-=0.5; + x*=2.0; + if(x<0)x=-sqrt(-x);else x=sqrt(x); + x*=1.01f; + x/=2.0; + x+=0.5; + return x; + } + return 0; +} diff --git a/synfig-core/src/modules/mod_filter/halftone.h b/synfig-core/src/modules/mod_filter/halftone.h new file mode 100644 index 0000000..c75df2c --- /dev/null +++ b/synfig-core/src/modules/mod_filter/halftone.h @@ -0,0 +1,62 @@ +/* === S Y N F I G ========================================================= */ +/*! \file halftone.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_HALFTONE_H +#define __SYNFIG_HALFTONE_H + +/* === H E A D E R S ======================================================= */ + +#include +#include + +/* === M A C R O S ========================================================= */ + +#define TYPE_SYMMETRIC 0 +#define TYPE_DARKONLIGHT 1 +#define TYPE_LIGHTONDARK 2 +#define TYPE_DIAMOND 3 +#define TYPE_STRIPE 4 + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class Halftone +{ +public: + + int type; + synfig::Point origin; + synfig::Vector size; + synfig::Angle angle; + + float mask(synfig::Point point)const; + + float operator()(const synfig::Point &point, const float& intensity, float supersample=0)const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_filter/halftone2.cpp b/synfig-core/src/modules/mod_filter/halftone2.cpp new file mode 100644 index 0000000..177f6a0 --- /dev/null +++ b/synfig-core/src/modules/mod_filter/halftone2.cpp @@ -0,0 +1,245 @@ +/* === S Y N F I G ========================================================= */ +/*! \file halftone2.cpp +** \brief Implementation of the "Halftone 2" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007-2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "halftone2.h" +#include "halftone.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Halftone2); +SYNFIG_LAYER_SET_NAME(Halftone2,"halftone2"); +SYNFIG_LAYER_SET_LOCAL_NAME(Halftone2,N_("Halftone 2")); +SYNFIG_LAYER_SET_CATEGORY(Halftone2,N_("Filters")); +SYNFIG_LAYER_SET_VERSION(Halftone2,"0.0"); +SYNFIG_LAYER_SET_CVS_ID(Halftone2,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +Halftone2::Halftone2(): + color_dark(Color::black()), + color_light(Color::white()) +{ + halftone.origin=(synfig::Point(0,0)); + halftone.size=(synfig::Vector(0.25,0.25)); + halftone.angle=(Angle::zero()); + halftone.type=TYPE_SYMMETRIC; + + set_blend_method(Color::BLEND_STRAIGHT); +} + +inline Color +Halftone2::color_func(const Point &point, float supersample,const Color& color)const +{ + const float amount(halftone(point,color.get_y(),supersample)); + Color halfcolor; + + if(amount<=0.0f) + halfcolor=color_dark; + else if(amount>=1.0f) + halfcolor=color_light; + else + halfcolor=Color::blend(color_light,color_dark,amount,Color::BLEND_STRAIGHT); + + halfcolor.set_a(color.get_a()); + + return halfcolor; +} + +inline float +Halftone2::calc_supersample(const synfig::Point &/*x*/, float pw,float /*ph*/)const +{ + return abs(pw/(halftone.size).mag()); +} + +synfig::Layer::Handle +Halftone2::hit_check(synfig::Context /*context*/, const synfig::Point &/*point*/)const +{ + return const_cast(this); +} + +bool +Halftone2::set_param(const String & param, const ValueBase &value) +{ + IMPORT(color_dark); + IMPORT(color_light); + + IMPORT_AS(halftone.size,"size"); + IMPORT_AS(halftone.type,"type"); + IMPORT_AS(halftone.angle,"angle"); + IMPORT_AS(halftone.origin,"origin"); + + IMPORT_AS(halftone.origin,"offset"); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +Halftone2::get_param(const String & param)const +{ + EXPORT_AS(halftone.size,"size"); + EXPORT_AS(halftone.type,"type"); + EXPORT_AS(halftone.angle,"angle"); + EXPORT_AS(halftone.origin,"origin"); + + EXPORT(color_dark); + EXPORT(color_light); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +Halftone2::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("origin") + .set_local_name(_("Mask Origin")) + .set_is_distance() + ); + ret.push_back(ParamDesc("angle") + .set_local_name(_("Mask Angle")) + .set_origin("origin") + ); + ret.push_back(ParamDesc("size") + .set_local_name(_("Mask Size")) + .set_is_distance() + .set_origin("origin") + ); + ret.push_back(ParamDesc("color_light") + .set_local_name(_("Light Color")) + ); + ret.push_back(ParamDesc("color_dark") + .set_local_name(_("Dark Color")) + ); + ret.push_back(ParamDesc("type") + .set_local_name(_("Type")) + .set_hint("enum") + .add_enum_value(TYPE_SYMMETRIC,"symmetric",_("Symmetric")) + .add_enum_value(TYPE_LIGHTONDARK,"lightondark",_("Light On Dark")) + //.add_enum_value(TYPE_DARKONLIGHT,"darkonlight",_("Dark on Light")) + .add_enum_value(TYPE_DIAMOND,"diamond",_("Diamond")) + .add_enum_value(TYPE_STRIPE,"stripe",_("Stripe")) + ); + + return ret; +} + +Color +Halftone2::get_color(Context context, const Point &point)const +{ + const Color undercolor(context.get_color(point)); + const Color color(color_func(point,0,undercolor)); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + return color; + else + return Color::blend(color,undercolor,get_amount(),get_blend_method()); +} + +bool +Halftone2::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + SuperCallback supercb(cb,0,9500,10000); + + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + return false; + if(get_amount()==0) + return true; + + const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); + const Point tl(renddesc.get_tl()); + const int w(surface->get_w()); + const int h(surface->get_h()); + const float supersample_size(abs(pw/(halftone.size).mag())); + + Surface::pen pen(surface->begin()); + Point pos; + int x,y; + + if(is_solid_color()) + { + for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) + return false; + + return true; +} diff --git a/synfig-core/src/modules/mod_filter/halftone2.h b/synfig-core/src/modules/mod_filter/halftone2.h new file mode 100644 index 0000000..b799bb4 --- /dev/null +++ b/synfig-core/src/modules/mod_filter/halftone2.h @@ -0,0 +1,74 @@ +/* === S Y N F I G ========================================================= */ +/*! \file halftone2.h +** \brief Header file for implementation of the "Halftone 2" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_HALFTONE2_H +#define __SYNFIG_HALFTONE2_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include "halftone.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class Halftone2 : public synfig::Layer_Composite +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + Halftone halftone; + synfig::Color color_dark; + synfig::Color color_light; + + synfig::Color color_func(const synfig::Point &x, float supersample,const synfig::Color &under_color)const; + + float calc_supersample(const synfig::Point &x, float pw,float ph)const; + + //float halftone_func(synfig::Point x)const; + +public: + Halftone2(); + + virtual bool set_param(const synfig::String ¶m, const synfig::ValueBase &value); + virtual synfig::ValueBase get_param(const synfig::String ¶m)const; + virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; + virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + virtual Vocab get_param_vocab()const; + virtual bool reads_context()const { return true; } +}; // END of class Halftone2 + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_filter/halftone3.cpp b/synfig-core/src/modules/mod_filter/halftone3.cpp new file mode 100644 index 0000000..a2a4283 --- /dev/null +++ b/synfig-core/src/modules/mod_filter/halftone3.cpp @@ -0,0 +1,408 @@ +/* === S Y N F I G ========================================================= */ +/*! \file halftone3.cpp +** \brief Implementation of the "Halftone 3" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007-2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "halftone3.h" +#include "halftone.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Halftone3); +SYNFIG_LAYER_SET_NAME(Halftone3,"halftone3"); +SYNFIG_LAYER_SET_LOCAL_NAME(Halftone3,N_("Halftone 3")); +SYNFIG_LAYER_SET_CATEGORY(Halftone3,N_("Filters")); +SYNFIG_LAYER_SET_VERSION(Halftone3,"0.0"); +SYNFIG_LAYER_SET_CVS_ID(Halftone3,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +#define HALFSQRT2 (0.7) +#define SQRT2 (1.414213562f) + +/* === M E T H O D S ======================================================= */ + +Halftone3::Halftone3() +{ + size=(synfig::Vector(0.25,0.25)); + type=TYPE_SYMMETRIC; + + for(int i=0;i<3;i++) + { + tone[i].size=size; + tone[i].type=type; + tone[i].origin=(synfig::Point(0,0)); + tone[i].angle=Angle::deg(30.0)*(float)i; + } + + subtractive=true; + + if(subtractive) + { + color[0]=Color::cyan(); + color[1]=Color::magenta(); + color[2]=Color::yellow(); + } + else + { + color[0]=Color::red(); + color[1]=Color::green(); + color[2]=Color::blue(); + } + + set_blend_method(Color::BLEND_STRAIGHT); + + for(int i=0;i<3;i++) + for(int j=0;j<3;j++) + inverse_matrix[i][j]=(j==i)?1.0f:0.0f; + + sync(); +} + +void +Halftone3::sync() +{ + for(int i=0;i<3;i++) + { + tone[i].size=size; + tone[i].type=type; + } + +#define matrix inverse_matrix + //float matrix[3][3]; + + if(subtractive) + { + for(int i=0;i<3;i++) + { + matrix[i][0]=1.0f-(color[i].get_r()); + matrix[i][1]=1.0f-(color[i].get_g()); + matrix[i][2]=1.0f-(color[i].get_b()); + float mult=sqrt(matrix[i][0]*matrix[i][0]+matrix[i][1]*matrix[i][1]+matrix[i][2]*matrix[i][2]); + if(mult) + { + matrix[i][0]/=mult; + matrix[i][1]/=mult; + matrix[i][2]/=mult; + matrix[i][0]/=mult; + matrix[i][1]/=mult; + matrix[i][2]/=mult; + } + } + } + else + { + for(int i=0;i<3;i++) + { + matrix[i][0]=color[i].get_r(); + matrix[i][1]=color[i].get_g(); + matrix[i][2]=color[i].get_b(); + float mult=sqrt(matrix[i][0]*matrix[i][0]+matrix[i][1]*matrix[i][1]+matrix[i][2]*matrix[i][2]); + if(mult) + { + matrix[i][0]/=mult; + matrix[i][1]/=mult; + matrix[i][2]/=mult; + matrix[i][0]/=mult; + matrix[i][1]/=mult; + matrix[i][2]/=mult; + } + } + } +#undef matrix + + + +#if 0 + // Insert guass-jordan elimination code here + int k=0,i=0,j=0,z_size=3; +#define A inverse_matrix + + for (k=0;k(this); +} + +bool +Halftone3::set_param(const String & param, const ValueBase &value) +{ + IMPORT_PLUS(size, {tone[0].size=size; tone[1].size=size; tone[2].size=size;}); + IMPORT_PLUS(type, {tone[0].type=type; tone[1].type=type; tone[2].type=type;}); + + IMPORT_PLUS(color[0],sync()); + IMPORT_PLUS(color[1],sync()); + IMPORT_PLUS(color[2],sync()); + + IMPORT_PLUS(subtractive,sync()); + + IMPORT(tone[0].angle); + IMPORT(tone[0].origin); + + IMPORT(tone[1].angle); + IMPORT(tone[1].origin); + + IMPORT(tone[2].angle); + IMPORT(tone[2].origin); + + IMPORT_AS(tone[0].origin,"tone[0].offset"); + IMPORT_AS(tone[1].origin,"tone[1].offset"); + IMPORT_AS(tone[2].origin,"tone[2].offset"); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +Halftone3::get_param(const String & param)const +{ + EXPORT(size); + EXPORT(type); + + EXPORT(color[0]); + EXPORT(color[1]); + EXPORT(color[2]); + + EXPORT(subtractive); + + EXPORT(tone[0].angle); + EXPORT(tone[0].origin); + + EXPORT(tone[1].angle); + EXPORT(tone[1].origin); + + EXPORT(tone[2].angle); + EXPORT(tone[2].origin); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +Halftone3::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("size") + .set_local_name(_("Mask Size")) + ); + ret.push_back(ParamDesc("type") + .set_local_name(_(" Type")) + .set_hint("enum") + .add_enum_value(TYPE_SYMMETRIC,"symmetric",_("Symmetric")) + .add_enum_value(TYPE_LIGHTONDARK,"lightondark",_("Light On Dark")) + //.add_enum_value(TYPE_DARKONLIGHT,"darkonlight",_("Dark on Light")) + .add_enum_value(TYPE_DIAMOND,"diamond",_("Diamond")) + .add_enum_value(TYPE_STRIPE,"stripe",_("Stripe")) + ); + ret.push_back(ParamDesc("subtractive") + .set_local_name(_("Subtractive Flag")) + ); + + for(int i=0;i<3;i++) + { + String chan_name(strprintf("Chan%d",i)); + + ret.push_back(ParamDesc(strprintf("color[%d]",i)) + .set_local_name(chan_name+_(" Color")) + ); + + ret.push_back(ParamDesc(strprintf("tone[%d].origin",i)) + .set_local_name(chan_name+_(" Mask Origin")) + .set_is_distance() + ); + ret.push_back(ParamDesc(strprintf("tone[%d].angle",i)) + .set_local_name(chan_name+_(" Mask Angle")) + .set_origin(strprintf("tone[%d].origin",i)) + ); + } + + return ret; +} + +Color +Halftone3::get_color(Context context, const Point &point)const +{ + const Color undercolor(context.get_color(point)); + const Color color(color_func(point,0,undercolor)); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + return color; + else + return Color::blend(color,undercolor,get_amount(),get_blend_method()); +} + +bool +Halftone3::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + SuperCallback supercb(cb,0,9500,10000); + + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + return false; + if(get_amount()==0) + return true; + + const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); + const Point tl(renddesc.get_tl()); + const int w(surface->get_w()); + const int h(surface->get_h()); + const float supersample_size(abs(pw/(tone[0].size).mag())); + + Surface::pen pen(surface->begin()); + Point pos; + int x,y; + + if(is_solid_color()) + { + for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) + return false; + + return true; +} diff --git a/synfig-core/src/modules/mod_filter/halftone3.h b/synfig-core/src/modules/mod_filter/halftone3.h new file mode 100644 index 0000000..1045c37 --- /dev/null +++ b/synfig-core/src/modules/mod_filter/halftone3.h @@ -0,0 +1,79 @@ +/* === S Y N F I G ========================================================= */ +/*! \file halftone3.h +** \brief Header file for implementation of the "Halftone 3" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_HALFTONE3_H +#define __SYNFIG_HALFTONE3_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include "halftone.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class Halftone3 : public synfig::Layer_Composite +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + synfig::Vector size; + int type; + Halftone tone[3]; + synfig::Color color[3]; + float inverse_matrix[3][3]; + bool subtractive; + + synfig::Color color_func(const synfig::Point &x, float supersample,const synfig::Color &under_color)const; + + float calc_supersample(const synfig::Point &x, float pw,float ph)const; + + //float halftone_func(synfig::Point x)const; + + void sync(); + +public: + Halftone3(); + + virtual bool set_param(const synfig::String ¶m, const synfig::ValueBase &value); + virtual synfig::ValueBase get_param(const synfig::String ¶m)const; + virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; + virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + virtual Vocab get_param_vocab()const; + virtual bool reads_context()const { return true; } +}; // END of class Halftone3 + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_filter/lumakey.cpp b/synfig-core/src/modules/mod_filter/lumakey.cpp new file mode 100644 index 0000000..9b30808 --- /dev/null +++ b/synfig-core/src/modules/mod_filter/lumakey.cpp @@ -0,0 +1,168 @@ +/* === S Y N F I G ========================================================= */ +/*! \file lumakey.cpp +** \brief Implementation of the "Luma Key" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "lumakey.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(LumaKey); +SYNFIG_LAYER_SET_NAME(LumaKey,"lumakey"); +SYNFIG_LAYER_SET_LOCAL_NAME(LumaKey,N_("Luma Key")); +SYNFIG_LAYER_SET_CATEGORY(LumaKey,N_("Filters")); +SYNFIG_LAYER_SET_VERSION(LumaKey,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(LumaKey,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +LumaKey::LumaKey(): + Layer_Composite (1.0,Color::BLEND_STRAIGHT) +{ + set_blend_method(Color::BLEND_STRAIGHT); +} + + +bool +LumaKey::set_param(const String ¶m, const ValueBase &value) +{ + return Layer_Composite::set_param(param,value); +} + +ValueBase +LumaKey::get_param(const String ¶m)const +{ + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +LumaKey::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + +/* ret.push_back(ParamDesc("color") + .set_local_name(_("Color")) + .set_description(_("Color of checkers")) + ); + ret.push_back(ParamDesc("pos") + .set_local_name(_("Offset")) + ); + ret.push_back(ParamDesc("size") + .set_local_name(_("Size")) + .set_description(_("Size of checkers")) + .set_origin("pos") + ); +*/ + return ret; +} + +synfig::Layer::Handle +LumaKey::hit_check(synfig::Context context, const synfig::Point &getpos)const +{ + return context.hit_check(getpos); +} + +Color +LumaKey::get_color(Context context, const Point &getpos)const +{ + const Color color(context.get_color(getpos)); + + if(get_amount()==0.0) + return color; + + Color ret(color); + ret.set_a(ret.get_y()*ret.get_a()); + ret.set_y(1); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + return ret; + + return Color::blend(ret,color,get_amount(),get_blend_method()); +} + +bool +LumaKey::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + SuperCallback supercb(cb,0,9500,10000); + + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + return false; + + int x,y; + + Surface::pen pen(surface->begin()); + + for(y=0;yamount_complete(10000,10000)) + return false; + + return true; +} + +Rect +LumaKey::get_bounding_rect(Context context)const +{ + if(is_disabled()) + return Rect::zero(); + + return context.get_full_bounding_rect(); +} diff --git a/synfig-core/src/modules/mod_filter/lumakey.h b/synfig-core/src/modules/mod_filter/lumakey.h new file mode 100644 index 0000000..cb008d5 --- /dev/null +++ b/synfig-core/src/modules/mod_filter/lumakey.h @@ -0,0 +1,68 @@ +/* === S Y N F I G ========================================================= */ +/*! \file lumakey.h +** \brief Header file for implementation of the "Luma Key" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_LUMAKEY_H +#define __SYNFIG_LUMAKEY_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class LumaKey : public synfig::Layer_Composite, public synfig::Layer_NoDeform +{ + SYNFIG_LAYER_MODULE_EXT +private: + +public: + LumaKey(); + + virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); + + virtual synfig::ValueBase get_param(const synfig::String & param)const; + + virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; + + virtual Vocab get_param_vocab()const; + + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + virtual synfig::Rect get_bounding_rect(synfig::Context context)const; + + virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; + virtual bool reads_context()const { return true; } +}; // END of class LumaKey + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_filter/main.cpp b/synfig-core/src/modules/mod_filter/main.cpp new file mode 100644 index 0000000..01feb7f --- /dev/null +++ b/synfig-core/src/modules/mod_filter/main.cpp @@ -0,0 +1,68 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_filter/main.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#include "blur.h" +#include "colorcorrect.h" +#include "halftone2.h" +#include "halftone3.h" +#include "lumakey.h" +#include "radialblur.h" + +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(libmod_filter) + MODULE_NAME("Filters") + MODULE_DESCRIPTION("Writeme") + MODULE_AUTHOR("Robert B. Quattlebaum") + MODULE_VERSION("1.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(libmod_filter) + BEGIN_LAYERS + LAYER(Blur_Layer) + LAYER(Halftone2) + LAYER(Halftone3) + LAYER(LumaKey) + LAYER(RadialBlur) + LAYER(Layer_ColorCorrect) + END_LAYERS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mod_filter/mod_filter.nsh b/synfig-core/src/modules/mod_filter/mod_filter.nsh new file mode 100644 index 0000000..1ccb3cc --- /dev/null +++ b/synfig-core/src/modules/mod_filter/mod_filter.nsh @@ -0,0 +1,21 @@ +; The stuff to install +Section "mod_filter" Sec_mod_filter + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=mod_filter.dll "src\modules\mod_filter\.libs\libmod_filter.dll" + + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "mod_filter" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd + diff --git a/synfig-core/src/modules/mod_filter/radialblur.cpp b/synfig-core/src/modules/mod_filter/radialblur.cpp new file mode 100644 index 0000000..6ecc5bb --- /dev/null +++ b/synfig-core/src/modules/mod_filter/radialblur.cpp @@ -0,0 +1,321 @@ +/* === S Y N F I G ========================================================= */ +/*! \file radialblur.cpp +** \brief Implementation of the "Radial Blur" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "radialblur.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(RadialBlur); +SYNFIG_LAYER_SET_NAME(RadialBlur,"radial_blur"); +SYNFIG_LAYER_SET_LOCAL_NAME(RadialBlur,N_("Radial Blur")); +SYNFIG_LAYER_SET_CATEGORY(RadialBlur,N_("Blurs")); +SYNFIG_LAYER_SET_VERSION(RadialBlur,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(RadialBlur,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +RadialBlur::RadialBlur(): + origin (0,0), + size (0.2), + fade_out(false) +{ +} + +RadialBlur::~RadialBlur() +{ +} + +bool +RadialBlur::set_param(const String & param, const ValueBase &value) +{ + IMPORT(origin); + IMPORT(size); + IMPORT(fade_out); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +RadialBlur::get_param(const String ¶m)const +{ + EXPORT(origin); + EXPORT(size); + EXPORT(fade_out); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +RadialBlur::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("origin") + .set_local_name(_("Origin")) + .set_description(_("Point where you want the origin to be")) + ); + + ret.push_back(ParamDesc("size") + .set_local_name(_("Size")) + .set_description(_("Size of blur")) + .set_origin("origin") + ); + + ret.push_back(ParamDesc("fade_out") + .set_local_name(_("Fade Out")) + ); + + return ret; +} + +Color +RadialBlur::get_color(Context context, const Point &p)const +{ + //! \writeme + return context.get_color(p); +} + +bool +RadialBlur::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + // don't do anything at quality 10 + if (quality == 10) + return context.accelerated_render(surface,quality,renddesc,cb); + + if(cb && !cb->amount_complete(0,10000)) + return false; + + Surface tmp_surface; + const Point tl(renddesc.get_tl()), br(renddesc.get_br()); + const int w(renddesc.get_w()), h(renddesc.get_h()); + const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); + + Rect rect(tl, br); + Point pos; + + // find how far towards the origin of the blur we are going to + // wander for each of the 4 corners of our tile, expanding the + // render description for each of them if necessary + int x, y; + for(y=0,pos[1]=tl[1];yset_wh(w, h); + Surface::pen pen(surface->get_pen(0, 0)); + tmp_surface.blit_to(pen, + int((tl[0] - tmp_surface_tl[0])/pw + 0.5), + int((tl[1] - tmp_surface_tl[1])/ph + 0.5), + w, h); + + Surface::alpha_pen apen(surface->begin()); + + apen.set_alpha(get_amount()); + apen.set_blend_method(get_blend_method()); + +/* + int steps(5); + + if(quality>=9)steps=20; + else if(quality>=5)steps=30; + else if(quality>=4)steps=60; + else if(quality>=3)steps=100; + else steps=120; +*/ + + Surface::value_prep_type cooker; + + // loop through the pixels + for(y=0,pos[1]=tl[1];y 0) ? 1 : -1; + dy = abs(y1 - y0); + sy = ((y1 - y0) > 0) ? 1 : -1; + if (dy > dx) + { + steep = 0; + swap(x0, y0); + swap(dx, dy); + swap(sx, sy); + swap(w,h); + } + e = (dy << 1) - dx; + for (i = 0; i < dx; i++) + { + if(y0>=0 && x0>=0 && y0= %d or %d >= %d?\n", __FILE__, __LINE__, x0, w, y0, h); + + while (e >= 0) + { + y0 += sy; + e -= (dx << 1); + } + x0 += sx; + e += (dy << 1); + } + if(poolsize) + { + pool/=poolsize; + apen.put_value(cooker.uncook(pool)); + } +/* + Point begin,end; + begin=pos; + end=(pos-origin)*(1.0f-size)+origin; + + Color pool(Color::alpha()); + float f,poolsize(0); + int i; + int steps(steps*size); + for(f=0,i=0;iamount_complete(10000,10000)) return false; + +// #define DRAW_TILE_OUTLINES +#ifdef DRAW_TILE_OUTLINES + // draw red lines to show tiles + { + int x, y; + if (w != 0 && h != 0) { + Surface::alpha_pen apen(surface->begin()); + apen.set_alpha(get_amount()); + apen.set_blend_method(get_blend_method()); + apen.set_value(Color(1, 0, 0, .1)); + for (x = 0; x < w; x++) { apen.put_value(); apen.inc_x(); } apen.dec_x(w); + for (y = 0; y < h; y++) { apen.put_value(); apen.inc_y(); } apen.dec_y(h); + } + } +#endif // DRAW_TILE_OUTLINES + + return true; +} diff --git a/synfig-core/src/modules/mod_filter/radialblur.h b/synfig-core/src/modules/mod_filter/radialblur.h new file mode 100644 index 0000000..197eb2f --- /dev/null +++ b/synfig-core/src/modules/mod_filter/radialblur.h @@ -0,0 +1,70 @@ +/* === S Y N F I G ========================================================= */ +/*! \file radialblur.h +** \brief Header file for implementation of the "Radial Blur" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_RADIALBLUR_H +#define __SYNFIG_RADIALBLUR_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +class RadialBlur : public Layer_Composite +{ + SYNFIG_LAYER_MODULE_EXT + friend class RadialBlur_Trans; +private: + Vector origin; + Real size; + bool fade_out; + +public: + RadialBlur(); + ~RadialBlur(); + + virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); + virtual ValueBase get_param(const synfig::String & param)const; + virtual Color get_color(Context context, const Point &pos)const; + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + virtual Vocab get_param_vocab()const; + virtual bool reads_context()const { return true; } +}; // END of class RadialBlur + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_filter/unmod_filter.nsh b/synfig-core/src/modules/mod_filter/unmod_filter.nsh new file mode 100644 index 0000000..3fcce9b --- /dev/null +++ b/synfig-core/src/modules/mod_filter/unmod_filter.nsh @@ -0,0 +1,8 @@ +Section "un.mod_filter" + Delete "$INSTDIR\lib\synfig\modules\mod_filter.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/modules/mod_geometry/Makefile.am b/synfig-core/src/modules/mod_geometry/Makefile.am new file mode 100644 index 0000000..335bb1c --- /dev/null +++ b/synfig-core/src/modules/mod_geometry/Makefile.am @@ -0,0 +1,51 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + +# GCC on MacOS X does not take kindly to the -ffastmath optimization +# in this module for some reason. +AM_CXXFLAGS = \ + `echo @CXXFLAGS@ | sed s/-ffast-math//g` + + +moduledir = @MODULE_DIR@ + +module_LTLIBRARIES = \ + libmod_geometry.la + +libmod_geometry_la_SOURCES = \ + rectangle.cpp \ + rectangle.h \ + star.h \ + star.cpp \ + checkerboard.cpp \ + checkerboard.h \ + circle.cpp \ + circle.h \ + region.h \ + region.cpp \ + outline.h \ + outline.cpp \ + main.cpp + +libmod_geometry_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ + +libmod_geometry_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @SYNFIG_LIBS@ + +libmod_geometry_la_LDFLAGS = \ + -module \ + -no-undefined \ + -avoid-version + + +EXTRA_DIST = \ + mod_geometry.nsh \ + unmod_geometry.nsh diff --git a/synfig-core/src/modules/mod_geometry/checkerboard.cpp b/synfig-core/src/modules/mod_geometry/checkerboard.cpp new file mode 100644 index 0000000..30bbf8e --- /dev/null +++ b/synfig-core/src/modules/mod_geometry/checkerboard.cpp @@ -0,0 +1,200 @@ +/* === S Y N F I G ========================================================= */ +/*! \file checkerboard.cpp +** \brief Implementation of the "Checkerboard" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "checkerboard.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(CheckerBoard); +SYNFIG_LAYER_SET_NAME(CheckerBoard,"checker_board"); +SYNFIG_LAYER_SET_LOCAL_NAME(CheckerBoard,N_("Checkerboard")); +SYNFIG_LAYER_SET_CATEGORY(CheckerBoard,N_("Geometry")); +SYNFIG_LAYER_SET_VERSION(CheckerBoard,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(CheckerBoard,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +CheckerBoard::CheckerBoard(): + Layer_Composite (1.0,Color::BLEND_STRAIGHT), + color (Color::black()), + origin (Point(0.125,0.125)), + size (Point(0.25,0.25)) +{ + + set_blend_method(Color::BLEND_STRAIGHT); +} + +inline bool +CheckerBoard::point_test(const synfig::Point& getpos)const +{ + int val=((int)((getpos[0]-origin[0])/size[0])+(int)((getpos[1]-origin[1])/size[1])); + if(getpos[0]-origin[0] < 0.0) + val++; + if(getpos[1]-origin[1] < 0.0) + val++; + return val&1; +} + +bool +CheckerBoard::set_param(const String ¶m, const ValueBase &value) +{ + IMPORT_PLUS(color, { if (color.get_a() == 0) { if (converted_blend_) { + set_blend_method(Color::BLEND_ALPHA_OVER); + color.set_a(1); } else transparent_color_ = true; } }); + IMPORT(origin); + IMPORT(size); + + IMPORT_AS(origin,"pos"); + IMPORT_AS(origin[0],"pos[0]"); + IMPORT_AS(origin[1],"pos[1]"); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +CheckerBoard::get_param(const String ¶m)const +{ + EXPORT(color); + EXPORT(origin); + EXPORT(size); + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +CheckerBoard::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("color") + .set_local_name(_("Color")) + .set_description(_("Color of checkers")) + ); + ret.push_back(ParamDesc("origin") + .set_local_name(_("Origin")) + ); + ret.push_back(ParamDesc("size") + .set_local_name(_("Size")) + .set_description(_("Size of checkers")) + .set_origin("origin") + ); + + return ret; +} + +synfig::Layer::Handle +CheckerBoard::hit_check(synfig::Context context, const synfig::Point &getpos)const +{ + if(get_amount()!=0.0 && point_test(getpos)) + { + synfig::Layer::Handle tmp; + if(get_blend_method()==Color::BLEND_BEHIND && (tmp=context.hit_check(getpos))) + return tmp; + if(Color::is_onto(get_blend_method()) && !(tmp=context.hit_check(getpos))) + return 0; + return const_cast(this); + } + else + return context.hit_check(getpos); +} + +Color +CheckerBoard::get_color(Context context, const Point &getpos)const +{ + if(get_amount()!=0.0 && point_test(getpos)) + { + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + return color; + else + return Color::blend(color,context.get_color(getpos),get_amount(),get_blend_method()); + } + else + return Color::blend(Color::alpha(),context.get_color(getpos),get_amount(),get_blend_method()); +} + +bool +CheckerBoard::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + SuperCallback supercb(cb,0,9500,10000); + + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + return false; + if(get_amount()==0) + return true; + + int x,y; + + const Point tl(renddesc.get_tl()); + Point pos; + const int w(surface->get_w()); + const int h(surface->get_h()); + const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); + + Surface::alpha_pen apen(surface->begin()); + + apen.set_alpha(get_amount()); + apen.set_blend_method(get_blend_method()); + apen.set_value(color); + + for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) + return false; + + return true; +} diff --git a/synfig-core/src/modules/mod_geometry/checkerboard.h b/synfig-core/src/modules/mod_geometry/checkerboard.h new file mode 100644 index 0000000..f30bda7 --- /dev/null +++ b/synfig-core/src/modules/mod_geometry/checkerboard.h @@ -0,0 +1,71 @@ +/* === S Y N F I G ========================================================= */ +/*! \file checkerboard.h +** \brief Header file for implementation of the "Checkerboard" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_CHECKERBOARD_H +#define __SYNFIG_CHECKERBOARD_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class CheckerBoard : public synfig::Layer_Composite, public synfig::Layer_NoDeform +{ + SYNFIG_LAYER_MODULE_EXT +private: + synfig::Color color; + synfig::Point origin; + synfig::Point size; + + bool point_test(const synfig::Point& x)const; + +public: + CheckerBoard(); + + virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); + + virtual synfig::ValueBase get_param(const synfig::String & param)const; + + virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; + + virtual Vocab get_param_vocab()const; + + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + + virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_geometry/circle.cpp b/synfig-core/src/modules/mod_geometry/circle.cpp new file mode 100644 index 0000000..f5ad99b --- /dev/null +++ b/synfig-core/src/modules/mod_geometry/circle.cpp @@ -0,0 +1,783 @@ +/* === S Y N F I G ========================================================= */ +/*! \file circle.cpp +** \brief Implementation of the "Circle" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "circle.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#endif + +using namespace synfig; +using namespace std; +using namespace etl; + +/* -- G L O B A L S --------------------------------------------------------- */ + +SYNFIG_LAYER_INIT(Circle); +SYNFIG_LAYER_SET_NAME(Circle,"circle"); +SYNFIG_LAYER_SET_LOCAL_NAME(Circle,N_("Circle")); +SYNFIG_LAYER_SET_CATEGORY(Circle,N_("Geometry")); +SYNFIG_LAYER_SET_VERSION(Circle,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Circle,"$Id$"); + +/* -- F U N C T I O N S ----------------------------------------------------- */ + +Circle::Circle(): + Layer_Composite (1.0,Color::BLEND_STRAIGHT), + color (Color::black()), + origin (0,0), + radius (1), + feather (0), + invert (false), + falloff (FALLOFF_INTERPOLATION_LINEAR) +{ + constructcache(); +} + +bool +Circle::ImportParameters(const String ¶m, const ValueBase &value) +{ + IMPORT_PLUS(color, { if (color.get_a() == 0) { if (converted_blend_) { + set_blend_method(Color::BLEND_ALPHA_OVER); + color.set_a(1); } else transparent_color_ = true; } }); + IMPORT(radius); + IMPORT_PLUS(feather, if(feather<0)feather=0;); + IMPORT(invert); + IMPORT(origin); + IMPORT(falloff); + + IMPORT_AS(origin,"pos"); + + return Layer_Composite::set_param(param,value); +} + +bool +Circle::set_param(const String ¶m, const ValueBase &value) +{ + if(ImportParameters(param,value)) + { + constructcache(); + return true; + } + + return false; +} + +ValueBase +Circle::get_param(const String ¶m)const +{ + EXPORT(color); + EXPORT(radius); + EXPORT(feather); + EXPORT(invert); + EXPORT(origin); + EXPORT(falloff); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +Circle::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("color") + .set_local_name(_("Color")) + ); + ret.push_back(ParamDesc("radius") + .set_local_name(_("Radius")) + .set_origin("origin") + .set_is_distance() + ); + ret.push_back(ParamDesc("feather") + .set_local_name(_("Feather")) + .set_is_distance() + ); + ret.push_back(ParamDesc("origin") + .set_local_name(_("Origin")) + ); + ret.push_back(ParamDesc("invert") + .set_local_name(_("Invert")) + .set_description(_("Invert the circle")) + ); + + ret.push_back(ParamDesc("falloff") + .set_local_name(_("Falloff")) + .set_description(_("Determines the falloff function for the feather")) + .set_hint("enum") + .add_enum_value(FALLOFF_INTERPOLATION_LINEAR,"linear",_("Linear")) + .add_enum_value(FALLOFF_SQUARED,"squared",_("Squared")) + .add_enum_value(FALLOFF_SQRT,"sqrt",_("Square Root")) + .add_enum_value(FALLOFF_SIGMOND,"sigmond",_("Sigmond")) + .add_enum_value(FALLOFF_COSINE,"cosine",_("Cosine")) + ); + + return ret; +} + +synfig::Layer::Handle +Circle::hit_check(synfig::Context context, const synfig::Point &point)const +{ + Point temp=origin-point; + + if(get_amount()==0) + return context.hit_check(point); + + bool in_circle(temp.mag_squared() <= radius*radius); + + if(invert) + { + in_circle=!in_circle; + if(in_circle && get_amount()-(feather/radius)<=0.1 && get_blend_method()!=Color::BLEND_STRAIGHT) + in_circle=false; + } + else + { + if(get_amount()-(feather/radius)<=0.0) + in_circle=false; + } + + if(in_circle) + { + synfig::Layer::Handle tmp; + if(get_blend_method()==Color::BLEND_BEHIND && (tmp=context.hit_check(point))) + return tmp; + if(Color::is_onto(get_blend_method()) && !(tmp=context.hit_check(point))) + return 0; + return const_cast(this); + } + + return context.hit_check(point); +} + +//falloff functions +Real Circle::SqdFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) +{ + //squared proportional falloff + return (c.outer_radius_sqd - mag_sqd) / c.diff_sqd; +} + +Real Circle::InvSqdFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) +{ + //squared proportional falloff + return 1.0 - (c.outer_radius_sqd - mag_sqd) / c.diff_sqd; +} + + +Real Circle::SqrtFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) +{ + //linear distance falloff + Real ret = ( c.outer_radius - sqrt(mag_sqd) ) / c.double_feather; + //then take the square root of it + ret = sqrt(ret); + return ret; +} + +Real Circle::InvSqrtFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) +{ + //linear distance falloff + Real ret = ( c.outer_radius - sqrt(mag_sqd) ) / c.double_feather; + //then take the square root of it + ret = 1.0 - sqrt(ret); + return ret; +} + +Real Circle::LinearFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) +{ + //linear distance falloff + return ( c.outer_radius - sqrt(mag_sqd) ) / c.double_feather; +} + +Real Circle::InvLinearFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) +{ + return 1.0 - ( c.outer_radius - sqrt(mag_sqd) ) / c.double_feather; + //linear distance falloff +} + +Real Circle::SigmondFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) +{ + //linear distance falloff + Real ret = ( c.outer_radius - sqrt(mag_sqd) ) / c.double_feather; + // inverse exponential of the linear falloff (asymptotes at 0 and 1) + // \frac{1.0}{ 1 + e^{- \( a*10-5 \)}} + ret = 1.0 / (1 + exp(-(ret*10-5)) ); + return ret; +} + +Real Circle::InvSigmondFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) +{ + //linear distance falloff + Real ret = ( c.outer_radius - sqrt(mag_sqd) ) / c.double_feather; + // inverse exponential of the linear falloff (asymptotes at 0 and 1) + // \frac{1.0}{ 1 + e^{- \( a*10-5 \)}} + ret = 1.0 - 1.0 / (1 + exp(-(ret*10-5)) ); + return ret; +} + + +Real +Circle::CosineFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) +{ + //Cosine distance falloff + return (1.0f-cos((( c.outer_radius - sqrt(mag_sqd) ) / c.double_feather)*3.1415927))*0.5f; +} + +Real +Circle::InvCosineFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) +{ + return 1.0f-(1.0f-cos((( c.outer_radius - sqrt(mag_sqd) ) / c.double_feather)*3.1415927))*0.5f; + //Cosine distance falloff +} + +void Circle::constructcache() +{ + cache.inner_radius = radius - feather; + if(cache.inner_radius < 0) + cache.inner_radius = 0; + + cache.outer_radius = radius + feather; + + cache.inner_radius_sqd = cache.inner_radius > 0 ? (radius-feather)*(radius-feather) : 0; + cache.outer_radius_sqd = (radius+feather)*(radius+feather); + + cache.diff_sqd = feather*feather*4.0; + cache.double_feather = feather*2.0; + + falloff_func = GetFalloffFunc(); +} + +Circle::FALLOFF_FUNC *Circle::GetFalloffFunc()const +{ + switch(falloff) + { + case FALLOFF_SQUARED: return invert?InvSqdFalloff:SqdFalloff; + + case FALLOFF_SQRT: return invert?InvSqrtFalloff:SqrtFalloff; + + case FALLOFF_INTERPOLATION_LINEAR: return invert?InvLinearFalloff:LinearFalloff; + + case FALLOFF_SIGMOND: return invert?InvSigmondFalloff:SigmondFalloff; + + case FALLOFF_COSINE: + default: return invert?InvCosineFalloff:CosineFalloff; + } +} + +Color +Circle::get_color(Context context, const Point &point)const +{ + if(is_disabled() || (radius==0 && invert==false && !feather)) + return context.get_color(point); + + + Point temp=origin-point; + + /*const Real inner_radius = radius-feather; + const Real outer_radius = radius+feather; + + const Real inner_radius_sqd = inner_radius > 0 ? (radius-feather)*(radius-feather) : 0; + const Real outer_radius_sqd = (radius+feather)*(radius+feather); + + const Real diff_radii_sqd = outer_radius_sqd - inner_radius_sqd; + const Real double_feather = feather*2.0;*/ + + /*const Real &inner_radius = cache.inner_radius; + const Real &outer_radius = cache.outer_radius;*/ + + const Real &inner_radius_sqd = cache.inner_radius_sqd; + const Real &outer_radius_sqd = cache.outer_radius_sqd; + + /*const Real &diff_radii_sqd = cache.diff_radii_sqd; + const Real &double_feather = cache.double_feather;*/ + + const Vector::value_type mag_squared = temp.mag_squared(); + + //Outside the circle, with feathering enabled + if( mag_squared > outer_radius_sqd ) + { + // inverted -> outside == colored in + if(invert) + { + if(get_amount() == 1 && get_blend_method() == Color::BLEND_STRAIGHT) + return color; + else + return Color::blend(color,context.get_color(point),get_amount(),get_blend_method()); + } + else + return Color::blend(Color::alpha(),context.get_color(point),get_amount(),get_blend_method()); + } + + //inside the circle's solid area (with feathering) + else if(mag_squared <= inner_radius_sqd) + { + // !invert -> solid area + if(!invert) + if(get_amount() == 1 && get_blend_method() == Color::BLEND_STRAIGHT) + return color; + else + return Color::blend(color,context.get_color(point),get_amount(),get_blend_method()); + else + return Color::blend(Color::alpha(),context.get_color(point),get_amount(),get_blend_method()); + } + + //If we get here, the pixel is within the feathering area, and is thus subject to falloff + else + { + Color::value_type alpha; + + /*switch(falloff) + { + + case FALLOFF_SQUARED: + //squared proportional falloff + alpha = (outer_radius_sqd - mag_squared) / diff_radii_sqd; + break; + + case FALLOFF_SQRT: + //linear distance falloff + alpha = ( outer_radius - sqrt(mag_squared) ) / double_feather; + //then take the square root of it + alpha = sqrt(alpha); + break; + + case FALLOFF_INTERPOLATION_LINEAR: + //linear distance falloff + alpha = ( outer_radius - sqrt(mag_squared) ) / double_feather; + break; + + case FALLOFF_SIGMOND: + default: + //linear distance falloff + alpha = ( outer_radius - sqrt(mag_squared) ) / double_feather; + // inverse exponential of the linear falloff (asymptotes at 0 and 1) + // \frac{1.0}{ 1 + e^{- \( a*10-5 \)}} + alpha = 1.0 / (1 + exp(-(alpha*10-5)) ); + break; + } + + //If we're inverted, we need to invert the falloff value + if(invert) + alpha=1.0-alpha;*/ + + alpha = falloff_func(cache,mag_squared); + + return Color::blend(color*alpha,context.get_color(point),get_amount(),get_blend_method()); + } +} + +Color NormalBlend(Color a, Color b, float amount) +{ + return (b-a)*amount+a; +} + + +bool +Circle::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + // trivial case + if(is_disabled() || (radius==0 && invert==false && !feather)) + return context.accelerated_render(surface,quality, renddesc, cb); + + // Another trivial case + if(invert && radius==0 && is_solid_color()) + { + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + surface->fill(color); + if(cb && !cb->amount_complete(10000,10000)) + return false; + return true; + } + + // Window Boundaries + const Point tl(renddesc.get_tl()); + const Point br(renddesc.get_br()); + const int w(renddesc.get_w()); + const int h(renddesc.get_h()); + + const Real x_neg = tl[0] > br[0] ? -1 : 1; + const Real y_neg = tl[1] > br[1] ? -1 : 1; + + // Width and Height of a pixel + const Real pw = (br[0] - tl[0]) / w; + const Real ph = (br[1] - tl[1]) / h; + + // Increasing the feather amount by the size of + // a pixel will create an anti-aliased appearance + // don't render feathering at all when quality is 10 + const Real newfeather = (quality == 10) ? 0 : feather + (abs(ph)+abs(pw))/4.0; + + //int u,v; + int left = (int) floor( (origin[0] - x_neg*(radius+newfeather) - tl[0]) / pw ); + int right = (int) ceil( (origin[0] + x_neg*(radius+newfeather) - tl[0]) / pw ); + int top = (int) floor( (origin[1] - y_neg*(radius+newfeather) - tl[1]) / ph ); + int bottom = (int) ceil( (origin[1] + y_neg*(radius+newfeather) - tl[1]) / ph ); + + //clip the rectangle bounds + if(left < 0) + left = 0; + if(top < 0) + top = 0; + if(right >= w) + right = w-1; + if(bottom >= h) + bottom = h-1; + + const Real inner_radius = radius-newfeather>0 ? radius-newfeather : 0; + const Real outer_radius = radius+newfeather; + + const Real inner_radius_sqd = inner_radius*inner_radius; + const Real outer_radius_sqd = outer_radius*outer_radius; + + const Real diff_radii_sqd = 4*newfeather*std::max(newfeather,radius);//4.0*radius*newfeather; + const Real double_feather = newfeather * 2.0; + + //Compile the temporary cache for the falloff calculations + FALLOFF_FUNC *func = GetFalloffFunc(); + + const CircleDataCache cache = + { + inner_radius,outer_radius, + inner_radius_sqd,outer_radius_sqd, + diff_radii_sqd,double_feather + }; + + //info("Circle: Initialized everything"); + + //let the rendering begin + SuperCallback supercb(cb,0,9000,10000); + + //if it's a degenerate circle, do what we need to do, and then leave + if(left >= right || top >= bottom) + { + if(invert) + { + if(get_amount() == 1 && get_blend_method() == Color::BLEND_STRAIGHT) + { + surface->set_wh(w,h); + surface->fill(color); + return true; + }else + { + // Render what is behind us + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + { + if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); + return false; + } + + Surface::alpha_pen p(surface->begin(),get_amount(),_BlendFunc(get_blend_method())); + + p.set_value(color); + p.put_block(h,w); + return true; + } + }else + { + // Render what is behind us + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + { + if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); + return false; + } + return true; + } + } + + if( (origin[0] - tl[0])*(origin[0] - tl[0]) + (origin[1] - tl[1])*(origin[1] - tl[1]) < inner_radius_sqd + && (origin[0] - br[0])*(origin[0] - br[0]) + (origin[1] - br[1])*(origin[1] - br[1]) < inner_radius_sqd + && (origin[0] - tl[0])*(origin[0] - tl[0]) + (origin[1] - br[1])*(origin[1] - br[1]) < inner_radius_sqd + && (origin[0] - br[0])*(origin[0] - br[0]) + (origin[1] - tl[1])*(origin[1] - tl[1]) < inner_radius_sqd ) + { + if(invert) + { + // Render what is behind us + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + { + if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); + return false; + } + }else + { + if(get_amount() == 1 && get_blend_method() == Color::BLEND_STRAIGHT) + { + surface->set_wh(w,h); + surface->fill(color); + return true; + } + } + } + + //info("Circle: Non degenerate, rasterize %c", invert); + + //we start in the middle of the left-top pixel + Real leftf = (left + 0.5)*pw + tl[0]; + Real topf = (top + 0.5)*ph + tl[1]; + + //the looping variables + Real x,y; + int i,j; + + //Loop normally, since we are not inverted + if(!invert) + { + // Render what is behind us + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + { + if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); + return false; + } + + //make topf and leftf relative to the center of the circle + leftf -= origin[0]; + topf -= origin[1]; + + j = top; + y = topf; + + //Loop over the valid y-values in the bounding square + for(;j <= bottom; j++, y += ph) + { + i = left; + x = leftf; + + //for each y-value, Loop over the bounding x-values in the bounding square + for(;i <= right; i++, x += pw) + { + //for each pixel, figure out the distance and blend + Real r = x*x + y*y; + + //if in the inner circle then the full color shows through + if(r <= inner_radius_sqd) + { + if(get_amount() == 1 && get_blend_method() == Color::BLEND_STRAIGHT) + (*surface)[j][i]=color; + else + (*surface)[j][i]=Color::blend(color,(*surface)[j][i],get_amount(),get_blend_method()); + } + //if it's within the outer circle then it's in the feathering range + else if(r <= outer_radius_sqd) + { + /*float myamount; + + switch(falloff) + { + case FALLOFF_SQUARED: + myamount = (outer_radius_sqd - r) / diff_radii_sqd; + break; + + case FALLOFF_SQRT: + myamount = (outer_radius - sqrt(r)) / double_feather; + myamount = sqrt(myamount); + break; + + case FALLOFF_INTERPOLATION_LINEAR: + myamount = (outer_radius - sqrt(r)) / double_feather; + break; + + case FALLOFF_SIGMOND: + default: + myamount = (outer_radius - sqrt(r)) / double_feather; + myamount = 1.0 / ( 1 + exp(-(myamount*10 - 5)) ); + break; + }*/ + + Real myamount = func(cache,r); + + //if(myamount<0.0)myamount=0.0; + //if(myamount>1.0)myamount=1.0; + myamount *= get_amount(); + (*surface)[j][i] = Color::blend(color,(*surface)[j][i],myamount,get_blend_method()); + } + } + } + } + else + { + Surface background; + RendDesc desc(renddesc); + desc.set_flags(0); + + int offset_x=0,offset_y=0; + + //fill the surface with the background color initially + surface->set_wh(w,h); + surface->fill(color); + + //then render the background to an alternate surface + if(get_amount() == 1 && get_blend_method() == Color::BLEND_STRAIGHT) + { + offset_x = left; + offset_y = top; + + //if there is no background showing through we are done + if(right < left || bottom < top) + return true; + + desc.set_subwindow(left,top,right-left+1,bottom-top+1); + + // Render what is behind us + if(!context.accelerated_render(&background,quality,desc,&supercb)) + { + if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); + return false; + } + } + else + { + left = 0; + right = w-1; + top = 0; + bottom = h-1; + + leftf = /*0.5*pw +*/ tl[0]; + topf = /*0.5*ph +*/ tl[1]; + + // Render what is behind us + if(!context.accelerated_render(&background,quality,renddesc,&supercb)) + { + if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); + return false; + } + } + + topf -= origin[1]; + leftf-= origin[0]; + + j = top; + y = topf; + + for(;j <= bottom; j++, y+=ph) + { + i = left; + x = leftf; + + for(;i <= right; i++, x+=pw) + { + Vector::value_type r = x*x + y*y; + + if(r < inner_radius_sqd) + { + (*surface)[j][i] = background[j-offset_y][i-offset_x]; + } + else if(r < outer_radius_sqd) + { + /*float amount; + + switch(falloff) + { + case FALLOFF_SQUARED: + amount = (r - inner_radius_sqd) / diff_radii_sqd; + break; + case FALLOFF_INTERPOLATION_LINEAR: + amount = (sqrt(r) - inner_radius) / double_feather; + break; + case FALLOFF_SQRT: + amount = (outer_radius - sqrt(r)) / double_feather; + amount = 1.0 - sqrt(amount); + break; + case FALLOFF_SIGMOND: + default: + amount = (outer_radius - sqrt(r)) / double_feather; + amount = 1.0 - ( 1.0/( 1 + exp(-(amount*10-5)) ) ); + break; + }*/ + + Real amount = func(cache,r); + + if(amount<0.0)amount=0.0; + if(amount>1.0)amount=1.0; + + amount*=get_amount(); + + (*surface)[j][i]=Color::blend(color,background[j-offset_y][i-offset_x],amount,get_blend_method()); + }else if(get_amount() != 1 || get_blend_method() != Color::BLEND_STRAIGHT) + { + (*surface)[j][i]=Color::blend(color,background[j][i],get_amount(),get_blend_method()); + } + } + } + } + + // Mark our progress as finished + if(cb && !cb->amount_complete(10000,10000)) + return false; + + return true; +} + +Rect +Circle::get_bounding_rect()const +{ + if(invert) + return Rect::full_plane(); + + Rect bounds( + origin[0]+(radius+feather), + origin[1]+(radius+feather), + origin[0]-(radius+feather), + origin[1]-(radius+feather) + ); + + return bounds; +} + +Rect +Circle::get_full_bounding_rect(Context context)const +{ + if(invert) + { + if(is_solid_color() && color.get_a()==0) + { + Rect bounds( + origin[0]+(radius+feather), + origin[1]+(radius+feather), + origin[0]-(radius+feather), + origin[1]-(radius+feather) + ); + return bounds & context.get_full_bounding_rect(); + } + return Rect::full_plane(); + } + + return Layer_Composite::get_full_bounding_rect(context); +} diff --git a/synfig-core/src/modules/mod_geometry/circle.h b/synfig-core/src/modules/mod_geometry/circle.h new file mode 100644 index 0000000..f7cd379 --- /dev/null +++ b/synfig-core/src/modules/mod_geometry/circle.h @@ -0,0 +1,124 @@ +/* === S Y N F I G ========================================================= */ +/*! \file circle.h +** \brief Header file for implementation of the "Circle" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifndef __SYNFIG_LAYER_CIRCLE_H__ +#define __SYNFIG_LAYER_CIRCLE_H__ + +/* -- H E A D E R S --------------------------------------------------------- */ + +#include +#include +#include + +using namespace synfig; +using namespace std; +using namespace etl; + +/* -- M A C R O S ----------------------------------------------------------- */ + +/* -- T Y P E D E F S ------------------------------------------------------- */ + +/* -- S T R U C T S & C L A S S E S ----------------------------------------- */ + +class Circle : public synfig::Layer_Composite, public synfig::Layer_NoDeform +{ + SYNFIG_LAYER_MODULE_EXT +private: + synfig::Color color; + synfig::Point origin; + synfig::Real radius; + synfig::Real feather; + bool invert; + int falloff; + + //Caching system for circle + struct CircleDataCache + { + Real inner_radius; + Real outer_radius; + + Real inner_radius_sqd; + Real outer_radius_sqd; + + Real diff_sqd; + Real double_feather; + }; + + typedef Real FALLOFF_FUNC(const CircleDataCache &c, const Real &mag_sqd); + + FALLOFF_FUNC *falloff_func; + CircleDataCache cache; + + void constructcache(); + + static Real SqdFalloff(const CircleDataCache &c, const Real &mag_sqd); + static Real InvSqdFalloff(const CircleDataCache &c, const Real &mag_sqd); + static Real SqrtFalloff(const CircleDataCache &c, const Real &mag_sqd); + static Real InvSqrtFalloff(const CircleDataCache &c, const Real &mag_sqd); + static Real LinearFalloff(const CircleDataCache &c, const Real &mag_sqd); + static Real InvLinearFalloff(const CircleDataCache &c, const Real &mag_sqd); + static Real SigmondFalloff(const CircleDataCache &c, const Real &mag_sqd); + static Real InvSigmondFalloff(const CircleDataCache &c, const Real &mag_sqd); + static Real CosineFalloff(const CircleDataCache &c, const Real &mag_sqd); + static Real InvCosineFalloff(const CircleDataCache &c, const Real &mag_sqd); + + FALLOFF_FUNC *GetFalloffFunc()const; + bool ImportParameters(const String ¶m, const ValueBase &value); + +public: + enum Falloff + { + FALLOFF_SQUARED =0, + FALLOFF_INTERPOLATION_LINEAR =1, + FALLOFF_SMOOTH =2, + FALLOFF_COSINE =2, + FALLOFF_SIGMOND =3, + FALLOFF_SQRT =4 + }; + + Circle(); + + virtual bool set_param(const String ¶m, const ValueBase &value); + + virtual ValueBase get_param(const String ¶m)const; + + virtual Color get_color(Context context, const Point &pos)const; + + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + + virtual synfig::Rect get_full_bounding_rect(synfig::Context context)const; + virtual synfig::Rect get_bounding_rect()const; + + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + + virtual Vocab get_param_vocab()const; +}; + +/* -- E X T E R N S --------------------------------------------------------- */ + + +/* -- E N D ----------------------------------------------------------------- */ + +#endif diff --git a/synfig-core/src/modules/mod_geometry/main.cpp b/synfig-core/src/modules/mod_geometry/main.cpp new file mode 100644 index 0000000..715465c --- /dev/null +++ b/synfig-core/src/modules/mod_geometry/main.cpp @@ -0,0 +1,75 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_geometry/main.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#include "checkerboard.h" +#include "circle.h" +#include "region.h" +#include "outline.h" +#include "star.h" +#include "rectangle.h" + +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(libmod_geometry) + MODULE_NAME("Geometry") + MODULE_DESCRIPTION("writeme") + MODULE_AUTHOR("Robert B. Quattlebaum") + MODULE_VERSION("1.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(libmod_geometry) + BEGIN_LAYERS + LAYER(CheckerBoard) + LAYER(Circle) + LAYER(Region) + LAYER(Outline) + LAYER(Star) + LAYER(Rectangle) + + LAYER_ALIAS(Outline,"BLine") + LAYER_ALIAS(Outline,"Bezier") + LAYER_ALIAS(Region,"Region") + LAYER_ALIAS(Circle,"Circle") + LAYER_ALIAS(CheckerBoard,"CheckerBoard") + + END_LAYERS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mod_geometry/mod_geometry.nsh b/synfig-core/src/modules/mod_geometry/mod_geometry.nsh new file mode 100644 index 0000000..f2768e7 --- /dev/null +++ b/synfig-core/src/modules/mod_geometry/mod_geometry.nsh @@ -0,0 +1,21 @@ +; The stuff to install +Section "mod_geometry" Sec_mod_geometry + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=mod_geometry.dll "src\modules\mod_geometry\.libs\libmod_geometry.dll" + + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "mod_geometry" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd + diff --git a/synfig-core/src/modules/mod_geometry/outline.cpp b/synfig-core/src/modules/mod_geometry/outline.cpp new file mode 100644 index 0000000..e84effb --- /dev/null +++ b/synfig-core/src/modules/mod_geometry/outline.cpp @@ -0,0 +1,854 @@ +/* === S Y N F I G ========================================================= */ +/*! \file outline.cpp +** \brief Implementation of the "Outline" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +//! \note This whole file should be rewritten at some point (darco) + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "outline.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#endif + +using namespace etl; + +/* === M A C R O S ========================================================= */ + +#define SAMPLES 50 +#define ROUND_END_FACTOR (4) +#define CUSP_THRESHOLD (0.40) +#define SPIKE_AMOUNT (4) +#define NO_LOOP_COOKIE synfig::Vector(84951305,7836658) +#define EPSILON (0.000000001) +#define CUSP_TANGENT_ADJUST (0.025) + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Outline); +SYNFIG_LAYER_SET_NAME(Outline,"outline"); +SYNFIG_LAYER_SET_LOCAL_NAME(Outline,N_("Outline")); +SYNFIG_LAYER_SET_CATEGORY(Outline,N_("Geometry")); +SYNFIG_LAYER_SET_VERSION(Outline,"0.2"); +SYNFIG_LAYER_SET_CVS_ID(Outline,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +// This function was adapted from what was +// described on http://www.whisqu.se/per/docs/math28.htm +Point line_intersection( + const Point& p1, + const Vector& t1, + const Point& p2, + const Vector& t2 +) +{ + const float& x0(p1[0]); + const float& y0(p1[1]); + + const float x1(p1[0]+t1[0]); + const float y1(p1[1]+t1[1]); + + const float& x2(p2[0]); + const float& y2(p2[1]); + + const float x3(p2[0]+t2[0]); + const float y3(p2[1]+t2[1]); + + const float near_infinity((float)1e+10); + + float m1,m2; // the slopes of each line + + // compute slopes, note the kluge for infinity, however, this will + // be close enough + + if ((x1-x0)!=0) + m1 = (y1-y0)/(x1-x0); + else + m1 = near_infinity; + + if ((x3-x2)!=0) + m2 = (y3-y2)/(x3-x2); + else + m2 = near_infinity; + + // compute constants + const float& a1(m1); + const float& a2(m2); + const float b1(-1.0f); + const float b2(-1.0f); + const float c1(y0-m1*x0); + const float c2(y2-m2*x2); + + // compute the inverse of the determinate + const float det_inv(1.0f/(a1*b2 - a2*b1)); + + // use Kramers rule to compute the intersection + return Point( + ((b1*c2 - b2*c1)*det_inv), + ((a2*c1 - a1*c2)*det_inv) + ); +} // end Intersect_Lines + +/* === M E T H O D S ======================================================= */ + + +Outline::Outline() +{ + old_version=false; + round_tip[0]=true; + round_tip[1]=true; + sharp_cusps=true; + width=1.0f; + loopyness=1.0f; + expand=0; + homogeneous_width=true; + clear(); + + vector bline_point_list; + bline_point_list.push_back(BLinePoint()); + bline_point_list.push_back(BLinePoint()); + bline_point_list.push_back(BLinePoint()); + bline_point_list[0].set_vertex(Point(0,1)); + bline_point_list[1].set_vertex(Point(0,-1)); + bline_point_list[2].set_vertex(Point(1,0)); + bline_point_list[0].set_tangent(bline_point_list[1].get_vertex()-bline_point_list[2].get_vertex()*0.5f); + bline_point_list[1].set_tangent(bline_point_list[2].get_vertex()-bline_point_list[0].get_vertex()*0.5f); + bline_point_list[2].set_tangent(bline_point_list[0].get_vertex()-bline_point_list[1].get_vertex()*0.5f); + bline_point_list[0].set_width(1.0f); + bline_point_list[1].set_width(1.0f); + bline_point_list[2].set_width(1.0f); + bline=bline_point_list; + + needs_sync=true; +} + + +/*! The Sync() function takes the values +** and creates a polygon to be rendered +** with the polygon layer. +*/ +void +Outline::sync() +{ + clear(); + + if (!bline.get_list().size()) + { + synfig::warning(string("Outline::sync():")+N_("No vertices in outline " + string("\"") + get_description() + string("\""))); + return; + } + + try { +#if 1 + + const bool loop(bline.get_loop()); + + ValueNode_BLine::Handle bline_valuenode; + if (bline.get_contained_type() == ValueBase::TYPE_SEGMENT) + { + bline_valuenode = ValueNode_BLine::create(bline); + bline = (*bline_valuenode)(0); + } + + const vector bline_(bline.get_list().begin(),bline.get_list().end()); +#define bline bline_ + + vector::const_iterator + iter, + next(bline.begin()); + + const vector::const_iterator + end(bline.end()); + + vector + side_a, + side_b; + + if(loop) + iter=--bline.end(); + else + iter=next++; + + // iter next + // ---- ---- + // looped nth 1st + // !looped 1st 2nd + + Vector first_tangent=bline.front().get_tangent2(); + Vector last_tangent=iter->get_tangent1(); + + // if we are looped and drawing sharp cusps, we'll need a value for the incoming tangent + if (loop && sharp_cusps && last_tangent.is_equal_to(Vector::zero())) + { + hermite curve((iter-1)->get_vertex(), iter->get_vertex(), (iter-1)->get_tangent2(), iter->get_tangent1()); + const derivative< hermite > deriv(curve); + last_tangent=deriv(1.0-CUSP_TANGENT_ADJUST); + } + + // `first' is for making the cusps; don't do that for the first point if we're not looped + for(bool first=!loop; next!=end; iter=next++) + { + Vector prev_t(iter->get_tangent1()); + Vector iter_t(iter->get_tangent2()); + Vector next_t(next->get_tangent1()); + + bool split_flag(iter->get_split_tangent_flag()); + + // if iter.t2 == 0 and next.t1 == 0, this is a straight line + if(iter_t.is_equal_to(Vector::zero()) && next_t.is_equal_to(Vector::zero())) + { + iter_t=next_t=next->get_vertex()-iter->get_vertex(); + // split_flag=true; + + // if the two points are on top of each other, ignore this segment + // leave `first' true if was before + if (iter_t.is_equal_to(Vector::zero())) + continue; + } + + // Setup the curve + hermite curve( + iter->get_vertex(), + next->get_vertex(), + iter_t, + next_t + ); + + const float + iter_w((iter->get_width()*width)*0.5f+expand), + next_w((next->get_width()*width)*0.5f+expand); + + const derivative< hermite > deriv(curve); + + if (first) + first_tangent = deriv(CUSP_TANGENT_ADJUST); + + // Make cusps as necessary + if(!first && sharp_cusps && split_flag && (!prev_t.is_equal_to(iter_t) || iter_t.is_equal_to(Vector::zero())) && !last_tangent.is_equal_to(Vector::zero())) + { + Vector curr_tangent(deriv(CUSP_TANGENT_ADJUST)); + + const Vector t1(last_tangent.perp().norm()); + const Vector t2(curr_tangent.perp().norm()); + + Real cross(t1*t2.perp()); + Real perp((t1-t2).mag()); + if(cross>CUSP_THRESHOLD) + { + const Point p1(iter->get_vertex()+t1*iter_w); + const Point p2(iter->get_vertex()+t2*iter_w); + + side_a.push_back(line_intersection(p1,last_tangent,p2,curr_tangent)); + } + else if(cross<-CUSP_THRESHOLD) + { + const Point p1(iter->get_vertex()-t1*iter_w); + const Point p2(iter->get_vertex()-t2*iter_w); + + side_b.push_back(line_intersection(p1,last_tangent,p2,curr_tangent)); + } + else if(cross>0 && perp>1) + { + float amount(max(0.0f,(float)(cross/CUSP_THRESHOLD))*(SPIKE_AMOUNT-1)+1); + + side_a.push_back(iter->get_vertex()+(t1+t2).norm()*iter_w*amount); + } + else if(cross<0 && perp>1) + { + float amount(max(0.0f,(float)(-cross/CUSP_THRESHOLD))*(SPIKE_AMOUNT-1)+1); + + side_b.push_back(iter->get_vertex()-(t1+t2).norm()*iter_w*amount); + } + } + + // Make the outline + if(homogeneous_width) + { + const float length(curve.length()); + float dist(0); + Point lastpoint; + for(float n=0.0f;n<0.999999f;n+=1.0f/SAMPLES) + { + const Vector d(deriv(n>CUSP_TANGENT_ADJUST?n:CUSP_TANGENT_ADJUST).perp().norm()); + const Vector p(curve(n)); + + if(n) + dist+=(p-lastpoint).mag(); + + const float w(((next_w-iter_w)*(dist/length)+iter_w)); + + side_a.push_back(p+d*w); + side_b.push_back(p-d*w); + + lastpoint=p; + } + } + else + for(float n=0.0f;n<0.999999f;n+=1.0f/SAMPLES) + { + const Vector d(deriv(n>CUSP_TANGENT_ADJUST?n:CUSP_TANGENT_ADJUST).perp().norm()); + const Vector p(curve(n)); + const float w(((next_w-iter_w)*n+iter_w)); + + side_a.push_back(p+d*w); + side_b.push_back(p-d*w); + } + last_tangent=deriv(1.0-CUSP_TANGENT_ADJUST); + side_a.push_back(curve(1.0)+last_tangent.perp().norm()*next_w); + side_b.push_back(curve(1.0)-last_tangent.perp().norm()*next_w); + + first=false; + } + + if(loop) + { + reverse(side_b.begin(),side_b.end()); + add_polygon(side_a); + add_polygon(side_b); + return; + } + + // Insert code for adding end tip + if(round_tip[1] && !loop && side_a.size()) + { + // remove the last point + side_a.pop_back(); + + const Point vertex(bline.back().get_vertex()); + const Vector tangent(last_tangent.norm()); + const float w((bline.back().get_width()*width)*0.5f+expand); + + hermite curve( + vertex+tangent.perp()*w, + vertex-tangent.perp()*w, + tangent*w*ROUND_END_FACTOR, + -tangent*w*ROUND_END_FACTOR + ); + + for(float n=0.0f;n<0.999999f;n+=1.0f/SAMPLES) + side_a.push_back(curve(n)); + } + + for(;!side_b.empty();side_b.pop_back()) + side_a.push_back(side_b.back()); + + // Insert code for adding begin tip + if(round_tip[0] && !loop && side_a.size()) + { + // remove the last point + side_a.pop_back(); + + const Point vertex(bline.front().get_vertex()); + const Vector tangent(first_tangent.norm()); + const float w((bline.front().get_width()*width)*0.5f+expand); + + hermite curve( + vertex-tangent.perp()*w, + vertex+tangent.perp()*w, + -tangent*w*ROUND_END_FACTOR, + tangent*w*ROUND_END_FACTOR + ); + + for(float n=0.0f;n<0.999999f;n+=1.0f/SAMPLES) + side_a.push_back(curve(n)); + } + + add_polygon(side_a); + + +#else /* 1 */ + + bool loop_; + if(bline.get_contained_type()==ValueBase::TYPE_BLINEPOINT) + { + ValueBase value(bline); + + if(loopyness<0.5f) + { + value.set_loop(false); + loop_=false; + } + else + loop_=value.get_loop(); + + segment_list=convert_bline_to_segment_list(value); + width_list=convert_bline_to_width_list(value); + } + else + { + clear(); + return; + } + + + + if(segment_list.empty()) + { + synfig::warning("Outline: segment_list is empty, layer disabled"); + clear(); + return; + } + + + // Repair the width list if we need to + { + Real default_width; + if(width_list.empty()) + default_width=0.01; + else + default_width=width_list.back(); + + while(width_list.size()segment_list.size()+1) + width_list.pop_back(); + + } + + // Repair the zero tangents (if any) + { + vector::iterator iter; + for(iter=segment_list.begin();iter!=segment_list.end();++iter) + { + if(iter->t1.mag_squared()<=EPSILON && iter->t2.mag_squared()<=EPSILON) + iter->t1=iter->t2=iter->p2-iter->p1; + } + } + + vector::iterator iter; + vector scaled_width_list; + for(iter=width_list.begin();iter!=width_list.end();++iter) + { + scaled_width_list.push_back((*iter*width+expand)*0.5f); + } + + Vector::value_type n; + etl::hermite curve; + vector vector_list; + Vector last_tangent(segment_list.back().t2); + clear(); + + if(!loop_) + last_tangent=NO_LOOP_COOKIE; + + { + vector::iterator iter; + vector::iterator witer; + for( + iter=segment_list.begin(), + witer=scaled_width_list.begin(); + iter!=segment_list.end(); + ++iter,++witer) + { + if(iter->t1.mag_squared()<=EPSILON && iter->t2.mag_squared()<=EPSILON) + { + vector_list.push_back(iter->p1-(iter->p2-iter->p1).perp().norm()*witer[0]); + vector_list.push_back((iter->p2-iter->p1)*0.05+iter->p1-(iter->p2-iter->p1).perp().norm()*((witer[1]-witer[0])*0.05+witer[0])); + vector_list.push_back((iter->p2-iter->p1)*0.95+iter->p1-(iter->p2-iter->p1).perp().norm()*((witer[1]-witer[0])*0.95+witer[0])); + vector_list.push_back(iter->p2-(iter->p2-iter->p1).perp().norm()*witer[1]); + } + else + { + curve.p1()=iter->p1; + curve.t1()=iter->t1; + curve.p2()=iter->p2; + curve.t2()=iter->t2; + curve.sync(); + + etl::derivative > deriv(curve); + + // without this if statement, the broken tangents would + // have boxed edges + if(sharp_cusps && last_tangent!=NO_LOOP_COOKIE && !last_tangent.is_equal_to(iter->t1)) + { + //Vector curr_tangent(iter->t1); + Vector curr_tangent(deriv(CUSP_TANGENT_ADJUST)); + + const Vector t1(last_tangent.perp().norm()); + const Vector t2(curr_tangent.perp().norm()); + + Point p1(iter->p1+t1*witer[0]); + Point p2(iter->p1+t2*witer[0]); + + Real cross(t1*t2.perp()); + + if(cross>CUSP_THRESHOLD) + vector_list.push_back(line_intersection(p1,last_tangent,p2,curr_tangent)); + else if(cross>0) + { + float amount(max(0.0f,(float)(cross/CUSP_THRESHOLD))*(SPIKE_AMOUNT-1)+1); + // Push back something to make it look vaguely round; + //vector_list.push_back(iter->p1+(t1*1.25+t2).norm()*witer[0]*amount); + vector_list.push_back(iter->p1+(t1+t2).norm()*witer[0]*amount); + //vector_list.push_back(iter->p1+(t1+t2*1.25).norm()*witer[0]*amount); + } + } + //last_tangent=iter->t2; + last_tangent=deriv(1.0f-CUSP_TANGENT_ADJUST); + + for(n=0.0f;n<1.0f;n+=1.0f/SAMPLES) + vector_list.push_back(curve(n)+deriv(n>CUSP_TANGENT_ADJUST?n:CUSP_TANGENT_ADJUST).perp().norm()*((witer[1]-witer[0])*n+witer[0]) ); + vector_list.push_back(curve(1.0)+deriv(1.0-CUSP_TANGENT_ADJUST).perp().norm()*witer[1]); + + } + } + if(round_tip[1] && !loop_/* && (!sharp_cusps || segment_list.front().p1!=segment_list.back().p2)*/) + { + // remove the last point + vector_list.pop_back(); + + iter--; + + curve.p1()=iter->p2+Vector(last_tangent[1],-last_tangent[0]).norm()*(*witer); + curve.p2()=iter->p2-(Vector(last_tangent[1],-last_tangent[0]).norm()*(*witer)); + curve.t2()=-(curve.t1()=last_tangent/last_tangent.mag()*(*witer)*ROUND_END_FACTOR); + curve.sync(); + for(n=0.0f;n<1.0f;n+=1.0f/SAMPLES) + vector_list.push_back(curve(n)); + + // remove the last point + vector_list.pop_back(); + } + } + + if(!loop_) + last_tangent=NO_LOOP_COOKIE; + else + { + add_polygon(vector_list); + vector_list.clear(); + last_tangent=segment_list.front().t1; + } + + //else + // last_tangent=segment_list.back().t2; + + { + vector::reverse_iterator iter; + vector::reverse_iterator witer; + for( + iter=segment_list.rbegin(), + witer=scaled_width_list.rbegin(),++witer; + !(iter==segment_list.rend()); + ++iter,++witer) + { + + if(iter->t1.mag_squared()<=EPSILON && iter->t2.mag_squared()<=EPSILON) + { + vector_list.push_back(iter->p2+(iter->p2-iter->p1).perp().norm()*witer[0]); + vector_list.push_back((iter->p2-iter->p1)*0.95+iter->p1+(iter->p2-iter->p1).perp().norm()*((witer[-1]-witer[0])*0.95+witer[0])); + vector_list.push_back((iter->p2-iter->p1)*0.05+iter->p1+(iter->p2-iter->p1).perp().norm()*((witer[-1]-witer[0])*0.05+witer[0])); + vector_list.push_back(iter->p1+(iter->p2-iter->p1).perp().norm()*witer[-1]); + } + else + { + curve.p1()=iter->p1; + curve.t1()=iter->t1; + curve.p2()=iter->p2; + curve.t2()=iter->t2; + curve.sync(); + + etl::derivative > deriv(curve); + + // without this if statement, the broken tangents would + // have boxed edges + if(sharp_cusps && last_tangent!=NO_LOOP_COOKIE && !last_tangent.is_equal_to(iter->t2)) + { + //Vector curr_tangent(iter->t2); + Vector curr_tangent(deriv(1.0f-CUSP_TANGENT_ADJUST)); + + const Vector t1(last_tangent.perp().norm()); + const Vector t2(curr_tangent.perp().norm()); + + Point p1(iter->p2-t1*witer[-1]); + Point p2(iter->p2-t2*witer[-1]); + + Real cross(t1*t2.perp()); + + //if(last_tangent.perp().norm()*curr_tangent.norm()<-CUSP_THRESHOLD) + if(cross>CUSP_THRESHOLD) + vector_list.push_back(line_intersection(p1,last_tangent,p2,curr_tangent)); + else if(cross>0) + { + float amount(max(0.0f,(float)(cross/CUSP_THRESHOLD))*(SPIKE_AMOUNT-1)+1); + // Push back something to make it look vaguely round; + //vector_list.push_back(iter->p2-(t1*1.25+t2).norm()*witer[-1]*amount); + vector_list.push_back(iter->p2-(t1+t2).norm()*witer[-1]*amount); + //vector_list.push_back(iter->p2-(t1+t2*1.25).norm()*witer[-1]*amount); + } + } + //last_tangent=iter->t1; + last_tangent=deriv(CUSP_TANGENT_ADJUST); + + for(n=1.0f;n>CUSP_TANGENT_ADJUST;n-=1.0f/SAMPLES) + vector_list.push_back(curve(n)-deriv(1-n>CUSP_TANGENT_ADJUST?n:1-CUSP_TANGENT_ADJUST).perp().norm()*((witer[-1]-witer[0])*n+witer[0]) ); + vector_list.push_back(curve(0.0f)-deriv(CUSP_TANGENT_ADJUST).perp().norm()*witer[0]); + } + } + if(round_tip[0] && !loop_/* && (!sharp_cusps || segment_list.front().p1!=segment_list.back().p2)*/) + { + // remove the last point + vector_list.pop_back(); + iter--; + witer--; + + curve.p1()=iter->p1+Vector(last_tangent[1],-last_tangent[0]).norm()*(*witer); + curve.p2()=iter->p1-(Vector(last_tangent[1],-last_tangent[0]).norm()*(*witer)); + curve.t1()=-(curve.t2()=last_tangent/last_tangent.mag()*(*witer)*ROUND_END_FACTOR); + curve.sync(); + + for(n=1.0;n>0.0;n-=1.0/SAMPLES) + vector_list.push_back(curve(n)); + + // remove the last point + vector_list.pop_back(); + } + } + + //if(loop_) + // reverse(vector_list.begin(),vector_list.end()); + +#ifdef _DEBUG + { + vector::iterator iter; + for(iter=vector_list.begin();iter!=vector_list.end();++iter) + if(!iter->is_valid()) + { + synfig::error("Outline::sync(): Bad point in vector_list!"); + } + //synfig::info("BLEHH__________--- x:%f, y:%f",vector_list.front()[0],vector_list.front()[1]); + } +#endif /* _DEBUG */ + + add_polygon(vector_list); + + +#endif /* 1 */ + } catch (...) { synfig::error("Outline::sync(): Exception thrown"); throw; } +} + +#undef bline + +bool +Outline::set_param(const String & param, const ValueBase &value) +{ + if(param=="segment_list") + { + if(dynamic_param_list().count("segment_list")) + { + connect_dynamic_param("bline",dynamic_param_list().find("segment_list")->second); + disconnect_dynamic_param("segment_list"); + synfig::warning("Outline::set_param(): Updated valuenode connection to use the new \"bline\" parameter."); + } + else + synfig::warning("Outline::set_param(): The parameter \"segment_list\" is deprecated. Use \"bline\" instead."); + } + + if( (param=="segment_list" || param=="bline") && value.get_type()==ValueBase::TYPE_LIST) + { + //if(value.get_contained_type()!=ValueBase::TYPE_BLINEPOINT) + // return false; + + bline=value; + + return true; + } + /* + if( param=="seg" && value.get_type()==ValueBase::TYPE_SEGMENT) + { + if(!segment_list.empty()) + segment_list.clear(); + + segment_list.push_back(value.get(Segment())); + loop_=false; + //sync(); + return true; + } + if( param=="w[0]" && value.get_type()==ValueBase::TYPE_REAL) + { + if(width_list.size()<2) + { + width_list.push_back(value.get(Real())); + width_list.push_back(value.get(Real())); + } + else + { + width_list[0]=value.get(Real()); + } + width=1; + //sync(); + return true; + } + + if( param=="w[1]" && value.get_type()==ValueBase::TYPE_REAL) + { + if(width_list.size()<2) + { + width_list.push_back(value.get(Real())); + width_list.push_back(value.get(Real())); + } + else + { + width_list[1]=value.get(Real()); + } + width=1; + //sync(); + return true; + } + + if( param=="width_list" && value.same_type_as(width_list)) + { + width_list=value; + //sync(); + return true; + } + */ + + IMPORT(round_tip[0]); + IMPORT(round_tip[1]); + IMPORT(sharp_cusps); + IMPORT_PLUS(width,if(old_version){width*=2.0;}); + IMPORT(loopyness); + IMPORT(expand); + IMPORT(homogeneous_width); + + if(param!="vector_list") + return Layer_Polygon::set_param(param,value); + + return false; +} + +void +Outline::set_time(Context context, Time time)const +{ + const_cast(this)->sync(); + context.set_time(time); +} + +void +Outline::set_time(Context context, Time time, Vector pos)const +{ + const_cast(this)->sync(); + context.set_time(time,pos); +} + +ValueBase +Outline::get_param(const String& param)const +{ + EXPORT(bline); + EXPORT(expand); + //EXPORT(width_list); + //EXPORT(segment_list); + EXPORT(homogeneous_width); + EXPORT(round_tip[0]); + EXPORT(round_tip[1]); + EXPORT(sharp_cusps); + EXPORT(width); + EXPORT(loopyness); + + EXPORT_NAME(); + EXPORT_VERSION(); + + if(param!="vector_list") + return Layer_Polygon::get_param(param); + return ValueBase(); +} + +Layer::Vocab +Outline::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Polygon::get_param_vocab()); + + // Pop off the polygon parameter from the polygon vocab + ret.pop_back(); + + ret.push_back(ParamDesc("bline") + .set_local_name(_("Vertices")) + .set_origin("origin") + .set_hint("width") + .set_description(_("A list of BLine Points")) + ); + + /* + ret.push_back(ParamDesc("width_list") + .set_local_name(_("Point Widths")) + .set_origin("segment_list") + .hidden() + .not_critical() + ); + */ + + ret.push_back(ParamDesc("width") + .set_is_distance() + .set_local_name(_("Outline Width")) + ); + + ret.push_back(ParamDesc("expand") + .set_is_distance() + .set_local_name(_("Expand")) + ); + + ret.push_back(ParamDesc("sharp_cusps") + .set_local_name(_("Sharp Cusps")) + .set_description(_("Determines cusp type")) + ); + + ret.push_back(ParamDesc("round_tip[0]") + .set_local_name(_("Rounded Begin")) + .set_description(_("Round off the tip")) + ); + + ret.push_back(ParamDesc("round_tip[1]") + .set_local_name(_("Rounded End")) + .set_description(_("Round off the tip")) + ); + ret.push_back(ParamDesc("loopyness") + .set_local_name(_("Loopyness")) + ); + ret.push_back(ParamDesc("homogeneous_width") + .set_local_name(_("Homogeneous")) + ); + + return ret; +} diff --git a/synfig-core/src/modules/mod_geometry/outline.h b/synfig-core/src/modules/mod_geometry/outline.h new file mode 100644 index 0000000..bf1a54f --- /dev/null +++ b/synfig-core/src/modules/mod_geometry/outline.h @@ -0,0 +1,94 @@ +/* === S Y N F I G ========================================================= */ +/*! \file outline.h +** \brief Header file for implementation of the "Outline" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_OUTLINE_H +#define __SYNFIG_OUTLINE_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +class Outline : public synfig::Layer_Polygon +{ + SYNFIG_LAYER_MODULE_EXT +private: + + synfig::ValueBase bline; + + std::vector segment_list; + std::vector width_list; + + bool round_tip[2]; + + bool sharp_cusps; + + bool loop_; + + synfig::Real width; + + synfig::Real expand; + + Real loopyness; + bool old_version; + + bool needs_sync; + + bool homogeneous_width; + +public: + + Outline(); + + //! Updates the polygon data to match the parameters. + void sync(); + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + + virtual ValueBase get_param(const String & param)const; + + virtual Vocab get_param_vocab()const; + virtual void set_time(Context context, Time time)const; + virtual void set_time(Context context, Time time, Vector pos)const; + virtual bool set_version(const String &ver){if(ver=="0.1")old_version=true; return true;} + virtual void reset_version(){old_version=false;} + +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_geometry/rectangle.cpp b/synfig-core/src/modules/mod_geometry/rectangle.cpp new file mode 100644 index 0000000..374af9c --- /dev/null +++ b/synfig-core/src/modules/mod_geometry/rectangle.cpp @@ -0,0 +1,632 @@ +/* === S Y N F I G ========================================================= */ +/*! \file rectangle.cpp +** \brief Implementation of the "Rectangle" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "rectangle.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace etl; +using namespace std; +using namespace synfig; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Rectangle); +SYNFIG_LAYER_SET_NAME(Rectangle,"rectangle"); +SYNFIG_LAYER_SET_LOCAL_NAME(Rectangle,N_("Rectangle")); +SYNFIG_LAYER_SET_CATEGORY(Rectangle,N_("Geometry")); +SYNFIG_LAYER_SET_VERSION(Rectangle,"0.2"); +SYNFIG_LAYER_SET_CVS_ID(Rectangle,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* +inline int ceil_to_int(const float x) { return static_cast(ceil(x)); } +inline int ceil_to_int(const double x) { return static_cast(ceil(x)); } + +inline int floor_to_int(const float x) { return static_cast(floor(x)); } +inline int floor_to_int(const double x) { return static_cast(floor(x)); } +*/ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +Rectangle::Rectangle(): + Layer_Composite(1.0,Color::BLEND_STRAIGHT), + color(Color::black()), + point1(0,0), + point2(1,1), + expand(0), + invert(false) +{ +} + +bool +Rectangle::set_param(const String & param, const ValueBase &value) +{ + IMPORT_PLUS(color, { if (color.get_a() == 0) { if (converted_blend_) { + set_blend_method(Color::BLEND_ALPHA_OVER); + color.set_a(1); } else transparent_color_ = true; } }); + IMPORT(point1); + IMPORT(point2); + IMPORT(expand); + IMPORT(invert); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +Rectangle::get_param(const String ¶m)const +{ + EXPORT(color); + EXPORT(point1); + EXPORT(point2); + EXPORT(expand); + EXPORT(invert); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +Rectangle::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("color") + .set_local_name(_("Color")) + ); + + ret.push_back(ParamDesc("point1") + .set_local_name(_("Point 1")) + .set_box("point2") + ); + + ret.push_back(ParamDesc("point2") + .set_local_name(_("Point 2")) + ); + + ret.push_back(ParamDesc("expand") + .set_is_distance() + .set_local_name(_("Expand amount")) + ); + + ret.push_back(ParamDesc("invert") + .set_local_name(_("Invert the rectangle")) + ); + + return ret; +} + +synfig::Layer::Handle +Rectangle::hit_check(synfig::Context context, const synfig::Point &pos)const +{ + if(is_disabled()) + return context.hit_check(pos); + + Point max,min; + + max[0]=std::max(point1[0],point2[0])+expand; + max[1]=std::max(point1[1],point2[1])+expand; + min[0]=std::min(point1[0],point2[0])-expand; + min[1]=std::min(point1[1],point2[1])-expand; + + bool intersect(false); + + if( pos[0]min[0] && + pos[1]min[1] ) + { + intersect=true; + } + + if(invert) + intersect=!intersect; + + if(intersect) + { + synfig::Layer::Handle tmp; + if(get_blend_method()==Color::BLEND_BEHIND && (tmp=context.hit_check(pos))) + return tmp; + if(Color::is_onto(get_blend_method()) && !(tmp=context.hit_check(pos))) + return 0; + return const_cast(this); + } + + return context.hit_check(pos); +} + +bool +Rectangle::is_solid_color()const +{ + return Layer_Composite::is_solid_color() || + (get_blend_method() == Color::BLEND_COMPOSITE && + get_amount() == 1.0f && + color.get_a() == 1.0f); +} + +Color +Rectangle::get_color(Context context, const Point &pos)const +{ + if(is_disabled()) + return context.get_color(pos); + + Point max,min; + + max[0]=std::max(point1[0],point2[0])+expand; + max[1]=std::max(point1[1],point2[1])+expand; + min[0]=std::min(point1[0],point2[0])-expand; + min[1]=std::min(point1[1],point2[1])-expand; + +/************************** +// This is darco's old-old-old feathered box code +// it produces really nice feathered edges + if(feather!=0.0) + { + if( pos[0]<=max[0]-feather/2.0 && pos[0]>=min[0]+feather/2.0 && + pos[1]<=max[1]-feather/2.0 && pos[1]>=min[1]+feather/2.0 ) + { + if(invert) + return (*context).GetColor(context,pos); + else + return color; + } + + if( pos[0]>=max[0]+feather/2.0 || pos[0]<=min[0]-feather/2.0 || + pos[1]>=max[1]+feather/2.0 || pos[1]<=min[1]-feather/2.0 ) + { + if(invert) + return color; + else + return (*context).GetColor(context,pos); + } + + Color::unit alpha=1000000; + Color::unit alpha2=1000000; + + if(max[0]-pos[0]+feather/2.0=feather) + { + if(invert) + return color; + else + return (*context).GetColor(context,pos); + } + + alpha=feather-alpha; + } + else + { + alpha=(alphamin[0] && + pos[1]min[1] ) + { + // inside the expanded rectangle + if(invert) + return Color::blend(Color::alpha(),context.get_color(pos),get_amount(),get_blend_method()); + + if(is_solid_color()) + return color; + + return Color::blend(color,context.get_color(pos),get_amount(),get_blend_method()); + } + else + { + // outside the expanded rectangle + if(!invert) + return Color::blend(Color::alpha(),context.get_color(pos),get_amount(),get_blend_method()); + + if(is_solid_color()) + return color; + + return Color::blend(color,context.get_color(pos),get_amount(),get_blend_method()); + } +} + +bool +Rectangle::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + if(is_disabled()) + return context.accelerated_render(surface,quality,renddesc,cb); + + const Point tl(renddesc.get_tl()); + const Point br(renddesc.get_br()); + + const int w(renddesc.get_w()); + const int h(renddesc.get_h()); + + // Width and Height of a pixel + const Real pw = (br[0] - tl[0]) / w; + const Real ph = (br[1] - tl[1]) / h; + + Point max(point1),min(point2); + + + + + /* + + if(invert) + { + max=context.get_bounding_rect().get_max(); + min=context.get_bounding_rect().get_min(); + } + else + { + max=context.get_full_bounding_rect().get_max(); + min=context.get_full_bounding_rect().get_min(); + } + */ + + + + + + if((min[0] > max[0]) ^ (pw < 0))swap(min[0],max[0]); + if((min[1] > max[1]) ^ (ph < 0))swap(min[1],max[1]); + + if(min[0] > max[0]) + { + min[0]+=expand; + max[0]-=expand; + } + else + { + min[0]-=expand; + max[0]+=expand; + } + + if(min[1] > max[1]) + { + min[1]+=expand; + max[1]-=expand; + } + else + { + min[1]-=expand; + max[1]+=expand; + } + + if(invert) + { + int left(floor_to_int((min[0]-tl[0])/pw)); + int right(ceil_to_int((max[0]-tl[0])/pw)); + int top(floor_to_int((min[1]-tl[1])/ph)); + int bottom(ceil_to_int((max[1]-tl[1])/ph)); + + float left_edge((min[0]-tl[0])/pw-float(left)); + float right_edge(float(right)-(max[0]-tl[0])/pw); + float top_edge((min[1]-tl[1])/ph-float(top)); + float bottom_edge(float(bottom)-(max[1]-tl[1])/ph); + + if(top<0)top=0,top_edge=0; + if(left<0)left=0,left_edge=0; + if(bottom>h)bottom=h,bottom_edge=0; + if(right>w)right=w,right_edge=0; + + if(is_solid_color()) + { + Surface subimage; + RendDesc desc(renddesc); + desc.set_flags(0); + + //fill the surface with the background color initially + surface->set_wh(w,h); + surface->fill(color); + + // Check for the case where there is nothing to render + if (right <= left || bottom <= top) + return true; + + desc.set_subwindow(left,top,right-left,bottom-top); + + // Render what is behind us + if(!context.accelerated_render(&subimage,quality,desc,cb)) + { + if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); + return false; + } + + Surface::pen pen(surface->get_pen(left,top)); + + subimage.blit_to(pen); + } + else + { + if(!context.accelerated_render(surface,quality,renddesc,cb)) + { + if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); + return false; + } + + Surface subimage; + + // Check for the case where there is something to render + if (right > left && bottom > top) + { + // save a copy of the overlapping region from surface into subimage + subimage.set_wh(right-left,bottom-top); + Surface::pen subimage_pen(subimage.begin()); + surface->blit_to(subimage_pen,left,top,right-left,bottom-top); + } + + // fill surface with the rectangle's color + Surface::alpha_pen surface_pen(surface->begin(),get_amount(),get_blend_method()); + surface->fill(color,surface_pen,w,h); + + if (subimage) + { + // copy the saved overlapping region back from subimage into surface + Surface::pen pen(surface->get_pen(left,top)); + subimage.blit_to(pen); + } + else + // if there's no overlapping region, return now of the following code corrupts memory + return true; + } + + Surface::alpha_pen pen; + + if(bottom-1>=0 && bottom_edge) + { + pen=Surface::alpha_pen(surface->get_pen(left,bottom-1),get_amount()*bottom_edge,get_blend_method()); + surface->fill(color,pen,right-left,1); + } + + if(right-1>=0 && right_edge) + { + pen=Surface::alpha_pen(surface->get_pen(right-1,top),get_amount()*right_edge,get_blend_method()); + surface->fill(color,pen,1,bottom-top); + } + + if(left>=0 && left_edge) + { + pen=Surface::alpha_pen(surface->get_pen(left,top),get_amount()*left_edge,get_blend_method()); + surface->fill(color,pen,1,bottom-top); + } + + if(top>=0 && top_edge) + { + pen=Surface::alpha_pen(surface->get_pen(left,top),get_amount()*top_edge,get_blend_method()); + surface->fill(color,pen,right-left,1); + } + + return true; + } + + // not inverted + + int left(ceil_to_int((min[0]-tl[0])/pw)); + int right(floor_to_int((max[0]-tl[0])/pw)); + int top(ceil_to_int((min[1]-tl[1])/ph)); + int bottom(floor_to_int((max[1]-tl[1])/ph)); + + float left_edge(float(left)-(min[0]-tl[0])/pw); + float right_edge((max[0]-tl[0])/pw-float(right)); + float top_edge(float(top)-(min[1]-tl[1])/ph); + float bottom_edge((max[1]-tl[1])/ph-float(bottom)); + + if(top<=0)top=0,top_edge=0; + if(left<=0)left=0,left_edge=0; + if(bottom>=h)bottom=h,bottom_edge=0; + if(right>=w)right=w,right_edge=0; + +/* + top = std::max(0,top); + left = std::max(0,left); + bottom = std::min(h,bottom); + right = std::min(w,right); +*/ + + // optimization - if the whole tile is covered by this rectangle, + // and the rectangle is a solid color, we don't need to render + // what's behind us + if (is_solid_color() && top == 0 && left == 0 && bottom == h && right == w) + { + surface->set_wh(w,h); + surface->fill(color); + return true; + } + + // Render what is behind us + if(!context.accelerated_render(surface,quality,renddesc,cb)) + { + if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); + return false; + } + + // In the case where there is nothing to render... + if (right < left || bottom < top) + return true; + + Surface::alpha_pen pen; + + if(right-left>0&&bottom-top>0) + { + if(is_solid_color()) + surface->fill(color,left,top,right-left,bottom-top); + else + { + pen=Surface::alpha_pen(surface->get_pen(left,top),get_amount(),get_blend_method()); + surface->fill(color,pen,right-left,bottom-top); + } + } + + if(bottomget_h() && bottom_edge>=0.0001) + { + pen=Surface::alpha_pen(surface->get_pen(left,bottom),get_amount()*bottom_edge,get_blend_method()); + surface->fill(color,pen,right-left,1); + } + + if(rightget_w() && right_edge>=0.0001) + { + pen=Surface::alpha_pen(surface->get_pen(right,top),get_amount()*right_edge,get_blend_method()); + surface->fill(color,pen,1,bottom-top); + } + + if(left>0 && left_edge>=0.0001) + { + pen=Surface::alpha_pen(surface->get_pen(left-1,top),get_amount()*left_edge,get_blend_method()); + surface->fill(color,pen,1,bottom-top); + } + + if(top>0 && top_edge>=0.0001) + { + pen=Surface::alpha_pen(surface->get_pen(left,top-1),get_amount()*top_edge,get_blend_method()); + surface->fill(color,pen,right-left,1); + } + + + return true; +} + +Rect +Rectangle::get_bounding_rect()const +{ + if(invert) + return Rect::full_plane(); + + Point max(point1),min(point2); + if((min[0] > max[0]))swap(min[0],max[0]); + if((min[1] > max[1]))swap(min[1],max[1]); + if(min[0] > max[0]) + { + min[0]+=expand; + max[0]-=expand; + } + else + { + min[0]-=expand; + max[0]+=expand; + } + + if(min[1] > max[1]) + { + min[1]+=expand; + max[1]-=expand; + } + else + { + min[1]-=expand; + max[1]+=expand; + } + + Rect bounds(min,max); + + return bounds; +} + +Rect +Rectangle::get_full_bounding_rect(Context context)const +{ + if(invert) + { + if(is_solid_color() && color.get_a()==0) + { + Point max(point1),min(point2); + if((min[0] > max[0]))swap(min[0],max[0]); + if((min[1] > max[1]))swap(min[1],max[1]); + if(min[0] > max[0]) + { + min[0]+=expand; + max[0]-=expand; + } + else + { + min[0]-=expand; + max[0]+=expand; + } + + if(min[1] > max[1]) + { + min[1]+=expand; + max[1]-=expand; + } + else + { + min[1]-=expand; + max[1]+=expand; + } + + Rect bounds(min,max); + + return bounds & context.get_full_bounding_rect(); + } + return Rect::full_plane(); + } + + return Layer_Composite::get_full_bounding_rect(context); +} diff --git a/synfig-core/src/modules/mod_geometry/rectangle.h b/synfig-core/src/modules/mod_geometry/rectangle.h new file mode 100644 index 0000000..add217c --- /dev/null +++ b/synfig-core/src/modules/mod_geometry/rectangle.h @@ -0,0 +1,81 @@ +/* === S Y N F I G ========================================================= */ +/*! \file rectangle.h +** \brief Header file for implementation of the "Rectangle" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_FILLEDRECT_H +#define __SYNFIG_FILLEDRECT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class Rectangle : public synfig::Layer_Composite, public synfig::Layer_NoDeform +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + synfig::Color color; + + synfig::Point point1; + synfig::Point point2; + + synfig::Real expand; + + bool invert; + +public: + + Rectangle(); + + virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); + + virtual synfig::ValueBase get_param(const synfig::String & param)const; + + virtual bool is_solid_color()const; + + virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; + + virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; + + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + + virtual synfig::Rect get_bounding_rect()const; + virtual synfig::Rect get_full_bounding_rect(synfig::Context context)const; + + virtual Vocab get_param_vocab()const; +}; // END of class FilledRect + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_geometry/region.cpp b/synfig-core/src/modules/mod_geometry/region.cpp new file mode 100644 index 0000000..462d30e --- /dev/null +++ b/synfig-core/src/modules/mod_geometry/region.cpp @@ -0,0 +1,251 @@ +/* === S Y N F I G ========================================================= */ +/*! \file region.cpp +** \brief Implementation of the "Region" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "region.h" +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +using namespace etl; + +/* === M A C R O S ========================================================= */ + +#define SAMPLES 75 + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Region); +SYNFIG_LAYER_SET_NAME(Region,"region"); +SYNFIG_LAYER_SET_LOCAL_NAME(Region,N_("Region")); +SYNFIG_LAYER_SET_CATEGORY(Region,N_("Geometry")); +SYNFIG_LAYER_SET_VERSION(Region,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Region,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +Region::Region() +{ + clear(); + vector bline_point_list; + bline_point_list.push_back(BLinePoint()); + bline_point_list.push_back(BLinePoint()); + bline_point_list.push_back(BLinePoint()); + bline_point_list[0].set_vertex(Point(0,1)); + bline_point_list[1].set_vertex(Point(0,-1)); + bline_point_list[2].set_vertex(Point(1,0)); + bline_point_list[0].set_tangent(bline_point_list[1].get_vertex()-bline_point_list[2].get_vertex()*0.5f); + bline_point_list[1].set_tangent(bline_point_list[2].get_vertex()-bline_point_list[0].get_vertex()*0.5f); + bline_point_list[2].set_tangent(bline_point_list[0].get_vertex()-bline_point_list[1].get_vertex()*0.5f); + bline_point_list[0].set_width(1.0f); + bline_point_list[1].set_width(1.0f); + bline_point_list[2].set_width(1.0f); + bline=bline_point_list; +} + +void +Region::sync() +{ + if(bline.get_contained_type()==ValueBase::TYPE_BLINEPOINT) + segment_list=convert_bline_to_segment_list(bline); + else if(bline.get_contained_type()==ValueBase::TYPE_SEGMENT) + segment_list=vector(bline.get_list().begin(), bline.get_list().end()); + else + { + synfig::warning("Region: incorrect type on bline, layer disabled"); + clear(); + return; + } + + if(segment_list.empty()) + { + synfig::warning("Region: segment_list is empty, layer disabled"); + clear(); + return; + } + + bool looped = bline.get_loop(); + + Vector::value_type n; + etl::hermite curve; + vector vector_list; + + vector::const_iterator iter=segment_list.begin(); + //Vector last = iter->p1; + + //make sure the shape has a clean slate for writing + //clear(); + + //and start off at the first point + //move_to(last[0],last[1]); + + for(;iter!=segment_list.end();++iter) + { + //connect them with a line if they aren't already joined + /*if(iter->p1 != last) + { + line_to(iter->p1[0],iter->p1[1]); + } + + //curve to the next end point + curve_to(iter->p1[0] + iter->t1[0]/3.0,iter->p1[1] + iter->t1[1]/3.0, + iter->p2[0] - iter->t2[0]/3.0,iter->p2[1] - iter->t2[1]/3.0, + iter->p2[0],iter->p2[1]); + + last = iter->p2;*/ + + if(iter->t1.is_equal_to(Vector(0,0)) && iter->t2.is_equal_to(Vector(0,0))) + { + vector_list.push_back(iter->p2); + } + else + { + curve.p1()=iter->p1; + curve.t1()=iter->t1; + curve.p2()=iter->p2; + curve.t2()=iter->t2; + curve.sync(); + + for(n=0.0;n<1.0;n+=1.0/SAMPLES) + vector_list.push_back(curve(n)); + } + } + + //add the starting point onto the end so it actually fits the shape, so we can be extra awesome... + if(!looped) + vector_list.push_back(segment_list[0].p1); + + clear(); + add_polygon(vector_list); + + /*close(); + endpath();*/ +} + +bool +Region::set_param(const String & param, const ValueBase &value) +{ + if(param=="segment_list") + { + if(dynamic_param_list().count("segment_list")) + { + connect_dynamic_param("bline",dynamic_param_list().find("segment_list")->second); + disconnect_dynamic_param("segment_list"); + synfig::warning("Region::set_param(): Updated valuenode connection to use the new \"bline\" parameter."); + } + else + synfig::warning("Region::set_param(): The parameter \"segment_list\" is deprecated. Use \"bline\" instead."); + } + + if( (param=="segment_list" || param=="bline") && value.get_type()==ValueBase::TYPE_LIST) + { + //if(value.get_contained_type()!=ValueBase::TYPE_BLINEPOINT) + // return false; + + bline=value; + + return true; + } + +/* if( param=="segment_list" && value.get_type()==ValueBase::TYPE_LIST) + { + if(value.get_contained_type()==ValueBase::TYPE_BLINEPOINT) + segment_list=convert_bline_to_segment_list(value); + else + if(value.get_contained_type()==ValueBase::TYPE_SEGMENT) + segment_list=value; + else + if(value.empty()) + segment_list.clear(); + else + return false; + sync(); + return true; + } + */ + return Layer_Shape::set_param(param,value); +} + +ValueBase +Region::get_param(const String& param)const +{ + EXPORT(bline); + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Shape::get_param(param); +} + +Layer::Vocab +Region::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Shape::get_param_vocab()); + + ret.push_back(ParamDesc("bline") + .set_local_name(_("Vertices")) + .set_origin("origin") + ); + + return ret; +} + +void +Region::set_time(Context context, Time time)const +{ + const_cast(this)->sync(); + context.set_time(time); +} + +void +Region::set_time(Context context, Time time, Vector pos)const +{ + const_cast(this)->sync(); + context.set_time(time,pos); +} diff --git a/synfig-core/src/modules/mod_geometry/region.h b/synfig-core/src/modules/mod_geometry/region.h new file mode 100644 index 0000000..38e33f3 --- /dev/null +++ b/synfig-core/src/modules/mod_geometry/region.h @@ -0,0 +1,73 @@ +/* === S Y N F I G ========================================================= */ +/*! \file region.h +** \brief Header file for implementation of the "Region" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_REGION_H +#define __SYNFIG_REGION_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { class Segment; } + +using namespace synfig; +using namespace std; +using namespace etl; + +class Region : protected synfig::Layer_Polygon//Shape +{ + SYNFIG_LAYER_MODULE_EXT +private: + synfig::ValueBase bline; + std::vector segment_list; +public: + Region(); + + //! Updates the polygon data to match the parameters. + void sync(); + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + + virtual ValueBase get_param(const String & param)const; + + virtual Vocab get_param_vocab()const; + virtual void set_time(Context context, Time time)const; + virtual void set_time(Context context, Time time, Vector pos)const; + +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_geometry/star.cpp b/synfig-core/src/modules/mod_geometry/star.cpp new file mode 100644 index 0000000..cb1d8e6 --- /dev/null +++ b/synfig-core/src/modules/mod_geometry/star.cpp @@ -0,0 +1,204 @@ +/* === S Y N F I G ========================================================= */ +/*! \file star.cpp +** \brief Implementation of the "Star" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007-2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "star.h" +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +using namespace etl; + +/* === M A C R O S ========================================================= */ + +#define SAMPLES 75 + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Star); +SYNFIG_LAYER_SET_NAME(Star,"star"); +SYNFIG_LAYER_SET_LOCAL_NAME(Star,N_("Star")); +SYNFIG_LAYER_SET_CATEGORY(Star,N_("Geometry")); +SYNFIG_LAYER_SET_VERSION(Star,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Star,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +Star::Star(): + radius1(1.0), + radius2(0.38), + points(5), + angle(Angle::deg(90)), + regular_polygon(false) +{ + sync(); +} + +void +Star::sync() +{ + Angle dist_between_points(Angle::rot(1)/float(points)); + std::vector vector_list; + + int i; + for(i=0;i +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +class Star : protected synfig::Layer_Polygon +{ + SYNFIG_LAYER_MODULE_EXT +private: + + Real radius1; + Real radius2; + int points; + Angle angle; + bool regular_polygon; +public: + Star(); + + //! Updates the polygon data to match the parameters. + void sync(); + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + + virtual ValueBase get_param(const String & param)const; + + virtual Vocab get_param_vocab()const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_geometry/unmod_geometry.nsh b/synfig-core/src/modules/mod_geometry/unmod_geometry.nsh new file mode 100644 index 0000000..3f5b516 --- /dev/null +++ b/synfig-core/src/modules/mod_geometry/unmod_geometry.nsh @@ -0,0 +1,8 @@ +Section "un.mod_geometry" + Delete "$INSTDIR\lib\synfig\modules\mod_geometry.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/modules/mod_gif/Makefile.am b/synfig-core/src/modules/mod_gif/Makefile.am new file mode 100644 index 0000000..c59e448 --- /dev/null +++ b/synfig-core/src/modules/mod_gif/Makefile.am @@ -0,0 +1,35 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +moduledir = @MODULE_DIR@ + +module_LTLIBRARIES = libmod_gif.la + +libmod_gif_la_SOURCES = \ + main.cpp \ + trgt_gif.cpp \ + trgt_gif.h + +libmod_gif_la_LDFLAGS = \ + -module \ + -no-undefined \ + -avoid-version + +libmod_gif_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ + +libmod_gif_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @SYNFIG_LIBS@ + + +EXTRA_DIST = \ + mod_gif.nsh \ + unmod_gif.nsh diff --git a/synfig-core/src/modules/mod_gif/main.cpp b/synfig-core/src/modules/mod_gif/main.cpp new file mode 100644 index 0000000..f236426 --- /dev/null +++ b/synfig-core/src/modules/mod_gif/main.cpp @@ -0,0 +1,55 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_gif/main.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "trgt_gif.h" + +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(mod_gif) + MODULE_NAME("GIF Target") + MODULE_DESCRIPTION("Target for the GIF image format (B/W only)") + MODULE_AUTHOR("Robert B. Quattlebaum") + MODULE_VERSION("1.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(mod_gif) + BEGIN_TARGETS + TARGET(gif) + END_TARGETS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mod_gif/mod_gif.nsh b/synfig-core/src/modules/mod_gif/mod_gif.nsh new file mode 100644 index 0000000..17f441b --- /dev/null +++ b/synfig-core/src/modules/mod_gif/mod_gif.nsh @@ -0,0 +1,21 @@ +; The stuff to install +Section "mod_gif" Sec_mod_gif + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=mod_gif.dll "src\modules\mod_gif\.libs\libmod_gif.dll" + + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "mod_gif" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd + diff --git a/synfig-core/src/modules/mod_gif/trgt_gif.cpp b/synfig-core/src/modules/mod_gif/trgt_gif.cpp new file mode 100644 index 0000000..2068995 --- /dev/null +++ b/synfig-core/src/modules/mod_gif/trgt_gif.cpp @@ -0,0 +1,456 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_gif.cpp +** \brief BMP Target Module +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_TARGET + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "trgt_gif.h" +#include +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +#define MAX_FRAME_RATE (20.0) + +/* === G L O B A L S ======================================================= */ + +SYNFIG_TARGET_INIT(gif); +SYNFIG_TARGET_SET_NAME(gif,"gif"); +SYNFIG_TARGET_SET_EXT(gif,"gif"); +SYNFIG_TARGET_SET_VERSION(gif,"0.1"); +SYNFIG_TARGET_SET_CVS_ID(gif,"$Id$"); + +/* === M E T H O D S ======================================================= */ + +gif::gif(const char *filename_): + filename(filename_), + file( (filename=="-")?stdout:fopen(filename_,POPEN_BINARY_WRITE_TYPE) ), + imagecount(0), + + lossy(true), + multi_image(false), + dithering(true), + color_bits(8), + iframe_density(30), + loop_count(0x7fff), + local_palette(true) +{ +} + +gif::~gif() +{ + if(file) + fputc(';',file.get()); // Image terminator +} + +bool +gif::set_rend_desc(RendDesc *given_desc) +{ + if(given_desc->get_frame_rate()>MAX_FRAME_RATE) + given_desc->set_frame_rate(MAX_FRAME_RATE); + + desc=*given_desc; + + if(desc.get_frame_end()-desc.get_frame_start()>0) + { + multi_image=true; + //set_remove_alpha(); + imagecount=desc.get_frame_end()-desc.get_frame_start(); + } + else + multi_image=false; + return true; +} + +bool +gif::init() +{ + int w=desc.get_w(),h=desc.get_h(); + + if(!file) + { + synfig::error(strprintf(_("Unable to open \"%s\" for write access!"),filename.c_str())); + return false; + } + + rootsize=color_bits; // Size of pixel bits + + curr_frame.set_wh(w,h); + prev_frame.set_wh(w,h); + curr_surface.set_wh(w,h); + curr_frame.clear(); + prev_frame.clear(); + curr_surface.clear(); + + if(get_quality()>5) + lossy=true; + else + lossy=false; + + // Output the header + fprintf(file.get(),"GIF89a"); + fputc(w&0x000000ff,file.get()); + fputc((w&0x0000ff00)>>8,file.get()); + fputc(h&0x000000ff,file.get()); + fputc((h&0x0000ff00)>>8,file.get()); + if(!local_palette) + fputc(0xF0+(rootsize-1),file.get()); // flags + else + fputc((0xF0+(rootsize-1))&~(1<<7),file.get()); // flags + + fputc(0,file.get()); // background color + fputc(0,file.get()); // Pixel Aspect Ratio + + if(!local_palette) + { + curr_palette=Palette::grayscale(256/(1<<(8-rootsize))-1); + output_curr_palette(); + } + + if(loop_count && multi_image) + { + fputc(33,file.get()); // 33 (hex 0x21) GIF Extension code + fputc(255,file.get()); // 255 (hex 0xFF) Application Extension Label + fputc(11,file.get()); // 11 (hex (0x0B) Length of Application Block + fprintf(file.get(),"NETSCAPE2.0"); + fputc(3,file.get()); // 3 (hex 0x03) Length of Data Sub-Block + fputc(1,file.get()); // 1 (hex 0x01) + fputc(loop_count&0x000000ff,file.get()); + fputc((loop_count&0x0000ff00)>>8,file.get()); + fputc(0,file.get()); // 0 (hex 0x00) a Data Sub-block Terminator. + } + + return true; +} + +void +gif::output_curr_palette() +{ + // Output the color table + for(i=0;i<256/(1<<(8-rootsize));i++) + { + if(i<(signed)curr_palette.size()) + { + Color color(curr_palette[i].color.clamped()); + //fputc(i*(1<<(8-rootsize)),file.get()); + //fputc(i*(1<<(8-rootsize)),file.get()); + //fputc(i*(1<<(8-rootsize)),file.get()); + fputc(gamma().r_F32_to_U8(color.get_r()),file.get()); + fputc(gamma().g_F32_to_U8(color.get_g()),file.get()); + fputc(gamma().b_F32_to_U8(color.get_b()),file.get()); + } + else + { + fputc(255,file.get()); + fputc(0,file.get()); + fputc(255,file.get()); + } + } +} + +bool +gif::start_frame(synfig::ProgressCallback *callback) +{ +// int +// w=desc.get_w(), +// h=desc.get_h(); + + if(!file) + { + if(callback)callback->error(string("BUG:")+_("Description not set!")); + return false; + } + + if(callback)callback->task(filename+strprintf(" %d",imagecount)); + + + + return true; +} + +void +gif::end_frame() +{ + int w=desc.get_w(),h=desc.get_h(),i; + unsigned int value; + int + delaytime=round_to_int(100.0/desc.get_frame_rate()); + + bool build_off_previous(multi_image); + + Palette prev_palette(curr_palette); + + // Fill in the background color + if(!get_remove_alpha()) + { + Surface::alpha_pen pen(curr_surface.begin(),1.0,Color::BLEND_BEHIND); + pen.set_value(get_canvas()->rend_desc().get_bg_color()); + for(int y=0;y0.1) + pen.put_value(); + else + pen[0][0]=Color::alpha(); + } + pen.dec_x(x); + } + } + + if(local_palette) + { + curr_palette=Palette(curr_surface,256/(1<<(8-rootsize))-build_off_previous-1); + synfig::info("curr_palette.size()=%d",curr_palette.size()); + } + + int transparent_index(curr_palette.find_closest(Color(1,0,1,0))-curr_palette.begin()); + bool has_transparency(curr_palette[transparent_index].color.get_a()<=0.00001); + + if(has_transparency) + build_off_previous=false; + + if(build_off_previous) + { + transparent_index=0; + has_transparency=true; + } + +#define DISPOSE_UNDEFINED (0) +#define DISPOSE_NONE (1<<2) +#define DISPOSE_RESTORE_BGCOLOR (2<<2) +#define DISPOSE_RESTORE_PREVIOUS (3<<2) + int gec_flags(0); + if(build_off_previous) + gec_flags|=DISPOSE_NONE; + else + gec_flags|=DISPOSE_RESTORE_PREVIOUS; + if(has_transparency) + gec_flags|=1; + + // output the Graphic Control Extension + fputc(0x21,file.get()); // Extension introducer + fputc(0xF9,file.get()); // Graphic Control Label + fputc(4,file.get()); // Block Size + fputc(gec_flags,file.get()); // Flags (Packed Fields) + fputc(delaytime&0x000000ff,file.get()); // Delay Time (MSB) + fputc((delaytime&0x0000ff00)>>8,file.get()); // Delay Time (LSB) + fputc(transparent_index,file.get()); // Transparent Color Index + fputc(0,file.get()); // Block Terminator + + // output the image header + fputc(',',file.get()); + fputc(0,file.get()); // image left + fputc(0,file.get()); // image left + fputc(0,file.get()); // image top + fputc(0,file.get()); // image top + fputc(w&0x000000ff,file.get()); + fputc((w&0x0000ff00)>>8,file.get()); + fputc(h&0x000000ff,file.get()); + fputc((h&0x0000ff00)>>8,file.get()); + if(local_palette) + fputc(0x80|(rootsize-1),file.get()); // flags + else + fputc(0x00+ rootsize-1,file.get()); // flags + + + if(local_palette) + { + Palette out(curr_palette); + + if(build_off_previous) + curr_palette.insert(curr_palette.begin(),Color(1,0,1,0)); + output_curr_palette(); + curr_palette=out; + } + + bs=bitstream(file); + + // Prepare ourselves for LZW compression + codesize=rootsize+1; + nextcode=(1<color); + //error*=0.25; + if(curr_surface.get_h()>cur_scanline+1) + { + curr_surface[cur_scanline+1][i-1] += error * ((float)3/(float)16); + curr_surface[cur_scanline+1][i] += error * ((float)5/(float)16); + if(curr_surface.get_w()>i+1) + curr_surface[cur_scanline+1][i+1] += error * ((float)1/(float)16); + } + if(curr_surface.get_w()>i+1) + curr_surface[cur_scanline][i+1] += error * ((float)7/(float)16); + } + + curr_frame[cur_scanline][i]=iter-curr_palette.begin(); + + value=curr_frame[cur_scanline][i]; + if(build_off_previous) + value++; + if(value>(unsigned)(1<color-prev_palette[prev_frame[cur_scanline][i]-1].color ).get_y() ) > (1.0/16.0) || +// abs((int)value-(int)prev_frame[cur_scanline][i])>2|| +// (value<=2 && value!=prev_frame[cur_scanline][i]) || + (imagecount%iframe_density)==0 || imagecount==desc.get_frame_end()-1 ) // lossy version + prev_frame[cur_scanline][i]=value; + else + { + prev_frame[cur_scanline][i]=value; + value=0; + } + } + else + { + // lossless version + if(value!=prev_frame[cur_scanline][i]) + prev_frame[cur_scanline][i]=value; + else + value=0; + } + } + else + prev_frame[cur_scanline][i]=value; + + next=node->FindCode(value); + if(next) + node=next; + else + { + node->AddNode(nextcode, value); + bs.push_value(node->code, codesize); + node = table->FindCode(value); + + // Check to see if we need to increase the codesize + if (nextcode == ( 1 << codesize)) + codesize += 1; + + nextcode += 1; + + // check to see if we have filled up the table + if (nextcode == 4096) + { + // output the clear code: make sure to use the current + // codesize + bs.push_value((unsigned) 1 << rootsize, codesize); + + delete table; + table = lzwcode::NewTable((1<FindCode(value); + } + } + } + } + + + + + + // Push the last code onto the bitstream + bs.push_value(node->code,codesize); + + // Push a end-of-stream code onto the bitstream + bs.push_value((1< +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class gif : public synfig::Target_Scanline +{ + SYNFIG_TARGET_MODULE_EXT +private: + // Class for abstracting the + // output of the codes + struct bitstream + { + synfig::SmartFILE file; + unsigned char pool; + char curr_bit; + bitstream():pool(0),curr_bit(0),curr_pos(0) {} + bitstream(synfig::SmartFILE file):file(file),pool(0),curr_bit(0),curr_pos(0) {} + unsigned char buffer[256]; + int curr_pos; + + // Pushes a single bit onto the bit + void push_bit(bool bit) + { + if(bit) + pool|=(1<<(curr_bit)); + curr_bit++; + if(curr_bit==8) + empty(); + } + + // Empties out the current pool into + // the buffer. Calls 'dump()' if the + // buffer is full. + void empty() + { + buffer[curr_pos++]=pool; + curr_bit=0; + pool=0; + if(curr_pos==255)dump(); + } + + // If there is anything in the + // buffer or in the pool, it + // dumps it to the filestream. + // Buffer and pool are cleared. + void dump() + { + if(curr_bit) + empty(); + if(curr_pos || curr_bit) + { + fputc(curr_pos,file.get()); + fwrite(buffer,curr_pos,1,file.get()); + curr_pos=0; + } + } + + // Pushes a symbol of the given size + // onto the bitstream. + void push_value(int value, int size) + { + int i; + for(i=0;i>(i))&1); + } + }; + + // Class for dealing with the LZW codes + struct lzwcode + { + int value; // the data element or character + int code; // lzwcode + struct lzwcode* kids; // children of this node + struct lzwcode* next; // siblings of this node + + lzwcode():value(0),code(0),kids(0),next(0) { } + + lzwcode *FindCode(int value) + { + lzwcode *node=this; + + // check the children (kids) of the node for the value + for (node = node->kids; node != 0; node = node->next) + if (node->value == value) + return(node); + return(0); + } + + void AddNode(unsigned short code, unsigned short value) + { + lzwcode *n = new lzwcode; + + // add a new child to node; the child will have code and value + n->value = value; + n->code = code; + n->kids = 0; + n->next = this->kids; + this->kids = n; + } + + static lzwcode * NewTable(int values) + { + int i; + lzwcode * table = new lzwcode; + + table->kids = 0; + for (i = 0; i < values; i++) + table->AddNode( i, i); + + return(table); + } + + // Destructor just deletes any + // children and siblings. + ~lzwcode() + { + if(kids) + delete kids; + if(next) + delete next; + } + }; + +private: + bitstream bs; + synfig::String filename; + synfig::SmartFILE file; + int + i, // General-purpose index + codesize, // Current code size + rootsize, // Size of pixel bits (will be recalculated) + nextcode; // Next code to use + lzwcode *table,*next,*node; + + synfig::Surface curr_surface; + etl::surface curr_frame; + etl::surface prev_frame; + + int imagecount; + int cur_scanline; + + + // GIF compression parameters + bool lossy; + bool multi_image; + bool dithering; + int color_bits; + int iframe_density; + int loop_count; + bool local_palette; + + synfig::Palette curr_palette; + + void output_curr_palette(); + +public: + gif(const char *filename); + + virtual bool set_rend_desc(synfig::RendDesc *desc); + virtual bool init(); + virtual bool start_frame(synfig::ProgressCallback *cb); + virtual void end_frame(); + + virtual ~gif(); + + virtual synfig::Color * start_scanline(int scanline); + virtual bool end_scanline(void); + +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_gif/unmod_gif.nsh b/synfig-core/src/modules/mod_gif/unmod_gif.nsh new file mode 100644 index 0000000..16d17ce --- /dev/null +++ b/synfig-core/src/modules/mod_gif/unmod_gif.nsh @@ -0,0 +1,8 @@ +Section "un.mod_gif" + Delete "$INSTDIR\lib\synfig\modules\mod_gif.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/modules/mod_gradient/Makefile.am b/synfig-core/src/modules/mod_gradient/Makefile.am new file mode 100644 index 0000000..cf31c5a --- /dev/null +++ b/synfig-core/src/modules/mod_gradient/Makefile.am @@ -0,0 +1,41 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +moduledir = @MODULE_DIR@ + +module_LTLIBRARIES = libmod_gradient.la + +libmod_gradient_la_SOURCES = \ + curvegradient.cpp \ + curvegradient.h \ + lineargradient.cpp \ + lineargradient.h \ + conicalgradient.cpp \ + conicalgradient.h \ + spiralgradient.cpp \ + spiralgradient.h \ + radialgradient.cpp \ + radialgradient.h \ + main.cpp + +libmod_gradient_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ + +libmod_gradient_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @SYNFIG_LIBS@ + +libmod_gradient_la_LDFLAGS = \ + -module \ + -no-undefined \ + -avoid-version + + +EXTRA_DIST= mod_gradient.nsh unmod_gradient.nsh diff --git a/synfig-core/src/modules/mod_gradient/conicalgradient.cpp b/synfig-core/src/modules/mod_gradient/conicalgradient.cpp new file mode 100644 index 0000000..5bf42a9 --- /dev/null +++ b/synfig-core/src/modules/mod_gradient/conicalgradient.cpp @@ -0,0 +1,284 @@ +/* === S Y N F I G ========================================================= */ +/*! \file conicalgradient.cpp +** \brief Implementation of the "Conical Gradient" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "conicalgradient.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace etl; +using namespace std; +using namespace synfig; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(ConicalGradient); +SYNFIG_LAYER_SET_NAME(ConicalGradient,"conical_gradient"); +SYNFIG_LAYER_SET_LOCAL_NAME(ConicalGradient,N_("Conical Gradient")); +SYNFIG_LAYER_SET_CATEGORY(ConicalGradient,N_("Gradients")); +SYNFIG_LAYER_SET_VERSION(ConicalGradient,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(ConicalGradient,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +ConicalGradient::ConicalGradient(): + Layer_Composite(1.0,Color::BLEND_STRAIGHT), + gradient(Color::black(),Color::white()), + center(0,0), + angle(Angle::zero()), + symmetric(false) +{ +} + +bool +ConicalGradient::set_param(const String & param, const ValueBase &value) +{ + IMPORT(gradient); + IMPORT(center); + IMPORT(angle); + IMPORT(symmetric); + return Layer_Composite::set_param(param,value); +} + +ValueBase +ConicalGradient::get_param(const String ¶m)const +{ + EXPORT(gradient); + EXPORT(center); + EXPORT(angle); + EXPORT(symmetric); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +ConicalGradient::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("gradient") + .set_local_name(_("Gradient")) + ); + + ret.push_back(ParamDesc("center") + .set_local_name(_("Center")) + ); + + ret.push_back(ParamDesc("angle") + .set_local_name(_("Angle")) + .set_origin("center") + ); + + ret.push_back(ParamDesc("symmetric") + .set_local_name(_("Symmetric")) + ); + + return ret; +} + +inline Color +ConicalGradient::color_func(const Point &pos, float supersample)const +{ + const Point centered(pos-center); + Angle::rot a=Angle::tan(-centered[1],centered[0]).mod(); + a+=angle; + Real dist(a.mod().get()); + + dist-=floor(dist); + + if(symmetric) + { + dist*=2.0; + supersample*=2.0; + if(dist>1)dist=2.0-dist; + } +/* if(dist+supersample*0.5>1.0) + { + Color pool(gradient(dist,supersample*0.5)*(1.0-(dist-supersample*0.5))); + pool+=gradient((dist+supersample*0.5)-1.0,supersample*0.5)*((dist+supersample*0.5)-1.0); + if(pool.get_a() && pool.is_valid()) + { + pool.set_r(pool.get_r()/pool.get_a()); + pool.set_g(pool.get_g()/pool.get_a()); + pool.set_b(pool.get_b()/pool.get_a()); + pool.set_a(pool.get_a()/supersample); + } + return pool; + } + + if(dist-supersample*0.5<0.0) + { + Color pool(gradient(dist,supersample*0.5)*(dist+supersample*0.5)); + pool+=gradient(1.0-(dist-supersample*0.5),supersample*0.5)*(-(dist-supersample*0.5)); + if(pool.get_a() && pool.is_valid()) + { + pool.set_r(pool.get_r()/pool.get_a()); + pool.set_g(pool.get_g()/pool.get_a()); + pool.set_b(pool.get_b()/pool.get_a()); + pool.set_a(pool.get_a()/supersample); + return pool; + } + } +*/ + if(dist+supersample*0.5>1.0) + { + float left(supersample*0.5-(dist-1.0)); + float right(supersample*0.5+(dist-1.0)); + Color pool(gradient(1.0-(left*0.5),left).premult_alpha()*left/supersample); + pool+=gradient(right*0.5,right).premult_alpha()*right/supersample; + return pool.demult_alpha(); + } + if(dist-supersample*0.5<0.0) + { + float left(supersample*0.5-dist); + float right(supersample*0.5+dist); + Color pool(gradient(right*0.5,right).premult_alpha()*right/supersample); + pool+=gradient(1.0-left*0.5,left).premult_alpha()*left/supersample; + return pool.demult_alpha(); + } + + return gradient(dist,supersample); +} + +float +ConicalGradient::calc_supersample(const synfig::Point &x, float pw,float ph)const +{ + Point adj(x-center); + if(abs(adj[0])=0.5) + return const_cast(this); + if(get_amount()==0.0) + return context.hit_check(point); + if((get_blend_method()==Color::BLEND_STRAIGHT || get_blend_method()==Color::BLEND_COMPOSITE) && color_func(point).get_a()>0.5) + return const_cast(this); + return context.hit_check(point); +} + +Color +ConicalGradient::get_color(Context context, const Point &pos)const +{ + const Color color(color_func(pos)); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + return color; + else + return Color::blend(color,context.get_color(pos),get_amount(),get_blend_method()); +} + +bool +ConicalGradient::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + SuperCallback supercb(cb,0,9500,10000); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + { + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + } + else + { + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + return false; + if(get_amount()==0) + return true; + } + + + int x,y; + + Surface::pen pen(surface->begin()); + const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); + Point pos; + Point tl(renddesc.get_tl()); + const int w(surface->get_w()); + const int h(surface->get_h()); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + { + if(quality<9) + { + for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) + return false; + + return true; +} diff --git a/synfig-core/src/modules/mod_gradient/conicalgradient.h b/synfig-core/src/modules/mod_gradient/conicalgradient.h new file mode 100644 index 0000000..7799cc9 --- /dev/null +++ b/synfig-core/src/modules/mod_gradient/conicalgradient.h @@ -0,0 +1,79 @@ +/* === S Y N F I G ========================================================= */ +/*! \file conicalgradient.h +** \brief Header file for implementation of the "Conical Gradient" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_CONICALGRADIENT_H +#define __SYNFIG_CONICALGRADIENT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class ConicalGradient : public synfig::Layer_Composite, public synfig::Layer_NoDeform +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + synfig::Gradient gradient; + + synfig::Point center; + + synfig::Angle angle; + + bool symmetric; + + synfig::Color color_func(const synfig::Point &x, float supersample=0)const; + + float calc_supersample(const synfig::Point &x, float pw,float ph)const; + +public: + + ConicalGradient(); + + virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); + + virtual synfig::ValueBase get_param(const synfig::String & param)const; + + virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; + + virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + + virtual Vocab get_param_vocab()const; +}; // END of class ConicalGradient + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_gradient/curvegradient.cpp b/synfig-core/src/modules/mod_gradient/curvegradient.cpp new file mode 100644 index 0000000..4fa704e --- /dev/null +++ b/synfig-core/src/modules/mod_gradient/curvegradient.cpp @@ -0,0 +1,615 @@ +/* === S Y N F I G ========================================================= */ +/*! \file curvegradient.cpp +** \brief Implementation of the "Curve Gradient" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007-2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "curvegradient.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +#define FAKE_TANGENT_STEP 0.000001 + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(CurveGradient); +SYNFIG_LAYER_SET_NAME(CurveGradient,"curve_gradient"); +SYNFIG_LAYER_SET_LOCAL_NAME(CurveGradient,N_("Curve Gradient")); +SYNFIG_LAYER_SET_CATEGORY(CurveGradient,N_("Gradients")); +SYNFIG_LAYER_SET_VERSION(CurveGradient,"0.0"); +SYNFIG_LAYER_SET_CVS_ID(CurveGradient,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +inline float calculate_distance(const synfig::BLinePoint& a,const synfig::BLinePoint& b) +{ +#if 1 + const Point& c1(a.get_vertex()); + const Point c2(a.get_vertex()+a.get_tangent2()/3); + const Point c3(b.get_vertex()-b.get_tangent1()/3); + const Point& c4(b.get_vertex()); + return (c1-c2).mag()+(c2-c3).mag()+(c3-c4).mag(); +#else +#endif +} + +inline float calculate_distance(const std::vector& bline, bool bline_loop) +{ + std::vector::const_iterator iter,next,ret; + std::vector::const_iterator end(bline.end()); + + float dist(0); + + if (bline.empty()) return dist; + + next=bline.begin(); + + if(bline_loop) + iter=--bline.end(); + else + iter=next++; + + for(;next!=end;iter=next++) + { + // Setup the curve + etl::hermite curve( + iter->get_vertex(), + next->get_vertex(), + iter->get_tangent2(), + next->get_tangent1()); + +// dist+=calculate_distance(*iter,*next); + dist+=curve.length(); + } + + return dist; +} + +std::vector::const_iterator +find_closest(bool fast, const std::vector& bline,const Point& p,float& t,bool loop=false,float *bline_dist_ret=0) +{ + std::vector::const_iterator iter,next,ret; + std::vector::const_iterator end(bline.end()); + + ret=bline.end(); + float dist(100000000000.0); + + next=bline.begin(); + + float best_bline_dist(0); + float best_bline_len(0); + float total_bline_dist(0); + float best_pos(0); + etl::hermite best_curve; + + if(loop) + iter=--bline.end(); + else + iter=next++; + + Point bp; + + for(;next!=end;iter=next++) + { + // Setup the curve + etl::hermite curve( + iter->get_vertex(), + next->get_vertex(), + iter->get_tangent2(), + next->get_tangent1()); + + /* + const float t(curve.find_closest(p,6,0.01,0.99)); + bp=curve(t);if((bp-p).mag_squared()::const_iterator iter,next; + + // Figure out the BLinePoints we will be using, + // Taking into account looping. + if(perpendicular) + { + next=find_closest(fast,bline,point,t,bline_loop,&perp_dist); + perp_dist/=curve_length_; + } + else // not perpendicular + { + next=find_closest(fast,bline,point,t,bline_loop); + } + + iter=next++; + if(next==bline.end()) next=bline.begin(); + + // Setup the curve + etl::hermite curve( + iter->get_vertex(), + next->get_vertex(), + iter->get_tangent2(), + next->get_tangent1() + ); + + // Setup the derivative function + etl::derivative > deriv(curve); + + int search_iterations(7); + + /*if(quality==0)search_iterations=8; + else if(quality<=2)search_iterations=10; + else if(quality<=4)search_iterations=8; + */ + if(perpendicular) + { + if(quality>7) + search_iterations=4; + } + else // not perpendicular + { + if(quality<=6)search_iterations=7; + else if(quality<=7)search_iterations=6; + else if(quality<=8)search_iterations=5; + else search_iterations=4; + } + + // Figure out the closest point on the curve + if (fast) + t = curve.find_closest(fast, point,search_iterations); + + // Calculate our values + p1=curve(t); // the closest point on the curve + tangent=deriv(t); // the tangent at that point + + // if the point we're nearest to is at either end of the + // bline, our distance from the curve is the distance from the + // point on the curve. we need to know which side of the + // curve we're on, so find the average of the two tangents at + // this point + if (t<0.00001 || t>0.99999) + { + bool zero_tangent = (tangent[0] == 0 && tangent[1] == 0); + + if (t<0.5) + { + if (iter->get_split_tangent_flag() || zero_tangent) + { + // fake the current tangent if we need to + if (zero_tangent) tangent = curve(FAKE_TANGENT_STEP) - curve(0); + + // calculate the other tangent + Vector other_tangent(iter->get_tangent1()); + if (other_tangent[0] == 0 && other_tangent[1] == 0) + { + // find the previous blinepoint + std::vector::const_iterator prev; + if (iter != bline.begin()) (prev = iter)--; + else if (loop) (prev = bline.end())--; + else prev = iter; + + etl::hermite other_curve(prev->get_vertex(), iter->get_vertex(), prev->get_tangent2(), iter->get_tangent1()); + other_tangent = other_curve(1) - other_curve(1-FAKE_TANGENT_STEP); + } + + // normalise and sum the two tangents + tangent=(other_tangent.norm()+tangent.norm()); + edge_case=true; + } + } + else + { + if (next->get_split_tangent_flag() || zero_tangent) + { + // fake the current tangent if we need to + if (zero_tangent) tangent = curve(1) - curve(1-FAKE_TANGENT_STEP); + + // calculate the other tangent + Vector other_tangent(next->get_tangent2()); + if (other_tangent[0] == 0 && other_tangent[1] == 0) + { + // find the next blinepoint + std::vector::const_iterator next2(next); + if (++next2 == bline.end()) + { + if (loop) next2 = bline.begin(); + else next2 = next; + } + + etl::hermite other_curve(next->get_vertex(), next2->get_vertex(), next->get_tangent2(), next2->get_tangent1()); + other_tangent = other_curve(FAKE_TANGENT_STEP) - other_curve(0); + } + + // normalise and sum the two tangents + tangent=(other_tangent.norm()+tangent.norm()); + edge_case=true; + } + } + } + tangent = tangent.norm(); + + if(perpendicular) + { + tangent*=curve_length_; + p1-=tangent*perp_dist; + tangent=-tangent.perp(); + } + else // not perpendicular + // the width of the bline at the closest point on the curve + thickness=(next->get_width()-iter->get_width())*t+iter->get_width(); + } + + if(perpendicular) + { + if(quality>7) + { + dist=perp_dist; +/* diff=tangent.perp(); + const Real mag(diff.inv_mag()); + supersample=supersample*mag; +*/ + supersample=0; + } + else + { + diff=tangent.perp(); + //p1-=diff*0.5; + const Real mag(diff.inv_mag()); + supersample=supersample*mag; + diff*=mag*mag; + dist=(point_-origin - p1)*diff; + } + } + else // not perpendicular + { + if (edge_case) + { + diff=(p1-(point_-origin)); + if(diff*tangent.perp()<0) diff=-diff; + diff=diff.norm()*thickness*width; + } + else + diff=tangent.perp()*thickness*width; + + p1-=diff*0.5; + const Real mag(diff.inv_mag()); + supersample=supersample*mag; + diff*=mag*mag; + dist=(point_-origin - p1)*diff; + } + + if(loop) + dist-=floor(dist); + + if(zigzag) + { + dist*=2.0; + supersample*=2.0; + if(dist>1)dist=2.0-dist; + } + + if(loop) + { + if(dist+supersample*0.5>1.0) + { + float left(supersample*0.5-(dist-1.0)); + float right(supersample*0.5+(dist-1.0)); + Color pool(gradient(1.0-(left*0.5),left).premult_alpha()*left/supersample); + if (zigzag) pool+=gradient(1.0-right*0.5,right).premult_alpha()*right/supersample; + else pool+=gradient(right*0.5,right).premult_alpha()*right/supersample; + return pool.demult_alpha(); + } + if(dist-supersample*0.5<0.0) + { + float left(supersample*0.5-dist); + float right(supersample*0.5+dist); + Color pool(gradient(right*0.5,right).premult_alpha()*right/supersample); + if (zigzag) pool+=gradient(left*0.5,left).premult_alpha()*left/supersample; + else pool+=gradient(1.0-left*0.5,left).premult_alpha()*left/supersample; + return pool.demult_alpha(); + } + } + return gradient(dist,supersample); +} + +float +CurveGradient::calc_supersample(const synfig::Point &/*x*/, float pw,float /*ph*/)const +{ + return pw; +} + +synfig::Layer::Handle +CurveGradient::hit_check(synfig::Context context, const synfig::Point &point)const +{ + if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5) + return const_cast(this); + if(get_amount()==0.0) + return context.hit_check(point); + if((get_blend_method()==Color::BLEND_STRAIGHT || get_blend_method()==Color::BLEND_COMPOSITE|| get_blend_method()==Color::BLEND_ONTO) && color_func(point).get_a()>0.5) + return const_cast(this); + return context.hit_check(point); +} + +bool +CurveGradient::set_param(const String & param, const ValueBase &value) +{ + + + IMPORT(origin); + IMPORT(perpendicular); + IMPORT(fast); + + if(param=="bline" && value.get_type()==ValueBase::TYPE_LIST) + { + bline=value; + bline_loop=value.get_loop(); + sync(); + + return true; + } + + IMPORT(width); + IMPORT(gradient); + IMPORT(loop); + IMPORT(zigzag); + + IMPORT_AS(origin,"offset"); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +CurveGradient::get_param(const String & param)const +{ + EXPORT(origin); + EXPORT(bline); + EXPORT(gradient); + EXPORT(loop); + EXPORT(zigzag); + EXPORT(width); + EXPORT(perpendicular); + EXPORT(fast); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +CurveGradient::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("origin") + .set_local_name(_("Origin"))); + + ret.push_back(ParamDesc("width") + .set_is_distance() + .set_local_name(_("Width"))); + + ret.push_back(ParamDesc("bline") + .set_local_name(_("Vertices")) + .set_origin("origin") + .set_hint("width") + .set_description(_("A list of BLine Points"))); + + ret.push_back(ParamDesc("gradient") + .set_local_name(_("Gradient"))); + ret.push_back(ParamDesc("loop") + .set_local_name(_("Loop"))); + ret.push_back(ParamDesc("zigzag") + .set_local_name(_("ZigZag"))); + ret.push_back(ParamDesc("perpendicular") + .set_local_name(_("Perpendicular"))); + ret.push_back(ParamDesc("fast") + .set_local_name(_("Fast"))); + + return ret; +} + +Color +CurveGradient::get_color(Context context, const Point &point)const +{ + const Color color(color_func(point,0)); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + return color; + else + return Color::blend(color,context.get_color(point),get_amount(),get_blend_method()); +} + +bool +CurveGradient::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + SuperCallback supercb(cb,0,9500,10000); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + { + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + } + else + { + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + return false; + if(get_amount()==0) + return true; + } + + + int x,y; + + Surface::pen pen(surface->begin()); + const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); + Point pos; + Point tl(renddesc.get_tl()); + const int w(surface->get_w()); + const int h(surface->get_h()); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + { + for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) + return false; + + return true; +} diff --git a/synfig-core/src/modules/mod_gradient/curvegradient.h b/synfig-core/src/modules/mod_gradient/curvegradient.h new file mode 100644 index 0000000..c382281 --- /dev/null +++ b/synfig-core/src/modules/mod_gradient/curvegradient.h @@ -0,0 +1,86 @@ +/* === S Y N F I G ========================================================= */ +/*! \file curvegradient.h +** \brief Header file for implementation of the "Curve Gradient" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007-2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_CURVEGRADIENT_H +#define __SYNFIG_CURVEGRADIENT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +class CurveGradient : public Layer_Composite, public Layer_NoDeform +{ + SYNFIG_LAYER_MODULE_EXT + +private: + std::vector bline; + + Point origin; + Real width; + Gradient gradient; + Real curve_length_; + + bool loop; + bool zigzag; + bool bline_loop; + bool perpendicular; + bool fast; + + void sync(); + + synfig::Color color_func(const synfig::Point &x, int quality=10, float supersample=0)const; + + float calc_supersample(const synfig::Point &x, float pw,float ph)const; + +public: + CurveGradient(); + + virtual bool set_param(const String ¶m, const ValueBase &value); + virtual ValueBase get_param(const String ¶m)const; + virtual Color get_color(Context context, const Point &pos)const; + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + + virtual Vocab get_param_vocab()const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_gradient/lineargradient.cpp b/synfig-core/src/modules/mod_gradient/lineargradient.cpp new file mode 100644 index 0000000..be7155a --- /dev/null +++ b/synfig-core/src/modules/mod_gradient/lineargradient.cpp @@ -0,0 +1,259 @@ +/* === S Y N F I G ========================================================= */ +/*! \file lineargradient.cpp +** \brief Implementation of the "Linear Gradient" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "lineargradient.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(LinearGradient); +SYNFIG_LAYER_SET_NAME(LinearGradient,"linear_gradient"); +SYNFIG_LAYER_SET_LOCAL_NAME(LinearGradient,N_("Linear Gradient")); +SYNFIG_LAYER_SET_CATEGORY(LinearGradient,N_("Gradients")); +SYNFIG_LAYER_SET_VERSION(LinearGradient,"0.0"); +SYNFIG_LAYER_SET_CVS_ID(LinearGradient,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +inline void +LinearGradient::sync() +{ + diff=(p2-p1); + const Real mag(diff.inv_mag()); + diff*=mag*mag; +} + + +LinearGradient::LinearGradient(): + p1(1,1), + p2(-1,-1), + gradient(Color::black(), Color::white()), + loop(false), + zigzag(false) +{ + sync(); +} + +inline Color +LinearGradient::color_func(const Point &point, float supersample)const +{ + Real dist(point*diff-p1*diff); + + if(loop) + dist-=floor(dist); + + if(zigzag) + { + dist*=2.0; + supersample*=2.0; + if(dist>1)dist=2.0-dist; + } + + if(loop) + { + if(dist+supersample*0.5>1.0) + { + float left(supersample*0.5-(dist-1.0)); + float right(supersample*0.5+(dist-1.0)); + Color pool(gradient(1.0-(left*0.5),left).premult_alpha()*left/supersample); + if (zigzag) pool+=gradient(1.0-right*0.5,right).premult_alpha()*right/supersample; + else pool+=gradient(right*0.5,right).premult_alpha()*right/supersample; + return pool.demult_alpha(); + } + if(dist-supersample*0.5<0.0) + { + float left(supersample*0.5-dist); + float right(supersample*0.5+dist); + Color pool(gradient(right*0.5,right).premult_alpha()*right/supersample); + if (zigzag) pool+=gradient(left*0.5,left).premult_alpha()*left/supersample; + else pool+=gradient(1.0-left*0.5,left).premult_alpha()*left/supersample; + return pool.demult_alpha(); + } + } + return gradient(dist,supersample); +} + +float +LinearGradient::calc_supersample(const synfig::Point &/*x*/, float pw,float /*ph*/)const +{ + return pw/(p2-p1).mag(); +} + +synfig::Layer::Handle +LinearGradient::hit_check(synfig::Context context, const synfig::Point &point)const +{ + if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5) + return const_cast(this); + if(get_amount()==0.0) + return context.hit_check(point); + if((get_blend_method()==Color::BLEND_STRAIGHT || get_blend_method()==Color::BLEND_COMPOSITE) && color_func(point).get_a()>0.5) + return const_cast(this); + return context.hit_check(point); +} + +bool +LinearGradient::set_param(const String & param, const ValueBase &value) +{ + if(param=="p1" && value.same_type_as(p1)) + { + p1=value.get(p1); + sync(); + return true; + } + if(param=="p2" && value.same_type_as(p2)) + { + p2=value.get(p2); + sync(); + return true; + } + //IMPORT(p1); + //IMPORT(p2); + + + IMPORT(gradient); + IMPORT(loop); + IMPORT(zigzag); + return Layer_Composite::set_param(param,value); +} + +ValueBase +LinearGradient::get_param(const String & param)const +{ + EXPORT(p1); + EXPORT(p2); + EXPORT(gradient); + EXPORT(loop); + EXPORT(zigzag); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +LinearGradient::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("p1") + .set_local_name(_("Point 1")) + .set_connect("p2") + ); + ret.push_back(ParamDesc("p2") + .set_local_name(_("Point 2")) + ); + ret.push_back(ParamDesc("gradient") + .set_local_name(_("Gradient")) + ); + ret.push_back(ParamDesc("loop") + .set_local_name(_("Loop")) + ); + ret.push_back(ParamDesc("zigzag") + .set_local_name(_("ZigZag")) + ); + + return ret; +} + +Color +LinearGradient::get_color(Context context, const Point &point)const +{ + const Color color(color_func(point)); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + return color; + else + return Color::blend(color,context.get_color(point),get_amount(),get_blend_method()); +} + +bool +LinearGradient::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + SuperCallback supercb(cb,0,9500,10000); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + { + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + } + else + { + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + return false; + if(get_amount()==0) + return true; + } + + + int x,y; + + Surface::pen pen(surface->begin()); + const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); + Point pos; + Point tl(renddesc.get_tl()); + const int w(surface->get_w()); + const int h(surface->get_h()); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + { + for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) + return false; + + return true; +} diff --git a/synfig-core/src/modules/mod_gradient/lineargradient.h b/synfig-core/src/modules/mod_gradient/lineargradient.h new file mode 100644 index 0000000..7176d80 --- /dev/null +++ b/synfig-core/src/modules/mod_gradient/lineargradient.h @@ -0,0 +1,79 @@ +/* === S Y N F I G ========================================================= */ +/*! \file lineargradient.h +** \brief Header file for implementation of the "Linear Gradient" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_INTERPOLATION_LINEARGRADIENT_H +#define __SYNFIG_INTERPOLATION_LINEARGRADIENT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +class LinearGradient : public Layer_Composite, public Layer_NoDeform +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + Point p1,p2; + Vector diff; + Gradient gradient; + + bool loop; + bool zigzag; + + void sync(); + + synfig::Color color_func(const synfig::Point &x, float supersample=0)const; + + float calc_supersample(const synfig::Point &x, float pw,float ph)const; + +public: + LinearGradient(); + + virtual bool set_param(const String ¶m, const ValueBase &value); + virtual ValueBase get_param(const String ¶m)const; + virtual Color get_color(Context context, const Point &pos)const; + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + + virtual Vocab get_param_vocab()const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_gradient/main.cpp b/synfig-core/src/modules/mod_gradient/main.cpp new file mode 100644 index 0000000..48d375a --- /dev/null +++ b/synfig-core/src/modules/mod_gradient/main.cpp @@ -0,0 +1,66 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_gradient/main.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#include "lineargradient.h" +#include "radialgradient.h" +#include "conicalgradient.h" +#include "spiralgradient.h" +#include "curvegradient.h" + +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(libmod_gradient) + MODULE_NAME("Gradient") + MODULE_DESCRIPTION("Writeme") + MODULE_AUTHOR("Robert B. Quattlebaum") + MODULE_VERSION("1.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(libmod_gradient) + BEGIN_LAYERS + LAYER(LinearGradient) + LAYER(RadialGradient) + LAYER(ConicalGradient) + LAYER(SpiralGradient) + LAYER(CurveGradient) + END_LAYERS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mod_gradient/mod_gradient.nsh b/synfig-core/src/modules/mod_gradient/mod_gradient.nsh new file mode 100644 index 0000000..6d8f495 --- /dev/null +++ b/synfig-core/src/modules/mod_gradient/mod_gradient.nsh @@ -0,0 +1,21 @@ +; The stuff to install +Section "mod_gradient" Sec_mod_gradient + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=mod_gradient.dll "src\modules\mod_gradient\.libs\libmod_gradient.dll" + + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "mod_gradient" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd + diff --git a/synfig-core/src/modules/mod_gradient/radialgradient.cpp b/synfig-core/src/modules/mod_gradient/radialgradient.cpp new file mode 100644 index 0000000..5c3d20b --- /dev/null +++ b/synfig-core/src/modules/mod_gradient/radialgradient.cpp @@ -0,0 +1,250 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_gradient/radialgradient.cpp +** \brief Implementation of the "Radial Gradient" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "radialgradient.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace etl; +using namespace std; +using namespace synfig; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(RadialGradient); +SYNFIG_LAYER_SET_NAME(RadialGradient,"radial_gradient"); +SYNFIG_LAYER_SET_LOCAL_NAME(RadialGradient,N_("Radial Gradient")); +SYNFIG_LAYER_SET_CATEGORY(RadialGradient,N_("Gradients")); +SYNFIG_LAYER_SET_VERSION(RadialGradient,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(RadialGradient,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +RadialGradient::RadialGradient(): + Layer_Composite(1.0,Color::BLEND_STRAIGHT), + gradient(Color::black(),Color::white()), + center(0,0), + radius(0.5), + loop(false), + zigzag(false) +{ +} + +bool +RadialGradient::set_param(const String & param, const ValueBase &value) +{ + IMPORT(gradient); + IMPORT(center); + IMPORT(radius); + IMPORT(loop); + IMPORT(zigzag); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +RadialGradient::get_param(const String ¶m)const +{ + EXPORT(gradient); + EXPORT(center); + EXPORT(radius); + EXPORT(loop); + EXPORT(zigzag); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +RadialGradient::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("gradient") + .set_local_name(_("Gradient")) + ); + + ret.push_back(ParamDesc("center") + .set_local_name(_("Center")) + ); + + ret.push_back(ParamDesc("radius") + .set_local_name(_("Radius")) + .set_description(_("This is the radius of the circle")) + .set_is_distance() + .set_origin("center") + ); + + ret.push_back(ParamDesc("loop") + .set_local_name(_("Loop")) + ); + + ret.push_back(ParamDesc("zigzag") + .set_local_name(_("ZigZag")) + ); + + return ret; +} + +inline Color +RadialGradient::color_func(const Point &point, float supersample)const +{ + Real dist((point-center).mag()/radius); + + if(zigzag) + { + dist*=2.0; + supersample*=2.0; + if(dist>1)dist=2.0-dist; + } + + if(loop) + { + dist-=floor(dist); + + if(dist+supersample*0.5>1.0) + { + float left(supersample*0.5-(dist-1.0)); + float right(supersample*0.5+(dist-1.0)); + Color pool(gradient(1.0-(left*0.5),left).premult_alpha()*left/supersample); + if (zigzag) pool+=gradient(1.0-right*0.5,right).premult_alpha()*right/supersample; + else pool+=gradient(right*0.5,right).premult_alpha()*right/supersample; + return pool.demult_alpha(); + } + if(dist-supersample*0.5<0.0) + { + float left(supersample*0.5-dist); + float right(supersample*0.5+dist); + Color pool(gradient(right*0.5,right).premult_alpha()*right/supersample); + if (zigzag) pool+=gradient(left*0.5,left).premult_alpha()*left/supersample; + else pool+=gradient(1.0-left*0.5,left).premult_alpha()*left/supersample; + return pool.demult_alpha(); + } + } + + return gradient(dist,supersample); +} + + +float +RadialGradient::calc_supersample(const synfig::Point &/*x*/, float pw,float /*ph*/)const +{ +// return sqrt(pw*pw+ph*ph)/radius; + return 1.2*pw/radius; +} + +synfig::Layer::Handle +RadialGradient::hit_check(synfig::Context context, const synfig::Point &point)const +{ + if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5) + return const_cast(this); + if(get_amount()==0.0) + return context.hit_check(point); + if((get_blend_method()==Color::BLEND_STRAIGHT || get_blend_method()==Color::BLEND_COMPOSITE) && color_func(point).get_a()>0.5) + return const_cast(this); + return context.hit_check(point); +} + +Color +RadialGradient::get_color(Context context, const Point &pos)const +{ + const Color color(color_func(pos)); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + return color; + else + return Color::blend(color,context.get_color(pos),get_amount(),get_blend_method()); +} + +bool +RadialGradient::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + SuperCallback supercb(cb,0,9500,10000); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + { + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + } + else + { + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + return false; + if(get_amount()==0) + return true; + } + + + int x,y; + + Surface::pen pen(surface->begin()); + const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); + Point pos; + Point tl(renddesc.get_tl()); + const int w(surface->get_w()); + const int h(surface->get_h()); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + { + for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) + return false; + + return true; +} diff --git a/synfig-core/src/modules/mod_gradient/radialgradient.h b/synfig-core/src/modules/mod_gradient/radialgradient.h new file mode 100644 index 0000000..4c39f91 --- /dev/null +++ b/synfig-core/src/modules/mod_gradient/radialgradient.h @@ -0,0 +1,79 @@ +/* === S Y N F I G ========================================================= */ +/*! \file radialgradient.h +** \brief Header file for implementation of the "Radial Gradient" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_RADIALGRADIENT_H +#define __SYNFIG_RADIALGRADIENT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class RadialGradient : public synfig::Layer_Composite, public synfig::Layer_NoDeform +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + synfig::Gradient gradient; + + synfig::Point center; + + synfig::Real radius; + + bool loop; + bool zigzag; + + synfig::Color color_func(const synfig::Point &x, float supersample=0)const; + + float calc_supersample(const synfig::Point &x, float pw,float ph)const; + +public: + + RadialGradient(); + + virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); + + virtual synfig::ValueBase get_param(const synfig::String & param)const; + + virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; + + virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + + virtual Vocab get_param_vocab()const; +}; // END of class RadialGradient + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_gradient/spiralgradient.cpp b/synfig-core/src/modules/mod_gradient/spiralgradient.cpp new file mode 100644 index 0000000..81bd99d --- /dev/null +++ b/synfig-core/src/modules/mod_gradient/spiralgradient.cpp @@ -0,0 +1,246 @@ +/* === S Y N F I G ========================================================= */ +/*! \file spiralgradient.cpp +** \brief Implementation of the "Spiral Gradient" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "spiralgradient.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace etl; +using namespace std; +using namespace synfig; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(SpiralGradient); +SYNFIG_LAYER_SET_NAME(SpiralGradient,"spiral_gradient"); +SYNFIG_LAYER_SET_LOCAL_NAME(SpiralGradient,N_("Spiral Gradient")); +SYNFIG_LAYER_SET_CATEGORY(SpiralGradient,N_("Gradients")); +SYNFIG_LAYER_SET_VERSION(SpiralGradient,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(SpiralGradient,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +SpiralGradient::SpiralGradient(): + Layer_Composite(1.0,Color::BLEND_STRAIGHT), + gradient(Color::black(),Color::white()), + center(0,0), + radius(0.5), + angle(Angle::zero()), + clockwise(false) +{ +} + +bool +SpiralGradient::set_param(const String & param, const ValueBase &value) +{ + IMPORT(gradient); + IMPORT(center); + IMPORT(radius); + IMPORT(angle); + IMPORT(clockwise); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +SpiralGradient::get_param(const String ¶m)const +{ + EXPORT(gradient); + EXPORT(center); + EXPORT(radius); + EXPORT(angle); + EXPORT(clockwise); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +SpiralGradient::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("gradient") + .set_local_name(_("Gradient")) + ); + + ret.push_back(ParamDesc("center") + .set_local_name(_("Center")) + ); + + ret.push_back(ParamDesc("radius") + .set_local_name(_("Radius")) + .set_description(_("This is the radius of the circle")) + .set_is_distance() + .set_origin("center") + ); + + ret.push_back(ParamDesc("angle") + .set_local_name(_("Angle")) + .set_origin("center") + ); + + ret.push_back(ParamDesc("clockwise") + .set_local_name(_("Clockwise")) + ); + + return ret; +} + +inline Color +SpiralGradient::color_func(const Point &pos, float supersample)const +{ + const Point centered(pos-center); + Angle a; + a=Angle::tan(-centered[1],centered[0]).mod(); + a=a+angle; + + if(supersample<0.00001)supersample=0.00001; + + Real dist((pos-center).mag()/radius); + if(clockwise) + dist+=Angle::rot(a.mod()).get(); + else + dist-=Angle::rot(a.mod()).get(); + + dist-=floor(dist); + if(dist+supersample*0.5>1.0) + { + float left(supersample*0.5-(dist-1.0)); + float right(supersample*0.5+(dist-1.0)); + Color pool(gradient(1.0-(left*0.5),left).premult_alpha()*left/supersample); + pool+=gradient(right*0.5,right).premult_alpha()*right/supersample; + return pool.demult_alpha(); + } + if(dist-supersample*0.5<0.0) + { + float left(supersample*0.5-dist); + float right(supersample*0.5+dist); + Color pool(gradient(right*0.5,right).premult_alpha()*right/supersample); + pool+=gradient(1.0-left*0.5,left).premult_alpha()*left/supersample; + return pool.demult_alpha(); + } + + return gradient(dist,supersample); +} + +float +SpiralGradient::calc_supersample(const synfig::Point &x, float pw,float /*ph*/)const +{ + return (1.41421*pw/radius+(1.41421*pw/Point(x-center).mag())/(PI*2))*0.5; +} + +synfig::Layer::Handle +SpiralGradient::hit_check(synfig::Context context, const synfig::Point &point)const +{ + if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5) + return const_cast(this); + if(get_amount()==0.0) + return context.hit_check(point); + if((get_blend_method()==Color::BLEND_STRAIGHT || get_blend_method()==Color::BLEND_COMPOSITE) && color_func(point).get_a()>0.5) + return const_cast(this); + return context.hit_check(point); +} + +Color +SpiralGradient::get_color(Context context, const Point &pos)const +{ + const Color color(color_func(pos)); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + return color; + else + return Color::blend(color,context.get_color(pos),get_amount(),get_blend_method()); +} + +bool +SpiralGradient::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + SuperCallback supercb(cb,0,9500,10000); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + { + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + } + else + { + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + return false; + if(get_amount()==0) + return true; + } + + + int x,y; + + Surface::pen pen(surface->begin()); + const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); + Point pos; + Point tl(renddesc.get_tl()); + const int w(surface->get_w()); + const int h(surface->get_h()); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + { + for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) + return false; + + return true; +} diff --git a/synfig-core/src/modules/mod_gradient/spiralgradient.h b/synfig-core/src/modules/mod_gradient/spiralgradient.h new file mode 100644 index 0000000..32e3d91 --- /dev/null +++ b/synfig-core/src/modules/mod_gradient/spiralgradient.h @@ -0,0 +1,81 @@ +/* === S Y N F I G ========================================================= */ +/*! \file spiralgradient.h +** \brief Header file for implementation of the "Spiral Gradient" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_SPIRALGRADIENT_H +#define __SYNFIG_SPIRALGRADIENT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class SpiralGradient : public synfig::Layer_Composite, public synfig::Layer_NoDeform +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + synfig::Gradient gradient; + + synfig::Point center; + + synfig::Real radius; + + synfig::Angle angle; + + bool clockwise; + + synfig::Color color_func(const synfig::Point &x, float supersample=0)const; + + float calc_supersample(const synfig::Point &x, float pw,float ph)const; + +public: + + SpiralGradient(); + + virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); + + virtual synfig::ValueBase get_param(const synfig::String & param)const; + + virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; + + virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + + virtual Vocab get_param_vocab()const; +}; // END of class SpiralGradient + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_gradient/unmod_gradient.nsh b/synfig-core/src/modules/mod_gradient/unmod_gradient.nsh new file mode 100644 index 0000000..e5bf48e --- /dev/null +++ b/synfig-core/src/modules/mod_gradient/unmod_gradient.nsh @@ -0,0 +1,8 @@ +Section "un.mod_gradient" + Delete "$INSTDIR\lib\synfig\modules\mod_gradient.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/modules/mod_imagemagick/Makefile.am b/synfig-core/src/modules/mod_imagemagick/Makefile.am new file mode 100644 index 0000000..ffc9612 --- /dev/null +++ b/synfig-core/src/modules/mod_imagemagick/Makefile.am @@ -0,0 +1,41 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +moduledir = @MODULE_DIR@ + +if WITH_IMAGEMAGICK + +module_LTLIBRARIES = libmod_imagemagick.la + +libmod_imagemagick_la_SOURCES = \ + main.cpp \ + mptr_imagemagick.cpp \ + mptr_imagemagick.h \ + trgt_imagemagick.cpp \ + trgt_imagemagick.h + +libmod_imagemagick_la_LDFLAGS = \ + -module \ + -no-undefined \ + -avoid-version + +libmod_imagemagick_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ + +libmod_imagemagick_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @SYNFIG_LIBS@ + +endif + + +EXTRA_DIST = \ + mod_imagemagick.nsh \ + unmod_imagemagick.nsh diff --git a/synfig-core/src/modules/mod_imagemagick/main.cpp b/synfig-core/src/modules/mod_imagemagick/main.cpp new file mode 100644 index 0000000..ae6e16a --- /dev/null +++ b/synfig-core/src/modules/mod_imagemagick/main.cpp @@ -0,0 +1,103 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_imagemagick/main.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "mptr_imagemagick.h" +#include "trgt_imagemagick.h" +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(mod_imagemagick) + MODULE_NAME("ImageMagick Module") + MODULE_DESCRIPTION("Provides targets and importers for nearly every format that ImageMagick supports") + MODULE_AUTHOR("Robert B. Quattlebaum") + MODULE_VERSION("1.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(mod_imagemagick) + BEGIN_TARGETS + TARGET(imagemagick_trgt) + TARGET_EXT(imagemagick_trgt,"jpg") + TARGET_EXT(imagemagick_trgt,"jpeg") + TARGET_EXT(imagemagick_trgt,"png") + TARGET_EXT(imagemagick_trgt,"tga") + TARGET_EXT(imagemagick_trgt,"tif") + TARGET_EXT(imagemagick_trgt,"tiff") + TARGET_EXT(imagemagick_trgt,"pcx") + TARGET_EXT(imagemagick_trgt,"ps") + TARGET_EXT(imagemagick_trgt,"pdf") + TARGET_EXT(imagemagick_trgt,"pgm") + TARGET_EXT(imagemagick_trgt,"psd") + TARGET_EXT(imagemagick_trgt,"xcf") + TARGET_EXT(imagemagick_trgt,"svg") + TARGET_EXT(imagemagick_trgt,"xpm") + TARGET_EXT(imagemagick_trgt,"miff") + TARGET_EXT(imagemagick_trgt,"eps") + TARGET_EXT(imagemagick_trgt,"cmyk") + TARGET_EXT(imagemagick_trgt,"gif") + END_TARGETS + BEGIN_IMPORTERS + IMPORTER_EXT(imagemagick_mptr,"jpg") + IMPORTER_EXT(imagemagick_mptr,"jpeg") + IMPORTER_EXT(imagemagick_mptr,"png") + IMPORTER_EXT(imagemagick_mptr,"bmp") + IMPORTER_EXT(imagemagick_mptr,"gif") + IMPORTER_EXT(imagemagick_mptr,"pcx") + IMPORTER_EXT(imagemagick_mptr,"tif") + IMPORTER_EXT(imagemagick_mptr,"tiff") + IMPORTER_EXT(imagemagick_mptr,"tga") + IMPORTER_EXT(imagemagick_mptr,"ps") + IMPORTER_EXT(imagemagick_mptr,"pdf") + IMPORTER_EXT(imagemagick_mptr,"pgm") + IMPORTER_EXT(imagemagick_mptr,"psd") + IMPORTER_EXT(imagemagick_mptr,"xcf") + IMPORTER_EXT(imagemagick_mptr,"svg") + IMPORTER_EXT(imagemagick_mptr,"tim") + IMPORTER_EXT(imagemagick_mptr,"xpm") + IMPORTER_EXT(imagemagick_mptr,"miff") + IMPORTER_EXT(imagemagick_mptr,"ico") + IMPORTER_EXT(imagemagick_mptr,"eps") + IMPORTER_EXT(imagemagick_mptr,"ttf") + IMPORTER_EXT(imagemagick_mptr,"pix") + IMPORTER_EXT(imagemagick_mptr,"rla") + IMPORTER_EXT(imagemagick_mptr,"mat") + IMPORTER_EXT(imagemagick_mptr,"html") + IMPORTER_EXT(imagemagick_mptr,"ept") + IMPORTER_EXT(imagemagick_mptr,"dcm") + IMPORTER_EXT(imagemagick_mptr,"fig") + END_IMPORTERS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mod_imagemagick/mod_imagemagick.nsh b/synfig-core/src/modules/mod_imagemagick/mod_imagemagick.nsh new file mode 100644 index 0000000..b4a1d71 --- /dev/null +++ b/synfig-core/src/modules/mod_imagemagick/mod_imagemagick.nsh @@ -0,0 +1,21 @@ +; The stuff to install +Section "mod_imagemagick" Sec_mod_imagemagick + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=mod_imagemagick.dll "src\modules\mod_imagemagick\.libs\libmod_imagemagick.dll" + + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "mod_imagemagick" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd + diff --git a/synfig-core/src/modules/mod_imagemagick/mptr_imagemagick.cpp b/synfig-core/src/modules/mod_imagemagick/mptr_imagemagick.cpp new file mode 100644 index 0000000..2860c1f --- /dev/null +++ b/synfig-core/src/modules/mod_imagemagick/mptr_imagemagick.cpp @@ -0,0 +1,299 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mptr_imagemagick.cpp +** \brief ppm Target Module +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "mptr_imagemagick.h" +#include +#include +#if HAVE_SYS_WAIT_H + #include +#endif +#if HAVE_IO_H + #include +#endif +#if HAVE_PROCESS_H + #include +#endif +#if HAVE_FCNTL_H + #include +#endif +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +#if defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID) + #define UNIX_PIPE_TO_PROCESSES +#else + #define WIN32_PIPE_TO_PROCESSES +#endif + +/* === G L O B A L S ======================================================= */ + +SYNFIG_IMPORTER_INIT(imagemagick_mptr); +SYNFIG_IMPORTER_SET_NAME(imagemagick_mptr,"imagemagick"); +SYNFIG_IMPORTER_SET_EXT(imagemagick_mptr,"miff"); +SYNFIG_IMPORTER_SET_VERSION(imagemagick_mptr,"0.1"); +SYNFIG_IMPORTER_SET_CVS_ID(imagemagick_mptr,"$Id$"); + +/* === M E T H O D S ======================================================= */ + + +imagemagick_mptr::imagemagick_mptr(const char *f) +{ + + filename=f; + file=NULL; +} + +imagemagick_mptr::~imagemagick_mptr() +{ + if(file) + pclose(file); +} + +bool +imagemagick_mptr::get_frame(synfig::Surface &surface,Time /*time*/, synfig::ProgressCallback *cb) +{ +//#define HAS_LIBPNG 1 + +#if 1 + if(filename.empty()) + { + if(cb)cb->error(_("No file to load")); + else synfig::error(_("No file to load")); + return false; + } + string temp_file="/tmp/deleteme.png"; + +#if defined(WIN32_PIPE_TO_PROCESSES) + + if(file) + pclose(file); + + string command; + + if(filename.find("psd")!=String::npos) + command=strprintf("convert \"%s\" -flatten \"png32:%s\"\n",filename.c_str(),temp_file.c_str()); + else + command=strprintf("convert \"%s\" \"png32:%s\"\n",filename.c_str(),temp_file.c_str()); + + if(system(command.c_str())!=0) + return false; + +#elif defined(UNIX_PIPE_TO_PROCESSES) + + string output="png32:"+temp_file; + + pid_t pid = fork(); + + if (pid == -1) { + return false; + } + + if (pid == 0){ + // Child process + if(filename.find("psd")!=String::npos) + execlp("convert", "convert", filename.c_str(), "-flatten", output.c_str(), (const char *)NULL); + else + execlp("convert", "convert", filename.c_str(), output.c_str(), (const char *)NULL); + // We should never reach here unless the exec failed + return false; + } + + int status; + waitpid(pid, &status, 0); + if( (WIFEXITED(status) && WEXITSTATUS(status) != 0) || !WIFEXITED(status) ) + return false; + +#else + #error There are no known APIs for creating child processes +#endif + + Importer::Handle importer(Importer::open(temp_file)); + + if(!importer) + { + if(cb)cb->error(_("Unable to open ")+temp_file); + else synfig::error(_("Unable to open ")+temp_file); + return false; + } + + if(!importer->get_frame(surface,0,cb)) + { + if(cb)cb->error(_("Unable to get frame from ")+temp_file); + else synfig::error(_("Unable to get frame from ")+temp_file); + return false; + } + + if(!surface) + { + if(cb)cb->error(_("Bad surface from ")+temp_file); + else synfig::error(_("Bad surface from ")+temp_file); + return false; + } + + if(1) + { + // remove odd premultiplication + for(int i=0;ierror(_("No file to load")); + else synfig::error(_("No file to load")); + return false; + } + + command=strprintf("convert \"%s\" -flatten ppm:-\n",filename.c_str()); + + file=popen(command.c_str(),POPEN_BINARY_READ_TYPE); + + if(!file) + { + if(cb)cb->error(_("Unable to open pipe to imagemagick")); + else synfig::error(_("Unable to open pipe to imagemagick")); + return false; + } + int w,h; + float divisor; + char cookie[2]; + + while((cookie[0]=fgetc(file))!='P' && !feof(file)); + + if(feof(file)) + { + if(cb)cb->error(_("Reached end of stream without finding PPM header")); + else synfig::error(_("Reached end of stream without finding PPM header")); + return false; + } + + cookie[1]=fgetc(file); + + if(cookie[0]!='P' || cookie[1]!='6') + { + if(cb)cb->error(string(_("stream not in PPM format"))+" \""+cookie[0]+cookie[1]+'"'); + else synfig::error(string(_("stream not in PPM format"))+" \""+cookie[0]+cookie[1]+'"'); + return false; + } + + fgetc(file); + fscanf(file,"%d %d\n",&w,&h); + fscanf(file,"%f",&divisor); + fgetc(file); + + if(feof(file)) + { + if(cb)cb->error(_("Premature end of file (after header)")); + else synfig::error(_("Premature end of file (after header)")); + return false; + } + + int x; + int y; + frame.set_wh(w,h); + for(y=0;yerror(_("Premature end of file")); + else synfig::error(_("Premature end of file")); + return false; + } + float b=gamma().r_U8_to_F32((unsigned char)fgetc(file)); + float g=gamma().g_U8_to_F32((unsigned char)fgetc(file)); + float r=gamma().b_U8_to_F32((unsigned char)fgetc(file)); +/* + float b=(float)(unsigned char)fgetc(file)/divisor; + float g=(float)(unsigned char)fgetc(file)/divisor; + float r=(float)(unsigned char)fgetc(file)/divisor; +*/ + frame[y][x]=Color( + b, + g, + r, + 1.0 + ); + } + + surface=frame; + + return true; +#endif + + +} diff --git a/synfig-core/src/modules/mod_imagemagick/mptr_imagemagick.h b/synfig-core/src/modules/mod_imagemagick/mptr_imagemagick.h new file mode 100644 index 0000000..fcd8bdb --- /dev/null +++ b/synfig-core/src/modules/mod_imagemagick/mptr_imagemagick.h @@ -0,0 +1,62 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mptr_imagemagick.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_MPTR_IMAGEMAGICK_H +#define __SYNFIG_MPTR_IMAGEMAGICK_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include "string.h" +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class imagemagick_mptr : public synfig::Importer +{ + SYNFIG_IMPORTER_MODULE_EXT +private: + synfig::String filename; + FILE *file; + int cur_frame; + synfig::Surface frame; + +public: + imagemagick_mptr(const char *filename); + + ~imagemagick_mptr(); + + virtual bool get_frame(synfig::Surface &surface,synfig::Time time, synfig::ProgressCallback *callback); +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_imagemagick/trgt_imagemagick.cpp b/synfig-core/src/modules/mod_imagemagick/trgt_imagemagick.cpp new file mode 100644 index 0000000..32dd839 --- /dev/null +++ b/synfig-core/src/modules/mod_imagemagick/trgt_imagemagick.cpp @@ -0,0 +1,264 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_imagemagick.cpp +** \brief ppm Target Module +** +** \legal +** $Id$ +** +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_TARGET + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "trgt_imagemagick.h" +#include +#include +#if HAVE_SYS_WAIT_H + #include +#endif +#if HAVE_IO_H + #include +#endif +#if HAVE_PROCESS_H + #include +#endif +#if HAVE_FCNTL_H + #include +#endif +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +#if defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID) + #define UNIX_PIPE_TO_PROCESSES +#else + #define WIN32_PIPE_TO_PROCESSES +#endif + +/* === G L O B A L S ======================================================= */ + +SYNFIG_TARGET_INIT(imagemagick_trgt); +SYNFIG_TARGET_SET_NAME(imagemagick_trgt,"imagemagick"); +SYNFIG_TARGET_SET_EXT(imagemagick_trgt,"miff"); +SYNFIG_TARGET_SET_VERSION(imagemagick_trgt,"0.1"); +SYNFIG_TARGET_SET_CVS_ID(imagemagick_trgt,"$Id$"); + +/* === M E T H O D S ======================================================= */ + +imagemagick_trgt::imagemagick_trgt(const char *Filename) +{ + pid=-1; + file=NULL; + filename=Filename; + multi_image=false; + buffer=NULL; + color_buffer=0; +} + +imagemagick_trgt::~imagemagick_trgt() +{ + if(file){ +#if defined(WIN32_PIPE_TO_PROCESSES) + pclose(file); +#elif defined(UNIX_PIPE_TO_PROCESSES) + fclose(file); + int status; + waitpid(pid,&status,0); +#endif + } + file=NULL; + delete [] buffer; + delete [] color_buffer; +} + +bool +imagemagick_trgt::set_rend_desc(RendDesc *given_desc) +{ + if(filename_extension(filename) == ".xpm") + pf=PF_RGB; + else + pf=PF_RGB|PF_A; + + desc=*given_desc; + return true; +} + +bool +imagemagick_trgt::init() +{ + imagecount=desc.get_frame_start(); + if(desc.get_frame_end()-desc.get_frame_start()>0) + multi_image=true; + + delete [] buffer; + buffer=new unsigned char[channels(pf)*desc.get_w()]; + delete [] color_buffer; + color_buffer=new Color[desc.get_w()]; + return true; +} + +void +imagemagick_trgt::end_frame() +{ + if(file) + { + fputc(0,file); + fflush(file); +#if defined(WIN32_PIPE_TO_PROCESSES) + pclose(file); +#elif defined(UNIX_PIPE_TO_PROCESSES) + fclose(file); + int status; + waitpid(pid,&status,0); +#endif + } + file=NULL; + imagecount++; +} + +bool +imagemagick_trgt::start_frame(synfig::ProgressCallback *cb) +{ + const char *msg=_("Unable to open pipe to imagemagick's convert utility"); + + string newfilename; + + if (multi_image) + newfilename = (filename_sans_extension(filename) + + etl::strprintf(".%04d",imagecount) + + filename_extension(filename)); + else + newfilename = filename; + +#if defined(WIN32_PIPE_TO_PROCESSES) + + string command; + + command=strprintf("convert -depth 8 -size %dx%d rgb%s:-[0] -density %dx%d \"%s\"\n", + desc.get_w(), desc.get_h(), // size + ((channels(pf) == 4) ? "a" : ""), // rgba or rgb? + round_to_int(desc.get_x_res()/39.3700787402), // density + round_to_int(desc.get_y_res()/39.3700787402), + newfilename.c_str()); + + file=popen(command.c_str(),POPEN_BINARY_WRITE_TYPE); + +#elif defined(UNIX_PIPE_TO_PROCESSES) + + int p[2]; + + if (pipe(p)) { + if(cb) cb->error(N_(msg)); + else synfig::error(N_(msg)); + return false; + }; + + pid = fork(); + + if (pid == -1) { + if(cb) cb->error(N_(msg)); + else synfig::error(N_(msg)); + return false; + } + + if (pid == 0){ + // Child process + // Close pipeout, not needed + close(p[1]); + // Dup pipeout to stdin + if( dup2( p[0], STDIN_FILENO ) == -1 ){ + if(cb) cb->error(N_(msg)); + else synfig::error(N_(msg)); + return false; + } + // Close the unneeded pipeout + close(p[0]); + execlp("convert", "convert", + "-depth", "8", + "-size", strprintf("%dx%d", desc.get_w(), desc.get_h()).c_str(), + ((channels(pf) == 4) ? "rgba:-[0]" : "rgb:-[0]"), + "-density", strprintf("%dx%d", round_to_int(desc.get_x_res()/39.3700787402), round_to_int(desc.get_y_res()/39.3700787402)).c_str(), + newfilename.c_str(), + (const char *)NULL); + // We should never reach here unless the exec failed + if(cb) cb->error(N_(msg)); + else synfig::error(N_(msg)); + return false; + } else { + // Parent process + // Close pipein, not needed + close(p[0]); + // Save pipeout to file handle, will write to it later + file = fdopen(p[1], "wb"); + } + +#else + #error There are no known APIs for creating child processes +#endif + + if(!file) + { + if(cb)cb->error(N_(msg)); + else synfig::error(N_(msg)); + return false; + } + + //etl::yield(); + + return true; +} + +Color * +imagemagick_trgt::start_scanline(int /*scanline*/) +{ + return color_buffer; +} + +bool +imagemagick_trgt::end_scanline(void) +{ + if(!file) + return false; + + convert_color_format(buffer, color_buffer, desc.get_w(), pf, gamma()); + + if(!fwrite(buffer,channels(pf),desc.get_w(),file)) + return false; + + return true; +} diff --git a/synfig-core/src/modules/mod_imagemagick/trgt_imagemagick.h b/synfig-core/src/modules/mod_imagemagick/trgt_imagemagick.h new file mode 100644 index 0000000..2a9a171 --- /dev/null +++ b/synfig-core/src/modules/mod_imagemagick/trgt_imagemagick.h @@ -0,0 +1,70 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_imagemagick.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TRGT_IMAGEMAGICK_H +#define __SYNFIG_TRGT_IMAGEMAGICK_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + + +class imagemagick_trgt : public synfig::Target_Scanline +{ + SYNFIG_TARGET_MODULE_EXT +private: + pid_t pid; + int imagecount; + bool multi_image; + FILE *file; + synfig::String filename; + unsigned char *buffer; + synfig::Color *color_buffer; + synfig::PixelFormat pf; +public: + imagemagick_trgt(const char *filename); + virtual ~imagemagick_trgt(); + + virtual bool set_rend_desc(synfig::RendDesc *desc); + virtual bool init(); + virtual bool start_frame(synfig::ProgressCallback *cb); + virtual void end_frame(); + virtual synfig::Color * start_scanline(int scanline); + virtual bool end_scanline(); +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_imagemagick/unmod_imagemagick.nsh b/synfig-core/src/modules/mod_imagemagick/unmod_imagemagick.nsh new file mode 100644 index 0000000..a849b55 --- /dev/null +++ b/synfig-core/src/modules/mod_imagemagick/unmod_imagemagick.nsh @@ -0,0 +1,8 @@ +Section "un.mod_imagemagick" + Delete "$INSTDIR\lib\synfig\modules\mod_imagemagick.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/modules/mod_jpeg/Makefile.am b/synfig-core/src/modules/mod_jpeg/Makefile.am new file mode 100644 index 0000000..f963df5 --- /dev/null +++ b/synfig-core/src/modules/mod_jpeg/Makefile.am @@ -0,0 +1,42 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +moduledir = @MODULE_DIR@ + +if HAVE_LIBJPEG + +module_LTLIBRARIES = libmod_jpeg.la + +libmod_jpeg_la_SOURCES = \ + main.cpp \ + trgt_jpeg.cpp \ + trgt_jpeg.h \ + mptr_jpeg.cpp \ + mptr_jpeg.h + +libmod_jpeg_la_LDFLAGS = \ + -module \ + @JPEG_LIBS@ \ + -no-undefined \ + -avoid-version + +libmod_jpeg_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ + +libmod_jpeg_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @SYNFIG_LIBS@ + +endif + + +EXTRA_DIST = \ + mod_jpeg.nsh \ + unmod_jpeg.nsh diff --git a/synfig-core/src/modules/mod_jpeg/main.cpp b/synfig-core/src/modules/mod_jpeg/main.cpp new file mode 100644 index 0000000..7b5c647 --- /dev/null +++ b/synfig-core/src/modules/mod_jpeg/main.cpp @@ -0,0 +1,61 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_jpeg/main.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "trgt_jpeg.h" +#include "mptr_jpeg.h" +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(mod_jpeg) + MODULE_NAME("JPEG Module (libjpeg)") + MODULE_DESCRIPTION("Provides a JPEG target and importer") + MODULE_AUTHOR("Robert B. Quattlebaum Jr") + MODULE_VERSION("1.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(mod_jpeg) + BEGIN_TARGETS + TARGET(jpeg_trgt) + TARGET_EXT(jpeg_trgt,"jpeg") + TARGET_EXT(jpeg_trgt,"jpg") + END_TARGETS + BEGIN_IMPORTERS + IMPORTER_EXT(jpeg_mptr,"jpg") + IMPORTER_EXT(jpeg_mptr,"jpeg") + END_IMPORTERS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mod_jpeg/mod_jpeg.nsh b/synfig-core/src/modules/mod_jpeg/mod_jpeg.nsh new file mode 100644 index 0000000..2468ddb --- /dev/null +++ b/synfig-core/src/modules/mod_jpeg/mod_jpeg.nsh @@ -0,0 +1,21 @@ +; The stuff to install +Section "mod_jpeg" Sec_mod_jpeg + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=mod_jpeg.dll "src\modules\mod_jpeg\.libs\libmod_jpeg.dll" + + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "mod_jpeg" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd + diff --git a/synfig-core/src/modules/mod_jpeg/mptr_jpeg.cpp b/synfig-core/src/modules/mod_jpeg/mptr_jpeg.cpp new file mode 100644 index 0000000..84f5403 --- /dev/null +++ b/synfig-core/src/modules/mod_jpeg/mptr_jpeg.cpp @@ -0,0 +1,256 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mptr_jpeg.cpp +** \brief ppm Target Module +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/*! \todo Support 16 bit JPEG files +** \todo Support for paletted JPEG files +** \todo Support GAMMA correction +** \todo Fix memory leaks +*/ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "mptr_jpeg.h" +#include +#include +#include + + +#include +#include +#include +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +#define JPEG_CHECK_BYTES 8 + +/* === G L O B A L S ======================================================= */ + +SYNFIG_IMPORTER_INIT(jpeg_mptr); +SYNFIG_IMPORTER_SET_NAME(jpeg_mptr,"jpeg"); +SYNFIG_IMPORTER_SET_EXT(jpeg_mptr,"jpg"); +SYNFIG_IMPORTER_SET_VERSION(jpeg_mptr,"0.1"); +SYNFIG_IMPORTER_SET_CVS_ID(jpeg_mptr,"$Id$"); + +/* === M E T H O D S ======================================================= */ + +struct my_error_mgr { + struct jpeg_error_mgr pub; /* "public" fields */ + + jmp_buf setjmp_buffer; /* for return to caller */ +}; + +typedef struct my_error_mgr * my_error_ptr; + +/* + * Here's the routine that will replace the standard error_exit method: + */ + +void +jpeg_mptr::my_error_exit (j_common_ptr cinfo) +{ + /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */ + my_error_ptr myerr = (my_error_ptr) cinfo->err; + + /* Always display the message. */ + /* We could postpone this until after returning, if we chose. */ + (*cinfo->err->output_message) (cinfo); + + /* Return control to the setjmp point */ + longjmp(myerr->setjmp_buffer, 1); +} + + + + + +jpeg_mptr::jpeg_mptr(const char *file_name) +{ + struct my_error_mgr jerr; + filename=file_name; + + /* Open the file pointer */ + FILE *file = fopen(file_name, "rb"); + if (!file) + { + //! \todo THROW SOMETHING + throw String("error on importer construction, *WRITEME*1"); + return; + } + + /* Step 1: allocate and initialize JPEG decompression object */ + + /* We set up the normal JPEG error routines, then override error_exit. */ + cinfo.err = jpeg_std_error(&jerr.pub); + jerr.pub.error_exit = my_error_exit; + /* Establish the setjmp return context for my_error_exit to use. */ + if (setjmp(jerr.setjmp_buffer)) { + /* If we get here, the JPEG code has signaled an error. + * We need to clean up the JPEG object, close the input file, and return. + */ + jpeg_destroy_decompress(&cinfo); + fclose(file); + throw String("error on importer construction, *WRITEME*2"); + } + /* Now we can initialize the JPEG decompression object. */ + jpeg_create_decompress(&cinfo); + + /* Step 2: specify data source (eg, a file) */ + + jpeg_stdio_src(&cinfo, file); + + /* Step 3: read file parameters with jpeg_read_header() */ + + (void) jpeg_read_header(&cinfo, TRUE); + /* We can ignore the return value from jpeg_read_header since + * (a) suspension is not possible with the stdio data source, and + * (b) we passed TRUE to reject a tables-only JPEG file as an error. + * See libjpeg.doc for more info. + */ + + /* Step 4: set parameters for decompression */ + + /* In this example, we don't need to change any of the defaults set by + * jpeg_read_header(), so we do nothing here. + */ + + /* Step 5: Start decompressor */ + + (void) jpeg_start_decompress(&cinfo); + /* We can ignore the return value since suspension is not possible + * with the stdio data source. + */ + + JSAMPARRAY buffer; /* Output row buffer */ + int row_stride; /* physical row width in output buffer */ + row_stride = cinfo.output_width * cinfo.output_components; + /* Make a one-row-high sample array that will go away when done with image */ + buffer = (*cinfo.mem->alloc_sarray)((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1); + + if(!buffer) + { + synfig::error("jpeg_mptr: error: alloc of \"buffer\" failed (bug?)"); + throw String("alloc of \"buffer\" failed (bug?)"); + } + + int x; + int y; + surface_buffer.set_wh(cinfo.output_width,cinfo.output_height); + + switch(cinfo.output_components) + { + case 3: + for(y=0;y +#include +#include +_ETL_BEGIN_CDECLS +#include +_ETL_END_CDECLS +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class jpeg_mptr : public synfig::Importer +{ + SYNFIG_IMPORTER_MODULE_EXT +private: + synfig::String filename; + synfig::Surface surface_buffer; + + struct jpeg_decompress_struct cinfo; + + static void my_error_exit (j_common_ptr cinfo); + +public: + jpeg_mptr(const char *filename); + ~jpeg_mptr(); + + virtual bool get_frame(synfig::Surface &surface,synfig::Time time, synfig::ProgressCallback *callback); +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_jpeg/trgt_jpeg.cpp b/synfig-core/src/modules/mod_jpeg/trgt_jpeg.cpp new file mode 100644 index 0000000..3ff854d --- /dev/null +++ b/synfig-core/src/modules/mod_jpeg/trgt_jpeg.cpp @@ -0,0 +1,197 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_jpeg.cpp +** \brief jpeg_trgt Target Module +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_TARGET + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "trgt_jpeg.h" +#include +#include +#include +#include +#include +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_TARGET_INIT(jpeg_trgt); +SYNFIG_TARGET_SET_NAME(jpeg_trgt,"jpeg"); +SYNFIG_TARGET_SET_EXT(jpeg_trgt,"jpg"); +SYNFIG_TARGET_SET_VERSION(jpeg_trgt,"0.1"); +SYNFIG_TARGET_SET_CVS_ID(jpeg_trgt,"$Id$"); + +/* === M E T H O D S ======================================================= */ + +jpeg_trgt::jpeg_trgt(const char *Filename) +{ + file=NULL; + filename=Filename; + buffer=NULL; + ready=false; + quality=95; + color_buffer=0; + set_remove_alpha(); +} + +jpeg_trgt::~jpeg_trgt() +{ + if(ready) + { + jpeg_finish_compress(&cinfo); + jpeg_destroy_compress(&cinfo); + ready=false; + } + if(file) + fclose(file); + file=NULL; + delete [] buffer; + delete [] color_buffer; +} + +bool +jpeg_trgt::set_rend_desc(RendDesc *given_desc) +{ + desc=*given_desc; + imagecount=desc.get_frame_start(); + if(desc.get_frame_end()-desc.get_frame_start()>0) + multi_image=true; + else + multi_image=false; + return true; +} + +bool +jpeg_trgt::start_frame(synfig::ProgressCallback *callback) +{ + int w=desc.get_w(),h=desc.get_h(); + + if(file && file!=stdout) + fclose(file); + if(filename=="-") + { + if(callback)callback->task(strprintf("(stdout) %d",imagecount).c_str()); + file=stdout; + } + else if(multi_image) + { + String newfilename(filename_sans_extension(filename) + + etl::strprintf(".%04d",imagecount) + + filename_extension(filename)); + file=fopen(newfilename.c_str(),POPEN_BINARY_WRITE_TYPE); + if(callback)callback->task(newfilename); + } + else + { + file=fopen(filename.c_str(),POPEN_BINARY_WRITE_TYPE); + if(callback)callback->task(filename); + } + + if(!file) + return false; + + delete [] buffer; + buffer=new unsigned char[3*w]; + + delete [] color_buffer; + color_buffer=new Color[w]; + + + cinfo.err = jpeg_std_error(&jerr); + jpeg_create_compress(&cinfo); + jpeg_stdio_dest(&cinfo, file); + + cinfo.image_width = w; /* image width and height, in pixels */ + cinfo.image_height = h; + cinfo.input_components = 3; /* # of color components per pixel */ + cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ + /* Now use the library's routine to set default compression parameters. + * (You must set at least cinfo.in_color_space before calling this, + * since the defaults depend on the source color space.) + */ + jpeg_set_defaults(&cinfo); + /* Now you can set any non-default parameters you wish to. + * Here we just illustrate the use of quality (quantization table) scaling: + */ + jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */); + + /* Step 4: Start compressor */ + + /* TRUE ensures that we will write a complete interchange-JPEG file. + * Pass TRUE unless you are very sure of what you're doing. + */ + jpeg_start_compress(&cinfo, TRUE); + + ready=true; + return true; +} + +void +jpeg_trgt::end_frame() +{ + if(ready) + { + jpeg_finish_compress(&cinfo); + jpeg_destroy_compress(&cinfo); + ready=false; + } + + if(file && file!=stdout) + fclose(file); + file=NULL; + imagecount++; +} + +Color * +jpeg_trgt::start_scanline(int /*scanline*/) +{ + return color_buffer; +} + +bool +jpeg_trgt::end_scanline() +{ + if(!file || !ready) + return false; + + convert_color_format(buffer, color_buffer, desc.get_w(), PF_RGB,gamma()); + JSAMPROW *row_pointer(&buffer); + jpeg_write_scanlines(&cinfo, row_pointer, 1); + + return true; +} diff --git a/synfig-core/src/modules/mod_jpeg/trgt_jpeg.h b/synfig-core/src/modules/mod_jpeg/trgt_jpeg.h new file mode 100644 index 0000000..65518d0 --- /dev/null +++ b/synfig-core/src/modules/mod_jpeg/trgt_jpeg.h @@ -0,0 +1,76 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_jpeg.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TRGT_JPEG_H +#define __SYNFIG_TRGT_JPEG_H + +/* === H E A D E R S ======================================================= */ + +#define NOMINMAX +#include +#include +#include +_ETL_BEGIN_CDECLS +#include +_ETL_END_CDECLS +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class jpeg_trgt : public synfig::Target_Scanline +{ + SYNFIG_TARGET_MODULE_EXT +private: + FILE *file; + int w,h,quality; + struct jpeg_compress_struct cinfo; + struct jpeg_error_mgr jerr; + + + bool multi_image,ready; + int imagecount; + synfig::String filename; + unsigned char *buffer; + synfig::Color *color_buffer; +public: + jpeg_trgt(const char *filename); + virtual ~jpeg_trgt(); + + virtual bool set_rend_desc(synfig::RendDesc *desc); + virtual bool start_frame(synfig::ProgressCallback *cb); + virtual void end_frame(); + + virtual synfig::Color * start_scanline(int scanline); + virtual bool end_scanline(); +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_jpeg/unmod_jpeg.nsh b/synfig-core/src/modules/mod_jpeg/unmod_jpeg.nsh new file mode 100644 index 0000000..56c9547 --- /dev/null +++ b/synfig-core/src/modules/mod_jpeg/unmod_jpeg.nsh @@ -0,0 +1,8 @@ +Section "un.mod_jpeg" + Delete "$INSTDIR\lib\synfig\modules\mod_jpeg.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/modules/mod_libavcodec/Makefile.am b/synfig-core/src/modules/mod_libavcodec/Makefile.am new file mode 100644 index 0000000..fddc613 --- /dev/null +++ b/synfig-core/src/modules/mod_libavcodec/Makefile.am @@ -0,0 +1,44 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +moduledir = @MODULE_DIR@ + +if WITH_LIBAVCODEC + +module_LTLIBRARIES = libmod_libavcodec.la + +libmod_libavcodec_la_SOURCES = \ + main.cpp \ + trgt_av.cpp \ + trgt_av.h \ + mptr.cpp \ + mptr.h + +libmod_libavcodec_la_LDFLAGS = \ + -module -no-undefined -avoid-version + +libmod_libavcodec_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ \ + @LIBAVCODEC_CFLAGS@ \ + @LIBSWSCALE_CFLAGS@ \ + -D__STDC_CONSTANT_MACROS + +libmod_libavcodec_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @SYNFIG_LIBS@ \ + @LIBAVCODEC_LIBS@ \ + @LIBSWSCALE_LIBS@ + +endif + + +EXTRA_DIST = \ + mod_libavcodec.nsh \ + unmod_libavcodec.nsh diff --git a/synfig-core/src/modules/mod_libavcodec/main.cpp b/synfig-core/src/modules/mod_libavcodec/main.cpp new file mode 100644 index 0000000..70fa9c5 --- /dev/null +++ b/synfig-core/src/modules/mod_libavcodec/main.cpp @@ -0,0 +1,68 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_libavcodec/main.cpp +** \brief writeme +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_NO_ANGLE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +//#include "mptr.h" +#include "trgt_av.h" + +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(mod_libavcodec) + MODULE_NAME("LibAVCodec Module (From FFMPEG)") + MODULE_DESCRIPTION("Provides import/export ability for AVI, MPG, ASF, and a variety of other formats.") + MODULE_AUTHOR("Adrian Bentley") + MODULE_VERSION("0.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(mod_libavcodec) + BEGIN_TARGETS + TARGET(Target_LibAVCodec) + //TARGET_EXT(Target_LibAVCodec,"mpg") + //TARGET_EXT(Target_LibAVCodec,"mpeg") + //TARGET_EXT(Target_LibAVCodec,"mov") + TARGET_EXT(Target_LibAVCodec,"asf") + TARGET_EXT(Target_LibAVCodec,"rm") + //TARGET_EXT(Target_LibAVCodec,"mpg") + TARGET_EXT(Target_LibAVCodec,"wmv") + TARGET_EXT(Target_LibAVCodec,"yuv") + //TARGET_EXT(Target_LibAVCodec,"dv") + END_TARGETS + BEGIN_IMPORTERS +// IMPORTER(bmp_mptr) + END_IMPORTERS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mod_libavcodec/mod_libavcodec.nsh b/synfig-core/src/modules/mod_libavcodec/mod_libavcodec.nsh new file mode 100644 index 0000000..12778b6 --- /dev/null +++ b/synfig-core/src/modules/mod_libavcodec/mod_libavcodec.nsh @@ -0,0 +1,21 @@ +; The stuff to install +Section "mod_libavcodec" Sec_mod_libavcodec + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=mod_libavcodec.dll "src\modules\mod_libavcodec\.libs\libmod_libavcodec.dll" + + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "mod_libavcodec" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd + diff --git a/synfig-core/src/modules/mod_libavcodec/mptr.cpp b/synfig-core/src/modules/mod_libavcodec/mptr.cpp new file mode 100644 index 0000000..667968b --- /dev/null +++ b/synfig-core/src/modules/mod_libavcodec/mptr.cpp @@ -0,0 +1,72 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mptr.cpp +** \brief writeme +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_NO_ANGLE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "mptr.h" +#include +#include + +#include +#include +#endif + +/* === U S I N G =========================================================== */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_IMPORTER_INIT(Importer_LibAVCodec); +SYNFIG_IMPORTER_SET_NAME(Importer_LibAVCodec,"libav"); +SYNFIG_IMPORTER_SET_EXT(Importer_LibAVCodec,"avi"); +SYNFIG_IMPORTER_SET_VERSION(Importer_LibAVCodec,"0.1"); +SYNFIG_IMPORTER_SET_CVS_ID(Importer_LibAVCodec,"$Id$"); + +/* === M E T H O D S ======================================================= */ + + +Importer_LibAVCodec::Importer_LibAVCodec(const char *file): + filename(file) +{ +} + +Importer_LibAVCodec::~Importer_LibAVCodec() +{ +} + +bool +Importer_LibAVCodec::get_frame(synfig::Surface &/*surface*/,Time, synfig::ProgressCallback */*cb*/) +{ + return false; +} diff --git a/synfig-core/src/modules/mod_libavcodec/mptr.h b/synfig-core/src/modules/mod_libavcodec/mptr.h new file mode 100644 index 0000000..f7cb41f --- /dev/null +++ b/synfig-core/src/modules/mod_libavcodec/mptr.h @@ -0,0 +1,57 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mptr.h +** \brief writeme +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_MPTR_H +#define __SYNFIG_MPTR_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class Importer_LibAVCodec : public synfig::Importer +{ +SYNFIG_IMPORTER_MODULE_EXT + +private: + synfig::String filename; + +public: + Importer_LibAVCodec(const char *filename); + ~Importer_LibAVCodec(); + + virtual bool get_frame(synfig::Surface &surface,synfig::Time time, synfig::ProgressCallback *callback); +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_libavcodec/trgt_av.cpp b/synfig-core/src/modules/mod_libavcodec/trgt_av.cpp new file mode 100644 index 0000000..5ad733a --- /dev/null +++ b/synfig-core/src/modules/mod_libavcodec/trgt_av.cpp @@ -0,0 +1,983 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_av.cpp +** \brief \writeme +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Paul Wise +** Copyright (c) 2008 Gerco Ballintijn +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_NO_ANGLE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "trgt_av.h" + +extern "C" +{ + +/* + ffmpeg library headers have historically had multiple locations. + We should check all of the locations to be more portable. +*/ + +#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H +# include +#elif defined(HAVE_AVFORMAT_H) +# include +#elif defined(HAVE_FFMPEG_AVFORMAT_H) +# include +#endif + +#ifdef WITH_LIBSWSCALE +#ifdef HAVE_LIBSWSCALE_SWSCALE_H +# include +#elif defined(HAVE_SWSCALE_H) +# include +#elif defined(HAVE_FFMPEG_SWSCALE_H) +# include +#endif +#endif + +} + +#include + +#include +#include +#include +#endif + +#ifdef WIN32 +#define snprintf _snprintf +#endif + +/* === U S I N G =========================================================== */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === I N F O ============================================================= */ + +SYNFIG_TARGET_INIT(Target_LibAVCodec); +SYNFIG_TARGET_SET_NAME(Target_LibAVCodec,"libav"); +SYNFIG_TARGET_SET_EXT(Target_LibAVCodec,"avi"); +SYNFIG_TARGET_SET_VERSION(Target_LibAVCodec,"0.1"); +SYNFIG_TARGET_SET_CVS_ID(Target_LibAVCodec,"$Id$"); + +/* === C L A S S E S & S T R U C T S ======================================= */ + +bool Target_LibAVCodec::registered = false; + +//for now compilation +//float STREAM_DURATION = 5.0f; + +struct VideoInfo +{ + int w,h; + int fps; + + int bitrate; +}; + +struct AudioInfo +{ + int samplerate; //in HZ + int samplesize; //in bytes +}; + +AVFrame *alloc_picture(int pix_fmt, int width, int height) +{ + AVFrame *picture; + uint8_t *picture_buf; + int size; + + picture = avcodec_alloc_frame(); + if (!picture) + return NULL; + size = avpicture_get_size(pix_fmt, width, height); + picture_buf = (uint8_t *)malloc(size); + if (!picture_buf) { + av_free(picture); + return NULL; + } + avpicture_fill((AVPicture *)picture, picture_buf, + pix_fmt, width, height); + return picture; +} + +void free_picture(AVFrame *pic) +{ + av_free(pic->data[0]); + av_free(pic); +} + +//the frame must be RGB24 +static void convert_surface_frame(AVFrame *pic, const Surface &s, const Gamma &gamma) +{ + unsigned int j; + Surface::const_pen p = s.begin(); + unsigned int w,h; + Color c; + + uint8_t *ptr; + int stride; + + w = s.size().x; + h = s.size().y; + + ptr = pic->data[0]; + stride = pic->linesize[0]; + + for(j = 0; j < h; j++, p.inc_y(), ptr += stride) + { + uint8_t *tptr = ptr; + + //use convert_color_format instead... + #if 0 + const int channels = 3; + + for(int i = 0; i < w; i++, p.inc_x(), tptr += channels) + { + c = p.get_value(); + + Color::value_type r = c.get_r(); + Color::value_type g = c.get_g(); + Color::value_type b = c.get_b(); + Color::value_type a = c.get_a(); + + //premultiply alpha + r *= a; + g *= a; + b *= a; + + //essentially treats it as if it has a background color of black + + //we must also clamp the rgb values [0,1] + r = min(1.0f,r); + g = min(1.0f,g); + b = min(1.0f,b); + + r = max(0.0f,r); + g = max(0.0f,g); + b = max(0.0f,b); + + //now scale to range of char [0,255] + tptr[0] = (int)(r*255); + tptr[1] = (int)(g*255); + tptr[2] = (int)(b*255); + } + + p.dec_x(w); + #else + + convert_color_format((unsigned char *)tptr,&p.get_value(),w,PF_RGB,gamma); + + #endif + } +} + +//Audio Streamer (abstracts the open, write and close operations for audio streams) +#if 0 +class AudioEncoder +{ +public: + + void *samples; + + vectoraudiobuffer; + + int audio_input_frame_size; + + bool open(AVFormatContext *formatc, AVStream *stream) + { + AVCodecContext *context; + AVCodec *codec; + + context = &stream->codec; + + //find audio encoder + codec = avcodec_find_encoder(context->codec_id); + if(!codec) + { + synfig::warning("audio-open: could not find codec"); + return 0; + } + + //open the codec + if(avcodec_open(context, codec) < 0) + { + synfig::warning("audio-open: could not open codec"); + return 0; + } + + /* hardcoded example for generating samples array*/ + /* + t = 0; + tincr = 2 * M_PI * 110.0 / c->sample_rate; + tincr2 = 2 * M_PI * 110.0 / c->sample_rate / c->sample_rate;*/ + + audiobuffer.resize(10000); + + /* ugly hack for PCM codecs (will be removed ASAP with new PCM + support to compute the input frame size in samples */ + if (context->frame_size <= 1) { + audio_input_frame_size = audiobuffer.size() / context->channels; + switch(stream->codec.codec_id) { + case CODEC_ID_PCM_S16LE: + case CODEC_ID_PCM_S16BE: + case CODEC_ID_PCM_U16LE: + case CODEC_ID_PCM_U16BE: + audio_input_frame_size >>= 1; + break; + default: + break; + } + } else { + audio_input_frame_size = context->frame_size; + } + + //hardcoded array + //samples = (int16_t *)malloc(audio_input_frame_size * 2 * c->channels); + + return true; + } + + bool write_frame(AVFormatContext *formatc, AVStream *stream, void *samples) + { + int size; + AVCodecContext *context; + + context = &stream->codec; + + //hardcoded in example + //must read in from somewhere... + //get_audio_frame(samples, audio_input_frame_size, c->channels); + + //encode the audio + const short int*samps=(const short int *)samples; //assuming it's set from somewhere right now + + size = avcodec_encode_audio(context, &audiobuffer[0], audiobuffer.size(), samps); + + //write the compressed audio to a file + if(av_write_frame(formatc, stream->index, &audiobuffer[0], size) != 0) + { + synfig::warning("audio-write_frame: unable to write the entire audio frame"); + return 0; + } + + return true; + } + + void close(AVFormatContext *formatc, AVStream *stream) + { + //we may also want to catch delayed frames from here (don't for now) + + if(stream) + { + avcodec_close(&stream->codec); + } + + //if(samples)av_free(samples); + audiobuffer.resize(0); + } +}; + +#endif + +class VideoEncoder +{ +public: + AVFrame *encodable; //for compression and output to a file (in compatible pixel format) + + vector videobuffer; + + bool startedencoding; + + //int stream_nb_frames; + + bool open(AVFormatContext *formatc, AVStream *stream) + { + if(!formatc || !stream) + { + synfig::warning("Attempt to open a video codec with a bad format or stream"); + return false; + } + + //codec and context + AVCodec *codec; + AVCodecContext *context; + + //get from inside stream + context = stream->codec; + + //search for desired codec (contained in the stream) + codec = avcodec_find_encoder(context->codec_id); + if(!codec) + { + synfig::warning("Open_video: could not find desired codec"); + return 0; + } + + //try to open the codec + if(avcodec_open(context, codec) < 0) + { + synfig::warning("open_video: could not open desired codec"); + return 0; + } + + videobuffer.resize(0); + if(!(formatc->oformat->flags & AVFMT_RAWPICTURE)) + { + //resize buffer to desired buffersize + videobuffer.resize(200000); //TODO: need to figure out a good size + } + + //allocate the base picture which will be used to encode + /*picture = alloc_picture(PIX_FMT_RGBA32, context->width, context->height); + if(!picture) + { + synfig::warning("open_video: could not allocate the picture to be encoded"); + return 0; + }*/ + + //if our output (rgb) needs to be translated to a different coordinate system, need a temporary picture in that color space + + /* Should use defaults of RGB + Possible formats: + PIX_FMT_RGB24 + PIX_FMT_BGR24 + PIX_FMT_RGBA32 //stored in cpu endianness (!!!!) + + (possibly translate directly to required coordinate systems later on... less error) + */ + encodable = NULL; + if(context->pix_fmt != PIX_FMT_RGB24) + { + encodable = alloc_picture(context->pix_fmt, context->width, context->height); + if(!encodable) + { + synfig::warning("open_video: could not allocate encodable picture"); + return 0; + } + } + + return true; + } + + //write a frame with the frame passed in + bool write_frame(AVFormatContext *formatc, AVStream *stream, AVFrame *pict) + { + if(!formatc || !stream) + { + synfig::warning("Attempt to open a video codec with a bad format or stream"); + return false; + } + + int size, + ret = 0; + AVCodecContext *context = stream->codec; + + /* + If pict is invalid (NULL), then we are done compressing frames and we are trying to get + the buffer cleared out (or if it's already in the right format) so no transform necessary + */ + if ( pict ) + { + startedencoding = true; + } + + + if ( pict && context->pix_fmt != PIX_FMT_RGB24 ) + { + //We're using RGBA at the moment, write custom conversion code later (get less accuracy errors) +#ifdef WITH_LIBSWSCALE + struct SwsContext* img_convert_ctx = + sws_getContext(context->width, context->height, PIX_FMT_RGB24, + context->width, context->height, context->pix_fmt, + SWS_BICUBIC, NULL, NULL, NULL); + + sws_scale(img_convert_ctx, pict->data, pict->linesize, + + 0, context->height, encodable->data, + encodable->linesize); + + sws_freeContext (img_convert_ctx); +#else + img_convert((AVPicture *)encodable, context->pix_fmt, + (AVPicture *)pict, PIX_FMT_RGB24, + context->width, context->height); +#endif + + pict = encodable; + } + + AVPacket pkt; + av_init_packet(&pkt); + pkt.stream_index = stream->index; + pkt.data = (uint8_t *)pict; + pkt.size = sizeof(AVPicture); + if( context->coded_frame ) + pkt.pts = context->coded_frame->pts; + if( context->coded_frame && context->coded_frame->key_frame) + pkt.flags |= PKT_FLAG_KEY; + + //kluge for raw picture format (they said they'd fix) + if (formatc->oformat->flags & AVFMT_RAWPICTURE) + { + ret = av_write_frame(formatc, &pkt); + } + else + { + //encode our given image + size = avcodec_encode_video(context, &videobuffer[0], videobuffer.size(), pict); + + //if greater than zero we've got stuff to write + if (size > 0) + { + av_init_packet(&pkt); + pkt.stream_index = stream->index; + pkt.data = &videobuffer[0]; + pkt.size = size; + if( context->coded_frame ) + pkt.pts = context->coded_frame->pts; + if( context->coded_frame && context->coded_frame->key_frame) + pkt.flags |= PKT_FLAG_KEY; + + ret = av_write_frame(formatc, &pkt); + + //error detect - possibly throw later... + if(ret < 0) + { + synfig::warning("write_frame: error while writing video frame"); + return false; + } + } + //if 0, it was buffered (if invalid picture we don't have ANY data left) + else + { + //if we're clearing the buffers and there was no stuff to be written, we're done (like in codec example) + if(pict == NULL) + { + return false; + startedencoding = false; + } + + //buffered picture + } + } + + return true; + } + + void close(AVFormatContext */*formatc*/, AVStream *stream) + { + if(stream) + avcodec_close(stream->codec); + + if (encodable) + { + free_picture(encodable); + encodable = 0; + } + + videobuffer.resize(0); + } +}; + +class Target_LibAVCodec::LibAVEncoder +{ +public: + + bool initialized; + + AVOutputFormat *format; //reference to global, do not delete + + AVFormatContext *formatc; + + AVStream *video_st; + //AVStream *audio_st; + + double video_pts; + //double audio_pts; + + VideoEncoder vid; + VideoInfo vInfo; + + /*AudioEncoder aud; + AudioInfo aInfo;*/ + + AVFrame *picture; //for encoding to RGB24 (perhaps RGBA later) + + int frame_count; + int num_frames; + + LibAVEncoder() + { + format = 0; + formatc = 0; + + //video settings + video_st = 0; + video_pts = 0; + + vid.encodable = 0; + //vid.stream_nb_frames = 2; //reasonable default + + initialized = false; + picture = 0; + + frame_count = 0; + num_frames = 0; + + //aud.samples = 0; + //audio_st = 0; + //audio_pts = 0; + } + + ~LibAVEncoder() + { + CleanUp(); + } + + bool Initialize(const char *filename, const char *typestring) + { + //guess if we have a type string, otherwise use filename + if (typestring) + { + //formatptr guess_format(type, filename, MIME type) + format = guess_format(typestring,NULL,NULL); + } + else + { + format = guess_format(NULL, filename, NULL); + } + + if(!format) + { + synfig::warning("Unable to Guess the output, defaulting to mpeg"); + format = guess_format("mpeg", NULL, NULL); + } + + if(!format) + { + synfig::warning("Unable to find output format"); + return 0; + } + + //allocate the output context + formatc = (AVFormatContext *)av_mallocz(sizeof(AVFormatContext)); + if(!formatc) + { + synfig::warning("Memory error\n"); + return 0; + } + //set the output format to the one we found + formatc->oformat = format; + + //print the output filename + snprintf(formatc->filename, sizeof(formatc->filename), "%s", filename); + + //initial + video_st = NULL; + //audio_st = NULL; + + //video stream + if(format->video_codec != CODEC_ID_NONE) + { + video_st = add_video_stream(format->video_codec,vInfo); + if(!video_st) + { + av_free(formatc); + } + } + + //audio stream + /*if(format->audio_codec != CODEC_ID_NONE) + { + audio_st = add_audio_stream(format->audio_codec,aInfo); + }*/ + + //set output parameters: required in ALL cases + + video_st->codec->time_base= (AVRational){1,vInfo.fps}; + video_st->codec->width = vInfo.w; + video_st->codec->height = vInfo.h; + video_st->codec->pix_fmt = PIX_FMT_YUV420P; + + //dump the formatting information as the file header + dump_format(formatc, 0, filename, 1); + + //open codecs and allocate buffers + if(video_st) + { + if(!vid.open(formatc, video_st)) + { + synfig::warning("Could not open video encoder"); + return 0; + } + } + /*if(audio_st) + { + if(!aud.open(formatc, audio_st)) + { + synfig::warning("Could not open audio encoder"); + return 0; + } + }*/ + + //open output file + if(!(format->flags & AVFMT_NOFILE)) + { + //use libav's file open function (what does it do differently????) + if(url_fopen(&formatc->pb, filename, URL_WRONLY) < 0) + { + synfig::warning("Unable to open file: %s", filename); + return 0; + } + } + + //allocate the picture to render to + //may have to retrieve the width, height from the codec... for resizing... + picture = alloc_picture(PIX_FMT_RGB24,vInfo.w,vInfo.h);//video_st->codec.width, video_st->codec.height); + if(!picture) + { + synfig::warning("Unable to allocate the temporary AVFrame surface"); + return 0; + } + + initialized = true; + //vInfo.w = video_st->codec.width; + //vInfo.h = video_st->codec.height; + + //write the stream header + av_write_header(formatc); + + return true; + } + + void CleanUp() + { + unsigned int i; + + if(picture) free_picture(picture); + + //do all the clean up file rendering + if(formatc && video_st) + { + //want to scan in delayed frames until no longer needed (TODO) + if(vid.startedencoding) while( vid.write_frame(formatc, video_st, 0) ); + + //may want to move this... probably to the end of the last frame... + av_write_trailer(formatc); + } + + //close codecs + if (video_st) + vid.close(formatc,video_st); + /*if (audio_st) + aud.close(formatc,audio_st);*/ + + /* write the trailer, if any */ + if(formatc) + { + /* free the streams */ + for(i = 0; i < formatc->nb_streams; i++) + { + av_freep(&formatc->streams[i]); + } + + if(!(format->flags & AVFMT_NOFILE)) + { + /* close the output file */ +#if LIBAVFORMAT_VERSION_INT >= (52<<16) + url_fclose(formatc->pb); +#else + url_fclose(&formatc->pb); +#endif + } + + /* free the stream */ + av_free(formatc); + } + + initialized = false; + + format = 0; + formatc = 0; + + //video settings + video_st = 0; + video_pts = 0; + + vid.encodable = 0; + //vid.stream_nb_frames = 2; //reasonable default + + initialized = false; + picture = 0; + } + + //create a video output stream + AVStream *add_video_stream(int codec_id, const VideoInfo &info) + { + AVCodecContext *context; + AVStream *st; + + st = av_new_stream(formatc, 0); + if(!st) + { + synfig::warning("video-add_stream: Unable to allocate stream"); + return 0; + } + + context = st->codec; + context->codec_id = (CodecID)codec_id; + context->codec_type = CODEC_TYPE_VIDEO; + + //PARAMETERS MUST BE PASSED IN SOMEHOW (ANOTHER FUNCTION PARAMETER???) + + /* resolution must be a multiple of two */ + context->width = info.w; + context->height = info.h; + + //have another way to input these + context->bit_rate = info.bitrate; //TODO: Make dependant on the quality + + /* frames per second */ + // FIXME: Port next two lines to recent libavcodec versions + //context->frame_rate = info.fps; + //context->frame_rate_base = 1; + + /* "High Quality" */ + context->mb_decision=FF_MB_DECISION_BITS; + + context->gop_size = info.fps/4; /* emit one intra frame every twelve frames at most */ + + //HACK: MPEG requires b frames be set... any better way to do this? + if (context->codec_id == CODEC_ID_MPEG1VIDEO || + context->codec_id == CODEC_ID_MPEG2VIDEO) + { + /* just for testing, we also add B frames */ + context->max_b_frames = 2; + } + + return st; + } + + // add an audio output stream + AVStream *add_audio_stream(int codec_id,const AudioInfo &/*aInfo*/) + { + AVCodecContext *context; + AVStream *stream; + + stream = av_new_stream(formatc, 1); + if(!stream) + { + synfig::warning("could not alloc stream"); + return 0; + } + + context = stream->codec; + context->codec_id = (CodecID)codec_id; + context->codec_type = CODEC_TYPE_AUDIO; + + /* put sample parameters */ + context->bit_rate = 64000; + context->sample_rate = 44100; + context->channels = 2; + + return stream; + } +}; + +/* === M E T H O D S ======================================================= */ + +Target_LibAVCodec::Target_LibAVCodec(const char *Filename): + filename(Filename) +{ + if(!registered) + { + registered = true; + av_register_all(); + } + set_remove_alpha(); + + data = new LibAVEncoder; +} + +Target_LibAVCodec::~Target_LibAVCodec() +{ + data->CleanUp(); +} + +bool +Target_LibAVCodec::set_rend_desc(RendDesc *given_desc) +{ + // This is where you can determine how you want stuff + // to be rendered! given_desc is the suggestion, and + // you need to modify it to suit the needs of the codec. + // ie: Making the pixel dimensions divisible by 8, etc... + + desc=*given_desc; + + //resize surface (round even) + int w = desc.get_w(); + int h = desc.get_h(); + Point tl = desc.get_tl(); + Point br = desc.get_br(); + Real pw = desc.get_pw(); + Real ph = desc.get_ph(); + + //resize to the size it should be... + //desc.set_subwindow(-offx/2,-offy/2, desc.get_w() - offx?(offx + 8):0, desc.get_h() - offy?(offy + 8):0); + + //if resolution is broken, change the size... or something + //budge to nearest pixel values + if(w&1) + { + w += 1; + tl[0] -= pw/2; + br[0] += pw/2; + } + + if(h&1) + { + h += 1; + tl[1] -= ph/2; + br[1] += ph/2; + } + + desc.set_w(w); + desc.set_h(h); + desc.set_tl(tl); + desc.set_br(br); + + data->vInfo.w = w; + data->vInfo.h = h; + + //may want to round frame rate + data->vInfo.fps = (int)floor(desc.get_frame_rate()+0.5); +#define MEGABYTES_PER_HOUR(x) (((x)*1024/3600*1024*8)/*/640*w/480*h*/) + data->vInfo.bitrate = MEGABYTES_PER_HOUR(400); + //data->vInfo.bitrate = 800000; //make customizable somehow + + desc.set_frame_rate(data->vInfo.fps); + + data->frame_count = desc.get_frame_start(); + data->num_frames = desc.get_frame_end()+1; //number of frames should be 1 greater than the last one + + surface.set_wh(data->vInfo.w,data->vInfo.h); + + return true; +} + +void +Target_LibAVCodec::end_frame() +{ + //AVStream *audio_st = data->audio_st; + AVStream *video_st = data->video_st; + + AVFormatContext *formatc = data->formatc; + + //double &audio_pts = data->audio_pts; + //double &video_pts = data->video_pts; + + //ignore audio for now + /*if (audio_st) + audio_pts = (double)audio_st->pts.val * formatc->pts_num / formatc->pts_den; + else + audio_pts = 0.0; + + if (video_st) + video_pts = (double)video_st->pts.val * formatc->pts_num / formatc->pts_den; + else + video_pts = 0.0;*/ + + //hardcoded crappiness + /*if ((!audio_st || audio_pts >= STREAM_DURATION) && + (!video_st || video_pts >= STREAM_DURATION)) + break;*/ + + if(data->frame_count >= data->num_frames) return; + + //copy the current surface to the buffer + if(data->picture)convert_surface_frame(data->picture,surface,gamma()); + + //encode the frame and write it to the file + if(!data->vid.write_frame(formatc,video_st,data->picture)) + { + synfig::warning("Unable to write a frame"); + } + + data->frame_count++; + + if(data->frame_count >= data->num_frames) + { + data->CleanUp(); + } + + /* write interleaved audio and video frames */ + /*if (!video_st || (video_st && audio_st && audio_pts < video_pts)) { + data->aud.write_frame(formatc,audio_st); + } else { + data->vid.write_frame(formatc,video_st); + }*/ +} + +bool +Target_LibAVCodec::start_frame(synfig::ProgressCallback */*callback*/) +{ + //prepare all the color buffer stuff, etc. + + return true; +} + +Color * +Target_LibAVCodec::start_scanline(int scanline) +{ + return surface[scanline]; + + return 0; // This should kill the render process +} + +bool +Target_LibAVCodec::end_scanline() +{ + //don't need to do anything until the whole frame is done + return true; +} + +bool Target_LibAVCodec::init() +{ + //hardcoded test for mpeg + if(!data->Initialize(filename.c_str(),NULL)) + { + synfig::warning("Unable to Initialize the audio video encoders"); + return 0; + } + + return true; +} diff --git a/synfig-core/src/modules/mod_libavcodec/trgt_av.h b/synfig-core/src/modules/mod_libavcodec/trgt_av.h new file mode 100644 index 0000000..a2df7d7 --- /dev/null +++ b/synfig-core/src/modules/mod_libavcodec/trgt_av.h @@ -0,0 +1,69 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_av.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TRGT_H +#define __SYNFIG_TRGT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include "synfig/surface.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class Target_LibAVCodec : public synfig::Target_Scanline +{ + SYNFIG_TARGET_MODULE_EXT +private: + synfig::String filename; + + class LibAVEncoder; + LibAVEncoder *data; + + static bool registered; + + synfig::Surface surface; + +public: + Target_LibAVCodec(const char *filename); + virtual ~Target_LibAVCodec(); + + virtual bool init(); + + virtual bool set_rend_desc(synfig::RendDesc *desc); + virtual bool start_frame(synfig::ProgressCallback *cb); + virtual void end_frame(); + virtual synfig::Color * start_scanline(int scanline); + virtual bool end_scanline(); +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_libavcodec/unmod_libavcodec.nsh b/synfig-core/src/modules/mod_libavcodec/unmod_libavcodec.nsh new file mode 100644 index 0000000..77acf4d --- /dev/null +++ b/synfig-core/src/modules/mod_libavcodec/unmod_libavcodec.nsh @@ -0,0 +1,8 @@ +Section "un.mod_libavcodec" + Delete "$INSTDIR\lib\synfig\modules\mod_libavcodec.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/modules/mod_magickpp/Makefile.am b/synfig-core/src/modules/mod_magickpp/Makefile.am new file mode 100644 index 0000000..7660173 --- /dev/null +++ b/synfig-core/src/modules/mod_magickpp/Makefile.am @@ -0,0 +1,40 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +moduledir = @MODULE_DIR@ + +if HAVE_LIBMAGICKPP + +module_LTLIBRARIES = libmod_magickpp.la + +libmod_magickpp_la_SOURCES = \ + main.cpp \ + trgt_magickpp.cpp \ + trgt_magickpp.h + +libmod_magickpp_la_LDFLAGS = \ + -module \ + @MAGICKPP_LIBS@ \ + -no-undefined \ + -avoid-version + +libmod_magickpp_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ + +libmod_magickpp_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @SYNFIG_LIBS@ + +endif + + +EXTRA_DIST = \ + mod_magickpp.nsh \ + unmod_magickpp.nsh diff --git a/synfig-core/src/modules/mod_magickpp/main.cpp b/synfig-core/src/modules/mod_magickpp/main.cpp new file mode 100644 index 0000000..e3d08ad --- /dev/null +++ b/synfig-core/src/modules/mod_magickpp/main.cpp @@ -0,0 +1,216 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_magickpp/main.cpp +** \brief Magick++ plugin +** +** $Id$ +** +** \legal +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "trgt_magickpp.h" +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(mod_magickpp) + MODULE_NAME("Magick++ Module (libMagick++)") + MODULE_DESCRIPTION("Provides an animated GIF target") + MODULE_AUTHOR("Chris Moore") + MODULE_VERSION("1.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(mod_magickpp) + BEGIN_TARGETS + TARGET(magickpp_trgt) + TARGET_EXT(magickpp_trgt, "8bim") + TARGET_EXT(magickpp_trgt, "8bimtext") + TARGET_EXT(magickpp_trgt, "8bimwtext") + TARGET_EXT(magickpp_trgt, "a") + TARGET_EXT(magickpp_trgt, "app1") + TARGET_EXT(magickpp_trgt, "app1jpeg") + TARGET_EXT(magickpp_trgt, "art") + TARGET_EXT(magickpp_trgt, "avs") + TARGET_EXT(magickpp_trgt, "b") + TARGET_EXT(magickpp_trgt, "bie") + TARGET_EXT(magickpp_trgt, "bmp") + TARGET_EXT(magickpp_trgt, "bmp2") + TARGET_EXT(magickpp_trgt, "bmp3") + TARGET_EXT(magickpp_trgt, "c") + TARGET_EXT(magickpp_trgt, "cache") + TARGET_EXT(magickpp_trgt, "cin") + TARGET_EXT(magickpp_trgt, "cip") + TARGET_EXT(magickpp_trgt, "clip") + TARGET_EXT(magickpp_trgt, "clipboard") + TARGET_EXT(magickpp_trgt, "cmyk") + TARGET_EXT(magickpp_trgt, "cmyka") + TARGET_EXT(magickpp_trgt, "cur") + TARGET_EXT(magickpp_trgt, "dcx") + TARGET_EXT(magickpp_trgt, "dib") + TARGET_EXT(magickpp_trgt, "dpx") + TARGET_EXT(magickpp_trgt, "emf") + TARGET_EXT(magickpp_trgt, "epdf") + TARGET_EXT(magickpp_trgt, "epi") + TARGET_EXT(magickpp_trgt, "eps") + TARGET_EXT(magickpp_trgt, "eps2") + TARGET_EXT(magickpp_trgt, "eps3") + TARGET_EXT(magickpp_trgt, "epsf") + TARGET_EXT(magickpp_trgt, "epsi") + TARGET_EXT(magickpp_trgt, "ept") + TARGET_EXT(magickpp_trgt, "ept2") + TARGET_EXT(magickpp_trgt, "ept3") + TARGET_EXT(magickpp_trgt, "exif") + TARGET_EXT(magickpp_trgt, "exr") + TARGET_EXT(magickpp_trgt, "fax") + TARGET_EXT(magickpp_trgt, "file") + TARGET_EXT(magickpp_trgt, "fits") + TARGET_EXT(magickpp_trgt, "fpx") + TARGET_EXT(magickpp_trgt, "ftp") + TARGET_EXT(magickpp_trgt, "fts") + TARGET_EXT(magickpp_trgt, "g") + TARGET_EXT(magickpp_trgt, "g3") + TARGET_EXT(magickpp_trgt, "gif") + TARGET_EXT(magickpp_trgt, "gif87") + TARGET_EXT(magickpp_trgt, "granite") + TARGET_EXT(magickpp_trgt, "gray") + TARGET_EXT(magickpp_trgt, "h") + TARGET_EXT(magickpp_trgt, "histogram") + TARGET_EXT(magickpp_trgt, "htm") + TARGET_EXT(magickpp_trgt, "html") + TARGET_EXT(magickpp_trgt, "http") + TARGET_EXT(magickpp_trgt, "icb") + TARGET_EXT(magickpp_trgt, "icc") + TARGET_EXT(magickpp_trgt, "icm") + TARGET_EXT(magickpp_trgt, "ico") + TARGET_EXT(magickpp_trgt, "icon") + TARGET_EXT(magickpp_trgt, "info") + TARGET_EXT(magickpp_trgt, "ipl") + TARGET_EXT(magickpp_trgt, "iptc") + TARGET_EXT(magickpp_trgt, "iptctext") + TARGET_EXT(magickpp_trgt, "iptcwtext") + TARGET_EXT(magickpp_trgt, "jbg") + TARGET_EXT(magickpp_trgt, "jbig") + TARGET_EXT(magickpp_trgt, "jng") + TARGET_EXT(magickpp_trgt, "jp2") + TARGET_EXT(magickpp_trgt, "jpc") + TARGET_EXT(magickpp_trgt, "jpeg") + TARGET_EXT(magickpp_trgt, "jpg") + TARGET_EXT(magickpp_trgt, "jpx") + TARGET_EXT(magickpp_trgt, "k") + TARGET_EXT(magickpp_trgt, "logo") + TARGET_EXT(magickpp_trgt, "m") + TARGET_EXT(magickpp_trgt, "m2v") + TARGET_EXT(magickpp_trgt, "magick") + TARGET_EXT(magickpp_trgt, "map") + TARGET_EXT(magickpp_trgt, "mat") + TARGET_EXT(magickpp_trgt, "matte") + TARGET_EXT(magickpp_trgt, "miff") + TARGET_EXT(magickpp_trgt, "mng") + TARGET_EXT(magickpp_trgt, "mono") + TARGET_EXT(magickpp_trgt, "mpc") + TARGET_EXT(magickpp_trgt, "mpeg") + TARGET_EXT(magickpp_trgt, "mpg") + TARGET_EXT(magickpp_trgt, "mpr") + TARGET_EXT(magickpp_trgt, "mpri") + TARGET_EXT(magickpp_trgt, "msl") + TARGET_EXT(magickpp_trgt, "msvg") + TARGET_EXT(magickpp_trgt, "mtv") + TARGET_EXT(magickpp_trgt, "mvg") + TARGET_EXT(magickpp_trgt, "netscape") + TARGET_EXT(magickpp_trgt, "null") + TARGET_EXT(magickpp_trgt, "o") + TARGET_EXT(magickpp_trgt, "otb") + TARGET_EXT(magickpp_trgt, "pal") + TARGET_EXT(magickpp_trgt, "palm") + TARGET_EXT(magickpp_trgt, "pam") + TARGET_EXT(magickpp_trgt, "pbm") + TARGET_EXT(magickpp_trgt, "pcd") + TARGET_EXT(magickpp_trgt, "pcds") + TARGET_EXT(magickpp_trgt, "pcl") + TARGET_EXT(magickpp_trgt, "pct") + TARGET_EXT(magickpp_trgt, "pcx") + TARGET_EXT(magickpp_trgt, "pdb") + TARGET_EXT(magickpp_trgt, "pdf") + TARGET_EXT(magickpp_trgt, "pfm") + TARGET_EXT(magickpp_trgt, "pgm") + TARGET_EXT(magickpp_trgt, "picon") + TARGET_EXT(magickpp_trgt, "pict") + TARGET_EXT(magickpp_trgt, "pjpeg") + TARGET_EXT(magickpp_trgt, "pm") + TARGET_EXT(magickpp_trgt, "png") + TARGET_EXT(magickpp_trgt, "png24") + TARGET_EXT(magickpp_trgt, "png32") + TARGET_EXT(magickpp_trgt, "png8") + TARGET_EXT(magickpp_trgt, "pnm") + TARGET_EXT(magickpp_trgt, "ppm") + TARGET_EXT(magickpp_trgt, "preview") + TARGET_EXT(magickpp_trgt, "ps") + TARGET_EXT(magickpp_trgt, "ps2") + TARGET_EXT(magickpp_trgt, "ps3") + TARGET_EXT(magickpp_trgt, "psd") + TARGET_EXT(magickpp_trgt, "ptif") + TARGET_EXT(magickpp_trgt, "r") + TARGET_EXT(magickpp_trgt, "ras") + TARGET_EXT(magickpp_trgt, "rgb") + TARGET_EXT(magickpp_trgt, "rgba") + TARGET_EXT(magickpp_trgt, "rgbo") + TARGET_EXT(magickpp_trgt, "rose") + TARGET_EXT(magickpp_trgt, "sgi") + TARGET_EXT(magickpp_trgt, "shtml") + TARGET_EXT(magickpp_trgt, "sun") + TARGET_EXT(magickpp_trgt, "svg") + TARGET_EXT(magickpp_trgt, "svgz") + TARGET_EXT(magickpp_trgt, "text") + TARGET_EXT(magickpp_trgt, "tga") + TARGET_EXT(magickpp_trgt, "thumbnail") + TARGET_EXT(magickpp_trgt, "tif") + TARGET_EXT(magickpp_trgt, "tiff") + TARGET_EXT(magickpp_trgt, "txt") + TARGET_EXT(magickpp_trgt, "uil") + TARGET_EXT(magickpp_trgt, "uyvy") + TARGET_EXT(magickpp_trgt, "vda") + TARGET_EXT(magickpp_trgt, "vicar") + TARGET_EXT(magickpp_trgt, "vid") + TARGET_EXT(magickpp_trgt, "viff") + TARGET_EXT(magickpp_trgt, "vst") + TARGET_EXT(magickpp_trgt, "wbmp") + TARGET_EXT(magickpp_trgt, "wmfwin32") + TARGET_EXT(magickpp_trgt, "x") + TARGET_EXT(magickpp_trgt, "xbm") + TARGET_EXT(magickpp_trgt, "xmp") + TARGET_EXT(magickpp_trgt, "xpm") + TARGET_EXT(magickpp_trgt, "xv") + TARGET_EXT(magickpp_trgt, "xwd") + TARGET_EXT(magickpp_trgt, "y") + TARGET_EXT(magickpp_trgt, "ycbcr") + TARGET_EXT(magickpp_trgt, "ycbcra") + TARGET_EXT(magickpp_trgt, "yuv") + END_TARGETS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mod_magickpp/mod_magickpp.nsh b/synfig-core/src/modules/mod_magickpp/mod_magickpp.nsh new file mode 100644 index 0000000..bd37688 --- /dev/null +++ b/synfig-core/src/modules/mod_magickpp/mod_magickpp.nsh @@ -0,0 +1,11 @@ +Section "mod_magickpp" Sec_mod_magickpp + SetOutPath "$INSTDIR\lib\synfig\modules" + File /oname=mod_magickpp.dll "src\modules\mod_magickpp\.libs\libmod_magickpp.dll" + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "mod_magickpp" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 +SectionEnd + diff --git a/synfig-core/src/modules/mod_magickpp/trgt_magickpp.cpp b/synfig-core/src/modules/mod_magickpp/trgt_magickpp.cpp new file mode 100644 index 0000000..875f2b5 --- /dev/null +++ b/synfig-core/src/modules/mod_magickpp/trgt_magickpp.cpp @@ -0,0 +1,309 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_magickpp.cpp +** \brief Magick++ Target Module +** +** $Id$ +** +** \legal +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_TARGET + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "trgt_magickpp.h" + +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_TARGET_INIT(magickpp_trgt); +SYNFIG_TARGET_SET_NAME(magickpp_trgt,"magick++"); +SYNFIG_TARGET_SET_EXT(magickpp_trgt,"gif"); +SYNFIG_TARGET_SET_VERSION(magickpp_trgt,"0.1"); +SYNFIG_TARGET_SET_CVS_ID(magickpp_trgt,"$Id$"); + +/* === M E T H O D S ======================================================= */ + +template +MagickLib::Image* copy_image_list(Container& container) +{ + typedef typename Container::iterator Iter; + MagickLib::Image* previous = 0; + MagickLib::Image* first = NULL; + MagickLib::ExceptionInfo exceptionInfo; + MagickLib::GetExceptionInfo(&exceptionInfo); + for (Iter iter = container.begin(); iter != container.end(); ++iter) + { + MagickLib::Image* current; + + try + { + current = CloneImage(iter->image(), 0, 0, Magick::MagickTrue, &exceptionInfo); + + if (!first) first = current; + + current->previous = previous; + current->next = 0; + + if ( previous != 0) previous->next = current; + previous = current; + } + catch(Magick::Warning warning) { + synfig::warning("exception '%s'", warning.what()); + } + } + + return first; +} + +magickpp_trgt::~magickpp_trgt() +{ + MagickLib::ExceptionInfo exceptionInfo; + MagickLib::GetExceptionInfo(&exceptionInfo); + + try + { + bool multiple_images = images.size() != 1; + bool can_adjoin = false; + + if (multiple_images) + { + // check whether this file format supports multiple-image files + Magick::Image image(*(images.begin())); + image.fileName(filename); + try + { + SetImageInfo(image.imageInfo(),Magick::MagickTrue,&exceptionInfo); + can_adjoin = image.adjoin(); + } + catch(Magick::Warning warning) { + synfig::warning("exception '%s'", warning.what()); + } + } + + // the file type is now in image.imageInfo()->magick and + // image.adjoin() tells us whether we can write to a single file + if (can_adjoin) + { + synfig::info("joining images"); + unsigned int delay = round_to_int(100.0 / desc.get_frame_rate()); + for_each(images.begin(), images.end(), Magick::animationDelayImage(delay)); + + // optimize the images (only write the pixels that change from frame to frame +#ifdef HAVE_MAGICK_OPTIMIZE + // make a completely new image list + // this is required because: + // RemoveDuplicateLayers wants a linked list of images, and removes some of them + // when it removes an image, it invalidates it using DeleteImageFromList, but we still have it in our container + // when we destroy our container, the image is re-freed, failing an assertion + + synfig::info("copying image list"); + MagickLib::Image *image_list = copy_image_list(images); + + synfig::info("clearing old image list"); + images.clear(); + + if (!getenv("SYNFIG_DISABLE_REMOVE_DUPS")) + { + synfig::info("removing duplicate frames"); + try + { + RemoveDuplicateLayers(&image_list, &exceptionInfo); + } + catch(Magick::Warning warning) { + synfig::warning("exception '%s'", warning.what()); + } + } + + if (!getenv("SYNFIG_DISABLE_OPTIMIZE")) + { + synfig::info("optimizing layers"); + try + { + image_list = OptimizeImageLayers(image_list,&exceptionInfo); + } + catch(Magick::Warning warning) { + synfig::warning("exception '%s'", warning.what()); + } + } + + if (!getenv("SYNFIG_DISABLE_OPTIMIZE_TRANS")) + { + synfig::info("optimizing layer transparency"); + try + { + OptimizeImageTransparency(image_list,&exceptionInfo); + } + catch(Magick::Warning warning) { + synfig::warning("exception '%s'", warning.what()); + } + } + + synfig::info("recreating image list"); + insertImages(&images, image_list); +#else + synfig::info("not optimizing images"); + // DeconstructImages is available in ImageMagic 6.2.* but it doesn't take + // the 'dispose' method into account, so for frames with transparency where + // nothing is moving, we end up with objects disappearing when they shouldn't + + // linkImages(images.begin(), images.end()); + // MagickLib::Image* new_images = DeconstructImages(images.begin()->image(),&exceptionInfo); + // unlinkImages(images.begin(), images.end()); + // images.clear(); + // insertImages(&images, new_images); +#endif + } + else if (multiple_images) + { + // if we can't write multiple images to a file of this type, + // include '%04d' in the filename, so the files will be numbered + // with a fixed width, '0'-padded number + synfig::info("can't join images of this type - numbering instead"); + filename = (filename_sans_extension(filename) + ".%04d" + filename_extension(filename)); + } + + synfig::info("writing %d image%s to %s", images.size(), images.size() == 1 ? "" : "s", filename.c_str()); + try + { + Magick::writeImages(images.begin(), images.end(), filename); + synfig::info("done"); + } + catch(Magick::Warning warning) { + synfig::warning("exception '%s'", warning.what()); + } + } + catch(Magick::Warning warning) { + synfig::warning("exception '%s'", warning.what()); + } + catch(Magick::Error error) { + synfig::error("exception '%s'", error.what()); + } + catch(...) { + synfig::error("unknown exception"); + } + + if (buffer1 != NULL) delete [] buffer1; + if (buffer2 != NULL) delete [] buffer2; + if (color_buffer != NULL) delete [] color_buffer; +} + +bool +magickpp_trgt::set_rend_desc(RendDesc *given_desc) +{ + desc = *given_desc; + return true; +} + +bool +magickpp_trgt::init() +{ + width = desc.get_w(); + height = desc.get_h(); + + start_pointer = NULL; + + buffer1 = new unsigned char[4*width*height]; + if (buffer1 == NULL) + return false; + + buffer2 = new unsigned char[4*width*height]; + if (buffer2 == NULL) + { + delete [] buffer1; + return false; + } + + color_buffer = new Color[width]; + if (color_buffer == NULL) + { + delete [] buffer1; + delete [] buffer2; + return false; + } + + return true; +} + +void +magickpp_trgt::end_frame() +{ + Magick::Image image(width, height, "RGBA", Magick::CharPixel, start_pointer); + if (transparent && images.begin() != images.end()) + (images.end()-1)->gifDisposeMethod(Magick::BackgroundDispose); + images.push_back(image); +} + +bool +magickpp_trgt::start_frame(synfig::ProgressCallback *callback __attribute__ ((unused))) +{ + previous_buffer_pointer = start_pointer; + + if (start_pointer == buffer1) + start_pointer = buffer_pointer = buffer2; + else + start_pointer = buffer_pointer = buffer1; + + transparent = false; + return true; +} + +Color* +magickpp_trgt::start_scanline(int scanline __attribute__ ((unused))) +{ + return color_buffer; +} + +bool +magickpp_trgt::end_scanline() +{ + convert_color_format(buffer_pointer, color_buffer, + width, PF_RGB|PF_A, gamma()); + + if (!transparent) + for (int i = 0; i < width; i++) + if (previous_buffer_pointer && // this isn't the first frame + buffer_pointer[i*4 + 3] < 128 && // our pixel is transparent + !(previous_buffer_pointer[i*4 + 3] < 128)) // the previous frame's pixel wasn't + { + transparent = true; + break; + } + + buffer_pointer += 4 * width; + + if (previous_buffer_pointer) + previous_buffer_pointer += 4 * width; + + return true; +} diff --git a/synfig-core/src/modules/mod_magickpp/trgt_magickpp.h b/synfig-core/src/modules/mod_magickpp/trgt_magickpp.h new file mode 100644 index 0000000..57a0c01 --- /dev/null +++ b/synfig-core/src/modules/mod_magickpp/trgt_magickpp.h @@ -0,0 +1,72 @@ +/*! ======================================================================== +** Synfig +** +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TRGT_MAGICKPP_H +#define __SYNFIG_TRGT_MAGICKPP_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include + +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class magickpp_trgt : public synfig::Target_Scanline +{ + SYNFIG_TARGET_MODULE_EXT + +private: + + int width, height; + + synfig::String filename; + unsigned char *buffer1, *start_pointer, *buffer_pointer; + unsigned char *buffer2, *previous_buffer_pointer; + bool transparent; + synfig::Color *color_buffer; + std::vector images; + +public: + + magickpp_trgt(const char *filename) : filename(filename) { } + virtual ~magickpp_trgt(); + + virtual bool set_rend_desc(synfig::RendDesc *desc); + virtual bool init(); + + virtual bool start_frame(synfig::ProgressCallback *cb); + virtual void end_frame(); + + virtual synfig::Color* start_scanline(int scanline); + virtual bool end_scanline(); +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_magickpp/unmod_magickpp.nsh b/synfig-core/src/modules/mod_magickpp/unmod_magickpp.nsh new file mode 100644 index 0000000..b4001cf --- /dev/null +++ b/synfig-core/src/modules/mod_magickpp/unmod_magickpp.nsh @@ -0,0 +1,5 @@ +Section "un.mod_magicpp" + Delete "$INSTDIR\lib\synfig\modules\mod_magicpp.dll" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/modules/mod_mng/Makefile.am b/synfig-core/src/modules/mod_mng/Makefile.am new file mode 100644 index 0000000..bdaf7b0 --- /dev/null +++ b/synfig-core/src/modules/mod_mng/Makefile.am @@ -0,0 +1,41 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +moduledir = @MODULE_DIR@ + +if HAVE_LIBMNG + +module_LTLIBRARIES = \ + libmod_mng.la + +libmod_mng_la_SOURCES = \ + main.cpp \ + trgt_mng.cpp \ + trgt_mng.h + +libmod_mng_la_LDFLAGS = \ + -module \ + @MNG_LIBS@ \ + -no-undefined \ + -avoid-version + +libmod_mng_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ + +libmod_mng_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @SYNFIG_LIBS@ + +endif + + +EXTRA_DIST = \ + mod_mng.nsh \ + unmod_mng.nsh diff --git a/synfig-core/src/modules/mod_mng/main.cpp b/synfig-core/src/modules/mod_mng/main.cpp new file mode 100644 index 0000000..fe50172 --- /dev/null +++ b/synfig-core/src/modules/mod_mng/main.cpp @@ -0,0 +1,65 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_mng/main.cpp +** \brief MNG plugin +** +** $Id$ +** +** \legal +** Copyright (c) 2007 Paul Wise +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "trgt_mng.h" +/* FIXME: Implement MNG import +#include "mptr_mng.h" +*/ +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(mod_mng) + MODULE_NAME("MNG Module (libmng)") +/* FIXME: Implement MNG import + MODULE_DESCRIPTION("Provides an MNG target and importer") +*/ + MODULE_DESCRIPTION("Provides an MNG target") + MODULE_AUTHOR("Paul Wise") + MODULE_VERSION("1.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(mod_mng) + BEGIN_TARGETS + TARGET(mng_trgt) + END_TARGETS +/* FIXME: implement MNG import + BEGIN_IMPORTERS + IMPORTER(mng_mptr) + END_IMPORTERS +*/ +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mod_mng/mod_mng.nsh b/synfig-core/src/modules/mod_mng/mod_mng.nsh new file mode 100644 index 0000000..13c11a0 --- /dev/null +++ b/synfig-core/src/modules/mod_mng/mod_mng.nsh @@ -0,0 +1,11 @@ +Section "mod_mng" Sec_mod_mng + SetOutPath "$INSTDIR\lib\synfig\modules" + File /oname=mod_mng.dll "src\modules\mod_mng\.libs\libmod_mng.dll" + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "mod_mng" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 +SectionEnd + diff --git a/synfig-core/src/modules/mod_mng/trgt_mng.cpp b/synfig-core/src/modules/mod_mng/trgt_mng.cpp new file mode 100644 index 0000000..7a97c7c --- /dev/null +++ b/synfig-core/src/modules/mod_mng/trgt_mng.cpp @@ -0,0 +1,337 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_mng.cpp +** \brief MNG Target Module +** +** $Id$ +** +** \legal +** Copyright (c) 2007 Paul Wise +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** You will need to read the PNG and MNG specs to understand this code +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_TARGET + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "trgt_mng.h" +#include +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_TARGET_INIT(mng_trgt); +SYNFIG_TARGET_SET_NAME(mng_trgt,"mng"); +SYNFIG_TARGET_SET_EXT(mng_trgt,"mng"); +SYNFIG_TARGET_SET_VERSION(mng_trgt,"0.1"); +SYNFIG_TARGET_SET_CVS_ID(mng_trgt,"$Id$"); + +/* === M E T H O D S ======================================================= */ + +static mng_ptr MNG_DECL +mng_alloc_proc(mng_size_t size) +{ + return (mng_ptr)calloc(1,size); +} + +static void MNG_DECL +mng_free_proc(mng_ptr ptr, mng_size_t size __attribute__ ((unused))) +{ + free(ptr); return; +} + +static mng_bool MNG_DECL +mng_null_proc(mng_handle mng __attribute__ ((unused))) +{ + // synfig::info("%s:%d mng_trgt::mng_null_proc was called", __FILE__, __LINE__); + return MNG_TRUE; +} + +static mng_bool MNG_DECL +mng_write_proc(mng_handle mng, mng_ptr buf, mng_uint32 size, mng_uint32* written) +{ + FILE* file = (FILE*)mng_get_userdata (mng); + *written = fwrite(buf, 1, size, file); + return MNG_TRUE; +} + +static mng_bool MNG_DECL +mng_error_proc(mng_handle mng __attribute__ ((unused)), mng_int32 error __attribute__ ((unused)), + mng_int8 severity __attribute__ ((unused)), mng_chunkid chunkname __attribute__ ((unused)), + mng_uint32 chunkseq __attribute__ ((unused)), mng_int32 extra1 __attribute__ ((unused)), + mng_int32 extra2 __attribute__ ((unused)), mng_pchar errortext) +{ + synfig::error("%s:%d mng_trgt: error: %s", __FILE__, __LINE__, errortext); + return MNG_TRUE; +} + +mng_trgt::mng_trgt(const char *Filename) : filename(Filename) +{ + file=NULL; + buffer=NULL; + color_buffer=NULL; + zbuffer=NULL; + zbuffer_len=0; + ready=false; +} + +mng_trgt::~mng_trgt() +{ + synfig::info("mng_trgt: ~mng_trgt"); + if (mng != MNG_NULL) + { + mng_putchunk_mend(mng); + if (mng_write(mng) != 0) + { + mng_int8 severity; + mng_chunkid chunkname; + mng_uint32 chunkseq; + mng_int32 extra1; + mng_int32 extra2; + mng_pchar errortext; + mng_getlasterror(mng, &severity, &chunkname, &chunkseq, &extra1,&extra2, &errortext); + synfig::error("mng_trgt: error: couldn't write mng: %s",errortext); + } + mng_cleanup (&mng); + } + if (file != NULL) fclose(file); file=NULL; + if (buffer != NULL) { delete [] buffer; buffer = NULL; } + if (color_buffer != NULL) { delete [] color_buffer; color_buffer = NULL; } + if (zbuffer != NULL) { free(zbuffer); zbuffer = NULL; zbuffer_len = 0; } +} + +bool +mng_trgt::set_rend_desc(RendDesc *given_desc) +{ + desc=*given_desc; + imagecount=desc.get_frame_start(); + if (desc.get_frame_end()-desc.get_frame_start()>0) + multi_image=true; + else + multi_image=false; + return true; +} + + +bool +mng_trgt::init() +{ + // synfig::info("%s:%d mng_trgt::init()", __FILE__, __LINE__); + + int frame_rate, num_frames, play_time; + int num_layers = 1; + + if (multi_image) + { + frame_rate = int(desc.get_frame_rate()); + printf("frame rt %d\n", frame_rate); + num_frames = desc.get_frame_end()-desc.get_frame_start(); + play_time = num_frames;// / frame_rate; + } + else + { + frame_rate = 0; + num_frames = 1; + play_time = 0; + } + + time_t t = time (NULL); + struct tm* gmt = gmtime(&t); + w=desc.get_w(); h=desc.get_h(); + file = fopen(filename.c_str(), POPEN_BINARY_WRITE_TYPE); + if (file == NULL) goto cleanup_on_error; + mng = mng_initialize((mng_ptr)file, mng_alloc_proc, mng_free_proc, MNG_NULL); + if (mng == MNG_NULL) goto cleanup_on_error; + if (mng_setcb_errorproc(mng, mng_error_proc) != 0) goto cleanup_on_error; + if (mng_setcb_writedata(mng, mng_write_proc) != 0) goto cleanup_on_error; + if (mng_setcb_openstream(mng, mng_null_proc) != 0) goto cleanup_on_error; + if (mng_setcb_closestream(mng, mng_null_proc) != 0) goto cleanup_on_error; + if (mng_create(mng) != 0) goto cleanup_on_error; + if (mng_putchunk_mhdr(mng, w, h, frame_rate, num_layers, num_frames, play_time, MNG_SIMPLICITY_VALID|MNG_SIMPLICITY_SIMPLEFEATURES) != 0) goto cleanup_on_error; + if (mng_putchunk_term(mng, MNG_TERMACTION_REPEAT, MNG_ITERACTION_LASTFRAME, 0, 0x7fffffff) != 0) goto cleanup_on_error; + { + char title[] = MNG_TEXT_TITLE; + if (mng_putchunk_text(mng, sizeof(title), title, + get_canvas()->get_name().length(), const_cast(get_canvas()->get_name().c_str())) != 0) + goto cleanup_on_error; + + char description[] = MNG_TEXT_DESCRIPTION; + if (mng_putchunk_text(mng, sizeof(description), description, + get_canvas()->get_description().length(), const_cast(get_canvas()->get_description().c_str())) != 0) + goto cleanup_on_error; + + char software[] = MNG_TEXT_SOFTWARE; char synfig[] = "SYNFIG"; + if (mng_putchunk_text(mng, sizeof(software), software, + sizeof(synfig), synfig) != 0) + goto cleanup_on_error; + } + if (mng_putchunk_gama(mng, MNG_FALSE, (int)(gamma().get_gamma()*100000)) != 0) goto cleanup_on_error; + if (mng_putchunk_phys(mng, MNG_FALSE, round_to_int(desc.get_x_res()),round_to_int(desc.get_y_res()), MNG_UNIT_METER) != 0) goto cleanup_on_error; + if (mng_putchunk_time(mng, gmt->tm_year + 1900, gmt->tm_mon + 1, gmt->tm_mday, gmt->tm_hour, gmt->tm_min, gmt->tm_sec) != 0) goto cleanup_on_error; + buffer=new unsigned char[(4*w)+1]; + if (buffer == NULL) goto cleanup_on_error; + color_buffer=new Color[w]; + if (color_buffer == NULL) goto cleanup_on_error; + return true; + +cleanup_on_error: + ready=false; + if (mng != MNG_NULL) + { + mng_int8 severity; + mng_chunkid chunkname; + mng_uint32 chunkseq; + mng_int32 extra1; + mng_int32 extra2; + mng_pchar errortext; + mng_getlasterror (mng, &severity, &chunkname, &chunkseq, &extra1,&extra2, &errortext); + synfig::error("mng_trgt: libmng: %s",errortext); + mng_cleanup (&mng); + } + + if (file && file!=stdout) + fclose(file); + file=NULL; + + if (buffer != NULL) + { + delete [] buffer; + buffer = NULL; + } + + if (color_buffer != NULL) + { + delete [] color_buffer; + color_buffer = NULL; + } + + return false; +} + +void +mng_trgt::end_frame() +{ + // synfig::info("%s:%d mng_trgt::end_frame()", __FILE__, __LINE__); + + if (deflate(&zstream,Z_FINISH) != Z_STREAM_END) + { + synfig::error("%s:%d deflate()", __FILE__, __LINE__); + return; + } + if (deflateEnd(&zstream) != Z_OK) + { + synfig::error("%s:%d deflateEnd()", __FILE__, __LINE__); + return; + } + if (mng != MNG_NULL) + { + mng_putchunk_idat(mng, zstream.next_out-zbuffer, zbuffer); + mng_putchunk_iend(mng); + } + imagecount++; + ready=false; +} + +bool +mng_trgt::start_frame(synfig::ProgressCallback *callback __attribute__ ((unused))) +{ + // synfig::info("%s:%d mng_trgt::start_frame()", __FILE__, __LINE__); + + if (mng == MNG_NULL) + { + synfig::error("%s:%d mng == MNG_NULL", __FILE__, __LINE__); + return false; + } + + if (mng_putchunk_ihdr(mng, w, h, MNG_BITDEPTH_8, MNG_COLORTYPE_RGBA, MNG_COMPRESSION_DEFLATE, MNG_FILTER_ADAPTIVE, MNG_INTERLACE_NONE) != 0) + { + synfig::error("%s:%d mng_putchunk_ihdr()", __FILE__, __LINE__); + return false; + } + + zstream.zalloc = Z_NULL; + zstream.zfree = Z_NULL; + zstream.opaque = Z_NULL; + + if (deflateInit(&zstream, /* Z_BEST_COMPRESSION */ Z_DEFAULT_COMPRESSION) != Z_OK) + { + synfig::error("%s:%d deflateInit()", __FILE__, __LINE__); + return false; + } + + if (zbuffer == NULL) + { + zbuffer_len = deflateBound(&zstream,((4*w)+1)*h); // don't forget the 'filter' byte - one per scanline + zbuffer = (unsigned char*)realloc(zbuffer, zbuffer_len); + } + + zstream.avail_out = zbuffer_len; + zstream.next_out = zbuffer; + + ready=true; + + return true; +} + +Color* +mng_trgt::start_scanline(int scanline __attribute__ ((unused))) +{ + return color_buffer; +} + +bool +mng_trgt::end_scanline() +{ + if (!file || !ready) + { + synfig::error("%s:%d !file or !ready", __FILE__, __LINE__); + return false; + } + + *buffer = MNG_FILTER_NONE; + convert_color_format(buffer+1, color_buffer, desc.get_w(), PF_RGB|PF_A, gamma()); + + zstream.next_in = buffer; + zstream.avail_in = (4*w)+1; + + if (deflate(&zstream,Z_NO_FLUSH) != Z_OK) { + synfig::error("%s:%d deflate()", __FILE__, __LINE__); + return false; + } + + return true; +} diff --git a/synfig-core/src/modules/mod_mng/trgt_mng.h b/synfig-core/src/modules/mod_mng/trgt_mng.h new file mode 100644 index 0000000..a194b35 --- /dev/null +++ b/synfig-core/src/modules/mod_mng/trgt_mng.h @@ -0,0 +1,99 @@ +/*! ======================================================================== +** Synfig +** +** Copyright (c) 2007 Paul Wise +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TRGT_MNG_H +#define __SYNFIG_TRGT_MNG_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include + +// #include +// #include + +#if !defined(MNG_SUPPORT_FULL) +#define MNG_SUPPORT_FULL 1 +#endif + +#if !defined(MNG_SUPPORT_READ) +#define MNG_SUPPORT_READ 1 +#endif + +#if !defined(MNG_SUPPORT_WRITE) +#define MNG_SUPPORT_WRITE 1 +#endif + +#if !defined(MNG_SUPPORT_DISPLAY) +#define MNG_SUPPORT_DISPLAY 1 +#endif + +#if !defined(MNG_ACCESS_CHUNKS) +#define MNG_ACCESS_CHUNKS 1 +#endif + +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class mng_trgt : public synfig::Target_Scanline +{ + SYNFIG_TARGET_MODULE_EXT + +private: + + FILE *file; + int w,h; + mng_handle mng; + + bool multi_image,ready; + int imagecount; + synfig::String filename; + unsigned char *buffer; + synfig::Color *color_buffer; + + z_stream zstream; + unsigned char* zbuffer; + unsigned int zbuffer_len; + +public: + + mng_trgt(const char *filename); + virtual ~mng_trgt(); + + virtual bool set_rend_desc(synfig::RendDesc *desc); + virtual bool init(); + virtual bool start_frame(synfig::ProgressCallback *cb); + virtual void end_frame(); + + virtual synfig::Color * start_scanline(int scanline); + virtual bool end_scanline(); +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_mng/unmod_mng.nsh b/synfig-core/src/modules/mod_mng/unmod_mng.nsh new file mode 100644 index 0000000..0b1c4c9 --- /dev/null +++ b/synfig-core/src/modules/mod_mng/unmod_mng.nsh @@ -0,0 +1,5 @@ +Section "un.mod_mng" + Delete "$INSTDIR\lib\synfig\modules\mod_mng.dll" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/modules/mod_noise/Makefile.am b/synfig-core/src/modules/mod_noise/Makefile.am new file mode 100644 index 0000000..a6830a4 --- /dev/null +++ b/synfig-core/src/modules/mod_noise/Makefile.am @@ -0,0 +1,38 @@ +# $Id$ + +MAINTAINERCLEANFILES = Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +moduledir = @MODULE_DIR@ + +module_LTLIBRARIES = libmod_noise.la + +libmod_noise_la_SOURCES = \ + random_noise.cpp \ + random_noise.h \ + distort.cpp \ + distort.h \ + noise.cpp \ + noise.h \ + valuenode_random.cpp \ + valuenode_random.h \ + main.cpp + +libmod_noise_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ + +libmod_noise_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @SYNFIG_LIBS@ + +libmod_noise_la_LDFLAGS = \ + -module \ + -no-undefined \ + -avoid-version + + +EXTRA_DIST= mod_noise.nsh unmod_noise.nsh diff --git a/synfig-core/src/modules/mod_noise/distort.cpp b/synfig-core/src/modules/mod_noise/distort.cpp new file mode 100644 index 0000000..1660c7d --- /dev/null +++ b/synfig-core/src/modules/mod_noise/distort.cpp @@ -0,0 +1,301 @@ +/* === S Y N F I G ========================================================= */ +/*! \file distort.cpp +** \brief Implementation of the "Noise Distort" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "distort.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(NoiseDistort); +SYNFIG_LAYER_SET_NAME(NoiseDistort,"noise_distort"); +SYNFIG_LAYER_SET_LOCAL_NAME(NoiseDistort,N_("Noise Distort")); +SYNFIG_LAYER_SET_CATEGORY(NoiseDistort,N_("Distortions")); +SYNFIG_LAYER_SET_VERSION(NoiseDistort,"0.0"); +SYNFIG_LAYER_SET_CVS_ID(NoiseDistort,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +NoiseDistort::NoiseDistort(): + size(1,1) +{ + set_blend_method(Color::BLEND_STRAIGHT); + smooth=RandomNoise::SMOOTH_COSINE; + detail=4; + speed=0; + random.set_seed(time(NULL)); + turbulent=false; + displacement=Vector(0.25,0.25); +} + +inline Color +NoiseDistort::color_func(const Point &point, float /*supersample*/,Context context)const +{ + Color ret(0,0,0,0); + + float x(point[0]/size[0]*(1<1)vect[0]=1; + if(vect[1]<-1)vect[1]=-1;if(vect[1]>1)vect[1]=1; + + if(turbulent) + { + vect[0]=abs(vect[0]); + vect[1]=abs(vect[1]); + } + + x/=2.0f; + y/=2.0f; + } + + if(!turbulent) + { + vect[0]=vect[0]/2.0f+0.5f; + vect[1]=vect[1]/2.0f+0.5f; + } + vect[0]=(vect[0]-0.5f)*displacement[0]; + vect[1]=(vect[1]-0.5f)*displacement[1]; + + ret=context.get_color(point+vect); + } + return ret; +} + +inline float +NoiseDistort::calc_supersample(const synfig::Point &/*x*/, float /*pw*/,float /*ph*/)const +{ + return 0.0f; +} + +void +NoiseDistort::set_time(synfig::Context context, synfig::Time t)const +{ + curr_time=t; + context.set_time(t); +} + +void +NoiseDistort::set_time(synfig::Context context, synfig::Time t, const synfig::Point &point)const +{ + curr_time=t; + context.set_time(t,point); +} + +synfig::Layer::Handle +NoiseDistort::hit_check(synfig::Context context, const synfig::Point &point)const +{ + if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5) + return const_cast(this); + if(get_amount()==0.0) + return context.hit_check(point); + if(color_func(point,0,context).get_a()>0.5) + return const_cast(this); + return false; +} + +bool +NoiseDistort::set_param(const String & param, const ValueBase &value) +{ + if(param=="seed" && value.same_type_as(int())) + { + random.set_seed(value.get(int())); + return true; + } + IMPORT(size); + IMPORT(speed); + IMPORT(smooth); + IMPORT(detail); + IMPORT(turbulent); + IMPORT(displacement); + return Layer_Composite::set_param(param,value); +} + +ValueBase +NoiseDistort::get_param(const String & param)const +{ + if(param=="seed") + return random.get_seed(); + EXPORT(size); + EXPORT(speed); + EXPORT(smooth); + EXPORT(detail); + EXPORT(displacement); + EXPORT(turbulent); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +NoiseDistort::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("displacement") + .set_local_name(_("Displacement")) + ); + + ret.push_back(ParamDesc("size") + .set_local_name(_("Size")) + ); + ret.push_back(ParamDesc("seed") + .set_local_name(_("RandomNoise Seed")) + ); + ret.push_back(ParamDesc("smooth") + .set_local_name(_("Interpolation")) + .set_description(_("What type of interpolation to use")) + .set_hint("enum") + .add_enum_value(RandomNoise::SMOOTH_DEFAULT, "nearest", _("Nearest Neighbor")) + .add_enum_value(RandomNoise::SMOOTH_LINEAR, "linear", _("Linear")) + .add_enum_value(RandomNoise::SMOOTH_COSINE, "cosine", _("Cosine")) + .add_enum_value(RandomNoise::SMOOTH_SPLINE, "spline", _("Spline")) + .add_enum_value(RandomNoise::SMOOTH_CUBIC, "cubic", _("Cubic")) + ); + ret.push_back(ParamDesc("detail") + .set_local_name(_("Detail")) + ); + ret.push_back(ParamDesc("speed") + .set_local_name(_("Animation Speed")) + ); + ret.push_back(ParamDesc("turbulent") + .set_local_name(_("Turbulent")) + ); + + return ret; +} + +Color +NoiseDistort::get_color(Context context, const Point &point)const +{ + const Color color(color_func(point,0,context)); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + return color; + else + return Color::blend(color,context.get_color(point),get_amount(),get_blend_method()); +} + +Rect +NoiseDistort::get_bounding_rect(Context context)const +{ + if(is_disabled()) + return Rect::zero(); + + if(Color::is_onto(get_blend_method())) + return context.get_full_bounding_rect(); + + Rect bounds(context.get_full_bounding_rect().expand_x(displacement[0]).expand_y(displacement[1])); + + return bounds; +} + +/* +bool +NoiseDistort::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + SuperCallback supercb(cb,0,9500,10000); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + { + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + } + else + { + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + return false; + if(get_amount()==0) + return true; + } + + + int x,y; + + Surface::pen pen(surface->begin()); + const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); + Point pos; + Point tl(renddesc.get_tl()); + const int w(surface->get_w()); + const int h(surface->get_h()); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + { + for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) + return false; + + return true; +} +*/ diff --git a/synfig-core/src/modules/mod_noise/distort.h b/synfig-core/src/modules/mod_noise/distort.h new file mode 100644 index 0000000..cecb157 --- /dev/null +++ b/synfig-core/src/modules/mod_noise/distort.h @@ -0,0 +1,83 @@ +/* === S Y N F I G ========================================================= */ +/*! \file distort.h +** \brief Header file for implementation of the "Noise Distort" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_NOISE_DISTORT_H +#define __SYNFIG_NOISE_DISTORT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include "random_noise.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class NoiseDistort : public synfig::Layer_Composite +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + synfig::Vector size; + + RandomNoise random; + RandomNoise::SmoothType smooth; + int detail; + synfig::Real speed; + bool turbulent; + synfig::Vector displacement; + + //void sync(); + mutable synfig::Time curr_time; + + synfig::Color color_func(const synfig::Point &x, float supersample,synfig::Context context)const; + + float calc_supersample(const synfig::Point &x, float pw,float ph)const; + +public: + NoiseDistort(); + + virtual bool set_param(const synfig::String ¶m, const synfig::ValueBase &value); + virtual synfig::ValueBase get_param(const synfig::String ¶m)const; + virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; + //virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + virtual void set_time(synfig::Context context, synfig::Time time)const; + virtual void set_time(synfig::Context context, synfig::Time time, const synfig::Point &point)const; + virtual synfig::Rect get_bounding_rect(synfig::Context context)const; + virtual Vocab get_param_vocab()const; + virtual bool reads_context()const { return true; } +}; // EOF of class NoiseDistort + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_noise/main.cpp b/synfig-core/src/modules/mod_noise/main.cpp new file mode 100644 index 0000000..1a31739 --- /dev/null +++ b/synfig-core/src/modules/mod_noise/main.cpp @@ -0,0 +1,68 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_noise/main.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include + +#include "noise.h" +#include "distort.h" +#include "random_noise.h" +#include "valuenode_random.h" + +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(libmod_noise) + MODULE_NAME("Noise") + MODULE_DESCRIPTION("writeme") + MODULE_AUTHOR("Robert B. Quattlebaum") + MODULE_VERSION("1.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(libmod_noise) + BEGIN_LAYERS + LAYER(Noise) + LAYER(NoiseDistort) + END_LAYERS + + BEGIN_VALUENODES + VALUENODE(synfig::ValueNode_Random, "random", _("Random"), synfig::RELEASE_VERSION_0_61_08) // SVN r907 + END_VALUENODES +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mod_noise/mod_noise.nsh b/synfig-core/src/modules/mod_noise/mod_noise.nsh new file mode 100644 index 0000000..3521694 --- /dev/null +++ b/synfig-core/src/modules/mod_noise/mod_noise.nsh @@ -0,0 +1,21 @@ +; The stuff to install +Section "mod_noise" Sec_mod_noise + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=mod_noise.dll "src\modules\mod_noise\.libs\libmod_noise.dll" + + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "mod_noise" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd + diff --git a/synfig-core/src/modules/mod_noise/noise.cpp b/synfig-core/src/modules/mod_noise/noise.cpp new file mode 100644 index 0000000..4257a6c --- /dev/null +++ b/synfig-core/src/modules/mod_noise/noise.cpp @@ -0,0 +1,346 @@ +/* === S Y N F I G ========================================================= */ +/*! \file noise.cpp +** \brief Implementation of the "Noise Gradient" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "noise.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Noise); +SYNFIG_LAYER_SET_NAME(Noise,"noise"); +SYNFIG_LAYER_SET_LOCAL_NAME(Noise,N_("Noise Gradient")); +SYNFIG_LAYER_SET_CATEGORY(Noise,N_("Gradients")); +SYNFIG_LAYER_SET_VERSION(Noise,"0.0"); +SYNFIG_LAYER_SET_CVS_ID(Noise,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +Noise::Noise(): + size(1,1), + gradient(Color::black(), Color::white()) +{ + smooth=RandomNoise::SMOOTH_COSINE; + detail=4; + speed=0; + do_alpha=false; + random.set_seed(time(NULL)); + turbulent=false; + displacement=Vector(1,1); + do_displacement=false; + super_sample=false; +} + + + +inline Color +Noise::color_func(const Point &point, float pixel_size,Context /*context*/)const +{ + Color ret(0,0,0,0); + + float x(point[0]/size[0]*(1<1)amount=1; + + if(super_sample&&pixel_size) + { + amount2=random(smooth,0+(detail-i)*5,x2,y,ftime)+amount2*0.5; + if(amount2<-1)amount2=-1;if(amount2>1)amount2=1; + + amount3=random(smooth,0+(detail-i)*5,x,y2,ftime)+amount3*0.5; + if(amount3<-1)amount3=-1;if(amount3>1)amount3=1; + + if(turbulent) + { + amount2=abs(amount2); + amount3=abs(amount3); + } + + x2*=0.5f; + y2*=0.5f; + } + + if(do_alpha) + { + alpha=random(smooth,3+(detail-i)*5,x,y,ftime)+alpha*0.5; + if(alpha<-1)alpha=-1;if(alpha>1)alpha=1; + } + + if(turbulent) + { + amount=abs(amount); + alpha=abs(alpha); + } + + x*=0.5f; + y*=0.5f; + //ftime*=0.5f; + } + + if(!turbulent) + { + amount=amount/2.0f+0.5f; + alpha=alpha/2.0f+0.5f; + + if(super_sample&&pixel_size) + { + amount2=amount2/2.0f+0.5f; + amount3=amount3/2.0f+0.5f; + } + } + + if(super_sample && pixel_size) + ret=gradient(amount,max(amount3,max(amount,amount2))-min(amount3,min(amount,amount2))); + else + ret=gradient(amount); + + if(do_alpha) + ret.set_a(ret.get_a()*(alpha)); + } + return ret; +} + +inline float +Noise::calc_supersample(const synfig::Point &/*x*/, float /*pw*/,float /*ph*/)const +{ + return 0.0f; +} + +void +Noise::set_time(synfig::Context context, synfig::Time t)const +{ + curr_time=t; + context.set_time(t); +} + +void +Noise::set_time(synfig::Context context, synfig::Time t, const synfig::Point &point)const +{ + curr_time=t; + context.set_time(t,point); +} + +synfig::Layer::Handle +Noise::hit_check(synfig::Context context, const synfig::Point &point)const +{ + if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5) + return const_cast(this); + if(get_amount()==0.0) + return context.hit_check(point); + if(color_func(point,0,context).get_a()>0.5) + return const_cast(this); + return false; +} + +bool +Noise::set_param(const String & param, const ValueBase &value) +{ + if(param=="seed" && value.same_type_as(int())) + { + random.set_seed(value.get(int())); + return true; + } + IMPORT(size); + IMPORT(speed); + IMPORT(smooth); + IMPORT(detail); + IMPORT(do_alpha); + IMPORT(gradient); + IMPORT(turbulent); + IMPORT(super_sample); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +Noise::get_param(const String & param)const +{ + if(param=="seed") + return random.get_seed(); + EXPORT(size); + EXPORT(speed); + EXPORT(smooth); + EXPORT(detail); + EXPORT(do_alpha); + EXPORT(gradient); + EXPORT(turbulent) + EXPORT(super_sample); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +Noise::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("gradient") + .set_local_name(_("Gradient")) + ); + ret.push_back(ParamDesc("seed") + .set_local_name(_("RandomNoise Seed")) + ); + ret.push_back(ParamDesc("size") + .set_local_name(_("Size")) + ); + ret.push_back(ParamDesc("smooth") + .set_local_name(_("Interpolation")) + .set_description(_("What type of interpolation to use")) + .set_hint("enum") + .add_enum_value(RandomNoise::SMOOTH_DEFAULT, "nearest", _("Nearest Neighbor")) + .add_enum_value(RandomNoise::SMOOTH_LINEAR, "linear", _("Linear")) + .add_enum_value(RandomNoise::SMOOTH_COSINE, "cosine", _("Cosine")) + .add_enum_value(RandomNoise::SMOOTH_SPLINE, "spline", _("Spline")) + .add_enum_value(RandomNoise::SMOOTH_CUBIC, "cubic", _("Cubic")) + ); + ret.push_back(ParamDesc("detail") + .set_local_name(_("Detail")) + ); + ret.push_back(ParamDesc("speed") + .set_local_name(_("Animation Speed")) + ); + ret.push_back(ParamDesc("turbulent") + .set_local_name(_("Turbulent")) + ); + ret.push_back(ParamDesc("do_alpha") + .set_local_name(_("Do Alpha")) + ); + ret.push_back(ParamDesc("super_sample") + .set_local_name(_("Super Sampling")) + ); + + return ret; +} + +Color +Noise::get_color(Context context, const Point &point)const +{ + const Color color(color_func(point,0,context)); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + return color; + else + return Color::blend(color,context.get_color(point),get_amount(),get_blend_method()); +} + +bool +Noise::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + SuperCallback supercb(cb,0,9500,10000); + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + { + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + } + else + { + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + return false; + if(get_amount()==0) + return true; + } + + + int x,y; + + Surface::pen pen(surface->begin()); + const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); + Point pos; + Point tl(renddesc.get_tl()); + const int w(surface->get_w()); + const int h(surface->get_h()); + float supersampleradius((abs(pw)+abs(ph))*0.5f); + if(quality>=8) + supersampleradius=0; + + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + { + for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) + return false; + + return true; +} diff --git a/synfig-core/src/modules/mod_noise/noise.h b/synfig-core/src/modules/mod_noise/noise.h new file mode 100644 index 0000000..1ea78d6 --- /dev/null +++ b/synfig-core/src/modules/mod_noise/noise.h @@ -0,0 +1,88 @@ +/* === S Y N F I G ========================================================= */ +/*! \file noise.h +** \brief Header file for implementation of the "Noise Gradient" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_NOISE_H +#define __SYNFIG_NOISE_H + +/* === H E A D E R S ======================================================= */ + +#include +#include + +#include +#include +#include +#include "random_noise.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class Noise : public synfig::Layer_Composite, public synfig::Layer_NoDeform +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + synfig::Vector size; + + RandomNoise random; + RandomNoise::SmoothType smooth; + int detail; + bool do_alpha; + synfig::Gradient gradient; + synfig::Real speed; + bool turbulent; + bool do_displacement; + synfig::Vector displacement; + + //void sync(); + mutable synfig::Time curr_time; + + bool super_sample; + + synfig::Color color_func(const synfig::Point &x, float supersample,synfig::Context context)const; + + float calc_supersample(const synfig::Point &x, float pw,float ph)const; + +public: + Noise(); + + virtual bool set_param(const synfig::String ¶m, const synfig::ValueBase &value); + virtual synfig::ValueBase get_param(const synfig::String ¶m)const; + virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; + virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; + synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + virtual void set_time(synfig::Context context, synfig::Time time)const; + virtual void set_time(synfig::Context context, synfig::Time time, const synfig::Point &point)const; + + virtual Vocab get_param_vocab()const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_noise/random_noise.cpp b/synfig-core/src/modules/mod_noise/random_noise.cpp new file mode 100644 index 0000000..344dff9 --- /dev/null +++ b/synfig-core/src/modules/mod_noise/random_noise.cpp @@ -0,0 +1,323 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_noise/random_noise.cpp +** \brief blehh +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "random_noise.h" +#include +#include +#include +#endif + +/* === M A C R O S ========================================================= */ + +#define PI (3.1415927) + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +void +RandomNoise::set_seed(int x) +{ + seed_=x; +} + +float +RandomNoise::operator()(const int salt,const int x,const int y,const int t)const +{ + static const unsigned int a(21870); + static const unsigned int b(11213); + static const unsigned int c(36979); + static const unsigned int d(31337); + + quick_rng rng( + ( static_cast(x+y) * a ) ^ + ( static_cast(y+t) * b ) ^ + ( static_cast(t+x) * c ) ^ + ( static_cast(seed_+salt) * d ) + ); + + return rng.f() * 2.0f - 1.0f; +} + +float +RandomNoise::operator()(SmoothType smooth,int subseed,float xf,float yf,float tf,int loop)const +{ + int x((int)floor(xf)); + int y((int)floor(yf)); + int t((int)floor(tf)); + int t_1, t0, t1, t2; + + if (loop) + { + t0 = t % loop; if (t0 < 0 ) t0 += loop; + t_1 = t0 - 1; if (t_1 < 0 ) t_1 += loop; + t1 = t0 + 1; if (t1 >= loop) t1 -= loop; + t2 = t1 + 1; if (t2 >= loop) t2 -= loop; + } + else + { + t0 = t; + t_1 = t - 1; + t1 = t + 1; + t2 = t + 2; + } + + // synfig::info("%s:%d tf %.2f loop %d fraction %.2f ( -1,0,1,2 : %2d %2d %2d %2d)", __FILE__, __LINE__, tf, loop, tf-t, t_1, t0, t1, t2); + + switch(smooth) + { + case SMOOTH_CUBIC: // cubic + { + #define f(j,i,k) ((*this)(subseed,i,j,k)) + //Using catmull rom interpolation because it doesn't blur at all + // ( http://www.gamedev.net/reference/articles/article1497.asp ) + //bezier curve with intermediate ctrl pts: 0.5/3(p(i+1) - p(i-1)) and similar + float xfa [4], tfa[4]; + + //precalculate indices (all clamped) and offset + const int xa[] = {x-1,x,x+1,x+2}; + const int ya[] = {y-1,y,y+1,y+2}; + const int ta[] = {t_1,t0,t1,t2}; + + const float dx(xf-x); + const float dy(yf-y); + const float dt(tf-t); + + //figure polynomials for each point + const float txf[] = + { + 0.5*dx*(dx*(dx*(-1) + 2) - 1), //-t + 2t^2 -t^3 + 0.5*(dx*(dx*(3*dx - 5)) + 2), //2 - 5t^2 + 3t^3 + 0.5*dx*(dx*(-3*dx + 4) + 1), //t + 4t^2 - 3t^3 + 0.5*dx*dx*(dx-1) //-t^2 + t^3 + }; + + const float tyf[] = + { + 0.5*dy*(dy*(dy*(-1) + 2) - 1), //-t + 2t^2 -t^3 + 0.5*(dy*(dy*(3*dy - 5)) + 2), //2 - 5t^2 + 3t^3 + 0.5*dy*(dy*(-3*dy + 4) + 1), //t + 4t^2 - 3t^3 + 0.5*dy*dy*(dy-1) //-t^2 + t^3 + }; + + const float ttf[] = + { + 0.5*dt*(dt*(dt*(-1) + 2) - 1), //-t + 2t^2 -t^3 + 0.5*(dt*(dt*(3*dt - 5)) + 2), //2 - 5t^2 + 3t^3 + 0.5*dt*(dt*(-3*dt + 4) + 1), //t + 4t^2 - 3t^3 + 0.5*dt*dt*(dt-1) //-t^2 + t^3 + }; + + //evaluate polynomial for each row + for(int i = 0; i < 4; ++i) + { + for(int j = 0; j < 4; ++j) + { + tfa[j] = f(ya[i],xa[j],ta[0])*ttf[0] + f(ya[i],xa[j],ta[1])*ttf[1] + f(ya[i],xa[j],ta[2])*ttf[2] + f(ya[i],xa[j],ta[3])*ttf[3]; + } + xfa[i] = tfa[0]*txf[0] + tfa[1]*txf[1] + tfa[2]*txf[2] + tfa[3]*txf[3]; + } + + //return the cumulative column evaluation + return xfa[0]*tyf[0] + xfa[1]*tyf[1] + xfa[2]*tyf[2] + xfa[3]*tyf[3]; +#undef f + } + break; + + + case SMOOTH_FAST_SPLINE: // Fast Spline (non-animated) + { +#define P(x) (((x)>0)?((x)*(x)*(x)):0.0f) +#define R(x) ( P(x+2) - 4.0f*P(x+1) + 6.0f*P(x) - 4.0f*P(x-1) )*(1.0f/6.0f) +#define F(i,j) ((*this)(subseed,i+x,j+y)*(R((i)-a)*R(b-(j)))) +#define FT(i,j,k,l) ((*this)(subseed,i+x,j+y,l)*(R((i)-a)*R(b-(j))*R((k)-c))) +#define Z(i,j) ret+=F(i,j) +#define ZT(i,j,k,l) ret+=FT(i,j,k,l) +#define X(i,j) // placeholder... To make box more symmetric +#define XT(i,j,k,l) // placeholder... To make box more symmetric + + float a(xf-x), b(yf-y); + + // Interpolate + float ret(F(0,0)); + Z(-1,-1); Z(-1, 0); Z(-1, 1); Z(-1, 2); + Z( 0,-1); X( 0, 0); Z( 0, 1); Z( 0, 2); + Z( 1,-1); Z( 1, 0); Z( 1, 1); Z( 1, 2); + Z( 2,-1); Z( 2, 0); Z( 2, 1); Z( 2, 2); + + return ret; + } + + case SMOOTH_SPLINE: // Spline (animated) + { + float a(xf-x), b(yf-y), c(tf-t); + + // Interpolate + float ret(FT(0,0,0,t0)); + ZT(-1,-1,-1,t_1); ZT(-1, 0,-1,t_1); ZT(-1, 1,-1,t_1); ZT(-1, 2,-1,t_1); + ZT( 0,-1,-1,t_1); ZT( 0, 0,-1,t_1); ZT( 0, 1,-1,t_1); ZT( 0, 2,-1,t_1); + ZT( 1,-1,-1,t_1); ZT( 1, 0,-1,t_1); ZT( 1, 1,-1,t_1); ZT( 1, 2,-1,t_1); + ZT( 2,-1,-1,t_1); ZT( 2, 0,-1,t_1); ZT( 2, 1,-1,t_1); ZT( 2, 2,-1,t_1); + + ZT(-1,-1, 0,t0 ); ZT(-1, 0, 0,t0 ); ZT(-1, 1, 0,t0 ); ZT(-1, 2, 0,t0 ); + ZT( 0,-1, 0,t0 ); XT( 0, 0, 0,t0 ); ZT( 0, 1, 0,t0 ); ZT( 0, 2, 0,t0 ); + ZT( 1,-1, 0,t0 ); ZT( 1, 0, 0,t0 ); ZT( 1, 1, 0,t0 ); ZT( 1, 2, 0,t0 ); + ZT( 2,-1, 0,t0 ); ZT( 2, 0, 0,t0 ); ZT( 2, 1, 0,t0 ); ZT( 2, 2, 0,t0 ); + + ZT(-1,-1, 1,t1 ); ZT(-1, 0, 1,t1 ); ZT(-1, 1, 1,t1 ); ZT(-1, 2, 1,t1 ); + ZT( 0,-1, 1,t1 ); ZT( 0, 0, 1,t1 ); ZT( 0, 1, 1,t1 ); ZT( 0, 2, 1,t1 ); + ZT( 1,-1, 1,t1 ); ZT( 1, 0, 1,t1 ); ZT( 1, 1, 1,t1 ); ZT( 1, 2, 1,t1 ); + ZT( 2,-1, 1,t1 ); ZT( 2, 0, 1,t1 ); ZT( 2, 1, 1,t1 ); ZT( 2, 2, 1,t1 ); + + ZT(-1,-1, 2,t2 ); ZT(-1, 0, 2,t2 ); ZT(-1, 1, 2,t2 ); ZT(-1, 2, 2,t2 ); + ZT( 0,-1, 2,t2 ); ZT( 0, 0, 2,t2 ); ZT( 0, 1, 2,t2 ); ZT( 0, 2, 2,t2 ); + ZT( 1,-1, 2,t2 ); ZT( 1, 0, 2,t2 ); ZT( 1, 1, 2,t2 ); ZT( 1, 2, 2,t2 ); + ZT( 2,-1, 2,t2 ); ZT( 2, 0, 2,t2 ); ZT( 2, 1, 2,t2 ); ZT( 2, 2, 2,t2 ); + + return ret; + +/* + + float dx=xf-x; + float dy=yf-y; + float dt=tf-t; + + float ret=0; + int i,j,h; + for(h=-1;h<=2;h++) + for(i=-1;i<=2;i++) + for(j=-1;j<=2;j++) + ret+=(*this)(subseed,i+x,j+y,h+t)*(R(i-dx)*R(j-dy)*R(h-dt)); + return ret; +*/ + } + break; +#undef X +#undef Z +#undef F +#undef P +#undef R + + case SMOOTH_COSINE: + if((float)t==tf) + { + int x((int)floor(xf)); + int y((int)floor(yf)); + float a=xf-x; + float b=yf-y; + a=(1.0f-cos(a*PI))*0.5f; + b=(1.0f-cos(b*PI))*0.5f; + float c=1.0-a; + float d=1.0-b; + int x2=x+1,y2=y+1; + return + (*this)(subseed,x,y,t0)*(c*d)+ + (*this)(subseed,x2,y,t0)*(a*d)+ + (*this)(subseed,x,y2,t0)*(c*b)+ + (*this)(subseed,x2,y2,t0)*(a*b); + } + else + { + float a=xf-x; + float b=yf-y; + float c=tf-t; + + a=(1.0f-cos(a*PI))*0.5f; + b=(1.0f-cos(b*PI))*0.5f; + + // We don't perform this on the time axis, otherwise we won't + // get smooth motion + //c=(1.0f-cos(c*PI))*0.5f; + + float d=1.0-a; + float e=1.0-b; + float f=1.0-c; + + int x2=x+1,y2=y+1; + + return + (*this)(subseed,x,y,t0)*(d*e*f)+ + (*this)(subseed,x2,y,t0)*(a*e*f)+ + (*this)(subseed,x,y2,t0)*(d*b*f)+ + (*this)(subseed,x2,y2,t0)*(a*b*f)+ + (*this)(subseed,x,y,t1)*(d*e*c)+ + (*this)(subseed,x2,y,t1)*(a*e*c)+ + (*this)(subseed,x,y2,t1)*(d*b*c)+ + (*this)(subseed,x2,y2,t1)*(a*b*c); + } + case SMOOTH_LINEAR: + if((float)t==tf) + { + int x((int)floor(xf)); + int y((int)floor(yf)); + float a=xf-x; + float b=yf-y; + float c=1.0-a; + float d=1.0-b; + int x2=x+1,y2=y+1; + return + (*this)(subseed,x,y,t0)*(c*d)+ + (*this)(subseed,x2,y,t0)*(a*d)+ + (*this)(subseed,x,y2,t0)*(c*b)+ + (*this)(subseed,x2,y2,t0)*(a*b); + } + else + { + + float a=xf-x; + float b=yf-y; + float c=tf-t; + + float d=1.0-a; + float e=1.0-b; + float f=1.0-c; + + int x2=x+1,y2=y+1; + + return + (*this)(subseed,x,y,t0)*(d*e*f)+ + (*this)(subseed,x2,y,t0)*(a*e*f)+ + (*this)(subseed,x,y2,t0)*(d*b*f)+ + (*this)(subseed,x2,y2,t0)*(a*b*f)+ + (*this)(subseed,x,y,t1)*(d*e*c)+ + (*this)(subseed,x2,y,t1)*(a*e*c)+ + (*this)(subseed,x,y2,t1)*(d*b*c)+ + (*this)(subseed,x2,y2,t1)*(a*b*c); + } + default: + case SMOOTH_DEFAULT: + return (*this)(subseed,x,y,t0); + } +} diff --git a/synfig-core/src/modules/mod_noise/random_noise.h b/synfig-core/src/modules/mod_noise/random_noise.h new file mode 100644 index 0000000..9a06e94 --- /dev/null +++ b/synfig-core/src/modules/mod_noise/random_noise.h @@ -0,0 +1,63 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_noise/random_noise.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_RANDOM_H +#define __SYNFIG_RANDOM_H + +/* === H E A D E R S ======================================================= */ + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + + +#define POOL_SIZE (256) +class RandomNoise +{ + int seed_; +public: + + void set_seed(int x); + int get_seed()const { return seed_; } + + enum SmoothType + { + SMOOTH_DEFAULT = 0, + SMOOTH_LINEAR = 1, + SMOOTH_COSINE = 2, + SMOOTH_SPLINE = 3, + SMOOTH_CUBIC = 4, + SMOOTH_FAST_SPLINE = 5, + }; + + float operator()(int subseed,int x,int y=0, int t=0)const; + float operator()(SmoothType smooth,int subseed,float x,float y=0,float t=0,int loop=0)const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_noise/unmod_noise.nsh b/synfig-core/src/modules/mod_noise/unmod_noise.nsh new file mode 100644 index 0000000..fe04e1f --- /dev/null +++ b/synfig-core/src/modules/mod_noise/unmod_noise.nsh @@ -0,0 +1,8 @@ +Section "un.mod_noise" + Delete "$INSTDIR\lib\synfig\modules\mod_noise.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/modules/mod_noise/valuenode_random.cpp b/synfig-core/src/modules/mod_noise/valuenode_random.cpp new file mode 100644 index 0000000..1ae09a4 --- /dev/null +++ b/synfig-core/src/modules/mod_noise/valuenode_random.cpp @@ -0,0 +1,304 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_random.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_random.h" +#include "synfig/valuenode_const.h" +#include "synfig/general.h" +#include "synfig/color.h" +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Random::ValueNode_Random(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + random.set_seed(time(NULL)); + + set_link("radius",ValueNode_Const::create(Real(1))); + set_link("seed",ValueNode_Const::create(random.get_seed())); + set_link("speed",ValueNode_Const::create(Real(1))); + set_link("smooth",ValueNode_Const::create(int(RandomNoise::SMOOTH_CUBIC))); + set_link("loop",ValueNode_Const::create(Real(0))); + + switch(get_type()) + { + case ValueBase::TYPE_ANGLE: + set_link("link",ValueNode_Const::create(value.get(Angle()))); + break; + case ValueBase::TYPE_BOOL: + set_link("link",ValueNode_Const::create(value.get(bool()))); + break; + case ValueBase::TYPE_COLOR: + set_link("link",ValueNode_Const::create(value.get(Color()))); + break; + case ValueBase::TYPE_INTEGER: + set_link("link",ValueNode_Const::create(value.get(int()))); + break; + case ValueBase::TYPE_REAL: + set_link("link",ValueNode_Const::create(value.get(Real()))); + break; + case ValueBase::TYPE_TIME: + set_link("link",ValueNode_Const::create(value.get(Time()))); + break; + case ValueBase::TYPE_VECTOR: + set_link("link",ValueNode_Const::create(value.get(Vector()))); + break; + default: + throw Exception::BadType(ValueBase::type_local_name(get_type())); + } + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_Random::create_new()const +{ + return new ValueNode_Random(get_type()); +} + +ValueNode_Random* +ValueNode_Random::create(const ValueBase &x) +{ + return new ValueNode_Random(x); +} + +ValueNode_Random::~ValueNode_Random() +{ + unlink_all(); +} + +ValueBase +ValueNode_Random::operator()(Time t)const +{ + typedef const RandomNoise::SmoothType Smooth; + + Real radius = (*radius_)(t).get(Real()); + int seed = (*seed_)(t).get(int()); + int smooth = (*smooth_)(t).get(int()); + float speed = (*speed_ )(t).get(Real()); + int loop = int((((*loop_ )(t).get(Real())) * speed) + 0.5); + speed *= t; + + random.set_seed(seed); + + switch(get_type()) + { + case ValueBase::TYPE_ANGLE: + return ((*link_)(t).get( Angle()) + + Angle::deg(random(Smooth(smooth), 0, 0, 0, speed, loop) * radius)); + + case ValueBase::TYPE_BOOL: + return round_to_int((*link_)(t).get( bool()) + + random(Smooth(smooth), 0, 0, 0, speed, loop) * radius) > 0; + + case ValueBase::TYPE_COLOR: + return (((*link_)(t).get( Color()) + + Color(random(Smooth(smooth), 0, 0, 0, speed, loop), + random(Smooth(smooth), 1, 0, 0, speed, loop), + random(Smooth(smooth), 2, 0, 0, speed, loop), 0) * radius).clamped()); + + case ValueBase::TYPE_INTEGER: + return round_to_int((*link_)(t).get( int()) + + random(Smooth(smooth), 0, 0, 0, speed, loop) * radius); + + case ValueBase::TYPE_REAL: + return ((*link_)(t).get( Real()) + + random(Smooth(smooth), 0, 0, 0, speed, loop) * radius); + + case ValueBase::TYPE_TIME: + return ((*link_)(t).get( Time()) + + random(Smooth(smooth), 0, 0, 0, speed, loop) * radius); + + case ValueBase::TYPE_VECTOR: + { + float length(random(Smooth(smooth), 0, 0, 0, speed, loop) * radius); + Angle::rad angle(random(Smooth(smooth), 1, 0, 0, speed, loop) * PI); + + return ((*link_)(t).get(Vector()) + + Vector(Angle::cos(angle).get(), Angle::sin(angle).get()) * length); + } + + default: + assert(0); + break; + } + + return ValueBase(); +} + + +String +ValueNode_Random::get_name()const +{ + return "random"; +} + +String +ValueNode_Random::get_local_name()const +{ + return _("Random"); +} + +bool +ValueNode_Random::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && irandomize_seed(); + return ret; +} + +void +ValueNode_Random::randomize_seed() +{ + int i = get_link_index_from_name("seed"); + ValueNode::Handle link = get_link_vfunc(i); + if(!link->is_exported() && link->get_name() == "constant") + { + int seed = time(NULL) + rand(); + if (seed < 0) seed = -seed; + random.set_seed(seed); + set_link(i, ValueNode_Const::create(seed)); + } +} diff --git a/synfig-core/src/modules/mod_noise/valuenode_random.h b/synfig-core/src/modules/mod_noise/valuenode_random.h new file mode 100644 index 0000000..beafcf2 --- /dev/null +++ b/synfig-core/src/modules/mod_noise/valuenode_random.h @@ -0,0 +1,91 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_random.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_VALUENODE_INTERPOLATION_RANDOM_H +#define __SYNFIG_VALUENODE_INTERPOLATION_RANDOM_H + +/* === H E A D E R S ======================================================= */ + +#include "synfig/valuenode.h" +#include "random_noise.h" + +/* === M A C R O S ========================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class ValueNode_Random : public LinkableValueNode +{ + ValueNode::RHandle link_; + ValueNode::RHandle radius_; + ValueNode::RHandle seed_; + ValueNode::RHandle speed_; + ValueNode::RHandle smooth_; + ValueNode::RHandle loop_; + + mutable RandomNoise random; + RandomNoise::SmoothType smooth; + ValueNode_Random(const ValueBase &value); + +public: + + typedef etl::handle Handle; + typedef etl::handle ConstHandle; + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_Random(); + + virtual String get_name()const; + virtual String get_local_name()const; + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + + virtual ValueNode* clone(const GUID& deriv_guid=GUID())const; + + void randomize_seed(); + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Random* create(const ValueBase &x); +}; // END of class ValueNode_Random + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_openexr/Makefile.am b/synfig-core/src/modules/mod_openexr/Makefile.am new file mode 100644 index 0000000..d719c0f --- /dev/null +++ b/synfig-core/src/modules/mod_openexr/Makefile.am @@ -0,0 +1,42 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +moduledir = @MODULE_DIR@ + +if WITH_OPENEXR + +module_LTLIBRARIES = libmod_openexr.la + +libmod_openexr_la_SOURCES = \ + main.cpp \ + mptr_openexr.cpp \ + mptr_openexr.h \ + trgt_openexr.cpp \ + trgt_openexr.h + +libmod_openexr_la_LDFLAGS = \ + -module \ + @PNG_LIBS@ \ + -no-undefined \ + -avoid-version + +libmod_openexr_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @SYNFIG_LIBS@ @OPENEXR_LIBS@ + +libmod_openexr_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ @OPENEXR_CFLAGS@ + +endif + + +EXTRA_DIST = \ + mod_openexr.nsh \ + unmod_openexr.nsh diff --git a/synfig-core/src/modules/mod_openexr/main.cpp b/synfig-core/src/modules/mod_openexr/main.cpp new file mode 100644 index 0000000..41aadf7 --- /dev/null +++ b/synfig-core/src/modules/mod_openexr/main.cpp @@ -0,0 +1,60 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_openexr/main.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#else +#warning HAVE_CONFIG_H not defined! +#endif + +#include +#include "trgt_openexr.h" +#include "mptr_openexr.h" +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(mod_openexr) + MODULE_NAME("OpenEXR Module") + MODULE_DESCRIPTION("Provides support for the EXR image format.") + MODULE_AUTHOR("Industrial Light & Magic") + MODULE_VERSION("1.0.4") + MODULE_COPYRIGHT("OpenEXR Library is Copyright (c) 2003 Lucas Digital Ltd. LLC.") +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(mod_openexr) + BEGIN_TARGETS + TARGET(exr_trgt) + END_TARGETS + BEGIN_IMPORTERS + IMPORTER(exr_mptr) + END_IMPORTERS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mod_openexr/mod_openexr.nsh b/synfig-core/src/modules/mod_openexr/mod_openexr.nsh new file mode 100644 index 0000000..512f643 --- /dev/null +++ b/synfig-core/src/modules/mod_openexr/mod_openexr.nsh @@ -0,0 +1,26 @@ +; The stuff to install +Section "mod_openexr" Sec_mod_openexr + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=mod_openexr.dll "src\modules\mod_openexr\.libs\libmod_openexr.dll" + + SetOutPath "$INSTDIR\bin" + File "src\modules\mod_openexr\.libs\libHalf*.dll" + File "src\modules\mod_openexr\.libs\libIlmImf*.dll" + File "src\modules\mod_openexr\.libs\libIlmThread*.dll" + File "src\modules\mod_openexr\.libs\libIex*.dll" + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "mod_openexr" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd + diff --git a/synfig-core/src/modules/mod_openexr/mptr_openexr.cpp b/synfig-core/src/modules/mod_openexr/mptr_openexr.cpp new file mode 100644 index 0000000..d29719e --- /dev/null +++ b/synfig-core/src/modules/mod_openexr/mptr_openexr.cpp @@ -0,0 +1,123 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mptr_openexr.cpp +** \brief ppm Target Module +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "mptr_openexr.h" +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_IMPORTER_INIT(exr_mptr); +SYNFIG_IMPORTER_SET_NAME(exr_mptr,"openexr"); +SYNFIG_IMPORTER_SET_EXT(exr_mptr,"exr"); +SYNFIG_IMPORTER_SET_VERSION(exr_mptr,"0.1"); +SYNFIG_IMPORTER_SET_CVS_ID(exr_mptr,"$Id$"); + +/* === M E T H O D S ======================================================= */ + +exr_mptr::exr_mptr(const char *file) +{ + filename=file; +} + +exr_mptr::~exr_mptr() +{ +} + +bool +exr_mptr::get_frame(synfig::Surface &out_surface,Time, synfig::ProgressCallback *cb) +{ + try + { + + Imf::RgbaInputFile in(filename.c_str()); + + int w = in.dataWindow().max.x - in.dataWindow().min.x + 1; + int h = in.dataWindow().max.y - in.dataWindow().min.y + 1; + //int dx = in.dataWindow().min.x; + //int dy = in.dataWindow().min.y; + +#ifdef USE_HALF_TYPE + out_surface.set_wh(w,h); + in.setFrameBuffer (reinterpret_cast(out_surface[0]), 1, w); + + in.readPixels (in.dataWindow().min.y, in.dataWindow().max.y); + +#else + etl::surface in_surface; + in_surface.set_wh(w,h); + in.setFrameBuffer (reinterpret_cast(in_surface[0]), 1, w); + + in.readPixels (in.dataWindow().min.y, in.dataWindow().max.y); + + int x; + int y; + out_surface.set_wh(w,h); + for(y=0;yerror(e.what()); + else synfig::error(e.what()); + return false; + } + + return true; +} diff --git a/synfig-core/src/modules/mod_openexr/mptr_openexr.h b/synfig-core/src/modules/mod_openexr/mptr_openexr.h new file mode 100644 index 0000000..2ab295f --- /dev/null +++ b/synfig-core/src/modules/mod_openexr/mptr_openexr.h @@ -0,0 +1,60 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mptr_openexr.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_MPTR_OPENEXR_H +#define __SYNFIG_MPTR_OPENEXR_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class exr_mptr : public synfig::Importer +{ + SYNFIG_IMPORTER_MODULE_EXT + +private: + synfig::String filename; +public: + exr_mptr(const char *filename); + ~exr_mptr(); + + + + virtual bool get_frame(synfig::Surface &surface,synfig::Time time, synfig::ProgressCallback *callback); + +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_openexr/trgt_openexr.cpp b/synfig-core/src/modules/mod_openexr/trgt_openexr.cpp new file mode 100644 index 0000000..ccfa576 --- /dev/null +++ b/synfig-core/src/modules/mod_openexr/trgt_openexr.cpp @@ -0,0 +1,190 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_openexr.cpp +** \brief exr_trgt Target Module +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_TARGET + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "trgt_openexr.h" +#include +#include +#include +#include +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_TARGET_INIT(exr_trgt); +SYNFIG_TARGET_SET_NAME(exr_trgt,"openexr"); +SYNFIG_TARGET_SET_EXT(exr_trgt,"exr"); +SYNFIG_TARGET_SET_VERSION(exr_trgt,"1.0.4"); +SYNFIG_TARGET_SET_CVS_ID(exr_trgt,"$Id$"); + +/* === M E T H O D S ======================================================= */ + +bool +exr_trgt::ready() +{ + return (bool)exr_file; +} + +exr_trgt::exr_trgt(const char *Filename): + multi_image(false), + imagecount(0), + filename(Filename), + exr_file(0) +{ + buffer=0; +#ifndef USE_HALF_TYPE + buffer_color=0; +#endif + + // OpenEXR uses linear gamma + gamma().set_gamma(1.0); +} + +exr_trgt::~exr_trgt() +{ + if(exr_file) + delete exr_file; + + if(buffer) delete [] buffer; +#ifndef USE_HALF_TYPE + if(buffer_color) delete [] buffer_color; +#endif +} + +bool +exr_trgt::set_rend_desc(RendDesc *given_desc) +{ + //given_desc->set_pixel_format(PixelFormat((int)PF_RAW_COLOR)); + desc=*given_desc; + imagecount=desc.get_frame_start(); + if(desc.get_frame_end()-desc.get_frame_start()>0) + multi_image=true; + else + multi_image=false; + return true; +} + +bool +exr_trgt::start_frame(synfig::ProgressCallback *cb) +{ + int w=desc.get_w(),h=desc.get_h(); + + String frame_name; + + if(exr_file) + delete exr_file; + if(multi_image) + { + frame_name = (filename_sans_extension(filename) + + etl::strprintf(".%04d",imagecount) + + filename_extension(filename)); + if(cb)cb->task(frame_name); + } + else + { + frame_name=filename; + if(cb)cb->task(filename); + } + exr_file=new Imf::RgbaOutputFile(frame_name.c_str(),w,h,Imf::WRITE_RGBA,desc.get_pixel_aspect()); +#ifndef USE_HALF_TYPE + if(buffer_color) delete [] buffer_color; + buffer_color=new Color[w]; +#endif + //if(buffer) delete [] buffer; + //buffer=new Imf::Rgba[w]; + out_surface.set_wh(w,h); + + return true; +} + +void +exr_trgt::end_frame() +{ + if(exr_file) + { + exr_file->setFrameBuffer(out_surface[0],1,desc.get_w()); + exr_file->writePixels(desc.get_h()); + + delete exr_file; + } + + exr_file=0; + + imagecount++; +} + +Color * +exr_trgt::start_scanline(int i) +{ + scanline=i; +#ifndef USE_HALF_TYPE + return reinterpret_cast(buffer_color); +#else + return reinterpret_cast(out_surface[scanline]); +// return reinterpret_cast(buffer); +#endif +} + +bool +exr_trgt::end_scanline() +{ + if(!ready()) + return false; + +#ifndef USE_HALF_TYPE + int i; + for(i=0;isetFrameBuffer(buffer,1,desc.get_w()); + //exr_file->writePixels(1); + + return true; +} diff --git a/synfig-core/src/modules/mod_openexr/trgt_openexr.h b/synfig-core/src/modules/mod_openexr/trgt_openexr.h new file mode 100644 index 0000000..9a4e13f --- /dev/null +++ b/synfig-core/src/modules/mod_openexr/trgt_openexr.h @@ -0,0 +1,78 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_openexr.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TRGT_OPENEXR_H +#define __SYNFIG_TRGT_OPENEXR_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class exr_trgt : public synfig::Target_Scanline +{ +public: +private: + bool multi_image; + int imagecount,scanline; + synfig::String filename; + Imf::RgbaOutputFile *exr_file; + Imf::Rgba *buffer; + etl::surface out_surface; +#ifndef USE_HALF_TYPE + synfig::Color *buffer_color; +#endif + + bool ready(); +public: + exr_trgt(const char *filename); + virtual ~exr_trgt(); + + virtual bool set_rend_desc(synfig::RendDesc *desc); + virtual bool start_frame(synfig::ProgressCallback *cb); + virtual void end_frame(); + + virtual synfig::Color * start_scanline(int scanline); + virtual bool end_scanline(void); + + + SYNFIG_TARGET_MODULE_EXT +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_openexr/unmod_openexr.nsh b/synfig-core/src/modules/mod_openexr/unmod_openexr.nsh new file mode 100644 index 0000000..e4b15de --- /dev/null +++ b/synfig-core/src/modules/mod_openexr/unmod_openexr.nsh @@ -0,0 +1,13 @@ +Section "un.mod_openexr" + Delete "$INSTDIR\bin\libIex*.dll" + Delete "$INSTDIR\bin\libIlmImf*.dll" + Delete "$INSTDIR\bin\libIlmThread*.dll" + Delete "$INSTDIR\bin\libHalf*.dll" + Delete "$INSTDIR\lib\synfig\modules\mod_openexr.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR\bin" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/modules/mod_particle/Makefile.am b/synfig-core/src/modules/mod_particle/Makefile.am new file mode 100644 index 0000000..ffe2a89 --- /dev/null +++ b/synfig-core/src/modules/mod_particle/Makefile.am @@ -0,0 +1,37 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +moduledir = @MODULE_DIR@ + +module_LTLIBRARIES = libmod_particle.la + +libmod_particle_la_SOURCES = \ + random.cpp \ + random.h \ + plant.cpp \ + plant.h \ + main.cpp + +libmod_particle_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ + +libmod_particle_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @SYNFIG_LIBS@ + +libmod_particle_la_LDFLAGS = \ + -module \ + -no-undefined \ + -avoid-version + + +EXTRA_DIST = \ + mod_particle.nsh \ + unmod_particle.nsh diff --git a/synfig-core/src/modules/mod_particle/main.cpp b/synfig-core/src/modules/mod_particle/main.cpp new file mode 100644 index 0000000..c55ad9f --- /dev/null +++ b/synfig-core/src/modules/mod_particle/main.cpp @@ -0,0 +1,58 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_particle/main.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#include "plant.h" + +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(libmod_particle) + MODULE_NAME("Particle Systems") + MODULE_DESCRIPTION("writeme") + MODULE_AUTHOR("Robert B. Quattlebaum") + MODULE_VERSION("1.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(libmod_particle) + BEGIN_LAYERS + LAYER(Plant) + END_LAYERS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mod_particle/mod_particle.nsh b/synfig-core/src/modules/mod_particle/mod_particle.nsh new file mode 100644 index 0000000..faff380 --- /dev/null +++ b/synfig-core/src/modules/mod_particle/mod_particle.nsh @@ -0,0 +1,21 @@ +; The stuff to install +Section "mod_particle" Sec_mod_particle + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=mod_particle.dll "src\modules\mod_particle\.libs\libmod_particle.dll" + + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "mod_particle" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd + diff --git a/synfig-core/src/modules/mod_particle/plant.cpp b/synfig-core/src/modules/mod_particle/plant.cpp new file mode 100644 index 0000000..47b13a3 --- /dev/null +++ b/synfig-core/src/modules/mod_particle/plant.cpp @@ -0,0 +1,742 @@ +/* === S Y N F I G ========================================================= */ +/*! \file plant.cpp +** \brief Implementation of the "Plant" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "plant.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#endif + +using namespace etl; + +/* === M A C R O S ========================================================= */ + +#define SAMPLES 300 +#define ROUND_END_FACTOR (4) +#define CUSP_THRESHOLD (0.15) +#define NO_LOOP_COOKIE synfig::Vector(84951305,7836658) +#define EPSILON (0.000000001) +#define CUSP_TANGENT_ADJUST (0.025) + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Plant); +SYNFIG_LAYER_SET_NAME(Plant,"plant"); +SYNFIG_LAYER_SET_LOCAL_NAME(Plant,N_("Plant")); +SYNFIG_LAYER_SET_CATEGORY(Plant,N_("Other")); +SYNFIG_LAYER_SET_VERSION(Plant,"0.2"); +SYNFIG_LAYER_SET_CVS_ID(Plant,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + + +Plant::Plant(): + origin(0,0), + split_angle(Angle::deg(10)), + gravity(0,-0.1), + velocity(0.3), + perp_velocity(0.0), + step(0.01), + sprouts(10), + version(version__), + use_width(true) +{ + bounding_rect=Rect::zero(); + random_factor=0.2; + random.set_seed(time(NULL)); + + bline.push_back(BLinePoint()); + bline.push_back(BLinePoint()); + bline.push_back(BLinePoint()); + bline[0].set_vertex(Point(0,1)); + bline[1].set_vertex(Point(0,-1)); + bline[2].set_vertex(Point(1,0)); + bline[0].set_tangent(bline[1].get_vertex()-bline[2].get_vertex()*0.5f); + bline[1].set_tangent(bline[2].get_vertex()-bline[0].get_vertex()*0.5f); + bline[2].set_tangent(bline[0].get_vertex()-bline[1].get_vertex()*0.5f); + bline[0].set_width(1.0f); + bline[1].set_width(1.0f); + bline[2].set_width(1.0f); + bline_loop=true; + mass=(0.5); + splits=5; + drag=0.1; + size=0.015; + needs_sync_=true; + sync(); + size_as_alpha=false; + reverse=true; +} + +void +Plant::branch(int n,int depth,float t, float stunt_growth, synfig::Point position,synfig::Vector vel)const +{ + float next_split((1.0-t)/(splits-depth)+t/*+random_factor*random(40+depth,t*splits,0,0)/splits*/); + for(;t=1.0-stunt_growth)return; + + synfig::Real sin_v=synfig::Angle::cos(split_angle).get(); + synfig::Real cos_v=synfig::Angle::sin(split_angle).get(); + + synfig::Vector velocity1(vel[0]*sin_v - vel[1]*cos_v + random_factor*random(Random::SMOOTH_COSINE, 30+n+depth, t*splits, 0.0f, 0.0f), + vel[0]*cos_v + vel[1]*sin_v + random_factor*random(Random::SMOOTH_COSINE, 32+n+depth, t*splits, 0.0f, 0.0f)); + synfig::Vector velocity2(vel[0]*sin_v + vel[1]*cos_v + random_factor*random(Random::SMOOTH_COSINE, 31+n+depth, t*splits, 0.0f, 0.0f), + -vel[0]*cos_v + vel[1]*sin_v + random_factor*random(Random::SMOOTH_COSINE, 33+n+depth, t*splits, 0.0f, 0.0f)); + + Plant::branch(n,depth+1,t,stunt_growth,position,velocity1); + Plant::branch(n,depth+1,t,stunt_growth,position,velocity2); +} + +void +Plant::calc_bounding_rect()const +{ + std::vector::const_iterator iter,next; + + bounding_rect=Rect::zero(); + + // Bline must have at least 2 points in it + if(bline.size()<2) + return; + + next=bline.begin(); + + if(bline_loop) + iter=--bline.end(); + else + iter=next++; + + for(;next!=bline.end();iter=next++) + { + bounding_rect.expand(iter->get_vertex()); + bounding_rect.expand(next->get_vertex()); + bounding_rect.expand(iter->get_vertex()+iter->get_tangent2()*0.3333333333333); + bounding_rect.expand(next->get_vertex()-next->get_tangent1()*0.3333333333333); + bounding_rect.expand(next->get_vertex()+next->get_tangent2()*velocity); + } + bounding_rect.expand_x(gravity[0]); + bounding_rect.expand_y(gravity[1]); + bounding_rect.expand_x(size); + bounding_rect.expand_y(size); +} + +void +Plant::sync()const +{ + Mutex::Lock lock(mutex); + if (!needs_sync_) return; + time_t start_time; time(&start_time); + particle_list.clear(); + + bounding_rect=Rect::zero(); + + // Bline must have at least 2 points in it + if(bline.size()<2) + { + needs_sync_=false; + return; + } + + std::vector::const_iterator iter,next; + + etl::hermite curve; + + Real step(abs(this->step)); + + int seg(0); + + next=bline.begin(); + + if(bline_loop) iter=--bline.end(); // iter is the last bline in the list; next is the first bline in the list + else iter=next++; // iter is the first bline in the list; next is the second bline in the list + + // loop through the bline; seg counts the blines as we do so; stop before iter is the last bline in the list + for(;next!=bline.end();iter=next++,seg++) + { + float iterw=iter->get_width(); // the width value of the iter vertex + float nextw=next->get_width(); // the width value of the next vertex + float width; // the width at an intermediate position + curve.p1()=iter->get_vertex(); + curve.t1()=iter->get_tangent2(); + curve.p2()=next->get_vertex(); + curve.t2()=next->get_tangent1(); + curve.sync(); + etl::derivative > deriv(curve); + + Real f; + + int i=0, branch_count = 0, steps = round_to_int(1.0/step); + if (steps < 1) steps = 1; + for(f=0.0;f<1.0;f+=step,i++) + { + Point point(curve(f)); + + particle_list.push_back(Particle(point, gradient(0))); + if (particle_list.size() % 1000000 == 0) + synfig::info("constructed %d million particles...", particle_list.size()/1000000); + + bounding_rect.expand(point); + + Real stunt_growth(random_factor * (random(Random::SMOOTH_COSINE,i,f+seg,0.0f,0.0f)/2.0+0.5)); + stunt_growth*=stunt_growth; + + if((((i+1)*sprouts + steps/2) / steps) > branch_count) { + Vector branch_velocity(deriv(f).norm()*velocity + deriv(f).perp().norm()*perp_velocity); + + if (isnan(branch_velocity[0]) || isnan(branch_velocity[1])) + continue; + + branch_velocity[0] += random_factor * random(Random::SMOOTH_COSINE, 1, f*splits, 0.0f, 0.0f); + branch_velocity[1] += random_factor * random(Random::SMOOTH_COSINE, 2, f*splits, 0.0f, 0.0f); + + if (use_width) + { + width = iterw+(nextw-iterw)*f; // calculate the width based on the current position + + branch_velocity[0] *= width; // scale the velocity accordingly to the current width + branch_velocity[1] *= width; + } + + branch_count++; + branch(i, 0, 0, // time + stunt_growth, // stunt growth + point, branch_velocity); + } + } + } + + time_t end_time; time(&end_time); + if (end_time-start_time > 4) + synfig::info("Plant::sync() constructed %d particles in %d seconds\n", + particle_list.size(), int(end_time-start_time)); + needs_sync_=false; +} + +bool +Plant::set_param(const String & param, const ValueBase &value) +{ + if(param=="bline" && value.get_type()==ValueBase::TYPE_LIST) + { + bline=value; + bline_loop=value.get_loop(); + needs_sync_=true; + + return true; + } + if(param=="seed" && value.same_type_as(int())) + { + random.set_seed(value.get(int())); + needs_sync_=true; + return true; + } + IMPORT(origin); + IMPORT_PLUS(split_angle,needs_sync_=true); + IMPORT_PLUS(gravity,needs_sync_=true); + IMPORT_PLUS(gradient,needs_sync_=true); + IMPORT_PLUS(velocity,needs_sync_=true); + IMPORT_PLUS(perp_velocity,needs_sync_=true); + IMPORT_PLUS(step,{ + needs_sync_ = true; + if (step <= 0) + step=0.01; // user is probably clueless - give a good default + else if (step < 0.00001) + step=0.00001; // 100K should be enough for anyone + else if (step > 1) + step=1; + }); + IMPORT_PLUS(splits,{ + needs_sync_=true; + if (splits < 1) + splits = 1; + }); + IMPORT_PLUS(sprouts,needs_sync_=true); + IMPORT_PLUS(random_factor,needs_sync_=true); + IMPORT_PLUS(drag,needs_sync_=true); + IMPORT(size); + IMPORT(size_as_alpha); + IMPORT(reverse); + IMPORT(use_width); + + IMPORT_AS(origin,"offset"); + + return Layer_Composite::set_param(param,value); +} +/* +void +Plant::set_time(Context context, Time time)const +{ + if(needs_sync==true) + { + sync(); + needs_sync_=false; + } + //const_cast(this)->sync(); + context.set_time(time); +} + +void +Plant::set_time(Context context, Time time, Vector pos)const +{ + if(needs_sync==true) + { + sync(); + needs_sync_=false; + } + //const_cast(this)->sync(); + context.set_time(time,pos); +} +*/ +ValueBase +Plant::get_param(const String& param)const +{ + if(param=="seed") + return random.get_seed(); + EXPORT(bline); + EXPORT(origin); + EXPORT(split_angle); + EXPORT(gravity); + EXPORT(velocity); + EXPORT(perp_velocity); + EXPORT(step); + EXPORT(gradient); + EXPORT(splits); + EXPORT(sprouts); + EXPORT(random_factor); + EXPORT(drag); + EXPORT(size); + EXPORT(size_as_alpha); + EXPORT(reverse); + EXPORT(use_width); + + EXPORT_NAME(); + + if(param=="Version" || param=="version" || param=="version__") + return version; + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +Plant::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("bline") + .set_local_name(_("Vertices")) + .set_description(_("A list of BLine Points")) + .set_origin("origin") + .set_hint("width") + ); + + ret.push_back(ParamDesc("origin") + .set_local_name(_("Origin")) + ); + + ret.push_back(ParamDesc("gradient") + .set_local_name(_("Gradient")) + .set_description(_("Gradient to be used for coloring the plant")) + ); + + ret.push_back(ParamDesc("split_angle") + .set_local_name(_("Split Angle")) + .set_description(_("Angle by which each split deviates from its parent")) + ); + + ret.push_back(ParamDesc("gravity") + .set_local_name(_("Gravity")) + .set_description(_("Direction in which the shoots tend to face")) + .set_is_distance() + ); + + ret.push_back(ParamDesc("velocity") + .set_local_name(_("Tangential Velocity")) + .set_description(_("Amount to which shoots tend to grow along the tangent to the BLine")) + ); + + ret.push_back(ParamDesc("perp_velocity") + .set_local_name(_("Perpendicular Velocity")) + .set_description(_("Amount to which shoots tend to grow perpendicular to the tangent to the BLine")) + ); + + ret.push_back(ParamDesc("size") + .set_local_name(_("Stem Size")) + .set_description(_("Size of the stem")) + .set_is_distance() + ); + + ret.push_back(ParamDesc("size_as_alpha") + .set_local_name(_("Size As Alpha")) + .set_description(_("If enabled, the alpha channel from the gradient is multiplied by the stem size, and an alpha of 1.0 is used when rendering")) + ); + + ret.push_back(ParamDesc("reverse") + .set_local_name(_("Reverse")) + .set_description(_("If enabled, render the plant in the opposite direction")) + ); + + ret.push_back(ParamDesc("step") + .set_local_name(_("Step")) + .set_description(_("Measure of the distance between points when rendering")) + ); + + ret.push_back(ParamDesc("seed") + .set_local_name(_("Seed")) + .set_description(_("Used to seed the pseudo-random number generator")) + ); + + ret.push_back(ParamDesc("splits") + .set_local_name(_("Splits")) + .set_description(_("Maximum number of times that each sprout can sprout recursively")) + ); + + ret.push_back(ParamDesc("sprouts") + .set_local_name(_("Sprouts")) + .set_description(_("Number of places that growth occurs on each bline section")) + ); + + ret.push_back(ParamDesc("random_factor") + .set_local_name(_("Random Factor")) + .set_description(_("Used to scale down all random effects. Set to zero to disable randomness")) + ); + + ret.push_back(ParamDesc("drag") + .set_local_name(_("Drag")) + .set_description(_("Drag slows the growth")) + ); + + ret.push_back(ParamDesc("use_width") + .set_local_name(_("Use Width")) + .set_description(_("Scale the velocity by the bline's width")) + ); + + return ret; +} + +bool +Plant::set_version(const String &ver) +{ + version = ver; + + if (version == "0.1") + use_width = false; + + return true; +} + +bool +Plant::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + bool ret(context.accelerated_render(surface,quality,renddesc,cb)); + if(is_disabled() || !ret) + return ret; + + Surface dest_surface; + dest_surface.set_wh(surface->get_w(),surface->get_h()); + dest_surface.clear(); + + const Point tl(renddesc.get_tl()-origin); + const Point br(renddesc.get_br()-origin); + + const int w(renddesc.get_w()); + const int h(renddesc.get_h()); + + const int surface_width(surface->get_w()); + const int surface_height(surface->get_h()); + + // Width and Height of a pixel + const Real pw = (br[0] - tl[0]) / w; + const Real ph = (br[1] - tl[1]) / h; + + if (isinf(pw) || isinf(ph)) + return true; + + if(needs_sync_==true) + sync(); + + if (particle_list.begin() != particle_list.end()) + { + std::vector::iterator iter; + Particle *particle; + + float radius(size*sqrt(1.0f/(abs(pw)*abs(ph)))); + + int x1,y1,x2,y2; + + if (reverse) iter = particle_list.end(); + else iter = particle_list.begin(); + + while (true) + { + if (reverse) particle = &(*(iter-1)); + else particle = &(*iter); + + float scaled_radius(radius); + Color color(particle->color); + if(size_as_alpha) + { + scaled_radius*=color.get_a(); + color.set_a(1); + } + + // previously, radius was multiplied by sqrt(step)*12 only if + // the radius came out at less than 1 (pixel): + // if (radius<=1.0f) radius*=sqrt(step)*12.0f; + // seems a little arbitrary - does it help? + + // calculate the box that this particle will be drawn as + float x1f=(particle->point[0]-tl[0])/pw-(scaled_radius*0.5); + float x2f=(particle->point[0]-tl[0])/pw+(scaled_radius*0.5); + float y1f=(particle->point[1]-tl[1])/ph-(scaled_radius*0.5); + float y2f=(particle->point[1]-tl[1])/ph+(scaled_radius*0.5); + x1=ceil_to_int(x1f); + x2=ceil_to_int(x2f)-1; + y1=ceil_to_int(y1f); + y2=ceil_to_int(y2f)-1; + + // if the box isn't entirely off the canvas, draw it + if(x1<=surface_width && y1<=surface_height && x2>=0 && y2>=0) + { + float x1e=x1-x1f, x2e=x2f-x2, y1e=y1-y1f, y2e=y2f-y2; + // printf("x1e %.4f x2e %.4f y1e %.4f y2e %.4f\n", x1e, x2e, y1e, y2e); + + // adjust the box so it's entirely on the canvas + if(x1<=0) { x1=0; x1e=0; } + if(y1<=0) { y1=0; y1e=0; } + if(x2>=surface_width) { x2=surface_width; x2e=0; } + if(y2>=surface_height) { y2=surface_height; y2e=0; } + + int w(x2-x1), h(y2-y1); + + Surface::alpha_pen surface_pen(dest_surface.get_pen(x1,y1),1.0f); + if(w>0 && h>0) + dest_surface.fill(color,surface_pen,w,h); + + /* the rectangle doesn't cross any vertical pixel boundaries so we don't + * need to draw any top or bottom edges + */ + if(x2get_pen(0,0),get_amount(),get_blend_method()); + dest_surface.blit_to(pen); + + return true; +} + +Rect +Plant::get_bounding_rect(Context context)const +{ + if(needs_sync_==true) + sync(); + + if(is_disabled()) + return Rect::zero(); + + if(Color::is_onto(get_blend_method())) + return context.get_full_bounding_rect() & bounding_rect; + + //if(get_blend_method()==Color::BLEND_BEHIND) + // return context.get_full_bounding_rect() | bounding_rect; + return bounding_rect; +} diff --git a/synfig-core/src/modules/mod_particle/plant.h b/synfig-core/src/modules/mod_particle/plant.h new file mode 100644 index 0000000..b399a8a --- /dev/null +++ b/synfig-core/src/modules/mod_particle/plant.h @@ -0,0 +1,119 @@ +/* === S Y N F I G ========================================================= */ +/*! \file plant.h +** \brief Header file for implementation of the "Plant" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_PLANT_H +#define __SYNFIG_PLANT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "random.h" +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +class Plant : public synfig::Layer_Composite +{ + SYNFIG_LAYER_MODULE_EXT +private: + + std::vector bline; + bool bline_loop; + + Point origin; + + synfig::Gradient gradient; + + struct Particle + { + synfig::Point point; + synfig::Color color; + + Particle(const synfig::Point &point,const synfig::Color& color): + point(point),color(color) { } + }; + + mutable std::vector particle_list; + mutable synfig::Rect bounding_rect; + synfig::Angle split_angle; + synfig::Vector gravity; + synfig::Real velocity; + synfig::Real perp_velocity; + synfig::Real step; + synfig::Real mass; + synfig::Real drag; + synfig::Real size; + int splits; + int sprouts; + synfig::Real random_factor; + Random random; + + bool size_as_alpha; + bool reverse; + mutable bool needs_sync_; + mutable synfig::Mutex mutex; + + void branch(int n, int depth,float t, float stunt_growth, synfig::Point position,synfig::Vector velocity)const; + void sync()const; + String version; + bool use_width; + +public: + + Plant(); + + void calc_bounding_rect()const; + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + + virtual ValueBase get_param(const String & param)const; + + virtual bool set_version(const synfig::String &ver); + + virtual Vocab get_param_vocab()const; + + virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;\ + + virtual synfig::Rect get_bounding_rect(synfig::Context context)const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_particle/random.cpp b/synfig-core/src/modules/mod_particle/random.cpp new file mode 100644 index 0000000..ebdff92 --- /dev/null +++ b/synfig-core/src/modules/mod_particle/random.cpp @@ -0,0 +1,312 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_particle/random.cpp +** \brief blehh +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "random.h" +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +#define PI (3.1415927) + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +void +Random::set_seed(int x) +{ + seed_=x; + srand(x); + int i; + for(i=0;i0)?((x)*(x)*(x)):0.0f) +#define R(x) ( P(x+2) - 4.0f*P(x+1) + 6.0f*P(x) - 4.0f*P(x-1) )*(1.0f/6.0f) +#define F(i,j) ((*this)(subseed,i+x,j+y)*(R((i)-a)*R(b-(j)))) +#define FT(i,j,k) ((*this)(subseed,i+x,j+y,k+t)*(R((i)-a)*R(b-(j))*R((k)-c))) +#define Z(i,j) ret+=F(i,j) +#define ZT(i,j,k) ret+=FT(i,j,k) +#define X(i,j) // placeholder... To make box more symmetric +#define XT(i,j,k) // placeholder... To make box more symmetric + + float a(xf-x), b(yf-y); + + // Interpolate + float ret(F(0,0)); + Z(-1,-1); Z(-1, 0); Z(-1, 1); Z(-1, 2); + Z( 0,-1); X( 0, 0); Z( 0, 1); Z( 0, 2); + Z( 1,-1); Z( 1, 0); Z( 1, 1); Z( 1, 2); + Z( 2,-1); Z( 2, 0); Z( 2, 1); Z( 2, 2); + + return ret; + } + + case SMOOTH_SPLINE: // Spline (animated) + { + float a(xf-x), b(yf-y), c(tf-t); + + // Interpolate + float ret(FT(0,0,0)); + ZT(-1,-1,-1); ZT(-1, 0,-1); ZT(-1, 1,-1); ZT(-1, 2,-1); + ZT( 0,-1,-1); ZT( 0, 0,-1); ZT( 0, 1,-1); ZT( 0, 2,-1); + ZT( 1,-1,-1); ZT( 1, 0,-1); ZT( 1, 1,-1); ZT( 1, 2,-1); + ZT( 2,-1,-1); ZT( 2, 0,-1); ZT( 2, 1,-1); ZT( 2, 2,-1); + + ZT(-1,-1, 0); ZT(-1, 0, 0); ZT(-1, 1, 0); ZT(-1, 2, 0); + ZT( 0,-1, 0); XT( 0, 0, 0); ZT( 0, 1, 0); ZT( 0, 2, 0); + ZT( 1,-1, 0); ZT( 1, 0, 0); ZT( 1, 1, 0); ZT( 1, 2, 0); + ZT( 2,-1, 0); ZT( 2, 0, 0); ZT( 2, 1, 0); ZT( 2, 2, 0); + + ZT(-1,-1, 1); ZT(-1, 0, 1); ZT(-1, 1, 1); ZT(-1, 2, 1); + ZT( 0,-1, 1); ZT( 0, 0, 1); ZT( 0, 1, 1); ZT( 0, 2, 1); + ZT( 1,-1, 1); ZT( 1, 0, 1); ZT( 1, 1, 1); ZT( 1, 2, 1); + ZT( 2,-1, 1); ZT( 2, 0, 1); ZT( 2, 1, 1); ZT( 2, 2, 1); + + ZT(-1,-1, 2); ZT(-1, 0, 2); ZT(-1, 1, 2); ZT(-1, 2, 2); + ZT( 0,-1, 2); ZT( 0, 0, 2); ZT( 0, 1, 2); ZT( 0, 2, 2); + ZT( 1,-1, 2); ZT( 1, 0, 2); ZT( 1, 1, 2); ZT( 1, 2, 2); + ZT( 2,-1, 2); ZT( 2, 0, 2); ZT( 2, 1, 2); ZT( 2, 2, 2); + + return ret; + +/* + + float dx=xf-x; + float dy=yf-y; + float dt=tf-t; + + float ret=0; + int i,j,h; + for(h=-1;h<=2;h++) + for(i=-1;i<=2;i++) + for(j=-1;j<=2;j++) + ret+=(*this)(subseed,i+x,j+y,h+t)*(R(i-dx)*R(j-dy)*R(h-dt)); + return ret; +*/ + } + break; +#undef X +#undef Z +#undef F +#undef P +#undef R + + case SMOOTH_COSINE: + if((float)t==tf) + { + int x((int)floor(xf)); + int y((int)floor(yf)); + float a=xf-x; + float b=yf-y; + a=(1.0f-cos(a*PI))*0.5f; + b=(1.0f-cos(b*PI))*0.5f; + float c=1.0-a; + float d=1.0-b; + int x2=x+1,y2=y+1; + return + (*this)(subseed,x,y,t)*(c*d)+ + (*this)(subseed,x2,y,t)*(a*d)+ + (*this)(subseed,x,y2,t)*(c*b)+ + (*this)(subseed,x2,y2,t)*(a*b); + } + else + { + float a=xf-x; + float b=yf-y; + float c=tf-t; + + a=(1.0f-cos(a*PI))*0.5f; + b=(1.0f-cos(b*PI))*0.5f; + + // We don't perform this on the time axis, otherwise we won't + // get smooth motion + //c=(1.0f-cos(c*PI))*0.5f; + + float d=1.0-a; + float e=1.0-b; + float f=1.0-c; + + int x2=x+1,y2=y+1,t2=t+1; + + return + (*this)(subseed,x,y,t)*(d*e*f)+ + (*this)(subseed,x2,y,t)*(a*e*f)+ + (*this)(subseed,x,y2,t)*(d*b*f)+ + (*this)(subseed,x2,y2,t)*(a*b*f)+ + (*this)(subseed,x,y,t2)*(d*e*c)+ + (*this)(subseed,x2,y,t2)*(a*e*c)+ + (*this)(subseed,x,y2,t2)*(d*b*c)+ + (*this)(subseed,x2,y2,t2)*(a*b*c); + } + case SMOOTH_LINEAR: + if((float)t==tf) + { + int x((int)floor(xf)); + int y((int)floor(yf)); + float a=xf-x; + float b=yf-y; + float c=1.0-a; + float d=1.0-b; + int x2=x+1,y2=y+1; + return + (*this)(subseed,x,y,t)*(c*d)+ + (*this)(subseed,x2,y,t)*(a*d)+ + (*this)(subseed,x,y2,t)*(c*b)+ + (*this)(subseed,x2,y2,t)*(a*b); + } + else + { + + float a=xf-x; + float b=yf-y; + float c=tf-t; + + float d=1.0-a; + float e=1.0-b; + float f=1.0-c; + + int x2=x+1,y2=y+1,t2=t+1; + + return + (*this)(subseed,x,y,t)*(d*e*f)+ + (*this)(subseed,x2,y,t)*(a*e*f)+ + (*this)(subseed,x,y2,t)*(d*b*f)+ + (*this)(subseed,x2,y2,t)*(a*b*f)+ + (*this)(subseed,x,y,t2)*(d*e*c)+ + (*this)(subseed,x2,y,t2)*(a*e*c)+ + (*this)(subseed,x,y2,t2)*(d*b*c)+ + (*this)(subseed,x2,y2,t2)*(a*b*c); + } + default: + case SMOOTH_DEFAULT: + return (*this)(subseed,x,y,t); + } +} diff --git a/synfig-core/src/modules/mod_particle/random.h b/synfig-core/src/modules/mod_particle/random.h new file mode 100644 index 0000000..943a1cd --- /dev/null +++ b/synfig-core/src/modules/mod_particle/random.h @@ -0,0 +1,67 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_particle/random.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_RANDOM_H +#define __SYNFIG_RANDOM_H + +/* === H E A D E R S ======================================================= */ + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + + +#define POOL_SIZE (256) +class Random +{ + int pool_[POOL_SIZE]; + int seed_; + + int x_mask, y_mask, t_mask; + +public: + + void set_seed(int x); + int get_seed()const { return seed_; } + + enum SmoothType + { + SMOOTH_DEFAULT = 0, + SMOOTH_LINEAR = 1, + SMOOTH_COSINE = 2, + SMOOTH_SPLINE = 3, + SMOOTH_CUBIC = 4, + SMOOTH_FAST_SPLINE = 5, + }; + + float operator()(int salt,int x,int y=0, int t=0)const; + float operator()(SmoothType smooth,int subseed,float x,float y=0, float t=0)const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_particle/unmod_particle.nsh b/synfig-core/src/modules/mod_particle/unmod_particle.nsh new file mode 100644 index 0000000..d848030 --- /dev/null +++ b/synfig-core/src/modules/mod_particle/unmod_particle.nsh @@ -0,0 +1,8 @@ +Section "un.mod_particle" + Delete "$INSTDIR\lib\synfig\modules\mod_particle.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/modules/mod_png/Makefile.am b/synfig-core/src/modules/mod_png/Makefile.am new file mode 100644 index 0000000..d36942d --- /dev/null +++ b/synfig-core/src/modules/mod_png/Makefile.am @@ -0,0 +1,42 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +moduledir = @MODULE_DIR@ + +if HAVE_LIBPNG + +module_LTLIBRARIES = libmod_png.la + +libmod_png_la_SOURCES = \ + main.cpp \ + trgt_png.cpp \ + trgt_png.h \ + mptr_png.cpp \ + mptr_png.h + +libmod_png_la_LDFLAGS = \ + -module \ + @PNG_LIBS@ \ + -no-undefined \ + -avoid-version + +libmod_png_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ + +libmod_png_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @SYNFIG_LIBS@ + +endif + + +EXTRA_DIST = \ + mod_png.nsh \ + unmod_png.nsh diff --git a/synfig-core/src/modules/mod_png/main.cpp b/synfig-core/src/modules/mod_png/main.cpp new file mode 100644 index 0000000..25ffa4d --- /dev/null +++ b/synfig-core/src/modules/mod_png/main.cpp @@ -0,0 +1,58 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_png/main.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "trgt_png.h" +#include "mptr_png.h" +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(mod_png) + MODULE_NAME("PNG Module (libpng)") + MODULE_DESCRIPTION("Provides a PNG target and importer") + MODULE_AUTHOR("Robert B. Quattlebaum Jr") + MODULE_VERSION("1.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(mod_png) + BEGIN_TARGETS + TARGET(png_trgt) + END_TARGETS + BEGIN_IMPORTERS + IMPORTER(png_mptr) + END_IMPORTERS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mod_png/mod_png.nsh b/synfig-core/src/modules/mod_png/mod_png.nsh new file mode 100644 index 0000000..aaa7bbd --- /dev/null +++ b/synfig-core/src/modules/mod_png/mod_png.nsh @@ -0,0 +1,21 @@ +; The stuff to install +Section "mod_png" Sec_mod_png + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=mod_png.dll "src\modules\mod_png\.libs\libmod_png.dll" + + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "mod_png" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd + diff --git a/synfig-core/src/modules/mod_png/mptr_png.cpp b/synfig-core/src/modules/mod_png/mptr_png.cpp new file mode 100644 index 0000000..19f82f3 --- /dev/null +++ b/synfig-core/src/modules/mod_png/mptr_png.cpp @@ -0,0 +1,431 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mptr_png.cpp +** \brief ppm Target Module +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/*! +** \todo Support 16 bit PNG files +** \todo Support GAMMA correction +** \todo Fix memory leaks +*/ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "mptr_png.h" +#include +#include +#include + + +#include +#include +#include +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +#define PNG_CHECK_BYTES 8 + +/* === G L O B A L S ======================================================= */ + +SYNFIG_IMPORTER_INIT(png_mptr); +SYNFIG_IMPORTER_SET_NAME(png_mptr,"png"); +SYNFIG_IMPORTER_SET_EXT(png_mptr,"png"); +SYNFIG_IMPORTER_SET_VERSION(png_mptr,"0.1"); +SYNFIG_IMPORTER_SET_CVS_ID(png_mptr,"$Id$"); + +/* === M E T H O D S ======================================================= */ + +void +png_mptr::png_out_error(png_struct */*png_data*/,const char *msg) +{ + //png_mptr *me=(png_mptr*)png_data->error_ptr; + synfig::error(strprintf("png_mptr: error: %s",msg)); + //me->ready=false; +} + +void +png_mptr::png_out_warning(png_struct */*png_data*/,const char *msg) +{ + //png_mptr *me=(png_mptr*)png_data->error_ptr; + synfig::warning(strprintf("png_mptr: warning: %s",msg)); + //me->ready=false; +} + +int +png_mptr::read_chunk_callback(png_struct */*png_data*/, png_unknown_chunkp /*chunk*/) +{ + /* The unknown chunk structure contains your + chunk data: */ + //png_byte name[5]; + //png_byte *data; + //png_size_t size; + /* Note that libpng has already taken care of + the CRC handling */ + + /* put your code here. Return one of the + following: */ + + //return (-n); /* chunk had an error */ + return (0); /* did not recognize */ + //return (n); /* success */ +} + +png_mptr::png_mptr(const char *file_name) +{ + filename=file_name; + + /* Open the file pointer */ + FILE *file = fopen(file_name, "rb"); + if (!file) + { + //! \todo THROW SOMETHING + throw strprintf("Unable to physically open %s",file_name); + return; + } + + + /* Make sure we are dealing with a PNG format file */ + png_byte header[PNG_CHECK_BYTES]; + fread(header, 1, PNG_CHECK_BYTES, file); + bool is_png = !png_sig_cmp(header, 0, PNG_CHECK_BYTES); + if (!is_png) + { + //! \todo THROW SOMETHING + throw strprintf("This (\"%s\") doesn't appear to be a PNG file",file_name); + return; + } + + + png_structp png_ptr = png_create_read_struct + (PNG_LIBPNG_VER_STRING, (png_voidp)this, + &png_mptr::png_out_error, &png_mptr::png_out_warning); + if (!png_ptr) + { + //! \todo THROW SOMETHING + throw String("error on importer construction, *WRITEME*3"); + return; + } + + png_infop info_ptr = png_create_info_struct(png_ptr); + if (!info_ptr) + { + png_destroy_read_struct(&png_ptr, + (png_infopp)NULL, (png_infopp)NULL); + //! \todo THROW SOMETHING + throw String("error on importer construction, *WRITEME*4"); + return; + } + + png_infop end_info = png_create_info_struct(png_ptr); + if (!end_info) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + //! \todo THROW SOMETHING + throw String("error on importer construction, *WRITEME*4"); + return; + } + + + + png_init_io(png_ptr, file); + png_set_sig_bytes(png_ptr,PNG_CHECK_BYTES); + + png_read_info(png_ptr, info_ptr); + + int bit_depth,color_type,interlace_type, compression_type,filter_method; + png_uint_32 width,height; + + png_get_IHDR(png_ptr, info_ptr, &width, &height, + &bit_depth, &color_type, &interlace_type, + &compression_type, &filter_method); + + if (bit_depth == 16) + png_set_strip_16(png_ptr); + + if (bit_depth < 8) + png_set_packing(png_ptr); + + double fgamma; + if (png_get_gAMA(png_ptr, info_ptr, &fgamma)) + { + synfig::info("PNG: Image gamma is %f",fgamma); + png_set_gamma(png_ptr, gamma().get_gamma(), fgamma); + } + + + /* + if (setjmp(png_jmpbuf(png_ptr))) + { + synfig::error("Unable to setup longjump"); + png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); + fclose(file); + //! \todo THROW SOMETHING + throw String("error on importer construction, *WRITEME*5"); + return; + } + */ + + png_set_read_user_chunk_fn(png_ptr, this, &png_mptr::read_chunk_callback); + + // man libpng tells me: + // You must use png_transforms and not call any + // png_set_transform() functions when you use png_read_png(). + // but we used png_set_gamma(), which may be why we were seeing a crash at the end + // png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_PACKING|PNG_TRANSFORM_STRIP_16, NULL); + + png_read_update_info(png_ptr, info_ptr); + png_uint_32 rowbytes = png_get_rowbytes(png_ptr, info_ptr); + + // allocate buffer to read image data into + png_bytep *row_pointers=new png_bytep[height]; + png_byte *data = new png_byte[rowbytes*height]; + for (png_uint_32 i = 0; i < height; i++) + row_pointers[i] = &(data[rowbytes*i]); + + png_read_image(png_ptr, row_pointers); + + png_uint_32 x, y; + surface_buffer.set_wh(width,height); + + switch(color_type) + { + case PNG_COLOR_TYPE_RGB: + for(y=0;ypalette[row_pointers[y][x]].red); + float g=gamma().g_U8_to_F32((unsigned char)png_ptr->palette[row_pointers[y][x]].green); + float b=gamma().b_U8_to_F32((unsigned char)png_ptr->palette[row_pointers[y][x]].blue); + float a=1.0; + if(info_ptr->valid & PNG_INFO_tRNS) + a = (float)(unsigned char)png_ptr->trans[row_pointers[y][x]]*(1.0/255.0); + surface_buffer[y][x]=Color( + r, + g, + b, + a + ); + } + break; + default: + synfig::error("png_mptr: error: Unsupported color type"); + //! \todo THROW SOMETHING + throw String("error on importer construction, *WRITEME*6"); + return; + } + + png_read_end(png_ptr, end_info); + png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); + fclose(file); + + delete [] row_pointers; + delete [] data; + + trim = false; + + if (getenv("SYNFIG_DISABLE_CROP_IMPORTED_IMAGES")) + return; + + switch(color_type) + { + case PNG_COLOR_TYPE_RGB_ALPHA: + case PNG_COLOR_TYPE_GRAY_ALPHA: + case PNG_COLOR_TYPE_PALETTE: + for(y=0;yBORDER) min_y = y-BORDER; else min_y = 0; + + for(y=height-1;y>0;y--) + { + for(x=0;xBORDER) min_x = x-BORDER; else min_x = 0; + + for(x=width-1;x>0;x--) + { + for(y=0;y +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class png_mptr : public synfig::Importer +{ + SYNFIG_IMPORTER_MODULE_EXT +private: + synfig::String filename; + synfig::Surface surface_buffer; + + png_structp png_ptr; + png_infop info_ptr; + png_infop end_info; + + bool trim; + unsigned int orig_width, orig_height, trimmed_x, trimmed_y; + + static void png_out_error(png_struct *png_data,const char *msg); + static void png_out_warning(png_struct *png_data,const char *msg); + static int read_chunk_callback(png_struct *png_data, png_unknown_chunkp chunk); + +public: + png_mptr(const char *filename); + ~png_mptr(); + + virtual bool get_frame(synfig::Surface &surface,synfig::Time time, synfig::ProgressCallback *callback); + virtual bool get_frame(synfig::Surface &surface,synfig::Time time, + bool &trimmed, unsigned int &width, unsigned int &height, unsigned int &top, unsigned int &left, + synfig::ProgressCallback *callback); +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_png/trgt_png.cpp b/synfig-core/src/modules/mod_png/trgt_png.cpp new file mode 100644 index 0000000..bc38548 --- /dev/null +++ b/synfig-core/src/modules/mod_png/trgt_png.cpp @@ -0,0 +1,244 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_png.cpp +** \brief png_trgt Target Module +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_TARGET + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "trgt_png.h" +#include +#include +#include +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_TARGET_INIT(png_trgt); +SYNFIG_TARGET_SET_NAME(png_trgt,"png"); +SYNFIG_TARGET_SET_EXT(png_trgt,"png"); +SYNFIG_TARGET_SET_VERSION(png_trgt,"0.1"); +SYNFIG_TARGET_SET_CVS_ID(png_trgt,"$Id$"); + +/* === M E T H O D S ======================================================= */ + +void +png_trgt::png_out_error(png_struct *png_data,const char *msg) +{ + png_trgt *me=(png_trgt*)png_data->error_ptr; + synfig::error(strprintf("png_trgt: error: %s",msg)); + me->ready=false; +} + +void +png_trgt::png_out_warning(png_struct *png_data,const char *msg) +{ + png_trgt *me=(png_trgt*)png_data->error_ptr; + synfig::warning(strprintf("png_trgt: warning: %s",msg)); + me->ready=false; +} + + +//Target *png_trgt::New(const char *filename){ return new png_trgt(filename);} + +png_trgt::png_trgt(const char *Filename) +{ + file=NULL; + filename=Filename; + buffer=NULL; + ready=false; + color_buffer=0; +} + +png_trgt::~png_trgt() +{ + if(file) + fclose(file); + file=NULL; + delete [] buffer; + delete [] color_buffer; +} + +bool +png_trgt::set_rend_desc(RendDesc *given_desc) +{ + //given_desc->set_pixel_format(PixelFormat((int)PF_RGB|(int)PF_A)); + desc=*given_desc; + imagecount=desc.get_frame_start(); + if(desc.get_frame_end()-desc.get_frame_start()>0) + multi_image=true; + else + multi_image=false; + return true; +} + +void +png_trgt::end_frame() +{ + if(ready && file) + { + png_write_end(png_ptr,info_ptr); + png_destroy_write_struct(&png_ptr, &info_ptr); + } + + if(file && file!=stdout) + fclose(file); + file=NULL; + imagecount++; + ready=false; +} + +bool +png_trgt::start_frame(synfig::ProgressCallback *callback) +{ + int w=desc.get_w(),h=desc.get_h(); + + if(file && file!=stdout) + fclose(file); + if(filename=="-") + { + if(callback)callback->task(strprintf("(stdout) %d",imagecount).c_str()); + file=stdout; + } + else if(multi_image) + { + String newfilename(filename_sans_extension(filename) + + etl::strprintf(".%04d",imagecount) + + filename_extension(filename)); + file=fopen(newfilename.c_str(),POPEN_BINARY_WRITE_TYPE); + if(callback)callback->task(newfilename); + } + else + { + file=fopen(filename.c_str(),POPEN_BINARY_WRITE_TYPE); + if(callback)callback->task(filename); + } + + if(!file) + return false; + + delete [] buffer; + buffer=new unsigned char[4*w]; + + delete [] color_buffer; + color_buffer=new Color[w]; + + png_ptr=png_create_write_struct(PNG_LIBPNG_VER_STRING, (png_voidp)this,png_out_error, png_out_warning); + if (!png_ptr) + { + synfig::error("Unable to setup PNG struct"); + fclose(file); + return false; + } + + info_ptr= png_create_info_struct(png_ptr); + if (!info_ptr) + { + synfig::error("Unable to setup PNG info struct"); + fclose(file); + png_destroy_write_struct(&png_ptr,(png_infopp)NULL); + return false; + } + + if (setjmp(png_jmpbuf(png_ptr))) + { + synfig::error("Unable to setup longjump"); + png_destroy_write_struct(&png_ptr, &info_ptr); + fclose(file); + return false; + } + png_init_io(png_ptr,file); + png_set_filter(png_ptr,0,PNG_FILTER_NONE); + + setjmp(png_jmpbuf(png_ptr)); + png_set_IHDR(png_ptr,info_ptr,w,h,8,PNG_COLOR_TYPE_RGBA,PNG_INTERLACE_NONE,PNG_COMPRESSION_TYPE_DEFAULT,PNG_FILTER_TYPE_DEFAULT); + + // Write the gamma + //png_set_gAMA(png_ptr, info_ptr,1.0/gamma().get_gamma()); + png_set_gAMA(png_ptr, info_ptr,gamma().get_gamma()); + + // Write the physical size + png_set_pHYs(png_ptr,info_ptr,round_to_int(desc.get_x_res()),round_to_int(desc.get_y_res()),PNG_RESOLUTION_METER); + + char title [] = "Title"; + char description[] = "Description"; + char software [] = "Software"; + char synfig [] = "SYNFIG"; +// char copyright [] = "Copyright"; +// char voria [] = "(c) 2004 Voria Studios, LLC"; + + // Output any text info along with the file + png_text comments[]= + { + { PNG_TEXT_COMPRESSION_NONE, title, const_cast(get_canvas()->get_name().c_str()), + strlen(get_canvas()->get_name().c_str()) }, + { PNG_TEXT_COMPRESSION_NONE, description, const_cast(get_canvas()->get_description().c_str()), + strlen(get_canvas()->get_description().c_str()) }, +// { PNG_TEXT_COMPRESSION_NONE, copyright, voria, strlen(voria) }, + { PNG_TEXT_COMPRESSION_NONE, software, synfig, strlen(synfig) }, + }; + png_set_text(png_ptr,info_ptr,comments,sizeof(comments)/sizeof(png_text)); + + png_write_info_before_PLTE(png_ptr, info_ptr); + png_write_info(png_ptr, info_ptr); + ready=true; + return true; +} + +Color * +png_trgt::start_scanline(int /*scanline*/) +{ + return color_buffer; +} + +bool +png_trgt::end_scanline() +{ + if(!file || !ready) + return false; + + convert_color_format(buffer, color_buffer, desc.get_w(), PF_RGB|PF_A, gamma()); + + setjmp(png_jmpbuf(png_ptr)); + png_write_row(png_ptr,buffer); + + return true; +} diff --git a/synfig-core/src/modules/mod_png/trgt_png.h b/synfig-core/src/modules/mod_png/trgt_png.h new file mode 100644 index 0000000..19dd82b --- /dev/null +++ b/synfig-core/src/modules/mod_png/trgt_png.h @@ -0,0 +1,73 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_png.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TRGT_PNG_H +#define __SYNFIG_TRGT_PNG_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class png_trgt : public synfig::Target_Scanline +{ + SYNFIG_TARGET_MODULE_EXT +private: + FILE *file; + int w,h; + png_structp png_ptr; + png_infop info_ptr; + + static void png_out_error(png_struct *png,const char *msg); + static void png_out_warning(png_struct *png,const char *msg); + bool multi_image,ready; + int imagecount; + synfig::String filename; + unsigned char *buffer; + synfig::Color *color_buffer; +public: + png_trgt(const char *filename); + virtual ~png_trgt(); + + virtual bool set_rend_desc(synfig::RendDesc *desc); + virtual bool start_frame(synfig::ProgressCallback *cb); + virtual void end_frame(); + + virtual synfig::Color * start_scanline(int scanline); + virtual bool end_scanline(); +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_png/unmod_png.nsh b/synfig-core/src/modules/mod_png/unmod_png.nsh new file mode 100644 index 0000000..4266a9a --- /dev/null +++ b/synfig-core/src/modules/mod_png/unmod_png.nsh @@ -0,0 +1,8 @@ +Section "un.mod_png" + Delete "$INSTDIR\lib\synfig\modules\mod_png.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/modules/mod_ppm/Makefile.am b/synfig-core/src/modules/mod_ppm/Makefile.am new file mode 100644 index 0000000..ce8de9f --- /dev/null +++ b/synfig-core/src/modules/mod_ppm/Makefile.am @@ -0,0 +1,35 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +moduledir = @MODULE_DIR@ + +module_LTLIBRARIES = libmod_ppm.la + +libmod_ppm_la_SOURCES = \ + main.cpp \ + trgt_ppm.cpp \ + trgt_ppm.h \ + mptr_ppm.cpp \ + mptr_ppm.h + +libmod_ppm_la_LDFLAGS = \ + -module \ + -no-undefined \ + -avoid-version + +libmod_ppm_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ + +libmod_ppm_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @SYNFIG_LIBS@ + + +EXTRA_DIST= mod_ppm.nsh unmod_ppm.nsh trgt_mpg.cpp trgt_mpg.h diff --git a/synfig-core/src/modules/mod_ppm/main.cpp b/synfig-core/src/modules/mod_ppm/main.cpp new file mode 100644 index 0000000..e768223 --- /dev/null +++ b/synfig-core/src/modules/mod_ppm/main.cpp @@ -0,0 +1,58 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_ppm/main.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "trgt_ppm.h" +#include "mptr_ppm.h" +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(mod_ppm) + MODULE_NAME("PPM Target") + MODULE_DESCRIPTION("Provides a PPM target") + MODULE_AUTHOR("Robert B. Quattlebaum") + MODULE_VERSION("1.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(mod_ppm) + BEGIN_TARGETS + TARGET(ppm) + END_TARGETS + BEGIN_IMPORTERS + IMPORTER(ppm_mptr) + END_IMPORTERS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mod_ppm/mod_ppm.nsh b/synfig-core/src/modules/mod_ppm/mod_ppm.nsh new file mode 100644 index 0000000..ddf2c89 --- /dev/null +++ b/synfig-core/src/modules/mod_ppm/mod_ppm.nsh @@ -0,0 +1,21 @@ +; The stuff to install +Section "mod_ppm" Sec_mod_ppm + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=mod_ppm.dll "src\modules\mod_ppm\.libs\libmod_ppm.dll" + + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "mod_ppm" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd + diff --git a/synfig-core/src/modules/mod_ppm/mptr_ppm.cpp b/synfig-core/src/modules/mod_ppm/mptr_ppm.cpp new file mode 100644 index 0000000..6900c93 --- /dev/null +++ b/synfig-core/src/modules/mod_ppm/mptr_ppm.cpp @@ -0,0 +1,120 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mptr_ppm.cpp +** \brief ppm Target Module +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "mptr_ppm.h" +#include +#include +#include +#include +#include + +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_IMPORTER_INIT(ppm_mptr); +SYNFIG_IMPORTER_SET_NAME(ppm_mptr,"ppm"); +SYNFIG_IMPORTER_SET_EXT(ppm_mptr,"ppm"); +SYNFIG_IMPORTER_SET_VERSION(ppm_mptr,"0.1"); +SYNFIG_IMPORTER_SET_CVS_ID(ppm_mptr,"$Id$"); + +/* === M E T H O D S ======================================================= */ + +ppm_mptr::ppm_mptr(const char *file) +{ + filename=file; +} + +ppm_mptr::~ppm_mptr() +{ +} + +bool +ppm_mptr::get_frame(synfig::Surface &surface,Time, synfig::ProgressCallback *cb) +{ + SmartFILE file(fopen(filename.c_str(),"rb")); + if(!file) + { + if(cb)cb->error("pp_mptr::GetFrame(): "+strprintf(_("Unable to open %s"),filename.c_str())); + return false; + } + int w,h; + float divisor; + + if(fgetc(file.get())!='P' || fgetc(file.get())!='6') + { + if(cb)cb->error("pp_mptr::GetFrame(): "+strprintf(_("%s was not in PPM format"),filename.c_str())); + return false; + } + + fgetc(file.get()); + fscanf(file.get(),"%d %d\n",&w,&h); + fscanf(file.get(),"%f",&divisor); + fgetc(file.get()); + + int x; + int y; + surface.set_wh(w,h); + for(y=0;y +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class ppm_mptr : public synfig::Importer +{ + SYNFIG_IMPORTER_MODULE_EXT +private: + synfig::String filename; +public: + ppm_mptr(const char *filename); + ~ppm_mptr(); + + virtual bool get_frame(synfig::Surface &surface,synfig::Time time, synfig::ProgressCallback *callback); +}; // END of class ppm_mptr + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_ppm/trgt_mpg.cpp b/synfig-core/src/modules/mod_ppm/trgt_mpg.cpp new file mode 100644 index 0000000..e379eb0 --- /dev/null +++ b/synfig-core/src/modules/mod_ppm/trgt_mpg.cpp @@ -0,0 +1,215 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_mpg.cpp +** \brief bsd_mpeg1 Target Module +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_TARGET + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "trgt_mpg.h" +#include +#include +#include +#include +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + +const char bsd_mpeg1::Name[]="mpeg1"; +const char bsd_mpeg1::Ext[]="mpg"; + +#define tmp_dir string("/tmp/") + +/* === M E T H O D S ======================================================= */ + +#error This code has tmpfile vulnerabilites + +Target * +bsd_mpeg1::New(const char *filename) +{ + return new bsd_mpeg1(filename); +} + +bsd_mpeg1::bsd_mpeg1(const char *Filename) +{ + filename=Filename; + passthru=ppm::New((tmp_dir+"temp.ppm").c_str()); + paramfile=NULL; + +} + +bsd_mpeg1::~bsd_mpeg1() +{ + if(paramfile) + fclose(paramfile); + delete passthru; + cerr<<"Encoding "<get_frame_rate(); + + // Valid framerates: + // 23.976, 24, 25, 29.97, 30, 50 ,59.94, 60 + + if(fps <24.0) + { + fprintf(paramfile,"FRAME_RATE 23.976\n"); + given_desc->set_frame_rate(23.976); + } + if(fps>=24.0 && fps <25.0) + { + fprintf(paramfile,"FRAME_RATE 24\n"); + given_desc->set_frame_rate(24); + } + if(fps>=25.0 && fps <29.97) + { + fprintf(paramfile,"FRAME_RATE 25\n"); + given_desc->set_frame_rate(25); + } + if(fps>=29.97 && fps <30.0) + { + fprintf(paramfile,"FRAME_RATE 29.97\n"); + given_desc->set_frame_rate(29.97); + } + if(fps>=29.97 && fps <30.0) + { + fprintf(paramfile,"FRAME_RATE 29.97\n"); + given_desc->set_frame_rate(29.97); + } + if(fps>=30.0 && fps <50.0) + { + fprintf(paramfile,"FRAME_RATE 30\n"); + given_desc->set_frame_rate(30.0); + } + if(fps>=50.0 && fps <59.94) + { + fprintf(paramfile,"FRAME_RATE 50\n"); + given_desc->set_frame_rate(50); + } + if(fps>=59.94) + { + fprintf(paramfile,"FRAME_RATE 59.94\n"); + given_desc->set_frame_rate(59.94); + } + + // Make sure that the width and height + // are multiples of 8 + given_desc->set_w((given_desc->get_w()+4)/8*8); + given_desc->set_h((given_desc->get_h()+4)/8*8); + + if(!passthru->set_rend_desc(given_desc)) + return false; + + desc=*given_desc; + + fprintf(paramfile, + "INPUT\n" + "tmp/temp*.ppm [%04d-%04d]\n" + "END_INPUT\n",desc.get_frame_start(),desc.get_frame_end()-1); + + fclose(paramfile); + paramfile=NULL; + + return true; +} + +void +bsd_mpeg1::end_frame() +{ + passthru->end_frame(); +} + +bool +bsd_mpeg1::start_frame(synfig::ProgressCallback *callback) +{ + return passthru->start_frame(callback); +} + +unsigned char * +bsd_mpeg1::start_scanline(int scanline) +{ + return passthru->start_scanline(scanline); +} + +bool +bsd_mpeg1::end_scanline(void) +{ + return passthru->end_scanline(); +} diff --git a/synfig-core/src/modules/mod_ppm/trgt_mpg.h b/synfig-core/src/modules/mod_ppm/trgt_mpg.h new file mode 100644 index 0000000..5ce96dc --- /dev/null +++ b/synfig-core/src/modules/mod_ppm/trgt_mpg.h @@ -0,0 +1,73 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_mpg.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TRGT_MPG_H +#define __SYNFIG_TRGT_MPG_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include "trgt_ppm.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + + +class bsd_mpeg1 : public synfig::Target +{ +public: +private: +// synfig::RendDesc desc; + synfig::Target *passthru; + String filename; + FILE *paramfile; +public: + bsd_mpeg1(const char *filename); + + virtual bool set_rend_desc(synfig::RendDesc *desc); + virtual bool start_frame(synfig::ProgressCallback *cb); + virtual void end_frame(); + + virtual ~bsd_mpeg1(); + + + virtual unsigned char * start_scanline(int scanline); + virtual bool end_scanline(void); + + static synfig::Target *New(const char *filename); + + static const char Name[]; + static const char Ext[]; + +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_ppm/trgt_ppm.cpp b/synfig-core/src/modules/mod_ppm/trgt_ppm.cpp new file mode 100644 index 0000000..8fc4810 --- /dev/null +++ b/synfig-core/src/modules/mod_ppm/trgt_ppm.cpp @@ -0,0 +1,152 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_ppm.cpp +** \brief ppm Target Module +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_TARGET + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "trgt_ppm.h" +#include +#include +#include +#include +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_TARGET_INIT(ppm); +SYNFIG_TARGET_SET_NAME(ppm,"ppm"); +SYNFIG_TARGET_SET_EXT(ppm,"ppm"); +SYNFIG_TARGET_SET_VERSION(ppm,"0.1"); +SYNFIG_TARGET_SET_CVS_ID(ppm,"$Id$"); + +/* === M E T H O D S ======================================================= */ + +ppm::ppm(const char *Filename) +{ + filename=Filename; + multi_image=false; + buffer=NULL; + color_buffer=0; + set_remove_alpha(); +} + +ppm::~ppm() +{ + delete [] buffer; + delete [] color_buffer; +} + +bool +ppm::set_rend_desc(RendDesc *given_desc) +{ + //given_desc->set_pixel_format(PF_RGB); + desc=*given_desc; + imagecount=desc.get_frame_start(); + if(desc.get_frame_end()-desc.get_frame_start()>0) + multi_image=true; + else + multi_image=false; + return true; +} + +void +ppm::end_frame() +{ + imagecount++; +} + +bool +ppm::start_frame(synfig::ProgressCallback *callback) +{ + int w=desc.get_w(),h=desc.get_h(); + + if(filename=="-") + { + if(callback)callback->task(strprintf("(stdout) %d",imagecount).c_str()); + file=SmartFILE(stdout); + } + else if(multi_image) + { + String newfilename(filename_sans_extension(filename) + + etl::strprintf(".%04d",imagecount) + + filename_extension(filename)); + file=SmartFILE(fopen(newfilename.c_str(),POPEN_BINARY_WRITE_TYPE)); + if(callback)callback->task(newfilename); + } + else + { + file=SmartFILE(fopen(filename.c_str(),POPEN_BINARY_WRITE_TYPE)); + if(callback)callback->task(filename); + } + + if(!file) + return false; + + fprintf(file.get(), "P6\n"); + fprintf(file.get(), "%d %d\n", w, h); + fprintf(file.get(), "%d\n", 255); + + delete [] buffer; + buffer=new unsigned char[3*w]; + + delete [] color_buffer; + color_buffer=new Color[desc.get_w()]; + + return true; +} + +Color * +ppm::start_scanline(int /*scanline*/) +{ + return color_buffer; +} + +bool +ppm::end_scanline() +{ + if(!file) + return false; + + convert_color_format(buffer, color_buffer, desc.get_w(), PF_RGB, gamma()); + + if(!fwrite(buffer,1,desc.get_w()*3,file.get())) + return false; + + return true; +} diff --git a/synfig-core/src/modules/mod_ppm/trgt_ppm.h b/synfig-core/src/modules/mod_ppm/trgt_ppm.h new file mode 100644 index 0000000..f1a5134 --- /dev/null +++ b/synfig-core/src/modules/mod_ppm/trgt_ppm.h @@ -0,0 +1,68 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_ppm.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TRGT_PPM_H +#define __SYNFIG_TRGT_PPM_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class ppm : public synfig::Target_Scanline +{ + SYNFIG_TARGET_MODULE_EXT + +private: + int imagecount; + bool multi_image; + synfig::SmartFILE file; + synfig::String filename; + synfig::Color *color_buffer; + unsigned char *buffer; +public: + ppm(const char *filename); + virtual ~ppm(); + + virtual bool set_rend_desc(synfig::RendDesc *desc); + virtual bool start_frame(synfig::ProgressCallback *cb); + virtual void end_frame(); + + virtual synfig::Color * start_scanline(int scanline); + virtual bool end_scanline(); +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_ppm/unmod_ppm.nsh b/synfig-core/src/modules/mod_ppm/unmod_ppm.nsh new file mode 100644 index 0000000..0cf7a12 --- /dev/null +++ b/synfig-core/src/modules/mod_ppm/unmod_ppm.nsh @@ -0,0 +1,8 @@ +Section "un.mod_ppm" + Delete "$INSTDIR\lib\synfig\modules\mod_ppm.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/modules/mod_svg/Makefile.am b/synfig-core/src/modules/mod_svg/Makefile.am new file mode 100644 index 0000000..25eb5a6 --- /dev/null +++ b/synfig-core/src/modules/mod_svg/Makefile.am @@ -0,0 +1,14 @@ +# $Id$ + +MAINTAINERCLEANFILES=Makefile.in +INCLUDES = -I$(top_builddir) -I$(top_srcdir)/src + +moduledir=@MODULE_DIR@ + +module_LTLIBRARIES = libmod_svg.la +libmod_svg_la_SOURCES = main.cpp layer_svg.h layer_svg.cpp svg_parser.h svg_parser.cpp +libmod_svg_la_LDFLAGS = -module -no-undefined -avoid-version +libmod_svg_la_CXXFLAGS = @SYNFIG_CFLAGS@ +libmod_svg_la_LIBADD = ../../synfig/libsynfig.la @SYNFIG_LIBS@ +EXTRA_DIST= mod_svg.nsh unmod_svg.nsh + diff --git a/synfig-core/src/modules/mod_svg/layer_svg.cpp b/synfig-core/src/modules/mod_svg/layer_svg.cpp new file mode 100644 index 0000000..2906079 --- /dev/null +++ b/synfig-core/src/modules/mod_svg/layer_svg.cpp @@ -0,0 +1,103 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer_svg.cpp +** \brief Implementation of the Svg layer +** +** $Id:$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** Copyright (c) 2009 Carlos A. Sosa Navarro +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include + +#include "layer_svg.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace etl; +using namespace std; +using namespace synfig; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(svg_layer); +SYNFIG_LAYER_SET_NAME(svg_layer,"svg_layer"); +SYNFIG_LAYER_SET_LOCAL_NAME(svg_layer,N_("Import Svg")); +SYNFIG_LAYER_SET_CATEGORY(svg_layer,N_("NotVisible"));//this is auxiliar +SYNFIG_LAYER_SET_VERSION(svg_layer,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(svg_layer,"$Id: layer_svg.cpp 2240 2008-11-22 15:35:33Z dooglus $"); + +/* === P R O C E D U R E S ================================================= */ + +svg_layer::svg_layer(): + Layer_PasteCanvas(), + filename("none") +{ +} + +bool +svg_layer::set_param(const String & param, const ValueBase &value) +{ + if(param=="filename"){ + Canvas::Handle canvas; + //if ext of filename == "svg" then + canvas=open_svg(value.get(String()),errors,warnings); + //else other parsers maybe + if(canvas){ + canvas->set_inline(get_canvas()); + set_sub_canvas(canvas); + IMPORT(filename); + } + } + return Layer_PasteCanvas::set_param(param,value); +} + +ValueBase +svg_layer::get_param(const String ¶m)const +{ + EXPORT(filename); + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_PasteCanvas::get_param(param); +} + +Layer::Vocab +svg_layer::get_param_vocab()const +{ + Layer::Vocab ret(Layer_PasteCanvas::get_param_vocab()); + + ret.push_back(ParamDesc("filename") + .set_local_name(_("Filename")) + ); + return ret; +} + diff --git a/synfig-core/src/modules/mod_svg/layer_svg.h b/synfig-core/src/modules/mod_svg/layer_svg.h new file mode 100644 index 0000000..b7aa25b --- /dev/null +++ b/synfig-core/src/modules/mod_svg/layer_svg.h @@ -0,0 +1,67 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer_svg.h +** \brief Header file for implementation of the Svg Canvas layer +** +** $Id:$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2009 Carlos A. Sosa Navarro +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_SVG_LAYER_H +#define __SYNFIG_SVG_LAYER_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +#include "svg_parser.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class svg_layer : public synfig::Layer_PasteCanvas +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + synfig::String filename; + synfig::String errors,warnings; + +public: + + svg_layer(); + + virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); + + virtual synfig::ValueBase get_param(const synfig::String & param)const; + + virtual Vocab get_param_vocab()const; +}; // END of class svg_layer + +/* === E N D =============================================================== */ + +#endif + diff --git a/synfig-core/src/modules/mod_svg/main.cpp b/synfig-core/src/modules/mod_svg/main.cpp new file mode 100644 index 0000000..1f5be67 --- /dev/null +++ b/synfig-core/src/modules/mod_svg/main.cpp @@ -0,0 +1,57 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_svg/main.cpp +** \brief writeme +** +** $Id:$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2009 Carlos A. Sosa Navarro +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_NO_ANGLE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include "layer_svg.h" + +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(mod_svg) + MODULE_NAME("SVG Importer") + MODULE_DESCRIPTION("Provides a svg importer") + MODULE_AUTHOR("Carlos Sosa Navarro") + MODULE_VERSION("0.1") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(mod_svg) + BEGIN_LAYERS + LAYER(svg_layer) + END_LAYERS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mod_svg/mod_svg.nsh b/synfig-core/src/modules/mod_svg/mod_svg.nsh new file mode 100644 index 0000000..03b31d5 --- /dev/null +++ b/synfig-core/src/modules/mod_svg/mod_svg.nsh @@ -0,0 +1,20 @@ +; The stuff to install +Section "mod_svg" Sec_mod_svg + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=mod_svg.dll "src\modules\mod_svg\.libs\libmod_svg.dll" + + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "mod_svg" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd diff --git a/synfig-core/src/modules/mod_svg/svg_parser.cpp b/synfig-core/src/modules/mod_svg/svg_parser.cpp new file mode 100644 index 0000000..2897d64 --- /dev/null +++ b/synfig-core/src/modules/mod_svg/svg_parser.cpp @@ -0,0 +1,1934 @@ +/* === S Y N F I G ========================================================= */ +/*! \file svg_parser.cpp +** \brief Implementation of the Svg parser +** \brief Based on SVG XML specification 1.1 +** \brief See: http://www.w3.org/TR/xml11/ for deatils +** +** $Id:$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** Copyright (c) 2009 Carlos A. Sosa Navarro +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include "svg_parser.h" + +/* === U S I N G =========================================================== */ + +using namespace synfig; + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +Canvas::Handle +synfig::open_svg(std::string _filepath,String &errors, String &warnings){ + Canvas::Handle canvas; + Svg_parser parser; + try + { + canvas=parser.load_svg_canvas(_filepath,errors,warnings); + //canvas->set_id(parser.get_id()); + }catch(...){ + std::cout<<"error"<get_root_node(); + parser_node(pNode); + } + #ifdef LIBXMLCPP_EXCEPTIONS_ENABLED + }catch(const std::exception& ex){ + std::cout << "Exception caught: " << ex.what() << std::endl; + } + #endif //LIBXMLCPP_EXCEPTIONS_ENABLED + Canvas::Handle canvas; + if(nodeRoot){ + //canvas=synfig::open_canvas(nodeRoot,_filepath,errors,warnings); + canvas=synfig::open_canvas(nodeRoot,errors,warnings); + } + return canvas; +} + +Svg_parser::Svg_parser(){ + uid=0; + kux=60; + set_canvas=0;//we must run parser_canvas method + // 0.5 in gamma parameter of color correct layer is 1/0.5 = 2 (thinking) it must be 2.2!!!! + gamma.set_gamma(2.2); +} +/* +String +Svg_parser::get_id(){ + if(!id_name.empty()) return id_name; + return "id_arbitrario"; +} +void +Svg_parser::set_id(String source){ + const char bad_chars[]=" :#@$^&()*"; + int inicio= source.find_last_of('/')+1; + int fin= source.find_last_of('.'); + String x=source.substr(inicio,fin-inicio); + if(!x.empty()){ + for(unsigned int i=0;i(node); + const xmlpp::TextNode* nodeText = dynamic_cast(node); + const xmlpp::CommentNode* nodeComment = dynamic_cast(node); + + if(nodeText && nodeText->is_white_space()) //Let's ignore the indenting - you don't always want to do this. + return; + + Glib::ustring nodename = node->get_name(); + if(!nodeText && !nodeComment && !nodename.empty()){ + if(nodename.compare("svg")==0){ + parser_svg (node); + }else if(nodename.compare("namedview")==0){ + parser_canvas(node); + }else if(nodename.compare("defs")==0){ + parser_defs (node); + }else if(nodename.compare("g")==0){ + if(set_canvas==0) parser_canvas (node); + parser_layer (node,nodeRoot->add_child("layer"),"",NULL); + return; + }else if(nodename.compare("rect")==0){ + if(set_canvas==0) parser_canvas (node); + parser_rect(node,nodeRoot,"",NULL); + }else if(nodename.compare("polygon")==0){ + if(set_canvas==0) parser_canvas (node); + parser_polygon(node,nodeRoot,"",NULL); + }else if(nodename.compare("path")==0){ + if(set_canvas==0) parser_canvas (node); + parser_path (node,nodeRoot,"",NULL); + } + } + if(!nodeContent){ + xmlpp::Node::NodeList list = node->get_children(); + for(xmlpp::Node::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter){ + parser_node(*iter); //recursive + } + } +} + +//parser elements +void +Svg_parser::parser_svg (const xmlpp::Node* node){ + //printf("un dia en algun lugar de la tierra media\n"); + if(const xmlpp::Element* nodeElement = dynamic_cast(node)){ + width =etl::strprintf("%f",getDimension(nodeElement->get_attribute_value("width"))); + height =etl::strprintf("%f",getDimension(nodeElement->get_attribute_value("height"))); + docname=nodeElement->get_attribute_value("docname",""); + } +} +void +Svg_parser::parser_canvas (const xmlpp::Node* node){ + //printf("el campo de batalla parecia un lienzo de pintura\n"); + if(const xmlpp::Element* nodeElement = dynamic_cast(node)){ + if(width.compare("")==0){ + width=nodeElement->get_attribute_value("width",""); + } + if(height.compare("")==0){ + height=nodeElement->get_attribute_value("height",""); + } + if(width.compare("")==0 && height.compare("")!=0){ + width=height; + } + if(width.compare("")!=0 && height.compare("")==0){ + height=width; + } + if(height.compare("")==0 && width.compare("")==0){ + width="1024"; + height="768"; + } + //build + nodeRoot=document.create_root_node("canvas", "", ""); + nodeRoot->set_attribute("version","0.5"); + nodeRoot->set_attribute("width",width); + nodeRoot->set_attribute("height",height); + nodeRoot->set_attribute("xres","2834.645752"); + nodeRoot->set_attribute("yres","2834.645752"); + float view_x; + float view_y; + view_x=atof(width.c_str())/kux; + view_y=atof(height.c_str())/kux; + view_x=view_x/2.0; + view_y=view_y/2.0; + char attr_view_box[60]; + sprintf(attr_view_box,"%f %f %f %f",-1.0*view_x,view_y,view_x,-1.0*view_y); + nodeRoot->set_attribute("view-box",attr_view_box); + ox=atof(width.c_str() )/2; + oy=atof(height.c_str())/2; + nodeRoot->set_attribute("antialias","1"); + nodeRoot->set_attribute("fps","24.000"); + nodeRoot->set_attribute("begin-time","0f"); + nodeRoot->set_attribute("end-time","5s"); + nodeRoot->set_attribute("bgcolor","0.500000 0.500000 0.500000 1.000000"); + //nodeRoot->add_child("name")->set_child_text("Synfig Animation 1"); + if(!id_name.empty()) nodeRoot->add_child("name")->set_child_text(id_name); + else nodeRoot->add_child("name")->set_child_text("Synfig Animation 1"); + } + set_canvas=1; + AdjustPointUrl (); +} + +void +Svg_parser::parser_rect(const xmlpp::Node* node,xmlpp::Element* root,String parent_style,Matrix* mtx_parent){ + if(const xmlpp::Element* nodeElement = dynamic_cast(node)){ + Glib::ustring rect_id =nodeElement->get_attribute_value("id"); + Glib::ustring rect_style =nodeElement->get_attribute_value("style"); + Glib::ustring rect_x =nodeElement->get_attribute_value("x"); + Glib::ustring rect_y =nodeElement->get_attribute_value("y"); + Glib::ustring rect_width =nodeElement->get_attribute_value("width"); + Glib::ustring rect_height =nodeElement->get_attribute_value("height"); + //style + String fill =loadAttribute("fill",rect_style,parent_style,"none"); + String fill_opacity =loadAttribute("fill-opacity",rect_style,parent_style,"1"); + String opacity =loadAttribute("opacity",rect_style,parent_style,"1"); + //matrix + //it's some complicated + + //build + + int typeFill=0; + if(fill.compare(0,3,"url")==0){ + typeFill=2; + root=nodeStartBasicLayer(root->add_child("layer")); + } + xmlpp::Element *child_rect=root->add_child("layer"); + child_rect->set_attribute("type","rectangle"); + child_rect->set_attribute("active","true"); + child_rect->set_attribute("version","0.2"); + child_rect->set_attribute("desc",rect_id); + + build_real(child_rect->add_child("param"),"z_depth",0.0); + build_real(child_rect->add_child("param"),"amount",1.0); + build_integer(child_rect->add_child("param"),"blend_method",0); + build_color (child_rect->add_child("param"),getRed (fill),getGreen (fill),getBlue(fill),atof(opacity.data())*atof(fill_opacity.data())); + + float auxx=atof(rect_x.c_str()); + float auxy=atof(rect_y.c_str()); + coor2vect(&auxx,&auxy); + build_vector (child_rect->add_child("param"),"point1",auxx,auxy); + auxx= atof(rect_x.c_str()) + atof(rect_width.c_str()); + auxy= atof(rect_y.c_str()) + atof(rect_height.c_str()); + coor2vect(&auxx,&auxy); + build_vector (child_rect->add_child("param"),"point2",auxx,auxy); + if(typeFill==2){ + build_url (root->add_child("layer"),fill,mtx_parent); + } + } +} +void +Svg_parser::parser_layer(const xmlpp::Node* node,xmlpp::Element* root,String parent_style,Matrix* mtx_parent){ + if(const xmlpp::Element* nodeElement = dynamic_cast(node)){ + Glib::ustring label =nodeElement->get_attribute_value("label"); + Glib::ustring style =nodeElement->get_attribute_value("style"); + Glib::ustring fill =nodeElement->get_attribute_value("fill"); + Glib::ustring transform =nodeElement->get_attribute_value("transform"); + + String layer_style; + if(!style.empty()){ + layer_style=style; + }else if(!fill.empty()){ + layer_style.append("fill:"); + layer_style.append(fill); + }else if(!parent_style.empty()){ + layer_style=parent_style; + } + Matrix* mtx=NULL; + if(!transform.empty()) + mtx=build_transform (transform); + if(mtx_parent){ + if(mtx) + composeMatrix(&mtx,mtx_parent,mtx); + else + mtx=newMatrix (mtx_parent); + } + //build + root->set_attribute("type","PasteCanvas"); + root->set_attribute("active","true"); + root->set_attribute("version","0.1"); + if(!label.empty()) root->set_attribute("desc",label); + else root->set_attribute("desc","unknow layer"); + + build_real(root->add_child("param"),"z_depth",0.0); + build_real(root->add_child("param"),"amount",1.0); + build_integer(root->add_child("param"),"blend_method",0); + build_vector (root->add_child("param"),"origin",0,0); + + //printf(" atributos canvas "); + //canvas + xmlpp::Element *child_canvas=root->add_child("param"); + child_canvas->set_attribute("name","canvas"); + child_canvas=child_canvas->add_child("canvas"); + const xmlpp::ContentNode* nodeContent = dynamic_cast(node); + if(!nodeContent){ + xmlpp::Node::NodeList list = node->get_children(); + for(xmlpp::Node::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter){ + Glib::ustring name =(*iter)->get_name(); + if(name.compare("g")==0){ + parser_layer (*iter,child_canvas->add_child("layer"),layer_style,mtx); + }else if(name.compare("path")==0){ + parser_path (*iter,child_canvas,layer_style,mtx); + }else if(name.compare("polygon")==0){ + parser_polygon (*iter,child_canvas,layer_style,mtx); + }else if(name.compare("rect")==0){ + parser_rect (*iter,child_canvas,layer_style,mtx); + } + } + } + } +} +void +Svg_parser::parser_polygon(const xmlpp::Node* node,xmlpp::Element* root,String parent_style,Matrix* mtx_parent){ + //printf("sus escudos parecian rombos y sus naves unos triangulos\n"); + if(const xmlpp::Element* nodeElement = dynamic_cast(node)){ + //load sub-attributes + Glib::ustring polygon_style =nodeElement->get_attribute_value("style"); + Glib::ustring polygon_id =nodeElement->get_attribute_value("id"); + Glib::ustring polygon_points =nodeElement->get_attribute_value("points"); + Glib::ustring polygon_transform =nodeElement->get_attribute_value("transform"); + Glib::ustring polygon_fill =nodeElement->get_attribute_value("fill"); + String fill =loadAttribute("fill",polygon_style,parent_style,polygon_fill,"none"); + String fill_rule =loadAttribute("fill-rule",polygon_style,parent_style,"evenodd"); + String fill_opacity =loadAttribute("fill-opacity",polygon_style,parent_style,"1"); + String opacity =loadAttribute("opacity",polygon_style,parent_style,"1"); + + //transforms + Matrix* mtx=NULL; + if(!polygon_transform.empty()) + mtx=build_transform (polygon_transform); + if(mtx_parent){ + if(mtx) + composeMatrix(&mtx,mtx_parent,mtx); + else + mtx=newMatrix (mtx_parent); + } + //points + if(polygon_points.empty()) + return; + std::list k; + std::vector tokens=get_tokens_path (polygon_points); + unsigned int i; + float ax,ay; ax=ay=0; + for(i=0;iadd_child("layer")); + } + child_polygon=root->add_child("layer"); + child_polygon->set_attribute("type","polygon"); + child_polygon->set_attribute("active","true"); + child_polygon->set_attribute("version","0.1"); + child_polygon->set_attribute("desc",polygon_id); + build_param (child_polygon->add_child("param"),"z_depth","real","0.0000000000"); + build_param (child_polygon->add_child("param"),"amount","real","1.0000000000"); + build_param (child_polygon->add_child("param"),"blend_method","integer","0"); + build_color (child_polygon->add_child("param"),getRed(fill),getGreen(fill),getBlue(fill),atof(fill_opacity.data())*atof(opacity.data())); + build_vector(child_polygon->add_child("param"),"offset",0,0); + build_param (child_polygon->add_child("param"),"invert","bool","false"); + build_param (child_polygon->add_child("param"),"antialias","bool","true"); + build_param (child_polygon->add_child("param"),"feather","real","0.0000000000"); + build_param (child_polygon->add_child("param"),"blurtype","integer","1"); + if(fill_rule.compare("evenodd")==0) build_param (child_polygon->add_child("param"),"winding_style","integer","1"); + else build_param (child_polygon->add_child("param"),"winding_style","integer","0"); + build_points (child_polygon->add_child("param"),k); + + if(typeFill==2){ + build_url(root->add_child("layer"),fill,mtx); + } + } +} +void +Svg_parser::parser_path(const xmlpp::Node* node,xmlpp::Element* root,String parent_style,Matrix* mtx_parent){ + //printf("pensamos que atacarian de frente pero hicieron una curva\n"); + if(const xmlpp::Element* nodeElement = dynamic_cast(node)){ + //load sub-attributes + Glib::ustring path_style =nodeElement->get_attribute_value("style"); + Glib::ustring path_id =nodeElement->get_attribute_value("id"); + Glib::ustring path_d =nodeElement->get_attribute_value("d"); + Glib::ustring path_transform =nodeElement->get_attribute_value("transform"); + Glib::ustring path_fill =nodeElement->get_attribute_value("fill"); + + String fill =loadAttribute("fill",path_style,parent_style,path_fill,"none"); + String fill_rule =loadAttribute("fill-rule",path_style,parent_style,"evenodd"); + String stroke =loadAttribute("stroke",path_style,parent_style,"none"); + String stroke_width =loadAttribute("stroke-width",path_style,parent_style,"1px"); + String stroke_linecap =loadAttribute("stroke-linecap",path_style,parent_style,"butt"); + String stroke_linejoin =loadAttribute("stroke-linejoin",path_style,parent_style,"miter"); + String stroke_opacity =loadAttribute("stroke-opacity",path_style,parent_style,"1"); + String fill_opacity =loadAttribute("fill-opacity",path_style,parent_style,"1"); + String opacity =loadAttribute("opacity",path_style,parent_style,"1"); + + //resolve transformations + Matrix* mtx=NULL; + if(!path_transform.empty()) + mtx=build_transform (path_transform); + if(mtx_parent){ + if(mtx) + composeMatrix(&mtx,mtx_parent,mtx); + else + mtx=newMatrix(mtx_parent); + } + //parser path_d attribute, this is obviously important + std::list > k; + k=parser_path_d (path_d,mtx); + + //escribir + int typeFill=0; //nothing + int typeStroke=0;//nothing + //Fill + if(fill.compare("none")!=0){ + typeFill=1; //simple + } + if(typeFill==1 && fill.compare(0,3,"url")==0){ + typeFill=2; //gradient + } + //Stroke + if(stroke.compare("none")!=0){ + typeStroke=1; //simple + } + if(typeStroke==1 && stroke.compare(0,3,"url")==0){ + typeStroke=2; //gradient + } + String bline_id; + String offset_id; + int n=k.size(); + if(n!=1){ //if n is > than 1 then we must create a paste canvas for all paths + root=nodeStartBasicLayer(root->add_child("layer")); + } + std::list >::iterator aux = k.begin(); + for (; aux!=k.end(); aux++){ + if(typeFill!=0 && typeStroke!=0){ + bline_id=new_guid(); + offset_id=new_guid(); + } + if(typeFill==1 || typeFill==2){//region layer + xmlpp::Element *child_fill=root; + if(n==1 && typeFill==2){//open gradient or url (fill) + child_fill=nodeStartBasicLayer(root->add_child("layer")); + } + xmlpp::Element *child_region=child_fill->add_child("layer"); + child_region->set_attribute("type","region"); + child_region->set_attribute("active","true"); + child_region->set_attribute("version","0.1"); + child_region->set_attribute("desc",path_id); + build_param (child_region->add_child("param"),"z_depth","real","0.0000000000"); + build_param (child_region->add_child("param"),"amount","real","1.0000000000"); + build_param (child_region->add_child("param"),"blend_method","integer","0"); + build_color (child_region->add_child("param"),getRed(fill),getGreen(fill),getBlue(fill),atof(fill_opacity.data())*atof(opacity.data())); + if(offset_id.empty()) build_vector (child_region->add_child("param"),"offset",0,0); + else build_vector (child_region->add_child("param"),"offset",0,0,offset_id); + build_param (child_region->add_child("param"),"invert","bool","false"); + build_param (child_region->add_child("param"),"antialias","bool","true"); + build_param (child_region->add_child("param"),"feather","real","0.0000000000"); + build_param (child_region->add_child("param"),"blurtype","integer","1"); + if(fill_rule.compare("evenodd")==0) build_param (child_region->add_child("param"),"winding_style","integer","1"); + else build_param (child_region->add_child("param"),"winding_style","integer","0"); + + build_bline (child_region->add_child("param"),*aux,loop,bline_id); + + if(n==1 && typeFill==2){ //gradient in onto mode (fill) + build_url(child_fill->add_child("layer"),fill,mtx); + } + } + + if(typeStroke==1 || typeStroke==2){ //layer outline + xmlpp::Element *child_stroke=root; + if(n==1 && typeStroke==2){//open gradient in straigth onto (stroke) + child_stroke=nodeStartBasicLayer(root->add_child("layer")); + } + xmlpp::Element *child_outline=child_stroke->add_child("layer"); + child_outline->set_attribute("type","outline"); + child_outline->set_attribute("active","true"); + child_outline->set_attribute("version","0.2"); + child_outline->set_attribute("desc",path_id); + build_param (child_outline->add_child("param"),"z_depth","real","0.0000000000"); + build_param (child_outline->add_child("param"),"amount","real","1.0000000000"); + build_param (child_outline->add_child("param"),"blend_method","integer","0"); + build_color (child_outline->add_child("param"),getRed(stroke),getGreen(stroke),getBlue(stroke),atof(stroke_opacity.data())*atof(opacity.data())); + if(offset_id.empty()) build_vector (child_outline->add_child("param"),"offset",0,0); + else build_vector (child_outline->add_child("param"),"offset",0,0,offset_id); + build_param (child_outline->add_child("param"),"invert","bool","false"); + build_param (child_outline->add_child("param"),"antialias","bool","true"); + build_param (child_outline->add_child("param"),"feather","real","0.0000000000"); + build_param (child_outline->add_child("param"),"blurtype","integer","1"); + //outline in nonzero + build_param (child_outline->add_child("param"),"winding_style","integer","0"); + + build_bline (child_outline->add_child("param"),*aux,loop,bline_id); + + stroke_width=etl::strprintf("%f",getDimension(stroke_width)/kux); + build_param (child_outline->add_child("param"),"width","real",stroke_width); + build_param (child_outline->add_child("param"),"expand","real","0.0000000000"); + if(stroke_linejoin.compare("miter")==0) build_param (child_outline->add_child("param"),"sharp_cusps","bool","true"); + else build_param (child_outline->add_child("param"),"sharp_cusps","bool","false"); + if(stroke_linecap.compare("butt")==0){ + build_param (child_outline->add_child("param"),"round_tip[0]","bool","false"); + build_param (child_outline->add_child("param"),"round_tip[1]","bool","false"); + }else{ + build_param (child_outline->add_child("param"),"round_tip[0]","bool","true"); + build_param (child_outline->add_child("param"),"round_tip[1]","bool","true"); + } + build_param (child_outline->add_child("param"),"loopyness","real","1.0000000000"); + build_param (child_outline->add_child("param"),"homogeneous_width","bool","true"); + + if(n==1 && typeStroke==2){ //gradient in onto mode (stroke) + build_url(child_stroke->add_child("layer"),stroke,mtx); + } + } + } + if(n!=1){//only fill for several canvas in one path + if(typeFill==2){ + build_url(root->add_child("layer"),fill,mtx); + } + } + } +} + +std::vector +Svg_parser::get_tokens_path(String path){ //mini path lexico-parser + std::vector tokens; + String buffer; + int e=0; + unsigned int i=0; + char a; + while(i > +Svg_parser::parser_path_d(String path_d,Matrix* mtx){ + std::list > k; + std::list k1; + float ax,ay,tgx,tgy,tgx2,tgy2;//each method + float actual_x=0,actual_y=0;//for relative methods; + loop=false; + unsigned int i; + std::vector tokens=get_tokens_path(path_d); + for(i=0;ix,k1.back()->y,tgx2,tgy2); + if(isFirst(k1.front(),ax,ay)){ + setTg1(k1.front(),k1.front()->x,k1.front()->y,tgx,tgy); + }else{ + k1.push_back(nuevoVertice (ax,ay)); + setTg1(k1.back(),k1.back()->x,k1.back()->y,tgx,tgy); + setSplit(k1.back(),TRUE); + } + }else if(tokens.at(i).compare("Q")==0){ //absolute quadractic curve + //tg1 and tg2 + i++; tgx=ax=atof(tokens.at(i).data()); + i++; if(tokens.at(i).compare(",")==0) i++; + tgy=ay=atof(tokens.at(i).data()); + //point + i++; ax=atof(tokens.at(i).data()); + i++; if(tokens.at(i).compare(",")==0) i++; + ay=atof(tokens.at(i).data()); + actual_x=ax; + actual_y=ay; + //mtx + if(mtx){ + transformPoint2D(mtx,&ax,&ay); + transformPoint2D(mtx,&tgx,&tgy); + } + //adjust + coor2vect(&ax,&ay); + coor2vect(&tgx,&tgy); + //save + setTg1(k1.back(),k1.back()->x,k1.back()->y,tgx,tgy); + setSplit(k1.back(),FALSE); + k1.push_back(nuevoVertice (ax,ay)); + setTg1(k1.back(),k1.back()->x,k1.back()->y,tgx,tgy); + }else if(tokens.at(i).compare("L")==0){ //absolute line to + //point + i++; ax=atof(tokens.at(i).data()); + i++; if(tokens.at(i).compare(",")==0) i++; + ay=atof(tokens.at(i).data()); + actual_x=ax; + actual_y=ay; + //mtx + if(mtx) transformPoint2D(mtx,&ax,&ay); + //adjust + coor2vect(&ax,&ay); + //save + setTg2(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); + if(isFirst(k1.front(),ax,ay)){ + setTg1(k1.front(),k1.front()->x,k1.front()->y,k1.front()->x,k1.front()->y); + }else{ + k1.push_back(nuevoVertice(ax,ay)); + setTg1(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); + } + }else if(tokens.at(i).compare("l")==0){//relative line to + //point read + i++; ax=atof(tokens.at(i).data()); + i++; if(tokens.at(i).compare(",")==0) i++; + ay=atof(tokens.at(i).data()); + //relative + ax=actual_x+ax; + ay=actual_y+ay; + actual_x=ax; + actual_y=ay; + //mtx + if(mtx) transformPoint2D(mtx,&ax,&ay); + //adjust + coor2vect(&ax,&ay); + //save + setTg2(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); + if(isFirst(k1.front(),ax,ay)){ + setTg1(k1.front(),k1.front()->x,k1.front()->y,k1.front()->x,k1.front()->y); + }else{ + k1.push_back(nuevoVertice(ax,ay)); + setTg1(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); + } + }else if(tokens.at(i).compare("H")==0){//absolute horizontal move + //the same that L but only Horizontal movement + //point + i++; ax=atof(tokens.at(i).data()); + ay=actual_y; + actual_x=ax; + actual_y=ay; + //mtx + if(mtx) transformPoint2D(mtx,&ax,&ay); + //adjust + coor2vect(&ax,&ay); + //save + setTg2(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); + if(isFirst(k1.front(),ax,ay)){ + setTg1(k1.front(),k1.front()->x,k1.front()->y,k1.front()->x,k1.front()->y); + }else{ + k1.push_back(nuevoVertice(ax,ay)); + setTg1(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); + } + }else if(tokens.at(i).compare("h")==0){//horizontal relative + i++; ax=atof(tokens.at(i).data()); + ax=actual_x+ax; + ay=actual_y; + actual_x=ax; + actual_y=ay; + //mtx + if(mtx) transformPoint2D(mtx,&ax,&ay); + //adjust + coor2vect(&ax,&ay); + //save + setTg2(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); + if(isFirst(k1.front(),ax,ay)){ + setTg1(k1.front(),k1.front()->x,k1.front()->y,k1.front()->x,k1.front()->y); + }else{ + k1.push_back(nuevoVertice(ax,ay)); + setTg1(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); + } + }else if(tokens.at(i).compare("V")==0){//vertical absolute + //point + i++; ay=atof(tokens.at(i).data()); + ax=actual_x; + actual_x=ax; + actual_y=ay; + //mtx + if(mtx) transformPoint2D(mtx,&ax,&ay); + //adjust + coor2vect(&ax,&ay); + //save + setTg2(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); + if(isFirst(k1.front(),ax,ay)){ + setTg1(k1.front(),k1.front()->x,k1.front()->y,k1.front()->x,k1.front()->y); + }else{ + k1.push_back(nuevoVertice(ax,ay)); + setTg1(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); + } + }else if(tokens.at(i).compare("v")==0){//relative + //point + i++; ay=atof(tokens.at(i).data()); + ax=actual_x; + ay=actual_y+ay; + actual_x=ax; + actual_y=ay; + //mtx + if(mtx) transformPoint2D(mtx,&ax,&ay); + //adjust + coor2vect(&ax,&ay); + //save + setTg2(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); + if(isFirst(k1.front(),ax,ay)){ + setTg1(k1.front(),k1.front()->x,k1.front()->y,k1.front()->x,k1.front()->y); + }else{ + k1.push_back(nuevoVertice(ax,ay)); + setTg1(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); + } + }else if(tokens.at(i).compare("T")==0){// I don't know what does it + }else if(tokens.at(i).compare("A")==0){//elliptic arc + + //isn't complete support, is only for circles + + //this curve have 6 parameters + //radio + float radio_x,radio_y; + float angle; + bool sweep,large; + //radio + i++; radio_x=atof(tokens.at(i).data()); + i++; if(tokens.at(i).compare(",")==0) i++; + radio_y=atof(tokens.at(i).data()); + //angle + i++; angle=atof(tokens.at(i).data()); + //flags + i++; large=atoi(tokens.at(i).data()); + i++; sweep=atoi(tokens.at(i).data()); + //point + i++; ax=atof(tokens.at(i).data()); + i++; if(tokens.at(i).compare(",")==0) i++; + ay=atof(tokens.at(i).data()); + //how to draw? + if(!large && !sweep){ + //points + tgx2 = actual_x + radio_x*0.5; + tgy2 = actual_y ; + tgx = ax; + tgy = ay + radio_y*0.5; + actual_x=ax; + actual_y=ay; + //transformations + if(mtx){ + transformPoint2D(mtx,&tgx2,&tgy2); + transformPoint2D(mtx,&ax,&ay); + transformPoint2D(mtx,&tgx,&tgy); + } + //adjust + coor2vect(&tgx2,&tgy2); + coor2vect(&ax,&ay); + coor2vect(&tgx,&tgy); + //save + setTg2(k1.back(),k1.back()->x,k1.back()->y,tgx2,tgy2); + if(isFirst(k1.front(),ax,ay)){ + setTg1(k1.front(),k1.front()->x,k1.front()->y,tgx,tgy); + }else{ + k1.push_back(nuevoVertice (ax,ay)); + setTg1(k1.back(),k1.back()->x,k1.back()->y,tgx,tgy); + setSplit(k1.back(),TRUE); + } + }else if(!large && sweep){ + //points + tgx2 = actual_x; + tgy2 = actual_y + radio_y*0.5; + tgx = ax + radio_x*0.5; + tgy = ay ; + actual_x=ax; + actual_y=ay; + //transformations + if(mtx){ + transformPoint2D(mtx,&tgx2,&tgy2); + transformPoint2D(mtx,&ax,&ay); + transformPoint2D(mtx,&tgx,&tgy); + } + //adjust + coor2vect(&tgx2,&tgy2); + coor2vect(&ax,&ay); + coor2vect(&tgx,&tgy); + //save + setTg2(k1.back(),k1.back()->x,k1.back()->y,tgx2,tgy2); + if(isFirst(k1.front(),ax,ay)){ + setTg1(k1.front(),k1.front()->x,k1.front()->y,tgx,tgy); + }else{ + k1.push_back(nuevoVertice (ax,ay)); + setTg1(k1.back(),k1.back()->x,k1.back()->y,tgx,tgy); + setSplit(k1.back(),TRUE); + } + }else if( large && !sweep){//rare + //this need more than one vertex + }else if( large && sweep){//circles in inkscape are made with this kind of arc + if(actual_y==ay){//circles + //intermediate point + int sense=1; + if(actual_x>ax) sense =-1; + float in_x,in_y,in_tgx1,in_tgy1,in_tgx2,in_tgy2; + in_x = (actual_x+ax)/2; + in_y = actual_y - sense*radio_y; + in_tgx1 = in_x - sense*(radio_x*0.5); + in_tgx2 = in_x + sense*(radio_x*0.5); + in_tgy1 = in_y; + in_tgy2 = in_y; + //start/end points + tgx2=actual_x; + tgy2=ay - sense*(radio_y*0.5); + tgx =ax; + tgy =ay - sense*(radio_y*0.5); + + actual_x=ax; + actual_y=ay; + //transformations + if(mtx){ + transformPoint2D(mtx,&tgx2,&tgy2); + transformPoint2D(mtx,&tgx ,&tgy ); + transformPoint2D(mtx,&ax,&ay); + + transformPoint2D(mtx,&in_tgx2,&in_tgy2); + transformPoint2D(mtx,&in_tgx1,&in_tgy1); + transformPoint2D(mtx,&in_x,&in_y); + } + //adjust + coor2vect(&tgx2 , &tgy2); + coor2vect(&ax , &ay ); + coor2vect(&tgx , &tgy ); + + coor2vect(&in_tgx2 , &in_tgy2); + coor2vect(&in_tgx1 , &in_tgy1); + coor2vect(&in_x , &in_y ); + + //save the last tg2 + setTg2(k1.back(),k1.back()->x,k1.back()->y,tgx2,tgy2); + //save the intermediate point + k1.push_back(nuevoVertice (in_x,in_y)); + setTg1(k1.back(),k1.back()->x,k1.back()->y, in_tgx1 , in_tgy1); + setTg2(k1.back(),k1.back()->x,k1.back()->y, in_tgx2 , in_tgy2); + setSplit(k1.back(),TRUE); //this could be changed + //save the new point + if(isFirst(k1.front(),ax,ay)){ + setTg1(k1.front(),k1.front()->x,k1.front()->y,tgx,tgy); + }else{ + k1.push_back(nuevoVertice (ax,ay)); + setTg1(k1.back(),k1.back()->x,k1.back()->y,tgx,tgy); + setSplit(k1.back(),TRUE); + } + } + } + }else if(tokens.at(i).compare("z")==0){ + loop=true; + }else{ + std::cout<<"don't supported: "<(node); + if(!nodeContent){ + xmlpp::Node::NodeList list = node->get_children(); + for(xmlpp::Node::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter){ + Glib::ustring name =(*iter)->get_name(); + if(name.compare("linearGradient")==0){ + parser_linearGradient(*iter); + }else if(name.compare("radialGradient")==0){ + parser_radialGradient(*iter); + } + } + } +} +void +Svg_parser::AdjustPointUrl(){ +/* + if(!lg.empty()){//linealgradient + std::list::iterator aux=lg.begin(); + while(aux!=lg.end()){ + LinearGradient* auxlg=*aux; + coor2vect (&auxlg->x1,&auxlg->y1); + coor2vect (&auxlg->x2,&auxlg->y2); + aux++; + } + } + if(!rg.empty()){//radialgradient + std::list::iterator aux=rg.begin(); + while(aux!=rg.end()){ + RadialGradient* auxrg=*aux; + coor2vect (&auxrg->cx,&auxrg->cy); + auxrg->r= auxrg->r/kux; + aux++; + } + } +*/ +} +std::list* +Svg_parser::find_colorStop(String name){ + if(!name.empty()){ + if(lg.empty()&& rg.empty()) + return NULL; + + String buscar= name; + if(buscar.at(0)=='#') buscar.erase(0,1); + else return NULL; + std::list::iterator aux=lg.begin(); + while(aux!=lg.end()){//only find into linear gradients + if(buscar.compare((*aux)->name)==0){ + return (*aux)->stops; + } + aux++; + } + } + return NULL; +} +void +Svg_parser::build_url(xmlpp::Element* root, String name,Matrix *mtx){ + if(!name.empty()){ + if(lg.empty()&& rg.empty()) + root->get_parent()->remove_child(root); + + int inicio=name.find_first_of("#")+1; + int fin=name.find_first_of(")"); + String buscar= name.substr(inicio,fin-inicio); + bool encontro=false; + if(!lg.empty()){ + std::list::iterator aux=lg.begin(); + while(aux!=lg.end()){ + if(buscar.compare((*aux)->name)==0){ + build_linearGradient (root,*aux,mtx); + encontro=true; + } + aux++; + } + } + if(!encontro && !rg.empty()){ + std::list::iterator aux=rg.begin(); + while(aux!=rg.end()){ + if(buscar.compare((*aux)->name)==0){ + build_radialGradient (root,*aux,mtx); + encontro=true; + } + aux++; + } + } + if(!encontro) + root->get_parent()->remove_child(root); + }else{ + root->get_parent()->remove_child(root); + } +} +void +Svg_parser::build_stop_color(xmlpp::Element* root, std::list *stops){ + std::list::iterator aux_stop=stops->begin(); + while(aux_stop!=stops->end()){ + xmlpp::Element *child=root->add_child("color"); + child->set_attribute("pos",etl::strprintf("%f",(*aux_stop)->pos)); + child->add_child("r")->set_child_text(etl::strprintf("%f",(*aux_stop)->r)); + child->add_child("g")->set_child_text(etl::strprintf("%f",(*aux_stop)->g)); + child->add_child("b")->set_child_text(etl::strprintf("%f",(*aux_stop)->b)); + child->add_child("a")->set_child_text(etl::strprintf("%f",(*aux_stop)->a)); + aux_stop++; + } +} +void +Svg_parser::build_linearGradient(xmlpp::Element* root,LinearGradient* data,Matrix* mtx){ + if(data){ + root->set_attribute("type","linear_gradient"); + root->set_attribute("active","true"); + root->set_attribute("desc","Gradient004"); + build_param (root->add_child("param"),"z_depth","real","0"); + build_param (root->add_child("param"),"amount","real","1"); + //straight onto + build_param (root->add_child("param"),"blend_method","integer","21"); + float x1,y1,x2,y2; + x1=data->x1; + y1=data->y1; + x2=data->x2; + y2=data->y2; + if(mtx){ + transformPoint2D(mtx,&x1,&y1); + transformPoint2D(mtx,&x2,&y2); + } + coor2vect (&x1,&y1); + coor2vect (&x2,&y2); + + build_vector (root->add_child("param"),"p1",x1,y1); + build_vector (root->add_child("param"),"p2",x2,y2); + //gradient link + xmlpp::Element *child=root->add_child("param"); + child->set_attribute("name","gradient"); + build_stop_color (child->add_child("gradient"),data->stops); + build_param (root->add_child("param"),"loop","bool","false"); + build_param (root->add_child("param"),"zigzag","bool","false"); + } +} +void +Svg_parser::build_radialGradient(xmlpp::Element* root,RadialGradient* data,Matrix* mtx){ +//not completed + if(data){ + root->set_attribute("type","radial_gradient"); + root->set_attribute("active","true"); + build_param (root->add_child("param"),"z_depth","real","0"); + build_param (root->add_child("param"),"amount","real","1"); + //straight onto + build_param (root->add_child("param"),"blend_method","integer","21"); + //gradient link + xmlpp::Element *child=root->add_child("param"); + child->set_attribute("name","gradient"); + build_stop_color (child->add_child("gradient"),data->stops); + //here the center point and radio + float cx=data->cx; + float cy=data->cy; + float r =data->r; + //transform + if(mtx){ + transformPoint2D(mtx,&cx,&cy); + } + //adjust + coor2vect (&cx,&cy); + r=r/kux; + build_vector (root->add_child("param"),"center",cx,cy); + build_param (root->add_child("param"),"radius","real",r); + + build_param (root->add_child("param"),"loop","bool","false"); + build_param (root->add_child("param"),"zigzag","bool","false"); + } +} + +void +Svg_parser::parser_linearGradient(const xmlpp::Node* node){ + if(const xmlpp::Element* nodeElement = dynamic_cast(node)){ + Glib::ustring id =nodeElement->get_attribute_value("id"); + float x1 =atof(nodeElement->get_attribute_value("x1").data()); + float y1 =atof(nodeElement->get_attribute_value("y1").data()); + float x2 =atof(nodeElement->get_attribute_value("x2").data()); + float y2 =atof(nodeElement->get_attribute_value("y2").data()); + Glib::ustring link =nodeElement->get_attribute_value("href"); + + std::list *stops; + if(!link.empty()){ + stops=find_colorStop (link); + }else{ + //color stops + stops=new std::list(); + const xmlpp::ContentNode* nodeContent = dynamic_cast(node); + if(!nodeContent){ + xmlpp::Node::NodeList list = node->get_children(); + for(xmlpp::Node::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter){ + Glib::ustring name =(*iter)->get_name(); + if(name.compare("stop")==0){ + const xmlpp::Element* nodeIter = dynamic_cast(*iter); + Glib::ustring style =nodeIter->get_attribute_value("style"); + float offset=atof(nodeIter->get_attribute_value("offset").data()); + String stop_color; + String opacity; + if(!style.empty()){ + extractSubAttribute (style,"stop-color",&stop_color); + extractSubAttribute (style,"stop-opacity",&opacity); + } + if(opacity.empty()) opacity="1"; + if(stop_color.empty()) stop_color="#000000";//black for default :S + stops->push_back(newColorStop(stop_color,atof(opacity.data()),offset)); + } + } + } + } + if(stops) + lg.push_back(newLinearGradient(id,x1,y1,x2,y2,stops)); + } +} + +void +Svg_parser::parser_radialGradient(const xmlpp::Node* node){ + if(const xmlpp::Element* nodeElement = dynamic_cast(node)){ + Glib::ustring id =nodeElement->get_attribute_value("id"); + float cx =atof(nodeElement->get_attribute_value("cx").data()); + float cy =atof(nodeElement->get_attribute_value("cy").data()); + float r =atof(nodeElement->get_attribute_value("r").data()); + Glib::ustring link =nodeElement->get_attribute_value("href");//basic + std::list *stops=NULL; + if(!link.empty()){ + //inkscape always use link, i dont need parser stops here, but it's posible + stops=find_colorStop (link); + } + if(stops) + rg.push_back(newRadialGradient(id,cx,cy,r,stops)); + } +} + +ColorStop* +Svg_parser::newColorStop(String color,float opacity,float pos){ + ColorStop* _stop; + _stop=(ColorStop*)malloc(sizeof(ColorStop)); + float r=getRed(color); + float g=getGreen(color); + float b=getBlue(color); + float a=opacity; + Color ret=adjustGamma(r/255,g/255,b/255,a); + _stop->r=ret.get_r(); + _stop->g=ret.get_g(); + _stop->b=ret.get_b(); + _stop->a=ret.get_a(); + _stop->pos=pos; + return _stop; +} +Color +Svg_parser::adjustGamma(float r,float g,float b,float a){ + Color ret(r,g,b,a); + if(gamma.get_gamma_r()!=1.0){ + if(ret.get_r() < 0) + ret.set_r(-gamma.r_F32_to_F32(-ret.get_r())); + else + ret.set_r(gamma.r_F32_to_F32(ret.get_r())); + } + if(gamma.get_gamma_g()!=1.0){ + if(ret.get_g() < 0) + ret.set_g(-gamma.g_F32_to_F32(-ret.get_g())); + else + ret.set_g(gamma.g_F32_to_F32(ret.get_g())); + } + if(gamma.get_gamma_b()!=1.0){ + if(ret.get_b() < 0) + ret.set_b(-gamma.b_F32_to_F32(-ret.get_b())); + else + ret.set_b(gamma.b_F32_to_F32(ret.get_b())); + } + return ret; +} + +LinearGradient* +Svg_parser::newLinearGradient(String name,float x1,float y1, float x2,float y2,std::list *stops){ + LinearGradient* data; + data=(LinearGradient*)malloc(sizeof(LinearGradient)); + sprintf(data->name,"%s",name.data()); + data->x1=x1; + data->y1=y1; + data->x2=x2; + data->y2=y2; + data->stops=stops; + return data; +} + +RadialGradient* +Svg_parser::newRadialGradient(String name,float cx,float cy,float r,std::list *stops){ + RadialGradient* data; + data=(RadialGradient*)malloc(sizeof(RadialGradient)); + sprintf(data->name,"%s",name.data()); + data->cx=cx; + data->cy=cy; + data->r=r; + data->stops=stops; + return data; +} + +//builds +void +Svg_parser::build_gamma(xmlpp::Element* root,float gamma){ + root->set_attribute("type","colorcorrect"); + root->set_attribute("active","true"); + root->set_attribute("version","0.1"); + root->set_attribute("desc","Gamma"); + build_real (root->add_child("param"),"gamma",gamma); +} +Matrix* +Svg_parser::build_transform(const String transform){ + Matrix* a=NULL; + String tf(transform); + removeIntoS(&tf); + std::vector tokens=tokenize(tf," "); + std::vector::iterator aux=tokens.begin(); + while(aux!=tokens.end()){ + if((*aux).compare(0,9,"translate")==0){ + float dx,dy; + int inicio,fin; + inicio =(*aux).find_first_of("(")+1; + fin =(*aux).find_first_of(","); + dx =atof((*aux).substr(inicio,fin-inicio).data()); + inicio =(*aux).find_first_of(",")+1; + fin =(*aux).size()-1; + dy =atof((*aux).substr(inicio,fin-inicio).data()); + if(matrixVacia(a)) + a=newMatrix(1,0,0,1,dx,dy); + else + multiplyMatrix(&a,newMatrix(1,0,0,1,dx,dy)); + }else if((*aux).compare(0,5,"scale")==0){ + if(matrixVacia(a)) + a=newMatrix(1,0,0,1,0,0); + }else if((*aux).compare(0,6,"rotate")==0){ + float angle,seno,coseno; + int inicio,fin; + inicio =(*aux).find_first_of("(")+1; + fin =(*aux).size()-1; + angle=getRadian (atof((*aux).substr(inicio,fin-inicio).data())); + seno =sin(angle); + coseno =cos(angle); + if(matrixVacia(a)) + a=newMatrix(coseno,seno,-1*seno,coseno,0,0); + else + multiplyMatrix(&a,newMatrix(coseno,seno,-1*seno,coseno,0,0)); + }else if((*aux).compare(0,6,"matrix")==0){ + int inicio =(*aux).find_first_of('(')+1; + int fin =(*aux).find_first_of(')'); + if(matrixVacia(a)) + a=newMatrix((*aux).substr(inicio,fin-inicio)); + else + multiplyMatrix(&a,newMatrix((*aux).substr(inicio,fin-inicio))); + }else{ + a=newMatrix(1,0,0,1,0,0); + } + aux++; + } + return a; +} + +void +Svg_parser::build_translate(xmlpp::Element* root,float dx,float dy){ + root->set_attribute("type","translate"); + root->set_attribute("active","true"); + root->set_attribute("version","0.1"); + build_vector (root->add_child("param"),"origin",dx,dy); +} +void +Svg_parser::build_rotate(xmlpp::Element* root,float dx,float dy,float angle){ + root->set_attribute("type","rotate"); + root->set_attribute("active","true"); + root->set_attribute("version","0.1"); + build_vector (root->add_child("param"),"origin",dx,dy); + build_real (root->add_child("param"),"amount",angle); +} +void +Svg_parser::build_points(xmlpp::Element* root,std::list p){ + root->set_attribute("name","vector_list"); + xmlpp::Element *child=root->add_child("dynamic_list"); + child->set_attribute("type","vector"); + std::list::iterator aux = p.begin(); + while(aux!=p.end()){ + xmlpp::Element *child_entry=child->add_child("entry"); + xmlpp::Element *child_vector=child_entry->add_child("vector"); + child_vector->add_child("x")->set_child_text(etl::strprintf("%f",(*aux)->x)); + child_vector->add_child("y")->set_child_text(etl::strprintf("%f",(*aux)->y)); + aux++; + } +} +void +Svg_parser::build_vertice(xmlpp::Element* root , Vertice *p){ + xmlpp::Element *child_comp=root->add_child("composite"); + child_comp->set_attribute("type","bline_point"); + build_vector (child_comp->add_child("param"),"point",p->x,p->y); + build_param (child_comp->add_child("width"),"","real","1.0000000000"); + build_param (child_comp->add_child("origin"),"","real","0.5000000000"); + if(p->split) build_param (child_comp->add_child("split"),"","bool","true"); + else build_param (child_comp->add_child("split"),"","bool","false"); + //tangente 1 + xmlpp::Element *child_t1=child_comp->add_child("t1"); + xmlpp::Element *child_rc=child_t1->add_child("radial_composite"); + child_rc->set_attribute("type","vector"); + build_param (child_rc->add_child("radius"),"","real",p->radio1); + build_param (child_rc->add_child("theta"),"","angle",p->angle1); + //tangente 2 + xmlpp::Element *child_t2=child_comp->add_child("t2"); + xmlpp::Element *child_rc2=child_t2->add_child("radial_composite"); + child_rc2->set_attribute("type","vector"); + build_param (child_rc2->add_child("radius"),"","real",p->radio2); + build_param (child_rc2->add_child("theta"),"","angle",p->angle2); + +} +void +Svg_parser::build_bline(xmlpp::Element* root,std::list p,bool loop,String blineguid){ + root->set_attribute("name","bline"); + xmlpp::Element *child=root->add_child("bline"); + child->set_attribute("type","bline_point"); + if(loop) + child->set_attribute("loop","true"); + else + child->set_attribute("loop","false"); + if(!blineguid.empty()) child->set_attribute("guid",blineguid); + std::list::iterator aux = p.begin(); + while(aux!=p.end()){ + if(*aux) build_vertice (child->add_child("entry"),*aux); + aux++; + } +} + +void +Svg_parser::build_param(xmlpp::Element* root,String name,String type,String value){ + if(!type.empty() && !value.empty()){ + if(!name.empty()) root->set_attribute("name",name); + xmlpp::Element *child=root->add_child(type); + child->set_attribute("value",value); + }else{ + root->get_parent()->remove_child(root); + } +} +void +Svg_parser::build_param(xmlpp::Element* root,String name,String type,float value){ + if(!type.empty()){ + if(!name.empty()) root->set_attribute("name",name); + xmlpp::Element *child=root->add_child(type); + child->set_attribute("value",etl::strprintf ("%f",value)); + }else{ + root->get_parent()->remove_child(root); + } +} +void +Svg_parser::build_param(xmlpp::Element* root,String name,String type,int value){ + if(!type.empty()){ + if(!name.empty()) root->set_attribute("name",name); + xmlpp::Element *child=root->add_child(type); + char *enteroc=new char[10]; + sprintf(enteroc,"%d",value); + child->set_attribute("value",enteroc); + delete [] enteroc; + }else{ + root->get_parent()->remove_child(root); + } +} + +void +Svg_parser::build_integer(xmlpp::Element* root,String name,int value){ + if(name.compare("")!=0) root->set_attribute("name",name); + xmlpp::Element *child=root->add_child("integer"); + char *enteroc=new char[10]; + sprintf(enteroc,"%d",value); + child->set_attribute("value",enteroc); +} +void +Svg_parser::build_real(xmlpp::Element* root,String name,float value){ + if(name.compare("")!=0) root->set_attribute("name",name); + xmlpp::Element *child=root->add_child("real"); + char *realc=new char[20]; + sprintf(realc,"%f",value); + child->set_attribute("value",realc); +} + +void +Svg_parser::build_color(xmlpp::Element* root,float r,float g,float b,float a){ + if(r>255 || g>255 || b>255 || a>1 || r<0 || g<0 || b<0 || a<0){ + root->get_parent()->remove_child(root); + printf("Color aborted\n"); + return; + } + Color ret=adjustGamma(r/255,g/255,b/255,a); + + root->set_attribute("name","color"); + xmlpp::Element *child=root->add_child("color"); + child->add_child("r")->set_child_text(etl::strprintf("%f",ret.get_r())); + child->add_child("g")->set_child_text(etl::strprintf("%f",ret.get_g())); + child->add_child("b")->set_child_text(etl::strprintf("%f",ret.get_b())); + child->add_child("a")->set_child_text(etl::strprintf("%f",ret.get_a())); +} +void +Svg_parser::build_vector(xmlpp::Element* root,String name,float x,float y){ + + if(name.compare("")!=0) root->set_attribute("name",name); + xmlpp::Element *child=root->add_child("vector"); + child->add_child("x")->set_child_text(etl::strprintf("%f",x)); + child->add_child("y")->set_child_text(etl::strprintf("%f",y)); + +} +void +Svg_parser::build_vector (xmlpp::Element* root,String name,float x,float y,String guid){ + if(name.compare("")!=0) root->set_attribute("name",name); + xmlpp::Element *child=root->add_child("vector"); + if(!guid.empty()) child->set_attribute("guid",guid); + child->add_child("x")->set_child_text(etl::strprintf("%f",x)); + child->add_child("y")->set_child_text(etl::strprintf("%f",y)); +} + +xmlpp::Element* +Svg_parser::nodeStartBasicLayer(xmlpp::Element* root){ + root->set_attribute("type","PasteCanvas"); + root->set_attribute("active","true"); + root->set_attribute("version","0.1"); + root->set_attribute("desc","Composite"); + build_param (root->add_child("param"),"z_depth","real","0"); + build_param (root->add_child("param"),"amount","real","1"); + build_param (root->add_child("param"),"blend_method","integer","0"); + build_vector (root->add_child("param"),"origin",0,0); + xmlpp::Element *child=root->add_child("param"); + child->set_attribute("name","canvas"); + return child->add_child("canvas"); +} + +//metodos extras +void +Svg_parser::coor2vect(float *x,float *y){ + float sx, sy; + sx=*x; + sy=*y; + sy= atof(height.c_str())-sy; + sx= sx - ox; + sy= sy - oy; + sx= sx / kux; + sy= sy / kux; + *x=sx; *y=sy; +} + +void +Svg_parser::setTg1(Vertice *p,float p1x,float p1y,float p2x,float p2y){ + float rd=0,ag=0; + float d1x,d1y,d2x,d2y,dx,dy; + d1x=p1x*60; + d1y=p1y*60; + d2x=p2x*60; + d2y=p2y*60; + dx=d2x-d1x; + dy=d2y-d1y; + dx=dx*3; + dy=dy*3; + dx=dx/60; + dy=dy/60; + rd=sqrt(dx*dx + dy*dy); + if(dx>0 && dy>0){ + ag=PI + atan(dy/dx); + }else if(dx>0 && dy<0){ + ag=PI + atan(dy/dx); + }else if(dx<0 && dy<0){ + ag=atan(dy/dx); + }else if(dx<0 && dy>0){ + ag= 2*PI+atan(dy/dx); + }else if(dx==0 && dy>0){ + ag=-1*PI/2; + }else if(dx==0 && dy<0){ + ag=PI/2; + }else if(dx==0 && dy==0){ + ag=0; + }else if(dx<0 && dy==0){ + ag=0; + }else if(dx>0 && dy==0){ + ag=PI; + } + ag= (ag*180)/PI; + p->radio1=rd; + p->angle1=ag; +} +void +Svg_parser::setTg2(Vertice* p,float p1x,float p1y,float p2x,float p2y){ + float rd=0,ag=0; + float d1x,d1y,d2x,d2y,dx,dy; + d1x=p1x*60; + d1y=p1y*60; + d2x=p2x*60; + d2y=p2y*60; + dx=d2x-d1x; + dy=d2y-d1y; + dx=dx*3; + dy=dy*3; + dx=dx/60; + dy=dy/60; + + rd=sqrt(dx*dx + dy*dy); + if(dx>0 && dy>0){ + ag=PI + atan(dy/dx); + // printf("caso 180-270\n"); + }else if(dx>0 && dy<0){ + ag=PI + atan(dy/dx); + // printf("caso 90-180\n"); + }else if(dx<0 && dy<0){ + ag=atan(dy/dx); + // printf("caso 0-90\n"); + }else if(dx<0 && dy>0){ + ag= 2*PI+atan(dy/dx); + // printf("caso 270-360\n"); + }else if(dx==0 && dy>0){ + ag=-1*PI/2; + }else if(dx==0 && dy<0){ + ag=PI/2; + }else if(dx==0 && dy==0){ + ag=0; + }else if(dx<0 && dy==0){ + ag=0; + }else if(dx>0 && dy==0){ + ag=PI; + } + ag= (ag*180)/PI; + ag=ag-180; + p->radio2=rd; + p->angle2=ag; +} + +void +Svg_parser::setSplit(Vertice* p,bool val){ + if(p!=NULL){ + p->split=val; + } +} +int +Svg_parser::isFirst(Vertice* nodo,float a, float b){ + if(nodo->x==a && nodo->y==b) + return 1; + return 0; +} + +Vertice* +Svg_parser::nuevoVertice(float x,float y){ + Vertice* nuevo; + nuevo=(Vertice*)malloc(sizeof(Vertice)); + nuevo->x=x; + nuevo->y=y; + nuevo->radio1=nuevo->radio2=nuevo->angle1=nuevo->angle2=0; + return nuevo; +} + +int +Svg_parser::extractSubAttribute(const String attribute, String name,String* value){ + int encontro=0; + if(!attribute.empty()){ + String str(attribute); + removeS(&str); + std::vector tokens=tokenize(str,";"); + std::vector::iterator aux=tokens.begin(); + while(aux!=tokens.end()){ + int medio= (*aux).find_first_of(":"); + if((*aux).substr(0,medio).compare(name)==0){ + int fin=(*aux).size(); + *value=(*aux).substr(medio+1,fin-medio); + return 1; + } + aux++; + } + } + return encontro; +} +String +Svg_parser::loadAttribute(String name,const String path_style,const String master_style,const String defaultVal){ + String value; + int fnd=0; + if(!path_style.empty()) + fnd=extractSubAttribute(path_style,name,&value); + if(fnd==0){ + if(!master_style.empty()) + fnd=extractSubAttribute(master_style,name,&value); + if(fnd==0) + value=defaultVal; + } + return value; +} +String +Svg_parser::loadAttribute(String name,const String path_style,const String master_style,const String subattribute,const String defaultVal){ + String value; + int fnd=0; + if(!path_style.empty()) + fnd=extractSubAttribute(path_style,name,&value); + if(fnd==0 && !master_style.empty()) + fnd=extractSubAttribute(master_style,name,&value); + if(fnd==0){ + if(!subattribute.empty()) + value=subattribute; + else + value=defaultVal; + } + return value; +} + +int +Svg_parser::randomLetter(){ + int a=rand()%2; + if(a) return (49 + rand()%9); + else return (65 + rand()%24); +} + +int +Svg_parser::getRed(String hex){ + if(hex.at(0)=='#'){ + return hextodec(hex.substr(1,2)); + }else if(hex.compare(0,3,"rgb")==0 || hex.compare(0,3,"RGB")==0){ + int inicio=hex.find_first_of("(")+1; + int fin =hex.find_last_of(")"); + String aux=tokenize(hex.substr(inicio,fin-inicio),",").at(0); + return atoi(aux.data()); + } + return 0; +} +int +Svg_parser::getGreen(String hex){ + if(hex.at(0)=='#'){ + return hextodec(hex.substr(3,2)); + }else if(hex.compare(0,3,"rgb")==0 || hex.compare(0,3,"RGB")==0){ + int inicio=hex.find_first_of("(")+1; + int fin =hex.find_last_of(")"); + String aux=tokenize(hex.substr(inicio,fin-inicio),",").at(1); + return atoi(aux.data()); + } + return 0; +} +int +Svg_parser::getBlue(String hex){ + if(hex.at(0)=='#'){ + return hextodec(hex.substr(5,2)); + }else if(hex.compare(0,3,"rgb")==0 || hex.compare(0,3,"RGB")==0){ + int inicio=hex.find_first_of("(")+1; + int fin =hex.find_last_of(")"); + String aux=tokenize(hex.substr(inicio,fin-inicio),",").at(2); + return atoi(aux.data()); + } + return 0; +} +int +Svg_parser::hextodec(String hex){ + int result=0; + if(!hex.empty()){ + int top=hex.size(); + int ihex[top]; + int i=0; + while(ia=a->a; data->b=a->b; data->c=a->c; + data->d=a->d; data->e=a->e; data->f=a->f; + return data; +} +Matrix* +Svg_parser::newMatrix(float a,float b,float c,float d,float e,float f){ + Matrix* data; + data=(Matrix*)malloc(sizeof(Matrix)); + data->a=a; data->b=b; data->c=c; + data->d=d; data->e=e; data->f=f; + return data; +} +Matrix* +Svg_parser::newMatrix(const String mvector){ + if(!mvector.empty()){ + Matrix* data=(Matrix*)malloc(sizeof(Matrix)); + std::vector tokens=tokenize(mvector,","); + if(tokens.size()!=6) return newMatrix(1,0,0,1,0,0); + data->a=atof(tokens.at(0).data()); + data->b=atof(tokens.at(1).data()); + data->c=atof(tokens.at(2).data()); + data->d=atof(tokens.at(3).data()); + data->e=atof(tokens.at(4).data()); + data->f=atof(tokens.at(5).data()); + return data; + }else{ + return newMatrix(1,0,0,1,0,0); + } +} +void +Svg_parser::transformPoint2D(Matrix *mtx,float *a,float *b){ + float auxa,auxb; + auxa=0; + auxb=0; + auxa= (*a)*(mtx->a) + (*b)*(mtx->c) + (mtx->e); + auxb= (*a)*(mtx->b) + (*b)*(mtx->d) + (mtx->f); + *a=auxa; + *b=auxb; + return; +} +void +Svg_parser::composeMatrix(Matrix **mtx,Matrix* mtx1,Matrix* mtx2){ + Matrix* aux=newMatrix(0,0,0,0,0,0); + aux->a=(mtx1->a)*(mtx2->a)+(mtx1->c)*(mtx2->b); + aux->b=(mtx1->b)*(mtx2->a)+(mtx1->d)*(mtx2->b); + aux->c=(mtx1->a)*(mtx2->c)+(mtx1->c)*(mtx2->d); + aux->d=(mtx1->b)*(mtx2->c)+(mtx1->d)*(mtx2->d); + aux->e=(mtx1->a)*(mtx2->e)+(mtx1->c)*(mtx2->f)+(mtx1->e); + aux->f=(mtx1->b)*(mtx2->e)+(mtx1->d)*(mtx2->f)+(mtx1->f); + *mtx=aux; +} +void +Svg_parser::multiplyMatrix(Matrix **mtx1,Matrix *mtx2){ + Matrix* aux=newMatrix(0,0,0,0,0,0); + aux->a=((*mtx1)->a)*(mtx2->a)+((*mtx1)->c)*(mtx2->b); + aux->b=((*mtx1)->b)*(mtx2->a)+((*mtx1)->d)*(mtx2->b); + aux->c=((*mtx1)->a)*(mtx2->c)+((*mtx1)->c)*(mtx2->d); + aux->d=((*mtx1)->b)*(mtx2->c)+((*mtx1)->d)*(mtx2->d); + aux->e=((*mtx1)->a)*(mtx2->e)+((*mtx1)->c)*(mtx2->f)+((*mtx1)->e); + aux->f=((*mtx1)->b)*(mtx2->e)+((*mtx1)->d)*(mtx2->f)+((*mtx1)->f); + (*mtx1)->a=aux->a; + (*mtx1)->b=aux->b; + (*mtx1)->c=aux->c; + (*mtx1)->d=aux->d; + (*mtx1)->e=aux->e; + (*mtx1)->f=aux->f; +} +bool +Svg_parser::matrixVacia(Matrix *mtx){ + if(mtx == NULL) return true; + return false; +} + +float +Svg_parser::getRadian(float sexa){ + return (sexa*2*PI)/360; +} +void +Svg_parser::removeS(String *input){ + for(unsigned int i=0;isize();i++){ + if(input->at(i)==' '){ + input->erase(i,1); + } + } +} +void +Svg_parser::removeIntoS(String *input){ + bool into=false; + for(unsigned int i=0;isize();i++){ + if(input->at(i)=='('){ + into=true; + }else if(input->at(i)==')'){ + into=false; + }else if(into && input->at(i)==' '){ + input->erase(i,1); + } + } +} +std::vector +Svg_parser::tokenize(const String& str,const String& delimiters){ + std::vector tokens; + String::size_type lastPos = str.find_first_not_of(delimiters, 0); + String::size_type pos = str.find_first_of(delimiters, lastPos); + while (String::npos != pos || String::npos != lastPos){ + tokens.push_back(str.substr(lastPos, pos - lastPos)); + lastPos = str.find_first_not_of(delimiters, pos); + pos = str.find_first_of(delimiters, lastPos); + } + return tokens; +} +String +Svg_parser::new_guid(){ + uid++; + return GUID::hasher(uid).get_string(); +} + diff --git a/synfig-core/src/modules/mod_svg/svg_parser.h b/synfig-core/src/modules/mod_svg/svg_parser.h new file mode 100644 index 0000000..694add7 --- /dev/null +++ b/synfig-core/src/modules/mod_svg/svg_parser.h @@ -0,0 +1,211 @@ +/* === S Y N F I G ========================================================= */ +/*! \file svg_parser.h +** \brief Implementation of the Svg parser +** \brief Based on SVG XML specification 1.1 +** \brief See: http://www.w3.org/TR/xml11/ for deatils +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** Copyright (c) 2009 Carlos A. Sosa Navarro +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SVG_PARSER_H +#define __SVG_PARSER_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig{ + +typedef struct matrix_t{ + float a,c,e; + float b,d,f; +}Matrix; + +typedef struct stop_t{ + float r,g,b; + float a; + float pos; +}ColorStop; +typedef struct linear_g{ + char name[40]; + float x1,x2,y1,y2; + std::list *stops; //paradas de color +}LinearGradient; +typedef struct radial_g{ + char name[40]; + float cx,cy;//center point + //float fx,fy; + //focus, i dont see it in synfig + //if this value is omitted then will be = cx,cy + float r; //radio radius + std::list *stops; //paradas de color +}RadialGradient; + +typedef struct url_t{ + int type; + void* data; +}URL; + +typedef struct vertice_t{ + float x,y; + float radio1,angle1; + float radio2,angle2; + bool split; +}Vertice; +class Svg_parser +{ + //this is inkscape oriented in some cases +public: + +private: + Gamma gamma; + String filepath; + String id_name; + xmlpp::DomParser parser; + xmlpp::Document document; + xmlpp::Element* nodeRoot;//output + Glib::ustring width; + Glib::ustring height; + Glib::ustring docname; + int uid; + int kux,set_canvas; + float ox,oy; + bool loop;//aux :D + //urls + std::list lg; + std::list rg; + +public: + Svg_parser(); + Canvas::Handle load_svg_canvas(std::string _filepath,String &errors, String &warnings); + //String get_id(); + //void set_id(String source); + +private: //parser bucle + void parser_node(const xmlpp::Node* node); + //parser headers + void parser_svg(const xmlpp::Node* node); + void parser_canvas(const xmlpp::Node* node); + //layers + void parser_layer(const xmlpp::Node* node,xmlpp::Element* root,String parent_style,Matrix* mtx_parent); + void parser_path(const xmlpp::Node* node,xmlpp::Element* root,String parent_style,Matrix* mtx_parent); + void parser_polygon(const xmlpp::Node* node,xmlpp::Element* root,String parent_style,Matrix* mtx_parent); + void parser_rect(const xmlpp::Node* node,xmlpp::Element* root,String parent_style,Matrix* mtx_parent); + //defs + void parser_defs(const xmlpp::Node* node); + void parser_linearGradient(const xmlpp::Node* node); + void parser_radialGradient(const xmlpp::Node* node); + ColorStop* newColorStop(String color,float opacity,float pos); + LinearGradient* newLinearGradient(String name,float x1,float y1, float x2,float y2,std::list *stops); + RadialGradient* newRadialGradient(String name,float cx,float cy,float r,std::list *stops); + //builds urls + void AdjustPointUrl(); + std::list* find_colorStop(String name); + void build_url(xmlpp::Element* root, String name,Matrix *mtx); + void build_linearGradient(xmlpp::Element* root,LinearGradient* data,Matrix* mtx); + void build_radialGradient(xmlpp::Element* root,RadialGradient* data,Matrix* mtx); + void build_stop_color(xmlpp::Element* root, std::list *stops); + void build_stop_color(xmlpp::Element* root, std::list *stops,String name); + Color adjustGamma(float r,float g,float b,float a); + //builds + void build_gamma(xmlpp::Element* root,float gamma); + Matrix* build_transform(const String transform); + void build_rotate(xmlpp::Element* root,float dx,float dy,float angle); + void build_translate(xmlpp::Element* root,float dx,float dy); + void build_points(xmlpp::Element* root,std::list p); + void build_vertice(xmlpp::Element* root , Vertice *p); + void build_bline(xmlpp::Element* root,std::list p,bool loop,String blinegui); + void build_param (xmlpp::Element* root,String name,String type,String value); + void build_param (xmlpp::Element* root,String name,String type,float value); + void build_param (xmlpp::Element* root,String name,String type,int value); + void build_integer (xmlpp::Element* root,String name, int value); + void build_real (xmlpp::Element* root,String name,float value); + void build_vector (xmlpp::Element* root,String name,float x,float y); + void build_vector (xmlpp::Element* root,String name,float x,float y,String guid); + void build_color(xmlpp::Element* root,float r,float g,float b,float a); + xmlpp::Element* nodeStartBasicLayer(xmlpp::Element* root); + + //points,etc + void coor2vect(float *x,float *y); + void setTg2(Vertice* p,float p1x,float p1y,float p2x,float p2y); + void setTg1(Vertice *p,float p1x,float p1y,float p2x,float p2y); + void setSplit(Vertice* p,bool val); + int isFirst(Vertice* nodo,float a, float b); + Vertice* nuevoVertice(float x,float y); + + //matrix operations + Matrix* newMatrix(float a,float b,float c,float d,float e,float f); + Matrix* newMatrix(const String mvector); + Matrix* newMatrix(Matrix *a); + void transformPoint2D(Matrix *mtx,float *a,float *b); + bool matrixVacia(Matrix* mtx); + void composeMatrix(Matrix **mtx,Matrix *mtx1,Matrix *mtx2); + void multiplyMatrix(Matrix **mtx1,Matrix *mtx2); + float getRadian(float sexa); + //attributes + int extractSubAttribute(const String attribute, String name,String* value); + String loadAttribute(String name,const String path_style,const String master_style,const String subattribute,const String defaultVal); + String loadAttribute(String name,const String path_style,const String master_style,const String defaultVal); + std::vector get_tokens_path(String path); + std::list > parser_path_d(String path_d,Matrix* mtx); + int randomLetter(); + int getRed(String hex); + int getGreen(String hex); + int getBlue(String hex); + int hextodec(String hex); + float getDimension(const String ac); + //funciones string + void removeS(String *input); + void removeIntoS(String *input); + std::vector tokenize(const String& str,const String& delimiters); + void get_canvas_name(String _filepath); + String new_guid(); +}; +// END of Svg_parser class + +/* === E X T E R N S ======================================================= */ + +extern Canvas::Handle open_svg(std::string _filepath,String &errors, String &warnings); + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_svg/unmod_svg.nsh b/synfig-core/src/modules/mod_svg/unmod_svg.nsh new file mode 100644 index 0000000..839ddba --- /dev/null +++ b/synfig-core/src/modules/mod_svg/unmod_svg.nsh @@ -0,0 +1,9 @@ +Section "un.mod_svg" + Delete "$INSTDIR\lib\synfig\modules\mod_svg.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR" +SectionEnd + + diff --git a/synfig-core/src/modules/mod_yuv420p/Makefile.am b/synfig-core/src/modules/mod_yuv420p/Makefile.am new file mode 100644 index 0000000..09058a3 --- /dev/null +++ b/synfig-core/src/modules/mod_yuv420p/Makefile.am @@ -0,0 +1,34 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +moduledir = @MODULE_DIR@ + +module_LTLIBRARIES = \ + libmod_yuv420p.la + +libmod_yuv420p_la_SOURCES = \ + main.cpp \ + trgt_yuv.cpp \ + trgt_yuv.h + +libmod_yuv420p_la_LDFLAGS = \ + -module \ + -no-undefined \ + -avoid-version + +libmod_yuv420p_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ + +libmod_yuv420p_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @SYNFIG_LIBS@ + + +EXTRA_DIST= mod_yuv420p.nsh unmod_yuv420p.nsh diff --git a/synfig-core/src/modules/mod_yuv420p/main.cpp b/synfig-core/src/modules/mod_yuv420p/main.cpp new file mode 100644 index 0000000..3f4bdf8 --- /dev/null +++ b/synfig-core/src/modules/mod_yuv420p/main.cpp @@ -0,0 +1,54 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mod_yuv420p/main.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "trgt_yuv.h" +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(mod_yuv420p) + MODULE_NAME("YUV420P Target") + MODULE_DESCRIPTION("writeme") + MODULE_AUTHOR("Robert B. Quattlebaum") + MODULE_VERSION("1.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(mod_yuv420p) + BEGIN_TARGETS + TARGET(yuv) + END_TARGETS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mod_yuv420p/mod_yuv420p.nsh b/synfig-core/src/modules/mod_yuv420p/mod_yuv420p.nsh new file mode 100644 index 0000000..a7bb68b --- /dev/null +++ b/synfig-core/src/modules/mod_yuv420p/mod_yuv420p.nsh @@ -0,0 +1,21 @@ +; The stuff to install +Section "mod_yuv420p" Sec_mod_yuv420p + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=mod_yuv420p.dll "src\modules\mod_yuv420p\.libs\libmod_yuv420p.dll" + + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "mod_yuv420p" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd + diff --git a/synfig-core/src/modules/mod_yuv420p/trgt_yuv.cpp b/synfig-core/src/modules/mod_yuv420p/trgt_yuv.cpp new file mode 100644 index 0000000..bad2dca --- /dev/null +++ b/synfig-core/src/modules/mod_yuv420p/trgt_yuv.cpp @@ -0,0 +1,236 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_yuv.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_TARGET + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "trgt_yuv.h" +#include +#include +#include +#include +#endif + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === M A C R O S ========================================================= */ + +#define Y_FLOOR (16) +#define Y_CEIL (235) +#define Y_RANGE (Y_CEIL-Y_FLOOR) + +#define UV_FLOOR (16) +#define UV_CEIL (240) +#define UV_RANGE (UV_CEIL-UV_FLOOR) + +/* === G L O B A L S ======================================================= */ + +SYNFIG_TARGET_INIT(yuv); +SYNFIG_TARGET_SET_NAME(yuv,"yuv420p"); +SYNFIG_TARGET_SET_EXT(yuv,"yuv"); +SYNFIG_TARGET_SET_VERSION(yuv,"0.1"); +SYNFIG_TARGET_SET_CVS_ID(yuv,"$Id$"); + +/* === M E T H O D S ======================================================= */ + +yuv::yuv(const char *FILENAME): + filename(FILENAME), + file( (filename=="-")?stdout:fopen(filename.c_str(),POPEN_BINARY_WRITE_TYPE) ), + dithering(true) +{ + // YUV420P doesn't have an alpha channel + set_remove_alpha(); +} + +yuv::~yuv() +{ +} + +bool +yuv::init() +{ + if (!file) + return false; + + fprintf(file.get(), "YUV4MPEG2 W%d H%d F%d:1 Ip\n", + desc.get_w(), desc.get_h(), + round_to_int(desc.get_frame_rate())); + return true; +} + +bool +yuv::set_rend_desc(RendDesc *given_desc) +{ + given_desc->clear_flags(); + + // Make sure our width is divisible by two + given_desc->set_w(given_desc->get_w()*2/2); + given_desc->set_h(given_desc->get_h()*2/2); + + desc=*given_desc; + + // Set up our surface + surface.set_wh(desc.get_w(),desc.get_h()); + + return true; +} + +bool +yuv::start_frame(synfig::ProgressCallback */*callback*/) +{ + fprintf(file.get(), "FRAME\n"); + return static_cast(file); +} + +Color * +yuv::start_scanline(int x) +{ + return surface[x]; +} + +bool +yuv::end_scanline() +{ + return static_cast(file); +} + +void +yuv::end_frame() +{ + const int w=desc.get_w(),h=desc.get_h(); + int x,y; + + assert(file); + + // Output Y' channel, adjusting + // the gamma as we go + for(y=0;yy+1) + { + surface[y+1][x-1]+=error * ((float)3/(float)16); + surface[y+1][x]+=error * ((float)5/(float)16); + if(surface.get_w()>x+1) + surface[y+1][x+1]+=error * ((float)1/(float)16); + } + if(surface.get_w()>x+1) + surface[y][x+1]+=error * ((float)7/(float)16); + } + + fputc(i,file.get()); + } + + + // Create new super-sampled surface + Surface sm_surface(w/2,h/2); + for(y=0;yy+1) + { + sm_surface[y+1][x-1]+=error * ((float)3/(float)16); + sm_surface[y+1][x]+=error * ((float)5/(float)16); + if(sm_surface.get_w()>x+1) + sm_surface[y+1][x+1]+=error * ((float)1/(float)16); + } + if(sm_surface.get_w()>x+1) + sm_surface[y][x+1]+=error * ((float)7/(float)16); + } + fputc(i,file.get()); + } + + // Output V channel + for(y=0;yy+1) + { + sm_surface[y+1][x-1]+=error * ((float)3/(float)16); + sm_surface[y+1][x]+=error * ((float)5/(float)16); + if(sm_surface.get_w()>x+1) + sm_surface[y+1][x+1]+=error * ((float)1/(float)16); + } + if(sm_surface.get_w()>x+1) + sm_surface[y][x+1]+=error * ((float)7/(float)16); + } + fputc(i,file.get()); + } + + // Flush out the frame + fflush(file.get()); +} diff --git a/synfig-core/src/modules/mod_yuv420p/trgt_yuv.h b/synfig-core/src/modules/mod_yuv420p/trgt_yuv.h new file mode 100644 index 0000000..f176607 --- /dev/null +++ b/synfig-core/src/modules/mod_yuv420p/trgt_yuv.h @@ -0,0 +1,71 @@ +/* === S Y N F I G ========================================================= */ +/*! \file trgt_yuv.h +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TRGT_PPM_H +#define __SYNFIG_TRGT_PPM_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class yuv : public synfig::Target_Scanline +{ + SYNFIG_TARGET_MODULE_EXT + +private: + + synfig::String filename; + synfig::SmartFILE file; + synfig::Surface surface; + + bool dithering; + +public: + + yuv(const char *filename); + virtual ~yuv(); + + virtual bool init(); + virtual bool set_rend_desc(synfig::RendDesc *desc); + virtual bool start_frame(synfig::ProgressCallback *cb); + virtual void end_frame(); + + virtual synfig::Color* start_scanline(int scanline); + virtual bool end_scanline(); +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/mod_yuv420p/unmod_yuv420p.nsh b/synfig-core/src/modules/mod_yuv420p/unmod_yuv420p.nsh new file mode 100644 index 0000000..954b275 --- /dev/null +++ b/synfig-core/src/modules/mod_yuv420p/unmod_yuv420p.nsh @@ -0,0 +1,8 @@ +Section "un.mod_yuv420p" + Delete "$INSTDIR\lib\synfig\modules\mod_yuv420p.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/modules/mptr_mplayer/Makefile.am b/synfig-core/src/modules/mptr_mplayer/Makefile.am new file mode 100644 index 0000000..7612078 --- /dev/null +++ b/synfig-core/src/modules/mptr_mplayer/Makefile.am @@ -0,0 +1,30 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +moduledir = @MODULE_DIR@ + +module_LTLIBRARIES = libmptr_mplayer.la + +libmptr_mplayer_la_SOURCES = \ + main.cpp \ + mptr_mplayer.cpp \ + mptr_mplayer.h + +libmptr_mplayer_la_LDFLAGS = \ + -module \ + -no-undefined \ + -avoid-version + +libmptr_mplayer_la_LIBADD = \ + ../../synfig/libsynfig.la \ + @SYNFIG_LIBS@ + + + diff --git a/synfig-core/src/modules/mptr_mplayer/main.cpp b/synfig-core/src/modules/mptr_mplayer/main.cpp new file mode 100644 index 0000000..8638ae3 --- /dev/null +++ b/synfig-core/src/modules/mptr_mplayer/main.cpp @@ -0,0 +1,58 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mptr_mplayer/main.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_MODULE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "mptr_mplayer.h" +#endif + +/* === E N T R Y P O I N T ================================================= */ + +MODULE_DESC_BEGIN(mptr_mplayer) + MODULE_NAME("MPlayer Movie Importer") + MODULE_DESCRIPTION("ARGH") + MODULE_AUTHOR("Robert B. Quattlebaum") + MODULE_VERSION("1.0") + MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) +MODULE_DESC_END + +MODULE_INVENTORY_BEGIN(mptr_mplayer) + BEGIN_IMPORTERS + IMPORTER_EXT(mplayer_mptr,"avi") + IMPORTER_EXT(mplayer_mptr,"mpg") + IMPORTER_EXT(mplayer_mptr,"mpeg") + IMPORTER_EXT(mplayer_mptr,"mov") + IMPORTER_EXT(mplayer_mptr,"rm") + END_IMPORTERS +MODULE_INVENTORY_END diff --git a/synfig-core/src/modules/mptr_mplayer/mptr_mplayer.cpp b/synfig-core/src/modules/mptr_mplayer/mptr_mplayer.cpp new file mode 100644 index 0000000..9e3d547 --- /dev/null +++ b/synfig-core/src/modules/mptr_mplayer/mptr_mplayer.cpp @@ -0,0 +1,133 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mptr_mplayer.cpp +** \brief ppm Target Module +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include "mptr_mplayer.h" +#include +#include +#include +#include +#include +#endif + +/* === M A C R O S ========================================================= */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + +const char mplayer_mptr::Name[]="avi"; +const char mplayer_mptr::Ext[]="avi"; + +/* === M E T H O D S ======================================================= */ + +Importer * +mplayer_mptr::New(const char *file) +{ + return new mplayer_mptr(file); +} + +mplayer_mptr::mplayer_mptr(const char *file) +{ + filename=file; +} + +mplayer_mptr::~mplayer_mptr() +{ +} + +bool +mplayer_mptr::GetFrame(Time time, synfig::Surface &surface, synfig::ProgressCallback *) +{ + +#error This code has vulnerabilites: arbitrary shell command execution and tmpfile issues + + int ret; + ret=system( + strprintf("/usr/local/bin/mencoder \"%s\" -ovc rawrgb -ss %f -endpos 0 -nosound -o /tmp/tmp.synfig.rgbdata | grep \"VIDEO\" > /tmp/tmp.synfig.size", + filename.c_str(), + time + ).c_str() + ); + /* + if(ret!=0) + { + cerr<<"mencoder execution failed."< +#include +#include "string.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class mplayer_mptr : public synfig::Importer +{ +public: +private: + String filename; + +public: + mplayer_mptr(const char *filename); + ~mplayer_mptr(); + + + static const char Name[]; + static const char Ext[]; + + virtual bool GetFrame(synfig::Time time, synfig::Surface &, synfig::ProgressCallback *); + + static synfig::Importer *New(const char *filename); +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/modules/synfig_modules.cfg.in b/synfig-core/src/modules/synfig_modules.cfg.in new file mode 100644 index 0000000..899e295 --- /dev/null +++ b/synfig-core/src/modules/synfig_modules.cfg.in @@ -0,0 +1,18 @@ +example +mod_gif +mod_imagemagick +mod_magickpp +mod_mng +lyr_std +mod_noise +mod_filter +mod_ffmpeg +mod_bmp +mod_dv +mod_png +mod_ppm +mod_openexr +mod_jpeg +mod_libavcodec +mod_yuv420p +mod_svg diff --git a/synfig-core/src/modules/template.nsh b/synfig-core/src/modules/template.nsh new file mode 100644 index 0000000..d702aa5 --- /dev/null +++ b/synfig-core/src/modules/template.nsh @@ -0,0 +1,21 @@ +; The stuff to install +Section "@MODNAME@" Sec_@MODNAME@ + +; SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\lib\synfig\modules" + + ; Put file there + File /oname=@MODNAME@.dll "src\modules\@MODNAME@\.libs\lib@MODNAME@.dll" + + + FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a + FileSeek $0 0 END + FileWrite $0 "@MODNAME@" + FileWriteByte $0 "13" + FileWriteByte $0 "10" + FileClose $0 + +SectionEnd + diff --git a/synfig-core/src/modules/untemplate.nsh b/synfig-core/src/modules/untemplate.nsh new file mode 100644 index 0000000..7736e30 --- /dev/null +++ b/synfig-core/src/modules/untemplate.nsh @@ -0,0 +1,8 @@ +Section "un.@MODNAME@" + Delete "$INSTDIR\lib\synfig\modules\@MODNAME@.dll" + RMDir "$INSTDIR\lib\synfig\modules" + RMDir "$INSTDIR\lib\synfig" + RMDir "$INSTDIR\lib" + RMDir "$INSTDIR" +SectionEnd + diff --git a/synfig-core/src/synfig/Makefile.am b/synfig-core/src/synfig/Makefile.am new file mode 100644 index 0000000..4ed8b13 --- /dev/null +++ b/synfig-core/src/synfig/Makefile.am @@ -0,0 +1,312 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src \ + @INCLTDL@ + +EXTRA_DIST = \ + surfacenew.cpp \ + pch.h \ + synfig.nsh + + +LAYERHEADERS = \ + layer_bitmap.h \ + layer_composite.h \ + layer_duplicate.h \ + layer_mime.h \ + layer_motionblur.h \ + layer_pastecanvas.h \ + layer_polygon.h \ + layer_shape.h \ + layer_solidcolor.h + +LAYERSOURCES = \ + layer_bitmap.cpp \ + layer_composite.cpp \ + layer_duplicate.cpp \ + layer_mime.cpp \ + layer_motionblur.cpp \ + layer_pastecanvas.cpp \ + layer_polygon.cpp \ + layer_shape.cpp \ + layer_solidcolor.cpp + + +TARGETHEADERS = \ + target_multi.h \ + target_null.h \ + target_null_tile.h \ + target_scanline.h \ + target_tile.h + +TARGETSOURCES = \ + target_multi.cpp \ + target_null.cpp \ + target_null_tile.cpp \ + target_scanline.cpp \ + target_tile.cpp + + +IMPORTERHEADERS = \ + listimporter.h + +IMPORTERSOURCES = \ + listimporter.cpp + + +VALUENODEHEADERS = \ + valuenode_add.h \ + valuenode_and.h \ + valuenode_anglestring.h \ + valuenode_animated.h \ + valuenode_atan2.h \ + valuenode_bline.h \ + valuenode_blinecalctangent.h \ + valuenode_blinecalcvertex.h \ + valuenode_blinecalcwidth.h \ + valuenode_blinereversetangent.h \ + valuenode_compare.h \ + valuenode_composite.h \ + valuenode_const.h \ + valuenode_cos.h \ + valuenode_dotproduct.h \ + valuenode_duplicate.h \ + valuenode_dynamiclist.h \ + valuenode_exp.h \ + valuenode_gradientcolor.h \ + valuenode_gradientrotate.h \ + valuenode_greyed.h \ + valuenode_integer.h \ + valuenode_intstring.h \ + valuenode_join.h \ + valuenode_linear.h \ + valuenode_log.h \ + valuenode_not.h \ + valuenode_or.h \ + valuenode_pow.h \ + valuenode_radialcomposite.h \ + valuenode_range.h \ + valuenode_realstring.h \ + valuenode_reciprocal.h \ + valuenode_reference.h \ + valuenode_repeat_gradient.h \ + valuenode_scale.h \ + valuenode_segcalctangent.h \ + valuenode_segcalcvertex.h \ + valuenode_sine.h \ + valuenode_step.h \ + valuenode_stripes.h \ + valuenode_subtract.h \ + valuenode_switch.h \ + valuenode_timedswap.h \ + valuenode_timeloop.h \ + valuenode_timestring.h \ + valuenode_twotone.h \ + valuenode_vectorangle.h \ + valuenode_vectorlength.h \ + valuenode_vectorx.h \ + valuenode_vectory.h + +VALUENODESOURCES = \ + valuenode_add.cpp \ + valuenode_and.cpp \ + valuenode_anglestring.cpp \ + valuenode_animated.cpp \ + valuenode_atan2.cpp \ + valuenode_bline.cpp \ + valuenode_blinecalctangent.cpp \ + valuenode_blinecalcvertex.cpp \ + valuenode_blinecalcwidth.cpp \ + valuenode_blinereversetangent.cpp \ + valuenode_compare.cpp \ + valuenode_composite.cpp \ + valuenode_const.cpp \ + valuenode_cos.cpp \ + valuenode_dotproduct.cpp \ + valuenode_duplicate.cpp \ + valuenode_dynamiclist.cpp \ + valuenode_exp.cpp \ + valuenode_gradientcolor.cpp \ + valuenode_gradientrotate.cpp \ + valuenode_greyed.cpp \ + valuenode_integer.cpp \ + valuenode_intstring.cpp \ + valuenode_join.cpp \ + valuenode_linear.cpp \ + valuenode_log.cpp \ + valuenode_not.cpp \ + valuenode_or.cpp \ + valuenode_pow.cpp \ + valuenode_radialcomposite.cpp \ + valuenode_range.cpp \ + valuenode_realstring.cpp \ + valuenode_reciprocal.cpp \ + valuenode_reference.cpp \ + valuenode_repeat_gradient.cpp \ + valuenode_scale.cpp \ + valuenode_segcalctangent.cpp \ + valuenode_segcalcvertex.cpp \ + valuenode_sine.cpp \ + valuenode_step.cpp \ + valuenode_stripes.cpp \ + valuenode_subtract.cpp \ + valuenode_switch.cpp \ + valuenode_timedswap.cpp \ + valuenode_timeloop.cpp \ + valuenode_timestring.cpp \ + valuenode_twotone.cpp \ + valuenode_vectorangle.cpp \ + valuenode_vectorlength.cpp \ + valuenode_vectorx.cpp \ + valuenode_vectory.cpp + + +VALUEHEADERS = \ + blinepoint.h \ + gradient.h \ + value.h + +VALUESOURCES = \ + blinepoint.cpp \ + gradient.cpp \ + value.cpp + + +SYNFIGHEADERS = \ + angle.h \ + canvasbase.h \ + general.h \ + guidset.h \ + interpolation.h \ + nodebase.h \ + protocol.h \ + quick_rng.h \ + real.h \ + releases.h \ + segment.h \ + smartfile.h \ + string.h \ + string_decl.h \ + surfacenew.h \ + synfig.h \ + types.h \ + vector.h \ + version.h \ + activepoint.h \ + blur.h \ + canvas.h \ + color.h \ + context.h \ + curve_helper.h \ + curveset.h \ + distance.h \ + exception.h \ + gamma.h \ + guid.h \ + importer.h \ + keyframe.h \ + layer.h \ + loadcanvas.h \ + main.h \ + module.h \ + mutex.h \ + node.h \ + palette.h \ + paramdesc.h \ + polynomial_root.h \ + rect.h \ + renddesc.h \ + render.h \ + savecanvas.h \ + surface.h \ + target.h \ + time.h \ + timepointcollect.h \ + transform.h \ + uniqueid.h \ + valuenode.h \ + waypoint.h + +SYNFIGSOURCES = \ + activepoint.cpp \ + blur.cpp \ + canvas.cpp \ + color.cpp \ + context.cpp \ + curve_helper.cpp \ + curveset.cpp \ + distance.cpp \ + exception.cpp \ + gamma.cpp \ + guid.cpp \ + importer.cpp \ + keyframe.cpp \ + layer.cpp \ + loadcanvas.cpp \ + main.cpp \ + module.cpp \ + mutex.cpp \ + node.cpp \ + palette.cpp \ + paramdesc.cpp \ + polynomial_root.cpp \ + rect.cpp \ + renddesc.cpp \ + render.cpp \ + savecanvas.cpp \ + surface.cpp \ + target.cpp \ + time.cpp \ + timepointcollect.cpp \ + transform.cpp \ + uniqueid.cpp \ + valuenode.cpp \ + waypoint.cpp + + +lib_LTLIBRARIES = libsynfig.la + +libsynfig_la_SOURCES = \ + $(VALUEHEADERS) \ + $(VALUESOURCES) \ + $(LAYERSOURCES) \ + $(LAYERHEADERS) \ + $(TARGETHEADERS) \ + $(TARGETSOURCES) \ + $(VALUENODEHEADERS) \ + $(VALUENODESOURCES) \ + $(SYNFIGHEADERS) \ + $(SYNFIGSOURCES) \ + $(IMPORTERHEADERS) \ + $(IMPORTERSOURCES) + +libsynfig_la_LIBADD = \ + @LIBLTDL@ \ + @SYNFIG_LIBS@ \ + @LIBADD_DL@ + +libsynfig_la_CXXFLAGS = \ + @SYNFIG_CFLAGS@ \ + -DLIBDIR="\"@libdir@\"" \ + -DSYSCONFDIR="\"@sysconfdir@\"" + +libsynfig_la_LDFLAGS = \ + -export-dynamic \ + -no-undefined \ + -version-info 0:0:0 + + +include_synfigdir = @synfigincludedir@/synfig + +include_synfig_HEADERS = \ + $(SYNFIGHEADERS) \ + $(LAYERHEADERS) \ + $(TARGETHEADERS) \ + $(VALUENODEHEADERS) \ + $(IMPORTERHEADERS) \ + $(VALUEHEADERS) diff --git a/synfig-core/src/synfig/activepoint.cpp b/synfig-core/src/synfig/activepoint.cpp new file mode 100644 index 0000000..13bb6ba --- /dev/null +++ b/synfig-core/src/synfig/activepoint.cpp @@ -0,0 +1,55 @@ +/* === S Y N F I G ========================================================= */ +/*! \file activepoint.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "activepoint.h" +#include "guid.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +synfig::GUID +Activepoint::get_guid()const +{ + return GUID::hasher(get_uid()); +} diff --git a/synfig-core/src/synfig/activepoint.h b/synfig-core/src/synfig/activepoint.h new file mode 100644 index 0000000..74e2edc --- /dev/null +++ b/synfig-core/src/synfig/activepoint.h @@ -0,0 +1,91 @@ +#include +/* === S Y N F I G ========================================================= */ +/*! \file activepoint.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_ACTIVEPOINT_H +#define __SYNFIG_ACTIVEPOINT_H + +/* === H E A D E R S ======================================================= */ + +#include "time.h" +#include "uniqueid.h" +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { +class GUID; +class ValueNode; + +struct Activepoint : public UniqueID +{ +private: + etl::loose_handle parent_; + int index; + +public: + //! Time of the activepoint + Time time; + + //! Priority + int priority; + + //! Does this activepoint turn the entry on, or off? + bool state; + + bool operator<(const Activepoint& rhs) { return time &get_parent_value_node()const { return parent_; } + void set_parent_value_node(const etl::loose_handle &x) { parent_=x; } + + int get_parent_index()const { return index; } + void set_parent_index(int x) { index=x; } + + GUID get_guid()const; +}; // END of struct ValueNode_BLine::Activepoint + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/angle.h b/synfig-core/src/synfig/angle.h new file mode 100644 index 0000000..d351766 --- /dev/null +++ b/synfig-core/src/synfig/angle.h @@ -0,0 +1,49 @@ +/* === S Y N F I G ========================================================= */ +/*! \file angle.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_ANGLE_H +#define __SYNFIG_ANGLE_H + +/* === H E A D E R S ======================================================= */ + +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/*! \typedef Angle +** \todo writeme +*/ +typedef etl::angle Angle; + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/blinepoint.cpp b/synfig-core/src/synfig/blinepoint.cpp new file mode 100644 index 0000000..4291bbf --- /dev/null +++ b/synfig-core/src/synfig/blinepoint.cpp @@ -0,0 +1,63 @@ +/* === S Y N F I G ========================================================= */ +/*! \file blinepoint.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "blinepoint.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +void +synfig::BLinePoint::reverse() +{ + if(split_tangent_) + { + std::swap(tangent_[0],tangent_[1]); + tangent_[0]=-tangent_[0]; + tangent_[1]=-tangent_[1]; + } + else + { + tangent_[0]=-tangent_[0]; + tangent_[1]=-tangent_[1]; + } +} diff --git a/synfig-core/src/synfig/blinepoint.h b/synfig-core/src/synfig/blinepoint.h new file mode 100644 index 0000000..3a75d4b --- /dev/null +++ b/synfig-core/src/synfig/blinepoint.h @@ -0,0 +1,92 @@ +/* === S Y N F I G ========================================================= */ +/*! \file blinepoint.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_BLINEPOINT_H +#define __SYNFIG_BLINEPOINT_H + +/* === H E A D E R S ======================================================= */ + +#include "vector.h" +#include "uniqueid.h" +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class BLinePoint : public UniqueID +{ +private: + Point vertex_; + Vector tangent_[2]; + float width_; + float origin_; + bool split_tangent_; + +public: + + BLinePoint(): + vertex_(Point(0,0)), + width_(0.01), + origin_(0.0), + split_tangent_(false) + { tangent_[0] = Point(0,0); tangent_[1] = Point(0,0); } + + const Point& get_vertex()const { return vertex_; } + void set_vertex(const Point& x) { vertex_=x; } + + + const Vector& get_tangent1()const { return tangent_[0]; } + const Vector& get_tangent2()const { return split_tangent_?tangent_[1]:tangent_[0]; } + void set_tangent(const Vector& x) { tangent_[0]=tangent_[1]=x; } + void set_tangent1(const Vector& x) { tangent_[0]=x; } + void set_tangent2(const Vector& x) { tangent_[1]=x; } + + + const float& get_width()const { return width_; } + void set_width(float x) { width_=x; } + + // We store the origin offset by 0.5 so that + // can have the origin set to the default by zeroing + // out the structure. + float get_origin()const { return origin_+0.5f; } + void set_origin(float x) { origin_=x-0.5f; } + + + const bool& get_split_tangent_flag()const { return split_tangent_; } + void set_split_tangent_flag(bool x=true) { split_tangent_=x; } + + void reverse(); + +}; // END of class BLinePoint + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/blur.cpp b/synfig-core/src/synfig/blur.cpp new file mode 100644 index 0000000..392ef71 --- /dev/null +++ b/synfig-core/src/synfig/blur.cpp @@ -0,0 +1,1204 @@ +/* === S Y N F I G ========================================================= */ +/*! \file synfig/blur.cpp +** \brief Blur Implementation File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#include "blur.h" + +#include +#include + +#include +#include +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ +Point Blur::operator()(const Point &pos) const +{ + Point blurpos(pos); + + switch(type) + { + case CROSS: + if(rand()%2) + { + if(size[0]) + blurpos[0]+=(Vector::value_type)( (signed)(RAND_MAX/2)-(signed)rand() )/(Vector::value_type)(RAND_MAX) * size[0]; + } + else + { + if(size[1]) + blurpos[1]+=(Vector::value_type)( (signed)(RAND_MAX/2)-(signed)rand() )/(Vector::value_type)(RAND_MAX) * size[1]; + } + break; + + case DISC: + { + Angle theta=Angle::rotations((float)rand()/(float)RAND_MAX); + Vector::value_type mag=(float)rand()/(float)RAND_MAX; + Vector vect((float)Angle::cos(theta).get()*mag,(float)Angle::sin(theta).get()*mag); + + blurpos[0]+=vect[0]*size[0]; + blurpos[1]+=vect[1]*size[1]; + } + break; + + case FASTGAUSSIAN: + case GAUSSIAN: + // Not quite a true gaussian blur, + // but the results are close enough for me. + if(size[0]) + { + blurpos[0]+=(Vector::value_type)( (signed)(RAND_MAX/2)-(signed)rand() )/(Vector::value_type)(RAND_MAX) * size[0]*3/4; + blurpos[0]+=(Vector::value_type)( (signed)(RAND_MAX/2)-(signed)rand() )/(Vector::value_type)(RAND_MAX) * size[0]*3/4; + } + if(size[1]) + { + blurpos[1]+=(Vector::value_type)( (signed)(RAND_MAX/2)-(signed)rand() )/(Vector::value_type)(RAND_MAX) * size[1]*3/4; + blurpos[1]+=(Vector::value_type)( (signed)(RAND_MAX/2)-(signed)rand() )/(Vector::value_type)(RAND_MAX) * size[1]*3/4; + } + break; + + case BOX: + default: + if(size[0]) + blurpos[0]+=(Vector::value_type)( (signed)(RAND_MAX/2)-(signed)rand() )/(Vector::value_type)(RAND_MAX) * size[0]; + if(size[1]) + blurpos[1]+=(Vector::value_type)( (signed)(RAND_MAX/2)-(signed)rand() )/(Vector::value_type)(RAND_MAX) * size[1]; + break; + } + + return blurpos; +} + +Point Blur::operator()(synfig::Real x, synfig::Real y) const +{ + return (*this)(Point(x,y)); +} + +//blur functions to make my life easier + +template +static inline T zero() +{ + return (T)0; +} + +template <> +inline Color zero() +{ + return Color::alpha(); +} + +template +static void GuassianBlur_2x2(etl::surface &surface) +{ + int x,y; + T Tmp1,Tmp2,SR0; + + T *SC0=new T[surface.get_w()]; + + memcpy(SC0,surface[0],surface.get_w()*sizeof(T)); + + for(y=0;y +static void GuassianBlur_3x3(etl::surface &surface) +{ + int x,y,u,v,w,h; + T Tmp1,Tmp2,SR0,SR1; + + w=surface.get_w(); + h=surface.get_h(); + + T *SC0=new T[w+1]; + T *SC1=new T[w+1]; + + // Setup the row buffers + for(x=0;x=h) + v=h-1; + else + v=y; + + SR0=SR1=surface[y][0]; + for(x=0;x<=w;x++) + { + if(x>=w) + u=w-1; + else + u=x; + + // Row Machine + Tmp1=surface[v][u]; + Tmp2=SR0+Tmp1; + SR0=Tmp1; + Tmp1=SR1+Tmp2; + SR1=Tmp2; + + // Column Machine + Tmp2=SC0[x]+Tmp1; + SC0[x]=Tmp1; + if(y&&x) + surface[y-1][x-1]=(SC1[x]+Tmp2)/16; + SC1[x]=Tmp2; + } + } + + delete [] SC0; + delete [] SC1; +} + +template +inline static void GaussianBlur_5x5_(etl::surface &surface,T *SC0,T *SC1,T *SC2,T *SC3) +{ + int x,y,u,v,w,h; + T Tmp1,Tmp2,SR0,SR1,SR2,SR3; + + w=surface.get_w(); + h=surface.get_h(); + + // Setup the row buffers + for(x=0;x=h) + v=h-1; + else + v=y; + + SR0=SR1=SR2=SR3=0; + SR0=surface[v][0]*1.5; + for(x=0;x=w) + u=w-1; + else + u=x; + + // Row Machine + Tmp1=surface[v][u]; + Tmp2=SR0+Tmp1; + SR0=Tmp1; + Tmp1=SR1+Tmp2; + SR1=Tmp2; + Tmp2=SR2+Tmp1; + SR2=Tmp1; + Tmp1=SR3+Tmp2; + SR3=Tmp2; + + // Column Machine + Tmp2=SC0[x]+Tmp1; + SC0[x]=Tmp1; + Tmp1=SC1[x]+Tmp2; + SC1[x]=Tmp2; + Tmp2=SC2[x]+Tmp1; + SC2[x]=Tmp1; + if(y>1&&x>1) + surface[y-2][x-2]=(SC3[x]+Tmp2)/256; + SC3[x]=Tmp2; + } + } + +} + +template +inline static void GaussianBlur_5x5(etl::surface &surface) +{ + int w=surface.get_w(); + + T *SC0=new T[w+2]; + T *SC1=new T[w+2]; + T *SC2=new T[w+2]; + T *SC3=new T[w+2]; + + GaussianBlur_5x5_(surface,SC0,SC1,SC2,SC3); + + delete [] SC0; + delete [] SC1; + delete [] SC2; + delete [] SC3; +} + +template +static void GuassianBlur_nxn(etl::surface &surface,int n) +{ + int x,y,u,v,w,h; + int half_n=n/2,i; + T inv_divisor=pow(2.0,(n-1)); + T Tmp1,Tmp2; + inv_divisor=1.0/(inv_divisor*inv_divisor); + + w=surface.get_w(); + h=surface.get_h(); + + T SR[n-1]; + T *SC[n-1]; + + for(i=0;i=h) + v=h-1; + else + v=y; + + memset(SR,0,(n-1)*sizeof(T)); + +// SR[0]=surface[v][0]*(2.0-1.9/n); + + for(x=0;x=w) + u=w-1; + else + u=x; + + Tmp1=surface[v][u]; + // Row Machine + for(i=0;i=half_n&&x>=half_n) + surface[y-half_n][x-half_n]=(SC[n-2][x]+Tmp2)*inv_divisor; + SC[n-2][x]=Tmp2; + } + } + + for(i=0;i +static void GuassianBlur_2x1(etl::surface &surface) +{ + int x,y; + AT Tmp1,Tmp2,SR0; + + for(y=0;y +static void GuassianBlur_3x1(etl::surface &surface) +{ + int x,y; + AT Tmp1,Tmp2,SR0,SR1; + + for(y=0;y +static void GuassianBlur_1x2(etl::surface &surface) +{ + int x,y; + AT Tmp1,Tmp2,SR0; + + for(x=0;x(); + for(y=0;y +static void GuassianBlur_1x3(etl::surface &surface) +{ + int x,y; + AT Tmp1,Tmp2,SR0,SR1; + + for(x=0;x2) + { + int x2,y2; + Surface tmp_surface(worksurface); + + for(y=0;y1.0) + continue; + + //cap the pixel indices to inside the surface + int u= x+x2, + v= y+y2; + + if( u < 0 ) u = 0; + if( u >= w ) u = w-1; + + if( v < 0 ) v = 0; + if( v >= h ) v = h-1; + + //accumulate the color, and # of pixels added in + color += tmp_surface[v][u]; + total++; + } + } + + //blend the color with the original color + //if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + worksurface[y][x]=color/total; + //else + // worksurface[y][x]=Color::blend(color/total,tmp_surface[y][x],get_amount(),get_blend_method()); + } + if(!blurcall.amount_complete(y,h)) + { + //if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); + return false; + } + } + break; + } + + //if we don't qualify for disc blur just use box blur + } + + case Blur::BOX: // B O X ------------------------------------------------------- + { + //horizontal part + //synfig::info("Blur: Starting Box blur (surface valid %d)", (int)surface_valid(worksurface)); + + Surface temp_surface; + temp_surface.set_wh(w,h); + + if(size[0]) + { + int length = halfsizex; + length=std::max(1,length); + + //synfig::info("Blur: hbox blur work -> temp %d", length); + etl::hbox_blur(worksurface.begin(),worksurface.end(),length,temp_surface.begin()); + } + else temp_surface = worksurface; + //synfig::info("Blur: hbox finished"); + + //vertical part + //Surface temp_surface2; + //temp_surface2.set_wh(w,h); + + if(size[1]) + { + int length = halfsizey; + length = std::max(1,length); + + //synfig::info("Blur: vbox blur temp -> work %d",length); + etl::vbox_blur(temp_surface.begin(),temp_surface.end(),length,worksurface.begin()); + } + else worksurface = temp_surface; + //synfig::info("Blur: vbox finished"); + + //blend with the original surface + /*int x,y; + for(y=0;y=4 && bh>=4) + { + etl::gaussian_blur_5x5_(gauss_surface->begin(),gauss_surface->get_w(),gauss_surface->get_h(),SC0,SC1,SC2,SC3); + bw-=4,bh-=4; + } + else + if(bw>=2 && bh>=2) + { + etl::gaussian_blur_3x3(gauss_surface->begin(),gauss_surface->end()); + bw-=2,bh-=2; + } + else + if(bw>=1 && bh>=1) + { + GuassianBlur_2x2(*gauss_surface); + bw--,bh--; + } + + //synfig::warning("Didn't crash yet bi - %d",i++); + } + while(bw) + { + if(!blurcall.amount_complete(max-(bw+bh),max))return false; + if(bw>=2) + { + GuassianBlur_3x1(*gauss_surface); + bw-=2; + } + else + if(bw>=1) + { + GuassianBlur_2x1(*gauss_surface); + bw--; + } + //synfig::warning("Didn't crash yet bi - %d",i++); + } + while(bh) + { + if(!blurcall.amount_complete(max-(bw+bh),max))return false; + if(bh>=2) + { + GuassianBlur_1x3(*gauss_surface); + bh-=2; + } + else + if(bh>=1) + { + GuassianBlur_1x2(*gauss_surface); + bh--; + } + //synfig::warning("Didn't crash yet bi - %d",i++); + } + + delete [] SC0; + delete [] SC1; + delete [] SC2; + delete [] SC3; + + /*if(get_amount()!=1.0 || get_blend_method()!=Color::BLEND_STRAIGHT) + { + int x,y; + for(y=0;yset_wh(renddesc.get_w(),renddesc.get_h()); + out.set_wh(w,h); + + //divide out the alpha + for(y=0;y &surface, + const synfig::Vector &resolution, + etl::surface &out) const +{ + int w = surface.get_w(), + h = surface.get_h(); + + if(w == 0 || h == 0 || resolution[0] == 0 || resolution[1] == 0) return false; + + const Real pw = resolution[0]/w, + ph = resolution[1]/h; + + int halfsizex = (int) (abs(size[0]*.5/pw) + 1), + halfsizey = (int) (abs(size[1]*.5/ph) + 1); + int x,y; + + SuperCallback blurcall(cb,0,5000,5000); + + etl::surface worksurface(surface); + + //don't need to premultiply because we are dealing with ONLY alpha + + switch(type) + { + case Blur::DISC: // D I S C ---------------------------------------------------------- + { + int bw = halfsizex; + int bh = halfsizey; + + if(size[0] && size[1] && w*h>2) + { + int x2,y2; + etl::surface tmp_surface(worksurface); + + for(y=0;y1.0) + continue; + + //cap the pixel indices to inside the surface + int u= x+x2, + v= y+y2; + + if( u < 0 ) u = 0; + if( u >= w ) u = w-1; + + if( v < 0 ) v = 0; + if( v >= h ) v = h-1; + + //accumulate the color, and # of pixels added in + a += tmp_surface[v][u]; + total++; + } + } + + //blend the color with the original color + //if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + worksurface[y][x]=a/total; + //else + // worksurface[y][x]=Color::blend(color/total,tmp_surface[y][x],get_amount(),get_blend_method()); + } + if(!blurcall.amount_complete(y,h)) + { + //if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); + return false; + } + } + break; + } + + //if we don't qualify for disc blur just use box blur + } + + case Blur::BOX: // B O X ------------------------------------------------------- + { + //horizontal part + etl::surface temp_surface; + temp_surface.set_wh(w,h); + + if(size[0]) + { + int length = halfsizex; + length=std::max(1,length); + + etl::hbox_blur(worksurface.begin(),worksurface.end(),length,temp_surface.begin()); + } + else temp_surface = worksurface; + + //vertical part + //etl::surface temp_surface2; + //temp_surface2.set_wh(w,h); + + if(size[1]) + { + int length = halfsizey; + length = std::max(1,length); + etl::vbox_blur(temp_surface.begin(),temp_surface.end(),length,worksurface.begin()); + } + else worksurface = temp_surface; + + //blend with the original surface + /*int x,y; + for(y=0;y temp_surface; + temp_surface.set_wh(w,h); + + //etl::surface temp_surface2; + //temp_surface2.set_wh(w,h); + + //horizontal part + if(size[0]) + { + Real length=abs((float)w/(resolution[0]))*size[0]*0.5+1; + length=std::max(1.0,length); + + //two box blurs produces: 1 2 1 + etl::hbox_blur(worksurface.begin(),w,h,(int)(length*3/4),temp_surface.begin()); + etl::hbox_blur(temp_surface.begin(),w,h,(int)(length*3/4),worksurface.begin()); + } + //else temp_surface2=worksurface; + + //vertical part + if(size[1]) + { + Real length=abs((float)h/(resolution[1]))*size[1]*0.5+1; + length=std::max(1.0,length); + + //two box blurs produces: 1 2 1 on the horizontal 1 2 1 + etl::vbox_blur(worksurface.begin(),w,h,(int)(length*3/4),temp_surface.begin()); + etl::vbox_blur(temp_surface.begin(),w,h,(int)(length*3/4),worksurface.begin()); + } + //else temp_surface2=temp_surface2; + + /*int x,y; + for(y=0;y temp_surface; + temp_surface.set_wh(worksurface.get_w(),worksurface.get_h()); + + if(size[0]) + { + int length = halfsizex; + length = std::max(1,length); + + etl::hbox_blur(worksurface.begin(),worksurface.end(),length,temp_surface.begin()); + } + else temp_surface = worksurface; + + //vertical part + etl::surface temp_surface2; + temp_surface2.set_wh(worksurface.get_w(),worksurface.get_h()); + + if(size[1]) + { + int length = halfsizey; + length = std::max(1,length); + + etl::vbox_blur(worksurface.begin(),worksurface.end(),length,temp_surface2.begin()); + } + else temp_surface2 = worksurface; + + //blend the two together + int x,y; + + for(y=0;y temp_surface; + etl::surface *gauss_surface; + + //if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + gauss_surface = &worksurface; + /*else + { + temp_surface = worksurface; + gauss_surface = &temp_surface; + }*/ + + /* Squaring the pw and ph values + is necessary to insure consistent + results when rendered to different + resolutions. + Unfortunately, this automatically + squares our rendertime. + There has got to be a faster way... + */ + pw=pw*pw; + ph=ph*ph; + + int bw = (int)(abs(pw)*size[0]*GAUSSIAN_ADJUSTMENT+0.5); + int bh = (int)(abs(ph)*size[1]*GAUSSIAN_ADJUSTMENT+0.5); + int max=bw+bh; + + float *SC0=new float[w+2]; + float *SC1=new float[w+2]; + float *SC2=new float[w+2]; + float *SC3=new float[w+2]; + + memset(SC0,0,(w+2)*sizeof(float)); + memset(SC0,0,(w+2)*sizeof(float)); + memset(SC0,0,(w+2)*sizeof(float)); + memset(SC0,0,(w+2)*sizeof(float)); + + //int i = 0; + + while(bw&&bh) + { + if(!blurcall.amount_complete(max-(bw+bh),max))return false; + + if(bw>=4 && bh>=4) + { + etl::gaussian_blur_5x5_(gauss_surface->begin(),gauss_surface->get_w(),gauss_surface->get_h(),SC0,SC1,SC2,SC3); + bw-=4,bh-=4; + } + else + if(bw>=2 && bh>=2) + { + etl::gaussian_blur_3x3(gauss_surface->begin(),gauss_surface->end()); + bw-=2,bh-=2; + } + else + if(bw>=1 && bh>=1) + { + GuassianBlur_2x2(*gauss_surface); + bw--,bh--; + } + } + + while(bw) + { + if(!blurcall.amount_complete(max-(bw+bh),max))return false; + if(bw>=2) + { + GuassianBlur_3x1(*gauss_surface); + bw-=2; + } + else + if(bw>=1) + { + GuassianBlur_2x1(*gauss_surface); + bw--; + } + } + + while(bh) + { + if(!blurcall.amount_complete(max-(bw+bh),max))return false; + if(bh>=2) + { + GuassianBlur_1x3(*gauss_surface); + bh-=2; + } + else + if(bh>=1) + { + GuassianBlur_1x2(*gauss_surface); + bh--; + } + } + + delete [] SC0; + delete [] SC1; + delete [] SC2; + delete [] SC3; + + /*if(get_amount()!=1.0 || get_blend_method()!=Color::BLEND_STRAIGHT) + { + int x,y; + for(y=0;yset_wh(renddesc.get_w(),renddesc.get_h()); + out.set_wh(w,h); + + //divide out the alpha - don't need to cause we rock + out = worksurface; + + //we are FRIGGGIN done.... + blurcall.amount_complete(100,100); + + return true; +} + +/* === E N T R Y P O I N T ================================================= */ diff --git a/synfig-core/src/synfig/blur.h b/synfig-core/src/synfig/blur.h new file mode 100644 index 0000000..5d1c801 --- /dev/null +++ b/synfig-core/src/synfig/blur.h @@ -0,0 +1,90 @@ +/* === S Y N F I G ========================================================= */ +/*! \file synfig/blur.h +** \brief Blur Helper Header file +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_BLUR_HELPER_H +#define __SYNFIG_BLUR_HELPER_H + +/* === H E A D E R S ======================================================= */ +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ +namespace synfig { + class ProgressCallback; +} + +class Blur +{ +public: + enum Type + { + BOX =0, + FASTGAUSSIAN =1, + CROSS =2, + GAUSSIAN =3, + DISC =4, + + FORCE_DWORD = 0x8fffffff + }; + +private: + synfig::Point size; + int type; + + synfig::ProgressCallback *cb; + +public: + synfig::Point & set_size(const synfig::Point &v) { return (size = v); } + const synfig::Point & get_size() const { return size; } + synfig::Point & get_size() { return size; } + + int & set_type(const int &t) { return (type = t); } + const int & get_type() const { return type; } + int & get_type() { return type; } + + Blur() {} + Blur(const synfig::Point &s, int t, synfig::ProgressCallback *callb=0):size(s), type(t), cb(callb) {} + Blur(synfig::Real sx, synfig::Real sy, int t, synfig::ProgressCallback *callb = 0): size(sx,sy), type(t), cb(callb) {} + + //Parametric Blur + synfig::Point operator()(const synfig::Point &p) const; + synfig::Point operator()(synfig::Real x, synfig::Real y) const; + + //Surface based blur + // input surface can be the same as output surface, + // though both have to be the same size + bool operator()(const synfig::Surface &surface, const synfig::Vector &resolution, synfig::Surface &out) const; + + bool operator()(const etl::surface &surface, const synfig::Vector &resolution, etl::surface &out) const; + //bool operator()(const etl::surface &surface, const synfig::Vector &resolution, etl::surface &out) const; +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/canvas.cpp b/synfig-core/src/synfig/canvas.cpp new file mode 100644 index 0000000..2bbb743 --- /dev/null +++ b/synfig-core/src/synfig/canvas.cpp @@ -0,0 +1,1408 @@ +/* === S Y N F I G ========================================================= */ +/*! \file canvas.cpp +** \brief Canvas Class Member Definitions +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_NO_ANGLE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "layer.h" +#include "canvas.h" +#include +#include "exception.h" +#include "time.h" +#include "context.h" +#include "layer_pastecanvas.h" +#include "loadcanvas.h" +#include + +#endif + +using namespace synfig; +using namespace etl; +using namespace std; + +namespace synfig { extern Canvas::Handle open_canvas(const String &filename, String &errors, String &warnings); }; + +/* === M A C R O S ========================================================= */ + +#define ALLOW_CLONE_NON_INLINE_CANVASES + +struct _CanvasCounter +{ + static int counter; + ~_CanvasCounter() + { + if(counter) + synfig::error("%d canvases not yet deleted!",counter); + } +} _canvas_counter; + +int _CanvasCounter::counter(0); + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +Canvas::Canvas(const String &id): + id_ (id), + version_ (CURRENT_CANVAS_VERSION), + cur_time_ (0), + is_inline_ (false), + is_dirty_ (true), + op_flag_ (false) +{ + _CanvasCounter::counter++; + clear(); +} + +void +Canvas::on_changed() +{ + is_dirty_=true; + Node::on_changed(); +} + +Canvas::~Canvas() +{ + // we were having a crash where pastecanvas layers were still + // refering to a canvas after it had been destroyed; this code + // will stop the pastecanvas layers from refering to the canvas + // before the canvas is destroyed + + // the set_sub_canvas(0) ends up deleting the parent-child link, + // which deletes the current element from the set we're iterating + // through, so we have to make sure we've incremented the iterator + // before we mess with the pastecanvas + std::set::iterator iter = parent_set.begin(); + while (iter != parent_set.end()) + { + Layer_PasteCanvas* paste_canvas = dynamic_cast(*iter); + iter++; + if(paste_canvas) + paste_canvas->set_sub_canvas(0); + else + warning("destroyed canvas has a parent that is not a pastecanvas - please report if repeatable"); + } + + //if(is_inline() && parent_) assert(0); + _CanvasCounter::counter--; + clear(); + begin_delete(); +} + +Canvas::iterator +Canvas::end() +{ + return CanvasBase::end()-1; +} + +Canvas::const_iterator +Canvas::end()const +{ + return CanvasBase::end()-1; +} + +Canvas::reverse_iterator +Canvas::rbegin() +{ + return CanvasBase::rbegin()+1; +} + +Canvas::const_reverse_iterator +Canvas::rbegin()const +{ + return CanvasBase::rbegin()+1; +} + +int +Canvas::size()const +{ + return CanvasBase::size()-1; +} + +void +Canvas::clear() +{ + while(!empty()) + { + Layer::Handle layer(front()); + //if(layer->count()>2)synfig::info("before layer->count()=%d",layer->count()); + + erase(begin()); + //if(layer->count()>1)synfig::info("after layer->count()=%d",layer->count()); + } + //CanvasBase::clear(); + + // We need to keep a blank handle at the + // end of the image list, and acts at + // the bottom. Without it, the layers + // would just continue going when polled + // for a color. + CanvasBase::push_back(Layer::Handle()); + + changed(); +} + +bool +Canvas::empty()const +{ + return CanvasBase::size()<=1; +} + +Layer::Handle & +Canvas::back() +{ + return *(CanvasBase::end()-1); +} + +const Layer::Handle & +Canvas::back()const +{ + return *(CanvasBase::end()-1); +} + +Context +Canvas::get_context()const +{ + return begin(); +} + +const ValueNodeList & +Canvas::value_node_list()const +{ + if(is_inline() && parent_) + return parent_->value_node_list(); + return value_node_list_; +} + +KeyframeList & +Canvas::keyframe_list() +{ + if(is_inline() && parent_) + return parent_->keyframe_list(); + return keyframe_list_; +} + +const KeyframeList & +Canvas::keyframe_list()const +{ + if(is_inline() && parent_) + return parent_->keyframe_list(); + return keyframe_list_; +} + +etl::handle +Canvas::find_layer(const Point &pos) +{ + return get_context().hit_check(pos); +} + +static bool +valid_id(const String &x) +{ + static const char bad_chars[]=" :#@$^&()*"; + unsigned int i; + + if(!x.empty() && x[0]>='0' && x[0]<='9') + return false; + + for(i=0;i(*this).cur_time_=t; + + is_dirty_=false; + get_context().set_time(t); + } + is_dirty_=false; +} + +Canvas::LooseHandle +Canvas::get_root()const +{ + return parent_?parent_->get_root().get():const_cast(this); +} + +int +Canvas::get_depth(etl::handle layer)const +{ + const_iterator iter; + int i(0); + for(iter=begin();iter!=end();++iter,i++) + { + if(layer==*iter) + return i; + } + return -1; +} + +String +Canvas::get_relative_id(etl::loose_handle x)const +{ + if(x->get_root()==this) + return ":"; + if(is_inline() && parent_) + return parent_->_get_relative_id(x); + return _get_relative_id(x); +} + +String +Canvas::_get_relative_id(etl::loose_handle x)const +{ + if(is_inline() && parent_) + return parent_->_get_relative_id(x); + + if(x.get()==this) + return String(); + + if(parent()==x.get()) + return get_id(); + + String id; + + const Canvas* canvas=this; + + for(;!canvas->is_root();canvas=canvas->parent().get()) + id=':'+canvas->get_id()+id; + + if(x && get_root()!=x->get_root()) + { + //String file_name=get_file_name(); + //String file_path=x->get_file_path(); + + String file_name; + if(is_absolute_path(get_file_name())) + file_name=etl::relative_path(x->get_file_path(),get_file_name()); + else + file_name=get_file_name(); + + // If the path of X is inside of file_name, + // then remove it. + //if(file_name.size()>file_path.size()) + // if(file_path==String(file_name,0,file_path.size())) + // file_name.erase(0,file_path.size()+1); + + id=file_name+'#'+id; + } + + return id; +} + +ValueNode::Handle +Canvas::find_value_node(const String &id) +{ + return + ValueNode::Handle::cast_const( + const_cast(this)->find_value_node(id) + ); +} + +ValueNode::ConstHandle +Canvas::find_value_node(const String &id)const +{ + if(is_inline() && parent_) + return parent_->find_value_node(id); + + if(id.empty()) + throw Exception::IDNotFound("Empty ID"); + + // If we do not have any resolution, then we assume that the + // request is for this immediate canvas + if(id.find_first_of(':')==string::npos && id.find_first_of('#')==string::npos) + return value_node_list_.find(id); + + String canvas_id(id,0,id.rfind(':')); + String value_node_id(id,id.rfind(':')+1); + if(canvas_id.empty()) + canvas_id=':'; + //synfig::warning("constfind:value_node_id: "+value_node_id); + //synfig::warning("constfind:canvas_id: "+canvas_id); + + String warnings; + return find_canvas(canvas_id, warnings)->value_node_list_.find(value_node_id); +} + +ValueNode::Handle +Canvas::surefind_value_node(const String &id) +{ + if(is_inline() && parent_) + return parent_->surefind_value_node(id); + + if(id.empty()) + throw Exception::IDNotFound("Empty ID"); + + // If we do not have any resolution, then we assume that the + // request is for this immediate canvas + if(id.find_first_of(':')==string::npos && id.find_first_of('#')==string::npos) + return value_node_list_.surefind(id); + + String canvas_id(id,0,id.rfind(':')); + String value_node_id(id,id.rfind(':')+1); + if(canvas_id.empty()) + canvas_id=':'; + + String warnings; + return surefind_canvas(canvas_id,warnings)->value_node_list_.surefind(value_node_id); +} + +void +Canvas::add_value_node(ValueNode::Handle x, const String &id) +{ + if(is_inline() && parent_) + return parent_->add_value_node(x,id); +// throw runtime_error("You cannot add a ValueNode to an inline Canvas"); + + if(x->is_exported()) + throw runtime_error("ValueNode is already exported"); + + if(id.empty()) + throw Exception::BadLinkName("Empty ID"); + + if(id.find_first_of(':',0)!=string::npos) + throw Exception::BadLinkName("Bad character"); + + try + { + if(PlaceholderValueNode::Handle::cast_dynamic(value_node_list_.find(id))) + throw Exception::IDNotFound("add_value_node()"); + + throw Exception::IDAlreadyExists(id); + } + catch(Exception::IDNotFound) + { + x->set_id(id); + + x->set_parent_canvas(this); + + if(!value_node_list_.add(x)) + { + synfig::error("Unable to add ValueNode"); + throw std::runtime_error("Unable to add ValueNode"); + } + + return; + } +} + +/* +void +Canvas::rename_value_node(ValueNode::Handle x, const String &id) +{ + if(id.empty()) + throw Exception::BadLinkName("Empty ID"); + + if(id.find_first_of(": ",0)!=string::npos) + throw Exception::BadLinkName("Bad character"); + + try + { + if(PlaceholderValueNode::Handle::cast_dynamic(value_node_list_.find(id))) + throw Exception::IDNotFound("rename_value_node"); + throw Exception::IDAlreadyExists(id); + } + catch(Exception::IDNotFound) + { + x->set_id(id); + + return; + } +} +*/ + +void +Canvas::remove_value_node(ValueNode::Handle x) +{ + if(is_inline() && parent_) + return parent_->remove_value_node(x); +// throw Exception::IDNotFound("Canvas::remove_value_node() was called from an inline canvas"); + + if(!x) + throw Exception::IDNotFound("Canvas::remove_value_node() was passed empty handle"); + + if(!value_node_list_.erase(x)) + throw Exception::IDNotFound("Canvas::remove_value_node(): ValueNode was not found inside of this canvas"); + + //x->set_parent_canvas(0); + + x->set_id(""); +} + +Canvas::Handle +Canvas::surefind_canvas(const String &id, String &warnings) +{ + if(is_inline() && parent_) + return parent_->surefind_canvas(id,warnings); + + if(id.empty()) + return this; + + // If the ID contains a "#" character, then a filename is + // expected on the left side. + if(id.find_first_of('#')!=string::npos) + { + // If '#' is the first character, remove it + // and attempt to parse the ID again. + if(id[0]=='#') + return surefind_canvas(String(id,1),warnings); + + //! \todo This needs a lot more optimization + String file_name(id,0,id.find_first_of('#')); + String external_id(id,id.find_first_of('#')+1); + + file_name=unix_to_local_path(file_name); + + Canvas::Handle external_canvas; + + if(!is_absolute_path(file_name)) + file_name = get_file_path()+ETL_DIRECTORY_SEPARATOR+file_name; + + // If the composition is already open, then use it. + if(externals_.count(file_name)) + external_canvas=externals_[file_name]; + else + { + String errors; + external_canvas=open_canvas(file_name, errors, warnings); + if(!external_canvas) + throw runtime_error(errors); + externals_[file_name]=external_canvas; + } + + return Handle::cast_const(external_canvas.constant()->find_canvas(external_id, warnings)); + } + + // If we do not have any resolution, then we assume that the + // request is for this immediate canvas + if(id.find_first_of(':')==string::npos) + { + Children::iterator iter; + + // Search for the image in the image list, + // and return it if it is found + for(iter=children().begin();iter!=children().end();iter++) + if(id==(*iter)->get_id()) + return *iter; + + // Create a new canvas and return it + //synfig::warning("Implicitly creating canvas named "+id); + return new_child_canvas(id); + } + + // If the first character is the separator, then + // this references the root canvas. + if(id[0]==':') + return get_root()->surefind_canvas(string(id,1),warnings); + + // Now we know that the requested Canvas is in a child + // of this canvas. We have to find that canvas and + // call "find_canvas" on it, and return the result. + + String canvas_name=string(id,0,id.find_first_of(':')); + + Canvas::Handle child_canvas=surefind_canvas(canvas_name,warnings); + + return child_canvas->surefind_canvas(string(id,id.find_first_of(':')+1),warnings); +} + +Canvas::Handle +Canvas::find_canvas(const String &id, String &warnings) +{ + return + Canvas::Handle::cast_const( + const_cast(this)->find_canvas(id, warnings) + ); +} + +Canvas::ConstHandle +Canvas::find_canvas(const String &id, String &warnings)const +{ + if(is_inline() && parent_) + return parent_->find_canvas(id, warnings); + + if(id.empty()) + return this; + + // If the ID contains a "#" character, then a filename is + // expected on the left side. + if(id.find_first_of('#')!=string::npos) + { + // If '#' is the first character, remove it + // and attempt to parse the ID again. + if(id[0]=='#') + return find_canvas(String(id,1), warnings); + + //! \todo This needs a lot more optimization + String file_name(id,0,id.find_first_of('#')); + String external_id(id,id.find_first_of('#')+1); + + file_name=unix_to_local_path(file_name); + + Canvas::Handle external_canvas; + + if(!is_absolute_path(file_name)) + file_name = get_file_path()+ETL_DIRECTORY_SEPARATOR+file_name; + + // If the composition is already open, then use it. + if(externals_.count(file_name)) + external_canvas=externals_[file_name]; + else + { + String errors, warnings; + external_canvas=open_canvas(file_name, errors, warnings); + if(!external_canvas) + throw runtime_error(errors); + externals_[file_name]=external_canvas; + } + + return Handle::cast_const(external_canvas.constant()->find_canvas(external_id, warnings)); + } + + // If we do not have any resolution, then we assume that the + // request is for this immediate canvas + if(id.find_first_of(':')==string::npos) + { + Children::const_iterator iter; + + // Search for the image in the image list, + // and return it if it is found + for(iter=children().begin();iter!=children().end();iter++) + if(id==(*iter)->get_id()) + return *iter; + + throw Exception::IDNotFound("Child Canvas in Parent Canvas: (child)"+id); + } + + // If the first character is the separator, then + // this references the root canvas. + if(id[0]==':') + return get_root()->find_canvas(string(id,1), warnings); + + // Now we know that the requested Canvas is in a child + // of this canvas. We have to find that canvas and + // call "find_canvas" on it, and return the result. + + String canvas_name=string(id,0,id.find_first_of(':')); + + Canvas::ConstHandle child_canvas=find_canvas(canvas_name, warnings); + + return child_canvas->find_canvas(string(id,id.find_first_of(':')+1), warnings); +} + +Canvas::Handle +Canvas::create() +{ + return new Canvas("Untitled"); +} + +void +Canvas::push_back(etl::handle x) +{ +// int i(x->count()); + insert(end(),x); + //if(x->count()!=i+1)synfig::info("push_back before %d, after %d",i,x->count()); +} + +void +Canvas::push_front(etl::handle x) +{ +// int i(x->count()); + insert(begin(),x); + //if(x->count()!=i+1)synfig::error("push_front before %d, after %d",i,x->count()); +} + +void +Canvas::insert(iterator iter,etl::handle x) +{ +// int i(x->count()); + CanvasBase::insert(iter,x); + + /*if(x->count()!=i+1) + { + synfig::error(__FILE__":%d: Canvas::insert(): ***FAILURE*** before %d, after %d",__LINE__,i,x->count()); + return; + //throw runtime_error("Canvas Insertion Failed"); + }*/ + + x->set_canvas(this); + + add_child(x.get()); + + LooseHandle correct_canvas(this); + //while(correct_canvas->is_inline())correct_canvas=correct_canvas->parent(); + Layer::LooseHandle loose_layer(x); + + add_connection(loose_layer, + sigc::connection::connection( + x->signal_added_to_group().connect( + sigc::bind( + sigc::mem_fun( + *correct_canvas, + &Canvas::add_group_pair), + loose_layer)))); + add_connection(loose_layer, + sigc::connection::connection( + x->signal_removed_from_group().connect( + sigc::bind( + sigc::mem_fun( + *correct_canvas, + &Canvas::remove_group_pair), + loose_layer)))); + + if(!x->get_group().empty()) + add_group_pair(x->get_group(),x); + + changed(); +} + +void +Canvas::push_back_simple(etl::handle x) +{ + CanvasBase::insert(end(),x); + changed(); +} + +void +Canvas::erase(iterator iter) +{ + if(!(*iter)->get_group().empty()) + remove_group_pair((*iter)->get_group(),(*iter)); + + // HACK: We really shouldn't be wiping + // out these signals entirely. We should + // only be removing the specific connections + // that we made. At the moment, I'm too + // lazy to add the code to keep track + // of those connections, and no one else + // is using these signals, so I'll just + // leave these next two lines like they + // are for now - darco 07-30-2004 + + // so don't wipe them out entirely + // - dooglus 09-21-2007 + disconnect_connections(*iter); + + if(!op_flag_)remove_child(iter->get()); + + CanvasBase::erase(iter); + if(!op_flag_)changed(); +} + +Canvas::Handle +Canvas::clone(const GUID& deriv_guid)const +{ + synfig::String name; + if(is_inline()) + name="inline"; + else + { + name=get_id()+"_CLONE"; + +#ifndef ALLOW_CLONE_NON_INLINE_CANVASES + throw runtime_error("Cloning of non-inline canvases is not yet supported"); +#endif // ALLOW_CLONE_NON_INLINE_CANVASES + } + + Handle canvas(new Canvas(name)); + + if(is_inline()) + { + canvas->is_inline_=true; + // \todo this was setting parent_=0 - is there a reason for that? + // this was causing bug 1838132, where cloning an inline canvas that contains an imported image fails + // it was failing to ascertain the absolute pathname of the imported image, since it needs the pathname + // of the canvas to get that, which is stored in the parent canvas + canvas->parent_=parent(); + canvas->rend_desc() = rend_desc(); + //canvas->set_inline(parent()); + } + + canvas->set_guid(get_guid()^deriv_guid); + + const_iterator iter; + for(iter=begin();iter!=end();++iter) + { + Layer::Handle layer((*iter)->clone(deriv_guid)); + if(layer) + { + assert(layer.count()==1); + int presize(size()); + canvas->push_back(layer); + if(!(layer.count()>1)) + { + synfig::error("Canvas::clone(): Cloned layer insertion failure!"); + synfig::error("Canvas::clone(): \tlayer.count()=%d",layer.count()); + synfig::error("Canvas::clone(): \tlayer->get_name()=%s",layer->get_name().c_str()); + synfig::error("Canvas::clone(): \tbefore size()=%d",presize); + synfig::error("Canvas::clone(): \tafter size()=%d",size()); + } + assert(layer.count()>1); + } + else + { + synfig::error("Unable to clone layer"); + } + } + + canvas->signal_group_pair_removed().clear(); + canvas->signal_group_pair_added().clear(); + + return canvas; +} + +void +Canvas::set_inline(LooseHandle parent) +{ + if(is_inline_ && parent_) + { + + } + + id_="inline"; + is_inline_=true; + parent_=parent; + + // Have the parent inherit all of the group stuff + + std::map > >::const_iterator iter; + + for(iter=group_db_.begin();iter!=group_db_.end();++iter) + { + parent->group_db_[iter->first].insert(iter->second.begin(),iter->second.end()); + } + + rend_desc()=parent->rend_desc(); +} + +Canvas::Handle +Canvas::create_inline(Handle parent) +{ + assert(parent); + //if(parent->is_inline()) + // return create_inline(parent->parent()); + + Handle canvas(new Canvas("inline")); + canvas->set_inline(parent); + return canvas; +} + +Canvas::Handle +Canvas::new_child_canvas() +{ + if(is_inline() && parent_) + return parent_->new_child_canvas(); +// runtime_error("You cannot create a child Canvas in an inline Canvas"); + + // Create a new canvas + children().push_back(create()); + Canvas::Handle canvas(children().back()); + + canvas->parent_=this; + + canvas->rend_desc()=rend_desc(); + + return canvas; +} + +Canvas::Handle +Canvas::new_child_canvas(const String &id) +{ + if(is_inline() && parent_) + return parent_->new_child_canvas(id); +// runtime_error("You cannot create a child Canvas in an inline Canvas"); + + // Create a new canvas + children().push_back(create()); + Canvas::Handle canvas(children().back()); + + canvas->set_id(id); + canvas->parent_=this; + canvas->rend_desc()=rend_desc(); + + return canvas; +} + +Canvas::Handle +Canvas::add_child_canvas(Canvas::Handle child_canvas, const synfig::String& id) +{ + if(is_inline() && parent_) + return parent_->add_child_canvas(child_canvas,id); + + if(child_canvas->parent() && !child_canvas->is_inline()) + throw std::runtime_error("Cannot add child canvas because it belongs to someone else!"); + + if(!valid_id(id)) + throw runtime_error("Invalid ID"); + + try + { + String warnings; + find_canvas(id, warnings); + throw Exception::IDAlreadyExists(id); + } + catch(Exception::IDNotFound) + { + if(child_canvas->is_inline()) + child_canvas->is_inline_=false; + child_canvas->id_=id; + children().push_back(child_canvas); + child_canvas->parent_=this; + } + + return child_canvas; +} + +void +Canvas::remove_child_canvas(Canvas::Handle child_canvas) +{ + if(is_inline() && parent_) + return parent_->remove_child_canvas(child_canvas); + + if(child_canvas->parent_!=this) + throw runtime_error("Given child does not belong to me"); + + if(find(children().begin(),children().end(),child_canvas)==children().end()) + throw Exception::IDNotFound(child_canvas->get_id()); + + children().remove(child_canvas); + + child_canvas->parent_=0; +} + +void +Canvas::set_file_name(const String &file_name) +{ + if(parent()) + parent()->set_file_name(file_name); + else + { + String old_name(file_name_); + file_name_=file_name; + + // when a canvas is made, its name is "" + // then, before it's saved or even edited, it gets a name like "Synfig Animation 23", in the local language + // we don't want to register the canvas' filename in the canvas map until it gets a real filename + if (old_name != "") + { + file_name_=file_name; + std::map >::iterator iter; + for(iter=get_open_canvas_map().begin();iter!=get_open_canvas_map().end();++iter) + if(iter->second==this) + break; + if (iter == get_open_canvas_map().end()) + CanvasParser::register_canvas_in_map(this, file_name); + else + signal_file_name_changed_(); + } + } +} + +sigc::signal& +Canvas::signal_file_name_changed() +{ + if(parent()) + return parent()->signal_file_name_changed(); + else + return signal_file_name_changed_; +} + +String +Canvas::get_file_name()const +{ + if(parent()) + return parent()->get_file_name(); + return file_name_; +} + +String +Canvas::get_file_path()const +{ + if(parent()) + return parent()->get_file_path(); + return dirname(file_name_); +} + +String +Canvas::get_meta_data(const String& key)const +{ + if(!meta_data_.count(key)) + return String(); + return meta_data_.find(key)->second; +} + +void +Canvas::set_meta_data(const String& key, const String& data) +{ + if(meta_data_[key]!=data) + { + meta_data_[key]=data; + signal_meta_data_changed()(key); + signal_meta_data_changed(key)(); + } +} + +void +Canvas::erase_meta_data(const String& key) +{ + if(meta_data_.count(key)) + { + meta_data_.erase(key); + signal_meta_data_changed()(key); + signal_meta_data_changed(key)(); + } +} + +std::list +Canvas::get_meta_data_keys()const +{ + std::list ret; + + std::map::const_iterator iter; + + for(iter=meta_data_.begin();!(iter==meta_data_.end());++iter) + ret.push_back(iter->first); + + return ret; +} + +/* note - the "Motion Blur" and "Duplicate" layers need the dynamic + parameters of any PasteCanvas layers they loop over to be + maintained. When the variables in the following function + refer to "motion blur", they mean either of these two + layers. */ +void +synfig::optimize_layers(Time time, Context context, Canvas::Handle op_canvas, bool seen_motion_blur_in_parent) +{ + Context iter; + + std::vector< std::pair > sort_list; + int i, motion_blur_i=0; // motion_blur_i is for resolving which layer comes first in the event of a z_depth tie + float motion_blur_z_depth=0; // the z_depth of the least deep motion blur layer in this context + bool seen_motion_blur_locally = false; + bool motion_blurred; // the final result - is this layer blurred or not? + + // If the parent didn't cause us to already be motion blurred, + // check whether there's a motion blur in this context, + // and if so, calculate its z_depth. + if (!seen_motion_blur_in_parent) + for(iter=context,i=0;*iter;iter++,i++) + { + Layer::Handle layer=*iter; + + // If the layer isn't active, don't worry about it + if(!layer->active()) + continue; + + // Any layer with an amount of zero is implicitly disabled. + ValueBase value(layer->get_param("amount")); + if(value.get_type()==ValueBase::TYPE_REAL && value.get(Real())==0) + continue; + + if(layer->get_name()=="MotionBlur" || layer->get_name()=="duplicate") + { + float z_depth(layer->get_z_depth()*1.0001+i); + + // If we've seen a motion blur before in this context... + if (seen_motion_blur_locally) + { + // ... then we're only interested in this one if it's less deep... + if (z_depth < motion_blur_z_depth) + { + motion_blur_z_depth = z_depth; + motion_blur_i = i; + } + } + // ... otherwise we're always interested in it. + else + { + motion_blur_z_depth = z_depth; + motion_blur_i = i; + seen_motion_blur_locally = true; + } + } + } + + // Go ahead and start romping through the canvas to paste + for(iter=context,i=0;*iter;iter++,i++) + { + Layer::Handle layer=*iter; + float z_depth(layer->get_z_depth()*1.0001+i); + + // If the layer isn't active, don't worry about it + if(!layer->active()) + continue; + + // Any layer with an amount of zero is implicitly disabled. + ValueBase value(layer->get_param("amount")); + if(value.get_type()==ValueBase::TYPE_REAL && value.get(Real())==0) + continue; + + // note: this used to include "&& paste_canvas->get_time_offset()==0", but then + // time-shifted layers weren't being sorted by z-depth (bug #1806852) + if(layer->get_name()=="PasteCanvas") + { + Layer_PasteCanvas* paste_canvas(static_cast(layer.get())); + + // we need to blur the sub canvas if: + // our parent is blurred, + // or the child is lower than a local blur, + // or the child is at the same z_depth as a local blur, but later in the context + +#if 0 // DEBUG + if (seen_motion_blur_in_parent) synfig::info("seen BLUR in parent\n"); + else if (seen_motion_blur_locally) + if (z_depth > motion_blur_z_depth) synfig::info("paste is deeper than BLUR\n"); + else if (z_depth == motion_blur_z_depth) { synfig::info("paste is same depth as BLUR\n"); + if (i > motion_blur_i) synfig::info("paste is physically deeper than BLUR\n"); + else synfig::info("paste is less physically deep than BLUR\n"); + } else synfig::info("paste is less deep than BLUR\n"); + else synfig::info("no BLUR at all\n"); +#endif // DEBUG + + motion_blurred = (seen_motion_blur_in_parent || + (seen_motion_blur_locally && + (z_depth > motion_blur_z_depth || + (z_depth == motion_blur_z_depth && i > motion_blur_i)))); + + Canvas::Handle sub_canvas(Canvas::create_inline(op_canvas)); + Canvas::Handle paste_sub_canvas = paste_canvas->get_sub_canvas(); + if(paste_sub_canvas) + optimize_layers(time, paste_sub_canvas->get_context(),sub_canvas,motion_blurred); + +// \todo: uncommenting the following breaks the rendering of at least examples/backdrop.sifz quite severely +// #define SYNFIG_OPTIMIZE_PASTE_CANVAS +#ifdef SYNFIG_OPTIMIZE_PASTE_CANVAS + Canvas::iterator sub_iter; + + // Determine if we can just remove the paste canvas altogether + if (paste_canvas->get_blend_method() == Color::BLEND_COMPOSITE && + paste_canvas->get_amount() == 1.0f && + paste_canvas->get_zoom() == 0 && + paste_canvas->get_time_offset() == 0 && + paste_canvas->get_origin() == Point(0,0) ) + try { + for(sub_iter=sub_canvas->begin();sub_iter!=sub_canvas->end();++sub_iter) + { + Layer* layer=sub_iter->get(); + + // any layers that deform end up breaking things + // so do things the old way if we run into anything like this + if(!dynamic_cast(layer)) + throw int(); + + ValueBase value(layer->get_param("blend_method")); + if(value.get_type()!=ValueBase::TYPE_INTEGER || value.get(int())!=(int)Color::BLEND_COMPOSITE) + throw int(); + } + + // It has turned out that we don't need a paste canvas + // layer, so just go ahead and add all the layers onto + // the current stack and be done with it + while(sub_canvas->size()) + { + sort_list.push_back(std::pair(z_depth,sub_canvas->front())); + //op_canvas->push_back_simple(sub_canvas->front()); + sub_canvas->pop_front(); + } + continue; + } + catch(int) + { } +#endif // SYNFIG_OPTIMIZE_PASTE_CANVAS + + Layer::Handle new_layer(Layer::create("PasteCanvas")); + dynamic_cast(new_layer.get())->set_muck_with_time(false); + if (motion_blurred) + { + Layer::DynamicParamList dynamic_param_list(paste_canvas->dynamic_param_list()); + for(Layer::DynamicParamList::const_iterator iter(dynamic_param_list.begin()); iter != dynamic_param_list.end(); ++iter) + new_layer->connect_dynamic_param(iter->first, iter->second); + } + Layer::ParamList param_list(paste_canvas->get_param_list()); + //param_list.erase("canvas"); + new_layer->set_param_list(param_list); + dynamic_cast(new_layer.get())->set_sub_canvas(sub_canvas); + dynamic_cast(new_layer.get())->set_muck_with_time(true); + layer=new_layer; + } + else // not a PasteCanvas - does it use blend method 'Straight'? + { + /* when we use the 'straight' blend method, every pixel on the layer affects the layers underneath, + * not just the non-transparent pixels; the following workarea wraps non-pastecanvas layers in a + * new pastecanvas to ensure that the straight blend affects the full plane, not just the area + * within the layer's bounding box + */ + + // \todo: this code probably needs modification to work properly with motionblur and duplicate + etl::handle composite = etl::handle::cast_dynamic(layer); + + /* some layers (such as circle) don't touch pixels that aren't + * part of the circle, so they don't get blended correctly when + * using a straight blend. so we encapsulate the circle, and the + * encapsulation layer takes care of the transparent pixels + * for us. if we do that for all layers, however, then the + * distortion layers no longer work, since they have no + * context to work on. the Layer::reads_context() method + * returns true for layers which need to be able to see + * their context. we can't encapsulate those. + */ + if (composite && + Color::is_straight(composite->get_blend_method()) && + !composite->reads_context()) + { + Canvas::Handle sub_canvas(Canvas::create_inline(op_canvas)); + // don't use clone() because it re-randomizes the seeds of any random valuenodes + sub_canvas->push_back(composite = composite->simple_clone()); + layer = Layer::create("PasteCanvas"); + composite->set_description(strprintf("Wrapped clone of '%s'", composite->get_non_empty_description().c_str())); + layer->set_description(strprintf("PasteCanvas wrapper for '%s'", composite->get_non_empty_description().c_str())); + Layer_PasteCanvas* paste_canvas(static_cast(layer.get())); + paste_canvas->set_blend_method(composite->get_blend_method()); + paste_canvas->set_amount(composite->get_amount()); + sub_canvas->set_time(time); // region and outline don't calculate their bounding rects until their time is set + composite->set_blend_method(Color::BLEND_STRAIGHT); // do this before calling set_sub_canvas(), but after set_time() + composite->set_amount(1.0f); // after set_time() + paste_canvas->set_sub_canvas(sub_canvas); + } + } + + sort_list.push_back(std::pair(z_depth,layer)); + //op_canvas->push_back_simple(layer); + } + + //sort_list.sort(); + stable_sort(sort_list.begin(),sort_list.end()); + std::vector< std::pair >::iterator iter2; + for(iter2=sort_list.begin();iter2!=sort_list.end();++iter2) + op_canvas->push_back_simple(iter2->second); + op_canvas->op_flag_=true; +} + +void +Canvas::get_times_vfunc(Node::time_set &set) const +{ + const_iterator i = begin(), + iend = end(); + + for(; i != iend; ++i) + { + const Node::time_set &tset = (*i)->get_times(); + set.insert(tset.begin(),tset.end()); + } +} + +std::set > +Canvas::get_layers_in_group(const String&group) +{ + if(is_inline() && parent_) + return parent_->get_layers_in_group(group); + + if(group_db_.count(group)==0) + return std::set >(); + return group_db_.find(group)->second; +} + +std::set +Canvas::get_groups()const +{ + if(is_inline() && parent_) + return parent_->get_groups(); + + std::set ret; + std::map > >::const_iterator iter; + for(iter=group_db_.begin();iter!=group_db_.end();++iter) + ret.insert(iter->first); + return ret; +} + +int +Canvas::get_group_count()const +{ + if(is_inline() && parent_) + return parent_->get_group_count(); + + return group_db_.size(); +} + +void +Canvas::add_group_pair(String group, etl::handle layer) +{ + group_db_[group].insert(layer); + if(group_db_[group].size()==1) + signal_group_added()(group); + else + signal_group_changed()(group); + + signal_group_pair_added()(group,layer); + + if(is_inline() && parent_) + return parent_->add_group_pair(group,layer); +} + +void +Canvas::remove_group_pair(String group, etl::handle layer) +{ + group_db_[group].erase(layer); + + signal_group_pair_removed()(group,layer); + + if(group_db_[group].empty()) + { + group_db_.erase(group); + signal_group_removed()(group); + } + else + signal_group_changed()(group); + + if(is_inline() && parent_) + return parent_->remove_group_pair(group,layer); +} + +void +Canvas::add_connection(etl::loose_handle layer, sigc::connection connection) +{ + connections_[layer].push_back(connection); +} + +void +Canvas::disconnect_connections(etl::loose_handle layer) +{ + std::vector::iterator iter; + for(iter=connections_[layer].begin();iter!=connections_[layer].end();++iter) + iter->disconnect(); + connections_[layer].clear(); +} + +void +Canvas::rename_group(const String&old_name,const String&new_name) +{ + if(is_inline() && parent_) + return parent_->rename_group(old_name,new_name); + + { + std::map > >::iterator iter; + iter=group_db_.find(old_name); + if(iter!=group_db_.end()) + for(++iter;iter!=group_db_.end() && iter->first.find(old_name)==0;iter=group_db_.find(old_name),++iter) + { + String name(iter->first,old_name.size(),String::npos); + name=new_name+name; + rename_group(iter->first,name); + } + } + + std::set > layers(get_layers_in_group(old_name)); + std::set >::iterator iter; + + for(iter=layers.begin();iter!=layers.end();++iter) + { + (*iter)->remove_from_group(old_name); + (*iter)->add_to_group(new_name); + } +} + +void +Canvas::register_external_canvas(String file_name, Handle canvas) +{ + if(!is_absolute_path(file_name)) file_name = get_file_path()+ETL_DIRECTORY_SEPARATOR+file_name; + externals_[file_name] = canvas; +} + +#ifdef _DEBUG +void +Canvas::show_externals(String file, int line, String text) const +{ + printf(" .----- (externals for %lx '%s')\n | %s:%d %s\n", ulong(this), get_name().c_str(), file.c_str(), line, text.c_str()); + std::map::iterator iter; + for (iter = externals_.begin(); iter != externals_.end(); iter++) + { + synfig::String first(iter->first); + etl::loose_handle second(iter->second); + printf(" | %40s : %lx (%d)\n", first.c_str(), ulong(&*second), second->count()); + } + printf(" `-----\n\n"); +} +#endif // _DEBUG diff --git a/synfig-core/src/synfig/canvas.h b/synfig-core/src/synfig/canvas.h new file mode 100644 index 0000000..a6474da --- /dev/null +++ b/synfig-core/src/synfig/canvas.h @@ -0,0 +1,572 @@ +/* === S Y N F I G ========================================================= */ +/*! \file canvas.h +** \brief Canvas Class Implementation +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_CANVAS_H +#define __SYNFIG_CANVAS_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include + +#include "vector.h" +#include "string.h" +#include "canvasbase.h" +#include "valuenode.h" +#include "keyframe.h" +#include "renddesc.h" +#include "node.h" +#include "guid.h" + +/* === M A C R O S ========================================================= */ + +/* version change history: + * + * 0.1: the original version + * + * if a waypoint goes from -179 to 179 degrees, that is a 2 + * degree change. there's no way to express a 720 degree + * rotation with a single pair of waypoints + * + * 0.2: svn r1227 + * + * angles no longer wrap at -180 degrees back to 180 degrees; if + * a waypoint goes from -179 to 179 degrees, that is a rotation + * of 358 degrees. loading a version 0.1 canvas will modify + * constant angle waypoints to that they are within 180 degrees + * of the previous waypoint's value + * + * the 'straight' blend method didn't used to work properly. it + * didn't work at all on transparent pixels in layers other than + * the PasteCanvas layer. for example, the examples/japan.sifz + * file has a red circle (straight, amount=1.0) on top of a + * striped conical gradient. if 'straight' was working, the + * conical gradient would be entirely obscured by the circle + * layer (even by its transparent pixels) + * + * 0.3: svn r1422 + * + * the 'straight' blend method was fixed. loading a version 0.2 + * or older canvas will replace the 'straight' blend method in + * non-pastecanvas layers with 'composite', unless they're + * completely transparent, in which case it will replace them + * with an 'alpha over' blend instead. Images like + * examples/logo.sifz use transparent straight blends to do + * masking, which no longer works now that 'straight' blending is + * fixed. + * + * Tangent lengths calculated by the "Segment Tangent" and "BLine + * Tangent" ValueNodes were scaled by a factor of 0.5. + * + * 0.4: svn r1856 + * + * Stop scaling tangents by 0.5. + * + * 0.5: svn r1863 + * + * Added "offset", "scale", and "fixed_length" links to the + * "BLine Tangent" ValueNode. + * + * 0.6: svn r2067 + * + * Added "scale" link to the "BLine Width" ValueNode in svn r1872. + * + * Added "loop" link to the "Gradient Color" ValueNode in svn r1901. + * + * 0.7: svn r2315 + * + * Added "loop" link to the "Random" ValueNode in svn r2315. + */ + +#define CURRENT_CANVAS_VERSION "0.7" + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class Context; +class GUID; + +/*! \class Canvas +** \todo writeme +*/ +class Canvas : public CanvasBase, public Node +{ + /* + -- ** -- T Y P E S ----------------------------------------------------------- + */ + +public: + typedef etl::handle Handle; + typedef etl::loose_handle LooseHandle; + typedef etl::handle ConstHandle; + + typedef std::list Children; + + friend void synfig::optimize_layers(Time, Context, Canvas::Handle, bool seen_motion_blur); + + /* + -- ** -- D A T A ------------------------------------------------------------- + */ + +private: + + //! Contains the ID string for the Canvas + /*! \see get_id(), set_id() */ + String id_; + + //! Contains the name of the Canvas + /*! \see set_name(), get_name() */ + String name_; + + //! Contains a description of the Canvas + /*! \see set_description(), get_description() */ + String description_; + + //! Contains the canvas' version string + /*! \see set_version(), get_version() */ + String version_; + + //! Contains the author's name + /*! \see set_author(), get_author() */ + String author_; + + //! Contains the author's email address + /*! \todo This private parameter has no binding, so it's unusable at the moment */ + String email_; + + //! File name of Canvas + /*! \see get_file_name(), set_file_name() */ + String file_name_; + + //! Metadata map for Canvas. + /*! \see get_meta_data(), set_meta_data(), erase_meta_data() */ + std::map meta_data_; + + //! Contains a list of ValueNodes that are in this Canvas + /*! \see value_node_list(), find_value_node() */ + ValueNodeList value_node_list_; + + //! \writeme + KeyframeList keyframe_list_; + + //! A handle to the parent canvas of this canvas. + /*! If canvas is a root canvas, then this handle is empty + ** \see parent() + */ + LooseHandle parent_; + + //! List containing any child Canvases + /*! \see children() */ + Children children_; + + //! Render Description for Canvas + /*! \see rend_desc() */ + RendDesc desc_; + + //! Contains the value of the last call to set_time() + Time cur_time_; + + //! \writeme + mutable std::map externals_; + + //! This flag is set if this canvas is "inline" + bool is_inline_; + + mutable bool is_dirty_; + + bool op_flag_; + + //! Layer Group database + std::map > > group_db_; + + //! Layer Connection database + std::map,std::vector > connections_; + + /* + -- ** -- S I G N A L S ------------------------------------------------------- + */ + +private: + + //! Group Added + sigc::signal signal_group_added_; + + //! Group Removed + sigc::signal signal_group_removed_; + + //! Group Changed + sigc::signal signal_group_changed_; + + sigc::signal > signal_group_pair_added_; + sigc::signal > signal_group_pair_removed_; + + //! Layers Reordered + sigc::signal signal_layers_reordered_; + + //! RendDesc Changed + sigc::signal signal_rend_desc_changed_; + + //! ID Changed + sigc::signal signal_id_changed_; + + //! Dirty + //sigc::signal signal_dirty_; + + //! FileName Changed + sigc::signal signal_file_name_changed_; + + //! Metadata Changed + sigc::signal signal_meta_data_changed_; + + //! Key-Specific meta data changed signals + std::map > signal_map_meta_data_changed_; + + + //! ValueBasenode Changed + sigc::signal > signal_value_node_changed_; + + sigc::signal > signal_value_node_renamed_; + + sigc::signal, etl::handle > signal_value_node_child_added_; + + sigc::signal, etl::handle > signal_value_node_child_removed_; + + /* + -- ** -- S I G N A L I N T E R F A C E ------------------------------------- + */ + +public: + + sigc::signal >& signal_group_pair_added() { return signal_group_pair_added_; } + sigc::signal >& signal_group_pair_removed() { return signal_group_pair_removed_; } + + //! Group Added + sigc::signal& signal_group_added() { return signal_group_added_; } + + //! Group Removed + sigc::signal& signal_group_removed() { return signal_group_removed_; } + + //! Group Changed + sigc::signal& signal_group_changed() { return signal_group_changed_; } + + //! Layers Reordered + sigc::signal& signal_layers_reordered() { return signal_layers_reordered_; } + + //! RendDesc Changed + sigc::signal& signal_rend_desc_changed() { return signal_rend_desc_changed_; } + + //! ID Changed + sigc::signal& signal_id_changed() { return signal_id_changed_; } + + //! File name Changed + sigc::signal& signal_file_name_changed(); + + //! Metadata Changed + sigc::signal& signal_meta_data_changed() { return signal_meta_data_changed_; } + + //! Metadata Changed + sigc::signal& signal_meta_data_changed(const String& key) { return signal_map_meta_data_changed_[key]; } + + + sigc::signal >& signal_value_node_changed() { return signal_value_node_changed_; } + + sigc::signal >& signal_value_node_renamed() { return signal_value_node_renamed_; } + + //! Dirty + sigc::signal& signal_dirty() { return signal_changed(); } + + //! \writeme + sigc::signal, etl::handle >& signal_value_node_child_added() { return signal_value_node_child_added_; } + + //! \writeme + sigc::signal, etl::handle >& signal_value_node_child_removed() { return signal_value_node_child_removed_; } + + /* + -- ** -- C O N S T R U C T O R S --------------------------------------------- + */ + +protected: + + Canvas(const String &name); + +public: + + ~Canvas(); + + /* + -- ** -- M E M B E R F U N C T I O N S ------------------------------------- + */ + +public: + + //! Returns the set of layers in group + std::set > get_layers_in_group(const String&group); + + //! Gets all the groups + std::set get_groups()const; + + //! Gets the number of groups in this canvas + int get_group_count()const; + + //! Renames the given group + void rename_group(const String&old_name,const String&new_name); + + //! \writeme + bool is_inline()const { return is_inline_; } + + //! Returns a handle to the RendDesc for this Canvas + RendDesc &rend_desc() { return desc_; } + + //! Returns a handle to the RendDesc for this Canvas + const RendDesc &rend_desc()const { return desc_; } + + //! Gets the name of the canvas + const String & get_name()const { return name_; } + + //! Sets the name of the canvas + void set_name(const String &x); + + //! Gets the version string of the canvas + const String get_version()const { return version_; } + + //! Sets the version string of the canvas + void set_version(const String &x) { version_ = x; } + + //! Gets the author of the canvas + const String & get_author()const { return author_; } + + //! Sets the author of the canvas + void set_author(const String &x); + + //! Gets the description of the canvas + const String & get_description()const { return description_; } + + //! Sets the name of the canvas + void set_description(const String &x); + + //! Gets the ID of the canvas + const String & get_id()const { return id_; } + + //! Sets the ID of the canvas + void set_id(const String &x); + + //! Returns the data string for the given meta data key + String get_meta_data(const String& key)const; + + //! Returns a list of meta data keys + std::list get_meta_data_keys()const; + + //! Sets a meta data key to a specific string + void set_meta_data(const String& key, const String& data); + + //! Removes a meta data key + void erase_meta_data(const String& key); + + //! \writeme + String get_relative_id(etl::loose_handle x)const; + + //! \internal \writeme + String _get_relative_id(etl::loose_handle x)const; + + //! Returns \c true if the Canvas is a root Canvas. \c false otherwise + bool is_root()const { return !parent_; } + + //! Returns a handle to the parent Canvas. + /*! The returned handle will be empty if this is a root canvas */ + LooseHandle parent()const { return parent_; } + + LooseHandle get_root()const; + + //! Returns a list of all child canvases in this canvas + std::list &children() { return children_; } + + //! Returns a list of all child canvases in this canvas + const std::list &children()const { return children_; } + + //! Gets the color at the specified point + //Color get_color(const Point &pos)const; + + //! Sets the time for all the layers in the canvas + void set_time(Time t)const; + + //! \writeme + Time get_time()const { return cur_time_; } + + //! Returns the number of layers in the canvas + int size()const; + + //! Removes all the layers from the canvas + void clear(); + + //! Returns true if the canvas has no layers + bool empty()const; + + //! Returns a reference to the ValueNodeList for this Canvas + // ValueNodeList &value_node_list() { return value_node_list_; } + + //! Returns a reference to the ValueNodeList for this Canvas + const ValueNodeList &value_node_list()const; + + //! Returns a reference to the KeyframeList for this Canvas + KeyframeList &keyframe_list(); + + //! Returns a reference to the KeyframeList for this Canvas + const KeyframeList &keyframe_list()const; + + //! Finds the ValueNode in the Canvas with the given \a id + /*! \return If found, returns a handle to the ValueNode. + ** Otherwise, returns an empty handle. + */ + ValueNode::Handle find_value_node(const String &id); + + //! \internal \writeme + ValueNode::Handle surefind_value_node(const String &id); + + //! Finds the ValueNode in the Canvas with the given \a id + /*! \return If found, returns a handle to the ValueNode. + ** Otherwise, returns an empty handle. + */ + ValueNode::ConstHandle find_value_node(const String &id)const; + + //! \writeme + void add_value_node(ValueNode::Handle x, const String &id); + + //! writeme + //void rename_value_node(ValueNode::Handle x, const String &id); + + //! \writeme + void remove_value_node(ValueNode::Handle x); + + //! \writeme + void remove_value_node(const String &id) { remove_value_node(find_value_node(id)); } + + //! Finds a child Canvas in the Canvas with the given \a name + /*! \return If found, returns a handle to the child Canvas. + ** If not found, it creates a new Canvas and returns it + ** If an error occurs, it returns an empty handle + */ + Handle surefind_canvas(const String &id,String &warnings); + + //! Finds a child Canvas in the Canvas with the given \a id + /*! \return If found, returns a handle to the child Canvas. + ** Otherwise, returns an empty handle. + */ + Handle find_canvas(const String &id, String &warnings); + + //! Finds a child Canvas in the Canvas with the given \a id + /*! \return If found, returns a handle to the child Canvas. + ** Otherwise, returns an empty handle. + */ + ConstHandle find_canvas(const String &id, String &warnings)const; + + //! Sets the file path for the Canvas + //void set_file_path(const String &); + + //! Returns the file path from the file name + String get_file_path()const; + + //! Sets the filename (with path) + void set_file_name(const String &); + + //! Gets the filename (with path) + String get_file_name()const; + + //! Creates a new child canvas, and returns its handle + Handle new_child_canvas(); + + //! Creates a new child canvas with an ID of \a id, and returns its handle + Handle new_child_canvas(const String &id); + + //! Adds the given canvas as a child + Handle add_child_canvas(Handle child_canvas, const String &id); + + void remove_child_canvas(Handle child_canvas); + + etl::handle find_layer(const Point &pos); + + int get_depth(etl::handle)const; + + Context get_context()const; + + iterator end(); + + const_iterator end()const; + + reverse_iterator rbegin(); + + const_reverse_iterator rbegin()const; + + etl::handle &back(); + + void push_back(etl::handle x); + + void push_front(etl::handle x); + + void push_back_simple(etl::handle x); + + void insert(iterator iter,etl::handle x); + void erase(iterator iter); + + const etl::handle &back()const; + + void set_inline(LooseHandle parent); + + static Handle create(); + + static Handle create_inline(Handle parent); + + Handle clone(const GUID& deriv_guid=GUID())const; + + void register_external_canvas(String file, Handle canvas); + +#ifdef _DEBUG + void show_externals(String file, int line, String text) const; +#endif // _DEBUG + +private: + void add_group_pair(String group, etl::handle layer); + void remove_group_pair(String group, etl::handle layer); + void add_connection(etl::loose_handle layer, sigc::connection connection); + void disconnect_connections(etl::loose_handle layer); + +protected: + virtual void on_changed(); + virtual void get_times_vfunc(Node::time_set &set) const; +}; // END of class Canvas + +void optimize_layers(Time time, Context context, Canvas::Handle op_canvas, bool seen_motion_blur=false); + + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/canvasbase.h b/synfig-core/src/synfig/canvasbase.h new file mode 100644 index 0000000..c20ace7 --- /dev/null +++ b/synfig-core/src/synfig/canvasbase.h @@ -0,0 +1,47 @@ +/* === S Y N F I G ========================================================= */ +/*! \file canvasbase.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_CANVASBASE_H +#define __SYNFIG_CANVASBASE_H + +/* === H E A D E R S ======================================================= */ + +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +namespace synfig { + +class Layer; + +typedef std::deque< etl::handle< Layer > > CanvasBase; + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/color.cpp b/synfig-core/src/synfig/color.cpp new file mode 100644 index 0000000..1dcc314 --- /dev/null +++ b/synfig-core/src/synfig/color.cpp @@ -0,0 +1,599 @@ +/* === S Y N F I G ========================================================= */ +/*! \file color.cpp +** \brief Color Class +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "color.h" +#include +#include +#include +#include + +#endif + +using namespace synfig; +using namespace etl; +using namespace std; + +/* === M A C R O S ========================================================= */ + +#define COLOR_EPSILON (0.000001f) + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + + + +ColorReal +Color::hex2real(String s) +{ + std::istringstream i(s); + int n; + i.fill('0'); + if (!(i >> hex >> n)) + throw String("bad conversion from hex string \"") + s + String("\""); + return n / 255.0f; +} + +const String +Color::real2hex(ColorReal c) +{ + std::ostringstream o; + o.width(2); + o.fill('0'); + if (c<0) c = 0; + if (c>1) c = 1; + o << hex << int(c*255.0f); + return o.str(); +} + +void +Color::set_hex(String& str) +{ + value_type r, g, b; + String hex; + + // use just the hex characters + for (String::const_iterator iter = str.begin(); iter != str.end(); iter++) + if (isxdigit(*iter)) + hex.push_back(*iter); + + try + { + if (hex.size() == 1) + { + r = hex2real(hex.substr(0,1)+hex.substr(0,1)); + r_ = g_ = b_ = r; + } + else if (hex.size() == 3) + { + r = hex2real(hex.substr(0,1)+hex.substr(0,1)); + g = hex2real(hex.substr(1,1)+hex.substr(1,1)); + b = hex2real(hex.substr(2,1)+hex.substr(2,1)); + r_ = r; g_ = g; b_ = b; + } + else if (hex.size() == 6) + { + r = hex2real(hex.substr(0,2)); + g = hex2real(hex.substr(2,2)); + b = hex2real(hex.substr(4,2)); + r_ = r; g_ = g; b_ = b; + } + } + catch (string s) + { + printf("caught <%s>\n", s.c_str()); + return; + } +} + +const String +Color::get_string(void)const +{ + std::ostringstream o; + o << std::fixed << std::setprecision(3) << "#" << get_hex() << " : " << std::setw(6) << a_; + return String(o.str().c_str()); +} + +#if 0 +Color& +Color::rotate_uv(const Angle& theta)const +{ +/*/ + Color ret(*this); + ret.set_hue(ret.get_hue()+theta); + return ret; +/*/ + const float + a(angle::sin(theta).get()), + b(angle::cos(theta).get()); + const float + u(get_u()), + v(get_v()); + + return set_uv(b*u-a*v,a*u+b*v); + //return YUV(get_y(),b*u-a*v,a*u+b*v,get_a()); +//*/ +} +#endif + +Color +Color::clamped_negative()const +{ + Color ret=*this; + + if(ret.a_==0) + return alpha(); + + if(ret.a_<0) + ret=-ret; + + if(ret.r_<0) + { + ret.g_-=ret.r_; + ret.b_-=ret.r_; + ret.r_=0.0f; + } + if(ret.g_<0) + { + ret.r_-=ret.g_; + ret.b_-=ret.g_; + ret.g_=0.0f; + } + if(ret.b_<0) + { + ret.r_-=ret.b_; + ret.g_-=ret.b_; + ret.b_=0.0f; + } + + if(ret.r_>1) ret.r_=1; + if(ret.g_>1) ret.g_=1; + if(ret.b_>1) ret.b_=1; + if(ret.a_>1) ret.a_=1; + + if(isnan(ret.get_r())) ret.r_=0.5; + if(isnan(ret.get_g())) ret.g_=0.5; + if(isnan(ret.get_b())) ret.b_=0.5; + if(isnan(ret.get_a())) ret.a_=1; + +/* + if(ret.r_>1) { ret.g_/=ret.r_; ret.b_/=ret.r_; ret.r_=1; } + if(ret.g_>1) { ret.r_/=ret.g_; ret.b_/=ret.g_; ret.g_=1; } + if(ret.b_>1) { ret.g_/=ret.b_; ret.r_/=ret.b_; ret.b_=1; } + if(ret.a_>1) ret.a_=1; +*/ + + return ret; +} + +Color +Color::clamped()const +{ + Color ret(*this); + if(ret.get_r()<0) + ret.set_r(0); + if(ret.get_g()<0) + ret.set_g(0); + if(ret.get_b()<0) + ret.set_b(0); + if(ret.get_a()<0) + ret.set_a(0); + + if(ret.r_>1) ret.r_=1; + if(ret.g_>1) ret.g_=1; + if(ret.b_>1) ret.b_=1; + if(ret.a_>1) ret.a_=1; + + if(isnan(ret.get_r())) ret.r_=0.5; + if(isnan(ret.get_g())) ret.g_=0.5; + if(isnan(ret.get_b())) ret.b_=0.5; + if(isnan(ret.get_a())) ret.a_=1; + + return(ret); +} + +typedef Color (*blendfunc)(Color &,Color &,float); + +static Color +blendfunc_COMPOSITE(Color &src,Color &dest,float amount) +{ + //c_dest'=c_src+(1.0-a_src)*c_dest + //a_dest'=a_src+(1.0-a_src)*a_dest + + float a_src=src.get_a()*amount; + float a_dest=dest.get_a(); + + // if a_arc==0.0 + //if(fabsf(a_src)COLOR_EPSILON) + { + dest/=a_dest; + dest.set_a(a_dest); + } + else + { + dest=Color::alpha(); + } + assert(dest.is_valid()); + return dest; +} + +static Color +blendfunc_STRAIGHT(Color &src,Color &bg,float amount) +{ + //a_out'=(a_src-a_bg)*amount+a_bg + //c_out'=(((c_src*a_src)-(c_bg*a_bg))*amount+(c_bg*a_bg))/a_out' + + // ie: if(amount==1.0) + //if(fabsf(amount-1.0f)COLOR_EPSILON) +// if(a_out>COLOR_EPSILON || a_out<-COLOR_EPSILON) + { + out=((src*src.get_a()-bg*bg.get_a())*amount+bg*bg.get_a())/a_out; + out.set_a(a_out); + } + else + out=Color::alpha(); + + assert(out.is_valid()); + return out; +} + +static Color +blendfunc_ONTO(Color &a,Color &b,float amount) +{ + float alpha(b.get_a()); + return blendfunc_COMPOSITE(a,b.set_a(1.0f),amount).set_a(alpha); +} + +static Color +blendfunc_STRAIGHT_ONTO(Color &a,Color &b,float amount) +{ + a.set_a(a.get_a()*b.get_a()); + return blendfunc_STRAIGHT(a,b,amount); +} + +static Color +blendfunc_BRIGHTEN(Color &a,Color &b,float amount) +{ + const float alpha(a.get_a()*amount); + + if(b.get_r()(a.get_r()-1.0f)*alpha+1.0f) + b.set_r((a.get_r()-1.0f)*alpha+1.0f); + + if(b.get_g()>(a.get_g()-1.0f)*alpha+1.0f) + b.set_g((a.get_g()-1.0f)*alpha+1.0f); + + if(b.get_b()>(a.get_b()-1.0f)*alpha+1.0f) + b.set_b((a.get_b()-1.0f)*alpha+1.0f); + + + return b; +} + +static Color +blendfunc_ADD(Color &a,Color &b,float amount) +{ + const float alpha(a.get_a()*amount); + + b.set_r(b.get_r()+a.get_r()*alpha); + b.set_g(b.get_g()+a.get_g()*alpha); + b.set_b(b.get_b()+a.get_b()*alpha); + + return b; +} + +static Color +blendfunc_SUBTRACT(Color &a,Color &b,float amount) +{ + const float alpha(a.get_a()*amount); + + b.set_r(b.get_r()-a.get_r()*alpha); + b.set_g(b.get_g()-a.get_g()*alpha); + b.set_b(b.get_b()-a.get_b()*alpha); + + return b; +} + +static Color +blendfunc_DIFFERENCE(Color &a,Color &b,float amount) +{ + const float alpha(a.get_a()*amount); + + b.set_r(abs(b.get_r()-a.get_r()*alpha)); + b.set_g(abs(b.get_g()-a.get_g()*alpha)); + b.set_b(abs(b.get_b()-a.get_b()*alpha)); + + return b; +} + +static Color +blendfunc_MULTIPLY(Color &a,Color &b,float amount) +{ + if(amount<0) a=~a, amount=-amount; + + amount*=a.get_a(); + b.set_r(((b.get_r()*a.get_r())-b.get_r())*(amount)+b.get_r()); + b.set_g(((b.get_g()*a.get_g())-b.get_g())*(amount)+b.get_g()); + b.set_b(((b.get_b()*a.get_b())-b.get_b())*(amount)+b.get_b()); + return b; +} + +static Color +blendfunc_DIVIDE(Color &a,Color &b,float amount) +{ + amount*=a.get_a(); + + // We add COLOR_EPSILON in order to avoid a divide-by-zero condition. + // This causes DIVIDE to bias toward positive values, but the effect is + // really negligible. There is a reason why we use COLOR_EPSILON--we + // want the change to be imperceptible. + + b.set_r(((b.get_r()/(a.get_r()+COLOR_EPSILON))-b.get_r())*(amount)+b.get_r()); + b.set_g(((b.get_g()/(a.get_g()+COLOR_EPSILON))-b.get_g())*(amount)+b.get_g()); + b.set_b(((b.get_b()/(a.get_b()+COLOR_EPSILON))-b.get_b())*(amount)+b.get_b()); + + return b; +} + +static Color +blendfunc_COLOR(Color &a,Color &b,float amount) +{ + Color temp(b); + temp.set_uv(a.get_u(),a.get_v()); + return (temp-b)*amount*a.get_a()+b; +} + +static Color +blendfunc_HUE(Color &a,Color &b,float amount) +{ + Color temp(b); + temp.set_hue(a.get_hue()); + return (temp-b)*amount*a.get_a()+b; +} + +static Color +blendfunc_SATURATION(Color &a,Color &b,float amount) +{ + Color temp(b); + temp.set_s(a.get_s()); + return (temp-b)*amount*a.get_a()+b; +} + +static Color +blendfunc_LUMINANCE(Color &a,Color &b,float amount) +{ + Color temp(b); + temp.set_y(a.get_y()); + return (temp-b)*amount*a.get_a()+b; +} + +static Color +blendfunc_BEHIND(Color &a,Color &b,float amount) +{ + if(a.get_a()==0)a.set_a(COLOR_EPSILON); //!< \todo this is a hack + a.set_a(a.get_a()*amount); + return blendfunc_COMPOSITE(b,a,1.0); +} + +static Color +blendfunc_ALPHA_BRIGHTEN(Color &a,Color &b,float amount) +{ + // \todo can this be right, multiplying amount by *b*'s alpha? + // compare with blendfunc_BRIGHTEN where it is multiplied by *a*'s + if(a.get_a() < b.get_a()*amount) + return a.set_a(a.get_a()*amount); + return b; +} + +static Color +blendfunc_ALPHA_DARKEN(Color &a,Color &b,float amount) +{ + if(a.get_a()*amount > b.get_a()) + return a.set_a(a.get_a()*amount); + return b; +} + +static Color +blendfunc_SCREEN(Color &a,Color &b,float amount) +{ + if(amount<0) a=~a, amount=-amount; + + a.set_r(1.0-(1.0f-a.get_r())*(1.0f-b.get_r())); + a.set_g(1.0-(1.0f-a.get_g())*(1.0f-b.get_g())); + a.set_b(1.0-(1.0f-a.get_b())*(1.0f-b.get_b())); + + return blendfunc_ONTO(a,b,amount); +} + +static Color +blendfunc_OVERLAY(Color &a,Color &b,float amount) +{ + if(amount<0) a=~a, amount=-amount; + + Color rm; + rm.set_r(b.get_r()*a.get_r()); + rm.set_g(b.get_g()*a.get_g()); + rm.set_b(b.get_b()*a.get_b()); + + Color rs; + rs.set_r(1.0-(1.0f-a.get_r())*(1.0f-b.get_r())); + rs.set_g(1.0-(1.0f-a.get_g())*(1.0f-b.get_g())); + rs.set_b(1.0-(1.0f-a.get_b())*(1.0f-b.get_b())); + + Color& ret(a); + + ret.set_r(a.get_r()*rs.get_r() + (1.0-a.get_r())*rm.get_r()); + ret.set_g(a.get_g()*rs.get_g() + (1.0-a.get_g())*rm.get_g()); + ret.set_b(a.get_b()*rs.get_b() + (1.0-a.get_b())*rm.get_b()); + + return blendfunc_ONTO(ret,b,amount); +} + +static Color +blendfunc_HARD_LIGHT(Color &a,Color &b,float amount) +{ + if(amount<0) a=~a, amount=-amount; + + if(a.get_r()>0.5f) a.set_r(1.0-(1.0f-(a.get_r()*2.0f-1.0f))*(1.0f-b.get_r())); + else a.set_r(b.get_r()*(a.get_r()*2.0f)); + if(a.get_g()>0.5f) a.set_g(1.0-(1.0f-(a.get_g()*2.0f-1.0f))*(1.0f-b.get_g())); + else a.set_g(b.get_g()*(a.get_g()*2.0f)); + if(a.get_b()>0.5f) a.set_b(1.0-(1.0f-(a.get_b()*2.0f-1.0f))*(1.0f-b.get_b())); + else a.set_b(b.get_b()*(a.get_b()*2.0f)); + + return blendfunc_ONTO(a,b,amount); +} + +static Color +blendfunc_ALPHA_OVER(Color &a,Color &b,float amount) +{ + Color rm(b); + + //multiply the inverse alpha channel with the one below us + rm.set_a((1-a.get_a())*b.get_a()); + + return blendfunc_STRAIGHT(rm,b,amount); +} + + +Color +Color::blend(Color a, Color b,float amount, Color::BlendMethod type) +{ +#if 0 + if(isnan(a.get_r()) || isnan(a.get_g()) || isnan(a.get_b())) + { +#ifdef _DEBUG + a=magenta().set_a(a.get_a()); +#else + a=black().set_a(a.get_a()); +#endif + } + + if(isnan(b.get_r()) || isnan(b.get_g()) || isnan(b.get_b())) + { +#ifdef _DEBUG + b=magenta().set_a(b.get_a()); +#else + b=black().set_a(b.get_a()); +#endif + } +#endif + +/* + if(!a.is_valid()&&b.is_valid()) + return b; + + if(a.is_valid()&&!b.is_valid()) + return a; + + if(!a.is_valid()||!b.is_valid()) + { +#ifdef _DEBUG + return magenta(); +#else + return black(); +#endif + } +*/ + + // No matter what blend method is being used, + // if the amount is equal to zero, then only B + // will shine through + if(fabsf(amount)<=COLOR_EPSILON)return b; + + assert(type +#include +#include +#include "gamma.h" +#include + +#ifdef USE_HALF_TYPE +#include +#endif + +#ifndef SYNFIG_NO_ANGLE +# include "angle.h" +#endif + +/* === M A C R O S ========================================================= */ + +#define use_colorspace_gamma() App::use_colorspace_gamma +#define colorspace_gamma() (2.2f) +#define gamma_in(x) ((x>=0) ? pow((float)x,1.0f/colorspace_gamma()) : -pow((float)-x,1.0f/colorspace_gamma())) +#define gamma_out(x) ((x>=0) ? pow((float)x, colorspace_gamma()) : -pow((float)-x, colorspace_gamma())) + +#ifdef WIN32 +#include +#ifndef isnan +extern "C" { int _isnan(double x); } +#define isnan _isnan +#endif +#endif + +// For some reason isnan() isn't working on macosx any more. +// This is a quick fix. +#if defined(__APPLE__) && !defined(SYNFIG_ISNAN_FIX) +#ifdef isnan +#undef isnan +#endif +inline bool isnan(double x) { return x != x; } +inline bool isnan(float x) { return x != x; } +#define SYNFIG_ISNAN_FIX 1 +#endif + +namespace synfig { + +#ifdef USE_HALF_TYPE +typedef half ColorReal; +#else +typedef float ColorReal; +#endif + +static const float EncodeYUV[3][3]= +{ + { 0.299f, 0.587f, 0.114f }, + { -0.168736f, -0.331264f, 0.5f }, + { 0.5f, -0.418688f, -0.081312f } +}; + +static const float DecodeYUV[3][3]= +{ + { 1.0f, 0.0f, 1.402f }, + { 1.0f, -0.344136f, -0.714136f }, + { 1.0f, 1.772f, 0.0f } +}; + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +#ifdef USE_HALF_TYPE +class ColorAccumulator; +#endif + + + + +/*! \class Color +** \todo Writeme +** Future optimizations: lookup table for sqrt()? +*/ +class Color +{ +public: + typedef ColorReal value_type; + +private: + value_type a_, r_, g_, b_; + +public: + + const String get_string(void)const; + + Color & + operator+=(const Color &rhs) + { + r_+=rhs.r_; + g_+=rhs.g_; + b_+=rhs.b_; + a_+=rhs.a_; + return *this; + } + + Color & + operator-=(const Color &rhs) + { + r_-=rhs.r_; + g_-=rhs.g_; + b_-=rhs.b_; + a_-=rhs.a_; + return *this; + } + + Color & + operator*=(const float &rhs) + { + r_*=rhs; + g_*=rhs; + b_*=rhs; + a_*=rhs; + return *this; + } + + Color & + operator/=(const float &rhs) + { + const float temp(value_type(1)/rhs); + r_*=temp; + g_*=temp; + b_*=temp; + a_*=temp; + return *this; + } + + Color + operator+(const Color &rhs)const + { return Color(*this)+=rhs; } + + Color + operator-(const Color &rhs)const + { return Color(*this)-=rhs; } + + Color + operator*(const float &rhs)const + { return Color(*this)*=rhs; } + + Color + operator/(const float &rhs)const + { return Color(*this)/=rhs; } + + bool + operator==(const Color &rhs)const + { return r_==rhs.r_ && g_==rhs.g_ && b_==rhs.b_ && a_==rhs.a_; } + + bool + operator!=(const Color &rhs)const + { return r_!=rhs.r_ || g_!=rhs.g_ || b_!=rhs.b_ || a_!=rhs.a_; } + + Color + operator-()const + { return Color(-r_,-g_,-b_,-a_); } + + //! Effectively 1.0-color + Color + operator~()const + { return Color(1.0f-r_,1.0f-g_,1.0f-b_,a_); } + + bool is_valid()const + { return !isnan(r_) && !isnan(g_) && !isnan(b_) && !isnan(a_); } + + Color premult_alpha() const + { + return Color (r_*a_, g_*a_, b_*a_, a_); + } + + Color demult_alpha() const + { + if(a_) + { + const value_type inva = 1/a_; + return Color (r_*inva, g_*inva, b_*inva, a_); + }else return alpha(); + } + +public: + // ETL/trunk/ETL/_gaussian.h does: + // SR1=SR2=SR3=typename T::value_type(); + // and expects that to give it initialized colors + // Otherwise the 'gaussian' blur type is random. + Color() :a_(0), r_(0), g_(0), b_(0) { } + Color(const value_type &f) :a_(f),r_(f), g_(f), b_(f) { } + Color(int f) :a_(f),r_(f), g_(f), b_(f) { } + + /*! \param R Red + ** \param G Green + ** \param B Blue + ** \param A Opacity(alpha) */ + Color(const value_type& R, const value_type& G, const value_type& B, const value_type& A=1): + a_(A), + r_(R), + g_(G), + b_(B) { } + + /*! \param c Source for color components + ** \param A Opacity(alpha) */ + Color(const Color& c, const value_type& A): + a_(A), + r_(c.r_), + g_(c.g_), + b_(c.b_) { } + + + //! Copy constructor + Color(const Color& c): + a_(c.a_), + r_(c.r_), + g_(c.g_), + b_(c.b_) { } + +#ifdef USE_HALF_TYPE + friend class ColorAccumulator; + //! Convert constructor + Color(const ColorAccumulator& c); +#endif + + //! Copy constructor + //Color(const Color &c) { memcpy((void*)this, (const void*)&c, sizeof(Color)); } + + /*const Color &operator=(const value_type &i) + { + r_ = g_ = b_ = a_ = i; + return *this; + }*/ + //Color& operator=(const Color &c) { memcpy((void*)this, (const void*)&c, sizeof(Color)); return *this; } + + //! Returns the RED component + const value_type& get_r()const { return r_; } + + //! Returns the GREEN component + const value_type& get_g()const { return g_; } + + //! Returns the BLUE component + const value_type& get_b()const { return b_; } + + //! Returns the amount of opacity (alpha) + const value_type& get_a()const { return a_; } + + //! Synonym for get_a(). \see get_a() + const value_type& get_alpha()const { return get_a(); } + + //! Converts a 2 character hex string \a s (00-ff) into a ColorReal (0.0-1.0) + static ColorReal hex2real(String s); + + //! Converts a ColorReal \a c (0.0-1.0) into a 2 character hex string (00-ff) + static const String real2hex(ColorReal c); + + //! Returns the color as a 6 character hex sting + const String get_hex()const { return String(real2hex(r_)+real2hex(g_)+real2hex(b_)); } + + //! Sets the color's R, G, and B from a 3 or 6 character hex string + void set_hex(String& hex); + + //! Sets the RED component to \a x + Color& set_r(const value_type& x) { r_ = x; return *this; } + + //! Sets the GREEN component to \a x + Color& set_g(const value_type& x) { g_ = x; return *this; } + + //! Sets the BLUE component to \a x + Color& set_b(const value_type& x) { b_ = x; return *this; } + + //! Sets the opacity (alpha) to \a x + Color& set_a(const value_type& x) { a_ = x; return *this; } + + //! Synonym for set_a(). \see set_a() + Color& set_alpha(const value_type& x) { return set_a(x); } + + //! Returns color's luminance + float + get_y() const + { + return + (float)get_r()*EncodeYUV[0][0]+ + (float)get_g()*EncodeYUV[0][1]+ + (float)get_b()*EncodeYUV[0][2]; + } + + + //! Returns U component of chromanance + float + get_u() const + { + return + (float)get_r()*EncodeYUV[1][0]+ + (float)get_g()*EncodeYUV[1][1]+ + (float)get_b()*EncodeYUV[1][2]; + } + + + //! Returns V component of chromanance + float + get_v() const + { + return + (float)get_r()*EncodeYUV[2][0]+ + (float)get_g()*EncodeYUV[2][1]+ + (float)get_b()*EncodeYUV[2][2]; + } + + //! Returns the color's saturation + /*! This is is the magnitude of the U and V components. + ** \see set_s() */ + float + get_s() const + { + const float u(get_u()), v(get_v()); + return sqrt(u*u+v*v); + } + + //! Sets the luminance (\a y) and chromanance (\a u and \a v) + Color& + set_yuv(const float &y, const float &u, const float &v) + { + set_r(y*DecodeYUV[0][0]+u*DecodeYUV[0][1]+v*DecodeYUV[0][2]); + set_g(y*DecodeYUV[1][0]+u*DecodeYUV[1][1]+v*DecodeYUV[1][2]); + set_b(y*DecodeYUV[2][0]+u*DecodeYUV[2][1]+v*DecodeYUV[2][2]); + return *this; + } + + //! Sets color luminance + Color& set_y(const float &y) { return set_yuv(y,get_u(),get_v()); } + + //! Set U component of chromanance + Color& set_u(const float &u) { return set_yuv(get_y(),u,get_v()); } + + //! Set V component of chromanance + Color& set_v(const float &v) { return set_yuv(get_y(),get_u(),v); } + + //! Set the U and V components of chromanance + Color& set_uv(const float& u, const float& v) { return set_yuv(get_y(),u,v); } + + //! Sets the color's saturation + /*! \see get_s() */ + Color& + set_s(const float &x) + { + float u(get_u()), v(get_v()); + const float s(sqrt(u*u+v*v)); + if(s) + { + u=(u/s)*x; + v=(v/s)*x; + return set_uv(u,v); + } + return *this; + } + + //! YUV Color constructor + static Color YUV(const float& y, const float& u, const float& v, const value_type& a=1) + { return Color().set_yuv(y,u,v).set_a(a); } + +#ifndef SYNFIG_NO_ANGLE + //! Returns the hue of the chromanance + /*! This is the angle of the U and V components. + ** \see set_hue() */ + Angle + get_hue() const + { return Angle::tan(get_u(),get_v()); } + + //! Synonym for get_hue(). \see get_hue() + Angle get_uv_angle() const { return get_hue(); } + + //! Sets the color's hue + /*! \see get_hue() */ + Color& + set_hue(const Angle& theta) + { + const float s(get_s()); + const float + u(s*(float)Angle::sin(theta).get()), + v(s*(float)Angle::cos(theta).get()); + return set_uv(u,v); + } + + //! Synonym for set_hue(). \see set_hue() + Color& set_uv_angle(const Angle& theta) { return set_hue(theta); } + + //! Rotates the chromanance vector by amount specified by \a theta + Color& rotate_uv(const Angle& theta) + { + const float a(Angle::sin(theta).get()), b(Angle::cos(theta).get()); + const float u(get_u()), v(get_v()); + + return set_uv(b*u-a*v,a*u+b*v); + } + + //! Sets the luminance (\a y) and chromanance (\a s and \a theta). + /*! \param y Luminance + ** \param s Saturation + ** \param theta Hue */ + Color& set_yuv(const float& y, const float& s, const Angle& theta) + { + return + set_yuv( + y, + s*(float)Angle::sin(theta).get(), + s*(float)Angle::cos(theta).get() + ); + } + + //! YUV color constructor where the chroma is in the saturation/hue form. + /*! \param y Luminance + ** \param s Saturation + ** \param theta Hue + ** \param a Opacity (alpha) */ + static Color YUV(const float& y, const float& s, const Angle& theta, const value_type& a=1) + { return Color().set_yuv(y,s,theta).set_a(a); } + +#endif + + //! Clamps a color so that its values are in range. Ignores attempting to visualize negative colors. + Color clamped()const; + + //! Clamps a color so that its values are in range. + Color clamped_negative()const; + + /* Preset Colors */ + + //! Preset Color Constructors + //@{ +#ifdef HAS_VIMAGE + static inline Color alpha() { return Color(0,0,0,0.0000001f); } +#else + static inline Color alpha() { return Color(0,0,0,0); } +#endif + static inline Color black() { return Color(0,0,0); } + static inline Color white() { return Color(1,1,1); } + static inline Color gray() { return Color(0.5f,0.5f,0.5f); } + static inline Color magenta() { return Color(1,0,1); } + static inline Color red() { return Color(1,0,0); } + static inline Color green() { return Color(0,1,0); } + static inline Color blue() { return Color(0,0,1); } + static inline Color cyan() { return Color(0,1,1); } + static inline Color yellow() { return Color(1,1,0); } + //@} + + //! \writeme + enum BlendMethod + { + BLEND_COMPOSITE=0, //!< Color A is composited onto B (Taking A's alpha into account) + BLEND_STRAIGHT=1, //!< Straight linear interpolation from A->B (Alpha ignored) + BLEND_ONTO=13, //!< Similar to BLEND_COMPOSITE, except that B's alpha is maintained + BLEND_STRAIGHT_ONTO=21, //!< \deprecated \writeme + BLEND_BEHIND=12, //!< Similar to BLEND_COMPOSITE, except that B is composited onto A. + BLEND_SCREEN=16, //!< \writeme + BLEND_OVERLAY=20, //!< \writeme + BLEND_HARD_LIGHT=17, //!< \writeme + BLEND_MULTIPLY=6, //!< Simple A*B. + BLEND_DIVIDE=7, //!< Simple B/A + BLEND_ADD=4, //!< Simple A+B. + BLEND_SUBTRACT=5, //!< Simple A-B. + BLEND_DIFFERENCE=18, //!< Simple |A-B|. + BLEND_BRIGHTEN=2, //!< If composite is brighter than B, use composite. B otherwise. + BLEND_DARKEN=3, //!< If composite is darker than B, use composite. B otherwise. + BLEND_COLOR=8, //!< Preserves the U and V channels of color A + BLEND_HUE=9, //!< Preserves the angle of the UV vector of color A + BLEND_SATURATION=10, //!< Preserves the magnitude of the UV Vector of color A + BLEND_LUMINANCE=11, //!< Preserves the Y channel of color A + + BLEND_ALPHA_BRIGHTEN=14, //!< \deprecated If A is less opaque than B, use A + BLEND_ALPHA_DARKEN=15, //!< \deprecated If A is more opaque than B, use B + BLEND_ALPHA_OVER=19, //!< \deprecated multiply alphas and then straight blends using the amount + + BLEND_END=22 //!< \internal + }; + + /* Other */ + static Color blend(Color a, Color b,float amount,BlendMethod type=BLEND_COMPOSITE); + + static bool is_onto(BlendMethod x) + { + return x==BLEND_BRIGHTEN + || x==BLEND_DARKEN + || x==BLEND_ADD + || x==BLEND_SUBTRACT + || x==BLEND_MULTIPLY + || x==BLEND_DIVIDE + || x==BLEND_COLOR + || x==BLEND_HUE + || x==BLEND_SATURATION + || x==BLEND_LUMINANCE + || x==BLEND_ONTO + || x==BLEND_STRAIGHT_ONTO + || x==BLEND_SCREEN + || x==BLEND_OVERLAY + || x==BLEND_DIFFERENCE + || x==BLEND_HARD_LIGHT + ; + } + + //! a blending method is considered 'straight' if transparent pixels in the upper layer can affect the result of the blend + static bool is_straight(BlendMethod x) + { + return x==BLEND_STRAIGHT + || x==BLEND_STRAIGHT_ONTO + || x==BLEND_ALPHA_BRIGHTEN + ; + } +/*protected: + + value_type& operator[](const int i) + { + assert(i>=0); + assert(i<(signed)(sizeof(Color)/sizeof(value_type))); + return (&r_)[i]; + } + + const value_type& operator[](const int i)const + { + assert(i>=0); + assert(i<(signed)(sizeof(Color)/sizeof(value_type))); + return (&r_)[i]; + } +*/ +}; // END of class Color + +#ifndef USE_HALF_TYPE +typedef Color ColorAccumulator; +#else +class ColorAccumulator +{ + friend class Color; +public: + typedef float value_type; + +private: + value_type a_, r_, g_, b_; + +public: + + ColorAccumulator & + operator+=(const ColorAccumulator &rhs) + { + r_+=rhs.r_; + g_+=rhs.g_; + b_+=rhs.b_; + a_+=rhs.a_; + return *this; + } + + ColorAccumulator & + operator-=(const ColorAccumulator &rhs) + { + r_-=rhs.r_; + g_-=rhs.g_; + b_-=rhs.b_; + a_-=rhs.a_; + return *this; + } + + ColorAccumulator & + operator*=(const float &rhs) + { + r_*=rhs; + g_*=rhs; + b_*=rhs; + a_*=rhs; + return *this; + } + + ColorAccumulator & + operator/=(const float &rhs) + { + const float temp(value_type(1)/rhs); + r_*=temp; + g_*=temp; + b_*=temp; + a_*=temp; + return *this; + } + + ColorAccumulator + operator+(const ColorAccumulator &rhs)const + { return Color(*this)+=rhs; } + + ColorAccumulator + operator-(const ColorAccumulator &rhs)const + { return Color(*this)-=rhs; } + + ColorAccumulator + operator*(const float &rhs)const + { return Color(*this)*=rhs; } + + ColorAccumulator + operator/(const float &rhs)const + { return Color(*this)/=rhs; } + + bool + operator==(const ColorAccumulator &rhs)const + { return r_==rhs.r_ && g_==rhs.g_ && b_==rhs.b_ && a_!=rhs.a_; } + + bool + operator!=(const ColorAccumulator &rhs)const + { return r_!=rhs.r_ || g_!=rhs.g_ || b_!=rhs.b_ || a_!=rhs.a_; } + + Color + operator-()const + { return ColorAccumulator(-r_,-g_,-b_,-a_); } + + bool is_valid()const + { return !isnan(r_) && !isnan(g_) && !isnan(b_) && !isnan(a_); } + +public: + ColorAccumulator() { } + + /*! \param R Red + ** \param G Green + ** \param B Blue + ** \param A Opacity(alpha) */ + ColorAccumulator(const value_type& R, const value_type& G, const value_type& B, const value_type& A=1): + a_(A), + r_(R), + g_(G), + b_(B) { } + + //! Copy constructor + ColorAccumulator(const ColorAccumulator& c): + a_(c.a_), + r_(c.r_), + g_(c.g_), + b_(c.b_) { } + + //! Converter + ColorAccumulator(const Color& c): + a_(c.a_), + r_(c.r_), + g_(c.g_), + b_(c.b_) { } + + //! Converter + ColorAccumulator(int c): a_(c),r_(c), g_(c), b_(c) { } + + //! Returns the RED component + const value_type& get_r()const { return r_; } + + //! Returns the GREEN component + const value_type& get_g()const { return g_; } + + //! Returns the BLUE component + const value_type& get_b()const { return b_; } + + //! Returns the amount of opacity (alpha) + const value_type& get_a()const { return a_; } + + //! Synonym for get_a(). \see get_a() + const value_type& get_alpha()const { return get_a(); } + + //! Sets the RED component to \a x + ColorAccumulator& set_r(const value_type& x) { r_ = x; return *this; } + + //! Sets the GREEN component to \a x + ColorAccumulator& set_g(const value_type& x) { g_ = x; return *this; } + + //! Sets the BLUE component to \a x + ColorAccumulator& set_b(const value_type& x) { b_ = x; return *this; } + + //! Sets the opacity (alpha) to \a x + ColorAccumulator& set_a(const value_type& x) { a_ = x; return *this; } + + //! Synonym for set_a(). \see set_a() + ColorAccumulator& set_alpha(const value_type& x) { return set_a(x); } +}; + +inline +Color::Color(const ColorAccumulator& c): + a_(c.a_), + r_(c.r_), + g_(c.g_), + b_(c.b_) { } + +#endif + + + + + +enum PixelFormat +{ +/* Bit Descriptions (ON/OFF) +** ----+------------- +** 0 Color Channels (Gray/RGB) +** 1 Alpha Channel (WITH/WITHOUT) +** 2 ZDepth (WITH/WITHOUT) +** 3 Endian (BGR/RGB) +** 4 Alpha Location (Start/End) +** 5 ZDepth Location (Start/End) +** 6 Alpha/ZDepth Arrangement (ZA,AZ) +** 7 Alpha Range (Inverted,Normal) +** 8 Z Range (Inverted,Normal) +*/ + PF_RGB=0, + PF_GRAY=(1<<0), //!< If set, use one grayscale channel. If clear, use three channels for RGB + PF_A=(1<<1), //!< If set, include alpha channel + PF_Z=(1<<2), //!< If set, include ZDepth channel + PF_BGR=(1<<3), //!< If set, reverse the order of the RGB channels + PF_A_START=(1<<4), //!< If set, alpha channel is before the color data. If clear, it is after. + PF_Z_START=(1<<5), //!< If set, ZDepth channel is before the color data. If clear, it is after. + PF_ZA=(1<<6), //!< If set, the ZDepth channel will be in front of the alpha channel. If clear, they are reversed. + + PF_A_INV=(1<<7), //!< If set, the alpha channel is stored as 1.0-a + PF_Z_INV=(1<<8), //!< If set, the ZDepth channel is stored as 1.0-z + PF_RAW_COLOR=(1<<9)+(1<<1) //!< If set, the data represents a raw Color data structure, and all other bits are ignored. +}; + +inline PixelFormat operator|(PixelFormat lhs, PixelFormat rhs) + { return static_cast((int)lhs|(int)rhs); } + +inline PixelFormat operator&(PixelFormat lhs, PixelFormat rhs) + { return static_cast((int)lhs&(int)rhs); } +#define FLAGS(x,y) (((x)&(y))==(y)) + +//! Returns the number of channels that the given PixelFormat calls for +inline int +channels(PixelFormat x) +{ + int chan=0; + if(FLAGS(x,PF_GRAY)) + ++chan; + else + chan+=3; + if(FLAGS(x,PF_A)) + ++chan; + if(FLAGS(x,PF_Z)) + ++chan; + if(FLAGS(x,PF_RAW_COLOR)) + chan=sizeof(Color); + + return chan; +} + +inline unsigned char * +Color2PixelFormat(const Color &color, const PixelFormat &pf, unsigned char *out, const Gamma &gamma) +{ + if(FLAGS(pf,PF_RAW_COLOR)) + { + Color *outcol=reinterpret_cast(out); + *outcol=color; + out+=sizeof(color); + return out; + } + + int alpha=(int)((FLAGS(pf,PF_A_INV)?(-(float)color.get_a()+1):(float)color.get_a())*255); + if(alpha<0)alpha=0; + if(alpha>255)alpha=255; + + if(FLAGS(pf,PF_ZA|PF_A_START|PF_Z_START)) + { + if(FLAGS(pf,PF_Z_START)) + *out++/*=(unsigned char)(color.GetZ()*255.0f)*/; + if(FLAGS(pf,PF_A_START)) + *out++=static_cast(alpha); + } + else + { + if(FLAGS(pf,PF_A_START)) + *out++=static_cast(alpha); + if(FLAGS(pf,PF_Z_START)) + *out++/*=(unsigned char)(color.GetZ()*255.0f)*/; + + } + + if(FLAGS(pf,PF_GRAY)) + *out++=static_cast(gamma.g_F32_to_U8(color.get_y())); + else + { + if(FLAGS(pf,PF_BGR)) + { + *out++=static_cast(gamma.r_F32_to_U8(color.get_b())); + *out++=static_cast(gamma.g_F32_to_U8(color.get_g())); + *out++=static_cast(gamma.b_F32_to_U8(color.get_r())); + } + else + { + *out++=static_cast(gamma.r_F32_to_U8(color.get_r())); + *out++=static_cast(gamma.g_F32_to_U8(color.get_g())); + *out++=static_cast(gamma.b_F32_to_U8(color.get_b())); + } + } + + if(FLAGS(pf,PF_ZA)) + { + if(!FLAGS(pf,PF_Z_START) && FLAGS(pf,PF_Z)) + out++;//*out++=(unsigned char)(color.GetZ()*255.0f); + if(!FLAGS(pf,PF_A_START) && FLAGS(pf,PF_A)) + *out++=static_cast(alpha); + } + else + { + if(!FLAGS(pf,PF_Z_START) && FLAGS(pf,PF_Z)) + out++;//*out++=(unsigned char)(color.GetZ()*255.0f); + if(!FLAGS(pf,PF_A_START) && FLAGS(pf,PF_A)) + *out++=static_cast(alpha); + } + return out; +} + +inline void +convert_color_format(unsigned char *dest, const Color *src, int w, PixelFormat pf,const Gamma &gamma) +{ + assert(w>=0); + while(w--) + dest=Color2PixelFormat((*(src++)).clamped(),pf,dest,gamma); +} + +inline const unsigned char * +PixelFormat2Color(Color &color, const PixelFormat &pf,const unsigned char *out) +{ + if(FLAGS(pf,PF_ZA|PF_A_START|PF_Z_START)) + { + if(FLAGS(pf,PF_Z_START)) + out++;//color.SetZ((Color::value_type)*out++/255.0f); + if(FLAGS(pf,PF_A_START)) + color.set_a((float)*out++/255); + } + else + { + if(FLAGS(pf,PF_A_START)) + color.set_a((float)*out++/255); + if(FLAGS(pf,PF_Z_START)) + out++;//color.SetZ((Color::value_type)*out++/255.0f); + } + + if(FLAGS(pf,PF_GRAY)) + color.set_yuv((float)*out++/255,0,0); + else + { + if(FLAGS(pf,PF_BGR)) + { + color.set_b((float)*out++/255); + color.set_g((float)*out++/255); + color.set_r((float)*out++/255); + } + else + { + color.set_r((float)*out++/255); + color.set_g((float)*out++/255); + color.set_b((float)*out++/255); + } + } + + if(FLAGS(pf,PF_ZA)) + { + if(!FLAGS(pf,PF_Z_START) && FLAGS(pf,PF_Z)) + out++;//color.SetZ((Color::value_type)*out++/255.0f); + if(!FLAGS(pf,PF_A_START) && FLAGS(pf,PF_A)) + color.set_a((float)*out++/255); + } + else + { + if(!FLAGS(pf,PF_A_START) && FLAGS(pf,PF_A)) + color.set_a((float)*out++/255); + if(!FLAGS(pf,PF_Z_START) && FLAGS(pf,PF_Z)) + out++;//color.SetZ((Color::value_type)*out++/255.0f); + } + return out; +} + + + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/context.cpp b/synfig-core/src/synfig/context.cpp new file mode 100644 index 0000000..38e0f67 --- /dev/null +++ b/synfig-core/src/synfig/context.cpp @@ -0,0 +1,421 @@ +/* === S Y N F I G ========================================================= */ +/*! \file context.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "context.h" +#include "layer.h" +#include "layer_composite.h" +#include "string.h" +#include "vector.h" +#include "color.h" +#include "surface.h" +#include "renddesc.h" +#include "valuenode.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +// #define SYNFIG_PROFILE_LAYERS +// #define SYNFIG_DEBUG_LAYERS + +/* === G L O B A L S ======================================================= */ + +#ifdef SYNFIG_PROFILE_LAYERS +#include +static int depth(0); +static std::map time_table; +static std::map run_table; +static etl::clock profile_timer; +static String curr_layer; +static void +_print_profile_report() +{ + synfig::info(">>>> Profile Report: (Times are in msecs)"); + std::map::iterator iter; + float total_time(0); + for(iter=time_table.begin();iter!=time_table.end();++iter) + { + String layer(iter->first); + float time(iter->second); + int runs(run_table[layer]); + total_time+=time; + synfig::info(" Layer \"%s\",\tExecs: %03d, Avg Time: %05.1f, Total Time: %05.1f",layer.c_str(),runs,time/runs*1000,time*1000); + } + synfig::info("Total Time: %f seconds", total_time); + synfig::info("<<<< End of Profile Report"); +} +#endif // SYNFIG_PROFILE_LAYERS + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +Color +Context::get_color(const Point &pos)const +{ + Context context(*this); + + while(!context->empty()) + { + // If this layer is active, then go + // ahead and break out of the loop + if((*context)->active()) + break; + + // Otherwise, we want to keep searching + // till we find either an active layer, + // or the end of the layer list + ++context; + } + + // If this layer isn't defined, return alpha + if((context)->empty()) return Color::alpha(); + + RWLock::ReaderLock lock((*context)->get_rw_lock()); + + return (*context)->get_color(context+1, pos); +} + +Rect +Context::get_full_bounding_rect()const +{ + Context context(*this); + + while(!context->empty()) + { + // If this layer is active, then go + // ahead and break out of the loop + if((*context)->active()) + break; + + // Otherwise, we want to keep searching + // till we find either an active layer, + // or the end of the layer list + ++context; + } + + // If this layer isn't defined, return zero-sized rectangle + if(context->empty()) return Rect::zero(); + + return (*context)->get_full_bounding_rect(context+1); +} + + +/* Profiling will go like this: + Profile start = +, stop = - + + + + - + + time diff is recorded + + to get the independent times we need to break at the one inside and record etc... + so it looks more like this: + + + + - + + + - + + + ... + - + + + - + + + - + + at each minus we must record all the info for that which we are worried about... + each layer can do work before or after the other work is done... so both values must be recorded... +*/ + +bool +Context::accelerated_render(Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb) const +{ +#ifdef SYNFIG_PROFILE_LAYERS + String layer_name(curr_layer); + + //sum the pre-work done by layer above us... (curr_layer is layer above us...) + if(depth>0) + { + time_table[curr_layer]+=profile_timer(); + //if(run_table.count(curr_layer))run_table[curr_layer]++; + // else run_table[curr_layer]=1; + } +#endif // SYNFIG_PROFILE_LAYERS + + const Rect bbox(renddesc.get_rect()); + + // this is going to be set to true if this layer contributes + // nothing, but it's a straight blend with non-zero amount, and so + // it has an effect anyway + bool straight_and_empty = false; + etl::handle composite; + Context context(*this); + + for(;!(context)->empty();++context) + { + // If we are not active then move on to next layer + if(!(*context)->active()) + continue; + + const Rect layer_bounds((*context)->get_bounding_rect()); + composite = etl::handle::cast_dynamic(*context); + + // If the box area is less than zero or the boxes do not + // intersect then move on to next layer, unless the layer is + // using a straight blend and has a non-zero amount, in which + // case it will still affect the result + if(layer_bounds.area() <= 0.0000000000001 || !(layer_bounds && bbox)) + { + if (composite && + Color::is_straight(composite->get_blend_method()) && + composite->get_amount() != 0.0f) + { + straight_and_empty = true; + break; + } + continue; + } + + // If this layer has Straight as the blend method and amount + // is 1.0, and the layer doesn't depend on its context, then + // we don't want to render the context + if (composite && + composite->get_blend_method() == Color::BLEND_STRAIGHT && + composite->get_amount() == 1.0f && + !composite->reads_context()) + { + Layer::Handle layer = *context; + while (!context->empty()) context++; // skip the context + return layer->accelerated_render(context,surface,quality,renddesc, cb); + } + + // Break out of the loop--we have found a good layer + break; + } + + // If this layer isn't defined, return alpha + if (context->empty() || (straight_and_empty && composite->get_amount() == 1.0f)) + { +#ifdef SYNFIG_DEBUG_LAYERS + synfig::info("Context::accelerated_render(): Hit end of list"); +#endif // SYNFIG_DEBUG_LAYERS + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + surface->clear(); +#ifdef SYNFIG_PROFILE_LAYERS + profile_timer.reset(); +#endif // SYNFIG_PROFILE_LAYERS + return true; + } + +#ifdef SYNFIG_DEBUG_LAYERS + synfig::info("Context::accelerated_render(): Descending into %s",(*context)->get_name().c_str()); +#endif // SYNFIG_DEBUG_LAYERS + + try { + RWLock::ReaderLock lock((*context)->get_rw_lock()); + +#ifdef SYNFIG_PROFILE_LAYERS + //go down one layer :P + depth++; + curr_layer=(*context)->get_name(); //make sure the layer inside is referring to the correct layer outside + profile_timer.reset(); // + +#endif // SYNFIG_PROFILE_LAYERS + + bool ret; + + // this layer doesn't draw anything onto the canvas we're + // rendering, but it uses straight blending, so we need to render + // the stuff under us and then blit transparent pixels over it + // using the appropriate 'amount' + if (straight_and_empty) + { + if ((ret = Context((context+1)).accelerated_render(surface,quality,renddesc,cb))) + { + Surface clearsurface; + clearsurface.set_wh(renddesc.get_w(),renddesc.get_h()); + clearsurface.clear(); + + Surface::alpha_pen apen(surface->begin()); + apen.set_alpha(composite->get_amount()); + apen.set_blend_method(composite->get_blend_method()); + + clearsurface.blit_to(apen); + } + } + else + ret = (*context)->accelerated_render(context+1,surface,quality,renddesc, cb); + +#ifdef SYNFIG_PROFILE_LAYERS + //post work for the previous layer + time_table[curr_layer]+=profile_timer(); //- + if(run_table.count(curr_layer))run_table[curr_layer]++; + else run_table[curr_layer]=1; + + depth--; + curr_layer = layer_name; //we are now onto this layer (make sure the post gets recorded correctly... + + //print out the table it we're done... + if(depth==0) _print_profile_report(),time_table.clear(),run_table.clear(); + profile_timer.reset(); //+ +#endif // SYNFIG_PROFILE_LAYERS + + return ret; + } + catch(std::bad_alloc) + { + synfig::error("Context::accelerated_render(): Layer \"%s\" threw a bad_alloc exception!",(*context)->get_name().c_str()); +#ifdef _DEBUG + return false; +#else // _DEBUG + ++context; + return context.accelerated_render(surface, quality, renddesc, cb); +#endif // _DEBUG + } + catch(...) + { + synfig::error("Context::accelerated_render(): Layer \"%s\" threw an exception, rethrowing...",(*context)->get_name().c_str()); + throw; + } +} + +void +Context::set_time(Time time)const +{ + Context context(*this); + while(!(context)->empty()) + { + // If this layer is active, and + // it either isn't already set to the given time or + // it's a time loop layer, + // then break out of the loop and set its time + if((*context)->active() && + (!(*context)->dirty_time_.is_equal(time) || + (*context)->get_name() == "timeloop")) + break; + + // Otherwise, we want to keep searching + // till we find either an active layer, + // or the end of the layer list + ++context; + } + + // If this layer isn't defined, just return + if((context)->empty()) return; + + // Set up a writer lock + RWLock::WriterLock lock((*context)->get_rw_lock()); + + //synfig::info("%s: dirty_time=%f",(*context)->get_name().c_str(),(float)(*context)->dirty_time_); + //synfig::info("%s: time=%f",(*context)->get_name().c_str(),(float)time); + + { + Layer::ParamList params; + Layer::DynamicParamList::const_iterator iter; + + for(iter=(*context)->dynamic_param_list().begin();iter!=(*context)->dynamic_param_list().end();iter++) + params[iter->first]=(*iter->second)(time); + + (*context)->set_param_list(params); + + (*context)->set_time(context+1,time); + (*context)->dirty_time_=time; + + } +} + +void +Context::set_time(Time time,const Vector &/*pos*/)const +{ + set_time(time); +/* + Context context(*this); + while(!(context)->empty()) + { + // If this layer is active, then go + // ahead and break out of the loop + if((*context)->active()) + break; + + // Otherwise, we want to keep searching + // till we find either an active layer, + // or the end of the layer list + ++context; + } + + // If this layer isn't defined, just return + if((context)->empty()) return; + + else + { + Layer::ParamList params; + Layer::DynamicParamList::const_iterator iter; + + for(iter=(*context)->dynamic_param_list().begin();iter!=(*context)->dynamic_param_list().end();iter++) + params[iter->first]=(*iter->second)(time); + + (*context)->set_param_list(params); + + (*context)->set_time(context+1,time,pos); + } +*/ +} + +etl::handle +Context::hit_check(const Point &pos)const +{ + Context context(*this); + + while(!context->empty()) + { + // If this layer is active, then go + // ahead and break out of the loop + if((*context)->active()) + break; + + // Otherwise, we want to keep searching + // till we find either an active layer, + // or the end of the layer list + ++context; + } + + // If this layer isn't defined, return an empty handle + if((context)->empty()) return 0; + + return (*context)->hit_check(context+1, pos); +} diff --git a/synfig-core/src/synfig/context.h b/synfig-core/src/synfig/context.h new file mode 100644 index 0000000..c03d312 --- /dev/null +++ b/synfig-core/src/synfig/context.h @@ -0,0 +1,87 @@ +/* === S Y N F I G ========================================================= */ +/*! \file context.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_CONTEXT_H +#define __SYNFIG_CONTEXT_H + +/* === H E A D E R S ======================================================= */ + +#include "canvasbase.h" +#include "rect.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class Vector; +typedef Vector Point; +class Color; +class Surface; +class RendDesc; +class ProgressCallback; +class Layer; +class Time; +class Rect; + +/*! \class Context +** \todo writeme +** \see Layer, Canvas */ +class Context : public CanvasBase::const_iterator +{ +public: + Context() { } + + Context(const CanvasBase::const_iterator &x):CanvasBase::const_iterator(x) { } + + Context operator=(const CanvasBase::const_iterator &x) + { return CanvasBase::const_iterator::operator=(x); } + + /*! \todo write me */ + Color get_color(const Point &pos)const; + + /*! \todo write me */ + bool accelerated_render(Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb) const; + + /*! \todo write me */ + void set_time(Time time)const; + + /*! \writeme */ + void set_time(Time time,const Vector &pos)const; + + Rect get_full_bounding_rect()const; + + /*! \writeme */ + etl::handle hit_check(const Point &point)const; + +}; // END of class Context + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/curve_helper.cpp b/synfig-core/src/synfig/curve_helper.cpp new file mode 100644 index 0000000..d599620 --- /dev/null +++ b/synfig-core/src/synfig/curve_helper.cpp @@ -0,0 +1,704 @@ +/* === S Y N F I G ========================================================= */ +/*! \file curve_helper.cpp +** \brief Curve Helper File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "curve_helper.h" + +#include +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ +#define ERR 1e-11 +const Real ERROR = 1e-11; + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +Real synfig::find_closest(const etl::bezier &curve, const Point &point, + float step, Real *dout, float *tout) +{ +#if 0 + float time(curve.find_closest(point,4)); + Real dist((curve(time)-point).mag()); + if(dout) *dout=dist; + if(tout) *tout=time; + return time; +#else + Real d,closest = 1.0e50; + float t,time,closestt = -1; + Vector p0,p1,end; + + if(dout && *dout > 0) + closest = *dout; + + p0 = curve[0]; + end = curve[3]; + + for(t = step; t < 1; t+=step, p0=p1) + { + p1 = curve(t); + d = line_point_distsq(p0,p1,point,time); + + if(d=0) + { + if(tout) *tout = closestt; + } + + return closest; +#endif +} + +// Line and BezHull Definitions +void BezHull::Bound(const etl::bezier &b) +{ + #if 1 + + //with a starting vertex, find the only vertex that has all other vertices on its right + int i,j; + int first,cur,last; + + float d,ds; + + Vector n,vi; + Vector::value_type deqn; + + //get left most vertex + d = b[0][0]; + first = 0; + for(i = 1; i < 4; ++i) + { + if(b[i][0] < d) + { + d = b[i][0]; + first = i; + } + } + cur = last = first; + size = 0; + + //find the farthest point with all points on right + ds = 0; + do //should reassign cur so it won't break on first step + { + for(i = 0; i < 4; ++i) + { + if(i == cur || i == last) continue; + + //rotate vector to right to make normal + vi = -(b[i] - b[cur]).perp(); + d = vi.mag_squared(); + + //we want only the farthest (solves the case with many points on a line) + if(d > ds) + { + ds = d; + deqn = n*b[cur]; + for(j = 0; j < 4; ++j) + { + d = n*b[i] - deqn; + if(d < 0) break; //we're on left, nope! + } + + //everyone is on right... yay! :) + if(d >= 0) + { + //advance point and add last one into hull + p[size++] = p[last]; + last = cur; + cur = i; + } + } + } + }while(cur != first); + + #else + + //will work but does not keep winding order + + //convex hull alg. + //build set of line segs which have no points on other side... + //start with initial normal segments + + //start with single triangle + p[0] = b[0]; + p[1] = b[1]; + p[2] = b[2]; + p[3] = b[3]; + + //initial reject (if point is inside triangle don't care) + { + Vector v1,v2,vp; + + v1 = p[1]-p[0]; + v2 = p[2]-p[0]; + + vp = p[3]-p[0]; + + float s = (vp*v1) / (v1*v1), + t = (vp*v2) / (v2*v2); + + //if we're inside the triangle we don't this sissy point + if( s >= 0 && s <= 1 && t >= 0 && t <= 1 ) + { + size = 3; + return; + } + } + + //expand triangle based on info... + bool line; + int index,i,j; + float ds,d; + + //distance from point to vertices + line = false; + index = 0; + ds = (p[0]-b[3]).mag_squared(); + for(i = 1; i < 3; ++i) + { + d = (p[3]-p[i]).mag_squared(); + if(d < ds) + { + index = i; + ds = d; + } + } + + //distance to line + float t; + j = 2; + for(i = 0; i < 3; j = i++) + { + d = line_point_distsq(p[j],p[i],b[4],t); + if(d < ds) + { + index = j; + ds = d; + line = true; + } + } + + //We don't need no stinkin extra vertex, just replace + if(!line) + { + p[index] = p[3]; + size = 3; + }else + { + //must expand volume to work with point... + // after the index then + + /* Pattern: + 0 - push 1,2 -> 2,3 + 1 - push 2 -> 3 + 2 - none + */ + for(i = 3; i > index+1; --i) + { + p[i] = p[i-1]; + } + + p[index] = b[3]; //recopy b3 + size = 4; + } + + #endif +} + +//Line Intersection +int +synfig::intersect(const Point &p1, const Vector &v1, float &t1, + const Point &p2, const Vector &v2, float &t2) +{ + /* Parametric intersection: + l1 = p1 + tv1, l2 = p2 + sv2 + + 0 = p1+tv1-(p2+sv2) + group parameters: sv2 - tv1 = p1-p2 + + ^ = transpose + invert matrix (on condition det != 0): + A[t s]^ = [p1-p2]^ + + A = [-v1 v2] + + det = v1y.v2x - v1x.v2y + + if non 0 then A^-1 = invdet * | v2y -v2x | + | v1y -v1x | + + [t s]^ = A^-1 [p1-p2]^ + */ + + Vector::value_type det = v1[1]*v2[0] - v1[0]*v2[1]; + + //is determinant valid? + if(det > ERR || det < -ERR) + { + Vector p_p = p1-p2; + + det = 1/det; + + t1 = det*(v2[1]*p_p[0] - v2[0]*p_p[1]); + t2 = det*(v1[1]*p_p[0] - v1[0]*p_p[1]); + + return 1; + } + + return 0; +} + +//Returns the true or false intersection of a rectangle and a line +int intersect(const Rect &r, const Point &p, const Vector &v) +{ + float t[4] = {0}; + + /*get horizontal intersections and then vertical intersections + and intersect them + + Vertical planes - n = (1,0) + Horizontal planes - n = (0,1) + + so if we are solving for ray with implicit line + */ + + //solve horizontal + if(v[0] > ERR || v[0] < -ERR) + { + //solve for t0, t1 + t[0] = (r.minx - p[0])/v[0]; + t[1] = (r.maxx - p[0])/v[0]; + }else + { + return (int)(p[1] >= r.miny && p[1] <= r.maxy); + } + + //solve vertical + if(v[1] > ERR || v[1] < -ERR) + { + //solve for t0, t1 + t[2] = (r.miny - p[1])/v[1]; + t[3] = (r.maxy - p[1])/v[1]; + }else + { + return (int)(p[0] >= r.minx && p[0] <= r.maxx); + } + + return (int)(t[0] <= t[3] && t[1] >= t[2]); +} + +int synfig::intersect(const Rect &r, const Point &p) +{ + return (p[1] < r.maxy && p[1] > r.miny) && p[0] > r.minx; +} + +//returns 0 or 1 for true or false number of intersections of a ray with a bezier convex hull +int intersect(const BezHull &bh, const Point &p, const Vector &v) +{ + float mint = 0, maxt = 1e20; + + //polygon clipping + Vector n; + Vector::value_type nv; + + Point last = bh.p[3]; + for(int i = 0; i < bh.size; ++i) + { + n = (bh.p[i] - last).perp(); //rotate 90 deg. + + /* + since rotated left + if n.v < 0 - going in + > 0 - going out + = 0 - parallel + */ + nv = n*v; + + //going OUT + if(nv > ERR) + { + maxt = min(maxt,(float)((n*(p-last))/nv)); + }else + if( nv < -ERR) //going IN + { + mint = max(mint,(float)((n*(p-last))/nv)); + }else + { + if( n*(p-last) > 0 ) //outside entirely + { + return 0; + } + } + + last = bh.p[i]; + } + + return 0; +} + +int Clip(const Rect &r, const Point &p1, const Point &p2, Point *op1, Point *op2) +{ + float t1=0,t2=1; + Vector v=p2-p1; + + /*get horizontal intersections and then vertical intersections + and intersect them + + Vertical planes - n = (1,0) + Horizontal planes - n = (0,1) + + so if we are solving for ray with implicit line + */ + + //solve horizontal + if(v[0] > ERR || v[0] < -ERR) + { + //solve for t0, t1 + float tt1 = (r.minx - p1[0])/v[0], + tt2 = (r.maxx - p1[0])/v[0]; + + //line in positive direction (normal comparisons + if(tt1 < tt2) + { + t1 = max(t1,tt1); + t2 = min(t2,tt2); + }else + { + t1 = max(t1,tt2); + t2 = min(t2,tt1); + } + }else + { + if(p1[1] < r.miny || p1[1] > r.maxy) + return 0; + } + + //solve vertical + if(v[1] > ERR || v[1] < -ERR) + { + //solve for t0, t1 + float tt1 = (r.miny - p1[1])/v[1], + tt2 = (r.maxy - p1[1])/v[1]; + + //line in positive direction (normal comparisons + if(tt1 < tt2) + { + t1 = max(t1,tt1); + t2 = min(t2,tt2); + }else + { + t1 = max(t1,tt2); + t2 = min(t2,tt1); + } + }else + { + if(p1[0] < r.minx || p1[0] > r.maxx) + return 0; + } + + if(op1) *op1 = p1 + v*t1; + if(op2) *op2 = p1 + v*t2; + + return 1; +} + +static void clean_bez(const bezier &b, bezier &out) +{ + bezier temp; + + temp = b; + temp.set_r(0); + temp.set_s(1); + + if(b.get_r() != 0) + temp.subdivide(0,&temp,b.get_r()); + + if(b.get_s() != 1) + temp.subdivide(&temp,0,b.get_s()); + + out = temp; +} + +// CIntersect Definitions + +CIntersect::CIntersect() + : max_depth(10) //depth of 10 means timevalue parameters will have an approx. error bound of 2^-10 +{ +} + +struct CIntersect::SCurve +{ + bezier b; //the current subdivided curve + float rt,st; + //float mid, //the midpoint time value on this section of the subdivided curve + // scale; //the current delta in time values this curve would be on original curve + + float mag; //approximate sum of magnitudes of each edge of control polygon + Rect aabb; //Axis Aligned Bounding Box for quick (albeit less accurate) collision + + SCurve() {} + + SCurve(const bezier &c,float rin, float sin) + :b(c),rt(rin),st(sin),mag(1) + { + Bound(aabb,b); + } + + void Split(SCurve &l, SCurve &r) const + { + b.subdivide(&l.b,&r.b); + + l.rt = rt; + r.st = st; + l.st = r.rt = (rt+st)/2; + + Bound(l.aabb,l.b); + Bound(r.aabb,r.b); + } +}; + +//Curve to the left of point test +static int recurse_intersect(const CIntersect::SCurve &b, const Point &p1, int depthleft = 10) +{ + //reject when the line does not intersect the bounding box + if(!intersect(b.aabb,p1)) return 0; + + //accept curves (and perform super detailed check for intersections) + //if the values are below tolerance + + //NOTE FOR BETTERING OF ALGORITHM: SHOULD ALSO/IN-PLACE-OF CHECK MAGNITUDE OF EDGES (or approximate) + if(depthleft <= 0) + { + //NOTE FOR IMPROVEMENT: Polish roots based on original curve + // (may be too expensive to be effective) + int turn = 0; + + for(int i = 0; i < 3; ++i) + { + //intersect line segments + + //solve for the y_value + Vector v = b.b[i+1] - b.b[i]; + + if(v[1] > ERROR && v[1] < ERROR) + { + Real xi = (p1[1] - b.b[i][1])/v[1]; + + //and add in the turn (up or down) if it's valid + if(xi < p1[0]) turn += (v[1] > 0) ? 1 : -1; + } + } + + return turn; + } + + //subdivide the curve and continue + CIntersect::SCurve l1,r1; + b.Split(l1,r1); //subdivide left + + //test each subdivision against the point + return recurse_intersect(l1,p1) + recurse_intersect(r1,p1); +} + +int intersect(const bezier &b, const Point &p) +{ + CIntersect::SCurve sb; + clean_bez(b,sb.b); + + sb.rt = 0; sb.st = 1; + sb.mag = 1; Bound(sb.aabb,sb.b); + + return recurse_intersect(sb,p); +} + +//Curve curve intersection +void CIntersect::recurse_intersect(const SCurve &left, const SCurve &right, int depth) +{ + //reject curves that do not overlap with bounding boxes + if(!intersect(left.aabb,right.aabb)) return; + + //accept curves (and perform super detailed check for intersections) + //if the values are below tolerance + + //NOTE FOR BETTERING OF ALGORITHM: SHOULD ALSO/IN-PLACE-OF CHECK MAGNITUDE OF EDGES (or approximate) + if(depth >= max_depth) + { + //NOTE FOR IMPROVEMENT: Polish roots based on original curve with the Jacobian + // (may be too expensive to be effective) + + //perform root approximation + //collide line segments + + float t,s; + + for(int i = 0; i < 3; ++i) + { + for(int j = 0; j < 3; ++j) + { + //intersect line segments + if(intersect_line_segments(left.b[i],left.b[i+1],t,right.b[j],right.b[j+1],s)) + { + //We got one Jimmy + times.push_back(intersect_set::value_type(t,s)); + } + } + } + + return; + } + + //NOTE FOR IMPROVEMENT: only subdivide one curve and choose the one that has + // the highest approximated length + //fast approximation to curve length may be hard (accurate would + // involve 3 square roots), could sum the squares which would be + // quick but inaccurate + + SCurve l1,r1,l2,r2; + left.Split(l1,r1); //subdivide left + right.Split(l2,r2); //subdivide right + + //Test each candidate against each other + recurse_intersect(l1,l2); + recurse_intersect(l1,r2); + recurse_intersect(r1,l2); + recurse_intersect(r1,r2); +} + + + +bool CIntersect::operator()(const etl::bezier &c1, const etl::bezier &c2) +{ + times.clear(); + + //need to subdivide and check recursive bounding regions against each other + //so track a list of dirty curves and compare compare compare + + + //temporary curves for subdivision + CIntersect intersector; + CIntersect::SCurve left,right; + + //Make sure the parameters are normalized (so we don't compare unwanted parts of the curves, + // and don't miss any for that matter) + + //left curve + //Compile information about curve + clean_bez(c1,left.b); + left.rt = 0; left.st = 1; + Bound(left.aabb, left.b); + + //right curve + //Compile information about right curve + clean_bez(c2,right.b); + right.rt = 0; right.st = 1; + Bound(right.aabb, right.b); + + //Perform Curve intersection + intersector.recurse_intersect(left,right); + + //Get information about roots (yay! :P) + return times.size() != 0; +} + +//point inside curve - return +/- hit up or down edge +int intersect_scurve(const CIntersect::SCurve &b, const Point &p) +{ + //initial reject/approve etc. + + /* + *-----------*--------- + | | + | | + | | + | 1 | 2 + | | + | | + | | + | | + *-----------*-------- + 1,2 are only regions not rejected + */ + if(p[0] < b.aabb.minx || p[1] < b.aabb.miny || p[1] > b.aabb.maxy) + return 0; + + //approve only if to the right of rect around 2 end points + { + Rect r; + r.set_point(b.b[0][0],b.b[0][1]); + r.expand(b.b[3][0],b.b[3][1]); + + if(p[0] >= r.maxx && p[1] <= r.maxy && p[1] >= r.miny) + { + float df = b.b[3][1] - b.b[0][1]; + + return df >= 0 ? 1 : -1; + } + } + + //subdivide and check again! + CIntersect::SCurve l,r; + b.Split(l,r); + return intersect_scurve(l,p) + intersect_scurve(r,p); +} + +int synfig::intersect(const bezier &b, const Point &p) +{ + CIntersect::SCurve c(b,0,1); + + return intersect_scurve(c,p); +} diff --git a/synfig-core/src/synfig/curve_helper.h b/synfig-core/src/synfig/curve_helper.h new file mode 100644 index 0000000..620387f --- /dev/null +++ b/synfig-core/src/synfig/curve_helper.h @@ -0,0 +1,172 @@ +/* === S Y N F I G ========================================================= */ +/*! \file curve_helper.h +** \brief Curve Helper Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_CURVE_HELPER_H +#define __SYNFIG_CURVE_HELPER_H + +/* === H E A D E R S ======================================================= */ +#include + +#include "rect.h" +#include "real.h" +#include "vector.h" + +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +//line helper functions +inline Real line_point_distsq(const Point &p1, const Point &p2, + const Point &p, float &t) +{ + Vector v,vt; + + v = p2 - p1; + vt = p - p1; + + t = v.mag_squared() > 1e-12 ? (vt*v)/v.mag_squared() : 0; //get the projected time value for the current line + + //get distance to line segment with the time value clamped 0-1 + if(t >= 1) //use p+v + { + vt += v; //makes it pp - (p+v) + t = 1; + }else if(t > 0) //use vt-proj + { + vt -= v * t; // vt - proj_v(vt) //must normalize the projection vector to work + }else + { + t = 0; + } + + //else use p + return vt.mag_squared(); +} + + +//----- RAY CLASS AND FUNCTIONS -------------- +struct Ray +{ + Point p; + Vector v; + + Ray() {} + Ray(const Point &pin, const Vector &vin):p(pin), v(vin) {} +}; + +/* This algorithm calculates the INTERSECTION of 2 line segments + (not the closest point or anything like that, just intersection) + //parameter values returned are [0,1] +*/ +int intersect(const Point &p1, const Vector &v1, float &t1, + const Point &p2, const Vector &v2, float &t2); + +inline bool intersect_line_segments(const Point &a, const Point &b, float &tout, + const Point &c, const Point &d, float &sout) +{ + Vector v1(b-a), v2(d-c); + + //ok so treat both lines as parametric (so we can find the time values simultaneously) + float t,s; + + if( intersect(a,v1,t, b,v2,s) && t >= 0 && t <= 1 && s >= 0 && s <= 1 ) + { + tout = t; + sout = s; + return true; + } + + return false; +} + +//Find the closest point on the curve to a point (and return its distance, and time value) +Real find_closest(const etl::bezier &curve, const Point &point, float step, Real *closest, float *t); + +//----------- Rectangle helper functions --------------- + +template < typename T > +inline void Bound(etl::rect &r, const etl::bezier &b) +{ + r.set_point(b[0][0],b[0][1]); + r.expand(b[1][0],b[1][1]); + r.expand(b[2][0],b[2][1]); + r.expand(b[3][0],b[3][1]); +} + +/*template < typename T > +inline bool intersect(const etl::rect &r1, const etl::rect &r2) +{ + return (r1.minx < r2.maxx) & + (r2.minx < r1.maxx) & + (r1.miny < r2.maxy) & + (r2.miny < r1.maxy); +}*/ + +//----- Convex Hull of a Bezier Curve -------------- +struct BezHull +{ + Point p[4]; + int size; + + void Bound(const etl::bezier &b); +}; + +//Line Intersection +int intersect(const Rect &r1, const Point &p, const Vector &v); +int intersect(const Rect &r1, const Point &p); //inside or to the right +int intersect(const BezHull &bh, const Point &p, const Vector &v); +//int intersect(const etl::bezier &b, const Point &p, const Vector &v); +int intersect(const etl::bezier &b, const Point &p); //for use in containment tests for regions + +//Curve intersection object +class CIntersect +{ +public: + struct SCurve; +private: + void recurse_intersect(const SCurve &left, const SCurve &right, int depth = 0); + +public: + //size should be equal + typedef std::vector< std::pair > intersect_set; + intersect_set times; + + int max_depth; + + CIntersect(); + + bool operator()(const etl::bezier &b1, const etl::bezier &b2); +}; + +}; // END of namespace studio + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/curveset.cpp b/synfig-core/src/synfig/curveset.cpp new file mode 100644 index 0000000..e8bd7fa --- /dev/null +++ b/synfig-core/src/synfig/curveset.cpp @@ -0,0 +1,483 @@ +/* === S Y N F I G ========================================================= */ +/*! \file curveset.cpp +** \brief Curve Set Implementation File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "curve_helper.h" +#include "curveset.h" +#include "blinepoint.h" +#include +#include +#include +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ +const Real ERROR = 1e-10; + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ +template < typename T > +inline bool Zero(const T &a, const T &tol = (T)ERROR) +{ + return a < tol && a > -tol; +} + +CurvePoint::CurvePoint(const Point &pin, const Vector &left, const Vector &right) +:p(pin),l(left),r(right) +{ +} + +CurvePoint::CurvePoint(const BLinePoint &bpoint) +{ + p = bpoint.get_vertex(); + + l = p + bpoint.get_tangent1()*(1/3.0f); + r = p + bpoint.get_tangent2()*(1/3.0f); +} + +struct ipoint +{ + int curveindex; + int vertindex; + float tvalue; + + ipoint *next; + ipoint *prev; + ipoint *neighbor; + + int go_in; //going in = 1, coming out = -1 + + ipoint() + { + next = this; + prev = this; + neighbor = 0; + } + + bool operator<(const ipoint &rhs) const + { + if(curveindex == rhs.curveindex) + { + if(vertindex == rhs.vertindex) + { + return tvalue < rhs.tvalue; + }else return vertindex < rhs.vertindex; + }else return curveindex < rhs.curveindex; + } + + bool operator>(const ipoint &rhs) const + { + return rhs < *this; + } + + void insert_after(ipoint *i) + { + //from: next - next.prev + //to: next* - i - next.prev* + + ipoint *bef = this, + *aft = next; + + //assuming the input point is not connected to anything, we don't have to do anything with it... + bef->next = i; + i->prev = bef; + aft->prev = i; + i->next = aft; + } + + void insert_before(ipoint *i) + { + //from: prev.next - prev + //to: prev.next* - i - prev* + + ipoint *bef = prev, + *aft = this; + + //assuming the input point is not connected to anything, we don't have to do anything with it... + bef->next = i; + i->prev = bef; + aft->prev = i; + i->next = aft; + } + + void insert_sorted(ipoint *i) + { + ipoint *search = this; + + if(*i < *this) + { + //we go forward + search = this; + do + { + search = search->next; + }while(*i < *search && search != this); //ending conditions... + + //now we insert previously... + search->insert_before(i); + }else if(*i > *this) + { + //we go backwards... + search = this; + do + { + search = search->prev; + }while(*i > *search && search != this); //ending conditions... + + //now we insert previously... + search->insert_after(i); + } + } +}; + +enum SetOp +{ + INTERSECT = 0, + UNION, + SUBTRACT, + INVSUBTRACT, + NUM_SETOPERATIONS +}; + +class PolygonClipper +{ +public: + typedef vector CurveInts; //in no particular order + + vector c1ints; + vector c2ints; + + //get the intersections + void GetIntersections(const CurveSet &lhs, const CurveSet &rhs) + { + CIntersect isect; + bezier b1,b2; + + int i1,j1,ci1,s1; + int i2,j2,ci2,s2; + + //clear out so everyone's happy + c1ints.clear(); + c2ints.clear(); + + c1ints.resize(lhs.set.size()); + c2ints.resize(rhs.set.size()); + + //loop through everyone and be happy... + + //intersect each curve with each other curve, and we're good + for(ci1=0;ci1 < (int)lhs.set.size(); ++ci1) + { + const CurveSet::region &cur1 = lhs.set[ci1]; + s1 = cur1.size(); + for(j1 = s1-1, i1=0; i1 < s1; j1 = i1++) + { + b1[0] = cur1[j1].p; + b1[3] = cur1[i1].p; + b1[1] = b1[0] + cur1[j1].r/3; + b1[2] = b1[3] - cur1[i1].l/3; + + for(ci2=0;ci2 < (int)rhs.set.size(); ++ci2) + { + const CurveSet::region &cur2 = rhs.set[ci2]; + s2 = cur2.size(); + for(j2 = s2-1, i2=0; i2 < s2; j2 = i2++) + { + b2[0] = cur2[j2].p; + b2[3] = cur2[i2].p; + b2[1] = b2[0] + cur2[j2].r/3; + b2[2] = b2[3] - cur2[i2].l/3; + + isect(b1,b2); + + for(int index=0; index < (int)isect.times.size(); ++index) + { + //prepare basic intersection information + ipoint *ip1 = new ipoint, *ip2 = new ipoint; + + //set parameters + ip1->curveindex = ci1; ip1->vertindex = j1; ip1->tvalue = isect.times[index].first; + ip2->curveindex = ci2; ip2->vertindex = j2; ip2->tvalue = isect.times[index].second; + + //set neighbors + ip1->neighbor = ip2; + ip2->neighbor = ip1; + + //first one just goes on end of list + c1ints[ci1].back()->insert_sorted(ip1); + c1ints[ci1].push_back(ip1); + + //second one must go in order + c2ints[ci2].back()->insert_sorted(ip2); + c2ints[ci2].push_back(ip2); + + //we're all good... + } + } + } + } + } + + //Now figure out the containment properties of each int point + Point p; + int inside = 0; + for(int i = 0; i < (int)c1ints.size(); ++i) + { + if(c1ints[i].size() == 0) continue; + + //must test insideness for the edges + ipoint *start, *iter; + start = iter = c1ints[i].front(); + + //i == iter->curveindex == the index of the current curve we're looking at + + //set the initial insideness on the other curve... + p = lhs.set[i][iter->vertindex].p; + inside = rhs.intersect(p)%2; //if it's inside by the even odd rule + + do + { + iter->go_in = inside? -1 : 1; //leaving if inside, or coming in if not + inside = !inside; + iter = iter->next; + }while(iter != start); //I hope this isn't an infinite loop! + } + + //and curve 2 + for(int i = 0; i < (int)c2ints.size(); ++i) + { + if(c2ints[i].size() == 0) continue; + + //must test insideness for the edges + ipoint *start, *iter; + start = iter = c1ints[i].front(); + + //set the initial insideness on the other curve... + p = rhs.set[i][iter->vertindex].p; + inside = lhs.intersect(p)%2; //if it's inside by the even odd rule + + do + { + iter->go_in = inside? -1 : 1; //leaving if inside, or coming in if not + inside = !inside; + iter = iter->next; + }while(iter != start); //I hope this isn't an infinite loop! + } + } + + bool ConstructSet(CurveSet &/*c*/, const CurveSet &lhs, const CurveSet &rhs, int type) + { + bool in1,in2; + + switch(type) + { + case INTERSECT: //1&2 + { + in1 = true; in2 = true; + break; + } + + case UNION: //1|2 + { + in1 = false; in2 = false; + break; + } + + case SUBTRACT: //1-2 + { + in1 = true; in2 = false; + break; + } + + case INVSUBTRACT: //2-1 + { + in1 = false; in2 = true; + break; + } + + default: + { + return false; + } + } + + //traverse path based on inside flags + + //fill all the paths of native stuff + set ipset; + for(int ci=0; ci<(int)c1ints.size(); ++ci) + { + for(int i=0; i < (int)c1ints[ci].size(); ++i) + { + ipset.insert(c1ints[ci][i]); + } + } + + // + while(ipset.size() > 0) + { + //start from one point (always on curveset 1) and traverse until we find it again + ipoint *start, *iter; + start = iter = *ipset.begin(); + + //All the info to swap when we transition curves... + const CurveSet *cur, *other; + bool curin, otherin; + bool delcur = true; + + set::iterator deliter; + + int ci,i1,i2,size; + float t1,t2; + + CurveSet::region current; + CurvePoint cp; + + cur = &lhs; other = &rhs; + curin = in1; otherin = in2; + delcur = true; + + do + { + //remove the current iter from the set + if(delcur) + { + deliter = ipset.find(iter); + if(deliter != ipset.end()) ipset.erase(deliter); + } + + //go to next and accumulate information + ci = iter->curveindex; + i1 = iter->vertindex; + t1 = iter->tvalue; + iter = iter->next; //move to next and get its info + + i2 = iter->vertindex; + t2 = iter->tvalue; + + size = cur->set[ci].size(); + + //record all the stuff between us... + //start on an intersection - get the curve point... + + + //transition curves... + iter = iter->neighbor; + swap(cur,other); + swap(curin,otherin); + delcur = !delcur; + }while(iter != start); //I hope THIS isn't an infinite loop + } + + return true; + } +}; + +void CurveSet::SetClamp(int &i, int &si) +{ + if(si > 0 && si < (int)set.size()) + { + if(i >= (int)set[si].size()) + { + i -= set[si].size(); + si++; + }else if (i < 0) + { + i += set[si].size(); + si--; + } + } +} + +void CurveSet::CleanUp(int /*curve*/) +{ +} + +/* Detect intersections that are crazy happy good + + Performance annoyances: + 1) Recursing down to find an intersection at the end points that doesn't actually exist + (can be helped a bit by not including the edges of bounding rectangles) + 2) Intersecting curves is slow... oh well + + Algorithm: + 1) Inside out scheme, track when edges go into and come out of various objects etc. + + + doesn't require initial conditions + - only works with odd-even rule +*/ + +CurveSet CurveSet::operator&(const CurveSet &/*rhs*/) const +{ + return *this; +} + +CurveSet CurveSet::operator|(const CurveSet &/*rhs*/) const +{ + return *this; +} + +CurveSet CurveSet::operator-(const CurveSet &/*rhs*/) const +{ + return *this; +} + +int CurveSet::intersect(const Point &p) const +{ + int inter = 0, ci,i,j,s; + bezier b; + + for(ci=0; ci < (int)set.size(); ++ci) + { + const vector &curve = set[ci]; + s = curve.size(); + for(j=s-1,i=0; i < s; j = i++) + { + b[0] = curve[j].p; b[3] = curve[i].p; + b[1] = b[0] + curve[j].r/3; b[2] = b[3] - curve[i].l/3; + + inter += synfig::intersect(b,p); + } + } + + return inter; +} diff --git a/synfig-core/src/synfig/curveset.h b/synfig-core/src/synfig/curveset.h new file mode 100644 index 0000000..a34976a --- /dev/null +++ b/synfig-core/src/synfig/curveset.h @@ -0,0 +1,92 @@ +/* === S Y N F I G ========================================================= */ +/*! \file curveset.h +** \brief Curve Set Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_CURVESET_H +#define __SYNFIG_CURVESET_H + +/* === H E A D E R S ======================================================= */ +#include "blinepoint.h" +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ +namespace synfig +{ + +class BLinePoint; + +struct CurvePoint +{ + Point p; + Point l,r; + + CurvePoint () {} + CurvePoint(const Point &pin, const Vector &left, const Vector &right); + + CurvePoint(const BLinePoint &bpoint); +}; + +class CurveSet +{ + bool invert; //winding order... + + void CleanUp(int curve = 0); +public: + + typedef std::vector region; + typedef std::vector set_type; + + set_type set; //specifies a region object (assumes looping) + + void SetClamp(int &i, int &si); + + //actual stuff + CurveSet() + { + } + + //anything supporting iterator type operations + template < typename Iterator > + CurveSet(Iterator begin, Iterator end, bool invert = false) + { + set.push_back(std::vector(begin,end)); + CleanUp(invert); + } + + CurveSet operator&(const CurveSet &rhs) const; //intersect + CurveSet operator|(const CurveSet &rhs) const; //union + CurveSet operator-(const CurveSet &rhs) const; //subtract + + + //Point containment + int intersect(const Point &p) const; +}; + +} +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/distance.cpp b/synfig-core/src/synfig/distance.cpp new file mode 100644 index 0000000..efac8e9 --- /dev/null +++ b/synfig-core/src/synfig/distance.cpp @@ -0,0 +1,257 @@ +/* === S Y N F I G ========================================================= */ +/*! \file distance.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "distance.h" +#include "renddesc.h" +#include "general.h" +#include +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +#define POINTS_PER_INCH (72.0) +#define INCHES_PER_METER (39.3700787402) +#define POINTS_PER_METER (POINTS_PER_INCH*INCHES_PER_METER) +#define CENTIMETERS_PER_METER (100.0) +#define MILLIMETERS_PER_METER (1000.0) + +#define METERS_PER_UNIT (rend_desc.get_physical_w()/abs(rend_desc.get_tl()[0]-rend_desc.get_br()[0])) + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +Distance::Distance(const synfig::String& str) +{ + (*this)=str; +/* int i(0); + float val; + int ret(strscanf(str,"%f%n",&val,&i)); + synfig::info("Distance::Distance(): ret=%d, val=%f",ret,val); + + if(ret<=0) + { + // Error + synfig::error("Distance::Distance(): Bad value \"%s\"",str.c_str()); + value_=0; + } + else + value_=val; + + synfig::info("Distance::Distance(): system=\"%s\"",String(str.begin()+i,str.end()).c_str()); + system_=ident_system(String(str.begin()+i,str.end())); +*/ +} + +Distance& +Distance::operator=(const synfig::String& str) +{ + int i(0); + float val; + int ret(strscanf(str,"%f%n",&val,&i)); + // synfig::info("Distance::Distance(): ret=%d, val=%f",ret,val); + + if(ret<=0) + { + // Error + synfig::error("Distance::Distance(): Bad value \"%s\"",str.c_str()); + return *this; + } + else + value_=val; + + synfig::String sys(str.begin()+i,str.end()); + + if(sys.size()) + system_=ident_system(sys); + return *this; +} + +synfig::String +Distance::get_string(int digits)const +{ + digits=min(9,max(0,digits)); + String fmt(strprintf("%%.%01df%%s",digits)); + return strprintf(fmt.c_str(),value_,system_name(system_).c_str()); +} + +void +Distance::convert(Distance::System target, const RendDesc& rend_desc) +{ + value_=get(target,rend_desc); + system_=target; +} + +Real +Distance::get(Distance::System target, const RendDesc& rend_desc)const +{ + if(target==SYSTEM_UNITS) + return units(rend_desc); + if(target==SYSTEM_PIXELS) + return units(rend_desc)*METERS_PER_UNIT*rend_desc.get_x_res(); + + return meters_to_system(meters(rend_desc),target); +} + +Real +Distance::meters()const +{ + switch(system_) + { + case SYSTEM_INCHES: return value_/INCHES_PER_METER; + case SYSTEM_POINTS: return value_/POINTS_PER_METER; + case SYSTEM_METERS: return value_; + case SYSTEM_CENTIMETERS: return value_/CENTIMETERS_PER_METER; + case SYSTEM_MILLIMETERS: return value_/MILLIMETERS_PER_METER; + default: throw BadSystem(); + } +} + +Real +Distance::meters(const RendDesc& rend_desc)const +{ + if(system_>SYSTEM_PIXELS) + return meters(); + if(system_==SYSTEM_UNITS) + return value_*METERS_PER_UNIT; + if(system_==SYSTEM_PIXELS) + return value_/rend_desc.get_x_res(); + + throw BadSystem(); +} + +Real +Distance::units(const RendDesc& rend_desc)const +{ + if(system_==SYSTEM_UNITS) + return value_; + + Real ret; + + if(system_>SYSTEM_PIXELS) + ret=meters(); + else + ret=value_/rend_desc.get_x_res(); + + return ret/METERS_PER_UNIT; +} + + +Real // (static) +Distance::meters_to_system(Real x,System target_system) +{ + switch(target_system) + { + case SYSTEM_INCHES: return x*INCHES_PER_METER; + case SYSTEM_POINTS: return x*POINTS_PER_METER; + case SYSTEM_METERS: return x; + case SYSTEM_CENTIMETERS: return x*CENTIMETERS_PER_METER; + case SYSTEM_MILLIMETERS: return x*MILLIMETERS_PER_METER; + default: throw BadSystem(); + } +} + +Distance::System // (static) +Distance::ident_system(const synfig::String& x) +{ + synfig::String str; + + // Make it all upper case, and remove white space + for(unsigned int i=0;i const Time& operator+=(const U &rhs) { value_+=rhs; return *this; } + template const Time& operator-=(const U &rhs) { value_-=rhs; return *this; } + template const Time& operator*=(const U &rhs) { value_*=rhs; return *this; } + template const Time& operator/=(const U &rhs) { value_/=rhs; return *this; } + + template Time operator+(const U &rhs)const { return value_+rhs; } + template Time operator-(const U &rhs)const { return value_-rhs; } + template Time operator*(const U &rhs)const { return value_*rhs; } + template Time operator/(const U &rhs)const { return value_/rhs; } + + Time operator-()const { return -value_; } +*/ +}; // END of class Distance + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/exception.cpp b/synfig-core/src/synfig/exception.cpp new file mode 100644 index 0000000..9896cff --- /dev/null +++ b/synfig-core/src/synfig/exception.cpp @@ -0,0 +1,105 @@ +/* === S Y N F I G ========================================================= */ +/*! \file exception.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "exception.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +Exception::BadLinkName::BadLinkName(const String &what): + std::runtime_error(what) +// std::runtime_error(_("Bad Link Name")+what.empty()?"":(String(": ")+what)) +{ + synfig::error("EXCEPTION: bad link name: "+what); +} + +Exception::BadType::BadType(const String &what): + std::runtime_error(what) +// std::runtime_error(_("Bad Type")+what.empty()?"":(String(": ")+what)) +{ + synfig::error("EXCEPTION: bad type: "+what); +} + +Exception::BadFrameRate::BadFrameRate(const String &what): + std::runtime_error(what) +// std::runtime_error(_("Bad Link Name")+what.empty()?"":(String(": ")+what)) +{ + synfig::error("EXCEPTION: bad frame rate: "+what); +} + +Exception::BadTime::BadTime(const String &what): + std::runtime_error(what) +// std::runtime_error(_("Bad Link Name")+what.empty()?"":(String(": ")+what)) +{ + synfig::error("EXCEPTION: bad time: "+what); +} + +Exception::NotFound::NotFound(const String &what): + std::runtime_error(what) +// std::runtime_error(_("Not Found")+what.empty()?"":(String(": ")+what)) +{ +// synfig::error("EXCEPTION: not found: "+what); +} + +Exception::IDNotFound::IDNotFound(const String &what): + NotFound(what) +// std::runtime_error(_("Not Found")+what.empty()?"":(String(": ")+what)) +{ +// synfig::error("EXCEPTION: not found: "+what); +} + +Exception::FileNotFound::FileNotFound(const String &what): + NotFound(what) +// std::runtime_error(_("Not Found")+what.empty()?"":(String(": ")+what)) +{ + synfig::error("EXCEPTION: file not found: "+what); +} + +Exception::IDAlreadyExists::IDAlreadyExists(const String &what): + std::runtime_error(what) +// std::runtime_error(_("ID Already Exists")+what.empty()?"":(String(": ")+what)) +{ + synfig::error("EXCEPTION: id already exists: "+what); +} diff --git a/synfig-core/src/synfig/exception.h b/synfig-core/src/synfig/exception.h new file mode 100644 index 0000000..2132c16 --- /dev/null +++ b/synfig-core/src/synfig/exception.h @@ -0,0 +1,97 @@ +/* === S Y N F I G ========================================================= */ +/*! \file exception.h +** \brief Exceptions +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_EXCEPTION_H +#define __SYNFIG_EXCEPTION_H + +/* === H E A D E R S ======================================================= */ + +#include +#include "string_decl.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +namespace Exception { + +class BadLinkName : public std::runtime_error +{ +public: + BadLinkName(const String &what); +}; // END of class BadLinkName + +class BadType : public std::runtime_error +{ +public: + BadType(const String &what); +}; // END of class BadType + +class IDAlreadyExists : public std::runtime_error +{ +public: + IDAlreadyExists(const String &what); +}; + +class NotFound : public std::runtime_error +{ +public: + NotFound(const String &what); +}; + +class IDNotFound : public NotFound +{ +public: + IDNotFound(const String &what); +}; + +class FileNotFound : public NotFound +{ +public: + FileNotFound(const String &what); +}; + +class BadTime : public std::runtime_error +{ +public: + BadTime(const String &what); +}; + +class BadFrameRate : public std::runtime_error +{ +public: + BadFrameRate(const String &what); +}; + +}; // END of namespace Exception + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/gamma.cpp b/synfig-core/src/synfig/gamma.cpp new file mode 100644 index 0000000..f1d1add --- /dev/null +++ b/synfig-core/src/synfig/gamma.cpp @@ -0,0 +1,193 @@ +/* === S Y N F I G ========================================================= */ +/*! \file gamma.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "gamma.h" +#include +#include +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +//using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +void +Gamma::set_gamma(float x) +{ + gamma_r=gamma_g=gamma_b=x; + int i; + red_blue_level=1.0f; + for(i=0;i<65536;i++) + { + float f(float(i)/65536.0f); + f=pow(f,gamma_r); + table_r_U16_to_U8[i]=table_g_U16_to_U8[i]=table_b_U16_to_U8[i]=(unsigned char)(f*(255.0f-(black_level*255))+0.5f + black_level*255.0f); + } + + for(i=0;i<256;i++) + table_r_U8_to_F32[i]=table_g_U8_to_F32[i]=table_b_U8_to_F32[i]=pow((float(i)/255.0f)*(1.0f-black_level)+black_level,gamma_r); +} + + +void +Gamma::refresh_gamma_r() +{ + int i; +// const float scalar(min(red_blue_level,1.0f)); + const float scalar(1.0f); + for(i=0;i<65536;i++) + { + float f(float(i)/65536.0f); + f=pow(f,gamma_r)*scalar; + table_r_U16_to_U8[i]=(unsigned char)(f*(255.0f-(black_level*255))+0.5f + black_level*255.0f); + } + + for(i=0;i<256;i++) + table_r_U8_to_F32[i]=pow((float(i)/255.0f)*(1.0f-black_level)+black_level,gamma_r)*scalar; +} + +void +Gamma::refresh_gamma_g() +{ + int i; +// const float scalar(sqrt(min(red_blue_level,2.0f-red_blue_level))); + const float scalar(1.0f); + for(i=0;i<65536;i++) + { + float f(float(i)/65536.0f); + f=pow(f,gamma_g)*scalar; + table_g_U16_to_U8[i]=(unsigned char)(f*(255.0f-(black_level*255))+0.5f + black_level*255.0f); + } + for(i=0;i<256;i++) + table_g_U8_to_F32[i]=pow((float(i)/255.0f)*(1.0f-black_level)+black_level,gamma_g)*scalar; +} + +void +Gamma::refresh_gamma_b() +{ + int i; +// const float scalar(min(2.0f-red_blue_level,1.0f)); + const float scalar(1.0f); + for(i=0;i<65536;i++) + { + float f(float(i)/65536.0f); + f=pow(f,gamma_b)*scalar; + table_b_U16_to_U8[i]=(unsigned char)(f*(255.0f-(black_level*255))+0.5f + black_level*255.0f); + } + for(i=0;i<256;i++) + table_b_U8_to_F32[i]=pow((float(i)/255.0f)*(1.0f-black_level)+black_level,gamma_b)*scalar; +} + +void +Gamma::set_gamma_r(float x) +{ + // If the gamma hasn't changed, then don't recompute the tables + if(x==gamma_r) return; + + gamma_r=x; + refresh_gamma_r(); +} + +void +Gamma::set_gamma_g(float x) +{ + // If the gamma hasn't changed, then don't recompute the tables + if(x==gamma_g) return; + + gamma_g=x; + refresh_gamma_g(); +} + +void +Gamma::set_gamma_b(float x) +{ + // If the gamma hasn't changed, then don't recompute the tables + if(x==gamma_b) return; + + gamma_b=x; + refresh_gamma_b(); +} + +void +Gamma::set_black_level(float x) +{ + // If the black_level hasn't changed, then don't recompute the tables + if(x==black_level) return; + + black_level=x; + + // Rebuild tables + refresh_gamma_r(); + refresh_gamma_g(); + refresh_gamma_b(); +} + +void +Gamma::set_red_blue_level(float x) +{ + // If the black_level hasn't changed, then don't recompute the tables + if(x==red_blue_level) return; + + red_blue_level=x; + + // Rebuild tables + refresh_gamma_r(); + refresh_gamma_g(); + refresh_gamma_b(); +} + +void +Gamma::set_all(float r, float g, float b, float black, float red_blue) +{ + // If nothing has changed, then don't recompute the tables + if(gamma_r==r && gamma_g==g && gamma_b==b && black_level==black && red_blue_level==red_blue) + return; + + gamma_r=r; + gamma_g=g; + gamma_b=b; + black_level=black; + red_blue_level=red_blue; + + // Rebuild tables + refresh_gamma_r(); + refresh_gamma_g(); + refresh_gamma_b(); +} diff --git a/synfig-core/src/synfig/gamma.h b/synfig-core/src/synfig/gamma.h new file mode 100644 index 0000000..0d3da08 --- /dev/null +++ b/synfig-core/src/synfig/gamma.h @@ -0,0 +1,108 @@ +/* === S Y N F I G ========================================================= */ +/*! \file gamma.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_GAMMA_H +#define __SYNFIG_GAMMA_H + +/* === H E A D E R S ======================================================= */ + +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/*! \class Gamma +** \brief This class performs color correction on Color classes. +** \stub +*/ +class Gamma +{ + float gamma_r; + float gamma_g; + float gamma_b; + float black_level; + float red_blue_level; + + unsigned char table_r_U16_to_U8[65536]; + unsigned char table_g_U16_to_U8[65536]; + unsigned char table_b_U16_to_U8[65536]; + + float table_r_U8_to_F32[256]; + float table_g_U8_to_F32[256]; + float table_b_U8_to_F32[256]; + +public: + Gamma(float x=1):black_level(0) { set_gamma(x); } + + void set_gamma(float x); + void set_gamma_r(float x); + void set_gamma_g(float x); + void set_gamma_b(float x); + void set_black_level(float x); + + void set_red_blue_level(float x); + void set_all(float r, float g, float b, float black, float red_blue=1.0f); + + float get_gamma()const { return (gamma_r+gamma_g+gamma_b)*0.33333333; } + float get_gamma_r()const { return gamma_r; } + float get_gamma_g()const { return gamma_g; } + float get_gamma_b()const { return gamma_b; } + float get_black_level()const { return black_level; } + float get_red_blue_level()const { return red_blue_level; } + + void refresh_gamma_r(); + void refresh_gamma_g(); + void refresh_gamma_b(); + + const unsigned char &r_U16_to_U8(int i)const { return table_r_U16_to_U8[i]; } + const unsigned char &g_U16_to_U8(int i)const { return table_g_U16_to_U8[i]; } + const unsigned char &b_U16_to_U8(int i)const { return table_b_U16_to_U8[i]; } + + const unsigned char &r_F32_to_U8(float x)const { return table_r_U16_to_U8[(int)(x*65535.0f)]; } + const unsigned char &g_F32_to_U8(float x)const { return table_g_U16_to_U8[(int)(x*65535.0f)]; } + const unsigned char &b_F32_to_U8(float x)const { return table_b_U16_to_U8[(int)(x*65535.0f)]; } + + unsigned short r_F32_to_U16(float x)const { return (unsigned short)table_r_U16_to_U8[(int)(x*65535.0f)]<<8; } + unsigned short g_F32_to_U16(float x)const { return (unsigned short)table_g_U16_to_U8[(int)(x*65535.0f)]<<8; } + unsigned short b_F32_to_U16(float x)const { return (unsigned short)table_b_U16_to_U8[(int)(x*65535.0f)]<<8; } + + const float& r_U8_to_F32(int i)const { return table_r_U8_to_F32[i]; } + const float& g_U8_to_F32(int i)const { return table_g_U8_to_F32[i]; } + const float& b_U8_to_F32(int i)const { return table_b_U8_to_F32[i]; } + + float r_F32_to_F32(float x)const { return static_cast(pow(x,gamma_r)*(1.0f-black_level)+black_level); } + float g_F32_to_F32(float x)const { return static_cast(pow(x,gamma_g)*(1.0f-black_level)+black_level); } + float b_F32_to_F32(float x)const { return static_cast(pow(x,gamma_b)*(1.0f-black_level)+black_level); } +}; // END of class Gamma + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/general.h b/synfig-core/src/synfig/general.h new file mode 100644 index 0000000..639eb51 --- /dev/null +++ b/synfig-core/src/synfig/general.h @@ -0,0 +1,156 @@ +/* === S Y N F I G ========================================================= */ +/*! \file general.h +** \brief General macros, classes, and procedure declarations +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_GENERAL_H +#define __SYNFIG_GENERAL_H + +/* === H E A D E R S ======================================================= */ + +#include +#include "string.h" +#include "version.h" +#ifdef ENABLE_NLS + #include + #include +#endif + +/* === M A C R O S ========================================================= */ + +#ifdef ENABLE_NLS +#define _(x) dgettext("synfig",x) +#define gettext_noop(x) x +#define N_(x) gettext_noop(x) +#else +#define dgettext(a,x) (x) +#define _(x) (x) +#define N_(x) (x) +#endif + +#define SYNFIG_COPYRIGHT "Copyright (c) 2001-2005 Robert B. Quattlebaum Jr., Adrian Bentley" + + +#ifdef _DEBUG +#ifdef __FUNC__ +#define DEBUGPOINT() synfig::warning(etl::strprintf(__FILE__":"__FUNC__":%d DEBUGPOINT",__LINE__)) +#define DEBUGINFO(x) synfig::warning(etl::strprintf(__FILE__":"__FUNC__":%d:DEBUGINFO:",__LINE__)+x) +#else +#define DEBUGPOINT() synfig::warning(etl::strprintf(__FILE__":%d DEBUGPOINT",__LINE__)) +#define DEBUGINFO(x) synfig::warning(etl::strprintf(__FILE__":%d:DEBUGINFO:",__LINE__)+x) +#endif + +#else +#define DEBUGPOINT() +#define DEBUGINFO(x) +#endif + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class ChangeLocale { + const String previous; + const int category; +public: + ChangeLocale(int category, const char *locale): + previous(setlocale(category,locale)),category(category) + { + } + ~ChangeLocale() { + setlocale(category,previous.c_str()); + } +}; + +/*! \class ProgressCallback +** \todo writeme +*/ +class ProgressCallback +{ +public: + + virtual ~ProgressCallback() { } + virtual bool task(const String &/*task*/) { return true; } + virtual bool error(const String &/*task*/) { return true; } + virtual bool warning(const String &/*task*/) { return true; } + virtual bool amount_complete(int /*current*/, int /*total*/) { return true; } + + virtual bool valid() const { return true; } +}; + +typedef ProgressCallback ProgressManager; + +/*! \class SuperCallback +** \todo writeme +*/ +class SuperCallback : public ProgressCallback +{ + ProgressCallback *cb; + int start,end,tot; + int w; +public: + + SuperCallback() { cb=NULL; } + SuperCallback(ProgressCallback *cb,int start, int end, int total):cb(cb),start(start),end(end),tot(total) + { + //make sure we don't "inherit" if our subcallback is invalid + if(!cb || !cb->valid()) + cb = NULL; + w=end-start; + } + virtual bool task(const String &task) { if(cb)return cb->task(task); return true; } + virtual bool error(const String &task) { if(cb)return cb->error(task); return true; } + virtual bool warning(const String &task) { if(cb)return cb->warning(task); return true; } + virtual bool amount_complete(int cur, int total) { if(cb)return cb->amount_complete(start+cur*w/total,tot); return true; } + + virtual bool valid() const { return cb != 0; } +}; + + +/* +extern bool add_to_module_search_path(const std:string &path); +extern bool add_to_config_search_path(const std:string &path); +*/ + +//! Shutdown the synfig environment +extern void shutdown(); + +//! Reports an error +/*! Call this when an error occurs, describing what happened */ +extern void error(const char *format,...); +extern void error(const String &str); + +//! Reports a warning +/*! Call this when something questionable occurs, describing what happened */ +extern void warning(const char *format,...); +extern void warning(const String &str); + +//! Reports some information +/*! Call this to report various information. Please be sparse... */ +extern void info(const char *format,...); +extern void info(const String &str); + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/gradient.cpp b/synfig-core/src/synfig/gradient.cpp new file mode 100644 index 0000000..00f67b0 --- /dev/null +++ b/synfig-core/src/synfig/gradient.cpp @@ -0,0 +1,574 @@ +/* === S Y N F I G ========================================================= */ +/*! \file gradient.cpp +** \brief Color Gradient Class Member Definitions +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "gradient.h" +#include "general.h" +#include +#include "exception.h" +#include + +#include +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +synfig::Gradient::Gradient(const Color &c1, const Color &c2) +{ + push_back(CPoint(0.0,c1)); + push_back(CPoint(1.0,c2)); +} + +synfig::Gradient::Gradient(const Color &c1, const Color &c2, const Color &c3) +{ + push_back(CPoint(0.0,c1)); + push_back(CPoint(0.5,c2)); + push_back(CPoint(1.0,c3)); +} + +// This sort algorithm MUST be stable +// ie: it must not change the order of items with the same value. +// I am using a bubble sort. +// This algorithm will sort a nearly-sorted list at ~O(N), and +// it will sort an inverse sorted list at ~O(N*N). +void +synfig::Gradient::sort() +{ + stable_sort(begin(),end()); + /* + iterator iter; + iterator iter2,next; + + for(iter=begin();iter!=end();iter++) + { + for(next=iter, iter2=next--;iter2!=begin();iter2=next--) + { + if(*iter<*next) + { + //insert(next,*iter); + //erase(iter); + iter_swap(next,iter); + + continue; + } + else + break; + } + } + */ +} + +static synfig::ColorAccumulator +supersample_helper(const synfig::Gradient::CPoint &color1, const synfig::Gradient::CPoint &color2, float begin, float end, float &weight) +{ + if(color1.pos==color2.pos || color1.pos>=end || color2.pos<=begin) + { + weight=0; + return Color::alpha(); + } + if(color1.pos>=begin && color2.pos=begin && color2.pos>=end) + { + weight=end-color1.pos; + float pos((end+color1.pos)*0.5); + float amount((pos-color1.pos)/(color2.pos-color1.pos)); + //if(abs(amount)>1)amount=(amount>0)?1:-1; + ColorAccumulator ret(Color::blend(color2.color,color1.color, amount, Color::BLEND_STRAIGHT).premult_alpha()*weight); + return ret; + } + if(color1.pos1)amount=(amount>0)?1:-1; + ColorAccumulator ret(Color::blend(color2.color,color1.color, amount, Color::BLEND_STRAIGHT).premult_alpha()*weight); + return ret; + } + synfig::error("color1.pos=%f",color1.pos); + synfig::error("color2.pos=%f",color2.pos); + synfig::error("begin=%f",begin); + synfig::error("end=%f",end); + + weight=0; + return Color::alpha(); + +// assert(0); +} + +static void show_gradient(const Gradient::CPointList x) +{ + int i = 0; + for (Gradient::const_iterator iter = x.begin(); iter != x.end(); iter++) + printf("%3d : %.3f %s\n", i++, (*iter).pos, (*iter).color.get_string().c_str()); +} + +Gradient & +synfig::Gradient::operator+=(const Gradient &rhs) +{ + bool print=false; // for debugging + if (print) { printf("\nadding lhs:\n"); show_gradient(this->cpoints); printf("\n"); } + if (print) { printf("adding rhs:\n"); show_gradient(rhs.cpoints); printf("\n"); } + CPointList ret; + const_iterator iter1 = begin(), iter2 = rhs.begin(), left_same, right_same; + CPoint left, right; + if (iter1 != end()) left = *iter1; + if (iter2 != rhs.end()) right = *iter2; + int pos1 = 0, pos2 = 0; + CPoint old1, old2; + + // if there are cpoints in both gradients run through both until one runs out + if (iter1 != end() && iter2 != rhs.end()) + while(true) + // if the left one has the first cpoint + if (left.pos < right.pos) + { + // add on the right gradient's value at this point + if (print) printf("using pos %.2f from left %d in loop\n", left.pos, pos1++); + ret.push_back(CPoint(left.pos, left.color + rhs(left.pos))); + if(++iter1 == end()) break; + left=*iter1; + } + // if the right one has the first cpoint + else if (left.pos > right.pos) + { + // add on the left gradient's value at this point + if (print) printf("using pos %.2f from right %d in loop\n", right.pos, pos2++); + ret.push_back(CPoint(right.pos, right.color + (*this)(right.pos))); + if(++iter2 == rhs.end()) break; + right=*iter2; + } + // they both have a cpoint at the same time + else + { + int tpos1 = pos1, tpos2 = pos2; + // skip past all cpoints at the same position + for(left_same = ++iter1; iter1 != end() && (*iter1).pos == left.pos; iter1++, pos1++) + if (print) printf("skipping past pos %d in left\n", pos1); + for(right_same = ++iter2; iter2 != rhs.end() && (*iter2).pos == right.pos; iter2++, pos2++) + if (print) printf("skipping past pos %d in right\n", pos2); + + // if there is only one cpoint at this position in each gradient, + // there's only one corresponding cpoint in the sum + if (iter1 == left_same && iter2 == right_same) + { + if (print) printf("two singles at left %d and right %d\n", pos1++, pos2++); + ret.push_back(CPoint(left.pos, left.color + right.color)); + } + // otherwise we sum the first in each, and the last in each + else + { + if (print) printf("[copying %ld from left %d and %ld from right %d at %.2f]\n", iter1-left_same+1, tpos1, iter2-right_same+1, tpos2, left.pos); + // merge the front two cpoints + if (print) printf(" copy front from left %d right %d\n", tpos1++, tpos2++); + ret.push_back(CPoint(left.pos, left.color + right.color)); + + // merge the middle pairs of points - each middle point merges with its counterpart + while(left_same < iter1-1 && right_same < iter2-1) + { + old1 = *(left_same++); + old2 = *(right_same++); + if (print) printf(" copy middle from left %d and right %d\n", tpos1++, tpos2++); + ret.push_back(CPoint(old1.pos, old1.color+old2.color)); + } + // if one gradient has more middle points than the other, merge the rest with the last point in the other gradient + for(old2 = (*(iter2-1)); left_same < iter1-1; left_same++) + { + old1 = *left_same; + if (print) printf(" copy middle from left %d plus end of right\n", tpos1++); + ret.push_back(CPoint(old1.pos, old1.color + old2.color)); + } + for(old1 = (*(iter1-1)); right_same < iter2-1; right_same++) + { + old2 = *right_same; + if (print) printf(" copy middle from right %d plus end of left\n", tpos2++); + ret.push_back(CPoint(old2.pos, old1.color + old2.color)); + } + // merge the back two cpoints + if (print) printf(" copy end from left %d right %d\n", pos1++, pos2++); + ret.push_back(CPoint(left.pos, (*(iter1-1)).color + (*(iter2-1)).color)); + } + // make sure we update 'left' and 'right' + if (iter1 != end()) left=*iter1; + if (iter2 == rhs.end()) break; + right = *iter2; + if (iter1 == end()) break; + } + + // one of the gradients has run out of points + // does the left one have points left? + if (iter1 != end()) + while(true) + { + if (print) printf("finish end from left %d\n", pos1++); + ret.push_back(CPoint(left.pos, left.color + rhs(left.pos))); + if(++iter1 == end()) break; + left = *iter1; + } + // the left one was empty, so maybe the right one has points left + else if (iter2 != rhs.end()) + while(true) + { + if (print) printf("finish end from right %d\n", pos2++); + ret.push_back(CPoint(right.pos, right.color + (*this)(right.pos))); + if(++iter2 == rhs.end()) break; + right = *iter2; + } + + if (print) { printf("\nsummed ret:\n"); show_gradient(ret); printf("\n"); } + cpoints = ret; + return *this; +} + +Gradient & +synfig::Gradient::operator-=(const Gradient &rhs) +{ + return (*this)+=(rhs*-1); +} + +Gradient & +synfig::Gradient::operator*=(const float &rhs) +{ + if (rhs == 0) + cpoints.clear(); + else + for (iterator iter = cpoints.begin(); iter!=cpoints.end(); iter++) + (*iter).color *= rhs; + return *this; +} + +Gradient & +synfig::Gradient::operator/=(const float &rhs) +{ + for (iterator iter = cpoints.begin(); iter!=cpoints.end(); iter++) + (*iter).color /= rhs; + return *this; +} + +Color +synfig::Gradient::operator()(const Real &x,float supersample)const +{ + if(cpoints.empty()) + return Color(0,0,0,0); + if(supersample<0) + supersample=-supersample; + if(supersample>2.0) + supersample=2.0f; + + float begin_sample(x-supersample*0.5); + float end_sample(x+supersample*0.5); + + if(cpoints.size()==1 || end_sample<=cpoints.front().pos || isnan(x)) + return cpoints.front().color; + + if(begin_sample>=cpoints.back().pos) + return cpoints.back().color; + + /* + if(end_sample>=back().pos) + end_sample=back().pos; + + if(begin_sample<=front().pos) + begin_sample=front().pos; + */ + + const_iterator iter,next; + + /* + //optimize... + Real left = x-supersample/2, right = x+supersample/2; + + if(left < front().pos) left = front().pos; + if(right > back().pos) right = back().pos; + + //find using binary search... + const_iterator iterl,iterr; + + //the binary search should give us the values BEFORE the point we're looking for... + iterl = binary_find(begin(),end(),left); + iterr = binary_find(iterl,end(),right); + + //now integrate over the range of left to right... + + if(iterl == iterr) + { + iterr++; //let's look at the next one shall we :) + + //interpolate neighboring colors + const Real one = iterr->pos - iterl->pos; + const Real lambda = (x - iterl->pos)/one; + + //(1-l)iterl + (l)iterr + return iterl->color.premult_alpha()*(1-lambda) + iterr->color.premult_alpha()*lambda; + + //return Color::blend(iterr->color,iterl->color,lambda,Color::BLEND_STRAIGHT); + }else + { + //integration madness + const_iterator i = iterl, ie = iterr+1; + Real wlast = left; + + ColorAccumulator clast,cwork; + { + const Real lambda = (x - iterl->pos)/(iterr->pos - iterl->pos); + + //premultiply because that's the form in which we can combine things... + clast = iterl->color.premult_alpha()*(1-lambda) + iterr->color.premult_alpha()*lambda; + //Color::blend((i+1)->color,i->color,(left - i->pos)/((i+1)->pos - i->pos),Color::BLEND_STRAIGHT); + } + + ColorAccumulator accum = 0; + + //loop through all the trapezoids and integrate them as we go... + // area of trap = (yi + yi1)*(xi1 - xi) + // yi = clast, xi = wlast, yi1 = i->color, xi1 = i->pos + + for(;i<=iterr; wlast=i->pos,clast=i->color.premult_alpha(),++i) + { + const Real diff = i->pos - wlast; + if(diff > 0) //only accumulate if there will be area to add + { + cwork = i->color.premult_alpha(); + accum += (cwork + clast)*diff; + } + } + + { + const_iterator ibef = i-1; + const Real diff = right - ibef->pos; + + if(diff > 0) + { + const Real lambda = diff/(i->pos - ibef->pos); + cwork = ibef->color.premult_alpha()*(1-lambda) + i->color.premult_alpha()*lambda; + + accum += (cwork + clast)*diff; //can probably optimize this more... but it's not too bad + } + } + + accum /= supersample; //should be the total area it was sampled over... + return accum.demult_alpha(); + }*/ + + next=begin(),iter=next++; + + //add for optimization + next = binary_find(begin(),end(),(Real)begin_sample); + iter = next++; + + //! As a future optimization, this could be performed faster + //! using a binary search. + for(;iter=iter->pos && xpos && iter->pos!=next->pos)) + { + // If the supersample region falls square in between + // two CPoints, then we don't have to do anything special. + if(next!=end() && (!supersample || (iter->pos<=begin_sample && next->pos>=end_sample))) + { + const Real dist(next->pos-iter->pos); + const Real pos(x-iter->pos); + const Real amount(pos/dist); + return Color::blend(next->color,iter->color, amount, Color::BLEND_STRAIGHT); + } + // In this case our supersample region extends over one or more + // CPoints. So, we need to calculate our coverage amount. + ColorAccumulator pool(Color::alpha()); + float divisor(0.0),weight(0); + + const_iterator iter2,next2; + iter2=iter; + if(iter==begin() && iter->pos>x) + { + weight=x-iter->pos; + //weight*=iter->color.get_a(); + pool+=ColorAccumulator(iter->color).premult_alpha()*weight; + divisor+=weight; + } + else + { + while(iter2->pos>=begin_sample) + { + if(iter2==begin()) + { + weight=iter2->pos-(begin_sample); + //weight*=iter2->color.get_a(); + pool+=ColorAccumulator(iter2->color).premult_alpha()*weight; + divisor+=weight; + break; + } + next2=iter2--; + pool+=supersample_helper(*iter2, *next2, begin_sample, end_sample, weight); + divisor+=weight; + } + } + + next2=iter; + iter2=next2++; + while(iter2->pos<=end_sample) + { + if(next2==end()) + { + weight=(end_sample)-iter2->pos; + pool+=ColorAccumulator(iter2->color).premult_alpha()*weight; + divisor+=weight; + break; + } + pool+=supersample_helper(*iter2, *next2, begin_sample, end_sample, weight); + divisor+=weight; + iter2=next2++; + } + + if(divisor && pool.get_a() && pool.is_valid()) + { +/* + pool.set_r(pool.get_r()/pool.get_a()); + pool.set_g(pool.get_g()/pool.get_a()); + pool.set_b(pool.get_b()/pool.get_a()); + pool.set_a(pool.get_a()/divisor); +*/ + pool/=divisor; + pool.set_r(pool.get_r()/pool.get_a()); + pool.set_g(pool.get_g()/pool.get_a()); + pool.set_b(pool.get_b()/pool.get_a()); + if(pool.is_valid()) + return pool; + else + return Color::alpha(); + } + else + return Color::alpha(); + } + } + + // We should never get to this point. + + synfig::error("synfig::Gradient::operator()(): Logic Error (x=%f)",x); + assert(0); + throw std::logic_error(strprintf("synfig::Gradient::operator()(): Logic Error (x=%f)",x)); +} + +synfig::Gradient::iterator +synfig::Gradient::proximity(const Real &x) +{ + iterator iter; + float dist(100000000); + float prev_pos(-0230); + // This algorithm requires a sorted list. + for(iter=begin();iterpos) + new_dist=(abs(x-iter->pos-0.00001)); + else + new_dist=(abs(x-iter->pos)); + + if(new_dist>dist) + { + iter--; + return iter; + } + dist=new_dist; + prev_pos=iter->pos; + } + iter--; + return iter; +} + +synfig::Gradient::const_iterator +synfig::Gradient::proximity(const Real &x)const +{ + return const_cast(this)->proximity(x); + /* + const_iterator iter; + float dist(100000000); + + // This algorithm requires a sorted list. + for(iter=begin();iterpos)); + if(new_dist>dist) + { + iter--; + return iter; + } + dist=new_dist; + } + iter--; + return iter; + */ +} + +synfig::Gradient::iterator +synfig::Gradient::find(const UniqueID &id) +{ + iterator iter; + + for(iter=begin();iter +#include +#include "uniqueid.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/*! \struct GradientCPoint +** \brief \todo +*/ +struct GradientCPoint : public UniqueID +{ + Real pos; + Color color; + + bool operator<(const GradientCPoint &rhs)const { return pos CPointList; + typedef CPointList::const_iterator const_iterator; + typedef CPointList::iterator iterator; + typedef CPointList::const_reverse_iterator const_reverse_iterator; + typedef CPointList::reverse_iterator reverse_iterator; +private: + CPointList cpoints; +public: + Gradient() { } + + //! Two-Tone Color Gradient Convenience Constructor + Gradient(const Color &c1, const Color &c2); + + //! Three-Tone Color Gradient Convenience Constructor + Gradient(const Color &c1, const Color &c2, const Color &c3); + + //! Alias for sort (Implemented for consistency) + void sync() { sort(); } + + //! You should call this function after changing stuff. + void sort(); + + void push_back(const CPoint cpoint) { cpoints.push_back(cpoint); } + iterator erase(iterator iter) { return cpoints.erase(iter); } + bool empty()const { return cpoints.empty(); } + size_t size()const { return cpoints.size(); } + + iterator begin() { return cpoints.begin(); } + iterator end() { return cpoints.end(); } + reverse_iterator rbegin() { return cpoints.rbegin(); } + reverse_iterator rend() { return cpoints.rend(); } + const_iterator begin()const { return cpoints.begin(); } + const_iterator end()const { return cpoints.end(); } + const_reverse_iterator rbegin()const { return cpoints.rbegin(); } + const_reverse_iterator rend()const { return cpoints.rend(); } + + Gradient &operator+=(const Gradient &rhs); + Gradient &operator-=(const Gradient &rhs); + Gradient &operator*=(const float &rhs); + Gradient &operator/=(const float &rhs); + + Gradient operator+(const Gradient &rhs)const { return Gradient(*this)+=rhs; } + Gradient operator-(const Gradient &rhs)const { return Gradient(*this)-=rhs; } + Gradient operator*(const float &rhs)const { return Gradient(*this)*=rhs; } + Gradient operator/(const float &rhs)const { return Gradient(*this)/=rhs; } + + Color operator()(const Real &x, float supersample=0)const; + + //! Returns the iterator of the CPoint closest to \a x + iterator proximity(const Real &x); + + //! Returns the const_iterator of the CPoint closest to \a x + const_iterator proximity(const Real &x)const; + + //! Returns the iterator of the CPoint with UniqueID \a id + iterator find(const UniqueID &id); + + //! Returns the const_iterator of the CPoint with UniqueID \a id + const_iterator find(const UniqueID &id)const; +}; // END of class Gradient + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/guid.cpp b/synfig-core/src/synfig/guid.cpp new file mode 100644 index 0000000..e537ba6 --- /dev/null +++ b/synfig-core/src/synfig/guid.cpp @@ -0,0 +1,206 @@ +/* === S Y N F I G ========================================================= */ +/*! \file guid.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "guid.h" +#include "quick_rng.h" +#include +#include +#include +#include +#include +#include + +#ifdef _DEBUG +#include "general.h" +#endif + +#ifdef HASH_MAP_H +#include HASH_MAP_H +#include FUNCTIONAL_H +#endif + +#ifdef _WIN32 +#include +#endif + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +#define MANUAL_GUID_CALC + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +#define GUID_RNG quick_rng +//#define GUID_RNG subtractive_rng + + + +#ifdef MANUAL_GUID_CALC +#include +static GUID_RNG _a, _b; +static void _set_up_rand_long_long(uint64_t &x); +static void _get_rand_long_long(uint64_t &x); +static void (*get_rand_long_long)(uint64_t&)=_set_up_rand_long_long; +static void _set_up_rand_long_long(uint64_t &x) +{ +#ifdef _DEBUG + // synfig::info("Starting up GUID system..."); +#endif + _a=GUID_RNG(time(0)+clock()); + _b=GUID_RNG(clock()); + get_rand_long_long=_get_rand_long_long; + _get_rand_long_long(x); +} + +static void _get_rand_long_long(uint64_t &x) +{ + //subtractive_rng _c(clock()); + unsigned short* data(reinterpret_cast(&x)); + data[0]=_a(65536); + data[1]=_a(65536); + data[2]=_a(65536); + data[3]=_a(65536); +} + +#else +// Use OS-Dependent method + +#ifdef _WIN32 +// Win32 +static void get_rand_long_long(uint64_t &x) +{ + _GUID* guid(reinterpret_cast<_GUID*>(&x)); + CoCreateGuid(guid); +} + +#else +// Unix +static int rand_fd; +static void _set_up_rand_long_long(uint64_t &x); +static void _get_rand_long_long(uint64_t &x); +static void (*get_rand_long_long)(uint64_t&)=_set_up_rand_long_long; +static void _set_up_rand_long_long(uint64_t &x) +{ +#ifdef _DEBUG + // synfig::info("Starting up GUID system..."); +#endif + rand_fd=open("/dev/urandom",O_RDONLY); + get_rand_long_long=_get_rand_long_long; + _get_rand_long_long(x); +} + +static void _get_rand_long_long(uint64_t &x){ read(rand_fd,&x,sizeof(x));} + +#endif +#endif + + + +void +synfig::GUID::make_unique() +{ + get_rand_long_long(data.u_64.a); + get_rand_long_long(data.u_64.b); +} + +synfig::GUID +synfig::GUID::hasher(const String& str) +{ +#ifdef HASH_MAP_H + /* http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2003/n1456.html says: + * + * "Some earlier hash table implementations gave char* special + * treatment: it specialized the default hash function to look + * at character array being pointed to, rather than the pointer + * itself. This proposal removes that special treatment." + * + * Unfortunately, the older implementation doesn't seem to want to + * accept Strings, so we're left with this conditional compilation. + */ +# ifdef FUNCTIONAL_HASH_ON_STRING + HASH_MAP_NAMESPACE::hash string_hash_; + const unsigned int seed(string_hash_(str)); +# else // FUNCTIONAL_HASH_ON_STRING + HASH_MAP_NAMESPACE::hash string_hash_; + const unsigned int seed(string_hash_(str.c_str())); +# endif // FUNCTIONAL_HASH_ON_STRING +#else // HASH_MAP_H + unsigned int seed(0x3B642879); + for(unsigned int i=0;i>(32-(i%24)))^(seed<<(i%24)); + } +#endif // HASH_MAP_H + + GUID_RNG random(seed); + GUID ret(0); + ret.data.u_32.a=random(~(unsigned int)0); + ret.data.u_32.b=random(~(unsigned int)0); + ret.data.u_32.c=random(~(unsigned int)0); + ret.data.u_32.d=random(~(unsigned int)0); + return ret; +} + +synfig::GUID +synfig::GUID::hasher(int i) +{ + GUID ret(0); + GUID_RNG random(i); + ret.data.u_32.a=random(~(unsigned int)0); + ret.data.u_32.b=random(~(unsigned int)0); + ret.data.u_32.c=random(~(unsigned int)0); + ret.data.u_32.d=random(~(unsigned int)0); + return ret; +} + +String +synfig::GUID::get_string()const +{ + return strprintf("%08X%08X%08X%08X",data.u_32.a,data.u_32.b,data.u_32.c,data.u_32.d); +} + +synfig::GUID::GUID(const String &str) +{ + strscanf(str,"%08X%08X%08X%08X",&data.u_32.a,&data.u_32.b,&data.u_32.c,&data.u_32.d); +} diff --git a/synfig-core/src/synfig/guid.h b/synfig-core/src/synfig/guid.h new file mode 100644 index 0000000..c822628 --- /dev/null +++ b/synfig-core/src/synfig/guid.h @@ -0,0 +1,141 @@ +/* === S Y N F I G ========================================================= */ +/*! \file guid.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_GUID_H +#define __SYNFIG_GUID_H + +/* === H E A D E R S ======================================================= */ + +#include "string.h" +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class GUID +{ + union { + struct { + unsigned int a; + unsigned int b; + unsigned int c; + unsigned int d; + } u_32; + struct { + uint64_t a; + uint64_t b; + } u_64; + + } data; + +public: + GUID() + { make_unique(); } + GUID(const GUID& x):data(x.data) + { } + GUID(const int i __attribute__ ((unused))){assert(!i); data.u_64.a=0;data.u_64.b=0;} + + GUID(const String& str); + + static GUID zero() { return GUID(0); } + static GUID hasher(const String& str); + static GUID hasher(int i); + + operator bool()const { return data.u_32.a||data.u_32.b||data.u_32.c||data.u_32.d; } + + uint64_t get_hi()const { return data.u_64.a; } + uint64_t get_lo()const { return data.u_64.b; } + + uint64_t get_hi_hi()const { return data.u_32.a; } + uint64_t get_hi_lo()const { return data.u_32.b; } + uint64_t get_lo_hi()const { return data.u_32.c; } + uint64_t get_lo_lo()const { return data.u_32.d; } + + void make_unique(); + String get_string()const; + + bool operator==(const GUID& rhs)const + { return data.u_64.a==rhs.data.u_64.a && data.u_64.b==rhs.data.u_64.b; } + bool operator!=(const GUID& rhs)const + { return data.u_64.a!=rhs.data.u_64.a || data.u_64.b!=rhs.data.u_64.b; } + bool operator<(const GUID& rhs)const + { return (data.u_64.a==rhs.data.u_64.a)?(data.u_64.b(const GUID& rhs)const + { return (data.u_64.a==rhs.data.u_64.a)?(data.u_64.b>rhs.data.u_64.b):(data.u_64.a>rhs.data.u_64.a); } + bool operator<=(const GUID& rhs)const + { return operator<(rhs) || operator==(rhs); } + bool operator>=(const GUID& rhs)const + { return operator>(rhs) || operator==(rhs); } + + //! Operator '^' (xor) + /*! If A ^ B == C, then C ^ B == A and B ^ A == C. + ** Also keep in mind that A ^ A == 0 and A ^ B ^ B = A. */ + GUID& operator^=(const GUID& rhs) + { + data.u_32.a^=rhs.data.u_32.a; + data.u_32.b^=rhs.data.u_32.b; + data.u_32.c^=rhs.data.u_32.c; + data.u_32.d^=rhs.data.u_32.d; + return *this; + } + GUID operator^(const GUID& rhs)const { return GUID(*this)^=rhs; } + + //! Operator '%' (alt-xor) + /*! A % B != B % A. */ + GUID& operator%=(const GUID& rhs) + { + data.u_32.a^=rhs.data.u_32.b; + data.u_32.b^=rhs.data.u_32.c; + data.u_32.c^=rhs.data.u_32.d; + data.u_32.d^=rhs.data.u_32.a; + return *this; + } + GUID operator%(const GUID& rhs)const { return GUID(*this)%=rhs; } + +}; + +class GUIDHash +{ +public: + size_t operator()(const GUID& guid)const + { + return + guid.get_hi_hi()+ + guid.get_hi_lo()+ + guid.get_lo_hi()+ + guid.get_lo_lo(); + } +}; + +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/guidset.h b/synfig-core/src/synfig/guidset.h new file mode 100644 index 0000000..32d6127 --- /dev/null +++ b/synfig-core/src/synfig/guidset.h @@ -0,0 +1,60 @@ +/* === S Y N F I G ========================================================= */ +/*! \file guidset.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_GUIDSET_H +#define __SYNFIG_GUIDSET_H + +/* === H E A D E R S ======================================================= */ + +#include "guid.h" + +#ifdef HASH_SET_H +#include HASH_SET_H +#else +#include +#endif + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class GUIDSet : public +#ifdef HASH_SET_H +std::set +#else +HASH_SET_CLASS +#endif +{ +}; // END of class GUIDSet + +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/importer.cpp b/synfig-core/src/synfig/importer.cpp new file mode 100644 index 0000000..e271110 --- /dev/null +++ b/synfig-core/src/synfig/importer.cpp @@ -0,0 +1,146 @@ +/* === S Y N F I G ========================================================= */ +/*! \file importer.cpp +** \brief writeme +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_NO_ANGLE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "canvas.h" +#include "importer.h" +#include "surface.h" +#include +#include "string.h" +#include +#include +#include + +#endif + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +using namespace etl; +using namespace std; +using namespace synfig; + +Importer::Book* synfig::Importer::book_; + +map *__open_importers; + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +bool +Importer::subsys_init() +{ + book_=new Book(); + __open_importers=new map(); + return true; +} + +bool +Importer::subsys_stop() +{ + delete book_; + delete __open_importers; + return true; +} + +Importer::Book& +Importer::book() +{ + return *book_; +} + +Importer::Handle +Importer::open(const String &filename) +{ + if(filename.empty()) + { + synfig::error(_("Importer::open(): Cannot open empty filename")); + return 0; + } + + // If we already have an importer open under that filename, + // then use it instead. + if(__open_importers->count(filename)) + { + //synfig::info("Found importer already open, using it..."); + return (*__open_importers)[filename]; + } + + if(filename_extension(filename) == "") + { + synfig::error(_("Importer::open(): Couldn't find extension")); + return 0; + } + + String ext(filename_extension(filename)); + if (ext.size()) ext = ext.substr(1); // skip initial '.' + std::transform(ext.begin(),ext.end(),ext.begin(),&::tolower); + + + if(!Importer::book().count(ext)) + { + synfig::error(_("Importer::open(): Unknown file type -- ")+ext); + return 0; + } + + try { + Importer::Handle importer; + importer=Importer::book()[ext](filename.c_str()); + (*__open_importers)[filename]=importer; + return importer; + } + catch (String str) + { + synfig::error(str); + } + return 0; +} + +Importer::Importer(): + gamma_(2.2) +{ +} + + +Importer::~Importer() +{ + // Remove ourselves from the open importer list + map::iterator iter; + for(iter=__open_importers->begin();iter!=__open_importers->end();++iter) + if(iter->second==this) + { + __open_importers->erase(iter); + } +} diff --git a/synfig-core/src/synfig/importer.h b/synfig-core/src/synfig/importer.h new file mode 100644 index 0000000..4391c4e --- /dev/null +++ b/synfig-core/src/synfig/importer.h @@ -0,0 +1,131 @@ +#include +/* === S Y N F I G ========================================================= */ +/*! \file importer.h +** \brief writeme +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_IMPORTER_H +#define __SYNFIG_IMPORTER_H + +/* === H E A D E R S ======================================================= */ + +#include +//#include +#include +#include "string.h" +//#include "surface.h" +//#include "general.h" +//#include "vector.h" +#include "time.h" +#include "gamma.h" + +/* === M A C R O S ========================================================= */ + +//! \writeme +#define SYNFIG_IMPORTER_MODULE_EXT public: static const char name__[], version__[], ext__[],cvs_id__[]; static Importer *create(const char *filename); + +//! Sets the name of the importer +#define SYNFIG_IMPORTER_SET_NAME(class,x) const char class::name__[]=x + +//! \writeme +#define SYNFIG_IMPORTER_SET_EXT(class,x) const char class::ext__[]=x + +//! Sets the version of the importer +#define SYNFIG_IMPORTER_SET_VERSION(class,x) const char class::version__[]=x + +//! Sets the CVS ID of the importer +#define SYNFIG_IMPORTER_SET_CVS_ID(class,x) const char class::cvs_id__[]=x + +//! \writeme +#define SYNFIG_IMPORTER_INIT(class) synfig::Importer* class::create(const char *filename) { return new class(filename); } + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class Surface; +class ProgressCallback; + +/*! \class Importer +** \brief Used for importing bitmaps of various formats, including animations +** \todo Write more detailed description +*/ +class Importer : public etl::shared_object +{ +public: + typedef Importer* (*Factory)(const char *filename); + typedef std::map Book; + static Book* book_; + + static Book& book(); + + static bool subsys_init(); + static bool subsys_stop(); + + typedef etl::handle Handle; + typedef etl::loose_handle LooseHandle; + typedef etl::handle ConstHandle; + +private: + Gamma gamma_; + +protected: + Importer(); + +public: + + Gamma& gamma() { return gamma_; } + const Gamma& gamma()const { return gamma_; } + + virtual ~Importer(); + + //! Gets a frame and puts it into \a surface + /*! \param surface Reference to surface to put frame into + ** \param time For animated importers, determines which frame to get. + ** For static importers, this parameter is unused. + ** \param callback Pointer to callback class for progress, errors, etc. + ** \return \c true on success, \c false on error + ** \see ProgressCallback, Surface + */ + virtual bool get_frame(Surface &surface,Time time, ProgressCallback *callback=NULL)=0; + virtual bool get_frame(Surface &surface,Time time, + bool &trimmed __attribute__ ((unused)), + unsigned int &width __attribute__ ((unused)), unsigned int &height __attribute__ ((unused)), + unsigned int &top __attribute__ ((unused)), unsigned int &left __attribute__ ((unused)), + ProgressCallback *callback=NULL) { + return get_frame(surface,time,callback); + } + + //! Returns \c true if the importer pays attention to the \a time parameter of get_frame() + virtual bool is_animated() { return false; } + + //! Attempts to open \a filename, and returns a handle to the associated Importer + static Handle open(const String &filename); +}; + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/interpolation.h b/synfig-core/src/synfig/interpolation.h new file mode 100644 index 0000000..63f2ee6 --- /dev/null +++ b/synfig-core/src/synfig/interpolation.h @@ -0,0 +1,54 @@ +/* === S Y N F I G ========================================================= */ +/*! \file interpolation.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_INTERPOLATION_H +#define __SYNFIG_INTERPOLATION_H + +/* === H E A D E R S ======================================================= */ + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +enum Interpolation +{ + INTERPOLATION_TCB, // 0 + INTERPOLATION_CONSTANT, // 1 + INTERPOLATION_LINEAR, // 2 + INTERPOLATION_HALT, // 3 + INTERPOLATION_MANUAL, // 4 + INTERPOLATION_UNDEFINED, // 5 + INTERPOLATION_NIL // 6 +}; // END enum Interpolation + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/keyframe.cpp b/synfig-core/src/synfig/keyframe.cpp new file mode 100644 index 0000000..baade29 --- /dev/null +++ b/synfig-core/src/synfig/keyframe.cpp @@ -0,0 +1,235 @@ +/* === S Y N F I G ========================================================= */ +/*! \file keyframe.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include + +#include "keyframe.h" +#include "exception.h" +#include "general.h" +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +Keyframe::Keyframe(): + time_(0) +{ +} + +Keyframe::Keyframe(const Time &time): + time_(time) +{ +} + +Keyframe::~Keyframe() +{ +} + +void +KeyframeList::dump()const +{ + const_iterator iter; + int i; + synfig::info(">>>>>>>>BEGIN KEYFRAME DUMP"); + for(iter=begin(),i=0;iter!=end();++iter,i++) + { + synfig::info("#%d, time: %s, desc: %s",i,iter->get_time().get_string().c_str(),iter->get_description().c_str()); + } + synfig::info("<<<<<<<::erase(find(x)); +} + +KeyframeList::iterator +KeyframeList::find(const Time &x) +{ + KeyframeList::iterator iter; + iter=binary_find(begin(),end(),x); + if(iter!=end() && iter->get_time().is_equal(x)) + return iter; +/* iter++; + if(iter!=end() && iter->get_time().is_equal(x)) + return iter; +*/ + throw Exception::NotFound(strprintf("KeyframeList::find(): Can't find Keyframe %s",x.get_string().c_str())); +} + +KeyframeList::iterator +KeyframeList::find_next(const Time &x) +{ + KeyframeList::iterator iter(binary_find(begin(),end(),x)); + + if(iter!=end()) + { + if(iter->get_time().is_more_than(x)) + return iter; + ++iter; + if(iter!=end()) + { + if(iter->get_time().is_more_than(x)) + return iter; +/* ++iter; + if(iter!=end() && iter->get_time().is_more_than(x)) + return iter; +*/ + } + } + + throw Exception::NotFound(strprintf("KeyframeList::find(): Can't find next Keyframe %s",x.get_string().c_str())); +} + + +KeyframeList::iterator +KeyframeList::find_prev(const Time &x) +{ + KeyframeList::iterator iter(binary_find(begin(),end(),x)); + + if(iter!=end()) + { + if(iter->get_time()+Time::epsilon()get_time()+Time::epsilon()(this)->find(x); +} + + +KeyframeList::const_iterator +KeyframeList::find_next(const Time &x)const +{ + return const_cast(this)->find_next(x); + +} + + +KeyframeList::const_iterator +KeyframeList::find_prev(const Time &x)const +{ + return const_cast(this)->find_prev(x); + +} + +void +KeyframeList::find_prev_next(const Time& time, Time &prev, Time &next)const +{ + try { prev=find_prev(time)->get_time(); } + catch(...) { prev=Time::begin(); } + try { next=find_next(time)->get_time(); } + catch(...) { next=Time::end(); } +} + +void +KeyframeList::insert_time(const Time& location, const Time& delta) +{ +// synfig::info("KeyframeList::insert_time(): loc=%s, delta=%s",location.get_string().c_str(),delta.get_string().c_str()); + if(!delta) + return; + try + { + iterator iter(find_next(location)); + for(;iter!=end();++iter) + { + iter->set_time(iter->get_time()+delta); + } + sync(); + } + catch(Exception::NotFound) { } +} diff --git a/synfig-core/src/synfig/keyframe.h b/synfig-core/src/synfig/keyframe.h new file mode 100644 index 0000000..d8f9bf7 --- /dev/null +++ b/synfig-core/src/synfig/keyframe.h @@ -0,0 +1,128 @@ +/* === S Y N F I G ========================================================= */ +/*! \file keyframe.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_KEYFRAME_H +#define __SYNFIG_KEYFRAME_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include "string.h" +#include "time.h" +#include "uniqueid.h" +#include "guid.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +//! \writeme +class Keyframe : public UniqueID +{ +public: + + Time time_; + String desc_; + GUID guid_; + +public: + + Keyframe(); + + Keyframe(const Time &time); + + ~Keyframe(); + + void set_time(Time x) { time_=x; } + + Time get_time()const { return time_; } + + void set_description(String x) { desc_=x; } + + String get_description()const { return desc_; } + + const GUID& get_guid()const { return guid_; } + void set_guid(const GUID& x) { guid_=x; } + + using UniqueID::operator<; + using UniqueID::operator==; + using UniqueID::operator!=; + using UniqueID::operator=; + + bool operator<(const Keyframe &rhs)const { return time_ +{ + +public: + + iterator add(const Keyframe &x); + + void erase(const UniqueID &x); + + iterator find(const UniqueID &x); + + const_iterator find(const UniqueID &x)const; + + //! Finds the keyframe at an exact point in time + iterator find(const Time &x); + + //! Finds the keyframe after that point in time + iterator find_next(const Time &x); + + //! Finds the keyframe before that point in time + iterator find_prev(const Time &x); + + const_iterator find(const Time &x)const; + const_iterator find_next(const Time &x)const; + const_iterator find_prev(const Time &x)const; + + void find_prev_next(const Time& time, Time &prev, Time &next)const; + + void insert_time(const Time& location, const Time& delta); + + void dump()const; + void sync(); +}; + +//typedef std::list KeyframeList; + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/layer.cpp b/synfig-core/src/synfig/layer.cpp new file mode 100644 index 0000000..8fcbfbf --- /dev/null +++ b/synfig-core/src/synfig/layer.cpp @@ -0,0 +1,613 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer.cpp +** \brief Layer class implementation +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_NO_ANGLE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "canvas.h" +#include "layer.h" +#include "render.h" +#include "value.h" +#include "layer_bitmap.h" +#include "layer_mime.h" +#include "context.h" +#include "paramdesc.h" + +#include "layer_solidcolor.h" +#include "layer_polygon.h" +#include "layer_pastecanvas.h" +#include "layer_motionblur.h" +#include "layer_duplicate.h" + +#include "valuenode_const.h" + +#include "transform.h" +#include "rect.h" +#include "guid.h" + +#include +#endif + +/* === U S I N G =========================================================== */ + +using namespace etl; +using namespace std; +using namespace synfig; + +/* === G L O B A L S ======================================================= */ + +static Layer::Book* _layer_book; + +struct _LayerCounter +{ + static int counter; + ~_LayerCounter() + { + if(counter) + synfig::error("%d layers not yet deleted!",counter); + } +} _layer_counter; + +int _LayerCounter::counter(0); + +/* === P R O C E D U R E S ================================================= */ + +Layer::Book& +Layer::book() +{ + return *_layer_book; +} + +void +Layer::register_in_book(const BookEntry &entry) +{ + book()[entry.name]=entry; +} + +bool +Layer::subsys_init() +{ + _layer_book=new Book(); + +#define INCLUDE_LAYER(class) \ + synfig::Layer::book() [synfig::String(class::name__)] = \ + BookEntry(class::create, \ + class::name__, \ + dgettext("synfig", class::local_name__), \ + class::category__, \ + class::cvs_id__, \ + class::version__) + +#define LAYER_ALIAS(class,alias) \ + synfig::Layer::book()[synfig::String(alias)] = \ + BookEntry(class::create, \ + alias, \ + alias, \ + CATEGORY_DO_NOT_USE, \ + class::cvs_id__, \ + class::version__) + + INCLUDE_LAYER(Layer_SolidColor); LAYER_ALIAS(Layer_SolidColor, "solid_color"); + INCLUDE_LAYER(Layer_PasteCanvas); LAYER_ALIAS(Layer_PasteCanvas, "paste_canvas"); + INCLUDE_LAYER(Layer_Polygon); LAYER_ALIAS(Layer_Polygon, "Polygon"); + INCLUDE_LAYER(Layer_MotionBlur); LAYER_ALIAS(Layer_MotionBlur, "motion_blur"); + INCLUDE_LAYER(Layer_Duplicate); + +#undef INCLUDE_LAYER + + return true; +} + +bool +Layer::subsys_stop() +{ + delete _layer_book; + return true; +} + +/* === M E T H O D S ======================================================= */ + +Layer::Layer(): + active_(true), + z_depth_(0.0f), + dirty_time_(Time::end()) +{ + _LayerCounter::counter++; +} + +Layer::LooseHandle +synfig::Layer::create(const String &name) +{ + if(!book().count(name)) + { + return Layer::LooseHandle(new Layer_Mime(name)); + } + + Layer* layer(book()[name].factory()); + return Layer::LooseHandle(layer); +} + +synfig::Layer::~Layer() +{ + _LayerCounter::counter--; + while(!dynamic_param_list_.empty()) + { + remove_child(dynamic_param_list_.begin()->second.get()); + dynamic_param_list_.erase(dynamic_param_list_.begin()); + } + + remove_from_all_groups(); + + parent_death_connect_.disconnect(); + begin_delete(); +} + +void +synfig::Layer::set_canvas(etl::loose_handle x) +{ + if(canvas_!=x) + { + parent_death_connect_.disconnect(); + canvas_=x; + if(x) + { + parent_death_connect_=x->signal_deleted().connect( + sigc::bind( + sigc::mem_fun( + *this, + &Layer::set_canvas + ), + etl::loose_handle(0) + ) + ); + } + on_canvas_set(); + } +} + +void +synfig::Layer::on_canvas_set() +{ +} + +etl::loose_handle +synfig::Layer::get_canvas()const +{ + return canvas_; +} + +int +Layer::get_depth()const +{ + if(!get_canvas()) + return -1; + return get_canvas()->get_depth(const_cast(this)); +} + +void +Layer::set_active(bool x) +{ + if(active_!=x) + { + active_=x; + + Node::on_changed(); + signal_status_changed_(); + } +} + +void +Layer::set_description(const String& x) +{ + if(description_!=x) + { + description_=x; + signal_description_changed_(); + } +} + +bool +Layer::connect_dynamic_param(const String& param, etl::loose_handle value_node) +{ + ValueNode::Handle previous(dynamic_param_list_[param]); + + if(previous==value_node) + return true; + + dynamic_param_list_[param]=ValueNode::Handle(value_node); + + if(previous) + remove_child(previous.get()); + + add_child(value_node.get()); + + if(!value_node->is_exported() && get_canvas()) + { + value_node->set_parent_canvas(get_canvas()); + } + + changed(); + return true; +} + +bool +Layer::disconnect_dynamic_param(const String& param) +{ + ValueNode::Handle previous(dynamic_param_list_[param]); + + if(previous) + { + dynamic_param_list_.erase(param); + + // fix 2353284: if two parameters in the same layer are + // connected to the same valuenode and we disconnect one of + // them, the parent-child relationship for the remaining + // connection was being deleted. now we search the parameter + // list to see if another parameter uses the same valuenode + DynamicParamList::const_iterator iter; + for (iter = dynamic_param_list().begin(); iter != dynamic_param_list().end(); iter++) + if (iter->second == previous) + break; + if (iter == dynamic_param_list().end()) + remove_child(previous.get()); + + changed(); + } + return true; +} + +void +Layer::on_changed() +{ + dirty_time_=Time::end(); + Node::on_changed(); +} + +bool +Layer::set_param(const String ¶m, const ValueBase &value) +{ + if(param=="z_depth" && value.same_type_as(z_depth_)) + { + z_depth_=value.get(z_depth_); + return true; + } + return false; +} + +etl::handle +Layer::get_transform()const +{ + return 0; +} + +float +Layer::get_z_depth(const synfig::Time& t)const +{ + if(!dynamic_param_list().count("z_depth")) + return z_depth_; + return (*dynamic_param_list().find("z_depth")->second)(t).get(Real()); +} + +Layer::Handle +Layer::simple_clone()const +{ + if(!book().count(get_name())) return 0; + Handle ret = create(get_name()).get(); + ret->group_=group_; + //ret->set_canvas(get_canvas()); + ret->set_description(get_description()); + ret->set_active(active()); + ret->set_param_list(get_param_list()); + for(DynamicParamList::const_iterator iter=dynamic_param_list().begin();iter!=dynamic_param_list().end();++iter) + ret->connect_dynamic_param(iter->first, iter->second); + return ret; +} + +Layer::Handle +Layer::clone(const GUID& deriv_guid) const +{ + if(!book().count(get_name())) return 0; + + //Layer *ret = book()[get_name()].factory();//create(get_name()).get(); + Handle ret = create(get_name()).get(); + + ret->group_=group_; + //ret->set_canvas(get_canvas()); + ret->set_description(get_description()); + ret->set_active(active()); + ret->set_guid(get_guid()^deriv_guid); + + //ret->set_param_list(get_param_list()); + // Process the parameter list so that + // we can duplicate any inline canvases + ParamList param_list(get_param_list()); + for(ParamList::const_iterator iter(param_list.begin()); iter != param_list.end(); ++iter) + { + if(dynamic_param_list().count(iter->first)==0 && iter->second.get_type()==ValueBase::TYPE_CANVAS) + { + // This parameter is a canvas. We need a close look. + Canvas::Handle canvas(iter->second.get(Canvas::Handle())); + if(canvas && canvas->is_inline()) + { + // This parameter is an inline canvas! we need to clone it + // before we set it as a parameter. + Canvas::Handle new_canvas(canvas->clone(deriv_guid)); + ValueBase value(new_canvas); + ret->set_param(iter->first, value); + continue; + } + } + + // This is a normal parameter,go ahead and set it. + ret->set_param(iter->first, iter->second); + } + + // Duplicate the dynamic paramlist, but only the exported data nodes + DynamicParamList::const_iterator iter; + for(iter=dynamic_param_list().begin();iter!=dynamic_param_list().end();++iter) + { + // Make sure we clone inline canvases + if(iter->second->get_type()==ValueBase::TYPE_CANVAS) + { + Canvas::Handle canvas((*iter->second)(0).get(Canvas::Handle())); + if(canvas->is_inline()) + { + Canvas::Handle new_canvas(canvas->clone(deriv_guid)); + ValueBase value(new_canvas); + ret->connect_dynamic_param(iter->first,ValueNode_Const::create(value)); + continue; + } + } + + if(iter->second->is_exported()) + ret->connect_dynamic_param(iter->first,iter->second); + else + ret->connect_dynamic_param(iter->first,iter->second->clone(deriv_guid)); + } + + //ret->set_canvas(0); + + return ret; +} + +bool +Layer::reads_context() const +{ + return false; +} + +Rect +Layer::get_full_bounding_rect(Context context)const +{ + if(active()) + return context.get_full_bounding_rect()|get_bounding_rect(); + return context.get_full_bounding_rect(); +} + +Rect +Layer::get_bounding_rect()const +{ + return Rect::full_plane(); +} + +bool +Layer::set_param_list(const ParamList &list) +{ + bool ret=true; + if(!list.size()) + return false; + ParamList::const_iterator iter(list.begin()); + for(;iter!=list.end();++iter) + { + if(!set_param(iter->first, iter->second))ret=false; + } + return ret; +} + +Layer::ParamList +Layer::get_param_list()const +{ + ParamList ret; + + Vocab vocab(get_param_vocab()); + + Vocab::const_iterator iter=vocab.begin(); + for(;iter!=vocab.end();++iter) + { + ret[iter->get_name()]=get_param(iter->get_name()); + } + return ret; +} + +ValueBase +Layer::get_param(const String & param)const +{ + if(param=="z_depth") + return get_z_depth(); + + return ValueBase(); +} + +String +Layer::get_version()const +{ + return get_param("version__").get(String()); +} + +bool +Layer::set_version(const String &/*ver*/) +{ + return false; +} + +void +Layer::reset_version() +{ +} + + +void +Layer::set_time(Context context, Time time)const +{ + context.set_time(time); + dirty_time_=time; +} + +void +Layer::set_time(Context context, Time time, const Point &pos)const +{ + context.set_time(time,pos); + dirty_time_=time; +} + +Color +Layer::get_color(Context context, const Point &pos)const +{ + return context.get_color(pos); +} + +synfig::Layer::Handle +Layer::hit_check(synfig::Context context, const synfig::Point &pos)const +{ + return context.hit_check(pos); +} + +/* The default accelerated renderer +** is anything but accelerated... +*/ +bool +Layer::accelerated_render(Context context,Surface *surface,int /*quality*/, const RendDesc &renddesc, ProgressCallback *cb) const +{ + handle target=surface_target(surface); + if(!target) + { + if(cb)cb->error(_("Unable to create surface target")); + return false; + } + RendDesc desc=renddesc; + target->set_rend_desc(&desc); + + // When we render, we want to + // make sure that we are rendered too... + // Since the context iterator is for + // the layer after us, we need to back up. + // This could be considered a hack, as + // it is a possibility that we are indeed + // not the previous layer. + --context; + + return render(context,target,desc,cb); + //return render_threaded(context,target,desc,cb,2); +} + +String +Layer::get_name()const +{ + return get_param("name__").get(String()); +} + +String +Layer::get_local_name()const +{ + return get_param("local_name__").get(String()); +} + + +Layer::Vocab +Layer::get_param_vocab()const +{ + Layer::Vocab ret; + + ret.push_back(ParamDesc(z_depth_,"z_depth") + .set_local_name(_("Z Depth")) + .set_animation_only(true) + ); + + return ret; +} + +void +Layer::get_times_vfunc(Node::time_set &set) const +{ + DynamicParamList::const_iterator i = dynamic_param_list_.begin(), + end = dynamic_param_list_.end(); + + for(; i != end; ++i) + { + const Node::time_set &tset = i->second->get_times(); + set.insert(tset.begin(),tset.end()); + } +} + + +void +Layer::add_to_group(const String&x) +{ + if(x==group_) + return; + if(!group_.empty()) + remove_from_all_groups(); + group_=x; + signal_added_to_group()(group_); +} + +void +Layer::remove_from_group(const String&x) +{ + if(group_==x) + remove_from_all_groups(); +} + +void +Layer::remove_from_all_groups() +{ + if(group_.empty()) + return; + signal_removed_from_group()(group_); + group_.clear(); +} + +String +Layer::get_group()const +{ + return group_; +} + +const String +Layer::get_param_local_name(const String ¶m_name)const +{ + ParamVocab vocab = get_param_vocab(); + // loop to find the parameter in the parameter vocab - this gives us its local name + for (ParamVocab::iterator iter = vocab.begin(); iter != vocab.end(); iter++) + if (iter->get_name() == param_name) + return iter->get_local_name(); + return String(); +} diff --git a/synfig-core/src/synfig/layer.h b/synfig-core/src/synfig/layer.h new file mode 100644 index 0000000..f729c40 --- /dev/null +++ b/synfig-core/src/synfig/layer.h @@ -0,0 +1,517 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer.h +** \brief Layer Class Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_LAYER_H +#define __SYNFIG_LAYER_H + +/* === H E A D E R S ======================================================= */ + +#include "string_decl.h" +#include +#include +#include "real.h" +#include "string.h" +#include +#include +#include "node.h" +#include "time.h" +#include "guid.h" + +/* === M A C R O S ========================================================= */ + +//! \writeme +#define SYNFIG_LAYER_MODULE_EXT \ + public: \ + static const char name__[], version__[], cvs_id__[], local_name__[], category__[]; \ + static Layer *create(); + +//! Sets the name of the layer +#define SYNFIG_LAYER_SET_NAME(class,x) \ + const char class::name__[]=x + +//! Sets the local name of the layer +#define SYNFIG_LAYER_SET_LOCAL_NAME(class,x) \ + const char class::local_name__[]=x; + +//! Sets the category of the layer +#define SYNFIG_LAYER_SET_CATEGORY(class,x) \ + const char class::category__[]=x + +//! Sets the version string for the layer +#define SYNFIG_LAYER_SET_VERSION(class,x) \ + const char class::version__[]=x + +//! Sets the CVS ID string for the layer +#define SYNFIG_LAYER_SET_CVS_ID(class,x) \ + const char class::cvs_id__[]=x + +//! \writeme +#define SYNFIG_LAYER_INIT(class) \ + synfig::Layer* class::create() \ + { \ + return new class(); \ + } + +//! \writeme +#define IMPORT_PLUS(x,y) \ + if (param==#x && value.same_type_as(x)) \ + { \ + value.put(&x); \ + { \ + y; \ + } \ + return true; \ + } + +//! \writeme +#define IMPORT_AS(x,y) \ + if (param==y && value.same_type_as(x)) \ + { \ + value.put(&x); \ + return true; \ + } + +//! \writeme +#define IMPORT(x) \ + IMPORT_AS(x,#x) + +//! \writeme +#define EXPORT_AS(x,y) \ + if (param==y) \ + return ValueBase(x); + +//! \writeme +#define EXPORT(x) \ + EXPORT_AS(x,#x) + +//! \writeme +#define EXPORT_NAME() \ + if (param=="Name" || param=="name" || param=="name__") \ + return name__; \ + else if (param=="local_name__") \ + return dgettext("synfig",local_name__); + +//! \writeme +#define EXPORT_VERSION() \ + if (param=="Version" || param=="version" || param=="version__") \ + return version__; + +//! This is used as the category for layer book entries which represent aliases of layers. +//! It prevents these layers showing up in the menu. +#define CATEGORY_DO_NOT_USE "Do Not Use" + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class Canvas; +class Vector; +typedef Vector Point; +class Canvas; +class ParamDesc; +class ParamVocab; +class ValueNode; +class ValueBase; +class Time; +class Surface; +class RendDesc; +class ProgressCallback; +class Context; +class Color; +class Transform; +class Rect; +class GUID; + + +/*! \class Layer +** \todo writeme +** \see Canvas +*/ +class Layer : public Node +{ + friend class ValueNode; + friend class Context; + + /* + -- ** -- T Y P E S ----------------------------------------------------------- + */ + +public: + + //! Type that represents a pointer to a layer's constructor + typedef Layer* (*Factory)(); + + struct BookEntry + { + Factory factory; + String name; + String local_name; + String category; + String cvs_id; + String version; + BookEntry() { } + BookEntry(Factory factory, + const String &name, + const String &local_name, + const String &category, + const String &cvs_id, + const String &version): + factory(factory), + name(name), + local_name(local_name), + category(category), + cvs_id(cvs_id), + version(version) { } + }; + + typedef std::map Book; + + static void register_in_book(const BookEntry &); + + static Book& book(); + + static bool subsys_init(); + + static bool subsys_stop(); + + typedef std::map ParamList; + + typedef etl::handle Handle; + + typedef etl::loose_handle LooseHandle; + + typedef etl::handle ConstHandle; + + typedef std::map > DynamicParamList; + + //! A list type which describes all the parameters that a layer has. + /*! \see get_param_vocab() */ + typedef ParamVocab Vocab; + + /* + -- ** -- D A T A ------------------------------------------------------------- + */ + +private: + + /*! \c true if the layer is visible, \c false if it is to be skipped + ** \see set_active(), enable(), disable, active() + */ + bool active_; + + //! Handle to the canvas to which this layer belongs + etl::loose_handle canvas_; + + DynamicParamList dynamic_param_list_; + + //! A description of what this layer does + String description_; + + //! \writeme + float z_depth_; + + //! \writeme + mutable Time dirty_time_; + + //! Contains the name of the group that this layer belongs to + String group_; + + //! \writeme + sigc::connection parent_death_connect_; + + /* + -- ** -- S I G N A L S ------------------------------------------------------- + */ + +private: + + //! Status Changed + sigc::signal signal_status_changed_; + + //! Parameter changed + sigc::signal signal_param_changed_; + + //! Description Changed + sigc::signal signal_description_changed_; + + //! Moved + sigc::signal > signal_moved_; + + sigc::signal signal_added_to_group_; + + sigc::signal signal_removed_from_group_; + + /* + -- ** -- S I G N A L I N T E R F A C E ------------------------------------- + */ + +public: + + //! Status Changed + sigc::signal& signal_status_changed() { return signal_status_changed_; } + + //! Parameter changed + sigc::signal& signal_param_changed() { return signal_param_changed_; } + + //! Description Changed + sigc::signal& signal_description_changed() { return signal_description_changed_;} + + //! Moved + sigc::signal >& signal_moved() { return signal_moved_; } + + sigc::signal& signal_added_to_group() { return signal_added_to_group_; } + + sigc::signal& signal_removed_from_group() { return signal_removed_from_group_; } + + /* + -- ** -- C O N S T R U C T O R S --------------------------------------------- + */ + +protected: + + Layer(); + +public: + virtual ~Layer(); + + /* + -- ** -- M E M B E R F U N C T I O N S ------------------------------------- + */ + +public: + + virtual void on_canvas_set(); + + //! Adds this layer to the given layer group + void add_to_group(const String&); + + //! Removes this layer from the given layer group + void remove_from_group(const String&); + + //! Removes this layer from all layer groups + void remove_from_all_groups(); + + //! Gets the name of the group that this layer belongs to + String get_group()const; + + //! writeme + //DynamicParamList &dynamic_param_list() { return dynamic_param_list_; } + + //! \todo writeme + const DynamicParamList &dynamic_param_list()const { return dynamic_param_list_; } + + bool connect_dynamic_param(const String& param, etl::loose_handle); + bool disconnect_dynamic_param(const String& param); + + //! Enables the layer for rendering (Making it \em active) + void enable() { set_active(true); } + + //! Disables the layer for rendering. (Making it \em inactive) + /*! When a layer is disabled, it will be skipped when the + ** canvas is rendered. */ + void disable() { set_active(false); } + + //! Sets the 'active' flag for the Layer to the state described by \a x + /*! When a layer is disabled, it will be skipped when the + ** canvas is rendered. */ + void set_active(bool x); + + //! Returns that status of the 'active' flag + bool active()const { return active_; } + + //! Returns the position of the layer in the canvas. + /*! Returns negative on error */ + int get_depth()const; + + //! \writeme + float get_z_depth()const { return z_depth_; } + + //! \writeme + float get_z_depth(const synfig::Time& t)const; + + //! \writeme + void set_z_depth(float x) { z_depth_=x; } + + //! Sets the Canvas that this Layer is a part of + void set_canvas(etl::loose_handle canvas); + + //! Returns a handle to the Canvas to which this Layer belongs + etl::loose_handle get_canvas()const; + + //! \writeme + const String& get_description()const { return description_; } + + //! \writeme + void set_description(const String& x); + + //! Returns the layer's description if it's not empty, else its local name + const String get_non_empty_description()const { return get_description().empty() ? get_local_name() : get_description(); } + + //! Returns the localised version of the given layer parameter + const String get_param_local_name(const String ¶m_name)const; + + /* + -- ** -- V I R T U A L F U N C T I O N S ----------------------------------- + */ + +public: + virtual Rect get_bounding_rect()const; + + virtual Rect get_full_bounding_rect(Context context)const; + + //! Returns a string containing the name of the Layer + virtual String get_name()const; + + //! Returns a string containing the localized name of the Layer + virtual String get_local_name()const; + + //! Gets the parameter vocabulary + virtual Vocab get_param_vocab()const; + + //! Gets the version string for this layer + virtual String get_version()const; + + //! \writeme + virtual etl::handle get_transform()const; + + //! Sets the virtual version to use for backwards-compatibility + /*! + ** \see reset_version() */ + virtual bool set_version(const String &ver); + + //! Resets the virtual version + /*! + ** \see set_version() */ + virtual void reset_version(); + + //! Sets the parameter described by \a param to \a value. + /*! \param param The name of the parameter to set + ** \param value What the parameter is to be set to. + ** \return \c true on success, \c false upon rejection or failure. + ** If it returns \c false, then the Layer is assumed to remain unchanged. + ** \sa get_param() + ** \todo \a param should be of the type const String \¶m + */ + virtual bool set_param(const String ¶m, const ValueBase &value); + + //! Sets a list of parameters + virtual bool set_param_list(const ParamList &); + + //! Get the value of the specified parameter. + /*! \return The requested parameter value, or (upon failure) a NIL ValueBase. + ** \sa set_param() + ** \todo \a param should be of the type const String \& + */ + virtual ValueBase get_param(const String ¶m)const; + + //! Get a list of all of the parameters and their values + virtual ParamList get_param_list()const; + + //! Sets the \a time for the selected Layer and those under it + /*! \param context Context iterator referring to next Layer. + ** \param time writeme + ** \see Handle::set_time() + */ + virtual void set_time(Context context, Time time)const; + + //! Sets the \a time for the selected Layer and those under it for a specific \a point + /*! \param context Context iterator referring to next Layer. + ** \param time writeme + ** \param point writeme + ** \see Handle::set_time() + ** \todo \a point should be of the type const Point \& */ + virtual void set_time(Context context, Time time, const Point &point)const; + + //! Gets the color of the Canvas at \a pos + /*! \param context Context iterator referring to next Layer. + ** \param pos Point which indicates where the Color should come from + ** \see Handle::get_color() + */ + virtual Color get_color(Context context, const Point &pos)const; + + //! Renders the Canvas to the given Surface in an accelerated manner + /*! \param context Context iterator referring to next Layer. + ** \param surface Pointer to Surface to render to. + ** \param quality The requested quality-level to render at. + ** \param renddesc The associated RendDesc. + ** \param cb Pointer to callback object. May be NULL if there is no callback. + ** \return \c true on success, \c false on failure + ** \see Handle::accelerated_render() + */ + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + + //! Checks to see if a part of the layer is directly under \a point + /*! \param context Context iterator referring to next Layer. + ** \param point The point to check + ** \return The handle of the layer under \a point. If there is not + ** a layer under \a point, then returns an empty handle. */ + virtual Handle hit_check(Context context, const Point &point)const; + + //! Duplicates the Layer + virtual Handle clone(const GUID& deriv_guid=GUID())const; + + //! Returns true if the layer needs to be able to examine its context. + /*! context to render itself, other than for simple blending. For + ** example, the blur layer will return true - it can't do its job + ** if it can't see its context, and the circle layer will return + ** false - rendering a circle doesn't depend on the underlying + ** context until the final blend operation. */ + virtual bool reads_context()const; + + //! Duplicates the Layer without duplicating the value nodes + virtual Handle simple_clone()const; + +protected: + + //! This is called whenever a parameter is changed + virtual void on_changed(); + + //! Called to figure out the animation time information + virtual void get_times_vfunc(Node::time_set &set) const; + + /* + -- ** -- S T A T I C F U N C T I O N S -------------------------------------- + */ + +public: + + //! Creates a Layer of type \a type + /*! If the Layer type is unknown, then a Mime layer is created in its place. + ** \param type A string describing the name of the layer to construct. + ** \return Always returns a handle to a new Layer. + ** \see Mime + */ + static Layer::LooseHandle create(const String &type); + +}; // END of class Layer + +}; // END of namespace synfig + + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/layer_bitmap.cpp b/synfig-core/src/synfig/layer_bitmap.cpp new file mode 100644 index 0000000..cda5d09 --- /dev/null +++ b/synfig-core/src/synfig/layer_bitmap.cpp @@ -0,0 +1,525 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer_bitmap.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_NO_ANGLE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "layer_bitmap.h" +#include "layer.h" +#include "time.h" +#include "string.h" +#include "vector.h" + +#include "context.h" +#include "time.h" +#include "color.h" +#include "surface.h" +#include "renddesc.h" +#include "target.h" + +#include "general.h" +#include "paramdesc.h" +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +synfig::Layer_Bitmap::Layer_Bitmap(): + Layer_Composite (1.0,Color::BLEND_COMPOSITE), + tl (-0.5,0.5), + br (0.5,-0.5), + c (1), + surface (128,128), + trimmed (false), + gamma_adjust (1.0) +{ +} + +bool +synfig::Layer_Bitmap::set_param(const String & param, ValueBase value) +{ + IMPORT(tl); + IMPORT(br); + IMPORT(c); + if(param=="gamma_adjust"&& value.get_type()==ValueBase::TYPE_REAL) + { + gamma_adjust=1.0/value.get(Real()); + //gamma_adjust.set_gamma(1.0/value.get(Real())); + return true; + } + + return Layer_Composite::set_param(param,value); +} + +ValueBase +synfig::Layer_Bitmap::get_param(const String & param)const +{ + EXPORT(tl); + EXPORT(br); + EXPORT(c); + if(param=="gamma_adjust") + return 1.0/gamma_adjust; + + if(param=="_width") + { + if (trimmed) return int(width); + return surface.get_w(); + } + if(param=="_height") + { + if (trimmed) return int(height); + return surface.get_h(); + } + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +Layer_Bitmap::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("tl") + .set_local_name(_("Top-Left")) + .set_description(_("Upper left-hand Corner of image")) + ); + + ret.push_back(ParamDesc("br") + .set_local_name(_("Bottom-Right")) + .set_description(_("Lower right-hand Corner of image")) + ); + + ret.push_back(ParamDesc("c") + .set_local_name(_("Interpolation")) + .set_description(_("What type of interpolation to use")) + .set_hint("enum") + .add_enum_value(0,"nearest",_("Nearest Neighbor")) + .add_enum_value(1,"linear",_("Linear")) + .add_enum_value(2,"cosine",_("Cosine")) + .add_enum_value(3,"cubic",_("Cubic")) + ); + + ret.push_back(ParamDesc("gamma_adjust") + .set_local_name(_("Gamma Adjustment")) + ); + + return ret; +} + +synfig::Layer::Handle +Layer_Bitmap::hit_check(synfig::Context context, const synfig::Point &pos)const +{ + Point surface_pos; + surface_pos=pos-tl; + + surface_pos[0]/=br[0]-tl[0]; + if(surface_pos[0]<=1.0 && surface_pos[0]>=0.0) + { + surface_pos[1]/=br[1]-tl[1]; + if(surface_pos[1]<=1.0 && surface_pos[1]>=0.0) + { + return const_cast(this); + } + } + + return context.hit_check(pos); +} + +inline +const Color& +synfig::Layer_Bitmap::filter(Color& x)const +{ + if(gamma_adjust!=1.0) + { + x.set_r(powf((float)x.get_r(),gamma_adjust)); + x.set_g(powf((float)x.get_g(),gamma_adjust)); + x.set_b(powf((float)x.get_b(),gamma_adjust)); + } + return x; +} + +Color +synfig::Layer_Bitmap::get_color(Context context, const Point &pos)const +{ + Point surface_pos; + + if(!get_amount()) + return context.get_color(pos); + + surface_pos=pos-tl; + + surface_pos[0]/=br[0]-tl[0]; + if(surface_pos[0]<=1.0 && surface_pos[0]>=0.0) + { + surface_pos[1]/=br[1]-tl[1]; + if(surface_pos[1]<=1.0 && surface_pos[1]>=0.0) + { + if (trimmed) + { + surface_pos[0]*=width; + surface_pos[1]*=height; + + if (surface_pos[0] > left+surface.get_w() || surface_pos[0] < left || surface_pos[1] > top+surface.get_h() || surface_pos[1] < top) + return context.get_color(pos); + + surface_pos[0] -= left; + surface_pos[1] -= top; + } + else + { + surface_pos[0]*=surface.get_w(); + surface_pos[1]*=surface.get_h(); + } + + Color ret(Color::alpha()); + + switch(c) + { + case 6: // Undefined + case 5: // Undefined + case 4: // Undefined + case 3: // Cubic + ret=surface.cubic_sample(surface_pos[0],surface_pos[1]); + break; + + case 2: // Cosine + ret=surface.cosine_sample(surface_pos[0],surface_pos[1]); + break; + case 1: // Linear + ret=surface.linear_sample(surface_pos[0],surface_pos[1]); + break; + case 0: // Nearest Neighbor + default: + { + int x(min(surface.get_w()-1,max(0,round_to_int(surface_pos[0])))); + int y(min(surface.get_h()-1,max(0,round_to_int(surface_pos[1])))); + ret= surface[y][x]; + } + break; + } + + ret=filter(ret); + + if(get_amount()==1 && get_blend_method()==Color::BLEND_STRAIGHT) + return ret; + else + return Color::blend(ret,context.get_color(pos),get_amount(),get_blend_method()); + } + } + + return context.get_color(pos); +} + +bool +Layer_Bitmap::accelerated_render(Context context,Surface *out_surface,int quality, const RendDesc &renddesc, ProgressCallback *cb) const +{ + int interp=c; + if(quality>=10) + interp=0; + else if(quality>=5 && interp>1) + interp=1; + + // We can only handle NN and Linear at the moment + //if(interp>1) + // return Layer_Composite::accelerated_render(context,out_surface,quality,renddesc,cb); + + //if we don't actually have a valid surface just skip us + if(!surface.is_valid()) + { + // Render what is behind us + return context.accelerated_render(out_surface,quality,renddesc,cb); + } + + SuperCallback subcb(cb,1,10000,10001+renddesc.get_h()); + + if( get_amount()==1 && + get_blend_method()==Color::BLEND_STRAIGHT && + !trimmed && + renddesc.get_tl()==tl && + renddesc.get_br()==br) + { + // Check for the trivial case + if(surface.get_w()==renddesc.get_w() && surface.get_h()==renddesc.get_h() && gamma_adjust==1.0f) + { + if(cb && !cb->amount_complete(0,100)) return false; + *out_surface=surface; + if(cb && !cb->amount_complete(100,100)) return false; + return true; + } + out_surface->set_wh(renddesc.get_w(),renddesc.get_h()); + } + else + { + // Render what is behind us + if(!context.accelerated_render(out_surface,quality,renddesc,&subcb)) + return false; + } + + if(cb && !cb->amount_complete(10000,10001+renddesc.get_h())) return false; + + Point obr = renddesc.get_br(), + otl = renddesc.get_tl(); + + //Vector::value_type pw=renddesc.get_w()/(renddesc.get_br()[0]-renddesc.get_tl()[0]); + //Vector::value_type ph=renddesc.get_h()/(renddesc.get_br()[1]-renddesc.get_tl()[1]); + + //A = representation of input (just tl,br) //just a scaling right now + //B = representation of output (just tl,br) //just a scaling right now + //sa = scaling for input (0,1) -> (0,w/h) + //sb = scaling for output (0,1) -> (0,w/h) + + float outwf = obr[0] - otl[0]; + float outhf = obr[1] - otl[1]; + + int inw = surface.get_w(); + int inh = surface.get_h(); + + int outw = renddesc.get_w(); + int outh = renddesc.get_h(); + + float inwf, inhf; + Point itl, ibr; + + if (trimmed) + { + inwf = (br[0] - tl[0])*surface.get_w()/width; + inhf = (br[1] - tl[1])*surface.get_h()/height; + itl = Point(tl[0] + (br[0]-tl[0])*left/width, + tl[1] + (br[1]-tl[1])*top/height); + ibr = Point(tl[0] + (br[0]-tl[0])*(left+inw)/width, + tl[1] + (br[1]-tl[1])*(top+inh)/height); + } + else + { + inwf = br[0] - tl[0]; + inhf = br[1] - tl[1]; + itl = tl; + ibr = br; + } + + //need to get the input coords in output space, so we can clip + + //get the desired corners of the bitmap (in increasing order) in integers + //floating point corners + float x1f = (itl[0] - otl[0])*outw/outwf; + float x2f = (ibr[0] - otl[0])*outw/outwf; + float y1f = (itl[1] - otl[1])*outh/outhf; + float y2f = (ibr[1] - otl[1])*outh/outhf; + + if(x1f > x2f) swap(x1f,x2f); + if(y1f > y2f) swap(y1f,y2f); + + int x_start = max(0,(int)floor(x1f)); //probably floor + int x_end = min(outw,(int)ceil(x2f)); //probably ceil + int y_start = max(0,(int)floor(y1f)); //probably floor + int y_end = min(outh,(int)ceil(y2f)); //probably ceil + + //need to get the x,y,dx,dy values from output space to input, so we can do fast interpolation + + //get the starting position in input space... for interpolating + + // in int -> out float: + // Sb(B^-1)A(Sa^-1) x + float inx_start = (((x_start/*+0.5f*/)*outwf/outw + otl[0]) - itl[0])*inw/inwf; //may want to bias this (center of pixel)??? + float iny_start = (((y_start/*+0.5f*/)*outhf/outh + otl[1]) - itl[1])*inh/inhf; //may want to bias this (center of pixel)??? + + //calculate the delta values in input space for one pixel movement in output space + //same matrix but with a vector instead of a point... + float indx = outwf*(inw)/((outw)*inwf); //translations died + float indy = outhf*(inh)/((outh)*inhf); //translations died + + //perhaps use a DDA algorithm... if faster... + // will still want pixel fractions to be floating point since colors are + + //synfig::info("xstart:%d ystart:%d xend:%d yend:%d",x_start,y_start,x_end,y_end); + + //start drawing at the start of the bitmap (either origin or corner of input...) + //and get other info + Surface::alpha_pen pen(out_surface->get_pen(x_start,y_start)); + pen.set_alpha(get_amount()); + pen.set_blend_method(get_blend_method()); + + //check if we should use the downscale filtering + if(quality <= 7) + { + //the stride of the value should be inverted because we want to downsample + //when the stride is small, not big + //int multw = (int)ceil(indx); + //int multh = (int)ceil(indy); + + if(indx > 1.7 || indy > 1.7) + { + /*synfig::info("Decided to downsample? ratios - (%f,%f) -> (%d,%d)", + indx, indy, multw, multh); */ + + //use sample rect here... + + float iny, inx; + int x,y; + + //Point sample - truncate + iny = iny_start;//+0.5f; + for(y = y_start; y < y_end; ++y, pen.inc_y(), iny += indy) + { + inx = inx_start;//+0.5f; + for(x = x_start; x < x_end; x++, pen.inc_x(), inx += indx) + { + Color rc = surface.sample_rect_clip(inx,iny,inx+indx,iny+indy); + pen.put_value(filter(rc)); + } + pen.dec_x(x_end-x_start); + } + + //Color c = (*out_surface)[0][0]; + //synfig::info("ValueBase of first pixel = (%f,%f,%f,%f)",c.get_r(),c.get_g(),c.get_b(),c.get_a()); + + return true; + } + } + + //perform normal interpolation + if(interp==0) + { + //synfig::info("Decided to do nearest neighbor"); + float iny, inx; + int x,y; + + //Point sample - truncate + iny = iny_start;//+0.5f; + for(y = y_start; y < y_end; y++, pen.inc_y(), iny += indy) + { + inx = inx_start;//+0.5f; + int yclamp = min(inh-1, max(0, round_to_int(iny))); + for(x = x_start; x < x_end; x++, pen.inc_x(), inx += indx) + { + int xclamp = min(inw-1, max(0, round_to_int(inx))); + Color c = filter(surface[yclamp][xclamp]); + pen.put_value(c); //must get rid of the clip + } + pen.dec_x(x_end-x_start); + } + } + else + if(interp==1) + { + //bilinear filtering + + //float xmf,xpf,ymf,ypf; + //int xm,xp,ym,yp; + float inx,iny; + int x,y; + + //can probably buffer for x values... + + //loop and based on inx,iny sample input image + iny = iny_start; + for(y = y_start; y < y_end; y++, pen.inc_y(), iny += indy) + { + inx = inx_start; + for(x = x_start; x < x_end; x++, pen.inc_x(), inx += indx) + { + Color col(surface.linear_sample(inx,iny)); + pen.put_value(filter(col)); + } + pen.dec_x(x_end-x_start); + + } + } + else + if(interp==2) + { + //cosine filtering + + //float xmf,xpf,ymf,ypf; + //int xm,xp,ym,yp; + float inx,iny; + int x,y; + + //can probably buffer for x values... + + //loop and based on inx,iny sample input image + iny = iny_start; + for(y = y_start; y < y_end; y++, pen.inc_y(), iny += indy) + { + inx = inx_start; + for(x = x_start; x < x_end; x++, pen.inc_x(), inx += indx) + { + Color col(surface.cosine_sample(inx,iny)); + pen.put_value(filter(col)); + } + pen.dec_x(x_end-x_start); + + } + } + else + { + //cubic filtering + + //float xmf,xpf,ymf,ypf; + //int xm,xp,ym,yp; + float inx,iny; + int x,y; + + //can probably buffer for x values... + + //loop and based on inx,iny sample input image + iny = iny_start; + for(y = y_start; y < y_end; y++, pen.inc_y(), iny += indy) + { + inx = inx_start; + for(x = x_start; x < x_end; x++, pen.inc_x(), inx += indx) + { + Color col(surface.cubic_sample(inx,iny)); + pen.put_value(filter(col)); + } + pen.dec_x(x_end-x_start); + + } + } + + return true; +} + +Rect +Layer_Bitmap::get_bounding_rect()const +{ + return Rect(tl,br); +} diff --git a/synfig-core/src/synfig/layer_bitmap.h b/synfig-core/src/synfig/layer_bitmap.h new file mode 100644 index 0000000..b62a93e --- /dev/null +++ b/synfig-core/src/synfig/layer_bitmap.h @@ -0,0 +1,80 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer_bitmap.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_LAYER_BITMAP_H +#define __SYNFIG_LAYER_BITMAP_H + +/* === H E A D E R S ======================================================= */ + +#include "layer_composite.h" +#include "surface.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/*! \class Layer_Bitmap +** \todo writeme +*/ +class Layer_Bitmap : public Layer_Composite, public Layer_NoDeform +{ + const Color& filter(Color& c)const; +public: + typedef etl::handle Handle; + + Point tl; + Point br; + int c; + mutable Surface surface; + mutable bool trimmed; + mutable unsigned int width, height, top, left; + + Real gamma_adjust; + + Layer_Bitmap(); + + virtual bool set_param(const String & param, ValueBase value); + + virtual ValueBase get_param(const String & param)const; + + virtual Color get_color(Context context, const Point &pos)const; + + virtual Vocab get_param_vocab()const; + + virtual Rect get_bounding_rect()const; + + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + + virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; +}; // END of class Layer_Bitmap + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/layer_composite.cpp b/synfig-core/src/synfig/layer_composite.cpp new file mode 100644 index 0000000..6a25efc --- /dev/null +++ b/synfig-core/src/synfig/layer_composite.cpp @@ -0,0 +1,208 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer_composite.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "layer_composite.h" +#include "context.h" +#include "time.h" +#include "color.h" +#include "surface.h" +#include "renddesc.h" +#include "target.h" + +#include "layer_bitmap.h" + +#include "general.h" +#include "render.h" +#include "paramdesc.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +bool +Layer_Composite::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc_, ProgressCallback *cb) const +{ + RendDesc renddesc(renddesc_); + + if(!amount_) + return context.accelerated_render(surface,quality,renddesc,cb); + + CanvasBase image; + + SuperCallback stageone(cb,0,50000,100000); + SuperCallback stagetwo(cb,50000,100000,100000); + + Layer_Bitmap::Handle surfacelayer(new class Layer_Bitmap()); + + Context iter; + + for(iter=context;*iter;iter++) + image.push_back(*iter); + + image.push_front(surfacelayer.get()); + + // We want to go ahead and schedule any other + // layers... +// while(dynamic_cast(context->get())) +// while(context->get() && +// &context->get()->AcceleratedRender== +// &Layer_Composite::AcceleratedRender) +// image.push_back(*(context++)); + + image.push_back(0); // Alpha black + + // Render the backdrop + if(!context.accelerated_render(&surfacelayer->surface,quality,renddesc,&stageone)) + return false; + + if(quality<=4)surfacelayer->c=3;else + if(quality<=5)surfacelayer->c=2; + else if(quality<=6)surfacelayer->c=1; + else surfacelayer->c=0; + surfacelayer->tl=renddesc.get_tl(); + surfacelayer->br=renddesc.get_br(); + surfacelayer->set_blend_method(Color::BLEND_STRAIGHT); + + image.push_front(const_cast(this)); + + // Set up a surface target + Target::Handle target(surface_target(surface)); + + if(!target) + { + if(cb)cb->error(_("Unable to create surface target")); + return false; + } + + RendDesc desc(renddesc); + + target->set_rend_desc(&desc); + + // Render the scene + return render(Context(image.begin()),target,desc,&stagetwo); + //return render_threaded(Context(image.begin()),target,desc,&stagetwo,2); +} + +Rect +Layer_Composite::get_full_bounding_rect(Context context)const +{ + if(is_disabled() || Color::is_onto(get_blend_method())) + return context.get_full_bounding_rect(); + + return context.get_full_bounding_rect()|get_bounding_rect(); +} + +Layer::Vocab +Layer_Composite::get_param_vocab()const +{ + Layer::Vocab ret(Layer::get_param_vocab()); + + ret.push_back(ParamDesc(amount_,"amount") + .set_local_name(_("Amount")) + ); + ret.push_back(ParamDesc(blend_method_,"blend_method") + .set_local_name(_("Blend Method")) + ); + + return ret; +} + +bool +Layer_Composite::set_param(const String & param, const ValueBase &value) +{ + if(param=="amount" && value.same_type_as(amount_)) + amount_=value.get(amount_); + else + if(param=="blend_method" && value.same_type_as(int())) + { + blend_method_ = static_cast(value.get(int())); + + if (blend_method_ < 0 || blend_method_ >= Color::BLEND_END) + { + warning("illegal value (%d) for blend_method - using Composite instead", blend_method_); + blend_method_ = Color::BLEND_COMPOSITE; + return false; + } + + if (blend_method_ == Color::BLEND_STRAIGHT && !reads_context()) + { + Canvas::Handle canvas(get_canvas()); + if (canvas) + { + String version(canvas->get_version()); + + if (version == "0.1" || version == "0.2") + { + if (get_name() == "PasteCanvas") + warning("loaded a version %s canvas with a 'Straight' blended PasteCanvas (%s) - check it renders OK", + version.c_str(), get_non_empty_description().c_str()); + else + { + blend_method_ = Color::BLEND_COMPOSITE; + converted_blend_ = true; + + // if this layer has a transparent color, go back and set the color again + // now that we know we are converting the blend method as well. that will + // make the color non-transparent, and change the blend method to alpha over + if (transparent_color_) + set_param("color", get_param("color")); + } + } + } + } + } + else + return Layer::set_param(param,value); + return true; +} + +ValueBase +Layer_Composite::get_param(const String & param)const +{ + if(param=="amount") + return get_amount(); + if(param=="blend_method") + return static_cast(get_blend_method()); + return Layer::get_param(param); +} diff --git a/synfig-core/src/synfig/layer_composite.h b/synfig-core/src/synfig/layer_composite.h new file mode 100644 index 0000000..cb9497d --- /dev/null +++ b/synfig-core/src/synfig/layer_composite.h @@ -0,0 +1,100 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer_composite.h +** \brief Composite Layer Class Implementation +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_LAYER_COMPOSITE_H +#define __SYNFIG_LAYER_COMPOSITE_H + +/* === H E A D E R S ======================================================= */ + +#include "layer.h" +#include "color.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class Layer_NoDeform {}; + + +/*! \class Layer_Composite +** \brief Base class for layers that put stuff on top of lower layers +*/ +class Layer_Composite : public Layer +{ +private: + + float amount_; + + Color::BlendMethod blend_method_; + +protected: + + Layer_Composite( + float amount=1.0, + Color::BlendMethod blend_method=Color::BLEND_COMPOSITE + ): + amount_ (amount), + blend_method_ (blend_method), + converted_blend_ (false), + transparent_color_ (false) + { } + + bool converted_blend_; + bool transparent_color_; + +public: + + float get_amount()const { return amount_; } + + Layer_Composite& set_amount(float x) { amount_=x; return *this; } + + Color::BlendMethod get_blend_method()const { return blend_method_; } + + Layer_Composite& set_blend_method(Color::BlendMethod x) { blend_method_=x; return *this; } + + virtual bool is_solid_color()const { return amount_==1.0f && blend_method_==Color::BLEND_STRAIGHT; } + + bool is_disabled()const { return amount_==0.0f; } + + virtual Vocab get_param_vocab()const; + + virtual bool set_param(const String ¶m, const ValueBase &value); + + virtual ValueBase get_param(const String ¶m)const; + + virtual Rect get_full_bounding_rect(Context context)const; + + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; +}; // END of class Layer_Composite + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/layer_duplicate.cpp b/synfig-core/src/synfig/layer_duplicate.cpp new file mode 100644 index 0000000..d002016 --- /dev/null +++ b/synfig-core/src/synfig/layer_duplicate.cpp @@ -0,0 +1,210 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer_duplicate.cpp +** \brief Implementation of the "Duplicate" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "string.h" +#include "layer_duplicate.h" +#include "time.h" +#include "context.h" +#include "paramdesc.h" +#include "renddesc.h" +#include "surface.h" +#include "value.h" +#include "valuenode.h" +#include "canvas.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace synfig; +using namespace etl; +using namespace std; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Layer_Duplicate); +SYNFIG_LAYER_SET_NAME(Layer_Duplicate,"duplicate"); +SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Duplicate,N_("Duplicate")); +SYNFIG_LAYER_SET_CATEGORY(Layer_Duplicate,N_("Other")); +SYNFIG_LAYER_SET_VERSION(Layer_Duplicate,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Layer_Duplicate,"$Id$"); + +/* === M E M B E R S ======================================================= */ + +Layer_Duplicate::Layer_Duplicate(): + Layer_Composite(1.0,Color::BLEND_COMPOSITE) +{ + LinkableValueNode* index_value_node = ValueNode_Duplicate::create(Real(3)); + connect_dynamic_param("index", index_value_node); +} + +Layer::Handle +Layer_Duplicate::clone(const GUID& deriv_guid)const +{ + Layer::Handle ret = (Layer::Handle)Layer_Composite::clone(deriv_guid); + + const DynamicParamList &dpl = dynamic_param_list(); + DynamicParamList::const_iterator iter = dpl.find("index"); + + // if we have a dynamic "index" parameter, make a new one in the clone + // it's not good to have two references to the same index valuenode, + // or nested duplications cause an infinite loop + if (iter != dpl.end()) + ret->connect_dynamic_param(iter->first,iter->second->clone(deriv_guid)); + + return ret; +} + +bool +Layer_Duplicate::set_param(const String ¶m, const ValueBase &value) +{ + IMPORT(index); + return Layer_Composite::set_param(param,value); +} + +ValueBase +Layer_Duplicate::get_param(const String ¶m)const +{ + EXPORT(index); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +void +Layer_Duplicate::set_time(Context context, Time time)const +{ + context.set_time(time); + time_cur=time; +} + +void +Layer_Duplicate::set_time(Context context, Time time, const Point &pos)const +{ + context.set_time(time,pos); + time_cur=time; +} + +Color +Layer_Duplicate::get_color(Context context, const Point &pos)const +{ + handle duplicate_param = get_duplicate_param(); + if (!duplicate_param) return context.get_color(pos); + + Color::BlendMethod blend_method(get_blend_method()); + float amount(get_amount()); + Color color; + + Mutex::Lock lock(mutex); + duplicate_param->reset_index(time_cur); + do + { + context.set_time(time_cur+1); + context.set_time(time_cur); + color = Color::blend(context.get_color(pos),color,amount,blend_method); + } while (duplicate_param->step(time_cur)); + + return color; +} + +Layer::Vocab +Layer_Duplicate::get_param_vocab()const +{ + Layer::Vocab ret; + ret=Layer_Composite::get_param_vocab(); + + ret.push_back(ParamDesc("index") + .set_local_name(_("Index")) + .set_description(_("Copy Index")) + ); + + return ret; +} + +ValueNode_Duplicate::Handle +Layer_Duplicate::get_duplicate_param()const +{ + const DynamicParamList &dpl = dynamic_param_list(); + DynamicParamList::const_iterator iter = dpl.find("index"); + if (iter == dpl.end()) return NULL; + etl::rhandle param(iter->second); + return ValueNode_Duplicate::Handle::cast_dynamic(param); +} + +bool +Layer_Duplicate::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + if(quality == 10) + return context.accelerated_render(surface,quality,renddesc,cb); + + if(context->empty()) + { + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + surface->clear(); + return true; + } + + SuperCallback subimagecb; + Surface tmp; + int i = 0; + + handle duplicate_param = get_duplicate_param(); + if (!duplicate_param) return context.accelerated_render(surface,quality,renddesc,cb); + + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + surface->clear(); + + Color::BlendMethod blend_method(get_blend_method()); + int steps = duplicate_param->count_steps(time_cur); + + Mutex::Lock lock(mutex); + duplicate_param->reset_index(time_cur); + do + { + subimagecb=SuperCallback(cb,i*(5000/steps),(i+1)*(5000/steps),5000); + // \todo can we force a re-evaluation of all the variables without changing the time twice? + context.set_time(time_cur+1); + context.set_time(time_cur); + if(!context.accelerated_render(&tmp,quality,renddesc,&subimagecb)) return false; + + Surface::alpha_pen apen(surface->begin()); + apen.set_alpha(get_amount()); + // \todo have a checkbox allowing use of 'behind' to reverse the order? + apen.set_blend_method(i ? blend_method : Color::BLEND_COMPOSITE); + tmp.blit_to(apen); + i++; + } while (duplicate_param->step(time_cur)); + + return true; +} diff --git a/synfig-core/src/synfig/layer_duplicate.h b/synfig-core/src/synfig/layer_duplicate.h new file mode 100644 index 0000000..7c588e5 --- /dev/null +++ b/synfig-core/src/synfig/layer_duplicate.h @@ -0,0 +1,69 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer_duplicate.h +** \brief Header file for implementation of the "Duplicate" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_LAYER_DUPLICATE_H__ +#define __SYNFIG_LAYER_DUPLICATE_H__ + +/* === H E A D E R S ======================================================= */ + +#include "valuenode_duplicate.h" +#include "layer_composite.h" +#include "time.h" + +/* === S T R U C T S & C L A S S E S ======================================= */ + +namespace synfig { + +class Layer_Duplicate : public synfig::Layer_Composite +{ + SYNFIG_LAYER_MODULE_EXT + +private: + mutable Real index; + mutable Time time_cur; + mutable synfig::Mutex mutex; + +public: + + Layer_Duplicate(); + + //! Duplicates the Layer + virtual Layer::Handle clone(const GUID& deriv_guid=GUID())const; + virtual bool set_param(const String & param, const synfig::ValueBase &value); + virtual ValueBase get_param(const String & param)const; + virtual Color get_color(Context context, const Point &pos)const; + virtual void set_time(Context context, Time time)const; + virtual void set_time(Context context, Time time, const Point &point)const; + virtual ValueNode_Duplicate::Handle get_duplicate_param()const; + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + virtual Vocab get_param_vocab()const; + virtual bool reads_context()const { return true; } +}; // END of class Layer_Duplicate + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/layer_mime.cpp b/synfig-core/src/synfig/layer_mime.cpp new file mode 100644 index 0000000..5524fc2 --- /dev/null +++ b/synfig-core/src/synfig/layer_mime.cpp @@ -0,0 +1,148 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer_mime.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "layer_mime.h" + +#include "layer.h" +#include "time.h" +#include "string.h" +#include "vector.h" + +#include "context.h" +#include "time.h" +#include "color.h" +#include "surface.h" +#include "renddesc.h" +#include "target.h" + +#include "general.h" +#include "paramdesc.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +Layer_Mime::Layer_Mime(String x):name(x) +{ + // Throw a bogus default version onto the parameter list. + param_list["Version"]="9"; +} + +String +Layer_Mime::get_version()const +{ + return get_param("Version").get(String()); +} + +bool +Layer_Mime::set_version(const String &ver) +{ + return set_param("Version",ver); +} + +String +Layer_Mime::get_local_name()const +{ + return _("[MIME]")+get_name(); +} + +bool +Layer_Mime::set_param(const String ¶m, const ValueBase &value) +{ + // Don't try to set the name + if(param=="name" || param=="Name" || param=="name__") + return false; + + // Otherwise, remember this parameter's value + param_list[param]=value; + return true; +} + +ValueBase +Layer_Mime::get_param(const String ¶m)const +{ + // If they are requesting the name of + // the layer, just return it + if(param=="name" || param=="Name" || param=="name__") + return ValueBase(name); + + // Otherwise, return the stored parameter value + map::const_iterator iter=param_list.find(param); + if(iter!=param_list.end()) + return iter->second; + return ValueBase(); +} + +Color +Layer_Mime::get_color(Context context, const Point &pos)const +{ + // A Layer_Mime layer should do nothing at all. + return context.get_color(pos); +} + +bool +Layer_Mime::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + // A Layer_Mime layer should do nothing at all. + return context.accelerated_render(surface,quality,renddesc,cb); +} + +Layer::Vocab +Layer_Mime::get_param_vocab()const +{ + Layer::Vocab ret; + map::const_iterator iter; + + // Construct the vocabulary from the stored + // parameters + for(iter=param_list.begin();iter!=param_list.end();iter++) + { + // Make sure that we don't add the version + // into the vocabulary + if(iter->first!="Version") + ret.push_back(ParamDesc(iter->first)); + } + + // ... and return it + return ret; +} diff --git a/synfig-core/src/synfig/layer_mime.h b/synfig-core/src/synfig/layer_mime.h new file mode 100644 index 0000000..9befa47 --- /dev/null +++ b/synfig-core/src/synfig/layer_mime.h @@ -0,0 +1,75 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer_mime.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_LAYER_MIME_H +#define __SYNFIG_LAYER_MIME_H + +/* === H E A D E R S ======================================================= */ + +#include "layer.h" +#include "string.h" +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/*! \class Layer_Mime +** The mime layer is a layer that is used when an unknown +** layer type is requested. This allows people without +** all of the correct layers installed to still work with +** that composition. +*/ +class Layer_Mime : public Layer +{ + std::map param_list; + String name; +public: + Layer_Mime(String name); + + virtual String get_version()const; + + virtual bool set_version(const String &ver); + + virtual bool set_param(const String ¶m, const ValueBase &value); + + virtual ValueBase get_param(const String ¶m)const; + + virtual Color get_color(Context context, const Point &pos)const; + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + + virtual Vocab get_param_vocab()const; + virtual String get_local_name()const; + +}; + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/layer_motionblur.cpp b/synfig-core/src/synfig/layer_motionblur.cpp new file mode 100644 index 0000000..59f90f7 --- /dev/null +++ b/synfig-core/src/synfig/layer_motionblur.cpp @@ -0,0 +1,202 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer_motionblur.cpp +** \brief Implementation of the "Motion Blur" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "string.h" +#include "layer_motionblur.h" +#include "time.h" +#include "context.h" +#include "paramdesc.h" +#include "renddesc.h" +#include "surface.h" +#include "value.h" +#include "valuenode.h" +#include "canvas.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace synfig; +using namespace etl; +using namespace std; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Layer_MotionBlur); +SYNFIG_LAYER_SET_NAME(Layer_MotionBlur,"MotionBlur"); // todo: use motion_blur +SYNFIG_LAYER_SET_LOCAL_NAME(Layer_MotionBlur,N_("Motion Blur")); +SYNFIG_LAYER_SET_CATEGORY(Layer_MotionBlur,N_("Blurs")); +SYNFIG_LAYER_SET_VERSION(Layer_MotionBlur,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Layer_MotionBlur,"$Id$"); + +/* === M E M B E R S ======================================================= */ + +Layer_MotionBlur::Layer_MotionBlur(): + Layer_Composite (1.0,Color::BLEND_STRAIGHT), + aperture (0) +{ +} + +bool +Layer_MotionBlur::set_param(const String ¶m, const ValueBase &value) +{ + + IMPORT(aperture); + return Layer_Composite::set_param(param,value); +} + +ValueBase +Layer_MotionBlur::get_param(const String ¶m)const +{ + EXPORT(aperture); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +void +Layer_MotionBlur::set_time(Context context, Time time)const +{ + context.set_time(time); + time_cur=time; +} + +void +Layer_MotionBlur::set_time(Context context, Time time, const Point &pos)const +{ + context.set_time(time,pos); + time_cur=time; +} + +Color +Layer_MotionBlur::get_color(Context context, const Point &pos)const +{ +/* if(aperture) + { + Time time(time_cur); + time+=(Vector::value_type)( (signed)(RAND_MAX/2)-(signed)rand() )/(Vector::value_type)(RAND_MAX) *aperture -aperture*0.5; + context.set_time(time, pos); + } +*/ + return context.get_color(pos); +} + +Layer::Vocab +Layer_MotionBlur::get_param_vocab()const +{ + Layer::Vocab ret; + //ret=Layer_Composite::get_param_vocab(); + + ret.push_back(ParamDesc("aperture") + .set_local_name(_("Aperture")) + .set_description(_("Shutter Time")) + ); + + return ret; +} + +bool +Layer_MotionBlur::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + if(aperture && quality<=10) + { + //int x, y; + SuperCallback subimagecb; + int samples=1; + switch(quality) + { + case 1: // Production Quality + samples=32; + break; + case 2: // Excellent Quality + samples=24; + break; + case 3: // Good Quality + samples=16; + break; + case 4: // Moderate Quality + samples=12; + break; + case 5: // Draft Quality + samples=7; + break; + case 6: + samples=6; + break; + case 7: + samples=5; + break; + case 8: + samples=3; + break; + case 9: + samples=2; + break; + case 10: // Rough Quality + default: + samples=1; + break; + + } + + if (samples == 1) return context.accelerated_render(surface,quality,renddesc,cb); + + Surface tmp; + int i; + float scale, divisor = 0; + + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + surface->clear(); + + for(i=0;i +#endif + +#include "layer_pastecanvas.h" +#include "string.h" +#include "time.h" +#include "context.h" +#include "paramdesc.h" +#include "renddesc.h" +#include "surface.h" +#include "value.h" +#include "valuenode.h" +#include "canvas.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace etl; +using namespace std; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +#define MAX_DEPTH 10 + +// if this isn't defined, the 'dead heads' in examples/pirates.sifz don't render properly +#define SYNFIG_CLIP_PASTECANVAS + +//#ifdef __APPLE__ +//#undef SYNFIG_CLIP_PASTECANVAS +//#endif + +/* === C L A S S E S ======================================================= */ + +class depth_counter // Makes our recursive depth counter exception-safe +{ + int *depth; +public: + depth_counter(int &x):depth(&x) { (*depth)++; } + ~depth_counter() { (*depth)--; } +}; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Layer_PasteCanvas); +SYNFIG_LAYER_SET_NAME(Layer_PasteCanvas,"PasteCanvas"); // todo: use paste_canvas +SYNFIG_LAYER_SET_LOCAL_NAME(Layer_PasteCanvas,N_("Paste Canvas")); +SYNFIG_LAYER_SET_CATEGORY(Layer_PasteCanvas,N_("Other")); +SYNFIG_LAYER_SET_VERSION(Layer_PasteCanvas,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Layer_PasteCanvas,"$Id$"); + +/* === M E T H O D S ======================================================= */ + +Layer_PasteCanvas::Layer_PasteCanvas(): + origin(0,0), + focus(0,0), + depth(0), + zoom(0), + time_offset(0), + extra_reference(false) +{ + children_lock=false; + muck_with_time_=true; + curr_time=Time::begin(); +} + +Layer_PasteCanvas::~Layer_PasteCanvas() +{ +/* if(canvas) + canvas->parent_set.erase(this); +*/ + + //if(canvas)DEBUGINFO(strprintf("%d",canvas->count())); + + set_sub_canvas(0); + + //if(canvas && (canvas->is_inline() || !get_canvas() || get_canvas()->get_root()!=canvas->get_root())) + //if(extra_reference) + // canvas->unref(); +} + +String +Layer_PasteCanvas::get_local_name()const +{ + if(!canvas) return _("Pasted Canvas"); + if(canvas->is_inline()) return _("Inline Canvas"); + if(canvas->get_root()==get_canvas()->get_root()) return '[' + canvas->get_id() + ']'; + + return '[' + canvas->get_file_name() + ']'; +} + +Layer::Vocab +Layer_PasteCanvas::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("origin") + .set_local_name(_("Origin")) + .set_description(_("Point where you want the origin to be")) + ); + ret.push_back(ParamDesc("canvas") + .set_local_name(_("Canvas")) + .set_description(_("Canvas to paste")) + ); + ret.push_back(ParamDesc("zoom") + .set_local_name(_("Zoom")) + .set_description(_("Size of canvas")) + ); + + ret.push_back(ParamDesc("time_offset") + .set_local_name(_("Time Offset")) + ); + + ret.push_back(ParamDesc("children_lock") + .set_local_name(_("Children Lock")) + ); + + ret.push_back(ParamDesc("focus") + .set_local_name(_("Focus Point")) + .set_origin("origin") + .set_connect("origin") + .set_description(_("Point to remain fixed when zooming")) + // .set_invisible_duck() + ); + + // optimize_layers() in canvas.cpp makes a new PasteCanvas layer + // and copies over the parameters of the old layer. the + // 'curr_time' member wasn't being copied, so I've added it as a + // hidden, non critical parameter, and now it will be. this + // allows a single exported subcanvas to be used more than once at + // a time, with different time offets in each. see bug #1896557. + ret.push_back(ParamDesc("curr_time") + .set_local_name(_("Current Time")) + .not_critical() + .hidden() + ); + + return ret; +} + +bool +Layer_PasteCanvas::set_param(const String & param, const ValueBase &value) +{ + IMPORT(origin); + IMPORT(focus); + + // IMPORT(canvas); + if(param=="canvas" && value.same_type_as(Canvas::Handle())) + { + set_sub_canvas(value.get(Canvas::Handle())); + return true; + } + + //! \todo this introduces bug 1844764 if enabled; it was introduced in r954. + // http://synfig.org/images/3/3d/Moving-waypoints.sifz is an + // example of an animation that has its waypoints displayed + // incorrectly without this fix; select the outer layer and drag + // the time slider. The linear waypoints don't take effect until + // 5s, but the time slider appears to pass the first one at 3s. +#if 0 + if (param=="time_offset" && value.same_type_as(time_offset)) + { + if (time_offset != value.get(Time())) + { + value.put(&time_offset); + // notify that the time_offset has changed so we can update the + // waypoint positions in parent layers + changed(); + } + return true; + } +#else + IMPORT(time_offset); +#endif + + IMPORT(children_lock); + IMPORT(zoom); + IMPORT(curr_time); + + return Layer_Composite::set_param(param,value); +} + +void +Layer_PasteCanvas::set_sub_canvas(etl::handle x) +{ + if(canvas && muck_with_time_) + remove_child(canvas.get()); + + // if(canvas && (canvas->is_inline() || !get_canvas() || get_canvas()->get_root()!=canvas->get_root())) + if (extra_reference) + canvas->unref(); + + child_changed_connection.disconnect(); + + if (canvas != x) signal_subcanvas_changed()(); + + canvas=x; + + /*if(canvas) + child_changed_connection=canvas->signal_changed().connect( + sigc::mem_fun( + *this, + &Layer_PasteCanvas::changed + ) + ); + */ + if(canvas) + bounds = ((canvas->get_context().get_full_bounding_rect() - focus) * exp(zoom) + origin + focus); + + if(canvas && muck_with_time_) + add_child(canvas.get()); + + if(canvas && (canvas->is_inline() || !get_canvas() || get_canvas()->get_root()!=canvas->get_root())) + { + canvas->ref(); + extra_reference = true; + } + else + extra_reference = false; + + if(canvas) + on_canvas_set(); +} + +// when a pastecanvas that contains another pastecanvas is copy/pasted +// from one document to another, only the outermost pastecanvas was +// getting its renddesc set to match that of its new parent. this +// function is used to recurse through the pastecanvas copying its +// renddesc to any pastecanvases it contains (bug #2116947, svn r2200) +void +Layer_PasteCanvas::update_renddesc() +{ + if(!get_canvas() || !canvas || !canvas->is_inline()) return; + + canvas->rend_desc()=get_canvas()->rend_desc(); + for (Context context = canvas->get_context(); !context->empty(); context++) + { + etl::handle paste = etl::handle::cast_dynamic(*context); + if (paste) paste->update_renddesc(); + } +} + +// This is called whenever the parent canvas gets set/changed +void +Layer_PasteCanvas::on_canvas_set() +{ + //synfig::info("before count()=%d",count()); + if(get_canvas() && canvas && canvas->is_inline() && canvas->parent()!=get_canvas()) + { + //synfig::info("during count()=%d",count()); + canvas->set_inline(get_canvas()); + } + //synfig::info("after count()=%d",count()); +} + +ValueBase +Layer_PasteCanvas::get_param(const String& param)const +{ + EXPORT(origin); + EXPORT(focus); + EXPORT(canvas); + EXPORT(zoom); + EXPORT(time_offset); + EXPORT(children_lock); + EXPORT(curr_time); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +void +Layer_PasteCanvas::set_time(Context context, Time time)const +{ + if(depth==MAX_DEPTH)return;depth_counter counter(depth); + curr_time=time; + + context.set_time(time); + if(canvas) + { + canvas->set_time(time+time_offset); + + bounds=(canvas->get_context().get_full_bounding_rect()-focus)*exp(zoom)+origin+focus; + } + else + bounds=Rect::zero(); +} + +synfig::Layer::Handle +Layer_PasteCanvas::hit_check(synfig::Context context, const synfig::Point &pos)const +{ + if(depth==MAX_DEPTH)return 0;depth_counter counter(depth); + + if (canvas) { + Point target_pos=(pos-focus-origin)/exp(zoom)+focus; + + if(canvas && get_amount() && canvas->get_context().get_color(target_pos).get_a()>=0.25) + { + if(!children_lock) + { + return canvas->get_context().hit_check(target_pos); + } + return const_cast(this); + } + } + return context.hit_check(pos); +} + +Color +Layer_PasteCanvas::get_color(Context context, const Point &pos)const +{ + if(!canvas || !get_amount()) + return context.get_color(pos); + + if(depth==MAX_DEPTH)return Color::alpha();depth_counter counter(depth); + + Point target_pos=(pos-focus-origin)/exp(zoom)+focus; + + return Color::blend(canvas->get_context().get_color(target_pos),context.get_color(pos),get_amount(),get_blend_method()); +} + + +bool +Layer_PasteCanvas::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + if(cb && !cb->amount_complete(0,10000)) return false; + + if(depth==MAX_DEPTH) + // if we are at the extent of our depth, + // then we should just return whatever is under us. + return context.accelerated_render(surface,quality,renddesc,cb); + + depth_counter counter(depth); + + if(!canvas || !get_amount()) + return context.accelerated_render(surface,quality,renddesc,cb); + + SuperCallback stageone(cb,0,4500,10000); + SuperCallback stagetwo(cb,4500,9000,10000); + SuperCallback stagethree(cb,9000,9999,10000); + + RendDesc desc(renddesc); + Vector::value_type zoomfactor=1.0/exp(zoom); + desc.clear_flags(); + desc.set_tl((desc.get_tl()-focus-origin)*zoomfactor+focus); + desc.set_br((desc.get_br()-focus-origin)*zoomfactor+focus); + desc.set_flags(RendDesc::PX_ASPECT); + + if (is_solid_color() || context->empty()) + { + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + surface->clear(); + } + else if (!context.accelerated_render(surface,quality,renddesc,&stageone)) + return false; + + if(muck_with_time_ && curr_time!=Time::begin() && canvas->get_time()!=curr_time+time_offset) + canvas->set_time(curr_time+time_offset); + + Color::BlendMethod blend_method(get_blend_method()); + const Rect full_bounding_rect(canvas->get_context().get_full_bounding_rect()); + + bool blend_using_straight = false; // use 'straight' just for the central blit + + // sometimes the user changes the parameters while we're + // rendering, causing our pasted canvas' bounding box to shrink + // and no longer overlap with our tile. if that has happened, + // let's just stop now - we'll be refreshing soon anyway + //! \todo shouldn't a mutex ensure this isn't needed? + // http://synfig.org/images/d/d2/Bbox-change.sifz is an example + // that shows this happening - open the encapsulation, select the + // 'shade', and toggle the 'invert' parameter quickly. + // Occasionally you'll see: + // error: Context::accelerated_render(): Layer "shade" threw a bad_alloc exception! + // where the shade layer tries to allocate itself a canvas of + // negative proportions, due to changing bounding boxes. + if (!etl::intersect(desc.get_rect(), full_bounding_rect)) + { + warning("%s:%d bounding box shrank while rendering?", __FILE__, __LINE__); + return true; + } + + // we have rendered what's under us, if necessary + if(context->empty()) + { + // if there's nothing under us, and we're blending 'onto', then we've finished + if (Color::is_onto(blend_method)) return true; + + // there's nothing under us, so using straight blending is + // faster than and equivalent to using composite, but we don't + // want to blank the surrounding areas + if (blend_method==Color::BLEND_COMPOSITE) blend_using_straight = true; + } + + if (!etl::intersect(context.get_full_bounding_rect(),(full_bounding_rect-focus)*exp(zoom)+origin+focus)) + { + // if there's no intersection between the context and our + // surface, and we're rendering 'onto', then we're done + if (Color::is_onto(blend_method) && !Color::is_straight(blend_method)) + return true; + + /* 'straight' is faster than 'composite' and has the same + * effect if the affected area of the lower layer is + * transparent; however, if we're not clipping the blit to + * just the bounding rectangle, the affected area is the whole + * tile, so we can't use this optimisation. if we are + * clipping, then we can use 'straight' to blit the clipped + * rectangle, but we shouldn't set blend_method to 'straight', + * or the surrounding areas will be blanked, which we don't + * want. + */ +#ifdef SYNFIG_CLIP_PASTECANVAS + if (blend_method==Color::BLEND_COMPOSITE) blend_using_straight = true; +#endif // SYNFIG_CLIP_PASTECANVAS + } + +#ifdef SYNFIG_CLIP_PASTECANVAS + Rect area(desc.get_rect() & full_bounding_rect); + + Point min(area.get_min()); + Point max(area.get_max()); + + if (desc.get_tl()[0] > desc.get_br()[0]) swap(min[0], max[0]); + if (desc.get_tl()[1] > desc.get_br()[1]) swap(min[1], max[1]); + + const int x(floor_to_int((min[0] - desc.get_tl()[0]) / desc.get_pw())); + const int y(floor_to_int((min[1] - desc.get_tl()[1]) / desc.get_ph())); + const int w( ceil_to_int((max[0] - desc.get_tl()[0]) / desc.get_pw()) - x); + const int h( ceil_to_int((max[1] - desc.get_tl()[1]) / desc.get_ph()) - y); + + const int tw = desc.get_w(); + const int th = desc.get_h(); + + desc.set_subwindow(x,y,w,h); + + // \todo this used to also have "area.area()<=0.000001 || " - is it useful? + // it was causing bug #1809480 (Zoom in beyond 8.75 in nested canvases fails) + if(desc.get_w()==0 || desc.get_h()==0) + { + if(cb && !cb->amount_complete(10000,10000)) return false; + return true; + } + + // SYNFIG_CLIP_PASTECANVAS is defined, so we are only touching the + // pixels within the affected rectangle. If the blend method is + // 'straight', then we need to blend transparent pixels with the + // clipped areas of this tile, because with the 'straight' blend + // method, even transparent pixels have an effect on the layers below + if (Color::is_straight(blend_method)) + { + Surface clearsurface; + + Surface::alpha_pen apen(surface->begin()); + apen.set_alpha(get_amount()); + + // the area we're about to blit is transparent, so it doesn't + // matter whether we use 'straight' or 'straight onto' here + if (blend_method == Color::BLEND_ALPHA_BRIGHTEN) + apen.set_blend_method(blend_method); + else + apen.set_blend_method(Color::BLEND_STRAIGHT); + + /* This represents the area we're pasting into the tile, + * within the tile as a whole. Areas (A), (B), (C) and (D) + * need blending with the underlying context if they're not + * zero-sized: + * + * 0 x x+w tw + * 0 +------------------------+ + * | | + * | (A) | + * | | + * y | - - +----------+ - - - | + * | | | | + * | (C) | w by h | (D) | + * | | | | + * y+h | - - +----------+ - - - | + * | | + * | (B) | + * | | + * tw +------------------------+ + */ + + if (y > 0) // draw the full-width strip above the rectangle (A) + { apen.move_to(0,0); clearsurface.set_wh(tw,y); clearsurface.clear(); clearsurface.blit_to(apen); } + if (y+h < th) // draw the full-width strip below the rectangle (B) + { apen.move_to(0,y+h); clearsurface.set_wh(tw,th-(y+h)); clearsurface.clear(); clearsurface.blit_to(apen); } + if (x > 0) // draw the box directly left of the rectangle (C) + { apen.move_to(0,y); clearsurface.set_wh(x,h); clearsurface.clear(); clearsurface.blit_to(apen); } + if (x+w < tw) // draw the box directly right of the rectangle (D) + { apen.move_to(x+w,y); clearsurface.set_wh(tw-(x+w),h); clearsurface.clear(); clearsurface.blit_to(apen); } + } +#endif // SYNFIG_CLIP_PASTECANVAS + + // render the canvas to be pasted onto pastesurface + Surface pastesurface; + if(!canvas->get_context().accelerated_render(&pastesurface,quality,desc,&stagetwo)) + return false; + +#ifdef SYNFIG_CLIP_PASTECANVAS + Surface::alpha_pen apen(surface->get_pen(x,y)); +#else // SYNFIG_CLIP_PASTECANVAS + Surface::alpha_pen apen(surface->begin()); +#endif // SYNFIG_CLIP_PASTECANVAS + + apen.set_alpha(get_amount()); + apen.set_blend_method(blend_using_straight ? Color::BLEND_STRAIGHT : blend_method); + pastesurface.blit_to(apen); + + if(cb && !cb->amount_complete(10000,10000)) return false; + + return true; +} + +Rect +Layer_PasteCanvas::get_bounding_rect()const +{ + return bounds; +} + +void Layer_PasteCanvas::get_times_vfunc(Node::time_set &set) const +{ + Node::time_set tset; + if(canvas) tset = canvas->get_times(); + + Node::time_set::iterator i = tset.begin(), end = tset.end(); + + //Make sure we offset the time... + //! \todo: SOMETHING STILL HAS TO BE DONE WITH THE OTHER DIRECTION + // (recursing down the tree needs to take this into account too...) + for(; i != end; ++i) + set.insert(*i +#ifdef ADJUST_WAYPOINTS_FOR_TIME_OFFSET // see node.h + - time_offset +#endif + ); + + Layer::get_times_vfunc(set); +} diff --git a/synfig-core/src/synfig/layer_pastecanvas.h b/synfig-core/src/synfig/layer_pastecanvas.h new file mode 100644 index 0000000..2d4714c --- /dev/null +++ b/synfig-core/src/synfig/layer_pastecanvas.h @@ -0,0 +1,165 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer_pastecanvas.h +** \brief Header file for implementation of the "Paste Canvas" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_LAYER_PASTEIMAGE_H +#define __SYNFIG_LAYER_PASTEIMAGE_H + +/* === H E A D E R S ======================================================= */ + +#include "layer_composite.h" +#include "color.h" +#include "vector.h" +#include "real.h" +#include "time.h" +#include "canvasbase.h" +#include "canvas.h" +#include "rect.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class Layer_PasteCanvas : public Layer_Composite, public Layer_NoDeform +{ + SYNFIG_LAYER_MODULE_EXT +private: + + Vector origin; + Vector focus; + + etl::loose_handle canvas; + + //! Recursion depth counter + mutable int depth; + + Real zoom; + + Time time_offset; + + mutable Time curr_time; + + bool muck_with_time_; + + bool children_lock; + + mutable Rect bounds; + + sigc::connection child_changed_connection; + + // Nasty hack: Remember whether we called an extra ref() when + // setting the canvas, so we know whether to call an extra unref() + // when finished with the canvas. + // + // Here's the story: + // + // The root canvas is destructed first. That sets the + // Layer::canvas_ (the parent canvas) of any PasteCanvas layer it + // contains to nil, due to a call to Layer::set_canvas(0), + // triggered by the connection made when Layer::set_canvas + // originally set its canvas_ member to point to the root canvas. + // ~Canvas does begin_delete() which triggers that connection. + // + // After ~Canvas has run, the members of the root canvas are + // freed, including its children_ list. If this was the last + // reference to the child canvas that the pastecanvas uses, that + // child canvas will Layer_PasteCanvas::set_sub_canvas(0) on the + // PasteCanvas layer to set its canvas (the child, pasted canvas) + // not to refer to the soon-to-be destroys child canvas. But + // set_sub_canvas() originally looked at the value of + // Layer::canvas_ (the parent canvas, obtained via + // Layer::get_canvas()) to decide whether to do an extra ref() on + // canvas (the child canvas). We need to unref() it now if we + // did, but we've forgotten whether we did. So we use this + // 'extra_reference' member to store that decision. + bool extra_reference; + + /* + -- ** -- S I G N A L S ------------------------------------------------------- + */ + +private: + + sigc::signal signal_subcanvas_changed_; + + /* + -- ** -- S I G N A L I N T E R F A C E ------------------------------------- + */ + +public: + + sigc::signal& signal_subcanvas_changed() { return signal_subcanvas_changed_; } + +public: + + void update_renddesc(); + + virtual void on_canvas_set(); + + void set_muck_with_time(bool x=false) { muck_with_time_=x; } + + etl::handle get_sub_canvas()const { return canvas; } + void set_sub_canvas(etl::handle x); + + Real get_zoom()const { return zoom; } + + Time get_time_offset()const { return time_offset; } + + Point get_origin()const { return origin; } + + Layer_PasteCanvas(); + virtual ~Layer_PasteCanvas(); + + virtual String get_local_name()const; + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + + virtual ValueBase get_param(const String & param)const; + + virtual Color get_color(Context context, const Point &pos)const; + + virtual void set_time(Context context, Time time)const; + + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + + virtual Vocab get_param_vocab()const; + + virtual synfig::Rect get_bounding_rect()const; + + virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + +protected: + virtual void get_times_vfunc(Node::time_set &set) const; + +}; // END of class Layer_PasteCanvas + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/layer_polygon.cpp b/synfig-core/src/synfig/layer_polygon.cpp new file mode 100644 index 0000000..46efffd --- /dev/null +++ b/synfig-core/src/synfig/layer_polygon.cpp @@ -0,0 +1,177 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer_polygon.cpp +** \brief Implementation of the "Polygon" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "layer_polygon.h" +#include "string.h" +#include "time.h" +#include "context.h" +#include "paramdesc.h" +#include "renddesc.h" +#include "surface.h" +#include "value.h" +#include "valuenode.h" +//#include "ETL/bezier" +#include + +#include +using std::deque; + +#endif + +/* === U S I N G =========================================================== */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Layer_Polygon); +SYNFIG_LAYER_SET_NAME(Layer_Polygon,"polygon"); +SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Polygon,N_("Polygon")); +SYNFIG_LAYER_SET_CATEGORY(Layer_Polygon,N_("Geometry")); +SYNFIG_LAYER_SET_VERSION(Layer_Polygon,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Layer_Polygon,"$Id$"); + +/* === C L A S S E S ======================================================= */ + +/* === M E T H O D S ======================================================= */ + +Layer_Polygon::Layer_Polygon(): + Layer_Shape (1.0,Color::BLEND_COMPOSITE), + vector_list (0) +{ + vector_list.push_back(Point(0,0.5)); + vector_list.push_back(Point(-0.333333,0)); + vector_list.push_back(Point(0.333333,0)); + sync(); +} + +Layer_Polygon::~Layer_Polygon() +{ +} + +void +Layer_Polygon::sync() +{ +/* + int i,pointcount=vector_list.size(); + + if(pointcount<3) + return; + + //Layer_Shape::clear(); + //clear(); + + // Build edge table + move_to(vector_list[0][0],vector_list[0][1]); + + for(i = 1;i < pointcount; i++) + { + if(isnan(vector_list[i][0]) || isnan(vector_list[i][1])) + break; + line_to(vector_list[i][0],vector_list[i][1]); + } + close(); + //endpath(); +*/ +} + +void +Layer_Polygon::add_polygon(const std::vector &point_list) +{ + int i,pointcount=point_list.size(); + + if(pointcount<3) + return; + + //Layer_Shape::clear(); + //clear(); + + // Build edge table + move_to(point_list[0][0],point_list[0][1]); + + for(i = 1;i < pointcount; i++) + { + if(isnan(point_list[i][0]) || isnan(point_list[i][1])) + break; + line_to(point_list[i][0],point_list[i][1]); + } + close(); + //endpath(); +} + +void +Layer_Polygon::clear() +{ + Layer_Shape::clear(); + vector_list.clear(); +} + +bool +Layer_Polygon::set_param(const String & param, const ValueBase &value) +{ + if( param=="vector_list" && value.same_type_as(vector_list)) + { + vector_list=value; + Layer_Shape::clear(); + add_polygon(value); + sync(); + return true; + } + + return Layer_Shape::set_param(param,value); +} + +ValueBase +Layer_Polygon::get_param(const String ¶m)const +{ + EXPORT(vector_list); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Shape::get_param(param); +} + +Layer::Vocab +Layer_Polygon::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Shape::get_param_vocab()); + + ret.push_back(ParamDesc("vector_list") + .set_local_name(_("Vector List")) + .set_origin("origin") + ); + + return ret; +} diff --git a/synfig-core/src/synfig/layer_polygon.h b/synfig-core/src/synfig/layer_polygon.h new file mode 100644 index 0000000..262c91b --- /dev/null +++ b/synfig-core/src/synfig/layer_polygon.h @@ -0,0 +1,96 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer_polygon.h +** \brief Header file for implementation of the "Polygon" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_LAYER_POLYGON_H +#define __SYNFIG_LAYER_POLYGON_H + +/* === H E A D E R S ======================================================= */ + +#include "layer_shape.h" +#include "color.h" +#include "vector.h" +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/*! \class Layer_Polygon +** \brief writeme +** \todo This layer needs to support multiple polygons */ +class Layer_Polygon : public Layer_Shape +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + //exported data + std::vector< Point > vector_list; + +protected: + + Layer_Polygon(); + +public: + + ~Layer_Polygon(); + + //! Adds a polygon to the layer + /*! The edge data is automatically added to the + ** EdgeTable, so there is no need to call sync() + ** after adding a polygon using this function. + ** \param point_list A list containing the + ** points that define the polygon's parameter. + */ + void add_polygon(const std::vector &point_list); + + //! Clears out any polygon data + /*! Also clears out the EdgeTable, so there is no + ** need to call sync() after using this function. + */ + void clear(); + + //! Updates EdgeTable so it will reflect the parameter data + void sync(); + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + + virtual ValueBase get_param(const String & param)const; + + virtual Vocab get_param_vocab()const; + +private: + class PolySpan; + bool render_polyspan(Surface *surface,PolySpan &polyspan)const; +}; // END of Layer_Polygon + +}; // END of namespace synfig +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/layer_shape.cpp b/synfig-core/src/synfig/layer_shape.cpp new file mode 100644 index 0000000..2116d2f --- /dev/null +++ b/synfig-core/src/synfig/layer_shape.cpp @@ -0,0 +1,3108 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer_shape.cpp +** \brief Implementation of the "Shape" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "layer_shape.h" +#include "string.h" +#include "time.h" +#include "context.h" +#include "paramdesc.h" +#include "renddesc.h" +#include "surface.h" +#include "value.h" +#include "valuenode.h" +#include "float.h" +#include "blur.h" + +#include "curve_helper.h" + +#include + +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Layer_Shape); +SYNFIG_LAYER_SET_NAME(Layer_Shape,"shape"); +SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Shape,N_("Shape")); +SYNFIG_LAYER_SET_CATEGORY(Layer_Shape,N_("Internal")); +SYNFIG_LAYER_SET_VERSION(Layer_Shape,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Layer_Shape,"$Id$"); + +#define EPSILON 1e-12 + +template < class T > +inline bool IsZero(const T &n) +{ + return (n < EPSILON) && (n > -EPSILON); +} + +/* === C L A S S E S ======================================================= */ + +//Assumes 64 byte aligned structures if at all +struct Primitive +{ + int operation; + int number; + + //Point data[0]; + + enum Operations + { + NONE = -1, + MOVE_TO = 0, //(x,y)+ after first point treated as line_to + CLOSE, // NOT RUNLENGTH enabled + LINE_TO, //(x,y)+ continuous func + CONIC_TO, //(x1,y1,x,y)+ " " + CONIC_TO_SMOOTH, //(x,y)+ " " + CUBIC_TO, //(x1,y1,x2,y2,x,y)+ " " + CUBIC_TO_SMOOTH, //(x2,y2,x,y)+ " " + END + }; +}; + +//******** CURVE FUNCTIONS ***************** +const int MAX_SUBDIVISION_SIZE = 64; +const int MIN_SUBDIVISION_DRAW_LEVELS = 4; + +static void Subd_Conic_Stack(Point *arc) +{ + /* + + b0 + * 0+1 a + b1 b * 1+2*1+2 a + * 1+2 b * + b2 * + * + + 0.1.2 -> 0.1 2 3.4 + + */ + + Real a,b; + + + arc[4][0] = arc[2][0]; + b = arc[1][0]; + + a = arc[1][0] = (arc[0][0] + b)/2; + b = arc[3][0] = (arc[4][0] + b)/2; + arc[2][0] = (a + b)/2; + + + arc[4][1] = arc[2][1]; + b = arc[1][1]; + + a = arc[1][1] = (arc[0][1] + b)/2; + b = arc[3][1] = (arc[4][1] + b)/2; + arc[2][1] = (a + b)/2; + + /* //USING SIMD + + arc[4] = arc[2]; + + arc[3] = (arc[2] + arc[1])/2; + arc[1] = (arc[0] + arc[1])/2; + + arc[2] = (arc[1] + arc[3])/2; + + */ + +} + +static void Subd_Cubic_Stack(Point *arc) +{ + Real a,b,c; + + /* + + b0 + * 0+1 a + b1 b * 1+2*1+2 a + * 1+2 b * 0+3*1+3*2+3 + b2 c * 1+2*2+2 b * + * 2+3 c * + b3 * + * + + 0.1 2.3 -> 0.1 2 3 4 5.6 + + */ + + arc[6][0] = arc[3][0]; + + b = arc[1][0]; + c = arc[2][0]; + + a = arc[1][0] = (arc[0][0] + b)/2; + b = (b + c)/2; + c = arc[5][0] = (arc[6][0] + c)/2; + + a = arc[2][0] = (a + b)/2; + b = arc[4][0] = (b + c)/2; + + arc[3][0] = (a + b)/2; + + + arc[6][1] = arc[3][1]; + + b = arc[1][1]; + c = arc[2][1]; + + a = arc[1][1] = (arc[0][1] + b)/2; + b = (b + c)/2; + c = arc[5][1] = (arc[6][1] + c)/2; + + a = arc[2][1] = (a + b)/2; + b = arc[4][1] = (b + c)/2; + + arc[3][1] = (a + b)/2; + + /* //USING SIMD + temp + + arc[6] = arc[3]; + + //backwards to avoid overwriting + arc[5] = (arc[2] + arc[3])/2; + temp = (arc[1] + arc[2])/2; + arc[1] = (arc[0] + arc[1])/2; + + arc[4] = (temp + arc[5])/2; + arc[2] = (arc[1] + temp)/2; + + arc[3] = (arc[2] + arc[4])/2; + + */ +} + +//************** PARAMETRIC RENDERER SUPPORT STRUCTURES **************** + +// super segment +struct MonoSegment +{ + Rect aabb; + int ydir; + vector pointlist; + + MonoSegment(int dir = 0, Real x0 = 0, Real x1 = 0, Real y0 = 0, Real y1 = 0) + { + aabb.minx = x0; + aabb.maxx = x1; + aabb.miny = y0; + aabb.maxy = y1; + + ydir = dir; + } + + int intersect(Real x,Real y) const + { + if((y < aabb.miny+EPSILON) || (y > aabb.maxy) || (x < aabb.minx)) return 0; + if(x > aabb.maxx) return ydir; + + //int i = 0; + //int size = pointlist.size(); + //vector::const_iterator end = pointlist.end(); + vector::const_iterator p = pointlist.begin(); + + //assumes that the rect culled away anything that would be beyond the edges + if(ydir > 0) + { + while(y > (*++p)[1]) + ; + } + else + { + while(y < (*++p)[1]) + ; + } + + //for the loop to break there must have been a slope (straight line would do nothing) + //vector::const_iterator p1 = p-1; + Real dy = p[-1][1] - p[0][1]; + Real dx = p[-1][0] - p[0][0]; + + assert(dy != 0); + + Real xi = p[0][0] + (y - p[0][1]) * dx / dy; + return (x > xi)*ydir; + } +}; + +struct CurveArray +{ + Rect aabb; //not necessarily as effective - can only reject values + vector pointlist; //run length - p0, p1, p2, p3 = p10, p11, p12, p13 = p20 ... + vector degrees; + + CurveArray(Real x0 = 0, Real x1 = 0, Real y0 = 0, Real y1 = 0) + { + aabb.set(x0,y0,x1,y1); + } + + void reset(Real x0 = 0, Real x1 = 0, Real y0 = 0, Real y1 = 0) + { + aabb.set(x0,y0,x1,y1); + pointlist.clear(); + degrees.clear(); + } + + int size () const + { + return degrees.size(); + } + + void Start(Point m) + { + reset(m[0],m[0],m[1],m[1]); + pointlist.push_back(m); + } + + void AddCubic(Point p1, Point p2, Point dest) + { + aabb.expand(p1[0],p1[1]); + aabb.expand(p2[0],p2[1]); + aabb.expand(dest[0],dest[1]); + + pointlist.push_back(p1); + pointlist.push_back(p2); + pointlist.push_back(dest); + + degrees.push_back(3); + } + + void AddConic(Point p1, Point dest) + { + aabb.expand(p1[0],p1[1]); + aabb.expand(dest[0],dest[1]); + + pointlist.push_back(p1); + pointlist.push_back(dest); + + degrees.push_back(2); + } + + static int intersect_conic(Real x, Real y, Point *p, int /*level*/ = 0) + { + Real ymin,ymax,xmin,xmax; + int intersects = 0; + + //sort the overall curve ys - degenerate detection + ymin = min(p[0][1],p[2][1]); + ymax = max(p[0][1],p[2][1]); + + xmin = min(min(p[0][0],p[1][0]),p[2][0]); + xmax = max(max(p[0][0],p[1][0]),p[2][0]); + + //to the left, to the right and out of range y, or completely out of range y + if( x < xmin ) return 0; + if( x > xmax && (y > ymax || y < ymin) ) return 0; + if( (y > ymax && y > p[1][1]) || (y < ymin && y < p[1][1]) ) return 0; + + //degenerate line max + if(ymin == ymax && ymax == p[1][1]) + return 0; + + //degenerate accept - to the right and crossing the base line + if(x > xmax) + { + return (y <= ymax && y >= ymin); + } + + //solve for curve = y + + //real roots: + //0 roots - 0 intersection + //1 root - get x, and figure out x + //2 roots (non-double root) - get 2 xs, and count xs to the left + + //for conic we can assume 1 intersection for monotonic curve + Real a = p[2][1] - 2*p[1][1] + p[0][1], + b = 2*p[1][1] - 2*p[0][1], + c = p[0][1] - y; + + Real t1 = -1, t2 = -1; + + if(a == 0) + { + //linear - easier :) + if(b == 0) return 0; //may not need this check + + t1 = - c / b; //bt + c = 0 solved + }else + { + //2 degree polynomial + Real b2_4ac = b*b - 4*a*c; + + //if there are double/no roots - no intersections (in real #s that is) + if(b2_4ac <= 0) + { + return 0; + } + + b2_4ac = sqrt(b2_4ac); + + t1 = (-b - b2_4ac) / 2*a, + t2 = (-b + b2_4ac) / 2*a; + } + + //calculate number of intersections + if(t1 >= 0 && t1 <= 1) + { + const Real t = t1; + const Real invt = 1 - t; + + //find x val and it counts if it's to the left of the point + const Real xi = invt*invt*p[0][0] + 2*t*invt*p[1][0] + t*t*p[2][0]; + const Real dy_t = 2*a*t + b; + + if(dy_t) + { + intersects += (x >= xi) * ( dy_t > 0 ? 1 : -1); + } + } + + if(t2 >= 0 && t2 <= 1) + { + const Real t = t2; + const Real invt = 1 - t; + + //find x val and it counts if it's to the left of the point + const Real xi = invt*invt*p[0][0] + 2*t*invt*p[1][0] + t*t*p[2][0]; + const Real dy_t = 2*a*t + b; + + if(dy_t) + { + intersects += (x >= xi) * ( dy_t > 0 ? 1 : -1); + } + } + + return intersects; + } + + static int quadratic_eqn(Real a, Real b, Real c, Real *t0, Real *t1) + { + const Real b2_4ac = b*b - 4*a*c; + + //degenerate reject (can't take sqrt) + if(b2_4ac < 0) + { + return 0; + } + + const Real sqrtb2_4ac = sqrt(b2_4ac); + const Real signb = b < 0 ? -1 : 1; + const Real q = - 0.5 * (b + signb * sqrtb2_4ac); + + *t0 = q/a; + *t1 = c/q; + + return sqrtb2_4ac == 0 ? 1 : 2; + } + + //Newton-Raphson root polishing (we don't care about bounds, assumes very near the desired root) + static Real polish_cubicroot(Real a, Real b, Real c, Real d, Real t, Real *dpdt) + { + const Real cn[4] = {a,b,c,d}; + Real p,dp,newt,oldpmag=FLT_MAX; + + //eval cubic eqn and its derivative + for(;;) + { + p = cn[0]*t + cn[1]; + dp = cn[0]; + + for(int i = 2; i < 4; i++) + { + dp = p + dp*t; + p = cn[i] + p*t; + } + + if(dp == 0) + { + synfig::warning("polish_cubicroot: Derivative should not vanish!!!"); + return t; + } + + newt = t - p/dp; + + if(newt == t || fabs(p) >= oldpmag) + { + *dpdt = dp; + return t; + } + + t = newt; + oldpmag = fabs(p); + } + } + + static int intersect_cubic(Real x, Real y, Point *p, int /*level*/ = 0) + { + const Real INVALIDROOT = -FLT_MAX; + Real ymin,ymax,xmin,xmax; + Real ymin2,ymax2,ymintot,ymaxtot; + int intersects = 0; + + //sort the overall curve ys and xs - degenerate detection + + //open span for the two end points + ymin = min(p[0][1],p[3][1]); + ymax = max(p[0][1],p[3][1]); + + //other points etc. + ymin2 = min(p[1][1],p[2][1]); + ymax2 = max(p[1][1],p[2][1]); + + ymintot = min(ymin,ymin2); + ymaxtot = max(ymax,ymax2); + + //the entire curve control polygon is in this x range + xmin = min(min(p[0][0],p[1][0]),min(p[2][0],p[3][0])); + xmax = max(max(p[0][0],p[1][0]),max(p[2][0],p[3][0])); + + //outside all y boundaries (no intersect) + if( (y > ymaxtot) || (y < ymintot) ) return 0; + + //left of curve (no intersect) + if(x < xmin) return 0; + + //right of curve (and outside base range) + if( x > xmax ) + { + if( (y > ymax) || (y < ymin) ) return 0; + + //degenerate accept - to the right and inside the [ymin,ymax] range (already rejected if out of range) + const Real n = p[3][1] - p[0][1]; + + //extract the sign from the value (we need valid data) + return n < 0 ? -1 : 1; + } + + //degenerate horizontal line max -- doesn't happen enough to check for + if( ymintot == ymaxtot ) return 0; + + //calculate roots: + // can have 0,1,2, or 3 real roots + // if any of them are double then reject the two... + + // y-coefficients for f_y(t) - y = 0 + Real a = p[3][1] - 3*p[2][1] + 3*p[1][1] - p[0][1], + b = 3*p[2][1] - 6*p[1][1] + 3*p[0][1], + c = 3*p[1][1] - 3*p[0][1], + d = p[0][1] - y; + + Real ax = p[3][0] - 3*p[2][0] + 3*p[1][0] - p[0][0], + bx = 3*p[2][0] - 6*p[1][0] + 3*p[0][0], + cx = 3*p[1][0] - 3*p[0][0], + dx = p[0][0]; + + Real t1 = INVALIDROOT, t2 = INVALIDROOT, t3 = INVALIDROOT, t, dydt; + + if(a == 0) + { + //only 2nd degree + if(b == 0) + { + //linear + if(c == 0) return 0; + + t1 = - d / c; //equation devolved into: ct + d = 0 - solve... + }else + { + //0 roots = 0 intersections, 1 root = 2 intersections at the same place (0 effective) + if(quadratic_eqn(a,b,c,&t1,&t2) != 2) return 0; + } + }else + { + //cubic - sigh.... + + //algorithm courtesy of Numerical Recipes in C (algorithm copied from pg. 184/185) + Real an = b / a, + bn = c / a, + cn = d / a; + + //if cn is 0 (or really really close), then we can simplify this... + if(IsZero(cn)) + { + t3 = 0; + + //0 roots = 0 intersections, 1 root = 2 intersections at the same place (0 effective) + if(quadratic_eqn(a,b,c,&t1,&t2) != 2) + { + t1 = t2 = INVALIDROOT; + } + } + else + { + //otherwise run the normal cubic root equation + Real Q = (an*an - 3.0*bn) / 9.0; + Real R = ((2.0*an*an - 9.0*bn)*an + 27.0*cn)/54.0; + + if(R*R < Q*Q*Q) + { + Real theta = acos(R / sqrt(Q*Q*Q)); + + t1 = -2.0*sqrt(Q)*cos(theta/3) - an/3.0; + t2 = -2.0*sqrt(Q)*cos((theta+2*PI)/3.0) - an/3.0; + t3 = -2.0*sqrt(Q)*cos((theta-2*PI)/3.0) - an/3.0; + + //don't need to reorder,l just need to eliminate double/triple roots + //if(t3 == t2 && t1 == t2) t2 = t3 = INVALIDROOT; + if(t3 == t2) t2 = t3 = INVALIDROOT; + if(t1 == t2) t1 = t2 = INVALIDROOT; + if(t1 == t3) t1 = t3 = INVALIDROOT; + }else + { + Real signR = R < 0 ? -1 : 1; + Real A = - signR * pow(signR*R + sqrt(R*R - Q*Q*Q),1/3.0); + + Real B; + if(A == 0) B = 0; + else B = Q / A; + + //single real root in this case + t1 = (A + B) - an/3.0; + } + } + } + + //if(t1 != INVALIDROOT) + { + t = t1;//polish_cubicroot(a,b,c,d,t1,&dydt); + if(t >= 0 && t < 1) + { + //const Real invt = 1 - t; + + //find x val and it counts if it's to the left of the point + const Real xi = ((ax*t + bx)*t + cx)*t + dx; + dydt = (3*a*t + 2*b)*t + c; + + if(dydt) + { + intersects += (x >= xi) * ( dydt > 0 ? 1 : -1); + } + } + } + + //if(t2 != INVALIDROOT) + { + t = t2;//polish_cubicroot(a,b,c,d,t2,&dydt); + if(t >= 0 && t < 1) + { + //const Real invt = 1 - t; + + //find x val and it counts if it's to the left of the point + const Real xi = ((ax*t + bx)*t + cx)*t + dx; + dydt = (3*a*t + 2*b)*t + c; + + if(dydt) + { + intersects += (x >= xi) * ( dydt > 0 ? 1 : -1); + } + } + } + + //if(t3 != INVALIDROOT) + { + t = t3;//polish_cubicroot(a,b,c,d,t3,&dydt); + if(t >= 0 && t < 1) + { + //const Real invt = 1 - t; + + //find x val and it counts if it's to the left of the point + const Real xi = ((ax*t + bx)*t + cx)*t + dx; + dydt = (3*a*t + 2*b)*t + c; + + if(dydt) + { + intersects += (x >= xi) * ( dydt > 0 ? 1 : -1); + } + } + } + + return intersects; + } + + int intersect(Real x,Real y, Point *table) const + { + if((y < aabb.miny) || (y > aabb.maxy) || (x < aabb.minx)) return 0; + + int i, curdeg, intersects = 0; + const int numcurves = degrees.size(); + + vector::const_iterator p = pointlist.begin(); + + for(i=0; i < numcurves; i++) + { + curdeg = degrees[i]; + + switch(curdeg) + { + case 2: + { + table[0] = *p++; + table[1] = *p++; + table[2] = *p; //we want to include the last point for the next curve + + intersects += intersect_conic(x,y,table); + + break; + } + + case 3: + { + table[0] = *p++; + table[1] = *p++; + table[2] = *p++; + table[3] = *p; //we want to include the last point for the next curve + + intersects += intersect_cubic(x,y,table); + + break; + } + + default: + { + warning("Invalid degree (%d) inserted into the list (index: %d)\n", curdeg, i); + return 0; + } + } + } + + return intersects; + } +}; + +struct Layer_Shape::Intersector +{ + Rect aabb; + + //! true iff aabb hasn't been initialized yet + bool initaabb; + + int flags; + + enum IntersectorFlags + { + NotClosed = 0x8000 + }; + + enum PrimitiveType + { + TYPE_NONE = 0, + TYPE_LINE, + TYPE_CURVE + }; + + Real cur_x,cur_y; + Real close_x,close_y; + + vector segs; //monotonically increasing + vector curves; //big array of consecutive curves + + int prim; + Vector tangent; + + Intersector() + { + clear(); + } + + bool notclosed() + { + return (flags & NotClosed) || (cur_x != close_x) || (cur_y != close_y); + } + + void move_to(Real x, Real y) + { + close(); + + close_x = cur_x = x; + close_y = cur_y = y; + + tangent[0] = tangent[1] = 0; + + if(initaabb) + { + aabb.set_point(x,y); + initaabb = false; + }else aabb.expand(x,y); + + prim = TYPE_NONE; + } + + void line_to(Real x, Real y) + { + int dir = (y > cur_y)*1 + (-1)*(y < cur_y); + + //check for context (if not line start a new segment) + //if we're not in line mode (covers 0 set case), or if directions are different (not valid for 0 direction) + if(prim != TYPE_LINE || (dir && segs.back().ydir != dir)) + { + MonoSegment seg(dir,x,x,y,y); + + seg.aabb.expand(cur_x,cur_y); + seg.pointlist.push_back(Point(cur_x,cur_y)); + seg.pointlist.push_back(Point(x,y)); + segs.push_back(seg); + } + //add to the last segment, because it works + else + { + segs.back().pointlist.push_back(Point(x,y)); + segs.back().aabb.expand(x,y); + } + + + + cur_x = x; + cur_y = y; + aabb.expand(x,y); //expand the entire thing's bounding box + + tangent[0] = x - cur_x; + tangent[1] = x - cur_y; + + flags |= NotClosed; + prim = TYPE_LINE; + } + + void conic_to_smooth(Real x, Real y) + { + const Real x1 = tangent[0]/2.0 + cur_x; + const Real y1 = tangent[1]/2.0 + cur_y; + + conic_to(x1,y1,x,y); + } + + void conic_to(Real x1, Real y1, Real x, Real y) + { + //if we're not already a curve start one + if(prim != TYPE_CURVE) + { + CurveArray c; + + c.Start(Point(cur_x,cur_y)); + c.AddConic(Point(x1,y1),Point(x,y)); + + curves.push_back(c); + }else + { + curves.back().AddConic(Point(x1,y1),Point(x,y)); + } + + cur_x = x; + cur_y = y; + + aabb.expand(x1,y1); + aabb.expand(x,y); + + tangent[0] = 2*(x - x1); + tangent[1] = 2*(y - y1); + + flags |= NotClosed; + prim = TYPE_CURVE; + } + + void curve_to_smooth(Real x2, Real y2, Real x, Real y) + { + Real x1 = tangent[0]/3.0 + cur_x; + Real y1 = tangent[1]/3.0 + cur_y; + + curve_to(x1,y1,x2,y2,x,y); + } + + void curve_to(Real x1, Real y1, Real x2, Real y2, Real x, Real y) + { + //if we're not already a curve start one + if(prim != TYPE_CURVE) + { + CurveArray c; + + c.Start(Point(cur_x,cur_y)); + c.AddCubic(Point(x1,y1),Point(x2,y2),Point(x,y)); + + curves.push_back(c); + }else + { + curves.back().AddCubic(Point(x1,y1),Point(x2,y2),Point(x,y)); + } + + cur_x = x; + cur_y = y; + + //expand bounding box around ALL of it + aabb.expand(x1,y1); + aabb.expand(x2,y2); + aabb.expand(x,y); + + tangent[0] = 3*(x - x2); + tangent[1] = 3*(y - y2); + + flags |= NotClosed; + prim = TYPE_CURVE; + } + + void close() + { + if(flags & NotClosed) + { + if(cur_x != close_x || cur_y != close_y) + { + line_to(close_x,close_y); + } + + flags &= ~NotClosed; + } + } + + //assumes the line to count the intersections with is (-1,0) + int intersect (Real x, Real y) const + { + int inter = 0; + unsigned int i; + vector::const_iterator s = segs.begin(); + vector::const_iterator c = curves.begin(); + + Point memory[3*MAX_SUBDIVISION_SIZE + 1]; + + for(i = 0; i < segs.size(); i++,s++) + { + inter += s->intersect(x,y); + } + + for(i=0; i < curves.size(); i++,c++) + inter += c->intersect(x,y,memory); + + return inter; + } + + //intersect an arbitrary line + //int intersect (Real x, Real y, Real vx, Real vy) {return 0;} + + void clear() + { + segs.clear(); + curves.clear(); + + flags = 0; + cur_x = cur_y = close_x = close_y = 0; + prim = TYPE_NONE; + tangent[0] = tangent[1] = 0; + initaabb = true; + } +}; + +//*********** SCANLINE RENDERER SUPPORT STRUCTURES *************** +struct PenMark +{ + int y,x; + Real cover,area; + + PenMark(){} + PenMark(int xin, int yin, Real c, Real a) + :y(yin),x(xin),cover(c),area(a) {} + + void set(int xin, int yin, Real c, Real a) { y = yin; x = xin; cover = c; area = a; } + + void setcoord(int xin, int yin) { y = yin; x = xin; } + + void setcover(Real c, Real a) { cover = c; area = a; } + void addcover(Real c, Real a) { cover += c; area += a; } + + bool operator<(const PenMark &rhs) const + { + return y == rhs.y ? x < rhs.x : y < rhs.y; + } +}; + +typedef rect ContextRect; + +class Layer_Shape::PolySpan +{ +public: + typedef deque cover_array; + + Point arc[3*MAX_SUBDIVISION_SIZE + 1]; + + cover_array covers; + PenMark current; + + int open_index; + + //ending position of last primitive + Real cur_x; + Real cur_y; + + //starting position of current primitive list + Real close_x; + Real close_y; + + //flags for the current segment + int flags; + + //the window that will be drawn (used for clipping) + ContextRect window; + + //for assignment to flags value + enum PolySpanFlags + { + NotSorted = 0x8000, + NotClosed = 0x4000 + }; + + //default constructor - 0 everything + PolySpan() :current(0,0,0,0),flags(NotSorted) + { + cur_x = cur_y = close_x = close_y = 0; + open_index = 0; + } + + bool notclosed() const + { + return (flags & NotClosed) || (cur_x != close_x) || (cur_y != close_y); + } + + //0 out all the variables involved in processing + void clear() + { + covers.clear(); + cur_x = cur_y = close_x = close_y = 0; + open_index = 0; + current.set(0,0,0,0); + flags = NotSorted; + } + + //add the current cell, but only if there is information to add + void addcurrent() + { + if(current.cover || current.area) + { + covers.push_back(current); + } + } + + //move to the next cell (cover values 0 initially), keeping the current if necessary + void move_pen(int x, int y) + { + if(y != current.y || x != current.x) + { + addcurrent(); + current.set(x,y,0,0); + } + } + + //close the primitives with a line (or rendering will not work as expected) + void close() + { + if(flags & NotClosed) + { + if(cur_x != close_x || cur_y != close_y) + { + line_to(close_x,close_y); + addcurrent(); + current.setcover(0,0); + } + flags &= ~NotClosed; + } + } + + // Not recommended - destroys any separation of spans currently held + void merge_all() + { + sort(covers.begin(),covers.end()); + open_index = 0; + } + + //will sort the marks if they are not sorted + void sort_marks() + { + if(flags & NotSorted) + { + //only sort the open index + addcurrent(); + current.setcover(0,0); + + sort(covers.begin() + open_index,covers.end()); + flags &= ~NotSorted; + } + } + + //encapsulate the current sublist of marks (used for drawing) + void encapsulate_current() + { + //sort the current list then reposition the open list section + sort_marks(); + open_index = covers.size(); + } + + //move to start a new primitive list (enclose the last primitive if need be) + void move_to(Real x, Real y) + { + close(); + if(isnan(x))x=0; + if(isnan(y))y=0; + move_pen((int)floor(x),(int)floor(y)); + close_y = cur_y = y; + close_x = cur_x = x; + } + + //primitive_to functions + void line_to(Real x, Real y); + void conic_to(Real x1, Real y1, Real x, Real y); + void cubic_to(Real x1, Real y1, Real x2, Real y2, Real x, Real y); + + void draw_scanline(int y, Real x1, Real y1, Real x2, Real y2); + void draw_line(Real x1, Real y1, Real x2, Real y2); + + Real ExtractAlpha(Real area, WindingStyle winding_style) + { + if (area < 0) + area = -area; + + if (winding_style == WINDING_NON_ZERO) + { + // non-zero winding style + if (area > 1) + return 1; + } + else // if (winding_style == WINDING_EVEN_ODD) + { + // even-odd winding style + while (area > 1) + area -= 2; + + // want pyramid like thing + if (area < 0) + area = -area; + } + + return area; + } +}; + +/* === M E T H O D S ======================================================= */ + +Layer_Shape::Layer_Shape(const Real &a, const Color::BlendMethod m): + Layer_Composite (a,m), + edge_table (new Intersector), + color (Color::black()), + origin (0,0), + invert (false), + antialias (true), + blurtype (Blur::FASTGAUSSIAN), + feather (0), + winding_style (WINDING_NON_ZERO), + bytestream (0), + lastbyteop (Primitive::NONE), + lastoppos (-1) +{ +} + +Layer_Shape::~Layer_Shape() +{ + delete edge_table; +} + +void +Layer_Shape::clear() +{ + edge_table->clear(); + bytestream.clear(); +} + +bool +Layer_Shape::set_param(const String & param, const ValueBase &value) +{ + IMPORT_PLUS(color, { if (color.get_a() == 0) { if (converted_blend_) { + set_blend_method(Color::BLEND_ALPHA_OVER); + color.set_a(1); } else transparent_color_ = true; } }); + IMPORT(origin); + IMPORT(invert); + IMPORT(antialias); + IMPORT_PLUS(feather, if(feather<0)feather=0;); + IMPORT(blurtype); + IMPORT(winding_style); + + IMPORT_AS(origin,"offset"); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +Layer_Shape::get_param(const String ¶m)const +{ + EXPORT(color); + EXPORT(origin); + EXPORT(invert); + EXPORT(antialias); + EXPORT(feather); + EXPORT(blurtype); + EXPORT(winding_style); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +Layer_Shape::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("color") + .set_local_name(_("Color")) + .set_description(_("Layer_Shape Color")) + ); + ret.push_back(ParamDesc("origin") + .set_local_name(_("Origin")) + ); + ret.push_back(ParamDesc("invert") + .set_local_name(_("Invert")) + ); + ret.push_back(ParamDesc("antialias") + .set_local_name(_("Antialiasing")) + ); + ret.push_back(ParamDesc("feather") + .set_local_name(_("Feather")) + .set_is_distance() + ); + ret.push_back(ParamDesc("blurtype") + .set_local_name(_("Type of Feather")) + .set_description(_("Type of feathering to use")) + .set_hint("enum") + .add_enum_value(Blur::BOX,"box",_("Box Blur")) + .add_enum_value(Blur::FASTGAUSSIAN,"fastgaussian",_("Fast Gaussian Blur")) + .add_enum_value(Blur::CROSS,"cross",_("Cross-Hatch Blur")) + .add_enum_value(Blur::GAUSSIAN,"gaussian",_("Gaussian Blur")) + .add_enum_value(Blur::DISC,"disc",_("Disc Blur")) + ); + ret.push_back(ParamDesc("winding_style") + .set_local_name(_("Winding Style")) + .set_description(_("Winding style to use")) + .set_hint("enum") + .add_enum_value(WINDING_NON_ZERO,"nonzero",_("Non Zero")) + .add_enum_value(WINDING_EVEN_ODD,"evenodd",_("Even/Odd")) + ); + + return ret; +} + +synfig::Layer::Handle +Layer_Shape::hit_check(synfig::Context context, const synfig::Point &p)const +{ + Point pos(p-origin); + + int intercepts = edge_table->intersect(pos[0],pos[1]); + + // If we have an odd number of intercepts, we are inside. + // If we have an even number of intercepts, we are outside. + bool intersect = ((!!intercepts) ^ invert); + + if(get_amount() == 0 || get_blend_method() == Color::BLEND_ALPHA_OVER) + { + intersect = false; + } + + if(intersect) + { + synfig::Layer::Handle tmp; + if(get_blend_method()==Color::BLEND_BEHIND && (tmp=context.hit_check(p))) + return tmp; + if(Color::is_onto(get_blend_method())) + { + //if there's something in the lower layer then we're set... + if(!context.hit_check(p).empty()) + return const_cast(this); + }else if(get_blend_method() == Color::BLEND_ALPHA_OVER) + { + synfig::info("layer_shape::hit_check - we've got alphaover"); + //if there's something in the lower layer then we're set... + if(color.get_a() < 0.1 && get_amount() > .9) + { + synfig::info("layer_shape::hit_check - can see through us... so nothing"); + return Handle(); + }else return context.hit_check(p); + }else + return const_cast(this); + } + + return context.hit_check(p); +} + +Color +Layer_Shape::get_color(Context context, const Point &p)const +{ + Point pp = p; + + if(feather) + pp = Blur(feather,feather,blurtype)(p); + + Point pos(pp-origin); + + int intercepts = edge_table->intersect(pos[0],pos[1]); + + // If we have an odd number of intercepts, we are inside. + // If we have an even number of intercepts, we are outside. + bool intersect = ((!!intercepts) ^ invert); + + if(!intersect) + return Color::blend(Color::alpha(),context.get_color(pp),get_amount(),get_blend_method()); + + //Ok, we're inside... bummmm ba bum buM... + if(get_blend_method() == Color::BLEND_STRAIGHT && get_amount() == 1) + return color; + else + return Color::blend(color,context.get_color(p),get_amount(),get_blend_method()); +} + +//************** SCANLINE RENDERING ********************* +void Layer_Shape::PolySpan::line_to(Real x, Real y) +{ + Real n[4] = {0,0,0,0}; + bool afterx = false; + + const Real xin(x), yin(y); + + Real dx = x - cur_x; + Real dy = y - cur_y; + + //CLIP IT!!!! + try { + //outside y - ignore entirely + if( (cur_y >= window.maxy && y >= window.maxy) + ||(cur_y < window.miny && y < window.miny) ) + { + cur_x = x; + cur_y = y; + } + else //not degenerate - more complicated + { + if(dy > 0) //be sure it's not tooooo small + { + // cur_y ... window.miny ... window.maxy ... y + + //initial degenerate - initial clip + if(cur_y < window.miny) + { + //new clipped start point (must also move pen) + n[2] = cur_x + (window.miny - cur_y) * dx / dy; + + cur_x = n[2]; + cur_y = window.miny; + move_pen((int)floor(cur_x),window.miny); + } + + //generate data for the ending clipped info + if(y > window.maxy) + { + //initial line to intersection (and degenerate) + n[2] = x + (window.maxy - y) * dx / dy; + + //intersect coords + x = n[2]; + y = window.maxy; + } + } + else + { + //initial degenerate - initial clip + if(cur_y > window.maxy) + { + //new clipped start point (must also move pen) + n[2] = cur_x + (window.maxy - cur_y) * dx / dy; + + cur_x = n[2]; + cur_y = window.maxy; + move_pen((int)floor(cur_x),window.maxy); + } + + //generate data for the ending clipped info + if(y < window.miny) + { + //initial line to intersection (and degenerate) + n[2] = x + (window.miny - y) * dx / dy; + + //intersect coords + x = n[2]; + y = window.miny; + } + } + + //all degenerate - but require bounded clipped values + if( (cur_x >= window.maxx && x >= window.maxx) + ||(cur_x < window.minx && x < window.minx) ) + { + //clip both vertices - but only needed in the x direction + cur_x = max(cur_x, (Real)window.minx); + cur_x = min(cur_x, (Real)window.maxx); + + //clip the dest values - y is already clipped + x = max(x,(Real)window.minx); + x = min(x,(Real)window.maxx); + + //must start at new point... + move_pen((int)floor(cur_x),(int)floor(cur_y)); + + draw_line(cur_x,cur_y,x,y); + + cur_x = xin; + cur_y = yin; + } + else + { + //clip x + if(dx > 0) + { + //initial degenerate - initial clip + if(cur_x < window.minx) + { + //need to draw an initial segment from clippedx,cur_y to clippedx,intersecty + n[2] = cur_y + (window.minx - cur_x) * dy / dx; + + move_pen(window.minx,(int)floor(cur_y)); + draw_line(window.minx,cur_y,window.minx,n[2]); + + cur_x = window.minx; + cur_y = n[2]; + } + + //generate data for the ending clipped info + if(x > window.maxx) + { + //initial line to intersection (and degenerate) + n[2] = y + (window.maxx - x) * dy / dx; + + n[0] = window.maxx; + n[1] = y; + + //intersect coords + x = window.maxx; + y = n[2]; + afterx = true; + } + }else + { + //initial degenerate - initial clip + if(cur_x > window.maxx) + { + //need to draw an initial segment from clippedx,cur_y to clippedx,intersecty + n[2] = cur_y + (window.maxx - cur_x) * dy / dx; + + move_pen(window.maxx,(int)floor(cur_y)); + draw_line(window.maxx,cur_y,window.maxx,n[2]); + + cur_x = window.maxx; + cur_y = n[2]; + } + + //generate data for the ending clipped info + if(x < window.minx) + { + //initial line to intersection (and degenerate) + n[2] = y + (window.minx - x) * dy / dx; + + n[0] = window.minx; + n[1] = y; + + //intersect coords + x = window.minx; + y = n[2]; + afterx = true; + } + } + + move_pen((int)floor(cur_x),(int)floor(cur_y)); + //draw the relevant line (clipped) + draw_line(cur_x,cur_y,x,y); + + if(afterx) + { + draw_line(x,y,n[0],n[1]); + } + + cur_x = xin; + cur_y = yin; + } + } + } catch(...) { synfig::error("line_to: cur_x=%f, cur_y=%f, x=%f, y=%f", cur_x, cur_y, x, y); throw; } + + flags |= NotClosed|NotSorted; +} + +static inline bool clip_conic(const Point *const p, const ContextRect &r) +{ + const Real minx = min(min(p[0][0],p[1][0]),p[2][0]); + const Real miny = min(min(p[0][1],p[1][1]),p[2][1]); + const Real maxx = max(max(p[0][0],p[1][0]),p[2][0]); + const Real maxy = max(max(p[0][1],p[1][1]),p[2][1]); + + return (minx > r.maxx) || + (maxx < r.minx) || + (miny > r.maxy) || + (maxy < r.miny); +} + +static inline bool clip_cubic(const Point *const p, const ContextRect &r) +{ + /*const Real minx = min(min(p[0][0],p[1][0]),min(p[2][0],p[3][0])); + const Real miny = min(min(p[0][1],p[1][1]),min(p[2][1],p[3][1])); + const Real maxx = max(max(p[0][0],p[1][0]),max(p[2][0],p[3][1])); + const Real maxy = max(max(p[0][1],p[1][1]),max(p[2][1],p[3][1])); + + return (minx > r.maxx) || + (maxx < r.minx) || + (miny > r.maxy) || + (maxy < r.miny);*/ + + return ((p[0][0] > r.maxx) && (p[1][0] > r.maxx) && (p[2][0] > r.maxx) && (p[3][0] > r.maxx)) || + ((p[0][0] < r.minx) && (p[1][0] < r.minx) && (p[2][0] < r.minx) && (p[3][0] < r.minx)) || + ((p[0][1] > r.maxy) && (p[1][1] > r.maxy) && (p[2][1] > r.maxy) && (p[3][1] > r.maxy)) || + ((p[0][1] < r.miny) && (p[1][1] < r.miny) && (p[2][1] < r.miny) && (p[3][1] < r.miny)); +} + +static inline Real max_edges_cubic(const Point *const p) +{ + const Real x1 = p[1][0] - p[0][0]; + const Real y1 = p[1][1] - p[0][1]; + + const Real x2 = p[2][0] - p[1][0]; + const Real y2 = p[2][1] - p[1][1]; + + const Real x3 = p[3][0] - p[2][0]; + const Real y3 = p[3][1] - p[2][1]; + + const Real d1 = x1*x1 + y1*y1; + const Real d2 = x2*x2 + y2*y2; + const Real d3 = x3*x3 + y3*y3; + + return max(max(d1,d2),d3); +} + +static inline Real max_edges_conic(const Point *const p) +{ + const Real x1 = p[1][0] - p[0][0]; + const Real y1 = p[1][1] - p[0][1]; + + const Real x2 = p[2][0] - p[1][0]; + const Real y2 = p[2][1] - p[1][1]; + + const Real d1 = x1*x1 + y1*y1; + const Real d2 = x2*x2 + y2*y2; + + return max(d1,d2); +} + +void Layer_Shape::PolySpan::conic_to(Real x1, Real y1, Real x, Real y) +{ + Point *current = arc; + int level = 0; + int num = 0; + bool onsecond = false; + + arc[0] = Point(x,y); + arc[1] = Point(x1,y1); + arc[2] = Point(cur_x,cur_y); + + //just draw the line if it's outside + if(clip_conic(arc,window)) + { + line_to(x,y); + return; + } + + //Ok so it's not super degenerate, subdivide and draw (run through minimum subdivision levels first) + while(current >= arc) + { + if(num >= MAX_SUBDIVISION_SIZE) + { + warning("Curve subdivision somehow ran out of space while tessellating!"); + + //do something... + assert(0); + return; + }else + //if the curve is clipping then draw degenerate + if(clip_conic(current,window)) + { + line_to(current[0][0],current[0][1]); //backwards so front is destination + current -= 2; + if(onsecond) level--; + onsecond = true; + num--; + continue; + }else + //if we are not at the level minimum + if(level < MIN_SUBDIVISION_DRAW_LEVELS) + { + Subd_Conic_Stack(current); + current += 2; //cursor on second curve + level ++; + num ++; + onsecond = false; + continue; + }else + //split it again, if it's too big + if(max_edges_conic(current) > 0.25) //distance of .5 (cover no more than half the pixel) + { + Subd_Conic_Stack(current); + current += 2; //cursor on second curve + level ++; + num ++; + onsecond = false; + } + else //NOT TOO BIG? RENDER!!! + { + //cur_x,cur_y = current[2], so we need to go 1,0 + line_to(current[1][0],current[1][1]); + line_to(current[0][0],current[0][1]); + + current -= 2; + if(onsecond) level--; + num--; + onsecond = true; + } + } +} + +void Layer_Shape::PolySpan::cubic_to(Real x1, Real y1, Real x2, Real y2, Real x, Real y) +{ + Point *current = arc; + int num = 0; + int level = 0; + bool onsecond = false; + + arc[0] = Point(x,y); + arc[1] = Point(x2,y2); + arc[2] = Point(x1,y1); + arc[3] = Point(cur_x,cur_y); + + //just draw the line if it's outside + if(clip_cubic(arc,window)) + { + line_to(x,y); + return; + } + + //Ok so it's not super degenerate, subdivide and draw (run through minimum subdivision levels first) + while(current >= arc) //once current goes below arc, there are no more curves left + { + if(num >= MAX_SUBDIVISION_SIZE) + { + warning("Curve subdivision somehow ran out of space while tessellating!"); + + //do something... + assert(0); + return; + }else + + //if we are not at the level minimum + if(level < MIN_SUBDIVISION_DRAW_LEVELS) + { + Subd_Cubic_Stack(current); + current += 3; //cursor on second curve + level ++; + num ++; + onsecond = false; + continue; + }else + //if the curve is clipping then draw degenerate + if(clip_cubic(current,window)) + { + line_to(current[0][0],current[0][1]); //backwards so front is destination + current -= 3; + if(onsecond) level--; + onsecond = true; + num --; + continue; + } + else + //split it again, if it's too big + if(max_edges_cubic(current) > 0.25) //could use max_edges<3> + { + Subd_Cubic_Stack(current); + current += 3; //cursor on second curve + level ++; + num ++; + onsecond = false; + } + else //NOT TOO BIG? RENDER!!! + { + //cur_x,cur_y = current[3], so we need to go 2,1,0 + line_to(current[2][0],current[2][1]); + line_to(current[1][0],current[1][1]); + line_to(current[0][0],current[0][1]); + + current -= 3; + if(onsecond) level--; + num --; + onsecond = true; + } + } +} + +//******************** LINE ALGORITHMS **************************** +// THESE CALCULATE THE AREA AND THE COVER FOR THE MARKS, TO THEN SCAN CONVERT +// - BROKEN UP INTO SCANLINES (draw_line - y intersections), +// THEN THE COVER AND AREA PER TOUCHED PIXEL IS CALCULATED (draw_scanline - x intersections) +void Layer_Shape::PolySpan::draw_scanline(int y, Real x1, Real fy1, Real x2, Real fy2) +{ + int ix1 = (int)floor(x1); + int ix2 = (int)floor(x2); + Real fx1 = x1 - ix1; + Real fx2 = x2 - ix2; + + Real dx,dy,dydx,mult; + + dx = x2 - x1; + dy = fy2 - fy1; + + //case horizontal line + if(fy1 == fy2) + { + move_pen(ix2,y); //pen needs to be at the last coord + return; + } + + //case all in same pixel + if(ix1 == ix2) //impossible for degenerate case (covered by the previous cases) + { + current.addcover(dy,(fx1 + fx2)*dy/2); //horizontal trapezoid area + return; + } + + if(dx > 0) + { + // ----> fx1...1 0...1 ... 0...1 0...fx2 + dydx = dy / dx; + + //set initial values + //Iterate through the covered pixels + mult = (1 - fx1)*dydx; //next y intersection diff value (at 1) + + //first pixel + current.addcover(mult,(1 + fx1)*mult/2); // fx1,fy1,1,fy@1 - starting trapezoidal area + + //move to the next pixel + fy1 += mult; + ix1++; + + move_pen(ix1,y); + + //set up for whole ones + while(ix1 != ix2) + { + //trapezoid(0,y1,1,y1+dydx); + current.addcover(dydx,dydx/2); //accumulated area 1/2 the cover + + //move to next pixel (+1) + ix1++; + fy1 += dydx; + move_pen(ix1,y); + } + + //last pixel + //final y-pos - last intersect pos + mult = fx2 * dydx; + current.addcover(mult,(0+fx2)*mult/2); + }else + { + // fx2...1 0...1 ... 0...1 0...fx1 <---- + //mult = (0 - fx1) * dy / dx; + //neg sign sucked into dydx + dydx = -dy / dx; + + //set initial values + //Iterate through the covered pixels + mult = fx1*dydx; //next y intersection diff value + + //first pixel + current.addcover(mult,fx1*mult/2); // fx1,fy1,0,fy@0 - starting trapezoidal area + + //move to next pixel + fy1 += mult; + ix1--; + + move_pen(ix1,y); + + //set up for whole ones + while(ix1 != ix2) + { + //trapezoid(0,y1,1,y1+dydx); + current.addcover(dydx,dydx/2); //accumulated area 1/2 the cover + + //move to next pixel (-1) + fy1 += dydx; + ix1--; + move_pen(ix1,y); + } + + //last pixel + mult = fy2 - fy1; //final y-pos - last intersect pos + + current.addcover(mult,(fx2+1)*mult/2); + } +} + +void Layer_Shape::PolySpan::draw_line(Real x1, Real y1, Real x2, Real y2) +{ + int iy1 = (int)floor(y1); + int iy2 = (int)floor(y2); + Real fy1 = y1 - iy1; + Real fy2 = y2 - iy2; + + assert(!isnan(fy1)); + assert(!isnan(fy2)); + + Real dx,dy,dxdy,mult,x_from,x_to; + + const Real SLOPE_EPSILON = 1e-10; + + //case all one scanline + if(iy1 == iy2) + { + draw_scanline(iy1,x1,y1,x2,y2); + return; + } + + //difference values + dy = y2 - y1; + dx = x2 - x1; + + //case vertical line + if(dx < SLOPE_EPSILON && dx > -SLOPE_EPSILON) + { + //calc area and cover on vertical line + if(dy > 0) + { + // ----> fx1...1 0...1 ... 0...1 0...fx2 + Real sub; + + int ix1 = (int)floor(x1); + Real fx1 = x1 - ix1; + + //current pixel + sub = 1 - fy1; + + current.addcover(sub,fx1*sub); + + //next pixel + iy1++; + + //move pen to next pixel + move_pen(ix1,iy1); + + while(iy1 != iy2) + { + //accumulate cover + current.addcover(1,fx1); + + //next pixel + iy1++; + move_pen(ix1,iy1); + } + + //last pixel + current.addcover(fy2,fy2*fx1); + }else + { + Real sub; + + int ix1 = (int)floor(x1); + Real fx1 = x1 - ix1; + + //current pixel + sub = 0 - fy1; + + current.addcover(sub,fx1*sub); + + //next pixel + iy1--; + + move_pen(ix1,iy1); + + while(iy1 != iy2) + { + //accumulate in current pixel + current.addcover(-1,-fx1); + + //move to next + iy1--; + move_pen(ix1,iy1); + } + + current.addcover(fy2-1,(fy2-1)*fx1); + } + return; + } + + //case normal line - guaranteed dx != 0 && dy != 0 + + //calculate the initial intersection with "next" scanline + if(dy > 0) + { + dxdy = dx / dy; + + mult = (1 - fy1) * dxdy; + + //x intersect scanline + x_from = x1 + mult; + draw_scanline(iy1,x1,fy1,x_from,1); + + //move to next line + iy1++; + + move_pen((int)floor(x_from),iy1); + + while(iy1 != iy2) + { + //keep up on the x axis, and render the current scanline + x_to = x_from + dxdy; + draw_scanline(iy1,x_from,0,x_to,1); + x_from = x_to; + + //move to next pixel + iy1++; + move_pen((int)floor(x_from),iy1); + } + + //draw the last one, fractional + draw_scanline(iy2,x_from,0,x2,fy2); + + }else + { + dxdy = -dx / dy; + + mult = fy1 * dxdy; + + //x intersect scanline + x_from = x1 + mult; + draw_scanline(iy1,x1,fy1,x_from,0); + + //each line after + iy1--; + + move_pen((int)floor(x_from),iy1); + + while(iy1 != iy2) + { + x_to = x_from + dxdy; + draw_scanline(iy1,x_from,1,x_to,0); + x_from = x_to; + + iy1--; + move_pen((int)floor(x_from),iy1); + } + //draw the last one, fractional + draw_scanline(iy2,x_from,1,x2,fy2); + } +} + +//****** LAYER PEN OPERATIONS (move_to, line_to, etc.) ****** +void Layer_Shape::move_to(Real x, Real y) +{ + //const int sizeblock = sizeof(Primitive)+sizeof(Point); + Primitive op; + Point p(x,y); + + op.operation = Primitive::MOVE_TO; + op.number = 1; //one point for now + + if(lastbyteop == Primitive::MOVE_TO) + { + char *ptr = &bytestream[lastoppos]; + memcpy(ptr,&op,sizeof(op)); + memcpy(ptr+sizeof(op),&p,sizeof(p)); + } + else //make a new op + { + lastbyteop = Primitive::MOVE_TO; + lastoppos = bytestream.size(); + + bytestream.insert(bytestream.end(),(char*)&op,(char*)(&op+1)); //insert the bytes for the header + bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); //insert the bytes for data + } + + edge_table->move_to(x,y); +} + +void Layer_Shape::close() +{ + Primitive op; + + op.operation = Primitive::CLOSE; + op.number = 0; + + if(lastbyteop == Primitive::CLOSE) + { + }else + { + lastbyteop = Primitive::CLOSE; + lastoppos = bytestream.size(); + + bytestream.insert(bytestream.end(),(char*)&op,(char*)(&op+1)); //insert header + } + + edge_table->close(); + //should not affect the bounding box since it would just be returning to old point... +} + +void Layer_Shape::endpath() +{ + Primitive op; + + op.operation = Primitive::END; + op.number = 0; + + if(lastbyteop == Primitive::END || lastbyteop == Primitive::NONE) + { + }else + { + bytestream.insert(bytestream.end(),(char*)&op,(char*)(&op+1)); + } + //should not affect the bounding box since it would just be returning to old point... if at all +} + +void Layer_Shape::line_to(Real x, Real y) +{ + assert(!isnan(x)); + assert(!isnan(y)); + + //const int sizeblock = sizeof(Primitive)+sizeof(Point); + Primitive op; + Point p(x,y); + + op.operation = Primitive::LINE_TO; + op.number = 1; //one point for now + + if(lastbyteop == Primitive::MOVE_TO || lastbyteop == Primitive::LINE_TO) + { + //only need to insert the point + bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); + + Primitive * prim = (Primitive *)&bytestream[lastoppos]; + prim->number++; //increment number of points in the list + }else + { + lastbyteop = Primitive::LINE_TO; + lastoppos = bytestream.size(); + + bytestream.insert(bytestream.end(),(char*)&op,(char*)(&op+1)); //insert the bytes for the header + bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); //insert the bytes for data + } + + edge_table->line_to(x,y); +} + +void Layer_Shape::conic_to(Real x1, Real y1, Real x, Real y) +{ + //const int sizeblock = sizeof(Primitive)+sizeof(Point)*2; + Primitive op; + Point p(x,y); + Point p1(x1,y1); + + op.operation = Primitive::CONIC_TO; + op.number = 2; //2 points for now + + if(lastbyteop == Primitive::CONIC_TO) + { + //only need to insert the new points + bytestream.insert(bytestream.end(),(char*)&p1,(char*)(&p1+1)); + bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); + + Primitive * prim = (Primitive *)&bytestream[lastoppos]; + prim->number += 2; //increment number of points in the list + }else + { + lastbyteop = Primitive::CONIC_TO; + lastoppos = bytestream.size(); + + bytestream.insert(bytestream.end(),(char*)&op,(char*)(&op+1)); //insert the bytes for the header + bytestream.insert(bytestream.end(),(char*)&p1,(char*)(&p1+1)); //insert the bytes for data + bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); //insert the bytes for data + } + + edge_table->conic_to(x1,y1,x,y); +} + +void Layer_Shape::conic_to_smooth(Real x, Real y) //x1,y1 derived from current tangent +{ + //const int sizeblock = sizeof(Primitive)+sizeof(Point); + Primitive op; + Point p(x,y); + + op.operation = Primitive::CONIC_TO_SMOOTH; + op.number = 1; //2 points for now + + if(lastbyteop == Primitive::CONIC_TO_SMOOTH) + { + //only need to insert the new point + bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); + + Primitive * prim = (Primitive *)&bytestream[lastoppos]; + prim->number += 1; //increment number of points in the list + }else + { + lastbyteop = Primitive::CONIC_TO_SMOOTH; + lastoppos = bytestream.size(); + + bytestream.insert(bytestream.end(),(char*)&op,(char*)(&op+1)); //insert the bytes for the header + bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); //insert the bytes for data + } + + edge_table->conic_to_smooth(x,y); +} + +void Layer_Shape::curve_to(Real x1, Real y1, Real x2, Real y2, Real x, Real y) +{ + //const int sizeblock = sizeof(Primitive)+sizeof(Point)*3; + Primitive op; + Point p(x,y); + Point p1(x1,y1); + Point p2(x2,y2); + + op.operation = Primitive::CUBIC_TO; + op.number = 3; //3 points for now + + if(lastbyteop == Primitive::CUBIC_TO) + { + //only need to insert the new points + bytestream.insert(bytestream.end(),(char*)&p1,(char*)(&p1+1)); + bytestream.insert(bytestream.end(),(char*)&p2,(char*)(&p2+1)); + bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); + + Primitive * prim = (Primitive *)&bytestream[lastoppos]; + prim->number += 3; //increment number of points in the list + }else + { + lastbyteop = Primitive::CUBIC_TO; + lastoppos = bytestream.size(); + + bytestream.insert(bytestream.end(),(char*)&op,(char*)(&op+1)); //insert the bytes for the header + bytestream.insert(bytestream.end(),(char*)&p1,(char*)(&p1+1)); //insert the bytes for data + bytestream.insert(bytestream.end(),(char*)&p2,(char*)(&p2+1)); //insert the bytes for data + bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); //insert the bytes for data + } + + edge_table->curve_to(x1,y1,x2,y2,x,y); +} + +void Layer_Shape::curve_to_smooth(Real x2, Real y2, Real x, Real y) //x1,y1 derived from current tangent +{ + //const int sizeblock = sizeof(Primitive)+sizeof(Point)*3; + Primitive op; + Point p(x,y); + Point p2(x2,y2); + + op.operation = Primitive::CUBIC_TO_SMOOTH; + op.number = 2; //3 points for now + + if(lastbyteop == Primitive::CUBIC_TO_SMOOTH) + { + //only need to insert the new points + bytestream.insert(bytestream.end(),(char*)&p2,(char*)(&p2+1)); + bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); + + Primitive * prim = (Primitive *)&bytestream[lastoppos]; + prim->number += 2; //increment number of points in the list + }else + { + lastbyteop = Primitive::CUBIC_TO_SMOOTH; + lastoppos = bytestream.size(); + + bytestream.insert(bytestream.end(),(char*)&op,(char*)(&op+1)); //insert the bytes for the header + bytestream.insert(bytestream.end(),(char*)&p2,(char*)(&p2+1)); //insert the bytes for data + bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); //insert the bytes for data + } +} + +// ACCELERATED RENDER FUNCTION - TRANSLATE BYTE CODE INTO FUNCTION CALLS + +bool Layer_Shape::render_polyspan(Surface *surface, PolySpan &polyspan, + Color::BlendMethod got_blend_method, Color::value_type got_amount) const +{ + Surface::alpha_pen p(surface->begin(),got_amount,_BlendFunc(got_blend_method)); + PolySpan::cover_array::iterator cur_mark = polyspan.covers.begin(); + PolySpan::cover_array::iterator end_mark = polyspan.covers.end(); + + Real cover,area,alpha; + + int y,x; + + p.set_value(color); + cover = 0; + + if(cur_mark == end_mark) + { + //no marks at all + if(invert) + { + p.move_to(polyspan.window.minx,polyspan.window.miny); + p.put_block(polyspan.window.maxy - polyspan.window.miny,polyspan.window.maxx - polyspan.window.minx); + } + return true; + } + + //fill initial rect / line + if(invert) + { + //fill all the area above the first vertex + p.move_to(polyspan.window.minx,polyspan.window.miny); + y = polyspan.window.miny; + int l = polyspan.window.maxx - polyspan.window.minx; + + p.put_block(cur_mark->y - polyspan.window.miny,l); + + //fill the area to the left of the first vertex on that line + l = cur_mark->x - polyspan.window.minx; + p.move_to(polyspan.window.minx,cur_mark->y); + if(l) p.put_hline(l); + } + + for(;;) + { + y = cur_mark->y; + x = cur_mark->x; + + p.move_to(x,y); + + area = cur_mark->area; + cover += cur_mark->cover; + + //accumulate for the current pixel + while(++cur_mark != polyspan.covers.end()) + { + if(y != cur_mark->y || x != cur_mark->x) + break; + + area += cur_mark->area; + cover += cur_mark->cover; + } + + //draw pixel - based on covered area + if(area) //if we're ok, draw the current pixel + { + alpha = polyspan.ExtractAlpha(cover - area, winding_style); + if(invert) alpha = 1 - alpha; + + if(!antialias) + { + if(alpha >= .5) p.put_value(); + } + else if(alpha) p.put_value_alpha(alpha); + + p.inc_x(); + x++; + } + + //if we're done, don't use iterator and exit + if(cur_mark == end_mark) break; + + //if there is no more live pixels on this line, goto next + if(y != cur_mark->y) + { + if(invert) + { + //fill the area at the end of the line + p.put_hline(polyspan.window.maxx - x); + + //fill area at the beginning of the next line + p.move_to(polyspan.window.minx,cur_mark->y); + p.put_hline(cur_mark->x - polyspan.window.minx); + } + + cover = 0; + + continue; + } + + //draw span to next pixel - based on total amount of pixel cover + if(x < cur_mark->x) + { + alpha = polyspan.ExtractAlpha(cover, winding_style); + if(invert) alpha = 1 - alpha; + + if(!antialias) + { + if(alpha >= .5) p.put_hline(cur_mark->x - x); + } + else if(alpha) p.put_hline(cur_mark->x - x,alpha); + } + } + + //fill the after stuff + if(invert) + { + //fill the area at the end of the line + p.put_hline(polyspan.window.maxx - x); + + //fill area at the beginning of the next line + p.move_to(polyspan.window.minx,y+1); + p.put_block(polyspan.window.maxy - y - 1,polyspan.window.maxx - polyspan.window.minx); + } + + return true; +} + +bool Layer_Shape::render_polyspan(etl::surface *surface, PolySpan &polyspan) const +{ + etl::surface::pen p(surface->begin()); + PolySpan::cover_array::iterator cur_mark = polyspan.covers.begin(); + PolySpan::cover_array::iterator end_mark = polyspan.covers.end(); + + Real cover,area,alpha; + + int y,x; + + cover = 0; + + //the pen always writes 1 (unless told to do otherwise) + p.set_value(1); + + if(cur_mark == end_mark) + { + //no marks at all + if(invert) + { + p.move_to(polyspan.window.minx,polyspan.window.miny); + p.put_block(polyspan.window.maxy - polyspan.window.miny,polyspan.window.maxx - polyspan.window.minx); + } + return true; + } + + //fill initial rect / line + if(invert) + { + //fill all the area above the first vertex + p.move_to(polyspan.window.minx,polyspan.window.miny); + y = polyspan.window.miny; + int l = polyspan.window.maxx - polyspan.window.minx; + + p.put_block(cur_mark->y - polyspan.window.miny,l); + + //fill the area to the left of the first vertex on that line + l = cur_mark->x - polyspan.window.minx; + p.move_to(polyspan.window.minx,cur_mark->y); + if(l) p.put_hline(l); + + for(;;) + { + y = cur_mark->y; + x = cur_mark->x; + + p.move_to(x,y); + + area = cur_mark->area; + cover += cur_mark->cover; + + //accumulate for the current pixel + while(++cur_mark != polyspan.covers.end()) + { + if(y != cur_mark->y || x != cur_mark->x) + break; + + area += cur_mark->area; + cover += cur_mark->cover; + } + + //draw pixel - based on covered area + if(area) //if we're ok, draw the current pixel + { + alpha = 1 - polyspan.ExtractAlpha(cover - area, winding_style); + if(!antialias) + { + if(alpha >= .5) p.put_value(); + } + else if(alpha) p.put_value(alpha); + + p.inc_x(); + x++; + } + + //if we're done, don't use iterator and exit + if(cur_mark == end_mark) break; + + //if there is no more live pixels on this line, goto next + if(y != cur_mark->y) + { + //fill the area at the end of the line + p.put_hline(polyspan.window.maxx - x); + + //fill area at the beginning of the next line + p.move_to(polyspan.window.minx,cur_mark->y); + p.put_hline(cur_mark->x - polyspan.window.minx); + + cover = 0; + + continue; + } + + //draw span to next pixel - based on total amount of pixel cover + if(x < cur_mark->x) + { + alpha = 1 - polyspan.ExtractAlpha(cover, winding_style); + if(!antialias) + { + if(alpha >= .5) p.put_hline(cur_mark->x - x); + } + else if(alpha) p.put_hline(cur_mark->x - x,alpha); + } + } + + //fill the area at the end of the line + p.put_hline(polyspan.window.maxx - x); + + //fill area at the beginning of the next line + p.move_to(polyspan.window.minx,y+1); + p.put_block(polyspan.window.maxy - y - 1,polyspan.window.maxx - polyspan.window.minx); + }else + { + for(;;) + { + y = cur_mark->y; + x = cur_mark->x; + + p.move_to(x,y); + + area = cur_mark->area; + cover += cur_mark->cover; + + //accumulate for the current pixel + while(++cur_mark != polyspan.covers.end()) + { + if(y != cur_mark->y || x != cur_mark->x) + break; + + area += cur_mark->area; + cover += cur_mark->cover; + } + + //draw pixel - based on covered area + if(area) //if we're ok, draw the current pixel + { + alpha = polyspan.ExtractAlpha(cover - area, winding_style); + if(!antialias) + { + if(alpha >= .5) p.put_value(); + } + else if(alpha) p.put_value(alpha); + + p.inc_x(); + x++; + } + + //if we're done, don't use iterator and exit + if(cur_mark == end_mark) break; + + //if there is no more live pixels on this line, goto next + if(y != cur_mark->y) + { + cover = 0; + + continue; + } + + //draw span to next pixel - based on total amount of pixel cover + if(x < cur_mark->x) + { + alpha = polyspan.ExtractAlpha(cover, winding_style); + if(!antialias) + { + if(alpha >= .5) p.put_hline(cur_mark->x - x); + } + else if(alpha) p.put_hline(cur_mark->x - x,alpha); + } + } + } + + return true; +} + +bool +Layer_Shape::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + const unsigned int w = renddesc.get_w(); + const unsigned int h = renddesc.get_h(); + + const Real pw = abs(renddesc.get_pw()); + const Real ph = abs(renddesc.get_ph()); + + //const Real OFFSET_EPSILON = 1e-8; + SuperCallback stageone(cb,1,10000,15001+renddesc.get_h()); + SuperCallback stagetwo(cb,10000,10001+renddesc.get_h(),15001+renddesc.get_h()); + SuperCallback stagethree(cb,10001+renddesc.get_h(),15001+renddesc.get_h(),15001+renddesc.get_h()); + + // Render what is behind us + + //clip if it satisfies the invert solid thing + if(is_solid_color() && invert) + { + Rect aabb = edge_table->aabb; + Point tl = renddesc.get_tl() - origin; + + Real pw = renddesc.get_pw(), + ph = renddesc.get_ph(); + + Rect nrect; + + Real pixelfeatherx = quality == 10 ? 0 : abs(feather/pw), + pixelfeathery = quality == 10 ? 0 : abs(feather/ph); + + nrect.set_point((aabb.minx - tl[0])/pw,(aabb.miny - tl[1])/ph); + nrect.expand((aabb.maxx - tl[0])/pw,(aabb.maxy - tl[1])/ph); + + RendDesc optdesc(renddesc); + + //make sure to expand so we gain subpixels rather than lose them + nrect.minx = floor(nrect.minx-pixelfeatherx); nrect.miny = floor(nrect.miny-pixelfeathery); + nrect.maxx = ceil(nrect.maxx+pixelfeatherx); nrect.maxy = ceil(nrect.maxy+pixelfeathery); + + //make sure the subwindow is clipped with our tile window (minimize useless drawing) + set_intersect(nrect,nrect,Rect(0,0,renddesc.get_w(),renddesc.get_h())); + + //must resize the surface first + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + surface->clear(); + + //only render anything if it's visible from our current tile + if(nrect.valid()) + { + //set the subwindow to the viewable pixels and render it to the subsurface + optdesc.set_subwindow((int)nrect.minx, (int)nrect.miny, + (int)(nrect.maxx - nrect.minx), (int)(nrect.maxy - nrect.miny)); + + Surface optimizedbacksurf; + if(!context.accelerated_render(&optimizedbacksurf,quality,optdesc,&stageone)) + return false; + + //blit that onto the original surface so we can pretend that nothing ever happened + Surface::pen p = surface->get_pen((int)nrect.minx,(int)nrect.miny); + optimizedbacksurf.blit_to(p); + } + }else + { + if(!context.accelerated_render(surface,quality,renddesc,&stageone)) + return false; + } + + if(cb && !cb->amount_complete(10000,10001+renddesc.get_h())) return false; + + if(feather && quality != 10) + { + //we have to blur rather than be crappy + + //so make a separate surface + RendDesc workdesc(renddesc); + + etl::surface shapesurface; + + //the expanded size = 1/2 the size in each direction rounded up + int halfsizex = (int) (abs(feather*.5/pw) + 3), + halfsizey = (int) (abs(feather*.5/ph) + 3); + + //expand by 1/2 size in each direction on either side + switch(blurtype) + { + case Blur::DISC: + case Blur::BOX: + case Blur::CROSS: + { + workdesc.set_subwindow(-max(1,halfsizex),-max(1,halfsizey),w+2*max(1,halfsizex),h+2*max(1,halfsizey)); + break; + } + case Blur::FASTGAUSSIAN: + { + if(quality < 4) + { + halfsizex*=2; + halfsizey*=2; + } + workdesc.set_subwindow(-max(1,halfsizex),-max(1,halfsizey),w+2*max(1,halfsizex),h+2*max(1,halfsizey)); + break; + } + case Blur::GAUSSIAN: + { + #define GAUSSIAN_ADJUSTMENT (0.05) + Real pw = (Real)workdesc.get_w()/(workdesc.get_br()[0]-workdesc.get_tl()[0]); + Real ph = (Real)workdesc.get_h()/(workdesc.get_br()[1]-workdesc.get_tl()[1]); + + pw=pw*pw; + ph=ph*ph; + + halfsizex = (int)(abs(pw)*feather*GAUSSIAN_ADJUSTMENT+0.5); + halfsizey = (int)(abs(ph)*feather*GAUSSIAN_ADJUSTMENT+0.5); + + halfsizex = (halfsizex + 1)/2; + halfsizey = (halfsizey + 1)/2; + workdesc.set_subwindow( -halfsizex, -halfsizey, w+2*halfsizex, h+2*halfsizey ); + + break; + } + } + + shapesurface.set_wh(workdesc.get_w(),workdesc.get_h()); + shapesurface.clear(); + + //render the shape + if(!render_shape(&shapesurface,quality,workdesc,&stagetwo))return false; + + //blur the image + Blur(feather,feather,blurtype,&stagethree)(shapesurface,workdesc.get_br()-workdesc.get_tl(),shapesurface); + + //blend with stuff below it... + unsigned int u = halfsizex, v = halfsizey, x = 0, y = 0; + for(y = 0; y < h; y++,v++) + { + u = halfsizex; + for(x = 0; x < w; x++,u++) + { + float a = shapesurface[v][u]; + if(a) + { + //a = floor(a*255+0.5f)/255; + (*surface)[y][x]=Color::blend(color,(*surface)[y][x],a*get_amount(),get_blend_method()); + } + //else (*surface)[y][x] = worksurface[v][u]; + } + } + + //we are done + if(cb && !cb->amount_complete(100,100)) + { + synfig::warning("Layer_Shape: could not set amount complete"); + return false; + } + + return true; + }else + { + //might take out to reduce code size + return render_shape(surface,true,quality,renddesc,&stagetwo); + } + +} + +bool +Layer_Shape::render_shape(Surface *surface,bool useblend,int /*quality*/, + const RendDesc &renddesc, ProgressCallback *cb)const +{ + int tmp(0); + + SuperCallback progress(cb,0,renddesc.get_h(),renddesc.get_h()); + + // If our amount is set to zero, no need to render anything + if(!get_amount()) + return true; + + //test new polygon renderer + // Build edge table + // Width and Height of a pixel + const int w = renddesc.get_w(); + const int h = renddesc.get_h(); + const Real pw = renddesc.get_w()/(renddesc.get_br()[0]-renddesc.get_tl()[0]); + const Real ph = renddesc.get_h()/(renddesc.get_br()[1]-renddesc.get_tl()[1]); + + const Point tl = renddesc.get_tl(); + + Vector tangent (0,0); + + PolySpan span; + + // if the pixels are zero sized then we're too zoomed out to see anything + if (pw == 0 || ph == 0) + return true; + + //optimization for tessellating only inside tiles + span.window.minx = 0; + span.window.miny = 0; + span.window.maxx = w; + span.window.maxy = h; + + //pointers for processing the bytestream + const char *current = &bytestream[0]; + const char *end = &bytestream[bytestream.size()]; + + int operation = Primitive::NONE; + int number = 0; + int curnum; + + Primitive *curprim; + Point *data; + + Real x,y,x1,y1,x2,y2; + + + while(current < end) + { + tmp++; + + try { + + //get the op code safely + curprim = (Primitive *)current; + + //advance past indices + current += sizeof(Primitive); + if(current > end) + { + warning("Layer_Shape::accelerated_render - Error in the byte stream, not enough space for next declaration"); + return false; + } + + //get the relevant data + operation = curprim->operation; + number = curprim->number; + + if(operation == Primitive::END) + break; + + if(operation == Primitive::CLOSE) + { + if(span.notclosed()) + { + tangent[0] = span.close_x - span.cur_x; + tangent[1] = span.close_y - span.cur_y; + span.close(); + } + continue; + } + + data = (Point*)current; + current += sizeof(Point)*number; + + //check data positioning + if(current > end) + { + warning("Layer_Shape::accelerated_render - Error in the byte stream, in sufficient data space for declared number of points"); + return false; + } + + } catch(...) { synfig::error("Layer_Shape::render_shape()1: Caught an exception after %d loops, rethrowing...", tmp); throw; } + + //transfer all the data - RLE optimized + for(curnum=0; curnum < number;) + { + switch(operation) + { + case Primitive::MOVE_TO: + { + x = data[curnum][0]; + x = (x - tl[0] + origin[0])*pw; + y = data[curnum][1]; + y = (y - tl[1] + origin[1])*ph; + + if(curnum == 0) + { + span.move_to(x,y); + + tangent[0] = 0; + tangent[1] = 0; + } + else + { + tangent[0] = x - span.cur_x; + tangent[1] = y - span.cur_y; + + span.line_to(x,y); + } + + curnum++; //only advance one point + + break; + } + + case Primitive::LINE_TO: + { + x = data[curnum][0]; + x = (x - tl[0] + origin[0])*pw; + y = data[curnum][1]; + y = (y - tl[1] + origin[1])*ph; + + tangent[0] = x - span.cur_x; + tangent[1] = y - span.cur_y; + + span.line_to(x,y); + curnum++; + break; + } + + case Primitive::CONIC_TO: + { + x = data[curnum+1][0]; + x = (x - tl[0] + origin[0])*pw; + y = data[curnum+1][1]; + y = (y - tl[1] + origin[1])*ph; + + x1 = data[curnum][0]; + x1 = (x1 - tl[0] + origin[0])*pw; + y1 = data[curnum][1]; + y1 = (y1 - tl[1] + origin[1])*ph; + + tangent[0] = 2*(x - x1); + tangent[1] = 2*(y - y1); + + span.conic_to(x1,y1,x,y); + curnum += 2; + break; + } + + case Primitive::CONIC_TO_SMOOTH: + { + x = data[curnum][0]; + x = (x - tl[0] + origin[0])*pw; + y = data[curnum][1]; + y = (y - tl[1] + origin[1])*ph; + + x1 = span.cur_x + tangent[0]/2; + y1 = span.cur_y + tangent[1]/2; + + tangent[0] = 2*(x - x1); + tangent[1] = 2*(y - y1); + + span.conic_to(x1,y1,x,y); + curnum ++; + + break; + } + + case Primitive::CUBIC_TO: + { + x = data[curnum+2][0]; + x = (x - tl[0] + origin[0])*pw; + y = data[curnum+2][1]; + y = (y - tl[1] + origin[1])*ph; + + x2 = data[curnum+1][0]; + x2 = (x2 - tl[0] + origin[0])*pw; + y2 = data[curnum+1][1]; + y2 = (y2 - tl[1] + origin[1])*ph; + + x1 = data[curnum][0]; + x1 = (x1 - tl[0] + origin[0])*pw; + y1 = data[curnum][1]; + y1 = (y1 - tl[1] + origin[1])*ph; + + tangent[0] = 2*(x - x2); + tangent[1] = 2*(y - y2); + + span.cubic_to(x1,y1,x2,y2,x,y); + curnum += 3; + + break; + } + + case Primitive::CUBIC_TO_SMOOTH: + { + x = data[curnum+1][0]; + x = (x - tl[0] + origin[0])*pw; + y = data[curnum+1][1]; + y = (y - tl[1] + origin[1])*ph; + + x2 = data[curnum][0]; + x2 = (x2 - tl[0] + origin[0])*pw; + y2 = data[curnum][1]; + y2 = (y2 - tl[1] + origin[1])*ph; + + x1 = span.cur_x + tangent[0]/3.0; + y1 = span.cur_y + tangent[1]/3.0; + + tangent[0] = 2*(x - x2); + tangent[1] = 2*(y - y2); + + span.cubic_to(x1,y1,x2,y2,x,y); + curnum += 2; + + break; + } + } + } + } + + //sort the bastards so we can render everything + span.sort_marks(); + + return render_polyspan(surface, span, + useblend?get_blend_method():Color::BLEND_STRAIGHT, + useblend?get_amount():1.0); +} + +bool +Layer_Shape::render_shape(etl::surface *surface,int /*quality*/, + const RendDesc &renddesc, ProgressCallback */*cb*/)const +{ + // If our amount is set to zero, no need to render anything + if(!get_amount()) + return true; + + //test new polygon renderer + // Build edge table + // Width and Height of a pixel + const int w = renddesc.get_w(); + const int h = renddesc.get_h(); + const Real pw = renddesc.get_w()/(renddesc.get_br()[0]-renddesc.get_tl()[0]); + const Real ph = renddesc.get_h()/(renddesc.get_br()[1]-renddesc.get_tl()[1]); + + const Point tl = renddesc.get_tl(); + + Vector tangent (0,0); + + PolySpan span; + + //optimization for tessellating only inside tiles + span.window.minx = 0; + span.window.miny = 0; + span.window.maxx = w; + span.window.maxy = h; + + //pointers for processing the bytestream + const char *current = &bytestream[0]; + const char *end = &bytestream[bytestream.size()]; + + int operation = Primitive::NONE; + int number = 0; + int curnum; + + Primitive *curprim; + Point *data; + + Real x,y,x1,y1,x2,y2; + + while(current < end) + { + //get the op code safely + curprim = (Primitive *)current; + + //advance past indices + current += sizeof(Primitive); + if(current > end) + { + warning("Layer_Shape::accelerated_render - Error in the byte stream, not enough space for next declaration"); + return false; + } + + //get the relevant data + operation = curprim->operation; + number = curprim->number; + + if(operation == Primitive::END) + break; + + if(operation == Primitive::CLOSE) + { + if(span.notclosed()) + { + tangent[0] = span.close_x - span.cur_x; + tangent[1] = span.close_y - span.cur_y; + span.close(); + } + continue; + } + + data = (Point*)current; + current += sizeof(Point)*number; + + //check data positioning + if(current > end) + { + warning("Layer_Shape::accelerated_render - Error in the byte stream, in sufficient data space for declared number of points"); + return false; + } + + //transfer all the data + for(curnum=0; curnum < number;) + { + switch(operation) + { + case Primitive::MOVE_TO: + { + x = data[curnum][0]; + x = (x - tl[0] + origin[0])*pw; + y = data[curnum][1]; + y = (y - tl[1] + origin[1])*ph; + + if(curnum == 0) + { + span.move_to(x,y); + + tangent[0] = 0; + tangent[1] = 0; + } + else + { + tangent[0] = x - span.cur_x; + tangent[1] = y - span.cur_y; + + span.line_to(x,y); + } + + curnum++; //only advance one point + + break; + } + + case Primitive::LINE_TO: + { + x = data[curnum][0]; + x = (x - tl[0] + origin[0])*pw; + y = data[curnum][1]; + y = (y - tl[1] + origin[1])*ph; + + tangent[0] = x - span.cur_x; + tangent[1] = y - span.cur_y; + + span.line_to(x,y); + curnum++; + break; + } + + case Primitive::CONIC_TO: + { + x = data[curnum+1][0]; + x = (x - tl[0] + origin[0])*pw; + y = data[curnum+1][1]; + y = (y - tl[1] + origin[1])*ph; + + x1 = data[curnum][0]; + x1 = (x1 - tl[0] + origin[0])*pw; + y1 = data[curnum][1]; + y1 = (y1 - tl[1] + origin[1])*ph; + + tangent[0] = 2*(x - x1); + tangent[1] = 2*(y - y1); + + span.conic_to(x1,y1,x,y); + curnum += 2; + break; + } + + case Primitive::CONIC_TO_SMOOTH: + { + x = data[curnum][0]; + x = (x - tl[0] + origin[0])*pw; + y = data[curnum][1]; + y = (y - tl[1] + origin[1])*ph; + + x1 = span.cur_x + tangent[0]/2; + y1 = span.cur_y + tangent[1]/2; + + tangent[0] = 2*(x - x1); + tangent[1] = 2*(y - y1); + + span.conic_to(x1,y1,x,y); + curnum ++; + + break; + } + + case Primitive::CUBIC_TO: + { + x = data[curnum+2][0]; + x = (x - tl[0] + origin[0])*pw; + y = data[curnum+2][1]; + y = (y - tl[1] + origin[1])*ph; + + x2 = data[curnum+1][0]; + x2 = (x2 - tl[0] + origin[0])*pw; + y2 = data[curnum+1][1]; + y2 = (y2 - tl[1] + origin[1])*ph; + + x1 = data[curnum][0]; + x1 = (x1 - tl[0] + origin[0])*pw; + y1 = data[curnum][1]; + y1 = (y1 - tl[1] + origin[1])*ph; + + tangent[0] = 2*(x - x2); + tangent[1] = 2*(y - y2); + + span.cubic_to(x1,y1,x2,y2,x,y); + curnum += 3; + + break; + } + + case Primitive::CUBIC_TO_SMOOTH: + { + x = data[curnum+1][0]; + x = (x - tl[0] + origin[0])*pw; + y = data[curnum+1][1]; + y = (y - tl[1] + origin[1])*ph; + + x2 = data[curnum][0]; + x2 = (x2 - tl[0] + origin[0])*pw; + y2 = data[curnum][1]; + y2 = (y2 - tl[1] + origin[1])*ph; + + x1 = span.cur_x + tangent[0]/3.0; + y1 = span.cur_y + tangent[1]/3.0; + + tangent[0] = 2*(x - x2); + tangent[1] = 2*(y - y2); + + span.cubic_to(x1,y1,x2,y2,x,y); + curnum += 2; + + break; + } + } + } + } + + //sort the bastards so we can render everything + span.sort_marks(); + + return render_polyspan(surface, span); +} + +Rect +Layer_Shape::get_bounding_rect()const +{ + if(invert) + return Rect::full_plane(); + + if (edge_table->initaabb) + return Rect::zero(); + + Rect bounds(edge_table->aabb+origin); + bounds.expand(max((bounds.get_min() - bounds.get_max()).mag()*0.01, + feather)); + + return bounds; +} diff --git a/synfig-core/src/synfig/layer_shape.h b/synfig-core/src/synfig/layer_shape.h new file mode 100644 index 0000000..1b20d52 --- /dev/null +++ b/synfig-core/src/synfig/layer_shape.h @@ -0,0 +1,128 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer_shape.h +** \brief Header file for implementation of the "Shape" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007-2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_LAYER_SHAPE_H +#define __SYNFIG_LAYER_SHAPE_H + +/* === H E A D E R S ======================================================= */ + +#include "layer_composite.h" +#include "color.h" +#include "vector.h" +#include "blur.h" + +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/*! \class Layer_Shape +** \brief writeme */ +class Layer_Shape : public Layer_Composite, public Layer_NoDeform +{ + SYNFIG_LAYER_MODULE_EXT + + enum WindingStyle + { + WINDING_NON_ZERO=0, //!< less than -1 --> 1; -1 --> 1; 0 --> 0; 1 --> 1; greater than 1 --> 1 + WINDING_EVEN_ODD=1, //!< add or subtract multiples of 2 to get into range -1:1, then as above + + WINDING_END=2 //!< \internal + }; + +private: + + //internal caching + struct Intersector; + Intersector *edge_table; + + //exported data + Color color; + + Point origin; + bool invert; + bool antialias; + + int blurtype; + Real feather; + WindingStyle winding_style; + + std::vector< char > bytestream; + + //for use in creating the bytestream + int lastbyteop; + int lastoppos; + +protected: + + Layer_Shape(const Real &a = 1.0, const Color::BlendMethod m = Color::BLEND_COMPOSITE); + +public: + + ~Layer_Shape(); + + //! Clears out any data + /*! Also clears out the Intersector + */ + void clear(); + //void sync(); + + void move_to(Real x, Real y); + void line_to(Real x, Real y); + void conic_to(Real x1, Real y1, Real x, Real y); + void conic_to_smooth(Real x, Real y); //x1,y1 derived from current tangent + void curve_to(Real x1, Real y1, Real x2, Real y2, Real x, Real y); + void curve_to_smooth(Real x2, Real y2, Real x, Real y); //x1,y1 derived from current tangent + void close(); + void endpath(); + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + virtual ValueBase get_param(const String & param)const; + + virtual Vocab get_param_vocab()const; + + virtual Color get_color(Context context, const Point &pos)const; + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + virtual Rect get_bounding_rect()const; + +private: + class PolySpan; + bool render_polyspan(Surface *surface,PolySpan &polyspan, + Color::BlendMethod method,Color::value_type amount)const; + bool render_polyspan(etl::surface *surface,PolySpan &polyspan)const; + virtual bool render_shape(Surface *surface,bool useblend,int quality,const RendDesc &renddesc, ProgressCallback *cb)const; + virtual bool render_shape(etl::surface *surface,int quality,const RendDesc &renddesc, ProgressCallback *cb)const; +}; // END of Layer_Shape + +}; // END of namespace synfig +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/layer_solidcolor.cpp b/synfig-core/src/synfig/layer_solidcolor.cpp new file mode 100644 index 0000000..0b520ad --- /dev/null +++ b/synfig-core/src/synfig/layer_solidcolor.cpp @@ -0,0 +1,169 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer_solidcolor.cpp +** \brief Implementation of the "Solid Color" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "layer_solidcolor.h" +#include "string.h" +#include "time.h" +#include "context.h" +#include "paramdesc.h" +#include "renddesc.h" +#include "surface.h" +#include "value.h" +#include "valuenode.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace etl; +using namespace std; +using namespace synfig; + +/* === G L O B A L S ======================================================= */ + +SYNFIG_LAYER_INIT(Layer_SolidColor); +SYNFIG_LAYER_SET_NAME(Layer_SolidColor,"SolidColor"); // todo: use solid_color +SYNFIG_LAYER_SET_LOCAL_NAME(Layer_SolidColor,N_("Solid Color")); +SYNFIG_LAYER_SET_CATEGORY(Layer_SolidColor,N_("Geometry")); +SYNFIG_LAYER_SET_VERSION(Layer_SolidColor,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Layer_SolidColor,"$Id$"); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +Layer_SolidColor::Layer_SolidColor(): + Layer_Composite(1.0,Color::BLEND_STRAIGHT), + color(Color::black()) +{ +} + +bool +Layer_SolidColor::set_param(const String & param, const ValueBase &value) +{ + IMPORT_PLUS(color, { if (color.get_a() == 0) { if (converted_blend_) { + set_blend_method(Color::BLEND_ALPHA_OVER); + color.set_a(1); } else transparent_color_ = true; } }); + + return Layer_Composite::set_param(param,value); +} + +ValueBase +Layer_SolidColor::get_param(const String ¶m)const +{ + EXPORT(color); + + EXPORT_NAME(); + EXPORT_VERSION(); + + return Layer_Composite::get_param(param); +} + +Layer::Vocab +Layer_SolidColor::get_param_vocab()const +{ + Layer::Vocab ret(Layer_Composite::get_param_vocab()); + + ret.push_back(ParamDesc("color") + .set_local_name(_("Color")) + ); + + return ret; +} + +synfig::Layer::Handle +Layer_SolidColor::hit_check(synfig::Context context, const synfig::Point &point)const +{ + if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5) + return const_cast(this); + else + if(get_blend_method()==Color::BLEND_COMPOSITE && get_amount()*color.get_a()>=0.5) + return const_cast(this); + + Layer::Handle layer(context.hit_check(point)); + + return layer?layer:const_cast(this); +} + +Color +Layer_SolidColor::get_color(Context context, const Point &pos)const +{ + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + return color; + else + return Color::blend(color,context.get_color(pos),get_amount(),get_blend_method()); +} + +bool +Layer_SolidColor::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const +{ + if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) + { + // Mark our progress as starting + if(cb && !cb->amount_complete(0,1000)) + return false; + + surface->set_wh(renddesc.get_w(),renddesc.get_h()); + surface->fill(color); + + // Mark our progress as finished + if(cb && !cb->amount_complete(1000,1000)) + return false; + + return true; + } + + SuperCallback supercb(cb,0,9500,10000); + + if(!context.accelerated_render(surface,quality,renddesc,&supercb)) + return false; + + int x,y; + + Surface::alpha_pen apen(surface->begin()); + + apen.set_value(color); + apen.set_alpha(get_amount()); + apen.set_blend_method(get_blend_method()); + + for(y=0;yamount_complete(10000,10000)) + return false; + + return true; +} diff --git a/synfig-core/src/synfig/layer_solidcolor.h b/synfig-core/src/synfig/layer_solidcolor.h new file mode 100644 index 0000000..90a509d --- /dev/null +++ b/synfig-core/src/synfig/layer_solidcolor.h @@ -0,0 +1,71 @@ +/* === S Y N F I G ========================================================= */ +/*! \file layer_solidcolor.h +** \brief Header file for implementation of the "Solid Color" layer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_LAYER_SOLIDCOLOR_H +#define __SYNFIG_LAYER_SOLIDCOLOR_H + +/* === H E A D E R S ======================================================= */ + +#include "layer_composite.h" +#include "color.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class Layer_SolidColor : public Layer_Composite, public Layer_NoDeform +{ + SYNFIG_LAYER_MODULE_EXT + +private: + + Color color; + +public: + + Layer_SolidColor(); + + virtual bool set_param(const String & param, const synfig::ValueBase &value); + + virtual ValueBase get_param(const String & param)const; + + virtual Color get_color(Context context, const Point &pos)const; + + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; + + virtual Vocab get_param_vocab()const; + + virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; + +}; // END of class Layer_SolidColor + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/listimporter.cpp b/synfig-core/src/synfig/listimporter.cpp new file mode 100644 index 0000000..02680f0 --- /dev/null +++ b/synfig-core/src/synfig/listimporter.cpp @@ -0,0 +1,208 @@ +/* === S Y N F I G ========================================================= */ +/*! \file listimporter.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "listimporter.h" +#include "general.h" +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +#define LIST_IMPORTER_CACHE_SIZE 20 + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ListImporter::ListImporter(const String &filename) +{ + fps=15; + + ifstream stream(filename.c_str()); + + if(!stream) + { + synfig::error("Unable to open "+filename); + return; + } + String line; + String prefix=etl::dirname(filename)+ETL_DIRECTORY_SEPARATOR; + getline(stream,line); // read first line and check whether it is a Papagayo lip sync file + + if (line == "MohoSwitch1") // it is a Papagayo lipsync file + { + String phoneme, prevphoneme, prevext, ext(".jpg"); // default image format + int frame, prevframe = -1; // it means that the previous phoneme is not known + + while(!stream.eof()) + { + getline(stream,line); + + if(line.find(String("FPS ")) == 0) + { + float f = atof(String(line.begin()+4,line.end()).c_str()); + if (f) fps = f; + continue; + } + + if (line == "bmp" || + line == "gif" || + line == "jpg" || + line == "png" || + line == "ppm" || + line == "tiff" ) + { + ext = String(".") + line; + continue; + } + + size_t pos = line.find(String(" ")); // find space position. The format is "frame phoneme-name". + if(pos != String::npos) + { + frame = atoi(String(line.begin(),line.begin()+pos).c_str()); + phoneme = String(line.begin()+pos+1, line.end()); + + if (prevframe != -1) + while (prevframe < frame) + { + filename_list.push_back(prefix + prevphoneme + prevext); + synfig::info("frame %d, phoneme = %s, path = '%s'", prevframe, prevphoneme.c_str(), (prefix + prevphoneme + prevext).c_str()); + prevframe++; + } + + prevext = ext; + prevframe = frame; + prevphoneme = phoneme; + } + } + + filename_list.push_back(prefix + prevphoneme + prevext); // do it one more time for the last phoneme + synfig::info("finally, frame %d, phoneme = %s, path = '%s'", prevframe, prevphoneme.c_str(), (prefix + prevphoneme + prevext).c_str()); + + return; + } + + stream.seekg(ios_base::beg); + while(!stream.eof()) + { + getline(stream,line); + if(line.empty()) + continue; + // If we have a framerate, then use it + if(line.find(String("FPS "))==0) + { + fps=atof(String(line.begin()+4,line.end()).c_str()); + //synfig::warning("FPS=%f",fps); + if(!fps) + fps=15; + continue; + } + filename_list.push_back(prefix+line); + } +} + +Importer* +ListImporter::create(const char *filename) +{ + return new ListImporter(filename); +} + +ListImporter::~ListImporter() +{ +} + +bool +ListImporter::get_frame(Surface &surface,Time time, ProgressCallback *cb) +{ + int frame=round_to_int(time*fps); + + if(!filename_list.size()) + { + if(cb)cb->error(_("No images in list")); + else synfig::error(_("No images in list")); + return false; + } + + if(frame<0)frame=0; + if(frame>=(signed)filename_list.size())frame=filename_list.size()-1; + + // See if that frame is cached + std::list >::iterator iter; + for(iter=frame_cache.begin();iter!=frame_cache.end();++iter) + { + if(iter->first==filename_list[frame]) + { + surface.mirror(iter->second); + return static_cast(surface); + } + } + + Importer::Handle importer(Importer::open(filename_list[frame])); + + if(!importer) + { + if(cb)cb->error(_("Unable to open ")+filename_list[frame]); + else synfig::error(_("Unable to open ")+filename_list[frame]); + return false; + } + + if(!importer->get_frame(surface,0,cb)) + { + if(cb)cb->error(_("Unable to get frame from ")+filename_list[frame]); + else synfig::error(_("Unable to get frame from ")+filename_list[frame]); + return false; + } + + if(frame_cache.size()>=LIST_IMPORTER_CACHE_SIZE) + frame_cache.pop_front(); + + frame_cache.push_back(std::pair(filename_list[frame],surface)); + + surface.mirror(frame_cache.back().second); + + return static_cast(surface); +} + +bool +ListImporter::is_animated() +{ + return true; +} diff --git a/synfig-core/src/synfig/listimporter.h b/synfig-core/src/synfig/listimporter.h new file mode 100644 index 0000000..090570f --- /dev/null +++ b/synfig-core/src/synfig/listimporter.h @@ -0,0 +1,73 @@ +/* === S Y N F I G ========================================================= */ +/*! \file listimporter.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_LISTIMPORTER_H +#define __SYNFIG_LISTIMPORTER_H + +/* === H E A D E R S ======================================================= */ + +#include "importer.h" +#include "surface.h" +#include +#include +//#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/*! \class ListImporter +** \todo Write more detailed description +*/ +class ListImporter : public Importer +{ + float fps; + std::vector filename_list; + std::list > frame_cache; +protected: + ListImporter(const String &filename); + +public: + + virtual ~ListImporter(); + + virtual bool get_frame(Surface &surface,Time time, ProgressCallback *callback=NULL); + + virtual bool is_animated(); + + static Importer* create(const char *filename); +}; + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/loadcanvas.cpp b/synfig-core/src/synfig/loadcanvas.cpp new file mode 100644 index 0000000..3da37e9 --- /dev/null +++ b/synfig-core/src/synfig/loadcanvas.cpp @@ -0,0 +1,2301 @@ +/* === S Y N F I G ========================================================= */ +/*! \file loadcanvas.cpp +** \brief writeme +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** Copyright (c) 2009 Carlos A. Sosa Navarro +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "layer_pastecanvas.h" +#include "loadcanvas.h" +#include "valuenode.h" +#include "valuenode_subtract.h" +#include "valuenode_animated.h" +#include "valuenode_composite.h" +#include "valuenode_const.h" +#include "valuenode_linear.h" +#include "valuenode_dynamiclist.h" +#include "valuenode_reference.h" +#include "valuenode_scale.h" +#include "valuenode_timedswap.h" +#include "valuenode_twotone.h" +#include "valuenode_stripes.h" +#include "valuenode_segcalctangent.h" +#include "valuenode_segcalcvertex.h" +#include "valuenode_bline.h" + +#include "layer.h" +#include "string.h" + +#include "exception.h" + +#include "gradient.h" + +#include +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace synfig; +using namespace etl; + +/* +class test_class { +static int bleh; +public: + test_class() { assert(!bleh); bleh++; synfig::info("test_class: initi: %d",bleh); } + ~test_class() { assert(bleh); synfig::info("test_class: uninit: %d",bleh); bleh--; } +}; +int test_class::bleh(0); + +test_class test_class_instance; +*/ + +/* === M A C R O S ========================================================= */ + +#define VALUENODE_COMPATIBILITY_URL "http://synfig.org/Convert#Compatibility" + +inline bool is_whitespace(char x) { return ((x)=='\n' || (x)=='\t' || (x)==' '); } + +std::set CanvasParser::loading_; + +/* === P R O C E D U R E S ================================================= */ + +static std::map* open_canvas_map_(0); + +std::map >& synfig::get_open_canvas_map() +{ + if(!open_canvas_map_) + open_canvas_map_=new std::map; + return *open_canvas_map_; +} + +static void _remove_from_open_canvas_map(Canvas *x) { get_open_canvas_map().erase(etl::absolute_path(x->get_file_name())); } + +static void _canvas_file_name_changed(Canvas *x) +{ + std::map >::iterator iter; + + for(iter=get_open_canvas_map().begin();iter!=get_open_canvas_map().end();++iter) + if(iter->second==x) + break; + assert(iter!=get_open_canvas_map().end()); + if(iter==get_open_canvas_map().end()) + return; + get_open_canvas_map().erase(iter->first); + get_open_canvas_map()[etl::absolute_path(x->get_file_name())]=x; + +} + +Canvas::Handle +synfig::open_canvas(const String &filename,String &errors,String &warnings) +{ + return open_canvas_as(filename, filename, errors, warnings); +} + +Canvas::Handle +synfig::open_canvas_as(const String &filename,const String &as,String &errors,String &warnings) +{ + if (CanvasParser::loading_.count(filename)) + { + String warning(strprintf(_("cannot load '%s' recursively"), filename.c_str())); + synfig::warning(warning); + warnings = " * " + warning + "\n"; + Canvas::Handle canvas(Canvas::create()); + canvas->set_file_name(filename); + Layer::Handle paste(Layer_PasteCanvas::create()); + canvas->push_back(paste); + paste->set_description(warning); + return canvas; + } + + Canvas::Handle canvas; + CanvasParser parser; + parser.set_allow_errors(true); + + try + { + CanvasParser::loading_.insert(filename); + canvas=parser.parse_from_file_as(filename,as,errors); + } + catch (...) + { + CanvasParser::loading_.erase(filename); + throw; + } + CanvasParser::loading_.erase(filename); + + warnings = parser.get_warnings_text(); + + if(parser.error_count()) + { + errors = parser.get_errors_text(); + return Canvas::Handle(); + } + + return canvas; +} + +/* === M E T H O D S ======================================================= */ + +void +CanvasParser::error_unexpected_element(xmlpp::Node *element,const String &got, const String &expected) +{ + error(element,strprintf(_("Unexpected element <%s>, Expected <%s>"),got.c_str(),expected.c_str())); +} + +void +CanvasParser::error_unexpected_element(xmlpp::Node *element,const String &got) +{ + error(element,strprintf(_("Unexpected element <%s>"),got.c_str())); +} + +void +CanvasParser::warning(xmlpp::Node *element, const String &text) +{ + string str=strprintf("%s:<%s>:%d: ",filename.c_str(),element->get_name().c_str(),element->get_line())+text; + + synfig::warning(str); + // cerr<=max_warnings_) + fatal_error(element, _("Too many warnings")); +} + +void +CanvasParser::error(xmlpp::Node *element, const String &text) +{ + string str=strprintf("%s:<%s>:%d: error: ",filename.c_str(),element->get_name().c_str(),element->get_line())+text; + total_errors_++; + errors_text += " * " + str + "\n"; + if(!allow_errors_) + throw runtime_error(str); + cerr<:%d:",filename.c_str(),element->get_name().c_str(),element->get_line())+text; + throw runtime_error(str); +} + + + +Keyframe +CanvasParser::parse_keyframe(xmlpp::Element *element,Canvas::Handle canvas) +{ + assert(element->get_name()=="keyframe"); + + if(!element->get_attribute("time")) + { + error(element,strprintf(_("<%s> is missing \"%s\" attribute"),"real","time")); + return Keyframe(); + } + + Keyframe ret(Time(element->get_attribute("time")->get_value(),canvas->rend_desc().get_frame_rate())); + + + if(element->get_children().empty()) + return ret; + + if(element->get_child_text()->get_content().empty()) + return ret; + + ret.set_description(element->get_child_text()->get_content()); + + return ret; +} + + +Real +CanvasParser::parse_real(xmlpp::Element *element) +{ + assert(element->get_name()=="real"); + + if(!element->get_children().empty()) + warning(element, strprintf(_("<%s> should not contain anything"),"real")); + + if(!element->get_attribute("value")) + { + error(element,strprintf(_("<%s> is missing \"value\" attribute"),"real")); + return false; + } + + string val=element->get_attribute("value")->get_value(); + + return atof(val.c_str()); +} + +Time +CanvasParser::parse_time(xmlpp::Element *element,Canvas::Handle canvas) +{ + assert(element->get_name()=="time"); + + if(!element->get_children().empty()) + warning(element, strprintf(_("<%s> should not contain anything"),"time")); + + if(!element->get_attribute("value")) + { + error(element,strprintf(_("<%s> is missing \"value\" attribute"),"time")); + return false; + } + + string val=element->get_attribute("value")->get_value(); + + return Time(val,canvas->rend_desc().get_frame_rate()); +} + +int +CanvasParser::parse_integer(xmlpp::Element *element) +{ + assert(element->get_name()=="integer"); + + if(!element->get_children().empty()) + warning(element, strprintf(_("<%s> should not contain anything"),"integer")); + + if(!element->get_attribute("value")) + { + error(element,strprintf(_("<%s> is missing \"value\" attribute"),"integer")); + return false; + } + + string val=element->get_attribute("value")->get_value(); + + return atoi(val.c_str()); +} + +// see 'minor hack' at the end of parse_vector() below +// making this 'static' to give it file local scope +// stops it working (where working means working around +// bug #1509627) +Vector &canvas_parser_vector_id(Vector &vector) +{ + return vector; +} + +Vector +CanvasParser::parse_vector(xmlpp::Element *element) +{ + assert(element->get_name()=="vector"); + + if(element->get_children().empty()) + { + error(element, "Undefined value in "); + return Vector(); + } + + Vector vect; + + xmlpp::Element::NodeList list = element->get_children(); + for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) + { + xmlpp::Element *child=dynamic_cast((xmlpp::Node*)*iter); + if(!child) + continue; + else + if(child->get_name()=="x") + { + if(child->get_children().empty()) + { + error(element, "Undefined value in "); + return Vector(); + } + vect[0]=atof(child->get_child_text()->get_content().c_str()); + } + else + if(child->get_name()=="y") + { + if(child->get_children().empty()) + { + error(element, "Undefined value in "); + return Vector(); + } + vect[1]=atof(child->get_child_text()->get_content().c_str()); + } + else + error_unexpected_element(child,child->get_name()); + } + // Minor hack - gcc 4.1.2 and earlier think that we're not using + // 'vect' and optimize it out at -O2 and higher. This convinces + // them that we are really using it. + return canvas_parser_vector_id(vect); + // When the bug is fixed, we can just do this instead: + // return vect; +} + +Color +CanvasParser::parse_color(xmlpp::Element *element) +{ + assert(element->get_name()=="color"); + + if(element->get_children().empty()) + { + error(element, "Undefined value in "); + return Color(); + } + + Color color(0); + + xmlpp::Element::NodeList list = element->get_children(); + for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) + { + xmlpp::Element *child(dynamic_cast(*iter)); + if(!child) + continue; + else + if(child->get_name()=="r") + { + if(child->get_children().empty()) + { + error(element, "Undefined value in "); + return Color(); + } + color.set_r(atof(child->get_child_text()->get_content().c_str())); + } + else + if(child->get_name()=="g") + { + if(child->get_children().empty()) + { + error(element, "Undefined value in "); + return Color(); + } + color.set_g(atof(child->get_child_text()->get_content().c_str())); + } + else + if(child->get_name()=="b") + { + if(child->get_children().empty()) + { + error(element, "Undefined value in "); + return Color(); + } + color.set_b(atof(child->get_child_text()->get_content().c_str())); + } + else + if(child->get_name()=="a") + { + if(child->get_children().empty()) + { + error(element, "Undefined value in "); + return Color(); + } + color.set_a(atof(child->get_child_text()->get_content().c_str())); + } + else + error_unexpected_element(child,child->get_name()); + } + + return color; +} + +synfig::String +CanvasParser::parse_string(xmlpp::Element *element) +{ + assert(element->get_name()=="string"); + + if(element->get_children().empty()) + { + warning(element, "Undefined value in "); + return synfig::String(); + } + + if(element->get_child_text()->get_content().empty()) + { + warning(element, "Content element of appears to be empty"); + return synfig::String(); + } + + return element->get_child_text()->get_content(); +} + +bool +CanvasParser::parse_bool(xmlpp::Element *element) +{ + assert(element->get_name()=="bool"); + + if(!element->get_children().empty()) + warning(element, strprintf(_("<%s> should not contain anything"),"bool")); + + if(!element->get_attribute("value")) + { + error(element,strprintf(_("<%s> is missing \"value\" attribute"),"bool")); + return false; + } + + string val=element->get_attribute("value")->get_value(); + + if(val=="true" || val=="1") + return true; + if(val=="false" || val=="0") + return false; + + error(element,strprintf(_("Bad value \"%s\" in <%s>"),val.c_str(),"bool")); + + return false; +} + +Gradient +CanvasParser::parse_gradient(xmlpp::Element *node) +{ + assert(node->get_name()=="gradient"); + Gradient ret; + + xmlpp::Element::NodeList list = node->get_children(); + for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) + { + xmlpp::Element *child(dynamic_cast(*iter)); + if(!child) + continue; + else + { + Gradient::CPoint cpoint; + cpoint.color=parse_color(child); + + if(!child->get_attribute("pos")) + { + error(child,strprintf(_("<%s> is missing \"pos\" attribute"),"gradient")); + return Gradient(); + } + + cpoint.pos=atof(child->get_attribute("pos")->get_value().c_str()); + + ret.push_back(cpoint); + } + } + ret.sort(); + return ret; +} + +ValueBase +CanvasParser::parse_list(xmlpp::Element *element,Canvas::Handle canvas) +{ + vector value_list; + + xmlpp::Element::NodeList list = element->get_children(); + for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) + { + xmlpp::Element *child(dynamic_cast(*iter)); + if(!child) + continue; + else + { + value_list.push_back(parse_value(child,canvas)); + if(!value_list.back().is_valid()) + { + value_list.pop_back(); + error(child,"Bad ValueBase"); + continue; + } + } + } + return value_list; +} + +Segment +CanvasParser::parse_segment(xmlpp::Element *element) +{ + assert(element->get_name()=="segment"); + + if(element->get_children().empty()) + { + error(element, "Undefined value in "); + return Segment(); + } + + Segment seg; + + xmlpp::Element::NodeList list = element->get_children(); + for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) + { + xmlpp::Element *child(dynamic_cast(*iter)); + if(!child) + continue; + else + if(child->get_name()=="p1") + { + xmlpp::Element::NodeList list = child->get_children(); + xmlpp::Element::NodeList::iterator iter; + + // Search for the first non-text XML element + for(iter = list.begin(); iter != list.end(); ++iter) + if(dynamic_cast(*iter)) break; + + if(iter==list.end()) + { + error(element, "Undefined value in "); + continue; + } + + if((*iter)->get_name()!="vector") + { + error_unexpected_element((*iter),(*iter)->get_name(),"vector"); + continue; + } + + seg.p1=parse_vector(dynamic_cast(*iter)); + } + else + if(child->get_name()=="t1") + { + xmlpp::Element::NodeList list = child->get_children(); + xmlpp::Element::NodeList::iterator iter; + + // Search for the first non-text XML element + for(iter = list.begin(); iter != list.end(); ++iter) + if(dynamic_cast(*iter)) break; + + if(iter==list.end()) + { + error(element, "Undefined value in "); + continue; + } + + if((*iter)->get_name()!="vector") + { + error_unexpected_element((*iter),(*iter)->get_name(),"vector"); + continue; + } + + seg.t1=parse_vector(dynamic_cast(*iter)); + } + else + if(child->get_name()=="p2") + { + xmlpp::Element::NodeList list = child->get_children(); + xmlpp::Element::NodeList::iterator iter; + + // Search for the first non-text XML element + for(iter = list.begin(); iter != list.end(); ++iter) + if(dynamic_cast(*iter)) break; + + if(iter==list.end()) + { + error(element, "Undefined value in "); + continue; + } + + if((*iter)->get_name()!="vector") + { + error_unexpected_element((*iter),(*iter)->get_name(),"vector"); + continue; + } + + seg.p2=parse_vector(dynamic_cast(*iter)); + } + else + if(child->get_name()=="t2") + { + xmlpp::Element::NodeList list = child->get_children(); + xmlpp::Element::NodeList::iterator iter; + + // Search for the first non-text XML element + for(iter = list.begin(); iter != list.end(); ++iter) + if(dynamic_cast(*iter)) break; + + if(iter==list.end()) + { + error(element, "Undefined value in "); + continue; + } + + if((*iter)->get_name()!="vector") + { + error_unexpected_element((*iter),(*iter)->get_name(),"vector"); + continue; + } + + seg.t2=parse_vector(dynamic_cast(*iter)); + } + else + error_unexpected_element(child,child->get_name()); + } + return seg; +} + +BLinePoint +CanvasParser::parse_bline_point(xmlpp::Element *element) +{ + assert(element->get_name()=="bline_point"); + if(element->get_children().empty()) + { + error(element, "Undefined value in "); + return BLinePoint(); + } + + BLinePoint ret; + ret.set_split_tangent_flag(false); + + xmlpp::Element::NodeList list = element->get_children(); + for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) + { + xmlpp::Element *child(dynamic_cast(*iter)); + if(!child) + continue; + else + // Vertex + if(child->get_name()[0]=='v' || child->get_name()=="p1") + { + xmlpp::Element::NodeList list = child->get_children(); + xmlpp::Element::NodeList::iterator iter; + + // Search for the first non-text XML element + for(iter = list.begin(); iter != list.end(); ++iter) + if(dynamic_cast(*iter)) break; + + if(iter==list.end()) + { + error(element, "Undefined value in "); + continue; + } + + if((*iter)->get_name()!="vector") + { + error_unexpected_element((*iter),(*iter)->get_name(),"vector"); + continue; + } + + ret.set_vertex(parse_vector(dynamic_cast(*iter))); + } + else + // Tangent 1 + if(child->get_name()=="t1" || child->get_name()=="tangent") + { + xmlpp::Element::NodeList list = child->get_children(); + xmlpp::Element::NodeList::iterator iter; + + // Search for the first non-text XML element + for(iter = list.begin(); iter != list.end(); ++iter) + if(dynamic_cast(*iter)) break; + + if(iter==list.end()) + { + error(element, "Undefined value in "); + continue; + } + + if((*iter)->get_name()!="vector") + { + error_unexpected_element((*iter),(*iter)->get_name(),"vector"); + continue; + } + + ret.set_tangent1(parse_vector(dynamic_cast(*iter))); + } + else + // Tangent 2 + if(child->get_name()=="t2") + { + xmlpp::Element::NodeList list = child->get_children(); + xmlpp::Element::NodeList::iterator iter; + + // Search for the first non-text XML element + for(iter = list.begin(); iter != list.end(); ++iter) + if(dynamic_cast(*iter)) break; + + if(iter==list.end()) + { + error(element, "Undefined value in "); + continue; + } + + if((*iter)->get_name()!="vector") + { + error_unexpected_element((*iter),(*iter)->get_name(),"vector"); + continue; + } + + ret.set_tangent2(parse_vector(dynamic_cast(*iter))); + ret.set_split_tangent_flag(true); + } + else + // width + if(child->get_name()=="width") + { + xmlpp::Element::NodeList list = child->get_children(); + xmlpp::Element::NodeList::iterator iter; + + // Search for the first non-text XML element + for(iter = list.begin(); iter != list.end(); ++iter) + if(dynamic_cast(*iter)) break; + + if(iter==list.end()) + { + error(element, "Undefined value in "); + continue; + } + + if((*iter)->get_name()!="real") + { + error_unexpected_element((*iter),(*iter)->get_name(),"real"); + continue; + } + + ret.set_width(parse_real(dynamic_cast(*iter))); + } + else + // origin + if(child->get_name()=="origin") + { + xmlpp::Element::NodeList list = child->get_children(); + xmlpp::Element::NodeList::iterator iter; + + // Search for the first non-text XML element + for(iter = list.begin(); iter != list.end(); ++iter) + if(dynamic_cast(*iter)) break; + + if(iter==list.end()) + { + error(element, "Undefined value in "); + continue; + } + + if((*iter)->get_name()!="real") + { + error_unexpected_element((*iter),(*iter)->get_name(),"real"); + continue; + } + + ret.set_origin(parse_real(dynamic_cast(*iter))); + } + else + error_unexpected_element(child,child->get_name()); + } + return ret; +} + +Angle +CanvasParser::parse_angle(xmlpp::Element *element) +{ + assert(element->get_name()=="angle"); + + if(!element->get_children().empty()) + warning(element, strprintf(_("<%s> should not contain anything"),"angle")); + + if(!element->get_attribute("value")) + { + error(element,strprintf(_("<%s> is missing \"value\" attribute"),"angle")); + return Angle(); + } + + string val=element->get_attribute("value")->get_value(); + + return Angle::deg(atof(val.c_str())); +} + +ValueBase +CanvasParser::parse_value(xmlpp::Element *element,Canvas::Handle canvas) +{ + if(element->get_name()=="real") + return parse_real(element); + else + if(element->get_name()=="time") + return parse_time(element,canvas); + else + if(element->get_name()=="integer") + return parse_integer(element); + else + if(element->get_name()=="string") + return parse_string(element); + else + if(element->get_name()=="vector") + return parse_vector(element); + else + if(element->get_name()=="color") + return parse_color(element); + else + if(element->get_name()=="segment") + return parse_segment(element); + else + if(element->get_name()=="list") + return parse_list(element,canvas); + else + if(element->get_name()=="gradient") + return parse_gradient(element); + else + if(element->get_name()=="bool") + return parse_bool(element); + else + //if(element->get_name()=="canvas") + // return parse_canvas(element,canvas,true); // inline canvas + //else + if(element->get_name()=="angle" || element->get_name()=="degrees" || element->get_name()=="radians" || element->get_name()=="rotations") + return parse_angle(element); + else + if(element->get_name()=="bline_point") + return parse_bline_point(element); + else + if(element->get_name()=="canvas") + return ValueBase(parse_canvas(element,canvas,true)); + else + { + error_unexpected_element(element,element->get_name()); + } + + return ValueBase(); +} + + + + +ValueNode_Animated::Handle +CanvasParser::parse_animated(xmlpp::Element *element,Canvas::Handle canvas) +{ + assert(element->get_name()=="hermite" || element->get_name()=="animated"); + + if(!element->get_attribute("type")) + { + error(element,"Missing attribute \"type\" in "); + return ValueNode_Animated::Handle(); + } + + ValueBase::Type type=ValueBase::ident_type(element->get_attribute("type")->get_value()); + + if(!type) + { + error(element,"Bad type in "); + return ValueNode_Animated::Handle(); + } + + ValueNode_Animated::Handle value_node=ValueNode_Animated::create(type); + + if(!value_node) + { + error(element,strprintf(_("Unable to create with type \"%s\""),ValueBase::type_local_name(type).c_str())); + return ValueNode_Animated::Handle(); + } + + value_node->set_root_canvas(canvas->get_root()); + + xmlpp::Element::NodeList list = element->get_children(); + for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) + { + xmlpp::Element *child(dynamic_cast(*iter)); + if(!child) + continue; + else + if(child->get_name()=="waypoint") + { + if(!child->get_attribute("time")) + { + error(child,_(" is missing attribute \"time\"")); + continue; + } + + Time time(child->get_attribute("time")->get_value(),canvas->rend_desc().get_frame_rate()); + + + ValueNode::Handle waypoint_value_node; + xmlpp::Element::NodeList list = child->get_children(); + + if(child->get_attribute("use")) + { + if(!list.empty()) + warning(child,_("Found \"use\" attribute for , but it wasn't empty. Ignoring contents...")); + + // the waypoint might look like this, in which case we won't find "mycanvas" in the list of valuenodes, 'cos it's a canvas + // + // + // + // + if (type==ValueBase::TYPE_CANVAS) + { + String warnings; + waypoint_value_node=ValueNode_Const::create(canvas->surefind_canvas(child->get_attribute("use")->get_value(), warnings)); + warnings_text += warnings; + } + else + waypoint_value_node=canvas->surefind_value_node(child->get_attribute("use")->get_value()); + } + else + { + if(child->get_children().empty()) + { + error(child, strprintf(_("<%s> is missing its data"),"waypoint")); + continue; + } + + xmlpp::Element::NodeList::iterator iter; + + // Search for the first non-text XML element + for(iter = list.begin(); iter != list.end(); ++iter) + if(dynamic_cast(*iter)) break; + + if(iter==list.end()) + { + error(child, strprintf(_("<%s> is missing its data"),"waypoint")); + continue; + } + + waypoint_value_node=parse_value_node(dynamic_cast(*iter),canvas); + + /* + ValueBase data=parse_value(dynamic_cast(*iter),canvas); + + if(!data.is_valid()) + { + error(child,_("Bad data for ")); + continue; + } + */ + if(!waypoint_value_node) + { + error(child,_("Bad data for ")); + continue; + } + + /*! HACK -- This is a temporary fix to help repair some + ** weirdness that is currently going on (10-21-2004). + ** This short circuits the linking of waypoints, + ** a feature which is so obscure that we can get + ** away with something like this pretty easily. + */ + waypoint_value_node=waypoint_value_node->clone(); + + // Warn if there is trash after the param value + for(iter++; iter != list.end(); ++iter) + if(dynamic_cast(*iter)) + warning((*iter),strprintf(_("Unexpected element <%s> after data, ignoring..."),(*iter)->get_name().c_str())); + } + + + try { + ValueNode_Animated::WaypointList::iterator waypoint=value_node->new_waypoint(time,waypoint_value_node); + + if(child->get_attribute("tension")) + { + synfig::String str(child->get_attribute("tension")->get_value()); + waypoint->set_tension(atof(str.c_str())); + } + if(child->get_attribute("temporal-tension")) + { + synfig::String str(child->get_attribute("temporal-tension")->get_value()); + waypoint->set_temporal_tension(atof(str.c_str())); + } + if(child->get_attribute("continuity")) + { + synfig::String str(child->get_attribute("continuity")->get_value()); + waypoint->set_continuity(atof(str.c_str())); + } + if(child->get_attribute("bias")) + { + synfig::String str(child->get_attribute("bias")->get_value()); + waypoint->set_bias(atof(str.c_str())); + } + + if(child->get_attribute("before")) + { + string val=child->get_attribute("before")->get_value(); + if(val=="halt") + waypoint->set_before(INTERPOLATION_HALT); + else if(val=="constant") + waypoint->set_before(INTERPOLATION_CONSTANT); + else if(val=="linear") + waypoint->set_before(INTERPOLATION_LINEAR); + else if(val=="manual") + waypoint->set_before(INTERPOLATION_MANUAL); + else if(val=="auto") + waypoint->set_before(INTERPOLATION_TCB); + else + error(child,strprintf(_("\"%s\" not a valid value for attribute \"%s\" in <%s>"),val.c_str(),"before","waypoint")); + } + + if(child->get_attribute("after")) + { + string val=child->get_attribute("after")->get_value(); + if(val=="halt") + waypoint->set_after(INTERPOLATION_HALT); + else if(val=="constant") + waypoint->set_after(INTERPOLATION_CONSTANT); + else if(val=="linear") + waypoint->set_after(INTERPOLATION_LINEAR); + else if(val=="manual") + waypoint->set_after(INTERPOLATION_MANUAL); + else if(val=="auto") + waypoint->set_after(INTERPOLATION_TCB); + else + error(child,strprintf(_("\"%s\" not a valid value for attribute \"%s\" in <%s>"),val.c_str(),"before","waypoint")); + } + } + catch(Exception::BadTime x) + { + warning(child,x.what()); + } + continue; + + } + else + error_unexpected_element(child,child->get_name()); + } + + // in canvas version 0.1, angles used to wrap, so to get from -179 + // degrees to 180 degrees meant a 1 degree change + // in canvas version 0.2 they don't, so that's a 359 degree change + + // when loading a version 0.1 canvas, modify constant angle + // waypoints to that they are within 180 degrees of the previous + // waypoint's value + if (type == ValueBase::TYPE_ANGLE) + { + if (canvas->get_version() == "0.1") + { + bool first = true; + Real angle, prev = 0; + WaypointList &wl = value_node->waypoint_list(); + for (WaypointList::iterator iter = wl.begin(); iter != wl.end(); iter++) + { + angle = Angle::deg(iter->get_value(iter->get_time()).get(Angle())).get(); + if (first) + first = false; + else if (iter->get_value_node()->get_name() == "constant") + { + if (angle - prev > 180) + { + while (angle - prev > 180) angle -= 360; + iter->set_value(Angle::deg(angle)); + } + else if (prev - angle > 180) + { + while (prev - angle > 180) angle += 360; + iter->set_value(Angle::deg(angle)); + } + } + prev = angle; + } + } + } + + value_node->changed(); + return value_node; +} + +etl::handle +CanvasParser::parse_linkable_value_node(xmlpp::Element *element,Canvas::Handle canvas) +{ + // Determine the type + if(!element->get_attribute("type")) + { + error(element, strprintf(_("Missing attribute \"type\" in <%s>"), element->get_name().c_str())); + return 0; + } + + ValueBase::Type type=ValueBase::ident_type(element->get_attribute("type")->get_value()); + + if(!type) + { + error(element, strprintf(_("Bad type in <%s>"), element->get_name().c_str())); + return 0; + } + + handle value_node=LinkableValueNode::create(element->get_name(),type); + handle c[value_node->link_count()]; + + if(!value_node) + { + error(element, strprintf(_("Error creating ValueNode <%s> with type '%s'. Refer to '%s'"), + element->get_name().c_str(), + ValueBase::type_local_name(type).c_str(), + VALUENODE_COMPATIBILITY_URL)); + return 0; + } + + if(value_node->get_type()!=type) + { + error(element, strprintf(_("<%s> did not accept type '%s'"), + element->get_name().c_str(), + ValueBase::type_local_name(type).c_str())); + return 0; + } + + value_node->set_root_canvas(canvas->get_root()); + + // handle exported valuenodes + { + int index; + String id, name; + xmlpp::Element::AttributeList attrib_list(element->get_attributes()); + for(xmlpp::Element::AttributeList::iterator iter = attrib_list.begin(); iter != attrib_list.end(); iter++) + { + name = (*iter)->get_name(); + id = (*iter)->get_value(); + + if (name == "guid" || name == "id" || name == "type") + continue; + + try { + index = value_node->get_link_index_from_name(name); + + if(c[index]) + { + error(element,strprintf(_("'%s' was already defined in <%s>"), + name.c_str(), + element->get_name().c_str())); + continue; + } + + c[index] = canvas->surefind_value_node(id); + + if (!c[index]) + { + error(element, strprintf(_("'%s' attribute in <%s> references unknown ID '%s'"), + name.c_str(), + element->get_name().c_str(), + id.c_str())); + continue; + } + + if(!value_node->set_link(index, c[index])) + { + error(element, strprintf(_("Unable to set link '\"%s\" to ValueNode \"%s\" (link #%d in \"%s\")"), + value_node->link_name(index).c_str(), + id.c_str(), + index, + element->get_name().c_str())); + continue; + } + + // printf(" <%s> set link %d (%s) using exported value\n", element->get_name().c_str(), index, name.c_str()); + } + catch (Exception::BadLinkName) + { + warning(element, strprintf("Bad link name '%s'", name.c_str())); + } + catch(Exception::IDNotFound) + { + error(element,"Unable to resolve " + id); + } + catch(Exception::FileNotFound) + { + error(element,"Unable to open file referenced in " + id); + } + catch(...) + { + error(element,strprintf(_("Unknown Exception thrown when referencing ValueNode \"%s\""), id.c_str())); + throw; + } + } + } + + // handle inline valuenodes + { + int index; + String child_name; + xmlpp::Element::NodeList list = element->get_children(); + for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) + { + xmlpp::Element *child(dynamic_cast(*iter)); + try + { + if(!child) + continue; + + child_name = child->get_name(); + + index = value_node->get_link_index_from_name(child_name); + + if(c[index]) + { + error(child, strprintf(_("'%s' was already defined in <%s>"), + child_name.c_str(), + element->get_name().c_str())); + break; + } + + xmlpp::Element::NodeList list = child->get_children(); + xmlpp::Element::NodeList::iterator iter; + + // Search for the first non-text XML element + for(iter = list.begin(); iter != list.end(); ++iter) + if(dynamic_cast(*iter)) break; + + if(iter==list.end()) + { + error(child,strprintf(_("element <%s> is missing its contents"), + child_name.c_str())); + continue; + } + + c[index]=parse_value_node(dynamic_cast(*iter),canvas); + + if(!c[index]) + { + error((*iter),strprintf(_("Parse of '%s' failed"), + child_name.c_str())); + continue; + } + + if(!value_node->set_link(index,c[index])) + { + error(child,strprintf(_("Unable to connect value node ('%s' of type '%s') to link %d (%s)"), + c[index]->get_name().c_str(), + ValueBase::type_local_name(c[index]->get_type()).c_str(), + index, + value_node->link_name(index).c_str())); + continue; + } + + // \todo do a search for more elements and warn if they are found + + // printf(" <%s> set link %d (%s) using inline value\n", element->get_name().c_str(), index, child_name.c_str()); + } + catch(Exception::BadLinkName) + { + warning(child, strprintf("Bad link name for <%s>", element->get_name().c_str())); + } + catch(...) + { + error(child, strprintf(_("Unknown Exception thrown when working on element \"%s\""),child_name.c_str())); + throw; + } + } + } + + String version(canvas->get_version()); + for (int i = 0; i < value_node->link_count(); i++) + { + if (!c[i]) + { + // the 'width' parameter of wasn't always present in version 0.1 canvases + if (version == "0.1" && element->get_name() == "stripes" && value_node->link_name(i) == "width") + continue; + + // these 3 blinecalctangent parameters didn't appear until canvas version 0.5 + if ((version == "0.1" || version == "0.2" || version == "0.3" || version == "0.4") && + element->get_name() == "blinecalctangent" && + (value_node->link_name(i) == "offset" || + value_node->link_name(i) == "scale" || + value_node->link_name(i) == "fixed_length")) + continue; + + // 'scale' was added while canvas version 0.5 was in use + if ((version == "0.3" || version == "0.4" || version == "0.5") && + element->get_name() == "blinecalcwidth" && + value_node->link_name(i) == "scale") + continue; + + // 'loop' was added while canvas version 0.5 was in use, as was the 'gradientcolor' node type + if (version == "0.5" && + element->get_name() == "gradientcolor" && + value_node->link_name(i) == "loop") + continue; + + // 'loop' was added while canvas version 0.6 was in use; the 'random' node was added back when 0.1 was in use + if ((version == "0.1" || version == "0.2" || version == "0.3" || version == "0.4" || version == "0.5" || version == "0.6") && + element->get_name() == "random" && + value_node->link_name(i) == "loop") + continue; + + error(element, strprintf(_("<%s> is missing link %d (%s)"), + element->get_name().c_str(), + i, + value_node->link_name(i).c_str())); + return 0; + } + } + + // pre 0.4 canvases had *calctangent outputs scaled down by 0.5 for some reason + if (element->get_name() == "blinecalctangent" || element->get_name() == "segcalctangent") + { + if (version == "0.1" || version == "0.2" || version == "0.3") + { + handle scale_value_node=LinkableValueNode::create("scale",type); + scale_value_node->set_link(scale_value_node->get_link_index_from_name("link"), value_node); + scale_value_node->set_link(scale_value_node->get_link_index_from_name("scalar"), ValueNode_Const::create(Real(0.5))); + value_node = scale_value_node; + } + } + + return value_node; +} + +// This will also parse a bline +handle +CanvasParser::parse_dynamic_list(xmlpp::Element *element,Canvas::Handle canvas) +{ + assert(element->get_name()=="dynamic_list" || element->get_name()=="bline"); + + const float fps(canvas?canvas->rend_desc().get_frame_rate():0); + + if(!element->get_attribute("type")) + { + error(element,"Missing attribute \"type\" in "); + return handle(); + } + + ValueBase::Type type=ValueBase::ident_type(element->get_attribute("type")->get_value()); + + if(!type) + { + error(element,"Bad type in "); + return handle(); + } + + handle value_node; + handle bline_value_node; + + if(element->get_name()=="bline") + { + value_node=bline_value_node=ValueNode_BLine::create(); + if(element->get_attribute("loop")) + { + String loop=element->get_attribute("loop")->get_value(); + if(loop=="true" || loop=="1" || loop=="TRUE" || loop=="True") + bline_value_node->set_loop(true); + else + bline_value_node->set_loop(false); + } + + } + else + value_node=ValueNode_DynamicList::create(type); + + if(!value_node) + { + error(element,strprintf(_("Unable to create "))); + return handle(); + } + + value_node->set_root_canvas(canvas->get_root()); + + xmlpp::Element::NodeList list = element->get_children(); + for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) + { + xmlpp::Element *child(dynamic_cast(*iter)); + if(!child) + continue; + else + if(child->get_name()=="entry") + { + ValueNode_DynamicList::ListEntry list_entry; + + // Parse begin/end waypoints + { + typedef synfig::ValueNode_DynamicList::ListEntry::Activepoint Activepoint; + typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; + + String begin_sequence; + String end_sequence; + + ActivepointList &timing_info(list_entry.timing_info); + + if(child->get_attribute("begin")) + begin_sequence=child->get_attribute("begin")->get_value(); + + if(child->get_attribute("on")) + begin_sequence=child->get_attribute("on")->get_value(); + + if(child->get_attribute("end")) + end_sequence=child->get_attribute("end")->get_value(); + + if(child->get_attribute("off")) + end_sequence=child->get_attribute("off")->get_value(); + + // clear out any auto-start + if(!begin_sequence.empty()) + timing_info.clear(); + + //! \optimize + while(!begin_sequence.empty()) + { + String::iterator iter(find(begin_sequence.begin(),begin_sequence.end(),',')); + String timecode(begin_sequence.begin(), iter); + int priority=0; + + // skip whitespace before checking for a priority + while (isspace(timecode[0])) + timecode=timecode.substr(1); + + // If there is a priority, then grab it and remove + // it from the timecode + if(timecode[0]=='p') + { + //priority=timecode[1]-'0'; + //timecode=String(timecode.begin()+3,timecode.end()); + int space=timecode.find_first_of(' '); + priority=atoi(String(timecode,1,space-1).c_str()); + timecode=String(timecode.begin()+space+1,timecode.end()); + //synfig::info("priority: %d timecode: %s",priority,timecode.c_str()); + } + + timing_info.push_back( + Activepoint( + Time( + timecode, + fps + ), + true, // Mark as a "on" activepoint + priority + ) + ); + + if(iter==begin_sequence.end()) + begin_sequence.clear(); + else + begin_sequence=String(iter+1,begin_sequence.end()); + } + + //! \optimize + while(!end_sequence.empty()) + { + String::iterator iter(find(end_sequence.begin(),end_sequence.end(),',')); + String timecode(end_sequence.begin(), iter); + int priority=0; + + // skip whitespace before checking for a priority + while (isspace(timecode[0])) + timecode=timecode.substr(1); + + // If there is a priority, then grab it and remove + // it from the timecode + if(timecode[0]=='p') + { + //priority=timecode[1]-'0'; + //timecode=String(timecode.begin()+3,timecode.end()); + int space=timecode.find_first_of(' '); + priority=atoi(String(timecode,1,space-1).c_str()); + timecode=String(timecode.begin()+space+1,timecode.end()); + //synfig::info("priority: %d timecode: %s",priority,timecode.c_str()); + } + + timing_info.push_back( + Activepoint( + Time( + timecode, + fps + ), + false, // Mark as a "off" activepoint + priority + ) + ); + if(iter==end_sequence.end()) + end_sequence.clear(); + else + end_sequence=String(iter+1,end_sequence.end()); + } + + timing_info.sort(); + } + + if(child->get_attribute("use")) + { + // \todo does this need to be able to read 'use="canvas"', like waypoints can now? (see 'surefind_canvas' in this file) + string id=child->get_attribute("use")->get_value(); + try + { + list_entry.value_node=canvas->surefind_value_node(id); + } + catch(Exception::IDNotFound) + { + error(child,"\"use\" attribute in references unknown ID -- "+id); + continue; + } + } + else + { + xmlpp::Element::NodeList list = child->get_children(); + xmlpp::Element::NodeList::iterator iter; + + // Search for the first non-text XML element + for(iter = list.begin(); iter != list.end(); ++iter) + if(dynamic_cast(*iter)) break; + + if(iter==list.end()) + { + error(child,strprintf(_(" is missing its contents or missing \"use\" element"))); + continue; + } + + list_entry.value_node=parse_value_node(dynamic_cast(*iter),canvas); + + if(!list_entry.value_node) + error((*iter),"Parse of ValueNode failed"); + + // \todo do a search for more elements and warn if they are found + + } + + value_node->add(list_entry); + value_node->set_link(value_node->link_count()-1,list_entry.value_node); + } + else + error_unexpected_element(child,child->get_name()); + } + return value_node; +} + +handle +CanvasParser::parse_value_node(xmlpp::Element *element,Canvas::Handle canvas) +{ + handle value_node; + assert(element); + + GUID guid; + + if(element->get_attribute("guid")) + { + guid=GUID(element->get_attribute("guid")->get_value())^canvas->get_root()->get_guid(); + value_node=guid_cast(guid); + if(value_node) + return value_node; + } + + // If ValueBase::ident_type() recognizes the name, then we know it's a ValueBase + if(element->get_name()!="canvas" && ValueBase::ident_type(element->get_name())) + { + ValueBase data=parse_value(element,canvas); + + if(!data.is_valid()) + { + error(element,strprintf(_("Bad data in <%s>"),element->get_name().c_str())); + return value_node; + } + + // We want to convert this ValueBase into a + // ValueNode_Const. That way, we can treat the + // ID like any other Datanode. Think of this + // as a shorthand for creating constant ValueNodes. + + value_node=ValueNode_Const::create(data); + } + else + if(element->get_name()=="hermite" || element->get_name()=="animated") + value_node=parse_animated(element,canvas); + else + if(element->get_name()=="dynamic_list") + value_node=parse_dynamic_list(element,canvas); + else + if(element->get_name()=="bline") // This is not a typo. The dynamic list parser will parse a bline. + value_node=parse_dynamic_list(element,canvas); + else + if(LinkableValueNode::book().count(element->get_name())) + { + value_node=parse_linkable_value_node(element,canvas); + if (!value_node) value_node = PlaceholderValueNode::create(); + } + else + if(element->get_name()=="canvas") + value_node=ValueNode_Const::create(parse_canvas(element,canvas,true)); + else + { + error_unexpected_element(element,element->get_name()); + error(element, strprintf(_("Expected a ValueNode. Refer to '%s'"), + VALUENODE_COMPATIBILITY_URL)); + value_node=PlaceholderValueNode::create(); + } + + value_node->set_root_canvas(canvas->get_root()); + + // If we were successful, and our element has + // an ID attribute, go ahead and add it to the + // value_node list + if(value_node && element->get_attribute("id")) + { + string id=element->get_attribute("id")->get_value(); + + //value_node->set_id(id); + + // If there is already a value_node in the list + // with the same ID, then that is an error + try { canvas->add_value_node(value_node,id); } + catch(Exception::BadLinkName) + { + warning(element,strprintf(_("Bad ID \"%s\""),id.c_str())); + return value_node; + } + catch(Exception::IDAlreadyExists) + { + error(element,strprintf(_("Duplicate ID \"%s\""),id.c_str())); + return value_node; + } + catch(...) + { + error(element,strprintf(_("Unknown Exception thrown when adding ValueNode \"%s\""),id.c_str())); + throw; + } + } + value_node->set_guid(guid); + return value_node; +} + +void +CanvasParser::parse_canvas_defs(xmlpp::Element *element,Canvas::Handle canvas) +{ + assert(element->get_name()=="defs"); + xmlpp::Element::NodeList list = element->get_children(); + for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) + { + xmlpp::Element *child(dynamic_cast(*iter)); + if(!child) + continue; + else + if(child->get_name()=="canvas") + parse_canvas(child, canvas); + else + parse_value_node(child,canvas); + } +} + +Layer::Handle +CanvasParser::parse_layer(xmlpp::Element *element,Canvas::Handle canvas) +{ + + assert(element->get_name()=="layer"); + Layer::Handle layer; + + if(!element->get_attribute("type")) + { + error(element,_("Missing \"type\" attribute to \"layer\" element")); + return Layer::Handle(); + } + + layer=Layer::create(element->get_attribute("type")->get_value()); + layer->set_canvas(canvas); + + if(element->get_attribute("group")) + { + layer->add_to_group( + element->get_attribute("group")->get_value() + ); + } + + // Handle the version attribute + if(element->get_attribute("version")) + { + String version(element->get_attribute("version")->get_value()); + if(version>layer->get_version()) + warning(element,_("Installed layer version is smaller than layer version in file")); + if(version!=layer->get_version()) + layer->set_version(version); + } + + // Handle the description + if(element->get_attribute("desc")) + layer->set_description(element->get_attribute("desc")->get_value()); + + if(element->get_attribute("active")) + layer->set_active(element->get_attribute("active")->get_value()=="false"?false:true); + + xmlpp::Element::NodeList list = element->get_children(); + for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) + { + xmlpp::Element *child(dynamic_cast(*iter)); + if(!child) + continue; + else + if(child->get_name()=="name") + warning(child,_(" entry for is not yet supported. Ignoring...")); + else + if(child->get_name()=="desc") + warning(child,_(" entry for is not yet supported. Ignoring...")); + else + if(child->get_name()=="param") + { + xmlpp::Element::NodeList list = child->get_children(); + + if(!child->get_attribute("name")) + { + error(child,_("Missing \"name\" attribute for .")); + continue; + } + + String param_name=child->get_attribute("name")->get_value(); + + // SVN r2013 and r2014 renamed all 'pos' and 'offset' parameters to 'origin' + // 'pos' and 'offset' will appear in old .sif files; handle them correctly + if (param_name == "pos" || param_name == "offset") + param_name = "origin"; + + if(child->get_attribute("use")) + { + // If the "use" attribute is used, then the + // element should be empty. Warn the user if + // we find otherwise. + if(!list.empty()) + warning(child,_("Found \"use\" attribute for , but it wasn't empty. Ignoring contents...")); + + String str= child->get_attribute("use")->get_value(); + + if (str.empty()) + error(child,_("Empty use=\"\" value in ")); + else if(layer->get_param(param_name).get_type()==ValueBase::TYPE_CANVAS) + { + String warnings; + Canvas::Handle c(canvas->surefind_canvas(str, warnings)); + warnings_text += warnings; + if(!c) error((*iter),strprintf(_("Failed to load subcanvas '%s'"), str.c_str())); + if(!layer->set_param(param_name,c)) + error((*iter),_("Layer rejected canvas link")); + } + else + try + { + handle value_node=canvas->surefind_value_node(str); + + // Assign the value_node to the dynamic parameter list + if (param_name == "segment_list" && (layer->get_name() == "region" || layer->get_name() == "outline")) + { + synfig::warning("%s: Updated valuenode connection to use the \"bline\" parameter instead of \"segment_list\".", + layer->get_name().c_str()); + param_name = "bline"; + } + layer->connect_dynamic_param(param_name,value_node); + } + catch(Exception::IDNotFound) + { + error(child,strprintf(_("Unknown ID (%s) referenced in "),str.c_str())); + } + + continue; + } + + xmlpp::Element::NodeList::iterator iter; + + // Search for the first non-text XML element + for(iter = list.begin(); iter != list.end(); ++iter) + if(dynamic_cast(*iter)) + break; + //if(!(!dynamic_cast(*iter) && (*iter)->get_name()=="text"||(*iter)->get_name()=="comment" )) break; + + if(iter==list.end()) + { + error(child,_(" is either missing its contents, or missing a \"use\" attribute.")); + continue; + } + + // If we recognize the element name as a + // ValueBase, then treat is at one + if(/*(*iter)->get_name()!="canvas" && */ValueBase::ident_type((*iter)->get_name()) && !dynamic_cast(*iter)->get_attribute("guid")) + { + ValueBase data=parse_value(dynamic_cast(*iter),canvas); + + if(!data.is_valid()) + { + error((*iter),_("Bad data for ")); + continue; + } + + // Set the layer's parameter, and make sure that + // the layer liked it + if(!layer->set_param(param_name,data)) + { + warning((*iter),strprintf(_("Layer '%s' rejected value for parameter '%s'"), + element->get_attribute("type")->get_value().c_str(), + param_name.c_str())); + continue; + } + } + else // ... otherwise, we assume that it is a ValueNode + { + handle value_node=parse_value_node(dynamic_cast(*iter),canvas); + + if(!value_node) + { + error((*iter),_("Bad data for ")); + continue; + } + + // Assign the value_node to the dynamic parameter list + layer->connect_dynamic_param(param_name,value_node); + } + + // Warn if there is trash after the param value + for(iter++; iter != list.end(); ++iter) + if(dynamic_cast(*iter)) + warning((*iter),strprintf(_("Unexpected element <%s> after data, ignoring..."),(*iter)->get_name().c_str())); + continue; + } + else + error_unexpected_element(child,child->get_name()); + } + + layer->reset_version(); + return layer; +} + +Canvas::Handle +CanvasParser::parse_canvas(xmlpp::Element *element,Canvas::Handle parent,bool inline_, String filename) +{ + + if(element->get_name()!="canvas") + { + error_unexpected_element(element,element->get_name(),"canvas"); + return Canvas::Handle(); + } + Canvas::Handle canvas; + + + + if(parent && (element->get_attribute("id") || inline_)) + { + if(inline_) + { + canvas=Canvas::create_inline(parent); + } + else + { + try + { + String warnings; + canvas=parent->find_canvas(element->get_attribute("id")->get_value(), warnings); + warnings_text += warnings; + } + catch(...) + { + canvas=parent->new_child_canvas(element->get_attribute("id")->get_value()); + } + } + canvas->rend_desc().clear_flags(); + } + else + { + canvas=Canvas::create(); + if(filename=="/dev/stdin") + canvas->set_file_name("./stdin.sif"); + else + canvas->set_file_name(filename); + canvas->rend_desc().clear_flags(); + } + + if(element->get_attribute("guid")) + { + GUID guid(element->get_attribute("guid")->get_value()); + if(guid_cast(guid)) + return guid_cast(guid); + else + canvas->set_guid(guid); + } + + if(element->get_attribute("version")) + canvas->set_version(element->get_attribute("version")->get_value()); + else if(parent) + canvas->set_version(parent->get_version()); + + if(element->get_attribute("width")) + { + int width = atoi(element->get_attribute("width")->get_value().c_str()); + if (width < 1) + fatal_error(element, _("Canvas with width or height less than one is not allowed")); + canvas->rend_desc().set_w(width); + } + + if(element->get_attribute("height")) + { + int height = atoi(element->get_attribute("height")->get_value().c_str()); + if (height < 1) + fatal_error(element, _("Canvas with width or height less than one is not allowed")); + canvas->rend_desc().set_h(height); + } + + if(element->get_attribute("xres")) + canvas->rend_desc().set_x_res(atof(element->get_attribute("xres")->get_value().c_str())); + + if(element->get_attribute("yres")) + canvas->rend_desc().set_y_res(atof(element->get_attribute("yres")->get_value().c_str())); + + + if(element->get_attribute("fps")) + canvas->rend_desc().set_frame_rate(atof(element->get_attribute("fps")->get_value().c_str())); + + if(element->get_attribute("start-time")) + canvas->rend_desc().set_time_start(Time(element->get_attribute("start-time")->get_value(),canvas->rend_desc().get_frame_rate())); + + if(element->get_attribute("begin-time")) + canvas->rend_desc().set_time_start(Time(element->get_attribute("begin-time")->get_value(),canvas->rend_desc().get_frame_rate())); + + if(element->get_attribute("end-time")) + canvas->rend_desc().set_time_end(Time(element->get_attribute("end-time")->get_value(),canvas->rend_desc().get_frame_rate())); + + if(element->get_attribute("antialias")) + canvas->rend_desc().set_antialias(atoi(element->get_attribute("antialias")->get_value().c_str())); + + if(element->get_attribute("view-box")) + { + string values=element->get_attribute("view-box")->get_value(); + Vector + tl, + br; + tl[0]=atof(string(values.data(),values.find(' ')).c_str()); + values=string(values.begin()+values.find(' ')+1,values.end()); + tl[1]=atof(string(values.data(),values.find(' ')).c_str()); + values=string(values.begin()+values.find(' ')+1,values.end()); + br[0]=atof(string(values.data(),values.find(' ')).c_str()); + values=string(values.begin()+values.find(' ')+1,values.end()); + br[1]=atof(values.c_str()); + + canvas->rend_desc().set_tl(tl); + canvas->rend_desc().set_br(br); + } + + if(element->get_attribute("bgcolor")) + { + string values=element->get_attribute("bgcolor")->get_value(); + Color bg; + + bg.set_r(atof(string(values.data(),values.find(' ')).c_str())); + values=string(values.begin()+values.find(' ')+1,values.end()); + + bg.set_g(atof(string(values.data(),values.find(' ')).c_str())); + values=string(values.begin()+values.find(' ')+1,values.end()); + + bg.set_b(atof(string(values.data(),values.find(' ')).c_str())); + values=string(values.begin()+values.find(' ')+1,values.end()); + + bg.set_a(atof(values.c_str())); + + canvas->rend_desc().set_bg_color(bg); + } + + if(element->get_attribute("focus")) + { + string values=element->get_attribute("focus")->get_value(); + Vector focus; + + focus[0]=atof(string(values.data(),values.find(' ')).c_str()); + values=string(values.begin()+values.find(' ')+1,values.end()); + focus[1]=atof(values.c_str()); + + canvas->rend_desc().set_focus(focus); + } + + canvas->rend_desc().set_flags(RendDesc::PX_ASPECT|RendDesc::IM_SPAN); + + xmlpp::Element::NodeList list = element->get_children(); + for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) + { + xmlpp::Element *child(dynamic_cast(*iter)); + if(child) + { + if(child->get_name()=="defs") + { + if(canvas->is_inline()) + error(child,_("Inline canvas cannot have a section")); + parse_canvas_defs(child, canvas); + } + else + if(child->get_name()=="keyframe") + { + if(canvas->is_inline()) + { + warning(child,_("Inline canvas cannot have keyframes")); + continue; + } + + canvas->keyframe_list().add(parse_keyframe(child,canvas)); + canvas->keyframe_list().sync(); + } + else + if(child->get_name()=="meta") + { + if(canvas->is_inline()) + { + warning(child,_("Inline canvases cannot have metadata")); + continue; + } + + String name,content; + + if(!child->get_attribute("name")) + { + warning(child,_(" must have a name")); + continue; + } + + if(!child->get_attribute("content")) + { + warning(child,_(" must have content")); + continue; + } + + canvas->set_meta_data(child->get_attribute("name")->get_value(),child->get_attribute("content")->get_value()); + } + else if(child->get_name()=="name") + { + xmlpp::Element::NodeList list = child->get_children(); + + // If we don't have any name, warn + if(list.empty()) + warning(child,_("blank \"name\" entity")); + + string tmp; + for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) + if(dynamic_cast(*iter))tmp+=dynamic_cast(*iter)->get_content(); + canvas->set_name(tmp); + } + else + if(child->get_name()=="desc") + { + + xmlpp::Element::NodeList list = child->get_children(); + + // If we don't have any description, warn + if(list.empty()) + warning(child,_("blank \"desc\" entity")); + + string tmp; + for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) + if(dynamic_cast(*iter))tmp+=dynamic_cast(*iter)->get_content(); + canvas->set_description(tmp); + } + else + if(child->get_name()=="author") + { + + xmlpp::Element::NodeList list = child->get_children(); + + // If we don't have any description, warn + if(list.empty()) + warning(child,_("blank \"author\" entity")); + + string tmp; + for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) + if(dynamic_cast(*iter))tmp+=dynamic_cast(*iter)->get_content(); + canvas->set_author(tmp); + } + else + if(child->get_name()=="layer") + { + //if(canvas->is_inline()) + // canvas->push_front(parse_layer(child,canvas->parent())); + //else + canvas->push_front(parse_layer(child,canvas)); + } + else + error_unexpected_element(child,child->get_name()); + } +// else +// if((child->get_name()=="text"||child->get_name()=="comment") && child->has_child_text()) +// continue; + } + + if(canvas->value_node_list().placeholder_count()) + { + String nodes; + for (ValueNodeList::const_iterator iter = canvas->value_node_list().begin(); iter != canvas->value_node_list().end(); iter++) + if(PlaceholderValueNode::Handle::cast_dynamic(*iter)) + { + if (nodes != "") nodes += ", "; + nodes += "'" + (*iter)->get_id() + "'"; + } + error(element,strprintf(_("Canvas '%s' has undefined %s: %s"), + canvas->get_id().c_str(), + canvas->value_node_list().placeholder_count() == 1 ? _("ValueNode") : _("ValueNodes"), + nodes.c_str())); + } + + canvas->set_version(CURRENT_CANVAS_VERSION); + return canvas; +} + +void +CanvasParser::register_canvas_in_map(Canvas::Handle canvas, String as) +{ + get_open_canvas_map()[etl::absolute_path(as)]=canvas; + canvas->signal_deleted().connect(sigc::bind(sigc::ptr_fun(_remove_from_open_canvas_map),canvas.get())); + canvas->signal_file_name_changed().connect(sigc::bind(sigc::ptr_fun(_canvas_file_name_changed),canvas.get())); +} + +#ifdef _DEBUG +void +CanvasParser::show_canvas_map(String file, int line, String text) +{ + return; + printf(" .-----\n | %s:%d %s\n", file.c_str(), line, text.c_str()); + std::map > canvas_map(synfig::get_open_canvas_map()); + std::map >::iterator iter; + for (iter = canvas_map.begin(); iter != canvas_map.end(); iter++) + { + synfig::String first(iter->first); + etl::loose_handle second(iter->second); + printf(" | %40s : %lx (%d)\n", first.c_str(), ulong(&*second), second->count()); + } + printf(" `-----\n\n"); +} +#endif // _DEBUG + +Canvas::Handle +CanvasParser::parse_from_file_as(const String &file_,const String &as_,String &errors) +{ + ChangeLocale change_locale(LC_NUMERIC, "C"); + String file(unix_to_local_path(file_)); + String as(unix_to_local_path(as_)); + + try + { + if(get_open_canvas_map().count(etl::absolute_path(as))) + return get_open_canvas_map()[etl::absolute_path(as)]; + + filename=as; + total_warnings_=0; + xmlpp::DomParser parser(file); + if(parser) + { + Canvas::Handle canvas(parse_canvas(parser.get_document()->get_root_node(),0,false,as)); + if (!canvas) return canvas; + register_canvas_in_map(canvas, as); + + const ValueNodeList& value_node_list(canvas->value_node_list()); + + again: + ValueNodeList::const_iterator iter; + for(iter=value_node_list.begin();iter!=value_node_list.end();++iter) + { + ValueNode::Handle value_node(*iter); + if(value_node->is_exported() && value_node->get_id().find("Unnamed")==0) + { + canvas->remove_value_node(value_node); + goto again; + } + } + + return canvas; + } + } + catch(Exception::BadLinkName) { synfig::error("BadLinkName Thrown"); } + catch(Exception::BadType) { synfig::error("BadType Thrown"); } + catch(Exception::FileNotFound) { synfig::error("FileNotFound Thrown"); } + catch(Exception::IDNotFound) { synfig::error("IDNotFound Thrown"); } + catch(Exception::IDAlreadyExists) { synfig::error("IDAlreadyExists Thrown"); } + catch(xmlpp::internal_error x) + { + if (!strcmp(x.what(), "Couldn't create parsing context")) + throw runtime_error(String(" * ") + _("Can't open file") + " \"" + file + "\""); + throw; + } + catch(const std::exception& ex) + { + synfig::error("Standard Exception: "+String(ex.what())); + errors = ex.what(); + return Canvas::Handle(); + } + catch(const String& str) + { + cerr<value_node_list()); + + again: + ValueNodeList::const_iterator iter; + for(iter=value_node_list.begin();iter!=value_node_list.end();++iter) + { + ValueNode::Handle value_node(*iter); + if(value_node->is_exported() && value_node->get_id().find("Unnamed")==0) + { + canvas->remove_value_node(value_node); + goto again; + } + } + + return canvas; + } + } + catch(Exception::BadLinkName) { synfig::error("BadLinkName Thrown"); } + catch(Exception::BadType) { synfig::error("BadType Thrown"); } + catch(Exception::FileNotFound) { synfig::error("FileNotFound Thrown"); } + catch(Exception::IDNotFound) { synfig::error("IDNotFound Thrown"); } + catch(Exception::IDAlreadyExists) { synfig::error("IDAlreadyExists Thrown"); } + catch(xmlpp::internal_error x) + { + if (!strcmp(x.what(), "Couldn't create parsing context")) + throw runtime_error(String(" * ") + _("Can't open file") + " \"" + "\""); + throw; + } + catch(const std::exception& ex) + { + synfig::error("Standard Exception: "+String(ex.what())); + errors = ex.what(); + return Canvas::Handle(); + } + catch(const String& str) + { + cerr< loading_; + +private: + + // Error/Warning handling functions + + void error(xmlpp::Node *node,const String &text); + void fatal_error(xmlpp::Node *node,const String &text); + void warning(xmlpp::Node *node,const String &text); + void error_unexpected_element(xmlpp::Node *node,const String &got, const String &expected); + void error_unexpected_element(xmlpp::Node *node,const String &got); + + // Parsing Functions + + Canvas::Handle parse_canvas(xmlpp::Element *node,Canvas::Handle parent=0,bool inline_=false, String path="."); + void parse_canvas_defs(xmlpp::Element *node,Canvas::Handle canvas); + etl::handle parse_layer(xmlpp::Element *node,Canvas::Handle canvas); + ValueBase parse_value(xmlpp::Element *node,Canvas::Handle canvas); + etl::handle parse_value_node(xmlpp::Element *node,Canvas::Handle canvas); + + // ValueBase Parsing Functions + + Real parse_real(xmlpp::Element *node); + Time parse_time(xmlpp::Element *node,Canvas::Handle canvas); + int parse_integer(xmlpp::Element *node); + Vector parse_vector(xmlpp::Element *node); + Color parse_color(xmlpp::Element *node); + Angle parse_angle(xmlpp::Element *node); + String parse_string(xmlpp::Element *node); + bool parse_bool(xmlpp::Element *node); + Segment parse_segment(xmlpp::Element *node); + ValueBase parse_list(xmlpp::Element *node,Canvas::Handle canvas); + Gradient parse_gradient(xmlpp::Element *node); + BLinePoint parse_bline_point(xmlpp::Element *node); + + Keyframe parse_keyframe(xmlpp::Element *node,Canvas::Handle canvas); + + // ValueNode Parsing Functions + + etl::handle parse_animated(xmlpp::Element *node,Canvas::Handle canvas); + etl::handle parse_subtract(xmlpp::Element *node,Canvas::Handle canvas); + etl::handle parse_linkable_value_node(xmlpp::Element *node,Canvas::Handle canvas); + etl::handle parse_dynamic_list(xmlpp::Element *node,Canvas::Handle canvas); + +}; // END of CanvasParser + +/* === E X T E R N S ======================================================= */ + +//! Loads a canvas from \a filename +/*! \return The Canvas's handle on success, an empty handle on failure */ +extern Canvas::Handle open_canvas(xmlpp::Element* node,String &errors,String &warnings); +extern Canvas::Handle open_canvas(const String &filename,String &errors,String &warnings); +extern Canvas::Handle open_canvas_as(const String &filename,const String &as,String &errors,String &warnings); + +std::map >& get_open_canvas_map(); + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/main.cpp b/synfig-core/src/synfig/main.cpp new file mode 100644 index 0000000..9e0a56a --- /dev/null +++ b/synfig-core/src/synfig/main.cpp @@ -0,0 +1,379 @@ +/* === S Y N F I G ========================================================= */ +/*! \file synfig/main.cpp +** \brief \writeme +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +//#define SYNFIG_NO_ANGLE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "version.h" +#include "general.h" +#include "module.h" +#include +#include +#include +#include "target.h" +#include +#include "listimporter.h" +#include "color.h" +#include "vector.h" +#include +#include "layer.h" +#include "valuenode.h" + +#include "main.h" +#include "loadcanvas.h" + +#include "guid.h" + +#include "mutex.h" + +#ifdef HAVE_SIGNAL_H +#include +#endif + +#endif + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +#define MODULE_LIST_FILENAME "synfig_modules.cfg" + +/* === S T A T I C S ======================================================= */ + +static etl::reference_counter synfig_ref_count_(0); + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +const char * +synfig::get_version() +{ +#ifdef VERSION + return VERSION; +#else + return "Unknown"; +#endif +} + +const char * +synfig::get_build_date() +{ + return __DATE__; +} + +bool +synfig::check_version_(int version,int vec_size, int color_size,int canvas_size,int layer_size) +{ + bool ret=true; + + if(version!=SYNFIG_LIBRARY_VERSION) + { + synfig::error(_("API Version mismatch (LIB:%d, PROG:%d)"),SYNFIG_LIBRARY_VERSION,version); + ret=false; + } + if(vec_size!=sizeof(Vector)) + { + synfig::error(_("Size of Vector mismatch (app:%d, lib:%d)"),vec_size,sizeof(Vector)); + ret=false; + } + if(color_size!=sizeof(Color)) + { + synfig::error(_("Size of Color mismatch (app:%d, lib:%d)"),color_size,sizeof(Color)); + ret=false; + } + if(canvas_size!=sizeof(Canvas)) + { + synfig::error(_("Size of Canvas mismatch (app:%d, lib:%d)"),canvas_size,sizeof(Canvas)); + ret=false; + } + if(layer_size!=sizeof(Layer)) + { + synfig::error(_("Size of Layer mismatch (app:%d, lib:%d)"),layer_size,sizeof(Layer)); + ret=false; + } + + return ret; +} + +static void broken_pipe_signal (int /*sig*/) { + synfig::warning("Broken Pipe..."); +} + +bool retrieve_modules_to_load(String filename,std::list &modules_to_load) +{ + std::ifstream file(filename.c_str()); + + if(!file) + { + // warning("Cannot open "+filename); + return false; + } + + while(file) + { + String modulename; + getline(file,modulename); + if(!modulename.empty() && find(modules_to_load.begin(),modules_to_load.end(),modulename)==modules_to_load.end()) + modules_to_load.push_back(modulename); + } + + return true; +} + +synfig::Main::Main(const synfig::String& basepath,ProgressCallback *cb): + ref_count_(synfig_ref_count_) +{ + if(ref_count_.count()) + return; + + synfig_ref_count_.reset(); + ref_count_=synfig_ref_count_; + + // Add initialization after this point + +#ifdef ENABLE_NLS + bindtextdomain("synfig", LOCALEDIR); + bind_textdomain_codeset("synfig", "UTF-8"); +#endif + + String prefix=basepath+"/.."; + unsigned int i; +#ifdef _DEBUG + std::set_terminate(__gnu_cxx::__verbose_terminate_handler); +#endif + +#if defined(HAVE_SIGNAL_H) && defined(SIGPIPE) + signal(SIGPIPE, broken_pipe_signal); +#endif + + //_config_search_path=new vector"string.h"(); + + // Init the subsystems + if(cb)cb->amount_complete(0, 100); + if(cb)cb->task(_("Starting Subsystem \"Modules\"")); + if(!Module::subsys_init(prefix)) + throw std::runtime_error(_("Unable to initialize subsystem \"Module\"")); + + if(cb)cb->task(_("Starting Subsystem \"Layers\"")); + if(!Layer::subsys_init()) + { + Module::subsys_stop(); + throw std::runtime_error(_("Unable to initialize subsystem \"Layers\"")); + } + + if(cb)cb->task(_("Starting Subsystem \"Targets\"")); + if(!Target::subsys_init()) + { + Layer::subsys_stop(); + Module::subsys_stop(); + throw std::runtime_error(_("Unable to initialize subsystem \"Targets\"")); + } + + if(cb)cb->task(_("Starting Subsystem \"Importers\"")); + if(!Importer::subsys_init()) + { + Target::subsys_stop(); + Layer::subsys_stop(); + Module::subsys_stop(); + throw std::runtime_error(_("Unable to initialize subsystem \"Importers\"")); + } + + if(cb)cb->task(_("Starting Subsystem \"ValueNodes\"")); + if(!ValueNode::subsys_init()) + { + Importer::subsys_stop(); + Target::subsys_stop(); + Layer::subsys_stop(); + Module::subsys_stop(); + throw std::runtime_error(_("Unable to initialize subsystem \"ValueNodes\"")); + } + + // Load up the list importer + Importer::book()[String("lst")]=ListImporter::create; + + // Load up the modules + std::list modules_to_load; + std::vector locations; + + if(getenv("SYNFIG_MODULE_LIST")) + locations.push_back(getenv("SYNFIG_MODULE_LIST")); + else + { + locations.push_back("./"MODULE_LIST_FILENAME); + locations.push_back("../etc/"MODULE_LIST_FILENAME); + if(getenv("HOME")) + locations.push_back(strprintf("%s/.synfig/%s", getenv("HOME"), MODULE_LIST_FILENAME)); + #ifdef SYSCONFDIR + locations.push_back(SYSCONFDIR"/"MODULE_LIST_FILENAME); + #endif + locations.push_back(prefix+"/etc/"+MODULE_LIST_FILENAME); + locations.push_back("/usr/local/etc/"MODULE_LIST_FILENAME); + #ifdef __APPLE__ + locations.push_back("/Library/Frameworks/synfig.framework/Resources/"MODULE_LIST_FILENAME); + locations.push_back("/Library/Synfig/"MODULE_LIST_FILENAME); + if(getenv("HOME")) + locations.push_back(strprintf("%s/Library/Synfig/%s", getenv("HOME"), MODULE_LIST_FILENAME)); + #endif + #ifdef WIN32 + locations.push_back("C:\\Program Files\\Synfig\\etc\\"MODULE_LIST_FILENAME); + #endif + } + + for(i=0;itask(strprintf(_("Loading modules from %s"),locations[i].c_str())); + break; + } + + if (i == locations.size()) + { + Importer::subsys_stop(); + Target::subsys_stop(); + Layer::subsys_stop(); + Module::subsys_stop(); + throw std::runtime_error(strprintf(_("Unable to open module list file '%s'"), MODULE_LIST_FILENAME)); + } + + std::list::iterator iter; + + Module::register_default_modules(cb); + + for(i=0,iter=modules_to_load.begin();iter!=modules_to_load.end();++iter,i++) + { + Module::Register(*iter,cb); + if(cb)cb->amount_complete((i+1)*100,modules_to_load.size()*100); + } + + if(cb)cb->amount_complete(100, 100); + if(cb)cb->task(_("DONE")); +} + +synfig::Main::~Main() +{ + ref_count_.detach(); + if(!synfig_ref_count_.unique()) + return; + synfig_ref_count_.detach(); + + // Add deinitialization after this point + + if(get_open_canvas_map().size()) + { + synfig::warning("Canvases still open!"); + std::map >::iterator iter; + for(iter=get_open_canvas_map().begin();iter!=get_open_canvas_map().end();++iter) + { + synfig::warning("%s: count()=%d",iter->first.c_str(), iter->second.count()); + } + } + + // synfig::info("ValueNode::subsys_stop()"); + ValueNode::subsys_stop(); + // synfig::info("Importer::subsys_stop()"); + Importer::subsys_stop(); + // synfig::info("Target::subsys_stop()"); + Target::subsys_stop(); + // synfig::info("Layer::subsys_stop()"); + Layer::subsys_stop(); + /*! \todo For some reason, uncommenting the next line will cause things to crash. + This needs to be looked into at some point. */ + // synfig::info("Module::subsys_stop()"); + // Module::subsys_stop(); + // synfig::info("Exiting"); + +#if defined(HAVE_SIGNAL_H) && defined(SIGPIPE) + signal(SIGPIPE, SIG_DFL); +#endif +} + +static const String +current_time() +{ + const int buflen = 50; + time_t t; + struct tm *lt; + char b[buflen]; + time(&t); + lt = localtime(&t); + strftime(b, buflen, " [%X] ", lt); + return String(b); +} + +void +synfig::error(const char *format,...) +{ + va_list args; + va_start(args,format); + error(vstrprintf(format,args)); +} + +void +synfig::error(const String &str) +{ + static Mutex mutex; Mutex::Lock lock(mutex); + cerr<<"synfig("< +#include "general.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/*! \class synfig::Main +** \brief \writeme +** +** \writeme +*/ +class Main +{ + etl::reference_counter ref_count_; +public: + Main(const synfig::String& basepath,ProgressCallback *cb=0); + ~Main(); + + const etl::reference_counter& ref_count()const { return ref_count_; } +}; // END of class Main + +}; // END if namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/matrix.h b/synfig-core/src/synfig/matrix.h new file mode 100644 index 0000000..9d83dd1 --- /dev/null +++ b/synfig-core/src/synfig/matrix.h @@ -0,0 +1,229 @@ +/* === S Y N F I G ========================================================= */ +/*! \file matrix.h +** \brief Matrix definitions for 2D affine transformations +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Carlos López +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_MATRIX_H +#define __SYNFIG_MATRIX_H + +/* === H E A D E R S ======================================================= */ + +#include "angle.h" +#include "real.h" +#include "vector.h" +#include + +/* === M A C R O S ========================================================= */ + + +#ifdef WIN32 +#include +#ifndef isnan +extern "C" { int _isnan(double x); } +#define isnan _isnan +#endif +#endif + +// For some reason isnan() isn't working on macosx any more. +// This is a quick fix. +#if defined(__APPLE__) && !defined(SYNFIG_ISNAN_FIX) +#ifdef isnan +#undef isnan +#endif +inline bool isnan(double x) { return x != x; } +inline bool isnan(float x) { return x != x; } +#define SYNFIG_ISNAN_FIX 1 +#endif + + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/*! \class Matrix +** \todo writeme +*/ +class Matrix +{ +public: + typedef Real value_type; + +private: + //! The matrix array + value_type m00, m01, m02; + value_type m10, m11, m12; + value_type m20, m21, m22; + // Index convention + // 00 01 02 + // 10 11 12 + // 20 21 22 + // vectors are premultiplied when the matrix transformation is applied + // we consider the vectors as [1]x[3] arrays. + // [1]x[3] * [3]x[3] = [1]x[3] + // vector * matrix = vector + // In affine transformation matrixes the values of + // m02=0, m12=0 and m22=1 for non projective transformations. + +public: + //!Deafult constructor makes a identity matrix + Matrix() { + m00=1.0; m01=0.0; m02=0.0; + m10=0.0; m11=1.0; m12=0.0; + m20=0.0; m21=0.0; m22=1.0; + } + + //!Constructor from Angle create a rotate matrix + Matrix(const Angle &a){ + (*this).set_rotate(a); + } + //!set_identity member. Set an identity matrix + Matrix & + set_identity(){ + m00=1.0; m01=0.0; m02=0.0; + m10=0.0; m11=1.0; m12=0.0; + m20=0.0; m21=0.0; m22=1.0; + return (*this); + } + //!set_scale member fucntion. Sets a scale matrix + //! @param sx Scale by X axis + //! @param sy Scale by Y axis + //! @return A matrix reference filled with the sx, sy values + Matrix & + set_scale(const value_type &sx, const value_type &sy){ + m00=sx; m01=0.0; m02=0.0; + m10=0.0; m11=sy; m12=0.0; + m20=0.0; m21=0.0; m22=1.0; + return (*this); + } + //!set_rotate member function. Sets a rotate matrix + //! @param a Rotation angle counterclock wise + //! @return A matrix reference filled with the proper rotation parameters + Matrix & + set_rotate(const Angle &a){ + value_type c(Angle::cos(a).get()); + value_type s(Angle::sin(a).get()); + m00= c; m01=s; m02=0.0; + m10=-1.0*s; m11=c; m12=0.0; + m20=0.0; m21=0.0; m22=1.0; + return (*this); + } + //!traslate member function. Sets a translate matrix + //! @param t Vector that defines the translation + //! @return A matrix reference filled with the proper translation parameters + Matrix & + set_translate(const Vector &t){ + m00=1.0; m01=0.0; m02=0.0; + m10=0.0; m11=1.0; m12=0.0; + m20=t[0]; m21=t[1]; m22=1.0; + return (*this); + } + + //!get_transformed member function. + //! @param v 2D Vector to transform + //! @return The Vector result + Vector + get_transformed(const Vector &v){ + return Vector(v[0]*m00+v[1]*m10+m20,v[0]*m01+v[1]*m11+m21); + } + + //! operator *. Multiplication of one matrix by other + //! @param rhs the right hand side of the multiplication operation + //! @return the resulting multiplication matrix + Matrix + operator *(const Matrix &rhs){ + Matrix ret; + ret.m00=m00*rhs.m00 + m01*rhs.m10 + m02*rhs.m20; + ret.m01=m00*rhs.m01 + m01*rhs.m11 + m02*rhs.m21; + ret.m02=m00*rhs.m02 + m01*rhs.m12 + m02*rhs.m22; + + ret.m10=m10*rhs.m00 + m11*rhs.m10 + m12*rhs.m20; + ret.m11=m10*rhs.m01 + m11*rhs.m11 + m12*rhs.m21; + ret.m12=m10*rhs.m02 + m11*rhs.m12 + m12*rhs.m22; + + ret.m20=m20*rhs.m00 + m21*rhs.m10 + m22*rhs.m20; + ret.m21=m20*rhs.m01 + m21*rhs.m11 + m22*rhs.m21; + ret.m22=m20*rhs.m02 + m21*rhs.m12 + m22*rhs.m22; + return ret; + } + + //! operator *=. Multiplication and assign of one matrix by a number + //! @param rhs the number to multiply by + //! @return the modifed resulting multiplicated by number matrix + Matrix + operator *=(const value_type &rhs){ + m00*=rhs; + m01*=rhs; + m02*=rhs; + + m10*=rhs; + m11*=rhs; + m12*=rhs; + + m20*=rhs; + m21*=rhs; + m22*=rhs; + return *this; + } + + //! operator +=. Sum and assign of two matrixes + //! @param rhs the matrix to sum + //! @return modified matrix with the summed matrix + Matrix + operator +=(const Matrix &rhs){ + m00+=rhs.m00; + m01+=rhs.m01; + m02+=rhs.m02; + + m10+=rhs.m10; + m11+=rhs.m11; + m12+=rhs.m12; + + m20+=rhs.m20; + m21+=rhs.m21; + m22+=rhs.m22; + return *this; + } + + //! operator *. Multiplication of one matrix by a number + //! @param rhs the number to multiply by + //! @return the resulting multiplicated by number matrix + Matrix + operator *(const value_type &rhs){ + return Matrix(*this)*=rhs; + } + + //! operator +=. Sum and assign of two matrixes + //! @param rhs the matrix to sum + //! @return modified matrix with the summed matrix + Matrix + operator +(const Matrix &rhs){ + return Matrix(*this)+=rhs; + } + +}; + +}; // END of namespace synfig + +#endif diff --git a/synfig-core/src/synfig/module.cpp b/synfig-core/src/synfig/module.cpp new file mode 100644 index 0000000..5d64003 --- /dev/null +++ b/synfig-core/src/synfig/module.cpp @@ -0,0 +1,194 @@ +/* === S Y N F I G ========================================================= */ +/*! \file synfig/module.cpp +** \brief writeme +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_NO_ANGLE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "module.h" +#include "general.h" +#include + +#ifndef USE_CF_BUNDLES +#include +#endif + +#endif + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +using namespace std; +using namespace etl; +using namespace synfig; + +Module::Book *synfig::Module::book_; + +/* === P R O C E D U R E S ================================================= */ + +bool +Module::subsys_init(const String &prefix) +{ +#ifndef USE_CF_BUNDLES + #ifndef SYNFIG_LTDL_NO_STATIC + //LTDL_SET_PRELOADED_SYMBOLS(); + #endif + + if(lt_dlinit()) + { + error(_("Errors on lt_dlinit()")); + error(lt_dlerror()); + return false; + } + + lt_dladdsearchdir("."); + if(getenv("HOME")) + lt_dladdsearchdir(strprintf("%s/.synfig/modules", getenv("HOME")).c_str()); + lt_dladdsearchdir((prefix+"/lib/synfig/modules").c_str()); +#ifdef LIBDIR + lt_dladdsearchdir(LIBDIR"/synfig/modules"); +#endif +#ifdef __APPLE__ + lt_dladdsearchdir("/Library/Frameworks/synfig.framework/Resources/modules"); +#endif + lt_dladdsearchdir("/usr/local/lib/synfig/modules"); + lt_dladdsearchdir("."); +#endif + book_=new Book; + return true; +} + +bool +Module::subsys_stop() +{ + delete book_; + +#ifndef USE_CF_BUNDLES + lt_dlexit(); +#endif + return true; +} + +void +Module::register_default_modules(ProgressCallback *callback) +{ + #define REGISTER_MODULE(module) if (!Register(module, callback)) \ + throw std::runtime_error(strprintf(_("Unable to load module '%s'"), module)) + REGISTER_MODULE("lyr_freetype"); + REGISTER_MODULE("mod_geometry"); + REGISTER_MODULE("mod_gradient"); + REGISTER_MODULE("mod_particle"); +} + +Module::Book& +Module::book() +{ + return *book_; +} + +void +synfig::Module::Register(Module::Handle mod) +{ + book()[mod->Name()]=mod; +} + +bool +synfig::Module::Register(const String &module_name, ProgressCallback *callback) +{ +#ifndef USE_CF_BUNDLES + lt_dlhandle module; + + if(callback)callback->task(strprintf(_("Attempting to register \"%s\""),module_name.c_str())); + + module=lt_dlopenext((string("lib")+module_name).c_str()); + if(!module)module=lt_dlopenext(module_name.c_str()); + + if(!module) + { + if(callback)callback->warning(strprintf(_("Unable to find module \"%s\" (%s)"),module_name.c_str(),lt_dlerror())); + return false; + } + + if(callback)callback->task(strprintf(_("Found module \"%s\""),module_name.c_str())); + + Module::constructor_type constructor=NULL; + Handle mod; + + if(!constructor) + { +// if(callback)callback->task(string("looking for -> ")+module_name+"_LTX_new_instance()"); + constructor=(Module::constructor_type )lt_dlsym(module,(module_name+"_LTX_new_instance").c_str()); + } + + if(!constructor) + { +// if(callback)callback->task(string("looking for -> lib")+module_name+"_LTX_new_instance()"); + constructor=(Module::constructor_type )lt_dlsym(module,(string("lib")+module_name+"_LTX_new_instance").c_str()); + } + if(!constructor) + { +// if(callback)callback->task(string("looking for -> lib")+module_name+"_LTX_new_instance()"); + constructor=(Module::constructor_type )lt_dlsym(module,(string("_lib")+module_name+"_LTX_new_instance").c_str()); + } + if(!constructor) + { +// if(callback)callback->task(string("looking for -> lib")+module_name+"_LTX_new_instance()"); + constructor=(Module::constructor_type )lt_dlsym(module,(string("_")+module_name+"_LTX_new_instance").c_str()); + } + + if(constructor) + { +// if(callback)callback->task(strprintf("Executing callback for \"%s\"",module_name.c_str())); + mod=handle((*constructor)(callback)); + } + else + { + if(callback)callback->error(strprintf(_("Unable to find entrypoint in module \"%s\" (%s)"),module_name.c_str(),lt_dlerror())); + return false; + } + +// if(callback)callback->task(strprintf("Done executing callback for \"%s\"",module_name.c_str())); + + if(mod) + { +// if(callback)callback->task(strprintf("Registering \"%s\"",module_name.c_str())); + Register(mod); + } + else + { + if(callback)callback->error(_("Entrypoint did not return a module.")); + return false; + } + + if(callback)callback->task(strprintf(_("Success for \"%s\""),module_name.c_str())); + +#endif + return true; +} diff --git a/synfig-core/src/synfig/module.h b/synfig-core/src/synfig/module.h new file mode 100644 index 0000000..26638cd --- /dev/null +++ b/synfig-core/src/synfig/module.h @@ -0,0 +1,204 @@ +/* === S Y N F I G ========================================================= */ +/*! \file synfig/module.h +** \brief writeme +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_MODULE_H +#define __SYNFIG_MODULE_H + +/* === H E A D E R S ======================================================= */ + +#include "general.h" +#include +#include +#include "string.h" +#include "releases.h" +#include +#include "vector.h" +#include "color.h" +#include "layer.h" +#include "canvas.h" + +//#include "value.h" + +/* === M A C R O S ========================================================= */ + +//! Marks the start of a module description +#define MODULE_DESC_BEGIN(x) struct x##_modclass : public synfig::Module { x##_modclass(synfig::ProgressCallback *callback=NULL); + +//! Sets the localized name of the module +#define MODULE_NAME(x) virtual const char * Name() { return x; } + +//! Sets a localized description of the module +#define MODULE_DESCRIPTION(x) virtual const char * Desc() { return x; } + +//! Sets the name of the module's author +#define MODULE_AUTHOR(x) virtual const char * Author() { return x; } + +//! Sets the version string for the module +#define MODULE_VERSION(x) virtual const char * Version() { return x; } + +//! Sets the copyright string for the module +#define MODULE_COPYRIGHT(x) virtual const char * Copyright() { return x; } + +//! Describes the module's construction function +#define MODULE_CONSTRUCTOR(x) bool constructor_(synfig::ProgressCallback *cb) { return x(cb); } + +//! Describes the module's destruction function +#define MODULE_DESTRUCTOR(x) virtual void destructor_() { return x(); } + +//! Marks the end of a module description +#define MODULE_DESC_END }; + +//#if 0 +#ifdef __APPLE__ +//! Marks the start of a module's inventory +#define MODULE_INVENTORY_BEGIN(x) extern "C" { \ + synfig::Module* _##x##_LTX_new_instance(synfig::ProgressCallback *cb) \ + { if(SYNFIG_CHECK_VERSION()){x##_modclass *mod=new x##_modclass(cb); mod->constructor_(cb); return mod; }\ + if(cb)cb->error(#x": Unable to load module due to version mismatch."); return NULL; } \ + }; x##_modclass::x##_modclass(synfig::ProgressCallback */*cb*/) { +#else +//! Marks the start of a module's inventory +#define MODULE_INVENTORY_BEGIN(x) extern "C" { \ + synfig::Module* x##_LTX_new_instance(synfig::ProgressCallback *cb) \ + { if(SYNFIG_CHECK_VERSION()){x##_modclass *mod=new x##_modclass(cb); mod->constructor_(cb); return mod; }\ + if(cb)cb->error(#x": Unable to load module due to version mismatch."); return NULL; } \ + }; x##_modclass::x##_modclass(synfig::ProgressCallback */*cb*/) { +#endif + +//! Marks the start of the layers in the module's inventory +#define BEGIN_LAYERS { + +//! DEPRECATED - use #INCLUDE_LAYER(class) +#define LAYER(class) \ + synfig::Layer::register_in_book( \ + synfig::Layer::BookEntry(class::create, \ + class::name__, \ + dgettext("synfig", class::local_name__), \ + class::category__, \ + class::cvs_id__, \ + class::version__)); + +#define LAYER_ALIAS(class,alias) \ + synfig::Layer::register_in_book( \ + synfig::Layer::BookEntry(class::create, \ + alias, \ + alias, \ + CATEGORY_DO_NOT_USE, \ + class::cvs_id__, \ + class::version__)); + +//! Marks the end of the layers in the module's inventory +#define END_LAYERS } + +//! Marks the start of the targets in the module's inventory +#define BEGIN_TARGETS { + +#define TARGET(x) \ + synfig::Target::book()[synfig::String(x::name__)]= \ + std::pair \ + (x::create,synfig::String(x::ext__)); \ + synfig::Target::ext_book()[synfig::String(x::ext__)]=x::name__; + +#define TARGET_EXT(x,y) synfig::Target::ext_book()[synfig::String(y)]=x::name__; + +//! Marks the end of the targets in the module's inventory +#define END_TARGETS } + +//! Marks the start of the importers in the module's inventory +#define BEGIN_IMPORTERS { + +#define IMPORTER(x) synfig::Importer::book()[synfig::String(x::ext__)]=x::create; + +#define IMPORTER_EXT(x,y) synfig::Importer::book()[synfig::String(y)]=x::create; + +//! Marks the end of the importers in the module's inventory +#define END_IMPORTERS } + +//! Marks the start of the valuenodes in the module's inventory +#define BEGIN_VALUENODES { synfig::LinkableValueNode::Book &book(synfig::LinkableValueNode::book()); + +#define VALUENODE(class,name,local,version) \ + book[name].factory=reinterpret_cast(&class::create); \ + book[name].check_type=&class::check_type; \ + book[name].local_name=local; \ + book[name].release_version=version; + +//! Marks the end of the valuenodes in the module's inventory +#define END_VALUENODES } + +//! Marks the end of a module's inventory +#define MODULE_INVENTORY_END } + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class ProgressCallback; + +/*! \class Module +** \todo writeme +*/ +class Module : public etl::shared_object +{ +public: + bool constructor_(synfig::ProgressCallback */*cb*/) { return true; } + virtual void destructor_() { } + + typedef etl::handle Handle; + typedef etl::loose_handle LooseHandle; + typedef etl::handle ConstHandle; + +public: + typedef Module*(*constructor_type)(ProgressCallback *); + typedef std::map Book; +private: + static Book* book_; +public: + static Book& book(); + + static bool subsys_init(const String &prefix); + static bool subsys_stop(); + static void register_default_modules(ProgressCallback *cb=NULL); + + static void Register(Handle mod); + static bool Register(const String &module_name, ProgressCallback *cb=NULL); + static inline void Register(Module *mod) { Register(Handle(mod)); } + + virtual const char * Name() { return " "; } + virtual const char * Desc() { return " "; } + virtual const char * Author() { return " "; } + virtual const char * Version() { return " "; } + virtual const char * Copyright() { return SYNFIG_COPYRIGHT; } + + virtual ~Module() { destructor_(); } +}; + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/mutex.cpp b/synfig-core/src/synfig/mutex.cpp new file mode 100644 index 0000000..eca63b6 --- /dev/null +++ b/synfig-core/src/synfig/mutex.cpp @@ -0,0 +1,304 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mutex.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "mutex.h" + +#ifdef HAVE_LIBPTHREAD +#define USING_PTHREADS 1 +#else +#ifdef _WIN32 +#define USING_WIN32_THREADS 1 +#endif +#endif + +#ifdef USING_WIN32_THREADS +#include +#endif + +#ifdef USING_PTHREADS +#include +#endif + +#endif + +/* === U S I N G =========================================================== */ + +//using namespace std; +//using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + + + + + + +bool +Mutex::is_locked() +{ + if(try_lock()) + { + unlock(); + return false; + } + return true; +} + +void +RecMutex::unlock_all() +{ + while(is_locked()) unlock(); +} + +#ifdef USING_PTHREADS +Mutex::Mutex() +{ + pthread_mutex_t*const mtx_ptr(new pthread_mutex_t); + + pthread_mutexattr_t attr; + pthread_mutexattr_init(&attr); + + //#ifdef PTHREAD_PRIO_INHERIT + //pthread_mutexattr_setprioceiling(&attr,PTHREAD_PRIO_INHERIT); + //#endif + + //#ifdef PTHREAD_MUTEX_RECURSIVE + //pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); + //#endif + + pthread_mutex_init(mtx_ptr,&attr); + pthread_mutexattr_destroy(&attr); + + blackbox=mtx_ptr; +} + +Mutex::~Mutex() +{ + pthread_mutex_t*const mtx_ptr(static_cast(blackbox)); + pthread_mutex_destroy(mtx_ptr); + delete mtx_ptr; +} + +void +Mutex::lock() +{ + pthread_mutex_t*const mtx_ptr(static_cast(blackbox)); + pthread_mutex_lock(mtx_ptr); +} + +void +Mutex::unlock() +{ + pthread_mutex_t*const mtx_ptr(static_cast(blackbox)); + pthread_mutex_unlock(mtx_ptr); +} + +bool +Mutex::try_lock() +{ + pthread_mutex_t*const mtx_ptr(static_cast(blackbox)); + return !(bool) pthread_mutex_trylock(mtx_ptr); +} + + +RecMutex::RecMutex() +{ + pthread_mutex_t*const mtx_ptr(static_cast(blackbox)); + pthread_mutexattr_t attr; + + // Backtrack and get rid of the non-recursive mutex + pthread_mutex_destroy(mtx_ptr); + + pthread_mutexattr_init(&attr); + + pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); + + pthread_mutex_init(mtx_ptr,&attr); + pthread_mutexattr_destroy(&attr); +} + + + +RWLock::RWLock() +{ + pthread_rwlock_t*const rwlock_ptr(new pthread_rwlock_t); + + pthread_rwlock_init(rwlock_ptr, NULL); + + blackbox=rwlock_ptr; +} + +RWLock::~RWLock() +{ + pthread_rwlock_t*const rwlock_ptr(static_cast(blackbox)); + + pthread_rwlock_destroy(rwlock_ptr); + + delete rwlock_ptr; +} + +void +RWLock::reader_lock() +{ + pthread_rwlock_t*const rwlock_ptr(static_cast(blackbox)); + + pthread_rwlock_rdlock(rwlock_ptr); +} + +void +RWLock::reader_unlock() +{ + pthread_rwlock_t*const rwlock_ptr(static_cast(blackbox)); + + pthread_rwlock_unlock(rwlock_ptr); +} + +bool +RWLock::reader_trylock() +{ + pthread_rwlock_t*const rwlock_ptr(static_cast(blackbox)); + + return !pthread_rwlock_tryrdlock(rwlock_ptr); +} + +void +RWLock::writer_lock() +{ + pthread_rwlock_t*const rwlock_ptr(static_cast(blackbox)); + + pthread_rwlock_wrlock(rwlock_ptr); +} + +void +RWLock::writer_unlock() +{ + pthread_rwlock_t*const rwlock_ptr(static_cast(blackbox)); + + pthread_rwlock_unlock(rwlock_ptr); +} + +bool +RWLock::writer_trylock() +{ + pthread_rwlock_t*const rwlock_ptr(static_cast(blackbox)); + + return !pthread_rwlock_trywrlock(rwlock_ptr); +} + +#endif + +#ifdef USING_WIN32_THREADS +Mutex::Mutex() +{ + HANDLE& mtx(*reinterpret_cast(&blackbox)); + mtx=CreateMutex(NULL, FALSE, NULL); +} + +Mutex::~Mutex() +{ + HANDLE mtx(reinterpret_cast(blackbox)); + CloseHandle(mtx); +} + +void +Mutex::lock() +{ + HANDLE mtx(reinterpret_cast(blackbox)); + WaitForSingleObject(mtx, INFINITE); +} + +void +Mutex::unlock() +{ + HANDLE mtx(reinterpret_cast(blackbox)); + ReleaseMutex(mtx); +} + +bool +Mutex::try_lock() +{ + HANDLE mtx(reinterpret_cast(blackbox)); + return WaitForSingleObject(mtx, 0)==WAIT_FAILED; +} + + +RecMutex::RecMutex() +{ + // Win32 mutexes are recursive by default. +} + + +RWLock::RWLock() +{ +} + +RWLock::~RWLock() +{ +} + +void +RWLock::reader_lock() +{ +} + +void +RWLock::reader_unlock() +{ +} + +bool +RWLock::reader_trylock() +{ +} + +void +RWLock::writer_lock() +{ +} + +void +RWLock::writer_unlock() +{ +} + +bool +RWLock::writer_trylock() +{ +} + +#endif diff --git a/synfig-core/src/synfig/mutex.h b/synfig-core/src/synfig/mutex.h new file mode 100644 index 0000000..3497635 --- /dev/null +++ b/synfig-core/src/synfig/mutex.h @@ -0,0 +1,118 @@ +/* === S Y N F I G ========================================================= */ +/*! \file mutex.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_MUTEX_H +#define __SYNFIG_MUTEX_H + +/* === H E A D E R S ======================================================= */ + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class RecMutex; + +class Mutex +{ + friend class RecMutex; + +protected: + void* blackbox; + +public: + + class Lock + { + Mutex& mutex; + public: + Lock(Mutex& x):mutex(x) { mutex.lock(); } + ~Lock() { mutex.unlock(); } + }; + + Mutex(); + ~Mutex(); + + void lock(); + void unlock(); + bool try_lock(); + bool is_locked(); + +private: + //! Non-copyable + Mutex(const Mutex&); + + //! Non-assignable + void operator=(const Mutex&); +}; + +class RecMutex : public Mutex +{ +public: + RecMutex(); + + void unlock_all(); +}; + +class RWLock +{ + void* blackbox; + +public: + + class ReaderLock + { + RWLock& rw_lock; + public: + ReaderLock(RWLock& x):rw_lock(x) { rw_lock.reader_lock(); } + ~ReaderLock() { rw_lock.reader_unlock(); } + }; + class WriterLock + { + RWLock& rw_lock; + public: + WriterLock(RWLock& x):rw_lock(x) { rw_lock.writer_lock(); } + ~WriterLock() { rw_lock.writer_unlock(); } + }; + + RWLock(); + ~RWLock(); + + void reader_lock(); + void reader_unlock(); + bool reader_trylock(); + + void writer_lock(); + void writer_unlock(); + bool writer_trylock(); +}; + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/node.cpp b/synfig-core/src/synfig/node.cpp new file mode 100644 index 0000000..6524109 --- /dev/null +++ b/synfig-core/src/synfig/node.cpp @@ -0,0 +1,310 @@ +/* === S Y N F I G ========================================================= */ +/*! \file node.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "node.h" +// #include "nodebase.h" // this defines a bunch of sigc::slots that are never used + +#ifdef HASH_MAP_H +#include HASH_MAP_H +#else +#include +#endif + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +// About BE_FRUGAL_WITH_GUIDS +// If this macro is set, then a GUID will NOT +// be calculated until the first call to get_guid() +// This also means that the node doesn't get +// added to the database until get_guid() is called +// for the first time, or set_guid() is called. +// If it is expensive to calculate GUIDs, then +// this can improve performance a tad in +// some cases. Otherwise, it doesn't change +// much of anything. +#define BE_FRUGAL_WITH_GUIDS 1 + +#ifndef __sys_clock +#ifndef _WIN32 +# include +# define __sys_clock ::clock +#else +# ifdef __GNUG__ +# include +# define __sys_clock ::clock +# else +typedef int clock_t; +extern clock_t _clock(); +# define CLOCKS_PER_SEC 1000 +# define __sys_clock _clock +# endif +#endif +#endif + +/* === G L O B A L S ======================================================= */ + +#ifdef HASH_MAP_H +typedef HASH_MAP_CLASS GlobalNodeMap; +#else +typedef map GlobalNodeMap; +#endif + +static GlobalNodeMap* global_node_map_; + +static GlobalNodeMap& global_node_map() +{ + if(!global_node_map_) + global_node_map_=new GlobalNodeMap; + return *global_node_map_; +} + +/* === P R O C E D U R E S ================================================= */ + +synfig::Node* +synfig::find_node(const synfig::GUID& guid) +{ + if(global_node_map().count(guid)==0) + return 0; + return global_node_map()[guid]; +} + +static void +refresh_node(synfig::Node* node, synfig::GUID old_guid) +{ + assert(global_node_map().count(old_guid)); + global_node_map().erase(old_guid); + assert(!global_node_map().count(old_guid)); + global_node_map()[node->get_guid()]=node; +} + +/* === M E T H O D S ======================================================= */ + +#ifdef _DEBUG +const char * +TimePoint::c_str()const +{ + return get_time().get_string().c_str(); +} +#endif + +void +TimePoint::absorb(const TimePoint& x) +{ + if(get_guid()==x.get_guid()) + return; + set_guid(get_guid()^x.get_guid()); + + if(get_after()==INTERPOLATION_NIL) + set_after(x.get_after()); + if(get_before()==INTERPOLATION_NIL) + set_before(x.get_before()); + + if(get_after()!=x.get_after() && x.get_after()!=INTERPOLATION_NIL) + set_after(INTERPOLATION_UNDEFINED); + if(get_before()!=x.get_before() && x.get_before()!=INTERPOLATION_NIL) + set_before(INTERPOLATION_UNDEFINED); +} + +TimePointSet::iterator +TimePointSet::insert(const TimePoint& x) +{ + iterator iter(find(x)); + if(iter!=end()) + { + const_cast(*iter).absorb(x); + return iter; + } + return std::set::insert(x).first; +} + + + + + + + + + + + + + + + +Node::Node(): + guid_(0), + bchanged(true), + time_last_changed_(__sys_clock()), + deleting_(false) +{ +#ifndef BE_FRUGAL_WITH_GUIDS + guid_.make_unique(); + assert(guid_); + assert(!global_node_map().count(guid_)); + global_node_map()[guid_]=this; +#endif +} + +Node::~Node() +{ + begin_delete(); + + if(guid_) + { + assert(global_node_map().count(guid_)); + global_node_map().erase(guid_); + assert(!global_node_map().count(guid_)); + } +} + +void +Node::changed() +{ + time_last_changed_=__sys_clock(); + on_changed(); +} + + +//! Gets the GUID for this value node +const synfig::GUID& +Node::get_guid()const +{ +#ifdef BE_FRUGAL_WITH_GUIDS + if(!guid_) + { + const_cast(guid_).make_unique(); + assert(guid_); + assert(!global_node_map().count(guid_)); + global_node_map()[guid_]=const_cast(this); + } +#endif + + return guid_; +} + +//! Sets the GUID for this value node +void +Node::set_guid(const synfig::GUID& x) +{ + assert(x); + +#ifdef BE_FRUGAL_WITH_GUIDS + if(!guid_) + { + guid_=x; + assert(!global_node_map().count(guid_)); + global_node_map()[guid_]=this; + } + else +#endif + if(guid_!=x) + { + synfig::GUID oldguid(guid_); + guid_=x; + refresh_node(this, oldguid); + on_guid_changed(oldguid); + } +} + +int +Node::get_time_last_changed()const +{ + return time_last_changed_; +} + +void +Node::add_child(Node*x) +{ + x->parent_set.insert(this); +} + +void +Node::remove_child(Node*x) +{ + if(x->parent_set.count(this)) x->parent_set.erase(this); +} + +int +Node::parent_count()const +{ + return parent_set.size(); +} + +const Node::time_set & +Node::get_times() const +{ + if(bchanged) + { + times.clear(); + get_times_vfunc(times); + bchanged = false; + } + + //set the output set... + return times; +} + +void +Node::begin_delete() +{ + if(!deleting_) + { + deleting_=true; signal_deleted()(); + } +} + +void +Node::on_changed() +{ + bchanged = true; + signal_changed()(); + + std::set::iterator iter; + for(iter=parent_set.begin();iter!=parent_set.end();++iter) + { + (*iter)->changed(); + } +} + +void +Node::on_guid_changed(synfig::GUID guid) +{ + signal_guid_changed()(guid); +} diff --git a/synfig-core/src/synfig/node.h b/synfig-core/src/synfig/node.h new file mode 100644 index 0000000..ca5af34 --- /dev/null +++ b/synfig-core/src/synfig/node.h @@ -0,0 +1,283 @@ +/* === S Y N F I G ========================================================= */ +/*! \file node.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_PARENTNODE_H +#define __SYNFIG_PARENTNODE_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include "time.h" +#include "guid.h" +#include +#include "interpolation.h" +#include "mutex.h" + +/* === M A C R O S ========================================================= */ + +// When a PasteCanvas layer has a non-zero 'time offset' parameter, should +// the waypoints shown for the canvas be adjusted? This currently only +// partially works - see the TODO at the end of layer_pastecanvas.cpp +#define ADJUST_WAYPOINTS_FOR_TIME_OFFSET + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class TimePoint +{ + GUID guid; + Time time; + Interpolation before,after; +public: + + TimePoint(const Time& x=Time::begin()): + guid(0), + time(x), + before(INTERPOLATION_NIL), + after(INTERPOLATION_NIL) + { + } + +#ifdef _DEBUG + const char *c_str()const; +#endif + + const GUID& get_guid()const { return guid; } + const Time& get_time()const { return time; } + Interpolation get_before()const { return before; } + Interpolation get_after()const { return after; } + + void set_guid(const GUID& x) { guid=x; } + void set_time(const Time& x) { time=x; } + void set_before(Interpolation x) { before=x; } + void set_after(Interpolation x) { after=x; } + + void absorb(const TimePoint& x); +}; // END of class TimePoint + +inline TimePoint operator+(TimePoint lhs,const Time& rhs) + { lhs.set_time(lhs.get_time()+rhs); return lhs; } + +inline TimePoint operator-(TimePoint lhs,const Time& rhs) + { lhs.set_time(lhs.get_time()-rhs); return lhs; } + +inline bool operator<(const TimePoint& lhs,const TimePoint& rhs) + { return lhs.get_time() +{ +public: + iterator insert(const TimePoint& x); + + template void insert(ITER begin, ITER end) + { for(;begin!=end;++begin) insert(*begin); } + +}; // END of class TimePointSet + +class Node : public etl::rshared_object +{ + /* + -- ** -- T Y P E S ----------------------------------------------------------- + */ + +public: + + //! \writeme + typedef TimePointSet time_set; + + /* + -- ** -- D A T A ------------------------------------------------------------- + */ + +private: + + //! \writeme + GUID guid_; + + //! cached time values for all the children + mutable time_set times; + + //! \writeme + mutable bool bchanged; + + //! \writeme + mutable int time_last_changed_; + + //! \writeme + mutable RWLock rw_lock_; + + //! \writeme + bool deleting_; + +public: + + //! \todo This should really be private + std::set parent_set; + + /* + -- ** -- S I G N A L S ------------------------------------------------------- + */ + +private: + + sigc::signal signal_changed_; + + //! GUID Changed + /*! \note The second parameter is the *OLD* guid! */ + sigc::signal signal_guid_changed_; + + //! Deleted + sigc::signal signal_deleted_; + + /* + -- ** -- S I G N A L I N T E R F A C E ------------------------------------- + */ + +public: + + sigc::signal& signal_deleted() { return signal_deleted_; } + + sigc::signal& signal_changed() { return signal_changed_; } + + //! GUID Changed + /*! \note The second parameter is the *OLD* guid! */ + sigc::signal& signal_guid_changed() { return signal_guid_changed_; } + + /* + -- ** -- C O N S T R U C T O R S --------------------------------------------- + */ + +protected: + + Node(); + + // This class cannot be copied -- use clone() if necessary +private: + Node(const Node &x); + +public: + virtual ~Node(); + + /* + -- ** -- M E M B E R F U N C T I O N S ------------------------------------- + */ + +public: + + void changed(); + + //! Gets the GUID for this value node + const GUID& get_guid()const; + + //! Sets the GUID for this value node + void set_guid(const GUID& x); + + int get_time_last_changed()const; + + void add_child(Node*x); + + void remove_child(Node*x); + + int parent_count()const; + + const time_set &get_times() const; + + RWLock& get_rw_lock()const { return rw_lock_; } + +protected: + + void begin_delete(); + + /* + -- ** -- V I R T U A L F U N C T I O N S ----------------------------------- + */ + +protected: + virtual void on_changed(); + + virtual void on_guid_changed(GUID guid); + + /*! Function to be overloaded that fills + */ + virtual void get_times_vfunc(time_set &set) const = 0; +}; + +synfig::Node* find_node(const synfig::GUID& guid); + +template etl::handle +guid_cast(const synfig::GUID& guid) +{ + return etl::handle::cast_dynamic(synfig::find_node(guid)); +} + +#ifdef _DEBUG +template +synfig::String set_string(T start, T end) +{ + synfig::String ret("["); + bool started = false; + + while (start != end) + { + if (started) ret += ", "; + else started = true; + + ret += synfig::String((*start).c_str()); + start++; + } + + return ret + "]"; +} + +template +synfig::String set_string(T set) +{ + return set_string(set.begin(), set.end()); +} +#endif // _DEBUG + +typedef etl::handle NodeHandle; + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/nodebase.h b/synfig-core/src/synfig/nodebase.h new file mode 100644 index 0000000..f0bb735 --- /dev/null +++ b/synfig-core/src/synfig/nodebase.h @@ -0,0 +1,102 @@ +#if 0 // this file is not used +/* === S Y N F I G ========================================================= */ +/*! \file nodebase.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_NODEBASE_H +#define __SYNFIG_NODEBASE_H + +/* === H E A D E R S ======================================================= */ + +#include "protocol.h" +#include "string.h" +#include "guid.h" +#include + +/* === M A C R O S ========================================================= */ + +#define PX_DEFINE_DATA(name,type) \ + PX_DEFINE_FUNC_CONST0(get_##name, type) \ + PX_DEFINE_FUNC1(set_##name, void, type) + +#define PX_DEFINE_FUNC0(name,ret) \ + sigc::slot< ret > _slot_##name; \ + ret name() { \ + return _slot_##name(); \ + } + +#define PX_DEFINE_FUNC1(name,ret,type) \ + sigc::slot< ret, type > _slot_##name; \ + ret name(type v1) { \ + return _slot_##name(v1); \ + } +#define PX_DEFINE_FUNC2(name,ret,type1,type2) \ + sigc::slot< ret, type1, type2 > _slot_##name; \ + ret name(type1 v1, type2 v2) { \ + return _slot_##name(v1,v2); \ + } +#define PX_DEFINE_FUNC_CONST0(name,ret) \ + sigc::slot< ret > _slot_##name##_const; \ + ret name()const { \ + return _slot_##name##_const(); \ + } + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { +namespace Proto { + +typedef int Query; +typedef int NodeList; + +class NodeBase : public Protocol +{ +public: + + PX_DEFINE_DATA(guid, GUID) + + PX_DEFINE_FUNC2(func_test, float, int, int) + + PX_DEFINE_DATA(id, String) + + PX_DEFINE_DATA(root, NodeHandle) + + PX_DEFINE_FUNC0(signal_changed, sigc::signal) + PX_DEFINE_FUNC0(signal_deleted, sigc::signal) + + PX_DEFINE_FUNC_CONST0(get_parents, NodeList) + PX_DEFINE_FUNC_CONST0(get_children, NodeList) + + PX_DEFINE_FUNC1(query_children, NodeList, Query) + +}; // END of class Proto::NodeBase + +}; // END of namespace Proto +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif +#endif diff --git a/synfig-core/src/synfig/palette.cpp b/synfig-core/src/synfig/palette.cpp new file mode 100644 index 0000000..16742a4 --- /dev/null +++ b/synfig-core/src/synfig/palette.cpp @@ -0,0 +1,359 @@ +/* === S Y N F I G ========================================================= */ +/*! \file palette.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "palette.h" +#include "surface.h" +#include "general.h" +#include +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +#define PALETTE_FILE_COOKIE "SYNFIGPAL1.0" + +/* === G L O B A L S ======================================================= */ + +bool weight_less_than(const PaletteItem& lhs,const PaletteItem& rhs) +{ + return lhs.weightadd(color); + continue; + } + + /*if(size()>=max_colors) + { + iterator iterlight(find_light()); + PaletteItem light(*iterlight); + erase(iterlight); + find_closest(light.color)->add(light.color,light.weight); + } + */ + + push_back(color); + continue; + } + +/* + + max_colors-=2; + for(int y=0;yadd(color); + continue; + } + + + push_back(color); + continue; + } + sort(rbegin(),rend()); + + iterator iter; + + iterator best_match(begin()); + while((signed)size()>max_colors) + { + PaletteItem item(back()); + pop_back(); + find_closest(item.color)->add(item.color,item.weight); + } +*/ + push_back(Color::black()); + push_back(Color::white()); + +// sort(begin(),end(),&luma_less_than); +} + +Palette::const_iterator +Palette::find_closest(const Color& color, float* dist)const +{ + // For the sake of avoiding cut-and-paste + // bugs, we'll just use the non-const + // find_closest()... It doesn't change anything + // anyway. + return const_cast(this)->find_closest(color,dist); +} + +Palette::iterator +Palette::find_closest(const Color& color, float* dist) +{ + iterator iter; + + iterator best_match(begin()); + float best_dist(1000000); + + const float prep_y(powf(color.get_y(),2.2f)*color.get_a()); + const float prep_u(color.get_u()); + const float prep_v(color.get_v()); + + for(iter=begin();iter!=end();++iter) + { + const float diff_y(prep_y-powf(iter->color.get_y(),2.2f)*iter->color.get_a()); + const float diff_u(prep_u-iter->color.get_u()); + const float diff_v(prep_v-iter->color.get_v()); + const float diff_a(color.get_a()-iter->color.get_a()); + + + const float dist( + diff_y*diff_y*1.5f+ + diff_a*diff_a+ + + diff_u*diff_u+ + diff_v*diff_v + + // cross product + /*abs( + prep_u*iter->color.get_u()- + prep_v*iter->color.get_v() + )*/ + ); + if(distweight>best_match->weight) + best_match=iter; + } + + return best_match; +} + +Palette::iterator +Palette::find_light() +{ + iterator iter; + + iterator best_match(begin()); + + for(iter=begin();iter!=end();++iter) + { + if(iter->weightweight) + best_match=iter; + } + + return best_match; +} + +Palette +Palette::grayscale(int steps) +{ + Palette ret; + for(int i=0;iname<color.get_r()<color.get_g()<color.get_b()<color.get_a()< + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class Surface; + +struct PaletteItem +{ + Color color; + String name; + int weight; + + PaletteItem():weight(1) { } + + PaletteItem(const Color& color, const String& name, int weight=1): + color(color),name(name),weight(weight) { } + + PaletteItem(const Color& color, int weight=1): + color(color),weight(weight) { } + + void add(const Color& x, int weight=1); + + bool operator<(const PaletteItem& rhs)const { return weight +{ + String name_; + +public: + Palette(); + Palette(const String& name_); + + /*! Generates a palette for the given + ** surface + */ + Palette(const Surface& surface, int size=256); + + iterator find_closest(const Color& color, float* dist=0); + const_iterator find_closest(const Color& color, float* dist=0)const; + + iterator find_heavy(); + + iterator find_light(); + + static Palette grayscale(int steps=16); + + void save_to_file(const synfig::String& filename)const; + + static Palette load_from_file(const synfig::String& filename); +}; // END of class Palette + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/paramdesc.cpp b/synfig-core/src/synfig/paramdesc.cpp new file mode 100644 index 0000000..8947f19 --- /dev/null +++ b/synfig-core/src/synfig/paramdesc.cpp @@ -0,0 +1,100 @@ +/* === S Y N F I G ========================================================= */ +/*! \file paramdesc.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "paramdesc.h" +#include "value.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ParamDesc::ParamDesc(synfig::Color::BlendMethod, const String &a): + name_ (a), + local_name_ (a), + scalar_ (1.0), + critical_ (true), + hidden_ (false), + invisible_duck_ (false), + is_distance_ (false), + animation_only_ (false) +{ + set_local_name(_("Blend Method")) + .set_hint("enum") // used shortcuts: A B C D E F G H I K L M N O P R S T U V Y; free: J Q W X Z + .add_enum_value(Color::BLEND_COMPOSITE, "composite", _("_Composite" )) + .add_enum_value(Color::BLEND_STRAIGHT, "straight", _("_Straight" )) + .add_enum_value(Color::BLEND_ONTO, "onto", _("_Onto" )) + .add_enum_value(Color::BLEND_STRAIGHT_ONTO, "straightonto", _("S_traight Onto" )) + .add_enum_value(Color::BLEND_BEHIND, "behind", _("_Behind" )) + .add_enum_value(Color::BLEND_SCREEN, "screen", _("Sc_reen" )) + .add_enum_value(Color::BLEND_OVERLAY, "overlay", _("Overla_y" )) + .add_enum_value(Color::BLEND_HARD_LIGHT, "hard_light", _("_Hard Light" )) + .add_enum_value(Color::BLEND_MULTIPLY, "multiply", _("_Multiply" )) + .add_enum_value(Color::BLEND_DIVIDE, "divide", _("_Divide" )) + .add_enum_value(Color::BLEND_ADD, "add", _("_Add" )) + .add_enum_value(Color::BLEND_SUBTRACT, "subtract", _("S_ubtract" )) + .add_enum_value(Color::BLEND_DIFFERENCE, "difference", _("Di_fference" )) + .add_enum_value(Color::BLEND_BRIGHTEN, "brighten", _("Bri_ghten" )) + .add_enum_value(Color::BLEND_DARKEN, "darken", _("Dar_ken" )) + .add_enum_value(Color::BLEND_COLOR, "color", _("Co_lor" )) + .add_enum_value(Color::BLEND_HUE, "hue", _("Hu_e" )) + .add_enum_value(Color::BLEND_SATURATION, "saturation", _("Saturatio_n" )) + .add_enum_value(Color::BLEND_LUMINANCE, "luminance", _("Lum_inance" )) + // These are deprecated + .add_enum_value(Color::BLEND_ALPHA_OVER, "alphaover", _("Alpha O_ver" )) + .add_enum_value(Color::BLEND_ALPHA_BRIGHTEN, "alphabrighten", _("Al_pha Brighten" )) + .add_enum_value(Color::BLEND_ALPHA_DARKEN, "alphadarken", _("Al_pha Darken" )) + ; // end of enums +} + +ParamDesc::ParamDesc(const ValueBase&, const String &a): + name_ (a), + local_name_ (a), + scalar_ (1.0), + critical_ (true), + hidden_ (false), + invisible_duck_ (false), + is_distance_ (false), + animation_only_ (false) +{ +} diff --git a/synfig-core/src/synfig/paramdesc.h b/synfig-core/src/synfig/paramdesc.h new file mode 100644 index 0000000..2e0f0ad --- /dev/null +++ b/synfig-core/src/synfig/paramdesc.h @@ -0,0 +1,226 @@ +/* === S Y N F I G ========================================================= */ +/*! \file paramdesc.h +** \brief ParamDesc Class Implementation +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_PARAMDESC_H +#define __SYNFIG_PARAMDESC_H + +/* === H E A D E R S ======================================================= */ + +#include "string.h" +#include "real.h" +#include "color.h" +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class ValueBase; + +/*! \class ParamDesc +** \brief Parameter Description Class +** \todo writeme +*/ +class ParamDesc +{ +public: + + //! \writeme + struct EnumData + { + int value; + String name; + String local_name; + EnumData(int value, const String &name, const String &local_name): + value(value), + name(name), + local_name(local_name) + { + } + }; + + /* + -- ** -- D A T A ------------------------------------------------------------- + */ + +private: + String name_; //! The actual parameter name + String local_name_; //! Localized name + String desc_; //! Short description of parameter (Think tooltops) + String group_; //! Which group this parameter is a member of (optional) + String hint_; //! Parameter hint + String origin_; //! Parameter origin + String connect_; + String box_; + Real scalar_; //! Scalar value for visual editing + bool critical_; + bool hidden_; + bool invisible_duck_; + bool is_distance_; + bool animation_only_; + + std::list enum_list_; + + /* + -- ** -- C O N S T R U C T O R S --------------------------------------------- + */ + +public: + + ParamDesc(const String &a="IM_A_BUG_SO_REPORT_ME"): + name_ (a), + local_name_ (a), + scalar_ (1.0), + critical_ (true), + hidden_ (false), + invisible_duck_ (false), + is_distance_ (false), + animation_only_ (false) + { } + + ParamDesc(const ValueBase&, const String &a); + + ParamDesc(synfig::Color::BlendMethod, const String &a); + + + /* + -- ** -- M E M B E R F U N C T I O N S ------------------------------------- + */ + +public: + + //! \writeme + const std::list &get_enum_list()const { return enum_list_; } + + //! Sets the localized name of the parameter. + ParamDesc &set_local_name(const String &n) { local_name_=n; return *this; } + + //! Sets the localized description of the parameter. + ParamDesc &set_description(const String &d) { desc_=d; return *this; } + + //! Sets the group that this parameter is a member of + ParamDesc &set_group(const String &n) { group_=n; return *this; } + + //! Sets a "hint" for the parameter. + ParamDesc &set_hint(const String &h) { hint_=h; return *this; } + + //! \writeme + ParamDesc &set_connect(const String &h) { connect_=h; return *this; } + + //! \writeme + ParamDesc &set_box(const String &h) { box_=h; return *this; } + + //! Sets a flag regarding the duck visibility + ParamDesc &set_invisible_duck(bool x=true) { invisible_duck_=x; return *this; } + + //! Returns the flag regarding duck visibility + bool get_invisible_duck() { return invisible_duck_; } + + + //! \writeme + ParamDesc &set_animation_only(bool x=true) { animation_only_=x; return *this; } + + //! \writeme + bool get_animation_only() { return animation_only_; } + + + //! Sets which parameter is to be used as the origin when the user edits visually. + ParamDesc &set_origin(const String &h) { origin_=h; return *this; } + + //! Sets the scalar value for the parameter + /*! This value determines how the value is to be presented + ** to the user when editing visually. */ + ParamDesc &set_scalar(const Real &n) { scalar_=n; return *this; } + + //! Marks the parameter as not necessary for saving or copying + ParamDesc ¬_critical() { critical_=false; return *this; } + + //! \writeme + ParamDesc &hidden() { hidden_=true; return *this; } + + //! Marks the parameter as only readable. Implies not_critical() + /*! \todo This function needs to be written, as it is only a stub */ + ParamDesc &read_only() { return *this; } + + //! Marks the parameter as only writable. Implies not_critical() + /*! \todo This function needs to be written, as it is only a stub */ + ParamDesc &write_only() { return *this; } + + //! Adds a description of a possible enumeration value + /*! Only relevant if the parameter is of an integer type and hint set to \c "enum" . */ + ParamDesc &add_enum_value(int val, const String &enum_name,const String &enum_local_name) + { enum_list_.push_back(EnumData(val,enum_name,enum_local_name)); return *this; } + + //! Returns the localized name of the parameter + const String &get_local_name()const { return local_name_; } + + //! Returns the name of the parameter + const String &get_name()const { return name_; } + + //! Returns the localized description of the parameter + const String &get_description()const { return desc_; } + + //! Returns the parameter's group + const String &get_group()const { return group_; } + + //! Returns a "hint" about the parameter, regarding how it is to be displayed to the user + const String &get_hint()const { return hint_; } + + //! Returns the name of the parameter that is defined as the "origin". Used for visual editing. + const String &get_origin()const { return origin_; } + + //! \writeme + const String &get_connect()const { return connect_; } + + //! \writeme + const String &get_box()const { return box_; } + + //! Returns the scalar value for the parameter. Used for visual editing. + const Real &get_scalar()const { return scalar_; } + + //! Returns \c true if the layer is critical, \c false otherwise. + bool get_critical()const { return critical_; } + + //! Returns \c true if the layer is hidden, \c false otherwise. + bool get_hidden()const { return hidden_; } + + + + ParamDesc& set_is_distance(bool x=true) { is_distance_=x; return *this;} + bool get_is_distance()const { return is_distance_; } +}; // END of class ParamDesc + +class ParamVocab : public std::list< ParamDesc > +{ +}; + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/pch.h b/synfig-core/src/synfig/pch.h new file mode 100644 index 0000000..dc3c329 --- /dev/null +++ b/synfig-core/src/synfig/pch.h @@ -0,0 +1,37 @@ +/* === S Y N F I G ========================================================= */ +/*! \file pch.h +** \brief Pre-Compiled Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_PCH_H +#define __SYNFIG_PCH_H + +/* === H E A D E R S ======================================================= */ + +#include +#include "synfig.h" + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/polynomial_root.cpp b/synfig-core/src/synfig/polynomial_root.cpp new file mode 100644 index 0000000..5098f3d --- /dev/null +++ b/synfig-core/src/synfig/polynomial_root.cpp @@ -0,0 +1,267 @@ +/* === S Y N F I G ========================================================= */ +/*! \file polynomial_root.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "polynomial_root.h" +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +//using namespace etl; +//using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ +typedef complex Complex; + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +#define EPSS 1.0e-7 +#define MR 8 +#define MT 10 +#define MAXIT (MT*MR) + +/*EPSS is the estimated fractional roundoff error. We try to break (rare) limit +cycles with MR different fractional values, once every MT steps, for MAXIT total allowed iterations. +*/ + +/* Explanation: + + A polynomial can be represented like so: + Pn(x) = (x - x1)(x - x2)...(x - xn) where xi = complex roots + + We can get the following: + ln|Pn(x)| = ln|x - x1| + ln|x - x2| + ... + ln|x - xn| + + G := d ln|Pn(x)| / dx = + +1/(x-x1) + 1/(x-x2) + ... + 1/(x-xn) + + and + + H := - d2 ln|Pn(x)| / d2x = + +1/(x-x1)^2 + 1/(x-x2)^2 + ... + 1/(x-xn)^2 + + which gives + H = [Pn'/Pn]^2 - Pn''/Pn + + Laguerre's formula guesses that the root we are seeking x1 is located + some distance a from our current guess x, and all the other roots are + located at distance b. + + Using this: + + 1/a + (n-1)/b = G + + and + + 1/a^2 + (n-1)/b^2 = H + + which yields this solution for a: + + a = n / G +- sqrt( (n-1)(nH - G^2) ) + + where +- is determined by which ever yields the largest magnitude for the denominator. + a can easily be complex since the factor inside the square-root can be negative. + + This method iterates (x=x-a) until a is sufficiently small. +*/ + +/* Given the degree m and the m+1 complex coefficients a[0..m] of the polynomial sum(i=0,m){a[i]x^i}, +and given a complex value x, this routine improves x by laguerre's method until it converges, +within the achievable roundoff limit, to a root of the given polynomial. The number of iterations taken +is returned as `its'. +*/ +void laguer(Complex a[], int m, Complex *x, int *its) +{ + int iter,j; + float abx, abp, abm, err; + Complex dx,x1,b,d,f,g,h,sq,gp,gm,g2; + + //Fractions used to break a limit cycle + static float frac[MR+1] = {0.0,0.5,0.25,0.75,0.13,0.38,0.62,0.88,1.0}; + + for(iter = 1; iter <= MAXIT; ++iter) + { + *its = iter; //number of iterations so far + + b = a[m]; //the highest coefficient + err = abs(b); //its magnitude + + d = f = Complex(0,0); //clear variables for use + abx = abs(*x); //the magnitude of the current root + + //Efficient computation of the polynomial and its first 2 derivatives + for(j = m-1; j >= 0; --j) + { + f = (*x)*f + d; + d = (*x)*d + b; + b = (*x)*b + a[j]; + + err = abs(b) + abx*err; + } + + //Estimate the roundoff error in evaluation polynomial + err *= EPSS; + + //Are we on the root? + if(abs(b) < err) + { + return; + } + + //General case: use Laguerre's formula + //a = n / G +- sqrt( (n-1)(nH - G^2) ) + //x = x - a + + g = d / b; //get G + g2 = g * g; //for the sqrt calc + + h = g2 - 2.0f * (f / b); //get H + + sq = pow( (float)(m-1) * ((float)m*h - g2), 0.5f ); //get the sqrt + + //get the denominator + gp = g + sq; + gm = g - sq; + + abp = abs(gp); + abm = abs(gm); + + //get the denominator with the highest magnitude + if(abp < abm) + { + abp = abm; + gp = gm; + } + + //if the denominator is positive do one thing, otherwise do the other + dx = (abp > 0.0) ? (float)m / gp : polar((1+abx),(float)iter); + x1 = *x - dx; + + //Have we converged? + if( *x == x1 ) + { + return; + } + + //Every so often take a fractional step, to break any limit cycle (itself a rare occurrence). + if( iter % MT ) + { + *x = x1; + }else + { + *x = *x - (frac[iter/MT]*dx); + } + } + + //very unusual - can occur only for complex roots. Try a different starting guess for the root. + //nrerror("too many iterations in laguer"); + return; +} + +#define EPS 2.0e-6 +#define MAXM 100 //a small number, and maximum anticipated value of m.. + +/* Given the degree m and the m+1 complex coefficients a[0..m] of the polynomial a0 + a1*x +...+ an*x^n + the routine successively calls laguer and finds all m complex roots in roots[1..m]. + The boolean variable polish should be input as true (1) if polishing (also by Laguerre's Method) + is desired, false (0) if the roots will be subsequently polished by other means. +*/ +void RootFinder::find_all_roots(bool polish) +{ + int i,its,j,jj; + Complex x,b,c; + int m = coefs.size()-1; + + //make sure roots is big enough + roots.resize(m); + + if(workcoefs.size() < MAXM) workcoefs.resize(MAXM); + + //Copy the coefficients for successive deflation + for(j = 0; j <= m; ++j) + { + workcoefs[j] = coefs[j]; + } + + //Loop over each root to be found + for(j = m-1; j >= 0; --j) + { + //Start at 0 to favor convergence to smallest remaining root, and find the root + x = Complex(0,0); + laguer(&workcoefs[0],j+1,&x,&its); //must add 1 to get the degree + + //if it is close enough to a real root, then make it so + if(abs(x.imag()) <= 2.0*EPS*abs(x.real())) + { + x = Complex(x.real()); + } + + roots[j] = x; + + //forward deflation + + //the degree is j+1 since j(0,m-1) + b = workcoefs[j+1]; + for(jj = j; jj >= 0; --jj) + { + c = workcoefs[jj]; + workcoefs[jj] = b; + b = x*b + c; + } + } + + //Polish the roots using the undeflated coefficients + if(polish) + { + for(j = 0; j < m; ++j) + { + laguer(&coefs[0],m,&roots[j],&its); + } + } + + //Sort roots by their real parts by straight insertion + for(j = 1; j < m; ++j) + { + x = roots[j]; + for( i = j-1; i >= 1; --i) + { + if(roots[i].real() <= x.real()) break; + roots[i+1] = roots[i]; + } + roots[i+1] = x; + } +} diff --git a/synfig-core/src/synfig/polynomial_root.h b/synfig-core/src/synfig/polynomial_root.h new file mode 100644 index 0000000..09e31e4 --- /dev/null +++ b/synfig-core/src/synfig/polynomial_root.h @@ -0,0 +1,121 @@ +/* === S Y N F I G ========================================================= */ +/*! \file polynomial_root.h +** \brief Polynomial Root Finder Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_POLYNOMIAL_ROOT_H +#define __SYNFIG_POLYNOMIAL_ROOT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ +template < typename T = float, typename F = float > +class Polynomial : public std::vector //a0 + a1x + a2x^2 + ... + anx^n +{ +public: + + //Will maintain all lower constants + void degree(unsigned int d, const T & def = (T)0) { resize(d+1,def); } + unsigned int degree()const { return this->size() - 1; } + + const Polynomial & operator+=(const Polynomial &p) + { + if(p.size() > this->size()) + resize(p.size(), (T)0); + + for(int i = 0; i < p.size(); ++i) + { + (*this)[i] += p[i]; + } + return *this; + } + + const Polynomial & operator-=(const Polynomial &p) + { + if(p.size() > this->size()) + resize(p.size(), (T)0); + + for(int i = 0; i < p.size(); ++i) + { + (*this)[i] -= p[i]; + } + return *this; + } + + const Polynomial & operator*=(const Polynomial &p) + { + if(p.size() < 1) + { + this->resize(0); + return *this; + } + + unsigned int i,j; + std::vector nc(*this); + + //in place for constant stuff + for(i = 0; i < nc.size(); ++i) + { + (*this)[i] *= p[0]; + } + + if(p.size() < 2) return *this; + + this->resize(this->size() + p.degree()); + for(int i = 0; i < nc.size(); ++i) + { + for(int j = 1; j < p.size(); ++j) + { + nc[i+j] += nc[i]*p[j]; + } + } + + return *this; + } +}; + +class RootFinder +{ + std::vector< std::complex > workcoefs; + int its; + +public: + std::vector< std::complex > coefs; //the number of coefficients determines the degree of polynomial + + std::vector< std::complex > roots; + + void find_all_roots(bool polish); +}; + + + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/protocol.h b/synfig-core/src/synfig/protocol.h new file mode 100644 index 0000000..6853066 --- /dev/null +++ b/synfig-core/src/synfig/protocol.h @@ -0,0 +1,68 @@ +/* === S Y N F I G ========================================================= */ +/*! \file protocol.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_PROTOCOL_H +#define __SYNFIG_PROTOCOL_H + +/* === H E A D E R S ======================================================= */ + +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/* + * class Object +{ +public: + + sigc::signal_ + bool find_protocol(Protocol& proto) + { + + } +}; +*/ + +class Protocol +{ +public: + class Type; + +}; // END of class Protocol + +class Protocol::Type +{ +}; // END of class Protocol::Type + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/quick_rng.h b/synfig-core/src/synfig/quick_rng.h new file mode 100644 index 0000000..3924cef --- /dev/null +++ b/synfig-core/src/synfig/quick_rng.h @@ -0,0 +1,85 @@ +/* === S Y N F I G ========================================================= */ +/*! \file quick_rng.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_QUICK_RNG_H +#define __SYNFIG_QUICK_RNG_H + +/* === H E A D E R S ======================================================= */ + +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +// A fast 32-bit linear congruential random number generator +class quick_rng +{ + uint32_t next; +public: + quick_rng(uint32_t seed=0):next(seed) { } + + void set_seed(uint32_t x) + { + next=x; + } + + uint32_t i32() + { + static const uint32_t a(1664525); + static const uint32_t c(1013904223); + + return next=next*a+c; + } + + uint32_t i16() + { + return i32()>>16; + } + + float f() + { + static const float m(int(65535)); + + return float(i16())/m; + } + + uint32_t operator()(const uint32_t& m) + { + if(m==65536) + return i16(); + else + if(m<=65536) + return i16()%m; + else + return i32()%m; + } +}; + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/real.h b/synfig-core/src/synfig/real.h new file mode 100644 index 0000000..abc50c7 --- /dev/null +++ b/synfig-core/src/synfig/real.h @@ -0,0 +1,41 @@ +/* === S Y N F I G ========================================================= */ +/*! \file real.h +** \brief Provides the synfig::Real typedef +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_REAL_H +#define __SYNFIG_REAL_H + +/* === T Y P E D E F S ===================================================== */ + +namespace synfig { + +/*! \typedef Real +** \todo writeme +*/ +typedef double Real; + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/rect.cpp b/synfig-core/src/synfig/rect.cpp new file mode 100644 index 0000000..9f97f9f --- /dev/null +++ b/synfig-core/src/synfig/rect.cpp @@ -0,0 +1,70 @@ +/* === S Y N F I G ========================================================= */ +/*! \file rect.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "rect.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +Rect +Rect::full_plane() +{ + const double infinity(HUGE_VAL); + return Rect(-infinity, -infinity, infinity, infinity); +} + +Rect +Rect::horizontal_strip(const value_type &y1, const value_type &y2) +{ + const double infinity(HUGE_VAL); + return Rect(-infinity, y1, infinity, y2); +} + +Rect +Rect::vertical_strip(const value_type &x1, const value_type &x2) +{ + const double infinity(HUGE_VAL); + return Rect(x1, -infinity, x2, infinity); +} diff --git a/synfig-core/src/synfig/rect.h b/synfig-core/src/synfig/rect.h new file mode 100644 index 0000000..cc21e1f --- /dev/null +++ b/synfig-core/src/synfig/rect.h @@ -0,0 +1,182 @@ +/* === S Y N F I G ========================================================= */ +/*! \file rect.h +** \brief Rectangle Class +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_RECT_H +#define __SYNFIG_RECT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include "real.h" +#include "vector.h" +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class Rect : public etl::rect +{ +public: + + using etl::rect::set_point; + using etl::rect::expand; + using etl::rect::set; + + static Rect full_plane(); + + static Rect horizontal_strip(const value_type &y1, const value_type &y2); + static Rect vertical_strip(const value_type &x1, const value_type &x2); + + static Rect zero() + { + return Rect( + 0, + 0, + 0, + 0 + ); + } + + Rect() { } + + Rect(const Point& x) { set_point(x); } + + Rect(const Point& min, const Point& max) { set_point(min); expand(max); } + + Rect(const value_type &x1,const value_type &y1) { set_point(x1,y1); } + + Rect(const value_type &x1,const value_type &y1, + const value_type &x2,const value_type &y2) + { + set_point(x1,y1); + expand(x2,y2); + } + + void set_point(const Point& max) { set_point(max[0],max[1]); } + + Rect& expand(const Point& max) { expand(max[0],max[1]); return *this; } + + Rect& expand(const Real& r) { minx-=r; miny-=r; maxx+=r; maxy+=r; return *this; } + + Rect& expand_x(const Real& r) { minx-=r; maxx+=r; return *this; } + + Rect& expand_y(const Real& r) { miny-=r; maxy+=r; return *this; } + + Rect& set(const Point& min,const Point& max) { set(min[0],min[1],max[0],max[1]); return *this; } + + Point get_min()const { return Point(minx,miny); } + Point get_max()const { return Point(maxx,maxy); } + + bool is_inside(const Point& x) { return x[0]>minx && x[0]miny && x[1]0.00000001 && area()>0.00000001) + etl::set_intersect(*this,*this,rhs); + else + *this=zero(); + return *this; + } + + Rect& operator|=(const Rect& rhs) + { + if(rhs.area()>0.00000001 && area()>0.00000001) + etl::set_union(*this,*this,rhs); + else + { + if(area() +#endif + +#include "renddesc.h" +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +#undef FLAGS +#define FLAGS(x,y) (((x)&(y))==(y)) + +/* === G L O B A L S ======================================================= */ + +/* === M E T H O D S ======================================================= */ + +RendDesc & +RendDesc::apply(const RendDesc &x) +{ + operator=(x); + return *this; +} + +const Color & +RendDesc::get_bg_color()const +{ + return background; +} + +RendDesc & +RendDesc::set_bg_color(const Color &bg) +{ + background=bg; return *this; +} + +Real +RendDesc::get_physical_w()const +{ + return (Real)get_w()/get_x_res(); +} + +Real +RendDesc::get_physical_h()const +{ + return (Real)get_h()/get_y_res(); +} + +RendDesc& +RendDesc::set_physical_w(Real w) +{ + set_w(round_to_int(w*get_x_res())); + return *this; +} + +RendDesc& +RendDesc::set_physical_h(Real h) +{ + set_h(round_to_int(h*get_y_res())); + return *this; +} + +int +RendDesc::get_w()const +{ + return w_; +} + +RendDesc & +RendDesc::set_w(int x) +{ + if(FLAGS(flags,LINK_PX_ASPECT)) // never set + { + h_=h_*x/w_; + w_=x; + } + else if(FLAGS(flags,LINK_PX_AREA)) // never set + { + //! \writeme + w_=x; + } + else if(FLAGS(flags,PX_ASPECT)) // "Pixel Aspect" + { + Vector d=br_-tl_; + float old_span=get_span(); + + // If we should preserve image width + if( FLAGS(flags,IM_W) // "Image Width" + || (FLAGS(flags,IM_ZOOMIN) && d[1]>d[1]/x*w_) // never set + || (FLAGS(flags,IM_ZOOMOUT) && d[1]d[0]/y*h_) // never set + || (FLAGS(flags,IM_ZOOMOUT) && d[0]time_end) + time_begin=time_end=x; + else + time_begin=x; + return *this; +} + + +const Time +RendDesc::get_time_end()const +{ + return time_end; +} + +RendDesc & +RendDesc::set_time_end(Time x) +{ + if(x +#include "rect.h" + +/* === M A C R O S ========================================================= */ + +#ifndef DPM2DPI +#define DPM2DPI(x) (float(x)/39.3700787402f) +#define DPI2DPM(x) (float(x)*39.3700787402f) +#endif + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/*! \class RendDesc +** \todo writeme +*/ +class RendDesc +{ +public: + enum Lock + { + PX_ASPECT=(1<<0), // "Pixel Aspect" in Locks and Links + PX_AREA=(1<<1), // not used + PX_W=(1<<2), // "Pixel Width" in Locks and Links - not used + PX_H=(1<<3), // "Pixel Height" in Locks and Links - not used + + IM_ASPECT=(1<<4), // "Image Aspect" in Locks and Links + IM_SPAN=(1<<5), // "Image Span" in Locks and Links + IM_W=(1<<6), // "Image Width" in Locks and Links + IM_H=(1<<7), // "Image Height" in Locks and Links + IM_ZOOMIN=(1<<8), // not used + IM_ZOOMOUT=(1<<9), // not used + + LINK_PX_ASPECT=(1<<10), // not used + LINK_PX_AREA=(1<<11), // not used + LINK_IM_ASPECT=(1<<12), // not used + LINK_IM_SPAN=(1<<13), // not used + LINK_IM_CENTER=(1<<14) // not used + }; + +private: + int w_,h_; + Real x_res; + Real y_res; + Point tl_, br_; + Point focus; + int a; + //Gamma gamma; + Color background; + int flags; + bool interlaced; + bool clamp; + + float frame_rate; + Time time_begin, time_end; + +public: + + enum + { + ANTIALIAS_UNIFORM, + ANTIALIAS_MONTE_CARLO, + ANTIALIAS_JITTERED, + ANTIALIAS_ADAPTIVE, + ANTIALIAS_QUINTCUNX + } AntialiasFilter; + + //! Default Constructor + RendDesc(): + w_ (480), + h_ (270), + x_res (DPI2DPM(72.0f)), + y_res (DPI2DPM(72.0f)), + tl_ (-4,2.25), + br_ (4,-2.25), + focus (0,0), + a (2), + background (Color::gray()), + flags (0), + interlaced (false), + clamp (false), + frame_rate (24), + time_begin (0), + time_end (0) + { } + + //! \writeme + RendDesc &apply(const RendDesc &x); + + //! \writeme + const Color &get_bg_color()const; + + //! \writeme + RendDesc &set_bg_color(const Color &bg); + + //! Return the width of the composition in pixels + int get_w()const; + + //! Set the width of the composition in pixels. + /*! The other parameters are adjusted according to the + ** constraints placed on the flags. + */ + RendDesc &set_w(int x); + + //! Return the height of the composition in pixels + int get_h()const; + + //! Set the height of the composition in pixels. + /*! The other parameters are adjusted according to the + ** constraints placed on the flags. + */ + RendDesc &set_h(int y); + + //! Sets the width and height of the composition in pixels + RendDesc &set_wh(int x, int y); + + //! Returns the horizontal resolution (in dots per meter) + Real get_x_res()const; + + //! Sets the horizontal resolution (in dots per meter) + RendDesc &set_x_res(Real x); + + //! Returns the vertical resolution (in dots per meter) + Real get_y_res()const; + + //! Sets the vertical resolution (in dots per meter) + RendDesc &set_y_res(Real y); + + + //! Return the physical width of the composition in meters + Real get_physical_w()const; + + //! Return the physical height of the composition in meters + Real get_physical_h()const; + + //! Set the physical width of the composition in meters + RendDesc &set_physical_w(Real w); + + //! Set the physical height of the composition in meters + RendDesc &set_physical_h(Real h); + + + //! Return the index of the first frame + int get_frame_start()const; + + //! Set the index of the first frame + RendDesc &set_frame_start(int x); + + //! Return the index of the last frame + int get_frame_end()const; + + //! Set the index of the last frame + RendDesc &set_frame_end(int x); + + //! Return the starting time of the animation + const Time get_time_start()const; + + //! Set the time that the animation will start + RendDesc &set_time_start(Time x); + + //! Return the end time of the animation + const Time get_time_end()const; + + //! Set the time that the animation will end + RendDesc &set_time_end(Time x); + + //! Setup for one frame at the given time + RendDesc &set_time(Time x); + + //! Setup for one frame + RendDesc &set_frame(int x); + + //! Return the frame rate (frames-per-second) + const float &get_frame_rate()const; + + //! Set the frame rate (frames-per-second) + RendDesc &set_frame_rate(float x); + + //! Return the status of the interlaced flag + const bool &get_interlaced()const; + + //! Set the interlace flag + RendDesc &set_interlaced(bool x); + + //! Return the status of the clamp flag + const bool &get_clamp()const; + + //! Set the clamp flag + RendDesc &set_clamp(bool x); + + //! Set constraint flags + RendDesc &set_flags(const int &x); + + //! Clear constraint flags + RendDesc &clear_flags(); + + //! Get constraint flags + int get_flags()const; + + //! Return the aspect ratio of a single pixel + Point::value_type get_pixel_aspect()const; + + //! Return the aspect ratio of the entire image + Point::value_type get_image_aspect()const; + + //! Return the antialias amount + const int &get_antialias()const; + + //! Set the antialias amount + RendDesc &set_antialias(const int &x); + + //! Return the distance from the bottom-right to the top-left + Real get_span()const; + + //! Set the span distance + RendDesc& set_span(const Real &x); + + //const Gamma &get_gamma()const; + + //RendDesc &set_gamma(const Gamma &x); + + const Point &get_focus()const; + + RendDesc &set_focus(const Point &x); + + const Point &get_tl()const; + + RendDesc &set_tl(const Point &x); + + const Point &get_br()const; + + RendDesc &set_br(const Point &x); + + Rect get_rect()const { return Rect(get_tl(),get_br()); } + + RendDesc &set_viewport(const Point &__tl, const Point &__br); + + RendDesc &set_viewport(Vector::value_type a,Vector::value_type b,Vector::value_type c,Vector::value_type d); + + //! Returns the width of one pixel + Real get_pw()const; + + //! Returns the height of one pixel + Real get_ph()const; + + //! Sets viewport to represent the screen at the given pixel coordinates + RendDesc &set_subwindow(int x, int y, int w, int h); +}; // END of class RendDesc + +//! This operator allows the combining of RendDesc::Lock flags using the '|' operator +/*! \see RendDesc::Lock, RendDesc */ +inline RendDesc::Lock operator|(RendDesc::Lock lhs, RendDesc::Lock rhs) +{ + return static_cast((int)lhs|(int)rhs); +} + +//! This operator allows the masking of RendDesc::Lock flags using the '&' operator +/*! \see RendDesc::Lock, RendDesc */ +inline RendDesc::Lock operator&(RendDesc::Lock lhs, RendDesc::Lock rhs) +{ + return static_cast((int)lhs&(int)rhs); +} + +//! This operator allows the inverting of RendDesc::Lock flags using the '~' operator +/*! \see RendDesc::Lock, RendDesc */ +inline RendDesc::Lock operator~(RendDesc::Lock rhs) +{ + return static_cast(~(int)rhs); +} + +}; /* end namespace synfig */ + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/render.cpp b/synfig-core/src/synfig/render.cpp new file mode 100644 index 0000000..af58a0e --- /dev/null +++ b/synfig-core/src/synfig/render.cpp @@ -0,0 +1,526 @@ +/* === S Y N F I G ========================================================= */ +/*! \file synfig/render.cpp +** \brief Renderer +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_NO_ANGLE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#ifndef WIN32 +#include +#include +#include +#endif + +#include "render.h" +#include "target.h" +#include "canvas.h" +#include +#include +#include "context.h" +#include "surface.h" + +#endif + +using namespace std; +using namespace synfig; +using namespace etl; + +/* === M A C R O S ========================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +bool +synfig::parametric_render( + Context context, + Surface &surface, + const RendDesc &desc, + ProgressCallback *callback +) +{ + Point::value_type + u,v, // Current location in image + su,sv, // Starting locations + du, dv, // Distance between pixels + dsu,dsv; // Distance between subpixels + + bool + no_clamp=!desc.get_clamp(); + + int + w(desc.get_w()), + h(desc.get_h()), + a(desc.get_antialias()); + + Point + tl(desc.get_tl()), + br(desc.get_br()); + + //Gamma + // gamma(desc.get_gamma()); + + int + x,y, // Current location on output bitmap + x2,y2; // Subpixel counters + + Color::value_type + pool; // Alpha pool (for correct alpha antialiasing) + + // Calculate the number of channels + //chan=channels(desc.get_pixel_format()); + + // Calculate the distance between pixels + du=(br[0]-tl[0])/(Point::value_type)w; + dv=(br[1]-tl[1])/(Point::value_type)h; + + // Calculate the distance between sub pixels + dsu=du/(Point::value_type)a; + dsv=dv/(Point::value_type)a; + + // Calculate the starting points + //su=tl[0]+(du-dsu)/(Point::value_type)2.0; + //sv=tl[1]-(dv-dsv)/(Point::value_type)2.0; + su=tl[0]; + sv=tl[1]; + + surface.set_wh(desc.get_w(),desc.get_h()); + + assert(surface); + + // Loop through all horizontal lines + for(y=0,v=sv;yamount_complete(y,h) == false ) + { + // If the callback returns false, + // then the render has been aborted. + + return false; + } + + // Loop through every pixel in row + for(x=0,u=su;xamount_complete(h,h); + + // Report our success + return(true); +} + +bool +synfig::render( + Context context, + Target_Scanline::Handle target, + const RendDesc &desc, + ProgressCallback *callback) +{ + Point::value_type + u,v, // Current location in image + su,sv, // Starting locations + du, dv, // Distance between pixels + dsu,dsv; // Distance between subpixels + + bool + no_clamp=!desc.get_clamp(); + + int + w(desc.get_w()), + h(desc.get_h()), + a(desc.get_antialias()); + + Point + tl(desc.get_tl()), + br(desc.get_br()); + + //Gamma + // gamma(desc.get_gamma()); + + int + x,y, // Current location on output bitmap + x2,y2; // Subpixel counters + + Color::value_type + pool; // Alpha pool (for correct alpha antialiasing) + + assert(target); + + // If we do not have a target then bail + if(!target) + return false; + + // Calculate the number of channels + //chan=channels(desc.get_pixel_format()); + + // Calculate the distance between pixels + du=(br[0]-tl[0])/(Point::value_type)w; + dv=(br[1]-tl[1])/(Point::value_type)h; + + // Calculate the distance between sub pixels + dsu=du/(Point::value_type)a; + dsv=dv/(Point::value_type)a; + + // Calculate the starting points + su=tl[0]+(du-dsu)/(Point::value_type)2.0; + sv=tl[1]-(dv-dsv)/(Point::value_type)2.0; + + // Mark the start of a new frame. + if(!target->start_frame(callback)) + return false; + + // Loop through all horizontal lines + for(y=0,v=sv;ystart_scanline(y); + + if(!colordata) + { + if(callback)callback->error(_("Target panic")); + else throw(string(_("Target panic"))); + return false; + } + + // If we have a callback that we need + // to report to, do so now. + if(callback) + if( callback->amount_complete(y,h) == false ) + { + // If the callback returns false, + // then the render has been aborted. + // Exit gracefully. + + target->end_scanline(); + target->end_frame(); + return false; + } + + // Loop through every pixel in row + for(x=0,u=su;xend_scanline()) + { + if(callback)callback->error(_("Target panic")); + else throw(string(_("Target panic"))); + return false; + } + } + + // Finish up the target's frame + target->end_frame(); + + // Give the callback one more last call, + // this time with the full height as the + // current line + if(callback) + callback->amount_complete(h,h); + + // Report our success + return(true); +} + +bool +synfig::render_threaded( + Context context, + Target_Scanline::Handle target, + const RendDesc &desc, + ProgressCallback *callback, + int threads) +{ +#ifndef WIN32 + struct _render_thread + { + int + pipe_read, + pipe_write, + pid; + _render_thread() + { + pipe(&pipe_read); + pid=0; + } + ~_render_thread() + { + close(pipe_read); + close(pipe_write); + if(pid) + { + kill(pid,9); + } + } + } *render_thread; + + int i, mythread=-1; + + Point::value_type + u,v, // Current location in image + su,sv, // Starting locations + du, dv, // Distance between pixels + dsu,dsv; // Distance between subpixels + + bool + no_clamp=!desc.get_clamp(); + + int + w(desc.get_w()), + h(desc.get_h()), + a(desc.get_antialias()); + + Point + tl(desc.get_tl()), + br(desc.get_br()); + + int + x,y, // Current location on output bitmap + x2,y2; // Subpixel counters + + Color::value_type + pool; // Alpha pool (for correct alpha antialiasing) + + assert(target); + + // If we do not have a target then bail + if(!target) + return false; + + // Calculate the distance between pixels + du=(br[0]-tl[0])/(Point::value_type)w; + dv=(br[1]-tl[1])/(Point::value_type)h; + + // Calculate the distance between sub pixels + dsu=du/(Point::value_type)a; + dsv=dv/(Point::value_type)a; + + // Calculate the starting points + su=tl[0]+(du-dsu)/(Point::value_type)2.0; + sv=tl[1]-(dv-dsv)/(Point::value_type)2.0; + + render_thread=new _render_thread[threads]; + + // Start the forks + for(i=0;istart_frame(callback)) + return false; + + for(y=0;ystart_scanline(y)); + + if(!colordata) + { + if(callback)callback->error(_("Target panic")); + else throw(string(_("Target panic"))); + return false; + } + + // If we have a callback that we need + // to report to, do so now. + if(callback) + if( callback->amount_complete(y,h) == false ) + { + // If the callback returns false, + // then the render has been aborted. + // Exit gracefully. + + target->end_scanline(); + target->end_frame(); + delete [] render_thread; + return false; + } + + read(render_thread[y%threads].pipe_read,colordata,w*sizeof(Color)); + + // Send the buffer to the render target. + // If anything goes wrong, cleanup and bail. + if(!target->end_scanline()) + { + delete [] render_thread; + if(callback)callback->error(_("Target panic")); + else throw(string(_("Target panic"))); + return false; + } + } + + // Finish up the target's frame + target->end_frame(); + + // Give the callback one more last call, + // this time with the full height as the + // current line + if(callback) + callback->amount_complete(h,h); + + delete [] render_thread; + return true; + +renderthread: + + // Change the random seed, so that each thread has a different one + srand(mythread*20+threads+time(0)); + + Color *buffer(new Color[w]); + + // Loop through all horizontal lines + for(y=mythread,v=sv+dv*(Real)mythread;y + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +//! Renders starting at \a context to \a target +/*! \warning \a Target::set_rend_desc() must have +** already been called on \a target before +** you call this function! +*/ +extern bool render(Context context, Target_Scanline::Handle target, const RendDesc &desc,ProgressCallback *); + +extern bool parametric_render(Context context, Surface &surface, const RendDesc &desc,ProgressCallback *); + +extern bool render_threaded( Context context, + Target_Scanline::Handle target, + const RendDesc &desc, + ProgressCallback *callback, + int threads); + +}; /* end namespace synfig */ + +/* -- E N D ----------------------------------------------------------------- */ + +#endif diff --git a/synfig-core/src/synfig/savecanvas.cpp b/synfig-core/src/synfig/savecanvas.cpp new file mode 100644 index 0000000..a2ae0d9 --- /dev/null +++ b/synfig-core/src/synfig/savecanvas.cpp @@ -0,0 +1,814 @@ +/* === S Y N F I G ========================================================= */ +/*! \file savecanvas.cpp +** \brief Writeme +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#ifdef HAVE_SYS_ERRNO_H +# include +#endif + +#include "savecanvas.h" +#include "general.h" +#include "valuenode.h" +#include "valuenode_subtract.h" +#include "valuenode_animated.h" +#include "valuenode_composite.h" +#include "valuenode_const.h" +#include "valuenode_linear.h" +#include "valuenode_dynamiclist.h" +#include "valuenode_reference.h" +#include "valuenode_segcalctangent.h" +#include "valuenode_segcalcvertex.h" +#include "valuenode_bline.h" +#include "time.h" +#include "keyframe.h" +#include "layer.h" +#include "string.h" +#include "paramdesc.h" + +#include +#include +#include "gradient.h" +#include + +extern "C" { +#include +} + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +#define COLOR_VALUE_TYPE_FORMAT "%f" +#define VECTOR_VALUE_TYPE_FORMAT "%0.10f" +#define TIME_TYPE_FORMAT "%0.3f" +#define VIEW_BOX_FORMAT "%f %f %f %f" + +/* === G L O B A L S ======================================================= */ + +ReleaseVersion save_canvas_version = ReleaseVersion(RELEASE_VERSION_END-1); +int valuenode_too_new_count; + +/* === P R O C E D U R E S ================================================= */ + +xmlpp::Element* encode_canvas(xmlpp::Element* root,Canvas::ConstHandle canvas); +xmlpp::Element* encode_value_node(xmlpp::Element* root,ValueNode::ConstHandle value_node,Canvas::ConstHandle canvas); + +xmlpp::Element* encode_keyframe(xmlpp::Element* root,const Keyframe &kf, float fps) +{ + root->set_name("keyframe"); + root->set_attribute("time",kf.get_time().get_string(fps)); + if(!kf.get_description().empty()) + root->set_child_text(kf.get_description()); + return root; +} + + +xmlpp::Element* encode_real(xmlpp::Element* root,Real v) +{ + root->set_name("real"); + root->set_attribute("value",strprintf(VECTOR_VALUE_TYPE_FORMAT,v)); + return root; +} + +xmlpp::Element* encode_time(xmlpp::Element* root,Time t, float /*fps*/=0) +{ + root->set_name("time"); + //root->set_attribute("value",t.get_string(fps)); + root->set_attribute("value",t.get_string()); + return root; +} + +xmlpp::Element* encode_integer(xmlpp::Element* root,int i) +{ + root->set_name("integer"); + root->set_attribute("value",strprintf("%i",i)); + return root; +} + +xmlpp::Element* encode_bool(xmlpp::Element* root,bool b) +{ + root->set_name("bool"); + root->set_attribute("value",b?"true":"false"); + return root; +} + +xmlpp::Element* encode_string(xmlpp::Element* root,const String &str) +{ + root->set_name("string"); + root->set_child_text(str); + return root; +} + +xmlpp::Element* encode_vector(xmlpp::Element* root,Vector vect) +{ + root->set_name("vector"); + root->add_child("x")->set_child_text(strprintf(VECTOR_VALUE_TYPE_FORMAT,(float)vect[0])); + root->add_child("y")->set_child_text(strprintf(VECTOR_VALUE_TYPE_FORMAT,(float)vect[1])); + return root; +} + +xmlpp::Element* encode_color(xmlpp::Element* root,Color color) +{ + root->set_name("color"); + root->add_child("r")->set_child_text(strprintf(COLOR_VALUE_TYPE_FORMAT,(float)color.get_r())); + root->add_child("g")->set_child_text(strprintf(COLOR_VALUE_TYPE_FORMAT,(float)color.get_g())); + root->add_child("b")->set_child_text(strprintf(COLOR_VALUE_TYPE_FORMAT,(float)color.get_b())); + root->add_child("a")->set_child_text(strprintf(COLOR_VALUE_TYPE_FORMAT,(float)color.get_a())); + return root; +} + +xmlpp::Element* encode_angle(xmlpp::Element* root,Angle theta) +{ + root->set_name("angle"); + root->set_attribute("value",strprintf("%f",(float)Angle::deg(theta).get())); + return root; +} + +xmlpp::Element* encode_segment(xmlpp::Element* root,Segment seg) +{ + root->set_name("segment"); + encode_vector(root->add_child("p1")->add_child("vector"),seg.p1); + encode_vector(root->add_child("t1")->add_child("vector"),seg.t1); + encode_vector(root->add_child("p2")->add_child("vector"),seg.p2); + encode_vector(root->add_child("t2")->add_child("vector"),seg.t2); + return root; +} + +xmlpp::Element* encode_bline_point(xmlpp::Element* root,BLinePoint bline_point) +{ + root->set_name(ValueBase::type_name(ValueBase::TYPE_BLINEPOINT)); + + encode_vector(root->add_child("vertex")->add_child("vector"),bline_point.get_vertex()); + encode_vector(root->add_child("t1")->add_child("vector"),bline_point.get_tangent1()); + + if(bline_point.get_split_tangent_flag()) + encode_vector(root->add_child("t2")->add_child("vector"),bline_point.get_tangent2()); + + encode_real(root->add_child("width")->add_child("real"),bline_point.get_width()); + encode_real(root->add_child("origin")->add_child("real"),bline_point.get_origin()); + return root; +} + +xmlpp::Element* encode_gradient(xmlpp::Element* root,Gradient x) +{ + root->set_name("gradient"); + + Gradient::const_iterator iter; + x.sort(); + for(iter=x.begin();iter!=x.end();iter++) + { + xmlpp::Element *cpoint(encode_color(root->add_child("color"),iter->color)); + cpoint->set_attribute("pos",strprintf("%f",iter->pos)); + } + return root; +} + + +xmlpp::Element* encode_value(xmlpp::Element* root,const ValueBase &data,Canvas::ConstHandle canvas=0); + +xmlpp::Element* encode_list(xmlpp::Element* root,std::list list, Canvas::ConstHandle canvas=0) +{ + root->set_name("list"); + + while(!list.empty()) + { + encode_value(root->add_child("value"),list.front(),canvas); + list.pop_front(); + } + + return root; +} + +xmlpp::Element* encode_value(xmlpp::Element* root,const ValueBase &data,Canvas::ConstHandle canvas) +{ + switch(data.get_type()) + { + case ValueBase::TYPE_REAL: + return encode_real(root,data.get(Real())); + case ValueBase::TYPE_TIME: + if(canvas) + return encode_time(root,data.get(Time()),canvas->rend_desc().get_frame_rate()); + else + return encode_time(root,data.get(Time())); + case ValueBase::TYPE_INTEGER: + return encode_integer(root,data.get(int())); + case ValueBase::TYPE_COLOR: + return encode_color(root,data.get(Color())); + case ValueBase::TYPE_VECTOR: + return encode_vector(root,data.get(Vector())); + case ValueBase::TYPE_ANGLE: + return encode_angle(root,data.get(Angle())); + case ValueBase::TYPE_BOOL: + return encode_bool(root,data.get(bool())); + case ValueBase::TYPE_STRING: + return encode_string(root,data.get(String())); + case ValueBase::TYPE_SEGMENT: + return encode_segment(root,data.get(Segment())); + case ValueBase::TYPE_BLINEPOINT: + return encode_bline_point(root,data.get(BLinePoint())); + case ValueBase::TYPE_GRADIENT: + return encode_gradient(root,data.get(Gradient())); + case ValueBase::TYPE_LIST: + return encode_list(root,data,canvas); + case ValueBase::TYPE_CANVAS: + return encode_canvas(root,data.get(Canvas::Handle()).get()); + case ValueBase::TYPE_NIL: + synfig::error("Encountered NIL ValueBase"); + root->set_name("nil"); + return root; + default: + synfig::error(strprintf(_("Unknown value(%s), cannot create XML representation!"),ValueBase::type_local_name(data.get_type()).c_str())); + root->set_name("nil"); + return root; + } +} + +xmlpp::Element* encode_animated(xmlpp::Element* root,ValueNode_Animated::ConstHandle value_node,Canvas::ConstHandle canvas=0) +{ + assert(value_node); + root->set_name("animated"); + + root->set_attribute("type",ValueBase::type_name(value_node->get_type())); + + const ValueNode_Animated::WaypointList &waypoint_list=value_node->waypoint_list(); + ValueNode_Animated::WaypointList::const_iterator iter; + + for(iter=waypoint_list.begin();iter!=waypoint_list.end();++iter) + { + xmlpp::Element *waypoint_node=root->add_child("waypoint"); + //waypoint_node->set_attribute("time",iter->get_time().get_string(canvas->rend_desc().get_frame_rate())); + waypoint_node->set_attribute("time",iter->get_time().get_string()); + + //waypoint_node->add_child(encode_value(iter->get_value(),canvas)); + if(iter->get_value_node()->is_exported()) + waypoint_node->set_attribute("use",iter->get_value_node()->get_relative_id(canvas)); + else { + ValueNode::ConstHandle value_node = iter->get_value_node(); + if(ValueNode_Const::ConstHandle::cast_dynamic(value_node)) { + const ValueBase data = ValueNode_Const::ConstHandle::cast_dynamic(value_node)->get_value(); + if (data.get_type() == ValueBase::TYPE_CANVAS) + waypoint_node->set_attribute("use",data.get(Canvas::Handle()).get()->get_relative_id(canvas)); + else + encode_value_node(waypoint_node->add_child("value_node"),iter->get_value_node(),canvas); + } + else + encode_value_node(waypoint_node->add_child("value_node"),iter->get_value_node(),canvas); + } + + switch(iter->get_before()) + { + case INTERPOLATION_HALT: + waypoint_node->set_attribute("before","halt"); + break; + case INTERPOLATION_LINEAR: + waypoint_node->set_attribute("before","linear"); + break; + case INTERPOLATION_MANUAL: + waypoint_node->set_attribute("before","manual"); + break; + case INTERPOLATION_CONSTANT: + waypoint_node->set_attribute("before","constant"); + break; + case INTERPOLATION_TCB: + waypoint_node->set_attribute("before","auto"); + break; + default: + error("Unknown waypoint type for \"before\" attribute"); + } + + switch(iter->get_after()) + { + case INTERPOLATION_HALT: + waypoint_node->set_attribute("after","halt"); + break; + case INTERPOLATION_LINEAR: + waypoint_node->set_attribute("after","linear"); + break; + case INTERPOLATION_MANUAL: + waypoint_node->set_attribute("after","manual"); + break; + case INTERPOLATION_CONSTANT: + waypoint_node->set_attribute("after","constant"); + break; + case INTERPOLATION_TCB: + waypoint_node->set_attribute("after","auto"); + break; + default: + error("Unknown waypoint type for \"after\" attribute"); + } + + if(iter->get_tension()!=0.0) + waypoint_node->set_attribute("tension",strprintf("%f",iter->get_tension())); + if(iter->get_temporal_tension()!=0.0) + waypoint_node->set_attribute("temporal-tension",strprintf("%f",iter->get_temporal_tension())); + if(iter->get_continuity()!=0.0) + waypoint_node->set_attribute("continuity",strprintf("%f",iter->get_continuity())); + if(iter->get_bias()!=0.0) + waypoint_node->set_attribute("bias",strprintf("%f",iter->get_bias())); + + } + + return root; +} + +xmlpp::Element* encode_subtract(xmlpp::Element* root,ValueNode_Subtract::ConstHandle value_node,Canvas::ConstHandle canvas=0) +{ + assert(value_node); + root->set_name("subtract"); + + ValueNode::ConstHandle lhs=value_node->get_lhs(); + ValueNode::ConstHandle rhs=value_node->get_rhs(); + ValueNode::ConstHandle scalar=value_node->get_scalar(); + + assert(lhs); + assert(rhs); + + root->set_attribute("type",ValueBase::type_name(value_node->get_type())); + + if(lhs==rhs) + warning("LHS is equal to RHS, this will always be zero!"); + + //if(value_node->get_scalar()!=1) + // root->set_attribute("scalar",strprintf(VECTOR_VALUE_TYPE_FORMAT,value_node->get_scalar())); + + if(!scalar->get_id().empty()) + root->set_attribute("scalar",scalar->get_relative_id(canvas)); + else + encode_value_node(root->add_child("scalar")->add_child("value_node"),scalar,canvas); + + if(!lhs->get_id().empty()) + root->set_attribute("lhs",lhs->get_relative_id(canvas)); + else + encode_value_node(root->add_child("lhs")->add_child("value_node"),lhs,canvas); + + if(!rhs->get_id().empty()) + root->set_attribute("rhs",rhs->get_relative_id(canvas)); + else + encode_value_node(root->add_child("rhs")->add_child("value_node"),rhs,canvas); + + return root; +} + +xmlpp::Element* encode_dynamic_list(xmlpp::Element* root,ValueNode_DynamicList::ConstHandle value_node,Canvas::ConstHandle canvas=0) +{ + assert(value_node); + const float fps(canvas?canvas->rend_desc().get_frame_rate():0); + + root->set_name(value_node->get_name()); + + root->set_attribute("type",ValueBase::type_name(value_node->get_contained_type())); + + vector::const_iterator iter; + + ValueNode_BLine::ConstHandle bline_value_node(ValueNode_BLine::ConstHandle::cast_dynamic(value_node)); + + if(bline_value_node) + { + if(bline_value_node->get_loop()) + root->set_attribute("loop","true"); + else + root->set_attribute("loop","false"); + } + + for(iter=value_node->list.begin();iter!=value_node->list.end();++iter) + { + xmlpp::Element *entry_node=root->add_child("entry"); + assert(iter->value_node); + if(!iter->value_node->get_id().empty()) + entry_node->set_attribute("use",iter->value_node->get_relative_id(canvas)); + else + encode_value_node(entry_node->add_child("value_node"),iter->value_node,canvas); + + // process waypoints + { + typedef synfig::ValueNode_DynamicList::ListEntry::Activepoint Activepoint; + typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; + String begin_sequence; + String end_sequence; + + const ActivepointList& timing_info(iter->timing_info); + ActivepointList::const_iterator entry_iter; + + for(entry_iter=timing_info.begin();entry_iter!=timing_info.end();++entry_iter) + if(entry_iter->state==true) + { + if(entry_iter->priority) + begin_sequence+=strprintf("p%d ",entry_iter->priority); + begin_sequence+=entry_iter->time.get_string(fps)+", "; + } + else + { + if(entry_iter->priority) + end_sequence+=strprintf("p%d ",entry_iter->priority); + end_sequence+=entry_iter->time.get_string(fps)+", "; + } + + // If this is just a plane-jane vanilla entry, + // then don't bother with begins and ends + if(end_sequence.empty() && begin_sequence=="SOT, ") + begin_sequence.clear(); + + if(!begin_sequence.empty()) + { + // Remove the last ", " stuff + begin_sequence=String(begin_sequence.begin(),begin_sequence.end()-2); + // Add the attribute + entry_node->set_attribute("on",begin_sequence); + } + + if(!end_sequence.empty()) + { + // Remove the last ", " stuff + end_sequence=String(end_sequence.begin(),end_sequence.end()-2); + // Add the attribute + entry_node->set_attribute("off",end_sequence); + } + } + } + + return root; +} + +// Generic linkable data node entry +xmlpp::Element* encode_linkable_value_node(xmlpp::Element* root,LinkableValueNode::ConstHandle value_node,Canvas::ConstHandle canvas=0) +{ + assert(value_node); + + String name(value_node->get_name()); + ReleaseVersion saving_version(get_file_version()); + ReleaseVersion feature_version(LinkableValueNode::book()[name].release_version); + + if (saving_version < feature_version) + { + valuenode_too_new_count++; + warning("can't save <%s> valuenodes in this old file format version", name.c_str()); + + ValueBase value((*value_node)(0)); + encode_value(root,value,canvas); + + // ValueNode_Const::ConstHandle const_value(ValueNode_Const::create((*value_node)(0))); + // encode_value_node(root,const_value,canvas); + + return root; + } + + root->set_name(name); + + root->set_attribute("type",ValueBase::type_name(value_node->get_type())); + + int i; + for(i=0;ilink_count();i++) + { + ValueNode::ConstHandle link=value_node->get_link(i).constant(); + if(!link) + throw runtime_error("Bad link"); + if(link->is_exported()) + root->set_attribute(value_node->link_name(i),link->get_relative_id(canvas)); + else + encode_value_node(root->add_child(value_node->link_name(i))->add_child("value_node"),link,canvas); + } + + return root; +} + +xmlpp::Element* encode_value_node(xmlpp::Element* root,ValueNode::ConstHandle value_node,Canvas::ConstHandle canvas) +{ + assert(value_node); + + if(ValueNode_Animated::ConstHandle::cast_dynamic(value_node)) + encode_animated(root,ValueNode_Animated::ConstHandle::cast_dynamic(value_node),canvas); + else + if(ValueNode_Subtract::ConstHandle::cast_dynamic(value_node)) + encode_subtract(root,ValueNode_Subtract::ConstHandle::cast_dynamic(value_node),canvas); + else + if(ValueNode_DynamicList::ConstHandle::cast_dynamic(value_node)) + encode_dynamic_list(root,ValueNode_DynamicList::ConstHandle::cast_dynamic(value_node),canvas); + else if(ValueNode_Const::ConstHandle::cast_dynamic(value_node)) + { + encode_value(root,ValueNode_Const::ConstHandle::cast_dynamic(value_node)->get_value(),canvas); + } + else + if(LinkableValueNode::ConstHandle::cast_dynamic(value_node)) + encode_linkable_value_node(root,LinkableValueNode::ConstHandle::cast_dynamic(value_node),canvas); + else + { + error(_("Unknown ValueNode Type (%s), cannot create an XML representation"),value_node->get_local_name().c_str()); + root->set_name("nil"); + } + + assert(root); + + if(!value_node->get_id().empty()) + root->set_attribute("id",value_node->get_id()); + + if(value_node->rcount()>1) + root->set_attribute("guid",(value_node->get_guid()^canvas->get_root()->get_guid()).get_string()); + + return root; +} + +xmlpp::Element* encode_layer(xmlpp::Element* root,Layer::ConstHandle layer) +{ + root->set_name("layer"); + + root->set_attribute("type",layer->get_name()); + root->set_attribute("active",layer->active()?"true":"false"); + + if(!layer->get_version().empty()) + root->set_attribute("version",layer->get_version()); + if(!layer->get_description().empty()) + root->set_attribute("desc",layer->get_description()); + if(!layer->get_group().empty()) + root->set_attribute("group",layer->get_group()); + + Layer::Vocab vocab(layer->get_param_vocab()); + Layer::Vocab::const_iterator iter; + + const Layer::DynamicParamList &dynamic_param_list=layer->dynamic_param_list(); + + for(iter=vocab.begin();iter!=vocab.end();++iter) + { + // Handle dynamic parameters + if(dynamic_param_list.count(iter->get_name())) + { + xmlpp::Element *node=root->add_child("param"); + node->set_attribute("name",iter->get_name()); + + handle value_node=dynamic_param_list.find(iter->get_name())->second; + + // If the valuenode has no ID, then it must be defined in-place + if(value_node->get_id().empty()) + { + encode_value_node(node->add_child("value_node"),value_node,layer->get_canvas().constant()); + } + else + { + node->set_attribute("use",value_node->get_relative_id(layer->get_canvas())); + } + } + else // Handle normal parameters + if(iter->get_critical()) + { + ValueBase value=layer->get_param(iter->get_name()); + if(!value.is_valid()) + { + error("Layer doesn't know its own vocabulary -- "+iter->get_name()); + continue; + } + + if(value.get_type()==ValueBase::TYPE_CANVAS) + { + // the ->is_inline() below was crashing if the canvas + // contained a PasteCanvas with the default Canvas setting; this avoids the crash + if (!value.get(Canvas::LooseHandle())) + continue; + + if (!value.get(Canvas::LooseHandle())->is_inline()) + { + Canvas::Handle child(value.get(Canvas::LooseHandle())); + + if(!value.get(Canvas::Handle())) + continue; + xmlpp::Element *node=root->add_child("param"); + node->set_attribute("name",iter->get_name()); + node->set_attribute("use",child->get_relative_id(layer->get_canvas())); + continue; + } + } + xmlpp::Element *node=root->add_child("param"); + node->set_attribute("name",iter->get_name()); + + encode_value(node->add_child("value"),value,layer->get_canvas().constant()); + } + } + + + return root; +} + +xmlpp::Element* encode_canvas(xmlpp::Element* root,Canvas::ConstHandle canvas) +{ + assert(canvas); + const RendDesc &rend_desc=canvas->rend_desc(); + root->set_name("canvas"); + + if(canvas->is_root()) + root->set_attribute("version",canvas->get_version()); + + if(!canvas->get_id().empty() && !canvas->is_root() && !canvas->is_inline()) + root->set_attribute("id",canvas->get_id()); + + if(!canvas->parent() || canvas->parent()->rend_desc().get_w()!=canvas->rend_desc().get_w()) + root->set_attribute("width",strprintf("%d",rend_desc.get_w())); + + if(!canvas->parent() || canvas->parent()->rend_desc().get_h()!=canvas->rend_desc().get_h()) + root->set_attribute("height",strprintf("%d",rend_desc.get_h())); + + if(!canvas->parent() || canvas->parent()->rend_desc().get_x_res()!=canvas->rend_desc().get_x_res()) + root->set_attribute("xres",strprintf("%f",rend_desc.get_x_res())); + + if(!canvas->parent() || canvas->parent()->rend_desc().get_y_res()!=canvas->rend_desc().get_y_res()) + root->set_attribute("yres",strprintf("%f",rend_desc.get_y_res())); + + + if(!canvas->parent() || + canvas->parent()->rend_desc().get_tl()!=canvas->rend_desc().get_tl() || + canvas->parent()->rend_desc().get_br()!=canvas->rend_desc().get_br()) + root->set_attribute("view-box",strprintf(VIEW_BOX_FORMAT, + rend_desc.get_tl()[0], + rend_desc.get_tl()[1], + rend_desc.get_br()[0], + rend_desc.get_br()[1]) + ); + + if(!canvas->parent() || canvas->parent()->rend_desc().get_antialias()!=canvas->rend_desc().get_antialias()) + root->set_attribute("antialias",strprintf("%d",rend_desc.get_antialias())); + + if(!canvas->parent()) + root->set_attribute("fps",strprintf(TIME_TYPE_FORMAT,rend_desc.get_frame_rate())); + + if(!canvas->parent() || canvas->parent()->rend_desc().get_time_start()!=canvas->rend_desc().get_time_start()) + root->set_attribute("begin-time",rend_desc.get_time_start().get_string(rend_desc.get_frame_rate())); + + if(!canvas->parent() || canvas->parent()->rend_desc().get_time_end()!=canvas->rend_desc().get_time_end()) + root->set_attribute("end-time",rend_desc.get_time_end().get_string(rend_desc.get_frame_rate())); + + if(!canvas->is_inline()) + { + root->set_attribute("bgcolor",strprintf(VIEW_BOX_FORMAT, + rend_desc.get_bg_color().get_r(), + rend_desc.get_bg_color().get_g(), + rend_desc.get_bg_color().get_b(), + rend_desc.get_bg_color().get_a()) + ); + + if(!canvas->get_name().empty()) + root->add_child("name")->set_child_text(canvas->get_name()); + if(!canvas->get_description().empty()) + root->add_child("desc")->set_child_text(canvas->get_description()); + if(!canvas->get_author().empty()) + root->add_child("author")->set_child_text(canvas->get_description()); + + std::list meta_keys(canvas->get_meta_data_keys()); + while(!meta_keys.empty()) + { + xmlpp::Element* meta_element(root->add_child("meta")); + meta_element->set_attribute("name",meta_keys.front()); + meta_element->set_attribute("content",canvas->get_meta_data(meta_keys.front())); + meta_keys.pop_front(); + } + for(KeyframeList::const_iterator iter=canvas->keyframe_list().begin();iter!=canvas->keyframe_list().end();++iter) + encode_keyframe(root->add_child("keyframe"),*iter,canvas->rend_desc().get_frame_rate()); + } + + // Output the section + //! \todo check where the parentheses should really go - around the && or the ||? + if((!canvas->is_inline() && !canvas->value_node_list().empty()) || !canvas->children().empty()) + { + xmlpp::Element *node=root->add_child("defs"); + const ValueNodeList &value_node_list(canvas->value_node_list()); + + for(ValueNodeList::const_iterator iter=value_node_list.begin();iter!=value_node_list.end();++iter) + { + // If the value_node is a constant, then use the shorthand + if(handle::cast_dynamic(*iter)) + { + ValueNode_Const::Handle value_node(ValueNode_Const::Handle::cast_dynamic(*iter)); + reinterpret_cast(encode_value(node->add_child("value"),value_node->get_value()))->set_attribute("id",value_node->get_id()); + continue; + } + encode_value_node(node->add_child("value_node"),*iter,canvas); + // writeme + } + + for(Canvas::Children::const_iterator iter=canvas->children().begin();iter!=canvas->children().end();++iter) + { + encode_canvas(node->add_child("canvas"),*iter); + } + } + + Canvas::const_reverse_iterator iter; + + for(iter=canvas->rbegin();iter!=canvas->rend();++iter) + encode_layer(root->add_child("layer"),*iter); + + return root; +} + +xmlpp::Element* encode_canvas_toplevel(xmlpp::Element* root,Canvas::ConstHandle canvas) +{ + valuenode_too_new_count = 0; + + xmlpp::Element* ret = encode_canvas(root, canvas); + + if (valuenode_too_new_count) + warning("saved %d valuenodes as constant values in old file format\n", valuenode_too_new_count); + + return ret; +} + +bool +synfig::save_canvas(const String &filename, Canvas::ConstHandle canvas) +{ + ChangeLocale change_locale(LC_NUMERIC, "C"); + + synfig::String tmp_filename(filename+".TMP"); + + if (filename_extension(filename) == ".sifz") + xmlSetCompressMode(9); + else + xmlSetCompressMode(0); + + try + { + assert(canvas); + xmlpp::Document document; + + encode_canvas_toplevel(document.create_root_node("canvas"),canvas); + + document.write_to_file_formatted(tmp_filename); + +#ifdef _WIN32 + // On Win32 platforms, rename() has bad behavior. work around it. + char old_file[80]="sif.XXXXXXXX"; + mktemp(old_file); + rename(filename.c_str(),old_file); + if(rename(tmp_filename.c_str(),filename.c_str())!=0) + { + rename(old_file,tmp_filename.c_str()); + synfig::error("synfig::save_canvas(): Unable to rename file to correct filename, errno=%d",errno); + return false; + } + remove(old_file); +#else + if(rename(tmp_filename.c_str(),filename.c_str())!=0) + { + synfig::error("synfig::save_canvas(): Unable to rename file to correct filename, errno=%d",errno); + return false; + } +#endif + } + catch(...) { synfig::error("synfig::save_canvas(): Caught unknown exception"); return false; } + + return true; +} + +String +synfig::canvas_to_string(Canvas::ConstHandle canvas) +{ + ChangeLocale change_locale(LC_NUMERIC, "C"); + assert(canvas); + + xmlpp::Document document; + + encode_canvas_toplevel(document.create_root_node("canvas"),canvas); + + return document.write_to_string_formatted(); +} + +void +synfig::set_file_version(ReleaseVersion version) +{ + save_canvas_version = version; +} + +ReleaseVersion +synfig::get_file_version() +{ + return save_canvas_version; +} diff --git a/synfig-core/src/synfig/savecanvas.h b/synfig-core/src/synfig/savecanvas.h new file mode 100644 index 0000000..93a3486 --- /dev/null +++ b/synfig-core/src/synfig/savecanvas.h @@ -0,0 +1,59 @@ +/* === S Y N F I G ========================================================= */ +/*! \file savecanvas.h +** \brief writeme +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_SAVECANVAS_H +#define __SYNFIG_SAVECANVAS_H + +/* === H E A D E R S ======================================================= */ + +#include "string.h" +#include "canvas.h" +#include "releases.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/* === E X T E R N S ======================================================= */ + +//! Saves a canvas to \a filename +/*! \return \c true on success, \c false on error. */ +bool save_canvas(const String &filename, Canvas::ConstHandle canvas); + +//! Stores a Canvas in a string in XML format +String canvas_to_string(Canvas::ConstHandle canvas); + +void set_file_version(ReleaseVersion version); +ReleaseVersion get_file_version(); + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/segment.h b/synfig-core/src/synfig/segment.h new file mode 100644 index 0000000..30239f6 --- /dev/null +++ b/synfig-core/src/synfig/segment.h @@ -0,0 +1,67 @@ +/* === S Y N F I G ========================================================= */ +/*! \file segment.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_SEGMENT_H +#define __SYNFIG_SEGMENT_H + +/* === H E A D E R S ======================================================= */ + +#include "vector.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/*! \struct Segment +** \todo writeme +*/ +struct Segment +{ + Point p1,p2; + Vector t1,t2; + + Segment() { } + Segment(Point p1,Vector t1,Point p2, Vector t2): + p1(p1), + p2(p2), + t1(t1), + t2(t2) + { } + Segment(Point p1,Point p2): + p1(p1), + p2(p2), + t1(p2-p1), + t2(p2-p1) + { } +}; // END of struct Segment + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/smartfile.h b/synfig-core/src/synfig/smartfile.h new file mode 100644 index 0000000..2e21ffc --- /dev/null +++ b/synfig-core/src/synfig/smartfile.h @@ -0,0 +1,52 @@ +/* === S Y N F I G ========================================================= */ +/*! \file smartfile.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_SMARTFILE_H +#define __SYNFIG_SMARTFILE_H + +/* === H E A D E R S ======================================================= */ + +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +struct _FILE_deleter +{ + void operator()(FILE* x)const { if(x!=stdout && x!=stdin) fclose(x); } +}; + +typedef etl::smart_ptr SmartFILE; + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/string.h b/synfig-core/src/synfig/string.h new file mode 100644 index 0000000..8296bbb --- /dev/null +++ b/synfig-core/src/synfig/string.h @@ -0,0 +1,62 @@ +/* === S Y N F I G ========================================================= */ +/*! \file string.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_STRING_H +#define __SYNFIG_STRING_H + +/* === H E A D E R S ======================================================= */ + +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +/* +namespace std +{ +template struct char_traits; +template<> struct char_traits; +template class allocator; +templateclass basic_string; +typedef basic_string,allocator > string; + +}; // END of namespace std +*/ + +namespace synfig +{ + +/*! \typedef String +** \todo writeme +*/ +typedef std::string String; + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/string_decl.h b/synfig-core/src/synfig/string_decl.h new file mode 100644 index 0000000..9dba339 --- /dev/null +++ b/synfig-core/src/synfig/string_decl.h @@ -0,0 +1,58 @@ +/* === S Y N F I G ========================================================= */ +/*! \file string_decl.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_STRING_DECL_H +#define __SYNFIG_STRING_DECL_H + +/* === H E A D E R S ======================================================= */ + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace std +{ +template struct char_traits; +template<> struct char_traits; +template class allocator; +templateclass basic_string; +typedef basic_string,allocator > string; + +}; // END of namespace std + +namespace synfig +{ + +/*! \typedef String +** \todo writeme +*/ +typedef std::string String; + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/surface.cpp b/synfig-core/src/synfig/surface.cpp new file mode 100644 index 0000000..91e1663 --- /dev/null +++ b/synfig-core/src/synfig/surface.cpp @@ -0,0 +1,242 @@ +/* === S Y N F I G ========================================================= */ +/*! \file surface.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +** +** === N O T E S =========================================================== +** +** ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_NO_ANGLE + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "canvas.h" +#include "surface.h" +#include "target_scanline.h" +#include "general.h" + +#ifdef HAS_VIMAGE +#include +#endif + +#endif + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +class target2surface : public synfig::Target_Scanline +{ +public: + Surface *surface; + bool sized; +public: + target2surface(Surface *surface); + virtual ~target2surface(); + + virtual bool set_rend_desc(synfig::RendDesc *newdesc); + + virtual bool start_frame(synfig::ProgressCallback *cb); + + virtual void end_frame(); + + virtual Color * start_scanline(int scanline); + + virtual bool end_scanline(); +}; + +target2surface::target2surface(Surface *surface):surface(surface) +{ +} + +target2surface::~target2surface() +{ +} + +bool +target2surface::set_rend_desc(synfig::RendDesc *newdesc) +{ + assert(newdesc); + assert(surface); + desc=*newdesc; + return synfig::Target_Scanline::set_rend_desc(newdesc); +} + +bool +target2surface::start_frame(synfig::ProgressCallback */*cb*/) +{ + if(surface->get_w() != desc.get_w() || surface->get_h() != desc.get_h()) + { + surface->set_wh(desc.get_w(),desc.get_h()); + } + return true; +} + +void +target2surface::end_frame() +{ + return; +} + +Color * +target2surface::start_scanline(int scanline) +{ + return (*surface)[scanline]; +} + +bool +target2surface::end_scanline() +{ + return true; +} + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +Target_Scanline::Handle +synfig::surface_target(Surface *surface) +{ + return Target_Scanline::Handle(new target2surface(surface)); +} + +void +synfig::Surface::clear() +{ +#ifdef HAS_VIMAGE + fill(Color(0.5,0.5,0.5,0.0000001)); +#else + etl::surface::clear(); +#endif +} + +void +synfig::Surface::blit_to(alpha_pen& pen, int x, int y, int w, int h) +{ + static const float epsilon(0.00001); + const float alpha(pen.get_alpha()); + if( pen.get_blend_method()==Color::BLEND_STRAIGHT && fabs(alpha-1.0f)=get_w() || y>=get_w()) + return; + + //clip source origin + if(x<0) + { + w+=x; //decrease + x=0; + } + + if(y<0) + { + h+=y; //decrease + y=0; + } + + //clip width against dest width + w = min((long)w,(long)(pen.end_x()-pen.x())); + h = min((long)h,(long)(pen.end_y()-pen.y())); + + //clip width against src width + w = min(w,get_w()-x); + h = min(h,get_h()-y); + + if(w<=0 || h<=0) + return; + + for(int i=0;i(static_cast(operator[](y)+x))+i*get_w()*sizeof(Color)); + char* dest(static_cast(static_cast(pen.x()))+i*pen.get_width()*sizeof(Color)); + memcpy(dest,src,w*sizeof(Color)); + } + return; + } + +#ifdef HAS_VIMAGE + if( pen.get_blend_method()==Color::BLEND_COMPOSITE && fabs(alpha-1.0f)=get_w() || y>=get_w()) + return; + + //clip source origin + if(x<0) + { + //u-=x; //increase + w+=x; //decrease + x=0; + } + + if(y<0) + { + //v-=y; //increase + h+=y; //decrease + y=0; + } + + //clip width against dest width + w = min(w,pen.end_x()-pen.x()); + h = min(h,pen.end_y()-pen.y()); + + //clip width against src width + w = min(w,get_w()-x); + h = min(h,get_h()-y); + + if(w<=0 || h<=0) + return; + + + + vImage_Buffer top,bottom; + vImage_Buffer& dest(bottom); + + top.data=static_cast(operator[](y)+x); + top.height=h; + top.width=w; + //top.rowBytes=get_w()*sizeof(Color); //! \todo this should get the pitch!! + top.rowBytes=get_pitch(); + + bottom.data=static_cast(pen.x()); + bottom.height=h; + bottom.width=w; + //bottom.rowBytes=pen.get_width()*sizeof(Color); //! \todo this should get the pitch!! + bottom.rowBytes=pen.get_pitch(); //! \todo this should get the pitch!! + + vImage_Error ret; + ret=vImageAlphaBlend_ARGBFFFF(&top,&bottom,&dest,kvImageNoFlags); + + assert(ret!=kvImageNoError); + + return; + } +#endif + etl::surface::blit_to(pen,x,y,w,h); +} + diff --git a/synfig-core/src/synfig/surface.h b/synfig-core/src/synfig/surface.h new file mode 100644 index 0000000..265d8d7 --- /dev/null +++ b/synfig-core/src/synfig/surface.h @@ -0,0 +1,159 @@ +/* === S Y N F I G ========================================================= */ +/*! \file surface.h +** \brief Surface and Pen Definitions +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_SURFACE_H +#define __SYNFIG_SURFACE_H + +/* === H E A D E R S ======================================================= */ + +#include "color.h" +#include "renddesc.h" +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class Target; +class Target_Scanline; + +class ColorPrep +{ +public: + ColorAccumulator cook(Color x)const + { + x.set_r(x.get_r()*x.get_a()); + x.set_g(x.get_g()*x.get_a()); + x.set_b(x.get_b()*x.get_a()); + return x; + } + Color uncook(ColorAccumulator x)const + { + if(!x.get_a()) + return Color::alpha(); + + const float a(1.0f/x.get_a()); + + x.set_r(x.get_r()*a); + x.set_g(x.get_g()*a); + x.set_b(x.get_b()*a); + return x; + } +}; + +/*! \class Surface +** \brief Bitmap Surface +** \todo writeme +*/ +class Surface : public etl::surface +{ +public: + typedef Color value_type; + class alpha_pen; + + Surface() { } + + Surface(const size_type::value_type &w, const size_type::value_type &h): + etl::surface(w,h) { } + + Surface(const size_type &s): + etl::surface(s) { } + + template + Surface(const _pen &_begin, const _pen &_end): + etl::surface(_begin,_end) { } + + template void blit_to(_pen &pen) + { return blit_to(pen,0,0, get_w(),get_h()); } + + template void + blit_to(_pen& DEST_PEN, int x, int y, int w, int h) + { + etl::surface::blit_to(DEST_PEN,x,y,w,h); + } + + void clear(); + + void blit_to(alpha_pen& DEST_PEN, int x, int y, int w, int h); +}; // END of class Surface + +#ifndef DOXYGEN_SKIP + +/*! \internal Used by Pen_Alpha */ +struct _BlendFunc +{ + Color::BlendMethod blend_method; + + _BlendFunc(Color::BlendMethod b= Color::BLEND_COMPOSITE):blend_method(b) { } + + Color operator()(const Color &a,const Color &b,const Color::value_type &t)const + { + return Color::blend(b,a,t,blend_method); + } +}; // END of class _BlendFunc + +#endif + +/*! \class Surface::alpha_pen +** \brief Alpha-Blending Pen +** +** This pen works like a normal alpha pen, except that it supports +** a variety of blending methods. Use set_blend_method() to select +** which blending method you want to use. +** The default blending method is Color::BLEND_COMPOSITE. +** \see Color::BlendMethod +*/ +class Surface::alpha_pen : public etl::alpha_pen< etl::generic_pen, Color::value_type, _BlendFunc > +{ +public: + alpha_pen() { } + alpha_pen(const etl::alpha_pen< etl::generic_pen, Color::value_type, _BlendFunc > &x): + etl::alpha_pen< etl::generic_pen, Color::value_type, _BlendFunc >(x) + { } + + alpha_pen(const etl::generic_pen& pen, const Color::value_type &a = 1, const _BlendFunc &func = _BlendFunc()): + etl::alpha_pen< etl::generic_pen, Color::value_type, _BlendFunc >(pen,a,func) + { } + + //! Sets the blend method to that described by \a method + void set_blend_method(Color::BlendMethod method) { affine_func_.blend_method=method; } + + //! Returns the blend method being used for this pen + Color::BlendMethod get_blend_method()const { return affine_func_.blend_method; } +}; // END of class Surface::alpha_pen + +//! Creates a target that will render to \a surface +etl::handle surface_target(Surface *surface); + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/surfacenew.cpp b/synfig-core/src/synfig/surfacenew.cpp new file mode 100644 index 0000000..aaed5e7 --- /dev/null +++ b/synfig-core/src/synfig/surfacenew.cpp @@ -0,0 +1,706 @@ +/* === S Y N F I G ========================================================= */ +/*! \file surfacenew.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "surfacenew.h" +#include +#include "mutex.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +class SurfaceNew::ChannelData +{ +private: + etl::reference_counter ref_count_; + + float* data_; + float* origin_; + + int w_,h_,stride_; + +public: + + RWLock rw_lock; + + ChannelData(): + is_defined_(false), + data_(0), + origin_(0), + w_(0), + h_(0) + { + } + + ~ChannelData() + { + if(ref_count_.unique()) + delete [] data_; + } + + void set_wh(int w, int h) + { + w_=w; + h_=h; + stride_=w; + + if(data_&&ref_count_.is_unique()) + delete [] data_; + + ref_count.make_unique(); + data_=new float [w_*h_]; + origin_=data_; + clear(); + } + + void crop(int x, int y, int w, int h) + { + origin_=origin+y*stride_+x; + w_=w; + h_=h; + } + + int get_stride()const + { + return stride_; + } + + void clear() + { + for(int i=0;i::iterator iter; + for(iter=ret.channel_map_.begin();iter!=ret.channel_map_.end();++iter) + iter->crop(x,y,w,h); + + return ret; +} + +int +SurfaceNew::get_w()const +{ + return w_; +} + +int +SurfaceNew::get_h()const +{ + return h_; +} + +void +SurfaceNew::set_wh(int w, int h) +{ + if(w!=w_ || h!=h_) + { + w_=w; + h_=h; + channel_map_.clear(); + } +} + +SurfaceNew::ColorSystem +SurfaceNew::get_color_system()const +{ + return color_system_; +} + +void +SurfaceNew::set_color_system(SurfaceNew::ColorSystem x) +{ + color_system_=x; +} + +Color +SurfaceNew::get_color(int x, int y)const +{ + // This operation is rather expensive, as it should be. + // I want to discourage people from using it all over the place. + + Color ret( + lock_channel_const(CHAN_R).get_value(x,y), + lock_channel_const(CHAN_G).get_value(x,y), + lock_channel_const(CHAN_B).get_value(x,y), + lock_channel_const(CHAN_A).get_value(x,y) + ); + + if(get_premult()) + { + ret=ret.demult_alpha(); + } + + return ret; +} + +void +SurfaceNew::lock() +{ + mutex_.lock(); +} + +void +SurfaceNew::unlock() +{ + mutex_.unlock(); +} + +bool +SurfaceNew::trylock() +{ + return mutex_.trylock(); +} + +SurfaceNew::ChannelLock +SurfaceNew::lock_channel(SurfaceNew::Channel chan) +{ + if(!is_channel_defined(chan) + channel_map_[chan].set_wh(get_w(),get_h()); + else + channel_map_[chan].make_unique(); + + ChannelLockConst channel_lock; + + channel_lock.surface_=this; + channel_lock.channel_=chan; + + channel_map_[chan].rw_lock.writer_lock(); + + return channel_lock; +} + +SurfaceNew::ChannelLockConst +SurfaceNew::lock_channel_const(SurfaceNew::Channel chan)const +{ + if(!is_channel_defined(chan) + channel_map_[chan].set_wh(get_w(),get_h()); + + ChannelLockConst channel_lock; + + channel_lock.surface_=this; + channel_lock.channel_=chan; + + channel_map_[chan].rw_lock.reader_lock(); + + return channel_lock; +} + +SurfaceNew::ChannelLock +SurfaceNew::lock_channel_alpha(SurfaceNew::Channel chan) +{ + // Change this when per-channel alpha + // is implemented + return lock_channel(CHAN_A); +} + +SurfaceNew::ChannelLockConst +SurfaceNew::lock_channel_alpha_const(SurfaceNew::Channel chan)const +{ + // Change this when per-channel alpha + // is implemented + return lock_channel_const(CHAN_A); +} + +bool +SurfaceNew::is_channel_defined(Channel chan)const +{ + return channel_map_.count(chan); +} + +bool +SurfaceNew::get_premult()const +{ + return premult_flag_; +} + +void +SurfaceNew::set_premult(bool x) +{ + if(x==premult_flag_) + return; + + premult_flag_=x; + + for(int i=0;i<3;i++) + { + Channel chan; + if(get_color_system()==COLORSYS_RGB)switch(i) + { + case 0: chan=CHAN_R; + case 1: chan=CHAN_G; + case 2: chan=CHAN_B; + } + else + if(get_color_system()==COLORSYS_YUV)switch(i) + { + case 0: chan=CHAN_Y; + case 1: chan=CHAN_U; + case 2: chan=CHAN_V; + } + + // If this channel isn't defined, then + // skip it and move on to the next one + if(!is_channel_defined(chan)) + continue; + + ChannelLock color_channel(lock_channel(chan)); + ChannelLockConst alpha_channel(lock_channel_alpha_const(chan)); + const int w(get_w()); + const int h(get_h()); + + float* color_ptr(color_channel.get_data_ptr()); + const float* alpha_ptr(alpha_channel.get_data_ptr()); + + const int color_pitch(color_channel.get_data_ptr_stride()-w); + const int alpha_pitch(alpha_channel.get_data_ptr_stride()-w); + + if(premult_flag_) + { + for(int y=0;yget_w()), h(src->get_h); + + // Clip + { + int x(0), y(0); + + if(x_dest+w>dest.get_w()) + w=dest.get_w()-x_dest; + if(y_dest+h>dest.get_h()) + h=dest.get_h()-y_dest; + if(x_dest<0) + { + x-=x_dest; + w+=x_dest; + } + if(y_dest<0) + { + y-=y_dest; + h+=y_dest; + } + src=crop(src,x,y,w,h); + } + + dest=crop(dest,x_dest,y_dest,w,h); + + if(bm==Color::BLEND_STRAIGHT) + { + chan_mlt(dest,amount/(1.0-amount)); + chan_add(dest,src); + chan_mlt(dest,(1.0-amount)/amount); + } + + if(bm==Color::BLEND_COMPOSITE) + { + + } +} + + + +// ----------------------------------------------------------------------------------- + +SurfaceChannelLockConst::SurfaceChannelLockConst(): + data_ptr_checked_out_(false) +{ +} + +SurfaceChannelLockConst::~SurfaceChannelLockConst() +{ + if(data_ptr_checked_out_) + release_data_ptr(); + + if(surface_ && ref_count_.is_unique()) + return surface->channel_map_[channel_].rw_lock.reader_unlock(); + surface=0; +} + +SurfaceChannel +SurfaceChannelLockConst::get_channel()const +{ + return channel_; +} + +int +SurfaceChannelLockConst::get_w()const +{ + return surface_->get_w(); +} + +int +SurfaceChannelLockConst::get_h()const +{ + return surface_->get_h(); +} + +float +SurfaceChannelLockConst::get_value(int x, int y) +{ + // WOW! CRAZY SLOW! + const ChannelData& channel_data(surface_->channel_map_[channel_]); + return *(channel_data.get_data()+y*channel_data.get_stride()+x); +} + +const float* +SurfaceChannelLockConst::get_data_ptr()const +{ + data_ptr_checked_out_=true; + + // WOW! CRAZY SLOW! + return surface_->channel_map_[channel_].get_data(); +} + +int +SurfaceChannelLockConst::get_data_ptr_stride()const +{ + return surface_->channel_map_[channel_].get_stride(); +} + +void +SurfaceChannelLockConst::release_data_ptr()const +{ + data_ptr_checked_out_=false; +} + +SurfaceChannelLockConst::operator bool()const +{ + return static_cast(surface_); +} + +// ----------------------------------------------------------------------------------- + +SurfaceChannelLock::SurfaceChannelLock() +{ +} + +SurfaceChannelLock::~SurfaceChannelLock() +{ + if(data_ptr_checked_out_) + release_data_ptr(); + + if(surface_ && ref_count_.is_unique()) + return surface_->channel_map_[channel_].rw_lock.writer_unlock(); + surface=0; +} + +void +SurfaceChannelLock::clear() +{ + return surface_->channel_map_[channel_].clear(); +} + +void +SurfaceChannelLock::fill(float v) +{ + return surface_->channel_map_[channel_].fill(v); +} + +void +SurfaceChannelLock::set_value(int x, int y, float v) +{ + // WOW! CRAZY SLOW! + const ChannelData& channel_data(surface_->channel_map_[channel_]); + *(channel_data.get_data()+y*channel_data.get_stride()+x)=v; +} + +float* +SurfaceChannelLock::get_data_ptr() +{ + data_ptr_checked_out_=true; + + // WOW! CRAZY SLOW! + return surface_->channel_map_[channel_].get_data(); +} + + + +// ----------------------------------------------------------------------------------- + + + +void +SurfaceNew::chan_mlt(ChannelLock& dest, float x) +{ + float* ptr(dest.get_data_ptr()); + const int w(dest.get_w()); + const int h(dest.get_h()); + const int pitch(dest.get_data_pitch()-w); + + int(y=0;y +#include +#include "color.h" +#include "mutex.h" +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class Surface; +class SurfaceChannelLock; +class SurfaceChannelLockConst; + +//! \writeme +enum SurfaceColorSystem +{ + COLORSYS_RGB, + COLORSYS_YUV, + + COLORSYS_END +}; // END of enum SurfaceColorSystem + +//! \writeme +enum SurfaceChannel +{ + CHAN_A, + CHAN_R, + CHAN_G, + CHAN_B, + + CHAN_Y, + CHAN_U, + CHAN_V, + + CHAN_END +}; // END of enum SurfaceChannel + +class SurfaceNew : etl::shared_object +{ + friend class SurfaceChannelLock; + + /* + -- ** -- T Y P E S ----------------------------------------------------------- + */ + +public: + + //! \writeme + typedef etl::handle Handle; + + //! \writeme + typedef etl::handle HandleConst; + + //! \writeme + typedef etl::loose_handle LooseHandle; + + //! \writeme + typedef SurfaceChannel; + + //! \writeme + typedef SurfaceChannelLock ChannelLock; + + //! \writeme + typedef SurfaceChannelLockConst ChannelLockConst; + + //! \writeme + typedef SurfaceColorSystem; + + //! \writeme + class Lock + { + Handle x; + public: + Lock(const Handle& x):x(x) { x->lock(); } + void unlock() { if(x){ x->unlock(); x=0; } } + ~Lock() { unlock(); } + }; // END of class Lock + friend class Lock; + +private: + + //! \writeme + class ChannelData; + + /* + -- ** -- D A T A ------------------------------------------------------------- + */ + +private: + + //! \writeme + RecMutex mutex_; + + //! \writeme + int w_,h_; + + //! \writeme + ColorSystem color_system_; + + //! \writeme + bool premult_flag_; + + //! \writeme + std::map channel_map_; + + /* + -- ** -- S I G N A L S ------------------------------------------------------- + */ + +private: + + /* + -- ** -- S I G N A L I N T E R F A C E ------------------------------------- + */ + +public: + + /* + -- ** -- C O N S T R U C T O R S --------------------------------------------- + */ + +protected: + + //! \writeme + SurfaceNew(); + +public: + + //! \writeme + virtual ~SurfaceNew(); + + /* + -- ** -- M E M B E R F U N C T I O N S ------------------------------------- + */ + +public: + + //! \writeme + int get_w()const; + + //! \writeme + int get_h()const; + + //! \writeme + void set_wh(int w, int h); + + //! \writeme + ColorSystem get_color_system()const; + + //! \writeme + void set_color_system(ColorSystem x); + + //! Should only be used in certain circumstances + Color get_color(int x, int y)const; + + //! \writeme + void lock(); + + //! \writeme + void unlock(); + + //! \writeme + bool trylock(); + + //! \writeme + ChannelLock lock_channel(Channel chan); + + //! \writeme + ChannelLockConst lock_channel_const(Channel chan)const; + + //! \writeme + ChannelLock lock_channel_alpha(Channel chan); + + //! \writeme + ChannelLockConst lock_channel_alpha_const(Channel chan)const; + + //! \writeme + bool is_channel_defined(Channel chan)const; + + //! \writeme + bool get_premult()const; + + //! \writeme + void set_premult(); + + /* + -- ** -- S T A T I C F U N C T I O N S ------------------------------------- + */ + +public: + + //! Normal SurfaceNew Constructor + static Handle create(int w=0, int h=0, ColorSystem sys=COLORSYS_RGB); + + //! Converts an old Surface to a SurfaceNew + static Handle create(const Surface&); + + //! Duplicates a surface + static Handle create(HandleConst); + + //! Creates a cropped copy of a surface + static Handle crop(HandleConst, int x, int y, int w, int h); + + static void blit( + Handle dest, + int x_dest, + int y_dest, + HandleConst src, + float amount=1.0, + Color::BlendMethod bm=Color::BLEND_COMPOSITE + ); + + static void blit( + Handle dest, + int x_dest, + int y_dest, + Handle src, + int x_src, + int y_src, + int w_src, + int h_src, + float amount=1.0, + Color::BlendMethod bm=Color::BLEND_COMPOSITE + ); + + + static void chan_mlt(ChannelLock& dest, float x); + static void chan_mlt(ChannelLock& dest, const ChannelLockConst& x); + + static void chan_div(ChannelLock& dest, float x); + static void chan_div(ChannelLock& dest, const ChannelLockConst& x); + + static void chan_add(ChannelLock& dest, float x); + static void chan_add(ChannelLock& dest, const ChannelLockConst& x); + + static void chan_sub(ChannelLock& dest, float x); + static void chan_sub(ChannelLock& dest, const ChannelLockConst& x); +}; // END of class SurfaceNew + +//! \writeme +class SurfaceChannelLockConst +{ + friend class SurfaceNew; + + /* + -- ** -- T Y P E S ----------------------------------------------------------- + */ + +public: + + /* + -- ** -- D A T A ------------------------------------------------------------- + */ + +protected: + + //! \writeme + SurfaceNew::Handle surface_; + + //! \writeme + etl::reference_counter ref_count_; + + //! \writeme + SurfaceChannel channel_; + + //! \writeme + bool data_ptr_checked_out_; + + /* + -- ** -- C O N S T R U C T O R S --------------------------------------------- + */ + +public: + + SurfaceChannelLockConst(); + + //! \writeme + ~SurfaceChannelLockConst(); + + /* + -- ** -- M E M B E R F U N C T I O N S ------------------------------------- + */ + +public: + + //! \writeme + SurfaceChannel get_channel()const; + + //! \writeme + int get_w()const; + + //! \writeme + int get_h()const; + + //! \writeme + float get_value(int x, int y); + + //! \writeme + const float* get_data_ptr()const; + + //! \writeme + int get_data_ptr_stride()const; + + //! Releases the pointer obtained with get_data_ptr() + void release_data_ptr()const; + + //! \writeme + operator bool()const; +}; // END of class SurfaceChannelLockConst + + +//! \writeme +class SurfaceChannelLock : public SurfaceChannelLockConst +{ + friend class SurfaceNew; + + using SurfaceChannelLock::get_data_ptr; + + /* + -- ** -- T Y P E S ----------------------------------------------------------- + */ + +public: + + /* + -- ** -- D A T A ------------------------------------------------------------- + */ + +private: + + /* + -- ** -- C O N S T R U C T O R S --------------------------------------------- + */ + +public: + + //! \writeme + SurfaceChannelLock(); + + //! \writeme + ~SurfaceChannelLock(); + + /* + -- ** -- M E M B E R F U N C T I O N S ------------------------------------- + */ + +public: + + //! \writeme + void clear(); + + //! \writeme + void fill(float value); + + //! \writeme + void set_value(int x, int y, float v); + + float* get_data_ptr(); +}; // END of class ChannelLock + + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/synfig.h b/synfig-core/src/synfig/synfig.h new file mode 100644 index 0000000..b56029c --- /dev/null +++ b/synfig-core/src/synfig/synfig.h @@ -0,0 +1,140 @@ +/* === S Y N F I G ========================================================= */ +/*! \file synfig.h +** \brief Primary Header for Synfig +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG__ +#define __SYNFIG__ + +#ifndef __cplusplus +#error Sorry, Synfig only supports C++ at this time. See README for details. +#endif + +#warning The use of this header is deprecated. Please use the individual header files. + +/* === M A C R O S ========================================================= */ + +#define SYNFIG_LEAN +#undef SYNFIG_LEAN +/*! \def SYNFIG_LEAN +** \brief Define this to remove unused features, speeding up compile time. +** +** Define SYNFIG_LEAN if your plug-in +** or program doesn't use the synfig::Angle class +** or the rendering subsystem. This can speed up +** compiles. You may also wish to individually +** use the macros SYNFIG_NO_ANGLE and +** SYNFIG_NO_RENDER. +** \see SYNFIG_NO_ANGLE, SYNFIG_NO_RENDER +*/ +#ifdef SYNFIG_LEAN +# ifndef SYNFIG_NO_ANGLE +# define SYNFIG_NO_ANGLE +# endif +# ifndef SYNFIG_NO_RENDER +# define SYNFIG_NO_RENDER +# endif +#endif + +/*! \def SYNFIG_LAYER +** The SYNFIG_LAYER macro is useful for when you +** are compiling layers, and can help to improve +** build time. +*/ +#ifdef SYNFIG_LAYER +# ifndef SYNFIG_NO_RENDER +# define SYNFIG_NO_RENDER +# endif +# define SYNFIG_NO_LOADSAVE +#endif + +/*! \def SYNFIG_TARGET +** The SYNFIG_TARGET macro is useful for when you +** are compiling render targets, and can help to +** improve build time. +*/ +#ifdef SYNFIG_TARGET +# ifdef SYNFIG_NO_RENDER +# error You defined SYNFIG_TARGET, but also SYNFIG_NO_RENDER. This does not make sense. +# endif +# ifndef SYNFIG_NO_ANGLE +# define SYNFIG_NO_ANGLE +# endif +# define SYNFIG_NO_LOADSAVE +#endif + +/*! \def SYNFIG_MODULE +** \todo Writeme +*/ +#ifdef SYNFIG_MODULE +# define SYNFIG_NO_LOADSAVE +#endif + +/*! \namespace synfig +** \brief Where every function and class of the synfig library can be found +** \todo Writeme +*/ + +/* === H E A D E R S ======================================================= */ + +#include "version.h" +#include "general.h" +#include "module.h" +#include "color.h" +#include "canvas.h" +#include "layer.h" +#include "vector.h" +#include "types.h" +#include "segment.h" + +#ifndef SYNFIG_NO_RENDER +# include "render.h" +#endif + +#ifndef SYNFIG_LAYER +#include "target.h" +#endif + +#include "valuenode.h" +#include "valuenode_subtract.h" +//#include "valuenode_animated.h" +#include "valuenode_composite.h" +#include "valuenode_const.h" +#include "valuenode_linear.h" +#include "valuenode_dynamiclist.h" +#include "valuenode_reference.h" + +#ifndef SYNFIG_NO_LOADSAVE +# include "savecanvas.h" +# include "loadcanvas.h" +#endif + +#include "importer.h" +#include "surface.h" + +#include "string.h" + +/* === C L A S S E S & S T R U C T S ======================================= */ + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/synfig.nsh b/synfig-core/src/synfig/synfig.nsh new file mode 100644 index 0000000..2fc4c53 --- /dev/null +++ b/synfig-core/src/synfig/synfig.nsh @@ -0,0 +1,20 @@ +; The stuff to install +Section "Synfig Core" + + SectionIn RO + + ; Set output path to the installation directory. + SetOutPath "$INSTDIR\bin" + + ; Put file there + File "src\synfig\.libs\libsynfig-0.dll" + +SectionEnd + +Section "un.Synfig Core" + Delete "$INSTDIR\bin\libsynfig-0.dll" + RMDir "$INSTDIR\bin" + RMDir "$INSTDIR" +SectionEnd + + diff --git a/synfig-core/src/synfig/target.cpp b/synfig-core/src/synfig/target.cpp new file mode 100644 index 0000000..6a73822 --- /dev/null +++ b/synfig-core/src/synfig/target.cpp @@ -0,0 +1,113 @@ +/* === S Y N F I G ========================================================= */ +/*! \file target.cpp +** \brief Target Class Implementation +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_NO_ANGLE + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "target.h" +#include "string.h" +#include "canvas.h" +#include "target_null.h" +#include "target_null_tile.h" + +using namespace synfig; +using namespace etl; +using namespace std; + +synfig::Target::Book* synfig::Target::book_; +synfig::Target::ExtBook* synfig::Target::ext_book_; + +static synfig::Gamma* default_gamma_; + +/* === P R O C E D U R E S ================================================= */ + +bool +Target::subsys_init() +{ + book_=new synfig::Target::Book(); + ext_book_=new synfig::Target::ExtBook(); + + default_gamma_=new synfig::Gamma(1.0/2.2); + //default_gamma_->set_black_level(0.05); // Default to 5% black level. + + book()["null"]=std::pair(Target_Null::create,"null"); + ext_book()["null"]="null"; + book()["null-tile"]=std::pair(Target_Null_Tile::create,"null-tile"); + ext_book()["null-tile"]="null-tile"; + + return true; +} + +bool +Target::subsys_stop() +{ + delete book_; + delete ext_book_; + delete default_gamma_; + return true; +} + +Target::Book& +Target::book() +{ + return *book_; +} + +Target::ExtBook& +Target::ext_book() +{ + return *ext_book_; +} + + +/* === M E T H O D S ======================================================= */ + +Target::Target(): + quality_(4), + gamma_(*default_gamma_), + remove_alpha(false), + avoid_time_sync_(false) +{ +} + +void +synfig::Target::set_canvas(etl::handle c) +{ + canvas=c; + RendDesc desc=canvas->rend_desc(); + set_rend_desc(&desc); +} + + +Target::Handle +Target::create(const String &name, const String &filename) +{ + if(!book().count(name)) + return handle(); + + return Target::Handle(book()[name].first(filename.c_str())); +} diff --git a/synfig-core/src/synfig/target.h b/synfig-core/src/synfig/target.h new file mode 100644 index 0000000..9f6e304 --- /dev/null +++ b/synfig-core/src/synfig/target.h @@ -0,0 +1,187 @@ +/* === S Y N F I G ========================================================= */ +/*! \file target.h +** \brief Target Class Implementation +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TARGET_H +#define __SYNFIG_TARGET_H + +/* === H E A D E R S ======================================================= */ + +#include +#include "string_decl.h" +#include +//#include +#include +#include +#include "renddesc.h" +//#include "general.h" +#include "color.h" +#include "canvas.h" + +/* === M A C R O S ========================================================= */ + +//! \writeme +#define SYNFIG_TARGET_MODULE_EXT public: static const char name__[], version__[], ext__[],cvs_id__[]; static Target *create(const char *filename); + +//! Sets the name of the target +#define SYNFIG_TARGET_SET_NAME(class,x) const char class::name__[]=x + +//! \writeme +#define SYNFIG_TARGET_SET_EXT(class,x) const char class::ext__[]=x + +//! Sets the version of the target +#define SYNFIG_TARGET_SET_VERSION(class,x) const char class::version__[]=x + +//! Sets the CVS ID of the target +#define SYNFIG_TARGET_SET_CVS_ID(class,x) const char class::cvs_id__[]=x + +//! \writeme +#define SYNFIG_TARGET_INIT(class) synfig::Target* class::create(const char *filename) { return new class(filename); } + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class Surface; +class RendDesc; +class Canvas; +class ProgressCallback; + +/*! \class Target +** \brief Render-target +** \todo writeme +*/ +class Target : public etl::shared_object +{ +public: + typedef etl::handle Handle; + typedef etl::loose_handle LooseHandle; + typedef etl::handle ConstHandle; + + /* + -- ** -- S I G N A L S ------------------------------------------------------- + */ + +private: + + sigc::signal signal_progress_; + + /* + -- ** -- S I G N A L I N T E R F A C E ------------------------------------- + */ + +public: + + sigc::signal& signal_progress() { return signal_progress_; } + + /* + -- ** -- C O N S T R U C T O R S --------------------------------------------- + */ + +public: + typedef Target* (*Factory)(const char *filename); + + //! A type for a map of targets, indexed by the name of the Target + typedef std::map > Book; + + typedef std::map ExtBook; + + //! Target Book, indexed by the target's name + static Book* book_; + + //! Map of target names indexed by associated file extension + static ExtBook* ext_book_; + + static Book& book(); + static ExtBook& ext_book(); + + static bool subsys_init(); + static bool subsys_stop(); + + //! Adjusted Render description set by set_rend_desc() + RendDesc desc; + + etl::handle canvas; + + int quality_; + Gamma gamma_; + + bool remove_alpha; + + bool avoid_time_sync_; + +protected: + + Target(); + +public: + virtual ~Target() { } + + int get_quality()const { return quality_; } + + void set_quality(int q) { quality_=q; } + + void set_avoid_time_sync(bool x=true) { avoid_time_sync_=x; } + + bool get_avoid_time_sync()const { return avoid_time_sync_; } + + bool get_remove_alpha()const { return remove_alpha; } + + void set_remove_alpha(bool x=true) { remove_alpha=x; } + + Gamma &gamma() { return gamma_; } + + const Gamma &gamma()const { return gamma_; } + + virtual void set_canvas(etl::handle c); + + const etl::handle &get_canvas()const { return canvas; } + + RendDesc &rend_desc() { return desc; } + const RendDesc &rend_desc()const { return desc; } + + //! Renders the canvas to the target + virtual bool render(ProgressCallback *cb=NULL)=0; + + //! Sets the RendDesc for the Target to \a desc. + /*! If there are any parts of \a desc that the render target + ** is not capable of doing, the render target will adjust + ** \a desc to fit its needs. + */ + virtual bool set_rend_desc(RendDesc *d) { desc=*d; return true; } + + virtual bool init() { return true; } + + //! Creates a new Target described by \a type, outputting to a file described by \a filename. + static Handle create(const String &type, const String &filename); +}; // END of class Target + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#include "canvas.h" +#endif diff --git a/synfig-core/src/synfig/target_multi.cpp b/synfig-core/src/synfig/target_multi.cpp new file mode 100644 index 0000000..825b322 --- /dev/null +++ b/synfig-core/src/synfig/target_multi.cpp @@ -0,0 +1,119 @@ +/* === S Y N F I G ========================================================= */ +/*! \file target_multi.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "target_multi.h" +#include "string.h" +#include "surface.h" +#include "canvas.h" +#include "context.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +Target_Multi::Target_Multi(Target_Scanline::Handle a,Target_Scanline::Handle b): + a(a), + b(b) +{ +} + +Target_Multi::~Target_Multi() +{ +} + +void +Target_Multi::set_canvas(etl::handle c) +{ + canvas=c; + RendDesc desc=canvas->rend_desc(); + a->set_canvas(c); + b->set_canvas(c); + set_rend_desc(&desc); +} + +bool +Target_Multi::set_rend_desc(RendDesc *d) +{ + desc=*d; + return a->set_rend_desc(d) && b->set_rend_desc(d); +} + +bool +Target_Multi::init() +{ + return a->init() && b->init(); +} + +bool +Target_Multi::add_frame(const synfig::Surface *surface) +{ + return a->add_frame(surface) && b->add_frame(surface); +} + +bool +Target_Multi::start_frame(ProgressCallback *cb) +{ + return a->start_frame(cb) && b->start_frame(cb); +} + +void +Target_Multi::end_frame() +{ + a->end_frame(); + b->end_frame(); +} + +Color * +Target_Multi::start_scanline(int scanline) +{ + buffer_a=a->start_scanline(scanline); + buffer_b=b->start_scanline(scanline); + return buffer_a; +} + +bool +Target_Multi::end_scanline() +{ + memcpy(buffer_b,buffer_a,sizeof(Color)*desc.get_w()); + return a->end_scanline() && b->end_scanline(); +} diff --git a/synfig-core/src/synfig/target_multi.h b/synfig-core/src/synfig/target_multi.h new file mode 100644 index 0000000..f42b81a --- /dev/null +++ b/synfig-core/src/synfig/target_multi.h @@ -0,0 +1,68 @@ +/* === S Y N F I G ========================================================= */ +/*! \file target_multi.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TARGET_MULTI_H +#define __SYNFIG_TARGET_MULTI_H + +/* === H E A D E R S ======================================================= */ + +#include "target_scanline.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/*! \class Target_Multi +** \brief Render-target +** \todo writeme +*/ +class Target_Multi : public Target_Scanline +{ + Target_Scanline::Handle a,b; + Color *buffer_a; + Color *buffer_b; +public: + + Target_Multi(Target_Scanline::Handle a,Target_Scanline::Handle b); + virtual ~Target_Multi(); + virtual bool add_frame(const synfig::Surface *surface); + virtual bool start_frame(ProgressCallback *cb=NULL); + virtual void end_frame(); + virtual Color * start_scanline(int scanline); + virtual bool end_scanline(); + + virtual void set_canvas(etl::handle c); + virtual bool set_rend_desc(RendDesc *d); + virtual bool init(); +}; // END of class Target_Multi + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/target_null.cpp b/synfig-core/src/synfig/target_null.cpp new file mode 100644 index 0000000..16fb552 --- /dev/null +++ b/synfig-core/src/synfig/target_null.cpp @@ -0,0 +1,50 @@ +/* === S Y N F I G ========================================================= */ +/*! \file target_null.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +//#include "target_null.h" + +#endif + +/* === U S I N G =========================================================== */ + +//using namespace std; +//using namespace etl; +//using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ diff --git a/synfig-core/src/synfig/target_null.h b/synfig-core/src/synfig/target_null.h new file mode 100644 index 0000000..45c90f2 --- /dev/null +++ b/synfig-core/src/synfig/target_null.h @@ -0,0 +1,71 @@ +/* === S Y N F I G ========================================================= */ +/*! \file target_null.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TARGET_NULL_H +#define __SYNFIG_TARGET_NULL_H + +/* === H E A D E R S ======================================================= */ + +#include "target_scanline.h" +#include "general.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/*! \class Target_Null +** \brief A target which renders to nothing. Useful for benchmarks and other tests. +** \todo writeme +*/ +class Target_Null : public Target_Scanline +{ + Color *buffer; + + Target_Null():buffer(0) { } + +public: + + ~Target_Null() { delete buffer; } + + virtual bool start_frame(ProgressCallback */*cb*/=NULL) + { delete buffer; buffer=new Color[desc.get_w()*sizeof(Color)]; return true; } + + virtual void end_frame() { delete buffer; buffer=0; return; } + + virtual Color * start_scanline(int /*scanline*/) { return buffer; } + + virtual bool end_scanline() { return true; } + + static Target* create(const char */*filename*/=0) { return new Target_Null(); } +}; // END of class Target_Null + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/target_null_tile.cpp b/synfig-core/src/synfig/target_null_tile.cpp new file mode 100644 index 0000000..091ee28 --- /dev/null +++ b/synfig-core/src/synfig/target_null_tile.cpp @@ -0,0 +1,50 @@ +/* === S Y N F I G ========================================================= */ +/*! \file target_null_tile.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +//#include "target_null.h" + +#endif + +/* === U S I N G =========================================================== */ + +//using namespace std; +//using namespace etl; +//using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ diff --git a/synfig-core/src/synfig/target_null_tile.h b/synfig-core/src/synfig/target_null_tile.h new file mode 100644 index 0000000..f493e2b --- /dev/null +++ b/synfig-core/src/synfig/target_null_tile.h @@ -0,0 +1,66 @@ +/* === S Y N F I G ========================================================= */ +/*! \file target_null_tile.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TARGET_NULL_TILE_H +#define __SYNFIG_TARGET_NULL_TILE_H + +/* === H E A D E R S ======================================================= */ + +#include "target_tile.h" +#include "general.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/*! \class Target_Null_Tile +** \brief A target which renders to nothing using tiles. Useful for benchmarks and other tests. +** \todo writeme +*/ +class Target_Null_Tile : public Target_Tile +{ + Target_Null_Tile() { } + +public: + + ~Target_Null_Tile() { } + virtual bool add_tile(const synfig::Surface &/*surface*/, int /*x*/, int /*y*/) { return true; } + + virtual bool start_frame(ProgressCallback */*cb*/=NULL) + { return true; } + + virtual void end_frame() { return; } + + static Target* create(const char */*filename*/=0) { return new Target_Null_Tile(); } +}; // END of class Target_Null_Tile + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/target_scanline.cpp b/synfig-core/src/synfig/target_scanline.cpp new file mode 100644 index 0000000..b4745fe --- /dev/null +++ b/synfig-core/src/synfig/target_scanline.cpp @@ -0,0 +1,524 @@ +/* === S Y N F I G ========================================================= */ +/*! \file target_scanline.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "target_scanline.h" +#include "string.h" +#include "surface.h" +#include "render.h" +#include "canvas.h" +#include "context.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +// note that if this isn't defined then the rendering is incorrect for +// the straight blend method since the optimize_layers() function in +// canvas.cpp which makes the straight blend method work correctly +// isn't called. ie. leave this defined. to see the problem, draw a +// small circle over a solid background. set circle to amount 0.99 +// and blend method 'straight'. the background should vanish but doesn't +#define SYNFIG_OPTIMIZE_LAYER_TREE + +#define PIXEL_RENDERING_LIMIT 1500000 + +#define USE_PIXELRENDERING_LIMIT 1 + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +Target_Scanline::Target_Scanline(): + threads_(2) +{ + curr_frame_=0; +} + +int +Target_Scanline::next_frame(Time& time) +{ + int + total_frames(1), + frame_start(0), + frame_end(0); + Time + time_start(0), + time_end(0); + + // If the description's end frame is equal to + // the start frame, then it is assumed that we + // are rendering only one frame. Correct it. + if(desc.get_frame_end()==desc.get_frame_start()) + desc.set_frame_end(desc.get_frame_start()+1); + + frame_start=desc.get_frame_start(); + frame_end=desc.get_frame_end(); + time_start=desc.get_time_start(); + time_end=desc.get_time_end(); + + // Calculate the number of frames + total_frames=frame_end-frame_start; + if(total_frames<=0)total_frames=1; + + //RendDesc rend_desc=desc; + //rend_desc.set_gamma(1); + +// int total_tiles(total_tiles()); + time=(time_end-time_start)*curr_frame_/total_frames+time_start; + curr_frame_++; + +/* synfig::info("curr_frame_: %d",curr_frame_); + synfig::info("total_frames: %d",total_frames); + synfig::info("time_end: %s",time_end.get_string().c_str()); + synfig::info("time_start: %s",time_start.get_string().c_str()); +*/ +// synfig::info("time: %s",time.get_string().c_str()); + + return total_frames- curr_frame_+1; +} +bool +synfig::Target_Scanline::render(ProgressCallback *cb) +{ + SuperCallback super_cb; + int +// i=0, + total_frames, + quality=get_quality(), + frame_start, + frame_end; + Time + t=0, + time_start, + time_end; + + assert(canvas); + curr_frame_=0; + + if( !init() ){ + if(cb) cb->error(_("Target initialization failure")); + return false; + } + + // If the description's end frame is equal to + // the start frame, then it is assumed that we + // are rendering only one frame. Correct it. + if(desc.get_frame_end()==desc.get_frame_start()) + desc.set_frame_end(desc.get_frame_start()+1); + + frame_start=desc.get_frame_start(); + frame_end=desc.get_frame_end(); + time_start=desc.get_time_start(); + time_end=desc.get_time_end(); + + // Calculate the number of frames + total_frames=frame_end-frame_start; + + + //RendDesc rend_desc=desc; + + try { + // Grab the time + int i=next_frame(t); + + //synfig::info("1time_set_to %s",t.get_string().c_str()); + + if(i>1) + do{ + + //if(total_frames>1) + //for(i=0,t=time_start;iamount_complete(total_frames-(i-1),total_frames)) + return false; + + // Set the time that we wish to render + if(!get_avoid_time_sync() || canvas->get_time()!=t) + canvas->set_time(t); + + Context context; + +#ifdef SYNFIG_OPTIMIZE_LAYER_TREE + Canvas::Handle op_canvas; + if (!getenv("SYNFIG_DISABLE_OPTIMIZE_LAYER_TREE")) + { + op_canvas = Canvas::create(); + op_canvas->set_file_name(canvas->get_file_name()); + optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); + context=op_canvas->get_context(); + } + else + context=canvas->get_context(); +#else + context=canvas->get_context(); +#endif + + // If the quality is set to zero, then we + // use the parametric scanline-renderer. + if(quality==0) + { + if(threads_<=0) + { + if(!synfig::render(context,this,desc,0)) + return false; + } + else + { + if(!synfig::render_threaded(context,this,desc,0,threads_)) + return false; + } + } + else // If quality is set otherwise, then we use the accelerated renderer + { + #if USE_PIXELRENDERING_LIMIT + if(desc.get_w()*desc.get_h() > PIXEL_RENDERING_LIMIT) + { + Surface surface; + int rowheight = PIXEL_RENDERING_LIMIT/desc.get_w(); + if (!rowheight) rowheight = 1; // TODO: render partial lines to stay within the limit? + int rows = desc.get_h()/rowheight; + int lastrowheight = desc.get_h() - rows*rowheight; + + rows++; + + synfig::info("Render broken up into %d block%s %d pixels tall, and a final block %d pixels tall", + rows-1, rows==2?"":"s", rowheight, lastrowheight); + + // loop through all the full rows + if(!start_frame()) + { + throw(string("add_frame(): target panic on start_frame()")); + return false; + } + + for(int i=0; i < rows; ++i) + { + RendDesc blockrd = desc; + + //render the strip at the normal size unless it's the last one... + if(i == rows-1) + { + if(!lastrowheight) break; + blockrd.set_subwindow(0,i*rowheight,desc.get_w(),lastrowheight); + } + else + { + blockrd.set_subwindow(0,i*rowheight,desc.get_w(),rowheight); + } + + if(!context.accelerated_render(&surface,quality,blockrd,0)) + { + if(cb)cb->error(_("Accelerated Renderer Failure")); + return false; + }else + { + int y; + int rowspan=sizeof(Color)*surface.get_w(); + Surface::pen pen = surface.begin(); + + int yoff = i*rowheight; + + for(y = 0; y < blockrd.get_h(); y++, pen.inc_y()) + { + Color *colordata= start_scanline(y + yoff); + if(!colordata) + { + throw(string("add_frame(): call to start_scanline(y) returned NULL")); + return false; + } + + if(get_remove_alpha()) + { + for(int i = 0; i < surface.get_w(); i++) + colordata[i] = Color::blend(surface[y][i],desc.get_bg_color(),1.0f); + } + else + memcpy(colordata,surface[y],rowspan); + + if(!end_scanline()) + { + throw(string("add_frame(): target panic on end_scanline()")); + return false; + } + } + } + } + + end_frame(); + + }else //use normal rendering... + { + #endif + Surface surface; + + if(!context.accelerated_render(&surface,quality,desc,0)) + { + // For some reason, the accelerated renderer failed. + if(cb)cb->error(_("Accelerated Renderer Failure")); + return false; + } + else + { + // Put the surface we renderer + // onto the target. + if(!add_frame(&surface)) + { + if(cb)cb->error(_("Unable to put surface on target")); + return false; + } + } + #if USE_PIXELRENDERING_LIMIT + } + #endif + } + }while((i=next_frame(t))); + else + { + // Set the time that we wish to render + if(!get_avoid_time_sync() || canvas->get_time()!=t) + canvas->set_time(t); + Context context; + +#ifdef SYNFIG_OPTIMIZE_LAYER_TREE + Canvas::Handle op_canvas; + if (!getenv("SYNFIG_DISABLE_OPTIMIZE_LAYER_TREE")) + { + op_canvas = Canvas::create(); + op_canvas->set_file_name(canvas->get_file_name()); + optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); + context=op_canvas->get_context(); + } + else + context=canvas->get_context(); +#else + context=canvas->get_context(); +#endif + + // If the quality is set to zero, then we + // use the parametric scanline-renderer. + if(quality==0) + { + if(threads_<=0) + { + if(!synfig::render(context,this,desc,cb)) + return false; + } + else + { + if(!synfig::render_threaded(context,this,desc,cb,threads_)) + return false; + } + } + else // If quality is set otherwise, then we use the accelerated renderer + { + #if USE_PIXELRENDERING_LIMIT + if(desc.get_w()*desc.get_h() > PIXEL_RENDERING_LIMIT) + { + Surface surface; + int totalheight = desc.get_h(); + int rowheight = PIXEL_RENDERING_LIMIT/desc.get_w(); + if (!rowheight) rowheight = 1; // TODO: render partial lines to stay within the limit? + int rows = desc.get_h()/rowheight; + int lastrowheight = desc.get_h() - rows*rowheight; + + rows++; + + synfig::info("Render broken up into %d block%s %d pixels tall, and a final block %d pixels tall", + rows-1, rows==2?"":"s", rowheight, lastrowheight); + + // loop through all the full rows + if(!start_frame()) + { + throw(string("add_frame(): target panic on start_frame()")); + return false; + } + + for(int i=0; i < rows; ++i) + { + RendDesc blockrd = desc; + + //render the strip at the normal size unless it's the last one... + if(i == rows-1) + { + if(!lastrowheight) break; + blockrd.set_subwindow(0,i*rowheight,desc.get_w(),lastrowheight); + } + else + { + blockrd.set_subwindow(0,i*rowheight,desc.get_w(),rowheight); + } + + SuperCallback sc(cb, i*rowheight, (i+1)*rowheight, totalheight); + + if(!context.accelerated_render(&surface,quality,blockrd,&sc)) + { + if(cb)cb->error(_("Accelerated Renderer Failure")); + return false; + }else + { + int y; + int rowspan=sizeof(Color)*surface.get_w(); + Surface::pen pen = surface.begin(); + + int yoff = i*rowheight; + + for(y = 0; y < blockrd.get_h(); y++, pen.inc_y()) + { + Color *colordata= start_scanline(y + yoff); + if(!colordata) + { + throw(string("add_frame(): call to start_scanline(y) returned NULL")); + return false; + } + + if(get_remove_alpha()) + { + for(int i = 0; i < surface.get_w(); i++) + colordata[i] = Color::blend(surface[y][i],desc.get_bg_color(),1.0f); + } + else + memcpy(colordata,surface[y],rowspan); + + if(!end_scanline()) + { + throw(string("add_frame(): target panic on end_scanline()")); + return false; + } + } + } + + //I'm done with this part + sc.amount_complete(100,100); + } + + end_frame(); + + }else + { + #endif + Surface surface; + + if(!context.accelerated_render(&surface,quality,desc,cb)) + { + if(cb)cb->error(_("Accelerated Renderer Failure")); + return false; + } + else + { + // Put the surface we renderer + // onto the target. + if(!add_frame(&surface)) + { + if(cb)cb->error(_("Unable to put surface on target")); + return false; + } + } + #if USE_PIXELRENDERING_LIMIT + } + #endif + } + } + + } + catch(String str) + { + if(cb)cb->error(_("Caught string :")+str); + return false; + } + catch(std::bad_alloc) + { + if(cb)cb->error(_("Ran out of memory (Probably a bug)")); + return false; + } + catch(...) + { + if(cb)cb->error(_("Caught unknown error, rethrowing...")); + throw; + } + return true; +} + +bool +Target_Scanline::add_frame(const Surface *surface) +{ + assert(surface); + + + int y; + int rowspan=sizeof(Color)*surface->get_w(); + Surface::const_pen pen=surface->begin(); + + if(!start_frame()) + { + throw(string("add_frame(): target panic on start_frame()")); + return false; + } + + for(y=0;yget_h();y++,pen.inc_y()) + { + Color *colordata= start_scanline(y); + if(!colordata) + { + throw(string("add_frame(): call to start_scanline(y) returned NULL")); + return false; + } + + if(get_remove_alpha()) + { + for(int i=0;iget_w();i++) + colordata[i]=Color::blend((*surface)[y][i],desc.get_bg_color(),1.0f); + } + else + memcpy(colordata,(*surface)[y],rowspan); + + if(!end_scanline()) + { + throw(string("add_frame(): target panic on end_scanline()")); + return false; + } + } + + end_frame(); + + return true; +} diff --git a/synfig-core/src/synfig/target_scanline.h b/synfig-core/src/synfig/target_scanline.h new file mode 100644 index 0000000..c9e8199 --- /dev/null +++ b/synfig-core/src/synfig/target_scanline.h @@ -0,0 +1,100 @@ +/* === S Y N F I G ========================================================= */ +/*! \file target_scanline.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TARGET_SCANLINE_H +#define __SYNFIG_TARGET_SCANLINE_H + +/* === H E A D E R S ======================================================= */ + +#include "target.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/*! \class Target_Scanline +** \brief Render-target +** \todo writeme +*/ +class Target_Scanline : public Target +{ + int threads_; + int curr_frame_; + +public: + typedef etl::handle Handle; + typedef etl::loose_handle LooseHandle; + typedef etl::handle ConstHandle; + + Target_Scanline(); + + //! Renders the canvas to the target + virtual bool render(ProgressCallback *cb=NULL); + + //! Marks the start of a frame + /*! \return \c true on success, \c false upon an error. + ** \see end_frame(), start_scanline() + */ + virtual bool start_frame(ProgressCallback *cb=NULL)=0; + + virtual int next_frame(Time& time); + + //! Marks the end of a frame + /*! \see start_frame() */ + virtual void end_frame()=0; + + //! Marks the start of a scanline + /*! \param scanline Which scanline is going to be rendered. + ** \return The address where the target wants the scanline + ** to be written. + ** \warning Must be called after start_frame() + ** \see end_scanline(), start_frame() + */ + virtual Color * start_scanline(int scanline)=0; + + //! Marks the end of a scanline + /*! Takes the data that was put at the address returned to by start_scanline() + ** and does whatever it is supposed to do with it. + ** \return \c true on success, \c false on failure. + ** \see start_scanline() + */ + virtual bool end_scanline()=0; + + void set_threads(int x) { threads_=x; } + + int get_threads()const { return threads_; } + + bool add_frame(const synfig::Surface *surface); +private: +}; // END of class Target_Scanline + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/target_tile.cpp b/synfig-core/src/synfig/target_tile.cpp new file mode 100644 index 0000000..f02b71b --- /dev/null +++ b/synfig-core/src/synfig/target_tile.cpp @@ -0,0 +1,456 @@ +/* === S Y N F I G ========================================================= */ +/*! \file target_tile.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "target_tile.h" +#include "string.h" +#include "surface.h" +#include "render.h" +#include "canvas.h" +#include "context.h" +#include "general.h" +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ +const unsigned int DEF_TILE_WIDTH = TILE_SIZE / 2; +const unsigned int DEF_TILE_HEIGHT= TILE_SIZE / 2; + +// note that if this isn't defined then the rendering is incorrect for +// the straight blend method since the optimize_layers() function in +// canvas.cpp which makes the straight blend method work correctly +// isn't called. ie. leave this defined. to see the problem, draw a +// small circle over a solid background. set circle to amount 0.99 +// and blend method 'straight'. the background should vanish but doesn't +#define SYNFIG_OPTIMIZE_LAYER_TREE + +#ifdef _DEBUG +// #define SYNFIG_DISPLAY_EFFICIENCY +#endif + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +Target_Tile::Target_Tile(): + threads_(2), + tile_w_(DEF_TILE_WIDTH), + tile_h_(DEF_TILE_HEIGHT), + curr_tile_(0), + clipping_(true) +{ + curr_frame_=0; +} + +int +Target_Tile::next_frame(Time& time) +{ + int + total_frames(1), + frame_start(0), + frame_end(0); + Time + time_start(0), + time_end(0); + + // If the description's end frame is equal to + // the start frame, then it is assumed that we + // are rendering only one frame. Correct it. + if(desc.get_frame_end()==desc.get_frame_start()) + desc.set_frame_end(desc.get_frame_start()+1); + + frame_start=desc.get_frame_start(); + frame_end=desc.get_frame_end(); + time_start=desc.get_time_start(); + time_end=desc.get_time_end(); + + // Calculate the number of frames + total_frames=frame_end-frame_start; + if(total_frames<=0)total_frames=1; + + //RendDesc rend_desc=desc; + //rend_desc.set_gamma(1); + +// int total_tiles(total_tiles()); + time=(time_end-time_start)*curr_frame_/total_frames+time_start; + curr_frame_++; + +/* synfig::info("curr_frame_: %d",curr_frame_); + synfig::info("total_frames: %d",total_frames); + synfig::info("time_end: %s",time_end.get_string().c_str()); + synfig::info("time_start: %s",time_start.get_string().c_str()); +*/ +// synfig::info("time: %s",time.get_string().c_str()); + + return total_frames- curr_frame_+1; +} + +int +Target_Tile::next_tile(int& x, int& y) +{ + // Width of the image(in tiles) + int tw(rend_desc().get_w()/tile_w_); + int th(rend_desc().get_h()/tile_h_); + + // Add the last tiles (which will be clipped) + if(rend_desc().get_w()%tile_w_!=0)tw++; + if(rend_desc().get_h()%tile_h_!=0)th++; + + x=(curr_tile_%tw)*tile_h_; + y=(curr_tile_/tw)*tile_w_; + + curr_tile_++; + return (tw*th)-curr_tile_+1; +} + +bool +synfig::Target_Tile::render_frame_(Context context,ProgressCallback *cb) +{ + if(tile_w_<=0||tile_h_<=0) + { + if(cb)cb->error(_("Bad Tile Size")); + return false; + } + const RendDesc &rend_desc(desc); +#define total_tiles total_tiles() + + etl::clock total_time; + etl::clock::value_type work_time(0); + etl::clock::value_type find_tile_time(0); + etl::clock::value_type add_tile_time(0); + total_time.reset(); + + // If the quality is set to zero, then we + // use the parametric scanline-renderer. + if(get_quality()==0) + { + Surface surface; + + RendDesc tile_desc; + int x,y,w,h; + int i; + etl::clock tile_timer; + tile_timer.reset(); + while((i=next_tile(x,y))) + { + find_tile_time+=tile_timer(); + SuperCallback super(cb,(total_tiles-i+1)*1000,(total_tiles-i+2)*1000,total_tiles*1000); + if(!super.amount_complete(0,1000)) + return false; + //if(cb && !cb->amount_complete(total_tiles-i,total_tiles)) + // return false; + + // Perform clipping on the tile + if(clipping_) + { + w=x+tile_w_error(_("Parametric Renderer Failure")); + return false; + } + else + { + if(!surface) + { + if(cb)cb->error(_("Bad surface")); + return false; + } + if(get_remove_alpha()) + for(int i=0;ierror(_("add_tile():Unable to put surface on target")); + return false; + } + } + tile_timer.reset(); + } + } + else // If quality is set otherwise, then we use the accelerated renderer + { + Surface surface; + + RendDesc tile_desc; + int x,y,w,h; + int i; + etl::clock tile_timer; + tile_timer.reset(); + while((i=next_tile(x,y))) + { + find_tile_time+=tile_timer(); + SuperCallback super(cb,(total_tiles-i)*1000,(total_tiles-i+1)*1000,total_tiles*1000); + if(!super.amount_complete(0,1000)) + return false; +// if(cb && !cb->amount_complete(total_tiles-i,total_tiles)) +// return false; + // Perform clipping on the tile + if(clipping_) + { + w=x+tile_w_error(_("Accelerated Renderer Failure")); + return false; + } + else + { + work_time+=timer2(); + if(!surface) + { + if(cb)cb->error(_("Bad surface")); + return false; + } + if(get_remove_alpha()) + for(int i=0;ierror(_("add_tile():Unable to put surface on target")); + return false; + } + add_tile_time+=timer(); + } + tile_timer.reset(); + signal_progress()(); + } + } + if(cb && !cb->amount_complete(total_tiles,total_tiles)) + return false; + +#ifdef SYNFIG_DISPLAY_EFFICIENCY + synfig::info(">>>>>> Render Time: %fsec, Find Tile Time: %fsec, Add Tile Time: %fsec, Total Time: %fsec",work_time,find_tile_time,add_tile_time,total_time()); + synfig::info(">>>>>> FRAME EFFICIENCY: %f%%",(100.0f*work_time/total_time())); +#endif +#undef total_tiles + return true; +} + +bool +synfig::Target_Tile::render(ProgressCallback *cb) +{ + SuperCallback super_cb; + int + i=0, + total_frames, + frame_start, + frame_end; + Time + t=0, + time_start, + time_end; + + assert(canvas); + curr_frame_=0; + init(); + if( !init() ){ + if(cb) cb->error(_("Target initialization failure")); + return false; + } + + + // If the description's end frame is equal to + // the start frame, then it is assumed that we + // are rendering only one frame. Correct it. + if(desc.get_frame_end()==desc.get_frame_start()) + desc.set_frame_end(desc.get_frame_start()+1); + + frame_start=desc.get_frame_start(); + frame_end=desc.get_frame_end(); + time_start=desc.get_time_start(); + time_end=desc.get_time_end(); + + // Calculate the number of frames + total_frames=frame_end-frame_start; + + + + try { + // Grab the time + i=next_frame(t); + + //synfig::info("1time_set_to %s",t.get_string().c_str()); + + if(i>=1) + { + do + { + curr_tile_=0; + + // If we have a callback, and it returns + // false, go ahead and bail. (maybe a use cancel) + if(cb && !cb->amount_complete(total_frames-(i-1),total_frames)) + return false; + + if(!start_frame(cb)) + return false; + + // Set the time that we wish to render + //if(!get_avoid_time_sync() || canvas->get_time()!=t) + canvas->set_time(t); + + Context context; + +#ifdef SYNFIG_OPTIMIZE_LAYER_TREE + Canvas::Handle op_canvas; + if (!getenv("SYNFIG_DISABLE_OPTIMIZE_LAYER_TREE")) + { + op_canvas = Canvas::create(); + op_canvas->set_file_name(canvas->get_file_name()); + optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); + context=op_canvas->get_context(); + } + else + context=canvas->get_context(); +#else + context=canvas->get_context(); +#endif + +/* + #ifdef SYNFIG_OPTIMIZE_LAYER_TREE + Context context; + Canvas::Handle op_canvas(Canvas::create()); + op_canvas->set_file_name(canvas->get_file_name()); + // Set the time that we wish to render + canvas->set_time(t); + optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); + context=op_canvas->get_context(); + #else + Context context; + // Set the time that we wish to render + canvas->set_time(t); + context=canvas->get_context(); + #endif +*/ + + if(!render_frame_(context,0)) + return false; + end_frame(); + }while((i=next_frame(t))); + //synfig::info("tilerenderer: i=%d, t=%s",i,t.get_string().c_str()); + } + else + { + curr_tile_=0; + + if(!start_frame(cb)) + return false; + + // Set the time that we wish to render +// if(!get_avoid_time_sync() || canvas->get_time()!=t) + canvas->set_time(t); + + //synfig::info("2time_set_to %s",t.get_string().c_str()); + + Context context; + +#ifdef SYNFIG_OPTIMIZE_LAYER_TREE + Canvas::Handle op_canvas; + if (!getenv("SYNFIG_DISABLE_OPTIMIZE_LAYER_TREE")) + { + op_canvas = Canvas::create(); + op_canvas->set_file_name(canvas->get_file_name()); + optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); + context=op_canvas->get_context(); + } + else + context=canvas->get_context(); +#else + context=canvas->get_context(); +#endif + + if(!render_frame_(context, cb)) + return false; + end_frame(); + } + + } + catch(String str) + { + if(cb)cb->error(_("Caught string :")+str); + return false; + } + catch(std::bad_alloc) + { + if(cb)cb->error(_("Ran out of memory (Probably a bug)")); + return false; + } + catch(...) + { + if(cb)cb->error(_("Caught unknown error, rethrowing...")); + throw; + } + return true; +} diff --git a/synfig-core/src/synfig/target_tile.h b/synfig-core/src/synfig/target_tile.h new file mode 100644 index 0000000..84ef50e --- /dev/null +++ b/synfig-core/src/synfig/target_tile.h @@ -0,0 +1,124 @@ +/* === S Y N F I G ========================================================= */ +/*! \file target_tile.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TARGET_TILE_H +#define __SYNFIG_TARGET_TILE_H + +/* === H E A D E R S ======================================================= */ + +#include "target.h" + +/* === M A C R O S ========================================================= */ + +#define TILE_SIZE 120 + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/*! \class Target_Tile +** \brief Render-target +** \todo writeme +*/ +class Target_Tile : public Target +{ + int threads_; + int tile_w_; + int tile_h_; + int curr_tile_; + int curr_frame_; + bool clipping_; +public: + typedef etl::handle Handle; + typedef etl::loose_handle LooseHandle; + typedef etl::handle ConstHandle; + + Target_Tile(); + + //! Renders the canvas to the target + virtual bool render(ProgressCallback *cb=NULL); + + //! Determines which tile needs to be rendered next. + /*! Most cases will not have to redefine this function. + ** The default should be adequate in nearly all situations. + ** \returns The number of tiles left to go plus one. + ** This means that whenever this function returns zero, + ** there are no more tiles to render and that any value + ** in \a x or \a y should be disregarded. */ + virtual int next_tile(int& x, int& y); + + virtual int next_frame(Time& time); + + //! Adds the tile at \a x , \a y contained in \a surface + virtual bool add_tile(const synfig::Surface &surface, int x, int y)=0; + + virtual int total_tiles()const + { + // Width of the image(in tiles) + const int tw(rend_desc().get_w()/tile_w_+(rend_desc().get_w()%tile_w_?1:0)); + const int th(rend_desc().get_h()/tile_h_+(rend_desc().get_h()%tile_h_?1:0)); + + return tw*th; + } + + //! Marks the start of a frame + /*! \return \c true on success, \c false upon an error. + ** \see end_frame(), start_scanline() + */ + virtual bool start_frame(ProgressCallback *cb=NULL)=0; + + //! Marks the end of a frame + /*! \see start_frame() */ + virtual void end_frame()=0; + + void set_threads(int x) { threads_=x; } + + int get_threads()const { return threads_; } + + void set_tile_w(int w) { tile_w_=w; } + + int get_tile_w()const { return tile_w_; } + + void set_tile_h(int h) { tile_h_=h; } + + int get_tile_h()const { return tile_h_; } + + bool get_clipping()const { return clipping_; } + + void set_clipping(bool x) { clipping_=x; } + +private: + + bool render_frame_(Context context,ProgressCallback *cb=0); + +}; // END of class Target_Tile + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/time.cpp b/synfig-core/src/synfig/time.cpp new file mode 100644 index 0000000..f9fae68 --- /dev/null +++ b/synfig-core/src/synfig/time.cpp @@ -0,0 +1,324 @@ +/* === S Y N F I G ========================================================= */ +/*! \file time.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** Copyright (c) 2008 Gerco Ballintijn +** Copyright (c) 2008 Carlos López +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "time.h" +#include +#include +#include "general.h" +#include +#include +#include +#include +#include +#include + + +#ifdef WIN32 +#include +#ifndef isnan +extern "C" { int _isnan(double x); } +#define isnan _isnan +#endif +#endif + +// For some reason isnan() isn't working on macosx any more. +// This is a quick fix. +#if defined(__APPLE__) && !defined(SYNFIG_ISNAN_FIX) +#ifdef isnan +#undef isnan +#endif +inline bool isnan(double x) { return x != x; } +inline bool isnan(float x) { return x != x; } +#define SYNFIG_ISNAN_FIX 1 +#endif + + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +#define tolower ::tolower + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === M E T H O D S ======================================================= */ + +Time::Time(const String &str_, float fps): + value_(0) +{ + String str(str_); + std::transform(str.begin(),str.end(),str.begin(),&tolower); + + // Start/Begin Of Time + if(str=="sot" || str=="bot") + { + operator=(begin()); + return; + } + // End Of Time + if(str=="eot") + { + operator=(end()); + return; + } + + + unsigned int pos=0; + int read; + float amount; + + // Now try to read it in the letter-abbreviated format + while(pos=str.size() || read==0) + { + // Throw up a warning if there are no units + // and the amount isn't zero. There is no need + // to warn about units if the value is zero + // it is the only case where units are irrelevant. + if(amount!=0) + synfig::warning("Time(): No unit provided in time code, assuming SECONDS (\"%s\")",str.c_str()); + value_+=amount; + return; + } + switch(str[pos]) + { + case 'h': + case 'H': + value_+=amount*3600; + break; + case 'm': + case 'M': + value_+=amount*60; + break; + case 's': + case 'S': + value_+=amount; + break; + case 'f': + case 'F': + if(fps) + value_+=amount/fps; + else + synfig::warning("Time(): Individual frames referenced, but frame rate is unknown"); + break; + case ':': + // try to read it in as a traditional time format + { + int hour,minute,second; + float frame; + if(fps && sscanf(str.c_str(),"%d:%d:%d.%f",&hour,&minute,&second,&frame)==4) + { + value_=frame/fps+(hour*3600+minute*60+second); + return; + } + + if(sscanf(str.c_str(),"%d:%d:%d",&hour,&minute,&second)==3) + { + value_=hour*3600+minute*60+second; + return; + } + } + synfig::warning("Time(): Bad time format"); + break; + + default: + value_+=amount; + synfig::warning("Time(): Unexpected character '%c' when parsing time string \"%s\"",str[pos],str.c_str()); + break; + } + pos++; + amount=0; + } +} + +String +Time::get_string(float fps, Time::Format format)const +{ + Time time(*this); + + if(time<=begin()) + return "SOT"; // Start Of Time + if(time>=end()) + return "EOT"; // End Of Time + + if(fps<0)fps=0; + + if(ceil(time.value_)-time.value_1) + { + int frame; + frame=round_to_int(time*fps); + + return strprintf("%02d:%02d:%02d.%02d",hour,minute,second,frame); + } + else + return strprintf("%02d:%02d:%02d",hour,minute,second); + } + + if (format <= FORMAT_FRAMES) + { + if (fps && fps>0) + return strprintf("%df", round_to_int(time * fps)); + else + return strprintf("%ds", round_to_int(time * 1)); + } + + String ret; + bool started = false; + + if(format<=FORMAT_FULL || hour) + { + ret+=strprintf("%dh",hour); + started = true; + } + + if(format<=FORMAT_FULL || minute) + { + if (!(format<=FORMAT_NOSPACES) && started) + ret += " "; + + ret += strprintf("%dm", minute); + started = true; + } + + if(fps && fps>1) + { + int second; + float frame; + second=time;time-=second; + frame=time*fps; + + if(format<=FORMAT_FULL || second) + { + if (!(format<=FORMAT_NOSPACES) && started) + ret += " "; + + ret += strprintf("%ds", (int)second); + started = true; + } + + if(format<=FORMAT_FULL || abs(frame) > epsilon_() || !started) + { + if (!(format<=FORMAT_NOSPACES) && started) + ret += " "; + + if(abs(frame-floor(frame) >= epsilon_())) + ret += strprintf("%0.3ff", frame); + else + ret += strprintf("%0.0ff", frame); + } + } + else + { + float second; + second=time; + if(format<=FORMAT_FULL || second || !started) + { + if (!(format<=FORMAT_NOSPACES) && started) + ret += " "; + + if(abs(second-floor(second))>=epsilon_()) + { + String seconds(strprintf("%0.8f",second)); + + // skip trailing zeros + int count = 0; + String::reverse_iterator i = seconds.rbegin(); + for ( ; (*i) == '0'; i++) + count++; + + // if we removed too many, go back one place, leaving one zero + if (*i < '0' || *i > '9') count--; + + ret += seconds.substr(0, seconds.size()-count) + "s"; + } + else + ret+=strprintf("%0.0fs",second); + } + } + + return ret; +} + +Time +Time::round(float fps)const +{ + assert(fps>0); + + value_type time(*this); + + time*=fps; + + if(abs(time-floor(time))<0.5) + return floor(time)/fps; + else + return ceil(time)/fps; +} + +#ifdef _DEBUG +const char * +Time::c_str()const +{ + return get_string().c_str(); +} +#endif + +//! \writeme +bool +Time::is_valid()const +{ + return !isnan(value_); +} diff --git a/synfig-core/src/synfig/time.h b/synfig-core/src/synfig/time.h new file mode 100644 index 0000000..5acc15e --- /dev/null +++ b/synfig-core/src/synfig/time.h @@ -0,0 +1,171 @@ +/* === S Y N F I G ========================================================= */ +/*! \file time.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TIME_H +#define __SYNFIG_TIME_H + +/* === H E A D E R S ======================================================= */ + +#include "string_decl.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/*! \class Time +** \todo writeme +** \see TimeFormat, time_to_string(), string_to_time() +*/ +class Time +{ +public: + typedef double value_type; + + /*! \enum Format + ** \todo writeme + ** \see Time, get_string() */ + enum Format + { + FORMAT_NORMAL=0, //!< Represents the default method of printing the time + FORMAT_NOSPACES=(1<<0), //!< Remove any whitespace + FORMAT_FULL=(1<<1), //!< Do not remove units that have "zero" value + FORMAT_VIDEO=(1<<2), //!< Use the HH:MM:SS.FF format + FORMAT_FRAMES=(1<<3), //!< Use the FF format (frames only) + + FORMAT_END=(1<<4) //!< \internal Not used + }; // END of enum Format + +private: + value_type value_; + + static value_type epsilon_() { return static_cast(0.0005); } + +public: + Time() { } + + Time(const value_type &x):value_(x) { } + + Time(int x):value_(x) { } + + Time(int hour, int minute, float second):value_(static_cast(second+hour*3600+minute*60)) { } + + //! Constructs Time from the given string. + /*! \note If the string references frames, then the + ** frame rate (\a fps) should be provided from the + ** correct source. (Which is most likely the RendDesc + ** of the current Canvas) + ** The frame count will be ignored if the + ** FPS is not given. */ + Time(const String &string, float fps=0); + + //! Marks the exclusive negative boundary of time + static const Time begin() { return static_cast(-32767.0f*512.0f); } + + //! Marks the exclusive positive boundary of time + static const Time end() { return static_cast(32767.0f*512.0f); } + + //! Marks zero time + static const Time zero() { return static_cast(0); } + + //! The amount of allowable error in calculations + static const Time epsilon() { return static_cast(epsilon_()); } + + //! Returns a string describing the current time value + /*! \see Format */ + String get_string(float fps=0, Time::Format format=FORMAT_NORMAL)const; + +#ifdef _DEBUG + const char *c_str()const; +#endif + + //! \writeme + bool is_valid()const; + + //! Rounds time to the nearest frame for the given frame rate, \a fps + Time round(float fps)const; + + bool is_equal(const Time& rhs)const { return (value_>rhs.value_)?value_-rhs.value_<=epsilon_():rhs.value_-value_<=epsilon_(); } + bool is_less_than(const Time& rhs)const { return rhs.value_-value_ > epsilon_(); } + bool is_more_than(const Time& rhs)const { return value_-rhs.value_ > epsilon_(); } + + operator double()const { return value_; } + + template bool operator<(const U& rhs)const { return value_ bool operator>(const U& rhs)const { return value_>rhs; } + template bool operator<=(const U& rhs)const { return value_<=rhs; } + template bool operator>=(const U& rhs)const { return value_>=rhs; } + template bool operator==(const U& rhs)const { return value_==rhs; } + template bool operator!=(const U& rhs)const { return value_!=rhs; } + +#if 0 + bool operator<(const Time& rhs)const { return value_(const Time& rhs)const { return value_>rhs.value_; } + bool operator<=(const Time& rhs)const { return value_<=rhs.value_; } + bool operator>=(const Time& rhs)const { return value_>=rhs.value_; } + bool operator==(const Time& rhs)const { return value_==rhs.value_; } + bool operator!=(const Time& rhs)const { return value_!=rhs.value_; } +#else + bool operator<(const Time& rhs)const { return is_less_than(rhs); } + bool operator>(const Time& rhs)const { return is_more_than(rhs); } + bool operator<=(const Time& rhs)const { return is_less_than(rhs)||is_equal(rhs); } + bool operator>=(const Time& rhs)const { return is_more_than(rhs)||is_equal(rhs); } + bool operator==(const Time& rhs)const { return is_equal(rhs); } + bool operator!=(const Time& rhs)const { return !is_equal(rhs); } +#endif + + template const Time& operator+=(const U &rhs) { value_+=static_cast(rhs); return *this; } + template const Time& operator-=(const U &rhs) { value_-=static_cast(rhs); return *this; } + template const Time& operator*=(const U &rhs) { value_*=static_cast(rhs); return *this; } + template const Time& operator/=(const U &rhs) { value_/=static_cast(rhs); return *this; } + + template Time operator+(const U &rhs)const { return value_+static_cast(rhs); } + template Time operator-(const U &rhs)const { return value_-static_cast(rhs); } + template Time operator*(const U &rhs)const { return value_*static_cast(rhs); } + template Time operator/(const U &rhs)const { return value_/static_cast(rhs); } + + Time operator-()const { return -value_; } +}; // END of class Time + +//! This operator allows the combining of Time::Format flags using the '|' operator +/*! \see Time::Format, Time::get_string() */ +inline Time::Format operator|(Time::Format lhs, Time::Format rhs) +{ return static_cast((int)lhs|(int)rhs); } + +//! This operator is for checking Time::Format flags. +/*! Don't think of it as "less then or equal to", but think of it +** like an arrow. Is \a rhs inside of \a lhs ? +** \see Time::Format, Time::get_string() */ +inline bool operator<=(Time::Format lhs, Time::Format rhs) +{ return (static_cast(lhs) & static_cast(rhs))==static_cast(rhs); } + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/timepointcollect.cpp b/synfig-core/src/synfig/timepointcollect.cpp new file mode 100644 index 0000000..c395dfd --- /dev/null +++ b/synfig-core/src/synfig/timepointcollect.cpp @@ -0,0 +1,153 @@ +/* === S Y N F I G ========================================================= */ +/*! \file timepointcollect.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "timepointcollect.h" +#include "valuenode_animated.h" +#include "layer_pastecanvas.h" +#include "layer.h" +#include "canvas.h" +#include "value.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +//! \writeme +int +synfig::waypoint_collect(set > &waypoint_set, + const Time &time, + const etl::handle &node) +{ + const TimePointSet& timepoint_set(node->get_times()); + + // Check to see if there is anything in here at the given time + if(timepoint_set.find(time)==timepoint_set.end()) + return 0; + + // Check if we are a linkable value node + LinkableValueNode::Handle linkable_value_node; + linkable_value_node=linkable_value_node.cast_dynamic(node); + if(linkable_value_node) + { + const int link_count(linkable_value_node->link_count()); + int i,ret(0); + for(i=0;iget_link(i).get()); + + return ret; + } + + // Check if we are a layer + Layer::Handle layer; + layer=layer.cast_dynamic(node); + if(layer) + { + const Layer::DynamicParamList& dyn_param_list(layer->dynamic_param_list()); + Layer::DynamicParamList::const_iterator iter; + int ret(0); + for(iter=dyn_param_list.begin();iter!=dyn_param_list.end();++iter) + ret+=waypoint_collect(waypoint_set,time,iter->second); + + ValueBase canvas_value(layer->get_param("canvas")); + if(canvas_value.get_type()==ValueBase::TYPE_CANVAS) + { + etl::handle p = etl::handle::cast_dynamic(layer); + if (p) + ret+=waypoint_collect(waypoint_set, time + p->get_time_offset(), + Canvas::Handle(canvas_value.get(Canvas::Handle()))); + else + ret+=waypoint_collect(waypoint_set, time, + Canvas::Handle(canvas_value.get(Canvas::Handle()))); + } + return ret; + } + + // Check if we are a canvas + Canvas::Handle canvas; + canvas=canvas.cast_dynamic(node); + if(canvas) + { + Canvas::const_iterator iter; + int ret(0); + for(iter=canvas->begin();iter!=canvas->end();++iter) + ret+=waypoint_collect(waypoint_set,time,*iter); + return ret; + } + + // Check if we are an animated value node + ValueNode_Animated::Handle value_node_animated; + value_node_animated=value_node_animated.cast_dynamic(node); + if(value_node_animated) + { + try{ + Waypoint waypoint=*value_node_animated->find(time); + + // If it is already in the waypoint set, then + // don't bother adding it again + if(waypoint_set.find(waypoint)!=waypoint_set.end()) + return 0; + + waypoint_set.insert(waypoint); + return 1; + }catch(...) + { + return 0; + } + } + + return 0; +} + +//! \writeme +int +synfig::activepoint_collect(set >& /*activepoint_set*/,const Time& time, const etl::handle& node) +{ + const TimePointSet& timepoint_set(node->get_times()); + + // Check to see if there is anything in here at the given time + if(timepoint_set.find(time)==timepoint_set.end()) + return 0; + + return 0; +} diff --git a/synfig-core/src/synfig/timepointcollect.h b/synfig-core/src/synfig/timepointcollect.h new file mode 100644 index 0000000..7f6827c --- /dev/null +++ b/synfig-core/src/synfig/timepointcollect.h @@ -0,0 +1,54 @@ +/* === S Y N F I G ========================================================= */ +/*! \file timepointcollect.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TIMEPOINTCOLLECT_H +#define __SYNFIG_TIMEPOINTCOLLECT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include "activepoint.h" +#include "waypoint.h" +#include "node.h" +#include "time.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +//! \writeme +int waypoint_collect(std::set >& waypoint_set,const Time& time, const etl::handle& node); + +//! \writeme +int activepoint_collect(std::set >& activepoint_set,const Time& time, const etl::handle& node); + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/transform.cpp b/synfig-core/src/synfig/transform.cpp new file mode 100644 index 0000000..2e9de68 --- /dev/null +++ b/synfig-core/src/synfig/transform.cpp @@ -0,0 +1,149 @@ +/* === S Y N F I G ========================================================= */ +/*! \file transform.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "transform.h" +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +synfig::GUID +TransformStack::get_guid()const +{ + GUID ret(0); + + for(const_iterator iter(begin());iter!=end();++iter) + ret%=(*iter)->get_guid(); + return ret; +} + +synfig::Vector +TransformStack::perform(const synfig::Vector& x)const +{ + synfig::Vector ret(x); + + for(const_reverse_iterator iter(rbegin());iter!=rend();++iter) + ret=(*iter)->perform(ret); + + return ret; +} + +synfig::Vector +TransformStack::unperform(const synfig::Vector& x)const +{ + synfig::Vector ret(x); + + for(const_iterator iter(begin());iter!=end();++iter) + ret=(*iter)->unperform(ret); + + return ret; +} + +synfig::Rect +TransformStack::perform(const synfig::Rect& x)const +{ + Point min(x.get_min()); + Point max(x.get_max()); + Rect ret(perform(min),perform(max)); + + std::swap(min[1],max[1]); + ret + .expand(perform(min)) + .expand(perform(max)) + ; + return ret; +} + +synfig::Rect +TransformStack::unperform(const synfig::Rect& x)const +{ + Point min(x.get_min()); + Point max(x.get_max()); + Rect ret(unperform(min),unperform(max)); + + std::swap(min[1],max[1]); + ret + .expand(unperform(min)) + .expand(unperform(max)) + ; + return ret; +} + +synfig::Rect +Transform::perform(const synfig::Rect& x)const +{ + if(x.area()>1000000000000.0) + return Rect::full_plane(); + + Point min(x.get_min()); + Point max(x.get_max()); + + Rect ret(perform(min),perform(max)); + + std::swap(min[1],max[1]); + ret + .expand(perform(min)) + .expand(perform(max)) + ; + return ret; +} + +synfig::Rect +Transform::unperform(const synfig::Rect& x)const +{ + if(x.area()>1000000000000.0) + return Rect::full_plane(); + + Point min(x.get_min()); + Point max(x.get_max()); + + Rect ret(unperform(min),unperform(max)); + + std::swap(min[1],max[1]); + ret + .expand(unperform(min)) + .expand(unperform(max)) + ; + return ret; +} diff --git a/synfig-core/src/synfig/transform.h b/synfig-core/src/synfig/transform.h new file mode 100644 index 0000000..50bf7ff --- /dev/null +++ b/synfig-core/src/synfig/transform.h @@ -0,0 +1,86 @@ +/* === S Y N F I G ========================================================= */ +/*! \file transform.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TRANSFORM_H +#define __SYNFIG_TRANSFORM_H + +/* === H E A D E R S ======================================================= */ + +#include +#include "vector.h" +#include +#include "rect.h" +#include "guid.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class Transform : public etl::shared_object +{ + GUID guid_; + +public: + typedef etl::handle Handle; + +protected: + Transform(const GUID& guid):guid_(guid) { } + +public: + + const GUID& get_guid()const { return guid_; } + + virtual ~Transform() { } + virtual synfig::Vector perform(const synfig::Vector& x)const=0; + virtual synfig::Vector unperform(const synfig::Vector& x)const=0; + + virtual synfig::Rect perform(const synfig::Rect& x)const; + virtual synfig::Rect unperform(const synfig::Rect& x)const; + +}; // END of class Transform + +class TransformStack : public std::list +{ +public: + GUID get_guid()const; + + synfig::Vector perform(const synfig::Vector& x)const; + synfig::Vector unperform(const synfig::Vector& x)const; + + synfig::Rect perform(const synfig::Rect& x)const; + synfig::Rect unperform(const synfig::Rect& x)const; + + void push(const Transform::Handle& x) { if(x)push_back(x); } + void pop() { pop_back(); } +}; // END of class TransformStack + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/types.h b/synfig-core/src/synfig/types.h new file mode 100644 index 0000000..6c3b7ea --- /dev/null +++ b/synfig-core/src/synfig/types.h @@ -0,0 +1,47 @@ +/* === S Y N F I G ========================================================= */ +/*! \file types.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TYPES_H +#define __SYNFIG_TYPES_H + +/* === H E A D E R S ======================================================= */ + +#include + +#ifndef SYNFIG_NO_ANGLE +#include "angle.h" +#endif + +#include "time.h" +#include "vector.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/uniqueid.cpp b/synfig-core/src/synfig/uniqueid.cpp new file mode 100644 index 0000000..d89141b --- /dev/null +++ b/synfig-core/src/synfig/uniqueid.cpp @@ -0,0 +1,51 @@ +/* === S Y N F I G ========================================================= */ +/*! \file uniqueid.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "uniqueid.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace synfig; + +/* === G L O B A L S ======================================================= */ + +static int uniqueid_pool_(0); + +/* === M E T H O D S ======================================================= */ + +int +synfig::UniqueID::next_id() +{ + return ++uniqueid_pool_; +} diff --git a/synfig-core/src/synfig/uniqueid.h b/synfig-core/src/synfig/uniqueid.h new file mode 100644 index 0000000..cab6593 --- /dev/null +++ b/synfig-core/src/synfig/uniqueid.h @@ -0,0 +1,91 @@ +/* === S Y N F I G ========================================================= */ +/*! \file uniqueid.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_UNIQUEID_H +#define __SYNFIG_UNIQUEID_H + +/* === H E A D E R S ======================================================= */ + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class UniqueIDLessThan; + +/*! \class UniqueID +** \brief \todo +*/ +class UniqueID +{ + friend class UniqueIDLessThan; + + int id_; + + explicit UniqueID(int id_):id_(id_) { } + + static int next_id(); + +public: + + //! Returns the internal unique identifier for this object. + /*! The return value from this isn't really useful for + ** much other than debug output. Nonetheless, that is + ** one step above useless, so here it is. */ + const int &get_uid()const { return id_; } + + UniqueID():id_(next_id()) { } + + void make_unique() { id_=next_id(); } + + static const UniqueID nil() { return UniqueID(0); } + + operator bool()const { return static_cast(id_); } + + void mimic(const UniqueID& x) { id_=x.id_; } + + bool operator==(const UniqueID &rhs)const { return id_==rhs.id_; } + bool operator!=(const UniqueID &rhs)const { return id_!=rhs.id_; } + bool operator<(const UniqueID &rhs)const { return id_ +#endif + +#include "value.h" +#include "general.h" +#include +#include "canvas.h" +#include "gradient.h" + + + +#include "vector.h" +#include "time.h" +#include "segment.h" +#include "color.h" + +#endif + +using namespace synfig; +using namespace std; +using namespace etl; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueBase::ValueBase():type(TYPE_NIL),data(0),ref_count(0),loop_(0) +{ +} + +ValueBase::ValueBase(Type x): + type(x), + data(0), + loop_(0) +{ + switch(type) + { + case TYPE_BOOL: data=static_cast(new bool()); break; + case TYPE_INTEGER: data=static_cast(new int()); break; + case TYPE_ANGLE: data=static_cast(new Angle()); break; + case TYPE_VECTOR: data=static_cast(new Vector()); break; + case TYPE_TIME: data=static_cast(new Time()); break; + case TYPE_REAL: data=static_cast(new Real()); break; + case TYPE_COLOR: data=static_cast(new Color()); break; + case TYPE_SEGMENT: data=static_cast(new Segment()); break; + case TYPE_BLINEPOINT: data=static_cast(new BLinePoint()); break; + case TYPE_LIST: data=static_cast(new list_type()); break; + case TYPE_STRING: data=static_cast(new String()); break; + case TYPE_GRADIENT: data=static_cast(new Gradient()); break; + case TYPE_CANVAS: data=static_cast(new etl::handle()); break; + default: break; + } +} + +ValueBase::~ValueBase() +{ + clear(); +} + +const char* +ValueBase::get(const char*)const +{ + return get(String()).c_str(); +} + +#ifdef _DEBUG +String +ValueBase::get_string() const +{ + switch(type) + { + case TYPE_NIL: return "Nil"; + case TYPE_BOOL: return strprintf("Bool (%s)", get(bool()) ? "true" : "false"); + case TYPE_INTEGER: return strprintf("Integer (%s)", get(int())); + case TYPE_ANGLE: return strprintf("Angle (%.2f)", Angle::deg(get(Angle())).get()); + + // All types after this point are larger than 32 bits + + case TYPE_TIME: return strprintf("Time (%s)", get(Time()).get_string().c_str()); + case TYPE_REAL: return strprintf("Real (%f)", get(Real())); + + // All types after this point are larger than 64 bits + + case TYPE_VECTOR: return strprintf("Vector (%f, %f)", get(Vector())[0], get(Vector())[1]); + case TYPE_COLOR: return strprintf("Color (%s)", get(Color()).get_string().c_str()); + case TYPE_SEGMENT: return strprintf("Segment ((%f, %f) to (%f, %f))", get(Segment()).p1[0], get(Segment()).p1[1], get(Segment()).p2[0], get(Segment()).p2[1]); + case TYPE_BLINEPOINT: return strprintf("BLinePoint (%s)", get(BLinePoint()).get_vertex()[0], get(BLinePoint()).get_vertex()[1]); + + // All types after this point require construction/destruction + + case TYPE_LIST: return strprintf("List (%d elements)", get(list_type()).size()); + case TYPE_CANVAS: return strprintf("Canvas (%s)", get(etl::loose_handle())->get_id().c_str()); + case TYPE_STRING: return strprintf("String (%s)", get(String()).c_str()); + case TYPE_GRADIENT: return strprintf("Gradient (%d cpoints)", get(Gradient()).size()); + default: return "Invalid type"; + } +} +#endif // _DEBUG + +void +ValueBase::set(Canvas* x) +{ + clear(); + if(x && x->is_inline()) + { + _set(etl::handle(x)); + } + else + { + _set(etl::loose_handle(x)); + } + assert(get(x)==x); +} + +void +ValueBase::set(etl::loose_handle x) +{ + clear(); + if(x && x->is_inline()) + _set(etl::handle(x)); + else + _set(etl::loose_handle(x)); + assert(get(x)==x); +} + +void +ValueBase::set(etl::handle x) +{ + clear(); + if(x && x->is_inline()) + _set(etl::handle(x)); + else + _set(etl::loose_handle(x)); + assert(get(x)==x); +} + +void +ValueBase::set(const list_type &x) +{ + _set(x); +} + +void +ValueBase::set(const char* x) +{ + _set(String(x)); +} + +void +ValueBase::set(char* x) +{ + _set(String(x)); +} + +bool +ValueBase::is_valid()const +{ + return type>TYPE_NIL && type(data); break; + case TYPE_INTEGER: delete static_cast(data); break; + case TYPE_ANGLE: delete static_cast(data); break; + case TYPE_TIME: delete static_cast(data); break; + case TYPE_REAL: delete static_cast(data); break; + case TYPE_VECTOR: delete static_cast(data); break; + case TYPE_COLOR: delete static_cast(data); break; + case TYPE_SEGMENT: delete static_cast(data); break; + case TYPE_BLINEPOINT: delete static_cast(data); break; + case TYPE_LIST: delete static_cast(data); break; + case TYPE_CANVAS: + { + etl::handle canvas(get(etl::loose_handle())); + if(canvas && canvas->is_inline()) + delete static_cast*>(data); + else + delete static_cast*>(data); + break; + } + case TYPE_STRING: delete static_cast(data); break; + case TYPE_GRADIENT: delete static_cast(data); break; + default: + break; + } + } + + ref_count.detach(); + data=0; + type=TYPE_NIL; +} + + +String +ValueBase::type_name(Type id) +{ + // don't internationalize these type names - they're using in .sif files + switch(id) + { + /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ + case TYPE_BOOL: return N_("bool"); + /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ + case TYPE_INTEGER: return N_("integer"); + /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ + case TYPE_ANGLE: return N_("angle"); + /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ + case TYPE_TIME: return N_("time"); + /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ + case TYPE_REAL: return N_("real"); + /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ + case TYPE_VECTOR: return N_("vector"); + /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ + case TYPE_COLOR: return N_("color"); + /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ + case TYPE_SEGMENT: return N_("segment"); + /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ + case TYPE_BLINEPOINT: return N_("bline_point"); + /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ + case TYPE_LIST: return N_("list"); + /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ + case TYPE_CANVAS: return N_("canvas"); + /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ + case TYPE_STRING: return N_("string"); + /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ + case TYPE_GRADIENT: return N_("gradient"); + /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ + case TYPE_NIL: return N_("nil"); + default: + break; + } + synfig::warning("Encountered unknown ValueBase with an Type of %d",id); +// assert(0); + return "UNKNOWN"; +} + +String +ValueBase::type_local_name(Type id) +{ + return dgettext("synfig",type_name(id).c_str()); +} + +ValueBase::Type +ValueBase::ident_type(const String &str) +{ + if(str=="nil" || + str=="null") return TYPE_NIL; + else if(str=="time" || + str==_("time")) return TYPE_TIME; + else if(str=="real" || + str=="float" || + str==_("real")) return TYPE_REAL; + else if(str=="integer" || + str=="int" || + str==_("integer")) return TYPE_INTEGER; + else if(str=="bool" || + str==_("bool")) return TYPE_BOOL; + else if(str=="angle" || + str=="degrees" || + str=="radians" || + str=="rotations") return TYPE_ANGLE; + else if(str=="vector" || + str=="point") return TYPE_VECTOR; + else if(str=="color") return TYPE_COLOR; + else if(str=="string") return TYPE_STRING; + else if(str=="canvas") return TYPE_CANVAS; + else if(str=="list") return TYPE_LIST; + else if(str=="segment") return TYPE_SEGMENT; + else if(str=="gradient") return TYPE_GRADIENT; + else if(str=="bline_point" || + str=="blinepoint") return TYPE_BLINEPOINT; + + return TYPE_NIL; +} + +bool +ValueBase::operator==(const ValueBase& rhs)const +{ + if(get_type()!=rhs.get_type()) + return false; + if(data==rhs.data) + return true; + + switch(get_type()) + { + case TYPE_TIME: return get(Time()).is_equal(rhs.get(Time())); + case TYPE_REAL: return abs(get(Real())-rhs.get(Real()))<=0.00000000000001; + case TYPE_INTEGER: return get(int())==rhs.get(int()); + case TYPE_BOOL: return get(bool())==rhs.get(bool()); + case TYPE_ANGLE: return get(Angle())==rhs.get(Angle()); + case TYPE_VECTOR: return get(Vector()).is_equal_to(rhs.get(Vector())); + case TYPE_COLOR: return get(Color())==rhs.get(Color()); + case TYPE_STRING: return get(String())==rhs.get(String()); + case TYPE_CANVAS: return get(Canvas::LooseHandle())==rhs.get(Canvas::LooseHandle()); + case TYPE_LIST: return get_list()==rhs.get_list(); + case TYPE_SEGMENT: // return get(Segment())==rhs.get(Segment()); + case TYPE_GRADIENT: // return get(Gradient())==rhs.get(Gradient()); + case TYPE_BLINEPOINT: // return get(BLinePoint())==rhs.get(BLinePoint()); + case TYPE_NIL: + default: return false; + } + return false; +} diff --git a/synfig-core/src/synfig/value.h b/synfig-core/src/synfig/value.h new file mode 100644 index 0000000..7079dba --- /dev/null +++ b/synfig-core/src/synfig/value.h @@ -0,0 +1,481 @@ +/* === S Y N F I G ========================================================= */ +/*! \file value.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_VALUE_H +#define __SYNFIG_VALUE_H + +/* === H E A D E R S ======================================================= */ + +//#include "vector.h" +//#include "time.h" +#include "segment.h" +//#include "color.h" +#include "string.h" +#include +#include +#include +#include +#include "general.h" +//#include "gradient.h" +#include "blinepoint.h" +#include "exception.h" + +#ifdef USE_HALF_TYPE +#include +#endif + +#ifndef SYNFIG_NO_ANGLE +#include "angle.h" +#endif + +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class Canvas; +class Vector; +class Time; +class Segment; +class Gradient; +class BLinePoint; +class Color; + +/*! \class ValueBase +** \todo writeme +*/ +class ValueBase +{ + /* + -- ** -- T Y P E S ----------------------------------------------------------- + */ + +public: + + //! \writeme + enum Type + { + TYPE_NIL=0, //!< Represents an empty value + + TYPE_BOOL, + TYPE_INTEGER, + TYPE_ANGLE, //!< Angle + + // All types after this point are larger than 32 bits + + TYPE_TIME, //!< Time + TYPE_REAL, //!< Real + + // All types after this point are larger than 64 bits + + TYPE_VECTOR, //!< Vector + TYPE_COLOR, //!< Color + TYPE_SEGMENT, //!< Segment + TYPE_BLINEPOINT, //!< BLinePoint + + // All types after this point require construction/destruction + + TYPE_LIST, //!< List + TYPE_CANVAS, //!< Canvas + TYPE_STRING, //!< String + TYPE_GRADIENT, //!< Color Gradient + + TYPE_END //!< Not a valid type, used for sanity checks + }; + +private: + + typedef std::vector list_type; + + /* + -- ** -- D A T A ------------------------------------------------------------- + */ + +protected: + + Type type; + void *data; + etl::reference_counter ref_count; + bool loop_; + + /* + -- ** -- C O N S T R U C T O R S ----------------------------------- + */ + +public: + + //! \writeme + ValueBase(); + + //! \writeme + template + ValueBase(const T &x, bool loop_=false): + type(TYPE_NIL),data(0),ref_count(0),loop_(loop_) + { set(x); } + + //! \writeme + ValueBase(Type x); + + //! \writeme + ~ValueBase(); + + /* + -- ** -- O P E R A T O R S --------------------------------------------------- + */ + +public: + + //! \writeme + template ValueBase& operator=(const T& x) + { set(x); return *this; } + + //! \writeme + ValueBase& operator=(const ValueBase& x); + + //! \writeme + bool operator==(const ValueBase& rhs)const; + + //! \writeme + bool operator!=(const ValueBase& rhs)const { return !operator==(rhs); } + + //! Constant index operator for when value is of type TYPE_LIST + const ValueBase &operator[](int index)const + { assert(type==TYPE_LIST); assert(index>0); return get_list()[index]; } + + /* + -- ** -- M E M B E R F U N C T I O N S ------------------------------------- + */ + +public: + + //! \writeme + void clear(); + + //! \writeme + bool get_loop()const { return loop_; } + + //! \writeme + void set_loop(bool x) { loop_=x; } + + //! \writeme + bool empty()const; + + //! \writeme + Type get_contained_type()const; + + //! Returns true if the contained value is defined and valid. + bool is_valid()const; + + //! Returns a string containing the name of the type + String type_name()const { return type_name(type); } + + //! Returns the type of the contained value + const Type & get_type()const { return type; } + + //! Checks the type of the parameter against itself. Returns true if they are of the same type. + template bool + same_type_as(const T &x)const + { + const Type testtype(get_type(x)); + + return same_type_as(type, testtype); + } + + bool same_type_as(const Type testtype)const + { + return same_type_as(type, testtype); + } + + //! Compares two types. Returns true if they are the same type. + static bool same_type_as(const Type type1, const Type type2) + { + if (type1 == type2) return true; + if ((type1 == TYPE_REAL || type1 == TYPE_TIME) && + (type2 == TYPE_REAL || type2 == TYPE_TIME)) + return true; + return false; + } + + + // === GET MEMBERS ======================================================== + template + const T &get(const T& x __attribute__ ((unused)))const + { + assert(is_valid() && same_type_as(x)); + return *static_cast(data); + } + float get(const float &)const { return get(Real()); } + etl::loose_handle get(const etl::handle&)const + { return get(etl::loose_handle()); } + etl::loose_handle get(Canvas*)const + { return get(etl::loose_handle()); } + const char* get(const char*)const; + const list_type& get_list()const { return get(list_type()); } + +#ifdef _DEBUG + String get_string() const; +#endif // _DEBUG + // ======================================================================== + + + + // === PUT MEMBERS ======================================================== + template + void put(T* x)const + { + assert(same_type_as(*x)); + *x=*static_cast(data); + } + void put(float* x)const { *x=get(Real()); } + void put(char** x)const; + // ======================================================================== + + + + // === SET MEMBERS ======================================================== + template void set(const T& x) { _set(x); } + void set(const float &x) { _set(Real(x)); } + void set(const list_type &x); + void set(const char* x); + void set(char* x); + void set(Canvas*x); + void set(etl::loose_handle x); + void set(etl::handle x); + template void set(const std::vector &x) + { _set(list_type(x.begin(),x.end())); } + template void set(const std::list &x) + { _set(list_type(x.begin(),x.end())); } + // ======================================================================== + + + /* + -- ** -- S T A T I C F U N C T I O N S ------------------------------------- + */ + +public: + + //! Returns a string containing the name of the given Type + static String type_name(Type id); + + //! Returns a string containing the translated name of the given Type + static String type_local_name(Type id); + + //! Returns a the corresponding Type of the described type + static Type ident_type(const String &str); + + + // === GET TYPE MEMBERS =================================================== + static Type get_type(bool) { return TYPE_BOOL; } + static Type get_type(int) { return TYPE_INTEGER; } + static Type get_type(const Time&) { return TYPE_TIME; } + static Type get_type(const Real&) { return TYPE_REAL; } + static Type get_type(const float&) { return TYPE_REAL; } + static Type get_type(const Vector&) { return TYPE_VECTOR; } + static Type get_type(const Color&) { return TYPE_COLOR; } + static Type get_type(const Segment&) { return TYPE_SEGMENT; } + static Type get_type(const BLinePoint&) { return TYPE_BLINEPOINT; } + static Type get_type(const String&) { return TYPE_STRING; } + static Type get_type(const Gradient&) { return TYPE_GRADIENT; } + static Type get_type(Canvas*) { return TYPE_CANVAS; } + static Type get_type(const etl::handle&) + { return TYPE_CANVAS; } + static Type get_type(const etl::loose_handle&) + { return TYPE_CANVAS; } + static Type get_type(const list_type&) { return TYPE_LIST; } + template static Type get_type(const std::vector &/*x*/) + { return TYPE_LIST; } + template static Type get_type(const std::list &/*x*/) + { return TYPE_LIST; } + // ======================================================================== + + + /* + -- ** -- C A S T O P E R A T O R S ----------------------------------------- + */ + +public: + + operator const list_type&()const { return get_list(); } + //operator const Color&()const { return get(Color()); } + operator const Real&()const { return get(Real()); } + //operator const Time&()const { return get(Time()); } + + operator const Vector&()const { return get(Vector()); } + operator const BLinePoint&()const { return get(BLinePoint()); } + //operator const int&()const { return get(int()); } + //operator const String&()const { return get(String()); } + //operator const char *()const { return get(String()).c_str(); } + operator const Segment&()const { return get(Segment()); } + + + /* + -- ** -- O T H E R ----------------------------------------------------------- + */ + +public: + +#ifdef USE_HALF_TYPE + half get(const half &)const { return get(Real()); } + void put(half*x)const { *x=get(Real()); } + void set(const half &x) { _set(Real(x)); } + static Type get_type(const half&) { return TYPE_REAL; } + operator half()const { return get(Real()); } +#endif + +#ifndef SYNFIG_NO_ANGLE + operator const Angle&()const { return get(Angle()); } + static Type get_type(const Angle&) { return TYPE_ANGLE; } +#endif + + template + operator std::list()const + { + assert(type==TYPE_LIST); + std::list ret(get_list().begin(),get_list().end()); + return ret; + } + template + operator std::vector()const + { + assert(type==TYPE_LIST); + std::vector ret(get_list().begin(),get_list().end()); + return ret; + } + + +private: + + template void + _set(const T& x) + { + const Type newtype(get_type(x)); + + assert(newtype!=TYPE_NIL); + + if(newtype==type) + { + if(ref_count.unique()) + { + *reinterpret_cast(data)=x; + return; + } + } + + clear(); + + type=newtype; + ref_count.reset(); + data=new T(x); + } +}; // END of class ValueBase + + +/*! \class Value +** \todo writeme +*/ +template +class Value : public ValueBase +{ +public: + Value(const T &x):ValueBase(x) + { + } + + Value(const ValueBase &x):ValueBase(x) + { + if(!x.same_type_as(T())) + throw Exception::BadType("Value(ValueBase): Type Mismatch"); + } + + Value() + { + } + + T get()const { return ValueBase::get(T()); } + + void put(T* x)const { ValueBase::put(x); } + + void set(const T& x) { ValueBase::operator=(x); } + + Value& operator=(const T& x) { set(x); return *this; } + + Value& operator=(const Value& x) { return ValueBase::operator=(x); } + + Value& operator=(const ValueBase& x) + { + if(!x.same_type_as(T())) + throw Exception::BadType("Value(ValueBase): Type Mismatch"); + return ValueBase::operator=(x); + } + +}; // END of class Value + +/* +template <> +class Value< std::list > : public ValueBase +{ +public: + Value(const T &x):ValueBase(x) + { + } + Value(const ValueBase &x):ValueBase(x) + { + if(!x.same_type_as(T())) + throw Exception::BadType("Value(ValueBase): Type Mismatch"); + } + Value() + { + } + + T get()const { return ValueBase::get(T()); } + + void put(T* x)const { ValueBase::put(x); } + + void set(const T& x) { ValueBase::operator=(x); } + + Value& operator=(const T& x) { set(x); return *this; } + + Value& operator=(const Value& x) { return ValueBase::operator=(x); } + + Value& operator=(const ValueBase& x) + { + if(!x.same_type_as(T())) + throw Exception::BadType("Value(ValueBase): Type Mismatch"); + return ValueBase::operator=(x); + } + +}; // END of class Value +*/ + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode.cpp b/synfig-core/src/synfig/valuenode.cpp new file mode 100644 index 0000000..d1e3256 --- /dev/null +++ b/synfig-core/src/synfig/valuenode.cpp @@ -0,0 +1,704 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode.cpp +** \brief Implementation of the "Placeholder" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** Copyright (c) 2008 Carlos López +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#define SYNFIG_NO_ANGLE + +//#define HAS_HASH_MAP 1 + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode.h" +#include "general.h" +#include "canvas.h" +#include "paramdesc.h" +#include "releases.h" + +#include "valuenode_const.h" +#include "valuenode_linear.h" +#include "valuenode_composite.h" +#include "valuenode_reference.h" +#include "valuenode_greyed.h" +#include "valuenode_scale.h" +#include "valuenode_blinecalctangent.h" +#include "valuenode_blinecalcvertex.h" +#include "valuenode_blinecalcwidth.h" +#include "valuenode_blinereversetangent.h" +#include "valuenode_segcalctangent.h" +#include "valuenode_segcalcvertex.h" +#include "valuenode_repeat_gradient.h" +#include "valuenode_stripes.h" +#include "valuenode_range.h" +#include "valuenode_add.h" +#include "valuenode_subtract.h" +#include "valuenode_timedswap.h" +#include "valuenode_twotone.h" +#include "valuenode_bline.h" +#include "valuenode_dynamiclist.h" +#include "valuenode_radialcomposite.h" +#include "valuenode_gradientrotate.h" +#include "valuenode_sine.h" +#include "valuenode_cos.h" +#include "valuenode_atan2.h" +#include "valuenode_exp.h" +#include "valuenode_switch.h" +#include "valuenode_timeloop.h" +#include "valuenode_reciprocal.h" +#include "valuenode_duplicate.h" +#include "valuenode_integer.h" +#include "valuenode_step.h" +#include "valuenode_vectorangle.h" +#include "valuenode_vectorlength.h" +#include "valuenode_vectorx.h" +#include "valuenode_vectory.h" +#include "valuenode_gradientcolor.h" +#include "valuenode_dotproduct.h" +#include "valuenode_timestring.h" +#include "valuenode_realstring.h" +#include "valuenode_join.h" +#include "valuenode_anglestring.h" +#include "valuenode_intstring.h" +#include "valuenode_log.h" +#include "valuenode_pow.h" +#include "valuenode_compare.h" +#include "valuenode_not.h" +#include "valuenode_and.h" +#include "valuenode_or.h" + +#include "layer.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +static int value_node_count(0); + +static LinkableValueNode::Book *book_; + + +ValueNode::LooseHandle +synfig::find_value_node(const GUID& guid) +{ + return guid_cast(guid); +} + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +bool +ValueNode::subsys_init() +{ + book_=new LinkableValueNode::Book(); + +#define ADD_VALUENODE(class,name,local,version) \ + (*book_)[name].factory=reinterpret_cast(&class::create); \ + (*book_)[name].check_type=&class::check_type; \ + (*book_)[name].local_name=local; \ + (*book_)[name].release_version=version + +#define ADD_VALUENODE2(class,name,local,version) \ + (*book_)[name].factory=reinterpret_cast(&class::create_from); \ + (*book_)[name].check_type=&class::check_type; \ + (*book_)[name].local_name=local; \ + (*book_)[name].release_version=version + + ADD_VALUENODE(ValueNode_Linear, "linear", _("Linear"), RELEASE_VERSION_0_61_06); + ADD_VALUENODE(ValueNode_Composite, "composite", _("Composite"), RELEASE_VERSION_0_61_06); + ADD_VALUENODE(ValueNode_RadialComposite, "radial_composite", _("Radial Composite"), RELEASE_VERSION_0_61_06); + ADD_VALUENODE(ValueNode_Reference, "reference", _("Reference"), RELEASE_VERSION_0_61_06); + ADD_VALUENODE(ValueNode_Scale, "scale", _("Scale"), RELEASE_VERSION_0_61_06); + ADD_VALUENODE(ValueNode_SegCalcTangent, "segcalctangent", _("Segment Tangent"), RELEASE_VERSION_0_61_06); + ADD_VALUENODE(ValueNode_SegCalcVertex, "segcalcvertex", _("Segment Vertex"), RELEASE_VERSION_0_61_06); + ADD_VALUENODE(ValueNode_Stripes, "stripes", _("Stripes"), RELEASE_VERSION_0_61_06); + ADD_VALUENODE(ValueNode_Subtract, "subtract", _("Subtract"), RELEASE_VERSION_0_61_06); + ADD_VALUENODE(ValueNode_TwoTone, "twotone", _("Two-Tone"), RELEASE_VERSION_0_61_06); + ADD_VALUENODE(ValueNode_BLine, "bline", _("BLine"), RELEASE_VERSION_0_61_06); + ADD_VALUENODE2(ValueNode_DynamicList, "dynamic_list", _("Dynamic List"), RELEASE_VERSION_0_61_06); + ADD_VALUENODE(ValueNode_GradientRotate, "gradient_rotate", _("Gradient Rotate"), RELEASE_VERSION_0_61_06); + ADD_VALUENODE(ValueNode_Sine, "sine", _("Sine"), RELEASE_VERSION_0_61_06); + + ADD_VALUENODE(ValueNode_TimedSwap, "timed_swap", _("Timed Swap"), RELEASE_VERSION_0_61_07); // SVN r610 + ADD_VALUENODE(ValueNode_Repeat_Gradient, "repeat_gradient", _("Repeat Gradient"), RELEASE_VERSION_0_61_07); // SVN r666 + ADD_VALUENODE(ValueNode_Exp, "exp", _("Exponential"), RELEASE_VERSION_0_61_07); // SVN r739 + ADD_VALUENODE(ValueNode_Add, "add", _("Add"), RELEASE_VERSION_0_61_07); // SVN r742 + ADD_VALUENODE(ValueNode_BLineCalcTangent, "blinecalctangent", _("BLine Tangent"), RELEASE_VERSION_0_61_07); // SVN r744 + ADD_VALUENODE(ValueNode_BLineCalcVertex, "blinecalcvertex", _("BLine Vertex"), RELEASE_VERSION_0_61_07); // SVN r744 + ADD_VALUENODE(ValueNode_Range, "range", _("Range"), RELEASE_VERSION_0_61_07); // SVN r776 + + ADD_VALUENODE(ValueNode_Switch, "switch", _("Switch"), RELEASE_VERSION_0_61_08); // SVN r923 + ADD_VALUENODE(ValueNode_Cos, "cos", _("Cos"), RELEASE_VERSION_0_61_08); // SVN r1111 + ADD_VALUENODE(ValueNode_Atan2, "atan2", _("aTan2"), RELEASE_VERSION_0_61_08); // SVN r1132 + ADD_VALUENODE(ValueNode_BLineRevTangent, "blinerevtangent", _("Reverse Tangent"), RELEASE_VERSION_0_61_08); // SVN r1162 + ADD_VALUENODE(ValueNode_TimeLoop, "timeloop", _("Time Loop"), RELEASE_VERSION_0_61_08); // SVN r1226 + ADD_VALUENODE(ValueNode_Reciprocal, "reciprocal", _("Reciprocal"), RELEASE_VERSION_0_61_08); // SVN r1238 + ADD_VALUENODE(ValueNode_Duplicate, "duplicate", _("Duplicate"), RELEASE_VERSION_0_61_08); // SVN r1267 + ADD_VALUENODE(ValueNode_Integer, "fromint", _("From Integer"), RELEASE_VERSION_0_61_08); // SVN r1267 + ADD_VALUENODE(ValueNode_Step, "step", _("Step"), RELEASE_VERSION_0_61_08); // SVN r1691 + ADD_VALUENODE(ValueNode_BLineCalcWidth, "blinecalcwidth", _("BLine Width"), RELEASE_VERSION_0_61_08); // SVN r1694 + + ADD_VALUENODE(ValueNode_VectorAngle, "vectorangle", _("Vector Angle"), RELEASE_VERSION_0_61_09); // SVN r1880 + ADD_VALUENODE(ValueNode_VectorLength, "vectorlength", _("Vector Length"), RELEASE_VERSION_0_61_09); // SVN r1881 + ADD_VALUENODE(ValueNode_VectorX, "vectorx", _("Vector X"), RELEASE_VERSION_0_61_09); // SVN r1882 + ADD_VALUENODE(ValueNode_VectorY, "vectory", _("Vector Y"), RELEASE_VERSION_0_61_09); // SVN r1882 + ADD_VALUENODE(ValueNode_GradientColor, "gradientcolor", _("Gradient Color"), RELEASE_VERSION_0_61_09); // SVN r1885 + ADD_VALUENODE(ValueNode_DotProduct, "dotproduct", _("Dot Product"), RELEASE_VERSION_0_61_09); // SVN r1891 + ADD_VALUENODE(ValueNode_TimeString, "timestring", _("Time String"), RELEASE_VERSION_0_61_09); // SVN r2000 + ADD_VALUENODE(ValueNode_RealString, "realstring", _("Real String"), RELEASE_VERSION_0_61_09); // SVN r2003 + ADD_VALUENODE(ValueNode_Join, "join", _("Joined List"), RELEASE_VERSION_0_61_09); // SVN r2007 + ADD_VALUENODE(ValueNode_AngleString, "anglestring", _("Angle String"), RELEASE_VERSION_0_61_09); // SVN r2010 + ADD_VALUENODE(ValueNode_IntString, "intstring", _("Int String"), RELEASE_VERSION_0_61_09); // SVN r2010 + ADD_VALUENODE(ValueNode_Logarithm, "logarithm", _("Logarithm"), RELEASE_VERSION_0_61_09); // SVN r2034 + + ADD_VALUENODE(ValueNode_Greyed, "greyed", _("Greyed"), RELEASE_VERSION_0_61_10); // SVN r2305 + ADD_VALUENODE(ValueNode_Pow, "power", _("Power"), RELEASE_VERSION_0_61_10); // SVN r2362 + ADD_VALUENODE(ValueNode_Compare, "compare", _("Compare"), RELEASE_VERSION_0_61_10); // SVN r2364 + ADD_VALUENODE(ValueNode_Not, "not", _("Not"), RELEASE_VERSION_0_61_10); // SVN r2364 + ADD_VALUENODE(ValueNode_And, "and", _("And"), RELEASE_VERSION_0_61_10); // SVN r2364 + ADD_VALUENODE(ValueNode_Or, "or", _("Or"), RELEASE_VERSION_0_61_10); // SVN r2364 + +#undef ADD_VALUENODE +#undef ADD_VALUENODE2 + + return true; +} + +bool +ValueNode::subsys_stop() +{ + delete book_; +/* if(global_value_node_map.size() || value_node_count) + { + if(value_node_count) + synfig::error("%d ValueNodes haven't been destroyed yet!",value_node_count); + + if(global_value_node_map.size()!=value_node_count) + synfig::error("value node count mismatch! map.size()!=value_node_count (%d!=%d)",global_value_node_map.size(),value_node_count); + + GlobalValueNodeMap::iterator iter; + for(iter=global_value_node_map.begin();iter!=global_value_node_map.end();++iter) + { + if(!iter->second->is_exported()) + synfig::info(_("%s: count:%d name:%s type:%s"), + iter->first.get_string().c_str(), + iter->second->count(), + iter->second->get_name().c_str(), + ValueBase::type_local_name(iter->second->get_type()).c_str() + ); + else + synfig::info(_("%s: id:%s count:%d name:%s type:%s"), + iter->first.get_string().c_str(), + iter->second->get_id().c_str(), + iter->second->count(), + iter->second->get_name().c_str(), + ValueBase::type_local_name(iter->second->get_type()).c_str() + ); + } + } +*/ + return true; +} + +ValueNode::ValueNode(ValueBase::Type type):type(type) +{ + value_node_count++; +} + +LinkableValueNode::Book& +LinkableValueNode::book() +{ + return *book_; +} + +LinkableValueNode::Handle +LinkableValueNode::create(const String &name, const ValueBase& x) +{ + if(!book().count(name)) + return 0; + + if (!check_type(name, x.get_type()) && + // the Duplicate ValueNode is an exception - we don't want the + // user creating it for themselves, so check_type() fails for + // it even when it is valid + !(name == "duplicate" && x.get_type() == ValueBase::TYPE_REAL)) + { + error(_("Bad type: ValueNode '%s' doesn't accept type '%s'"), book()[name].local_name.c_str(), ValueBase::type_local_name(x.get_type()).c_str()); + return 0; + } + + return book()[name].factory(x); +} + +bool +LinkableValueNode::check_type(const String &name, ValueBase::Type x) +{ + if(!book().count(name) || !book()[name].check_type) + return false; + return book()[name].check_type(x); +} + +bool +LinkableValueNode::set_link(int i,ValueNode::Handle x) +{ + ValueNode::Handle previous(get_link(i)); + + if(set_link_vfunc(i,x)) + { + // Fix 2412072: remove the previous link from the parent_set unless one of the other links is also + // using it when we convert a value to 'switch', both 'on' and 'off' are linked to the same valuenode + // if we then disconnect one of the two, the one we disconnect is set to be a new valuenode_const + // and the previously shared value is removed from the parent set even though the other is still + // using it + if(previous) + { + int size = link_count(), index; + for (index=0; index < size; ++index) + { + if (i == index) continue; + if (get_link(index) == previous) + break; + } + if (index == size) + remove_child(previous.get()); + } + add_child(x.get()); + + if(!x->is_exported() && get_parent_canvas()) + { + x->set_parent_canvas(get_parent_canvas()); + } + changed(); + return true; + } + return false; +} + +ValueNode::LooseHandle +LinkableValueNode::get_link(int i)const +{ + return get_link_vfunc(i); +} + +void +LinkableValueNode::unlink_all() +{ + for(int i=0;iparent_set.erase(this); + } +} + +ValueNode::~ValueNode() +{ + value_node_count--; + + begin_delete(); +} + +void +ValueNode::on_changed() +{ + etl::loose_handle parent_canvas = get_parent_canvas(); + if(parent_canvas) + do // signal to all the ancestor canvases + parent_canvas->signal_value_node_changed()(this); + while (parent_canvas = parent_canvas->parent()); + else if(get_root_canvas()) + get_root_canvas()->signal_value_node_changed()(this); + + Node::on_changed(); +} + +int +ValueNode::replace(etl::handle x) +{ + if(x.get()==this) + return 0; + + while(parent_set.size()) + { + (*parent_set.begin())->add_child(x.get()); + (*parent_set.begin())->remove_child(this); + //x->parent_set.insert(*parent_set.begin()); + //parent_set.erase(parent_set.begin()); + } + int r(RHandle(this).replace(x)); + x->changed(); + return r; +} + +void +ValueNode::set_id(const String &x) +{ + if(name!=x) + { + name=x; + signal_id_changed_(); + } +} + +String +ValueNode::get_description(bool show_exported_name)const +{ + String ret(_("ValueNode")); + + if (dynamic_cast(this)) + return (dynamic_cast(this))->get_description(-1, show_exported_name); + + if (show_exported_name && !is_exported()) + show_exported_name = false; + + if (show_exported_name) + ret += strprintf(" (%s)", get_id().c_str()); + + return ret; +} + +ValueNodeList::ValueNodeList(): + placeholder_count_(0) +{ +} + +bool +ValueNodeList::count(const String &id)const +{ + const_iterator iter; + + if(id.empty()) + return false; + + for(iter=begin();iter!=end() && id!=(*iter)->get_id();++iter) + ; + + if(iter==end()) + return false; + + return true; +} + +ValueNode::Handle +ValueNodeList::find(const String &id) +{ + iterator iter; + + if(id.empty()) + throw Exception::IDNotFound("Empty ID"); + + for(iter=begin();iter!=end() && id!=(*iter)->get_id();++iter) + ; + + if(iter==end()) + throw Exception::IDNotFound("ValueNode in ValueNodeList: "+id); + + return *iter; +} + +ValueNode::ConstHandle +ValueNodeList::find(const String &id)const +{ + const_iterator iter; + + if(id.empty()) + throw Exception::IDNotFound("Empty ID"); + + for(iter=begin();iter!=end() && id!=(*iter)->get_id();++iter) + ; + + if(iter==end()) + throw Exception::IDNotFound("ValueNode in ValueNodeList: "+id); + + return *iter; +} + +ValueNode::Handle +ValueNodeList::surefind(const String &id) +{ + if(id.empty()) + throw Exception::IDNotFound("Empty ID"); + + ValueNode::Handle value_node; + + try + { + value_node=find(id); + } + catch(Exception::IDNotFound) + { + value_node=PlaceholderValueNode::create(); + value_node->set_id(id); + push_back(value_node); + placeholder_count_++; + } + + return value_node; +} + +bool +ValueNodeList::erase(ValueNode::Handle value_node) +{ + assert(value_node); + + iterator iter; + + for(iter=begin();iter!=end();++iter) + if(value_node.get()==iter->get()) + { + std::list::erase(iter); + if(PlaceholderValueNode::Handle::cast_dynamic(value_node)) + placeholder_count_--; + return true; + } + return false; +} + +bool +ValueNodeList::add(ValueNode::Handle value_node) +{ + if(!value_node) + return false; + if(value_node->get_id().empty()) + return false; + + try + { + ValueNode::RHandle other_value_node=find(value_node->get_id()); + if(PlaceholderValueNode::Handle::cast_dynamic(other_value_node)) + { + other_value_node->replace(value_node); + placeholder_count_--; + return true; + } + + return false; + } + catch(Exception::IDNotFound) + { + push_back(value_node); + return true; + } + + return false; +} + +void +ValueNodeList::audit() +{ + iterator iter,next; + + for(next=begin(),iter=next++;iter!=end();iter=next++) + if(iter->count()==1) + std::list::erase(iter); +} + + +String +PlaceholderValueNode::get_name()const +{ + return "placeholder"; +} + +String +PlaceholderValueNode::get_local_name()const +{ + return _("Placeholder"); +} + +ValueNode* +PlaceholderValueNode::clone(const GUID& deriv_guid)const +{ + ValueNode* ret(new PlaceholderValueNode()); + ret->set_guid(get_guid()^deriv_guid); + return ret; +} + +PlaceholderValueNode::Handle +PlaceholderValueNode::create(ValueBase::Type type) +{ + return new PlaceholderValueNode(type); +} + +ValueBase +PlaceholderValueNode::operator()(Time /*t*/)const +{ + assert(0); + return ValueBase(); +} + +PlaceholderValueNode::PlaceholderValueNode(ValueBase::Type type): + ValueNode(type) +{ +} + +ValueNode* +LinkableValueNode::clone(const GUID& deriv_guid)const +{ + { + ValueNode* x(find_value_node(get_guid()^deriv_guid).get()); + if(x) + return x; + } + + int i; + LinkableValueNode *ret=create_new(); + ret->set_guid(get_guid()^deriv_guid); + + for(i=0;iis_exported()) + { + ValueNode::LooseHandle value_node(find_value_node(link->get_guid()^deriv_guid)); + if(!value_node) + value_node=link->clone(deriv_guid); + ret->set_link(i,value_node); + } + else + ret->set_link(i,link); + } + + return ret; +} + +String +ValueNode::get_relative_id(etl::loose_handle x)const +{ + assert(is_exported()); + assert(canvas_); + + if(x.get()==canvas_.get()) + return get_id(); + + return canvas_->_get_relative_id(x)+':'+get_id(); +} + +void +ValueNode::set_parent_canvas(etl::loose_handle x) +{ + canvas_=x; if(x) root_canvas_=x->get_root(); +} + +void +ValueNode::set_root_canvas(etl::loose_handle x) +{ + root_canvas_=x->get_root(); +} + +void LinkableValueNode::get_times_vfunc(Node::time_set &set) const +{ + ValueNode::LooseHandle h; + + int size = link_count(); + + //just add it to the set... + for(int i=0; i < size; ++i) + { + h = get_link(i); + + if(h) + { + const Node::time_set &tset = h->get_times(); + set.insert(tset.begin(),tset.end()); + } + } +} + +String +LinkableValueNode::get_description(int index, bool show_exported_name)const +{ + String description; + + if (index == -1) + { + if (show_exported_name && is_exported()) + description += strprintf(" (%s)", get_id().c_str()); + } + else + { + description = String(":") + link_local_name(index); + + if (show_exported_name) + { + ValueNode::LooseHandle link(get_link(index)); + if (link->is_exported()) + description += strprintf(" (%s)", link->get_id().c_str()); + } + } + + const synfig::Node* node = this; + LinkableValueNode::ConstHandle parent_linkable_vn = 0; + + // walk up through the valuenodes trying to find the layer at the top + while (!node->parent_set.empty() && !dynamic_cast(node)) + { + LinkableValueNode::ConstHandle linkable_value_node(dynamic_cast(node)); + if (linkable_value_node) + { + String link; + int cnt = linkable_value_node->link_count(); + for (int i = 0; i < cnt; i++) + if (linkable_value_node->get_link(i) == parent_linkable_vn) + { + link = String(":") + linkable_value_node->link_local_name(i); + break; + } + + description = linkable_value_node->get_local_name() + link + (parent_linkable_vn?">":"") + description; + } + node = *node->parent_set.begin(); + parent_linkable_vn = linkable_value_node; + } + + Layer::ConstHandle parent_layer(dynamic_cast(node)); + if(parent_layer) + { + String param; + const Layer::DynamicParamList &dynamic_param_list(parent_layer->dynamic_param_list()); + // loop to find the parameter in the dynamic parameter list - this gives us its name + for (Layer::DynamicParamList::const_iterator iter = dynamic_param_list.begin(); iter != dynamic_param_list.end(); iter++) + if (iter->second == parent_linkable_vn) + param = String(":") + parent_layer->get_param_local_name(iter->first); + description = strprintf("(%s)%s>%s", + parent_layer->get_non_empty_description().c_str(), + param.c_str(), + description.c_str()); + } + + return description; +} diff --git a/synfig-core/src/synfig/valuenode.h b/synfig-core/src/synfig/valuenode.h new file mode 100644 index 0000000..38e5c56 --- /dev/null +++ b/synfig-core/src/synfig/valuenode.h @@ -0,0 +1,418 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode.h +** \brief Header file for implementation of the "Placeholder" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_VALUENODE_H +#define __SYNFIG_VALUENODE_H + +/* === H E A D E R S ======================================================= */ + +#include "vector.h" +#include "value.h" +#include "string.h" +#include "releases.h" +#include +#include +#include "exception.h" +#include +#include +#include "guid.h" + +#ifndef SYNFIG_NO_ANGLE +#include +#endif + +#include "node.h" + +#include + +/* === M A C R O S ========================================================= */ + +// This is a hack for GCC 3.0.4... which has a broken dynamic_cast<> +// It is deprecated, and will be removed soon. +#if ( __GNUC__ == 3 ) && ( __GNUC__MINOR__ == 0 ) +# define DCAST_HACK_BASECLASS() int cast__ +# define DCAST_HACK_ID(x) static const int my_cast__(void) { return x; } +# define DCAST_HACK_ENABLE() cast__=my_cast__() +#else +# define DCAST_HACK_BASECLASS() +# define DCAST_HACK_ID(x) +# define DCAST_HACK_ENABLE() +#endif + +#define CHECK_TYPE_AND_SET_VALUE(variable, type) \ + /* I don't think this ever happens - maybe remove this code? */ \ + if (get_type() == ValueBase::TYPE_NIL) { \ + warning("%s:%d get_type() IS nil sometimes!", \ + __FILE__, __LINE__); \ + return false; \ + } \ + if (get_type() != ValueBase::TYPE_NIL && \ + !(ValueBase::same_type_as(value->get_type(), type)) && \ + !PlaceholderValueNode::Handle::cast_dynamic(value)) { \ + error(_("%s:%d wrong type for %s: need %s but got %s"), \ + __FILE__, __LINE__, \ + link_local_name(i).c_str(), \ + ValueBase::type_local_name(type).c_str(), \ + ValueBase::type_local_name(value->get_type()).c_str()); \ + return false; \ + } \ + variable = value; \ + signal_child_changed()(i); \ + signal_value_changed()(); \ + return true + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class Canvas; +class LinkableValueNode; +class Layer; + +/*! \class ValueNode +** \todo writeme +*/ +class ValueNode : public synfig::Node +{ + friend class Layer; + friend class LinkableValueNode; + + /* + -- ** -- T Y P E S ----------------------------------------------------------- + */ + +public: + + typedef etl::handle Handle; + + typedef etl::loose_handle LooseHandle; + + typedef etl::handle ConstHandle; + + typedef etl::rhandle RHandle; + + + static bool subsys_init(); + + static bool subsys_stop(); + + /* + -- ** -- D A T A ------------------------------------------------------------- + */ + +private: + ValueBase::Type type; + String name; + etl::loose_handle canvas_; + etl::loose_handle root_canvas_; + + /* + -- ** -- S I G N A L S ------------------------------------------------------- + */ + +private: + + //! ValueBase Changed + sigc::signal signal_value_changed_; + + //! Children Reordered + sigc::signal signal_children_reordered_; + + //! Child Changed + sigc::signal signal_child_changed_; + + //! Child Removed + sigc::signal signal_child_removed_; + + //! Child Inserted + sigc::signal signal_child_inserted_; + + //! ID Changed + sigc::signal signal_id_changed_; + + /* + -- ** -- S I G N A L I N T E R F A C E ------------------------------------- + */ + +public: + + //! ValueBase Changed + sigc::signal& signal_value_changed() { return signal_value_changed_; } + + //! Children Reordered + sigc::signal& signal_children_reordered() { return signal_children_reordered_; } + + //! Child Changed + sigc::signal& signal_child_changed() { return signal_child_changed_; } + + //! Child Removed + sigc::signal& signal_child_removed() { return signal_child_removed_; } + + //! Child Inserted + sigc::signal& signal_child_inserted() { return signal_child_inserted_; } + + //! ID Changed + sigc::signal& signal_id_changed() { return signal_id_changed_; } + + /* + -- ** -- C O N S T R U C T O R S --------------------------------------------- + */ + +protected: + + ValueNode(ValueBase::Type type=ValueBase::TYPE_NIL); + +public: + + virtual ~ValueNode(); + + /* + -- ** -- M E M B E R F U N C T I O N S ------------------------------------- + */ + +public: + + //! Returns the value of the ValueNode at time \a t + virtual ValueBase operator()(Time /*t*/)const + { return ValueBase(); } + + //! \internal Sets the id of the ValueNode + void set_id(const String &x); + + //! Returns the id of the ValueNode + /*! The ID is used for keeping track of a + ** specific instance of a ValueNode. */ + const String &get_id()const { return name; } + + //! Returns the name of the ValueNode type + virtual String get_name()const=0; + + //! Returns the localized name of the ValueNode type + virtual String get_local_name()const=0; + + //! Return a full description of the ValueNode and its parentage + virtual String get_description(bool show_exported_name = true)const; + + + //! \writeme + virtual ValueNode* clone(const GUID& deriv_guid=GUID())const=0; + + //! \writeme + bool is_exported()const { return !get_id().empty(); } + + //! Returns the type of the ValueNode + ValueBase::Type get_type()const { return type; } + + //! Returns a handle to the parent canvas, if it has one. + etl::loose_handle get_parent_canvas()const { return canvas_; } + + //! Returns a handle to the parent canvas, if it has one. + etl::loose_handle get_root_canvas()const { return root_canvas_; } + + //! \writeme + void set_parent_canvas(etl::loose_handle x); + + //! \writeme + void set_root_canvas(etl::loose_handle x); + + //! \writeme + String get_relative_id(etl::loose_handle x)const; + + int replace(etl::handle x); + +protected: + //! Sets the type of the ValueNode + void set_type(ValueBase::Type t) { type=t; } + + virtual void on_changed(); + +public: + DCAST_HACK_BASECLASS(); + DCAST_HACK_ID(0); +}; // END of class ValueNode + +/*! \class PlaceholderValueNode +** \todo writeme +*/ +class PlaceholderValueNode : public ValueNode +{ +public: + typedef etl::handle Handle; + typedef etl::loose_handle LooseHandle; + typedef etl::handle ConstHandle; + typedef etl::rhandle RHandle; + +private: + + PlaceholderValueNode(ValueBase::Type type=ValueBase::TYPE_NIL); + +public: + + virtual ValueBase operator()(Time t)const; + + virtual String get_name()const; + + virtual String get_local_name()const; + + virtual ValueNode* clone(const GUID& deriv_guid=GUID())const; + + static Handle create(ValueBase::Type type=ValueBase::TYPE_NIL); + +protected: + virtual void get_times_vfunc(Node::time_set &/*set*/) const {} +}; // END of class PlaceholderValueNode + + +/*! \class LinkableValueNode +** \todo writeme +*/ +class LinkableValueNode : public ValueNode +{ + friend class ValueNode; +public: + + typedef etl::handle Handle; + + typedef etl::loose_handle LooseHandle; + + typedef etl::handle ConstHandle; + + typedef etl::rhandle RHandle; + + + //! Type that represents a pointer to a ValueNode's constructor + typedef LinkableValueNode* (*Factory)(const ValueBase&); + + typedef bool (*CheckType)(ValueBase::Type); + + struct BookEntry + { + String local_name; + Factory factory; + CheckType check_type; + ReleaseVersion release_version; // which version of synfig introduced this valuenode type + }; + + typedef std::map Book; + + static Book& book(); + + static Handle create(const String &name, const ValueBase& x); + + static bool check_type(const String &name, ValueBase::Type x); + +public: + LinkableValueNode(ValueBase::Type type=ValueBase::TYPE_NIL): + ValueNode(type) { } + +protected: + virtual bool set_link_vfunc(int i,ValueNode::Handle x)=0; + + void unlink_all(); + +public: + + virtual int link_count()const=0; + + virtual String link_local_name(int i)const=0; + + virtual String link_name(int i)const=0; + + virtual int get_link_index_from_name(const String &name)const=0; + + virtual ValueNode* clone(const GUID& deriv_guid=GUID())const; + + bool set_link(int i,ValueNode::Handle x); + bool set_link(const String &name,ValueNode::Handle x) { return set_link(get_link_index_from_name(name),x); } + + ValueNode::LooseHandle get_link(int i)const; + ValueNode::LooseHandle get_link(const String &name)const { return get_link(get_link_index_from_name(name)); } + + String + get_description(int index = -1, bool show_exported_name = true)const; + +protected: + //! Sets the type of the ValueNode + void set_type(ValueBase::Type t) { ValueNode::set_type(t); } + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const=0; + + // Wrapper for new operator, used by clone() + virtual LinkableValueNode* create_new()const=0; + + virtual void get_times_vfunc(Node::time_set &set) const; +}; // END of class LinkableValueNode + +/*! \class ValueNodeList +** \brief A searchable value_node list container +** \warning Do not confuse with ValueNode_DynamicList! +** \todo writeme +*/ +class ValueNodeList : public std::list +{ + int placeholder_count_; +public: + ValueNodeList(); + + //! Finds the ValueNode in the list with the given \a name + /*! \return If found, returns a handle to the ValueNode. + ** Otherwise, returns an empty handle. + */ + ValueNode::Handle find(const String &name); + + //! Finds the ValueNode in the list with the given \a name + /*! \return If found, returns a handle to the ValueNode. + ** Otherwise, returns an empty handle. + */ + ValueNode::ConstHandle find(const String &name)const; + + //! Removes the \a value_node from the list + bool erase(ValueNode::Handle value_node); + + //! \writeme + bool add(ValueNode::Handle value_node); + + //! \writeme + bool count(const String &id)const; + + //! Similar to find, but will create a placeholder value_node if it cannot be found. + ValueNode::Handle surefind(const String &name); + + //! Removes any value_nodes with reference counts of 1. + void audit(); + + //! Placeholder Count + int placeholder_count()const { return placeholder_count_; } +}; + +ValueNode::LooseHandle find_value_node(const GUID& guid); + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_add.cpp b/synfig-core/src/synfig/valuenode_add.cpp new file mode 100644 index 0000000..c67d74e --- /dev/null +++ b/synfig-core/src/synfig/valuenode_add.cpp @@ -0,0 +1,243 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_add.cpp +** \brief Implementation of the "Add" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "general.h" +#include "valuenode_add.h" +#include "valuenode_const.h" +#include +#include "color.h" +#include "gradient.h" +#include "vector.h" +#include "angle.h" +#include "real.h" +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +synfig::ValueNode_Add::ValueNode_Add(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + set_link("scalar",ValueNode_Const::create(Real(1.0))); + ValueBase::Type id(value.get_type()); + + switch(id) + { + case ValueBase::TYPE_ANGLE: + set_link("lhs",ValueNode_Const::create(value.get(Angle()))); + set_link("rhs",ValueNode_Const::create(Angle::deg(0))); + break; + case ValueBase::TYPE_COLOR: + set_link("lhs",ValueNode_Const::create(value.get(Color()))); + set_link("rhs",ValueNode_Const::create(Color(0,0,0,0))); + break; + case ValueBase::TYPE_GRADIENT: + set_link("lhs",ValueNode_Const::create(value.get(Gradient()))); + set_link("rhs",ValueNode_Const::create(Gradient())); + break; + case ValueBase::TYPE_INTEGER: + set_link("lhs",ValueNode_Const::create(value.get(int()))); + set_link("rhs",ValueNode_Const::create(int(0))); + break; + case ValueBase::TYPE_REAL: + set_link("lhs",ValueNode_Const::create(value.get(Real()))); + set_link("rhs",ValueNode_Const::create(Real(0))); + break; + case ValueBase::TYPE_TIME: + set_link("lhs",ValueNode_Const::create(value.get(Time()))); + set_link("rhs",ValueNode_Const::create(Time(0))); + break; + case ValueBase::TYPE_VECTOR: + set_link("lhs",ValueNode_Const::create(value.get(Vector()))); + set_link("rhs",ValueNode_Const::create(Vector(0,0))); + break; + default: + assert(0); + throw runtime_error(get_local_name()+_(":Bad type ")+ValueBase::type_local_name(id)); + } +} + +LinkableValueNode* +ValueNode_Add::create_new()const +{ + return new ValueNode_Add(get_type()); +} + +ValueNode_Add* +ValueNode_Add::create(const ValueBase& value) +{ + return new ValueNode_Add(value); +} + +synfig::ValueNode_Add::~ValueNode_Add() +{ + unlink_all(); +} + +synfig::ValueBase +synfig::ValueNode_Add::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + if(!ref_a || !ref_b) + throw runtime_error(strprintf("ValueNode_Add: %s",_("One or both of my parameters aren't set!"))); + switch(get_type()) + { + case ValueBase::TYPE_ANGLE: + return ((*ref_a)(t).get(Angle())+(*ref_b)(t).get(Angle()))*(*scalar)(t).get(Real()); + case ValueBase::TYPE_COLOR: + return ((*ref_a)(t).get(Color())+(*ref_b)(t).get(Color()))*(*scalar)(t).get(Real()); + case ValueBase::TYPE_GRADIENT: + return ((*ref_a)(t).get(Gradient())+(*ref_b)(t).get(Gradient()))*(*scalar)(t).get(Real()); + case ValueBase::TYPE_INTEGER: + return round_to_int(((*ref_a)(t).get(int())+(*ref_b)(t).get(int()))*(*scalar)(t).get(Real())); + case ValueBase::TYPE_REAL: + return ((*ref_a)(t).get(Vector::value_type())+(*ref_b)(t).get(Vector::value_type()))*(*scalar)(t).get(Real()); + case ValueBase::TYPE_TIME: + return ((*ref_a)(t).get(Time())+(*ref_b)(t).get(Time()))*(*scalar)(t).get(Real()); + case ValueBase::TYPE_VECTOR: + return ((*ref_a)(t).get(Vector())+(*ref_b)(t).get(Vector()))*(*scalar)(t).get(Real()); + default: + assert(0); + break; + } + return ValueBase(); +} + +bool +ValueNode_Add::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + +protected: + ValueNode_Add(const ValueBase &value); + +private: + ValueNode::RHandle ref_a; + ValueNode::RHandle ref_b; + ValueNode::RHandle scalar; + +public: + LinkableValueNode* create_new()const; + static ValueNode_Add* create(const ValueBase &value=ValueBase()); + virtual ~ValueNode_Add(); + virtual ValueBase operator()(Time t)const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_local_name(int i)const; + virtual String link_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + virtual String get_name()const; + virtual String get_local_name()const; + static bool check_type(ValueBase::Type type); +}; // END of class ValueNode_Add + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_and.cpp b/synfig-core/src/synfig/valuenode_and.cpp new file mode 100644 index 0000000..974485c --- /dev/null +++ b/synfig-core/src/synfig/valuenode_and.cpp @@ -0,0 +1,168 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_and.cpp +** \brief Implementation of the "And" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** Copyright (c) 2009 Nikita Kitaev +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_and.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_And::ValueNode_And(const ValueBase &x): + LinkableValueNode(x.get_type()) +{ + bool value(x.get(bool())); + + set_link("link1", ValueNode_Const::create(bool(true))); + set_link("link2", ValueNode_Const::create(bool(false))); + if (value) + set_link("link2",ValueNode_Const::create(bool(true))); +} + +ValueNode_And* +ValueNode_And::create(const ValueBase &x) +{ + return new ValueNode_And(x); +} + +LinkableValueNode* +ValueNode_And::create_new()const +{ + return new ValueNode_And(get_type()); +} + +ValueNode_And::~ValueNode_And() +{ + unlink_all(); +} + +bool +ValueNode_And::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + ValueNode_And(const ValueBase &x); + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_And(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_And* create(const ValueBase &x); +}; // END of class ValueNode_And + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_anglestring.cpp b/synfig-core/src/synfig/valuenode_anglestring.cpp new file mode 100644 index 0000000..978b8b8 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_anglestring.cpp @@ -0,0 +1,210 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_anglestring.cpp +** \brief Implementation of the "AngleString" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_anglestring.h" +#include "valuenode_const.h" +#include "canvas.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_AngleString::ValueNode_AngleString(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + switch(value.get_type()) + { + case ValueBase::TYPE_STRING: + set_link("angle",ValueNode_Const::create(Angle::deg(0))); + set_link("width",ValueNode_Const::create(int(0))); + set_link("precision",ValueNode_Const::create(int(3))); + set_link("zero_pad",ValueNode_Const::create(bool(false))); + break; + default: + throw Exception::BadType(ValueBase::type_local_name(value.get_type())); + } + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_AngleString::create_new()const +{ + return new ValueNode_AngleString(get_type()); +} + +ValueNode_AngleString* +ValueNode_AngleString::create(const ValueBase &x) +{ + return new ValueNode_AngleString(x); +} + +ValueNode_AngleString::~ValueNode_AngleString() +{ + unlink_all(); +} + +ValueBase +ValueNode_AngleString::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + Real angle(Angle::deg((*angle_)(t).get(Angle())).get()); + int width((*width_)(t).get(int())); + int precision((*precision_)(t).get(int())); + int zero_pad((*zero_pad_)(t).get(bool())); + + switch (get_type()) + { + case ValueBase::TYPE_STRING: + return strprintf(strprintf("%%%s%d.%df", + zero_pad ? "0" : "", + width, + precision).c_str(), angle); + default: + break; + } + + assert(0); + return ValueBase(); +} + +String +ValueNode_AngleString::get_name()const +{ + return "anglestring"; +} + +String +ValueNode_AngleString::get_local_name()const +{ + return _("Angle String"); +} + +bool +ValueNode_AngleString::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_AngleString(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_AngleString* create(const ValueBase &x); +}; // END of class ValueNode_AngleString + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_animated.cpp b/synfig-core/src/synfig/valuenode_animated.cpp new file mode 100644 index 0000000..c2a32fc --- /dev/null +++ b/synfig-core/src/synfig/valuenode_animated.cpp @@ -0,0 +1,1194 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_animated.cpp +** \brief Implementation of the "Animated" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include "canvas.h" +#include "general.h" +#include "valuenode_animated.h" +#include "valuenode_const.h" +#include "exception.h" +#include "gradient.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +// Fast binary search implementation +/* +template inline I +binary_find(I begin, I end, const T& value) +{ + I iter(begin+(end-begin)/2); + + while(end-begin>1 && !(*iter==value)) + { + ((*iter String tangent_info(T a, T b, T v) +{ + return "..."; +} + +String tangent_info(Vector a, Vector b, Vector v) +{ + if(a==b) + return strprintf("(should be zero) T=[%f,%f], Pp=[%f,%f], Pn=[%f,%f]",v[0],v[1],a[0],a[1],b[0],b[1]); + else + return strprintf("(should NOT be zero) T=[%f,%f], Pp=[%f,%f], Pn=[%f,%f]",v[0],v[1],a[0],a[1],b[0],b[1]); +} +*/ + +template +struct subtractor : public std::binary_function +{ + T operator()(const T &a,const T &b)const + { + return a-b; + } +}; + +template <> +struct subtractor : public std::binary_function +{ + Angle operator()(const Angle &a,const Angle &b)const + { + return a.dist(b); + } +}; + +template +struct magnitude : public std::unary_function +{ + float operator()(const T &a)const + { + return abs(a); + } +}; + +template <> +struct magnitude : public std::unary_function +{ + float operator()(const Angle &a)const + { + return abs(Angle::rad(a).get()); + } +}; + +template <> +struct magnitude : public std::unary_function +{ + float operator()(const Vector &a)const + { + return a.mag(); + } +}; + +template <> +struct magnitude : public std::unary_function +{ + float operator()(const Color &a)const + { + return abs(a.get_y()); + } +}; + + + + + +template +struct is_angle_type +{ + bool operator()()const + { + return false; + } +}; + +#ifdef ANGLES_USE_LINEAR_INTERPOLATION +template <> +struct is_angle_type +{ + bool operator()()const + { + return true; + } +}; +#endif // ANGLES_USE_LINEAR_INTERPOLATION + +/* === G L O B A L S ======================================================= */ + +/* === C L A S S E S ======================================================= */ + +template +class _Hermite : public synfig::ValueNode_Animated +{ +public: + typedef T value_type; + affine_combo affine_combo_func; + subtractor subtract_func; + magnitude magnitude_func; + is_angle_type is_angle; +private: + struct PathSegment + { + is_angle_type is_angle; + subtractor subtract_func; + + mutable hermite first; + mutable hermite second; + WaypointList::iterator start; + WaypointList::iterator end; + + value_type resolve(const Time &t)const + { + bool start_static(start->is_static()); + bool end_static(end->is_static()); + + if(!start_static || !end_static) + { + //if(!start_static) + second.p1()=start->get_value(t).get(value_type()); + if(start->get_after()==INTERPOLATION_CONSTANT || end->get_before()==INTERPOLATION_CONSTANT) + return second.p1(); + //if(!end_static) + second.p2()=end->get_value(t).get(value_type()); + + // At the moment, the only type of non-constant interpolation + // that we support is linear. + second.t1()= + second.t2()=subtract_func(second.p2(),second.p1()); + + second.sync(); + } + + return second(first(t)); + } + }; + typedef vector < + PathSegment + /* + pair < + hermite, + hermite + > + */ + > curve_list_type; + + curve_list_type curve_list; + + // Bounds of this curve + Time r,s; + +public: + ValueNode* clone(const synfig::GUID& deriv_guid)const + { + { ValueNode* x(find_value_node(get_guid()^deriv_guid).get()); if(x)return x; } + _Hermite* ret(new _Hermite()); + ret->set_guid(get_guid()^deriv_guid); + for(WaypointList::const_iterator iter=waypoint_list().begin();iter!=waypoint_list().end();++iter) + ret->add(iter->clone(deriv_guid)); + return ret; + } + + _Hermite() + { + set_type(ValueBase(value_type()).get_type()); + } + + virtual WaypointList::iterator new_waypoint(Time t, ValueBase value) + { + // Make sure we are getting data of the correct type + //if(data.type!=type) + // return waypoint_list_type::iterator(); + + try { find(t); throw Exception::BadTime(_("A waypoint already exists at this point in time")); } catch(Exception::NotFound) { }; + Waypoint waypoint(value,t); + waypoint.set_parent_value_node(this); + + waypoint_list_.push_back(waypoint); + WaypointList::iterator ret=waypoint_list_.end(); + --ret; + + if(is_angle()) + { + ret->set_before(INTERPOLATION_LINEAR); + ret->set_after(INTERPOLATION_LINEAR); + } + + changed(); + + return ret; + } + + virtual WaypointList::iterator new_waypoint(Time t, ValueNode::Handle value_node) + { + // Make sure we are getting data of the correct type + //if(data.type!=type) + // return waypoint_list_type::iterator(); + try { find(t); throw Exception::BadTime(_("A waypoint already exists at this point in time")); } catch(Exception::NotFound) { }; + + Waypoint waypoint(value_node,t); + waypoint.set_parent_value_node(this); + + waypoint_list_.push_back(waypoint); + WaypointList::iterator ret=waypoint_list_.end(); + --ret; + + if(is_angle()) + { + ret->set_before(INTERPOLATION_LINEAR); + ret->set_after(INTERPOLATION_LINEAR); + } + + changed(); + + return ret; + } + + virtual void on_changed() + { + ValueNode_Animated::on_changed(); + + if(waypoint_list_.size()<=1) + return; + std::sort(waypoint_list_.begin(),waypoint_list_.end()); + //waypoint_list_.sort(); + + r=waypoint_list_.front().get_time(); + s=waypoint_list_.back().get_time(); + + curve_list.clear(); + + WaypointList::iterator prev,iter,next=waypoint_list_.begin(); + int i=0; + + for(iter=next++;iter!=waypoint_list_.end() && next!=waypoint_list_.end();prev=iter,iter=next++,i++) + { + typename curve_list_type::value_type curve; + WaypointList::iterator after_next(next); + ++after_next; + + curve.start=iter; + curve.end=next; + + // Set up the positions + curve.first.set_rs(iter->get_time(), next->get_time()); + curve.second.set_rs(iter->get_time(), next->get_time()); + + Waypoint::Interpolation iter_get_after(iter->get_after()); + Waypoint::Interpolation next_get_after(next->get_after()); + Waypoint::Interpolation iter_get_before(iter->get_before()); + Waypoint::Interpolation next_get_before(next->get_before()); + + if(is_angle()) + { + if(iter_get_after==INTERPOLATION_TCB) + iter_get_after=INTERPOLATION_LINEAR; + if(next_get_after==INTERPOLATION_TCB) + next_get_after=INTERPOLATION_LINEAR; + if(iter_get_before==INTERPOLATION_TCB) + iter_get_before=INTERPOLATION_LINEAR; + if(next_get_before==INTERPOLATION_TCB) + next_get_before=INTERPOLATION_LINEAR; + } + + if(iter->is_static() && next->is_static()) + { + curve.second.p1()=iter->get_value().get(T()); + curve.second.p2()=next->get_value().get(T()); + if(iter_get_after==INTERPOLATION_CONSTANT || next_get_before==INTERPOLATION_CONSTANT) + { + // Sections must be constant on both sides. + // NOTE: this is commented out because of some + // user interface issues. Namely, if a section is + // constant and the user turns off the constant on + // one waypoint, this will end up turning it back on. + // Confusing. + //iter->get_after()=next->get_before()=INTERPOLATION_CONSTANT; + curve.second.p1()= + curve.second.p2()=iter->get_value().get(T()); + curve.second.t1()= + curve.second.t2()=subtract_func(curve.second.p1(),curve.second.p2()); + } + else + { + if(iter_get_after==INTERPOLATION_TCB && iter!=waypoint_list_.begin() && !is_angle()) + { + if(iter->get_before()!=INTERPOLATION_TCB && !curve_list.empty()) + { + curve.second.t1()=curve_list.back().second.t2(); + } + else + { + const Real& t(iter->get_tension()); // Tension + const Real& c(iter->get_continuity()); // Continuity + const Real& b(iter->get_bias()); // Bias + + // The following line works where the previous line fails. + value_type Pp; Pp=curve_list.back().second.p1(); // P_{i-1} + + const value_type& Pc(curve.second.p1()); // P_i + const value_type& Pn(curve.second.p2()); // P_{i+1} + + // TCB + value_type vect(static_cast + (subtract_func(Pc,Pp) * + (((1.0-t) * (1.0+c) * (1.0+b)) / 2.0) + + (Pn-Pc) * (((1.0-t) * (1.0-c) * (1.0-b)) / 2.0))); + + // Tension Only + //value_type vect=(value_type)((Pn-Pp)*(1.0-t)); + + // Linear + //value_type vect=(value_type)(Pn-Pc); + + // Debugging stuff + //synfig::info("%d:t1: %s",i,tangent_info(Pp,Pn,vect).c_str()); + + // Adjust for time + //vect=value_type(vect*(curve.second.get_dt()*2.0)/(curve.second.get_dt()+curve_list.back().second.get_dt())); + //vect=value_type(vect*(curve.second.get_dt())/(curve_list.back().second.get_dt())); + + curve.second.t1()=vect; + } + } + else if( + iter_get_after==INTERPOLATION_LINEAR || iter_get_after==INTERPOLATION_HALT || + (iter_get_after==INTERPOLATION_TCB && iter==waypoint_list_.begin())) + { + curve.second.t1()=subtract_func(curve.second.p2(),curve.second.p1()); + } + + if(iter_get_before==INTERPOLATION_TCB && iter->get_after()!=INTERPOLATION_TCB && !curve_list.empty()) + { + curve_list.back().second.t2()=curve.second.t1(); + curve_list.back().second.sync(); + } + + + if(next_get_before==INTERPOLATION_TCB && after_next!=waypoint_list_.end() && !is_angle()) + { + const Real &t(next->get_tension()); // Tension + const Real &c(next->get_continuity()); // Continuity + const Real &b(next->get_bias()); // Bias + const value_type &Pp(curve.second.p1()); // P_{i-1} + const value_type &Pc(curve.second.p2()); // P_i + value_type Pn; Pn=after_next->get_value().get(T()); // P_{i+1} + + // TCB + value_type vect(static_cast(subtract_func(Pc,Pp) * (((1.0-t)*(1.0-c)*(1.0+b))/2.0) + + (Pn-Pc) * (((1.0-t)*(1.0+c)*(1.0-b))/2.0))); + + // Tension Only + //value_type vect((value_type)((Pn-Pp)*(1.0-t))); + + // Linear + //value_type vect=(value_type)(Pc-Pp); + + // Debugging stuff + //synfig::info("%d:t2: %s",i,tangent_info(Pp,Pn,vect).c_str()); + + // Adjust for time + //vect=value_type(vect*(curve.second.get_dt()*2.0)/(curve.second.get_dt()+(after_next->get_time()-next->get_time()))); + //vect=value_type(vect*(curve.second.get_dt()/((after_next->get_time()-next->get_time())))); + + curve.second.t2()=vect; + } + else if( + next_get_before==INTERPOLATION_LINEAR || next_get_before==INTERPOLATION_HALT || + (next_get_before==INTERPOLATION_TCB && after_next==waypoint_list_.end())) + { + curve.second.t2()=subtract_func(curve.second.p2(),curve.second.p1()); + } + + // Adjust for time + const float timeadjust(0.5); + + if(iter_get_after==INTERPOLATION_HALT) + curve.second.t1()*=0; + // if this isn't the first curve + else if(iter_get_after != INTERPOLATION_LINEAR && !curve_list.empty()) + // adjust it for the curve that came before it + curve.second.t1() = static_cast(curve.second.t1() * // cast to prevent warning + // (time span of this curve) * 1.5 + // ----------------------------------------------------------------- + // ((time span of this curve) * 0.5) + (time span of previous curve) + (curve.second.get_dt()*(timeadjust+1)) / + (curve.second.get_dt()*timeadjust + curve_list.back().second.get_dt())); + + if(next_get_before==INTERPOLATION_HALT) + curve.second.t2()*=0; + // if this isn't the last curve + else if(next_get_before != INTERPOLATION_LINEAR && after_next!=waypoint_list_.end()) + // adjust it for the curve that came after it + curve.second.t2() = static_cast(curve.second.t2() * // cast to prevent warning + // (time span of this curve) * 1.5 + // ------------------------------------------------------------- + // ((time span of this curve) * 0.5) + (time span of next curve) + (curve.second.get_dt()*(timeadjust+1)) / + (curve.second.get_dt()*timeadjust+(after_next->get_time()-next->get_time()))); + } // not CONSTANT + } + + // Set up the time to the default stuff + curve.first.set_rs(iter->get_time(), next->get_time()); + curve.first.p1()=iter->get_time(); + curve.first.p2()=next->get_time(); + curve.first.t1()=(curve.first.p2()-curve.first.p1())*(1.0f-iter->get_temporal_tension()); + curve.first.t2()=(curve.first.p2()-curve.first.p1())*(1.0f-next->get_temporal_tension()); + + + curve.first.sync(); + curve.second.sync(); + + curve_list.push_back(curve); + } + } + + virtual ValueBase operator()(Time t)const + { + if(waypoint_list_.empty()) + return value_type(); //! \todo Perhaps we should throw something here? + if(waypoint_list_.size()==1) + return waypoint_list_.front().get_value(t); + if(t<=r) + return waypoint_list_.front().get_value(t); + if(t>=s) + return waypoint_list_.back().get_value(t); + + typename curve_list_type::const_iterator iter; + + // This next line will set iter to the + // correct iterator for the given time. + for(iter=curve_list.begin();iter=iter->first.get_s();++iter) + continue; + if(iter==curve_list.end()) + return waypoint_list_.back().get_value(t); + return iter->resolve(t); + } +}; + + +template +class _Constant : public synfig::ValueNode_Animated +{ +public: + typedef T value_type; + +private: + + // Bounds of this curve + Time r,s; + +public: + ValueNode* clone(const synfig::GUID& deriv_guid)const + { + { ValueNode* x(find_value_node(get_guid()^deriv_guid).get()); if(x)return x; } + _Constant* ret(new _Constant()); + ret->set_guid(get_guid()^deriv_guid); + for(WaypointList::const_iterator iter=waypoint_list().begin();iter!=waypoint_list().end();++iter) + ret->add(iter->clone(deriv_guid)); + return ret; + } + + _Constant() + { + set_type(ValueBase(value_type()).get_type()); + } + + virtual WaypointList::iterator new_waypoint(Time t, ValueBase value) + { + // Make sure we are getting data of the correct type + //if(data.type!=type) + // return waypoint_list_type::iterator(); + try { find(t); throw Exception::BadTime(_("A waypoint already exists at this point in time")); } catch(Exception::NotFound) { }; + + Waypoint waypoint(value,t); + waypoint.set_parent_value_node(this); + + waypoint_list_.push_back(waypoint); + WaypointList::iterator ret=waypoint_list_.end(); + --ret; + changed(); + + return ret; + } + + virtual WaypointList::iterator new_waypoint(Time t, ValueNode::Handle value_node) + { + // Make sure we are getting data of the correct type + //if(data.type!=type) + // return waypoint_list_type::iterator(); + try { find(t); throw Exception::BadTime(_("A waypoint already exists at this point in time")); } catch(Exception::NotFound) { }; + + Waypoint waypoint(value_node,t); + waypoint.set_parent_value_node(this); + + waypoint_list_.push_back(waypoint); + WaypointList::iterator ret=waypoint_list_.end(); + --ret; + changed(); + + return ret; + } + + virtual void on_changed() + { + ValueNode_Animated::on_changed(); + + if(waypoint_list_.size()<=1) + return; + std::sort(waypoint_list_.begin(),waypoint_list_.end()); + //waypoint_list_.sort(); + r=waypoint_list_.front().get_time(); + s=waypoint_list_.back().get_time(); + + } + + virtual ValueBase operator()(Time t)const + { + if(waypoint_list_.size()==1) + return waypoint_list_.front().get_value(t); + if(waypoint_list_.empty()) + return value_type(); + if(t<=r) + return waypoint_list_.front().get_value(t); + if(t>=s) + return waypoint_list_.back().get_value(t); + + typename WaypointList::const_iterator iter; + typename WaypointList::const_iterator next; + + // This next line will set iter to the + // correct iterator for the given time. + for(next=waypoint_list_.begin(),iter=next++;next!=waypoint_list_.end() && t>=next->get_time();iter=next++) + continue; + + return iter->get_value(t); + } +}; + +class _AnimBool : public synfig::ValueNode_Animated +{ +public: + typedef bool value_type; + +private: + + // Bounds of this curve + Time r,s; + +public: + ValueNode* clone(const synfig::GUID& deriv_guid)const + { + { ValueNode* x(find_value_node(get_guid()^deriv_guid).get()); if(x)return x; } + _AnimBool* ret(new _AnimBool()); + ret->set_guid(get_guid()^deriv_guid); + for(WaypointList::const_iterator iter=waypoint_list().begin();iter!=waypoint_list().end();++iter) + ret->add(iter->clone(deriv_guid)); + return ret; + } + + _AnimBool() + { + set_type(ValueBase(value_type()).get_type()); + } + + virtual WaypointList::iterator new_waypoint(Time t, ValueBase value) + { + // Make sure we are getting data of the correct type + //if(data.type!=type) + // return waypoint_list_type::iterator(); + try { find(t); throw Exception::BadTime(_("A waypoint already exists at this point in time")); } catch(Exception::NotFound) { }; + + + Waypoint waypoint(value,t); + waypoint.set_parent_value_node(this); + + waypoint_list_.push_back(waypoint); + WaypointList::iterator ret=waypoint_list_.end(); + --ret; + changed(); + + return ret; + } + + virtual WaypointList::iterator new_waypoint(Time t, ValueNode::Handle value_node) + { + // Make sure we are getting data of the correct type + //if(data.type!=type) + // return waypoint_list_type::iterator(); + try { find(t); throw Exception::BadTime(_("A waypoint already exists at this point in time")); } catch(Exception::NotFound) { }; + + Waypoint waypoint(value_node,t); + waypoint.set_parent_value_node(this); + + waypoint_list_.push_back(waypoint); + WaypointList::iterator ret=waypoint_list_.end(); + --ret; + changed(); + + return ret; + } + + virtual void on_changed() + { + ValueNode_Animated::on_changed(); + + if(waypoint_list_.size()<=1) + return; + std::sort(waypoint_list_.begin(),waypoint_list_.end()); + //waypoint_list_.sort(); + r=waypoint_list_.front().get_time(); + s=waypoint_list_.back().get_time(); + + } + + virtual ValueBase operator()(Time t)const + { + if(waypoint_list_.size()==1) + return waypoint_list_.front().get_value(t); + if(waypoint_list_.empty()) + return false; + if(ts) + return waypoint_list_.back().get_value(t); + + WaypointList::const_iterator iter; + WaypointList::const_iterator next; + + // This next line will set iter to the + // correct iterator for the given time. + for(next=waypoint_list_.begin(),iter=next++;next!=waypoint_list_.end() && t>=next->get_time();iter=next++) + if(iter->get_time()==t) + return iter->get_value(t); + + if(iter->get_time()==t) + return iter->get_value(t); + + if(next!=waypoint_list_.end()) + return iter->get_value(t).get(bool()) || next->get_value(t).get(bool()); + return iter->get_value(t); + } +}; + +/* === M E T H O D S ======================================================= */ + +ValueNode_Animated::ValueNode_Animated() +{ + DCAST_HACK_ENABLE(); +} + +int +ValueNode_Animated::find(const Time& begin,const Time& end,std::vector& selected) +{ + Time curr_time(begin); + int ret(0); + + // try to grab first waypoint + try + { + WaypointList::iterator iter; + iter=find(curr_time); + selected.push_back(&*iter); + ret++; + } + catch(...) { } + + try + { + WaypointList::iterator iter; + while(true) + { + iter=find_next(curr_time); + curr_time=iter->get_time(); + if(curr_time>=end) + break; + selected.push_back(&*iter); + ret++; + } + } + catch(...) { } + + return ret; +} + +/* +void +ValueNode_Animated::manipulate_time(const Time& old_begin,const Time& old_end,const Time& new_begin,const Time& new_end) +{ +#define old_2_new(x) (((x)-old_begin)/(old_end-old_begin)*(new_end-new_begin)+new_begin) + std::vector selected; + std::vector::iterator iter; + + if(find(old_begin,old_end,selected)) + { + // check to make sure this operation is OK + for(iter=selected.begin();iter!=selected.end();++iter) + { + try + { + Time new_time(old_2_new((*iter)->get_time())); + if(new_time>=old_begin && new_timeset_time(old_2_new(selected.back()->get_time())); + selected.pop_back(); + } + + + while(!selected.empty()) + { + selected.back()->set_time(old_2_new(selected.back()->get_time())); + selected.pop_back(); + } + + changed(); + } +#undef old_2_new +} +*/ + +Waypoint +ValueNode_Animated::new_waypoint_at_time(const Time& time)const +{ + Waypoint waypoint; + try + { + // Trivial case, we are sitting on a waypoint + waypoint=*find(time); + waypoint.make_unique(); + } + catch(...) + { + if(waypoint_list().empty()) + { + waypoint.set_value((*this)(time)); + } + else + { + WaypointList::const_iterator prev; + WaypointList::const_iterator next; + + bool has_prev(false), has_next(false); + + try { prev=find_prev(time); has_prev=true; } catch(...) { } + try { next=find_next(time); has_next=true; } catch(...) { } + + /* + WaypointList::const_iterator closest; + + if(has_prev&&!has_next) + closest=prev; + else if(has_next&&!has_prev) + closest=next; + else if(time-prev->get_time()get_time()-time) + closest=prev; + else + closest=next; + + for(iter=waypoint_list().begin();iter!=waypoint_list().end();++iter) + { + const Real dist(abs(iter->get_time()-time)); + if(distget_time()-time)) + closest=iter; + } + */ + + if(has_prev && !prev->is_static()) + waypoint.set_value_node(prev->get_value_node()); + if(has_next && !next->is_static()) + waypoint.set_value_node(next->get_value_node()); + else + waypoint.set_value((*this)(time)); + + /*if(has_prev) + waypoint.set_after(prev->get_before()); + if(has_next) + waypoint.set_before(next->get_after()); + */ + } + } + waypoint.set_time(time); + waypoint.set_parent_value_node(const_cast(this)); +// synfig::info("waypoint.get_after()=set to %d",waypoint.get_after()); +// synfig::info("waypoint.get_before()=set to %d",waypoint.get_before()); + + return waypoint; +} + +ValueNode_Animated::WaypointList::iterator +ValueNode_Animated::find(const UniqueID &x) +{ + ValueNode_Animated::WaypointList::iterator iter; + iter=std::find(waypoint_list().begin(),waypoint_list().end(),x); + if(iter==waypoint_list().end() || iter->get_uid()!=x.get_uid()) + throw Exception::NotFound(strprintf("ValueNode_Animated::find(): Can't find UniqueID %d",x.get_uid())); + return iter; +} + +ValueNode_Animated::WaypointList::const_iterator +ValueNode_Animated::find(const UniqueID &x)const +{ + return const_cast(this)->find(x); + /* + ValueNode_Animated::WaypointList::const_iterator iter; + iter=std::find(waypoint_list().begin(),waypoint_list().end(),x); + if(iter!=waypoint_list().end() && iter->get_uid()!=x.get_uid()) + throw Exception::NotFound(strprintf("ValueNode_Animated::find()const: Can't find UniqueID %d",x.get_uid())); + return iter; + */ +} + +ValueNode_Animated::WaypointList::iterator +ValueNode_Animated::find(const Time &x) +{ + WaypointList::iterator iter(binary_find(waypoint_list().begin(),waypoint_list().end(),x)); + + if(iter!=waypoint_list().end() && x.is_equal(iter->get_time())) + return iter; + + throw Exception::NotFound(strprintf("ValueNode_Animated::find(): Can't find Waypoint at %s",x.get_string().c_str())); +} + +ValueNode_Animated::WaypointList::const_iterator +ValueNode_Animated::find(const Time &x)const +{ + return const_cast(this)->find(x); + /* + WaypointList::const_iterator iter(binary_find(waypoint_list().begin(),waypoint_list().end(),x)); + + if(iter!=waypoint_list().end() && x.is_equal(iter->get_time())) + return iter; + + throw Exception::NotFound(strprintf("ValueNode_Animated::find(): Can't find Waypoint at %s",x.get_string().c_str())); + */ +} + +ValueNode_Animated::WaypointList::iterator +ValueNode_Animated::find_next(const Time &x) +{ + WaypointList::iterator iter(binary_find(waypoint_list().begin(),waypoint_list().end(),x)); + + if(iter!=waypoint_list().end()) + { + if(iter->get_time().is_more_than(x)) + return iter; + ++iter; + if(iter!=waypoint_list().end() && iter->get_time().is_more_than(x)) + return iter; + } + + throw Exception::NotFound(strprintf("ValueNode_Animated::find_next(): Can't find Waypoint after %s",x.get_string().c_str())); +} + +ValueNode_Animated::WaypointList::const_iterator +ValueNode_Animated::find_next(const Time &x)const +{ + return const_cast(this)->find_next(x); + /* + WaypointList::const_iterator iter(binary_find(waypoint_list().begin(),waypoint_list().end(),x)); + + if(iter!=waypoint_list().end()) + { + if(iter->get_time()-Time::epsilon()>x) + return iter; + ++iter; + if(iter!=waypoint_list().end() && iter->get_time()-Time::epsilon()>x) + return iter; + } + + throw Exception::NotFound(strprintf("ValueNode_Animated::find_next(): Can't find Waypoint after %s",x.get_string().c_str())); +*/ +} + +ValueNode_Animated::WaypointList::iterator +ValueNode_Animated::find_prev(const Time &x) +{ + WaypointList::iterator iter(binary_find(waypoint_list().begin(),waypoint_list().end(),x)); + + if(iter!=waypoint_list().end()) + { + if(iter->get_time().is_less_than(x)) + return iter; + if(iter!=waypoint_list().begin() && (--iter)->get_time().is_less_than(x)) + return iter; + } + + throw Exception::NotFound(strprintf("ValueNode_Animated::find_prev(): Can't find Waypoint after %s",x.get_string().c_str())); +} + +ValueNode_Animated::WaypointList::const_iterator +ValueNode_Animated::find_prev(const Time &x)const +{ + return const_cast(this)->find_prev(x); + /* + WaypointList::const_iterator iter(binary_find(waypoint_list().begin(),waypoint_list().end(),x)); + + if(iter!=waypoint_list().end()) + { + if(iter->get_time()+Time::epsilon()get_time()+Time::epsilon()); + case ValueBase::TYPE_REAL: + return ValueNode_Animated::Handle(new _Hermite); + case ValueBase::TYPE_INTEGER: + return ValueNode_Animated::Handle(new _Hermite); + case ValueBase::TYPE_ANGLE: + return ValueNode_Animated::Handle(new _Hermite); + case ValueBase::TYPE_VECTOR: + return ValueNode_Animated::Handle(new _Hermite); + case ValueBase::TYPE_COLOR: + return ValueNode_Animated::Handle(new _Hermite); + + case ValueBase::TYPE_STRING: + return ValueNode_Animated::Handle(new _Constant); + case ValueBase::TYPE_GRADIENT: + return ValueNode_Animated::Handle(new _Hermite); + case ValueBase::TYPE_BOOL: + return ValueNode_Animated::Handle(new _AnimBool); + case ValueBase::TYPE_CANVAS: + return ValueNode_Animated::Handle(new _Constant); + default: + throw + Exception::BadType(strprintf(_("%s: You cannot use a %s in an animated ValueNode"),"synfig::ValueNode_Animated::create()", + ValueBase::type_local_name(type).c_str()) + ); + break; + } + return ValueNode_Animated::Handle(); +} + +ValueNode_Animated::Handle +ValueNode_Animated::create(const ValueBase& value, const Time& time) +{ + return create(ValueNode::Handle(ValueNode_Const::create(value)),time); +} + +ValueNode_Animated::Handle +ValueNode_Animated::create(ValueNode::Handle value_node, const Time& time) +{ + ValueNode_Animated::Handle ret(create(value_node->get_type())); + ret->new_waypoint(time,value_node); + return ret; +} + +ValueNode_Animated::~ValueNode_Animated() +{ +} + +String +ValueNode_Animated::get_name()const +{ + return "animated"; +} + +String +ValueNode_Animated::get_local_name()const +{ + return _("Animated"); +} + +void ValueNode_Animated::get_times_vfunc(Node::time_set &set) const +{ + //add all the way point times to the value node... + + WaypointList::const_iterator i = waypoint_list().begin(), + end = waypoint_list().end(); + + for(; i != end; ++i) + { + TimePoint t; + t.set_time(i->get_time()); + t.set_before(i->get_before()); + t.set_after(i->get_after()); + t.set_guid(i->get_guid()); + set.insert(t); + } +} +struct timecmp + { + Time t; + + timecmp(const Time &c) :t(c) {} + + bool operator()(const Waypoint &rhs) const + { + return t.is_equal(rhs.get_time()); + } + }; + + ValueNode_Animated::findresult + ValueNode_Animated::find_uid(const UniqueID &x) + { + findresult f; + f.second = false; + + //search for it... and set the bool part of the return value to true if we found it! + f.first = std::find(waypoint_list_.begin(), waypoint_list_.end(), x); + if(f.first != waypoint_list_.end()) + f.second = true; + + return f; + } + + ValueNode_Animated::const_findresult + ValueNode_Animated::find_uid(const UniqueID &x)const + { + const_findresult f; + f.second = false; + + //search for it... and set the bool part of the return value to true if we found it! + f.first = std::find(waypoint_list_.begin(), waypoint_list_.end(), x); + if(f.first != waypoint_list_.end()) + f.second = true; + + return f; + } + + ValueNode_Animated::findresult + ValueNode_Animated::find_time(const Time &x) + { + findresult f; + f.second = false; + + //search for it... and set the bool part of the return value to true if we found it! + f.first = std::find_if(waypoint_list_.begin(), waypoint_list_.end(), timecmp(x)); + if(f.first != waypoint_list_.end()) + f.second = true; + + return f; + } + +ValueNode_Animated::const_findresult +ValueNode_Animated::find_time(const Time &x)const +{ + const_findresult f; + f.second = false; + + //search for it... and set the bool part of the return value to true if we found it! + f.first = std::find_if(waypoint_list_.begin(), waypoint_list_.end(), timecmp(x)); + if(f.first != waypoint_list_.end()) + f.second = true; + + return f; +} + +void +ValueNode_Animated::insert_time(const Time& location, const Time& delta) +{ + if(!delta) + return; + try + { + WaypointList::iterator iter(find_next(location)); + for(;iter!=waypoint_list().end();++iter) + { + iter->set_time(iter->get_time()+delta); + } + changed(); + } + catch(Exception::NotFound) { } +} diff --git a/synfig-core/src/synfig/valuenode_animated.h b/synfig-core/src/synfig/valuenode_animated.h new file mode 100644 index 0000000..c153526 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_animated.h @@ -0,0 +1,117 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_animated.h +** \brief Header file for implementation of the "Animated" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_VALUENODE_ANIMATED_H +#define __SYNFIG_VALUENODE_ANIMATED_H + +/* === H E A D E R S ======================================================= */ + +#include + +#include "valuenode.h" +#include "uniqueid.h" +#include "waypoint.h" + +/* === M A C R O S ========================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +struct ValueNode_Animated : public ValueNode +{ +public: + typedef etl::handle Handle; + typedef etl::handle ConstHandle; + + typedef synfig::Waypoint Waypoint; + typedef synfig::WaypointList WaypointList; + + typedef std::pair findresult; + typedef std::pair const_findresult; + +protected: + WaypointList waypoint_list_; + +public: + WaypointList &waypoint_list() { return waypoint_list_; } + + const WaypointList &waypoint_list()const { return waypoint_list_; } + + virtual WaypointList::iterator new_waypoint(Time t, ValueBase value)=0; + + virtual WaypointList::iterator new_waypoint(Time t, ValueNode::Handle value_node)=0; + + /*! \note this does not add any waypoint to the ValueNode! */ + Waypoint new_waypoint_at_time(const Time& t)const; + + WaypointList::iterator add(const Waypoint &x); + + void erase(const UniqueID &x); + + //either use find result (return bool and iterator) or + findresult find_uid(const UniqueID &x); + const_findresult find_uid(const UniqueID &x)const; + findresult find_time(const Time &x); + const_findresult find_time(const Time &x)const; + + WaypointList::iterator find(const UniqueID &x); + WaypointList::const_iterator find(const UniqueID &x)const; + WaypointList::iterator find(const Time &x); + WaypointList::const_iterator find(const Time &x)const; + + WaypointList::iterator find_next(const Time &x); + WaypointList::const_iterator find_next(const Time &x)const; + WaypointList::iterator find_prev(const Time &x); + WaypointList::const_iterator find_prev(const Time &x)const; + + virtual ~ValueNode_Animated(); + + virtual String get_name()const; + virtual String get_local_name()const; + + static Handle create(ValueBase::Type type); + + static Handle create(const ValueBase& value, const Time& time); + + static Handle create(ValueNode::Handle value_node, const Time& time); + + int find(const Time& begin,const Time& end,std::vector& list); + + void insert_time(const Time& location, const Time& delta); + +protected: + ValueNode_Animated(); + + void set_type(ValueBase::Type t); + virtual void get_times_vfunc(Node::time_set &set) const; +public: + DCAST_HACK_ID(4); +}; + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_atan2.cpp b/synfig-core/src/synfig/valuenode_atan2.cpp new file mode 100644 index 0000000..c4dd5e7 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_atan2.cpp @@ -0,0 +1,180 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_atan2.cpp +** \brief Implementation of the "aTan2" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_atan2.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Atan2::ValueNode_Atan2(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + switch(value.get_type()) + { + case ValueBase::TYPE_ANGLE: + set_link("x",ValueNode_Const::create(Angle::cos(value.get(Angle())).get())); + set_link("y",ValueNode_Const::create(Angle::sin(value.get(Angle())).get())); + break; + default: + throw Exception::BadType(ValueBase::type_local_name(value.get_type())); + } + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_Atan2::create_new()const +{ + return new ValueNode_Atan2(get_type()); +} + +ValueNode_Atan2* +ValueNode_Atan2::create(const ValueBase &x) +{ + return new ValueNode_Atan2(x); +} + +ValueNode_Atan2::~ValueNode_Atan2() +{ + unlink_all(); +} + +ValueBase +ValueNode_Atan2::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + return Angle::tan((*y_)(t).get(Real()), + (*x_)(t).get(Real())); +} + + +String +ValueNode_Atan2::get_name()const +{ + return "atan2"; +} + +String +ValueNode_Atan2::get_local_name()const +{ + return _("aTan2"); +} + +bool +ValueNode_Atan2::check_type(ValueBase::Type type) +{ + return type==ValueBase::TYPE_ANGLE; +} + +bool +ValueNode_Atan2::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_Atan2(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Atan2* create(const ValueBase &x); +}; // END of class ValueNode_Atan2 + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_bline.cpp b/synfig-core/src/synfig/valuenode_bline.cpp new file mode 100644 index 0000000..fc3e916 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_bline.cpp @@ -0,0 +1,844 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_bline.cpp +** \brief Implementation of the "BLine" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_bline.h" +#include "valuenode_const.h" +#include "valuenode_composite.h" +#include "general.h" +#include "exception.h" +#include "blinepoint.h" +#include +#include +#include +#include +#include +#include "segment.h" +#include "curve_helper.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +#define EPSILON 0.0000001f + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +inline float +linear_interpolation(const float& a, const float& b, float c) +{ return (b-a)*c+a; } + +inline Vector +linear_interpolation(const Vector& a, const Vector& b, float c) +{ return (b-a)*c+a; } + +inline Vector +radial_interpolation(const Vector& a, const Vector& b, float c) +{ + // if either extreme is zero then use linear interpolation instead + if (a.is_equal_to(Vector::zero()) || b.is_equal_to(Vector::zero())) + return linear_interpolation(a, b, c); + + affine_combo mag_combo; + affine_combo ang_combo; + + Real mag(mag_combo(a.mag(),b.mag(),c)); + Angle angle_a(Angle::tan(a[1],a[0])); + Angle angle_b(Angle::tan(b[1],b[0])); + float diff = Angle::deg(angle_b - angle_a).get(); + if (diff < -180) angle_b += Angle::deg(360); + else if (diff > 180) angle_a += Angle::deg(360); + Angle ang(ang_combo(angle_a, angle_b, c)); + + return Point( mag*Angle::cos(ang).get(),mag*Angle::sin(ang).get() ); +} + +inline void +transform_coords(Vector in, Vector& out, const Point& coord_origin, const Point *coord_sys) +{ + in -= coord_origin; + out[0] = in * coord_sys[0]; + out[1] = in * coord_sys[1]; +} + +inline void +untransform_coords(const Vector& in, Vector& out, const Point& coord_origin, const Point *coord_sys) +{ + out[0] = in * coord_sys[0]; + out[1] = in * coord_sys[1]; + out += coord_origin; +} + +ValueBase +synfig::convert_bline_to_segment_list(const ValueBase& bline) +{ + std::vector ret; + +// std::vector list(bline.operator std::vector()); + //std::vector list(bline); + std::vector list(bline.get_list().begin(),bline.get_list().end()); + std::vector::const_iterator iter; + + BLinePoint prev,first; + + //start with prev = first and iter on the second... + + if(list.empty()) return ValueBase(ret,bline.get_loop()); + first = prev = list.front(); + + for(iter=++list.begin();iter!=list.end();++iter) + { + ret.push_back( + Segment( + prev.get_vertex(), + prev.get_tangent2(), + iter->get_vertex(), + iter->get_tangent1() + ) + ); + prev=*iter; + } + if(bline.get_loop()) + { + ret.push_back( + Segment( + prev.get_vertex(), + prev.get_tangent2(), + first.get_vertex(), + first.get_tangent1() + ) + ); + } + return ValueBase(ret,bline.get_loop()); +} + +ValueBase +synfig::convert_bline_to_width_list(const ValueBase& bline) +{ + std::vector ret; +// std::vector list(bline.operator std::vector()); + //std::vector list(bline); + std::vector list(bline.get_list().begin(),bline.get_list().end()); + std::vector::const_iterator iter; + + if(bline.empty()) + return ValueBase(ValueBase::TYPE_LIST); + + for(iter=list.begin();iter!=list.end();++iter) + ret.push_back(iter->get_width()); + + if(bline.get_loop()) + ret.push_back(list.front().get_width()); + + return ValueBase(ret,bline.get_loop()); +} + +Real +synfig::find_closest_point(const ValueBase &bline, const Point &pos, Real &radius, bool loop, Point *out_point) +{ + Real d,step; + float time = 0; + float best_time = 0; + int best_index = -1; + synfig::Point best_point; + + if(radius==0)radius=10000000; + Real closest(10000000); + + int i=0; + std::vector list(bline.get_list().begin(),bline.get_list().end()); + typedef std::vector::const_iterator iterT; + iterT iter, prev, first; + for(iter=list.begin(); iter!=list.end(); ++i, ++iter) + { + if( first == iterT() ) + first = iter; + + if( prev != iterT() ) + { + bezier curve; + + curve[0] = (*prev).get_vertex(); + curve[1] = curve[0] + (*prev).get_tangent2()/3; + curve[3] = (*iter).get_vertex(); + curve[2] = curve[3] - (*iter).get_tangent1()/3; + curve.sync(); + + #if 0 + // I don't know why this doesn't work + time=curve.find_closest(pos,6); + d=((curve(time)-pos).mag_squared()); + + #else + //set the step size based on the size of the picture + d = (curve[1] - curve[0]).mag() + (curve[2]-curve[1]).mag() + (curve[3]-curve[2]).mag(); + + step = d/(2*radius); //want to make the distance between lines happy + + step = max(step,0.01); //100 samples should be plenty + step = min(step,0.1); //10 is minimum + + d = find_closest(curve,pos,step,&closest,&time); + #endif + + if(d < closest) + { + closest = d; + best_time = time; + best_index = i; + best_point = curve(best_time); + } + + } + + prev = iter; + } + + // Loop if necessary + if( loop && ( first != iterT() ) && ( prev != iterT() ) ) + { + bezier curve; + + curve[0] = (*prev).get_vertex(); + curve[1] = curve[0] + (*prev).get_tangent2()/3; + curve[3] = (*first).get_vertex(); + curve[2] = curve[3] - (*first).get_tangent1()/3; + curve.sync(); + + #if 0 + // I don't know why this doesn't work + time=curve.find_closest(pos,6); + d=((curve(time)-pos).mag_squared()); + + #else + //set the step size based on the size of the picture + d = (curve[1] - curve[0]).mag() + (curve[2]-curve[1]).mag() + (curve[3]-curve[2]).mag(); + + step = d/(2*radius); //want to make the distance between lines happy + + step = max(step,0.01); //100 samples should be plenty + step = min(step,0.1); //10 is minimum + + d = find_closest(curve,pos,step,&closest,&time); + #endif + + if(d < closest) + { + closest = d; + best_time = time; + best_index = 0; + best_point = curve(best_time); + } + } + + if(best_index != -1) + { + if(out_point) + *out_point = best_point; + + int loop_adjust(loop ? 0 : -1); + int size = list.size(); + Real amount = (best_index + best_time + loop_adjust) / (size + loop_adjust); + return amount; + } + + return 0.0; + +} + +/* === M E T H O D S ======================================================= */ + + +ValueNode_BLine::ValueNode_BLine(): + ValueNode_DynamicList(ValueBase::TYPE_BLINEPOINT) +{ +} + +ValueNode_BLine::~ValueNode_BLine() +{ +} + +ValueNode_BLine* +ValueNode_BLine::create(const ValueBase &value) +{ + if(value.get_type()!=ValueBase::TYPE_LIST) + return 0; + + ValueNode_BLine* value_node(new ValueNode_BLine()); + + if(!value.empty()) + { + switch(value.get_contained_type()) + { + case ValueBase::TYPE_BLINEPOINT: + { +// std::vector bline_points(value.operator std::vector()); + //std::vector bline_points(value); + std::vector bline_points(value.get_list().begin(),value.get_list().end()); + std::vector::const_iterator iter; + + for(iter=bline_points.begin();iter!=bline_points.end();iter++) + { + value_node->add(ValueNode::Handle(ValueNode_Composite::create(*iter))); + } + value_node->set_loop(value.get_loop()); + } + break; + case ValueBase::TYPE_SEGMENT: + { + // Here, we want to convert a list of segments + // into a list of BLinePoints. We make an assumption + // that the segment list is continuous(sp), but not necessarily + // smooth. + + value_node->set_loop(false); +// std::vector segments(value.operator std::vector()); +// std::vector segments(value); + std::vector segments(value.get_list().begin(),value.get_list().end()); + std::vector::const_iterator iter,last(segments.end()); + --last; + ValueNode_Const::Handle prev,first; + + for(iter=segments.begin();iter!=segments.end();iter++) + { +#define PREV_POINT prev->get_value().get(BLinePoint()) +#define FIRST_POINT first->get_value().get(BLinePoint()) +#define CURR_POINT curr->get_value().get(BLinePoint()) + if(iter==segments.begin()) + { + prev=ValueNode_Const::create(ValueBase::TYPE_BLINEPOINT); + { + BLinePoint prev_point(PREV_POINT); + prev_point.set_vertex(iter->p1); + prev_point.set_tangent1(iter->t1); + prev_point.set_width(0.01); + prev_point.set_origin(0.5); + prev_point.set_split_tangent_flag(false); + prev->set_value(prev_point); + } + first=prev; + value_node->add(ValueNode::Handle(prev)); + + } + if(iter==last && iter->p2.is_equal_to(FIRST_POINT.get_vertex())) + { + value_node->set_loop(true); + if(!iter->t2.is_equal_to(FIRST_POINT.get_tangent1())) + { + BLinePoint first_point(FIRST_POINT); + first_point.set_tangent1(iter->t2); + first->set_value(first_point); + } + continue; + } + + ValueNode_Const::Handle curr; + curr=ValueNode_Const::create(ValueBase::TYPE_BLINEPOINT); + { + BLinePoint curr_point(CURR_POINT); + curr_point.set_vertex(iter->p2); + curr_point.set_tangent1(iter->t2); + curr_point.set_width(0.01); + curr_point.set_origin(0.5); + curr_point.set_split_tangent_flag(false); + curr->set_value(curr_point); + } + if(!PREV_POINT.get_tangent1().is_equal_to(iter->t1)) + { + BLinePoint prev_point(PREV_POINT); + prev_point.set_split_tangent_flag(true); + prev_point.set_tangent2(iter->t1); + prev->set_value(prev_point); + } + value_node->add(ValueNode::Handle(curr)); + prev=curr; + } + + } + break; + default: + // We got a list of who-knows-what. We don't have any idea + // what to do with it. + return 0; + break; + } + } + + return value_node; +} + +ValueNode_BLine::ListEntry +ValueNode_BLine::create_list_entry(int index, Time time, Real origin) +{ + ValueNode_BLine::ListEntry ret; + + synfig::BLinePoint prev,next; + + int prev_i,next_i; + + index=index%link_count(); + + assert(index>=0); + ret.index=index; + ret.set_parent_value_node(this); + + if(!list[index].status_at_time(time)) + next_i=find_next_valid_entry(index,time); + else + next_i=index; + prev_i=find_prev_valid_entry(index,time); + + //synfig::info("index=%d, next_i=%d, prev_i=%d",index,next_i,prev_i); + + next=(*list[next_i].value_node)(time); + prev=(*list[prev_i].value_node)(time); + + etl::hermite curve(prev.get_vertex(),next.get_vertex(),prev.get_tangent2(),next.get_tangent1()); + etl::derivative< etl::hermite > deriv(curve); + + synfig::BLinePoint bline_point; + bline_point.set_vertex(curve(origin)); + bline_point.set_width((next.get_width()-prev.get_width())*origin+prev.get_width()); + bline_point.set_tangent1(deriv(origin)*min(1.0-origin,origin)); + bline_point.set_tangent2(bline_point.get_tangent1()); + bline_point.set_split_tangent_flag(false); + bline_point.set_origin(origin); + + ret.value_node=ValueNode_Composite::create(bline_point); + + return ret; +} + +static int instance_count; + +ValueBase +ValueNode_BLine::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + std::vector ret_list; + + std::vector::const_iterator iter,first_iter; + bool first_flag(true); + bool rising; + int index(0); + float next_scale(1.0f); + + BLinePoint prev,first; + first.set_origin(100.0f); + + // loop through all the list's entries + for(iter=list.begin();iter!=list.end();++iter,index++) + { + // how 'on' is this vertex? + float amount(iter->amount_at_time(t,&rising)); + + assert(amount>=0.0f); + assert(amount<=1.0f); + + // it's fully on + if (amount > 1.0f - EPSILON) + { + if(first_flag) + { + first_iter=iter; + first=prev=(*iter->value_node)(t).get(prev); + first_flag=false; + ret_list.push_back(first); + continue; + } + + BLinePoint curr; + curr=(*iter->value_node)(t).get(prev); + + if(next_scale!=1.0f) + { + ret_list.back().set_split_tangent_flag(true); + ret_list.back().set_tangent2(prev.get_tangent2()*next_scale); + + ret_list.push_back(curr); + + ret_list.back().set_split_tangent_flag(true); + ret_list.back().set_tangent2(curr.get_tangent2()); + ret_list.back().set_tangent1(curr.get_tangent1()*next_scale); + + next_scale=1.0f; + } + else + { + ret_list.push_back(curr); + } + + prev=curr; + } + // it's partly on + else if(amount>0.0f) + { + std::vector::const_iterator begin_iter,end_iter; + + // This is where the interesting stuff happens + // We need to seek forward in the list to see what the next + // active point is + + BLinePoint blp_here_on; // the current vertex, when fully on + BLinePoint blp_here_off; // the current vertex, when fully off + BLinePoint blp_here_now; // the current vertex, right now (between on and off) + BLinePoint blp_prev_off; // the beginning of dynamic group when fully off + BLinePoint blp_next_off; // the end of the dynamic group when fully off + + int dist_from_begin(0), dist_from_end(0); + Time off_time, on_time; + + if(!rising) // if not rising, then we were fully on in the past, and will be fully off in the future + { + try{ on_time=iter->find_prev(t)->get_time(); } + catch(...) { on_time=Time::begin(); } + try{ off_time=iter->find_next(t)->get_time(); } + catch(...) { off_time=Time::end(); } + } + else // otherwise we were fully off in the past, and will be fully on in the future + { + try{ off_time=iter->find_prev(t)->get_time(); } + catch(...) { off_time=Time::begin(); } + try{ on_time=iter->find_next(t)->get_time(); } + catch(...) { on_time=Time::end(); } + } + + blp_here_on=(*iter->value_node)(on_time).get(blp_here_on); +// blp_here_on=(*iter->value_node)(t).get(blp_here_on); + + // Find "end" of dynamic group - ie. search forward along + // the bline from the current point until we find a point + // which is more 'on' than the current one + end_iter=iter; +// for(++end_iter;begin_iter!=list.end();++end_iter) + for(++end_iter;end_iter!=list.end();++end_iter) + if(end_iter->amount_at_time(t)>amount) + break; + + // If we did not find an end of the dynamic group... + // Writeme! at least now it doesn't crash if first_iter + // isn't set yet + if(end_iter==list.end()) + { + if(get_loop() && !first_flag) + end_iter=first_iter; + else + end_iter=--list.end(); + } + + blp_next_off=(*end_iter->value_node)(off_time).get(prev); + + // Find "begin" of dynamic group + begin_iter=iter; + blp_prev_off.set_origin(100.0f); // set the origin to 100 (which is crazy) so that we can check to see if it was found + do + { + if(begin_iter==list.begin()) + { + if(get_loop()) + begin_iter=list.end(); + else + break; + } + + --begin_iter; + dist_from_begin++; + + // if we've gone all around the loop, give up + if(begin_iter==iter) + break; + + if(begin_iter->amount_at_time(t)>amount) + { + blp_prev_off=(*begin_iter->value_node)(off_time).get(prev); + break; + } + }while(true); + + // If we did not find a begin + if(blp_prev_off.get_origin()==100.0f) + { + // Writeme! - this needs work, but at least now it + // doesn't crash + if(first_flag) + begin_iter=list.begin(); + else + begin_iter=first_iter; + blp_prev_off=(*begin_iter->value_node)(off_time).get(prev); + } + + // this is how the curve looks when we have completely vanished + etl::hermite curve(blp_prev_off.get_vertex(), blp_next_off.get_vertex(), + blp_prev_off.get_tangent2(), blp_next_off.get_tangent1()); + etl::derivative< etl::hermite > deriv(curve); + + // where would we be on this curve, how wide will we be, and + // where will our tangents point (all assuming that we hadn't vanished) + blp_here_off.set_vertex(curve(blp_here_on.get_origin())); + blp_here_off.set_width((blp_next_off.get_width()-blp_prev_off.get_width())*blp_here_on.get_origin()+blp_prev_off.get_width()); + blp_here_off.set_tangent1(deriv(blp_here_on.get_origin())); + blp_here_off.set_tangent2(deriv(blp_here_on.get_origin())); + + float prev_tangent_scalar(1.0f); + float next_tangent_scalar(1.0f); + + //synfig::info("index_%d:dist_from_begin=%d",index,dist_from_begin); + //synfig::info("index_%d:dist_from_end=%d",index,dist_from_end); + + // If we are the next to the begin + if(begin_iter==--std::vector::const_iterator(iter) || dist_from_begin==1) + prev_tangent_scalar=linear_interpolation(blp_here_on.get_origin(), 1.0f, amount); + else + prev_tangent_scalar=linear_interpolation(blp_here_on.get_origin()-prev.get_origin(), 1.0f, amount); + + // If we are the next to the end + if(end_iter==++std::vector::const_iterator(iter) || dist_from_end==1) + next_tangent_scalar=linear_interpolation(1.0-blp_here_on.get_origin(), 1.0f, amount); + else if(list.end()!=++std::vector::const_iterator(iter)) + { + BLinePoint next; + next=((*(++std::vector::const_iterator(iter))->value_node)(t).get(prev)); + next_tangent_scalar=linear_interpolation(next.get_origin()-blp_here_on.get_origin(), 1.0f, amount); + } + else + //! \todo this isn't quite right; we should handle looped blines identically no matter where the loop happens + //! and we currently don't. this at least makes it a lot better than it was before + next_tangent_scalar=linear_interpolation(blp_next_off.get_origin()-blp_here_on.get_origin(), 1.0f, amount); + next_scale=next_tangent_scalar; + + //blp_here_now.set_vertex(linear_interpolation(blp_here_off.get_vertex(), blp_here_on.get_vertex(), amount)); + // if(false) + // { + // // My first try + // Point ref_point_begin(((*begin_iter->value_node)(off_time).get(prev).get_vertex() + + // (*end_iter->value_node)(off_time).get(prev).get_vertex()) * 0.5); + // Point ref_point_end(((*begin_iter->value_node)(on_time).get(prev).get_vertex() + + // (*end_iter->value_node)(on_time).get(prev).get_vertex()) * 0.5); + // Point ref_point_now(((*begin_iter->value_node)(t).get(prev).get_vertex() + + // (*end_iter->value_node)(t).get(prev).get_vertex()) * 0.5); + // Point ref_point_linear(linear_interpolation(ref_point_begin, ref_point_end, amount)); + // + // blp_here_now.set_vertex(linear_interpolation(blp_here_off.get_vertex(), blp_here_on.get_vertex(), amount) + + // (ref_point_now-ref_point_linear)); + // blp_here_now.set_tangent1(linear_interpolation(blp_here_off.get_tangent1(), blp_here_on.get_tangent1(), amount)); + // blp_here_now.set_split_tangent_flag(blp_here_on.get_split_tangent_flag()); + // if(blp_here_now.get_split_tangent_flag()) + // blp_here_now.set_tangent2(linear_interpolation(blp_here_off.get_tangent2(), blp_here_on.get_tangent2(), amount)); + // } + // else + { + // My second try + + // define 3 coordinate systems: + Point off_coord_sys[2], off_coord_origin; // when the current vertex is completely off + Point on_coord_sys[2] , on_coord_origin; // when the current vertex is completely on + Point curr_coord_sys[2], curr_coord_origin; // the current state - somewhere in between + + // for each of the 3 systems, the origin is half way between the previous and next active point + // and the axes are based on a vector from the next active point to the previous + { + const Point end_pos_at_off_time(( *end_iter->value_node)(off_time).get(prev).get_vertex()); + const Point begin_pos_at_off_time((*begin_iter->value_node)(off_time).get(prev).get_vertex()); + off_coord_origin=(begin_pos_at_off_time + end_pos_at_off_time)/2; + off_coord_sys[0]=(begin_pos_at_off_time - end_pos_at_off_time).norm(); + off_coord_sys[1]=off_coord_sys[0].perp(); + + const Point end_pos_at_on_time(( *end_iter->value_node)(on_time).get(prev).get_vertex()); + const Point begin_pos_at_on_time((*begin_iter->value_node)(on_time).get(prev).get_vertex()); + on_coord_origin=(begin_pos_at_on_time + end_pos_at_on_time)/2; + on_coord_sys[0]=(begin_pos_at_on_time - end_pos_at_on_time).norm(); + on_coord_sys[1]=on_coord_sys[0].perp(); + + const Point end_pos_at_current_time(( *end_iter->value_node)(t).get(prev).get_vertex()); + const Point begin_pos_at_current_time((*begin_iter->value_node)(t).get(prev).get_vertex()); + curr_coord_origin=(begin_pos_at_current_time + end_pos_at_current_time)/2; + curr_coord_sys[0]=(begin_pos_at_current_time - end_pos_at_current_time).norm(); + curr_coord_sys[1]=curr_coord_sys[0].perp(); + + // Invert (transpose) the last of these matrices, since we use it for transform back + swap(curr_coord_sys[0][1],curr_coord_sys[1][0]); + } + + /* The code that was here before used just end_iter as the origin, rather than the mid-point */ + + // We know our location and tangent(s) when fully on and fully off + // Transform each of these into their corresponding coordinate system + Point trans_on_point, trans_off_point; + Vector trans_on_t1, trans_on_t2, trans_off_t1, trans_off_t2; + + transform_coords(blp_here_on.get_vertex(), trans_on_point, on_coord_origin, on_coord_sys); + transform_coords(blp_here_off.get_vertex(), trans_off_point, off_coord_origin, off_coord_sys); + +#define COORD_SYS_RADIAL_TAN_INTERP 1 + +#ifdef COORD_SYS_RADIAL_TAN_INTERP + transform_coords(blp_here_on.get_tangent1(), trans_on_t1, Point::zero(), on_coord_sys); + transform_coords(blp_here_off.get_tangent1(), trans_off_t1, Point::zero(), off_coord_sys); + + if(blp_here_on.get_split_tangent_flag()) + { + transform_coords(blp_here_on.get_tangent2(), trans_on_t2, Point::zero(), on_coord_sys); + transform_coords(blp_here_off.get_tangent2(), trans_off_t2, Point::zero(), off_coord_sys); + } +#endif + + { + // Interpolate between the 'on' point and the 'off' point and untransform to get our point's location + Point tmp; + untransform_coords(linear_interpolation(trans_off_point, trans_on_point, amount), + tmp, curr_coord_origin, curr_coord_sys); + blp_here_now.set_vertex(tmp); + } + +#define INTERP_FUNCTION radial_interpolation +//#define INTERP_FUNCTION linear_interpolation + +#ifdef COORD_SYS_RADIAL_TAN_INTERP + { + Vector tmp; + untransform_coords(INTERP_FUNCTION(trans_off_t1,trans_on_t1,amount), tmp, Point::zero(), curr_coord_sys); + blp_here_now.set_tangent1(tmp); + } +#else + blp_here_now.set_tangent1(radial_interpolation(blp_here_off.get_tangent1(),blp_here_on.get_tangent1(),amount)); +#endif + + if (blp_here_on.get_split_tangent_flag()) + { + blp_here_now.set_split_tangent_flag(true); +#ifdef COORD_SYS_RADIAL_TAN_INTERP + { + Vector tmp; + untransform_coords(INTERP_FUNCTION(trans_off_t2,trans_on_t2,amount), tmp, Point::zero(), curr_coord_sys); + blp_here_now.set_tangent2(tmp); + } +#else + blp_here_now.set_tangent2(radial_interpolation(blp_here_off.get_tangent2(),blp_here_on.get_tangent2(),amount)); +#endif + } + else + blp_here_now.set_split_tangent_flag(false); + } + + blp_here_now.set_origin(blp_here_on.get_origin()); + blp_here_now.set_width(linear_interpolation(blp_here_off.get_width(), blp_here_on.get_width(), amount)); + + // Handle the case where we are the first vertex + if(first_flag) + { + blp_here_now.set_tangent1(blp_here_now.get_tangent1()*prev_tangent_scalar); + first_iter=iter; + first=prev=blp_here_now; + first_flag=false; + ret_list.push_back(blp_here_now); + continue; + } + + ret_list.back().set_split_tangent_flag(true); + ret_list.back().set_tangent2(prev.get_tangent2()*prev_tangent_scalar); + ret_list.push_back(blp_here_now); + ret_list.back().set_split_tangent_flag(true); + //ret_list.back().set_tangent2(blp_here_now.get_tangent1()); + ret_list.back().set_tangent1(blp_here_now.get_tangent1()*prev_tangent_scalar); + + prev=blp_here_now; + } + } + + if(next_scale!=1.0f) + { + ret_list.back().set_split_tangent_flag(true); + ret_list.back().set_tangent2(prev.get_tangent2()*next_scale); + } + +/* + if(get_loop() && !first_flag) + { + ret_list.push_back( + Segment( + prev.get_vertex(), + prev.get_tangent2(), + first.get_vertex(), + first.get_tangent1() + ) + ); + } +*/ + + if(list.empty()) + synfig::warning(string("ValueNode_BLine::operator()():")+_("No entries in list")); + else + if(ret_list.empty()) + synfig::warning(string("ValueNode_BLine::operator()():")+_("No entries in ret_list")); + + return ValueBase(ret_list,get_loop()); +} + +String +ValueNode_BLine::link_local_name(int i)const +{ + assert(i>=0 && (unsigned)i +#include + +#include "valuenode.h" +#include "time.h" +#include "uniqueid.h" +#include "blinepoint.h" +#include "valuenode_dynamiclist.h" + +/* === M A C R O S ========================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + + +//! Converts a list of bline points into a list of segments +ValueBase convert_bline_to_segment_list(const ValueBase &bline); + +//! Converts a list of bline points into a list of widths +ValueBase convert_bline_to_width_list(const ValueBase &bline); + +//! Finds the closest point to pos in bline +Real find_closest_point(const ValueBase &bline, const Point &pos, Real &radius, bool loop, Point *out_point = 0); + +/*! \class ValueNode_BLine +** \brief \writeme +*/ +class ValueNode_BLine : public ValueNode_DynamicList +{ +public: + + typedef etl::handle Handle; + typedef etl::handle ConstHandle; + + + ValueNode_BLine(); + +public: + + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_BLine(); + + virtual String link_local_name(int i)const; + + virtual String get_name()const; + virtual String get_local_name()const; + + virtual ListEntry create_list_entry(int index, Time time=0, Real origin=0.5); + +protected: + + LinkableValueNode* create_new()const; + +public: + //using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_BLine* create(const ValueBase &x=ValueBase::TYPE_LIST); +}; // END of class ValueNode_BLine + +typedef ValueNode_BLine::ListEntry::ActivepointList ActivepointList; + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_blinecalctangent.cpp b/synfig-core/src/synfig/valuenode_blinecalctangent.cpp new file mode 100644 index 0000000..3a3c2cc --- /dev/null +++ b/synfig-core/src/synfig/valuenode_blinecalctangent.cpp @@ -0,0 +1,271 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_blinecalctangent.cpp +** \brief Implementation of the "BLine Tangent" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_blinecalctangent.h" +#include "valuenode_bline.h" +#include "valuenode_const.h" +#include "valuenode_composite.h" +#include "general.h" +#include "exception.h" +#include +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_BLineCalcTangent::ValueNode_BLineCalcTangent(const ValueBase::Type &x): + LinkableValueNode(x) +{ + if(x!=ValueBase::TYPE_ANGLE && x!=ValueBase::TYPE_REAL && x!=ValueBase::TYPE_VECTOR) + throw Exception::BadType(ValueBase::type_local_name(x)); + + ValueNode_BLine* value_node(new ValueNode_BLine()); + set_link("bline",value_node); + set_link("loop",ValueNode_Const::create(bool(false))); + set_link("amount",ValueNode_Const::create(Real(0.5))); + set_link("offset",ValueNode_Const::create(Angle::deg(0))); + set_link("scale",ValueNode_Const::create(Real(1.0))); + set_link("fixed_length",ValueNode_Const::create(bool(false))); +} + +LinkableValueNode* +ValueNode_BLineCalcTangent::create_new()const +{ + return new ValueNode_BLineCalcTangent(get_type()); +} + +ValueNode_BLineCalcTangent* +ValueNode_BLineCalcTangent::create(const ValueBase &x) +{ + return new ValueNode_BLineCalcTangent(x.get_type()); +} + +ValueNode_BLineCalcTangent::~ValueNode_BLineCalcTangent() +{ + unlink_all(); +} + +ValueBase +ValueNode_BLineCalcTangent::operator()(Time t, Real amount)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + const std::vector bline((*bline_)(t).get_list()); + handle bline_value_node(bline_); + const bool looped(bline_value_node->get_loop()); + int size = bline.size(), from_vertex; + bool loop((*loop_)(t).get(bool())); + Angle offset((*offset_)(t).get(Angle())); + Real scale((*scale_)(t).get(Real())); + bool fixed_length((*fixed_length_)(t).get(bool())); + BLinePoint blinepoint0, blinepoint1; + + if (!looped) size--; + if (size < 1) + switch (get_type()) + { + case ValueBase::TYPE_ANGLE: return Angle(); + case ValueBase::TYPE_REAL: return Real(); + case ValueBase::TYPE_VECTOR: return Vector(); + default: assert(0); return ValueBase(); + } + if (loop) + { + amount = amount - int(amount); + if (amount < 0) amount++; + } + else + { + if (amount < 0) amount = 0; + if (amount > 1) amount = 1; + } + + vector::const_iterator iter, next(bline.begin()); + + iter = looped ? --bline.end() : next++; + amount = amount * size; + from_vertex = int(amount); + if (from_vertex > size-1) from_vertex = size-1; + blinepoint0 = from_vertex ? *(next+from_vertex-1) : *iter; + blinepoint1 = *(next+from_vertex); + + etl::hermite curve(blinepoint0.get_vertex(), blinepoint1.get_vertex(), + blinepoint0.get_tangent2(), blinepoint1.get_tangent1()); + etl::derivative< etl::hermite > deriv(curve); + + switch (get_type()) + { + case ValueBase::TYPE_ANGLE: return deriv(amount-from_vertex).angle() + offset; + case ValueBase::TYPE_REAL: + { + if (fixed_length) return scale; + return deriv(amount-from_vertex).mag() * scale; + } + case ValueBase::TYPE_VECTOR: + { + Vector tangent(deriv(amount-from_vertex)); + Angle angle(tangent.angle() + offset); + Real mag = fixed_length ? scale : (tangent.mag() * scale); + return Vector(Angle::cos(angle).get()*mag, + Angle::sin(angle).get()*mag); + } + default: assert(0); return ValueBase(); + } +} + +ValueBase +ValueNode_BLineCalcTangent::operator()(Time t)const +{ + Real amount((*amount_)(t).get(Real())); + return (*this)(t, amount); +} + +String +ValueNode_BLineCalcTangent::get_name()const +{ + return "blinecalctangent"; +} + +String +ValueNode_BLineCalcTangent::get_local_name()const +{ + return _("BLine Tangent"); +} + +bool +ValueNode_BLineCalcTangent::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + virtual ValueBase operator()(Time t, Real amount)const; + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_BLineCalcTangent(); + + virtual String get_name()const; + virtual String get_local_name()const; + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + LinkableValueNode* create_new()const; + +public: + using synfig::LinkableValueNode::get_link_vfunc; + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_BLineCalcTangent* create(const ValueBase &x=ValueBase::TYPE_VECTOR); +}; // END of class ValueNode_BLineCalcTangent + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_blinecalcvertex.cpp b/synfig-core/src/synfig/valuenode_blinecalcvertex.cpp new file mode 100644 index 0000000..a6fc589 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_blinecalcvertex.cpp @@ -0,0 +1,222 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_blinecalcvertex.cpp +** \brief Implementation of the "BLine Vertex" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_blinecalcvertex.h" +#include "valuenode_bline.h" +#include "valuenode_const.h" +#include "valuenode_composite.h" +#include "general.h" +#include "exception.h" +#include + +#endif + + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_BLineCalcVertex::ValueNode_BLineCalcVertex(const ValueBase::Type &x): + LinkableValueNode(x) +{ + if(x!=ValueBase::TYPE_VECTOR) + throw Exception::BadType(ValueBase::type_local_name(x)); + + ValueNode_BLine* value_node(new ValueNode_BLine()); + set_link("bline",value_node); + set_link("loop",ValueNode_Const::create(bool(false))); + set_link("amount",ValueNode_Const::create(Real(0.5))); +} + +LinkableValueNode* +ValueNode_BLineCalcVertex::create_new()const +{ + return new ValueNode_BLineCalcVertex(ValueBase::TYPE_VECTOR); +} + +ValueNode_BLineCalcVertex* +ValueNode_BLineCalcVertex::create(const ValueBase &x) +{ + return new ValueNode_BLineCalcVertex(x.get_type()); +} + +ValueNode_BLineCalcVertex::~ValueNode_BLineCalcVertex() +{ + unlink_all(); +} + +ValueBase +ValueNode_BLineCalcVertex::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + const std::vector bline((*bline_)(t).get_list()); + handle bline_value_node(bline_); + const bool looped(bline_value_node->get_loop()); + int size = bline.size(), from_vertex; + bool loop((*loop_)(t).get(bool())); + Real amount((*amount_)(t).get(Real())); + BLinePoint blinepoint0, blinepoint1; + + if (!looped) size--; + if (size < 1) return Vector(); + if (loop) + { + amount = amount - int(amount); + if (amount < 0) amount++; + } + else + { + if (amount < 0) amount = 0; + if (amount > 1) amount = 1; + } + + vector::const_iterator iter, next(bline.begin()); + + iter = looped ? --bline.end() : next++; + amount = amount * size; + from_vertex = int(amount); + if (from_vertex > size-1) from_vertex = size-1; + blinepoint0 = from_vertex ? *(next+from_vertex-1) : *iter; + blinepoint1 = *(next+from_vertex); + + etl::hermite curve(blinepoint0.get_vertex(), blinepoint1.get_vertex(), + blinepoint0.get_tangent2(), blinepoint1.get_tangent1()); + return curve(amount-from_vertex); +} + + + + + + + +String +ValueNode_BLineCalcVertex::get_name()const +{ + return "blinecalcvertex"; +} + +String +ValueNode_BLineCalcVertex::get_local_name()const +{ + return _("BLine Vertex"); +} + +bool +ValueNode_BLineCalcVertex::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_BLineCalcVertex(); + + virtual String get_name()const; + virtual String get_local_name()const; + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_BLineCalcVertex* create(const ValueBase &x=ValueBase::TYPE_VECTOR); +}; // END of class ValueNode_BLineCalcVertex + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_blinecalcwidth.cpp b/synfig-core/src/synfig/valuenode_blinecalcwidth.cpp new file mode 100644 index 0000000..4d8ee0e --- /dev/null +++ b/synfig-core/src/synfig/valuenode_blinecalcwidth.cpp @@ -0,0 +1,230 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_blinecalcwidth.cpp +** \brief Implementation of the "BLine Width" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_blinecalcwidth.h" +#include "valuenode_bline.h" +#include "valuenode_const.h" +#include "valuenode_composite.h" +#include "general.h" +#include "exception.h" +#include + +#endif + + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_BLineCalcWidth::ValueNode_BLineCalcWidth(const ValueBase::Type &x): + LinkableValueNode(x) +{ + if(x!=ValueBase::TYPE_REAL) + throw Exception::BadType(ValueBase::type_local_name(x)); + + ValueNode_BLine* value_node(new ValueNode_BLine()); + set_link("bline",value_node); + set_link("loop",ValueNode_Const::create(bool(false))); + set_link("amount",ValueNode_Const::create(Real(0.5))); + set_link("scale",ValueNode_Const::create(Real(1.0))); +} + +LinkableValueNode* +ValueNode_BLineCalcWidth::create_new()const +{ + return new ValueNode_BLineCalcWidth(ValueBase::TYPE_REAL); +} + +ValueNode_BLineCalcWidth* +ValueNode_BLineCalcWidth::create(const ValueBase &x) +{ + return new ValueNode_BLineCalcWidth(x.get_type()); +} + +ValueNode_BLineCalcWidth::~ValueNode_BLineCalcWidth() +{ + unlink_all(); +} + +ValueBase +ValueNode_BLineCalcWidth::operator()(Time t, Real amount)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + const std::vector bline((*bline_)(t).get_list()); + handle bline_value_node(bline_); + const bool looped(bline_value_node->get_loop()); + int size = bline.size(), from_vertex; + bool loop((*loop_)(t).get(bool())); + Real scale((*scale_)(t).get(Real())); + BLinePoint blinepoint0, blinepoint1; + + if (!looped) size--; + if (size < 1) return Real(); + if (loop) + { + amount = amount - int(amount); + if (amount < 0) amount++; + } + else + { + if (amount < 0) amount = 0; + if (amount > 1) amount = 1; + } + + vector::const_iterator iter, next(bline.begin()); + + iter = looped ? --bline.end() : next++; + amount = amount * size; + from_vertex = int(amount); + if (from_vertex > size-1) from_vertex = size-1; + blinepoint0 = from_vertex ? *(next+from_vertex-1) : *iter; + blinepoint1 = *(next+from_vertex); + + float width0 = blinepoint0.get_width(); + float width1 = blinepoint1.get_width(); + + return Real((width0 + (amount-from_vertex) * (width1-width0)) * scale); +} + +ValueBase +ValueNode_BLineCalcWidth::operator()(Time t)const +{ + Real amount((*amount_)(t).get(Real())); + return (*this)(t, amount); +} + +String +ValueNode_BLineCalcWidth::get_name()const +{ + return "blinecalcwidth"; +} + +String +ValueNode_BLineCalcWidth::get_local_name()const +{ + return _("BLine Width"); +} + +bool +ValueNode_BLineCalcWidth::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + virtual ValueBase operator()(Time t, Real amount)const; + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_BLineCalcWidth(); + + virtual String get_name()const; + virtual String get_local_name()const; + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_BLineCalcWidth* create(const ValueBase &x=ValueBase::TYPE_REAL); +}; // END of class ValueNode_BLineCalcWidth + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_blinereversetangent.cpp b/synfig-core/src/synfig/valuenode_blinereversetangent.cpp new file mode 100644 index 0000000..ed2928b --- /dev/null +++ b/synfig-core/src/synfig/valuenode_blinereversetangent.cpp @@ -0,0 +1,202 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_blinereversetangent.cpp +** \brief Implementation of the "Reverse Tangent" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_blinereversetangent.h" +#include "valuenode_bline.h" +#include "valuenode_const.h" +#include "valuenode_composite.h" +#include "general.h" +#include "exception.h" +#include +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_BLineRevTangent::ValueNode_BLineRevTangent(const ValueBase::Type &x): + LinkableValueNode(x) +{ +} + +ValueNode_BLineRevTangent::ValueNode_BLineRevTangent(const ValueNode::Handle &x): + LinkableValueNode(x->get_type()) +{ + if(x->get_type()!=ValueBase::TYPE_BLINEPOINT) + throw Exception::BadType(ValueBase::type_local_name(x->get_type())); + + set_link("reference",x); + set_link("reverse",ValueNode_Const::create(bool(false))); +} + +ValueNode_BLineRevTangent* +ValueNode_BLineRevTangent::create(const ValueBase &x) +{ + return new ValueNode_BLineRevTangent(ValueNode_Const::create(x)); +} + +LinkableValueNode* +ValueNode_BLineRevTangent::create_new()const +{ + return new ValueNode_BLineRevTangent(get_type()); +} + +ValueNode_BLineRevTangent::~ValueNode_BLineRevTangent() +{ + unlink_all(); +} + +ValueBase +ValueNode_BLineRevTangent::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + if ((*reverse_)(t).get(bool())) + { + BLinePoint reference((*reference_)(t)); + BLinePoint ret(reference); + if(ret.get_split_tangent_flag()) + { + ret.set_tangent1(-reference.get_tangent2()); + ret.set_tangent2(-reference.get_tangent1()); + } + else + { + // \todo what should we do here really? + // it seems that there's some pre-existing bug + // with the 'reference' convert, too - referencing + // a non-split blinepoint causes some problems + ret.set_tangent1(-reference.get_tangent1()); + } + return ret; + } + else + return (*reference_)(t); +} + +String +ValueNode_BLineRevTangent::get_name()const +{ + return "blinerevtangent"; +} + +String +ValueNode_BLineRevTangent::get_local_name()const +{ + return _("Reverse Tangent"); +} + +bool +ValueNode_BLineRevTangent::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_BLineRevTangent(); + + virtual String get_name()const; + virtual String get_local_name()const; + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + LinkableValueNode* create_new()const; + +public: + using synfig::LinkableValueNode::get_link_vfunc; + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_BLineRevTangent* create(const ValueBase &x=ValueBase::TYPE_VECTOR); +}; // END of class ValueNode_BLineRevTangent + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_compare.cpp b/synfig-core/src/synfig/valuenode_compare.cpp new file mode 100644 index 0000000..68c3427 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_compare.cpp @@ -0,0 +1,197 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_compare.cpp +** \brief Implementation of the "Compare" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** Copyright (c) 2009 Nikita Kitaev +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_compare.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Compare::ValueNode_Compare(const ValueBase &x): + LinkableValueNode(x.get_type()) +{ + bool value(x.get(bool())); + + set_link("lhs", ValueNode_Const::create(Real(0))); + set_link("rhs", ValueNode_Const::create(Real(0))); + set_link("greater", ValueNode_Const::create(bool(false))); + if (value) + set_link("equal",ValueNode_Const::create(bool(true))); + else + set_link("equal",ValueNode_Const::create(bool(false))); + set_link("less", ValueNode_Const::create(bool(false))); +} + +ValueNode_Compare* +ValueNode_Compare::create(const ValueBase &x) +{ + return new ValueNode_Compare(x); +} + +LinkableValueNode* +ValueNode_Compare::create_new()const +{ + return new ValueNode_Compare(get_type()); +} + +ValueNode_Compare::~ValueNode_Compare() +{ + unlink_all(); +} + +bool +ValueNode_Compare::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i rhs) + return true; + if (equal && lhs == rhs) + return true; + if (less && lhs < rhs) + return true; + + return false; +} + +String +ValueNode_Compare::get_name()const +{ + return "compare"; +} + +String +ValueNode_Compare::get_local_name()const +{ + return _("Compare"); +} + +bool +ValueNode_Compare::check_type(ValueBase::Type type) +{ + return type==ValueBase::TYPE_BOOL; +} diff --git a/synfig-core/src/synfig/valuenode_compare.h b/synfig-core/src/synfig/valuenode_compare.h new file mode 100644 index 0000000..da156de --- /dev/null +++ b/synfig-core/src/synfig/valuenode_compare.h @@ -0,0 +1,85 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_compare.h +** \brief Header file for implementation of the "Compare" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** Copyright (c) 2009 Nikita Kitaev +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_VALUENODE_COMPARE_H +#define __SYNFIG_VALUENODE_COMPARE_H + +/* === H E A D E R S ======================================================= */ + +#include "valuenode.h" + +/* === M A C R O S ========================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class ValueNode_Compare : public LinkableValueNode +{ + ValueNode::RHandle lhs_; + ValueNode::RHandle rhs_; + ValueNode::RHandle greater_; + ValueNode::RHandle equal_; + ValueNode::RHandle less_; + +public: + typedef etl::handle Handle; + typedef etl::handle ConstHandle; + + ValueNode_Compare(const ValueBase &x); + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_Compare(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Compare* create(const ValueBase &x); +}; // END of class ValueNode_Compare + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_composite.cpp b/synfig-core/src/synfig/valuenode_composite.cpp new file mode 100644 index 0000000..7e18ea0 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_composite.cpp @@ -0,0 +1,445 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_composite.cpp +** \brief Implementation of the "Composite" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_composite.h" +#include "valuenode_const.h" +#include +#include "general.h" +#include "valuenode_radialcomposite.h" +#include "vector.h" +#include "color.h" +#include "segment.h" +#include "savecanvas.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +synfig::ValueNode_Composite::ValueNode_Composite(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + switch(get_type()) + { + case ValueBase::TYPE_VECTOR: + set_link("x",ValueNode_Const::create(value.get(Vector())[0])); + set_link("y",ValueNode_Const::create(value.get(Vector())[1])); + break; + case ValueBase::TYPE_COLOR: + set_link("r",ValueNode_Const::create(value.get(Color()).get_r())); + set_link("g",ValueNode_Const::create(value.get(Color()).get_g())); + set_link("b",ValueNode_Const::create(value.get(Color()).get_b())); + set_link("a",ValueNode_Const::create(value.get(Color()).get_a())); + break; + case ValueBase::TYPE_SEGMENT: + set_link("p1",ValueNode_Const::create(value.get(Segment()).p1)); + set_link("t1",ValueNode_Const::create(value.get(Segment()).t1)); + set_link("p2",ValueNode_Const::create(value.get(Segment()).p2)); + set_link("t2",ValueNode_Const::create(value.get(Segment()).t2)); + break; + case ValueBase::TYPE_BLINEPOINT: + { + BLinePoint bline_point(value); + set_link(0,ValueNode_Const::create(bline_point.get_vertex())); + set_link(1,ValueNode_Const::create(bline_point.get_width())); + set_link(2,ValueNode_Const::create(bline_point.get_origin())); + set_link(3,ValueNode_Const::create(bline_point.get_split_tangent_flag())); + set_link(4,ValueNode_RadialComposite::create(bline_point.get_tangent1())); + set_link(5,ValueNode_RadialComposite::create(bline_point.get_tangent2())); + break; + } + default: + assert(0); + throw Exception::BadType(ValueBase::type_local_name(get_type())); + } +} + +ValueNode_Composite::~ValueNode_Composite() +{ + unlink_all(); +} + +ValueNode_Composite* +ValueNode_Composite::create(const ValueBase &value) +{ + return new ValueNode_Composite(value); +} + +LinkableValueNode* +ValueNode_Composite::create_new()const +{ + return new ValueNode_Composite(ValueBase(get_type())); +} + +ValueBase +synfig::ValueNode_Composite::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + switch(get_type()) + { + case ValueBase::TYPE_VECTOR: + { + Vector vect; + assert(components[0] && components[1]); + vect[0]=(*components[0])(t).get(Vector::value_type()); + vect[1]=(*components[1])(t).get(Vector::value_type()); + return vect; + } + case ValueBase::TYPE_COLOR: + { + Color color; + assert(components[0] && components[1] && components[2] && components[3]); + color.set_r((*components[0])(t).get(Vector::value_type())); + color.set_g((*components[1])(t).get(Vector::value_type())); + color.set_b((*components[2])(t).get(Vector::value_type())); + color.set_a((*components[3])(t).get(Vector::value_type())); + return color; + } + case ValueBase::TYPE_SEGMENT: + { + Segment seg; + assert(components[0] && components[1] && components[2] && components[3]); + seg.p1=(*components[0])(t).get(Point()); + seg.t1=(*components[1])(t).get(Vector()); + seg.p2=(*components[2])(t).get(Point()); + seg.t2=(*components[3])(t).get(Vector()); + return seg; + } + case ValueBase::TYPE_BLINEPOINT: + { + BLinePoint ret; + assert(components[0] && components[1] && components[2] && components[3] && components[4] && components[5]); + ret.set_vertex((*components[0])(t).get(Point())); + ret.set_width((*components[1])(t).get(Real())); + ret.set_origin((*components[2])(t).get(Real())); + ret.set_split_tangent_flag((*components[3])(t).get(bool())); + ret.set_tangent1((*components[4])(t).get(Vector())); + if(ret.get_split_tangent_flag()) + ret.set_tangent2((*components[5])(t).get(Vector())); + return ret; + } + default: + synfig::error(string("ValueNode_Composite::operator():")+_("Bad type for composite")); + assert(components[0]); + return (*components[0])(t); + } +} + +int +ValueNode_Composite::link_count()const +{ + switch(get_type()) + { + case ValueBase::TYPE_VECTOR: + return 2; + case ValueBase::TYPE_COLOR: + return 4; + case ValueBase::TYPE_SEGMENT: + return 4; + case ValueBase::TYPE_BLINEPOINT: + return 6; + default: + synfig::warning(string("ValueNode_Composite::component_count():")+_("Bad type for composite")); + return 1; + } +} + +bool +ValueNode_Composite::set_link_vfunc(int i,ValueNode::Handle x) +{ + assert(i>=0 && iget_type()==ValueBase(Real()).get_type() || PlaceholderValueNode::Handle::cast_dynamic(x)) + { + components[i]=x; + return true; + } + break; + + case ValueBase::TYPE_COLOR: + if(x->get_type()==ValueBase(Real()).get_type() || PlaceholderValueNode::Handle::cast_dynamic(x)) + { + components[i]=x; + return true; + } + break; + + case ValueBase::TYPE_SEGMENT: + if(x->get_type()==ValueBase(Point()).get_type() || PlaceholderValueNode::Handle::cast_dynamic(x)) + { + components[i]=x; + return true; + } + break; + + case ValueBase::TYPE_BLINEPOINT: + if((i==0 || i==4 || i==5) && x->get_type()==ValueBase(Point()).get_type()) + { + components[i]=x; + return true; + } + if((i==1 || i==2) && x->get_type()==ValueBase(Real()).get_type()) + { + components[i]=x; + return true; + } + if(i==3 && x->get_type()==ValueBase(bool()).get_type()) + { + components[i]=x; + return true; + } + break; + + default: + break; + } + return false; +} + +ValueNode::LooseHandle +ValueNode_Composite::get_link_vfunc(int i)const +{ + assert(i>=0 && i=0 && i=0 && i= 0 && name[1]-'1' < link_count()) + return name[1]-'1'; + + switch(get_type()) + { + case ValueBase::TYPE_COLOR: + if(name[0]=='r') + return 0; + if(name[0]=='g') + return 1; + if(name[0]=='b') + return 2; + if(name[0]=='a') + return 3; + case ValueBase::TYPE_SEGMENT: + if(name=="p1") + return 0; + if(name=="t1") + return 1; + if(name=="p2") + return 2; + if(name=="t2") + return 3; + case ValueBase::TYPE_VECTOR: + if(name[0]=='x') + return 0; + if(name[0]=='y') + return 1; + if(name[0]=='z') // \todo "z"? really? + return 2; + case ValueBase::TYPE_BLINEPOINT: + if(name[0]=='p' || name=="v1" || name=="p1") + return 0; + if(name=="w" || name=="width") + return 1; + if(name=="o" || name=="origin") + return 2; + if(name=="split") + return 3; + if(name=="t1") + return 4; + if(name=="t2") + return 5; + default: + break; + } + + throw Exception::BadLinkName(name); +} + +String +ValueNode_Composite::get_name()const +{ + return "composite"; +} + +String +ValueNode_Composite::get_local_name()const +{ + return _("Composite"); +} + +bool +ValueNode_Composite::check_type(ValueBase::Type type) +{ + return + type==ValueBase::TYPE_SEGMENT || + type==ValueBase::TYPE_VECTOR || + type==ValueBase::TYPE_COLOR || + type==ValueBase::TYPE_BLINEPOINT; +} diff --git a/synfig-core/src/synfig/valuenode_composite.h b/synfig-core/src/synfig/valuenode_composite.h new file mode 100644 index 0000000..6da5b2c --- /dev/null +++ b/synfig-core/src/synfig/valuenode_composite.h @@ -0,0 +1,77 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_composite.h +** \brief Header file for implementation of the "Composite" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_VALUENODE_COMPOSITE_H +#define __SYNFIG_VALUENODE_COMPOSITE_H + +/* === H E A D E R S ======================================================= */ + +#include "valuenode.h" + +/* === M A C R O S ========================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class ValueNode_Composite : public LinkableValueNode +{ + ValueNode::RHandle components[6]; + ValueNode_Composite(const ValueBase &value); + +public: + typedef etl::handle Handle; + typedef etl::handle ConstHandle; + + + ~ValueNode_Composite(); + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + virtual String link_local_name(int i)const; + virtual ValueBase operator()(Time t)const; + + + virtual String get_name()const; + virtual String get_local_name()const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + + LinkableValueNode* create_new()const; + +public: + using synfig::LinkableValueNode::set_link_vfunc; + using synfig::LinkableValueNode::get_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Composite* create(const ValueBase &x); +}; // END of class ValueNode_Composite + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_const.cpp b/synfig-core/src/synfig/valuenode_const.cpp new file mode 100644 index 0000000..dcf3d41 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_const.cpp @@ -0,0 +1,134 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_const.cpp +** \brief Implementation of the "Constant" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Const::ValueNode_Const() +{ + DCAST_HACK_ENABLE(); +} + + +ValueNode_Const::ValueNode_Const(const ValueBase &x): + ValueNode (x.get_type()), + value (x) +{ + DCAST_HACK_ENABLE(); +} + + +ValueNode_Const* +ValueNode_Const::create(const ValueBase &x) +{ + return new ValueNode_Const(x); +} + + +ValueNode* +ValueNode_Const::clone(const GUID& deriv_guid)const +{ + { ValueNode* x(find_value_node(get_guid()^deriv_guid).get()); if(x)return x; } + ValueNode* ret(new ValueNode_Const(value)); + ret->set_guid(get_guid()^deriv_guid); + return ret; +} + + +ValueNode_Const::~ValueNode_Const() +{ +} + + +ValueBase +ValueNode_Const::operator()(Time /*t*/)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + return value; +} + + +const ValueBase & +ValueNode_Const::get_value()const +{ + return value; +} + +ValueBase & +ValueNode_Const::get_value() +{ + return value; +} + +void +ValueNode_Const::set_value(const ValueBase &data) +{ + if(data!=value) + { + value=data; + changed(); + } +} + + +String +ValueNode_Const::get_name()const +{ + return "constant"; +} + +String +ValueNode_Const::get_local_name()const +{ + return _("Constant"); +} + +void ValueNode_Const::get_times_vfunc(Node::time_set &/*set*/) const +{ +} diff --git a/synfig-core/src/synfig/valuenode_const.h b/synfig-core/src/synfig/valuenode_const.h new file mode 100644 index 0000000..08a4559 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_const.h @@ -0,0 +1,76 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_const.h +** \brief Header file for implementation of the "Constant" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_VALUENODE_CONST_H +#define __SYNFIG_VALUENODE_CONST_H + +/* === H E A D E R S ======================================================= */ + +#include "valuenode.h" + +/* === M A C R O S ========================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class ValueNode_Const : public ValueNode +{ +public: + typedef etl::handle Handle; + typedef etl::handle ConstHandle; + +private: + ValueBase value; + + ValueNode_Const(); + ValueNode_Const(const ValueBase &x); + +public: + + virtual ValueBase operator()(Time t)const; + virtual ~ValueNode_Const(); + + const ValueBase &get_value()const; + ValueBase &get_value(); + void set_value(const ValueBase &data); + + + virtual String get_name()const; + virtual String get_local_name()const; + + virtual ValueNode* clone(const GUID& deriv_guid=GUID())const; + +public: + static ValueNode_Const* create(const ValueBase &x=ValueBase()); + +protected: + virtual void get_times_vfunc(Node::time_set &set) const; +}; + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_cos.cpp b/synfig-core/src/synfig/valuenode_cos.cpp new file mode 100644 index 0000000..f3e4793 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_cos.cpp @@ -0,0 +1,186 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_cos.cpp +** \brief Implementation of the "Cos" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_cos.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Cos::ValueNode_Cos(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + switch(value.get_type()) + { + case ValueBase::TYPE_REAL: + set_link("angle",ValueNode_Const::create(Angle::deg(0))); + set_link("amp",ValueNode_Const::create(value.get(Real()))); + break; + default: + throw Exception::BadType(ValueBase::type_local_name(value.get_type())); + } + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_Cos::create_new()const +{ + return new ValueNode_Cos(get_type()); +} + +ValueNode_Cos* +ValueNode_Cos::create(const ValueBase &x) +{ + return new ValueNode_Cos(x); +} + +ValueNode_Cos::~ValueNode_Cos() +{ + unlink_all(); +} + +ValueBase +ValueNode_Cos::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + return + Angle::cos( + (*angle_)(t).get(Angle()) + ).get() * (*amp_)(t).get(Real()); +} + + +String +ValueNode_Cos::get_name()const +{ + return "cos"; +} + +String +ValueNode_Cos::get_local_name()const +{ + return _("Cos"); +} + +bool +ValueNode_Cos::check_type(ValueBase::Type type) +{ + return type==ValueBase::TYPE_REAL; +} + +bool +ValueNode_Cos::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_Cos(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Cos* create(const ValueBase &x); +}; // END of class ValueNode_Cos + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_dotproduct.cpp b/synfig-core/src/synfig/valuenode_dotproduct.cpp new file mode 100644 index 0000000..55de6ae --- /dev/null +++ b/synfig-core/src/synfig/valuenode_dotproduct.cpp @@ -0,0 +1,199 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_dotproduct.cpp +** \brief Implementation of the "DotProduct" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_dotproduct.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_DotProduct::ValueNode_DotProduct(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + switch(value.get_type()) + { + case ValueBase::TYPE_REAL: + set_link("lhs",ValueNode_Const::create(Vector(value.get(Real()),0))); + set_link("rhs",ValueNode_Const::create(Vector(1,0))); + break; + case ValueBase::TYPE_ANGLE: + set_link("lhs",ValueNode_Const::create(Vector(Angle::cos(value.get(Angle())).get(), Angle::sin(value.get(Angle())).get()))); + set_link("rhs",ValueNode_Const::create(Vector(1,0))); + break; + default: + throw Exception::BadType(ValueBase::type_local_name(value.get_type())); + } + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_DotProduct::create_new()const +{ + return new ValueNode_DotProduct(get_type()); +} + +ValueNode_DotProduct* +ValueNode_DotProduct::create(const ValueBase &x) +{ + return new ValueNode_DotProduct(x); +} + +ValueNode_DotProduct::~ValueNode_DotProduct() +{ + unlink_all(); +} + +ValueBase +ValueNode_DotProduct::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + Vector lhs((*lhs_)(t).get(Vector())); + Vector rhs((*rhs_)(t).get(Vector())); + + switch (get_type()) + { + case ValueBase::TYPE_ANGLE: + return Angle::cos(lhs * rhs / lhs.mag() / rhs.mag()).mod(); + case ValueBase::TYPE_REAL: + return lhs * rhs; + default: + break; + } + + assert(0); + return ValueBase(); +} + +String +ValueNode_DotProduct::get_name()const +{ + return "dotproduct"; +} + +String +ValueNode_DotProduct::get_local_name()const +{ + return _("Dot Product"); +} + +bool +ValueNode_DotProduct::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_DotProduct(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_DotProduct* create(const ValueBase &x); +}; // END of class ValueNode_DotProduct + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_duplicate.cpp b/synfig-core/src/synfig/valuenode_duplicate.cpp new file mode 100644 index 0000000..540c3a9 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_duplicate.cpp @@ -0,0 +1,217 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_duplicate.cpp +** \brief Implementation of the "Duplicate" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_duplicate.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Duplicate::ValueNode_Duplicate(const ValueBase::Type &x): + LinkableValueNode(x) +{ +} + +ValueNode_Duplicate::ValueNode_Duplicate(const ValueBase &x): + LinkableValueNode(x.get_type()) +{ + set_link("from", ValueNode_Const::create(Real(1.0))); + set_link("to", ValueNode_Const::create(x.get(Real()))); + set_link("step", ValueNode_Const::create(Real(1.0))); + index = 1.0; +} + +ValueNode_Duplicate* +ValueNode_Duplicate::create(const ValueBase &x) +{ + return new ValueNode_Duplicate(x); +} + +LinkableValueNode* +ValueNode_Duplicate::create_new()const +{ + return new ValueNode_Duplicate(get_type()); +} + +ValueNode_Duplicate::~ValueNode_Duplicate() +{ + unlink_all(); +} + +bool +ValueNode_Duplicate::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i= to) return true; + + // at the end of the loop, leave the index at the last value that was used + index = prev; + return false; +} + +int +ValueNode_Duplicate::count_steps(Time t)const +{ + Real from = (*from_)(t).get(Real()); + Real to = (*to_ )(t).get(Real()); + Real step = (*step_)(t).get(Real()); + + if (step == 0) return 1; + + return abs((from - to) / step) + 1; +} + +ValueBase +ValueNode_Duplicate::operator()(Time t __attribute__ ((unused)))const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + return index; +} + +String +ValueNode_Duplicate::get_name()const +{ + return "duplicate"; +} + +String +ValueNode_Duplicate::get_local_name()const +{ + return _("Duplicate"); +} + +bool +ValueNode_Duplicate::check_type(ValueBase::Type type __attribute__ ((unused))) +{ + // never offer this as a choice. it's used automatically by the 'Duplicate' layer. + return false; +} diff --git a/synfig-core/src/synfig/valuenode_duplicate.h b/synfig-core/src/synfig/valuenode_duplicate.h new file mode 100644 index 0000000..b9d2429 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_duplicate.h @@ -0,0 +1,87 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_duplicate.h +** \brief Header file for implementation of the "Duplicate" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_VALUENODE_DUPLICATE_H +#define __SYNFIG_VALUENODE_DUPLICATE_H + +/* === H E A D E R S ======================================================= */ + +#include "valuenode.h" + +/* === M A C R O S ========================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class ValueNode_Duplicate : public LinkableValueNode +{ + ValueNode::RHandle from_; + ValueNode::RHandle to_; + ValueNode::RHandle step_; + mutable Real index; + +public: + typedef etl::handle Handle; + typedef etl::handle ConstHandle; + + ValueNode_Duplicate(const ValueBase::Type &x); + ValueNode_Duplicate(const ValueBase &x); + + virtual ValueBase operator()(Time t)const; + void reset_index(Time t)const; + bool step(Time t)const; + int count_steps(Time t)const; + + virtual ~ValueNode_Duplicate(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Duplicate* create(const ValueBase &x); +}; // END of class ValueNode_Duplicate + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_dynamiclist.cpp b/synfig-core/src/synfig/valuenode_dynamiclist.cpp new file mode 100644 index 0000000..a8c253a --- /dev/null +++ b/synfig-core/src/synfig/valuenode_dynamiclist.cpp @@ -0,0 +1,909 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_dynamiclist.cpp +** \brief Implementation of the "Dynamic List" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_dynamiclist.h" +#include "valuenode_const.h" +#include "valuenode_composite.h" +#include "general.h" +#include "exception.h" +#include +#include +#include +#include "canvas.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_DynamicList::ListEntry::ListEntry(): + index(0) +{ +} + +ValueNode_DynamicList::ListEntry::ListEntry(const ValueNode::Handle &value_node): + value_node(value_node), + index(0) +{ +} + +ValueNode_DynamicList::ListEntry::ListEntry(const ValueNode::Handle &value_node,Time begin, Time end): + value_node(value_node) +{ + add(begin,false); + add(end,false); + add((begin+end)*0.5,true); +} + +ValueNode_DynamicList::ListEntry::ActivepointList::iterator +ValueNode_DynamicList::ListEntry::add(Time time, bool status, int priority) +{ + typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList::iterator iterator; + + //! \optimize + Activepoint ap(time,status,priority); + ap.set_parent_index(get_index()); + ap.set_parent_value_node(get_parent_value_node()); + timing_info.push_back(ap); + iterator iter(--iterator(timing_info.end())); + timing_info.sort(); + + return iter; +} + +ValueNode_DynamicList::ListEntry::ActivepointList::iterator +ValueNode_DynamicList::ListEntry::add(const Activepoint &x) +{ + typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList::iterator iterator; + + //! \optimize + Activepoint ap(x); + ap.set_parent_index(get_index()); + ap.set_parent_value_node(get_parent_value_node()); + timing_info.push_back(ap); + iterator iter(--iterator(timing_info.end())); + timing_info.sort(); + + return iter; +} + +void +ValueNode_DynamicList::reindex() +{ + int i(0); + + std::vector::iterator iter; + + for(iter=list.begin();iter!=list.end();++iter) + { + assert(iter->value_node); + if(iter->index!=i || iter->get_parent_value_node().get()!=this) + { + ActivepointList::iterator iter2; + + if(iter->timing_info.size()) // is this line really necessary? + for(iter2=iter->timing_info.begin();iter2!=iter->timing_info.end();++iter2) + { + iter2->set_parent_index(i); + iter2->set_parent_value_node(this); + } + iter->index=i; + iter->set_parent_value_node(this); + } + } +} + +ValueNode_DynamicList::ListEntry +ValueNode_DynamicList::create_list_entry(int index, Time time, Real origin) +{ + ValueNode_DynamicList::ListEntry ret; + + + synfig::ValueBase prev,next; + + index=index%link_count(); + + assert(index>=0); + + ret.index=index; + ret.set_parent_value_node(this); + + next=(*list[index].value_node)(time); + + if(index!=0) + prev=(*list[index-1].value_node)(time); + else + { + if(get_loop()) + prev=(*list[link_count()-1].value_node)(time); + else + { + prev=next; + } + } + + + switch(get_contained_type()) + { + case ValueBase::TYPE_VECTOR: + { + Vector a(prev.get(Vector())), b(next.get(Vector())); + ret.value_node=ValueNode_Const::create((b-a)*origin+a); + break; + } + case ValueBase::TYPE_REAL: + { + Real a(prev.get(Real())), b(next.get(Real())); + ret.value_node=ValueNode_Const::create((b-a)*origin+a); + break; + } + case ValueBase::TYPE_COLOR: + { + Color a(prev.get(Color())), b(next.get(Color())); + ret.value_node=ValueNode_Composite::create((b-a)*origin+a); + break; + } + case ValueBase::TYPE_ANGLE: + { + Angle a(prev.get(Angle())), b(next.get(Angle())); + ret.value_node=ValueNode_Const::create((b-a)*origin+a); + break; + } + case ValueBase::TYPE_TIME: + { + Time a(prev.get(Time())), b(next.get(Time())); + ret.value_node=ValueNode_Const::create((b-a)*origin+a); + break; + } + default: + ret.value_node=ValueNode_Const::create(get_contained_type()); + break; + } + + + return ret; +} + +ValueNode_DynamicList::ListEntry::ActivepointList::iterator +ValueNode_DynamicList::ListEntry::find(const UniqueID& x) +{ + return std::find(timing_info.begin(),timing_info.end(),x); +} + +ValueNode_DynamicList::ListEntry::ActivepointList::const_iterator +ValueNode_DynamicList::ListEntry::find(const UniqueID& x)const +{ + return std::find(timing_info.begin(),timing_info.end(),x); +} + +void +ValueNode_DynamicList::ListEntry::erase(const UniqueID& x) +{ + timing_info.erase(find(x)); +} + +ValueNode_DynamicList::ListEntry::ActivepointList::iterator +ValueNode_DynamicList::ListEntry::find(const Time& x) +{ + typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; + + ActivepointList::iterator iter; + + for(iter=timing_info.begin();iter!=timing_info.end();++iter) + if(iter->time==x) + return iter; + + throw Exception::NotFound("ValueNode_DynamicList::ListEntry::find():"+x.get_string()); +} + +ValueNode_DynamicList::ListEntry::ActivepointList::const_iterator +ValueNode_DynamicList::ListEntry::find(const Time& x)const +{ + typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; + + ActivepointList::const_iterator iter; + + for(iter=timing_info.begin();iter!=timing_info.end();++iter) + if(iter->time==x) + return iter; + + throw Exception::NotFound("ValueNode_DynamicList::ListEntry::find()const:"+x.get_string()); +} + +ValueNode_DynamicList::ListEntry::ActivepointList::iterator +ValueNode_DynamicList::ListEntry::find_next(const Time& x) +{ + typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; + + ActivepointList::iterator iter; + + for(iter=timing_info.begin();iter!=timing_info.end();++iter) + if(iter->time>x) + return iter; + + throw Exception::NotFound("ValueNode_DynamicList::ListEntry::find_next():"+x.get_string()); +} + +ValueNode_DynamicList::ListEntry::ActivepointList::const_iterator +ValueNode_DynamicList::ListEntry::find_next(const Time& x)const +{ + typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; + + ActivepointList::const_iterator iter; + + for(iter=timing_info.begin();iter!=timing_info.end();++iter) + if(iter->time>x) + return iter; + + throw Exception::NotFound("ValueNode_DynamicList::ListEntry::find_next()const:"+x.get_string()); +} + +ValueNode_DynamicList::ListEntry::ActivepointList::iterator +ValueNode_DynamicList::ListEntry::find_prev(const Time& x) +{ + typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; + + ActivepointList::iterator iter; + iter=timing_info.end(); + do + { + --iter; + if(iter->timetime& selected) +{ + Time curr_time(begin); + int ret(0); + + // try to grab first waypoint + try + { + ActivepointList::iterator iter; + iter=find(curr_time); + selected.push_back(&*iter); + ret++; + } + catch(...) { } + + try + { + ActivepointList::iterator iter; + while(true) + { + iter=find_next(curr_time); + curr_time=iter->get_time(); + if(curr_time>=end) + break; + selected.push_back(&*iter); + ret++; + } + } + catch(...) { } + + return ret; +} + +float +ValueNode_DynamicList::ListEntry::amount_at_time(const Time &t,bool *rising)const +{ + typedef synfig::ValueNode_DynamicList::ListEntry::Activepoint Activepoint; + typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; + + if(timing_info.empty()) + return 1.0f; + + try + { + ActivepointList::const_iterator iter; + iter=find(t); + return iter->state?1.0f:0.0f; + } + catch(...) { } + + ActivepointList::const_iterator prev_iter; + ActivepointList::const_iterator next_iter; + + try { prev_iter=find_prev(t); } + catch(...) { return find_next(t)->state?1.0f:0.0f; } + + try { next_iter=find_next(t); } + catch(...) { return prev_iter->state?1.0f:0.0f; } + + if(next_iter->state==prev_iter->state) + return next_iter->state?1.0f:0.0f; + + if(rising)*rising=next_iter->state; + + if(next_iter->state==true) + return float((t-prev_iter->time)/(next_iter->time-prev_iter->time)); + + return float((next_iter->time-t)/(next_iter->time-prev_iter->time)); +} + +Activepoint +ValueNode_DynamicList::ListEntry::new_activepoint_at_time(const Time& time)const +{ + Activepoint activepoint; + + activepoint.set_state(status_at_time(time)); + activepoint.set_priority(0); + + return activepoint; +} + +bool +ValueNode_DynamicList::ListEntry::status_at_time(const Time &t)const +{ + typedef synfig::ValueNode_DynamicList::ListEntry::Activepoint Activepoint; + typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; + + ActivepointList::const_iterator entry_iter; + ActivepointList::const_iterator prev_iter; + bool state(true); + + // New "symmetric" state mechanism + if(!timing_info.empty()) + { + if(timing_info.size()==1) + state=timing_info.front().state; + else + { + //! \optimize Perhaps we should use a binary search...? + // This will give us the first activepoint that is after t. + for(entry_iter=timing_info.begin();entry_iter!=timing_info.end();++entry_iter) + { + if(entry_iter->time==t) + { + // If we hit the entry right on the nose, then we don't + // have to do anything more + return entry_iter->state; + } + if(entry_iter->time>t) + break; + + } + prev_iter=entry_iter; + prev_iter--; + + // ie: + // + // |-------|---t---|-------| + // prev_iter^ ^entry_iter + + if(entry_iter==timing_info.end()) + { + state=prev_iter->state; + } + else + if(entry_iter==timing_info.begin()) + { + state=entry_iter->state; + } + else + if(entry_iter->priority==prev_iter->priority) + { + state=entry_iter->state || prev_iter->state; + } + else + if(entry_iter->priority>prev_iter->priority) + { + state=entry_iter->state; + } + else + { + state=prev_iter->state; + } + } + } + return state; +} + + + + +void +ValueNode_DynamicList::add(const ValueNode::Handle &value_node, int index) +{ + ListEntry list_entry(value_node); + list_entry.timing_info.size(); + + if(index<0 || index>=(int)list.size()) + { + list.push_back(list_entry); + } + else + { + list.insert(list.begin()+index,list_entry); + } + + add_child(value_node.get()); + reindex(); + //changed(); + + if(get_parent_canvas()) + get_parent_canvas()->signal_value_node_child_added()(this,value_node); + else if(get_root_canvas() && get_parent_canvas()) + get_root_canvas()->signal_value_node_child_added()(this,value_node); +} + +void +ValueNode_DynamicList::add(const ListEntry &list_entry, int index) +{ + if(index<0 || index>=(int)list.size()) + list.push_back(list_entry); + else + list.insert(list.begin()+index,list_entry); + add_child(list_entry.value_node.get()); + + reindex(); + //changed(); + + if(get_parent_canvas()) + get_parent_canvas()->signal_value_node_child_added()(this,list_entry.value_node); + else if(get_root_canvas() && get_parent_canvas()) + get_root_canvas()->signal_value_node_child_added()(this,list_entry.value_node); +} + +void +ValueNode_DynamicList::erase(const ValueNode::Handle &value_node_) +{ + ValueNode::Handle value_node(value_node_); + + assert(value_node); + if(!value_node) + throw String("ValueNode_DynamicList::erase(): Passed bad value node"); + + std::vector::iterator iter; + for(iter=list.begin();iter!=list.end();++iter) + if(iter->value_node==value_node) + { + list.erase(iter); + if(value_node) + { + remove_child(value_node.get()); + // changed to fix bug 1420091 - it seems that when a .sif file containing a bline layer encapsulated inside + // another layer, get_parent_canvas() is false and get_root_canvas() is true, but when we come to erase a + // vertex, both are true. So the signal is sent to the parent, but the signal wasn't sent to the parent + // when it was added. This probably isn't the right fix, but it seems to work for now. Note that the same + // strange "if (X) else if (Y && X)" code is also present in the two previous functions, above. + + // if(get_parent_canvas()) + // get_parent_canvas()->signal_value_node_child_removed()(this,value_node); + // else if(get_root_canvas() && get_parent_canvas()) + // get_root_canvas()->signal_value_node_child_removed()(this,value_node); + if(get_root_canvas()) + get_root_canvas()->signal_value_node_child_removed()(this,value_node); + } + break; + } + reindex(); +} + + +ValueNode_DynamicList::ValueNode_DynamicList(ValueBase::Type container_type): + LinkableValueNode(ValueBase::TYPE_LIST), + container_type (container_type), + loop_(false) +{ + DCAST_HACK_ENABLE(); +} + +ValueNode_DynamicList::Handle +ValueNode_DynamicList::create(ValueBase::Type id) +{ + return new ValueNode_DynamicList(id); +} + +ValueNode_DynamicList::~ValueNode_DynamicList() +{ + unlink_all(); +} + +ValueNode_DynamicList* +ValueNode_DynamicList::create_from(const ValueBase &value) +{ + //vector value_list(value.operator vector()); + vector value_list(value.get_list()); + + vector::iterator iter; + + if(value_list.empty()) + return 0; + + ValueNode_DynamicList* value_node(new ValueNode_DynamicList(value_list.front().get_type())); + + // when creating a list of vectors, start it off being looped. + // I think the only time this is used if for creating polygons, + // and we want them to be looped by default + if (value_node->get_contained_type() == ValueBase::TYPE_VECTOR) + value_node->set_loop(true); + + for(iter=value_list.begin();iter!=value_list.end();++iter) + { + ValueNode::Handle item(ValueNode_Const::create(*iter)); + value_node->add(ListEntry(item)); + assert(value_node->list.back().value_node); + } + return value_node; +} + +ValueBase +ValueNode_DynamicList::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + std::vector ret_list; + std::vector::const_iterator iter; + + assert(container_type); + + for(iter=list.begin();iter!=list.end();++iter) + { + bool state(iter->status_at_time(t)); + + if(state) + { + if(iter->value_node->get_type()==container_type) + ret_list.push_back((*iter->value_node)(t)); + else + { + synfig::warning(string("ValueNode_DynamicList::operator()():")+_("List type/item type mismatch, throwing away mismatch")); + } + } + } + + if(list.empty()) + synfig::warning(string("ValueNode_DynamicList::operator()():")+_("No entries in list")); + else + if(ret_list.empty()) + synfig::warning(string("ValueNode_DynamicList::operator()():")+_("No entries in ret_list")); + + return ret_list; +} + +bool +ValueNode_DynamicList::set_link_vfunc(int i,ValueNode::Handle x) +{ + assert(i>=0); + + if((unsigned)i>=list.size()) + return false; + if(x->get_type()!=container_type) + return false; + list[i].value_node=x; + return true; +} + +ValueNode::LooseHandle +ValueNode_DynamicList::get_link_vfunc(int i)const +{ + assert(i>=0); + + if((unsigned)i>=list.size()) + return 0; + return list[i].value_node; +} + +int +ValueNode_DynamicList::link_count()const +{ + return list.size(); +} + +String +ValueNode_DynamicList::link_local_name(int i)const +{ + assert(i>=0 && i(create_new()); + ret->set_guid(get_guid()^deriv_guid); + + std::vector::const_iterator iter; + + for(iter=list.begin();iter!=list.end();++iter) + { + if(iter->value_node->is_exported()) + ret->add(*iter); + else + { + ListEntry list_entry(*iter); + //list_entry.value_node=find_value_node(iter->value_node->get_guid()^deriv_guid).get(); + //if(!list_entry.value_node) + list_entry.value_node=iter->value_node->clone(deriv_guid); + ret->add(list_entry); + //ret->list.back().value_node=iter->value_node.clone(); + } + } + ret->set_loop(get_loop()); + return ret; +} + +String +ValueNode_DynamicList::link_name(int i)const +{ + return strprintf("item%04d",i); +} + +int +ValueNode_DynamicList::get_link_index_from_name(const String &name)const +{ + throw Exception::BadLinkName(name); +} + +String +ValueNode_DynamicList::get_name()const +{ + return "dynamic_list"; +} + +String +ValueNode_DynamicList::get_local_name()const +{ + return _("Dynamic List"); +} + +bool +ValueNode_DynamicList::check_type(ValueBase::Type type) +{ + return type==ValueBase::TYPE_LIST; +} + +void +ValueNode_DynamicList::set_member_canvas(etl::loose_handle canvas) +{ + for (vector::iterator iter = list.begin(); iter != list.end(); iter++) + iter->value_node->set_parent_canvas(canvas); +} + +ValueBase::Type +ValueNode_DynamicList::get_contained_type()const +{ + return container_type; +} + +LinkableValueNode* +ValueNode_DynamicList::create_new()const +{ + return new ValueNode_DynamicList(container_type); +} + +int +ValueNode_DynamicList::find_next_valid_entry(int orig_item, Time t)const +{ + int curr_item; + + for(curr_item=orig_item+1;curr_item!=orig_item;curr_item++) + { + if(curr_item==(int)list.size()) + { + curr_item=0; + continue; + } + if(list[curr_item].status_at_time(t)) + return curr_item; + } + return curr_item; +} + +int +ValueNode_DynamicList::find_prev_valid_entry(int orig_item, Time t)const +{ + int curr_item; + + for(curr_item=orig_item-1;curr_item!=orig_item;curr_item--) + { + if(curr_item==-1) + { + curr_item=list.size(); + continue; + } + if(list[curr_item].status_at_time(t)) + return curr_item; + } + return curr_item; +} + +const synfig::Node::time_set & ValueNode_DynamicList::ListEntry::get_times() const +{ + synfig::ActivepointList::const_iterator j = timing_info.begin(), + end = timing_info.end(); + + //must remerge with all the other values because we don't know if we've changed... + times = value_node->get_times(); + + for(; j != end; ++j) + { + TimePoint t; + t.set_time(j->get_time()); + t.set_guid(j->get_guid()); + + times.insert(t); + } + + return times; +} + +void ValueNode_DynamicList::get_times_vfunc(Node::time_set &set) const +{ + //add in the active points + int size = list.size(); + + //rebuild all the info... + for(int i = 0; i < size; ++i) + { + const Node::time_set & tset= list[i].get_times(); + set.insert(tset.begin(),tset.end()); + } +} + + +//new find functions that don't throw +struct timecmp +{ + Time t; + + timecmp(const Time &c) :t(c) {} + + bool operator()(const Activepoint &rhs) const + { + return t.is_equal(rhs.get_time()); + } +}; + +ValueNode_DynamicList::ListEntry::findresult ValueNode_DynamicList::ListEntry::find_uid(const UniqueID& x) +{ + findresult f; + f.second = false; + + f.first = std::find(timing_info.begin(),timing_info.end(),x); + + if(f.first != timing_info.end()) + { + f.second = true; + } + + return f; +} + +ValueNode_DynamicList::ListEntry::const_findresult ValueNode_DynamicList::ListEntry::find_uid(const UniqueID& x) const +{ + const_findresult f; + f.second = false; + + f.first = std::find(timing_info.begin(),timing_info.end(),x); + + if(f.first != timing_info.end()) + { + f.second = true; + } + + return f; +} + +ValueNode_DynamicList::ListEntry::findresult ValueNode_DynamicList::ListEntry::find_time(const Time& x) +{ + findresult f; + f.second = false; + + f.first = std::find_if(timing_info.begin(),timing_info.end(),timecmp(x)); + + if(f.first != timing_info.end()) + { + f.second = true; + } + + return f; +} + +ValueNode_DynamicList::ListEntry::const_findresult ValueNode_DynamicList::ListEntry::find_time(const Time& x)const +{ + const_findresult f; + f.second = false; + + f.first = std::find_if(timing_info.begin(),timing_info.end(),timecmp(x)); + + if(f.first != timing_info.end()) + { + f.second = true; + } + + return f; +} + +void +ValueNode_DynamicList::insert_time(const Time& location, const Time& delta) +{ + if(!delta) + return; + + std::vector::iterator iter(list.begin()); + for(;iter!=list.end();++iter) + { + try + { + ListEntry& item(*iter); + + ActivepointList::iterator iter(item.find_next(location)); + for(;iter!=item.timing_info.end();++iter) + { + iter->set_time(iter->get_time()+delta); + } + } + catch(Exception::NotFound) { } + } + changed(); +} diff --git a/synfig-core/src/synfig/valuenode_dynamiclist.h b/synfig-core/src/synfig/valuenode_dynamiclist.h new file mode 100644 index 0000000..e73afd9 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_dynamiclist.h @@ -0,0 +1,248 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_dynamiclist.h +** \brief Header file for implementation of the "Dynamic List" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_VALUENODE_DYNAMICLIST_H +#define __SYNFIG_VALUENODE_DYNAMICLIST_H + +/* === H E A D E R S ======================================================= */ + +#include +#include + +#include "valuenode.h" +#include "time.h" +#include "uniqueid.h" +#include "activepoint.h" + +/* === M A C R O S ========================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { +class ValueNode_BLine; +class Canvas; + +/*! \class ValueNode_DynamicList +** \brief Animated List ValueNode +** +** This ValueNode was originally set up to have a list +** of ValueNodes and their associated "on" and "off" points. +** ie: Any time that was directly after an "on" point, +** the item would be "on", and any time that was directly +** after an "off" point would be "off". This is pretty intuitive. +** However, it does have its problems. +** +** The problems arise when we introduce the concept of a +** Keyframe. Keyframes can be manipulated via the Synfig +** Application Library. They allow the user to quickly +** and "automagically" rearrange an animation by moving +** the associated keyframes. With the old way that the +** "on" and "off" points were handled, this task became +** overly complicated. +** +** What is required is a "symmetric" system of describing +** "on" and "off" points. Instead of the point representing +** the state of the item after that point in time, we have +** the point represent only that frame. The state +** of the item is calculated by looking at the points +** around it: If either (or both) points are "on", then the +** current state is "on". Otherwise, the point is "off" +** +** This may be a bit confusing at first, but it is required +** if we want the keyframe mechanism to "just work". +*/ +class ValueNode_DynamicList : public LinkableValueNode +{ +public: + + /*! \class ListEntry + ** \brief Contains a potential list item, and associated timing information + ** + ** This structure contains a RHandle to a ValueNode, + ** as well as the associated on/off timing information + ** which determines when this item is included in the list. + ** + ** The timing information is stored in the member timing_info. + */ + struct ListEntry : public UniqueID + { + friend class ValueNode_DynamicList; + friend class ValueNode_BLine; + public: + typedef synfig::Activepoint Activepoint; + + typedef std::list ActivepointList; + + typedef std::pair findresult; + typedef std::pair const_findresult; + + + private: + mutable Node::time_set times; + public: + ValueNode::RHandle value_node; + + ActivepointList timing_info; + + private: + int index; + etl::loose_handle parent_; + void set_parent_value_node(const etl::loose_handle &x) { parent_=x; } + + public: + + int get_index()const { return index; } + + + bool status_at_time(const Time &x)const; + + float amount_at_time(const Time &x, bool *rising=0)const; + + ActivepointList::iterator add(Time time, bool status, int priority=0); + ActivepointList::iterator add(const Activepoint &x); + + findresult find_uid(const UniqueID& x); + const_findresult find_uid(const UniqueID& x)const; + + findresult find_time(const Time& x); + const_findresult find_time(const Time& x)const; + + ActivepointList::iterator find(const UniqueID& x); + ActivepointList::const_iterator find(const UniqueID& x)const; + ActivepointList::iterator find(const Time& x); + ActivepointList::const_iterator find(const Time& x)const; + ActivepointList::iterator find_prev(const Time& x); + ActivepointList::const_iterator find_prev(const Time& x)const; + ActivepointList::iterator find_next(const Time& x); + ActivepointList::const_iterator find_next(const Time& x)const; + + Activepoint new_activepoint_at_time(const Time& x)const; + + ActivepointList::iterator add(Time time) + { return add(time, status_at_time(time)); } + + void erase(const UniqueID& x); + + int find(const Time& begin,const Time& end,std::vector& list); + + const synfig::Node::time_set &get_times() const; + + const etl::loose_handle &get_parent_value_node()const { return parent_; } + + ListEntry(); + ListEntry(const ValueNode::Handle &value_node); + ListEntry(const ValueNode::Handle &value_node,Time begin, Time end); + }; // END of struct ValueNode_DynamicList::ListEntry + + typedef etl::handle Handle; + typedef etl::handle ConstHandle; + +protected: + ValueNode_DynamicList(ValueBase::Type container_type=ValueBase::TYPE_NIL); + + ValueBase::Type container_type; + + bool loop_; + + +public: + std::vector list; + +public: + + void add(const ValueNode::Handle &value_node, int index=-1); + void add(const ListEntry &value_node, int index=-1); + void erase(const ValueNode::Handle &value_node); + void reindex(); + + int find_next_valid_entry(int x, Time t)const; + int find_prev_valid_entry(int x, Time t)const; + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + + virtual int link_count()const; + + virtual String link_name(int i)const; + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_DynamicList(); + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + + virtual String get_name()const; + virtual String get_local_name()const; + + bool get_loop()const { return loop_; } + void set_loop(bool x) { loop_=x; } + + void set_member_canvas(etl::loose_handle); + + ValueBase::Type get_contained_type()const; + + + template static Handle + create(iterator begin, iterator end) + { + Handle ret=create((*begin)->get_type()); + for(;begin!=end;++begin) + ret->add(ListEntry(*begin)); + return ret; + } + + void insert_time(const Time& location, const Time& delta); + //void manipulate_time(const Time& old_begin,const Time& old_end,const Time& new_begin,const Time& new_end); + + virtual ValueNode* clone(const GUID& deriv_guid=GUID())const; + + virtual ListEntry create_list_entry(int index, Time time=0, Real origin=0.5); + +protected: + + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + LinkableValueNode* create_new()const; + + virtual void get_times_vfunc(Node::time_set &set) const; + +public: + /*! \note The construction parameter (\a id) is the type that the list + ** contains, rather than the type that it will yield + ** (which is ValueBase::TYPE_LIST) + */ + static Handle create(ValueBase::Type id=ValueBase::TYPE_NIL); + using synfig::LinkableValueNode::get_link_vfunc; + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_DynamicList* create_from(const ValueBase &x=ValueBase::TYPE_GRADIENT); +}; // END of class ValueNode_DynamicList + +typedef ValueNode_DynamicList::ListEntry::Activepoint Activepoint; +typedef ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_exp.cpp b/synfig-core/src/synfig/valuenode_exp.cpp new file mode 100644 index 0000000..05d4b63 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_exp.cpp @@ -0,0 +1,179 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_exp.cpp +** \brief Implementation of the "Exponential" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_exp.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Exp::ValueNode_Exp(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + switch(value.get_type()) + { + case ValueBase::TYPE_REAL: + set_link("exp",ValueNode_Const::create(Real(0))); + set_link("scale",ValueNode_Const::create(value.get(Real()))); + break; + default: + throw Exception::BadType(ValueBase::type_local_name(value.get_type())); + } + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_Exp::create_new()const +{ + return new ValueNode_Exp(get_type()); +} + +ValueNode_Exp* +ValueNode_Exp::create(const ValueBase &x) +{ + return new ValueNode_Exp(x); +} + +ValueNode_Exp::~ValueNode_Exp() +{ + unlink_all(); +} + +ValueBase +ValueNode_Exp::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + return (exp((*exp_)(t).get(Real())) * + (*scale_)(t).get(Real())); +} + +String +ValueNode_Exp::get_name()const +{ + return "exp"; +} + +String +ValueNode_Exp::get_local_name()const +{ + return _("Exponential"); +} + +bool +ValueNode_Exp::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_Exp(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Exp* create(const ValueBase &x); +}; // END of class ValueNode_Exp + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_gradientcolor.cpp b/synfig-core/src/synfig/valuenode_gradientcolor.cpp new file mode 100644 index 0000000..60c6e7e --- /dev/null +++ b/synfig-core/src/synfig/valuenode_gradientcolor.cpp @@ -0,0 +1,189 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_gradientcolor.cpp +** \brief Implementation of the "Gradient Color" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_gradientcolor.h" +#include "valuenode_const.h" +#include "gradient.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_GradientColor::ValueNode_GradientColor(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + switch(value.get_type()) + { + case ValueBase::TYPE_COLOR: + set_link("gradient", ValueNode_Const::create(Gradient(value.get(Color()),value.get(Color())))); + set_link("index", ValueNode_Const::create(Real(0.5))); + set_link("loop", ValueNode_Const::create(bool(false))); + break; + default: + throw Exception::BadType(ValueBase::type_local_name(value.get_type())); + } + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_GradientColor::create_new()const +{ + return new ValueNode_GradientColor(get_type()); +} + +ValueNode_GradientColor* +ValueNode_GradientColor::create(const ValueBase &x) +{ + return new ValueNode_GradientColor(x); +} + +ValueNode_GradientColor::~ValueNode_GradientColor() +{ + unlink_all(); +} + +ValueBase +ValueNode_GradientColor::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + Real index((*index_)(t).get(Real())); + bool loop((*loop_)(t).get(bool())); + if (loop) index -= floor(index); + return (*gradient_)(t).get(Gradient())(index); +} + + +bool +ValueNode_GradientColor::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_GradientColor(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_GradientColor* create(const ValueBase &x); +}; // END of class ValueNode_GradientColor + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_gradientrotate.cpp b/synfig-core/src/synfig/valuenode_gradientrotate.cpp new file mode 100644 index 0000000..3e06bfc --- /dev/null +++ b/synfig-core/src/synfig/valuenode_gradientrotate.cpp @@ -0,0 +1,198 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_gradientrotate.cpp +** \brief Implementation of the "Gradient Rotate" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "general.h" +#include "valuenode_gradientrotate.h" +#include "valuenode_const.h" +#include +#include "gradient.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +synfig::ValueNode_GradientRotate::ValueNode_GradientRotate(const Gradient& x): + LinkableValueNode(synfig::ValueBase::TYPE_GRADIENT) +{ + set_link("gradient",ValueNode_Const::create(x)); + set_link("offset",ValueNode_Const::create(Real(0))); + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_GradientRotate::create_new()const +{ + return new ValueNode_GradientRotate(Gradient()); +} + +ValueNode_GradientRotate* +ValueNode_GradientRotate::create(const ValueBase& x) +{ + ValueBase::Type id(x.get_type()); + if(id!=ValueBase::TYPE_GRADIENT) + { + assert(0); + throw runtime_error(String(_("Gradient Rotate"))+_(":Bad type ")+ValueBase::type_local_name(id)); + } + + ValueNode_GradientRotate* value_node=new ValueNode_GradientRotate(x.get(Gradient())); + + assert(value_node->get_type()==id); + + return value_node; +} + +synfig::ValueNode_GradientRotate::~ValueNode_GradientRotate() +{ + unlink_all(); +} + +synfig::ValueBase +synfig::ValueNode_GradientRotate::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + Gradient gradient; + gradient=(*ref_gradient)(t).get(gradient); + Real offset((*ref_offset)(t).get(Real())); + Gradient::iterator iter; + for(iter=gradient.begin();iter!=gradient.end();++iter) + iter->pos+=offset; + + return gradient; +} + +bool +ValueNode_GradientRotate::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + +protected: + + ValueNode_GradientRotate(const Gradient& x); + +private: + + ValueNode::RHandle ref_gradient; + ValueNode::RHandle ref_offset; + +public: + + virtual ~ValueNode_GradientRotate(); + +// static Handle create(ValueBase::Type id=ValueBase::TYPE_GRADIENT); + + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + + virtual int link_count()const; + + virtual String link_local_name(int i)const; + virtual String link_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + + virtual ValueBase operator()(Time t)const; + + virtual String get_name()const; + virtual String get_local_name()const; + +// static bool check_type(const ValueBase::Type &type); +protected: + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + + LinkableValueNode* create_new()const; + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_GradientRotate* create(const ValueBase &x=ValueBase::TYPE_GRADIENT); +}; // END of class ValueNode_GradientRotate + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_greyed.cpp b/synfig-core/src/synfig/valuenode_greyed.cpp new file mode 100644 index 0000000..4e3536e --- /dev/null +++ b/synfig-core/src/synfig/valuenode_greyed.cpp @@ -0,0 +1,82 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_greyed.cpp +** \brief Implementation of the "Greyed" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_greyed.h" +#include "valuenode_const.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Greyed::ValueNode_Greyed(const ValueBase::Type &x): + ValueNode_Reference(x) +{ +} + +ValueNode_Greyed::ValueNode_Greyed(const ValueNode::Handle &x): + ValueNode_Reference(x->get_type()) +{ + set_link("link",x); +} + +ValueNode_Greyed* +ValueNode_Greyed::create(const ValueBase &x) +{ + return new ValueNode_Greyed(ValueNode_Const::create(x)); +} + +LinkableValueNode* +ValueNode_Greyed::create_new()const +{ + return new ValueNode_Greyed(get_type()); +} + +String +ValueNode_Greyed::get_name()const +{ + return "greyed"; +} + +String +ValueNode_Greyed::get_local_name()const +{ + return _("Greyed"); +} diff --git a/synfig-core/src/synfig/valuenode_greyed.h b/synfig-core/src/synfig/valuenode_greyed.h new file mode 100644 index 0000000..6996336 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_greyed.h @@ -0,0 +1,60 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_greyed.h +** \brief Header file for implementation of the "Greyed" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_VALUENODE_GREYED_H +#define __SYNFIG_VALUENODE_GREYED_H + +/* === H E A D E R S ======================================================= */ + +#include "valuenode_reference.h" + +/* === M A C R O S ========================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class ValueNode_Greyed : public ValueNode_Reference +{ +public: + typedef etl::handle Handle; + ValueNode_Greyed(const ValueBase::Type &x); + ValueNode_Greyed(const ValueNode::Handle &x); + + virtual String get_name()const; + virtual String get_local_name()const; + +protected: + LinkableValueNode* create_new()const; + +public: + static ValueNode_Greyed* create(const ValueBase &x); + +}; // END of class ValueNode_Greyed + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_integer.cpp b/synfig-core/src/synfig/valuenode_integer.cpp new file mode 100644 index 0000000..38cd082 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_integer.cpp @@ -0,0 +1,199 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_integer.cpp +** \brief Implementation of the "Integer" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_integer.h" +#include "valuenode_const.h" +#include "general.h" +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Integer::ValueNode_Integer(const ValueBase::Type &x): + LinkableValueNode(x) +{ +} + +ValueNode_Integer::ValueNode_Integer(const ValueBase &x): + LinkableValueNode(x.get_type()) +{ + switch(x.get_type()) + { + case ValueBase::TYPE_ANGLE: + set_link("integer", ValueNode_Const::create(round_to_int(Angle::deg(x.get(Angle())).get()))); + break; + case ValueBase::TYPE_BOOL: + set_link("integer", ValueNode_Const::create(int(x.get(bool())))); + break; + case ValueBase::TYPE_REAL: + set_link("integer", ValueNode_Const::create(round_to_int(x.get(Real())))); + break; + case ValueBase::TYPE_TIME: + set_link("integer", ValueNode_Const::create(round_to_int(x.get(Time())))); + break; + default: + assert(0); + throw runtime_error(get_local_name()+_(":Bad type ")+ValueBase::type_local_name(x.get_type())); + } +} + +ValueNode_Integer* +ValueNode_Integer::create(const ValueBase &x) +{ + return new ValueNode_Integer(x); +} + +LinkableValueNode* +ValueNode_Integer::create_new()const +{ + return new ValueNode_Integer(get_type()); +} + +ValueNode_Integer::~ValueNode_Integer() +{ + unlink_all(); +} + +bool +ValueNode_Integer::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + ValueNode_Integer(const ValueBase::Type &x); + ValueNode_Integer(const ValueBase &x); + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_Integer(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Integer* create(const ValueBase &x); +}; // END of class ValueNode_Integer + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_intstring.cpp b/synfig-core/src/synfig/valuenode_intstring.cpp new file mode 100644 index 0000000..c7011d2 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_intstring.cpp @@ -0,0 +1,202 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_intstring.cpp +** \brief Implementation of the "IntString" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_intstring.h" +#include "valuenode_const.h" +#include "canvas.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_IntString::ValueNode_IntString(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + switch(value.get_type()) + { + case ValueBase::TYPE_STRING: + set_link("int",ValueNode_Const::create(int(0))); + set_link("width",ValueNode_Const::create(int(0))); + set_link("zero_pad",ValueNode_Const::create(bool(false))); + break; + default: + throw Exception::BadType(ValueBase::type_local_name(value.get_type())); + } + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_IntString::create_new()const +{ + return new ValueNode_IntString(get_type()); +} + +ValueNode_IntString* +ValueNode_IntString::create(const ValueBase &x) +{ + return new ValueNode_IntString(x); +} + +ValueNode_IntString::~ValueNode_IntString() +{ + unlink_all(); +} + +ValueBase +ValueNode_IntString::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + int integer((*int_)(t).get(int())); + int width((*width_)(t).get(int())); + int zero_pad((*zero_pad_)(t).get(bool())); + + switch (get_type()) + { + case ValueBase::TYPE_STRING: + return strprintf(strprintf("%%%s%dd", + zero_pad ? "0" : "", + width).c_str(), integer); + default: + break; + } + + assert(0); + return ValueBase(); +} + +String +ValueNode_IntString::get_name()const +{ + return "intstring"; +} + +String +ValueNode_IntString::get_local_name()const +{ + return _("Int String"); +} + +bool +ValueNode_IntString::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_IntString(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_IntString* create(const ValueBase &x); +}; // END of class ValueNode_IntString + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_join.cpp b/synfig-core/src/synfig/valuenode_join.cpp new file mode 100644 index 0000000..eaa8fbc --- /dev/null +++ b/synfig-core/src/synfig/valuenode_join.cpp @@ -0,0 +1,229 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_join.cpp +** \brief Implementation of the "Join" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_join.h" +#include "valuenode_const.h" +#include "valuenode_dynamiclist.h" +#include "canvas.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Join::ValueNode_Join(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + switch(value.get_type()) + { + case ValueBase::TYPE_STRING: + { + vector v(1, value.get(String())); + + // "insert item (smart)" inserts before the selected entry, making it hard to append to the end + // add an extra element at the end to allow the easy insertion of text after the given value's string + v.push_back("..."); + + set_link("strings",ValueNode_DynamicList::create_from(v)); + set_link("before",ValueNode_Const::create(String(""))); + set_link("separator",ValueNode_Const::create(String(" "))); + set_link("after",ValueNode_Const::create(String(""))); + break; + } + default: + throw Exception::BadType(ValueBase::type_local_name(value.get_type())); + } + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_Join::create_new()const +{ + return new ValueNode_Join(get_type()); +} + +ValueNode_Join* +ValueNode_Join::create(const ValueBase &x) +{ + return new ValueNode_Join(x); +} + +ValueNode_Join::~ValueNode_Join() +{ + unlink_all(); +} + +ValueBase +ValueNode_Join::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + const std::vector strings((*strings_)(t).get_list()); + const String before((*before_)(t).get(String())); + const String separator((*separator_)(t).get(String())); + const String after((*after_)(t).get(String())); + + switch (get_type()) + { + case ValueBase::TYPE_STRING: + { + bool first = true; + String ret(before); + for (std::vector::const_iterator iter = strings.begin(); iter != strings.end(); iter++) + { + if (first) + first = false; + else + ret += separator; + ret += iter->get(String()); + } + ret += after; + return ret; + } + default: + break; + } + + assert(0); + return ValueBase(); +} + +String +ValueNode_Join::get_name()const +{ + return "join"; +} + +String +ValueNode_Join::get_local_name()const +{ + return _("Joined List"); +} + +bool +ValueNode_Join::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_Join(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Join* create(const ValueBase &x); +}; // END of class ValueNode_Join + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_linear.cpp b/synfig-core/src/synfig/valuenode_linear.cpp new file mode 100644 index 0000000..583612e --- /dev/null +++ b/synfig-core/src/synfig/valuenode_linear.cpp @@ -0,0 +1,229 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_linear.cpp +** \brief Implementation of the "Linear" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_linear.h" +#include "valuenode_const.h" +#include "general.h" +#include "color.h" +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Linear::ValueNode_Linear(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + switch(get_type()) + { + case ValueBase::TYPE_ANGLE: + set_link("slope",ValueNode_Const::create(Angle::deg(0))); + set_link("offset",ValueNode_Const::create(value.get(Angle()))); + break; + case ValueBase::TYPE_COLOR: + set_link("slope",ValueNode_Const::create(Color(0,0,0,0))); + set_link("offset",ValueNode_Const::create(value.get(Color()))); + break; + case ValueBase::TYPE_INTEGER: + set_link("slope",ValueNode_Const::create(int(0))); + set_link("offset",ValueNode_Const::create(value.get(int()))); + break; + case ValueBase::TYPE_REAL: + set_link("slope",ValueNode_Const::create(Real(0))); + set_link("offset",ValueNode_Const::create(value.get(Real()))); + break; + case ValueBase::TYPE_TIME: + set_link("slope",ValueNode_Const::create(Time(0))); + set_link("offset",ValueNode_Const::create(value.get(Time()))); + break; + case ValueBase::TYPE_VECTOR: + set_link("slope",ValueNode_Const::create(Vector(0,0))); + set_link("offset",ValueNode_Const::create(value.get(Vector()))); + break; + default: + throw Exception::BadType(ValueBase::type_local_name(get_type())); + } + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_Linear::create_new()const +{ + return new ValueNode_Linear(get_type()); +} + +ValueNode_Linear* +ValueNode_Linear::create(const ValueBase &x) +{ + return new ValueNode_Linear(x); +} + +ValueNode_Linear::~ValueNode_Linear() +{ + unlink_all(); +} + +ValueBase +ValueNode_Linear::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + switch(get_type()) + { + case ValueBase::TYPE_ANGLE: + return (*m_)(t).get( Angle())*t+(*b_)(t).get( Angle()); + case ValueBase::TYPE_COLOR: + return (*m_)(t).get( Color())*t+(*b_)(t).get( Color()); + case ValueBase::TYPE_INTEGER: + return round_to_int((*m_)(t).get(int())*t+(*b_)(t).get(int())); + case ValueBase::TYPE_REAL: + return (*m_)(t).get( Real())*t+(*b_)(t).get( Real()); + case ValueBase::TYPE_TIME: + return (*m_)(t).get( Time())*t+(*b_)(t).get( Time()); + case ValueBase::TYPE_VECTOR: + return (*m_)(t).get(Vector())*t+(*b_)(t).get(Vector()); + default: + assert(0); + break; + } + return ValueBase(); +} + + +String +ValueNode_Linear::get_name()const +{ + return "linear"; +} + +String +ValueNode_Linear::get_local_name()const +{ + return _("Linear"); +} + +bool +ValueNode_Linear::check_type(ValueBase::Type type) +{ + return + type==ValueBase::TYPE_ANGLE || + type==ValueBase::TYPE_COLOR || + type==ValueBase::TYPE_INTEGER || + type==ValueBase::TYPE_REAL || + type==ValueBase::TYPE_TIME || + type==ValueBase::TYPE_VECTOR ; +} + +bool +ValueNode_Linear::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_Linear(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Linear* create(const ValueBase &x); +}; // END of class ValueNode_Linear + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_log.cpp b/synfig-core/src/synfig/valuenode_log.cpp new file mode 100644 index 0000000..59f82e5 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_log.cpp @@ -0,0 +1,186 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_log.cpp +** \brief Implementation of the "Natural Logarithm" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** Copyright (c) 2008 Carlos López +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_log.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Logarithm::ValueNode_Logarithm(const ValueBase &x): + LinkableValueNode(x.get_type()) +{ + Real value(x.get(Real())); + Real infinity(999999.0); + Real epsilon(0.000001); + + value = exp(value); + + set_link("link", ValueNode_Const::create(Real(value))); + set_link("epsilon", ValueNode_Const::create(Real(epsilon))); + set_link("infinite", ValueNode_Const::create(Real(infinity))); +} + +ValueNode_Logarithm* +ValueNode_Logarithm::create(const ValueBase &x) +{ + return new ValueNode_Logarithm(x); +} + +LinkableValueNode* +ValueNode_Logarithm::create_new()const +{ + return new ValueNode_Logarithm(get_type()); +} + +ValueNode_Logarithm::~ValueNode_Logarithm() +{ + unlink_all(); +} + +bool +ValueNode_Logarithm::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + ValueNode_Logarithm(const ValueBase &x); + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_Logarithm(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Logarithm* create(const ValueBase &x); +}; // END of class ValueNode_Logarithm + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif + + diff --git a/synfig-core/src/synfig/valuenode_not.cpp b/synfig-core/src/synfig/valuenode_not.cpp new file mode 100644 index 0000000..b7ca310 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_not.cpp @@ -0,0 +1,159 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_not.cpp +** \brief Implementation of the "Not" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** Copyright (c) 2009 Nikita Kitaev +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_not.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Not::ValueNode_Not(const ValueBase &x): + LinkableValueNode(x.get_type()) +{ + bool value(x.get(bool())); + + set_link("link", ValueNode_Const::create(!value)); +} + +ValueNode_Not* +ValueNode_Not::create(const ValueBase &x) +{ + return new ValueNode_Not(x); +} + +LinkableValueNode* +ValueNode_Not::create_new()const +{ + return new ValueNode_Not(get_type()); +} + +ValueNode_Not::~ValueNode_Not() +{ + unlink_all(); +} + +bool +ValueNode_Not::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + ValueNode_Not(const ValueBase &x); + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_Not(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Not* create(const ValueBase &x); +}; // END of class ValueNode_Not + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_or.cpp b/synfig-core/src/synfig/valuenode_or.cpp new file mode 100644 index 0000000..a2d9e71 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_or.cpp @@ -0,0 +1,168 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_or.cpp +** \brief Implementation of the "Or" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** Copyright (c) 2009 Nikita Kitaev +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_or.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Or::ValueNode_Or(const ValueBase &x): + LinkableValueNode(x.get_type()) +{ + bool value(x.get(bool())); + + set_link("link1", ValueNode_Const::create(bool(false))); + set_link("link2", ValueNode_Const::create(bool(false))); + if (value) + set_link("link1",ValueNode_Const::create(bool(true))); +} + +ValueNode_Or* +ValueNode_Or::create(const ValueBase &x) +{ + return new ValueNode_Or(x); +} + +LinkableValueNode* +ValueNode_Or::create_new()const +{ + return new ValueNode_Or(get_type()); +} + +ValueNode_Or::~ValueNode_Or() +{ + unlink_all(); +} + +bool +ValueNode_Or::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + ValueNode_Or(const ValueBase &x); + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_Or(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Or* create(const ValueBase &x); +}; // END of class ValueNode_Or + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_pow.cpp b/synfig-core/src/synfig/valuenode_pow.cpp new file mode 100644 index 0000000..fa00618 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_pow.cpp @@ -0,0 +1,204 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_pow.cpp +** \brief Implementation of the "Power" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** Copyright (c) 2009 Nikita Kitaev +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_pow.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Pow::ValueNode_Pow(const ValueBase &x): + LinkableValueNode(x.get_type()) +{ + Real value(x.get(Real())); + Real infinity(999999.0); + Real epsilon(0.000001); + + set_link("base", ValueNode_Const::create(Real(value))); + set_link("power", ValueNode_Const::create(Real(1))); + set_link("epsilon", ValueNode_Const::create(Real(epsilon))); + set_link("infinite", ValueNode_Const::create(Real(infinity))); +} + +ValueNode_Pow* +ValueNode_Pow::create(const ValueBase &x) +{ + return new ValueNode_Pow(x); +} + +LinkableValueNode* +ValueNode_Pow::create_new()const +{ + return new ValueNode_Pow(get_type()); +} + +ValueNode_Pow::~ValueNode_Pow() +{ + unlink_all(); +} + +bool +ValueNode_Pow::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i 0) //0^x=0 + return Real(0); + else + if ( ( ((int) power) % 2 != 0) && (base < 0) ) //(-0)^(-odd)=-inf + return -infinite; + else + return infinite; + + if (base <= epsilon && ((int) power) != power) //negative number to fractional power -> undefined + power = ((int) power); //so round off power to nearest integer + + return pow(base,power); + +} + +String +ValueNode_Pow::get_name()const +{ + return "power"; +} + +String +ValueNode_Pow::get_local_name()const +{ + return _("Power"); +} + +bool +ValueNode_Pow::check_type(ValueBase::Type type) +{ + return type==ValueBase::TYPE_REAL; +} diff --git a/synfig-core/src/synfig/valuenode_pow.h b/synfig-core/src/synfig/valuenode_pow.h new file mode 100644 index 0000000..69237fd --- /dev/null +++ b/synfig-core/src/synfig/valuenode_pow.h @@ -0,0 +1,84 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_pow.h +** \brief Header file for implementation of the "Power" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** Copyright (c) 2009 Nikita Kitaev +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_VALUENODE_POW_H +#define __SYNFIG_VALUENODE_POW_H + +/* === H E A D E R S ======================================================= */ + +#include "valuenode.h" + +/* === M A C R O S ========================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class ValueNode_Pow : public LinkableValueNode +{ + ValueNode::RHandle base_; + ValueNode::RHandle power_; + ValueNode::RHandle epsilon_; + ValueNode::RHandle infinite_; + +public: + typedef etl::handle Handle; + typedef etl::handle ConstHandle; + + ValueNode_Pow(const ValueBase &x); + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_Pow(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Pow* create(const ValueBase &x); +}; // END of class ValueNode_Pow + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_radialcomposite.cpp b/synfig-core/src/synfig/valuenode_radialcomposite.cpp new file mode 100644 index 0000000..a889c78 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_radialcomposite.cpp @@ -0,0 +1,315 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_radialcomposite.cpp +** \brief Implementation of the "Radial Composite" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_radialcomposite.h" +#include "valuenode_const.h" +#include +#include "general.h" +#include "color.h" +#include "savecanvas.h" +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +synfig::ValueNode_RadialComposite::ValueNode_RadialComposite(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + switch(get_type()) + { + case ValueBase::TYPE_VECTOR: + { + Vector vect(value.get(Vector())); + set_link("r",ValueNode_Const::create(vect.mag())); + set_link("t",ValueNode_Const::create(Angle(Angle::tan(vect[1],vect[0])))); + } + break; + case ValueBase::TYPE_COLOR: + set_link("y",ValueNode_Const::create(value.get(Color()).get_y())); + set_link("s",ValueNode_Const::create(value.get(Color()).get_s())); + set_link("h",ValueNode_Const::create(value.get(Color()).get_hue())); + set_link("a",ValueNode_Const::create(value.get(Color()).get_a())); + break; + default: + assert(0); + throw Exception::BadType(ValueBase::type_local_name(get_type())); + } +} + +ValueNode_RadialComposite::~ValueNode_RadialComposite() +{ + unlink_all(); +} + +ValueNode_RadialComposite* +ValueNode_RadialComposite::create(const ValueBase &value) +{ + return new ValueNode_RadialComposite(value); +} + +LinkableValueNode* +ValueNode_RadialComposite::create_new()const +{ + return new ValueNode_RadialComposite(ValueBase(get_type())); +} + +ValueBase +synfig::ValueNode_RadialComposite::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + switch(get_type()) + { + case ValueBase::TYPE_VECTOR: + { + Real mag; + Angle angle; + assert(components[0] && components[1]); + mag=(*components[0])(t).get(mag); + angle=(*components[1])(t).get(angle); + return Vector(Angle::cos(angle).get()*mag,Angle::sin(angle).get()*mag); + } + case ValueBase::TYPE_COLOR: + { + assert(components[0] && components[1] && components[2] && components[3]); + return Color::YUV( + (*components[0])(t).get(Real()), + (*components[1])(t).get(Real()), + (*components[2])(t).get(Angle()), + (*components[3])(t).get(Real()) + ); + } + default: + synfig::error(string("ValueNode_RadialComposite::operator():")+_("Bad type for radialcomposite")); + assert(components[0]); + return (*components[0])(t); + } +} + +int +ValueNode_RadialComposite::link_count()const +{ + switch(get_type()) + { + case ValueBase::TYPE_VECTOR: + return 2; + case ValueBase::TYPE_COLOR: + return 4; + default: + synfig::warning(string("ValueNode_RadialComposite::component_count():")+_("Bad type for radialcomposite")); + return 1; + } +} + +bool +ValueNode_RadialComposite::set_link_vfunc(int i,ValueNode::Handle x) +{ + assert(i>=0 && iget_type()!=ValueBase::TYPE_REAL) + return false; + if(i==1 && x->get_type()!=ValueBase::TYPE_ANGLE) + return false; + components[i]=x; + return true; + break; + + case ValueBase::TYPE_COLOR: + if((i==0 || i==1 || i==3) && x->get_type()!=ValueBase::TYPE_REAL) + return false; + if((i==2) && x->get_type()!=ValueBase::TYPE_ANGLE) + return false; + components[i]=x; + return true; + break; + + + default: + break; + } + return false; +} + +ValueNode::LooseHandle +ValueNode_RadialComposite::get_link_vfunc(int i)const +{ + assert(i>=0 && i=0 && i=0 && i= 0 && name[1]-'0' < link_count()) + return name[1]-'0'; + + switch(get_type()) + { + case ValueBase::TYPE_COLOR: + if(name[0]=='y') + return 0; + if(name[0]=='s') + return 1; + if(name[0]=='h') + return 2; + if(name[0]=='a') + return 3; + case ValueBase::TYPE_VECTOR: + if(name[0]=='r') + return 0; + if(name[0]=='t') + return 1; + default: + break; + } + + throw Exception::BadLinkName(name); +} + +String +ValueNode_RadialComposite::get_name()const +{ + return "radial_composite"; +} + +String +ValueNode_RadialComposite::get_local_name()const +{ + return _("Radial Composite"); +} + +bool +ValueNode_RadialComposite::check_type(ValueBase::Type type) +{ + return + type==ValueBase::TYPE_VECTOR || + type==ValueBase::TYPE_COLOR; +} diff --git a/synfig-core/src/synfig/valuenode_radialcomposite.h b/synfig-core/src/synfig/valuenode_radialcomposite.h new file mode 100644 index 0000000..c9c06e3 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_radialcomposite.h @@ -0,0 +1,77 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_radialcomposite.h +** \brief Header file for implementation of the "Radial Composite" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_VALUENODE_RADIALCOMPOSITE_H +#define __SYNFIG_VALUENODE_RADIALCOMPOSITE_H + +/* === H E A D E R S ======================================================= */ + +#include "valuenode.h" + +/* === M A C R O S ========================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class ValueNode_RadialComposite : public LinkableValueNode +{ + ValueNode::RHandle components[6]; + ValueNode_RadialComposite(const ValueBase &value); + +public: + typedef etl::handle Handle; + typedef etl::handle ConstHandle; + + + virtual ~ValueNode_RadialComposite(); + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + virtual String link_local_name(int i)const; + virtual ValueBase operator()(Time t)const; + + + virtual String get_name()const; + virtual String get_local_name()const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + + LinkableValueNode* create_new()const; + +public: + using synfig::LinkableValueNode::set_link_vfunc; + using synfig::LinkableValueNode::get_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_RadialComposite* create(const ValueBase &x); +}; // END of class ValueNode_RadialComposite + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_range.cpp b/synfig-core/src/synfig/valuenode_range.cpp new file mode 100644 index 0000000..c45f369 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_range.cpp @@ -0,0 +1,243 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_range.cpp +** \brief Implementation of the "Range" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "general.h" +#include "valuenode_range.h" +#include "valuenode_const.h" +#include +#include "vector.h" +#include "angle.h" +#include "real.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +synfig::ValueNode_Range::ValueNode_Range(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + ValueBase::Type id(value.get_type()); + + switch(id) + { + case ValueBase::TYPE_ANGLE: + set_link("min",ValueNode_Const::create(value.get(Angle()))); + set_link("max",ValueNode_Const::create(value.get(Angle()))); + set_link("link",ValueNode_Const::create(value.get(Angle()))); + break; + case ValueBase::TYPE_INTEGER: + set_link("min",ValueNode_Const::create(value.get(int()))); + set_link("max",ValueNode_Const::create(value.get(int()))); + set_link("link",ValueNode_Const::create(value.get(int()))); + break; + case ValueBase::TYPE_REAL: + set_link("min",ValueNode_Const::create(value.get(Real()))); + set_link("max",ValueNode_Const::create(value.get(Real()))); + set_link("link",ValueNode_Const::create(value.get(Real()))); + break; + case ValueBase::TYPE_TIME: + set_link("min",ValueNode_Const::create(value.get(Time()))); + set_link("max",ValueNode_Const::create(value.get(Time()))); + set_link("link",ValueNode_Const::create(value.get(Time()))); + break; + default: + assert(0); + throw runtime_error(get_local_name()+_(":Bad type ")+ValueBase::type_local_name(id)); + } + + assert(min_->get_type()==id); + assert(max_->get_type()==id); + assert(link_->get_type()==id); + assert(get_type()==id); + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_Range::create_new()const +{ + return new ValueNode_Range(get_type()); +} + +ValueNode_Range* +ValueNode_Range::create(const ValueBase& value) +{ + return new ValueNode_Range(value); +} + +synfig::ValueNode_Range::~ValueNode_Range() +{ + unlink_all(); +} + +synfig::ValueBase +synfig::ValueNode_Range::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + if(!min_ || !max_ || !link_) + throw runtime_error(strprintf("ValueNode_Range: %s",_("Some of my parameters aren't set!"))); + + switch(get_type()) + { + case ValueBase::TYPE_ANGLE: + { + Angle minimum = (* min_)(t).get(Angle()); + Angle maximum = (* max_)(t).get(Angle()); + Angle link = (*link_)(t).get(Angle()); + + // if link is between min and max, use it + if (Angle::deg((link-minimum).mod()).get() < Angle::deg((maximum-minimum).mod()).get()) + return link; + // otherwise use whichever of min and max is closest to link + else if (link.dist(minimum).abs() < link.dist(maximum).abs()) + return minimum; + else + return maximum; + } + case ValueBase::TYPE_INTEGER: + return std::max((*min_)(t).get(int()), std::min((*max_)(t).get(int()), (*link_)(t).get(int()))); + case ValueBase::TYPE_REAL: + return std::max((*min_)(t).get(Real()), std::min((*max_)(t).get(Real()), (*link_)(t).get(Real()))); + case ValueBase::TYPE_TIME: + return std::max((*min_)(t).get(Time()), std::min((*max_)(t).get(Time()), (*link_)(t).get(Time()))); + default: + assert(0); + break; + } + return ValueBase(); +} + +bool +ValueNode_Range::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_Range(); + + virtual String get_name()const; + virtual String get_local_name()const; + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + LinkableValueNode* create_new()const; + +public: + using synfig::LinkableValueNode::get_link_vfunc; + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Range* create(const ValueBase &value=ValueBase()); +}; // END of class ValueNode_Range + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_realstring.cpp b/synfig-core/src/synfig/valuenode_realstring.cpp new file mode 100644 index 0000000..e8231e7 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_realstring.cpp @@ -0,0 +1,210 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_realstring.cpp +** \brief Implementation of the "RealString" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_realstring.h" +#include "valuenode_const.h" +#include "canvas.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_RealString::ValueNode_RealString(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + switch(value.get_type()) + { + case ValueBase::TYPE_STRING: + set_link("real",ValueNode_Const::create(Real(0))); + set_link("width",ValueNode_Const::create(int(0))); + set_link("precision",ValueNode_Const::create(int(3))); + set_link("zero_pad",ValueNode_Const::create(bool(false))); + break; + default: + throw Exception::BadType(ValueBase::type_local_name(value.get_type())); + } + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_RealString::create_new()const +{ + return new ValueNode_RealString(get_type()); +} + +ValueNode_RealString* +ValueNode_RealString::create(const ValueBase &x) +{ + return new ValueNode_RealString(x); +} + +ValueNode_RealString::~ValueNode_RealString() +{ + unlink_all(); +} + +ValueBase +ValueNode_RealString::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + Real real((*real_)(t).get(Real())); + int width((*width_)(t).get(int())); + int precision((*precision_)(t).get(int())); + int zero_pad((*zero_pad_)(t).get(bool())); + + switch (get_type()) + { + case ValueBase::TYPE_STRING: + return strprintf(strprintf("%%%s%d.%df", + zero_pad ? "0" : "", + width, + precision).c_str(), real); + default: + break; + } + + assert(0); + return ValueBase(); +} + +String +ValueNode_RealString::get_name()const +{ + return "realstring"; +} + +String +ValueNode_RealString::get_local_name()const +{ + return _("Real String"); +} + +bool +ValueNode_RealString::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_RealString(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_RealString* create(const ValueBase &x); +}; // END of class ValueNode_RealString + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_reciprocal.cpp b/synfig-core/src/synfig/valuenode_reciprocal.cpp new file mode 100644 index 0000000..d31a995 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_reciprocal.cpp @@ -0,0 +1,189 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_reciprocal.cpp +** \brief Implementation of the "Reciprocal" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_reciprocal.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Reciprocal::ValueNode_Reciprocal(const ValueBase &x): + LinkableValueNode(x.get_type()) +{ + Real value(x.get(Real())); + Real infinity(999999.0); + Real epsilon(0.000001); + + if (value == 0) + value = infinity; + else + value = 1.0/value; + + set_link("link", ValueNode_Const::create(Real(value))); + set_link("epsilon", ValueNode_Const::create(Real(epsilon))); + set_link("infinite", ValueNode_Const::create(Real(infinity))); +} + +ValueNode_Reciprocal* +ValueNode_Reciprocal::create(const ValueBase &x) +{ + return new ValueNode_Reciprocal(x); +} + +LinkableValueNode* +ValueNode_Reciprocal::create_new()const +{ + return new ValueNode_Reciprocal(get_type()); +} + +ValueNode_Reciprocal::~ValueNode_Reciprocal() +{ + unlink_all(); +} + +bool +ValueNode_Reciprocal::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + ValueNode_Reciprocal(const ValueBase &x); + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_Reciprocal(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Reciprocal* create(const ValueBase &x); +}; // END of class ValueNode_Reciprocal + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_reference.cpp b/synfig-core/src/synfig/valuenode_reference.cpp new file mode 100644 index 0000000..a235f02 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_reference.cpp @@ -0,0 +1,168 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_reference.cpp +** \brief Implementation of the "Reference" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_reference.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Reference::ValueNode_Reference(const ValueBase::Type &x): + LinkableValueNode(x) +{ +} + +ValueNode_Reference::ValueNode_Reference(const ValueNode::Handle &x): + LinkableValueNode(x->get_type()) +{ + set_link("link",x); +} + +ValueNode_Reference* +ValueNode_Reference::create(const ValueBase &x) +{ + return new ValueNode_Reference(ValueNode_Const::create(x)); +} + +LinkableValueNode* +ValueNode_Reference::create_new()const +{ + return new ValueNode_Reference(get_type()); +} + +ValueNode_Reference::~ValueNode_Reference() +{ + unlink_all(); +} + +bool +ValueNode_Reference::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + ValueNode_Reference(const ValueBase::Type &x); + + ValueNode_Reference(const ValueNode::Handle &x); + +// static Handle create(const ValueBase::Type &x); +// static Handle create(const ValueNode::Handle &x); + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + + virtual int link_count()const; + + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_Reference(); + + virtual String get_name()const; + + virtual String get_local_name()const; + +protected: + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + + LinkableValueNode* create_new()const; + +public: + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Reference* create(const ValueBase &x); +}; // END of class ValueNode_Reference + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_repeat_gradient.cpp b/synfig-core/src/synfig/valuenode_repeat_gradient.cpp new file mode 100644 index 0000000..c9ad14a --- /dev/null +++ b/synfig-core/src/synfig/valuenode_repeat_gradient.cpp @@ -0,0 +1,244 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_repeat_gradient.cpp +** \brief Implementation of the "Repeat Gradient" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "general.h" +#include "valuenode_repeat_gradient.h" +#include "valuenode_const.h" +#include +#include "color.h" +#include "gradient.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +synfig::ValueNode_Repeat_Gradient::ValueNode_Repeat_Gradient(const Gradient& x):LinkableValueNode(synfig::ValueBase::TYPE_GRADIENT) +{ + set_link("gradient",ValueNode_Const::create(x)); + set_link("count",count_=ValueNode_Const::create(int(3))); + set_link("width",ValueNode_Const::create(0.5)); + set_link("specify_start",ValueNode_Const::create(true)); + set_link("specify_end",ValueNode_Const::create(true)); + set_link("start_color",ValueNode_Const::create(Color::alpha())); + set_link("end_color",ValueNode_Const::create(Color::alpha())); +} + +LinkableValueNode* +ValueNode_Repeat_Gradient::create_new()const +{ + return new ValueNode_Repeat_Gradient(Gradient()); +} + +ValueNode_Repeat_Gradient* +ValueNode_Repeat_Gradient::create(const ValueBase& x) +{ + ValueBase::Type id(x.get_type()); + + if(id!=ValueBase::TYPE_GRADIENT) + { + assert(0); + throw runtime_error(String(_("Repeat Gradient"))+_(":Bad type ")+ValueBase::type_local_name(id)); + } + + ValueNode_Repeat_Gradient* value_node=new ValueNode_Repeat_Gradient(x.get(Gradient())); + + assert(value_node->get_type()==id); + + return value_node; +} + +synfig::ValueNode_Repeat_Gradient::~ValueNode_Repeat_Gradient() +{ + unlink_all(); +} + +synfig::ValueBase +synfig::ValueNode_Repeat_Gradient::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + const int count((*count_)(t).get(int())); + int i; + Gradient ret; + + if(count<=0) + return ret; + + const Gradient gradient((*gradient_)(t).get(Gradient())); + const float width(max(0.0,min(1.0,(*width_)(t).get(Real())))); + const bool specify_start((*specify_start_)(t).get(bool())); + const bool specify_end((*specify_end_)(t).get(bool())); + + const float gradient_width_a(width/count); + const float gradient_width_b((1.0-width)/count); + + Gradient::const_iterator iter; + Gradient::const_reverse_iterator riter; + if (specify_start) + ret.push_back(Gradient::CPoint(0,(*start_color_)(t).get(Color()))); + for(i=0;ipos,iter->color)); + pos+=gradient_width_a; + if (width != 1.0) + for(riter=gradient.rbegin();riter!=gradient.rend();riter++) + ret.push_back(Gradient::CPoint(pos+gradient_width_b*(1-(riter->pos)),riter->color)); + } + if (specify_end) + ret.push_back(Gradient::CPoint(1,(*end_color_)(t).get(Color()))); + return ret; +} + +bool +ValueNode_Repeat_Gradient::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + +protected: + + ValueNode_Repeat_Gradient(const Gradient& x); + +private: + + ValueNode::RHandle gradient_; + ValueNode::RHandle count_; + ValueNode::RHandle width_; + ValueNode::RHandle specify_start_; + ValueNode::RHandle specify_end_; + ValueNode::RHandle start_color_; + ValueNode::RHandle end_color_; + +public: + + virtual ~ValueNode_Repeat_Gradient(); + + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + + virtual int link_count()const; + + virtual String link_local_name(int i)const; + virtual String link_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + + virtual ValueBase operator()(Time t)const; + + virtual String get_name()const; + virtual String get_local_name()const; + +// static bool check_type(const ValueBase::Type &type); + + LinkableValueNode* create_new()const; + +public: + using synfig::LinkableValueNode::get_link_vfunc; + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Repeat_Gradient* create(const ValueBase &x=ValueBase::TYPE_GRADIENT); +}; // END of class ValueNode_Repeat_Gradient + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_scale.cpp b/synfig-core/src/synfig/valuenode_scale.cpp new file mode 100644 index 0000000..b272d7d --- /dev/null +++ b/synfig-core/src/synfig/valuenode_scale.cpp @@ -0,0 +1,277 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_scale.cpp +** \brief Implementation of the "Scale" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "general.h" +#include "valuenode_scale.h" +#include "valuenode_const.h" +#include +#include "color.h" +#include "vector.h" +#include "time.h" +#include "angle.h" +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Scale::ValueNode_Scale(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + set_link("scalar",ValueNode::Handle(ValueNode_Const::create(Real(1.0)))); + ValueBase::Type id(value.get_type()); + + switch(id) + { + case ValueBase::TYPE_ANGLE: + set_link("link",ValueNode_Const::create(value.get(Angle()))); + break; + case ValueBase::TYPE_COLOR: + set_link("link",ValueNode_Const::create(value.get(Color()))); + break; + case ValueBase::TYPE_INTEGER: + set_link("link",ValueNode_Const::create(value.get(int()))); + break; + case ValueBase::TYPE_REAL: + set_link("link",ValueNode_Const::create(value.get(Real()))); + break; + case ValueBase::TYPE_TIME: + set_link("link",ValueNode_Const::create(value.get(Time()))); + break; + case ValueBase::TYPE_VECTOR: + set_link("link",ValueNode_Const::create(value.get(Vector()))); + break; + default: + assert(0); + throw runtime_error(get_local_name()+_(":Bad type ")+ValueBase::type_local_name(id)); + } + + assert(value_node); + assert(value_node->get_type()==id); + assert(get_type()==id); +} + +LinkableValueNode* +ValueNode_Scale::create_new()const +{ + return new ValueNode_Scale(get_type()); +} + +ValueNode_Scale* +ValueNode_Scale::create(const ValueBase& value) +{ + return new ValueNode_Scale(value); +} + +synfig::ValueNode_Scale::~ValueNode_Scale() +{ + unlink_all(); +} + +synfig::ValueBase +synfig::ValueNode_Scale::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + if(!value_node || !scalar) + throw runtime_error(strprintf("ValueNode_Scale: %s",_("One or both of my parameters aren't set!"))); + else if(get_type()==ValueBase::TYPE_ANGLE) + return (*value_node)(t).get(Angle())*(*scalar)(t).get(Real()); + else if(get_type()==ValueBase::TYPE_COLOR) + { + Color ret((*value_node)(t).get(Color())); + Real s((*scalar)(t).get(Real())); + ret.set_r(ret.get_r()*s); + ret.set_g(ret.get_g()*s); + ret.set_b(ret.get_b()*s); + return ret; + } + else if(get_type()==ValueBase::TYPE_INTEGER) + return round_to_int((*value_node)(t).get(int())*(*scalar)(t).get(Real())); + else if(get_type()==ValueBase::TYPE_REAL) + return (*value_node)(t).get(Real())*(*scalar)(t).get(Real()); + else if(get_type()==ValueBase::TYPE_TIME) + return (*value_node)(t).get(Time())*(*scalar)(t).get(Time()); + else if(get_type()==ValueBase::TYPE_VECTOR) + return (*value_node)(t).get(Vector())*(*scalar)(t).get(Real()); + + assert(0); + return ValueBase(); +} + +synfig::ValueBase +synfig::ValueNode_Scale::get_inverse(Time t, const synfig::Vector &target_value) const +{ + Real scalar_value((*scalar)(t).get(Real())); + if(scalar_value==0) + throw runtime_error(strprintf("ValueNode_Scale: %s",_("Attempting to get the inverse of a non invertible Valuenode"))); + else + { + switch (get_type()) + { + case ValueBase::TYPE_REAL: + return target_value.mag() / scalar_value; + case ValueBase::TYPE_ANGLE: + return Angle::tan(target_value[1] / scalar_value ,target_value[0] / scalar_value); + default: + return target_value / scalar_value; + } + } + return ValueBase(); +} + +synfig::ValueBase +synfig::ValueNode_Scale::get_inverse(Time t, const synfig::Angle &target_value) const +{ + Real scalar_value((*scalar)(t).get(Real())); + if(scalar_value==0) + throw runtime_error(strprintf("ValueNode_Scale: %s",_("Attempting to get the inverse of a non invertible Valuenode"))); + else + { + switch (get_type()) + { + default: + return (*value_node)(t).get(Angle()) + target_value / scalar_value; + } + } + return ValueBase(); +} + +bool +synfig::ValueNode_Scale::is_invertible(Time t) const +{ + Real scalar_value((*scalar)(t).get(Real())); + return (!scalar_value==0); +} + +bool +ValueNode_Scale::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + +private: + ValueNode::RHandle value_node; + ValueNode::RHandle scalar; + + ValueNode_Scale(const ValueBase &value); + +public: + + //static Handle create(ValueBase::Type id=ValueBase::TYPE_NIL); + + //static Handle create(ValueNode::Handle value_node, Real scalar); + + virtual ~ValueNode_Scale(); + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + + virtual int link_count()const; + + virtual String link_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + + virtual ValueBase operator()(Time t)const; + + //! Returns the modified Link to match the target value at time t + ValueBase get_inverse(Time t, const synfig::Vector &target_value) const; + ValueBase get_inverse(Time t, const synfig::Angle &target_value) const; + + bool is_invertible(Time t)const; + + virtual String get_name()const; + + virtual String get_local_name()const; + + virtual String link_local_name(int i)const; + +protected: + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + + virtual LinkableValueNode* create_new()const; + +public: + using synfig::LinkableValueNode::get_link_vfunc; + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Scale* create(const ValueBase &x); +}; // END of class ValueNode_Scale + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_segcalctangent.cpp b/synfig-core/src/synfig/valuenode_segcalctangent.cpp new file mode 100644 index 0000000..245bf62 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_segcalctangent.cpp @@ -0,0 +1,183 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_segcalctangent.cpp +** \brief Implementation of the "Segment Tangent" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_segcalctangent.h" +#include "valuenode_const.h" +#include "valuenode_composite.h" +#include "general.h" +#include "exception.h" +#include +#include +#include "segment.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_SegCalcTangent::ValueNode_SegCalcTangent(const ValueBase::Type &x): + LinkableValueNode(x) +{ + if(x!=ValueBase::TYPE_VECTOR) + throw Exception::BadType(ValueBase::type_local_name(x)); + + set_link("segment",ValueNode_Const::create(ValueBase::TYPE_SEGMENT)); + set_link("amount",ValueNode_Const::create(Real(0.5))); +} + +ValueNode_SegCalcTangent* +ValueNode_SegCalcTangent::create(const ValueBase &x) +{ + return new ValueNode_SegCalcTangent(x.get_type()); +} + +ValueNode_SegCalcTangent::~ValueNode_SegCalcTangent() +{ + unlink_all(); +} + +ValueBase +ValueNode_SegCalcTangent::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + Segment segment((*segment_)(t).get(Segment())); + + etl::hermite curve(segment.p1,segment.p2,segment.t1,segment.t2); + etl::derivative< etl::hermite > deriv(curve); + + return deriv((*amount_)(t).get(Real())); +} + + +String +ValueNode_SegCalcTangent::get_name()const +{ + return "segcalctangent"; +} + +String +ValueNode_SegCalcTangent::get_local_name()const +{ + return _("Segment Tangent"); +} + +bool +ValueNode_SegCalcTangent::check_type(ValueBase::Type type) +{ + return type==ValueBase::TYPE_VECTOR; +} + +bool +ValueNode_SegCalcTangent::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + //static Handle create(const ValueBase::Type &x=ValueBase::TYPE_VECTOR); + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_SegCalcTangent(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + LinkableValueNode* create_new()const; + +public: + using synfig::LinkableValueNode::get_link_vfunc; + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_SegCalcTangent* create(const ValueBase &x=ValueBase::TYPE_VECTOR); +}; // END of class ValueNode_SegCalcTangent + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_segcalcvertex.cpp b/synfig-core/src/synfig/valuenode_segcalcvertex.cpp new file mode 100644 index 0000000..6391f39 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_segcalcvertex.cpp @@ -0,0 +1,181 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_segcalcvertex.cpp +** \brief Implementation of the "Segment Vertex" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_segcalcvertex.h" +#include "valuenode_const.h" +#include "valuenode_composite.h" +#include "general.h" +#include "exception.h" +#include +#include "segment.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_SegCalcVertex::ValueNode_SegCalcVertex(const ValueBase::Type &x): + LinkableValueNode(x) +{ + if(x!=ValueBase::TYPE_VECTOR) + throw Exception::BadType(ValueBase::type_local_name(x)); + + set_link("segment",ValueNode_Const::create(ValueBase::TYPE_SEGMENT)); + set_link("amount",ValueNode_Const::create(Real(0.5))); +} + +ValueNode_SegCalcVertex* +ValueNode_SegCalcVertex::create(const ValueBase &x) +{ + return new ValueNode_SegCalcVertex(x.get_type()); +} + +ValueNode_SegCalcVertex::~ValueNode_SegCalcVertex() +{ + unlink_all(); +} + +ValueBase +ValueNode_SegCalcVertex::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + Segment segment((*segment_)(t).get(Segment())); + + etl::hermite curve(segment.p1,segment.p2,segment.t1,segment.t2); + + return curve((*amount_)(t).get(Real())); +} + + +String +ValueNode_SegCalcVertex::get_name()const +{ + return "segcalcvertex"; +} + +String +ValueNode_SegCalcVertex::get_local_name()const +{ + return _("Segment Vertex"); +} + +bool +ValueNode_SegCalcVertex::check_type(ValueBase::Type type) +{ + return type==ValueBase::TYPE_VECTOR; +} + +bool +ValueNode_SegCalcVertex::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + +// static Handle create(const ValueBase::Type &x=ValueBase::TYPE_VECTOR); + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_SegCalcVertex(); + + virtual String get_name()const; + virtual String get_local_name()const; +// static bool check_type(const ValueBase::Type &type); + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_SegCalcVertex* create(const ValueBase &x=ValueBase::TYPE_VECTOR); +}; // END of class ValueNode_SegCalcVertex + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_sine.cpp b/synfig-core/src/synfig/valuenode_sine.cpp new file mode 100644 index 0000000..6e42dc7 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_sine.cpp @@ -0,0 +1,183 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_sine.cpp +** \brief Implementation of the "Sine" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_sine.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Sine::ValueNode_Sine(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + switch(value.get_type()) + { + case ValueBase::TYPE_REAL: + set_link("angle",ValueNode_Const::create(Angle::deg(90))); + set_link("amp",ValueNode_Const::create(value.get(Real()))); + break; + default: + throw Exception::BadType(ValueBase::type_local_name(value.get_type())); + } + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_Sine::create_new()const +{ + return new ValueNode_Sine(get_type()); +} + +ValueNode_Sine* +ValueNode_Sine::create(const ValueBase &x) +{ + return new ValueNode_Sine(x); +} + +ValueNode_Sine::~ValueNode_Sine() +{ + unlink_all(); +} + +ValueBase +ValueNode_Sine::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + return + Angle::sin( + (*angle_)(t).get(Angle()) + ).get() * (*amp_)(t).get(Real()) + ; +} + + +String +ValueNode_Sine::get_name()const +{ + return "sine"; +} + +String +ValueNode_Sine::get_local_name()const +{ + return _("Sine"); +} + +bool +ValueNode_Sine::check_type(ValueBase::Type type) +{ + return type==ValueBase::TYPE_REAL; +} + +bool +ValueNode_Sine::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_Sine(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Sine* create(const ValueBase &x); +}; // END of class ValueNode_Sine + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_step.cpp b/synfig-core/src/synfig/valuenode_step.cpp new file mode 100644 index 0000000..98d9d80 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_step.cpp @@ -0,0 +1,234 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_step.cpp +** \brief Implementation of the "Step" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_step.h" +#include "valuenode_const.h" +#include "general.h" +#include "color.h" +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Step::ValueNode_Step(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + set_link("duration", ValueNode_Const::create(Time(1))); + set_link("start_time", ValueNode_Const::create(Time(0))); + set_link("intersection", ValueNode_Const::create(Real(0.5))); + + switch(get_type()) + { + case ValueBase::TYPE_ANGLE: + set_link("link",ValueNode_Const::create(value.get(Angle()))); + break; + case ValueBase::TYPE_COLOR: + set_link("link",ValueNode_Const::create(value.get(Color()))); + break; + case ValueBase::TYPE_INTEGER: + set_link("link",ValueNode_Const::create(value.get(int()))); + break; + case ValueBase::TYPE_REAL: + set_link("link",ValueNode_Const::create(value.get(Real()))); + break; + case ValueBase::TYPE_TIME: + set_link("link",ValueNode_Const::create(value.get(Time()))); + break; + case ValueBase::TYPE_VECTOR: + set_link("link",ValueNode_Const::create(value.get(Vector()))); + break; + default: + throw Exception::BadType(ValueBase::type_local_name(get_type())); + } + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_Step::create_new()const +{ + return new ValueNode_Step(get_type()); +} + +ValueNode_Step* +ValueNode_Step::create(const ValueBase &x) +{ + return new ValueNode_Step(x); +} + +ValueNode_Step::~ValueNode_Step() +{ + unlink_all(); +} + +ValueBase +ValueNode_Step::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + Time duration ((*duration_ )(t).get(Time())); + Time start_time ((*start_time_ )(t).get(Time())); + Real intersection((*intersection_)(t).get(Real())); + + t = (floor((t - start_time) / duration) + intersection) * duration + start_time; + + switch(get_type()) + { + case ValueBase::TYPE_ANGLE: return (*link_)(t).get( Angle()); + case ValueBase::TYPE_COLOR: return (*link_)(t).get( Color()); + case ValueBase::TYPE_INTEGER: return (*link_)(t).get( int()); + case ValueBase::TYPE_REAL: return (*link_)(t).get( Real()); + case ValueBase::TYPE_TIME: return (*link_)(t).get( Time()); + case ValueBase::TYPE_VECTOR: return (*link_)(t).get(Vector()); + default: + assert(0); + return ValueBase(); + } +} + + +String +ValueNode_Step::get_name()const +{ + return "step"; +} + +String +ValueNode_Step::get_local_name()const +{ + return _("Step"); +} + +bool +ValueNode_Step::check_type(ValueBase::Type type) +{ + return + type==ValueBase::TYPE_ANGLE || + type==ValueBase::TYPE_COLOR || + type==ValueBase::TYPE_INTEGER || + type==ValueBase::TYPE_REAL || + type==ValueBase::TYPE_TIME || + type==ValueBase::TYPE_VECTOR ; +} + +bool +ValueNode_Step::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_Step(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Step* create(const ValueBase &x); +}; // END of class ValueNode_Step + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_stripes.cpp b/synfig-core/src/synfig/valuenode_stripes.cpp new file mode 100644 index 0000000..ce4b694 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_stripes.cpp @@ -0,0 +1,235 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_stripes.cpp +** \brief Implementation of the "Stripes" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "general.h" +#include "valuenode_stripes.h" +#include "valuenode_const.h" +#include +#include "color.h" +#include "gradient.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +synfig::ValueNode_Stripes::ValueNode_Stripes():LinkableValueNode(synfig::ValueBase::TYPE_GRADIENT) +{ + set_link("color1",ValueNode_Const::create(Color::alpha())); + set_link("color2",ValueNode_Const::create(Color::black())); + set_link("stripes",stripes_=ValueNode_Const::create(int(5))); + set_link("width",ValueNode_Const::create(0.5)); +} + +LinkableValueNode* +ValueNode_Stripes::create_new()const +{ + return new ValueNode_Stripes(); +} + +ValueNode_Stripes* +ValueNode_Stripes::create(const ValueBase& x) +{ + ValueBase::Type id(x.get_type()); + + if(id!=ValueBase::TYPE_GRADIENT) + { + assert(0); + throw runtime_error(String(_("Stripes"))+_(":Bad type ")+ValueBase::type_local_name(id)); + } + + ValueNode_Stripes* value_node=new ValueNode_Stripes(); + + assert(value_node->get_type()==id); + + return value_node; +} + +synfig::ValueNode_Stripes::~ValueNode_Stripes() +{ + unlink_all(); +} + +synfig::ValueBase +synfig::ValueNode_Stripes::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + const int total((*stripes_)(t).get(int())); + int i; + Gradient ret; + + if(total<=0) + return ret; + + const Color color1((*color1_)(t).get(Color())); + const Color color2((*color2_)(t).get(Color())); + const float width(max(0.0,min(1.0,(*width_)(t).get(Real())))); + + const float stripe_width_a(width/total); + const float stripe_width_b((1.0-width)/total); + + for(i=0;i=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + +protected: + + ValueNode_Stripes(); + +private: + + ValueNode::RHandle color1_; + ValueNode::RHandle color2_; + ValueNode::RHandle stripes_; + ValueNode::RHandle width_; + +public: + + virtual ~ValueNode_Stripes(); + + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + + virtual int link_count()const; + + virtual String link_local_name(int i)const; + virtual String link_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + + virtual ValueBase operator()(Time t)const; + + virtual String get_name()const; + virtual String get_local_name()const; + +// static bool check_type(const ValueBase::Type &type); + + LinkableValueNode* create_new()const; + +public: + using synfig::LinkableValueNode::get_link_vfunc; + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Stripes* create(const ValueBase &x=ValueBase::TYPE_GRADIENT); +}; // END of class ValueNode_Stripes + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_subtract.cpp b/synfig-core/src/synfig/valuenode_subtract.cpp new file mode 100644 index 0000000..3ba475e --- /dev/null +++ b/synfig-core/src/synfig/valuenode_subtract.cpp @@ -0,0 +1,249 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_subtract.cpp +** \brief Implementation of the "Subtract" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "general.h" +#include "valuenode_subtract.h" +#include "valuenode_const.h" +#include +#include "color.h" +#include "gradient.h" +#include "vector.h" +#include "angle.h" +#include "real.h" +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +synfig::ValueNode_Subtract::ValueNode_Subtract(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + set_link("scalar",ValueNode_Const::create(Real(1.0))); + ValueBase::Type id(value.get_type()); + + switch(id) + { + case ValueBase::TYPE_ANGLE: + set_link("lhs",ValueNode_Const::create(value.get(Angle()))); + set_link("rhs",ValueNode_Const::create(Angle::deg(0))); + break; + case ValueBase::TYPE_COLOR: + set_link("lhs",ValueNode_Const::create(value.get(Color()))); + set_link("rhs",ValueNode_Const::create(Color(0,0,0,0))); + break; + case ValueBase::TYPE_GRADIENT: + set_link("lhs",ValueNode_Const::create(value.get(Gradient()))); + set_link("rhs",ValueNode_Const::create(Gradient())); + break; + case ValueBase::TYPE_INTEGER: + set_link("lhs",ValueNode_Const::create(value.get(int()))); + set_link("rhs",ValueNode_Const::create(int(0))); + break; + case ValueBase::TYPE_REAL: + set_link("lhs",ValueNode_Const::create(value.get(Real()))); + set_link("rhs",ValueNode_Const::create(Real(0))); + break; + case ValueBase::TYPE_TIME: + set_link("lhs",ValueNode_Const::create(value.get(Time()))); + set_link("rhs",ValueNode_Const::create(Time(0))); + break; + case ValueBase::TYPE_VECTOR: + set_link("lhs",ValueNode_Const::create(value.get(Vector()))); + set_link("rhs",ValueNode_Const::create(Vector(0,0))); + break; + default: + assert(0); + throw runtime_error(get_local_name()+_(":Bad type ")+ValueBase::type_local_name(id)); + } + + assert(ref_a->get_type()==id); + assert(ref_b->get_type()==id); + assert(get_type()==id); + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_Subtract::create_new()const +{ + return new ValueNode_Subtract(get_type()); +} + +ValueNode_Subtract* +ValueNode_Subtract::create(const ValueBase& value) +{ + return new ValueNode_Subtract(value); +} + +synfig::ValueNode_Subtract::~ValueNode_Subtract() +{ + unlink_all(); +} + +synfig::ValueBase +synfig::ValueNode_Subtract::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + if(!ref_a || !ref_b) + throw runtime_error(strprintf("ValueNode_Subtract: %s",_("One or both of my parameters aren't set!"))); + switch(get_type()) + { + case ValueBase::TYPE_ANGLE: + return ((*ref_a)(t).get(Angle())-(*ref_b)(t).get(Angle()))*(*scalar)(t).get(Real()); + case ValueBase::TYPE_COLOR: + return ((*ref_a)(t).get(Color())-(*ref_b)(t).get(Color()))*(*scalar)(t).get(Real()); + case ValueBase::TYPE_GRADIENT: + return ((*ref_a)(t).get(Gradient())-(*ref_b)(t).get(Gradient()))*(*scalar)(t).get(Real()); + case ValueBase::TYPE_INTEGER: + return round_to_int(((*ref_a)(t).get(int())-(*ref_b)(t).get(int()))*(*scalar)(t).get(Real())); + case ValueBase::TYPE_REAL: + return ((*ref_a)(t).get(Vector::value_type())-(*ref_b)(t).get(Vector::value_type()))*(*scalar)(t).get(Real()); + case ValueBase::TYPE_TIME: + return ((*ref_a)(t).get(Time())-(*ref_b)(t).get(Time()))*(*scalar)(t).get(Real()); + case ValueBase::TYPE_VECTOR: + return ((*ref_a)(t).get(Vector())-(*ref_b)(t).get(Vector()))*(*scalar)(t).get(Real()); + default: + assert(0); + break; + } + return ValueBase(); +} + +bool +ValueNode_Subtract::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + +protected: + ValueNode_Subtract(const ValueBase &value); + +private: + ValueNode::RHandle ref_a; + ValueNode::RHandle ref_b; + ValueNode::RHandle scalar; + +public: + LinkableValueNode* create_new()const; + static ValueNode_Subtract* create(const ValueBase &value=ValueBase()); + virtual ~ValueNode_Subtract(); + virtual ValueBase operator()(Time t)const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_local_name(int i)const; + virtual String link_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + virtual String get_name()const; + virtual String get_local_name()const; + static bool check_type(ValueBase::Type type); + + //! Gets the left-hand-side value_node + ValueNode::Handle get_lhs()const { return ref_a; } + + //! Gets the right-hand-side value_node + ValueNode::Handle get_rhs()const { return ref_b; } + + //! Gets the scalar value_node + ValueNode::Handle get_scalar()const { return scalar; } + +}; // END of class ValueNode_Subtract + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_switch.cpp b/synfig-core/src/synfig/valuenode_switch.cpp new file mode 100644 index 0000000..195bd95 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_switch.cpp @@ -0,0 +1,182 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_switch.cpp +** \brief Implementation of the "Switch" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_switch.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_Switch::ValueNode_Switch(const ValueBase::Type &x): + LinkableValueNode(x) +{ +} + +ValueNode_Switch::ValueNode_Switch(const ValueNode::Handle &x): + LinkableValueNode(x->get_type()) +{ + set_link("link_off",x); + set_link("link_on",x); + set_link("switch",ValueNode_Const::create(bool(false))); +} + +ValueNode_Switch* +ValueNode_Switch::create(const ValueBase &x) +{ + return new ValueNode_Switch(ValueNode_Const::create(x)); +} + +LinkableValueNode* +ValueNode_Switch::create_new()const +{ + return new ValueNode_Switch(get_type()); +} + +ValueNode_Switch::~ValueNode_Switch() +{ + unlink_all(); +} + +bool +ValueNode_Switch::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + ValueNode_Switch(const ValueBase::Type &x); + + ValueNode_Switch(const ValueNode::Handle &x); + +// static Handle create(const ValueBase::Type &x); +// static Handle create(const ValueNode::Handle &x); + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + + virtual int link_count()const; + + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_Switch(); + + virtual String get_name()const; + + virtual String get_local_name()const; + +protected: + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + + LinkableValueNode* create_new()const; + +public: + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_Switch* create(const ValueBase &x); +}; // END of class ValueNode_Switch + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_timedswap.cpp b/synfig-core/src/synfig/valuenode_timedswap.cpp new file mode 100644 index 0000000..378535a --- /dev/null +++ b/synfig-core/src/synfig/valuenode_timedswap.cpp @@ -0,0 +1,280 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_timedswap.cpp +** \brief Implementation of the "Timed Swap" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "general.h" +#include "valuenode_timedswap.h" +#include "valuenode_const.h" +#include +#include "color.h" +#include + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_TimedSwap::ValueNode_TimedSwap(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + switch(get_type()) + { + case ValueBase::TYPE_ANGLE: + set_link("before",ValueNode_Const::create(value.get(Angle()))); + set_link("after",ValueNode_Const::create(value.get(Angle()))); + break; + case ValueBase::TYPE_COLOR: + set_link("before",ValueNode_Const::create(value.get(Color()))); + set_link("after",ValueNode_Const::create(value.get(Color()))); + break; + case ValueBase::TYPE_INTEGER: + set_link("before",ValueNode_Const::create(value.get(int()))); + set_link("after",ValueNode_Const::create(value.get(int()))); + break; + case ValueBase::TYPE_REAL: + set_link("before",ValueNode_Const::create(value.get(Real()))); + set_link("after",ValueNode_Const::create(value.get(Real()))); + break; + case ValueBase::TYPE_TIME: + set_link("before",ValueNode_Const::create(value.get(Time()))); + set_link("after",ValueNode_Const::create(value.get(Time()))); + break; + case ValueBase::TYPE_VECTOR: + set_link("before",ValueNode_Const::create(value.get(Vector()))); + set_link("after",ValueNode_Const::create(value.get(Vector()))); + break; + default: + throw Exception::BadType(ValueBase::type_local_name(get_type())); + } + + set_link("time",ValueNode_Const::create(Time(2))); + set_link("length",ValueNode_Const::create(Time(1))); + + DCAST_HACK_ENABLE(); +} + +ValueNode_TimedSwap* +ValueNode_TimedSwap::create(const ValueBase& x) +{ + return new ValueNode_TimedSwap(x); +} + +LinkableValueNode* +ValueNode_TimedSwap::create_new()const +{ + return new ValueNode_TimedSwap(get_type()); +} + +synfig::ValueNode_TimedSwap::~ValueNode_TimedSwap() +{ + unlink_all(); +} + +synfig::ValueBase +synfig::ValueNode_TimedSwap::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + Time swptime=(*swap_time)(t).get(Time()); + Time swplength=(*swap_length)(t).get(Time()); + + if(t>swptime) + return (*after)(t); + + if(t<=swptime && t>swptime-swplength) + { + Real amount=(swptime-t)/swplength; + // if amount==0.0, then we are after + // if amount==1.0, then we are before + + switch(get_type()) + { + case ValueBase::TYPE_ANGLE: + { + Angle a=(*after)(t).get(Angle()); + Angle b=(*before)(t).get(Angle()); + return (b-a)*amount+a; + } + case ValueBase::TYPE_COLOR: + { + Color a=(*after)(t).get(Color()); + Color b=(*before)(t).get(Color()); + // note: Shouldn't this use a straight blend? + return (b-a)*amount+a; + } + case ValueBase::TYPE_INTEGER: + { + float a=(float)(*after)(t).get(int()); + float b=(float)(*before)(t).get(int()); + return round_to_int((b-a)*amount+a); + } + case ValueBase::TYPE_REAL: + { + Real a=(*after)(t).get(Real()); + Real b=(*before)(t).get(Real()); + return (b-a)*amount+a; + } + case ValueBase::TYPE_TIME: + { + Time a=(*after)(t).get(Time()); + Time b=(*before)(t).get(Time()); + return (b-a)*amount+a; + } + case ValueBase::TYPE_VECTOR: + { + Vector a=(*after)(t).get(Vector()); + Vector b=(*before)(t).get(Vector()); + return (b-a)*amount+a; + } + default: + break; + } + } + + /*! \todo this should interpolate from + ** before to after over the period defined + ** by swap_length */ + + return (*before)(t); +} + +bool +ValueNode_TimedSwap::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + +private: + + ValueNode::RHandle before; + ValueNode::RHandle after; + ValueNode::RHandle swap_time; + ValueNode::RHandle swap_length; + + ValueNode_TimedSwap(const ValueBase &value); + +public: + +// static Handle create(ValueBase::Type id); + + virtual ~ValueNode_TimedSwap(); + + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_local_name(int i)const; + virtual String link_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + + virtual ValueBase operator()(Time t)const; + + virtual String get_name()const; + virtual String get_local_name()const; +// static bool check_type(const ValueBase::Type &type); + +protected: + + virtual LinkableValueNode* create_new()const; + +public: + using synfig::LinkableValueNode::get_link_vfunc; + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_TimedSwap* create(const ValueBase &x); +}; // END of class ValueNode_TimedSwap + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_timeloop.cpp b/synfig-core/src/synfig/valuenode_timeloop.cpp new file mode 100644 index 0000000..60ba1a0 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_timeloop.cpp @@ -0,0 +1,200 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_timeloop.cpp +** \brief Implementation of the "Time Loop" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_timeloop.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_TimeLoop::ValueNode_TimeLoop(const ValueBase::Type &x): + LinkableValueNode(x) +{ +} + +ValueNode_TimeLoop::ValueNode_TimeLoop(const ValueNode::Handle &x): + LinkableValueNode(x->get_type()) +{ + set_link("link", x); + set_link("link_time", ValueNode_Const::create(Time(0))); + set_link("local_time", ValueNode_Const::create(Time(0))); + set_link("duration", ValueNode_Const::create(Time(1))); +} + +ValueNode_TimeLoop* +ValueNode_TimeLoop::create(const ValueBase &x) +{ + return new ValueNode_TimeLoop(ValueNode_Const::create(x)); +} + +LinkableValueNode* +ValueNode_TimeLoop::create_new()const +{ + return new ValueNode_TimeLoop(get_type()); +} + +ValueNode_TimeLoop::~ValueNode_TimeLoop() +{ + unlink_all(); +} + +bool +ValueNode_TimeLoop::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i 0) + { + t -= local_time; + t -= floor(t / duration) * duration; + t = link_time + t; + } + else + { + duration = -duration; + t -= local_time; + t -= floor(t / duration) * duration; + t = link_time - t; + } + + return (*link_)(t); +} + +String +ValueNode_TimeLoop::get_name()const +{ + return "timeloop"; +} + +String +ValueNode_TimeLoop::get_local_name()const +{ + return _("Time Loop"); +} + +bool +ValueNode_TimeLoop::check_type(ValueBase::Type type) +{ + if(type) + return true; + return false; +} diff --git a/synfig-core/src/synfig/valuenode_timeloop.h b/synfig-core/src/synfig/valuenode_timeloop.h new file mode 100644 index 0000000..f237d7b --- /dev/null +++ b/synfig-core/src/synfig/valuenode_timeloop.h @@ -0,0 +1,84 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_timeloop.h +** \brief Header file for implementation of the "TimeLoop" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_VALUENODE_TIMELOOP_H +#define __SYNFIG_VALUENODE_TIMELOOP_H + +/* === H E A D E R S ======================================================= */ + +#include "valuenode.h" + +/* === M A C R O S ========================================================= */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class ValueNode_TimeLoop : public LinkableValueNode +{ + ValueNode::RHandle link_; + ValueNode::RHandle link_time_; + ValueNode::RHandle local_time_; + ValueNode::RHandle duration_; + +public: + typedef etl::handle Handle; + typedef etl::handle ConstHandle; + + ValueNode_TimeLoop(const ValueBase::Type &x); + ValueNode_TimeLoop(const ValueNode::Handle &x); + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_TimeLoop(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_TimeLoop* create(const ValueBase &x); +}; // END of class ValueNode_TimeLoop + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_timestring.cpp b/synfig-core/src/synfig/valuenode_timestring.cpp new file mode 100644 index 0000000..a0808aa --- /dev/null +++ b/synfig-core/src/synfig/valuenode_timestring.cpp @@ -0,0 +1,189 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_timestring.cpp +** \brief Implementation of the "TimeString" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_timestring.h" +#include "valuenode_const.h" +#include "canvas.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_TimeString::ValueNode_TimeString(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + switch(value.get_type()) + { + case ValueBase::TYPE_STRING: + set_link("time",ValueNode_Const::create(Time(0))); + break; + default: + throw Exception::BadType(ValueBase::type_local_name(value.get_type())); + } + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_TimeString::create_new()const +{ + return new ValueNode_TimeString(get_type()); +} + +ValueNode_TimeString* +ValueNode_TimeString::create(const ValueBase &x) +{ + return new ValueNode_TimeString(x); +} + +ValueNode_TimeString::~ValueNode_TimeString() +{ + unlink_all(); +} + +ValueBase +ValueNode_TimeString::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + Time time((*time_)(t).get(Time())); + + switch (get_type()) + { + case ValueBase::TYPE_STRING: + if (get_root_canvas()) + return time.get_string(get_root_canvas()->rend_desc().get_frame_rate()); + else + return time.get_string(); + default: + break; + } + + assert(0); + return ValueBase(); +} + +String +ValueNode_TimeString::get_name()const +{ + return "timestring"; +} + +String +ValueNode_TimeString::get_local_name()const +{ + return _("Time String"); +} + +bool +ValueNode_TimeString::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_TimeString(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_TimeString* create(const ValueBase &x); +}; // END of class ValueNode_TimeString + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_twotone.cpp b/synfig-core/src/synfig/valuenode_twotone.cpp new file mode 100644 index 0000000..3c18ce0 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_twotone.cpp @@ -0,0 +1,189 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_twotone.cpp +** \brief Implementation of the "Two-Tone" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "general.h" +#include "valuenode_twotone.h" +#include "valuenode_const.h" +#include +#include "color.h" +#include "gradient.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +synfig::ValueNode_TwoTone::ValueNode_TwoTone(const ValueBase &value):LinkableValueNode(synfig::ValueBase::TYPE_GRADIENT) +{ + switch(value.get_type()) + { + case ValueBase::TYPE_GRADIENT: + set_link("color1",ValueNode_Const::create(value.get(Gradient())(0))); + set_link("color2",ValueNode_Const::create(value.get(Gradient())(1))); + break; + default: + throw Exception::BadType(ValueBase::type_local_name(value.get_type())); + } + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_TwoTone::create_new()const +{ + return new ValueNode_TwoTone(get_type()); +} + +ValueNode_TwoTone* +ValueNode_TwoTone::create(const ValueBase& x) +{ + return new ValueNode_TwoTone(x); +} + +synfig::ValueNode_TwoTone::~ValueNode_TwoTone() +{ + unlink_all(); +} + +synfig::ValueBase +synfig::ValueNode_TwoTone::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + return Gradient((*ref_a)(t).get(Color()),(*ref_b)(t).get(Color())); +} + +bool +ValueNode_TwoTone::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + virtual ~ValueNode_TwoTone(); + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + + virtual int link_count()const; + + virtual String link_local_name(int i)const; + virtual String link_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + + virtual ValueBase operator()(Time t)const; + + virtual String get_name()const; + virtual String get_local_name()const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_TwoTone* create(const ValueBase &x); +}; // END of class ValueNode_TwoTone + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_vectorangle.cpp b/synfig-core/src/synfig/valuenode_vectorangle.cpp new file mode 100644 index 0000000..c339d2f --- /dev/null +++ b/synfig-core/src/synfig/valuenode_vectorangle.cpp @@ -0,0 +1,169 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_vectorangle.cpp +** \brief Implementation of the "Vector Angle" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_vectorangle.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_VectorAngle::ValueNode_VectorAngle(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + switch(value.get_type()) + { + case ValueBase::TYPE_ANGLE: + set_link("vector",ValueNode_Const::create(Vector(Angle::cos(value.get(Angle())).get(), + Angle::sin(value.get(Angle())).get()))); + break; + default: + throw Exception::BadType(ValueBase::type_local_name(value.get_type())); + } + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_VectorAngle::create_new()const +{ + return new ValueNode_VectorAngle(get_type()); +} + +ValueNode_VectorAngle* +ValueNode_VectorAngle::create(const ValueBase &x) +{ + return new ValueNode_VectorAngle(x); +} + +ValueNode_VectorAngle::~ValueNode_VectorAngle() +{ + unlink_all(); +} + +ValueBase +ValueNode_VectorAngle::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + return (*vector_)(t).get(Vector()).angle(); +} + + +bool +ValueNode_VectorAngle::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_VectorAngle(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_VectorAngle* create(const ValueBase &x); +}; // END of class ValueNode_VectorAngle + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_vectorlength.cpp b/synfig-core/src/synfig/valuenode_vectorlength.cpp new file mode 100644 index 0000000..5d85f98 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_vectorlength.cpp @@ -0,0 +1,168 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_vectorlength.cpp +** \brief Implementation of the "Vector Length" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_vectorlength.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_VectorLength::ValueNode_VectorLength(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + switch(value.get_type()) + { + case ValueBase::TYPE_REAL: + set_link("vector",ValueNode_Const::create(Vector(value.get(Real()), 0))); + break; + default: + throw Exception::BadType(ValueBase::type_local_name(value.get_type())); + } + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_VectorLength::create_new()const +{ + return new ValueNode_VectorLength(get_type()); +} + +ValueNode_VectorLength* +ValueNode_VectorLength::create(const ValueBase &x) +{ + return new ValueNode_VectorLength(x); +} + +ValueNode_VectorLength::~ValueNode_VectorLength() +{ + unlink_all(); +} + +ValueBase +ValueNode_VectorLength::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + return (*vector_)(t).get(Vector()).mag(); +} + + +bool +ValueNode_VectorLength::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_VectorLength(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_VectorLength* create(const ValueBase &x); +}; // END of class ValueNode_VectorLength + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_vectorx.cpp b/synfig-core/src/synfig/valuenode_vectorx.cpp new file mode 100644 index 0000000..48f9180 --- /dev/null +++ b/synfig-core/src/synfig/valuenode_vectorx.cpp @@ -0,0 +1,168 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_vectorx.cpp +** \brief Implementation of the "Vector X" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_vectorx.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_VectorX::ValueNode_VectorX(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + switch(value.get_type()) + { + case ValueBase::TYPE_REAL: + set_link("vector",ValueNode_Const::create(Vector(value.get(Real()), 0))); + break; + default: + throw Exception::BadType(ValueBase::type_local_name(value.get_type())); + } + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_VectorX::create_new()const +{ + return new ValueNode_VectorX(get_type()); +} + +ValueNode_VectorX* +ValueNode_VectorX::create(const ValueBase &x) +{ + return new ValueNode_VectorX(x); +} + +ValueNode_VectorX::~ValueNode_VectorX() +{ + unlink_all(); +} + +ValueBase +ValueNode_VectorX::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + return (*vector_)(t).get(Vector())[0]; +} + + +bool +ValueNode_VectorX::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_VectorX(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_VectorX* create(const ValueBase &x); +}; // END of class ValueNode_VectorX + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/valuenode_vectory.cpp b/synfig-core/src/synfig/valuenode_vectory.cpp new file mode 100644 index 0000000..4063eae --- /dev/null +++ b/synfig-core/src/synfig/valuenode_vectory.cpp @@ -0,0 +1,168 @@ +/* === S Y N F I G ========================================================= */ +/*! \file valuenode_vectory.cpp +** \brief Implementation of the "Vector Y" valuenode conversion. +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "valuenode_vectory.h" +#include "valuenode_const.h" +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +ValueNode_VectorY::ValueNode_VectorY(const ValueBase &value): + LinkableValueNode(value.get_type()) +{ + switch(value.get_type()) + { + case ValueBase::TYPE_REAL: + set_link("vector",ValueNode_Const::create(Vector(0, value.get(Real())))); + break; + default: + throw Exception::BadType(ValueBase::type_local_name(value.get_type())); + } + + DCAST_HACK_ENABLE(); +} + +LinkableValueNode* +ValueNode_VectorY::create_new()const +{ + return new ValueNode_VectorY(get_type()); +} + +ValueNode_VectorY* +ValueNode_VectorY::create(const ValueBase &x) +{ + return new ValueNode_VectorY(x); +} + +ValueNode_VectorY::~ValueNode_VectorY() +{ + unlink_all(); +} + +ValueBase +ValueNode_VectorY::operator()(Time t)const +{ + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + + return (*vector_)(t).get(Vector())[1]; +} + + +bool +ValueNode_VectorY::set_link_vfunc(int i,ValueNode::Handle value) +{ + assert(i>=0 && i=0 && i=0 && i=0 && i Handle; + typedef etl::handle ConstHandle; + + + virtual ValueBase operator()(Time t)const; + + virtual ~ValueNode_VectorY(); + + virtual String get_name()const; + virtual String get_local_name()const; + + + virtual ValueNode::LooseHandle get_link_vfunc(int i)const; + virtual int link_count()const; + virtual String link_name(int i)const; + + virtual String link_local_name(int i)const; + virtual int get_link_index_from_name(const String &name)const; + +protected: + LinkableValueNode* create_new()const; + virtual bool set_link_vfunc(int i,ValueNode::Handle x); + +public: + using synfig::LinkableValueNode::get_link_vfunc; + + using synfig::LinkableValueNode::set_link_vfunc; + static bool check_type(ValueBase::Type type); + static ValueNode_VectorY* create(const ValueBase &x); +}; // END of class ValueNode_VectorY + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/vector.h b/synfig-core/src/synfig/vector.h new file mode 100644 index 0000000..46baff8 --- /dev/null +++ b/synfig-core/src/synfig/vector.h @@ -0,0 +1,290 @@ +/* === S Y N F I G ========================================================= */ +/*! \file vector.h +** \brief Various discreet type definitions +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_VECTOR_H +#define __SYNFIG_VECTOR_H + +/* === H E A D E R S ======================================================= */ + +#include "angle.h" +#include "real.h" +#include + +/* === M A C R O S ========================================================= */ + + +#ifdef WIN32 +#include +#ifndef isnan +extern "C" { int _isnan(double x); } +#define isnan _isnan +#endif +#endif + +// For some reason isnan() isn't working on macosx any more. +// This is a quick fix. +#if defined(__APPLE__) && !defined(SYNFIG_ISNAN_FIX) +#ifdef isnan +#undef isnan +#endif +inline bool isnan(double x) { return x != x; } +inline bool isnan(float x) { return x != x; } +#define SYNFIG_ISNAN_FIX 1 +#endif + + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +/*! \class Vector +** \todo writeme +*/ +class Vector +{ +public: + typedef Real value_type; + +private: + value_type _x, _y; + +public: + Vector(): _x(0.0), _y(0.0) { }; + Vector(const value_type &x, const value_type &y):_x(x),_y(y) { }; + + bool is_valid()const { return !(isnan(_x) || isnan(_y)); } + + value_type & + operator[](const int& i) + { return i?_y:_x; } + + const value_type & + operator[](const int& i) const + { return i?_y:_x; } + + const Vector & + operator+=(const Vector &rhs) + { + _x+=rhs._x; + _y+=rhs._y; + return *this; + } + + const Vector & + operator-=(const Vector &rhs) + { + _x-=rhs._x; + _y-=rhs._y; + return *this; + } + + const Vector & + operator*=(const value_type &rhs) + { + _x*=rhs; + _y*=rhs; + return *this; + } + + const Vector & + operator/=(const value_type &rhs) + { + value_type tmp=1.0/rhs; + _x*=tmp; + _y*=tmp; + return *this; + } + + Vector + operator+(const Vector &rhs)const + { return Vector(*this)+=rhs; } + + Vector + operator-(const Vector &rhs)const + { return Vector(*this)-=rhs; } + + Vector + operator*(const value_type &rhs)const + { return Vector(*this)*=rhs; } + + Vector + operator/(const value_type &rhs)const + { return Vector(*this)/=rhs; } + + Vector + operator-()const + { return Vector(-_x,-_y); } + + value_type + operator*(const Vector &rhs)const + { return _x*rhs._x+_y*rhs._y; } + + bool + operator==(const Vector &rhs)const + { return _x==rhs._x && _y==rhs._y; } + + bool + operator!=(const Vector &rhs)const + { return _y!=rhs._y || _x!=rhs._x; } + + //! Returns the squared magnitude of the vector + value_type mag_squared()const + { return _x*_x+_y*_y; } + + //! Returns the magnitude of the vector + value_type mag()const + { return sqrt(mag_squared()); } + + //! Returns the reciprocal of the magnitude of the vector + value_type inv_mag()const + { return 1.0/sqrt(mag_squared()); } + + //! Returns a normalized version of the vector + Vector norm()const + { return (*this)*inv_mag(); } + + //! Returns a perpendicular version of the vector + Vector perp()const + { return Vector(_y,-_x); } + + Angle angle()const + { return Angle::rad(atan2(_y, _x)); } + + bool is_equal_to(const Vector& rhs)const + { + static const value_type epsilon(0.0000000000001); +// return (_x>rhs._x)?_x-rhs._x<=epsilon:rhs._x-_x<=epsilon && (_y>rhs._y)?_y-rhs._y<=epsilon:rhs._y-_y<=epsilon; + return (*this-rhs).mag_squared()<=epsilon; + } + + static const Vector zero() { return Vector(0,0); } +}; + +/*! \typedef Point +** \todo writeme +*/ +typedef Vector Point; + + + +}; // END of namespace synfig + +namespace std { + +inline synfig::Vector::value_type +abs(const synfig::Vector &rhs) + { return rhs.mag(); } + +}; // END of namespace std + +#include + +_ETL_BEGIN_NAMESPACE + +template <> +class bezier_base : public std::unary_function +{ +public: + typedef synfig::Vector value_type; + typedef float time_type; +private: + + bezier_base bezier_x,bezier_y; + + value_type a,b,c,d; + +protected: + affine_combo affine_func; + +public: + bezier_base() { } + bezier_base( + const value_type &a, const value_type &b, const value_type &c, const value_type &d, + const time_type &r=0.0, const time_type &s=1.0): + a(a),b(b),c(c),d(d) { set_rs(r,s); sync(); } + + void sync() + { + bezier_x[0]=a[0],bezier_y[0]=a[1]; + bezier_x[1]=b[0],bezier_y[1]=b[1]; + bezier_x[2]=c[0],bezier_y[2]=c[1]; + bezier_x[3]=d[0],bezier_y[3]=d[1]; + bezier_x.sync(); + bezier_y.sync(); + } + + value_type + operator()(time_type t)const + { + return synfig::Vector(bezier_x(t),bezier_y(t)); + } + + void evaluate(time_type t, value_type &f, value_type &df) const + { + t=(t-get_r())/get_dt(); + + const value_type p1 = affine_func( + affine_func(a,b,t), + affine_func(b,c,t) + ,t); + const value_type p2 = affine_func( + affine_func(b,c,t), + affine_func(c,d,t) + ,t); + + f = affine_func(p1,p2,t); + df = (p2-p1)*3; + } + + void set_rs(time_type new_r, time_type new_s) { bezier_x.set_rs(new_r,new_s); bezier_y.set_rs(new_r,new_s); } + void set_r(time_type new_r) { bezier_x.set_r(new_r); bezier_y.set_r(new_r); } + void set_s(time_type new_s) { bezier_x.set_s(new_s); bezier_y.set_s(new_s); } + const time_type &get_r()const { return bezier_x.get_r(); } + const time_type &get_s()const { return bezier_x.get_s(); } + time_type get_dt()const { return bezier_x.get_dt(); } + + value_type & + operator[](int i) + { return (&a)[i]; } + + const value_type & + operator[](int i) const + { return (&a)[i]; } + + //! Bezier curve intersection function + time_type intersect(const bezier_base &/*x*/, time_type /*near*/=0.0)const + { + return 0; + } +}; + +_ETL_END_NAMESPACE + + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/version.h b/synfig-core/src/synfig/version.h new file mode 100644 index 0000000..aba3cfd --- /dev/null +++ b/synfig-core/src/synfig/version.h @@ -0,0 +1,75 @@ +/* === S Y N F I G ========================================================= */ +/*! \file version.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_VERSION_H +#define __SYNFIG_VERSION_H + +/* === H E A D E R S ======================================================= */ + +/* === M A C R O S ========================================================= */ + +/*! \def SYNFIG_VERSION +** \brief Synfig API Version +** +** The macro SYNFIG_VERSION can be set to ensure +** compile-time compatibility with future versions +** of Synfig. The first two digits are the major +** version, the second two digits are the minor +** version, and the last two digits are the +** revision release. +*/ +#ifndef SYNFIG_VERSION +#define SYNFIG_VERSION (006000) +#endif + +/*! Increment this value whenever +** the library changes in a way +** that breaks library compatibility +*/ +#define SYNFIG_LIBRARY_VERSION 47 + +/*! \writeme */ +#define SYNFIG_CHECK_VERSION() synfig::check_version_(SYNFIG_LIBRARY_VERSION,sizeof(synfig::Vector),sizeof(synfig::Color),sizeof(synfig::Canvas),sizeof(synfig::Layer)) + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +//! Version checker \internal +/*! Checks to make sure that the library +** version matches with what the program +** was compiled against. +** \see SYNFIG_CHECK_VERSION() +*/ +extern bool check_version_(int v,int vec_size, int color_size,int canvas_size,int layer_size); + +extern const char *get_version(); + +extern const char *get_build_date(); + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/synfig/waypoint.cpp b/synfig-core/src/synfig/waypoint.cpp new file mode 100644 index 0000000..1befa6f --- /dev/null +++ b/synfig-core/src/synfig/waypoint.cpp @@ -0,0 +1,155 @@ +/* === S Y N F I G ========================================================= */ +/*! \file waypoint.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "waypoint.h" +#include "valuenode_const.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +Waypoint::Waypoint(ValueBase value, Time time): + priority_(0), + before(INTERPOLATION_TCB), + after(INTERPOLATION_TCB), + value_node(ValueNode_Const::create(value)), + time(time), + tension(0.0), + continuity(0.0), + bias(0), + time_tension(0.0f) +{ + if(value.get_type()==ValueBase::TYPE_ANGLE) + after=before=INTERPOLATION_LINEAR; +} + +Waypoint::Waypoint(etl::handle value_node, Time time): + priority_(0), + before(INTERPOLATION_TCB), + after(INTERPOLATION_TCB), + value_node(value_node), + time(time), + tension(0.0), + continuity(0), + bias(0), + time_tension(0.0f) +{ + if(value_node->get_type()==ValueBase::TYPE_ANGLE) + after=before=INTERPOLATION_LINEAR; +} + +Waypoint::Waypoint(): + priority_(0), + before(INTERPOLATION_TCB), + after(INTERPOLATION_TCB), + tension(0), + continuity(0), + bias(0), + time_tension(0.0f) +{ +} + +void +Waypoint::set_value(const ValueBase &x) +{ + if(!value_node && x.get_type()==ValueBase::TYPE_ANGLE) + after=before=INTERPOLATION_LINEAR; + + value_node=ValueNode_Const::create(x); +} + +void +Waypoint::set_value_node(const etl::handle &x) +{ + if(!value_node && x->get_type()==ValueBase::TYPE_ANGLE) + after=before=INTERPOLATION_LINEAR; + + value_node=x; +} + +bool +Waypoint::is_static()const +{ + return static_cast(ValueNode_Const::Handle::cast_dynamic(value_node)) && value_node && !value_node->is_exported(); +} + +void +Waypoint::set_time(const Time &x) +{ + time=x; +} + +void +Waypoint::apply_model(const Model &x) +{ + if(x.priority_flag) set_priority(x.get_priority()); + if(x.before_flag) set_before(x.get_before()); + if(x.after_flag) set_after(x.get_after()); + if(x.tension_flag) set_tension(x.get_tension()); + if(x.continuity_flag) set_continuity(x.get_continuity()); + if(x.bias_flag) set_bias(x.get_bias()); + if(x.temporal_tension_flag) set_temporal_tension(x.get_temporal_tension()); +} + +Waypoint +Waypoint::clone(const GUID& deriv_guid)const +{ + Waypoint ret(*this); + ret.make_unique(); + if(!ret.value_node->is_exported()) + ret.value_node=value_node->clone(deriv_guid); + ret.parent_=0; + return ret; +} + +ValueBase +Waypoint::get_value()const { return (*value_node)(0); } + +ValueBase +Waypoint::get_value(const Time &t)const { return (*value_node)(t); } + +synfig::GUID +Waypoint::get_guid()const +{ + return GUID::hasher(get_uid()); +} diff --git a/synfig-core/src/synfig/waypoint.h b/synfig-core/src/synfig/waypoint.h new file mode 100644 index 0000000..d94cf21 --- /dev/null +++ b/synfig-core/src/synfig/waypoint.h @@ -0,0 +1,267 @@ +/* === S Y N F I G ========================================================= */ +/*! \file waypoint.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** Copyright (c) 2008 Paul Wise +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_WAYPOINT_H +#define __SYNFIG_WAYPOINT_H + +/* === H E A D E R S ======================================================= */ + +#include "time.h" +#include "real.h" +#include "value.h" +//#include "valuenode.h" +#include "uniqueid.h" +#include +#include "guid.h" +#include "interpolation.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + +class ValueNode; +class GUID; + + +/*! \class Waypoint +** \brief \writeme +*/ +class Waypoint : public UniqueID +{ + /* + -- ** -- T Y P E S ----------------------------------------------------------- + */ + +public: + + typedef synfig::Interpolation Interpolation; + + class Model + { + friend class Waypoint; + + int priority; + Interpolation before; + Interpolation after; + Real tension; + Real continuity; + Real bias; + Real temporal_tension; + + bool priority_flag,before_flag,after_flag,tension_flag,continuity_flag,bias_flag,temporal_tension_flag; + + public: + Model(): + // we don't need to initialise these 5, but the compiler thinks they're used uninitialised if we don't + // and this constructor isn't called often, so it's ok + priority(0), before(INTERPOLATION_NIL), after(INTERPOLATION_NIL), tension(0), continuity(0), bias(0), temporal_tension(0), + + priority_flag(false), + before_flag(false), + after_flag(false), + tension_flag(false), + continuity_flag(false), + bias_flag(false), + temporal_tension_flag(false) { } + + Interpolation get_before()const { return before; } + void set_before(Interpolation x) { before=x; before_flag=true;} + + Interpolation get_after()const { return after; } + void set_after(Interpolation x) { after=x; after_flag=true;} + + const Real &get_tension()const { return tension; } + void set_tension(const Real &x) { tension=x; tension_flag=true;} + + const Real &get_continuity()const { return continuity; } + void set_continuity(const Real &x) { continuity=x; continuity_flag=true;} + + const Real &get_bias()const { return bias; } + void set_bias(const Real &x) { bias=x; bias_flag=true;} + + const Real &get_temporal_tension()const { return temporal_tension; } + void set_temporal_tension(const Real &x) { temporal_tension=x; temporal_tension_flag=true;} + + int get_priority()const { return priority; } + void set_priority(int x) { priority=x; priority_flag=true;} + + #define FLAG_MACRO(x) bool get_##x##_flag()const { return x##_flag; } void set_##x##_flag(bool y) { x##_flag=y; } + FLAG_MACRO(priority) + FLAG_MACRO(before) + FLAG_MACRO(after) + FLAG_MACRO(tension) + FLAG_MACRO(continuity) + FLAG_MACRO(bias) + FLAG_MACRO(temporal_tension) + #undef FLAG_MACRO + + void reset() + { + priority_flag=false; + before_flag=false; + after_flag=false; + tension_flag=false; + continuity_flag=false; + bias_flag=false; + temporal_tension_flag=false; + } + + bool is_trivial()const + { + return !( + priority_flag|| + before_flag|| + after_flag|| + tension_flag|| + continuity_flag|| + bias_flag|| + temporal_tension_flag + ); + } + }; + + enum Side + { + SIDE_UNSPECIFIED, SIDE_LEFT, SIDE_RIGHT, + + SIDE_END=2 //!< \internal + }; + + /* + -- ** -- D A T A ------------------------------------------------------------- + */ + +private: + + int priority_; + etl::loose_handle parent_; + + Interpolation before, after; + + etl::rhandle value_node; + + Time time; + + // The following are for the INTERPOLATION_TCB type + Real tension; + Real continuity; + Real bias; + + // The following are for the INTERPOLATION_MANUAL type + ValueBase cpoint_before,cpoint_after; + + + float time_tension; + + /* + -- ** -- C O N S T R U C T O R S --------------------------------------------- + */ + +public: + + Waypoint(ValueBase value, Time time); + Waypoint(etl::handle value_node, Time time); + + Waypoint(); + + /* + -- ** -- M E M B E R F U N C T I O N S ------------------------------------- + */ + +public: + + void apply_model(const Model &x); + + Interpolation get_before()const { return before; } + void set_before(Interpolation x) { before=x; } + + Interpolation get_after()const { return after; } + void set_after(Interpolation x) { after=x; } + + ValueBase get_value()const; + ValueBase get_value(const Time &t)const; + void set_value(const ValueBase &x); + + const etl::rhandle &get_value_node()const { return value_node; } + void set_value_node(const etl::handle &x); + + const Real &get_tension()const { return tension; } + void set_tension(const Real &x) { tension=x; } + + const Real &get_continuity()const { return continuity; } + void set_continuity(const Real &x) { continuity=x; } + + const Real &get_bias()const { return bias; } + void set_bias(const Real &x) { bias=x; } + + const Time &get_time()const { return time; } + void set_time(const Time &x); + + int get_priority()const { return priority_; } + void set_priority(int x) { priority_=x; } + + const etl::loose_handle &get_parent_value_node()const { return parent_; } + void set_parent_value_node(const etl::loose_handle &x) { parent_=x; } + + bool is_static()const; + + float get_temporal_tension()const { return time_tension; } + void set_temporal_tension(const float& x) { time_tension=x; } + + bool operator<(const Waypoint &rhs)const + { return time(const Time &rhs)const + { return time.is_more_than(rhs); } + + bool operator==(const Time &rhs)const + { return time.is_equal(rhs); } + bool operator!=(const Time &rhs)const + { return !time.is_equal(rhs); } + + bool operator==(const UniqueID &rhs)const + { return get_uid()==rhs.get_uid(); } + bool operator!=(const UniqueID &rhs)const + { return get_uid()!=rhs.get_uid(); } + + Waypoint clone(const GUID& deriv_guid=GUID())const; + + GUID get_guid()const; +}; // END of class Waypoint + +typedef std::vector< Waypoint > WaypointList; + +}; // END of namespace synfig + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/template.cpp b/synfig-core/src/template.cpp new file mode 100644 index 0000000..0adf303 --- /dev/null +++ b/synfig-core/src/template.cpp @@ -0,0 +1,54 @@ +/* === S Y N F I G ========================================================= */ +/*! \file template.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +/* +** Insert headers here +*/ + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + + diff --git a/synfig-core/src/template.h b/synfig-core/src/template.h new file mode 100644 index 0000000..124824c --- /dev/null +++ b/synfig-core/src/template.h @@ -0,0 +1,38 @@ +/* === S Y N F I G ========================================================= */ +/*! \file template.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TEMPLATE_H +#define __SYNFIG_TEMPLATE_H + +/* === H E A D E R S ======================================================= */ + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/src/tool/Makefile.am b/synfig-core/src/tool/Makefile.am new file mode 100644 index 0000000..dabe04e --- /dev/null +++ b/synfig-core/src/tool/Makefile.am @@ -0,0 +1,27 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + Makefile.in + +EXTRA_DIST = \ + tool.nsh + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src + + +bin_PROGRAMS = \ + synfig + + +synfig_SOURCES = \ + main.cpp + +synfig_LDADD = \ + ../synfig/libsynfig.la \ + @SYNFIG_LIBS@ \ + @OPENEXR_HALF_LIBS@ + +synfig_CXXFLAGS = \ + @SYNFIG_CFLAGS@ diff --git a/synfig-core/src/tool/main.cpp b/synfig-core/src/tool/main.cpp new file mode 100644 index 0000000..fbf64b0 --- /dev/null +++ b/synfig-core/src/tool/main.cpp @@ -0,0 +1,1434 @@ +/* === S Y N F I G ========================================================= */ +/*! \file tool/main.cpp +** \brief SYNFIG Tool +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ + +#ifdef ENABLE_NLS +#undef _ +#define _(x) gettext(x) +#else +#undef _ +#define _(x) (x) +#endif + +enum exit_code +{ + SYNFIGTOOL_OK = 0, + SYNFIGTOOL_FILENOTFOUND = 1, + SYNFIGTOOL_BORED = 2, + SYNFIGTOOL_HELP = 3, + SYNFIGTOOL_UNKNOWNARGUMENT = 4, + SYNFIGTOOL_UNKNOWNERROR = 5, + SYNFIGTOOL_INVALIDTARGET = 6, + SYNFIGTOOL_RENDERFAILURE = 7, + SYNFIGTOOL_BLANK = 8, + SYNFIGTOOL_BADVERSION = 9, + SYNFIGTOOL_MISSINGARGUMENT =10 +}; + +#ifndef VERSION +#define VERSION "unknown" +#define PACKAGE "synfig-tool" +#endif + +#ifdef DEFAULT_QUALITY +#undef DEFAULT_QUALITY +#endif + +#define DEFAULT_QUALITY 2 +#define VERBOSE_OUT(x) if(verbosity>=(x))std::cerr + +/* === G L O B A L S ======================================================= */ + +const char *progname; +int verbosity=0; +bool be_quiet=false; +bool print_benchmarks=false; + +/* === M E T H O D S ======================================================= */ + +class Progress : public synfig::ProgressCallback +{ + const char *program; + +public: + + Progress(const char *name):program(name) { } + + virtual bool + task(const String &task) + { + VERBOSE_OUT(1)<=60) + minutes++,seconds-=60; + while(minutes>=60) + hours++,minutes-=60; + while(hours>=24) + days++,hours-=24; + while(days>=7) + weeks++,days-=7; + + cerr<=-time/(h-clk_scanline) ) + cerr<<">"; + */ + if(delta>=0 && clk()>4.0 && scanline>clk_scanline+200) + { + //cerr<<"reset"< arg_list_t; +typedef list job_list_t; + +void guid_test() +{ + cout<<"GUID Test"< sig; + sigc::connection conn; + cout<<"Signal Test"<", _("Specify output target (Default:unknown)")); + display_help_option("-w", "", _("Set the image width (Use zero for file default)")); + display_help_option("-h", "", _("Set the image height (Use zero for file default)")); + display_help_option("-s", "", _("Set the diagonal size of image window (Span)")); + display_help_option("-a", "<1...30>", _("Set antialias amount for parametric renderer.")); + display_help_option("-Q", "<0...10>", strprintf(_("Specify image quality for accelerated renderer (default=%d)"), DEFAULT_QUALITY).c_str()); + display_help_option("-g", "", _("Gamma (default=2.2)")); + display_help_option("-v", NULL, _("Verbose Output (add more for more verbosity)")); + display_help_option("-q", NULL, _("Quiet mode (No progress/time-remaining display)")); + display_help_option("-c", "", _("Render the canvas with the given id instead of the root.")); + display_help_option("-o", "", _("Specify output filename")); + display_help_option("-T", "<# of threads>", _("Enable multithreaded renderer using specified # of threads")); + display_help_option("-b", NULL, _("Print Benchmarks")); + display_help_option("--fps", "", _("Set the frame rate")); + display_help_option("--time", "iR}4ahX^wk5 zs_=S~t3iqies7|O|GHxPJ4=GLine-2EGmF-FYU)>*9gB(r)le7Qv!^0hrSN<`tio9 zu%RMXduhF3V!KPUS(gZdi&ZDT*zoim7Ry(|y(ZLZe5w;f&>PwbA_4rG^~|#&cEY}ep^b&8{^@C>mqONpQbXkA-oDGV z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PxsrZ%I$>_P(# zmm|bxX>gkpV(!~+myMU3qpHeb=I&)XwAYT#e(hfiSY2Co{bc!;dX9gOC{_J#!So$) z!BRGIFL2PM)#>=SYS?U*%vpgfTx;`&v`}FfH2)XjJ?V0+_{_IZyg{ozdT+PGfhR z#YexlGi3o@)+}#^ftBYmC4lb4uV=4$qnjL8g{{6gW99GnIQv;b45fbiG*DQQPlDb>5FB|@q3iu@|C%|WJ!QZYIa*z1Ji z#1PHg*NDKrVVb980xjpRsL#}X96ZPt=K<$D(?-S*A)|p!*B)X)yziDY8n=RV``1dSwY?s4|LTzfp cc8s$9jV=0rzhZB(xx6ISS+tapQk5q7KS|UC>;M1& diff --git a/synfig-core/trunk/examples/business_card.sifz b/synfig-core/trunk/examples/business_card.sifz deleted file mode 100644 index 62d7173d03dbfde89403d73c0a845e9089f45678..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2662 zcmV-s3YqmEiwFQI=a)wS1MOW~bE7yGe$TH^u`jb#Z5!<1%a)Vbbh@*(Q<p#LllDfx!`=3kICvY4uBNBp)55Pv@qi)6<`KYX>|dKfs=QqZwUY`}y{2 zx`6I84BnpWT|)ye*a}yqk8bK3SRrh$Lh{WVnHt#nD7ewgiEegH!x)=G4eX1Lo-umq z%)Q->)){n7J^BaCZa@A6j!!!2BMm?|#L&Tz5F+C*H{|a?@5W7YWMj7z;x!`NEj55# zi~2UV7oOw!5#tHf;s>J}|JAkID*&c0T%+6nk?}$YS^BgWe~%j0D1;#TcB9!owr0V~ zd(ptcb3^2k_t&)^yBmH*bhq?1(+|9#xo|`M%wTleVhiQD;P=bYV+`xLWQAwJckD9y zS!fwVAIQf964<)Y{_R@$8CzTE+(X|w0>kW^Z@3sli$pEB(H)tYX$QwAo#RTJzHTvV z4%{Ojg!>J7ohQ%1)_p{Tz-JNSXYwrcw`46cU`~Hae!YP{Tql$9It|#0sV|D<;t_Nv@uymn@mYczC6u%`m@C1 zNA#13`P-D`X)oVqQ*CyxZB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)+1Tta@byBbxM#0A^wciL!N~fKw z)4q9gvV`Ds7yM@nLt+-p;dTvv@w-Z$(bIG$b#}rEmQZISrOpy{HXg;%_Hpr$_MpzF z_O__A2Gbmy(`IzGy3%Ivpv}@l^gGMS?IESlO6fCWIM5C7+gC6SSKul15eh$nr!5W< z=#Px6&&YAm^A>#qf52cxeh_*tn2dFOeDy2DF8JxXZ~h$&uZ_-NFfgwk;EsMY8R}OS z^cUVgErd4Fr!J9pSF14G{G-4-n}Z zT}`yTZh)7se`Cyp@X#sgLoZ%OTuG%=t|#XlD(T8UjXL4|xhGRe=kuij1uJNY^A#>> zuhN?SeXrC$G{%v_^LIMb7V<&~U$(d_7m+;0)dSVQV zOzwe|jFiY|3%o8#bVNqEP@9=!w3nz_D9e3jS?W^u3WdGuuqRG%uEHOuf^yk9%iJ2v zE%0-N^_01OF8hVJHI!TMp4I$$_6zZAB$ug=%r8yMt7TliCNi@gGIKx~^hOglb4wmiR1Ml65Pno~E2+ zE?qakBlG%CLwki8X;T7336M(^AnlhQeepd=B|Z*cX-}8$A7=vcH3AQ;AUr1kFL2hG zfp`8?lnBc->C*pI0&hb(A<8djMr;PWq9|ndne`$zl+Vo?nwxi1f8>InT%!uOv;sK4 z2o%5g6Tj#aPiGX59%Pli`Ff47)A;(VB43P(-XAhw`O4jV>}1?hu0tx2!&xV^mdtB^ zDEbUi?Oj6AwCJfCiaw-K<^Jc>9&0WB;;LD}v@%RZDD5biDwwt(rV6DBrR_keQ0Mm* zOchL90aJxih0^w;R47b2w^S5N6--+sOchEMO51@_p)l4xB2ODwtjXOvU0< U1*GcX^eyAyPnE@l{R@x)0F~ArU;qFB diff --git a/synfig-core/trunk/examples/candy.sifz b/synfig-core/trunk/examples/candy.sifz deleted file mode 100644 index cdfc5b0835d5bec65689d18a4127442699142a81..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1316 zcmV+<1>5=`iwFqf-0nsK17l%sWO*)gX=Zu=?OI!tsyGmSKfi+F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z deleted file mode 100644 index e428f187d1e738cc4990cac7fc58874e02cdaf38..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1417 zcmV;41$O!$iwFqg-0nsK17l@uY;!JiX=Zu=?On@~syY;%_g7HN(FEjGrJnLRJ%e-a z*oqpFdl4+aZtbr>fq+IKwsvFpd2C0LRCZRfvv&3hg57WXO`tr}IPs&fr{We;zxAKG z3lct)U3wDNomUNr0iz-$bQ^FPi33l1giV4XlrCqdc=gn(OkxjG<(|SwzE=%)(IdHb2={j1T z?D=6zJvQXh2uYUqwEa(AeBo$F?uohg(=LDji@Sun*YR zJo_9s|JasZ-TMr#I*?%j`+$AGzUJAdTRHn2}!;L z;v`z`yPC=y|86f9`9ot zBRt;+>;v{aGWFD@&-ZDd{D6KyzsKHkuwBkDY*x=*Y{U;eoxkYUE`c9X63@KMpOmpc zPDAvEy<)<-VLjnfa}xR+lG0@{Z+uad4lxGK#5N~G3ymj(k!9-R>Cl-BCf0O{Y}>I_ zVWqv0!!}}Iir2RM`2LSjTeEJDvPtq@hT|PGvo3e5E@56$qL2eatDA70_xlOBidW|- zDGmA3)XE@n6JG7p0rU6yG=fcQ9Gv~J+5CLK#cPg!fu+ed%_1he8AtRR;|O-_@nq}_ zSbVpv=>VIP!O*ftI&!c(K||a?9MRqiB-&R+k}p{O`tP>-c`SJp-d`=ce15FHBf30% zx!xXMj@jF>X;~uJ&(nH^rO2nm?0lROSs@n|a%mwG7Z>v45*L=>!ctsViVJ@T7qfRZ zgYvl#qG~30XEj4|c*!{&;IKhu8l)DV_MQ^o;{iT!5;Rgks&@k}&g$ z6g&FkL>de2JlTiO!5I*o0l^v2%^EFziP9*fMKGz< zm(mEIVY*OH*9Fow>2^)L$z@WVfNNjE?msML;&&yComL zSv3o(N3wPw8cmL1wxB*!DUw0uGUaVUmnPn?9#_mq@w@bnbe^-dvWViCg@k+WRj+q+ zMwb8Wl2lA3yntR}x;?We` Xx#m8`?)+~l`cFRrW2v9FwqgJPCePBG diff --git a/synfig-core/trunk/examples/eye.sifz b/synfig-core/trunk/examples/eye.sifz deleted file mode 100644 index 4ed5b2aee3e35b3508c95058f029234ce79363db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 127203 zcmagEV|Zmj*EX1>W81cEJ007$?WAKnIkBB|Y}F0T8u50F-`R326TBzE! z_o@4?wf5NrQIL=vJ6GZ$KTJJM>76ajynrrrt?l=@0U!K5!siH4Sb6)ke~;|i8TNP? zVJ3|j>=2G7jOH9Dq>LJkA(|Ij7J7UoS7Q$wZ4w$uwdD@Cz>Os03aRVQ;$1~^KA!d+ z(|*ZQEcAIi)cw$%f4N-HpSF7~y#6>n^PUfpyF1=-d%CF`U^^v6INkX)e5w;k{AtW{*inwT+I`}eYgy{ z*u2i!0BhLi9$S9!W#mqW!&i>FtWGQ{Tpyy?SqN5o`?LI(dF#OIxH9xU-}4C))#1kf zK_)pZ{xR~fAV4sGa7M<*GsWLl(^Jggj`Bw2*|kaGE$GCAE5ESbuyB|g6&qq%@9S~5 zJaJsQyHg?{{iWtbO*?Z52T^Db6@UU#Ofjb~U$8D;@FaJ)ocNx<2BYA%%tiN#lSyvn zcquS%_!ai0dYLYGUuq|?(XKnP89uY?_d4S7Zp+v%|Cz8g1(*?8?ha#Emq%L|wBcSL z@E_$OY)lXLwDt?R3F~-yQZ|{R`gB)W5Vdh={y<^$OI;nH8hnviS0&Uz0toC%-Prew$Pe@ z^Vaf+1?LuQXCb?BKVEgToNg|D82MesfyX_CubVvGnbh3#b*0BpWScm=)fqE1T@Ym- ze6IR{?dj+NBQCHELkbt~@J-jGrKBDoFLzB$zn4F?`#tIB3q-N(CxI zt7n-ML%{PR2Z0l^4204DQe()!tiDPZ*~kravg00qNY)x?M!WonPAoL)VUmC9Bp@q8vvDlM*I0!NJ$1|7V~rre74hQX_f zk-F$iNg2S0q7_q)FW|=oa!udIxEc1#GG)Ogd#8V^eOiln{{Y-ymgEbL0);}8G;PHL zk{iv)Q%qEWv>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l1I4Rnn29l z_kjz>IPjfmNb)UGWv)?wt*N{axRI@AKx#bg2eLUXq zCr|ul2j-!zY5d1+V?Xv&W!f;|5jvh&hkKZ`B6RLnTYI$ z5hstOTy5+RNUF%wugu;6wZveechDK-oKlZmCh-n-?L5?rT{CEu=OoJh5H`_xpPC4= zrNM`v|9S!8!BnkvPo1XCDmpLIgt+FzWtLCV)Q Ng*zkAZaYpX{Rf<-Puu_i diff --git a/synfig-core/trunk/examples/eyes.sifz b/synfig-core/trunk/examples/eyes.sifz deleted file mode 100644 index 7d4a441dca6af827f2f5ecb087fc38c70cd2e9ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1753 zcmV;~1}6C*iwFqi-0nsK17&$-b1rjfW_keaT}zMRI1s+iuZVId`2CP*<}e!VaaSwt zX|+ND3`7$Wl!TsUe*K#83Qj^oH}vpuPKj;4*yXA(RppZCeSMpU&Z|n&AdX&K=mGa@ z|4VP=N3VW*Xa^p2ou9!to4vS10N0tRU^>fQT*URmTcT2ZD=_gGp`0SuS(Te!1NE~r zjNe||4)H*KImkmazuC8Rc1^D1M_J&9fvx|+kQ;}XiaJ$vRf?ujQY`4taP2JBTe^K}utQfWo#>$*U{kUViir2=G-rqs`BZw-- zh5kwOO|?>$67L0>FCA%zEZhlHOj(I{Q35EzXoHq z$Y$Fv-I*v~tDhe(*IT#Ul7oQsfNuWt3MhXbFQcp)37&;C47K_Uv`}X8_<$E^VNCV% zcav+ziIYHUMcgyX6%YQ~_>mbIZ+chh4ex4cp%iIp-e} zGH*O?TQ8-*6Hc#N?w#shD3GMG*PWJnhq{;KSFbxP_4<9dNA``mbW4+IT2kVVgJpVp zlZEDcgtQX#^Tah#el}Cdbu?%Zmu78R=H5PwZ#lBhf|V9WtW2?%k(;I$MB4013OW5)GnKURhY5?tZbIz#YkTmm?lMHgJgrR+a4GTjkuSOUU|3=2x^;R>+ zuJ_uEp%pMy*?rqyuGZ)2-_C2jENnZ9l!OQYCFJMo^)gu-b(2n?hr0PU zX7tmTfpA0!kW|z%Lvh5NGDC}y^wMz$vT?`NxB{N!3V4z$;Elx{6fuFcV{^AjWh@Bi z2ntB+2!ui|7(s~R=Z-thKbVqFP9n%AFB(ZizfA%u1w|O!lc~oe5v??Z)9(5+@?UX0 zzeMf9y3}M~__@7x;~s9(3^JMp;W$yzAdE*p4ls2-Splf9dRwD$@fwXzQ;`No07`+S zEz+<>8n#HoehO`ohAq;t**aUKVT&|uk%leOuvBe}G^}%Hi!^MJhAq;tMH;q9!xm}S zA`M%lVT&|u++m9}Y>|d7(y&DuHhE!-G;EQ^vleNX^uvL~#%t_)M~Bh~jq1pl9cb zaxVIJQiYZj1B?O4p}4dS5b9M6?f$4@FD8oFg~fCYDcv|z;G>AidKLHLRn&{>gEjyj zhA8e!NN4ke4ouf1&^ntCFS9(>Igw64W;%g8e{O$e^9fhVCqSD|c;0-%Mo_;kpZHjfV*x(1I*%M&b6zVqFYGFcUyt+6p-FC}Ir4 zM~D;z<3d8lE}l~8Q0Z~Ok&w3-D;Um8{`V+#o)pBJi=$>QD4qGqVlY~!ix2sBiH-`! zgDhD53;w$d4*U?#+G$%wDox)Nso22G24*%evw@jS$v&d1g**-jWSCHPaUTK_=3yWu v<~A_1fthjAYvZzejLYb?jwU+tkxp=ITxR34Pm9YA<^BHyjUKeKRCE9UVk%m> diff --git a/synfig-core/trunk/examples/gamma.sifz b/synfig-core/trunk/examples/gamma.sifz deleted file mode 100644 index b5ebd2b3a054f0362163da35e01587caeb51ff47..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 740 zcmVl(_f?WeMyT8q0ow zwWwt@c8+>RiY8h7D!5_Ss;rdZmTr~NFjJc4F49sYm$}crXUrD3wHBmIj3^nTzn8{h z$||iY)ME3=&Eis`W(n7cKxPWH6e)wMLeR`Aigc3<(I6+J$Ox{sfJUG%wUjC2){n-H zV9iv(h5+rRqWk-)1W&J(P?`ivEMJk$>Lq#)7psn=$O<%+tiI*B2PHwaKqiGCb-zqipE`g-m&K$ zd)%?d9XoXF&}18T(sd|CW2g3>?n!~kAJjLo0-e4C>4O33g8}J-=S$zCNG;hCTw!7# zFkCko@6p#C-=^o=w3)j&!>J9w!^d)89?5-qO75YG6I{}kag%FEIa2iu*IaNOHCKgC zUeC$%*0Y*CIrHe5shj0%0*%$YLbF}vJ^!v7!`86hpvU&dV|(PWeR8;A_nNk22>ZMz z|G+yq!aF#^J9s(X9h$opc@Wks@7Ziu-}e~3ke*?<9E4I;TMDsKO;5V6ezb?~czy@@ zVT25XIRr6yq`4=QcX5_Y2hOtTz*#nZ;j^r6@}+qR(J};jSk#B1f|H>B;{nShm6<)Q zjQc`>5Gu<~Dx9HCIP_3`Pvfn%!H;uKw0v6aWCn4tgd4 diff --git a/synfig-core/trunk/examples/gradient.sifz b/synfig-core/trunk/examples/gradient.sifz deleted file mode 100644 index ab9014a7d90acfcd830efcbae0c519fb1daf8017..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2343 zcmV+?3E1`@iwFqk-0nsK17~t!WNBq?bS`sgW_keaTw8D2NECkWuRy#zc*Y)IRwUK7 zyQ)@Nt*W-~$lw928XMUr3H|juHn+L@f(jtdj6c4v!of36(jbl= zhu}dUeth~co_W!;m!8J;2QVDG1b()B92&Yl94v9LSZ4b-uL({chtNgv!A8i$A? z_w->f7)Ra;KYd9&KfqBo_<_@GJSxWWNgvPC{2%h~;_#8ce;j_p{?}lQhr2m4JB!0O z8LZUVmjoP z#{yj!noxqpav?$zEYQ{gYK_IVplb?PbQ76Kg2l9re7yuLz%ecBJz;SS!-fWr#dLsf z0TBxTz%Wb+7Sk}H+ZqdUZOh`Z*ogdC5-c_{pln?%$8h1h!eU#d1$ZouO@15^i(xp> zkmwg^n!s((FRlR)X9j>$*CCxS3>2}LunS#But3pmaBbT_l0C9afLw{LLyqNw)>w!l zMZoRH9=Xtg!0ZR_UJ^@Fx4|VWpxb@G0u(Oqb+8aRd*6KjKFt#1oTr0qyC#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2kx3GnDM z;nCxPiO8p}ae_!oS4bnvR%bTXAOWzr^J9r10qd5 z21HuEH$bEdG=NA0B3&W`M7s2Dw>L}xNmD(-eyM&h0f=;g9uVpJB?m+r5NW!(i)IY~ z=>k0f(k-ny;L%i%V2J7^2H@xdJ;2cbM@x4Fa5TWt<%s|s4RACyQ-GrZjy_fA0FJJ_ z*4i(@H@!I1?kKo8ZGW5g>=imF#Q~7kCgXvL9bHAkiKFYrP&4fDbTS}NB4G`%9 zJs{F;IZRbI;{UMRqN7L6(p1xgACA6bQ)H!@YRLk&7^}L2Y=o}H6aglkGyo=@5(6d; znDpnvnY;PvM)Xt0`$g0_2-c<1Ns4hD=bgXyUYI~+KW@r9h?=pTE&bIz^foW6VD_WT zxJGCyyerFC0QLXwMmukmEU5t4M?GckMYHGL_hlIelfd^|T5KkoU*c`2VS$G2X1oR1 zeFa4{o3Rc;f8lS+OxbRzej8hdO0yhXt+=J1zr?7jXUSt)ctUsXyQ`N){C_WoJnIGM z_v97jFNarZtPCWKS^}^a`~@eJhgMEhljLa>68L?6Dd@fEWB&kyDIlpg#?lf8rU1=VJ?nku8GGFl4NX02A6orbb@v)IhB zRNc00{g#W(lI7$GSho|QncO4eOUi0m%7fOKcB)6ngR+}5NUUzoXN^jfGR-+M3a{Qve5CoLuIlO=O2 zp}$z}yKo^xDr1d+$U__8}*M)c*Vy?t1OYbf#yu*(THC!6AUM++6Mu z0Flp4v~qW%yM2m^eC`T&!My-d74G8sMoV{2%{5&>{zXO|JK~TsM&*KzHjg-H4Mmkv zAHuE-5m%>)tJ1{PXrc-bM(s!KsSTz+i)8vBu>S=_y5;q=jP}k^ie~$ zDjh}9!uS}a5;a8VnofpU=zOw zD}O#p6j@*x^Fq9TE#vrq=+1sDl5>td){2!(pF diff --git a/synfig-core/trunk/examples/japan.sifz b/synfig-core/trunk/examples/japan.sifz deleted file mode 100644 index debec61a32ffa6afa8304302d1594aaf157ceab7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 548 zcmV+<0^9u`iwFqn-0nsK18QM#VQwySX=Zu=Xb3JBEP69D)BV?N4bX5=$t4&=gEd`%mhO?MZLgek`?(jURro*;i-kE z7EUaj%+-9WoFy^xhi-5Bo(WDf!rn_satfx8|9to7oy;6cOIm{(cf83@76l8ib?u&W zqkDMIz0pCu=iqG@H%?kWu+|-ZQFm}hckt(QTQVm{u9mHx{ytfK;aDwM0e6PcSPj-R zHjwEnb#3Be?`b}$k>6U$Zg%dH>z4X9(e3htmkgHbLpW`5qW=6$tFAJGA!)WSr9#Yu zRuHCOhvnwbQ<)i6|L;YMZ(Owa>lf`xVt?73)qc~k`9c2urWHW+$v(-~RFCw(7V57J m1m)(O>Br9Tx)X#kQ4|lIoOu+CZ^J*T<{$sSgkU diff --git a/synfig-core/trunk/examples/logo.sifz b/synfig-core/trunk/examples/logo.sifz deleted file mode 100644 index b29c578c2c9f73abf5eb29d1ebe0d20e48d4fb03..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5077 zcmV;`6DsT0f`u#RP;TM2sD5uk=GFXt8u#H+@Kh82Q2O%K$y9gFk=$ z({SPLez?*5bM+Aolt27sy#6vUkTy`(p1)eh`5!++FCxD>s_|$bWEOgt%R{riG_O~8s+v`B_ zcFWRVFRMkc3Bsh=hMN2+^;xE4p{ zO8mAbL-BVvioHqNXfl|K*#AKu#^J#mR44ZMGI@RPhVE8LIDQ%YdR}__cwH(c1fk~= zad9_?WT^9orHy+kad}GFaM-%r;INDNT+xTPzHEpHJa4^t9W1N7{ax&>$e0`(EzgsP z1Cg>Sw;$dj4#M&y^6=-^@=y$)ep2OcNx5cW!@#D6hfi-6mQOTKajO>jgdQUD$A49N zQ<=RW*mga2iH1D~udk6u&0kVbuzr)AH<2gcI($mS zo~Z=U+Fg1A@z;7L{_3Ocq(7Faok9Fj3#O@Qs&Y#oQPLe2(m#Bn%T}eb6;<|9Dtn>I z+^?u8bF11yHK9R;8N$j}Vcjv1jyNj(KnSp9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THy7djEuHBz-vurlgNUtcDqj5*DtGux@(DQ_&7j!q8jcQ5i272J?FW zlewOReCv;_7G5L!kDMArQ;2BTdk^oXMSsw-lrXbtC!6rtjW;V?g5Ka1)?pGks*h`` zsdf_okh2OI!bzw6KuwEd-<8DMSQ#Bol-J4c* zHr}PO(fs`#B5D4k6%mP$ou}rM_r<#c_G3tSDVc3>}oFMDAq*mr1+7 z0u>$di8qw(+PXc&0m^8XFfvI*T~_A^#$g@)-9)~?ssv`B7bFpp~z zTnZi6yC$zZ4OIAE38lz(sTpp3Js9OW^kxFKn`;WCnD6^`9kH_*hT9{Xfil;{(7)-r z#bzjFA}*>9R@c~2a4nL2ak5bH2z2tjxj4SB?1kJ7k}}=SdO*%d zdi?`8^t&I5?R@nsd-qB-o3?hUUJ^15hryao$C)+HPpA72n_K%w7su0K*8$y|+7qmb z(D1Pyp@CQz*Be;I%wc`5n9AIj1n+0h``g6szer=p<2^!;rMdoJ8GmhLp07XW7W$KK zT-o^PVXyt15t(`kbHEv4w5!M)-*A05qUmm{`z(}N3gI`fDKp=i6p6jE5YUG-j=MiN btr?yQE?yoP9zWTIzWCd%Ptq3wJpum*@mwn4 diff --git a/synfig-core/trunk/examples/mandelbrot.sifz b/synfig-core/trunk/examples/mandelbrot.sifz deleted file mode 100644 index 91c5623c5d33f06393c906e08efcb2b1be506606..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1353 zcmV-P1-AMhiwFqq-0nsK18re$WMyn(a&L4lb7^LJ0PR}aZlgLBeeYKw-a~xBfTc9^ zFrP3w&y^G01P$N_NZZWUpKU@C60UBo>PTnuRBTvYUi-o}yQ?1`S?avWqD)l&>|zhO zKh{sHt;pX*c^gL_cAfVmuJ+F^MaXsbGTH5`XP4-Uk3yF4CuhV98RL5B)E#%& zD}qV~M%GV`v&uy#*Z%-YmC6{cmi4usNX1DOPIWrK1HV+7#6MN43RrPlC2ufR6-Vjb z?_NI#PaZ@eGDibFyCPG^ylQ4(u8;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/newjulia.sifz b/synfig-core/trunk/examples/newjulia.sifz deleted file mode 100644 index cf16504feeae9cb10bb7e8819b8aa4d326ebe3e1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1534 zcmV93%wY5rpi?^CtP1XDWDnf+3Mq&l% z*7xft;lqYV0zta9yLF=`cye>^IX5=}S3i&YP5WRr-t=$-# zy7r2^Bv|Wn!_c(=B0oshy3M{E35?gewVYYwr`c@DnogHZF9^Plw)nW#N7i`0u&srq znPYou&Znk!ZW)zLx(1>Ife---Wb4}Qz}}6q!LYW_N6{!jdq{2D=^Bi@%D1iW;t&&N z_RL@}?ec>;&fX1u^Fz~C5!l1c-%$do*$Ik#?Vpqmto>!KCRrD|#)G?8}rffW5}1x7PnS9y}yLrJG(rAfVI$VanWE44xS|qjMua1pq1bym~623cT=KeZZ)>Lg_#&1eTtR{S)Py6hm&*%EKv~ODUZMip-TVF$wazR5s6G+naSVxbVY&SX%qbRaSq5;7P=lYyH8 z-tA(@Ir{~=$;Bj&n`$&ylOxxE;`&c@qj*fYRVbqTnRdJeyz?$6-Eg;)!PIF$vRp{l3jD! zm|~*jb7~~uq`?+-`$optDu%X&2G+0nU<1t#9+XJ!{SEBm!O<;U*oA|mTaxhZJ$UaN z{74b6Ce>`&tH@$`T~=XPcUEEDPq`hVKd@tQB4LD_4XVXS>k2LNnT#ebB5nvD+p^nj z%jQL2QzgDA`rfM&C%{8#EDPacnZFjZK`Yfhum>D}wmpMlg%84z?v14Uv>rMiM(4|K zwdHOTdOvT!)0Xrh^p=I_A#??y%QEJ-6#A@i_S2w3pBAul1=vq0bj4G^L6>w&h3wuA z`$l(&#Vw!ycUq+CZ&iNHQkmjg)hX-o?LblNfYTw04QW}Fl11rQEsBzic9G5UBZD&i z)-zdtTu|vdy^UPO5f5EEwrC#v4Bs$zwXc0_5qayUP8XcDzFp?&5EY{g`}8s@)jnlL z)DDfh*e;4HieltJ2d9Z@KEed~C~9+ngqDp9yD}|*vnM80ZAYIV-{4PRV|I}f2WVGO zCW!nH@*;1S6G|Wf35{ATB=*y?gDN5P+VXV1@EfLeNy_QsX*si>7M9sVm0N&9rliIs zHJ>VFDG$YT#Kg%3`UWZ5no2wp0IKi-a99B<#i>=$l1OKT_z*}r|E`}}>1-OjVZ1#A zQ08takea`TfXW>{9FlutCmPq_#CwdBUpg%nzc`s zKO*Fy?85!i4p8lz=y%fvcl_65f#6U4x}0-}MD;I-6Zk7T^ZP!^>VR|G-02npNn`l- zi2bA~25fn3Ug)gS1Z%lypD+9OfWtjCyJC%JpT!-rQGh~^z{m-)`#ekm6Q>7AcXnWZ zsHT4L)7&+Cvi~FqSzxtKDF2(sH3%^cWr(7y3PKPb0^opGK-6G_3n@$6E+&L>QC0Lo z3LW76PUGu0+FQb$8^KtxI2aB0kz^}jln@XLlZeXd0FQKiNUPrNpW1w|--BM6?NJ96 zwc@*$L6)ElvaOFRgUTngx;af+2B|@{l|iHO=9FQYOMZN%y**{~KROG{(tthy0Q=MMFaQ7m diff --git a/synfig-core/trunk/examples/newjulia2.sifz b/synfig-core/trunk/examples/newjulia2.sifz deleted file mode 100644 index f69a0929389dea78bcd6f6e0b4bd542a9337c85d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1250 zcmV<81ReVyiwFqs-0nsK18!w^YISUBVKOdrX=Zu=?OI)vno1CT&#$0(7l93KtWxuk zKai@_eWpfeVX^~b%?w8K>+j46%D14zZ0?OOtF)f!=|0_k26pxNm=NOtjANRvO~gJWYtvnNuJ!79OLghgymY|uW45Ko zwK;Pv&sHy^`Q~CX4U`Iu2u2b}uD;vLzc03>OD$gUAPq~OwoyO{WyAF>RXwU>_PfOKPZ;RaWyubo z%Jy+S^%V|IIS#?6nYgEFD8q8D4BX(A>FpaV+aK7VB#j)t+bvqw~1?duIU`$9KTYd@&>f&n4@igkHjdJu zQ#h29eFCJ2p%6pb#3~G>g4MItkVErYFg2lasp#6Q*OT6EoAi3l+ii1RPI+QI)g(x|tfoN9>uL(9YgX%E ze=F-*mBkZEMckjxVV%2PqYcOjij)V4KtJ*gmDeQUjaWb>*S8ssQk(&ed zG?Ca9gzp)_XlxX4^^{vb;db%Ai~U{PZ)bjm_dO!~5Aacc$>%ZNl_-VMh+H)D%)NBJ z+im)`Tzzo|%ng9BmzFchilwWaa$cLfTr3va_Gxj);iXqBd*fQj5UD#*q5gN3?wNv* zZ|%t%XiU7{nFKmVd^)7y6p#nwJ((c5=YZNZnF4~6{pch6IZr7>Nd4@Qz3BD*05HL6 z^jMzi828_z+Q~BuyGvhnhFOs)pp41>JXQz98Tcstp7E~nTwSLB?(X}W^(4;bUOS00#yE7$k*2$CZzuMNv9A`1r{nr6^ z+$v8C+J$wI{zZ$hF55;67?qPzzIWCoW~#6EB-Z(@iGB4ZzOnAu11H}5*7WM!n(;|` zJs=SSn*yr*NbkvyBhC}~kwGk(Pv~yfNgQ`XRjKSC;#Yg-yLx10Ti&^{9B28wmic=h zSydZ$H5%@iipkFnquBNb>(7Be|6BQKPbfaegz1*}9E0^F@o8I&rG9;SdFe~v_1^;i M1uFZ(_QNLt0J<=KUH||9 diff --git a/synfig-core/trunk/examples/noise.sifz b/synfig-core/trunk/examples/noise.sifz deleted file mode 100644 index 8505d7a65824af423946ed8a6aeeea390c01421a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 699 zcmV;s0z~~EiwFqt-0nsK18#3=b7d}bX=Zu=?N`B$n=lZ)?^js92Mhs{NQ6~Ysi&%! z_8u9SfVF@TIN4;szP2|6lVmq!x7(^!eZp_z_uhCWOcLJj$^vbnX&JAU*s%z{kM6>R zR$JQkII$dz9$6~#CH4rxCb@?sW$C;k2!fU!bBT-&Eo2WVC?r%n35 zinmqK@n&A&oma8LPpjDBZ?58r#hSOh!7U_W;BcoDU7vL9J0rF~iS2u3ljmjWmOa50 z?IZmKZ8LUV`=#cs)EnxRrX~MY(~jWD8k#aNJ#~mt0Nq zgGg*d;z8tMhoAKLU*u~scfDY|FJcA$RJQxMuL=33#@wk-=JWB!4Ec|C7RWU_b!LeC zIcxq@tq-?GZnoz9mM_26)ozVUglWSq8&lf hZfg1CvZZBRz->gwnJ?Q>|7VNtegYz01IyD5008kaTU7u6 diff --git a/synfig-core/trunk/examples/pirates.sifz b/synfig-core/trunk/examples/pirates.sifz deleted file mode 100644 index 5e0f409c1f94c3c2f2222afc25c876f3f39255dc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 654072 zcmce-Ra9I}w*?v?gdo8sxVr^+cM0y$5Zv7zLI_T93-0a?jU>3ccN5$pxWjGu&UgO* zjBy|C(|y?kYS*q>Yu1``)!wU`IO6?#*Dvr=&@c{`PKGX~&P>jhW^WEN0QQ)JaoMb znyO2v@uS6}rH(&8-G^)d$A_ou@@5AkeDS89R{d|6&$%Mv$0O?Ovx)+*uAh7_t{xsE ze6dzny*v4Nef*z{I;)RQ9{pPR%lxC%zKd=a_+4!E{}3c*eD?k8b$K807{re`nm$Z~ zLX^&URVl>Nd}rZr@95-L&n>7kgE2d~>Raw#i$q)S2%I1OofjW;o`*8*WqWdUokVSK z|8Q`*_H*`h-=+O9uFt?*=qdR7WtQc0a_7;JfRMJ2*3+54Yy0`emagBE&Ev@_Tz>@f z@HFt8nfRdOxrLk0phHh6)yvU-?1$hy$|_^@c+&lZO=)WvWEMK9o)M$TT%6QajPk-qO)U7Edr%X zk$UInxcFytFJHZ^%`%kX^Xsyv)iHM$rw;z|A8Y&TZdvB8UTUxxM@U)8_G6kwn$P9L z4^P9Rx;{^b*Z4yBXQ1&8y{zrU(eo9-yZPDu-@g3w%6a+~U?86^*rRzPWWI=R**A{s zWIBcv+SU(bs~p&{NiCz=dqA>{dTWN_X3sfW~b~=Fw`UGU2ms- zrr*ld?Yd+SG&wX)l8l(L$#7oDBHi_cH#@h-(O@pizI z5}nz6UB*1y$vT;(Io3I;CH`M#ptiZLAa;vr6$WZ>{@3|%E#JZ~1?eNw{u4dRmo9m9%p4)V5eZ~A5JG5`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6H z#!TN^%8;4AH^*u=wvscmubs67`&lMr0tNIOYP~gUb!V$zziQHch?!+$+5j!Z=tp?y zH!02p+O+<$wo?+y#H5RZ2CdRwtbFVK;ZG@rVMSXNf;l)FPB6!yorxaJbMi&o>VDq` z&3JK12|t+B4>ECi`ym{IqM&I$j9SDAAi5U52Wb!taKfj3lkrr^`P!dI+1qW+Grh^L49@SYlJJ75B{LUA|k8XV(b;s-&A)O-GB@SK7v zs_jEb=jtb%OTmZu?p}EW^T7Z`t1<>x$BqEq0H0&G4pt3IG@c6Hx_4tXdla%DK=HM> z19>$5!0IbQunBlxT(1Zt`01)vt$dRC2w8i)hhgLC>INR!)`a9V!$!a;> z?+e{xx@70qALz)!A%7%HP;Wd{2L;8+c+0KcM*W$&EwDc=V@WH`GtbG5H?cRPC1wC5 z4Y^a}&^7=g$`c}$C3wamFG4D53TtMy()8=>5f%KEzhRFTyAqWT6-m}JHT9&5c^7Dq zw++_Q8CsvTbzpi?8EKSoc0-}&%+eqKdswM=B8lN!+miJR*YabLyyJiUeABGM`Jyyr zI0*|1=Y)3~{MUcwG)z{7Cd<{)o3eM>blB>Dj;r+Qtv&cNlK*!rHw|lo*nyKKFKD=S z7zq>pROvZ_>gX+X-sc1+?9ijR$0xsT#hJt(C{QeBg}tx>=!Q*8zjB#lc9-vKx-@8> zL1rmpxP3j&%6SUJB{QUvS^ljw2#&d2f3uMNQFC|`& zR#VwoM-r)&M!fazvzdar@WB0*QMlcirWzgm)oY7(Ovl|Q@aj+>Mwh#!Y$*I1nCF6> vxy0@BUN=vyuZREx@D4{K5zZWa_RHKq!Raud+2?ArQUa|xG%AmP4UGPO+M@46 diff --git a/synfig-core/trunk/examples/preambletaffy.sifz b/synfig-core/trunk/examples/preambletaffy.sifz deleted file mode 100644 index 740bbb65cad25302823862086b140346ed56942f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1030 zcmV+h1o`_PiwFqv-0nsK18{O>VQpe;WprU?W_d1iX=Zu=%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lXQwz?zI94`L3uN%>(3@HS2yI0_aB1I9JEh~kW6o$5 z+vf7?4sn0qudL|GiZVfo6@lWHw+4}XujaQNF{;jZJ_{=<-=M00N?E!!J>e&+vO7}6 c?P$aAI;A(F>ZOqVruPu|{}~wY*f>G}014)RJpcdz diff --git a/synfig-core/trunk/examples/splat.sifz b/synfig-core/trunk/examples/splat.sifz deleted file mode 100644 index a0f3e902f7fd766d4a55d57c9b86267e1159b1bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 860 zcmV-i1Ec&OiwFqy-0nsK19Na}VRSBYX=Zu=?O4rrsxT1V_bIsS)qrB_IcgX85&8h0 z03+l!B%CB#?bF|cf>00D301tZX9(F=3?z!x%AT6VL4aJ@?!t4&kDj+MqGMCEC-64%`C(;`+%d{7%Nctg zHz&!c5ZM-HieO5x2GZ8IsWj%snaYQVu#qAOXl`5E0v1+QeiU%Zg`u6pH*cKWpuK*u ztR=$}Ae%SjfvMhJr# zf>#h5pJNgJMzLQMJ#;>bg}ffcLVj};YZOy1OM-g{)F*}qZP9T(RG=R!x?@duEG<`Y z+D%LH4jr~n@MmmSb=|hxk~hID1nLW}E@ZBIE^~JGCK9k`V4ek}(cp2pscyxQMgGR9*o@n2x6!0x1$WB*2!r1m+HI)pk@omn*eGyfxHc%W*f*F0ctjaS}UmYa=wL^a|JJr_sN4- zgn)0i5}J{?{Tp&ZrktlkWJ^&}y2gj8sUd)}q8b1wFRF`3eXFVg_FGopRaP?LT*X5q zM!i5AkONex3^0Yu$Q@H(+f48y&m`_3<1A_!XHm;Ii_ljcN+?d!-Xq;dKVuMKv+b^i zmJ!$lKqz6+eMohT+f!kyKWpNq>}>P15|~MSzK6c0!Uc&4>zMz&`69dAr~3RqLgVS< z2iw`xJqLhy&Xc~}FV&__t=x-KbWLn^8Hx@sl!0lUf~vaPo$wPo-h7aTH=R9Bo%xx+ zFlg>MPtAt6n7OX=B@NF!9dIFZXb@yL$2sJ-28Av%qN(7wg m1|tVa3OMM&Y$t{pLU5Ac`(_Ru-|T1b`r$v5@1xi(761U}tD;N* diff --git a/synfig-core/trunk/examples/star.sifz b/synfig-core/trunk/examples/star.sifz deleted file mode 100644 index ad4a8e551438326cc6da4dba4c4ef183acebc5b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2179 zcmV-}2z>V+iwFqz-0nsK19Nm?axQaeW_keaT}^YNI1s(hub?=OYyn}CRFTYKtM>jqZwo=5FZE7*N04MRkUxB|cv4bNAr{B1Jv5_Uw5>j{bT2BgozD{H7S!H>YCU>^e zllIU1Z^0l;p2K{bE_;q`y+p%ea%W#jX#SCN173 zJxA(AJf*L9ws3p0`dCiSU;fynh;@=}g-H>GaTMx`^xa3Zyu4kn`s+!JqeK+ZRB72p zwxyEc>dMb8opArnvVtU>s{6lmB}J@;GU!*=re3k^C^xJU1l-UWvbtgvouNy+lte4c4rsa zT-jDMyt5xB;Y``fQo5WD{@-z{e|s#cW`(&;SCqhg<6+iYb875_H)@u@+AZ&YnSUarem7`; z(v56XJQPCGoB1e&8sK)>fcm5)<))C5-$YZBYJiEOLZ<;9_zW;}RY=K?Gy@JgEB>x= z|IsLR;4W1|-u1ewM!aJO_BB9@Q@g*uT4N>~h^Aj*G>q76UElgRIW(G_?p=4Ix26xt z?p)mxLu`nM?{+FaQCEnP_-5~{bmTWfY>3G3VUK=O#D;XEQ?QeH4%iJhE-1hQg91DkDWM=Lp6$xCOjG84P6e0 zP*|rs`RRf+l;k&3xRe@T3(D(O2{pj*<%&=X4Dkgj zE%4B1fic2Br~y#3fY$2OO9+TS?{0&>xefZ>Hpi`T7vNj)3G_Yq1o|d?0(=)f0lp2N zK;MV&jGhV_4}>?a*fXbGbwjFvE3LNp@62A&Q432Pm$$!v*wgDt*UoR^OLW(ysN$nRl~ ze$!LJHegzxgq96|V)V+qbmmFTQgiOx!u;H*>$&PtW&tW-&h zmCAIGFQtPZvq8YgAcVOfjE^ur!uSZ|BaDyG33)KR(_(sOw2oo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examples/walk/Makefile.am deleted file mode 100644 index 7ac6f9e..0000000 --- a/synfig-core/trunk/examples/walk/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -MAINTAINERCLEANFILES = \ - Makefile.in - -EXTRA_DIST = \ - animation.lst \ - frame_01.jpg \ - frame_02.jpg \ - frame_03.jpg \ - frame_04.jpg \ - walk.sifz diff --git a/synfig-core/trunk/examples/walk/animation.lst b/synfig-core/trunk/examples/walk/animation.lst deleted file mode 100755 index 4456c0a..0000000 --- a/synfig-core/trunk/examples/walk/animation.lst +++ /dev/null @@ -1,53 +0,0 @@ -FPS 4 -frame_01.jpg -frame_02.jpg -frame_03.jpg -frame_04.jpg -frame_01.jpg -frame_02.jpg -frame_03.jpg -frame_04.jpg -frame_01.jpg -frame_02.jpg -frame_03.jpg -frame_04.jpg -frame_01.jpg -frame_02.jpg -frame_03.jpg -frame_04.jpg -frame_01.jpg -frame_02.jpg -frame_03.jpg -frame_04.jpg -frame_01.jpg -frame_02.jpg -frame_03.jpg -frame_04.jpg -frame_01.jpg -frame_02.jpg -frame_03.jpg -frame_04.jpg -frame_01.jpg -frame_02.jpg -frame_03.jpg -frame_04.jpg -frame_01.jpg -frame_02.jpg -frame_03.jpg -frame_04.jpg -frame_01.jpg -frame_02.jpg -frame_03.jpg -frame_04.jpg -frame_01.jpg -frame_02.jpg -frame_03.jpg -frame_04.jpg -frame_01.jpg -frame_02.jpg -frame_03.jpg -frame_04.jpg -frame_01.jpg -frame_02.jpg -frame_03.jpg -frame_04.jpg diff --git a/synfig-core/trunk/examples/walk/frame_01.jpg b/synfig-core/trunk/examples/walk/frame_01.jpg deleted file mode 100755 index e59b8da072640315b2e6cae020c79796858f908c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5934 zcmZu#2UJtZ*MEp&!38N21%(w12toqV1ri$|%`9E|Qi6se0#YSlK{`gdG$UOgfB^vs zO==)WiJ>T=EQA)Sl+Ym`y5+xn&i9*h=Dv5&nYq7v-^|=Q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HBa=-<;F0_%k4zI`J_mT3k3L$tE<$Jk77juVtfU74i9Kex7X8 z@I#Y$_#*Fa`8P0o*5>GOf8W%-Rlegjgr#N_eXCDLb1I(ql?45ee6_1vA`+G=T$hLr z@}vfBJPMk+x&Cyz3Z*=*-`z}*DgmRqXCcZumjx7ka^)=8?J-7ELl?6N*}W>Np+&jYNr?{u5%#1Q3BjU@T15JprU{e+Fgk~44 z`-OoA;p4=FSu3?DB0hT*8@uvLX)@_bS8ZS*q9$(o#QyETFJqR)qv5(s47&hyJtto~ zHQLB2AzXazAp%j|mfdu1rLC^U=^nb|wn@3mYD25<*I8M#NoN%mvegk4jQ-KyE%_yWPXbX(8TSq2ofJ6=7z)H^b6YxxILC{M`aIz}&qhN4~vaye>1W vRmNQXVs#Rr`fxcb62osdltL4)^N6E~!&TH8p8PBA{AB%S_g7f~XMX!XPTC5$ diff --git a/synfig-core/trunk/examples/walk/frame_02.jpg b/synfig-core/trunk/examples/walk/frame_02.jpg deleted file mode 100755 index 145d8193c2ee221b776da9eaa53d645dedf581f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5118 zcmZ8l2{@Ep|9%j9sq99GH~W&YW!KPx5VD6EUR%Y8%#7Wj@+y1w>}5B$kQj;AGGs8a zPGd-xNtVc#op03J_wWDR=eo{0&+mDzbMD_c_c`Zxo}&*(p8!?^U431Eh86%^s0lb) z0@$wkIKu+~8sG!~00LCgGH~Xyi=(ofcQ9B zSvmOxLB|jj0P#`*5)cp;6&Dp2kd;+bl$F)~|Da)GVPWH7<6>v$;$)*HUQTXqPF^uy zUVdI)F*#uYDum^v!Q$fLU}+^KIXNXIZEdaJn>hLhU^_|k66mL+5dvu0Xz18zjyix` zfaYINnf?UL33@tO2F7FaFVnv-XjuVTS{hn9S|&z%#uIeMR_fCUHv04O?3W!)y&ojJ zs1{PV!qIBxgm|dPnV452%r($v?u-<8x6HT20BK%6LkMJPQ!Ly{<5ie zLUk+cH^&Dr2Cg8c6dtY$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O@j6t=$vAO@MzXQ#?E20+Yzh4J`^;fQ5QR-IskeDPCY_Xq6Pm zUlA|MvJnOTav}4M8p$rvd@(tf5!35Q(ttKws~x1nxdp@jNC>fie(^MirRG9 zryqNiS?eH+Or|TzLI)hIW8!wBd=d67?(g~niWyMa{3MTMUvsZ>yiC*8yjw=62H$Vxjf`=k+>&x^mg0>CfGSpX86J{S0u9NdEy`=N=~j diff --git a/synfig-core/trunk/examples/walk/frame_03.jpg b/synfig-core/trunk/examples/walk/frame_03.jpg deleted file mode 100755 index 57b583ebe81f3ee0a4762caf2c097bf7b71426c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5842 zcmZ8l2|QF^`@e%qlBFz#Mv-LSvK2;){E%gcjKNeh60&dEq6Jwedo*^DJ%btRNV0Fq zmLal?eVxJBz2n#Kec%84|K9t#_j8|f?)g05=Q-y*&vOoc9{vW{wC`%&1weEFfTCT% z;Ud6(#~o?s1%Lns006)=(K5ht6Xp2W3P63KNkE6gz#D+=)TvX#}1-r2OWL` z-UFaNpegzfKn(Q9=uR9-|1J6R2GOwrbaWsP!!gDaC+O);97#cR^bG8mWX>GB34P>z z_GMJMfb16Jgu4x;_SaEyVD{@;UxWNxxw zf;vBX8C6ohn%*-`_iF8oi|ip0V5W7UW2a{aAi)0rDgp#v?HGI9g20Im^h~9gHQU)H=$5a|!d4Ccr|m=F zQld$*FkK_Zx?u*iQtcNvbKMVbfaTm!MWxmjmx$6LMxn`hwN%K4o6EO$ZDsdDxMgS5*7!zIfI1DdszSmJ2 zf=^Q_1CBbMr;tq~FW^_4!p1FJd<1GpZ=0O1IE9;gi9h$Ugb>l(6AlPi#f&aAJ82$W zYJUGg)KfP(j?O2guQ=E~0R|UEfGpbmkDuvT#8$V1ELg{WSE>FmKePUA6dIOh7=IIuiqsb}Qg$Q~+R5S&$}wE{NMJ7a3G+bl^*6hWn7rQ?dIevH(h|D(U-p z1UW@ztkT`}wZ%%XzSi&_UaS{^$vgyH_{;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zZ?J`CC@UM~{r9`?$bvJ8ZLUQ%*HdEJ66pO;+u27`o+*Uj5w9%+j^eV{&~qws%Ku#h znqyr@08M>Z^?<0Ep{|TX^~BwC$S`+G(AW0Ub(70|EtoKL$`T=!lyhkbi{Hy9?7&lP zuTQx0`6i4nTEPUeA}RJ%(K?RO$rHbLLbh=YZKs4LMmFD6s~<3FRZA@v( zua?3n%_3lb87z#eA>NP}mmelzHxSo02P!FSuLgAp4C_Bz-@P}g zy%6XW;iN773K|NJ*5Gqj(uk#_#R5hq207Bh$J1B0R`r~QPjTlfK}vjLfK8pGJU23RN-VOUvK^ZFPuH92}*g zmaLLkmpLQsd#US~&MErVHneJ2Q!+F!T0B!{^T)jv;O$-EXy#gH$ F{R_iV(`Wzy diff --git a/synfig-core/trunk/examples/walk/frame_04.jpg b/synfig-core/trunk/examples/walk/frame_04.jpg deleted file mode 100755 index e4ed4d6da62516fa2d49aa2a4b557ca4fa882402..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4891 zcmZ8l2{@G9`+f&mN_M6X@nv6P!XSjU;TuA>ghAG_mSq&#DlL{w*2$8|z6>)N*~XSV zrVvSENsPfXD9SpPzm~6m-|sosbwV9;?{lB`Jm-3M-|v0|c#I6-1^|c&0NnNp zusaX%o<+KPhX5de1polCz0e}Sb;|9ki#y=wXT;}aC%-7CTZLP7$< zGQz^5!oo7gB*pej@|dEstgNiEqPqIAW9sTBPwM|U#O@1#mmTyB=wk*+08G3fW?s;4 zJCFf@e%T(=w}OJ;sKbLKupXmtZZydENtJS-+R3Kj;QdRa+csX z_rH~xqgv5o;Sz9L;LYhINi|m~f?)2MK=oG3JIPQhAzsklbZpGbEKJP5#s={oQ8{Jq zpV;Djt0LzO)0d@y+kC2%5*CEr5rA{=AtqjCUO*q%iTVlQN6mcjkIrwG6;zZ;KE6)V zS-1;d4opgDZZ{yP*054y$`7HkEgiLXfq}SPz;adWJ;Ost$MT`qb#H7_-{JC21ht); zdlxuW8ItYvD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unk/examples/walk/walk.sifz deleted file mode 100644 index 673ca7a540df0e4c853f5538e1313f010068c494..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10574 zcmYj#1yCGOw=}j`kOh`NaM$4O?(Tsg!8H(AB)Gdn(vh@6!G#tE}v7Ie5*xCYS*5I=PVN-&SNQd~v4D+|`YUWm0 zISkjDPbWPvp5H9|+=;#uQM1vscV6mWoi{Efm@JK*sjgiuEF;un%QZyq4#aBpHMc$v z7%k-J_*R^E=&!A}3Kf9e?qc11J;Cmd*8_bi0}E?>SwCM}J^o%Co_-K;Yj~<}e|k9F zI!*KVGhuXp%yQ>}ErfYg0Ii!_cvbM#|M}PJ_W0DuVZv~!>hQJVA=CRl)}g9(xy`wu z`M3M;<_9kqW066hKcOvGqtLa_9hD-6Ypou?n+-GUNXNC0GwxUZUZy0sU7R_T&t+sp z9^bZ*R#l!0SLuitdA**F9iJs%%{v@dk)EB3lskxQuf<{>x8Sz9w|SP|@hy4B42a;l z<|JND?5#napTYGXW~F=QI$jpe-Eyj!SxDypzOFfVCOzajcoKDrZQSu@-#P5`*R&b= zKB&JM|84!<)ZC!bY9!>I`+Bx}_HP&3a_*iEV?D1u z?ps2G;%SUiKY6=?>RA+*fTK$-z4pbdd5#wO4`zfJuOUz_p#VgDj-;5j%< zQ5<1Qze?*W*+~Y-QtCFTYp?t&_|Yd&hf0%j;FR~`ShVH zn;F$QLDEIHwy`m5JUeBTW`y~nkRg({2s<}X^;HGUEd3=1f3}{T7Mb^FFG@ECOL!K^ z*Y>|2U`KD4#}Q~b3+Cse=i1lrZSC&gcgJOx>r>7IJweveFL5hErf9|W5+LJm)=}Ep|=C1^Q0s(SoEi@69i7% z`U`3L@*qtP8qH+@Y2uX86&DQ!q=F4G6h(_oFKXyjcI~IN*P%fZQ2=kNXgBAd7S-R@ zcW(ZN6BS@TSP$`VL`@f@{%#s-_~m67CjWb@sz4Dx~wru36+%((_iodr>Oyj1q&20_wq29>{mra=~UN}S5;y1T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unk/examples/warptext.sifz deleted file mode 100644 index 44eb6aeebbfbe31d662e0e4a9b0e4e6bbe236427..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 690 zcmV;j0!{rNiwFq#-0nsK19xF^aCBvObS`sgW_kdvR?BjuFc7@wD^%PK2qb~3F!_PK zW%uk7AY;|?Dj`3}*RN1)%m!>6C-#MzvASn^G=rnpQ(1rmm#wI)wFPb0dW~PAlvM}T zUj42OEpQZ>+N~`Vx)#`Rk?+*n@&av~ByaU&=p&mT9AM7^-PCmu{J2W$)7n}g+ch8H z*&a3zgJ*SdS%6hautG2mq}jJk4`_a8frRIxS}9R-o!iy|yvjyalBac1%RX)VfjWJF zXF@A}0U)Ya$>TqoPZc~vkz?#WP_T|mpt?pwD}GWst5k_YZ^=Ek#tL}`N}p+%WF_b! z*4Fzb(_@YzfjQ#n@pO5^>$e)b- zEQW)h4Q$Sc?ske>R*IsV)cVG%7QAsOwvX1@s;=NSHGiOYM>BXg5zr(3PwTSL^V$By zT{`?ESS#K~;v9IY{<{e$-Pw=j@X^K7DAs+7b=MA$ac*q?<2&aufK>)b%dA_&!r(oPw3dwC-N@6X7@shF!en8nSG_{3B<%l z0eq&78E@5M`Mw=cOh^!hB$$>T`mT>c5BvVp{P*kkZ5#%KV2p!F{hsZH-=$BM=mXtd zs#8ESLqwrZLfEVGH2tFbkP<>sh}~)Xp-l-T7!pe16A7e+XudXjp8$4x0lwGO{2E91 Y*Z45S`gLmlImR#l0AmrLm01b^0O~4Xu>b%7 diff --git a/synfig-core/trunk/examples/z_depth_test.sifz b/synfig-core/trunk/examples/z_depth_test.sifz deleted file mode 100644 index aad89648e77f13e3c1af618611a844f6a233623c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1330 zcmV-21&iwFQE-6;_OOT1toDo?;(#?F zK}n#YfBia60w(X!q&pg%6Mj{dtIA)MT};0pw>CH+&&RGa6QsTR1%O2I2K4m#tf$wc6tHcA|jh50OXi)OZ7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7|@4FlCdAYPa#Pf0~9p&Xx oUM_7+otI0CG} -# - -AC_DEFUN([ETL_DEPS], -[ - AC_C_BIGENDIAN - - AC_CHECK_LIB(user32, main) - AC_CHECK_LIB([kernel32], [CreateMutex]) - AC_CHECK_LIB([pthread], [pthread_mutex_init]) - - AC_HEADER_STDC - - AC_CHECK_HEADERS(pthread.h) - AC_CHECK_HEADERS(sched.h) - AC_CHECK_HEADERS(sys/times.h) - AC_CHECK_HEADERS(sys/time.h) - AC_CHECK_HEADERS(unistd.h) - AC_CHECK_HEADERS(windows.h) - AC_CHECK_FUNCS([pthread_create]) - AC_CHECK_FUNCS([pthread_rwlock_init]) - AC_CHECK_FUNCS([pthread_yield]) - AC_CHECK_FUNCS([sched_yield]) - AC_CHECK_FUNCS([CreateThread]) - AC_CHECK_FUNCS([__clone]) - AC_CHECK_FUNCS([QueryPerformanceCounter]) - - AC_CHECK_FUNCS([gettimeofday]) - AC_CHECK_FUNCS([vsscanf]) - AC_CHECK_FUNCS([vsprintf]) - AC_CHECK_FUNCS([vasprintf]) - AC_CHECK_FUNCS([vsnprintf],[],[ - AC_CHECK_FUNC([_vsnprintf],[ - AC_DEFINE(vsnprintf,_vsnprintf,[define if the vsnprintf function is mangled]) - AC_DEFINE(HAVE_VSNPRINTF,1) - ]) - ]) - - $1 -]) - -AC_DEFUN([USING_ETL], -[ - AC_ARG_WITH(ETL-includes, - [ --with-ETL-includes Specify location of ETL headers],[ - CXXFLAGS="$CXXFLAGS -I$withval" - ]) - - AC_PATH_PROG(ETL_CONFIG,ETL-config,no) - - if test "$ETL_CONFIG" = "no"; then - no_ETL_config="yes" - $2 - else - AC_MSG_CHECKING([if $ETL_CONFIG works]) - if $ETL_CONFIG --libs >/dev/null 2>&1; then - ETL_VERSION="`$ETL_CONFIG --version`" - AC_MSG_RESULT([yes, $ETL_VERSION]) - CXXFLAGS="$CXXFLAGS `$ETL_CONFIG --cxxflags`" - $1 - else - AC_MSG_RESULT(no) - no_ETL_config="yes" - $2 - fi - fi - - ETL_DEPS($1,$2) -]) - - diff --git a/synfig-core/trunk/m4/cxx_macros.m4 b/synfig-core/trunk/m4/cxx_macros.m4 deleted file mode 100644 index 8fc247a..0000000 --- a/synfig-core/trunk/m4/cxx_macros.m4 +++ /dev/null @@ -1,88 +0,0 @@ -AC_DEFUN([AC_CXX_FUNCTION_NONTYPE_PARAMETERS], -[AC_CACHE_CHECK(whether the compiler supports function templates with non-type parameters, -ac_cv_cxx_function_nontype_parameters, -[AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([ -template class A {}; -template int f(const A& x) { return 0; } -],[A z; return f(z);], - ac_cv_cxx_function_nontype_parameters=yes, ac_cv_cxx_function_nontype_parameters=no) - AC_LANG_RESTORE -]) -if test "$ac_cv_cxx_function_nontype_parameters" = yes; then - AC_DEFINE(HAVE_FUNCTION_NONTYPE_PARAMETERS,, - [define if the compiler supports function templates with non-type parameters]) -fi -]) - -AC_DEFUN([AC_CXX_NAMESPACES], -[AC_CACHE_CHECK(whether the compiler implements namespaces, -ac_cv_cxx_namespaces, -[AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], - [using namespace Outer::Inner; return i;], - ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no) - AC_LANG_RESTORE -]) -if test "$ac_cv_cxx_namespaces" = yes; then - AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) -fi -]) - -AC_DEFUN([AC_CXX_HAVE_COMPLEX], -[AC_CACHE_CHECK(whether the compiler has complex, -ac_cv_cxx_have_complex, -[AC_REQUIRE([AC_CXX_NAMESPACES]) - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([#include -#ifdef HAVE_NAMESPACES -using namespace std; -#endif],[complex a; complex b; return 0;], - ac_cv_cxx_have_complex=yes, ac_cv_cxx_have_complex=no) - AC_LANG_RESTORE -]) -if test "$ac_cv_cxx_have_complex" = yes; then - AC_DEFINE(HAVE_COMPLEX,,[define if the compiler has complex]) -fi -]) - -AC_DEFUN([AC_CXX_HAVE_SSTREAM], -[AC_CACHE_CHECK(whether the compiler has stringstream, -ac_cv_cxx_have_sstream, -[AC_REQUIRE([AC_CXX_NAMESPACES]) - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([#include -#ifdef HAVE_NAMESPACES -using namespace std; -#endif],[stringstream message; message << "Hello"; return 0;], - ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no) - AC_LANG_RESTORE -]) -if test "$ac_cv_cxx_have_sstream" = yes; then - AC_DEFINE(HAVE_SSTREAM,,[define if the compiler has stringstream]) -fi -]) - -AC_DEFUN([AC_CXX_MUTABLE], -[AC_CACHE_CHECK(whether the compiler supports the mutable keyword, -ac_cv_cxx_mutable, -[AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_COMPILE([ -class A { mutable int i; - public: - int f (int n) const { i = n; return i; } - }; -],[A a; return a.f (1);], - ac_cv_cxx_mutable=yes, ac_cv_cxx_mutable=no) - AC_LANG_RESTORE -]) -if test "$ac_cv_cxx_mutable" = yes; then - AC_DEFINE(HAVE_MUTABLE,,[define if the compiler supports the mutable keyword]) -fi -]) - diff --git a/synfig-core/trunk/m4/freetype2.m4 b/synfig-core/trunk/m4/freetype2.m4 deleted file mode 100644 index 14c3b3a..0000000 --- a/synfig-core/trunk/m4/freetype2.m4 +++ /dev/null @@ -1,146 +0,0 @@ -# Configure paths for FreeType2 -# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor - -dnl AC_CHECK_FT2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for FreeType2, and define FT2_CFLAGS and FT2_LIBS -dnl -AC_DEFUN([AC_CHECK_FT2], -[dnl -dnl Get the cflags and libraries from the freetype-config script -dnl -AC_ARG_WITH(ft-prefix, -[ --with-ft-prefix=PREFIX - Prefix where FreeType is installed (optional)], - ft_config_prefix="$withval", ft_config_prefix="") -AC_ARG_WITH(ft-exec-prefix, -[ --with-ft-exec-prefix=PREFIX - Exec prefix where FreeType is installed (optional)], - ft_config_exec_prefix="$withval", ft_config_exec_prefix="") -AC_ARG_ENABLE(freetypetest, -[ --disable-freetypetest Do not try to compile and run - a test FreeType program], - [], enable_fttest=yes) - -if test x$ft_config_exec_prefix != x ; then - ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix" - if test x${FT2_CONFIG+set} != xset ; then - FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config - fi -fi -if test x$ft_config_prefix != x ; then - ft_config_args="$ft_config_args --prefix=$ft_config_prefix" - if test x${FT2_CONFIG+set} != xset ; then - FT2_CONFIG=$ft_config_prefix/bin/freetype-config - fi -fi -AC_PATH_PROG(FT2_CONFIG, freetype-config, no) - -min_ft_version=ifelse([$1], ,6.1.0,$1) -AC_MSG_CHECKING(for FreeType - version >= $min_ft_version) -no_ft="" -if test "$FT2_CONFIG" = "no" ; then - no_ft=yes -else - FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags` - FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs` - ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - ft_min_major_version=`echo $min_ft_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - ft_min_minor_version=`echo $min_ft_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - ft_min_micro_version=`echo $min_ft_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test x$enable_fttest = xyes ; then - ft_config_is_lt="" - if test $ft_config_major_version -lt $ft_min_major_version ; then - ft_config_is_lt=yes - else - if test $ft_config_major_version -eq $ft_min_major_version ; then - if test $ft_config_minor_version -lt $ft_min_minor_version ; then - ft_config_is_lt=yes - else - if test $ft_config_minor_version -eq $ft_min_minor_version ; then - if test $ft_config_micro_version -lt $ft_min_micro_version ; then - ft_config_is_lt=yes - fi - fi - fi - fi - fi - if test x$ft_config_is_lt = xyes ; then - no_ft=yes - else - ac_save_CFLAGS="$CFLAGS" - ac_save_CXXFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $FT2_CFLAGS" - CXXFLAGS="$CXXFLAGS $FT2_CFLAGS" - LIBS="$FT2_LIBS $LIBS" -dnl -dnl Sanity checks for the results of freetype-config to some extent -dnl - AC_TRY_RUN([ -#include -#include FT_FREETYPE_H -#include -#include - -int -main() -{ - FT_Library library; - FT_Error error; - - error = FT_Init_FreeType(&library); - - if (error) - return 1; - else - { - FT_Done_FreeType(library); - return 0; - } -} -],, no_ft=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - fi # test $ft_config_version -lt $ft_min_version - fi # test x$enable_fttest = xyes -fi # test "$FT2_CONFIG" = "no" -if test x$no_ft = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) -else - AC_MSG_RESULT(no) - if test "$FT2_CONFIG" = "no" ; then - echo "*** The freetype-config script installed by FreeType 2 could not be found." - echo "*** If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the FT2_CONFIG environment variable to the" - echo "*** full path to freetype-config." - else - if test x$ft_config_is_lt = xyes ; then - echo "*** Your installed version of the FreeType 2 library is too old." - echo "*** If you have different versions of FreeType 2, make sure that" - echo "*** correct values for --with-ft-prefix or --with-ft-exec-prefix" - echo "*** are used, or set the FT2_CONFIG environment variable to the" - echo "*** full path to freetype-config." - else - echo "*** The FreeType test program failed to run. If your system uses" - echo "*** shared libraries and they are installed outside the normal" - echo "*** system library path, make sure the variable LD_LIBRARY_PATH" - echo "*** (or whatever is appropiate for your system) is correctly set." - fi - fi - FT2_CFLAGS="" - FT2_LIBS="" - ifelse([$3], , :, [$3]) -fi -AC_SUBST(FT2_CFLAGS) -AC_SUBST(FT2_LIBS) -]) diff --git a/synfig-core/trunk/m4/libxml++.m4 b/synfig-core/trunk/m4/libxml++.m4 deleted file mode 100644 index 71843d8..0000000 --- a/synfig-core/trunk/m4/libxml++.m4 +++ /dev/null @@ -1,23 +0,0 @@ -dnl AC_LIBXMLPP([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) - -AC_DEFUN([AM_LIBXMLPP], -[ - -AC_PATH_PROG(XMLPP_CONFIG,xml++-config,no) - -AC_MSG_CHECKING(for libxml++) - -if $XMLPP_CONFIG --libs print > /dev/null 2>&1; then - AC_MSG_RESULT(yes) - LIBXMLPP_CFLAGS=`xml++-config --cflags` - LIBXMLPP_LIBS=`xml++-config --libs` - AC_SUBST(LIBXMLPP_CFLAGS) - AC_SUBST(LIBXMLPP_LIBS) - ifelse([$1], , :, [$1]) -else - AC_MSG_RESULT(no) - ifelse([$2], , , [$2]) -fi - -]) - diff --git a/synfig-core/trunk/m4/libxml.m4 b/synfig-core/trunk/m4/libxml.m4 deleted file mode 100644 index 8b0e006..0000000 --- a/synfig-core/trunk/m4/libxml.m4 +++ /dev/null @@ -1,389 +0,0 @@ -# Configure paths for LIBXML2 -# Toshio Kuratomi 2001-04-21 -# Adapted from: -# Configure paths for GLIB -# Owen Taylor 97-11-3 - -dnl AM_PATH_XML([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for XML, and define XML_CFLAGS and XML_LIBS -dnl -AC_DEFUN([AM_PATH_XML],[ -AC_ARG_WITH(xml-prefix, - [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)], - xml_config_prefix="$withval", xml_config_prefix="") -AC_ARG_WITH(xml-exec-prefix, - [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)], - xml_config_exec_prefix="$withval", xml_config_exec_prefix="") -AC_ARG_ENABLE(xmltest, - [ --disable-xmltest Do not try to compile and run a test LIBXML program],, - enable_xmltest=yes) - - if test x$xml_config_exec_prefix != x ; then - xml_config_args="$xml_config_args --exec-prefix=$xml_config_exec_prefix" - if test x${XML_CONFIG+set} != xset ; then - XML_CONFIG=$xml_config_exec_prefix/bin/xml-config - fi - fi - if test x$xml_config_prefix != x ; then - xml_config_args="$xml_config_args --prefix=$xml_config_prefix" - if test x${XML_CONFIG+set} != xset ; then - XML_CONFIG=$xml_config_prefix/bin/xml-config - fi - fi - - AC_PATH_PROG(XML_CONFIG, xml-config, no) - min_xml_version=ifelse([$1], ,1.0.0,[$1]) - AC_MSG_CHECKING(for libxml - version >= $min_xml_version) - no_xml="" - if test "$XML_CONFIG" = "no" ; then - no_xml=yes - else - XML_CFLAGS=`$XML_CONFIG $xml_config_args --cflags` - XML_LIBS=`$XML_CONFIG $xml_config_args --libs` - xml_config_major_version=`$XML_CONFIG $xml_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - xml_config_minor_version=`$XML_CONFIG $xml_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - xml_config_micro_version=`$XML_CONFIG $xml_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_xmltest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $XML_CFLAGS" - LIBS="$XML_LIBS $LIBS" -dnl -dnl Now check if the installed libxml is sufficiently new. -dnl (Also sanity checks the results of xml-config to some extent) -dnl - rm -f conf.xmltest - AC_TRY_RUN([ -#include -#include -#include -#include - -int -main() -{ - int xml_major_version, xml_minor_version, xml_micro_version; - int major, minor, micro; - char *tmp_version; - int tmp_int_version; - - system("touch conf.xmltest"); - - /* Capture xml-config output via autoconf/configure variables */ - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = (char *)strdup("$min_xml_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string from xml-config\n", "$min_xml_version"); - exit(1); - } - free(tmp_version); - - /* Capture the version information from the header files */ - tmp_int_version = LIBXML_VERSION; - xml_major_version=tmp_int_version / 10000; - xml_minor_version=(tmp_int_version - xml_major_version * 10000) / 100; - xml_micro_version=(tmp_int_version - xml_minor_version * 100 - xml_major_version * 10000); - - /* Compare xml-config output to the libxml headers */ - if ((xml_major_version != $xml_config_major_version) || - (xml_minor_version != $xml_config_minor_version) -#if 0 - || -/* The last released version of libxml-1.x has an incorrect micro version in - * the header file so neither the includes nor the library will match the - * micro_version to the output of xml-config - */ - (xml_micro_version != $xml_config_micro_version) -#endif - ) - - { - printf("*** libxml header files (version %d.%d.%d) do not match\n", - xml_major_version, xml_minor_version, xml_micro_version); - printf("*** xml-config (version %d.%d.%d)\n", - $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version); - return 1; - } -/* Compare the headers to the library to make sure we match */ - /* Less than ideal -- doesn't provide us with return value feedback, - * only exits if there's a serious mismatch between header and library. - */ - LIBXML_TEST_VERSION; - - /* Test that the library is greater than our minimum version */ - if (($xml_config_major_version > major) || - (($xml_config_major_version == major) && ($xml_config_minor_version > minor)) || - (($xml_config_major_version == major) && ($xml_config_minor_version == minor) && - ($xml_config_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** An old version of libxml (%d.%d.%d) was found.\n", - xml_major_version, xml_minor_version, xml_micro_version); - printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n", - major, minor, micro); - printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n"); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the xml-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of LIBXML, but you can also set the XML_CONFIG environment to point to the\n"); - printf("*** correct copy of xml-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - return 1; -} -],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - - if test "x$no_xml" = x ; then - AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version)) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$XML_CONFIG" = "no" ; then - echo "*** The xml-config script installed by LIBXML could not be found" - echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the XML_CONFIG environment variable to the" - echo "*** full path to xml-config." - else - if test -f conf.xmltest ; then - : - else - echo "*** Could not run libxml test program, checking why..." - CFLAGS="$CFLAGS $XML_CFLAGS" - LIBS="$LIBS $XML_LIBS" - AC_TRY_LINK([ -#include -#include -], [ LIBXML_TEST_VERSION; return 0;], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding LIBXML or finding the wrong" - echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means LIBXML was incorrectly installed" - echo "*** or that you have moved LIBXML since it was installed. In the latter case, you" - echo "*** may want to edit the xml-config script: $XML_CONFIG" ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - - XML_CFLAGS="" - XML_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(XML_CFLAGS) - AC_SUBST(XML_LIBS) - rm -f conf.xmltest -]) - -# Configure paths for LIBXML2 -# Toshio Kuratomi 2001-04-21 -# Adapted from: -# Configure paths for GLIB -# Owen Taylor 97-11-3 - -dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for XML, and define XML_CFLAGS and XML_LIBS -dnl -AC_DEFUN([AM_PATH_XML2],[ -AC_ARG_WITH(xml-prefix, - [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)], - xml_config_prefix="$withval", xml_config_prefix="") -AC_ARG_WITH(xml-exec-prefix, - [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)], - xml_config_exec_prefix="$withval", xml_config_exec_prefix="") -AC_ARG_ENABLE(xmltest, - [ --disable-xmltest Do not try to compile and run a test LIBXML program],, - enable_xmltest=yes) - - if test x$xml_config_exec_prefix != x ; then - xml_config_args="$xml_config_args --exec-prefix=$xml_config_exec_prefix" - if test x${XML2_CONFIG+set} != xset ; then - XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config - fi - fi - if test x$xml_config_prefix != x ; then - xml_config_args="$xml_config_args --prefix=$xml_config_prefix" - if test x${XML2_CONFIG+set} != xset ; then - XML2_CONFIG=$xml_config_prefix/bin/xml2-config - fi - fi - - AC_PATH_PROG(XML2_CONFIG, xml2-config, no) - min_xml_version=ifelse([$1], ,2.0.0,[$1]) - AC_MSG_CHECKING(for libxml - version >= $min_xml_version) - no_xml="" - if test "$XML2_CONFIG" = "no" ; then - no_xml=yes - else - XML_CFLAGS=`$XML2_CONFIG $xml_config_args --cflags` - XML_LIBS=`$XML2_CONFIG $xml_config_args --libs` - xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_xmltest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_CXXFLAGS="$CXXFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $XML_CFLAGS" - CXXFLAGS="$CXXFLAGS $XML_CFLAGS" - LIBS="$XML_LIBS $LIBS" -dnl -dnl Now check if the installed libxml is sufficiently new. -dnl (Also sanity checks the results of xml2-config to some extent) -dnl - rm -f conf.xmltest - AC_TRY_RUN([ -#include -#include -#include -#include - -int -main() -{ - int xml_major_version, xml_minor_version, xml_micro_version; - int major, minor, micro; - char *tmp_version; - - system("touch conf.xmltest"); - - /* Capture xml2-config output via autoconf/configure variables */ - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = (char *)strdup("$min_xml_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string from xml2-config\n", "$min_xml_version"); - exit(1); - } - free(tmp_version); - - /* Capture the version information from the header files */ - tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION); - if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) { - printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION"); - exit(1); - } - free(tmp_version); - - /* Compare xml2-config output to the libxml headers */ - if ((xml_major_version != $xml_config_major_version) || - (xml_minor_version != $xml_config_minor_version) || - (xml_micro_version != $xml_config_micro_version)) - { - printf("*** libxml header files (version %d.%d.%d) do not match\n", - xml_major_version, xml_minor_version, xml_micro_version); - printf("*** xml2-config (version %d.%d.%d)\n", - $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version); - return 1; - } -/* Compare the headers to the library to make sure we match */ - /* Less than ideal -- doesn't provide us with return value feedback, - * only exits if there's a serious mismatch between header and library. - */ - LIBXML_TEST_VERSION; - - /* Test that the library is greater than our minimum version */ - if ((xml_major_version > major) || - ((xml_major_version == major) && (xml_minor_version > minor)) || - ((xml_major_version == major) && (xml_minor_version == minor) && - (xml_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** An old version of libxml (%d.%d.%d) was found.\n", - xml_major_version, xml_minor_version, xml_micro_version); - printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n", - major, minor, micro); - printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n"); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the xml2-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n"); - printf("*** correct copy of xml2-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - return 1; -} -],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - - if test "x$no_xml" = x ; then - AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version)) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$XML2_CONFIG" = "no" ; then - echo "*** The xml2-config script installed by LIBXML could not be found" - echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the XML2_CONFIG environment variable to the" - echo "*** full path to xml2-config." - else - if test -f conf.xmltest ; then - : - else - echo "*** Could not run libxml test program, checking why..." - CFLAGS="$CFLAGS $XML_CFLAGS" - CXXFLAGS="$CXXFLAGS $XML_CFLAGS" - LIBS="$LIBS $XML_LIBS" - AC_TRY_LINK([ -#include -#include -], [ LIBXML_TEST_VERSION; return 0;], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding LIBXML or finding the wrong" - echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means LIBXML was incorrectly installed" - echo "*** or that you have moved LIBXML since it was installed. In the latter case, you" - echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ]) - CFLAGS="$ac_save_CFLAGS" - CXXFLAGS="$ac_save_CXXFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - - XML_CFLAGS="" - XML_LIBS="" - $3 - - - ifelse([$3], , :, [$3]) - fi - AC_SUBST(XML_CFLAGS) - AC_SUBST(XML_LIBS) - rm -f conf.xmltest -]) diff --git a/synfig-core/trunk/m4/pkgconfig.m4 b/synfig-core/trunk/m4/pkgconfig.m4 deleted file mode 100644 index f2bfc2d..0000000 --- a/synfig-core/trunk/m4/pkgconfig.m4 +++ /dev/null @@ -1,57 +0,0 @@ - -dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) -dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page -dnl also defines GSTUFF_PKG_ERRORS on error -AC_DEFUN([PKG_CHECK_MODULES], [ - succeeded=no - - if test -z "$PKG_CONFIG"; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - AC_MSG_CHECKING(for $2) - - if $PKG_CONFIG --exists "$2" ; then - AC_MSG_RESULT(yes) - succeeded=yes - - AC_MSG_CHECKING($1_CFLAGS) - $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` - AC_MSG_RESULT($$1_CFLAGS) - - AC_MSG_CHECKING($1_LIBS) - $1_LIBS=`$PKG_CONFIG --libs "$2"` - AC_MSG_RESULT($$1_LIBS) - else - $1_CFLAGS="" - $1_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - ifelse([$4], ,echo $$1_PKG_ERRORS,) - fi - - AC_SUBST($1_CFLAGS) - AC_SUBST($1_LIBS) - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - ifelse([$3], , :, [$3]) - else - ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) - fi -]) - - diff --git a/synfig-core/trunk/m4/subs.m4 b/synfig-core/trunk/m4/subs.m4 deleted file mode 100644 index 9421a8c..0000000 --- a/synfig-core/trunk/m4/subs.m4 +++ /dev/null @@ -1,246 +0,0 @@ - -## AC_ARG_WARNINGS() -## -## Provide the --enable-warnings configure argument, set to 'minimum' -## by default. -## -AC_DEFUN([AC_ARG_WARNINGS], -[ - AC_ARG_ENABLE([warnings], - [ --enable-warnings=[[none|minimum|maximum|hardcore]] - Control compiler pickyness. [[default=maximum]]], - [gtkmm_enable_warnings="$enableval"], - gtkmm_enable_warnings="maximum") - - AC_MSG_CHECKING([for compiler warning flags to use]) - - gtkmm_warning_flags='' - - # -W is now known as -Wextra, but that's not known by gcc 2 or 3 - case "$gtkmm_enable_warnings" in - none|no) gtkmm_warning_flags='';; - minimum|yes) gtkmm_warning_flags='-Wall -Wno-unused-parameter';; - maximum) gtkmm_warning_flags='-W -Wall';; - hardcore) gtkmm_warning_flags='-W -Wall -Werror';; - esac - - gtkmm_use_flags='' - - if test "x$gtkmm_warning_flags" != "x" - then - echo 'int foo() { return 0; }' > conftest.cc - - for flag in $gtkmm_warning_flags - do - # Test whether the compiler accepts the flag. GCC doesn't bail - # out when given an unsupported flag but prints a warning, so - # check the compiler output instead. - gtkmm_cxx_out="`$CXX $flag -c conftest.cc 2>&1`" - rm -f conftest.$OBJEXT - test "x${gtkmm_cxx_out}" = "x" && \ - gtkmm_use_flags="${gtkmm_use_flags:+$gtkmm_use_flags }$flag" - done - - rm -f conftest.cc - gtkmm_cxx_out='' - fi - - if test "x$gtkmm_use_flags" != "x" - then - for flag in $gtkmm_use_flags - do - case " $CXXFLAGS " in - *" $flag "*) ;; # don't add flags twice - *) CXXFLAGS="${CXXFLAGS:+$CXXFLAGS }$flag";; - esac - done - else - gtkmm_use_flags='none' - fi - - AC_MSG_RESULT([$gtkmm_use_flags]) -]) - - - - -AC_DEFUN([AC_ARG_DEBUG], -[ - AC_MSG_CHECKING([for debug flags]) - - AC_ARG_ENABLE(debug,[ --enable-debug Build in debugging mode],[ - debug=$enableval - ],[ - debug="no" - ]) - debug_flags='' - - case "$debug" in - yes) - debug_flags="-D_DEBUG -g" - ;; - half) - debug_flags="-DNDEBUG -g" - ;; - no|*) - debug_flags="-DNDEBUG" - ;; - esac - - - CXXFLAGS="`echo $CXXFLAGS | sed s:-g::` $debug_flags" - CFLAGS="`echo $CFLAGS | sed s:-g::` $debug_flags" - - AC_MSG_RESULT([$debug_flags]) -]) - - - - -## Optimisation level 2 in g++ 4.1 or g++ 4.2 breaks composition loading in the vector parsing function in loadcanvas.cpp (1509627) -AC_DEFUN([AC_ARG_OPTIMIZATION], -[ - AC_MSG_CHECKING([for optimization flags]) - - AC_ARG_ENABLE(optimization,[ --enable-optimization=[[0,1,2,3,4]] Select optimization level (default=2)],[ - optimization=$enableval - ],[ - optimization="2" - ]) - optimization_flags='' - case "$optimization" in - 0|no) optimization_flags="-O0";; - 1) optimization_flags="-O1";; - 2|yes) optimization_flags="-O2";; - pass1) optimization_flags="-O2 -fprofile-arcs";; - pass2) optimization_flags="-O2 -fbranch-probabilities";; - 3) optimization_flags="-O3";; - *) optimization_flags="-O4";; - esac - CXXFLAGS="`echo $CXXFLAGS | sed 's:-O.::g'` $optimization_flags" - CFLAGS="`echo $CFLAGS | sed 's:-O.::g'` $optimization_flags" - AC_MSG_RESULT([$optimization_flags]) -]) - -AC_DEFUN([AC_ARG_PROFILE_ARCS], -[ - AC_MSG_CHECKING([for arc profiling]) - - AC_ARG_ENABLE(profile-arcs,[ --enable-profile-arcs Enable arc profiling],[ - profile_arcs=$enableval - ],[ - profile_arcs=no - ]) - - if test $profile_arcs = "yes" ; then { - CXXFLAGS="$CXXFLAGS -fprofile-arcs"; - CFLAGS="$CFLAGS -fprofile-arcs"; - } ; fi - - AC_MSG_RESULT([$profile_arcs]) -]) - -AC_DEFUN([AC_ARG_BRANCH_PROBABILITIES], -[ - AC_MSG_CHECKING([for branch-probabilities]) - - AC_ARG_ENABLE(branch-probabilities,[ --enable-branch-probabilities Enable branch-probabilities],[ - branch_probabilities=$enableval - ],[ - branch_probabilities=no - ]) - - if test $branch_probabilities = "yes" ; then { - CXXFLAGS="$CXXFLAGS -fbranch-probabilities"; - CFLAGS="$CFLAGS -fbranch-probabilities"; - } ; fi - - AC_MSG_RESULT([$branch_probabilities]) -]) - -AC_DEFUN([AC_ARG_PROFILING], -[ - AC_MSG_CHECKING([for profiling]) - - AC_ARG_ENABLE(profiling,[ --enable-profiling Enable profiling using gprof],[ - profiling=$enableval - ],[ - profiling=no - ]) - - if test $profiling = "yes" ; then { - CFLAGS="$CFLAGS -pg"; - CXXFLAGS="$CXXFLAGS -pg"; - LDFLAGS="$LDFLAGS -pg"; - LIBS="$LIBS"; - } ; fi - - AC_MSG_RESULT([$profiling]) -]) - -MINGW_FLAGS="-mno-cygwin" - - -AC_DEFUN([AC_WIN32_QUIRKS], -[ - -case "$host" in - *mingw*) - AC_MSG_CHECKING([the flavor of the compiler]) - if ( $CC --version | grep -q mingw ) ; then { - AC_MSG_RESULT([compiler is mingw special]) - LIBTOOL_PATCH_SED=" - s/dir=\"\$absdir\"/dir=\`cygpath -d -m \"\$absdir\"\`/; - s/absdir=\`cd \"\$dir\" && pwd\`/absdir=\`cygpath -d -m \"\$dir\"\`/; - s/# We need an absolute path/dir=\`cygpath -d -m \"\$dir\"\` # We need an absolute path/; - s- /usr/lib- C:/mingw/lib-g; - s-\"/lib -\"C:/mingw/lib -g; - s- /lib/ - -g; - "; - sys_lib_dlsearch_path_spec="C:/mingw/lib" - ac_default_prefix=`cygpath -d -m "$ac_default_prefix"`; - } else { - AC_MSG_RESULT([compiler is cygwin stock, adding -mno-cygwin]) - CPP="$CPP $MINGW_FLAGS" - CC="$CC $MINGW_FLAGS" - CXX="$CXX $MINGW_FLAGS -L/usr/$host/lib -I/usr/include/c++/3.3.3/$host" - CXXCPP="$CXXCPP $MINGW_FLAGS" - - -} ; fi - - LTCC="gcc" - CXXFLAGS="$CXXFLAGS -LC:/GTK/lib" - CFLAGS="$CFLAGS -LC:/GTK/lib" - LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols -Wl,--subsystem=console -Wl,--enable-runtime-pseudo-reloc" -dnl LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--subsystem=console -Wl,--enable-runtime-pseudo-reloc" - ;; - *cygwin*) - LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols" -dnl LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--subsystem=console" - CXXFLAGS="$CXXFLAGS -I/target/include" - CFLAGS="$CFLAGS -I/target/include" - ;; - powerpc-apple*) - echo Adding mac-specific optimization flags. . . - CXXFLAGS="$CXXFLAGS $G5OPTFLAGS" - ;; -esac - - -]) - -AC_DEFUN([AC_LIBTOOL_PATCH], -[ - -if [[ "$LIBTOOL_PATCH_SED""x" != "x" ]] ; then { - printf "Patching libtool... " - cat libtool | sed "$LIBTOOL_PATCH_SED" > libtool2 - rm libtool - mv libtool2 libtool - chmod +x libtool - AC_MSG_RESULT([patched]) -} fi ; - - -]) diff --git a/synfig-core/trunk/m4/synfig.m4 b/synfig-core/trunk/m4/synfig.m4 deleted file mode 100644 index f4f364b..0000000 --- a/synfig-core/trunk/m4/synfig.m4 +++ /dev/null @@ -1,51 +0,0 @@ -# SYNFIG M4 Macro -# For GNU Autotools -# $Id$ -# -# By Robert B. Quattlebaum Jr. -# AM_LIBXMLPP(,$2) - - -AC_DEFUN([SYNFIG_DEPS], -[ - USING_ETL(,$2) - AM_PATH_XML2(,,$2) - AC_CHECK_FUNCS([floor pow sqrt],,$2) - AM_LIBXMLPP(,$2) - - CXXFLAGS="$CXXFLAGS $LIBXMLPP_CFLAGS" - LIBS="$LIBS $LIBXMLPP_LIBS" - - $1 -]) - -AC_DEFUN([USING_SYNFIG], -[ - AC_ARG_WITH(synfig-includes, - [ --with-synfig-includes Specify location of synfig headers],[ - CXXFLAGS="$CXXFLAGS -I$withval" - ]) - - AC_PATH_PROG(SYNFIG_CONFIG,synfig-config,no) - - if test "$SYNFIG_CONFIG" = "no"; then - no_SYNFIG_config="yes" - $2 - else - AC_MSG_CHECKING([if $SYNFIG_CONFIG works]) - if $SYNFIG_CONFIG --libs >/dev/null 2>&1; then - SYNFIG_VERSION="`$SYNFIG_CONFIG --version`" - AC_MSG_RESULT([yes, $SYNFIG_VERSION]) - CXXFLAGS="$CXXFLAGS `$SYNFIG_CONFIG --cxxflags`" - $1 - else - AC_MSG_RESULT(no) - no_SYNFIG_config="yes" - $2 - fi - fi - - SYNFIG_DEPS($1,$2) -]) - - diff --git a/synfig-core/trunk/macosxbuild.sh b/synfig-core/trunk/macosxbuild.sh deleted file mode 100755 index 702ce31..0000000 --- a/synfig-core/trunk/macosxbuild.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh - -#OPTIONS="--disable-optimization --enable-debug" - -PREFIX=/Users/darco/Projects/Voria/synfig-build - -export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11R6/lib/pkgconfig -OPTIONS="--prefix=$PREFIX" -#OPTIONS="$OPTIONS --enable-optimization=2" -OPTIONS="$OPTIONS --enable-optimization=3" -#OPTIONS="$OPTIONS --enable-g5opt" -#OPTIONS="$OPTIONS --disable-optimization" -OPTIONS="$OPTIONS --disable-debug" -#OPTIONS="$OPTIONS --with-vimage" -OPTIONS="$OPTIONS --without-openexr" -OPTIONS="$OPTIONS --disable-dependency-tracking" -#OPTIONS="$OPTIONS --enable-universal" - -ARCH_FLAGS="" -#ARCH_FLAGS="$ARCH_FLAGS -arch ppc" -ARCH_FLAGS="$ARCH_FLAGS -arch i386" - -LDFLAGS="-L$PREFIX/lib" -CFLAGS="-I$PREFIX/include" -CXXFLAGS="-I$PREFIX/include" - -CC="gcc $LDFLAGS $CFLAGS $ARCH_FLAGS" -CXX="g++ $LDFLAGS $CFLAGS $ARCH_FLAGS" -CPP="gcc -E" -CXXCPP="g++ -E" - -#distcc --version && { -# CC=distcc -# CXX="distcc g++" -#} - - -BUILDDIR=macosxbuild - -[ -e configure ] || ( libtoolize --ltdl --copy --force && autoreconf --force --install ) || exit 1 - -[ -d $BUILDDIR ] && rm -fr $BUILDDIR - -mkdir $BUILDDIR - -cd $BUILDDIR - -echo ../configure $OPTIONS CC=\"$CC\" CXX=\"$CXX\" CPP=\"$CPP\" CXXCPP=\"$CXXCPP\" LDFLAGS=\"$LDFLAGS\" CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" - -../configure $OPTIONS CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" MACOS_DEPLOYMENT_TARGET=10.4 || exit 1 - -make -j2 -make install-strip - -#make package $MAKEFLAGS - -#make installer - - diff --git a/synfig-core/trunk/pkg-info/macosx/core-resources/License.txt b/synfig-core/trunk/pkg-info/macosx/core-resources/License.txt deleted file mode 100644 index c4792dd..0000000 --- a/synfig-core/trunk/pkg-info/macosx/core-resources/License.txt +++ /dev/null @@ -1,515 +0,0 @@ - - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations -below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. -^L - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it -becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. -^L - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control -compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. -^L - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. -^L - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. -^L - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. -^L - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply, and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License -may add an explicit geographical distribution limitation excluding those -countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. -^L - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS -^L - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms -of the ordinary General Public License). - - To apply these terms, attach the following notices to the library. -It is safest to attach them to the start of each source file to most -effectively convey the exclusion of warranty; and each file should -have at least the "copyright" line and a pointer to where the full -notice is found. - - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper -mail. - -You should also get your employer (if you work as a programmer) or -your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James -Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/synfig-core/trunk/pkg-info/macosx/core-resources/ReadMe.txt b/synfig-core/trunk/pkg-info/macosx/core-resources/ReadMe.txt deleted file mode 100644 index cdb5c31..0000000 --- a/synfig-core/trunk/pkg-info/macosx/core-resources/ReadMe.txt +++ /dev/null @@ -1 +0,0 @@ -This is the readme for Synfig Core. diff --git a/synfig-core/trunk/pkg-info/macosx/core-resources/Welcome.txt b/synfig-core/trunk/pkg-info/macosx/core-resources/Welcome.txt deleted file mode 100644 index f1e8e92..0000000 --- a/synfig-core/trunk/pkg-info/macosx/core-resources/Welcome.txt +++ /dev/null @@ -1 +0,0 @@ -This is the welcome for Synfig. diff --git a/synfig-core/trunk/pkg-info/macosx/core-resources/install.sh b/synfig-core/trunk/pkg-info/macosx/core-resources/install.sh deleted file mode 100755 index 5a537cc..0000000 --- a/synfig-core/trunk/pkg-info/macosx/core-resources/install.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -# finish up the installation -# this script should be executed using the sudo command -# this file is copied to synfig-devel.post_install and synfig-devel.post_upgrade -# inside the .pkg bundle -LOGFILE="/synfig_install.log" - -exit 0 - - -umask 022 - -RESOURCE_DIR=`dirname $0` -PREFIX=/usr/local - -cd $RESOURCE_DIR - -echo "Creating synfig-config script" -[ -d $PREFIX ] || mkdir $PREFIX -[ -d $PREFIX/bin ] || mkdir $PREFIX/bin -[ -d $PREFIX/include ] || mkdir $PREFIX/include -[ -d $PREFIX/lib ] || mkdir $PREFIX/lib -[ -d $PREFIX/sbin ] || mkdir $PREFIX/sbin - -echo "Cleaning up any previous installation" -[ -d $PREFIX/include/synfig ] && rm -fr $PREFIX/include/synfig -ln -s /Library/Frameworks/synfig.framework/Headers $PREFIX/include/synfig - -sed ' -s:@exec_prefix@:/usr/local:g; -s:@prefix@:/usr/local:g; -s:@bindir@:$exec_prefix/bin:g; -s:@libdir@:$exec_prefix/lib:g; -s:@includedir@:$prefix/include:g; -s:@VERSION@:@_VERSION_@:g; -s:@PACKAGE@:@_PACKAGE_@:g; -s:@LIBS@::g; -s:@VERSION@:@_VERSION_@:; -s:@PACKAGE@:@_PACKAGE_@:; -s:@CONFIG_LIBS@:-F/Library/Frameworks/synfig.framework:; -s:@SYNFIG_LIBS@:-F/Library/Frameworks/synfig.framework:; -s:@CONFIG_CFLAGS@:-framework synfig:; -' < $RESOURCE_DIR/synfig-config.in > $PREFIX/bin/synfig-config -chmod 775 $PREFIX/bin/synfig-config - -echo "Precompiling Headers" -#/usr/bin/c++ -precomp /Library/Frameworks/synfig.framework/Headers/synfig.h -o /Library/Frameworks/synfig.framework/Headers/synfig.p - -echo "Moving synfig tool" -cp $RESOURCE_DIR/synfig $PREFIX/bin || exit 1 - -echo "Done with shell script" - - -exit 0 - - - diff --git a/synfig-core/trunk/pkg-info/macosx/core-resources/upgrade.sh b/synfig-core/trunk/pkg-info/macosx/core-resources/upgrade.sh deleted file mode 100755 index 5a537cc..0000000 --- a/synfig-core/trunk/pkg-info/macosx/core-resources/upgrade.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -# finish up the installation -# this script should be executed using the sudo command -# this file is copied to synfig-devel.post_install and synfig-devel.post_upgrade -# inside the .pkg bundle -LOGFILE="/synfig_install.log" - -exit 0 - - -umask 022 - -RESOURCE_DIR=`dirname $0` -PREFIX=/usr/local - -cd $RESOURCE_DIR - -echo "Creating synfig-config script" -[ -d $PREFIX ] || mkdir $PREFIX -[ -d $PREFIX/bin ] || mkdir $PREFIX/bin -[ -d $PREFIX/include ] || mkdir $PREFIX/include -[ -d $PREFIX/lib ] || mkdir $PREFIX/lib -[ -d $PREFIX/sbin ] || mkdir $PREFIX/sbin - -echo "Cleaning up any previous installation" -[ -d $PREFIX/include/synfig ] && rm -fr $PREFIX/include/synfig -ln -s /Library/Frameworks/synfig.framework/Headers $PREFIX/include/synfig - -sed ' -s:@exec_prefix@:/usr/local:g; -s:@prefix@:/usr/local:g; -s:@bindir@:$exec_prefix/bin:g; -s:@libdir@:$exec_prefix/lib:g; -s:@includedir@:$prefix/include:g; -s:@VERSION@:@_VERSION_@:g; -s:@PACKAGE@:@_PACKAGE_@:g; -s:@LIBS@::g; -s:@VERSION@:@_VERSION_@:; -s:@PACKAGE@:@_PACKAGE_@:; -s:@CONFIG_LIBS@:-F/Library/Frameworks/synfig.framework:; -s:@SYNFIG_LIBS@:-F/Library/Frameworks/synfig.framework:; -s:@CONFIG_CFLAGS@:-framework synfig:; -' < $RESOURCE_DIR/synfig-config.in > $PREFIX/bin/synfig-config -chmod 775 $PREFIX/bin/synfig-config - -echo "Precompiling Headers" -#/usr/bin/c++ -precomp /Library/Frameworks/synfig.framework/Headers/synfig.h -o /Library/Frameworks/synfig.framework/Headers/synfig.p - -echo "Moving synfig tool" -cp $RESOURCE_DIR/synfig $PREFIX/bin || exit 1 - -echo "Done with shell script" - - -exit 0 - - - diff --git a/synfig-core/trunk/pkg-info/macosx/synfig-core.info.in b/synfig-core/trunk/pkg-info/macosx/synfig-core.info.in deleted file mode 100644 index 7dc1a3b..0000000 --- a/synfig-core/trunk/pkg-info/macosx/synfig-core.info.in +++ /dev/null @@ -1,14 +0,0 @@ -Title @PACKAGE_NAME@ @VERSION@ -Version @VERSION@ -Description @PACKAGE_NAME@ -DefaultLocation /usr/local -DeleteWarning -NeedsAuthorization YES -DisableStop NO -UseUserMask YES -Application NO -Relocatable NO -Required NO -InstallOnly NO -RequiresReboot NO -InstallFat NO diff --git a/synfig-core/trunk/po/Makevars b/synfig-core/trunk/po/Makevars deleted file mode 100644 index ad1de62..0000000 --- a/synfig-core/trunk/po/Makevars +++ /dev/null @@ -1,7 +0,0 @@ -DOMAIN = synfig -subdir = po -top_builddir = .. -XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --add-comments=TRANSLATORS -COPYRIGHT_HOLDER = Synfig Contributors -MSGID_BUGS_ADDRESS = http://synfig.org/Bugs -EXTRA_LOCALE_CATEGORIES = diff --git a/synfig-core/trunk/po/POTFILES.in b/synfig-core/trunk/po/POTFILES.in deleted file mode 100644 index 5da5584..0000000 --- a/synfig-core/trunk/po/POTFILES.in +++ /dev/null @@ -1,367 +0,0 @@ -# FIXME: move libsynfig into a separate domain -# Disabled since they are not built -# src/modules/example/filledrect.cpp -# src/modules/example/filledrect.cpp -# src/modules/example/filledrect.h -# src/modules/example/main.cpp -# src/modules/example/metaballs.cpp -# src/modules/example/metaballs.h -# src/modules/example/simplecircle.cpp -# src/modules/example/simplecircle.h -src/modules/lyr_freetype/lyr_freetype.cpp -src/modules/lyr_freetype/lyr_freetype.h -src/modules/lyr_freetype/main.cpp -src/modules/lyr_std/bevel.cpp -src/modules/lyr_std/bevel.h -src/modules/lyr_std/booleancurve.cpp -src/modules/lyr_std/booleancurve.h -src/modules/lyr_std/clamp.cpp -src/modules/lyr_std/clamp.h -src/modules/lyr_std/import.cpp -src/modules/lyr_std/import.h -src/modules/lyr_std/insideout.cpp -src/modules/lyr_std/insideout.h -src/modules/lyr_std/julia.cpp -src/modules/lyr_std/julia.h -src/modules/lyr_std/main.cpp -src/modules/lyr_std/mandelbrot.cpp -src/modules/lyr_std/mandelbrot.h -src/modules/lyr_std/rotate.cpp -src/modules/lyr_std/rotate.h -src/modules/lyr_std/shade.cpp -src/modules/lyr_std/shade.h -src/modules/lyr_std/sphere_distort.cpp -src/modules/lyr_std/sphere_distort.h -src/modules/lyr_std/stretch.cpp -src/modules/lyr_std/stretch.h -src/modules/lyr_std/supersample.cpp -src/modules/lyr_std/supersample.h -src/modules/lyr_std/timeloop.cpp -src/modules/lyr_std/timeloop.h -src/modules/lyr_std/translate.cpp -src/modules/lyr_std/translate.h -src/modules/lyr_std/twirl.cpp -src/modules/lyr_std/twirl.h -src/modules/lyr_std/warp.cpp -src/modules/lyr_std/warp.h -src/modules/lyr_std/xorpattern.cpp -src/modules/lyr_std/xorpattern.h -src/modules/lyr_std/zoom.cpp -src/modules/lyr_std/zoom.h -src/modules/mod_bmp/main.cpp -src/modules/mod_bmp/mptr_bmp.cpp -src/modules/mod_bmp/mptr_bmp.h -src/modules/mod_bmp/trgt_bmp.cpp -src/modules/mod_bmp/trgt_bmp.h -src/modules/mod_dv/main.cpp -src/modules/mod_dv/trgt_dv.cpp -src/modules/mod_dv/trgt_dv.h -src/modules/mod_ffmpeg/main.cpp -src/modules/mod_ffmpeg/mptr_ffmpeg.cpp -src/modules/mod_ffmpeg/mptr_ffmpeg.h -src/modules/mod_ffmpeg/trgt_ffmpeg.cpp -src/modules/mod_ffmpeg/trgt_ffmpeg.h -src/modules/mod_filter/blur.cpp -src/modules/mod_filter/blur.h -src/modules/mod_filter/colorcorrect.cpp -src/modules/mod_filter/colorcorrect.h -src/modules/mod_filter/halftone.cpp -src/modules/mod_filter/halftone.h -src/modules/mod_filter/halftone2.cpp -src/modules/mod_filter/halftone2.h -src/modules/mod_filter/halftone3.cpp -src/modules/mod_filter/halftone3.h -src/modules/mod_filter/lumakey.cpp -src/modules/mod_filter/lumakey.h -src/modules/mod_filter/main.cpp -src/modules/mod_filter/radialblur.cpp -src/modules/mod_filter/radialblur.h -src/modules/mod_geometry/checkerboard.cpp -src/modules/mod_geometry/checkerboard.h -src/modules/mod_geometry/circle.cpp -src/modules/mod_geometry/circle.h -src/modules/mod_geometry/main.cpp -src/modules/mod_geometry/outline.cpp -src/modules/mod_geometry/outline.h -src/modules/mod_geometry/rectangle.cpp -src/modules/mod_geometry/rectangle.h -src/modules/mod_geometry/region.cpp -src/modules/mod_geometry/region.h -src/modules/mod_geometry/star.cpp -src/modules/mod_geometry/star.h -src/modules/mod_gif/main.cpp -src/modules/mod_gif/trgt_gif.cpp -src/modules/mod_gif/trgt_gif.h -src/modules/mod_gradient/conicalgradient.cpp -src/modules/mod_gradient/conicalgradient.h -src/modules/mod_gradient/curvegradient.cpp -src/modules/mod_gradient/curvegradient.h -src/modules/mod_gradient/lineargradient.cpp -src/modules/mod_gradient/lineargradient.h -src/modules/mod_gradient/main.cpp -src/modules/mod_gradient/radialgradient.cpp -src/modules/mod_gradient/radialgradient.h -src/modules/mod_gradient/spiralgradient.cpp -src/modules/mod_gradient/spiralgradient.h -src/modules/mod_imagemagick/main.cpp -src/modules/mod_imagemagick/mptr_imagemagick.cpp -src/modules/mod_imagemagick/mptr_imagemagick.h -src/modules/mod_imagemagick/trgt_imagemagick.cpp -src/modules/mod_imagemagick/trgt_imagemagick.h -src/modules/mod_jpeg/main.cpp -src/modules/mod_jpeg/mptr_jpeg.cpp -src/modules/mod_jpeg/mptr_jpeg.h -src/modules/mod_jpeg/trgt_jpeg.cpp -src/modules/mod_jpeg/trgt_jpeg.h -src/modules/mod_libavcodec/main.cpp -src/modules/mod_libavcodec/mptr.cpp -src/modules/mod_libavcodec/mptr.h -src/modules/mod_libavcodec/trgt_av.cpp -src/modules/mod_libavcodec/trgt_av.h -src/modules/mod_magickpp/main.cpp -src/modules/mod_magickpp/trgt_magickpp.cpp -src/modules/mod_magickpp/trgt_magickpp.h -src/modules/mod_mng/main.cpp -src/modules/mod_mng/trgt_mng.cpp -src/modules/mod_mng/trgt_mng.h -src/modules/mod_noise/distort.cpp -src/modules/mod_noise/distort.h -src/modules/mod_noise/main.cpp -src/modules/mod_noise/noise.cpp -src/modules/mod_noise/noise.h -src/modules/mod_noise/random_noise.cpp -src/modules/mod_noise/random_noise.h -src/modules/mod_noise/valuenode_random.cpp -src/modules/mod_noise/valuenode_random.h -src/modules/mod_openexr/main.cpp -src/modules/mod_openexr/mptr_openexr.cpp -src/modules/mod_openexr/mptr_openexr.h -src/modules/mod_openexr/trgt_openexr.cpp -src/modules/mod_openexr/trgt_openexr.h -src/modules/mod_particle/main.cpp -src/modules/mod_particle/plant.cpp -src/modules/mod_particle/plant.h -src/modules/mod_particle/random.cpp -src/modules/mod_particle/random.h -src/modules/mod_png/main.cpp -src/modules/mod_png/mptr_png.cpp -src/modules/mod_png/mptr_png.h -src/modules/mod_png/trgt_png.cpp -src/modules/mod_png/trgt_png.h -src/modules/mod_ppm/main.cpp -src/modules/mod_ppm/mptr_ppm.cpp -src/modules/mod_ppm/mptr_ppm.h -src/modules/mod_ppm/trgt_ppm.cpp -src/modules/mod_ppm/trgt_ppm.h -src/modules/mod_yuv420p/main.cpp -src/modules/mod_yuv420p/trgt_yuv.cpp -src/modules/mod_yuv420p/trgt_yuv.h -src/modules/mptr_mplayer/main.cpp -src/modules/mptr_mplayer/mptr_mplayer.cpp -src/modules/mptr_mplayer/mptr_mplayer.h -src/synfig/activepoint.cpp -src/synfig/activepoint.h -src/synfig/angle.h -src/synfig/blinepoint.cpp -src/synfig/blinepoint.h -src/synfig/blur.cpp -src/synfig/blur.h -src/synfig/canvas.cpp -src/synfig/canvas.h -src/synfig/canvasbase.h -src/synfig/color.cpp -src/synfig/color.h -src/synfig/context.cpp -src/synfig/context.h -src/synfig/curve_helper.cpp -src/synfig/curve_helper.h -src/synfig/curveset.cpp -src/synfig/curveset.h -src/synfig/distance.cpp -src/synfig/distance.h -src/synfig/exception.cpp -src/synfig/exception.h -src/synfig/gamma.cpp -src/synfig/gamma.h -src/synfig/general.h -src/synfig/gradient.cpp -src/synfig/gradient.h -src/synfig/guid.cpp -src/synfig/guid.h -src/synfig/guidset.h -src/synfig/importer.cpp -src/synfig/importer.h -src/synfig/interpolation.h -src/synfig/keyframe.cpp -src/synfig/keyframe.h -src/synfig/layer.cpp -src/synfig/layer.h -src/synfig/layer_bitmap.cpp -src/synfig/layer_bitmap.h -src/synfig/layer_composite.cpp -src/synfig/layer_composite.h -src/synfig/layer_duplicate.cpp -src/synfig/layer_duplicate.h -src/synfig/layer_mime.cpp -src/synfig/layer_mime.h -src/synfig/layer_motionblur.cpp -src/synfig/layer_motionblur.h -src/synfig/layer_pastecanvas.cpp -src/synfig/layer_pastecanvas.h -src/synfig/layer_polygon.cpp -src/synfig/layer_polygon.h -src/synfig/layer_shape.cpp -src/synfig/layer_shape.h -src/synfig/layer_solidcolor.cpp -src/synfig/layer_solidcolor.h -src/synfig/listimporter.cpp -src/synfig/listimporter.h -src/synfig/loadcanvas.cpp -src/synfig/loadcanvas.h -src/synfig/main.cpp -src/synfig/main.h -src/synfig/module.cpp -src/synfig/module.h -src/synfig/mutex.cpp -src/synfig/mutex.h -src/synfig/node.cpp -src/synfig/node.h -src/synfig/nodebase.h -src/synfig/palette.cpp -src/synfig/palette.h -src/synfig/paramdesc.cpp -src/synfig/paramdesc.h -src/synfig/pch.h -src/synfig/polynomial_root.cpp -src/synfig/polynomial_root.h -src/synfig/protocol.h -src/synfig/quick_rng.h -src/synfig/real.h -src/synfig/rect.cpp -src/synfig/rect.h -src/synfig/renddesc.cpp -src/synfig/renddesc.h -src/synfig/render.cpp -src/synfig/render.h -src/synfig/savecanvas.cpp -src/synfig/savecanvas.h -src/synfig/segment.h -src/synfig/smartfile.h -src/synfig/string.h -src/synfig/string_decl.h -src/synfig/surface.cpp -src/synfig/surface.h -src/synfig/surfacenew.cpp -src/synfig/surfacenew.h -src/synfig/synfig.h -src/synfig/target.cpp -src/synfig/target.h -src/synfig/target_multi.cpp -src/synfig/target_multi.h -src/synfig/target_null.cpp -src/synfig/target_null.h -src/synfig/target_null_tile.cpp -src/synfig/target_null_tile.h -src/synfig/target_scanline.cpp -src/synfig/target_scanline.h -src/synfig/target_tile.cpp -src/synfig/target_tile.h -src/synfig/time.cpp -src/synfig/time.h -src/synfig/timepointcollect.cpp -src/synfig/timepointcollect.h -src/synfig/transform.cpp -src/synfig/transform.h -src/synfig/types.h -src/synfig/uniqueid.cpp -src/synfig/uniqueid.h -src/synfig/value.cpp -src/synfig/value.h -src/synfig/valuenode.cpp -src/synfig/valuenode.h -src/synfig/valuenode_add.cpp -src/synfig/valuenode_add.h -src/synfig/valuenode_and.cpp -src/synfig/valuenode_and.h -src/synfig/valuenode_animated.cpp -src/synfig/valuenode_animated.h -src/synfig/valuenode_bline.cpp -src/synfig/valuenode_bline.h -src/synfig/valuenode_blinecalctangent.cpp -src/synfig/valuenode_blinecalctangent.h -src/synfig/valuenode_blinecalcvertex.cpp -src/synfig/valuenode_blinecalcvertex.h -src/synfig/valuenode_blinecalcwidth.cpp -src/synfig/valuenode_blinecalcwidth.h -src/synfig/valuenode_composite.cpp -src/synfig/valuenode_composite.h -src/synfig/valuenode_const.cpp -src/synfig/valuenode_const.h -src/synfig/valuenode_compare.cpp -src/synfig/valuenode_compare.h -src/synfig/valuenode_cos.cpp -src/synfig/valuenode_cos.h -src/synfig/valuenode_duplicate.cpp -src/synfig/valuenode_duplicate.h -src/synfig/valuenode_dynamiclist.cpp -src/synfig/valuenode_dynamiclist.h -src/synfig/valuenode_exp.cpp -src/synfig/valuenode_exp.h -src/synfig/valuenode_gradientrotate.cpp -src/synfig/valuenode_gradientrotate.h -src/synfig/valuenode_integer.cpp -src/synfig/valuenode_integer.h -src/synfig/valuenode_join.cpp -src/synfig/valuenode_join.h -src/synfig/valuenode_linear.cpp -src/synfig/valuenode_linear.h -src/synfig/valuenode_not.cpp -src/synfig/valuenode_not.h -src/synfig/valuenode_or.cpp -src/synfig/valuenode_or.h -src/synfig/valuenode_pow.cpp -src/synfig/valuenode_pow.h -src/synfig/valuenode_radialcomposite.cpp -src/synfig/valuenode_radialcomposite.h -src/synfig/valuenode_range.cpp -src/synfig/valuenode_range.h -src/synfig/valuenode_realstring.cpp -src/synfig/valuenode_realstring.h -src/synfig/valuenode_reciprocal.cpp -src/synfig/valuenode_reciprocal.h -src/synfig/valuenode_reference.cpp -src/synfig/valuenode_reference.h -src/synfig/valuenode_repeat_gradient.cpp -src/synfig/valuenode_repeat_gradient.h -src/synfig/valuenode_scale.cpp -src/synfig/valuenode_scale.h -src/synfig/valuenode_segcalctangent.cpp -src/synfig/valuenode_segcalctangent.h -src/synfig/valuenode_segcalcvertex.cpp -src/synfig/valuenode_segcalcvertex.h -src/synfig/valuenode_sine.cpp -src/synfig/valuenode_sine.h -src/synfig/valuenode_step.cpp -src/synfig/valuenode_step.h -src/synfig/valuenode_stripes.cpp -src/synfig/valuenode_stripes.h -src/synfig/valuenode_subtract.cpp -src/synfig/valuenode_subtract.h -src/synfig/valuenode_switch.cpp -src/synfig/valuenode_switch.h -src/synfig/valuenode_timedswap.cpp -src/synfig/valuenode_timedswap.h -src/synfig/valuenode_timeloop.cpp -src/synfig/valuenode_timeloop.h -src/synfig/valuenode_timestring.cpp -src/synfig/valuenode_timestring.h -src/synfig/valuenode_twotone.cpp -src/synfig/valuenode_twotone.h -src/synfig/vector.h -src/synfig/version.h -src/synfig/waypoint.cpp -src/synfig/waypoint.h -# Disabled because they are not built -# src/template.cpp -# src/template.h -src/tool/main.cpp diff --git a/synfig-core/trunk/po/es.po b/synfig-core/trunk/po/es.po deleted file mode 100644 index bc8aae6..0000000 --- a/synfig-core/trunk/po/es.po +++ /dev/null @@ -1,3145 +0,0 @@ -# translation of es.po to Español -# Spanish translations for Synfig Core package -# Traducciones al español para el paquete Synfig Core. -# Copyright (C) 2007 Synfig Contributors -# This file is distributed under the same license as the Synfig Core package. -# -# Carlos López González , 2007, 2008. -msgid "" -msgstr "" -"Project-Id-Version: es\n" -"Report-Msgid-Bugs-To: http://synfig.org/Bugs\n" -"POT-Creation-Date: 2008-09-29 21:46+0200\n" -"PO-Revision-Date: 2008-10-01 00:16+0200\n" -"Last-Translator: Carlos López González \n" -"Language-Team: Español \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: KBabel 1.11.4\n" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:63 -#: src/modules/lyr_freetype/lyr_freetype.cpp:507 -msgid "Text" -msgstr "Texto" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:64 -#: src/modules/lyr_std/import.cpp:59 src/modules/lyr_std/supersample.cpp:56 -#: src/modules/lyr_std/timeloop.cpp:58 src/modules/lyr_std/xorpattern.cpp:55 -#: src/modules/mod_particle/plant.cpp:69 src/synfig/layer_duplicate.cpp:57 -#: src/synfig/layer_pastecanvas.cpp:78 -msgid "Other" -msgstr "Otro" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:94 -msgid "Text Layer" -msgstr "Capa de texto" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:380 -msgid "unable to initialize" -msgstr "imposible inicializar" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:399 -msgid "empty font set" -msgstr "juego de fuentes vacio" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:508 -msgid "Text to Render" -msgstr "Texto para Mostrar" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:513 -#: src/modules/lyr_std/shade.cpp:375 -#: src/modules/mod_geometry/checkerboard.cpp:121 -#: src/modules/mod_geometry/circle.cpp:125 -#: src/modules/mod_geometry/rectangle.cpp:122 src/synfig/layer_shape.cpp:1192 -#: src/synfig/layer_solidcolor.cpp:99 -msgid "Color" -msgstr "Color" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:514 -msgid "Color of the text" -msgstr "Color del texto" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:518 -msgid "Font Family" -msgstr "Familia de la Fuente" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:523 -msgid "Style" -msgstr "Estilo" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:525 -#: src/modules/lyr_freetype/lyr_freetype.cpp:535 -msgid "Normal" -msgstr "Normal" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:526 -msgid "Oblique" -msgstr "Oblicua" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:527 -msgid "Italic" -msgstr "Cursiva" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:531 -msgid "Weight" -msgstr "Peso" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:533 -msgid "Ultralight" -msgstr "Ultraligera" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:534 -msgid "light" -msgstr "Ligera" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:536 -msgid "Bold" -msgstr "Negrita" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:537 -msgid "Ultrabold" -msgstr "Ultranegrita" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:538 -msgid "Heavy" -msgstr "Pesada" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:541 -msgid "Horizontal Spacing" -msgstr "Espaciado horizontal" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:542 -msgid "Describes how close glyphs are horizontally" -msgstr "Describe como de juntos estan los glifos horizontalmente" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:546 -msgid "Vertical Spacing" -msgstr "Espaciado Vertical" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:547 -msgid "Describes how close lines of text are vertically" -msgstr "Describe como de juntos estan los glifos verticalmente" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:551 -#: src/modules/lyr_std/shade.cpp:381 src/modules/lyr_std/xorpattern.cpp:125 -#: src/modules/mod_filter/blur.cpp:242 -#: src/modules/mod_filter/radialblur.cpp:111 -#: src/modules/mod_geometry/checkerboard.cpp:128 -#: src/modules/mod_noise/distort.cpp:201 src/modules/mod_noise/noise.cpp:256 -msgid "Size" -msgstr "Tamaño" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:552 -msgid "Size of the text" -msgstr "Tamaño del texto" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:559 -msgid "Orientation" -msgstr "Orientación" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:560 -msgid "Text Orientation" -msgstr "Orientación del texto" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:565 -#: src/modules/lyr_std/insideout.cpp:141 src/modules/lyr_std/rotate.cpp:112 -#: src/modules/lyr_std/shade.cpp:378 src/modules/lyr_std/translate.cpp:97 -#: src/modules/lyr_std/xorpattern.cpp:122 -#: src/modules/mod_filter/radialblur.cpp:106 -#: src/modules/mod_geometry/checkerboard.cpp:125 -#: src/modules/mod_geometry/circle.cpp:137 -#: src/modules/mod_gradient/curvegradient.cpp:490 -#: src/modules/mod_particle/plant.cpp:390 src/synfig/layer_pastecanvas.cpp:127 -#: src/synfig/layer_shape.cpp:1196 src/synfig/valuenode_composite.cpp:291 -msgid "Origin" -msgstr "Origen" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:566 -msgid "Text Position" -msgstr "Posición del texto" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:570 -msgid "Font" -msgstr "Fuente" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:571 -msgid "Filename of the font to use" -msgstr "Nomber del fichero de la fuente a usar" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:578 -msgid "Kerning" -msgstr "Solape" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:579 -msgid "Enables/Disables font kerning (If the font supports it)" -msgstr "Habilita/Deshabilita el solape de la fuente (si la fuente lo soporta)" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:583 -msgid "Sharpen Edges" -msgstr "Bordes afilados" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:584 -msgid "Turn this off if you are going to be animating the text" -msgstr "Desmarque esto si va a animar el texto" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:587 -#: src/modules/lyr_std/shade.cpp:398 src/modules/mod_geometry/circle.cpp:140 -#: src/synfig/layer_shape.cpp:1199 -msgid "Invert" -msgstr "Invertir" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:644 -msgid "No face loaded, no text will be rendered." -msgstr "Niguna fuente cargada, no se mostrará ningún texto" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:670 -msgid "Text too small, no text will be rendered." -msgstr "Texto demasiado pequeño, no se mostrará ningún texto" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:694 -msgid "Unable to set face size." -msgstr "Imposible establecer el tamaño de fuente" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:737 -msgid "Invalid multibyte sequence - is the locale set?\n" -msgstr "Secuencia multibye inválida - se ha establecido el lenguaje local?\n" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:744 -msgid "Can't parse multibyte character.\n" -msgstr "No puedo traducir carácter multibyte.\n" - -#: src/modules/lyr_std/bevel.cpp:67 -msgid "Bevel" -msgstr "Bisel" - -#: src/modules/lyr_std/bevel.cpp:68 src/modules/lyr_std/shade.cpp:67 -msgid "Stylize" -msgstr "Estilizar" - -#: src/modules/lyr_std/bevel.cpp:356 src/modules/lyr_std/shade.cpp:387 -#: src/modules/mod_filter/blur.cpp:246 -#: src/modules/mod_filter/halftone2.cpp:166 -msgid "Type" -msgstr "Tipo" - -#: src/modules/lyr_std/bevel.cpp:357 src/modules/lyr_std/shade.cpp:388 -#: src/modules/mod_filter/blur.cpp:247 -msgid "Type of blur to use" -msgstr "Tipo de desenfoque a usar" - -#: src/modules/lyr_std/bevel.cpp:359 src/modules/lyr_std/shade.cpp:390 -#: src/modules/mod_filter/blur.cpp:249 src/synfig/layer_shape.cpp:1212 -msgid "Box Blur" -msgstr "Desenfoque \"Box\"" - -#: src/modules/lyr_std/bevel.cpp:360 src/modules/lyr_std/shade.cpp:391 -#: src/modules/mod_filter/blur.cpp:250 src/synfig/layer_shape.cpp:1213 -msgid "Fast Gaussian Blur" -msgstr "Desenfoque Gaussiano rápido" - -#: src/modules/lyr_std/bevel.cpp:361 src/modules/lyr_std/shade.cpp:392 -#: src/modules/mod_filter/blur.cpp:251 src/synfig/layer_shape.cpp:1214 -msgid "Cross-Hatch Blur" -msgstr "Desenfoque Mallado" - -#: src/modules/lyr_std/bevel.cpp:362 src/modules/lyr_std/shade.cpp:393 -#: src/modules/mod_filter/blur.cpp:252 src/synfig/layer_shape.cpp:1215 -msgid "Gaussian Blur" -msgstr "Desenfoque Gaussiano" - -#: src/modules/lyr_std/bevel.cpp:363 src/modules/lyr_std/shade.cpp:394 -#: src/modules/mod_filter/blur.cpp:253 src/synfig/layer_shape.cpp:1216 -msgid "Disc Blur" -msgstr "Desenfoque Disco" - -#: src/modules/lyr_std/bevel.cpp:367 -msgid "Hi-Color" -msgstr "Color Claro" - -#: src/modules/lyr_std/bevel.cpp:370 -msgid "Lo-Color" -msgstr "Color Oscuro" - -#: src/modules/lyr_std/bevel.cpp:373 -msgid "Light Angle" -msgstr "Angulo de la Luz" - -#: src/modules/lyr_std/bevel.cpp:377 -msgid "Depth of Bevel" -msgstr "Profundidad del Bisel" - -#: src/modules/lyr_std/bevel.cpp:381 -msgid "Softness" -msgstr "Suavidad" - -#: src/modules/lyr_std/bevel.cpp:384 -msgid "Use Luma" -msgstr "Usar \"Luma\"" - -#: src/modules/lyr_std/bevel.cpp:387 -msgid "Solid" -msgstr "Sólido" - -#: src/modules/lyr_std/booleancurve.cpp:104 -msgid "Region Set" -msgstr "Conjunto Región" - -#: src/modules/lyr_std/booleancurve.cpp:105 -msgid "Set of regions to combine" -msgstr "Conjunto de Regiones a combinar" - -#: src/modules/lyr_std/clamp.cpp:54 src/tool/main.cpp:1079 -msgid "Clamp" -msgstr "Recortar" - -#: src/modules/lyr_std/clamp.cpp:55 src/modules/mod_filter/colorcorrect.cpp:55 -#: src/modules/mod_filter/halftone2.cpp:58 -#: src/modules/mod_filter/halftone3.cpp:58 -#: src/modules/mod_filter/lumakey.cpp:58 -msgid "Filters" -msgstr "Filtros" - -#: src/modules/lyr_std/clamp.cpp:155 -msgid "Invert Negative" -msgstr "Invertir Negativo" - -#: src/modules/lyr_std/clamp.cpp:159 -msgid "Clamp Ceiling" -msgstr "Recortar Superior" - -#: src/modules/lyr_std/clamp.cpp:163 -msgid "Ceiling" -msgstr "Superior" - -#: src/modules/lyr_std/clamp.cpp:167 -msgid "Floor" -msgstr "Inferior" - -#: src/modules/lyr_std/import.cpp:58 -msgid "Import Image" -msgstr "Importar Imagen" - -#: src/modules/lyr_std/import.cpp:138 -#, c-format -msgid "Filename seems to already be set to \"%s\" (%s)" -msgstr "Parece que el archivo ya ha sido llamado \"%s\" (%s)" - -#: src/modules/lyr_std/import.cpp:209 -msgid "Filename" -msgstr "Nombre del Archivo" - -#: src/modules/lyr_std/import.cpp:210 -msgid "File to import" -msgstr "Archivo a importar" - -#: src/modules/lyr_std/import.cpp:214 src/synfig/layer_pastecanvas.cpp:140 -msgid "Time Offset" -msgstr "Desfase de Tiempo" - -#: src/modules/lyr_std/insideout.cpp:55 -msgid "Inside Out" -msgstr "Al revés" - -#: src/modules/lyr_std/insideout.cpp:56 -#: src/modules/lyr_std/sphere_distort.cpp:73 -#: src/modules/lyr_std/stretch.cpp:59 src/modules/lyr_std/twirl.cpp:56 -#: src/modules/lyr_std/warp.cpp:56 src/modules/mod_noise/distort.cpp:57 -msgid "Distortions" -msgstr "Distorsiones" - -#: src/modules/lyr_std/insideout.cpp:142 -msgid "Defines the where the center will be" -msgstr "Define donde estará el centro" - -#: src/modules/lyr_std/julia.cpp:56 -msgid "Julia Set" -msgstr "Conjunto de Julia" - -#: src/modules/lyr_std/julia.cpp:57 src/modules/lyr_std/mandelbrot.cpp:57 -msgid "Fractals" -msgstr "Fractales" - -#: src/modules/lyr_std/julia.cpp:300 -msgid "Inside Color" -msgstr "Color Interior" - -#: src/modules/lyr_std/julia.cpp:301 -msgid "Color of the Set" -msgstr "Color del Conjunto" - -#: src/modules/lyr_std/julia.cpp:304 -msgid "Outside Color" -msgstr "Color Exterior" - -#: src/modules/lyr_std/julia.cpp:305 -msgid "Color outside the Set" -msgstr "Color fuera del Conjunto" - -#: src/modules/lyr_std/julia.cpp:308 -msgid "Color Shift" -msgstr "Desplazamiento de Color" - -#: src/modules/lyr_std/julia.cpp:311 src/modules/lyr_std/mandelbrot.cpp:213 -msgid "Iterations" -msgstr "Iteraciones" - -#: src/modules/lyr_std/julia.cpp:314 -msgid "Seed Point" -msgstr "Punto de Semilla" - -#: src/modules/lyr_std/julia.cpp:317 src/modules/lyr_std/mandelbrot.cpp:216 -msgid "Bailout ValueBase" -msgstr "Valor Base de Baliout" - -#: src/modules/lyr_std/julia.cpp:321 src/modules/lyr_std/mandelbrot.cpp:226 -#: src/modules/lyr_std/twirl.cpp:125 -msgid "Distort Inside" -msgstr "Distorsionar dentro" - -#: src/modules/lyr_std/julia.cpp:324 src/modules/lyr_std/mandelbrot.cpp:230 -msgid "Shade Inside" -msgstr "Sombrear Interior" - -#: src/modules/lyr_std/julia.cpp:327 src/modules/lyr_std/mandelbrot.cpp:234 -msgid "Solid Inside" -msgstr "Interior Sólido" - -#: src/modules/lyr_std/julia.cpp:330 src/modules/lyr_std/mandelbrot.cpp:238 -msgid "Invert Inside" -msgstr "Invertir Interior" - -#: src/modules/lyr_std/julia.cpp:333 -msgid "Color Inside" -msgstr "Colorear Interior" - -#: src/modules/lyr_std/julia.cpp:336 src/modules/lyr_std/mandelbrot.cpp:255 -#: src/modules/lyr_std/twirl.cpp:129 -msgid "Distort Outside" -msgstr "Distorsionar Exterior" - -#: src/modules/lyr_std/julia.cpp:339 src/modules/lyr_std/mandelbrot.cpp:259 -msgid "Shade Outside" -msgstr "Sombrear Exterior" - -#: src/modules/lyr_std/julia.cpp:342 src/modules/lyr_std/mandelbrot.cpp:263 -msgid "Solid Outside" -msgstr "Exterior Sólido" - -#: src/modules/lyr_std/julia.cpp:345 src/modules/lyr_std/mandelbrot.cpp:267 -msgid "Invert Outside" -msgstr "Invertir Exterior" - -#: src/modules/lyr_std/julia.cpp:348 -msgid "Color Outside" -msgstr "Colorear Exterior" - -#: src/modules/lyr_std/julia.cpp:352 -msgid "Color Cycle" -msgstr "Ciclar Color" - -#: src/modules/lyr_std/julia.cpp:355 src/modules/lyr_std/mandelbrot.cpp:275 -msgid "Smooth Outside" -msgstr "Exterior Suave" - -#: src/modules/lyr_std/julia.cpp:356 src/modules/lyr_std/mandelbrot.cpp:276 -msgid "Smooth the coloration outside the set" -msgstr "Suavizar el coloreado fuera del Conjunto" - -#: src/modules/lyr_std/julia.cpp:359 src/modules/lyr_std/mandelbrot.cpp:220 -msgid "Break Set" -msgstr "Romper el Conjunto" - -#: src/modules/lyr_std/julia.cpp:360 src/modules/lyr_std/mandelbrot.cpp:221 -msgid "Modify equation to achieve interesting results" -msgstr "Modificar la ecuación para obtener resultados interesantes" - -#: src/modules/lyr_std/mandelbrot.cpp:56 -msgid "Mandelbrot Set" -msgstr "Conjunto de Mandelbrot" - -#: src/modules/lyr_std/mandelbrot.cpp:227 -#: src/modules/lyr_std/mandelbrot.cpp:231 -#: src/modules/lyr_std/mandelbrot.cpp:235 -#: src/modules/lyr_std/mandelbrot.cpp:239 -#: src/modules/lyr_std/mandelbrot.cpp:243 -#: src/modules/lyr_std/mandelbrot.cpp:247 -#: src/modules/lyr_std/mandelbrot.cpp:251 -msgid "Inside" -msgstr "Inteior" - -#: src/modules/lyr_std/mandelbrot.cpp:242 -msgid "Gradient Inside" -msgstr "Gradiente Interior" - -#: src/modules/lyr_std/mandelbrot.cpp:246 -msgid "Offset Inside" -msgstr "Desplazamiento Interior" - -#: src/modules/lyr_std/mandelbrot.cpp:250 -msgid "Loop Inside" -msgstr "Bucle Interior" - -#: src/modules/lyr_std/mandelbrot.cpp:256 -#: src/modules/lyr_std/mandelbrot.cpp:260 -#: src/modules/lyr_std/mandelbrot.cpp:264 -#: src/modules/lyr_std/mandelbrot.cpp:268 -#: src/modules/lyr_std/mandelbrot.cpp:272 -#: src/modules/lyr_std/mandelbrot.cpp:277 -#: src/modules/lyr_std/mandelbrot.cpp:281 -#: src/modules/lyr_std/mandelbrot.cpp:285 -msgid "Outside" -msgstr "Exterior" - -#: src/modules/lyr_std/mandelbrot.cpp:271 -msgid "Gradient outside" -msgstr "Gradiente Exterior" - -#: src/modules/lyr_std/mandelbrot.cpp:280 -msgid "Offset Outside" -msgstr "Desplazamiento Exterior" - -#: src/modules/lyr_std/mandelbrot.cpp:284 -msgid "Scale Outside" -msgstr "Escala Exterior" - -#: src/modules/lyr_std/rotate.cpp:55 -msgid "Rotate" -msgstr "Rotar" - -#: src/modules/lyr_std/rotate.cpp:56 src/modules/lyr_std/translate.cpp:55 -#: src/modules/lyr_std/zoom.cpp:52 -msgid "Transform" -msgstr "Transformar" - -#: src/modules/lyr_std/rotate.cpp:113 src/modules/lyr_std/translate.cpp:98 -#: src/modules/mod_filter/radialblur.cpp:107 -#: src/synfig/layer_pastecanvas.cpp:128 -msgid "Point where you want the origin to be" -msgstr "Apunta donde ud. quiera que esté el origen" - -#: src/modules/lyr_std/rotate.cpp:117 -#: src/modules/lyr_std/sphere_distort.cpp:153 -#: src/modules/lyr_std/stretch.cpp:103 src/modules/lyr_std/zoom.cpp:96 -#: src/synfig/layer_composite.cpp:142 -#: src/synfig/valuenode_blinecalctangent.cpp:242 -#: src/synfig/valuenode_blinecalcvertex.cpp:201 -#: src/synfig/valuenode_blinecalcwidth.cpp:207 -#: src/synfig/valuenode_segcalctangent.cpp:161 -#: src/synfig/valuenode_segcalcvertex.cpp:159 -msgid "Amount" -msgstr "Cantidad" - -#: src/modules/lyr_std/rotate.cpp:118 -msgid "Amount of rotation" -msgstr "Cantidad de Rotación" - -#: src/modules/lyr_std/shade.cpp:66 -msgid "Shade" -msgstr "Sombra" - -#: src/modules/lyr_std/shade.cpp:382 -msgid "Size of Shade" -msgstr "Tamaño de Sombra" - -#: src/modules/lyr_std/sphere_distort.cpp:72 -#: src/modules/lyr_std/sphere_distort.cpp:165 -msgid "Spherize" -msgstr "Esferizar" - -#: src/modules/lyr_std/sphere_distort.cpp:143 -msgid "Position" -msgstr "Posición" - -#: src/modules/lyr_std/sphere_distort.cpp:147 -#: src/modules/lyr_std/twirl.cpp:113 src/modules/mod_geometry/circle.cpp:128 -#: src/modules/mod_gradient/radialgradient.cpp:118 -#: src/modules/mod_gradient/spiralgradient.cpp:117 -#: src/modules/mod_noise/valuenode_random.cpp:244 -#: src/synfig/valuenode_radialcomposite.cpp:197 -msgid "Radius" -msgstr "Radio" - -#: src/modules/lyr_std/sphere_distort.cpp:158 src/modules/lyr_std/warp.cpp:400 -msgid "Clip" -msgstr "Recortar" - -#: src/modules/lyr_std/sphere_distort.cpp:162 -msgid "Distort Type" -msgstr "Tipo de Distorsión" - -#: src/modules/lyr_std/sphere_distort.cpp:163 -msgid "The direction of the distortion" -msgstr "La dirección de la distorsión" - -#: src/modules/lyr_std/sphere_distort.cpp:166 -msgid "Vertical Bar" -msgstr "Barra Vertical" - -#: src/modules/lyr_std/sphere_distort.cpp:167 -msgid "Horizontal Bar" -msgstr "Barra Horizontal" - -#: src/modules/lyr_std/stretch.cpp:58 -msgid "Stretch" -msgstr "Encoger" - -#: src/modules/lyr_std/stretch.cpp:108 src/modules/lyr_std/twirl.cpp:109 -#: src/modules/lyr_std/zoom.cpp:101 -#: src/modules/mod_gradient/conicalgradient.cpp:110 -#: src/modules/mod_gradient/radialgradient.cpp:114 -#: src/modules/mod_gradient/spiralgradient.cpp:113 -msgid "Center" -msgstr "Centro" - -#: src/modules/lyr_std/supersample.cpp:55 -msgid "Super Sample" -msgstr "Super Muestreo" - -#: src/modules/lyr_std/supersample.cpp:119 -msgid "Unable to create SurfaceTarget" -msgstr "Imposible crear Superficie Objetivo" - -#: src/modules/lyr_std/supersample.cpp:215 -#: src/modules/mod_gradient/curvegradient.cpp:494 -#: src/synfig/valuenode_composite.cpp:289 -#: src/synfig/valuenode_realstring.cpp:184 -#: src/synfig/valuenode_repeat_gradient.cpp:185 -#: src/synfig/valuenode_stripes.cpp:176 src/tool/main.cpp:978 -msgid "Width" -msgstr "Espesor" - -#: src/modules/lyr_std/supersample.cpp:216 -msgid "Width of sample area (In pixels)" -msgstr "Espesor del area de muestreo (en pixels)" - -#: src/modules/lyr_std/supersample.cpp:219 src/tool/main.cpp:984 -msgid "Height" -msgstr "Altura" - -#: src/modules/lyr_std/supersample.cpp:220 -msgid "Height of sample area (In pixels)" -msgstr "Altura del áre a de muestreo (en pixels)" - -#: src/modules/lyr_std/supersample.cpp:223 -msgid "Use Parametric" -msgstr "Usa Paramétrico" - -#: src/modules/lyr_std/supersample.cpp:224 -msgid "Use the Parametric Renderer" -msgstr "Usa el Muestreo Paramétrico" - -#: src/modules/lyr_std/supersample.cpp:227 -msgid "Be Alpha Safe" -msgstr "Estar a salvo de Transparencia" - -#: src/modules/lyr_std/timeloop.cpp:57 src/synfig/valuenode.cpp:161 -#: src/synfig/valuenode_timeloop.cpp:188 -msgid "Time Loop" -msgstr "Bucle de Tiempo" - -#: src/modules/lyr_std/timeloop.cpp:120 src/synfig/valuenode_timeloop.cpp:124 -msgid "Link Time" -msgstr "Tiempo del Enlace" - -#: src/modules/lyr_std/timeloop.cpp:124 src/synfig/valuenode_timeloop.cpp:125 -msgid "Local Time" -msgstr "Tiempo Local" - -#: src/modules/lyr_std/timeloop.cpp:128 src/synfig/valuenode_step.cpp:214 -#: src/synfig/valuenode_timeloop.cpp:126 -msgid "Duration" -msgstr "Duración" - -#: src/modules/lyr_std/timeloop.cpp:132 -msgid "Only For Positive Duration" -msgstr "Solo para Duración positiva" - -#: src/modules/lyr_std/timeloop.cpp:136 -msgid "Symmetrical" -msgstr "Simétrico" - -#: src/modules/lyr_std/translate.cpp:54 -msgid "Translate" -msgstr "Trasladar" - -#: src/modules/lyr_std/twirl.cpp:55 -msgid "Twirl" -msgstr "Torbellino" - -#: src/modules/lyr_std/twirl.cpp:114 -#: src/modules/mod_gradient/radialgradient.cpp:119 -#: src/modules/mod_gradient/spiralgradient.cpp:118 -msgid "This is the radius of the circle" -msgstr "Este es el radio del círculo" - -#: src/modules/lyr_std/twirl.cpp:120 -msgid "Rotations" -msgstr "Rotaciones" - -#: src/modules/lyr_std/warp.cpp:55 -msgid "Warp" -msgstr "Combar" - -#: src/modules/lyr_std/warp.cpp:371 -msgid "Source TL" -msgstr "Origen TL" - -#: src/modules/lyr_std/warp.cpp:376 -msgid "Source BR" -msgstr "Origen BR" - -#: src/modules/lyr_std/warp.cpp:380 -msgid "Dest TL" -msgstr "Destino TL" - -#: src/modules/lyr_std/warp.cpp:385 -msgid "Dest TR" -msgstr "Destino TR" - -#: src/modules/lyr_std/warp.cpp:390 -msgid "Dest BR" -msgstr "Destino BR" - -#: src/modules/lyr_std/warp.cpp:395 -msgid "Dest BL" -msgstr "Destino BL" - -#: src/modules/lyr_std/warp.cpp:404 -msgid "Horizon" -msgstr "Horizonte" - -#: src/modules/lyr_std/xorpattern.cpp:54 -msgid "XOR Pattern" -msgstr "Estampado XOR" - -#: src/modules/lyr_std/zoom.cpp:51 src/synfig/layer_pastecanvas.cpp:135 -msgid "Zoom" -msgstr "Aumento" - -#: src/modules/lyr_std/zoom.cpp:97 -msgid "Amount to zoom in" -msgstr "Cantidad de aumento" - -#: src/modules/lyr_std/zoom.cpp:102 -msgid "Point to zoom in to" -msgstr "Punto donde centrar aumento" - -#: src/modules/mod_bmp/mptr_bmp.cpp:133 src/modules/mod_bmp/mptr_bmp.cpp:134 -#: src/modules/mod_ppm/mptr_ppm.cpp:78 -#, c-format -msgid "Unable to open %s" -msgstr "Imposible abrir %s" - -#: src/modules/mod_bmp/mptr_bmp.cpp:145 src/modules/mod_bmp/mptr_bmp.cpp:146 -#, c-format -msgid "%s is not in BMP format" -msgstr "%s no está en formato BMP" - -#: src/modules/mod_bmp/mptr_bmp.cpp:152 -#, c-format -msgid "Failure while reading BITMAPFILEHEADER from %s" -msgstr "Falló mientras leía BITMAPFILEHEADER desde %s" - -#: src/modules/mod_bmp/mptr_bmp.cpp:160 -#, c-format -msgid "Failure while reading BITMAPINFOHEADER from %s" -msgstr "Falló mientras leía BITMAPINFOHEADER desde %s" - -#: src/modules/mod_bmp/mptr_bmp.cpp:170 -#, c-format -msgid "Bad BITMAPFILEHEADER in %s. (bfOffsetBits=%d, should be %d)" -msgstr "Mal BITMAPFILEHEADER en %s. (bfOffsetBits=%d, debería ser %d)" - -#: src/modules/mod_bmp/mptr_bmp.cpp:178 -#, c-format -msgid "Bad BITMAPINFOHEADER in %s. (biSize=%d, should be 40)" -msgstr "Mal BITMAPINFOHEADER en %s. (biSize=%d, debería ser 40)" - -#: src/modules/mod_bmp/mptr_bmp.cpp:196 src/modules/mod_bmp/mptr_bmp.cpp:197 -msgid "Reading compressed bitmaps is not supported" -msgstr "Lectura de bitmaps comprimidos no esta soportado" - -#: src/modules/mod_bmp/mptr_bmp.cpp:203 src/modules/mod_bmp/mptr_bmp.cpp:204 -#, c-format -msgid "Unsupported bit depth (bit_count=%d, should be 24 or 32)" -msgstr "Profundidad de bit no soportado (bit_count=%d, debería ser 24 o 32)" - -#: src/modules/mod_bmp/trgt_bmp.cpp:185 -msgid " (animated)" -msgstr " (animado)" - -#: src/modules/mod_bmp/trgt_bmp.cpp:195 src/modules/mod_bmp/trgt_bmp.cpp:196 -msgid "Unable to open file" -msgstr "Imposible abrir archivo" - -#: src/modules/mod_bmp/trgt_bmp.cpp:226 src/modules/mod_bmp/trgt_bmp.cpp:227 -msgid "Unable to write file header to file" -msgstr "Imposible escribir la cabecera al archivo" - -#: src/modules/mod_bmp/trgt_bmp.cpp:233 src/modules/mod_bmp/trgt_bmp.cpp:234 -msgid "Unable to write info header" -msgstr "Imposible escribir la información de cabecera" - -#: src/modules/mod_dv/trgt_dv.cpp:166 src/modules/mod_dv/trgt_dv.cpp:175 -#: src/modules/mod_dv/trgt_dv.cpp:182 src/modules/mod_dv/trgt_dv.cpp:192 -#: src/modules/mod_dv/trgt_dv.cpp:200 src/modules/mod_dv/trgt_dv.cpp:205 -#: src/modules/mod_dv/trgt_dv.cpp:209 src/modules/mod_dv/trgt_dv.cpp:218 -#: src/modules/mod_dv/trgt_dv.cpp:227 -msgid "Unable to open pipe to encodedv" -msgstr "Imposible abrir tubería para encodedv" - -#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:172 -#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:179 -#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:189 -#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:199 -#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:217 -msgid "Unable to open pipe to ffmpeg" -msgstr "Imposible abrir tubería para ffmpeg" - -#: src/modules/mod_filter/blur.cpp:67 -msgid "Blur" -msgstr "Desenfoque" - -#: src/modules/mod_filter/blur.cpp:68 src/modules/mod_filter/radialblur.cpp:56 -#: src/synfig/layer_motionblur.cpp:57 -msgid "Blurs" -msgstr "Desenfoques" - -#: src/modules/mod_filter/blur.cpp:243 -msgid "Size of Blur" -msgstr "Tamaño del Desenfoque" - -#: src/modules/mod_filter/colorcorrect.cpp:54 -msgid "Color Correct" -msgstr "Corregir Color" - -#: src/modules/mod_filter/colorcorrect.cpp:203 -msgid "Hue Adjust" -msgstr "Ajuste del Matiz" - -#: src/modules/mod_filter/colorcorrect.cpp:207 -msgid "Brightness" -msgstr "Brillo" - -#: src/modules/mod_filter/colorcorrect.cpp:211 -msgid "Contrast" -msgstr "Contraste" - -#: src/modules/mod_filter/colorcorrect.cpp:215 -msgid "Exposure Adjust" -msgstr "Ajuste de Exposición" - -#: src/modules/mod_filter/colorcorrect.cpp:219 src/synfig/layer_bitmap.cpp:138 -msgid "Gamma Adjustment" -msgstr "Ajuste de Gamma" - -#: src/modules/mod_filter/halftone2.cpp:57 -msgid "Halftone 2" -msgstr "Medios Tonos 2" - -#: src/modules/mod_filter/halftone2.cpp:147 -msgid "Mask Origin" -msgstr "Origen Máscara" - -#: src/modules/mod_filter/halftone2.cpp:151 -msgid "Mask Angle" -msgstr "Ángulo Máscara" - -#: src/modules/mod_filter/halftone2.cpp:155 -#: src/modules/mod_filter/halftone3.cpp:305 -msgid "Mask Size" -msgstr "Tamaño Máscara" - -#: src/modules/mod_filter/halftone2.cpp:160 -msgid "Light Color" -msgstr "Color Claro" - -#: src/modules/mod_filter/halftone2.cpp:163 -msgid "Dark Color" -msgstr "Color Oscuro" - -#: src/modules/mod_filter/halftone2.cpp:168 -#: src/modules/mod_filter/halftone3.cpp:310 -#: src/modules/mod_gradient/conicalgradient.cpp:119 -msgid "Symmetric" -msgstr "Simétrico" - -#: src/modules/mod_filter/halftone2.cpp:169 -#: src/modules/mod_filter/halftone3.cpp:311 -msgid "Light On Dark" -msgstr "Claroscuro" - -#: src/modules/mod_filter/halftone2.cpp:171 -#: src/modules/mod_filter/halftone3.cpp:313 -msgid "Diamond" -msgstr "Diamante" - -#: src/modules/mod_filter/halftone2.cpp:172 -#: src/modules/mod_filter/halftone3.cpp:314 -msgid "Stripe" -msgstr "Rayas" - -#: src/modules/mod_filter/halftone3.cpp:57 -msgid "Halftone 3" -msgstr "Medios Tonos 3" - -#: src/modules/mod_filter/halftone3.cpp:308 -msgid " Type" -msgstr "Tipo" - -#: src/modules/mod_filter/halftone3.cpp:317 -msgid "Subtractive Flag" -msgstr "Sustractivo" - -#: src/modules/mod_filter/halftone3.cpp:325 -msgid " Color" -msgstr "Color" - -#: src/modules/mod_filter/halftone3.cpp:329 -msgid " Mask Origin" -msgstr "Origen Máscara" - -#: src/modules/mod_filter/halftone3.cpp:333 -msgid " Mask Angle" -msgstr "Ángulo Máscara" - -#: src/modules/mod_filter/lumakey.cpp:57 -msgid "Luma Key" -msgstr "Clave Luma" - -#: src/modules/mod_filter/radialblur.cpp:55 -msgid "Radial Blur" -msgstr "Desenfoque Radial" - -#: src/modules/mod_filter/radialblur.cpp:112 -msgid "Size of blur" -msgstr "Tamaña del Desenfoque" - -#: src/modules/mod_filter/radialblur.cpp:117 -msgid "Fade Out" -msgstr "Fundido" - -#: src/modules/mod_geometry/checkerboard.cpp:57 -msgid "Checkerboard" -msgstr "Cuadrícula" - -#: src/modules/mod_geometry/checkerboard.cpp:58 -#: src/modules/mod_geometry/circle.cpp:56 -#: src/modules/mod_geometry/outline.cpp:71 -#: src/modules/mod_geometry/rectangle.cpp:59 -#: src/modules/mod_geometry/region.cpp:64 src/modules/mod_geometry/star.cpp:63 -#: src/synfig/layer_polygon.cpp:60 src/synfig/layer_solidcolor.cpp:56 -msgid "Geometry" -msgstr "Geometría" - -#: src/modules/mod_geometry/checkerboard.cpp:122 -msgid "Color of checkers" -msgstr "Color de los cuadros" - -#: src/modules/mod_geometry/checkerboard.cpp:129 -msgid "Size of checkers" -msgstr "Tamaño de los cuadros" - -#: src/modules/mod_geometry/circle.cpp:55 -msgid "Circle" -msgstr "Círculo" - -#: src/modules/mod_geometry/circle.cpp:133 src/synfig/layer_shape.cpp:1205 -msgid "Feather" -msgstr "Desvanecimiento" - -#: src/modules/mod_geometry/circle.cpp:141 -msgid "Invert the circle" -msgstr "Invertir el círculo" - -#: src/modules/mod_geometry/circle.cpp:145 -msgid "Falloff" -msgstr "Caída" - -#: src/modules/mod_geometry/circle.cpp:146 -msgid "Determines the falloff function for the feather" -msgstr "Determina la función de caida del desvanecimiento" - -#: src/modules/mod_geometry/circle.cpp:148 -#: src/modules/mod_noise/distort.cpp:211 src/modules/mod_noise/noise.cpp:263 -#: src/synfig/layer_bitmap.cpp:132 src/synfig/valuenode.cpp:134 -#: src/synfig/valuenode_linear.cpp:142 -msgid "Linear" -msgstr "Linear" - -#: src/modules/mod_geometry/circle.cpp:149 -msgid "Squared" -msgstr "Cuadrado" - -#: src/modules/mod_geometry/circle.cpp:150 -msgid "Square Root" -msgstr "Raíz Cuadrada" - -#: src/modules/mod_geometry/circle.cpp:151 -msgid "Sigmond" -msgstr "Sigmoidea" - -#: src/modules/mod_geometry/circle.cpp:152 -#: src/modules/mod_noise/distort.cpp:212 src/modules/mod_noise/noise.cpp:264 -#: src/synfig/layer_bitmap.cpp:133 -msgid "Cosine" -msgstr "Coseno" - -#: src/modules/mod_geometry/outline.cpp:70 -msgid "Outline" -msgstr "Contorno" - -#: src/modules/mod_geometry/outline.cpp:178 -msgid "No vertices in outline " -msgstr "No hay vértices en el contorno " - -#: src/modules/mod_geometry/outline.cpp:807 -#: src/modules/mod_geometry/region.cpp:232 -#: src/modules/mod_gradient/curvegradient.cpp:497 -#: src/modules/mod_particle/plant.cpp:383 -msgid "Vertices" -msgstr "Vértices" - -#: src/modules/mod_geometry/outline.cpp:810 -#: src/modules/mod_gradient/curvegradient.cpp:500 -#: src/modules/mod_particle/plant.cpp:384 -msgid "A list of BLine Points" -msgstr "Una lista de Puntos de línea Beizer" - -#: src/modules/mod_geometry/outline.cpp:824 -msgid "Outline Width" -msgstr "Ancho del Contorno" - -#: src/modules/mod_geometry/outline.cpp:829 -msgid "Expand" -msgstr "Expandir" - -#: src/modules/mod_geometry/outline.cpp:833 -msgid "Sharp Cusps" -msgstr "Esquinas Afiladas" - -#: src/modules/mod_geometry/outline.cpp:834 -msgid "Determines cusp type" -msgstr "Determina el tipo de esquina" - -#: src/modules/mod_geometry/outline.cpp:838 -msgid "Rounded Begin" -msgstr "Comienzo Redondeado" - -#: src/modules/mod_geometry/outline.cpp:839 -#: src/modules/mod_geometry/outline.cpp:844 -msgid "Round off the tip" -msgstr "Redondeo de la punta" - -#: src/modules/mod_geometry/outline.cpp:843 -msgid "Rounded End" -msgstr "Fin Redondeado" - -#: src/modules/mod_geometry/outline.cpp:847 -msgid "Loopyness" -msgstr "Loopyness" - -#: src/modules/mod_geometry/outline.cpp:850 -msgid "Homogeneous" -msgstr "Homogeneo" - -#: src/modules/mod_geometry/rectangle.cpp:58 -msgid "Rectangle" -msgstr "Rectángulo" - -#: src/modules/mod_geometry/rectangle.cpp:126 -#: src/modules/mod_gradient/lineargradient.cpp:184 -msgid "Point 1" -msgstr "Punto 1" - -#: src/modules/mod_geometry/rectangle.cpp:131 -#: src/modules/mod_gradient/lineargradient.cpp:188 -msgid "Point 2" -msgstr "Punto 2" - -#: src/modules/mod_geometry/rectangle.cpp:136 -msgid "Expand amount" -msgstr "Cantidad de expansión" - -#: src/modules/mod_geometry/rectangle.cpp:140 -msgid "Invert the rectangle" -msgstr "Invertir el Rectángulo" - -#: src/modules/mod_geometry/region.cpp:63 -msgid "Region" -msgstr "Región" - -#: src/modules/mod_geometry/star.cpp:62 -msgid "Star" -msgstr "Estrella" - -#: src/modules/mod_geometry/star.cpp:174 -msgid "Outer Radius" -msgstr "Radio Exterior" - -#: src/modules/mod_geometry/star.cpp:175 -msgid "The radius of the outer points in the star" -msgstr "El radio de los puntos exteriores de la estrella" - -#: src/modules/mod_geometry/star.cpp:181 -msgid "Inner Radius" -msgstr "Radio Interior" - -#: src/modules/mod_geometry/star.cpp:182 -msgid "The radius of the inner points in the star" -msgstr "El radio de los puntos interiores de la estrella" - -#: src/modules/mod_geometry/star.cpp:188 -#: src/modules/mod_gradient/conicalgradient.cpp:114 -#: src/modules/mod_gradient/spiralgradient.cpp:124 -#: src/synfig/valuenode_cos.cpp:165 src/synfig/valuenode_sine.cpp:165 -msgid "Angle" -msgstr "Ángulo" - -#: src/modules/mod_geometry/star.cpp:189 -msgid "The orientation of the star" -msgstr "La orientación de la estrella" - -#: src/modules/mod_geometry/star.cpp:194 src/synfig/distance.cpp:247 -msgid "Points" -msgstr "Puntos" - -#: src/modules/mod_geometry/star.cpp:195 -msgid "The number of points in the star" -msgstr "El número de puntos de la estrella" - -#: src/modules/mod_geometry/star.cpp:199 -msgid "Regular Polygon" -msgstr "Polígono Regular" - -#: src/modules/mod_geometry/star.cpp:200 -msgid "Whether to draw a star or a regular polygon" -msgstr "Si dibuja un polígono regular o una estrella" - -#: src/modules/mod_gif/trgt_gif.cpp:107 -#, c-format -msgid "Unable to open \"%s\" for write access!" -msgstr "Imposible abrir \"%s\" para acceso de escritura!" - -#: src/modules/mod_gif/trgt_gif.cpp:195 -msgid "Description not set!" -msgstr "¡Sin descripción!" - -#: src/modules/mod_gradient/conicalgradient.cpp:56 -msgid "Conical Gradient" -msgstr "Gradiente Cónico" - -#: src/modules/mod_gradient/conicalgradient.cpp:57 -#: src/modules/mod_gradient/curvegradient.cpp:58 -#: src/modules/mod_gradient/lineargradient.cpp:54 -#: src/modules/mod_gradient/radialgradient.cpp:57 -#: src/modules/mod_gradient/spiralgradient.cpp:56 -#: src/modules/mod_noise/noise.cpp:57 -msgid "Gradients" -msgstr "Gradientes" - -#: src/modules/mod_gradient/conicalgradient.cpp:106 -#: src/modules/mod_gradient/curvegradient.cpp:503 -#: src/modules/mod_gradient/lineargradient.cpp:191 -#: src/modules/mod_gradient/radialgradient.cpp:110 -#: src/modules/mod_gradient/spiralgradient.cpp:109 -#: src/modules/mod_noise/noise.cpp:250 src/modules/mod_particle/plant.cpp:394 -#: src/synfig/valuenode_gradientrotate.cpp:146 -#: src/synfig/valuenode_repeat_gradient.cpp:183 -msgid "Gradient" -msgstr "Gradiente" - -#: src/modules/mod_gradient/curvegradient.cpp:57 -msgid "Curve Gradient" -msgstr "Gradiente Curvado" - -#: src/modules/mod_gradient/curvegradient.cpp:505 -#: src/modules/mod_gradient/lineargradient.cpp:194 -#: src/modules/mod_gradient/radialgradient.cpp:125 -#: src/synfig/valuenode_blinecalctangent.cpp:241 -#: src/synfig/valuenode_blinecalcvertex.cpp:200 -#: src/synfig/valuenode_blinecalcwidth.cpp:206 -msgid "Loop" -msgstr "Bucle" - -#: src/modules/mod_gradient/curvegradient.cpp:507 -#: src/modules/mod_gradient/lineargradient.cpp:197 -#: src/modules/mod_gradient/radialgradient.cpp:129 -msgid "ZigZag" -msgstr "Zig Zag" - -#: src/modules/mod_gradient/curvegradient.cpp:509 -msgid "Perpendicular" -msgstr "Perpendicular" - -#: src/modules/mod_gradient/curvegradient.cpp:511 -msgid "Fast" -msgstr "Rápido" - -#: src/modules/mod_gradient/lineargradient.cpp:53 -msgid "Linear Gradient" -msgstr "Gradiente Linear" - -#: src/modules/mod_gradient/radialgradient.cpp:56 -msgid "Radial Gradient" -msgstr "Gradiente Radial" - -#: src/modules/mod_gradient/spiralgradient.cpp:55 -msgid "Spiral Gradient" -msgstr "Gradiente Espiral" - -#: src/modules/mod_gradient/spiralgradient.cpp:129 -msgid "Clockwise" -msgstr "Horario" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:103 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:104 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:216 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:217 -msgid "No file to load" -msgstr "Sin archivo a cargar" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:157 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:158 -#: src/synfig/listimporter.cpp:182 src/synfig/listimporter.cpp:183 -#: src/tool/main.cpp:1181 -msgid "Unable to open " -msgstr "Imposible abrir " - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:164 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:165 -#: src/synfig/listimporter.cpp:189 src/synfig/listimporter.cpp:190 -msgid "Unable to get frame from " -msgstr "Imposible obtener fotograma desde " - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:171 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:172 -msgid "Bad surface from " -msgstr "Mala superficie desde " - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:227 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:228 -msgid "Unable to open pipe to imagemagick" -msgstr "Imposible abrir tubería a imagemagick" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:239 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:240 -msgid "Reached end of stream without finding PPM header" -msgstr "Alcanzado fin del flujo sin encontrar cabecera PPM" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:248 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:249 -msgid "stream not in PPM format" -msgstr "flujo sin formato PPM" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:260 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:261 -msgid "Premature end of file (after header)" -msgstr "Prematuro fin de archivo (después de cabecera)" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:273 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:274 -msgid "Premature end of file" -msgstr "Prematuro fin de archivo" - -#: src/modules/mod_imagemagick/trgt_imagemagick.cpp:157 -msgid "Unable to open pipe to imagemagick's convert utility" -msgstr "Imposible abrir tubería hacia la utilidad de conversión de imagemagick" - -#: src/modules/mod_noise/distort.cpp:56 -msgid "Noise Distort" -msgstr "Distrosión Ruidosa" - -#: src/modules/mod_noise/distort.cpp:197 -msgid "Displacement" -msgstr "Desplazamiento" - -#: src/modules/mod_noise/distort.cpp:204 src/modules/mod_noise/noise.cpp:253 -msgid "Random Seed" -msgstr "Semilla de Aleatoriedad" - -#: src/modules/mod_noise/distort.cpp:207 src/modules/mod_noise/noise.cpp:259 -#: src/modules/mod_noise/valuenode_random.cpp:247 -#: src/synfig/layer_bitmap.cpp:128 -msgid "Interpolation" -msgstr "Interpolación" - -#: src/modules/mod_noise/distort.cpp:208 src/modules/mod_noise/noise.cpp:260 -#: src/synfig/layer_bitmap.cpp:129 -msgid "What type of interpolation to use" -msgstr "Que tipo de interpolación usar" - -#: src/modules/mod_noise/distort.cpp:210 src/modules/mod_noise/noise.cpp:262 -#: src/synfig/layer_bitmap.cpp:131 -msgid "Nearest Neighbor" -msgstr "Vecino más cercano" - -#: src/modules/mod_noise/distort.cpp:213 src/modules/mod_noise/noise.cpp:265 -msgid "Spline" -msgstr "Spline" - -#: src/modules/mod_noise/distort.cpp:214 src/modules/mod_noise/noise.cpp:266 -#: src/synfig/layer_bitmap.cpp:134 -msgid "Cubic" -msgstr "Cúbico" - -#: src/modules/mod_noise/distort.cpp:217 src/modules/mod_noise/noise.cpp:269 -msgid "Detail" -msgstr "Detalle" - -#: src/modules/mod_noise/distort.cpp:220 src/modules/mod_noise/noise.cpp:272 -#: src/modules/mod_noise/valuenode_random.cpp:246 -msgid "Animation Speed" -msgstr "Velocidad Animación" - -#: src/modules/mod_noise/distort.cpp:223 src/modules/mod_noise/noise.cpp:275 -msgid "Turbulent" -msgstr "Turbulento" - -#: src/modules/mod_noise/main.cpp:66 -#: src/modules/mod_noise/valuenode_random.cpp:179 -msgid "Random" -msgstr "Aleatorio" - -#: src/modules/mod_noise/noise.cpp:56 -msgid "Noise Gradient" -msgstr "Gradiente Ruidoso" - -#: src/modules/mod_noise/noise.cpp:278 -msgid "Do Alpha" -msgstr "Hacer Transparencia" - -#: src/modules/mod_noise/noise.cpp:281 -msgid "Super Sampling" -msgstr "Super Muestreo" - -#: src/modules/mod_noise/valuenode_random.cpp:243 -#: src/synfig/valuenode_range.cpp:193 src/synfig/valuenode_reciprocal.cpp:124 -#: src/synfig/valuenode_reference.cpp:114 src/synfig/valuenode_scale.cpp:179 -#: src/synfig/valuenode_step.cpp:213 src/synfig/valuenode_timeloop.cpp:123 -msgid "Link" -msgstr "Enlace" - -#: src/modules/mod_noise/valuenode_random.cpp:245 -#: src/modules/mod_particle/plant.cpp:441 -msgid "Seed" -msgstr "Semilla" - -#: src/modules/mod_particle/plant.cpp:68 -msgid "Plant" -msgstr "Planta" - -#: src/modules/mod_particle/plant.cpp:395 -msgid "Gradient to be used for coloring the plant" -msgstr "Gradiente usado para colorear la planta" - -#: src/modules/mod_particle/plant.cpp:399 -msgid "Split Angle" -msgstr "Ángulo de división" - -#: src/modules/mod_particle/plant.cpp:400 -msgid "Angle by which each split deviates from its parent" -msgstr "Ángulo mediante el cual cada división se desvía de su predecesora" - -#: src/modules/mod_particle/plant.cpp:404 -msgid "Gravity" -msgstr "Gravedad" - -#: src/modules/mod_particle/plant.cpp:405 -msgid "Direction in which the shoots tend to face" -msgstr "Dirección hacia la cual las ramas tienden a apuntar" - -#: src/modules/mod_particle/plant.cpp:410 -msgid "Tangential Velocity" -msgstr "Velocidad Tangencial" - -#: src/modules/mod_particle/plant.cpp:411 -msgid "Amount to which shoots tend to grow along the tangent to the BLine" -msgstr "" -"Cantidad que tienden a crecer las ramas en la dirección tangente al la línea " -"Beizer" - -#: src/modules/mod_particle/plant.cpp:415 -msgid "Perpendicular Velocity" -msgstr "Velocidad Perpendicular" - -#: src/modules/mod_particle/plant.cpp:416 -msgid "Amount to which shoots tend to grow perpendicular to the tangent to the BLine" -msgstr "" -"Cantidad que tienden a crecer las ramas en la dirección perpendicular a la " -"tangente a la línea Beizer" - -#: src/modules/mod_particle/plant.cpp:420 -msgid "Stem Size" -msgstr "Tamaño del Tallo" - -#: src/modules/mod_particle/plant.cpp:421 -msgid "Size of the stem" -msgstr "Tamaño del Tallo" - -#: src/modules/mod_particle/plant.cpp:426 -msgid "Size As Alpha" -msgstr "Tamaño como Transparencia" - -#: src/modules/mod_particle/plant.cpp:427 -msgid "" -"If enabled, the alpha channel from the gradient is multiplied by the stem " -"size, and an alpha of 1.0 is used when rendering" -msgstr "" -"Si se habilita, el canal de transparencia del gradiente es multiplicado por " -"el tamaño de tallo y un valor de transparencia de 1,0 se usa al mostrar el " -"gradiente" - -#: src/modules/mod_particle/plant.cpp:431 -msgid "Reverse" -msgstr "Inversa" - -#: src/modules/mod_particle/plant.cpp:432 -msgid "If enabled, render the plant in the opposite direction" -msgstr "Si se habilita la planta se muestra en la dirección opuesta" - -#: src/modules/mod_particle/plant.cpp:436 src/synfig/valuenode.cpp:165 -#: src/synfig/valuenode_duplicate.cpp:123 src/synfig/valuenode_step.cpp:138 -msgid "Step" -msgstr "Paso" - -#: src/modules/mod_particle/plant.cpp:437 -msgid "Measure of the distance between points when rendering" -msgstr "Medida de la distancia entre puntos cuendo se hace la muestra" - -#: src/modules/mod_particle/plant.cpp:442 -msgid "Used to seed the pseudo-random number generator" -msgstr "Usado para alimentar el generador de números seudoaleatorios" - -#: src/modules/mod_particle/plant.cpp:446 -msgid "Splits" -msgstr "Divisiones" - -#: src/modules/mod_particle/plant.cpp:447 -msgid "Maximum number of times that each sprout can sprout recursively" -msgstr "Máximo número de veces que cada brote puede brotar recursivamente" - -#: src/modules/mod_particle/plant.cpp:451 -msgid "Sprouts" -msgstr "Brotes" - -#: src/modules/mod_particle/plant.cpp:452 -msgid "Number of places that growth occurs on each bline section" -msgstr "" -"Número de veces que aparece un brote en cada sección de segmento de línea " -"Beizer" - -#: src/modules/mod_particle/plant.cpp:456 -msgid "Random Factor" -msgstr "Factor de Aleatoriedad" - -#: src/modules/mod_particle/plant.cpp:457 -msgid "Used to scale down all random effects. Set to zero to disable randomness" -msgstr "" -"Usado para escalar todos los efectos aleatorios. Establecer a cero para " -"desactivar la aleatoriedad" - -#: src/modules/mod_particle/plant.cpp:461 -msgid "Drag" -msgstr "Arrastre" - -#: src/modules/mod_particle/plant.cpp:462 -msgid "Drag slows the growth" -msgstr "\"Arrastre\" enlentece el crecimiento" - -#: src/modules/mod_particle/plant.cpp:466 -msgid "Use Width" -msgstr "Usar Espesor" - -#: src/modules/mod_particle/plant.cpp:467 -msgid "Scale the velocity by the bline's width" -msgstr "Escala la velocidad mediante el espesor de línea beizer" - -#: src/modules/mod_ppm/mptr_ppm.cpp:86 -#, c-format -msgid "%s was not in PPM format" -msgstr "%s no estaba en formato PPM" - -#: src/synfig/distance.cpp:245 -msgid "Units" -msgstr "Unidades" - -#: src/synfig/distance.cpp:246 -msgid "Pixels" -msgstr "Pixels" - -#: src/synfig/distance.cpp:248 -msgid "Inches" -msgstr "Pulgadas" - -#: src/synfig/distance.cpp:249 -msgid "Meters" -msgstr "Metros" - -#: src/synfig/distance.cpp:250 -msgid "Millimeters" -msgstr "Milimetros" - -#: src/synfig/distance.cpp:251 -msgid "Centimeters" -msgstr "Centímetros" - -#: src/synfig/importer.cpp:89 -msgid "Importer::open(): Cannot open empty filename" -msgstr "Importer::open(): No puede Abrir un Archivo vacío" - -#: src/synfig/importer.cpp:103 -msgid "Importer::open(): Couldn't find extension" -msgstr "Importer::open(): No puede econtrar la extensión" - -#: src/synfig/importer.cpp:114 -msgid "Importer::open(): Unknown file type -- " -msgstr "Importer::open(): Tipo de archivo desconocido -- " - -#: src/synfig/layer.cpp:499 src/synfig/layer_composite.cpp:114 -msgid "Unable to create surface target" -msgstr "Imposible crear superficie objetivo" - -#: src/synfig/layer.cpp:537 -msgid "Z Depth" -msgstr "Profundidad Z" - -#: src/synfig/layer_bitmap.cpp:118 -msgid "Top-Left" -msgstr "Arriba-Izquierda" - -#: src/synfig/layer_bitmap.cpp:119 -msgid "Upper left-hand Corner of image" -msgstr "Esquina superior izquierda de la imagen" - -#: src/synfig/layer_bitmap.cpp:123 -msgid "Bottom-Right" -msgstr "Abajo-Derecha" - -#: src/synfig/layer_bitmap.cpp:124 -msgid "Lower right-hand Corner of image" -msgstr "Esquina inferior derecha de la imagen" - -#: src/synfig/layer_composite.cpp:145 src/synfig/paramdesc.cpp:62 -msgid "Blend Method" -msgstr "Metodo de Mezcla" - -#: src/synfig/layer_duplicate.cpp:56 src/synfig/valuenode.cpp:163 -#: src/synfig/valuenode_duplicate.cpp:206 -msgid "Duplicate" -msgstr "Duplicar" - -#: src/synfig/layer_duplicate.cpp:132 -msgid "Index" -msgstr "Índice" - -#: src/synfig/layer_duplicate.cpp:133 -msgid "Copy Index" -msgstr "Copiar Índice" - -#: src/synfig/layer_mime.cpp:86 -msgid "[MIME]" -msgstr "[MIME]" - -#: src/synfig/layer_motionblur.cpp:56 -msgid "Motion Blur" -msgstr "Desenfoque de Movimiento" - -#: src/synfig/layer_motionblur.cpp:122 -msgid "Aperture" -msgstr "Apertura" - -#: src/synfig/layer_motionblur.cpp:123 -msgid "Shutter Time" -msgstr "Tiempo de disparo" - -#: src/synfig/layer_pastecanvas.cpp:77 -msgid "Paste Canvas" -msgstr "Pegar Lienzo" - -#: src/synfig/layer_pastecanvas.cpp:114 -msgid "Pasted Canvas" -msgstr "Lienzo Pegado" - -#: src/synfig/layer_pastecanvas.cpp:115 -msgid "Inline Canvas" -msgstr "Lienzo en Línea" - -#: src/synfig/layer_pastecanvas.cpp:131 -msgid "Canvas" -msgstr "Lienzo" - -#: src/synfig/layer_pastecanvas.cpp:132 -msgid "Canvas to paste" -msgstr "Lienzo a pegar" - -#: src/synfig/layer_pastecanvas.cpp:136 -msgid "Size of canvas" -msgstr "Tamaño del Lienzo" - -#: src/synfig/layer_pastecanvas.cpp:144 -msgid "Children Lock" -msgstr "Bloquear Descendientes" - -#: src/synfig/layer_pastecanvas.cpp:154 -msgid "Current Time" -msgstr "Tiempo Actual" - -#: src/synfig/layer_polygon.cpp:59 -msgid "Polygon" -msgstr "Polígono" - -#: src/synfig/layer_polygon.cpp:171 -msgid "Vector List" -msgstr "Lista de Vectores" - -#: src/synfig/layer_shape.cpp:63 -msgid "Shape" -msgstr "Forma" - -#: src/synfig/layer_shape.cpp:64 -msgid "Internal" -msgstr "Interno" - -#: src/synfig/layer_shape.cpp:1193 -msgid "Layer_Shape Color" -msgstr "Color de la Capa de Forma" - -#: src/synfig/layer_shape.cpp:1202 -msgid "Antialiasing" -msgstr "Antialiasing" - -#: src/synfig/layer_shape.cpp:1209 -msgid "Type of Feather" -msgstr "Tipo de Desvanecimiento" - -#: src/synfig/layer_shape.cpp:1210 -msgid "Type of feathering to use" -msgstr "Tipo de desvanecimiento a usar" - -#: src/synfig/layer_shape.cpp:1219 -msgid "Winding Style" -msgstr "Estilo de Solape" - -#: src/synfig/layer_shape.cpp:1220 -msgid "Winding style to use" -msgstr "Estilo de solape a usar" - -#: src/synfig/layer_shape.cpp:1222 -msgid "Non Zero" -msgstr "No Cero" - -#: src/synfig/layer_shape.cpp:1223 -msgid "Even/Odd" -msgstr "Par/Impar" - -#: src/synfig/layer_solidcolor.cpp:55 -msgid "Solid Color" -msgstr "Color Sólido" - -#: src/synfig/listimporter.cpp:159 src/synfig/listimporter.cpp:160 -msgid "No images in list" -msgstr "Sin imágenes en la lista" - -#: src/synfig/loadcanvas.cpp:173 -#, c-format -msgid "Unexpected element <%s>, Expected <%s>" -msgstr "Elemento inesperado <%s>, Esperado <%s>" - -#: src/synfig/loadcanvas.cpp:179 -#, c-format -msgid "Unexpected element <%s>" -msgstr "Elemento inesperado <%s>" - -#: src/synfig/loadcanvas.cpp:190 -msgid "Too many warnings" -msgstr "Demasiados avisos" - -#: src/synfig/loadcanvas.cpp:220 -#, c-format -msgid "<%s> is missing \"%s\" attribute" -msgstr "<%s> no se encuentra atributo \"%s\"" - -#: src/synfig/loadcanvas.cpp:245 src/synfig/loadcanvas.cpp:264 -#: src/synfig/loadcanvas.cpp:283 src/synfig/loadcanvas.cpp:447 -#: src/synfig/loadcanvas.cpp:802 -#, c-format -msgid "<%s> should not contain anything" -msgstr "<%s> no debería contener nada" - -#: src/synfig/loadcanvas.cpp:249 src/synfig/loadcanvas.cpp:268 -#: src/synfig/loadcanvas.cpp:287 src/synfig/loadcanvas.cpp:451 -#: src/synfig/loadcanvas.cpp:806 -#, c-format -msgid "<%s> is missing \"value\" attribute" -msgstr "<%s>no se encuentra atributo \"value\"" - -#: src/synfig/loadcanvas.cpp:462 -#, c-format -msgid "Bad value \"%s\" in <%s>" -msgstr "Mal valor \"%s\" en <%s>" - -#: src/synfig/loadcanvas.cpp:486 -#, c-format -msgid "<%s> is missing \"pos\" attribute" -msgstr "<%s> no se encuentra atributo \"pos\"" - -#: src/synfig/loadcanvas.cpp:893 -#, c-format -msgid "Unable to create with type \"%s\"" -msgstr "Imposible crear con el tipo \"%s \"" - -#: src/synfig/loadcanvas.cpp:910 -msgid " is missing attribute \"time\"" -msgstr " ha perdido el atributo \"time\"" - -#: src/synfig/loadcanvas.cpp:923 -msgid "" -"Found \"use\" attribute for , but it wasn't empty. Ignoring " -"contents..." -msgstr "" -"Encontrado \"use\" atributo para , pero no estaba vacío. Ingorando " -"contenidos..." - -#: src/synfig/loadcanvas.cpp:939 src/synfig/loadcanvas.cpp:951 -#, c-format -msgid "<%s> is missing its data" -msgstr "<%s> esta perdiendo sus datos" - -#: src/synfig/loadcanvas.cpp:968 -msgid "Bad data for " -msgstr "Mal dato para " - -#: src/synfig/loadcanvas.cpp:983 -#, c-format -msgid "Unexpected element <%s> after data, ignoring..." -msgstr "Inesperado elemento <%s> después del dato , ingnorando..." - -#: src/synfig/loadcanvas.cpp:1025 src/synfig/loadcanvas.cpp:1042 -#, c-format -msgid "\"%s\" not a valid value for attribute \"%s\" in <%s>" -msgstr "\"%s\" no un valor válido para el atributo \"%s\" en <%s>" - -#: src/synfig/loadcanvas.cpp:1103 -#, c-format -msgid "Missing attribute \"type\" in <%s>" -msgstr "Perdido atributo \"type\" en <%s>" - -#: src/synfig/loadcanvas.cpp:1111 -#, c-format -msgid "Bad type in <%s>" -msgstr "Mal tipo en <%s>" - -#: src/synfig/loadcanvas.cpp:1120 -#, c-format -msgid "Error creating ValueNode <%s> with type '%s'. Refer to '%s'" -msgstr "Error creando el Valor de Nodo <%s> con el tipo '%s'. Refiere a '%s'" - -#: src/synfig/loadcanvas.cpp:1129 -#, c-format -msgid "<%s> did not accept type '%s'" -msgstr "<%s> no acepta este tipo '%s'" - -#: src/synfig/loadcanvas.cpp:1155 src/synfig/loadcanvas.cpp:1223 -#, c-format -msgid "'%s' was already defined in <%s>" -msgstr "'%s' fue ya definido en <%s>" - -#: src/synfig/loadcanvas.cpp:1165 -#, c-format -msgid "'%s' attribute in <%s> references unknown ID '%s'" -msgstr "Atributo '%s' en <%s> hace referencia a un ID desconocido '%s'" - -#: src/synfig/loadcanvas.cpp:1174 -#, c-format -msgid "Unable to set link '\"%s\" to ValueNode \"%s\" (link #%d in \"%s\")" -msgstr "Imposible enlazar \"%s\" al Valor de Nodo \"%s\" (enlace #%d en \"%s\")" - -#: src/synfig/loadcanvas.cpp:1198 -#, c-format -msgid "Unknown Exception thrown when referencing ValueNode \"%s\"" -msgstr "Lanzada excepción desconocida cuando se referencia al Valor de Nodo \"%s\"" - -#: src/synfig/loadcanvas.cpp:1238 -#, c-format -msgid "element <%s> is missing its contents" -msgstr "El elemento <%s> esta perdiendo su contenido" - -#: src/synfig/loadcanvas.cpp:1247 -#, c-format -msgid "Parse of '%s' failed" -msgstr "Interpretación de '%s' falló" - -#: src/synfig/loadcanvas.cpp:1254 -#, c-format -msgid "Unable to connect value node ('%s' of type '%s') to link %d (%s)" -msgstr "Imposible conectar el valor de nodo ('%s' de tipo '%s') para enlazar %d (%s)" - -#: src/synfig/loadcanvas.cpp:1272 -#, c-format -msgid "Unknown Exception thrown when working on element \"%s\"" -msgstr "Lanzada excepción desconocida al trabajar con el elemento \"%s\"" - -#: src/synfig/loadcanvas.cpp:1307 -#, c-format -msgid "<%s> is missing link %d (%s)" -msgstr "<%s>esta perdiendo el enlace %d (%s)" - -#: src/synfig/loadcanvas.cpp:1373 -msgid "Unable to create " -msgstr "Imposible crear " - -#: src/synfig/loadcanvas.cpp:1523 -msgid " is missing its contents or missing \"use\" element" -msgstr " esta perdiendo su contenido o perdiendo el elemento \"use\"" - -#: src/synfig/loadcanvas.cpp:1568 -#, c-format -msgid "Bad data in <%s>" -msgstr "Mal dato en <%s>" - -#: src/synfig/loadcanvas.cpp:1600 -#, c-format -msgid "Expected a ValueNode. Refer to '%s'" -msgstr "Esperado un Valor de Nodo. Refiere a '%s'" - -#: src/synfig/loadcanvas.cpp:1621 -#, c-format -msgid "Bad ID \"%s\"" -msgstr "Mal ID \"%s\"" - -#: src/synfig/loadcanvas.cpp:1626 -#, c-format -msgid "Duplicate ID \"%s\"" -msgstr "Duplicado ID \"%s\"" - -#: src/synfig/loadcanvas.cpp:1631 -#, c-format -msgid "Unknown Exception thrown when adding ValueNode \"%s\"" -msgstr "Lanzada excepción desconocida al añadir el Valor de Nodo \"%s\"" - -#: src/synfig/loadcanvas.cpp:1666 -msgid "Missing \"type\" attribute to \"layer\" element" -msgstr "Perdido atributo \"type\" al elemento \"layer\"" - -#: src/synfig/loadcanvas.cpp:1685 -msgid "Installed layer version is smaller than layer version in file" -msgstr "Versión de capa instalada es menor que la versión de capa en el fichero" - -#: src/synfig/loadcanvas.cpp:1705 -msgid " entry for is not yet supported. Ignoring..." -msgstr "Entrada para no está aún soportada. Ingorando..." - -#: src/synfig/loadcanvas.cpp:1708 -msgid " entry for is not yet supported. Ignoring..." -msgstr "Entrada para no está aún soportada. Ingorando..." - -#: src/synfig/loadcanvas.cpp:1716 -msgid "Missing \"name\" attribute for ." -msgstr "Pedido atributo \"name\" para " - -#: src/synfig/loadcanvas.cpp:1733 -msgid "" -"Found \"use\" attribute for , but it wasn't empty. Ignoring " -"contents..." -msgstr "" -"Encontrado atributo \"use\" para , pero no estaba vacío. Ingnorando " -"contenidos..." - -#: src/synfig/loadcanvas.cpp:1738 -msgid "Empty use=\"\" value in " -msgstr "Uso vacío=\"\" valor en " - -#: src/synfig/loadcanvas.cpp:1742 -msgid "Layer rejected canvas link" -msgstr "La capa rechazó el enlace al lienzo" - -#: src/synfig/loadcanvas.cpp:1760 -#, c-format -msgid "Unknown ID (%s) referenced in " -msgstr "Desconocido ID (%s) refernciado en " - -#: src/synfig/loadcanvas.cpp:1776 -msgid " is either missing its contents, or missing a \"use\" attribute." -msgstr " esta perdiendo su contenido o perdiendo un atributo \"use\"." - -#: src/synfig/loadcanvas.cpp:1788 src/synfig/loadcanvas.cpp:1808 -msgid "Bad data for " -msgstr "Mal dato para " - -#: src/synfig/loadcanvas.cpp:1796 -#, c-format -msgid "Layer '%s' rejected value for parameter '%s'" -msgstr "La capa '%s' rechazó el valor para el párametro '%s'" - -#: src/synfig/loadcanvas.cpp:1819 -#, c-format -msgid "Unexpected element <%s> after data, ignoring..." -msgstr "Inesperado elemento <%s> después del dato , ignorando..." - -#: src/synfig/loadcanvas.cpp:1974 -msgid "Inline canvas cannot have a section" -msgstr "Lienzo en línea no puede tener una sección " - -#: src/synfig/loadcanvas.cpp:1982 -msgid "Inline canvas cannot have keyframes" -msgstr "Lienzo en línea no puede tener fotogramas clave" - -#: src/synfig/loadcanvas.cpp:1994 -msgid "Inline canvases cannot have metadata" -msgstr "Lienzos en línea no pueden tener meta datos" - -#: src/synfig/loadcanvas.cpp:2002 -msgid " must have a name" -msgstr " debe tener un nombre" - -#: src/synfig/loadcanvas.cpp:2008 -msgid " must have content" -msgstr " debe tener conenido" - -#: src/synfig/loadcanvas.cpp:2020 -msgid "blank \"name\" entity" -msgstr "entidad \"name\" vacía" - -#: src/synfig/loadcanvas.cpp:2035 -msgid "blank \"desc\" entity" -msgstr "entidad \"desc\" vacía" - -#: src/synfig/loadcanvas.cpp:2050 -msgid "blank \"author\" entity" -msgstr "entidad \"author\" vacía" - -#: src/synfig/loadcanvas.cpp:2082 -#, c-format -msgid "Canvas '%s' has undefined %s: %s" -msgstr "Lienzo '%s' tiene sin definir '%s':'%s'" - -#: src/synfig/loadcanvas.cpp:2084 src/synfig/valuenode.cpp:351 -msgid "ValueNode" -msgstr "Valor de Nodo" - -#: src/synfig/loadcanvas.cpp:2084 -msgid "ValueNodes" -msgstr "Valores de Nodos" - -#: src/synfig/loadcanvas.cpp:2164 -msgid "" -msgstr "" - -#: src/synfig/main.cpp:103 -#, c-format -msgid "API Version mismatch (LIB:%d, PROG:%d)" -msgstr "Desajuste en la versión API (LIB:%d, PROG:%d)" - -#: src/synfig/main.cpp:108 -#, c-format -msgid "Size of Vector mismatch (app:%d, lib:%d)" -msgstr "Desajuste en el tamaño del Vector (app:%d, lib:%d)" - -#: src/synfig/main.cpp:113 -#, c-format -msgid "Size of Color mismatch (app:%d, lib:%d)" -msgstr "Desajuste en el tamaño del Color (app:%d, lib:%d)" - -#: src/synfig/main.cpp:118 -#, c-format -msgid "Size of Canvas mismatch (app:%d, lib:%d)" -msgstr "Desajuste en el tamaño del Lienzo (app:%d, lib:%d)" - -#: src/synfig/main.cpp:123 -#, c-format -msgid "Size of Layer mismatch (app:%d, lib:%d)" -msgstr "Desajuste en el tamaño de la Capa (app:%d, lib:%d)" - -#: src/synfig/main.cpp:213 -msgid "Starting Subsystem \"Modules\"" -msgstr "Comenzando Subsistema \"Modules\"" - -#: src/synfig/main.cpp:215 -msgid "Unable to initialize subsystem \"Module\"" -msgstr "Imposible comenzar el subsistema \"Module\"" - -#: src/synfig/main.cpp:217 -msgid "Starting Subsystem \"Layers\"" -msgstr "Comenzando subsistema \"Layers\"" - -#: src/synfig/main.cpp:221 -msgid "Unable to initialize subsystem \"Layers\"" -msgstr "Imposible comenzar el subsistema \"Layers\"" - -#: src/synfig/main.cpp:224 -msgid "Starting Subsystem \"Targets\"" -msgstr "Comenzando subsistema \"Targets\"" - -#: src/synfig/main.cpp:229 -msgid "Unable to initialize subsystem \"Targets\"" -msgstr "Imposible comenzar el subsistema \"Targets\"" - -#: src/synfig/main.cpp:232 -msgid "Starting Subsystem \"Importers\"" -msgstr "Comenzando subsistema \"Importers\"" - -#: src/synfig/main.cpp:238 -msgid "Unable to initialize subsystem \"Importers\"" -msgstr "Imposible comenzar el subsistema \"Importers\"" - -#: src/synfig/main.cpp:241 -msgid "Starting Subsystem \"ValueNodes\"" -msgstr "Comenzando subsistema \"ValueNodes\"" - -#: src/synfig/main.cpp:248 -msgid "Unable to initialize subsystem \"ValueNodes\"" -msgstr "Imposible comenzar el subsistema \"ValueNodes\"" - -#: src/synfig/main.cpp:307 -#, c-format -msgid "Loading modules from %s" -msgstr "Cargando módulos desde %s" - -#: src/synfig/main.cpp:320 src/tool/main.cpp:243 -msgid "DONE" -msgstr "HECHO" - -#: src/synfig/main.cpp:386 src/tool/main.cpp:123 src/tool/main.cpp:164 -msgid "error" -msgstr "error" - -#: src/synfig/main.cpp:401 src/tool/main.cpp:130 src/tool/main.cpp:171 -msgid "warning" -msgstr "precaución" - -#: src/synfig/main.cpp:416 -msgid "info" -msgstr "información" - -#: src/synfig/module.cpp:66 -msgid "Errors on lt_dlinit()" -msgstr "Errores en lt_dlinit()" - -#: src/synfig/module.cpp:122 -#, c-format -msgid "Attempting to register \"%s\"" -msgstr "Intentando registrar \"%s\"" - -#: src/synfig/module.cpp:129 -#, c-format -msgid "Unable to find module \"%s\" (%s)" -msgstr "Imposible encontrar módulo \"%s\" (%s)" - -#: src/synfig/module.cpp:133 -#, c-format -msgid "Found module \"%s\"" -msgstr "Encontrado módulo \"%s\"" - -#: src/synfig/module.cpp:167 -#, c-format -msgid "Unable to find entrypoint in module \"%s\" (%s)" -msgstr "Imposible encontrar punto de entrada en módulo \"%s\" (%s)" - -#: src/synfig/module.cpp:180 -msgid "Entrypoint did not return a module." -msgstr "Punto de entrada no devuelve un módulo." - -#: src/synfig/module.cpp:184 -#, c-format -msgid "Success for \"%s\"" -msgstr "Éxito para \"%s\"" - -#: src/synfig/palette.cpp:72 -msgid "Unnamed" -msgstr "Sin nombre" - -#: src/synfig/palette.cpp:89 -msgid "Surface Palette" -msgstr "Paleta Superficial" - -#: src/synfig/palette.cpp:284 -#, c-format -msgid "%0.2f%% Gray" -msgstr "%0.2f%% Gray" - -#: src/synfig/palette.cpp:299 -#, c-format -msgid "Unable to open %s for write" -msgstr "Imposible abrir %s para escribir" - -#: src/synfig/palette.cpp:321 -#, c-format -msgid "Unable to open %s for read" -msgstr "Imposible abrir %s para leer" - -#: src/synfig/palette.cpp:329 -#, c-format -msgid "%s does not appear to be a palette file" -msgstr "%s no parece ser un archivo de paleta" - -#: src/synfig/paramdesc.cpp:64 -msgid "_Composite" -msgstr "_Componer" - -#: src/synfig/paramdesc.cpp:65 -msgid "_Straight" -msgstr "_Directo" - -#: src/synfig/paramdesc.cpp:66 -msgid "_Onto" -msgstr "_Encima" - -#: src/synfig/paramdesc.cpp:67 -msgid "S_traight Onto" -msgstr "Direc_to Encima" - -#: src/synfig/paramdesc.cpp:68 -msgid "_Behind" -msgstr "_Debajo" - -#: src/synfig/paramdesc.cpp:69 -msgid "Sc_reen" -msgstr "_Pantalla" - -#: src/synfig/paramdesc.cpp:70 -msgid "Overla_y" -msgstr "_Solapar" - -#: src/synfig/paramdesc.cpp:71 -msgid "_Hard Light" -msgstr "Clarear _Fuerte" - -#: src/synfig/paramdesc.cpp:72 -msgid "_Multiply" -msgstr "_Multiplicar" - -#: src/synfig/paramdesc.cpp:73 -msgid "_Divide" -msgstr "Di_vidir" - -#: src/synfig/paramdesc.cpp:74 -msgid "_Add" -msgstr "S_umar" - -#: src/synfig/paramdesc.cpp:75 -msgid "S_ubtract" -msgstr "_Restar" - -#: src/synfig/paramdesc.cpp:76 -msgid "Di_fference" -msgstr "D_iferencia" - -#: src/synfig/paramdesc.cpp:77 -msgid "Bri_ghten" -msgstr "C_larear" - -#: src/synfig/paramdesc.cpp:78 -msgid "Dar_ken" -msgstr "_Oscurecer" - -#: src/synfig/paramdesc.cpp:79 -msgid "Co_lor" -msgstr "Colo_r" - -#: src/synfig/paramdesc.cpp:80 -msgid "Hu_e" -msgstr "_Tono" - -#: src/synfig/paramdesc.cpp:81 -msgid "Saturatio_n" -msgstr "Saturació_n" - -#: src/synfig/paramdesc.cpp:82 -msgid "Lum_inance" -msgstr "Lum_inancia" - -#: src/synfig/paramdesc.cpp:84 -msgid "Alpha O_ver" -msgstr "Tr_ansparentar" - -#: src/synfig/paramdesc.cpp:85 -msgid "Al_pha Brighten" -msgstr "_Clarear Transp." - -#: src/synfig/paramdesc.cpp:86 -msgid "Al_pha Darken" -msgstr "Osc_urecer Transp." - -#: src/synfig/render.cpp:247 src/synfig/render.cpp:248 -#: src/synfig/render.cpp:302 src/synfig/render.cpp:303 -#: src/synfig/render.cpp:423 src/synfig/render.cpp:424 -#: src/synfig/render.cpp:450 src/synfig/render.cpp:451 -msgid "Target panic" -msgstr "Pánico en Formato" - -#: src/synfig/savecanvas.cpp:254 -#, c-format -msgid "Unknown value(%s), cannot create XML representation!" -msgstr "Desconocido valor (%s), ¡no puedo crear una representación XML!" - -#: src/synfig/savecanvas.cpp:529 -#, c-format -msgid "Unknown ValueNode Type (%s), cannot create an XML representation" -msgstr "Desconocido Tipo de Valor de Nodo (%s), no puedo crear una representación XML" - -#: src/synfig/target_scanline.cpp:129 src/synfig/target_tile.cpp:312 -msgid "Target initialization failure" -msgstr "Fallo de inicialización de formato" - -#: src/synfig/target_scanline.cpp:245 src/synfig/target_scanline.cpp:291 -#: src/synfig/target_scanline.cpp:389 src/synfig/target_scanline.cpp:437 -#: src/synfig/target_tile.cpp:254 -msgid "Accelerated Renderer Failure" -msgstr "Fallo de Muestreo Acelerado" - -#: src/synfig/target_scanline.cpp:300 src/synfig/target_scanline.cpp:446 -msgid "Unable to put surface on target" -msgstr "Imposible poner superficie en el objetivo" - -#: src/synfig/target_scanline.cpp:459 src/synfig/target_tile.cpp:435 -msgid "Caught string :" -msgstr "Cadena cogida :" - -#: src/synfig/target_scanline.cpp:464 src/synfig/target_tile.cpp:440 -msgid "Ran out of memory (Probably a bug)" -msgstr "Sin memoria (Probablemente un bug)" - -#: src/synfig/target_scanline.cpp:469 src/synfig/target_tile.cpp:445 -msgid "Caught unknown error, rethrowing..." -msgstr "Cogido error desconocido, relanzando..." - -#: src/synfig/target_tile.cpp:141 -msgid "Bad Tile Size" -msgstr "Mal tamaño de enlosado" - -#: src/synfig/target_tile.cpp:191 -msgid "Parametric Renderer Failure" -msgstr "Fallo de Muestreo Paramétrico" - -#: src/synfig/target_tile.cpp:198 src/synfig/target_tile.cpp:262 -msgid "Bad surface" -msgstr "Mala superficie" - -#: src/synfig/target_tile.cpp:208 src/synfig/target_tile.cpp:274 -msgid "add_tile():Unable to put surface on target" -msgstr "add_tile():Imposible poner la superficie en el objetivo" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:234 src/synfig/value.cpp:289 -msgid "bool" -msgstr "Booleano" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:236 src/synfig/value.cpp:287 -msgid "integer" -msgstr "Entero" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:238 -msgid "angle" -msgstr "Ángulo" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:240 src/synfig/value.cpp:281 -msgid "time" -msgstr "Tiempo" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:242 src/synfig/value.cpp:284 -msgid "real" -msgstr "Real" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:244 -msgid "vector" -msgstr "Vector" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:246 -msgid "color" -msgstr "Color" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:248 -msgid "segment" -msgstr "Segmento" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:250 -msgid "bline_point" -msgstr "Punto de línea Beizer" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:252 -msgid "list" -msgstr "Lista" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:254 -msgid "canvas" -msgstr "Lienzo" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:256 -msgid "string" -msgstr "Cadena" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:258 -msgid "gradient" -msgstr "Gradiente" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:260 -msgid "nil" -msgstr "nulo" - -#: src/synfig/valuenode.cpp:135 src/synfig/valuenode_composite.cpp:431 -msgid "Composite" -msgstr "Componer" - -#: src/synfig/valuenode.cpp:136 src/synfig/valuenode_radialcomposite.cpp:303 -msgid "Radial Composite" -msgstr "Composición Radial" - -#: src/synfig/valuenode.cpp:137 src/synfig/valuenode_reference.cpp:156 -msgid "Reference" -msgstr "Referencia" - -#: src/synfig/valuenode.cpp:138 src/synfig/valuenode_blinecalctangent.cpp:244 -#: src/synfig/valuenode_blinecalcwidth.cpp:208 -#: src/synfig/valuenode_exp.cpp:157 src/synfig/valuenode_scale.cpp:217 -msgid "Scale" -msgstr "Escala" - -#: src/synfig/valuenode.cpp:139 src/synfig/valuenode_segcalctangent.cpp:100 -msgid "Segment Tangent" -msgstr "Tangente de Segmento" - -#: src/synfig/valuenode.cpp:140 src/synfig/valuenode_segcalcvertex.cpp:98 -msgid "Segment Vertex" -msgstr "Vértice de Segmento" - -#: src/synfig/valuenode.cpp:141 src/synfig/valuenode_stripes.cpp:78 -#: src/synfig/valuenode_stripes.cpp:225 -msgid "Stripes" -msgstr "Bandas" - -#: src/synfig/valuenode.cpp:142 src/synfig/valuenode_subtract.cpp:233 -msgid "Subtract" -msgstr "Restar" - -#: src/synfig/valuenode.cpp:143 src/synfig/valuenode_twotone.cpp:179 -msgid "Two-Tone" -msgstr "Dos Tonos" - -#: src/synfig/valuenode.cpp:144 src/synfig/valuenode_bline.cpp:850 -#: src/synfig/valuenode_blinecalctangent.cpp:240 -#: src/synfig/valuenode_blinecalcvertex.cpp:199 -#: src/synfig/valuenode_blinecalcwidth.cpp:205 -msgid "BLine" -msgstr "Línea Beizer" - -#: src/synfig/valuenode.cpp:145 src/synfig/valuenode_dynamiclist.cpp:713 -msgid "Dynamic List" -msgstr "Lista Dinámica" - -#: src/synfig/valuenode.cpp:146 src/synfig/valuenode_gradientrotate.cpp:76 -#: src/synfig/valuenode_gradientrotate.cpp:188 -msgid "Gradient Rotate" -msgstr "Rotar Gradiente" - -#: src/synfig/valuenode.cpp:147 src/synfig/valuenode_sine.cpp:106 -msgid "Sine" -msgstr "Seno" - -#: src/synfig/valuenode.cpp:149 src/synfig/valuenode_timedswap.cpp:264 -msgid "Timed Swap" -msgstr "Intercambio Temporizado" - -#: src/synfig/valuenode.cpp:150 src/synfig/valuenode_repeat_gradient.cpp:81 -#: src/synfig/valuenode_repeat_gradient.cpp:234 -msgid "Repeat Gradient" -msgstr "Repetir Gradiente" - -#: src/synfig/valuenode.cpp:151 src/synfig/valuenode_exp.cpp:102 -msgid "Exponential" -msgstr "Exponencial" - -#: src/synfig/valuenode.cpp:152 src/synfig/valuenode_add.cpp:227 -msgid "Add" -msgstr "Sumar" - -#: src/synfig/valuenode.cpp:153 src/synfig/valuenode_blinecalctangent.cpp:172 -msgid "BLine Tangent" -msgstr "Tangente de Linea Beizer" - -#: src/synfig/valuenode.cpp:154 src/synfig/valuenode_blinecalcvertex.cpp:140 -msgid "BLine Vertex" -msgstr "Vértice de Línea Beizer" - -#: src/synfig/valuenode.cpp:155 src/synfig/valuenode_range.cpp:230 -msgid "Range" -msgstr "Rango" - -#: src/synfig/valuenode.cpp:157 src/synfig/valuenode_switch.cpp:170 -msgid "Switch" -msgstr "Interruptor" - -#: src/synfig/valuenode.cpp:158 src/synfig/valuenode_cos.cpp:106 -msgid "Cos" -msgstr "Coseno" - -#: src/synfig/valuenode.cpp:159 -msgid "aTan2" -msgstr "aTan2" - -#: src/synfig/valuenode.cpp:160 -msgid "Reverse Tangent" -msgstr "Revertir Tangente" - -#: src/synfig/valuenode.cpp:162 src/synfig/valuenode_reciprocal.cpp:179 -msgid "Reciprocal" -msgstr "Recíproco" - -#: src/synfig/valuenode.cpp:164 src/synfig/valuenode_integer.cpp:183 -msgid "From Integer" -msgstr "Desde Entero" - -#: src/synfig/valuenode.cpp:166 src/synfig/valuenode_blinecalcwidth.cpp:143 -msgid "BLine Width" -msgstr "Ancho del Contorno" - -#: src/synfig/valuenode.cpp:168 -msgid "Vector Angle" -msgstr "Ángulo de Vector" - -#: src/synfig/valuenode.cpp:169 -msgid "Vector Length" -msgstr "Longitud de Vector" - -#: src/synfig/valuenode.cpp:170 -msgid "Vector X" -msgstr "X de Vector" - -#: src/synfig/valuenode.cpp:171 -msgid "Vector Y" -msgstr "Y de Vector" - -#: src/synfig/valuenode.cpp:172 -msgid "Gradient Color" -msgstr "Color de Gradiente" - -#: src/synfig/valuenode.cpp:173 -msgid "Dot Product" -msgstr "Producto Escalar" - -#: src/synfig/valuenode.cpp:174 src/synfig/valuenode_timestring.cpp:115 -msgid "Time String" -msgstr "Cadena de Tiempo" - -#: src/synfig/valuenode.cpp:175 src/synfig/valuenode_realstring.cpp:121 -msgid "Real String" -msgstr "Cadena de Real" - -#: src/synfig/valuenode.cpp:176 src/synfig/valuenode_join.cpp:140 -msgid "Joined List" -msgstr "Lista Unida" - -#: src/synfig/valuenode.cpp:177 -msgid "Angle String" -msgstr "Cadena de Ángulo" - -#: src/synfig/valuenode.cpp:178 -msgid "Int String" -msgstr "Cadena de Entero" - -#: src/synfig/valuenode.cpp:179 -msgid "Logarithm" -msgstr "Logaritmo" - -#: src/synfig/valuenode.cpp:246 -#, c-format -msgid "Bad type: ValueNode '%s' doesn't accept type '%s'" -msgstr "Mal tipo: Valor de Nodo %s no acepta el tipo %s" - -#: src/synfig/valuenode.cpp:511 -msgid "Placeholder" -msgstr "Casilla" - -#: src/synfig/valuenode.h:74 -#, c-format -msgid "%s:%d wrong type for %s: need %s but got %s" -msgstr "%s:%d mal tipo para %s: necesito %s pero obtengo %s" - -#: src/synfig/valuenode_add.cpp:98 src/synfig/valuenode_gradientrotate.cpp:76 -#: src/synfig/valuenode_integer.cpp:78 src/synfig/valuenode_integer.cpp:170 -#: src/synfig/valuenode_range.cpp:86 -#: src/synfig/valuenode_repeat_gradient.cpp:81 -#: src/synfig/valuenode_scale.cpp:87 src/synfig/valuenode_stripes.cpp:78 -#: src/synfig/valuenode_subtract.cpp:98 -msgid ":Bad type " -msgstr "Mal tipo " - -#: src/synfig/valuenode_add.cpp:123 src/synfig/valuenode_scale.cpp:116 -#: src/synfig/valuenode_subtract.cpp:129 -msgid "One or both of my parameters aren't set!" -msgstr "Uno o ámbos de mis parámetros no esán establecidos!" - -#: src/synfig/valuenode_add.cpp:188 src/synfig/valuenode_subtract.cpp:194 -msgid "LHS" -msgstr "LHS" - -#: src/synfig/valuenode_add.cpp:189 src/synfig/valuenode_subtract.cpp:195 -msgid "RHS" -msgstr "RHS" - -#: src/synfig/valuenode_add.cpp:190 src/synfig/valuenode_scale.cpp:181 -#: src/synfig/valuenode_subtract.cpp:196 -msgid "Scalar" -msgstr "Escalar" - -#: src/synfig/valuenode_animated.cpp:261 src/synfig/valuenode_animated.cpp:285 -#: src/synfig/valuenode_animated.cpp:561 src/synfig/valuenode_animated.cpp:579 -#: src/synfig/valuenode_animated.cpp:659 src/synfig/valuenode_animated.cpp:678 -msgid "A waypoint already exists at this point in time" -msgstr "Un punto de interpolación existe actualmente en este punto de tiempo" - -#: src/synfig/valuenode_animated.cpp:1056 -#, c-format -msgid "%s: You cannot use a %s in an animated ValueNode" -msgstr "%s: No puede usar %s en un Valor de Nodo animado" - -#: src/synfig/valuenode_animated.cpp:1091 -msgid "Animated" -msgstr "Animado" - -#: src/synfig/valuenode_bline.cpp:797 src/synfig/valuenode_dynamiclist.cpp:619 -msgid "No entries in list" -msgstr "Sin entradas en la lista" - -#: src/synfig/valuenode_bline.cpp:800 src/synfig/valuenode_dynamiclist.cpp:622 -msgid "No entries in ret_list" -msgstr "Sin entradas en ret_list" - -#: src/synfig/valuenode_bline.cpp:809 -#, c-format -msgid "Vertex %03d" -msgstr "Vértice %03d" - -#: src/synfig/valuenode_blinecalctangent.cpp:243 -#: src/synfig/valuenode_gradientrotate.cpp:148 -#: src/synfig/valuenode_linear.cpp:215 -msgid "Offset" -msgstr "Desplazamiento" - -#: src/synfig/valuenode_blinecalctangent.cpp:245 -msgid "Fixed Length" -msgstr "Longitud Fija" - -#: src/synfig/valuenode_composite.cpp:161 -#: src/synfig/valuenode_composite.cpp:181 -msgid "Bad type for composite" -msgstr "Mal tipo para componer" - -#: src/synfig/valuenode_composite.cpp:267 -msgid "Red" -msgstr "Rojo" - -#: src/synfig/valuenode_composite.cpp:269 -msgid "Green" -msgstr "Verde" - -#: src/synfig/valuenode_composite.cpp:271 -msgid "Blue" -msgstr "Azul" - -#: src/synfig/valuenode_composite.cpp:273 -#: src/synfig/valuenode_radialcomposite.cpp:210 -msgid "Alpha" -msgstr "Alfa" - -#: src/synfig/valuenode_composite.cpp:277 -msgid "Vertex 1" -msgstr "Vértice 1" - -#: src/synfig/valuenode_composite.cpp:279 -#: src/synfig/valuenode_composite.cpp:295 -msgid "Tangent 1" -msgstr "Tangente 1" - -#: src/synfig/valuenode_composite.cpp:281 -msgid "Vertex 2" -msgstr "Vértice 2" - -#: src/synfig/valuenode_composite.cpp:283 -#: src/synfig/valuenode_composite.cpp:297 -msgid "Tangent 2" -msgstr "Tangente 2" - -#: src/synfig/valuenode_composite.cpp:287 -msgid "Vertex" -msgstr "Vértice" - -#: src/synfig/valuenode_composite.cpp:293 -msgid "Split Tangents" -msgstr "Separar Tangentes" - -#: src/synfig/valuenode_composite.cpp:304 -#: src/synfig/valuenode_radialcomposite.cpp:221 -#, c-format -msgid "C%d" -msgstr "C%d" - -#: src/synfig/valuenode_const.cpp:126 -msgid "Constant" -msgstr "Constante" - -#: src/synfig/valuenode_cos.cpp:167 src/synfig/valuenode_sine.cpp:167 -msgid "Amplitude" -msgstr "Amplitud" - -#: src/synfig/valuenode_duplicate.cpp:121 -msgid "From" -msgstr "Desde" - -#: src/synfig/valuenode_duplicate.cpp:122 -msgid "To" -msgstr "Hasta" - -#: src/synfig/valuenode_dynamiclist.cpp:613 -msgid "List type/item type mismatch, throwing away mismatch" -msgstr "" -"Typo de lista/Tipo de elemento mal emparejado, lanzando lejos el " -"desemparejamiento " - -#: src/synfig/valuenode_dynamiclist.cpp:661 -#, c-format -msgid "Item %03d" -msgstr "Elemento %03d" - -#: src/synfig/valuenode_exp.cpp:155 -msgid "Exponent" -msgstr "Exponente" - -#: src/synfig/valuenode_integer.cpp:132 -msgid "Integer" -msgstr "Entero" - -#: src/synfig/valuenode_join.cpp:202 -msgid "Strings" -msgstr "Cadenas" - -#: src/synfig/valuenode_join.cpp:203 src/synfig/valuenode_timedswap.cpp:221 -msgid "Before" -msgstr "Antes" - -#: src/synfig/valuenode_join.cpp:204 -msgid "Separator" -msgstr "Separador" - -#: src/synfig/valuenode_join.cpp:205 src/synfig/valuenode_timedswap.cpp:222 -msgid "After" -msgstr "Después" - -#: src/synfig/valuenode_linear.cpp:209 -msgid "Rate" -msgstr "Ratio" - -#: src/synfig/valuenode_linear.cpp:212 -msgid "Slope" -msgstr "Pendiente" - -#: src/synfig/valuenode_radialcomposite.cpp:121 -#: src/synfig/valuenode_radialcomposite.cpp:137 -msgid "Bad type for radialcomposite" -msgstr "Mal tipo para composición radial" - -#: src/synfig/valuenode_radialcomposite.cpp:199 -msgid "Theta" -msgstr "Theta" - -#: src/synfig/valuenode_radialcomposite.cpp:204 -msgid "Luma" -msgstr "Luma" - -#: src/synfig/valuenode_radialcomposite.cpp:206 -msgid "Saturation" -msgstr "Saturación" - -#: src/synfig/valuenode_radialcomposite.cpp:208 -msgid "Hue" -msgstr "Tono" - -#: src/synfig/valuenode_range.cpp:118 -msgid "Some of my parameters aren't set!" -msgstr "¡Algunos de mis parámetros no han sido establecidos!" - -#: src/synfig/valuenode_range.cpp:191 -msgid "Min" -msgstr "Min" - -#: src/synfig/valuenode_range.cpp:192 -msgid "Max" -msgstr "Max" - -#: src/synfig/valuenode_realstring.cpp:183 -msgid "Real" -msgstr "Real" - -#: src/synfig/valuenode_realstring.cpp:185 -msgid "Precision" -msgstr "Precisión" - -#: src/synfig/valuenode_realstring.cpp:186 -msgid "Zero Padded" -msgstr "Relleno con Ceros" - -#: src/synfig/valuenode_reciprocal.cpp:125 -msgid "Epsilon" -msgstr "Epsilon" - -#: src/synfig/valuenode_reciprocal.cpp:126 -msgid "Infinite" -msgstr "Infinito" - -#: src/synfig/valuenode_repeat_gradient.cpp:184 -msgid "Count" -msgstr "Contador" - -#: src/synfig/valuenode_repeat_gradient.cpp:186 -msgid "Specify Start" -msgstr "Especificar Comienzo" - -#: src/synfig/valuenode_repeat_gradient.cpp:187 -msgid "Specify End" -msgstr "Especificar Fin" - -#: src/synfig/valuenode_repeat_gradient.cpp:188 -msgid "Start Color" -msgstr "Color de Comienzo" - -#: src/synfig/valuenode_repeat_gradient.cpp:189 -msgid "End Color" -msgstr "Color de Fin" - -#: src/synfig/valuenode_segcalctangent.cpp:159 -#: src/synfig/valuenode_segcalcvertex.cpp:157 -msgid "Segment" -msgstr "Segmento" - -#: src/synfig/valuenode_step.cpp:215 src/tool/main.cpp:945 -msgid "Start Time" -msgstr "Tiempo de Inicio" - -#: src/synfig/valuenode_step.cpp:216 -msgid "Intersection" -msgstr "Intersección" - -#: src/synfig/valuenode_stripes.cpp:170 -msgid "Color 1" -msgstr "Color 1" - -#: src/synfig/valuenode_stripes.cpp:172 -msgid "Color 2" -msgstr "Color 2" - -#: src/synfig/valuenode_stripes.cpp:174 -msgid "Stripe Count" -msgstr "Contador de Bandas" - -#: src/synfig/valuenode_timedswap.cpp:223 -msgid "Swap Time" -msgstr "Tiempo de Intercambio" - -#: src/synfig/valuenode_timedswap.cpp:224 -msgid "Swap Duration" -msgstr "Duración del Intercambio" - -#: src/synfig/valuenode_timestring.cpp:168 -msgid "Time" -msgstr "Tiempo" - -#: src/synfig/valuenode_twotone.cpp:136 -msgid "Color1" -msgstr "Color1" - -#: src/synfig/valuenode_twotone.cpp:138 -msgid "Color2" -msgstr "Color2" - -#: src/tool/main.cpp:216 -msgid "Line" -msgstr "Línea" - -#: src/tool/main.cpp:216 -msgid " of " -msgstr " de " - -#: src/tool/main.cpp:322 -msgid "syntax: " -msgstr "sintaxis: " - -#: src/tool/main.cpp:325 -msgid "Print out usage and syntax info" -msgstr "Imprimir información de uso y sintaxis" - -#: src/tool/main.cpp:328 -msgid "Specify output target (Default:unknown)" -msgstr "Especificar formato de salida (Por defecto desconocido)" - -#: src/tool/main.cpp:329 -msgid "Set the image width (Use zero for file default)" -msgstr "Establecer el ancho de la imagen (Usar cero para el de defecto del fichero)" - -#: src/tool/main.cpp:330 -msgid "Set the image height (Use zero for file default)" -msgstr "Establecer el alto de la imagen (Usar cero para el de defecto del fichero)" - -#: src/tool/main.cpp:331 -msgid "Set the diagonal size of image window (Span)" -msgstr "Establecer el tamaño de la diagonal del a ventana de la imagen (Span)" - -#: src/tool/main.cpp:332 -msgid "Set antialias amount for parametric renderer." -msgstr "Establecer el valor de antialias para el muestreo paramétrico" - -#: src/tool/main.cpp:333 -#, c-format -msgid "Specify image quality for accelerated renderer (default=%d)" -msgstr "" -"Especificar la calidad de la imagen para el muestreo acelerado (por defecto=%" -"d)" - -#: src/tool/main.cpp:334 -msgid "Gamma (default=2.2)" -msgstr "Gamma (por defecto = 2.2)" - -#: src/tool/main.cpp:335 -msgid "Verbose Output (add more for more verbosity)" -msgstr "Salida detallada (añadir 'more' para más detalles)" - -#: src/tool/main.cpp:336 -msgid "Quiet mode (No progress/time-remaining display)" -msgstr "Modo silencioso (sin mostrar el progreso/tiempo restante)" - -#: src/tool/main.cpp:337 -msgid "Render the canvas with the given id instead of the root." -msgstr "Mostrar el lienzo con el ID dado en lugar del raíz." - -#: src/tool/main.cpp:338 -msgid "Specify output filename" -msgstr "Especificar nombre del fichero de salida" - -#: src/tool/main.cpp:339 -msgid "Enable multithreaded renderer using specified # of threads" -msgstr "Habilitar muestreo multihilo usando un número de hilos especificado." - -#: src/tool/main.cpp:340 -msgid "Print Benchmarks" -msgstr "Imprimir Records" - -#: src/tool/main.cpp:341 -msgid "Set the frame rate" -msgstr "Establecer el ratio de fotogramas" - -#: src/tool/main.cpp:342 -msgid "Render a single frame at " -msgstr "Mostrar un solo fotograma en " - -#: src/tool/main.cpp:343 src/tool/main.cpp:344 -msgid "Set the starting time" -msgstr "Establecer el tiempo de comienzo" - -#: src/tool/main.cpp:345 -msgid "Set the ending time" -msgstr "Establecer el tiempo de finalización" - -#: src/tool/main.cpp:346 -msgid "Set the physical resolution (dots-per-inch)" -msgstr "Establecer la resolución física (puntos por pulgada)" - -#: src/tool/main.cpp:347 -msgid "Set the physical X resolution (dots-per-inch)" -msgstr "Establecer la resolución física en X (puntos por pulgada)" - -#: src/tool/main.cpp:348 -msgid "Set the physical Y resolution (dots-per-inch)" -msgstr "Establecer la resolución física en Y (puntos por pulgada)" - -#: src/tool/main.cpp:350 -msgid "List the exported canvases in the composition" -msgstr "Lista los lienzos exportados en la composición" - -#: src/tool/main.cpp:351 -msgid "Print out specified details of the root canvas" -msgstr "Imprime detalles específicos del lienzo raíz" - -#: src/tool/main.cpp:352 -msgid "Append layers in to composition" -msgstr "Añade las capas en a la composición" - -#: src/tool/main.cpp:354 -msgid "Print out layer's description, parameter info, etc." -msgstr "Imprimir la descripión de la capa, información del parámetro, etc." - -#: src/tool/main.cpp:355 -msgid "Print out the list of available layers" -msgstr "Imprimir la lista de capas disponibles" - -#: src/tool/main.cpp:356 -msgid "Print out the list of available targets" -msgstr "Imprimir la lista de formatos disponibles" - -#: src/tool/main.cpp:357 -msgid "Print out the list of available importers" -msgstr "Imprimir la lista de importadores disponibles" - -#: src/tool/main.cpp:358 -msgid "Print out the list of available ValueNodes" -msgstr "Imprimis la lista de Valores de Nodo disponibles" - -#: src/tool/main.cpp:359 -msgid "Print out the list of loaded modules" -msgstr "Imprimir la lista de módulos cargados" - -#: src/tool/main.cpp:360 -msgid "Print out version information" -msgstr "Imprimir información de la versión" - -#: src/tool/main.cpp:361 -msgid "Print out misc build information" -msgstr "Imprimir información de construcción miscelánea" - -#: src/tool/main.cpp:362 -msgid "Print out license information" -msgstr "Imprimir información de la licencia" - -#: src/tool/main.cpp:365 -msgid "Test GUID generation" -msgstr "Probar la generación del GUID" - -#: src/tool/main.cpp:366 -msgid "Test signal implementation" -msgstr "Probar la implementación de la señal" - -#: src/tool/main.cpp:616 -#, c-format -msgid "Antialiasing set to %d, (%d samples per pixel)" -msgstr "Establecer el antialias a %d, (%d muestreos por pixel)" - -#: src/tool/main.cpp:624 -#, c-format -msgid "Span set to %d units" -msgstr "Establecer la envergadura a %d unidades" - -#: src/tool/main.cpp:634 -#, c-format -msgid "Frame rate set to %d frames per second" -msgstr "Establecer el ratio de fotogramas a %d fotogramas por segundo" - -#: src/tool/main.cpp:644 -#, c-format -msgid "Physical resolution set to %f dpi" -msgstr "Establecer resolución física a %f dpi" - -#: src/tool/main.cpp:654 -#, c-format -msgid "Physical X resolution set to %f dpi" -msgstr "Establecer resolución X física a %f dpi" - -#: src/tool/main.cpp:664 -#, c-format -msgid "Physical Y resolution set to %f dpi" -msgstr "Establecer resolución Y física a %f dpi" - -#: src/tool/main.cpp:685 -msgid "Rendering frame at " -msgstr "Muestreando fotograma en " - -#: src/tool/main.cpp:707 -#, c-format -msgid "Resolution set to %dx%d" -msgstr "Establecida resolución a %dx%d" - -#: src/tool/main.cpp:724 -#, c-format -msgid "Quality set to %d" -msgstr "Establecida calidad a %d" - -#: src/tool/main.cpp:744 -#, c-format -msgid "Threads set to %d" -msgstr "Establecido número de hilos a %d" - -#: src/tool/main.cpp:914 -msgid "Unrecognised canvas variable: " -msgstr "Variable de lienzo desconocida" - -#: src/tool/main.cpp:915 -msgid "Recognized variables are:" -msgstr "Las variables reconocidas son:" - -#: src/tool/main.cpp:951 -msgid "End Time" -msgstr "Tiempo del Fin" - -#: src/tool/main.cpp:957 -msgid "Frame Rate" -msgstr "Frecuencia de Fotogramas" - -#: src/tool/main.cpp:963 -msgid "Start Frame" -msgstr "Fotograma de Inicio" - -#: src/tool/main.cpp:969 -msgid "End Frame" -msgstr "Fotograma de Fin" - -#: src/tool/main.cpp:990 -msgid "Image Aspect Ratio" -msgstr "Relación de Aspecto de la Imagen" - -#: src/tool/main.cpp:999 -msgid "Pixel Width" -msgstr "Ancho del Pixel" - -#: src/tool/main.cpp:1005 -msgid "Pixel Height" -msgstr "Alto del Pixel" - -#: src/tool/main.cpp:1011 -msgid "Pixel Aspect Ratio" -msgstr "Relación de Aspecto del Pixel" - -#: src/tool/main.cpp:1020 -msgid "Top Left" -msgstr "Arriba Izquierda" - -#: src/tool/main.cpp:1027 -msgid "Bottom Right" -msgstr "Abajo Derecha" - -#: src/tool/main.cpp:1034 -msgid "Physical Width" -msgstr "Ancho Físico" - -#: src/tool/main.cpp:1040 -msgid "Physical Height" -msgstr "Alto Físico" - -#: src/tool/main.cpp:1046 -msgid "X Resolution" -msgstr "Resolución en X" - -#: src/tool/main.cpp:1052 -msgid "Y Resolution" -msgstr "Resolución en Y" - -#: src/tool/main.cpp:1058 -msgid "Diagonal Image Span" -msgstr "Expansión de la diagonal de la Imagen" - -#: src/tool/main.cpp:1067 -msgid "Interlaced" -msgstr "Enterlazado" - -#: src/tool/main.cpp:1073 -msgid "Antialias" -msgstr "Antialias" - -#: src/tool/main.cpp:1085 -msgid "Flags" -msgstr "Banderas" - -#: src/tool/main.cpp:1091 -msgid "Focus" -msgstr "Foco" - -#: src/tool/main.cpp:1098 -msgid "Background Color" -msgstr "Color de Fondo" - -#: src/tool/main.cpp:1108 -msgid "Metadata" -msgstr "Metadatos" - -#: src/tool/main.cpp:1136 -msgid "FATAL: Synfig Version Mismatch" -msgstr "FATAL: Version de Synfig no concordante" - -#: src/tool/main.cpp:1152 -msgid "verbosity set to " -msgstr "Establecido información detallada a " - -#: src/tool/main.cpp:1182 src/tool/main.cpp:1206 src/tool/main.cpp:1214 -#: src/tool/main.cpp:1315 src/tool/main.cpp:1341 -msgid "Throwing out job..." -msgstr "Lanzando trabajo..." - -#: src/tool/main.cpp:1205 -msgid "Unable to find canvas with ID \"" -msgstr "Imposible encontrar lienzo con ID \"" - -#: src/tool/main.cpp:1205 src/tool/main.cpp:1213 -msgid "\" in " -msgstr "\" en " - -#: src/tool/main.cpp:1213 -msgid "Invalid canvas name \"" -msgstr "Nombre de lienzo no válido\"" - -#: src/tool/main.cpp:1227 -msgid "Quality set to " -msgstr "Establecida calidad a " - -#: src/tool/main.cpp:1247 -msgid "Appended contents of " -msgstr "Añadido contenido de " - -#: src/tool/main.cpp:1251 -msgid "Attempting to determine target/outfile..." -msgstr "Intentando derterminar formato/fichero de salida..." - -#: src/tool/main.cpp:1257 -msgid "Target name undefined, attempting to figure it out" -msgstr "Nombre de formato de salida sin definir, intentando imaginarlo" - -#: src/tool/main.cpp:1286 -msgid "Defaulting to PNG target..." -msgstr "Por defecto a formato PNG..." - -#: src/tool/main.cpp:1305 -msgid "Creating the target..." -msgstr "Creando el formato..." - -#: src/tool/main.cpp:1314 -msgid "Unknown target for " -msgstr "Formato desconocido para " - -#: src/tool/main.cpp:1325 -msgid "Setting the canvas on the target..." -msgstr "Estableciendo el lienzo para el formato..." - -#: src/tool/main.cpp:1327 -msgid "Setting the quality of the target..." -msgstr "Estableciendo la calidad para el formato..." - -#: src/tool/main.cpp:1337 -msgid "Unidentified arguments for " -msgstr "Argumentos no identificados para " - -#: src/tool/main.cpp:1350 -msgid "Unidentified arguments:" -msgstr "Argumentos no identificados:" - -#: src/tool/main.cpp:1359 -msgid "Nothing to do!" -msgstr "¡Nada para hacer!" - -#: src/tool/main.cpp:1402 -msgid "Rendering..." -msgstr "Muestreando..." - -#: src/tool/main.cpp:1418 -msgid "Done." -msgstr "Hecho." - diff --git a/synfig-core/trunk/po/fr.po b/synfig-core/trunk/po/fr.po deleted file mode 100644 index 516a8a3..0000000 --- a/synfig-core/trunk/po/fr.po +++ /dev/null @@ -1,3152 +0,0 @@ -# translation of fr.po to -# French translations for Synfig Core package -# Traductions françaises du paquet Synfig Core. -# Copyright (C) 2007 Synfig Contributors -# This file is distributed under the same license as the Synfig Core package. -# Aurore D , 2007. -# -msgid "" -msgstr "" -"Project-Id-Version: fr\n" -"Report-Msgid-Bugs-To: http://synfig.org/Bugs\n" -"POT-Creation-Date: 2008-09-10 14:52+0200\n" -"PO-Revision-Date: 2008-10-02 13:48+0200\n" -"Last-Translator: \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: KBabel 1.11.4\n" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:63 -#: src/modules/lyr_freetype/lyr_freetype.cpp:507 -msgid "Text" -msgstr "Texte" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:64 -#: src/modules/lyr_std/import.cpp:59 src/modules/lyr_std/supersample.cpp:56 -#: src/modules/lyr_std/timeloop.cpp:58 src/modules/lyr_std/xorpattern.cpp:55 -#: src/modules/mod_particle/plant.cpp:69 src/synfig/layer_duplicate.cpp:57 -#: src/synfig/layer_pastecanvas.cpp:78 -msgid "Other" -msgstr "Autre" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:94 -msgid "Text Layer" -msgstr "Calque de texte" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:380 -msgid "unable to initialize" -msgstr "Initialisation impossible" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:399 -msgid "empty font set" -msgstr "Jeu de polices vide" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:508 -msgid "Text to Render" -msgstr "Texte à rendre" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:513 -#: src/modules/lyr_std/shade.cpp:375 -#: src/modules/mod_geometry/checkerboard.cpp:121 -#: src/modules/mod_geometry/circle.cpp:125 -#: src/modules/mod_geometry/rectangle.cpp:122 src/synfig/layer_shape.cpp:1192 -#: src/synfig/layer_solidcolor.cpp:99 -msgid "Color" -msgstr "Couleur" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:514 -msgid "Color of the text" -msgstr "Couleur du texte" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:518 -msgid "Font Family" -msgstr "Famille de police" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:523 -msgid "Style" -msgstr "Style" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:525 -#: src/modules/lyr_freetype/lyr_freetype.cpp:535 -msgid "Normal" -msgstr "Normal" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:526 -msgid "Oblique" -msgstr "Oblique" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:527 -msgid "Italic" -msgstr "Italique" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:531 -msgid "Weight" -msgstr "Graisse" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:533 -msgid "Ultralight" -msgstr "Ultra-léger" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:534 -msgid "light" -msgstr "Léger" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:536 -msgid "Bold" -msgstr "Gras" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:537 -msgid "Ultrabold" -msgstr "Extra-gras" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:538 -msgid "Heavy" -msgstr "Noir" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:541 -msgid "Horizontal Spacing" -msgstr "Espacement horizontal" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:542 -msgid "Describes how close glyphs are horizontally" -msgstr "Défini la proximité horizontale des glyphes" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:546 -msgid "Vertical Spacing" -msgstr "Espacement vertical" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:547 -msgid "Describes how close lines of text are vertically" -msgstr "Défini la proximité verticale des lignes de texte" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:551 -#: src/modules/lyr_std/shade.cpp:381 src/modules/lyr_std/xorpattern.cpp:125 -#: src/modules/mod_filter/blur.cpp:242 -#: src/modules/mod_filter/radialblur.cpp:111 -#: src/modules/mod_geometry/checkerboard.cpp:128 -#: src/modules/mod_noise/distort.cpp:201 src/modules/mod_noise/noise.cpp:256 -msgid "Size" -msgstr "Taille" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:552 -msgid "Size of the text" -msgstr "Taille du texte" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:559 -msgid "Orientation" -msgstr "Orientation" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:560 -msgid "Text Orientation" -msgstr "Orientation du texte" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:565 -#: src/modules/lyr_std/insideout.cpp:141 src/modules/lyr_std/rotate.cpp:112 -#: src/modules/lyr_std/shade.cpp:378 src/modules/lyr_std/translate.cpp:97 -#: src/modules/lyr_std/xorpattern.cpp:122 -#: src/modules/mod_filter/radialblur.cpp:106 -#: src/modules/mod_geometry/checkerboard.cpp:125 -#: src/modules/mod_geometry/circle.cpp:137 -#: src/modules/mod_gradient/curvegradient.cpp:490 -#: src/modules/mod_particle/plant.cpp:390 src/synfig/layer_pastecanvas.cpp:127 -#: src/synfig/layer_shape.cpp:1196 src/synfig/valuenode_composite.cpp:291 -msgid "Origin" -msgstr "Origine" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:566 -msgid "Text Position" -msgstr "Position du texte" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:570 -msgid "Font" -msgstr "Police" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:571 -msgid "Filename of the font to use" -msgstr "Nom de la police à utiliser" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:578 -msgid "Kerning" -msgstr "Crénage" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:579 -msgid "Enables/Disables font kerning (If the font supports it)" -msgstr "Active/Désactive le crénage (si la police le supporte)" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:583 -msgid "Sharpen Edges" -msgstr "Durcir les bords" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:584 -msgid "Turn this off if you are going to be animating the text" -msgstr "À désactiver si vous animez le texte" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:587 -#: src/modules/lyr_std/shade.cpp:398 src/modules/mod_geometry/circle.cpp:140 -#: src/synfig/layer_shape.cpp:1199 -msgid "Invert" -msgstr "Inverser" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:644 -msgid "No face loaded, no text will be rendered." -msgstr "Aucune police de chargée, aucun texte ne sera rendu" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:670 -msgid "Text too small, no text will be rendered." -msgstr "Texte trop petit, aucun texte ne sera rendu" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:694 -msgid "Unable to set face size." -msgstr "Impossible de définir la taille de la police" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:737 -msgid "Invalid multibyte sequence - is the locale set?\n" -msgstr "Séquence multi-octets invalide - La locale est-elle définie ?\n" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:744 -msgid "Can't parse multibyte character.\n" -msgstr "Impossible d'analyser la séquence multi-octets.\n" - -#: src/modules/lyr_std/bevel.cpp:67 -msgid "Bevel" -msgstr "Biseauter" - -#: src/modules/lyr_std/bevel.cpp:68 src/modules/lyr_std/shade.cpp:67 -msgid "Stylize" -msgstr "Styliser " - -#: src/modules/lyr_std/bevel.cpp:356 src/modules/lyr_std/shade.cpp:387 -#: src/modules/mod_filter/blur.cpp:246 -#: src/modules/mod_filter/halftone2.cpp:166 -msgid "Type" -msgstr "Type" - -#: src/modules/lyr_std/bevel.cpp:357 src/modules/lyr_std/shade.cpp:388 -#: src/modules/mod_filter/blur.cpp:247 -msgid "Type of blur to use" -msgstr "Type de flou à utiliser" - -#: src/modules/lyr_std/bevel.cpp:359 src/modules/lyr_std/shade.cpp:390 -#: src/modules/mod_filter/blur.cpp:249 src/synfig/layer_shape.cpp:1212 -msgid "Box Blur" -msgstr "Flou \"boîte\"" - -#: src/modules/lyr_std/bevel.cpp:360 src/modules/lyr_std/shade.cpp:391 -#: src/modules/mod_filter/blur.cpp:250 src/synfig/layer_shape.cpp:1213 -msgid "Fast Gaussian Blur" -msgstr "Flou gaussien rapide" - -#: src/modules/lyr_std/bevel.cpp:361 src/modules/lyr_std/shade.cpp:392 -#: src/modules/mod_filter/blur.cpp:251 src/synfig/layer_shape.cpp:1214 -msgid "Cross-Hatch Blur" -msgstr "Flou hachuré" - -#: src/modules/lyr_std/bevel.cpp:362 src/modules/lyr_std/shade.cpp:393 -#: src/modules/mod_filter/blur.cpp:252 src/synfig/layer_shape.cpp:1215 -msgid "Gaussian Blur" -msgstr "Flou gaussien" - -#: src/modules/lyr_std/bevel.cpp:363 src/modules/lyr_std/shade.cpp:394 -#: src/modules/mod_filter/blur.cpp:253 src/synfig/layer_shape.cpp:1216 -msgid "Disc Blur" -msgstr "Flou circulaire" - -#: src/modules/lyr_std/bevel.cpp:367 -msgid "Hi-Color" -msgstr "Éclaircissement" - -#: src/modules/lyr_std/bevel.cpp:370 -msgid "Lo-Color" -msgstr "Ombrage" - -#: src/modules/lyr_std/bevel.cpp:373 -msgid "Light Angle" -msgstr "Angle d'éclairage" - -#: src/modules/lyr_std/bevel.cpp:377 -msgid "Depth of Bevel" -msgstr "Profondeur du biseau" - -#: src/modules/lyr_std/bevel.cpp:381 -msgid "Softness" -msgstr "Adoucissement" - -#: src/modules/lyr_std/bevel.cpp:384 -msgid "Use Luma" -msgstr "Utiliser la luminance" - -#: src/modules/lyr_std/bevel.cpp:387 -msgid "Solid" -msgstr "Solide" - -#: src/modules/lyr_std/booleancurve.cpp:104 -msgid "Region Set" -msgstr "Jeu de région" - -#: src/modules/lyr_std/booleancurve.cpp:105 -msgid "Set of regions to combine" -msgstr "Jeu de régions à combiner" - -#: src/modules/lyr_std/clamp.cpp:54 src/tool/main.cpp:1079 -msgid "Clamp" -msgstr "Limiter" - -#: src/modules/lyr_std/clamp.cpp:55 src/modules/mod_filter/colorcorrect.cpp:55 -#: src/modules/mod_filter/halftone2.cpp:58 -#: src/modules/mod_filter/halftone3.cpp:58 -#: src/modules/mod_filter/lumakey.cpp:58 -msgid "Filters" -msgstr "Filtres" - -#: src/modules/lyr_std/clamp.cpp:155 -msgid "Invert Negative" -msgstr "Inverser le négatif" - -#: src/modules/lyr_std/clamp.cpp:159 -msgid "Clamp Ceiling" -msgstr "Limiter à la valeur plafond" - -#: src/modules/lyr_std/clamp.cpp:163 -msgid "Ceiling" -msgstr "Plafond" - -#: src/modules/lyr_std/clamp.cpp:167 -msgid "Floor" -msgstr "Plancher" - -#: src/modules/lyr_std/import.cpp:58 -msgid "Import Image" -msgstr "Importer une image" - -#: src/modules/lyr_std/import.cpp:138 -#, c-format -msgid "Filename seems to already be set to \"%s\" (%s)" -msgstr "Il semble que le nom de fichier soit déjà \"%s\" (%s)" - -#: src/modules/lyr_std/import.cpp:209 -msgid "Filename" -msgstr "Nom de fichier" - -#: src/modules/lyr_std/import.cpp:210 -msgid "File to import" -msgstr "Fichier à importer" - -#: src/modules/lyr_std/import.cpp:214 src/synfig/layer_pastecanvas.cpp:140 -msgid "Time Offset" -msgstr "Décalage temporel" - -#: src/modules/lyr_std/insideout.cpp:55 -msgid "Inside Out" -msgstr "À l'envers" - -#: src/modules/lyr_std/insideout.cpp:56 -#: src/modules/lyr_std/sphere_distort.cpp:73 -#: src/modules/lyr_std/stretch.cpp:59 src/modules/lyr_std/twirl.cpp:56 -#: src/modules/lyr_std/warp.cpp:56 src/modules/mod_noise/distort.cpp:57 -msgid "Distortions" -msgstr "Distortions" - -#: src/modules/lyr_std/insideout.cpp:142 -msgid "Defines the where the center will be" -msgstr "Défini le centre" - -#: src/modules/lyr_std/julia.cpp:56 -msgid "Julia Set" -msgstr "Ensemble de Julia" - -#: src/modules/lyr_std/julia.cpp:57 src/modules/lyr_std/mandelbrot.cpp:57 -msgid "Fractals" -msgstr "Fractales" - -#: src/modules/lyr_std/julia.cpp:300 -msgid "Inside Color" -msgstr "Couleur interne" - -#: src/modules/lyr_std/julia.cpp:301 -msgid "Color of the Set" -msgstr "Couleur de l'ensemble" - -#: src/modules/lyr_std/julia.cpp:304 -msgid "Outside Color" -msgstr "Couleur externe" - -#: src/modules/lyr_std/julia.cpp:305 -msgid "Color outside the Set" -msgstr "Couleur en dehors de l'ensemble" - -#: src/modules/lyr_std/julia.cpp:308 -msgid "Color Shift" -msgstr "Décalage de couleur" - -#: src/modules/lyr_std/julia.cpp:311 src/modules/lyr_std/mandelbrot.cpp:213 -msgid "Iterations" -msgstr "Itérations" - -#: src/modules/lyr_std/julia.cpp:314 -msgid "Seed Point" -msgstr "Point graine" - -#: src/modules/lyr_std/julia.cpp:317 src/modules/lyr_std/mandelbrot.cpp:216 -msgid "Bailout ValueBase" -msgstr "Valeur d'arrêt" - -#: src/modules/lyr_std/julia.cpp:321 src/modules/lyr_std/mandelbrot.cpp:226 -#: src/modules/lyr_std/twirl.cpp:125 -msgid "Distort Inside" -msgstr "Distordre l'intérieur" - -#: src/modules/lyr_std/julia.cpp:324 src/modules/lyr_std/mandelbrot.cpp:230 -msgid "Shade Inside" -msgstr "Ombrer l'interieur" - -#: src/modules/lyr_std/julia.cpp:327 src/modules/lyr_std/mandelbrot.cpp:234 -msgid "Solid Inside" -msgstr "Intérieur solide" - -#: src/modules/lyr_std/julia.cpp:330 src/modules/lyr_std/mandelbrot.cpp:238 -msgid "Invert Inside" -msgstr "Inverser l'intérieur" - -#: src/modules/lyr_std/julia.cpp:333 -msgid "Color Inside" -msgstr "Colorer l'intérieur" - -#: src/modules/lyr_std/julia.cpp:336 src/modules/lyr_std/mandelbrot.cpp:255 -#: src/modules/lyr_std/twirl.cpp:129 -msgid "Distort Outside" -msgstr "Distordre l'extérieur" - -#: src/modules/lyr_std/julia.cpp:339 src/modules/lyr_std/mandelbrot.cpp:259 -msgid "Shade Outside" -msgstr "Ombrer l'extérieur" - -#: src/modules/lyr_std/julia.cpp:342 src/modules/lyr_std/mandelbrot.cpp:263 -msgid "Solid Outside" -msgstr "Extérieur solide" - -#: src/modules/lyr_std/julia.cpp:345 src/modules/lyr_std/mandelbrot.cpp:267 -msgid "Invert Outside" -msgstr "Inverser l'extérieur" - -#: src/modules/lyr_std/julia.cpp:348 -msgid "Color Outside" -msgstr "Colorer l'extérieur" - -#: src/modules/lyr_std/julia.cpp:352 -msgid "Color Cycle" -msgstr "Cycle de couleurs" - -#: src/modules/lyr_std/julia.cpp:355 src/modules/lyr_std/mandelbrot.cpp:275 -msgid "Smooth Outside" -msgstr "Lisser l'extérieur" - -#: src/modules/lyr_std/julia.cpp:356 src/modules/lyr_std/mandelbrot.cpp:276 -msgid "Smooth the coloration outside the set" -msgstr "Lisser la couleur à l'intérieur de l'ensemble" - -#: src/modules/lyr_std/julia.cpp:359 src/modules/lyr_std/mandelbrot.cpp:220 -msgid "Break Set" -msgstr "Briser l'ensemble" - -#: src/modules/lyr_std/julia.cpp:360 src/modules/lyr_std/mandelbrot.cpp:221 -msgid "Modify equation to achieve interesting results" -msgstr "Modifier l'équation pour obtenir des résultats intéressants" - -#: src/modules/lyr_std/mandelbrot.cpp:56 -msgid "Mandelbrot Set" -msgstr "Ensemble de Mandelbrot" - -#: src/modules/lyr_std/mandelbrot.cpp:227 -#: src/modules/lyr_std/mandelbrot.cpp:231 -#: src/modules/lyr_std/mandelbrot.cpp:235 -#: src/modules/lyr_std/mandelbrot.cpp:239 -#: src/modules/lyr_std/mandelbrot.cpp:243 -#: src/modules/lyr_std/mandelbrot.cpp:247 -#: src/modules/lyr_std/mandelbrot.cpp:251 -msgid "Inside" -msgstr "Intérieur" - -#: src/modules/lyr_std/mandelbrot.cpp:242 -msgid "Gradient Inside" -msgstr "Dégradé intérieur" - -#: src/modules/lyr_std/mandelbrot.cpp:246 -msgid "Offset Inside" -msgstr "Décalage intérieur" - -#: src/modules/lyr_std/mandelbrot.cpp:250 -msgid "Loop Inside" -msgstr "Boucle intérieur" - -#: src/modules/lyr_std/mandelbrot.cpp:256 -#: src/modules/lyr_std/mandelbrot.cpp:260 -#: src/modules/lyr_std/mandelbrot.cpp:264 -#: src/modules/lyr_std/mandelbrot.cpp:268 -#: src/modules/lyr_std/mandelbrot.cpp:272 -#: src/modules/lyr_std/mandelbrot.cpp:277 -#: src/modules/lyr_std/mandelbrot.cpp:281 -#: src/modules/lyr_std/mandelbrot.cpp:285 -msgid "Outside" -msgstr "Extérieur" - -#: src/modules/lyr_std/mandelbrot.cpp:271 -msgid "Gradient outside" -msgstr "Dégradé extérieur" - -#: src/modules/lyr_std/mandelbrot.cpp:280 -msgid "Offset Outside" -msgstr "Décalage extérieur" - -#: src/modules/lyr_std/mandelbrot.cpp:284 -msgid "Scale Outside" -msgstr "Échelle extérieure" - -#: src/modules/lyr_std/rotate.cpp:55 -msgid "Rotate" -msgstr "Rotation" - -#: src/modules/lyr_std/rotate.cpp:56 src/modules/lyr_std/translate.cpp:55 -#: src/modules/lyr_std/zoom.cpp:52 -msgid "Transform" -msgstr "Transformer" - -#: src/modules/lyr_std/rotate.cpp:113 src/modules/lyr_std/translate.cpp:98 -#: src/modules/mod_filter/radialblur.cpp:107 -#: src/synfig/layer_pastecanvas.cpp:128 -msgid "Point where you want the origin to be" -msgstr "Point où vous souhaitez que l'origine soit" - -#: src/modules/lyr_std/rotate.cpp:117 -#: src/modules/lyr_std/sphere_distort.cpp:153 -#: src/modules/lyr_std/stretch.cpp:103 src/modules/lyr_std/zoom.cpp:96 -#: src/synfig/layer_composite.cpp:142 -#: src/synfig/valuenode_blinecalctangent.cpp:242 -#: src/synfig/valuenode_blinecalcvertex.cpp:201 -#: src/synfig/valuenode_blinecalcwidth.cpp:207 -#: src/synfig/valuenode_segcalctangent.cpp:161 -#: src/synfig/valuenode_segcalcvertex.cpp:159 -msgid "Amount" -msgstr "Quantité" - -#: src/modules/lyr_std/rotate.cpp:118 -msgid "Amount of rotation" -msgstr "Angle de rotation" - -#: src/modules/lyr_std/shade.cpp:66 -msgid "Shade" -msgstr "Ombrage" - -#: src/modules/lyr_std/shade.cpp:382 -msgid "Size of Shade" -msgstr "Taille de l'ombre" - -#: src/modules/lyr_std/sphere_distort.cpp:72 -#: src/modules/lyr_std/sphere_distort.cpp:165 -msgid "Spherize" -msgstr "Rendre sphérique" - -#: src/modules/lyr_std/sphere_distort.cpp:143 -msgid "Position" -msgstr "Position" - -#: src/modules/lyr_std/sphere_distort.cpp:147 -#: src/modules/lyr_std/twirl.cpp:113 src/modules/mod_geometry/circle.cpp:128 -#: src/modules/mod_gradient/radialgradient.cpp:118 -#: src/modules/mod_gradient/spiralgradient.cpp:117 -#: src/modules/mod_noise/valuenode_random.cpp:244 -#: src/synfig/valuenode_radialcomposite.cpp:197 -msgid "Radius" -msgstr "Rayon" - -#: src/modules/lyr_std/sphere_distort.cpp:158 src/modules/lyr_std/warp.cpp:400 -msgid "Clip" -msgstr "Couper" - -#: src/modules/lyr_std/sphere_distort.cpp:162 -msgid "Distort Type" -msgstr "Type de distorsion" - -#: src/modules/lyr_std/sphere_distort.cpp:163 -msgid "The direction of the distortion" -msgstr "Sens de la distorsion" - -#: src/modules/lyr_std/sphere_distort.cpp:166 -msgid "Vertical Bar" -msgstr "Barre verticale" - -#: src/modules/lyr_std/sphere_distort.cpp:167 -msgid "Horizontal Bar" -msgstr "Barre horizontale" - -#: src/modules/lyr_std/stretch.cpp:58 -msgid "Stretch" -msgstr "Étirer" - -#: src/modules/lyr_std/stretch.cpp:108 src/modules/lyr_std/twirl.cpp:109 -#: src/modules/lyr_std/zoom.cpp:101 -#: src/modules/mod_gradient/conicalgradient.cpp:110 -#: src/modules/mod_gradient/radialgradient.cpp:114 -#: src/modules/mod_gradient/spiralgradient.cpp:113 -msgid "Center" -msgstr "Centre" - -#: src/modules/lyr_std/supersample.cpp:55 -msgid "Super Sample" -msgstr "Sur-échantillonner " - -#: src/modules/lyr_std/supersample.cpp:119 -msgid "Unable to create SurfaceTarget" -msgstr "Impossible de créer une Surface Cible" - -#: src/modules/lyr_std/supersample.cpp:215 -#: src/modules/mod_gradient/curvegradient.cpp:494 -#: src/synfig/valuenode_composite.cpp:289 -#: src/synfig/valuenode_realstring.cpp:184 -#: src/synfig/valuenode_repeat_gradient.cpp:185 -#: src/synfig/valuenode_stripes.cpp:176 src/tool/main.cpp:978 -msgid "Width" -msgstr "Largeur" - -#: src/modules/lyr_std/supersample.cpp:216 -msgid "Width of sample area (In pixels)" -msgstr "Largeur de l'échantillon (en pixels)" - -#: src/modules/lyr_std/supersample.cpp:219 src/tool/main.cpp:984 -msgid "Height" -msgstr "Hauteur" - -#: src/modules/lyr_std/supersample.cpp:220 -msgid "Height of sample area (In pixels)" -msgstr "Hauteur de l'échantillon (en pixels)" - -#: src/modules/lyr_std/supersample.cpp:223 -msgid "Use Parametric" -msgstr "Paramétrique" - -#: src/modules/lyr_std/supersample.cpp:224 -msgid "Use the Parametric Renderer" -msgstr "Utiliser le moteur de rendu paramétrique" - -#: src/modules/lyr_std/supersample.cpp:227 -msgid "Be Alpha Safe" -msgstr "" - -#: src/modules/lyr_std/timeloop.cpp:57 src/synfig/valuenode.cpp:161 -#: src/synfig/valuenode_timeloop.cpp:188 -msgid "Time Loop" -msgstr "Boucle temporelle" - -#: src/modules/lyr_std/timeloop.cpp:120 src/synfig/valuenode_timeloop.cpp:124 -msgid "Link Time" -msgstr "Début du lien" - -#: src/modules/lyr_std/timeloop.cpp:124 src/synfig/valuenode_timeloop.cpp:125 -msgid "Local Time" -msgstr "Temps local" - -#: src/modules/lyr_std/timeloop.cpp:128 src/synfig/valuenode_step.cpp:214 -#: src/synfig/valuenode_timeloop.cpp:126 -msgid "Duration" -msgstr "Durée" - -#: src/modules/lyr_std/timeloop.cpp:132 -msgid "Only For Positive Duration" -msgstr "Seulement pour les durées positives" - -#: src/modules/lyr_std/timeloop.cpp:136 -msgid "Symmetrical" -msgstr "Symétrique" - -#: src/modules/lyr_std/translate.cpp:54 -msgid "Translate" -msgstr "Décaler" - -#: src/modules/lyr_std/twirl.cpp:55 -msgid "Twirl" -msgstr "Tourbillon" - -#: src/modules/lyr_std/twirl.cpp:114 -#: src/modules/mod_gradient/radialgradient.cpp:119 -#: src/modules/mod_gradient/spiralgradient.cpp:118 -msgid "This is the radius of the circle" -msgstr "Le rayon du cercle" - -#: src/modules/lyr_std/twirl.cpp:120 -msgid "Rotations" -msgstr "Rotations" - -#: src/modules/lyr_std/warp.cpp:55 -msgid "Warp" -msgstr "Déformation" - -#: src/modules/lyr_std/warp.cpp:371 -msgid "Source TL" -msgstr "Haut-Gauche source" - -#: src/modules/lyr_std/warp.cpp:376 -msgid "Source BR" -msgstr "Bas-Droite source" - -#: src/modules/lyr_std/warp.cpp:380 -msgid "Dest TL" -msgstr "Haut-Gauche dest." - -#: src/modules/lyr_std/warp.cpp:385 -msgid "Dest TR" -msgstr "Haut-Droite dest." - -#: src/modules/lyr_std/warp.cpp:390 -msgid "Dest BR" -msgstr "Bas-Droite dest." - -#: src/modules/lyr_std/warp.cpp:395 -msgid "Dest BL" -msgstr "Bas-Gauche dest." - -#: src/modules/lyr_std/warp.cpp:404 -msgid "Horizon" -msgstr "Horizon" - -#: src/modules/lyr_std/xorpattern.cpp:54 -msgid "XOR Pattern" -msgstr "Motif XOR" - -#: src/modules/lyr_std/zoom.cpp:51 src/synfig/layer_pastecanvas.cpp:135 -msgid "Zoom" -msgstr "Zoom" - -#: src/modules/lyr_std/zoom.cpp:97 -msgid "Amount to zoom in" -msgstr "Quantité de zoom" - -#: src/modules/lyr_std/zoom.cpp:102 -msgid "Point to zoom in to" -msgstr "Point de zoom" - -#: src/modules/mod_bmp/mptr_bmp.cpp:133 src/modules/mod_bmp/mptr_bmp.cpp:134 -#: src/modules/mod_ppm/mptr_ppm.cpp:78 -#, c-format -msgid "Unable to open %s" -msgstr "Impossible d'ouvrir %s" - -#: src/modules/mod_bmp/mptr_bmp.cpp:145 src/modules/mod_bmp/mptr_bmp.cpp:146 -#, c-format -msgid "%s is not in BMP format" -msgstr "%s n'est pas au format BMP" - -#: src/modules/mod_bmp/mptr_bmp.cpp:152 -#, c-format -msgid "Failure while reading BITMAPFILEHEADER from %s" -msgstr "Échec lors de la lecture de BITMAPFILEHEADER depuis %s" - -#: src/modules/mod_bmp/mptr_bmp.cpp:160 -#, c-format -msgid "Failure while reading BITMAPINFOHEADER from %s" -msgstr "Échec lors de la lecture de BITMAPINFOHEADER depuis %s" - -#: src/modules/mod_bmp/mptr_bmp.cpp:170 -#, c-format -msgid "Bad BITMAPFILEHEADER in %s. (bfOffsetBits=%d, should be %d)" -msgstr "BITMAPFILEHEADER invalide dans %s (bfOffsetBits=%d, au lieu de %d)" - -#: src/modules/mod_bmp/mptr_bmp.cpp:178 -#, c-format -msgid "Bad BITMAPINFOHEADER in %s. (biSize=%d, should be 40)" -msgstr "BITMAPINFOHEADER invalide dans %s (biSize=%d, au lieu de 40)" - -#: src/modules/mod_bmp/mptr_bmp.cpp:196 src/modules/mod_bmp/mptr_bmp.cpp:197 -msgid "Reading compressed bitmaps is not supported" -msgstr "La lecture des bitmpas compressés n'est pas disponible" - -#: src/modules/mod_bmp/mptr_bmp.cpp:203 src/modules/mod_bmp/mptr_bmp.cpp:204 -#, c-format -msgid "Unsupported bit depth (bit_count=%d, should be 24 or 32)" -msgstr "Profondeur de bit non supportée (bit_count=%d, au lieu de 24 ou 32)" - -#: src/modules/mod_bmp/trgt_bmp.cpp:185 -msgid " (animated)" -msgstr "(animé)" - -#: src/modules/mod_bmp/trgt_bmp.cpp:195 src/modules/mod_bmp/trgt_bmp.cpp:196 -msgid "Unable to open file" -msgstr "Impossible d'ouvrir le fichier" - -#: src/modules/mod_bmp/trgt_bmp.cpp:226 src/modules/mod_bmp/trgt_bmp.cpp:227 -msgid "Unable to write file header to file" -msgstr "Impossible d'écrire l'entête du fichier dans ce fichier" - -#: src/modules/mod_bmp/trgt_bmp.cpp:233 src/modules/mod_bmp/trgt_bmp.cpp:234 -msgid "Unable to write info header" -msgstr "Impossible d'écrire l'entête d'information" - -#: src/modules/mod_dv/trgt_dv.cpp:166 src/modules/mod_dv/trgt_dv.cpp:175 -#: src/modules/mod_dv/trgt_dv.cpp:182 src/modules/mod_dv/trgt_dv.cpp:192 -#: src/modules/mod_dv/trgt_dv.cpp:200 src/modules/mod_dv/trgt_dv.cpp:205 -#: src/modules/mod_dv/trgt_dv.cpp:209 src/modules/mod_dv/trgt_dv.cpp:218 -#: src/modules/mod_dv/trgt_dv.cpp:227 -msgid "Unable to open pipe to encodedv" -msgstr "Impossible d'établir le transfert vers encodedv" - -#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:172 -#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:179 -#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:189 -#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:199 -#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:217 -msgid "Unable to open pipe to ffmpeg" -msgstr "Impossible d'établir le transfert vers ffmpeg" - -#: src/modules/mod_filter/blur.cpp:67 -msgid "Blur" -msgstr "Flou" - -#: src/modules/mod_filter/blur.cpp:68 src/modules/mod_filter/radialblur.cpp:56 -#: src/synfig/layer_motionblur.cpp:57 -msgid "Blurs" -msgstr "Flous" - -#: src/modules/mod_filter/blur.cpp:243 -msgid "Size of Blur" -msgstr "Taille du flou" - -#: src/modules/mod_filter/colorcorrect.cpp:54 -msgid "Color Correct" -msgstr "Correction de couleur" - -#: src/modules/mod_filter/colorcorrect.cpp:203 -msgid "Hue Adjust" -msgstr "Ajustement de teinte" - -#: src/modules/mod_filter/colorcorrect.cpp:207 -msgid "Brightness" -msgstr "Luminosité" - -#: src/modules/mod_filter/colorcorrect.cpp:211 -msgid "Contrast" -msgstr "Constraste" - -#: src/modules/mod_filter/colorcorrect.cpp:215 -msgid "Exposure Adjust" -msgstr "Ajustement de l'exposition" - -#: src/modules/mod_filter/colorcorrect.cpp:219 src/synfig/layer_bitmap.cpp:138 -msgid "Gamma Adjustment" -msgstr "Ajustement du gamma" - -#: src/modules/mod_filter/halftone2.cpp:57 -msgid "Halftone 2" -msgstr "Demi-teinte 2" - -#: src/modules/mod_filter/halftone2.cpp:147 -msgid "Mask Origin" -msgstr "Origine du masque" - -#: src/modules/mod_filter/halftone2.cpp:151 -msgid "Mask Angle" -msgstr "Angle du masque" - -#: src/modules/mod_filter/halftone2.cpp:155 -#: src/modules/mod_filter/halftone3.cpp:305 -msgid "Mask Size" -msgstr "Taille du masque" - -#: src/modules/mod_filter/halftone2.cpp:160 -msgid "Light Color" -msgstr "Couleur claire" - -#: src/modules/mod_filter/halftone2.cpp:163 -msgid "Dark Color" -msgstr "Couleur sombre" - -#: src/modules/mod_filter/halftone2.cpp:168 -#: src/modules/mod_filter/halftone3.cpp:310 -#: src/modules/mod_gradient/conicalgradient.cpp:119 -msgid "Symmetric" -msgstr "Symétrique" - -#: src/modules/mod_filter/halftone2.cpp:169 -#: src/modules/mod_filter/halftone3.cpp:311 -msgid "Light On Dark" -msgstr "Clair sur sombre" - -#: src/modules/mod_filter/halftone2.cpp:171 -#: src/modules/mod_filter/halftone3.cpp:313 -msgid "Diamond" -msgstr "Diamant" - -#: src/modules/mod_filter/halftone2.cpp:172 -#: src/modules/mod_filter/halftone3.cpp:314 -msgid "Stripe" -msgstr "Bande" - -#: src/modules/mod_filter/halftone3.cpp:57 -msgid "Halftone 3" -msgstr "Demi-teinte 3" - -#: src/modules/mod_filter/halftone3.cpp:308 -msgid " Type" -msgstr "Type" - -#: src/modules/mod_filter/halftone3.cpp:317 -msgid "Subtractive Flag" -msgstr "Soustraire" - -#: src/modules/mod_filter/halftone3.cpp:325 -msgid " Color" -msgstr "Couleur" - -#: src/modules/mod_filter/halftone3.cpp:329 -msgid " Mask Origin" -msgstr "Origine du masque" - -#: src/modules/mod_filter/halftone3.cpp:333 -msgid " Mask Angle" -msgstr "Angle du masque" - -#: src/modules/mod_filter/lumakey.cpp:57 -msgid "Luma Key" -msgstr "Clé de luminance" - -#: src/modules/mod_filter/radialblur.cpp:55 -msgid "Radial Blur" -msgstr "Flou radial" - -#: src/modules/mod_filter/radialblur.cpp:112 -msgid "Size of blur" -msgstr "Taille du flou" - -#: src/modules/mod_filter/radialblur.cpp:117 -msgid "Fade Out" -msgstr "Fondu en fermeture" - -#: src/modules/mod_geometry/checkerboard.cpp:57 -msgid "Checkerboard" -msgstr "Damier" - -#: src/modules/mod_geometry/checkerboard.cpp:58 -#: src/modules/mod_geometry/circle.cpp:56 -#: src/modules/mod_geometry/outline.cpp:71 -#: src/modules/mod_geometry/rectangle.cpp:59 -#: src/modules/mod_geometry/region.cpp:64 src/modules/mod_geometry/star.cpp:63 -#: src/synfig/layer_polygon.cpp:60 src/synfig/layer_solidcolor.cpp:56 -msgid "Geometry" -msgstr "Géométrie" - -#: src/modules/mod_geometry/checkerboard.cpp:122 -msgid "Color of checkers" -msgstr "Couleur des carreaux" - -#: src/modules/mod_geometry/checkerboard.cpp:129 -msgid "Size of checkers" -msgstr "Taille des carreaux" - -#: src/modules/mod_geometry/circle.cpp:55 -msgid "Circle" -msgstr "Cercle" - -#: src/modules/mod_geometry/circle.cpp:133 src/synfig/layer_shape.cpp:1205 -msgid "Feather" -msgstr "Adoucissement" - -#: src/modules/mod_geometry/circle.cpp:141 -msgid "Invert the circle" -msgstr "Inverser le cercle" - -#: src/modules/mod_geometry/circle.cpp:145 -msgid "Falloff" -msgstr "Atténuation " - -#: src/modules/mod_geometry/circle.cpp:146 -msgid "Determines the falloff function for the feather" -msgstr "Détermine la fonction d'atténuation pour l'adoucissement" - -#: src/modules/mod_geometry/circle.cpp:148 -#: src/modules/mod_noise/distort.cpp:211 src/modules/mod_noise/noise.cpp:263 -#: src/synfig/layer_bitmap.cpp:132 src/synfig/valuenode.cpp:134 -#: src/synfig/valuenode_linear.cpp:142 -msgid "Linear" -msgstr "Linéaire" - -#: src/modules/mod_geometry/circle.cpp:149 -msgid "Squared" -msgstr "Carré" - -#: src/modules/mod_geometry/circle.cpp:150 -msgid "Square Root" -msgstr "Racine carrée" - -#: src/modules/mod_geometry/circle.cpp:151 -msgid "Sigmond" -msgstr "Sigmoïde" - -#: src/modules/mod_geometry/circle.cpp:152 -#: src/modules/mod_noise/distort.cpp:212 src/modules/mod_noise/noise.cpp:264 -#: src/synfig/layer_bitmap.cpp:133 -msgid "Cosine" -msgstr "Cosinus" - -#: src/modules/mod_geometry/outline.cpp:70 -msgid "Outline" -msgstr "Contour" - -#: src/modules/mod_geometry/outline.cpp:178 -msgid "No vertices in outline " -msgstr "Pas de vertices dans le contour" - -#: src/modules/mod_geometry/outline.cpp:807 -#: src/modules/mod_geometry/region.cpp:232 -#: src/modules/mod_gradient/curvegradient.cpp:497 -#: src/modules/mod_particle/plant.cpp:383 -msgid "Vertices" -msgstr "Vertices" - -#: src/modules/mod_geometry/outline.cpp:810 -#: src/modules/mod_gradient/curvegradient.cpp:500 -#: src/modules/mod_particle/plant.cpp:384 -msgid "A list of BLine Points" -msgstr "Une liste de points BLine" - -#: src/modules/mod_geometry/outline.cpp:824 -msgid "Outline Width" -msgstr "Épaisseur du contour" - -#: src/modules/mod_geometry/outline.cpp:829 -msgid "Expand" -msgstr "Étendre" - -#: src/modules/mod_geometry/outline.cpp:833 -msgid "Sharp Cusps" -msgstr "Angles durs" - -#: src/modules/mod_geometry/outline.cpp:834 -msgid "Determines cusp type" -msgstr "Détermine l'aspect des angles" - -#: src/modules/mod_geometry/outline.cpp:838 -msgid "Rounded Begin" -msgstr "Début arrondi" - -#: src/modules/mod_geometry/outline.cpp:839 -#: src/modules/mod_geometry/outline.cpp:844 -msgid "Round off the tip" -msgstr "Arrondir la pointe" - -#: src/modules/mod_geometry/outline.cpp:843 -msgid "Rounded End" -msgstr "Fin arrondie" - -#: src/modules/mod_geometry/outline.cpp:847 -msgid "Loopyness" -msgstr "Boucle" - -#: src/modules/mod_geometry/outline.cpp:850 -msgid "Homogeneous" -msgstr "Homogène" - -#: src/modules/mod_geometry/rectangle.cpp:58 -msgid "Rectangle" -msgstr "Rectangle" - -#: src/modules/mod_geometry/rectangle.cpp:126 -#: src/modules/mod_gradient/lineargradient.cpp:184 -msgid "Point 1" -msgstr "Point 1" - -#: src/modules/mod_geometry/rectangle.cpp:131 -#: src/modules/mod_gradient/lineargradient.cpp:188 -msgid "Point 2" -msgstr "Point 2" - -#: src/modules/mod_geometry/rectangle.cpp:136 -msgid "Expand amount" -msgstr "Quantité d'extention" - -#: src/modules/mod_geometry/rectangle.cpp:140 -msgid "Invert the rectangle" -msgstr "Inverser le rectangle" - -#: src/modules/mod_geometry/region.cpp:63 -msgid "Region" -msgstr "Région" - -#: src/modules/mod_geometry/star.cpp:62 -msgid "Star" -msgstr "Étoile" - -#: src/modules/mod_geometry/star.cpp:174 -msgid "Outer Radius" -msgstr "Rayon externe" - -#: src/modules/mod_geometry/star.cpp:175 -msgid "The radius of the outer points in the star" -msgstr "Le rayon des pointes de l'étoile" - -#: src/modules/mod_geometry/star.cpp:181 -msgid "Inner Radius" -msgstr "Rayon interne" - -#: src/modules/mod_geometry/star.cpp:182 -msgid "The radius of the inner points in the star" -msgstr "Le rayon du corps de l'étoile" - -#: src/modules/mod_geometry/star.cpp:188 -#: src/modules/mod_gradient/conicalgradient.cpp:114 -#: src/modules/mod_gradient/spiralgradient.cpp:124 -#: src/synfig/valuenode_cos.cpp:165 src/synfig/valuenode_sine.cpp:165 -msgid "Angle" -msgstr "Angle" - -#: src/modules/mod_geometry/star.cpp:189 -msgid "The orientation of the star" -msgstr "L'orientation de l'étoile" - -#: src/modules/mod_geometry/star.cpp:194 src/synfig/distance.cpp:243 -msgid "Points" -msgstr "Points" - -#: src/modules/mod_geometry/star.cpp:195 -msgid "The number of points in the star" -msgstr "Nombres de pointes de l'étoile" - -#: src/modules/mod_geometry/star.cpp:199 -msgid "Regular Polygon" -msgstr "Polygone standard" - -#: src/modules/mod_geometry/star.cpp:200 -msgid "Whether to draw a star or a regular polygon" -msgstr "Dessine un polygone ou une étoile" - -#: src/modules/mod_gif/trgt_gif.cpp:107 -#, c-format -msgid "Unable to open \"%s\" for write access!" -msgstr "Impossible d'ouvrir \"%s\" en écriture !" - -#: src/modules/mod_gif/trgt_gif.cpp:195 -msgid "Description not set!" -msgstr "Description non définie !" - -#: src/modules/mod_gradient/conicalgradient.cpp:56 -msgid "Conical Gradient" -msgstr "Dégradé conique" - -#: src/modules/mod_gradient/conicalgradient.cpp:57 -#: src/modules/mod_gradient/curvegradient.cpp:58 -#: src/modules/mod_gradient/lineargradient.cpp:54 -#: src/modules/mod_gradient/radialgradient.cpp:57 -#: src/modules/mod_gradient/spiralgradient.cpp:56 -#: src/modules/mod_noise/noise.cpp:57 -msgid "Gradients" -msgstr "Dégradés" - -#: src/modules/mod_gradient/conicalgradient.cpp:106 -#: src/modules/mod_gradient/curvegradient.cpp:503 -#: src/modules/mod_gradient/lineargradient.cpp:191 -#: src/modules/mod_gradient/radialgradient.cpp:110 -#: src/modules/mod_gradient/spiralgradient.cpp:109 -#: src/modules/mod_noise/noise.cpp:250 src/modules/mod_particle/plant.cpp:394 -#: src/synfig/valuenode_gradientrotate.cpp:146 -#: src/synfig/valuenode_repeat_gradient.cpp:183 -msgid "Gradient" -msgstr "Dégradé" - -#: src/modules/mod_gradient/curvegradient.cpp:57 -msgid "Curve Gradient" -msgstr "Dégradé selon une courbe" - -#: src/modules/mod_gradient/curvegradient.cpp:505 -#: src/modules/mod_gradient/lineargradient.cpp:194 -#: src/modules/mod_gradient/radialgradient.cpp:125 -#: src/synfig/valuenode_blinecalctangent.cpp:241 -#: src/synfig/valuenode_blinecalcvertex.cpp:200 -#: src/synfig/valuenode_blinecalcwidth.cpp:206 -msgid "Loop" -msgstr "Boucle" - -#: src/modules/mod_gradient/curvegradient.cpp:507 -#: src/modules/mod_gradient/lineargradient.cpp:197 -#: src/modules/mod_gradient/radialgradient.cpp:129 -msgid "ZigZag" -msgstr "Zigzag" - -#: src/modules/mod_gradient/curvegradient.cpp:509 -msgid "Perpendicular" -msgstr "Perpendiculaire" - -#: src/modules/mod_gradient/curvegradient.cpp:511 -msgid "Fast" -msgstr "Rapide" - -#: src/modules/mod_gradient/lineargradient.cpp:53 -msgid "Linear Gradient" -msgstr "Dégradé linéaire" - -#: src/modules/mod_gradient/radialgradient.cpp:56 -msgid "Radial Gradient" -msgstr "Dégradé radial" - -#: src/modules/mod_gradient/spiralgradient.cpp:55 -msgid "Spiral Gradient" -msgstr "Dégradé spirale" - -#: src/modules/mod_gradient/spiralgradient.cpp:129 -msgid "Clockwise" -msgstr "Sens horaire" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:103 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:104 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:216 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:217 -msgid "No file to load" -msgstr "Pas de fichier à charger" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:157 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:158 -#: src/synfig/listimporter.cpp:182 src/synfig/listimporter.cpp:183 -#: src/tool/main.cpp:1181 -msgid "Unable to open " -msgstr "Impossible d'ouvrir " - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:164 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:165 -#: src/synfig/listimporter.cpp:189 src/synfig/listimporter.cpp:190 -msgid "Unable to get frame from " -msgstr "Impossible de récupérer l'image clé de " - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:171 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:172 -msgid "Bad surface from " -msgstr "Mauvaise surface depuis " - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:227 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:228 -msgid "Unable to open pipe to imagemagick" -msgstr "Impossible d'établir le transfert vers imagemagick" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:239 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:240 -msgid "Reached end of stream without finding PPM header" -msgstr "Fin de flux atteinte sans trouver l'entête PPM" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:248 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:249 -msgid "stream not in PPM format" -msgstr "Le flux n'est pas au format PPM" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:260 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:261 -msgid "Premature end of file (after header)" -msgstr "Fin de fichier prématurée (après l'entête)" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:273 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:274 -msgid "Premature end of file" -msgstr "Fin de fichier prématurée" - -#: src/modules/mod_imagemagick/trgt_imagemagick.cpp:157 -msgid "Unable to open pipe to imagemagick's convert utility" -msgstr "" -"Impossible d'établir le tranfert vers l'utilitaire de conversion (convert) " -"d'imagemagick" - -#: src/modules/mod_noise/distort.cpp:56 -msgid "Noise Distort" -msgstr "Distortion bruitée" - -#: src/modules/mod_noise/distort.cpp:197 -msgid "Displacement" -msgstr "Déplacement" - -#: src/modules/mod_noise/distort.cpp:204 src/modules/mod_noise/noise.cpp:253 -msgid "Random Seed" -msgstr "Graine aléatoire" - -#: src/modules/mod_noise/distort.cpp:207 src/modules/mod_noise/noise.cpp:259 -#: src/modules/mod_noise/valuenode_random.cpp:247 -#: src/synfig/layer_bitmap.cpp:128 -msgid "Interpolation" -msgstr "Interpolation" - -#: src/modules/mod_noise/distort.cpp:208 src/modules/mod_noise/noise.cpp:260 -#: src/synfig/layer_bitmap.cpp:129 -msgid "What type of interpolation to use" -msgstr "Quel type d'interpolation utiliser" - -#: src/modules/mod_noise/distort.cpp:210 src/modules/mod_noise/noise.cpp:262 -#: src/synfig/layer_bitmap.cpp:131 -msgid "Nearest Neighbor" -msgstr "Voisinage de plus proche" - -#: src/modules/mod_noise/distort.cpp:213 src/modules/mod_noise/noise.cpp:265 -msgid "Spline" -msgstr "Spline" - -#: src/modules/mod_noise/distort.cpp:214 src/modules/mod_noise/noise.cpp:266 -#: src/synfig/layer_bitmap.cpp:134 -msgid "Cubic" -msgstr "Cubique" - -#: src/modules/mod_noise/distort.cpp:217 src/modules/mod_noise/noise.cpp:269 -msgid "Detail" -msgstr "Détail" - -#: src/modules/mod_noise/distort.cpp:220 src/modules/mod_noise/noise.cpp:272 -#: src/modules/mod_noise/valuenode_random.cpp:246 -msgid "Animation Speed" -msgstr "Vitesse d'animation" - -#: src/modules/mod_noise/distort.cpp:223 src/modules/mod_noise/noise.cpp:275 -msgid "Turbulent" -msgstr "Turbulent" - -#: src/modules/mod_noise/main.cpp:66 -#: src/modules/mod_noise/valuenode_random.cpp:179 -msgid "Random" -msgstr "Aléatoire" - -#: src/modules/mod_noise/noise.cpp:56 -msgid "Noise Gradient" -msgstr "Dégradé bruité" - -#: src/modules/mod_noise/noise.cpp:278 -msgid "Do Alpha" -msgstr "Transparence" - -#: src/modules/mod_noise/noise.cpp:281 -msgid "Super Sampling" -msgstr "Sur-échantillonage " - -#: src/modules/mod_noise/valuenode_random.cpp:243 -#: src/synfig/valuenode_range.cpp:193 src/synfig/valuenode_reciprocal.cpp:124 -#: src/synfig/valuenode_reference.cpp:114 src/synfig/valuenode_scale.cpp:179 -#: src/synfig/valuenode_step.cpp:213 src/synfig/valuenode_timeloop.cpp:123 -msgid "Link" -msgstr "Lien" - -#: src/modules/mod_noise/valuenode_random.cpp:245 -#: src/modules/mod_particle/plant.cpp:441 -msgid "Seed" -msgstr "Graine" - -#: src/modules/mod_particle/plant.cpp:68 -msgid "Plant" -msgstr "Plante" - -#: src/modules/mod_particle/plant.cpp:395 -msgid "Gradient to be used for coloring the plant" -msgstr "Dégradé à utiliser pour colorer la plante" - -#: src/modules/mod_particle/plant.cpp:399 -msgid "Split Angle" -msgstr "Angle de séparation" - -#: src/modules/mod_particle/plant.cpp:400 -msgid "Angle by which each split deviates from its parent" -msgstr "Angle selon lequel chaque branche dévie de sa parente" - -#: src/modules/mod_particle/plant.cpp:404 -msgid "Gravity" -msgstr "Gravité" - -#: src/modules/mod_particle/plant.cpp:405 -msgid "Direction in which the shoots tend to face" -msgstr "Direction vers laquelle les \"pousses\" s'orienteront" - -#: src/modules/mod_particle/plant.cpp:410 -msgid "Tangential Velocity" -msgstr "Vitesse tangente" - -#: src/modules/mod_particle/plant.cpp:411 -msgid "Amount to which shoots tend to grow along the tangent to the BLine" -msgstr "Quantité de croissance des \"pousses\" le long de la tangente à la BLine" - -#: src/modules/mod_particle/plant.cpp:415 -msgid "Perpendicular Velocity" -msgstr "Vitesse perpendiculaire" - -#: src/modules/mod_particle/plant.cpp:416 -msgid "Amount to which shoots tend to grow perpendicular to the tangent to the BLine" -msgstr "Quantité de croissance des \"pousses\" perpendiculairement à la BLine" - -#: src/modules/mod_particle/plant.cpp:420 -msgid "Stem Size" -msgstr "Taille de tige" - -#: src/modules/mod_particle/plant.cpp:421 -msgid "Size of the stem" -msgstr "Taille de tige" - -#: src/modules/mod_particle/plant.cpp:426 -msgid "Size As Alpha" -msgstr "Taille en tant qu'alpha" - -#: src/modules/mod_particle/plant.cpp:427 -msgid "" -"If enabled, the alpha channel from the gradient is multiplied by the stem " -"size, and an alpha of 1.0 is used when rendering" -msgstr "" -"Le canal alpha du dégradé est multiplié par la taille de la tige, et une " -"valeur alpha de 1 est utilisée pour le rendu." - -#: src/modules/mod_particle/plant.cpp:431 -msgid "Reverse" -msgstr "Inverser" - -#: src/modules/mod_particle/plant.cpp:432 -msgid "If enabled, render the plant in the opposite direction" -msgstr "Si actif, rend la plante dans la direction opposée " - -#: src/modules/mod_particle/plant.cpp:436 src/synfig/valuenode.cpp:165 -#: src/synfig/valuenode_duplicate.cpp:123 src/synfig/valuenode_step.cpp:138 -msgid "Step" -msgstr "Pas" - -#: src/modules/mod_particle/plant.cpp:437 -msgid "Measure of the distance between points when rendering" -msgstr "Distance du pas entre chaque point lors du rendu" - -#: src/modules/mod_particle/plant.cpp:442 -msgid "Used to seed the pseudo-random number generator" -msgstr "Utilisé pour initialiser le générateur de nombres pseudo-aléatoire" - -#: src/modules/mod_particle/plant.cpp:446 -msgid "Splits" -msgstr "Branches" - -#: src/modules/mod_particle/plant.cpp:447 -msgid "Maximum number of times that each sprout can sprout recursively" -msgstr "" -"Nombre maximum de fois qu'une branche peut générer d'autres branches " -"récursivement" - -#: src/modules/mod_particle/plant.cpp:451 -msgid "Sprouts" -msgstr "Pousses" - -#: src/modules/mod_particle/plant.cpp:452 -msgid "Number of places that growth occurs on each bline section" -msgstr "Nombre d'endroits où des pousses apparaissent sur chaque section de BLine" - -#: src/modules/mod_particle/plant.cpp:456 -msgid "Random Factor" -msgstr "Facteur d'aléa" - -#: src/modules/mod_particle/plant.cpp:457 -msgid "Used to scale down all random effects. Set to zero to disable randomness" -msgstr "" -"Utilisé pour amoindrir les effets aléatoires. Placer le à zéro pour " -"désactiver les aléas." - -#: src/modules/mod_particle/plant.cpp:461 -msgid "Drag" -msgstr "Inertie" - -#: src/modules/mod_particle/plant.cpp:462 -msgid "Drag slows the growth" -msgstr "L'inertie ralenti la croissance" - -#: src/modules/mod_particle/plant.cpp:466 -msgid "Use Width" -msgstr "Utiliser la largeur" - -#: src/modules/mod_particle/plant.cpp:467 -msgid "Scale the velocity by the bline's width" -msgstr "Détermine la vitesse à partir de la largeur de la BLine" - -#: src/modules/mod_ppm/mptr_ppm.cpp:86 -#, c-format -msgid "%s was not in PPM format" -msgstr "%s n'était pas au format PPM" - -#: src/synfig/distance.cpp:241 -msgid "Units" -msgstr "Unités" - -#: src/synfig/distance.cpp:242 -msgid "Pixels" -msgstr "Pixels" - -#: src/synfig/distance.cpp:244 -msgid "Inches" -msgstr "Pouces" - -#: src/synfig/distance.cpp:245 -msgid "Meters" -msgstr "Mètres" - -#: src/synfig/distance.cpp:246 -msgid "Millimeters" -msgstr "Millimètres" - -#: src/synfig/distance.cpp:247 -msgid "Centimeters" -msgstr "Centimètres" - -#: src/synfig/importer.cpp:89 -msgid "Importer::open(): Cannot open empty filename" -msgstr "Importer::open() : Impossible d'ouvrir un fichier vide" - -#: src/synfig/importer.cpp:103 -msgid "Importer::open(): Couldn't find extension" -msgstr "Importer::open() : Extension non trouvée" - -#: src/synfig/importer.cpp:114 -msgid "Importer::open(): Unknown file type -- " -msgstr "Importer::open() : Type de fichier inconnu" - -#: src/synfig/layer.cpp:499 src/synfig/layer_composite.cpp:114 -msgid "Unable to create surface target" -msgstr "Impossible de créer une surface cible" - -#: src/synfig/layer.cpp:537 -msgid "Z Depth" -msgstr "Pronfondeur Z" - -#: src/synfig/layer_bitmap.cpp:118 -msgid "Top-Left" -msgstr "Haut-gauche" - -#: src/synfig/layer_bitmap.cpp:119 -msgid "Upper left-hand Corner of image" -msgstr "Le coin en haut à gauche de l'image" - -#: src/synfig/layer_bitmap.cpp:123 -msgid "Bottom-Right" -msgstr "Bas-droite" - -#: src/synfig/layer_bitmap.cpp:124 -msgid "Lower right-hand Corner of image" -msgstr "Le coin en bas à droite de l'image" - -#: src/synfig/layer_composite.cpp:145 src/synfig/paramdesc.cpp:62 -msgid "Blend Method" -msgstr "Mode de fusion" - -#: src/synfig/layer_duplicate.cpp:56 src/synfig/valuenode.cpp:163 -#: src/synfig/valuenode_duplicate.cpp:206 -msgid "Duplicate" -msgstr "Dupliquer" - -#: src/synfig/layer_duplicate.cpp:132 -msgid "Index" -msgstr "Index" - -#: src/synfig/layer_duplicate.cpp:133 -msgid "Copy Index" -msgstr "Index de copie" - -#: src/synfig/layer_mime.cpp:86 -msgid "[MIME]" -msgstr "[MIME]" - -#: src/synfig/layer_motionblur.cpp:56 -msgid "Motion Blur" -msgstr "Flou cinétique" - -#: src/synfig/layer_motionblur.cpp:122 -msgid "Aperture" -msgstr "Ouverture" - -#: src/synfig/layer_motionblur.cpp:123 -msgid "Shutter Time" -msgstr "Temps d'exposition" - -#: src/synfig/layer_pastecanvas.cpp:77 -msgid "Paste Canvas" -msgstr "Coller un canevas" - -#: src/synfig/layer_pastecanvas.cpp:114 -msgid "Pasted Canvas" -msgstr "Canevas collé" - -#: src/synfig/layer_pastecanvas.cpp:115 -msgid "Inline Canvas" -msgstr "Sous-canevas" - -#: src/synfig/layer_pastecanvas.cpp:131 -msgid "Canvas" -msgstr "Canevas" - -#: src/synfig/layer_pastecanvas.cpp:132 -msgid "Canvas to paste" -msgstr "Canevas à coller" - -#: src/synfig/layer_pastecanvas.cpp:136 -msgid "Size of canvas" -msgstr "Taille du canevas" - -#: src/synfig/layer_pastecanvas.cpp:144 -msgid "Children Lock" -msgstr "Verrouillage des enfants" - -#: src/synfig/layer_pastecanvas.cpp:154 -msgid "Current Time" -msgstr "Heure courante" - -#: src/synfig/layer_polygon.cpp:59 -msgid "Polygon" -msgstr "Polygone" - -#: src/synfig/layer_polygon.cpp:171 -msgid "Vector List" -msgstr "Liste de vecteurs" - -#: src/synfig/layer_shape.cpp:63 -msgid "Shape" -msgstr "Forme" - -#: src/synfig/layer_shape.cpp:64 -msgid "Internal" -msgstr "Interne" - -#: src/synfig/layer_shape.cpp:1193 -msgid "Layer_Shape Color" -msgstr "Couleur du calque forme" - -#: src/synfig/layer_shape.cpp:1202 -msgid "Antialiasing" -msgstr "Anti-crénelage " - -#: src/synfig/layer_shape.cpp:1209 -msgid "Type of Feather" -msgstr "Type d'adoucissement" - -#: src/synfig/layer_shape.cpp:1210 -msgid "Type of feathering to use" -msgstr "Type d'adoucissement à utiliser" - -#: src/synfig/layer_shape.cpp:1219 -msgid "Winding Style" -msgstr "Mode de superposition" - -#: src/synfig/layer_shape.cpp:1220 -msgid "Winding style to use" -msgstr "Mode de superposition à utiliser" - -#: src/synfig/layer_shape.cpp:1222 -msgid "Non Zero" -msgstr "Non zéro" - -#: src/synfig/layer_shape.cpp:1223 -msgid "Even/Odd" -msgstr "Pair/Impair" - -#: src/synfig/layer_solidcolor.cpp:55 -msgid "Solid Color" -msgstr "Couleur pleine" - -#: src/synfig/listimporter.cpp:159 src/synfig/listimporter.cpp:160 -msgid "No images in list" -msgstr "Pas d'images dans la liste" - -#: src/synfig/loadcanvas.cpp:173 -#, c-format -msgid "Unexpected element <%s>, Expected <%s>" -msgstr "Élément <%s> indattendu, <%s> attendu" - -#: src/synfig/loadcanvas.cpp:179 -#, c-format -msgid "Unexpected element <%s>" -msgstr "Élément <%s> indattendu" - -#: src/synfig/loadcanvas.cpp:190 -msgid "Too many warnings" -msgstr "Trop d'avertissements" - -#: src/synfig/loadcanvas.cpp:220 -#, c-format -msgid "<%s> is missing \"%s\" attribute" -msgstr "<%s> a un attribut \"%s\" manquant" - -#: src/synfig/loadcanvas.cpp:245 src/synfig/loadcanvas.cpp:264 -#: src/synfig/loadcanvas.cpp:283 src/synfig/loadcanvas.cpp:447 -#: src/synfig/loadcanvas.cpp:802 -#, c-format -msgid "<%s> should not contain anything" -msgstr "<%s> devrait être vide" - -#: src/synfig/loadcanvas.cpp:249 src/synfig/loadcanvas.cpp:268 -#: src/synfig/loadcanvas.cpp:287 src/synfig/loadcanvas.cpp:451 -#: src/synfig/loadcanvas.cpp:806 -#, c-format -msgid "<%s> is missing \"value\" attribute" -msgstr "Il manque un attribut \"value\" à <%s>" - -#: src/synfig/loadcanvas.cpp:462 -#, c-format -msgid "Bad value \"%s\" in <%s>" -msgstr "Valeur \"%s\" incorrecte dans <%s>" - -#: src/synfig/loadcanvas.cpp:486 -#, c-format -msgid "<%s> is missing \"pos\" attribute" -msgstr "Il manque un attribut \"pos\" dans <%s>" - -#: src/synfig/loadcanvas.cpp:893 -#, c-format -msgid "Unable to create with type \"%s\"" -msgstr "Impossible de créer de type \"%s\"" - -#: src/synfig/loadcanvas.cpp:910 -msgid " is missing attribute \"time\"" -msgstr "Il manque un attribut \"time\" à " - -#: src/synfig/loadcanvas.cpp:923 -msgid "" -"Found \"use\" attribute for , but it wasn't empty. Ignoring " -"contents..." -msgstr "" -"Attribut \"use\" trouvé pour , mais il n'était pas vide. Contenu " -"ignoré" - -#: src/synfig/loadcanvas.cpp:939 src/synfig/loadcanvas.cpp:951 -#, c-format -msgid "<%s> is missing its data" -msgstr "Il manque des données dans <%s>" - -#: src/synfig/loadcanvas.cpp:968 -msgid "Bad data for " -msgstr "Données incorrectes pour " - -#: src/synfig/loadcanvas.cpp:983 -#, c-format -msgid "Unexpected element <%s> after data, ignoring..." -msgstr "Élément <%s> inattendu après les données de . Ignoré ..." - -#: src/synfig/loadcanvas.cpp:1025 src/synfig/loadcanvas.cpp:1042 -#, c-format -msgid "\"%s\" not a valid value for attribute \"%s\" in <%s>" -msgstr "\"%s\" n'est pas un attribut valide pour \"%s\" dans <%s>" - -#: src/synfig/loadcanvas.cpp:1103 -#, c-format -msgid "Missing attribute \"type\" in <%s>" -msgstr "Il manque un attribut \"type\" dans <%s>" - -#: src/synfig/loadcanvas.cpp:1111 -#, c-format -msgid "Bad type in <%s>" -msgstr "Mauvaises type dans <%s>" - -#: src/synfig/loadcanvas.cpp:1120 -#, c-format -msgid "Error creating ValueNode <%s> with type '%s'. Refer to '%s'" -msgstr "" -"Erreur lors de la création du nœud de valeur <%s> avec le type \"%s\". Voir " -"\"%s\"." - -#: src/synfig/loadcanvas.cpp:1129 -#, c-format -msgid "<%s> did not accept type '%s'" -msgstr "<%s> n'accepte pas le type \"%s\"" - -#: src/synfig/loadcanvas.cpp:1155 src/synfig/loadcanvas.cpp:1223 -#, c-format -msgid "'%s' was already defined in <%s>" -msgstr "\"%s\" est déjà défini dans <%s>" - -#: src/synfig/loadcanvas.cpp:1165 -#, c-format -msgid "'%s' attribute in <%s> references unknown ID '%s'" -msgstr "L'attribut \"%s\" dans <%s> fait référence à un ID inconnu \"%s\"" - -#: src/synfig/loadcanvas.cpp:1174 -#, c-format -msgid "Unable to set link '\"%s\" to ValueNode \"%s\" (link #%d in \"%s\")" -msgstr "" -"Impossible de définir le lien \"%s\" vers le nœud de valeur \"%s\" (lien n°%" -"d dans \"%s\")" - -#: src/synfig/loadcanvas.cpp:1198 -#, c-format -msgid "Unknown Exception thrown when referencing ValueNode \"%s\"" -msgstr "" -"Une exception inconnue est survenue lors de la référence au nœud de valeur " -"\"%s\"" - -#: src/synfig/loadcanvas.cpp:1238 -#, c-format -msgid "element <%s> is missing its contents" -msgstr "Le contenu de l'élément <%s>manque" - -#: src/synfig/loadcanvas.cpp:1247 -#, c-format -msgid "Parse of '%s' failed" -msgstr "L'analyse de \"%s\" a échoué" - -#: src/synfig/loadcanvas.cpp:1254 -#, c-format -msgid "Unable to connect value node ('%s' of type '%s') to link %d (%s)" -msgstr "Impossible de lier le nœud de valeur (\"%s\" de type \"%s\") au lien %d (%s)" - -#: src/synfig/loadcanvas.cpp:1272 -#, c-format -msgid "Unknown Exception thrown when working on element \"%s\"" -msgstr "Une exception inconnue est survenue lors du travail sur l'élément \"%s\"" - -#: src/synfig/loadcanvas.cpp:1295 -#, c-format -msgid "<%s> is missing link %d (%s)" -msgstr "<%s> n'a pas de lien %d (%s)" - -#: src/synfig/loadcanvas.cpp:1361 -msgid "Unable to create " -msgstr "Impossible de créer " - -#: src/synfig/loadcanvas.cpp:1511 -msgid " is missing its contents or missing \"use\" element" -msgstr "Le contenu de est manquant, ou il manque un élément \"use\"" - -#: src/synfig/loadcanvas.cpp:1556 -#, c-format -msgid "Bad data in <%s>" -msgstr "Mauvaises données dans <%s>" - -#: src/synfig/loadcanvas.cpp:1588 -#, c-format -msgid "Expected a ValueNode. Refer to '%s'" -msgstr "Noeud de valeur attendu. Voir %s" - -#: src/synfig/loadcanvas.cpp:1609 -#, c-format -msgid "Bad ID \"%s\"" -msgstr "Mauvais ID \"%s\"" - -#: src/synfig/loadcanvas.cpp:1614 -#, c-format -msgid "Duplicate ID \"%s\"" -msgstr "ID dupliqué \"%s\"" - -#: src/synfig/loadcanvas.cpp:1619 -#, c-format -msgid "Unknown Exception thrown when adding ValueNode \"%s\"" -msgstr "Une exception inconnue est survenue lors de l'ajout du Nœud de valeur \"%s\"" - -#: src/synfig/loadcanvas.cpp:1654 -msgid "Missing \"type\" attribute to \"layer\" element" -msgstr "Il manque un attribut \"type\" à l'élément \"layer\"" - -#: src/synfig/loadcanvas.cpp:1673 -msgid "Installed layer version is smaller than layer version in file" -msgstr "La version de calque installée est plus petite que la version du fichier" - -#: src/synfig/loadcanvas.cpp:1693 -msgid " entry for is not yet supported. Ignoring..." -msgstr "" -"La valeur (nom) n'est pas encore supportée pour (calque). " -"Ignorée." - -#: src/synfig/loadcanvas.cpp:1696 -msgid " entry for is not yet supported. Ignoring..." -msgstr "La valeur n'est pas encore supportée pour (calque). Ignorée." - -#: src/synfig/loadcanvas.cpp:1704 -msgid "Missing \"name\" attribute for ." -msgstr "Attribut \"name\" manquant pour ." - -#: src/synfig/loadcanvas.cpp:1716 -msgid "" -"Found \"use\" attribute for , but it wasn't empty. Ignoring " -"contents..." -msgstr "" -"Attribut \"use\" trouvé pour , mais il n'était pas vide. Contenu " -"ignoré." - -#: src/synfig/loadcanvas.cpp:1721 -msgid "Empty use=\"\" value in " -msgstr "Valeur vide use=\"\" dans " - -#: src/synfig/loadcanvas.cpp:1725 -msgid "Layer rejected canvas link" -msgstr "Le calque a rejeté le lien vers le canevas." - -#: src/synfig/loadcanvas.cpp:1743 -#, c-format -msgid "Unknown ID (%s) referenced in " -msgstr "ID (%s) inconnu référencé par " - -#: src/synfig/loadcanvas.cpp:1759 -msgid " is either missing its contents, or missing a \"use\" attribute." -msgstr "Il manque soit le contenu, soit un attribut \"use\" dans ." - -#: src/synfig/loadcanvas.cpp:1771 src/synfig/loadcanvas.cpp:1791 -msgid "Bad data for " -msgstr "Mauvaises données pour " - -#: src/synfig/loadcanvas.cpp:1779 -#, c-format -msgid "Layer '%s' rejected value for parameter '%s'" -msgstr "Le calque '%s' a rejeté la valeur du paramètre '%s'" - -#: src/synfig/loadcanvas.cpp:1802 -#, c-format -msgid "Unexpected element <%s> after data, ignoring..." -msgstr "Élément <%s> inattendu après les données de . Ignoré. " - -#: src/synfig/loadcanvas.cpp:1957 -msgid "Inline canvas cannot have a section" -msgstr "Un sous-canevas ne peut avoir de section " - -#: src/synfig/loadcanvas.cpp:1965 -msgid "Inline canvas cannot have keyframes" -msgstr "Un sous-canevas ne peut avoir de points clés." - -#: src/synfig/loadcanvas.cpp:1977 -msgid "Inline canvases cannot have metadata" -msgstr "Un sous-canevas ne peut avoir de métadonnées" - -#: src/synfig/loadcanvas.cpp:1985 -msgid " must have a name" -msgstr " doit avoir un nom" - -#: src/synfig/loadcanvas.cpp:1991 -msgid " must have content" -msgstr " doit avoir un contenu" - -#: src/synfig/loadcanvas.cpp:2003 -msgid "blank \"name\" entity" -msgstr "Entité \"name\" vide" - -#: src/synfig/loadcanvas.cpp:2018 -msgid "blank \"desc\" entity" -msgstr "Entité \"desc\" vide" - -#: src/synfig/loadcanvas.cpp:2033 -msgid "blank \"author\" entity" -msgstr "Entité \"author\" vide" - -#: src/synfig/loadcanvas.cpp:2065 -#, c-format -msgid "Canvas '%s' has undefined %s: %s" -msgstr "Le canevas \"%s\" a des valeurs %s:%s non définies" - -#: src/synfig/loadcanvas.cpp:2067 src/synfig/valuenode.cpp:351 -msgid "ValueNode" -msgstr "Nœud de valeur" - -#: src/synfig/loadcanvas.cpp:2067 -msgid "ValueNodes" -msgstr "Nœuds de valeur" - -#: src/synfig/loadcanvas.cpp:2147 -msgid "" -msgstr "" - -#: src/synfig/main.cpp:103 -#, c-format -msgid "API Version mismatch (LIB:%d, PROG:%d)" -msgstr "Version d'API non correspondante (LIB: %d, PROG: %d)" - -#: src/synfig/main.cpp:108 -#, c-format -msgid "Size of Vector mismatch (app:%d, lib:%d)" -msgstr "Taille de Vecteur non correspondante (app: %d, lib: %d)" - -#: src/synfig/main.cpp:113 -#, c-format -msgid "Size of Color mismatch (app:%d, lib:%d)" -msgstr "Taille de Couleur non correspondante (app: %d, lib: %d)" - -#: src/synfig/main.cpp:118 -#, c-format -msgid "Size of Canvas mismatch (app:%d, lib:%d)" -msgstr "Taille de Canevas non correspondante (app: %d, lib: %d)" - -#: src/synfig/main.cpp:123 -#, c-format -msgid "Size of Layer mismatch (app:%d, lib:%d)" -msgstr "Taille de Calque non correspondante (app: %d, lib: %d)" - -#: src/synfig/main.cpp:213 -msgid "Starting Subsystem \"Modules\"" -msgstr "Démarage du sous-système \"Modules\"" - -#: src/synfig/main.cpp:215 -msgid "Unable to initialize subsystem \"Module\"" -msgstr "Impossible d'initialiser le sous-système \"Module\"" - -#: src/synfig/main.cpp:217 -msgid "Starting Subsystem \"Layers\"" -msgstr "Démarage du sous-système \"Layers\"" - -#: src/synfig/main.cpp:221 -msgid "Unable to initialize subsystem \"Layers\"" -msgstr "Impossible d'initialiser le sous-système \"Layers\"" - -#: src/synfig/main.cpp:224 -msgid "Starting Subsystem \"Targets\"" -msgstr "Démarage du sous-système \"Targets\"" - -#: src/synfig/main.cpp:229 -msgid "Unable to initialize subsystem \"Targets\"" -msgstr "Impossible d'initialiser le sous-système \"Targets\"" - -#: src/synfig/main.cpp:232 -msgid "Starting Subsystem \"Importers\"" -msgstr "Démarage du sous-système \"Importers\"" - -#: src/synfig/main.cpp:238 -msgid "Unable to initialize subsystem \"Importers\"" -msgstr "Impossible d'initialiser le sous-système \"Importers\"" - -#: src/synfig/main.cpp:241 -msgid "Starting Subsystem \"ValueNodes\"" -msgstr "Démarage du sous-système \"ValueNodes\"" - -#: src/synfig/main.cpp:248 -msgid "Unable to initialize subsystem \"ValueNodes\"" -msgstr "Impossible d'initialiser le sous-système \"ValueNodes\"" - -#: src/synfig/main.cpp:307 -#, c-format -msgid "Loading modules from %s" -msgstr "Chargement des modules depuis %s" - -#: src/synfig/main.cpp:320 src/tool/main.cpp:243 -msgid "DONE" -msgstr "FINI" - -#: src/synfig/main.cpp:386 src/tool/main.cpp:123 src/tool/main.cpp:164 -msgid "error" -msgstr "erreur" - -#: src/synfig/main.cpp:401 src/tool/main.cpp:130 src/tool/main.cpp:171 -msgid "warning" -msgstr "avertissement" - -#: src/synfig/main.cpp:416 -msgid "info" -msgstr "info" - -#: src/synfig/module.cpp:66 -msgid "Errors on lt_dlinit()" -msgstr "Erreurs lors de lt_dlinit()" - -#: src/synfig/module.cpp:122 -#, c-format -msgid "Attempting to register \"%s\"" -msgstr "Tentative d'enregistrement de \"%s\"" - -#: src/synfig/module.cpp:129 -#, c-format -msgid "Unable to find module \"%s\" (%s)" -msgstr "Impossible de trouver le module \"%s\" (%s)" - -#: src/synfig/module.cpp:133 -#, c-format -msgid "Found module \"%s\"" -msgstr "Module \"%s\" trouvé" - -#: src/synfig/module.cpp:167 -#, c-format -msgid "Unable to find entrypoint in module \"%s\" (%s)" -msgstr "Impossible de trouver le point d'entrée du module \"%s\" (%s)" - -#: src/synfig/module.cpp:180 -msgid "Entrypoint did not return a module." -msgstr "Le point d'entré n'a pas renvoyé un module." - -#: src/synfig/module.cpp:184 -#, c-format -msgid "Success for \"%s\"" -msgstr "Succès pour \"%s\"" - -#: src/synfig/palette.cpp:72 -msgid "Unnamed" -msgstr "SansNom" - -#: src/synfig/palette.cpp:89 -msgid "Surface Palette" -msgstr "Palette de surface" - -#: src/synfig/palette.cpp:284 -#, c-format -msgid "%0.2f%% Gray" -msgstr "Gris %0.2f%%" - -#: src/synfig/palette.cpp:299 -#, c-format -msgid "Unable to open %s for write" -msgstr "Impossible d'ouvrir %s en écriture" - -#: src/synfig/palette.cpp:321 -#, c-format -msgid "Unable to open %s for read" -msgstr "Impossible d'ouvrir %s en lecture" - -#: src/synfig/palette.cpp:329 -#, c-format -msgid "%s does not appear to be a palette file" -msgstr "Il semble que %s ne soit pas un fichier de palette" - -#: src/synfig/paramdesc.cpp:64 -msgid "_Composite" -msgstr "_Composé" - -#: src/synfig/paramdesc.cpp:65 -msgid "_Straight" -msgstr "_Direct" - -#: src/synfig/paramdesc.cpp:66 -msgid "_Onto" -msgstr "De_ssus" - -#: src/synfig/paramdesc.cpp:67 -msgid "S_traight Onto" -msgstr "Direct dessus" - -#: src/synfig/paramdesc.cpp:68 -msgid "_Behind" -msgstr "D_errière" - -#: src/synfig/paramdesc.cpp:69 -msgid "Sc_reen" -msgstr "Éc_ran" - -#: src/synfig/paramdesc.cpp:70 -msgid "Overla_y" -msgstr "Super_poser" - -#: src/synfig/paramdesc.cpp:71 -msgid "_Hard Light" -msgstr "L_umière dure" - -#: src/synfig/paramdesc.cpp:72 -msgid "_Multiply" -msgstr "_Multiplier" - -#: src/synfig/paramdesc.cpp:73 -msgid "_Divide" -msgstr "Di_viser" - -#: src/synfig/paramdesc.cpp:74 -msgid "_Add" -msgstr "_Addition" - -#: src/synfig/paramdesc.cpp:75 -msgid "S_ubtract" -msgstr "S_oustraction" - -#: src/synfig/paramdesc.cpp:76 -msgid "Di_fference" -msgstr "Di_fférence" - -#: src/synfig/paramdesc.cpp:77 -msgid "Bri_ghten" -msgstr "Éc_laircir" - -#: src/synfig/paramdesc.cpp:78 -msgid "Dar_ken" -msgstr "Assombr_ir" - -#: src/synfig/paramdesc.cpp:79 -msgid "Co_lor" -msgstr "Couleur" - -#: src/synfig/paramdesc.cpp:80 -msgid "Hu_e" -msgstr "_Teinte" - -#: src/synfig/paramdesc.cpp:81 -msgid "Saturatio_n" -msgstr "Saturatio_n" - -#: src/synfig/paramdesc.cpp:82 -msgid "Lum_inance" -msgstr "Luminance" - -#: src/synfig/paramdesc.cpp:84 -msgid "Alpha O_ver" -msgstr "Soustraire l'alpha" - -#: src/synfig/paramdesc.cpp:85 -msgid "Al_pha Brighten" -msgstr "Multiplier l'alpha" - -#: src/synfig/paramdesc.cpp:86 -msgid "Al_pha Darken" -msgstr "Ajouter l'alpha" - -#: src/synfig/render.cpp:247 src/synfig/render.cpp:248 -#: src/synfig/render.cpp:302 src/synfig/render.cpp:303 -#: src/synfig/render.cpp:423 src/synfig/render.cpp:424 -#: src/synfig/render.cpp:450 src/synfig/render.cpp:451 -msgid "Target panic" -msgstr "" - -#: src/synfig/savecanvas.cpp:254 -#, c-format -msgid "Unknown value(%s), cannot create XML representation!" -msgstr "Valeur inconnue (%s), impossible d'en créer une représentation XML" - -#: src/synfig/savecanvas.cpp:529 -#, c-format -msgid "Unknown ValueNode Type (%s), cannot create an XML representation" -msgstr "" -"Type de nœud de valeur inconnu (%s), impossible d'en créer une " -"représentation XML" - -#: src/synfig/target_scanline.cpp:129 src/synfig/target_tile.cpp:312 -msgid "Target initialization failure" -msgstr "Échec de l'initialisation de la cible" - -#: src/synfig/target_scanline.cpp:245 src/synfig/target_scanline.cpp:291 -#: src/synfig/target_scanline.cpp:389 src/synfig/target_scanline.cpp:437 -#: src/synfig/target_tile.cpp:254 -msgid "Accelerated Renderer Failure" -msgstr "Échec du rendu accéléré" - -#: src/synfig/target_scanline.cpp:300 src/synfig/target_scanline.cpp:446 -msgid "Unable to put surface on target" -msgstr "Impossible d'appliquer la surface à la cible" - -#: src/synfig/target_scanline.cpp:459 src/synfig/target_tile.cpp:435 -msgid "Caught string :" -msgstr "Chaîne récupérée :" - -#: src/synfig/target_scanline.cpp:464 src/synfig/target_tile.cpp:440 -msgid "Ran out of memory (Probably a bug)" -msgstr "À court de mémoire (Certainement un bogue)" - -#: src/synfig/target_scanline.cpp:469 src/synfig/target_tile.cpp:445 -msgid "Caught unknown error, rethrowing..." -msgstr "Erreur inconnue récupérée, relancée..." - -#: src/synfig/target_tile.cpp:141 -msgid "Bad Tile Size" -msgstr "Mauvaise taille de \"tuile\" d''image" - -#: src/synfig/target_tile.cpp:191 -msgid "Parametric Renderer Failure" -msgstr "Échec du moteur de rendu paramétrique" - -#: src/synfig/target_tile.cpp:198 src/synfig/target_tile.cpp:262 -msgid "Bad surface" -msgstr "Mauvaise surface" - -#: src/synfig/target_tile.cpp:208 src/synfig/target_tile.cpp:274 -msgid "add_tile():Unable to put surface on target" -msgstr "add_tile(): Impossible d'appliquer la surface à la cible" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:234 src/synfig/value.cpp:289 -msgid "bool" -msgstr "booléen" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:236 src/synfig/value.cpp:287 -msgid "integer" -msgstr "entier" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:238 -msgid "angle" -msgstr "angle" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:240 src/synfig/value.cpp:281 -msgid "time" -msgstr "temps" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:242 src/synfig/value.cpp:284 -msgid "real" -msgstr "réel" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:244 -msgid "vector" -msgstr "vecteur" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:246 -msgid "color" -msgstr "couleur" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:248 -msgid "segment" -msgstr "segment" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:250 -msgid "bline_point" -msgstr "point de BLine" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:252 -msgid "list" -msgstr "liste" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:254 -msgid "canvas" -msgstr "canevas" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:256 -msgid "string" -msgstr "chaîne" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:258 -msgid "gradient" -msgstr "dégradé" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:260 -msgid "nil" -msgstr "nul" - -#: src/synfig/valuenode.cpp:135 src/synfig/valuenode_composite.cpp:431 -msgid "Composite" -msgstr "Composé" - -#: src/synfig/valuenode.cpp:136 src/synfig/valuenode_radialcomposite.cpp:303 -msgid "Radial Composite" -msgstr "Composé radial" - -#: src/synfig/valuenode.cpp:137 src/synfig/valuenode_reference.cpp:156 -msgid "Reference" -msgstr "Référence" - -#: src/synfig/valuenode.cpp:138 src/synfig/valuenode_blinecalctangent.cpp:244 -#: src/synfig/valuenode_blinecalcwidth.cpp:208 -#: src/synfig/valuenode_exp.cpp:157 src/synfig/valuenode_scale.cpp:217 -msgid "Scale" -msgstr "Échelle" - -#: src/synfig/valuenode.cpp:139 src/synfig/valuenode_segcalctangent.cpp:100 -msgid "Segment Tangent" -msgstr "Tangente du segment" - -#: src/synfig/valuenode.cpp:140 src/synfig/valuenode_segcalcvertex.cpp:98 -msgid "Segment Vertex" -msgstr "Vertex du segment" - -#: src/synfig/valuenode.cpp:141 src/synfig/valuenode_stripes.cpp:78 -#: src/synfig/valuenode_stripes.cpp:225 -msgid "Stripes" -msgstr "Rayures" - -#: src/synfig/valuenode.cpp:142 src/synfig/valuenode_subtract.cpp:233 -msgid "Subtract" -msgstr "Soustraction" - -#: src/synfig/valuenode.cpp:143 src/synfig/valuenode_twotone.cpp:179 -msgid "Two-Tone" -msgstr "Deux-tons" - -#: src/synfig/valuenode.cpp:144 src/synfig/valuenode_bline.cpp:850 -#: src/synfig/valuenode_blinecalctangent.cpp:240 -#: src/synfig/valuenode_blinecalcvertex.cpp:199 -#: src/synfig/valuenode_blinecalcwidth.cpp:205 -msgid "BLine" -msgstr "BLine" - -#: src/synfig/valuenode.cpp:145 src/synfig/valuenode_dynamiclist.cpp:713 -msgid "Dynamic List" -msgstr "Liste dynamique" - -#: src/synfig/valuenode.cpp:146 src/synfig/valuenode_gradientrotate.cpp:76 -#: src/synfig/valuenode_gradientrotate.cpp:188 -msgid "Gradient Rotate" -msgstr "Rotation de dégradé" - -#: src/synfig/valuenode.cpp:147 src/synfig/valuenode_sine.cpp:106 -msgid "Sine" -msgstr "Sinus" - -#: src/synfig/valuenode.cpp:149 src/synfig/valuenode_timedswap.cpp:264 -msgid "Timed Swap" -msgstr "Échange temporisé" - -#: src/synfig/valuenode.cpp:150 src/synfig/valuenode_repeat_gradient.cpp:81 -#: src/synfig/valuenode_repeat_gradient.cpp:234 -msgid "Repeat Gradient" -msgstr "Répéter le dégrader" - -#: src/synfig/valuenode.cpp:151 src/synfig/valuenode_exp.cpp:102 -msgid "Exponential" -msgstr "Exponentiel" - -#: src/synfig/valuenode.cpp:152 src/synfig/valuenode_add.cpp:227 -msgid "Add" -msgstr "Addition" - -#: src/synfig/valuenode.cpp:153 src/synfig/valuenode_blinecalctangent.cpp:172 -msgid "BLine Tangent" -msgstr "Tangente de BLine" - -#: src/synfig/valuenode.cpp:154 src/synfig/valuenode_blinecalcvertex.cpp:140 -msgid "BLine Vertex" -msgstr "Vertex de BLine" - -#: src/synfig/valuenode.cpp:155 src/synfig/valuenode_range.cpp:230 -msgid "Range" -msgstr "Plage de valeurs" - -#: src/synfig/valuenode.cpp:157 src/synfig/valuenode_switch.cpp:170 -msgid "Switch" -msgstr "Commutateur" - -#: src/synfig/valuenode.cpp:158 src/synfig/valuenode_cos.cpp:106 -msgid "Cos" -msgstr "Cos" - -#: src/synfig/valuenode.cpp:159 -msgid "aTan2" -msgstr "aTan2" - -#: src/synfig/valuenode.cpp:160 -msgid "Reverse Tangent" -msgstr "Inverser la tangente" - -#: src/synfig/valuenode.cpp:162 src/synfig/valuenode_reciprocal.cpp:179 -msgid "Reciprocal" -msgstr "Réciproque" - -#: src/synfig/valuenode.cpp:164 src/synfig/valuenode_integer.cpp:183 -msgid "From Integer" -msgstr "Depuis un entier" - -#: src/synfig/valuenode.cpp:166 src/synfig/valuenode_blinecalcwidth.cpp:143 -msgid "BLine Width" -msgstr "Épaisseur de BLine" - -#: src/synfig/valuenode.cpp:168 -msgid "Vector Angle" -msgstr "Angle du vecteur" - -#: src/synfig/valuenode.cpp:169 -msgid "Vector Length" -msgstr "Longueur du vecteur" - -#: src/synfig/valuenode.cpp:170 -msgid "Vector X" -msgstr "X vecteur" - -#: src/synfig/valuenode.cpp:171 -msgid "Vector Y" -msgstr "Y vecteur" - -#: src/synfig/valuenode.cpp:172 -msgid "Gradient Color" -msgstr "Couleur de dégradé" - -#: src/synfig/valuenode.cpp:173 -msgid "Dot Product" -msgstr "" - -#: src/synfig/valuenode.cpp:174 src/synfig/valuenode_timestring.cpp:115 -msgid "Time String" -msgstr "" - -#: src/synfig/valuenode.cpp:175 src/synfig/valuenode_realstring.cpp:121 -msgid "Real String" -msgstr "" - -#: src/synfig/valuenode.cpp:176 src/synfig/valuenode_join.cpp:140 -msgid "Joined List" -msgstr "" - -#: src/synfig/valuenode.cpp:177 -msgid "Angle String" -msgstr "" - -#: src/synfig/valuenode.cpp:178 -msgid "Int String" -msgstr "" - -#: src/synfig/valuenode.cpp:179 -msgid "Logarithm" -msgstr "Logarithme" - -#: src/synfig/valuenode.cpp:246 -#, c-format -msgid "Bad type: ValueNode '%s' doesn't accept type '%s'" -msgstr "Mauvais type : Le nœud de valeur \"%s\" n'accepte pas le type \"%s\"" - -#: src/synfig/valuenode.cpp:511 -msgid "Placeholder" -msgstr "" - -#: src/synfig/valuenode.h:74 -#, c-format -msgid "%s:%d wrong type for %s: need %s but got %s" -msgstr "%s:%d mauvais type pour %s : besoin de %s et non %s" - -#: src/synfig/valuenode_add.cpp:98 src/synfig/valuenode_gradientrotate.cpp:76 -#: src/synfig/valuenode_integer.cpp:78 src/synfig/valuenode_integer.cpp:170 -#: src/synfig/valuenode_range.cpp:86 -#: src/synfig/valuenode_repeat_gradient.cpp:81 -#: src/synfig/valuenode_scale.cpp:87 src/synfig/valuenode_stripes.cpp:78 -#: src/synfig/valuenode_subtract.cpp:98 -msgid ":Bad type " -msgstr ": Mauvais type" - -#: src/synfig/valuenode_add.cpp:123 src/synfig/valuenode_scale.cpp:116 -#: src/synfig/valuenode_subtract.cpp:129 -msgid "One or both of my parameters aren't set!" -msgstr "Un ou deux de mes paramètres ne sont pas définis" - -#: src/synfig/valuenode_add.cpp:188 src/synfig/valuenode_subtract.cpp:194 -msgid "LHS" -msgstr "LHS" - -#: src/synfig/valuenode_add.cpp:189 src/synfig/valuenode_subtract.cpp:195 -msgid "RHS" -msgstr "RHS" - -#: src/synfig/valuenode_add.cpp:190 src/synfig/valuenode_scale.cpp:181 -#: src/synfig/valuenode_subtract.cpp:196 -msgid "Scalar" -msgstr "Scalaire" - -#: src/synfig/valuenode_animated.cpp:261 src/synfig/valuenode_animated.cpp:285 -#: src/synfig/valuenode_animated.cpp:561 src/synfig/valuenode_animated.cpp:579 -#: src/synfig/valuenode_animated.cpp:659 src/synfig/valuenode_animated.cpp:678 -msgid "A waypoint already exists at this point in time" -msgstr "Un point de passage existe déjà à ce moment" - -#: src/synfig/valuenode_animated.cpp:1056 -#, c-format -msgid "%s: You cannot use a %s in an animated ValueNode" -msgstr "%s : Vous ne pouvez pas utiliser un %s dans un nœud de valeur animé." - -#: src/synfig/valuenode_animated.cpp:1091 -msgid "Animated" -msgstr "Animé" - -#: src/synfig/valuenode_bline.cpp:797 src/synfig/valuenode_dynamiclist.cpp:619 -msgid "No entries in list" -msgstr "Pas d'entrées dans la liste" - -#: src/synfig/valuenode_bline.cpp:800 src/synfig/valuenode_dynamiclist.cpp:622 -msgid "No entries in ret_list" -msgstr "Pas d'entrées dans la liste ret_list" - -#: src/synfig/valuenode_bline.cpp:809 -#, c-format -msgid "Vertex %03d" -msgstr "Vertex %03d" - -#: src/synfig/valuenode_blinecalctangent.cpp:243 -#: src/synfig/valuenode_gradientrotate.cpp:148 -#: src/synfig/valuenode_linear.cpp:215 -msgid "Offset" -msgstr "Décalage" - -#: src/synfig/valuenode_blinecalctangent.cpp:245 -msgid "Fixed Length" -msgstr "Longueur fixe" - -#: src/synfig/valuenode_composite.cpp:161 -#: src/synfig/valuenode_composite.cpp:181 -msgid "Bad type for composite" -msgstr "Erreur de type pour un composé" - -#: src/synfig/valuenode_composite.cpp:267 -msgid "Red" -msgstr "Rouge" - -#: src/synfig/valuenode_composite.cpp:269 -msgid "Green" -msgstr "Vert" - -#: src/synfig/valuenode_composite.cpp:271 -msgid "Blue" -msgstr "Bleu" - -#: src/synfig/valuenode_composite.cpp:273 -#: src/synfig/valuenode_radialcomposite.cpp:210 -msgid "Alpha" -msgstr "Alpha" - -#: src/synfig/valuenode_composite.cpp:277 -msgid "Vertex 1" -msgstr "Vertex 1" - -#: src/synfig/valuenode_composite.cpp:279 -#: src/synfig/valuenode_composite.cpp:295 -msgid "Tangent 1" -msgstr "Tangente 1" - -#: src/synfig/valuenode_composite.cpp:281 -msgid "Vertex 2" -msgstr "Vertex 2" - -#: src/synfig/valuenode_composite.cpp:283 -#: src/synfig/valuenode_composite.cpp:297 -msgid "Tangent 2" -msgstr "Tangente 2" - -#: src/synfig/valuenode_composite.cpp:287 -msgid "Vertex" -msgstr "Vertex" - -#: src/synfig/valuenode_composite.cpp:293 -msgid "Split Tangents" -msgstr "Sépater les tangentes" - -#: src/synfig/valuenode_composite.cpp:304 -#: src/synfig/valuenode_radialcomposite.cpp:221 -#, c-format -msgid "C%d" -msgstr "" - -#: src/synfig/valuenode_const.cpp:126 -msgid "Constant" -msgstr "Constante" - -#: src/synfig/valuenode_cos.cpp:167 src/synfig/valuenode_sine.cpp:167 -msgid "Amplitude" -msgstr "Amplitude" - -#: src/synfig/valuenode_duplicate.cpp:121 -msgid "From" -msgstr "Depuis" - -#: src/synfig/valuenode_duplicate.cpp:122 -msgid "To" -msgstr "Vers" - -#: src/synfig/valuenode_dynamiclist.cpp:613 -msgid "List type/item type mismatch, throwing away mismatch" -msgstr "Incompatibilité entre type et élement de liste, rejet de l'erreur" - -#: src/synfig/valuenode_dynamiclist.cpp:661 -#, c-format -msgid "Item %03d" -msgstr "Élément %03d" - -#: src/synfig/valuenode_exp.cpp:155 -msgid "Exponent" -msgstr "Exposant" - -#: src/synfig/valuenode_integer.cpp:132 -msgid "Integer" -msgstr "Entier" - -#: src/synfig/valuenode_join.cpp:202 -msgid "Strings" -msgstr "Chaînes" - -#: src/synfig/valuenode_join.cpp:203 src/synfig/valuenode_timedswap.cpp:221 -msgid "Before" -msgstr "Avant" - -#: src/synfig/valuenode_join.cpp:204 -msgid "Separator" -msgstr "Séparateur" - -#: src/synfig/valuenode_join.cpp:205 src/synfig/valuenode_timedswap.cpp:222 -msgid "After" -msgstr "Après" - -#: src/synfig/valuenode_linear.cpp:209 -msgid "Rate" -msgstr "Taux" - -#: src/synfig/valuenode_linear.cpp:212 -msgid "Slope" -msgstr "Pente" - -#: src/synfig/valuenode_radialcomposite.cpp:121 -#: src/synfig/valuenode_radialcomposite.cpp:137 -msgid "Bad type for radialcomposite" -msgstr "Mauvais type de composé radial" - -#: src/synfig/valuenode_radialcomposite.cpp:199 -msgid "Theta" -msgstr "Theta" - -#: src/synfig/valuenode_radialcomposite.cpp:204 -msgid "Luma" -msgstr "Luminance" - -#: src/synfig/valuenode_radialcomposite.cpp:206 -msgid "Saturation" -msgstr "Saturation" - -#: src/synfig/valuenode_radialcomposite.cpp:208 -msgid "Hue" -msgstr "Teinte" - -#: src/synfig/valuenode_range.cpp:118 -msgid "Some of my parameters aren't set!" -msgstr "Certains de mes paramètres ne sont pas définis" - -#: src/synfig/valuenode_range.cpp:191 -msgid "Min" -msgstr "Min" - -#: src/synfig/valuenode_range.cpp:192 -msgid "Max" -msgstr "Max" - -#: src/synfig/valuenode_realstring.cpp:183 -msgid "Real" -msgstr "Réel" - -#: src/synfig/valuenode_realstring.cpp:185 -msgid "Precision" -msgstr "Précision" - -#: src/synfig/valuenode_realstring.cpp:186 -msgid "Zero Padded" -msgstr "Compléter avec des zéros" - -#: src/synfig/valuenode_reciprocal.cpp:125 -msgid "Epsilon" -msgstr "Epsilon" - -#: src/synfig/valuenode_reciprocal.cpp:126 -msgid "Infinite" -msgstr "Infini" - -#: src/synfig/valuenode_repeat_gradient.cpp:184 -msgid "Count" -msgstr "Nombre" - -#: src/synfig/valuenode_repeat_gradient.cpp:186 -msgid "Specify Start" -msgstr "Définir le début" - -#: src/synfig/valuenode_repeat_gradient.cpp:187 -msgid "Specify End" -msgstr "Définir la fin" - -#: src/synfig/valuenode_repeat_gradient.cpp:188 -msgid "Start Color" -msgstr "Couleur de début" - -#: src/synfig/valuenode_repeat_gradient.cpp:189 -msgid "End Color" -msgstr "Couleur de fin" - -#: src/synfig/valuenode_segcalctangent.cpp:159 -#: src/synfig/valuenode_segcalcvertex.cpp:157 -msgid "Segment" -msgstr "Segment" - -#: src/synfig/valuenode_step.cpp:215 src/tool/main.cpp:945 -msgid "Start Time" -msgstr "Heure de début" - -#: src/synfig/valuenode_step.cpp:216 -msgid "Intersection" -msgstr "Intersection" - -#: src/synfig/valuenode_stripes.cpp:170 -msgid "Color 1" -msgstr "Couleur 1" - -#: src/synfig/valuenode_stripes.cpp:172 -msgid "Color 2" -msgstr "Couleur 2" - -#: src/synfig/valuenode_stripes.cpp:174 -msgid "Stripe Count" -msgstr "Nombre de rayures" - -#: src/synfig/valuenode_timedswap.cpp:223 -msgid "Swap Time" -msgstr "Moment de l'échange" - -#: src/synfig/valuenode_timedswap.cpp:224 -msgid "Swap Duration" -msgstr "Durée de l'échange" - -#: src/synfig/valuenode_timestring.cpp:168 -msgid "Time" -msgstr "Temps" - -#: src/synfig/valuenode_twotone.cpp:136 -msgid "Color1" -msgstr "Couleur1" - -#: src/synfig/valuenode_twotone.cpp:138 -msgid "Color2" -msgstr "Couleur2" - -#: src/tool/main.cpp:216 -msgid "Line" -msgstr "Ligne" - -#: src/tool/main.cpp:216 -msgid " of " -msgstr " de " - -#: src/tool/main.cpp:322 -msgid "syntax: " -msgstr "syntaxe : " - -#: src/tool/main.cpp:325 -msgid "Print out usage and syntax info" -msgstr "Afficher les informations d'utilisation et de syntaxe" - -#: src/tool/main.cpp:328 -msgid "Specify output target (Default:unknown)" -msgstr "Définir la cible en sortie (Défaut : inconnue)" - -#: src/tool/main.cpp:329 -msgid "Set the image width (Use zero for file default)" -msgstr "" -"Définir la largeur de l'image (Utiliser zéro pour les valeurs par défaut du " -"fichier)" - -#: src/tool/main.cpp:330 -msgid "Set the image height (Use zero for file default)" -msgstr "" -"Définir la hauteur de l'image (Utiliser zéro pour les valeurs par défaut du " -"fichier)" - -#: src/tool/main.cpp:331 -msgid "Set the diagonal size of image window (Span)" -msgstr "Définir la diagonale de la fenêtre d'image (Étendue)" - -#: src/tool/main.cpp:332 -msgid "Set antialias amount for parametric renderer." -msgstr "Définir la valeur d'anticrénelage pour le moteur de rendu paramétrique." - -#: src/tool/main.cpp:333 -#, c-format -msgid "Specify image quality for accelerated renderer (default=%d)" -msgstr "Définir la qualité d'image pour accélérer le rendu (défaut = %d )" - -#: src/tool/main.cpp:334 -msgid "Gamma (default=2.2)" -msgstr "Gamma (défaut = 2.2)" - -#: src/tool/main.cpp:335 -msgid "Verbose Output (add more for more verbosity)" -msgstr "Sortie verbeuse (en ajouter pour avoir une sortie encore plus détaillée)" - -#: src/tool/main.cpp:336 -msgid "Quiet mode (No progress/time-remaining display)" -msgstr "Mode silencieux (Pas de barre de progression/de temps restant affiché)" - -#: src/tool/main.cpp:337 -msgid "Render the canvas with the given id instead of the root." -msgstr "Rendre le canevas avec l'identifiant donné au lieu de l'id racine." - -#: src/tool/main.cpp:338 -msgid "Specify output filename" -msgstr "Spécifier le nom de fichier de sortie" - -#: src/tool/main.cpp:339 -msgid "Enable multithreaded renderer using specified # of threads" -msgstr "Activer le rendu multiprocessus en utilisant le nombre donné de processus" - -#: src/tool/main.cpp:340 -msgid "Print Benchmarks" -msgstr "Afficher les tests de performance" - -#: src/tool/main.cpp:341 -msgid "Set the frame rate" -msgstr "Définir le nombre d'images par seconde" - -#: src/tool/main.cpp:342 -msgid "Render a single frame at " -msgstr "Rendre une seule image à un nombre de secondes " - -#: src/tool/main.cpp:343 src/tool/main.cpp:344 -msgid "Set the starting time" -msgstr "Définir l'heure de début" - -#: src/tool/main.cpp:345 -msgid "Set the ending time" -msgstr "Définir l'heure de fin" - -#: src/tool/main.cpp:346 -msgid "Set the physical resolution (dots-per-inch)" -msgstr "Définir la résolution physique (points par pouce)" - -#: src/tool/main.cpp:347 -msgid "Set the physical X resolution (dots-per-inch)" -msgstr "Définir la résolution physique X (points par pouce)" - -#: src/tool/main.cpp:348 -msgid "Set the physical Y resolution (dots-per-inch)" -msgstr "Définir la résolution physique Y (points par pouce)" - -#: src/tool/main.cpp:350 -msgid "List the exported canvases in the composition" -msgstr "Lister les canevas exportés dans la composition" - -#: src/tool/main.cpp:351 -msgid "Print out specified details of the root canvas" -msgstr "Imprimer les détails spécifiés du canevas racine" - -#: src/tool/main.cpp:352 -msgid "Append layers in to composition" -msgstr "Ajouter les calques de dans la composition" - -#: src/tool/main.cpp:354 -msgid "Print out layer's description, parameter info, etc." -msgstr "Afficher les descriptions, infos des paramètres, etc. du calque" - -#: src/tool/main.cpp:355 -msgid "Print out the list of available layers" -msgstr "Afficher la liste des calques disponibles" - -#: src/tool/main.cpp:356 -msgid "Print out the list of available targets" -msgstr "Afficher la liste des cibles disponibles" - -#: src/tool/main.cpp:357 -msgid "Print out the list of available importers" -msgstr "Afficher la liste des importeurs disponibles" - -#: src/tool/main.cpp:358 -msgid "Print out the list of available ValueNodes" -msgstr "Afficher la liste des nœuds de valeur disponibles" - -#: src/tool/main.cpp:359 -msgid "Print out the list of loaded modules" -msgstr "Afficher la liste des modules chargés" - -#: src/tool/main.cpp:360 -msgid "Print out version information" -msgstr "Afficher les informations de version" - -#: src/tool/main.cpp:361 -msgid "Print out misc build information" -msgstr "Affichier diverses informations de compilation" - -#: src/tool/main.cpp:362 -msgid "Print out license information" -msgstr "Afficher les informations de licence" - -#: src/tool/main.cpp:365 -msgid "Test GUID generation" -msgstr "Tester la génération de GUID" - -#: src/tool/main.cpp:366 -msgid "Test signal implementation" -msgstr "Tester l'implémentation des signaux" - -#: src/tool/main.cpp:616 -#, c-format -msgid "Antialiasing set to %d, (%d samples per pixel)" -msgstr "Anti-crénelage à %d (%d échantillons par pixel)" - -#: src/tool/main.cpp:624 -#, c-format -msgid "Span set to %d units" -msgstr "Étendue de l'image à %d unités" - -#: src/tool/main.cpp:634 -#, c-format -msgid "Frame rate set to %d frames per second" -msgstr "Nombre d'images par secondes défini à %d" - -#: src/tool/main.cpp:644 -#, c-format -msgid "Physical resolution set to %f dpi" -msgstr "Résolution physique à %f ppp" - -#: src/tool/main.cpp:654 -#, c-format -msgid "Physical X resolution set to %f dpi" -msgstr "Résolution physique X à %f ppp" - -#: src/tool/main.cpp:664 -#, c-format -msgid "Physical Y resolution set to %f dpi" -msgstr "Résolution physique Y à %f ppp" - -#: src/tool/main.cpp:685 -msgid "Rendering frame at " -msgstr "Rendu de l'image à " - -#: src/tool/main.cpp:707 -#, c-format -msgid "Resolution set to %dx%d" -msgstr "Résolution à %dx%d" - -#: src/tool/main.cpp:724 -#, c-format -msgid "Quality set to %d" -msgstr "Qualité à %d" - -#: src/tool/main.cpp:744 -#, c-format -msgid "Threads set to %d" -msgstr "Processus (threads) à %d" - -#: src/tool/main.cpp:914 -msgid "Unrecognised canvas variable: " -msgstr "Variable de canevas inconnue :" - -#: src/tool/main.cpp:915 -msgid "Recognized variables are:" -msgstr "Les variables connues sont :" - -#: src/tool/main.cpp:951 -msgid "End Time" -msgstr "Heure de fin" - -#: src/tool/main.cpp:957 -msgid "Frame Rate" -msgstr "Images par seconde" - -#: src/tool/main.cpp:963 -msgid "Start Frame" -msgstr "Image de début" - -#: src/tool/main.cpp:969 -msgid "End Frame" -msgstr "Image de fin" - -#: src/tool/main.cpp:990 -msgid "Image Aspect Ratio" -msgstr "Ratio d'aspect d'image" - -#: src/tool/main.cpp:999 -msgid "Pixel Width" -msgstr "Largeur de pixel" - -#: src/tool/main.cpp:1005 -msgid "Pixel Height" -msgstr "Hauteur de pixel" - -#: src/tool/main.cpp:1011 -msgid "Pixel Aspect Ratio" -msgstr "Ratio d'aspect des pixels" - -#: src/tool/main.cpp:1020 -msgid "Top Left" -msgstr "Haut-Gauche" - -#: src/tool/main.cpp:1027 -msgid "Bottom Right" -msgstr "Bas-Droite" - -#: src/tool/main.cpp:1034 -msgid "Physical Width" -msgstr "Largeur physique" - -#: src/tool/main.cpp:1040 -msgid "Physical Height" -msgstr "Hauteur physique" - -#: src/tool/main.cpp:1046 -msgid "X Resolution" -msgstr "Résolution X" - -#: src/tool/main.cpp:1052 -msgid "Y Resolution" -msgstr "Résolution Y" - -#: src/tool/main.cpp:1058 -msgid "Diagonal Image Span" -msgstr "Étendue de l'image (Diagonale)" - -#: src/tool/main.cpp:1067 -msgid "Interlaced" -msgstr "Entrelacé" - -#: src/tool/main.cpp:1073 -msgid "Antialias" -msgstr "Anti-crénelage" - -#: src/tool/main.cpp:1085 -msgid "Flags" -msgstr "Drapeaux" - -#: src/tool/main.cpp:1091 -msgid "Focus" -msgstr "Centre" - -#: src/tool/main.cpp:1098 -msgid "Background Color" -msgstr "Couleur de fond" - -#: src/tool/main.cpp:1108 -msgid "Metadata" -msgstr "Métadonnée" - -#: src/tool/main.cpp:1136 -msgid "FATAL: Synfig Version Mismatch" -msgstr "Erreur Fatale : Incompatibilité avec la version de Synfig" - -#: src/tool/main.cpp:1152 -msgid "verbosity set to " -msgstr "Verbosité à " - -#: src/tool/main.cpp:1182 src/tool/main.cpp:1206 src/tool/main.cpp:1214 -#: src/tool/main.cpp:1315 src/tool/main.cpp:1341 -msgid "Throwing out job..." -msgstr "Rejet du job ..." - -#: src/tool/main.cpp:1205 -msgid "Unable to find canvas with ID \"" -msgstr "Impossible de trouver le canevas ayant l'ID \"" - -#: src/tool/main.cpp:1205 src/tool/main.cpp:1213 -msgid "\" in " -msgstr "\" dans " - -#: src/tool/main.cpp:1213 -msgid "Invalid canvas name \"" -msgstr "Nom de canevas invalide \"" - -#: src/tool/main.cpp:1227 -msgid "Quality set to " -msgstr "Qualité à " - -#: src/tool/main.cpp:1247 -msgid "Appended contents of " -msgstr "Ajout des contenus de " - -#: src/tool/main.cpp:1251 -msgid "Attempting to determine target/outfile..." -msgstr "Tentative de déterminer le type de cible/fichier de sortie ..." - -#: src/tool/main.cpp:1257 -msgid "Target name undefined, attempting to figure it out" -msgstr "Nom de cible non défini, tentative pour le déterminer" - -#: src/tool/main.cpp:1286 -msgid "Defaulting to PNG target..." -msgstr "Passage par défaut à la cible PNG ..." - -#: src/tool/main.cpp:1305 -msgid "Creating the target..." -msgstr "Création de la cible ..." - -#: src/tool/main.cpp:1314 -msgid "Unknown target for " -msgstr "Cible inconnue pour " - -#: src/tool/main.cpp:1325 -msgid "Setting the canvas on the target..." -msgstr "Définition du canevas de la cible ..." - -#: src/tool/main.cpp:1327 -msgid "Setting the quality of the target..." -msgstr "Définition de la qualité de la cible ..." - -#: src/tool/main.cpp:1337 -msgid "Unidentified arguments for " -msgstr "Paramètres inconnus pour " - -#: src/tool/main.cpp:1350 -msgid "Unidentified arguments:" -msgstr "Paramètres inconnus :" - -#: src/tool/main.cpp:1359 -msgid "Nothing to do!" -msgstr "Rien à faire." - -#: src/tool/main.cpp:1402 -msgid "Rendering..." -msgstr "Rendu en cours ..." - -#: src/tool/main.cpp:1418 -msgid "Done." -msgstr "Fini." - diff --git a/synfig-core/trunk/po/ru.po b/synfig-core/trunk/po/ru.po deleted file mode 100644 index db497d9..0000000 --- a/synfig-core/trunk/po/ru.po +++ /dev/null @@ -1,3151 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: Synfig Backend\n" -"Report-Msgid-Bugs-To: http://synfig.org/Bugs\n" -"POT-Creation-Date: 2008-11-25 23:27+0100\n" -"PO-Revision-Date: 2008-11-22 04:22+0300\n" -"Last-Translator: Alexandre Prokoudine \n" -"Language-Team: GNOME Cyrillic \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: Russian\n" -"X-Poedit-Country: RUSSIAN FEDERATION\n" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:63 -#: src/modules/lyr_freetype/lyr_freetype.cpp:507 -msgid "Text" -msgstr "Текст" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:64 -#: src/modules/lyr_std/import.cpp:59 src/modules/lyr_std/supersample.cpp:56 -#: src/modules/lyr_std/timeloop.cpp:58 src/modules/lyr_std/xorpattern.cpp:55 -#: src/modules/mod_particle/plant.cpp:69 src/synfig/layer_duplicate.cpp:57 -#: src/synfig/layer_pastecanvas.cpp:78 -msgid "Other" -msgstr "Прочие" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:94 -msgid "Text Layer" -msgstr "Текстовый слой" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:380 -msgid "unable to initialize" -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:399 -msgid "empty font set" -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:508 -msgid "Text to Render" -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:513 -#: src/modules/lyr_std/shade.cpp:375 -#: src/modules/mod_geometry/checkerboard.cpp:121 -#: src/modules/mod_geometry/circle.cpp:125 -#: src/modules/mod_geometry/rectangle.cpp:122 src/synfig/layer_shape.cpp:1192 -#: src/synfig/layer_solidcolor.cpp:99 -msgid "Color" -msgstr "Цвет" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:514 -msgid "Color of the text" -msgstr "Цвет текста" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:518 -msgid "Font Family" -msgstr "Гарнитура" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:523 -msgid "Style" -msgstr "Начертание" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:525 -#: src/modules/lyr_freetype/lyr_freetype.cpp:535 -msgid "Normal" -msgstr "Обычное" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:526 -msgid "Oblique" -msgstr "Полужирное" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:527 -msgid "Italic" -msgstr "Курсивное" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:531 -msgid "Weight" -msgstr "Насыщенность" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:533 -msgid "Ultralight" -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:534 -msgid "light" -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:536 -msgid "Bold" -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:537 -msgid "Ultrabold" -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:538 -msgid "Heavy" -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:541 -msgid "Horizontal Spacing" -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:542 -msgid "Describes how close glyphs are horizontally" -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:546 -msgid "Vertical Spacing" -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:547 -msgid "Describes how close lines of text are vertically" -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:551 -#: src/modules/lyr_std/shade.cpp:381 src/modules/lyr_std/xorpattern.cpp:125 -#: src/modules/mod_filter/blur.cpp:242 -#: src/modules/mod_filter/radialblur.cpp:111 -#: src/modules/mod_geometry/checkerboard.cpp:128 -#: src/modules/mod_noise/distort.cpp:201 src/modules/mod_noise/noise.cpp:256 -msgid "Size" -msgstr "Размер" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:552 -msgid "Size of the text" -msgstr "Кегль текста" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:559 -msgid "Orientation" -msgstr "Ориентация" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:560 -msgid "Text Orientation" -msgstr "Ориентация текста" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:565 -#: src/modules/lyr_std/insideout.cpp:141 src/modules/lyr_std/rotate.cpp:112 -#: src/modules/lyr_std/shade.cpp:378 src/modules/lyr_std/translate.cpp:97 -#: src/modules/lyr_std/xorpattern.cpp:122 -#: src/modules/mod_filter/radialblur.cpp:106 -#: src/modules/mod_geometry/checkerboard.cpp:125 -#: src/modules/mod_geometry/circle.cpp:137 -#: src/modules/mod_gradient/curvegradient.cpp:533 -#: src/modules/mod_particle/plant.cpp:390 src/synfig/layer_pastecanvas.cpp:127 -#: src/synfig/layer_shape.cpp:1196 src/synfig/valuenode_composite.cpp:291 -msgid "Origin" -msgstr "Исходная точка" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:566 -msgid "Text Position" -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:570 -msgid "Font" -msgstr "Шрифт" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:571 -msgid "Filename of the font to use" -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:578 -msgid "Kerning" -msgstr "Кернинг" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:579 -msgid "Enables/Disables font kerning (If the font supports it)" -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:583 -msgid "Sharpen Edges" -msgstr "Резкость краёв" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:584 -msgid "Turn this off if you are going to be animating the text" -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:587 -#: src/modules/lyr_std/shade.cpp:398 src/modules/mod_geometry/circle.cpp:140 -#: src/synfig/layer_shape.cpp:1199 -msgid "Invert" -msgstr "Инвертировать" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:644 -msgid "No face loaded, no text will be rendered." -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:670 -msgid "Text too small, no text will be rendered." -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:694 -msgid "Unable to set face size." -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:737 -msgid "Invalid multibyte sequence - is the locale set?\n" -msgstr "" - -#: src/modules/lyr_freetype/lyr_freetype.cpp:744 -msgid "Can't parse multibyte character.\n" -msgstr "" - -#: src/modules/lyr_std/bevel.cpp:67 -msgid "Bevel" -msgstr "Фаска" - -#: src/modules/lyr_std/bevel.cpp:68 src/modules/lyr_std/shade.cpp:67 -msgid "Stylize" -msgstr "Стилизация" - -#: src/modules/lyr_std/bevel.cpp:356 src/modules/lyr_std/shade.cpp:387 -#: src/modules/mod_filter/blur.cpp:246 -#: src/modules/mod_filter/halftone2.cpp:166 -msgid "Type" -msgstr "Тип" - -#: src/modules/lyr_std/bevel.cpp:357 src/modules/lyr_std/shade.cpp:388 -#: src/modules/mod_filter/blur.cpp:247 -msgid "Type of blur to use" -msgstr "Тип используемого размывания" - -#: src/modules/lyr_std/bevel.cpp:359 src/modules/lyr_std/shade.cpp:390 -#: src/modules/mod_filter/blur.cpp:249 src/synfig/layer_shape.cpp:1212 -msgid "Box Blur" -msgstr "" - -#: src/modules/lyr_std/bevel.cpp:360 src/modules/lyr_std/shade.cpp:391 -#: src/modules/mod_filter/blur.cpp:250 src/synfig/layer_shape.cpp:1213 -msgid "Fast Gaussian Blur" -msgstr "Быстрое гауссово" - -#: src/modules/lyr_std/bevel.cpp:361 src/modules/lyr_std/shade.cpp:392 -#: src/modules/mod_filter/blur.cpp:251 src/synfig/layer_shape.cpp:1214 -msgid "Cross-Hatch Blur" -msgstr "" - -#: src/modules/lyr_std/bevel.cpp:362 src/modules/lyr_std/shade.cpp:393 -#: src/modules/mod_filter/blur.cpp:252 src/synfig/layer_shape.cpp:1215 -msgid "Gaussian Blur" -msgstr "Гауссово" - -#: src/modules/lyr_std/bevel.cpp:363 src/modules/lyr_std/shade.cpp:394 -#: src/modules/mod_filter/blur.cpp:253 src/synfig/layer_shape.cpp:1216 -msgid "Disc Blur" -msgstr "" - -#: src/modules/lyr_std/bevel.cpp:367 -msgid "Hi-Color" -msgstr "Цвет света" - -#: src/modules/lyr_std/bevel.cpp:370 -msgid "Lo-Color" -msgstr "Цвет тени" - -#: src/modules/lyr_std/bevel.cpp:373 -msgid "Light Angle" -msgstr "Угол освещения" - -#: src/modules/lyr_std/bevel.cpp:377 -msgid "Depth of Bevel" -msgstr "Глубина фаски" - -#: src/modules/lyr_std/bevel.cpp:381 -msgid "Softness" -msgstr "Мягкость" - -#: src/modules/lyr_std/bevel.cpp:384 -msgid "Use Luma" -msgstr "Светимость" - -#: src/modules/lyr_std/bevel.cpp:387 -msgid "Solid" -msgstr "" - -#: src/modules/lyr_std/booleancurve.cpp:104 -msgid "Region Set" -msgstr "" - -#: src/modules/lyr_std/booleancurve.cpp:105 -msgid "Set of regions to combine" -msgstr "" - -#: src/modules/lyr_std/clamp.cpp:54 src/tool/main.cpp:1079 -msgid "Clamp" -msgstr "Куча" - -#: src/modules/lyr_std/clamp.cpp:55 src/modules/mod_filter/colorcorrect.cpp:55 -#: src/modules/mod_filter/halftone2.cpp:58 -#: src/modules/mod_filter/halftone3.cpp:58 -#: src/modules/mod_filter/lumakey.cpp:58 -msgid "Filters" -msgstr "Фильтры" - -#: src/modules/lyr_std/clamp.cpp:155 -msgid "Invert Negative" -msgstr "Инвертировать негатив" - -#: src/modules/lyr_std/clamp.cpp:159 -msgid "Clamp Ceiling" -msgstr "Потолок кучи" - -#: src/modules/lyr_std/clamp.cpp:163 -msgid "Ceiling" -msgstr "Потолок" - -#: src/modules/lyr_std/clamp.cpp:167 -msgid "Floor" -msgstr "Пол" - -#: src/modules/lyr_std/import.cpp:58 -msgid "Import Image" -msgstr "Импортировать изображение" - -#: src/modules/lyr_std/import.cpp:138 -#, c-format -msgid "Filename seems to already be set to \"%s\" (%s)" -msgstr "" - -#: src/modules/lyr_std/import.cpp:209 -msgid "Filename" -msgstr "Имя файла" - -#: src/modules/lyr_std/import.cpp:210 -msgid "File to import" -msgstr "Импортируемый файл" - -#: src/modules/lyr_std/import.cpp:214 src/synfig/layer_pastecanvas.cpp:140 -msgid "Time Offset" -msgstr "Смещение во времени" - -#: src/modules/lyr_std/insideout.cpp:55 -msgid "Inside Out" -msgstr "Наизнанку" - -#: src/modules/lyr_std/insideout.cpp:56 -#: src/modules/lyr_std/sphere_distort.cpp:73 -#: src/modules/lyr_std/stretch.cpp:59 src/modules/lyr_std/twirl.cpp:56 -#: src/modules/lyr_std/warp.cpp:56 src/modules/mod_noise/distort.cpp:57 -msgid "Distortions" -msgstr "Искажение" - -#: src/modules/lyr_std/insideout.cpp:142 -msgid "Defines the where the center will be" -msgstr "" - -#: src/modules/lyr_std/julia.cpp:56 -msgid "Julia Set" -msgstr "Жюлиа" - -#: src/modules/lyr_std/julia.cpp:57 src/modules/lyr_std/mandelbrot.cpp:57 -msgid "Fractals" -msgstr "Фракталы" - -#: src/modules/lyr_std/julia.cpp:300 -msgid "Inside Color" -msgstr "Внутренний цвет" - -#: src/modules/lyr_std/julia.cpp:301 -msgid "Color of the Set" -msgstr "Цвет внутри набора" - -#: src/modules/lyr_std/julia.cpp:304 -msgid "Outside Color" -msgstr "Внешний цвет" - -#: src/modules/lyr_std/julia.cpp:305 -msgid "Color outside the Set" -msgstr "Цвет вне набора" - -#: src/modules/lyr_std/julia.cpp:308 -msgid "Color Shift" -msgstr "Смещение цвета" - -#: src/modules/lyr_std/julia.cpp:311 src/modules/lyr_std/mandelbrot.cpp:213 -msgid "Iterations" -msgstr "Итераций" - -#: src/modules/lyr_std/julia.cpp:314 -msgid "Seed Point" -msgstr "" - -#: src/modules/lyr_std/julia.cpp:317 src/modules/lyr_std/mandelbrot.cpp:216 -msgid "Bailout ValueBase" -msgstr "" - -#: src/modules/lyr_std/julia.cpp:321 src/modules/lyr_std/mandelbrot.cpp:226 -#: src/modules/lyr_std/twirl.cpp:125 -msgid "Distort Inside" -msgstr "Искажать внутри" - -#: src/modules/lyr_std/julia.cpp:324 src/modules/lyr_std/mandelbrot.cpp:230 -msgid "Shade Inside" -msgstr "Тень изнутри" - -#: src/modules/lyr_std/julia.cpp:327 src/modules/lyr_std/mandelbrot.cpp:234 -msgid "Solid Inside" -msgstr "Заливка изнутри" - -#: src/modules/lyr_std/julia.cpp:330 src/modules/lyr_std/mandelbrot.cpp:238 -msgid "Invert Inside" -msgstr "" - -#: src/modules/lyr_std/julia.cpp:333 -msgid "Color Inside" -msgstr "Цвет изнутри" - -#: src/modules/lyr_std/julia.cpp:336 src/modules/lyr_std/mandelbrot.cpp:255 -#: src/modules/lyr_std/twirl.cpp:129 -msgid "Distort Outside" -msgstr "Искажать снаружи" - -#: src/modules/lyr_std/julia.cpp:339 src/modules/lyr_std/mandelbrot.cpp:259 -msgid "Shade Outside" -msgstr "Тень снаружи" - -#: src/modules/lyr_std/julia.cpp:342 src/modules/lyr_std/mandelbrot.cpp:263 -msgid "Solid Outside" -msgstr "" - -#: src/modules/lyr_std/julia.cpp:345 src/modules/lyr_std/mandelbrot.cpp:267 -msgid "Invert Outside" -msgstr "Инвертировать снаружи" - -#: src/modules/lyr_std/julia.cpp:348 -msgid "Color Outside" -msgstr "В цвете снаружи" - -#: src/modules/lyr_std/julia.cpp:352 -msgid "Color Cycle" -msgstr "" - -#: src/modules/lyr_std/julia.cpp:355 src/modules/lyr_std/mandelbrot.cpp:275 -msgid "Smooth Outside" -msgstr "" - -#: src/modules/lyr_std/julia.cpp:356 src/modules/lyr_std/mandelbrot.cpp:276 -msgid "Smooth the coloration outside the set" -msgstr "" - -#: src/modules/lyr_std/julia.cpp:359 src/modules/lyr_std/mandelbrot.cpp:220 -msgid "Break Set" -msgstr "" - -#: src/modules/lyr_std/julia.cpp:360 src/modules/lyr_std/mandelbrot.cpp:221 -msgid "Modify equation to achieve interesting results" -msgstr "" - -#: src/modules/lyr_std/mandelbrot.cpp:56 -msgid "Mandelbrot Set" -msgstr "Мандельброт" - -#: src/modules/lyr_std/mandelbrot.cpp:227 -#: src/modules/lyr_std/mandelbrot.cpp:231 -#: src/modules/lyr_std/mandelbrot.cpp:235 -#: src/modules/lyr_std/mandelbrot.cpp:239 -#: src/modules/lyr_std/mandelbrot.cpp:243 -#: src/modules/lyr_std/mandelbrot.cpp:247 -#: src/modules/lyr_std/mandelbrot.cpp:251 -msgid "Inside" -msgstr "Изнутри" - -#: src/modules/lyr_std/mandelbrot.cpp:242 -msgid "Gradient Inside" -msgstr "Градиент изнутри" - -#: src/modules/lyr_std/mandelbrot.cpp:246 -msgid "Offset Inside" -msgstr "Сместить внутри" - -#: src/modules/lyr_std/mandelbrot.cpp:250 -msgid "Loop Inside" -msgstr "" - -#: src/modules/lyr_std/mandelbrot.cpp:256 -#: src/modules/lyr_std/mandelbrot.cpp:260 -#: src/modules/lyr_std/mandelbrot.cpp:264 -#: src/modules/lyr_std/mandelbrot.cpp:268 -#: src/modules/lyr_std/mandelbrot.cpp:272 -#: src/modules/lyr_std/mandelbrot.cpp:277 -#: src/modules/lyr_std/mandelbrot.cpp:281 -#: src/modules/lyr_std/mandelbrot.cpp:285 -msgid "Outside" -msgstr "Снаружи" - -#: src/modules/lyr_std/mandelbrot.cpp:271 -msgid "Gradient outside" -msgstr "Градиент снаружи" - -#: src/modules/lyr_std/mandelbrot.cpp:280 -msgid "Offset Outside" -msgstr "Смещение снаружи" - -#: src/modules/lyr_std/mandelbrot.cpp:284 -msgid "Scale Outside" -msgstr "Масштаб снаружи" - -#: src/modules/lyr_std/rotate.cpp:55 -msgid "Rotate" -msgstr "Вращение" - -#: src/modules/lyr_std/rotate.cpp:56 src/modules/lyr_std/translate.cpp:55 -#: src/modules/lyr_std/zoom.cpp:52 -msgid "Transform" -msgstr "Преобразование" - -#: src/modules/lyr_std/rotate.cpp:113 src/modules/lyr_std/translate.cpp:98 -#: src/modules/mod_filter/radialblur.cpp:107 -#: src/synfig/layer_pastecanvas.cpp:128 -msgid "Point where you want the origin to be" -msgstr "" - -#: src/modules/lyr_std/rotate.cpp:117 -#: src/modules/lyr_std/sphere_distort.cpp:153 -#: src/modules/lyr_std/stretch.cpp:103 src/modules/lyr_std/zoom.cpp:96 -#: src/synfig/layer_composite.cpp:142 -#: src/synfig/valuenode_blinecalctangent.cpp:242 -#: src/synfig/valuenode_blinecalcvertex.cpp:201 -#: src/synfig/valuenode_blinecalcwidth.cpp:207 -#: src/synfig/valuenode_segcalctangent.cpp:161 -#: src/synfig/valuenode_segcalcvertex.cpp:159 -msgid "Amount" -msgstr "Величина" - -#: src/modules/lyr_std/rotate.cpp:118 -msgid "Amount of rotation" -msgstr "Угол вращения" - -#: src/modules/lyr_std/shade.cpp:66 -msgid "Shade" -msgstr "Тень" - -#: src/modules/lyr_std/shade.cpp:382 -msgid "Size of Shade" -msgstr "Размер тени" - -#: src/modules/lyr_std/sphere_distort.cpp:72 -#: src/modules/lyr_std/sphere_distort.cpp:165 -msgid "Spherize" -msgstr "Сферизация" - -#: src/modules/lyr_std/sphere_distort.cpp:143 -msgid "Position" -msgstr "Положение" - -#: src/modules/lyr_std/sphere_distort.cpp:147 -#: src/modules/lyr_std/twirl.cpp:113 src/modules/mod_geometry/circle.cpp:128 -#: src/modules/mod_gradient/radialgradient.cpp:118 -#: src/modules/mod_gradient/spiralgradient.cpp:117 -#: src/modules/mod_noise/valuenode_random.cpp:244 -#: src/synfig/valuenode_radialcomposite.cpp:197 -msgid "Radius" -msgstr "Радиус" - -#: src/modules/lyr_std/sphere_distort.cpp:158 src/modules/lyr_std/warp.cpp:400 -msgid "Clip" -msgstr "Обрезка" - -#: src/modules/lyr_std/sphere_distort.cpp:162 -msgid "Distort Type" -msgstr "Тип искажения" - -#: src/modules/lyr_std/sphere_distort.cpp:163 -msgid "The direction of the distortion" -msgstr "Направление искажения" - -#: src/modules/lyr_std/sphere_distort.cpp:166 -msgid "Vertical Bar" -msgstr "" - -#: src/modules/lyr_std/sphere_distort.cpp:167 -msgid "Horizontal Bar" -msgstr "" - -#: src/modules/lyr_std/stretch.cpp:58 -msgid "Stretch" -msgstr "Растяжение" - -#: src/modules/lyr_std/stretch.cpp:108 src/modules/lyr_std/twirl.cpp:109 -#: src/modules/lyr_std/zoom.cpp:101 -#: src/modules/mod_gradient/conicalgradient.cpp:110 -#: src/modules/mod_gradient/radialgradient.cpp:114 -#: src/modules/mod_gradient/spiralgradient.cpp:113 -msgid "Center" -msgstr "Центр" - -#: src/modules/lyr_std/supersample.cpp:55 -msgid "Super Sample" -msgstr "" - -#: src/modules/lyr_std/supersample.cpp:119 -msgid "Unable to create SurfaceTarget" -msgstr "" - -#: src/modules/lyr_std/supersample.cpp:215 -#: src/modules/mod_gradient/curvegradient.cpp:537 -#: src/synfig/valuenode_composite.cpp:289 -#: src/synfig/valuenode_realstring.cpp:184 -#: src/synfig/valuenode_repeat_gradient.cpp:185 -#: src/synfig/valuenode_stripes.cpp:176 src/tool/main.cpp:978 -msgid "Width" -msgstr "Ширина" - -#: src/modules/lyr_std/supersample.cpp:216 -msgid "Width of sample area (In pixels)" -msgstr "" - -#: src/modules/lyr_std/supersample.cpp:219 src/tool/main.cpp:984 -msgid "Height" -msgstr "Высота" - -#: src/modules/lyr_std/supersample.cpp:220 -msgid "Height of sample area (In pixels)" -msgstr "" - -#: src/modules/lyr_std/supersample.cpp:223 -msgid "Use Parametric" -msgstr "" - -#: src/modules/lyr_std/supersample.cpp:224 -msgid "Use the Parametric Renderer" -msgstr "" - -#: src/modules/lyr_std/supersample.cpp:227 -msgid "Be Alpha Safe" -msgstr "" - -#: src/modules/lyr_std/timeloop.cpp:57 src/synfig/valuenode.cpp:162 -#: src/synfig/valuenode_timeloop.cpp:188 -msgid "Time Loop" -msgstr "Временная петля" - -#: src/modules/lyr_std/timeloop.cpp:120 src/synfig/valuenode_timeloop.cpp:124 -msgid "Link Time" -msgstr "Время связывания" - -#: src/modules/lyr_std/timeloop.cpp:124 src/synfig/valuenode_timeloop.cpp:125 -msgid "Local Time" -msgstr "Локальное время" - -#: src/modules/lyr_std/timeloop.cpp:128 src/synfig/valuenode_step.cpp:214 -#: src/synfig/valuenode_timeloop.cpp:126 -msgid "Duration" -msgstr "Длительность" - -#: src/modules/lyr_std/timeloop.cpp:132 -msgid "Only For Positive Duration" -msgstr "Только для положительной длительности" - -#: src/modules/lyr_std/timeloop.cpp:136 -msgid "Symmetrical" -msgstr "Симметрично" - -#: src/modules/lyr_std/translate.cpp:54 -msgid "Translate" -msgstr "Перемещение" - -#: src/modules/lyr_std/twirl.cpp:55 -msgid "Twirl" -msgstr "Вихрь" - -#: src/modules/lyr_std/twirl.cpp:114 -#: src/modules/mod_gradient/radialgradient.cpp:119 -#: src/modules/mod_gradient/spiralgradient.cpp:118 -msgid "This is the radius of the circle" -msgstr "Радиус окружности" - -#: src/modules/lyr_std/twirl.cpp:120 -msgid "Rotations" -msgstr "Вращение" - -#: src/modules/lyr_std/warp.cpp:55 -msgid "Warp" -msgstr "Искажение" - -#: src/modules/lyr_std/warp.cpp:371 -msgid "Source TL" -msgstr "" - -#: src/modules/lyr_std/warp.cpp:376 -msgid "Source BR" -msgstr "" - -#: src/modules/lyr_std/warp.cpp:380 -msgid "Dest TL" -msgstr "" - -#: src/modules/lyr_std/warp.cpp:385 -msgid "Dest TR" -msgstr "" - -#: src/modules/lyr_std/warp.cpp:390 -msgid "Dest BR" -msgstr "" - -#: src/modules/lyr_std/warp.cpp:395 -msgid "Dest BL" -msgstr "" - -#: src/modules/lyr_std/warp.cpp:404 -msgid "Horizon" -msgstr "Горизонт" - -#: src/modules/lyr_std/xorpattern.cpp:54 -msgid "XOR Pattern" -msgstr "Узор Исключающего ИЛИ" - -#: src/modules/lyr_std/zoom.cpp:51 src/synfig/layer_pastecanvas.cpp:135 -msgid "Zoom" -msgstr "Увеличение" - -#: src/modules/lyr_std/zoom.cpp:97 -msgid "Amount to zoom in" -msgstr "" - -#: src/modules/lyr_std/zoom.cpp:102 -msgid "Point to zoom in to" -msgstr "Точка, в которую увеличить отображение" - -#: src/modules/mod_bmp/mptr_bmp.cpp:133 src/modules/mod_bmp/mptr_bmp.cpp:134 -#: src/modules/mod_ppm/mptr_ppm.cpp:78 -#, c-format -msgid "Unable to open %s" -msgstr "" - -#: src/modules/mod_bmp/mptr_bmp.cpp:145 src/modules/mod_bmp/mptr_bmp.cpp:146 -#, c-format -msgid "%s is not in BMP format" -msgstr "" - -#: src/modules/mod_bmp/mptr_bmp.cpp:152 -#, c-format -msgid "Failure while reading BITMAPFILEHEADER from %s" -msgstr "" - -#: src/modules/mod_bmp/mptr_bmp.cpp:160 -#, c-format -msgid "Failure while reading BITMAPINFOHEADER from %s" -msgstr "" - -#: src/modules/mod_bmp/mptr_bmp.cpp:170 -#, c-format -msgid "Bad BITMAPFILEHEADER in %s. (bfOffsetBits=%d, should be %d)" -msgstr "" - -#: src/modules/mod_bmp/mptr_bmp.cpp:178 -#, c-format -msgid "Bad BITMAPINFOHEADER in %s. (biSize=%d, should be 40)" -msgstr "" - -#: src/modules/mod_bmp/mptr_bmp.cpp:196 src/modules/mod_bmp/mptr_bmp.cpp:197 -msgid "Reading compressed bitmaps is not supported" -msgstr "" - -#: src/modules/mod_bmp/mptr_bmp.cpp:203 src/modules/mod_bmp/mptr_bmp.cpp:204 -#, c-format -msgid "Unsupported bit depth (bit_count=%d, should be 24 or 32)" -msgstr "" - -#: src/modules/mod_bmp/trgt_bmp.cpp:185 -msgid " (animated)" -msgstr "" - -#: src/modules/mod_bmp/trgt_bmp.cpp:195 src/modules/mod_bmp/trgt_bmp.cpp:196 -msgid "Unable to open file" -msgstr "" - -#: src/modules/mod_bmp/trgt_bmp.cpp:226 src/modules/mod_bmp/trgt_bmp.cpp:227 -msgid "Unable to write file header to file" -msgstr "" - -#: src/modules/mod_bmp/trgt_bmp.cpp:233 src/modules/mod_bmp/trgt_bmp.cpp:234 -msgid "Unable to write info header" -msgstr "" - -#: src/modules/mod_dv/trgt_dv.cpp:166 src/modules/mod_dv/trgt_dv.cpp:175 -#: src/modules/mod_dv/trgt_dv.cpp:182 src/modules/mod_dv/trgt_dv.cpp:192 -#: src/modules/mod_dv/trgt_dv.cpp:200 src/modules/mod_dv/trgt_dv.cpp:205 -#: src/modules/mod_dv/trgt_dv.cpp:209 src/modules/mod_dv/trgt_dv.cpp:218 -#: src/modules/mod_dv/trgt_dv.cpp:227 -msgid "Unable to open pipe to encodedv" -msgstr "" - -#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:172 -#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:179 -#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:189 -#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:199 -#: src/modules/mod_ffmpeg/trgt_ffmpeg.cpp:217 -msgid "Unable to open pipe to ffmpeg" -msgstr "" - -#: src/modules/mod_filter/blur.cpp:67 -msgid "Blur" -msgstr "Размывание" - -#: src/modules/mod_filter/blur.cpp:68 src/modules/mod_filter/radialblur.cpp:56 -#: src/synfig/layer_motionblur.cpp:57 -msgid "Blurs" -msgstr "Размывание" - -#: src/modules/mod_filter/blur.cpp:243 -msgid "Size of Blur" -msgstr "" - -#: src/modules/mod_filter/colorcorrect.cpp:54 -msgid "Color Correct" -msgstr "Цветокоррекция" - -#: src/modules/mod_filter/colorcorrect.cpp:203 -msgid "Hue Adjust" -msgstr "Коррекция тона" - -#: src/modules/mod_filter/colorcorrect.cpp:207 -msgid "Brightness" -msgstr "Яркость" - -#: src/modules/mod_filter/colorcorrect.cpp:211 -msgid "Contrast" -msgstr "Контраст" - -#: src/modules/mod_filter/colorcorrect.cpp:215 -msgid "Exposure Adjust" -msgstr "Коррекция экспозиции" - -#: src/modules/mod_filter/colorcorrect.cpp:219 src/synfig/layer_bitmap.cpp:141 -msgid "Gamma Adjustment" -msgstr "Коррекция гаммы" - -#: src/modules/mod_filter/halftone2.cpp:57 -msgid "Halftone 2" -msgstr "Полутон 2" - -#: src/modules/mod_filter/halftone2.cpp:147 -msgid "Mask Origin" -msgstr "" - -#: src/modules/mod_filter/halftone2.cpp:151 -msgid "Mask Angle" -msgstr "Угол маски" - -#: src/modules/mod_filter/halftone2.cpp:155 -#: src/modules/mod_filter/halftone3.cpp:305 -msgid "Mask Size" -msgstr "Размер маски" - -#: src/modules/mod_filter/halftone2.cpp:160 -msgid "Light Color" -msgstr "Цвет света" - -#: src/modules/mod_filter/halftone2.cpp:163 -msgid "Dark Color" -msgstr "Цвет тени" - -#: src/modules/mod_filter/halftone2.cpp:168 -#: src/modules/mod_filter/halftone3.cpp:310 -#: src/modules/mod_gradient/conicalgradient.cpp:119 -msgid "Symmetric" -msgstr "" - -#: src/modules/mod_filter/halftone2.cpp:169 -#: src/modules/mod_filter/halftone3.cpp:311 -msgid "Light On Dark" -msgstr "" - -#: src/modules/mod_filter/halftone2.cpp:171 -#: src/modules/mod_filter/halftone3.cpp:313 -msgid "Diamond" -msgstr "" - -#: src/modules/mod_filter/halftone2.cpp:172 -#: src/modules/mod_filter/halftone3.cpp:314 -msgid "Stripe" -msgstr "" - -#: src/modules/mod_filter/halftone3.cpp:57 -msgid "Halftone 3" -msgstr "Полутон 3" - -#: src/modules/mod_filter/halftone3.cpp:308 -msgid " Type" -msgstr "Тип" - -#: src/modules/mod_filter/halftone3.cpp:317 -msgid "Subtractive Flag" -msgstr "" - -#: src/modules/mod_filter/halftone3.cpp:325 -msgid " Color" -msgstr "Цвет" - -#: src/modules/mod_filter/halftone3.cpp:329 -msgid " Mask Origin" -msgstr "" - -#: src/modules/mod_filter/halftone3.cpp:333 -msgid " Mask Angle" -msgstr "Угол маски" - -#: src/modules/mod_filter/lumakey.cpp:57 -msgid "Luma Key" -msgstr "" - -#: src/modules/mod_filter/radialblur.cpp:55 -msgid "Radial Blur" -msgstr "Радиальное размывание" - -#: src/modules/mod_filter/radialblur.cpp:112 -msgid "Size of blur" -msgstr "" - -#: src/modules/mod_filter/radialblur.cpp:117 -msgid "Fade Out" -msgstr "Спадание" - -#: src/modules/mod_geometry/checkerboard.cpp:57 -msgid "Checkerboard" -msgstr "Шахматная доска" - -#: src/modules/mod_geometry/checkerboard.cpp:58 -#: src/modules/mod_geometry/circle.cpp:56 -#: src/modules/mod_geometry/outline.cpp:71 -#: src/modules/mod_geometry/rectangle.cpp:59 -#: src/modules/mod_geometry/region.cpp:64 src/modules/mod_geometry/star.cpp:63 -#: src/synfig/layer_polygon.cpp:61 src/synfig/layer_solidcolor.cpp:56 -msgid "Geometry" -msgstr "Геометрия" - -#: src/modules/mod_geometry/checkerboard.cpp:122 -msgid "Color of checkers" -msgstr "" - -#: src/modules/mod_geometry/checkerboard.cpp:129 -msgid "Size of checkers" -msgstr "" - -#: src/modules/mod_geometry/circle.cpp:55 -msgid "Circle" -msgstr "Окружность" - -#: src/modules/mod_geometry/circle.cpp:133 src/synfig/layer_shape.cpp:1205 -msgid "Feather" -msgstr "Растушёвка" - -#: src/modules/mod_geometry/circle.cpp:141 -msgid "Invert the circle" -msgstr "Инвертировать окружность" - -#: src/modules/mod_geometry/circle.cpp:145 -msgid "Falloff" -msgstr "Спадание" - -#: src/modules/mod_geometry/circle.cpp:146 -msgid "Determines the falloff function for the feather" -msgstr "" - -#: src/modules/mod_geometry/circle.cpp:148 -#: src/modules/mod_noise/distort.cpp:211 src/modules/mod_noise/noise.cpp:263 -#: src/synfig/layer_bitmap.cpp:135 src/synfig/valuenode.cpp:135 -#: src/synfig/valuenode_linear.cpp:142 -msgid "Linear" -msgstr "Линейная" - -#: src/modules/mod_geometry/circle.cpp:149 -msgid "Squared" -msgstr "" - -#: src/modules/mod_geometry/circle.cpp:150 -msgid "Square Root" -msgstr "" - -#: src/modules/mod_geometry/circle.cpp:151 -msgid "Sigmond" -msgstr "" - -#: src/modules/mod_geometry/circle.cpp:152 -#: src/modules/mod_noise/distort.cpp:212 src/modules/mod_noise/noise.cpp:264 -#: src/synfig/layer_bitmap.cpp:136 -msgid "Cosine" -msgstr "" - -#: src/modules/mod_geometry/outline.cpp:70 -msgid "Outline" -msgstr "Абрис" - -#: src/modules/mod_geometry/outline.cpp:178 -msgid "No vertices in outline " -msgstr "Нет вершин в абрисе" - -#: src/modules/mod_geometry/outline.cpp:807 -#: src/modules/mod_geometry/region.cpp:232 -#: src/modules/mod_gradient/curvegradient.cpp:540 -#: src/modules/mod_particle/plant.cpp:383 -msgid "Vertices" -msgstr "Вершины" - -#: src/modules/mod_geometry/outline.cpp:810 -#: src/modules/mod_gradient/curvegradient.cpp:543 -#: src/modules/mod_particle/plant.cpp:384 -msgid "A list of BLine Points" -msgstr "Список узлов кривой Безье" - -#: src/modules/mod_geometry/outline.cpp:824 -msgid "Outline Width" -msgstr "Толщина абриса" - -#: src/modules/mod_geometry/outline.cpp:829 -msgid "Expand" -msgstr "Расширение" - -#: src/modules/mod_geometry/outline.cpp:833 -msgid "Sharp Cusps" -msgstr "Острые пики" - -#: src/modules/mod_geometry/outline.cpp:834 -msgid "Determines cusp type" -msgstr "Определяет тип пиков" - -#: src/modules/mod_geometry/outline.cpp:838 -msgid "Rounded Begin" -msgstr "Закругленное начало" - -#: src/modules/mod_geometry/outline.cpp:839 -#: src/modules/mod_geometry/outline.cpp:844 -msgid "Round off the tip" -msgstr "" - -#: src/modules/mod_geometry/outline.cpp:843 -msgid "Rounded End" -msgstr "Закругленное окончание" - -#: src/modules/mod_geometry/outline.cpp:847 -msgid "Loopyness" -msgstr "Петлистость" - -#: src/modules/mod_geometry/outline.cpp:850 -msgid "Homogeneous" -msgstr "Однородность" - -#: src/modules/mod_geometry/rectangle.cpp:58 -msgid "Rectangle" -msgstr "Прямоугольник" - -#: src/modules/mod_geometry/rectangle.cpp:126 -#: src/modules/mod_gradient/lineargradient.cpp:184 -msgid "Point 1" -msgstr "Точка 1" - -#: src/modules/mod_geometry/rectangle.cpp:131 -#: src/modules/mod_gradient/lineargradient.cpp:188 -msgid "Point 2" -msgstr "Точка 2" - -#: src/modules/mod_geometry/rectangle.cpp:136 -msgid "Expand amount" -msgstr "Величина расширения" - -#: src/modules/mod_geometry/rectangle.cpp:140 -msgid "Invert the rectangle" -msgstr "Инвертировать прямоугольник" - -#: src/modules/mod_geometry/region.cpp:63 -msgid "Region" -msgstr "Область" - -#: src/modules/mod_geometry/star.cpp:62 -msgid "Star" -msgstr "Звезда" - -#: src/modules/mod_geometry/star.cpp:174 -msgid "Outer Radius" -msgstr "Внешний радиус" - -#: src/modules/mod_geometry/star.cpp:175 -msgid "The radius of the outer points in the star" -msgstr "Радиус внешних точек звезды" - -#: src/modules/mod_geometry/star.cpp:181 -msgid "Inner Radius" -msgstr "Внутренний радиус" - -#: src/modules/mod_geometry/star.cpp:182 -msgid "The radius of the inner points in the star" -msgstr "Радиус внутренних точек звезды" - -#: src/modules/mod_geometry/star.cpp:188 -#: src/modules/mod_gradient/conicalgradient.cpp:114 -#: src/modules/mod_gradient/spiralgradient.cpp:124 -#: src/synfig/valuenode_cos.cpp:165 src/synfig/valuenode_sine.cpp:165 -msgid "Angle" -msgstr "Угол" - -#: src/modules/mod_geometry/star.cpp:189 -msgid "The orientation of the star" -msgstr "Ориентация звезды" - -#: src/modules/mod_geometry/star.cpp:194 src/synfig/distance.cpp:248 -msgid "Points" -msgstr "Точек" - -#: src/modules/mod_geometry/star.cpp:195 -msgid "The number of points in the star" -msgstr "Количество лучей звезды" - -#: src/modules/mod_geometry/star.cpp:199 -msgid "Regular Polygon" -msgstr "Многоугольник" - -#: src/modules/mod_geometry/star.cpp:200 -msgid "Whether to draw a star or a regular polygon" -msgstr "Рисовать ли многоугольник вместо звезды" - -#: src/modules/mod_gif/trgt_gif.cpp:107 -#, c-format -msgid "Unable to open \"%s\" for write access!" -msgstr "" - -#: src/modules/mod_gif/trgt_gif.cpp:195 -msgid "Description not set!" -msgstr "" - -#: src/modules/mod_gradient/conicalgradient.cpp:56 -msgid "Conical Gradient" -msgstr "Конический градиент" - -#: src/modules/mod_gradient/conicalgradient.cpp:57 -#: src/modules/mod_gradient/curvegradient.cpp:60 -#: src/modules/mod_gradient/lineargradient.cpp:54 -#: src/modules/mod_gradient/radialgradient.cpp:57 -#: src/modules/mod_gradient/spiralgradient.cpp:56 -#: src/modules/mod_noise/noise.cpp:57 -msgid "Gradients" -msgstr "Градиенты" - -#: src/modules/mod_gradient/conicalgradient.cpp:106 -#: src/modules/mod_gradient/curvegradient.cpp:546 -#: src/modules/mod_gradient/lineargradient.cpp:191 -#: src/modules/mod_gradient/radialgradient.cpp:110 -#: src/modules/mod_gradient/spiralgradient.cpp:109 -#: src/modules/mod_noise/noise.cpp:250 src/modules/mod_particle/plant.cpp:394 -#: src/synfig/valuenode_gradientrotate.cpp:146 -#: src/synfig/valuenode_repeat_gradient.cpp:183 -msgid "Gradient" -msgstr "Градиент" - -#: src/modules/mod_gradient/curvegradient.cpp:59 -msgid "Curve Gradient" -msgstr "Искривленный градиент" - -#: src/modules/mod_gradient/curvegradient.cpp:548 -#: src/modules/mod_gradient/lineargradient.cpp:194 -#: src/modules/mod_gradient/radialgradient.cpp:125 -#: src/synfig/valuenode_blinecalctangent.cpp:241 -#: src/synfig/valuenode_blinecalcvertex.cpp:200 -#: src/synfig/valuenode_blinecalcwidth.cpp:206 -msgid "Loop" -msgstr "Повтор" - -#: src/modules/mod_gradient/curvegradient.cpp:550 -#: src/modules/mod_gradient/lineargradient.cpp:197 -#: src/modules/mod_gradient/radialgradient.cpp:129 -msgid "ZigZag" -msgstr "Зигзаг" - -#: src/modules/mod_gradient/curvegradient.cpp:552 -msgid "Perpendicular" -msgstr "" - -#: src/modules/mod_gradient/curvegradient.cpp:554 -msgid "Fast" -msgstr "" - -#: src/modules/mod_gradient/lineargradient.cpp:53 -msgid "Linear Gradient" -msgstr "Линейный градиент" - -#: src/modules/mod_gradient/radialgradient.cpp:56 -msgid "Radial Gradient" -msgstr "Радиальный градиент" - -#: src/modules/mod_gradient/spiralgradient.cpp:55 -msgid "Spiral Gradient" -msgstr "Спиральный градиент" - -#: src/modules/mod_gradient/spiralgradient.cpp:129 -msgid "Clockwise" -msgstr "По часовой стрелке" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:103 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:104 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:216 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:217 -msgid "No file to load" -msgstr "" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:157 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:158 -#: src/synfig/listimporter.cpp:182 src/synfig/listimporter.cpp:183 -msgid "Unable to open " -msgstr "" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:164 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:165 -#: src/synfig/listimporter.cpp:189 src/synfig/listimporter.cpp:190 -msgid "Unable to get frame from " -msgstr "" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:171 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:172 -msgid "Bad surface from " -msgstr "" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:227 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:228 -msgid "Unable to open pipe to imagemagick" -msgstr "" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:239 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:240 -msgid "Reached end of stream without finding PPM header" -msgstr "" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:248 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:249 -msgid "stream not in PPM format" -msgstr "" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:260 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:261 -msgid "Premature end of file (after header)" -msgstr "" - -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:273 -#: src/modules/mod_imagemagick/mptr_imagemagick.cpp:274 -msgid "Premature end of file" -msgstr "" - -#: src/modules/mod_imagemagick/trgt_imagemagick.cpp:157 -msgid "Unable to open pipe to imagemagick's convert utility" -msgstr "" - -#: src/modules/mod_noise/distort.cpp:56 -msgid "Noise Distort" -msgstr "Искажение шумом" - -#: src/modules/mod_noise/distort.cpp:197 -msgid "Displacement" -msgstr "Смещение" - -#: src/modules/mod_noise/distort.cpp:204 src/modules/mod_noise/noise.cpp:253 -msgid "Random Seed" -msgstr "Случайное зерно" - -#: src/modules/mod_noise/distort.cpp:207 src/modules/mod_noise/noise.cpp:259 -#: src/modules/mod_noise/valuenode_random.cpp:247 -#: src/synfig/layer_bitmap.cpp:131 -msgid "Interpolation" -msgstr "Интерполяция" - -#: src/modules/mod_noise/distort.cpp:208 src/modules/mod_noise/noise.cpp:260 -#: src/synfig/layer_bitmap.cpp:132 -msgid "What type of interpolation to use" -msgstr "Какой тип интерполяции использовать" - -#: src/modules/mod_noise/distort.cpp:210 src/modules/mod_noise/noise.cpp:262 -#: src/synfig/layer_bitmap.cpp:134 -msgid "Nearest Neighbor" -msgstr "Ближайший сосед" - -#: src/modules/mod_noise/distort.cpp:213 src/modules/mod_noise/noise.cpp:265 -msgid "Spline" -msgstr "Сплайн" - -#: src/modules/mod_noise/distort.cpp:214 src/modules/mod_noise/noise.cpp:266 -#: src/synfig/layer_bitmap.cpp:137 -msgid "Cubic" -msgstr "Кубическая" - -#: src/modules/mod_noise/distort.cpp:217 src/modules/mod_noise/noise.cpp:269 -msgid "Detail" -msgstr "Детализация" - -#: src/modules/mod_noise/distort.cpp:220 src/modules/mod_noise/noise.cpp:272 -#: src/modules/mod_noise/valuenode_random.cpp:246 -msgid "Animation Speed" -msgstr "Скорость анимации" - -#: src/modules/mod_noise/distort.cpp:223 src/modules/mod_noise/noise.cpp:275 -msgid "Turbulent" -msgstr "Турбулентность" - -#: src/modules/mod_noise/main.cpp:66 -#: src/modules/mod_noise/valuenode_random.cpp:179 -msgid "Random" -msgstr "" - -#: src/modules/mod_noise/noise.cpp:56 -msgid "Noise Gradient" -msgstr "Градиентный шум" - -#: src/modules/mod_noise/noise.cpp:278 -msgid "Do Alpha" -msgstr "С альфа-каналом" - -#: src/modules/mod_noise/noise.cpp:281 -msgid "Super Sampling" -msgstr "" - -#: src/modules/mod_noise/valuenode_random.cpp:243 -#: src/synfig/valuenode_range.cpp:193 src/synfig/valuenode_reciprocal.cpp:124 -#: src/synfig/valuenode_reference.cpp:114 src/synfig/valuenode_scale.cpp:179 -#: src/synfig/valuenode_step.cpp:213 src/synfig/valuenode_timeloop.cpp:123 -msgid "Link" -msgstr "" - -#: src/modules/mod_noise/valuenode_random.cpp:245 -#: src/modules/mod_particle/plant.cpp:441 -msgid "Seed" -msgstr "" - -#: src/modules/mod_particle/plant.cpp:68 -msgid "Plant" -msgstr "Растение" - -#: src/modules/mod_particle/plant.cpp:395 -msgid "Gradient to be used for coloring the plant" -msgstr "" - -#: src/modules/mod_particle/plant.cpp:399 -msgid "Split Angle" -msgstr "Угол разделения" - -#: src/modules/mod_particle/plant.cpp:400 -msgid "Angle by which each split deviates from its parent" -msgstr "" - -#: src/modules/mod_particle/plant.cpp:404 -msgid "Gravity" -msgstr "Сила тяжести" - -#: src/modules/mod_particle/plant.cpp:405 -msgid "Direction in which the shoots tend to face" -msgstr "Направление, в котором тянутся побеги" - -#: src/modules/mod_particle/plant.cpp:410 -msgid "Tangential Velocity" -msgstr "Скорость по касательной" - -#: src/modules/mod_particle/plant.cpp:411 -msgid "Amount to which shoots tend to grow along the tangent to the BLine" -msgstr "Число, до которого побеги растут по касательной к кривой Безье" - -#: src/modules/mod_particle/plant.cpp:415 -msgid "Perpendicular Velocity" -msgstr "Скорость по перпендикуляру" - -#: src/modules/mod_particle/plant.cpp:416 -msgid "" -"Amount to which shoots tend to grow perpendicular to the tangent to the BLine" -msgstr "Число, до которого побеги растут перпендикулярно кривой Безье" - -#: src/modules/mod_particle/plant.cpp:420 -msgid "Stem Size" -msgstr "" - -#: src/modules/mod_particle/plant.cpp:421 -msgid "Size of the stem" -msgstr "" - -#: src/modules/mod_particle/plant.cpp:426 -msgid "Size As Alpha" -msgstr "" - -#: src/modules/mod_particle/plant.cpp:427 -msgid "" -"If enabled, the alpha channel from the gradient is multiplied by the stem " -"size, and an alpha of 1.0 is used when rendering" -msgstr "" - -#: src/modules/mod_particle/plant.cpp:431 -msgid "Reverse" -msgstr "" - -#: src/modules/mod_particle/plant.cpp:432 -msgid "If enabled, render the plant in the opposite direction" -msgstr "" - -#: src/modules/mod_particle/plant.cpp:436 src/synfig/valuenode.cpp:166 -#: src/synfig/valuenode_duplicate.cpp:123 src/synfig/valuenode_step.cpp:138 -msgid "Step" -msgstr "Шаг" - -#: src/modules/mod_particle/plant.cpp:437 -msgid "Measure of the distance between points when rendering" -msgstr "Единица измерения расстояния между точками при рендеринге" - -#: src/modules/mod_particle/plant.cpp:442 -msgid "Used to seed the pseudo-random number generator" -msgstr "" - -#: src/modules/mod_particle/plant.cpp:446 -msgid "Splits" -msgstr "Делений" - -#: src/modules/mod_particle/plant.cpp:447 -msgid "Maximum number of times that each sprout can sprout recursively" -msgstr "Максимальное число раз рекурсивного создания побегов" - -#: src/modules/mod_particle/plant.cpp:451 -msgid "Sprouts" -msgstr "Побегов" - -#: src/modules/mod_particle/plant.cpp:452 -msgid "Number of places that growth occurs on each bline section" -msgstr "" - -#: src/modules/mod_particle/plant.cpp:456 -msgid "Random Factor" -msgstr "Фактор случайности" - -#: src/modules/mod_particle/plant.cpp:457 -msgid "" -"Used to scale down all random effects. Set to zero to disable randomness" -msgstr "" - -#: src/modules/mod_particle/plant.cpp:461 -msgid "Drag" -msgstr "" - -#: src/modules/mod_particle/plant.cpp:462 -msgid "Drag slows the growth" -msgstr "" - -#: src/modules/mod_particle/plant.cpp:466 -msgid "Use Width" -msgstr "Использовать ширину" - -#: src/modules/mod_particle/plant.cpp:467 -msgid "Scale the velocity by the bline's width" -msgstr "" - -#: src/modules/mod_ppm/mptr_ppm.cpp:86 -#, c-format -msgid "%s was not in PPM format" -msgstr "%s был не в формате PPM" - -#: src/synfig/distance.cpp:246 -msgid "Units" -msgstr "Единицы измерения" - -#: src/synfig/distance.cpp:247 -msgid "Pixels" -msgstr "Пикселы" - -#: src/synfig/distance.cpp:249 -msgid "Inches" -msgstr "Дюймы" - -#: src/synfig/distance.cpp:250 -msgid "Meters" -msgstr "Метры" - -#: src/synfig/distance.cpp:251 -msgid "Millimeters" -msgstr "Миллиметры" - -#: src/synfig/distance.cpp:252 -msgid "Centimeters" -msgstr "Сантиметры" - -#: src/synfig/importer.cpp:89 -msgid "Importer::open(): Cannot open empty filename" -msgstr "" - -#: src/synfig/importer.cpp:103 -msgid "Importer::open(): Couldn't find extension" -msgstr "" - -#: src/synfig/importer.cpp:114 -msgid "Importer::open(): Unknown file type -- " -msgstr "" - -#: src/synfig/layer.cpp:500 src/synfig/layer_composite.cpp:114 -msgid "Unable to create surface target" -msgstr "" - -#: src/synfig/layer.cpp:538 -msgid "Z Depth" -msgstr "Глубина на оси Z" - -#: src/synfig/layer_bitmap.cpp:121 -msgid "Top-Left" -msgstr "Левый верхний угол" - -#: src/synfig/layer_bitmap.cpp:122 -msgid "Upper left-hand Corner of image" -msgstr "Левый верхний угол изображения" - -#: src/synfig/layer_bitmap.cpp:126 -msgid "Bottom-Right" -msgstr "Правый нижний угол" - -#: src/synfig/layer_bitmap.cpp:127 -msgid "Lower right-hand Corner of image" -msgstr "Правый нижний угол изображения" - -#: src/synfig/layer_composite.cpp:145 src/synfig/paramdesc.cpp:62 -msgid "Blend Method" -msgstr "Режим наложения" - -#: src/synfig/layer_duplicate.cpp:56 src/synfig/valuenode.cpp:164 -#: src/synfig/valuenode_duplicate.cpp:206 -msgid "Duplicate" -msgstr "Дубликат" - -#: src/synfig/layer_duplicate.cpp:132 -msgid "Index" -msgstr "" - -#: src/synfig/layer_duplicate.cpp:133 -msgid "Copy Index" -msgstr "" - -#: src/synfig/layer_mime.cpp:86 -msgid "[MIME]" -msgstr "" - -#: src/synfig/layer_motionblur.cpp:56 -msgid "Motion Blur" -msgstr "Размывание движением" - -#: src/synfig/layer_motionblur.cpp:122 -msgid "Aperture" -msgstr "Апертура" - -#: src/synfig/layer_motionblur.cpp:123 -msgid "Shutter Time" -msgstr "Выдержка" - -#: src/synfig/layer_pastecanvas.cpp:77 -msgid "Paste Canvas" -msgstr "Вставка холста" - -#: src/synfig/layer_pastecanvas.cpp:114 -msgid "Pasted Canvas" -msgstr "Вставленный холст" - -#: src/synfig/layer_pastecanvas.cpp:115 -msgid "Inline Canvas" -msgstr "" - -#: src/synfig/layer_pastecanvas.cpp:131 -msgid "Canvas" -msgstr "Холст" - -#: src/synfig/layer_pastecanvas.cpp:132 -msgid "Canvas to paste" -msgstr "Вставляемый холст" - -#: src/synfig/layer_pastecanvas.cpp:136 -msgid "Size of canvas" -msgstr "Размерхолста" - -#: src/synfig/layer_pastecanvas.cpp:144 -msgid "Children Lock" -msgstr "Запереть потомков" - -#: src/synfig/layer_pastecanvas.cpp:154 -msgid "Current Time" -msgstr "Текущее время" - -#: src/synfig/layer_polygon.cpp:60 -msgid "Polygon" -msgstr "Многоугольник" - -#: src/synfig/layer_polygon.cpp:172 -msgid "Vector List" -msgstr "Список вершин" - -#: src/synfig/layer_shape.cpp:63 -msgid "Shape" -msgstr "Фигура" - -#: src/synfig/layer_shape.cpp:64 -msgid "Internal" -msgstr "" - -#: src/synfig/layer_shape.cpp:1193 -msgid "Layer_Shape Color" -msgstr "" - -#: src/synfig/layer_shape.cpp:1202 -msgid "Antialiasing" -msgstr "Сглаживание" - -#: src/synfig/layer_shape.cpp:1209 -msgid "Type of Feather" -msgstr "Тип растушевки" - -#: src/synfig/layer_shape.cpp:1210 -msgid "Type of feathering to use" -msgstr "Используемый тип растушевки" - -#: src/synfig/layer_shape.cpp:1219 -msgid "Winding Style" -msgstr "Стиль изгибов" - -#: src/synfig/layer_shape.cpp:1220 -msgid "Winding style to use" -msgstr "Используемый стиль изгибов" - -#: src/synfig/layer_shape.cpp:1222 -msgid "Non Zero" -msgstr "Ненулевые" - -#: src/synfig/layer_shape.cpp:1223 -msgid "Even/Odd" -msgstr "Чёт/Нечет" - -#: src/synfig/layer_solidcolor.cpp:55 -msgid "Solid Color" -msgstr "Сплошная заливка" - -#: src/synfig/listimporter.cpp:159 src/synfig/listimporter.cpp:160 -msgid "No images in list" -msgstr "Нет изображений в списке" - -#: src/synfig/loadcanvas.cpp:137 -#, c-format -msgid "cannot load '%s' recursively" -msgstr "" - -#: src/synfig/loadcanvas.cpp:180 -#, c-format -msgid "Unexpected element <%s>, Expected <%s>" -msgstr "" - -#: src/synfig/loadcanvas.cpp:186 -#, c-format -msgid "Unexpected element <%s>" -msgstr "" - -#: src/synfig/loadcanvas.cpp:200 -msgid "Too many warnings" -msgstr "" - -#: src/synfig/loadcanvas.cpp:231 -#, c-format -msgid "<%s> is missing \"%s\" attribute" -msgstr "" - -#: src/synfig/loadcanvas.cpp:256 src/synfig/loadcanvas.cpp:275 -#: src/synfig/loadcanvas.cpp:294 src/synfig/loadcanvas.cpp:458 -#: src/synfig/loadcanvas.cpp:813 -#, c-format -msgid "<%s> should not contain anything" -msgstr "" - -#: src/synfig/loadcanvas.cpp:260 src/synfig/loadcanvas.cpp:279 -#: src/synfig/loadcanvas.cpp:298 src/synfig/loadcanvas.cpp:462 -#: src/synfig/loadcanvas.cpp:817 -#, c-format -msgid "<%s> is missing \"value\" attribute" -msgstr "" - -#: src/synfig/loadcanvas.cpp:473 -#, c-format -msgid "Bad value \"%s\" in <%s>" -msgstr "" - -#: src/synfig/loadcanvas.cpp:497 -#, c-format -msgid "<%s> is missing \"pos\" attribute" -msgstr "" - -#: src/synfig/loadcanvas.cpp:904 -#, c-format -msgid "Unable to create with type \"%s\"" -msgstr "" - -#: src/synfig/loadcanvas.cpp:921 -msgid " is missing attribute \"time\"" -msgstr "" - -#: src/synfig/loadcanvas.cpp:934 -msgid "" -"Found \"use\" attribute for , but it wasn't empty. Ignoring " -"contents..." -msgstr "" - -#: src/synfig/loadcanvas.cpp:954 src/synfig/loadcanvas.cpp:966 -#, c-format -msgid "<%s> is missing its data" -msgstr "" - -#: src/synfig/loadcanvas.cpp:983 -msgid "Bad data for " -msgstr "" - -#: src/synfig/loadcanvas.cpp:998 -#, c-format -msgid "Unexpected element <%s> after data, ignoring..." -msgstr "" - -#: src/synfig/loadcanvas.cpp:1040 src/synfig/loadcanvas.cpp:1057 -#, c-format -msgid "\"%s\" not a valid value for attribute \"%s\" in <%s>" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1118 -#, c-format -msgid "Missing attribute \"type\" in <%s>" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1126 -#, c-format -msgid "Bad type in <%s>" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1135 -#, c-format -msgid "Error creating ValueNode <%s> with type '%s'. Refer to '%s'" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1144 -#, c-format -msgid "<%s> did not accept type '%s'" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1170 src/synfig/loadcanvas.cpp:1238 -#, c-format -msgid "'%s' was already defined in <%s>" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1180 -#, c-format -msgid "'%s' attribute in <%s> references unknown ID '%s'" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1189 -#, c-format -msgid "Unable to set link '\"%s\" to ValueNode \"%s\" (link #%d in \"%s\")" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1213 -#, c-format -msgid "Unknown Exception thrown when referencing ValueNode \"%s\"" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1253 -#, c-format -msgid "element <%s> is missing its contents" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1262 -#, c-format -msgid "Parse of '%s' failed" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1269 -#, c-format -msgid "Unable to connect value node ('%s' of type '%s') to link %d (%s)" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1287 -#, c-format -msgid "Unknown Exception thrown when working on element \"%s\"" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1322 -#, c-format -msgid "<%s> is missing link %d (%s)" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1388 -msgid "Unable to create " -msgstr "" - -#: src/synfig/loadcanvas.cpp:1538 -msgid " is missing its contents or missing \"use\" element" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1583 -#, c-format -msgid "Bad data in <%s>" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1615 -#, c-format -msgid "Expected a ValueNode. Refer to '%s'" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1636 -#, c-format -msgid "Bad ID \"%s\"" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1641 -#, c-format -msgid "Duplicate ID \"%s\"" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1646 -#, c-format -msgid "Unknown Exception thrown when adding ValueNode \"%s\"" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1681 -msgid "Missing \"type\" attribute to \"layer\" element" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1700 -msgid "Installed layer version is smaller than layer version in file" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1720 -msgid " entry for is not yet supported. Ignoring..." -msgstr "" - -#: src/synfig/loadcanvas.cpp:1723 -msgid " entry for is not yet supported. Ignoring..." -msgstr "" - -#: src/synfig/loadcanvas.cpp:1731 -msgid "Missing \"name\" attribute for ." -msgstr "" - -#: src/synfig/loadcanvas.cpp:1748 -msgid "" -"Found \"use\" attribute for , but it wasn't empty. Ignoring " -"contents..." -msgstr "" - -#: src/synfig/loadcanvas.cpp:1753 -msgid "Empty use=\"\" value in " -msgstr "" - -#: src/synfig/loadcanvas.cpp:1759 -#, c-format -msgid "Failed to load subcanvas '%s'" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1761 -msgid "Layer rejected canvas link" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1779 -#, c-format -msgid "Unknown ID (%s) referenced in " -msgstr "" - -#: src/synfig/loadcanvas.cpp:1795 -msgid " is either missing its contents, or missing a \"use\" attribute." -msgstr "" - -#: src/synfig/loadcanvas.cpp:1807 src/synfig/loadcanvas.cpp:1827 -msgid "Bad data for " -msgstr "" - -#: src/synfig/loadcanvas.cpp:1815 -#, c-format -msgid "Layer '%s' rejected value for parameter '%s'" -msgstr "" - -#: src/synfig/loadcanvas.cpp:1838 -#, c-format -msgid "Unexpected element <%s> after data, ignoring..." -msgstr "" - -#: src/synfig/loadcanvas.cpp:1911 src/synfig/loadcanvas.cpp:1919 -msgid "Canvas with width or height less than one is not allowed" -msgstr "" - -#: src/synfig/loadcanvas.cpp:2005 -msgid "Inline canvas cannot have a section" -msgstr "" - -#: src/synfig/loadcanvas.cpp:2013 -msgid "Inline canvas cannot have keyframes" -msgstr "" - -#: src/synfig/loadcanvas.cpp:2025 -msgid "Inline canvases cannot have metadata" -msgstr "" - -#: src/synfig/loadcanvas.cpp:2033 -msgid " must have a name" -msgstr "" - -#: src/synfig/loadcanvas.cpp:2039 -msgid " must have content" -msgstr "" - -#: src/synfig/loadcanvas.cpp:2051 -msgid "blank \"name\" entity" -msgstr "" - -#: src/synfig/loadcanvas.cpp:2066 -msgid "blank \"desc\" entity" -msgstr "" - -#: src/synfig/loadcanvas.cpp:2081 -msgid "blank \"author\" entity" -msgstr "" - -#: src/synfig/loadcanvas.cpp:2113 -#, c-format -msgid "Canvas '%s' has undefined %s: %s" -msgstr "" - -#: src/synfig/loadcanvas.cpp:2115 src/synfig/valuenode.cpp:352 -msgid "ValueNode" -msgstr "" - -#: src/synfig/loadcanvas.cpp:2115 -msgid "ValueNodes" -msgstr "" - -#: src/synfig/loadcanvas.cpp:2195 -msgid "Can't open file" -msgstr "" - -#: src/synfig/main.cpp:103 -#, c-format -msgid "API Version mismatch (LIB:%d, PROG:%d)" -msgstr "" - -#: src/synfig/main.cpp:108 -#, c-format -msgid "Size of Vector mismatch (app:%d, lib:%d)" -msgstr "" - -#: src/synfig/main.cpp:113 -#, c-format -msgid "Size of Color mismatch (app:%d, lib:%d)" -msgstr "" - -#: src/synfig/main.cpp:118 -#, c-format -msgid "Size of Canvas mismatch (app:%d, lib:%d)" -msgstr "" - -#: src/synfig/main.cpp:123 -#, c-format -msgid "Size of Layer mismatch (app:%d, lib:%d)" -msgstr "" - -#: src/synfig/main.cpp:184 -msgid "Starting Subsystem \"Modules\"" -msgstr "" - -#: src/synfig/main.cpp:186 -msgid "Unable to initialize subsystem \"Module\"" -msgstr "" - -#: src/synfig/main.cpp:188 -msgid "Starting Subsystem \"Layers\"" -msgstr "" - -#: src/synfig/main.cpp:192 -msgid "Unable to initialize subsystem \"Layers\"" -msgstr "" - -#: src/synfig/main.cpp:195 -msgid "Starting Subsystem \"Targets\"" -msgstr "" - -#: src/synfig/main.cpp:200 -msgid "Unable to initialize subsystem \"Targets\"" -msgstr "" - -#: src/synfig/main.cpp:203 -msgid "Starting Subsystem \"Importers\"" -msgstr "" - -#: src/synfig/main.cpp:209 -msgid "Unable to initialize subsystem \"Importers\"" -msgstr "" - -#: src/synfig/main.cpp:212 -msgid "Starting Subsystem \"ValueNodes\"" -msgstr "" - -#: src/synfig/main.cpp:219 -msgid "Unable to initialize subsystem \"ValueNodes\"" -msgstr "" - -#: src/synfig/main.cpp:256 src/synfig/main.cpp:257 -#, c-format -msgid "Loading modules from %s" -msgstr "" - -#: src/synfig/main.cpp:267 -#, fuzzy, c-format -msgid "Unable to open module list file '%s'" -msgstr "Невозможно найти модуль \"%s\" (%s)" - -#: src/synfig/main.cpp:281 src/tool/main.cpp:243 -msgid "DONE" -msgstr "ГОТОВО" - -#: src/synfig/main.cpp:347 src/tool/main.cpp:123 src/tool/main.cpp:164 -msgid "error" -msgstr "ошибка" - -#: src/synfig/main.cpp:362 src/tool/main.cpp:130 src/tool/main.cpp:171 -msgid "warning" -msgstr "" - -#: src/synfig/main.cpp:377 -msgid "info" -msgstr "" - -#: src/synfig/module.cpp:66 -msgid "Errors on lt_dlinit()" -msgstr "" - -#: src/synfig/module.cpp:103 -#, fuzzy, c-format -msgid "Unable to load module '%s'" -msgstr "Невозможно найти модуль \"%s\" (%s)" - -#: src/synfig/module.cpp:128 -#, c-format -msgid "Attempting to register \"%s\"" -msgstr "Попытка зарегистрировать \"%s\"" - -#: src/synfig/module.cpp:135 -#, c-format -msgid "Unable to find module \"%s\" (%s)" -msgstr "Невозможно найти модуль \"%s\" (%s)" - -#: src/synfig/module.cpp:139 -#, c-format -msgid "Found module \"%s\"" -msgstr "Найден модуль \"%s\"" - -#: src/synfig/module.cpp:173 -#, c-format -msgid "Unable to find entrypoint in module \"%s\" (%s)" -msgstr "" - -#: src/synfig/module.cpp:186 -msgid "Entrypoint did not return a module." -msgstr "" - -#: src/synfig/module.cpp:190 -#, c-format -msgid "Success for \"%s\"" -msgstr "" - -#: src/synfig/palette.cpp:72 -msgid "Unnamed" -msgstr "" - -#: src/synfig/palette.cpp:89 -msgid "Surface Palette" -msgstr "" - -#: src/synfig/palette.cpp:284 -#, c-format -msgid "%0.2f%% Gray" -msgstr "" - -#: src/synfig/palette.cpp:299 -#, c-format -msgid "Unable to open %s for write" -msgstr "" - -#: src/synfig/palette.cpp:321 -#, c-format -msgid "Unable to open %s for read" -msgstr "" - -#: src/synfig/palette.cpp:329 -#, c-format -msgid "%s does not appear to be a palette file" -msgstr "" - -#: src/synfig/paramdesc.cpp:64 -msgid "_Composite" -msgstr "_Составной" - -#: src/synfig/paramdesc.cpp:65 -msgid "_Straight" -msgstr "" - -#: src/synfig/paramdesc.cpp:66 -msgid "_Onto" -msgstr "" - -#: src/synfig/paramdesc.cpp:67 -msgid "S_traight Onto" -msgstr "" - -#: src/synfig/paramdesc.cpp:68 -msgid "_Behind" -msgstr "_Позади" - -#: src/synfig/paramdesc.cpp:69 -msgid "Sc_reen" -msgstr "_Экран" - -#: src/synfig/paramdesc.cpp:70 -msgid "Overla_y" -msgstr "П_ерекрытие" - -#: src/synfig/paramdesc.cpp:71 -msgid "_Hard Light" -msgstr "_Направленный свет" - -#: src/synfig/paramdesc.cpp:72 -msgid "_Multiply" -msgstr "_Умножение" - -#: src/synfig/paramdesc.cpp:73 -msgid "_Divide" -msgstr "_Деление" - -#: src/synfig/paramdesc.cpp:74 -msgid "_Add" -msgstr "_Сложение" - -#: src/synfig/paramdesc.cpp:75 -msgid "S_ubtract" -msgstr "_Вычитание" - -#: src/synfig/paramdesc.cpp:76 -msgid "Di_fference" -msgstr "_Разница" - -#: src/synfig/paramdesc.cpp:77 -msgid "Bri_ghten" -msgstr "_Осветление" - -#: src/synfig/paramdesc.cpp:78 -msgid "Dar_ken" -msgstr "_Затемнение" - -#: src/synfig/paramdesc.cpp:79 -msgid "Co_lor" -msgstr "_Цвет" - -#: src/synfig/paramdesc.cpp:80 -msgid "Hu_e" -msgstr "_Тон" - -#: src/synfig/paramdesc.cpp:81 -msgid "Saturatio_n" -msgstr "Н_асыщенность" - -#: src/synfig/paramdesc.cpp:82 -msgid "Lum_inance" -msgstr "Свет_имость" - -#: src/synfig/paramdesc.cpp:84 -msgid "Alpha O_ver" -msgstr "А_льфа над" - -#: src/synfig/paramdesc.cpp:85 -msgid "Al_pha Brighten" -msgstr "Осветление аль_фы" - -#: src/synfig/paramdesc.cpp:86 -msgid "Al_pha Darken" -msgstr "Затемнение альф_ы" - -#: src/synfig/render.cpp:247 src/synfig/render.cpp:248 -#: src/synfig/render.cpp:302 src/synfig/render.cpp:303 -#: src/synfig/render.cpp:423 src/synfig/render.cpp:424 -#: src/synfig/render.cpp:450 src/synfig/render.cpp:451 -msgid "Target panic" -msgstr "" - -#: src/synfig/savecanvas.cpp:254 -#, c-format -msgid "Unknown value(%s), cannot create XML representation!" -msgstr "" - -#: src/synfig/savecanvas.cpp:529 -#, c-format -msgid "Unknown ValueNode Type (%s), cannot create an XML representation" -msgstr "" - -#: src/synfig/target_scanline.cpp:135 src/synfig/target_tile.cpp:319 -msgid "Target initialization failure" -msgstr "" - -#: src/synfig/target_scanline.cpp:251 src/synfig/target_scanline.cpp:297 -#: src/synfig/target_scanline.cpp:395 src/synfig/target_scanline.cpp:443 -#: src/synfig/target_tile.cpp:261 -msgid "Accelerated Renderer Failure" -msgstr "" - -#: src/synfig/target_scanline.cpp:306 src/synfig/target_scanline.cpp:452 -msgid "Unable to put surface on target" -msgstr "" - -#: src/synfig/target_scanline.cpp:465 src/synfig/target_tile.cpp:442 -msgid "Caught string :" -msgstr "" - -#: src/synfig/target_scanline.cpp:470 src/synfig/target_tile.cpp:447 -msgid "Ran out of memory (Probably a bug)" -msgstr "" - -#: src/synfig/target_scanline.cpp:475 src/synfig/target_tile.cpp:452 -msgid "Caught unknown error, rethrowing..." -msgstr "" - -#: src/synfig/target_tile.cpp:148 -msgid "Bad Tile Size" -msgstr "" - -#: src/synfig/target_tile.cpp:198 -msgid "Parametric Renderer Failure" -msgstr "" - -#: src/synfig/target_tile.cpp:205 src/synfig/target_tile.cpp:269 -msgid "Bad surface" -msgstr "" - -#: src/synfig/target_tile.cpp:215 src/synfig/target_tile.cpp:281 -msgid "add_tile():Unable to put surface on target" -msgstr "" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:234 src/synfig/value.cpp:289 -msgid "bool" -msgstr "" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:236 src/synfig/value.cpp:287 -msgid "integer" -msgstr "" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:238 -msgid "angle" -msgstr "" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:240 src/synfig/value.cpp:281 -msgid "time" -msgstr "" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:242 src/synfig/value.cpp:284 -msgid "real" -msgstr "" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:244 -msgid "vector" -msgstr "" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:246 -msgid "color" -msgstr "" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:248 -msgid "segment" -msgstr "" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:250 -msgid "bline_point" -msgstr "" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:252 -msgid "list" -msgstr "" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:254 -msgid "canvas" -msgstr "" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:256 -msgid "string" -msgstr "" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:258 -msgid "gradient" -msgstr "" - -#. TRANSLATORS: this is the name of a type -- see http://synfig.org/Types -#: src/synfig/value.cpp:260 -msgid "nil" -msgstr "" - -#: src/synfig/valuenode.cpp:136 src/synfig/valuenode_composite.cpp:431 -msgid "Composite" -msgstr "" - -#: src/synfig/valuenode.cpp:137 src/synfig/valuenode_radialcomposite.cpp:303 -msgid "Radial Composite" -msgstr "" - -#: src/synfig/valuenode.cpp:138 src/synfig/valuenode_reference.cpp:156 -msgid "Reference" -msgstr "" - -#: src/synfig/valuenode.cpp:139 src/synfig/valuenode_blinecalctangent.cpp:244 -#: src/synfig/valuenode_blinecalcwidth.cpp:208 -#: src/synfig/valuenode_exp.cpp:157 src/synfig/valuenode_scale.cpp:217 -msgid "Scale" -msgstr "" - -#: src/synfig/valuenode.cpp:140 src/synfig/valuenode_segcalctangent.cpp:100 -msgid "Segment Tangent" -msgstr "" - -#: src/synfig/valuenode.cpp:141 src/synfig/valuenode_segcalcvertex.cpp:98 -msgid "Segment Vertex" -msgstr "Вершина сегмента" - -#: src/synfig/valuenode.cpp:142 src/synfig/valuenode_stripes.cpp:78 -#: src/synfig/valuenode_stripes.cpp:225 -msgid "Stripes" -msgstr "" - -#: src/synfig/valuenode.cpp:143 src/synfig/valuenode_subtract.cpp:233 -msgid "Subtract" -msgstr "" - -#: src/synfig/valuenode.cpp:144 src/synfig/valuenode_twotone.cpp:179 -msgid "Two-Tone" -msgstr "" - -#: src/synfig/valuenode.cpp:145 src/synfig/valuenode_bline.cpp:826 -#: src/synfig/valuenode_blinecalctangent.cpp:240 -#: src/synfig/valuenode_blinecalcvertex.cpp:199 -#: src/synfig/valuenode_blinecalcwidth.cpp:205 -msgid "BLine" -msgstr "Кривая" - -#: src/synfig/valuenode.cpp:146 src/synfig/valuenode_dynamiclist.cpp:713 -msgid "Dynamic List" -msgstr "Динамический список" - -#: src/synfig/valuenode.cpp:147 src/synfig/valuenode_gradientrotate.cpp:76 -#: src/synfig/valuenode_gradientrotate.cpp:188 -msgid "Gradient Rotate" -msgstr "" - -#: src/synfig/valuenode.cpp:148 src/synfig/valuenode_sine.cpp:106 -msgid "Sine" -msgstr "" - -#: src/synfig/valuenode.cpp:150 src/synfig/valuenode_timedswap.cpp:264 -msgid "Timed Swap" -msgstr "" - -#: src/synfig/valuenode.cpp:151 src/synfig/valuenode_repeat_gradient.cpp:81 -#: src/synfig/valuenode_repeat_gradient.cpp:234 -msgid "Repeat Gradient" -msgstr "" - -#: src/synfig/valuenode.cpp:152 src/synfig/valuenode_exp.cpp:102 -msgid "Exponential" -msgstr "" - -#: src/synfig/valuenode.cpp:153 src/synfig/valuenode_add.cpp:227 -msgid "Add" -msgstr "" - -#: src/synfig/valuenode.cpp:154 src/synfig/valuenode_blinecalctangent.cpp:172 -msgid "BLine Tangent" -msgstr "Касательная кривой" - -#: src/synfig/valuenode.cpp:155 src/synfig/valuenode_blinecalcvertex.cpp:140 -msgid "BLine Vertex" -msgstr "Вершина кривой" - -#: src/synfig/valuenode.cpp:156 src/synfig/valuenode_range.cpp:230 -msgid "Range" -msgstr "Диапазон" - -#: src/synfig/valuenode.cpp:158 src/synfig/valuenode_switch.cpp:170 -msgid "Switch" -msgstr "" - -#: src/synfig/valuenode.cpp:159 src/synfig/valuenode_cos.cpp:106 -msgid "Cos" -msgstr "" - -#: src/synfig/valuenode.cpp:160 -msgid "aTan2" -msgstr "" - -#: src/synfig/valuenode.cpp:161 -msgid "Reverse Tangent" -msgstr "" - -#: src/synfig/valuenode.cpp:163 src/synfig/valuenode_reciprocal.cpp:179 -msgid "Reciprocal" -msgstr "" - -#: src/synfig/valuenode.cpp:165 src/synfig/valuenode_integer.cpp:183 -msgid "From Integer" -msgstr "Текст" - -#: src/synfig/valuenode.cpp:167 src/synfig/valuenode_blinecalcwidth.cpp:143 -msgid "BLine Width" -msgstr "" - -#: src/synfig/valuenode.cpp:169 -msgid "Vector Angle" -msgstr "" - -#: src/synfig/valuenode.cpp:170 -msgid "Vector Length" -msgstr "" - -#: src/synfig/valuenode.cpp:171 -msgid "Vector X" -msgstr "" - -#: src/synfig/valuenode.cpp:172 -msgid "Vector Y" -msgstr "" - -#: src/synfig/valuenode.cpp:173 -msgid "Gradient Color" -msgstr "" - -#: src/synfig/valuenode.cpp:174 -msgid "Dot Product" -msgstr "" - -#: src/synfig/valuenode.cpp:175 src/synfig/valuenode_timestring.cpp:115 -msgid "Time String" -msgstr "" - -#: src/synfig/valuenode.cpp:176 src/synfig/valuenode_realstring.cpp:121 -msgid "Real String" -msgstr "" - -#: src/synfig/valuenode.cpp:177 src/synfig/valuenode_join.cpp:140 -msgid "Joined List" -msgstr "" - -#: src/synfig/valuenode.cpp:178 -msgid "Angle String" -msgstr "" - -#: src/synfig/valuenode.cpp:179 -msgid "Int String" -msgstr "" - -#: src/synfig/valuenode.cpp:180 -msgid "Logarithm" -msgstr "Логарифм" - -#: src/synfig/valuenode.cpp:247 -#, c-format -msgid "Bad type: ValueNode '%s' doesn't accept type '%s'" -msgstr "" - -#: src/synfig/valuenode.cpp:512 -msgid "Placeholder" -msgstr "" - -#: src/synfig/valuenode.h:74 -#, c-format -msgid "%s:%d wrong type for %s: need %s but got %s" -msgstr "" - -#: src/synfig/valuenode_add.cpp:98 src/synfig/valuenode_gradientrotate.cpp:76 -#: src/synfig/valuenode_integer.cpp:78 src/synfig/valuenode_integer.cpp:170 -#: src/synfig/valuenode_range.cpp:86 -#: src/synfig/valuenode_repeat_gradient.cpp:81 -#: src/synfig/valuenode_scale.cpp:87 src/synfig/valuenode_stripes.cpp:78 -#: src/synfig/valuenode_subtract.cpp:98 -msgid ":Bad type " -msgstr "" - -#: src/synfig/valuenode_add.cpp:123 src/synfig/valuenode_scale.cpp:116 -#: src/synfig/valuenode_subtract.cpp:129 -msgid "One or both of my parameters aren't set!" -msgstr "" - -#: src/synfig/valuenode_add.cpp:188 src/synfig/valuenode_subtract.cpp:194 -msgid "LHS" -msgstr "" - -#: src/synfig/valuenode_add.cpp:189 src/synfig/valuenode_subtract.cpp:195 -msgid "RHS" -msgstr "" - -#: src/synfig/valuenode_add.cpp:190 src/synfig/valuenode_scale.cpp:181 -#: src/synfig/valuenode_subtract.cpp:196 -msgid "Scalar" -msgstr "" - -#: src/synfig/valuenode_animated.cpp:261 src/synfig/valuenode_animated.cpp:285 -#: src/synfig/valuenode_animated.cpp:561 src/synfig/valuenode_animated.cpp:579 -#: src/synfig/valuenode_animated.cpp:659 src/synfig/valuenode_animated.cpp:678 -msgid "A waypoint already exists at this point in time" -msgstr "" - -#: src/synfig/valuenode_animated.cpp:1056 -#, c-format -msgid "%s: You cannot use a %s in an animated ValueNode" -msgstr "" - -#: src/synfig/valuenode_animated.cpp:1091 -msgid "Animated" -msgstr "" - -#: src/synfig/valuenode_bline.cpp:802 src/synfig/valuenode_dynamiclist.cpp:619 -msgid "No entries in list" -msgstr "" - -#: src/synfig/valuenode_bline.cpp:805 src/synfig/valuenode_dynamiclist.cpp:622 -msgid "No entries in ret_list" -msgstr "" - -#: src/synfig/valuenode_bline.cpp:814 -#, c-format -msgid "Vertex %03d" -msgstr "Вершина %03d" - -#: src/synfig/valuenode_blinecalctangent.cpp:243 -#: src/synfig/valuenode_gradientrotate.cpp:148 -#: src/synfig/valuenode_linear.cpp:215 -msgid "Offset" -msgstr "Смещение" - -#: src/synfig/valuenode_blinecalctangent.cpp:245 -msgid "Fixed Length" -msgstr "" - -#: src/synfig/valuenode_composite.cpp:161 -#: src/synfig/valuenode_composite.cpp:181 -msgid "Bad type for composite" -msgstr "" - -#: src/synfig/valuenode_composite.cpp:267 -msgid "Red" -msgstr "Красный" - -#: src/synfig/valuenode_composite.cpp:269 -msgid "Green" -msgstr "Зеленый" - -#: src/synfig/valuenode_composite.cpp:271 -msgid "Blue" -msgstr "Синий" - -#: src/synfig/valuenode_composite.cpp:273 -#: src/synfig/valuenode_radialcomposite.cpp:210 -msgid "Alpha" -msgstr "Альфа" - -#: src/synfig/valuenode_composite.cpp:277 -msgid "Vertex 1" -msgstr "Вершина 1" - -#: src/synfig/valuenode_composite.cpp:279 -#: src/synfig/valuenode_composite.cpp:295 -msgid "Tangent 1" -msgstr "Касательная 1" - -#: src/synfig/valuenode_composite.cpp:281 -msgid "Vertex 2" -msgstr "Вершина 2" - -#: src/synfig/valuenode_composite.cpp:283 -#: src/synfig/valuenode_composite.cpp:297 -msgid "Tangent 2" -msgstr "Касательная 2" - -#: src/synfig/valuenode_composite.cpp:287 -msgid "Vertex" -msgstr "Вершина" - -#: src/synfig/valuenode_composite.cpp:293 -msgid "Split Tangents" -msgstr "Разделить касательные" - -#: src/synfig/valuenode_composite.cpp:304 -#: src/synfig/valuenode_radialcomposite.cpp:221 -#, c-format -msgid "C%d" -msgstr "" - -#: src/synfig/valuenode_const.cpp:126 -msgid "Constant" -msgstr "Константа" - -#: src/synfig/valuenode_cos.cpp:167 src/synfig/valuenode_sine.cpp:167 -msgid "Amplitude" -msgstr "Амплитуда" - -#: src/synfig/valuenode_duplicate.cpp:121 -msgid "From" -msgstr "" - -#: src/synfig/valuenode_duplicate.cpp:122 -msgid "To" -msgstr "" - -#: src/synfig/valuenode_dynamiclist.cpp:613 -msgid "List type/item type mismatch, throwing away mismatch" -msgstr "" - -#: src/synfig/valuenode_dynamiclist.cpp:661 -#, c-format -msgid "Item %03d" -msgstr "" - -#: src/synfig/valuenode_exp.cpp:155 -msgid "Exponent" -msgstr "" - -#: src/synfig/valuenode_integer.cpp:132 -msgid "Integer" -msgstr "" - -#: src/synfig/valuenode_join.cpp:202 -msgid "Strings" -msgstr "" - -#: src/synfig/valuenode_join.cpp:203 src/synfig/valuenode_timedswap.cpp:221 -msgid "Before" -msgstr "До" - -#: src/synfig/valuenode_join.cpp:204 -msgid "Separator" -msgstr "" - -#: src/synfig/valuenode_join.cpp:205 src/synfig/valuenode_timedswap.cpp:222 -msgid "After" -msgstr "После" - -#: src/synfig/valuenode_linear.cpp:209 -msgid "Rate" -msgstr "Частота" - -#: src/synfig/valuenode_linear.cpp:212 -msgid "Slope" -msgstr "" - -#: src/synfig/valuenode_radialcomposite.cpp:121 -#: src/synfig/valuenode_radialcomposite.cpp:137 -msgid "Bad type for radialcomposite" -msgstr "" - -#: src/synfig/valuenode_radialcomposite.cpp:199 -msgid "Theta" -msgstr "" - -#: src/synfig/valuenode_radialcomposite.cpp:204 -msgid "Luma" -msgstr "" - -#: src/synfig/valuenode_radialcomposite.cpp:206 -msgid "Saturation" -msgstr "Насыщенность" - -#: src/synfig/valuenode_radialcomposite.cpp:208 -msgid "Hue" -msgstr "Тон" - -#: src/synfig/valuenode_range.cpp:118 -msgid "Some of my parameters aren't set!" -msgstr "" - -#: src/synfig/valuenode_range.cpp:191 -msgid "Min" -msgstr "" - -#: src/synfig/valuenode_range.cpp:192 -msgid "Max" -msgstr "" - -#: src/synfig/valuenode_realstring.cpp:183 -msgid "Real" -msgstr "" - -#: src/synfig/valuenode_realstring.cpp:185 -msgid "Precision" -msgstr "Точность" - -#: src/synfig/valuenode_realstring.cpp:186 -msgid "Zero Padded" -msgstr "" - -#: src/synfig/valuenode_reciprocal.cpp:125 -msgid "Epsilon" -msgstr "" - -#: src/synfig/valuenode_reciprocal.cpp:126 -msgid "Infinite" -msgstr "" - -#: src/synfig/valuenode_repeat_gradient.cpp:184 -msgid "Count" -msgstr "" - -#: src/synfig/valuenode_repeat_gradient.cpp:186 -msgid "Specify Start" -msgstr "" - -#: src/synfig/valuenode_repeat_gradient.cpp:187 -msgid "Specify End" -msgstr "" - -#: src/synfig/valuenode_repeat_gradient.cpp:188 -msgid "Start Color" -msgstr "" - -#: src/synfig/valuenode_repeat_gradient.cpp:189 -msgid "End Color" -msgstr "" - -#: src/synfig/valuenode_segcalctangent.cpp:159 -#: src/synfig/valuenode_segcalcvertex.cpp:157 -msgid "Segment" -msgstr "" - -#: src/synfig/valuenode_step.cpp:215 src/tool/main.cpp:945 -msgid "Start Time" -msgstr "" - -#: src/synfig/valuenode_step.cpp:216 -msgid "Intersection" -msgstr "Пересечение" - -#: src/synfig/valuenode_stripes.cpp:170 -msgid "Color 1" -msgstr "" - -#: src/synfig/valuenode_stripes.cpp:172 -msgid "Color 2" -msgstr "" - -#: src/synfig/valuenode_stripes.cpp:174 -msgid "Stripe Count" -msgstr "" - -#: src/synfig/valuenode_timedswap.cpp:223 -msgid "Swap Time" -msgstr "" - -#: src/synfig/valuenode_timedswap.cpp:224 -msgid "Swap Duration" -msgstr "" - -#: src/synfig/valuenode_timestring.cpp:168 -msgid "Time" -msgstr "" - -#: src/synfig/valuenode_twotone.cpp:136 -msgid "Color1" -msgstr "" - -#: src/synfig/valuenode_twotone.cpp:138 -msgid "Color2" -msgstr "" - -#: src/tool/main.cpp:216 -msgid "Line" -msgstr "" - -#: src/tool/main.cpp:216 -msgid " of " -msgstr "" - -#: src/tool/main.cpp:322 -msgid "syntax: " -msgstr "" - -#: src/tool/main.cpp:325 -msgid "Print out usage and syntax info" -msgstr "" - -#: src/tool/main.cpp:328 -msgid "Specify output target (Default:unknown)" -msgstr "" - -#: src/tool/main.cpp:329 -msgid "Set the image width (Use zero for file default)" -msgstr "" - -#: src/tool/main.cpp:330 -msgid "Set the image height (Use zero for file default)" -msgstr "" - -#: src/tool/main.cpp:331 -msgid "Set the diagonal size of image window (Span)" -msgstr "" - -#: src/tool/main.cpp:332 -msgid "Set antialias amount for parametric renderer." -msgstr "" - -#: src/tool/main.cpp:333 -#, c-format -msgid "Specify image quality for accelerated renderer (default=%d)" -msgstr "" - -#: src/tool/main.cpp:334 -msgid "Gamma (default=2.2)" -msgstr "" - -#: src/tool/main.cpp:335 -msgid "Verbose Output (add more for more verbosity)" -msgstr "" - -#: src/tool/main.cpp:336 -msgid "Quiet mode (No progress/time-remaining display)" -msgstr "" - -#: src/tool/main.cpp:337 -msgid "Render the canvas with the given id instead of the root." -msgstr "" - -#: src/tool/main.cpp:338 -msgid "Specify output filename" -msgstr "" - -#: src/tool/main.cpp:339 -msgid "Enable multithreaded renderer using specified # of threads" -msgstr "" - -#: src/tool/main.cpp:340 -msgid "Print Benchmarks" -msgstr "" - -#: src/tool/main.cpp:341 -msgid "Set the frame rate" -msgstr "" - -#: src/tool/main.cpp:342 -msgid "Render a single frame at " -msgstr "" - -#: src/tool/main.cpp:343 src/tool/main.cpp:344 -msgid "Set the starting time" -msgstr "" - -#: src/tool/main.cpp:345 -msgid "Set the ending time" -msgstr "" - -#: src/tool/main.cpp:346 -msgid "Set the physical resolution (dots-per-inch)" -msgstr "" - -#: src/tool/main.cpp:347 -msgid "Set the physical X resolution (dots-per-inch)" -msgstr "" - -#: src/tool/main.cpp:348 -msgid "Set the physical Y resolution (dots-per-inch)" -msgstr "" - -#: src/tool/main.cpp:350 -msgid "List the exported canvases in the composition" -msgstr "" - -#: src/tool/main.cpp:351 -msgid "Print out specified details of the root canvas" -msgstr "" - -#: src/tool/main.cpp:352 -msgid "Append layers in to composition" -msgstr "" - -#: src/tool/main.cpp:354 -msgid "Print out layer's description, parameter info, etc." -msgstr "" - -#: src/tool/main.cpp:355 -msgid "Print out the list of available layers" -msgstr "" - -#: src/tool/main.cpp:356 -msgid "Print out the list of available targets" -msgstr "" - -#: src/tool/main.cpp:357 -msgid "Print out the list of available importers" -msgstr "" - -#: src/tool/main.cpp:358 -msgid "Print out the list of available ValueNodes" -msgstr "" - -#: src/tool/main.cpp:359 -msgid "Print out the list of loaded modules" -msgstr "" - -#: src/tool/main.cpp:360 -msgid "Print out version information" -msgstr "" - -#: src/tool/main.cpp:361 -msgid "Print out misc build information" -msgstr "" - -#: src/tool/main.cpp:362 -msgid "Print out license information" -msgstr "" - -#: src/tool/main.cpp:365 -msgid "Test GUID generation" -msgstr "" - -#: src/tool/main.cpp:366 -msgid "Test signal implementation" -msgstr "" - -#: src/tool/main.cpp:616 -#, c-format -msgid "Antialiasing set to %d, (%d samples per pixel)" -msgstr "" - -#: src/tool/main.cpp:624 -#, c-format -msgid "Span set to %d units" -msgstr "" - -#: src/tool/main.cpp:634 -#, c-format -msgid "Frame rate set to %d frames per second" -msgstr "" - -#: src/tool/main.cpp:644 -#, c-format -msgid "Physical resolution set to %f dpi" -msgstr "" - -#: src/tool/main.cpp:654 -#, c-format -msgid "Physical X resolution set to %f dpi" -msgstr "" - -#: src/tool/main.cpp:664 -#, c-format -msgid "Physical Y resolution set to %f dpi" -msgstr "" - -#: src/tool/main.cpp:685 -msgid "Rendering frame at " -msgstr "" - -#: src/tool/main.cpp:707 -#, c-format -msgid "Resolution set to %dx%d" -msgstr "" - -#: src/tool/main.cpp:724 -#, c-format -msgid "Quality set to %d" -msgstr "" - -#: src/tool/main.cpp:744 -#, c-format -msgid "Threads set to %d" -msgstr "" - -#: src/tool/main.cpp:914 -msgid "Unrecognised canvas variable: " -msgstr "" - -#: src/tool/main.cpp:915 -msgid "Recognized variables are:" -msgstr "" - -#: src/tool/main.cpp:951 -msgid "End Time" -msgstr "" - -#: src/tool/main.cpp:957 -msgid "Frame Rate" -msgstr "" - -#: src/tool/main.cpp:963 -msgid "Start Frame" -msgstr "" - -#: src/tool/main.cpp:969 -msgid "End Frame" -msgstr "" - -#: src/tool/main.cpp:990 -msgid "Image Aspect Ratio" -msgstr "" - -#: src/tool/main.cpp:999 -msgid "Pixel Width" -msgstr "Ширина пиксела" - -#: src/tool/main.cpp:1005 -msgid "Pixel Height" -msgstr "Высота пиксела" - -#: src/tool/main.cpp:1011 -msgid "Pixel Aspect Ratio" -msgstr "Соотношение сторон пиксела" - -#: src/tool/main.cpp:1020 -msgid "Top Left" -msgstr "Верхний левый" - -#: src/tool/main.cpp:1027 -msgid "Bottom Right" -msgstr "Нижний правый" - -#: src/tool/main.cpp:1034 -msgid "Physical Width" -msgstr "Физическая ширина" - -#: src/tool/main.cpp:1040 -msgid "Physical Height" -msgstr "Физическая высота" - -#: src/tool/main.cpp:1046 -msgid "X Resolution" -msgstr "" - -#: src/tool/main.cpp:1052 -msgid "Y Resolution" -msgstr "" - -#: src/tool/main.cpp:1058 -msgid "Diagonal Image Span" -msgstr "" - -#: src/tool/main.cpp:1067 -msgid "Interlaced" -msgstr "" - -#: src/tool/main.cpp:1073 -msgid "Antialias" -msgstr "" - -#: src/tool/main.cpp:1085 -msgid "Flags" -msgstr "" - -#: src/tool/main.cpp:1091 -msgid "Focus" -msgstr "" - -#: src/tool/main.cpp:1098 -msgid "Background Color" -msgstr "Цвет фона" - -#: src/tool/main.cpp:1108 -msgid "Metadata" -msgstr "Метаданные" - -#: src/tool/main.cpp:1136 -msgid "FATAL: Synfig Version Mismatch" -msgstr "" - -#: src/tool/main.cpp:1152 -msgid "verbosity set to " -msgstr "" - -#: src/tool/main.cpp:1189 -msgid "Unable to load '" -msgstr "" - -#: src/tool/main.cpp:1190 src/tool/main.cpp:1215 src/tool/main.cpp:1223 -#: src/tool/main.cpp:1328 src/tool/main.cpp:1354 -msgid "Throwing out job..." -msgstr "" - -#: src/tool/main.cpp:1214 -msgid "Unable to find canvas with ID \"" -msgstr "" - -#: src/tool/main.cpp:1214 src/tool/main.cpp:1222 -msgid "\" in " -msgstr "" - -#: src/tool/main.cpp:1222 -msgid "Invalid canvas name \"" -msgstr "" - -#: src/tool/main.cpp:1236 -msgid "Quality set to " -msgstr "" - -#: src/tool/main.cpp:1250 -msgid "Unable to append '" -msgstr "" - -#: src/tool/main.cpp:1260 -msgid "Appended contents of " -msgstr "" - -#: src/tool/main.cpp:1264 -msgid "Attempting to determine target/outfile..." -msgstr "" - -#: src/tool/main.cpp:1270 -msgid "Target name undefined, attempting to figure it out" -msgstr "" - -#: src/tool/main.cpp:1299 -msgid "Defaulting to PNG target..." -msgstr "" - -#: src/tool/main.cpp:1318 -msgid "Creating the target..." -msgstr "" - -#: src/tool/main.cpp:1327 -msgid "Unknown target for " -msgstr "" - -#: src/tool/main.cpp:1338 -msgid "Setting the canvas on the target..." -msgstr "" - -#: src/tool/main.cpp:1340 -msgid "Setting the quality of the target..." -msgstr "" - -#: src/tool/main.cpp:1350 -msgid "Unidentified arguments for " -msgstr "" - -#: src/tool/main.cpp:1363 -msgid "Unidentified arguments:" -msgstr "" - -#: src/tool/main.cpp:1372 -msgid "Nothing to do!" -msgstr "" - -#: src/tool/main.cpp:1415 -msgid "Rendering..." -msgstr "Рендеринг..." - -#: src/tool/main.cpp:1431 -msgid "Done." -msgstr "Готово" diff --git a/synfig-core/trunk/src/Makefile.am b/synfig-core/trunk/src/Makefile.am deleted file mode 100644 index 8639170..0000000 --- a/synfig-core/trunk/src/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -SUBDIRS = \ - synfig \ - modules \ - tool - -EXTRA_DIST = \ - template.cpp \ - template.h diff --git a/synfig-core/trunk/src/modules/Makefile.am b/synfig-core/trunk/src/modules/Makefile.am deleted file mode 100644 index 4a40d3e..0000000 --- a/synfig-core/trunk/src/modules/Makefile.am +++ /dev/null @@ -1,60 +0,0 @@ -# $Id$ - -synfiglibdir = @SYNFIGLIB_DIR@ - -MAINTAINERCLEANFILES = \ - Makefile.in - -SUBDIRS = \ - mod_particle \ - mod_filter \ - mod_yuv420p \ - mod_gif \ - mod_gradient \ - mod_geometry \ - mod_noise \ - mod_libavcodec \ - mod_jpeg \ - mod_openexr \ - mod_bmp \ - mod_ppm \ - mod_png \ - mod_dv \ - mod_imagemagick \ - mod_ffmpeg \ - lyr_freetype \ - lyr_std \ - mod_mng \ - mod_svg \ - mod_magickpp \ - example - -EXTRA_DIST = \ - untemplate.nsh \ - template.nsh \ - example/simplecircle.h \ - example/simplecircle.cpp \ - example/filledrect.h \ - example/main.cpp \ - example/Makefile.am \ - example/filledrect.cpp \ - example/metaballs.cpp \ - example/metaballs.h \ - mod_mng/trgt_mng.h \ - mod_mng/unmod_mng.nsh \ - mod_mng/main.cpp \ - mod_mng/Makefile.am \ - mod_mng/mod_mng.nsh \ - mod_mng/trgt_mng.cpp \ - mptr_mplayer/main.cpp \ - mptr_mplayer/mptr_mplayer.h \ - mptr_mplayer/Makefile.am \ - mptr_mplayer/mptr_mplayer.cpp \ - mod_magickpp/trgt_magickpp.h \ - mod_magickpp/unmod_magickpp.nsh \ - mod_magickpp/main.cpp \ - mod_magickpp/Makefile.am \ - mod_magickpp/mod_magickpp.nsh \ - mod_magickpp/trgt_magickpp.cpp - -sysconf_DATA = synfig_modules.cfg diff --git a/synfig-core/trunk/src/modules/example/Makefile.am b/synfig-core/trunk/src/modules/example/Makefile.am deleted file mode 100644 index 1d38d74..0000000 --- a/synfig-core/trunk/src/modules/example/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -moduledir = @MODULE_DIR@ - -module_LTLIBRARIES = libexample.la - -libexample_la_SOURCES = \ - main.cpp \ - simplecircle.cpp \ - simplecircle.h \ - filledrect.h \ - filledrect.cpp \ - metaballs.h \ - metaballs.cpp - -libexample_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @SYNFIG_LIBS@ - -libexample_la_LDFLAGS = \ - -module \ - -no-undefined \ - -avoid-version - -libexample_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ diff --git a/synfig-core/trunk/src/modules/example/filledrect.cpp b/synfig-core/trunk/src/modules/example/filledrect.cpp deleted file mode 100644 index 329012f..0000000 --- a/synfig-core/trunk/src/modules/example/filledrect.cpp +++ /dev/null @@ -1,586 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file filledrect.cpp -** \brief Implementation of the "Rectangle" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "filledrect.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace etl; -using namespace std; -using namespace synfig; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(FilledRect); -SYNFIG_LAYER_SET_NAME(FilledRect,"filled_rectangle"); -SYNFIG_LAYER_SET_LOCAL_NAME(FilledRect,N_("Filled Rectangle")); -SYNFIG_LAYER_SET_CATEGORY(FilledRect,N_("Example")); -SYNFIG_LAYER_SET_VERSION(FilledRect,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(FilledRect,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -FilledRect::FilledRect(): - Layer_Composite(1.0,Color::BLEND_STRAIGHT), - color(Color::black()), - point1(0,0), - point2(1,1), - feather_x(0), - feather_y(0), - bevel(0), - bevCircle(0) -{ -} - -bool -FilledRect::set_param(const String & param, const ValueBase &value) -{ - IMPORT(color); - IMPORT(point1); - IMPORT(point2); - IMPORT_PLUS(feather_x, if(feather_x<0)feather_x=0;); - IMPORT_PLUS(feather_y, if(feather_y<0)feather_y=0;); - IMPORT(bevel); - IMPORT(bevCircle); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -FilledRect::get_param(const String ¶m)const -{ - EXPORT(color); - EXPORT(point1); - EXPORT(point2); - EXPORT(feather_x); - EXPORT(feather_y); - EXPORT(bevel); - EXPORT(bevCircle); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -FilledRect::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("color") - .set_local_name(_("Color")) - ); - - ret.push_back(ParamDesc("point1") - .set_local_name(_("Point 1")) - .set_box("point2") - ); - - ret.push_back(ParamDesc("point2") - .set_local_name(_("Point 2")) - ); - - ret.push_back(ParamDesc("feather_x") - .set_local_name(_("Feather X")) - ); - - ret.push_back(ParamDesc("feather_y") - .set_local_name(_("Feather Y")) - ); - - ret.push_back(ParamDesc("bevel") - .set_local_name(_("Bevel")) - ); - - ret.push_back(ParamDesc("bevCircle") - .set_local_name(_("Keep Bevel Circular")) - ); - - return ret; -} - -synfig::Layer::Handle -FilledRect::hit_check(synfig::Context context, const synfig::Point &point)const -{ - Color clr; - Real amt; - - if (!get_color(point,clr,amt)) - return context.hit_check(point); - - synfig::Layer::Handle tmp; - - if (get_blend_method()==Color::BLEND_BEHIND && (tmp=context.hit_check(point))) - return tmp; - - if (Color::is_onto(get_blend_method()) && !(context.hit_check(point))) - return 0; - - return const_cast(this); -} - -bool -FilledRect::get_color(const Point &pos, Color &out, Real &outamount) const -{ - Point p[2] = {point1,point2}; - Real swap; - - if(p[0][0] > p[1][0]) - { - swap = p[0][0]; - p[0][0] = p[1][0]; - p[1][0] = swap; - } - - if(p[0][1] > p[1][1]) - { - swap = p[0][1]; - p[0][1] = p[1][1]; - p[1][1] = swap; - } - - /* - p[0][0] -= feather_x; - p[1][0] += feather_x; - p[0][1] -= feather_y; - p[1][1] += feather_y;*/ - const Real w = p[1][0] - p[0][0]; - const Real h = p[1][1] - p[0][1]; - - if(pos[0] >= p[0][0] && pos[0] <= p[1][0] && pos[1] >= p[0][1] && pos[1] <= p[1][1]) - { - Real value = 1; - - if(feather_x > 0) - { - Real xdist = pos[0] - p[0][0]; - xdist = min(xdist,p[1][0]-pos[0]); - - if(xdist < feather_x) - { - value = xdist/feather_x; - } - } - - if(feather_y > 0) - { - Real ydist = pos[1]-p[0][1]; - ydist = min(ydist,p[1][1]-pos[1]); - - if(ydist < feather_y) - { - value = min(value,(ydist/feather_y)); - } - } - - //if we're beveled then check with ellipse code... - if(bevel > 0) - { - const Real bev = (bevel > 1) ? 1 : bevel; - const Real bevx = bevCircle ? min(w*bev/2,h*bev/2) : w*bev/2; - const Real bevy = bevCircle ? min(w*bev/2,h*bev/2) : h*bev/2;; - - Vector v(0,0); - bool in = false; - - //based on which quarter it is in (and because it's x/y symmetric) get a positive vector (x/y) - if(pos[0] < p[0][0] + bevx) - { - if(pos[1] < p[0][1] + bevy) - { - v[0] = p[0][0] + bevx - pos[0]; - v[1] = p[0][1] + bevy - pos[1]; - in = true; - }else if(pos[1] > p[1][1] - bevy) - { - v[0] = p[0][0] + bevx - pos[0]; - v[1] = pos[1] - (p[1][1] - bevy); - in = true; - } - } - else if(pos[0] > p[1][0] - bevx) - { - if(pos[1] < p[0][1] + bevy) - { - v[0] = pos[0] - (p[1][0] - bevx); - v[1] = p[0][1] + bevy - pos[1]; - in = true; - }else if(pos[1] > p[1][1] - bevy) - { - v[0] = pos[0] - (p[1][0] - bevx); - v[1] = pos[1] - (p[1][1] - bevy); - in = true; - } - } - - //if it's inside a bevelled block - if(in) - { - const Vector scale(bevx,bevy); - - Vector vc(v[0]/scale[0],v[1]/scale[1]); - Real d = vc.mag(); - - //if it's inside the ellipse - if(d < 1) - { - Real val = atan2(vc[1],vc[0]); - val /= (PI/2); //< will always be (0,pi/2) because both components are positive - - Real fthx=1,fthy=1; - - //change d into distance away from edge - d = 1 - d; - - if(feather_x > 0) - { - if(scale[0] < feather_x) - { - fthy = scale[0]/feather_x; - } - - if(d*scale[0] < feather_x) - { - fthx = d*scale[0]/feather_x; - } - } - - if(feather_y > 0) - { - if(scale[1] < feather_y) - { - fthx = min(fthx,scale[1]/feather_y); - } - - if(d*scale[1] < feather_y) - { - fthy = min(fthy,d*scale[1]/feather_y); - } - } - - //interpolate - outamount = min(value,((1-val)*fthx + val*fthy)) * get_amount(); - out = color; - return true; - - }else return false; - } - } - - outamount = value * get_amount(); - out = color; - - return true; - }else - return false; -} - -Color -FilledRect::get_color(Context context, const Point &pos)const -{ - Color clr; - Real amt; - - if(get_color(pos,clr,amt)) - { - if(amt==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - return clr; - else - return Color::blend(clr,context.get_color(pos),amt,get_blend_method()); - } - else - return context.get_color(pos); -} - -bool -FilledRect::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - // Width and Height of a pixel - const Point br(renddesc.get_br()), tl(renddesc.get_tl()); - const int w = renddesc.get_w(), h = renddesc.get_h(); - - Real wpp = (br[0]-tl[0])/w; - Real hpp = (br[1]-tl[1])/h; - //const Real xneg = wpp<0?-1:1; - //const Real yneg = hpp<0?-1:1; - - //the bounds of the rectangle - Point p[2] = {point1,point2}; - - if((p[0][0] > p[1][0]) ^ (wpp < 0)) - { - swap(p[0][0],p[1][0]); - } - - if((p[0][1] > p[1][1]) ^ (hpp < 0)) - { - swap(p[0][1],p[1][1]); - } - - /*p[0][0] -= xneg*feather_x; - p[1][0] += xneg*feather_x; - p[0][1] -= yneg*feather_y; - p[1][1] += yneg*feather_y;*/ - - //the integer coordinates - int y_start = (int)((p[0][1] - tl[1])/hpp +.5); //round start up - int x_start = (int)((p[0][0] - tl[0])/wpp +.5); - int y_end = (int)((p[1][1] - tl[1])/hpp +.5); //and ends up - int x_end = (int)((p[1][0] - tl[0])/wpp +.5); - - y_start = max(0,y_start); - x_start = max(0,x_start); - y_end = min(h,y_end); - x_end = min(w,x_end); - - SuperCallback supercb(cb,0,9000,10000); - - if(y_start >= h || x_start > w || x_end < 0 || y_end < 0) - { - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - { - if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); - return false; - } - - return true; - } - - Real xf_start = tl[0] + x_start*wpp; - Point pos(xf_start,tl[1] + y_start*hpp); - - Color clr = Color::black(); - Real amt; - - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - { - if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); - return false; - } - - for(int y = y_start; y < y_end; y++, pos[1] += hpp) - { - pos[0] = xf_start; - for(int x = x_start; x < x_end; x++, pos[0] += wpp) - { - if(get_color(pos,clr,amt)) - { - if(amt==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - (*surface)[y][x] = clr; - else - (*surface)[y][x] = Color::blend(clr,(*surface)[y][x],amt,get_blend_method()); - } - } - } - - return true; - -#if 0 - //faster version but much more complex - //the floating point - Real y1,y2,y3; - Real x1,x2,x3; - Real dx1,dx2; //reversed in 3rd y section, not used in 2nd - - //the transparent - Real fx = 0, fy = 0; - Real dfx,dfy; - - //Get the slopes of the lines we need to worry about - if(feather_x) - { - dfx = 1/(fxsize); - - if(fxsize*2 > xfw) - { - x1 = xfw/2; - x2 = 0; - x3 = xfw; - }else - { - x1 = fxsize; - x2 = xfw - fxsize; - x3 = xfw; - } - }else - { - fx = 1; - dfx = 0; - x1=0; - x2=xfw; - x3=0; - } - - if(feather_y) - { - dfy = 1/(fysize); - - if(fysize*2 > yfh) - { - y1 = yfh/2; - y2 = 0; - y3 = yfh; - }else - { - y1 = fysize; - y2 = yfh - fysize; - y3 = yfh; - } - - dx1 = ph*feather_x/feather_y; - dx2 = -2*dx1; - - }else - { - fy = 1; - dfy = 0; - y1=0; - y2=yfh; - y3=0; - } - - fy = yf*dfy; - - int x,y; - Real value = 0; - SuperCallback supercb(cb,0,9000,10000); - Surface::pen p; - - Real tx1 = 0,tx2 = - for(y = y_start;yf < y1; y++,yf++,fy+=dfy, tx1+=dx1) - { - fx = xf*dfx; - - p = surface->get_pen(x_start,y); - for(; xf < x1; xf++,p.inc_x(), fx+=dfx) - { - //we are in the x portion... use fx - value = fx*get_amount(); - if(value==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - p.put_value(color); - else - p.put_value(Color::blend(color,p.get_value(),value,get_blend_method())); - } - - for(;xf < x2; xf++,p.inc_x()) - { - //we are now in y... use fy - value = fy*get_amount(); - if(value==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - p.put_value(color); - else - p.put_value(Color::blend(color,p.get_value(),value,get_blend_method())); - } - - fx = xfw?(xfw - xf)/xfw:1; - for(;xf < x3 && ; xf++,p.inc_x(), fx-=dfx) - { - //we are in the x portion... use fx - value = max(0,fx*get_amount()); - if(value==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - p.put_value(color); - else - p.put_value(Color::blend(color,p.get_value(),value,get_blend_method())); - } - } - - x1 = - for(;fy < 1.0; y++,yf++,fy+=dfy) - { - fx = xf*dfx; - - p = surface->get_pen(x_start,y); - for(; xf < x1; xf++,p.inc_x(), fx+=dfx) - { - //we are in the x portion... use fx - value = fx*get_amount(); - if(value==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - p.put_value(color); - else - p.put_value(Color::blend(color,p.get_value(),value,get_blend_method())); - } - - for(;xf < x2; xf++,p.inc_x()) - { - //we are now in y... use fy - value = fy*get_amount(); - if(value==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - p.put_value(color); - else - p.put_value(Color::blend(color,p.get_value(),value,get_blend_method())); - } - - fx = xfw?(xfw - xf)/xfw:1; - for(;xf < x3 && ; xf++,p.inc_x(), fx-=dfx) - { - //we are in the x portion... use fx - value = max(0,fx*get_amount()); - if(value==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - p.put_value(color); - else - p.put_value(Color::blend(color,p.get_value(),value,get_blend_method())); - } - } - - for() - { - for(int x = x_start; x < x_end; x++) - { - - } - } - -#endif - - // Mark our progress as finished - if(cb && !cb->amount_complete(10000,10000)) - return false; - - return true; -} diff --git a/synfig-core/trunk/src/modules/example/filledrect.h b/synfig-core/trunk/src/modules/example/filledrect.h deleted file mode 100644 index b540105..0000000 --- a/synfig-core/trunk/src/modules/example/filledrect.h +++ /dev/null @@ -1,81 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file filledrect.h -** \brief Header file for implementation of the "Rectangle" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_FILLEDRECT_H -#define __SYNFIG_FILLEDRECT_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class FilledRect : public synfig::Layer_Composite -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - synfig::Color color; - - synfig::Point point1; - synfig::Point point2; - - synfig::Real feather_x; - synfig::Real feather_y; - - synfig::Real bevel; - - bool bevCircle; - - bool get_color(const synfig::Point &pos, synfig::Color &out, synfig::Real &outamount)const; - -public: - - FilledRect(); - - virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); - - virtual synfig::ValueBase get_param(const synfig::String & param)const; - - virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; - - virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; - - virtual Vocab get_param_vocab()const; - - virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; -}; // END of class FilledRect - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/example/main.cpp b/synfig-core/trunk/src/modules/example/main.cpp deleted file mode 100644 index 2a57384..0000000 --- a/synfig-core/trunk/src/modules/example/main.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file example/main.cpp -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include "simplecircle.h" -#include "filledrect.h" -#include "metaballs.h" - -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(example) - MODULE_NAME("Example Module") - MODULE_DESCRIPTION("A dummy module that serves as a starting point for writing other modules.") - MODULE_AUTHOR("Robert B. Quattlebaum") - MODULE_VERSION("1.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(example) - BEGIN_LAYERS - LAYER(SimpleCircle) - LAYER(FilledRect) - LAYER(Metaballs) - END_LAYERS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/example/metaballs.cpp b/synfig-core/trunk/src/modules/example/metaballs.cpp deleted file mode 100644 index 0cfa6c3..0000000 --- a/synfig-core/trunk/src/modules/example/metaballs.cpp +++ /dev/null @@ -1,252 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file metaballs.cpp -** \brief Implementation of the "Metaballs" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "metaballs.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace etl; -using namespace std; -using namespace synfig; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Metaballs); -SYNFIG_LAYER_SET_NAME(Metaballs,"metaballs"); -SYNFIG_LAYER_SET_LOCAL_NAME(Metaballs,N_("Metaballs")); -SYNFIG_LAYER_SET_CATEGORY(Metaballs,N_("Example")); -SYNFIG_LAYER_SET_VERSION(Metaballs,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Metaballs,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -Metaballs::Metaballs(): - Layer_Composite(1.0,Color::BLEND_STRAIGHT), - gradient(Color::black(), Color::white()), - threshold(0), - threshold2(1), - positive(false) -{ - centers.push_back(Point( 0, -1.5)); radii.push_back(2.5); weights.push_back(1); - centers.push_back(Point(-2, 1)); radii.push_back(2.5); weights.push_back(1); - centers.push_back(Point( 2, 1)); radii.push_back(2.5); weights.push_back(1); -} - -bool -Metaballs::set_param(const String & param, const ValueBase &value) -{ - if( param=="centers" && value.same_type_as(centers)) - { - centers = value; - return true; - } - - if( param=="weights" && value.same_type_as(weights)) - { - weights = value; - return true; - } - - if( param=="radii" && value.same_type_as(radii)) - { - radii = value; - return true; - } - - IMPORT(gradient); - IMPORT(threshold); - IMPORT(threshold2); - IMPORT(positive); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -Metaballs::get_param(const String ¶m)const -{ - EXPORT(gradient); - - EXPORT(radii); - EXPORT(weights); - EXPORT(centers); - EXPORT(threshold); - EXPORT(threshold2); - EXPORT(positive); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -Metaballs::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("gradient") - .set_local_name(_("Gradient")) - ); - - ret.push_back(ParamDesc("centers") - .set_local_name(_("Points")) - ); - - ret.push_back(ParamDesc("radii") - .set_local_name(_("Radii")) - ); - - ret.push_back(ParamDesc("weights") - .set_local_name(_("Weights")) - ); - - ret.push_back(ParamDesc("threshold") - .set_local_name(_("Gradient Left")) - ); - - ret.push_back(ParamDesc("threshold2") - .set_local_name(_("Gradient Right")) - ); - - ret.push_back(ParamDesc("positive") - .set_local_name(_("Positive Only")) - ); - - return ret; -} - -synfig::Layer::Handle -Metaballs::hit_check(synfig::Context context, const synfig::Point &point)const -{ - Real density(totaldensity(point)); - - if (density <= 0 || density > 1 || get_amount() == 0) - return context.hit_check(point); - - synfig::Layer::Handle tmp; - - if (get_blend_method()==Color::BLEND_BEHIND && (tmp=context.hit_check(point))) - return tmp; - - if (Color::is_onto(get_blend_method()) && !(context.hit_check(point))) - return 0; - - return const_cast(this); -} - -Real -Metaballs::densityfunc(const synfig::Point &p, const synfig::Point &c, Real R)const -{ - const Real dx = p[0] - c[0]; - const Real dy = p[1] - c[1]; - - const Real n = (1 - (dx*dx + dy*dy)/(R*R)); - if (positive && n < 0) return 0; - return (n*n*n); - - /* - f(d) = (1 - d^2)^3 - f'(d) = -6d * (1 - d^2)^2 - - could use this too... - f(d) = (1 - d^2)^2 - f'(d) = -6d * (1 - d^2) - */ -} - -Real -Metaballs::totaldensity(const Point &pos)const -{ - Real density = 0; - - //sum up weighted functions - for(unsigned int i=0;ierror(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); - return false; - } - - for(int y = 0; y < h; y++, pos[1] += ph) - { - pos[0] = tl[0]; - for(int x = 0; x < w; x++, pos[0] += pw) - (*surface)[y][x] = Color::blend(gradient(totaldensity(pos)),(*surface)[y][x],get_amount(),get_blend_method()); - } - - // Mark our progress as finished - if(cb && !cb->amount_complete(10000,10000)) - return false; - - return true; -} diff --git a/synfig-core/trunk/src/modules/example/metaballs.h b/synfig-core/trunk/src/modules/example/metaballs.h deleted file mode 100644 index d9ae649..0000000 --- a/synfig-core/trunk/src/modules/example/metaballs.h +++ /dev/null @@ -1,81 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file metaballs.h -** \brief Header file for implementation of the "Metaballs" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_METABALLS_H -#define __SYNFIG_METABALLS_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ -class Metaballs : public synfig::Layer_Composite -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - synfig::Gradient gradient; - - std::vector centers; - std::vector radii; - std::vector weights; - - synfig::Real threshold; - synfig::Real threshold2; - - bool positive; - - synfig::Real densityfunc(const synfig::Point &p, const synfig::Point &c, synfig::Real R)const; - - synfig::Real totaldensity(const synfig::Point &pos)const; - -public: - - Metaballs(); - - virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); - - virtual synfig::ValueBase get_param(const synfig::String & param)const; - - virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; - - virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; - - virtual Vocab get_param_vocab()const; - - virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; -}; // END of class Metaballs - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/example/simplecircle.cpp b/synfig-core/trunk/src/modules/example/simplecircle.cpp deleted file mode 100644 index e2eb896..0000000 --- a/synfig-core/trunk/src/modules/example/simplecircle.cpp +++ /dev/null @@ -1,187 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file simplecircle.cpp -** \brief Implementation of the "Simple Circle" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "simplecircle.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace etl; -using namespace std; -using namespace synfig; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(SimpleCircle); -SYNFIG_LAYER_SET_NAME(SimpleCircle,"simple_circle"); -SYNFIG_LAYER_SET_LOCAL_NAME(SimpleCircle,N_("Simple Circle")); -SYNFIG_LAYER_SET_CATEGORY(SimpleCircle,N_("Example")); -SYNFIG_LAYER_SET_VERSION(SimpleCircle,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(SimpleCircle,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -SimpleCircle::SimpleCircle(): - Layer_Composite(1.0,Color::BLEND_STRAIGHT), - color(Color::black()), - center(0,0), - radius(0.5) -{ -} - -bool -SimpleCircle::set_param(const String & param, const ValueBase &value) -{ - IMPORT(color); - IMPORT(center); - IMPORT(radius); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -SimpleCircle::get_param(const String ¶m)const -{ - EXPORT(color); - EXPORT(center); - EXPORT(radius); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -SimpleCircle::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("color") - .set_local_name(_("Color")) - ); - - ret.push_back(ParamDesc("center") - .set_local_name(_("Center")) - ); - - ret.push_back(ParamDesc("radius") - .set_local_name(_("Radius")) - .set_description(_("This is the radius of the circle")) - .set_origin("center") - ); - - return ret; -} - -Color -SimpleCircle::get_color(Context context, const Point &pos)const -{ - - if((pos-center).mag()(this); - else - return context.hit_check(pos); -} - -/* -bool -SimpleCircle::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - { - // Mark our progress as starting - if(cb && !cb->amount_complete(0,1000)) - return false; - - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - surface->fill(color); - - // Mark our progress as finished - if(cb && !cb->amount_complete(1000,1000)) - return false; - - return true; - } - - SuperCallback supercb(cb,0,9500,10000); - - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - return false; - - int x,y; - - Surface::alpha_pen apen(surface->begin()); - - apen.set_value(color); - apen.set_alpha(get_amount()); - apen.set_blend_method(get_blend_method()); - - for(y=0;yamount_complete(10000,10000)) - return false; - - return true; -} -*/ diff --git a/synfig-core/trunk/src/modules/example/simplecircle.h b/synfig-core/trunk/src/modules/example/simplecircle.h deleted file mode 100644 index 48c555c..0000000 --- a/synfig-core/trunk/src/modules/example/simplecircle.h +++ /dev/null @@ -1,73 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file simplecircle.h -** \brief Header file for implementation of the "Simple Circle" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_SIMPLECIRCLE_H -#define __SYNFIG_SIMPLECIRCLE_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class SimpleCircle : public synfig::Layer_Composite -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - synfig::Color color; - - synfig::Point center; - - synfig::Real radius; - -public: - - SimpleCircle(); - - virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); - - virtual synfig::ValueBase get_param(const synfig::String & param)const; - - virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; - - //virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; - - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - - virtual Vocab get_param_vocab()const; -}; // END of class SimpleCircle - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_freetype/Makefile.am b/synfig-core/trunk/src/modules/lyr_freetype/Makefile.am deleted file mode 100644 index a778e78..0000000 --- a/synfig-core/trunk/src/modules/lyr_freetype/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - -AM_CXXFLAGS = \ - @CXXFLAGS@ \ - @FREETYPE_CFLAGS@ - - -moduledir=@MODULE_DIR@ - -if WITH_FREETYPE - -module_LTLIBRARIES = liblyr_freetype.la - -liblyr_freetype_la_SOURCES = \ - main.cpp \ - lyr_freetype.cpp \ - lyr_freetype.h - -liblyr_freetype_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @FREETYPE_LIBS@ \ - @SYNFIG_LIBS@ - -liblyr_freetype_la_LDFLAGS = \ - -module \ - -no-undefined \ - -avoid-version - -liblyr_freetype_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ \ - @FREETYPE_CFLAGS@ - -if WITH_FONTCONFIG -liblyr_freetype_la_LIBADD += @FONTCONFIG_LIBS@ -liblyr_freetype_la_CXXFLAGS += @FONTCONFIG_CFLAGS@ -endif - -endif - - -EXTRA_DIST = \ - lyr_freetype.nsh \ - unlyr_freetype.nsh diff --git a/synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.cpp b/synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.cpp deleted file mode 100644 index 2da592a..0000000 --- a/synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.cpp +++ /dev/null @@ -1,919 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file lyr_freetype.cpp -** \brief Implementation of the "Text" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2006 Paul Wise -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_LAYER - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif -#ifdef WITH_FONTCONFIG -#include -#endif - -#include "lyr_freetype.h" -#endif - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -#define MAX_GLYPHS 2000 - -#define PANGO_STYLE_NORMAL (0) -#define PANGO_STYLE_OBLIQUE (1) -#define PANGO_STYLE_ITALIC (2) - -#define WEIGHT_NORMAL (400) -#define WEIGHT_BOLD (700) - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Layer_Freetype); -SYNFIG_LAYER_SET_NAME(Layer_Freetype,"text"); -SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Freetype,N_("Text")); -SYNFIG_LAYER_SET_CATEGORY(Layer_Freetype,N_("Other")); -SYNFIG_LAYER_SET_VERSION(Layer_Freetype,"0.2"); -SYNFIG_LAYER_SET_CVS_ID(Layer_Freetype,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/*Glyph::~Glyph() -{ - if(glyph)FT_Done_Glyph(glyph); -} -*/ -void -TextLine::clear_and_free() -{ - std::vector::iterator iter; - for(iter=glyph_table.begin();iter!=glyph_table.end();++iter) - { - if(iter->glyph)FT_Done_Glyph(iter->glyph); - iter->glyph=0; - } - glyph_table.clear(); -} - -/* === M E T H O D S ======================================================= */ - -Layer_Freetype::Layer_Freetype() -{ - face=0; - - size=Vector(0.25,0.25); - text=_("Text Layer"); - color=Color::black(); - origin=Vector(0,0); - orient=Vector(0.5,0.5); - compress=1.0; - vcompress=1.0; - weight=WEIGHT_NORMAL; - style=PANGO_STYLE_NORMAL; - family="Sans Serif"; - use_kerning=true; - grid_fit=false; - old_version=false; - set_blend_method(Color::BLEND_COMPOSITE); - needs_sync_=true; - - new_font(family,style,weight); - - invert=false; -} - -Layer_Freetype::~Layer_Freetype() -{ - if(face) - FT_Done_Face(face); -} - -void -Layer_Freetype::new_font(const synfig::String &family, int style, int weight) -{ - if( - !new_font_(family,style,weight) && - !new_font_(family,style,WEIGHT_NORMAL) && - !new_font_(family,PANGO_STYLE_NORMAL,weight) && - !new_font_(family,PANGO_STYLE_NORMAL,WEIGHT_NORMAL) && - !new_font_("sans serif",style,weight) && - !new_font_("sans serif",style,WEIGHT_NORMAL) && - !new_font_("sans serif",PANGO_STYLE_NORMAL,weight) - ) - new_font_("sans serif",PANGO_STYLE_NORMAL,WEIGHT_NORMAL); -} - -bool -Layer_Freetype::new_font_(const synfig::String &font_fam_, int style, int weight) -{ - synfig::String font_fam(font_fam_); - - if(new_face(font_fam_)) - return true; - - //start evil hack - for(unsigned int i=0;iWEIGHT_NORMAL) - arial+='b'; - if(style==PANGO_STYLE_ITALIC||style==PANGO_STYLE_OBLIQUE) - arial+='i'; - else - if(weight>WEIGHT_NORMAL) arial+='d'; - - if(new_face(arial)) - return true; -#ifdef __APPLE__ - if(new_face("Helvetica RO")) - return true; -#endif - } - - if(font_fam=="comic" || font_fam=="comic sans") - { - String filename("comic"); - if(weight>WEIGHT_NORMAL) - filename+='b'; - if(style==PANGO_STYLE_ITALIC||style==PANGO_STYLE_OBLIQUE) - filename+='i'; - else if(weight>WEIGHT_NORMAL) filename+='d'; - - if(new_face(filename)) - return true; - } - - if(font_fam=="courier" || font_fam=="courier new") - { - String filename("cour"); - if(weight>WEIGHT_NORMAL) - filename+='b'; - if(style==PANGO_STYLE_ITALIC||style==PANGO_STYLE_OBLIQUE) - filename+='i'; - else if(weight>WEIGHT_NORMAL) filename+='d'; - - if(new_face(filename)) - return true; - } - - if(font_fam=="serif" || font_fam=="times" || font_fam=="times new roman") - { - String filename("times"); - if(weight>WEIGHT_NORMAL) - filename+='b'; - if(style==PANGO_STYLE_ITALIC||style==PANGO_STYLE_OBLIQUE) - filename+='i'; - else if(weight>WEIGHT_NORMAL) filename+='d'; - - if(new_face(filename)) - return true; - } - - if(font_fam=="trebuchet") - { - String filename("trebuc"); - if(weight>WEIGHT_NORMAL) - filename+='b'; - if(style==PANGO_STYLE_ITALIC||style==PANGO_STYLE_OBLIQUE) - { - filename+='i'; - if(weight<=WEIGHT_NORMAL) filename+='t'; - } - else if(weight>WEIGHT_NORMAL) filename+='d'; - - if(new_face(filename)) - return true; - } - - if(font_fam=="sans serif" || font_fam=="luxi sans") - { - { - String luxi("luxis"); - if(weight>WEIGHT_NORMAL) - luxi+='b'; - else - luxi+='r'; - if(style==PANGO_STYLE_ITALIC||style==PANGO_STYLE_OBLIQUE) - luxi+='i'; - - if(new_face(luxi)) - return true; - } - if(new_face("arial")) - return true; - if(new_face("Arial")) - return true; - } - if(font_fam=="serif" || font_fam=="times" || font_fam=="times new roman" || font_fam=="luxi serif") - { - { - String luxi("luxir"); - if(weight>WEIGHT_NORMAL) - luxi+='b'; - else - luxi+='r'; - if(style==PANGO_STYLE_ITALIC||style==PANGO_STYLE_OBLIQUE) - luxi+='i'; - - if(new_face(luxi)) - return true; - } - if(new_face("Times New Roman")) - return true; - if(new_face("Times")) - return true; - } - if(font_fam=="luxi") - { - { - String luxi("luxim"); - if(weight>WEIGHT_NORMAL) - luxi+='b'; - else - luxi+='r'; - if(style==PANGO_STYLE_ITALIC||style==PANGO_STYLE_OBLIQUE) - luxi+='i'; - - if(new_face(luxi)) - return true; - } - - if(new_face("Times New Roman")) - return true; - if(new_face("Times")) - return true; - } - - return new_face(font_fam_) || new_face(font_fam); - - return false; -} - -#ifdef USE_MAC_FT_FUNCS -void fss2path(char *path, FSSpec *fss) -{ - int l; //fss->name contains name of last item in path - for(l=0; l<(fss->name[0]); l++) path[l] = fss->name[l + 1]; - path[l] = 0; - - if(fss->parID != fsRtParID) //path is more than just a volume name - { - int i, len; - CInfoPBRec pb; - - pb.dirInfo.ioNamePtr = fss->name; - pb.dirInfo.ioVRefNum = fss->vRefNum; - pb.dirInfo.ioDrParID = fss->parID; - do - { - pb.dirInfo.ioFDirIndex = -1; //get parent directory name - pb.dirInfo.ioDrDirID = pb.dirInfo.ioDrParID; - if(PBGetCatInfoSync(&pb) != noErr) break; - - len = fss->name[0] + 1; - for(i=l; i>=0; i--) path[i + len] = path[i]; - for(i=1; iname[i]; //add to start of path - path[i - 1] = ':'; - l += len; -} while(pb.dirInfo.ioDrDirID != fsRtDirID); //while more directory levels - } -} -#endif - -bool -Layer_Freetype::new_face(const String &newfont) -{ - int error; - FT_Long face_index=0; - - // If we are already loaded, don't bother reloading. - if(face && font==newfont) - return true; - - if(face) - { - FT_Done_Face(face); - face=0; - } - - error=FT_New_Face(ft_library,newfont.c_str(),face_index,&face); - if(error)error=FT_New_Face(ft_library,(newfont+".ttf").c_str(),face_index,&face); - - if(get_canvas()) - { - if(error)error=FT_New_Face(ft_library,(get_canvas()->get_file_path()+ETL_DIRECTORY_SEPARATOR+newfont).c_str(),face_index,&face); - if(error)error=FT_New_Face(ft_library,(get_canvas()->get_file_path()+ETL_DIRECTORY_SEPARATOR+newfont+".ttf").c_str(),face_index,&face); - } - -#ifdef USE_MAC_FT_FUNCS - if(error) - { - FSSpec fs_spec; - error=FT_GetFile_From_Mac_Name(newfont.c_str(),&fs_spec,&face_index); - if(!error) - { - char filename[512]; - fss2path(filename,&fs_spec); - //FSSpecToNativePathName(fs_spec,filename,sizeof(filename)-1, 0); - - error=FT_New_Face(ft_library, filename, face_index,&face); - //error=FT_New_Face_From_FSSpec(ft_library, &fs_spec, face_index,&face); - synfig::info(__FILE__":%d: \"%s\" (%s) -- ft_error=%d",__LINE__,newfont.c_str(),filename,error); - } - else - { - synfig::info(__FILE__":%d: \"%s\" -- ft_error=%d",__LINE__,newfont.c_str(),error); - // Unable to generate fs_spec - } - } -#endif - -#ifdef WITH_FONTCONFIG - if(error) - { - FcFontSet *fs; - FcResult result; - if( !FcInit() ) - { - synfig::warning("Layer_Freetype: fontconfig: %s",_("unable to initialize")); - error = 1; - } else { - FcPattern* pat = FcNameParse((FcChar8 *) newfont.c_str()); - FcConfigSubstitute(0, pat, FcMatchPattern); - FcDefaultSubstitute(pat); - FcPattern *match; - fs = FcFontSetCreate(); - match = FcFontMatch(0, pat, &result); - if (match) - FcFontSetAdd(fs, match); - if (pat) - FcPatternDestroy(pat); - if(fs){ - FcChar8* file; - if( FcPatternGetString (fs->fonts[0], FC_FILE, 0, &file) == FcResultMatch ) - error=FT_New_Face(ft_library,(const char*)file,face_index,&face); - FcFontSetDestroy(fs); - } else - synfig::warning("Layer_Freetype: fontconfig: %s",_("empty font set")); - } - } -#endif - -#ifdef WIN32 - if(error)error=FT_New_Face(ft_library,("C:\\WINDOWS\\FONTS\\"+newfont).c_str(),face_index,&face); - if(error)error=FT_New_Face(ft_library,("C:\\WINDOWS\\FONTS\\"+newfont+".ttf").c_str(),face_index,&face); -#else - -#ifdef __APPLE__ - if(error)error=FT_New_Face(ft_library,("~/Library/Fonts/"+newfont).c_str(),face_index,&face); - if(error)error=FT_New_Face(ft_library,("~/Library/Fonts/"+newfont+".ttf").c_str(),face_index,&face); - if(error)error=FT_New_Face(ft_library,("~/Library/Fonts/"+newfont+".dfont").c_str(),face_index,&face); - - if(error)error=FT_New_Face(ft_library,("/Library/Fonts/"+newfont).c_str(),face_index,&face); - if(error)error=FT_New_Face(ft_library,("/Library/Fonts/"+newfont+".ttf").c_str(),face_index,&face); - if(error)error=FT_New_Face(ft_library,("/Library/Fonts/"+newfont+".dfont").c_str(),face_index,&face); -#endif - - if(error)error=FT_New_Face(ft_library,("/usr/X11R6/lib/X11/fonts/type1/"+newfont).c_str(),face_index,&face); - if(error)error=FT_New_Face(ft_library,("/usr/X11R6/lib/X11/fonts/type1/"+newfont+".ttf").c_str(),face_index,&face); - - if(error)error=FT_New_Face(ft_library,("/usr/share/fonts/truetype/"+newfont).c_str(),face_index,&face); - if(error)error=FT_New_Face(ft_library,("/usr/share/fonts/truetype/"+newfont+".ttf").c_str(),face_index,&face); - - if(error)error=FT_New_Face(ft_library,("/usr/X11R6/lib/X11/fonts/TTF/"+newfont).c_str(),face_index,&face); - if(error)error=FT_New_Face(ft_library,("/usr/X11R6/lib/X11/fonts/TTF/"+newfont+".ttf").c_str(),face_index,&face); - - if(error)error=FT_New_Face(ft_library,("/usr/X11R6/lib/X11/fonts/truetype/"+newfont).c_str(),face_index,&face); - if(error)error=FT_New_Face(ft_library,("/usr/X11R6/lib/X11/fonts/truetype/"+newfont+".ttf").c_str(),face_index,&face); - -#endif - if(error) - { - //synfig::error(strprintf("Layer_Freetype:%s (err=%d)",_("Unable to open face."),error)); - return false; - } - - font=newfont; - - needs_sync_=true; - return true; -} - -bool -Layer_Freetype::set_param(const String & param, const ValueBase &value) -{ - Mutex::Lock lock(mutex); -/* - if(param=="font" && value.same_type_as(font)) - { - new_font(etl::basename(value.get(font)),style,weight); - family=etl::basename(value.get(font)); - return true; - } -*/ - IMPORT_PLUS(family,new_font(family,style,weight)); - IMPORT_PLUS(weight,new_font(family,style,weight)); - IMPORT_PLUS(style,new_font(family,style,weight)); - IMPORT_PLUS(size, if(old_version){size/=2.0;} needs_sync_=true ); - IMPORT_PLUS(text,needs_sync_=true); - IMPORT_PLUS(origin,needs_sync_=true); - IMPORT_PLUS(color, { if (color.get_a() == 0) { if (converted_blend_) { - set_blend_method(Color::BLEND_ALPHA_OVER); - color.set_a(1); } else transparent_color_ = true; } }); - IMPORT(invert); - IMPORT_PLUS(orient,needs_sync_=true); - IMPORT_PLUS(compress,needs_sync_=true); - IMPORT_PLUS(vcompress,needs_sync_=true); - IMPORT_PLUS(use_kerning,needs_sync_=true); - IMPORT_PLUS(grid_fit,needs_sync_=true); - - IMPORT_AS(origin,"pos"); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -Layer_Freetype::get_param(const String& param)const -{ - EXPORT(font); - EXPORT(family); - EXPORT(style); - EXPORT(weight); - EXPORT(size); - EXPORT(text); - EXPORT(color); - EXPORT(origin); - EXPORT(orient); - EXPORT(compress); - EXPORT(vcompress); - EXPORT(use_kerning); - EXPORT(grid_fit); - EXPORT(invert); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -Layer_Freetype::get_param_vocab(void)const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("text") - .set_local_name(_("Text")) - .set_description(_("Text to Render")) - .set_hint("paragraph") - ); - - ret.push_back(ParamDesc("color") - .set_local_name(_("Color")) - .set_description(_("Color of the text")) - ); - - ret.push_back(ParamDesc("family") - .set_local_name(_("Font Family")) - .set_hint("font_family") - ); - - ret.push_back(ParamDesc("style") - .set_local_name(_("Style")) - .set_hint("enum") - .add_enum_value(PANGO_STYLE_NORMAL, "normal" ,_("Normal")) - .add_enum_value(PANGO_STYLE_OBLIQUE, "oblique" ,_("Oblique")) - .add_enum_value(PANGO_STYLE_ITALIC, "italic" ,_("Italic")) - ); - - ret.push_back(ParamDesc("weight") - .set_local_name(_("Weight")) - .set_hint("enum") - .add_enum_value(200, "ultralight" ,_("Ultralight")) - .add_enum_value(300, "light" ,_("light")) - .add_enum_value(400, "normal" ,_("Normal")) - .add_enum_value(700, "bold" ,_("Bold")) - .add_enum_value(800, "ultrabold" ,_("Ultrabold")) - .add_enum_value(900, "heavy" ,_("Heavy")) - ); - ret.push_back(ParamDesc("compress") - .set_local_name(_("Horizontal Spacing")) - .set_description(_("Describes how close glyphs are horizontally")) - ); - - ret.push_back(ParamDesc("vcompress") - .set_local_name(_("Vertical Spacing")) - .set_description(_("Describes how close lines of text are vertically")) - ); - - ret.push_back(ParamDesc("size") - .set_local_name(_("Size")) - .set_description(_("Size of the text")) - .set_hint("size") - .set_origin("origin") - .set_scalar(1) - ); - - ret.push_back(ParamDesc("orient") - .set_local_name(_("Orientation")) - .set_description(_("Text Orientation")) - .set_invisible_duck() - ); - - ret.push_back(ParamDesc("origin") - .set_local_name(_("Origin")) - .set_description(_("Text Position")) - ); - - ret.push_back(ParamDesc("font") - .set_local_name(_("Font")) - .set_description(_("Filename of the font to use")) - .set_hint("filename") - .not_critical() - .hidden() - ); - - ret.push_back(ParamDesc("use_kerning") - .set_local_name(_("Kerning")) - .set_description(_("Enables/Disables font kerning (If the font supports it)")) - ); - - ret.push_back(ParamDesc("grid_fit") - .set_local_name(_("Sharpen Edges")) - .set_description(_("Turn this off if you are going to be animating the text")) - ); - ret.push_back(ParamDesc("invert") - .set_local_name(_("Invert")) - ); - return ret; -} - -void -Layer_Freetype::sync() -{ - needs_sync_=false; -} - -inline Color -Layer_Freetype::color_func(const Point &point_ __attribute__ ((unused)), int quality __attribute__ ((unused)), float supersample __attribute__ ((unused)))const -{ - if (invert) - return color; - else - return Color::alpha(); -} - -Color -Layer_Freetype::get_color(Context context, const synfig::Point &pos)const -{ - if(needs_sync_) - const_cast(this)->sync(); - - const Color color(color_func(pos,0)); - - if(!face) - return context.get_color(pos); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - return color; - else - return Color::blend(color,context.get_color(pos),get_amount(),get_blend_method()); -} - -bool -Layer_Freetype::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - static synfig::RecMutex freetype_mutex; - - if(needs_sync_) - const_cast(this)->sync(); - - int error; - Vector size(Layer_Freetype::size*2); - - if(!context.accelerated_render(surface,quality,renddesc,cb)) - return false; - - if(is_disabled() || text.empty()) - return true; - - // If there is no font loaded, just bail - if(!face) - { - if(cb)cb->warning(string("Layer_Freetype:")+_("No face loaded, no text will be rendered.")); - return true; - } - - String text(Layer_Freetype::text); - if(text=="@_FILENAME_@" && get_canvas() && !get_canvas()->get_file_name().empty()) - { - text=basename(get_canvas()->get_file_name()); - } - - // Width and Height of a pixel - Vector::value_type pw=renddesc.get_w()/(renddesc.get_br()[0]-renddesc.get_tl()[0]); - Vector::value_type ph=renddesc.get_h()/(renddesc.get_br()[1]-renddesc.get_tl()[1]); - - // Calculate character width and height - int w=abs(round_to_int(size[0]*pw)); - int h=abs(round_to_int(size[1]*ph)); - - //int bx=(int)((origin[0]-renddesc.get_tl()[0])*pw*64+0.5); - //int by=(int)((origin[1]-renddesc.get_tl()[1])*ph*64+0.5); - int bx=0; - int by=0; - - // If the font is the size of a pixel, don't bother rendering any text - if(w<=1 || h<=1) - { - if(cb)cb->warning(string("Layer_Freetype:")+_("Text too small, no text will be rendered.")); - return true; - } - - synfig::RecMutex::Lock lock(freetype_mutex); - -#define CHAR_RESOLUTION (64) - error = FT_Set_Char_Size( - face, // handle to face object - (int)CHAR_RESOLUTION, // char_width in 1/64th of points - (int)CHAR_RESOLUTION, // char_height in 1/64th of points - round_to_int(abs(size[0]*pw*CHAR_RESOLUTION)), // horizontal device resolution - round_to_int(abs(size[1]*ph*CHAR_RESOLUTION)) ); // vertical device resolution - - // Here is where we can compensate for the - // error in freetype's rendering engine. - const float xerror(abs(size[0]*pw)/(float)face->size->metrics.x_ppem/1.13f/0.996); - const float yerror(abs(size[1]*ph)/(float)face->size->metrics.y_ppem/1.13f/0.996); - //synfig::info("xerror=%f, yerror=%f",xerror,yerror); - const float compress(Layer_Freetype::compress*xerror); - const float vcompress(Layer_Freetype::vcompress*yerror); - - if(error) - { - if(cb)cb->warning(string("Layer_Freetype:")+_("Unable to set face size.")+strprintf(" (err=%d)",error)); - } - - FT_GlyphSlot slot = face->glyph; // a small shortcut - FT_UInt glyph_index(0); - FT_UInt previous(0); - int u,v; - - std::list lines; - - /* - -- ** -- CREATE GLYPHS ------------------------------------------------------- - */ - - mbstate_t ps; - memset(&ps, 0, sizeof(ps)); - - lines.push_front(TextLine()); - string::const_iterator iter; - for (iter=text.begin(); iter!=text.end(); ++iter) - { - int multiplier(1); - if(*iter=='\n') - { - lines.push_front(TextLine()); - bx=0; - by=0; - previous=0; - continue; - } - if(*iter=='\t') - { - multiplier=8; - glyph_index = FT_Get_Char_Index( face, ' ' ); - } - else - { - wchar_t wc; - size_t converted = mbrtowc(&wc, &(*iter), text.end() - iter, &ps); - - if(converted == (size_t)(-1)) - { - synfig::warning("Layer_Freetype: multibyte: %s", - _("Invalid multibyte sequence - is the locale set?\n")); - continue; - } - - if(converted == (size_t)(-2)) - { - synfig::warning("Layer_Freetype: multibyte: %s", - _("Can't parse multibyte character.\n")); - continue; - } - - glyph_index = FT_Get_Char_Index( face, wc ); - - if(converted > 1) - iter += converted - 1; - } - - // retrieve kerning distance and move pen position - if ( FT_HAS_KERNING(face) && use_kerning && previous && glyph_index ) - { - FT_Vector delta; - - if(grid_fit) - FT_Get_Kerning( face, previous, glyph_index, ft_kerning_default, &delta ); - else - FT_Get_Kerning( face, previous, glyph_index, ft_kerning_unfitted, &delta ); - - if(compress<1.0f) - { - bx += round_to_int(delta.x*compress); - by += round_to_int(delta.y*compress); - } - else - { - bx += delta.x; - by += delta.y; - } - } - - Glyph curr_glyph; - - // store current pen position - curr_glyph.pos.x = bx; - curr_glyph.pos.y = by; - - // load glyph image into the slot. DO NOT RENDER IT !! - if(grid_fit) - error = FT_Load_Glyph( face, glyph_index, FT_LOAD_DEFAULT); - else - error = FT_Load_Glyph( face, glyph_index, FT_LOAD_DEFAULT|FT_LOAD_NO_HINTING ); - if (error) continue; // ignore errors, jump to next glyph - - // extract glyph image and store it in our table - error = FT_Get_Glyph( face->glyph, &curr_glyph.glyph ); - if (error) continue; // ignore errors, jump to next glyph - - // record current glyph index - previous = glyph_index; - - // Update the line width - lines.front().width=bx+slot->advance.x; - - // increment pen position - if(multiplier>1) - bx += round_to_int(slot->advance.x*multiplier*compress)-bx%round_to_int(slot->advance.x*multiplier*compress); - else - bx += round_to_int(slot->advance.x*compress*multiplier); - - //bx += round_to_int(slot->advance.x*compress*multiplier); - //by += round_to_int(slot->advance.y*compress); - by += slot->advance.y*multiplier; - - lines.front().glyph_table.push_back(curr_glyph); - - } - - //float string_height; - //string_height=(((lines.size()-1)*face->size->metrics.height+lines.back().actual_height())); - - //int string_height=face->size->metrics.ascender; -//#define METRICS_SCALE_ONE (65536.0f) -#define METRICS_SCALE_ONE ((float)(1<<16)) - - float line_height; - line_height=vcompress*((float)face->height*(((float)face->size->metrics.y_scale/METRICS_SCALE_ONE))); - - // This module sees to expect pixel height to be negative, as it - // usually is. But rendering to .bmp format causes ph to be - // positive, which was causing text to be rendered upside down. - if (ph>0) line_height = -line_height; - - int string_height; - string_height=round_to_int(((lines.size()-1)*line_height+lines.back().actual_height())); - //synfig::info("string_height=%d",string_height); - //synfig::info("line_height=%f",line_height); - - /* - -- ** -- RENDER THE GLYPHS --------------------------------------------------- - */ - - Surface src_; - Surface *src_surface; - - src_surface=surface; - - if(invert) - { - src_=*surface; - Surface::alpha_pen pen(surface->begin(),get_amount(),get_blend_method()); - - surface->fill(color,pen,src_.get_w(),src_.get_h()); - - src_surface=&src_; - } - - { - std::list::iterator iter; - int curr_line; - for(curr_line=0,iter=lines.begin();iter!=lines.end();++iter,curr_line++) - { - bx=round_to_int((origin[0]-renddesc.get_tl()[0])*pw*CHAR_RESOLUTION-orient[0]*iter->width); - // I've no idea why 1.5, but it kind of works. Otherwise, - // rendering to .bmp (which renders from bottom to top, due to - // the .bmp format describing the image from bottom to top, - // renders text in the wrong place. - by=round_to_int((origin[1]-renddesc.get_tl()[1])*ph*CHAR_RESOLUTION + - (1.0-orient[1])*string_height-line_height*curr_line + - ((ph>0) ? line_height/1.5 : 0)); - - //by=round_to_int(vcompress*((origin[1]-renddesc.get_tl()[1])*ph*64+(1.0-orient[1])*string_height-face->size->metrics.height*curr_line)); - //synfig::info("curr_line=%d, bx=%d, by=%d",curr_line,bx,by); - - std::vector::iterator iter2; - for(iter2=iter->glyph_table.begin();iter2!=iter->glyph_table.end();++iter2) - { - FT_Glyph image(iter2->glyph); - FT_Vector pen; - FT_BitmapGlyph bit; - - pen.x = bx + iter2->pos.x; - pen.y = by + iter2->pos.y; - - //synfig::info("GLYPH: line %d, pen.x=%d, pen,y=%d",curr_line,(pen.x+32)>>6,(pen.y+32)>>6); - - error = FT_Glyph_To_Bitmap( &image, ft_render_mode_normal,0/*&pen*/, 1 ); - if(error) { FT_Done_Glyph( image ); continue; } - - bit = (FT_BitmapGlyph)image; - - for(v=0;vbitmap.rows;v++) - for(u=0;ubitmap.width;u++) - { - int x=u+((pen.x+32)>>6)+ bit->left; - int y=((pen.y+32)>>6) + (bit->top - v) * ((ph<0) ? -1 : 1); - if( y>=0 && - x>=0 && - yget_h() && - xget_w()) - { - float myamount=(float)bit->bitmap.buffer[v*bit->bitmap.pitch+u]/255.0f; - if(invert) - myamount=1.0f-myamount; - (*surface)[y][x]=Color::blend(color,(*src_surface)[y][x],myamount*get_amount(),get_blend_method()); - } - } - - FT_Done_Glyph( image ); - } - //iter->clear_and_free(); - } - } - - return true; -} - -synfig::Rect -Layer_Freetype::get_bounding_rect()const -{ - if(needs_sync_) - const_cast(this)->sync(); -// if(!is_disabled()) - return synfig::Rect::full_plane(); -} diff --git a/synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.h b/synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.h deleted file mode 100644 index 81261bc..0000000 --- a/synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.h +++ /dev/null @@ -1,167 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file lyr_freetype.h -** \brief Header file for implementation of the "Text" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_LYR_FREETYPE_H -#define __SYNFIG_LYR_FREETYPE_H - -/* === H E A D E R S ======================================================= */ - -//#ifdef __APPLE__ -//#define USE_MAC_FT_FUNCS (1) -//#endif - -#include -#include -#include -#include - -#include -#include FT_FREETYPE_H -#include FT_GLYPH_H -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#include - -#ifdef USE_MAC_FT_FUNCS - #include - #include FT_MAC_H -#endif - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - - -struct Glyph -{ - FT_Glyph glyph; - FT_Vector pos; - //int width; -}; -struct TextLine -{ - int width; - std::vector glyph_table; - - TextLine():width(0) { } - void clear_and_free(); - - int actual_height()const - { - int height(0); - - std::vector::const_iterator iter; - for(iter=glyph_table.begin();iter!=glyph_table.end();++iter) - { - FT_BBox glyph_bbox; - - //FT_Glyph_Get_CBox( glyphs[n], ft_glyph_bbox_pixels, &glyph_bbox ); - FT_Glyph_Get_CBox( iter->glyph, ft_glyph_bbox_subpixels, &glyph_bbox ); - - if(glyph_bbox.yMax>height) - height=glyph_bbox.yMax; - } - return height; - } -}; - - -class Layer_Freetype : public synfig::Layer_Composite, public synfig::Layer_NoDeform -{ - SYNFIG_LAYER_MODULE_EXT -private: - - FT_Face face; - synfig::String font; - synfig::String family; - synfig::String text; - synfig::Vector size; - synfig::Vector orient; - synfig::Color color; - synfig::Point origin; - synfig::Real compress; - synfig::Real vcompress; - - int style; - int weight; - bool use_kerning; - bool grid_fit; - bool invert; - - bool old_version; - bool needs_sync_; - - void sync(); - - synfig::Color color_func(const synfig::Point &x, int quality=10, float supersample=0)const; - - mutable synfig::Mutex mutex; - -public: - Layer_Freetype(); - virtual ~Layer_Freetype(); - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - virtual ValueBase get_param(const String & param)const; - virtual Color get_color(Context context, const synfig::Point &pos)const; - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - - virtual Vocab get_param_vocab()const; - - virtual bool set_version(const String &ver){if(ver=="0.1")old_version=true;return true;} - virtual void reset_version(){old_version=false;} - - virtual synfig::Rect get_bounding_rect()const; - -private: - void new_font(const synfig::String &family, int style=0, int weight=400); - bool new_font_(const synfig::String &family, int style=0, int weight=400); - bool new_face(const synfig::String &newfont); -}; - -extern FT_Library ft_library; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.nsh b/synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.nsh deleted file mode 100644 index 8188231..0000000 --- a/synfig-core/trunk/src/modules/lyr_freetype/lyr_freetype.nsh +++ /dev/null @@ -1,21 +0,0 @@ -; The stuff to install -Section "lyr_freetype" Sec_lyr_freetype - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=lyr_freetype.dll "src\modules\lyr_freetype\.libs\liblyr_freetype.dll" - - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "lyr_freetype" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd - diff --git a/synfig-core/trunk/src/modules/lyr_freetype/main.cpp b/synfig-core/trunk/src/modules/lyr_freetype/main.cpp deleted file mode 100644 index 469beb8..0000000 --- a/synfig-core/trunk/src/modules/lyr_freetype/main.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file lyr_freetype/main.cpp -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include "lyr_freetype.h" -#include -#include - -#include -#include FT_FREETYPE_H - -#endif - -using namespace etl; -using namespace std; -using namespace synfig; - -FT_Library ft_library; - -/* === E N T R Y P O I N T ================================================= */ - -bool freetype_constructor(synfig::ProgressCallback *cb) -{ - int error; - if(cb)cb->task("Initializing FreeType..."); - if ( (error = FT_Init_FreeType( &ft_library )) ) - { - if(cb)cb->error(strprintf("Layer_Freetype: FreeType initialization failed. (err=%d)",error)); - return false; - } - return true; -} - -void freetype_destructor() -{ - std::cerr<<"freetype_destructor()"< -#endif - -#include "bevel.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#endif - -using namespace synfig; -using namespace etl; -using namespace std; - -/*#define TYPE_BOX 0 -#define TYPE_FASTGUASSIAN 1 -#define TYPE_FASTGAUSSIAN 1 -#define TYPE_CROSS 2 -#define TYPE_GUASSIAN 3 -#define TYPE_GAUSSIAN 3 -#define TYPE_DISC 4 -*/ - -/* -- G L O B A L S --------------------------------------------------------- */ - -SYNFIG_LAYER_INIT(Layer_Bevel); -SYNFIG_LAYER_SET_NAME(Layer_Bevel,"bevel"); -SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Bevel,N_("Bevel")); -SYNFIG_LAYER_SET_CATEGORY(Layer_Bevel,N_("Stylize")); -SYNFIG_LAYER_SET_VERSION(Layer_Bevel,"0.2"); -SYNFIG_LAYER_SET_CVS_ID(Layer_Bevel,"$Id$"); - -/* -- F U N C T I O N S ----------------------------------------------------- */ - -inline void clamp(synfig::Vector &v) -{ - if(v[0]<0.0)v[0]=0.0; - if(v[1]<0.0)v[1]=0.0; -} - -Layer_Bevel::Layer_Bevel(): - Layer_Composite (0.75,Color::BLEND_ONTO), - softness(0.1), - type(Blur::FASTGAUSSIAN), - color1(Color::white()), - color2(Color::black()), - depth(0.2) -{ - angle=Angle::deg(135); - calc_offset(); - use_luma=false; - solid=false; -} - -void -Layer_Bevel::calc_offset() -{ - offset[0]=Angle::cos(angle).get()*depth; - offset[1]=Angle::sin(angle).get()*depth; - - offset45[0]=Angle::cos(angle-Angle::deg(45)).get()*depth*0.707106781; - offset45[1]=Angle::sin(angle-Angle::deg(45)).get()*depth*0.707106781; -} - -bool -Layer_Bevel::set_param(const String ¶m, const ValueBase &value) -{ - IMPORT_PLUS(softness,softness=softness>0?softness:0); - IMPORT(color1); - IMPORT(color2); - IMPORT_PLUS(depth,calc_offset()); - IMPORT_PLUS(angle,calc_offset()); - IMPORT(type); - IMPORT(use_luma); - IMPORT(solid); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -Layer_Bevel::get_param(const String ¶m)const -{ - EXPORT(type); - EXPORT(softness); - EXPORT(color1); - EXPORT(color2); - EXPORT(depth); - EXPORT(angle); - EXPORT(use_luma); - EXPORT(solid); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Color -Layer_Bevel::get_color(Context context, const Point &pos)const -{ - const Vector size(softness,softness); - Point blurpos = Blur(size,type)(pos); - - if(get_amount()==0.0) - return context.get_color(pos); - - Color shade; - - Real hi_alpha(1.0f-context.get_color(blurpos+offset).get_a()); - Real lo_alpha(1.0f-context.get_color(blurpos-offset).get_a()); - - Real shade_alpha(hi_alpha-lo_alpha); - if(shade_alpha>0) - shade=color1,shade.set_a(shade_alpha); - else - shade=color2,shade.set_a(-shade_alpha); - - return Color::blend(shade,context.get_color(pos),get_amount(),get_blend_method()); -} - -bool -Layer_Bevel::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - int x,y; - SuperCallback stageone(cb,0,5000,10000); - SuperCallback stagetwo(cb,5000,10000,10000); - - const int w = renddesc.get_w(), - h = renddesc.get_h(); - const Real pw = renddesc.get_pw(), - ph = renddesc.get_ph(); - const Vector size(softness,softness); - - RendDesc workdesc(renddesc); - Surface worksurface; - etl::surface blurred; - - //callbacks depend on how long the blur takes - if(size[0] || size[1]) - { - if(type == Blur::DISC) - { - stageone = SuperCallback(cb,0,5000,10000); - stagetwo = SuperCallback(cb,5000,10000,10000); - } - else - { - stageone = SuperCallback(cb,0,9000,10000); - stagetwo = SuperCallback(cb,9000,10000,10000); - } - } - else - { - stageone = SuperCallback(cb,0,9999,10000); - stagetwo = SuperCallback(cb,9999,10000,10000); - } - - //expand the working surface to accommodate the blur - - //the expanded size = 1/2 the size in each direction rounded up - int halfsizex = (int) (abs(size[0]*.5/pw) + 3), - halfsizey = (int) (abs(size[1]*.5/ph) + 3); - - int offset_u(round_to_int(offset[0]/pw)),offset_v(round_to_int(offset[1]/ph)); - int offset_w(w+abs(offset_u)*2),offset_h(h+abs(offset_v)*2); - - workdesc.set_subwindow( - -abs(offset_u), - -abs(offset_v), - w+abs(offset_u), - h+abs(offset_v) - ); - - //expand by 1/2 size in each direction on either side - switch(type) - { - case Blur::DISC: - case Blur::BOX: - case Blur::CROSS: - { - workdesc.set_subwindow(-max(1,halfsizex),-max(1,halfsizey),offset_w+2*max(1,halfsizex),offset_h+2*max(1,halfsizey)); - break; - } - case Blur::FASTGAUSSIAN: - { - if(quality < 4) - { - halfsizex*=2; - halfsizey*=2; - } - workdesc.set_subwindow(-max(1,halfsizex),-max(1,halfsizey),offset_w+2*max(1,halfsizex),offset_h+2*max(1,halfsizey)); - break; - } - case Blur::GAUSSIAN: - { - #define GAUSSIAN_ADJUSTMENT (0.05) - Real pw = (Real)workdesc.get_w()/(workdesc.get_br()[0]-workdesc.get_tl()[0]); - Real ph = (Real)workdesc.get_h()/(workdesc.get_br()[1]-workdesc.get_tl()[1]); - - pw=pw*pw; - ph=ph*ph; - - halfsizex = (int)(abs(pw)*size[0]*GAUSSIAN_ADJUSTMENT+0.5); - halfsizey = (int)(abs(ph)*size[1]*GAUSSIAN_ADJUSTMENT+0.5); - - halfsizex = (halfsizex + 1)/2; - halfsizey = (halfsizey + 1)/2; - workdesc.set_subwindow( -halfsizex, -halfsizey, offset_w+2*halfsizex, offset_h+2*halfsizey ); - - break; - } - } - - //render the background onto the expanded surface - if(!context.accelerated_render(&worksurface,quality,workdesc,&stageone)) - return false; - - // Copy over the alpha - blurred.set_wh(worksurface.get_w(),worksurface.get_h()); - if(!use_luma) - { - for(int j=0;jset_wh(renddesc.get_w(),renddesc.get_h()); - - int u = halfsizex+abs(offset_u), v = halfsizey+abs(offset_v); - for(y=0;y0) - shade=color1,shade.set_a(shade.get_a()*alpha); - else - shade=color2,shade.set_a(shade.get_a()*-alpha); - } - - - - if(shade.get_a()) - { - (*surface)[y][x]=Color::blend(shade,worksurface[v][u],get_amount(),get_blend_method()); - } - else (*surface)[y][x] = worksurface[v][u]; - } - } - - if(cb && !cb->amount_complete(10000,10000)) - { - //if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); - return false; - } - - return true; -} - -Layer::Vocab -Layer_Bevel::get_param_vocab(void)const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("type") - .set_local_name(_("Type")) - .set_description(_("Type of blur to use")) - .set_hint("enum") - .add_enum_value(Blur::BOX,"box",_("Box Blur")) - .add_enum_value(Blur::FASTGAUSSIAN,"fastgaussian",_("Fast Gaussian Blur")) - .add_enum_value(Blur::CROSS,"cross",_("Cross-Hatch Blur")) - .add_enum_value(Blur::GAUSSIAN,"gaussian",_("Gaussian Blur")) - .add_enum_value(Blur::DISC,"disc",_("Disc Blur")) - ); - - ret.push_back(ParamDesc("color1") - .set_local_name(_("Hi-Color")) - ); - ret.push_back(ParamDesc("color2") - .set_local_name(_("Lo-Color")) - ); - ret.push_back(ParamDesc("angle") - .set_local_name(_("Light Angle")) - ); - ret.push_back(ParamDesc("depth") - .set_is_distance() - .set_local_name(_("Depth of Bevel")) - ); - ret.push_back(ParamDesc("softness") - .set_is_distance() - .set_local_name(_("Softness")) - ); - ret.push_back(ParamDesc("use_luma") - .set_local_name(_("Use Luma")) - ); - ret.push_back(ParamDesc("solid") - .set_local_name(_("Solid")) - ); - - return ret; -} - -Rect -Layer_Bevel::get_full_bounding_rect(Context context)const -{ - if(is_disabled()) - return context.get_full_bounding_rect(); - - Rect under(context.get_full_bounding_rect()); - - if(Color::is_onto(get_blend_method())) - return under; - - Rect bounds(under.expand(softness)); - bounds.expand_x(abs(depth)); - bounds.expand_y(abs(depth)); - - return bounds; -} diff --git a/synfig-core/trunk/src/modules/lyr_std/bevel.h b/synfig-core/trunk/src/modules/lyr_std/bevel.h deleted file mode 100644 index 0774b75..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/bevel.h +++ /dev/null @@ -1,81 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file bevel.h -** \brief Header file for implementation of the "Bevel" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifndef __SYNFIG_LAYER_BEVEL_H__ -#define __SYNFIG_LAYER_BEVEL_H__ - -/* -- H E A D E R S --------------------------------------------------------- */ - -#include -#include -#include -#include -#include - -using namespace synfig; -using namespace std; -using namespace etl; - -class Layer_Bevel : public synfig::Layer_Composite -{ - SYNFIG_LAYER_MODULE_EXT -private: - synfig::Real softness; - int type; - - synfig::Color color1; - synfig::Color color2; - - synfig::Angle angle; - synfig::Real depth; - - synfig::Vector offset; - synfig::Vector offset45; - - bool use_luma; - bool solid; - - void calc_offset(); -public: - Layer_Bevel(); - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - - virtual ValueBase get_param(const String & param)const; - - virtual Color get_color(Context context, const Point &pos)const; - - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - - virtual synfig::Rect get_full_bounding_rect(Context context)const; - virtual Vocab get_param_vocab()const; - virtual bool reads_context()const { return true; } -}; // END of class Layer_Bevel - -/* -- E X T E R N S --------------------------------------------------------- */ - -/* -- E N D ----------------------------------------------------------------- */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_std/booleancurve.cpp b/synfig-core/trunk/src/modules/lyr_std/booleancurve.cpp deleted file mode 100644 index d7b87db..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/booleancurve.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file booleancurve.cpp -** \brief Boolean Curve Implementation File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "booleancurve.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -BooleanCurve::BooleanCurve() -{ -} - -BooleanCurve::~BooleanCurve() -{ -} - -bool BooleanCurve::set_param(const String & param, const synfig::ValueBase &value) -{ - if(param=="regions" && value.same_type_as(regions)) - { - vector bv; - int size = value.get_list().size(); - - const vector &vlist = value.get_list(); - - regions.clear(); - for(int i = 0; i < size; ++i) - { - regions.push_back(vector(vlist[i].get_list().begin(),vlist[i].get_list().end())); - } - return true; - } - - return Layer_Shape::set_param(param,value); -} - -ValueBase BooleanCurve::get_param(const String & param)const -{ - EXPORT(regions); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Shape::get_param(param); -} - -Layer::Vocab BooleanCurve::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Shape::get_param_vocab()); - - ret.push_back(ParamDesc("regions") - .set_local_name(_("Region Set")) - .set_description(_("Set of regions to combine")) - ); - - return ret; -} - -Color BooleanCurve::get_color(Context /*context*/, const Point &/*pos*/)const -{ - Color c(Color::alpha()); - - return c; -} - -bool BooleanCurve::accelerated_render(Context /*context*/,Surface */*surface*/,int /*quality*/, const RendDesc &/*renddesc*/, ProgressCallback */*cb*/)const -{ - return false; -} diff --git a/synfig-core/trunk/src/modules/lyr_std/booleancurve.h b/synfig-core/trunk/src/modules/lyr_std/booleancurve.h deleted file mode 100644 index 5896e7d..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/booleancurve.h +++ /dev/null @@ -1,75 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file booleancurve.h -** \brief Boolean Curve Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_BOOLEAN_CURVE_H -#define __SYNFIG_BOOLEAN_CURVE_H - -/* === H E A D E R S ======================================================= */ -#include -#include - -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ -namespace synfig -{ - -class BooleanCurve : public Layer_Shape -{ - //dynamic list of regions and such - typedef std::vector< std::vector > region_list_type; - region_list_type regions; - - enum BOOLEAN_OP - { - Union = 0, - Intersection, - MutualExclude, - Num_Boolean_Ops - }; - - int operation; - -public: - - BooleanCurve(); - ~BooleanCurve(); - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - virtual ValueBase get_param(const String & param)const; - - virtual Vocab get_param_vocab()const; - - virtual Color get_color(Context context, const Point &pos)const; - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; -}; - -} //end of namespace synfig -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_std/clamp.cpp b/synfig-core/trunk/src/modules/lyr_std/clamp.cpp deleted file mode 100644 index 14b4c41..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/clamp.cpp +++ /dev/null @@ -1,207 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file clamp.cpp -** \brief Implementation of the "Clamp" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "clamp.h" -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace etl; -using namespace std; -using namespace synfig; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Layer_Clamp); -SYNFIG_LAYER_SET_NAME(Layer_Clamp,"clamp"); -SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Clamp,N_("Clamp")); -SYNFIG_LAYER_SET_CATEGORY(Layer_Clamp,N_("Filters")); -SYNFIG_LAYER_SET_VERSION(Layer_Clamp,"0.2"); -SYNFIG_LAYER_SET_CVS_ID(Layer_Clamp,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -Layer_Clamp::Layer_Clamp(): - invert_negative(false), - clamp_ceiling(true), - ceiling(1.0f), - floor(0.0f) -{ -} - -inline Color -Layer_Clamp::clamp_color(const Color &in)const -{ - Color ret(in); - - if(ret.get_a()==0) - return Color::alpha(); - - if(invert_negative) - { - if(ret.get_a()ceiling) ret.set_r(ceiling); - if(ret.get_g()>ceiling) ret.set_g(ceiling); - if(ret.get_b()>ceiling) ret.set_b(ceiling); - if(ret.get_a()>ceiling) ret.set_a(ceiling); - } - return ret; -} - -bool -Layer_Clamp::set_param(const String & param, const ValueBase &value) -{ - IMPORT(invert_negative); - IMPORT(clamp_ceiling); - IMPORT(ceiling); - IMPORT(floor); - - return false; -} - -ValueBase -Layer_Clamp::get_param(const String ¶m)const -{ - EXPORT(invert_negative); - EXPORT(clamp_ceiling); - - EXPORT(ceiling); - EXPORT(floor); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return ValueBase(); -} - -Layer::Vocab -Layer_Clamp::get_param_vocab()const -{ - Layer::Vocab ret; - - ret.push_back(ParamDesc("invert_negative") - .set_local_name(_("Invert Negative")) - ); - - ret.push_back(ParamDesc("clamp_ceiling") - .set_local_name(_("Clamp Ceiling")) - ); - - ret.push_back(ParamDesc("ceiling") - .set_local_name(_("Ceiling")) - ); - - ret.push_back(ParamDesc("floor") - .set_local_name(_("Floor")) - ); - - return ret; -} - -Color -Layer_Clamp::get_color(Context context, const Point &pos)const -{ - return clamp_color(context.get_color(pos)); -} - -bool -Layer_Clamp::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - SuperCallback supercb(cb,0,9500,10000); - - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - return false; - - int x,y; - - Surface::pen pen(surface->begin()); - - for(y=0;yamount_complete(10000,10000)) - return false; - - return true; -} - - -Rect -Layer_Clamp::get_full_bounding_rect(Context context)const -{ - return context.get_full_bounding_rect(); -} diff --git a/synfig-core/trunk/src/modules/lyr_std/clamp.h b/synfig-core/trunk/src/modules/lyr_std/clamp.h deleted file mode 100644 index 7a8fad8..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/clamp.h +++ /dev/null @@ -1,75 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file clamp.h -** \brief Header file for implementation of the "Clamp" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_LAYER_SOLIDCOLOR_H -#define __SYNFIG_LAYER_SOLIDCOLOR_H - -/* === H E A D E R S ======================================================= */ - -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class Layer_Clamp : public Layer -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - bool invert_negative; - bool clamp_ceiling; - - float ceiling; - float floor; - - Color clamp_color(const Color &in)const; - -public: - - Layer_Clamp(); - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - - virtual ValueBase get_param(const String & param)const; - - virtual Color get_color(Context context, const Point &pos)const; - - virtual Rect get_full_bounding_rect(Context context)const; - - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - - virtual Vocab get_param_vocab()const; -}; // END of class Layer_Clamp - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_std/curvewarp.cpp b/synfig-core/trunk/src/modules/lyr_std/curvewarp.cpp deleted file mode 100644 index 82c213d..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/curvewarp.cpp +++ /dev/null @@ -1,591 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file curvewarp.cpp -** \brief Implementation of the "Curve Warp" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007-2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "curvewarp.h" - -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -#define FAKE_TANGENT_STEP 0.000001 -#define TOO_THIN 0.01 - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(CurveWarp); -SYNFIG_LAYER_SET_NAME(CurveWarp,"curve_warp"); -SYNFIG_LAYER_SET_LOCAL_NAME(CurveWarp,N_("Curve Warp")); -SYNFIG_LAYER_SET_CATEGORY(CurveWarp,N_("Distortions")); -SYNFIG_LAYER_SET_VERSION(CurveWarp,"0.0"); -SYNFIG_LAYER_SET_CVS_ID(CurveWarp,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -inline float calculate_distance(const std::vector& bline) -{ - std::vector::const_iterator iter,next,ret; - std::vector::const_iterator end(bline.end()); - - float dist(0); - - if (bline.empty()) return dist; - - next=bline.begin(); - iter=next++; - - for(;next!=end;iter=next++) - { - // Setup the curve - etl::hermite curve(iter->get_vertex(), next->get_vertex(), iter->get_tangent2(), next->get_tangent1()); - dist+=curve.length(); - } - - return dist; -} - -std::vector::const_iterator -find_closest_to_bline(bool fast, const std::vector& bline,const Point& p,float& t, float& len, bool& extreme) -{ - std::vector::const_iterator iter,next,ret; - std::vector::const_iterator end(bline.end()); - - ret=bline.end(); - float dist(100000000000.0); - next=bline.begin(); - float best_pos(0), best_len(0); - etl::hermite best_curve; - iter=next++; - Point bp; - float total_len(0); - bool first = true, last = false; - extreme = false; - - for(;next!=end;iter=next++) - { - // Setup the curve - etl::hermite curve(iter->get_vertex(), next->get_vertex(), iter->get_tangent2(), next->get_tangent1()); - float thisdist(0); - last = false; - - if (fast) - { -#define POINT_CHECK(x) bp=curve(x); thisdist=(bp-p).mag_squared(); if(thisdist .99) extreme = true; - } - else - { - len = best_len + best_curve.find_distance(0,best_pos); - if (last && t == 1) extreme = true; - } - return ret; -} - -/* === M E T H O D S ======================================================= */ - -inline void -CurveWarp::sync() -{ - curve_length_=calculate_distance(bline); - perp_ = (end_point - start_point).perp().norm(); -} - -CurveWarp::CurveWarp(): - origin(0,0), - perp_width(1), - start_point(-2.5,-0.5), - end_point(2.5,-0.3), - fast(true) -{ - bline.push_back(BLinePoint()); - bline.push_back(BLinePoint()); - bline[0].set_vertex(Point(-2.5,0)); - bline[1].set_vertex(Point( 2.5,0)); - bline[0].set_tangent(Point(1, 0.1)); - bline[1].set_tangent(Point(1, -0.1)); - bline[0].set_width(1.0f); - bline[1].set_width(1.0f); - - sync(); -} - -inline Point -CurveWarp::transform(const Point &point_, Real *dist, Real *along, int quality)const -{ - Vector tangent; - Vector diff; - Point p1; - Real thickness; - bool edge_case = false; - float len(0); - bool extreme; - float t; - - if(bline.size()==0) - return Point(); - else if(bline.size()==1) - { - tangent=bline.front().get_tangent1(); - p1=bline.front().get_vertex(); - thickness=bline.front().get_width(); - t = 0.5; - extreme = false; - } - else - { - Point point(point_-origin); - - std::vector::const_iterator iter,next; - - // Figure out the BLinePoint we will be using, - next=find_closest_to_bline(fast,bline,point,t,len,extreme); - - iter=next++; - if(next==bline.end()) next=bline.begin(); - - // Setup the curve - etl::hermite curve(iter->get_vertex(), next->get_vertex(), iter->get_tangent2(), next->get_tangent1()); - - // Setup the derivative function - etl::derivative > deriv(curve); - - int search_iterations(7); - - if(quality<=6)search_iterations=7; - else if(quality<=7)search_iterations=6; - else if(quality<=8)search_iterations=5; - else search_iterations=4; - - // Figure out the closest point on the curve - if (fast) t = curve.find_closest(fast, point,search_iterations); - - // Calculate our values - p1=curve(t); // the closest point on the curve - tangent=deriv(t); // the tangent at that point - - // if the point we're nearest to is at either end of the - // bline, our distance from the curve is the distance from the - // point on the curve. we need to know which side of the - // curve we're on, so find the average of the two tangents at - // this point - if (t<0.00001 || t>0.99999) - { - bool zero_tangent = (tangent[0] == 0 && tangent[1] == 0); - - if (t<0.5) - { - if (iter->get_split_tangent_flag() || zero_tangent) - { - // fake the current tangent if we need to - if (zero_tangent) tangent = curve(FAKE_TANGENT_STEP) - curve(0); - - // calculate the other tangent - Vector other_tangent(iter->get_tangent1()); - if (other_tangent[0] == 0 && other_tangent[1] == 0) - { - // find the previous blinepoint - std::vector::const_iterator prev; - if (iter != bline.begin()) (prev = iter)--; - else prev = iter; - - etl::hermite other_curve(prev->get_vertex(), iter->get_vertex(), prev->get_tangent2(), iter->get_tangent1()); - other_tangent = other_curve(1) - other_curve(1-FAKE_TANGENT_STEP); - } - - // normalise and sum the two tangents - tangent=(other_tangent.norm()+tangent.norm()); - edge_case=true; - } - } - else - { - if (next->get_split_tangent_flag() || zero_tangent) - { - // fake the current tangent if we need to - if (zero_tangent) tangent = curve(1) - curve(1-FAKE_TANGENT_STEP); - - // calculate the other tangent - Vector other_tangent(next->get_tangent2()); - if (other_tangent[0] == 0 && other_tangent[1] == 0) - { - // find the next blinepoint - std::vector::const_iterator next2(next); - if (++next2 == bline.end()) - next2 = next; - - etl::hermite other_curve(next->get_vertex(), next2->get_vertex(), next->get_tangent2(), next2->get_tangent1()); - other_tangent = other_curve(FAKE_TANGENT_STEP) - other_curve(0); - } - - // normalise and sum the two tangents - tangent=(other_tangent.norm()+tangent.norm()); - edge_case=true; - } - } - } - tangent = tangent.norm(); - - // the width of the bline at the closest point on the curve - thickness=(next->get_width()-iter->get_width())*t+iter->get_width(); - } - - if (thickness < TOO_THIN && thickness > -TOO_THIN) - { - if (thickness > 0) thickness = TOO_THIN; - else thickness = -TOO_THIN; - } - - if (extreme) - { - Vector tangent; - - if (t < 0.5) - { - std::vector::const_iterator iter(bline.begin()); - tangent = iter->get_tangent1().norm(); - len = 0; - } - else - { - std::vector::const_iterator iter(--bline.end()); - tangent = iter->get_tangent2().norm(); - len = curve_length_; - } - len += (point_-origin - p1)*tangent; - diff = tangent.perp(); - } - else if (edge_case) - { - diff=(p1-(point_-origin)); - if(diff*tangent.perp()<0) diff=-diff; - diff=diff.norm(); - } - else - diff=tangent.perp(); - - // diff is a unit vector perpendicular to the bline - const Real unscaled_distance((point_-origin - p1)*diff); - if (dist) *dist = unscaled_distance; - if (along) *along = len; - return ((start_point + (end_point - start_point) * len / curve_length_) + - perp_ * unscaled_distance/(thickness*perp_width)); -} - -synfig::Layer::Handle -CurveWarp::hit_check(synfig::Context context, const synfig::Point &point)const -{ - return context.hit_check(transform(point)); -} - -bool -CurveWarp::set_param(const String & param, const ValueBase &value) -{ - IMPORT(origin); - IMPORT(start_point); - IMPORT(end_point); - IMPORT(fast); - IMPORT(perp_width); - - if(param=="bline" && value.get_type()==ValueBase::TYPE_LIST) - { - bline=value; - sync(); - - return true; - } - - IMPORT_AS(origin,"offset"); - - return false; -} - -ValueBase -CurveWarp::get_param(const String & param)const -{ - EXPORT(origin); - EXPORT(start_point); - EXPORT(end_point); - EXPORT(bline); - EXPORT(fast); - EXPORT(perp_width); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return ValueBase(); -} - -Layer::Vocab -CurveWarp::get_param_vocab()const -{ - Layer::Vocab ret; - - ret.push_back(ParamDesc("origin") - .set_local_name(_("Origin"))); - - ret.push_back(ParamDesc("perp_width") - .set_local_name(_("Width")) - .set_origin("start_point")); - - ret.push_back(ParamDesc("start_point") - .set_local_name(_("Start Point")) - .set_connect("end_point")); - - ret.push_back(ParamDesc("end_point") - .set_local_name(_("End Point"))); - - ret.push_back(ParamDesc("bline") - .set_local_name(_("Vertices")) - .set_origin("origin") - .set_hint("width") - .set_description(_("A list of BLine Points"))); - - ret.push_back(ParamDesc("fast") - .set_local_name(_("Fast"))); - - return ret; -} - -Color -CurveWarp::get_color(Context context, const Point &point)const -{ - return context.get_color(transform(point)); -} - -bool -CurveWarp::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - SuperCallback stageone(cb,0,9000,10000); - SuperCallback stagetwo(cb,9000,10000,10000); - - int x,y; - - const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); - Point tl(renddesc.get_tl()); - Point br(renddesc.get_br()); - const int w(renddesc.get_w()); - const int h(renddesc.get_h()); - - // find a bounding rectangle for the context we need to render - // todo: find a better way of doing this - this way doesn't work - Rect src_rect(transform(tl)); - Point pos1, pos2; - Real dist, along; - Real min_dist(999999), max_dist(-999999), min_along(999999), max_along(-999999); - -#define UPDATE_DIST \ - if (dist < min_dist) min_dist = dist; \ - if (dist > max_dist) max_dist = dist; \ - if (along < min_along) min_along = along; \ - if (along > max_along) max_along = along - - // look along the top and bottom edges - pos1[0] = pos2[0] = tl[0]; pos1[1] = tl[1]; pos2[1] = br[1]; - for (x = 0; x < w; x++, pos1[0] += pw, pos2[0] += pw) - { - src_rect.expand(transform(pos1, &dist, &along)); UPDATE_DIST; - src_rect.expand(transform(pos2, &dist, &along)); UPDATE_DIST; - } - - // look along the left and right edges - pos1[0] = tl[0]; pos2[0] = br[0]; pos1[1] = pos2[1] = tl[1]; - for (y = 0; y < h; y++, pos1[1] += ph, pos2[1] += ph) - { - src_rect.expand(transform(pos1, &dist, &along)); UPDATE_DIST; - src_rect.expand(transform(pos2, &dist, &along)); UPDATE_DIST; - } - - // look along the diagonals - const int max_wh(std::max(w,h)); - const Real inc_x((br[0]-tl[0])/max_wh),inc_y((br[1]-tl[1])/max_wh); - pos1[0] = pos2[0] = tl[0]; pos1[1] = tl[1]; pos2[1] = br[1]; - for (x = 0; x < max_wh; x++, pos1[0] += inc_x, pos2[0] = pos1[0], pos1[1]+=inc_y, pos2[1]-=inc_y) - { - src_rect.expand(transform(pos1, &dist, &along)); UPDATE_DIST; - src_rect.expand(transform(pos2, &dist, &along)); UPDATE_DIST; - } - -#if 0 - // look at each blinepoint - std::vector::const_iterator iter; - for (iter=bline.begin(); iter!=bline.end(); iter++) - src_rect.expand(transform(iter->get_vertex()+origin, &dist, &along)); UPDATE_DIST; -#endif - - Point src_tl(src_rect.get_min()); - Point src_br(src_rect.get_max()); - - Vector ab((end_point - start_point).norm()); - Angle::tan ab_angle(ab[1], ab[0]); - - Real used_length = max_along - min_along; - Real render_width = max_dist - min_dist; - - int src_w = (abs(used_length*Angle::cos(ab_angle).get()) + - abs(render_width*Angle::sin(ab_angle).get())) / abs(pw); - int src_h = (abs(used_length*Angle::sin(ab_angle).get()) + - abs(render_width*Angle::cos(ab_angle).get())) / abs(ph); - - Real src_pw((src_br[0] - src_tl[0]) / src_w); - Real src_ph((src_br[1] - src_tl[1]) / src_h); - - if (src_pw > abs(pw)) - { - src_w = int((src_br[0] - src_tl[0]) / abs(pw)); - src_pw = (src_br[0] - src_tl[0]) / src_w; - } - - if (src_ph > abs(ph)) - { - src_h = int((src_br[1] - src_tl[1]) / abs(ph)); - src_ph = (src_br[1] - src_tl[1]) / src_h; - } - -#define MAXPIX 10000 - if (src_w > MAXPIX) src_w = MAXPIX; - if (src_h > MAXPIX) src_h = MAXPIX; - - // this is an attempt to remove artifacts around tile edges - the - // cubic interpolation uses at most 2 pixels either side of the - // target pixel, so add an extra 2 pixels around the tile on all - // sides - src_tl -= (Point(src_pw,src_ph)*2); - src_br += (Point(src_pw,src_ph)*2); - src_w += 4; - src_h += 4; - src_pw = (src_br[0] - src_tl[0]) / src_w; - src_ph = (src_br[1] - src_tl[1]) / src_h; - - // set up a renddesc for the context to render - RendDesc src_desc(renddesc); - src_desc.clear_flags(); - src_desc.set_tl(src_tl); - src_desc.set_br(src_br); - src_desc.set_wh(src_w, src_h); - - // render the context onto a new surface - Surface source; - source.set_wh(src_w,src_h); - if(!context.accelerated_render(&source,quality,src_desc,&stageone)) - return false; - - float u,v; - Point pos, tmp; - - surface->set_wh(w,h); - surface->clear(); - - if(quality<=4) // CUBIC - for(y=0,pos[1]=tl[1];y=src_w || v>=src_h || isnan(u) || isnan(v)) - (*surface)[y][x]=context.get_color(tmp); - else - (*surface)[y][x]=source.cubic_sample(u,v); - } - if((y&31)==0 && cb && !stagetwo.amount_complete(y,h)) return false; - } - else if (quality<=6) // INTERPOLATION_LINEAR - for(y=0,pos[1]=tl[1];y=src_w || v>=src_h || isnan(u) || isnan(v)) - (*surface)[y][x]=context.get_color(tmp); - else - (*surface)[y][x]=source.linear_sample(u,v); - } - if((y&31)==0 && cb && !stagetwo.amount_complete(y,h)) return false; - } - else // NEAREST_NEIGHBOR - for(y=0,pos[1]=tl[1];y=src_w || v>=src_h || isnan(u) || isnan(v)) - (*surface)[y][x]=context.get_color(tmp); - else - (*surface)[y][x]=source[floor_to_int(v)][floor_to_int(u)]; - } - if((y&31)==0 && cb && !stagetwo.amount_complete(y,h)) return false; - } - - // Mark our progress as finished - if(cb && !cb->amount_complete(10000,10000)) - return false; - - return true; -} diff --git a/synfig-core/trunk/src/modules/lyr_std/curvewarp.h b/synfig-core/trunk/src/modules/lyr_std/curvewarp.h deleted file mode 100644 index a287887..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/curvewarp.h +++ /dev/null @@ -1,80 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file curvewarp.h -** \brief Header file for implementation of the "Curve Warp" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007-2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_CURVEWARP_H -#define __SYNFIG_CURVEWARP_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -class CurveWarp : public Layer -{ - SYNFIG_LAYER_MODULE_EXT - -private: - std::vector bline; - - Point origin; - Real perp_width; - Point start_point; - Point end_point; - Real curve_length_; - Vector perp_; - bool fast; - - void sync(); - -public: - CurveWarp(); - - virtual bool set_param(const String ¶m, const ValueBase &value); - virtual ValueBase get_param(const String ¶m)const; - virtual Point transform(const Point &point_, Real *dist=NULL, Real *along=0, int quality=10)const; - virtual Color get_color(Context context, const Point &pos)const; - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - - virtual Vocab get_param_vocab()const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_std/import.cpp b/synfig-core/trunk/src/modules/lyr_std/import.cpp deleted file mode 100644 index f7385a9..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/import.cpp +++ /dev/null @@ -1,238 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file import.cpp -** \brief Implementation of the "Import Image" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "import.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Import); -SYNFIG_LAYER_SET_NAME(Import,"import"); -SYNFIG_LAYER_SET_LOCAL_NAME(Import,N_("Import Image")); -SYNFIG_LAYER_SET_CATEGORY(Import,N_("Other")); -SYNFIG_LAYER_SET_VERSION(Import,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Import,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -Import::Import() -{ - time_offset=0; -} - -Import::~Import() -{ -} - -void -Import::on_canvas_set() -{ - if(get_canvas())set_param("filename",filename); -} - -bool -Import::set_param(const String & param, const ValueBase &value) -{ - try{ - IMPORT(time_offset); - if(param=="filename" && value.same_type_as(filename)) - { - if(!get_canvas()) - { - filename=value.get(filename); - importer=0; - surface.clear(); - return true; - } - - String newfilename=value.get(string()); - String filename_with_path; - - // Get rid of any %20 crap - { - String::size_type n; - while((n=newfilename.find("%20"))!=String::npos) - newfilename.replace(n,3," "); - } - - //if(get_canvas()->get_file_path()==dirname(newfilename)) - //{ - // synfig::info("Image seems to be in local directory. Adjusting path..."); - // newfilename=basename(newfilename); - //} - -#ifndef WIN32 - if(is_absolute_path(newfilename)) - { - string curpath(cleanup_path(absolute_path(get_canvas()->get_file_path()))); - while(basename(curpath)==".")curpath=dirname(curpath); - - newfilename=relative_path(curpath,newfilename); - synfig::info("basename(curpath)=%s, Path adjusted to %s",basename(curpath).c_str(),newfilename.c_str()); - } -#endif - - if(filename.empty()) - filename=newfilename; - - if(newfilename.empty()) - { - filename=newfilename; - importer=0; - surface.clear(); - return true; - } - - // If we are already loaded, don't reload - if(filename==newfilename && importer) - { - synfig::warning(strprintf(_("Filename seems to already be set to \"%s\" (%s)"),filename.c_str(),newfilename.c_str())); - return true; - } - - assert(get_canvas()); - - if(is_absolute_path(newfilename)) - filename_with_path=newfilename; - else - filename_with_path=get_canvas()->get_file_path()+ETL_DIRECTORY_SEPARATOR+newfilename; - - handle newimporter; - - newimporter=Importer::open(absolute_path(filename_with_path)); - - if(!newimporter) - { - newimporter=Importer::open(get_canvas()->get_file_path()+ETL_DIRECTORY_SEPARATOR+basename(newfilename)); - if(!newimporter) - { - synfig::error(strprintf("Unable to create an importer object with file \"%s\"",filename_with_path.c_str())); - surface.clear(); - return false; - } - } - - surface.clear(); - if(!newimporter->get_frame(surface,Time(0),trimmed,width,height,top,left)) - { - synfig::warning(strprintf("Unable to get frame from \"%s\"",filename_with_path.c_str())); - } - - importer=newimporter; - filename=newfilename; - abs_filename=absolute_path(filename_with_path); - - return true; - } - } catch(...) { set_amount(0); return false; } - - return Layer_Bitmap::set_param(param,value); -} - -ValueBase -Import::get_param(const String & param)const -{ - EXPORT(time_offset); - - if(get_canvas()) - { - if(param=="filename") - { - string curpath(cleanup_path(absolute_path(get_canvas()->get_file_path()))); - return relative_path(curpath,abs_filename); - } - } - else - EXPORT(filename); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Bitmap::get_param(param); -} - -Layer::Vocab -Import::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Bitmap::get_param_vocab()); - - ret.push_back(ParamDesc("filename") - .set_local_name(_("Filename")) - .set_description(_("File to import")) - .set_hint("filename") - ); - ret.push_back(ParamDesc("time_offset") - .set_local_name(_("Time Offset")) - ); - - return ret; -} - -void -Import::set_time(Context context, Time time)const -{ - if(get_amount() && importer && - importer->is_animated()) - importer->get_frame(surface,time+time_offset,trimmed,width,height,top,left); - - context.set_time(time); -} - -void -Import::set_time(Context context, Time time, const Point &pos)const -{ - if(get_amount() && importer && - importer->is_animated()) - importer->get_frame(surface,time+time_offset,trimmed,width,height,top,left); - - context.set_time(time,pos); -} diff --git a/synfig-core/trunk/src/modules/lyr_std/import.h b/synfig-core/trunk/src/modules/lyr_std/import.h deleted file mode 100644 index 2452319..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/import.h +++ /dev/null @@ -1,72 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file import.h -** \brief Header file for implementation of the "Import Image" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_IMPORT_H -#define __SYNFIG_IMPORT_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class Import : public synfig::Layer_Bitmap -{ - SYNFIG_LAYER_MODULE_EXT - -private: - synfig::String filename; - synfig::String abs_filename; - synfig::Importer::Handle importer; - synfig::Time time_offset; - -protected: - Import(); - -public: - ~Import(); - - virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); - - virtual synfig::ValueBase get_param(const synfig::String & param)const; - - virtual Vocab get_param_vocab()const; - - virtual void on_canvas_set(); - - virtual void set_time(synfig::Context context, synfig::Time time)const; - - virtual void set_time(synfig::Context context, synfig::Time time, const synfig::Point &point)const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_std/insideout.cpp b/synfig-core/trunk/src/modules/lyr_std/insideout.cpp deleted file mode 100644 index 1ed9c2c..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/insideout.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file insideout.cpp -** \brief Implementation of the "Inside Out" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "insideout.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(InsideOut); -SYNFIG_LAYER_SET_NAME(InsideOut,"inside_out"); -SYNFIG_LAYER_SET_LOCAL_NAME(InsideOut,N_("Inside Out")); -SYNFIG_LAYER_SET_CATEGORY(InsideOut,N_("Distortions")); -SYNFIG_LAYER_SET_VERSION(InsideOut,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(InsideOut,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -InsideOut::InsideOut(): - origin(0,0) -{ -} - -bool -InsideOut::set_param(const String & param, const ValueBase &value) -{ - IMPORT(origin); - return false; -} - -ValueBase -InsideOut::get_param(const String & param)const -{ - EXPORT(origin); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return ValueBase(); -} - -synfig::Layer::Handle -InsideOut::hit_check(synfig::Context context, const synfig::Point &p)const -{ - Point pos(p-origin); - Real inv_mag=pos.inv_mag(); - Point invpos(pos*inv_mag*inv_mag); - return context.hit_check(invpos+origin); -} - -Color -InsideOut::get_color(Context context, const Point &p)const -{ - Point pos(p-origin); - Real inv_mag=pos.inv_mag(); - Point invpos(pos*inv_mag*inv_mag); - return context.get_color(invpos+origin); -} - -class InsideOut_Trans : public Transform -{ - etl::handle layer; -public: - InsideOut_Trans(const InsideOut* x):Transform(x->get_guid()),layer(x) { } - - synfig::Vector perform(const synfig::Vector& x)const - { - Point pos(x-layer->origin); - Real inv_mag=pos.inv_mag(); - if(!isnan(inv_mag)) - return (pos*(inv_mag*inv_mag)+layer->origin); - return x; - } - - synfig::Vector unperform(const synfig::Vector& x)const - { - Point pos(x-layer->origin); - Real inv_mag=pos.inv_mag(); - if(!isnan(inv_mag)) - return (pos*(inv_mag*inv_mag)+layer->origin); - return x; - } -}; -etl::handle -InsideOut::get_transform()const -{ - return new InsideOut_Trans(this); -} - -Layer::Vocab -InsideOut::get_param_vocab()const -{ - Layer::Vocab ret; - - ret.push_back(ParamDesc("origin") - .set_local_name(_("Origin")) - .set_description(_("Defines the where the center will be")) - ); - - return ret; -} diff --git a/synfig-core/trunk/src/modules/lyr_std/insideout.h b/synfig-core/trunk/src/modules/lyr_std/insideout.h deleted file mode 100644 index 9cae33b..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/insideout.h +++ /dev/null @@ -1,69 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file insideout.h -** \brief Header file for implementation of the "Inside Out" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_INSIDEOUT_H -#define __SYNFIG_INSIDEOUT_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; -class InsideOut_Trans; - -class InsideOut : public Layer -{ - SYNFIG_LAYER_MODULE_EXT - friend class InsideOut_Trans; - -private: - - Point origin; - -public: - InsideOut(); - - virtual bool set_param(const String ¶m, const ValueBase &value); - virtual ValueBase get_param(const String ¶m)const; - virtual Color get_color(Context context, const Point &pos)const; - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - virtual Vocab get_param_vocab()const; - virtual etl::handle get_transform()const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_std/julia.cpp b/synfig-core/trunk/src/modules/lyr_std/julia.cpp deleted file mode 100644 index ad2478e..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/julia.cpp +++ /dev/null @@ -1,365 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file julia.cpp -** \brief Implementation of the "Julia Set" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "julia.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -#define LOG_OF_2 0.69314718055994528623 - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Julia); -SYNFIG_LAYER_SET_NAME(Julia,"julia"); -SYNFIG_LAYER_SET_LOCAL_NAME(Julia,N_("Julia Set")); -SYNFIG_LAYER_SET_CATEGORY(Julia,N_("Fractals")); -SYNFIG_LAYER_SET_VERSION(Julia,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Julia,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -inline void -color_neg_flip(Color &color) -{ - if(color.get_a()==0) - { - color=Color::alpha(); - return; - } - - if(color.get_a()<0) - color=-color; - - if(color.get_r()<0) - { - color.set_g(color.get_g()-color.get_r()); - color.set_b(color.get_b()-color.get_r()); - color.set_r(0); - } - if(color.get_g()<0) - { - color.set_r(color.get_r()-color.get_g()); - color.set_b(color.get_b()-color.get_g()); - color.set_g(0); - } - if(color.get_b()<0) - { - color.set_r(color.get_r()-color.get_b()); - color.set_g(color.get_g()-color.get_b()); - color.set_b(0); - } -} - -/* === M E T H O D S ======================================================= */ - -Julia::Julia():color_shift(angle::degrees(0)) -{ - icolor=Color::black(); - ocolor=Color::black(); - iterations=32; - color_shift=Angle::deg(0); - - distort_inside=true; - distort_outside=true; - shade_inside=true; - shade_outside=true; - solid_inside=false; - solid_outside=false; - invert_inside=false; - invert_outside=false; - color_inside=true; - color_outside=false; - color_cycle=false; - smooth_outside=true; - broken=false; - seed=Point(0,0); - - bailout=4; - lp=log(log(bailout)); -} - -bool -Julia::set_param(const String & param, const ValueBase &value) -{ - - IMPORT(icolor); - IMPORT(ocolor); - IMPORT(color_shift); - IMPORT(seed); - - IMPORT(distort_inside); - IMPORT(distort_outside); - IMPORT(shade_inside); - IMPORT(shade_outside); - IMPORT(solid_inside); - IMPORT(solid_outside); - IMPORT(invert_inside); - IMPORT(invert_outside); - IMPORT(color_inside); - IMPORT(color_outside); - - IMPORT(color_cycle); - IMPORT(smooth_outside); - IMPORT(broken); - - if(param=="iterations" && value.same_type_as(iterations)) - { - iterations=value.get(iterations); - if(iterations<0) - iterations=0; - if(iterations>500000) - iterations=500000; - return true; - } - if(param=="bailout" && value.same_type_as(bailout)) - { - bailout=value.get(bailout); - bailout*=bailout; - lp=log(log(bailout)); - return true; - } - - return false; -} - -ValueBase -Julia::get_param(const String & param)const -{ - EXPORT(icolor); - EXPORT(ocolor); - EXPORT(color_shift); - EXPORT(iterations); - EXPORT(seed); - - EXPORT(distort_inside); - EXPORT(distort_outside); - EXPORT(shade_inside); - EXPORT(shade_outside); - EXPORT(solid_inside); - EXPORT(solid_outside); - EXPORT(invert_inside); - EXPORT(invert_outside); - EXPORT(color_inside); - EXPORT(color_outside); - EXPORT(color_cycle); - EXPORT(smooth_outside); - EXPORT(broken); - - if(param=="bailout") - return sqrt(bailout); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return ValueBase(); -} - -Color -Julia::get_color(Context context, const Point &pos)const -{ - Real - cr, ci, - zr, zi, - zr_hold; - - ColorReal - depth, mag(0); - - Color - ret; - - cr=seed[0]; - ci=seed[1]; - zr=pos[0]; - zi=pos[1]; - - for(int i=0;i4) - { - if(smooth_outside) - { - // Darco's original mandelbrot smoothing algo - // depth=((Point::value_type)i+(2.0-sqrt(mag))/PI); - - // Linas Vepstas algo (Better than darco's) - // See (http://linas.org/art-gallery/escape/smooth.html) - depth= (ColorReal)i - log(log(sqrt(mag))) / LOG_OF_2; - - // Clamp - if(depth<0) depth=0; - } - else - depth=static_cast(i); - - if(solid_outside) - ret=ocolor; - else - if(distort_outside) - ret=context.get_color(Point(zr,zi)); - else - ret=context.get_color(pos); - - if(invert_outside) - ret=~ret; - - if(color_outside) - ret=ret.set_uv(zr,zi).clamped_negative(); - - if(color_cycle) - ret=ret.rotate_uv(color_shift.operator*(depth)).clamped_negative(); - - if(shade_outside) - { - ColorReal alpha=depth/static_cast(iterations); - ret=(ocolor-ret)*alpha+ret; - } - return ret; - } - } - - if(solid_inside) - ret=icolor; - else - if(distort_inside) - ret=context.get_color(Point(zr,zi)); - else - ret=context.get_color(pos); - - if(invert_inside) - ret=~ret; - - if(color_inside) - ret=ret.set_uv(zr,zi).clamped_negative(); - - if(shade_inside) - ret=(icolor-ret)*mag+ret; - - return ret; -} - -Layer::Vocab -Julia::get_param_vocab()const -{ - Layer::Vocab ret; - - ret.push_back(ParamDesc("icolor") - .set_local_name(_("Inside Color")) - .set_description(_("Color of the Set")) - ); - ret.push_back(ParamDesc("ocolor") - .set_local_name(_("Outside Color")) - .set_description(_("Color outside the Set")) - ); - ret.push_back(ParamDesc("color_shift") - .set_local_name(_("Color Shift")) - ); - ret.push_back(ParamDesc("iterations") - .set_local_name(_("Iterations")) - ); - ret.push_back(ParamDesc("seed") - .set_local_name(_("Seed Point")) - ); - ret.push_back(ParamDesc("bailout") - .set_local_name(_("Bailout ValueBase")) - ); - - ret.push_back(ParamDesc("distort_inside") - .set_local_name(_("Distort Inside")) - ); - ret.push_back(ParamDesc("shade_inside") - .set_local_name(_("Shade Inside")) - ); - ret.push_back(ParamDesc("solid_inside") - .set_local_name(_("Solid Inside")) - ); - ret.push_back(ParamDesc("invert_inside") - .set_local_name(_("Invert Inside")) - ); - ret.push_back(ParamDesc("color_inside") - .set_local_name(_("Color Inside")) - ); - ret.push_back(ParamDesc("distort_outside") - .set_local_name(_("Distort Outside")) - ); - ret.push_back(ParamDesc("shade_outside") - .set_local_name(_("Shade Outside")) - ); - ret.push_back(ParamDesc("solid_outside") - .set_local_name(_("Solid Outside")) - ); - ret.push_back(ParamDesc("invert_outside") - .set_local_name(_("Invert Outside")) - ); - ret.push_back(ParamDesc("color_outside") - .set_local_name(_("Color Outside")) - ); - - ret.push_back(ParamDesc("color_cycle") - .set_local_name(_("Color Cycle")) - ); - ret.push_back(ParamDesc("smooth_outside") - .set_local_name(_("Smooth Outside")) - .set_description(_("Smooth the coloration outside the set")) - ); - ret.push_back(ParamDesc("broken") - .set_local_name(_("Break Set")) - .set_description(_("Modify equation to achieve interesting results")) - ); - - - return ret; -} diff --git a/synfig-core/trunk/src/modules/lyr_std/julia.h b/synfig-core/trunk/src/modules/lyr_std/julia.h deleted file mode 100644 index 317ffb8..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/julia.h +++ /dev/null @@ -1,90 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file julia.h -** \brief Header file for implementation of the "Julia Set" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_JULIA_H -#define __SYNFIG_JULIA_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -class Julia : public synfig::Layer -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - synfig::Color icolor; - synfig::Color ocolor; - synfig::Angle color_shift; - Real bailout; - Real lp; - int iterations; - synfig::Point seed; - - bool distort_inside; - bool distort_outside; - bool shade_inside; - bool shade_outside; - bool solid_inside; - bool solid_outside; - bool invert_inside; - bool invert_outside; - bool color_inside; - bool color_outside; - - bool color_cycle; - bool smooth_outside; - bool broken; - -public: - Julia(); - - virtual bool set_param(const synfig::String ¶m, const synfig::ValueBase &value); - - virtual ValueBase get_param(const synfig::String ¶m)const; - - virtual Color get_color(synfig::Context context, const synfig::Point &pos)const; - - virtual Vocab get_param_vocab()const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_std/lyr_std.nsh b/synfig-core/trunk/src/modules/lyr_std/lyr_std.nsh deleted file mode 100644 index 3a0765d..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/lyr_std.nsh +++ /dev/null @@ -1,21 +0,0 @@ -; The stuff to install -Section "lyr_std" Sec_lyr_std - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=lyr_std.dll "src\modules\lyr_std\.libs\liblyr_std.dll" - - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "lyr_std" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd - diff --git a/synfig-core/trunk/src/modules/lyr_std/main.cpp b/synfig-core/trunk/src/modules/lyr_std/main.cpp deleted file mode 100644 index faa0d7a..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/main.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file lyr_std/main.cpp -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include - -#include "zoom.h" -//#include "blur.h" -#include "import.h" -#include "translate.h" -#include "rotate.h" -#include "clamp.h" -#include "stretch.h" - -//#include "colorcorrect.h" - -#include "supersample.h" - -#include "mandelbrot.h" -#include "julia.h" -#include "insideout.h" -#include "xorpattern.h" -#include "twirl.h" -#include "sphere_distort.h" - - - -#include "shade.h" -#include "bevel.h" -//#include "halftone2.h" - -//#include "radialblur.h" - -#include "warp.h" -#include "timeloop.h" -#include "curvewarp.h" - -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(liblyr_std) - MODULE_NAME("Standard Layers") - MODULE_DESCRIPTION("Provides a basic set of standard layers") - MODULE_AUTHOR("Robert B. Quattlebaum") - MODULE_VERSION("1.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(liblyr_std) - BEGIN_LAYERS - LAYER(Zoom) LAYER_ALIAS(Zoom,"Zoom") - LAYER(Import) LAYER_ALIAS(Import,"Import") - LAYER(Translate) LAYER_ALIAS(Translate,"Translate") - LAYER(SuperSample) LAYER_ALIAS(SuperSample,"SuperSample") - LAYER(Rotate) LAYER_ALIAS(Rotate,"Rotate") - LAYER(Warp) - LAYER(Julia) - LAYER(InsideOut) - LAYER(Mandelbrot) - LAYER(Layer_Clamp) - LAYER(Layer_Stretch) - LAYER(XORPattern) LAYER_ALIAS(XORPattern,"XORPattern") - LAYER(Twirl) - LAYER(Layer_Shade) - LAYER(Layer_Bevel) - LAYER(Layer_TimeLoop) - LAYER(Layer_SphereDistort) - LAYER(CurveWarp) - END_LAYERS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/lyr_std/mandelbrot.cpp b/synfig-core/trunk/src/modules/lyr_std/mandelbrot.cpp deleted file mode 100644 index bacbbda..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/mandelbrot.cpp +++ /dev/null @@ -1,385 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mandelbrot.cpp -** \brief Implementation of the "Mandelbrot Set" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "mandelbrot.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -#define LOG_OF_2 0.69314718055994528623 - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Mandelbrot); -SYNFIG_LAYER_SET_NAME(Mandelbrot,"mandelbrot"); -SYNFIG_LAYER_SET_LOCAL_NAME(Mandelbrot,N_("Mandelbrot Set")); -SYNFIG_LAYER_SET_CATEGORY(Mandelbrot,N_("Fractals")); -SYNFIG_LAYER_SET_VERSION(Mandelbrot,"0.2"); -SYNFIG_LAYER_SET_CVS_ID(Mandelbrot,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -inline void -color_neg_flip(Color &color) -{ - if(color.get_a()==0) - { - color=Color::alpha(); - return; - } - - if(color.get_a()<0) - color=-color; - - if(color.get_r()<0) - { - color.set_g(color.get_g()-color.get_r()); - color.set_b(color.get_b()-color.get_r()); - color.set_r(0); - } - if(color.get_g()<0) - { - color.set_r(color.get_r()-color.get_g()); - color.set_b(color.get_b()-color.get_g()); - color.set_g(0); - } - if(color.get_b()<0) - { - color.set_r(color.get_r()-color.get_b()); - color.set_g(color.get_g()-color.get_b()); - color.set_b(0); - } -} - -/* === M E T H O D S ======================================================= */ - -Mandelbrot::Mandelbrot(): - gradient_offset_inside(0.0), - gradient_offset_outside(0.0), - gradient_loop_inside(true), - gradient_scale_outside(1.0), - gradient_inside(Color::alpha(),Color::black()), - gradient_outside(Color::alpha(),Color::black()) -{ - iterations=32; -// color_shift=Angle::deg(0); - - distort_inside=true; - distort_outside=true; - solid_inside=false; - solid_outside=false; - invert_inside=false; - invert_outside=false; - shade_inside=true; - shade_outside=true; - - smooth_outside=true; - broken=false; - - bailout=4; - lp=log(log(bailout)); -} - -bool -Mandelbrot::set_param(const String & param, const ValueBase &value) -{ - -// IMPORT(color_shift); - - IMPORT(gradient_offset_inside); - IMPORT(gradient_offset_outside); - IMPORT(gradient_loop_inside); - IMPORT(gradient_scale_outside); - - IMPORT(distort_inside); - IMPORT(distort_outside); - IMPORT(solid_inside); - IMPORT(solid_outside); - IMPORT(invert_inside); - IMPORT(invert_outside); - IMPORT(shade_inside); - IMPORT(shade_outside); - - IMPORT(smooth_outside); - IMPORT(broken); - - IMPORT(gradient_inside); - IMPORT(gradient_outside); - - if(param=="iterations" && value.same_type_as(iterations)) - { - iterations=value.get(iterations); - if(iterations<0) - iterations=0; - if(iterations>500000) - iterations=500000; - return true; - } - if(param=="bailout" && value.same_type_as(bailout)) - { - bailout=value.get(bailout); - bailout*=bailout; - lp=log(log(bailout)); - return true; - } - - return false; -} - -ValueBase -Mandelbrot::get_param(const String & param)const -{ -// EXPORT(icolor); -// EXPORT(ocolor); -// EXPORT(color_shift); - EXPORT(iterations); - - EXPORT(gradient_offset_inside); - EXPORT(gradient_offset_outside); - EXPORT(gradient_loop_inside); - EXPORT(gradient_scale_outside); - - EXPORT(distort_inside); - EXPORT(distort_outside); - EXPORT(solid_inside); - EXPORT(solid_outside); - EXPORT(invert_inside); - EXPORT(invert_outside); - EXPORT(shade_inside); - EXPORT(shade_outside); - EXPORT(smooth_outside); - EXPORT(broken); - - EXPORT(gradient_inside); - EXPORT(gradient_outside); - - if(param=="bailout") - return sqrt(bailout); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return ValueBase(); -} - -Layer::Vocab -Mandelbrot::get_param_vocab()const -{ - Layer::Vocab ret; - - - ret.push_back(ParamDesc("iterations") - .set_local_name(_("Iterations")) - ); - ret.push_back(ParamDesc("bailout") - .set_local_name(_("Bailout ValueBase")) - ); - - ret.push_back(ParamDesc("broken") - .set_local_name(_("Break Set")) - .set_description(_("Modify equation to achieve interesting results")) - ); - - - ret.push_back(ParamDesc("distort_inside") - .set_local_name(_("Distort Inside")) - .set_group(_("Inside")) - ); - ret.push_back(ParamDesc("shade_inside") - .set_local_name(_("Shade Inside")) - .set_group(_("Inside")) - ); - ret.push_back(ParamDesc("solid_inside") - .set_local_name(_("Solid Inside")) - .set_group(_("Inside")) - ); - ret.push_back(ParamDesc("invert_inside") - .set_local_name(_("Invert Inside")) - .set_group(_("Inside")) - ); - ret.push_back(ParamDesc("gradient_inside") - .set_local_name(_("Gradient Inside")) - .set_group(_("Inside")) - ); - ret.push_back(ParamDesc("gradient_offset_inside") - .set_local_name(_("Offset Inside")) - .set_group(_("Inside")) - ); - ret.push_back(ParamDesc("gradient_loop_inside") - .set_local_name(_("Loop Inside")) - .set_group(_("Inside")) - ); - - ret.push_back(ParamDesc("distort_outside") - .set_local_name(_("Distort Outside")) - .set_group(_("Outside")) - ); - ret.push_back(ParamDesc("shade_outside") - .set_local_name(_("Shade Outside")) - .set_group(_("Outside")) - ); - ret.push_back(ParamDesc("solid_outside") - .set_local_name(_("Solid Outside")) - .set_group(_("Outside")) - ); - ret.push_back(ParamDesc("invert_outside") - .set_local_name(_("Invert Outside")) - .set_group(_("Outside")) - ); - ret.push_back(ParamDesc("gradient_outside") - .set_local_name(_("Gradient outside")) - .set_group(_("Outside")) - ); - ret.push_back(ParamDesc("smooth_outside") - .set_local_name(_("Smooth Outside")) - .set_description(_("Smooth the coloration outside the set")) - .set_group(_("Outside")) - ); - ret.push_back(ParamDesc("gradient_offset_outside") - .set_local_name(_("Offset Outside")) - .set_group(_("Outside")) - ); - ret.push_back(ParamDesc("gradient_scale_outside") - .set_local_name(_("Scale Outside")) - .set_group(_("Outside")) - ); - - return ret; -} - -Color -Mandelbrot::get_color(Context context, const Point &pos)const -{ - Real - cr, ci, - zr, zi, - zr_hold; - - ColorReal - depth, mag(0); - - Color - ret; - - - zr=zi=0; - cr=pos[0]; - ci=pos[1]; - - for(int i=0;ibailout) - { - if(smooth_outside) - { - // Darco's original mandelbrot smoothing algo - // depth=((Point::value_type)i+(2.0-sqrt(mag))/PI); - - // Linas Vepstas algo (Better than darco's) - // See (http://linas.org/art-gallery/escape/smooth.html) - depth= (ColorReal)i + LOG_OF_2*lp - log(log(sqrt(mag))) / LOG_OF_2; - - // Clamp - if(depth<0) depth=0; - } - else - depth=static_cast(i); - - ColorReal amount(depth/static_cast(iterations)); - amount=amount*gradient_scale_outside+gradient_offset_outside; - amount-=floor(amount); - - if(solid_outside) - ret=gradient_outside(amount); - else - { - if(distort_outside) - ret=context.get_color(Point(pos[0]+zr,pos[1]+zi)); - else - ret=context.get_color(pos); - - if(invert_outside) - ret=~ret; - - if(shade_outside) - ret=Color::blend(gradient_outside(amount), ret, 1.0); - } - - - return ret; - } - } - - ColorReal amount(abs(mag+gradient_offset_inside)); - if(gradient_loop_inside) - amount-=floor(amount); - - if(solid_inside) - ret=gradient_inside(amount); - else - { - if(distort_inside) - ret=context.get_color(Point(pos[0]+zr,pos[1]+zi)); - else - ret=context.get_color(pos); - - if(invert_inside) - ret=~ret; - - if(shade_inside) - ret=Color::blend(gradient_inside(amount), ret, 1.0); - } - - return ret; -} diff --git a/synfig-core/trunk/src/modules/lyr_std/mandelbrot.h b/synfig-core/trunk/src/modules/lyr_std/mandelbrot.h deleted file mode 100644 index a5f514b..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/mandelbrot.h +++ /dev/null @@ -1,86 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mandelbrot.h -** \brief Header file for implementation of the "Mandelbrot Set" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_MANDELBROT_H -#define __SYNFIG_MANDELBROT_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -class Mandelbrot : public Layer -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - Real bailout; - Real lp; - int iterations; - - bool smooth_outside; - bool broken; - - bool distort_inside; - bool distort_outside; - bool solid_inside; - bool solid_outside; - bool invert_inside; - bool invert_outside; - bool shade_outside; - bool shade_inside; - Real gradient_offset_inside; - Real gradient_offset_outside; - bool gradient_loop_inside; - Real gradient_scale_outside; - Gradient gradient_inside; - Gradient gradient_outside; - -public: - Mandelbrot(); - - virtual bool set_param(const String ¶m, const ValueBase &value); - virtual ValueBase get_param(const String ¶m)const; - virtual Color get_color(Context context, const Point &pos)const; - virtual Vocab get_param_vocab()const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_std/rotate.cpp b/synfig-core/trunk/src/modules/lyr_std/rotate.cpp deleted file mode 100644 index fd13f92..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/rotate.cpp +++ /dev/null @@ -1,337 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file rotate.cpp -** \brief Implementation of the "Rotate" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "rotate.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Rotate); -SYNFIG_LAYER_SET_NAME(Rotate,"rotate"); -SYNFIG_LAYER_SET_LOCAL_NAME(Rotate,N_("Rotate")); -SYNFIG_LAYER_SET_CATEGORY(Rotate,N_("Transform")); -SYNFIG_LAYER_SET_VERSION(Rotate,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Rotate,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -Rotate::Rotate(): - origin (0,0), - amount (Angle::deg(0)), - sin_val (0), - cos_val (1) -{ -} - -Rotate::~Rotate() -{ -} - -bool -Rotate::set_param(const String & param, const ValueBase &value) -{ - IMPORT(origin); - - if(param=="amount" && value.same_type_as(amount)) - { - amount=value.get(amount); - sin_val=Angle::sin(amount).get(); - cos_val=Angle::cos(amount).get(); - return true; - } - - return false; -} - -ValueBase -Rotate::get_param(const String ¶m)const -{ - EXPORT(origin); - EXPORT(amount); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return ValueBase(); -} - -Layer::Vocab -Rotate::get_param_vocab()const -{ - Layer::Vocab ret; - - ret.push_back(ParamDesc("origin") - .set_local_name(_("Origin")) - .set_description(_("Point where you want the origin to be")) - ); - - ret.push_back(ParamDesc("amount") - .set_local_name(_("Amount")) - .set_description(_("Amount of rotation")) - .set_origin("origin") - ); - - return ret; -} - -class Rotate_Trans : public Transform -{ - etl::handle layer; -public: - Rotate_Trans(const Rotate* x):Transform(x->get_guid()),layer(x) { } - - synfig::Vector perform(const synfig::Vector& x)const - { - Point pos(x-layer->origin); - return Point(layer->cos_val*pos[0]-layer->sin_val*pos[1],layer->sin_val*pos[0]+layer->cos_val*pos[1])+layer->origin; - } - - synfig::Vector unperform(const synfig::Vector& x)const - { - Point pos(x-layer->origin); - return Point(layer->cos_val*pos[0]+layer->sin_val*pos[1],-layer->sin_val*pos[0]+layer->cos_val*pos[1])+layer->origin; - } -}; -etl::handle -Rotate::get_transform()const -{ - return new Rotate_Trans(this); -} - -synfig::Layer::Handle -Rotate::hit_check(synfig::Context context, const synfig::Point &p)const -{ - Point pos(p-origin); - Point newpos(cos_val*pos[0]+sin_val*pos[1],-sin_val*pos[0]+cos_val*pos[1]); - newpos+=origin; - return context.hit_check(newpos); -} - -Color -Rotate::get_color(Context context, const Point &p)const -{ - Point pos(p-origin); - Point newpos(cos_val*pos[0]+sin_val*pos[1],-sin_val*pos[0]+cos_val*pos[1]); - newpos+=origin; - return context.get_color(newpos); -} - -bool -Rotate::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - if(amount.dist(Angle::deg(0))==Angle::deg(0)) - return context.accelerated_render(surface,quality,renddesc,cb); - if(amount.dist(Angle::deg(180))==Angle::deg(0)) - { - RendDesc desc(renddesc); - desc.clear_flags(); - Point tmp; - tmp=renddesc.get_tl()-origin; - desc.set_tl(Point(-tmp[0],-tmp[1])+origin); - tmp=renddesc.get_br()-origin; - desc.set_br(Point(-tmp[0],-tmp[1])+origin); - return context.accelerated_render(surface,quality,desc,cb); - } - - SuperCallback stageone(cb,0,9000,10000); - SuperCallback stagetwo(cb,9000,10000,10000); - - if(cb && !cb->amount_complete(0,10000)) - return false; - - Point tl(renddesc.get_tl()-origin); - Point br(renddesc.get_br()-origin); - - { - Point rot_tl(cos_val*tl[0]+sin_val*tl[1],-sin_val*tl[0]+cos_val*tl[1]); - Point rot_br(cos_val*br[0]+sin_val*br[1],-sin_val*br[0]+cos_val*br[1]); - Point rot_tr(cos_val*br[0]+sin_val*tl[1],-sin_val*br[0]+cos_val*tl[1]); - Point rot_bl(cos_val*tl[0]+sin_val*br[1],-sin_val*tl[0]+cos_val*br[1]); - rot_tl+=origin; - rot_br+=origin; - rot_tr+=origin; - rot_bl+=origin; - - Point min_point(min(min(min(rot_tl[0],rot_br[0]),rot_tr[0]),rot_bl[0]),min(min(min(rot_tl[1],rot_br[1]),rot_tr[1]),rot_bl[1])); - Point max_point(max(max(max(rot_tl[0],rot_br[0]),rot_tr[0]),rot_bl[0]),max(max(max(rot_tl[1],rot_br[1]),rot_tr[1]),rot_bl[1])); - - if(tl[0]>br[0]) - { - tl[0]=max_point[0]; - br[0]=min_point[0]; - } - else - { - br[0]=max_point[0]; - tl[0]=min_point[0]; - } - if(tl[1]>br[1]) - { - tl[1]=max_point[1]; - br[1]=min_point[1]; - } - else - { - br[1]=max_point[1]; - tl[1]=min_point[1]; - } - } - - Real pw=(renddesc.get_w())/(renddesc.get_br()[0]-renddesc.get_tl()[0]); - Real ph=(renddesc.get_h())/(renddesc.get_br()[1]-renddesc.get_tl()[1]); - - // we're going to round the canvas size to an integer number of pixels, so round the - // tl-br rectangle accordingly - otherwise we see the jittering described in bug 2152666 - br[0] -= (pw*(br[0]-tl[0]) - round_to_int(pw*(br[0]-tl[0]))) / pw; - br[1] -= (ph*(br[1]-tl[1]) - round_to_int(ph*(br[1]-tl[1]))) / ph; - - RendDesc desc(renddesc); - desc.clear_flags(); - //desc.set_flags(RendDesc::PX_ASPECT); - desc.set_tl(tl); - desc.set_br(br); - desc.set_wh(round_to_int(pw*(br[0]-tl[0])),round_to_int(ph*(br[1]-tl[1]))); - - //synfig::warning("given window: [%f,%f]-[%f,%f] %dx%d",renddesc.get_tl()[0],renddesc.get_tl()[1],renddesc.get_br()[0],renddesc.get_br()[1],renddesc.get_w(),renddesc.get_h()); - //synfig::warning("surface to render: [%f,%f]-[%f,%f] %dx%d",desc.get_tl()[0],desc.get_tl()[1],desc.get_br()[0],desc.get_br()[1],desc.get_w(),desc.get_h()); - - Surface source; - source.set_wh(desc.get_w(),desc.get_h()); - - if(!context.accelerated_render(&source,quality,desc,&stageone)) - return false; - - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - - Surface::pen pen(surface->begin()); - - if(quality<=4) - { - // CUBIC - int x,y;//,u,v,u2,v2; - Point point,tmp; - for(y=0,point[1]=renddesc.get_tl()[1];yget_h();y++,pen.inc_y(),pen.dec_x(x),point[1]+=1.0/ph) - { - for(x=0,point[0]=renddesc.get_tl()[0];xget_w();x++,pen.inc_x(),point[0]+=1.0/pw) - { - tmp=Point(cos_val*(point[0]-origin[0])+sin_val*(point[1]-origin[1]),-sin_val*(point[0]-origin[0])+cos_val*(point[1]-origin[1])) +origin; - (*surface)[y][x]=source.cubic_sample((tmp[0]-tl[0])*pw,(tmp[1]-tl[1])*ph); - } - if((y&31)==0 && cb) - { - if(!stagetwo.amount_complete(y,surface->get_h())) - return false; - } - } - } - else - if(quality<=6) - { - // INTERPOLATION_LINEAR - int x,y;//,u,v,u2,v2; - Point point,tmp; - for(y=0,point[1]=renddesc.get_tl()[1];yget_h();y++,pen.inc_y(),pen.dec_x(x),point[1]+=1.0/ph) - { - for(x=0,point[0]=renddesc.get_tl()[0];xget_w();x++,pen.inc_x(),point[0]+=1.0/pw) - { - tmp=Point(cos_val*(point[0]-origin[0])+sin_val*(point[1]-origin[1]),-sin_val*(point[0]-origin[0])+cos_val*(point[1]-origin[1])) +origin; - (*surface)[y][x]=source.linear_sample((tmp[0]-tl[0])*pw,(tmp[1]-tl[1])*ph); - } - if((y&31)==0 && cb) - { - if(!stagetwo.amount_complete(y,surface->get_h())) - return false; - } - } - } - else - { - // NEAREST_NEIGHBOR - int x,y,u,v; - Point point,tmp; - for(y=0,point[1]=renddesc.get_tl()[1];yget_h();y++,pen.inc_y(),pen.dec_x(x),point[1]+=1.0/ph) - { - for(x=0,point[0]=renddesc.get_tl()[0];xget_w();x++,pen.inc_x(),point[0]+=1.0/pw) - { - tmp=Point(cos_val*(point[0]-origin[0])+sin_val*(point[1]-origin[1]),-sin_val*(point[0]-origin[0])+cos_val*(point[1]-origin[1])) +origin; - u=int((tmp[0]-tl[0])*pw); - v=int((tmp[1]-tl[1])*ph); - if(u<0) - u=0; - if(v<0) - v=0; - if(u>=source.get_w()) - u=source.get_w()-1; - if(v>=source.get_h()) - v=source.get_h()-1; - //pen.set_value(source[v][u]); - (*surface)[y][x]=source[v][u]; - } - if((y&31)==0 && cb) - { - if(!stagetwo.amount_complete(y,surface->get_h())) - return false; - } - } - } - - if(cb && !cb->amount_complete(10000,10000)) return false; - - return true; -} - -Rect -Rotate::get_full_bounding_rect(Context context)const -{ - Rect under(context.get_full_bounding_rect()); - return get_transform()->perform(under); -} - diff --git a/synfig-core/trunk/src/modules/lyr_std/rotate.h b/synfig-core/trunk/src/modules/lyr_std/rotate.h deleted file mode 100644 index a80d3de..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/rotate.h +++ /dev/null @@ -1,74 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file rotate.h -** \brief Header file for implementation of the "Rotate" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_ROTATE_H -#define __SYNFIG_ROTATE_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; -class Rotate_Trans; - -class Rotate : public Layer -{ - SYNFIG_LAYER_MODULE_EXT - friend class Rotate_Trans; -private: - Vector origin; - Angle amount; - - Real sin_val; - Real cos_val; -public: - Rotate(); - ~Rotate(); - - virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); - virtual ValueBase get_param(const synfig::String & param)const; - virtual Color get_color(Context context, const Point &pos)const; - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - virtual Vocab get_param_vocab()const; - virtual Rect get_full_bounding_rect(Context context)const; - - virtual etl::handle get_transform()const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_std/shade.cpp b/synfig-core/trunk/src/modules/lyr_std/shade.cpp deleted file mode 100644 index 4ab3917..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/shade.cpp +++ /dev/null @@ -1,424 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file shade.cpp -** \brief Implementation of the "Shade" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "shade.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#endif - -using namespace synfig; -using namespace etl; -using namespace std; - -/*#define TYPE_BOX 0 -#define TYPE_FASTGUASSIAN 1 -#define TYPE_CROSS 2 -#define TYPE_GAUSSIAN 3 -#define TYPE_DISC 4 -*/ - -/* -- G L O B A L S --------------------------------------------------------- */ - -SYNFIG_LAYER_INIT(Layer_Shade); -SYNFIG_LAYER_SET_NAME(Layer_Shade,"shade"); -SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Shade,N_("Shade")); -SYNFIG_LAYER_SET_CATEGORY(Layer_Shade,N_("Stylize")); -SYNFIG_LAYER_SET_VERSION(Layer_Shade,"0.2"); -SYNFIG_LAYER_SET_CVS_ID(Layer_Shade,"$Id$"); - -/* -- F U N C T I O N S ----------------------------------------------------- */ - -inline void clamp(synfig::Vector &v) -{ - if(v[0]<0.0)v[0]=0.0; - if(v[1]<0.0)v[1]=0.0; -} - -Layer_Shade::Layer_Shade(): - Layer_Composite (0.75,Color::BLEND_BEHIND), - size(0.1,0.1), - type(Blur::FASTGAUSSIAN), - color(Color::black()), - origin(0.2,-0.2), - invert(false) -{ -} - -bool -Layer_Shade::set_param(const String ¶m, const ValueBase &value) -{ - IMPORT_PLUS(size,clamp(size)); - IMPORT(type); - IMPORT_PLUS(color, { if (color.get_a() == 0) { if (converted_blend_) { - set_blend_method(Color::BLEND_ALPHA_OVER); - color.set_a(1); } else transparent_color_ = true; } }); - IMPORT(origin); - IMPORT(invert); - - IMPORT_AS(origin,"offset"); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -Layer_Shade::get_param(const String ¶m)const -{ - EXPORT(size); - EXPORT(type); - EXPORT(color); - EXPORT(origin); - EXPORT(invert); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Color -Layer_Shade::get_color(Context context, const Point &pos)const -{ - Point blurpos = Blur(size,type)(pos); - - if(get_amount()==0.0) - return context.get_color(pos); - - Color shade(color); - - if(!invert) - shade.set_a(context.get_color(blurpos-origin).get_a()); - else - shade.set_a(1.0f-context.get_color(blurpos-origin).get_a()); - - return Color::blend(shade,context.get_color(pos),get_amount(),get_blend_method()); -} - -bool -Layer_Shade::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - int x,y; - - const int w = renddesc.get_w(), - h = renddesc.get_h(); - const Real pw = renddesc.get_pw(), - ph = renddesc.get_ph(); - - RendDesc workdesc(renddesc); - Surface worksurface; - etl::surface blurred; - - //expand the working surface to accommodate the blur - - //the expanded size = 1/2 the size in each direction rounded up - int halfsizex = (int) (abs(size[0]*.5/pw) + 3), - halfsizey = (int) (abs(size[1]*.5/ph) + 3); - - int origin_u(-round_to_int(origin[0]/pw)),origin_v(-round_to_int(origin[1]/ph)); - - int origin_w(w+abs(origin_u)),origin_h(h+abs(origin_v)); - - workdesc.set_subwindow( - origin_u<0?origin_u:0, - origin_v<0?origin_v:0, - (origin_u>0?origin_u:0)+w, - (origin_v>0?origin_v:0)+h - ); - - if(quality >= 10) - { - halfsizex=1; - halfsizey=1; - } - else if (quality == 9) - { - halfsizex/=4; - halfsizey/=4; - } - - //expand by 1/2 size in each direction on either side - switch(type) - { - case Blur::DISC: - case Blur::BOX: - case Blur::CROSS: - { - workdesc.set_subwindow(-max(1,halfsizex),-max(1,halfsizey),origin_w+2*max(1,halfsizex),origin_h+2*max(1,halfsizey)); - break; - } - case Blur::FASTGAUSSIAN: - { - if(quality < 4) - { - halfsizex*=2; - halfsizey*=2; - } - workdesc.set_subwindow(-max(1,halfsizex),-max(1,halfsizey),origin_w+2*max(1,halfsizex),origin_h+2*max(1,halfsizey)); - break; - } - case Blur::GAUSSIAN: - { - #define GAUSSIAN_ADJUSTMENT (0.05) - Real pw = (Real)workdesc.get_w()/(workdesc.get_br()[0]-workdesc.get_tl()[0]); - Real ph = (Real)workdesc.get_h()/(workdesc.get_br()[1]-workdesc.get_tl()[1]); - - pw=pw*pw; - ph=ph*ph; - - halfsizex = (int)(abs(pw)*size[0]*GAUSSIAN_ADJUSTMENT+0.5); - halfsizey = (int)(abs(ph)*size[1]*GAUSSIAN_ADJUSTMENT+0.5); - - halfsizex = (halfsizex + 1)/2; - halfsizey = (halfsizey + 1)/2; - workdesc.set_subwindow( -halfsizex, -halfsizey, origin_w+2*halfsizex, origin_h+2*halfsizey ); - - break; - } - } -#define SCALE_FACTOR (64.0) - if(/*quality>9 || */size[0]<=pw*SCALE_FACTOR) - { - SuperCallback stageone(cb,0,5000,10000); - SuperCallback stagetwo(cb,5000,10000,10000); - - //callbacks depend on how long the blur takes - if(size[0] || size[1]) - { - if(type == Blur::DISC) - { - stageone = SuperCallback(cb,0,5000,10000); - stagetwo = SuperCallback(cb,5000,10000,10000); - } - else - { - stageone = SuperCallback(cb,0,9000,10000); - stagetwo = SuperCallback(cb,9000,10000,10000); - } - } - else - { - stageone = SuperCallback(cb,0,9999,10000); - stagetwo = SuperCallback(cb,9999,10000,10000); - } - - - - //render the background onto the expanded surface - if(!context.accelerated_render(&worksurface,quality,workdesc,&stageone)) - return false; - - // Copy over the alpha - blurred.set_wh(worksurface.get_w(),worksurface.get_h()); - for(int j=0;jset_wh(renddesc.get_w(),renddesc.get_h()); - - int u = halfsizex-(origin_u<0?origin_u:0), v = halfsizey-(origin_v<0?origin_v:0); - for(y=0;yamount_complete(10000,10000)) - { - //if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); - return false; - } - - return true; -} - -Layer::Vocab -Layer_Shade::get_param_vocab(void)const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("color") - .set_local_name(_("Color")) - ); - ret.push_back(ParamDesc("origin") - .set_local_name(_("Origin")) - ); - ret.push_back(ParamDesc("size") - .set_local_name(_("Size")) - .set_description(_("Size of Shade")) - .set_is_distance() - .set_origin("origin") - ); - ret.push_back(ParamDesc("type") - .set_local_name(_("Type")) - .set_description(_("Type of blur to use")) - .set_hint("enum") - .add_enum_value(Blur::BOX,"box",_("Box Blur")) - .add_enum_value(Blur::FASTGAUSSIAN,"fastgaussian",_("Fast Gaussian Blur")) - .add_enum_value(Blur::CROSS,"cross",_("Cross-Hatch Blur")) - .add_enum_value(Blur::GAUSSIAN,"gaussian",_("Gaussian Blur")) - .add_enum_value(Blur::DISC,"disc",_("Disc Blur")) - ); - - ret.push_back(ParamDesc("invert") - .set_local_name(_("Invert")) - ); - - return ret; -} - -Rect -Layer_Shade::get_full_bounding_rect(Context context)const -{ - if(is_disabled()) - return context.get_full_bounding_rect(); - - if(invert) - return Rect::full_plane(); - - Rect under(context.get_full_bounding_rect()); - - if(Color::is_onto(get_blend_method())) - return under; - - Rect bounds((under+origin).expand_x(size[0]).expand_y(size[1])); - - if(is_solid_color()) - return bounds; - - return bounds|under; -} diff --git a/synfig-core/trunk/src/modules/lyr_std/shade.h b/synfig-core/trunk/src/modules/lyr_std/shade.h deleted file mode 100644 index ec16ad1..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/shade.h +++ /dev/null @@ -1,69 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file shade.h -** \brief Header file for implementation of the "Shade" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifndef __SYNFIG_LAYER_SHADE_H__ -#define __SYNFIG_LAYER_SHADE_H__ - -/* -- H E A D E R S --------------------------------------------------------- */ - -#include -#include -#include -#include - -using namespace synfig; -using namespace std; -using namespace etl; - -class Layer_Shade : public synfig::Layer_Composite -{ - SYNFIG_LAYER_MODULE_EXT -private: - synfig::Vector size; - int type; - synfig::Color color; - synfig::Vector origin; - bool invert; - -public: - Layer_Shade(); - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - - virtual ValueBase get_param(const String & param)const; - - virtual Color get_color(Context context, const Point &pos)const; - - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - virtual Rect get_full_bounding_rect(Context context)const; - virtual Vocab get_param_vocab()const; - virtual bool reads_context()const { return true; } -}; // END of class Layer_Shade - -/* -- E X T E R N S --------------------------------------------------------- */ - -/* -- E N D ----------------------------------------------------------------- */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_std/sphere_distort.cpp b/synfig-core/trunk/src/modules/lyr_std/sphere_distort.cpp deleted file mode 100644 index 9c0003e..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/sphere_distort.cpp +++ /dev/null @@ -1,578 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file sphere_distort.cpp -** \brief Implementation of the "Spherize" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "sphere_distort.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -#ifndef PI -const double PI = 3.14159265; -#endif - -enum -{ - TYPE_NORMAL = 0, - TYPE_DISTH = 1, //axe the horizontal axis - TYPE_DISTV = 2, //axe the vertical axis - N_TYPES -}; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Layer_SphereDistort); -SYNFIG_LAYER_SET_NAME(Layer_SphereDistort,"spherize"); -SYNFIG_LAYER_SET_LOCAL_NAME(Layer_SphereDistort,N_("Spherize")); -SYNFIG_LAYER_SET_CATEGORY(Layer_SphereDistort,N_("Distortions")); -SYNFIG_LAYER_SET_VERSION(Layer_SphereDistort,"0.2"); -SYNFIG_LAYER_SET_CVS_ID(Layer_SphereDistort,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -Layer_SphereDistort::Layer_SphereDistort() -:center(0,0), -radius(1), -percent(1.0), -type(TYPE_NORMAL), -clip(false) -{ -} - - -bool -Layer_SphereDistort::set_param(const String & param, const ValueBase &value) -{ - IMPORT_PLUS(center,sync()); - IMPORT_PLUS(radius,sync()); - IMPORT(type); - IMPORT_AS(percent,"amount"); - IMPORT(clip); - - if(param=="percent") - { - if(dynamic_param_list().count("percent")) - { - connect_dynamic_param("amount",dynamic_param_list().find("percent")->second); - disconnect_dynamic_param("percent"); - synfig::warning("Layer_SphereDistort::::set_param(): Updated valuenode connection to use the new \"amount\" parameter."); - } - else - synfig::warning("Layer_SphereDistort::::set_param(): The parameter \"segment_list\" is deprecated. Use \"bline\" instead."); - } - - return false; -} - -ValueBase -Layer_SphereDistort::get_param(const String ¶m)const -{ - EXPORT(center); - EXPORT(radius); - EXPORT(type); - EXPORT_AS(percent,"amount"); - EXPORT(clip); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return ValueBase(); -} - -void -Layer_SphereDistort::sync() -{ -} - -Layer::Vocab -Layer_SphereDistort::get_param_vocab()const -{ - Layer::Vocab ret; - - ret.push_back(ParamDesc("center") - .set_local_name(_("Position")) - ); - - ret.push_back(ParamDesc("radius") - .set_local_name(_("Radius")) - .set_origin("center") - .set_is_distance() - ); - - ret.push_back(ParamDesc("amount") - .set_local_name(_("Amount")) - .set_is_distance(false) - ); - - ret.push_back(ParamDesc("clip") - .set_local_name(_("Clip")) - ); - - ret.push_back(ParamDesc("type") - .set_local_name(_("Distort Type")) - .set_description(_("The direction of the distortion")) - .set_hint("enum") - .add_enum_value(TYPE_NORMAL,"normal",_("Spherize")) - .add_enum_value(TYPE_DISTH,"honly",_("Vertical Bar")) - .add_enum_value(TYPE_DISTV,"vonly",_("Horizontal Bar")) - ); - - return ret; -} - -/* - Spherical Distortion: maps an image onto a ellipsoid of some sort - - so the image coordinate (i.e. distance away from the center) - will determine how things get mapped - - so with the radius and position the mapping would go as follows - - r = (pos - center) / radius clamped to [-1,1] - - if it's outside of that range then it's not distorted - but if it's inside of that range then it goes as follows - - angle = r * pi/2 (-pi/2,pi/2) - - newr = cos(angle)*radius - - the inverse of this is (which is actually what we'd be transforming it from - - -*/ - -inline float spherify(float f) -{ - if(f > -1 && f < 1 && f!=0) - return sinf(f*(PI/2)); - else return f; -} - -inline float unspherify(float f) -{ - if(f > -1 && f < 1 && f!=0) - return asin(f)/(PI/2); - else return f; -} - -Point sphtrans(const Point &p, const Point ¢er, const float &radius, - const Real &percent, int type, bool& clipped) -{ - const Vector v = (p - center) / radius; - - Point newp = p; - const float t = percent; - - clipped=false; - - if(type == TYPE_NORMAL) - { - const float m = v.mag(); - float lerp(0); - - if(m <= -1 || m >= 1) - { - clipped=true; - return newp; - }else - if(m==0) - return newp; - else - if(t > 0) - { - lerp = (t*unspherify(m) + (1-t)*m); - }else if(t < 0) - { - lerp = ((1+t)*m - t*spherify(m)); - }else lerp = m; - - const float d = lerp*radius; - newp = center + v*(d/m); - } - - else if(type == TYPE_DISTH) - { - float lerp(0); - if(v[0] <= -1 || v[0] >= 1) - { - clipped=true; - return newp; - }else - if(v[0]==0) - return newp; - else - if(t > 0) - { - lerp = (t*unspherify(v[0]) + (1-t)*v[0]); - }else if(t < 0) - { - lerp = ((1+t)*v[0] - t*spherify(v[0])); - }else lerp = v[0]; - - newp[0] = center[0] + lerp*radius; - } - - else if(type == TYPE_DISTV) - { - float lerp(0); - if(v[1] <= -1 || v[1] >= 1) - { - clipped=true; - return newp; - } - else - if(v[1]==0) - return newp; - else - if(t > 0) - { - lerp = (t*unspherify(v[1]) + (1-t)*v[1]); - }else if(t < 0) - { - lerp = ((1+t)*v[1] - t*spherify(v[1])); - }else lerp = v[1]; - - newp[1] = center[1] + lerp*radius; - } - - return newp; -} - -inline Point sphtrans(const Point &p, const Point ¢er, const Real &radius, - const Real &percent, int type) -{ - bool tmp; - return sphtrans(p, center, radius, percent, type, tmp); -} - -synfig::Layer::Handle -Layer_SphereDistort::hit_check(synfig::Context context, const synfig::Point &pos)const -{ - bool clipped; - Point point(sphtrans(pos,center,radius,percent,type,clipped)); - if(clip && clipped) - return 0; - return context.hit_check(point); -} - -Color -Layer_SphereDistort::get_color(Context context, const Point &pos)const -{ - bool clipped; - Point point(sphtrans(pos,center,radius,percent,type,clipped)); - if(clip && clipped) - return Color::alpha(); - return context.get_color(point); -} - -#if 1 -bool Layer_SphereDistort::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - /* Things to consider: - 1) Block expansion for distortion (ouch... quality level??) - 2) Bounding box clipping - 3) Super sampling for better visual quality (based on the quality level?) - 4) Interpolation type for sampling (based on quality level?) - - //things to defer until after - super sampling, non-linear interpolation - */ - - //bounding box reject - { - Rect sphr; - - sphr.set_point(center[0]-radius,center[1]-radius); - sphr.expand(center[0]+radius,center[1]+radius); - - //get the bounding box of the transform - Rect windr; - - //and the bounding box of the rendering - windr.set_point(renddesc.get_tl()[0],renddesc.get_tl()[1]); - windr.expand(renddesc.get_br()[0],renddesc.get_br()[1]); - - //test bounding boxes for collision - if( (type == TYPE_NORMAL && !intersect(sphr,windr)) || - (type == TYPE_DISTH && (sphr.minx >= windr.maxx || windr.minx >= sphr.maxx)) || - (type == TYPE_DISTV && (sphr.miny >= windr.maxy || windr.miny >= sphr.maxy)) ) - { - //synfig::warning("Spherize: Bounding box reject"); - if (clip) - { - surface->set_wh(renddesc.get_w(), renddesc.get_h()); - surface->clear(); - return true; - } - else - return context.accelerated_render(surface,quality,renddesc,cb); - } - - //synfig::warning("Spherize: Bounding box accept"); - } - - //Ok, so we overlap some... now expand the window for rendering - RendDesc r = renddesc; - Surface background; - Real pw = renddesc.get_pw(),ph = renddesc.get_ph(); - - int nl=0,nt=0,nr=0,nb=0, nw=0,nh=0; - Point tl = renddesc.get_tl(), br = renddesc.get_br(); - - { - //must enlarge window by pixel coordinates so go! - - //need to figure out closest and farthest point and distort THOSE - - Point origin[4] = {tl,tl,br,br}; - Vector v[4] = {Vector(0,br[1]-tl[1]), - Vector(br[0]-tl[0],0), - Vector(0,tl[1]-br[1]), - Vector(tl[0]-br[0],0)}; - - Point close(0,0); - Real t = 0; - Rect expandr(tl,br); - - //expandr.set_point(tl[0],tl[1]); - //expandr.expand(br[0],br[1]); - - //synfig::warning("Spherize: Loop through lines and stuff"); - for(int i=0; i<4; ++i) - { - //synfig::warning("Spherize: %d", i); - Vector p_o = center-origin[i]; - - //project onto left line - t = (p_o*v[i])/v[i].mag_squared(); - - //clamp - if(t < 0) t = 0; if(t > 1) t = 1; - - close = origin[i] + v[i]*t; - - //now get transforms and expand the rectangle to accommodate - Point p = sphtrans(close,center,radius,percent,type); - expandr.expand(p[0],p[1]); - p = sphtrans(origin[i],center,radius,percent,type); - expandr.expand(p[0],p[1]); - p = sphtrans(origin[i]+v[i],center,radius,percent,type); - expandr.expand(p[0],p[1]); - } - - /*synfig::warning("Spherize: Bounding box (%f,%f)-(%f,%f)", - expandr.minx,expandr.miny,expandr.maxx,expandr.maxy);*/ - - //now that we have the bounding rectangle of ALL the pixels (should be...) - //order it so that it's in the same orientation as the tl,br pair - - //synfig::warning("Spherize: Organize like tl,br"); - Point ntl(0,0),nbr(0,0); - - //sort x - if(tl[0] < br[0]) - { - ntl[0] = expandr.minx; - nbr[0] = expandr.maxx; - } - else - { - ntl[0] = expandr.maxx; - nbr[0] = expandr.minx; - } - - //sort y - if(tl[1] < br[1]) - { - ntl[1] = expandr.miny; - nbr[1] = expandr.maxy; - } - else - { - ntl[1] = expandr.maxy; - nbr[1] = expandr.miny; - } - - //now expand the window as needed - Vector temp = ntl-tl; - - //pixel offset - nl = (int)(temp[0]/pw)-1; - nt = (int)(temp[1]/ph)-1; - - temp = nbr - br; - nr = (int)(temp[0]/pw)+1; - nb = (int)(temp[1]/ph)+1; - - nw = renddesc.get_w() + nr - nl; - nh = renddesc.get_h() + nb - nt; - - //synfig::warning("Spherize: Setting subwindow (%d,%d) (%d,%d) (%d,%d)",nl,nt,nr,nb,nw,nh); - r.set_subwindow(nl,nt,nw,nh); - - /*r = renddesc; - nw = r.get_w(), nh = r.get_h(); - nl = 0, nt = 0;*/ - } - - //synfig::warning("Spherize: render background"); - if(!context.accelerated_render(&background,quality,r,cb)) - { - synfig::warning("SphereDistort: Layer below failed"); - return false; - } - - //now distort and check to make sure we aren't overshooting our bounds here - int w = renddesc.get_w(), h = renddesc.get_h(); - surface->set_wh(w,h); - - Point sample = tl, sub = tl, trans(0,0); - float xs = 0,ys = 0; - int y=0,x=0; - Real invpw = 1/pw, invph = 1/ph; - Surface::pen p = surface->begin(); - - Point rtl = r.get_tl(); - - //synfig::warning("Spherize: About to transform"); - - for(y = 0; y < h; ++y, sample[1] += ph, p.inc_y()) - { - sub = sample; - for(x = 0; x < w; ++x, sub[0] += pw, p.inc_x()) - { - bool clipped; - trans=sphtrans(sub,center,radius,percent,type,clipped); - if(clip && clipped) - { - p.put_value(Color::alpha()); - continue; - } - - xs = (trans[0]-rtl[0])*invpw; - ys = (trans[1]-rtl[1])*invph; - - if(!(xs >= 0 && xs < nw && ys >= 0 && ys < nh)) - { - //synfig::warning("Spherize: we failed to account for %f,%f",xs,ys); - p.put_value(context.get_color(trans));//Color::alpha()); - continue; - } - - //sample at that pixel location based on the quality - if(quality <= 4) // cubic - p.put_value(background.cubic_sample(xs,ys)); - else if(quality <= 5) // cosine - p.put_value(background.cosine_sample(xs,ys)); - else if(quality <= 6) // linear - p.put_value(background.linear_sample(xs,ys)); - else // nearest - p.put_value(background[round_to_int(ys)][round_to_int(xs)]); - } - p.dec_x(w); - } - - return true; -} -#endif - -class synfig::Spherize_Trans : public synfig::Transform -{ - etl::handle layer; -public: - Spherize_Trans(const Layer_SphereDistort* x):Transform(x->get_guid()),layer(x) { } - - synfig::Vector perform(const synfig::Vector& x)const - { - return sphtrans(x,layer->center,layer->radius,-layer->percent,layer->type); - } - - synfig::Vector unperform(const synfig::Vector& x)const - { - return sphtrans(x,layer->center,layer->radius,layer->percent,layer->type); - } -}; - -etl::handle -Layer_SphereDistort::get_transform()const -{ - return new Spherize_Trans(this); -} - -Rect -Layer_SphereDistort::get_bounding_rect()const -{ - Rect bounds(Rect::full_plane()); - - if (clip) - return bounds; - - switch(type) - { - case TYPE_NORMAL: - bounds=Rect(center[0]+radius, center[1]+radius, - center[0]-radius, center[1]-radius); - break; - case TYPE_DISTH: - bounds = Rect::vertical_strip(center[0]-radius, center[0]+radius); - break; - case TYPE_DISTV: - bounds = Rect::horizontal_strip(center[1]-radius, center[1]+radius); - break; - default: - break; - } - - return bounds; -} diff --git a/synfig-core/trunk/src/modules/lyr_std/sphere_distort.h b/synfig-core/trunk/src/modules/lyr_std/sphere_distort.h deleted file mode 100644 index acf2b0b..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/sphere_distort.h +++ /dev/null @@ -1,92 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file sphere_distort.h -** \brief Header file for implementation of the "Spherize" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_SPHERE_DISTORT_H -#define __SYNFIG_SPHERE_DISTORT_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ -namespace synfig -{ -class Spherize_Trans; - -class Layer_SphereDistort : public Layer -{ - SYNFIG_LAYER_MODULE_EXT - friend class Spherize_Trans; - -private: - - Vector center; - double radius; - - double percent; - - int type; - -// static Point sphtrans(const Point &xoff, const Point ¢er, const Real &radius, const Real &percent, int type); - -// static double spherify(double xoff); -// static double unspherify(double xoff); - - bool clip; - - synfig::Rect bounds; - - void sync(); - -public: - - Layer_SphereDistort(); - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - - virtual ValueBase get_param(const String & param)const; - - virtual Color get_color(Context context, const Point &pos)const; - - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - - virtual Rect get_bounding_rect()const; - - virtual Vocab get_param_vocab()const; - virtual etl::handle get_transform()const; -}; // END of class Layer_SphereDistort - -} - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_std/stretch.cpp b/synfig-core/trunk/src/modules/lyr_std/stretch.cpp deleted file mode 100644 index de0de94..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/stretch.cpp +++ /dev/null @@ -1,192 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file stretch.cpp -** \brief Implementation of the "Stretch" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_NO_ANGLE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "stretch.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace etl; -using namespace std; -using namespace synfig; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Layer_Stretch); -SYNFIG_LAYER_SET_NAME(Layer_Stretch,"stretch"); -SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Stretch,N_("Stretch")); -SYNFIG_LAYER_SET_CATEGORY(Layer_Stretch,N_("Distortions")); -SYNFIG_LAYER_SET_VERSION(Layer_Stretch,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Layer_Stretch,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -Layer_Stretch::Layer_Stretch(): - amount(1,1), - center(0,0) -{ -} - - -bool -Layer_Stretch::set_param(const String & param, const ValueBase &value) -{ - IMPORT(amount); - IMPORT(center); - - return false; -} - -ValueBase -Layer_Stretch::get_param(const String ¶m)const -{ - EXPORT(amount); - EXPORT(center); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return ValueBase(); -} - -Layer::Vocab -Layer_Stretch::get_param_vocab()const -{ - Layer::Vocab ret; - - ret.push_back(ParamDesc("amount") - .set_local_name(_("Amount")) - .set_origin("center") - ); - - ret.push_back(ParamDesc("center") - .set_local_name(_("Center")) - ); - - return ret; -} - -synfig::Layer::Handle -Layer_Stretch::hit_check(synfig::Context context, const synfig::Point &pos)const -{ - Point npos(pos); - npos[0]=(npos[0]-center[0])/amount[0]+center[0]; - npos[1]=(npos[1]-center[1])/amount[1]+center[1]; - return context.hit_check(npos); -} - -Color -Layer_Stretch::get_color(Context context, const Point &pos)const -{ - Point npos(pos); - npos[0]=(npos[0]-center[0])/amount[0]+center[0]; - npos[1]=(npos[1]-center[1])/amount[1]+center[1]; - return context.get_color(npos); -} - -class Stretch_Trans : public Transform -{ - etl::handle layer; -public: - Stretch_Trans(const Layer_Stretch* x):Transform(x->get_guid()),layer(x) { } - - synfig::Vector perform(const synfig::Vector& x)const - { - return Vector((x[0]-layer->center[0])*layer->amount[0]+layer->center[0], - (x[1]-layer->center[1])*layer->amount[1]+layer->center[1]); - } - - synfig::Vector unperform(const synfig::Vector& x)const - { - return Vector((x[0]-layer->center[0])/layer->amount[0]+layer->center[0], - (x[1]-layer->center[1])/layer->amount[1]+layer->center[1]); - } -}; -etl::handle -Layer_Stretch::get_transform()const -{ - return new Stretch_Trans(this); -} - -bool -Layer_Stretch::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - if (amount[0] == 0 || amount[1] == 0) - { - surface->set_wh(renddesc.get_w(), renddesc.get_h()); - surface->clear(); - return true; - } - - RendDesc desc(renddesc); - desc.clear_flags(); - // Adjust the top_left and bottom_right points - // for our zoom amount - Point npos; - npos[0]=(desc.get_tl()[0]-center[0])/amount[0]+center[0]; - npos[1]=(desc.get_tl()[1]-center[1])/amount[1]+center[1]; - desc.set_tl(npos); - npos[0]=(desc.get_br()[0]-center[0])/amount[0]+center[0]; - npos[1]=(desc.get_br()[1]-center[1])/amount[1]+center[1]; - desc.set_br(npos); - - // Render the scene - return context.accelerated_render(surface,quality,desc,cb); -} - -Rect -Layer_Stretch::get_full_bounding_rect(Context context)const -{ - Rect rect(context.get_full_bounding_rect()); - Point min(rect.get_min()), max(rect.get_max()); - - return Rect(Point((min[0]-center[0])*amount[0]+center[0], - (min[1]-center[1])*amount[1]+center[1]), - Point((max[0]-center[0])*amount[0]+center[0], - (max[1]-center[1])*amount[1]+center[1])); -} diff --git a/synfig-core/trunk/src/modules/lyr_std/stretch.h b/synfig-core/trunk/src/modules/lyr_std/stretch.h deleted file mode 100644 index 10054c4..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/stretch.h +++ /dev/null @@ -1,75 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file stretch.h -** \brief Header file for implementation of the "Stretch" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_LAYER_STRETCH_H -#define __SYNFIG_LAYER_STRETCH_H - -/* === H E A D E R S ======================================================= */ - -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class Stretch_Trans; -namespace synfig { - -class Layer_Stretch : public Layer -{ - SYNFIG_LAYER_MODULE_EXT - friend class ::Stretch_Trans; - -private: - - Vector amount; - Point center; - -public: - - Layer_Stretch(); - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - - virtual ValueBase get_param(const String & param)const; - - virtual Color get_color(Context context, const Point &pos)const; - - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - - virtual Vocab get_param_vocab()const; - virtual etl::handle get_transform()const; - virtual synfig::Rect get_full_bounding_rect(Context context)const; -}; // END of class Layer_Stretch - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_std/supersample.cpp b/synfig-core/trunk/src/modules/lyr_std/supersample.cpp deleted file mode 100644 index 608a242..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/supersample.cpp +++ /dev/null @@ -1,237 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file supersample.cpp -** \brief Implementation of the "Super Sample" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "supersample.h" -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(SuperSample); -SYNFIG_LAYER_SET_NAME(SuperSample,"super_sample"); -SYNFIG_LAYER_SET_LOCAL_NAME(SuperSample,N_("Super Sample")); -SYNFIG_LAYER_SET_CATEGORY(SuperSample,N_("Other")); -SYNFIG_LAYER_SET_VERSION(SuperSample,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(SuperSample,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -SuperSample::SuperSample():width(2),height(2) -{ - scanline=false; - alpha_aware=true; -} - -bool -SuperSample::set_param(const String & param, const ValueBase &value) -{ - - IMPORT(width); - IMPORT(height); - IMPORT(scanline); - IMPORT(alpha_aware); - - return false; -} - -ValueBase -SuperSample::get_param(const String& param)const -{ - EXPORT(width); - EXPORT(height); - EXPORT(scanline); - EXPORT(alpha_aware); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return ValueBase(); -} - -bool -SuperSample::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - // don't bother supersampling if our quality is too low. - if(quality>=10) - return context.accelerated_render(surface,quality,renddesc,cb); - - RendDesc desc(renddesc); - - SuperCallback subcb(cb,1,9000,10000); - SuperCallback stagetwo(cb,9000,10000,10000); - - desc.clear_flags(); - desc.set_wh(desc.get_w()*width,desc.get_h()*height); - - Surface tempsurface; - - // Render the scene - if(scanline) - { - handle target=surface_target(&tempsurface); - if(!target) - { - if(cb)cb->error(_("Unable to create SurfaceTarget")); - return false; - } - target->set_rend_desc(&desc); - - if(!render(context-1,target,desc,&subcb)) - { - if(cb)cb->error(strprintf(__FILE__"%d: Scanline Renderer Failure",__LINE__)); - return false; - } - } - else - if(!context.accelerated_render(&tempsurface,quality,desc,cb)) - { - //if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); - return false; - } - - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - - Surface::pen pen(surface->begin()); - Surface::pen temp_pen(tempsurface.begin()); - - if(cb && !cb->amount_complete(9001,10000)) return false; - - if(alpha_aware) - { - int x,y,u,v; - float sum; - Color pool; - for(y=0;yget_h();y++,pen.inc_y(),pen.dec_x(x),temp_pen.inc_y(height),temp_pen.dec_x(x*width)) - { - for(x=0;xget_w();x++,pen.inc_x(),temp_pen.inc_x(width)) - { - pool=Color(0,0,0,0); - sum=0; - - for(v=0;vget_h())) - return false; - } - } - } - else - { - int x,y,u,v; - Color pool; - float multiplier=1.0f/float(width*height); - for(y=0;yget_h();y++,pen.inc_y(),pen.dec_x(x),temp_pen.inc_y(height),temp_pen.dec_x(x*width)) - { - for(x=0;xget_w();x++,pen.inc_x(),temp_pen.inc_x(width)) - { - pool=Color(0,0,0,0); - for(v=0;vget_h())) - return false; - } - } - } - - if(cb && !cb->amount_complete(10000,10000)) return false; - - return true; -} - -Layer::Vocab -SuperSample::get_param_vocab(void)const -{ - Layer::Vocab ret; - - ret.push_back(ParamDesc("width") - .set_local_name(_("Width")) - .set_description(_("Width of sample area (In pixels)")) - ); - ret.push_back(ParamDesc("height") - .set_local_name(_("Height")) - .set_description(_("Height of sample area (In pixels)")) - ); - ret.push_back(ParamDesc("scanline") - .set_local_name(_("Use Parametric")) - .set_description(_("Use the Parametric Renderer")) - ); - ret.push_back(ParamDesc("alpha_aware") - .set_local_name(_("Be Alpha Safe")) - ); - - return ret; -} - -Rect -SuperSample::get_bounding_rect(Context context)const -{ - return context.get_full_bounding_rect(); -} diff --git a/synfig-core/trunk/src/modules/lyr_std/supersample.h b/synfig-core/trunk/src/modules/lyr_std/supersample.h deleted file mode 100644 index 564d0d9..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/supersample.h +++ /dev/null @@ -1,66 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file supersample.h -** \brief Header file for implementation of the "Super Sample" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_SUPERSAMPLE_H -#define __SYNFIG_SUPERSAMPLE_H - -/* === H E A D E R S ======================================================= */ - -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -class SuperSample : public synfig::Layer -{ - SYNFIG_LAYER_MODULE_EXT - -private: - int width, height; - bool scanline,alpha_aware; -public: - SuperSample(); - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - - virtual ValueBase get_param(const String & param)const; - - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - virtual synfig::Rect get_bounding_rect(Context context)const; - - virtual Vocab get_param_vocab()const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_std/timeloop.cpp b/synfig-core/trunk/src/modules/lyr_std/timeloop.cpp deleted file mode 100644 index 4306c4a..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/timeloop.cpp +++ /dev/null @@ -1,252 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file timeloop.cpp -** \brief Implementation of the "Time Loop" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "timeloop.h" -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Layer_TimeLoop); -SYNFIG_LAYER_SET_NAME(Layer_TimeLoop,"timeloop"); -SYNFIG_LAYER_SET_LOCAL_NAME(Layer_TimeLoop,N_("Time Loop")); -SYNFIG_LAYER_SET_CATEGORY(Layer_TimeLoop,N_("Other")); -SYNFIG_LAYER_SET_VERSION(Layer_TimeLoop,"0.2"); -SYNFIG_LAYER_SET_CVS_ID(Layer_TimeLoop,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -Layer_TimeLoop::Layer_TimeLoop() -{ - old_version=false; - only_for_positive_duration=false; - symmetrical=true; - link_time=0; - local_time=0; - duration=1; -} - -Layer_TimeLoop::~Layer_TimeLoop() -{ -} - -bool -Layer_TimeLoop::set_param(const String & param, const ValueBase &value) -{ - if(old_version) - { - IMPORT(start_time); - IMPORT(end_time); - } - else - { - IMPORT(local_time); - IMPORT(link_time); - IMPORT(duration); - IMPORT(only_for_positive_duration); - IMPORT(symmetrical); - } - - return Layer::set_param(param,value); -} - -ValueBase -Layer_TimeLoop::get_param(const String & param)const -{ - EXPORT(link_time); - EXPORT(local_time); - EXPORT(duration); - EXPORT(only_for_positive_duration); - EXPORT(symmetrical); - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer::get_param(param); -} - -Layer::Vocab -Layer_TimeLoop::get_param_vocab()const -{ - Layer::Vocab ret(Layer::get_param_vocab()); - - ret.push_back(ParamDesc("link_time") - .set_local_name(_("Link Time")) - ); - - ret.push_back(ParamDesc("local_time") - .set_local_name(_("Local Time")) - ); - - ret.push_back(ParamDesc("duration") - .set_local_name(_("Duration")) - ); - - ret.push_back(ParamDesc("only_for_positive_duration") - .set_local_name(_("Only For Positive Duration")) - ); - - ret.push_back(ParamDesc("symmetrical") - .set_local_name(_("Symmetrical")) - ); - - return ret; -} - -bool -Layer_TimeLoop::set_version(const String &ver) -{ - if (ver=="0.1") - old_version = true; - - return true; -} - -void -Layer_TimeLoop::reset_version() -{ - // if we're not converting from an old version of the layer, there's nothing to do - if (!old_version) - return; - - old_version = false; - - // these are the conversions to go from 0.1 to 0.2: - // - // local_time = start_time - // duration = end_time - start_time - // if (time < start_time) - // link_time = -duration : if we want to reproduce the old behaviour - do we? - // else - // link_time = 0 - - // convert the static parameters - local_time = start_time; - duration = end_time - start_time; - only_for_positive_duration = true; - symmetrical = false; - - //! \todo layer version 0.1 acted differently before start_time was reached - possibly due to a bug - link_time = 0; - - // convert the dynamic parameters - const DynamicParamList &dpl = dynamic_param_list(); - - // if neither start_time nor end_time are dynamic, there's nothing more to do - if (dpl.count("start_time") == 0 && dpl.count("end_time") == 0) - return; - - etl::rhandle start_time_value_node, end_time_value_node; - LinkableValueNode* duration_value_node; - - if (dpl.count("start_time")) - { - start_time_value_node = dpl.find("start_time")->second; - disconnect_dynamic_param("start_time"); - } - else - start_time_value_node = ValueNode_Const::create(start_time); - - if (dpl.count("end_time")) - { - end_time_value_node = dpl.find("end_time")->second; - disconnect_dynamic_param("end_time"); - } - else - end_time_value_node = ValueNode_Const::create(end_time); - - duration_value_node = ValueNode_Subtract::create(Time(0)); - duration_value_node->set_link("lhs", end_time_value_node); - duration_value_node->set_link("rhs", start_time_value_node); - - connect_dynamic_param("local_time", start_time_value_node); - connect_dynamic_param("duration", duration_value_node); -} - -void -Layer_TimeLoop::set_time(Context context, Time t)const -{ - Time time = t; - - if (!only_for_positive_duration || duration > 0) - { - if (duration == 0) - t = link_time; - else if (duration > 0) - { - t -= local_time; - t -= floor(t / duration) * duration; - t = link_time + t; - } - else - { - t -= local_time; - t -= floor(t / -duration) * -duration; - t = link_time - t; - } - - // for compatibility with v0.1 layers; before local_time is reached, take a step back - if (!symmetrical && time < local_time) - t -= duration; - } - - context.set_time(t); -} - -Color -Layer_TimeLoop::get_color(Context context, const Point &pos)const -{ - return context.get_color(pos); -} - -bool -Layer_TimeLoop::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - return context.accelerated_render(surface,quality,renddesc,cb); -} diff --git a/synfig-core/trunk/src/modules/lyr_std/timeloop.h b/synfig-core/trunk/src/modules/lyr_std/timeloop.h deleted file mode 100644 index 16bbe2a..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/timeloop.h +++ /dev/null @@ -1,78 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file timeloop.h -** \brief Header file for implementation of the "Time Loop" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TIMELOOP_H -#define __SYNFIG_TIMELOOP_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class Layer_TimeLoop : public synfig::Layer -{ - SYNFIG_LAYER_MODULE_EXT - -private: - synfig::Time link_time; - synfig::Time local_time; - synfig::Time duration; - - synfig::Time start_time; - synfig::Time end_time; - bool old_version; - bool only_for_positive_duration; - bool symmetrical; // the 0.1 version of this layer behaved differently before 'start_time' was reached - -protected: - Layer_TimeLoop(); - -public: - ~Layer_TimeLoop(); - - virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); - - virtual synfig::ValueBase get_param(const synfig::String & param)const; - - virtual Vocab get_param_vocab()const; - virtual bool set_version(const synfig::String &ver); - virtual void reset_version(); - virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; - - virtual void set_time(synfig::Context context, synfig::Time time)const; - virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_std/translate.cpp b/synfig-core/trunk/src/modules/lyr_std/translate.cpp deleted file mode 100644 index b0f65db..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/translate.cpp +++ /dev/null @@ -1,161 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file translate.cpp -** \brief Implementation of the "Translate" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "translate.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Translate); -SYNFIG_LAYER_SET_NAME(Translate,"translate"); -SYNFIG_LAYER_SET_LOCAL_NAME(Translate,N_("Translate")); -SYNFIG_LAYER_SET_CATEGORY(Translate,N_("Transform")); -SYNFIG_LAYER_SET_VERSION(Translate,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Translate,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -Translate::Translate():origin(0,0) -{ -} - -Translate::~Translate() -{ -} - -bool -Translate::set_param(const String & param, const ValueBase &value) -{ - IMPORT(origin); - - return false; -} - -ValueBase -Translate::get_param(const String& param)const -{ - EXPORT(origin); - EXPORT_NAME(); - EXPORT_VERSION(); - - return ValueBase(); -} - -Layer::Vocab -Translate::get_param_vocab()const -{ - Layer::Vocab ret; - - ret.push_back(ParamDesc("origin") - .set_local_name(_("Origin")) - .set_description(_("Point where you want the origin to be")) - ); - - return ret; -} - -synfig::Layer::Handle -Translate::hit_check(synfig::Context context, const synfig::Point &pos)const -{ - return context.hit_check(pos-origin); -} - -Color -Translate::get_color(Context context, const Point &pos)const -{ - return context.get_color(pos-origin); -} - -class Translate_Trans : public Transform -{ - etl::handle layer; -public: - Translate_Trans(const Translate* x):Transform(x->get_guid()),layer(x) { } - - synfig::Vector perform(const synfig::Vector& x)const - { - return x+layer->origin; - } - - synfig::Vector unperform(const synfig::Vector& x)const - { - return x-layer->origin; - } -}; -etl::handle -Translate::get_transform()const -{ - return new Translate_Trans(this); -} - -bool -Translate::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - RendDesc desc(renddesc); - - desc.clear_flags(); - desc.set_tl(desc.get_tl()-origin); - desc.set_br(desc.get_br()-origin); - - // Render the scene - if(!context.accelerated_render(surface,quality,desc,cb)) - { - if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); - return false; - } - - return true; -} - -Rect -Translate::get_full_bounding_rect(Context context)const -{ - return context.get_full_bounding_rect() + origin; -} diff --git a/synfig-core/trunk/src/modules/lyr_std/translate.h b/synfig-core/trunk/src/modules/lyr_std/translate.h deleted file mode 100644 index ce1b6a9..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/translate.h +++ /dev/null @@ -1,71 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file translate.h -** \brief Header file for implementation of the "Translate" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TRANSLATE_H -#define __SYNFIG_TRANSLATE_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -class Translate_Trans; - -class Translate : public Layer -{ - SYNFIG_LAYER_MODULE_EXT - friend class Translate_Trans; -private: - Vector origin; -public: - Translate(); - ~Translate(); - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - virtual ValueBase get_param(const String & param)const; - virtual Color get_color(Context context, const Point &pos)const; - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - virtual Vocab get_param_vocab()const; - virtual synfig::Rect get_full_bounding_rect(Context context)const; - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - virtual etl::handle get_transform()const; - -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_std/twirl.cpp b/synfig-core/trunk/src/modules/lyr_std/twirl.cpp deleted file mode 100644 index 38d2097..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/twirl.cpp +++ /dev/null @@ -1,241 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file twirl.cpp -** \brief Implementation of the "Twirl" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "twirl.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace etl; -using namespace std; -using namespace synfig; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Twirl); -SYNFIG_LAYER_SET_NAME(Twirl,"twirl"); -SYNFIG_LAYER_SET_LOCAL_NAME(Twirl,N_("Twirl")); -SYNFIG_LAYER_SET_CATEGORY(Twirl,N_("Distortions")); -SYNFIG_LAYER_SET_VERSION(Twirl,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Twirl,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -Twirl::Twirl(): - Layer_Composite(1.0,Color::BLEND_STRAIGHT), - center(0,0), - radius(1.0), - rotations(Angle::zero()), - distort_inside(true), - distort_outside(false) -{ -} - -bool -Twirl::set_param(const String & param, const ValueBase &value) -{ - IMPORT(center); - IMPORT(radius); - IMPORT(rotations); - IMPORT(distort_inside); - IMPORT(distort_outside); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -Twirl::get_param(const String ¶m)const -{ - EXPORT(center); - EXPORT(radius); - EXPORT(rotations); - EXPORT(distort_inside); - EXPORT(distort_outside); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return false; -} - -Layer::Vocab -Twirl::get_param_vocab()const -{ - Layer::Vocab ret; - - ret.push_back(ParamDesc("center") - .set_local_name(_("Center")) - ); - - ret.push_back(ParamDesc("radius") - .set_local_name(_("Radius")) - .set_description(_("This is the radius of the circle")) - .set_is_distance() - .set_origin("center") - ); - - ret.push_back(ParamDesc("rotations") - .set_local_name(_("Rotations")) - .set_origin("center") - ); - - ret.push_back(ParamDesc("distort_inside") - .set_local_name(_("Distort Inside")) - ); - - ret.push_back(ParamDesc("distort_outside") - .set_local_name(_("Distort Outside")) - ); - - return ret; -} - -synfig::Point -Twirl::distort(const synfig::Point &pos,bool reverse)const -{ - Point centered(pos-center); - Real mag(centered.mag()); - - Angle a; - - if((distort_inside || mag>radius) && (distort_outside || mag layer; -public: - Twirl_Trans(const Twirl* x):Transform(x->get_guid()),layer(x) { } - - synfig::Vector perform(const synfig::Vector& x)const - { - return layer->distort(x,true); - } - - synfig::Vector unperform(const synfig::Vector& x)const - { - return layer->distort(x,false); - } -}; -etl::handle -Twirl::get_transform()const -{ - return new Twirl_Trans(this); -} - -/* -bool -Twirl::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - SuperCallback supercb(cb,0,9500,10000); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - { - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - } - else - { - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - return false; - if(get_amount()==0) - return true; - } - - - int x,y; - - Surface::pen pen(surface->begin()); - const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); - Point pos; - Point tl(renddesc.get_tl()); - const int w(surface->get_w()); - const int h(surface->get_h()); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - { - for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) - return false; - - return true; -} -*/ diff --git a/synfig-core/trunk/src/modules/lyr_std/twirl.h b/synfig-core/trunk/src/modules/lyr_std/twirl.h deleted file mode 100644 index 11d893e..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/twirl.h +++ /dev/null @@ -1,84 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file twirl.h -** \brief Header file for implementation of the "Twirl" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TWIRL_H -#define __SYNFIG_TWIRL_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ -class Twirl_Trans; - -class Twirl : public synfig::Layer_Composite -{ - SYNFIG_LAYER_MODULE_EXT - friend class Twirl_Trans; - -private: - - synfig::Point center; - - synfig::Real radius; - - synfig::Angle rotations; - - bool distort_inside; - - bool distort_outside; - - synfig::Point distort(const synfig::Point &pos, bool reverse=false)const; -public: - - Twirl(); - - virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); - - virtual synfig::ValueBase get_param(const synfig::String & param)const; - - virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; - - //virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; - - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - - virtual Vocab get_param_vocab()const; - virtual etl::handle get_transform()const; - virtual bool reads_context()const { return true; } -}; // END of class Twirl - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_std/unlyr_std.nsh b/synfig-core/trunk/src/modules/lyr_std/unlyr_std.nsh deleted file mode 100644 index b8b5c04..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/unlyr_std.nsh +++ /dev/null @@ -1,8 +0,0 @@ -Section "un.lyr_std" - Delete "$INSTDIR\lib\synfig\modules\lyr_std.dll" - RMDir "$INSTDIR\lib\synfig\modules" - RMDir "$INSTDIR\lib\synfig" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/modules/lyr_std/warp.cpp b/synfig-core/trunk/src/modules/lyr_std/warp.cpp deleted file mode 100644 index f11c290..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/warp.cpp +++ /dev/null @@ -1,851 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file warp.cpp -** \brief Implementation of the "Warp" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "warp.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Warp); -SYNFIG_LAYER_SET_NAME(Warp,"warp"); -SYNFIG_LAYER_SET_LOCAL_NAME(Warp,N_("Warp")); -SYNFIG_LAYER_SET_CATEGORY(Warp,N_("Distortions")); -SYNFIG_LAYER_SET_VERSION(Warp,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Warp,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -Warp::Warp(): - src_tl (-2,2), - src_br (2,-2), - dest_tl (-1.8,2.1), - dest_tr (1.8,2.1), - dest_bl (-2.2,-2), - dest_br (2.2,-2), - clip (true) -{ - sync(); - horizon=4; -} - -Warp::~Warp() -{ -} - -inline Point -Warp::transform_forward(const Point& p)const -{ - return Point( - (inv_matrix[0][0]*p[0] + inv_matrix[0][1]*p[1] + inv_matrix[0][2])/(inv_matrix[2][0]*p[0] + inv_matrix[2][1]*p[1] + inv_matrix[2][2]), - (inv_matrix[1][0]*p[0] + inv_matrix[1][1]*p[1] + inv_matrix[1][2])/(inv_matrix[2][0]*p[0] + inv_matrix[2][1]*p[1] + inv_matrix[2][2]) - ); -} - -inline Point -Warp::transform_backward(const Point& p)const -{ - return Point( - (matrix[0][0]*p[0] + matrix[0][1]*p[1] + matrix[0][2])/(matrix[2][0]*p[0] + matrix[2][1]*p[1] + matrix[2][2]), - (matrix[1][0]*p[0] + matrix[1][1]*p[1] + matrix[1][2])/(matrix[2][0]*p[0] + matrix[2][1]*p[1] + matrix[2][2]) - ); -} - -inline Real -Warp::transform_forward_z(const Point& p)const -{ - return inv_matrix[2][0]*p[0] + inv_matrix[2][1]*p[1] + inv_matrix[2][2]; -} - -inline Real -Warp::transform_backward_z(const Point& p)const -{ - return matrix[2][0]*p[0] + matrix[2][1]*p[1] + matrix[2][2]; -} - -/* -#define transform_forward(p) Point( \ - cache_a*p[0] + cache_b*p[1] + cache_c*p[0]*p[1] + cache_d, \ - cache_e*p[0] + cache_f*p[1] + cache_i*p[0]*p[1] + cache_j ) - -#define transform_backward(p) Point( \ - cache_a*p[0] + cache_b*p[1] + cache_c*p[0]*p[1] + cache_d, \ - cache_e*p[0] + cache_f*p[1] + cache_i*p[0]*p[1] + cache_j ) -*/ - -#define triangle_area(a,b,c) (0.5*(-b[0]*a[1]+c[0]*a[1]+a[0]*b[1]-c[0]*b[1]-a[0]*c[1]+b[0]*c[1])) -#define quad_area(a,b,c,d) (triangle_area(a,b,c)+triangle_area(a,c,d)) - -Real mat3_determinant(Real matrix[3][3]) -{ - Real ret; - - ret = (matrix[0][0] * - (matrix[1][1] * matrix[2][2] - - matrix[1][2] * matrix[2][1])); - ret -= (matrix[1][0] * - (matrix[0][1] * matrix[2][2] - - matrix[0][2] * matrix[2][1])); - ret += (matrix[2][0] * - (matrix[0][1] * matrix[1][2] - - matrix[0][2] * matrix[1][1])); - -return ret; -} - -void mat3_invert(Real in[3][3], Real out[3][3]) -{ - Real det(mat3_determinant(in)); - - if (det == 0.0) - return; - - det = 1.0 / det; - - out[0][0] = (in[1][1] * in[2][2] - - in[1][2] * in[2][1]) * det; - - out[1][0] = - (in[1][0] * in[2][2] - - in[1][2] * in[2][0]) * det; - - out[2][0] = (in[1][0] * in[2][1] - - in[1][1] * in[2][0]) * det; - - out[0][1] = - (in[0][1] * in[2][2] - - in[0][2] * in[2][1]) * det; - - out[1][1] = (in[0][0] * in[2][2] - - in[0][2] * in[2][0]) * det; - - out[2][1] = - (in[0][0] * in[2][1] - - in[0][1] * in[2][0]) * det; - - out[0][2] = (in[0][1] * in[1][2] - - in[0][2] * in[1][1]) * det; - - out[1][2] = - (in[0][0] * in[1][2] - - in[0][2] * in[1][0]) * det; - - out[2][2] = (in[0][0] * in[1][1] - - in[0][1] * in[1][0]) * det; - -} - -void -Warp::sync() -{ -/* cache_a=(-dest_tl[0]+dest_tr[0])/(src_br[1]-src_tl[1]); - cache_b=(-dest_tl[0]+dest_bl[0])/(src_br[0]-src_tl[0]); - cache_c=(dest_tl[0]-dest_tr[0]+dest_br[0]-dest_bl[0])/((src_br[1]-src_tl[1])*(src_br[0]-src_tl[0])); - cache_d=dest_tl[0]; - - cache_e=(-dest_tl[1]+dest_tr[1])/(src_br[0]-src_tl[0]); - cache_f=(-dest_tl[1]+dest_bl[1])/(src_br[1]-src_tl[1]); - cache_i=(dest_tl[1]-dest_tr[1]+dest_br[1]-dest_bl[1])/((src_br[1]-src_tl[1])*(src_br[0]-src_tl[0])); - cache_j=dest_tl[1]; -*/ - -/* matrix[2][0]=(dest_tl[0]-dest_tr[0]+dest_br[0]-dest_bl[0])/((src_br[1]-src_tl[1])*(src_br[0]-src_tl[0])); - matrix[2][1]=(dest_tl[1]-dest_tr[1]+dest_br[1]-dest_bl[1])/((src_br[1]-src_tl[1])*(src_br[0]-src_tl[0])); - matrix[2][2]=quad_area(dest_tl,dest_tr,dest_br,dest_bl)/((src_br[1]-src_tl[1])*(src_br[0]-src_tl[0])); - - matrix[0][0]=-(-dest_tl[1]+dest_tr[1])/(src_br[0]-src_tl[0]); - matrix[0][1]=-(-dest_tl[1]+dest_bl[1])/(src_br[1]-src_tl[1]); - - matrix[1][0]=-(-dest_tl[0]+dest_tr[0])/(src_br[1]-src_tl[1]); - matrix[1][1]=-(-dest_tl[0]+dest_bl[0])/(src_br[0]-src_tl[0]); - - matrix[0][2]=matrix[0][0]*dest_tl[0] + matrix[0][1]*dest_tl[1]; - matrix[1][2]=matrix[1][0]*dest_tl[0] + matrix[1][1]*dest_tl[1]; -*/ - -#define matrix tmp - Real tmp[3][3]; - - const Real& x1(min(src_br[0],src_tl[0])); - const Real& y1(min(src_br[1],src_tl[1])); - const Real& x2(max(src_br[0],src_tl[0])); - const Real& y2(max(src_br[1],src_tl[1])); - - Real tx1(dest_bl[0]); - Real ty1(dest_bl[1]); - Real tx2(dest_br[0]); - Real ty2(dest_br[1]); - Real tx3(dest_tl[0]); - Real ty3(dest_tl[1]); - Real tx4(dest_tr[0]); - Real ty4(dest_tr[1]); - - if(src_br[0]src_tl[1]) - swap(tx3,tx1),swap(ty3,ty1),swap(tx4,tx2),swap(ty4,ty2); - - Real scalex; - Real scaley; - - scalex = scaley = 1.0; - - if ((x2 - x1) > 0) - scalex = 1.0 / (Real) (x2 - x1); - - if ((y2 - y1) > 0) - scaley = 1.0 / (Real) (y2 - y1); - - /* Determine the perspective transform that maps from - * the unit cube to the transformed coordinates - */ - { - Real dx1, dx2, dx3, dy1, dy2, dy3; - - dx1 = tx2 - tx4; - dx2 = tx3 - tx4; - dx3 = tx1 - tx2 + tx4 - tx3; - - dy1 = ty2 - ty4; - dy2 = ty3 - ty4; - dy3 = ty1 - ty2 + ty4 - ty3; - - /* Is the mapping affine? */ - if ((dx3 == 0.0) && (dy3 == 0.0)) - { - matrix[0][0] = tx2 - tx1; - matrix[0][1] = tx4 - tx2; - matrix[0][2] = tx1; - matrix[1][0] = ty2 - ty1; - matrix[1][1] = ty4 - ty2; - matrix[1][2] = ty1; - matrix[2][0] = 0.0; - matrix[2][1] = 0.0; - } - else - { - Real det1, det2; - - det1 = dx3 * dy2 - dy3 * dx2; - det2 = dx1 * dy2 - dy1 * dx2; - - if (det1 == 0.0 && det2 == 0.0) - matrix[2][0] = 1.0; - else - matrix[2][0] = det1 / det2; - - det1 = dx1 * dy3 - dy1 * dx3; - - if (det1 == 0.0 && det2 == 0.0) - matrix[2][1] = 1.0; - else - matrix[2][1] = det1 / det2; - - matrix[0][0] = tx2 - tx1 + matrix[2][0] * tx2; - matrix[0][1] = tx3 - tx1 + matrix[2][1] * tx3; - matrix[0][2] = tx1; - - matrix[1][0] = ty2 - ty1 + matrix[2][0] * ty2; - matrix[1][1] = ty3 - ty1 + matrix[2][1] * ty3; - matrix[1][2] = ty1; - } - - matrix[2][2] = 1.0; - } -#undef matrix - - Real scaletrans[3][3]={ - { scalex, 0, -x1*scalex }, - { 0, scaley, -y1*scaley }, - { 0, 0, 1 } - }; - - Real t1,t2,t3; - - for (int i = 0; i < 3; i++) - { - t1 = tmp[i][0]; - t2 = tmp[i][1]; - t3 = tmp[i][2]; - - for (int j = 0; j < 3; j++) - { - matrix[i][j] = t1 * scaletrans[0][j]; - matrix[i][j] += t2 * scaletrans[1][j]; - matrix[i][j] += t3 * scaletrans[2][j]; - } - } - - mat3_invert(matrix, inv_matrix); -/* - gimp_matrix3_identity (result); - gimp_matrix3_translate (result, -x1, -y1); - gimp_matrix3_scale (result, scalex, scaley); - gimp_matrix3_mult (&matrix, result); -*/ -} - -bool -Warp::set_param(const String & param, const ValueBase &value) -{ - IMPORT_PLUS(src_tl,sync()); - IMPORT_PLUS(src_br,sync()); - IMPORT_PLUS(dest_tl,sync()); - IMPORT_PLUS(dest_tr,sync()); - IMPORT_PLUS(dest_bl,sync()); - IMPORT_PLUS(dest_br,sync()); - IMPORT(clip); - IMPORT(horizon); - - return false; -} - -ValueBase -Warp::get_param(const String ¶m)const -{ - EXPORT(src_tl); - EXPORT(src_br); - EXPORT(dest_tl); - EXPORT(dest_tr); - EXPORT(dest_bl); - EXPORT(dest_br); - EXPORT(clip); - EXPORT(horizon); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return ValueBase(); -} - -Layer::Vocab -Warp::get_param_vocab()const -{ - Layer::Vocab ret; - - ret.push_back(ParamDesc("src_tl") - .set_local_name(_("Source TL")) - .set_box("src_br") - ); - - ret.push_back(ParamDesc("src_br") - .set_local_name(_("Source BR")) - ); - - ret.push_back(ParamDesc("dest_tl") - .set_local_name(_("Dest TL")) - .set_connect("dest_tr") - ); - - ret.push_back(ParamDesc("dest_tr") - .set_local_name(_("Dest TR")) - .set_connect("dest_br") - ); - - ret.push_back(ParamDesc("dest_br") - .set_local_name(_("Dest BR")) - .set_connect("dest_bl") - ); - - ret.push_back(ParamDesc("dest_bl") - .set_local_name(_("Dest BL")) - .set_connect("dest_tl") - ); - - ret.push_back(ParamDesc("clip") - .set_local_name(_("Clip")) - ); - - ret.push_back(ParamDesc("horizon") - .set_local_name(_("Horizon")) - ); - - return ret; -} - - -class Warp_Trans : public Transform -{ - etl::handle layer; -public: - Warp_Trans(const Warp* x):Transform(x->get_guid()),layer(x) { } - - synfig::Vector perform(const synfig::Vector& x)const - { - return layer->transform_backward(x); - //Point pos(x-layer->origin); - //return Point(layer->cos_val*pos[0]-layer->sin_val*pos[1],layer->sin_val*pos[0]+layer->cos_val*pos[1])+layer->origin; - } - - synfig::Vector unperform(const synfig::Vector& x)const - { - - return layer->transform_forward(x); - //Point pos(x-layer->origin); - //return Point(layer->cos_val*pos[0]+layer->sin_val*pos[1],-layer->sin_val*pos[0]+layer->cos_val*pos[1])+layer->origin; - } -}; -etl::handle -Warp::get_transform()const -{ - return new Warp_Trans(this); -} - -synfig::Layer::Handle -Warp::hit_check(synfig::Context context, const synfig::Point &p)const -{ - Point newpos(transform_forward(p)); - - if(clip) - { - Rect rect(src_tl,src_br); - if(!rect.is_inside(newpos)) - return 0; - } - - return context.hit_check(newpos); -} - -Color -Warp::get_color(Context context, const Point &p)const -{ - Point newpos(transform_forward(p)); - - if(clip) - { - Rect rect(src_tl,src_br); - if(!rect.is_inside(newpos)) - return Color::alpha(); - } - - const float z(transform_backward_z(newpos)); - if(z>0 && zamount_complete(0,10000)) - return false; - - Point tl(renddesc.get_tl()); - Point br(renddesc.get_br()); - - Rect bounding_rect; - - Rect render_rect(tl,br); - Rect clip_rect(Rect::full_plane()); - Rect dest_rect(dest_tl,dest_br); dest_rect.expand(dest_tr).expand(dest_bl); - - Real zoom_factor(1.0); - - // Quick exclusion clip, if necessary - if(clip && !intersect(render_rect,dest_rect)) - { - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - surface->clear(); - return true; - } - - { - Rect other(render_rect); - if(clip) - other&=dest_rect; - - Point min(other.get_min()); - Point max(other.get_max()); - - bool init_point_set=false; - - // Point trans_point[4]; - Point p; - // Real trans_z[4]; - Real z,minz(10000000000000.0f),maxz(0); - - //! \todo checking the 4 corners for 0<=z0 && z0 && z0 && z0 && zset_wh(renddesc.get_w(),renddesc.get_h()); - surface->clear(); - return true; - } - zoom_factor=(1+(maxz-minz)); - - } - -#ifdef ACCEL_WARP_IS_BROKEN - return Layer::accelerated_render(context,surface,quality,renddesc, cb); -#else - - /*swap(tl[1],br[1]); - bounding_rect - .expand(transform_forward(tl)) - .expand(transform_forward(br)) - ; - swap(tl[1],br[1]);*/ - - //synfig::warning("given window: [%f,%f]-[%f,%f] %dx%d",tl[0],tl[1],br[0],br[1],renddesc.get_w(),renddesc.get_h()); - //synfig::warning("Projected: [%f,%f]-[%f,%f]",bounding_rect.get_min()[0],bounding_rect.get_min()[1],bounding_rect.get_max()[0],bounding_rect.get_max()[1]); - - // If we are clipping, then go ahead and clip to the - // source rectangle - if(clip) - clip_rect&=Rect(src_tl,src_br); - - // Bound ourselves to the bounding rectangle of - // what is under us - clip_rect&=context.get_full_bounding_rect();//.expand_x(abs(zoom_factor/pw)).expand_y(abs(zoom_factor/ph)); - - bounding_rect&=clip_rect; - - Point min_point(bounding_rect.get_min()); - Point max_point(bounding_rect.get_max()); - - // we're going to divide by the difference of these pairs soon; - // if they're the same, we'll be dividing by zero, and we don't - // want to do that! - // \todo what should we do in this case? - if (min_point[0] == max_point[0]) max_point[0] += 0.001; - if (min_point[1] == max_point[1]) max_point[1] += 0.001; - - if(tl[0]>br[0]) - { - tl[0]=max_point[0]; - br[0]=min_point[0]; - } - else - { - br[0]=max_point[0]; - tl[0]=min_point[0]; - } - if(tl[1]>br[1]) - { - tl[1]=max_point[1]; - br[1]=min_point[1]; - } - else - { - br[1]=max_point[1]; - tl[1]=min_point[1]; - } - - - - const int tmp_d(max(renddesc.get_w(),renddesc.get_h())); - Real src_pw=(tmp_d*zoom_factor)/(br[0]-tl[0]); - Real src_ph=(tmp_d*zoom_factor)/(br[1]-tl[1]); - - - RendDesc desc(renddesc); - desc.clear_flags(); - //desc.set_flags(RendDesc::PX_ASPECT); - desc.set_tl(tl); - desc.set_br(br); - desc.set_wh(ceil_to_int(src_pw*(br[0]-tl[0])),ceil_to_int(src_ph*(br[1]-tl[1]))); - - //synfig::warning("surface to render: [%f,%f]-[%f,%f] %dx%d",desc.get_tl()[0],desc.get_tl()[1],desc.get_br()[0],desc.get_br()[1],desc.get_w(),desc.get_h()); - if(desc.get_w()==0 && desc.get_h()==0) - { - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - surface->clear(); - return true; - } - - // Recalculate the pixel widths for the src renddesc - src_pw=(desc.get_w())/(desc.get_br()[0]-desc.get_tl()[0]); - src_ph=(desc.get_h())/(desc.get_br()[1]-desc.get_tl()[1]); - - - Surface source; - source.set_wh(desc.get_w(),desc.get_h()); - - if(!context.accelerated_render(&source,quality,desc,&stageone)) - return false; - - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - surface->clear(); - - Surface::pen pen(surface->begin()); - - if(quality<=4) - { - // CUBIC - int x,y; - float u,v; - Point point,tmp; - for(y=0,point[1]=renddesc.get_tl()[1];yget_h();y++,pen.inc_y(),pen.dec_x(x),point[1]+=1.0/ph) - { - for(x=0,point[0]=renddesc.get_tl()[0];xget_w();x++,pen.inc_x(),point[0]+=1.0/pw) - { - tmp=transform_forward(point); - const float z(transform_backward_z(tmp)); - if(!clip_rect.is_inside(tmp) || !(z>0 && z=source.get_w() || v>=source.get_h() || isnan(u) || isnan(v)) - (*surface)[y][x]=context.get_color(tmp); - else - (*surface)[y][x]=source.cubic_sample(u,v); - } - if((y&31)==0 && cb) - { - if(!stagetwo.amount_complete(y,surface->get_h())) - return false; - } - } - } - else - if(quality<=6) - { - // INTERPOLATION_LINEAR - int x,y; - float u,v; - Point point,tmp; - for(y=0,point[1]=renddesc.get_tl()[1];yget_h();y++,pen.inc_y(),pen.dec_x(x),point[1]+=1.0/ph) - { - for(x=0,point[0]=renddesc.get_tl()[0];xget_w();x++,pen.inc_x(),point[0]+=1.0/pw) - { - tmp=transform_forward(point); - const float z(transform_backward_z(tmp)); - if(!clip_rect.is_inside(tmp) || !(z>0 && z=source.get_w() || v>=source.get_h() || isnan(u) || isnan(v)) - (*surface)[y][x]=context.get_color(tmp); - else - (*surface)[y][x]=source.linear_sample(u,v); - } - if((y&31)==0 && cb) - { - if(!stagetwo.amount_complete(y,surface->get_h())) - return false; - } - } - } - else - { - // NEAREST_NEIGHBOR - int x,y; - float u,v; - Point point,tmp; - for(y=0,point[1]=renddesc.get_tl()[1];yget_h();y++,pen.inc_y(),pen.dec_x(x),point[1]+=1.0/ph) - { - for(x=0,point[0]=renddesc.get_tl()[0];xget_w();x++,pen.inc_x(),point[0]+=1.0/pw) - { - tmp=transform_forward(point); - const float z(transform_backward_z(tmp)); - if(!clip_rect.is_inside(tmp) || !(z>0 && z=source.get_w() || v>=source.get_h() || isnan(u) || isnan(v)) - (*surface)[y][x]=context.get_color(tmp); - else - //pen.set_value(source[v][u]); - (*surface)[y][x]=source[floor_to_int(v)][floor_to_int(u)]; - } - if((y&31)==0 && cb) - { - if(!stagetwo.amount_complete(y,surface->get_h())) - return false; - } - } - } - -#endif - - if(cb && !cb->amount_complete(10000,10000)) return false; - - return true; -} - -synfig::Rect -Warp::get_bounding_rect()const -{ - return Rect::full_plane(); -} - -synfig::Rect -Warp::get_full_bounding_rect(Context context)const -{ -// return Rect::full_plane(); - - Rect under(context.get_full_bounding_rect()); - - if(clip) - { - under&=Rect(src_tl,src_br); - } - - return get_transform()->perform(under); - - /* - Rect under(context.get_full_bounding_rect()); - Rect ret(Rect::zero()); - - if(under.area()==HUGE_VAL) - return Rect::full_plane(); - - ret.expand( - transform_backward( - under.get_min() - ) - ); - ret.expand( - transform_backward( - under.get_max() - ) - ); - ret.expand( - transform_backward( - Vector( - under.get_min()[0], - under.get_max()[1] - ) - ) - ); - ret.expand( - transform_backward( - Vector( - under.get_max()[0], - under.get_min()[1] - ) - ) - ); - - if(ret.area()==HUGE_VAL) - return Rect::full_plane(); - - return ret; - */ -} diff --git a/synfig-core/trunk/src/modules/lyr_std/warp.h b/synfig-core/trunk/src/modules/lyr_std/warp.h deleted file mode 100644 index 08e6844..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/warp.h +++ /dev/null @@ -1,91 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file warp.h -** \brief Header file for implementation of the "Warp" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_WARP_H -#define __SYNFIG_WARP_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; -class Warp_Trans; - -class Warp : public Layer -{ - SYNFIG_LAYER_MODULE_EXT - friend class Warp_Trans; -private: - - Point src_tl,src_br,dest_tl,dest_tr,dest_bl,dest_br; - - Real horizon; - - Real cache_a,cache_b,cache_c,cache_d,cache_e,cache_f,cache_i,cache_j; - - Real matrix[3][3]; - Real inv_matrix[3][3]; - - Point transform_forward(const Point& p)const; - Point transform_backward(const Point& p)const; - - Real transform_forward_z(const Point& p)const; - Real transform_backward_z(const Point& p)const; - - bool clip; - -public: - void sync(); - - Warp(); - ~Warp(); - - virtual synfig::Rect get_full_bounding_rect(synfig::Context context)const; - virtual synfig::Rect get_bounding_rect()const; - - virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); - virtual ValueBase get_param(const synfig::String & param)const; - virtual Color get_color(Context context, const Point &pos)const; - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - virtual Vocab get_param_vocab()const; - virtual etl::handle get_transform()const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_std/xorpattern.cpp b/synfig-core/trunk/src/modules/lyr_std/xorpattern.cpp deleted file mode 100644 index df7c6bd..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/xorpattern.cpp +++ /dev/null @@ -1,153 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file xorpattern.cpp -** \brief Implementation of the "XOR Pattern" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007-2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "xorpattern.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(XORPattern); -SYNFIG_LAYER_SET_NAME(XORPattern,"xor_pattern"); -SYNFIG_LAYER_SET_LOCAL_NAME(XORPattern,N_("XOR Pattern")); -SYNFIG_LAYER_SET_CATEGORY(XORPattern,N_("Other")); -SYNFIG_LAYER_SET_VERSION(XORPattern,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(XORPattern,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -XORPattern::XORPattern(): - Layer_Composite (1.0,Color::BLEND_STRAIGHT), - origin(0.125,0.125), - size(0.25,0.25) -{ -} - -bool -XORPattern::set_param(const String & param, const ValueBase &value) -{ - IMPORT(origin); - IMPORT(size); - - IMPORT_AS(origin,"pos"); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -XORPattern::get_param(const String & param)const -{ - EXPORT(origin); - EXPORT(size); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Color -XORPattern::get_color(Context context, const Point &point)const -{ - if(get_amount()==0.0) - return context.get_color(point); - - unsigned int a=(unsigned int)floor((point[0]-origin[0])/size[0]), b=(unsigned int)floor((point[1]-origin[1])/size[1]); - unsigned char rindex=(a^b); - unsigned char gindex=(a^(~b))*4; - unsigned char bindex=~(a^b)*2; - - Color color((Color::value_type)rindex/(Color::value_type)255.0, - (Color::value_type)gindex/(Color::value_type)255.0, - (Color::value_type)bindex/(Color::value_type)255.0, - 1.0); - - if(get_amount() == 1 && get_blend_method() == Color::BLEND_STRAIGHT) - return color; - else - return Color::blend(color,context.get_color(point),get_amount(),get_blend_method()); - -} - -Layer::Vocab -XORPattern::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("origin") - .set_local_name(_("Origin")) - ); - ret.push_back(ParamDesc("size") - .set_local_name(_("Size")) - .set_origin("origin") - ); - - return ret; -} - -synfig::Layer::Handle -XORPattern::hit_check(synfig::Context context, const synfig::Point &getpos)const -{ - // if we have a zero amount - if(get_amount()==0.0) - // then the click passes down to our context - return context.hit_check(getpos); - - synfig::Layer::Handle tmp; - // if we are behind the context, and the click hits something in the context - if(get_blend_method()==Color::BLEND_BEHIND && (tmp=context.hit_check(getpos))) - // then return the thing it hit in the context - return tmp; - - // if we're using an 'onto' blend method and the click missed the context - if(Color::is_onto(get_blend_method()) && !(tmp=context.hit_check(getpos))) - // then it misses everything - return 0; - - // otherwise the click hit us, since we're the size of the whole plane - return const_cast(this); -} diff --git a/synfig-core/trunk/src/modules/lyr_std/xorpattern.h b/synfig-core/trunk/src/modules/lyr_std/xorpattern.h deleted file mode 100644 index 0780c0e..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/xorpattern.h +++ /dev/null @@ -1,69 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file xorpattern.h -** \brief Header file for implementation of the "XOR Pattern" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007-2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_XORPATTERN_H -#define __SYNFIG_XORPATTERN_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -class XORPattern : public synfig::Layer_Composite, public synfig::Layer_NoDeform -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - Point origin; - Point size; - -public: - XORPattern(); - - virtual bool set_param(const String ¶m, const ValueBase &value); - virtual ValueBase get_param(const String ¶m)const; - virtual Color get_color(Context context, const Point &pos)const; - virtual Vocab get_param_vocab()const; - virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/lyr_std/zoom.cpp b/synfig-core/trunk/src/modules/lyr_std/zoom.cpp deleted file mode 100644 index ff73c4c..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/zoom.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file zoom.cpp -** \brief Implementation of the "Zoom" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "zoom.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Zoom); -SYNFIG_LAYER_SET_NAME(Zoom,"zoom"); -SYNFIG_LAYER_SET_LOCAL_NAME(Zoom,N_("Zoom")); -SYNFIG_LAYER_SET_CATEGORY(Zoom,N_("Transform")); -SYNFIG_LAYER_SET_VERSION(Zoom,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Zoom,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -Zoom::Zoom(): - center(0,0), - amount(0) -{ -} - -bool -Zoom::set_param(const String & param, const ValueBase &value) -{ - - IMPORT(center); - IMPORT(amount); - - return false; -} - -ValueBase -Zoom::get_param(const String ¶m)const -{ - EXPORT(center); - EXPORT(amount); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return ValueBase(); -} - -Layer::Vocab -Zoom::get_param_vocab()const -{ - Layer::Vocab ret; - - ret.push_back(ParamDesc("amount") - .set_local_name(_("Amount")) - .set_description(_("Amount to zoom in")) - ); - - ret.push_back(ParamDesc("center") - .set_local_name(_("Center")) - .set_description(_("Point to zoom in to")) - ); - - return ret; -} - -synfig::Layer::Handle -Zoom::hit_check(synfig::Context context, const synfig::Point &pos)const -{ - return context.hit_check((pos-center)/exp(amount)+center); -} - -Color -Zoom::get_color(Context context, const Point &pos)const -{ - return context.get_color((pos-center)/exp(amount)+center); -} - -class Zoom_Trans : public Transform -{ - etl::handle layer; -public: - Zoom_Trans(const Zoom* x):Transform(x->get_guid()),layer(x) { } - - synfig::Vector perform(const synfig::Vector& x)const - { - return (x-layer->center)*exp(layer->amount)+layer->center; - } - - synfig::Vector unperform(const synfig::Vector& x)const - { - return (x-layer->center)/exp(layer->amount)+layer->center; - } -}; -etl::handle -Zoom::get_transform()const -{ - return new Zoom_Trans(this); -} - -bool -Zoom::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - Vector::value_type zoomfactor=1.0/exp(amount); - RendDesc desc(renddesc); - desc.clear_flags(); - - // Adjust the top_left and bottom_right points - // for our zoom amount - desc.set_tl((desc.get_tl()-center)*zoomfactor+center); - desc.set_br((desc.get_br()-center)*zoomfactor+center); - - // Render the scene - return context.accelerated_render(surface,quality,desc,cb); -} - -synfig::Rect -Zoom::get_full_bounding_rect(synfig::Context context)const -{ - return (context.get_full_bounding_rect()-center)*exp(amount)+center; -} diff --git a/synfig-core/trunk/src/modules/lyr_std/zoom.h b/synfig-core/trunk/src/modules/lyr_std/zoom.h deleted file mode 100644 index aaced17..0000000 --- a/synfig-core/trunk/src/modules/lyr_std/zoom.h +++ /dev/null @@ -1,68 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file zoom.h -** \brief Header file for implementation of the "Zoom" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_ZOOM_H -#define __SYNFIG_ZOOM_H - -/* === H E A D E R S ======================================================= */ - -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -class Zoom_Trans; - -class Zoom : public Layer -{ - SYNFIG_LAYER_MODULE_EXT - friend class Zoom_Trans; -private: - Vector center; - Real amount; -public: - Zoom(); - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - virtual ValueBase get_param(const String & param)const; - virtual Color get_color(Context context, const Point &pos)const; - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - virtual Vocab get_param_vocab()const; - virtual synfig::Rect get_full_bounding_rect(synfig::Context context)const; - virtual etl::handle get_transform()const; - -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_bmp/Makefile.am b/synfig-core/trunk/src/modules/mod_bmp/Makefile.am deleted file mode 100644 index d367d2e..0000000 --- a/synfig-core/trunk/src/modules/mod_bmp/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -moduledir = @MODULE_DIR@ - -module_LTLIBRARIES = libmod_bmp.la - -libmod_bmp_la_SOURCES = \ - main.cpp \ - trgt_bmp.cpp \ - trgt_bmp.h \ - mptr_bmp.cpp \ - mptr_bmp.h - -libmod_bmp_la_LDFLAGS = \ - -module \ - -no-undefined \ - -avoid-version - -libmod_bmp_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ - -libmod_bmp_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @SYNFIG_LIBS@ - - -EXTRA_DIST = \ - mod_bmp.nsh \ - unmod_bmp.nsh diff --git a/synfig-core/trunk/src/modules/mod_bmp/main.cpp b/synfig-core/trunk/src/modules/mod_bmp/main.cpp deleted file mode 100644 index 88fbbbd..0000000 --- a/synfig-core/trunk/src/modules/mod_bmp/main.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_bmp/main.cpp -** \brief writeme -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_NO_ANGLE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include "trgt_bmp.h" -#include "mptr_bmp.h" - -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(mod_bmp) - MODULE_NAME("Microsoft BMP File Format Module") - MODULE_DESCRIPTION("Provides a Microsoft BMP output target and importer") - MODULE_AUTHOR("Robert B. Quattlebaum") - MODULE_VERSION("1.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(mod_bmp) - BEGIN_TARGETS - TARGET(bmp) - END_TARGETS - BEGIN_IMPORTERS - IMPORTER(bmp_mptr) - END_IMPORTERS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mod_bmp/mod_bmp.nsh b/synfig-core/trunk/src/modules/mod_bmp/mod_bmp.nsh deleted file mode 100644 index 9624d4b..0000000 --- a/synfig-core/trunk/src/modules/mod_bmp/mod_bmp.nsh +++ /dev/null @@ -1,21 +0,0 @@ -; The stuff to install -Section "mod_bmp" Sec_mod_bmp - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=mod_bmp.dll "src\modules\mod_bmp\.libs\libmod_bmp.dll" - - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "mod_bmp" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_bmp/mptr_bmp.cpp b/synfig-core/trunk/src/modules/mod_bmp/mptr_bmp.cpp deleted file mode 100644 index 9151cfe..0000000 --- a/synfig-core/trunk/src/modules/mod_bmp/mptr_bmp.cpp +++ /dev/null @@ -1,235 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mptr_bmp.cpp -** \brief bmp Target Module -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_NO_ANGLE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "mptr_bmp.h" -#include -#include - -#include -#include -#endif - -/* === U S I N G =========================================================== */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_IMPORTER_INIT(bmp_mptr); -SYNFIG_IMPORTER_SET_NAME(bmp_mptr,"bmp"); -SYNFIG_IMPORTER_SET_EXT(bmp_mptr,"bmp"); -SYNFIG_IMPORTER_SET_VERSION(bmp_mptr,"0.1"); -SYNFIG_IMPORTER_SET_CVS_ID(bmp_mptr,"$Id$"); - -/* === M E T H O D S ======================================================= */ -namespace synfig { - -struct BITMAPFILEHEADER -{ - unsigned char bfType[2]; - unsigned long bfSize; - unsigned short bfReserved1; - unsigned short bfReserved2; - unsigned long bfOffsetBits; -}; - -struct BITMAPINFOHEADER -{ - unsigned long biSize; - long biWidth; - long biHeight; - unsigned short biPlanes; - unsigned short biBitCount; - unsigned long biCompression; - unsigned long biSizeImage; - long biXPelsPerMeter; - long biYPelsPerMeter; - unsigned long biClrUsed; - unsigned long biClrImportant; -}; - -} - -#ifdef WORDS_BIGENDIAN -inline long little_endian(const long &x) -{ - long ret; - char *big_e=(char *)&ret; - char *lit_e=(char *)&x; - big_e[0]=lit_e[3]; - big_e[1]=lit_e[2]; - big_e[2]=lit_e[1]; - big_e[3]=lit_e[0]; - return ret; -} -inline short little_endian_short(const short &x) -{ - short ret; - char *big_e=(char *)&ret; - char *lit_e=(char *)&x; - big_e[0]=lit_e[1]; - big_e[1]=lit_e[0]; - return ret; -} -#else -#define little_endian(x) (x) -#define little_endian_short(x) (x) -#endif - - - - - - -bmp_mptr::bmp_mptr(const char *file) -{ - filename=file; -} - -bmp_mptr::~bmp_mptr() -{ -} - -bool -bmp_mptr::get_frame(synfig::Surface &surface,Time /*time*/, synfig::ProgressCallback *cb) -{ - FILE *file=fopen(filename.c_str(),"rb"); - if(!file) - { - if(cb)cb->error("bmp_mptr::GetFrame(): "+strprintf(_("Unable to open %s"),filename.c_str())); - else synfig::error("bmp_mptr::GetFrame(): "+strprintf(_("Unable to open %s"),filename.c_str())); - return false; - } - - synfig::BITMAPFILEHEADER fileheader; - synfig::BITMAPINFOHEADER infoheader; - char b_char=fgetc(file); - char m_char=fgetc(file); - - if(b_char!='B' || m_char!='M') - { - if(cb)cb->error("bmp_mptr::GetFrame(): "+strprintf(_("%s is not in BMP format"),filename.c_str())); - else synfig::error("bmp_mptr::GetFrame(): "+strprintf(_("%s is not in BMP format"),filename.c_str())); - return false; - } - - if(fread(&fileheader.bfSize, 1, sizeof(synfig::BITMAPFILEHEADER)-4, file)!=sizeof(synfig::BITMAPFILEHEADER)-4) - { - String str("bmp_mptr::get_frame(): "+strprintf(_("Failure while reading BITMAPFILEHEADER from %s"),filename.c_str())); - if(cb)cb->error(str); - else synfig::error(str); - return false; - } - - if(fread(&infoheader, 1, sizeof(synfig::BITMAPINFOHEADER), file)!=sizeof(synfig::BITMAPINFOHEADER)) - { - String str("bmp_mptr::get_frame(): "+strprintf(_("Failure while reading BITMAPINFOHEADER from %s"),filename.c_str())); - if(cb)cb->error(str); - else synfig::error(str); - return false; - } - - int offset=little_endian(fileheader.bfOffsetBits); - - if(offset!=sizeof(synfig::BITMAPFILEHEADER)+sizeof(synfig::BITMAPINFOHEADER)-2) - { - String str("bmp_mptr::get_frame(): "+strprintf(_("Bad BITMAPFILEHEADER in %s. (bfOffsetBits=%d, should be %d)"),filename.c_str(),offset,sizeof(synfig::BITMAPFILEHEADER)+sizeof(synfig::BITMAPINFOHEADER)-2)); - if(cb)cb->error(str); - else synfig::error(str); - return false; - } - - if(little_endian(infoheader.biSize)!=little_endian(40)) - { - String str("bmp_mptr::get_frame(): "+strprintf(_("Bad BITMAPINFOHEADER in %s. (biSize=%d, should be 40)"),filename.c_str(),little_endian(infoheader.biSize))); - if(cb)cb->error(str); - else synfig::error(str); - return false; - } - - int w,h,bit_count; - - w=little_endian(infoheader.biWidth); - h=little_endian(infoheader.biHeight); - bit_count=little_endian_short(infoheader.biBitCount); - - synfig::warning("w:%d\n",w); - synfig::warning("h:%d\n",h); - synfig::warning("bit_count:%d\n",bit_count); - - if(little_endian(infoheader.biCompression)) - { - if(cb)cb->error("bmp_mptr::GetFrame(): "+string(_("Reading compressed bitmaps is not supported"))); - else synfig::error("bmp_mptr::GetFrame(): "+string(_("Reading compressed bitmaps is not supported"))); - return false; - } - - if(bit_count!=24 && bit_count!=32) - { - if(cb)cb->error("bmp_mptr::GetFrame(): "+strprintf(_("Unsupported bit depth (bit_count=%d, should be 24 or 32)"),bit_count)); - else synfig::error("bmp_mptr::GetFrame(): "+strprintf(_("Unsupported bit depth (bit_count=%d, should be 24 or 32)"),bit_count)); - return false; - } - - int x; - int y; - surface.set_wh(w,h); - for(y=0;y -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class bmp_mptr : public synfig::Importer -{ -SYNFIG_IMPORTER_MODULE_EXT - -private: - synfig::String filename; - -public: - bmp_mptr(const char *filename); - ~bmp_mptr(); - - virtual bool get_frame(synfig::Surface &surface,synfig::Time time, synfig::ProgressCallback *callback); -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_bmp/trgt_bmp.cpp b/synfig-core/trunk/src/modules/mod_bmp/trgt_bmp.cpp deleted file mode 100644 index 2985c53..0000000 --- a/synfig-core/trunk/src/modules/mod_bmp/trgt_bmp.cpp +++ /dev/null @@ -1,265 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_bmp.cpp -** \brief Bitmap Target -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_NO_ANGLE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "trgt_bmp.h" -#include - -#include -#include -#include -#endif - -/* === U S I N G =========================================================== */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === I N F O ============================================================= */ - -SYNFIG_TARGET_INIT(bmp); -SYNFIG_TARGET_SET_NAME(bmp,"bmp"); -SYNFIG_TARGET_SET_EXT(bmp,"bmp"); -SYNFIG_TARGET_SET_VERSION(bmp,"0.1"); -SYNFIG_TARGET_SET_CVS_ID(bmp,"$Id$"); - -/* === C L A S S E S & S T R U C T S ======================================= */ -namespace synfig { - -struct BITMAPFILEHEADER -{ - unsigned char bfType[2]; - unsigned long bfSize; - unsigned short bfReserved1; - unsigned short bfReserved2; - unsigned long bfOffsetBits; -}; - -struct BITMAPINFOHEADER -{ - unsigned long biSize; - long biWidth; - long biHeight; - unsigned short biPlanes; - unsigned short biBitCount; - unsigned long biCompression; - unsigned long biSizeImage; - long biXPelsPerMeter; - long biYPelsPerMeter; - unsigned long biClrUsed; - unsigned long biClrImportant; -}; - -} -/* === M E T H O D S ======================================================= */ - -#ifdef WORDS_BIGENDIAN -inline long little_endian(const long &x) -{ - long ret; - char *big_e=(char *)&ret; - char *lit_e=(char *)&x; - big_e[0]=lit_e[3]; - big_e[1]=lit_e[2]; - big_e[2]=lit_e[1]; - big_e[3]=lit_e[0]; - return ret; -} -inline short little_endian_short(const short &x) -{ - short ret; - char *big_e=(char *)&ret; - char *lit_e=(char *)&x; - big_e[0]=lit_e[1]; - big_e[1]=lit_e[0]; - return ret; -} -#else -#define little_endian(x) (x) -#define little_endian_short(x) (x) -#endif - -bmp::bmp(const char *Filename) -{ - file=NULL; - filename=Filename; - multi_image=false; - buffer=0; - color_buffer=0; - set_remove_alpha(); - -} - -bmp::~bmp() -{ - if(file) - fclose(file); - file=NULL; - delete [] buffer; - delete [] color_buffer; -} - -bool -bmp::set_rend_desc(RendDesc *given_desc) -{ - pf=PF_BGR; - - // Flip the image upside down, - // because bitmaps are upside down. - given_desc->set_flags(0); - Point tl=given_desc->get_tl(); - Point br=given_desc->get_br(); - Point::value_type tmp; - tmp=tl[1]; - tl[1]=br[1]; - br[1]=tmp; - given_desc->set_tl(tl); - given_desc->set_br(br); - - desc=*given_desc; - if(desc.get_frame_end()-desc.get_frame_start()>0) - { - multi_image=true; - imagecount=desc.get_frame_start(); - } - else - multi_image=false; - - return true; -} - -void -bmp::end_frame() -{ - if(file) - fclose(file); - delete [] color_buffer; - color_buffer=0; - file=NULL; - imagecount++; -} - -bool -bmp::start_frame(synfig::ProgressCallback *callback) -{ - int w=desc.get_w(),h=desc.get_h(); - - rowspan=4*((w*(channels(pf)*8)+31)/32); - if(multi_image) - { - String newfilename(filename_sans_extension(filename) + - etl::strprintf(".%04d",imagecount) + - filename_extension(filename)); - file=fopen(newfilename.c_str(),POPEN_BINARY_WRITE_TYPE); - if(callback)callback->task(newfilename+_(" (animated)")); - } - else - { - file=fopen(filename.c_str(),POPEN_BINARY_WRITE_TYPE); - if(callback)callback->task(filename); - } - - if(!file) - { - if(callback)callback->error(_("Unable to open file")); - else synfig::error(_("Unable to open file")); - return false; - } - - synfig::BITMAPFILEHEADER fileheader; - synfig::BITMAPINFOHEADER infoheader; - - fileheader.bfType[0]='B'; - fileheader.bfType[1]='M'; - fileheader.bfSize=little_endian(sizeof(synfig::BITMAPFILEHEADER)+sizeof(synfig::BITMAPINFOHEADER)+rowspan*h); - fileheader.bfReserved1=0; - fileheader.bfReserved2=0; - fileheader.bfOffsetBits=little_endian(sizeof(synfig::BITMAPFILEHEADER)+sizeof(synfig::BITMAPINFOHEADER)-2); - - infoheader.biSize=little_endian(40); - infoheader.biWidth=little_endian(w); - infoheader.biHeight=little_endian(h); - infoheader.biPlanes=little_endian_short((short)1); - infoheader.biBitCount=little_endian_short((short)(channels(pf)*8)); - infoheader.biCompression=little_endian(0); - infoheader.biSizeImage=little_endian(0); - infoheader.biXPelsPerMeter=little_endian((int)rend_desc().get_x_res()); - infoheader.biYPelsPerMeter=little_endian((int)rend_desc().get_y_res()); // pels per meter...? - infoheader.biClrUsed=little_endian(0); - infoheader.biClrImportant=little_endian(0); - - fprintf(file,"BM"); - - if(!fwrite(&fileheader.bfSize,sizeof(synfig::BITMAPFILEHEADER)-4,1,file)) - { - if(callback)callback->error(_("Unable to write file header to file")); - else synfig::error(_("Unable to write file header to file")); - return false; - } - - if(!fwrite(&infoheader,sizeof(synfig::BITMAPINFOHEADER),1,file)) - { - if(callback)callback->error(_("Unable to write info header")); - else synfig::error(_("Unable to write info header")); - return false; - } - - delete [] buffer; - buffer=new unsigned char[rowspan]; - - delete [] color_buffer; - color_buffer=new Color[desc.get_w()]; - - return true; -} - -Color * -bmp::start_scanline(int /*scanline*/) -{ - return color_buffer; -} - -bool -bmp::end_scanline() -{ - if(!file) - return false; - - convert_color_format(buffer, color_buffer, desc.get_w(), pf, gamma()); - - if(!fwrite(buffer,1,rowspan,file)) - return false; - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_bmp/trgt_bmp.h b/synfig-core/trunk/src/modules/mod_bmp/trgt_bmp.h deleted file mode 100644 index 8a045c7..0000000 --- a/synfig-core/trunk/src/modules/mod_bmp/trgt_bmp.h +++ /dev/null @@ -1,67 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_bmp.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TRGT_BMP_H -#define __SYNFIG_TRGT_BMP_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class bmp : public synfig::Target_Scanline -{ - SYNFIG_TARGET_MODULE_EXT -private: - int rowspan; - int imagecount; - bool multi_image; - FILE *file; - synfig::String filename; - unsigned char *buffer; - synfig::Color *color_buffer; - synfig::PixelFormat pf; - -public: - bmp(const char *filename); - virtual ~bmp(); - - virtual bool set_rend_desc(synfig::RendDesc *desc); - virtual bool start_frame(synfig::ProgressCallback *cb); - virtual void end_frame(); - virtual synfig::Color * start_scanline(int scanline); - virtual bool end_scanline(); - -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_bmp/unmod_bmp.nsh b/synfig-core/trunk/src/modules/mod_bmp/unmod_bmp.nsh deleted file mode 100644 index 1df228a..0000000 --- a/synfig-core/trunk/src/modules/mod_bmp/unmod_bmp.nsh +++ /dev/null @@ -1,8 +0,0 @@ -Section "un.mod_bmp" - Delete "$INSTDIR\lib\synfig\modules\mod_bmp.dll" - RMDir "$INSTDIR\lib\synfig\modules" - RMDir "$INSTDIR\lib\synfig" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_dv/Makefile.am b/synfig-core/trunk/src/modules/mod_dv/Makefile.am deleted file mode 100644 index bbd1f63..0000000 --- a/synfig-core/trunk/src/modules/mod_dv/Makefile.am +++ /dev/null @@ -1,39 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -moduledir = @MODULE_DIR@ - -if WITH_LIBDV - -module_LTLIBRARIES = libmod_dv.la - -libmod_dv_la_SOURCES = \ - main.cpp \ - trgt_dv.cpp \ - trgt_dv.h - -libmod_dv_la_LDFLAGS = \ - -module \ - -no-undefined \ - -avoid-version - -libmod_dv_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ - -libmod_dv_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @SYNFIG_LIBS@ - -endif - - -EXTRA_DIST = \ - mod_dv.nsh \ - unmod_dv.nsh diff --git a/synfig-core/trunk/src/modules/mod_dv/main.cpp b/synfig-core/trunk/src/modules/mod_dv/main.cpp deleted file mode 100644 index 8d3abbf..0000000 --- a/synfig-core/trunk/src/modules/mod_dv/main.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_dv/main.cpp -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "trgt_dv.h" -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(mod_dv) - MODULE_NAME("DV Target") - MODULE_DESCRIPTION("Provides a DV Stream target (ie: for miniDV stuff)") - MODULE_AUTHOR("Robert B. Quattlebaum") - MODULE_VERSION("1.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(mod_dv) - BEGIN_TARGETS - TARGET(dv_trgt) - END_TARGETS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mod_dv/mod_dv.nsh b/synfig-core/trunk/src/modules/mod_dv/mod_dv.nsh deleted file mode 100644 index 6a0967b..0000000 --- a/synfig-core/trunk/src/modules/mod_dv/mod_dv.nsh +++ /dev/null @@ -1,21 +0,0 @@ -; The stuff to install -Section "mod_dv" Sec_mod_dv - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=mod_dv.dll "src\modules\mod_dv\.libs\libmod_dv.dll" - - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "mod_dv" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_dv/trgt_dv.cpp b/synfig-core/trunk/src/modules/mod_dv/trgt_dv.cpp deleted file mode 100644 index 13fed5c..0000000 --- a/synfig-core/trunk/src/modules/mod_dv/trgt_dv.cpp +++ /dev/null @@ -1,290 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_dv.cpp -** \brief ppm Target Module -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_TARGET - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "trgt_dv.h" -#include -#include -#if HAVE_SYS_WAIT_H - #include -#endif -#if HAVE_IO_H - #include -#endif -#if HAVE_PROCESS_H - #include -#endif -#if HAVE_FCNTL_H - #include -#endif -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -#if defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID) - #define UNIX_PIPE_TO_PROCESSES -#else - #define WIN32_PIPE_TO_PROCESSES -#endif - -/* === G L O B A L S ======================================================= */ - -SYNFIG_TARGET_INIT(dv_trgt); -SYNFIG_TARGET_SET_NAME(dv_trgt,"dv"); -SYNFIG_TARGET_SET_EXT(dv_trgt,"dv"); -SYNFIG_TARGET_SET_VERSION(dv_trgt,"0.1"); -SYNFIG_TARGET_SET_CVS_ID(dv_trgt,"$Id$"); - -/* === M E T H O D S ======================================================= */ - - -dv_trgt::dv_trgt(const char *Filename) -{ - pid=-1; - file=NULL; - filename=Filename; - buffer=NULL; - wide_aspect=false; - color_buffer=0; - set_remove_alpha(); - -} - -dv_trgt::~dv_trgt() -{ - if(file){ -#if defined(WIN32_PIPE_TO_PROCESSES) - pclose(file); -#elif defined(UNIX_PIPE_TO_PROCESSES) - fclose(file); - int status; - waitpid(pid,&status,0); -#endif - } - file=NULL; - delete [] buffer; - delete [] color_buffer; -} - -bool -dv_trgt::set_rend_desc(RendDesc *given_desc) -{ - // Set the aspect ratio - if(wide_aspect) - { - // 16:9 Aspect - given_desc->set_wh(160,90); - - // Widescreen should be progressive scan - given_desc->set_interlaced(false); - } - else - { - // 4:3 Aspect - given_desc->set_wh(400,300); - - // We should be interlaced - given_desc->set_interlaced(true); - } - - // but the pixel res should be 720x480 - given_desc->clear_flags(),given_desc->set_wh(720,480); - - // NTSC Frame rate is 29.97 - given_desc->set_frame_rate(29.97); - - // The pipe to encodedv is PPM, which needs RGB data - //given_desc->set_pixel_format(PF_RGB); - - // Set the description - desc=*given_desc; - - return true; -} - -bool -dv_trgt::init() -{ - imagecount=desc.get_frame_start(); - -#if defined(WIN32_PIPE_TO_PROCESSES) - - string command; - - if(wide_aspect) - command=strprintf("encodedv -w 1 - > \"%s\"\n",filename.c_str()); - else - command=strprintf("encodedv - > \"%s\"\n",filename.c_str()); - - // Open the pipe to encodedv - file=popen(command.c_str(),POPEN_BINARY_WRITE_TYPE); - - if(!file) - { - synfig::error(_("Unable to open pipe to encodedv")); - return false; - } - -#elif defined(UNIX_PIPE_TO_PROCESSES) - - int p[2]; - - if (pipe(p)) { - synfig::error(_("Unable to open pipe to encodedv")); - return false; - }; - - pid_t pid = fork(); - - if (pid == -1) { - synfig::error(_("Unable to open pipe to encodedv")); - return false; - } - - if (pid == 0){ - // Child process - // Close pipeout, not needed - close(p[1]); - // Dup pipeout to stdin - if( dup2( p[0], STDIN_FILENO ) == -1 ){ - synfig::error(_("Unable to open pipe to encodedv")); - return false; - } - // Close the unneeded pipeout - close(p[0]); - // Open filename to stdout - FILE* outfile = fopen(filename.c_str(),"wb"); - if( outfile == NULL ){ - synfig::error(_("Unable to open pipe to encodedv")); - return false; - } - int outfilefd = fileno(outfile); - if( outfilefd == -1 ){ - synfig::error(_("Unable to open pipe to encodedv")); - return false; - } - if( dup2( outfilefd, STDOUT_FILENO ) == -1 ){ - synfig::error(_("Unable to open pipe to encodedv")); - return false; - } - - if(wide_aspect) - execlp("encodedv", "encodedv", "-w", "1", "-", (const char *)NULL); - else - execlp("encodedv", "encodedv", "-", (const char *)NULL); - // We should never reach here unless the exec failed - synfig::error(_("Unable to open pipe to encodedv")); - return false; - } else { - // Parent process - // Close pipein, not needed - close(p[0]); - // Save pipeout to file handle, will write to it later - file = fdopen(p[1], "wb"); - if (file == NULL) { - synfig::error(_("Unable to open pipe to encodedv")); - return false; - } - } - -#else - #error There are no known APIs for creating child processes -#endif - - - // Sleep for a moment to let the pipe catch up - etl::clock().sleep(0.25f); - - return true; -} - -void -dv_trgt::end_frame() -{ - fprintf(file, " "); - fflush(file); - imagecount++; -} - -bool -dv_trgt::start_frame(synfig::ProgressCallback */*callback*/) -{ - int w=desc.get_w(),h=desc.get_h(); - - if(!file) - return false; - - fprintf(file, "P6\n"); - fprintf(file, "%d %d\n", w, h); - fprintf(file, "%d\n", 255); - - delete [] buffer; - buffer=new unsigned char[3*w]; - - delete [] color_buffer; - color_buffer=new Color[w]; - - return true; -} - -Color * -dv_trgt::start_scanline(int /*scanline*/) -{ - return color_buffer; -} - -bool -dv_trgt::end_scanline() -{ - if(!file) - return false; - - convert_color_format(buffer, color_buffer, desc.get_w(), PF_RGB, gamma()); - - if(!fwrite(buffer,1,desc.get_w()*3,file)) - return false; - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_dv/trgt_dv.h b/synfig-core/trunk/src/modules/mod_dv/trgt_dv.h deleted file mode 100644 index 11ba75e..0000000 --- a/synfig-core/trunk/src/modules/mod_dv/trgt_dv.h +++ /dev/null @@ -1,71 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_dv.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TRGT_DV_H -#define __SYNFIG_TRGT_DV_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - - -class dv_trgt : public synfig::Target_Scanline -{ - SYNFIG_TARGET_MODULE_EXT -private: - pid_t pid; - int imagecount; - bool wide_aspect; - FILE *file; - synfig::String filename; - unsigned char *buffer; - synfig::Color *color_buffer; -public: - dv_trgt(const char *filename); - virtual ~dv_trgt(); - - - virtual bool set_rend_desc(synfig::RendDesc *desc); - virtual bool init(); - virtual bool start_frame(synfig::ProgressCallback *cb); - virtual void end_frame(); - - virtual synfig::Color * start_scanline(int scanline); - virtual bool end_scanline(); -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_dv/unmod_dv.nsh b/synfig-core/trunk/src/modules/mod_dv/unmod_dv.nsh deleted file mode 100644 index 39b1299..0000000 --- a/synfig-core/trunk/src/modules/mod_dv/unmod_dv.nsh +++ /dev/null @@ -1,8 +0,0 @@ -Section "un.mod_dv" - Delete "$INSTDIR\lib\synfig\modules\mod_dv.dll" - RMDir "$INSTDIR\lib\synfig\modules" - RMDir "$INSTDIR\lib\synfig" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_ffmpeg/Makefile.am b/synfig-core/trunk/src/modules/mod_ffmpeg/Makefile.am deleted file mode 100644 index d67be26..0000000 --- a/synfig-core/trunk/src/modules/mod_ffmpeg/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -moduledir = @MODULE_DIR@ - -if WITH_FFMPEG - -module_LTLIBRARIES = libmod_ffmpeg.la - -libmod_ffmpeg_la_SOURCES = \ - main.cpp \ - mptr_ffmpeg.cpp \ - mptr_ffmpeg.h \ - trgt_ffmpeg.cpp \ - trgt_ffmpeg.h - -libmod_ffmpeg_la_LDFLAGS = \ - -module \ - -no-undefined \ - -avoid-version - -libmod_ffmpeg_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ - -libmod_ffmpeg_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @SYNFIG_LIBS@ - -endif - - -EXTRA_DIST = \ - mod_ffmpeg.nsh \ - unmod_ffmpeg.nsh diff --git a/synfig-core/trunk/src/modules/mod_ffmpeg/main.cpp b/synfig-core/trunk/src/modules/mod_ffmpeg/main.cpp deleted file mode 100644 index 0f0cb82..0000000 --- a/synfig-core/trunk/src/modules/mod_ffmpeg/main.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_ffmpeg/main.cpp -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "mptr_ffmpeg.h" -#include "trgt_ffmpeg.h" -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(mod_ffmpeg) - MODULE_NAME("FFMPEG Module") - MODULE_DESCRIPTION("Provides output targets for each format that FFMPEG supports") - MODULE_AUTHOR("Robert B. Quattlebaum Jr.") - MODULE_VERSION("1.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(mod_ffmpeg) - BEGIN_TARGETS - TARGET(ffmpeg_trgt) - TARGET_EXT(ffmpeg_trgt,"avi") - TARGET_EXT(ffmpeg_trgt,"mpg") - TARGET_EXT(ffmpeg_trgt,"rm") - TARGET_EXT(ffmpeg_trgt,"asf") - TARGET_EXT(ffmpeg_trgt,"swf") - TARGET_EXT(ffmpeg_trgt,"yuv") - TARGET_EXT(ffmpeg_trgt,"rgb") - END_TARGETS - BEGIN_IMPORTERS - IMPORTER_EXT(ffmpeg_mptr,"avi") - IMPORTER_EXT(ffmpeg_mptr,"mpg") - IMPORTER_EXT(ffmpeg_mptr,"mpeg") - IMPORTER_EXT(ffmpeg_mptr,"mov") - IMPORTER_EXT(ffmpeg_mptr,"rm") - IMPORTER_EXT(ffmpeg_mptr,"dv") - END_IMPORTERS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mod_ffmpeg/mod_ffmpeg.nsh b/synfig-core/trunk/src/modules/mod_ffmpeg/mod_ffmpeg.nsh deleted file mode 100644 index 8a8f197..0000000 --- a/synfig-core/trunk/src/modules/mod_ffmpeg/mod_ffmpeg.nsh +++ /dev/null @@ -1,21 +0,0 @@ -; The stuff to install -Section "mod_ffmpeg" Sec_mod_ffmpeg - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=mod_ffmpeg.dll "src\modules\mod_ffmpeg\.libs\libmod_ffmpeg.dll" - - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "mod_ffmpeg" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_ffmpeg/mptr_ffmpeg.cpp b/synfig-core/trunk/src/modules/mod_ffmpeg/mptr_ffmpeg.cpp deleted file mode 100644 index f837c7b..0000000 --- a/synfig-core/trunk/src/modules/mod_ffmpeg/mptr_ffmpeg.cpp +++ /dev/null @@ -1,274 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mptr_ffmpeg.cpp -** \brief ppm Target Module -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "mptr_ffmpeg.h" -#include -#include -#if HAVE_SYS_WAIT_H - #include -#endif -#if HAVE_IO_H - #include -#endif -#if HAVE_PROCESS_H - #include -#endif -#if HAVE_FCNTL_H - #include -#endif -#include -#include -#include -#include -#include -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -#if defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID) - #define UNIX_PIPE_TO_PROCESSES -#else - #define WIN32_PIPE_TO_PROCESSES -#endif - -/* === G L O B A L S ======================================================= */ - -SYNFIG_IMPORTER_INIT(ffmpeg_mptr); -SYNFIG_IMPORTER_SET_NAME(ffmpeg_mptr,"ffmpeg"); -SYNFIG_IMPORTER_SET_EXT(ffmpeg_mptr,"avi"); -SYNFIG_IMPORTER_SET_VERSION(ffmpeg_mptr,"0.1"); -SYNFIG_IMPORTER_SET_CVS_ID(ffmpeg_mptr,"$Id$"); - -/* === M E T H O D S ======================================================= */ - -bool ffmpeg_mptr::is_animated() -{ - return true; -} - -bool -ffmpeg_mptr::seek_to(int frame) -{ - if(frame -#include -#include -#include "string.h" -#ifdef HAVE_TERMIOS_H -#include - -#endif - -#include -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class ffmpeg_mptr : public synfig::Importer -{ - SYNFIG_IMPORTER_MODULE_EXT -public: -private: - pid_t pid; - synfig::String filename; - FILE *file; - int cur_frame; - synfig::Surface frame; - float fps; -#ifdef HAVE_TERMIOS_H - struct termios oldtty; -#endif - - bool seek_to(int frame); - bool grab_frame(void); - -public: - ffmpeg_mptr(const char *filename); - ~ffmpeg_mptr(); - - virtual bool is_animated(); - - virtual bool get_frame(synfig::Surface &surface,synfig::Time time, synfig::ProgressCallback *callback); -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_ffmpeg/trgt_ffmpeg.cpp b/synfig-core/trunk/src/modules/mod_ffmpeg/trgt_ffmpeg.cpp deleted file mode 100644 index 5b5b2bc..0000000 --- a/synfig-core/trunk/src/modules/mod_ffmpeg/trgt_ffmpeg.cpp +++ /dev/null @@ -1,270 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_ffmpeg.cpp -** \brief ppm Target Module -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_TARGET - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "trgt_ffmpeg.h" -#include -#include -#if HAVE_SYS_WAIT_H - #include -#endif -#if HAVE_IO_H - #include -#endif -#if HAVE_PROCESS_H - #include -#endif -#if HAVE_FCNTL_H - #include -#endif -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -#if defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID) - #define UNIX_PIPE_TO_PROCESSES -#else - #define WIN32_PIPE_TO_PROCESSES -#endif - -/* === G L O B A L S ======================================================= */ - -SYNFIG_TARGET_INIT(ffmpeg_trgt); -SYNFIG_TARGET_SET_NAME(ffmpeg_trgt,"ffmpeg"); -SYNFIG_TARGET_SET_EXT(ffmpeg_trgt,"mpg"); -SYNFIG_TARGET_SET_VERSION(ffmpeg_trgt,"0.1"); -SYNFIG_TARGET_SET_CVS_ID(ffmpeg_trgt,"$Id$"); - -/* === M E T H O D S ======================================================= */ - -ffmpeg_trgt::ffmpeg_trgt(const char *Filename) -{ - pid=-1; - file=NULL; - filename=Filename; - multi_image=false; - buffer=NULL; - color_buffer=0; - set_remove_alpha(); -} - -ffmpeg_trgt::~ffmpeg_trgt() -{ - if(file) - { - etl::yield(); - sleep(1); -#if defined(WIN32_PIPE_TO_PROCESSES) - pclose(file); -#elif defined(UNIX_PIPE_TO_PROCESSES) - fclose(file); - int status; - waitpid(pid,&status,0); -#endif - } - file=NULL; - delete [] buffer; - delete [] color_buffer; -} - -bool -ffmpeg_trgt::set_rend_desc(RendDesc *given_desc) -{ - //given_desc->set_pixel_format(PF_RGB); - - // Make sure that the width and height - // are multiples of 8 - given_desc->set_w((given_desc->get_w()+4)/8*8); - given_desc->set_h((given_desc->get_h()+4)/8*8); - - /* - // Valid framerates: - // 23.976, 24, 25, 29.97, 30, 50 ,59.94, 60 - float fps=given_desc->get_frame_rate(); - if(fps <24.0) - given_desc->set_frame_rate(23.976); - if(fps>=24.0 && fps <25.0) - given_desc->set_frame_rate(24); - if(fps>=25.0 && fps <29.97) - given_desc->set_frame_rate(25); - if(fps>=29.97 && fps <30.0) - given_desc->set_frame_rate(29.97); - if(fps>=29.97 && fps <30.0) - given_desc->set_frame_rate(29.97); - if(fps>=30.0 && fps <50.0) - given_desc->set_frame_rate(30.0); - if(fps>=50.0 && fps <59.94) - given_desc->set_frame_rate(50); - if(fps>=59.94) - given_desc->set_frame_rate(59.94); - */ - - desc=*given_desc; - - return true; -} - -bool -ffmpeg_trgt::init() -{ - imagecount=desc.get_frame_start(); - if(desc.get_frame_end()-desc.get_frame_start()>0) - multi_image=true; - -#if defined(WIN32_PIPE_TO_PROCESSES) - - string command; - - if( filename.c_str()[0] == '-' ) - command=strprintf("ffmpeg -f image2pipe -vcodec ppm -an -r %f -i pipe: -loop -hq -title \"%s\" -vcodec mpeg1video -y -- \"%s\"\n",desc.get_frame_rate(),get_canvas()->get_name().c_str(),filename.c_str()); - else - command=strprintf("ffmpeg -f image2pipe -vcodec ppm -an -r %f -i pipe: -loop -hq -title \"%s\" -vcodec mpeg1video -y \"%s\"\n",desc.get_frame_rate(),get_canvas()->get_name().c_str(),filename.c_str()); - - file=popen(command.c_str(),POPEN_BINARY_WRITE_TYPE); - -#elif defined(UNIX_PIPE_TO_PROCESSES) - - int p[2]; - - if (pipe(p)) { - synfig::error(_("Unable to open pipe to ffmpeg")); - return false; - }; - - pid = fork(); - - if (pid == -1) { - synfig::error(_("Unable to open pipe to ffmpeg")); - return false; - } - - if (pid == 0){ - // Child process - // Close pipeout, not needed - close(p[1]); - // Dup pipeout to stdin - if( dup2( p[0], STDIN_FILENO ) == -1 ){ - synfig::error(_("Unable to open pipe to ffmpeg")); - return false; - } - // Close the unneeded pipeout - close(p[0]); - if( filename.c_str()[0] == '-' ) - execlp("ffmpeg", "ffmpeg", "-f", "image2pipe", "-vcodec", "ppm", "-an", "-r", strprintf("%f", desc.get_frame_rate()).c_str(), "-i", "pipe:", "-loop", "-hq", "-title", get_canvas()->get_name().c_str(), "-vcodec", "mpeg1video", "-y", "--", filename.c_str(), (const char *)NULL); - else - execlp("ffmpeg", "ffmpeg", "-f", "image2pipe", "-vcodec", "ppm", "-an", "-r", strprintf("%f", desc.get_frame_rate()).c_str(), "-i", "pipe:", "-loop", "-hq", "-title", get_canvas()->get_name().c_str(), "-vcodec", "mpeg1video", "-y", filename.c_str(), (const char *)NULL); - // We should never reach here unless the exec failed - synfig::error(_("Unable to open pipe to ffmpeg")); - return false; - } else { - // Parent process - // Close pipein, not needed - close(p[0]); - // Save pipeout to file handle, will write to it later - file = fdopen(p[1], "wb"); - } - -#else - #error There are no known APIs for creating child processes -#endif - - // etl::yield(); - - if(!file) - { - synfig::error(_("Unable to open pipe to ffmpeg")); - return false; - } - - return true; -} - -void -ffmpeg_trgt::end_frame() -{ - //fprintf(file, " "); - fflush(file); - imagecount++; -} - -bool -ffmpeg_trgt::start_frame(synfig::ProgressCallback */*callback*/) -{ - int w=desc.get_w(),h=desc.get_h(); - - if(!file) - return false; - - fprintf(file, "P6\n"); - fprintf(file, "%d %d\n", w, h); - fprintf(file, "%d\n", 255); - - delete [] buffer; - buffer=new unsigned char[3*w]; - delete [] color_buffer; - color_buffer=new Color[w]; - - return true; -} - -Color * -ffmpeg_trgt::start_scanline(int /*scanline*/) -{ - return color_buffer; -} - -bool -ffmpeg_trgt::end_scanline() -{ - if(!file) - return false; - - convert_color_format(buffer, color_buffer, desc.get_w(), PF_RGB, gamma()); - - if(!fwrite(buffer,1,desc.get_w()*3,file)) - return false; - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_ffmpeg/trgt_ffmpeg.h b/synfig-core/trunk/src/modules/mod_ffmpeg/trgt_ffmpeg.h deleted file mode 100644 index c5fc1ae..0000000 --- a/synfig-core/trunk/src/modules/mod_ffmpeg/trgt_ffmpeg.h +++ /dev/null @@ -1,70 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_ffmpeg.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TRGT_FFMPEG_H -#define __SYNFIG_TRGT_FFMPEG_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class ffmpeg_trgt : public synfig::Target_Scanline -{ - SYNFIG_TARGET_MODULE_EXT -private: - pid_t pid; - int imagecount; - bool multi_image; - FILE *file; - synfig::String filename; - unsigned char *buffer; - synfig::Color *color_buffer; -public: - ffmpeg_trgt(const char *filename); - - virtual bool set_rend_desc(synfig::RendDesc *desc); - virtual bool init(); - virtual bool start_frame(synfig::ProgressCallback *cb); - virtual void end_frame(); - - virtual ~ffmpeg_trgt(); - - virtual synfig::Color * start_scanline(int scanline); - virtual bool end_scanline(); -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_ffmpeg/unmod_ffmpeg.nsh b/synfig-core/trunk/src/modules/mod_ffmpeg/unmod_ffmpeg.nsh deleted file mode 100644 index 09ed59b..0000000 --- a/synfig-core/trunk/src/modules/mod_ffmpeg/unmod_ffmpeg.nsh +++ /dev/null @@ -1,8 +0,0 @@ -Section "un.mod_ffmpeg" - Delete "$INSTDIR\lib\synfig\modules\mod_ffmpeg.dll" - RMDir "$INSTDIR\lib\synfig\modules" - RMDir "$INSTDIR\lib\synfig" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_filter/Makefile.am b/synfig-core/trunk/src/modules/mod_filter/Makefile.am deleted file mode 100644 index 45f06e1..0000000 --- a/synfig-core/trunk/src/modules/mod_filter/Makefile.am +++ /dev/null @@ -1,46 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -moduledir = @MODULE_DIR@ - -module_LTLIBRARIES = libmod_filter.la - -libmod_filter_la_SOURCES = \ - blur.cpp \ - blur.h \ - colorcorrect.cpp \ - colorcorrect.h \ - halftone2.cpp \ - halftone2.h \ - lumakey.cpp \ - lumakey.h \ - radialblur.cpp \ - radialblur.h \ - main.cpp \ - halftone.cpp \ - halftone.h \ - halftone3.cpp \ - halftone3.h - -libmod_filter_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ - -libmod_filter_la_LIBADD = \ - ../../synfig/libsynfig.la @SYNFIG_LIBS@ - -libmod_filter_la_LDFLAGS = \ - -module \ - -no-undefined \ - -avoid-version - - -EXTRA_DIST = \ - mod_filter.nsh \ - unmod_filter.nsh diff --git a/synfig-core/trunk/src/modules/mod_filter/blur.cpp b/synfig-core/trunk/src/modules/mod_filter/blur.cpp deleted file mode 100644 index e5104b0..0000000 --- a/synfig-core/trunk/src/modules/mod_filter/blur.cpp +++ /dev/null @@ -1,268 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_filter/blur.cpp -** \brief Implementation of the "Blur" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "blur.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#endif - -using namespace synfig; -using namespace etl; -using namespace std; - -/*#define TYPE_BOX 0 -#define TYPE_FASTGUASSIAN 1 -#define TYPE_FASTGAUSSIAN 1 -#define TYPE_CROSS 2 -#define TYPE_GUASSIAN 3 -#define TYPE_GAUSSIAN 3 -#define TYPE_DISC 4 -*/ - -/* -- G L O B A L S --------------------------------------------------------- */ - -SYNFIG_LAYER_INIT(Blur_Layer); -SYNFIG_LAYER_SET_NAME(Blur_Layer,"blur"); -SYNFIG_LAYER_SET_LOCAL_NAME(Blur_Layer,N_("Blur")); -SYNFIG_LAYER_SET_CATEGORY(Blur_Layer,N_("Blurs")); -SYNFIG_LAYER_SET_VERSION(Blur_Layer,"0.2"); -SYNFIG_LAYER_SET_CVS_ID(Blur_Layer,"$Id$"); - -/* -- F U N C T I O N S ----------------------------------------------------- */ - -inline void clamp(synfig::Vector &v) -{ - if(v[0]<0.0)v[0]=0.0; - if(v[1]<0.0)v[1]=0.0; -} - -Blur_Layer::Blur_Layer(): - Layer_Composite (1.0,Color::BLEND_STRAIGHT), - size(0.1,0.1), - type(Blur::FASTGAUSSIAN) -{ -} - -bool -Blur_Layer::set_param(const String ¶m, const ValueBase &value) -{ - IMPORT_PLUS(size,clamp(size)); - IMPORT(type); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -Blur_Layer::get_param(const String ¶m)const -{ - EXPORT(size); - EXPORT(type); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Color -Blur_Layer::get_color(Context context, const Point &pos)const -{ - Point blurpos = Blur(size,type)(pos); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - return context.get_color(blurpos); - - if(get_amount()==0.0) - return context.get_color(pos); - - return Color::blend(context.get_color(blurpos),context.get_color(pos),get_amount(),get_blend_method()); -} - -bool -Blur_Layer::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - // don't do anything at quality 10 - if (quality == 10) - return context.accelerated_render(surface,quality,renddesc,cb); - - // int x,y; - SuperCallback stageone(cb,0,5000,10000); - SuperCallback stagetwo(cb,5000,10000,10000); - - const int w = renddesc.get_w(), - h = renddesc.get_h(); - const Real pw = renddesc.get_pw(), - ph = renddesc.get_ph(); - - RendDesc workdesc(renddesc); - Surface worksurface,blurred; - - //callbacks depend on how long the blur takes - if(size[0] || size[1]) - { - if(type == Blur::DISC) - { - stageone = SuperCallback(cb,0,5000,10000); - stagetwo = SuperCallback(cb,5000,10000,10000); - } - else - { - stageone = SuperCallback(cb,0,9000,10000); - stagetwo = SuperCallback(cb,9000,10000,10000); - } - } - else - { - stageone = SuperCallback(cb,0,9999,10000); - stagetwo = SuperCallback(cb,9999,10000,10000); - } - - //expand the working surface to accommodate the blur - - //the expanded size = 1/2 the size in each direction rounded up - int halfsizex = (int) (abs(size[0]*.5/pw) + 3), - halfsizey = (int) (abs(size[1]*.5/ph) + 3); - - //expand by 1/2 size in each direction on either side - switch(type) - { - case Blur::DISC: - case Blur::BOX: - case Blur::CROSS: - { - workdesc.set_subwindow(-max(1,halfsizex),-max(1,halfsizey),w+2*max(1,halfsizex),h+2*max(1,halfsizey)); - break; - } - case Blur::FASTGAUSSIAN: - { - if(quality < 4) - { - halfsizex*=2; - halfsizey*=2; - } - workdesc.set_subwindow(-max(1,halfsizex),-max(1,halfsizey),w+2*max(1,halfsizex),h+2*max(1,halfsizey)); - break; - } - case Blur::GAUSSIAN: - { - #define GAUSSIAN_ADJUSTMENT (0.05) - Real pw = (Real)workdesc.get_w()/(workdesc.get_br()[0]-workdesc.get_tl()[0]); - Real ph = (Real)workdesc.get_h()/(workdesc.get_br()[1]-workdesc.get_tl()[1]); - - pw=pw*pw; - ph=ph*ph; - - halfsizex = (int)(abs(pw)*size[0]*GAUSSIAN_ADJUSTMENT+0.5); - halfsizey = (int)(abs(ph)*size[1]*GAUSSIAN_ADJUSTMENT+0.5); - - halfsizex = (halfsizex + 1)/2; - halfsizey = (halfsizey + 1)/2; - workdesc.set_subwindow( -halfsizex, -halfsizey, w+2*halfsizex, h+2*halfsizey ); - - break; - } - } - - //render the background onto the expanded surface - if(!context.accelerated_render(&worksurface,quality,workdesc,&stageone)) - return false; - - //blur the image - Blur(size,type,&stagetwo)(worksurface,workdesc.get_br()-workdesc.get_tl(),blurred); - - //be sure the surface is of the correct size - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - - { - Surface::pen pen(surface->begin()); - worksurface.blit_to(pen,halfsizex,halfsizey,renddesc.get_w(),renddesc.get_h()); - } - { - Surface::alpha_pen pen(surface->begin()); - pen.set_alpha(get_amount()); - pen.set_blend_method(get_blend_method()); - blurred.blit_to(pen,halfsizex,halfsizey,renddesc.get_w(),renddesc.get_h()); - } - if(cb && !cb->amount_complete(10000,10000)) - { - //if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); - return false; - } - - return true; -} - -Layer::Vocab -Blur_Layer::get_param_vocab(void)const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("size") - .set_local_name(_("Size")) - .set_description(_("Size of Blur")) - ); - ret.push_back(ParamDesc("type") - .set_local_name(_("Type")) - .set_description(_("Type of blur to use")) - .set_hint("enum") - .add_enum_value(Blur::BOX,"box",_("Box Blur")) - .add_enum_value(Blur::FASTGAUSSIAN,"fastgaussian",_("Fast Gaussian Blur")) - .add_enum_value(Blur::CROSS,"cross",_("Cross-Hatch Blur")) - .add_enum_value(Blur::GAUSSIAN,"gaussian",_("Gaussian Blur")) - .add_enum_value(Blur::DISC,"disc",_("Disc Blur")) - ); - - return ret; -} - -Rect -Blur_Layer::get_full_bounding_rect(Context context)const -{ - if(is_disabled() || Color::is_onto(get_blend_method())) - return context.get_full_bounding_rect(); - - Rect bounds(context.get_full_bounding_rect().expand_x(size[0]).expand_y(size[1])); - - return bounds; -} diff --git a/synfig-core/trunk/src/modules/mod_filter/blur.h b/synfig-core/trunk/src/modules/mod_filter/blur.h deleted file mode 100644 index cfe8a2f..0000000 --- a/synfig-core/trunk/src/modules/mod_filter/blur.h +++ /dev/null @@ -1,68 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_filter/blur.h -** \brief Header file for implementation of the "Blur" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifndef __SYNFIG_LAYER_BLUR_H__ -#define __SYNFIG_LAYER_BLUR_H__ - -/* -- H E A D E R S --------------------------------------------------------- */ - -#include -#include -#include -#include - -using namespace synfig; -using namespace std; -using namespace etl; - -class Blur_Layer : public synfig::Layer_Composite -{ - SYNFIG_LAYER_MODULE_EXT -private: - synfig::Point size; - int type; - -public: - Blur_Layer(); - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - - virtual ValueBase get_param(const String & param)const; - - virtual Color get_color(Context context, const Point &pos)const; - - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - virtual synfig::Rect get_full_bounding_rect(Context context)const; - - virtual Vocab get_param_vocab()const; - - virtual bool reads_context()const { return true; } -}; // END of class Blur - -/* -- E X T E R N S --------------------------------------------------------- */ - -/* -- E N D ----------------------------------------------------------------- */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_filter/colorcorrect.cpp b/synfig-core/trunk/src/modules/mod_filter/colorcorrect.cpp deleted file mode 100644 index 3a0468e..0000000 --- a/synfig-core/trunk/src/modules/mod_filter/colorcorrect.cpp +++ /dev/null @@ -1,258 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file colorcorrect.cpp -** \brief Implementation of the "Color Correct" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "colorcorrect.h" -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace etl; -using namespace std; -using namespace synfig; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Layer_ColorCorrect); -SYNFIG_LAYER_SET_NAME(Layer_ColorCorrect,"colorcorrect"); -SYNFIG_LAYER_SET_LOCAL_NAME(Layer_ColorCorrect,N_("Color Correct")); -SYNFIG_LAYER_SET_CATEGORY(Layer_ColorCorrect,N_("Filters")); -SYNFIG_LAYER_SET_VERSION(Layer_ColorCorrect,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Layer_ColorCorrect,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -Layer_ColorCorrect::Layer_ColorCorrect(): - hue_adjust(Angle::zero()), - brightness(0), - contrast(1.0), - exposure(0.0) -{ -} - -inline Color -Layer_ColorCorrect::correct_color(const Color &in)const -{ - Color ret(in); - Real brightness((this->brightness-0.5)*this->contrast+0.5); - - if(gamma.get_gamma_r()!=1.0) - { - if(ret.get_r() < 0) - { - ret.set_r(-gamma.r_F32_to_F32(-ret.get_r())); - }else - { - ret.set_r(gamma.r_F32_to_F32(ret.get_r())); - } - } - if(gamma.get_gamma_g()!=1.0) - { - if(ret.get_g() < 0) - { - ret.set_g(-gamma.g_F32_to_F32(-ret.get_g())); - }else - { - ret.set_g(gamma.g_F32_to_F32(ret.get_g())); - } - } - if(gamma.get_gamma_b()!=1.0) - { - if(ret.get_b() < 0) - { - ret.set_b(-gamma.b_F32_to_F32(-ret.get_b())); - }else - { - ret.set_b(gamma.b_F32_to_F32(ret.get_b())); - } - } - - assert(!isnan(ret.get_r())); - assert(!isnan(ret.get_g())); - assert(!isnan(ret.get_b())); - - if(exposure!=0.0) - { - const float factor(exp(exposure)); - ret.set_r(ret.get_r()*factor); - ret.set_g(ret.get_g()*factor); - ret.set_b(ret.get_b()*factor); - } - - // Adjust Contrast - if(contrast!=1.0) - { - ret.set_r(ret.get_r()*contrast); - ret.set_g(ret.get_g()*contrast); - ret.set_b(ret.get_b()*contrast); - } - - if(brightness) - { - // Adjust R Channel Brightness - if(ret.get_r()>-brightness) - ret.set_r(ret.get_r()+brightness); - else if(ret.get_r()-brightness) - ret.set_g(ret.get_g()+brightness); - else if(ret.get_g()-brightness) - ret.set_b(ret.get_b()+brightness); - else if(ret.get_b()begin()); - - for(y=0;yamount_complete(10000,10000)) - return false; - - return true; -} - -Rect -Layer_ColorCorrect::get_full_bounding_rect(Context context)const -{ - return context.get_full_bounding_rect(); -} diff --git a/synfig-core/trunk/src/modules/mod_filter/colorcorrect.h b/synfig-core/trunk/src/modules/mod_filter/colorcorrect.h deleted file mode 100644 index 8617e4c..0000000 --- a/synfig-core/trunk/src/modules/mod_filter/colorcorrect.h +++ /dev/null @@ -1,79 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file colorcorrect.h -** \brief Header file for implementation of the "Color Correct" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_LAYER_COLORCORRECT_H -#define __SYNFIG_LAYER_COLORCORRECT_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class Layer_ColorCorrect : public Layer -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - Angle hue_adjust; - Real brightness; - Real contrast; - Real exposure; - - Gamma gamma; - - Color correct_color(const Color &in)const; - -public: - - Layer_ColorCorrect(); - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - - virtual ValueBase get_param(const String & param)const; - - virtual Color get_color(Context context, const Point &pos)const; - - virtual Rect get_full_bounding_rect(Context context)const; - - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - - virtual Vocab get_param_vocab()const; -}; // END of class Layer_ColorCorrect - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_filter/halftone.cpp b/synfig-core/trunk/src/modules/mod_filter/halftone.cpp deleted file mode 100644 index 8e8ba9e..0000000 --- a/synfig-core/trunk/src/modules/mod_filter/halftone.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file halftone.cpp -** \brief blehh -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "halftone.h" - -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - - -/* === P R O C E D U R E S ================================================= */ - -#define SQRT2 (1.414213562f) - -/* === M E T H O D S ======================================================= */ - -float -Halftone::operator()(const Point &point, const float& luma, float supersample)const -{ - float halftone(mask(point)); - - if(supersample>=0.5f) - supersample=0.4999999999f; - - halftone=(halftone-0.5f)*(1.0f-supersample*2.0f)+0.5f; - - const float diff(halftone-luma); - - if(supersample) - { - const float amount(diff/(supersample*2.0f)+0.5f); - - if(amount<=0.0f+0.01f) - return 1.0f; - else if(amount>=1.0f-0.01f) - return 0.0f; - else - return 1.0f-amount; - } - else - { - if(diff>=0) - return 0.0f; - else - return 1.0f; - } - - return 0.0f; -} - -float -Halftone::mask(synfig::Point point)const -{ - float radius1; - float radius2; - - point-=origin; - - { - const float a(Angle::sin(-angle).get()), b(Angle::cos(-angle).get()); - const float u(point[0]),v(point[1]); - - point[0]=b*u-a*v; - point[1]=a*u+b*v; - } - - if(type==TYPE_STRIPE) - { - Point pnt(fmod(point[0],size[0]),fmod(point[1],size[1])); - while(pnt[0]<0)pnt[0]+=abs(size[0]); - while(pnt[1]<0)pnt[1]+=abs(size[1]); - - float x(pnt[1]/size[1]); - if(x>0.5)x=1.0-x; - x*=2; - return x; - } - - { - Point pnt(fmod(point[0],size[0]),fmod(point[1],size[1])); - while(pnt[0]<0)pnt[0]+=abs(size[0]); - while(pnt[1]<0)pnt[1]+=abs(size[1]); - pnt-=Vector(size[0]*0.5,size[1]*0.5); - pnt*=2.0; - pnt[0]/=size[0]; - pnt[1]/=size[1]; - - radius1=pnt.mag()/SQRT2; - radius1*=radius1; - } - if(type==TYPE_DARKONLIGHT || type== TYPE_LIGHTONDARK) - return radius1; - - { - Point pnt(fmod(point[0]+size[0]*0.5,size[0]),fmod(point[1]+size[0]*0.5,size[1])); - while(pnt[0]<0)pnt[0]+=abs(size[0]); - while(pnt[1]<0)pnt[1]+=abs(size[1]); - pnt-=Vector(size[0]*0.5,size[1]*0.5); - pnt*=2.0; - pnt[0]/=size[0]; - pnt[1]/=size[1]; - - radius2=pnt.mag()/SQRT2; - radius2*=radius2; - } - - if(type==TYPE_DIAMOND) - { - //return (radius1+(1.0f-radius2))*0.5; - float x((radius1+(1.0f-radius2))*0.5); - //float x(((radius2-radius1)*((radius1+(1.0f-radius2))*0.5)+radius1)*2.0f); - x-=0.5; - x*=2.0; - if(x<0)x=-sqrt(-x);else x=sqrt(x); - x*=1.01f; - x/=2.0; - x+=0.5; - return x; - } - - if(type==TYPE_SYMMETRIC) - { - float x(((radius2-radius1)*((radius1+(1.0f-radius2))*0.5)+radius1)*2.0f); - x-=0.5; - x*=2.0; - if(x<0)x=-sqrt(-x);else x=sqrt(x); - x*=1.01f; - x/=2.0; - x+=0.5; - return x; - } - return 0; -} diff --git a/synfig-core/trunk/src/modules/mod_filter/halftone.h b/synfig-core/trunk/src/modules/mod_filter/halftone.h deleted file mode 100644 index c75df2c..0000000 --- a/synfig-core/trunk/src/modules/mod_filter/halftone.h +++ /dev/null @@ -1,62 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file halftone.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_HALFTONE_H -#define __SYNFIG_HALFTONE_H - -/* === H E A D E R S ======================================================= */ - -#include -#include - -/* === M A C R O S ========================================================= */ - -#define TYPE_SYMMETRIC 0 -#define TYPE_DARKONLIGHT 1 -#define TYPE_LIGHTONDARK 2 -#define TYPE_DIAMOND 3 -#define TYPE_STRIPE 4 - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class Halftone -{ -public: - - int type; - synfig::Point origin; - synfig::Vector size; - synfig::Angle angle; - - float mask(synfig::Point point)const; - - float operator()(const synfig::Point &point, const float& intensity, float supersample=0)const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_filter/halftone2.cpp b/synfig-core/trunk/src/modules/mod_filter/halftone2.cpp deleted file mode 100644 index 177f6a0..0000000 --- a/synfig-core/trunk/src/modules/mod_filter/halftone2.cpp +++ /dev/null @@ -1,245 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file halftone2.cpp -** \brief Implementation of the "Halftone 2" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007-2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "halftone2.h" -#include "halftone.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Halftone2); -SYNFIG_LAYER_SET_NAME(Halftone2,"halftone2"); -SYNFIG_LAYER_SET_LOCAL_NAME(Halftone2,N_("Halftone 2")); -SYNFIG_LAYER_SET_CATEGORY(Halftone2,N_("Filters")); -SYNFIG_LAYER_SET_VERSION(Halftone2,"0.0"); -SYNFIG_LAYER_SET_CVS_ID(Halftone2,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -Halftone2::Halftone2(): - color_dark(Color::black()), - color_light(Color::white()) -{ - halftone.origin=(synfig::Point(0,0)); - halftone.size=(synfig::Vector(0.25,0.25)); - halftone.angle=(Angle::zero()); - halftone.type=TYPE_SYMMETRIC; - - set_blend_method(Color::BLEND_STRAIGHT); -} - -inline Color -Halftone2::color_func(const Point &point, float supersample,const Color& color)const -{ - const float amount(halftone(point,color.get_y(),supersample)); - Color halfcolor; - - if(amount<=0.0f) - halfcolor=color_dark; - else if(amount>=1.0f) - halfcolor=color_light; - else - halfcolor=Color::blend(color_light,color_dark,amount,Color::BLEND_STRAIGHT); - - halfcolor.set_a(color.get_a()); - - return halfcolor; -} - -inline float -Halftone2::calc_supersample(const synfig::Point &/*x*/, float pw,float /*ph*/)const -{ - return abs(pw/(halftone.size).mag()); -} - -synfig::Layer::Handle -Halftone2::hit_check(synfig::Context /*context*/, const synfig::Point &/*point*/)const -{ - return const_cast(this); -} - -bool -Halftone2::set_param(const String & param, const ValueBase &value) -{ - IMPORT(color_dark); - IMPORT(color_light); - - IMPORT_AS(halftone.size,"size"); - IMPORT_AS(halftone.type,"type"); - IMPORT_AS(halftone.angle,"angle"); - IMPORT_AS(halftone.origin,"origin"); - - IMPORT_AS(halftone.origin,"offset"); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -Halftone2::get_param(const String & param)const -{ - EXPORT_AS(halftone.size,"size"); - EXPORT_AS(halftone.type,"type"); - EXPORT_AS(halftone.angle,"angle"); - EXPORT_AS(halftone.origin,"origin"); - - EXPORT(color_dark); - EXPORT(color_light); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -Halftone2::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("origin") - .set_local_name(_("Mask Origin")) - .set_is_distance() - ); - ret.push_back(ParamDesc("angle") - .set_local_name(_("Mask Angle")) - .set_origin("origin") - ); - ret.push_back(ParamDesc("size") - .set_local_name(_("Mask Size")) - .set_is_distance() - .set_origin("origin") - ); - ret.push_back(ParamDesc("color_light") - .set_local_name(_("Light Color")) - ); - ret.push_back(ParamDesc("color_dark") - .set_local_name(_("Dark Color")) - ); - ret.push_back(ParamDesc("type") - .set_local_name(_("Type")) - .set_hint("enum") - .add_enum_value(TYPE_SYMMETRIC,"symmetric",_("Symmetric")) - .add_enum_value(TYPE_LIGHTONDARK,"lightondark",_("Light On Dark")) - //.add_enum_value(TYPE_DARKONLIGHT,"darkonlight",_("Dark on Light")) - .add_enum_value(TYPE_DIAMOND,"diamond",_("Diamond")) - .add_enum_value(TYPE_STRIPE,"stripe",_("Stripe")) - ); - - return ret; -} - -Color -Halftone2::get_color(Context context, const Point &point)const -{ - const Color undercolor(context.get_color(point)); - const Color color(color_func(point,0,undercolor)); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - return color; - else - return Color::blend(color,undercolor,get_amount(),get_blend_method()); -} - -bool -Halftone2::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - SuperCallback supercb(cb,0,9500,10000); - - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - return false; - if(get_amount()==0) - return true; - - const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); - const Point tl(renddesc.get_tl()); - const int w(surface->get_w()); - const int h(surface->get_h()); - const float supersample_size(abs(pw/(halftone.size).mag())); - - Surface::pen pen(surface->begin()); - Point pos; - int x,y; - - if(is_solid_color()) - { - for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) - return false; - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_filter/halftone2.h b/synfig-core/trunk/src/modules/mod_filter/halftone2.h deleted file mode 100644 index b799bb4..0000000 --- a/synfig-core/trunk/src/modules/mod_filter/halftone2.h +++ /dev/null @@ -1,74 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file halftone2.h -** \brief Header file for implementation of the "Halftone 2" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_HALFTONE2_H -#define __SYNFIG_HALFTONE2_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include -#include "halftone.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class Halftone2 : public synfig::Layer_Composite -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - Halftone halftone; - synfig::Color color_dark; - synfig::Color color_light; - - synfig::Color color_func(const synfig::Point &x, float supersample,const synfig::Color &under_color)const; - - float calc_supersample(const synfig::Point &x, float pw,float ph)const; - - //float halftone_func(synfig::Point x)const; - -public: - Halftone2(); - - virtual bool set_param(const synfig::String ¶m, const synfig::ValueBase &value); - virtual synfig::ValueBase get_param(const synfig::String ¶m)const; - virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; - virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - virtual Vocab get_param_vocab()const; - virtual bool reads_context()const { return true; } -}; // END of class Halftone2 - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_filter/halftone3.cpp b/synfig-core/trunk/src/modules/mod_filter/halftone3.cpp deleted file mode 100644 index a2a4283..0000000 --- a/synfig-core/trunk/src/modules/mod_filter/halftone3.cpp +++ /dev/null @@ -1,408 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file halftone3.cpp -** \brief Implementation of the "Halftone 3" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007-2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "halftone3.h" -#include "halftone.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Halftone3); -SYNFIG_LAYER_SET_NAME(Halftone3,"halftone3"); -SYNFIG_LAYER_SET_LOCAL_NAME(Halftone3,N_("Halftone 3")); -SYNFIG_LAYER_SET_CATEGORY(Halftone3,N_("Filters")); -SYNFIG_LAYER_SET_VERSION(Halftone3,"0.0"); -SYNFIG_LAYER_SET_CVS_ID(Halftone3,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -#define HALFSQRT2 (0.7) -#define SQRT2 (1.414213562f) - -/* === M E T H O D S ======================================================= */ - -Halftone3::Halftone3() -{ - size=(synfig::Vector(0.25,0.25)); - type=TYPE_SYMMETRIC; - - for(int i=0;i<3;i++) - { - tone[i].size=size; - tone[i].type=type; - tone[i].origin=(synfig::Point(0,0)); - tone[i].angle=Angle::deg(30.0)*(float)i; - } - - subtractive=true; - - if(subtractive) - { - color[0]=Color::cyan(); - color[1]=Color::magenta(); - color[2]=Color::yellow(); - } - else - { - color[0]=Color::red(); - color[1]=Color::green(); - color[2]=Color::blue(); - } - - set_blend_method(Color::BLEND_STRAIGHT); - - for(int i=0;i<3;i++) - for(int j=0;j<3;j++) - inverse_matrix[i][j]=(j==i)?1.0f:0.0f; - - sync(); -} - -void -Halftone3::sync() -{ - for(int i=0;i<3;i++) - { - tone[i].size=size; - tone[i].type=type; - } - -#define matrix inverse_matrix - //float matrix[3][3]; - - if(subtractive) - { - for(int i=0;i<3;i++) - { - matrix[i][0]=1.0f-(color[i].get_r()); - matrix[i][1]=1.0f-(color[i].get_g()); - matrix[i][2]=1.0f-(color[i].get_b()); - float mult=sqrt(matrix[i][0]*matrix[i][0]+matrix[i][1]*matrix[i][1]+matrix[i][2]*matrix[i][2]); - if(mult) - { - matrix[i][0]/=mult; - matrix[i][1]/=mult; - matrix[i][2]/=mult; - matrix[i][0]/=mult; - matrix[i][1]/=mult; - matrix[i][2]/=mult; - } - } - } - else - { - for(int i=0;i<3;i++) - { - matrix[i][0]=color[i].get_r(); - matrix[i][1]=color[i].get_g(); - matrix[i][2]=color[i].get_b(); - float mult=sqrt(matrix[i][0]*matrix[i][0]+matrix[i][1]*matrix[i][1]+matrix[i][2]*matrix[i][2]); - if(mult) - { - matrix[i][0]/=mult; - matrix[i][1]/=mult; - matrix[i][2]/=mult; - matrix[i][0]/=mult; - matrix[i][1]/=mult; - matrix[i][2]/=mult; - } - } - } -#undef matrix - - - -#if 0 - // Insert guass-jordan elimination code here - int k=0,i=0,j=0,z_size=3; -#define A inverse_matrix - - for (k=0;k(this); -} - -bool -Halftone3::set_param(const String & param, const ValueBase &value) -{ - IMPORT_PLUS(size, {tone[0].size=size; tone[1].size=size; tone[2].size=size;}); - IMPORT_PLUS(type, {tone[0].type=type; tone[1].type=type; tone[2].type=type;}); - - IMPORT_PLUS(color[0],sync()); - IMPORT_PLUS(color[1],sync()); - IMPORT_PLUS(color[2],sync()); - - IMPORT_PLUS(subtractive,sync()); - - IMPORT(tone[0].angle); - IMPORT(tone[0].origin); - - IMPORT(tone[1].angle); - IMPORT(tone[1].origin); - - IMPORT(tone[2].angle); - IMPORT(tone[2].origin); - - IMPORT_AS(tone[0].origin,"tone[0].offset"); - IMPORT_AS(tone[1].origin,"tone[1].offset"); - IMPORT_AS(tone[2].origin,"tone[2].offset"); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -Halftone3::get_param(const String & param)const -{ - EXPORT(size); - EXPORT(type); - - EXPORT(color[0]); - EXPORT(color[1]); - EXPORT(color[2]); - - EXPORT(subtractive); - - EXPORT(tone[0].angle); - EXPORT(tone[0].origin); - - EXPORT(tone[1].angle); - EXPORT(tone[1].origin); - - EXPORT(tone[2].angle); - EXPORT(tone[2].origin); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -Halftone3::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("size") - .set_local_name(_("Mask Size")) - ); - ret.push_back(ParamDesc("type") - .set_local_name(_(" Type")) - .set_hint("enum") - .add_enum_value(TYPE_SYMMETRIC,"symmetric",_("Symmetric")) - .add_enum_value(TYPE_LIGHTONDARK,"lightondark",_("Light On Dark")) - //.add_enum_value(TYPE_DARKONLIGHT,"darkonlight",_("Dark on Light")) - .add_enum_value(TYPE_DIAMOND,"diamond",_("Diamond")) - .add_enum_value(TYPE_STRIPE,"stripe",_("Stripe")) - ); - ret.push_back(ParamDesc("subtractive") - .set_local_name(_("Subtractive Flag")) - ); - - for(int i=0;i<3;i++) - { - String chan_name(strprintf("Chan%d",i)); - - ret.push_back(ParamDesc(strprintf("color[%d]",i)) - .set_local_name(chan_name+_(" Color")) - ); - - ret.push_back(ParamDesc(strprintf("tone[%d].origin",i)) - .set_local_name(chan_name+_(" Mask Origin")) - .set_is_distance() - ); - ret.push_back(ParamDesc(strprintf("tone[%d].angle",i)) - .set_local_name(chan_name+_(" Mask Angle")) - .set_origin(strprintf("tone[%d].origin",i)) - ); - } - - return ret; -} - -Color -Halftone3::get_color(Context context, const Point &point)const -{ - const Color undercolor(context.get_color(point)); - const Color color(color_func(point,0,undercolor)); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - return color; - else - return Color::blend(color,undercolor,get_amount(),get_blend_method()); -} - -bool -Halftone3::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - SuperCallback supercb(cb,0,9500,10000); - - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - return false; - if(get_amount()==0) - return true; - - const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); - const Point tl(renddesc.get_tl()); - const int w(surface->get_w()); - const int h(surface->get_h()); - const float supersample_size(abs(pw/(tone[0].size).mag())); - - Surface::pen pen(surface->begin()); - Point pos; - int x,y; - - if(is_solid_color()) - { - for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) - return false; - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_filter/halftone3.h b/synfig-core/trunk/src/modules/mod_filter/halftone3.h deleted file mode 100644 index 1045c37..0000000 --- a/synfig-core/trunk/src/modules/mod_filter/halftone3.h +++ /dev/null @@ -1,79 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file halftone3.h -** \brief Header file for implementation of the "Halftone 3" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_HALFTONE3_H -#define __SYNFIG_HALFTONE3_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include -#include "halftone.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class Halftone3 : public synfig::Layer_Composite -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - synfig::Vector size; - int type; - Halftone tone[3]; - synfig::Color color[3]; - float inverse_matrix[3][3]; - bool subtractive; - - synfig::Color color_func(const synfig::Point &x, float supersample,const synfig::Color &under_color)const; - - float calc_supersample(const synfig::Point &x, float pw,float ph)const; - - //float halftone_func(synfig::Point x)const; - - void sync(); - -public: - Halftone3(); - - virtual bool set_param(const synfig::String ¶m, const synfig::ValueBase &value); - virtual synfig::ValueBase get_param(const synfig::String ¶m)const; - virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; - virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - virtual Vocab get_param_vocab()const; - virtual bool reads_context()const { return true; } -}; // END of class Halftone3 - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_filter/lumakey.cpp b/synfig-core/trunk/src/modules/mod_filter/lumakey.cpp deleted file mode 100644 index 9b30808..0000000 --- a/synfig-core/trunk/src/modules/mod_filter/lumakey.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file lumakey.cpp -** \brief Implementation of the "Luma Key" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "lumakey.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(LumaKey); -SYNFIG_LAYER_SET_NAME(LumaKey,"lumakey"); -SYNFIG_LAYER_SET_LOCAL_NAME(LumaKey,N_("Luma Key")); -SYNFIG_LAYER_SET_CATEGORY(LumaKey,N_("Filters")); -SYNFIG_LAYER_SET_VERSION(LumaKey,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(LumaKey,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -LumaKey::LumaKey(): - Layer_Composite (1.0,Color::BLEND_STRAIGHT) -{ - set_blend_method(Color::BLEND_STRAIGHT); -} - - -bool -LumaKey::set_param(const String ¶m, const ValueBase &value) -{ - return Layer_Composite::set_param(param,value); -} - -ValueBase -LumaKey::get_param(const String ¶m)const -{ - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -LumaKey::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - -/* ret.push_back(ParamDesc("color") - .set_local_name(_("Color")) - .set_description(_("Color of checkers")) - ); - ret.push_back(ParamDesc("pos") - .set_local_name(_("Offset")) - ); - ret.push_back(ParamDesc("size") - .set_local_name(_("Size")) - .set_description(_("Size of checkers")) - .set_origin("pos") - ); -*/ - return ret; -} - -synfig::Layer::Handle -LumaKey::hit_check(synfig::Context context, const synfig::Point &getpos)const -{ - return context.hit_check(getpos); -} - -Color -LumaKey::get_color(Context context, const Point &getpos)const -{ - const Color color(context.get_color(getpos)); - - if(get_amount()==0.0) - return color; - - Color ret(color); - ret.set_a(ret.get_y()*ret.get_a()); - ret.set_y(1); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - return ret; - - return Color::blend(ret,color,get_amount(),get_blend_method()); -} - -bool -LumaKey::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - SuperCallback supercb(cb,0,9500,10000); - - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - return false; - - int x,y; - - Surface::pen pen(surface->begin()); - - for(y=0;yamount_complete(10000,10000)) - return false; - - return true; -} - -Rect -LumaKey::get_bounding_rect(Context context)const -{ - if(is_disabled()) - return Rect::zero(); - - return context.get_full_bounding_rect(); -} diff --git a/synfig-core/trunk/src/modules/mod_filter/lumakey.h b/synfig-core/trunk/src/modules/mod_filter/lumakey.h deleted file mode 100644 index cb008d5..0000000 --- a/synfig-core/trunk/src/modules/mod_filter/lumakey.h +++ /dev/null @@ -1,68 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file lumakey.h -** \brief Header file for implementation of the "Luma Key" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_LUMAKEY_H -#define __SYNFIG_LUMAKEY_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class LumaKey : public synfig::Layer_Composite, public synfig::Layer_NoDeform -{ - SYNFIG_LAYER_MODULE_EXT -private: - -public: - LumaKey(); - - virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); - - virtual synfig::ValueBase get_param(const synfig::String & param)const; - - virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; - - virtual Vocab get_param_vocab()const; - - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - virtual synfig::Rect get_bounding_rect(synfig::Context context)const; - - virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; - virtual bool reads_context()const { return true; } -}; // END of class LumaKey - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_filter/main.cpp b/synfig-core/trunk/src/modules/mod_filter/main.cpp deleted file mode 100644 index 01feb7f..0000000 --- a/synfig-core/trunk/src/modules/mod_filter/main.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_filter/main.cpp -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include - -#include "blur.h" -#include "colorcorrect.h" -#include "halftone2.h" -#include "halftone3.h" -#include "lumakey.h" -#include "radialblur.h" - -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(libmod_filter) - MODULE_NAME("Filters") - MODULE_DESCRIPTION("Writeme") - MODULE_AUTHOR("Robert B. Quattlebaum") - MODULE_VERSION("1.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(libmod_filter) - BEGIN_LAYERS - LAYER(Blur_Layer) - LAYER(Halftone2) - LAYER(Halftone3) - LAYER(LumaKey) - LAYER(RadialBlur) - LAYER(Layer_ColorCorrect) - END_LAYERS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mod_filter/mod_filter.nsh b/synfig-core/trunk/src/modules/mod_filter/mod_filter.nsh deleted file mode 100644 index 1ccb3cc..0000000 --- a/synfig-core/trunk/src/modules/mod_filter/mod_filter.nsh +++ /dev/null @@ -1,21 +0,0 @@ -; The stuff to install -Section "mod_filter" Sec_mod_filter - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=mod_filter.dll "src\modules\mod_filter\.libs\libmod_filter.dll" - - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "mod_filter" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_filter/radialblur.cpp b/synfig-core/trunk/src/modules/mod_filter/radialblur.cpp deleted file mode 100644 index 6ecc5bb..0000000 --- a/synfig-core/trunk/src/modules/mod_filter/radialblur.cpp +++ /dev/null @@ -1,321 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file radialblur.cpp -** \brief Implementation of the "Radial Blur" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "radialblur.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(RadialBlur); -SYNFIG_LAYER_SET_NAME(RadialBlur,"radial_blur"); -SYNFIG_LAYER_SET_LOCAL_NAME(RadialBlur,N_("Radial Blur")); -SYNFIG_LAYER_SET_CATEGORY(RadialBlur,N_("Blurs")); -SYNFIG_LAYER_SET_VERSION(RadialBlur,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(RadialBlur,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -RadialBlur::RadialBlur(): - origin (0,0), - size (0.2), - fade_out(false) -{ -} - -RadialBlur::~RadialBlur() -{ -} - -bool -RadialBlur::set_param(const String & param, const ValueBase &value) -{ - IMPORT(origin); - IMPORT(size); - IMPORT(fade_out); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -RadialBlur::get_param(const String ¶m)const -{ - EXPORT(origin); - EXPORT(size); - EXPORT(fade_out); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -RadialBlur::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("origin") - .set_local_name(_("Origin")) - .set_description(_("Point where you want the origin to be")) - ); - - ret.push_back(ParamDesc("size") - .set_local_name(_("Size")) - .set_description(_("Size of blur")) - .set_origin("origin") - ); - - ret.push_back(ParamDesc("fade_out") - .set_local_name(_("Fade Out")) - ); - - return ret; -} - -Color -RadialBlur::get_color(Context context, const Point &p)const -{ - //! \writeme - return context.get_color(p); -} - -bool -RadialBlur::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - // don't do anything at quality 10 - if (quality == 10) - return context.accelerated_render(surface,quality,renddesc,cb); - - if(cb && !cb->amount_complete(0,10000)) - return false; - - Surface tmp_surface; - const Point tl(renddesc.get_tl()), br(renddesc.get_br()); - const int w(renddesc.get_w()), h(renddesc.get_h()); - const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); - - Rect rect(tl, br); - Point pos; - - // find how far towards the origin of the blur we are going to - // wander for each of the 4 corners of our tile, expanding the - // render description for each of them if necessary - int x, y; - for(y=0,pos[1]=tl[1];yset_wh(w, h); - Surface::pen pen(surface->get_pen(0, 0)); - tmp_surface.blit_to(pen, - int((tl[0] - tmp_surface_tl[0])/pw + 0.5), - int((tl[1] - tmp_surface_tl[1])/ph + 0.5), - w, h); - - Surface::alpha_pen apen(surface->begin()); - - apen.set_alpha(get_amount()); - apen.set_blend_method(get_blend_method()); - -/* - int steps(5); - - if(quality>=9)steps=20; - else if(quality>=5)steps=30; - else if(quality>=4)steps=60; - else if(quality>=3)steps=100; - else steps=120; -*/ - - Surface::value_prep_type cooker; - - // loop through the pixels - for(y=0,pos[1]=tl[1];y 0) ? 1 : -1; - dy = abs(y1 - y0); - sy = ((y1 - y0) > 0) ? 1 : -1; - if (dy > dx) - { - steep = 0; - swap(x0, y0); - swap(dx, dy); - swap(sx, sy); - swap(w,h); - } - e = (dy << 1) - dx; - for (i = 0; i < dx; i++) - { - if(y0>=0 && x0>=0 && y0= %d or %d >= %d?\n", __FILE__, __LINE__, x0, w, y0, h); - - while (e >= 0) - { - y0 += sy; - e -= (dx << 1); - } - x0 += sx; - e += (dy << 1); - } - if(poolsize) - { - pool/=poolsize; - apen.put_value(cooker.uncook(pool)); - } -/* - Point begin,end; - begin=pos; - end=(pos-origin)*(1.0f-size)+origin; - - Color pool(Color::alpha()); - float f,poolsize(0); - int i; - int steps(steps*size); - for(f=0,i=0;iamount_complete(10000,10000)) return false; - -// #define DRAW_TILE_OUTLINES -#ifdef DRAW_TILE_OUTLINES - // draw red lines to show tiles - { - int x, y; - if (w != 0 && h != 0) { - Surface::alpha_pen apen(surface->begin()); - apen.set_alpha(get_amount()); - apen.set_blend_method(get_blend_method()); - apen.set_value(Color(1, 0, 0, .1)); - for (x = 0; x < w; x++) { apen.put_value(); apen.inc_x(); } apen.dec_x(w); - for (y = 0; y < h; y++) { apen.put_value(); apen.inc_y(); } apen.dec_y(h); - } - } -#endif // DRAW_TILE_OUTLINES - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_filter/radialblur.h b/synfig-core/trunk/src/modules/mod_filter/radialblur.h deleted file mode 100644 index 197eb2f..0000000 --- a/synfig-core/trunk/src/modules/mod_filter/radialblur.h +++ /dev/null @@ -1,70 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file radialblur.h -** \brief Header file for implementation of the "Radial Blur" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_RADIALBLUR_H -#define __SYNFIG_RADIALBLUR_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -class RadialBlur : public Layer_Composite -{ - SYNFIG_LAYER_MODULE_EXT - friend class RadialBlur_Trans; -private: - Vector origin; - Real size; - bool fade_out; - -public: - RadialBlur(); - ~RadialBlur(); - - virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); - virtual ValueBase get_param(const synfig::String & param)const; - virtual Color get_color(Context context, const Point &pos)const; - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - virtual Vocab get_param_vocab()const; - virtual bool reads_context()const { return true; } -}; // END of class RadialBlur - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_filter/unmod_filter.nsh b/synfig-core/trunk/src/modules/mod_filter/unmod_filter.nsh deleted file mode 100644 index 3fcce9b..0000000 --- a/synfig-core/trunk/src/modules/mod_filter/unmod_filter.nsh +++ /dev/null @@ -1,8 +0,0 @@ -Section "un.mod_filter" - Delete "$INSTDIR\lib\synfig\modules\mod_filter.dll" - RMDir "$INSTDIR\lib\synfig\modules" - RMDir "$INSTDIR\lib\synfig" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_geometry/Makefile.am b/synfig-core/trunk/src/modules/mod_geometry/Makefile.am deleted file mode 100644 index 335bb1c..0000000 --- a/synfig-core/trunk/src/modules/mod_geometry/Makefile.am +++ /dev/null @@ -1,51 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - -# GCC on MacOS X does not take kindly to the -ffastmath optimization -# in this module for some reason. -AM_CXXFLAGS = \ - `echo @CXXFLAGS@ | sed s/-ffast-math//g` - - -moduledir = @MODULE_DIR@ - -module_LTLIBRARIES = \ - libmod_geometry.la - -libmod_geometry_la_SOURCES = \ - rectangle.cpp \ - rectangle.h \ - star.h \ - star.cpp \ - checkerboard.cpp \ - checkerboard.h \ - circle.cpp \ - circle.h \ - region.h \ - region.cpp \ - outline.h \ - outline.cpp \ - main.cpp - -libmod_geometry_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ - -libmod_geometry_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @SYNFIG_LIBS@ - -libmod_geometry_la_LDFLAGS = \ - -module \ - -no-undefined \ - -avoid-version - - -EXTRA_DIST = \ - mod_geometry.nsh \ - unmod_geometry.nsh diff --git a/synfig-core/trunk/src/modules/mod_geometry/checkerboard.cpp b/synfig-core/trunk/src/modules/mod_geometry/checkerboard.cpp deleted file mode 100644 index 30bbf8e..0000000 --- a/synfig-core/trunk/src/modules/mod_geometry/checkerboard.cpp +++ /dev/null @@ -1,200 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file checkerboard.cpp -** \brief Implementation of the "Checkerboard" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "checkerboard.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(CheckerBoard); -SYNFIG_LAYER_SET_NAME(CheckerBoard,"checker_board"); -SYNFIG_LAYER_SET_LOCAL_NAME(CheckerBoard,N_("Checkerboard")); -SYNFIG_LAYER_SET_CATEGORY(CheckerBoard,N_("Geometry")); -SYNFIG_LAYER_SET_VERSION(CheckerBoard,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(CheckerBoard,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -CheckerBoard::CheckerBoard(): - Layer_Composite (1.0,Color::BLEND_STRAIGHT), - color (Color::black()), - origin (Point(0.125,0.125)), - size (Point(0.25,0.25)) -{ - - set_blend_method(Color::BLEND_STRAIGHT); -} - -inline bool -CheckerBoard::point_test(const synfig::Point& getpos)const -{ - int val=((int)((getpos[0]-origin[0])/size[0])+(int)((getpos[1]-origin[1])/size[1])); - if(getpos[0]-origin[0] < 0.0) - val++; - if(getpos[1]-origin[1] < 0.0) - val++; - return val&1; -} - -bool -CheckerBoard::set_param(const String ¶m, const ValueBase &value) -{ - IMPORT_PLUS(color, { if (color.get_a() == 0) { if (converted_blend_) { - set_blend_method(Color::BLEND_ALPHA_OVER); - color.set_a(1); } else transparent_color_ = true; } }); - IMPORT(origin); - IMPORT(size); - - IMPORT_AS(origin,"pos"); - IMPORT_AS(origin[0],"pos[0]"); - IMPORT_AS(origin[1],"pos[1]"); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -CheckerBoard::get_param(const String ¶m)const -{ - EXPORT(color); - EXPORT(origin); - EXPORT(size); - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -CheckerBoard::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("color") - .set_local_name(_("Color")) - .set_description(_("Color of checkers")) - ); - ret.push_back(ParamDesc("origin") - .set_local_name(_("Origin")) - ); - ret.push_back(ParamDesc("size") - .set_local_name(_("Size")) - .set_description(_("Size of checkers")) - .set_origin("origin") - ); - - return ret; -} - -synfig::Layer::Handle -CheckerBoard::hit_check(synfig::Context context, const synfig::Point &getpos)const -{ - if(get_amount()!=0.0 && point_test(getpos)) - { - synfig::Layer::Handle tmp; - if(get_blend_method()==Color::BLEND_BEHIND && (tmp=context.hit_check(getpos))) - return tmp; - if(Color::is_onto(get_blend_method()) && !(tmp=context.hit_check(getpos))) - return 0; - return const_cast(this); - } - else - return context.hit_check(getpos); -} - -Color -CheckerBoard::get_color(Context context, const Point &getpos)const -{ - if(get_amount()!=0.0 && point_test(getpos)) - { - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - return color; - else - return Color::blend(color,context.get_color(getpos),get_amount(),get_blend_method()); - } - else - return Color::blend(Color::alpha(),context.get_color(getpos),get_amount(),get_blend_method()); -} - -bool -CheckerBoard::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - SuperCallback supercb(cb,0,9500,10000); - - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - return false; - if(get_amount()==0) - return true; - - int x,y; - - const Point tl(renddesc.get_tl()); - Point pos; - const int w(surface->get_w()); - const int h(surface->get_h()); - const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); - - Surface::alpha_pen apen(surface->begin()); - - apen.set_alpha(get_amount()); - apen.set_blend_method(get_blend_method()); - apen.set_value(color); - - for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) - return false; - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_geometry/checkerboard.h b/synfig-core/trunk/src/modules/mod_geometry/checkerboard.h deleted file mode 100644 index f30bda7..0000000 --- a/synfig-core/trunk/src/modules/mod_geometry/checkerboard.h +++ /dev/null @@ -1,71 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file checkerboard.h -** \brief Header file for implementation of the "Checkerboard" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_CHECKERBOARD_H -#define __SYNFIG_CHECKERBOARD_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class CheckerBoard : public synfig::Layer_Composite, public synfig::Layer_NoDeform -{ - SYNFIG_LAYER_MODULE_EXT -private: - synfig::Color color; - synfig::Point origin; - synfig::Point size; - - bool point_test(const synfig::Point& x)const; - -public: - CheckerBoard(); - - virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); - - virtual synfig::ValueBase get_param(const synfig::String & param)const; - - virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; - - virtual Vocab get_param_vocab()const; - - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - - virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_geometry/circle.cpp b/synfig-core/trunk/src/modules/mod_geometry/circle.cpp deleted file mode 100644 index f5ad99b..0000000 --- a/synfig-core/trunk/src/modules/mod_geometry/circle.cpp +++ /dev/null @@ -1,783 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file circle.cpp -** \brief Implementation of the "Circle" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "circle.h" -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#endif - -using namespace synfig; -using namespace std; -using namespace etl; - -/* -- G L O B A L S --------------------------------------------------------- */ - -SYNFIG_LAYER_INIT(Circle); -SYNFIG_LAYER_SET_NAME(Circle,"circle"); -SYNFIG_LAYER_SET_LOCAL_NAME(Circle,N_("Circle")); -SYNFIG_LAYER_SET_CATEGORY(Circle,N_("Geometry")); -SYNFIG_LAYER_SET_VERSION(Circle,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Circle,"$Id$"); - -/* -- F U N C T I O N S ----------------------------------------------------- */ - -Circle::Circle(): - Layer_Composite (1.0,Color::BLEND_STRAIGHT), - color (Color::black()), - origin (0,0), - radius (1), - feather (0), - invert (false), - falloff (FALLOFF_INTERPOLATION_LINEAR) -{ - constructcache(); -} - -bool -Circle::ImportParameters(const String ¶m, const ValueBase &value) -{ - IMPORT_PLUS(color, { if (color.get_a() == 0) { if (converted_blend_) { - set_blend_method(Color::BLEND_ALPHA_OVER); - color.set_a(1); } else transparent_color_ = true; } }); - IMPORT(radius); - IMPORT_PLUS(feather, if(feather<0)feather=0;); - IMPORT(invert); - IMPORT(origin); - IMPORT(falloff); - - IMPORT_AS(origin,"pos"); - - return Layer_Composite::set_param(param,value); -} - -bool -Circle::set_param(const String ¶m, const ValueBase &value) -{ - if(ImportParameters(param,value)) - { - constructcache(); - return true; - } - - return false; -} - -ValueBase -Circle::get_param(const String ¶m)const -{ - EXPORT(color); - EXPORT(radius); - EXPORT(feather); - EXPORT(invert); - EXPORT(origin); - EXPORT(falloff); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -Circle::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("color") - .set_local_name(_("Color")) - ); - ret.push_back(ParamDesc("radius") - .set_local_name(_("Radius")) - .set_origin("origin") - .set_is_distance() - ); - ret.push_back(ParamDesc("feather") - .set_local_name(_("Feather")) - .set_is_distance() - ); - ret.push_back(ParamDesc("origin") - .set_local_name(_("Origin")) - ); - ret.push_back(ParamDesc("invert") - .set_local_name(_("Invert")) - .set_description(_("Invert the circle")) - ); - - ret.push_back(ParamDesc("falloff") - .set_local_name(_("Falloff")) - .set_description(_("Determines the falloff function for the feather")) - .set_hint("enum") - .add_enum_value(FALLOFF_INTERPOLATION_LINEAR,"linear",_("Linear")) - .add_enum_value(FALLOFF_SQUARED,"squared",_("Squared")) - .add_enum_value(FALLOFF_SQRT,"sqrt",_("Square Root")) - .add_enum_value(FALLOFF_SIGMOND,"sigmond",_("Sigmond")) - .add_enum_value(FALLOFF_COSINE,"cosine",_("Cosine")) - ); - - return ret; -} - -synfig::Layer::Handle -Circle::hit_check(synfig::Context context, const synfig::Point &point)const -{ - Point temp=origin-point; - - if(get_amount()==0) - return context.hit_check(point); - - bool in_circle(temp.mag_squared() <= radius*radius); - - if(invert) - { - in_circle=!in_circle; - if(in_circle && get_amount()-(feather/radius)<=0.1 && get_blend_method()!=Color::BLEND_STRAIGHT) - in_circle=false; - } - else - { - if(get_amount()-(feather/radius)<=0.0) - in_circle=false; - } - - if(in_circle) - { - synfig::Layer::Handle tmp; - if(get_blend_method()==Color::BLEND_BEHIND && (tmp=context.hit_check(point))) - return tmp; - if(Color::is_onto(get_blend_method()) && !(tmp=context.hit_check(point))) - return 0; - return const_cast(this); - } - - return context.hit_check(point); -} - -//falloff functions -Real Circle::SqdFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) -{ - //squared proportional falloff - return (c.outer_radius_sqd - mag_sqd) / c.diff_sqd; -} - -Real Circle::InvSqdFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) -{ - //squared proportional falloff - return 1.0 - (c.outer_radius_sqd - mag_sqd) / c.diff_sqd; -} - - -Real Circle::SqrtFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) -{ - //linear distance falloff - Real ret = ( c.outer_radius - sqrt(mag_sqd) ) / c.double_feather; - //then take the square root of it - ret = sqrt(ret); - return ret; -} - -Real Circle::InvSqrtFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) -{ - //linear distance falloff - Real ret = ( c.outer_radius - sqrt(mag_sqd) ) / c.double_feather; - //then take the square root of it - ret = 1.0 - sqrt(ret); - return ret; -} - -Real Circle::LinearFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) -{ - //linear distance falloff - return ( c.outer_radius - sqrt(mag_sqd) ) / c.double_feather; -} - -Real Circle::InvLinearFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) -{ - return 1.0 - ( c.outer_radius - sqrt(mag_sqd) ) / c.double_feather; - //linear distance falloff -} - -Real Circle::SigmondFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) -{ - //linear distance falloff - Real ret = ( c.outer_radius - sqrt(mag_sqd) ) / c.double_feather; - // inverse exponential of the linear falloff (asymptotes at 0 and 1) - // \frac{1.0}{ 1 + e^{- \( a*10-5 \)}} - ret = 1.0 / (1 + exp(-(ret*10-5)) ); - return ret; -} - -Real Circle::InvSigmondFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) -{ - //linear distance falloff - Real ret = ( c.outer_radius - sqrt(mag_sqd) ) / c.double_feather; - // inverse exponential of the linear falloff (asymptotes at 0 and 1) - // \frac{1.0}{ 1 + e^{- \( a*10-5 \)}} - ret = 1.0 - 1.0 / (1 + exp(-(ret*10-5)) ); - return ret; -} - - -Real -Circle::CosineFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) -{ - //Cosine distance falloff - return (1.0f-cos((( c.outer_radius - sqrt(mag_sqd) ) / c.double_feather)*3.1415927))*0.5f; -} - -Real -Circle::InvCosineFalloff(const Circle::CircleDataCache &c, const Real &mag_sqd) -{ - return 1.0f-(1.0f-cos((( c.outer_radius - sqrt(mag_sqd) ) / c.double_feather)*3.1415927))*0.5f; - //Cosine distance falloff -} - -void Circle::constructcache() -{ - cache.inner_radius = radius - feather; - if(cache.inner_radius < 0) - cache.inner_radius = 0; - - cache.outer_radius = radius + feather; - - cache.inner_radius_sqd = cache.inner_radius > 0 ? (radius-feather)*(radius-feather) : 0; - cache.outer_radius_sqd = (radius+feather)*(radius+feather); - - cache.diff_sqd = feather*feather*4.0; - cache.double_feather = feather*2.0; - - falloff_func = GetFalloffFunc(); -} - -Circle::FALLOFF_FUNC *Circle::GetFalloffFunc()const -{ - switch(falloff) - { - case FALLOFF_SQUARED: return invert?InvSqdFalloff:SqdFalloff; - - case FALLOFF_SQRT: return invert?InvSqrtFalloff:SqrtFalloff; - - case FALLOFF_INTERPOLATION_LINEAR: return invert?InvLinearFalloff:LinearFalloff; - - case FALLOFF_SIGMOND: return invert?InvSigmondFalloff:SigmondFalloff; - - case FALLOFF_COSINE: - default: return invert?InvCosineFalloff:CosineFalloff; - } -} - -Color -Circle::get_color(Context context, const Point &point)const -{ - if(is_disabled() || (radius==0 && invert==false && !feather)) - return context.get_color(point); - - - Point temp=origin-point; - - /*const Real inner_radius = radius-feather; - const Real outer_radius = radius+feather; - - const Real inner_radius_sqd = inner_radius > 0 ? (radius-feather)*(radius-feather) : 0; - const Real outer_radius_sqd = (radius+feather)*(radius+feather); - - const Real diff_radii_sqd = outer_radius_sqd - inner_radius_sqd; - const Real double_feather = feather*2.0;*/ - - /*const Real &inner_radius = cache.inner_radius; - const Real &outer_radius = cache.outer_radius;*/ - - const Real &inner_radius_sqd = cache.inner_radius_sqd; - const Real &outer_radius_sqd = cache.outer_radius_sqd; - - /*const Real &diff_radii_sqd = cache.diff_radii_sqd; - const Real &double_feather = cache.double_feather;*/ - - const Vector::value_type mag_squared = temp.mag_squared(); - - //Outside the circle, with feathering enabled - if( mag_squared > outer_radius_sqd ) - { - // inverted -> outside == colored in - if(invert) - { - if(get_amount() == 1 && get_blend_method() == Color::BLEND_STRAIGHT) - return color; - else - return Color::blend(color,context.get_color(point),get_amount(),get_blend_method()); - } - else - return Color::blend(Color::alpha(),context.get_color(point),get_amount(),get_blend_method()); - } - - //inside the circle's solid area (with feathering) - else if(mag_squared <= inner_radius_sqd) - { - // !invert -> solid area - if(!invert) - if(get_amount() == 1 && get_blend_method() == Color::BLEND_STRAIGHT) - return color; - else - return Color::blend(color,context.get_color(point),get_amount(),get_blend_method()); - else - return Color::blend(Color::alpha(),context.get_color(point),get_amount(),get_blend_method()); - } - - //If we get here, the pixel is within the feathering area, and is thus subject to falloff - else - { - Color::value_type alpha; - - /*switch(falloff) - { - - case FALLOFF_SQUARED: - //squared proportional falloff - alpha = (outer_radius_sqd - mag_squared) / diff_radii_sqd; - break; - - case FALLOFF_SQRT: - //linear distance falloff - alpha = ( outer_radius - sqrt(mag_squared) ) / double_feather; - //then take the square root of it - alpha = sqrt(alpha); - break; - - case FALLOFF_INTERPOLATION_LINEAR: - //linear distance falloff - alpha = ( outer_radius - sqrt(mag_squared) ) / double_feather; - break; - - case FALLOFF_SIGMOND: - default: - //linear distance falloff - alpha = ( outer_radius - sqrt(mag_squared) ) / double_feather; - // inverse exponential of the linear falloff (asymptotes at 0 and 1) - // \frac{1.0}{ 1 + e^{- \( a*10-5 \)}} - alpha = 1.0 / (1 + exp(-(alpha*10-5)) ); - break; - } - - //If we're inverted, we need to invert the falloff value - if(invert) - alpha=1.0-alpha;*/ - - alpha = falloff_func(cache,mag_squared); - - return Color::blend(color*alpha,context.get_color(point),get_amount(),get_blend_method()); - } -} - -Color NormalBlend(Color a, Color b, float amount) -{ - return (b-a)*amount+a; -} - - -bool -Circle::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - // trivial case - if(is_disabled() || (radius==0 && invert==false && !feather)) - return context.accelerated_render(surface,quality, renddesc, cb); - - // Another trivial case - if(invert && radius==0 && is_solid_color()) - { - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - surface->fill(color); - if(cb && !cb->amount_complete(10000,10000)) - return false; - return true; - } - - // Window Boundaries - const Point tl(renddesc.get_tl()); - const Point br(renddesc.get_br()); - const int w(renddesc.get_w()); - const int h(renddesc.get_h()); - - const Real x_neg = tl[0] > br[0] ? -1 : 1; - const Real y_neg = tl[1] > br[1] ? -1 : 1; - - // Width and Height of a pixel - const Real pw = (br[0] - tl[0]) / w; - const Real ph = (br[1] - tl[1]) / h; - - // Increasing the feather amount by the size of - // a pixel will create an anti-aliased appearance - // don't render feathering at all when quality is 10 - const Real newfeather = (quality == 10) ? 0 : feather + (abs(ph)+abs(pw))/4.0; - - //int u,v; - int left = (int) floor( (origin[0] - x_neg*(radius+newfeather) - tl[0]) / pw ); - int right = (int) ceil( (origin[0] + x_neg*(radius+newfeather) - tl[0]) / pw ); - int top = (int) floor( (origin[1] - y_neg*(radius+newfeather) - tl[1]) / ph ); - int bottom = (int) ceil( (origin[1] + y_neg*(radius+newfeather) - tl[1]) / ph ); - - //clip the rectangle bounds - if(left < 0) - left = 0; - if(top < 0) - top = 0; - if(right >= w) - right = w-1; - if(bottom >= h) - bottom = h-1; - - const Real inner_radius = radius-newfeather>0 ? radius-newfeather : 0; - const Real outer_radius = radius+newfeather; - - const Real inner_radius_sqd = inner_radius*inner_radius; - const Real outer_radius_sqd = outer_radius*outer_radius; - - const Real diff_radii_sqd = 4*newfeather*std::max(newfeather,radius);//4.0*radius*newfeather; - const Real double_feather = newfeather * 2.0; - - //Compile the temporary cache for the falloff calculations - FALLOFF_FUNC *func = GetFalloffFunc(); - - const CircleDataCache cache = - { - inner_radius,outer_radius, - inner_radius_sqd,outer_radius_sqd, - diff_radii_sqd,double_feather - }; - - //info("Circle: Initialized everything"); - - //let the rendering begin - SuperCallback supercb(cb,0,9000,10000); - - //if it's a degenerate circle, do what we need to do, and then leave - if(left >= right || top >= bottom) - { - if(invert) - { - if(get_amount() == 1 && get_blend_method() == Color::BLEND_STRAIGHT) - { - surface->set_wh(w,h); - surface->fill(color); - return true; - }else - { - // Render what is behind us - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - { - if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); - return false; - } - - Surface::alpha_pen p(surface->begin(),get_amount(),_BlendFunc(get_blend_method())); - - p.set_value(color); - p.put_block(h,w); - return true; - } - }else - { - // Render what is behind us - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - { - if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); - return false; - } - return true; - } - } - - if( (origin[0] - tl[0])*(origin[0] - tl[0]) + (origin[1] - tl[1])*(origin[1] - tl[1]) < inner_radius_sqd - && (origin[0] - br[0])*(origin[0] - br[0]) + (origin[1] - br[1])*(origin[1] - br[1]) < inner_radius_sqd - && (origin[0] - tl[0])*(origin[0] - tl[0]) + (origin[1] - br[1])*(origin[1] - br[1]) < inner_radius_sqd - && (origin[0] - br[0])*(origin[0] - br[0]) + (origin[1] - tl[1])*(origin[1] - tl[1]) < inner_radius_sqd ) - { - if(invert) - { - // Render what is behind us - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - { - if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); - return false; - } - }else - { - if(get_amount() == 1 && get_blend_method() == Color::BLEND_STRAIGHT) - { - surface->set_wh(w,h); - surface->fill(color); - return true; - } - } - } - - //info("Circle: Non degenerate, rasterize %c", invert); - - //we start in the middle of the left-top pixel - Real leftf = (left + 0.5)*pw + tl[0]; - Real topf = (top + 0.5)*ph + tl[1]; - - //the looping variables - Real x,y; - int i,j; - - //Loop normally, since we are not inverted - if(!invert) - { - // Render what is behind us - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - { - if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); - return false; - } - - //make topf and leftf relative to the center of the circle - leftf -= origin[0]; - topf -= origin[1]; - - j = top; - y = topf; - - //Loop over the valid y-values in the bounding square - for(;j <= bottom; j++, y += ph) - { - i = left; - x = leftf; - - //for each y-value, Loop over the bounding x-values in the bounding square - for(;i <= right; i++, x += pw) - { - //for each pixel, figure out the distance and blend - Real r = x*x + y*y; - - //if in the inner circle then the full color shows through - if(r <= inner_radius_sqd) - { - if(get_amount() == 1 && get_blend_method() == Color::BLEND_STRAIGHT) - (*surface)[j][i]=color; - else - (*surface)[j][i]=Color::blend(color,(*surface)[j][i],get_amount(),get_blend_method()); - } - //if it's within the outer circle then it's in the feathering range - else if(r <= outer_radius_sqd) - { - /*float myamount; - - switch(falloff) - { - case FALLOFF_SQUARED: - myamount = (outer_radius_sqd - r) / diff_radii_sqd; - break; - - case FALLOFF_SQRT: - myamount = (outer_radius - sqrt(r)) / double_feather; - myamount = sqrt(myamount); - break; - - case FALLOFF_INTERPOLATION_LINEAR: - myamount = (outer_radius - sqrt(r)) / double_feather; - break; - - case FALLOFF_SIGMOND: - default: - myamount = (outer_radius - sqrt(r)) / double_feather; - myamount = 1.0 / ( 1 + exp(-(myamount*10 - 5)) ); - break; - }*/ - - Real myamount = func(cache,r); - - //if(myamount<0.0)myamount=0.0; - //if(myamount>1.0)myamount=1.0; - myamount *= get_amount(); - (*surface)[j][i] = Color::blend(color,(*surface)[j][i],myamount,get_blend_method()); - } - } - } - } - else - { - Surface background; - RendDesc desc(renddesc); - desc.set_flags(0); - - int offset_x=0,offset_y=0; - - //fill the surface with the background color initially - surface->set_wh(w,h); - surface->fill(color); - - //then render the background to an alternate surface - if(get_amount() == 1 && get_blend_method() == Color::BLEND_STRAIGHT) - { - offset_x = left; - offset_y = top; - - //if there is no background showing through we are done - if(right < left || bottom < top) - return true; - - desc.set_subwindow(left,top,right-left+1,bottom-top+1); - - // Render what is behind us - if(!context.accelerated_render(&background,quality,desc,&supercb)) - { - if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); - return false; - } - } - else - { - left = 0; - right = w-1; - top = 0; - bottom = h-1; - - leftf = /*0.5*pw +*/ tl[0]; - topf = /*0.5*ph +*/ tl[1]; - - // Render what is behind us - if(!context.accelerated_render(&background,quality,renddesc,&supercb)) - { - if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); - return false; - } - } - - topf -= origin[1]; - leftf-= origin[0]; - - j = top; - y = topf; - - for(;j <= bottom; j++, y+=ph) - { - i = left; - x = leftf; - - for(;i <= right; i++, x+=pw) - { - Vector::value_type r = x*x + y*y; - - if(r < inner_radius_sqd) - { - (*surface)[j][i] = background[j-offset_y][i-offset_x]; - } - else if(r < outer_radius_sqd) - { - /*float amount; - - switch(falloff) - { - case FALLOFF_SQUARED: - amount = (r - inner_radius_sqd) / diff_radii_sqd; - break; - case FALLOFF_INTERPOLATION_LINEAR: - amount = (sqrt(r) - inner_radius) / double_feather; - break; - case FALLOFF_SQRT: - amount = (outer_radius - sqrt(r)) / double_feather; - amount = 1.0 - sqrt(amount); - break; - case FALLOFF_SIGMOND: - default: - amount = (outer_radius - sqrt(r)) / double_feather; - amount = 1.0 - ( 1.0/( 1 + exp(-(amount*10-5)) ) ); - break; - }*/ - - Real amount = func(cache,r); - - if(amount<0.0)amount=0.0; - if(amount>1.0)amount=1.0; - - amount*=get_amount(); - - (*surface)[j][i]=Color::blend(color,background[j-offset_y][i-offset_x],amount,get_blend_method()); - }else if(get_amount() != 1 || get_blend_method() != Color::BLEND_STRAIGHT) - { - (*surface)[j][i]=Color::blend(color,background[j][i],get_amount(),get_blend_method()); - } - } - } - } - - // Mark our progress as finished - if(cb && !cb->amount_complete(10000,10000)) - return false; - - return true; -} - -Rect -Circle::get_bounding_rect()const -{ - if(invert) - return Rect::full_plane(); - - Rect bounds( - origin[0]+(radius+feather), - origin[1]+(radius+feather), - origin[0]-(radius+feather), - origin[1]-(radius+feather) - ); - - return bounds; -} - -Rect -Circle::get_full_bounding_rect(Context context)const -{ - if(invert) - { - if(is_solid_color() && color.get_a()==0) - { - Rect bounds( - origin[0]+(radius+feather), - origin[1]+(radius+feather), - origin[0]-(radius+feather), - origin[1]-(radius+feather) - ); - return bounds & context.get_full_bounding_rect(); - } - return Rect::full_plane(); - } - - return Layer_Composite::get_full_bounding_rect(context); -} diff --git a/synfig-core/trunk/src/modules/mod_geometry/circle.h b/synfig-core/trunk/src/modules/mod_geometry/circle.h deleted file mode 100644 index f7cd379..0000000 --- a/synfig-core/trunk/src/modules/mod_geometry/circle.h +++ /dev/null @@ -1,124 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file circle.h -** \brief Header file for implementation of the "Circle" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifndef __SYNFIG_LAYER_CIRCLE_H__ -#define __SYNFIG_LAYER_CIRCLE_H__ - -/* -- H E A D E R S --------------------------------------------------------- */ - -#include -#include -#include - -using namespace synfig; -using namespace std; -using namespace etl; - -/* -- M A C R O S ----------------------------------------------------------- */ - -/* -- T Y P E D E F S ------------------------------------------------------- */ - -/* -- S T R U C T S & C L A S S E S ----------------------------------------- */ - -class Circle : public synfig::Layer_Composite, public synfig::Layer_NoDeform -{ - SYNFIG_LAYER_MODULE_EXT -private: - synfig::Color color; - synfig::Point origin; - synfig::Real radius; - synfig::Real feather; - bool invert; - int falloff; - - //Caching system for circle - struct CircleDataCache - { - Real inner_radius; - Real outer_radius; - - Real inner_radius_sqd; - Real outer_radius_sqd; - - Real diff_sqd; - Real double_feather; - }; - - typedef Real FALLOFF_FUNC(const CircleDataCache &c, const Real &mag_sqd); - - FALLOFF_FUNC *falloff_func; - CircleDataCache cache; - - void constructcache(); - - static Real SqdFalloff(const CircleDataCache &c, const Real &mag_sqd); - static Real InvSqdFalloff(const CircleDataCache &c, const Real &mag_sqd); - static Real SqrtFalloff(const CircleDataCache &c, const Real &mag_sqd); - static Real InvSqrtFalloff(const CircleDataCache &c, const Real &mag_sqd); - static Real LinearFalloff(const CircleDataCache &c, const Real &mag_sqd); - static Real InvLinearFalloff(const CircleDataCache &c, const Real &mag_sqd); - static Real SigmondFalloff(const CircleDataCache &c, const Real &mag_sqd); - static Real InvSigmondFalloff(const CircleDataCache &c, const Real &mag_sqd); - static Real CosineFalloff(const CircleDataCache &c, const Real &mag_sqd); - static Real InvCosineFalloff(const CircleDataCache &c, const Real &mag_sqd); - - FALLOFF_FUNC *GetFalloffFunc()const; - bool ImportParameters(const String ¶m, const ValueBase &value); - -public: - enum Falloff - { - FALLOFF_SQUARED =0, - FALLOFF_INTERPOLATION_LINEAR =1, - FALLOFF_SMOOTH =2, - FALLOFF_COSINE =2, - FALLOFF_SIGMOND =3, - FALLOFF_SQRT =4 - }; - - Circle(); - - virtual bool set_param(const String ¶m, const ValueBase &value); - - virtual ValueBase get_param(const String ¶m)const; - - virtual Color get_color(Context context, const Point &pos)const; - - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - - virtual synfig::Rect get_full_bounding_rect(synfig::Context context)const; - virtual synfig::Rect get_bounding_rect()const; - - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - - virtual Vocab get_param_vocab()const; -}; - -/* -- E X T E R N S --------------------------------------------------------- */ - - -/* -- E N D ----------------------------------------------------------------- */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_geometry/main.cpp b/synfig-core/trunk/src/modules/mod_geometry/main.cpp deleted file mode 100644 index 715465c..0000000 --- a/synfig-core/trunk/src/modules/mod_geometry/main.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_geometry/main.cpp -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include - -#include "checkerboard.h" -#include "circle.h" -#include "region.h" -#include "outline.h" -#include "star.h" -#include "rectangle.h" - -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(libmod_geometry) - MODULE_NAME("Geometry") - MODULE_DESCRIPTION("writeme") - MODULE_AUTHOR("Robert B. Quattlebaum") - MODULE_VERSION("1.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(libmod_geometry) - BEGIN_LAYERS - LAYER(CheckerBoard) - LAYER(Circle) - LAYER(Region) - LAYER(Outline) - LAYER(Star) - LAYER(Rectangle) - - LAYER_ALIAS(Outline,"BLine") - LAYER_ALIAS(Outline,"Bezier") - LAYER_ALIAS(Region,"Region") - LAYER_ALIAS(Circle,"Circle") - LAYER_ALIAS(CheckerBoard,"CheckerBoard") - - END_LAYERS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mod_geometry/mod_geometry.nsh b/synfig-core/trunk/src/modules/mod_geometry/mod_geometry.nsh deleted file mode 100644 index f2768e7..0000000 --- a/synfig-core/trunk/src/modules/mod_geometry/mod_geometry.nsh +++ /dev/null @@ -1,21 +0,0 @@ -; The stuff to install -Section "mod_geometry" Sec_mod_geometry - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=mod_geometry.dll "src\modules\mod_geometry\.libs\libmod_geometry.dll" - - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "mod_geometry" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_geometry/outline.cpp b/synfig-core/trunk/src/modules/mod_geometry/outline.cpp deleted file mode 100644 index e84effb..0000000 --- a/synfig-core/trunk/src/modules/mod_geometry/outline.cpp +++ /dev/null @@ -1,854 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file outline.cpp -** \brief Implementation of the "Outline" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -//! \note This whole file should be rewritten at some point (darco) - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "outline.h" -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#endif - -using namespace etl; - -/* === M A C R O S ========================================================= */ - -#define SAMPLES 50 -#define ROUND_END_FACTOR (4) -#define CUSP_THRESHOLD (0.40) -#define SPIKE_AMOUNT (4) -#define NO_LOOP_COOKIE synfig::Vector(84951305,7836658) -#define EPSILON (0.000000001) -#define CUSP_TANGENT_ADJUST (0.025) - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Outline); -SYNFIG_LAYER_SET_NAME(Outline,"outline"); -SYNFIG_LAYER_SET_LOCAL_NAME(Outline,N_("Outline")); -SYNFIG_LAYER_SET_CATEGORY(Outline,N_("Geometry")); -SYNFIG_LAYER_SET_VERSION(Outline,"0.2"); -SYNFIG_LAYER_SET_CVS_ID(Outline,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -// This function was adapted from what was -// described on http://www.whisqu.se/per/docs/math28.htm -Point line_intersection( - const Point& p1, - const Vector& t1, - const Point& p2, - const Vector& t2 -) -{ - const float& x0(p1[0]); - const float& y0(p1[1]); - - const float x1(p1[0]+t1[0]); - const float y1(p1[1]+t1[1]); - - const float& x2(p2[0]); - const float& y2(p2[1]); - - const float x3(p2[0]+t2[0]); - const float y3(p2[1]+t2[1]); - - const float near_infinity((float)1e+10); - - float m1,m2; // the slopes of each line - - // compute slopes, note the kluge for infinity, however, this will - // be close enough - - if ((x1-x0)!=0) - m1 = (y1-y0)/(x1-x0); - else - m1 = near_infinity; - - if ((x3-x2)!=0) - m2 = (y3-y2)/(x3-x2); - else - m2 = near_infinity; - - // compute constants - const float& a1(m1); - const float& a2(m2); - const float b1(-1.0f); - const float b2(-1.0f); - const float c1(y0-m1*x0); - const float c2(y2-m2*x2); - - // compute the inverse of the determinate - const float det_inv(1.0f/(a1*b2 - a2*b1)); - - // use Kramers rule to compute the intersection - return Point( - ((b1*c2 - b2*c1)*det_inv), - ((a2*c1 - a1*c2)*det_inv) - ); -} // end Intersect_Lines - -/* === M E T H O D S ======================================================= */ - - -Outline::Outline() -{ - old_version=false; - round_tip[0]=true; - round_tip[1]=true; - sharp_cusps=true; - width=1.0f; - loopyness=1.0f; - expand=0; - homogeneous_width=true; - clear(); - - vector bline_point_list; - bline_point_list.push_back(BLinePoint()); - bline_point_list.push_back(BLinePoint()); - bline_point_list.push_back(BLinePoint()); - bline_point_list[0].set_vertex(Point(0,1)); - bline_point_list[1].set_vertex(Point(0,-1)); - bline_point_list[2].set_vertex(Point(1,0)); - bline_point_list[0].set_tangent(bline_point_list[1].get_vertex()-bline_point_list[2].get_vertex()*0.5f); - bline_point_list[1].set_tangent(bline_point_list[2].get_vertex()-bline_point_list[0].get_vertex()*0.5f); - bline_point_list[2].set_tangent(bline_point_list[0].get_vertex()-bline_point_list[1].get_vertex()*0.5f); - bline_point_list[0].set_width(1.0f); - bline_point_list[1].set_width(1.0f); - bline_point_list[2].set_width(1.0f); - bline=bline_point_list; - - needs_sync=true; -} - - -/*! The Sync() function takes the values -** and creates a polygon to be rendered -** with the polygon layer. -*/ -void -Outline::sync() -{ - clear(); - - if (!bline.get_list().size()) - { - synfig::warning(string("Outline::sync():")+N_("No vertices in outline " + string("\"") + get_description() + string("\""))); - return; - } - - try { -#if 1 - - const bool loop(bline.get_loop()); - - ValueNode_BLine::Handle bline_valuenode; - if (bline.get_contained_type() == ValueBase::TYPE_SEGMENT) - { - bline_valuenode = ValueNode_BLine::create(bline); - bline = (*bline_valuenode)(0); - } - - const vector bline_(bline.get_list().begin(),bline.get_list().end()); -#define bline bline_ - - vector::const_iterator - iter, - next(bline.begin()); - - const vector::const_iterator - end(bline.end()); - - vector - side_a, - side_b; - - if(loop) - iter=--bline.end(); - else - iter=next++; - - // iter next - // ---- ---- - // looped nth 1st - // !looped 1st 2nd - - Vector first_tangent=bline.front().get_tangent2(); - Vector last_tangent=iter->get_tangent1(); - - // if we are looped and drawing sharp cusps, we'll need a value for the incoming tangent - if (loop && sharp_cusps && last_tangent.is_equal_to(Vector::zero())) - { - hermite curve((iter-1)->get_vertex(), iter->get_vertex(), (iter-1)->get_tangent2(), iter->get_tangent1()); - const derivative< hermite > deriv(curve); - last_tangent=deriv(1.0-CUSP_TANGENT_ADJUST); - } - - // `first' is for making the cusps; don't do that for the first point if we're not looped - for(bool first=!loop; next!=end; iter=next++) - { - Vector prev_t(iter->get_tangent1()); - Vector iter_t(iter->get_tangent2()); - Vector next_t(next->get_tangent1()); - - bool split_flag(iter->get_split_tangent_flag()); - - // if iter.t2 == 0 and next.t1 == 0, this is a straight line - if(iter_t.is_equal_to(Vector::zero()) && next_t.is_equal_to(Vector::zero())) - { - iter_t=next_t=next->get_vertex()-iter->get_vertex(); - // split_flag=true; - - // if the two points are on top of each other, ignore this segment - // leave `first' true if was before - if (iter_t.is_equal_to(Vector::zero())) - continue; - } - - // Setup the curve - hermite curve( - iter->get_vertex(), - next->get_vertex(), - iter_t, - next_t - ); - - const float - iter_w((iter->get_width()*width)*0.5f+expand), - next_w((next->get_width()*width)*0.5f+expand); - - const derivative< hermite > deriv(curve); - - if (first) - first_tangent = deriv(CUSP_TANGENT_ADJUST); - - // Make cusps as necessary - if(!first && sharp_cusps && split_flag && (!prev_t.is_equal_to(iter_t) || iter_t.is_equal_to(Vector::zero())) && !last_tangent.is_equal_to(Vector::zero())) - { - Vector curr_tangent(deriv(CUSP_TANGENT_ADJUST)); - - const Vector t1(last_tangent.perp().norm()); - const Vector t2(curr_tangent.perp().norm()); - - Real cross(t1*t2.perp()); - Real perp((t1-t2).mag()); - if(cross>CUSP_THRESHOLD) - { - const Point p1(iter->get_vertex()+t1*iter_w); - const Point p2(iter->get_vertex()+t2*iter_w); - - side_a.push_back(line_intersection(p1,last_tangent,p2,curr_tangent)); - } - else if(cross<-CUSP_THRESHOLD) - { - const Point p1(iter->get_vertex()-t1*iter_w); - const Point p2(iter->get_vertex()-t2*iter_w); - - side_b.push_back(line_intersection(p1,last_tangent,p2,curr_tangent)); - } - else if(cross>0 && perp>1) - { - float amount(max(0.0f,(float)(cross/CUSP_THRESHOLD))*(SPIKE_AMOUNT-1)+1); - - side_a.push_back(iter->get_vertex()+(t1+t2).norm()*iter_w*amount); - } - else if(cross<0 && perp>1) - { - float amount(max(0.0f,(float)(-cross/CUSP_THRESHOLD))*(SPIKE_AMOUNT-1)+1); - - side_b.push_back(iter->get_vertex()-(t1+t2).norm()*iter_w*amount); - } - } - - // Make the outline - if(homogeneous_width) - { - const float length(curve.length()); - float dist(0); - Point lastpoint; - for(float n=0.0f;n<0.999999f;n+=1.0f/SAMPLES) - { - const Vector d(deriv(n>CUSP_TANGENT_ADJUST?n:CUSP_TANGENT_ADJUST).perp().norm()); - const Vector p(curve(n)); - - if(n) - dist+=(p-lastpoint).mag(); - - const float w(((next_w-iter_w)*(dist/length)+iter_w)); - - side_a.push_back(p+d*w); - side_b.push_back(p-d*w); - - lastpoint=p; - } - } - else - for(float n=0.0f;n<0.999999f;n+=1.0f/SAMPLES) - { - const Vector d(deriv(n>CUSP_TANGENT_ADJUST?n:CUSP_TANGENT_ADJUST).perp().norm()); - const Vector p(curve(n)); - const float w(((next_w-iter_w)*n+iter_w)); - - side_a.push_back(p+d*w); - side_b.push_back(p-d*w); - } - last_tangent=deriv(1.0-CUSP_TANGENT_ADJUST); - side_a.push_back(curve(1.0)+last_tangent.perp().norm()*next_w); - side_b.push_back(curve(1.0)-last_tangent.perp().norm()*next_w); - - first=false; - } - - if(loop) - { - reverse(side_b.begin(),side_b.end()); - add_polygon(side_a); - add_polygon(side_b); - return; - } - - // Insert code for adding end tip - if(round_tip[1] && !loop && side_a.size()) - { - // remove the last point - side_a.pop_back(); - - const Point vertex(bline.back().get_vertex()); - const Vector tangent(last_tangent.norm()); - const float w((bline.back().get_width()*width)*0.5f+expand); - - hermite curve( - vertex+tangent.perp()*w, - vertex-tangent.perp()*w, - tangent*w*ROUND_END_FACTOR, - -tangent*w*ROUND_END_FACTOR - ); - - for(float n=0.0f;n<0.999999f;n+=1.0f/SAMPLES) - side_a.push_back(curve(n)); - } - - for(;!side_b.empty();side_b.pop_back()) - side_a.push_back(side_b.back()); - - // Insert code for adding begin tip - if(round_tip[0] && !loop && side_a.size()) - { - // remove the last point - side_a.pop_back(); - - const Point vertex(bline.front().get_vertex()); - const Vector tangent(first_tangent.norm()); - const float w((bline.front().get_width()*width)*0.5f+expand); - - hermite curve( - vertex-tangent.perp()*w, - vertex+tangent.perp()*w, - -tangent*w*ROUND_END_FACTOR, - tangent*w*ROUND_END_FACTOR - ); - - for(float n=0.0f;n<0.999999f;n+=1.0f/SAMPLES) - side_a.push_back(curve(n)); - } - - add_polygon(side_a); - - -#else /* 1 */ - - bool loop_; - if(bline.get_contained_type()==ValueBase::TYPE_BLINEPOINT) - { - ValueBase value(bline); - - if(loopyness<0.5f) - { - value.set_loop(false); - loop_=false; - } - else - loop_=value.get_loop(); - - segment_list=convert_bline_to_segment_list(value); - width_list=convert_bline_to_width_list(value); - } - else - { - clear(); - return; - } - - - - if(segment_list.empty()) - { - synfig::warning("Outline: segment_list is empty, layer disabled"); - clear(); - return; - } - - - // Repair the width list if we need to - { - Real default_width; - if(width_list.empty()) - default_width=0.01; - else - default_width=width_list.back(); - - while(width_list.size()segment_list.size()+1) - width_list.pop_back(); - - } - - // Repair the zero tangents (if any) - { - vector::iterator iter; - for(iter=segment_list.begin();iter!=segment_list.end();++iter) - { - if(iter->t1.mag_squared()<=EPSILON && iter->t2.mag_squared()<=EPSILON) - iter->t1=iter->t2=iter->p2-iter->p1; - } - } - - vector::iterator iter; - vector scaled_width_list; - for(iter=width_list.begin();iter!=width_list.end();++iter) - { - scaled_width_list.push_back((*iter*width+expand)*0.5f); - } - - Vector::value_type n; - etl::hermite curve; - vector vector_list; - Vector last_tangent(segment_list.back().t2); - clear(); - - if(!loop_) - last_tangent=NO_LOOP_COOKIE; - - { - vector::iterator iter; - vector::iterator witer; - for( - iter=segment_list.begin(), - witer=scaled_width_list.begin(); - iter!=segment_list.end(); - ++iter,++witer) - { - if(iter->t1.mag_squared()<=EPSILON && iter->t2.mag_squared()<=EPSILON) - { - vector_list.push_back(iter->p1-(iter->p2-iter->p1).perp().norm()*witer[0]); - vector_list.push_back((iter->p2-iter->p1)*0.05+iter->p1-(iter->p2-iter->p1).perp().norm()*((witer[1]-witer[0])*0.05+witer[0])); - vector_list.push_back((iter->p2-iter->p1)*0.95+iter->p1-(iter->p2-iter->p1).perp().norm()*((witer[1]-witer[0])*0.95+witer[0])); - vector_list.push_back(iter->p2-(iter->p2-iter->p1).perp().norm()*witer[1]); - } - else - { - curve.p1()=iter->p1; - curve.t1()=iter->t1; - curve.p2()=iter->p2; - curve.t2()=iter->t2; - curve.sync(); - - etl::derivative > deriv(curve); - - // without this if statement, the broken tangents would - // have boxed edges - if(sharp_cusps && last_tangent!=NO_LOOP_COOKIE && !last_tangent.is_equal_to(iter->t1)) - { - //Vector curr_tangent(iter->t1); - Vector curr_tangent(deriv(CUSP_TANGENT_ADJUST)); - - const Vector t1(last_tangent.perp().norm()); - const Vector t2(curr_tangent.perp().norm()); - - Point p1(iter->p1+t1*witer[0]); - Point p2(iter->p1+t2*witer[0]); - - Real cross(t1*t2.perp()); - - if(cross>CUSP_THRESHOLD) - vector_list.push_back(line_intersection(p1,last_tangent,p2,curr_tangent)); - else if(cross>0) - { - float amount(max(0.0f,(float)(cross/CUSP_THRESHOLD))*(SPIKE_AMOUNT-1)+1); - // Push back something to make it look vaguely round; - //vector_list.push_back(iter->p1+(t1*1.25+t2).norm()*witer[0]*amount); - vector_list.push_back(iter->p1+(t1+t2).norm()*witer[0]*amount); - //vector_list.push_back(iter->p1+(t1+t2*1.25).norm()*witer[0]*amount); - } - } - //last_tangent=iter->t2; - last_tangent=deriv(1.0f-CUSP_TANGENT_ADJUST); - - for(n=0.0f;n<1.0f;n+=1.0f/SAMPLES) - vector_list.push_back(curve(n)+deriv(n>CUSP_TANGENT_ADJUST?n:CUSP_TANGENT_ADJUST).perp().norm()*((witer[1]-witer[0])*n+witer[0]) ); - vector_list.push_back(curve(1.0)+deriv(1.0-CUSP_TANGENT_ADJUST).perp().norm()*witer[1]); - - } - } - if(round_tip[1] && !loop_/* && (!sharp_cusps || segment_list.front().p1!=segment_list.back().p2)*/) - { - // remove the last point - vector_list.pop_back(); - - iter--; - - curve.p1()=iter->p2+Vector(last_tangent[1],-last_tangent[0]).norm()*(*witer); - curve.p2()=iter->p2-(Vector(last_tangent[1],-last_tangent[0]).norm()*(*witer)); - curve.t2()=-(curve.t1()=last_tangent/last_tangent.mag()*(*witer)*ROUND_END_FACTOR); - curve.sync(); - for(n=0.0f;n<1.0f;n+=1.0f/SAMPLES) - vector_list.push_back(curve(n)); - - // remove the last point - vector_list.pop_back(); - } - } - - if(!loop_) - last_tangent=NO_LOOP_COOKIE; - else - { - add_polygon(vector_list); - vector_list.clear(); - last_tangent=segment_list.front().t1; - } - - //else - // last_tangent=segment_list.back().t2; - - { - vector::reverse_iterator iter; - vector::reverse_iterator witer; - for( - iter=segment_list.rbegin(), - witer=scaled_width_list.rbegin(),++witer; - !(iter==segment_list.rend()); - ++iter,++witer) - { - - if(iter->t1.mag_squared()<=EPSILON && iter->t2.mag_squared()<=EPSILON) - { - vector_list.push_back(iter->p2+(iter->p2-iter->p1).perp().norm()*witer[0]); - vector_list.push_back((iter->p2-iter->p1)*0.95+iter->p1+(iter->p2-iter->p1).perp().norm()*((witer[-1]-witer[0])*0.95+witer[0])); - vector_list.push_back((iter->p2-iter->p1)*0.05+iter->p1+(iter->p2-iter->p1).perp().norm()*((witer[-1]-witer[0])*0.05+witer[0])); - vector_list.push_back(iter->p1+(iter->p2-iter->p1).perp().norm()*witer[-1]); - } - else - { - curve.p1()=iter->p1; - curve.t1()=iter->t1; - curve.p2()=iter->p2; - curve.t2()=iter->t2; - curve.sync(); - - etl::derivative > deriv(curve); - - // without this if statement, the broken tangents would - // have boxed edges - if(sharp_cusps && last_tangent!=NO_LOOP_COOKIE && !last_tangent.is_equal_to(iter->t2)) - { - //Vector curr_tangent(iter->t2); - Vector curr_tangent(deriv(1.0f-CUSP_TANGENT_ADJUST)); - - const Vector t1(last_tangent.perp().norm()); - const Vector t2(curr_tangent.perp().norm()); - - Point p1(iter->p2-t1*witer[-1]); - Point p2(iter->p2-t2*witer[-1]); - - Real cross(t1*t2.perp()); - - //if(last_tangent.perp().norm()*curr_tangent.norm()<-CUSP_THRESHOLD) - if(cross>CUSP_THRESHOLD) - vector_list.push_back(line_intersection(p1,last_tangent,p2,curr_tangent)); - else if(cross>0) - { - float amount(max(0.0f,(float)(cross/CUSP_THRESHOLD))*(SPIKE_AMOUNT-1)+1); - // Push back something to make it look vaguely round; - //vector_list.push_back(iter->p2-(t1*1.25+t2).norm()*witer[-1]*amount); - vector_list.push_back(iter->p2-(t1+t2).norm()*witer[-1]*amount); - //vector_list.push_back(iter->p2-(t1+t2*1.25).norm()*witer[-1]*amount); - } - } - //last_tangent=iter->t1; - last_tangent=deriv(CUSP_TANGENT_ADJUST); - - for(n=1.0f;n>CUSP_TANGENT_ADJUST;n-=1.0f/SAMPLES) - vector_list.push_back(curve(n)-deriv(1-n>CUSP_TANGENT_ADJUST?n:1-CUSP_TANGENT_ADJUST).perp().norm()*((witer[-1]-witer[0])*n+witer[0]) ); - vector_list.push_back(curve(0.0f)-deriv(CUSP_TANGENT_ADJUST).perp().norm()*witer[0]); - } - } - if(round_tip[0] && !loop_/* && (!sharp_cusps || segment_list.front().p1!=segment_list.back().p2)*/) - { - // remove the last point - vector_list.pop_back(); - iter--; - witer--; - - curve.p1()=iter->p1+Vector(last_tangent[1],-last_tangent[0]).norm()*(*witer); - curve.p2()=iter->p1-(Vector(last_tangent[1],-last_tangent[0]).norm()*(*witer)); - curve.t1()=-(curve.t2()=last_tangent/last_tangent.mag()*(*witer)*ROUND_END_FACTOR); - curve.sync(); - - for(n=1.0;n>0.0;n-=1.0/SAMPLES) - vector_list.push_back(curve(n)); - - // remove the last point - vector_list.pop_back(); - } - } - - //if(loop_) - // reverse(vector_list.begin(),vector_list.end()); - -#ifdef _DEBUG - { - vector::iterator iter; - for(iter=vector_list.begin();iter!=vector_list.end();++iter) - if(!iter->is_valid()) - { - synfig::error("Outline::sync(): Bad point in vector_list!"); - } - //synfig::info("BLEHH__________--- x:%f, y:%f",vector_list.front()[0],vector_list.front()[1]); - } -#endif /* _DEBUG */ - - add_polygon(vector_list); - - -#endif /* 1 */ - } catch (...) { synfig::error("Outline::sync(): Exception thrown"); throw; } -} - -#undef bline - -bool -Outline::set_param(const String & param, const ValueBase &value) -{ - if(param=="segment_list") - { - if(dynamic_param_list().count("segment_list")) - { - connect_dynamic_param("bline",dynamic_param_list().find("segment_list")->second); - disconnect_dynamic_param("segment_list"); - synfig::warning("Outline::set_param(): Updated valuenode connection to use the new \"bline\" parameter."); - } - else - synfig::warning("Outline::set_param(): The parameter \"segment_list\" is deprecated. Use \"bline\" instead."); - } - - if( (param=="segment_list" || param=="bline") && value.get_type()==ValueBase::TYPE_LIST) - { - //if(value.get_contained_type()!=ValueBase::TYPE_BLINEPOINT) - // return false; - - bline=value; - - return true; - } - /* - if( param=="seg" && value.get_type()==ValueBase::TYPE_SEGMENT) - { - if(!segment_list.empty()) - segment_list.clear(); - - segment_list.push_back(value.get(Segment())); - loop_=false; - //sync(); - return true; - } - if( param=="w[0]" && value.get_type()==ValueBase::TYPE_REAL) - { - if(width_list.size()<2) - { - width_list.push_back(value.get(Real())); - width_list.push_back(value.get(Real())); - } - else - { - width_list[0]=value.get(Real()); - } - width=1; - //sync(); - return true; - } - - if( param=="w[1]" && value.get_type()==ValueBase::TYPE_REAL) - { - if(width_list.size()<2) - { - width_list.push_back(value.get(Real())); - width_list.push_back(value.get(Real())); - } - else - { - width_list[1]=value.get(Real()); - } - width=1; - //sync(); - return true; - } - - if( param=="width_list" && value.same_type_as(width_list)) - { - width_list=value; - //sync(); - return true; - } - */ - - IMPORT(round_tip[0]); - IMPORT(round_tip[1]); - IMPORT(sharp_cusps); - IMPORT_PLUS(width,if(old_version){width*=2.0;}); - IMPORT(loopyness); - IMPORT(expand); - IMPORT(homogeneous_width); - - if(param!="vector_list") - return Layer_Polygon::set_param(param,value); - - return false; -} - -void -Outline::set_time(Context context, Time time)const -{ - const_cast(this)->sync(); - context.set_time(time); -} - -void -Outline::set_time(Context context, Time time, Vector pos)const -{ - const_cast(this)->sync(); - context.set_time(time,pos); -} - -ValueBase -Outline::get_param(const String& param)const -{ - EXPORT(bline); - EXPORT(expand); - //EXPORT(width_list); - //EXPORT(segment_list); - EXPORT(homogeneous_width); - EXPORT(round_tip[0]); - EXPORT(round_tip[1]); - EXPORT(sharp_cusps); - EXPORT(width); - EXPORT(loopyness); - - EXPORT_NAME(); - EXPORT_VERSION(); - - if(param!="vector_list") - return Layer_Polygon::get_param(param); - return ValueBase(); -} - -Layer::Vocab -Outline::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Polygon::get_param_vocab()); - - // Pop off the polygon parameter from the polygon vocab - ret.pop_back(); - - ret.push_back(ParamDesc("bline") - .set_local_name(_("Vertices")) - .set_origin("origin") - .set_hint("width") - .set_description(_("A list of BLine Points")) - ); - - /* - ret.push_back(ParamDesc("width_list") - .set_local_name(_("Point Widths")) - .set_origin("segment_list") - .hidden() - .not_critical() - ); - */ - - ret.push_back(ParamDesc("width") - .set_is_distance() - .set_local_name(_("Outline Width")) - ); - - ret.push_back(ParamDesc("expand") - .set_is_distance() - .set_local_name(_("Expand")) - ); - - ret.push_back(ParamDesc("sharp_cusps") - .set_local_name(_("Sharp Cusps")) - .set_description(_("Determines cusp type")) - ); - - ret.push_back(ParamDesc("round_tip[0]") - .set_local_name(_("Rounded Begin")) - .set_description(_("Round off the tip")) - ); - - ret.push_back(ParamDesc("round_tip[1]") - .set_local_name(_("Rounded End")) - .set_description(_("Round off the tip")) - ); - ret.push_back(ParamDesc("loopyness") - .set_local_name(_("Loopyness")) - ); - ret.push_back(ParamDesc("homogeneous_width") - .set_local_name(_("Homogeneous")) - ); - - return ret; -} diff --git a/synfig-core/trunk/src/modules/mod_geometry/outline.h b/synfig-core/trunk/src/modules/mod_geometry/outline.h deleted file mode 100644 index bf1a54f..0000000 --- a/synfig-core/trunk/src/modules/mod_geometry/outline.h +++ /dev/null @@ -1,94 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file outline.h -** \brief Header file for implementation of the "Outline" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_OUTLINE_H -#define __SYNFIG_OUTLINE_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -class Outline : public synfig::Layer_Polygon -{ - SYNFIG_LAYER_MODULE_EXT -private: - - synfig::ValueBase bline; - - std::vector segment_list; - std::vector width_list; - - bool round_tip[2]; - - bool sharp_cusps; - - bool loop_; - - synfig::Real width; - - synfig::Real expand; - - Real loopyness; - bool old_version; - - bool needs_sync; - - bool homogeneous_width; - -public: - - Outline(); - - //! Updates the polygon data to match the parameters. - void sync(); - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - - virtual ValueBase get_param(const String & param)const; - - virtual Vocab get_param_vocab()const; - virtual void set_time(Context context, Time time)const; - virtual void set_time(Context context, Time time, Vector pos)const; - virtual bool set_version(const String &ver){if(ver=="0.1")old_version=true; return true;} - virtual void reset_version(){old_version=false;} - -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_geometry/rectangle.cpp b/synfig-core/trunk/src/modules/mod_geometry/rectangle.cpp deleted file mode 100644 index 374af9c..0000000 --- a/synfig-core/trunk/src/modules/mod_geometry/rectangle.cpp +++ /dev/null @@ -1,632 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file rectangle.cpp -** \brief Implementation of the "Rectangle" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "rectangle.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace etl; -using namespace std; -using namespace synfig; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Rectangle); -SYNFIG_LAYER_SET_NAME(Rectangle,"rectangle"); -SYNFIG_LAYER_SET_LOCAL_NAME(Rectangle,N_("Rectangle")); -SYNFIG_LAYER_SET_CATEGORY(Rectangle,N_("Geometry")); -SYNFIG_LAYER_SET_VERSION(Rectangle,"0.2"); -SYNFIG_LAYER_SET_CVS_ID(Rectangle,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* -inline int ceil_to_int(const float x) { return static_cast(ceil(x)); } -inline int ceil_to_int(const double x) { return static_cast(ceil(x)); } - -inline int floor_to_int(const float x) { return static_cast(floor(x)); } -inline int floor_to_int(const double x) { return static_cast(floor(x)); } -*/ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -Rectangle::Rectangle(): - Layer_Composite(1.0,Color::BLEND_STRAIGHT), - color(Color::black()), - point1(0,0), - point2(1,1), - expand(0), - invert(false) -{ -} - -bool -Rectangle::set_param(const String & param, const ValueBase &value) -{ - IMPORT_PLUS(color, { if (color.get_a() == 0) { if (converted_blend_) { - set_blend_method(Color::BLEND_ALPHA_OVER); - color.set_a(1); } else transparent_color_ = true; } }); - IMPORT(point1); - IMPORT(point2); - IMPORT(expand); - IMPORT(invert); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -Rectangle::get_param(const String ¶m)const -{ - EXPORT(color); - EXPORT(point1); - EXPORT(point2); - EXPORT(expand); - EXPORT(invert); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -Rectangle::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("color") - .set_local_name(_("Color")) - ); - - ret.push_back(ParamDesc("point1") - .set_local_name(_("Point 1")) - .set_box("point2") - ); - - ret.push_back(ParamDesc("point2") - .set_local_name(_("Point 2")) - ); - - ret.push_back(ParamDesc("expand") - .set_is_distance() - .set_local_name(_("Expand amount")) - ); - - ret.push_back(ParamDesc("invert") - .set_local_name(_("Invert the rectangle")) - ); - - return ret; -} - -synfig::Layer::Handle -Rectangle::hit_check(synfig::Context context, const synfig::Point &pos)const -{ - if(is_disabled()) - return context.hit_check(pos); - - Point max,min; - - max[0]=std::max(point1[0],point2[0])+expand; - max[1]=std::max(point1[1],point2[1])+expand; - min[0]=std::min(point1[0],point2[0])-expand; - min[1]=std::min(point1[1],point2[1])-expand; - - bool intersect(false); - - if( pos[0]min[0] && - pos[1]min[1] ) - { - intersect=true; - } - - if(invert) - intersect=!intersect; - - if(intersect) - { - synfig::Layer::Handle tmp; - if(get_blend_method()==Color::BLEND_BEHIND && (tmp=context.hit_check(pos))) - return tmp; - if(Color::is_onto(get_blend_method()) && !(tmp=context.hit_check(pos))) - return 0; - return const_cast(this); - } - - return context.hit_check(pos); -} - -bool -Rectangle::is_solid_color()const -{ - return Layer_Composite::is_solid_color() || - (get_blend_method() == Color::BLEND_COMPOSITE && - get_amount() == 1.0f && - color.get_a() == 1.0f); -} - -Color -Rectangle::get_color(Context context, const Point &pos)const -{ - if(is_disabled()) - return context.get_color(pos); - - Point max,min; - - max[0]=std::max(point1[0],point2[0])+expand; - max[1]=std::max(point1[1],point2[1])+expand; - min[0]=std::min(point1[0],point2[0])-expand; - min[1]=std::min(point1[1],point2[1])-expand; - -/************************** -// This is darco's old-old-old feathered box code -// it produces really nice feathered edges - if(feather!=0.0) - { - if( pos[0]<=max[0]-feather/2.0 && pos[0]>=min[0]+feather/2.0 && - pos[1]<=max[1]-feather/2.0 && pos[1]>=min[1]+feather/2.0 ) - { - if(invert) - return (*context).GetColor(context,pos); - else - return color; - } - - if( pos[0]>=max[0]+feather/2.0 || pos[0]<=min[0]-feather/2.0 || - pos[1]>=max[1]+feather/2.0 || pos[1]<=min[1]-feather/2.0 ) - { - if(invert) - return color; - else - return (*context).GetColor(context,pos); - } - - Color::unit alpha=1000000; - Color::unit alpha2=1000000; - - if(max[0]-pos[0]+feather/2.0=feather) - { - if(invert) - return color; - else - return (*context).GetColor(context,pos); - } - - alpha=feather-alpha; - } - else - { - alpha=(alphamin[0] && - pos[1]min[1] ) - { - // inside the expanded rectangle - if(invert) - return Color::blend(Color::alpha(),context.get_color(pos),get_amount(),get_blend_method()); - - if(is_solid_color()) - return color; - - return Color::blend(color,context.get_color(pos),get_amount(),get_blend_method()); - } - else - { - // outside the expanded rectangle - if(!invert) - return Color::blend(Color::alpha(),context.get_color(pos),get_amount(),get_blend_method()); - - if(is_solid_color()) - return color; - - return Color::blend(color,context.get_color(pos),get_amount(),get_blend_method()); - } -} - -bool -Rectangle::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - if(is_disabled()) - return context.accelerated_render(surface,quality,renddesc,cb); - - const Point tl(renddesc.get_tl()); - const Point br(renddesc.get_br()); - - const int w(renddesc.get_w()); - const int h(renddesc.get_h()); - - // Width and Height of a pixel - const Real pw = (br[0] - tl[0]) / w; - const Real ph = (br[1] - tl[1]) / h; - - Point max(point1),min(point2); - - - - - /* - - if(invert) - { - max=context.get_bounding_rect().get_max(); - min=context.get_bounding_rect().get_min(); - } - else - { - max=context.get_full_bounding_rect().get_max(); - min=context.get_full_bounding_rect().get_min(); - } - */ - - - - - - if((min[0] > max[0]) ^ (pw < 0))swap(min[0],max[0]); - if((min[1] > max[1]) ^ (ph < 0))swap(min[1],max[1]); - - if(min[0] > max[0]) - { - min[0]+=expand; - max[0]-=expand; - } - else - { - min[0]-=expand; - max[0]+=expand; - } - - if(min[1] > max[1]) - { - min[1]+=expand; - max[1]-=expand; - } - else - { - min[1]-=expand; - max[1]+=expand; - } - - if(invert) - { - int left(floor_to_int((min[0]-tl[0])/pw)); - int right(ceil_to_int((max[0]-tl[0])/pw)); - int top(floor_to_int((min[1]-tl[1])/ph)); - int bottom(ceil_to_int((max[1]-tl[1])/ph)); - - float left_edge((min[0]-tl[0])/pw-float(left)); - float right_edge(float(right)-(max[0]-tl[0])/pw); - float top_edge((min[1]-tl[1])/ph-float(top)); - float bottom_edge(float(bottom)-(max[1]-tl[1])/ph); - - if(top<0)top=0,top_edge=0; - if(left<0)left=0,left_edge=0; - if(bottom>h)bottom=h,bottom_edge=0; - if(right>w)right=w,right_edge=0; - - if(is_solid_color()) - { - Surface subimage; - RendDesc desc(renddesc); - desc.set_flags(0); - - //fill the surface with the background color initially - surface->set_wh(w,h); - surface->fill(color); - - // Check for the case where there is nothing to render - if (right <= left || bottom <= top) - return true; - - desc.set_subwindow(left,top,right-left,bottom-top); - - // Render what is behind us - if(!context.accelerated_render(&subimage,quality,desc,cb)) - { - if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); - return false; - } - - Surface::pen pen(surface->get_pen(left,top)); - - subimage.blit_to(pen); - } - else - { - if(!context.accelerated_render(surface,quality,renddesc,cb)) - { - if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); - return false; - } - - Surface subimage; - - // Check for the case where there is something to render - if (right > left && bottom > top) - { - // save a copy of the overlapping region from surface into subimage - subimage.set_wh(right-left,bottom-top); - Surface::pen subimage_pen(subimage.begin()); - surface->blit_to(subimage_pen,left,top,right-left,bottom-top); - } - - // fill surface with the rectangle's color - Surface::alpha_pen surface_pen(surface->begin(),get_amount(),get_blend_method()); - surface->fill(color,surface_pen,w,h); - - if (subimage) - { - // copy the saved overlapping region back from subimage into surface - Surface::pen pen(surface->get_pen(left,top)); - subimage.blit_to(pen); - } - else - // if there's no overlapping region, return now of the following code corrupts memory - return true; - } - - Surface::alpha_pen pen; - - if(bottom-1>=0 && bottom_edge) - { - pen=Surface::alpha_pen(surface->get_pen(left,bottom-1),get_amount()*bottom_edge,get_blend_method()); - surface->fill(color,pen,right-left,1); - } - - if(right-1>=0 && right_edge) - { - pen=Surface::alpha_pen(surface->get_pen(right-1,top),get_amount()*right_edge,get_blend_method()); - surface->fill(color,pen,1,bottom-top); - } - - if(left>=0 && left_edge) - { - pen=Surface::alpha_pen(surface->get_pen(left,top),get_amount()*left_edge,get_blend_method()); - surface->fill(color,pen,1,bottom-top); - } - - if(top>=0 && top_edge) - { - pen=Surface::alpha_pen(surface->get_pen(left,top),get_amount()*top_edge,get_blend_method()); - surface->fill(color,pen,right-left,1); - } - - return true; - } - - // not inverted - - int left(ceil_to_int((min[0]-tl[0])/pw)); - int right(floor_to_int((max[0]-tl[0])/pw)); - int top(ceil_to_int((min[1]-tl[1])/ph)); - int bottom(floor_to_int((max[1]-tl[1])/ph)); - - float left_edge(float(left)-(min[0]-tl[0])/pw); - float right_edge((max[0]-tl[0])/pw-float(right)); - float top_edge(float(top)-(min[1]-tl[1])/ph); - float bottom_edge((max[1]-tl[1])/ph-float(bottom)); - - if(top<=0)top=0,top_edge=0; - if(left<=0)left=0,left_edge=0; - if(bottom>=h)bottom=h,bottom_edge=0; - if(right>=w)right=w,right_edge=0; - -/* - top = std::max(0,top); - left = std::max(0,left); - bottom = std::min(h,bottom); - right = std::min(w,right); -*/ - - // optimization - if the whole tile is covered by this rectangle, - // and the rectangle is a solid color, we don't need to render - // what's behind us - if (is_solid_color() && top == 0 && left == 0 && bottom == h && right == w) - { - surface->set_wh(w,h); - surface->fill(color); - return true; - } - - // Render what is behind us - if(!context.accelerated_render(surface,quality,renddesc,cb)) - { - if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); - return false; - } - - // In the case where there is nothing to render... - if (right < left || bottom < top) - return true; - - Surface::alpha_pen pen; - - if(right-left>0&&bottom-top>0) - { - if(is_solid_color()) - surface->fill(color,left,top,right-left,bottom-top); - else - { - pen=Surface::alpha_pen(surface->get_pen(left,top),get_amount(),get_blend_method()); - surface->fill(color,pen,right-left,bottom-top); - } - } - - if(bottomget_h() && bottom_edge>=0.0001) - { - pen=Surface::alpha_pen(surface->get_pen(left,bottom),get_amount()*bottom_edge,get_blend_method()); - surface->fill(color,pen,right-left,1); - } - - if(rightget_w() && right_edge>=0.0001) - { - pen=Surface::alpha_pen(surface->get_pen(right,top),get_amount()*right_edge,get_blend_method()); - surface->fill(color,pen,1,bottom-top); - } - - if(left>0 && left_edge>=0.0001) - { - pen=Surface::alpha_pen(surface->get_pen(left-1,top),get_amount()*left_edge,get_blend_method()); - surface->fill(color,pen,1,bottom-top); - } - - if(top>0 && top_edge>=0.0001) - { - pen=Surface::alpha_pen(surface->get_pen(left,top-1),get_amount()*top_edge,get_blend_method()); - surface->fill(color,pen,right-left,1); - } - - - return true; -} - -Rect -Rectangle::get_bounding_rect()const -{ - if(invert) - return Rect::full_plane(); - - Point max(point1),min(point2); - if((min[0] > max[0]))swap(min[0],max[0]); - if((min[1] > max[1]))swap(min[1],max[1]); - if(min[0] > max[0]) - { - min[0]+=expand; - max[0]-=expand; - } - else - { - min[0]-=expand; - max[0]+=expand; - } - - if(min[1] > max[1]) - { - min[1]+=expand; - max[1]-=expand; - } - else - { - min[1]-=expand; - max[1]+=expand; - } - - Rect bounds(min,max); - - return bounds; -} - -Rect -Rectangle::get_full_bounding_rect(Context context)const -{ - if(invert) - { - if(is_solid_color() && color.get_a()==0) - { - Point max(point1),min(point2); - if((min[0] > max[0]))swap(min[0],max[0]); - if((min[1] > max[1]))swap(min[1],max[1]); - if(min[0] > max[0]) - { - min[0]+=expand; - max[0]-=expand; - } - else - { - min[0]-=expand; - max[0]+=expand; - } - - if(min[1] > max[1]) - { - min[1]+=expand; - max[1]-=expand; - } - else - { - min[1]-=expand; - max[1]+=expand; - } - - Rect bounds(min,max); - - return bounds & context.get_full_bounding_rect(); - } - return Rect::full_plane(); - } - - return Layer_Composite::get_full_bounding_rect(context); -} diff --git a/synfig-core/trunk/src/modules/mod_geometry/rectangle.h b/synfig-core/trunk/src/modules/mod_geometry/rectangle.h deleted file mode 100644 index add217c..0000000 --- a/synfig-core/trunk/src/modules/mod_geometry/rectangle.h +++ /dev/null @@ -1,81 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file rectangle.h -** \brief Header file for implementation of the "Rectangle" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_FILLEDRECT_H -#define __SYNFIG_FILLEDRECT_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class Rectangle : public synfig::Layer_Composite, public synfig::Layer_NoDeform -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - synfig::Color color; - - synfig::Point point1; - synfig::Point point2; - - synfig::Real expand; - - bool invert; - -public: - - Rectangle(); - - virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); - - virtual synfig::ValueBase get_param(const synfig::String & param)const; - - virtual bool is_solid_color()const; - - virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; - - virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; - - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - - virtual synfig::Rect get_bounding_rect()const; - virtual synfig::Rect get_full_bounding_rect(synfig::Context context)const; - - virtual Vocab get_param_vocab()const; -}; // END of class FilledRect - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_geometry/region.cpp b/synfig-core/trunk/src/modules/mod_geometry/region.cpp deleted file mode 100644 index 462d30e..0000000 --- a/synfig-core/trunk/src/modules/mod_geometry/region.cpp +++ /dev/null @@ -1,251 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file region.cpp -** \brief Implementation of the "Region" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "region.h" -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -using namespace etl; - -/* === M A C R O S ========================================================= */ - -#define SAMPLES 75 - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Region); -SYNFIG_LAYER_SET_NAME(Region,"region"); -SYNFIG_LAYER_SET_LOCAL_NAME(Region,N_("Region")); -SYNFIG_LAYER_SET_CATEGORY(Region,N_("Geometry")); -SYNFIG_LAYER_SET_VERSION(Region,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Region,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -Region::Region() -{ - clear(); - vector bline_point_list; - bline_point_list.push_back(BLinePoint()); - bline_point_list.push_back(BLinePoint()); - bline_point_list.push_back(BLinePoint()); - bline_point_list[0].set_vertex(Point(0,1)); - bline_point_list[1].set_vertex(Point(0,-1)); - bline_point_list[2].set_vertex(Point(1,0)); - bline_point_list[0].set_tangent(bline_point_list[1].get_vertex()-bline_point_list[2].get_vertex()*0.5f); - bline_point_list[1].set_tangent(bline_point_list[2].get_vertex()-bline_point_list[0].get_vertex()*0.5f); - bline_point_list[2].set_tangent(bline_point_list[0].get_vertex()-bline_point_list[1].get_vertex()*0.5f); - bline_point_list[0].set_width(1.0f); - bline_point_list[1].set_width(1.0f); - bline_point_list[2].set_width(1.0f); - bline=bline_point_list; -} - -void -Region::sync() -{ - if(bline.get_contained_type()==ValueBase::TYPE_BLINEPOINT) - segment_list=convert_bline_to_segment_list(bline); - else if(bline.get_contained_type()==ValueBase::TYPE_SEGMENT) - segment_list=vector(bline.get_list().begin(), bline.get_list().end()); - else - { - synfig::warning("Region: incorrect type on bline, layer disabled"); - clear(); - return; - } - - if(segment_list.empty()) - { - synfig::warning("Region: segment_list is empty, layer disabled"); - clear(); - return; - } - - bool looped = bline.get_loop(); - - Vector::value_type n; - etl::hermite curve; - vector vector_list; - - vector::const_iterator iter=segment_list.begin(); - //Vector last = iter->p1; - - //make sure the shape has a clean slate for writing - //clear(); - - //and start off at the first point - //move_to(last[0],last[1]); - - for(;iter!=segment_list.end();++iter) - { - //connect them with a line if they aren't already joined - /*if(iter->p1 != last) - { - line_to(iter->p1[0],iter->p1[1]); - } - - //curve to the next end point - curve_to(iter->p1[0] + iter->t1[0]/3.0,iter->p1[1] + iter->t1[1]/3.0, - iter->p2[0] - iter->t2[0]/3.0,iter->p2[1] - iter->t2[1]/3.0, - iter->p2[0],iter->p2[1]); - - last = iter->p2;*/ - - if(iter->t1.is_equal_to(Vector(0,0)) && iter->t2.is_equal_to(Vector(0,0))) - { - vector_list.push_back(iter->p2); - } - else - { - curve.p1()=iter->p1; - curve.t1()=iter->t1; - curve.p2()=iter->p2; - curve.t2()=iter->t2; - curve.sync(); - - for(n=0.0;n<1.0;n+=1.0/SAMPLES) - vector_list.push_back(curve(n)); - } - } - - //add the starting point onto the end so it actually fits the shape, so we can be extra awesome... - if(!looped) - vector_list.push_back(segment_list[0].p1); - - clear(); - add_polygon(vector_list); - - /*close(); - endpath();*/ -} - -bool -Region::set_param(const String & param, const ValueBase &value) -{ - if(param=="segment_list") - { - if(dynamic_param_list().count("segment_list")) - { - connect_dynamic_param("bline",dynamic_param_list().find("segment_list")->second); - disconnect_dynamic_param("segment_list"); - synfig::warning("Region::set_param(): Updated valuenode connection to use the new \"bline\" parameter."); - } - else - synfig::warning("Region::set_param(): The parameter \"segment_list\" is deprecated. Use \"bline\" instead."); - } - - if( (param=="segment_list" || param=="bline") && value.get_type()==ValueBase::TYPE_LIST) - { - //if(value.get_contained_type()!=ValueBase::TYPE_BLINEPOINT) - // return false; - - bline=value; - - return true; - } - -/* if( param=="segment_list" && value.get_type()==ValueBase::TYPE_LIST) - { - if(value.get_contained_type()==ValueBase::TYPE_BLINEPOINT) - segment_list=convert_bline_to_segment_list(value); - else - if(value.get_contained_type()==ValueBase::TYPE_SEGMENT) - segment_list=value; - else - if(value.empty()) - segment_list.clear(); - else - return false; - sync(); - return true; - } - */ - return Layer_Shape::set_param(param,value); -} - -ValueBase -Region::get_param(const String& param)const -{ - EXPORT(bline); - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Shape::get_param(param); -} - -Layer::Vocab -Region::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Shape::get_param_vocab()); - - ret.push_back(ParamDesc("bline") - .set_local_name(_("Vertices")) - .set_origin("origin") - ); - - return ret; -} - -void -Region::set_time(Context context, Time time)const -{ - const_cast(this)->sync(); - context.set_time(time); -} - -void -Region::set_time(Context context, Time time, Vector pos)const -{ - const_cast(this)->sync(); - context.set_time(time,pos); -} diff --git a/synfig-core/trunk/src/modules/mod_geometry/region.h b/synfig-core/trunk/src/modules/mod_geometry/region.h deleted file mode 100644 index 38e33f3..0000000 --- a/synfig-core/trunk/src/modules/mod_geometry/region.h +++ /dev/null @@ -1,73 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file region.h -** \brief Header file for implementation of the "Region" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_REGION_H -#define __SYNFIG_REGION_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { class Segment; } - -using namespace synfig; -using namespace std; -using namespace etl; - -class Region : protected synfig::Layer_Polygon//Shape -{ - SYNFIG_LAYER_MODULE_EXT -private: - synfig::ValueBase bline; - std::vector segment_list; -public: - Region(); - - //! Updates the polygon data to match the parameters. - void sync(); - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - - virtual ValueBase get_param(const String & param)const; - - virtual Vocab get_param_vocab()const; - virtual void set_time(Context context, Time time)const; - virtual void set_time(Context context, Time time, Vector pos)const; - -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_geometry/star.cpp b/synfig-core/trunk/src/modules/mod_geometry/star.cpp deleted file mode 100644 index cb1d8e6..0000000 --- a/synfig-core/trunk/src/modules/mod_geometry/star.cpp +++ /dev/null @@ -1,204 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file star.cpp -** \brief Implementation of the "Star" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007-2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "star.h" -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -using namespace etl; - -/* === M A C R O S ========================================================= */ - -#define SAMPLES 75 - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Star); -SYNFIG_LAYER_SET_NAME(Star,"star"); -SYNFIG_LAYER_SET_LOCAL_NAME(Star,N_("Star")); -SYNFIG_LAYER_SET_CATEGORY(Star,N_("Geometry")); -SYNFIG_LAYER_SET_VERSION(Star,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Star,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -Star::Star(): - radius1(1.0), - radius2(0.38), - points(5), - angle(Angle::deg(90)), - regular_polygon(false) -{ - sync(); -} - -void -Star::sync() -{ - Angle dist_between_points(Angle::rot(1)/float(points)); - std::vector vector_list; - - int i; - for(i=0;i -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -class Star : protected synfig::Layer_Polygon -{ - SYNFIG_LAYER_MODULE_EXT -private: - - Real radius1; - Real radius2; - int points; - Angle angle; - bool regular_polygon; -public: - Star(); - - //! Updates the polygon data to match the parameters. - void sync(); - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - - virtual ValueBase get_param(const String & param)const; - - virtual Vocab get_param_vocab()const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_geometry/unmod_geometry.nsh b/synfig-core/trunk/src/modules/mod_geometry/unmod_geometry.nsh deleted file mode 100644 index 3f5b516..0000000 --- a/synfig-core/trunk/src/modules/mod_geometry/unmod_geometry.nsh +++ /dev/null @@ -1,8 +0,0 @@ -Section "un.mod_geometry" - Delete "$INSTDIR\lib\synfig\modules\mod_geometry.dll" - RMDir "$INSTDIR\lib\synfig\modules" - RMDir "$INSTDIR\lib\synfig" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_gif/Makefile.am b/synfig-core/trunk/src/modules/mod_gif/Makefile.am deleted file mode 100644 index c59e448..0000000 --- a/synfig-core/trunk/src/modules/mod_gif/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -moduledir = @MODULE_DIR@ - -module_LTLIBRARIES = libmod_gif.la - -libmod_gif_la_SOURCES = \ - main.cpp \ - trgt_gif.cpp \ - trgt_gif.h - -libmod_gif_la_LDFLAGS = \ - -module \ - -no-undefined \ - -avoid-version - -libmod_gif_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ - -libmod_gif_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @SYNFIG_LIBS@ - - -EXTRA_DIST = \ - mod_gif.nsh \ - unmod_gif.nsh diff --git a/synfig-core/trunk/src/modules/mod_gif/main.cpp b/synfig-core/trunk/src/modules/mod_gif/main.cpp deleted file mode 100644 index f236426..0000000 --- a/synfig-core/trunk/src/modules/mod_gif/main.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_gif/main.cpp -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "trgt_gif.h" - -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(mod_gif) - MODULE_NAME("GIF Target") - MODULE_DESCRIPTION("Target for the GIF image format (B/W only)") - MODULE_AUTHOR("Robert B. Quattlebaum") - MODULE_VERSION("1.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(mod_gif) - BEGIN_TARGETS - TARGET(gif) - END_TARGETS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mod_gif/mod_gif.nsh b/synfig-core/trunk/src/modules/mod_gif/mod_gif.nsh deleted file mode 100644 index 17f441b..0000000 --- a/synfig-core/trunk/src/modules/mod_gif/mod_gif.nsh +++ /dev/null @@ -1,21 +0,0 @@ -; The stuff to install -Section "mod_gif" Sec_mod_gif - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=mod_gif.dll "src\modules\mod_gif\.libs\libmod_gif.dll" - - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "mod_gif" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_gif/trgt_gif.cpp b/synfig-core/trunk/src/modules/mod_gif/trgt_gif.cpp deleted file mode 100644 index 2068995..0000000 --- a/synfig-core/trunk/src/modules/mod_gif/trgt_gif.cpp +++ /dev/null @@ -1,456 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_gif.cpp -** \brief BMP Target Module -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_TARGET - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "trgt_gif.h" -#include -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -#define MAX_FRAME_RATE (20.0) - -/* === G L O B A L S ======================================================= */ - -SYNFIG_TARGET_INIT(gif); -SYNFIG_TARGET_SET_NAME(gif,"gif"); -SYNFIG_TARGET_SET_EXT(gif,"gif"); -SYNFIG_TARGET_SET_VERSION(gif,"0.1"); -SYNFIG_TARGET_SET_CVS_ID(gif,"$Id$"); - -/* === M E T H O D S ======================================================= */ - -gif::gif(const char *filename_): - filename(filename_), - file( (filename=="-")?stdout:fopen(filename_,POPEN_BINARY_WRITE_TYPE) ), - imagecount(0), - - lossy(true), - multi_image(false), - dithering(true), - color_bits(8), - iframe_density(30), - loop_count(0x7fff), - local_palette(true) -{ -} - -gif::~gif() -{ - if(file) - fputc(';',file.get()); // Image terminator -} - -bool -gif::set_rend_desc(RendDesc *given_desc) -{ - if(given_desc->get_frame_rate()>MAX_FRAME_RATE) - given_desc->set_frame_rate(MAX_FRAME_RATE); - - desc=*given_desc; - - if(desc.get_frame_end()-desc.get_frame_start()>0) - { - multi_image=true; - //set_remove_alpha(); - imagecount=desc.get_frame_end()-desc.get_frame_start(); - } - else - multi_image=false; - return true; -} - -bool -gif::init() -{ - int w=desc.get_w(),h=desc.get_h(); - - if(!file) - { - synfig::error(strprintf(_("Unable to open \"%s\" for write access!"),filename.c_str())); - return false; - } - - rootsize=color_bits; // Size of pixel bits - - curr_frame.set_wh(w,h); - prev_frame.set_wh(w,h); - curr_surface.set_wh(w,h); - curr_frame.clear(); - prev_frame.clear(); - curr_surface.clear(); - - if(get_quality()>5) - lossy=true; - else - lossy=false; - - // Output the header - fprintf(file.get(),"GIF89a"); - fputc(w&0x000000ff,file.get()); - fputc((w&0x0000ff00)>>8,file.get()); - fputc(h&0x000000ff,file.get()); - fputc((h&0x0000ff00)>>8,file.get()); - if(!local_palette) - fputc(0xF0+(rootsize-1),file.get()); // flags - else - fputc((0xF0+(rootsize-1))&~(1<<7),file.get()); // flags - - fputc(0,file.get()); // background color - fputc(0,file.get()); // Pixel Aspect Ratio - - if(!local_palette) - { - curr_palette=Palette::grayscale(256/(1<<(8-rootsize))-1); - output_curr_palette(); - } - - if(loop_count && multi_image) - { - fputc(33,file.get()); // 33 (hex 0x21) GIF Extension code - fputc(255,file.get()); // 255 (hex 0xFF) Application Extension Label - fputc(11,file.get()); // 11 (hex (0x0B) Length of Application Block - fprintf(file.get(),"NETSCAPE2.0"); - fputc(3,file.get()); // 3 (hex 0x03) Length of Data Sub-Block - fputc(1,file.get()); // 1 (hex 0x01) - fputc(loop_count&0x000000ff,file.get()); - fputc((loop_count&0x0000ff00)>>8,file.get()); - fputc(0,file.get()); // 0 (hex 0x00) a Data Sub-block Terminator. - } - - return true; -} - -void -gif::output_curr_palette() -{ - // Output the color table - for(i=0;i<256/(1<<(8-rootsize));i++) - { - if(i<(signed)curr_palette.size()) - { - Color color(curr_palette[i].color.clamped()); - //fputc(i*(1<<(8-rootsize)),file.get()); - //fputc(i*(1<<(8-rootsize)),file.get()); - //fputc(i*(1<<(8-rootsize)),file.get()); - fputc(gamma().r_F32_to_U8(color.get_r()),file.get()); - fputc(gamma().g_F32_to_U8(color.get_g()),file.get()); - fputc(gamma().b_F32_to_U8(color.get_b()),file.get()); - } - else - { - fputc(255,file.get()); - fputc(0,file.get()); - fputc(255,file.get()); - } - } -} - -bool -gif::start_frame(synfig::ProgressCallback *callback) -{ -// int -// w=desc.get_w(), -// h=desc.get_h(); - - if(!file) - { - if(callback)callback->error(string("BUG:")+_("Description not set!")); - return false; - } - - if(callback)callback->task(filename+strprintf(" %d",imagecount)); - - - - return true; -} - -void -gif::end_frame() -{ - int w=desc.get_w(),h=desc.get_h(),i; - unsigned int value; - int - delaytime=round_to_int(100.0/desc.get_frame_rate()); - - bool build_off_previous(multi_image); - - Palette prev_palette(curr_palette); - - // Fill in the background color - if(!get_remove_alpha()) - { - Surface::alpha_pen pen(curr_surface.begin(),1.0,Color::BLEND_BEHIND); - pen.set_value(get_canvas()->rend_desc().get_bg_color()); - for(int y=0;y0.1) - pen.put_value(); - else - pen[0][0]=Color::alpha(); - } - pen.dec_x(x); - } - } - - if(local_palette) - { - curr_palette=Palette(curr_surface,256/(1<<(8-rootsize))-build_off_previous-1); - synfig::info("curr_palette.size()=%d",curr_palette.size()); - } - - int transparent_index(curr_palette.find_closest(Color(1,0,1,0))-curr_palette.begin()); - bool has_transparency(curr_palette[transparent_index].color.get_a()<=0.00001); - - if(has_transparency) - build_off_previous=false; - - if(build_off_previous) - { - transparent_index=0; - has_transparency=true; - } - -#define DISPOSE_UNDEFINED (0) -#define DISPOSE_NONE (1<<2) -#define DISPOSE_RESTORE_BGCOLOR (2<<2) -#define DISPOSE_RESTORE_PREVIOUS (3<<2) - int gec_flags(0); - if(build_off_previous) - gec_flags|=DISPOSE_NONE; - else - gec_flags|=DISPOSE_RESTORE_PREVIOUS; - if(has_transparency) - gec_flags|=1; - - // output the Graphic Control Extension - fputc(0x21,file.get()); // Extension introducer - fputc(0xF9,file.get()); // Graphic Control Label - fputc(4,file.get()); // Block Size - fputc(gec_flags,file.get()); // Flags (Packed Fields) - fputc(delaytime&0x000000ff,file.get()); // Delay Time (MSB) - fputc((delaytime&0x0000ff00)>>8,file.get()); // Delay Time (LSB) - fputc(transparent_index,file.get()); // Transparent Color Index - fputc(0,file.get()); // Block Terminator - - // output the image header - fputc(',',file.get()); - fputc(0,file.get()); // image left - fputc(0,file.get()); // image left - fputc(0,file.get()); // image top - fputc(0,file.get()); // image top - fputc(w&0x000000ff,file.get()); - fputc((w&0x0000ff00)>>8,file.get()); - fputc(h&0x000000ff,file.get()); - fputc((h&0x0000ff00)>>8,file.get()); - if(local_palette) - fputc(0x80|(rootsize-1),file.get()); // flags - else - fputc(0x00+ rootsize-1,file.get()); // flags - - - if(local_palette) - { - Palette out(curr_palette); - - if(build_off_previous) - curr_palette.insert(curr_palette.begin(),Color(1,0,1,0)); - output_curr_palette(); - curr_palette=out; - } - - bs=bitstream(file); - - // Prepare ourselves for LZW compression - codesize=rootsize+1; - nextcode=(1<color); - //error*=0.25; - if(curr_surface.get_h()>cur_scanline+1) - { - curr_surface[cur_scanline+1][i-1] += error * ((float)3/(float)16); - curr_surface[cur_scanline+1][i] += error * ((float)5/(float)16); - if(curr_surface.get_w()>i+1) - curr_surface[cur_scanline+1][i+1] += error * ((float)1/(float)16); - } - if(curr_surface.get_w()>i+1) - curr_surface[cur_scanline][i+1] += error * ((float)7/(float)16); - } - - curr_frame[cur_scanline][i]=iter-curr_palette.begin(); - - value=curr_frame[cur_scanline][i]; - if(build_off_previous) - value++; - if(value>(unsigned)(1<color-prev_palette[prev_frame[cur_scanline][i]-1].color ).get_y() ) > (1.0/16.0) || -// abs((int)value-(int)prev_frame[cur_scanline][i])>2|| -// (value<=2 && value!=prev_frame[cur_scanline][i]) || - (imagecount%iframe_density)==0 || imagecount==desc.get_frame_end()-1 ) // lossy version - prev_frame[cur_scanline][i]=value; - else - { - prev_frame[cur_scanline][i]=value; - value=0; - } - } - else - { - // lossless version - if(value!=prev_frame[cur_scanline][i]) - prev_frame[cur_scanline][i]=value; - else - value=0; - } - } - else - prev_frame[cur_scanline][i]=value; - - next=node->FindCode(value); - if(next) - node=next; - else - { - node->AddNode(nextcode, value); - bs.push_value(node->code, codesize); - node = table->FindCode(value); - - // Check to see if we need to increase the codesize - if (nextcode == ( 1 << codesize)) - codesize += 1; - - nextcode += 1; - - // check to see if we have filled up the table - if (nextcode == 4096) - { - // output the clear code: make sure to use the current - // codesize - bs.push_value((unsigned) 1 << rootsize, codesize); - - delete table; - table = lzwcode::NewTable((1<FindCode(value); - } - } - } - } - - - - - - // Push the last code onto the bitstream - bs.push_value(node->code,codesize); - - // Push a end-of-stream code onto the bitstream - bs.push_value((1< -#include -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class gif : public synfig::Target_Scanline -{ - SYNFIG_TARGET_MODULE_EXT -private: - // Class for abstracting the - // output of the codes - struct bitstream - { - synfig::SmartFILE file; - unsigned char pool; - char curr_bit; - bitstream():pool(0),curr_bit(0),curr_pos(0) {} - bitstream(synfig::SmartFILE file):file(file),pool(0),curr_bit(0),curr_pos(0) {} - unsigned char buffer[256]; - int curr_pos; - - // Pushes a single bit onto the bit - void push_bit(bool bit) - { - if(bit) - pool|=(1<<(curr_bit)); - curr_bit++; - if(curr_bit==8) - empty(); - } - - // Empties out the current pool into - // the buffer. Calls 'dump()' if the - // buffer is full. - void empty() - { - buffer[curr_pos++]=pool; - curr_bit=0; - pool=0; - if(curr_pos==255)dump(); - } - - // If there is anything in the - // buffer or in the pool, it - // dumps it to the filestream. - // Buffer and pool are cleared. - void dump() - { - if(curr_bit) - empty(); - if(curr_pos || curr_bit) - { - fputc(curr_pos,file.get()); - fwrite(buffer,curr_pos,1,file.get()); - curr_pos=0; - } - } - - // Pushes a symbol of the given size - // onto the bitstream. - void push_value(int value, int size) - { - int i; - for(i=0;i>(i))&1); - } - }; - - // Class for dealing with the LZW codes - struct lzwcode - { - int value; // the data element or character - int code; // lzwcode - struct lzwcode* kids; // children of this node - struct lzwcode* next; // siblings of this node - - lzwcode():value(0),code(0),kids(0),next(0) { } - - lzwcode *FindCode(int value) - { - lzwcode *node=this; - - // check the children (kids) of the node for the value - for (node = node->kids; node != 0; node = node->next) - if (node->value == value) - return(node); - return(0); - } - - void AddNode(unsigned short code, unsigned short value) - { - lzwcode *n = new lzwcode; - - // add a new child to node; the child will have code and value - n->value = value; - n->code = code; - n->kids = 0; - n->next = this->kids; - this->kids = n; - } - - static lzwcode * NewTable(int values) - { - int i; - lzwcode * table = new lzwcode; - - table->kids = 0; - for (i = 0; i < values; i++) - table->AddNode( i, i); - - return(table); - } - - // Destructor just deletes any - // children and siblings. - ~lzwcode() - { - if(kids) - delete kids; - if(next) - delete next; - } - }; - -private: - bitstream bs; - synfig::String filename; - synfig::SmartFILE file; - int - i, // General-purpose index - codesize, // Current code size - rootsize, // Size of pixel bits (will be recalculated) - nextcode; // Next code to use - lzwcode *table,*next,*node; - - synfig::Surface curr_surface; - etl::surface curr_frame; - etl::surface prev_frame; - - int imagecount; - int cur_scanline; - - - // GIF compression parameters - bool lossy; - bool multi_image; - bool dithering; - int color_bits; - int iframe_density; - int loop_count; - bool local_palette; - - synfig::Palette curr_palette; - - void output_curr_palette(); - -public: - gif(const char *filename); - - virtual bool set_rend_desc(synfig::RendDesc *desc); - virtual bool init(); - virtual bool start_frame(synfig::ProgressCallback *cb); - virtual void end_frame(); - - virtual ~gif(); - - virtual synfig::Color * start_scanline(int scanline); - virtual bool end_scanline(void); - -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_gif/unmod_gif.nsh b/synfig-core/trunk/src/modules/mod_gif/unmod_gif.nsh deleted file mode 100644 index 16d17ce..0000000 --- a/synfig-core/trunk/src/modules/mod_gif/unmod_gif.nsh +++ /dev/null @@ -1,8 +0,0 @@ -Section "un.mod_gif" - Delete "$INSTDIR\lib\synfig\modules\mod_gif.dll" - RMDir "$INSTDIR\lib\synfig\modules" - RMDir "$INSTDIR\lib\synfig" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_gradient/Makefile.am b/synfig-core/trunk/src/modules/mod_gradient/Makefile.am deleted file mode 100644 index cf31c5a..0000000 --- a/synfig-core/trunk/src/modules/mod_gradient/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -moduledir = @MODULE_DIR@ - -module_LTLIBRARIES = libmod_gradient.la - -libmod_gradient_la_SOURCES = \ - curvegradient.cpp \ - curvegradient.h \ - lineargradient.cpp \ - lineargradient.h \ - conicalgradient.cpp \ - conicalgradient.h \ - spiralgradient.cpp \ - spiralgradient.h \ - radialgradient.cpp \ - radialgradient.h \ - main.cpp - -libmod_gradient_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ - -libmod_gradient_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @SYNFIG_LIBS@ - -libmod_gradient_la_LDFLAGS = \ - -module \ - -no-undefined \ - -avoid-version - - -EXTRA_DIST= mod_gradient.nsh unmod_gradient.nsh diff --git a/synfig-core/trunk/src/modules/mod_gradient/conicalgradient.cpp b/synfig-core/trunk/src/modules/mod_gradient/conicalgradient.cpp deleted file mode 100644 index 5bf42a9..0000000 --- a/synfig-core/trunk/src/modules/mod_gradient/conicalgradient.cpp +++ /dev/null @@ -1,284 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file conicalgradient.cpp -** \brief Implementation of the "Conical Gradient" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "conicalgradient.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace etl; -using namespace std; -using namespace synfig; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(ConicalGradient); -SYNFIG_LAYER_SET_NAME(ConicalGradient,"conical_gradient"); -SYNFIG_LAYER_SET_LOCAL_NAME(ConicalGradient,N_("Conical Gradient")); -SYNFIG_LAYER_SET_CATEGORY(ConicalGradient,N_("Gradients")); -SYNFIG_LAYER_SET_VERSION(ConicalGradient,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(ConicalGradient,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -ConicalGradient::ConicalGradient(): - Layer_Composite(1.0,Color::BLEND_STRAIGHT), - gradient(Color::black(),Color::white()), - center(0,0), - angle(Angle::zero()), - symmetric(false) -{ -} - -bool -ConicalGradient::set_param(const String & param, const ValueBase &value) -{ - IMPORT(gradient); - IMPORT(center); - IMPORT(angle); - IMPORT(symmetric); - return Layer_Composite::set_param(param,value); -} - -ValueBase -ConicalGradient::get_param(const String ¶m)const -{ - EXPORT(gradient); - EXPORT(center); - EXPORT(angle); - EXPORT(symmetric); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -ConicalGradient::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("gradient") - .set_local_name(_("Gradient")) - ); - - ret.push_back(ParamDesc("center") - .set_local_name(_("Center")) - ); - - ret.push_back(ParamDesc("angle") - .set_local_name(_("Angle")) - .set_origin("center") - ); - - ret.push_back(ParamDesc("symmetric") - .set_local_name(_("Symmetric")) - ); - - return ret; -} - -inline Color -ConicalGradient::color_func(const Point &pos, float supersample)const -{ - const Point centered(pos-center); - Angle::rot a=Angle::tan(-centered[1],centered[0]).mod(); - a+=angle; - Real dist(a.mod().get()); - - dist-=floor(dist); - - if(symmetric) - { - dist*=2.0; - supersample*=2.0; - if(dist>1)dist=2.0-dist; - } -/* if(dist+supersample*0.5>1.0) - { - Color pool(gradient(dist,supersample*0.5)*(1.0-(dist-supersample*0.5))); - pool+=gradient((dist+supersample*0.5)-1.0,supersample*0.5)*((dist+supersample*0.5)-1.0); - if(pool.get_a() && pool.is_valid()) - { - pool.set_r(pool.get_r()/pool.get_a()); - pool.set_g(pool.get_g()/pool.get_a()); - pool.set_b(pool.get_b()/pool.get_a()); - pool.set_a(pool.get_a()/supersample); - } - return pool; - } - - if(dist-supersample*0.5<0.0) - { - Color pool(gradient(dist,supersample*0.5)*(dist+supersample*0.5)); - pool+=gradient(1.0-(dist-supersample*0.5),supersample*0.5)*(-(dist-supersample*0.5)); - if(pool.get_a() && pool.is_valid()) - { - pool.set_r(pool.get_r()/pool.get_a()); - pool.set_g(pool.get_g()/pool.get_a()); - pool.set_b(pool.get_b()/pool.get_a()); - pool.set_a(pool.get_a()/supersample); - return pool; - } - } -*/ - if(dist+supersample*0.5>1.0) - { - float left(supersample*0.5-(dist-1.0)); - float right(supersample*0.5+(dist-1.0)); - Color pool(gradient(1.0-(left*0.5),left).premult_alpha()*left/supersample); - pool+=gradient(right*0.5,right).premult_alpha()*right/supersample; - return pool.demult_alpha(); - } - if(dist-supersample*0.5<0.0) - { - float left(supersample*0.5-dist); - float right(supersample*0.5+dist); - Color pool(gradient(right*0.5,right).premult_alpha()*right/supersample); - pool+=gradient(1.0-left*0.5,left).premult_alpha()*left/supersample; - return pool.demult_alpha(); - } - - return gradient(dist,supersample); -} - -float -ConicalGradient::calc_supersample(const synfig::Point &x, float pw,float ph)const -{ - Point adj(x-center); - if(abs(adj[0])=0.5) - return const_cast(this); - if(get_amount()==0.0) - return context.hit_check(point); - if((get_blend_method()==Color::BLEND_STRAIGHT || get_blend_method()==Color::BLEND_COMPOSITE) && color_func(point).get_a()>0.5) - return const_cast(this); - return context.hit_check(point); -} - -Color -ConicalGradient::get_color(Context context, const Point &pos)const -{ - const Color color(color_func(pos)); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - return color; - else - return Color::blend(color,context.get_color(pos),get_amount(),get_blend_method()); -} - -bool -ConicalGradient::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - SuperCallback supercb(cb,0,9500,10000); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - { - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - } - else - { - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - return false; - if(get_amount()==0) - return true; - } - - - int x,y; - - Surface::pen pen(surface->begin()); - const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); - Point pos; - Point tl(renddesc.get_tl()); - const int w(surface->get_w()); - const int h(surface->get_h()); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - { - if(quality<9) - { - for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) - return false; - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_gradient/conicalgradient.h b/synfig-core/trunk/src/modules/mod_gradient/conicalgradient.h deleted file mode 100644 index 7799cc9..0000000 --- a/synfig-core/trunk/src/modules/mod_gradient/conicalgradient.h +++ /dev/null @@ -1,79 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file conicalgradient.h -** \brief Header file for implementation of the "Conical Gradient" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_CONICALGRADIENT_H -#define __SYNFIG_CONICALGRADIENT_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class ConicalGradient : public synfig::Layer_Composite, public synfig::Layer_NoDeform -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - synfig::Gradient gradient; - - synfig::Point center; - - synfig::Angle angle; - - bool symmetric; - - synfig::Color color_func(const synfig::Point &x, float supersample=0)const; - - float calc_supersample(const synfig::Point &x, float pw,float ph)const; - -public: - - ConicalGradient(); - - virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); - - virtual synfig::ValueBase get_param(const synfig::String & param)const; - - virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; - - virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - - virtual Vocab get_param_vocab()const; -}; // END of class ConicalGradient - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_gradient/curvegradient.cpp b/synfig-core/trunk/src/modules/mod_gradient/curvegradient.cpp deleted file mode 100644 index 4fa704e..0000000 --- a/synfig-core/trunk/src/modules/mod_gradient/curvegradient.cpp +++ /dev/null @@ -1,615 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file curvegradient.cpp -** \brief Implementation of the "Curve Gradient" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007-2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "curvegradient.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -#define FAKE_TANGENT_STEP 0.000001 - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(CurveGradient); -SYNFIG_LAYER_SET_NAME(CurveGradient,"curve_gradient"); -SYNFIG_LAYER_SET_LOCAL_NAME(CurveGradient,N_("Curve Gradient")); -SYNFIG_LAYER_SET_CATEGORY(CurveGradient,N_("Gradients")); -SYNFIG_LAYER_SET_VERSION(CurveGradient,"0.0"); -SYNFIG_LAYER_SET_CVS_ID(CurveGradient,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -inline float calculate_distance(const synfig::BLinePoint& a,const synfig::BLinePoint& b) -{ -#if 1 - const Point& c1(a.get_vertex()); - const Point c2(a.get_vertex()+a.get_tangent2()/3); - const Point c3(b.get_vertex()-b.get_tangent1()/3); - const Point& c4(b.get_vertex()); - return (c1-c2).mag()+(c2-c3).mag()+(c3-c4).mag(); -#else -#endif -} - -inline float calculate_distance(const std::vector& bline, bool bline_loop) -{ - std::vector::const_iterator iter,next,ret; - std::vector::const_iterator end(bline.end()); - - float dist(0); - - if (bline.empty()) return dist; - - next=bline.begin(); - - if(bline_loop) - iter=--bline.end(); - else - iter=next++; - - for(;next!=end;iter=next++) - { - // Setup the curve - etl::hermite curve( - iter->get_vertex(), - next->get_vertex(), - iter->get_tangent2(), - next->get_tangent1()); - -// dist+=calculate_distance(*iter,*next); - dist+=curve.length(); - } - - return dist; -} - -std::vector::const_iterator -find_closest(bool fast, const std::vector& bline,const Point& p,float& t,bool loop=false,float *bline_dist_ret=0) -{ - std::vector::const_iterator iter,next,ret; - std::vector::const_iterator end(bline.end()); - - ret=bline.end(); - float dist(100000000000.0); - - next=bline.begin(); - - float best_bline_dist(0); - float best_bline_len(0); - float total_bline_dist(0); - float best_pos(0); - etl::hermite best_curve; - - if(loop) - iter=--bline.end(); - else - iter=next++; - - Point bp; - - for(;next!=end;iter=next++) - { - // Setup the curve - etl::hermite curve( - iter->get_vertex(), - next->get_vertex(), - iter->get_tangent2(), - next->get_tangent1()); - - /* - const float t(curve.find_closest(p,6,0.01,0.99)); - bp=curve(t);if((bp-p).mag_squared()::const_iterator iter,next; - - // Figure out the BLinePoints we will be using, - // Taking into account looping. - if(perpendicular) - { - next=find_closest(fast,bline,point,t,bline_loop,&perp_dist); - perp_dist/=curve_length_; - } - else // not perpendicular - { - next=find_closest(fast,bline,point,t,bline_loop); - } - - iter=next++; - if(next==bline.end()) next=bline.begin(); - - // Setup the curve - etl::hermite curve( - iter->get_vertex(), - next->get_vertex(), - iter->get_tangent2(), - next->get_tangent1() - ); - - // Setup the derivative function - etl::derivative > deriv(curve); - - int search_iterations(7); - - /*if(quality==0)search_iterations=8; - else if(quality<=2)search_iterations=10; - else if(quality<=4)search_iterations=8; - */ - if(perpendicular) - { - if(quality>7) - search_iterations=4; - } - else // not perpendicular - { - if(quality<=6)search_iterations=7; - else if(quality<=7)search_iterations=6; - else if(quality<=8)search_iterations=5; - else search_iterations=4; - } - - // Figure out the closest point on the curve - if (fast) - t = curve.find_closest(fast, point,search_iterations); - - // Calculate our values - p1=curve(t); // the closest point on the curve - tangent=deriv(t); // the tangent at that point - - // if the point we're nearest to is at either end of the - // bline, our distance from the curve is the distance from the - // point on the curve. we need to know which side of the - // curve we're on, so find the average of the two tangents at - // this point - if (t<0.00001 || t>0.99999) - { - bool zero_tangent = (tangent[0] == 0 && tangent[1] == 0); - - if (t<0.5) - { - if (iter->get_split_tangent_flag() || zero_tangent) - { - // fake the current tangent if we need to - if (zero_tangent) tangent = curve(FAKE_TANGENT_STEP) - curve(0); - - // calculate the other tangent - Vector other_tangent(iter->get_tangent1()); - if (other_tangent[0] == 0 && other_tangent[1] == 0) - { - // find the previous blinepoint - std::vector::const_iterator prev; - if (iter != bline.begin()) (prev = iter)--; - else if (loop) (prev = bline.end())--; - else prev = iter; - - etl::hermite other_curve(prev->get_vertex(), iter->get_vertex(), prev->get_tangent2(), iter->get_tangent1()); - other_tangent = other_curve(1) - other_curve(1-FAKE_TANGENT_STEP); - } - - // normalise and sum the two tangents - tangent=(other_tangent.norm()+tangent.norm()); - edge_case=true; - } - } - else - { - if (next->get_split_tangent_flag() || zero_tangent) - { - // fake the current tangent if we need to - if (zero_tangent) tangent = curve(1) - curve(1-FAKE_TANGENT_STEP); - - // calculate the other tangent - Vector other_tangent(next->get_tangent2()); - if (other_tangent[0] == 0 && other_tangent[1] == 0) - { - // find the next blinepoint - std::vector::const_iterator next2(next); - if (++next2 == bline.end()) - { - if (loop) next2 = bline.begin(); - else next2 = next; - } - - etl::hermite other_curve(next->get_vertex(), next2->get_vertex(), next->get_tangent2(), next2->get_tangent1()); - other_tangent = other_curve(FAKE_TANGENT_STEP) - other_curve(0); - } - - // normalise and sum the two tangents - tangent=(other_tangent.norm()+tangent.norm()); - edge_case=true; - } - } - } - tangent = tangent.norm(); - - if(perpendicular) - { - tangent*=curve_length_; - p1-=tangent*perp_dist; - tangent=-tangent.perp(); - } - else // not perpendicular - // the width of the bline at the closest point on the curve - thickness=(next->get_width()-iter->get_width())*t+iter->get_width(); - } - - if(perpendicular) - { - if(quality>7) - { - dist=perp_dist; -/* diff=tangent.perp(); - const Real mag(diff.inv_mag()); - supersample=supersample*mag; -*/ - supersample=0; - } - else - { - diff=tangent.perp(); - //p1-=diff*0.5; - const Real mag(diff.inv_mag()); - supersample=supersample*mag; - diff*=mag*mag; - dist=(point_-origin - p1)*diff; - } - } - else // not perpendicular - { - if (edge_case) - { - diff=(p1-(point_-origin)); - if(diff*tangent.perp()<0) diff=-diff; - diff=diff.norm()*thickness*width; - } - else - diff=tangent.perp()*thickness*width; - - p1-=diff*0.5; - const Real mag(diff.inv_mag()); - supersample=supersample*mag; - diff*=mag*mag; - dist=(point_-origin - p1)*diff; - } - - if(loop) - dist-=floor(dist); - - if(zigzag) - { - dist*=2.0; - supersample*=2.0; - if(dist>1)dist=2.0-dist; - } - - if(loop) - { - if(dist+supersample*0.5>1.0) - { - float left(supersample*0.5-(dist-1.0)); - float right(supersample*0.5+(dist-1.0)); - Color pool(gradient(1.0-(left*0.5),left).premult_alpha()*left/supersample); - if (zigzag) pool+=gradient(1.0-right*0.5,right).premult_alpha()*right/supersample; - else pool+=gradient(right*0.5,right).premult_alpha()*right/supersample; - return pool.demult_alpha(); - } - if(dist-supersample*0.5<0.0) - { - float left(supersample*0.5-dist); - float right(supersample*0.5+dist); - Color pool(gradient(right*0.5,right).premult_alpha()*right/supersample); - if (zigzag) pool+=gradient(left*0.5,left).premult_alpha()*left/supersample; - else pool+=gradient(1.0-left*0.5,left).premult_alpha()*left/supersample; - return pool.demult_alpha(); - } - } - return gradient(dist,supersample); -} - -float -CurveGradient::calc_supersample(const synfig::Point &/*x*/, float pw,float /*ph*/)const -{ - return pw; -} - -synfig::Layer::Handle -CurveGradient::hit_check(synfig::Context context, const synfig::Point &point)const -{ - if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5) - return const_cast(this); - if(get_amount()==0.0) - return context.hit_check(point); - if((get_blend_method()==Color::BLEND_STRAIGHT || get_blend_method()==Color::BLEND_COMPOSITE|| get_blend_method()==Color::BLEND_ONTO) && color_func(point).get_a()>0.5) - return const_cast(this); - return context.hit_check(point); -} - -bool -CurveGradient::set_param(const String & param, const ValueBase &value) -{ - - - IMPORT(origin); - IMPORT(perpendicular); - IMPORT(fast); - - if(param=="bline" && value.get_type()==ValueBase::TYPE_LIST) - { - bline=value; - bline_loop=value.get_loop(); - sync(); - - return true; - } - - IMPORT(width); - IMPORT(gradient); - IMPORT(loop); - IMPORT(zigzag); - - IMPORT_AS(origin,"offset"); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -CurveGradient::get_param(const String & param)const -{ - EXPORT(origin); - EXPORT(bline); - EXPORT(gradient); - EXPORT(loop); - EXPORT(zigzag); - EXPORT(width); - EXPORT(perpendicular); - EXPORT(fast); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -CurveGradient::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("origin") - .set_local_name(_("Origin"))); - - ret.push_back(ParamDesc("width") - .set_is_distance() - .set_local_name(_("Width"))); - - ret.push_back(ParamDesc("bline") - .set_local_name(_("Vertices")) - .set_origin("origin") - .set_hint("width") - .set_description(_("A list of BLine Points"))); - - ret.push_back(ParamDesc("gradient") - .set_local_name(_("Gradient"))); - ret.push_back(ParamDesc("loop") - .set_local_name(_("Loop"))); - ret.push_back(ParamDesc("zigzag") - .set_local_name(_("ZigZag"))); - ret.push_back(ParamDesc("perpendicular") - .set_local_name(_("Perpendicular"))); - ret.push_back(ParamDesc("fast") - .set_local_name(_("Fast"))); - - return ret; -} - -Color -CurveGradient::get_color(Context context, const Point &point)const -{ - const Color color(color_func(point,0)); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - return color; - else - return Color::blend(color,context.get_color(point),get_amount(),get_blend_method()); -} - -bool -CurveGradient::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - SuperCallback supercb(cb,0,9500,10000); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - { - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - } - else - { - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - return false; - if(get_amount()==0) - return true; - } - - - int x,y; - - Surface::pen pen(surface->begin()); - const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); - Point pos; - Point tl(renddesc.get_tl()); - const int w(surface->get_w()); - const int h(surface->get_h()); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - { - for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) - return false; - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_gradient/curvegradient.h b/synfig-core/trunk/src/modules/mod_gradient/curvegradient.h deleted file mode 100644 index c382281..0000000 --- a/synfig-core/trunk/src/modules/mod_gradient/curvegradient.h +++ /dev/null @@ -1,86 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file curvegradient.h -** \brief Header file for implementation of the "Curve Gradient" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007-2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_CURVEGRADIENT_H -#define __SYNFIG_CURVEGRADIENT_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -class CurveGradient : public Layer_Composite, public Layer_NoDeform -{ - SYNFIG_LAYER_MODULE_EXT - -private: - std::vector bline; - - Point origin; - Real width; - Gradient gradient; - Real curve_length_; - - bool loop; - bool zigzag; - bool bline_loop; - bool perpendicular; - bool fast; - - void sync(); - - synfig::Color color_func(const synfig::Point &x, int quality=10, float supersample=0)const; - - float calc_supersample(const synfig::Point &x, float pw,float ph)const; - -public: - CurveGradient(); - - virtual bool set_param(const String ¶m, const ValueBase &value); - virtual ValueBase get_param(const String ¶m)const; - virtual Color get_color(Context context, const Point &pos)const; - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - - virtual Vocab get_param_vocab()const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_gradient/lineargradient.cpp b/synfig-core/trunk/src/modules/mod_gradient/lineargradient.cpp deleted file mode 100644 index be7155a..0000000 --- a/synfig-core/trunk/src/modules/mod_gradient/lineargradient.cpp +++ /dev/null @@ -1,259 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file lineargradient.cpp -** \brief Implementation of the "Linear Gradient" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "lineargradient.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(LinearGradient); -SYNFIG_LAYER_SET_NAME(LinearGradient,"linear_gradient"); -SYNFIG_LAYER_SET_LOCAL_NAME(LinearGradient,N_("Linear Gradient")); -SYNFIG_LAYER_SET_CATEGORY(LinearGradient,N_("Gradients")); -SYNFIG_LAYER_SET_VERSION(LinearGradient,"0.0"); -SYNFIG_LAYER_SET_CVS_ID(LinearGradient,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -inline void -LinearGradient::sync() -{ - diff=(p2-p1); - const Real mag(diff.inv_mag()); - diff*=mag*mag; -} - - -LinearGradient::LinearGradient(): - p1(1,1), - p2(-1,-1), - gradient(Color::black(), Color::white()), - loop(false), - zigzag(false) -{ - sync(); -} - -inline Color -LinearGradient::color_func(const Point &point, float supersample)const -{ - Real dist(point*diff-p1*diff); - - if(loop) - dist-=floor(dist); - - if(zigzag) - { - dist*=2.0; - supersample*=2.0; - if(dist>1)dist=2.0-dist; - } - - if(loop) - { - if(dist+supersample*0.5>1.0) - { - float left(supersample*0.5-(dist-1.0)); - float right(supersample*0.5+(dist-1.0)); - Color pool(gradient(1.0-(left*0.5),left).premult_alpha()*left/supersample); - if (zigzag) pool+=gradient(1.0-right*0.5,right).premult_alpha()*right/supersample; - else pool+=gradient(right*0.5,right).premult_alpha()*right/supersample; - return pool.demult_alpha(); - } - if(dist-supersample*0.5<0.0) - { - float left(supersample*0.5-dist); - float right(supersample*0.5+dist); - Color pool(gradient(right*0.5,right).premult_alpha()*right/supersample); - if (zigzag) pool+=gradient(left*0.5,left).premult_alpha()*left/supersample; - else pool+=gradient(1.0-left*0.5,left).premult_alpha()*left/supersample; - return pool.demult_alpha(); - } - } - return gradient(dist,supersample); -} - -float -LinearGradient::calc_supersample(const synfig::Point &/*x*/, float pw,float /*ph*/)const -{ - return pw/(p2-p1).mag(); -} - -synfig::Layer::Handle -LinearGradient::hit_check(synfig::Context context, const synfig::Point &point)const -{ - if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5) - return const_cast(this); - if(get_amount()==0.0) - return context.hit_check(point); - if((get_blend_method()==Color::BLEND_STRAIGHT || get_blend_method()==Color::BLEND_COMPOSITE) && color_func(point).get_a()>0.5) - return const_cast(this); - return context.hit_check(point); -} - -bool -LinearGradient::set_param(const String & param, const ValueBase &value) -{ - if(param=="p1" && value.same_type_as(p1)) - { - p1=value.get(p1); - sync(); - return true; - } - if(param=="p2" && value.same_type_as(p2)) - { - p2=value.get(p2); - sync(); - return true; - } - //IMPORT(p1); - //IMPORT(p2); - - - IMPORT(gradient); - IMPORT(loop); - IMPORT(zigzag); - return Layer_Composite::set_param(param,value); -} - -ValueBase -LinearGradient::get_param(const String & param)const -{ - EXPORT(p1); - EXPORT(p2); - EXPORT(gradient); - EXPORT(loop); - EXPORT(zigzag); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -LinearGradient::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("p1") - .set_local_name(_("Point 1")) - .set_connect("p2") - ); - ret.push_back(ParamDesc("p2") - .set_local_name(_("Point 2")) - ); - ret.push_back(ParamDesc("gradient") - .set_local_name(_("Gradient")) - ); - ret.push_back(ParamDesc("loop") - .set_local_name(_("Loop")) - ); - ret.push_back(ParamDesc("zigzag") - .set_local_name(_("ZigZag")) - ); - - return ret; -} - -Color -LinearGradient::get_color(Context context, const Point &point)const -{ - const Color color(color_func(point)); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - return color; - else - return Color::blend(color,context.get_color(point),get_amount(),get_blend_method()); -} - -bool -LinearGradient::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - SuperCallback supercb(cb,0,9500,10000); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - { - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - } - else - { - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - return false; - if(get_amount()==0) - return true; - } - - - int x,y; - - Surface::pen pen(surface->begin()); - const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); - Point pos; - Point tl(renddesc.get_tl()); - const int w(surface->get_w()); - const int h(surface->get_h()); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - { - for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) - return false; - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_gradient/lineargradient.h b/synfig-core/trunk/src/modules/mod_gradient/lineargradient.h deleted file mode 100644 index 7176d80..0000000 --- a/synfig-core/trunk/src/modules/mod_gradient/lineargradient.h +++ /dev/null @@ -1,79 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file lineargradient.h -** \brief Header file for implementation of the "Linear Gradient" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_INTERPOLATION_LINEARGRADIENT_H -#define __SYNFIG_INTERPOLATION_LINEARGRADIENT_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -class LinearGradient : public Layer_Composite, public Layer_NoDeform -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - Point p1,p2; - Vector diff; - Gradient gradient; - - bool loop; - bool zigzag; - - void sync(); - - synfig::Color color_func(const synfig::Point &x, float supersample=0)const; - - float calc_supersample(const synfig::Point &x, float pw,float ph)const; - -public: - LinearGradient(); - - virtual bool set_param(const String ¶m, const ValueBase &value); - virtual ValueBase get_param(const String ¶m)const; - virtual Color get_color(Context context, const Point &pos)const; - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - - virtual Vocab get_param_vocab()const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_gradient/main.cpp b/synfig-core/trunk/src/modules/mod_gradient/main.cpp deleted file mode 100644 index 48d375a..0000000 --- a/synfig-core/trunk/src/modules/mod_gradient/main.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_gradient/main.cpp -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include - -#include "lineargradient.h" -#include "radialgradient.h" -#include "conicalgradient.h" -#include "spiralgradient.h" -#include "curvegradient.h" - -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(libmod_gradient) - MODULE_NAME("Gradient") - MODULE_DESCRIPTION("Writeme") - MODULE_AUTHOR("Robert B. Quattlebaum") - MODULE_VERSION("1.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(libmod_gradient) - BEGIN_LAYERS - LAYER(LinearGradient) - LAYER(RadialGradient) - LAYER(ConicalGradient) - LAYER(SpiralGradient) - LAYER(CurveGradient) - END_LAYERS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mod_gradient/mod_gradient.nsh b/synfig-core/trunk/src/modules/mod_gradient/mod_gradient.nsh deleted file mode 100644 index 6d8f495..0000000 --- a/synfig-core/trunk/src/modules/mod_gradient/mod_gradient.nsh +++ /dev/null @@ -1,21 +0,0 @@ -; The stuff to install -Section "mod_gradient" Sec_mod_gradient - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=mod_gradient.dll "src\modules\mod_gradient\.libs\libmod_gradient.dll" - - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "mod_gradient" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_gradient/radialgradient.cpp b/synfig-core/trunk/src/modules/mod_gradient/radialgradient.cpp deleted file mode 100644 index 5c3d20b..0000000 --- a/synfig-core/trunk/src/modules/mod_gradient/radialgradient.cpp +++ /dev/null @@ -1,250 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_gradient/radialgradient.cpp -** \brief Implementation of the "Radial Gradient" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "radialgradient.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace etl; -using namespace std; -using namespace synfig; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(RadialGradient); -SYNFIG_LAYER_SET_NAME(RadialGradient,"radial_gradient"); -SYNFIG_LAYER_SET_LOCAL_NAME(RadialGradient,N_("Radial Gradient")); -SYNFIG_LAYER_SET_CATEGORY(RadialGradient,N_("Gradients")); -SYNFIG_LAYER_SET_VERSION(RadialGradient,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(RadialGradient,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -RadialGradient::RadialGradient(): - Layer_Composite(1.0,Color::BLEND_STRAIGHT), - gradient(Color::black(),Color::white()), - center(0,0), - radius(0.5), - loop(false), - zigzag(false) -{ -} - -bool -RadialGradient::set_param(const String & param, const ValueBase &value) -{ - IMPORT(gradient); - IMPORT(center); - IMPORT(radius); - IMPORT(loop); - IMPORT(zigzag); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -RadialGradient::get_param(const String ¶m)const -{ - EXPORT(gradient); - EXPORT(center); - EXPORT(radius); - EXPORT(loop); - EXPORT(zigzag); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -RadialGradient::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("gradient") - .set_local_name(_("Gradient")) - ); - - ret.push_back(ParamDesc("center") - .set_local_name(_("Center")) - ); - - ret.push_back(ParamDesc("radius") - .set_local_name(_("Radius")) - .set_description(_("This is the radius of the circle")) - .set_is_distance() - .set_origin("center") - ); - - ret.push_back(ParamDesc("loop") - .set_local_name(_("Loop")) - ); - - ret.push_back(ParamDesc("zigzag") - .set_local_name(_("ZigZag")) - ); - - return ret; -} - -inline Color -RadialGradient::color_func(const Point &point, float supersample)const -{ - Real dist((point-center).mag()/radius); - - if(zigzag) - { - dist*=2.0; - supersample*=2.0; - if(dist>1)dist=2.0-dist; - } - - if(loop) - { - dist-=floor(dist); - - if(dist+supersample*0.5>1.0) - { - float left(supersample*0.5-(dist-1.0)); - float right(supersample*0.5+(dist-1.0)); - Color pool(gradient(1.0-(left*0.5),left).premult_alpha()*left/supersample); - if (zigzag) pool+=gradient(1.0-right*0.5,right).premult_alpha()*right/supersample; - else pool+=gradient(right*0.5,right).premult_alpha()*right/supersample; - return pool.demult_alpha(); - } - if(dist-supersample*0.5<0.0) - { - float left(supersample*0.5-dist); - float right(supersample*0.5+dist); - Color pool(gradient(right*0.5,right).premult_alpha()*right/supersample); - if (zigzag) pool+=gradient(left*0.5,left).premult_alpha()*left/supersample; - else pool+=gradient(1.0-left*0.5,left).premult_alpha()*left/supersample; - return pool.demult_alpha(); - } - } - - return gradient(dist,supersample); -} - - -float -RadialGradient::calc_supersample(const synfig::Point &/*x*/, float pw,float /*ph*/)const -{ -// return sqrt(pw*pw+ph*ph)/radius; - return 1.2*pw/radius; -} - -synfig::Layer::Handle -RadialGradient::hit_check(synfig::Context context, const synfig::Point &point)const -{ - if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5) - return const_cast(this); - if(get_amount()==0.0) - return context.hit_check(point); - if((get_blend_method()==Color::BLEND_STRAIGHT || get_blend_method()==Color::BLEND_COMPOSITE) && color_func(point).get_a()>0.5) - return const_cast(this); - return context.hit_check(point); -} - -Color -RadialGradient::get_color(Context context, const Point &pos)const -{ - const Color color(color_func(pos)); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - return color; - else - return Color::blend(color,context.get_color(pos),get_amount(),get_blend_method()); -} - -bool -RadialGradient::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - SuperCallback supercb(cb,0,9500,10000); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - { - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - } - else - { - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - return false; - if(get_amount()==0) - return true; - } - - - int x,y; - - Surface::pen pen(surface->begin()); - const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); - Point pos; - Point tl(renddesc.get_tl()); - const int w(surface->get_w()); - const int h(surface->get_h()); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - { - for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) - return false; - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_gradient/radialgradient.h b/synfig-core/trunk/src/modules/mod_gradient/radialgradient.h deleted file mode 100644 index 4c39f91..0000000 --- a/synfig-core/trunk/src/modules/mod_gradient/radialgradient.h +++ /dev/null @@ -1,79 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file radialgradient.h -** \brief Header file for implementation of the "Radial Gradient" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_RADIALGRADIENT_H -#define __SYNFIG_RADIALGRADIENT_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class RadialGradient : public synfig::Layer_Composite, public synfig::Layer_NoDeform -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - synfig::Gradient gradient; - - synfig::Point center; - - synfig::Real radius; - - bool loop; - bool zigzag; - - synfig::Color color_func(const synfig::Point &x, float supersample=0)const; - - float calc_supersample(const synfig::Point &x, float pw,float ph)const; - -public: - - RadialGradient(); - - virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); - - virtual synfig::ValueBase get_param(const synfig::String & param)const; - - virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; - - virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - - virtual Vocab get_param_vocab()const; -}; // END of class RadialGradient - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_gradient/spiralgradient.cpp b/synfig-core/trunk/src/modules/mod_gradient/spiralgradient.cpp deleted file mode 100644 index 81bd99d..0000000 --- a/synfig-core/trunk/src/modules/mod_gradient/spiralgradient.cpp +++ /dev/null @@ -1,246 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file spiralgradient.cpp -** \brief Implementation of the "Spiral Gradient" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "spiralgradient.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace etl; -using namespace std; -using namespace synfig; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(SpiralGradient); -SYNFIG_LAYER_SET_NAME(SpiralGradient,"spiral_gradient"); -SYNFIG_LAYER_SET_LOCAL_NAME(SpiralGradient,N_("Spiral Gradient")); -SYNFIG_LAYER_SET_CATEGORY(SpiralGradient,N_("Gradients")); -SYNFIG_LAYER_SET_VERSION(SpiralGradient,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(SpiralGradient,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -SpiralGradient::SpiralGradient(): - Layer_Composite(1.0,Color::BLEND_STRAIGHT), - gradient(Color::black(),Color::white()), - center(0,0), - radius(0.5), - angle(Angle::zero()), - clockwise(false) -{ -} - -bool -SpiralGradient::set_param(const String & param, const ValueBase &value) -{ - IMPORT(gradient); - IMPORT(center); - IMPORT(radius); - IMPORT(angle); - IMPORT(clockwise); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -SpiralGradient::get_param(const String ¶m)const -{ - EXPORT(gradient); - EXPORT(center); - EXPORT(radius); - EXPORT(angle); - EXPORT(clockwise); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -SpiralGradient::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("gradient") - .set_local_name(_("Gradient")) - ); - - ret.push_back(ParamDesc("center") - .set_local_name(_("Center")) - ); - - ret.push_back(ParamDesc("radius") - .set_local_name(_("Radius")) - .set_description(_("This is the radius of the circle")) - .set_is_distance() - .set_origin("center") - ); - - ret.push_back(ParamDesc("angle") - .set_local_name(_("Angle")) - .set_origin("center") - ); - - ret.push_back(ParamDesc("clockwise") - .set_local_name(_("Clockwise")) - ); - - return ret; -} - -inline Color -SpiralGradient::color_func(const Point &pos, float supersample)const -{ - const Point centered(pos-center); - Angle a; - a=Angle::tan(-centered[1],centered[0]).mod(); - a=a+angle; - - if(supersample<0.00001)supersample=0.00001; - - Real dist((pos-center).mag()/radius); - if(clockwise) - dist+=Angle::rot(a.mod()).get(); - else - dist-=Angle::rot(a.mod()).get(); - - dist-=floor(dist); - if(dist+supersample*0.5>1.0) - { - float left(supersample*0.5-(dist-1.0)); - float right(supersample*0.5+(dist-1.0)); - Color pool(gradient(1.0-(left*0.5),left).premult_alpha()*left/supersample); - pool+=gradient(right*0.5,right).premult_alpha()*right/supersample; - return pool.demult_alpha(); - } - if(dist-supersample*0.5<0.0) - { - float left(supersample*0.5-dist); - float right(supersample*0.5+dist); - Color pool(gradient(right*0.5,right).premult_alpha()*right/supersample); - pool+=gradient(1.0-left*0.5,left).premult_alpha()*left/supersample; - return pool.demult_alpha(); - } - - return gradient(dist,supersample); -} - -float -SpiralGradient::calc_supersample(const synfig::Point &x, float pw,float /*ph*/)const -{ - return (1.41421*pw/radius+(1.41421*pw/Point(x-center).mag())/(PI*2))*0.5; -} - -synfig::Layer::Handle -SpiralGradient::hit_check(synfig::Context context, const synfig::Point &point)const -{ - if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5) - return const_cast(this); - if(get_amount()==0.0) - return context.hit_check(point); - if((get_blend_method()==Color::BLEND_STRAIGHT || get_blend_method()==Color::BLEND_COMPOSITE) && color_func(point).get_a()>0.5) - return const_cast(this); - return context.hit_check(point); -} - -Color -SpiralGradient::get_color(Context context, const Point &pos)const -{ - const Color color(color_func(pos)); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - return color; - else - return Color::blend(color,context.get_color(pos),get_amount(),get_blend_method()); -} - -bool -SpiralGradient::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - SuperCallback supercb(cb,0,9500,10000); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - { - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - } - else - { - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - return false; - if(get_amount()==0) - return true; - } - - - int x,y; - - Surface::pen pen(surface->begin()); - const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); - Point pos; - Point tl(renddesc.get_tl()); - const int w(surface->get_w()); - const int h(surface->get_h()); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - { - for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) - return false; - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_gradient/spiralgradient.h b/synfig-core/trunk/src/modules/mod_gradient/spiralgradient.h deleted file mode 100644 index 32e3d91..0000000 --- a/synfig-core/trunk/src/modules/mod_gradient/spiralgradient.h +++ /dev/null @@ -1,81 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file spiralgradient.h -** \brief Header file for implementation of the "Spiral Gradient" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_SPIRALGRADIENT_H -#define __SYNFIG_SPIRALGRADIENT_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class SpiralGradient : public synfig::Layer_Composite, public synfig::Layer_NoDeform -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - synfig::Gradient gradient; - - synfig::Point center; - - synfig::Real radius; - - synfig::Angle angle; - - bool clockwise; - - synfig::Color color_func(const synfig::Point &x, float supersample=0)const; - - float calc_supersample(const synfig::Point &x, float pw,float ph)const; - -public: - - SpiralGradient(); - - virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); - - virtual synfig::ValueBase get_param(const synfig::String & param)const; - - virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; - - virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - - virtual Vocab get_param_vocab()const; -}; // END of class SpiralGradient - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_gradient/unmod_gradient.nsh b/synfig-core/trunk/src/modules/mod_gradient/unmod_gradient.nsh deleted file mode 100644 index e5bf48e..0000000 --- a/synfig-core/trunk/src/modules/mod_gradient/unmod_gradient.nsh +++ /dev/null @@ -1,8 +0,0 @@ -Section "un.mod_gradient" - Delete "$INSTDIR\lib\synfig\modules\mod_gradient.dll" - RMDir "$INSTDIR\lib\synfig\modules" - RMDir "$INSTDIR\lib\synfig" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_imagemagick/Makefile.am b/synfig-core/trunk/src/modules/mod_imagemagick/Makefile.am deleted file mode 100644 index ffc9612..0000000 --- a/synfig-core/trunk/src/modules/mod_imagemagick/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -moduledir = @MODULE_DIR@ - -if WITH_IMAGEMAGICK - -module_LTLIBRARIES = libmod_imagemagick.la - -libmod_imagemagick_la_SOURCES = \ - main.cpp \ - mptr_imagemagick.cpp \ - mptr_imagemagick.h \ - trgt_imagemagick.cpp \ - trgt_imagemagick.h - -libmod_imagemagick_la_LDFLAGS = \ - -module \ - -no-undefined \ - -avoid-version - -libmod_imagemagick_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ - -libmod_imagemagick_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @SYNFIG_LIBS@ - -endif - - -EXTRA_DIST = \ - mod_imagemagick.nsh \ - unmod_imagemagick.nsh diff --git a/synfig-core/trunk/src/modules/mod_imagemagick/main.cpp b/synfig-core/trunk/src/modules/mod_imagemagick/main.cpp deleted file mode 100644 index ae6e16a..0000000 --- a/synfig-core/trunk/src/modules/mod_imagemagick/main.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_imagemagick/main.cpp -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "mptr_imagemagick.h" -#include "trgt_imagemagick.h" -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(mod_imagemagick) - MODULE_NAME("ImageMagick Module") - MODULE_DESCRIPTION("Provides targets and importers for nearly every format that ImageMagick supports") - MODULE_AUTHOR("Robert B. Quattlebaum") - MODULE_VERSION("1.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(mod_imagemagick) - BEGIN_TARGETS - TARGET(imagemagick_trgt) - TARGET_EXT(imagemagick_trgt,"jpg") - TARGET_EXT(imagemagick_trgt,"jpeg") - TARGET_EXT(imagemagick_trgt,"png") - TARGET_EXT(imagemagick_trgt,"tga") - TARGET_EXT(imagemagick_trgt,"tif") - TARGET_EXT(imagemagick_trgt,"tiff") - TARGET_EXT(imagemagick_trgt,"pcx") - TARGET_EXT(imagemagick_trgt,"ps") - TARGET_EXT(imagemagick_trgt,"pdf") - TARGET_EXT(imagemagick_trgt,"pgm") - TARGET_EXT(imagemagick_trgt,"psd") - TARGET_EXT(imagemagick_trgt,"xcf") - TARGET_EXT(imagemagick_trgt,"svg") - TARGET_EXT(imagemagick_trgt,"xpm") - TARGET_EXT(imagemagick_trgt,"miff") - TARGET_EXT(imagemagick_trgt,"eps") - TARGET_EXT(imagemagick_trgt,"cmyk") - TARGET_EXT(imagemagick_trgt,"gif") - END_TARGETS - BEGIN_IMPORTERS - IMPORTER_EXT(imagemagick_mptr,"jpg") - IMPORTER_EXT(imagemagick_mptr,"jpeg") - IMPORTER_EXT(imagemagick_mptr,"png") - IMPORTER_EXT(imagemagick_mptr,"bmp") - IMPORTER_EXT(imagemagick_mptr,"gif") - IMPORTER_EXT(imagemagick_mptr,"pcx") - IMPORTER_EXT(imagemagick_mptr,"tif") - IMPORTER_EXT(imagemagick_mptr,"tiff") - IMPORTER_EXT(imagemagick_mptr,"tga") - IMPORTER_EXT(imagemagick_mptr,"ps") - IMPORTER_EXT(imagemagick_mptr,"pdf") - IMPORTER_EXT(imagemagick_mptr,"pgm") - IMPORTER_EXT(imagemagick_mptr,"psd") - IMPORTER_EXT(imagemagick_mptr,"xcf") - IMPORTER_EXT(imagemagick_mptr,"svg") - IMPORTER_EXT(imagemagick_mptr,"tim") - IMPORTER_EXT(imagemagick_mptr,"xpm") - IMPORTER_EXT(imagemagick_mptr,"miff") - IMPORTER_EXT(imagemagick_mptr,"ico") - IMPORTER_EXT(imagemagick_mptr,"eps") - IMPORTER_EXT(imagemagick_mptr,"ttf") - IMPORTER_EXT(imagemagick_mptr,"pix") - IMPORTER_EXT(imagemagick_mptr,"rla") - IMPORTER_EXT(imagemagick_mptr,"mat") - IMPORTER_EXT(imagemagick_mptr,"html") - IMPORTER_EXT(imagemagick_mptr,"ept") - IMPORTER_EXT(imagemagick_mptr,"dcm") - IMPORTER_EXT(imagemagick_mptr,"fig") - END_IMPORTERS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mod_imagemagick/mod_imagemagick.nsh b/synfig-core/trunk/src/modules/mod_imagemagick/mod_imagemagick.nsh deleted file mode 100644 index b4a1d71..0000000 --- a/synfig-core/trunk/src/modules/mod_imagemagick/mod_imagemagick.nsh +++ /dev/null @@ -1,21 +0,0 @@ -; The stuff to install -Section "mod_imagemagick" Sec_mod_imagemagick - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=mod_imagemagick.dll "src\modules\mod_imagemagick\.libs\libmod_imagemagick.dll" - - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "mod_imagemagick" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_imagemagick/mptr_imagemagick.cpp b/synfig-core/trunk/src/modules/mod_imagemagick/mptr_imagemagick.cpp deleted file mode 100644 index 2860c1f..0000000 --- a/synfig-core/trunk/src/modules/mod_imagemagick/mptr_imagemagick.cpp +++ /dev/null @@ -1,299 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mptr_imagemagick.cpp -** \brief ppm Target Module -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "mptr_imagemagick.h" -#include -#include -#if HAVE_SYS_WAIT_H - #include -#endif -#if HAVE_IO_H - #include -#endif -#if HAVE_PROCESS_H - #include -#endif -#if HAVE_FCNTL_H - #include -#endif -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -#if defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID) - #define UNIX_PIPE_TO_PROCESSES -#else - #define WIN32_PIPE_TO_PROCESSES -#endif - -/* === G L O B A L S ======================================================= */ - -SYNFIG_IMPORTER_INIT(imagemagick_mptr); -SYNFIG_IMPORTER_SET_NAME(imagemagick_mptr,"imagemagick"); -SYNFIG_IMPORTER_SET_EXT(imagemagick_mptr,"miff"); -SYNFIG_IMPORTER_SET_VERSION(imagemagick_mptr,"0.1"); -SYNFIG_IMPORTER_SET_CVS_ID(imagemagick_mptr,"$Id$"); - -/* === M E T H O D S ======================================================= */ - - -imagemagick_mptr::imagemagick_mptr(const char *f) -{ - - filename=f; - file=NULL; -} - -imagemagick_mptr::~imagemagick_mptr() -{ - if(file) - pclose(file); -} - -bool -imagemagick_mptr::get_frame(synfig::Surface &surface,Time /*time*/, synfig::ProgressCallback *cb) -{ -//#define HAS_LIBPNG 1 - -#if 1 - if(filename.empty()) - { - if(cb)cb->error(_("No file to load")); - else synfig::error(_("No file to load")); - return false; - } - string temp_file="/tmp/deleteme.png"; - -#if defined(WIN32_PIPE_TO_PROCESSES) - - if(file) - pclose(file); - - string command; - - if(filename.find("psd")!=String::npos) - command=strprintf("convert \"%s\" -flatten \"png32:%s\"\n",filename.c_str(),temp_file.c_str()); - else - command=strprintf("convert \"%s\" \"png32:%s\"\n",filename.c_str(),temp_file.c_str()); - - if(system(command.c_str())!=0) - return false; - -#elif defined(UNIX_PIPE_TO_PROCESSES) - - string output="png32:"+temp_file; - - pid_t pid = fork(); - - if (pid == -1) { - return false; - } - - if (pid == 0){ - // Child process - if(filename.find("psd")!=String::npos) - execlp("convert", "convert", filename.c_str(), "-flatten", output.c_str(), (const char *)NULL); - else - execlp("convert", "convert", filename.c_str(), output.c_str(), (const char *)NULL); - // We should never reach here unless the exec failed - return false; - } - - int status; - waitpid(pid, &status, 0); - if( (WIFEXITED(status) && WEXITSTATUS(status) != 0) || !WIFEXITED(status) ) - return false; - -#else - #error There are no known APIs for creating child processes -#endif - - Importer::Handle importer(Importer::open(temp_file)); - - if(!importer) - { - if(cb)cb->error(_("Unable to open ")+temp_file); - else synfig::error(_("Unable to open ")+temp_file); - return false; - } - - if(!importer->get_frame(surface,0,cb)) - { - if(cb)cb->error(_("Unable to get frame from ")+temp_file); - else synfig::error(_("Unable to get frame from ")+temp_file); - return false; - } - - if(!surface) - { - if(cb)cb->error(_("Bad surface from ")+temp_file); - else synfig::error(_("Bad surface from ")+temp_file); - return false; - } - - if(1) - { - // remove odd premultiplication - for(int i=0;ierror(_("No file to load")); - else synfig::error(_("No file to load")); - return false; - } - - command=strprintf("convert \"%s\" -flatten ppm:-\n",filename.c_str()); - - file=popen(command.c_str(),POPEN_BINARY_READ_TYPE); - - if(!file) - { - if(cb)cb->error(_("Unable to open pipe to imagemagick")); - else synfig::error(_("Unable to open pipe to imagemagick")); - return false; - } - int w,h; - float divisor; - char cookie[2]; - - while((cookie[0]=fgetc(file))!='P' && !feof(file)); - - if(feof(file)) - { - if(cb)cb->error(_("Reached end of stream without finding PPM header")); - else synfig::error(_("Reached end of stream without finding PPM header")); - return false; - } - - cookie[1]=fgetc(file); - - if(cookie[0]!='P' || cookie[1]!='6') - { - if(cb)cb->error(string(_("stream not in PPM format"))+" \""+cookie[0]+cookie[1]+'"'); - else synfig::error(string(_("stream not in PPM format"))+" \""+cookie[0]+cookie[1]+'"'); - return false; - } - - fgetc(file); - fscanf(file,"%d %d\n",&w,&h); - fscanf(file,"%f",&divisor); - fgetc(file); - - if(feof(file)) - { - if(cb)cb->error(_("Premature end of file (after header)")); - else synfig::error(_("Premature end of file (after header)")); - return false; - } - - int x; - int y; - frame.set_wh(w,h); - for(y=0;yerror(_("Premature end of file")); - else synfig::error(_("Premature end of file")); - return false; - } - float b=gamma().r_U8_to_F32((unsigned char)fgetc(file)); - float g=gamma().g_U8_to_F32((unsigned char)fgetc(file)); - float r=gamma().b_U8_to_F32((unsigned char)fgetc(file)); -/* - float b=(float)(unsigned char)fgetc(file)/divisor; - float g=(float)(unsigned char)fgetc(file)/divisor; - float r=(float)(unsigned char)fgetc(file)/divisor; -*/ - frame[y][x]=Color( - b, - g, - r, - 1.0 - ); - } - - surface=frame; - - return true; -#endif - - -} diff --git a/synfig-core/trunk/src/modules/mod_imagemagick/mptr_imagemagick.h b/synfig-core/trunk/src/modules/mod_imagemagick/mptr_imagemagick.h deleted file mode 100644 index fcd8bdb..0000000 --- a/synfig-core/trunk/src/modules/mod_imagemagick/mptr_imagemagick.h +++ /dev/null @@ -1,62 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mptr_imagemagick.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_MPTR_IMAGEMAGICK_H -#define __SYNFIG_MPTR_IMAGEMAGICK_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include "string.h" -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class imagemagick_mptr : public synfig::Importer -{ - SYNFIG_IMPORTER_MODULE_EXT -private: - synfig::String filename; - FILE *file; - int cur_frame; - synfig::Surface frame; - -public: - imagemagick_mptr(const char *filename); - - ~imagemagick_mptr(); - - virtual bool get_frame(synfig::Surface &surface,synfig::Time time, synfig::ProgressCallback *callback); -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_imagemagick/trgt_imagemagick.cpp b/synfig-core/trunk/src/modules/mod_imagemagick/trgt_imagemagick.cpp deleted file mode 100644 index 32dd839..0000000 --- a/synfig-core/trunk/src/modules/mod_imagemagick/trgt_imagemagick.cpp +++ /dev/null @@ -1,264 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_imagemagick.cpp -** \brief ppm Target Module -** -** \legal -** $Id$ -** -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_TARGET - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "trgt_imagemagick.h" -#include -#include -#if HAVE_SYS_WAIT_H - #include -#endif -#if HAVE_IO_H - #include -#endif -#if HAVE_PROCESS_H - #include -#endif -#if HAVE_FCNTL_H - #include -#endif -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -#if defined(HAVE_FORK) && defined(HAVE_PIPE) && defined(HAVE_WAITPID) - #define UNIX_PIPE_TO_PROCESSES -#else - #define WIN32_PIPE_TO_PROCESSES -#endif - -/* === G L O B A L S ======================================================= */ - -SYNFIG_TARGET_INIT(imagemagick_trgt); -SYNFIG_TARGET_SET_NAME(imagemagick_trgt,"imagemagick"); -SYNFIG_TARGET_SET_EXT(imagemagick_trgt,"miff"); -SYNFIG_TARGET_SET_VERSION(imagemagick_trgt,"0.1"); -SYNFIG_TARGET_SET_CVS_ID(imagemagick_trgt,"$Id$"); - -/* === M E T H O D S ======================================================= */ - -imagemagick_trgt::imagemagick_trgt(const char *Filename) -{ - pid=-1; - file=NULL; - filename=Filename; - multi_image=false; - buffer=NULL; - color_buffer=0; -} - -imagemagick_trgt::~imagemagick_trgt() -{ - if(file){ -#if defined(WIN32_PIPE_TO_PROCESSES) - pclose(file); -#elif defined(UNIX_PIPE_TO_PROCESSES) - fclose(file); - int status; - waitpid(pid,&status,0); -#endif - } - file=NULL; - delete [] buffer; - delete [] color_buffer; -} - -bool -imagemagick_trgt::set_rend_desc(RendDesc *given_desc) -{ - if(filename_extension(filename) == ".xpm") - pf=PF_RGB; - else - pf=PF_RGB|PF_A; - - desc=*given_desc; - return true; -} - -bool -imagemagick_trgt::init() -{ - imagecount=desc.get_frame_start(); - if(desc.get_frame_end()-desc.get_frame_start()>0) - multi_image=true; - - delete [] buffer; - buffer=new unsigned char[channels(pf)*desc.get_w()]; - delete [] color_buffer; - color_buffer=new Color[desc.get_w()]; - return true; -} - -void -imagemagick_trgt::end_frame() -{ - if(file) - { - fputc(0,file); - fflush(file); -#if defined(WIN32_PIPE_TO_PROCESSES) - pclose(file); -#elif defined(UNIX_PIPE_TO_PROCESSES) - fclose(file); - int status; - waitpid(pid,&status,0); -#endif - } - file=NULL; - imagecount++; -} - -bool -imagemagick_trgt::start_frame(synfig::ProgressCallback *cb) -{ - const char *msg=_("Unable to open pipe to imagemagick's convert utility"); - - string newfilename; - - if (multi_image) - newfilename = (filename_sans_extension(filename) + - etl::strprintf(".%04d",imagecount) + - filename_extension(filename)); - else - newfilename = filename; - -#if defined(WIN32_PIPE_TO_PROCESSES) - - string command; - - command=strprintf("convert -depth 8 -size %dx%d rgb%s:-[0] -density %dx%d \"%s\"\n", - desc.get_w(), desc.get_h(), // size - ((channels(pf) == 4) ? "a" : ""), // rgba or rgb? - round_to_int(desc.get_x_res()/39.3700787402), // density - round_to_int(desc.get_y_res()/39.3700787402), - newfilename.c_str()); - - file=popen(command.c_str(),POPEN_BINARY_WRITE_TYPE); - -#elif defined(UNIX_PIPE_TO_PROCESSES) - - int p[2]; - - if (pipe(p)) { - if(cb) cb->error(N_(msg)); - else synfig::error(N_(msg)); - return false; - }; - - pid = fork(); - - if (pid == -1) { - if(cb) cb->error(N_(msg)); - else synfig::error(N_(msg)); - return false; - } - - if (pid == 0){ - // Child process - // Close pipeout, not needed - close(p[1]); - // Dup pipeout to stdin - if( dup2( p[0], STDIN_FILENO ) == -1 ){ - if(cb) cb->error(N_(msg)); - else synfig::error(N_(msg)); - return false; - } - // Close the unneeded pipeout - close(p[0]); - execlp("convert", "convert", - "-depth", "8", - "-size", strprintf("%dx%d", desc.get_w(), desc.get_h()).c_str(), - ((channels(pf) == 4) ? "rgba:-[0]" : "rgb:-[0]"), - "-density", strprintf("%dx%d", round_to_int(desc.get_x_res()/39.3700787402), round_to_int(desc.get_y_res()/39.3700787402)).c_str(), - newfilename.c_str(), - (const char *)NULL); - // We should never reach here unless the exec failed - if(cb) cb->error(N_(msg)); - else synfig::error(N_(msg)); - return false; - } else { - // Parent process - // Close pipein, not needed - close(p[0]); - // Save pipeout to file handle, will write to it later - file = fdopen(p[1], "wb"); - } - -#else - #error There are no known APIs for creating child processes -#endif - - if(!file) - { - if(cb)cb->error(N_(msg)); - else synfig::error(N_(msg)); - return false; - } - - //etl::yield(); - - return true; -} - -Color * -imagemagick_trgt::start_scanline(int /*scanline*/) -{ - return color_buffer; -} - -bool -imagemagick_trgt::end_scanline(void) -{ - if(!file) - return false; - - convert_color_format(buffer, color_buffer, desc.get_w(), pf, gamma()); - - if(!fwrite(buffer,channels(pf),desc.get_w(),file)) - return false; - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_imagemagick/trgt_imagemagick.h b/synfig-core/trunk/src/modules/mod_imagemagick/trgt_imagemagick.h deleted file mode 100644 index 2a9a171..0000000 --- a/synfig-core/trunk/src/modules/mod_imagemagick/trgt_imagemagick.h +++ /dev/null @@ -1,70 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_imagemagick.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TRGT_IMAGEMAGICK_H -#define __SYNFIG_TRGT_IMAGEMAGICK_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - - -class imagemagick_trgt : public synfig::Target_Scanline -{ - SYNFIG_TARGET_MODULE_EXT -private: - pid_t pid; - int imagecount; - bool multi_image; - FILE *file; - synfig::String filename; - unsigned char *buffer; - synfig::Color *color_buffer; - synfig::PixelFormat pf; -public: - imagemagick_trgt(const char *filename); - virtual ~imagemagick_trgt(); - - virtual bool set_rend_desc(synfig::RendDesc *desc); - virtual bool init(); - virtual bool start_frame(synfig::ProgressCallback *cb); - virtual void end_frame(); - virtual synfig::Color * start_scanline(int scanline); - virtual bool end_scanline(); -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_imagemagick/unmod_imagemagick.nsh b/synfig-core/trunk/src/modules/mod_imagemagick/unmod_imagemagick.nsh deleted file mode 100644 index a849b55..0000000 --- a/synfig-core/trunk/src/modules/mod_imagemagick/unmod_imagemagick.nsh +++ /dev/null @@ -1,8 +0,0 @@ -Section "un.mod_imagemagick" - Delete "$INSTDIR\lib\synfig\modules\mod_imagemagick.dll" - RMDir "$INSTDIR\lib\synfig\modules" - RMDir "$INSTDIR\lib\synfig" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_jpeg/Makefile.am b/synfig-core/trunk/src/modules/mod_jpeg/Makefile.am deleted file mode 100644 index f963df5..0000000 --- a/synfig-core/trunk/src/modules/mod_jpeg/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -moduledir = @MODULE_DIR@ - -if HAVE_LIBJPEG - -module_LTLIBRARIES = libmod_jpeg.la - -libmod_jpeg_la_SOURCES = \ - main.cpp \ - trgt_jpeg.cpp \ - trgt_jpeg.h \ - mptr_jpeg.cpp \ - mptr_jpeg.h - -libmod_jpeg_la_LDFLAGS = \ - -module \ - @JPEG_LIBS@ \ - -no-undefined \ - -avoid-version - -libmod_jpeg_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ - -libmod_jpeg_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @SYNFIG_LIBS@ - -endif - - -EXTRA_DIST = \ - mod_jpeg.nsh \ - unmod_jpeg.nsh diff --git a/synfig-core/trunk/src/modules/mod_jpeg/main.cpp b/synfig-core/trunk/src/modules/mod_jpeg/main.cpp deleted file mode 100644 index 7b5c647..0000000 --- a/synfig-core/trunk/src/modules/mod_jpeg/main.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_jpeg/main.cpp -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "trgt_jpeg.h" -#include "mptr_jpeg.h" -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(mod_jpeg) - MODULE_NAME("JPEG Module (libjpeg)") - MODULE_DESCRIPTION("Provides a JPEG target and importer") - MODULE_AUTHOR("Robert B. Quattlebaum Jr") - MODULE_VERSION("1.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(mod_jpeg) - BEGIN_TARGETS - TARGET(jpeg_trgt) - TARGET_EXT(jpeg_trgt,"jpeg") - TARGET_EXT(jpeg_trgt,"jpg") - END_TARGETS - BEGIN_IMPORTERS - IMPORTER_EXT(jpeg_mptr,"jpg") - IMPORTER_EXT(jpeg_mptr,"jpeg") - END_IMPORTERS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mod_jpeg/mod_jpeg.nsh b/synfig-core/trunk/src/modules/mod_jpeg/mod_jpeg.nsh deleted file mode 100644 index 2468ddb..0000000 --- a/synfig-core/trunk/src/modules/mod_jpeg/mod_jpeg.nsh +++ /dev/null @@ -1,21 +0,0 @@ -; The stuff to install -Section "mod_jpeg" Sec_mod_jpeg - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=mod_jpeg.dll "src\modules\mod_jpeg\.libs\libmod_jpeg.dll" - - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "mod_jpeg" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_jpeg/mptr_jpeg.cpp b/synfig-core/trunk/src/modules/mod_jpeg/mptr_jpeg.cpp deleted file mode 100644 index 84f5403..0000000 --- a/synfig-core/trunk/src/modules/mod_jpeg/mptr_jpeg.cpp +++ /dev/null @@ -1,256 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mptr_jpeg.cpp -** \brief ppm Target Module -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/*! \todo Support 16 bit JPEG files -** \todo Support for paletted JPEG files -** \todo Support GAMMA correction -** \todo Fix memory leaks -*/ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "mptr_jpeg.h" -#include -#include -#include - - -#include -#include -#include -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -#define JPEG_CHECK_BYTES 8 - -/* === G L O B A L S ======================================================= */ - -SYNFIG_IMPORTER_INIT(jpeg_mptr); -SYNFIG_IMPORTER_SET_NAME(jpeg_mptr,"jpeg"); -SYNFIG_IMPORTER_SET_EXT(jpeg_mptr,"jpg"); -SYNFIG_IMPORTER_SET_VERSION(jpeg_mptr,"0.1"); -SYNFIG_IMPORTER_SET_CVS_ID(jpeg_mptr,"$Id$"); - -/* === M E T H O D S ======================================================= */ - -struct my_error_mgr { - struct jpeg_error_mgr pub; /* "public" fields */ - - jmp_buf setjmp_buffer; /* for return to caller */ -}; - -typedef struct my_error_mgr * my_error_ptr; - -/* - * Here's the routine that will replace the standard error_exit method: - */ - -void -jpeg_mptr::my_error_exit (j_common_ptr cinfo) -{ - /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */ - my_error_ptr myerr = (my_error_ptr) cinfo->err; - - /* Always display the message. */ - /* We could postpone this until after returning, if we chose. */ - (*cinfo->err->output_message) (cinfo); - - /* Return control to the setjmp point */ - longjmp(myerr->setjmp_buffer, 1); -} - - - - - -jpeg_mptr::jpeg_mptr(const char *file_name) -{ - struct my_error_mgr jerr; - filename=file_name; - - /* Open the file pointer */ - FILE *file = fopen(file_name, "rb"); - if (!file) - { - //! \todo THROW SOMETHING - throw String("error on importer construction, *WRITEME*1"); - return; - } - - /* Step 1: allocate and initialize JPEG decompression object */ - - /* We set up the normal JPEG error routines, then override error_exit. */ - cinfo.err = jpeg_std_error(&jerr.pub); - jerr.pub.error_exit = my_error_exit; - /* Establish the setjmp return context for my_error_exit to use. */ - if (setjmp(jerr.setjmp_buffer)) { - /* If we get here, the JPEG code has signaled an error. - * We need to clean up the JPEG object, close the input file, and return. - */ - jpeg_destroy_decompress(&cinfo); - fclose(file); - throw String("error on importer construction, *WRITEME*2"); - } - /* Now we can initialize the JPEG decompression object. */ - jpeg_create_decompress(&cinfo); - - /* Step 2: specify data source (eg, a file) */ - - jpeg_stdio_src(&cinfo, file); - - /* Step 3: read file parameters with jpeg_read_header() */ - - (void) jpeg_read_header(&cinfo, TRUE); - /* We can ignore the return value from jpeg_read_header since - * (a) suspension is not possible with the stdio data source, and - * (b) we passed TRUE to reject a tables-only JPEG file as an error. - * See libjpeg.doc for more info. - */ - - /* Step 4: set parameters for decompression */ - - /* In this example, we don't need to change any of the defaults set by - * jpeg_read_header(), so we do nothing here. - */ - - /* Step 5: Start decompressor */ - - (void) jpeg_start_decompress(&cinfo); - /* We can ignore the return value since suspension is not possible - * with the stdio data source. - */ - - JSAMPARRAY buffer; /* Output row buffer */ - int row_stride; /* physical row width in output buffer */ - row_stride = cinfo.output_width * cinfo.output_components; - /* Make a one-row-high sample array that will go away when done with image */ - buffer = (*cinfo.mem->alloc_sarray)((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1); - - if(!buffer) - { - synfig::error("jpeg_mptr: error: alloc of \"buffer\" failed (bug?)"); - throw String("alloc of \"buffer\" failed (bug?)"); - } - - int x; - int y; - surface_buffer.set_wh(cinfo.output_width,cinfo.output_height); - - switch(cinfo.output_components) - { - case 3: - for(y=0;y -#include -#include -_ETL_BEGIN_CDECLS -#include -_ETL_END_CDECLS -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class jpeg_mptr : public synfig::Importer -{ - SYNFIG_IMPORTER_MODULE_EXT -private: - synfig::String filename; - synfig::Surface surface_buffer; - - struct jpeg_decompress_struct cinfo; - - static void my_error_exit (j_common_ptr cinfo); - -public: - jpeg_mptr(const char *filename); - ~jpeg_mptr(); - - virtual bool get_frame(synfig::Surface &surface,synfig::Time time, synfig::ProgressCallback *callback); -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_jpeg/trgt_jpeg.cpp b/synfig-core/trunk/src/modules/mod_jpeg/trgt_jpeg.cpp deleted file mode 100644 index 3ff854d..0000000 --- a/synfig-core/trunk/src/modules/mod_jpeg/trgt_jpeg.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_jpeg.cpp -** \brief jpeg_trgt Target Module -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_TARGET - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "trgt_jpeg.h" -#include -#include -#include -#include -#include -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_TARGET_INIT(jpeg_trgt); -SYNFIG_TARGET_SET_NAME(jpeg_trgt,"jpeg"); -SYNFIG_TARGET_SET_EXT(jpeg_trgt,"jpg"); -SYNFIG_TARGET_SET_VERSION(jpeg_trgt,"0.1"); -SYNFIG_TARGET_SET_CVS_ID(jpeg_trgt,"$Id$"); - -/* === M E T H O D S ======================================================= */ - -jpeg_trgt::jpeg_trgt(const char *Filename) -{ - file=NULL; - filename=Filename; - buffer=NULL; - ready=false; - quality=95; - color_buffer=0; - set_remove_alpha(); -} - -jpeg_trgt::~jpeg_trgt() -{ - if(ready) - { - jpeg_finish_compress(&cinfo); - jpeg_destroy_compress(&cinfo); - ready=false; - } - if(file) - fclose(file); - file=NULL; - delete [] buffer; - delete [] color_buffer; -} - -bool -jpeg_trgt::set_rend_desc(RendDesc *given_desc) -{ - desc=*given_desc; - imagecount=desc.get_frame_start(); - if(desc.get_frame_end()-desc.get_frame_start()>0) - multi_image=true; - else - multi_image=false; - return true; -} - -bool -jpeg_trgt::start_frame(synfig::ProgressCallback *callback) -{ - int w=desc.get_w(),h=desc.get_h(); - - if(file && file!=stdout) - fclose(file); - if(filename=="-") - { - if(callback)callback->task(strprintf("(stdout) %d",imagecount).c_str()); - file=stdout; - } - else if(multi_image) - { - String newfilename(filename_sans_extension(filename) + - etl::strprintf(".%04d",imagecount) + - filename_extension(filename)); - file=fopen(newfilename.c_str(),POPEN_BINARY_WRITE_TYPE); - if(callback)callback->task(newfilename); - } - else - { - file=fopen(filename.c_str(),POPEN_BINARY_WRITE_TYPE); - if(callback)callback->task(filename); - } - - if(!file) - return false; - - delete [] buffer; - buffer=new unsigned char[3*w]; - - delete [] color_buffer; - color_buffer=new Color[w]; - - - cinfo.err = jpeg_std_error(&jerr); - jpeg_create_compress(&cinfo); - jpeg_stdio_dest(&cinfo, file); - - cinfo.image_width = w; /* image width and height, in pixels */ - cinfo.image_height = h; - cinfo.input_components = 3; /* # of color components per pixel */ - cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ - /* Now use the library's routine to set default compression parameters. - * (You must set at least cinfo.in_color_space before calling this, - * since the defaults depend on the source color space.) - */ - jpeg_set_defaults(&cinfo); - /* Now you can set any non-default parameters you wish to. - * Here we just illustrate the use of quality (quantization table) scaling: - */ - jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */); - - /* Step 4: Start compressor */ - - /* TRUE ensures that we will write a complete interchange-JPEG file. - * Pass TRUE unless you are very sure of what you're doing. - */ - jpeg_start_compress(&cinfo, TRUE); - - ready=true; - return true; -} - -void -jpeg_trgt::end_frame() -{ - if(ready) - { - jpeg_finish_compress(&cinfo); - jpeg_destroy_compress(&cinfo); - ready=false; - } - - if(file && file!=stdout) - fclose(file); - file=NULL; - imagecount++; -} - -Color * -jpeg_trgt::start_scanline(int /*scanline*/) -{ - return color_buffer; -} - -bool -jpeg_trgt::end_scanline() -{ - if(!file || !ready) - return false; - - convert_color_format(buffer, color_buffer, desc.get_w(), PF_RGB,gamma()); - JSAMPROW *row_pointer(&buffer); - jpeg_write_scanlines(&cinfo, row_pointer, 1); - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_jpeg/trgt_jpeg.h b/synfig-core/trunk/src/modules/mod_jpeg/trgt_jpeg.h deleted file mode 100644 index 65518d0..0000000 --- a/synfig-core/trunk/src/modules/mod_jpeg/trgt_jpeg.h +++ /dev/null @@ -1,76 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_jpeg.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TRGT_JPEG_H -#define __SYNFIG_TRGT_JPEG_H - -/* === H E A D E R S ======================================================= */ - -#define NOMINMAX -#include -#include -#include -_ETL_BEGIN_CDECLS -#include -_ETL_END_CDECLS -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class jpeg_trgt : public synfig::Target_Scanline -{ - SYNFIG_TARGET_MODULE_EXT -private: - FILE *file; - int w,h,quality; - struct jpeg_compress_struct cinfo; - struct jpeg_error_mgr jerr; - - - bool multi_image,ready; - int imagecount; - synfig::String filename; - unsigned char *buffer; - synfig::Color *color_buffer; -public: - jpeg_trgt(const char *filename); - virtual ~jpeg_trgt(); - - virtual bool set_rend_desc(synfig::RendDesc *desc); - virtual bool start_frame(synfig::ProgressCallback *cb); - virtual void end_frame(); - - virtual synfig::Color * start_scanline(int scanline); - virtual bool end_scanline(); -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_jpeg/unmod_jpeg.nsh b/synfig-core/trunk/src/modules/mod_jpeg/unmod_jpeg.nsh deleted file mode 100644 index 56c9547..0000000 --- a/synfig-core/trunk/src/modules/mod_jpeg/unmod_jpeg.nsh +++ /dev/null @@ -1,8 +0,0 @@ -Section "un.mod_jpeg" - Delete "$INSTDIR\lib\synfig\modules\mod_jpeg.dll" - RMDir "$INSTDIR\lib\synfig\modules" - RMDir "$INSTDIR\lib\synfig" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_libavcodec/Makefile.am b/synfig-core/trunk/src/modules/mod_libavcodec/Makefile.am deleted file mode 100644 index fddc613..0000000 --- a/synfig-core/trunk/src/modules/mod_libavcodec/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -moduledir = @MODULE_DIR@ - -if WITH_LIBAVCODEC - -module_LTLIBRARIES = libmod_libavcodec.la - -libmod_libavcodec_la_SOURCES = \ - main.cpp \ - trgt_av.cpp \ - trgt_av.h \ - mptr.cpp \ - mptr.h - -libmod_libavcodec_la_LDFLAGS = \ - -module -no-undefined -avoid-version - -libmod_libavcodec_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ \ - @LIBAVCODEC_CFLAGS@ \ - @LIBSWSCALE_CFLAGS@ \ - -D__STDC_CONSTANT_MACROS - -libmod_libavcodec_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @SYNFIG_LIBS@ \ - @LIBAVCODEC_LIBS@ \ - @LIBSWSCALE_LIBS@ - -endif - - -EXTRA_DIST = \ - mod_libavcodec.nsh \ - unmod_libavcodec.nsh diff --git a/synfig-core/trunk/src/modules/mod_libavcodec/main.cpp b/synfig-core/trunk/src/modules/mod_libavcodec/main.cpp deleted file mode 100644 index 70fa9c5..0000000 --- a/synfig-core/trunk/src/modules/mod_libavcodec/main.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_libavcodec/main.cpp -** \brief writeme -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_NO_ANGLE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include - -//#include "mptr.h" -#include "trgt_av.h" - -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(mod_libavcodec) - MODULE_NAME("LibAVCodec Module (From FFMPEG)") - MODULE_DESCRIPTION("Provides import/export ability for AVI, MPG, ASF, and a variety of other formats.") - MODULE_AUTHOR("Adrian Bentley") - MODULE_VERSION("0.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(mod_libavcodec) - BEGIN_TARGETS - TARGET(Target_LibAVCodec) - //TARGET_EXT(Target_LibAVCodec,"mpg") - //TARGET_EXT(Target_LibAVCodec,"mpeg") - //TARGET_EXT(Target_LibAVCodec,"mov") - TARGET_EXT(Target_LibAVCodec,"asf") - TARGET_EXT(Target_LibAVCodec,"rm") - //TARGET_EXT(Target_LibAVCodec,"mpg") - TARGET_EXT(Target_LibAVCodec,"wmv") - TARGET_EXT(Target_LibAVCodec,"yuv") - //TARGET_EXT(Target_LibAVCodec,"dv") - END_TARGETS - BEGIN_IMPORTERS -// IMPORTER(bmp_mptr) - END_IMPORTERS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mod_libavcodec/mod_libavcodec.nsh b/synfig-core/trunk/src/modules/mod_libavcodec/mod_libavcodec.nsh deleted file mode 100644 index 12778b6..0000000 --- a/synfig-core/trunk/src/modules/mod_libavcodec/mod_libavcodec.nsh +++ /dev/null @@ -1,21 +0,0 @@ -; The stuff to install -Section "mod_libavcodec" Sec_mod_libavcodec - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=mod_libavcodec.dll "src\modules\mod_libavcodec\.libs\libmod_libavcodec.dll" - - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "mod_libavcodec" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_libavcodec/mptr.cpp b/synfig-core/trunk/src/modules/mod_libavcodec/mptr.cpp deleted file mode 100644 index 667968b..0000000 --- a/synfig-core/trunk/src/modules/mod_libavcodec/mptr.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mptr.cpp -** \brief writeme -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_NO_ANGLE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "mptr.h" -#include -#include - -#include -#include -#endif - -/* === U S I N G =========================================================== */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_IMPORTER_INIT(Importer_LibAVCodec); -SYNFIG_IMPORTER_SET_NAME(Importer_LibAVCodec,"libav"); -SYNFIG_IMPORTER_SET_EXT(Importer_LibAVCodec,"avi"); -SYNFIG_IMPORTER_SET_VERSION(Importer_LibAVCodec,"0.1"); -SYNFIG_IMPORTER_SET_CVS_ID(Importer_LibAVCodec,"$Id$"); - -/* === M E T H O D S ======================================================= */ - - -Importer_LibAVCodec::Importer_LibAVCodec(const char *file): - filename(file) -{ -} - -Importer_LibAVCodec::~Importer_LibAVCodec() -{ -} - -bool -Importer_LibAVCodec::get_frame(synfig::Surface &/*surface*/,Time, synfig::ProgressCallback */*cb*/) -{ - return false; -} diff --git a/synfig-core/trunk/src/modules/mod_libavcodec/mptr.h b/synfig-core/trunk/src/modules/mod_libavcodec/mptr.h deleted file mode 100644 index f7cb41f..0000000 --- a/synfig-core/trunk/src/modules/mod_libavcodec/mptr.h +++ /dev/null @@ -1,57 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mptr.h -** \brief writeme -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_MPTR_H -#define __SYNFIG_MPTR_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class Importer_LibAVCodec : public synfig::Importer -{ -SYNFIG_IMPORTER_MODULE_EXT - -private: - synfig::String filename; - -public: - Importer_LibAVCodec(const char *filename); - ~Importer_LibAVCodec(); - - virtual bool get_frame(synfig::Surface &surface,synfig::Time time, synfig::ProgressCallback *callback); -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_libavcodec/trgt_av.cpp b/synfig-core/trunk/src/modules/mod_libavcodec/trgt_av.cpp deleted file mode 100644 index 5ad733a..0000000 --- a/synfig-core/trunk/src/modules/mod_libavcodec/trgt_av.cpp +++ /dev/null @@ -1,983 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_av.cpp -** \brief \writeme -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Paul Wise -** Copyright (c) 2008 Gerco Ballintijn -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_NO_ANGLE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "trgt_av.h" - -extern "C" -{ - -/* - ffmpeg library headers have historically had multiple locations. - We should check all of the locations to be more portable. -*/ - -#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H -# include -#elif defined(HAVE_AVFORMAT_H) -# include -#elif defined(HAVE_FFMPEG_AVFORMAT_H) -# include -#endif - -#ifdef WITH_LIBSWSCALE -#ifdef HAVE_LIBSWSCALE_SWSCALE_H -# include -#elif defined(HAVE_SWSCALE_H) -# include -#elif defined(HAVE_FFMPEG_SWSCALE_H) -# include -#endif -#endif - -} - -#include - -#include -#include -#include -#endif - -#ifdef WIN32 -#define snprintf _snprintf -#endif - -/* === U S I N G =========================================================== */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === I N F O ============================================================= */ - -SYNFIG_TARGET_INIT(Target_LibAVCodec); -SYNFIG_TARGET_SET_NAME(Target_LibAVCodec,"libav"); -SYNFIG_TARGET_SET_EXT(Target_LibAVCodec,"avi"); -SYNFIG_TARGET_SET_VERSION(Target_LibAVCodec,"0.1"); -SYNFIG_TARGET_SET_CVS_ID(Target_LibAVCodec,"$Id$"); - -/* === C L A S S E S & S T R U C T S ======================================= */ - -bool Target_LibAVCodec::registered = false; - -//for now compilation -//float STREAM_DURATION = 5.0f; - -struct VideoInfo -{ - int w,h; - int fps; - - int bitrate; -}; - -struct AudioInfo -{ - int samplerate; //in HZ - int samplesize; //in bytes -}; - -AVFrame *alloc_picture(int pix_fmt, int width, int height) -{ - AVFrame *picture; - uint8_t *picture_buf; - int size; - - picture = avcodec_alloc_frame(); - if (!picture) - return NULL; - size = avpicture_get_size(pix_fmt, width, height); - picture_buf = (uint8_t *)malloc(size); - if (!picture_buf) { - av_free(picture); - return NULL; - } - avpicture_fill((AVPicture *)picture, picture_buf, - pix_fmt, width, height); - return picture; -} - -void free_picture(AVFrame *pic) -{ - av_free(pic->data[0]); - av_free(pic); -} - -//the frame must be RGB24 -static void convert_surface_frame(AVFrame *pic, const Surface &s, const Gamma &gamma) -{ - unsigned int j; - Surface::const_pen p = s.begin(); - unsigned int w,h; - Color c; - - uint8_t *ptr; - int stride; - - w = s.size().x; - h = s.size().y; - - ptr = pic->data[0]; - stride = pic->linesize[0]; - - for(j = 0; j < h; j++, p.inc_y(), ptr += stride) - { - uint8_t *tptr = ptr; - - //use convert_color_format instead... - #if 0 - const int channels = 3; - - for(int i = 0; i < w; i++, p.inc_x(), tptr += channels) - { - c = p.get_value(); - - Color::value_type r = c.get_r(); - Color::value_type g = c.get_g(); - Color::value_type b = c.get_b(); - Color::value_type a = c.get_a(); - - //premultiply alpha - r *= a; - g *= a; - b *= a; - - //essentially treats it as if it has a background color of black - - //we must also clamp the rgb values [0,1] - r = min(1.0f,r); - g = min(1.0f,g); - b = min(1.0f,b); - - r = max(0.0f,r); - g = max(0.0f,g); - b = max(0.0f,b); - - //now scale to range of char [0,255] - tptr[0] = (int)(r*255); - tptr[1] = (int)(g*255); - tptr[2] = (int)(b*255); - } - - p.dec_x(w); - #else - - convert_color_format((unsigned char *)tptr,&p.get_value(),w,PF_RGB,gamma); - - #endif - } -} - -//Audio Streamer (abstracts the open, write and close operations for audio streams) -#if 0 -class AudioEncoder -{ -public: - - void *samples; - - vectoraudiobuffer; - - int audio_input_frame_size; - - bool open(AVFormatContext *formatc, AVStream *stream) - { - AVCodecContext *context; - AVCodec *codec; - - context = &stream->codec; - - //find audio encoder - codec = avcodec_find_encoder(context->codec_id); - if(!codec) - { - synfig::warning("audio-open: could not find codec"); - return 0; - } - - //open the codec - if(avcodec_open(context, codec) < 0) - { - synfig::warning("audio-open: could not open codec"); - return 0; - } - - /* hardcoded example for generating samples array*/ - /* - t = 0; - tincr = 2 * M_PI * 110.0 / c->sample_rate; - tincr2 = 2 * M_PI * 110.0 / c->sample_rate / c->sample_rate;*/ - - audiobuffer.resize(10000); - - /* ugly hack for PCM codecs (will be removed ASAP with new PCM - support to compute the input frame size in samples */ - if (context->frame_size <= 1) { - audio_input_frame_size = audiobuffer.size() / context->channels; - switch(stream->codec.codec_id) { - case CODEC_ID_PCM_S16LE: - case CODEC_ID_PCM_S16BE: - case CODEC_ID_PCM_U16LE: - case CODEC_ID_PCM_U16BE: - audio_input_frame_size >>= 1; - break; - default: - break; - } - } else { - audio_input_frame_size = context->frame_size; - } - - //hardcoded array - //samples = (int16_t *)malloc(audio_input_frame_size * 2 * c->channels); - - return true; - } - - bool write_frame(AVFormatContext *formatc, AVStream *stream, void *samples) - { - int size; - AVCodecContext *context; - - context = &stream->codec; - - //hardcoded in example - //must read in from somewhere... - //get_audio_frame(samples, audio_input_frame_size, c->channels); - - //encode the audio - const short int*samps=(const short int *)samples; //assuming it's set from somewhere right now - - size = avcodec_encode_audio(context, &audiobuffer[0], audiobuffer.size(), samps); - - //write the compressed audio to a file - if(av_write_frame(formatc, stream->index, &audiobuffer[0], size) != 0) - { - synfig::warning("audio-write_frame: unable to write the entire audio frame"); - return 0; - } - - return true; - } - - void close(AVFormatContext *formatc, AVStream *stream) - { - //we may also want to catch delayed frames from here (don't for now) - - if(stream) - { - avcodec_close(&stream->codec); - } - - //if(samples)av_free(samples); - audiobuffer.resize(0); - } -}; - -#endif - -class VideoEncoder -{ -public: - AVFrame *encodable; //for compression and output to a file (in compatible pixel format) - - vector videobuffer; - - bool startedencoding; - - //int stream_nb_frames; - - bool open(AVFormatContext *formatc, AVStream *stream) - { - if(!formatc || !stream) - { - synfig::warning("Attempt to open a video codec with a bad format or stream"); - return false; - } - - //codec and context - AVCodec *codec; - AVCodecContext *context; - - //get from inside stream - context = stream->codec; - - //search for desired codec (contained in the stream) - codec = avcodec_find_encoder(context->codec_id); - if(!codec) - { - synfig::warning("Open_video: could not find desired codec"); - return 0; - } - - //try to open the codec - if(avcodec_open(context, codec) < 0) - { - synfig::warning("open_video: could not open desired codec"); - return 0; - } - - videobuffer.resize(0); - if(!(formatc->oformat->flags & AVFMT_RAWPICTURE)) - { - //resize buffer to desired buffersize - videobuffer.resize(200000); //TODO: need to figure out a good size - } - - //allocate the base picture which will be used to encode - /*picture = alloc_picture(PIX_FMT_RGBA32, context->width, context->height); - if(!picture) - { - synfig::warning("open_video: could not allocate the picture to be encoded"); - return 0; - }*/ - - //if our output (rgb) needs to be translated to a different coordinate system, need a temporary picture in that color space - - /* Should use defaults of RGB - Possible formats: - PIX_FMT_RGB24 - PIX_FMT_BGR24 - PIX_FMT_RGBA32 //stored in cpu endianness (!!!!) - - (possibly translate directly to required coordinate systems later on... less error) - */ - encodable = NULL; - if(context->pix_fmt != PIX_FMT_RGB24) - { - encodable = alloc_picture(context->pix_fmt, context->width, context->height); - if(!encodable) - { - synfig::warning("open_video: could not allocate encodable picture"); - return 0; - } - } - - return true; - } - - //write a frame with the frame passed in - bool write_frame(AVFormatContext *formatc, AVStream *stream, AVFrame *pict) - { - if(!formatc || !stream) - { - synfig::warning("Attempt to open a video codec with a bad format or stream"); - return false; - } - - int size, - ret = 0; - AVCodecContext *context = stream->codec; - - /* - If pict is invalid (NULL), then we are done compressing frames and we are trying to get - the buffer cleared out (or if it's already in the right format) so no transform necessary - */ - if ( pict ) - { - startedencoding = true; - } - - - if ( pict && context->pix_fmt != PIX_FMT_RGB24 ) - { - //We're using RGBA at the moment, write custom conversion code later (get less accuracy errors) -#ifdef WITH_LIBSWSCALE - struct SwsContext* img_convert_ctx = - sws_getContext(context->width, context->height, PIX_FMT_RGB24, - context->width, context->height, context->pix_fmt, - SWS_BICUBIC, NULL, NULL, NULL); - - sws_scale(img_convert_ctx, pict->data, pict->linesize, - - 0, context->height, encodable->data, - encodable->linesize); - - sws_freeContext (img_convert_ctx); -#else - img_convert((AVPicture *)encodable, context->pix_fmt, - (AVPicture *)pict, PIX_FMT_RGB24, - context->width, context->height); -#endif - - pict = encodable; - } - - AVPacket pkt; - av_init_packet(&pkt); - pkt.stream_index = stream->index; - pkt.data = (uint8_t *)pict; - pkt.size = sizeof(AVPicture); - if( context->coded_frame ) - pkt.pts = context->coded_frame->pts; - if( context->coded_frame && context->coded_frame->key_frame) - pkt.flags |= PKT_FLAG_KEY; - - //kluge for raw picture format (they said they'd fix) - if (formatc->oformat->flags & AVFMT_RAWPICTURE) - { - ret = av_write_frame(formatc, &pkt); - } - else - { - //encode our given image - size = avcodec_encode_video(context, &videobuffer[0], videobuffer.size(), pict); - - //if greater than zero we've got stuff to write - if (size > 0) - { - av_init_packet(&pkt); - pkt.stream_index = stream->index; - pkt.data = &videobuffer[0]; - pkt.size = size; - if( context->coded_frame ) - pkt.pts = context->coded_frame->pts; - if( context->coded_frame && context->coded_frame->key_frame) - pkt.flags |= PKT_FLAG_KEY; - - ret = av_write_frame(formatc, &pkt); - - //error detect - possibly throw later... - if(ret < 0) - { - synfig::warning("write_frame: error while writing video frame"); - return false; - } - } - //if 0, it was buffered (if invalid picture we don't have ANY data left) - else - { - //if we're clearing the buffers and there was no stuff to be written, we're done (like in codec example) - if(pict == NULL) - { - return false; - startedencoding = false; - } - - //buffered picture - } - } - - return true; - } - - void close(AVFormatContext */*formatc*/, AVStream *stream) - { - if(stream) - avcodec_close(stream->codec); - - if (encodable) - { - free_picture(encodable); - encodable = 0; - } - - videobuffer.resize(0); - } -}; - -class Target_LibAVCodec::LibAVEncoder -{ -public: - - bool initialized; - - AVOutputFormat *format; //reference to global, do not delete - - AVFormatContext *formatc; - - AVStream *video_st; - //AVStream *audio_st; - - double video_pts; - //double audio_pts; - - VideoEncoder vid; - VideoInfo vInfo; - - /*AudioEncoder aud; - AudioInfo aInfo;*/ - - AVFrame *picture; //for encoding to RGB24 (perhaps RGBA later) - - int frame_count; - int num_frames; - - LibAVEncoder() - { - format = 0; - formatc = 0; - - //video settings - video_st = 0; - video_pts = 0; - - vid.encodable = 0; - //vid.stream_nb_frames = 2; //reasonable default - - initialized = false; - picture = 0; - - frame_count = 0; - num_frames = 0; - - //aud.samples = 0; - //audio_st = 0; - //audio_pts = 0; - } - - ~LibAVEncoder() - { - CleanUp(); - } - - bool Initialize(const char *filename, const char *typestring) - { - //guess if we have a type string, otherwise use filename - if (typestring) - { - //formatptr guess_format(type, filename, MIME type) - format = guess_format(typestring,NULL,NULL); - } - else - { - format = guess_format(NULL, filename, NULL); - } - - if(!format) - { - synfig::warning("Unable to Guess the output, defaulting to mpeg"); - format = guess_format("mpeg", NULL, NULL); - } - - if(!format) - { - synfig::warning("Unable to find output format"); - return 0; - } - - //allocate the output context - formatc = (AVFormatContext *)av_mallocz(sizeof(AVFormatContext)); - if(!formatc) - { - synfig::warning("Memory error\n"); - return 0; - } - //set the output format to the one we found - formatc->oformat = format; - - //print the output filename - snprintf(formatc->filename, sizeof(formatc->filename), "%s", filename); - - //initial - video_st = NULL; - //audio_st = NULL; - - //video stream - if(format->video_codec != CODEC_ID_NONE) - { - video_st = add_video_stream(format->video_codec,vInfo); - if(!video_st) - { - av_free(formatc); - } - } - - //audio stream - /*if(format->audio_codec != CODEC_ID_NONE) - { - audio_st = add_audio_stream(format->audio_codec,aInfo); - }*/ - - //set output parameters: required in ALL cases - - video_st->codec->time_base= (AVRational){1,vInfo.fps}; - video_st->codec->width = vInfo.w; - video_st->codec->height = vInfo.h; - video_st->codec->pix_fmt = PIX_FMT_YUV420P; - - //dump the formatting information as the file header - dump_format(formatc, 0, filename, 1); - - //open codecs and allocate buffers - if(video_st) - { - if(!vid.open(formatc, video_st)) - { - synfig::warning("Could not open video encoder"); - return 0; - } - } - /*if(audio_st) - { - if(!aud.open(formatc, audio_st)) - { - synfig::warning("Could not open audio encoder"); - return 0; - } - }*/ - - //open output file - if(!(format->flags & AVFMT_NOFILE)) - { - //use libav's file open function (what does it do differently????) - if(url_fopen(&formatc->pb, filename, URL_WRONLY) < 0) - { - synfig::warning("Unable to open file: %s", filename); - return 0; - } - } - - //allocate the picture to render to - //may have to retrieve the width, height from the codec... for resizing... - picture = alloc_picture(PIX_FMT_RGB24,vInfo.w,vInfo.h);//video_st->codec.width, video_st->codec.height); - if(!picture) - { - synfig::warning("Unable to allocate the temporary AVFrame surface"); - return 0; - } - - initialized = true; - //vInfo.w = video_st->codec.width; - //vInfo.h = video_st->codec.height; - - //write the stream header - av_write_header(formatc); - - return true; - } - - void CleanUp() - { - unsigned int i; - - if(picture) free_picture(picture); - - //do all the clean up file rendering - if(formatc && video_st) - { - //want to scan in delayed frames until no longer needed (TODO) - if(vid.startedencoding) while( vid.write_frame(formatc, video_st, 0) ); - - //may want to move this... probably to the end of the last frame... - av_write_trailer(formatc); - } - - //close codecs - if (video_st) - vid.close(formatc,video_st); - /*if (audio_st) - aud.close(formatc,audio_st);*/ - - /* write the trailer, if any */ - if(formatc) - { - /* free the streams */ - for(i = 0; i < formatc->nb_streams; i++) - { - av_freep(&formatc->streams[i]); - } - - if(!(format->flags & AVFMT_NOFILE)) - { - /* close the output file */ -#if LIBAVFORMAT_VERSION_INT >= (52<<16) - url_fclose(formatc->pb); -#else - url_fclose(&formatc->pb); -#endif - } - - /* free the stream */ - av_free(formatc); - } - - initialized = false; - - format = 0; - formatc = 0; - - //video settings - video_st = 0; - video_pts = 0; - - vid.encodable = 0; - //vid.stream_nb_frames = 2; //reasonable default - - initialized = false; - picture = 0; - } - - //create a video output stream - AVStream *add_video_stream(int codec_id, const VideoInfo &info) - { - AVCodecContext *context; - AVStream *st; - - st = av_new_stream(formatc, 0); - if(!st) - { - synfig::warning("video-add_stream: Unable to allocate stream"); - return 0; - } - - context = st->codec; - context->codec_id = (CodecID)codec_id; - context->codec_type = CODEC_TYPE_VIDEO; - - //PARAMETERS MUST BE PASSED IN SOMEHOW (ANOTHER FUNCTION PARAMETER???) - - /* resolution must be a multiple of two */ - context->width = info.w; - context->height = info.h; - - //have another way to input these - context->bit_rate = info.bitrate; //TODO: Make dependant on the quality - - /* frames per second */ - // FIXME: Port next two lines to recent libavcodec versions - //context->frame_rate = info.fps; - //context->frame_rate_base = 1; - - /* "High Quality" */ - context->mb_decision=FF_MB_DECISION_BITS; - - context->gop_size = info.fps/4; /* emit one intra frame every twelve frames at most */ - - //HACK: MPEG requires b frames be set... any better way to do this? - if (context->codec_id == CODEC_ID_MPEG1VIDEO || - context->codec_id == CODEC_ID_MPEG2VIDEO) - { - /* just for testing, we also add B frames */ - context->max_b_frames = 2; - } - - return st; - } - - // add an audio output stream - AVStream *add_audio_stream(int codec_id,const AudioInfo &/*aInfo*/) - { - AVCodecContext *context; - AVStream *stream; - - stream = av_new_stream(formatc, 1); - if(!stream) - { - synfig::warning("could not alloc stream"); - return 0; - } - - context = stream->codec; - context->codec_id = (CodecID)codec_id; - context->codec_type = CODEC_TYPE_AUDIO; - - /* put sample parameters */ - context->bit_rate = 64000; - context->sample_rate = 44100; - context->channels = 2; - - return stream; - } -}; - -/* === M E T H O D S ======================================================= */ - -Target_LibAVCodec::Target_LibAVCodec(const char *Filename): - filename(Filename) -{ - if(!registered) - { - registered = true; - av_register_all(); - } - set_remove_alpha(); - - data = new LibAVEncoder; -} - -Target_LibAVCodec::~Target_LibAVCodec() -{ - data->CleanUp(); -} - -bool -Target_LibAVCodec::set_rend_desc(RendDesc *given_desc) -{ - // This is where you can determine how you want stuff - // to be rendered! given_desc is the suggestion, and - // you need to modify it to suit the needs of the codec. - // ie: Making the pixel dimensions divisible by 8, etc... - - desc=*given_desc; - - //resize surface (round even) - int w = desc.get_w(); - int h = desc.get_h(); - Point tl = desc.get_tl(); - Point br = desc.get_br(); - Real pw = desc.get_pw(); - Real ph = desc.get_ph(); - - //resize to the size it should be... - //desc.set_subwindow(-offx/2,-offy/2, desc.get_w() - offx?(offx + 8):0, desc.get_h() - offy?(offy + 8):0); - - //if resolution is broken, change the size... or something - //budge to nearest pixel values - if(w&1) - { - w += 1; - tl[0] -= pw/2; - br[0] += pw/2; - } - - if(h&1) - { - h += 1; - tl[1] -= ph/2; - br[1] += ph/2; - } - - desc.set_w(w); - desc.set_h(h); - desc.set_tl(tl); - desc.set_br(br); - - data->vInfo.w = w; - data->vInfo.h = h; - - //may want to round frame rate - data->vInfo.fps = (int)floor(desc.get_frame_rate()+0.5); -#define MEGABYTES_PER_HOUR(x) (((x)*1024/3600*1024*8)/*/640*w/480*h*/) - data->vInfo.bitrate = MEGABYTES_PER_HOUR(400); - //data->vInfo.bitrate = 800000; //make customizable somehow - - desc.set_frame_rate(data->vInfo.fps); - - data->frame_count = desc.get_frame_start(); - data->num_frames = desc.get_frame_end()+1; //number of frames should be 1 greater than the last one - - surface.set_wh(data->vInfo.w,data->vInfo.h); - - return true; -} - -void -Target_LibAVCodec::end_frame() -{ - //AVStream *audio_st = data->audio_st; - AVStream *video_st = data->video_st; - - AVFormatContext *formatc = data->formatc; - - //double &audio_pts = data->audio_pts; - //double &video_pts = data->video_pts; - - //ignore audio for now - /*if (audio_st) - audio_pts = (double)audio_st->pts.val * formatc->pts_num / formatc->pts_den; - else - audio_pts = 0.0; - - if (video_st) - video_pts = (double)video_st->pts.val * formatc->pts_num / formatc->pts_den; - else - video_pts = 0.0;*/ - - //hardcoded crappiness - /*if ((!audio_st || audio_pts >= STREAM_DURATION) && - (!video_st || video_pts >= STREAM_DURATION)) - break;*/ - - if(data->frame_count >= data->num_frames) return; - - //copy the current surface to the buffer - if(data->picture)convert_surface_frame(data->picture,surface,gamma()); - - //encode the frame and write it to the file - if(!data->vid.write_frame(formatc,video_st,data->picture)) - { - synfig::warning("Unable to write a frame"); - } - - data->frame_count++; - - if(data->frame_count >= data->num_frames) - { - data->CleanUp(); - } - - /* write interleaved audio and video frames */ - /*if (!video_st || (video_st && audio_st && audio_pts < video_pts)) { - data->aud.write_frame(formatc,audio_st); - } else { - data->vid.write_frame(formatc,video_st); - }*/ -} - -bool -Target_LibAVCodec::start_frame(synfig::ProgressCallback */*callback*/) -{ - //prepare all the color buffer stuff, etc. - - return true; -} - -Color * -Target_LibAVCodec::start_scanline(int scanline) -{ - return surface[scanline]; - - return 0; // This should kill the render process -} - -bool -Target_LibAVCodec::end_scanline() -{ - //don't need to do anything until the whole frame is done - return true; -} - -bool Target_LibAVCodec::init() -{ - //hardcoded test for mpeg - if(!data->Initialize(filename.c_str(),NULL)) - { - synfig::warning("Unable to Initialize the audio video encoders"); - return 0; - } - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_libavcodec/trgt_av.h b/synfig-core/trunk/src/modules/mod_libavcodec/trgt_av.h deleted file mode 100644 index a2df7d7..0000000 --- a/synfig-core/trunk/src/modules/mod_libavcodec/trgt_av.h +++ /dev/null @@ -1,69 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_av.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TRGT_H -#define __SYNFIG_TRGT_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include "synfig/surface.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class Target_LibAVCodec : public synfig::Target_Scanline -{ - SYNFIG_TARGET_MODULE_EXT -private: - synfig::String filename; - - class LibAVEncoder; - LibAVEncoder *data; - - static bool registered; - - synfig::Surface surface; - -public: - Target_LibAVCodec(const char *filename); - virtual ~Target_LibAVCodec(); - - virtual bool init(); - - virtual bool set_rend_desc(synfig::RendDesc *desc); - virtual bool start_frame(synfig::ProgressCallback *cb); - virtual void end_frame(); - virtual synfig::Color * start_scanline(int scanline); - virtual bool end_scanline(); -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_libavcodec/unmod_libavcodec.nsh b/synfig-core/trunk/src/modules/mod_libavcodec/unmod_libavcodec.nsh deleted file mode 100644 index 77acf4d..0000000 --- a/synfig-core/trunk/src/modules/mod_libavcodec/unmod_libavcodec.nsh +++ /dev/null @@ -1,8 +0,0 @@ -Section "un.mod_libavcodec" - Delete "$INSTDIR\lib\synfig\modules\mod_libavcodec.dll" - RMDir "$INSTDIR\lib\synfig\modules" - RMDir "$INSTDIR\lib\synfig" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_magickpp/Makefile.am b/synfig-core/trunk/src/modules/mod_magickpp/Makefile.am deleted file mode 100644 index 7660173..0000000 --- a/synfig-core/trunk/src/modules/mod_magickpp/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -moduledir = @MODULE_DIR@ - -if HAVE_LIBMAGICKPP - -module_LTLIBRARIES = libmod_magickpp.la - -libmod_magickpp_la_SOURCES = \ - main.cpp \ - trgt_magickpp.cpp \ - trgt_magickpp.h - -libmod_magickpp_la_LDFLAGS = \ - -module \ - @MAGICKPP_LIBS@ \ - -no-undefined \ - -avoid-version - -libmod_magickpp_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ - -libmod_magickpp_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @SYNFIG_LIBS@ - -endif - - -EXTRA_DIST = \ - mod_magickpp.nsh \ - unmod_magickpp.nsh diff --git a/synfig-core/trunk/src/modules/mod_magickpp/main.cpp b/synfig-core/trunk/src/modules/mod_magickpp/main.cpp deleted file mode 100644 index e3d08ad..0000000 --- a/synfig-core/trunk/src/modules/mod_magickpp/main.cpp +++ /dev/null @@ -1,216 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_magickpp/main.cpp -** \brief Magick++ plugin -** -** $Id$ -** -** \legal -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "trgt_magickpp.h" -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(mod_magickpp) - MODULE_NAME("Magick++ Module (libMagick++)") - MODULE_DESCRIPTION("Provides an animated GIF target") - MODULE_AUTHOR("Chris Moore") - MODULE_VERSION("1.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(mod_magickpp) - BEGIN_TARGETS - TARGET(magickpp_trgt) - TARGET_EXT(magickpp_trgt, "8bim") - TARGET_EXT(magickpp_trgt, "8bimtext") - TARGET_EXT(magickpp_trgt, "8bimwtext") - TARGET_EXT(magickpp_trgt, "a") - TARGET_EXT(magickpp_trgt, "app1") - TARGET_EXT(magickpp_trgt, "app1jpeg") - TARGET_EXT(magickpp_trgt, "art") - TARGET_EXT(magickpp_trgt, "avs") - TARGET_EXT(magickpp_trgt, "b") - TARGET_EXT(magickpp_trgt, "bie") - TARGET_EXT(magickpp_trgt, "bmp") - TARGET_EXT(magickpp_trgt, "bmp2") - TARGET_EXT(magickpp_trgt, "bmp3") - TARGET_EXT(magickpp_trgt, "c") - TARGET_EXT(magickpp_trgt, "cache") - TARGET_EXT(magickpp_trgt, "cin") - TARGET_EXT(magickpp_trgt, "cip") - TARGET_EXT(magickpp_trgt, "clip") - TARGET_EXT(magickpp_trgt, "clipboard") - TARGET_EXT(magickpp_trgt, "cmyk") - TARGET_EXT(magickpp_trgt, "cmyka") - TARGET_EXT(magickpp_trgt, "cur") - TARGET_EXT(magickpp_trgt, "dcx") - TARGET_EXT(magickpp_trgt, "dib") - TARGET_EXT(magickpp_trgt, "dpx") - TARGET_EXT(magickpp_trgt, "emf") - TARGET_EXT(magickpp_trgt, "epdf") - TARGET_EXT(magickpp_trgt, "epi") - TARGET_EXT(magickpp_trgt, "eps") - TARGET_EXT(magickpp_trgt, "eps2") - TARGET_EXT(magickpp_trgt, "eps3") - TARGET_EXT(magickpp_trgt, "epsf") - TARGET_EXT(magickpp_trgt, "epsi") - TARGET_EXT(magickpp_trgt, "ept") - TARGET_EXT(magickpp_trgt, "ept2") - TARGET_EXT(magickpp_trgt, "ept3") - TARGET_EXT(magickpp_trgt, "exif") - TARGET_EXT(magickpp_trgt, "exr") - TARGET_EXT(magickpp_trgt, "fax") - TARGET_EXT(magickpp_trgt, "file") - TARGET_EXT(magickpp_trgt, "fits") - TARGET_EXT(magickpp_trgt, "fpx") - TARGET_EXT(magickpp_trgt, "ftp") - TARGET_EXT(magickpp_trgt, "fts") - TARGET_EXT(magickpp_trgt, "g") - TARGET_EXT(magickpp_trgt, "g3") - TARGET_EXT(magickpp_trgt, "gif") - TARGET_EXT(magickpp_trgt, "gif87") - TARGET_EXT(magickpp_trgt, "granite") - TARGET_EXT(magickpp_trgt, "gray") - TARGET_EXT(magickpp_trgt, "h") - TARGET_EXT(magickpp_trgt, "histogram") - TARGET_EXT(magickpp_trgt, "htm") - TARGET_EXT(magickpp_trgt, "html") - TARGET_EXT(magickpp_trgt, "http") - TARGET_EXT(magickpp_trgt, "icb") - TARGET_EXT(magickpp_trgt, "icc") - TARGET_EXT(magickpp_trgt, "icm") - TARGET_EXT(magickpp_trgt, "ico") - TARGET_EXT(magickpp_trgt, "icon") - TARGET_EXT(magickpp_trgt, "info") - TARGET_EXT(magickpp_trgt, "ipl") - TARGET_EXT(magickpp_trgt, "iptc") - TARGET_EXT(magickpp_trgt, "iptctext") - TARGET_EXT(magickpp_trgt, "iptcwtext") - TARGET_EXT(magickpp_trgt, "jbg") - TARGET_EXT(magickpp_trgt, "jbig") - TARGET_EXT(magickpp_trgt, "jng") - TARGET_EXT(magickpp_trgt, "jp2") - TARGET_EXT(magickpp_trgt, "jpc") - TARGET_EXT(magickpp_trgt, "jpeg") - TARGET_EXT(magickpp_trgt, "jpg") - TARGET_EXT(magickpp_trgt, "jpx") - TARGET_EXT(magickpp_trgt, "k") - TARGET_EXT(magickpp_trgt, "logo") - TARGET_EXT(magickpp_trgt, "m") - TARGET_EXT(magickpp_trgt, "m2v") - TARGET_EXT(magickpp_trgt, "magick") - TARGET_EXT(magickpp_trgt, "map") - TARGET_EXT(magickpp_trgt, "mat") - TARGET_EXT(magickpp_trgt, "matte") - TARGET_EXT(magickpp_trgt, "miff") - TARGET_EXT(magickpp_trgt, "mng") - TARGET_EXT(magickpp_trgt, "mono") - TARGET_EXT(magickpp_trgt, "mpc") - TARGET_EXT(magickpp_trgt, "mpeg") - TARGET_EXT(magickpp_trgt, "mpg") - TARGET_EXT(magickpp_trgt, "mpr") - TARGET_EXT(magickpp_trgt, "mpri") - TARGET_EXT(magickpp_trgt, "msl") - TARGET_EXT(magickpp_trgt, "msvg") - TARGET_EXT(magickpp_trgt, "mtv") - TARGET_EXT(magickpp_trgt, "mvg") - TARGET_EXT(magickpp_trgt, "netscape") - TARGET_EXT(magickpp_trgt, "null") - TARGET_EXT(magickpp_trgt, "o") - TARGET_EXT(magickpp_trgt, "otb") - TARGET_EXT(magickpp_trgt, "pal") - TARGET_EXT(magickpp_trgt, "palm") - TARGET_EXT(magickpp_trgt, "pam") - TARGET_EXT(magickpp_trgt, "pbm") - TARGET_EXT(magickpp_trgt, "pcd") - TARGET_EXT(magickpp_trgt, "pcds") - TARGET_EXT(magickpp_trgt, "pcl") - TARGET_EXT(magickpp_trgt, "pct") - TARGET_EXT(magickpp_trgt, "pcx") - TARGET_EXT(magickpp_trgt, "pdb") - TARGET_EXT(magickpp_trgt, "pdf") - TARGET_EXT(magickpp_trgt, "pfm") - TARGET_EXT(magickpp_trgt, "pgm") - TARGET_EXT(magickpp_trgt, "picon") - TARGET_EXT(magickpp_trgt, "pict") - TARGET_EXT(magickpp_trgt, "pjpeg") - TARGET_EXT(magickpp_trgt, "pm") - TARGET_EXT(magickpp_trgt, "png") - TARGET_EXT(magickpp_trgt, "png24") - TARGET_EXT(magickpp_trgt, "png32") - TARGET_EXT(magickpp_trgt, "png8") - TARGET_EXT(magickpp_trgt, "pnm") - TARGET_EXT(magickpp_trgt, "ppm") - TARGET_EXT(magickpp_trgt, "preview") - TARGET_EXT(magickpp_trgt, "ps") - TARGET_EXT(magickpp_trgt, "ps2") - TARGET_EXT(magickpp_trgt, "ps3") - TARGET_EXT(magickpp_trgt, "psd") - TARGET_EXT(magickpp_trgt, "ptif") - TARGET_EXT(magickpp_trgt, "r") - TARGET_EXT(magickpp_trgt, "ras") - TARGET_EXT(magickpp_trgt, "rgb") - TARGET_EXT(magickpp_trgt, "rgba") - TARGET_EXT(magickpp_trgt, "rgbo") - TARGET_EXT(magickpp_trgt, "rose") - TARGET_EXT(magickpp_trgt, "sgi") - TARGET_EXT(magickpp_trgt, "shtml") - TARGET_EXT(magickpp_trgt, "sun") - TARGET_EXT(magickpp_trgt, "svg") - TARGET_EXT(magickpp_trgt, "svgz") - TARGET_EXT(magickpp_trgt, "text") - TARGET_EXT(magickpp_trgt, "tga") - TARGET_EXT(magickpp_trgt, "thumbnail") - TARGET_EXT(magickpp_trgt, "tif") - TARGET_EXT(magickpp_trgt, "tiff") - TARGET_EXT(magickpp_trgt, "txt") - TARGET_EXT(magickpp_trgt, "uil") - TARGET_EXT(magickpp_trgt, "uyvy") - TARGET_EXT(magickpp_trgt, "vda") - TARGET_EXT(magickpp_trgt, "vicar") - TARGET_EXT(magickpp_trgt, "vid") - TARGET_EXT(magickpp_trgt, "viff") - TARGET_EXT(magickpp_trgt, "vst") - TARGET_EXT(magickpp_trgt, "wbmp") - TARGET_EXT(magickpp_trgt, "wmfwin32") - TARGET_EXT(magickpp_trgt, "x") - TARGET_EXT(magickpp_trgt, "xbm") - TARGET_EXT(magickpp_trgt, "xmp") - TARGET_EXT(magickpp_trgt, "xpm") - TARGET_EXT(magickpp_trgt, "xv") - TARGET_EXT(magickpp_trgt, "xwd") - TARGET_EXT(magickpp_trgt, "y") - TARGET_EXT(magickpp_trgt, "ycbcr") - TARGET_EXT(magickpp_trgt, "ycbcra") - TARGET_EXT(magickpp_trgt, "yuv") - END_TARGETS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mod_magickpp/mod_magickpp.nsh b/synfig-core/trunk/src/modules/mod_magickpp/mod_magickpp.nsh deleted file mode 100644 index bd37688..0000000 --- a/synfig-core/trunk/src/modules/mod_magickpp/mod_magickpp.nsh +++ /dev/null @@ -1,11 +0,0 @@ -Section "mod_magickpp" Sec_mod_magickpp - SetOutPath "$INSTDIR\lib\synfig\modules" - File /oname=mod_magickpp.dll "src\modules\mod_magickpp\.libs\libmod_magickpp.dll" - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "mod_magickpp" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_magickpp/trgt_magickpp.cpp b/synfig-core/trunk/src/modules/mod_magickpp/trgt_magickpp.cpp deleted file mode 100644 index 875f2b5..0000000 --- a/synfig-core/trunk/src/modules/mod_magickpp/trgt_magickpp.cpp +++ /dev/null @@ -1,309 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_magickpp.cpp -** \brief Magick++ Target Module -** -** $Id$ -** -** \legal -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_TARGET - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "trgt_magickpp.h" - -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_TARGET_INIT(magickpp_trgt); -SYNFIG_TARGET_SET_NAME(magickpp_trgt,"magick++"); -SYNFIG_TARGET_SET_EXT(magickpp_trgt,"gif"); -SYNFIG_TARGET_SET_VERSION(magickpp_trgt,"0.1"); -SYNFIG_TARGET_SET_CVS_ID(magickpp_trgt,"$Id$"); - -/* === M E T H O D S ======================================================= */ - -template -MagickLib::Image* copy_image_list(Container& container) -{ - typedef typename Container::iterator Iter; - MagickLib::Image* previous = 0; - MagickLib::Image* first = NULL; - MagickLib::ExceptionInfo exceptionInfo; - MagickLib::GetExceptionInfo(&exceptionInfo); - for (Iter iter = container.begin(); iter != container.end(); ++iter) - { - MagickLib::Image* current; - - try - { - current = CloneImage(iter->image(), 0, 0, Magick::MagickTrue, &exceptionInfo); - - if (!first) first = current; - - current->previous = previous; - current->next = 0; - - if ( previous != 0) previous->next = current; - previous = current; - } - catch(Magick::Warning warning) { - synfig::warning("exception '%s'", warning.what()); - } - } - - return first; -} - -magickpp_trgt::~magickpp_trgt() -{ - MagickLib::ExceptionInfo exceptionInfo; - MagickLib::GetExceptionInfo(&exceptionInfo); - - try - { - bool multiple_images = images.size() != 1; - bool can_adjoin = false; - - if (multiple_images) - { - // check whether this file format supports multiple-image files - Magick::Image image(*(images.begin())); - image.fileName(filename); - try - { - SetImageInfo(image.imageInfo(),Magick::MagickTrue,&exceptionInfo); - can_adjoin = image.adjoin(); - } - catch(Magick::Warning warning) { - synfig::warning("exception '%s'", warning.what()); - } - } - - // the file type is now in image.imageInfo()->magick and - // image.adjoin() tells us whether we can write to a single file - if (can_adjoin) - { - synfig::info("joining images"); - unsigned int delay = round_to_int(100.0 / desc.get_frame_rate()); - for_each(images.begin(), images.end(), Magick::animationDelayImage(delay)); - - // optimize the images (only write the pixels that change from frame to frame -#ifdef HAVE_MAGICK_OPTIMIZE - // make a completely new image list - // this is required because: - // RemoveDuplicateLayers wants a linked list of images, and removes some of them - // when it removes an image, it invalidates it using DeleteImageFromList, but we still have it in our container - // when we destroy our container, the image is re-freed, failing an assertion - - synfig::info("copying image list"); - MagickLib::Image *image_list = copy_image_list(images); - - synfig::info("clearing old image list"); - images.clear(); - - if (!getenv("SYNFIG_DISABLE_REMOVE_DUPS")) - { - synfig::info("removing duplicate frames"); - try - { - RemoveDuplicateLayers(&image_list, &exceptionInfo); - } - catch(Magick::Warning warning) { - synfig::warning("exception '%s'", warning.what()); - } - } - - if (!getenv("SYNFIG_DISABLE_OPTIMIZE")) - { - synfig::info("optimizing layers"); - try - { - image_list = OptimizeImageLayers(image_list,&exceptionInfo); - } - catch(Magick::Warning warning) { - synfig::warning("exception '%s'", warning.what()); - } - } - - if (!getenv("SYNFIG_DISABLE_OPTIMIZE_TRANS")) - { - synfig::info("optimizing layer transparency"); - try - { - OptimizeImageTransparency(image_list,&exceptionInfo); - } - catch(Magick::Warning warning) { - synfig::warning("exception '%s'", warning.what()); - } - } - - synfig::info("recreating image list"); - insertImages(&images, image_list); -#else - synfig::info("not optimizing images"); - // DeconstructImages is available in ImageMagic 6.2.* but it doesn't take - // the 'dispose' method into account, so for frames with transparency where - // nothing is moving, we end up with objects disappearing when they shouldn't - - // linkImages(images.begin(), images.end()); - // MagickLib::Image* new_images = DeconstructImages(images.begin()->image(),&exceptionInfo); - // unlinkImages(images.begin(), images.end()); - // images.clear(); - // insertImages(&images, new_images); -#endif - } - else if (multiple_images) - { - // if we can't write multiple images to a file of this type, - // include '%04d' in the filename, so the files will be numbered - // with a fixed width, '0'-padded number - synfig::info("can't join images of this type - numbering instead"); - filename = (filename_sans_extension(filename) + ".%04d" + filename_extension(filename)); - } - - synfig::info("writing %d image%s to %s", images.size(), images.size() == 1 ? "" : "s", filename.c_str()); - try - { - Magick::writeImages(images.begin(), images.end(), filename); - synfig::info("done"); - } - catch(Magick::Warning warning) { - synfig::warning("exception '%s'", warning.what()); - } - } - catch(Magick::Warning warning) { - synfig::warning("exception '%s'", warning.what()); - } - catch(Magick::Error error) { - synfig::error("exception '%s'", error.what()); - } - catch(...) { - synfig::error("unknown exception"); - } - - if (buffer1 != NULL) delete [] buffer1; - if (buffer2 != NULL) delete [] buffer2; - if (color_buffer != NULL) delete [] color_buffer; -} - -bool -magickpp_trgt::set_rend_desc(RendDesc *given_desc) -{ - desc = *given_desc; - return true; -} - -bool -magickpp_trgt::init() -{ - width = desc.get_w(); - height = desc.get_h(); - - start_pointer = NULL; - - buffer1 = new unsigned char[4*width*height]; - if (buffer1 == NULL) - return false; - - buffer2 = new unsigned char[4*width*height]; - if (buffer2 == NULL) - { - delete [] buffer1; - return false; - } - - color_buffer = new Color[width]; - if (color_buffer == NULL) - { - delete [] buffer1; - delete [] buffer2; - return false; - } - - return true; -} - -void -magickpp_trgt::end_frame() -{ - Magick::Image image(width, height, "RGBA", Magick::CharPixel, start_pointer); - if (transparent && images.begin() != images.end()) - (images.end()-1)->gifDisposeMethod(Magick::BackgroundDispose); - images.push_back(image); -} - -bool -magickpp_trgt::start_frame(synfig::ProgressCallback *callback __attribute__ ((unused))) -{ - previous_buffer_pointer = start_pointer; - - if (start_pointer == buffer1) - start_pointer = buffer_pointer = buffer2; - else - start_pointer = buffer_pointer = buffer1; - - transparent = false; - return true; -} - -Color* -magickpp_trgt::start_scanline(int scanline __attribute__ ((unused))) -{ - return color_buffer; -} - -bool -magickpp_trgt::end_scanline() -{ - convert_color_format(buffer_pointer, color_buffer, - width, PF_RGB|PF_A, gamma()); - - if (!transparent) - for (int i = 0; i < width; i++) - if (previous_buffer_pointer && // this isn't the first frame - buffer_pointer[i*4 + 3] < 128 && // our pixel is transparent - !(previous_buffer_pointer[i*4 + 3] < 128)) // the previous frame's pixel wasn't - { - transparent = true; - break; - } - - buffer_pointer += 4 * width; - - if (previous_buffer_pointer) - previous_buffer_pointer += 4 * width; - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_magickpp/trgt_magickpp.h b/synfig-core/trunk/src/modules/mod_magickpp/trgt_magickpp.h deleted file mode 100644 index 57a0c01..0000000 --- a/synfig-core/trunk/src/modules/mod_magickpp/trgt_magickpp.h +++ /dev/null @@ -1,72 +0,0 @@ -/*! ======================================================================== -** Synfig -** -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TRGT_MAGICKPP_H -#define __SYNFIG_TRGT_MAGICKPP_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include - -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class magickpp_trgt : public synfig::Target_Scanline -{ - SYNFIG_TARGET_MODULE_EXT - -private: - - int width, height; - - synfig::String filename; - unsigned char *buffer1, *start_pointer, *buffer_pointer; - unsigned char *buffer2, *previous_buffer_pointer; - bool transparent; - synfig::Color *color_buffer; - std::vector images; - -public: - - magickpp_trgt(const char *filename) : filename(filename) { } - virtual ~magickpp_trgt(); - - virtual bool set_rend_desc(synfig::RendDesc *desc); - virtual bool init(); - - virtual bool start_frame(synfig::ProgressCallback *cb); - virtual void end_frame(); - - virtual synfig::Color* start_scanline(int scanline); - virtual bool end_scanline(); -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_magickpp/unmod_magickpp.nsh b/synfig-core/trunk/src/modules/mod_magickpp/unmod_magickpp.nsh deleted file mode 100644 index b4001cf..0000000 --- a/synfig-core/trunk/src/modules/mod_magickpp/unmod_magickpp.nsh +++ /dev/null @@ -1,5 +0,0 @@ -Section "un.mod_magicpp" - Delete "$INSTDIR\lib\synfig\modules\mod_magicpp.dll" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_mng/Makefile.am b/synfig-core/trunk/src/modules/mod_mng/Makefile.am deleted file mode 100644 index bdaf7b0..0000000 --- a/synfig-core/trunk/src/modules/mod_mng/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -moduledir = @MODULE_DIR@ - -if HAVE_LIBMNG - -module_LTLIBRARIES = \ - libmod_mng.la - -libmod_mng_la_SOURCES = \ - main.cpp \ - trgt_mng.cpp \ - trgt_mng.h - -libmod_mng_la_LDFLAGS = \ - -module \ - @MNG_LIBS@ \ - -no-undefined \ - -avoid-version - -libmod_mng_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ - -libmod_mng_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @SYNFIG_LIBS@ - -endif - - -EXTRA_DIST = \ - mod_mng.nsh \ - unmod_mng.nsh diff --git a/synfig-core/trunk/src/modules/mod_mng/main.cpp b/synfig-core/trunk/src/modules/mod_mng/main.cpp deleted file mode 100644 index fe50172..0000000 --- a/synfig-core/trunk/src/modules/mod_mng/main.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_mng/main.cpp -** \brief MNG plugin -** -** $Id$ -** -** \legal -** Copyright (c) 2007 Paul Wise -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "trgt_mng.h" -/* FIXME: Implement MNG import -#include "mptr_mng.h" -*/ -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(mod_mng) - MODULE_NAME("MNG Module (libmng)") -/* FIXME: Implement MNG import - MODULE_DESCRIPTION("Provides an MNG target and importer") -*/ - MODULE_DESCRIPTION("Provides an MNG target") - MODULE_AUTHOR("Paul Wise") - MODULE_VERSION("1.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(mod_mng) - BEGIN_TARGETS - TARGET(mng_trgt) - END_TARGETS -/* FIXME: implement MNG import - BEGIN_IMPORTERS - IMPORTER(mng_mptr) - END_IMPORTERS -*/ -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mod_mng/mod_mng.nsh b/synfig-core/trunk/src/modules/mod_mng/mod_mng.nsh deleted file mode 100644 index 13c11a0..0000000 --- a/synfig-core/trunk/src/modules/mod_mng/mod_mng.nsh +++ /dev/null @@ -1,11 +0,0 @@ -Section "mod_mng" Sec_mod_mng - SetOutPath "$INSTDIR\lib\synfig\modules" - File /oname=mod_mng.dll "src\modules\mod_mng\.libs\libmod_mng.dll" - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "mod_mng" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_mng/trgt_mng.cpp b/synfig-core/trunk/src/modules/mod_mng/trgt_mng.cpp deleted file mode 100644 index 7a97c7c..0000000 --- a/synfig-core/trunk/src/modules/mod_mng/trgt_mng.cpp +++ /dev/null @@ -1,337 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_mng.cpp -** \brief MNG Target Module -** -** $Id$ -** -** \legal -** Copyright (c) 2007 Paul Wise -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** You will need to read the PNG and MNG specs to understand this code -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_TARGET - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "trgt_mng.h" -#include -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_TARGET_INIT(mng_trgt); -SYNFIG_TARGET_SET_NAME(mng_trgt,"mng"); -SYNFIG_TARGET_SET_EXT(mng_trgt,"mng"); -SYNFIG_TARGET_SET_VERSION(mng_trgt,"0.1"); -SYNFIG_TARGET_SET_CVS_ID(mng_trgt,"$Id$"); - -/* === M E T H O D S ======================================================= */ - -static mng_ptr MNG_DECL -mng_alloc_proc(mng_size_t size) -{ - return (mng_ptr)calloc(1,size); -} - -static void MNG_DECL -mng_free_proc(mng_ptr ptr, mng_size_t size __attribute__ ((unused))) -{ - free(ptr); return; -} - -static mng_bool MNG_DECL -mng_null_proc(mng_handle mng __attribute__ ((unused))) -{ - // synfig::info("%s:%d mng_trgt::mng_null_proc was called", __FILE__, __LINE__); - return MNG_TRUE; -} - -static mng_bool MNG_DECL -mng_write_proc(mng_handle mng, mng_ptr buf, mng_uint32 size, mng_uint32* written) -{ - FILE* file = (FILE*)mng_get_userdata (mng); - *written = fwrite(buf, 1, size, file); - return MNG_TRUE; -} - -static mng_bool MNG_DECL -mng_error_proc(mng_handle mng __attribute__ ((unused)), mng_int32 error __attribute__ ((unused)), - mng_int8 severity __attribute__ ((unused)), mng_chunkid chunkname __attribute__ ((unused)), - mng_uint32 chunkseq __attribute__ ((unused)), mng_int32 extra1 __attribute__ ((unused)), - mng_int32 extra2 __attribute__ ((unused)), mng_pchar errortext) -{ - synfig::error("%s:%d mng_trgt: error: %s", __FILE__, __LINE__, errortext); - return MNG_TRUE; -} - -mng_trgt::mng_trgt(const char *Filename) : filename(Filename) -{ - file=NULL; - buffer=NULL; - color_buffer=NULL; - zbuffer=NULL; - zbuffer_len=0; - ready=false; -} - -mng_trgt::~mng_trgt() -{ - synfig::info("mng_trgt: ~mng_trgt"); - if (mng != MNG_NULL) - { - mng_putchunk_mend(mng); - if (mng_write(mng) != 0) - { - mng_int8 severity; - mng_chunkid chunkname; - mng_uint32 chunkseq; - mng_int32 extra1; - mng_int32 extra2; - mng_pchar errortext; - mng_getlasterror(mng, &severity, &chunkname, &chunkseq, &extra1,&extra2, &errortext); - synfig::error("mng_trgt: error: couldn't write mng: %s",errortext); - } - mng_cleanup (&mng); - } - if (file != NULL) fclose(file); file=NULL; - if (buffer != NULL) { delete [] buffer; buffer = NULL; } - if (color_buffer != NULL) { delete [] color_buffer; color_buffer = NULL; } - if (zbuffer != NULL) { free(zbuffer); zbuffer = NULL; zbuffer_len = 0; } -} - -bool -mng_trgt::set_rend_desc(RendDesc *given_desc) -{ - desc=*given_desc; - imagecount=desc.get_frame_start(); - if (desc.get_frame_end()-desc.get_frame_start()>0) - multi_image=true; - else - multi_image=false; - return true; -} - - -bool -mng_trgt::init() -{ - // synfig::info("%s:%d mng_trgt::init()", __FILE__, __LINE__); - - int frame_rate, num_frames, play_time; - int num_layers = 1; - - if (multi_image) - { - frame_rate = int(desc.get_frame_rate()); - printf("frame rt %d\n", frame_rate); - num_frames = desc.get_frame_end()-desc.get_frame_start(); - play_time = num_frames;// / frame_rate; - } - else - { - frame_rate = 0; - num_frames = 1; - play_time = 0; - } - - time_t t = time (NULL); - struct tm* gmt = gmtime(&t); - w=desc.get_w(); h=desc.get_h(); - file = fopen(filename.c_str(), POPEN_BINARY_WRITE_TYPE); - if (file == NULL) goto cleanup_on_error; - mng = mng_initialize((mng_ptr)file, mng_alloc_proc, mng_free_proc, MNG_NULL); - if (mng == MNG_NULL) goto cleanup_on_error; - if (mng_setcb_errorproc(mng, mng_error_proc) != 0) goto cleanup_on_error; - if (mng_setcb_writedata(mng, mng_write_proc) != 0) goto cleanup_on_error; - if (mng_setcb_openstream(mng, mng_null_proc) != 0) goto cleanup_on_error; - if (mng_setcb_closestream(mng, mng_null_proc) != 0) goto cleanup_on_error; - if (mng_create(mng) != 0) goto cleanup_on_error; - if (mng_putchunk_mhdr(mng, w, h, frame_rate, num_layers, num_frames, play_time, MNG_SIMPLICITY_VALID|MNG_SIMPLICITY_SIMPLEFEATURES) != 0) goto cleanup_on_error; - if (mng_putchunk_term(mng, MNG_TERMACTION_REPEAT, MNG_ITERACTION_LASTFRAME, 0, 0x7fffffff) != 0) goto cleanup_on_error; - { - char title[] = MNG_TEXT_TITLE; - if (mng_putchunk_text(mng, sizeof(title), title, - get_canvas()->get_name().length(), const_cast(get_canvas()->get_name().c_str())) != 0) - goto cleanup_on_error; - - char description[] = MNG_TEXT_DESCRIPTION; - if (mng_putchunk_text(mng, sizeof(description), description, - get_canvas()->get_description().length(), const_cast(get_canvas()->get_description().c_str())) != 0) - goto cleanup_on_error; - - char software[] = MNG_TEXT_SOFTWARE; char synfig[] = "SYNFIG"; - if (mng_putchunk_text(mng, sizeof(software), software, - sizeof(synfig), synfig) != 0) - goto cleanup_on_error; - } - if (mng_putchunk_gama(mng, MNG_FALSE, (int)(gamma().get_gamma()*100000)) != 0) goto cleanup_on_error; - if (mng_putchunk_phys(mng, MNG_FALSE, round_to_int(desc.get_x_res()),round_to_int(desc.get_y_res()), MNG_UNIT_METER) != 0) goto cleanup_on_error; - if (mng_putchunk_time(mng, gmt->tm_year + 1900, gmt->tm_mon + 1, gmt->tm_mday, gmt->tm_hour, gmt->tm_min, gmt->tm_sec) != 0) goto cleanup_on_error; - buffer=new unsigned char[(4*w)+1]; - if (buffer == NULL) goto cleanup_on_error; - color_buffer=new Color[w]; - if (color_buffer == NULL) goto cleanup_on_error; - return true; - -cleanup_on_error: - ready=false; - if (mng != MNG_NULL) - { - mng_int8 severity; - mng_chunkid chunkname; - mng_uint32 chunkseq; - mng_int32 extra1; - mng_int32 extra2; - mng_pchar errortext; - mng_getlasterror (mng, &severity, &chunkname, &chunkseq, &extra1,&extra2, &errortext); - synfig::error("mng_trgt: libmng: %s",errortext); - mng_cleanup (&mng); - } - - if (file && file!=stdout) - fclose(file); - file=NULL; - - if (buffer != NULL) - { - delete [] buffer; - buffer = NULL; - } - - if (color_buffer != NULL) - { - delete [] color_buffer; - color_buffer = NULL; - } - - return false; -} - -void -mng_trgt::end_frame() -{ - // synfig::info("%s:%d mng_trgt::end_frame()", __FILE__, __LINE__); - - if (deflate(&zstream,Z_FINISH) != Z_STREAM_END) - { - synfig::error("%s:%d deflate()", __FILE__, __LINE__); - return; - } - if (deflateEnd(&zstream) != Z_OK) - { - synfig::error("%s:%d deflateEnd()", __FILE__, __LINE__); - return; - } - if (mng != MNG_NULL) - { - mng_putchunk_idat(mng, zstream.next_out-zbuffer, zbuffer); - mng_putchunk_iend(mng); - } - imagecount++; - ready=false; -} - -bool -mng_trgt::start_frame(synfig::ProgressCallback *callback __attribute__ ((unused))) -{ - // synfig::info("%s:%d mng_trgt::start_frame()", __FILE__, __LINE__); - - if (mng == MNG_NULL) - { - synfig::error("%s:%d mng == MNG_NULL", __FILE__, __LINE__); - return false; - } - - if (mng_putchunk_ihdr(mng, w, h, MNG_BITDEPTH_8, MNG_COLORTYPE_RGBA, MNG_COMPRESSION_DEFLATE, MNG_FILTER_ADAPTIVE, MNG_INTERLACE_NONE) != 0) - { - synfig::error("%s:%d mng_putchunk_ihdr()", __FILE__, __LINE__); - return false; - } - - zstream.zalloc = Z_NULL; - zstream.zfree = Z_NULL; - zstream.opaque = Z_NULL; - - if (deflateInit(&zstream, /* Z_BEST_COMPRESSION */ Z_DEFAULT_COMPRESSION) != Z_OK) - { - synfig::error("%s:%d deflateInit()", __FILE__, __LINE__); - return false; - } - - if (zbuffer == NULL) - { - zbuffer_len = deflateBound(&zstream,((4*w)+1)*h); // don't forget the 'filter' byte - one per scanline - zbuffer = (unsigned char*)realloc(zbuffer, zbuffer_len); - } - - zstream.avail_out = zbuffer_len; - zstream.next_out = zbuffer; - - ready=true; - - return true; -} - -Color* -mng_trgt::start_scanline(int scanline __attribute__ ((unused))) -{ - return color_buffer; -} - -bool -mng_trgt::end_scanline() -{ - if (!file || !ready) - { - synfig::error("%s:%d !file or !ready", __FILE__, __LINE__); - return false; - } - - *buffer = MNG_FILTER_NONE; - convert_color_format(buffer+1, color_buffer, desc.get_w(), PF_RGB|PF_A, gamma()); - - zstream.next_in = buffer; - zstream.avail_in = (4*w)+1; - - if (deflate(&zstream,Z_NO_FLUSH) != Z_OK) { - synfig::error("%s:%d deflate()", __FILE__, __LINE__); - return false; - } - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_mng/trgt_mng.h b/synfig-core/trunk/src/modules/mod_mng/trgt_mng.h deleted file mode 100644 index a194b35..0000000 --- a/synfig-core/trunk/src/modules/mod_mng/trgt_mng.h +++ /dev/null @@ -1,99 +0,0 @@ -/*! ======================================================================== -** Synfig -** -** Copyright (c) 2007 Paul Wise -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TRGT_MNG_H -#define __SYNFIG_TRGT_MNG_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include - -// #include -// #include - -#if !defined(MNG_SUPPORT_FULL) -#define MNG_SUPPORT_FULL 1 -#endif - -#if !defined(MNG_SUPPORT_READ) -#define MNG_SUPPORT_READ 1 -#endif - -#if !defined(MNG_SUPPORT_WRITE) -#define MNG_SUPPORT_WRITE 1 -#endif - -#if !defined(MNG_SUPPORT_DISPLAY) -#define MNG_SUPPORT_DISPLAY 1 -#endif - -#if !defined(MNG_ACCESS_CHUNKS) -#define MNG_ACCESS_CHUNKS 1 -#endif - -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class mng_trgt : public synfig::Target_Scanline -{ - SYNFIG_TARGET_MODULE_EXT - -private: - - FILE *file; - int w,h; - mng_handle mng; - - bool multi_image,ready; - int imagecount; - synfig::String filename; - unsigned char *buffer; - synfig::Color *color_buffer; - - z_stream zstream; - unsigned char* zbuffer; - unsigned int zbuffer_len; - -public: - - mng_trgt(const char *filename); - virtual ~mng_trgt(); - - virtual bool set_rend_desc(synfig::RendDesc *desc); - virtual bool init(); - virtual bool start_frame(synfig::ProgressCallback *cb); - virtual void end_frame(); - - virtual synfig::Color * start_scanline(int scanline); - virtual bool end_scanline(); -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_mng/unmod_mng.nsh b/synfig-core/trunk/src/modules/mod_mng/unmod_mng.nsh deleted file mode 100644 index 0b1c4c9..0000000 --- a/synfig-core/trunk/src/modules/mod_mng/unmod_mng.nsh +++ /dev/null @@ -1,5 +0,0 @@ -Section "un.mod_mng" - Delete "$INSTDIR\lib\synfig\modules\mod_mng.dll" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_noise/Makefile.am b/synfig-core/trunk/src/modules/mod_noise/Makefile.am deleted file mode 100644 index a6830a4..0000000 --- a/synfig-core/trunk/src/modules/mod_noise/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -moduledir = @MODULE_DIR@ - -module_LTLIBRARIES = libmod_noise.la - -libmod_noise_la_SOURCES = \ - random_noise.cpp \ - random_noise.h \ - distort.cpp \ - distort.h \ - noise.cpp \ - noise.h \ - valuenode_random.cpp \ - valuenode_random.h \ - main.cpp - -libmod_noise_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ - -libmod_noise_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @SYNFIG_LIBS@ - -libmod_noise_la_LDFLAGS = \ - -module \ - -no-undefined \ - -avoid-version - - -EXTRA_DIST= mod_noise.nsh unmod_noise.nsh diff --git a/synfig-core/trunk/src/modules/mod_noise/distort.cpp b/synfig-core/trunk/src/modules/mod_noise/distort.cpp deleted file mode 100644 index 1660c7d..0000000 --- a/synfig-core/trunk/src/modules/mod_noise/distort.cpp +++ /dev/null @@ -1,301 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file distort.cpp -** \brief Implementation of the "Noise Distort" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "distort.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(NoiseDistort); -SYNFIG_LAYER_SET_NAME(NoiseDistort,"noise_distort"); -SYNFIG_LAYER_SET_LOCAL_NAME(NoiseDistort,N_("Noise Distort")); -SYNFIG_LAYER_SET_CATEGORY(NoiseDistort,N_("Distortions")); -SYNFIG_LAYER_SET_VERSION(NoiseDistort,"0.0"); -SYNFIG_LAYER_SET_CVS_ID(NoiseDistort,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -NoiseDistort::NoiseDistort(): - size(1,1) -{ - set_blend_method(Color::BLEND_STRAIGHT); - smooth=RandomNoise::SMOOTH_COSINE; - detail=4; - speed=0; - random.set_seed(time(NULL)); - turbulent=false; - displacement=Vector(0.25,0.25); -} - -inline Color -NoiseDistort::color_func(const Point &point, float /*supersample*/,Context context)const -{ - Color ret(0,0,0,0); - - float x(point[0]/size[0]*(1<1)vect[0]=1; - if(vect[1]<-1)vect[1]=-1;if(vect[1]>1)vect[1]=1; - - if(turbulent) - { - vect[0]=abs(vect[0]); - vect[1]=abs(vect[1]); - } - - x/=2.0f; - y/=2.0f; - } - - if(!turbulent) - { - vect[0]=vect[0]/2.0f+0.5f; - vect[1]=vect[1]/2.0f+0.5f; - } - vect[0]=(vect[0]-0.5f)*displacement[0]; - vect[1]=(vect[1]-0.5f)*displacement[1]; - - ret=context.get_color(point+vect); - } - return ret; -} - -inline float -NoiseDistort::calc_supersample(const synfig::Point &/*x*/, float /*pw*/,float /*ph*/)const -{ - return 0.0f; -} - -void -NoiseDistort::set_time(synfig::Context context, synfig::Time t)const -{ - curr_time=t; - context.set_time(t); -} - -void -NoiseDistort::set_time(synfig::Context context, synfig::Time t, const synfig::Point &point)const -{ - curr_time=t; - context.set_time(t,point); -} - -synfig::Layer::Handle -NoiseDistort::hit_check(synfig::Context context, const synfig::Point &point)const -{ - if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5) - return const_cast(this); - if(get_amount()==0.0) - return context.hit_check(point); - if(color_func(point,0,context).get_a()>0.5) - return const_cast(this); - return false; -} - -bool -NoiseDistort::set_param(const String & param, const ValueBase &value) -{ - if(param=="seed" && value.same_type_as(int())) - { - random.set_seed(value.get(int())); - return true; - } - IMPORT(size); - IMPORT(speed); - IMPORT(smooth); - IMPORT(detail); - IMPORT(turbulent); - IMPORT(displacement); - return Layer_Composite::set_param(param,value); -} - -ValueBase -NoiseDistort::get_param(const String & param)const -{ - if(param=="seed") - return random.get_seed(); - EXPORT(size); - EXPORT(speed); - EXPORT(smooth); - EXPORT(detail); - EXPORT(displacement); - EXPORT(turbulent); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -NoiseDistort::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("displacement") - .set_local_name(_("Displacement")) - ); - - ret.push_back(ParamDesc("size") - .set_local_name(_("Size")) - ); - ret.push_back(ParamDesc("seed") - .set_local_name(_("RandomNoise Seed")) - ); - ret.push_back(ParamDesc("smooth") - .set_local_name(_("Interpolation")) - .set_description(_("What type of interpolation to use")) - .set_hint("enum") - .add_enum_value(RandomNoise::SMOOTH_DEFAULT, "nearest", _("Nearest Neighbor")) - .add_enum_value(RandomNoise::SMOOTH_LINEAR, "linear", _("Linear")) - .add_enum_value(RandomNoise::SMOOTH_COSINE, "cosine", _("Cosine")) - .add_enum_value(RandomNoise::SMOOTH_SPLINE, "spline", _("Spline")) - .add_enum_value(RandomNoise::SMOOTH_CUBIC, "cubic", _("Cubic")) - ); - ret.push_back(ParamDesc("detail") - .set_local_name(_("Detail")) - ); - ret.push_back(ParamDesc("speed") - .set_local_name(_("Animation Speed")) - ); - ret.push_back(ParamDesc("turbulent") - .set_local_name(_("Turbulent")) - ); - - return ret; -} - -Color -NoiseDistort::get_color(Context context, const Point &point)const -{ - const Color color(color_func(point,0,context)); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - return color; - else - return Color::blend(color,context.get_color(point),get_amount(),get_blend_method()); -} - -Rect -NoiseDistort::get_bounding_rect(Context context)const -{ - if(is_disabled()) - return Rect::zero(); - - if(Color::is_onto(get_blend_method())) - return context.get_full_bounding_rect(); - - Rect bounds(context.get_full_bounding_rect().expand_x(displacement[0]).expand_y(displacement[1])); - - return bounds; -} - -/* -bool -NoiseDistort::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - SuperCallback supercb(cb,0,9500,10000); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - { - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - } - else - { - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - return false; - if(get_amount()==0) - return true; - } - - - int x,y; - - Surface::pen pen(surface->begin()); - const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); - Point pos; - Point tl(renddesc.get_tl()); - const int w(surface->get_w()); - const int h(surface->get_h()); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - { - for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) - return false; - - return true; -} -*/ diff --git a/synfig-core/trunk/src/modules/mod_noise/distort.h b/synfig-core/trunk/src/modules/mod_noise/distort.h deleted file mode 100644 index cecb157..0000000 --- a/synfig-core/trunk/src/modules/mod_noise/distort.h +++ /dev/null @@ -1,83 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file distort.h -** \brief Header file for implementation of the "Noise Distort" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_NOISE_DISTORT_H -#define __SYNFIG_NOISE_DISTORT_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include -#include "random_noise.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class NoiseDistort : public synfig::Layer_Composite -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - synfig::Vector size; - - RandomNoise random; - RandomNoise::SmoothType smooth; - int detail; - synfig::Real speed; - bool turbulent; - synfig::Vector displacement; - - //void sync(); - mutable synfig::Time curr_time; - - synfig::Color color_func(const synfig::Point &x, float supersample,synfig::Context context)const; - - float calc_supersample(const synfig::Point &x, float pw,float ph)const; - -public: - NoiseDistort(); - - virtual bool set_param(const synfig::String ¶m, const synfig::ValueBase &value); - virtual synfig::ValueBase get_param(const synfig::String ¶m)const; - virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; - //virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - virtual void set_time(synfig::Context context, synfig::Time time)const; - virtual void set_time(synfig::Context context, synfig::Time time, const synfig::Point &point)const; - virtual synfig::Rect get_bounding_rect(synfig::Context context)const; - virtual Vocab get_param_vocab()const; - virtual bool reads_context()const { return true; } -}; // EOF of class NoiseDistort - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_noise/main.cpp b/synfig-core/trunk/src/modules/mod_noise/main.cpp deleted file mode 100644 index 1a31739..0000000 --- a/synfig-core/trunk/src/modules/mod_noise/main.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_noise/main.cpp -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include - -#include "noise.h" -#include "distort.h" -#include "random_noise.h" -#include "valuenode_random.h" - -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(libmod_noise) - MODULE_NAME("Noise") - MODULE_DESCRIPTION("writeme") - MODULE_AUTHOR("Robert B. Quattlebaum") - MODULE_VERSION("1.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(libmod_noise) - BEGIN_LAYERS - LAYER(Noise) - LAYER(NoiseDistort) - END_LAYERS - - BEGIN_VALUENODES - VALUENODE(synfig::ValueNode_Random, "random", _("Random"), synfig::RELEASE_VERSION_0_61_08) // SVN r907 - END_VALUENODES -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mod_noise/mod_noise.nsh b/synfig-core/trunk/src/modules/mod_noise/mod_noise.nsh deleted file mode 100644 index 3521694..0000000 --- a/synfig-core/trunk/src/modules/mod_noise/mod_noise.nsh +++ /dev/null @@ -1,21 +0,0 @@ -; The stuff to install -Section "mod_noise" Sec_mod_noise - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=mod_noise.dll "src\modules\mod_noise\.libs\libmod_noise.dll" - - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "mod_noise" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_noise/noise.cpp b/synfig-core/trunk/src/modules/mod_noise/noise.cpp deleted file mode 100644 index 4257a6c..0000000 --- a/synfig-core/trunk/src/modules/mod_noise/noise.cpp +++ /dev/null @@ -1,346 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file noise.cpp -** \brief Implementation of the "Noise Gradient" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "noise.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Noise); -SYNFIG_LAYER_SET_NAME(Noise,"noise"); -SYNFIG_LAYER_SET_LOCAL_NAME(Noise,N_("Noise Gradient")); -SYNFIG_LAYER_SET_CATEGORY(Noise,N_("Gradients")); -SYNFIG_LAYER_SET_VERSION(Noise,"0.0"); -SYNFIG_LAYER_SET_CVS_ID(Noise,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -Noise::Noise(): - size(1,1), - gradient(Color::black(), Color::white()) -{ - smooth=RandomNoise::SMOOTH_COSINE; - detail=4; - speed=0; - do_alpha=false; - random.set_seed(time(NULL)); - turbulent=false; - displacement=Vector(1,1); - do_displacement=false; - super_sample=false; -} - - - -inline Color -Noise::color_func(const Point &point, float pixel_size,Context /*context*/)const -{ - Color ret(0,0,0,0); - - float x(point[0]/size[0]*(1<1)amount=1; - - if(super_sample&&pixel_size) - { - amount2=random(smooth,0+(detail-i)*5,x2,y,ftime)+amount2*0.5; - if(amount2<-1)amount2=-1;if(amount2>1)amount2=1; - - amount3=random(smooth,0+(detail-i)*5,x,y2,ftime)+amount3*0.5; - if(amount3<-1)amount3=-1;if(amount3>1)amount3=1; - - if(turbulent) - { - amount2=abs(amount2); - amount3=abs(amount3); - } - - x2*=0.5f; - y2*=0.5f; - } - - if(do_alpha) - { - alpha=random(smooth,3+(detail-i)*5,x,y,ftime)+alpha*0.5; - if(alpha<-1)alpha=-1;if(alpha>1)alpha=1; - } - - if(turbulent) - { - amount=abs(amount); - alpha=abs(alpha); - } - - x*=0.5f; - y*=0.5f; - //ftime*=0.5f; - } - - if(!turbulent) - { - amount=amount/2.0f+0.5f; - alpha=alpha/2.0f+0.5f; - - if(super_sample&&pixel_size) - { - amount2=amount2/2.0f+0.5f; - amount3=amount3/2.0f+0.5f; - } - } - - if(super_sample && pixel_size) - ret=gradient(amount,max(amount3,max(amount,amount2))-min(amount3,min(amount,amount2))); - else - ret=gradient(amount); - - if(do_alpha) - ret.set_a(ret.get_a()*(alpha)); - } - return ret; -} - -inline float -Noise::calc_supersample(const synfig::Point &/*x*/, float /*pw*/,float /*ph*/)const -{ - return 0.0f; -} - -void -Noise::set_time(synfig::Context context, synfig::Time t)const -{ - curr_time=t; - context.set_time(t); -} - -void -Noise::set_time(synfig::Context context, synfig::Time t, const synfig::Point &point)const -{ - curr_time=t; - context.set_time(t,point); -} - -synfig::Layer::Handle -Noise::hit_check(synfig::Context context, const synfig::Point &point)const -{ - if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5) - return const_cast(this); - if(get_amount()==0.0) - return context.hit_check(point); - if(color_func(point,0,context).get_a()>0.5) - return const_cast(this); - return false; -} - -bool -Noise::set_param(const String & param, const ValueBase &value) -{ - if(param=="seed" && value.same_type_as(int())) - { - random.set_seed(value.get(int())); - return true; - } - IMPORT(size); - IMPORT(speed); - IMPORT(smooth); - IMPORT(detail); - IMPORT(do_alpha); - IMPORT(gradient); - IMPORT(turbulent); - IMPORT(super_sample); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -Noise::get_param(const String & param)const -{ - if(param=="seed") - return random.get_seed(); - EXPORT(size); - EXPORT(speed); - EXPORT(smooth); - EXPORT(detail); - EXPORT(do_alpha); - EXPORT(gradient); - EXPORT(turbulent) - EXPORT(super_sample); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -Noise::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("gradient") - .set_local_name(_("Gradient")) - ); - ret.push_back(ParamDesc("seed") - .set_local_name(_("RandomNoise Seed")) - ); - ret.push_back(ParamDesc("size") - .set_local_name(_("Size")) - ); - ret.push_back(ParamDesc("smooth") - .set_local_name(_("Interpolation")) - .set_description(_("What type of interpolation to use")) - .set_hint("enum") - .add_enum_value(RandomNoise::SMOOTH_DEFAULT, "nearest", _("Nearest Neighbor")) - .add_enum_value(RandomNoise::SMOOTH_LINEAR, "linear", _("Linear")) - .add_enum_value(RandomNoise::SMOOTH_COSINE, "cosine", _("Cosine")) - .add_enum_value(RandomNoise::SMOOTH_SPLINE, "spline", _("Spline")) - .add_enum_value(RandomNoise::SMOOTH_CUBIC, "cubic", _("Cubic")) - ); - ret.push_back(ParamDesc("detail") - .set_local_name(_("Detail")) - ); - ret.push_back(ParamDesc("speed") - .set_local_name(_("Animation Speed")) - ); - ret.push_back(ParamDesc("turbulent") - .set_local_name(_("Turbulent")) - ); - ret.push_back(ParamDesc("do_alpha") - .set_local_name(_("Do Alpha")) - ); - ret.push_back(ParamDesc("super_sample") - .set_local_name(_("Super Sampling")) - ); - - return ret; -} - -Color -Noise::get_color(Context context, const Point &point)const -{ - const Color color(color_func(point,0,context)); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - return color; - else - return Color::blend(color,context.get_color(point),get_amount(),get_blend_method()); -} - -bool -Noise::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - SuperCallback supercb(cb,0,9500,10000); - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - { - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - } - else - { - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - return false; - if(get_amount()==0) - return true; - } - - - int x,y; - - Surface::pen pen(surface->begin()); - const Real pw(renddesc.get_pw()),ph(renddesc.get_ph()); - Point pos; - Point tl(renddesc.get_tl()); - const int w(surface->get_w()); - const int h(surface->get_h()); - float supersampleradius((abs(pw)+abs(ph))*0.5f); - if(quality>=8) - supersampleradius=0; - - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - { - for(y=0,pos[1]=tl[1];yamount_complete(10000,10000)) - return false; - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_noise/noise.h b/synfig-core/trunk/src/modules/mod_noise/noise.h deleted file mode 100644 index 1ea78d6..0000000 --- a/synfig-core/trunk/src/modules/mod_noise/noise.h +++ /dev/null @@ -1,88 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file noise.h -** \brief Header file for implementation of the "Noise Gradient" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_NOISE_H -#define __SYNFIG_NOISE_H - -/* === H E A D E R S ======================================================= */ - -#include -#include - -#include -#include -#include -#include "random_noise.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class Noise : public synfig::Layer_Composite, public synfig::Layer_NoDeform -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - synfig::Vector size; - - RandomNoise random; - RandomNoise::SmoothType smooth; - int detail; - bool do_alpha; - synfig::Gradient gradient; - synfig::Real speed; - bool turbulent; - bool do_displacement; - synfig::Vector displacement; - - //void sync(); - mutable synfig::Time curr_time; - - bool super_sample; - - synfig::Color color_func(const synfig::Point &x, float supersample,synfig::Context context)const; - - float calc_supersample(const synfig::Point &x, float pw,float ph)const; - -public: - Noise(); - - virtual bool set_param(const synfig::String ¶m, const synfig::ValueBase &value); - virtual synfig::ValueBase get_param(const synfig::String ¶m)const; - virtual synfig::Color get_color(synfig::Context context, const synfig::Point &pos)const; - virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const; - synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - virtual void set_time(synfig::Context context, synfig::Time time)const; - virtual void set_time(synfig::Context context, synfig::Time time, const synfig::Point &point)const; - - virtual Vocab get_param_vocab()const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_noise/random_noise.cpp b/synfig-core/trunk/src/modules/mod_noise/random_noise.cpp deleted file mode 100644 index 344dff9..0000000 --- a/synfig-core/trunk/src/modules/mod_noise/random_noise.cpp +++ /dev/null @@ -1,323 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_noise/random_noise.cpp -** \brief blehh -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "random_noise.h" -#include -#include -#include -#endif - -/* === M A C R O S ========================================================= */ - -#define PI (3.1415927) - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -void -RandomNoise::set_seed(int x) -{ - seed_=x; -} - -float -RandomNoise::operator()(const int salt,const int x,const int y,const int t)const -{ - static const unsigned int a(21870); - static const unsigned int b(11213); - static const unsigned int c(36979); - static const unsigned int d(31337); - - quick_rng rng( - ( static_cast(x+y) * a ) ^ - ( static_cast(y+t) * b ) ^ - ( static_cast(t+x) * c ) ^ - ( static_cast(seed_+salt) * d ) - ); - - return rng.f() * 2.0f - 1.0f; -} - -float -RandomNoise::operator()(SmoothType smooth,int subseed,float xf,float yf,float tf,int loop)const -{ - int x((int)floor(xf)); - int y((int)floor(yf)); - int t((int)floor(tf)); - int t_1, t0, t1, t2; - - if (loop) - { - t0 = t % loop; if (t0 < 0 ) t0 += loop; - t_1 = t0 - 1; if (t_1 < 0 ) t_1 += loop; - t1 = t0 + 1; if (t1 >= loop) t1 -= loop; - t2 = t1 + 1; if (t2 >= loop) t2 -= loop; - } - else - { - t0 = t; - t_1 = t - 1; - t1 = t + 1; - t2 = t + 2; - } - - // synfig::info("%s:%d tf %.2f loop %d fraction %.2f ( -1,0,1,2 : %2d %2d %2d %2d)", __FILE__, __LINE__, tf, loop, tf-t, t_1, t0, t1, t2); - - switch(smooth) - { - case SMOOTH_CUBIC: // cubic - { - #define f(j,i,k) ((*this)(subseed,i,j,k)) - //Using catmull rom interpolation because it doesn't blur at all - // ( http://www.gamedev.net/reference/articles/article1497.asp ) - //bezier curve with intermediate ctrl pts: 0.5/3(p(i+1) - p(i-1)) and similar - float xfa [4], tfa[4]; - - //precalculate indices (all clamped) and offset - const int xa[] = {x-1,x,x+1,x+2}; - const int ya[] = {y-1,y,y+1,y+2}; - const int ta[] = {t_1,t0,t1,t2}; - - const float dx(xf-x); - const float dy(yf-y); - const float dt(tf-t); - - //figure polynomials for each point - const float txf[] = - { - 0.5*dx*(dx*(dx*(-1) + 2) - 1), //-t + 2t^2 -t^3 - 0.5*(dx*(dx*(3*dx - 5)) + 2), //2 - 5t^2 + 3t^3 - 0.5*dx*(dx*(-3*dx + 4) + 1), //t + 4t^2 - 3t^3 - 0.5*dx*dx*(dx-1) //-t^2 + t^3 - }; - - const float tyf[] = - { - 0.5*dy*(dy*(dy*(-1) + 2) - 1), //-t + 2t^2 -t^3 - 0.5*(dy*(dy*(3*dy - 5)) + 2), //2 - 5t^2 + 3t^3 - 0.5*dy*(dy*(-3*dy + 4) + 1), //t + 4t^2 - 3t^3 - 0.5*dy*dy*(dy-1) //-t^2 + t^3 - }; - - const float ttf[] = - { - 0.5*dt*(dt*(dt*(-1) + 2) - 1), //-t + 2t^2 -t^3 - 0.5*(dt*(dt*(3*dt - 5)) + 2), //2 - 5t^2 + 3t^3 - 0.5*dt*(dt*(-3*dt + 4) + 1), //t + 4t^2 - 3t^3 - 0.5*dt*dt*(dt-1) //-t^2 + t^3 - }; - - //evaluate polynomial for each row - for(int i = 0; i < 4; ++i) - { - for(int j = 0; j < 4; ++j) - { - tfa[j] = f(ya[i],xa[j],ta[0])*ttf[0] + f(ya[i],xa[j],ta[1])*ttf[1] + f(ya[i],xa[j],ta[2])*ttf[2] + f(ya[i],xa[j],ta[3])*ttf[3]; - } - xfa[i] = tfa[0]*txf[0] + tfa[1]*txf[1] + tfa[2]*txf[2] + tfa[3]*txf[3]; - } - - //return the cumulative column evaluation - return xfa[0]*tyf[0] + xfa[1]*tyf[1] + xfa[2]*tyf[2] + xfa[3]*tyf[3]; -#undef f - } - break; - - - case SMOOTH_FAST_SPLINE: // Fast Spline (non-animated) - { -#define P(x) (((x)>0)?((x)*(x)*(x)):0.0f) -#define R(x) ( P(x+2) - 4.0f*P(x+1) + 6.0f*P(x) - 4.0f*P(x-1) )*(1.0f/6.0f) -#define F(i,j) ((*this)(subseed,i+x,j+y)*(R((i)-a)*R(b-(j)))) -#define FT(i,j,k,l) ((*this)(subseed,i+x,j+y,l)*(R((i)-a)*R(b-(j))*R((k)-c))) -#define Z(i,j) ret+=F(i,j) -#define ZT(i,j,k,l) ret+=FT(i,j,k,l) -#define X(i,j) // placeholder... To make box more symmetric -#define XT(i,j,k,l) // placeholder... To make box more symmetric - - float a(xf-x), b(yf-y); - - // Interpolate - float ret(F(0,0)); - Z(-1,-1); Z(-1, 0); Z(-1, 1); Z(-1, 2); - Z( 0,-1); X( 0, 0); Z( 0, 1); Z( 0, 2); - Z( 1,-1); Z( 1, 0); Z( 1, 1); Z( 1, 2); - Z( 2,-1); Z( 2, 0); Z( 2, 1); Z( 2, 2); - - return ret; - } - - case SMOOTH_SPLINE: // Spline (animated) - { - float a(xf-x), b(yf-y), c(tf-t); - - // Interpolate - float ret(FT(0,0,0,t0)); - ZT(-1,-1,-1,t_1); ZT(-1, 0,-1,t_1); ZT(-1, 1,-1,t_1); ZT(-1, 2,-1,t_1); - ZT( 0,-1,-1,t_1); ZT( 0, 0,-1,t_1); ZT( 0, 1,-1,t_1); ZT( 0, 2,-1,t_1); - ZT( 1,-1,-1,t_1); ZT( 1, 0,-1,t_1); ZT( 1, 1,-1,t_1); ZT( 1, 2,-1,t_1); - ZT( 2,-1,-1,t_1); ZT( 2, 0,-1,t_1); ZT( 2, 1,-1,t_1); ZT( 2, 2,-1,t_1); - - ZT(-1,-1, 0,t0 ); ZT(-1, 0, 0,t0 ); ZT(-1, 1, 0,t0 ); ZT(-1, 2, 0,t0 ); - ZT( 0,-1, 0,t0 ); XT( 0, 0, 0,t0 ); ZT( 0, 1, 0,t0 ); ZT( 0, 2, 0,t0 ); - ZT( 1,-1, 0,t0 ); ZT( 1, 0, 0,t0 ); ZT( 1, 1, 0,t0 ); ZT( 1, 2, 0,t0 ); - ZT( 2,-1, 0,t0 ); ZT( 2, 0, 0,t0 ); ZT( 2, 1, 0,t0 ); ZT( 2, 2, 0,t0 ); - - ZT(-1,-1, 1,t1 ); ZT(-1, 0, 1,t1 ); ZT(-1, 1, 1,t1 ); ZT(-1, 2, 1,t1 ); - ZT( 0,-1, 1,t1 ); ZT( 0, 0, 1,t1 ); ZT( 0, 1, 1,t1 ); ZT( 0, 2, 1,t1 ); - ZT( 1,-1, 1,t1 ); ZT( 1, 0, 1,t1 ); ZT( 1, 1, 1,t1 ); ZT( 1, 2, 1,t1 ); - ZT( 2,-1, 1,t1 ); ZT( 2, 0, 1,t1 ); ZT( 2, 1, 1,t1 ); ZT( 2, 2, 1,t1 ); - - ZT(-1,-1, 2,t2 ); ZT(-1, 0, 2,t2 ); ZT(-1, 1, 2,t2 ); ZT(-1, 2, 2,t2 ); - ZT( 0,-1, 2,t2 ); ZT( 0, 0, 2,t2 ); ZT( 0, 1, 2,t2 ); ZT( 0, 2, 2,t2 ); - ZT( 1,-1, 2,t2 ); ZT( 1, 0, 2,t2 ); ZT( 1, 1, 2,t2 ); ZT( 1, 2, 2,t2 ); - ZT( 2,-1, 2,t2 ); ZT( 2, 0, 2,t2 ); ZT( 2, 1, 2,t2 ); ZT( 2, 2, 2,t2 ); - - return ret; - -/* - - float dx=xf-x; - float dy=yf-y; - float dt=tf-t; - - float ret=0; - int i,j,h; - for(h=-1;h<=2;h++) - for(i=-1;i<=2;i++) - for(j=-1;j<=2;j++) - ret+=(*this)(subseed,i+x,j+y,h+t)*(R(i-dx)*R(j-dy)*R(h-dt)); - return ret; -*/ - } - break; -#undef X -#undef Z -#undef F -#undef P -#undef R - - case SMOOTH_COSINE: - if((float)t==tf) - { - int x((int)floor(xf)); - int y((int)floor(yf)); - float a=xf-x; - float b=yf-y; - a=(1.0f-cos(a*PI))*0.5f; - b=(1.0f-cos(b*PI))*0.5f; - float c=1.0-a; - float d=1.0-b; - int x2=x+1,y2=y+1; - return - (*this)(subseed,x,y,t0)*(c*d)+ - (*this)(subseed,x2,y,t0)*(a*d)+ - (*this)(subseed,x,y2,t0)*(c*b)+ - (*this)(subseed,x2,y2,t0)*(a*b); - } - else - { - float a=xf-x; - float b=yf-y; - float c=tf-t; - - a=(1.0f-cos(a*PI))*0.5f; - b=(1.0f-cos(b*PI))*0.5f; - - // We don't perform this on the time axis, otherwise we won't - // get smooth motion - //c=(1.0f-cos(c*PI))*0.5f; - - float d=1.0-a; - float e=1.0-b; - float f=1.0-c; - - int x2=x+1,y2=y+1; - - return - (*this)(subseed,x,y,t0)*(d*e*f)+ - (*this)(subseed,x2,y,t0)*(a*e*f)+ - (*this)(subseed,x,y2,t0)*(d*b*f)+ - (*this)(subseed,x2,y2,t0)*(a*b*f)+ - (*this)(subseed,x,y,t1)*(d*e*c)+ - (*this)(subseed,x2,y,t1)*(a*e*c)+ - (*this)(subseed,x,y2,t1)*(d*b*c)+ - (*this)(subseed,x2,y2,t1)*(a*b*c); - } - case SMOOTH_LINEAR: - if((float)t==tf) - { - int x((int)floor(xf)); - int y((int)floor(yf)); - float a=xf-x; - float b=yf-y; - float c=1.0-a; - float d=1.0-b; - int x2=x+1,y2=y+1; - return - (*this)(subseed,x,y,t0)*(c*d)+ - (*this)(subseed,x2,y,t0)*(a*d)+ - (*this)(subseed,x,y2,t0)*(c*b)+ - (*this)(subseed,x2,y2,t0)*(a*b); - } - else - { - - float a=xf-x; - float b=yf-y; - float c=tf-t; - - float d=1.0-a; - float e=1.0-b; - float f=1.0-c; - - int x2=x+1,y2=y+1; - - return - (*this)(subseed,x,y,t0)*(d*e*f)+ - (*this)(subseed,x2,y,t0)*(a*e*f)+ - (*this)(subseed,x,y2,t0)*(d*b*f)+ - (*this)(subseed,x2,y2,t0)*(a*b*f)+ - (*this)(subseed,x,y,t1)*(d*e*c)+ - (*this)(subseed,x2,y,t1)*(a*e*c)+ - (*this)(subseed,x,y2,t1)*(d*b*c)+ - (*this)(subseed,x2,y2,t1)*(a*b*c); - } - default: - case SMOOTH_DEFAULT: - return (*this)(subseed,x,y,t0); - } -} diff --git a/synfig-core/trunk/src/modules/mod_noise/random_noise.h b/synfig-core/trunk/src/modules/mod_noise/random_noise.h deleted file mode 100644 index 9a06e94..0000000 --- a/synfig-core/trunk/src/modules/mod_noise/random_noise.h +++ /dev/null @@ -1,63 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_noise/random_noise.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_RANDOM_H -#define __SYNFIG_RANDOM_H - -/* === H E A D E R S ======================================================= */ - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - - -#define POOL_SIZE (256) -class RandomNoise -{ - int seed_; -public: - - void set_seed(int x); - int get_seed()const { return seed_; } - - enum SmoothType - { - SMOOTH_DEFAULT = 0, - SMOOTH_LINEAR = 1, - SMOOTH_COSINE = 2, - SMOOTH_SPLINE = 3, - SMOOTH_CUBIC = 4, - SMOOTH_FAST_SPLINE = 5, - }; - - float operator()(int subseed,int x,int y=0, int t=0)const; - float operator()(SmoothType smooth,int subseed,float x,float y=0,float t=0,int loop=0)const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_noise/unmod_noise.nsh b/synfig-core/trunk/src/modules/mod_noise/unmod_noise.nsh deleted file mode 100644 index fe04e1f..0000000 --- a/synfig-core/trunk/src/modules/mod_noise/unmod_noise.nsh +++ /dev/null @@ -1,8 +0,0 @@ -Section "un.mod_noise" - Delete "$INSTDIR\lib\synfig\modules\mod_noise.dll" - RMDir "$INSTDIR\lib\synfig\modules" - RMDir "$INSTDIR\lib\synfig" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_noise/valuenode_random.cpp b/synfig-core/trunk/src/modules/mod_noise/valuenode_random.cpp deleted file mode 100644 index 1ae09a4..0000000 --- a/synfig-core/trunk/src/modules/mod_noise/valuenode_random.cpp +++ /dev/null @@ -1,304 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_random.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_random.h" -#include "synfig/valuenode_const.h" -#include "synfig/general.h" -#include "synfig/color.h" -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Random::ValueNode_Random(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - random.set_seed(time(NULL)); - - set_link("radius",ValueNode_Const::create(Real(1))); - set_link("seed",ValueNode_Const::create(random.get_seed())); - set_link("speed",ValueNode_Const::create(Real(1))); - set_link("smooth",ValueNode_Const::create(int(RandomNoise::SMOOTH_CUBIC))); - set_link("loop",ValueNode_Const::create(Real(0))); - - switch(get_type()) - { - case ValueBase::TYPE_ANGLE: - set_link("link",ValueNode_Const::create(value.get(Angle()))); - break; - case ValueBase::TYPE_BOOL: - set_link("link",ValueNode_Const::create(value.get(bool()))); - break; - case ValueBase::TYPE_COLOR: - set_link("link",ValueNode_Const::create(value.get(Color()))); - break; - case ValueBase::TYPE_INTEGER: - set_link("link",ValueNode_Const::create(value.get(int()))); - break; - case ValueBase::TYPE_REAL: - set_link("link",ValueNode_Const::create(value.get(Real()))); - break; - case ValueBase::TYPE_TIME: - set_link("link",ValueNode_Const::create(value.get(Time()))); - break; - case ValueBase::TYPE_VECTOR: - set_link("link",ValueNode_Const::create(value.get(Vector()))); - break; - default: - throw Exception::BadType(ValueBase::type_local_name(get_type())); - } - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_Random::create_new()const -{ - return new ValueNode_Random(get_type()); -} - -ValueNode_Random* -ValueNode_Random::create(const ValueBase &x) -{ - return new ValueNode_Random(x); -} - -ValueNode_Random::~ValueNode_Random() -{ - unlink_all(); -} - -ValueBase -ValueNode_Random::operator()(Time t)const -{ - typedef const RandomNoise::SmoothType Smooth; - - Real radius = (*radius_)(t).get(Real()); - int seed = (*seed_)(t).get(int()); - int smooth = (*smooth_)(t).get(int()); - float speed = (*speed_ )(t).get(Real()); - int loop = int((((*loop_ )(t).get(Real())) * speed) + 0.5); - speed *= t; - - random.set_seed(seed); - - switch(get_type()) - { - case ValueBase::TYPE_ANGLE: - return ((*link_)(t).get( Angle()) + - Angle::deg(random(Smooth(smooth), 0, 0, 0, speed, loop) * radius)); - - case ValueBase::TYPE_BOOL: - return round_to_int((*link_)(t).get( bool()) + - random(Smooth(smooth), 0, 0, 0, speed, loop) * radius) > 0; - - case ValueBase::TYPE_COLOR: - return (((*link_)(t).get( Color()) + - Color(random(Smooth(smooth), 0, 0, 0, speed, loop), - random(Smooth(smooth), 1, 0, 0, speed, loop), - random(Smooth(smooth), 2, 0, 0, speed, loop), 0) * radius).clamped()); - - case ValueBase::TYPE_INTEGER: - return round_to_int((*link_)(t).get( int()) + - random(Smooth(smooth), 0, 0, 0, speed, loop) * radius); - - case ValueBase::TYPE_REAL: - return ((*link_)(t).get( Real()) + - random(Smooth(smooth), 0, 0, 0, speed, loop) * radius); - - case ValueBase::TYPE_TIME: - return ((*link_)(t).get( Time()) + - random(Smooth(smooth), 0, 0, 0, speed, loop) * radius); - - case ValueBase::TYPE_VECTOR: - { - float length(random(Smooth(smooth), 0, 0, 0, speed, loop) * radius); - Angle::rad angle(random(Smooth(smooth), 1, 0, 0, speed, loop) * PI); - - return ((*link_)(t).get(Vector()) + - Vector(Angle::cos(angle).get(), Angle::sin(angle).get()) * length); - } - - default: - assert(0); - break; - } - - return ValueBase(); -} - - -String -ValueNode_Random::get_name()const -{ - return "random"; -} - -String -ValueNode_Random::get_local_name()const -{ - return _("Random"); -} - -bool -ValueNode_Random::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && irandomize_seed(); - return ret; -} - -void -ValueNode_Random::randomize_seed() -{ - int i = get_link_index_from_name("seed"); - ValueNode::Handle link = get_link_vfunc(i); - if(!link->is_exported() && link->get_name() == "constant") - { - int seed = time(NULL) + rand(); - if (seed < 0) seed = -seed; - random.set_seed(seed); - set_link(i, ValueNode_Const::create(seed)); - } -} diff --git a/synfig-core/trunk/src/modules/mod_noise/valuenode_random.h b/synfig-core/trunk/src/modules/mod_noise/valuenode_random.h deleted file mode 100644 index beafcf2..0000000 --- a/synfig-core/trunk/src/modules/mod_noise/valuenode_random.h +++ /dev/null @@ -1,91 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_random.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_VALUENODE_INTERPOLATION_RANDOM_H -#define __SYNFIG_VALUENODE_INTERPOLATION_RANDOM_H - -/* === H E A D E R S ======================================================= */ - -#include "synfig/valuenode.h" -#include "random_noise.h" - -/* === M A C R O S ========================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class ValueNode_Random : public LinkableValueNode -{ - ValueNode::RHandle link_; - ValueNode::RHandle radius_; - ValueNode::RHandle seed_; - ValueNode::RHandle speed_; - ValueNode::RHandle smooth_; - ValueNode::RHandle loop_; - - mutable RandomNoise random; - RandomNoise::SmoothType smooth; - ValueNode_Random(const ValueBase &value); - -public: - - typedef etl::handle Handle; - typedef etl::handle ConstHandle; - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_Random(); - - virtual String get_name()const; - virtual String get_local_name()const; - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - - virtual ValueNode* clone(const GUID& deriv_guid=GUID())const; - - void randomize_seed(); - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Random* create(const ValueBase &x); -}; // END of class ValueNode_Random - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_openexr/Makefile.am b/synfig-core/trunk/src/modules/mod_openexr/Makefile.am deleted file mode 100644 index d719c0f..0000000 --- a/synfig-core/trunk/src/modules/mod_openexr/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -moduledir = @MODULE_DIR@ - -if WITH_OPENEXR - -module_LTLIBRARIES = libmod_openexr.la - -libmod_openexr_la_SOURCES = \ - main.cpp \ - mptr_openexr.cpp \ - mptr_openexr.h \ - trgt_openexr.cpp \ - trgt_openexr.h - -libmod_openexr_la_LDFLAGS = \ - -module \ - @PNG_LIBS@ \ - -no-undefined \ - -avoid-version - -libmod_openexr_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @SYNFIG_LIBS@ @OPENEXR_LIBS@ - -libmod_openexr_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ @OPENEXR_CFLAGS@ - -endif - - -EXTRA_DIST = \ - mod_openexr.nsh \ - unmod_openexr.nsh diff --git a/synfig-core/trunk/src/modules/mod_openexr/main.cpp b/synfig-core/trunk/src/modules/mod_openexr/main.cpp deleted file mode 100644 index 41aadf7..0000000 --- a/synfig-core/trunk/src/modules/mod_openexr/main.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_openexr/main.cpp -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#else -#warning HAVE_CONFIG_H not defined! -#endif - -#include -#include "trgt_openexr.h" -#include "mptr_openexr.h" -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(mod_openexr) - MODULE_NAME("OpenEXR Module") - MODULE_DESCRIPTION("Provides support for the EXR image format.") - MODULE_AUTHOR("Industrial Light & Magic") - MODULE_VERSION("1.0.4") - MODULE_COPYRIGHT("OpenEXR Library is Copyright (c) 2003 Lucas Digital Ltd. LLC.") -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(mod_openexr) - BEGIN_TARGETS - TARGET(exr_trgt) - END_TARGETS - BEGIN_IMPORTERS - IMPORTER(exr_mptr) - END_IMPORTERS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mod_openexr/mod_openexr.nsh b/synfig-core/trunk/src/modules/mod_openexr/mod_openexr.nsh deleted file mode 100644 index 512f643..0000000 --- a/synfig-core/trunk/src/modules/mod_openexr/mod_openexr.nsh +++ /dev/null @@ -1,26 +0,0 @@ -; The stuff to install -Section "mod_openexr" Sec_mod_openexr - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=mod_openexr.dll "src\modules\mod_openexr\.libs\libmod_openexr.dll" - - SetOutPath "$INSTDIR\bin" - File "src\modules\mod_openexr\.libs\libHalf*.dll" - File "src\modules\mod_openexr\.libs\libIlmImf*.dll" - File "src\modules\mod_openexr\.libs\libIlmThread*.dll" - File "src\modules\mod_openexr\.libs\libIex*.dll" - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "mod_openexr" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_openexr/mptr_openexr.cpp b/synfig-core/trunk/src/modules/mod_openexr/mptr_openexr.cpp deleted file mode 100644 index d29719e..0000000 --- a/synfig-core/trunk/src/modules/mod_openexr/mptr_openexr.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mptr_openexr.cpp -** \brief ppm Target Module -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "mptr_openexr.h" -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_IMPORTER_INIT(exr_mptr); -SYNFIG_IMPORTER_SET_NAME(exr_mptr,"openexr"); -SYNFIG_IMPORTER_SET_EXT(exr_mptr,"exr"); -SYNFIG_IMPORTER_SET_VERSION(exr_mptr,"0.1"); -SYNFIG_IMPORTER_SET_CVS_ID(exr_mptr,"$Id$"); - -/* === M E T H O D S ======================================================= */ - -exr_mptr::exr_mptr(const char *file) -{ - filename=file; -} - -exr_mptr::~exr_mptr() -{ -} - -bool -exr_mptr::get_frame(synfig::Surface &out_surface,Time, synfig::ProgressCallback *cb) -{ - try - { - - Imf::RgbaInputFile in(filename.c_str()); - - int w = in.dataWindow().max.x - in.dataWindow().min.x + 1; - int h = in.dataWindow().max.y - in.dataWindow().min.y + 1; - //int dx = in.dataWindow().min.x; - //int dy = in.dataWindow().min.y; - -#ifdef USE_HALF_TYPE - out_surface.set_wh(w,h); - in.setFrameBuffer (reinterpret_cast(out_surface[0]), 1, w); - - in.readPixels (in.dataWindow().min.y, in.dataWindow().max.y); - -#else - etl::surface in_surface; - in_surface.set_wh(w,h); - in.setFrameBuffer (reinterpret_cast(in_surface[0]), 1, w); - - in.readPixels (in.dataWindow().min.y, in.dataWindow().max.y); - - int x; - int y; - out_surface.set_wh(w,h); - for(y=0;yerror(e.what()); - else synfig::error(e.what()); - return false; - } - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_openexr/mptr_openexr.h b/synfig-core/trunk/src/modules/mod_openexr/mptr_openexr.h deleted file mode 100644 index 2ab295f..0000000 --- a/synfig-core/trunk/src/modules/mod_openexr/mptr_openexr.h +++ /dev/null @@ -1,60 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mptr_openexr.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_MPTR_OPENEXR_H -#define __SYNFIG_MPTR_OPENEXR_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class exr_mptr : public synfig::Importer -{ - SYNFIG_IMPORTER_MODULE_EXT - -private: - synfig::String filename; -public: - exr_mptr(const char *filename); - ~exr_mptr(); - - - - virtual bool get_frame(synfig::Surface &surface,synfig::Time time, synfig::ProgressCallback *callback); - -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_openexr/trgt_openexr.cpp b/synfig-core/trunk/src/modules/mod_openexr/trgt_openexr.cpp deleted file mode 100644 index ccfa576..0000000 --- a/synfig-core/trunk/src/modules/mod_openexr/trgt_openexr.cpp +++ /dev/null @@ -1,190 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_openexr.cpp -** \brief exr_trgt Target Module -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_TARGET - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "trgt_openexr.h" -#include -#include -#include -#include -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_TARGET_INIT(exr_trgt); -SYNFIG_TARGET_SET_NAME(exr_trgt,"openexr"); -SYNFIG_TARGET_SET_EXT(exr_trgt,"exr"); -SYNFIG_TARGET_SET_VERSION(exr_trgt,"1.0.4"); -SYNFIG_TARGET_SET_CVS_ID(exr_trgt,"$Id$"); - -/* === M E T H O D S ======================================================= */ - -bool -exr_trgt::ready() -{ - return (bool)exr_file; -} - -exr_trgt::exr_trgt(const char *Filename): - multi_image(false), - imagecount(0), - filename(Filename), - exr_file(0) -{ - buffer=0; -#ifndef USE_HALF_TYPE - buffer_color=0; -#endif - - // OpenEXR uses linear gamma - gamma().set_gamma(1.0); -} - -exr_trgt::~exr_trgt() -{ - if(exr_file) - delete exr_file; - - if(buffer) delete [] buffer; -#ifndef USE_HALF_TYPE - if(buffer_color) delete [] buffer_color; -#endif -} - -bool -exr_trgt::set_rend_desc(RendDesc *given_desc) -{ - //given_desc->set_pixel_format(PixelFormat((int)PF_RAW_COLOR)); - desc=*given_desc; - imagecount=desc.get_frame_start(); - if(desc.get_frame_end()-desc.get_frame_start()>0) - multi_image=true; - else - multi_image=false; - return true; -} - -bool -exr_trgt::start_frame(synfig::ProgressCallback *cb) -{ - int w=desc.get_w(),h=desc.get_h(); - - String frame_name; - - if(exr_file) - delete exr_file; - if(multi_image) - { - frame_name = (filename_sans_extension(filename) + - etl::strprintf(".%04d",imagecount) + - filename_extension(filename)); - if(cb)cb->task(frame_name); - } - else - { - frame_name=filename; - if(cb)cb->task(filename); - } - exr_file=new Imf::RgbaOutputFile(frame_name.c_str(),w,h,Imf::WRITE_RGBA,desc.get_pixel_aspect()); -#ifndef USE_HALF_TYPE - if(buffer_color) delete [] buffer_color; - buffer_color=new Color[w]; -#endif - //if(buffer) delete [] buffer; - //buffer=new Imf::Rgba[w]; - out_surface.set_wh(w,h); - - return true; -} - -void -exr_trgt::end_frame() -{ - if(exr_file) - { - exr_file->setFrameBuffer(out_surface[0],1,desc.get_w()); - exr_file->writePixels(desc.get_h()); - - delete exr_file; - } - - exr_file=0; - - imagecount++; -} - -Color * -exr_trgt::start_scanline(int i) -{ - scanline=i; -#ifndef USE_HALF_TYPE - return reinterpret_cast(buffer_color); -#else - return reinterpret_cast(out_surface[scanline]); -// return reinterpret_cast(buffer); -#endif -} - -bool -exr_trgt::end_scanline() -{ - if(!ready()) - return false; - -#ifndef USE_HALF_TYPE - int i; - for(i=0;isetFrameBuffer(buffer,1,desc.get_w()); - //exr_file->writePixels(1); - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_openexr/trgt_openexr.h b/synfig-core/trunk/src/modules/mod_openexr/trgt_openexr.h deleted file mode 100644 index 9a4e13f..0000000 --- a/synfig-core/trunk/src/modules/mod_openexr/trgt_openexr.h +++ /dev/null @@ -1,78 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_openexr.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TRGT_OPENEXR_H -#define __SYNFIG_TRGT_OPENEXR_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class exr_trgt : public synfig::Target_Scanline -{ -public: -private: - bool multi_image; - int imagecount,scanline; - synfig::String filename; - Imf::RgbaOutputFile *exr_file; - Imf::Rgba *buffer; - etl::surface out_surface; -#ifndef USE_HALF_TYPE - synfig::Color *buffer_color; -#endif - - bool ready(); -public: - exr_trgt(const char *filename); - virtual ~exr_trgt(); - - virtual bool set_rend_desc(synfig::RendDesc *desc); - virtual bool start_frame(synfig::ProgressCallback *cb); - virtual void end_frame(); - - virtual synfig::Color * start_scanline(int scanline); - virtual bool end_scanline(void); - - - SYNFIG_TARGET_MODULE_EXT -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_openexr/unmod_openexr.nsh b/synfig-core/trunk/src/modules/mod_openexr/unmod_openexr.nsh deleted file mode 100644 index e4b15de..0000000 --- a/synfig-core/trunk/src/modules/mod_openexr/unmod_openexr.nsh +++ /dev/null @@ -1,13 +0,0 @@ -Section "un.mod_openexr" - Delete "$INSTDIR\bin\libIex*.dll" - Delete "$INSTDIR\bin\libIlmImf*.dll" - Delete "$INSTDIR\bin\libIlmThread*.dll" - Delete "$INSTDIR\bin\libHalf*.dll" - Delete "$INSTDIR\lib\synfig\modules\mod_openexr.dll" - RMDir "$INSTDIR\lib\synfig\modules" - RMDir "$INSTDIR\lib\synfig" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR\bin" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_particle/Makefile.am b/synfig-core/trunk/src/modules/mod_particle/Makefile.am deleted file mode 100644 index ffe2a89..0000000 --- a/synfig-core/trunk/src/modules/mod_particle/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -moduledir = @MODULE_DIR@ - -module_LTLIBRARIES = libmod_particle.la - -libmod_particle_la_SOURCES = \ - random.cpp \ - random.h \ - plant.cpp \ - plant.h \ - main.cpp - -libmod_particle_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ - -libmod_particle_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @SYNFIG_LIBS@ - -libmod_particle_la_LDFLAGS = \ - -module \ - -no-undefined \ - -avoid-version - - -EXTRA_DIST = \ - mod_particle.nsh \ - unmod_particle.nsh diff --git a/synfig-core/trunk/src/modules/mod_particle/main.cpp b/synfig-core/trunk/src/modules/mod_particle/main.cpp deleted file mode 100644 index c55ad9f..0000000 --- a/synfig-core/trunk/src/modules/mod_particle/main.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_particle/main.cpp -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include - -#include "plant.h" - -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(libmod_particle) - MODULE_NAME("Particle Systems") - MODULE_DESCRIPTION("writeme") - MODULE_AUTHOR("Robert B. Quattlebaum") - MODULE_VERSION("1.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(libmod_particle) - BEGIN_LAYERS - LAYER(Plant) - END_LAYERS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mod_particle/mod_particle.nsh b/synfig-core/trunk/src/modules/mod_particle/mod_particle.nsh deleted file mode 100644 index faff380..0000000 --- a/synfig-core/trunk/src/modules/mod_particle/mod_particle.nsh +++ /dev/null @@ -1,21 +0,0 @@ -; The stuff to install -Section "mod_particle" Sec_mod_particle - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=mod_particle.dll "src\modules\mod_particle\.libs\libmod_particle.dll" - - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "mod_particle" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_particle/plant.cpp b/synfig-core/trunk/src/modules/mod_particle/plant.cpp deleted file mode 100644 index 47b13a3..0000000 --- a/synfig-core/trunk/src/modules/mod_particle/plant.cpp +++ /dev/null @@ -1,742 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file plant.cpp -** \brief Implementation of the "Plant" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "plant.h" -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#endif - -using namespace etl; - -/* === M A C R O S ========================================================= */ - -#define SAMPLES 300 -#define ROUND_END_FACTOR (4) -#define CUSP_THRESHOLD (0.15) -#define NO_LOOP_COOKIE synfig::Vector(84951305,7836658) -#define EPSILON (0.000000001) -#define CUSP_TANGENT_ADJUST (0.025) - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Plant); -SYNFIG_LAYER_SET_NAME(Plant,"plant"); -SYNFIG_LAYER_SET_LOCAL_NAME(Plant,N_("Plant")); -SYNFIG_LAYER_SET_CATEGORY(Plant,N_("Other")); -SYNFIG_LAYER_SET_VERSION(Plant,"0.2"); -SYNFIG_LAYER_SET_CVS_ID(Plant,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - - -Plant::Plant(): - origin(0,0), - split_angle(Angle::deg(10)), - gravity(0,-0.1), - velocity(0.3), - perp_velocity(0.0), - step(0.01), - sprouts(10), - version(version__), - use_width(true) -{ - bounding_rect=Rect::zero(); - random_factor=0.2; - random.set_seed(time(NULL)); - - bline.push_back(BLinePoint()); - bline.push_back(BLinePoint()); - bline.push_back(BLinePoint()); - bline[0].set_vertex(Point(0,1)); - bline[1].set_vertex(Point(0,-1)); - bline[2].set_vertex(Point(1,0)); - bline[0].set_tangent(bline[1].get_vertex()-bline[2].get_vertex()*0.5f); - bline[1].set_tangent(bline[2].get_vertex()-bline[0].get_vertex()*0.5f); - bline[2].set_tangent(bline[0].get_vertex()-bline[1].get_vertex()*0.5f); - bline[0].set_width(1.0f); - bline[1].set_width(1.0f); - bline[2].set_width(1.0f); - bline_loop=true; - mass=(0.5); - splits=5; - drag=0.1; - size=0.015; - needs_sync_=true; - sync(); - size_as_alpha=false; - reverse=true; -} - -void -Plant::branch(int n,int depth,float t, float stunt_growth, synfig::Point position,synfig::Vector vel)const -{ - float next_split((1.0-t)/(splits-depth)+t/*+random_factor*random(40+depth,t*splits,0,0)/splits*/); - for(;t=1.0-stunt_growth)return; - - synfig::Real sin_v=synfig::Angle::cos(split_angle).get(); - synfig::Real cos_v=synfig::Angle::sin(split_angle).get(); - - synfig::Vector velocity1(vel[0]*sin_v - vel[1]*cos_v + random_factor*random(Random::SMOOTH_COSINE, 30+n+depth, t*splits, 0.0f, 0.0f), - vel[0]*cos_v + vel[1]*sin_v + random_factor*random(Random::SMOOTH_COSINE, 32+n+depth, t*splits, 0.0f, 0.0f)); - synfig::Vector velocity2(vel[0]*sin_v + vel[1]*cos_v + random_factor*random(Random::SMOOTH_COSINE, 31+n+depth, t*splits, 0.0f, 0.0f), - -vel[0]*cos_v + vel[1]*sin_v + random_factor*random(Random::SMOOTH_COSINE, 33+n+depth, t*splits, 0.0f, 0.0f)); - - Plant::branch(n,depth+1,t,stunt_growth,position,velocity1); - Plant::branch(n,depth+1,t,stunt_growth,position,velocity2); -} - -void -Plant::calc_bounding_rect()const -{ - std::vector::const_iterator iter,next; - - bounding_rect=Rect::zero(); - - // Bline must have at least 2 points in it - if(bline.size()<2) - return; - - next=bline.begin(); - - if(bline_loop) - iter=--bline.end(); - else - iter=next++; - - for(;next!=bline.end();iter=next++) - { - bounding_rect.expand(iter->get_vertex()); - bounding_rect.expand(next->get_vertex()); - bounding_rect.expand(iter->get_vertex()+iter->get_tangent2()*0.3333333333333); - bounding_rect.expand(next->get_vertex()-next->get_tangent1()*0.3333333333333); - bounding_rect.expand(next->get_vertex()+next->get_tangent2()*velocity); - } - bounding_rect.expand_x(gravity[0]); - bounding_rect.expand_y(gravity[1]); - bounding_rect.expand_x(size); - bounding_rect.expand_y(size); -} - -void -Plant::sync()const -{ - Mutex::Lock lock(mutex); - if (!needs_sync_) return; - time_t start_time; time(&start_time); - particle_list.clear(); - - bounding_rect=Rect::zero(); - - // Bline must have at least 2 points in it - if(bline.size()<2) - { - needs_sync_=false; - return; - } - - std::vector::const_iterator iter,next; - - etl::hermite curve; - - Real step(abs(this->step)); - - int seg(0); - - next=bline.begin(); - - if(bline_loop) iter=--bline.end(); // iter is the last bline in the list; next is the first bline in the list - else iter=next++; // iter is the first bline in the list; next is the second bline in the list - - // loop through the bline; seg counts the blines as we do so; stop before iter is the last bline in the list - for(;next!=bline.end();iter=next++,seg++) - { - float iterw=iter->get_width(); // the width value of the iter vertex - float nextw=next->get_width(); // the width value of the next vertex - float width; // the width at an intermediate position - curve.p1()=iter->get_vertex(); - curve.t1()=iter->get_tangent2(); - curve.p2()=next->get_vertex(); - curve.t2()=next->get_tangent1(); - curve.sync(); - etl::derivative > deriv(curve); - - Real f; - - int i=0, branch_count = 0, steps = round_to_int(1.0/step); - if (steps < 1) steps = 1; - for(f=0.0;f<1.0;f+=step,i++) - { - Point point(curve(f)); - - particle_list.push_back(Particle(point, gradient(0))); - if (particle_list.size() % 1000000 == 0) - synfig::info("constructed %d million particles...", particle_list.size()/1000000); - - bounding_rect.expand(point); - - Real stunt_growth(random_factor * (random(Random::SMOOTH_COSINE,i,f+seg,0.0f,0.0f)/2.0+0.5)); - stunt_growth*=stunt_growth; - - if((((i+1)*sprouts + steps/2) / steps) > branch_count) { - Vector branch_velocity(deriv(f).norm()*velocity + deriv(f).perp().norm()*perp_velocity); - - if (isnan(branch_velocity[0]) || isnan(branch_velocity[1])) - continue; - - branch_velocity[0] += random_factor * random(Random::SMOOTH_COSINE, 1, f*splits, 0.0f, 0.0f); - branch_velocity[1] += random_factor * random(Random::SMOOTH_COSINE, 2, f*splits, 0.0f, 0.0f); - - if (use_width) - { - width = iterw+(nextw-iterw)*f; // calculate the width based on the current position - - branch_velocity[0] *= width; // scale the velocity accordingly to the current width - branch_velocity[1] *= width; - } - - branch_count++; - branch(i, 0, 0, // time - stunt_growth, // stunt growth - point, branch_velocity); - } - } - } - - time_t end_time; time(&end_time); - if (end_time-start_time > 4) - synfig::info("Plant::sync() constructed %d particles in %d seconds\n", - particle_list.size(), int(end_time-start_time)); - needs_sync_=false; -} - -bool -Plant::set_param(const String & param, const ValueBase &value) -{ - if(param=="bline" && value.get_type()==ValueBase::TYPE_LIST) - { - bline=value; - bline_loop=value.get_loop(); - needs_sync_=true; - - return true; - } - if(param=="seed" && value.same_type_as(int())) - { - random.set_seed(value.get(int())); - needs_sync_=true; - return true; - } - IMPORT(origin); - IMPORT_PLUS(split_angle,needs_sync_=true); - IMPORT_PLUS(gravity,needs_sync_=true); - IMPORT_PLUS(gradient,needs_sync_=true); - IMPORT_PLUS(velocity,needs_sync_=true); - IMPORT_PLUS(perp_velocity,needs_sync_=true); - IMPORT_PLUS(step,{ - needs_sync_ = true; - if (step <= 0) - step=0.01; // user is probably clueless - give a good default - else if (step < 0.00001) - step=0.00001; // 100K should be enough for anyone - else if (step > 1) - step=1; - }); - IMPORT_PLUS(splits,{ - needs_sync_=true; - if (splits < 1) - splits = 1; - }); - IMPORT_PLUS(sprouts,needs_sync_=true); - IMPORT_PLUS(random_factor,needs_sync_=true); - IMPORT_PLUS(drag,needs_sync_=true); - IMPORT(size); - IMPORT(size_as_alpha); - IMPORT(reverse); - IMPORT(use_width); - - IMPORT_AS(origin,"offset"); - - return Layer_Composite::set_param(param,value); -} -/* -void -Plant::set_time(Context context, Time time)const -{ - if(needs_sync==true) - { - sync(); - needs_sync_=false; - } - //const_cast(this)->sync(); - context.set_time(time); -} - -void -Plant::set_time(Context context, Time time, Vector pos)const -{ - if(needs_sync==true) - { - sync(); - needs_sync_=false; - } - //const_cast(this)->sync(); - context.set_time(time,pos); -} -*/ -ValueBase -Plant::get_param(const String& param)const -{ - if(param=="seed") - return random.get_seed(); - EXPORT(bline); - EXPORT(origin); - EXPORT(split_angle); - EXPORT(gravity); - EXPORT(velocity); - EXPORT(perp_velocity); - EXPORT(step); - EXPORT(gradient); - EXPORT(splits); - EXPORT(sprouts); - EXPORT(random_factor); - EXPORT(drag); - EXPORT(size); - EXPORT(size_as_alpha); - EXPORT(reverse); - EXPORT(use_width); - - EXPORT_NAME(); - - if(param=="Version" || param=="version" || param=="version__") - return version; - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -Plant::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("bline") - .set_local_name(_("Vertices")) - .set_description(_("A list of BLine Points")) - .set_origin("origin") - .set_hint("width") - ); - - ret.push_back(ParamDesc("origin") - .set_local_name(_("Origin")) - ); - - ret.push_back(ParamDesc("gradient") - .set_local_name(_("Gradient")) - .set_description(_("Gradient to be used for coloring the plant")) - ); - - ret.push_back(ParamDesc("split_angle") - .set_local_name(_("Split Angle")) - .set_description(_("Angle by which each split deviates from its parent")) - ); - - ret.push_back(ParamDesc("gravity") - .set_local_name(_("Gravity")) - .set_description(_("Direction in which the shoots tend to face")) - .set_is_distance() - ); - - ret.push_back(ParamDesc("velocity") - .set_local_name(_("Tangential Velocity")) - .set_description(_("Amount to which shoots tend to grow along the tangent to the BLine")) - ); - - ret.push_back(ParamDesc("perp_velocity") - .set_local_name(_("Perpendicular Velocity")) - .set_description(_("Amount to which shoots tend to grow perpendicular to the tangent to the BLine")) - ); - - ret.push_back(ParamDesc("size") - .set_local_name(_("Stem Size")) - .set_description(_("Size of the stem")) - .set_is_distance() - ); - - ret.push_back(ParamDesc("size_as_alpha") - .set_local_name(_("Size As Alpha")) - .set_description(_("If enabled, the alpha channel from the gradient is multiplied by the stem size, and an alpha of 1.0 is used when rendering")) - ); - - ret.push_back(ParamDesc("reverse") - .set_local_name(_("Reverse")) - .set_description(_("If enabled, render the plant in the opposite direction")) - ); - - ret.push_back(ParamDesc("step") - .set_local_name(_("Step")) - .set_description(_("Measure of the distance between points when rendering")) - ); - - ret.push_back(ParamDesc("seed") - .set_local_name(_("Seed")) - .set_description(_("Used to seed the pseudo-random number generator")) - ); - - ret.push_back(ParamDesc("splits") - .set_local_name(_("Splits")) - .set_description(_("Maximum number of times that each sprout can sprout recursively")) - ); - - ret.push_back(ParamDesc("sprouts") - .set_local_name(_("Sprouts")) - .set_description(_("Number of places that growth occurs on each bline section")) - ); - - ret.push_back(ParamDesc("random_factor") - .set_local_name(_("Random Factor")) - .set_description(_("Used to scale down all random effects. Set to zero to disable randomness")) - ); - - ret.push_back(ParamDesc("drag") - .set_local_name(_("Drag")) - .set_description(_("Drag slows the growth")) - ); - - ret.push_back(ParamDesc("use_width") - .set_local_name(_("Use Width")) - .set_description(_("Scale the velocity by the bline's width")) - ); - - return ret; -} - -bool -Plant::set_version(const String &ver) -{ - version = ver; - - if (version == "0.1") - use_width = false; - - return true; -} - -bool -Plant::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - bool ret(context.accelerated_render(surface,quality,renddesc,cb)); - if(is_disabled() || !ret) - return ret; - - Surface dest_surface; - dest_surface.set_wh(surface->get_w(),surface->get_h()); - dest_surface.clear(); - - const Point tl(renddesc.get_tl()-origin); - const Point br(renddesc.get_br()-origin); - - const int w(renddesc.get_w()); - const int h(renddesc.get_h()); - - const int surface_width(surface->get_w()); - const int surface_height(surface->get_h()); - - // Width and Height of a pixel - const Real pw = (br[0] - tl[0]) / w; - const Real ph = (br[1] - tl[1]) / h; - - if (isinf(pw) || isinf(ph)) - return true; - - if(needs_sync_==true) - sync(); - - if (particle_list.begin() != particle_list.end()) - { - std::vector::iterator iter; - Particle *particle; - - float radius(size*sqrt(1.0f/(abs(pw)*abs(ph)))); - - int x1,y1,x2,y2; - - if (reverse) iter = particle_list.end(); - else iter = particle_list.begin(); - - while (true) - { - if (reverse) particle = &(*(iter-1)); - else particle = &(*iter); - - float scaled_radius(radius); - Color color(particle->color); - if(size_as_alpha) - { - scaled_radius*=color.get_a(); - color.set_a(1); - } - - // previously, radius was multiplied by sqrt(step)*12 only if - // the radius came out at less than 1 (pixel): - // if (radius<=1.0f) radius*=sqrt(step)*12.0f; - // seems a little arbitrary - does it help? - - // calculate the box that this particle will be drawn as - float x1f=(particle->point[0]-tl[0])/pw-(scaled_radius*0.5); - float x2f=(particle->point[0]-tl[0])/pw+(scaled_radius*0.5); - float y1f=(particle->point[1]-tl[1])/ph-(scaled_radius*0.5); - float y2f=(particle->point[1]-tl[1])/ph+(scaled_radius*0.5); - x1=ceil_to_int(x1f); - x2=ceil_to_int(x2f)-1; - y1=ceil_to_int(y1f); - y2=ceil_to_int(y2f)-1; - - // if the box isn't entirely off the canvas, draw it - if(x1<=surface_width && y1<=surface_height && x2>=0 && y2>=0) - { - float x1e=x1-x1f, x2e=x2f-x2, y1e=y1-y1f, y2e=y2f-y2; - // printf("x1e %.4f x2e %.4f y1e %.4f y2e %.4f\n", x1e, x2e, y1e, y2e); - - // adjust the box so it's entirely on the canvas - if(x1<=0) { x1=0; x1e=0; } - if(y1<=0) { y1=0; y1e=0; } - if(x2>=surface_width) { x2=surface_width; x2e=0; } - if(y2>=surface_height) { y2=surface_height; y2e=0; } - - int w(x2-x1), h(y2-y1); - - Surface::alpha_pen surface_pen(dest_surface.get_pen(x1,y1),1.0f); - if(w>0 && h>0) - dest_surface.fill(color,surface_pen,w,h); - - /* the rectangle doesn't cross any vertical pixel boundaries so we don't - * need to draw any top or bottom edges - */ - if(x2get_pen(0,0),get_amount(),get_blend_method()); - dest_surface.blit_to(pen); - - return true; -} - -Rect -Plant::get_bounding_rect(Context context)const -{ - if(needs_sync_==true) - sync(); - - if(is_disabled()) - return Rect::zero(); - - if(Color::is_onto(get_blend_method())) - return context.get_full_bounding_rect() & bounding_rect; - - //if(get_blend_method()==Color::BLEND_BEHIND) - // return context.get_full_bounding_rect() | bounding_rect; - return bounding_rect; -} diff --git a/synfig-core/trunk/src/modules/mod_particle/plant.h b/synfig-core/trunk/src/modules/mod_particle/plant.h deleted file mode 100644 index b399a8a..0000000 --- a/synfig-core/trunk/src/modules/mod_particle/plant.h +++ /dev/null @@ -1,119 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file plant.h -** \brief Header file for implementation of the "Plant" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_PLANT_H -#define __SYNFIG_PLANT_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "random.h" -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -class Plant : public synfig::Layer_Composite -{ - SYNFIG_LAYER_MODULE_EXT -private: - - std::vector bline; - bool bline_loop; - - Point origin; - - synfig::Gradient gradient; - - struct Particle - { - synfig::Point point; - synfig::Color color; - - Particle(const synfig::Point &point,const synfig::Color& color): - point(point),color(color) { } - }; - - mutable std::vector particle_list; - mutable synfig::Rect bounding_rect; - synfig::Angle split_angle; - synfig::Vector gravity; - synfig::Real velocity; - synfig::Real perp_velocity; - synfig::Real step; - synfig::Real mass; - synfig::Real drag; - synfig::Real size; - int splits; - int sprouts; - synfig::Real random_factor; - Random random; - - bool size_as_alpha; - bool reverse; - mutable bool needs_sync_; - mutable synfig::Mutex mutex; - - void branch(int n, int depth,float t, float stunt_growth, synfig::Point position,synfig::Vector velocity)const; - void sync()const; - String version; - bool use_width; - -public: - - Plant(); - - void calc_bounding_rect()const; - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - - virtual ValueBase get_param(const String & param)const; - - virtual bool set_version(const synfig::String &ver); - - virtual Vocab get_param_vocab()const; - - virtual bool accelerated_render(synfig::Context context,synfig::Surface *surface,int quality, const synfig::RendDesc &renddesc, synfig::ProgressCallback *cb)const;\ - - virtual synfig::Rect get_bounding_rect(synfig::Context context)const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_particle/random.cpp b/synfig-core/trunk/src/modules/mod_particle/random.cpp deleted file mode 100644 index ebdff92..0000000 --- a/synfig-core/trunk/src/modules/mod_particle/random.cpp +++ /dev/null @@ -1,312 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_particle/random.cpp -** \brief blehh -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "random.h" -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -#define PI (3.1415927) - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -void -Random::set_seed(int x) -{ - seed_=x; - srand(x); - int i; - for(i=0;i0)?((x)*(x)*(x)):0.0f) -#define R(x) ( P(x+2) - 4.0f*P(x+1) + 6.0f*P(x) - 4.0f*P(x-1) )*(1.0f/6.0f) -#define F(i,j) ((*this)(subseed,i+x,j+y)*(R((i)-a)*R(b-(j)))) -#define FT(i,j,k) ((*this)(subseed,i+x,j+y,k+t)*(R((i)-a)*R(b-(j))*R((k)-c))) -#define Z(i,j) ret+=F(i,j) -#define ZT(i,j,k) ret+=FT(i,j,k) -#define X(i,j) // placeholder... To make box more symmetric -#define XT(i,j,k) // placeholder... To make box more symmetric - - float a(xf-x), b(yf-y); - - // Interpolate - float ret(F(0,0)); - Z(-1,-1); Z(-1, 0); Z(-1, 1); Z(-1, 2); - Z( 0,-1); X( 0, 0); Z( 0, 1); Z( 0, 2); - Z( 1,-1); Z( 1, 0); Z( 1, 1); Z( 1, 2); - Z( 2,-1); Z( 2, 0); Z( 2, 1); Z( 2, 2); - - return ret; - } - - case SMOOTH_SPLINE: // Spline (animated) - { - float a(xf-x), b(yf-y), c(tf-t); - - // Interpolate - float ret(FT(0,0,0)); - ZT(-1,-1,-1); ZT(-1, 0,-1); ZT(-1, 1,-1); ZT(-1, 2,-1); - ZT( 0,-1,-1); ZT( 0, 0,-1); ZT( 0, 1,-1); ZT( 0, 2,-1); - ZT( 1,-1,-1); ZT( 1, 0,-1); ZT( 1, 1,-1); ZT( 1, 2,-1); - ZT( 2,-1,-1); ZT( 2, 0,-1); ZT( 2, 1,-1); ZT( 2, 2,-1); - - ZT(-1,-1, 0); ZT(-1, 0, 0); ZT(-1, 1, 0); ZT(-1, 2, 0); - ZT( 0,-1, 0); XT( 0, 0, 0); ZT( 0, 1, 0); ZT( 0, 2, 0); - ZT( 1,-1, 0); ZT( 1, 0, 0); ZT( 1, 1, 0); ZT( 1, 2, 0); - ZT( 2,-1, 0); ZT( 2, 0, 0); ZT( 2, 1, 0); ZT( 2, 2, 0); - - ZT(-1,-1, 1); ZT(-1, 0, 1); ZT(-1, 1, 1); ZT(-1, 2, 1); - ZT( 0,-1, 1); ZT( 0, 0, 1); ZT( 0, 1, 1); ZT( 0, 2, 1); - ZT( 1,-1, 1); ZT( 1, 0, 1); ZT( 1, 1, 1); ZT( 1, 2, 1); - ZT( 2,-1, 1); ZT( 2, 0, 1); ZT( 2, 1, 1); ZT( 2, 2, 1); - - ZT(-1,-1, 2); ZT(-1, 0, 2); ZT(-1, 1, 2); ZT(-1, 2, 2); - ZT( 0,-1, 2); ZT( 0, 0, 2); ZT( 0, 1, 2); ZT( 0, 2, 2); - ZT( 1,-1, 2); ZT( 1, 0, 2); ZT( 1, 1, 2); ZT( 1, 2, 2); - ZT( 2,-1, 2); ZT( 2, 0, 2); ZT( 2, 1, 2); ZT( 2, 2, 2); - - return ret; - -/* - - float dx=xf-x; - float dy=yf-y; - float dt=tf-t; - - float ret=0; - int i,j,h; - for(h=-1;h<=2;h++) - for(i=-1;i<=2;i++) - for(j=-1;j<=2;j++) - ret+=(*this)(subseed,i+x,j+y,h+t)*(R(i-dx)*R(j-dy)*R(h-dt)); - return ret; -*/ - } - break; -#undef X -#undef Z -#undef F -#undef P -#undef R - - case SMOOTH_COSINE: - if((float)t==tf) - { - int x((int)floor(xf)); - int y((int)floor(yf)); - float a=xf-x; - float b=yf-y; - a=(1.0f-cos(a*PI))*0.5f; - b=(1.0f-cos(b*PI))*0.5f; - float c=1.0-a; - float d=1.0-b; - int x2=x+1,y2=y+1; - return - (*this)(subseed,x,y,t)*(c*d)+ - (*this)(subseed,x2,y,t)*(a*d)+ - (*this)(subseed,x,y2,t)*(c*b)+ - (*this)(subseed,x2,y2,t)*(a*b); - } - else - { - float a=xf-x; - float b=yf-y; - float c=tf-t; - - a=(1.0f-cos(a*PI))*0.5f; - b=(1.0f-cos(b*PI))*0.5f; - - // We don't perform this on the time axis, otherwise we won't - // get smooth motion - //c=(1.0f-cos(c*PI))*0.5f; - - float d=1.0-a; - float e=1.0-b; - float f=1.0-c; - - int x2=x+1,y2=y+1,t2=t+1; - - return - (*this)(subseed,x,y,t)*(d*e*f)+ - (*this)(subseed,x2,y,t)*(a*e*f)+ - (*this)(subseed,x,y2,t)*(d*b*f)+ - (*this)(subseed,x2,y2,t)*(a*b*f)+ - (*this)(subseed,x,y,t2)*(d*e*c)+ - (*this)(subseed,x2,y,t2)*(a*e*c)+ - (*this)(subseed,x,y2,t2)*(d*b*c)+ - (*this)(subseed,x2,y2,t2)*(a*b*c); - } - case SMOOTH_LINEAR: - if((float)t==tf) - { - int x((int)floor(xf)); - int y((int)floor(yf)); - float a=xf-x; - float b=yf-y; - float c=1.0-a; - float d=1.0-b; - int x2=x+1,y2=y+1; - return - (*this)(subseed,x,y,t)*(c*d)+ - (*this)(subseed,x2,y,t)*(a*d)+ - (*this)(subseed,x,y2,t)*(c*b)+ - (*this)(subseed,x2,y2,t)*(a*b); - } - else - { - - float a=xf-x; - float b=yf-y; - float c=tf-t; - - float d=1.0-a; - float e=1.0-b; - float f=1.0-c; - - int x2=x+1,y2=y+1,t2=t+1; - - return - (*this)(subseed,x,y,t)*(d*e*f)+ - (*this)(subseed,x2,y,t)*(a*e*f)+ - (*this)(subseed,x,y2,t)*(d*b*f)+ - (*this)(subseed,x2,y2,t)*(a*b*f)+ - (*this)(subseed,x,y,t2)*(d*e*c)+ - (*this)(subseed,x2,y,t2)*(a*e*c)+ - (*this)(subseed,x,y2,t2)*(d*b*c)+ - (*this)(subseed,x2,y2,t2)*(a*b*c); - } - default: - case SMOOTH_DEFAULT: - return (*this)(subseed,x,y,t); - } -} diff --git a/synfig-core/trunk/src/modules/mod_particle/random.h b/synfig-core/trunk/src/modules/mod_particle/random.h deleted file mode 100644 index 943a1cd..0000000 --- a/synfig-core/trunk/src/modules/mod_particle/random.h +++ /dev/null @@ -1,67 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_particle/random.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_RANDOM_H -#define __SYNFIG_RANDOM_H - -/* === H E A D E R S ======================================================= */ - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - - -#define POOL_SIZE (256) -class Random -{ - int pool_[POOL_SIZE]; - int seed_; - - int x_mask, y_mask, t_mask; - -public: - - void set_seed(int x); - int get_seed()const { return seed_; } - - enum SmoothType - { - SMOOTH_DEFAULT = 0, - SMOOTH_LINEAR = 1, - SMOOTH_COSINE = 2, - SMOOTH_SPLINE = 3, - SMOOTH_CUBIC = 4, - SMOOTH_FAST_SPLINE = 5, - }; - - float operator()(int salt,int x,int y=0, int t=0)const; - float operator()(SmoothType smooth,int subseed,float x,float y=0, float t=0)const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_particle/unmod_particle.nsh b/synfig-core/trunk/src/modules/mod_particle/unmod_particle.nsh deleted file mode 100644 index d848030..0000000 --- a/synfig-core/trunk/src/modules/mod_particle/unmod_particle.nsh +++ /dev/null @@ -1,8 +0,0 @@ -Section "un.mod_particle" - Delete "$INSTDIR\lib\synfig\modules\mod_particle.dll" - RMDir "$INSTDIR\lib\synfig\modules" - RMDir "$INSTDIR\lib\synfig" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_png/Makefile.am b/synfig-core/trunk/src/modules/mod_png/Makefile.am deleted file mode 100644 index d36942d..0000000 --- a/synfig-core/trunk/src/modules/mod_png/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -moduledir = @MODULE_DIR@ - -if HAVE_LIBPNG - -module_LTLIBRARIES = libmod_png.la - -libmod_png_la_SOURCES = \ - main.cpp \ - trgt_png.cpp \ - trgt_png.h \ - mptr_png.cpp \ - mptr_png.h - -libmod_png_la_LDFLAGS = \ - -module \ - @PNG_LIBS@ \ - -no-undefined \ - -avoid-version - -libmod_png_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ - -libmod_png_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @SYNFIG_LIBS@ - -endif - - -EXTRA_DIST = \ - mod_png.nsh \ - unmod_png.nsh diff --git a/synfig-core/trunk/src/modules/mod_png/main.cpp b/synfig-core/trunk/src/modules/mod_png/main.cpp deleted file mode 100644 index 25ffa4d..0000000 --- a/synfig-core/trunk/src/modules/mod_png/main.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_png/main.cpp -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "trgt_png.h" -#include "mptr_png.h" -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(mod_png) - MODULE_NAME("PNG Module (libpng)") - MODULE_DESCRIPTION("Provides a PNG target and importer") - MODULE_AUTHOR("Robert B. Quattlebaum Jr") - MODULE_VERSION("1.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(mod_png) - BEGIN_TARGETS - TARGET(png_trgt) - END_TARGETS - BEGIN_IMPORTERS - IMPORTER(png_mptr) - END_IMPORTERS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mod_png/mod_png.nsh b/synfig-core/trunk/src/modules/mod_png/mod_png.nsh deleted file mode 100644 index aaa7bbd..0000000 --- a/synfig-core/trunk/src/modules/mod_png/mod_png.nsh +++ /dev/null @@ -1,21 +0,0 @@ -; The stuff to install -Section "mod_png" Sec_mod_png - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=mod_png.dll "src\modules\mod_png\.libs\libmod_png.dll" - - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "mod_png" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_png/mptr_png.cpp b/synfig-core/trunk/src/modules/mod_png/mptr_png.cpp deleted file mode 100644 index 19f82f3..0000000 --- a/synfig-core/trunk/src/modules/mod_png/mptr_png.cpp +++ /dev/null @@ -1,431 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mptr_png.cpp -** \brief ppm Target Module -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/*! -** \todo Support 16 bit PNG files -** \todo Support GAMMA correction -** \todo Fix memory leaks -*/ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "mptr_png.h" -#include -#include -#include - - -#include -#include -#include -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -#define PNG_CHECK_BYTES 8 - -/* === G L O B A L S ======================================================= */ - -SYNFIG_IMPORTER_INIT(png_mptr); -SYNFIG_IMPORTER_SET_NAME(png_mptr,"png"); -SYNFIG_IMPORTER_SET_EXT(png_mptr,"png"); -SYNFIG_IMPORTER_SET_VERSION(png_mptr,"0.1"); -SYNFIG_IMPORTER_SET_CVS_ID(png_mptr,"$Id$"); - -/* === M E T H O D S ======================================================= */ - -void -png_mptr::png_out_error(png_struct */*png_data*/,const char *msg) -{ - //png_mptr *me=(png_mptr*)png_data->error_ptr; - synfig::error(strprintf("png_mptr: error: %s",msg)); - //me->ready=false; -} - -void -png_mptr::png_out_warning(png_struct */*png_data*/,const char *msg) -{ - //png_mptr *me=(png_mptr*)png_data->error_ptr; - synfig::warning(strprintf("png_mptr: warning: %s",msg)); - //me->ready=false; -} - -int -png_mptr::read_chunk_callback(png_struct */*png_data*/, png_unknown_chunkp /*chunk*/) -{ - /* The unknown chunk structure contains your - chunk data: */ - //png_byte name[5]; - //png_byte *data; - //png_size_t size; - /* Note that libpng has already taken care of - the CRC handling */ - - /* put your code here. Return one of the - following: */ - - //return (-n); /* chunk had an error */ - return (0); /* did not recognize */ - //return (n); /* success */ -} - -png_mptr::png_mptr(const char *file_name) -{ - filename=file_name; - - /* Open the file pointer */ - FILE *file = fopen(file_name, "rb"); - if (!file) - { - //! \todo THROW SOMETHING - throw strprintf("Unable to physically open %s",file_name); - return; - } - - - /* Make sure we are dealing with a PNG format file */ - png_byte header[PNG_CHECK_BYTES]; - fread(header, 1, PNG_CHECK_BYTES, file); - bool is_png = !png_sig_cmp(header, 0, PNG_CHECK_BYTES); - if (!is_png) - { - //! \todo THROW SOMETHING - throw strprintf("This (\"%s\") doesn't appear to be a PNG file",file_name); - return; - } - - - png_structp png_ptr = png_create_read_struct - (PNG_LIBPNG_VER_STRING, (png_voidp)this, - &png_mptr::png_out_error, &png_mptr::png_out_warning); - if (!png_ptr) - { - //! \todo THROW SOMETHING - throw String("error on importer construction, *WRITEME*3"); - return; - } - - png_infop info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) - { - png_destroy_read_struct(&png_ptr, - (png_infopp)NULL, (png_infopp)NULL); - //! \todo THROW SOMETHING - throw String("error on importer construction, *WRITEME*4"); - return; - } - - png_infop end_info = png_create_info_struct(png_ptr); - if (!end_info) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - //! \todo THROW SOMETHING - throw String("error on importer construction, *WRITEME*4"); - return; - } - - - - png_init_io(png_ptr, file); - png_set_sig_bytes(png_ptr,PNG_CHECK_BYTES); - - png_read_info(png_ptr, info_ptr); - - int bit_depth,color_type,interlace_type, compression_type,filter_method; - png_uint_32 width,height; - - png_get_IHDR(png_ptr, info_ptr, &width, &height, - &bit_depth, &color_type, &interlace_type, - &compression_type, &filter_method); - - if (bit_depth == 16) - png_set_strip_16(png_ptr); - - if (bit_depth < 8) - png_set_packing(png_ptr); - - double fgamma; - if (png_get_gAMA(png_ptr, info_ptr, &fgamma)) - { - synfig::info("PNG: Image gamma is %f",fgamma); - png_set_gamma(png_ptr, gamma().get_gamma(), fgamma); - } - - - /* - if (setjmp(png_jmpbuf(png_ptr))) - { - synfig::error("Unable to setup longjump"); - png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); - fclose(file); - //! \todo THROW SOMETHING - throw String("error on importer construction, *WRITEME*5"); - return; - } - */ - - png_set_read_user_chunk_fn(png_ptr, this, &png_mptr::read_chunk_callback); - - // man libpng tells me: - // You must use png_transforms and not call any - // png_set_transform() functions when you use png_read_png(). - // but we used png_set_gamma(), which may be why we were seeing a crash at the end - // png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_PACKING|PNG_TRANSFORM_STRIP_16, NULL); - - png_read_update_info(png_ptr, info_ptr); - png_uint_32 rowbytes = png_get_rowbytes(png_ptr, info_ptr); - - // allocate buffer to read image data into - png_bytep *row_pointers=new png_bytep[height]; - png_byte *data = new png_byte[rowbytes*height]; - for (png_uint_32 i = 0; i < height; i++) - row_pointers[i] = &(data[rowbytes*i]); - - png_read_image(png_ptr, row_pointers); - - png_uint_32 x, y; - surface_buffer.set_wh(width,height); - - switch(color_type) - { - case PNG_COLOR_TYPE_RGB: - for(y=0;ypalette[row_pointers[y][x]].red); - float g=gamma().g_U8_to_F32((unsigned char)png_ptr->palette[row_pointers[y][x]].green); - float b=gamma().b_U8_to_F32((unsigned char)png_ptr->palette[row_pointers[y][x]].blue); - float a=1.0; - if(info_ptr->valid & PNG_INFO_tRNS) - a = (float)(unsigned char)png_ptr->trans[row_pointers[y][x]]*(1.0/255.0); - surface_buffer[y][x]=Color( - r, - g, - b, - a - ); - } - break; - default: - synfig::error("png_mptr: error: Unsupported color type"); - //! \todo THROW SOMETHING - throw String("error on importer construction, *WRITEME*6"); - return; - } - - png_read_end(png_ptr, end_info); - png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); - fclose(file); - - delete [] row_pointers; - delete [] data; - - trim = false; - - if (getenv("SYNFIG_DISABLE_CROP_IMPORTED_IMAGES")) - return; - - switch(color_type) - { - case PNG_COLOR_TYPE_RGB_ALPHA: - case PNG_COLOR_TYPE_GRAY_ALPHA: - case PNG_COLOR_TYPE_PALETTE: - for(y=0;yBORDER) min_y = y-BORDER; else min_y = 0; - - for(y=height-1;y>0;y--) - { - for(x=0;xBORDER) min_x = x-BORDER; else min_x = 0; - - for(x=width-1;x>0;x--) - { - for(y=0;y -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class png_mptr : public synfig::Importer -{ - SYNFIG_IMPORTER_MODULE_EXT -private: - synfig::String filename; - synfig::Surface surface_buffer; - - png_structp png_ptr; - png_infop info_ptr; - png_infop end_info; - - bool trim; - unsigned int orig_width, orig_height, trimmed_x, trimmed_y; - - static void png_out_error(png_struct *png_data,const char *msg); - static void png_out_warning(png_struct *png_data,const char *msg); - static int read_chunk_callback(png_struct *png_data, png_unknown_chunkp chunk); - -public: - png_mptr(const char *filename); - ~png_mptr(); - - virtual bool get_frame(synfig::Surface &surface,synfig::Time time, synfig::ProgressCallback *callback); - virtual bool get_frame(synfig::Surface &surface,synfig::Time time, - bool &trimmed, unsigned int &width, unsigned int &height, unsigned int &top, unsigned int &left, - synfig::ProgressCallback *callback); -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_png/trgt_png.cpp b/synfig-core/trunk/src/modules/mod_png/trgt_png.cpp deleted file mode 100644 index bc38548..0000000 --- a/synfig-core/trunk/src/modules/mod_png/trgt_png.cpp +++ /dev/null @@ -1,244 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_png.cpp -** \brief png_trgt Target Module -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_TARGET - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "trgt_png.h" -#include -#include -#include -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_TARGET_INIT(png_trgt); -SYNFIG_TARGET_SET_NAME(png_trgt,"png"); -SYNFIG_TARGET_SET_EXT(png_trgt,"png"); -SYNFIG_TARGET_SET_VERSION(png_trgt,"0.1"); -SYNFIG_TARGET_SET_CVS_ID(png_trgt,"$Id$"); - -/* === M E T H O D S ======================================================= */ - -void -png_trgt::png_out_error(png_struct *png_data,const char *msg) -{ - png_trgt *me=(png_trgt*)png_data->error_ptr; - synfig::error(strprintf("png_trgt: error: %s",msg)); - me->ready=false; -} - -void -png_trgt::png_out_warning(png_struct *png_data,const char *msg) -{ - png_trgt *me=(png_trgt*)png_data->error_ptr; - synfig::warning(strprintf("png_trgt: warning: %s",msg)); - me->ready=false; -} - - -//Target *png_trgt::New(const char *filename){ return new png_trgt(filename);} - -png_trgt::png_trgt(const char *Filename) -{ - file=NULL; - filename=Filename; - buffer=NULL; - ready=false; - color_buffer=0; -} - -png_trgt::~png_trgt() -{ - if(file) - fclose(file); - file=NULL; - delete [] buffer; - delete [] color_buffer; -} - -bool -png_trgt::set_rend_desc(RendDesc *given_desc) -{ - //given_desc->set_pixel_format(PixelFormat((int)PF_RGB|(int)PF_A)); - desc=*given_desc; - imagecount=desc.get_frame_start(); - if(desc.get_frame_end()-desc.get_frame_start()>0) - multi_image=true; - else - multi_image=false; - return true; -} - -void -png_trgt::end_frame() -{ - if(ready && file) - { - png_write_end(png_ptr,info_ptr); - png_destroy_write_struct(&png_ptr, &info_ptr); - } - - if(file && file!=stdout) - fclose(file); - file=NULL; - imagecount++; - ready=false; -} - -bool -png_trgt::start_frame(synfig::ProgressCallback *callback) -{ - int w=desc.get_w(),h=desc.get_h(); - - if(file && file!=stdout) - fclose(file); - if(filename=="-") - { - if(callback)callback->task(strprintf("(stdout) %d",imagecount).c_str()); - file=stdout; - } - else if(multi_image) - { - String newfilename(filename_sans_extension(filename) + - etl::strprintf(".%04d",imagecount) + - filename_extension(filename)); - file=fopen(newfilename.c_str(),POPEN_BINARY_WRITE_TYPE); - if(callback)callback->task(newfilename); - } - else - { - file=fopen(filename.c_str(),POPEN_BINARY_WRITE_TYPE); - if(callback)callback->task(filename); - } - - if(!file) - return false; - - delete [] buffer; - buffer=new unsigned char[4*w]; - - delete [] color_buffer; - color_buffer=new Color[w]; - - png_ptr=png_create_write_struct(PNG_LIBPNG_VER_STRING, (png_voidp)this,png_out_error, png_out_warning); - if (!png_ptr) - { - synfig::error("Unable to setup PNG struct"); - fclose(file); - return false; - } - - info_ptr= png_create_info_struct(png_ptr); - if (!info_ptr) - { - synfig::error("Unable to setup PNG info struct"); - fclose(file); - png_destroy_write_struct(&png_ptr,(png_infopp)NULL); - return false; - } - - if (setjmp(png_jmpbuf(png_ptr))) - { - synfig::error("Unable to setup longjump"); - png_destroy_write_struct(&png_ptr, &info_ptr); - fclose(file); - return false; - } - png_init_io(png_ptr,file); - png_set_filter(png_ptr,0,PNG_FILTER_NONE); - - setjmp(png_jmpbuf(png_ptr)); - png_set_IHDR(png_ptr,info_ptr,w,h,8,PNG_COLOR_TYPE_RGBA,PNG_INTERLACE_NONE,PNG_COMPRESSION_TYPE_DEFAULT,PNG_FILTER_TYPE_DEFAULT); - - // Write the gamma - //png_set_gAMA(png_ptr, info_ptr,1.0/gamma().get_gamma()); - png_set_gAMA(png_ptr, info_ptr,gamma().get_gamma()); - - // Write the physical size - png_set_pHYs(png_ptr,info_ptr,round_to_int(desc.get_x_res()),round_to_int(desc.get_y_res()),PNG_RESOLUTION_METER); - - char title [] = "Title"; - char description[] = "Description"; - char software [] = "Software"; - char synfig [] = "SYNFIG"; -// char copyright [] = "Copyright"; -// char voria [] = "(c) 2004 Voria Studios, LLC"; - - // Output any text info along with the file - png_text comments[]= - { - { PNG_TEXT_COMPRESSION_NONE, title, const_cast(get_canvas()->get_name().c_str()), - strlen(get_canvas()->get_name().c_str()) }, - { PNG_TEXT_COMPRESSION_NONE, description, const_cast(get_canvas()->get_description().c_str()), - strlen(get_canvas()->get_description().c_str()) }, -// { PNG_TEXT_COMPRESSION_NONE, copyright, voria, strlen(voria) }, - { PNG_TEXT_COMPRESSION_NONE, software, synfig, strlen(synfig) }, - }; - png_set_text(png_ptr,info_ptr,comments,sizeof(comments)/sizeof(png_text)); - - png_write_info_before_PLTE(png_ptr, info_ptr); - png_write_info(png_ptr, info_ptr); - ready=true; - return true; -} - -Color * -png_trgt::start_scanline(int /*scanline*/) -{ - return color_buffer; -} - -bool -png_trgt::end_scanline() -{ - if(!file || !ready) - return false; - - convert_color_format(buffer, color_buffer, desc.get_w(), PF_RGB|PF_A, gamma()); - - setjmp(png_jmpbuf(png_ptr)); - png_write_row(png_ptr,buffer); - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_png/trgt_png.h b/synfig-core/trunk/src/modules/mod_png/trgt_png.h deleted file mode 100644 index 19dd82b..0000000 --- a/synfig-core/trunk/src/modules/mod_png/trgt_png.h +++ /dev/null @@ -1,73 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_png.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TRGT_PNG_H -#define __SYNFIG_TRGT_PNG_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class png_trgt : public synfig::Target_Scanline -{ - SYNFIG_TARGET_MODULE_EXT -private: - FILE *file; - int w,h; - png_structp png_ptr; - png_infop info_ptr; - - static void png_out_error(png_struct *png,const char *msg); - static void png_out_warning(png_struct *png,const char *msg); - bool multi_image,ready; - int imagecount; - synfig::String filename; - unsigned char *buffer; - synfig::Color *color_buffer; -public: - png_trgt(const char *filename); - virtual ~png_trgt(); - - virtual bool set_rend_desc(synfig::RendDesc *desc); - virtual bool start_frame(synfig::ProgressCallback *cb); - virtual void end_frame(); - - virtual synfig::Color * start_scanline(int scanline); - virtual bool end_scanline(); -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_png/unmod_png.nsh b/synfig-core/trunk/src/modules/mod_png/unmod_png.nsh deleted file mode 100644 index 4266a9a..0000000 --- a/synfig-core/trunk/src/modules/mod_png/unmod_png.nsh +++ /dev/null @@ -1,8 +0,0 @@ -Section "un.mod_png" - Delete "$INSTDIR\lib\synfig\modules\mod_png.dll" - RMDir "$INSTDIR\lib\synfig\modules" - RMDir "$INSTDIR\lib\synfig" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_ppm/Makefile.am b/synfig-core/trunk/src/modules/mod_ppm/Makefile.am deleted file mode 100644 index ce8de9f..0000000 --- a/synfig-core/trunk/src/modules/mod_ppm/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -moduledir = @MODULE_DIR@ - -module_LTLIBRARIES = libmod_ppm.la - -libmod_ppm_la_SOURCES = \ - main.cpp \ - trgt_ppm.cpp \ - trgt_ppm.h \ - mptr_ppm.cpp \ - mptr_ppm.h - -libmod_ppm_la_LDFLAGS = \ - -module \ - -no-undefined \ - -avoid-version - -libmod_ppm_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ - -libmod_ppm_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @SYNFIG_LIBS@ - - -EXTRA_DIST= mod_ppm.nsh unmod_ppm.nsh trgt_mpg.cpp trgt_mpg.h diff --git a/synfig-core/trunk/src/modules/mod_ppm/main.cpp b/synfig-core/trunk/src/modules/mod_ppm/main.cpp deleted file mode 100644 index e768223..0000000 --- a/synfig-core/trunk/src/modules/mod_ppm/main.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_ppm/main.cpp -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "trgt_ppm.h" -#include "mptr_ppm.h" -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(mod_ppm) - MODULE_NAME("PPM Target") - MODULE_DESCRIPTION("Provides a PPM target") - MODULE_AUTHOR("Robert B. Quattlebaum") - MODULE_VERSION("1.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(mod_ppm) - BEGIN_TARGETS - TARGET(ppm) - END_TARGETS - BEGIN_IMPORTERS - IMPORTER(ppm_mptr) - END_IMPORTERS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mod_ppm/mod_ppm.nsh b/synfig-core/trunk/src/modules/mod_ppm/mod_ppm.nsh deleted file mode 100644 index ddf2c89..0000000 --- a/synfig-core/trunk/src/modules/mod_ppm/mod_ppm.nsh +++ /dev/null @@ -1,21 +0,0 @@ -; The stuff to install -Section "mod_ppm" Sec_mod_ppm - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=mod_ppm.dll "src\modules\mod_ppm\.libs\libmod_ppm.dll" - - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "mod_ppm" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_ppm/mptr_ppm.cpp b/synfig-core/trunk/src/modules/mod_ppm/mptr_ppm.cpp deleted file mode 100644 index 6900c93..0000000 --- a/synfig-core/trunk/src/modules/mod_ppm/mptr_ppm.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mptr_ppm.cpp -** \brief ppm Target Module -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "mptr_ppm.h" -#include -#include -#include -#include -#include - -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_IMPORTER_INIT(ppm_mptr); -SYNFIG_IMPORTER_SET_NAME(ppm_mptr,"ppm"); -SYNFIG_IMPORTER_SET_EXT(ppm_mptr,"ppm"); -SYNFIG_IMPORTER_SET_VERSION(ppm_mptr,"0.1"); -SYNFIG_IMPORTER_SET_CVS_ID(ppm_mptr,"$Id$"); - -/* === M E T H O D S ======================================================= */ - -ppm_mptr::ppm_mptr(const char *file) -{ - filename=file; -} - -ppm_mptr::~ppm_mptr() -{ -} - -bool -ppm_mptr::get_frame(synfig::Surface &surface,Time, synfig::ProgressCallback *cb) -{ - SmartFILE file(fopen(filename.c_str(),"rb")); - if(!file) - { - if(cb)cb->error("pp_mptr::GetFrame(): "+strprintf(_("Unable to open %s"),filename.c_str())); - return false; - } - int w,h; - float divisor; - - if(fgetc(file.get())!='P' || fgetc(file.get())!='6') - { - if(cb)cb->error("pp_mptr::GetFrame(): "+strprintf(_("%s was not in PPM format"),filename.c_str())); - return false; - } - - fgetc(file.get()); - fscanf(file.get(),"%d %d\n",&w,&h); - fscanf(file.get(),"%f",&divisor); - fgetc(file.get()); - - int x; - int y; - surface.set_wh(w,h); - for(y=0;y -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class ppm_mptr : public synfig::Importer -{ - SYNFIG_IMPORTER_MODULE_EXT -private: - synfig::String filename; -public: - ppm_mptr(const char *filename); - ~ppm_mptr(); - - virtual bool get_frame(synfig::Surface &surface,synfig::Time time, synfig::ProgressCallback *callback); -}; // END of class ppm_mptr - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_ppm/trgt_mpg.cpp b/synfig-core/trunk/src/modules/mod_ppm/trgt_mpg.cpp deleted file mode 100644 index e379eb0..0000000 --- a/synfig-core/trunk/src/modules/mod_ppm/trgt_mpg.cpp +++ /dev/null @@ -1,215 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_mpg.cpp -** \brief bsd_mpeg1 Target Module -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_TARGET - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "trgt_mpg.h" -#include -#include -#include -#include -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -const char bsd_mpeg1::Name[]="mpeg1"; -const char bsd_mpeg1::Ext[]="mpg"; - -#define tmp_dir string("/tmp/") - -/* === M E T H O D S ======================================================= */ - -#error This code has tmpfile vulnerabilites - -Target * -bsd_mpeg1::New(const char *filename) -{ - return new bsd_mpeg1(filename); -} - -bsd_mpeg1::bsd_mpeg1(const char *Filename) -{ - filename=Filename; - passthru=ppm::New((tmp_dir+"temp.ppm").c_str()); - paramfile=NULL; - -} - -bsd_mpeg1::~bsd_mpeg1() -{ - if(paramfile) - fclose(paramfile); - delete passthru; - cerr<<"Encoding "<get_frame_rate(); - - // Valid framerates: - // 23.976, 24, 25, 29.97, 30, 50 ,59.94, 60 - - if(fps <24.0) - { - fprintf(paramfile,"FRAME_RATE 23.976\n"); - given_desc->set_frame_rate(23.976); - } - if(fps>=24.0 && fps <25.0) - { - fprintf(paramfile,"FRAME_RATE 24\n"); - given_desc->set_frame_rate(24); - } - if(fps>=25.0 && fps <29.97) - { - fprintf(paramfile,"FRAME_RATE 25\n"); - given_desc->set_frame_rate(25); - } - if(fps>=29.97 && fps <30.0) - { - fprintf(paramfile,"FRAME_RATE 29.97\n"); - given_desc->set_frame_rate(29.97); - } - if(fps>=29.97 && fps <30.0) - { - fprintf(paramfile,"FRAME_RATE 29.97\n"); - given_desc->set_frame_rate(29.97); - } - if(fps>=30.0 && fps <50.0) - { - fprintf(paramfile,"FRAME_RATE 30\n"); - given_desc->set_frame_rate(30.0); - } - if(fps>=50.0 && fps <59.94) - { - fprintf(paramfile,"FRAME_RATE 50\n"); - given_desc->set_frame_rate(50); - } - if(fps>=59.94) - { - fprintf(paramfile,"FRAME_RATE 59.94\n"); - given_desc->set_frame_rate(59.94); - } - - // Make sure that the width and height - // are multiples of 8 - given_desc->set_w((given_desc->get_w()+4)/8*8); - given_desc->set_h((given_desc->get_h()+4)/8*8); - - if(!passthru->set_rend_desc(given_desc)) - return false; - - desc=*given_desc; - - fprintf(paramfile, - "INPUT\n" - "tmp/temp*.ppm [%04d-%04d]\n" - "END_INPUT\n",desc.get_frame_start(),desc.get_frame_end()-1); - - fclose(paramfile); - paramfile=NULL; - - return true; -} - -void -bsd_mpeg1::end_frame() -{ - passthru->end_frame(); -} - -bool -bsd_mpeg1::start_frame(synfig::ProgressCallback *callback) -{ - return passthru->start_frame(callback); -} - -unsigned char * -bsd_mpeg1::start_scanline(int scanline) -{ - return passthru->start_scanline(scanline); -} - -bool -bsd_mpeg1::end_scanline(void) -{ - return passthru->end_scanline(); -} diff --git a/synfig-core/trunk/src/modules/mod_ppm/trgt_mpg.h b/synfig-core/trunk/src/modules/mod_ppm/trgt_mpg.h deleted file mode 100644 index 5ce96dc..0000000 --- a/synfig-core/trunk/src/modules/mod_ppm/trgt_mpg.h +++ /dev/null @@ -1,73 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_mpg.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TRGT_MPG_H -#define __SYNFIG_TRGT_MPG_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include "trgt_ppm.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - - -class bsd_mpeg1 : public synfig::Target -{ -public: -private: -// synfig::RendDesc desc; - synfig::Target *passthru; - String filename; - FILE *paramfile; -public: - bsd_mpeg1(const char *filename); - - virtual bool set_rend_desc(synfig::RendDesc *desc); - virtual bool start_frame(synfig::ProgressCallback *cb); - virtual void end_frame(); - - virtual ~bsd_mpeg1(); - - - virtual unsigned char * start_scanline(int scanline); - virtual bool end_scanline(void); - - static synfig::Target *New(const char *filename); - - static const char Name[]; - static const char Ext[]; - -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_ppm/trgt_ppm.cpp b/synfig-core/trunk/src/modules/mod_ppm/trgt_ppm.cpp deleted file mode 100644 index 8fc4810..0000000 --- a/synfig-core/trunk/src/modules/mod_ppm/trgt_ppm.cpp +++ /dev/null @@ -1,152 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_ppm.cpp -** \brief ppm Target Module -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_TARGET - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "trgt_ppm.h" -#include -#include -#include -#include -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_TARGET_INIT(ppm); -SYNFIG_TARGET_SET_NAME(ppm,"ppm"); -SYNFIG_TARGET_SET_EXT(ppm,"ppm"); -SYNFIG_TARGET_SET_VERSION(ppm,"0.1"); -SYNFIG_TARGET_SET_CVS_ID(ppm,"$Id$"); - -/* === M E T H O D S ======================================================= */ - -ppm::ppm(const char *Filename) -{ - filename=Filename; - multi_image=false; - buffer=NULL; - color_buffer=0; - set_remove_alpha(); -} - -ppm::~ppm() -{ - delete [] buffer; - delete [] color_buffer; -} - -bool -ppm::set_rend_desc(RendDesc *given_desc) -{ - //given_desc->set_pixel_format(PF_RGB); - desc=*given_desc; - imagecount=desc.get_frame_start(); - if(desc.get_frame_end()-desc.get_frame_start()>0) - multi_image=true; - else - multi_image=false; - return true; -} - -void -ppm::end_frame() -{ - imagecount++; -} - -bool -ppm::start_frame(synfig::ProgressCallback *callback) -{ - int w=desc.get_w(),h=desc.get_h(); - - if(filename=="-") - { - if(callback)callback->task(strprintf("(stdout) %d",imagecount).c_str()); - file=SmartFILE(stdout); - } - else if(multi_image) - { - String newfilename(filename_sans_extension(filename) + - etl::strprintf(".%04d",imagecount) + - filename_extension(filename)); - file=SmartFILE(fopen(newfilename.c_str(),POPEN_BINARY_WRITE_TYPE)); - if(callback)callback->task(newfilename); - } - else - { - file=SmartFILE(fopen(filename.c_str(),POPEN_BINARY_WRITE_TYPE)); - if(callback)callback->task(filename); - } - - if(!file) - return false; - - fprintf(file.get(), "P6\n"); - fprintf(file.get(), "%d %d\n", w, h); - fprintf(file.get(), "%d\n", 255); - - delete [] buffer; - buffer=new unsigned char[3*w]; - - delete [] color_buffer; - color_buffer=new Color[desc.get_w()]; - - return true; -} - -Color * -ppm::start_scanline(int /*scanline*/) -{ - return color_buffer; -} - -bool -ppm::end_scanline() -{ - if(!file) - return false; - - convert_color_format(buffer, color_buffer, desc.get_w(), PF_RGB, gamma()); - - if(!fwrite(buffer,1,desc.get_w()*3,file.get())) - return false; - - return true; -} diff --git a/synfig-core/trunk/src/modules/mod_ppm/trgt_ppm.h b/synfig-core/trunk/src/modules/mod_ppm/trgt_ppm.h deleted file mode 100644 index f1a5134..0000000 --- a/synfig-core/trunk/src/modules/mod_ppm/trgt_ppm.h +++ /dev/null @@ -1,68 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_ppm.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TRGT_PPM_H -#define __SYNFIG_TRGT_PPM_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class ppm : public synfig::Target_Scanline -{ - SYNFIG_TARGET_MODULE_EXT - -private: - int imagecount; - bool multi_image; - synfig::SmartFILE file; - synfig::String filename; - synfig::Color *color_buffer; - unsigned char *buffer; -public: - ppm(const char *filename); - virtual ~ppm(); - - virtual bool set_rend_desc(synfig::RendDesc *desc); - virtual bool start_frame(synfig::ProgressCallback *cb); - virtual void end_frame(); - - virtual synfig::Color * start_scanline(int scanline); - virtual bool end_scanline(); -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_ppm/unmod_ppm.nsh b/synfig-core/trunk/src/modules/mod_ppm/unmod_ppm.nsh deleted file mode 100644 index 0cf7a12..0000000 --- a/synfig-core/trunk/src/modules/mod_ppm/unmod_ppm.nsh +++ /dev/null @@ -1,8 +0,0 @@ -Section "un.mod_ppm" - Delete "$INSTDIR\lib\synfig\modules\mod_ppm.dll" - RMDir "$INSTDIR\lib\synfig\modules" - RMDir "$INSTDIR\lib\synfig" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_svg/Makefile.am b/synfig-core/trunk/src/modules/mod_svg/Makefile.am deleted file mode 100644 index 25eb5a6..0000000 --- a/synfig-core/trunk/src/modules/mod_svg/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES=Makefile.in -INCLUDES = -I$(top_builddir) -I$(top_srcdir)/src - -moduledir=@MODULE_DIR@ - -module_LTLIBRARIES = libmod_svg.la -libmod_svg_la_SOURCES = main.cpp layer_svg.h layer_svg.cpp svg_parser.h svg_parser.cpp -libmod_svg_la_LDFLAGS = -module -no-undefined -avoid-version -libmod_svg_la_CXXFLAGS = @SYNFIG_CFLAGS@ -libmod_svg_la_LIBADD = ../../synfig/libsynfig.la @SYNFIG_LIBS@ -EXTRA_DIST= mod_svg.nsh unmod_svg.nsh - diff --git a/synfig-core/trunk/src/modules/mod_svg/layer_svg.cpp b/synfig-core/trunk/src/modules/mod_svg/layer_svg.cpp deleted file mode 100644 index 2906079..0000000 --- a/synfig-core/trunk/src/modules/mod_svg/layer_svg.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer_svg.cpp -** \brief Implementation of the Svg layer -** -** $Id:$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** Copyright (c) 2009 Carlos A. Sosa Navarro -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include - -#include "layer_svg.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace etl; -using namespace std; -using namespace synfig; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(svg_layer); -SYNFIG_LAYER_SET_NAME(svg_layer,"svg_layer"); -SYNFIG_LAYER_SET_LOCAL_NAME(svg_layer,N_("Import Svg")); -SYNFIG_LAYER_SET_CATEGORY(svg_layer,N_("NotVisible"));//this is auxiliar -SYNFIG_LAYER_SET_VERSION(svg_layer,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(svg_layer,"$Id: layer_svg.cpp 2240 2008-11-22 15:35:33Z dooglus $"); - -/* === P R O C E D U R E S ================================================= */ - -svg_layer::svg_layer(): - Layer_PasteCanvas(), - filename("none") -{ -} - -bool -svg_layer::set_param(const String & param, const ValueBase &value) -{ - if(param=="filename"){ - Canvas::Handle canvas; - //if ext of filename == "svg" then - canvas=open_svg(value.get(String()),errors,warnings); - //else other parsers maybe - if(canvas){ - canvas->set_inline(get_canvas()); - set_sub_canvas(canvas); - IMPORT(filename); - } - } - return Layer_PasteCanvas::set_param(param,value); -} - -ValueBase -svg_layer::get_param(const String ¶m)const -{ - EXPORT(filename); - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_PasteCanvas::get_param(param); -} - -Layer::Vocab -svg_layer::get_param_vocab()const -{ - Layer::Vocab ret(Layer_PasteCanvas::get_param_vocab()); - - ret.push_back(ParamDesc("filename") - .set_local_name(_("Filename")) - ); - return ret; -} - diff --git a/synfig-core/trunk/src/modules/mod_svg/layer_svg.h b/synfig-core/trunk/src/modules/mod_svg/layer_svg.h deleted file mode 100644 index b7aa25b..0000000 --- a/synfig-core/trunk/src/modules/mod_svg/layer_svg.h +++ /dev/null @@ -1,67 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer_svg.h -** \brief Header file for implementation of the Svg Canvas layer -** -** $Id:$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2009 Carlos A. Sosa Navarro -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_SVG_LAYER_H -#define __SYNFIG_SVG_LAYER_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include - -#include "svg_parser.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class svg_layer : public synfig::Layer_PasteCanvas -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - synfig::String filename; - synfig::String errors,warnings; - -public: - - svg_layer(); - - virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value); - - virtual synfig::ValueBase get_param(const synfig::String & param)const; - - virtual Vocab get_param_vocab()const; -}; // END of class svg_layer - -/* === E N D =============================================================== */ - -#endif - diff --git a/synfig-core/trunk/src/modules/mod_svg/main.cpp b/synfig-core/trunk/src/modules/mod_svg/main.cpp deleted file mode 100644 index 1f5be67..0000000 --- a/synfig-core/trunk/src/modules/mod_svg/main.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_svg/main.cpp -** \brief writeme -** -** $Id:$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2009 Carlos A. Sosa Navarro -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_NO_ANGLE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include "layer_svg.h" - -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(mod_svg) - MODULE_NAME("SVG Importer") - MODULE_DESCRIPTION("Provides a svg importer") - MODULE_AUTHOR("Carlos Sosa Navarro") - MODULE_VERSION("0.1") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(mod_svg) - BEGIN_LAYERS - LAYER(svg_layer) - END_LAYERS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mod_svg/mod_svg.nsh b/synfig-core/trunk/src/modules/mod_svg/mod_svg.nsh deleted file mode 100644 index 03b31d5..0000000 --- a/synfig-core/trunk/src/modules/mod_svg/mod_svg.nsh +++ /dev/null @@ -1,20 +0,0 @@ -; The stuff to install -Section "mod_svg" Sec_mod_svg - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=mod_svg.dll "src\modules\mod_svg\.libs\libmod_svg.dll" - - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "mod_svg" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd diff --git a/synfig-core/trunk/src/modules/mod_svg/svg_parser.cpp b/synfig-core/trunk/src/modules/mod_svg/svg_parser.cpp deleted file mode 100644 index 2897d64..0000000 --- a/synfig-core/trunk/src/modules/mod_svg/svg_parser.cpp +++ /dev/null @@ -1,1934 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file svg_parser.cpp -** \brief Implementation of the Svg parser -** \brief Based on SVG XML specification 1.1 -** \brief See: http://www.w3.org/TR/xml11/ for deatils -** -** $Id:$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** Copyright (c) 2009 Carlos A. Sosa Navarro -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include "svg_parser.h" - -/* === U S I N G =========================================================== */ - -using namespace synfig; - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -Canvas::Handle -synfig::open_svg(std::string _filepath,String &errors, String &warnings){ - Canvas::Handle canvas; - Svg_parser parser; - try - { - canvas=parser.load_svg_canvas(_filepath,errors,warnings); - //canvas->set_id(parser.get_id()); - }catch(...){ - std::cout<<"error"<get_root_node(); - parser_node(pNode); - } - #ifdef LIBXMLCPP_EXCEPTIONS_ENABLED - }catch(const std::exception& ex){ - std::cout << "Exception caught: " << ex.what() << std::endl; - } - #endif //LIBXMLCPP_EXCEPTIONS_ENABLED - Canvas::Handle canvas; - if(nodeRoot){ - //canvas=synfig::open_canvas(nodeRoot,_filepath,errors,warnings); - canvas=synfig::open_canvas(nodeRoot,errors,warnings); - } - return canvas; -} - -Svg_parser::Svg_parser(){ - uid=0; - kux=60; - set_canvas=0;//we must run parser_canvas method - // 0.5 in gamma parameter of color correct layer is 1/0.5 = 2 (thinking) it must be 2.2!!!! - gamma.set_gamma(2.2); -} -/* -String -Svg_parser::get_id(){ - if(!id_name.empty()) return id_name; - return "id_arbitrario"; -} -void -Svg_parser::set_id(String source){ - const char bad_chars[]=" :#@$^&()*"; - int inicio= source.find_last_of('/')+1; - int fin= source.find_last_of('.'); - String x=source.substr(inicio,fin-inicio); - if(!x.empty()){ - for(unsigned int i=0;i(node); - const xmlpp::TextNode* nodeText = dynamic_cast(node); - const xmlpp::CommentNode* nodeComment = dynamic_cast(node); - - if(nodeText && nodeText->is_white_space()) //Let's ignore the indenting - you don't always want to do this. - return; - - Glib::ustring nodename = node->get_name(); - if(!nodeText && !nodeComment && !nodename.empty()){ - if(nodename.compare("svg")==0){ - parser_svg (node); - }else if(nodename.compare("namedview")==0){ - parser_canvas(node); - }else if(nodename.compare("defs")==0){ - parser_defs (node); - }else if(nodename.compare("g")==0){ - if(set_canvas==0) parser_canvas (node); - parser_layer (node,nodeRoot->add_child("layer"),"",NULL); - return; - }else if(nodename.compare("rect")==0){ - if(set_canvas==0) parser_canvas (node); - parser_rect(node,nodeRoot,"",NULL); - }else if(nodename.compare("polygon")==0){ - if(set_canvas==0) parser_canvas (node); - parser_polygon(node,nodeRoot,"",NULL); - }else if(nodename.compare("path")==0){ - if(set_canvas==0) parser_canvas (node); - parser_path (node,nodeRoot,"",NULL); - } - } - if(!nodeContent){ - xmlpp::Node::NodeList list = node->get_children(); - for(xmlpp::Node::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter){ - parser_node(*iter); //recursive - } - } -} - -//parser elements -void -Svg_parser::parser_svg (const xmlpp::Node* node){ - //printf("un dia en algun lugar de la tierra media\n"); - if(const xmlpp::Element* nodeElement = dynamic_cast(node)){ - width =etl::strprintf("%f",getDimension(nodeElement->get_attribute_value("width"))); - height =etl::strprintf("%f",getDimension(nodeElement->get_attribute_value("height"))); - docname=nodeElement->get_attribute_value("docname",""); - } -} -void -Svg_parser::parser_canvas (const xmlpp::Node* node){ - //printf("el campo de batalla parecia un lienzo de pintura\n"); - if(const xmlpp::Element* nodeElement = dynamic_cast(node)){ - if(width.compare("")==0){ - width=nodeElement->get_attribute_value("width",""); - } - if(height.compare("")==0){ - height=nodeElement->get_attribute_value("height",""); - } - if(width.compare("")==0 && height.compare("")!=0){ - width=height; - } - if(width.compare("")!=0 && height.compare("")==0){ - height=width; - } - if(height.compare("")==0 && width.compare("")==0){ - width="1024"; - height="768"; - } - //build - nodeRoot=document.create_root_node("canvas", "", ""); - nodeRoot->set_attribute("version","0.5"); - nodeRoot->set_attribute("width",width); - nodeRoot->set_attribute("height",height); - nodeRoot->set_attribute("xres","2834.645752"); - nodeRoot->set_attribute("yres","2834.645752"); - float view_x; - float view_y; - view_x=atof(width.c_str())/kux; - view_y=atof(height.c_str())/kux; - view_x=view_x/2.0; - view_y=view_y/2.0; - char attr_view_box[60]; - sprintf(attr_view_box,"%f %f %f %f",-1.0*view_x,view_y,view_x,-1.0*view_y); - nodeRoot->set_attribute("view-box",attr_view_box); - ox=atof(width.c_str() )/2; - oy=atof(height.c_str())/2; - nodeRoot->set_attribute("antialias","1"); - nodeRoot->set_attribute("fps","24.000"); - nodeRoot->set_attribute("begin-time","0f"); - nodeRoot->set_attribute("end-time","5s"); - nodeRoot->set_attribute("bgcolor","0.500000 0.500000 0.500000 1.000000"); - //nodeRoot->add_child("name")->set_child_text("Synfig Animation 1"); - if(!id_name.empty()) nodeRoot->add_child("name")->set_child_text(id_name); - else nodeRoot->add_child("name")->set_child_text("Synfig Animation 1"); - } - set_canvas=1; - AdjustPointUrl (); -} - -void -Svg_parser::parser_rect(const xmlpp::Node* node,xmlpp::Element* root,String parent_style,Matrix* mtx_parent){ - if(const xmlpp::Element* nodeElement = dynamic_cast(node)){ - Glib::ustring rect_id =nodeElement->get_attribute_value("id"); - Glib::ustring rect_style =nodeElement->get_attribute_value("style"); - Glib::ustring rect_x =nodeElement->get_attribute_value("x"); - Glib::ustring rect_y =nodeElement->get_attribute_value("y"); - Glib::ustring rect_width =nodeElement->get_attribute_value("width"); - Glib::ustring rect_height =nodeElement->get_attribute_value("height"); - //style - String fill =loadAttribute("fill",rect_style,parent_style,"none"); - String fill_opacity =loadAttribute("fill-opacity",rect_style,parent_style,"1"); - String opacity =loadAttribute("opacity",rect_style,parent_style,"1"); - //matrix - //it's some complicated - - //build - - int typeFill=0; - if(fill.compare(0,3,"url")==0){ - typeFill=2; - root=nodeStartBasicLayer(root->add_child("layer")); - } - xmlpp::Element *child_rect=root->add_child("layer"); - child_rect->set_attribute("type","rectangle"); - child_rect->set_attribute("active","true"); - child_rect->set_attribute("version","0.2"); - child_rect->set_attribute("desc",rect_id); - - build_real(child_rect->add_child("param"),"z_depth",0.0); - build_real(child_rect->add_child("param"),"amount",1.0); - build_integer(child_rect->add_child("param"),"blend_method",0); - build_color (child_rect->add_child("param"),getRed (fill),getGreen (fill),getBlue(fill),atof(opacity.data())*atof(fill_opacity.data())); - - float auxx=atof(rect_x.c_str()); - float auxy=atof(rect_y.c_str()); - coor2vect(&auxx,&auxy); - build_vector (child_rect->add_child("param"),"point1",auxx,auxy); - auxx= atof(rect_x.c_str()) + atof(rect_width.c_str()); - auxy= atof(rect_y.c_str()) + atof(rect_height.c_str()); - coor2vect(&auxx,&auxy); - build_vector (child_rect->add_child("param"),"point2",auxx,auxy); - if(typeFill==2){ - build_url (root->add_child("layer"),fill,mtx_parent); - } - } -} -void -Svg_parser::parser_layer(const xmlpp::Node* node,xmlpp::Element* root,String parent_style,Matrix* mtx_parent){ - if(const xmlpp::Element* nodeElement = dynamic_cast(node)){ - Glib::ustring label =nodeElement->get_attribute_value("label"); - Glib::ustring style =nodeElement->get_attribute_value("style"); - Glib::ustring fill =nodeElement->get_attribute_value("fill"); - Glib::ustring transform =nodeElement->get_attribute_value("transform"); - - String layer_style; - if(!style.empty()){ - layer_style=style; - }else if(!fill.empty()){ - layer_style.append("fill:"); - layer_style.append(fill); - }else if(!parent_style.empty()){ - layer_style=parent_style; - } - Matrix* mtx=NULL; - if(!transform.empty()) - mtx=build_transform (transform); - if(mtx_parent){ - if(mtx) - composeMatrix(&mtx,mtx_parent,mtx); - else - mtx=newMatrix (mtx_parent); - } - //build - root->set_attribute("type","PasteCanvas"); - root->set_attribute("active","true"); - root->set_attribute("version","0.1"); - if(!label.empty()) root->set_attribute("desc",label); - else root->set_attribute("desc","unknow layer"); - - build_real(root->add_child("param"),"z_depth",0.0); - build_real(root->add_child("param"),"amount",1.0); - build_integer(root->add_child("param"),"blend_method",0); - build_vector (root->add_child("param"),"origin",0,0); - - //printf(" atributos canvas "); - //canvas - xmlpp::Element *child_canvas=root->add_child("param"); - child_canvas->set_attribute("name","canvas"); - child_canvas=child_canvas->add_child("canvas"); - const xmlpp::ContentNode* nodeContent = dynamic_cast(node); - if(!nodeContent){ - xmlpp::Node::NodeList list = node->get_children(); - for(xmlpp::Node::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter){ - Glib::ustring name =(*iter)->get_name(); - if(name.compare("g")==0){ - parser_layer (*iter,child_canvas->add_child("layer"),layer_style,mtx); - }else if(name.compare("path")==0){ - parser_path (*iter,child_canvas,layer_style,mtx); - }else if(name.compare("polygon")==0){ - parser_polygon (*iter,child_canvas,layer_style,mtx); - }else if(name.compare("rect")==0){ - parser_rect (*iter,child_canvas,layer_style,mtx); - } - } - } - } -} -void -Svg_parser::parser_polygon(const xmlpp::Node* node,xmlpp::Element* root,String parent_style,Matrix* mtx_parent){ - //printf("sus escudos parecian rombos y sus naves unos triangulos\n"); - if(const xmlpp::Element* nodeElement = dynamic_cast(node)){ - //load sub-attributes - Glib::ustring polygon_style =nodeElement->get_attribute_value("style"); - Glib::ustring polygon_id =nodeElement->get_attribute_value("id"); - Glib::ustring polygon_points =nodeElement->get_attribute_value("points"); - Glib::ustring polygon_transform =nodeElement->get_attribute_value("transform"); - Glib::ustring polygon_fill =nodeElement->get_attribute_value("fill"); - String fill =loadAttribute("fill",polygon_style,parent_style,polygon_fill,"none"); - String fill_rule =loadAttribute("fill-rule",polygon_style,parent_style,"evenodd"); - String fill_opacity =loadAttribute("fill-opacity",polygon_style,parent_style,"1"); - String opacity =loadAttribute("opacity",polygon_style,parent_style,"1"); - - //transforms - Matrix* mtx=NULL; - if(!polygon_transform.empty()) - mtx=build_transform (polygon_transform); - if(mtx_parent){ - if(mtx) - composeMatrix(&mtx,mtx_parent,mtx); - else - mtx=newMatrix (mtx_parent); - } - //points - if(polygon_points.empty()) - return; - std::list k; - std::vector tokens=get_tokens_path (polygon_points); - unsigned int i; - float ax,ay; ax=ay=0; - for(i=0;iadd_child("layer")); - } - child_polygon=root->add_child("layer"); - child_polygon->set_attribute("type","polygon"); - child_polygon->set_attribute("active","true"); - child_polygon->set_attribute("version","0.1"); - child_polygon->set_attribute("desc",polygon_id); - build_param (child_polygon->add_child("param"),"z_depth","real","0.0000000000"); - build_param (child_polygon->add_child("param"),"amount","real","1.0000000000"); - build_param (child_polygon->add_child("param"),"blend_method","integer","0"); - build_color (child_polygon->add_child("param"),getRed(fill),getGreen(fill),getBlue(fill),atof(fill_opacity.data())*atof(opacity.data())); - build_vector(child_polygon->add_child("param"),"offset",0,0); - build_param (child_polygon->add_child("param"),"invert","bool","false"); - build_param (child_polygon->add_child("param"),"antialias","bool","true"); - build_param (child_polygon->add_child("param"),"feather","real","0.0000000000"); - build_param (child_polygon->add_child("param"),"blurtype","integer","1"); - if(fill_rule.compare("evenodd")==0) build_param (child_polygon->add_child("param"),"winding_style","integer","1"); - else build_param (child_polygon->add_child("param"),"winding_style","integer","0"); - build_points (child_polygon->add_child("param"),k); - - if(typeFill==2){ - build_url(root->add_child("layer"),fill,mtx); - } - } -} -void -Svg_parser::parser_path(const xmlpp::Node* node,xmlpp::Element* root,String parent_style,Matrix* mtx_parent){ - //printf("pensamos que atacarian de frente pero hicieron una curva\n"); - if(const xmlpp::Element* nodeElement = dynamic_cast(node)){ - //load sub-attributes - Glib::ustring path_style =nodeElement->get_attribute_value("style"); - Glib::ustring path_id =nodeElement->get_attribute_value("id"); - Glib::ustring path_d =nodeElement->get_attribute_value("d"); - Glib::ustring path_transform =nodeElement->get_attribute_value("transform"); - Glib::ustring path_fill =nodeElement->get_attribute_value("fill"); - - String fill =loadAttribute("fill",path_style,parent_style,path_fill,"none"); - String fill_rule =loadAttribute("fill-rule",path_style,parent_style,"evenodd"); - String stroke =loadAttribute("stroke",path_style,parent_style,"none"); - String stroke_width =loadAttribute("stroke-width",path_style,parent_style,"1px"); - String stroke_linecap =loadAttribute("stroke-linecap",path_style,parent_style,"butt"); - String stroke_linejoin =loadAttribute("stroke-linejoin",path_style,parent_style,"miter"); - String stroke_opacity =loadAttribute("stroke-opacity",path_style,parent_style,"1"); - String fill_opacity =loadAttribute("fill-opacity",path_style,parent_style,"1"); - String opacity =loadAttribute("opacity",path_style,parent_style,"1"); - - //resolve transformations - Matrix* mtx=NULL; - if(!path_transform.empty()) - mtx=build_transform (path_transform); - if(mtx_parent){ - if(mtx) - composeMatrix(&mtx,mtx_parent,mtx); - else - mtx=newMatrix(mtx_parent); - } - //parser path_d attribute, this is obviously important - std::list > k; - k=parser_path_d (path_d,mtx); - - //escribir - int typeFill=0; //nothing - int typeStroke=0;//nothing - //Fill - if(fill.compare("none")!=0){ - typeFill=1; //simple - } - if(typeFill==1 && fill.compare(0,3,"url")==0){ - typeFill=2; //gradient - } - //Stroke - if(stroke.compare("none")!=0){ - typeStroke=1; //simple - } - if(typeStroke==1 && stroke.compare(0,3,"url")==0){ - typeStroke=2; //gradient - } - String bline_id; - String offset_id; - int n=k.size(); - if(n!=1){ //if n is > than 1 then we must create a paste canvas for all paths - root=nodeStartBasicLayer(root->add_child("layer")); - } - std::list >::iterator aux = k.begin(); - for (; aux!=k.end(); aux++){ - if(typeFill!=0 && typeStroke!=0){ - bline_id=new_guid(); - offset_id=new_guid(); - } - if(typeFill==1 || typeFill==2){//region layer - xmlpp::Element *child_fill=root; - if(n==1 && typeFill==2){//open gradient or url (fill) - child_fill=nodeStartBasicLayer(root->add_child("layer")); - } - xmlpp::Element *child_region=child_fill->add_child("layer"); - child_region->set_attribute("type","region"); - child_region->set_attribute("active","true"); - child_region->set_attribute("version","0.1"); - child_region->set_attribute("desc",path_id); - build_param (child_region->add_child("param"),"z_depth","real","0.0000000000"); - build_param (child_region->add_child("param"),"amount","real","1.0000000000"); - build_param (child_region->add_child("param"),"blend_method","integer","0"); - build_color (child_region->add_child("param"),getRed(fill),getGreen(fill),getBlue(fill),atof(fill_opacity.data())*atof(opacity.data())); - if(offset_id.empty()) build_vector (child_region->add_child("param"),"offset",0,0); - else build_vector (child_region->add_child("param"),"offset",0,0,offset_id); - build_param (child_region->add_child("param"),"invert","bool","false"); - build_param (child_region->add_child("param"),"antialias","bool","true"); - build_param (child_region->add_child("param"),"feather","real","0.0000000000"); - build_param (child_region->add_child("param"),"blurtype","integer","1"); - if(fill_rule.compare("evenodd")==0) build_param (child_region->add_child("param"),"winding_style","integer","1"); - else build_param (child_region->add_child("param"),"winding_style","integer","0"); - - build_bline (child_region->add_child("param"),*aux,loop,bline_id); - - if(n==1 && typeFill==2){ //gradient in onto mode (fill) - build_url(child_fill->add_child("layer"),fill,mtx); - } - } - - if(typeStroke==1 || typeStroke==2){ //layer outline - xmlpp::Element *child_stroke=root; - if(n==1 && typeStroke==2){//open gradient in straigth onto (stroke) - child_stroke=nodeStartBasicLayer(root->add_child("layer")); - } - xmlpp::Element *child_outline=child_stroke->add_child("layer"); - child_outline->set_attribute("type","outline"); - child_outline->set_attribute("active","true"); - child_outline->set_attribute("version","0.2"); - child_outline->set_attribute("desc",path_id); - build_param (child_outline->add_child("param"),"z_depth","real","0.0000000000"); - build_param (child_outline->add_child("param"),"amount","real","1.0000000000"); - build_param (child_outline->add_child("param"),"blend_method","integer","0"); - build_color (child_outline->add_child("param"),getRed(stroke),getGreen(stroke),getBlue(stroke),atof(stroke_opacity.data())*atof(opacity.data())); - if(offset_id.empty()) build_vector (child_outline->add_child("param"),"offset",0,0); - else build_vector (child_outline->add_child("param"),"offset",0,0,offset_id); - build_param (child_outline->add_child("param"),"invert","bool","false"); - build_param (child_outline->add_child("param"),"antialias","bool","true"); - build_param (child_outline->add_child("param"),"feather","real","0.0000000000"); - build_param (child_outline->add_child("param"),"blurtype","integer","1"); - //outline in nonzero - build_param (child_outline->add_child("param"),"winding_style","integer","0"); - - build_bline (child_outline->add_child("param"),*aux,loop,bline_id); - - stroke_width=etl::strprintf("%f",getDimension(stroke_width)/kux); - build_param (child_outline->add_child("param"),"width","real",stroke_width); - build_param (child_outline->add_child("param"),"expand","real","0.0000000000"); - if(stroke_linejoin.compare("miter")==0) build_param (child_outline->add_child("param"),"sharp_cusps","bool","true"); - else build_param (child_outline->add_child("param"),"sharp_cusps","bool","false"); - if(stroke_linecap.compare("butt")==0){ - build_param (child_outline->add_child("param"),"round_tip[0]","bool","false"); - build_param (child_outline->add_child("param"),"round_tip[1]","bool","false"); - }else{ - build_param (child_outline->add_child("param"),"round_tip[0]","bool","true"); - build_param (child_outline->add_child("param"),"round_tip[1]","bool","true"); - } - build_param (child_outline->add_child("param"),"loopyness","real","1.0000000000"); - build_param (child_outline->add_child("param"),"homogeneous_width","bool","true"); - - if(n==1 && typeStroke==2){ //gradient in onto mode (stroke) - build_url(child_stroke->add_child("layer"),stroke,mtx); - } - } - } - if(n!=1){//only fill for several canvas in one path - if(typeFill==2){ - build_url(root->add_child("layer"),fill,mtx); - } - } - } -} - -std::vector -Svg_parser::get_tokens_path(String path){ //mini path lexico-parser - std::vector tokens; - String buffer; - int e=0; - unsigned int i=0; - char a; - while(i > -Svg_parser::parser_path_d(String path_d,Matrix* mtx){ - std::list > k; - std::list k1; - float ax,ay,tgx,tgy,tgx2,tgy2;//each method - float actual_x=0,actual_y=0;//for relative methods; - loop=false; - unsigned int i; - std::vector tokens=get_tokens_path(path_d); - for(i=0;ix,k1.back()->y,tgx2,tgy2); - if(isFirst(k1.front(),ax,ay)){ - setTg1(k1.front(),k1.front()->x,k1.front()->y,tgx,tgy); - }else{ - k1.push_back(nuevoVertice (ax,ay)); - setTg1(k1.back(),k1.back()->x,k1.back()->y,tgx,tgy); - setSplit(k1.back(),TRUE); - } - }else if(tokens.at(i).compare("Q")==0){ //absolute quadractic curve - //tg1 and tg2 - i++; tgx=ax=atof(tokens.at(i).data()); - i++; if(tokens.at(i).compare(",")==0) i++; - tgy=ay=atof(tokens.at(i).data()); - //point - i++; ax=atof(tokens.at(i).data()); - i++; if(tokens.at(i).compare(",")==0) i++; - ay=atof(tokens.at(i).data()); - actual_x=ax; - actual_y=ay; - //mtx - if(mtx){ - transformPoint2D(mtx,&ax,&ay); - transformPoint2D(mtx,&tgx,&tgy); - } - //adjust - coor2vect(&ax,&ay); - coor2vect(&tgx,&tgy); - //save - setTg1(k1.back(),k1.back()->x,k1.back()->y,tgx,tgy); - setSplit(k1.back(),FALSE); - k1.push_back(nuevoVertice (ax,ay)); - setTg1(k1.back(),k1.back()->x,k1.back()->y,tgx,tgy); - }else if(tokens.at(i).compare("L")==0){ //absolute line to - //point - i++; ax=atof(tokens.at(i).data()); - i++; if(tokens.at(i).compare(",")==0) i++; - ay=atof(tokens.at(i).data()); - actual_x=ax; - actual_y=ay; - //mtx - if(mtx) transformPoint2D(mtx,&ax,&ay); - //adjust - coor2vect(&ax,&ay); - //save - setTg2(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); - if(isFirst(k1.front(),ax,ay)){ - setTg1(k1.front(),k1.front()->x,k1.front()->y,k1.front()->x,k1.front()->y); - }else{ - k1.push_back(nuevoVertice(ax,ay)); - setTg1(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); - } - }else if(tokens.at(i).compare("l")==0){//relative line to - //point read - i++; ax=atof(tokens.at(i).data()); - i++; if(tokens.at(i).compare(",")==0) i++; - ay=atof(tokens.at(i).data()); - //relative - ax=actual_x+ax; - ay=actual_y+ay; - actual_x=ax; - actual_y=ay; - //mtx - if(mtx) transformPoint2D(mtx,&ax,&ay); - //adjust - coor2vect(&ax,&ay); - //save - setTg2(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); - if(isFirst(k1.front(),ax,ay)){ - setTg1(k1.front(),k1.front()->x,k1.front()->y,k1.front()->x,k1.front()->y); - }else{ - k1.push_back(nuevoVertice(ax,ay)); - setTg1(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); - } - }else if(tokens.at(i).compare("H")==0){//absolute horizontal move - //the same that L but only Horizontal movement - //point - i++; ax=atof(tokens.at(i).data()); - ay=actual_y; - actual_x=ax; - actual_y=ay; - //mtx - if(mtx) transformPoint2D(mtx,&ax,&ay); - //adjust - coor2vect(&ax,&ay); - //save - setTg2(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); - if(isFirst(k1.front(),ax,ay)){ - setTg1(k1.front(),k1.front()->x,k1.front()->y,k1.front()->x,k1.front()->y); - }else{ - k1.push_back(nuevoVertice(ax,ay)); - setTg1(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); - } - }else if(tokens.at(i).compare("h")==0){//horizontal relative - i++; ax=atof(tokens.at(i).data()); - ax=actual_x+ax; - ay=actual_y; - actual_x=ax; - actual_y=ay; - //mtx - if(mtx) transformPoint2D(mtx,&ax,&ay); - //adjust - coor2vect(&ax,&ay); - //save - setTg2(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); - if(isFirst(k1.front(),ax,ay)){ - setTg1(k1.front(),k1.front()->x,k1.front()->y,k1.front()->x,k1.front()->y); - }else{ - k1.push_back(nuevoVertice(ax,ay)); - setTg1(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); - } - }else if(tokens.at(i).compare("V")==0){//vertical absolute - //point - i++; ay=atof(tokens.at(i).data()); - ax=actual_x; - actual_x=ax; - actual_y=ay; - //mtx - if(mtx) transformPoint2D(mtx,&ax,&ay); - //adjust - coor2vect(&ax,&ay); - //save - setTg2(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); - if(isFirst(k1.front(),ax,ay)){ - setTg1(k1.front(),k1.front()->x,k1.front()->y,k1.front()->x,k1.front()->y); - }else{ - k1.push_back(nuevoVertice(ax,ay)); - setTg1(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); - } - }else if(tokens.at(i).compare("v")==0){//relative - //point - i++; ay=atof(tokens.at(i).data()); - ax=actual_x; - ay=actual_y+ay; - actual_x=ax; - actual_y=ay; - //mtx - if(mtx) transformPoint2D(mtx,&ax,&ay); - //adjust - coor2vect(&ax,&ay); - //save - setTg2(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); - if(isFirst(k1.front(),ax,ay)){ - setTg1(k1.front(),k1.front()->x,k1.front()->y,k1.front()->x,k1.front()->y); - }else{ - k1.push_back(nuevoVertice(ax,ay)); - setTg1(k1.back(),k1.back()->x,k1.back()->y,k1.back()->x,k1.back()->y); - } - }else if(tokens.at(i).compare("T")==0){// I don't know what does it - }else if(tokens.at(i).compare("A")==0){//elliptic arc - - //isn't complete support, is only for circles - - //this curve have 6 parameters - //radio - float radio_x,radio_y; - float angle; - bool sweep,large; - //radio - i++; radio_x=atof(tokens.at(i).data()); - i++; if(tokens.at(i).compare(",")==0) i++; - radio_y=atof(tokens.at(i).data()); - //angle - i++; angle=atof(tokens.at(i).data()); - //flags - i++; large=atoi(tokens.at(i).data()); - i++; sweep=atoi(tokens.at(i).data()); - //point - i++; ax=atof(tokens.at(i).data()); - i++; if(tokens.at(i).compare(",")==0) i++; - ay=atof(tokens.at(i).data()); - //how to draw? - if(!large && !sweep){ - //points - tgx2 = actual_x + radio_x*0.5; - tgy2 = actual_y ; - tgx = ax; - tgy = ay + radio_y*0.5; - actual_x=ax; - actual_y=ay; - //transformations - if(mtx){ - transformPoint2D(mtx,&tgx2,&tgy2); - transformPoint2D(mtx,&ax,&ay); - transformPoint2D(mtx,&tgx,&tgy); - } - //adjust - coor2vect(&tgx2,&tgy2); - coor2vect(&ax,&ay); - coor2vect(&tgx,&tgy); - //save - setTg2(k1.back(),k1.back()->x,k1.back()->y,tgx2,tgy2); - if(isFirst(k1.front(),ax,ay)){ - setTg1(k1.front(),k1.front()->x,k1.front()->y,tgx,tgy); - }else{ - k1.push_back(nuevoVertice (ax,ay)); - setTg1(k1.back(),k1.back()->x,k1.back()->y,tgx,tgy); - setSplit(k1.back(),TRUE); - } - }else if(!large && sweep){ - //points - tgx2 = actual_x; - tgy2 = actual_y + radio_y*0.5; - tgx = ax + radio_x*0.5; - tgy = ay ; - actual_x=ax; - actual_y=ay; - //transformations - if(mtx){ - transformPoint2D(mtx,&tgx2,&tgy2); - transformPoint2D(mtx,&ax,&ay); - transformPoint2D(mtx,&tgx,&tgy); - } - //adjust - coor2vect(&tgx2,&tgy2); - coor2vect(&ax,&ay); - coor2vect(&tgx,&tgy); - //save - setTg2(k1.back(),k1.back()->x,k1.back()->y,tgx2,tgy2); - if(isFirst(k1.front(),ax,ay)){ - setTg1(k1.front(),k1.front()->x,k1.front()->y,tgx,tgy); - }else{ - k1.push_back(nuevoVertice (ax,ay)); - setTg1(k1.back(),k1.back()->x,k1.back()->y,tgx,tgy); - setSplit(k1.back(),TRUE); - } - }else if( large && !sweep){//rare - //this need more than one vertex - }else if( large && sweep){//circles in inkscape are made with this kind of arc - if(actual_y==ay){//circles - //intermediate point - int sense=1; - if(actual_x>ax) sense =-1; - float in_x,in_y,in_tgx1,in_tgy1,in_tgx2,in_tgy2; - in_x = (actual_x+ax)/2; - in_y = actual_y - sense*radio_y; - in_tgx1 = in_x - sense*(radio_x*0.5); - in_tgx2 = in_x + sense*(radio_x*0.5); - in_tgy1 = in_y; - in_tgy2 = in_y; - //start/end points - tgx2=actual_x; - tgy2=ay - sense*(radio_y*0.5); - tgx =ax; - tgy =ay - sense*(radio_y*0.5); - - actual_x=ax; - actual_y=ay; - //transformations - if(mtx){ - transformPoint2D(mtx,&tgx2,&tgy2); - transformPoint2D(mtx,&tgx ,&tgy ); - transformPoint2D(mtx,&ax,&ay); - - transformPoint2D(mtx,&in_tgx2,&in_tgy2); - transformPoint2D(mtx,&in_tgx1,&in_tgy1); - transformPoint2D(mtx,&in_x,&in_y); - } - //adjust - coor2vect(&tgx2 , &tgy2); - coor2vect(&ax , &ay ); - coor2vect(&tgx , &tgy ); - - coor2vect(&in_tgx2 , &in_tgy2); - coor2vect(&in_tgx1 , &in_tgy1); - coor2vect(&in_x , &in_y ); - - //save the last tg2 - setTg2(k1.back(),k1.back()->x,k1.back()->y,tgx2,tgy2); - //save the intermediate point - k1.push_back(nuevoVertice (in_x,in_y)); - setTg1(k1.back(),k1.back()->x,k1.back()->y, in_tgx1 , in_tgy1); - setTg2(k1.back(),k1.back()->x,k1.back()->y, in_tgx2 , in_tgy2); - setSplit(k1.back(),TRUE); //this could be changed - //save the new point - if(isFirst(k1.front(),ax,ay)){ - setTg1(k1.front(),k1.front()->x,k1.front()->y,tgx,tgy); - }else{ - k1.push_back(nuevoVertice (ax,ay)); - setTg1(k1.back(),k1.back()->x,k1.back()->y,tgx,tgy); - setSplit(k1.back(),TRUE); - } - } - } - }else if(tokens.at(i).compare("z")==0){ - loop=true; - }else{ - std::cout<<"don't supported: "<(node); - if(!nodeContent){ - xmlpp::Node::NodeList list = node->get_children(); - for(xmlpp::Node::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter){ - Glib::ustring name =(*iter)->get_name(); - if(name.compare("linearGradient")==0){ - parser_linearGradient(*iter); - }else if(name.compare("radialGradient")==0){ - parser_radialGradient(*iter); - } - } - } -} -void -Svg_parser::AdjustPointUrl(){ -/* - if(!lg.empty()){//linealgradient - std::list::iterator aux=lg.begin(); - while(aux!=lg.end()){ - LinearGradient* auxlg=*aux; - coor2vect (&auxlg->x1,&auxlg->y1); - coor2vect (&auxlg->x2,&auxlg->y2); - aux++; - } - } - if(!rg.empty()){//radialgradient - std::list::iterator aux=rg.begin(); - while(aux!=rg.end()){ - RadialGradient* auxrg=*aux; - coor2vect (&auxrg->cx,&auxrg->cy); - auxrg->r= auxrg->r/kux; - aux++; - } - } -*/ -} -std::list* -Svg_parser::find_colorStop(String name){ - if(!name.empty()){ - if(lg.empty()&& rg.empty()) - return NULL; - - String buscar= name; - if(buscar.at(0)=='#') buscar.erase(0,1); - else return NULL; - std::list::iterator aux=lg.begin(); - while(aux!=lg.end()){//only find into linear gradients - if(buscar.compare((*aux)->name)==0){ - return (*aux)->stops; - } - aux++; - } - } - return NULL; -} -void -Svg_parser::build_url(xmlpp::Element* root, String name,Matrix *mtx){ - if(!name.empty()){ - if(lg.empty()&& rg.empty()) - root->get_parent()->remove_child(root); - - int inicio=name.find_first_of("#")+1; - int fin=name.find_first_of(")"); - String buscar= name.substr(inicio,fin-inicio); - bool encontro=false; - if(!lg.empty()){ - std::list::iterator aux=lg.begin(); - while(aux!=lg.end()){ - if(buscar.compare((*aux)->name)==0){ - build_linearGradient (root,*aux,mtx); - encontro=true; - } - aux++; - } - } - if(!encontro && !rg.empty()){ - std::list::iterator aux=rg.begin(); - while(aux!=rg.end()){ - if(buscar.compare((*aux)->name)==0){ - build_radialGradient (root,*aux,mtx); - encontro=true; - } - aux++; - } - } - if(!encontro) - root->get_parent()->remove_child(root); - }else{ - root->get_parent()->remove_child(root); - } -} -void -Svg_parser::build_stop_color(xmlpp::Element* root, std::list *stops){ - std::list::iterator aux_stop=stops->begin(); - while(aux_stop!=stops->end()){ - xmlpp::Element *child=root->add_child("color"); - child->set_attribute("pos",etl::strprintf("%f",(*aux_stop)->pos)); - child->add_child("r")->set_child_text(etl::strprintf("%f",(*aux_stop)->r)); - child->add_child("g")->set_child_text(etl::strprintf("%f",(*aux_stop)->g)); - child->add_child("b")->set_child_text(etl::strprintf("%f",(*aux_stop)->b)); - child->add_child("a")->set_child_text(etl::strprintf("%f",(*aux_stop)->a)); - aux_stop++; - } -} -void -Svg_parser::build_linearGradient(xmlpp::Element* root,LinearGradient* data,Matrix* mtx){ - if(data){ - root->set_attribute("type","linear_gradient"); - root->set_attribute("active","true"); - root->set_attribute("desc","Gradient004"); - build_param (root->add_child("param"),"z_depth","real","0"); - build_param (root->add_child("param"),"amount","real","1"); - //straight onto - build_param (root->add_child("param"),"blend_method","integer","21"); - float x1,y1,x2,y2; - x1=data->x1; - y1=data->y1; - x2=data->x2; - y2=data->y2; - if(mtx){ - transformPoint2D(mtx,&x1,&y1); - transformPoint2D(mtx,&x2,&y2); - } - coor2vect (&x1,&y1); - coor2vect (&x2,&y2); - - build_vector (root->add_child("param"),"p1",x1,y1); - build_vector (root->add_child("param"),"p2",x2,y2); - //gradient link - xmlpp::Element *child=root->add_child("param"); - child->set_attribute("name","gradient"); - build_stop_color (child->add_child("gradient"),data->stops); - build_param (root->add_child("param"),"loop","bool","false"); - build_param (root->add_child("param"),"zigzag","bool","false"); - } -} -void -Svg_parser::build_radialGradient(xmlpp::Element* root,RadialGradient* data,Matrix* mtx){ -//not completed - if(data){ - root->set_attribute("type","radial_gradient"); - root->set_attribute("active","true"); - build_param (root->add_child("param"),"z_depth","real","0"); - build_param (root->add_child("param"),"amount","real","1"); - //straight onto - build_param (root->add_child("param"),"blend_method","integer","21"); - //gradient link - xmlpp::Element *child=root->add_child("param"); - child->set_attribute("name","gradient"); - build_stop_color (child->add_child("gradient"),data->stops); - //here the center point and radio - float cx=data->cx; - float cy=data->cy; - float r =data->r; - //transform - if(mtx){ - transformPoint2D(mtx,&cx,&cy); - } - //adjust - coor2vect (&cx,&cy); - r=r/kux; - build_vector (root->add_child("param"),"center",cx,cy); - build_param (root->add_child("param"),"radius","real",r); - - build_param (root->add_child("param"),"loop","bool","false"); - build_param (root->add_child("param"),"zigzag","bool","false"); - } -} - -void -Svg_parser::parser_linearGradient(const xmlpp::Node* node){ - if(const xmlpp::Element* nodeElement = dynamic_cast(node)){ - Glib::ustring id =nodeElement->get_attribute_value("id"); - float x1 =atof(nodeElement->get_attribute_value("x1").data()); - float y1 =atof(nodeElement->get_attribute_value("y1").data()); - float x2 =atof(nodeElement->get_attribute_value("x2").data()); - float y2 =atof(nodeElement->get_attribute_value("y2").data()); - Glib::ustring link =nodeElement->get_attribute_value("href"); - - std::list *stops; - if(!link.empty()){ - stops=find_colorStop (link); - }else{ - //color stops - stops=new std::list(); - const xmlpp::ContentNode* nodeContent = dynamic_cast(node); - if(!nodeContent){ - xmlpp::Node::NodeList list = node->get_children(); - for(xmlpp::Node::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter){ - Glib::ustring name =(*iter)->get_name(); - if(name.compare("stop")==0){ - const xmlpp::Element* nodeIter = dynamic_cast(*iter); - Glib::ustring style =nodeIter->get_attribute_value("style"); - float offset=atof(nodeIter->get_attribute_value("offset").data()); - String stop_color; - String opacity; - if(!style.empty()){ - extractSubAttribute (style,"stop-color",&stop_color); - extractSubAttribute (style,"stop-opacity",&opacity); - } - if(opacity.empty()) opacity="1"; - if(stop_color.empty()) stop_color="#000000";//black for default :S - stops->push_back(newColorStop(stop_color,atof(opacity.data()),offset)); - } - } - } - } - if(stops) - lg.push_back(newLinearGradient(id,x1,y1,x2,y2,stops)); - } -} - -void -Svg_parser::parser_radialGradient(const xmlpp::Node* node){ - if(const xmlpp::Element* nodeElement = dynamic_cast(node)){ - Glib::ustring id =nodeElement->get_attribute_value("id"); - float cx =atof(nodeElement->get_attribute_value("cx").data()); - float cy =atof(nodeElement->get_attribute_value("cy").data()); - float r =atof(nodeElement->get_attribute_value("r").data()); - Glib::ustring link =nodeElement->get_attribute_value("href");//basic - std::list *stops=NULL; - if(!link.empty()){ - //inkscape always use link, i dont need parser stops here, but it's posible - stops=find_colorStop (link); - } - if(stops) - rg.push_back(newRadialGradient(id,cx,cy,r,stops)); - } -} - -ColorStop* -Svg_parser::newColorStop(String color,float opacity,float pos){ - ColorStop* _stop; - _stop=(ColorStop*)malloc(sizeof(ColorStop)); - float r=getRed(color); - float g=getGreen(color); - float b=getBlue(color); - float a=opacity; - Color ret=adjustGamma(r/255,g/255,b/255,a); - _stop->r=ret.get_r(); - _stop->g=ret.get_g(); - _stop->b=ret.get_b(); - _stop->a=ret.get_a(); - _stop->pos=pos; - return _stop; -} -Color -Svg_parser::adjustGamma(float r,float g,float b,float a){ - Color ret(r,g,b,a); - if(gamma.get_gamma_r()!=1.0){ - if(ret.get_r() < 0) - ret.set_r(-gamma.r_F32_to_F32(-ret.get_r())); - else - ret.set_r(gamma.r_F32_to_F32(ret.get_r())); - } - if(gamma.get_gamma_g()!=1.0){ - if(ret.get_g() < 0) - ret.set_g(-gamma.g_F32_to_F32(-ret.get_g())); - else - ret.set_g(gamma.g_F32_to_F32(ret.get_g())); - } - if(gamma.get_gamma_b()!=1.0){ - if(ret.get_b() < 0) - ret.set_b(-gamma.b_F32_to_F32(-ret.get_b())); - else - ret.set_b(gamma.b_F32_to_F32(ret.get_b())); - } - return ret; -} - -LinearGradient* -Svg_parser::newLinearGradient(String name,float x1,float y1, float x2,float y2,std::list *stops){ - LinearGradient* data; - data=(LinearGradient*)malloc(sizeof(LinearGradient)); - sprintf(data->name,"%s",name.data()); - data->x1=x1; - data->y1=y1; - data->x2=x2; - data->y2=y2; - data->stops=stops; - return data; -} - -RadialGradient* -Svg_parser::newRadialGradient(String name,float cx,float cy,float r,std::list *stops){ - RadialGradient* data; - data=(RadialGradient*)malloc(sizeof(RadialGradient)); - sprintf(data->name,"%s",name.data()); - data->cx=cx; - data->cy=cy; - data->r=r; - data->stops=stops; - return data; -} - -//builds -void -Svg_parser::build_gamma(xmlpp::Element* root,float gamma){ - root->set_attribute("type","colorcorrect"); - root->set_attribute("active","true"); - root->set_attribute("version","0.1"); - root->set_attribute("desc","Gamma"); - build_real (root->add_child("param"),"gamma",gamma); -} -Matrix* -Svg_parser::build_transform(const String transform){ - Matrix* a=NULL; - String tf(transform); - removeIntoS(&tf); - std::vector tokens=tokenize(tf," "); - std::vector::iterator aux=tokens.begin(); - while(aux!=tokens.end()){ - if((*aux).compare(0,9,"translate")==0){ - float dx,dy; - int inicio,fin; - inicio =(*aux).find_first_of("(")+1; - fin =(*aux).find_first_of(","); - dx =atof((*aux).substr(inicio,fin-inicio).data()); - inicio =(*aux).find_first_of(",")+1; - fin =(*aux).size()-1; - dy =atof((*aux).substr(inicio,fin-inicio).data()); - if(matrixVacia(a)) - a=newMatrix(1,0,0,1,dx,dy); - else - multiplyMatrix(&a,newMatrix(1,0,0,1,dx,dy)); - }else if((*aux).compare(0,5,"scale")==0){ - if(matrixVacia(a)) - a=newMatrix(1,0,0,1,0,0); - }else if((*aux).compare(0,6,"rotate")==0){ - float angle,seno,coseno; - int inicio,fin; - inicio =(*aux).find_first_of("(")+1; - fin =(*aux).size()-1; - angle=getRadian (atof((*aux).substr(inicio,fin-inicio).data())); - seno =sin(angle); - coseno =cos(angle); - if(matrixVacia(a)) - a=newMatrix(coseno,seno,-1*seno,coseno,0,0); - else - multiplyMatrix(&a,newMatrix(coseno,seno,-1*seno,coseno,0,0)); - }else if((*aux).compare(0,6,"matrix")==0){ - int inicio =(*aux).find_first_of('(')+1; - int fin =(*aux).find_first_of(')'); - if(matrixVacia(a)) - a=newMatrix((*aux).substr(inicio,fin-inicio)); - else - multiplyMatrix(&a,newMatrix((*aux).substr(inicio,fin-inicio))); - }else{ - a=newMatrix(1,0,0,1,0,0); - } - aux++; - } - return a; -} - -void -Svg_parser::build_translate(xmlpp::Element* root,float dx,float dy){ - root->set_attribute("type","translate"); - root->set_attribute("active","true"); - root->set_attribute("version","0.1"); - build_vector (root->add_child("param"),"origin",dx,dy); -} -void -Svg_parser::build_rotate(xmlpp::Element* root,float dx,float dy,float angle){ - root->set_attribute("type","rotate"); - root->set_attribute("active","true"); - root->set_attribute("version","0.1"); - build_vector (root->add_child("param"),"origin",dx,dy); - build_real (root->add_child("param"),"amount",angle); -} -void -Svg_parser::build_points(xmlpp::Element* root,std::list p){ - root->set_attribute("name","vector_list"); - xmlpp::Element *child=root->add_child("dynamic_list"); - child->set_attribute("type","vector"); - std::list::iterator aux = p.begin(); - while(aux!=p.end()){ - xmlpp::Element *child_entry=child->add_child("entry"); - xmlpp::Element *child_vector=child_entry->add_child("vector"); - child_vector->add_child("x")->set_child_text(etl::strprintf("%f",(*aux)->x)); - child_vector->add_child("y")->set_child_text(etl::strprintf("%f",(*aux)->y)); - aux++; - } -} -void -Svg_parser::build_vertice(xmlpp::Element* root , Vertice *p){ - xmlpp::Element *child_comp=root->add_child("composite"); - child_comp->set_attribute("type","bline_point"); - build_vector (child_comp->add_child("param"),"point",p->x,p->y); - build_param (child_comp->add_child("width"),"","real","1.0000000000"); - build_param (child_comp->add_child("origin"),"","real","0.5000000000"); - if(p->split) build_param (child_comp->add_child("split"),"","bool","true"); - else build_param (child_comp->add_child("split"),"","bool","false"); - //tangente 1 - xmlpp::Element *child_t1=child_comp->add_child("t1"); - xmlpp::Element *child_rc=child_t1->add_child("radial_composite"); - child_rc->set_attribute("type","vector"); - build_param (child_rc->add_child("radius"),"","real",p->radio1); - build_param (child_rc->add_child("theta"),"","angle",p->angle1); - //tangente 2 - xmlpp::Element *child_t2=child_comp->add_child("t2"); - xmlpp::Element *child_rc2=child_t2->add_child("radial_composite"); - child_rc2->set_attribute("type","vector"); - build_param (child_rc2->add_child("radius"),"","real",p->radio2); - build_param (child_rc2->add_child("theta"),"","angle",p->angle2); - -} -void -Svg_parser::build_bline(xmlpp::Element* root,std::list p,bool loop,String blineguid){ - root->set_attribute("name","bline"); - xmlpp::Element *child=root->add_child("bline"); - child->set_attribute("type","bline_point"); - if(loop) - child->set_attribute("loop","true"); - else - child->set_attribute("loop","false"); - if(!blineguid.empty()) child->set_attribute("guid",blineguid); - std::list::iterator aux = p.begin(); - while(aux!=p.end()){ - if(*aux) build_vertice (child->add_child("entry"),*aux); - aux++; - } -} - -void -Svg_parser::build_param(xmlpp::Element* root,String name,String type,String value){ - if(!type.empty() && !value.empty()){ - if(!name.empty()) root->set_attribute("name",name); - xmlpp::Element *child=root->add_child(type); - child->set_attribute("value",value); - }else{ - root->get_parent()->remove_child(root); - } -} -void -Svg_parser::build_param(xmlpp::Element* root,String name,String type,float value){ - if(!type.empty()){ - if(!name.empty()) root->set_attribute("name",name); - xmlpp::Element *child=root->add_child(type); - child->set_attribute("value",etl::strprintf ("%f",value)); - }else{ - root->get_parent()->remove_child(root); - } -} -void -Svg_parser::build_param(xmlpp::Element* root,String name,String type,int value){ - if(!type.empty()){ - if(!name.empty()) root->set_attribute("name",name); - xmlpp::Element *child=root->add_child(type); - char *enteroc=new char[10]; - sprintf(enteroc,"%d",value); - child->set_attribute("value",enteroc); - delete [] enteroc; - }else{ - root->get_parent()->remove_child(root); - } -} - -void -Svg_parser::build_integer(xmlpp::Element* root,String name,int value){ - if(name.compare("")!=0) root->set_attribute("name",name); - xmlpp::Element *child=root->add_child("integer"); - char *enteroc=new char[10]; - sprintf(enteroc,"%d",value); - child->set_attribute("value",enteroc); -} -void -Svg_parser::build_real(xmlpp::Element* root,String name,float value){ - if(name.compare("")!=0) root->set_attribute("name",name); - xmlpp::Element *child=root->add_child("real"); - char *realc=new char[20]; - sprintf(realc,"%f",value); - child->set_attribute("value",realc); -} - -void -Svg_parser::build_color(xmlpp::Element* root,float r,float g,float b,float a){ - if(r>255 || g>255 || b>255 || a>1 || r<0 || g<0 || b<0 || a<0){ - root->get_parent()->remove_child(root); - printf("Color aborted\n"); - return; - } - Color ret=adjustGamma(r/255,g/255,b/255,a); - - root->set_attribute("name","color"); - xmlpp::Element *child=root->add_child("color"); - child->add_child("r")->set_child_text(etl::strprintf("%f",ret.get_r())); - child->add_child("g")->set_child_text(etl::strprintf("%f",ret.get_g())); - child->add_child("b")->set_child_text(etl::strprintf("%f",ret.get_b())); - child->add_child("a")->set_child_text(etl::strprintf("%f",ret.get_a())); -} -void -Svg_parser::build_vector(xmlpp::Element* root,String name,float x,float y){ - - if(name.compare("")!=0) root->set_attribute("name",name); - xmlpp::Element *child=root->add_child("vector"); - child->add_child("x")->set_child_text(etl::strprintf("%f",x)); - child->add_child("y")->set_child_text(etl::strprintf("%f",y)); - -} -void -Svg_parser::build_vector (xmlpp::Element* root,String name,float x,float y,String guid){ - if(name.compare("")!=0) root->set_attribute("name",name); - xmlpp::Element *child=root->add_child("vector"); - if(!guid.empty()) child->set_attribute("guid",guid); - child->add_child("x")->set_child_text(etl::strprintf("%f",x)); - child->add_child("y")->set_child_text(etl::strprintf("%f",y)); -} - -xmlpp::Element* -Svg_parser::nodeStartBasicLayer(xmlpp::Element* root){ - root->set_attribute("type","PasteCanvas"); - root->set_attribute("active","true"); - root->set_attribute("version","0.1"); - root->set_attribute("desc","Composite"); - build_param (root->add_child("param"),"z_depth","real","0"); - build_param (root->add_child("param"),"amount","real","1"); - build_param (root->add_child("param"),"blend_method","integer","0"); - build_vector (root->add_child("param"),"origin",0,0); - xmlpp::Element *child=root->add_child("param"); - child->set_attribute("name","canvas"); - return child->add_child("canvas"); -} - -//metodos extras -void -Svg_parser::coor2vect(float *x,float *y){ - float sx, sy; - sx=*x; - sy=*y; - sy= atof(height.c_str())-sy; - sx= sx - ox; - sy= sy - oy; - sx= sx / kux; - sy= sy / kux; - *x=sx; *y=sy; -} - -void -Svg_parser::setTg1(Vertice *p,float p1x,float p1y,float p2x,float p2y){ - float rd=0,ag=0; - float d1x,d1y,d2x,d2y,dx,dy; - d1x=p1x*60; - d1y=p1y*60; - d2x=p2x*60; - d2y=p2y*60; - dx=d2x-d1x; - dy=d2y-d1y; - dx=dx*3; - dy=dy*3; - dx=dx/60; - dy=dy/60; - rd=sqrt(dx*dx + dy*dy); - if(dx>0 && dy>0){ - ag=PI + atan(dy/dx); - }else if(dx>0 && dy<0){ - ag=PI + atan(dy/dx); - }else if(dx<0 && dy<0){ - ag=atan(dy/dx); - }else if(dx<0 && dy>0){ - ag= 2*PI+atan(dy/dx); - }else if(dx==0 && dy>0){ - ag=-1*PI/2; - }else if(dx==0 && dy<0){ - ag=PI/2; - }else if(dx==0 && dy==0){ - ag=0; - }else if(dx<0 && dy==0){ - ag=0; - }else if(dx>0 && dy==0){ - ag=PI; - } - ag= (ag*180)/PI; - p->radio1=rd; - p->angle1=ag; -} -void -Svg_parser::setTg2(Vertice* p,float p1x,float p1y,float p2x,float p2y){ - float rd=0,ag=0; - float d1x,d1y,d2x,d2y,dx,dy; - d1x=p1x*60; - d1y=p1y*60; - d2x=p2x*60; - d2y=p2y*60; - dx=d2x-d1x; - dy=d2y-d1y; - dx=dx*3; - dy=dy*3; - dx=dx/60; - dy=dy/60; - - rd=sqrt(dx*dx + dy*dy); - if(dx>0 && dy>0){ - ag=PI + atan(dy/dx); - // printf("caso 180-270\n"); - }else if(dx>0 && dy<0){ - ag=PI + atan(dy/dx); - // printf("caso 90-180\n"); - }else if(dx<0 && dy<0){ - ag=atan(dy/dx); - // printf("caso 0-90\n"); - }else if(dx<0 && dy>0){ - ag= 2*PI+atan(dy/dx); - // printf("caso 270-360\n"); - }else if(dx==0 && dy>0){ - ag=-1*PI/2; - }else if(dx==0 && dy<0){ - ag=PI/2; - }else if(dx==0 && dy==0){ - ag=0; - }else if(dx<0 && dy==0){ - ag=0; - }else if(dx>0 && dy==0){ - ag=PI; - } - ag= (ag*180)/PI; - ag=ag-180; - p->radio2=rd; - p->angle2=ag; -} - -void -Svg_parser::setSplit(Vertice* p,bool val){ - if(p!=NULL){ - p->split=val; - } -} -int -Svg_parser::isFirst(Vertice* nodo,float a, float b){ - if(nodo->x==a && nodo->y==b) - return 1; - return 0; -} - -Vertice* -Svg_parser::nuevoVertice(float x,float y){ - Vertice* nuevo; - nuevo=(Vertice*)malloc(sizeof(Vertice)); - nuevo->x=x; - nuevo->y=y; - nuevo->radio1=nuevo->radio2=nuevo->angle1=nuevo->angle2=0; - return nuevo; -} - -int -Svg_parser::extractSubAttribute(const String attribute, String name,String* value){ - int encontro=0; - if(!attribute.empty()){ - String str(attribute); - removeS(&str); - std::vector tokens=tokenize(str,";"); - std::vector::iterator aux=tokens.begin(); - while(aux!=tokens.end()){ - int medio= (*aux).find_first_of(":"); - if((*aux).substr(0,medio).compare(name)==0){ - int fin=(*aux).size(); - *value=(*aux).substr(medio+1,fin-medio); - return 1; - } - aux++; - } - } - return encontro; -} -String -Svg_parser::loadAttribute(String name,const String path_style,const String master_style,const String defaultVal){ - String value; - int fnd=0; - if(!path_style.empty()) - fnd=extractSubAttribute(path_style,name,&value); - if(fnd==0){ - if(!master_style.empty()) - fnd=extractSubAttribute(master_style,name,&value); - if(fnd==0) - value=defaultVal; - } - return value; -} -String -Svg_parser::loadAttribute(String name,const String path_style,const String master_style,const String subattribute,const String defaultVal){ - String value; - int fnd=0; - if(!path_style.empty()) - fnd=extractSubAttribute(path_style,name,&value); - if(fnd==0 && !master_style.empty()) - fnd=extractSubAttribute(master_style,name,&value); - if(fnd==0){ - if(!subattribute.empty()) - value=subattribute; - else - value=defaultVal; - } - return value; -} - -int -Svg_parser::randomLetter(){ - int a=rand()%2; - if(a) return (49 + rand()%9); - else return (65 + rand()%24); -} - -int -Svg_parser::getRed(String hex){ - if(hex.at(0)=='#'){ - return hextodec(hex.substr(1,2)); - }else if(hex.compare(0,3,"rgb")==0 || hex.compare(0,3,"RGB")==0){ - int inicio=hex.find_first_of("(")+1; - int fin =hex.find_last_of(")"); - String aux=tokenize(hex.substr(inicio,fin-inicio),",").at(0); - return atoi(aux.data()); - } - return 0; -} -int -Svg_parser::getGreen(String hex){ - if(hex.at(0)=='#'){ - return hextodec(hex.substr(3,2)); - }else if(hex.compare(0,3,"rgb")==0 || hex.compare(0,3,"RGB")==0){ - int inicio=hex.find_first_of("(")+1; - int fin =hex.find_last_of(")"); - String aux=tokenize(hex.substr(inicio,fin-inicio),",").at(1); - return atoi(aux.data()); - } - return 0; -} -int -Svg_parser::getBlue(String hex){ - if(hex.at(0)=='#'){ - return hextodec(hex.substr(5,2)); - }else if(hex.compare(0,3,"rgb")==0 || hex.compare(0,3,"RGB")==0){ - int inicio=hex.find_first_of("(")+1; - int fin =hex.find_last_of(")"); - String aux=tokenize(hex.substr(inicio,fin-inicio),",").at(2); - return atoi(aux.data()); - } - return 0; -} -int -Svg_parser::hextodec(String hex){ - int result=0; - if(!hex.empty()){ - int top=hex.size(); - int ihex[top]; - int i=0; - while(ia=a->a; data->b=a->b; data->c=a->c; - data->d=a->d; data->e=a->e; data->f=a->f; - return data; -} -Matrix* -Svg_parser::newMatrix(float a,float b,float c,float d,float e,float f){ - Matrix* data; - data=(Matrix*)malloc(sizeof(Matrix)); - data->a=a; data->b=b; data->c=c; - data->d=d; data->e=e; data->f=f; - return data; -} -Matrix* -Svg_parser::newMatrix(const String mvector){ - if(!mvector.empty()){ - Matrix* data=(Matrix*)malloc(sizeof(Matrix)); - std::vector tokens=tokenize(mvector,","); - if(tokens.size()!=6) return newMatrix(1,0,0,1,0,0); - data->a=atof(tokens.at(0).data()); - data->b=atof(tokens.at(1).data()); - data->c=atof(tokens.at(2).data()); - data->d=atof(tokens.at(3).data()); - data->e=atof(tokens.at(4).data()); - data->f=atof(tokens.at(5).data()); - return data; - }else{ - return newMatrix(1,0,0,1,0,0); - } -} -void -Svg_parser::transformPoint2D(Matrix *mtx,float *a,float *b){ - float auxa,auxb; - auxa=0; - auxb=0; - auxa= (*a)*(mtx->a) + (*b)*(mtx->c) + (mtx->e); - auxb= (*a)*(mtx->b) + (*b)*(mtx->d) + (mtx->f); - *a=auxa; - *b=auxb; - return; -} -void -Svg_parser::composeMatrix(Matrix **mtx,Matrix* mtx1,Matrix* mtx2){ - Matrix* aux=newMatrix(0,0,0,0,0,0); - aux->a=(mtx1->a)*(mtx2->a)+(mtx1->c)*(mtx2->b); - aux->b=(mtx1->b)*(mtx2->a)+(mtx1->d)*(mtx2->b); - aux->c=(mtx1->a)*(mtx2->c)+(mtx1->c)*(mtx2->d); - aux->d=(mtx1->b)*(mtx2->c)+(mtx1->d)*(mtx2->d); - aux->e=(mtx1->a)*(mtx2->e)+(mtx1->c)*(mtx2->f)+(mtx1->e); - aux->f=(mtx1->b)*(mtx2->e)+(mtx1->d)*(mtx2->f)+(mtx1->f); - *mtx=aux; -} -void -Svg_parser::multiplyMatrix(Matrix **mtx1,Matrix *mtx2){ - Matrix* aux=newMatrix(0,0,0,0,0,0); - aux->a=((*mtx1)->a)*(mtx2->a)+((*mtx1)->c)*(mtx2->b); - aux->b=((*mtx1)->b)*(mtx2->a)+((*mtx1)->d)*(mtx2->b); - aux->c=((*mtx1)->a)*(mtx2->c)+((*mtx1)->c)*(mtx2->d); - aux->d=((*mtx1)->b)*(mtx2->c)+((*mtx1)->d)*(mtx2->d); - aux->e=((*mtx1)->a)*(mtx2->e)+((*mtx1)->c)*(mtx2->f)+((*mtx1)->e); - aux->f=((*mtx1)->b)*(mtx2->e)+((*mtx1)->d)*(mtx2->f)+((*mtx1)->f); - (*mtx1)->a=aux->a; - (*mtx1)->b=aux->b; - (*mtx1)->c=aux->c; - (*mtx1)->d=aux->d; - (*mtx1)->e=aux->e; - (*mtx1)->f=aux->f; -} -bool -Svg_parser::matrixVacia(Matrix *mtx){ - if(mtx == NULL) return true; - return false; -} - -float -Svg_parser::getRadian(float sexa){ - return (sexa*2*PI)/360; -} -void -Svg_parser::removeS(String *input){ - for(unsigned int i=0;isize();i++){ - if(input->at(i)==' '){ - input->erase(i,1); - } - } -} -void -Svg_parser::removeIntoS(String *input){ - bool into=false; - for(unsigned int i=0;isize();i++){ - if(input->at(i)=='('){ - into=true; - }else if(input->at(i)==')'){ - into=false; - }else if(into && input->at(i)==' '){ - input->erase(i,1); - } - } -} -std::vector -Svg_parser::tokenize(const String& str,const String& delimiters){ - std::vector tokens; - String::size_type lastPos = str.find_first_not_of(delimiters, 0); - String::size_type pos = str.find_first_of(delimiters, lastPos); - while (String::npos != pos || String::npos != lastPos){ - tokens.push_back(str.substr(lastPos, pos - lastPos)); - lastPos = str.find_first_not_of(delimiters, pos); - pos = str.find_first_of(delimiters, lastPos); - } - return tokens; -} -String -Svg_parser::new_guid(){ - uid++; - return GUID::hasher(uid).get_string(); -} - diff --git a/synfig-core/trunk/src/modules/mod_svg/svg_parser.h b/synfig-core/trunk/src/modules/mod_svg/svg_parser.h deleted file mode 100644 index 694add7..0000000 --- a/synfig-core/trunk/src/modules/mod_svg/svg_parser.h +++ /dev/null @@ -1,211 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file svg_parser.h -** \brief Implementation of the Svg parser -** \brief Based on SVG XML specification 1.1 -** \brief See: http://www.w3.org/TR/xml11/ for deatils -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** Copyright (c) 2009 Carlos A. Sosa Navarro -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SVG_PARSER_H -#define __SVG_PARSER_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig{ - -typedef struct matrix_t{ - float a,c,e; - float b,d,f; -}Matrix; - -typedef struct stop_t{ - float r,g,b; - float a; - float pos; -}ColorStop; -typedef struct linear_g{ - char name[40]; - float x1,x2,y1,y2; - std::list *stops; //paradas de color -}LinearGradient; -typedef struct radial_g{ - char name[40]; - float cx,cy;//center point - //float fx,fy; - //focus, i dont see it in synfig - //if this value is omitted then will be = cx,cy - float r; //radio radius - std::list *stops; //paradas de color -}RadialGradient; - -typedef struct url_t{ - int type; - void* data; -}URL; - -typedef struct vertice_t{ - float x,y; - float radio1,angle1; - float radio2,angle2; - bool split; -}Vertice; -class Svg_parser -{ - //this is inkscape oriented in some cases -public: - -private: - Gamma gamma; - String filepath; - String id_name; - xmlpp::DomParser parser; - xmlpp::Document document; - xmlpp::Element* nodeRoot;//output - Glib::ustring width; - Glib::ustring height; - Glib::ustring docname; - int uid; - int kux,set_canvas; - float ox,oy; - bool loop;//aux :D - //urls - std::list lg; - std::list rg; - -public: - Svg_parser(); - Canvas::Handle load_svg_canvas(std::string _filepath,String &errors, String &warnings); - //String get_id(); - //void set_id(String source); - -private: //parser bucle - void parser_node(const xmlpp::Node* node); - //parser headers - void parser_svg(const xmlpp::Node* node); - void parser_canvas(const xmlpp::Node* node); - //layers - void parser_layer(const xmlpp::Node* node,xmlpp::Element* root,String parent_style,Matrix* mtx_parent); - void parser_path(const xmlpp::Node* node,xmlpp::Element* root,String parent_style,Matrix* mtx_parent); - void parser_polygon(const xmlpp::Node* node,xmlpp::Element* root,String parent_style,Matrix* mtx_parent); - void parser_rect(const xmlpp::Node* node,xmlpp::Element* root,String parent_style,Matrix* mtx_parent); - //defs - void parser_defs(const xmlpp::Node* node); - void parser_linearGradient(const xmlpp::Node* node); - void parser_radialGradient(const xmlpp::Node* node); - ColorStop* newColorStop(String color,float opacity,float pos); - LinearGradient* newLinearGradient(String name,float x1,float y1, float x2,float y2,std::list *stops); - RadialGradient* newRadialGradient(String name,float cx,float cy,float r,std::list *stops); - //builds urls - void AdjustPointUrl(); - std::list* find_colorStop(String name); - void build_url(xmlpp::Element* root, String name,Matrix *mtx); - void build_linearGradient(xmlpp::Element* root,LinearGradient* data,Matrix* mtx); - void build_radialGradient(xmlpp::Element* root,RadialGradient* data,Matrix* mtx); - void build_stop_color(xmlpp::Element* root, std::list *stops); - void build_stop_color(xmlpp::Element* root, std::list *stops,String name); - Color adjustGamma(float r,float g,float b,float a); - //builds - void build_gamma(xmlpp::Element* root,float gamma); - Matrix* build_transform(const String transform); - void build_rotate(xmlpp::Element* root,float dx,float dy,float angle); - void build_translate(xmlpp::Element* root,float dx,float dy); - void build_points(xmlpp::Element* root,std::list p); - void build_vertice(xmlpp::Element* root , Vertice *p); - void build_bline(xmlpp::Element* root,std::list p,bool loop,String blinegui); - void build_param (xmlpp::Element* root,String name,String type,String value); - void build_param (xmlpp::Element* root,String name,String type,float value); - void build_param (xmlpp::Element* root,String name,String type,int value); - void build_integer (xmlpp::Element* root,String name, int value); - void build_real (xmlpp::Element* root,String name,float value); - void build_vector (xmlpp::Element* root,String name,float x,float y); - void build_vector (xmlpp::Element* root,String name,float x,float y,String guid); - void build_color(xmlpp::Element* root,float r,float g,float b,float a); - xmlpp::Element* nodeStartBasicLayer(xmlpp::Element* root); - - //points,etc - void coor2vect(float *x,float *y); - void setTg2(Vertice* p,float p1x,float p1y,float p2x,float p2y); - void setTg1(Vertice *p,float p1x,float p1y,float p2x,float p2y); - void setSplit(Vertice* p,bool val); - int isFirst(Vertice* nodo,float a, float b); - Vertice* nuevoVertice(float x,float y); - - //matrix operations - Matrix* newMatrix(float a,float b,float c,float d,float e,float f); - Matrix* newMatrix(const String mvector); - Matrix* newMatrix(Matrix *a); - void transformPoint2D(Matrix *mtx,float *a,float *b); - bool matrixVacia(Matrix* mtx); - void composeMatrix(Matrix **mtx,Matrix *mtx1,Matrix *mtx2); - void multiplyMatrix(Matrix **mtx1,Matrix *mtx2); - float getRadian(float sexa); - //attributes - int extractSubAttribute(const String attribute, String name,String* value); - String loadAttribute(String name,const String path_style,const String master_style,const String subattribute,const String defaultVal); - String loadAttribute(String name,const String path_style,const String master_style,const String defaultVal); - std::vector get_tokens_path(String path); - std::list > parser_path_d(String path_d,Matrix* mtx); - int randomLetter(); - int getRed(String hex); - int getGreen(String hex); - int getBlue(String hex); - int hextodec(String hex); - float getDimension(const String ac); - //funciones string - void removeS(String *input); - void removeIntoS(String *input); - std::vector tokenize(const String& str,const String& delimiters); - void get_canvas_name(String _filepath); - String new_guid(); -}; -// END of Svg_parser class - -/* === E X T E R N S ======================================================= */ - -extern Canvas::Handle open_svg(std::string _filepath,String &errors, String &warnings); - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_svg/unmod_svg.nsh b/synfig-core/trunk/src/modules/mod_svg/unmod_svg.nsh deleted file mode 100644 index 839ddba..0000000 --- a/synfig-core/trunk/src/modules/mod_svg/unmod_svg.nsh +++ /dev/null @@ -1,9 +0,0 @@ -Section "un.mod_svg" - Delete "$INSTDIR\lib\synfig\modules\mod_svg.dll" - RMDir "$INSTDIR\lib\synfig\modules" - RMDir "$INSTDIR\lib\synfig" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR" -SectionEnd - - diff --git a/synfig-core/trunk/src/modules/mod_yuv420p/Makefile.am b/synfig-core/trunk/src/modules/mod_yuv420p/Makefile.am deleted file mode 100644 index 09058a3..0000000 --- a/synfig-core/trunk/src/modules/mod_yuv420p/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -moduledir = @MODULE_DIR@ - -module_LTLIBRARIES = \ - libmod_yuv420p.la - -libmod_yuv420p_la_SOURCES = \ - main.cpp \ - trgt_yuv.cpp \ - trgt_yuv.h - -libmod_yuv420p_la_LDFLAGS = \ - -module \ - -no-undefined \ - -avoid-version - -libmod_yuv420p_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ - -libmod_yuv420p_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @SYNFIG_LIBS@ - - -EXTRA_DIST= mod_yuv420p.nsh unmod_yuv420p.nsh diff --git a/synfig-core/trunk/src/modules/mod_yuv420p/main.cpp b/synfig-core/trunk/src/modules/mod_yuv420p/main.cpp deleted file mode 100644 index 3f4bdf8..0000000 --- a/synfig-core/trunk/src/modules/mod_yuv420p/main.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mod_yuv420p/main.cpp -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "trgt_yuv.h" -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(mod_yuv420p) - MODULE_NAME("YUV420P Target") - MODULE_DESCRIPTION("writeme") - MODULE_AUTHOR("Robert B. Quattlebaum") - MODULE_VERSION("1.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(mod_yuv420p) - BEGIN_TARGETS - TARGET(yuv) - END_TARGETS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mod_yuv420p/mod_yuv420p.nsh b/synfig-core/trunk/src/modules/mod_yuv420p/mod_yuv420p.nsh deleted file mode 100644 index a7bb68b..0000000 --- a/synfig-core/trunk/src/modules/mod_yuv420p/mod_yuv420p.nsh +++ /dev/null @@ -1,21 +0,0 @@ -; The stuff to install -Section "mod_yuv420p" Sec_mod_yuv420p - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=mod_yuv420p.dll "src\modules\mod_yuv420p\.libs\libmod_yuv420p.dll" - - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "mod_yuv420p" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mod_yuv420p/trgt_yuv.cpp b/synfig-core/trunk/src/modules/mod_yuv420p/trgt_yuv.cpp deleted file mode 100644 index bad2dca..0000000 --- a/synfig-core/trunk/src/modules/mod_yuv420p/trgt_yuv.cpp +++ /dev/null @@ -1,236 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_yuv.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_TARGET - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "trgt_yuv.h" -#include -#include -#include -#include -#endif - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === M A C R O S ========================================================= */ - -#define Y_FLOOR (16) -#define Y_CEIL (235) -#define Y_RANGE (Y_CEIL-Y_FLOOR) - -#define UV_FLOOR (16) -#define UV_CEIL (240) -#define UV_RANGE (UV_CEIL-UV_FLOOR) - -/* === G L O B A L S ======================================================= */ - -SYNFIG_TARGET_INIT(yuv); -SYNFIG_TARGET_SET_NAME(yuv,"yuv420p"); -SYNFIG_TARGET_SET_EXT(yuv,"yuv"); -SYNFIG_TARGET_SET_VERSION(yuv,"0.1"); -SYNFIG_TARGET_SET_CVS_ID(yuv,"$Id$"); - -/* === M E T H O D S ======================================================= */ - -yuv::yuv(const char *FILENAME): - filename(FILENAME), - file( (filename=="-")?stdout:fopen(filename.c_str(),POPEN_BINARY_WRITE_TYPE) ), - dithering(true) -{ - // YUV420P doesn't have an alpha channel - set_remove_alpha(); -} - -yuv::~yuv() -{ -} - -bool -yuv::init() -{ - if (!file) - return false; - - fprintf(file.get(), "YUV4MPEG2 W%d H%d F%d:1 Ip\n", - desc.get_w(), desc.get_h(), - round_to_int(desc.get_frame_rate())); - return true; -} - -bool -yuv::set_rend_desc(RendDesc *given_desc) -{ - given_desc->clear_flags(); - - // Make sure our width is divisible by two - given_desc->set_w(given_desc->get_w()*2/2); - given_desc->set_h(given_desc->get_h()*2/2); - - desc=*given_desc; - - // Set up our surface - surface.set_wh(desc.get_w(),desc.get_h()); - - return true; -} - -bool -yuv::start_frame(synfig::ProgressCallback */*callback*/) -{ - fprintf(file.get(), "FRAME\n"); - return static_cast(file); -} - -Color * -yuv::start_scanline(int x) -{ - return surface[x]; -} - -bool -yuv::end_scanline() -{ - return static_cast(file); -} - -void -yuv::end_frame() -{ - const int w=desc.get_w(),h=desc.get_h(); - int x,y; - - assert(file); - - // Output Y' channel, adjusting - // the gamma as we go - for(y=0;yy+1) - { - surface[y+1][x-1]+=error * ((float)3/(float)16); - surface[y+1][x]+=error * ((float)5/(float)16); - if(surface.get_w()>x+1) - surface[y+1][x+1]+=error * ((float)1/(float)16); - } - if(surface.get_w()>x+1) - surface[y][x+1]+=error * ((float)7/(float)16); - } - - fputc(i,file.get()); - } - - - // Create new super-sampled surface - Surface sm_surface(w/2,h/2); - for(y=0;yy+1) - { - sm_surface[y+1][x-1]+=error * ((float)3/(float)16); - sm_surface[y+1][x]+=error * ((float)5/(float)16); - if(sm_surface.get_w()>x+1) - sm_surface[y+1][x+1]+=error * ((float)1/(float)16); - } - if(sm_surface.get_w()>x+1) - sm_surface[y][x+1]+=error * ((float)7/(float)16); - } - fputc(i,file.get()); - } - - // Output V channel - for(y=0;yy+1) - { - sm_surface[y+1][x-1]+=error * ((float)3/(float)16); - sm_surface[y+1][x]+=error * ((float)5/(float)16); - if(sm_surface.get_w()>x+1) - sm_surface[y+1][x+1]+=error * ((float)1/(float)16); - } - if(sm_surface.get_w()>x+1) - sm_surface[y][x+1]+=error * ((float)7/(float)16); - } - fputc(i,file.get()); - } - - // Flush out the frame - fflush(file.get()); -} diff --git a/synfig-core/trunk/src/modules/mod_yuv420p/trgt_yuv.h b/synfig-core/trunk/src/modules/mod_yuv420p/trgt_yuv.h deleted file mode 100644 index f176607..0000000 --- a/synfig-core/trunk/src/modules/mod_yuv420p/trgt_yuv.h +++ /dev/null @@ -1,71 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file trgt_yuv.h -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TRGT_PPM_H -#define __SYNFIG_TRGT_PPM_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class yuv : public synfig::Target_Scanline -{ - SYNFIG_TARGET_MODULE_EXT - -private: - - synfig::String filename; - synfig::SmartFILE file; - synfig::Surface surface; - - bool dithering; - -public: - - yuv(const char *filename); - virtual ~yuv(); - - virtual bool init(); - virtual bool set_rend_desc(synfig::RendDesc *desc); - virtual bool start_frame(synfig::ProgressCallback *cb); - virtual void end_frame(); - - virtual synfig::Color* start_scanline(int scanline); - virtual bool end_scanline(); -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/mod_yuv420p/unmod_yuv420p.nsh b/synfig-core/trunk/src/modules/mod_yuv420p/unmod_yuv420p.nsh deleted file mode 100644 index 954b275..0000000 --- a/synfig-core/trunk/src/modules/mod_yuv420p/unmod_yuv420p.nsh +++ /dev/null @@ -1,8 +0,0 @@ -Section "un.mod_yuv420p" - Delete "$INSTDIR\lib\synfig\modules\mod_yuv420p.dll" - RMDir "$INSTDIR\lib\synfig\modules" - RMDir "$INSTDIR\lib\synfig" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/modules/mptr_mplayer/Makefile.am b/synfig-core/trunk/src/modules/mptr_mplayer/Makefile.am deleted file mode 100644 index 7612078..0000000 --- a/synfig-core/trunk/src/modules/mptr_mplayer/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -moduledir = @MODULE_DIR@ - -module_LTLIBRARIES = libmptr_mplayer.la - -libmptr_mplayer_la_SOURCES = \ - main.cpp \ - mptr_mplayer.cpp \ - mptr_mplayer.h - -libmptr_mplayer_la_LDFLAGS = \ - -module \ - -no-undefined \ - -avoid-version - -libmptr_mplayer_la_LIBADD = \ - ../../synfig/libsynfig.la \ - @SYNFIG_LIBS@ - - - diff --git a/synfig-core/trunk/src/modules/mptr_mplayer/main.cpp b/synfig-core/trunk/src/modules/mptr_mplayer/main.cpp deleted file mode 100644 index 8638ae3..0000000 --- a/synfig-core/trunk/src/modules/mptr_mplayer/main.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mptr_mplayer/main.cpp -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_MODULE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "mptr_mplayer.h" -#endif - -/* === E N T R Y P O I N T ================================================= */ - -MODULE_DESC_BEGIN(mptr_mplayer) - MODULE_NAME("MPlayer Movie Importer") - MODULE_DESCRIPTION("ARGH") - MODULE_AUTHOR("Robert B. Quattlebaum") - MODULE_VERSION("1.0") - MODULE_COPYRIGHT(SYNFIG_COPYRIGHT) -MODULE_DESC_END - -MODULE_INVENTORY_BEGIN(mptr_mplayer) - BEGIN_IMPORTERS - IMPORTER_EXT(mplayer_mptr,"avi") - IMPORTER_EXT(mplayer_mptr,"mpg") - IMPORTER_EXT(mplayer_mptr,"mpeg") - IMPORTER_EXT(mplayer_mptr,"mov") - IMPORTER_EXT(mplayer_mptr,"rm") - END_IMPORTERS -MODULE_INVENTORY_END diff --git a/synfig-core/trunk/src/modules/mptr_mplayer/mptr_mplayer.cpp b/synfig-core/trunk/src/modules/mptr_mplayer/mptr_mplayer.cpp deleted file mode 100644 index 9e3d547..0000000 --- a/synfig-core/trunk/src/modules/mptr_mplayer/mptr_mplayer.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mptr_mplayer.cpp -** \brief ppm Target Module -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include "mptr_mplayer.h" -#include -#include -#include -#include -#include -#endif - -/* === M A C R O S ========================================================= */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -const char mplayer_mptr::Name[]="avi"; -const char mplayer_mptr::Ext[]="avi"; - -/* === M E T H O D S ======================================================= */ - -Importer * -mplayer_mptr::New(const char *file) -{ - return new mplayer_mptr(file); -} - -mplayer_mptr::mplayer_mptr(const char *file) -{ - filename=file; -} - -mplayer_mptr::~mplayer_mptr() -{ -} - -bool -mplayer_mptr::GetFrame(Time time, synfig::Surface &surface, synfig::ProgressCallback *) -{ - -#error This code has vulnerabilites: arbitrary shell command execution and tmpfile issues - - int ret; - ret=system( - strprintf("/usr/local/bin/mencoder \"%s\" -ovc rawrgb -ss %f -endpos 0 -nosound -o /tmp/tmp.synfig.rgbdata | grep \"VIDEO\" > /tmp/tmp.synfig.size", - filename.c_str(), - time - ).c_str() - ); - /* - if(ret!=0) - { - cerr<<"mencoder execution failed."< -#include -#include "string.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class mplayer_mptr : public synfig::Importer -{ -public: -private: - String filename; - -public: - mplayer_mptr(const char *filename); - ~mplayer_mptr(); - - - static const char Name[]; - static const char Ext[]; - - virtual bool GetFrame(synfig::Time time, synfig::Surface &, synfig::ProgressCallback *); - - static synfig::Importer *New(const char *filename); -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/modules/synfig_modules.cfg.in b/synfig-core/trunk/src/modules/synfig_modules.cfg.in deleted file mode 100644 index 899e295..0000000 --- a/synfig-core/trunk/src/modules/synfig_modules.cfg.in +++ /dev/null @@ -1,18 +0,0 @@ -example -mod_gif -mod_imagemagick -mod_magickpp -mod_mng -lyr_std -mod_noise -mod_filter -mod_ffmpeg -mod_bmp -mod_dv -mod_png -mod_ppm -mod_openexr -mod_jpeg -mod_libavcodec -mod_yuv420p -mod_svg diff --git a/synfig-core/trunk/src/modules/template.nsh b/synfig-core/trunk/src/modules/template.nsh deleted file mode 100644 index d702aa5..0000000 --- a/synfig-core/trunk/src/modules/template.nsh +++ /dev/null @@ -1,21 +0,0 @@ -; The stuff to install -Section "@MODNAME@" Sec_@MODNAME@ - -; SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\lib\synfig\modules" - - ; Put file there - File /oname=@MODNAME@.dll "src\modules\@MODNAME@\.libs\lib@MODNAME@.dll" - - - FileOpen $0 $INSTDIR\etc\synfig_modules.cfg a - FileSeek $0 0 END - FileWrite $0 "@MODNAME@" - FileWriteByte $0 "13" - FileWriteByte $0 "10" - FileClose $0 - -SectionEnd - diff --git a/synfig-core/trunk/src/modules/untemplate.nsh b/synfig-core/trunk/src/modules/untemplate.nsh deleted file mode 100644 index 7736e30..0000000 --- a/synfig-core/trunk/src/modules/untemplate.nsh +++ /dev/null @@ -1,8 +0,0 @@ -Section "un.@MODNAME@" - Delete "$INSTDIR\lib\synfig\modules\@MODNAME@.dll" - RMDir "$INSTDIR\lib\synfig\modules" - RMDir "$INSTDIR\lib\synfig" - RMDir "$INSTDIR\lib" - RMDir "$INSTDIR" -SectionEnd - diff --git a/synfig-core/trunk/src/synfig/Makefile.am b/synfig-core/trunk/src/synfig/Makefile.am deleted file mode 100644 index 4ed8b13..0000000 --- a/synfig-core/trunk/src/synfig/Makefile.am +++ /dev/null @@ -1,312 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src \ - @INCLTDL@ - -EXTRA_DIST = \ - surfacenew.cpp \ - pch.h \ - synfig.nsh - - -LAYERHEADERS = \ - layer_bitmap.h \ - layer_composite.h \ - layer_duplicate.h \ - layer_mime.h \ - layer_motionblur.h \ - layer_pastecanvas.h \ - layer_polygon.h \ - layer_shape.h \ - layer_solidcolor.h - -LAYERSOURCES = \ - layer_bitmap.cpp \ - layer_composite.cpp \ - layer_duplicate.cpp \ - layer_mime.cpp \ - layer_motionblur.cpp \ - layer_pastecanvas.cpp \ - layer_polygon.cpp \ - layer_shape.cpp \ - layer_solidcolor.cpp - - -TARGETHEADERS = \ - target_multi.h \ - target_null.h \ - target_null_tile.h \ - target_scanline.h \ - target_tile.h - -TARGETSOURCES = \ - target_multi.cpp \ - target_null.cpp \ - target_null_tile.cpp \ - target_scanline.cpp \ - target_tile.cpp - - -IMPORTERHEADERS = \ - listimporter.h - -IMPORTERSOURCES = \ - listimporter.cpp - - -VALUENODEHEADERS = \ - valuenode_add.h \ - valuenode_and.h \ - valuenode_anglestring.h \ - valuenode_animated.h \ - valuenode_atan2.h \ - valuenode_bline.h \ - valuenode_blinecalctangent.h \ - valuenode_blinecalcvertex.h \ - valuenode_blinecalcwidth.h \ - valuenode_blinereversetangent.h \ - valuenode_compare.h \ - valuenode_composite.h \ - valuenode_const.h \ - valuenode_cos.h \ - valuenode_dotproduct.h \ - valuenode_duplicate.h \ - valuenode_dynamiclist.h \ - valuenode_exp.h \ - valuenode_gradientcolor.h \ - valuenode_gradientrotate.h \ - valuenode_greyed.h \ - valuenode_integer.h \ - valuenode_intstring.h \ - valuenode_join.h \ - valuenode_linear.h \ - valuenode_log.h \ - valuenode_not.h \ - valuenode_or.h \ - valuenode_pow.h \ - valuenode_radialcomposite.h \ - valuenode_range.h \ - valuenode_realstring.h \ - valuenode_reciprocal.h \ - valuenode_reference.h \ - valuenode_repeat_gradient.h \ - valuenode_scale.h \ - valuenode_segcalctangent.h \ - valuenode_segcalcvertex.h \ - valuenode_sine.h \ - valuenode_step.h \ - valuenode_stripes.h \ - valuenode_subtract.h \ - valuenode_switch.h \ - valuenode_timedswap.h \ - valuenode_timeloop.h \ - valuenode_timestring.h \ - valuenode_twotone.h \ - valuenode_vectorangle.h \ - valuenode_vectorlength.h \ - valuenode_vectorx.h \ - valuenode_vectory.h - -VALUENODESOURCES = \ - valuenode_add.cpp \ - valuenode_and.cpp \ - valuenode_anglestring.cpp \ - valuenode_animated.cpp \ - valuenode_atan2.cpp \ - valuenode_bline.cpp \ - valuenode_blinecalctangent.cpp \ - valuenode_blinecalcvertex.cpp \ - valuenode_blinecalcwidth.cpp \ - valuenode_blinereversetangent.cpp \ - valuenode_compare.cpp \ - valuenode_composite.cpp \ - valuenode_const.cpp \ - valuenode_cos.cpp \ - valuenode_dotproduct.cpp \ - valuenode_duplicate.cpp \ - valuenode_dynamiclist.cpp \ - valuenode_exp.cpp \ - valuenode_gradientcolor.cpp \ - valuenode_gradientrotate.cpp \ - valuenode_greyed.cpp \ - valuenode_integer.cpp \ - valuenode_intstring.cpp \ - valuenode_join.cpp \ - valuenode_linear.cpp \ - valuenode_log.cpp \ - valuenode_not.cpp \ - valuenode_or.cpp \ - valuenode_pow.cpp \ - valuenode_radialcomposite.cpp \ - valuenode_range.cpp \ - valuenode_realstring.cpp \ - valuenode_reciprocal.cpp \ - valuenode_reference.cpp \ - valuenode_repeat_gradient.cpp \ - valuenode_scale.cpp \ - valuenode_segcalctangent.cpp \ - valuenode_segcalcvertex.cpp \ - valuenode_sine.cpp \ - valuenode_step.cpp \ - valuenode_stripes.cpp \ - valuenode_subtract.cpp \ - valuenode_switch.cpp \ - valuenode_timedswap.cpp \ - valuenode_timeloop.cpp \ - valuenode_timestring.cpp \ - valuenode_twotone.cpp \ - valuenode_vectorangle.cpp \ - valuenode_vectorlength.cpp \ - valuenode_vectorx.cpp \ - valuenode_vectory.cpp - - -VALUEHEADERS = \ - blinepoint.h \ - gradient.h \ - value.h - -VALUESOURCES = \ - blinepoint.cpp \ - gradient.cpp \ - value.cpp - - -SYNFIGHEADERS = \ - angle.h \ - canvasbase.h \ - general.h \ - guidset.h \ - interpolation.h \ - nodebase.h \ - protocol.h \ - quick_rng.h \ - real.h \ - releases.h \ - segment.h \ - smartfile.h \ - string.h \ - string_decl.h \ - surfacenew.h \ - synfig.h \ - types.h \ - vector.h \ - version.h \ - activepoint.h \ - blur.h \ - canvas.h \ - color.h \ - context.h \ - curve_helper.h \ - curveset.h \ - distance.h \ - exception.h \ - gamma.h \ - guid.h \ - importer.h \ - keyframe.h \ - layer.h \ - loadcanvas.h \ - main.h \ - module.h \ - mutex.h \ - node.h \ - palette.h \ - paramdesc.h \ - polynomial_root.h \ - rect.h \ - renddesc.h \ - render.h \ - savecanvas.h \ - surface.h \ - target.h \ - time.h \ - timepointcollect.h \ - transform.h \ - uniqueid.h \ - valuenode.h \ - waypoint.h - -SYNFIGSOURCES = \ - activepoint.cpp \ - blur.cpp \ - canvas.cpp \ - color.cpp \ - context.cpp \ - curve_helper.cpp \ - curveset.cpp \ - distance.cpp \ - exception.cpp \ - gamma.cpp \ - guid.cpp \ - importer.cpp \ - keyframe.cpp \ - layer.cpp \ - loadcanvas.cpp \ - main.cpp \ - module.cpp \ - mutex.cpp \ - node.cpp \ - palette.cpp \ - paramdesc.cpp \ - polynomial_root.cpp \ - rect.cpp \ - renddesc.cpp \ - render.cpp \ - savecanvas.cpp \ - surface.cpp \ - target.cpp \ - time.cpp \ - timepointcollect.cpp \ - transform.cpp \ - uniqueid.cpp \ - valuenode.cpp \ - waypoint.cpp - - -lib_LTLIBRARIES = libsynfig.la - -libsynfig_la_SOURCES = \ - $(VALUEHEADERS) \ - $(VALUESOURCES) \ - $(LAYERSOURCES) \ - $(LAYERHEADERS) \ - $(TARGETHEADERS) \ - $(TARGETSOURCES) \ - $(VALUENODEHEADERS) \ - $(VALUENODESOURCES) \ - $(SYNFIGHEADERS) \ - $(SYNFIGSOURCES) \ - $(IMPORTERHEADERS) \ - $(IMPORTERSOURCES) - -libsynfig_la_LIBADD = \ - @LIBLTDL@ \ - @SYNFIG_LIBS@ \ - @LIBADD_DL@ - -libsynfig_la_CXXFLAGS = \ - @SYNFIG_CFLAGS@ \ - -DLIBDIR="\"@libdir@\"" \ - -DSYSCONFDIR="\"@sysconfdir@\"" - -libsynfig_la_LDFLAGS = \ - -export-dynamic \ - -no-undefined \ - -version-info 0:0:0 - - -include_synfigdir = @synfigincludedir@/synfig - -include_synfig_HEADERS = \ - $(SYNFIGHEADERS) \ - $(LAYERHEADERS) \ - $(TARGETHEADERS) \ - $(VALUENODEHEADERS) \ - $(IMPORTERHEADERS) \ - $(VALUEHEADERS) diff --git a/synfig-core/trunk/src/synfig/activepoint.cpp b/synfig-core/trunk/src/synfig/activepoint.cpp deleted file mode 100644 index 13bb6ba..0000000 --- a/synfig-core/trunk/src/synfig/activepoint.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file activepoint.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "activepoint.h" -#include "guid.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -synfig::GUID -Activepoint::get_guid()const -{ - return GUID::hasher(get_uid()); -} diff --git a/synfig-core/trunk/src/synfig/activepoint.h b/synfig-core/trunk/src/synfig/activepoint.h deleted file mode 100644 index 74e2edc..0000000 --- a/synfig-core/trunk/src/synfig/activepoint.h +++ /dev/null @@ -1,91 +0,0 @@ -#include -/* === S Y N F I G ========================================================= */ -/*! \file activepoint.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_ACTIVEPOINT_H -#define __SYNFIG_ACTIVEPOINT_H - -/* === H E A D E R S ======================================================= */ - -#include "time.h" -#include "uniqueid.h" -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { -class GUID; -class ValueNode; - -struct Activepoint : public UniqueID -{ -private: - etl::loose_handle parent_; - int index; - -public: - //! Time of the activepoint - Time time; - - //! Priority - int priority; - - //! Does this activepoint turn the entry on, or off? - bool state; - - bool operator<(const Activepoint& rhs) { return time &get_parent_value_node()const { return parent_; } - void set_parent_value_node(const etl::loose_handle &x) { parent_=x; } - - int get_parent_index()const { return index; } - void set_parent_index(int x) { index=x; } - - GUID get_guid()const; -}; // END of struct ValueNode_BLine::Activepoint - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/angle.h b/synfig-core/trunk/src/synfig/angle.h deleted file mode 100644 index d351766..0000000 --- a/synfig-core/trunk/src/synfig/angle.h +++ /dev/null @@ -1,49 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file angle.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_ANGLE_H -#define __SYNFIG_ANGLE_H - -/* === H E A D E R S ======================================================= */ - -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/*! \typedef Angle -** \todo writeme -*/ -typedef etl::angle Angle; - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/blinepoint.cpp b/synfig-core/trunk/src/synfig/blinepoint.cpp deleted file mode 100644 index 4291bbf..0000000 --- a/synfig-core/trunk/src/synfig/blinepoint.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file blinepoint.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "blinepoint.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -void -synfig::BLinePoint::reverse() -{ - if(split_tangent_) - { - std::swap(tangent_[0],tangent_[1]); - tangent_[0]=-tangent_[0]; - tangent_[1]=-tangent_[1]; - } - else - { - tangent_[0]=-tangent_[0]; - tangent_[1]=-tangent_[1]; - } -} diff --git a/synfig-core/trunk/src/synfig/blinepoint.h b/synfig-core/trunk/src/synfig/blinepoint.h deleted file mode 100644 index 3a75d4b..0000000 --- a/synfig-core/trunk/src/synfig/blinepoint.h +++ /dev/null @@ -1,92 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file blinepoint.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_BLINEPOINT_H -#define __SYNFIG_BLINEPOINT_H - -/* === H E A D E R S ======================================================= */ - -#include "vector.h" -#include "uniqueid.h" -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class BLinePoint : public UniqueID -{ -private: - Point vertex_; - Vector tangent_[2]; - float width_; - float origin_; - bool split_tangent_; - -public: - - BLinePoint(): - vertex_(Point(0,0)), - width_(0.01), - origin_(0.0), - split_tangent_(false) - { tangent_[0] = Point(0,0); tangent_[1] = Point(0,0); } - - const Point& get_vertex()const { return vertex_; } - void set_vertex(const Point& x) { vertex_=x; } - - - const Vector& get_tangent1()const { return tangent_[0]; } - const Vector& get_tangent2()const { return split_tangent_?tangent_[1]:tangent_[0]; } - void set_tangent(const Vector& x) { tangent_[0]=tangent_[1]=x; } - void set_tangent1(const Vector& x) { tangent_[0]=x; } - void set_tangent2(const Vector& x) { tangent_[1]=x; } - - - const float& get_width()const { return width_; } - void set_width(float x) { width_=x; } - - // We store the origin offset by 0.5 so that - // can have the origin set to the default by zeroing - // out the structure. - float get_origin()const { return origin_+0.5f; } - void set_origin(float x) { origin_=x-0.5f; } - - - const bool& get_split_tangent_flag()const { return split_tangent_; } - void set_split_tangent_flag(bool x=true) { split_tangent_=x; } - - void reverse(); - -}; // END of class BLinePoint - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/blur.cpp b/synfig-core/trunk/src/synfig/blur.cpp deleted file mode 100644 index 392ef71..0000000 --- a/synfig-core/trunk/src/synfig/blur.cpp +++ /dev/null @@ -1,1204 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file synfig/blur.cpp -** \brief Blur Implementation File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include - -#include "blur.h" - -#include -#include - -#include -#include -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ -Point Blur::operator()(const Point &pos) const -{ - Point blurpos(pos); - - switch(type) - { - case CROSS: - if(rand()%2) - { - if(size[0]) - blurpos[0]+=(Vector::value_type)( (signed)(RAND_MAX/2)-(signed)rand() )/(Vector::value_type)(RAND_MAX) * size[0]; - } - else - { - if(size[1]) - blurpos[1]+=(Vector::value_type)( (signed)(RAND_MAX/2)-(signed)rand() )/(Vector::value_type)(RAND_MAX) * size[1]; - } - break; - - case DISC: - { - Angle theta=Angle::rotations((float)rand()/(float)RAND_MAX); - Vector::value_type mag=(float)rand()/(float)RAND_MAX; - Vector vect((float)Angle::cos(theta).get()*mag,(float)Angle::sin(theta).get()*mag); - - blurpos[0]+=vect[0]*size[0]; - blurpos[1]+=vect[1]*size[1]; - } - break; - - case FASTGAUSSIAN: - case GAUSSIAN: - // Not quite a true gaussian blur, - // but the results are close enough for me. - if(size[0]) - { - blurpos[0]+=(Vector::value_type)( (signed)(RAND_MAX/2)-(signed)rand() )/(Vector::value_type)(RAND_MAX) * size[0]*3/4; - blurpos[0]+=(Vector::value_type)( (signed)(RAND_MAX/2)-(signed)rand() )/(Vector::value_type)(RAND_MAX) * size[0]*3/4; - } - if(size[1]) - { - blurpos[1]+=(Vector::value_type)( (signed)(RAND_MAX/2)-(signed)rand() )/(Vector::value_type)(RAND_MAX) * size[1]*3/4; - blurpos[1]+=(Vector::value_type)( (signed)(RAND_MAX/2)-(signed)rand() )/(Vector::value_type)(RAND_MAX) * size[1]*3/4; - } - break; - - case BOX: - default: - if(size[0]) - blurpos[0]+=(Vector::value_type)( (signed)(RAND_MAX/2)-(signed)rand() )/(Vector::value_type)(RAND_MAX) * size[0]; - if(size[1]) - blurpos[1]+=(Vector::value_type)( (signed)(RAND_MAX/2)-(signed)rand() )/(Vector::value_type)(RAND_MAX) * size[1]; - break; - } - - return blurpos; -} - -Point Blur::operator()(synfig::Real x, synfig::Real y) const -{ - return (*this)(Point(x,y)); -} - -//blur functions to make my life easier - -template -static inline T zero() -{ - return (T)0; -} - -template <> -inline Color zero() -{ - return Color::alpha(); -} - -template -static void GuassianBlur_2x2(etl::surface &surface) -{ - int x,y; - T Tmp1,Tmp2,SR0; - - T *SC0=new T[surface.get_w()]; - - memcpy(SC0,surface[0],surface.get_w()*sizeof(T)); - - for(y=0;y -static void GuassianBlur_3x3(etl::surface &surface) -{ - int x,y,u,v,w,h; - T Tmp1,Tmp2,SR0,SR1; - - w=surface.get_w(); - h=surface.get_h(); - - T *SC0=new T[w+1]; - T *SC1=new T[w+1]; - - // Setup the row buffers - for(x=0;x=h) - v=h-1; - else - v=y; - - SR0=SR1=surface[y][0]; - for(x=0;x<=w;x++) - { - if(x>=w) - u=w-1; - else - u=x; - - // Row Machine - Tmp1=surface[v][u]; - Tmp2=SR0+Tmp1; - SR0=Tmp1; - Tmp1=SR1+Tmp2; - SR1=Tmp2; - - // Column Machine - Tmp2=SC0[x]+Tmp1; - SC0[x]=Tmp1; - if(y&&x) - surface[y-1][x-1]=(SC1[x]+Tmp2)/16; - SC1[x]=Tmp2; - } - } - - delete [] SC0; - delete [] SC1; -} - -template -inline static void GaussianBlur_5x5_(etl::surface &surface,T *SC0,T *SC1,T *SC2,T *SC3) -{ - int x,y,u,v,w,h; - T Tmp1,Tmp2,SR0,SR1,SR2,SR3; - - w=surface.get_w(); - h=surface.get_h(); - - // Setup the row buffers - for(x=0;x=h) - v=h-1; - else - v=y; - - SR0=SR1=SR2=SR3=0; - SR0=surface[v][0]*1.5; - for(x=0;x=w) - u=w-1; - else - u=x; - - // Row Machine - Tmp1=surface[v][u]; - Tmp2=SR0+Tmp1; - SR0=Tmp1; - Tmp1=SR1+Tmp2; - SR1=Tmp2; - Tmp2=SR2+Tmp1; - SR2=Tmp1; - Tmp1=SR3+Tmp2; - SR3=Tmp2; - - // Column Machine - Tmp2=SC0[x]+Tmp1; - SC0[x]=Tmp1; - Tmp1=SC1[x]+Tmp2; - SC1[x]=Tmp2; - Tmp2=SC2[x]+Tmp1; - SC2[x]=Tmp1; - if(y>1&&x>1) - surface[y-2][x-2]=(SC3[x]+Tmp2)/256; - SC3[x]=Tmp2; - } - } - -} - -template -inline static void GaussianBlur_5x5(etl::surface &surface) -{ - int w=surface.get_w(); - - T *SC0=new T[w+2]; - T *SC1=new T[w+2]; - T *SC2=new T[w+2]; - T *SC3=new T[w+2]; - - GaussianBlur_5x5_(surface,SC0,SC1,SC2,SC3); - - delete [] SC0; - delete [] SC1; - delete [] SC2; - delete [] SC3; -} - -template -static void GuassianBlur_nxn(etl::surface &surface,int n) -{ - int x,y,u,v,w,h; - int half_n=n/2,i; - T inv_divisor=pow(2.0,(n-1)); - T Tmp1,Tmp2; - inv_divisor=1.0/(inv_divisor*inv_divisor); - - w=surface.get_w(); - h=surface.get_h(); - - T SR[n-1]; - T *SC[n-1]; - - for(i=0;i=h) - v=h-1; - else - v=y; - - memset(SR,0,(n-1)*sizeof(T)); - -// SR[0]=surface[v][0]*(2.0-1.9/n); - - for(x=0;x=w) - u=w-1; - else - u=x; - - Tmp1=surface[v][u]; - // Row Machine - for(i=0;i=half_n&&x>=half_n) - surface[y-half_n][x-half_n]=(SC[n-2][x]+Tmp2)*inv_divisor; - SC[n-2][x]=Tmp2; - } - } - - for(i=0;i -static void GuassianBlur_2x1(etl::surface &surface) -{ - int x,y; - AT Tmp1,Tmp2,SR0; - - for(y=0;y -static void GuassianBlur_3x1(etl::surface &surface) -{ - int x,y; - AT Tmp1,Tmp2,SR0,SR1; - - for(y=0;y -static void GuassianBlur_1x2(etl::surface &surface) -{ - int x,y; - AT Tmp1,Tmp2,SR0; - - for(x=0;x(); - for(y=0;y -static void GuassianBlur_1x3(etl::surface &surface) -{ - int x,y; - AT Tmp1,Tmp2,SR0,SR1; - - for(x=0;x2) - { - int x2,y2; - Surface tmp_surface(worksurface); - - for(y=0;y1.0) - continue; - - //cap the pixel indices to inside the surface - int u= x+x2, - v= y+y2; - - if( u < 0 ) u = 0; - if( u >= w ) u = w-1; - - if( v < 0 ) v = 0; - if( v >= h ) v = h-1; - - //accumulate the color, and # of pixels added in - color += tmp_surface[v][u]; - total++; - } - } - - //blend the color with the original color - //if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - worksurface[y][x]=color/total; - //else - // worksurface[y][x]=Color::blend(color/total,tmp_surface[y][x],get_amount(),get_blend_method()); - } - if(!blurcall.amount_complete(y,h)) - { - //if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); - return false; - } - } - break; - } - - //if we don't qualify for disc blur just use box blur - } - - case Blur::BOX: // B O X ------------------------------------------------------- - { - //horizontal part - //synfig::info("Blur: Starting Box blur (surface valid %d)", (int)surface_valid(worksurface)); - - Surface temp_surface; - temp_surface.set_wh(w,h); - - if(size[0]) - { - int length = halfsizex; - length=std::max(1,length); - - //synfig::info("Blur: hbox blur work -> temp %d", length); - etl::hbox_blur(worksurface.begin(),worksurface.end(),length,temp_surface.begin()); - } - else temp_surface = worksurface; - //synfig::info("Blur: hbox finished"); - - //vertical part - //Surface temp_surface2; - //temp_surface2.set_wh(w,h); - - if(size[1]) - { - int length = halfsizey; - length = std::max(1,length); - - //synfig::info("Blur: vbox blur temp -> work %d",length); - etl::vbox_blur(temp_surface.begin(),temp_surface.end(),length,worksurface.begin()); - } - else worksurface = temp_surface; - //synfig::info("Blur: vbox finished"); - - //blend with the original surface - /*int x,y; - for(y=0;y=4 && bh>=4) - { - etl::gaussian_blur_5x5_(gauss_surface->begin(),gauss_surface->get_w(),gauss_surface->get_h(),SC0,SC1,SC2,SC3); - bw-=4,bh-=4; - } - else - if(bw>=2 && bh>=2) - { - etl::gaussian_blur_3x3(gauss_surface->begin(),gauss_surface->end()); - bw-=2,bh-=2; - } - else - if(bw>=1 && bh>=1) - { - GuassianBlur_2x2(*gauss_surface); - bw--,bh--; - } - - //synfig::warning("Didn't crash yet bi - %d",i++); - } - while(bw) - { - if(!blurcall.amount_complete(max-(bw+bh),max))return false; - if(bw>=2) - { - GuassianBlur_3x1(*gauss_surface); - bw-=2; - } - else - if(bw>=1) - { - GuassianBlur_2x1(*gauss_surface); - bw--; - } - //synfig::warning("Didn't crash yet bi - %d",i++); - } - while(bh) - { - if(!blurcall.amount_complete(max-(bw+bh),max))return false; - if(bh>=2) - { - GuassianBlur_1x3(*gauss_surface); - bh-=2; - } - else - if(bh>=1) - { - GuassianBlur_1x2(*gauss_surface); - bh--; - } - //synfig::warning("Didn't crash yet bi - %d",i++); - } - - delete [] SC0; - delete [] SC1; - delete [] SC2; - delete [] SC3; - - /*if(get_amount()!=1.0 || get_blend_method()!=Color::BLEND_STRAIGHT) - { - int x,y; - for(y=0;yset_wh(renddesc.get_w(),renddesc.get_h()); - out.set_wh(w,h); - - //divide out the alpha - for(y=0;y &surface, - const synfig::Vector &resolution, - etl::surface &out) const -{ - int w = surface.get_w(), - h = surface.get_h(); - - if(w == 0 || h == 0 || resolution[0] == 0 || resolution[1] == 0) return false; - - const Real pw = resolution[0]/w, - ph = resolution[1]/h; - - int halfsizex = (int) (abs(size[0]*.5/pw) + 1), - halfsizey = (int) (abs(size[1]*.5/ph) + 1); - int x,y; - - SuperCallback blurcall(cb,0,5000,5000); - - etl::surface worksurface(surface); - - //don't need to premultiply because we are dealing with ONLY alpha - - switch(type) - { - case Blur::DISC: // D I S C ---------------------------------------------------------- - { - int bw = halfsizex; - int bh = halfsizey; - - if(size[0] && size[1] && w*h>2) - { - int x2,y2; - etl::surface tmp_surface(worksurface); - - for(y=0;y1.0) - continue; - - //cap the pixel indices to inside the surface - int u= x+x2, - v= y+y2; - - if( u < 0 ) u = 0; - if( u >= w ) u = w-1; - - if( v < 0 ) v = 0; - if( v >= h ) v = h-1; - - //accumulate the color, and # of pixels added in - a += tmp_surface[v][u]; - total++; - } - } - - //blend the color with the original color - //if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - worksurface[y][x]=a/total; - //else - // worksurface[y][x]=Color::blend(color/total,tmp_surface[y][x],get_amount(),get_blend_method()); - } - if(!blurcall.amount_complete(y,h)) - { - //if(cb)cb->error(strprintf(__FILE__"%d: Accelerated Renderer Failure",__LINE__)); - return false; - } - } - break; - } - - //if we don't qualify for disc blur just use box blur - } - - case Blur::BOX: // B O X ------------------------------------------------------- - { - //horizontal part - etl::surface temp_surface; - temp_surface.set_wh(w,h); - - if(size[0]) - { - int length = halfsizex; - length=std::max(1,length); - - etl::hbox_blur(worksurface.begin(),worksurface.end(),length,temp_surface.begin()); - } - else temp_surface = worksurface; - - //vertical part - //etl::surface temp_surface2; - //temp_surface2.set_wh(w,h); - - if(size[1]) - { - int length = halfsizey; - length = std::max(1,length); - etl::vbox_blur(temp_surface.begin(),temp_surface.end(),length,worksurface.begin()); - } - else worksurface = temp_surface; - - //blend with the original surface - /*int x,y; - for(y=0;y temp_surface; - temp_surface.set_wh(w,h); - - //etl::surface temp_surface2; - //temp_surface2.set_wh(w,h); - - //horizontal part - if(size[0]) - { - Real length=abs((float)w/(resolution[0]))*size[0]*0.5+1; - length=std::max(1.0,length); - - //two box blurs produces: 1 2 1 - etl::hbox_blur(worksurface.begin(),w,h,(int)(length*3/4),temp_surface.begin()); - etl::hbox_blur(temp_surface.begin(),w,h,(int)(length*3/4),worksurface.begin()); - } - //else temp_surface2=worksurface; - - //vertical part - if(size[1]) - { - Real length=abs((float)h/(resolution[1]))*size[1]*0.5+1; - length=std::max(1.0,length); - - //two box blurs produces: 1 2 1 on the horizontal 1 2 1 - etl::vbox_blur(worksurface.begin(),w,h,(int)(length*3/4),temp_surface.begin()); - etl::vbox_blur(temp_surface.begin(),w,h,(int)(length*3/4),worksurface.begin()); - } - //else temp_surface2=temp_surface2; - - /*int x,y; - for(y=0;y temp_surface; - temp_surface.set_wh(worksurface.get_w(),worksurface.get_h()); - - if(size[0]) - { - int length = halfsizex; - length = std::max(1,length); - - etl::hbox_blur(worksurface.begin(),worksurface.end(),length,temp_surface.begin()); - } - else temp_surface = worksurface; - - //vertical part - etl::surface temp_surface2; - temp_surface2.set_wh(worksurface.get_w(),worksurface.get_h()); - - if(size[1]) - { - int length = halfsizey; - length = std::max(1,length); - - etl::vbox_blur(worksurface.begin(),worksurface.end(),length,temp_surface2.begin()); - } - else temp_surface2 = worksurface; - - //blend the two together - int x,y; - - for(y=0;y temp_surface; - etl::surface *gauss_surface; - - //if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - gauss_surface = &worksurface; - /*else - { - temp_surface = worksurface; - gauss_surface = &temp_surface; - }*/ - - /* Squaring the pw and ph values - is necessary to insure consistent - results when rendered to different - resolutions. - Unfortunately, this automatically - squares our rendertime. - There has got to be a faster way... - */ - pw=pw*pw; - ph=ph*ph; - - int bw = (int)(abs(pw)*size[0]*GAUSSIAN_ADJUSTMENT+0.5); - int bh = (int)(abs(ph)*size[1]*GAUSSIAN_ADJUSTMENT+0.5); - int max=bw+bh; - - float *SC0=new float[w+2]; - float *SC1=new float[w+2]; - float *SC2=new float[w+2]; - float *SC3=new float[w+2]; - - memset(SC0,0,(w+2)*sizeof(float)); - memset(SC0,0,(w+2)*sizeof(float)); - memset(SC0,0,(w+2)*sizeof(float)); - memset(SC0,0,(w+2)*sizeof(float)); - - //int i = 0; - - while(bw&&bh) - { - if(!blurcall.amount_complete(max-(bw+bh),max))return false; - - if(bw>=4 && bh>=4) - { - etl::gaussian_blur_5x5_(gauss_surface->begin(),gauss_surface->get_w(),gauss_surface->get_h(),SC0,SC1,SC2,SC3); - bw-=4,bh-=4; - } - else - if(bw>=2 && bh>=2) - { - etl::gaussian_blur_3x3(gauss_surface->begin(),gauss_surface->end()); - bw-=2,bh-=2; - } - else - if(bw>=1 && bh>=1) - { - GuassianBlur_2x2(*gauss_surface); - bw--,bh--; - } - } - - while(bw) - { - if(!blurcall.amount_complete(max-(bw+bh),max))return false; - if(bw>=2) - { - GuassianBlur_3x1(*gauss_surface); - bw-=2; - } - else - if(bw>=1) - { - GuassianBlur_2x1(*gauss_surface); - bw--; - } - } - - while(bh) - { - if(!blurcall.amount_complete(max-(bw+bh),max))return false; - if(bh>=2) - { - GuassianBlur_1x3(*gauss_surface); - bh-=2; - } - else - if(bh>=1) - { - GuassianBlur_1x2(*gauss_surface); - bh--; - } - } - - delete [] SC0; - delete [] SC1; - delete [] SC2; - delete [] SC3; - - /*if(get_amount()!=1.0 || get_blend_method()!=Color::BLEND_STRAIGHT) - { - int x,y; - for(y=0;yset_wh(renddesc.get_w(),renddesc.get_h()); - out.set_wh(w,h); - - //divide out the alpha - don't need to cause we rock - out = worksurface; - - //we are FRIGGGIN done.... - blurcall.amount_complete(100,100); - - return true; -} - -/* === E N T R Y P O I N T ================================================= */ diff --git a/synfig-core/trunk/src/synfig/blur.h b/synfig-core/trunk/src/synfig/blur.h deleted file mode 100644 index 5d1c801..0000000 --- a/synfig-core/trunk/src/synfig/blur.h +++ /dev/null @@ -1,90 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file synfig/blur.h -** \brief Blur Helper Header file -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_BLUR_HELPER_H -#define __SYNFIG_BLUR_HELPER_H - -/* === H E A D E R S ======================================================= */ -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ -namespace synfig { - class ProgressCallback; -} - -class Blur -{ -public: - enum Type - { - BOX =0, - FASTGAUSSIAN =1, - CROSS =2, - GAUSSIAN =3, - DISC =4, - - FORCE_DWORD = 0x8fffffff - }; - -private: - synfig::Point size; - int type; - - synfig::ProgressCallback *cb; - -public: - synfig::Point & set_size(const synfig::Point &v) { return (size = v); } - const synfig::Point & get_size() const { return size; } - synfig::Point & get_size() { return size; } - - int & set_type(const int &t) { return (type = t); } - const int & get_type() const { return type; } - int & get_type() { return type; } - - Blur() {} - Blur(const synfig::Point &s, int t, synfig::ProgressCallback *callb=0):size(s), type(t), cb(callb) {} - Blur(synfig::Real sx, synfig::Real sy, int t, synfig::ProgressCallback *callb = 0): size(sx,sy), type(t), cb(callb) {} - - //Parametric Blur - synfig::Point operator()(const synfig::Point &p) const; - synfig::Point operator()(synfig::Real x, synfig::Real y) const; - - //Surface based blur - // input surface can be the same as output surface, - // though both have to be the same size - bool operator()(const synfig::Surface &surface, const synfig::Vector &resolution, synfig::Surface &out) const; - - bool operator()(const etl::surface &surface, const synfig::Vector &resolution, etl::surface &out) const; - //bool operator()(const etl::surface &surface, const synfig::Vector &resolution, etl::surface &out) const; -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/canvas.cpp b/synfig-core/trunk/src/synfig/canvas.cpp deleted file mode 100644 index 2bbb743..0000000 --- a/synfig-core/trunk/src/synfig/canvas.cpp +++ /dev/null @@ -1,1408 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file canvas.cpp -** \brief Canvas Class Member Definitions -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_NO_ANGLE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "layer.h" -#include "canvas.h" -#include -#include "exception.h" -#include "time.h" -#include "context.h" -#include "layer_pastecanvas.h" -#include "loadcanvas.h" -#include - -#endif - -using namespace synfig; -using namespace etl; -using namespace std; - -namespace synfig { extern Canvas::Handle open_canvas(const String &filename, String &errors, String &warnings); }; - -/* === M A C R O S ========================================================= */ - -#define ALLOW_CLONE_NON_INLINE_CANVASES - -struct _CanvasCounter -{ - static int counter; - ~_CanvasCounter() - { - if(counter) - synfig::error("%d canvases not yet deleted!",counter); - } -} _canvas_counter; - -int _CanvasCounter::counter(0); - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -Canvas::Canvas(const String &id): - id_ (id), - version_ (CURRENT_CANVAS_VERSION), - cur_time_ (0), - is_inline_ (false), - is_dirty_ (true), - op_flag_ (false) -{ - _CanvasCounter::counter++; - clear(); -} - -void -Canvas::on_changed() -{ - is_dirty_=true; - Node::on_changed(); -} - -Canvas::~Canvas() -{ - // we were having a crash where pastecanvas layers were still - // refering to a canvas after it had been destroyed; this code - // will stop the pastecanvas layers from refering to the canvas - // before the canvas is destroyed - - // the set_sub_canvas(0) ends up deleting the parent-child link, - // which deletes the current element from the set we're iterating - // through, so we have to make sure we've incremented the iterator - // before we mess with the pastecanvas - std::set::iterator iter = parent_set.begin(); - while (iter != parent_set.end()) - { - Layer_PasteCanvas* paste_canvas = dynamic_cast(*iter); - iter++; - if(paste_canvas) - paste_canvas->set_sub_canvas(0); - else - warning("destroyed canvas has a parent that is not a pastecanvas - please report if repeatable"); - } - - //if(is_inline() && parent_) assert(0); - _CanvasCounter::counter--; - clear(); - begin_delete(); -} - -Canvas::iterator -Canvas::end() -{ - return CanvasBase::end()-1; -} - -Canvas::const_iterator -Canvas::end()const -{ - return CanvasBase::end()-1; -} - -Canvas::reverse_iterator -Canvas::rbegin() -{ - return CanvasBase::rbegin()+1; -} - -Canvas::const_reverse_iterator -Canvas::rbegin()const -{ - return CanvasBase::rbegin()+1; -} - -int -Canvas::size()const -{ - return CanvasBase::size()-1; -} - -void -Canvas::clear() -{ - while(!empty()) - { - Layer::Handle layer(front()); - //if(layer->count()>2)synfig::info("before layer->count()=%d",layer->count()); - - erase(begin()); - //if(layer->count()>1)synfig::info("after layer->count()=%d",layer->count()); - } - //CanvasBase::clear(); - - // We need to keep a blank handle at the - // end of the image list, and acts at - // the bottom. Without it, the layers - // would just continue going when polled - // for a color. - CanvasBase::push_back(Layer::Handle()); - - changed(); -} - -bool -Canvas::empty()const -{ - return CanvasBase::size()<=1; -} - -Layer::Handle & -Canvas::back() -{ - return *(CanvasBase::end()-1); -} - -const Layer::Handle & -Canvas::back()const -{ - return *(CanvasBase::end()-1); -} - -Context -Canvas::get_context()const -{ - return begin(); -} - -const ValueNodeList & -Canvas::value_node_list()const -{ - if(is_inline() && parent_) - return parent_->value_node_list(); - return value_node_list_; -} - -KeyframeList & -Canvas::keyframe_list() -{ - if(is_inline() && parent_) - return parent_->keyframe_list(); - return keyframe_list_; -} - -const KeyframeList & -Canvas::keyframe_list()const -{ - if(is_inline() && parent_) - return parent_->keyframe_list(); - return keyframe_list_; -} - -etl::handle -Canvas::find_layer(const Point &pos) -{ - return get_context().hit_check(pos); -} - -static bool -valid_id(const String &x) -{ - static const char bad_chars[]=" :#@$^&()*"; - unsigned int i; - - if(!x.empty() && x[0]>='0' && x[0]<='9') - return false; - - for(i=0;i(*this).cur_time_=t; - - is_dirty_=false; - get_context().set_time(t); - } - is_dirty_=false; -} - -Canvas::LooseHandle -Canvas::get_root()const -{ - return parent_?parent_->get_root().get():const_cast(this); -} - -int -Canvas::get_depth(etl::handle layer)const -{ - const_iterator iter; - int i(0); - for(iter=begin();iter!=end();++iter,i++) - { - if(layer==*iter) - return i; - } - return -1; -} - -String -Canvas::get_relative_id(etl::loose_handle x)const -{ - if(x->get_root()==this) - return ":"; - if(is_inline() && parent_) - return parent_->_get_relative_id(x); - return _get_relative_id(x); -} - -String -Canvas::_get_relative_id(etl::loose_handle x)const -{ - if(is_inline() && parent_) - return parent_->_get_relative_id(x); - - if(x.get()==this) - return String(); - - if(parent()==x.get()) - return get_id(); - - String id; - - const Canvas* canvas=this; - - for(;!canvas->is_root();canvas=canvas->parent().get()) - id=':'+canvas->get_id()+id; - - if(x && get_root()!=x->get_root()) - { - //String file_name=get_file_name(); - //String file_path=x->get_file_path(); - - String file_name; - if(is_absolute_path(get_file_name())) - file_name=etl::relative_path(x->get_file_path(),get_file_name()); - else - file_name=get_file_name(); - - // If the path of X is inside of file_name, - // then remove it. - //if(file_name.size()>file_path.size()) - // if(file_path==String(file_name,0,file_path.size())) - // file_name.erase(0,file_path.size()+1); - - id=file_name+'#'+id; - } - - return id; -} - -ValueNode::Handle -Canvas::find_value_node(const String &id) -{ - return - ValueNode::Handle::cast_const( - const_cast(this)->find_value_node(id) - ); -} - -ValueNode::ConstHandle -Canvas::find_value_node(const String &id)const -{ - if(is_inline() && parent_) - return parent_->find_value_node(id); - - if(id.empty()) - throw Exception::IDNotFound("Empty ID"); - - // If we do not have any resolution, then we assume that the - // request is for this immediate canvas - if(id.find_first_of(':')==string::npos && id.find_first_of('#')==string::npos) - return value_node_list_.find(id); - - String canvas_id(id,0,id.rfind(':')); - String value_node_id(id,id.rfind(':')+1); - if(canvas_id.empty()) - canvas_id=':'; - //synfig::warning("constfind:value_node_id: "+value_node_id); - //synfig::warning("constfind:canvas_id: "+canvas_id); - - String warnings; - return find_canvas(canvas_id, warnings)->value_node_list_.find(value_node_id); -} - -ValueNode::Handle -Canvas::surefind_value_node(const String &id) -{ - if(is_inline() && parent_) - return parent_->surefind_value_node(id); - - if(id.empty()) - throw Exception::IDNotFound("Empty ID"); - - // If we do not have any resolution, then we assume that the - // request is for this immediate canvas - if(id.find_first_of(':')==string::npos && id.find_first_of('#')==string::npos) - return value_node_list_.surefind(id); - - String canvas_id(id,0,id.rfind(':')); - String value_node_id(id,id.rfind(':')+1); - if(canvas_id.empty()) - canvas_id=':'; - - String warnings; - return surefind_canvas(canvas_id,warnings)->value_node_list_.surefind(value_node_id); -} - -void -Canvas::add_value_node(ValueNode::Handle x, const String &id) -{ - if(is_inline() && parent_) - return parent_->add_value_node(x,id); -// throw runtime_error("You cannot add a ValueNode to an inline Canvas"); - - if(x->is_exported()) - throw runtime_error("ValueNode is already exported"); - - if(id.empty()) - throw Exception::BadLinkName("Empty ID"); - - if(id.find_first_of(':',0)!=string::npos) - throw Exception::BadLinkName("Bad character"); - - try - { - if(PlaceholderValueNode::Handle::cast_dynamic(value_node_list_.find(id))) - throw Exception::IDNotFound("add_value_node()"); - - throw Exception::IDAlreadyExists(id); - } - catch(Exception::IDNotFound) - { - x->set_id(id); - - x->set_parent_canvas(this); - - if(!value_node_list_.add(x)) - { - synfig::error("Unable to add ValueNode"); - throw std::runtime_error("Unable to add ValueNode"); - } - - return; - } -} - -/* -void -Canvas::rename_value_node(ValueNode::Handle x, const String &id) -{ - if(id.empty()) - throw Exception::BadLinkName("Empty ID"); - - if(id.find_first_of(": ",0)!=string::npos) - throw Exception::BadLinkName("Bad character"); - - try - { - if(PlaceholderValueNode::Handle::cast_dynamic(value_node_list_.find(id))) - throw Exception::IDNotFound("rename_value_node"); - throw Exception::IDAlreadyExists(id); - } - catch(Exception::IDNotFound) - { - x->set_id(id); - - return; - } -} -*/ - -void -Canvas::remove_value_node(ValueNode::Handle x) -{ - if(is_inline() && parent_) - return parent_->remove_value_node(x); -// throw Exception::IDNotFound("Canvas::remove_value_node() was called from an inline canvas"); - - if(!x) - throw Exception::IDNotFound("Canvas::remove_value_node() was passed empty handle"); - - if(!value_node_list_.erase(x)) - throw Exception::IDNotFound("Canvas::remove_value_node(): ValueNode was not found inside of this canvas"); - - //x->set_parent_canvas(0); - - x->set_id(""); -} - -Canvas::Handle -Canvas::surefind_canvas(const String &id, String &warnings) -{ - if(is_inline() && parent_) - return parent_->surefind_canvas(id,warnings); - - if(id.empty()) - return this; - - // If the ID contains a "#" character, then a filename is - // expected on the left side. - if(id.find_first_of('#')!=string::npos) - { - // If '#' is the first character, remove it - // and attempt to parse the ID again. - if(id[0]=='#') - return surefind_canvas(String(id,1),warnings); - - //! \todo This needs a lot more optimization - String file_name(id,0,id.find_first_of('#')); - String external_id(id,id.find_first_of('#')+1); - - file_name=unix_to_local_path(file_name); - - Canvas::Handle external_canvas; - - if(!is_absolute_path(file_name)) - file_name = get_file_path()+ETL_DIRECTORY_SEPARATOR+file_name; - - // If the composition is already open, then use it. - if(externals_.count(file_name)) - external_canvas=externals_[file_name]; - else - { - String errors; - external_canvas=open_canvas(file_name, errors, warnings); - if(!external_canvas) - throw runtime_error(errors); - externals_[file_name]=external_canvas; - } - - return Handle::cast_const(external_canvas.constant()->find_canvas(external_id, warnings)); - } - - // If we do not have any resolution, then we assume that the - // request is for this immediate canvas - if(id.find_first_of(':')==string::npos) - { - Children::iterator iter; - - // Search for the image in the image list, - // and return it if it is found - for(iter=children().begin();iter!=children().end();iter++) - if(id==(*iter)->get_id()) - return *iter; - - // Create a new canvas and return it - //synfig::warning("Implicitly creating canvas named "+id); - return new_child_canvas(id); - } - - // If the first character is the separator, then - // this references the root canvas. - if(id[0]==':') - return get_root()->surefind_canvas(string(id,1),warnings); - - // Now we know that the requested Canvas is in a child - // of this canvas. We have to find that canvas and - // call "find_canvas" on it, and return the result. - - String canvas_name=string(id,0,id.find_first_of(':')); - - Canvas::Handle child_canvas=surefind_canvas(canvas_name,warnings); - - return child_canvas->surefind_canvas(string(id,id.find_first_of(':')+1),warnings); -} - -Canvas::Handle -Canvas::find_canvas(const String &id, String &warnings) -{ - return - Canvas::Handle::cast_const( - const_cast(this)->find_canvas(id, warnings) - ); -} - -Canvas::ConstHandle -Canvas::find_canvas(const String &id, String &warnings)const -{ - if(is_inline() && parent_) - return parent_->find_canvas(id, warnings); - - if(id.empty()) - return this; - - // If the ID contains a "#" character, then a filename is - // expected on the left side. - if(id.find_first_of('#')!=string::npos) - { - // If '#' is the first character, remove it - // and attempt to parse the ID again. - if(id[0]=='#') - return find_canvas(String(id,1), warnings); - - //! \todo This needs a lot more optimization - String file_name(id,0,id.find_first_of('#')); - String external_id(id,id.find_first_of('#')+1); - - file_name=unix_to_local_path(file_name); - - Canvas::Handle external_canvas; - - if(!is_absolute_path(file_name)) - file_name = get_file_path()+ETL_DIRECTORY_SEPARATOR+file_name; - - // If the composition is already open, then use it. - if(externals_.count(file_name)) - external_canvas=externals_[file_name]; - else - { - String errors, warnings; - external_canvas=open_canvas(file_name, errors, warnings); - if(!external_canvas) - throw runtime_error(errors); - externals_[file_name]=external_canvas; - } - - return Handle::cast_const(external_canvas.constant()->find_canvas(external_id, warnings)); - } - - // If we do not have any resolution, then we assume that the - // request is for this immediate canvas - if(id.find_first_of(':')==string::npos) - { - Children::const_iterator iter; - - // Search for the image in the image list, - // and return it if it is found - for(iter=children().begin();iter!=children().end();iter++) - if(id==(*iter)->get_id()) - return *iter; - - throw Exception::IDNotFound("Child Canvas in Parent Canvas: (child)"+id); - } - - // If the first character is the separator, then - // this references the root canvas. - if(id[0]==':') - return get_root()->find_canvas(string(id,1), warnings); - - // Now we know that the requested Canvas is in a child - // of this canvas. We have to find that canvas and - // call "find_canvas" on it, and return the result. - - String canvas_name=string(id,0,id.find_first_of(':')); - - Canvas::ConstHandle child_canvas=find_canvas(canvas_name, warnings); - - return child_canvas->find_canvas(string(id,id.find_first_of(':')+1), warnings); -} - -Canvas::Handle -Canvas::create() -{ - return new Canvas("Untitled"); -} - -void -Canvas::push_back(etl::handle x) -{ -// int i(x->count()); - insert(end(),x); - //if(x->count()!=i+1)synfig::info("push_back before %d, after %d",i,x->count()); -} - -void -Canvas::push_front(etl::handle x) -{ -// int i(x->count()); - insert(begin(),x); - //if(x->count()!=i+1)synfig::error("push_front before %d, after %d",i,x->count()); -} - -void -Canvas::insert(iterator iter,etl::handle x) -{ -// int i(x->count()); - CanvasBase::insert(iter,x); - - /*if(x->count()!=i+1) - { - synfig::error(__FILE__":%d: Canvas::insert(): ***FAILURE*** before %d, after %d",__LINE__,i,x->count()); - return; - //throw runtime_error("Canvas Insertion Failed"); - }*/ - - x->set_canvas(this); - - add_child(x.get()); - - LooseHandle correct_canvas(this); - //while(correct_canvas->is_inline())correct_canvas=correct_canvas->parent(); - Layer::LooseHandle loose_layer(x); - - add_connection(loose_layer, - sigc::connection::connection( - x->signal_added_to_group().connect( - sigc::bind( - sigc::mem_fun( - *correct_canvas, - &Canvas::add_group_pair), - loose_layer)))); - add_connection(loose_layer, - sigc::connection::connection( - x->signal_removed_from_group().connect( - sigc::bind( - sigc::mem_fun( - *correct_canvas, - &Canvas::remove_group_pair), - loose_layer)))); - - if(!x->get_group().empty()) - add_group_pair(x->get_group(),x); - - changed(); -} - -void -Canvas::push_back_simple(etl::handle x) -{ - CanvasBase::insert(end(),x); - changed(); -} - -void -Canvas::erase(iterator iter) -{ - if(!(*iter)->get_group().empty()) - remove_group_pair((*iter)->get_group(),(*iter)); - - // HACK: We really shouldn't be wiping - // out these signals entirely. We should - // only be removing the specific connections - // that we made. At the moment, I'm too - // lazy to add the code to keep track - // of those connections, and no one else - // is using these signals, so I'll just - // leave these next two lines like they - // are for now - darco 07-30-2004 - - // so don't wipe them out entirely - // - dooglus 09-21-2007 - disconnect_connections(*iter); - - if(!op_flag_)remove_child(iter->get()); - - CanvasBase::erase(iter); - if(!op_flag_)changed(); -} - -Canvas::Handle -Canvas::clone(const GUID& deriv_guid)const -{ - synfig::String name; - if(is_inline()) - name="inline"; - else - { - name=get_id()+"_CLONE"; - -#ifndef ALLOW_CLONE_NON_INLINE_CANVASES - throw runtime_error("Cloning of non-inline canvases is not yet supported"); -#endif // ALLOW_CLONE_NON_INLINE_CANVASES - } - - Handle canvas(new Canvas(name)); - - if(is_inline()) - { - canvas->is_inline_=true; - // \todo this was setting parent_=0 - is there a reason for that? - // this was causing bug 1838132, where cloning an inline canvas that contains an imported image fails - // it was failing to ascertain the absolute pathname of the imported image, since it needs the pathname - // of the canvas to get that, which is stored in the parent canvas - canvas->parent_=parent(); - canvas->rend_desc() = rend_desc(); - //canvas->set_inline(parent()); - } - - canvas->set_guid(get_guid()^deriv_guid); - - const_iterator iter; - for(iter=begin();iter!=end();++iter) - { - Layer::Handle layer((*iter)->clone(deriv_guid)); - if(layer) - { - assert(layer.count()==1); - int presize(size()); - canvas->push_back(layer); - if(!(layer.count()>1)) - { - synfig::error("Canvas::clone(): Cloned layer insertion failure!"); - synfig::error("Canvas::clone(): \tlayer.count()=%d",layer.count()); - synfig::error("Canvas::clone(): \tlayer->get_name()=%s",layer->get_name().c_str()); - synfig::error("Canvas::clone(): \tbefore size()=%d",presize); - synfig::error("Canvas::clone(): \tafter size()=%d",size()); - } - assert(layer.count()>1); - } - else - { - synfig::error("Unable to clone layer"); - } - } - - canvas->signal_group_pair_removed().clear(); - canvas->signal_group_pair_added().clear(); - - return canvas; -} - -void -Canvas::set_inline(LooseHandle parent) -{ - if(is_inline_ && parent_) - { - - } - - id_="inline"; - is_inline_=true; - parent_=parent; - - // Have the parent inherit all of the group stuff - - std::map > >::const_iterator iter; - - for(iter=group_db_.begin();iter!=group_db_.end();++iter) - { - parent->group_db_[iter->first].insert(iter->second.begin(),iter->second.end()); - } - - rend_desc()=parent->rend_desc(); -} - -Canvas::Handle -Canvas::create_inline(Handle parent) -{ - assert(parent); - //if(parent->is_inline()) - // return create_inline(parent->parent()); - - Handle canvas(new Canvas("inline")); - canvas->set_inline(parent); - return canvas; -} - -Canvas::Handle -Canvas::new_child_canvas() -{ - if(is_inline() && parent_) - return parent_->new_child_canvas(); -// runtime_error("You cannot create a child Canvas in an inline Canvas"); - - // Create a new canvas - children().push_back(create()); - Canvas::Handle canvas(children().back()); - - canvas->parent_=this; - - canvas->rend_desc()=rend_desc(); - - return canvas; -} - -Canvas::Handle -Canvas::new_child_canvas(const String &id) -{ - if(is_inline() && parent_) - return parent_->new_child_canvas(id); -// runtime_error("You cannot create a child Canvas in an inline Canvas"); - - // Create a new canvas - children().push_back(create()); - Canvas::Handle canvas(children().back()); - - canvas->set_id(id); - canvas->parent_=this; - canvas->rend_desc()=rend_desc(); - - return canvas; -} - -Canvas::Handle -Canvas::add_child_canvas(Canvas::Handle child_canvas, const synfig::String& id) -{ - if(is_inline() && parent_) - return parent_->add_child_canvas(child_canvas,id); - - if(child_canvas->parent() && !child_canvas->is_inline()) - throw std::runtime_error("Cannot add child canvas because it belongs to someone else!"); - - if(!valid_id(id)) - throw runtime_error("Invalid ID"); - - try - { - String warnings; - find_canvas(id, warnings); - throw Exception::IDAlreadyExists(id); - } - catch(Exception::IDNotFound) - { - if(child_canvas->is_inline()) - child_canvas->is_inline_=false; - child_canvas->id_=id; - children().push_back(child_canvas); - child_canvas->parent_=this; - } - - return child_canvas; -} - -void -Canvas::remove_child_canvas(Canvas::Handle child_canvas) -{ - if(is_inline() && parent_) - return parent_->remove_child_canvas(child_canvas); - - if(child_canvas->parent_!=this) - throw runtime_error("Given child does not belong to me"); - - if(find(children().begin(),children().end(),child_canvas)==children().end()) - throw Exception::IDNotFound(child_canvas->get_id()); - - children().remove(child_canvas); - - child_canvas->parent_=0; -} - -void -Canvas::set_file_name(const String &file_name) -{ - if(parent()) - parent()->set_file_name(file_name); - else - { - String old_name(file_name_); - file_name_=file_name; - - // when a canvas is made, its name is "" - // then, before it's saved or even edited, it gets a name like "Synfig Animation 23", in the local language - // we don't want to register the canvas' filename in the canvas map until it gets a real filename - if (old_name != "") - { - file_name_=file_name; - std::map >::iterator iter; - for(iter=get_open_canvas_map().begin();iter!=get_open_canvas_map().end();++iter) - if(iter->second==this) - break; - if (iter == get_open_canvas_map().end()) - CanvasParser::register_canvas_in_map(this, file_name); - else - signal_file_name_changed_(); - } - } -} - -sigc::signal& -Canvas::signal_file_name_changed() -{ - if(parent()) - return parent()->signal_file_name_changed(); - else - return signal_file_name_changed_; -} - -String -Canvas::get_file_name()const -{ - if(parent()) - return parent()->get_file_name(); - return file_name_; -} - -String -Canvas::get_file_path()const -{ - if(parent()) - return parent()->get_file_path(); - return dirname(file_name_); -} - -String -Canvas::get_meta_data(const String& key)const -{ - if(!meta_data_.count(key)) - return String(); - return meta_data_.find(key)->second; -} - -void -Canvas::set_meta_data(const String& key, const String& data) -{ - if(meta_data_[key]!=data) - { - meta_data_[key]=data; - signal_meta_data_changed()(key); - signal_meta_data_changed(key)(); - } -} - -void -Canvas::erase_meta_data(const String& key) -{ - if(meta_data_.count(key)) - { - meta_data_.erase(key); - signal_meta_data_changed()(key); - signal_meta_data_changed(key)(); - } -} - -std::list -Canvas::get_meta_data_keys()const -{ - std::list ret; - - std::map::const_iterator iter; - - for(iter=meta_data_.begin();!(iter==meta_data_.end());++iter) - ret.push_back(iter->first); - - return ret; -} - -/* note - the "Motion Blur" and "Duplicate" layers need the dynamic - parameters of any PasteCanvas layers they loop over to be - maintained. When the variables in the following function - refer to "motion blur", they mean either of these two - layers. */ -void -synfig::optimize_layers(Time time, Context context, Canvas::Handle op_canvas, bool seen_motion_blur_in_parent) -{ - Context iter; - - std::vector< std::pair > sort_list; - int i, motion_blur_i=0; // motion_blur_i is for resolving which layer comes first in the event of a z_depth tie - float motion_blur_z_depth=0; // the z_depth of the least deep motion blur layer in this context - bool seen_motion_blur_locally = false; - bool motion_blurred; // the final result - is this layer blurred or not? - - // If the parent didn't cause us to already be motion blurred, - // check whether there's a motion blur in this context, - // and if so, calculate its z_depth. - if (!seen_motion_blur_in_parent) - for(iter=context,i=0;*iter;iter++,i++) - { - Layer::Handle layer=*iter; - - // If the layer isn't active, don't worry about it - if(!layer->active()) - continue; - - // Any layer with an amount of zero is implicitly disabled. - ValueBase value(layer->get_param("amount")); - if(value.get_type()==ValueBase::TYPE_REAL && value.get(Real())==0) - continue; - - if(layer->get_name()=="MotionBlur" || layer->get_name()=="duplicate") - { - float z_depth(layer->get_z_depth()*1.0001+i); - - // If we've seen a motion blur before in this context... - if (seen_motion_blur_locally) - { - // ... then we're only interested in this one if it's less deep... - if (z_depth < motion_blur_z_depth) - { - motion_blur_z_depth = z_depth; - motion_blur_i = i; - } - } - // ... otherwise we're always interested in it. - else - { - motion_blur_z_depth = z_depth; - motion_blur_i = i; - seen_motion_blur_locally = true; - } - } - } - - // Go ahead and start romping through the canvas to paste - for(iter=context,i=0;*iter;iter++,i++) - { - Layer::Handle layer=*iter; - float z_depth(layer->get_z_depth()*1.0001+i); - - // If the layer isn't active, don't worry about it - if(!layer->active()) - continue; - - // Any layer with an amount of zero is implicitly disabled. - ValueBase value(layer->get_param("amount")); - if(value.get_type()==ValueBase::TYPE_REAL && value.get(Real())==0) - continue; - - // note: this used to include "&& paste_canvas->get_time_offset()==0", but then - // time-shifted layers weren't being sorted by z-depth (bug #1806852) - if(layer->get_name()=="PasteCanvas") - { - Layer_PasteCanvas* paste_canvas(static_cast(layer.get())); - - // we need to blur the sub canvas if: - // our parent is blurred, - // or the child is lower than a local blur, - // or the child is at the same z_depth as a local blur, but later in the context - -#if 0 // DEBUG - if (seen_motion_blur_in_parent) synfig::info("seen BLUR in parent\n"); - else if (seen_motion_blur_locally) - if (z_depth > motion_blur_z_depth) synfig::info("paste is deeper than BLUR\n"); - else if (z_depth == motion_blur_z_depth) { synfig::info("paste is same depth as BLUR\n"); - if (i > motion_blur_i) synfig::info("paste is physically deeper than BLUR\n"); - else synfig::info("paste is less physically deep than BLUR\n"); - } else synfig::info("paste is less deep than BLUR\n"); - else synfig::info("no BLUR at all\n"); -#endif // DEBUG - - motion_blurred = (seen_motion_blur_in_parent || - (seen_motion_blur_locally && - (z_depth > motion_blur_z_depth || - (z_depth == motion_blur_z_depth && i > motion_blur_i)))); - - Canvas::Handle sub_canvas(Canvas::create_inline(op_canvas)); - Canvas::Handle paste_sub_canvas = paste_canvas->get_sub_canvas(); - if(paste_sub_canvas) - optimize_layers(time, paste_sub_canvas->get_context(),sub_canvas,motion_blurred); - -// \todo: uncommenting the following breaks the rendering of at least examples/backdrop.sifz quite severely -// #define SYNFIG_OPTIMIZE_PASTE_CANVAS -#ifdef SYNFIG_OPTIMIZE_PASTE_CANVAS - Canvas::iterator sub_iter; - - // Determine if we can just remove the paste canvas altogether - if (paste_canvas->get_blend_method() == Color::BLEND_COMPOSITE && - paste_canvas->get_amount() == 1.0f && - paste_canvas->get_zoom() == 0 && - paste_canvas->get_time_offset() == 0 && - paste_canvas->get_origin() == Point(0,0) ) - try { - for(sub_iter=sub_canvas->begin();sub_iter!=sub_canvas->end();++sub_iter) - { - Layer* layer=sub_iter->get(); - - // any layers that deform end up breaking things - // so do things the old way if we run into anything like this - if(!dynamic_cast(layer)) - throw int(); - - ValueBase value(layer->get_param("blend_method")); - if(value.get_type()!=ValueBase::TYPE_INTEGER || value.get(int())!=(int)Color::BLEND_COMPOSITE) - throw int(); - } - - // It has turned out that we don't need a paste canvas - // layer, so just go ahead and add all the layers onto - // the current stack and be done with it - while(sub_canvas->size()) - { - sort_list.push_back(std::pair(z_depth,sub_canvas->front())); - //op_canvas->push_back_simple(sub_canvas->front()); - sub_canvas->pop_front(); - } - continue; - } - catch(int) - { } -#endif // SYNFIG_OPTIMIZE_PASTE_CANVAS - - Layer::Handle new_layer(Layer::create("PasteCanvas")); - dynamic_cast(new_layer.get())->set_muck_with_time(false); - if (motion_blurred) - { - Layer::DynamicParamList dynamic_param_list(paste_canvas->dynamic_param_list()); - for(Layer::DynamicParamList::const_iterator iter(dynamic_param_list.begin()); iter != dynamic_param_list.end(); ++iter) - new_layer->connect_dynamic_param(iter->first, iter->second); - } - Layer::ParamList param_list(paste_canvas->get_param_list()); - //param_list.erase("canvas"); - new_layer->set_param_list(param_list); - dynamic_cast(new_layer.get())->set_sub_canvas(sub_canvas); - dynamic_cast(new_layer.get())->set_muck_with_time(true); - layer=new_layer; - } - else // not a PasteCanvas - does it use blend method 'Straight'? - { - /* when we use the 'straight' blend method, every pixel on the layer affects the layers underneath, - * not just the non-transparent pixels; the following workarea wraps non-pastecanvas layers in a - * new pastecanvas to ensure that the straight blend affects the full plane, not just the area - * within the layer's bounding box - */ - - // \todo: this code probably needs modification to work properly with motionblur and duplicate - etl::handle composite = etl::handle::cast_dynamic(layer); - - /* some layers (such as circle) don't touch pixels that aren't - * part of the circle, so they don't get blended correctly when - * using a straight blend. so we encapsulate the circle, and the - * encapsulation layer takes care of the transparent pixels - * for us. if we do that for all layers, however, then the - * distortion layers no longer work, since they have no - * context to work on. the Layer::reads_context() method - * returns true for layers which need to be able to see - * their context. we can't encapsulate those. - */ - if (composite && - Color::is_straight(composite->get_blend_method()) && - !composite->reads_context()) - { - Canvas::Handle sub_canvas(Canvas::create_inline(op_canvas)); - // don't use clone() because it re-randomizes the seeds of any random valuenodes - sub_canvas->push_back(composite = composite->simple_clone()); - layer = Layer::create("PasteCanvas"); - composite->set_description(strprintf("Wrapped clone of '%s'", composite->get_non_empty_description().c_str())); - layer->set_description(strprintf("PasteCanvas wrapper for '%s'", composite->get_non_empty_description().c_str())); - Layer_PasteCanvas* paste_canvas(static_cast(layer.get())); - paste_canvas->set_blend_method(composite->get_blend_method()); - paste_canvas->set_amount(composite->get_amount()); - sub_canvas->set_time(time); // region and outline don't calculate their bounding rects until their time is set - composite->set_blend_method(Color::BLEND_STRAIGHT); // do this before calling set_sub_canvas(), but after set_time() - composite->set_amount(1.0f); // after set_time() - paste_canvas->set_sub_canvas(sub_canvas); - } - } - - sort_list.push_back(std::pair(z_depth,layer)); - //op_canvas->push_back_simple(layer); - } - - //sort_list.sort(); - stable_sort(sort_list.begin(),sort_list.end()); - std::vector< std::pair >::iterator iter2; - for(iter2=sort_list.begin();iter2!=sort_list.end();++iter2) - op_canvas->push_back_simple(iter2->second); - op_canvas->op_flag_=true; -} - -void -Canvas::get_times_vfunc(Node::time_set &set) const -{ - const_iterator i = begin(), - iend = end(); - - for(; i != iend; ++i) - { - const Node::time_set &tset = (*i)->get_times(); - set.insert(tset.begin(),tset.end()); - } -} - -std::set > -Canvas::get_layers_in_group(const String&group) -{ - if(is_inline() && parent_) - return parent_->get_layers_in_group(group); - - if(group_db_.count(group)==0) - return std::set >(); - return group_db_.find(group)->second; -} - -std::set -Canvas::get_groups()const -{ - if(is_inline() && parent_) - return parent_->get_groups(); - - std::set ret; - std::map > >::const_iterator iter; - for(iter=group_db_.begin();iter!=group_db_.end();++iter) - ret.insert(iter->first); - return ret; -} - -int -Canvas::get_group_count()const -{ - if(is_inline() && parent_) - return parent_->get_group_count(); - - return group_db_.size(); -} - -void -Canvas::add_group_pair(String group, etl::handle layer) -{ - group_db_[group].insert(layer); - if(group_db_[group].size()==1) - signal_group_added()(group); - else - signal_group_changed()(group); - - signal_group_pair_added()(group,layer); - - if(is_inline() && parent_) - return parent_->add_group_pair(group,layer); -} - -void -Canvas::remove_group_pair(String group, etl::handle layer) -{ - group_db_[group].erase(layer); - - signal_group_pair_removed()(group,layer); - - if(group_db_[group].empty()) - { - group_db_.erase(group); - signal_group_removed()(group); - } - else - signal_group_changed()(group); - - if(is_inline() && parent_) - return parent_->remove_group_pair(group,layer); -} - -void -Canvas::add_connection(etl::loose_handle layer, sigc::connection connection) -{ - connections_[layer].push_back(connection); -} - -void -Canvas::disconnect_connections(etl::loose_handle layer) -{ - std::vector::iterator iter; - for(iter=connections_[layer].begin();iter!=connections_[layer].end();++iter) - iter->disconnect(); - connections_[layer].clear(); -} - -void -Canvas::rename_group(const String&old_name,const String&new_name) -{ - if(is_inline() && parent_) - return parent_->rename_group(old_name,new_name); - - { - std::map > >::iterator iter; - iter=group_db_.find(old_name); - if(iter!=group_db_.end()) - for(++iter;iter!=group_db_.end() && iter->first.find(old_name)==0;iter=group_db_.find(old_name),++iter) - { - String name(iter->first,old_name.size(),String::npos); - name=new_name+name; - rename_group(iter->first,name); - } - } - - std::set > layers(get_layers_in_group(old_name)); - std::set >::iterator iter; - - for(iter=layers.begin();iter!=layers.end();++iter) - { - (*iter)->remove_from_group(old_name); - (*iter)->add_to_group(new_name); - } -} - -void -Canvas::register_external_canvas(String file_name, Handle canvas) -{ - if(!is_absolute_path(file_name)) file_name = get_file_path()+ETL_DIRECTORY_SEPARATOR+file_name; - externals_[file_name] = canvas; -} - -#ifdef _DEBUG -void -Canvas::show_externals(String file, int line, String text) const -{ - printf(" .----- (externals for %lx '%s')\n | %s:%d %s\n", ulong(this), get_name().c_str(), file.c_str(), line, text.c_str()); - std::map::iterator iter; - for (iter = externals_.begin(); iter != externals_.end(); iter++) - { - synfig::String first(iter->first); - etl::loose_handle second(iter->second); - printf(" | %40s : %lx (%d)\n", first.c_str(), ulong(&*second), second->count()); - } - printf(" `-----\n\n"); -} -#endif // _DEBUG diff --git a/synfig-core/trunk/src/synfig/canvas.h b/synfig-core/trunk/src/synfig/canvas.h deleted file mode 100644 index a6474da..0000000 --- a/synfig-core/trunk/src/synfig/canvas.h +++ /dev/null @@ -1,572 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file canvas.h -** \brief Canvas Class Implementation -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_CANVAS_H -#define __SYNFIG_CANVAS_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include -#include - -#include "vector.h" -#include "string.h" -#include "canvasbase.h" -#include "valuenode.h" -#include "keyframe.h" -#include "renddesc.h" -#include "node.h" -#include "guid.h" - -/* === M A C R O S ========================================================= */ - -/* version change history: - * - * 0.1: the original version - * - * if a waypoint goes from -179 to 179 degrees, that is a 2 - * degree change. there's no way to express a 720 degree - * rotation with a single pair of waypoints - * - * 0.2: svn r1227 - * - * angles no longer wrap at -180 degrees back to 180 degrees; if - * a waypoint goes from -179 to 179 degrees, that is a rotation - * of 358 degrees. loading a version 0.1 canvas will modify - * constant angle waypoints to that they are within 180 degrees - * of the previous waypoint's value - * - * the 'straight' blend method didn't used to work properly. it - * didn't work at all on transparent pixels in layers other than - * the PasteCanvas layer. for example, the examples/japan.sifz - * file has a red circle (straight, amount=1.0) on top of a - * striped conical gradient. if 'straight' was working, the - * conical gradient would be entirely obscured by the circle - * layer (even by its transparent pixels) - * - * 0.3: svn r1422 - * - * the 'straight' blend method was fixed. loading a version 0.2 - * or older canvas will replace the 'straight' blend method in - * non-pastecanvas layers with 'composite', unless they're - * completely transparent, in which case it will replace them - * with an 'alpha over' blend instead. Images like - * examples/logo.sifz use transparent straight blends to do - * masking, which no longer works now that 'straight' blending is - * fixed. - * - * Tangent lengths calculated by the "Segment Tangent" and "BLine - * Tangent" ValueNodes were scaled by a factor of 0.5. - * - * 0.4: svn r1856 - * - * Stop scaling tangents by 0.5. - * - * 0.5: svn r1863 - * - * Added "offset", "scale", and "fixed_length" links to the - * "BLine Tangent" ValueNode. - * - * 0.6: svn r2067 - * - * Added "scale" link to the "BLine Width" ValueNode in svn r1872. - * - * Added "loop" link to the "Gradient Color" ValueNode in svn r1901. - * - * 0.7: svn r2315 - * - * Added "loop" link to the "Random" ValueNode in svn r2315. - */ - -#define CURRENT_CANVAS_VERSION "0.7" - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class Context; -class GUID; - -/*! \class Canvas -** \todo writeme -*/ -class Canvas : public CanvasBase, public Node -{ - /* - -- ** -- T Y P E S ----------------------------------------------------------- - */ - -public: - typedef etl::handle Handle; - typedef etl::loose_handle LooseHandle; - typedef etl::handle ConstHandle; - - typedef std::list Children; - - friend void synfig::optimize_layers(Time, Context, Canvas::Handle, bool seen_motion_blur); - - /* - -- ** -- D A T A ------------------------------------------------------------- - */ - -private: - - //! Contains the ID string for the Canvas - /*! \see get_id(), set_id() */ - String id_; - - //! Contains the name of the Canvas - /*! \see set_name(), get_name() */ - String name_; - - //! Contains a description of the Canvas - /*! \see set_description(), get_description() */ - String description_; - - //! Contains the canvas' version string - /*! \see set_version(), get_version() */ - String version_; - - //! Contains the author's name - /*! \see set_author(), get_author() */ - String author_; - - //! Contains the author's email address - /*! \todo This private parameter has no binding, so it's unusable at the moment */ - String email_; - - //! File name of Canvas - /*! \see get_file_name(), set_file_name() */ - String file_name_; - - //! Metadata map for Canvas. - /*! \see get_meta_data(), set_meta_data(), erase_meta_data() */ - std::map meta_data_; - - //! Contains a list of ValueNodes that are in this Canvas - /*! \see value_node_list(), find_value_node() */ - ValueNodeList value_node_list_; - - //! \writeme - KeyframeList keyframe_list_; - - //! A handle to the parent canvas of this canvas. - /*! If canvas is a root canvas, then this handle is empty - ** \see parent() - */ - LooseHandle parent_; - - //! List containing any child Canvases - /*! \see children() */ - Children children_; - - //! Render Description for Canvas - /*! \see rend_desc() */ - RendDesc desc_; - - //! Contains the value of the last call to set_time() - Time cur_time_; - - //! \writeme - mutable std::map externals_; - - //! This flag is set if this canvas is "inline" - bool is_inline_; - - mutable bool is_dirty_; - - bool op_flag_; - - //! Layer Group database - std::map > > group_db_; - - //! Layer Connection database - std::map,std::vector > connections_; - - /* - -- ** -- S I G N A L S ------------------------------------------------------- - */ - -private: - - //! Group Added - sigc::signal signal_group_added_; - - //! Group Removed - sigc::signal signal_group_removed_; - - //! Group Changed - sigc::signal signal_group_changed_; - - sigc::signal > signal_group_pair_added_; - sigc::signal > signal_group_pair_removed_; - - //! Layers Reordered - sigc::signal signal_layers_reordered_; - - //! RendDesc Changed - sigc::signal signal_rend_desc_changed_; - - //! ID Changed - sigc::signal signal_id_changed_; - - //! Dirty - //sigc::signal signal_dirty_; - - //! FileName Changed - sigc::signal signal_file_name_changed_; - - //! Metadata Changed - sigc::signal signal_meta_data_changed_; - - //! Key-Specific meta data changed signals - std::map > signal_map_meta_data_changed_; - - - //! ValueBasenode Changed - sigc::signal > signal_value_node_changed_; - - sigc::signal > signal_value_node_renamed_; - - sigc::signal, etl::handle > signal_value_node_child_added_; - - sigc::signal, etl::handle > signal_value_node_child_removed_; - - /* - -- ** -- S I G N A L I N T E R F A C E ------------------------------------- - */ - -public: - - sigc::signal >& signal_group_pair_added() { return signal_group_pair_added_; } - sigc::signal >& signal_group_pair_removed() { return signal_group_pair_removed_; } - - //! Group Added - sigc::signal& signal_group_added() { return signal_group_added_; } - - //! Group Removed - sigc::signal& signal_group_removed() { return signal_group_removed_; } - - //! Group Changed - sigc::signal& signal_group_changed() { return signal_group_changed_; } - - //! Layers Reordered - sigc::signal& signal_layers_reordered() { return signal_layers_reordered_; } - - //! RendDesc Changed - sigc::signal& signal_rend_desc_changed() { return signal_rend_desc_changed_; } - - //! ID Changed - sigc::signal& signal_id_changed() { return signal_id_changed_; } - - //! File name Changed - sigc::signal& signal_file_name_changed(); - - //! Metadata Changed - sigc::signal& signal_meta_data_changed() { return signal_meta_data_changed_; } - - //! Metadata Changed - sigc::signal& signal_meta_data_changed(const String& key) { return signal_map_meta_data_changed_[key]; } - - - sigc::signal >& signal_value_node_changed() { return signal_value_node_changed_; } - - sigc::signal >& signal_value_node_renamed() { return signal_value_node_renamed_; } - - //! Dirty - sigc::signal& signal_dirty() { return signal_changed(); } - - //! \writeme - sigc::signal, etl::handle >& signal_value_node_child_added() { return signal_value_node_child_added_; } - - //! \writeme - sigc::signal, etl::handle >& signal_value_node_child_removed() { return signal_value_node_child_removed_; } - - /* - -- ** -- C O N S T R U C T O R S --------------------------------------------- - */ - -protected: - - Canvas(const String &name); - -public: - - ~Canvas(); - - /* - -- ** -- M E M B E R F U N C T I O N S ------------------------------------- - */ - -public: - - //! Returns the set of layers in group - std::set > get_layers_in_group(const String&group); - - //! Gets all the groups - std::set get_groups()const; - - //! Gets the number of groups in this canvas - int get_group_count()const; - - //! Renames the given group - void rename_group(const String&old_name,const String&new_name); - - //! \writeme - bool is_inline()const { return is_inline_; } - - //! Returns a handle to the RendDesc for this Canvas - RendDesc &rend_desc() { return desc_; } - - //! Returns a handle to the RendDesc for this Canvas - const RendDesc &rend_desc()const { return desc_; } - - //! Gets the name of the canvas - const String & get_name()const { return name_; } - - //! Sets the name of the canvas - void set_name(const String &x); - - //! Gets the version string of the canvas - const String get_version()const { return version_; } - - //! Sets the version string of the canvas - void set_version(const String &x) { version_ = x; } - - //! Gets the author of the canvas - const String & get_author()const { return author_; } - - //! Sets the author of the canvas - void set_author(const String &x); - - //! Gets the description of the canvas - const String & get_description()const { return description_; } - - //! Sets the name of the canvas - void set_description(const String &x); - - //! Gets the ID of the canvas - const String & get_id()const { return id_; } - - //! Sets the ID of the canvas - void set_id(const String &x); - - //! Returns the data string for the given meta data key - String get_meta_data(const String& key)const; - - //! Returns a list of meta data keys - std::list get_meta_data_keys()const; - - //! Sets a meta data key to a specific string - void set_meta_data(const String& key, const String& data); - - //! Removes a meta data key - void erase_meta_data(const String& key); - - //! \writeme - String get_relative_id(etl::loose_handle x)const; - - //! \internal \writeme - String _get_relative_id(etl::loose_handle x)const; - - //! Returns \c true if the Canvas is a root Canvas. \c false otherwise - bool is_root()const { return !parent_; } - - //! Returns a handle to the parent Canvas. - /*! The returned handle will be empty if this is a root canvas */ - LooseHandle parent()const { return parent_; } - - LooseHandle get_root()const; - - //! Returns a list of all child canvases in this canvas - std::list &children() { return children_; } - - //! Returns a list of all child canvases in this canvas - const std::list &children()const { return children_; } - - //! Gets the color at the specified point - //Color get_color(const Point &pos)const; - - //! Sets the time for all the layers in the canvas - void set_time(Time t)const; - - //! \writeme - Time get_time()const { return cur_time_; } - - //! Returns the number of layers in the canvas - int size()const; - - //! Removes all the layers from the canvas - void clear(); - - //! Returns true if the canvas has no layers - bool empty()const; - - //! Returns a reference to the ValueNodeList for this Canvas - // ValueNodeList &value_node_list() { return value_node_list_; } - - //! Returns a reference to the ValueNodeList for this Canvas - const ValueNodeList &value_node_list()const; - - //! Returns a reference to the KeyframeList for this Canvas - KeyframeList &keyframe_list(); - - //! Returns a reference to the KeyframeList for this Canvas - const KeyframeList &keyframe_list()const; - - //! Finds the ValueNode in the Canvas with the given \a id - /*! \return If found, returns a handle to the ValueNode. - ** Otherwise, returns an empty handle. - */ - ValueNode::Handle find_value_node(const String &id); - - //! \internal \writeme - ValueNode::Handle surefind_value_node(const String &id); - - //! Finds the ValueNode in the Canvas with the given \a id - /*! \return If found, returns a handle to the ValueNode. - ** Otherwise, returns an empty handle. - */ - ValueNode::ConstHandle find_value_node(const String &id)const; - - //! \writeme - void add_value_node(ValueNode::Handle x, const String &id); - - //! writeme - //void rename_value_node(ValueNode::Handle x, const String &id); - - //! \writeme - void remove_value_node(ValueNode::Handle x); - - //! \writeme - void remove_value_node(const String &id) { remove_value_node(find_value_node(id)); } - - //! Finds a child Canvas in the Canvas with the given \a name - /*! \return If found, returns a handle to the child Canvas. - ** If not found, it creates a new Canvas and returns it - ** If an error occurs, it returns an empty handle - */ - Handle surefind_canvas(const String &id,String &warnings); - - //! Finds a child Canvas in the Canvas with the given \a id - /*! \return If found, returns a handle to the child Canvas. - ** Otherwise, returns an empty handle. - */ - Handle find_canvas(const String &id, String &warnings); - - //! Finds a child Canvas in the Canvas with the given \a id - /*! \return If found, returns a handle to the child Canvas. - ** Otherwise, returns an empty handle. - */ - ConstHandle find_canvas(const String &id, String &warnings)const; - - //! Sets the file path for the Canvas - //void set_file_path(const String &); - - //! Returns the file path from the file name - String get_file_path()const; - - //! Sets the filename (with path) - void set_file_name(const String &); - - //! Gets the filename (with path) - String get_file_name()const; - - //! Creates a new child canvas, and returns its handle - Handle new_child_canvas(); - - //! Creates a new child canvas with an ID of \a id, and returns its handle - Handle new_child_canvas(const String &id); - - //! Adds the given canvas as a child - Handle add_child_canvas(Handle child_canvas, const String &id); - - void remove_child_canvas(Handle child_canvas); - - etl::handle find_layer(const Point &pos); - - int get_depth(etl::handle)const; - - Context get_context()const; - - iterator end(); - - const_iterator end()const; - - reverse_iterator rbegin(); - - const_reverse_iterator rbegin()const; - - etl::handle &back(); - - void push_back(etl::handle x); - - void push_front(etl::handle x); - - void push_back_simple(etl::handle x); - - void insert(iterator iter,etl::handle x); - void erase(iterator iter); - - const etl::handle &back()const; - - void set_inline(LooseHandle parent); - - static Handle create(); - - static Handle create_inline(Handle parent); - - Handle clone(const GUID& deriv_guid=GUID())const; - - void register_external_canvas(String file, Handle canvas); - -#ifdef _DEBUG - void show_externals(String file, int line, String text) const; -#endif // _DEBUG - -private: - void add_group_pair(String group, etl::handle layer); - void remove_group_pair(String group, etl::handle layer); - void add_connection(etl::loose_handle layer, sigc::connection connection); - void disconnect_connections(etl::loose_handle layer); - -protected: - virtual void on_changed(); - virtual void get_times_vfunc(Node::time_set &set) const; -}; // END of class Canvas - -void optimize_layers(Time time, Context context, Canvas::Handle op_canvas, bool seen_motion_blur=false); - - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/canvasbase.h b/synfig-core/trunk/src/synfig/canvasbase.h deleted file mode 100644 index c20ace7..0000000 --- a/synfig-core/trunk/src/synfig/canvasbase.h +++ /dev/null @@ -1,47 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file canvasbase.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_CANVASBASE_H -#define __SYNFIG_CANVASBASE_H - -/* === H E A D E R S ======================================================= */ - -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -namespace synfig { - -class Layer; - -typedef std::deque< etl::handle< Layer > > CanvasBase; - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/color.cpp b/synfig-core/trunk/src/synfig/color.cpp deleted file mode 100644 index 1dcc314..0000000 --- a/synfig-core/trunk/src/synfig/color.cpp +++ /dev/null @@ -1,599 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file color.cpp -** \brief Color Class -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "color.h" -#include -#include -#include -#include - -#endif - -using namespace synfig; -using namespace etl; -using namespace std; - -/* === M A C R O S ========================================================= */ - -#define COLOR_EPSILON (0.000001f) - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - - - -ColorReal -Color::hex2real(String s) -{ - std::istringstream i(s); - int n; - i.fill('0'); - if (!(i >> hex >> n)) - throw String("bad conversion from hex string \"") + s + String("\""); - return n / 255.0f; -} - -const String -Color::real2hex(ColorReal c) -{ - std::ostringstream o; - o.width(2); - o.fill('0'); - if (c<0) c = 0; - if (c>1) c = 1; - o << hex << int(c*255.0f); - return o.str(); -} - -void -Color::set_hex(String& str) -{ - value_type r, g, b; - String hex; - - // use just the hex characters - for (String::const_iterator iter = str.begin(); iter != str.end(); iter++) - if (isxdigit(*iter)) - hex.push_back(*iter); - - try - { - if (hex.size() == 1) - { - r = hex2real(hex.substr(0,1)+hex.substr(0,1)); - r_ = g_ = b_ = r; - } - else if (hex.size() == 3) - { - r = hex2real(hex.substr(0,1)+hex.substr(0,1)); - g = hex2real(hex.substr(1,1)+hex.substr(1,1)); - b = hex2real(hex.substr(2,1)+hex.substr(2,1)); - r_ = r; g_ = g; b_ = b; - } - else if (hex.size() == 6) - { - r = hex2real(hex.substr(0,2)); - g = hex2real(hex.substr(2,2)); - b = hex2real(hex.substr(4,2)); - r_ = r; g_ = g; b_ = b; - } - } - catch (string s) - { - printf("caught <%s>\n", s.c_str()); - return; - } -} - -const String -Color::get_string(void)const -{ - std::ostringstream o; - o << std::fixed << std::setprecision(3) << "#" << get_hex() << " : " << std::setw(6) << a_; - return String(o.str().c_str()); -} - -#if 0 -Color& -Color::rotate_uv(const Angle& theta)const -{ -/*/ - Color ret(*this); - ret.set_hue(ret.get_hue()+theta); - return ret; -/*/ - const float - a(angle::sin(theta).get()), - b(angle::cos(theta).get()); - const float - u(get_u()), - v(get_v()); - - return set_uv(b*u-a*v,a*u+b*v); - //return YUV(get_y(),b*u-a*v,a*u+b*v,get_a()); -//*/ -} -#endif - -Color -Color::clamped_negative()const -{ - Color ret=*this; - - if(ret.a_==0) - return alpha(); - - if(ret.a_<0) - ret=-ret; - - if(ret.r_<0) - { - ret.g_-=ret.r_; - ret.b_-=ret.r_; - ret.r_=0.0f; - } - if(ret.g_<0) - { - ret.r_-=ret.g_; - ret.b_-=ret.g_; - ret.g_=0.0f; - } - if(ret.b_<0) - { - ret.r_-=ret.b_; - ret.g_-=ret.b_; - ret.b_=0.0f; - } - - if(ret.r_>1) ret.r_=1; - if(ret.g_>1) ret.g_=1; - if(ret.b_>1) ret.b_=1; - if(ret.a_>1) ret.a_=1; - - if(isnan(ret.get_r())) ret.r_=0.5; - if(isnan(ret.get_g())) ret.g_=0.5; - if(isnan(ret.get_b())) ret.b_=0.5; - if(isnan(ret.get_a())) ret.a_=1; - -/* - if(ret.r_>1) { ret.g_/=ret.r_; ret.b_/=ret.r_; ret.r_=1; } - if(ret.g_>1) { ret.r_/=ret.g_; ret.b_/=ret.g_; ret.g_=1; } - if(ret.b_>1) { ret.g_/=ret.b_; ret.r_/=ret.b_; ret.b_=1; } - if(ret.a_>1) ret.a_=1; -*/ - - return ret; -} - -Color -Color::clamped()const -{ - Color ret(*this); - if(ret.get_r()<0) - ret.set_r(0); - if(ret.get_g()<0) - ret.set_g(0); - if(ret.get_b()<0) - ret.set_b(0); - if(ret.get_a()<0) - ret.set_a(0); - - if(ret.r_>1) ret.r_=1; - if(ret.g_>1) ret.g_=1; - if(ret.b_>1) ret.b_=1; - if(ret.a_>1) ret.a_=1; - - if(isnan(ret.get_r())) ret.r_=0.5; - if(isnan(ret.get_g())) ret.g_=0.5; - if(isnan(ret.get_b())) ret.b_=0.5; - if(isnan(ret.get_a())) ret.a_=1; - - return(ret); -} - -typedef Color (*blendfunc)(Color &,Color &,float); - -static Color -blendfunc_COMPOSITE(Color &src,Color &dest,float amount) -{ - //c_dest'=c_src+(1.0-a_src)*c_dest - //a_dest'=a_src+(1.0-a_src)*a_dest - - float a_src=src.get_a()*amount; - float a_dest=dest.get_a(); - - // if a_arc==0.0 - //if(fabsf(a_src)COLOR_EPSILON) - { - dest/=a_dest; - dest.set_a(a_dest); - } - else - { - dest=Color::alpha(); - } - assert(dest.is_valid()); - return dest; -} - -static Color -blendfunc_STRAIGHT(Color &src,Color &bg,float amount) -{ - //a_out'=(a_src-a_bg)*amount+a_bg - //c_out'=(((c_src*a_src)-(c_bg*a_bg))*amount+(c_bg*a_bg))/a_out' - - // ie: if(amount==1.0) - //if(fabsf(amount-1.0f)COLOR_EPSILON) -// if(a_out>COLOR_EPSILON || a_out<-COLOR_EPSILON) - { - out=((src*src.get_a()-bg*bg.get_a())*amount+bg*bg.get_a())/a_out; - out.set_a(a_out); - } - else - out=Color::alpha(); - - assert(out.is_valid()); - return out; -} - -static Color -blendfunc_ONTO(Color &a,Color &b,float amount) -{ - float alpha(b.get_a()); - return blendfunc_COMPOSITE(a,b.set_a(1.0f),amount).set_a(alpha); -} - -static Color -blendfunc_STRAIGHT_ONTO(Color &a,Color &b,float amount) -{ - a.set_a(a.get_a()*b.get_a()); - return blendfunc_STRAIGHT(a,b,amount); -} - -static Color -blendfunc_BRIGHTEN(Color &a,Color &b,float amount) -{ - const float alpha(a.get_a()*amount); - - if(b.get_r()(a.get_r()-1.0f)*alpha+1.0f) - b.set_r((a.get_r()-1.0f)*alpha+1.0f); - - if(b.get_g()>(a.get_g()-1.0f)*alpha+1.0f) - b.set_g((a.get_g()-1.0f)*alpha+1.0f); - - if(b.get_b()>(a.get_b()-1.0f)*alpha+1.0f) - b.set_b((a.get_b()-1.0f)*alpha+1.0f); - - - return b; -} - -static Color -blendfunc_ADD(Color &a,Color &b,float amount) -{ - const float alpha(a.get_a()*amount); - - b.set_r(b.get_r()+a.get_r()*alpha); - b.set_g(b.get_g()+a.get_g()*alpha); - b.set_b(b.get_b()+a.get_b()*alpha); - - return b; -} - -static Color -blendfunc_SUBTRACT(Color &a,Color &b,float amount) -{ - const float alpha(a.get_a()*amount); - - b.set_r(b.get_r()-a.get_r()*alpha); - b.set_g(b.get_g()-a.get_g()*alpha); - b.set_b(b.get_b()-a.get_b()*alpha); - - return b; -} - -static Color -blendfunc_DIFFERENCE(Color &a,Color &b,float amount) -{ - const float alpha(a.get_a()*amount); - - b.set_r(abs(b.get_r()-a.get_r()*alpha)); - b.set_g(abs(b.get_g()-a.get_g()*alpha)); - b.set_b(abs(b.get_b()-a.get_b()*alpha)); - - return b; -} - -static Color -blendfunc_MULTIPLY(Color &a,Color &b,float amount) -{ - if(amount<0) a=~a, amount=-amount; - - amount*=a.get_a(); - b.set_r(((b.get_r()*a.get_r())-b.get_r())*(amount)+b.get_r()); - b.set_g(((b.get_g()*a.get_g())-b.get_g())*(amount)+b.get_g()); - b.set_b(((b.get_b()*a.get_b())-b.get_b())*(amount)+b.get_b()); - return b; -} - -static Color -blendfunc_DIVIDE(Color &a,Color &b,float amount) -{ - amount*=a.get_a(); - - // We add COLOR_EPSILON in order to avoid a divide-by-zero condition. - // This causes DIVIDE to bias toward positive values, but the effect is - // really negligible. There is a reason why we use COLOR_EPSILON--we - // want the change to be imperceptible. - - b.set_r(((b.get_r()/(a.get_r()+COLOR_EPSILON))-b.get_r())*(amount)+b.get_r()); - b.set_g(((b.get_g()/(a.get_g()+COLOR_EPSILON))-b.get_g())*(amount)+b.get_g()); - b.set_b(((b.get_b()/(a.get_b()+COLOR_EPSILON))-b.get_b())*(amount)+b.get_b()); - - return b; -} - -static Color -blendfunc_COLOR(Color &a,Color &b,float amount) -{ - Color temp(b); - temp.set_uv(a.get_u(),a.get_v()); - return (temp-b)*amount*a.get_a()+b; -} - -static Color -blendfunc_HUE(Color &a,Color &b,float amount) -{ - Color temp(b); - temp.set_hue(a.get_hue()); - return (temp-b)*amount*a.get_a()+b; -} - -static Color -blendfunc_SATURATION(Color &a,Color &b,float amount) -{ - Color temp(b); - temp.set_s(a.get_s()); - return (temp-b)*amount*a.get_a()+b; -} - -static Color -blendfunc_LUMINANCE(Color &a,Color &b,float amount) -{ - Color temp(b); - temp.set_y(a.get_y()); - return (temp-b)*amount*a.get_a()+b; -} - -static Color -blendfunc_BEHIND(Color &a,Color &b,float amount) -{ - if(a.get_a()==0)a.set_a(COLOR_EPSILON); //!< \todo this is a hack - a.set_a(a.get_a()*amount); - return blendfunc_COMPOSITE(b,a,1.0); -} - -static Color -blendfunc_ALPHA_BRIGHTEN(Color &a,Color &b,float amount) -{ - // \todo can this be right, multiplying amount by *b*'s alpha? - // compare with blendfunc_BRIGHTEN where it is multiplied by *a*'s - if(a.get_a() < b.get_a()*amount) - return a.set_a(a.get_a()*amount); - return b; -} - -static Color -blendfunc_ALPHA_DARKEN(Color &a,Color &b,float amount) -{ - if(a.get_a()*amount > b.get_a()) - return a.set_a(a.get_a()*amount); - return b; -} - -static Color -blendfunc_SCREEN(Color &a,Color &b,float amount) -{ - if(amount<0) a=~a, amount=-amount; - - a.set_r(1.0-(1.0f-a.get_r())*(1.0f-b.get_r())); - a.set_g(1.0-(1.0f-a.get_g())*(1.0f-b.get_g())); - a.set_b(1.0-(1.0f-a.get_b())*(1.0f-b.get_b())); - - return blendfunc_ONTO(a,b,amount); -} - -static Color -blendfunc_OVERLAY(Color &a,Color &b,float amount) -{ - if(amount<0) a=~a, amount=-amount; - - Color rm; - rm.set_r(b.get_r()*a.get_r()); - rm.set_g(b.get_g()*a.get_g()); - rm.set_b(b.get_b()*a.get_b()); - - Color rs; - rs.set_r(1.0-(1.0f-a.get_r())*(1.0f-b.get_r())); - rs.set_g(1.0-(1.0f-a.get_g())*(1.0f-b.get_g())); - rs.set_b(1.0-(1.0f-a.get_b())*(1.0f-b.get_b())); - - Color& ret(a); - - ret.set_r(a.get_r()*rs.get_r() + (1.0-a.get_r())*rm.get_r()); - ret.set_g(a.get_g()*rs.get_g() + (1.0-a.get_g())*rm.get_g()); - ret.set_b(a.get_b()*rs.get_b() + (1.0-a.get_b())*rm.get_b()); - - return blendfunc_ONTO(ret,b,amount); -} - -static Color -blendfunc_HARD_LIGHT(Color &a,Color &b,float amount) -{ - if(amount<0) a=~a, amount=-amount; - - if(a.get_r()>0.5f) a.set_r(1.0-(1.0f-(a.get_r()*2.0f-1.0f))*(1.0f-b.get_r())); - else a.set_r(b.get_r()*(a.get_r()*2.0f)); - if(a.get_g()>0.5f) a.set_g(1.0-(1.0f-(a.get_g()*2.0f-1.0f))*(1.0f-b.get_g())); - else a.set_g(b.get_g()*(a.get_g()*2.0f)); - if(a.get_b()>0.5f) a.set_b(1.0-(1.0f-(a.get_b()*2.0f-1.0f))*(1.0f-b.get_b())); - else a.set_b(b.get_b()*(a.get_b()*2.0f)); - - return blendfunc_ONTO(a,b,amount); -} - -static Color -blendfunc_ALPHA_OVER(Color &a,Color &b,float amount) -{ - Color rm(b); - - //multiply the inverse alpha channel with the one below us - rm.set_a((1-a.get_a())*b.get_a()); - - return blendfunc_STRAIGHT(rm,b,amount); -} - - -Color -Color::blend(Color a, Color b,float amount, Color::BlendMethod type) -{ -#if 0 - if(isnan(a.get_r()) || isnan(a.get_g()) || isnan(a.get_b())) - { -#ifdef _DEBUG - a=magenta().set_a(a.get_a()); -#else - a=black().set_a(a.get_a()); -#endif - } - - if(isnan(b.get_r()) || isnan(b.get_g()) || isnan(b.get_b())) - { -#ifdef _DEBUG - b=magenta().set_a(b.get_a()); -#else - b=black().set_a(b.get_a()); -#endif - } -#endif - -/* - if(!a.is_valid()&&b.is_valid()) - return b; - - if(a.is_valid()&&!b.is_valid()) - return a; - - if(!a.is_valid()||!b.is_valid()) - { -#ifdef _DEBUG - return magenta(); -#else - return black(); -#endif - } -*/ - - // No matter what blend method is being used, - // if the amount is equal to zero, then only B - // will shine through - if(fabsf(amount)<=COLOR_EPSILON)return b; - - assert(type -#include -#include -#include "gamma.h" -#include - -#ifdef USE_HALF_TYPE -#include -#endif - -#ifndef SYNFIG_NO_ANGLE -# include "angle.h" -#endif - -/* === M A C R O S ========================================================= */ - -#define use_colorspace_gamma() App::use_colorspace_gamma -#define colorspace_gamma() (2.2f) -#define gamma_in(x) ((x>=0) ? pow((float)x,1.0f/colorspace_gamma()) : -pow((float)-x,1.0f/colorspace_gamma())) -#define gamma_out(x) ((x>=0) ? pow((float)x, colorspace_gamma()) : -pow((float)-x, colorspace_gamma())) - -#ifdef WIN32 -#include -#ifndef isnan -extern "C" { int _isnan(double x); } -#define isnan _isnan -#endif -#endif - -// For some reason isnan() isn't working on macosx any more. -// This is a quick fix. -#if defined(__APPLE__) && !defined(SYNFIG_ISNAN_FIX) -#ifdef isnan -#undef isnan -#endif -inline bool isnan(double x) { return x != x; } -inline bool isnan(float x) { return x != x; } -#define SYNFIG_ISNAN_FIX 1 -#endif - -namespace synfig { - -#ifdef USE_HALF_TYPE -typedef half ColorReal; -#else -typedef float ColorReal; -#endif - -static const float EncodeYUV[3][3]= -{ - { 0.299f, 0.587f, 0.114f }, - { -0.168736f, -0.331264f, 0.5f }, - { 0.5f, -0.418688f, -0.081312f } -}; - -static const float DecodeYUV[3][3]= -{ - { 1.0f, 0.0f, 1.402f }, - { 1.0f, -0.344136f, -0.714136f }, - { 1.0f, 1.772f, 0.0f } -}; - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -#ifdef USE_HALF_TYPE -class ColorAccumulator; -#endif - - - - -/*! \class Color -** \todo Writeme -** Future optimizations: lookup table for sqrt()? -*/ -class Color -{ -public: - typedef ColorReal value_type; - -private: - value_type a_, r_, g_, b_; - -public: - - const String get_string(void)const; - - Color & - operator+=(const Color &rhs) - { - r_+=rhs.r_; - g_+=rhs.g_; - b_+=rhs.b_; - a_+=rhs.a_; - return *this; - } - - Color & - operator-=(const Color &rhs) - { - r_-=rhs.r_; - g_-=rhs.g_; - b_-=rhs.b_; - a_-=rhs.a_; - return *this; - } - - Color & - operator*=(const float &rhs) - { - r_*=rhs; - g_*=rhs; - b_*=rhs; - a_*=rhs; - return *this; - } - - Color & - operator/=(const float &rhs) - { - const float temp(value_type(1)/rhs); - r_*=temp; - g_*=temp; - b_*=temp; - a_*=temp; - return *this; - } - - Color - operator+(const Color &rhs)const - { return Color(*this)+=rhs; } - - Color - operator-(const Color &rhs)const - { return Color(*this)-=rhs; } - - Color - operator*(const float &rhs)const - { return Color(*this)*=rhs; } - - Color - operator/(const float &rhs)const - { return Color(*this)/=rhs; } - - bool - operator==(const Color &rhs)const - { return r_==rhs.r_ && g_==rhs.g_ && b_==rhs.b_ && a_==rhs.a_; } - - bool - operator!=(const Color &rhs)const - { return r_!=rhs.r_ || g_!=rhs.g_ || b_!=rhs.b_ || a_!=rhs.a_; } - - Color - operator-()const - { return Color(-r_,-g_,-b_,-a_); } - - //! Effectively 1.0-color - Color - operator~()const - { return Color(1.0f-r_,1.0f-g_,1.0f-b_,a_); } - - bool is_valid()const - { return !isnan(r_) && !isnan(g_) && !isnan(b_) && !isnan(a_); } - - Color premult_alpha() const - { - return Color (r_*a_, g_*a_, b_*a_, a_); - } - - Color demult_alpha() const - { - if(a_) - { - const value_type inva = 1/a_; - return Color (r_*inva, g_*inva, b_*inva, a_); - }else return alpha(); - } - -public: - // ETL/trunk/ETL/_gaussian.h does: - // SR1=SR2=SR3=typename T::value_type(); - // and expects that to give it initialized colors - // Otherwise the 'gaussian' blur type is random. - Color() :a_(0), r_(0), g_(0), b_(0) { } - Color(const value_type &f) :a_(f),r_(f), g_(f), b_(f) { } - Color(int f) :a_(f),r_(f), g_(f), b_(f) { } - - /*! \param R Red - ** \param G Green - ** \param B Blue - ** \param A Opacity(alpha) */ - Color(const value_type& R, const value_type& G, const value_type& B, const value_type& A=1): - a_(A), - r_(R), - g_(G), - b_(B) { } - - /*! \param c Source for color components - ** \param A Opacity(alpha) */ - Color(const Color& c, const value_type& A): - a_(A), - r_(c.r_), - g_(c.g_), - b_(c.b_) { } - - - //! Copy constructor - Color(const Color& c): - a_(c.a_), - r_(c.r_), - g_(c.g_), - b_(c.b_) { } - -#ifdef USE_HALF_TYPE - friend class ColorAccumulator; - //! Convert constructor - Color(const ColorAccumulator& c); -#endif - - //! Copy constructor - //Color(const Color &c) { memcpy((void*)this, (const void*)&c, sizeof(Color)); } - - /*const Color &operator=(const value_type &i) - { - r_ = g_ = b_ = a_ = i; - return *this; - }*/ - //Color& operator=(const Color &c) { memcpy((void*)this, (const void*)&c, sizeof(Color)); return *this; } - - //! Returns the RED component - const value_type& get_r()const { return r_; } - - //! Returns the GREEN component - const value_type& get_g()const { return g_; } - - //! Returns the BLUE component - const value_type& get_b()const { return b_; } - - //! Returns the amount of opacity (alpha) - const value_type& get_a()const { return a_; } - - //! Synonym for get_a(). \see get_a() - const value_type& get_alpha()const { return get_a(); } - - //! Converts a 2 character hex string \a s (00-ff) into a ColorReal (0.0-1.0) - static ColorReal hex2real(String s); - - //! Converts a ColorReal \a c (0.0-1.0) into a 2 character hex string (00-ff) - static const String real2hex(ColorReal c); - - //! Returns the color as a 6 character hex sting - const String get_hex()const { return String(real2hex(r_)+real2hex(g_)+real2hex(b_)); } - - //! Sets the color's R, G, and B from a 3 or 6 character hex string - void set_hex(String& hex); - - //! Sets the RED component to \a x - Color& set_r(const value_type& x) { r_ = x; return *this; } - - //! Sets the GREEN component to \a x - Color& set_g(const value_type& x) { g_ = x; return *this; } - - //! Sets the BLUE component to \a x - Color& set_b(const value_type& x) { b_ = x; return *this; } - - //! Sets the opacity (alpha) to \a x - Color& set_a(const value_type& x) { a_ = x; return *this; } - - //! Synonym for set_a(). \see set_a() - Color& set_alpha(const value_type& x) { return set_a(x); } - - //! Returns color's luminance - float - get_y() const - { - return - (float)get_r()*EncodeYUV[0][0]+ - (float)get_g()*EncodeYUV[0][1]+ - (float)get_b()*EncodeYUV[0][2]; - } - - - //! Returns U component of chromanance - float - get_u() const - { - return - (float)get_r()*EncodeYUV[1][0]+ - (float)get_g()*EncodeYUV[1][1]+ - (float)get_b()*EncodeYUV[1][2]; - } - - - //! Returns V component of chromanance - float - get_v() const - { - return - (float)get_r()*EncodeYUV[2][0]+ - (float)get_g()*EncodeYUV[2][1]+ - (float)get_b()*EncodeYUV[2][2]; - } - - //! Returns the color's saturation - /*! This is is the magnitude of the U and V components. - ** \see set_s() */ - float - get_s() const - { - const float u(get_u()), v(get_v()); - return sqrt(u*u+v*v); - } - - //! Sets the luminance (\a y) and chromanance (\a u and \a v) - Color& - set_yuv(const float &y, const float &u, const float &v) - { - set_r(y*DecodeYUV[0][0]+u*DecodeYUV[0][1]+v*DecodeYUV[0][2]); - set_g(y*DecodeYUV[1][0]+u*DecodeYUV[1][1]+v*DecodeYUV[1][2]); - set_b(y*DecodeYUV[2][0]+u*DecodeYUV[2][1]+v*DecodeYUV[2][2]); - return *this; - } - - //! Sets color luminance - Color& set_y(const float &y) { return set_yuv(y,get_u(),get_v()); } - - //! Set U component of chromanance - Color& set_u(const float &u) { return set_yuv(get_y(),u,get_v()); } - - //! Set V component of chromanance - Color& set_v(const float &v) { return set_yuv(get_y(),get_u(),v); } - - //! Set the U and V components of chromanance - Color& set_uv(const float& u, const float& v) { return set_yuv(get_y(),u,v); } - - //! Sets the color's saturation - /*! \see get_s() */ - Color& - set_s(const float &x) - { - float u(get_u()), v(get_v()); - const float s(sqrt(u*u+v*v)); - if(s) - { - u=(u/s)*x; - v=(v/s)*x; - return set_uv(u,v); - } - return *this; - } - - //! YUV Color constructor - static Color YUV(const float& y, const float& u, const float& v, const value_type& a=1) - { return Color().set_yuv(y,u,v).set_a(a); } - -#ifndef SYNFIG_NO_ANGLE - //! Returns the hue of the chromanance - /*! This is the angle of the U and V components. - ** \see set_hue() */ - Angle - get_hue() const - { return Angle::tan(get_u(),get_v()); } - - //! Synonym for get_hue(). \see get_hue() - Angle get_uv_angle() const { return get_hue(); } - - //! Sets the color's hue - /*! \see get_hue() */ - Color& - set_hue(const Angle& theta) - { - const float s(get_s()); - const float - u(s*(float)Angle::sin(theta).get()), - v(s*(float)Angle::cos(theta).get()); - return set_uv(u,v); - } - - //! Synonym for set_hue(). \see set_hue() - Color& set_uv_angle(const Angle& theta) { return set_hue(theta); } - - //! Rotates the chromanance vector by amount specified by \a theta - Color& rotate_uv(const Angle& theta) - { - const float a(Angle::sin(theta).get()), b(Angle::cos(theta).get()); - const float u(get_u()), v(get_v()); - - return set_uv(b*u-a*v,a*u+b*v); - } - - //! Sets the luminance (\a y) and chromanance (\a s and \a theta). - /*! \param y Luminance - ** \param s Saturation - ** \param theta Hue */ - Color& set_yuv(const float& y, const float& s, const Angle& theta) - { - return - set_yuv( - y, - s*(float)Angle::sin(theta).get(), - s*(float)Angle::cos(theta).get() - ); - } - - //! YUV color constructor where the chroma is in the saturation/hue form. - /*! \param y Luminance - ** \param s Saturation - ** \param theta Hue - ** \param a Opacity (alpha) */ - static Color YUV(const float& y, const float& s, const Angle& theta, const value_type& a=1) - { return Color().set_yuv(y,s,theta).set_a(a); } - -#endif - - //! Clamps a color so that its values are in range. Ignores attempting to visualize negative colors. - Color clamped()const; - - //! Clamps a color so that its values are in range. - Color clamped_negative()const; - - /* Preset Colors */ - - //! Preset Color Constructors - //@{ -#ifdef HAS_VIMAGE - static inline Color alpha() { return Color(0,0,0,0.0000001f); } -#else - static inline Color alpha() { return Color(0,0,0,0); } -#endif - static inline Color black() { return Color(0,0,0); } - static inline Color white() { return Color(1,1,1); } - static inline Color gray() { return Color(0.5f,0.5f,0.5f); } - static inline Color magenta() { return Color(1,0,1); } - static inline Color red() { return Color(1,0,0); } - static inline Color green() { return Color(0,1,0); } - static inline Color blue() { return Color(0,0,1); } - static inline Color cyan() { return Color(0,1,1); } - static inline Color yellow() { return Color(1,1,0); } - //@} - - //! \writeme - enum BlendMethod - { - BLEND_COMPOSITE=0, //!< Color A is composited onto B (Taking A's alpha into account) - BLEND_STRAIGHT=1, //!< Straight linear interpolation from A->B (Alpha ignored) - BLEND_ONTO=13, //!< Similar to BLEND_COMPOSITE, except that B's alpha is maintained - BLEND_STRAIGHT_ONTO=21, //!< \deprecated \writeme - BLEND_BEHIND=12, //!< Similar to BLEND_COMPOSITE, except that B is composited onto A. - BLEND_SCREEN=16, //!< \writeme - BLEND_OVERLAY=20, //!< \writeme - BLEND_HARD_LIGHT=17, //!< \writeme - BLEND_MULTIPLY=6, //!< Simple A*B. - BLEND_DIVIDE=7, //!< Simple B/A - BLEND_ADD=4, //!< Simple A+B. - BLEND_SUBTRACT=5, //!< Simple A-B. - BLEND_DIFFERENCE=18, //!< Simple |A-B|. - BLEND_BRIGHTEN=2, //!< If composite is brighter than B, use composite. B otherwise. - BLEND_DARKEN=3, //!< If composite is darker than B, use composite. B otherwise. - BLEND_COLOR=8, //!< Preserves the U and V channels of color A - BLEND_HUE=9, //!< Preserves the angle of the UV vector of color A - BLEND_SATURATION=10, //!< Preserves the magnitude of the UV Vector of color A - BLEND_LUMINANCE=11, //!< Preserves the Y channel of color A - - BLEND_ALPHA_BRIGHTEN=14, //!< \deprecated If A is less opaque than B, use A - BLEND_ALPHA_DARKEN=15, //!< \deprecated If A is more opaque than B, use B - BLEND_ALPHA_OVER=19, //!< \deprecated multiply alphas and then straight blends using the amount - - BLEND_END=22 //!< \internal - }; - - /* Other */ - static Color blend(Color a, Color b,float amount,BlendMethod type=BLEND_COMPOSITE); - - static bool is_onto(BlendMethod x) - { - return x==BLEND_BRIGHTEN - || x==BLEND_DARKEN - || x==BLEND_ADD - || x==BLEND_SUBTRACT - || x==BLEND_MULTIPLY - || x==BLEND_DIVIDE - || x==BLEND_COLOR - || x==BLEND_HUE - || x==BLEND_SATURATION - || x==BLEND_LUMINANCE - || x==BLEND_ONTO - || x==BLEND_STRAIGHT_ONTO - || x==BLEND_SCREEN - || x==BLEND_OVERLAY - || x==BLEND_DIFFERENCE - || x==BLEND_HARD_LIGHT - ; - } - - //! a blending method is considered 'straight' if transparent pixels in the upper layer can affect the result of the blend - static bool is_straight(BlendMethod x) - { - return x==BLEND_STRAIGHT - || x==BLEND_STRAIGHT_ONTO - || x==BLEND_ALPHA_BRIGHTEN - ; - } -/*protected: - - value_type& operator[](const int i) - { - assert(i>=0); - assert(i<(signed)(sizeof(Color)/sizeof(value_type))); - return (&r_)[i]; - } - - const value_type& operator[](const int i)const - { - assert(i>=0); - assert(i<(signed)(sizeof(Color)/sizeof(value_type))); - return (&r_)[i]; - } -*/ -}; // END of class Color - -#ifndef USE_HALF_TYPE -typedef Color ColorAccumulator; -#else -class ColorAccumulator -{ - friend class Color; -public: - typedef float value_type; - -private: - value_type a_, r_, g_, b_; - -public: - - ColorAccumulator & - operator+=(const ColorAccumulator &rhs) - { - r_+=rhs.r_; - g_+=rhs.g_; - b_+=rhs.b_; - a_+=rhs.a_; - return *this; - } - - ColorAccumulator & - operator-=(const ColorAccumulator &rhs) - { - r_-=rhs.r_; - g_-=rhs.g_; - b_-=rhs.b_; - a_-=rhs.a_; - return *this; - } - - ColorAccumulator & - operator*=(const float &rhs) - { - r_*=rhs; - g_*=rhs; - b_*=rhs; - a_*=rhs; - return *this; - } - - ColorAccumulator & - operator/=(const float &rhs) - { - const float temp(value_type(1)/rhs); - r_*=temp; - g_*=temp; - b_*=temp; - a_*=temp; - return *this; - } - - ColorAccumulator - operator+(const ColorAccumulator &rhs)const - { return Color(*this)+=rhs; } - - ColorAccumulator - operator-(const ColorAccumulator &rhs)const - { return Color(*this)-=rhs; } - - ColorAccumulator - operator*(const float &rhs)const - { return Color(*this)*=rhs; } - - ColorAccumulator - operator/(const float &rhs)const - { return Color(*this)/=rhs; } - - bool - operator==(const ColorAccumulator &rhs)const - { return r_==rhs.r_ && g_==rhs.g_ && b_==rhs.b_ && a_!=rhs.a_; } - - bool - operator!=(const ColorAccumulator &rhs)const - { return r_!=rhs.r_ || g_!=rhs.g_ || b_!=rhs.b_ || a_!=rhs.a_; } - - Color - operator-()const - { return ColorAccumulator(-r_,-g_,-b_,-a_); } - - bool is_valid()const - { return !isnan(r_) && !isnan(g_) && !isnan(b_) && !isnan(a_); } - -public: - ColorAccumulator() { } - - /*! \param R Red - ** \param G Green - ** \param B Blue - ** \param A Opacity(alpha) */ - ColorAccumulator(const value_type& R, const value_type& G, const value_type& B, const value_type& A=1): - a_(A), - r_(R), - g_(G), - b_(B) { } - - //! Copy constructor - ColorAccumulator(const ColorAccumulator& c): - a_(c.a_), - r_(c.r_), - g_(c.g_), - b_(c.b_) { } - - //! Converter - ColorAccumulator(const Color& c): - a_(c.a_), - r_(c.r_), - g_(c.g_), - b_(c.b_) { } - - //! Converter - ColorAccumulator(int c): a_(c),r_(c), g_(c), b_(c) { } - - //! Returns the RED component - const value_type& get_r()const { return r_; } - - //! Returns the GREEN component - const value_type& get_g()const { return g_; } - - //! Returns the BLUE component - const value_type& get_b()const { return b_; } - - //! Returns the amount of opacity (alpha) - const value_type& get_a()const { return a_; } - - //! Synonym for get_a(). \see get_a() - const value_type& get_alpha()const { return get_a(); } - - //! Sets the RED component to \a x - ColorAccumulator& set_r(const value_type& x) { r_ = x; return *this; } - - //! Sets the GREEN component to \a x - ColorAccumulator& set_g(const value_type& x) { g_ = x; return *this; } - - //! Sets the BLUE component to \a x - ColorAccumulator& set_b(const value_type& x) { b_ = x; return *this; } - - //! Sets the opacity (alpha) to \a x - ColorAccumulator& set_a(const value_type& x) { a_ = x; return *this; } - - //! Synonym for set_a(). \see set_a() - ColorAccumulator& set_alpha(const value_type& x) { return set_a(x); } -}; - -inline -Color::Color(const ColorAccumulator& c): - a_(c.a_), - r_(c.r_), - g_(c.g_), - b_(c.b_) { } - -#endif - - - - - -enum PixelFormat -{ -/* Bit Descriptions (ON/OFF) -** ----+------------- -** 0 Color Channels (Gray/RGB) -** 1 Alpha Channel (WITH/WITHOUT) -** 2 ZDepth (WITH/WITHOUT) -** 3 Endian (BGR/RGB) -** 4 Alpha Location (Start/End) -** 5 ZDepth Location (Start/End) -** 6 Alpha/ZDepth Arrangement (ZA,AZ) -** 7 Alpha Range (Inverted,Normal) -** 8 Z Range (Inverted,Normal) -*/ - PF_RGB=0, - PF_GRAY=(1<<0), //!< If set, use one grayscale channel. If clear, use three channels for RGB - PF_A=(1<<1), //!< If set, include alpha channel - PF_Z=(1<<2), //!< If set, include ZDepth channel - PF_BGR=(1<<3), //!< If set, reverse the order of the RGB channels - PF_A_START=(1<<4), //!< If set, alpha channel is before the color data. If clear, it is after. - PF_Z_START=(1<<5), //!< If set, ZDepth channel is before the color data. If clear, it is after. - PF_ZA=(1<<6), //!< If set, the ZDepth channel will be in front of the alpha channel. If clear, they are reversed. - - PF_A_INV=(1<<7), //!< If set, the alpha channel is stored as 1.0-a - PF_Z_INV=(1<<8), //!< If set, the ZDepth channel is stored as 1.0-z - PF_RAW_COLOR=(1<<9)+(1<<1) //!< If set, the data represents a raw Color data structure, and all other bits are ignored. -}; - -inline PixelFormat operator|(PixelFormat lhs, PixelFormat rhs) - { return static_cast((int)lhs|(int)rhs); } - -inline PixelFormat operator&(PixelFormat lhs, PixelFormat rhs) - { return static_cast((int)lhs&(int)rhs); } -#define FLAGS(x,y) (((x)&(y))==(y)) - -//! Returns the number of channels that the given PixelFormat calls for -inline int -channels(PixelFormat x) -{ - int chan=0; - if(FLAGS(x,PF_GRAY)) - ++chan; - else - chan+=3; - if(FLAGS(x,PF_A)) - ++chan; - if(FLAGS(x,PF_Z)) - ++chan; - if(FLAGS(x,PF_RAW_COLOR)) - chan=sizeof(Color); - - return chan; -} - -inline unsigned char * -Color2PixelFormat(const Color &color, const PixelFormat &pf, unsigned char *out, const Gamma &gamma) -{ - if(FLAGS(pf,PF_RAW_COLOR)) - { - Color *outcol=reinterpret_cast(out); - *outcol=color; - out+=sizeof(color); - return out; - } - - int alpha=(int)((FLAGS(pf,PF_A_INV)?(-(float)color.get_a()+1):(float)color.get_a())*255); - if(alpha<0)alpha=0; - if(alpha>255)alpha=255; - - if(FLAGS(pf,PF_ZA|PF_A_START|PF_Z_START)) - { - if(FLAGS(pf,PF_Z_START)) - *out++/*=(unsigned char)(color.GetZ()*255.0f)*/; - if(FLAGS(pf,PF_A_START)) - *out++=static_cast(alpha); - } - else - { - if(FLAGS(pf,PF_A_START)) - *out++=static_cast(alpha); - if(FLAGS(pf,PF_Z_START)) - *out++/*=(unsigned char)(color.GetZ()*255.0f)*/; - - } - - if(FLAGS(pf,PF_GRAY)) - *out++=static_cast(gamma.g_F32_to_U8(color.get_y())); - else - { - if(FLAGS(pf,PF_BGR)) - { - *out++=static_cast(gamma.r_F32_to_U8(color.get_b())); - *out++=static_cast(gamma.g_F32_to_U8(color.get_g())); - *out++=static_cast(gamma.b_F32_to_U8(color.get_r())); - } - else - { - *out++=static_cast(gamma.r_F32_to_U8(color.get_r())); - *out++=static_cast(gamma.g_F32_to_U8(color.get_g())); - *out++=static_cast(gamma.b_F32_to_U8(color.get_b())); - } - } - - if(FLAGS(pf,PF_ZA)) - { - if(!FLAGS(pf,PF_Z_START) && FLAGS(pf,PF_Z)) - out++;//*out++=(unsigned char)(color.GetZ()*255.0f); - if(!FLAGS(pf,PF_A_START) && FLAGS(pf,PF_A)) - *out++=static_cast(alpha); - } - else - { - if(!FLAGS(pf,PF_Z_START) && FLAGS(pf,PF_Z)) - out++;//*out++=(unsigned char)(color.GetZ()*255.0f); - if(!FLAGS(pf,PF_A_START) && FLAGS(pf,PF_A)) - *out++=static_cast(alpha); - } - return out; -} - -inline void -convert_color_format(unsigned char *dest, const Color *src, int w, PixelFormat pf,const Gamma &gamma) -{ - assert(w>=0); - while(w--) - dest=Color2PixelFormat((*(src++)).clamped(),pf,dest,gamma); -} - -inline const unsigned char * -PixelFormat2Color(Color &color, const PixelFormat &pf,const unsigned char *out) -{ - if(FLAGS(pf,PF_ZA|PF_A_START|PF_Z_START)) - { - if(FLAGS(pf,PF_Z_START)) - out++;//color.SetZ((Color::value_type)*out++/255.0f); - if(FLAGS(pf,PF_A_START)) - color.set_a((float)*out++/255); - } - else - { - if(FLAGS(pf,PF_A_START)) - color.set_a((float)*out++/255); - if(FLAGS(pf,PF_Z_START)) - out++;//color.SetZ((Color::value_type)*out++/255.0f); - } - - if(FLAGS(pf,PF_GRAY)) - color.set_yuv((float)*out++/255,0,0); - else - { - if(FLAGS(pf,PF_BGR)) - { - color.set_b((float)*out++/255); - color.set_g((float)*out++/255); - color.set_r((float)*out++/255); - } - else - { - color.set_r((float)*out++/255); - color.set_g((float)*out++/255); - color.set_b((float)*out++/255); - } - } - - if(FLAGS(pf,PF_ZA)) - { - if(!FLAGS(pf,PF_Z_START) && FLAGS(pf,PF_Z)) - out++;//color.SetZ((Color::value_type)*out++/255.0f); - if(!FLAGS(pf,PF_A_START) && FLAGS(pf,PF_A)) - color.set_a((float)*out++/255); - } - else - { - if(!FLAGS(pf,PF_A_START) && FLAGS(pf,PF_A)) - color.set_a((float)*out++/255); - if(!FLAGS(pf,PF_Z_START) && FLAGS(pf,PF_Z)) - out++;//color.SetZ((Color::value_type)*out++/255.0f); - } - return out; -} - - - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/context.cpp b/synfig-core/trunk/src/synfig/context.cpp deleted file mode 100644 index 38e0f67..0000000 --- a/synfig-core/trunk/src/synfig/context.cpp +++ /dev/null @@ -1,421 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file context.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "context.h" -#include "layer.h" -#include "layer_composite.h" -#include "string.h" -#include "vector.h" -#include "color.h" -#include "surface.h" -#include "renddesc.h" -#include "valuenode.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -// #define SYNFIG_PROFILE_LAYERS -// #define SYNFIG_DEBUG_LAYERS - -/* === G L O B A L S ======================================================= */ - -#ifdef SYNFIG_PROFILE_LAYERS -#include -static int depth(0); -static std::map time_table; -static std::map run_table; -static etl::clock profile_timer; -static String curr_layer; -static void -_print_profile_report() -{ - synfig::info(">>>> Profile Report: (Times are in msecs)"); - std::map::iterator iter; - float total_time(0); - for(iter=time_table.begin();iter!=time_table.end();++iter) - { - String layer(iter->first); - float time(iter->second); - int runs(run_table[layer]); - total_time+=time; - synfig::info(" Layer \"%s\",\tExecs: %03d, Avg Time: %05.1f, Total Time: %05.1f",layer.c_str(),runs,time/runs*1000,time*1000); - } - synfig::info("Total Time: %f seconds", total_time); - synfig::info("<<<< End of Profile Report"); -} -#endif // SYNFIG_PROFILE_LAYERS - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -Color -Context::get_color(const Point &pos)const -{ - Context context(*this); - - while(!context->empty()) - { - // If this layer is active, then go - // ahead and break out of the loop - if((*context)->active()) - break; - - // Otherwise, we want to keep searching - // till we find either an active layer, - // or the end of the layer list - ++context; - } - - // If this layer isn't defined, return alpha - if((context)->empty()) return Color::alpha(); - - RWLock::ReaderLock lock((*context)->get_rw_lock()); - - return (*context)->get_color(context+1, pos); -} - -Rect -Context::get_full_bounding_rect()const -{ - Context context(*this); - - while(!context->empty()) - { - // If this layer is active, then go - // ahead and break out of the loop - if((*context)->active()) - break; - - // Otherwise, we want to keep searching - // till we find either an active layer, - // or the end of the layer list - ++context; - } - - // If this layer isn't defined, return zero-sized rectangle - if(context->empty()) return Rect::zero(); - - return (*context)->get_full_bounding_rect(context+1); -} - - -/* Profiling will go like this: - Profile start = +, stop = - - - + - - - - time diff is recorded - - to get the independent times we need to break at the one inside and record etc... - so it looks more like this: - - + - - - + - - - + - ... - - - + - - - + - - - - at each minus we must record all the info for that which we are worried about... - each layer can do work before or after the other work is done... so both values must be recorded... -*/ - -bool -Context::accelerated_render(Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb) const -{ -#ifdef SYNFIG_PROFILE_LAYERS - String layer_name(curr_layer); - - //sum the pre-work done by layer above us... (curr_layer is layer above us...) - if(depth>0) - { - time_table[curr_layer]+=profile_timer(); - //if(run_table.count(curr_layer))run_table[curr_layer]++; - // else run_table[curr_layer]=1; - } -#endif // SYNFIG_PROFILE_LAYERS - - const Rect bbox(renddesc.get_rect()); - - // this is going to be set to true if this layer contributes - // nothing, but it's a straight blend with non-zero amount, and so - // it has an effect anyway - bool straight_and_empty = false; - etl::handle composite; - Context context(*this); - - for(;!(context)->empty();++context) - { - // If we are not active then move on to next layer - if(!(*context)->active()) - continue; - - const Rect layer_bounds((*context)->get_bounding_rect()); - composite = etl::handle::cast_dynamic(*context); - - // If the box area is less than zero or the boxes do not - // intersect then move on to next layer, unless the layer is - // using a straight blend and has a non-zero amount, in which - // case it will still affect the result - if(layer_bounds.area() <= 0.0000000000001 || !(layer_bounds && bbox)) - { - if (composite && - Color::is_straight(composite->get_blend_method()) && - composite->get_amount() != 0.0f) - { - straight_and_empty = true; - break; - } - continue; - } - - // If this layer has Straight as the blend method and amount - // is 1.0, and the layer doesn't depend on its context, then - // we don't want to render the context - if (composite && - composite->get_blend_method() == Color::BLEND_STRAIGHT && - composite->get_amount() == 1.0f && - !composite->reads_context()) - { - Layer::Handle layer = *context; - while (!context->empty()) context++; // skip the context - return layer->accelerated_render(context,surface,quality,renddesc, cb); - } - - // Break out of the loop--we have found a good layer - break; - } - - // If this layer isn't defined, return alpha - if (context->empty() || (straight_and_empty && composite->get_amount() == 1.0f)) - { -#ifdef SYNFIG_DEBUG_LAYERS - synfig::info("Context::accelerated_render(): Hit end of list"); -#endif // SYNFIG_DEBUG_LAYERS - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - surface->clear(); -#ifdef SYNFIG_PROFILE_LAYERS - profile_timer.reset(); -#endif // SYNFIG_PROFILE_LAYERS - return true; - } - -#ifdef SYNFIG_DEBUG_LAYERS - synfig::info("Context::accelerated_render(): Descending into %s",(*context)->get_name().c_str()); -#endif // SYNFIG_DEBUG_LAYERS - - try { - RWLock::ReaderLock lock((*context)->get_rw_lock()); - -#ifdef SYNFIG_PROFILE_LAYERS - //go down one layer :P - depth++; - curr_layer=(*context)->get_name(); //make sure the layer inside is referring to the correct layer outside - profile_timer.reset(); // + -#endif // SYNFIG_PROFILE_LAYERS - - bool ret; - - // this layer doesn't draw anything onto the canvas we're - // rendering, but it uses straight blending, so we need to render - // the stuff under us and then blit transparent pixels over it - // using the appropriate 'amount' - if (straight_and_empty) - { - if ((ret = Context((context+1)).accelerated_render(surface,quality,renddesc,cb))) - { - Surface clearsurface; - clearsurface.set_wh(renddesc.get_w(),renddesc.get_h()); - clearsurface.clear(); - - Surface::alpha_pen apen(surface->begin()); - apen.set_alpha(composite->get_amount()); - apen.set_blend_method(composite->get_blend_method()); - - clearsurface.blit_to(apen); - } - } - else - ret = (*context)->accelerated_render(context+1,surface,quality,renddesc, cb); - -#ifdef SYNFIG_PROFILE_LAYERS - //post work for the previous layer - time_table[curr_layer]+=profile_timer(); //- - if(run_table.count(curr_layer))run_table[curr_layer]++; - else run_table[curr_layer]=1; - - depth--; - curr_layer = layer_name; //we are now onto this layer (make sure the post gets recorded correctly... - - //print out the table it we're done... - if(depth==0) _print_profile_report(),time_table.clear(),run_table.clear(); - profile_timer.reset(); //+ -#endif // SYNFIG_PROFILE_LAYERS - - return ret; - } - catch(std::bad_alloc) - { - synfig::error("Context::accelerated_render(): Layer \"%s\" threw a bad_alloc exception!",(*context)->get_name().c_str()); -#ifdef _DEBUG - return false; -#else // _DEBUG - ++context; - return context.accelerated_render(surface, quality, renddesc, cb); -#endif // _DEBUG - } - catch(...) - { - synfig::error("Context::accelerated_render(): Layer \"%s\" threw an exception, rethrowing...",(*context)->get_name().c_str()); - throw; - } -} - -void -Context::set_time(Time time)const -{ - Context context(*this); - while(!(context)->empty()) - { - // If this layer is active, and - // it either isn't already set to the given time or - // it's a time loop layer, - // then break out of the loop and set its time - if((*context)->active() && - (!(*context)->dirty_time_.is_equal(time) || - (*context)->get_name() == "timeloop")) - break; - - // Otherwise, we want to keep searching - // till we find either an active layer, - // or the end of the layer list - ++context; - } - - // If this layer isn't defined, just return - if((context)->empty()) return; - - // Set up a writer lock - RWLock::WriterLock lock((*context)->get_rw_lock()); - - //synfig::info("%s: dirty_time=%f",(*context)->get_name().c_str(),(float)(*context)->dirty_time_); - //synfig::info("%s: time=%f",(*context)->get_name().c_str(),(float)time); - - { - Layer::ParamList params; - Layer::DynamicParamList::const_iterator iter; - - for(iter=(*context)->dynamic_param_list().begin();iter!=(*context)->dynamic_param_list().end();iter++) - params[iter->first]=(*iter->second)(time); - - (*context)->set_param_list(params); - - (*context)->set_time(context+1,time); - (*context)->dirty_time_=time; - - } -} - -void -Context::set_time(Time time,const Vector &/*pos*/)const -{ - set_time(time); -/* - Context context(*this); - while(!(context)->empty()) - { - // If this layer is active, then go - // ahead and break out of the loop - if((*context)->active()) - break; - - // Otherwise, we want to keep searching - // till we find either an active layer, - // or the end of the layer list - ++context; - } - - // If this layer isn't defined, just return - if((context)->empty()) return; - - else - { - Layer::ParamList params; - Layer::DynamicParamList::const_iterator iter; - - for(iter=(*context)->dynamic_param_list().begin();iter!=(*context)->dynamic_param_list().end();iter++) - params[iter->first]=(*iter->second)(time); - - (*context)->set_param_list(params); - - (*context)->set_time(context+1,time,pos); - } -*/ -} - -etl::handle -Context::hit_check(const Point &pos)const -{ - Context context(*this); - - while(!context->empty()) - { - // If this layer is active, then go - // ahead and break out of the loop - if((*context)->active()) - break; - - // Otherwise, we want to keep searching - // till we find either an active layer, - // or the end of the layer list - ++context; - } - - // If this layer isn't defined, return an empty handle - if((context)->empty()) return 0; - - return (*context)->hit_check(context+1, pos); -} diff --git a/synfig-core/trunk/src/synfig/context.h b/synfig-core/trunk/src/synfig/context.h deleted file mode 100644 index c03d312..0000000 --- a/synfig-core/trunk/src/synfig/context.h +++ /dev/null @@ -1,87 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file context.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_CONTEXT_H -#define __SYNFIG_CONTEXT_H - -/* === H E A D E R S ======================================================= */ - -#include "canvasbase.h" -#include "rect.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class Vector; -typedef Vector Point; -class Color; -class Surface; -class RendDesc; -class ProgressCallback; -class Layer; -class Time; -class Rect; - -/*! \class Context -** \todo writeme -** \see Layer, Canvas */ -class Context : public CanvasBase::const_iterator -{ -public: - Context() { } - - Context(const CanvasBase::const_iterator &x):CanvasBase::const_iterator(x) { } - - Context operator=(const CanvasBase::const_iterator &x) - { return CanvasBase::const_iterator::operator=(x); } - - /*! \todo write me */ - Color get_color(const Point &pos)const; - - /*! \todo write me */ - bool accelerated_render(Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb) const; - - /*! \todo write me */ - void set_time(Time time)const; - - /*! \writeme */ - void set_time(Time time,const Vector &pos)const; - - Rect get_full_bounding_rect()const; - - /*! \writeme */ - etl::handle hit_check(const Point &point)const; - -}; // END of class Context - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/curve_helper.cpp b/synfig-core/trunk/src/synfig/curve_helper.cpp deleted file mode 100644 index d599620..0000000 --- a/synfig-core/trunk/src/synfig/curve_helper.cpp +++ /dev/null @@ -1,704 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file curve_helper.cpp -** \brief Curve Helper File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "curve_helper.h" - -#include -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ -#define ERR 1e-11 -const Real ERROR = 1e-11; - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -Real synfig::find_closest(const etl::bezier &curve, const Point &point, - float step, Real *dout, float *tout) -{ -#if 0 - float time(curve.find_closest(point,4)); - Real dist((curve(time)-point).mag()); - if(dout) *dout=dist; - if(tout) *tout=time; - return time; -#else - Real d,closest = 1.0e50; - float t,time,closestt = -1; - Vector p0,p1,end; - - if(dout && *dout > 0) - closest = *dout; - - p0 = curve[0]; - end = curve[3]; - - for(t = step; t < 1; t+=step, p0=p1) - { - p1 = curve(t); - d = line_point_distsq(p0,p1,point,time); - - if(d=0) - { - if(tout) *tout = closestt; - } - - return closest; -#endif -} - -// Line and BezHull Definitions -void BezHull::Bound(const etl::bezier &b) -{ - #if 1 - - //with a starting vertex, find the only vertex that has all other vertices on its right - int i,j; - int first,cur,last; - - float d,ds; - - Vector n,vi; - Vector::value_type deqn; - - //get left most vertex - d = b[0][0]; - first = 0; - for(i = 1; i < 4; ++i) - { - if(b[i][0] < d) - { - d = b[i][0]; - first = i; - } - } - cur = last = first; - size = 0; - - //find the farthest point with all points on right - ds = 0; - do //should reassign cur so it won't break on first step - { - for(i = 0; i < 4; ++i) - { - if(i == cur || i == last) continue; - - //rotate vector to right to make normal - vi = -(b[i] - b[cur]).perp(); - d = vi.mag_squared(); - - //we want only the farthest (solves the case with many points on a line) - if(d > ds) - { - ds = d; - deqn = n*b[cur]; - for(j = 0; j < 4; ++j) - { - d = n*b[i] - deqn; - if(d < 0) break; //we're on left, nope! - } - - //everyone is on right... yay! :) - if(d >= 0) - { - //advance point and add last one into hull - p[size++] = p[last]; - last = cur; - cur = i; - } - } - } - }while(cur != first); - - #else - - //will work but does not keep winding order - - //convex hull alg. - //build set of line segs which have no points on other side... - //start with initial normal segments - - //start with single triangle - p[0] = b[0]; - p[1] = b[1]; - p[2] = b[2]; - p[3] = b[3]; - - //initial reject (if point is inside triangle don't care) - { - Vector v1,v2,vp; - - v1 = p[1]-p[0]; - v2 = p[2]-p[0]; - - vp = p[3]-p[0]; - - float s = (vp*v1) / (v1*v1), - t = (vp*v2) / (v2*v2); - - //if we're inside the triangle we don't this sissy point - if( s >= 0 && s <= 1 && t >= 0 && t <= 1 ) - { - size = 3; - return; - } - } - - //expand triangle based on info... - bool line; - int index,i,j; - float ds,d; - - //distance from point to vertices - line = false; - index = 0; - ds = (p[0]-b[3]).mag_squared(); - for(i = 1; i < 3; ++i) - { - d = (p[3]-p[i]).mag_squared(); - if(d < ds) - { - index = i; - ds = d; - } - } - - //distance to line - float t; - j = 2; - for(i = 0; i < 3; j = i++) - { - d = line_point_distsq(p[j],p[i],b[4],t); - if(d < ds) - { - index = j; - ds = d; - line = true; - } - } - - //We don't need no stinkin extra vertex, just replace - if(!line) - { - p[index] = p[3]; - size = 3; - }else - { - //must expand volume to work with point... - // after the index then - - /* Pattern: - 0 - push 1,2 -> 2,3 - 1 - push 2 -> 3 - 2 - none - */ - for(i = 3; i > index+1; --i) - { - p[i] = p[i-1]; - } - - p[index] = b[3]; //recopy b3 - size = 4; - } - - #endif -} - -//Line Intersection -int -synfig::intersect(const Point &p1, const Vector &v1, float &t1, - const Point &p2, const Vector &v2, float &t2) -{ - /* Parametric intersection: - l1 = p1 + tv1, l2 = p2 + sv2 - - 0 = p1+tv1-(p2+sv2) - group parameters: sv2 - tv1 = p1-p2 - - ^ = transpose - invert matrix (on condition det != 0): - A[t s]^ = [p1-p2]^ - - A = [-v1 v2] - - det = v1y.v2x - v1x.v2y - - if non 0 then A^-1 = invdet * | v2y -v2x | - | v1y -v1x | - - [t s]^ = A^-1 [p1-p2]^ - */ - - Vector::value_type det = v1[1]*v2[0] - v1[0]*v2[1]; - - //is determinant valid? - if(det > ERR || det < -ERR) - { - Vector p_p = p1-p2; - - det = 1/det; - - t1 = det*(v2[1]*p_p[0] - v2[0]*p_p[1]); - t2 = det*(v1[1]*p_p[0] - v1[0]*p_p[1]); - - return 1; - } - - return 0; -} - -//Returns the true or false intersection of a rectangle and a line -int intersect(const Rect &r, const Point &p, const Vector &v) -{ - float t[4] = {0}; - - /*get horizontal intersections and then vertical intersections - and intersect them - - Vertical planes - n = (1,0) - Horizontal planes - n = (0,1) - - so if we are solving for ray with implicit line - */ - - //solve horizontal - if(v[0] > ERR || v[0] < -ERR) - { - //solve for t0, t1 - t[0] = (r.minx - p[0])/v[0]; - t[1] = (r.maxx - p[0])/v[0]; - }else - { - return (int)(p[1] >= r.miny && p[1] <= r.maxy); - } - - //solve vertical - if(v[1] > ERR || v[1] < -ERR) - { - //solve for t0, t1 - t[2] = (r.miny - p[1])/v[1]; - t[3] = (r.maxy - p[1])/v[1]; - }else - { - return (int)(p[0] >= r.minx && p[0] <= r.maxx); - } - - return (int)(t[0] <= t[3] && t[1] >= t[2]); -} - -int synfig::intersect(const Rect &r, const Point &p) -{ - return (p[1] < r.maxy && p[1] > r.miny) && p[0] > r.minx; -} - -//returns 0 or 1 for true or false number of intersections of a ray with a bezier convex hull -int intersect(const BezHull &bh, const Point &p, const Vector &v) -{ - float mint = 0, maxt = 1e20; - - //polygon clipping - Vector n; - Vector::value_type nv; - - Point last = bh.p[3]; - for(int i = 0; i < bh.size; ++i) - { - n = (bh.p[i] - last).perp(); //rotate 90 deg. - - /* - since rotated left - if n.v < 0 - going in - > 0 - going out - = 0 - parallel - */ - nv = n*v; - - //going OUT - if(nv > ERR) - { - maxt = min(maxt,(float)((n*(p-last))/nv)); - }else - if( nv < -ERR) //going IN - { - mint = max(mint,(float)((n*(p-last))/nv)); - }else - { - if( n*(p-last) > 0 ) //outside entirely - { - return 0; - } - } - - last = bh.p[i]; - } - - return 0; -} - -int Clip(const Rect &r, const Point &p1, const Point &p2, Point *op1, Point *op2) -{ - float t1=0,t2=1; - Vector v=p2-p1; - - /*get horizontal intersections and then vertical intersections - and intersect them - - Vertical planes - n = (1,0) - Horizontal planes - n = (0,1) - - so if we are solving for ray with implicit line - */ - - //solve horizontal - if(v[0] > ERR || v[0] < -ERR) - { - //solve for t0, t1 - float tt1 = (r.minx - p1[0])/v[0], - tt2 = (r.maxx - p1[0])/v[0]; - - //line in positive direction (normal comparisons - if(tt1 < tt2) - { - t1 = max(t1,tt1); - t2 = min(t2,tt2); - }else - { - t1 = max(t1,tt2); - t2 = min(t2,tt1); - } - }else - { - if(p1[1] < r.miny || p1[1] > r.maxy) - return 0; - } - - //solve vertical - if(v[1] > ERR || v[1] < -ERR) - { - //solve for t0, t1 - float tt1 = (r.miny - p1[1])/v[1], - tt2 = (r.maxy - p1[1])/v[1]; - - //line in positive direction (normal comparisons - if(tt1 < tt2) - { - t1 = max(t1,tt1); - t2 = min(t2,tt2); - }else - { - t1 = max(t1,tt2); - t2 = min(t2,tt1); - } - }else - { - if(p1[0] < r.minx || p1[0] > r.maxx) - return 0; - } - - if(op1) *op1 = p1 + v*t1; - if(op2) *op2 = p1 + v*t2; - - return 1; -} - -static void clean_bez(const bezier &b, bezier &out) -{ - bezier temp; - - temp = b; - temp.set_r(0); - temp.set_s(1); - - if(b.get_r() != 0) - temp.subdivide(0,&temp,b.get_r()); - - if(b.get_s() != 1) - temp.subdivide(&temp,0,b.get_s()); - - out = temp; -} - -// CIntersect Definitions - -CIntersect::CIntersect() - : max_depth(10) //depth of 10 means timevalue parameters will have an approx. error bound of 2^-10 -{ -} - -struct CIntersect::SCurve -{ - bezier b; //the current subdivided curve - float rt,st; - //float mid, //the midpoint time value on this section of the subdivided curve - // scale; //the current delta in time values this curve would be on original curve - - float mag; //approximate sum of magnitudes of each edge of control polygon - Rect aabb; //Axis Aligned Bounding Box for quick (albeit less accurate) collision - - SCurve() {} - - SCurve(const bezier &c,float rin, float sin) - :b(c),rt(rin),st(sin),mag(1) - { - Bound(aabb,b); - } - - void Split(SCurve &l, SCurve &r) const - { - b.subdivide(&l.b,&r.b); - - l.rt = rt; - r.st = st; - l.st = r.rt = (rt+st)/2; - - Bound(l.aabb,l.b); - Bound(r.aabb,r.b); - } -}; - -//Curve to the left of point test -static int recurse_intersect(const CIntersect::SCurve &b, const Point &p1, int depthleft = 10) -{ - //reject when the line does not intersect the bounding box - if(!intersect(b.aabb,p1)) return 0; - - //accept curves (and perform super detailed check for intersections) - //if the values are below tolerance - - //NOTE FOR BETTERING OF ALGORITHM: SHOULD ALSO/IN-PLACE-OF CHECK MAGNITUDE OF EDGES (or approximate) - if(depthleft <= 0) - { - //NOTE FOR IMPROVEMENT: Polish roots based on original curve - // (may be too expensive to be effective) - int turn = 0; - - for(int i = 0; i < 3; ++i) - { - //intersect line segments - - //solve for the y_value - Vector v = b.b[i+1] - b.b[i]; - - if(v[1] > ERROR && v[1] < ERROR) - { - Real xi = (p1[1] - b.b[i][1])/v[1]; - - //and add in the turn (up or down) if it's valid - if(xi < p1[0]) turn += (v[1] > 0) ? 1 : -1; - } - } - - return turn; - } - - //subdivide the curve and continue - CIntersect::SCurve l1,r1; - b.Split(l1,r1); //subdivide left - - //test each subdivision against the point - return recurse_intersect(l1,p1) + recurse_intersect(r1,p1); -} - -int intersect(const bezier &b, const Point &p) -{ - CIntersect::SCurve sb; - clean_bez(b,sb.b); - - sb.rt = 0; sb.st = 1; - sb.mag = 1; Bound(sb.aabb,sb.b); - - return recurse_intersect(sb,p); -} - -//Curve curve intersection -void CIntersect::recurse_intersect(const SCurve &left, const SCurve &right, int depth) -{ - //reject curves that do not overlap with bounding boxes - if(!intersect(left.aabb,right.aabb)) return; - - //accept curves (and perform super detailed check for intersections) - //if the values are below tolerance - - //NOTE FOR BETTERING OF ALGORITHM: SHOULD ALSO/IN-PLACE-OF CHECK MAGNITUDE OF EDGES (or approximate) - if(depth >= max_depth) - { - //NOTE FOR IMPROVEMENT: Polish roots based on original curve with the Jacobian - // (may be too expensive to be effective) - - //perform root approximation - //collide line segments - - float t,s; - - for(int i = 0; i < 3; ++i) - { - for(int j = 0; j < 3; ++j) - { - //intersect line segments - if(intersect_line_segments(left.b[i],left.b[i+1],t,right.b[j],right.b[j+1],s)) - { - //We got one Jimmy - times.push_back(intersect_set::value_type(t,s)); - } - } - } - - return; - } - - //NOTE FOR IMPROVEMENT: only subdivide one curve and choose the one that has - // the highest approximated length - //fast approximation to curve length may be hard (accurate would - // involve 3 square roots), could sum the squares which would be - // quick but inaccurate - - SCurve l1,r1,l2,r2; - left.Split(l1,r1); //subdivide left - right.Split(l2,r2); //subdivide right - - //Test each candidate against each other - recurse_intersect(l1,l2); - recurse_intersect(l1,r2); - recurse_intersect(r1,l2); - recurse_intersect(r1,r2); -} - - - -bool CIntersect::operator()(const etl::bezier &c1, const etl::bezier &c2) -{ - times.clear(); - - //need to subdivide and check recursive bounding regions against each other - //so track a list of dirty curves and compare compare compare - - - //temporary curves for subdivision - CIntersect intersector; - CIntersect::SCurve left,right; - - //Make sure the parameters are normalized (so we don't compare unwanted parts of the curves, - // and don't miss any for that matter) - - //left curve - //Compile information about curve - clean_bez(c1,left.b); - left.rt = 0; left.st = 1; - Bound(left.aabb, left.b); - - //right curve - //Compile information about right curve - clean_bez(c2,right.b); - right.rt = 0; right.st = 1; - Bound(right.aabb, right.b); - - //Perform Curve intersection - intersector.recurse_intersect(left,right); - - //Get information about roots (yay! :P) - return times.size() != 0; -} - -//point inside curve - return +/- hit up or down edge -int intersect_scurve(const CIntersect::SCurve &b, const Point &p) -{ - //initial reject/approve etc. - - /* - *-----------*--------- - | | - | | - | | - | 1 | 2 - | | - | | - | | - | | - *-----------*-------- - 1,2 are only regions not rejected - */ - if(p[0] < b.aabb.minx || p[1] < b.aabb.miny || p[1] > b.aabb.maxy) - return 0; - - //approve only if to the right of rect around 2 end points - { - Rect r; - r.set_point(b.b[0][0],b.b[0][1]); - r.expand(b.b[3][0],b.b[3][1]); - - if(p[0] >= r.maxx && p[1] <= r.maxy && p[1] >= r.miny) - { - float df = b.b[3][1] - b.b[0][1]; - - return df >= 0 ? 1 : -1; - } - } - - //subdivide and check again! - CIntersect::SCurve l,r; - b.Split(l,r); - return intersect_scurve(l,p) + intersect_scurve(r,p); -} - -int synfig::intersect(const bezier &b, const Point &p) -{ - CIntersect::SCurve c(b,0,1); - - return intersect_scurve(c,p); -} diff --git a/synfig-core/trunk/src/synfig/curve_helper.h b/synfig-core/trunk/src/synfig/curve_helper.h deleted file mode 100644 index 620387f..0000000 --- a/synfig-core/trunk/src/synfig/curve_helper.h +++ /dev/null @@ -1,172 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file curve_helper.h -** \brief Curve Helper Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_CURVE_HELPER_H -#define __SYNFIG_CURVE_HELPER_H - -/* === H E A D E R S ======================================================= */ -#include - -#include "rect.h" -#include "real.h" -#include "vector.h" - -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -//line helper functions -inline Real line_point_distsq(const Point &p1, const Point &p2, - const Point &p, float &t) -{ - Vector v,vt; - - v = p2 - p1; - vt = p - p1; - - t = v.mag_squared() > 1e-12 ? (vt*v)/v.mag_squared() : 0; //get the projected time value for the current line - - //get distance to line segment with the time value clamped 0-1 - if(t >= 1) //use p+v - { - vt += v; //makes it pp - (p+v) - t = 1; - }else if(t > 0) //use vt-proj - { - vt -= v * t; // vt - proj_v(vt) //must normalize the projection vector to work - }else - { - t = 0; - } - - //else use p - return vt.mag_squared(); -} - - -//----- RAY CLASS AND FUNCTIONS -------------- -struct Ray -{ - Point p; - Vector v; - - Ray() {} - Ray(const Point &pin, const Vector &vin):p(pin), v(vin) {} -}; - -/* This algorithm calculates the INTERSECTION of 2 line segments - (not the closest point or anything like that, just intersection) - //parameter values returned are [0,1] -*/ -int intersect(const Point &p1, const Vector &v1, float &t1, - const Point &p2, const Vector &v2, float &t2); - -inline bool intersect_line_segments(const Point &a, const Point &b, float &tout, - const Point &c, const Point &d, float &sout) -{ - Vector v1(b-a), v2(d-c); - - //ok so treat both lines as parametric (so we can find the time values simultaneously) - float t,s; - - if( intersect(a,v1,t, b,v2,s) && t >= 0 && t <= 1 && s >= 0 && s <= 1 ) - { - tout = t; - sout = s; - return true; - } - - return false; -} - -//Find the closest point on the curve to a point (and return its distance, and time value) -Real find_closest(const etl::bezier &curve, const Point &point, float step, Real *closest, float *t); - -//----------- Rectangle helper functions --------------- - -template < typename T > -inline void Bound(etl::rect &r, const etl::bezier &b) -{ - r.set_point(b[0][0],b[0][1]); - r.expand(b[1][0],b[1][1]); - r.expand(b[2][0],b[2][1]); - r.expand(b[3][0],b[3][1]); -} - -/*template < typename T > -inline bool intersect(const etl::rect &r1, const etl::rect &r2) -{ - return (r1.minx < r2.maxx) & - (r2.minx < r1.maxx) & - (r1.miny < r2.maxy) & - (r2.miny < r1.maxy); -}*/ - -//----- Convex Hull of a Bezier Curve -------------- -struct BezHull -{ - Point p[4]; - int size; - - void Bound(const etl::bezier &b); -}; - -//Line Intersection -int intersect(const Rect &r1, const Point &p, const Vector &v); -int intersect(const Rect &r1, const Point &p); //inside or to the right -int intersect(const BezHull &bh, const Point &p, const Vector &v); -//int intersect(const etl::bezier &b, const Point &p, const Vector &v); -int intersect(const etl::bezier &b, const Point &p); //for use in containment tests for regions - -//Curve intersection object -class CIntersect -{ -public: - struct SCurve; -private: - void recurse_intersect(const SCurve &left, const SCurve &right, int depth = 0); - -public: - //size should be equal - typedef std::vector< std::pair > intersect_set; - intersect_set times; - - int max_depth; - - CIntersect(); - - bool operator()(const etl::bezier &b1, const etl::bezier &b2); -}; - -}; // END of namespace studio - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/curveset.cpp b/synfig-core/trunk/src/synfig/curveset.cpp deleted file mode 100644 index e8bd7fa..0000000 --- a/synfig-core/trunk/src/synfig/curveset.cpp +++ /dev/null @@ -1,483 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file curveset.cpp -** \brief Curve Set Implementation File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "curve_helper.h" -#include "curveset.h" -#include "blinepoint.h" -#include -#include -#include -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ -const Real ERROR = 1e-10; - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ -template < typename T > -inline bool Zero(const T &a, const T &tol = (T)ERROR) -{ - return a < tol && a > -tol; -} - -CurvePoint::CurvePoint(const Point &pin, const Vector &left, const Vector &right) -:p(pin),l(left),r(right) -{ -} - -CurvePoint::CurvePoint(const BLinePoint &bpoint) -{ - p = bpoint.get_vertex(); - - l = p + bpoint.get_tangent1()*(1/3.0f); - r = p + bpoint.get_tangent2()*(1/3.0f); -} - -struct ipoint -{ - int curveindex; - int vertindex; - float tvalue; - - ipoint *next; - ipoint *prev; - ipoint *neighbor; - - int go_in; //going in = 1, coming out = -1 - - ipoint() - { - next = this; - prev = this; - neighbor = 0; - } - - bool operator<(const ipoint &rhs) const - { - if(curveindex == rhs.curveindex) - { - if(vertindex == rhs.vertindex) - { - return tvalue < rhs.tvalue; - }else return vertindex < rhs.vertindex; - }else return curveindex < rhs.curveindex; - } - - bool operator>(const ipoint &rhs) const - { - return rhs < *this; - } - - void insert_after(ipoint *i) - { - //from: next - next.prev - //to: next* - i - next.prev* - - ipoint *bef = this, - *aft = next; - - //assuming the input point is not connected to anything, we don't have to do anything with it... - bef->next = i; - i->prev = bef; - aft->prev = i; - i->next = aft; - } - - void insert_before(ipoint *i) - { - //from: prev.next - prev - //to: prev.next* - i - prev* - - ipoint *bef = prev, - *aft = this; - - //assuming the input point is not connected to anything, we don't have to do anything with it... - bef->next = i; - i->prev = bef; - aft->prev = i; - i->next = aft; - } - - void insert_sorted(ipoint *i) - { - ipoint *search = this; - - if(*i < *this) - { - //we go forward - search = this; - do - { - search = search->next; - }while(*i < *search && search != this); //ending conditions... - - //now we insert previously... - search->insert_before(i); - }else if(*i > *this) - { - //we go backwards... - search = this; - do - { - search = search->prev; - }while(*i > *search && search != this); //ending conditions... - - //now we insert previously... - search->insert_after(i); - } - } -}; - -enum SetOp -{ - INTERSECT = 0, - UNION, - SUBTRACT, - INVSUBTRACT, - NUM_SETOPERATIONS -}; - -class PolygonClipper -{ -public: - typedef vector CurveInts; //in no particular order - - vector c1ints; - vector c2ints; - - //get the intersections - void GetIntersections(const CurveSet &lhs, const CurveSet &rhs) - { - CIntersect isect; - bezier b1,b2; - - int i1,j1,ci1,s1; - int i2,j2,ci2,s2; - - //clear out so everyone's happy - c1ints.clear(); - c2ints.clear(); - - c1ints.resize(lhs.set.size()); - c2ints.resize(rhs.set.size()); - - //loop through everyone and be happy... - - //intersect each curve with each other curve, and we're good - for(ci1=0;ci1 < (int)lhs.set.size(); ++ci1) - { - const CurveSet::region &cur1 = lhs.set[ci1]; - s1 = cur1.size(); - for(j1 = s1-1, i1=0; i1 < s1; j1 = i1++) - { - b1[0] = cur1[j1].p; - b1[3] = cur1[i1].p; - b1[1] = b1[0] + cur1[j1].r/3; - b1[2] = b1[3] - cur1[i1].l/3; - - for(ci2=0;ci2 < (int)rhs.set.size(); ++ci2) - { - const CurveSet::region &cur2 = rhs.set[ci2]; - s2 = cur2.size(); - for(j2 = s2-1, i2=0; i2 < s2; j2 = i2++) - { - b2[0] = cur2[j2].p; - b2[3] = cur2[i2].p; - b2[1] = b2[0] + cur2[j2].r/3; - b2[2] = b2[3] - cur2[i2].l/3; - - isect(b1,b2); - - for(int index=0; index < (int)isect.times.size(); ++index) - { - //prepare basic intersection information - ipoint *ip1 = new ipoint, *ip2 = new ipoint; - - //set parameters - ip1->curveindex = ci1; ip1->vertindex = j1; ip1->tvalue = isect.times[index].first; - ip2->curveindex = ci2; ip2->vertindex = j2; ip2->tvalue = isect.times[index].second; - - //set neighbors - ip1->neighbor = ip2; - ip2->neighbor = ip1; - - //first one just goes on end of list - c1ints[ci1].back()->insert_sorted(ip1); - c1ints[ci1].push_back(ip1); - - //second one must go in order - c2ints[ci2].back()->insert_sorted(ip2); - c2ints[ci2].push_back(ip2); - - //we're all good... - } - } - } - } - } - - //Now figure out the containment properties of each int point - Point p; - int inside = 0; - for(int i = 0; i < (int)c1ints.size(); ++i) - { - if(c1ints[i].size() == 0) continue; - - //must test insideness for the edges - ipoint *start, *iter; - start = iter = c1ints[i].front(); - - //i == iter->curveindex == the index of the current curve we're looking at - - //set the initial insideness on the other curve... - p = lhs.set[i][iter->vertindex].p; - inside = rhs.intersect(p)%2; //if it's inside by the even odd rule - - do - { - iter->go_in = inside? -1 : 1; //leaving if inside, or coming in if not - inside = !inside; - iter = iter->next; - }while(iter != start); //I hope this isn't an infinite loop! - } - - //and curve 2 - for(int i = 0; i < (int)c2ints.size(); ++i) - { - if(c2ints[i].size() == 0) continue; - - //must test insideness for the edges - ipoint *start, *iter; - start = iter = c1ints[i].front(); - - //set the initial insideness on the other curve... - p = rhs.set[i][iter->vertindex].p; - inside = lhs.intersect(p)%2; //if it's inside by the even odd rule - - do - { - iter->go_in = inside? -1 : 1; //leaving if inside, or coming in if not - inside = !inside; - iter = iter->next; - }while(iter != start); //I hope this isn't an infinite loop! - } - } - - bool ConstructSet(CurveSet &/*c*/, const CurveSet &lhs, const CurveSet &rhs, int type) - { - bool in1,in2; - - switch(type) - { - case INTERSECT: //1&2 - { - in1 = true; in2 = true; - break; - } - - case UNION: //1|2 - { - in1 = false; in2 = false; - break; - } - - case SUBTRACT: //1-2 - { - in1 = true; in2 = false; - break; - } - - case INVSUBTRACT: //2-1 - { - in1 = false; in2 = true; - break; - } - - default: - { - return false; - } - } - - //traverse path based on inside flags - - //fill all the paths of native stuff - set ipset; - for(int ci=0; ci<(int)c1ints.size(); ++ci) - { - for(int i=0; i < (int)c1ints[ci].size(); ++i) - { - ipset.insert(c1ints[ci][i]); - } - } - - // - while(ipset.size() > 0) - { - //start from one point (always on curveset 1) and traverse until we find it again - ipoint *start, *iter; - start = iter = *ipset.begin(); - - //All the info to swap when we transition curves... - const CurveSet *cur, *other; - bool curin, otherin; - bool delcur = true; - - set::iterator deliter; - - int ci,i1,i2,size; - float t1,t2; - - CurveSet::region current; - CurvePoint cp; - - cur = &lhs; other = &rhs; - curin = in1; otherin = in2; - delcur = true; - - do - { - //remove the current iter from the set - if(delcur) - { - deliter = ipset.find(iter); - if(deliter != ipset.end()) ipset.erase(deliter); - } - - //go to next and accumulate information - ci = iter->curveindex; - i1 = iter->vertindex; - t1 = iter->tvalue; - iter = iter->next; //move to next and get its info - - i2 = iter->vertindex; - t2 = iter->tvalue; - - size = cur->set[ci].size(); - - //record all the stuff between us... - //start on an intersection - get the curve point... - - - //transition curves... - iter = iter->neighbor; - swap(cur,other); - swap(curin,otherin); - delcur = !delcur; - }while(iter != start); //I hope THIS isn't an infinite loop - } - - return true; - } -}; - -void CurveSet::SetClamp(int &i, int &si) -{ - if(si > 0 && si < (int)set.size()) - { - if(i >= (int)set[si].size()) - { - i -= set[si].size(); - si++; - }else if (i < 0) - { - i += set[si].size(); - si--; - } - } -} - -void CurveSet::CleanUp(int /*curve*/) -{ -} - -/* Detect intersections that are crazy happy good - - Performance annoyances: - 1) Recursing down to find an intersection at the end points that doesn't actually exist - (can be helped a bit by not including the edges of bounding rectangles) - 2) Intersecting curves is slow... oh well - - Algorithm: - 1) Inside out scheme, track when edges go into and come out of various objects etc. - - + doesn't require initial conditions - - only works with odd-even rule -*/ - -CurveSet CurveSet::operator&(const CurveSet &/*rhs*/) const -{ - return *this; -} - -CurveSet CurveSet::operator|(const CurveSet &/*rhs*/) const -{ - return *this; -} - -CurveSet CurveSet::operator-(const CurveSet &/*rhs*/) const -{ - return *this; -} - -int CurveSet::intersect(const Point &p) const -{ - int inter = 0, ci,i,j,s; - bezier b; - - for(ci=0; ci < (int)set.size(); ++ci) - { - const vector &curve = set[ci]; - s = curve.size(); - for(j=s-1,i=0; i < s; j = i++) - { - b[0] = curve[j].p; b[3] = curve[i].p; - b[1] = b[0] + curve[j].r/3; b[2] = b[3] - curve[i].l/3; - - inter += synfig::intersect(b,p); - } - } - - return inter; -} diff --git a/synfig-core/trunk/src/synfig/curveset.h b/synfig-core/trunk/src/synfig/curveset.h deleted file mode 100644 index a34976a..0000000 --- a/synfig-core/trunk/src/synfig/curveset.h +++ /dev/null @@ -1,92 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file curveset.h -** \brief Curve Set Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_CURVESET_H -#define __SYNFIG_CURVESET_H - -/* === H E A D E R S ======================================================= */ -#include "blinepoint.h" -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ -namespace synfig -{ - -class BLinePoint; - -struct CurvePoint -{ - Point p; - Point l,r; - - CurvePoint () {} - CurvePoint(const Point &pin, const Vector &left, const Vector &right); - - CurvePoint(const BLinePoint &bpoint); -}; - -class CurveSet -{ - bool invert; //winding order... - - void CleanUp(int curve = 0); -public: - - typedef std::vector region; - typedef std::vector set_type; - - set_type set; //specifies a region object (assumes looping) - - void SetClamp(int &i, int &si); - - //actual stuff - CurveSet() - { - } - - //anything supporting iterator type operations - template < typename Iterator > - CurveSet(Iterator begin, Iterator end, bool invert = false) - { - set.push_back(std::vector(begin,end)); - CleanUp(invert); - } - - CurveSet operator&(const CurveSet &rhs) const; //intersect - CurveSet operator|(const CurveSet &rhs) const; //union - CurveSet operator-(const CurveSet &rhs) const; //subtract - - - //Point containment - int intersect(const Point &p) const; -}; - -} -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/distance.cpp b/synfig-core/trunk/src/synfig/distance.cpp deleted file mode 100644 index efac8e9..0000000 --- a/synfig-core/trunk/src/synfig/distance.cpp +++ /dev/null @@ -1,257 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file distance.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "distance.h" -#include "renddesc.h" -#include "general.h" -#include -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -#define POINTS_PER_INCH (72.0) -#define INCHES_PER_METER (39.3700787402) -#define POINTS_PER_METER (POINTS_PER_INCH*INCHES_PER_METER) -#define CENTIMETERS_PER_METER (100.0) -#define MILLIMETERS_PER_METER (1000.0) - -#define METERS_PER_UNIT (rend_desc.get_physical_w()/abs(rend_desc.get_tl()[0]-rend_desc.get_br()[0])) - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -Distance::Distance(const synfig::String& str) -{ - (*this)=str; -/* int i(0); - float val; - int ret(strscanf(str,"%f%n",&val,&i)); - synfig::info("Distance::Distance(): ret=%d, val=%f",ret,val); - - if(ret<=0) - { - // Error - synfig::error("Distance::Distance(): Bad value \"%s\"",str.c_str()); - value_=0; - } - else - value_=val; - - synfig::info("Distance::Distance(): system=\"%s\"",String(str.begin()+i,str.end()).c_str()); - system_=ident_system(String(str.begin()+i,str.end())); -*/ -} - -Distance& -Distance::operator=(const synfig::String& str) -{ - int i(0); - float val; - int ret(strscanf(str,"%f%n",&val,&i)); - // synfig::info("Distance::Distance(): ret=%d, val=%f",ret,val); - - if(ret<=0) - { - // Error - synfig::error("Distance::Distance(): Bad value \"%s\"",str.c_str()); - return *this; - } - else - value_=val; - - synfig::String sys(str.begin()+i,str.end()); - - if(sys.size()) - system_=ident_system(sys); - return *this; -} - -synfig::String -Distance::get_string(int digits)const -{ - digits=min(9,max(0,digits)); - String fmt(strprintf("%%.%01df%%s",digits)); - return strprintf(fmt.c_str(),value_,system_name(system_).c_str()); -} - -void -Distance::convert(Distance::System target, const RendDesc& rend_desc) -{ - value_=get(target,rend_desc); - system_=target; -} - -Real -Distance::get(Distance::System target, const RendDesc& rend_desc)const -{ - if(target==SYSTEM_UNITS) - return units(rend_desc); - if(target==SYSTEM_PIXELS) - return units(rend_desc)*METERS_PER_UNIT*rend_desc.get_x_res(); - - return meters_to_system(meters(rend_desc),target); -} - -Real -Distance::meters()const -{ - switch(system_) - { - case SYSTEM_INCHES: return value_/INCHES_PER_METER; - case SYSTEM_POINTS: return value_/POINTS_PER_METER; - case SYSTEM_METERS: return value_; - case SYSTEM_CENTIMETERS: return value_/CENTIMETERS_PER_METER; - case SYSTEM_MILLIMETERS: return value_/MILLIMETERS_PER_METER; - default: throw BadSystem(); - } -} - -Real -Distance::meters(const RendDesc& rend_desc)const -{ - if(system_>SYSTEM_PIXELS) - return meters(); - if(system_==SYSTEM_UNITS) - return value_*METERS_PER_UNIT; - if(system_==SYSTEM_PIXELS) - return value_/rend_desc.get_x_res(); - - throw BadSystem(); -} - -Real -Distance::units(const RendDesc& rend_desc)const -{ - if(system_==SYSTEM_UNITS) - return value_; - - Real ret; - - if(system_>SYSTEM_PIXELS) - ret=meters(); - else - ret=value_/rend_desc.get_x_res(); - - return ret/METERS_PER_UNIT; -} - - -Real // (static) -Distance::meters_to_system(Real x,System target_system) -{ - switch(target_system) - { - case SYSTEM_INCHES: return x*INCHES_PER_METER; - case SYSTEM_POINTS: return x*POINTS_PER_METER; - case SYSTEM_METERS: return x; - case SYSTEM_CENTIMETERS: return x*CENTIMETERS_PER_METER; - case SYSTEM_MILLIMETERS: return x*MILLIMETERS_PER_METER; - default: throw BadSystem(); - } -} - -Distance::System // (static) -Distance::ident_system(const synfig::String& x) -{ - synfig::String str; - - // Make it all upper case, and remove white space - for(unsigned int i=0;i const Time& operator+=(const U &rhs) { value_+=rhs; return *this; } - template const Time& operator-=(const U &rhs) { value_-=rhs; return *this; } - template const Time& operator*=(const U &rhs) { value_*=rhs; return *this; } - template const Time& operator/=(const U &rhs) { value_/=rhs; return *this; } - - template Time operator+(const U &rhs)const { return value_+rhs; } - template Time operator-(const U &rhs)const { return value_-rhs; } - template Time operator*(const U &rhs)const { return value_*rhs; } - template Time operator/(const U &rhs)const { return value_/rhs; } - - Time operator-()const { return -value_; } -*/ -}; // END of class Distance - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/exception.cpp b/synfig-core/trunk/src/synfig/exception.cpp deleted file mode 100644 index 9896cff..0000000 --- a/synfig-core/trunk/src/synfig/exception.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file exception.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "exception.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -Exception::BadLinkName::BadLinkName(const String &what): - std::runtime_error(what) -// std::runtime_error(_("Bad Link Name")+what.empty()?"":(String(": ")+what)) -{ - synfig::error("EXCEPTION: bad link name: "+what); -} - -Exception::BadType::BadType(const String &what): - std::runtime_error(what) -// std::runtime_error(_("Bad Type")+what.empty()?"":(String(": ")+what)) -{ - synfig::error("EXCEPTION: bad type: "+what); -} - -Exception::BadFrameRate::BadFrameRate(const String &what): - std::runtime_error(what) -// std::runtime_error(_("Bad Link Name")+what.empty()?"":(String(": ")+what)) -{ - synfig::error("EXCEPTION: bad frame rate: "+what); -} - -Exception::BadTime::BadTime(const String &what): - std::runtime_error(what) -// std::runtime_error(_("Bad Link Name")+what.empty()?"":(String(": ")+what)) -{ - synfig::error("EXCEPTION: bad time: "+what); -} - -Exception::NotFound::NotFound(const String &what): - std::runtime_error(what) -// std::runtime_error(_("Not Found")+what.empty()?"":(String(": ")+what)) -{ -// synfig::error("EXCEPTION: not found: "+what); -} - -Exception::IDNotFound::IDNotFound(const String &what): - NotFound(what) -// std::runtime_error(_("Not Found")+what.empty()?"":(String(": ")+what)) -{ -// synfig::error("EXCEPTION: not found: "+what); -} - -Exception::FileNotFound::FileNotFound(const String &what): - NotFound(what) -// std::runtime_error(_("Not Found")+what.empty()?"":(String(": ")+what)) -{ - synfig::error("EXCEPTION: file not found: "+what); -} - -Exception::IDAlreadyExists::IDAlreadyExists(const String &what): - std::runtime_error(what) -// std::runtime_error(_("ID Already Exists")+what.empty()?"":(String(": ")+what)) -{ - synfig::error("EXCEPTION: id already exists: "+what); -} diff --git a/synfig-core/trunk/src/synfig/exception.h b/synfig-core/trunk/src/synfig/exception.h deleted file mode 100644 index 2132c16..0000000 --- a/synfig-core/trunk/src/synfig/exception.h +++ /dev/null @@ -1,97 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file exception.h -** \brief Exceptions -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_EXCEPTION_H -#define __SYNFIG_EXCEPTION_H - -/* === H E A D E R S ======================================================= */ - -#include -#include "string_decl.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -namespace Exception { - -class BadLinkName : public std::runtime_error -{ -public: - BadLinkName(const String &what); -}; // END of class BadLinkName - -class BadType : public std::runtime_error -{ -public: - BadType(const String &what); -}; // END of class BadType - -class IDAlreadyExists : public std::runtime_error -{ -public: - IDAlreadyExists(const String &what); -}; - -class NotFound : public std::runtime_error -{ -public: - NotFound(const String &what); -}; - -class IDNotFound : public NotFound -{ -public: - IDNotFound(const String &what); -}; - -class FileNotFound : public NotFound -{ -public: - FileNotFound(const String &what); -}; - -class BadTime : public std::runtime_error -{ -public: - BadTime(const String &what); -}; - -class BadFrameRate : public std::runtime_error -{ -public: - BadFrameRate(const String &what); -}; - -}; // END of namespace Exception - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/gamma.cpp b/synfig-core/trunk/src/synfig/gamma.cpp deleted file mode 100644 index f1d1add..0000000 --- a/synfig-core/trunk/src/synfig/gamma.cpp +++ /dev/null @@ -1,193 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file gamma.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "gamma.h" -#include -#include -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -//using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -void -Gamma::set_gamma(float x) -{ - gamma_r=gamma_g=gamma_b=x; - int i; - red_blue_level=1.0f; - for(i=0;i<65536;i++) - { - float f(float(i)/65536.0f); - f=pow(f,gamma_r); - table_r_U16_to_U8[i]=table_g_U16_to_U8[i]=table_b_U16_to_U8[i]=(unsigned char)(f*(255.0f-(black_level*255))+0.5f + black_level*255.0f); - } - - for(i=0;i<256;i++) - table_r_U8_to_F32[i]=table_g_U8_to_F32[i]=table_b_U8_to_F32[i]=pow((float(i)/255.0f)*(1.0f-black_level)+black_level,gamma_r); -} - - -void -Gamma::refresh_gamma_r() -{ - int i; -// const float scalar(min(red_blue_level,1.0f)); - const float scalar(1.0f); - for(i=0;i<65536;i++) - { - float f(float(i)/65536.0f); - f=pow(f,gamma_r)*scalar; - table_r_U16_to_U8[i]=(unsigned char)(f*(255.0f-(black_level*255))+0.5f + black_level*255.0f); - } - - for(i=0;i<256;i++) - table_r_U8_to_F32[i]=pow((float(i)/255.0f)*(1.0f-black_level)+black_level,gamma_r)*scalar; -} - -void -Gamma::refresh_gamma_g() -{ - int i; -// const float scalar(sqrt(min(red_blue_level,2.0f-red_blue_level))); - const float scalar(1.0f); - for(i=0;i<65536;i++) - { - float f(float(i)/65536.0f); - f=pow(f,gamma_g)*scalar; - table_g_U16_to_U8[i]=(unsigned char)(f*(255.0f-(black_level*255))+0.5f + black_level*255.0f); - } - for(i=0;i<256;i++) - table_g_U8_to_F32[i]=pow((float(i)/255.0f)*(1.0f-black_level)+black_level,gamma_g)*scalar; -} - -void -Gamma::refresh_gamma_b() -{ - int i; -// const float scalar(min(2.0f-red_blue_level,1.0f)); - const float scalar(1.0f); - for(i=0;i<65536;i++) - { - float f(float(i)/65536.0f); - f=pow(f,gamma_b)*scalar; - table_b_U16_to_U8[i]=(unsigned char)(f*(255.0f-(black_level*255))+0.5f + black_level*255.0f); - } - for(i=0;i<256;i++) - table_b_U8_to_F32[i]=pow((float(i)/255.0f)*(1.0f-black_level)+black_level,gamma_b)*scalar; -} - -void -Gamma::set_gamma_r(float x) -{ - // If the gamma hasn't changed, then don't recompute the tables - if(x==gamma_r) return; - - gamma_r=x; - refresh_gamma_r(); -} - -void -Gamma::set_gamma_g(float x) -{ - // If the gamma hasn't changed, then don't recompute the tables - if(x==gamma_g) return; - - gamma_g=x; - refresh_gamma_g(); -} - -void -Gamma::set_gamma_b(float x) -{ - // If the gamma hasn't changed, then don't recompute the tables - if(x==gamma_b) return; - - gamma_b=x; - refresh_gamma_b(); -} - -void -Gamma::set_black_level(float x) -{ - // If the black_level hasn't changed, then don't recompute the tables - if(x==black_level) return; - - black_level=x; - - // Rebuild tables - refresh_gamma_r(); - refresh_gamma_g(); - refresh_gamma_b(); -} - -void -Gamma::set_red_blue_level(float x) -{ - // If the black_level hasn't changed, then don't recompute the tables - if(x==red_blue_level) return; - - red_blue_level=x; - - // Rebuild tables - refresh_gamma_r(); - refresh_gamma_g(); - refresh_gamma_b(); -} - -void -Gamma::set_all(float r, float g, float b, float black, float red_blue) -{ - // If nothing has changed, then don't recompute the tables - if(gamma_r==r && gamma_g==g && gamma_b==b && black_level==black && red_blue_level==red_blue) - return; - - gamma_r=r; - gamma_g=g; - gamma_b=b; - black_level=black; - red_blue_level=red_blue; - - // Rebuild tables - refresh_gamma_r(); - refresh_gamma_g(); - refresh_gamma_b(); -} diff --git a/synfig-core/trunk/src/synfig/gamma.h b/synfig-core/trunk/src/synfig/gamma.h deleted file mode 100644 index 0d3da08..0000000 --- a/synfig-core/trunk/src/synfig/gamma.h +++ /dev/null @@ -1,108 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file gamma.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_GAMMA_H -#define __SYNFIG_GAMMA_H - -/* === H E A D E R S ======================================================= */ - -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/*! \class Gamma -** \brief This class performs color correction on Color classes. -** \stub -*/ -class Gamma -{ - float gamma_r; - float gamma_g; - float gamma_b; - float black_level; - float red_blue_level; - - unsigned char table_r_U16_to_U8[65536]; - unsigned char table_g_U16_to_U8[65536]; - unsigned char table_b_U16_to_U8[65536]; - - float table_r_U8_to_F32[256]; - float table_g_U8_to_F32[256]; - float table_b_U8_to_F32[256]; - -public: - Gamma(float x=1):black_level(0) { set_gamma(x); } - - void set_gamma(float x); - void set_gamma_r(float x); - void set_gamma_g(float x); - void set_gamma_b(float x); - void set_black_level(float x); - - void set_red_blue_level(float x); - void set_all(float r, float g, float b, float black, float red_blue=1.0f); - - float get_gamma()const { return (gamma_r+gamma_g+gamma_b)*0.33333333; } - float get_gamma_r()const { return gamma_r; } - float get_gamma_g()const { return gamma_g; } - float get_gamma_b()const { return gamma_b; } - float get_black_level()const { return black_level; } - float get_red_blue_level()const { return red_blue_level; } - - void refresh_gamma_r(); - void refresh_gamma_g(); - void refresh_gamma_b(); - - const unsigned char &r_U16_to_U8(int i)const { return table_r_U16_to_U8[i]; } - const unsigned char &g_U16_to_U8(int i)const { return table_g_U16_to_U8[i]; } - const unsigned char &b_U16_to_U8(int i)const { return table_b_U16_to_U8[i]; } - - const unsigned char &r_F32_to_U8(float x)const { return table_r_U16_to_U8[(int)(x*65535.0f)]; } - const unsigned char &g_F32_to_U8(float x)const { return table_g_U16_to_U8[(int)(x*65535.0f)]; } - const unsigned char &b_F32_to_U8(float x)const { return table_b_U16_to_U8[(int)(x*65535.0f)]; } - - unsigned short r_F32_to_U16(float x)const { return (unsigned short)table_r_U16_to_U8[(int)(x*65535.0f)]<<8; } - unsigned short g_F32_to_U16(float x)const { return (unsigned short)table_g_U16_to_U8[(int)(x*65535.0f)]<<8; } - unsigned short b_F32_to_U16(float x)const { return (unsigned short)table_b_U16_to_U8[(int)(x*65535.0f)]<<8; } - - const float& r_U8_to_F32(int i)const { return table_r_U8_to_F32[i]; } - const float& g_U8_to_F32(int i)const { return table_g_U8_to_F32[i]; } - const float& b_U8_to_F32(int i)const { return table_b_U8_to_F32[i]; } - - float r_F32_to_F32(float x)const { return static_cast(pow(x,gamma_r)*(1.0f-black_level)+black_level); } - float g_F32_to_F32(float x)const { return static_cast(pow(x,gamma_g)*(1.0f-black_level)+black_level); } - float b_F32_to_F32(float x)const { return static_cast(pow(x,gamma_b)*(1.0f-black_level)+black_level); } -}; // END of class Gamma - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/general.h b/synfig-core/trunk/src/synfig/general.h deleted file mode 100644 index 639eb51..0000000 --- a/synfig-core/trunk/src/synfig/general.h +++ /dev/null @@ -1,156 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file general.h -** \brief General macros, classes, and procedure declarations -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_GENERAL_H -#define __SYNFIG_GENERAL_H - -/* === H E A D E R S ======================================================= */ - -#include -#include "string.h" -#include "version.h" -#ifdef ENABLE_NLS - #include - #include -#endif - -/* === M A C R O S ========================================================= */ - -#ifdef ENABLE_NLS -#define _(x) dgettext("synfig",x) -#define gettext_noop(x) x -#define N_(x) gettext_noop(x) -#else -#define dgettext(a,x) (x) -#define _(x) (x) -#define N_(x) (x) -#endif - -#define SYNFIG_COPYRIGHT "Copyright (c) 2001-2005 Robert B. Quattlebaum Jr., Adrian Bentley" - - -#ifdef _DEBUG -#ifdef __FUNC__ -#define DEBUGPOINT() synfig::warning(etl::strprintf(__FILE__":"__FUNC__":%d DEBUGPOINT",__LINE__)) -#define DEBUGINFO(x) synfig::warning(etl::strprintf(__FILE__":"__FUNC__":%d:DEBUGINFO:",__LINE__)+x) -#else -#define DEBUGPOINT() synfig::warning(etl::strprintf(__FILE__":%d DEBUGPOINT",__LINE__)) -#define DEBUGINFO(x) synfig::warning(etl::strprintf(__FILE__":%d:DEBUGINFO:",__LINE__)+x) -#endif - -#else -#define DEBUGPOINT() -#define DEBUGINFO(x) -#endif - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class ChangeLocale { - const String previous; - const int category; -public: - ChangeLocale(int category, const char *locale): - previous(setlocale(category,locale)),category(category) - { - } - ~ChangeLocale() { - setlocale(category,previous.c_str()); - } -}; - -/*! \class ProgressCallback -** \todo writeme -*/ -class ProgressCallback -{ -public: - - virtual ~ProgressCallback() { } - virtual bool task(const String &/*task*/) { return true; } - virtual bool error(const String &/*task*/) { return true; } - virtual bool warning(const String &/*task*/) { return true; } - virtual bool amount_complete(int /*current*/, int /*total*/) { return true; } - - virtual bool valid() const { return true; } -}; - -typedef ProgressCallback ProgressManager; - -/*! \class SuperCallback -** \todo writeme -*/ -class SuperCallback : public ProgressCallback -{ - ProgressCallback *cb; - int start,end,tot; - int w; -public: - - SuperCallback() { cb=NULL; } - SuperCallback(ProgressCallback *cb,int start, int end, int total):cb(cb),start(start),end(end),tot(total) - { - //make sure we don't "inherit" if our subcallback is invalid - if(!cb || !cb->valid()) - cb = NULL; - w=end-start; - } - virtual bool task(const String &task) { if(cb)return cb->task(task); return true; } - virtual bool error(const String &task) { if(cb)return cb->error(task); return true; } - virtual bool warning(const String &task) { if(cb)return cb->warning(task); return true; } - virtual bool amount_complete(int cur, int total) { if(cb)return cb->amount_complete(start+cur*w/total,tot); return true; } - - virtual bool valid() const { return cb != 0; } -}; - - -/* -extern bool add_to_module_search_path(const std:string &path); -extern bool add_to_config_search_path(const std:string &path); -*/ - -//! Shutdown the synfig environment -extern void shutdown(); - -//! Reports an error -/*! Call this when an error occurs, describing what happened */ -extern void error(const char *format,...); -extern void error(const String &str); - -//! Reports a warning -/*! Call this when something questionable occurs, describing what happened */ -extern void warning(const char *format,...); -extern void warning(const String &str); - -//! Reports some information -/*! Call this to report various information. Please be sparse... */ -extern void info(const char *format,...); -extern void info(const String &str); - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/gradient.cpp b/synfig-core/trunk/src/synfig/gradient.cpp deleted file mode 100644 index 00f67b0..0000000 --- a/synfig-core/trunk/src/synfig/gradient.cpp +++ /dev/null @@ -1,574 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file gradient.cpp -** \brief Color Gradient Class Member Definitions -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "gradient.h" -#include "general.h" -#include -#include "exception.h" -#include - -#include -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -synfig::Gradient::Gradient(const Color &c1, const Color &c2) -{ - push_back(CPoint(0.0,c1)); - push_back(CPoint(1.0,c2)); -} - -synfig::Gradient::Gradient(const Color &c1, const Color &c2, const Color &c3) -{ - push_back(CPoint(0.0,c1)); - push_back(CPoint(0.5,c2)); - push_back(CPoint(1.0,c3)); -} - -// This sort algorithm MUST be stable -// ie: it must not change the order of items with the same value. -// I am using a bubble sort. -// This algorithm will sort a nearly-sorted list at ~O(N), and -// it will sort an inverse sorted list at ~O(N*N). -void -synfig::Gradient::sort() -{ - stable_sort(begin(),end()); - /* - iterator iter; - iterator iter2,next; - - for(iter=begin();iter!=end();iter++) - { - for(next=iter, iter2=next--;iter2!=begin();iter2=next--) - { - if(*iter<*next) - { - //insert(next,*iter); - //erase(iter); - iter_swap(next,iter); - - continue; - } - else - break; - } - } - */ -} - -static synfig::ColorAccumulator -supersample_helper(const synfig::Gradient::CPoint &color1, const synfig::Gradient::CPoint &color2, float begin, float end, float &weight) -{ - if(color1.pos==color2.pos || color1.pos>=end || color2.pos<=begin) - { - weight=0; - return Color::alpha(); - } - if(color1.pos>=begin && color2.pos=begin && color2.pos>=end) - { - weight=end-color1.pos; - float pos((end+color1.pos)*0.5); - float amount((pos-color1.pos)/(color2.pos-color1.pos)); - //if(abs(amount)>1)amount=(amount>0)?1:-1; - ColorAccumulator ret(Color::blend(color2.color,color1.color, amount, Color::BLEND_STRAIGHT).premult_alpha()*weight); - return ret; - } - if(color1.pos1)amount=(amount>0)?1:-1; - ColorAccumulator ret(Color::blend(color2.color,color1.color, amount, Color::BLEND_STRAIGHT).premult_alpha()*weight); - return ret; - } - synfig::error("color1.pos=%f",color1.pos); - synfig::error("color2.pos=%f",color2.pos); - synfig::error("begin=%f",begin); - synfig::error("end=%f",end); - - weight=0; - return Color::alpha(); - -// assert(0); -} - -static void show_gradient(const Gradient::CPointList x) -{ - int i = 0; - for (Gradient::const_iterator iter = x.begin(); iter != x.end(); iter++) - printf("%3d : %.3f %s\n", i++, (*iter).pos, (*iter).color.get_string().c_str()); -} - -Gradient & -synfig::Gradient::operator+=(const Gradient &rhs) -{ - bool print=false; // for debugging - if (print) { printf("\nadding lhs:\n"); show_gradient(this->cpoints); printf("\n"); } - if (print) { printf("adding rhs:\n"); show_gradient(rhs.cpoints); printf("\n"); } - CPointList ret; - const_iterator iter1 = begin(), iter2 = rhs.begin(), left_same, right_same; - CPoint left, right; - if (iter1 != end()) left = *iter1; - if (iter2 != rhs.end()) right = *iter2; - int pos1 = 0, pos2 = 0; - CPoint old1, old2; - - // if there are cpoints in both gradients run through both until one runs out - if (iter1 != end() && iter2 != rhs.end()) - while(true) - // if the left one has the first cpoint - if (left.pos < right.pos) - { - // add on the right gradient's value at this point - if (print) printf("using pos %.2f from left %d in loop\n", left.pos, pos1++); - ret.push_back(CPoint(left.pos, left.color + rhs(left.pos))); - if(++iter1 == end()) break; - left=*iter1; - } - // if the right one has the first cpoint - else if (left.pos > right.pos) - { - // add on the left gradient's value at this point - if (print) printf("using pos %.2f from right %d in loop\n", right.pos, pos2++); - ret.push_back(CPoint(right.pos, right.color + (*this)(right.pos))); - if(++iter2 == rhs.end()) break; - right=*iter2; - } - // they both have a cpoint at the same time - else - { - int tpos1 = pos1, tpos2 = pos2; - // skip past all cpoints at the same position - for(left_same = ++iter1; iter1 != end() && (*iter1).pos == left.pos; iter1++, pos1++) - if (print) printf("skipping past pos %d in left\n", pos1); - for(right_same = ++iter2; iter2 != rhs.end() && (*iter2).pos == right.pos; iter2++, pos2++) - if (print) printf("skipping past pos %d in right\n", pos2); - - // if there is only one cpoint at this position in each gradient, - // there's only one corresponding cpoint in the sum - if (iter1 == left_same && iter2 == right_same) - { - if (print) printf("two singles at left %d and right %d\n", pos1++, pos2++); - ret.push_back(CPoint(left.pos, left.color + right.color)); - } - // otherwise we sum the first in each, and the last in each - else - { - if (print) printf("[copying %ld from left %d and %ld from right %d at %.2f]\n", iter1-left_same+1, tpos1, iter2-right_same+1, tpos2, left.pos); - // merge the front two cpoints - if (print) printf(" copy front from left %d right %d\n", tpos1++, tpos2++); - ret.push_back(CPoint(left.pos, left.color + right.color)); - - // merge the middle pairs of points - each middle point merges with its counterpart - while(left_same < iter1-1 && right_same < iter2-1) - { - old1 = *(left_same++); - old2 = *(right_same++); - if (print) printf(" copy middle from left %d and right %d\n", tpos1++, tpos2++); - ret.push_back(CPoint(old1.pos, old1.color+old2.color)); - } - // if one gradient has more middle points than the other, merge the rest with the last point in the other gradient - for(old2 = (*(iter2-1)); left_same < iter1-1; left_same++) - { - old1 = *left_same; - if (print) printf(" copy middle from left %d plus end of right\n", tpos1++); - ret.push_back(CPoint(old1.pos, old1.color + old2.color)); - } - for(old1 = (*(iter1-1)); right_same < iter2-1; right_same++) - { - old2 = *right_same; - if (print) printf(" copy middle from right %d plus end of left\n", tpos2++); - ret.push_back(CPoint(old2.pos, old1.color + old2.color)); - } - // merge the back two cpoints - if (print) printf(" copy end from left %d right %d\n", pos1++, pos2++); - ret.push_back(CPoint(left.pos, (*(iter1-1)).color + (*(iter2-1)).color)); - } - // make sure we update 'left' and 'right' - if (iter1 != end()) left=*iter1; - if (iter2 == rhs.end()) break; - right = *iter2; - if (iter1 == end()) break; - } - - // one of the gradients has run out of points - // does the left one have points left? - if (iter1 != end()) - while(true) - { - if (print) printf("finish end from left %d\n", pos1++); - ret.push_back(CPoint(left.pos, left.color + rhs(left.pos))); - if(++iter1 == end()) break; - left = *iter1; - } - // the left one was empty, so maybe the right one has points left - else if (iter2 != rhs.end()) - while(true) - { - if (print) printf("finish end from right %d\n", pos2++); - ret.push_back(CPoint(right.pos, right.color + (*this)(right.pos))); - if(++iter2 == rhs.end()) break; - right = *iter2; - } - - if (print) { printf("\nsummed ret:\n"); show_gradient(ret); printf("\n"); } - cpoints = ret; - return *this; -} - -Gradient & -synfig::Gradient::operator-=(const Gradient &rhs) -{ - return (*this)+=(rhs*-1); -} - -Gradient & -synfig::Gradient::operator*=(const float &rhs) -{ - if (rhs == 0) - cpoints.clear(); - else - for (iterator iter = cpoints.begin(); iter!=cpoints.end(); iter++) - (*iter).color *= rhs; - return *this; -} - -Gradient & -synfig::Gradient::operator/=(const float &rhs) -{ - for (iterator iter = cpoints.begin(); iter!=cpoints.end(); iter++) - (*iter).color /= rhs; - return *this; -} - -Color -synfig::Gradient::operator()(const Real &x,float supersample)const -{ - if(cpoints.empty()) - return Color(0,0,0,0); - if(supersample<0) - supersample=-supersample; - if(supersample>2.0) - supersample=2.0f; - - float begin_sample(x-supersample*0.5); - float end_sample(x+supersample*0.5); - - if(cpoints.size()==1 || end_sample<=cpoints.front().pos || isnan(x)) - return cpoints.front().color; - - if(begin_sample>=cpoints.back().pos) - return cpoints.back().color; - - /* - if(end_sample>=back().pos) - end_sample=back().pos; - - if(begin_sample<=front().pos) - begin_sample=front().pos; - */ - - const_iterator iter,next; - - /* - //optimize... - Real left = x-supersample/2, right = x+supersample/2; - - if(left < front().pos) left = front().pos; - if(right > back().pos) right = back().pos; - - //find using binary search... - const_iterator iterl,iterr; - - //the binary search should give us the values BEFORE the point we're looking for... - iterl = binary_find(begin(),end(),left); - iterr = binary_find(iterl,end(),right); - - //now integrate over the range of left to right... - - if(iterl == iterr) - { - iterr++; //let's look at the next one shall we :) - - //interpolate neighboring colors - const Real one = iterr->pos - iterl->pos; - const Real lambda = (x - iterl->pos)/one; - - //(1-l)iterl + (l)iterr - return iterl->color.premult_alpha()*(1-lambda) + iterr->color.premult_alpha()*lambda; - - //return Color::blend(iterr->color,iterl->color,lambda,Color::BLEND_STRAIGHT); - }else - { - //integration madness - const_iterator i = iterl, ie = iterr+1; - Real wlast = left; - - ColorAccumulator clast,cwork; - { - const Real lambda = (x - iterl->pos)/(iterr->pos - iterl->pos); - - //premultiply because that's the form in which we can combine things... - clast = iterl->color.premult_alpha()*(1-lambda) + iterr->color.premult_alpha()*lambda; - //Color::blend((i+1)->color,i->color,(left - i->pos)/((i+1)->pos - i->pos),Color::BLEND_STRAIGHT); - } - - ColorAccumulator accum = 0; - - //loop through all the trapezoids and integrate them as we go... - // area of trap = (yi + yi1)*(xi1 - xi) - // yi = clast, xi = wlast, yi1 = i->color, xi1 = i->pos - - for(;i<=iterr; wlast=i->pos,clast=i->color.premult_alpha(),++i) - { - const Real diff = i->pos - wlast; - if(diff > 0) //only accumulate if there will be area to add - { - cwork = i->color.premult_alpha(); - accum += (cwork + clast)*diff; - } - } - - { - const_iterator ibef = i-1; - const Real diff = right - ibef->pos; - - if(diff > 0) - { - const Real lambda = diff/(i->pos - ibef->pos); - cwork = ibef->color.premult_alpha()*(1-lambda) + i->color.premult_alpha()*lambda; - - accum += (cwork + clast)*diff; //can probably optimize this more... but it's not too bad - } - } - - accum /= supersample; //should be the total area it was sampled over... - return accum.demult_alpha(); - }*/ - - next=begin(),iter=next++; - - //add for optimization - next = binary_find(begin(),end(),(Real)begin_sample); - iter = next++; - - //! As a future optimization, this could be performed faster - //! using a binary search. - for(;iter=iter->pos && xpos && iter->pos!=next->pos)) - { - // If the supersample region falls square in between - // two CPoints, then we don't have to do anything special. - if(next!=end() && (!supersample || (iter->pos<=begin_sample && next->pos>=end_sample))) - { - const Real dist(next->pos-iter->pos); - const Real pos(x-iter->pos); - const Real amount(pos/dist); - return Color::blend(next->color,iter->color, amount, Color::BLEND_STRAIGHT); - } - // In this case our supersample region extends over one or more - // CPoints. So, we need to calculate our coverage amount. - ColorAccumulator pool(Color::alpha()); - float divisor(0.0),weight(0); - - const_iterator iter2,next2; - iter2=iter; - if(iter==begin() && iter->pos>x) - { - weight=x-iter->pos; - //weight*=iter->color.get_a(); - pool+=ColorAccumulator(iter->color).premult_alpha()*weight; - divisor+=weight; - } - else - { - while(iter2->pos>=begin_sample) - { - if(iter2==begin()) - { - weight=iter2->pos-(begin_sample); - //weight*=iter2->color.get_a(); - pool+=ColorAccumulator(iter2->color).premult_alpha()*weight; - divisor+=weight; - break; - } - next2=iter2--; - pool+=supersample_helper(*iter2, *next2, begin_sample, end_sample, weight); - divisor+=weight; - } - } - - next2=iter; - iter2=next2++; - while(iter2->pos<=end_sample) - { - if(next2==end()) - { - weight=(end_sample)-iter2->pos; - pool+=ColorAccumulator(iter2->color).premult_alpha()*weight; - divisor+=weight; - break; - } - pool+=supersample_helper(*iter2, *next2, begin_sample, end_sample, weight); - divisor+=weight; - iter2=next2++; - } - - if(divisor && pool.get_a() && pool.is_valid()) - { -/* - pool.set_r(pool.get_r()/pool.get_a()); - pool.set_g(pool.get_g()/pool.get_a()); - pool.set_b(pool.get_b()/pool.get_a()); - pool.set_a(pool.get_a()/divisor); -*/ - pool/=divisor; - pool.set_r(pool.get_r()/pool.get_a()); - pool.set_g(pool.get_g()/pool.get_a()); - pool.set_b(pool.get_b()/pool.get_a()); - if(pool.is_valid()) - return pool; - else - return Color::alpha(); - } - else - return Color::alpha(); - } - } - - // We should never get to this point. - - synfig::error("synfig::Gradient::operator()(): Logic Error (x=%f)",x); - assert(0); - throw std::logic_error(strprintf("synfig::Gradient::operator()(): Logic Error (x=%f)",x)); -} - -synfig::Gradient::iterator -synfig::Gradient::proximity(const Real &x) -{ - iterator iter; - float dist(100000000); - float prev_pos(-0230); - // This algorithm requires a sorted list. - for(iter=begin();iterpos) - new_dist=(abs(x-iter->pos-0.00001)); - else - new_dist=(abs(x-iter->pos)); - - if(new_dist>dist) - { - iter--; - return iter; - } - dist=new_dist; - prev_pos=iter->pos; - } - iter--; - return iter; -} - -synfig::Gradient::const_iterator -synfig::Gradient::proximity(const Real &x)const -{ - return const_cast(this)->proximity(x); - /* - const_iterator iter; - float dist(100000000); - - // This algorithm requires a sorted list. - for(iter=begin();iterpos)); - if(new_dist>dist) - { - iter--; - return iter; - } - dist=new_dist; - } - iter--; - return iter; - */ -} - -synfig::Gradient::iterator -synfig::Gradient::find(const UniqueID &id) -{ - iterator iter; - - for(iter=begin();iter -#include -#include "uniqueid.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/*! \struct GradientCPoint -** \brief \todo -*/ -struct GradientCPoint : public UniqueID -{ - Real pos; - Color color; - - bool operator<(const GradientCPoint &rhs)const { return pos CPointList; - typedef CPointList::const_iterator const_iterator; - typedef CPointList::iterator iterator; - typedef CPointList::const_reverse_iterator const_reverse_iterator; - typedef CPointList::reverse_iterator reverse_iterator; -private: - CPointList cpoints; -public: - Gradient() { } - - //! Two-Tone Color Gradient Convenience Constructor - Gradient(const Color &c1, const Color &c2); - - //! Three-Tone Color Gradient Convenience Constructor - Gradient(const Color &c1, const Color &c2, const Color &c3); - - //! Alias for sort (Implemented for consistency) - void sync() { sort(); } - - //! You should call this function after changing stuff. - void sort(); - - void push_back(const CPoint cpoint) { cpoints.push_back(cpoint); } - iterator erase(iterator iter) { return cpoints.erase(iter); } - bool empty()const { return cpoints.empty(); } - size_t size()const { return cpoints.size(); } - - iterator begin() { return cpoints.begin(); } - iterator end() { return cpoints.end(); } - reverse_iterator rbegin() { return cpoints.rbegin(); } - reverse_iterator rend() { return cpoints.rend(); } - const_iterator begin()const { return cpoints.begin(); } - const_iterator end()const { return cpoints.end(); } - const_reverse_iterator rbegin()const { return cpoints.rbegin(); } - const_reverse_iterator rend()const { return cpoints.rend(); } - - Gradient &operator+=(const Gradient &rhs); - Gradient &operator-=(const Gradient &rhs); - Gradient &operator*=(const float &rhs); - Gradient &operator/=(const float &rhs); - - Gradient operator+(const Gradient &rhs)const { return Gradient(*this)+=rhs; } - Gradient operator-(const Gradient &rhs)const { return Gradient(*this)-=rhs; } - Gradient operator*(const float &rhs)const { return Gradient(*this)*=rhs; } - Gradient operator/(const float &rhs)const { return Gradient(*this)/=rhs; } - - Color operator()(const Real &x, float supersample=0)const; - - //! Returns the iterator of the CPoint closest to \a x - iterator proximity(const Real &x); - - //! Returns the const_iterator of the CPoint closest to \a x - const_iterator proximity(const Real &x)const; - - //! Returns the iterator of the CPoint with UniqueID \a id - iterator find(const UniqueID &id); - - //! Returns the const_iterator of the CPoint with UniqueID \a id - const_iterator find(const UniqueID &id)const; -}; // END of class Gradient - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/guid.cpp b/synfig-core/trunk/src/synfig/guid.cpp deleted file mode 100644 index e537ba6..0000000 --- a/synfig-core/trunk/src/synfig/guid.cpp +++ /dev/null @@ -1,206 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file guid.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "guid.h" -#include "quick_rng.h" -#include -#include -#include -#include -#include -#include - -#ifdef _DEBUG -#include "general.h" -#endif - -#ifdef HASH_MAP_H -#include HASH_MAP_H -#include FUNCTIONAL_H -#endif - -#ifdef _WIN32 -#include -#endif - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -#define MANUAL_GUID_CALC - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -#define GUID_RNG quick_rng -//#define GUID_RNG subtractive_rng - - - -#ifdef MANUAL_GUID_CALC -#include -static GUID_RNG _a, _b; -static void _set_up_rand_long_long(uint64_t &x); -static void _get_rand_long_long(uint64_t &x); -static void (*get_rand_long_long)(uint64_t&)=_set_up_rand_long_long; -static void _set_up_rand_long_long(uint64_t &x) -{ -#ifdef _DEBUG - // synfig::info("Starting up GUID system..."); -#endif - _a=GUID_RNG(time(0)+clock()); - _b=GUID_RNG(clock()); - get_rand_long_long=_get_rand_long_long; - _get_rand_long_long(x); -} - -static void _get_rand_long_long(uint64_t &x) -{ - //subtractive_rng _c(clock()); - unsigned short* data(reinterpret_cast(&x)); - data[0]=_a(65536); - data[1]=_a(65536); - data[2]=_a(65536); - data[3]=_a(65536); -} - -#else -// Use OS-Dependent method - -#ifdef _WIN32 -// Win32 -static void get_rand_long_long(uint64_t &x) -{ - _GUID* guid(reinterpret_cast<_GUID*>(&x)); - CoCreateGuid(guid); -} - -#else -// Unix -static int rand_fd; -static void _set_up_rand_long_long(uint64_t &x); -static void _get_rand_long_long(uint64_t &x); -static void (*get_rand_long_long)(uint64_t&)=_set_up_rand_long_long; -static void _set_up_rand_long_long(uint64_t &x) -{ -#ifdef _DEBUG - // synfig::info("Starting up GUID system..."); -#endif - rand_fd=open("/dev/urandom",O_RDONLY); - get_rand_long_long=_get_rand_long_long; - _get_rand_long_long(x); -} - -static void _get_rand_long_long(uint64_t &x){ read(rand_fd,&x,sizeof(x));} - -#endif -#endif - - - -void -synfig::GUID::make_unique() -{ - get_rand_long_long(data.u_64.a); - get_rand_long_long(data.u_64.b); -} - -synfig::GUID -synfig::GUID::hasher(const String& str) -{ -#ifdef HASH_MAP_H - /* http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2003/n1456.html says: - * - * "Some earlier hash table implementations gave char* special - * treatment: it specialized the default hash function to look - * at character array being pointed to, rather than the pointer - * itself. This proposal removes that special treatment." - * - * Unfortunately, the older implementation doesn't seem to want to - * accept Strings, so we're left with this conditional compilation. - */ -# ifdef FUNCTIONAL_HASH_ON_STRING - HASH_MAP_NAMESPACE::hash string_hash_; - const unsigned int seed(string_hash_(str)); -# else // FUNCTIONAL_HASH_ON_STRING - HASH_MAP_NAMESPACE::hash string_hash_; - const unsigned int seed(string_hash_(str.c_str())); -# endif // FUNCTIONAL_HASH_ON_STRING -#else // HASH_MAP_H - unsigned int seed(0x3B642879); - for(unsigned int i=0;i>(32-(i%24)))^(seed<<(i%24)); - } -#endif // HASH_MAP_H - - GUID_RNG random(seed); - GUID ret(0); - ret.data.u_32.a=random(~(unsigned int)0); - ret.data.u_32.b=random(~(unsigned int)0); - ret.data.u_32.c=random(~(unsigned int)0); - ret.data.u_32.d=random(~(unsigned int)0); - return ret; -} - -synfig::GUID -synfig::GUID::hasher(int i) -{ - GUID ret(0); - GUID_RNG random(i); - ret.data.u_32.a=random(~(unsigned int)0); - ret.data.u_32.b=random(~(unsigned int)0); - ret.data.u_32.c=random(~(unsigned int)0); - ret.data.u_32.d=random(~(unsigned int)0); - return ret; -} - -String -synfig::GUID::get_string()const -{ - return strprintf("%08X%08X%08X%08X",data.u_32.a,data.u_32.b,data.u_32.c,data.u_32.d); -} - -synfig::GUID::GUID(const String &str) -{ - strscanf(str,"%08X%08X%08X%08X",&data.u_32.a,&data.u_32.b,&data.u_32.c,&data.u_32.d); -} diff --git a/synfig-core/trunk/src/synfig/guid.h b/synfig-core/trunk/src/synfig/guid.h deleted file mode 100644 index c822628..0000000 --- a/synfig-core/trunk/src/synfig/guid.h +++ /dev/null @@ -1,141 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file guid.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_GUID_H -#define __SYNFIG_GUID_H - -/* === H E A D E R S ======================================================= */ - -#include "string.h" -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class GUID -{ - union { - struct { - unsigned int a; - unsigned int b; - unsigned int c; - unsigned int d; - } u_32; - struct { - uint64_t a; - uint64_t b; - } u_64; - - } data; - -public: - GUID() - { make_unique(); } - GUID(const GUID& x):data(x.data) - { } - GUID(const int i __attribute__ ((unused))){assert(!i); data.u_64.a=0;data.u_64.b=0;} - - GUID(const String& str); - - static GUID zero() { return GUID(0); } - static GUID hasher(const String& str); - static GUID hasher(int i); - - operator bool()const { return data.u_32.a||data.u_32.b||data.u_32.c||data.u_32.d; } - - uint64_t get_hi()const { return data.u_64.a; } - uint64_t get_lo()const { return data.u_64.b; } - - uint64_t get_hi_hi()const { return data.u_32.a; } - uint64_t get_hi_lo()const { return data.u_32.b; } - uint64_t get_lo_hi()const { return data.u_32.c; } - uint64_t get_lo_lo()const { return data.u_32.d; } - - void make_unique(); - String get_string()const; - - bool operator==(const GUID& rhs)const - { return data.u_64.a==rhs.data.u_64.a && data.u_64.b==rhs.data.u_64.b; } - bool operator!=(const GUID& rhs)const - { return data.u_64.a!=rhs.data.u_64.a || data.u_64.b!=rhs.data.u_64.b; } - bool operator<(const GUID& rhs)const - { return (data.u_64.a==rhs.data.u_64.a)?(data.u_64.b(const GUID& rhs)const - { return (data.u_64.a==rhs.data.u_64.a)?(data.u_64.b>rhs.data.u_64.b):(data.u_64.a>rhs.data.u_64.a); } - bool operator<=(const GUID& rhs)const - { return operator<(rhs) || operator==(rhs); } - bool operator>=(const GUID& rhs)const - { return operator>(rhs) || operator==(rhs); } - - //! Operator '^' (xor) - /*! If A ^ B == C, then C ^ B == A and B ^ A == C. - ** Also keep in mind that A ^ A == 0 and A ^ B ^ B = A. */ - GUID& operator^=(const GUID& rhs) - { - data.u_32.a^=rhs.data.u_32.a; - data.u_32.b^=rhs.data.u_32.b; - data.u_32.c^=rhs.data.u_32.c; - data.u_32.d^=rhs.data.u_32.d; - return *this; - } - GUID operator^(const GUID& rhs)const { return GUID(*this)^=rhs; } - - //! Operator '%' (alt-xor) - /*! A % B != B % A. */ - GUID& operator%=(const GUID& rhs) - { - data.u_32.a^=rhs.data.u_32.b; - data.u_32.b^=rhs.data.u_32.c; - data.u_32.c^=rhs.data.u_32.d; - data.u_32.d^=rhs.data.u_32.a; - return *this; - } - GUID operator%(const GUID& rhs)const { return GUID(*this)%=rhs; } - -}; - -class GUIDHash -{ -public: - size_t operator()(const GUID& guid)const - { - return - guid.get_hi_hi()+ - guid.get_hi_lo()+ - guid.get_lo_hi()+ - guid.get_lo_lo(); - } -}; - -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/guidset.h b/synfig-core/trunk/src/synfig/guidset.h deleted file mode 100644 index 32d6127..0000000 --- a/synfig-core/trunk/src/synfig/guidset.h +++ /dev/null @@ -1,60 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file guidset.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_GUIDSET_H -#define __SYNFIG_GUIDSET_H - -/* === H E A D E R S ======================================================= */ - -#include "guid.h" - -#ifdef HASH_SET_H -#include HASH_SET_H -#else -#include -#endif - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class GUIDSet : public -#ifdef HASH_SET_H -std::set -#else -HASH_SET_CLASS -#endif -{ -}; // END of class GUIDSet - -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/importer.cpp b/synfig-core/trunk/src/synfig/importer.cpp deleted file mode 100644 index e271110..0000000 --- a/synfig-core/trunk/src/synfig/importer.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file importer.cpp -** \brief writeme -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_NO_ANGLE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "canvas.h" -#include "importer.h" -#include "surface.h" -#include -#include "string.h" -#include -#include -#include - -#endif - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -using namespace etl; -using namespace std; -using namespace synfig; - -Importer::Book* synfig::Importer::book_; - -map *__open_importers; - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -bool -Importer::subsys_init() -{ - book_=new Book(); - __open_importers=new map(); - return true; -} - -bool -Importer::subsys_stop() -{ - delete book_; - delete __open_importers; - return true; -} - -Importer::Book& -Importer::book() -{ - return *book_; -} - -Importer::Handle -Importer::open(const String &filename) -{ - if(filename.empty()) - { - synfig::error(_("Importer::open(): Cannot open empty filename")); - return 0; - } - - // If we already have an importer open under that filename, - // then use it instead. - if(__open_importers->count(filename)) - { - //synfig::info("Found importer already open, using it..."); - return (*__open_importers)[filename]; - } - - if(filename_extension(filename) == "") - { - synfig::error(_("Importer::open(): Couldn't find extension")); - return 0; - } - - String ext(filename_extension(filename)); - if (ext.size()) ext = ext.substr(1); // skip initial '.' - std::transform(ext.begin(),ext.end(),ext.begin(),&::tolower); - - - if(!Importer::book().count(ext)) - { - synfig::error(_("Importer::open(): Unknown file type -- ")+ext); - return 0; - } - - try { - Importer::Handle importer; - importer=Importer::book()[ext](filename.c_str()); - (*__open_importers)[filename]=importer; - return importer; - } - catch (String str) - { - synfig::error(str); - } - return 0; -} - -Importer::Importer(): - gamma_(2.2) -{ -} - - -Importer::~Importer() -{ - // Remove ourselves from the open importer list - map::iterator iter; - for(iter=__open_importers->begin();iter!=__open_importers->end();++iter) - if(iter->second==this) - { - __open_importers->erase(iter); - } -} diff --git a/synfig-core/trunk/src/synfig/importer.h b/synfig-core/trunk/src/synfig/importer.h deleted file mode 100644 index 4391c4e..0000000 --- a/synfig-core/trunk/src/synfig/importer.h +++ /dev/null @@ -1,131 +0,0 @@ -#include -/* === S Y N F I G ========================================================= */ -/*! \file importer.h -** \brief writeme -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_IMPORTER_H -#define __SYNFIG_IMPORTER_H - -/* === H E A D E R S ======================================================= */ - -#include -//#include -#include -#include "string.h" -//#include "surface.h" -//#include "general.h" -//#include "vector.h" -#include "time.h" -#include "gamma.h" - -/* === M A C R O S ========================================================= */ - -//! \writeme -#define SYNFIG_IMPORTER_MODULE_EXT public: static const char name__[], version__[], ext__[],cvs_id__[]; static Importer *create(const char *filename); - -//! Sets the name of the importer -#define SYNFIG_IMPORTER_SET_NAME(class,x) const char class::name__[]=x - -//! \writeme -#define SYNFIG_IMPORTER_SET_EXT(class,x) const char class::ext__[]=x - -//! Sets the version of the importer -#define SYNFIG_IMPORTER_SET_VERSION(class,x) const char class::version__[]=x - -//! Sets the CVS ID of the importer -#define SYNFIG_IMPORTER_SET_CVS_ID(class,x) const char class::cvs_id__[]=x - -//! \writeme -#define SYNFIG_IMPORTER_INIT(class) synfig::Importer* class::create(const char *filename) { return new class(filename); } - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class Surface; -class ProgressCallback; - -/*! \class Importer -** \brief Used for importing bitmaps of various formats, including animations -** \todo Write more detailed description -*/ -class Importer : public etl::shared_object -{ -public: - typedef Importer* (*Factory)(const char *filename); - typedef std::map Book; - static Book* book_; - - static Book& book(); - - static bool subsys_init(); - static bool subsys_stop(); - - typedef etl::handle Handle; - typedef etl::loose_handle LooseHandle; - typedef etl::handle ConstHandle; - -private: - Gamma gamma_; - -protected: - Importer(); - -public: - - Gamma& gamma() { return gamma_; } - const Gamma& gamma()const { return gamma_; } - - virtual ~Importer(); - - //! Gets a frame and puts it into \a surface - /*! \param surface Reference to surface to put frame into - ** \param time For animated importers, determines which frame to get. - ** For static importers, this parameter is unused. - ** \param callback Pointer to callback class for progress, errors, etc. - ** \return \c true on success, \c false on error - ** \see ProgressCallback, Surface - */ - virtual bool get_frame(Surface &surface,Time time, ProgressCallback *callback=NULL)=0; - virtual bool get_frame(Surface &surface,Time time, - bool &trimmed __attribute__ ((unused)), - unsigned int &width __attribute__ ((unused)), unsigned int &height __attribute__ ((unused)), - unsigned int &top __attribute__ ((unused)), unsigned int &left __attribute__ ((unused)), - ProgressCallback *callback=NULL) { - return get_frame(surface,time,callback); - } - - //! Returns \c true if the importer pays attention to the \a time parameter of get_frame() - virtual bool is_animated() { return false; } - - //! Attempts to open \a filename, and returns a handle to the associated Importer - static Handle open(const String &filename); -}; - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/interpolation.h b/synfig-core/trunk/src/synfig/interpolation.h deleted file mode 100644 index 63f2ee6..0000000 --- a/synfig-core/trunk/src/synfig/interpolation.h +++ /dev/null @@ -1,54 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file interpolation.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_INTERPOLATION_H -#define __SYNFIG_INTERPOLATION_H - -/* === H E A D E R S ======================================================= */ - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -enum Interpolation -{ - INTERPOLATION_TCB, // 0 - INTERPOLATION_CONSTANT, // 1 - INTERPOLATION_LINEAR, // 2 - INTERPOLATION_HALT, // 3 - INTERPOLATION_MANUAL, // 4 - INTERPOLATION_UNDEFINED, // 5 - INTERPOLATION_NIL // 6 -}; // END enum Interpolation - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/keyframe.cpp b/synfig-core/trunk/src/synfig/keyframe.cpp deleted file mode 100644 index baade29..0000000 --- a/synfig-core/trunk/src/synfig/keyframe.cpp +++ /dev/null @@ -1,235 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file keyframe.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include - -#include - -#include "keyframe.h" -#include "exception.h" -#include "general.h" -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -Keyframe::Keyframe(): - time_(0) -{ -} - -Keyframe::Keyframe(const Time &time): - time_(time) -{ -} - -Keyframe::~Keyframe() -{ -} - -void -KeyframeList::dump()const -{ - const_iterator iter; - int i; - synfig::info(">>>>>>>>BEGIN KEYFRAME DUMP"); - for(iter=begin(),i=0;iter!=end();++iter,i++) - { - synfig::info("#%d, time: %s, desc: %s",i,iter->get_time().get_string().c_str(),iter->get_description().c_str()); - } - synfig::info("<<<<<<<::erase(find(x)); -} - -KeyframeList::iterator -KeyframeList::find(const Time &x) -{ - KeyframeList::iterator iter; - iter=binary_find(begin(),end(),x); - if(iter!=end() && iter->get_time().is_equal(x)) - return iter; -/* iter++; - if(iter!=end() && iter->get_time().is_equal(x)) - return iter; -*/ - throw Exception::NotFound(strprintf("KeyframeList::find(): Can't find Keyframe %s",x.get_string().c_str())); -} - -KeyframeList::iterator -KeyframeList::find_next(const Time &x) -{ - KeyframeList::iterator iter(binary_find(begin(),end(),x)); - - if(iter!=end()) - { - if(iter->get_time().is_more_than(x)) - return iter; - ++iter; - if(iter!=end()) - { - if(iter->get_time().is_more_than(x)) - return iter; -/* ++iter; - if(iter!=end() && iter->get_time().is_more_than(x)) - return iter; -*/ - } - } - - throw Exception::NotFound(strprintf("KeyframeList::find(): Can't find next Keyframe %s",x.get_string().c_str())); -} - - -KeyframeList::iterator -KeyframeList::find_prev(const Time &x) -{ - KeyframeList::iterator iter(binary_find(begin(),end(),x)); - - if(iter!=end()) - { - if(iter->get_time()+Time::epsilon()get_time()+Time::epsilon()(this)->find(x); -} - - -KeyframeList::const_iterator -KeyframeList::find_next(const Time &x)const -{ - return const_cast(this)->find_next(x); - -} - - -KeyframeList::const_iterator -KeyframeList::find_prev(const Time &x)const -{ - return const_cast(this)->find_prev(x); - -} - -void -KeyframeList::find_prev_next(const Time& time, Time &prev, Time &next)const -{ - try { prev=find_prev(time)->get_time(); } - catch(...) { prev=Time::begin(); } - try { next=find_next(time)->get_time(); } - catch(...) { next=Time::end(); } -} - -void -KeyframeList::insert_time(const Time& location, const Time& delta) -{ -// synfig::info("KeyframeList::insert_time(): loc=%s, delta=%s",location.get_string().c_str(),delta.get_string().c_str()); - if(!delta) - return; - try - { - iterator iter(find_next(location)); - for(;iter!=end();++iter) - { - iter->set_time(iter->get_time()+delta); - } - sync(); - } - catch(Exception::NotFound) { } -} diff --git a/synfig-core/trunk/src/synfig/keyframe.h b/synfig-core/trunk/src/synfig/keyframe.h deleted file mode 100644 index d8f9bf7..0000000 --- a/synfig-core/trunk/src/synfig/keyframe.h +++ /dev/null @@ -1,128 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file keyframe.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_KEYFRAME_H -#define __SYNFIG_KEYFRAME_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include "string.h" -#include "time.h" -#include "uniqueid.h" -#include "guid.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -//! \writeme -class Keyframe : public UniqueID -{ -public: - - Time time_; - String desc_; - GUID guid_; - -public: - - Keyframe(); - - Keyframe(const Time &time); - - ~Keyframe(); - - void set_time(Time x) { time_=x; } - - Time get_time()const { return time_; } - - void set_description(String x) { desc_=x; } - - String get_description()const { return desc_; } - - const GUID& get_guid()const { return guid_; } - void set_guid(const GUID& x) { guid_=x; } - - using UniqueID::operator<; - using UniqueID::operator==; - using UniqueID::operator!=; - using UniqueID::operator=; - - bool operator<(const Keyframe &rhs)const { return time_ -{ - -public: - - iterator add(const Keyframe &x); - - void erase(const UniqueID &x); - - iterator find(const UniqueID &x); - - const_iterator find(const UniqueID &x)const; - - //! Finds the keyframe at an exact point in time - iterator find(const Time &x); - - //! Finds the keyframe after that point in time - iterator find_next(const Time &x); - - //! Finds the keyframe before that point in time - iterator find_prev(const Time &x); - - const_iterator find(const Time &x)const; - const_iterator find_next(const Time &x)const; - const_iterator find_prev(const Time &x)const; - - void find_prev_next(const Time& time, Time &prev, Time &next)const; - - void insert_time(const Time& location, const Time& delta); - - void dump()const; - void sync(); -}; - -//typedef std::list KeyframeList; - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/layer.cpp b/synfig-core/trunk/src/synfig/layer.cpp deleted file mode 100644 index 8fcbfbf..0000000 --- a/synfig-core/trunk/src/synfig/layer.cpp +++ /dev/null @@ -1,613 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer.cpp -** \brief Layer class implementation -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_NO_ANGLE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "canvas.h" -#include "layer.h" -#include "render.h" -#include "value.h" -#include "layer_bitmap.h" -#include "layer_mime.h" -#include "context.h" -#include "paramdesc.h" - -#include "layer_solidcolor.h" -#include "layer_polygon.h" -#include "layer_pastecanvas.h" -#include "layer_motionblur.h" -#include "layer_duplicate.h" - -#include "valuenode_const.h" - -#include "transform.h" -#include "rect.h" -#include "guid.h" - -#include -#endif - -/* === U S I N G =========================================================== */ - -using namespace etl; -using namespace std; -using namespace synfig; - -/* === G L O B A L S ======================================================= */ - -static Layer::Book* _layer_book; - -struct _LayerCounter -{ - static int counter; - ~_LayerCounter() - { - if(counter) - synfig::error("%d layers not yet deleted!",counter); - } -} _layer_counter; - -int _LayerCounter::counter(0); - -/* === P R O C E D U R E S ================================================= */ - -Layer::Book& -Layer::book() -{ - return *_layer_book; -} - -void -Layer::register_in_book(const BookEntry &entry) -{ - book()[entry.name]=entry; -} - -bool -Layer::subsys_init() -{ - _layer_book=new Book(); - -#define INCLUDE_LAYER(class) \ - synfig::Layer::book() [synfig::String(class::name__)] = \ - BookEntry(class::create, \ - class::name__, \ - dgettext("synfig", class::local_name__), \ - class::category__, \ - class::cvs_id__, \ - class::version__) - -#define LAYER_ALIAS(class,alias) \ - synfig::Layer::book()[synfig::String(alias)] = \ - BookEntry(class::create, \ - alias, \ - alias, \ - CATEGORY_DO_NOT_USE, \ - class::cvs_id__, \ - class::version__) - - INCLUDE_LAYER(Layer_SolidColor); LAYER_ALIAS(Layer_SolidColor, "solid_color"); - INCLUDE_LAYER(Layer_PasteCanvas); LAYER_ALIAS(Layer_PasteCanvas, "paste_canvas"); - INCLUDE_LAYER(Layer_Polygon); LAYER_ALIAS(Layer_Polygon, "Polygon"); - INCLUDE_LAYER(Layer_MotionBlur); LAYER_ALIAS(Layer_MotionBlur, "motion_blur"); - INCLUDE_LAYER(Layer_Duplicate); - -#undef INCLUDE_LAYER - - return true; -} - -bool -Layer::subsys_stop() -{ - delete _layer_book; - return true; -} - -/* === M E T H O D S ======================================================= */ - -Layer::Layer(): - active_(true), - z_depth_(0.0f), - dirty_time_(Time::end()) -{ - _LayerCounter::counter++; -} - -Layer::LooseHandle -synfig::Layer::create(const String &name) -{ - if(!book().count(name)) - { - return Layer::LooseHandle(new Layer_Mime(name)); - } - - Layer* layer(book()[name].factory()); - return Layer::LooseHandle(layer); -} - -synfig::Layer::~Layer() -{ - _LayerCounter::counter--; - while(!dynamic_param_list_.empty()) - { - remove_child(dynamic_param_list_.begin()->second.get()); - dynamic_param_list_.erase(dynamic_param_list_.begin()); - } - - remove_from_all_groups(); - - parent_death_connect_.disconnect(); - begin_delete(); -} - -void -synfig::Layer::set_canvas(etl::loose_handle x) -{ - if(canvas_!=x) - { - parent_death_connect_.disconnect(); - canvas_=x; - if(x) - { - parent_death_connect_=x->signal_deleted().connect( - sigc::bind( - sigc::mem_fun( - *this, - &Layer::set_canvas - ), - etl::loose_handle(0) - ) - ); - } - on_canvas_set(); - } -} - -void -synfig::Layer::on_canvas_set() -{ -} - -etl::loose_handle -synfig::Layer::get_canvas()const -{ - return canvas_; -} - -int -Layer::get_depth()const -{ - if(!get_canvas()) - return -1; - return get_canvas()->get_depth(const_cast(this)); -} - -void -Layer::set_active(bool x) -{ - if(active_!=x) - { - active_=x; - - Node::on_changed(); - signal_status_changed_(); - } -} - -void -Layer::set_description(const String& x) -{ - if(description_!=x) - { - description_=x; - signal_description_changed_(); - } -} - -bool -Layer::connect_dynamic_param(const String& param, etl::loose_handle value_node) -{ - ValueNode::Handle previous(dynamic_param_list_[param]); - - if(previous==value_node) - return true; - - dynamic_param_list_[param]=ValueNode::Handle(value_node); - - if(previous) - remove_child(previous.get()); - - add_child(value_node.get()); - - if(!value_node->is_exported() && get_canvas()) - { - value_node->set_parent_canvas(get_canvas()); - } - - changed(); - return true; -} - -bool -Layer::disconnect_dynamic_param(const String& param) -{ - ValueNode::Handle previous(dynamic_param_list_[param]); - - if(previous) - { - dynamic_param_list_.erase(param); - - // fix 2353284: if two parameters in the same layer are - // connected to the same valuenode and we disconnect one of - // them, the parent-child relationship for the remaining - // connection was being deleted. now we search the parameter - // list to see if another parameter uses the same valuenode - DynamicParamList::const_iterator iter; - for (iter = dynamic_param_list().begin(); iter != dynamic_param_list().end(); iter++) - if (iter->second == previous) - break; - if (iter == dynamic_param_list().end()) - remove_child(previous.get()); - - changed(); - } - return true; -} - -void -Layer::on_changed() -{ - dirty_time_=Time::end(); - Node::on_changed(); -} - -bool -Layer::set_param(const String ¶m, const ValueBase &value) -{ - if(param=="z_depth" && value.same_type_as(z_depth_)) - { - z_depth_=value.get(z_depth_); - return true; - } - return false; -} - -etl::handle -Layer::get_transform()const -{ - return 0; -} - -float -Layer::get_z_depth(const synfig::Time& t)const -{ - if(!dynamic_param_list().count("z_depth")) - return z_depth_; - return (*dynamic_param_list().find("z_depth")->second)(t).get(Real()); -} - -Layer::Handle -Layer::simple_clone()const -{ - if(!book().count(get_name())) return 0; - Handle ret = create(get_name()).get(); - ret->group_=group_; - //ret->set_canvas(get_canvas()); - ret->set_description(get_description()); - ret->set_active(active()); - ret->set_param_list(get_param_list()); - for(DynamicParamList::const_iterator iter=dynamic_param_list().begin();iter!=dynamic_param_list().end();++iter) - ret->connect_dynamic_param(iter->first, iter->second); - return ret; -} - -Layer::Handle -Layer::clone(const GUID& deriv_guid) const -{ - if(!book().count(get_name())) return 0; - - //Layer *ret = book()[get_name()].factory();//create(get_name()).get(); - Handle ret = create(get_name()).get(); - - ret->group_=group_; - //ret->set_canvas(get_canvas()); - ret->set_description(get_description()); - ret->set_active(active()); - ret->set_guid(get_guid()^deriv_guid); - - //ret->set_param_list(get_param_list()); - // Process the parameter list so that - // we can duplicate any inline canvases - ParamList param_list(get_param_list()); - for(ParamList::const_iterator iter(param_list.begin()); iter != param_list.end(); ++iter) - { - if(dynamic_param_list().count(iter->first)==0 && iter->second.get_type()==ValueBase::TYPE_CANVAS) - { - // This parameter is a canvas. We need a close look. - Canvas::Handle canvas(iter->second.get(Canvas::Handle())); - if(canvas && canvas->is_inline()) - { - // This parameter is an inline canvas! we need to clone it - // before we set it as a parameter. - Canvas::Handle new_canvas(canvas->clone(deriv_guid)); - ValueBase value(new_canvas); - ret->set_param(iter->first, value); - continue; - } - } - - // This is a normal parameter,go ahead and set it. - ret->set_param(iter->first, iter->second); - } - - // Duplicate the dynamic paramlist, but only the exported data nodes - DynamicParamList::const_iterator iter; - for(iter=dynamic_param_list().begin();iter!=dynamic_param_list().end();++iter) - { - // Make sure we clone inline canvases - if(iter->second->get_type()==ValueBase::TYPE_CANVAS) - { - Canvas::Handle canvas((*iter->second)(0).get(Canvas::Handle())); - if(canvas->is_inline()) - { - Canvas::Handle new_canvas(canvas->clone(deriv_guid)); - ValueBase value(new_canvas); - ret->connect_dynamic_param(iter->first,ValueNode_Const::create(value)); - continue; - } - } - - if(iter->second->is_exported()) - ret->connect_dynamic_param(iter->first,iter->second); - else - ret->connect_dynamic_param(iter->first,iter->second->clone(deriv_guid)); - } - - //ret->set_canvas(0); - - return ret; -} - -bool -Layer::reads_context() const -{ - return false; -} - -Rect -Layer::get_full_bounding_rect(Context context)const -{ - if(active()) - return context.get_full_bounding_rect()|get_bounding_rect(); - return context.get_full_bounding_rect(); -} - -Rect -Layer::get_bounding_rect()const -{ - return Rect::full_plane(); -} - -bool -Layer::set_param_list(const ParamList &list) -{ - bool ret=true; - if(!list.size()) - return false; - ParamList::const_iterator iter(list.begin()); - for(;iter!=list.end();++iter) - { - if(!set_param(iter->first, iter->second))ret=false; - } - return ret; -} - -Layer::ParamList -Layer::get_param_list()const -{ - ParamList ret; - - Vocab vocab(get_param_vocab()); - - Vocab::const_iterator iter=vocab.begin(); - for(;iter!=vocab.end();++iter) - { - ret[iter->get_name()]=get_param(iter->get_name()); - } - return ret; -} - -ValueBase -Layer::get_param(const String & param)const -{ - if(param=="z_depth") - return get_z_depth(); - - return ValueBase(); -} - -String -Layer::get_version()const -{ - return get_param("version__").get(String()); -} - -bool -Layer::set_version(const String &/*ver*/) -{ - return false; -} - -void -Layer::reset_version() -{ -} - - -void -Layer::set_time(Context context, Time time)const -{ - context.set_time(time); - dirty_time_=time; -} - -void -Layer::set_time(Context context, Time time, const Point &pos)const -{ - context.set_time(time,pos); - dirty_time_=time; -} - -Color -Layer::get_color(Context context, const Point &pos)const -{ - return context.get_color(pos); -} - -synfig::Layer::Handle -Layer::hit_check(synfig::Context context, const synfig::Point &pos)const -{ - return context.hit_check(pos); -} - -/* The default accelerated renderer -** is anything but accelerated... -*/ -bool -Layer::accelerated_render(Context context,Surface *surface,int /*quality*/, const RendDesc &renddesc, ProgressCallback *cb) const -{ - handle target=surface_target(surface); - if(!target) - { - if(cb)cb->error(_("Unable to create surface target")); - return false; - } - RendDesc desc=renddesc; - target->set_rend_desc(&desc); - - // When we render, we want to - // make sure that we are rendered too... - // Since the context iterator is for - // the layer after us, we need to back up. - // This could be considered a hack, as - // it is a possibility that we are indeed - // not the previous layer. - --context; - - return render(context,target,desc,cb); - //return render_threaded(context,target,desc,cb,2); -} - -String -Layer::get_name()const -{ - return get_param("name__").get(String()); -} - -String -Layer::get_local_name()const -{ - return get_param("local_name__").get(String()); -} - - -Layer::Vocab -Layer::get_param_vocab()const -{ - Layer::Vocab ret; - - ret.push_back(ParamDesc(z_depth_,"z_depth") - .set_local_name(_("Z Depth")) - .set_animation_only(true) - ); - - return ret; -} - -void -Layer::get_times_vfunc(Node::time_set &set) const -{ - DynamicParamList::const_iterator i = dynamic_param_list_.begin(), - end = dynamic_param_list_.end(); - - for(; i != end; ++i) - { - const Node::time_set &tset = i->second->get_times(); - set.insert(tset.begin(),tset.end()); - } -} - - -void -Layer::add_to_group(const String&x) -{ - if(x==group_) - return; - if(!group_.empty()) - remove_from_all_groups(); - group_=x; - signal_added_to_group()(group_); -} - -void -Layer::remove_from_group(const String&x) -{ - if(group_==x) - remove_from_all_groups(); -} - -void -Layer::remove_from_all_groups() -{ - if(group_.empty()) - return; - signal_removed_from_group()(group_); - group_.clear(); -} - -String -Layer::get_group()const -{ - return group_; -} - -const String -Layer::get_param_local_name(const String ¶m_name)const -{ - ParamVocab vocab = get_param_vocab(); - // loop to find the parameter in the parameter vocab - this gives us its local name - for (ParamVocab::iterator iter = vocab.begin(); iter != vocab.end(); iter++) - if (iter->get_name() == param_name) - return iter->get_local_name(); - return String(); -} diff --git a/synfig-core/trunk/src/synfig/layer.h b/synfig-core/trunk/src/synfig/layer.h deleted file mode 100644 index f729c40..0000000 --- a/synfig-core/trunk/src/synfig/layer.h +++ /dev/null @@ -1,517 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer.h -** \brief Layer Class Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_LAYER_H -#define __SYNFIG_LAYER_H - -/* === H E A D E R S ======================================================= */ - -#include "string_decl.h" -#include -#include -#include "real.h" -#include "string.h" -#include -#include -#include "node.h" -#include "time.h" -#include "guid.h" - -/* === M A C R O S ========================================================= */ - -//! \writeme -#define SYNFIG_LAYER_MODULE_EXT \ - public: \ - static const char name__[], version__[], cvs_id__[], local_name__[], category__[]; \ - static Layer *create(); - -//! Sets the name of the layer -#define SYNFIG_LAYER_SET_NAME(class,x) \ - const char class::name__[]=x - -//! Sets the local name of the layer -#define SYNFIG_LAYER_SET_LOCAL_NAME(class,x) \ - const char class::local_name__[]=x; - -//! Sets the category of the layer -#define SYNFIG_LAYER_SET_CATEGORY(class,x) \ - const char class::category__[]=x - -//! Sets the version string for the layer -#define SYNFIG_LAYER_SET_VERSION(class,x) \ - const char class::version__[]=x - -//! Sets the CVS ID string for the layer -#define SYNFIG_LAYER_SET_CVS_ID(class,x) \ - const char class::cvs_id__[]=x - -//! \writeme -#define SYNFIG_LAYER_INIT(class) \ - synfig::Layer* class::create() \ - { \ - return new class(); \ - } - -//! \writeme -#define IMPORT_PLUS(x,y) \ - if (param==#x && value.same_type_as(x)) \ - { \ - value.put(&x); \ - { \ - y; \ - } \ - return true; \ - } - -//! \writeme -#define IMPORT_AS(x,y) \ - if (param==y && value.same_type_as(x)) \ - { \ - value.put(&x); \ - return true; \ - } - -//! \writeme -#define IMPORT(x) \ - IMPORT_AS(x,#x) - -//! \writeme -#define EXPORT_AS(x,y) \ - if (param==y) \ - return ValueBase(x); - -//! \writeme -#define EXPORT(x) \ - EXPORT_AS(x,#x) - -//! \writeme -#define EXPORT_NAME() \ - if (param=="Name" || param=="name" || param=="name__") \ - return name__; \ - else if (param=="local_name__") \ - return dgettext("synfig",local_name__); - -//! \writeme -#define EXPORT_VERSION() \ - if (param=="Version" || param=="version" || param=="version__") \ - return version__; - -//! This is used as the category for layer book entries which represent aliases of layers. -//! It prevents these layers showing up in the menu. -#define CATEGORY_DO_NOT_USE "Do Not Use" - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class Canvas; -class Vector; -typedef Vector Point; -class Canvas; -class ParamDesc; -class ParamVocab; -class ValueNode; -class ValueBase; -class Time; -class Surface; -class RendDesc; -class ProgressCallback; -class Context; -class Color; -class Transform; -class Rect; -class GUID; - - -/*! \class Layer -** \todo writeme -** \see Canvas -*/ -class Layer : public Node -{ - friend class ValueNode; - friend class Context; - - /* - -- ** -- T Y P E S ----------------------------------------------------------- - */ - -public: - - //! Type that represents a pointer to a layer's constructor - typedef Layer* (*Factory)(); - - struct BookEntry - { - Factory factory; - String name; - String local_name; - String category; - String cvs_id; - String version; - BookEntry() { } - BookEntry(Factory factory, - const String &name, - const String &local_name, - const String &category, - const String &cvs_id, - const String &version): - factory(factory), - name(name), - local_name(local_name), - category(category), - cvs_id(cvs_id), - version(version) { } - }; - - typedef std::map Book; - - static void register_in_book(const BookEntry &); - - static Book& book(); - - static bool subsys_init(); - - static bool subsys_stop(); - - typedef std::map ParamList; - - typedef etl::handle Handle; - - typedef etl::loose_handle LooseHandle; - - typedef etl::handle ConstHandle; - - typedef std::map > DynamicParamList; - - //! A list type which describes all the parameters that a layer has. - /*! \see get_param_vocab() */ - typedef ParamVocab Vocab; - - /* - -- ** -- D A T A ------------------------------------------------------------- - */ - -private: - - /*! \c true if the layer is visible, \c false if it is to be skipped - ** \see set_active(), enable(), disable, active() - */ - bool active_; - - //! Handle to the canvas to which this layer belongs - etl::loose_handle canvas_; - - DynamicParamList dynamic_param_list_; - - //! A description of what this layer does - String description_; - - //! \writeme - float z_depth_; - - //! \writeme - mutable Time dirty_time_; - - //! Contains the name of the group that this layer belongs to - String group_; - - //! \writeme - sigc::connection parent_death_connect_; - - /* - -- ** -- S I G N A L S ------------------------------------------------------- - */ - -private: - - //! Status Changed - sigc::signal signal_status_changed_; - - //! Parameter changed - sigc::signal signal_param_changed_; - - //! Description Changed - sigc::signal signal_description_changed_; - - //! Moved - sigc::signal > signal_moved_; - - sigc::signal signal_added_to_group_; - - sigc::signal signal_removed_from_group_; - - /* - -- ** -- S I G N A L I N T E R F A C E ------------------------------------- - */ - -public: - - //! Status Changed - sigc::signal& signal_status_changed() { return signal_status_changed_; } - - //! Parameter changed - sigc::signal& signal_param_changed() { return signal_param_changed_; } - - //! Description Changed - sigc::signal& signal_description_changed() { return signal_description_changed_;} - - //! Moved - sigc::signal >& signal_moved() { return signal_moved_; } - - sigc::signal& signal_added_to_group() { return signal_added_to_group_; } - - sigc::signal& signal_removed_from_group() { return signal_removed_from_group_; } - - /* - -- ** -- C O N S T R U C T O R S --------------------------------------------- - */ - -protected: - - Layer(); - -public: - virtual ~Layer(); - - /* - -- ** -- M E M B E R F U N C T I O N S ------------------------------------- - */ - -public: - - virtual void on_canvas_set(); - - //! Adds this layer to the given layer group - void add_to_group(const String&); - - //! Removes this layer from the given layer group - void remove_from_group(const String&); - - //! Removes this layer from all layer groups - void remove_from_all_groups(); - - //! Gets the name of the group that this layer belongs to - String get_group()const; - - //! writeme - //DynamicParamList &dynamic_param_list() { return dynamic_param_list_; } - - //! \todo writeme - const DynamicParamList &dynamic_param_list()const { return dynamic_param_list_; } - - bool connect_dynamic_param(const String& param, etl::loose_handle); - bool disconnect_dynamic_param(const String& param); - - //! Enables the layer for rendering (Making it \em active) - void enable() { set_active(true); } - - //! Disables the layer for rendering. (Making it \em inactive) - /*! When a layer is disabled, it will be skipped when the - ** canvas is rendered. */ - void disable() { set_active(false); } - - //! Sets the 'active' flag for the Layer to the state described by \a x - /*! When a layer is disabled, it will be skipped when the - ** canvas is rendered. */ - void set_active(bool x); - - //! Returns that status of the 'active' flag - bool active()const { return active_; } - - //! Returns the position of the layer in the canvas. - /*! Returns negative on error */ - int get_depth()const; - - //! \writeme - float get_z_depth()const { return z_depth_; } - - //! \writeme - float get_z_depth(const synfig::Time& t)const; - - //! \writeme - void set_z_depth(float x) { z_depth_=x; } - - //! Sets the Canvas that this Layer is a part of - void set_canvas(etl::loose_handle canvas); - - //! Returns a handle to the Canvas to which this Layer belongs - etl::loose_handle get_canvas()const; - - //! \writeme - const String& get_description()const { return description_; } - - //! \writeme - void set_description(const String& x); - - //! Returns the layer's description if it's not empty, else its local name - const String get_non_empty_description()const { return get_description().empty() ? get_local_name() : get_description(); } - - //! Returns the localised version of the given layer parameter - const String get_param_local_name(const String ¶m_name)const; - - /* - -- ** -- V I R T U A L F U N C T I O N S ----------------------------------- - */ - -public: - virtual Rect get_bounding_rect()const; - - virtual Rect get_full_bounding_rect(Context context)const; - - //! Returns a string containing the name of the Layer - virtual String get_name()const; - - //! Returns a string containing the localized name of the Layer - virtual String get_local_name()const; - - //! Gets the parameter vocabulary - virtual Vocab get_param_vocab()const; - - //! Gets the version string for this layer - virtual String get_version()const; - - //! \writeme - virtual etl::handle get_transform()const; - - //! Sets the virtual version to use for backwards-compatibility - /*! - ** \see reset_version() */ - virtual bool set_version(const String &ver); - - //! Resets the virtual version - /*! - ** \see set_version() */ - virtual void reset_version(); - - //! Sets the parameter described by \a param to \a value. - /*! \param param The name of the parameter to set - ** \param value What the parameter is to be set to. - ** \return \c true on success, \c false upon rejection or failure. - ** If it returns \c false, then the Layer is assumed to remain unchanged. - ** \sa get_param() - ** \todo \a param should be of the type const String \¶m - */ - virtual bool set_param(const String ¶m, const ValueBase &value); - - //! Sets a list of parameters - virtual bool set_param_list(const ParamList &); - - //! Get the value of the specified parameter. - /*! \return The requested parameter value, or (upon failure) a NIL ValueBase. - ** \sa set_param() - ** \todo \a param should be of the type const String \& - */ - virtual ValueBase get_param(const String ¶m)const; - - //! Get a list of all of the parameters and their values - virtual ParamList get_param_list()const; - - //! Sets the \a time for the selected Layer and those under it - /*! \param context Context iterator referring to next Layer. - ** \param time writeme - ** \see Handle::set_time() - */ - virtual void set_time(Context context, Time time)const; - - //! Sets the \a time for the selected Layer and those under it for a specific \a point - /*! \param context Context iterator referring to next Layer. - ** \param time writeme - ** \param point writeme - ** \see Handle::set_time() - ** \todo \a point should be of the type const Point \& */ - virtual void set_time(Context context, Time time, const Point &point)const; - - //! Gets the color of the Canvas at \a pos - /*! \param context Context iterator referring to next Layer. - ** \param pos Point which indicates where the Color should come from - ** \see Handle::get_color() - */ - virtual Color get_color(Context context, const Point &pos)const; - - //! Renders the Canvas to the given Surface in an accelerated manner - /*! \param context Context iterator referring to next Layer. - ** \param surface Pointer to Surface to render to. - ** \param quality The requested quality-level to render at. - ** \param renddesc The associated RendDesc. - ** \param cb Pointer to callback object. May be NULL if there is no callback. - ** \return \c true on success, \c false on failure - ** \see Handle::accelerated_render() - */ - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - - //! Checks to see if a part of the layer is directly under \a point - /*! \param context Context iterator referring to next Layer. - ** \param point The point to check - ** \return The handle of the layer under \a point. If there is not - ** a layer under \a point, then returns an empty handle. */ - virtual Handle hit_check(Context context, const Point &point)const; - - //! Duplicates the Layer - virtual Handle clone(const GUID& deriv_guid=GUID())const; - - //! Returns true if the layer needs to be able to examine its context. - /*! context to render itself, other than for simple blending. For - ** example, the blur layer will return true - it can't do its job - ** if it can't see its context, and the circle layer will return - ** false - rendering a circle doesn't depend on the underlying - ** context until the final blend operation. */ - virtual bool reads_context()const; - - //! Duplicates the Layer without duplicating the value nodes - virtual Handle simple_clone()const; - -protected: - - //! This is called whenever a parameter is changed - virtual void on_changed(); - - //! Called to figure out the animation time information - virtual void get_times_vfunc(Node::time_set &set) const; - - /* - -- ** -- S T A T I C F U N C T I O N S -------------------------------------- - */ - -public: - - //! Creates a Layer of type \a type - /*! If the Layer type is unknown, then a Mime layer is created in its place. - ** \param type A string describing the name of the layer to construct. - ** \return Always returns a handle to a new Layer. - ** \see Mime - */ - static Layer::LooseHandle create(const String &type); - -}; // END of class Layer - -}; // END of namespace synfig - - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/layer_bitmap.cpp b/synfig-core/trunk/src/synfig/layer_bitmap.cpp deleted file mode 100644 index cda5d09..0000000 --- a/synfig-core/trunk/src/synfig/layer_bitmap.cpp +++ /dev/null @@ -1,525 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer_bitmap.cpp -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_NO_ANGLE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "layer_bitmap.h" -#include "layer.h" -#include "time.h" -#include "string.h" -#include "vector.h" - -#include "context.h" -#include "time.h" -#include "color.h" -#include "surface.h" -#include "renddesc.h" -#include "target.h" - -#include "general.h" -#include "paramdesc.h" -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -synfig::Layer_Bitmap::Layer_Bitmap(): - Layer_Composite (1.0,Color::BLEND_COMPOSITE), - tl (-0.5,0.5), - br (0.5,-0.5), - c (1), - surface (128,128), - trimmed (false), - gamma_adjust (1.0) -{ -} - -bool -synfig::Layer_Bitmap::set_param(const String & param, ValueBase value) -{ - IMPORT(tl); - IMPORT(br); - IMPORT(c); - if(param=="gamma_adjust"&& value.get_type()==ValueBase::TYPE_REAL) - { - gamma_adjust=1.0/value.get(Real()); - //gamma_adjust.set_gamma(1.0/value.get(Real())); - return true; - } - - return Layer_Composite::set_param(param,value); -} - -ValueBase -synfig::Layer_Bitmap::get_param(const String & param)const -{ - EXPORT(tl); - EXPORT(br); - EXPORT(c); - if(param=="gamma_adjust") - return 1.0/gamma_adjust; - - if(param=="_width") - { - if (trimmed) return int(width); - return surface.get_w(); - } - if(param=="_height") - { - if (trimmed) return int(height); - return surface.get_h(); - } - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -Layer_Bitmap::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("tl") - .set_local_name(_("Top-Left")) - .set_description(_("Upper left-hand Corner of image")) - ); - - ret.push_back(ParamDesc("br") - .set_local_name(_("Bottom-Right")) - .set_description(_("Lower right-hand Corner of image")) - ); - - ret.push_back(ParamDesc("c") - .set_local_name(_("Interpolation")) - .set_description(_("What type of interpolation to use")) - .set_hint("enum") - .add_enum_value(0,"nearest",_("Nearest Neighbor")) - .add_enum_value(1,"linear",_("Linear")) - .add_enum_value(2,"cosine",_("Cosine")) - .add_enum_value(3,"cubic",_("Cubic")) - ); - - ret.push_back(ParamDesc("gamma_adjust") - .set_local_name(_("Gamma Adjustment")) - ); - - return ret; -} - -synfig::Layer::Handle -Layer_Bitmap::hit_check(synfig::Context context, const synfig::Point &pos)const -{ - Point surface_pos; - surface_pos=pos-tl; - - surface_pos[0]/=br[0]-tl[0]; - if(surface_pos[0]<=1.0 && surface_pos[0]>=0.0) - { - surface_pos[1]/=br[1]-tl[1]; - if(surface_pos[1]<=1.0 && surface_pos[1]>=0.0) - { - return const_cast(this); - } - } - - return context.hit_check(pos); -} - -inline -const Color& -synfig::Layer_Bitmap::filter(Color& x)const -{ - if(gamma_adjust!=1.0) - { - x.set_r(powf((float)x.get_r(),gamma_adjust)); - x.set_g(powf((float)x.get_g(),gamma_adjust)); - x.set_b(powf((float)x.get_b(),gamma_adjust)); - } - return x; -} - -Color -synfig::Layer_Bitmap::get_color(Context context, const Point &pos)const -{ - Point surface_pos; - - if(!get_amount()) - return context.get_color(pos); - - surface_pos=pos-tl; - - surface_pos[0]/=br[0]-tl[0]; - if(surface_pos[0]<=1.0 && surface_pos[0]>=0.0) - { - surface_pos[1]/=br[1]-tl[1]; - if(surface_pos[1]<=1.0 && surface_pos[1]>=0.0) - { - if (trimmed) - { - surface_pos[0]*=width; - surface_pos[1]*=height; - - if (surface_pos[0] > left+surface.get_w() || surface_pos[0] < left || surface_pos[1] > top+surface.get_h() || surface_pos[1] < top) - return context.get_color(pos); - - surface_pos[0] -= left; - surface_pos[1] -= top; - } - else - { - surface_pos[0]*=surface.get_w(); - surface_pos[1]*=surface.get_h(); - } - - Color ret(Color::alpha()); - - switch(c) - { - case 6: // Undefined - case 5: // Undefined - case 4: // Undefined - case 3: // Cubic - ret=surface.cubic_sample(surface_pos[0],surface_pos[1]); - break; - - case 2: // Cosine - ret=surface.cosine_sample(surface_pos[0],surface_pos[1]); - break; - case 1: // Linear - ret=surface.linear_sample(surface_pos[0],surface_pos[1]); - break; - case 0: // Nearest Neighbor - default: - { - int x(min(surface.get_w()-1,max(0,round_to_int(surface_pos[0])))); - int y(min(surface.get_h()-1,max(0,round_to_int(surface_pos[1])))); - ret= surface[y][x]; - } - break; - } - - ret=filter(ret); - - if(get_amount()==1 && get_blend_method()==Color::BLEND_STRAIGHT) - return ret; - else - return Color::blend(ret,context.get_color(pos),get_amount(),get_blend_method()); - } - } - - return context.get_color(pos); -} - -bool -Layer_Bitmap::accelerated_render(Context context,Surface *out_surface,int quality, const RendDesc &renddesc, ProgressCallback *cb) const -{ - int interp=c; - if(quality>=10) - interp=0; - else if(quality>=5 && interp>1) - interp=1; - - // We can only handle NN and Linear at the moment - //if(interp>1) - // return Layer_Composite::accelerated_render(context,out_surface,quality,renddesc,cb); - - //if we don't actually have a valid surface just skip us - if(!surface.is_valid()) - { - // Render what is behind us - return context.accelerated_render(out_surface,quality,renddesc,cb); - } - - SuperCallback subcb(cb,1,10000,10001+renddesc.get_h()); - - if( get_amount()==1 && - get_blend_method()==Color::BLEND_STRAIGHT && - !trimmed && - renddesc.get_tl()==tl && - renddesc.get_br()==br) - { - // Check for the trivial case - if(surface.get_w()==renddesc.get_w() && surface.get_h()==renddesc.get_h() && gamma_adjust==1.0f) - { - if(cb && !cb->amount_complete(0,100)) return false; - *out_surface=surface; - if(cb && !cb->amount_complete(100,100)) return false; - return true; - } - out_surface->set_wh(renddesc.get_w(),renddesc.get_h()); - } - else - { - // Render what is behind us - if(!context.accelerated_render(out_surface,quality,renddesc,&subcb)) - return false; - } - - if(cb && !cb->amount_complete(10000,10001+renddesc.get_h())) return false; - - Point obr = renddesc.get_br(), - otl = renddesc.get_tl(); - - //Vector::value_type pw=renddesc.get_w()/(renddesc.get_br()[0]-renddesc.get_tl()[0]); - //Vector::value_type ph=renddesc.get_h()/(renddesc.get_br()[1]-renddesc.get_tl()[1]); - - //A = representation of input (just tl,br) //just a scaling right now - //B = representation of output (just tl,br) //just a scaling right now - //sa = scaling for input (0,1) -> (0,w/h) - //sb = scaling for output (0,1) -> (0,w/h) - - float outwf = obr[0] - otl[0]; - float outhf = obr[1] - otl[1]; - - int inw = surface.get_w(); - int inh = surface.get_h(); - - int outw = renddesc.get_w(); - int outh = renddesc.get_h(); - - float inwf, inhf; - Point itl, ibr; - - if (trimmed) - { - inwf = (br[0] - tl[0])*surface.get_w()/width; - inhf = (br[1] - tl[1])*surface.get_h()/height; - itl = Point(tl[0] + (br[0]-tl[0])*left/width, - tl[1] + (br[1]-tl[1])*top/height); - ibr = Point(tl[0] + (br[0]-tl[0])*(left+inw)/width, - tl[1] + (br[1]-tl[1])*(top+inh)/height); - } - else - { - inwf = br[0] - tl[0]; - inhf = br[1] - tl[1]; - itl = tl; - ibr = br; - } - - //need to get the input coords in output space, so we can clip - - //get the desired corners of the bitmap (in increasing order) in integers - //floating point corners - float x1f = (itl[0] - otl[0])*outw/outwf; - float x2f = (ibr[0] - otl[0])*outw/outwf; - float y1f = (itl[1] - otl[1])*outh/outhf; - float y2f = (ibr[1] - otl[1])*outh/outhf; - - if(x1f > x2f) swap(x1f,x2f); - if(y1f > y2f) swap(y1f,y2f); - - int x_start = max(0,(int)floor(x1f)); //probably floor - int x_end = min(outw,(int)ceil(x2f)); //probably ceil - int y_start = max(0,(int)floor(y1f)); //probably floor - int y_end = min(outh,(int)ceil(y2f)); //probably ceil - - //need to get the x,y,dx,dy values from output space to input, so we can do fast interpolation - - //get the starting position in input space... for interpolating - - // in int -> out float: - // Sb(B^-1)A(Sa^-1) x - float inx_start = (((x_start/*+0.5f*/)*outwf/outw + otl[0]) - itl[0])*inw/inwf; //may want to bias this (center of pixel)??? - float iny_start = (((y_start/*+0.5f*/)*outhf/outh + otl[1]) - itl[1])*inh/inhf; //may want to bias this (center of pixel)??? - - //calculate the delta values in input space for one pixel movement in output space - //same matrix but with a vector instead of a point... - float indx = outwf*(inw)/((outw)*inwf); //translations died - float indy = outhf*(inh)/((outh)*inhf); //translations died - - //perhaps use a DDA algorithm... if faster... - // will still want pixel fractions to be floating point since colors are - - //synfig::info("xstart:%d ystart:%d xend:%d yend:%d",x_start,y_start,x_end,y_end); - - //start drawing at the start of the bitmap (either origin or corner of input...) - //and get other info - Surface::alpha_pen pen(out_surface->get_pen(x_start,y_start)); - pen.set_alpha(get_amount()); - pen.set_blend_method(get_blend_method()); - - //check if we should use the downscale filtering - if(quality <= 7) - { - //the stride of the value should be inverted because we want to downsample - //when the stride is small, not big - //int multw = (int)ceil(indx); - //int multh = (int)ceil(indy); - - if(indx > 1.7 || indy > 1.7) - { - /*synfig::info("Decided to downsample? ratios - (%f,%f) -> (%d,%d)", - indx, indy, multw, multh); */ - - //use sample rect here... - - float iny, inx; - int x,y; - - //Point sample - truncate - iny = iny_start;//+0.5f; - for(y = y_start; y < y_end; ++y, pen.inc_y(), iny += indy) - { - inx = inx_start;//+0.5f; - for(x = x_start; x < x_end; x++, pen.inc_x(), inx += indx) - { - Color rc = surface.sample_rect_clip(inx,iny,inx+indx,iny+indy); - pen.put_value(filter(rc)); - } - pen.dec_x(x_end-x_start); - } - - //Color c = (*out_surface)[0][0]; - //synfig::info("ValueBase of first pixel = (%f,%f,%f,%f)",c.get_r(),c.get_g(),c.get_b(),c.get_a()); - - return true; - } - } - - //perform normal interpolation - if(interp==0) - { - //synfig::info("Decided to do nearest neighbor"); - float iny, inx; - int x,y; - - //Point sample - truncate - iny = iny_start;//+0.5f; - for(y = y_start; y < y_end; y++, pen.inc_y(), iny += indy) - { - inx = inx_start;//+0.5f; - int yclamp = min(inh-1, max(0, round_to_int(iny))); - for(x = x_start; x < x_end; x++, pen.inc_x(), inx += indx) - { - int xclamp = min(inw-1, max(0, round_to_int(inx))); - Color c = filter(surface[yclamp][xclamp]); - pen.put_value(c); //must get rid of the clip - } - pen.dec_x(x_end-x_start); - } - } - else - if(interp==1) - { - //bilinear filtering - - //float xmf,xpf,ymf,ypf; - //int xm,xp,ym,yp; - float inx,iny; - int x,y; - - //can probably buffer for x values... - - //loop and based on inx,iny sample input image - iny = iny_start; - for(y = y_start; y < y_end; y++, pen.inc_y(), iny += indy) - { - inx = inx_start; - for(x = x_start; x < x_end; x++, pen.inc_x(), inx += indx) - { - Color col(surface.linear_sample(inx,iny)); - pen.put_value(filter(col)); - } - pen.dec_x(x_end-x_start); - - } - } - else - if(interp==2) - { - //cosine filtering - - //float xmf,xpf,ymf,ypf; - //int xm,xp,ym,yp; - float inx,iny; - int x,y; - - //can probably buffer for x values... - - //loop and based on inx,iny sample input image - iny = iny_start; - for(y = y_start; y < y_end; y++, pen.inc_y(), iny += indy) - { - inx = inx_start; - for(x = x_start; x < x_end; x++, pen.inc_x(), inx += indx) - { - Color col(surface.cosine_sample(inx,iny)); - pen.put_value(filter(col)); - } - pen.dec_x(x_end-x_start); - - } - } - else - { - //cubic filtering - - //float xmf,xpf,ymf,ypf; - //int xm,xp,ym,yp; - float inx,iny; - int x,y; - - //can probably buffer for x values... - - //loop and based on inx,iny sample input image - iny = iny_start; - for(y = y_start; y < y_end; y++, pen.inc_y(), iny += indy) - { - inx = inx_start; - for(x = x_start; x < x_end; x++, pen.inc_x(), inx += indx) - { - Color col(surface.cubic_sample(inx,iny)); - pen.put_value(filter(col)); - } - pen.dec_x(x_end-x_start); - - } - } - - return true; -} - -Rect -Layer_Bitmap::get_bounding_rect()const -{ - return Rect(tl,br); -} diff --git a/synfig-core/trunk/src/synfig/layer_bitmap.h b/synfig-core/trunk/src/synfig/layer_bitmap.h deleted file mode 100644 index b62a93e..0000000 --- a/synfig-core/trunk/src/synfig/layer_bitmap.h +++ /dev/null @@ -1,80 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer_bitmap.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_LAYER_BITMAP_H -#define __SYNFIG_LAYER_BITMAP_H - -/* === H E A D E R S ======================================================= */ - -#include "layer_composite.h" -#include "surface.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/*! \class Layer_Bitmap -** \todo writeme -*/ -class Layer_Bitmap : public Layer_Composite, public Layer_NoDeform -{ - const Color& filter(Color& c)const; -public: - typedef etl::handle Handle; - - Point tl; - Point br; - int c; - mutable Surface surface; - mutable bool trimmed; - mutable unsigned int width, height, top, left; - - Real gamma_adjust; - - Layer_Bitmap(); - - virtual bool set_param(const String & param, ValueBase value); - - virtual ValueBase get_param(const String & param)const; - - virtual Color get_color(Context context, const Point &pos)const; - - virtual Vocab get_param_vocab()const; - - virtual Rect get_bounding_rect()const; - - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - - virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; -}; // END of class Layer_Bitmap - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/layer_composite.cpp b/synfig-core/trunk/src/synfig/layer_composite.cpp deleted file mode 100644 index 6a25efc..0000000 --- a/synfig-core/trunk/src/synfig/layer_composite.cpp +++ /dev/null @@ -1,208 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer_composite.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "layer_composite.h" -#include "context.h" -#include "time.h" -#include "color.h" -#include "surface.h" -#include "renddesc.h" -#include "target.h" - -#include "layer_bitmap.h" - -#include "general.h" -#include "render.h" -#include "paramdesc.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -bool -Layer_Composite::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc_, ProgressCallback *cb) const -{ - RendDesc renddesc(renddesc_); - - if(!amount_) - return context.accelerated_render(surface,quality,renddesc,cb); - - CanvasBase image; - - SuperCallback stageone(cb,0,50000,100000); - SuperCallback stagetwo(cb,50000,100000,100000); - - Layer_Bitmap::Handle surfacelayer(new class Layer_Bitmap()); - - Context iter; - - for(iter=context;*iter;iter++) - image.push_back(*iter); - - image.push_front(surfacelayer.get()); - - // We want to go ahead and schedule any other - // layers... -// while(dynamic_cast(context->get())) -// while(context->get() && -// &context->get()->AcceleratedRender== -// &Layer_Composite::AcceleratedRender) -// image.push_back(*(context++)); - - image.push_back(0); // Alpha black - - // Render the backdrop - if(!context.accelerated_render(&surfacelayer->surface,quality,renddesc,&stageone)) - return false; - - if(quality<=4)surfacelayer->c=3;else - if(quality<=5)surfacelayer->c=2; - else if(quality<=6)surfacelayer->c=1; - else surfacelayer->c=0; - surfacelayer->tl=renddesc.get_tl(); - surfacelayer->br=renddesc.get_br(); - surfacelayer->set_blend_method(Color::BLEND_STRAIGHT); - - image.push_front(const_cast(this)); - - // Set up a surface target - Target::Handle target(surface_target(surface)); - - if(!target) - { - if(cb)cb->error(_("Unable to create surface target")); - return false; - } - - RendDesc desc(renddesc); - - target->set_rend_desc(&desc); - - // Render the scene - return render(Context(image.begin()),target,desc,&stagetwo); - //return render_threaded(Context(image.begin()),target,desc,&stagetwo,2); -} - -Rect -Layer_Composite::get_full_bounding_rect(Context context)const -{ - if(is_disabled() || Color::is_onto(get_blend_method())) - return context.get_full_bounding_rect(); - - return context.get_full_bounding_rect()|get_bounding_rect(); -} - -Layer::Vocab -Layer_Composite::get_param_vocab()const -{ - Layer::Vocab ret(Layer::get_param_vocab()); - - ret.push_back(ParamDesc(amount_,"amount") - .set_local_name(_("Amount")) - ); - ret.push_back(ParamDesc(blend_method_,"blend_method") - .set_local_name(_("Blend Method")) - ); - - return ret; -} - -bool -Layer_Composite::set_param(const String & param, const ValueBase &value) -{ - if(param=="amount" && value.same_type_as(amount_)) - amount_=value.get(amount_); - else - if(param=="blend_method" && value.same_type_as(int())) - { - blend_method_ = static_cast(value.get(int())); - - if (blend_method_ < 0 || blend_method_ >= Color::BLEND_END) - { - warning("illegal value (%d) for blend_method - using Composite instead", blend_method_); - blend_method_ = Color::BLEND_COMPOSITE; - return false; - } - - if (blend_method_ == Color::BLEND_STRAIGHT && !reads_context()) - { - Canvas::Handle canvas(get_canvas()); - if (canvas) - { - String version(canvas->get_version()); - - if (version == "0.1" || version == "0.2") - { - if (get_name() == "PasteCanvas") - warning("loaded a version %s canvas with a 'Straight' blended PasteCanvas (%s) - check it renders OK", - version.c_str(), get_non_empty_description().c_str()); - else - { - blend_method_ = Color::BLEND_COMPOSITE; - converted_blend_ = true; - - // if this layer has a transparent color, go back and set the color again - // now that we know we are converting the blend method as well. that will - // make the color non-transparent, and change the blend method to alpha over - if (transparent_color_) - set_param("color", get_param("color")); - } - } - } - } - } - else - return Layer::set_param(param,value); - return true; -} - -ValueBase -Layer_Composite::get_param(const String & param)const -{ - if(param=="amount") - return get_amount(); - if(param=="blend_method") - return static_cast(get_blend_method()); - return Layer::get_param(param); -} diff --git a/synfig-core/trunk/src/synfig/layer_composite.h b/synfig-core/trunk/src/synfig/layer_composite.h deleted file mode 100644 index cb9497d..0000000 --- a/synfig-core/trunk/src/synfig/layer_composite.h +++ /dev/null @@ -1,100 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer_composite.h -** \brief Composite Layer Class Implementation -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_LAYER_COMPOSITE_H -#define __SYNFIG_LAYER_COMPOSITE_H - -/* === H E A D E R S ======================================================= */ - -#include "layer.h" -#include "color.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class Layer_NoDeform {}; - - -/*! \class Layer_Composite -** \brief Base class for layers that put stuff on top of lower layers -*/ -class Layer_Composite : public Layer -{ -private: - - float amount_; - - Color::BlendMethod blend_method_; - -protected: - - Layer_Composite( - float amount=1.0, - Color::BlendMethod blend_method=Color::BLEND_COMPOSITE - ): - amount_ (amount), - blend_method_ (blend_method), - converted_blend_ (false), - transparent_color_ (false) - { } - - bool converted_blend_; - bool transparent_color_; - -public: - - float get_amount()const { return amount_; } - - Layer_Composite& set_amount(float x) { amount_=x; return *this; } - - Color::BlendMethod get_blend_method()const { return blend_method_; } - - Layer_Composite& set_blend_method(Color::BlendMethod x) { blend_method_=x; return *this; } - - virtual bool is_solid_color()const { return amount_==1.0f && blend_method_==Color::BLEND_STRAIGHT; } - - bool is_disabled()const { return amount_==0.0f; } - - virtual Vocab get_param_vocab()const; - - virtual bool set_param(const String ¶m, const ValueBase &value); - - virtual ValueBase get_param(const String ¶m)const; - - virtual Rect get_full_bounding_rect(Context context)const; - - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; -}; // END of class Layer_Composite - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/layer_duplicate.cpp b/synfig-core/trunk/src/synfig/layer_duplicate.cpp deleted file mode 100644 index d002016..0000000 --- a/synfig-core/trunk/src/synfig/layer_duplicate.cpp +++ /dev/null @@ -1,210 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer_duplicate.cpp -** \brief Implementation of the "Duplicate" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "string.h" -#include "layer_duplicate.h" -#include "time.h" -#include "context.h" -#include "paramdesc.h" -#include "renddesc.h" -#include "surface.h" -#include "value.h" -#include "valuenode.h" -#include "canvas.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace synfig; -using namespace etl; -using namespace std; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Layer_Duplicate); -SYNFIG_LAYER_SET_NAME(Layer_Duplicate,"duplicate"); -SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Duplicate,N_("Duplicate")); -SYNFIG_LAYER_SET_CATEGORY(Layer_Duplicate,N_("Other")); -SYNFIG_LAYER_SET_VERSION(Layer_Duplicate,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Layer_Duplicate,"$Id$"); - -/* === M E M B E R S ======================================================= */ - -Layer_Duplicate::Layer_Duplicate(): - Layer_Composite(1.0,Color::BLEND_COMPOSITE) -{ - LinkableValueNode* index_value_node = ValueNode_Duplicate::create(Real(3)); - connect_dynamic_param("index", index_value_node); -} - -Layer::Handle -Layer_Duplicate::clone(const GUID& deriv_guid)const -{ - Layer::Handle ret = (Layer::Handle)Layer_Composite::clone(deriv_guid); - - const DynamicParamList &dpl = dynamic_param_list(); - DynamicParamList::const_iterator iter = dpl.find("index"); - - // if we have a dynamic "index" parameter, make a new one in the clone - // it's not good to have two references to the same index valuenode, - // or nested duplications cause an infinite loop - if (iter != dpl.end()) - ret->connect_dynamic_param(iter->first,iter->second->clone(deriv_guid)); - - return ret; -} - -bool -Layer_Duplicate::set_param(const String ¶m, const ValueBase &value) -{ - IMPORT(index); - return Layer_Composite::set_param(param,value); -} - -ValueBase -Layer_Duplicate::get_param(const String ¶m)const -{ - EXPORT(index); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -void -Layer_Duplicate::set_time(Context context, Time time)const -{ - context.set_time(time); - time_cur=time; -} - -void -Layer_Duplicate::set_time(Context context, Time time, const Point &pos)const -{ - context.set_time(time,pos); - time_cur=time; -} - -Color -Layer_Duplicate::get_color(Context context, const Point &pos)const -{ - handle duplicate_param = get_duplicate_param(); - if (!duplicate_param) return context.get_color(pos); - - Color::BlendMethod blend_method(get_blend_method()); - float amount(get_amount()); - Color color; - - Mutex::Lock lock(mutex); - duplicate_param->reset_index(time_cur); - do - { - context.set_time(time_cur+1); - context.set_time(time_cur); - color = Color::blend(context.get_color(pos),color,amount,blend_method); - } while (duplicate_param->step(time_cur)); - - return color; -} - -Layer::Vocab -Layer_Duplicate::get_param_vocab()const -{ - Layer::Vocab ret; - ret=Layer_Composite::get_param_vocab(); - - ret.push_back(ParamDesc("index") - .set_local_name(_("Index")) - .set_description(_("Copy Index")) - ); - - return ret; -} - -ValueNode_Duplicate::Handle -Layer_Duplicate::get_duplicate_param()const -{ - const DynamicParamList &dpl = dynamic_param_list(); - DynamicParamList::const_iterator iter = dpl.find("index"); - if (iter == dpl.end()) return NULL; - etl::rhandle param(iter->second); - return ValueNode_Duplicate::Handle::cast_dynamic(param); -} - -bool -Layer_Duplicate::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - if(quality == 10) - return context.accelerated_render(surface,quality,renddesc,cb); - - if(context->empty()) - { - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - surface->clear(); - return true; - } - - SuperCallback subimagecb; - Surface tmp; - int i = 0; - - handle duplicate_param = get_duplicate_param(); - if (!duplicate_param) return context.accelerated_render(surface,quality,renddesc,cb); - - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - surface->clear(); - - Color::BlendMethod blend_method(get_blend_method()); - int steps = duplicate_param->count_steps(time_cur); - - Mutex::Lock lock(mutex); - duplicate_param->reset_index(time_cur); - do - { - subimagecb=SuperCallback(cb,i*(5000/steps),(i+1)*(5000/steps),5000); - // \todo can we force a re-evaluation of all the variables without changing the time twice? - context.set_time(time_cur+1); - context.set_time(time_cur); - if(!context.accelerated_render(&tmp,quality,renddesc,&subimagecb)) return false; - - Surface::alpha_pen apen(surface->begin()); - apen.set_alpha(get_amount()); - // \todo have a checkbox allowing use of 'behind' to reverse the order? - apen.set_blend_method(i ? blend_method : Color::BLEND_COMPOSITE); - tmp.blit_to(apen); - i++; - } while (duplicate_param->step(time_cur)); - - return true; -} diff --git a/synfig-core/trunk/src/synfig/layer_duplicate.h b/synfig-core/trunk/src/synfig/layer_duplicate.h deleted file mode 100644 index 7c588e5..0000000 --- a/synfig-core/trunk/src/synfig/layer_duplicate.h +++ /dev/null @@ -1,69 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer_duplicate.h -** \brief Header file for implementation of the "Duplicate" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_LAYER_DUPLICATE_H__ -#define __SYNFIG_LAYER_DUPLICATE_H__ - -/* === H E A D E R S ======================================================= */ - -#include "valuenode_duplicate.h" -#include "layer_composite.h" -#include "time.h" - -/* === S T R U C T S & C L A S S E S ======================================= */ - -namespace synfig { - -class Layer_Duplicate : public synfig::Layer_Composite -{ - SYNFIG_LAYER_MODULE_EXT - -private: - mutable Real index; - mutable Time time_cur; - mutable synfig::Mutex mutex; - -public: - - Layer_Duplicate(); - - //! Duplicates the Layer - virtual Layer::Handle clone(const GUID& deriv_guid=GUID())const; - virtual bool set_param(const String & param, const synfig::ValueBase &value); - virtual ValueBase get_param(const String & param)const; - virtual Color get_color(Context context, const Point &pos)const; - virtual void set_time(Context context, Time time)const; - virtual void set_time(Context context, Time time, const Point &point)const; - virtual ValueNode_Duplicate::Handle get_duplicate_param()const; - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - virtual Vocab get_param_vocab()const; - virtual bool reads_context()const { return true; } -}; // END of class Layer_Duplicate - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/layer_mime.cpp b/synfig-core/trunk/src/synfig/layer_mime.cpp deleted file mode 100644 index 5524fc2..0000000 --- a/synfig-core/trunk/src/synfig/layer_mime.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer_mime.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "layer_mime.h" - -#include "layer.h" -#include "time.h" -#include "string.h" -#include "vector.h" - -#include "context.h" -#include "time.h" -#include "color.h" -#include "surface.h" -#include "renddesc.h" -#include "target.h" - -#include "general.h" -#include "paramdesc.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -Layer_Mime::Layer_Mime(String x):name(x) -{ - // Throw a bogus default version onto the parameter list. - param_list["Version"]="9"; -} - -String -Layer_Mime::get_version()const -{ - return get_param("Version").get(String()); -} - -bool -Layer_Mime::set_version(const String &ver) -{ - return set_param("Version",ver); -} - -String -Layer_Mime::get_local_name()const -{ - return _("[MIME]")+get_name(); -} - -bool -Layer_Mime::set_param(const String ¶m, const ValueBase &value) -{ - // Don't try to set the name - if(param=="name" || param=="Name" || param=="name__") - return false; - - // Otherwise, remember this parameter's value - param_list[param]=value; - return true; -} - -ValueBase -Layer_Mime::get_param(const String ¶m)const -{ - // If they are requesting the name of - // the layer, just return it - if(param=="name" || param=="Name" || param=="name__") - return ValueBase(name); - - // Otherwise, return the stored parameter value - map::const_iterator iter=param_list.find(param); - if(iter!=param_list.end()) - return iter->second; - return ValueBase(); -} - -Color -Layer_Mime::get_color(Context context, const Point &pos)const -{ - // A Layer_Mime layer should do nothing at all. - return context.get_color(pos); -} - -bool -Layer_Mime::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - // A Layer_Mime layer should do nothing at all. - return context.accelerated_render(surface,quality,renddesc,cb); -} - -Layer::Vocab -Layer_Mime::get_param_vocab()const -{ - Layer::Vocab ret; - map::const_iterator iter; - - // Construct the vocabulary from the stored - // parameters - for(iter=param_list.begin();iter!=param_list.end();iter++) - { - // Make sure that we don't add the version - // into the vocabulary - if(iter->first!="Version") - ret.push_back(ParamDesc(iter->first)); - } - - // ... and return it - return ret; -} diff --git a/synfig-core/trunk/src/synfig/layer_mime.h b/synfig-core/trunk/src/synfig/layer_mime.h deleted file mode 100644 index 9befa47..0000000 --- a/synfig-core/trunk/src/synfig/layer_mime.h +++ /dev/null @@ -1,75 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer_mime.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_LAYER_MIME_H -#define __SYNFIG_LAYER_MIME_H - -/* === H E A D E R S ======================================================= */ - -#include "layer.h" -#include "string.h" -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/*! \class Layer_Mime -** The mime layer is a layer that is used when an unknown -** layer type is requested. This allows people without -** all of the correct layers installed to still work with -** that composition. -*/ -class Layer_Mime : public Layer -{ - std::map param_list; - String name; -public: - Layer_Mime(String name); - - virtual String get_version()const; - - virtual bool set_version(const String &ver); - - virtual bool set_param(const String ¶m, const ValueBase &value); - - virtual ValueBase get_param(const String ¶m)const; - - virtual Color get_color(Context context, const Point &pos)const; - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - - virtual Vocab get_param_vocab()const; - virtual String get_local_name()const; - -}; - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/layer_motionblur.cpp b/synfig-core/trunk/src/synfig/layer_motionblur.cpp deleted file mode 100644 index 59f90f7..0000000 --- a/synfig-core/trunk/src/synfig/layer_motionblur.cpp +++ /dev/null @@ -1,202 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer_motionblur.cpp -** \brief Implementation of the "Motion Blur" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "string.h" -#include "layer_motionblur.h" -#include "time.h" -#include "context.h" -#include "paramdesc.h" -#include "renddesc.h" -#include "surface.h" -#include "value.h" -#include "valuenode.h" -#include "canvas.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace synfig; -using namespace etl; -using namespace std; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Layer_MotionBlur); -SYNFIG_LAYER_SET_NAME(Layer_MotionBlur,"MotionBlur"); // todo: use motion_blur -SYNFIG_LAYER_SET_LOCAL_NAME(Layer_MotionBlur,N_("Motion Blur")); -SYNFIG_LAYER_SET_CATEGORY(Layer_MotionBlur,N_("Blurs")); -SYNFIG_LAYER_SET_VERSION(Layer_MotionBlur,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Layer_MotionBlur,"$Id$"); - -/* === M E M B E R S ======================================================= */ - -Layer_MotionBlur::Layer_MotionBlur(): - Layer_Composite (1.0,Color::BLEND_STRAIGHT), - aperture (0) -{ -} - -bool -Layer_MotionBlur::set_param(const String ¶m, const ValueBase &value) -{ - - IMPORT(aperture); - return Layer_Composite::set_param(param,value); -} - -ValueBase -Layer_MotionBlur::get_param(const String ¶m)const -{ - EXPORT(aperture); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -void -Layer_MotionBlur::set_time(Context context, Time time)const -{ - context.set_time(time); - time_cur=time; -} - -void -Layer_MotionBlur::set_time(Context context, Time time, const Point &pos)const -{ - context.set_time(time,pos); - time_cur=time; -} - -Color -Layer_MotionBlur::get_color(Context context, const Point &pos)const -{ -/* if(aperture) - { - Time time(time_cur); - time+=(Vector::value_type)( (signed)(RAND_MAX/2)-(signed)rand() )/(Vector::value_type)(RAND_MAX) *aperture -aperture*0.5; - context.set_time(time, pos); - } -*/ - return context.get_color(pos); -} - -Layer::Vocab -Layer_MotionBlur::get_param_vocab()const -{ - Layer::Vocab ret; - //ret=Layer_Composite::get_param_vocab(); - - ret.push_back(ParamDesc("aperture") - .set_local_name(_("Aperture")) - .set_description(_("Shutter Time")) - ); - - return ret; -} - -bool -Layer_MotionBlur::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - if(aperture && quality<=10) - { - //int x, y; - SuperCallback subimagecb; - int samples=1; - switch(quality) - { - case 1: // Production Quality - samples=32; - break; - case 2: // Excellent Quality - samples=24; - break; - case 3: // Good Quality - samples=16; - break; - case 4: // Moderate Quality - samples=12; - break; - case 5: // Draft Quality - samples=7; - break; - case 6: - samples=6; - break; - case 7: - samples=5; - break; - case 8: - samples=3; - break; - case 9: - samples=2; - break; - case 10: // Rough Quality - default: - samples=1; - break; - - } - - if (samples == 1) return context.accelerated_render(surface,quality,renddesc,cb); - - Surface tmp; - int i; - float scale, divisor = 0; - - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - surface->clear(); - - for(i=0;i -#endif - -#include "layer_pastecanvas.h" -#include "string.h" -#include "time.h" -#include "context.h" -#include "paramdesc.h" -#include "renddesc.h" -#include "surface.h" -#include "value.h" -#include "valuenode.h" -#include "canvas.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace etl; -using namespace std; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -#define MAX_DEPTH 10 - -// if this isn't defined, the 'dead heads' in examples/pirates.sifz don't render properly -#define SYNFIG_CLIP_PASTECANVAS - -//#ifdef __APPLE__ -//#undef SYNFIG_CLIP_PASTECANVAS -//#endif - -/* === C L A S S E S ======================================================= */ - -class depth_counter // Makes our recursive depth counter exception-safe -{ - int *depth; -public: - depth_counter(int &x):depth(&x) { (*depth)++; } - ~depth_counter() { (*depth)--; } -}; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Layer_PasteCanvas); -SYNFIG_LAYER_SET_NAME(Layer_PasteCanvas,"PasteCanvas"); // todo: use paste_canvas -SYNFIG_LAYER_SET_LOCAL_NAME(Layer_PasteCanvas,N_("Paste Canvas")); -SYNFIG_LAYER_SET_CATEGORY(Layer_PasteCanvas,N_("Other")); -SYNFIG_LAYER_SET_VERSION(Layer_PasteCanvas,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Layer_PasteCanvas,"$Id$"); - -/* === M E T H O D S ======================================================= */ - -Layer_PasteCanvas::Layer_PasteCanvas(): - origin(0,0), - focus(0,0), - depth(0), - zoom(0), - time_offset(0), - extra_reference(false) -{ - children_lock=false; - muck_with_time_=true; - curr_time=Time::begin(); -} - -Layer_PasteCanvas::~Layer_PasteCanvas() -{ -/* if(canvas) - canvas->parent_set.erase(this); -*/ - - //if(canvas)DEBUGINFO(strprintf("%d",canvas->count())); - - set_sub_canvas(0); - - //if(canvas && (canvas->is_inline() || !get_canvas() || get_canvas()->get_root()!=canvas->get_root())) - //if(extra_reference) - // canvas->unref(); -} - -String -Layer_PasteCanvas::get_local_name()const -{ - if(!canvas) return _("Pasted Canvas"); - if(canvas->is_inline()) return _("Inline Canvas"); - if(canvas->get_root()==get_canvas()->get_root()) return '[' + canvas->get_id() + ']'; - - return '[' + canvas->get_file_name() + ']'; -} - -Layer::Vocab -Layer_PasteCanvas::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("origin") - .set_local_name(_("Origin")) - .set_description(_("Point where you want the origin to be")) - ); - ret.push_back(ParamDesc("canvas") - .set_local_name(_("Canvas")) - .set_description(_("Canvas to paste")) - ); - ret.push_back(ParamDesc("zoom") - .set_local_name(_("Zoom")) - .set_description(_("Size of canvas")) - ); - - ret.push_back(ParamDesc("time_offset") - .set_local_name(_("Time Offset")) - ); - - ret.push_back(ParamDesc("children_lock") - .set_local_name(_("Children Lock")) - ); - - ret.push_back(ParamDesc("focus") - .set_local_name(_("Focus Point")) - .set_origin("origin") - .set_connect("origin") - .set_description(_("Point to remain fixed when zooming")) - // .set_invisible_duck() - ); - - // optimize_layers() in canvas.cpp makes a new PasteCanvas layer - // and copies over the parameters of the old layer. the - // 'curr_time' member wasn't being copied, so I've added it as a - // hidden, non critical parameter, and now it will be. this - // allows a single exported subcanvas to be used more than once at - // a time, with different time offets in each. see bug #1896557. - ret.push_back(ParamDesc("curr_time") - .set_local_name(_("Current Time")) - .not_critical() - .hidden() - ); - - return ret; -} - -bool -Layer_PasteCanvas::set_param(const String & param, const ValueBase &value) -{ - IMPORT(origin); - IMPORT(focus); - - // IMPORT(canvas); - if(param=="canvas" && value.same_type_as(Canvas::Handle())) - { - set_sub_canvas(value.get(Canvas::Handle())); - return true; - } - - //! \todo this introduces bug 1844764 if enabled; it was introduced in r954. - // http://synfig.org/images/3/3d/Moving-waypoints.sifz is an - // example of an animation that has its waypoints displayed - // incorrectly without this fix; select the outer layer and drag - // the time slider. The linear waypoints don't take effect until - // 5s, but the time slider appears to pass the first one at 3s. -#if 0 - if (param=="time_offset" && value.same_type_as(time_offset)) - { - if (time_offset != value.get(Time())) - { - value.put(&time_offset); - // notify that the time_offset has changed so we can update the - // waypoint positions in parent layers - changed(); - } - return true; - } -#else - IMPORT(time_offset); -#endif - - IMPORT(children_lock); - IMPORT(zoom); - IMPORT(curr_time); - - return Layer_Composite::set_param(param,value); -} - -void -Layer_PasteCanvas::set_sub_canvas(etl::handle x) -{ - if(canvas && muck_with_time_) - remove_child(canvas.get()); - - // if(canvas && (canvas->is_inline() || !get_canvas() || get_canvas()->get_root()!=canvas->get_root())) - if (extra_reference) - canvas->unref(); - - child_changed_connection.disconnect(); - - if (canvas != x) signal_subcanvas_changed()(); - - canvas=x; - - /*if(canvas) - child_changed_connection=canvas->signal_changed().connect( - sigc::mem_fun( - *this, - &Layer_PasteCanvas::changed - ) - ); - */ - if(canvas) - bounds = ((canvas->get_context().get_full_bounding_rect() - focus) * exp(zoom) + origin + focus); - - if(canvas && muck_with_time_) - add_child(canvas.get()); - - if(canvas && (canvas->is_inline() || !get_canvas() || get_canvas()->get_root()!=canvas->get_root())) - { - canvas->ref(); - extra_reference = true; - } - else - extra_reference = false; - - if(canvas) - on_canvas_set(); -} - -// when a pastecanvas that contains another pastecanvas is copy/pasted -// from one document to another, only the outermost pastecanvas was -// getting its renddesc set to match that of its new parent. this -// function is used to recurse through the pastecanvas copying its -// renddesc to any pastecanvases it contains (bug #2116947, svn r2200) -void -Layer_PasteCanvas::update_renddesc() -{ - if(!get_canvas() || !canvas || !canvas->is_inline()) return; - - canvas->rend_desc()=get_canvas()->rend_desc(); - for (Context context = canvas->get_context(); !context->empty(); context++) - { - etl::handle paste = etl::handle::cast_dynamic(*context); - if (paste) paste->update_renddesc(); - } -} - -// This is called whenever the parent canvas gets set/changed -void -Layer_PasteCanvas::on_canvas_set() -{ - //synfig::info("before count()=%d",count()); - if(get_canvas() && canvas && canvas->is_inline() && canvas->parent()!=get_canvas()) - { - //synfig::info("during count()=%d",count()); - canvas->set_inline(get_canvas()); - } - //synfig::info("after count()=%d",count()); -} - -ValueBase -Layer_PasteCanvas::get_param(const String& param)const -{ - EXPORT(origin); - EXPORT(focus); - EXPORT(canvas); - EXPORT(zoom); - EXPORT(time_offset); - EXPORT(children_lock); - EXPORT(curr_time); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -void -Layer_PasteCanvas::set_time(Context context, Time time)const -{ - if(depth==MAX_DEPTH)return;depth_counter counter(depth); - curr_time=time; - - context.set_time(time); - if(canvas) - { - canvas->set_time(time+time_offset); - - bounds=(canvas->get_context().get_full_bounding_rect()-focus)*exp(zoom)+origin+focus; - } - else - bounds=Rect::zero(); -} - -synfig::Layer::Handle -Layer_PasteCanvas::hit_check(synfig::Context context, const synfig::Point &pos)const -{ - if(depth==MAX_DEPTH)return 0;depth_counter counter(depth); - - if (canvas) { - Point target_pos=(pos-focus-origin)/exp(zoom)+focus; - - if(canvas && get_amount() && canvas->get_context().get_color(target_pos).get_a()>=0.25) - { - if(!children_lock) - { - return canvas->get_context().hit_check(target_pos); - } - return const_cast(this); - } - } - return context.hit_check(pos); -} - -Color -Layer_PasteCanvas::get_color(Context context, const Point &pos)const -{ - if(!canvas || !get_amount()) - return context.get_color(pos); - - if(depth==MAX_DEPTH)return Color::alpha();depth_counter counter(depth); - - Point target_pos=(pos-focus-origin)/exp(zoom)+focus; - - return Color::blend(canvas->get_context().get_color(target_pos),context.get_color(pos),get_amount(),get_blend_method()); -} - - -bool -Layer_PasteCanvas::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - if(cb && !cb->amount_complete(0,10000)) return false; - - if(depth==MAX_DEPTH) - // if we are at the extent of our depth, - // then we should just return whatever is under us. - return context.accelerated_render(surface,quality,renddesc,cb); - - depth_counter counter(depth); - - if(!canvas || !get_amount()) - return context.accelerated_render(surface,quality,renddesc,cb); - - SuperCallback stageone(cb,0,4500,10000); - SuperCallback stagetwo(cb,4500,9000,10000); - SuperCallback stagethree(cb,9000,9999,10000); - - RendDesc desc(renddesc); - Vector::value_type zoomfactor=1.0/exp(zoom); - desc.clear_flags(); - desc.set_tl((desc.get_tl()-focus-origin)*zoomfactor+focus); - desc.set_br((desc.get_br()-focus-origin)*zoomfactor+focus); - desc.set_flags(RendDesc::PX_ASPECT); - - if (is_solid_color() || context->empty()) - { - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - surface->clear(); - } - else if (!context.accelerated_render(surface,quality,renddesc,&stageone)) - return false; - - if(muck_with_time_ && curr_time!=Time::begin() && canvas->get_time()!=curr_time+time_offset) - canvas->set_time(curr_time+time_offset); - - Color::BlendMethod blend_method(get_blend_method()); - const Rect full_bounding_rect(canvas->get_context().get_full_bounding_rect()); - - bool blend_using_straight = false; // use 'straight' just for the central blit - - // sometimes the user changes the parameters while we're - // rendering, causing our pasted canvas' bounding box to shrink - // and no longer overlap with our tile. if that has happened, - // let's just stop now - we'll be refreshing soon anyway - //! \todo shouldn't a mutex ensure this isn't needed? - // http://synfig.org/images/d/d2/Bbox-change.sifz is an example - // that shows this happening - open the encapsulation, select the - // 'shade', and toggle the 'invert' parameter quickly. - // Occasionally you'll see: - // error: Context::accelerated_render(): Layer "shade" threw a bad_alloc exception! - // where the shade layer tries to allocate itself a canvas of - // negative proportions, due to changing bounding boxes. - if (!etl::intersect(desc.get_rect(), full_bounding_rect)) - { - warning("%s:%d bounding box shrank while rendering?", __FILE__, __LINE__); - return true; - } - - // we have rendered what's under us, if necessary - if(context->empty()) - { - // if there's nothing under us, and we're blending 'onto', then we've finished - if (Color::is_onto(blend_method)) return true; - - // there's nothing under us, so using straight blending is - // faster than and equivalent to using composite, but we don't - // want to blank the surrounding areas - if (blend_method==Color::BLEND_COMPOSITE) blend_using_straight = true; - } - - if (!etl::intersect(context.get_full_bounding_rect(),(full_bounding_rect-focus)*exp(zoom)+origin+focus)) - { - // if there's no intersection between the context and our - // surface, and we're rendering 'onto', then we're done - if (Color::is_onto(blend_method) && !Color::is_straight(blend_method)) - return true; - - /* 'straight' is faster than 'composite' and has the same - * effect if the affected area of the lower layer is - * transparent; however, if we're not clipping the blit to - * just the bounding rectangle, the affected area is the whole - * tile, so we can't use this optimisation. if we are - * clipping, then we can use 'straight' to blit the clipped - * rectangle, but we shouldn't set blend_method to 'straight', - * or the surrounding areas will be blanked, which we don't - * want. - */ -#ifdef SYNFIG_CLIP_PASTECANVAS - if (blend_method==Color::BLEND_COMPOSITE) blend_using_straight = true; -#endif // SYNFIG_CLIP_PASTECANVAS - } - -#ifdef SYNFIG_CLIP_PASTECANVAS - Rect area(desc.get_rect() & full_bounding_rect); - - Point min(area.get_min()); - Point max(area.get_max()); - - if (desc.get_tl()[0] > desc.get_br()[0]) swap(min[0], max[0]); - if (desc.get_tl()[1] > desc.get_br()[1]) swap(min[1], max[1]); - - const int x(floor_to_int((min[0] - desc.get_tl()[0]) / desc.get_pw())); - const int y(floor_to_int((min[1] - desc.get_tl()[1]) / desc.get_ph())); - const int w( ceil_to_int((max[0] - desc.get_tl()[0]) / desc.get_pw()) - x); - const int h( ceil_to_int((max[1] - desc.get_tl()[1]) / desc.get_ph()) - y); - - const int tw = desc.get_w(); - const int th = desc.get_h(); - - desc.set_subwindow(x,y,w,h); - - // \todo this used to also have "area.area()<=0.000001 || " - is it useful? - // it was causing bug #1809480 (Zoom in beyond 8.75 in nested canvases fails) - if(desc.get_w()==0 || desc.get_h()==0) - { - if(cb && !cb->amount_complete(10000,10000)) return false; - return true; - } - - // SYNFIG_CLIP_PASTECANVAS is defined, so we are only touching the - // pixels within the affected rectangle. If the blend method is - // 'straight', then we need to blend transparent pixels with the - // clipped areas of this tile, because with the 'straight' blend - // method, even transparent pixels have an effect on the layers below - if (Color::is_straight(blend_method)) - { - Surface clearsurface; - - Surface::alpha_pen apen(surface->begin()); - apen.set_alpha(get_amount()); - - // the area we're about to blit is transparent, so it doesn't - // matter whether we use 'straight' or 'straight onto' here - if (blend_method == Color::BLEND_ALPHA_BRIGHTEN) - apen.set_blend_method(blend_method); - else - apen.set_blend_method(Color::BLEND_STRAIGHT); - - /* This represents the area we're pasting into the tile, - * within the tile as a whole. Areas (A), (B), (C) and (D) - * need blending with the underlying context if they're not - * zero-sized: - * - * 0 x x+w tw - * 0 +------------------------+ - * | | - * | (A) | - * | | - * y | - - +----------+ - - - | - * | | | | - * | (C) | w by h | (D) | - * | | | | - * y+h | - - +----------+ - - - | - * | | - * | (B) | - * | | - * tw +------------------------+ - */ - - if (y > 0) // draw the full-width strip above the rectangle (A) - { apen.move_to(0,0); clearsurface.set_wh(tw,y); clearsurface.clear(); clearsurface.blit_to(apen); } - if (y+h < th) // draw the full-width strip below the rectangle (B) - { apen.move_to(0,y+h); clearsurface.set_wh(tw,th-(y+h)); clearsurface.clear(); clearsurface.blit_to(apen); } - if (x > 0) // draw the box directly left of the rectangle (C) - { apen.move_to(0,y); clearsurface.set_wh(x,h); clearsurface.clear(); clearsurface.blit_to(apen); } - if (x+w < tw) // draw the box directly right of the rectangle (D) - { apen.move_to(x+w,y); clearsurface.set_wh(tw-(x+w),h); clearsurface.clear(); clearsurface.blit_to(apen); } - } -#endif // SYNFIG_CLIP_PASTECANVAS - - // render the canvas to be pasted onto pastesurface - Surface pastesurface; - if(!canvas->get_context().accelerated_render(&pastesurface,quality,desc,&stagetwo)) - return false; - -#ifdef SYNFIG_CLIP_PASTECANVAS - Surface::alpha_pen apen(surface->get_pen(x,y)); -#else // SYNFIG_CLIP_PASTECANVAS - Surface::alpha_pen apen(surface->begin()); -#endif // SYNFIG_CLIP_PASTECANVAS - - apen.set_alpha(get_amount()); - apen.set_blend_method(blend_using_straight ? Color::BLEND_STRAIGHT : blend_method); - pastesurface.blit_to(apen); - - if(cb && !cb->amount_complete(10000,10000)) return false; - - return true; -} - -Rect -Layer_PasteCanvas::get_bounding_rect()const -{ - return bounds; -} - -void Layer_PasteCanvas::get_times_vfunc(Node::time_set &set) const -{ - Node::time_set tset; - if(canvas) tset = canvas->get_times(); - - Node::time_set::iterator i = tset.begin(), end = tset.end(); - - //Make sure we offset the time... - //! \todo: SOMETHING STILL HAS TO BE DONE WITH THE OTHER DIRECTION - // (recursing down the tree needs to take this into account too...) - for(; i != end; ++i) - set.insert(*i -#ifdef ADJUST_WAYPOINTS_FOR_TIME_OFFSET // see node.h - - time_offset -#endif - ); - - Layer::get_times_vfunc(set); -} diff --git a/synfig-core/trunk/src/synfig/layer_pastecanvas.h b/synfig-core/trunk/src/synfig/layer_pastecanvas.h deleted file mode 100644 index 2d4714c..0000000 --- a/synfig-core/trunk/src/synfig/layer_pastecanvas.h +++ /dev/null @@ -1,165 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer_pastecanvas.h -** \brief Header file for implementation of the "Paste Canvas" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_LAYER_PASTEIMAGE_H -#define __SYNFIG_LAYER_PASTEIMAGE_H - -/* === H E A D E R S ======================================================= */ - -#include "layer_composite.h" -#include "color.h" -#include "vector.h" -#include "real.h" -#include "time.h" -#include "canvasbase.h" -#include "canvas.h" -#include "rect.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class Layer_PasteCanvas : public Layer_Composite, public Layer_NoDeform -{ - SYNFIG_LAYER_MODULE_EXT -private: - - Vector origin; - Vector focus; - - etl::loose_handle canvas; - - //! Recursion depth counter - mutable int depth; - - Real zoom; - - Time time_offset; - - mutable Time curr_time; - - bool muck_with_time_; - - bool children_lock; - - mutable Rect bounds; - - sigc::connection child_changed_connection; - - // Nasty hack: Remember whether we called an extra ref() when - // setting the canvas, so we know whether to call an extra unref() - // when finished with the canvas. - // - // Here's the story: - // - // The root canvas is destructed first. That sets the - // Layer::canvas_ (the parent canvas) of any PasteCanvas layer it - // contains to nil, due to a call to Layer::set_canvas(0), - // triggered by the connection made when Layer::set_canvas - // originally set its canvas_ member to point to the root canvas. - // ~Canvas does begin_delete() which triggers that connection. - // - // After ~Canvas has run, the members of the root canvas are - // freed, including its children_ list. If this was the last - // reference to the child canvas that the pastecanvas uses, that - // child canvas will Layer_PasteCanvas::set_sub_canvas(0) on the - // PasteCanvas layer to set its canvas (the child, pasted canvas) - // not to refer to the soon-to-be destroys child canvas. But - // set_sub_canvas() originally looked at the value of - // Layer::canvas_ (the parent canvas, obtained via - // Layer::get_canvas()) to decide whether to do an extra ref() on - // canvas (the child canvas). We need to unref() it now if we - // did, but we've forgotten whether we did. So we use this - // 'extra_reference' member to store that decision. - bool extra_reference; - - /* - -- ** -- S I G N A L S ------------------------------------------------------- - */ - -private: - - sigc::signal signal_subcanvas_changed_; - - /* - -- ** -- S I G N A L I N T E R F A C E ------------------------------------- - */ - -public: - - sigc::signal& signal_subcanvas_changed() { return signal_subcanvas_changed_; } - -public: - - void update_renddesc(); - - virtual void on_canvas_set(); - - void set_muck_with_time(bool x=false) { muck_with_time_=x; } - - etl::handle get_sub_canvas()const { return canvas; } - void set_sub_canvas(etl::handle x); - - Real get_zoom()const { return zoom; } - - Time get_time_offset()const { return time_offset; } - - Point get_origin()const { return origin; } - - Layer_PasteCanvas(); - virtual ~Layer_PasteCanvas(); - - virtual String get_local_name()const; - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - - virtual ValueBase get_param(const String & param)const; - - virtual Color get_color(Context context, const Point &pos)const; - - virtual void set_time(Context context, Time time)const; - - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - - virtual Vocab get_param_vocab()const; - - virtual synfig::Rect get_bounding_rect()const; - - virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - -protected: - virtual void get_times_vfunc(Node::time_set &set) const; - -}; // END of class Layer_PasteCanvas - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/layer_polygon.cpp b/synfig-core/trunk/src/synfig/layer_polygon.cpp deleted file mode 100644 index 46efffd..0000000 --- a/synfig-core/trunk/src/synfig/layer_polygon.cpp +++ /dev/null @@ -1,177 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer_polygon.cpp -** \brief Implementation of the "Polygon" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "layer_polygon.h" -#include "string.h" -#include "time.h" -#include "context.h" -#include "paramdesc.h" -#include "renddesc.h" -#include "surface.h" -#include "value.h" -#include "valuenode.h" -//#include "ETL/bezier" -#include - -#include -using std::deque; - -#endif - -/* === U S I N G =========================================================== */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Layer_Polygon); -SYNFIG_LAYER_SET_NAME(Layer_Polygon,"polygon"); -SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Polygon,N_("Polygon")); -SYNFIG_LAYER_SET_CATEGORY(Layer_Polygon,N_("Geometry")); -SYNFIG_LAYER_SET_VERSION(Layer_Polygon,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Layer_Polygon,"$Id$"); - -/* === C L A S S E S ======================================================= */ - -/* === M E T H O D S ======================================================= */ - -Layer_Polygon::Layer_Polygon(): - Layer_Shape (1.0,Color::BLEND_COMPOSITE), - vector_list (0) -{ - vector_list.push_back(Point(0,0.5)); - vector_list.push_back(Point(-0.333333,0)); - vector_list.push_back(Point(0.333333,0)); - sync(); -} - -Layer_Polygon::~Layer_Polygon() -{ -} - -void -Layer_Polygon::sync() -{ -/* - int i,pointcount=vector_list.size(); - - if(pointcount<3) - return; - - //Layer_Shape::clear(); - //clear(); - - // Build edge table - move_to(vector_list[0][0],vector_list[0][1]); - - for(i = 1;i < pointcount; i++) - { - if(isnan(vector_list[i][0]) || isnan(vector_list[i][1])) - break; - line_to(vector_list[i][0],vector_list[i][1]); - } - close(); - //endpath(); -*/ -} - -void -Layer_Polygon::add_polygon(const std::vector &point_list) -{ - int i,pointcount=point_list.size(); - - if(pointcount<3) - return; - - //Layer_Shape::clear(); - //clear(); - - // Build edge table - move_to(point_list[0][0],point_list[0][1]); - - for(i = 1;i < pointcount; i++) - { - if(isnan(point_list[i][0]) || isnan(point_list[i][1])) - break; - line_to(point_list[i][0],point_list[i][1]); - } - close(); - //endpath(); -} - -void -Layer_Polygon::clear() -{ - Layer_Shape::clear(); - vector_list.clear(); -} - -bool -Layer_Polygon::set_param(const String & param, const ValueBase &value) -{ - if( param=="vector_list" && value.same_type_as(vector_list)) - { - vector_list=value; - Layer_Shape::clear(); - add_polygon(value); - sync(); - return true; - } - - return Layer_Shape::set_param(param,value); -} - -ValueBase -Layer_Polygon::get_param(const String ¶m)const -{ - EXPORT(vector_list); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Shape::get_param(param); -} - -Layer::Vocab -Layer_Polygon::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Shape::get_param_vocab()); - - ret.push_back(ParamDesc("vector_list") - .set_local_name(_("Vector List")) - .set_origin("origin") - ); - - return ret; -} diff --git a/synfig-core/trunk/src/synfig/layer_polygon.h b/synfig-core/trunk/src/synfig/layer_polygon.h deleted file mode 100644 index 262c91b..0000000 --- a/synfig-core/trunk/src/synfig/layer_polygon.h +++ /dev/null @@ -1,96 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer_polygon.h -** \brief Header file for implementation of the "Polygon" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_LAYER_POLYGON_H -#define __SYNFIG_LAYER_POLYGON_H - -/* === H E A D E R S ======================================================= */ - -#include "layer_shape.h" -#include "color.h" -#include "vector.h" -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/*! \class Layer_Polygon -** \brief writeme -** \todo This layer needs to support multiple polygons */ -class Layer_Polygon : public Layer_Shape -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - //exported data - std::vector< Point > vector_list; - -protected: - - Layer_Polygon(); - -public: - - ~Layer_Polygon(); - - //! Adds a polygon to the layer - /*! The edge data is automatically added to the - ** EdgeTable, so there is no need to call sync() - ** after adding a polygon using this function. - ** \param point_list A list containing the - ** points that define the polygon's parameter. - */ - void add_polygon(const std::vector &point_list); - - //! Clears out any polygon data - /*! Also clears out the EdgeTable, so there is no - ** need to call sync() after using this function. - */ - void clear(); - - //! Updates EdgeTable so it will reflect the parameter data - void sync(); - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - - virtual ValueBase get_param(const String & param)const; - - virtual Vocab get_param_vocab()const; - -private: - class PolySpan; - bool render_polyspan(Surface *surface,PolySpan &polyspan)const; -}; // END of Layer_Polygon - -}; // END of namespace synfig -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/layer_shape.cpp b/synfig-core/trunk/src/synfig/layer_shape.cpp deleted file mode 100644 index 2116d2f..0000000 --- a/synfig-core/trunk/src/synfig/layer_shape.cpp +++ /dev/null @@ -1,3108 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer_shape.cpp -** \brief Implementation of the "Shape" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "layer_shape.h" -#include "string.h" -#include "time.h" -#include "context.h" -#include "paramdesc.h" -#include "renddesc.h" -#include "surface.h" -#include "value.h" -#include "valuenode.h" -#include "float.h" -#include "blur.h" - -#include "curve_helper.h" - -#include - -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Layer_Shape); -SYNFIG_LAYER_SET_NAME(Layer_Shape,"shape"); -SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Shape,N_("Shape")); -SYNFIG_LAYER_SET_CATEGORY(Layer_Shape,N_("Internal")); -SYNFIG_LAYER_SET_VERSION(Layer_Shape,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Layer_Shape,"$Id$"); - -#define EPSILON 1e-12 - -template < class T > -inline bool IsZero(const T &n) -{ - return (n < EPSILON) && (n > -EPSILON); -} - -/* === C L A S S E S ======================================================= */ - -//Assumes 64 byte aligned structures if at all -struct Primitive -{ - int operation; - int number; - - //Point data[0]; - - enum Operations - { - NONE = -1, - MOVE_TO = 0, //(x,y)+ after first point treated as line_to - CLOSE, // NOT RUNLENGTH enabled - LINE_TO, //(x,y)+ continuous func - CONIC_TO, //(x1,y1,x,y)+ " " - CONIC_TO_SMOOTH, //(x,y)+ " " - CUBIC_TO, //(x1,y1,x2,y2,x,y)+ " " - CUBIC_TO_SMOOTH, //(x2,y2,x,y)+ " " - END - }; -}; - -//******** CURVE FUNCTIONS ***************** -const int MAX_SUBDIVISION_SIZE = 64; -const int MIN_SUBDIVISION_DRAW_LEVELS = 4; - -static void Subd_Conic_Stack(Point *arc) -{ - /* - - b0 - * 0+1 a - b1 b * 1+2*1+2 a - * 1+2 b * - b2 * - * - - 0.1.2 -> 0.1 2 3.4 - - */ - - Real a,b; - - - arc[4][0] = arc[2][0]; - b = arc[1][0]; - - a = arc[1][0] = (arc[0][0] + b)/2; - b = arc[3][0] = (arc[4][0] + b)/2; - arc[2][0] = (a + b)/2; - - - arc[4][1] = arc[2][1]; - b = arc[1][1]; - - a = arc[1][1] = (arc[0][1] + b)/2; - b = arc[3][1] = (arc[4][1] + b)/2; - arc[2][1] = (a + b)/2; - - /* //USING SIMD - - arc[4] = arc[2]; - - arc[3] = (arc[2] + arc[1])/2; - arc[1] = (arc[0] + arc[1])/2; - - arc[2] = (arc[1] + arc[3])/2; - - */ - -} - -static void Subd_Cubic_Stack(Point *arc) -{ - Real a,b,c; - - /* - - b0 - * 0+1 a - b1 b * 1+2*1+2 a - * 1+2 b * 0+3*1+3*2+3 - b2 c * 1+2*2+2 b * - * 2+3 c * - b3 * - * - - 0.1 2.3 -> 0.1 2 3 4 5.6 - - */ - - arc[6][0] = arc[3][0]; - - b = arc[1][0]; - c = arc[2][0]; - - a = arc[1][0] = (arc[0][0] + b)/2; - b = (b + c)/2; - c = arc[5][0] = (arc[6][0] + c)/2; - - a = arc[2][0] = (a + b)/2; - b = arc[4][0] = (b + c)/2; - - arc[3][0] = (a + b)/2; - - - arc[6][1] = arc[3][1]; - - b = arc[1][1]; - c = arc[2][1]; - - a = arc[1][1] = (arc[0][1] + b)/2; - b = (b + c)/2; - c = arc[5][1] = (arc[6][1] + c)/2; - - a = arc[2][1] = (a + b)/2; - b = arc[4][1] = (b + c)/2; - - arc[3][1] = (a + b)/2; - - /* //USING SIMD - temp - - arc[6] = arc[3]; - - //backwards to avoid overwriting - arc[5] = (arc[2] + arc[3])/2; - temp = (arc[1] + arc[2])/2; - arc[1] = (arc[0] + arc[1])/2; - - arc[4] = (temp + arc[5])/2; - arc[2] = (arc[1] + temp)/2; - - arc[3] = (arc[2] + arc[4])/2; - - */ -} - -//************** PARAMETRIC RENDERER SUPPORT STRUCTURES **************** - -// super segment -struct MonoSegment -{ - Rect aabb; - int ydir; - vector pointlist; - - MonoSegment(int dir = 0, Real x0 = 0, Real x1 = 0, Real y0 = 0, Real y1 = 0) - { - aabb.minx = x0; - aabb.maxx = x1; - aabb.miny = y0; - aabb.maxy = y1; - - ydir = dir; - } - - int intersect(Real x,Real y) const - { - if((y < aabb.miny+EPSILON) || (y > aabb.maxy) || (x < aabb.minx)) return 0; - if(x > aabb.maxx) return ydir; - - //int i = 0; - //int size = pointlist.size(); - //vector::const_iterator end = pointlist.end(); - vector::const_iterator p = pointlist.begin(); - - //assumes that the rect culled away anything that would be beyond the edges - if(ydir > 0) - { - while(y > (*++p)[1]) - ; - } - else - { - while(y < (*++p)[1]) - ; - } - - //for the loop to break there must have been a slope (straight line would do nothing) - //vector::const_iterator p1 = p-1; - Real dy = p[-1][1] - p[0][1]; - Real dx = p[-1][0] - p[0][0]; - - assert(dy != 0); - - Real xi = p[0][0] + (y - p[0][1]) * dx / dy; - return (x > xi)*ydir; - } -}; - -struct CurveArray -{ - Rect aabb; //not necessarily as effective - can only reject values - vector pointlist; //run length - p0, p1, p2, p3 = p10, p11, p12, p13 = p20 ... - vector degrees; - - CurveArray(Real x0 = 0, Real x1 = 0, Real y0 = 0, Real y1 = 0) - { - aabb.set(x0,y0,x1,y1); - } - - void reset(Real x0 = 0, Real x1 = 0, Real y0 = 0, Real y1 = 0) - { - aabb.set(x0,y0,x1,y1); - pointlist.clear(); - degrees.clear(); - } - - int size () const - { - return degrees.size(); - } - - void Start(Point m) - { - reset(m[0],m[0],m[1],m[1]); - pointlist.push_back(m); - } - - void AddCubic(Point p1, Point p2, Point dest) - { - aabb.expand(p1[0],p1[1]); - aabb.expand(p2[0],p2[1]); - aabb.expand(dest[0],dest[1]); - - pointlist.push_back(p1); - pointlist.push_back(p2); - pointlist.push_back(dest); - - degrees.push_back(3); - } - - void AddConic(Point p1, Point dest) - { - aabb.expand(p1[0],p1[1]); - aabb.expand(dest[0],dest[1]); - - pointlist.push_back(p1); - pointlist.push_back(dest); - - degrees.push_back(2); - } - - static int intersect_conic(Real x, Real y, Point *p, int /*level*/ = 0) - { - Real ymin,ymax,xmin,xmax; - int intersects = 0; - - //sort the overall curve ys - degenerate detection - ymin = min(p[0][1],p[2][1]); - ymax = max(p[0][1],p[2][1]); - - xmin = min(min(p[0][0],p[1][0]),p[2][0]); - xmax = max(max(p[0][0],p[1][0]),p[2][0]); - - //to the left, to the right and out of range y, or completely out of range y - if( x < xmin ) return 0; - if( x > xmax && (y > ymax || y < ymin) ) return 0; - if( (y > ymax && y > p[1][1]) || (y < ymin && y < p[1][1]) ) return 0; - - //degenerate line max - if(ymin == ymax && ymax == p[1][1]) - return 0; - - //degenerate accept - to the right and crossing the base line - if(x > xmax) - { - return (y <= ymax && y >= ymin); - } - - //solve for curve = y - - //real roots: - //0 roots - 0 intersection - //1 root - get x, and figure out x - //2 roots (non-double root) - get 2 xs, and count xs to the left - - //for conic we can assume 1 intersection for monotonic curve - Real a = p[2][1] - 2*p[1][1] + p[0][1], - b = 2*p[1][1] - 2*p[0][1], - c = p[0][1] - y; - - Real t1 = -1, t2 = -1; - - if(a == 0) - { - //linear - easier :) - if(b == 0) return 0; //may not need this check - - t1 = - c / b; //bt + c = 0 solved - }else - { - //2 degree polynomial - Real b2_4ac = b*b - 4*a*c; - - //if there are double/no roots - no intersections (in real #s that is) - if(b2_4ac <= 0) - { - return 0; - } - - b2_4ac = sqrt(b2_4ac); - - t1 = (-b - b2_4ac) / 2*a, - t2 = (-b + b2_4ac) / 2*a; - } - - //calculate number of intersections - if(t1 >= 0 && t1 <= 1) - { - const Real t = t1; - const Real invt = 1 - t; - - //find x val and it counts if it's to the left of the point - const Real xi = invt*invt*p[0][0] + 2*t*invt*p[1][0] + t*t*p[2][0]; - const Real dy_t = 2*a*t + b; - - if(dy_t) - { - intersects += (x >= xi) * ( dy_t > 0 ? 1 : -1); - } - } - - if(t2 >= 0 && t2 <= 1) - { - const Real t = t2; - const Real invt = 1 - t; - - //find x val and it counts if it's to the left of the point - const Real xi = invt*invt*p[0][0] + 2*t*invt*p[1][0] + t*t*p[2][0]; - const Real dy_t = 2*a*t + b; - - if(dy_t) - { - intersects += (x >= xi) * ( dy_t > 0 ? 1 : -1); - } - } - - return intersects; - } - - static int quadratic_eqn(Real a, Real b, Real c, Real *t0, Real *t1) - { - const Real b2_4ac = b*b - 4*a*c; - - //degenerate reject (can't take sqrt) - if(b2_4ac < 0) - { - return 0; - } - - const Real sqrtb2_4ac = sqrt(b2_4ac); - const Real signb = b < 0 ? -1 : 1; - const Real q = - 0.5 * (b + signb * sqrtb2_4ac); - - *t0 = q/a; - *t1 = c/q; - - return sqrtb2_4ac == 0 ? 1 : 2; - } - - //Newton-Raphson root polishing (we don't care about bounds, assumes very near the desired root) - static Real polish_cubicroot(Real a, Real b, Real c, Real d, Real t, Real *dpdt) - { - const Real cn[4] = {a,b,c,d}; - Real p,dp,newt,oldpmag=FLT_MAX; - - //eval cubic eqn and its derivative - for(;;) - { - p = cn[0]*t + cn[1]; - dp = cn[0]; - - for(int i = 2; i < 4; i++) - { - dp = p + dp*t; - p = cn[i] + p*t; - } - - if(dp == 0) - { - synfig::warning("polish_cubicroot: Derivative should not vanish!!!"); - return t; - } - - newt = t - p/dp; - - if(newt == t || fabs(p) >= oldpmag) - { - *dpdt = dp; - return t; - } - - t = newt; - oldpmag = fabs(p); - } - } - - static int intersect_cubic(Real x, Real y, Point *p, int /*level*/ = 0) - { - const Real INVALIDROOT = -FLT_MAX; - Real ymin,ymax,xmin,xmax; - Real ymin2,ymax2,ymintot,ymaxtot; - int intersects = 0; - - //sort the overall curve ys and xs - degenerate detection - - //open span for the two end points - ymin = min(p[0][1],p[3][1]); - ymax = max(p[0][1],p[3][1]); - - //other points etc. - ymin2 = min(p[1][1],p[2][1]); - ymax2 = max(p[1][1],p[2][1]); - - ymintot = min(ymin,ymin2); - ymaxtot = max(ymax,ymax2); - - //the entire curve control polygon is in this x range - xmin = min(min(p[0][0],p[1][0]),min(p[2][0],p[3][0])); - xmax = max(max(p[0][0],p[1][0]),max(p[2][0],p[3][0])); - - //outside all y boundaries (no intersect) - if( (y > ymaxtot) || (y < ymintot) ) return 0; - - //left of curve (no intersect) - if(x < xmin) return 0; - - //right of curve (and outside base range) - if( x > xmax ) - { - if( (y > ymax) || (y < ymin) ) return 0; - - //degenerate accept - to the right and inside the [ymin,ymax] range (already rejected if out of range) - const Real n = p[3][1] - p[0][1]; - - //extract the sign from the value (we need valid data) - return n < 0 ? -1 : 1; - } - - //degenerate horizontal line max -- doesn't happen enough to check for - if( ymintot == ymaxtot ) return 0; - - //calculate roots: - // can have 0,1,2, or 3 real roots - // if any of them are double then reject the two... - - // y-coefficients for f_y(t) - y = 0 - Real a = p[3][1] - 3*p[2][1] + 3*p[1][1] - p[0][1], - b = 3*p[2][1] - 6*p[1][1] + 3*p[0][1], - c = 3*p[1][1] - 3*p[0][1], - d = p[0][1] - y; - - Real ax = p[3][0] - 3*p[2][0] + 3*p[1][0] - p[0][0], - bx = 3*p[2][0] - 6*p[1][0] + 3*p[0][0], - cx = 3*p[1][0] - 3*p[0][0], - dx = p[0][0]; - - Real t1 = INVALIDROOT, t2 = INVALIDROOT, t3 = INVALIDROOT, t, dydt; - - if(a == 0) - { - //only 2nd degree - if(b == 0) - { - //linear - if(c == 0) return 0; - - t1 = - d / c; //equation devolved into: ct + d = 0 - solve... - }else - { - //0 roots = 0 intersections, 1 root = 2 intersections at the same place (0 effective) - if(quadratic_eqn(a,b,c,&t1,&t2) != 2) return 0; - } - }else - { - //cubic - sigh.... - - //algorithm courtesy of Numerical Recipes in C (algorithm copied from pg. 184/185) - Real an = b / a, - bn = c / a, - cn = d / a; - - //if cn is 0 (or really really close), then we can simplify this... - if(IsZero(cn)) - { - t3 = 0; - - //0 roots = 0 intersections, 1 root = 2 intersections at the same place (0 effective) - if(quadratic_eqn(a,b,c,&t1,&t2) != 2) - { - t1 = t2 = INVALIDROOT; - } - } - else - { - //otherwise run the normal cubic root equation - Real Q = (an*an - 3.0*bn) / 9.0; - Real R = ((2.0*an*an - 9.0*bn)*an + 27.0*cn)/54.0; - - if(R*R < Q*Q*Q) - { - Real theta = acos(R / sqrt(Q*Q*Q)); - - t1 = -2.0*sqrt(Q)*cos(theta/3) - an/3.0; - t2 = -2.0*sqrt(Q)*cos((theta+2*PI)/3.0) - an/3.0; - t3 = -2.0*sqrt(Q)*cos((theta-2*PI)/3.0) - an/3.0; - - //don't need to reorder,l just need to eliminate double/triple roots - //if(t3 == t2 && t1 == t2) t2 = t3 = INVALIDROOT; - if(t3 == t2) t2 = t3 = INVALIDROOT; - if(t1 == t2) t1 = t2 = INVALIDROOT; - if(t1 == t3) t1 = t3 = INVALIDROOT; - }else - { - Real signR = R < 0 ? -1 : 1; - Real A = - signR * pow(signR*R + sqrt(R*R - Q*Q*Q),1/3.0); - - Real B; - if(A == 0) B = 0; - else B = Q / A; - - //single real root in this case - t1 = (A + B) - an/3.0; - } - } - } - - //if(t1 != INVALIDROOT) - { - t = t1;//polish_cubicroot(a,b,c,d,t1,&dydt); - if(t >= 0 && t < 1) - { - //const Real invt = 1 - t; - - //find x val and it counts if it's to the left of the point - const Real xi = ((ax*t + bx)*t + cx)*t + dx; - dydt = (3*a*t + 2*b)*t + c; - - if(dydt) - { - intersects += (x >= xi) * ( dydt > 0 ? 1 : -1); - } - } - } - - //if(t2 != INVALIDROOT) - { - t = t2;//polish_cubicroot(a,b,c,d,t2,&dydt); - if(t >= 0 && t < 1) - { - //const Real invt = 1 - t; - - //find x val and it counts if it's to the left of the point - const Real xi = ((ax*t + bx)*t + cx)*t + dx; - dydt = (3*a*t + 2*b)*t + c; - - if(dydt) - { - intersects += (x >= xi) * ( dydt > 0 ? 1 : -1); - } - } - } - - //if(t3 != INVALIDROOT) - { - t = t3;//polish_cubicroot(a,b,c,d,t3,&dydt); - if(t >= 0 && t < 1) - { - //const Real invt = 1 - t; - - //find x val and it counts if it's to the left of the point - const Real xi = ((ax*t + bx)*t + cx)*t + dx; - dydt = (3*a*t + 2*b)*t + c; - - if(dydt) - { - intersects += (x >= xi) * ( dydt > 0 ? 1 : -1); - } - } - } - - return intersects; - } - - int intersect(Real x,Real y, Point *table) const - { - if((y < aabb.miny) || (y > aabb.maxy) || (x < aabb.minx)) return 0; - - int i, curdeg, intersects = 0; - const int numcurves = degrees.size(); - - vector::const_iterator p = pointlist.begin(); - - for(i=0; i < numcurves; i++) - { - curdeg = degrees[i]; - - switch(curdeg) - { - case 2: - { - table[0] = *p++; - table[1] = *p++; - table[2] = *p; //we want to include the last point for the next curve - - intersects += intersect_conic(x,y,table); - - break; - } - - case 3: - { - table[0] = *p++; - table[1] = *p++; - table[2] = *p++; - table[3] = *p; //we want to include the last point for the next curve - - intersects += intersect_cubic(x,y,table); - - break; - } - - default: - { - warning("Invalid degree (%d) inserted into the list (index: %d)\n", curdeg, i); - return 0; - } - } - } - - return intersects; - } -}; - -struct Layer_Shape::Intersector -{ - Rect aabb; - - //! true iff aabb hasn't been initialized yet - bool initaabb; - - int flags; - - enum IntersectorFlags - { - NotClosed = 0x8000 - }; - - enum PrimitiveType - { - TYPE_NONE = 0, - TYPE_LINE, - TYPE_CURVE - }; - - Real cur_x,cur_y; - Real close_x,close_y; - - vector segs; //monotonically increasing - vector curves; //big array of consecutive curves - - int prim; - Vector tangent; - - Intersector() - { - clear(); - } - - bool notclosed() - { - return (flags & NotClosed) || (cur_x != close_x) || (cur_y != close_y); - } - - void move_to(Real x, Real y) - { - close(); - - close_x = cur_x = x; - close_y = cur_y = y; - - tangent[0] = tangent[1] = 0; - - if(initaabb) - { - aabb.set_point(x,y); - initaabb = false; - }else aabb.expand(x,y); - - prim = TYPE_NONE; - } - - void line_to(Real x, Real y) - { - int dir = (y > cur_y)*1 + (-1)*(y < cur_y); - - //check for context (if not line start a new segment) - //if we're not in line mode (covers 0 set case), or if directions are different (not valid for 0 direction) - if(prim != TYPE_LINE || (dir && segs.back().ydir != dir)) - { - MonoSegment seg(dir,x,x,y,y); - - seg.aabb.expand(cur_x,cur_y); - seg.pointlist.push_back(Point(cur_x,cur_y)); - seg.pointlist.push_back(Point(x,y)); - segs.push_back(seg); - } - //add to the last segment, because it works - else - { - segs.back().pointlist.push_back(Point(x,y)); - segs.back().aabb.expand(x,y); - } - - - - cur_x = x; - cur_y = y; - aabb.expand(x,y); //expand the entire thing's bounding box - - tangent[0] = x - cur_x; - tangent[1] = x - cur_y; - - flags |= NotClosed; - prim = TYPE_LINE; - } - - void conic_to_smooth(Real x, Real y) - { - const Real x1 = tangent[0]/2.0 + cur_x; - const Real y1 = tangent[1]/2.0 + cur_y; - - conic_to(x1,y1,x,y); - } - - void conic_to(Real x1, Real y1, Real x, Real y) - { - //if we're not already a curve start one - if(prim != TYPE_CURVE) - { - CurveArray c; - - c.Start(Point(cur_x,cur_y)); - c.AddConic(Point(x1,y1),Point(x,y)); - - curves.push_back(c); - }else - { - curves.back().AddConic(Point(x1,y1),Point(x,y)); - } - - cur_x = x; - cur_y = y; - - aabb.expand(x1,y1); - aabb.expand(x,y); - - tangent[0] = 2*(x - x1); - tangent[1] = 2*(y - y1); - - flags |= NotClosed; - prim = TYPE_CURVE; - } - - void curve_to_smooth(Real x2, Real y2, Real x, Real y) - { - Real x1 = tangent[0]/3.0 + cur_x; - Real y1 = tangent[1]/3.0 + cur_y; - - curve_to(x1,y1,x2,y2,x,y); - } - - void curve_to(Real x1, Real y1, Real x2, Real y2, Real x, Real y) - { - //if we're not already a curve start one - if(prim != TYPE_CURVE) - { - CurveArray c; - - c.Start(Point(cur_x,cur_y)); - c.AddCubic(Point(x1,y1),Point(x2,y2),Point(x,y)); - - curves.push_back(c); - }else - { - curves.back().AddCubic(Point(x1,y1),Point(x2,y2),Point(x,y)); - } - - cur_x = x; - cur_y = y; - - //expand bounding box around ALL of it - aabb.expand(x1,y1); - aabb.expand(x2,y2); - aabb.expand(x,y); - - tangent[0] = 3*(x - x2); - tangent[1] = 3*(y - y2); - - flags |= NotClosed; - prim = TYPE_CURVE; - } - - void close() - { - if(flags & NotClosed) - { - if(cur_x != close_x || cur_y != close_y) - { - line_to(close_x,close_y); - } - - flags &= ~NotClosed; - } - } - - //assumes the line to count the intersections with is (-1,0) - int intersect (Real x, Real y) const - { - int inter = 0; - unsigned int i; - vector::const_iterator s = segs.begin(); - vector::const_iterator c = curves.begin(); - - Point memory[3*MAX_SUBDIVISION_SIZE + 1]; - - for(i = 0; i < segs.size(); i++,s++) - { - inter += s->intersect(x,y); - } - - for(i=0; i < curves.size(); i++,c++) - inter += c->intersect(x,y,memory); - - return inter; - } - - //intersect an arbitrary line - //int intersect (Real x, Real y, Real vx, Real vy) {return 0;} - - void clear() - { - segs.clear(); - curves.clear(); - - flags = 0; - cur_x = cur_y = close_x = close_y = 0; - prim = TYPE_NONE; - tangent[0] = tangent[1] = 0; - initaabb = true; - } -}; - -//*********** SCANLINE RENDERER SUPPORT STRUCTURES *************** -struct PenMark -{ - int y,x; - Real cover,area; - - PenMark(){} - PenMark(int xin, int yin, Real c, Real a) - :y(yin),x(xin),cover(c),area(a) {} - - void set(int xin, int yin, Real c, Real a) { y = yin; x = xin; cover = c; area = a; } - - void setcoord(int xin, int yin) { y = yin; x = xin; } - - void setcover(Real c, Real a) { cover = c; area = a; } - void addcover(Real c, Real a) { cover += c; area += a; } - - bool operator<(const PenMark &rhs) const - { - return y == rhs.y ? x < rhs.x : y < rhs.y; - } -}; - -typedef rect ContextRect; - -class Layer_Shape::PolySpan -{ -public: - typedef deque cover_array; - - Point arc[3*MAX_SUBDIVISION_SIZE + 1]; - - cover_array covers; - PenMark current; - - int open_index; - - //ending position of last primitive - Real cur_x; - Real cur_y; - - //starting position of current primitive list - Real close_x; - Real close_y; - - //flags for the current segment - int flags; - - //the window that will be drawn (used for clipping) - ContextRect window; - - //for assignment to flags value - enum PolySpanFlags - { - NotSorted = 0x8000, - NotClosed = 0x4000 - }; - - //default constructor - 0 everything - PolySpan() :current(0,0,0,0),flags(NotSorted) - { - cur_x = cur_y = close_x = close_y = 0; - open_index = 0; - } - - bool notclosed() const - { - return (flags & NotClosed) || (cur_x != close_x) || (cur_y != close_y); - } - - //0 out all the variables involved in processing - void clear() - { - covers.clear(); - cur_x = cur_y = close_x = close_y = 0; - open_index = 0; - current.set(0,0,0,0); - flags = NotSorted; - } - - //add the current cell, but only if there is information to add - void addcurrent() - { - if(current.cover || current.area) - { - covers.push_back(current); - } - } - - //move to the next cell (cover values 0 initially), keeping the current if necessary - void move_pen(int x, int y) - { - if(y != current.y || x != current.x) - { - addcurrent(); - current.set(x,y,0,0); - } - } - - //close the primitives with a line (or rendering will not work as expected) - void close() - { - if(flags & NotClosed) - { - if(cur_x != close_x || cur_y != close_y) - { - line_to(close_x,close_y); - addcurrent(); - current.setcover(0,0); - } - flags &= ~NotClosed; - } - } - - // Not recommended - destroys any separation of spans currently held - void merge_all() - { - sort(covers.begin(),covers.end()); - open_index = 0; - } - - //will sort the marks if they are not sorted - void sort_marks() - { - if(flags & NotSorted) - { - //only sort the open index - addcurrent(); - current.setcover(0,0); - - sort(covers.begin() + open_index,covers.end()); - flags &= ~NotSorted; - } - } - - //encapsulate the current sublist of marks (used for drawing) - void encapsulate_current() - { - //sort the current list then reposition the open list section - sort_marks(); - open_index = covers.size(); - } - - //move to start a new primitive list (enclose the last primitive if need be) - void move_to(Real x, Real y) - { - close(); - if(isnan(x))x=0; - if(isnan(y))y=0; - move_pen((int)floor(x),(int)floor(y)); - close_y = cur_y = y; - close_x = cur_x = x; - } - - //primitive_to functions - void line_to(Real x, Real y); - void conic_to(Real x1, Real y1, Real x, Real y); - void cubic_to(Real x1, Real y1, Real x2, Real y2, Real x, Real y); - - void draw_scanline(int y, Real x1, Real y1, Real x2, Real y2); - void draw_line(Real x1, Real y1, Real x2, Real y2); - - Real ExtractAlpha(Real area, WindingStyle winding_style) - { - if (area < 0) - area = -area; - - if (winding_style == WINDING_NON_ZERO) - { - // non-zero winding style - if (area > 1) - return 1; - } - else // if (winding_style == WINDING_EVEN_ODD) - { - // even-odd winding style - while (area > 1) - area -= 2; - - // want pyramid like thing - if (area < 0) - area = -area; - } - - return area; - } -}; - -/* === M E T H O D S ======================================================= */ - -Layer_Shape::Layer_Shape(const Real &a, const Color::BlendMethod m): - Layer_Composite (a,m), - edge_table (new Intersector), - color (Color::black()), - origin (0,0), - invert (false), - antialias (true), - blurtype (Blur::FASTGAUSSIAN), - feather (0), - winding_style (WINDING_NON_ZERO), - bytestream (0), - lastbyteop (Primitive::NONE), - lastoppos (-1) -{ -} - -Layer_Shape::~Layer_Shape() -{ - delete edge_table; -} - -void -Layer_Shape::clear() -{ - edge_table->clear(); - bytestream.clear(); -} - -bool -Layer_Shape::set_param(const String & param, const ValueBase &value) -{ - IMPORT_PLUS(color, { if (color.get_a() == 0) { if (converted_blend_) { - set_blend_method(Color::BLEND_ALPHA_OVER); - color.set_a(1); } else transparent_color_ = true; } }); - IMPORT(origin); - IMPORT(invert); - IMPORT(antialias); - IMPORT_PLUS(feather, if(feather<0)feather=0;); - IMPORT(blurtype); - IMPORT(winding_style); - - IMPORT_AS(origin,"offset"); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -Layer_Shape::get_param(const String ¶m)const -{ - EXPORT(color); - EXPORT(origin); - EXPORT(invert); - EXPORT(antialias); - EXPORT(feather); - EXPORT(blurtype); - EXPORT(winding_style); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -Layer_Shape::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("color") - .set_local_name(_("Color")) - .set_description(_("Layer_Shape Color")) - ); - ret.push_back(ParamDesc("origin") - .set_local_name(_("Origin")) - ); - ret.push_back(ParamDesc("invert") - .set_local_name(_("Invert")) - ); - ret.push_back(ParamDesc("antialias") - .set_local_name(_("Antialiasing")) - ); - ret.push_back(ParamDesc("feather") - .set_local_name(_("Feather")) - .set_is_distance() - ); - ret.push_back(ParamDesc("blurtype") - .set_local_name(_("Type of Feather")) - .set_description(_("Type of feathering to use")) - .set_hint("enum") - .add_enum_value(Blur::BOX,"box",_("Box Blur")) - .add_enum_value(Blur::FASTGAUSSIAN,"fastgaussian",_("Fast Gaussian Blur")) - .add_enum_value(Blur::CROSS,"cross",_("Cross-Hatch Blur")) - .add_enum_value(Blur::GAUSSIAN,"gaussian",_("Gaussian Blur")) - .add_enum_value(Blur::DISC,"disc",_("Disc Blur")) - ); - ret.push_back(ParamDesc("winding_style") - .set_local_name(_("Winding Style")) - .set_description(_("Winding style to use")) - .set_hint("enum") - .add_enum_value(WINDING_NON_ZERO,"nonzero",_("Non Zero")) - .add_enum_value(WINDING_EVEN_ODD,"evenodd",_("Even/Odd")) - ); - - return ret; -} - -synfig::Layer::Handle -Layer_Shape::hit_check(synfig::Context context, const synfig::Point &p)const -{ - Point pos(p-origin); - - int intercepts = edge_table->intersect(pos[0],pos[1]); - - // If we have an odd number of intercepts, we are inside. - // If we have an even number of intercepts, we are outside. - bool intersect = ((!!intercepts) ^ invert); - - if(get_amount() == 0 || get_blend_method() == Color::BLEND_ALPHA_OVER) - { - intersect = false; - } - - if(intersect) - { - synfig::Layer::Handle tmp; - if(get_blend_method()==Color::BLEND_BEHIND && (tmp=context.hit_check(p))) - return tmp; - if(Color::is_onto(get_blend_method())) - { - //if there's something in the lower layer then we're set... - if(!context.hit_check(p).empty()) - return const_cast(this); - }else if(get_blend_method() == Color::BLEND_ALPHA_OVER) - { - synfig::info("layer_shape::hit_check - we've got alphaover"); - //if there's something in the lower layer then we're set... - if(color.get_a() < 0.1 && get_amount() > .9) - { - synfig::info("layer_shape::hit_check - can see through us... so nothing"); - return Handle(); - }else return context.hit_check(p); - }else - return const_cast(this); - } - - return context.hit_check(p); -} - -Color -Layer_Shape::get_color(Context context, const Point &p)const -{ - Point pp = p; - - if(feather) - pp = Blur(feather,feather,blurtype)(p); - - Point pos(pp-origin); - - int intercepts = edge_table->intersect(pos[0],pos[1]); - - // If we have an odd number of intercepts, we are inside. - // If we have an even number of intercepts, we are outside. - bool intersect = ((!!intercepts) ^ invert); - - if(!intersect) - return Color::blend(Color::alpha(),context.get_color(pp),get_amount(),get_blend_method()); - - //Ok, we're inside... bummmm ba bum buM... - if(get_blend_method() == Color::BLEND_STRAIGHT && get_amount() == 1) - return color; - else - return Color::blend(color,context.get_color(p),get_amount(),get_blend_method()); -} - -//************** SCANLINE RENDERING ********************* -void Layer_Shape::PolySpan::line_to(Real x, Real y) -{ - Real n[4] = {0,0,0,0}; - bool afterx = false; - - const Real xin(x), yin(y); - - Real dx = x - cur_x; - Real dy = y - cur_y; - - //CLIP IT!!!! - try { - //outside y - ignore entirely - if( (cur_y >= window.maxy && y >= window.maxy) - ||(cur_y < window.miny && y < window.miny) ) - { - cur_x = x; - cur_y = y; - } - else //not degenerate - more complicated - { - if(dy > 0) //be sure it's not tooooo small - { - // cur_y ... window.miny ... window.maxy ... y - - //initial degenerate - initial clip - if(cur_y < window.miny) - { - //new clipped start point (must also move pen) - n[2] = cur_x + (window.miny - cur_y) * dx / dy; - - cur_x = n[2]; - cur_y = window.miny; - move_pen((int)floor(cur_x),window.miny); - } - - //generate data for the ending clipped info - if(y > window.maxy) - { - //initial line to intersection (and degenerate) - n[2] = x + (window.maxy - y) * dx / dy; - - //intersect coords - x = n[2]; - y = window.maxy; - } - } - else - { - //initial degenerate - initial clip - if(cur_y > window.maxy) - { - //new clipped start point (must also move pen) - n[2] = cur_x + (window.maxy - cur_y) * dx / dy; - - cur_x = n[2]; - cur_y = window.maxy; - move_pen((int)floor(cur_x),window.maxy); - } - - //generate data for the ending clipped info - if(y < window.miny) - { - //initial line to intersection (and degenerate) - n[2] = x + (window.miny - y) * dx / dy; - - //intersect coords - x = n[2]; - y = window.miny; - } - } - - //all degenerate - but require bounded clipped values - if( (cur_x >= window.maxx && x >= window.maxx) - ||(cur_x < window.minx && x < window.minx) ) - { - //clip both vertices - but only needed in the x direction - cur_x = max(cur_x, (Real)window.minx); - cur_x = min(cur_x, (Real)window.maxx); - - //clip the dest values - y is already clipped - x = max(x,(Real)window.minx); - x = min(x,(Real)window.maxx); - - //must start at new point... - move_pen((int)floor(cur_x),(int)floor(cur_y)); - - draw_line(cur_x,cur_y,x,y); - - cur_x = xin; - cur_y = yin; - } - else - { - //clip x - if(dx > 0) - { - //initial degenerate - initial clip - if(cur_x < window.minx) - { - //need to draw an initial segment from clippedx,cur_y to clippedx,intersecty - n[2] = cur_y + (window.minx - cur_x) * dy / dx; - - move_pen(window.minx,(int)floor(cur_y)); - draw_line(window.minx,cur_y,window.minx,n[2]); - - cur_x = window.minx; - cur_y = n[2]; - } - - //generate data for the ending clipped info - if(x > window.maxx) - { - //initial line to intersection (and degenerate) - n[2] = y + (window.maxx - x) * dy / dx; - - n[0] = window.maxx; - n[1] = y; - - //intersect coords - x = window.maxx; - y = n[2]; - afterx = true; - } - }else - { - //initial degenerate - initial clip - if(cur_x > window.maxx) - { - //need to draw an initial segment from clippedx,cur_y to clippedx,intersecty - n[2] = cur_y + (window.maxx - cur_x) * dy / dx; - - move_pen(window.maxx,(int)floor(cur_y)); - draw_line(window.maxx,cur_y,window.maxx,n[2]); - - cur_x = window.maxx; - cur_y = n[2]; - } - - //generate data for the ending clipped info - if(x < window.minx) - { - //initial line to intersection (and degenerate) - n[2] = y + (window.minx - x) * dy / dx; - - n[0] = window.minx; - n[1] = y; - - //intersect coords - x = window.minx; - y = n[2]; - afterx = true; - } - } - - move_pen((int)floor(cur_x),(int)floor(cur_y)); - //draw the relevant line (clipped) - draw_line(cur_x,cur_y,x,y); - - if(afterx) - { - draw_line(x,y,n[0],n[1]); - } - - cur_x = xin; - cur_y = yin; - } - } - } catch(...) { synfig::error("line_to: cur_x=%f, cur_y=%f, x=%f, y=%f", cur_x, cur_y, x, y); throw; } - - flags |= NotClosed|NotSorted; -} - -static inline bool clip_conic(const Point *const p, const ContextRect &r) -{ - const Real minx = min(min(p[0][0],p[1][0]),p[2][0]); - const Real miny = min(min(p[0][1],p[1][1]),p[2][1]); - const Real maxx = max(max(p[0][0],p[1][0]),p[2][0]); - const Real maxy = max(max(p[0][1],p[1][1]),p[2][1]); - - return (minx > r.maxx) || - (maxx < r.minx) || - (miny > r.maxy) || - (maxy < r.miny); -} - -static inline bool clip_cubic(const Point *const p, const ContextRect &r) -{ - /*const Real minx = min(min(p[0][0],p[1][0]),min(p[2][0],p[3][0])); - const Real miny = min(min(p[0][1],p[1][1]),min(p[2][1],p[3][1])); - const Real maxx = max(max(p[0][0],p[1][0]),max(p[2][0],p[3][1])); - const Real maxy = max(max(p[0][1],p[1][1]),max(p[2][1],p[3][1])); - - return (minx > r.maxx) || - (maxx < r.minx) || - (miny > r.maxy) || - (maxy < r.miny);*/ - - return ((p[0][0] > r.maxx) && (p[1][0] > r.maxx) && (p[2][0] > r.maxx) && (p[3][0] > r.maxx)) || - ((p[0][0] < r.minx) && (p[1][0] < r.minx) && (p[2][0] < r.minx) && (p[3][0] < r.minx)) || - ((p[0][1] > r.maxy) && (p[1][1] > r.maxy) && (p[2][1] > r.maxy) && (p[3][1] > r.maxy)) || - ((p[0][1] < r.miny) && (p[1][1] < r.miny) && (p[2][1] < r.miny) && (p[3][1] < r.miny)); -} - -static inline Real max_edges_cubic(const Point *const p) -{ - const Real x1 = p[1][0] - p[0][0]; - const Real y1 = p[1][1] - p[0][1]; - - const Real x2 = p[2][0] - p[1][0]; - const Real y2 = p[2][1] - p[1][1]; - - const Real x3 = p[3][0] - p[2][0]; - const Real y3 = p[3][1] - p[2][1]; - - const Real d1 = x1*x1 + y1*y1; - const Real d2 = x2*x2 + y2*y2; - const Real d3 = x3*x3 + y3*y3; - - return max(max(d1,d2),d3); -} - -static inline Real max_edges_conic(const Point *const p) -{ - const Real x1 = p[1][0] - p[0][0]; - const Real y1 = p[1][1] - p[0][1]; - - const Real x2 = p[2][0] - p[1][0]; - const Real y2 = p[2][1] - p[1][1]; - - const Real d1 = x1*x1 + y1*y1; - const Real d2 = x2*x2 + y2*y2; - - return max(d1,d2); -} - -void Layer_Shape::PolySpan::conic_to(Real x1, Real y1, Real x, Real y) -{ - Point *current = arc; - int level = 0; - int num = 0; - bool onsecond = false; - - arc[0] = Point(x,y); - arc[1] = Point(x1,y1); - arc[2] = Point(cur_x,cur_y); - - //just draw the line if it's outside - if(clip_conic(arc,window)) - { - line_to(x,y); - return; - } - - //Ok so it's not super degenerate, subdivide and draw (run through minimum subdivision levels first) - while(current >= arc) - { - if(num >= MAX_SUBDIVISION_SIZE) - { - warning("Curve subdivision somehow ran out of space while tessellating!"); - - //do something... - assert(0); - return; - }else - //if the curve is clipping then draw degenerate - if(clip_conic(current,window)) - { - line_to(current[0][0],current[0][1]); //backwards so front is destination - current -= 2; - if(onsecond) level--; - onsecond = true; - num--; - continue; - }else - //if we are not at the level minimum - if(level < MIN_SUBDIVISION_DRAW_LEVELS) - { - Subd_Conic_Stack(current); - current += 2; //cursor on second curve - level ++; - num ++; - onsecond = false; - continue; - }else - //split it again, if it's too big - if(max_edges_conic(current) > 0.25) //distance of .5 (cover no more than half the pixel) - { - Subd_Conic_Stack(current); - current += 2; //cursor on second curve - level ++; - num ++; - onsecond = false; - } - else //NOT TOO BIG? RENDER!!! - { - //cur_x,cur_y = current[2], so we need to go 1,0 - line_to(current[1][0],current[1][1]); - line_to(current[0][0],current[0][1]); - - current -= 2; - if(onsecond) level--; - num--; - onsecond = true; - } - } -} - -void Layer_Shape::PolySpan::cubic_to(Real x1, Real y1, Real x2, Real y2, Real x, Real y) -{ - Point *current = arc; - int num = 0; - int level = 0; - bool onsecond = false; - - arc[0] = Point(x,y); - arc[1] = Point(x2,y2); - arc[2] = Point(x1,y1); - arc[3] = Point(cur_x,cur_y); - - //just draw the line if it's outside - if(clip_cubic(arc,window)) - { - line_to(x,y); - return; - } - - //Ok so it's not super degenerate, subdivide and draw (run through minimum subdivision levels first) - while(current >= arc) //once current goes below arc, there are no more curves left - { - if(num >= MAX_SUBDIVISION_SIZE) - { - warning("Curve subdivision somehow ran out of space while tessellating!"); - - //do something... - assert(0); - return; - }else - - //if we are not at the level minimum - if(level < MIN_SUBDIVISION_DRAW_LEVELS) - { - Subd_Cubic_Stack(current); - current += 3; //cursor on second curve - level ++; - num ++; - onsecond = false; - continue; - }else - //if the curve is clipping then draw degenerate - if(clip_cubic(current,window)) - { - line_to(current[0][0],current[0][1]); //backwards so front is destination - current -= 3; - if(onsecond) level--; - onsecond = true; - num --; - continue; - } - else - //split it again, if it's too big - if(max_edges_cubic(current) > 0.25) //could use max_edges<3> - { - Subd_Cubic_Stack(current); - current += 3; //cursor on second curve - level ++; - num ++; - onsecond = false; - } - else //NOT TOO BIG? RENDER!!! - { - //cur_x,cur_y = current[3], so we need to go 2,1,0 - line_to(current[2][0],current[2][1]); - line_to(current[1][0],current[1][1]); - line_to(current[0][0],current[0][1]); - - current -= 3; - if(onsecond) level--; - num --; - onsecond = true; - } - } -} - -//******************** LINE ALGORITHMS **************************** -// THESE CALCULATE THE AREA AND THE COVER FOR THE MARKS, TO THEN SCAN CONVERT -// - BROKEN UP INTO SCANLINES (draw_line - y intersections), -// THEN THE COVER AND AREA PER TOUCHED PIXEL IS CALCULATED (draw_scanline - x intersections) -void Layer_Shape::PolySpan::draw_scanline(int y, Real x1, Real fy1, Real x2, Real fy2) -{ - int ix1 = (int)floor(x1); - int ix2 = (int)floor(x2); - Real fx1 = x1 - ix1; - Real fx2 = x2 - ix2; - - Real dx,dy,dydx,mult; - - dx = x2 - x1; - dy = fy2 - fy1; - - //case horizontal line - if(fy1 == fy2) - { - move_pen(ix2,y); //pen needs to be at the last coord - return; - } - - //case all in same pixel - if(ix1 == ix2) //impossible for degenerate case (covered by the previous cases) - { - current.addcover(dy,(fx1 + fx2)*dy/2); //horizontal trapezoid area - return; - } - - if(dx > 0) - { - // ----> fx1...1 0...1 ... 0...1 0...fx2 - dydx = dy / dx; - - //set initial values - //Iterate through the covered pixels - mult = (1 - fx1)*dydx; //next y intersection diff value (at 1) - - //first pixel - current.addcover(mult,(1 + fx1)*mult/2); // fx1,fy1,1,fy@1 - starting trapezoidal area - - //move to the next pixel - fy1 += mult; - ix1++; - - move_pen(ix1,y); - - //set up for whole ones - while(ix1 != ix2) - { - //trapezoid(0,y1,1,y1+dydx); - current.addcover(dydx,dydx/2); //accumulated area 1/2 the cover - - //move to next pixel (+1) - ix1++; - fy1 += dydx; - move_pen(ix1,y); - } - - //last pixel - //final y-pos - last intersect pos - mult = fx2 * dydx; - current.addcover(mult,(0+fx2)*mult/2); - }else - { - // fx2...1 0...1 ... 0...1 0...fx1 <---- - //mult = (0 - fx1) * dy / dx; - //neg sign sucked into dydx - dydx = -dy / dx; - - //set initial values - //Iterate through the covered pixels - mult = fx1*dydx; //next y intersection diff value - - //first pixel - current.addcover(mult,fx1*mult/2); // fx1,fy1,0,fy@0 - starting trapezoidal area - - //move to next pixel - fy1 += mult; - ix1--; - - move_pen(ix1,y); - - //set up for whole ones - while(ix1 != ix2) - { - //trapezoid(0,y1,1,y1+dydx); - current.addcover(dydx,dydx/2); //accumulated area 1/2 the cover - - //move to next pixel (-1) - fy1 += dydx; - ix1--; - move_pen(ix1,y); - } - - //last pixel - mult = fy2 - fy1; //final y-pos - last intersect pos - - current.addcover(mult,(fx2+1)*mult/2); - } -} - -void Layer_Shape::PolySpan::draw_line(Real x1, Real y1, Real x2, Real y2) -{ - int iy1 = (int)floor(y1); - int iy2 = (int)floor(y2); - Real fy1 = y1 - iy1; - Real fy2 = y2 - iy2; - - assert(!isnan(fy1)); - assert(!isnan(fy2)); - - Real dx,dy,dxdy,mult,x_from,x_to; - - const Real SLOPE_EPSILON = 1e-10; - - //case all one scanline - if(iy1 == iy2) - { - draw_scanline(iy1,x1,y1,x2,y2); - return; - } - - //difference values - dy = y2 - y1; - dx = x2 - x1; - - //case vertical line - if(dx < SLOPE_EPSILON && dx > -SLOPE_EPSILON) - { - //calc area and cover on vertical line - if(dy > 0) - { - // ----> fx1...1 0...1 ... 0...1 0...fx2 - Real sub; - - int ix1 = (int)floor(x1); - Real fx1 = x1 - ix1; - - //current pixel - sub = 1 - fy1; - - current.addcover(sub,fx1*sub); - - //next pixel - iy1++; - - //move pen to next pixel - move_pen(ix1,iy1); - - while(iy1 != iy2) - { - //accumulate cover - current.addcover(1,fx1); - - //next pixel - iy1++; - move_pen(ix1,iy1); - } - - //last pixel - current.addcover(fy2,fy2*fx1); - }else - { - Real sub; - - int ix1 = (int)floor(x1); - Real fx1 = x1 - ix1; - - //current pixel - sub = 0 - fy1; - - current.addcover(sub,fx1*sub); - - //next pixel - iy1--; - - move_pen(ix1,iy1); - - while(iy1 != iy2) - { - //accumulate in current pixel - current.addcover(-1,-fx1); - - //move to next - iy1--; - move_pen(ix1,iy1); - } - - current.addcover(fy2-1,(fy2-1)*fx1); - } - return; - } - - //case normal line - guaranteed dx != 0 && dy != 0 - - //calculate the initial intersection with "next" scanline - if(dy > 0) - { - dxdy = dx / dy; - - mult = (1 - fy1) * dxdy; - - //x intersect scanline - x_from = x1 + mult; - draw_scanline(iy1,x1,fy1,x_from,1); - - //move to next line - iy1++; - - move_pen((int)floor(x_from),iy1); - - while(iy1 != iy2) - { - //keep up on the x axis, and render the current scanline - x_to = x_from + dxdy; - draw_scanline(iy1,x_from,0,x_to,1); - x_from = x_to; - - //move to next pixel - iy1++; - move_pen((int)floor(x_from),iy1); - } - - //draw the last one, fractional - draw_scanline(iy2,x_from,0,x2,fy2); - - }else - { - dxdy = -dx / dy; - - mult = fy1 * dxdy; - - //x intersect scanline - x_from = x1 + mult; - draw_scanline(iy1,x1,fy1,x_from,0); - - //each line after - iy1--; - - move_pen((int)floor(x_from),iy1); - - while(iy1 != iy2) - { - x_to = x_from + dxdy; - draw_scanline(iy1,x_from,1,x_to,0); - x_from = x_to; - - iy1--; - move_pen((int)floor(x_from),iy1); - } - //draw the last one, fractional - draw_scanline(iy2,x_from,1,x2,fy2); - } -} - -//****** LAYER PEN OPERATIONS (move_to, line_to, etc.) ****** -void Layer_Shape::move_to(Real x, Real y) -{ - //const int sizeblock = sizeof(Primitive)+sizeof(Point); - Primitive op; - Point p(x,y); - - op.operation = Primitive::MOVE_TO; - op.number = 1; //one point for now - - if(lastbyteop == Primitive::MOVE_TO) - { - char *ptr = &bytestream[lastoppos]; - memcpy(ptr,&op,sizeof(op)); - memcpy(ptr+sizeof(op),&p,sizeof(p)); - } - else //make a new op - { - lastbyteop = Primitive::MOVE_TO; - lastoppos = bytestream.size(); - - bytestream.insert(bytestream.end(),(char*)&op,(char*)(&op+1)); //insert the bytes for the header - bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); //insert the bytes for data - } - - edge_table->move_to(x,y); -} - -void Layer_Shape::close() -{ - Primitive op; - - op.operation = Primitive::CLOSE; - op.number = 0; - - if(lastbyteop == Primitive::CLOSE) - { - }else - { - lastbyteop = Primitive::CLOSE; - lastoppos = bytestream.size(); - - bytestream.insert(bytestream.end(),(char*)&op,(char*)(&op+1)); //insert header - } - - edge_table->close(); - //should not affect the bounding box since it would just be returning to old point... -} - -void Layer_Shape::endpath() -{ - Primitive op; - - op.operation = Primitive::END; - op.number = 0; - - if(lastbyteop == Primitive::END || lastbyteop == Primitive::NONE) - { - }else - { - bytestream.insert(bytestream.end(),(char*)&op,(char*)(&op+1)); - } - //should not affect the bounding box since it would just be returning to old point... if at all -} - -void Layer_Shape::line_to(Real x, Real y) -{ - assert(!isnan(x)); - assert(!isnan(y)); - - //const int sizeblock = sizeof(Primitive)+sizeof(Point); - Primitive op; - Point p(x,y); - - op.operation = Primitive::LINE_TO; - op.number = 1; //one point for now - - if(lastbyteop == Primitive::MOVE_TO || lastbyteop == Primitive::LINE_TO) - { - //only need to insert the point - bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); - - Primitive * prim = (Primitive *)&bytestream[lastoppos]; - prim->number++; //increment number of points in the list - }else - { - lastbyteop = Primitive::LINE_TO; - lastoppos = bytestream.size(); - - bytestream.insert(bytestream.end(),(char*)&op,(char*)(&op+1)); //insert the bytes for the header - bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); //insert the bytes for data - } - - edge_table->line_to(x,y); -} - -void Layer_Shape::conic_to(Real x1, Real y1, Real x, Real y) -{ - //const int sizeblock = sizeof(Primitive)+sizeof(Point)*2; - Primitive op; - Point p(x,y); - Point p1(x1,y1); - - op.operation = Primitive::CONIC_TO; - op.number = 2; //2 points for now - - if(lastbyteop == Primitive::CONIC_TO) - { - //only need to insert the new points - bytestream.insert(bytestream.end(),(char*)&p1,(char*)(&p1+1)); - bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); - - Primitive * prim = (Primitive *)&bytestream[lastoppos]; - prim->number += 2; //increment number of points in the list - }else - { - lastbyteop = Primitive::CONIC_TO; - lastoppos = bytestream.size(); - - bytestream.insert(bytestream.end(),(char*)&op,(char*)(&op+1)); //insert the bytes for the header - bytestream.insert(bytestream.end(),(char*)&p1,(char*)(&p1+1)); //insert the bytes for data - bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); //insert the bytes for data - } - - edge_table->conic_to(x1,y1,x,y); -} - -void Layer_Shape::conic_to_smooth(Real x, Real y) //x1,y1 derived from current tangent -{ - //const int sizeblock = sizeof(Primitive)+sizeof(Point); - Primitive op; - Point p(x,y); - - op.operation = Primitive::CONIC_TO_SMOOTH; - op.number = 1; //2 points for now - - if(lastbyteop == Primitive::CONIC_TO_SMOOTH) - { - //only need to insert the new point - bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); - - Primitive * prim = (Primitive *)&bytestream[lastoppos]; - prim->number += 1; //increment number of points in the list - }else - { - lastbyteop = Primitive::CONIC_TO_SMOOTH; - lastoppos = bytestream.size(); - - bytestream.insert(bytestream.end(),(char*)&op,(char*)(&op+1)); //insert the bytes for the header - bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); //insert the bytes for data - } - - edge_table->conic_to_smooth(x,y); -} - -void Layer_Shape::curve_to(Real x1, Real y1, Real x2, Real y2, Real x, Real y) -{ - //const int sizeblock = sizeof(Primitive)+sizeof(Point)*3; - Primitive op; - Point p(x,y); - Point p1(x1,y1); - Point p2(x2,y2); - - op.operation = Primitive::CUBIC_TO; - op.number = 3; //3 points for now - - if(lastbyteop == Primitive::CUBIC_TO) - { - //only need to insert the new points - bytestream.insert(bytestream.end(),(char*)&p1,(char*)(&p1+1)); - bytestream.insert(bytestream.end(),(char*)&p2,(char*)(&p2+1)); - bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); - - Primitive * prim = (Primitive *)&bytestream[lastoppos]; - prim->number += 3; //increment number of points in the list - }else - { - lastbyteop = Primitive::CUBIC_TO; - lastoppos = bytestream.size(); - - bytestream.insert(bytestream.end(),(char*)&op,(char*)(&op+1)); //insert the bytes for the header - bytestream.insert(bytestream.end(),(char*)&p1,(char*)(&p1+1)); //insert the bytes for data - bytestream.insert(bytestream.end(),(char*)&p2,(char*)(&p2+1)); //insert the bytes for data - bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); //insert the bytes for data - } - - edge_table->curve_to(x1,y1,x2,y2,x,y); -} - -void Layer_Shape::curve_to_smooth(Real x2, Real y2, Real x, Real y) //x1,y1 derived from current tangent -{ - //const int sizeblock = sizeof(Primitive)+sizeof(Point)*3; - Primitive op; - Point p(x,y); - Point p2(x2,y2); - - op.operation = Primitive::CUBIC_TO_SMOOTH; - op.number = 2; //3 points for now - - if(lastbyteop == Primitive::CUBIC_TO_SMOOTH) - { - //only need to insert the new points - bytestream.insert(bytestream.end(),(char*)&p2,(char*)(&p2+1)); - bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); - - Primitive * prim = (Primitive *)&bytestream[lastoppos]; - prim->number += 2; //increment number of points in the list - }else - { - lastbyteop = Primitive::CUBIC_TO_SMOOTH; - lastoppos = bytestream.size(); - - bytestream.insert(bytestream.end(),(char*)&op,(char*)(&op+1)); //insert the bytes for the header - bytestream.insert(bytestream.end(),(char*)&p2,(char*)(&p2+1)); //insert the bytes for data - bytestream.insert(bytestream.end(),(char*)&p,(char*)(&p+1)); //insert the bytes for data - } -} - -// ACCELERATED RENDER FUNCTION - TRANSLATE BYTE CODE INTO FUNCTION CALLS - -bool Layer_Shape::render_polyspan(Surface *surface, PolySpan &polyspan, - Color::BlendMethod got_blend_method, Color::value_type got_amount) const -{ - Surface::alpha_pen p(surface->begin(),got_amount,_BlendFunc(got_blend_method)); - PolySpan::cover_array::iterator cur_mark = polyspan.covers.begin(); - PolySpan::cover_array::iterator end_mark = polyspan.covers.end(); - - Real cover,area,alpha; - - int y,x; - - p.set_value(color); - cover = 0; - - if(cur_mark == end_mark) - { - //no marks at all - if(invert) - { - p.move_to(polyspan.window.minx,polyspan.window.miny); - p.put_block(polyspan.window.maxy - polyspan.window.miny,polyspan.window.maxx - polyspan.window.minx); - } - return true; - } - - //fill initial rect / line - if(invert) - { - //fill all the area above the first vertex - p.move_to(polyspan.window.minx,polyspan.window.miny); - y = polyspan.window.miny; - int l = polyspan.window.maxx - polyspan.window.minx; - - p.put_block(cur_mark->y - polyspan.window.miny,l); - - //fill the area to the left of the first vertex on that line - l = cur_mark->x - polyspan.window.minx; - p.move_to(polyspan.window.minx,cur_mark->y); - if(l) p.put_hline(l); - } - - for(;;) - { - y = cur_mark->y; - x = cur_mark->x; - - p.move_to(x,y); - - area = cur_mark->area; - cover += cur_mark->cover; - - //accumulate for the current pixel - while(++cur_mark != polyspan.covers.end()) - { - if(y != cur_mark->y || x != cur_mark->x) - break; - - area += cur_mark->area; - cover += cur_mark->cover; - } - - //draw pixel - based on covered area - if(area) //if we're ok, draw the current pixel - { - alpha = polyspan.ExtractAlpha(cover - area, winding_style); - if(invert) alpha = 1 - alpha; - - if(!antialias) - { - if(alpha >= .5) p.put_value(); - } - else if(alpha) p.put_value_alpha(alpha); - - p.inc_x(); - x++; - } - - //if we're done, don't use iterator and exit - if(cur_mark == end_mark) break; - - //if there is no more live pixels on this line, goto next - if(y != cur_mark->y) - { - if(invert) - { - //fill the area at the end of the line - p.put_hline(polyspan.window.maxx - x); - - //fill area at the beginning of the next line - p.move_to(polyspan.window.minx,cur_mark->y); - p.put_hline(cur_mark->x - polyspan.window.minx); - } - - cover = 0; - - continue; - } - - //draw span to next pixel - based on total amount of pixel cover - if(x < cur_mark->x) - { - alpha = polyspan.ExtractAlpha(cover, winding_style); - if(invert) alpha = 1 - alpha; - - if(!antialias) - { - if(alpha >= .5) p.put_hline(cur_mark->x - x); - } - else if(alpha) p.put_hline(cur_mark->x - x,alpha); - } - } - - //fill the after stuff - if(invert) - { - //fill the area at the end of the line - p.put_hline(polyspan.window.maxx - x); - - //fill area at the beginning of the next line - p.move_to(polyspan.window.minx,y+1); - p.put_block(polyspan.window.maxy - y - 1,polyspan.window.maxx - polyspan.window.minx); - } - - return true; -} - -bool Layer_Shape::render_polyspan(etl::surface *surface, PolySpan &polyspan) const -{ - etl::surface::pen p(surface->begin()); - PolySpan::cover_array::iterator cur_mark = polyspan.covers.begin(); - PolySpan::cover_array::iterator end_mark = polyspan.covers.end(); - - Real cover,area,alpha; - - int y,x; - - cover = 0; - - //the pen always writes 1 (unless told to do otherwise) - p.set_value(1); - - if(cur_mark == end_mark) - { - //no marks at all - if(invert) - { - p.move_to(polyspan.window.minx,polyspan.window.miny); - p.put_block(polyspan.window.maxy - polyspan.window.miny,polyspan.window.maxx - polyspan.window.minx); - } - return true; - } - - //fill initial rect / line - if(invert) - { - //fill all the area above the first vertex - p.move_to(polyspan.window.minx,polyspan.window.miny); - y = polyspan.window.miny; - int l = polyspan.window.maxx - polyspan.window.minx; - - p.put_block(cur_mark->y - polyspan.window.miny,l); - - //fill the area to the left of the first vertex on that line - l = cur_mark->x - polyspan.window.minx; - p.move_to(polyspan.window.minx,cur_mark->y); - if(l) p.put_hline(l); - - for(;;) - { - y = cur_mark->y; - x = cur_mark->x; - - p.move_to(x,y); - - area = cur_mark->area; - cover += cur_mark->cover; - - //accumulate for the current pixel - while(++cur_mark != polyspan.covers.end()) - { - if(y != cur_mark->y || x != cur_mark->x) - break; - - area += cur_mark->area; - cover += cur_mark->cover; - } - - //draw pixel - based on covered area - if(area) //if we're ok, draw the current pixel - { - alpha = 1 - polyspan.ExtractAlpha(cover - area, winding_style); - if(!antialias) - { - if(alpha >= .5) p.put_value(); - } - else if(alpha) p.put_value(alpha); - - p.inc_x(); - x++; - } - - //if we're done, don't use iterator and exit - if(cur_mark == end_mark) break; - - //if there is no more live pixels on this line, goto next - if(y != cur_mark->y) - { - //fill the area at the end of the line - p.put_hline(polyspan.window.maxx - x); - - //fill area at the beginning of the next line - p.move_to(polyspan.window.minx,cur_mark->y); - p.put_hline(cur_mark->x - polyspan.window.minx); - - cover = 0; - - continue; - } - - //draw span to next pixel - based on total amount of pixel cover - if(x < cur_mark->x) - { - alpha = 1 - polyspan.ExtractAlpha(cover, winding_style); - if(!antialias) - { - if(alpha >= .5) p.put_hline(cur_mark->x - x); - } - else if(alpha) p.put_hline(cur_mark->x - x,alpha); - } - } - - //fill the area at the end of the line - p.put_hline(polyspan.window.maxx - x); - - //fill area at the beginning of the next line - p.move_to(polyspan.window.minx,y+1); - p.put_block(polyspan.window.maxy - y - 1,polyspan.window.maxx - polyspan.window.minx); - }else - { - for(;;) - { - y = cur_mark->y; - x = cur_mark->x; - - p.move_to(x,y); - - area = cur_mark->area; - cover += cur_mark->cover; - - //accumulate for the current pixel - while(++cur_mark != polyspan.covers.end()) - { - if(y != cur_mark->y || x != cur_mark->x) - break; - - area += cur_mark->area; - cover += cur_mark->cover; - } - - //draw pixel - based on covered area - if(area) //if we're ok, draw the current pixel - { - alpha = polyspan.ExtractAlpha(cover - area, winding_style); - if(!antialias) - { - if(alpha >= .5) p.put_value(); - } - else if(alpha) p.put_value(alpha); - - p.inc_x(); - x++; - } - - //if we're done, don't use iterator and exit - if(cur_mark == end_mark) break; - - //if there is no more live pixels on this line, goto next - if(y != cur_mark->y) - { - cover = 0; - - continue; - } - - //draw span to next pixel - based on total amount of pixel cover - if(x < cur_mark->x) - { - alpha = polyspan.ExtractAlpha(cover, winding_style); - if(!antialias) - { - if(alpha >= .5) p.put_hline(cur_mark->x - x); - } - else if(alpha) p.put_hline(cur_mark->x - x,alpha); - } - } - } - - return true; -} - -bool -Layer_Shape::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - const unsigned int w = renddesc.get_w(); - const unsigned int h = renddesc.get_h(); - - const Real pw = abs(renddesc.get_pw()); - const Real ph = abs(renddesc.get_ph()); - - //const Real OFFSET_EPSILON = 1e-8; - SuperCallback stageone(cb,1,10000,15001+renddesc.get_h()); - SuperCallback stagetwo(cb,10000,10001+renddesc.get_h(),15001+renddesc.get_h()); - SuperCallback stagethree(cb,10001+renddesc.get_h(),15001+renddesc.get_h(),15001+renddesc.get_h()); - - // Render what is behind us - - //clip if it satisfies the invert solid thing - if(is_solid_color() && invert) - { - Rect aabb = edge_table->aabb; - Point tl = renddesc.get_tl() - origin; - - Real pw = renddesc.get_pw(), - ph = renddesc.get_ph(); - - Rect nrect; - - Real pixelfeatherx = quality == 10 ? 0 : abs(feather/pw), - pixelfeathery = quality == 10 ? 0 : abs(feather/ph); - - nrect.set_point((aabb.minx - tl[0])/pw,(aabb.miny - tl[1])/ph); - nrect.expand((aabb.maxx - tl[0])/pw,(aabb.maxy - tl[1])/ph); - - RendDesc optdesc(renddesc); - - //make sure to expand so we gain subpixels rather than lose them - nrect.minx = floor(nrect.minx-pixelfeatherx); nrect.miny = floor(nrect.miny-pixelfeathery); - nrect.maxx = ceil(nrect.maxx+pixelfeatherx); nrect.maxy = ceil(nrect.maxy+pixelfeathery); - - //make sure the subwindow is clipped with our tile window (minimize useless drawing) - set_intersect(nrect,nrect,Rect(0,0,renddesc.get_w(),renddesc.get_h())); - - //must resize the surface first - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - surface->clear(); - - //only render anything if it's visible from our current tile - if(nrect.valid()) - { - //set the subwindow to the viewable pixels and render it to the subsurface - optdesc.set_subwindow((int)nrect.minx, (int)nrect.miny, - (int)(nrect.maxx - nrect.minx), (int)(nrect.maxy - nrect.miny)); - - Surface optimizedbacksurf; - if(!context.accelerated_render(&optimizedbacksurf,quality,optdesc,&stageone)) - return false; - - //blit that onto the original surface so we can pretend that nothing ever happened - Surface::pen p = surface->get_pen((int)nrect.minx,(int)nrect.miny); - optimizedbacksurf.blit_to(p); - } - }else - { - if(!context.accelerated_render(surface,quality,renddesc,&stageone)) - return false; - } - - if(cb && !cb->amount_complete(10000,10001+renddesc.get_h())) return false; - - if(feather && quality != 10) - { - //we have to blur rather than be crappy - - //so make a separate surface - RendDesc workdesc(renddesc); - - etl::surface shapesurface; - - //the expanded size = 1/2 the size in each direction rounded up - int halfsizex = (int) (abs(feather*.5/pw) + 3), - halfsizey = (int) (abs(feather*.5/ph) + 3); - - //expand by 1/2 size in each direction on either side - switch(blurtype) - { - case Blur::DISC: - case Blur::BOX: - case Blur::CROSS: - { - workdesc.set_subwindow(-max(1,halfsizex),-max(1,halfsizey),w+2*max(1,halfsizex),h+2*max(1,halfsizey)); - break; - } - case Blur::FASTGAUSSIAN: - { - if(quality < 4) - { - halfsizex*=2; - halfsizey*=2; - } - workdesc.set_subwindow(-max(1,halfsizex),-max(1,halfsizey),w+2*max(1,halfsizex),h+2*max(1,halfsizey)); - break; - } - case Blur::GAUSSIAN: - { - #define GAUSSIAN_ADJUSTMENT (0.05) - Real pw = (Real)workdesc.get_w()/(workdesc.get_br()[0]-workdesc.get_tl()[0]); - Real ph = (Real)workdesc.get_h()/(workdesc.get_br()[1]-workdesc.get_tl()[1]); - - pw=pw*pw; - ph=ph*ph; - - halfsizex = (int)(abs(pw)*feather*GAUSSIAN_ADJUSTMENT+0.5); - halfsizey = (int)(abs(ph)*feather*GAUSSIAN_ADJUSTMENT+0.5); - - halfsizex = (halfsizex + 1)/2; - halfsizey = (halfsizey + 1)/2; - workdesc.set_subwindow( -halfsizex, -halfsizey, w+2*halfsizex, h+2*halfsizey ); - - break; - } - } - - shapesurface.set_wh(workdesc.get_w(),workdesc.get_h()); - shapesurface.clear(); - - //render the shape - if(!render_shape(&shapesurface,quality,workdesc,&stagetwo))return false; - - //blur the image - Blur(feather,feather,blurtype,&stagethree)(shapesurface,workdesc.get_br()-workdesc.get_tl(),shapesurface); - - //blend with stuff below it... - unsigned int u = halfsizex, v = halfsizey, x = 0, y = 0; - for(y = 0; y < h; y++,v++) - { - u = halfsizex; - for(x = 0; x < w; x++,u++) - { - float a = shapesurface[v][u]; - if(a) - { - //a = floor(a*255+0.5f)/255; - (*surface)[y][x]=Color::blend(color,(*surface)[y][x],a*get_amount(),get_blend_method()); - } - //else (*surface)[y][x] = worksurface[v][u]; - } - } - - //we are done - if(cb && !cb->amount_complete(100,100)) - { - synfig::warning("Layer_Shape: could not set amount complete"); - return false; - } - - return true; - }else - { - //might take out to reduce code size - return render_shape(surface,true,quality,renddesc,&stagetwo); - } - -} - -bool -Layer_Shape::render_shape(Surface *surface,bool useblend,int /*quality*/, - const RendDesc &renddesc, ProgressCallback *cb)const -{ - int tmp(0); - - SuperCallback progress(cb,0,renddesc.get_h(),renddesc.get_h()); - - // If our amount is set to zero, no need to render anything - if(!get_amount()) - return true; - - //test new polygon renderer - // Build edge table - // Width and Height of a pixel - const int w = renddesc.get_w(); - const int h = renddesc.get_h(); - const Real pw = renddesc.get_w()/(renddesc.get_br()[0]-renddesc.get_tl()[0]); - const Real ph = renddesc.get_h()/(renddesc.get_br()[1]-renddesc.get_tl()[1]); - - const Point tl = renddesc.get_tl(); - - Vector tangent (0,0); - - PolySpan span; - - // if the pixels are zero sized then we're too zoomed out to see anything - if (pw == 0 || ph == 0) - return true; - - //optimization for tessellating only inside tiles - span.window.minx = 0; - span.window.miny = 0; - span.window.maxx = w; - span.window.maxy = h; - - //pointers for processing the bytestream - const char *current = &bytestream[0]; - const char *end = &bytestream[bytestream.size()]; - - int operation = Primitive::NONE; - int number = 0; - int curnum; - - Primitive *curprim; - Point *data; - - Real x,y,x1,y1,x2,y2; - - - while(current < end) - { - tmp++; - - try { - - //get the op code safely - curprim = (Primitive *)current; - - //advance past indices - current += sizeof(Primitive); - if(current > end) - { - warning("Layer_Shape::accelerated_render - Error in the byte stream, not enough space for next declaration"); - return false; - } - - //get the relevant data - operation = curprim->operation; - number = curprim->number; - - if(operation == Primitive::END) - break; - - if(operation == Primitive::CLOSE) - { - if(span.notclosed()) - { - tangent[0] = span.close_x - span.cur_x; - tangent[1] = span.close_y - span.cur_y; - span.close(); - } - continue; - } - - data = (Point*)current; - current += sizeof(Point)*number; - - //check data positioning - if(current > end) - { - warning("Layer_Shape::accelerated_render - Error in the byte stream, in sufficient data space for declared number of points"); - return false; - } - - } catch(...) { synfig::error("Layer_Shape::render_shape()1: Caught an exception after %d loops, rethrowing...", tmp); throw; } - - //transfer all the data - RLE optimized - for(curnum=0; curnum < number;) - { - switch(operation) - { - case Primitive::MOVE_TO: - { - x = data[curnum][0]; - x = (x - tl[0] + origin[0])*pw; - y = data[curnum][1]; - y = (y - tl[1] + origin[1])*ph; - - if(curnum == 0) - { - span.move_to(x,y); - - tangent[0] = 0; - tangent[1] = 0; - } - else - { - tangent[0] = x - span.cur_x; - tangent[1] = y - span.cur_y; - - span.line_to(x,y); - } - - curnum++; //only advance one point - - break; - } - - case Primitive::LINE_TO: - { - x = data[curnum][0]; - x = (x - tl[0] + origin[0])*pw; - y = data[curnum][1]; - y = (y - tl[1] + origin[1])*ph; - - tangent[0] = x - span.cur_x; - tangent[1] = y - span.cur_y; - - span.line_to(x,y); - curnum++; - break; - } - - case Primitive::CONIC_TO: - { - x = data[curnum+1][0]; - x = (x - tl[0] + origin[0])*pw; - y = data[curnum+1][1]; - y = (y - tl[1] + origin[1])*ph; - - x1 = data[curnum][0]; - x1 = (x1 - tl[0] + origin[0])*pw; - y1 = data[curnum][1]; - y1 = (y1 - tl[1] + origin[1])*ph; - - tangent[0] = 2*(x - x1); - tangent[1] = 2*(y - y1); - - span.conic_to(x1,y1,x,y); - curnum += 2; - break; - } - - case Primitive::CONIC_TO_SMOOTH: - { - x = data[curnum][0]; - x = (x - tl[0] + origin[0])*pw; - y = data[curnum][1]; - y = (y - tl[1] + origin[1])*ph; - - x1 = span.cur_x + tangent[0]/2; - y1 = span.cur_y + tangent[1]/2; - - tangent[0] = 2*(x - x1); - tangent[1] = 2*(y - y1); - - span.conic_to(x1,y1,x,y); - curnum ++; - - break; - } - - case Primitive::CUBIC_TO: - { - x = data[curnum+2][0]; - x = (x - tl[0] + origin[0])*pw; - y = data[curnum+2][1]; - y = (y - tl[1] + origin[1])*ph; - - x2 = data[curnum+1][0]; - x2 = (x2 - tl[0] + origin[0])*pw; - y2 = data[curnum+1][1]; - y2 = (y2 - tl[1] + origin[1])*ph; - - x1 = data[curnum][0]; - x1 = (x1 - tl[0] + origin[0])*pw; - y1 = data[curnum][1]; - y1 = (y1 - tl[1] + origin[1])*ph; - - tangent[0] = 2*(x - x2); - tangent[1] = 2*(y - y2); - - span.cubic_to(x1,y1,x2,y2,x,y); - curnum += 3; - - break; - } - - case Primitive::CUBIC_TO_SMOOTH: - { - x = data[curnum+1][0]; - x = (x - tl[0] + origin[0])*pw; - y = data[curnum+1][1]; - y = (y - tl[1] + origin[1])*ph; - - x2 = data[curnum][0]; - x2 = (x2 - tl[0] + origin[0])*pw; - y2 = data[curnum][1]; - y2 = (y2 - tl[1] + origin[1])*ph; - - x1 = span.cur_x + tangent[0]/3.0; - y1 = span.cur_y + tangent[1]/3.0; - - tangent[0] = 2*(x - x2); - tangent[1] = 2*(y - y2); - - span.cubic_to(x1,y1,x2,y2,x,y); - curnum += 2; - - break; - } - } - } - } - - //sort the bastards so we can render everything - span.sort_marks(); - - return render_polyspan(surface, span, - useblend?get_blend_method():Color::BLEND_STRAIGHT, - useblend?get_amount():1.0); -} - -bool -Layer_Shape::render_shape(etl::surface *surface,int /*quality*/, - const RendDesc &renddesc, ProgressCallback */*cb*/)const -{ - // If our amount is set to zero, no need to render anything - if(!get_amount()) - return true; - - //test new polygon renderer - // Build edge table - // Width and Height of a pixel - const int w = renddesc.get_w(); - const int h = renddesc.get_h(); - const Real pw = renddesc.get_w()/(renddesc.get_br()[0]-renddesc.get_tl()[0]); - const Real ph = renddesc.get_h()/(renddesc.get_br()[1]-renddesc.get_tl()[1]); - - const Point tl = renddesc.get_tl(); - - Vector tangent (0,0); - - PolySpan span; - - //optimization for tessellating only inside tiles - span.window.minx = 0; - span.window.miny = 0; - span.window.maxx = w; - span.window.maxy = h; - - //pointers for processing the bytestream - const char *current = &bytestream[0]; - const char *end = &bytestream[bytestream.size()]; - - int operation = Primitive::NONE; - int number = 0; - int curnum; - - Primitive *curprim; - Point *data; - - Real x,y,x1,y1,x2,y2; - - while(current < end) - { - //get the op code safely - curprim = (Primitive *)current; - - //advance past indices - current += sizeof(Primitive); - if(current > end) - { - warning("Layer_Shape::accelerated_render - Error in the byte stream, not enough space for next declaration"); - return false; - } - - //get the relevant data - operation = curprim->operation; - number = curprim->number; - - if(operation == Primitive::END) - break; - - if(operation == Primitive::CLOSE) - { - if(span.notclosed()) - { - tangent[0] = span.close_x - span.cur_x; - tangent[1] = span.close_y - span.cur_y; - span.close(); - } - continue; - } - - data = (Point*)current; - current += sizeof(Point)*number; - - //check data positioning - if(current > end) - { - warning("Layer_Shape::accelerated_render - Error in the byte stream, in sufficient data space for declared number of points"); - return false; - } - - //transfer all the data - for(curnum=0; curnum < number;) - { - switch(operation) - { - case Primitive::MOVE_TO: - { - x = data[curnum][0]; - x = (x - tl[0] + origin[0])*pw; - y = data[curnum][1]; - y = (y - tl[1] + origin[1])*ph; - - if(curnum == 0) - { - span.move_to(x,y); - - tangent[0] = 0; - tangent[1] = 0; - } - else - { - tangent[0] = x - span.cur_x; - tangent[1] = y - span.cur_y; - - span.line_to(x,y); - } - - curnum++; //only advance one point - - break; - } - - case Primitive::LINE_TO: - { - x = data[curnum][0]; - x = (x - tl[0] + origin[0])*pw; - y = data[curnum][1]; - y = (y - tl[1] + origin[1])*ph; - - tangent[0] = x - span.cur_x; - tangent[1] = y - span.cur_y; - - span.line_to(x,y); - curnum++; - break; - } - - case Primitive::CONIC_TO: - { - x = data[curnum+1][0]; - x = (x - tl[0] + origin[0])*pw; - y = data[curnum+1][1]; - y = (y - tl[1] + origin[1])*ph; - - x1 = data[curnum][0]; - x1 = (x1 - tl[0] + origin[0])*pw; - y1 = data[curnum][1]; - y1 = (y1 - tl[1] + origin[1])*ph; - - tangent[0] = 2*(x - x1); - tangent[1] = 2*(y - y1); - - span.conic_to(x1,y1,x,y); - curnum += 2; - break; - } - - case Primitive::CONIC_TO_SMOOTH: - { - x = data[curnum][0]; - x = (x - tl[0] + origin[0])*pw; - y = data[curnum][1]; - y = (y - tl[1] + origin[1])*ph; - - x1 = span.cur_x + tangent[0]/2; - y1 = span.cur_y + tangent[1]/2; - - tangent[0] = 2*(x - x1); - tangent[1] = 2*(y - y1); - - span.conic_to(x1,y1,x,y); - curnum ++; - - break; - } - - case Primitive::CUBIC_TO: - { - x = data[curnum+2][0]; - x = (x - tl[0] + origin[0])*pw; - y = data[curnum+2][1]; - y = (y - tl[1] + origin[1])*ph; - - x2 = data[curnum+1][0]; - x2 = (x2 - tl[0] + origin[0])*pw; - y2 = data[curnum+1][1]; - y2 = (y2 - tl[1] + origin[1])*ph; - - x1 = data[curnum][0]; - x1 = (x1 - tl[0] + origin[0])*pw; - y1 = data[curnum][1]; - y1 = (y1 - tl[1] + origin[1])*ph; - - tangent[0] = 2*(x - x2); - tangent[1] = 2*(y - y2); - - span.cubic_to(x1,y1,x2,y2,x,y); - curnum += 3; - - break; - } - - case Primitive::CUBIC_TO_SMOOTH: - { - x = data[curnum+1][0]; - x = (x - tl[0] + origin[0])*pw; - y = data[curnum+1][1]; - y = (y - tl[1] + origin[1])*ph; - - x2 = data[curnum][0]; - x2 = (x2 - tl[0] + origin[0])*pw; - y2 = data[curnum][1]; - y2 = (y2 - tl[1] + origin[1])*ph; - - x1 = span.cur_x + tangent[0]/3.0; - y1 = span.cur_y + tangent[1]/3.0; - - tangent[0] = 2*(x - x2); - tangent[1] = 2*(y - y2); - - span.cubic_to(x1,y1,x2,y2,x,y); - curnum += 2; - - break; - } - } - } - } - - //sort the bastards so we can render everything - span.sort_marks(); - - return render_polyspan(surface, span); -} - -Rect -Layer_Shape::get_bounding_rect()const -{ - if(invert) - return Rect::full_plane(); - - if (edge_table->initaabb) - return Rect::zero(); - - Rect bounds(edge_table->aabb+origin); - bounds.expand(max((bounds.get_min() - bounds.get_max()).mag()*0.01, - feather)); - - return bounds; -} diff --git a/synfig-core/trunk/src/synfig/layer_shape.h b/synfig-core/trunk/src/synfig/layer_shape.h deleted file mode 100644 index 1b20d52..0000000 --- a/synfig-core/trunk/src/synfig/layer_shape.h +++ /dev/null @@ -1,128 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer_shape.h -** \brief Header file for implementation of the "Shape" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007-2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_LAYER_SHAPE_H -#define __SYNFIG_LAYER_SHAPE_H - -/* === H E A D E R S ======================================================= */ - -#include "layer_composite.h" -#include "color.h" -#include "vector.h" -#include "blur.h" - -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/*! \class Layer_Shape -** \brief writeme */ -class Layer_Shape : public Layer_Composite, public Layer_NoDeform -{ - SYNFIG_LAYER_MODULE_EXT - - enum WindingStyle - { - WINDING_NON_ZERO=0, //!< less than -1 --> 1; -1 --> 1; 0 --> 0; 1 --> 1; greater than 1 --> 1 - WINDING_EVEN_ODD=1, //!< add or subtract multiples of 2 to get into range -1:1, then as above - - WINDING_END=2 //!< \internal - }; - -private: - - //internal caching - struct Intersector; - Intersector *edge_table; - - //exported data - Color color; - - Point origin; - bool invert; - bool antialias; - - int blurtype; - Real feather; - WindingStyle winding_style; - - std::vector< char > bytestream; - - //for use in creating the bytestream - int lastbyteop; - int lastoppos; - -protected: - - Layer_Shape(const Real &a = 1.0, const Color::BlendMethod m = Color::BLEND_COMPOSITE); - -public: - - ~Layer_Shape(); - - //! Clears out any data - /*! Also clears out the Intersector - */ - void clear(); - //void sync(); - - void move_to(Real x, Real y); - void line_to(Real x, Real y); - void conic_to(Real x1, Real y1, Real x, Real y); - void conic_to_smooth(Real x, Real y); //x1,y1 derived from current tangent - void curve_to(Real x1, Real y1, Real x2, Real y2, Real x, Real y); - void curve_to_smooth(Real x2, Real y2, Real x, Real y); //x1,y1 derived from current tangent - void close(); - void endpath(); - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - virtual ValueBase get_param(const String & param)const; - - virtual Vocab get_param_vocab()const; - - virtual Color get_color(Context context, const Point &pos)const; - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - virtual Rect get_bounding_rect()const; - -private: - class PolySpan; - bool render_polyspan(Surface *surface,PolySpan &polyspan, - Color::BlendMethod method,Color::value_type amount)const; - bool render_polyspan(etl::surface *surface,PolySpan &polyspan)const; - virtual bool render_shape(Surface *surface,bool useblend,int quality,const RendDesc &renddesc, ProgressCallback *cb)const; - virtual bool render_shape(etl::surface *surface,int quality,const RendDesc &renddesc, ProgressCallback *cb)const; -}; // END of Layer_Shape - -}; // END of namespace synfig -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/layer_solidcolor.cpp b/synfig-core/trunk/src/synfig/layer_solidcolor.cpp deleted file mode 100644 index 0b520ad..0000000 --- a/synfig-core/trunk/src/synfig/layer_solidcolor.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer_solidcolor.cpp -** \brief Implementation of the "Solid Color" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "layer_solidcolor.h" -#include "string.h" -#include "time.h" -#include "context.h" -#include "paramdesc.h" -#include "renddesc.h" -#include "surface.h" -#include "value.h" -#include "valuenode.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace etl; -using namespace std; -using namespace synfig; - -/* === G L O B A L S ======================================================= */ - -SYNFIG_LAYER_INIT(Layer_SolidColor); -SYNFIG_LAYER_SET_NAME(Layer_SolidColor,"SolidColor"); // todo: use solid_color -SYNFIG_LAYER_SET_LOCAL_NAME(Layer_SolidColor,N_("Solid Color")); -SYNFIG_LAYER_SET_CATEGORY(Layer_SolidColor,N_("Geometry")); -SYNFIG_LAYER_SET_VERSION(Layer_SolidColor,"0.1"); -SYNFIG_LAYER_SET_CVS_ID(Layer_SolidColor,"$Id$"); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - -Layer_SolidColor::Layer_SolidColor(): - Layer_Composite(1.0,Color::BLEND_STRAIGHT), - color(Color::black()) -{ -} - -bool -Layer_SolidColor::set_param(const String & param, const ValueBase &value) -{ - IMPORT_PLUS(color, { if (color.get_a() == 0) { if (converted_blend_) { - set_blend_method(Color::BLEND_ALPHA_OVER); - color.set_a(1); } else transparent_color_ = true; } }); - - return Layer_Composite::set_param(param,value); -} - -ValueBase -Layer_SolidColor::get_param(const String ¶m)const -{ - EXPORT(color); - - EXPORT_NAME(); - EXPORT_VERSION(); - - return Layer_Composite::get_param(param); -} - -Layer::Vocab -Layer_SolidColor::get_param_vocab()const -{ - Layer::Vocab ret(Layer_Composite::get_param_vocab()); - - ret.push_back(ParamDesc("color") - .set_local_name(_("Color")) - ); - - return ret; -} - -synfig::Layer::Handle -Layer_SolidColor::hit_check(synfig::Context context, const synfig::Point &point)const -{ - if(get_blend_method()==Color::BLEND_STRAIGHT && get_amount()>=0.5) - return const_cast(this); - else - if(get_blend_method()==Color::BLEND_COMPOSITE && get_amount()*color.get_a()>=0.5) - return const_cast(this); - - Layer::Handle layer(context.hit_check(point)); - - return layer?layer:const_cast(this); -} - -Color -Layer_SolidColor::get_color(Context context, const Point &pos)const -{ - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - return color; - else - return Color::blend(color,context.get_color(pos),get_amount(),get_blend_method()); -} - -bool -Layer_SolidColor::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const -{ - if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT) - { - // Mark our progress as starting - if(cb && !cb->amount_complete(0,1000)) - return false; - - surface->set_wh(renddesc.get_w(),renddesc.get_h()); - surface->fill(color); - - // Mark our progress as finished - if(cb && !cb->amount_complete(1000,1000)) - return false; - - return true; - } - - SuperCallback supercb(cb,0,9500,10000); - - if(!context.accelerated_render(surface,quality,renddesc,&supercb)) - return false; - - int x,y; - - Surface::alpha_pen apen(surface->begin()); - - apen.set_value(color); - apen.set_alpha(get_amount()); - apen.set_blend_method(get_blend_method()); - - for(y=0;yamount_complete(10000,10000)) - return false; - - return true; -} diff --git a/synfig-core/trunk/src/synfig/layer_solidcolor.h b/synfig-core/trunk/src/synfig/layer_solidcolor.h deleted file mode 100644 index 90a509d..0000000 --- a/synfig-core/trunk/src/synfig/layer_solidcolor.h +++ /dev/null @@ -1,71 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file layer_solidcolor.h -** \brief Header file for implementation of the "Solid Color" layer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_LAYER_SOLIDCOLOR_H -#define __SYNFIG_LAYER_SOLIDCOLOR_H - -/* === H E A D E R S ======================================================= */ - -#include "layer_composite.h" -#include "color.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class Layer_SolidColor : public Layer_Composite, public Layer_NoDeform -{ - SYNFIG_LAYER_MODULE_EXT - -private: - - Color color; - -public: - - Layer_SolidColor(); - - virtual bool set_param(const String & param, const synfig::ValueBase &value); - - virtual ValueBase get_param(const String & param)const; - - virtual Color get_color(Context context, const Point &pos)const; - - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - - virtual Vocab get_param_vocab()const; - - virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; - -}; // END of class Layer_SolidColor - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/listimporter.cpp b/synfig-core/trunk/src/synfig/listimporter.cpp deleted file mode 100644 index 02680f0..0000000 --- a/synfig-core/trunk/src/synfig/listimporter.cpp +++ /dev/null @@ -1,208 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file listimporter.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "listimporter.h" -#include "general.h" -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -#define LIST_IMPORTER_CACHE_SIZE 20 - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ListImporter::ListImporter(const String &filename) -{ - fps=15; - - ifstream stream(filename.c_str()); - - if(!stream) - { - synfig::error("Unable to open "+filename); - return; - } - String line; - String prefix=etl::dirname(filename)+ETL_DIRECTORY_SEPARATOR; - getline(stream,line); // read first line and check whether it is a Papagayo lip sync file - - if (line == "MohoSwitch1") // it is a Papagayo lipsync file - { - String phoneme, prevphoneme, prevext, ext(".jpg"); // default image format - int frame, prevframe = -1; // it means that the previous phoneme is not known - - while(!stream.eof()) - { - getline(stream,line); - - if(line.find(String("FPS ")) == 0) - { - float f = atof(String(line.begin()+4,line.end()).c_str()); - if (f) fps = f; - continue; - } - - if (line == "bmp" || - line == "gif" || - line == "jpg" || - line == "png" || - line == "ppm" || - line == "tiff" ) - { - ext = String(".") + line; - continue; - } - - size_t pos = line.find(String(" ")); // find space position. The format is "frame phoneme-name". - if(pos != String::npos) - { - frame = atoi(String(line.begin(),line.begin()+pos).c_str()); - phoneme = String(line.begin()+pos+1, line.end()); - - if (prevframe != -1) - while (prevframe < frame) - { - filename_list.push_back(prefix + prevphoneme + prevext); - synfig::info("frame %d, phoneme = %s, path = '%s'", prevframe, prevphoneme.c_str(), (prefix + prevphoneme + prevext).c_str()); - prevframe++; - } - - prevext = ext; - prevframe = frame; - prevphoneme = phoneme; - } - } - - filename_list.push_back(prefix + prevphoneme + prevext); // do it one more time for the last phoneme - synfig::info("finally, frame %d, phoneme = %s, path = '%s'", prevframe, prevphoneme.c_str(), (prefix + prevphoneme + prevext).c_str()); - - return; - } - - stream.seekg(ios_base::beg); - while(!stream.eof()) - { - getline(stream,line); - if(line.empty()) - continue; - // If we have a framerate, then use it - if(line.find(String("FPS "))==0) - { - fps=atof(String(line.begin()+4,line.end()).c_str()); - //synfig::warning("FPS=%f",fps); - if(!fps) - fps=15; - continue; - } - filename_list.push_back(prefix+line); - } -} - -Importer* -ListImporter::create(const char *filename) -{ - return new ListImporter(filename); -} - -ListImporter::~ListImporter() -{ -} - -bool -ListImporter::get_frame(Surface &surface,Time time, ProgressCallback *cb) -{ - int frame=round_to_int(time*fps); - - if(!filename_list.size()) - { - if(cb)cb->error(_("No images in list")); - else synfig::error(_("No images in list")); - return false; - } - - if(frame<0)frame=0; - if(frame>=(signed)filename_list.size())frame=filename_list.size()-1; - - // See if that frame is cached - std::list >::iterator iter; - for(iter=frame_cache.begin();iter!=frame_cache.end();++iter) - { - if(iter->first==filename_list[frame]) - { - surface.mirror(iter->second); - return static_cast(surface); - } - } - - Importer::Handle importer(Importer::open(filename_list[frame])); - - if(!importer) - { - if(cb)cb->error(_("Unable to open ")+filename_list[frame]); - else synfig::error(_("Unable to open ")+filename_list[frame]); - return false; - } - - if(!importer->get_frame(surface,0,cb)) - { - if(cb)cb->error(_("Unable to get frame from ")+filename_list[frame]); - else synfig::error(_("Unable to get frame from ")+filename_list[frame]); - return false; - } - - if(frame_cache.size()>=LIST_IMPORTER_CACHE_SIZE) - frame_cache.pop_front(); - - frame_cache.push_back(std::pair(filename_list[frame],surface)); - - surface.mirror(frame_cache.back().second); - - return static_cast(surface); -} - -bool -ListImporter::is_animated() -{ - return true; -} diff --git a/synfig-core/trunk/src/synfig/listimporter.h b/synfig-core/trunk/src/synfig/listimporter.h deleted file mode 100644 index 090570f..0000000 --- a/synfig-core/trunk/src/synfig/listimporter.h +++ /dev/null @@ -1,73 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file listimporter.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_LISTIMPORTER_H -#define __SYNFIG_LISTIMPORTER_H - -/* === H E A D E R S ======================================================= */ - -#include "importer.h" -#include "surface.h" -#include -#include -//#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/*! \class ListImporter -** \todo Write more detailed description -*/ -class ListImporter : public Importer -{ - float fps; - std::vector filename_list; - std::list > frame_cache; -protected: - ListImporter(const String &filename); - -public: - - virtual ~ListImporter(); - - virtual bool get_frame(Surface &surface,Time time, ProgressCallback *callback=NULL); - - virtual bool is_animated(); - - static Importer* create(const char *filename); -}; - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/loadcanvas.cpp b/synfig-core/trunk/src/synfig/loadcanvas.cpp deleted file mode 100644 index 3da37e9..0000000 --- a/synfig-core/trunk/src/synfig/loadcanvas.cpp +++ /dev/null @@ -1,2301 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file loadcanvas.cpp -** \brief writeme -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** Copyright (c) 2009 Carlos A. Sosa Navarro -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "layer_pastecanvas.h" -#include "loadcanvas.h" -#include "valuenode.h" -#include "valuenode_subtract.h" -#include "valuenode_animated.h" -#include "valuenode_composite.h" -#include "valuenode_const.h" -#include "valuenode_linear.h" -#include "valuenode_dynamiclist.h" -#include "valuenode_reference.h" -#include "valuenode_scale.h" -#include "valuenode_timedswap.h" -#include "valuenode_twotone.h" -#include "valuenode_stripes.h" -#include "valuenode_segcalctangent.h" -#include "valuenode_segcalcvertex.h" -#include "valuenode_bline.h" - -#include "layer.h" -#include "string.h" - -#include "exception.h" - -#include "gradient.h" - -#include -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace synfig; -using namespace etl; - -/* -class test_class { -static int bleh; -public: - test_class() { assert(!bleh); bleh++; synfig::info("test_class: initi: %d",bleh); } - ~test_class() { assert(bleh); synfig::info("test_class: uninit: %d",bleh); bleh--; } -}; -int test_class::bleh(0); - -test_class test_class_instance; -*/ - -/* === M A C R O S ========================================================= */ - -#define VALUENODE_COMPATIBILITY_URL "http://synfig.org/Convert#Compatibility" - -inline bool is_whitespace(char x) { return ((x)=='\n' || (x)=='\t' || (x)==' '); } - -std::set CanvasParser::loading_; - -/* === P R O C E D U R E S ================================================= */ - -static std::map* open_canvas_map_(0); - -std::map >& synfig::get_open_canvas_map() -{ - if(!open_canvas_map_) - open_canvas_map_=new std::map; - return *open_canvas_map_; -} - -static void _remove_from_open_canvas_map(Canvas *x) { get_open_canvas_map().erase(etl::absolute_path(x->get_file_name())); } - -static void _canvas_file_name_changed(Canvas *x) -{ - std::map >::iterator iter; - - for(iter=get_open_canvas_map().begin();iter!=get_open_canvas_map().end();++iter) - if(iter->second==x) - break; - assert(iter!=get_open_canvas_map().end()); - if(iter==get_open_canvas_map().end()) - return; - get_open_canvas_map().erase(iter->first); - get_open_canvas_map()[etl::absolute_path(x->get_file_name())]=x; - -} - -Canvas::Handle -synfig::open_canvas(const String &filename,String &errors,String &warnings) -{ - return open_canvas_as(filename, filename, errors, warnings); -} - -Canvas::Handle -synfig::open_canvas_as(const String &filename,const String &as,String &errors,String &warnings) -{ - if (CanvasParser::loading_.count(filename)) - { - String warning(strprintf(_("cannot load '%s' recursively"), filename.c_str())); - synfig::warning(warning); - warnings = " * " + warning + "\n"; - Canvas::Handle canvas(Canvas::create()); - canvas->set_file_name(filename); - Layer::Handle paste(Layer_PasteCanvas::create()); - canvas->push_back(paste); - paste->set_description(warning); - return canvas; - } - - Canvas::Handle canvas; - CanvasParser parser; - parser.set_allow_errors(true); - - try - { - CanvasParser::loading_.insert(filename); - canvas=parser.parse_from_file_as(filename,as,errors); - } - catch (...) - { - CanvasParser::loading_.erase(filename); - throw; - } - CanvasParser::loading_.erase(filename); - - warnings = parser.get_warnings_text(); - - if(parser.error_count()) - { - errors = parser.get_errors_text(); - return Canvas::Handle(); - } - - return canvas; -} - -/* === M E T H O D S ======================================================= */ - -void -CanvasParser::error_unexpected_element(xmlpp::Node *element,const String &got, const String &expected) -{ - error(element,strprintf(_("Unexpected element <%s>, Expected <%s>"),got.c_str(),expected.c_str())); -} - -void -CanvasParser::error_unexpected_element(xmlpp::Node *element,const String &got) -{ - error(element,strprintf(_("Unexpected element <%s>"),got.c_str())); -} - -void -CanvasParser::warning(xmlpp::Node *element, const String &text) -{ - string str=strprintf("%s:<%s>:%d: ",filename.c_str(),element->get_name().c_str(),element->get_line())+text; - - synfig::warning(str); - // cerr<=max_warnings_) - fatal_error(element, _("Too many warnings")); -} - -void -CanvasParser::error(xmlpp::Node *element, const String &text) -{ - string str=strprintf("%s:<%s>:%d: error: ",filename.c_str(),element->get_name().c_str(),element->get_line())+text; - total_errors_++; - errors_text += " * " + str + "\n"; - if(!allow_errors_) - throw runtime_error(str); - cerr<:%d:",filename.c_str(),element->get_name().c_str(),element->get_line())+text; - throw runtime_error(str); -} - - - -Keyframe -CanvasParser::parse_keyframe(xmlpp::Element *element,Canvas::Handle canvas) -{ - assert(element->get_name()=="keyframe"); - - if(!element->get_attribute("time")) - { - error(element,strprintf(_("<%s> is missing \"%s\" attribute"),"real","time")); - return Keyframe(); - } - - Keyframe ret(Time(element->get_attribute("time")->get_value(),canvas->rend_desc().get_frame_rate())); - - - if(element->get_children().empty()) - return ret; - - if(element->get_child_text()->get_content().empty()) - return ret; - - ret.set_description(element->get_child_text()->get_content()); - - return ret; -} - - -Real -CanvasParser::parse_real(xmlpp::Element *element) -{ - assert(element->get_name()=="real"); - - if(!element->get_children().empty()) - warning(element, strprintf(_("<%s> should not contain anything"),"real")); - - if(!element->get_attribute("value")) - { - error(element,strprintf(_("<%s> is missing \"value\" attribute"),"real")); - return false; - } - - string val=element->get_attribute("value")->get_value(); - - return atof(val.c_str()); -} - -Time -CanvasParser::parse_time(xmlpp::Element *element,Canvas::Handle canvas) -{ - assert(element->get_name()=="time"); - - if(!element->get_children().empty()) - warning(element, strprintf(_("<%s> should not contain anything"),"time")); - - if(!element->get_attribute("value")) - { - error(element,strprintf(_("<%s> is missing \"value\" attribute"),"time")); - return false; - } - - string val=element->get_attribute("value")->get_value(); - - return Time(val,canvas->rend_desc().get_frame_rate()); -} - -int -CanvasParser::parse_integer(xmlpp::Element *element) -{ - assert(element->get_name()=="integer"); - - if(!element->get_children().empty()) - warning(element, strprintf(_("<%s> should not contain anything"),"integer")); - - if(!element->get_attribute("value")) - { - error(element,strprintf(_("<%s> is missing \"value\" attribute"),"integer")); - return false; - } - - string val=element->get_attribute("value")->get_value(); - - return atoi(val.c_str()); -} - -// see 'minor hack' at the end of parse_vector() below -// making this 'static' to give it file local scope -// stops it working (where working means working around -// bug #1509627) -Vector &canvas_parser_vector_id(Vector &vector) -{ - return vector; -} - -Vector -CanvasParser::parse_vector(xmlpp::Element *element) -{ - assert(element->get_name()=="vector"); - - if(element->get_children().empty()) - { - error(element, "Undefined value in "); - return Vector(); - } - - Vector vect; - - xmlpp::Element::NodeList list = element->get_children(); - for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) - { - xmlpp::Element *child=dynamic_cast((xmlpp::Node*)*iter); - if(!child) - continue; - else - if(child->get_name()=="x") - { - if(child->get_children().empty()) - { - error(element, "Undefined value in "); - return Vector(); - } - vect[0]=atof(child->get_child_text()->get_content().c_str()); - } - else - if(child->get_name()=="y") - { - if(child->get_children().empty()) - { - error(element, "Undefined value in "); - return Vector(); - } - vect[1]=atof(child->get_child_text()->get_content().c_str()); - } - else - error_unexpected_element(child,child->get_name()); - } - // Minor hack - gcc 4.1.2 and earlier think that we're not using - // 'vect' and optimize it out at -O2 and higher. This convinces - // them that we are really using it. - return canvas_parser_vector_id(vect); - // When the bug is fixed, we can just do this instead: - // return vect; -} - -Color -CanvasParser::parse_color(xmlpp::Element *element) -{ - assert(element->get_name()=="color"); - - if(element->get_children().empty()) - { - error(element, "Undefined value in "); - return Color(); - } - - Color color(0); - - xmlpp::Element::NodeList list = element->get_children(); - for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) - { - xmlpp::Element *child(dynamic_cast(*iter)); - if(!child) - continue; - else - if(child->get_name()=="r") - { - if(child->get_children().empty()) - { - error(element, "Undefined value in "); - return Color(); - } - color.set_r(atof(child->get_child_text()->get_content().c_str())); - } - else - if(child->get_name()=="g") - { - if(child->get_children().empty()) - { - error(element, "Undefined value in "); - return Color(); - } - color.set_g(atof(child->get_child_text()->get_content().c_str())); - } - else - if(child->get_name()=="b") - { - if(child->get_children().empty()) - { - error(element, "Undefined value in "); - return Color(); - } - color.set_b(atof(child->get_child_text()->get_content().c_str())); - } - else - if(child->get_name()=="a") - { - if(child->get_children().empty()) - { - error(element, "Undefined value in "); - return Color(); - } - color.set_a(atof(child->get_child_text()->get_content().c_str())); - } - else - error_unexpected_element(child,child->get_name()); - } - - return color; -} - -synfig::String -CanvasParser::parse_string(xmlpp::Element *element) -{ - assert(element->get_name()=="string"); - - if(element->get_children().empty()) - { - warning(element, "Undefined value in "); - return synfig::String(); - } - - if(element->get_child_text()->get_content().empty()) - { - warning(element, "Content element of appears to be empty"); - return synfig::String(); - } - - return element->get_child_text()->get_content(); -} - -bool -CanvasParser::parse_bool(xmlpp::Element *element) -{ - assert(element->get_name()=="bool"); - - if(!element->get_children().empty()) - warning(element, strprintf(_("<%s> should not contain anything"),"bool")); - - if(!element->get_attribute("value")) - { - error(element,strprintf(_("<%s> is missing \"value\" attribute"),"bool")); - return false; - } - - string val=element->get_attribute("value")->get_value(); - - if(val=="true" || val=="1") - return true; - if(val=="false" || val=="0") - return false; - - error(element,strprintf(_("Bad value \"%s\" in <%s>"),val.c_str(),"bool")); - - return false; -} - -Gradient -CanvasParser::parse_gradient(xmlpp::Element *node) -{ - assert(node->get_name()=="gradient"); - Gradient ret; - - xmlpp::Element::NodeList list = node->get_children(); - for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) - { - xmlpp::Element *child(dynamic_cast(*iter)); - if(!child) - continue; - else - { - Gradient::CPoint cpoint; - cpoint.color=parse_color(child); - - if(!child->get_attribute("pos")) - { - error(child,strprintf(_("<%s> is missing \"pos\" attribute"),"gradient")); - return Gradient(); - } - - cpoint.pos=atof(child->get_attribute("pos")->get_value().c_str()); - - ret.push_back(cpoint); - } - } - ret.sort(); - return ret; -} - -ValueBase -CanvasParser::parse_list(xmlpp::Element *element,Canvas::Handle canvas) -{ - vector value_list; - - xmlpp::Element::NodeList list = element->get_children(); - for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) - { - xmlpp::Element *child(dynamic_cast(*iter)); - if(!child) - continue; - else - { - value_list.push_back(parse_value(child,canvas)); - if(!value_list.back().is_valid()) - { - value_list.pop_back(); - error(child,"Bad ValueBase"); - continue; - } - } - } - return value_list; -} - -Segment -CanvasParser::parse_segment(xmlpp::Element *element) -{ - assert(element->get_name()=="segment"); - - if(element->get_children().empty()) - { - error(element, "Undefined value in "); - return Segment(); - } - - Segment seg; - - xmlpp::Element::NodeList list = element->get_children(); - for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) - { - xmlpp::Element *child(dynamic_cast(*iter)); - if(!child) - continue; - else - if(child->get_name()=="p1") - { - xmlpp::Element::NodeList list = child->get_children(); - xmlpp::Element::NodeList::iterator iter; - - // Search for the first non-text XML element - for(iter = list.begin(); iter != list.end(); ++iter) - if(dynamic_cast(*iter)) break; - - if(iter==list.end()) - { - error(element, "Undefined value in "); - continue; - } - - if((*iter)->get_name()!="vector") - { - error_unexpected_element((*iter),(*iter)->get_name(),"vector"); - continue; - } - - seg.p1=parse_vector(dynamic_cast(*iter)); - } - else - if(child->get_name()=="t1") - { - xmlpp::Element::NodeList list = child->get_children(); - xmlpp::Element::NodeList::iterator iter; - - // Search for the first non-text XML element - for(iter = list.begin(); iter != list.end(); ++iter) - if(dynamic_cast(*iter)) break; - - if(iter==list.end()) - { - error(element, "Undefined value in "); - continue; - } - - if((*iter)->get_name()!="vector") - { - error_unexpected_element((*iter),(*iter)->get_name(),"vector"); - continue; - } - - seg.t1=parse_vector(dynamic_cast(*iter)); - } - else - if(child->get_name()=="p2") - { - xmlpp::Element::NodeList list = child->get_children(); - xmlpp::Element::NodeList::iterator iter; - - // Search for the first non-text XML element - for(iter = list.begin(); iter != list.end(); ++iter) - if(dynamic_cast(*iter)) break; - - if(iter==list.end()) - { - error(element, "Undefined value in "); - continue; - } - - if((*iter)->get_name()!="vector") - { - error_unexpected_element((*iter),(*iter)->get_name(),"vector"); - continue; - } - - seg.p2=parse_vector(dynamic_cast(*iter)); - } - else - if(child->get_name()=="t2") - { - xmlpp::Element::NodeList list = child->get_children(); - xmlpp::Element::NodeList::iterator iter; - - // Search for the first non-text XML element - for(iter = list.begin(); iter != list.end(); ++iter) - if(dynamic_cast(*iter)) break; - - if(iter==list.end()) - { - error(element, "Undefined value in "); - continue; - } - - if((*iter)->get_name()!="vector") - { - error_unexpected_element((*iter),(*iter)->get_name(),"vector"); - continue; - } - - seg.t2=parse_vector(dynamic_cast(*iter)); - } - else - error_unexpected_element(child,child->get_name()); - } - return seg; -} - -BLinePoint -CanvasParser::parse_bline_point(xmlpp::Element *element) -{ - assert(element->get_name()=="bline_point"); - if(element->get_children().empty()) - { - error(element, "Undefined value in "); - return BLinePoint(); - } - - BLinePoint ret; - ret.set_split_tangent_flag(false); - - xmlpp::Element::NodeList list = element->get_children(); - for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) - { - xmlpp::Element *child(dynamic_cast(*iter)); - if(!child) - continue; - else - // Vertex - if(child->get_name()[0]=='v' || child->get_name()=="p1") - { - xmlpp::Element::NodeList list = child->get_children(); - xmlpp::Element::NodeList::iterator iter; - - // Search for the first non-text XML element - for(iter = list.begin(); iter != list.end(); ++iter) - if(dynamic_cast(*iter)) break; - - if(iter==list.end()) - { - error(element, "Undefined value in "); - continue; - } - - if((*iter)->get_name()!="vector") - { - error_unexpected_element((*iter),(*iter)->get_name(),"vector"); - continue; - } - - ret.set_vertex(parse_vector(dynamic_cast(*iter))); - } - else - // Tangent 1 - if(child->get_name()=="t1" || child->get_name()=="tangent") - { - xmlpp::Element::NodeList list = child->get_children(); - xmlpp::Element::NodeList::iterator iter; - - // Search for the first non-text XML element - for(iter = list.begin(); iter != list.end(); ++iter) - if(dynamic_cast(*iter)) break; - - if(iter==list.end()) - { - error(element, "Undefined value in "); - continue; - } - - if((*iter)->get_name()!="vector") - { - error_unexpected_element((*iter),(*iter)->get_name(),"vector"); - continue; - } - - ret.set_tangent1(parse_vector(dynamic_cast(*iter))); - } - else - // Tangent 2 - if(child->get_name()=="t2") - { - xmlpp::Element::NodeList list = child->get_children(); - xmlpp::Element::NodeList::iterator iter; - - // Search for the first non-text XML element - for(iter = list.begin(); iter != list.end(); ++iter) - if(dynamic_cast(*iter)) break; - - if(iter==list.end()) - { - error(element, "Undefined value in "); - continue; - } - - if((*iter)->get_name()!="vector") - { - error_unexpected_element((*iter),(*iter)->get_name(),"vector"); - continue; - } - - ret.set_tangent2(parse_vector(dynamic_cast(*iter))); - ret.set_split_tangent_flag(true); - } - else - // width - if(child->get_name()=="width") - { - xmlpp::Element::NodeList list = child->get_children(); - xmlpp::Element::NodeList::iterator iter; - - // Search for the first non-text XML element - for(iter = list.begin(); iter != list.end(); ++iter) - if(dynamic_cast(*iter)) break; - - if(iter==list.end()) - { - error(element, "Undefined value in "); - continue; - } - - if((*iter)->get_name()!="real") - { - error_unexpected_element((*iter),(*iter)->get_name(),"real"); - continue; - } - - ret.set_width(parse_real(dynamic_cast(*iter))); - } - else - // origin - if(child->get_name()=="origin") - { - xmlpp::Element::NodeList list = child->get_children(); - xmlpp::Element::NodeList::iterator iter; - - // Search for the first non-text XML element - for(iter = list.begin(); iter != list.end(); ++iter) - if(dynamic_cast(*iter)) break; - - if(iter==list.end()) - { - error(element, "Undefined value in "); - continue; - } - - if((*iter)->get_name()!="real") - { - error_unexpected_element((*iter),(*iter)->get_name(),"real"); - continue; - } - - ret.set_origin(parse_real(dynamic_cast(*iter))); - } - else - error_unexpected_element(child,child->get_name()); - } - return ret; -} - -Angle -CanvasParser::parse_angle(xmlpp::Element *element) -{ - assert(element->get_name()=="angle"); - - if(!element->get_children().empty()) - warning(element, strprintf(_("<%s> should not contain anything"),"angle")); - - if(!element->get_attribute("value")) - { - error(element,strprintf(_("<%s> is missing \"value\" attribute"),"angle")); - return Angle(); - } - - string val=element->get_attribute("value")->get_value(); - - return Angle::deg(atof(val.c_str())); -} - -ValueBase -CanvasParser::parse_value(xmlpp::Element *element,Canvas::Handle canvas) -{ - if(element->get_name()=="real") - return parse_real(element); - else - if(element->get_name()=="time") - return parse_time(element,canvas); - else - if(element->get_name()=="integer") - return parse_integer(element); - else - if(element->get_name()=="string") - return parse_string(element); - else - if(element->get_name()=="vector") - return parse_vector(element); - else - if(element->get_name()=="color") - return parse_color(element); - else - if(element->get_name()=="segment") - return parse_segment(element); - else - if(element->get_name()=="list") - return parse_list(element,canvas); - else - if(element->get_name()=="gradient") - return parse_gradient(element); - else - if(element->get_name()=="bool") - return parse_bool(element); - else - //if(element->get_name()=="canvas") - // return parse_canvas(element,canvas,true); // inline canvas - //else - if(element->get_name()=="angle" || element->get_name()=="degrees" || element->get_name()=="radians" || element->get_name()=="rotations") - return parse_angle(element); - else - if(element->get_name()=="bline_point") - return parse_bline_point(element); - else - if(element->get_name()=="canvas") - return ValueBase(parse_canvas(element,canvas,true)); - else - { - error_unexpected_element(element,element->get_name()); - } - - return ValueBase(); -} - - - - -ValueNode_Animated::Handle -CanvasParser::parse_animated(xmlpp::Element *element,Canvas::Handle canvas) -{ - assert(element->get_name()=="hermite" || element->get_name()=="animated"); - - if(!element->get_attribute("type")) - { - error(element,"Missing attribute \"type\" in "); - return ValueNode_Animated::Handle(); - } - - ValueBase::Type type=ValueBase::ident_type(element->get_attribute("type")->get_value()); - - if(!type) - { - error(element,"Bad type in "); - return ValueNode_Animated::Handle(); - } - - ValueNode_Animated::Handle value_node=ValueNode_Animated::create(type); - - if(!value_node) - { - error(element,strprintf(_("Unable to create with type \"%s\""),ValueBase::type_local_name(type).c_str())); - return ValueNode_Animated::Handle(); - } - - value_node->set_root_canvas(canvas->get_root()); - - xmlpp::Element::NodeList list = element->get_children(); - for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) - { - xmlpp::Element *child(dynamic_cast(*iter)); - if(!child) - continue; - else - if(child->get_name()=="waypoint") - { - if(!child->get_attribute("time")) - { - error(child,_(" is missing attribute \"time\"")); - continue; - } - - Time time(child->get_attribute("time")->get_value(),canvas->rend_desc().get_frame_rate()); - - - ValueNode::Handle waypoint_value_node; - xmlpp::Element::NodeList list = child->get_children(); - - if(child->get_attribute("use")) - { - if(!list.empty()) - warning(child,_("Found \"use\" attribute for , but it wasn't empty. Ignoring contents...")); - - // the waypoint might look like this, in which case we won't find "mycanvas" in the list of valuenodes, 'cos it's a canvas - // - // - // - // - if (type==ValueBase::TYPE_CANVAS) - { - String warnings; - waypoint_value_node=ValueNode_Const::create(canvas->surefind_canvas(child->get_attribute("use")->get_value(), warnings)); - warnings_text += warnings; - } - else - waypoint_value_node=canvas->surefind_value_node(child->get_attribute("use")->get_value()); - } - else - { - if(child->get_children().empty()) - { - error(child, strprintf(_("<%s> is missing its data"),"waypoint")); - continue; - } - - xmlpp::Element::NodeList::iterator iter; - - // Search for the first non-text XML element - for(iter = list.begin(); iter != list.end(); ++iter) - if(dynamic_cast(*iter)) break; - - if(iter==list.end()) - { - error(child, strprintf(_("<%s> is missing its data"),"waypoint")); - continue; - } - - waypoint_value_node=parse_value_node(dynamic_cast(*iter),canvas); - - /* - ValueBase data=parse_value(dynamic_cast(*iter),canvas); - - if(!data.is_valid()) - { - error(child,_("Bad data for ")); - continue; - } - */ - if(!waypoint_value_node) - { - error(child,_("Bad data for ")); - continue; - } - - /*! HACK -- This is a temporary fix to help repair some - ** weirdness that is currently going on (10-21-2004). - ** This short circuits the linking of waypoints, - ** a feature which is so obscure that we can get - ** away with something like this pretty easily. - */ - waypoint_value_node=waypoint_value_node->clone(); - - // Warn if there is trash after the param value - for(iter++; iter != list.end(); ++iter) - if(dynamic_cast(*iter)) - warning((*iter),strprintf(_("Unexpected element <%s> after data, ignoring..."),(*iter)->get_name().c_str())); - } - - - try { - ValueNode_Animated::WaypointList::iterator waypoint=value_node->new_waypoint(time,waypoint_value_node); - - if(child->get_attribute("tension")) - { - synfig::String str(child->get_attribute("tension")->get_value()); - waypoint->set_tension(atof(str.c_str())); - } - if(child->get_attribute("temporal-tension")) - { - synfig::String str(child->get_attribute("temporal-tension")->get_value()); - waypoint->set_temporal_tension(atof(str.c_str())); - } - if(child->get_attribute("continuity")) - { - synfig::String str(child->get_attribute("continuity")->get_value()); - waypoint->set_continuity(atof(str.c_str())); - } - if(child->get_attribute("bias")) - { - synfig::String str(child->get_attribute("bias")->get_value()); - waypoint->set_bias(atof(str.c_str())); - } - - if(child->get_attribute("before")) - { - string val=child->get_attribute("before")->get_value(); - if(val=="halt") - waypoint->set_before(INTERPOLATION_HALT); - else if(val=="constant") - waypoint->set_before(INTERPOLATION_CONSTANT); - else if(val=="linear") - waypoint->set_before(INTERPOLATION_LINEAR); - else if(val=="manual") - waypoint->set_before(INTERPOLATION_MANUAL); - else if(val=="auto") - waypoint->set_before(INTERPOLATION_TCB); - else - error(child,strprintf(_("\"%s\" not a valid value for attribute \"%s\" in <%s>"),val.c_str(),"before","waypoint")); - } - - if(child->get_attribute("after")) - { - string val=child->get_attribute("after")->get_value(); - if(val=="halt") - waypoint->set_after(INTERPOLATION_HALT); - else if(val=="constant") - waypoint->set_after(INTERPOLATION_CONSTANT); - else if(val=="linear") - waypoint->set_after(INTERPOLATION_LINEAR); - else if(val=="manual") - waypoint->set_after(INTERPOLATION_MANUAL); - else if(val=="auto") - waypoint->set_after(INTERPOLATION_TCB); - else - error(child,strprintf(_("\"%s\" not a valid value for attribute \"%s\" in <%s>"),val.c_str(),"before","waypoint")); - } - } - catch(Exception::BadTime x) - { - warning(child,x.what()); - } - continue; - - } - else - error_unexpected_element(child,child->get_name()); - } - - // in canvas version 0.1, angles used to wrap, so to get from -179 - // degrees to 180 degrees meant a 1 degree change - // in canvas version 0.2 they don't, so that's a 359 degree change - - // when loading a version 0.1 canvas, modify constant angle - // waypoints to that they are within 180 degrees of the previous - // waypoint's value - if (type == ValueBase::TYPE_ANGLE) - { - if (canvas->get_version() == "0.1") - { - bool first = true; - Real angle, prev = 0; - WaypointList &wl = value_node->waypoint_list(); - for (WaypointList::iterator iter = wl.begin(); iter != wl.end(); iter++) - { - angle = Angle::deg(iter->get_value(iter->get_time()).get(Angle())).get(); - if (first) - first = false; - else if (iter->get_value_node()->get_name() == "constant") - { - if (angle - prev > 180) - { - while (angle - prev > 180) angle -= 360; - iter->set_value(Angle::deg(angle)); - } - else if (prev - angle > 180) - { - while (prev - angle > 180) angle += 360; - iter->set_value(Angle::deg(angle)); - } - } - prev = angle; - } - } - } - - value_node->changed(); - return value_node; -} - -etl::handle -CanvasParser::parse_linkable_value_node(xmlpp::Element *element,Canvas::Handle canvas) -{ - // Determine the type - if(!element->get_attribute("type")) - { - error(element, strprintf(_("Missing attribute \"type\" in <%s>"), element->get_name().c_str())); - return 0; - } - - ValueBase::Type type=ValueBase::ident_type(element->get_attribute("type")->get_value()); - - if(!type) - { - error(element, strprintf(_("Bad type in <%s>"), element->get_name().c_str())); - return 0; - } - - handle value_node=LinkableValueNode::create(element->get_name(),type); - handle c[value_node->link_count()]; - - if(!value_node) - { - error(element, strprintf(_("Error creating ValueNode <%s> with type '%s'. Refer to '%s'"), - element->get_name().c_str(), - ValueBase::type_local_name(type).c_str(), - VALUENODE_COMPATIBILITY_URL)); - return 0; - } - - if(value_node->get_type()!=type) - { - error(element, strprintf(_("<%s> did not accept type '%s'"), - element->get_name().c_str(), - ValueBase::type_local_name(type).c_str())); - return 0; - } - - value_node->set_root_canvas(canvas->get_root()); - - // handle exported valuenodes - { - int index; - String id, name; - xmlpp::Element::AttributeList attrib_list(element->get_attributes()); - for(xmlpp::Element::AttributeList::iterator iter = attrib_list.begin(); iter != attrib_list.end(); iter++) - { - name = (*iter)->get_name(); - id = (*iter)->get_value(); - - if (name == "guid" || name == "id" || name == "type") - continue; - - try { - index = value_node->get_link_index_from_name(name); - - if(c[index]) - { - error(element,strprintf(_("'%s' was already defined in <%s>"), - name.c_str(), - element->get_name().c_str())); - continue; - } - - c[index] = canvas->surefind_value_node(id); - - if (!c[index]) - { - error(element, strprintf(_("'%s' attribute in <%s> references unknown ID '%s'"), - name.c_str(), - element->get_name().c_str(), - id.c_str())); - continue; - } - - if(!value_node->set_link(index, c[index])) - { - error(element, strprintf(_("Unable to set link '\"%s\" to ValueNode \"%s\" (link #%d in \"%s\")"), - value_node->link_name(index).c_str(), - id.c_str(), - index, - element->get_name().c_str())); - continue; - } - - // printf(" <%s> set link %d (%s) using exported value\n", element->get_name().c_str(), index, name.c_str()); - } - catch (Exception::BadLinkName) - { - warning(element, strprintf("Bad link name '%s'", name.c_str())); - } - catch(Exception::IDNotFound) - { - error(element,"Unable to resolve " + id); - } - catch(Exception::FileNotFound) - { - error(element,"Unable to open file referenced in " + id); - } - catch(...) - { - error(element,strprintf(_("Unknown Exception thrown when referencing ValueNode \"%s\""), id.c_str())); - throw; - } - } - } - - // handle inline valuenodes - { - int index; - String child_name; - xmlpp::Element::NodeList list = element->get_children(); - for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) - { - xmlpp::Element *child(dynamic_cast(*iter)); - try - { - if(!child) - continue; - - child_name = child->get_name(); - - index = value_node->get_link_index_from_name(child_name); - - if(c[index]) - { - error(child, strprintf(_("'%s' was already defined in <%s>"), - child_name.c_str(), - element->get_name().c_str())); - break; - } - - xmlpp::Element::NodeList list = child->get_children(); - xmlpp::Element::NodeList::iterator iter; - - // Search for the first non-text XML element - for(iter = list.begin(); iter != list.end(); ++iter) - if(dynamic_cast(*iter)) break; - - if(iter==list.end()) - { - error(child,strprintf(_("element <%s> is missing its contents"), - child_name.c_str())); - continue; - } - - c[index]=parse_value_node(dynamic_cast(*iter),canvas); - - if(!c[index]) - { - error((*iter),strprintf(_("Parse of '%s' failed"), - child_name.c_str())); - continue; - } - - if(!value_node->set_link(index,c[index])) - { - error(child,strprintf(_("Unable to connect value node ('%s' of type '%s') to link %d (%s)"), - c[index]->get_name().c_str(), - ValueBase::type_local_name(c[index]->get_type()).c_str(), - index, - value_node->link_name(index).c_str())); - continue; - } - - // \todo do a search for more elements and warn if they are found - - // printf(" <%s> set link %d (%s) using inline value\n", element->get_name().c_str(), index, child_name.c_str()); - } - catch(Exception::BadLinkName) - { - warning(child, strprintf("Bad link name for <%s>", element->get_name().c_str())); - } - catch(...) - { - error(child, strprintf(_("Unknown Exception thrown when working on element \"%s\""),child_name.c_str())); - throw; - } - } - } - - String version(canvas->get_version()); - for (int i = 0; i < value_node->link_count(); i++) - { - if (!c[i]) - { - // the 'width' parameter of wasn't always present in version 0.1 canvases - if (version == "0.1" && element->get_name() == "stripes" && value_node->link_name(i) == "width") - continue; - - // these 3 blinecalctangent parameters didn't appear until canvas version 0.5 - if ((version == "0.1" || version == "0.2" || version == "0.3" || version == "0.4") && - element->get_name() == "blinecalctangent" && - (value_node->link_name(i) == "offset" || - value_node->link_name(i) == "scale" || - value_node->link_name(i) == "fixed_length")) - continue; - - // 'scale' was added while canvas version 0.5 was in use - if ((version == "0.3" || version == "0.4" || version == "0.5") && - element->get_name() == "blinecalcwidth" && - value_node->link_name(i) == "scale") - continue; - - // 'loop' was added while canvas version 0.5 was in use, as was the 'gradientcolor' node type - if (version == "0.5" && - element->get_name() == "gradientcolor" && - value_node->link_name(i) == "loop") - continue; - - // 'loop' was added while canvas version 0.6 was in use; the 'random' node was added back when 0.1 was in use - if ((version == "0.1" || version == "0.2" || version == "0.3" || version == "0.4" || version == "0.5" || version == "0.6") && - element->get_name() == "random" && - value_node->link_name(i) == "loop") - continue; - - error(element, strprintf(_("<%s> is missing link %d (%s)"), - element->get_name().c_str(), - i, - value_node->link_name(i).c_str())); - return 0; - } - } - - // pre 0.4 canvases had *calctangent outputs scaled down by 0.5 for some reason - if (element->get_name() == "blinecalctangent" || element->get_name() == "segcalctangent") - { - if (version == "0.1" || version == "0.2" || version == "0.3") - { - handle scale_value_node=LinkableValueNode::create("scale",type); - scale_value_node->set_link(scale_value_node->get_link_index_from_name("link"), value_node); - scale_value_node->set_link(scale_value_node->get_link_index_from_name("scalar"), ValueNode_Const::create(Real(0.5))); - value_node = scale_value_node; - } - } - - return value_node; -} - -// This will also parse a bline -handle -CanvasParser::parse_dynamic_list(xmlpp::Element *element,Canvas::Handle canvas) -{ - assert(element->get_name()=="dynamic_list" || element->get_name()=="bline"); - - const float fps(canvas?canvas->rend_desc().get_frame_rate():0); - - if(!element->get_attribute("type")) - { - error(element,"Missing attribute \"type\" in "); - return handle(); - } - - ValueBase::Type type=ValueBase::ident_type(element->get_attribute("type")->get_value()); - - if(!type) - { - error(element,"Bad type in "); - return handle(); - } - - handle value_node; - handle bline_value_node; - - if(element->get_name()=="bline") - { - value_node=bline_value_node=ValueNode_BLine::create(); - if(element->get_attribute("loop")) - { - String loop=element->get_attribute("loop")->get_value(); - if(loop=="true" || loop=="1" || loop=="TRUE" || loop=="True") - bline_value_node->set_loop(true); - else - bline_value_node->set_loop(false); - } - - } - else - value_node=ValueNode_DynamicList::create(type); - - if(!value_node) - { - error(element,strprintf(_("Unable to create "))); - return handle(); - } - - value_node->set_root_canvas(canvas->get_root()); - - xmlpp::Element::NodeList list = element->get_children(); - for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) - { - xmlpp::Element *child(dynamic_cast(*iter)); - if(!child) - continue; - else - if(child->get_name()=="entry") - { - ValueNode_DynamicList::ListEntry list_entry; - - // Parse begin/end waypoints - { - typedef synfig::ValueNode_DynamicList::ListEntry::Activepoint Activepoint; - typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; - - String begin_sequence; - String end_sequence; - - ActivepointList &timing_info(list_entry.timing_info); - - if(child->get_attribute("begin")) - begin_sequence=child->get_attribute("begin")->get_value(); - - if(child->get_attribute("on")) - begin_sequence=child->get_attribute("on")->get_value(); - - if(child->get_attribute("end")) - end_sequence=child->get_attribute("end")->get_value(); - - if(child->get_attribute("off")) - end_sequence=child->get_attribute("off")->get_value(); - - // clear out any auto-start - if(!begin_sequence.empty()) - timing_info.clear(); - - //! \optimize - while(!begin_sequence.empty()) - { - String::iterator iter(find(begin_sequence.begin(),begin_sequence.end(),',')); - String timecode(begin_sequence.begin(), iter); - int priority=0; - - // skip whitespace before checking for a priority - while (isspace(timecode[0])) - timecode=timecode.substr(1); - - // If there is a priority, then grab it and remove - // it from the timecode - if(timecode[0]=='p') - { - //priority=timecode[1]-'0'; - //timecode=String(timecode.begin()+3,timecode.end()); - int space=timecode.find_first_of(' '); - priority=atoi(String(timecode,1,space-1).c_str()); - timecode=String(timecode.begin()+space+1,timecode.end()); - //synfig::info("priority: %d timecode: %s",priority,timecode.c_str()); - } - - timing_info.push_back( - Activepoint( - Time( - timecode, - fps - ), - true, // Mark as a "on" activepoint - priority - ) - ); - - if(iter==begin_sequence.end()) - begin_sequence.clear(); - else - begin_sequence=String(iter+1,begin_sequence.end()); - } - - //! \optimize - while(!end_sequence.empty()) - { - String::iterator iter(find(end_sequence.begin(),end_sequence.end(),',')); - String timecode(end_sequence.begin(), iter); - int priority=0; - - // skip whitespace before checking for a priority - while (isspace(timecode[0])) - timecode=timecode.substr(1); - - // If there is a priority, then grab it and remove - // it from the timecode - if(timecode[0]=='p') - { - //priority=timecode[1]-'0'; - //timecode=String(timecode.begin()+3,timecode.end()); - int space=timecode.find_first_of(' '); - priority=atoi(String(timecode,1,space-1).c_str()); - timecode=String(timecode.begin()+space+1,timecode.end()); - //synfig::info("priority: %d timecode: %s",priority,timecode.c_str()); - } - - timing_info.push_back( - Activepoint( - Time( - timecode, - fps - ), - false, // Mark as a "off" activepoint - priority - ) - ); - if(iter==end_sequence.end()) - end_sequence.clear(); - else - end_sequence=String(iter+1,end_sequence.end()); - } - - timing_info.sort(); - } - - if(child->get_attribute("use")) - { - // \todo does this need to be able to read 'use="canvas"', like waypoints can now? (see 'surefind_canvas' in this file) - string id=child->get_attribute("use")->get_value(); - try - { - list_entry.value_node=canvas->surefind_value_node(id); - } - catch(Exception::IDNotFound) - { - error(child,"\"use\" attribute in references unknown ID -- "+id); - continue; - } - } - else - { - xmlpp::Element::NodeList list = child->get_children(); - xmlpp::Element::NodeList::iterator iter; - - // Search for the first non-text XML element - for(iter = list.begin(); iter != list.end(); ++iter) - if(dynamic_cast(*iter)) break; - - if(iter==list.end()) - { - error(child,strprintf(_(" is missing its contents or missing \"use\" element"))); - continue; - } - - list_entry.value_node=parse_value_node(dynamic_cast(*iter),canvas); - - if(!list_entry.value_node) - error((*iter),"Parse of ValueNode failed"); - - // \todo do a search for more elements and warn if they are found - - } - - value_node->add(list_entry); - value_node->set_link(value_node->link_count()-1,list_entry.value_node); - } - else - error_unexpected_element(child,child->get_name()); - } - return value_node; -} - -handle -CanvasParser::parse_value_node(xmlpp::Element *element,Canvas::Handle canvas) -{ - handle value_node; - assert(element); - - GUID guid; - - if(element->get_attribute("guid")) - { - guid=GUID(element->get_attribute("guid")->get_value())^canvas->get_root()->get_guid(); - value_node=guid_cast(guid); - if(value_node) - return value_node; - } - - // If ValueBase::ident_type() recognizes the name, then we know it's a ValueBase - if(element->get_name()!="canvas" && ValueBase::ident_type(element->get_name())) - { - ValueBase data=parse_value(element,canvas); - - if(!data.is_valid()) - { - error(element,strprintf(_("Bad data in <%s>"),element->get_name().c_str())); - return value_node; - } - - // We want to convert this ValueBase into a - // ValueNode_Const. That way, we can treat the - // ID like any other Datanode. Think of this - // as a shorthand for creating constant ValueNodes. - - value_node=ValueNode_Const::create(data); - } - else - if(element->get_name()=="hermite" || element->get_name()=="animated") - value_node=parse_animated(element,canvas); - else - if(element->get_name()=="dynamic_list") - value_node=parse_dynamic_list(element,canvas); - else - if(element->get_name()=="bline") // This is not a typo. The dynamic list parser will parse a bline. - value_node=parse_dynamic_list(element,canvas); - else - if(LinkableValueNode::book().count(element->get_name())) - { - value_node=parse_linkable_value_node(element,canvas); - if (!value_node) value_node = PlaceholderValueNode::create(); - } - else - if(element->get_name()=="canvas") - value_node=ValueNode_Const::create(parse_canvas(element,canvas,true)); - else - { - error_unexpected_element(element,element->get_name()); - error(element, strprintf(_("Expected a ValueNode. Refer to '%s'"), - VALUENODE_COMPATIBILITY_URL)); - value_node=PlaceholderValueNode::create(); - } - - value_node->set_root_canvas(canvas->get_root()); - - // If we were successful, and our element has - // an ID attribute, go ahead and add it to the - // value_node list - if(value_node && element->get_attribute("id")) - { - string id=element->get_attribute("id")->get_value(); - - //value_node->set_id(id); - - // If there is already a value_node in the list - // with the same ID, then that is an error - try { canvas->add_value_node(value_node,id); } - catch(Exception::BadLinkName) - { - warning(element,strprintf(_("Bad ID \"%s\""),id.c_str())); - return value_node; - } - catch(Exception::IDAlreadyExists) - { - error(element,strprintf(_("Duplicate ID \"%s\""),id.c_str())); - return value_node; - } - catch(...) - { - error(element,strprintf(_("Unknown Exception thrown when adding ValueNode \"%s\""),id.c_str())); - throw; - } - } - value_node->set_guid(guid); - return value_node; -} - -void -CanvasParser::parse_canvas_defs(xmlpp::Element *element,Canvas::Handle canvas) -{ - assert(element->get_name()=="defs"); - xmlpp::Element::NodeList list = element->get_children(); - for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) - { - xmlpp::Element *child(dynamic_cast(*iter)); - if(!child) - continue; - else - if(child->get_name()=="canvas") - parse_canvas(child, canvas); - else - parse_value_node(child,canvas); - } -} - -Layer::Handle -CanvasParser::parse_layer(xmlpp::Element *element,Canvas::Handle canvas) -{ - - assert(element->get_name()=="layer"); - Layer::Handle layer; - - if(!element->get_attribute("type")) - { - error(element,_("Missing \"type\" attribute to \"layer\" element")); - return Layer::Handle(); - } - - layer=Layer::create(element->get_attribute("type")->get_value()); - layer->set_canvas(canvas); - - if(element->get_attribute("group")) - { - layer->add_to_group( - element->get_attribute("group")->get_value() - ); - } - - // Handle the version attribute - if(element->get_attribute("version")) - { - String version(element->get_attribute("version")->get_value()); - if(version>layer->get_version()) - warning(element,_("Installed layer version is smaller than layer version in file")); - if(version!=layer->get_version()) - layer->set_version(version); - } - - // Handle the description - if(element->get_attribute("desc")) - layer->set_description(element->get_attribute("desc")->get_value()); - - if(element->get_attribute("active")) - layer->set_active(element->get_attribute("active")->get_value()=="false"?false:true); - - xmlpp::Element::NodeList list = element->get_children(); - for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) - { - xmlpp::Element *child(dynamic_cast(*iter)); - if(!child) - continue; - else - if(child->get_name()=="name") - warning(child,_(" entry for is not yet supported. Ignoring...")); - else - if(child->get_name()=="desc") - warning(child,_(" entry for is not yet supported. Ignoring...")); - else - if(child->get_name()=="param") - { - xmlpp::Element::NodeList list = child->get_children(); - - if(!child->get_attribute("name")) - { - error(child,_("Missing \"name\" attribute for .")); - continue; - } - - String param_name=child->get_attribute("name")->get_value(); - - // SVN r2013 and r2014 renamed all 'pos' and 'offset' parameters to 'origin' - // 'pos' and 'offset' will appear in old .sif files; handle them correctly - if (param_name == "pos" || param_name == "offset") - param_name = "origin"; - - if(child->get_attribute("use")) - { - // If the "use" attribute is used, then the - // element should be empty. Warn the user if - // we find otherwise. - if(!list.empty()) - warning(child,_("Found \"use\" attribute for , but it wasn't empty. Ignoring contents...")); - - String str= child->get_attribute("use")->get_value(); - - if (str.empty()) - error(child,_("Empty use=\"\" value in ")); - else if(layer->get_param(param_name).get_type()==ValueBase::TYPE_CANVAS) - { - String warnings; - Canvas::Handle c(canvas->surefind_canvas(str, warnings)); - warnings_text += warnings; - if(!c) error((*iter),strprintf(_("Failed to load subcanvas '%s'"), str.c_str())); - if(!layer->set_param(param_name,c)) - error((*iter),_("Layer rejected canvas link")); - } - else - try - { - handle value_node=canvas->surefind_value_node(str); - - // Assign the value_node to the dynamic parameter list - if (param_name == "segment_list" && (layer->get_name() == "region" || layer->get_name() == "outline")) - { - synfig::warning("%s: Updated valuenode connection to use the \"bline\" parameter instead of \"segment_list\".", - layer->get_name().c_str()); - param_name = "bline"; - } - layer->connect_dynamic_param(param_name,value_node); - } - catch(Exception::IDNotFound) - { - error(child,strprintf(_("Unknown ID (%s) referenced in "),str.c_str())); - } - - continue; - } - - xmlpp::Element::NodeList::iterator iter; - - // Search for the first non-text XML element - for(iter = list.begin(); iter != list.end(); ++iter) - if(dynamic_cast(*iter)) - break; - //if(!(!dynamic_cast(*iter) && (*iter)->get_name()=="text"||(*iter)->get_name()=="comment" )) break; - - if(iter==list.end()) - { - error(child,_(" is either missing its contents, or missing a \"use\" attribute.")); - continue; - } - - // If we recognize the element name as a - // ValueBase, then treat is at one - if(/*(*iter)->get_name()!="canvas" && */ValueBase::ident_type((*iter)->get_name()) && !dynamic_cast(*iter)->get_attribute("guid")) - { - ValueBase data=parse_value(dynamic_cast(*iter),canvas); - - if(!data.is_valid()) - { - error((*iter),_("Bad data for ")); - continue; - } - - // Set the layer's parameter, and make sure that - // the layer liked it - if(!layer->set_param(param_name,data)) - { - warning((*iter),strprintf(_("Layer '%s' rejected value for parameter '%s'"), - element->get_attribute("type")->get_value().c_str(), - param_name.c_str())); - continue; - } - } - else // ... otherwise, we assume that it is a ValueNode - { - handle value_node=parse_value_node(dynamic_cast(*iter),canvas); - - if(!value_node) - { - error((*iter),_("Bad data for ")); - continue; - } - - // Assign the value_node to the dynamic parameter list - layer->connect_dynamic_param(param_name,value_node); - } - - // Warn if there is trash after the param value - for(iter++; iter != list.end(); ++iter) - if(dynamic_cast(*iter)) - warning((*iter),strprintf(_("Unexpected element <%s> after data, ignoring..."),(*iter)->get_name().c_str())); - continue; - } - else - error_unexpected_element(child,child->get_name()); - } - - layer->reset_version(); - return layer; -} - -Canvas::Handle -CanvasParser::parse_canvas(xmlpp::Element *element,Canvas::Handle parent,bool inline_, String filename) -{ - - if(element->get_name()!="canvas") - { - error_unexpected_element(element,element->get_name(),"canvas"); - return Canvas::Handle(); - } - Canvas::Handle canvas; - - - - if(parent && (element->get_attribute("id") || inline_)) - { - if(inline_) - { - canvas=Canvas::create_inline(parent); - } - else - { - try - { - String warnings; - canvas=parent->find_canvas(element->get_attribute("id")->get_value(), warnings); - warnings_text += warnings; - } - catch(...) - { - canvas=parent->new_child_canvas(element->get_attribute("id")->get_value()); - } - } - canvas->rend_desc().clear_flags(); - } - else - { - canvas=Canvas::create(); - if(filename=="/dev/stdin") - canvas->set_file_name("./stdin.sif"); - else - canvas->set_file_name(filename); - canvas->rend_desc().clear_flags(); - } - - if(element->get_attribute("guid")) - { - GUID guid(element->get_attribute("guid")->get_value()); - if(guid_cast(guid)) - return guid_cast(guid); - else - canvas->set_guid(guid); - } - - if(element->get_attribute("version")) - canvas->set_version(element->get_attribute("version")->get_value()); - else if(parent) - canvas->set_version(parent->get_version()); - - if(element->get_attribute("width")) - { - int width = atoi(element->get_attribute("width")->get_value().c_str()); - if (width < 1) - fatal_error(element, _("Canvas with width or height less than one is not allowed")); - canvas->rend_desc().set_w(width); - } - - if(element->get_attribute("height")) - { - int height = atoi(element->get_attribute("height")->get_value().c_str()); - if (height < 1) - fatal_error(element, _("Canvas with width or height less than one is not allowed")); - canvas->rend_desc().set_h(height); - } - - if(element->get_attribute("xres")) - canvas->rend_desc().set_x_res(atof(element->get_attribute("xres")->get_value().c_str())); - - if(element->get_attribute("yres")) - canvas->rend_desc().set_y_res(atof(element->get_attribute("yres")->get_value().c_str())); - - - if(element->get_attribute("fps")) - canvas->rend_desc().set_frame_rate(atof(element->get_attribute("fps")->get_value().c_str())); - - if(element->get_attribute("start-time")) - canvas->rend_desc().set_time_start(Time(element->get_attribute("start-time")->get_value(),canvas->rend_desc().get_frame_rate())); - - if(element->get_attribute("begin-time")) - canvas->rend_desc().set_time_start(Time(element->get_attribute("begin-time")->get_value(),canvas->rend_desc().get_frame_rate())); - - if(element->get_attribute("end-time")) - canvas->rend_desc().set_time_end(Time(element->get_attribute("end-time")->get_value(),canvas->rend_desc().get_frame_rate())); - - if(element->get_attribute("antialias")) - canvas->rend_desc().set_antialias(atoi(element->get_attribute("antialias")->get_value().c_str())); - - if(element->get_attribute("view-box")) - { - string values=element->get_attribute("view-box")->get_value(); - Vector - tl, - br; - tl[0]=atof(string(values.data(),values.find(' ')).c_str()); - values=string(values.begin()+values.find(' ')+1,values.end()); - tl[1]=atof(string(values.data(),values.find(' ')).c_str()); - values=string(values.begin()+values.find(' ')+1,values.end()); - br[0]=atof(string(values.data(),values.find(' ')).c_str()); - values=string(values.begin()+values.find(' ')+1,values.end()); - br[1]=atof(values.c_str()); - - canvas->rend_desc().set_tl(tl); - canvas->rend_desc().set_br(br); - } - - if(element->get_attribute("bgcolor")) - { - string values=element->get_attribute("bgcolor")->get_value(); - Color bg; - - bg.set_r(atof(string(values.data(),values.find(' ')).c_str())); - values=string(values.begin()+values.find(' ')+1,values.end()); - - bg.set_g(atof(string(values.data(),values.find(' ')).c_str())); - values=string(values.begin()+values.find(' ')+1,values.end()); - - bg.set_b(atof(string(values.data(),values.find(' ')).c_str())); - values=string(values.begin()+values.find(' ')+1,values.end()); - - bg.set_a(atof(values.c_str())); - - canvas->rend_desc().set_bg_color(bg); - } - - if(element->get_attribute("focus")) - { - string values=element->get_attribute("focus")->get_value(); - Vector focus; - - focus[0]=atof(string(values.data(),values.find(' ')).c_str()); - values=string(values.begin()+values.find(' ')+1,values.end()); - focus[1]=atof(values.c_str()); - - canvas->rend_desc().set_focus(focus); - } - - canvas->rend_desc().set_flags(RendDesc::PX_ASPECT|RendDesc::IM_SPAN); - - xmlpp::Element::NodeList list = element->get_children(); - for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) - { - xmlpp::Element *child(dynamic_cast(*iter)); - if(child) - { - if(child->get_name()=="defs") - { - if(canvas->is_inline()) - error(child,_("Inline canvas cannot have a section")); - parse_canvas_defs(child, canvas); - } - else - if(child->get_name()=="keyframe") - { - if(canvas->is_inline()) - { - warning(child,_("Inline canvas cannot have keyframes")); - continue; - } - - canvas->keyframe_list().add(parse_keyframe(child,canvas)); - canvas->keyframe_list().sync(); - } - else - if(child->get_name()=="meta") - { - if(canvas->is_inline()) - { - warning(child,_("Inline canvases cannot have metadata")); - continue; - } - - String name,content; - - if(!child->get_attribute("name")) - { - warning(child,_(" must have a name")); - continue; - } - - if(!child->get_attribute("content")) - { - warning(child,_(" must have content")); - continue; - } - - canvas->set_meta_data(child->get_attribute("name")->get_value(),child->get_attribute("content")->get_value()); - } - else if(child->get_name()=="name") - { - xmlpp::Element::NodeList list = child->get_children(); - - // If we don't have any name, warn - if(list.empty()) - warning(child,_("blank \"name\" entity")); - - string tmp; - for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) - if(dynamic_cast(*iter))tmp+=dynamic_cast(*iter)->get_content(); - canvas->set_name(tmp); - } - else - if(child->get_name()=="desc") - { - - xmlpp::Element::NodeList list = child->get_children(); - - // If we don't have any description, warn - if(list.empty()) - warning(child,_("blank \"desc\" entity")); - - string tmp; - for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) - if(dynamic_cast(*iter))tmp+=dynamic_cast(*iter)->get_content(); - canvas->set_description(tmp); - } - else - if(child->get_name()=="author") - { - - xmlpp::Element::NodeList list = child->get_children(); - - // If we don't have any description, warn - if(list.empty()) - warning(child,_("blank \"author\" entity")); - - string tmp; - for(xmlpp::Element::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter) - if(dynamic_cast(*iter))tmp+=dynamic_cast(*iter)->get_content(); - canvas->set_author(tmp); - } - else - if(child->get_name()=="layer") - { - //if(canvas->is_inline()) - // canvas->push_front(parse_layer(child,canvas->parent())); - //else - canvas->push_front(parse_layer(child,canvas)); - } - else - error_unexpected_element(child,child->get_name()); - } -// else -// if((child->get_name()=="text"||child->get_name()=="comment") && child->has_child_text()) -// continue; - } - - if(canvas->value_node_list().placeholder_count()) - { - String nodes; - for (ValueNodeList::const_iterator iter = canvas->value_node_list().begin(); iter != canvas->value_node_list().end(); iter++) - if(PlaceholderValueNode::Handle::cast_dynamic(*iter)) - { - if (nodes != "") nodes += ", "; - nodes += "'" + (*iter)->get_id() + "'"; - } - error(element,strprintf(_("Canvas '%s' has undefined %s: %s"), - canvas->get_id().c_str(), - canvas->value_node_list().placeholder_count() == 1 ? _("ValueNode") : _("ValueNodes"), - nodes.c_str())); - } - - canvas->set_version(CURRENT_CANVAS_VERSION); - return canvas; -} - -void -CanvasParser::register_canvas_in_map(Canvas::Handle canvas, String as) -{ - get_open_canvas_map()[etl::absolute_path(as)]=canvas; - canvas->signal_deleted().connect(sigc::bind(sigc::ptr_fun(_remove_from_open_canvas_map),canvas.get())); - canvas->signal_file_name_changed().connect(sigc::bind(sigc::ptr_fun(_canvas_file_name_changed),canvas.get())); -} - -#ifdef _DEBUG -void -CanvasParser::show_canvas_map(String file, int line, String text) -{ - return; - printf(" .-----\n | %s:%d %s\n", file.c_str(), line, text.c_str()); - std::map > canvas_map(synfig::get_open_canvas_map()); - std::map >::iterator iter; - for (iter = canvas_map.begin(); iter != canvas_map.end(); iter++) - { - synfig::String first(iter->first); - etl::loose_handle second(iter->second); - printf(" | %40s : %lx (%d)\n", first.c_str(), ulong(&*second), second->count()); - } - printf(" `-----\n\n"); -} -#endif // _DEBUG - -Canvas::Handle -CanvasParser::parse_from_file_as(const String &file_,const String &as_,String &errors) -{ - ChangeLocale change_locale(LC_NUMERIC, "C"); - String file(unix_to_local_path(file_)); - String as(unix_to_local_path(as_)); - - try - { - if(get_open_canvas_map().count(etl::absolute_path(as))) - return get_open_canvas_map()[etl::absolute_path(as)]; - - filename=as; - total_warnings_=0; - xmlpp::DomParser parser(file); - if(parser) - { - Canvas::Handle canvas(parse_canvas(parser.get_document()->get_root_node(),0,false,as)); - if (!canvas) return canvas; - register_canvas_in_map(canvas, as); - - const ValueNodeList& value_node_list(canvas->value_node_list()); - - again: - ValueNodeList::const_iterator iter; - for(iter=value_node_list.begin();iter!=value_node_list.end();++iter) - { - ValueNode::Handle value_node(*iter); - if(value_node->is_exported() && value_node->get_id().find("Unnamed")==0) - { - canvas->remove_value_node(value_node); - goto again; - } - } - - return canvas; - } - } - catch(Exception::BadLinkName) { synfig::error("BadLinkName Thrown"); } - catch(Exception::BadType) { synfig::error("BadType Thrown"); } - catch(Exception::FileNotFound) { synfig::error("FileNotFound Thrown"); } - catch(Exception::IDNotFound) { synfig::error("IDNotFound Thrown"); } - catch(Exception::IDAlreadyExists) { synfig::error("IDAlreadyExists Thrown"); } - catch(xmlpp::internal_error x) - { - if (!strcmp(x.what(), "Couldn't create parsing context")) - throw runtime_error(String(" * ") + _("Can't open file") + " \"" + file + "\""); - throw; - } - catch(const std::exception& ex) - { - synfig::error("Standard Exception: "+String(ex.what())); - errors = ex.what(); - return Canvas::Handle(); - } - catch(const String& str) - { - cerr<value_node_list()); - - again: - ValueNodeList::const_iterator iter; - for(iter=value_node_list.begin();iter!=value_node_list.end();++iter) - { - ValueNode::Handle value_node(*iter); - if(value_node->is_exported() && value_node->get_id().find("Unnamed")==0) - { - canvas->remove_value_node(value_node); - goto again; - } - } - - return canvas; - } - } - catch(Exception::BadLinkName) { synfig::error("BadLinkName Thrown"); } - catch(Exception::BadType) { synfig::error("BadType Thrown"); } - catch(Exception::FileNotFound) { synfig::error("FileNotFound Thrown"); } - catch(Exception::IDNotFound) { synfig::error("IDNotFound Thrown"); } - catch(Exception::IDAlreadyExists) { synfig::error("IDAlreadyExists Thrown"); } - catch(xmlpp::internal_error x) - { - if (!strcmp(x.what(), "Couldn't create parsing context")) - throw runtime_error(String(" * ") + _("Can't open file") + " \"" + "\""); - throw; - } - catch(const std::exception& ex) - { - synfig::error("Standard Exception: "+String(ex.what())); - errors = ex.what(); - return Canvas::Handle(); - } - catch(const String& str) - { - cerr< loading_; - -private: - - // Error/Warning handling functions - - void error(xmlpp::Node *node,const String &text); - void fatal_error(xmlpp::Node *node,const String &text); - void warning(xmlpp::Node *node,const String &text); - void error_unexpected_element(xmlpp::Node *node,const String &got, const String &expected); - void error_unexpected_element(xmlpp::Node *node,const String &got); - - // Parsing Functions - - Canvas::Handle parse_canvas(xmlpp::Element *node,Canvas::Handle parent=0,bool inline_=false, String path="."); - void parse_canvas_defs(xmlpp::Element *node,Canvas::Handle canvas); - etl::handle parse_layer(xmlpp::Element *node,Canvas::Handle canvas); - ValueBase parse_value(xmlpp::Element *node,Canvas::Handle canvas); - etl::handle parse_value_node(xmlpp::Element *node,Canvas::Handle canvas); - - // ValueBase Parsing Functions - - Real parse_real(xmlpp::Element *node); - Time parse_time(xmlpp::Element *node,Canvas::Handle canvas); - int parse_integer(xmlpp::Element *node); - Vector parse_vector(xmlpp::Element *node); - Color parse_color(xmlpp::Element *node); - Angle parse_angle(xmlpp::Element *node); - String parse_string(xmlpp::Element *node); - bool parse_bool(xmlpp::Element *node); - Segment parse_segment(xmlpp::Element *node); - ValueBase parse_list(xmlpp::Element *node,Canvas::Handle canvas); - Gradient parse_gradient(xmlpp::Element *node); - BLinePoint parse_bline_point(xmlpp::Element *node); - - Keyframe parse_keyframe(xmlpp::Element *node,Canvas::Handle canvas); - - // ValueNode Parsing Functions - - etl::handle parse_animated(xmlpp::Element *node,Canvas::Handle canvas); - etl::handle parse_subtract(xmlpp::Element *node,Canvas::Handle canvas); - etl::handle parse_linkable_value_node(xmlpp::Element *node,Canvas::Handle canvas); - etl::handle parse_dynamic_list(xmlpp::Element *node,Canvas::Handle canvas); - -}; // END of CanvasParser - -/* === E X T E R N S ======================================================= */ - -//! Loads a canvas from \a filename -/*! \return The Canvas's handle on success, an empty handle on failure */ -extern Canvas::Handle open_canvas(xmlpp::Element* node,String &errors,String &warnings); -extern Canvas::Handle open_canvas(const String &filename,String &errors,String &warnings); -extern Canvas::Handle open_canvas_as(const String &filename,const String &as,String &errors,String &warnings); - -std::map >& get_open_canvas_map(); - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/main.cpp b/synfig-core/trunk/src/synfig/main.cpp deleted file mode 100644 index 9e0a56a..0000000 --- a/synfig-core/trunk/src/synfig/main.cpp +++ /dev/null @@ -1,379 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file synfig/main.cpp -** \brief \writeme -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -//#define SYNFIG_NO_ANGLE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include "version.h" -#include "general.h" -#include "module.h" -#include -#include -#include -#include "target.h" -#include -#include "listimporter.h" -#include "color.h" -#include "vector.h" -#include -#include "layer.h" -#include "valuenode.h" - -#include "main.h" -#include "loadcanvas.h" - -#include "guid.h" - -#include "mutex.h" - -#ifdef HAVE_SIGNAL_H -#include -#endif - -#endif - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -#define MODULE_LIST_FILENAME "synfig_modules.cfg" - -/* === S T A T I C S ======================================================= */ - -static etl::reference_counter synfig_ref_count_(0); - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -const char * -synfig::get_version() -{ -#ifdef VERSION - return VERSION; -#else - return "Unknown"; -#endif -} - -const char * -synfig::get_build_date() -{ - return __DATE__; -} - -bool -synfig::check_version_(int version,int vec_size, int color_size,int canvas_size,int layer_size) -{ - bool ret=true; - - if(version!=SYNFIG_LIBRARY_VERSION) - { - synfig::error(_("API Version mismatch (LIB:%d, PROG:%d)"),SYNFIG_LIBRARY_VERSION,version); - ret=false; - } - if(vec_size!=sizeof(Vector)) - { - synfig::error(_("Size of Vector mismatch (app:%d, lib:%d)"),vec_size,sizeof(Vector)); - ret=false; - } - if(color_size!=sizeof(Color)) - { - synfig::error(_("Size of Color mismatch (app:%d, lib:%d)"),color_size,sizeof(Color)); - ret=false; - } - if(canvas_size!=sizeof(Canvas)) - { - synfig::error(_("Size of Canvas mismatch (app:%d, lib:%d)"),canvas_size,sizeof(Canvas)); - ret=false; - } - if(layer_size!=sizeof(Layer)) - { - synfig::error(_("Size of Layer mismatch (app:%d, lib:%d)"),layer_size,sizeof(Layer)); - ret=false; - } - - return ret; -} - -static void broken_pipe_signal (int /*sig*/) { - synfig::warning("Broken Pipe..."); -} - -bool retrieve_modules_to_load(String filename,std::list &modules_to_load) -{ - std::ifstream file(filename.c_str()); - - if(!file) - { - // warning("Cannot open "+filename); - return false; - } - - while(file) - { - String modulename; - getline(file,modulename); - if(!modulename.empty() && find(modules_to_load.begin(),modules_to_load.end(),modulename)==modules_to_load.end()) - modules_to_load.push_back(modulename); - } - - return true; -} - -synfig::Main::Main(const synfig::String& basepath,ProgressCallback *cb): - ref_count_(synfig_ref_count_) -{ - if(ref_count_.count()) - return; - - synfig_ref_count_.reset(); - ref_count_=synfig_ref_count_; - - // Add initialization after this point - -#ifdef ENABLE_NLS - bindtextdomain("synfig", LOCALEDIR); - bind_textdomain_codeset("synfig", "UTF-8"); -#endif - - String prefix=basepath+"/.."; - unsigned int i; -#ifdef _DEBUG - std::set_terminate(__gnu_cxx::__verbose_terminate_handler); -#endif - -#if defined(HAVE_SIGNAL_H) && defined(SIGPIPE) - signal(SIGPIPE, broken_pipe_signal); -#endif - - //_config_search_path=new vector"string.h"(); - - // Init the subsystems - if(cb)cb->amount_complete(0, 100); - if(cb)cb->task(_("Starting Subsystem \"Modules\"")); - if(!Module::subsys_init(prefix)) - throw std::runtime_error(_("Unable to initialize subsystem \"Module\"")); - - if(cb)cb->task(_("Starting Subsystem \"Layers\"")); - if(!Layer::subsys_init()) - { - Module::subsys_stop(); - throw std::runtime_error(_("Unable to initialize subsystem \"Layers\"")); - } - - if(cb)cb->task(_("Starting Subsystem \"Targets\"")); - if(!Target::subsys_init()) - { - Layer::subsys_stop(); - Module::subsys_stop(); - throw std::runtime_error(_("Unable to initialize subsystem \"Targets\"")); - } - - if(cb)cb->task(_("Starting Subsystem \"Importers\"")); - if(!Importer::subsys_init()) - { - Target::subsys_stop(); - Layer::subsys_stop(); - Module::subsys_stop(); - throw std::runtime_error(_("Unable to initialize subsystem \"Importers\"")); - } - - if(cb)cb->task(_("Starting Subsystem \"ValueNodes\"")); - if(!ValueNode::subsys_init()) - { - Importer::subsys_stop(); - Target::subsys_stop(); - Layer::subsys_stop(); - Module::subsys_stop(); - throw std::runtime_error(_("Unable to initialize subsystem \"ValueNodes\"")); - } - - // Load up the list importer - Importer::book()[String("lst")]=ListImporter::create; - - // Load up the modules - std::list modules_to_load; - std::vector locations; - - if(getenv("SYNFIG_MODULE_LIST")) - locations.push_back(getenv("SYNFIG_MODULE_LIST")); - else - { - locations.push_back("./"MODULE_LIST_FILENAME); - locations.push_back("../etc/"MODULE_LIST_FILENAME); - if(getenv("HOME")) - locations.push_back(strprintf("%s/.synfig/%s", getenv("HOME"), MODULE_LIST_FILENAME)); - #ifdef SYSCONFDIR - locations.push_back(SYSCONFDIR"/"MODULE_LIST_FILENAME); - #endif - locations.push_back(prefix+"/etc/"+MODULE_LIST_FILENAME); - locations.push_back("/usr/local/etc/"MODULE_LIST_FILENAME); - #ifdef __APPLE__ - locations.push_back("/Library/Frameworks/synfig.framework/Resources/"MODULE_LIST_FILENAME); - locations.push_back("/Library/Synfig/"MODULE_LIST_FILENAME); - if(getenv("HOME")) - locations.push_back(strprintf("%s/Library/Synfig/%s", getenv("HOME"), MODULE_LIST_FILENAME)); - #endif - #ifdef WIN32 - locations.push_back("C:\\Program Files\\Synfig\\etc\\"MODULE_LIST_FILENAME); - #endif - } - - for(i=0;itask(strprintf(_("Loading modules from %s"),locations[i].c_str())); - break; - } - - if (i == locations.size()) - { - Importer::subsys_stop(); - Target::subsys_stop(); - Layer::subsys_stop(); - Module::subsys_stop(); - throw std::runtime_error(strprintf(_("Unable to open module list file '%s'"), MODULE_LIST_FILENAME)); - } - - std::list::iterator iter; - - Module::register_default_modules(cb); - - for(i=0,iter=modules_to_load.begin();iter!=modules_to_load.end();++iter,i++) - { - Module::Register(*iter,cb); - if(cb)cb->amount_complete((i+1)*100,modules_to_load.size()*100); - } - - if(cb)cb->amount_complete(100, 100); - if(cb)cb->task(_("DONE")); -} - -synfig::Main::~Main() -{ - ref_count_.detach(); - if(!synfig_ref_count_.unique()) - return; - synfig_ref_count_.detach(); - - // Add deinitialization after this point - - if(get_open_canvas_map().size()) - { - synfig::warning("Canvases still open!"); - std::map >::iterator iter; - for(iter=get_open_canvas_map().begin();iter!=get_open_canvas_map().end();++iter) - { - synfig::warning("%s: count()=%d",iter->first.c_str(), iter->second.count()); - } - } - - // synfig::info("ValueNode::subsys_stop()"); - ValueNode::subsys_stop(); - // synfig::info("Importer::subsys_stop()"); - Importer::subsys_stop(); - // synfig::info("Target::subsys_stop()"); - Target::subsys_stop(); - // synfig::info("Layer::subsys_stop()"); - Layer::subsys_stop(); - /*! \todo For some reason, uncommenting the next line will cause things to crash. - This needs to be looked into at some point. */ - // synfig::info("Module::subsys_stop()"); - // Module::subsys_stop(); - // synfig::info("Exiting"); - -#if defined(HAVE_SIGNAL_H) && defined(SIGPIPE) - signal(SIGPIPE, SIG_DFL); -#endif -} - -static const String -current_time() -{ - const int buflen = 50; - time_t t; - struct tm *lt; - char b[buflen]; - time(&t); - lt = localtime(&t); - strftime(b, buflen, " [%X] ", lt); - return String(b); -} - -void -synfig::error(const char *format,...) -{ - va_list args; - va_start(args,format); - error(vstrprintf(format,args)); -} - -void -synfig::error(const String &str) -{ - static Mutex mutex; Mutex::Lock lock(mutex); - cerr<<"synfig("< -#include "general.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/*! \class synfig::Main -** \brief \writeme -** -** \writeme -*/ -class Main -{ - etl::reference_counter ref_count_; -public: - Main(const synfig::String& basepath,ProgressCallback *cb=0); - ~Main(); - - const etl::reference_counter& ref_count()const { return ref_count_; } -}; // END of class Main - -}; // END if namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/matrix.h b/synfig-core/trunk/src/synfig/matrix.h deleted file mode 100644 index 9d83dd1..0000000 --- a/synfig-core/trunk/src/synfig/matrix.h +++ /dev/null @@ -1,229 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file matrix.h -** \brief Matrix definitions for 2D affine transformations -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Carlos López -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_MATRIX_H -#define __SYNFIG_MATRIX_H - -/* === H E A D E R S ======================================================= */ - -#include "angle.h" -#include "real.h" -#include "vector.h" -#include - -/* === M A C R O S ========================================================= */ - - -#ifdef WIN32 -#include -#ifndef isnan -extern "C" { int _isnan(double x); } -#define isnan _isnan -#endif -#endif - -// For some reason isnan() isn't working on macosx any more. -// This is a quick fix. -#if defined(__APPLE__) && !defined(SYNFIG_ISNAN_FIX) -#ifdef isnan -#undef isnan -#endif -inline bool isnan(double x) { return x != x; } -inline bool isnan(float x) { return x != x; } -#define SYNFIG_ISNAN_FIX 1 -#endif - - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/*! \class Matrix -** \todo writeme -*/ -class Matrix -{ -public: - typedef Real value_type; - -private: - //! The matrix array - value_type m00, m01, m02; - value_type m10, m11, m12; - value_type m20, m21, m22; - // Index convention - // 00 01 02 - // 10 11 12 - // 20 21 22 - // vectors are premultiplied when the matrix transformation is applied - // we consider the vectors as [1]x[3] arrays. - // [1]x[3] * [3]x[3] = [1]x[3] - // vector * matrix = vector - // In affine transformation matrixes the values of - // m02=0, m12=0 and m22=1 for non projective transformations. - -public: - //!Deafult constructor makes a identity matrix - Matrix() { - m00=1.0; m01=0.0; m02=0.0; - m10=0.0; m11=1.0; m12=0.0; - m20=0.0; m21=0.0; m22=1.0; - } - - //!Constructor from Angle create a rotate matrix - Matrix(const Angle &a){ - (*this).set_rotate(a); - } - //!set_identity member. Set an identity matrix - Matrix & - set_identity(){ - m00=1.0; m01=0.0; m02=0.0; - m10=0.0; m11=1.0; m12=0.0; - m20=0.0; m21=0.0; m22=1.0; - return (*this); - } - //!set_scale member fucntion. Sets a scale matrix - //! @param sx Scale by X axis - //! @param sy Scale by Y axis - //! @return A matrix reference filled with the sx, sy values - Matrix & - set_scale(const value_type &sx, const value_type &sy){ - m00=sx; m01=0.0; m02=0.0; - m10=0.0; m11=sy; m12=0.0; - m20=0.0; m21=0.0; m22=1.0; - return (*this); - } - //!set_rotate member function. Sets a rotate matrix - //! @param a Rotation angle counterclock wise - //! @return A matrix reference filled with the proper rotation parameters - Matrix & - set_rotate(const Angle &a){ - value_type c(Angle::cos(a).get()); - value_type s(Angle::sin(a).get()); - m00= c; m01=s; m02=0.0; - m10=-1.0*s; m11=c; m12=0.0; - m20=0.0; m21=0.0; m22=1.0; - return (*this); - } - //!traslate member function. Sets a translate matrix - //! @param t Vector that defines the translation - //! @return A matrix reference filled with the proper translation parameters - Matrix & - set_translate(const Vector &t){ - m00=1.0; m01=0.0; m02=0.0; - m10=0.0; m11=1.0; m12=0.0; - m20=t[0]; m21=t[1]; m22=1.0; - return (*this); - } - - //!get_transformed member function. - //! @param v 2D Vector to transform - //! @return The Vector result - Vector - get_transformed(const Vector &v){ - return Vector(v[0]*m00+v[1]*m10+m20,v[0]*m01+v[1]*m11+m21); - } - - //! operator *. Multiplication of one matrix by other - //! @param rhs the right hand side of the multiplication operation - //! @return the resulting multiplication matrix - Matrix - operator *(const Matrix &rhs){ - Matrix ret; - ret.m00=m00*rhs.m00 + m01*rhs.m10 + m02*rhs.m20; - ret.m01=m00*rhs.m01 + m01*rhs.m11 + m02*rhs.m21; - ret.m02=m00*rhs.m02 + m01*rhs.m12 + m02*rhs.m22; - - ret.m10=m10*rhs.m00 + m11*rhs.m10 + m12*rhs.m20; - ret.m11=m10*rhs.m01 + m11*rhs.m11 + m12*rhs.m21; - ret.m12=m10*rhs.m02 + m11*rhs.m12 + m12*rhs.m22; - - ret.m20=m20*rhs.m00 + m21*rhs.m10 + m22*rhs.m20; - ret.m21=m20*rhs.m01 + m21*rhs.m11 + m22*rhs.m21; - ret.m22=m20*rhs.m02 + m21*rhs.m12 + m22*rhs.m22; - return ret; - } - - //! operator *=. Multiplication and assign of one matrix by a number - //! @param rhs the number to multiply by - //! @return the modifed resulting multiplicated by number matrix - Matrix - operator *=(const value_type &rhs){ - m00*=rhs; - m01*=rhs; - m02*=rhs; - - m10*=rhs; - m11*=rhs; - m12*=rhs; - - m20*=rhs; - m21*=rhs; - m22*=rhs; - return *this; - } - - //! operator +=. Sum and assign of two matrixes - //! @param rhs the matrix to sum - //! @return modified matrix with the summed matrix - Matrix - operator +=(const Matrix &rhs){ - m00+=rhs.m00; - m01+=rhs.m01; - m02+=rhs.m02; - - m10+=rhs.m10; - m11+=rhs.m11; - m12+=rhs.m12; - - m20+=rhs.m20; - m21+=rhs.m21; - m22+=rhs.m22; - return *this; - } - - //! operator *. Multiplication of one matrix by a number - //! @param rhs the number to multiply by - //! @return the resulting multiplicated by number matrix - Matrix - operator *(const value_type &rhs){ - return Matrix(*this)*=rhs; - } - - //! operator +=. Sum and assign of two matrixes - //! @param rhs the matrix to sum - //! @return modified matrix with the summed matrix - Matrix - operator +(const Matrix &rhs){ - return Matrix(*this)+=rhs; - } - -}; - -}; // END of namespace synfig - -#endif diff --git a/synfig-core/trunk/src/synfig/module.cpp b/synfig-core/trunk/src/synfig/module.cpp deleted file mode 100644 index 5d64003..0000000 --- a/synfig-core/trunk/src/synfig/module.cpp +++ /dev/null @@ -1,194 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file synfig/module.cpp -** \brief writeme -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_NO_ANGLE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "module.h" -#include "general.h" -#include - -#ifndef USE_CF_BUNDLES -#include -#endif - -#endif - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -using namespace std; -using namespace etl; -using namespace synfig; - -Module::Book *synfig::Module::book_; - -/* === P R O C E D U R E S ================================================= */ - -bool -Module::subsys_init(const String &prefix) -{ -#ifndef USE_CF_BUNDLES - #ifndef SYNFIG_LTDL_NO_STATIC - //LTDL_SET_PRELOADED_SYMBOLS(); - #endif - - if(lt_dlinit()) - { - error(_("Errors on lt_dlinit()")); - error(lt_dlerror()); - return false; - } - - lt_dladdsearchdir("."); - if(getenv("HOME")) - lt_dladdsearchdir(strprintf("%s/.synfig/modules", getenv("HOME")).c_str()); - lt_dladdsearchdir((prefix+"/lib/synfig/modules").c_str()); -#ifdef LIBDIR - lt_dladdsearchdir(LIBDIR"/synfig/modules"); -#endif -#ifdef __APPLE__ - lt_dladdsearchdir("/Library/Frameworks/synfig.framework/Resources/modules"); -#endif - lt_dladdsearchdir("/usr/local/lib/synfig/modules"); - lt_dladdsearchdir("."); -#endif - book_=new Book; - return true; -} - -bool -Module::subsys_stop() -{ - delete book_; - -#ifndef USE_CF_BUNDLES - lt_dlexit(); -#endif - return true; -} - -void -Module::register_default_modules(ProgressCallback *callback) -{ - #define REGISTER_MODULE(module) if (!Register(module, callback)) \ - throw std::runtime_error(strprintf(_("Unable to load module '%s'"), module)) - REGISTER_MODULE("lyr_freetype"); - REGISTER_MODULE("mod_geometry"); - REGISTER_MODULE("mod_gradient"); - REGISTER_MODULE("mod_particle"); -} - -Module::Book& -Module::book() -{ - return *book_; -} - -void -synfig::Module::Register(Module::Handle mod) -{ - book()[mod->Name()]=mod; -} - -bool -synfig::Module::Register(const String &module_name, ProgressCallback *callback) -{ -#ifndef USE_CF_BUNDLES - lt_dlhandle module; - - if(callback)callback->task(strprintf(_("Attempting to register \"%s\""),module_name.c_str())); - - module=lt_dlopenext((string("lib")+module_name).c_str()); - if(!module)module=lt_dlopenext(module_name.c_str()); - - if(!module) - { - if(callback)callback->warning(strprintf(_("Unable to find module \"%s\" (%s)"),module_name.c_str(),lt_dlerror())); - return false; - } - - if(callback)callback->task(strprintf(_("Found module \"%s\""),module_name.c_str())); - - Module::constructor_type constructor=NULL; - Handle mod; - - if(!constructor) - { -// if(callback)callback->task(string("looking for -> ")+module_name+"_LTX_new_instance()"); - constructor=(Module::constructor_type )lt_dlsym(module,(module_name+"_LTX_new_instance").c_str()); - } - - if(!constructor) - { -// if(callback)callback->task(string("looking for -> lib")+module_name+"_LTX_new_instance()"); - constructor=(Module::constructor_type )lt_dlsym(module,(string("lib")+module_name+"_LTX_new_instance").c_str()); - } - if(!constructor) - { -// if(callback)callback->task(string("looking for -> lib")+module_name+"_LTX_new_instance()"); - constructor=(Module::constructor_type )lt_dlsym(module,(string("_lib")+module_name+"_LTX_new_instance").c_str()); - } - if(!constructor) - { -// if(callback)callback->task(string("looking for -> lib")+module_name+"_LTX_new_instance()"); - constructor=(Module::constructor_type )lt_dlsym(module,(string("_")+module_name+"_LTX_new_instance").c_str()); - } - - if(constructor) - { -// if(callback)callback->task(strprintf("Executing callback for \"%s\"",module_name.c_str())); - mod=handle((*constructor)(callback)); - } - else - { - if(callback)callback->error(strprintf(_("Unable to find entrypoint in module \"%s\" (%s)"),module_name.c_str(),lt_dlerror())); - return false; - } - -// if(callback)callback->task(strprintf("Done executing callback for \"%s\"",module_name.c_str())); - - if(mod) - { -// if(callback)callback->task(strprintf("Registering \"%s\"",module_name.c_str())); - Register(mod); - } - else - { - if(callback)callback->error(_("Entrypoint did not return a module.")); - return false; - } - - if(callback)callback->task(strprintf(_("Success for \"%s\""),module_name.c_str())); - -#endif - return true; -} diff --git a/synfig-core/trunk/src/synfig/module.h b/synfig-core/trunk/src/synfig/module.h deleted file mode 100644 index 26638cd..0000000 --- a/synfig-core/trunk/src/synfig/module.h +++ /dev/null @@ -1,204 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file synfig/module.h -** \brief writeme -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_MODULE_H -#define __SYNFIG_MODULE_H - -/* === H E A D E R S ======================================================= */ - -#include "general.h" -#include -#include -#include "string.h" -#include "releases.h" -#include -#include "vector.h" -#include "color.h" -#include "layer.h" -#include "canvas.h" - -//#include "value.h" - -/* === M A C R O S ========================================================= */ - -//! Marks the start of a module description -#define MODULE_DESC_BEGIN(x) struct x##_modclass : public synfig::Module { x##_modclass(synfig::ProgressCallback *callback=NULL); - -//! Sets the localized name of the module -#define MODULE_NAME(x) virtual const char * Name() { return x; } - -//! Sets a localized description of the module -#define MODULE_DESCRIPTION(x) virtual const char * Desc() { return x; } - -//! Sets the name of the module's author -#define MODULE_AUTHOR(x) virtual const char * Author() { return x; } - -//! Sets the version string for the module -#define MODULE_VERSION(x) virtual const char * Version() { return x; } - -//! Sets the copyright string for the module -#define MODULE_COPYRIGHT(x) virtual const char * Copyright() { return x; } - -//! Describes the module's construction function -#define MODULE_CONSTRUCTOR(x) bool constructor_(synfig::ProgressCallback *cb) { return x(cb); } - -//! Describes the module's destruction function -#define MODULE_DESTRUCTOR(x) virtual void destructor_() { return x(); } - -//! Marks the end of a module description -#define MODULE_DESC_END }; - -//#if 0 -#ifdef __APPLE__ -//! Marks the start of a module's inventory -#define MODULE_INVENTORY_BEGIN(x) extern "C" { \ - synfig::Module* _##x##_LTX_new_instance(synfig::ProgressCallback *cb) \ - { if(SYNFIG_CHECK_VERSION()){x##_modclass *mod=new x##_modclass(cb); mod->constructor_(cb); return mod; }\ - if(cb)cb->error(#x": Unable to load module due to version mismatch."); return NULL; } \ - }; x##_modclass::x##_modclass(synfig::ProgressCallback */*cb*/) { -#else -//! Marks the start of a module's inventory -#define MODULE_INVENTORY_BEGIN(x) extern "C" { \ - synfig::Module* x##_LTX_new_instance(synfig::ProgressCallback *cb) \ - { if(SYNFIG_CHECK_VERSION()){x##_modclass *mod=new x##_modclass(cb); mod->constructor_(cb); return mod; }\ - if(cb)cb->error(#x": Unable to load module due to version mismatch."); return NULL; } \ - }; x##_modclass::x##_modclass(synfig::ProgressCallback */*cb*/) { -#endif - -//! Marks the start of the layers in the module's inventory -#define BEGIN_LAYERS { - -//! DEPRECATED - use #INCLUDE_LAYER(class) -#define LAYER(class) \ - synfig::Layer::register_in_book( \ - synfig::Layer::BookEntry(class::create, \ - class::name__, \ - dgettext("synfig", class::local_name__), \ - class::category__, \ - class::cvs_id__, \ - class::version__)); - -#define LAYER_ALIAS(class,alias) \ - synfig::Layer::register_in_book( \ - synfig::Layer::BookEntry(class::create, \ - alias, \ - alias, \ - CATEGORY_DO_NOT_USE, \ - class::cvs_id__, \ - class::version__)); - -//! Marks the end of the layers in the module's inventory -#define END_LAYERS } - -//! Marks the start of the targets in the module's inventory -#define BEGIN_TARGETS { - -#define TARGET(x) \ - synfig::Target::book()[synfig::String(x::name__)]= \ - std::pair \ - (x::create,synfig::String(x::ext__)); \ - synfig::Target::ext_book()[synfig::String(x::ext__)]=x::name__; - -#define TARGET_EXT(x,y) synfig::Target::ext_book()[synfig::String(y)]=x::name__; - -//! Marks the end of the targets in the module's inventory -#define END_TARGETS } - -//! Marks the start of the importers in the module's inventory -#define BEGIN_IMPORTERS { - -#define IMPORTER(x) synfig::Importer::book()[synfig::String(x::ext__)]=x::create; - -#define IMPORTER_EXT(x,y) synfig::Importer::book()[synfig::String(y)]=x::create; - -//! Marks the end of the importers in the module's inventory -#define END_IMPORTERS } - -//! Marks the start of the valuenodes in the module's inventory -#define BEGIN_VALUENODES { synfig::LinkableValueNode::Book &book(synfig::LinkableValueNode::book()); - -#define VALUENODE(class,name,local,version) \ - book[name].factory=reinterpret_cast(&class::create); \ - book[name].check_type=&class::check_type; \ - book[name].local_name=local; \ - book[name].release_version=version; - -//! Marks the end of the valuenodes in the module's inventory -#define END_VALUENODES } - -//! Marks the end of a module's inventory -#define MODULE_INVENTORY_END } - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class ProgressCallback; - -/*! \class Module -** \todo writeme -*/ -class Module : public etl::shared_object -{ -public: - bool constructor_(synfig::ProgressCallback */*cb*/) { return true; } - virtual void destructor_() { } - - typedef etl::handle Handle; - typedef etl::loose_handle LooseHandle; - typedef etl::handle ConstHandle; - -public: - typedef Module*(*constructor_type)(ProgressCallback *); - typedef std::map Book; -private: - static Book* book_; -public: - static Book& book(); - - static bool subsys_init(const String &prefix); - static bool subsys_stop(); - static void register_default_modules(ProgressCallback *cb=NULL); - - static void Register(Handle mod); - static bool Register(const String &module_name, ProgressCallback *cb=NULL); - static inline void Register(Module *mod) { Register(Handle(mod)); } - - virtual const char * Name() { return " "; } - virtual const char * Desc() { return " "; } - virtual const char * Author() { return " "; } - virtual const char * Version() { return " "; } - virtual const char * Copyright() { return SYNFIG_COPYRIGHT; } - - virtual ~Module() { destructor_(); } -}; - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/mutex.cpp b/synfig-core/trunk/src/synfig/mutex.cpp deleted file mode 100644 index eca63b6..0000000 --- a/synfig-core/trunk/src/synfig/mutex.cpp +++ /dev/null @@ -1,304 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mutex.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "mutex.h" - -#ifdef HAVE_LIBPTHREAD -#define USING_PTHREADS 1 -#else -#ifdef _WIN32 -#define USING_WIN32_THREADS 1 -#endif -#endif - -#ifdef USING_WIN32_THREADS -#include -#endif - -#ifdef USING_PTHREADS -#include -#endif - -#endif - -/* === U S I N G =========================================================== */ - -//using namespace std; -//using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - - - - - - -bool -Mutex::is_locked() -{ - if(try_lock()) - { - unlock(); - return false; - } - return true; -} - -void -RecMutex::unlock_all() -{ - while(is_locked()) unlock(); -} - -#ifdef USING_PTHREADS -Mutex::Mutex() -{ - pthread_mutex_t*const mtx_ptr(new pthread_mutex_t); - - pthread_mutexattr_t attr; - pthread_mutexattr_init(&attr); - - //#ifdef PTHREAD_PRIO_INHERIT - //pthread_mutexattr_setprioceiling(&attr,PTHREAD_PRIO_INHERIT); - //#endif - - //#ifdef PTHREAD_MUTEX_RECURSIVE - //pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); - //#endif - - pthread_mutex_init(mtx_ptr,&attr); - pthread_mutexattr_destroy(&attr); - - blackbox=mtx_ptr; -} - -Mutex::~Mutex() -{ - pthread_mutex_t*const mtx_ptr(static_cast(blackbox)); - pthread_mutex_destroy(mtx_ptr); - delete mtx_ptr; -} - -void -Mutex::lock() -{ - pthread_mutex_t*const mtx_ptr(static_cast(blackbox)); - pthread_mutex_lock(mtx_ptr); -} - -void -Mutex::unlock() -{ - pthread_mutex_t*const mtx_ptr(static_cast(blackbox)); - pthread_mutex_unlock(mtx_ptr); -} - -bool -Mutex::try_lock() -{ - pthread_mutex_t*const mtx_ptr(static_cast(blackbox)); - return !(bool) pthread_mutex_trylock(mtx_ptr); -} - - -RecMutex::RecMutex() -{ - pthread_mutex_t*const mtx_ptr(static_cast(blackbox)); - pthread_mutexattr_t attr; - - // Backtrack and get rid of the non-recursive mutex - pthread_mutex_destroy(mtx_ptr); - - pthread_mutexattr_init(&attr); - - pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); - - pthread_mutex_init(mtx_ptr,&attr); - pthread_mutexattr_destroy(&attr); -} - - - -RWLock::RWLock() -{ - pthread_rwlock_t*const rwlock_ptr(new pthread_rwlock_t); - - pthread_rwlock_init(rwlock_ptr, NULL); - - blackbox=rwlock_ptr; -} - -RWLock::~RWLock() -{ - pthread_rwlock_t*const rwlock_ptr(static_cast(blackbox)); - - pthread_rwlock_destroy(rwlock_ptr); - - delete rwlock_ptr; -} - -void -RWLock::reader_lock() -{ - pthread_rwlock_t*const rwlock_ptr(static_cast(blackbox)); - - pthread_rwlock_rdlock(rwlock_ptr); -} - -void -RWLock::reader_unlock() -{ - pthread_rwlock_t*const rwlock_ptr(static_cast(blackbox)); - - pthread_rwlock_unlock(rwlock_ptr); -} - -bool -RWLock::reader_trylock() -{ - pthread_rwlock_t*const rwlock_ptr(static_cast(blackbox)); - - return !pthread_rwlock_tryrdlock(rwlock_ptr); -} - -void -RWLock::writer_lock() -{ - pthread_rwlock_t*const rwlock_ptr(static_cast(blackbox)); - - pthread_rwlock_wrlock(rwlock_ptr); -} - -void -RWLock::writer_unlock() -{ - pthread_rwlock_t*const rwlock_ptr(static_cast(blackbox)); - - pthread_rwlock_unlock(rwlock_ptr); -} - -bool -RWLock::writer_trylock() -{ - pthread_rwlock_t*const rwlock_ptr(static_cast(blackbox)); - - return !pthread_rwlock_trywrlock(rwlock_ptr); -} - -#endif - -#ifdef USING_WIN32_THREADS -Mutex::Mutex() -{ - HANDLE& mtx(*reinterpret_cast(&blackbox)); - mtx=CreateMutex(NULL, FALSE, NULL); -} - -Mutex::~Mutex() -{ - HANDLE mtx(reinterpret_cast(blackbox)); - CloseHandle(mtx); -} - -void -Mutex::lock() -{ - HANDLE mtx(reinterpret_cast(blackbox)); - WaitForSingleObject(mtx, INFINITE); -} - -void -Mutex::unlock() -{ - HANDLE mtx(reinterpret_cast(blackbox)); - ReleaseMutex(mtx); -} - -bool -Mutex::try_lock() -{ - HANDLE mtx(reinterpret_cast(blackbox)); - return WaitForSingleObject(mtx, 0)==WAIT_FAILED; -} - - -RecMutex::RecMutex() -{ - // Win32 mutexes are recursive by default. -} - - -RWLock::RWLock() -{ -} - -RWLock::~RWLock() -{ -} - -void -RWLock::reader_lock() -{ -} - -void -RWLock::reader_unlock() -{ -} - -bool -RWLock::reader_trylock() -{ -} - -void -RWLock::writer_lock() -{ -} - -void -RWLock::writer_unlock() -{ -} - -bool -RWLock::writer_trylock() -{ -} - -#endif diff --git a/synfig-core/trunk/src/synfig/mutex.h b/synfig-core/trunk/src/synfig/mutex.h deleted file mode 100644 index 3497635..0000000 --- a/synfig-core/trunk/src/synfig/mutex.h +++ /dev/null @@ -1,118 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file mutex.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_MUTEX_H -#define __SYNFIG_MUTEX_H - -/* === H E A D E R S ======================================================= */ - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class RecMutex; - -class Mutex -{ - friend class RecMutex; - -protected: - void* blackbox; - -public: - - class Lock - { - Mutex& mutex; - public: - Lock(Mutex& x):mutex(x) { mutex.lock(); } - ~Lock() { mutex.unlock(); } - }; - - Mutex(); - ~Mutex(); - - void lock(); - void unlock(); - bool try_lock(); - bool is_locked(); - -private: - //! Non-copyable - Mutex(const Mutex&); - - //! Non-assignable - void operator=(const Mutex&); -}; - -class RecMutex : public Mutex -{ -public: - RecMutex(); - - void unlock_all(); -}; - -class RWLock -{ - void* blackbox; - -public: - - class ReaderLock - { - RWLock& rw_lock; - public: - ReaderLock(RWLock& x):rw_lock(x) { rw_lock.reader_lock(); } - ~ReaderLock() { rw_lock.reader_unlock(); } - }; - class WriterLock - { - RWLock& rw_lock; - public: - WriterLock(RWLock& x):rw_lock(x) { rw_lock.writer_lock(); } - ~WriterLock() { rw_lock.writer_unlock(); } - }; - - RWLock(); - ~RWLock(); - - void reader_lock(); - void reader_unlock(); - bool reader_trylock(); - - void writer_lock(); - void writer_unlock(); - bool writer_trylock(); -}; - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/node.cpp b/synfig-core/trunk/src/synfig/node.cpp deleted file mode 100644 index 6524109..0000000 --- a/synfig-core/trunk/src/synfig/node.cpp +++ /dev/null @@ -1,310 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file node.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "node.h" -// #include "nodebase.h" // this defines a bunch of sigc::slots that are never used - -#ifdef HASH_MAP_H -#include HASH_MAP_H -#else -#include -#endif - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -// About BE_FRUGAL_WITH_GUIDS -// If this macro is set, then a GUID will NOT -// be calculated until the first call to get_guid() -// This also means that the node doesn't get -// added to the database until get_guid() is called -// for the first time, or set_guid() is called. -// If it is expensive to calculate GUIDs, then -// this can improve performance a tad in -// some cases. Otherwise, it doesn't change -// much of anything. -#define BE_FRUGAL_WITH_GUIDS 1 - -#ifndef __sys_clock -#ifndef _WIN32 -# include -# define __sys_clock ::clock -#else -# ifdef __GNUG__ -# include -# define __sys_clock ::clock -# else -typedef int clock_t; -extern clock_t _clock(); -# define CLOCKS_PER_SEC 1000 -# define __sys_clock _clock -# endif -#endif -#endif - -/* === G L O B A L S ======================================================= */ - -#ifdef HASH_MAP_H -typedef HASH_MAP_CLASS GlobalNodeMap; -#else -typedef map GlobalNodeMap; -#endif - -static GlobalNodeMap* global_node_map_; - -static GlobalNodeMap& global_node_map() -{ - if(!global_node_map_) - global_node_map_=new GlobalNodeMap; - return *global_node_map_; -} - -/* === P R O C E D U R E S ================================================= */ - -synfig::Node* -synfig::find_node(const synfig::GUID& guid) -{ - if(global_node_map().count(guid)==0) - return 0; - return global_node_map()[guid]; -} - -static void -refresh_node(synfig::Node* node, synfig::GUID old_guid) -{ - assert(global_node_map().count(old_guid)); - global_node_map().erase(old_guid); - assert(!global_node_map().count(old_guid)); - global_node_map()[node->get_guid()]=node; -} - -/* === M E T H O D S ======================================================= */ - -#ifdef _DEBUG -const char * -TimePoint::c_str()const -{ - return get_time().get_string().c_str(); -} -#endif - -void -TimePoint::absorb(const TimePoint& x) -{ - if(get_guid()==x.get_guid()) - return; - set_guid(get_guid()^x.get_guid()); - - if(get_after()==INTERPOLATION_NIL) - set_after(x.get_after()); - if(get_before()==INTERPOLATION_NIL) - set_before(x.get_before()); - - if(get_after()!=x.get_after() && x.get_after()!=INTERPOLATION_NIL) - set_after(INTERPOLATION_UNDEFINED); - if(get_before()!=x.get_before() && x.get_before()!=INTERPOLATION_NIL) - set_before(INTERPOLATION_UNDEFINED); -} - -TimePointSet::iterator -TimePointSet::insert(const TimePoint& x) -{ - iterator iter(find(x)); - if(iter!=end()) - { - const_cast(*iter).absorb(x); - return iter; - } - return std::set::insert(x).first; -} - - - - - - - - - - - - - - - -Node::Node(): - guid_(0), - bchanged(true), - time_last_changed_(__sys_clock()), - deleting_(false) -{ -#ifndef BE_FRUGAL_WITH_GUIDS - guid_.make_unique(); - assert(guid_); - assert(!global_node_map().count(guid_)); - global_node_map()[guid_]=this; -#endif -} - -Node::~Node() -{ - begin_delete(); - - if(guid_) - { - assert(global_node_map().count(guid_)); - global_node_map().erase(guid_); - assert(!global_node_map().count(guid_)); - } -} - -void -Node::changed() -{ - time_last_changed_=__sys_clock(); - on_changed(); -} - - -//! Gets the GUID for this value node -const synfig::GUID& -Node::get_guid()const -{ -#ifdef BE_FRUGAL_WITH_GUIDS - if(!guid_) - { - const_cast(guid_).make_unique(); - assert(guid_); - assert(!global_node_map().count(guid_)); - global_node_map()[guid_]=const_cast(this); - } -#endif - - return guid_; -} - -//! Sets the GUID for this value node -void -Node::set_guid(const synfig::GUID& x) -{ - assert(x); - -#ifdef BE_FRUGAL_WITH_GUIDS - if(!guid_) - { - guid_=x; - assert(!global_node_map().count(guid_)); - global_node_map()[guid_]=this; - } - else -#endif - if(guid_!=x) - { - synfig::GUID oldguid(guid_); - guid_=x; - refresh_node(this, oldguid); - on_guid_changed(oldguid); - } -} - -int -Node::get_time_last_changed()const -{ - return time_last_changed_; -} - -void -Node::add_child(Node*x) -{ - x->parent_set.insert(this); -} - -void -Node::remove_child(Node*x) -{ - if(x->parent_set.count(this)) x->parent_set.erase(this); -} - -int -Node::parent_count()const -{ - return parent_set.size(); -} - -const Node::time_set & -Node::get_times() const -{ - if(bchanged) - { - times.clear(); - get_times_vfunc(times); - bchanged = false; - } - - //set the output set... - return times; -} - -void -Node::begin_delete() -{ - if(!deleting_) - { - deleting_=true; signal_deleted()(); - } -} - -void -Node::on_changed() -{ - bchanged = true; - signal_changed()(); - - std::set::iterator iter; - for(iter=parent_set.begin();iter!=parent_set.end();++iter) - { - (*iter)->changed(); - } -} - -void -Node::on_guid_changed(synfig::GUID guid) -{ - signal_guid_changed()(guid); -} diff --git a/synfig-core/trunk/src/synfig/node.h b/synfig-core/trunk/src/synfig/node.h deleted file mode 100644 index ca5af34..0000000 --- a/synfig-core/trunk/src/synfig/node.h +++ /dev/null @@ -1,283 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file node.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_PARENTNODE_H -#define __SYNFIG_PARENTNODE_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include "time.h" -#include "guid.h" -#include -#include "interpolation.h" -#include "mutex.h" - -/* === M A C R O S ========================================================= */ - -// When a PasteCanvas layer has a non-zero 'time offset' parameter, should -// the waypoints shown for the canvas be adjusted? This currently only -// partially works - see the TODO at the end of layer_pastecanvas.cpp -#define ADJUST_WAYPOINTS_FOR_TIME_OFFSET - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class TimePoint -{ - GUID guid; - Time time; - Interpolation before,after; -public: - - TimePoint(const Time& x=Time::begin()): - guid(0), - time(x), - before(INTERPOLATION_NIL), - after(INTERPOLATION_NIL) - { - } - -#ifdef _DEBUG - const char *c_str()const; -#endif - - const GUID& get_guid()const { return guid; } - const Time& get_time()const { return time; } - Interpolation get_before()const { return before; } - Interpolation get_after()const { return after; } - - void set_guid(const GUID& x) { guid=x; } - void set_time(const Time& x) { time=x; } - void set_before(Interpolation x) { before=x; } - void set_after(Interpolation x) { after=x; } - - void absorb(const TimePoint& x); -}; // END of class TimePoint - -inline TimePoint operator+(TimePoint lhs,const Time& rhs) - { lhs.set_time(lhs.get_time()+rhs); return lhs; } - -inline TimePoint operator-(TimePoint lhs,const Time& rhs) - { lhs.set_time(lhs.get_time()-rhs); return lhs; } - -inline bool operator<(const TimePoint& lhs,const TimePoint& rhs) - { return lhs.get_time() -{ -public: - iterator insert(const TimePoint& x); - - template void insert(ITER begin, ITER end) - { for(;begin!=end;++begin) insert(*begin); } - -}; // END of class TimePointSet - -class Node : public etl::rshared_object -{ - /* - -- ** -- T Y P E S ----------------------------------------------------------- - */ - -public: - - //! \writeme - typedef TimePointSet time_set; - - /* - -- ** -- D A T A ------------------------------------------------------------- - */ - -private: - - //! \writeme - GUID guid_; - - //! cached time values for all the children - mutable time_set times; - - //! \writeme - mutable bool bchanged; - - //! \writeme - mutable int time_last_changed_; - - //! \writeme - mutable RWLock rw_lock_; - - //! \writeme - bool deleting_; - -public: - - //! \todo This should really be private - std::set parent_set; - - /* - -- ** -- S I G N A L S ------------------------------------------------------- - */ - -private: - - sigc::signal signal_changed_; - - //! GUID Changed - /*! \note The second parameter is the *OLD* guid! */ - sigc::signal signal_guid_changed_; - - //! Deleted - sigc::signal signal_deleted_; - - /* - -- ** -- S I G N A L I N T E R F A C E ------------------------------------- - */ - -public: - - sigc::signal& signal_deleted() { return signal_deleted_; } - - sigc::signal& signal_changed() { return signal_changed_; } - - //! GUID Changed - /*! \note The second parameter is the *OLD* guid! */ - sigc::signal& signal_guid_changed() { return signal_guid_changed_; } - - /* - -- ** -- C O N S T R U C T O R S --------------------------------------------- - */ - -protected: - - Node(); - - // This class cannot be copied -- use clone() if necessary -private: - Node(const Node &x); - -public: - virtual ~Node(); - - /* - -- ** -- M E M B E R F U N C T I O N S ------------------------------------- - */ - -public: - - void changed(); - - //! Gets the GUID for this value node - const GUID& get_guid()const; - - //! Sets the GUID for this value node - void set_guid(const GUID& x); - - int get_time_last_changed()const; - - void add_child(Node*x); - - void remove_child(Node*x); - - int parent_count()const; - - const time_set &get_times() const; - - RWLock& get_rw_lock()const { return rw_lock_; } - -protected: - - void begin_delete(); - - /* - -- ** -- V I R T U A L F U N C T I O N S ----------------------------------- - */ - -protected: - virtual void on_changed(); - - virtual void on_guid_changed(GUID guid); - - /*! Function to be overloaded that fills - */ - virtual void get_times_vfunc(time_set &set) const = 0; -}; - -synfig::Node* find_node(const synfig::GUID& guid); - -template etl::handle -guid_cast(const synfig::GUID& guid) -{ - return etl::handle::cast_dynamic(synfig::find_node(guid)); -} - -#ifdef _DEBUG -template -synfig::String set_string(T start, T end) -{ - synfig::String ret("["); - bool started = false; - - while (start != end) - { - if (started) ret += ", "; - else started = true; - - ret += synfig::String((*start).c_str()); - start++; - } - - return ret + "]"; -} - -template -synfig::String set_string(T set) -{ - return set_string(set.begin(), set.end()); -} -#endif // _DEBUG - -typedef etl::handle NodeHandle; - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/nodebase.h b/synfig-core/trunk/src/synfig/nodebase.h deleted file mode 100644 index f0bb735..0000000 --- a/synfig-core/trunk/src/synfig/nodebase.h +++ /dev/null @@ -1,102 +0,0 @@ -#if 0 // this file is not used -/* === S Y N F I G ========================================================= */ -/*! \file nodebase.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_NODEBASE_H -#define __SYNFIG_NODEBASE_H - -/* === H E A D E R S ======================================================= */ - -#include "protocol.h" -#include "string.h" -#include "guid.h" -#include - -/* === M A C R O S ========================================================= */ - -#define PX_DEFINE_DATA(name,type) \ - PX_DEFINE_FUNC_CONST0(get_##name, type) \ - PX_DEFINE_FUNC1(set_##name, void, type) - -#define PX_DEFINE_FUNC0(name,ret) \ - sigc::slot< ret > _slot_##name; \ - ret name() { \ - return _slot_##name(); \ - } - -#define PX_DEFINE_FUNC1(name,ret,type) \ - sigc::slot< ret, type > _slot_##name; \ - ret name(type v1) { \ - return _slot_##name(v1); \ - } -#define PX_DEFINE_FUNC2(name,ret,type1,type2) \ - sigc::slot< ret, type1, type2 > _slot_##name; \ - ret name(type1 v1, type2 v2) { \ - return _slot_##name(v1,v2); \ - } -#define PX_DEFINE_FUNC_CONST0(name,ret) \ - sigc::slot< ret > _slot_##name##_const; \ - ret name()const { \ - return _slot_##name##_const(); \ - } - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { -namespace Proto { - -typedef int Query; -typedef int NodeList; - -class NodeBase : public Protocol -{ -public: - - PX_DEFINE_DATA(guid, GUID) - - PX_DEFINE_FUNC2(func_test, float, int, int) - - PX_DEFINE_DATA(id, String) - - PX_DEFINE_DATA(root, NodeHandle) - - PX_DEFINE_FUNC0(signal_changed, sigc::signal) - PX_DEFINE_FUNC0(signal_deleted, sigc::signal) - - PX_DEFINE_FUNC_CONST0(get_parents, NodeList) - PX_DEFINE_FUNC_CONST0(get_children, NodeList) - - PX_DEFINE_FUNC1(query_children, NodeList, Query) - -}; // END of class Proto::NodeBase - -}; // END of namespace Proto -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif -#endif diff --git a/synfig-core/trunk/src/synfig/palette.cpp b/synfig-core/trunk/src/synfig/palette.cpp deleted file mode 100644 index 16742a4..0000000 --- a/synfig-core/trunk/src/synfig/palette.cpp +++ /dev/null @@ -1,359 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file palette.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "palette.h" -#include "surface.h" -#include "general.h" -#include -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -#define PALETTE_FILE_COOKIE "SYNFIGPAL1.0" - -/* === G L O B A L S ======================================================= */ - -bool weight_less_than(const PaletteItem& lhs,const PaletteItem& rhs) -{ - return lhs.weightadd(color); - continue; - } - - /*if(size()>=max_colors) - { - iterator iterlight(find_light()); - PaletteItem light(*iterlight); - erase(iterlight); - find_closest(light.color)->add(light.color,light.weight); - } - */ - - push_back(color); - continue; - } - -/* - - max_colors-=2; - for(int y=0;yadd(color); - continue; - } - - - push_back(color); - continue; - } - sort(rbegin(),rend()); - - iterator iter; - - iterator best_match(begin()); - while((signed)size()>max_colors) - { - PaletteItem item(back()); - pop_back(); - find_closest(item.color)->add(item.color,item.weight); - } -*/ - push_back(Color::black()); - push_back(Color::white()); - -// sort(begin(),end(),&luma_less_than); -} - -Palette::const_iterator -Palette::find_closest(const Color& color, float* dist)const -{ - // For the sake of avoiding cut-and-paste - // bugs, we'll just use the non-const - // find_closest()... It doesn't change anything - // anyway. - return const_cast(this)->find_closest(color,dist); -} - -Palette::iterator -Palette::find_closest(const Color& color, float* dist) -{ - iterator iter; - - iterator best_match(begin()); - float best_dist(1000000); - - const float prep_y(powf(color.get_y(),2.2f)*color.get_a()); - const float prep_u(color.get_u()); - const float prep_v(color.get_v()); - - for(iter=begin();iter!=end();++iter) - { - const float diff_y(prep_y-powf(iter->color.get_y(),2.2f)*iter->color.get_a()); - const float diff_u(prep_u-iter->color.get_u()); - const float diff_v(prep_v-iter->color.get_v()); - const float diff_a(color.get_a()-iter->color.get_a()); - - - const float dist( - diff_y*diff_y*1.5f+ - diff_a*diff_a+ - - diff_u*diff_u+ - diff_v*diff_v - - // cross product - /*abs( - prep_u*iter->color.get_u()- - prep_v*iter->color.get_v() - )*/ - ); - if(distweight>best_match->weight) - best_match=iter; - } - - return best_match; -} - -Palette::iterator -Palette::find_light() -{ - iterator iter; - - iterator best_match(begin()); - - for(iter=begin();iter!=end();++iter) - { - if(iter->weightweight) - best_match=iter; - } - - return best_match; -} - -Palette -Palette::grayscale(int steps) -{ - Palette ret; - for(int i=0;iname<color.get_r()<color.get_g()<color.get_b()<color.get_a()< - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class Surface; - -struct PaletteItem -{ - Color color; - String name; - int weight; - - PaletteItem():weight(1) { } - - PaletteItem(const Color& color, const String& name, int weight=1): - color(color),name(name),weight(weight) { } - - PaletteItem(const Color& color, int weight=1): - color(color),weight(weight) { } - - void add(const Color& x, int weight=1); - - bool operator<(const PaletteItem& rhs)const { return weight -{ - String name_; - -public: - Palette(); - Palette(const String& name_); - - /*! Generates a palette for the given - ** surface - */ - Palette(const Surface& surface, int size=256); - - iterator find_closest(const Color& color, float* dist=0); - const_iterator find_closest(const Color& color, float* dist=0)const; - - iterator find_heavy(); - - iterator find_light(); - - static Palette grayscale(int steps=16); - - void save_to_file(const synfig::String& filename)const; - - static Palette load_from_file(const synfig::String& filename); -}; // END of class Palette - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/paramdesc.cpp b/synfig-core/trunk/src/synfig/paramdesc.cpp deleted file mode 100644 index 8947f19..0000000 --- a/synfig-core/trunk/src/synfig/paramdesc.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file paramdesc.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "paramdesc.h" -#include "value.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ParamDesc::ParamDesc(synfig::Color::BlendMethod, const String &a): - name_ (a), - local_name_ (a), - scalar_ (1.0), - critical_ (true), - hidden_ (false), - invisible_duck_ (false), - is_distance_ (false), - animation_only_ (false) -{ - set_local_name(_("Blend Method")) - .set_hint("enum") // used shortcuts: A B C D E F G H I K L M N O P R S T U V Y; free: J Q W X Z - .add_enum_value(Color::BLEND_COMPOSITE, "composite", _("_Composite" )) - .add_enum_value(Color::BLEND_STRAIGHT, "straight", _("_Straight" )) - .add_enum_value(Color::BLEND_ONTO, "onto", _("_Onto" )) - .add_enum_value(Color::BLEND_STRAIGHT_ONTO, "straightonto", _("S_traight Onto" )) - .add_enum_value(Color::BLEND_BEHIND, "behind", _("_Behind" )) - .add_enum_value(Color::BLEND_SCREEN, "screen", _("Sc_reen" )) - .add_enum_value(Color::BLEND_OVERLAY, "overlay", _("Overla_y" )) - .add_enum_value(Color::BLEND_HARD_LIGHT, "hard_light", _("_Hard Light" )) - .add_enum_value(Color::BLEND_MULTIPLY, "multiply", _("_Multiply" )) - .add_enum_value(Color::BLEND_DIVIDE, "divide", _("_Divide" )) - .add_enum_value(Color::BLEND_ADD, "add", _("_Add" )) - .add_enum_value(Color::BLEND_SUBTRACT, "subtract", _("S_ubtract" )) - .add_enum_value(Color::BLEND_DIFFERENCE, "difference", _("Di_fference" )) - .add_enum_value(Color::BLEND_BRIGHTEN, "brighten", _("Bri_ghten" )) - .add_enum_value(Color::BLEND_DARKEN, "darken", _("Dar_ken" )) - .add_enum_value(Color::BLEND_COLOR, "color", _("Co_lor" )) - .add_enum_value(Color::BLEND_HUE, "hue", _("Hu_e" )) - .add_enum_value(Color::BLEND_SATURATION, "saturation", _("Saturatio_n" )) - .add_enum_value(Color::BLEND_LUMINANCE, "luminance", _("Lum_inance" )) - // These are deprecated - .add_enum_value(Color::BLEND_ALPHA_OVER, "alphaover", _("Alpha O_ver" )) - .add_enum_value(Color::BLEND_ALPHA_BRIGHTEN, "alphabrighten", _("Al_pha Brighten" )) - .add_enum_value(Color::BLEND_ALPHA_DARKEN, "alphadarken", _("Al_pha Darken" )) - ; // end of enums -} - -ParamDesc::ParamDesc(const ValueBase&, const String &a): - name_ (a), - local_name_ (a), - scalar_ (1.0), - critical_ (true), - hidden_ (false), - invisible_duck_ (false), - is_distance_ (false), - animation_only_ (false) -{ -} diff --git a/synfig-core/trunk/src/synfig/paramdesc.h b/synfig-core/trunk/src/synfig/paramdesc.h deleted file mode 100644 index 2e0f0ad..0000000 --- a/synfig-core/trunk/src/synfig/paramdesc.h +++ /dev/null @@ -1,226 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file paramdesc.h -** \brief ParamDesc Class Implementation -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_PARAMDESC_H -#define __SYNFIG_PARAMDESC_H - -/* === H E A D E R S ======================================================= */ - -#include "string.h" -#include "real.h" -#include "color.h" -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class ValueBase; - -/*! \class ParamDesc -** \brief Parameter Description Class -** \todo writeme -*/ -class ParamDesc -{ -public: - - //! \writeme - struct EnumData - { - int value; - String name; - String local_name; - EnumData(int value, const String &name, const String &local_name): - value(value), - name(name), - local_name(local_name) - { - } - }; - - /* - -- ** -- D A T A ------------------------------------------------------------- - */ - -private: - String name_; //! The actual parameter name - String local_name_; //! Localized name - String desc_; //! Short description of parameter (Think tooltops) - String group_; //! Which group this parameter is a member of (optional) - String hint_; //! Parameter hint - String origin_; //! Parameter origin - String connect_; - String box_; - Real scalar_; //! Scalar value for visual editing - bool critical_; - bool hidden_; - bool invisible_duck_; - bool is_distance_; - bool animation_only_; - - std::list enum_list_; - - /* - -- ** -- C O N S T R U C T O R S --------------------------------------------- - */ - -public: - - ParamDesc(const String &a="IM_A_BUG_SO_REPORT_ME"): - name_ (a), - local_name_ (a), - scalar_ (1.0), - critical_ (true), - hidden_ (false), - invisible_duck_ (false), - is_distance_ (false), - animation_only_ (false) - { } - - ParamDesc(const ValueBase&, const String &a); - - ParamDesc(synfig::Color::BlendMethod, const String &a); - - - /* - -- ** -- M E M B E R F U N C T I O N S ------------------------------------- - */ - -public: - - //! \writeme - const std::list &get_enum_list()const { return enum_list_; } - - //! Sets the localized name of the parameter. - ParamDesc &set_local_name(const String &n) { local_name_=n; return *this; } - - //! Sets the localized description of the parameter. - ParamDesc &set_description(const String &d) { desc_=d; return *this; } - - //! Sets the group that this parameter is a member of - ParamDesc &set_group(const String &n) { group_=n; return *this; } - - //! Sets a "hint" for the parameter. - ParamDesc &set_hint(const String &h) { hint_=h; return *this; } - - //! \writeme - ParamDesc &set_connect(const String &h) { connect_=h; return *this; } - - //! \writeme - ParamDesc &set_box(const String &h) { box_=h; return *this; } - - //! Sets a flag regarding the duck visibility - ParamDesc &set_invisible_duck(bool x=true) { invisible_duck_=x; return *this; } - - //! Returns the flag regarding duck visibility - bool get_invisible_duck() { return invisible_duck_; } - - - //! \writeme - ParamDesc &set_animation_only(bool x=true) { animation_only_=x; return *this; } - - //! \writeme - bool get_animation_only() { return animation_only_; } - - - //! Sets which parameter is to be used as the origin when the user edits visually. - ParamDesc &set_origin(const String &h) { origin_=h; return *this; } - - //! Sets the scalar value for the parameter - /*! This value determines how the value is to be presented - ** to the user when editing visually. */ - ParamDesc &set_scalar(const Real &n) { scalar_=n; return *this; } - - //! Marks the parameter as not necessary for saving or copying - ParamDesc ¬_critical() { critical_=false; return *this; } - - //! \writeme - ParamDesc &hidden() { hidden_=true; return *this; } - - //! Marks the parameter as only readable. Implies not_critical() - /*! \todo This function needs to be written, as it is only a stub */ - ParamDesc &read_only() { return *this; } - - //! Marks the parameter as only writable. Implies not_critical() - /*! \todo This function needs to be written, as it is only a stub */ - ParamDesc &write_only() { return *this; } - - //! Adds a description of a possible enumeration value - /*! Only relevant if the parameter is of an integer type and hint set to \c "enum" . */ - ParamDesc &add_enum_value(int val, const String &enum_name,const String &enum_local_name) - { enum_list_.push_back(EnumData(val,enum_name,enum_local_name)); return *this; } - - //! Returns the localized name of the parameter - const String &get_local_name()const { return local_name_; } - - //! Returns the name of the parameter - const String &get_name()const { return name_; } - - //! Returns the localized description of the parameter - const String &get_description()const { return desc_; } - - //! Returns the parameter's group - const String &get_group()const { return group_; } - - //! Returns a "hint" about the parameter, regarding how it is to be displayed to the user - const String &get_hint()const { return hint_; } - - //! Returns the name of the parameter that is defined as the "origin". Used for visual editing. - const String &get_origin()const { return origin_; } - - //! \writeme - const String &get_connect()const { return connect_; } - - //! \writeme - const String &get_box()const { return box_; } - - //! Returns the scalar value for the parameter. Used for visual editing. - const Real &get_scalar()const { return scalar_; } - - //! Returns \c true if the layer is critical, \c false otherwise. - bool get_critical()const { return critical_; } - - //! Returns \c true if the layer is hidden, \c false otherwise. - bool get_hidden()const { return hidden_; } - - - - ParamDesc& set_is_distance(bool x=true) { is_distance_=x; return *this;} - bool get_is_distance()const { return is_distance_; } -}; // END of class ParamDesc - -class ParamVocab : public std::list< ParamDesc > -{ -}; - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/pch.h b/synfig-core/trunk/src/synfig/pch.h deleted file mode 100644 index dc3c329..0000000 --- a/synfig-core/trunk/src/synfig/pch.h +++ /dev/null @@ -1,37 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file pch.h -** \brief Pre-Compiled Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_PCH_H -#define __SYNFIG_PCH_H - -/* === H E A D E R S ======================================================= */ - -#include -#include "synfig.h" - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/polynomial_root.cpp b/synfig-core/trunk/src/synfig/polynomial_root.cpp deleted file mode 100644 index 5098f3d..0000000 --- a/synfig-core/trunk/src/synfig/polynomial_root.cpp +++ /dev/null @@ -1,267 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file polynomial_root.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "polynomial_root.h" -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -//using namespace etl; -//using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ -typedef complex Complex; - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -#define EPSS 1.0e-7 -#define MR 8 -#define MT 10 -#define MAXIT (MT*MR) - -/*EPSS is the estimated fractional roundoff error. We try to break (rare) limit -cycles with MR different fractional values, once every MT steps, for MAXIT total allowed iterations. -*/ - -/* Explanation: - - A polynomial can be represented like so: - Pn(x) = (x - x1)(x - x2)...(x - xn) where xi = complex roots - - We can get the following: - ln|Pn(x)| = ln|x - x1| + ln|x - x2| + ... + ln|x - xn| - - G := d ln|Pn(x)| / dx = - +1/(x-x1) + 1/(x-x2) + ... + 1/(x-xn) - - and - - H := - d2 ln|Pn(x)| / d2x = - +1/(x-x1)^2 + 1/(x-x2)^2 + ... + 1/(x-xn)^2 - - which gives - H = [Pn'/Pn]^2 - Pn''/Pn - - Laguerre's formula guesses that the root we are seeking x1 is located - some distance a from our current guess x, and all the other roots are - located at distance b. - - Using this: - - 1/a + (n-1)/b = G - - and - - 1/a^2 + (n-1)/b^2 = H - - which yields this solution for a: - - a = n / G +- sqrt( (n-1)(nH - G^2) ) - - where +- is determined by which ever yields the largest magnitude for the denominator. - a can easily be complex since the factor inside the square-root can be negative. - - This method iterates (x=x-a) until a is sufficiently small. -*/ - -/* Given the degree m and the m+1 complex coefficients a[0..m] of the polynomial sum(i=0,m){a[i]x^i}, -and given a complex value x, this routine improves x by laguerre's method until it converges, -within the achievable roundoff limit, to a root of the given polynomial. The number of iterations taken -is returned as `its'. -*/ -void laguer(Complex a[], int m, Complex *x, int *its) -{ - int iter,j; - float abx, abp, abm, err; - Complex dx,x1,b,d,f,g,h,sq,gp,gm,g2; - - //Fractions used to break a limit cycle - static float frac[MR+1] = {0.0,0.5,0.25,0.75,0.13,0.38,0.62,0.88,1.0}; - - for(iter = 1; iter <= MAXIT; ++iter) - { - *its = iter; //number of iterations so far - - b = a[m]; //the highest coefficient - err = abs(b); //its magnitude - - d = f = Complex(0,0); //clear variables for use - abx = abs(*x); //the magnitude of the current root - - //Efficient computation of the polynomial and its first 2 derivatives - for(j = m-1; j >= 0; --j) - { - f = (*x)*f + d; - d = (*x)*d + b; - b = (*x)*b + a[j]; - - err = abs(b) + abx*err; - } - - //Estimate the roundoff error in evaluation polynomial - err *= EPSS; - - //Are we on the root? - if(abs(b) < err) - { - return; - } - - //General case: use Laguerre's formula - //a = n / G +- sqrt( (n-1)(nH - G^2) ) - //x = x - a - - g = d / b; //get G - g2 = g * g; //for the sqrt calc - - h = g2 - 2.0f * (f / b); //get H - - sq = pow( (float)(m-1) * ((float)m*h - g2), 0.5f ); //get the sqrt - - //get the denominator - gp = g + sq; - gm = g - sq; - - abp = abs(gp); - abm = abs(gm); - - //get the denominator with the highest magnitude - if(abp < abm) - { - abp = abm; - gp = gm; - } - - //if the denominator is positive do one thing, otherwise do the other - dx = (abp > 0.0) ? (float)m / gp : polar((1+abx),(float)iter); - x1 = *x - dx; - - //Have we converged? - if( *x == x1 ) - { - return; - } - - //Every so often take a fractional step, to break any limit cycle (itself a rare occurrence). - if( iter % MT ) - { - *x = x1; - }else - { - *x = *x - (frac[iter/MT]*dx); - } - } - - //very unusual - can occur only for complex roots. Try a different starting guess for the root. - //nrerror("too many iterations in laguer"); - return; -} - -#define EPS 2.0e-6 -#define MAXM 100 //a small number, and maximum anticipated value of m.. - -/* Given the degree m and the m+1 complex coefficients a[0..m] of the polynomial a0 + a1*x +...+ an*x^n - the routine successively calls laguer and finds all m complex roots in roots[1..m]. - The boolean variable polish should be input as true (1) if polishing (also by Laguerre's Method) - is desired, false (0) if the roots will be subsequently polished by other means. -*/ -void RootFinder::find_all_roots(bool polish) -{ - int i,its,j,jj; - Complex x,b,c; - int m = coefs.size()-1; - - //make sure roots is big enough - roots.resize(m); - - if(workcoefs.size() < MAXM) workcoefs.resize(MAXM); - - //Copy the coefficients for successive deflation - for(j = 0; j <= m; ++j) - { - workcoefs[j] = coefs[j]; - } - - //Loop over each root to be found - for(j = m-1; j >= 0; --j) - { - //Start at 0 to favor convergence to smallest remaining root, and find the root - x = Complex(0,0); - laguer(&workcoefs[0],j+1,&x,&its); //must add 1 to get the degree - - //if it is close enough to a real root, then make it so - if(abs(x.imag()) <= 2.0*EPS*abs(x.real())) - { - x = Complex(x.real()); - } - - roots[j] = x; - - //forward deflation - - //the degree is j+1 since j(0,m-1) - b = workcoefs[j+1]; - for(jj = j; jj >= 0; --jj) - { - c = workcoefs[jj]; - workcoefs[jj] = b; - b = x*b + c; - } - } - - //Polish the roots using the undeflated coefficients - if(polish) - { - for(j = 0; j < m; ++j) - { - laguer(&coefs[0],m,&roots[j],&its); - } - } - - //Sort roots by their real parts by straight insertion - for(j = 1; j < m; ++j) - { - x = roots[j]; - for( i = j-1; i >= 1; --i) - { - if(roots[i].real() <= x.real()) break; - roots[i+1] = roots[i]; - } - roots[i+1] = x; - } -} diff --git a/synfig-core/trunk/src/synfig/polynomial_root.h b/synfig-core/trunk/src/synfig/polynomial_root.h deleted file mode 100644 index 09e31e4..0000000 --- a/synfig-core/trunk/src/synfig/polynomial_root.h +++ /dev/null @@ -1,121 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file polynomial_root.h -** \brief Polynomial Root Finder Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_POLYNOMIAL_ROOT_H -#define __SYNFIG_POLYNOMIAL_ROOT_H - -/* === H E A D E R S ======================================================= */ - -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ -template < typename T = float, typename F = float > -class Polynomial : public std::vector //a0 + a1x + a2x^2 + ... + anx^n -{ -public: - - //Will maintain all lower constants - void degree(unsigned int d, const T & def = (T)0) { resize(d+1,def); } - unsigned int degree()const { return this->size() - 1; } - - const Polynomial & operator+=(const Polynomial &p) - { - if(p.size() > this->size()) - resize(p.size(), (T)0); - - for(int i = 0; i < p.size(); ++i) - { - (*this)[i] += p[i]; - } - return *this; - } - - const Polynomial & operator-=(const Polynomial &p) - { - if(p.size() > this->size()) - resize(p.size(), (T)0); - - for(int i = 0; i < p.size(); ++i) - { - (*this)[i] -= p[i]; - } - return *this; - } - - const Polynomial & operator*=(const Polynomial &p) - { - if(p.size() < 1) - { - this->resize(0); - return *this; - } - - unsigned int i,j; - std::vector nc(*this); - - //in place for constant stuff - for(i = 0; i < nc.size(); ++i) - { - (*this)[i] *= p[0]; - } - - if(p.size() < 2) return *this; - - this->resize(this->size() + p.degree()); - for(int i = 0; i < nc.size(); ++i) - { - for(int j = 1; j < p.size(); ++j) - { - nc[i+j] += nc[i]*p[j]; - } - } - - return *this; - } -}; - -class RootFinder -{ - std::vector< std::complex > workcoefs; - int its; - -public: - std::vector< std::complex > coefs; //the number of coefficients determines the degree of polynomial - - std::vector< std::complex > roots; - - void find_all_roots(bool polish); -}; - - - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/protocol.h b/synfig-core/trunk/src/synfig/protocol.h deleted file mode 100644 index 6853066..0000000 --- a/synfig-core/trunk/src/synfig/protocol.h +++ /dev/null @@ -1,68 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file protocol.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_PROTOCOL_H -#define __SYNFIG_PROTOCOL_H - -/* === H E A D E R S ======================================================= */ - -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/* - * class Object -{ -public: - - sigc::signal_ - bool find_protocol(Protocol& proto) - { - - } -}; -*/ - -class Protocol -{ -public: - class Type; - -}; // END of class Protocol - -class Protocol::Type -{ -}; // END of class Protocol::Type - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/quick_rng.h b/synfig-core/trunk/src/synfig/quick_rng.h deleted file mode 100644 index 3924cef..0000000 --- a/synfig-core/trunk/src/synfig/quick_rng.h +++ /dev/null @@ -1,85 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file quick_rng.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_QUICK_RNG_H -#define __SYNFIG_QUICK_RNG_H - -/* === H E A D E R S ======================================================= */ - -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -// A fast 32-bit linear congruential random number generator -class quick_rng -{ - uint32_t next; -public: - quick_rng(uint32_t seed=0):next(seed) { } - - void set_seed(uint32_t x) - { - next=x; - } - - uint32_t i32() - { - static const uint32_t a(1664525); - static const uint32_t c(1013904223); - - return next=next*a+c; - } - - uint32_t i16() - { - return i32()>>16; - } - - float f() - { - static const float m(int(65535)); - - return float(i16())/m; - } - - uint32_t operator()(const uint32_t& m) - { - if(m==65536) - return i16(); - else - if(m<=65536) - return i16()%m; - else - return i32()%m; - } -}; - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/real.h b/synfig-core/trunk/src/synfig/real.h deleted file mode 100644 index abc50c7..0000000 --- a/synfig-core/trunk/src/synfig/real.h +++ /dev/null @@ -1,41 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file real.h -** \brief Provides the synfig::Real typedef -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_REAL_H -#define __SYNFIG_REAL_H - -/* === T Y P E D E F S ===================================================== */ - -namespace synfig { - -/*! \typedef Real -** \todo writeme -*/ -typedef double Real; - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/rect.cpp b/synfig-core/trunk/src/synfig/rect.cpp deleted file mode 100644 index 9f97f9f..0000000 --- a/synfig-core/trunk/src/synfig/rect.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file rect.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "rect.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -Rect -Rect::full_plane() -{ - const double infinity(HUGE_VAL); - return Rect(-infinity, -infinity, infinity, infinity); -} - -Rect -Rect::horizontal_strip(const value_type &y1, const value_type &y2) -{ - const double infinity(HUGE_VAL); - return Rect(-infinity, y1, infinity, y2); -} - -Rect -Rect::vertical_strip(const value_type &x1, const value_type &x2) -{ - const double infinity(HUGE_VAL); - return Rect(x1, -infinity, x2, infinity); -} diff --git a/synfig-core/trunk/src/synfig/rect.h b/synfig-core/trunk/src/synfig/rect.h deleted file mode 100644 index cc21e1f..0000000 --- a/synfig-core/trunk/src/synfig/rect.h +++ /dev/null @@ -1,182 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file rect.h -** \brief Rectangle Class -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_RECT_H -#define __SYNFIG_RECT_H - -/* === H E A D E R S ======================================================= */ - -#include -#include "real.h" -#include "vector.h" -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class Rect : public etl::rect -{ -public: - - using etl::rect::set_point; - using etl::rect::expand; - using etl::rect::set; - - static Rect full_plane(); - - static Rect horizontal_strip(const value_type &y1, const value_type &y2); - static Rect vertical_strip(const value_type &x1, const value_type &x2); - - static Rect zero() - { - return Rect( - 0, - 0, - 0, - 0 - ); - } - - Rect() { } - - Rect(const Point& x) { set_point(x); } - - Rect(const Point& min, const Point& max) { set_point(min); expand(max); } - - Rect(const value_type &x1,const value_type &y1) { set_point(x1,y1); } - - Rect(const value_type &x1,const value_type &y1, - const value_type &x2,const value_type &y2) - { - set_point(x1,y1); - expand(x2,y2); - } - - void set_point(const Point& max) { set_point(max[0],max[1]); } - - Rect& expand(const Point& max) { expand(max[0],max[1]); return *this; } - - Rect& expand(const Real& r) { minx-=r; miny-=r; maxx+=r; maxy+=r; return *this; } - - Rect& expand_x(const Real& r) { minx-=r; maxx+=r; return *this; } - - Rect& expand_y(const Real& r) { miny-=r; maxy+=r; return *this; } - - Rect& set(const Point& min,const Point& max) { set(min[0],min[1],max[0],max[1]); return *this; } - - Point get_min()const { return Point(minx,miny); } - Point get_max()const { return Point(maxx,maxy); } - - bool is_inside(const Point& x) { return x[0]>minx && x[0]miny && x[1]0.00000001 && area()>0.00000001) - etl::set_intersect(*this,*this,rhs); - else - *this=zero(); - return *this; - } - - Rect& operator|=(const Rect& rhs) - { - if(rhs.area()>0.00000001 && area()>0.00000001) - etl::set_union(*this,*this,rhs); - else - { - if(area() -#endif - -#include "renddesc.h" -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -#undef FLAGS -#define FLAGS(x,y) (((x)&(y))==(y)) - -/* === G L O B A L S ======================================================= */ - -/* === M E T H O D S ======================================================= */ - -RendDesc & -RendDesc::apply(const RendDesc &x) -{ - operator=(x); - return *this; -} - -const Color & -RendDesc::get_bg_color()const -{ - return background; -} - -RendDesc & -RendDesc::set_bg_color(const Color &bg) -{ - background=bg; return *this; -} - -Real -RendDesc::get_physical_w()const -{ - return (Real)get_w()/get_x_res(); -} - -Real -RendDesc::get_physical_h()const -{ - return (Real)get_h()/get_y_res(); -} - -RendDesc& -RendDesc::set_physical_w(Real w) -{ - set_w(round_to_int(w*get_x_res())); - return *this; -} - -RendDesc& -RendDesc::set_physical_h(Real h) -{ - set_h(round_to_int(h*get_y_res())); - return *this; -} - -int -RendDesc::get_w()const -{ - return w_; -} - -RendDesc & -RendDesc::set_w(int x) -{ - if(FLAGS(flags,LINK_PX_ASPECT)) // never set - { - h_=h_*x/w_; - w_=x; - } - else if(FLAGS(flags,LINK_PX_AREA)) // never set - { - //! \writeme - w_=x; - } - else if(FLAGS(flags,PX_ASPECT)) // "Pixel Aspect" - { - Vector d=br_-tl_; - float old_span=get_span(); - - // If we should preserve image width - if( FLAGS(flags,IM_W) // "Image Width" - || (FLAGS(flags,IM_ZOOMIN) && d[1]>d[1]/x*w_) // never set - || (FLAGS(flags,IM_ZOOMOUT) && d[1]d[0]/y*h_) // never set - || (FLAGS(flags,IM_ZOOMOUT) && d[0]time_end) - time_begin=time_end=x; - else - time_begin=x; - return *this; -} - - -const Time -RendDesc::get_time_end()const -{ - return time_end; -} - -RendDesc & -RendDesc::set_time_end(Time x) -{ - if(x -#include "rect.h" - -/* === M A C R O S ========================================================= */ - -#ifndef DPM2DPI -#define DPM2DPI(x) (float(x)/39.3700787402f) -#define DPI2DPM(x) (float(x)*39.3700787402f) -#endif - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/*! \class RendDesc -** \todo writeme -*/ -class RendDesc -{ -public: - enum Lock - { - PX_ASPECT=(1<<0), // "Pixel Aspect" in Locks and Links - PX_AREA=(1<<1), // not used - PX_W=(1<<2), // "Pixel Width" in Locks and Links - not used - PX_H=(1<<3), // "Pixel Height" in Locks and Links - not used - - IM_ASPECT=(1<<4), // "Image Aspect" in Locks and Links - IM_SPAN=(1<<5), // "Image Span" in Locks and Links - IM_W=(1<<6), // "Image Width" in Locks and Links - IM_H=(1<<7), // "Image Height" in Locks and Links - IM_ZOOMIN=(1<<8), // not used - IM_ZOOMOUT=(1<<9), // not used - - LINK_PX_ASPECT=(1<<10), // not used - LINK_PX_AREA=(1<<11), // not used - LINK_IM_ASPECT=(1<<12), // not used - LINK_IM_SPAN=(1<<13), // not used - LINK_IM_CENTER=(1<<14) // not used - }; - -private: - int w_,h_; - Real x_res; - Real y_res; - Point tl_, br_; - Point focus; - int a; - //Gamma gamma; - Color background; - int flags; - bool interlaced; - bool clamp; - - float frame_rate; - Time time_begin, time_end; - -public: - - enum - { - ANTIALIAS_UNIFORM, - ANTIALIAS_MONTE_CARLO, - ANTIALIAS_JITTERED, - ANTIALIAS_ADAPTIVE, - ANTIALIAS_QUINTCUNX - } AntialiasFilter; - - //! Default Constructor - RendDesc(): - w_ (480), - h_ (270), - x_res (DPI2DPM(72.0f)), - y_res (DPI2DPM(72.0f)), - tl_ (-4,2.25), - br_ (4,-2.25), - focus (0,0), - a (2), - background (Color::gray()), - flags (0), - interlaced (false), - clamp (false), - frame_rate (24), - time_begin (0), - time_end (0) - { } - - //! \writeme - RendDesc &apply(const RendDesc &x); - - //! \writeme - const Color &get_bg_color()const; - - //! \writeme - RendDesc &set_bg_color(const Color &bg); - - //! Return the width of the composition in pixels - int get_w()const; - - //! Set the width of the composition in pixels. - /*! The other parameters are adjusted according to the - ** constraints placed on the flags. - */ - RendDesc &set_w(int x); - - //! Return the height of the composition in pixels - int get_h()const; - - //! Set the height of the composition in pixels. - /*! The other parameters are adjusted according to the - ** constraints placed on the flags. - */ - RendDesc &set_h(int y); - - //! Sets the width and height of the composition in pixels - RendDesc &set_wh(int x, int y); - - //! Returns the horizontal resolution (in dots per meter) - Real get_x_res()const; - - //! Sets the horizontal resolution (in dots per meter) - RendDesc &set_x_res(Real x); - - //! Returns the vertical resolution (in dots per meter) - Real get_y_res()const; - - //! Sets the vertical resolution (in dots per meter) - RendDesc &set_y_res(Real y); - - - //! Return the physical width of the composition in meters - Real get_physical_w()const; - - //! Return the physical height of the composition in meters - Real get_physical_h()const; - - //! Set the physical width of the composition in meters - RendDesc &set_physical_w(Real w); - - //! Set the physical height of the composition in meters - RendDesc &set_physical_h(Real h); - - - //! Return the index of the first frame - int get_frame_start()const; - - //! Set the index of the first frame - RendDesc &set_frame_start(int x); - - //! Return the index of the last frame - int get_frame_end()const; - - //! Set the index of the last frame - RendDesc &set_frame_end(int x); - - //! Return the starting time of the animation - const Time get_time_start()const; - - //! Set the time that the animation will start - RendDesc &set_time_start(Time x); - - //! Return the end time of the animation - const Time get_time_end()const; - - //! Set the time that the animation will end - RendDesc &set_time_end(Time x); - - //! Setup for one frame at the given time - RendDesc &set_time(Time x); - - //! Setup for one frame - RendDesc &set_frame(int x); - - //! Return the frame rate (frames-per-second) - const float &get_frame_rate()const; - - //! Set the frame rate (frames-per-second) - RendDesc &set_frame_rate(float x); - - //! Return the status of the interlaced flag - const bool &get_interlaced()const; - - //! Set the interlace flag - RendDesc &set_interlaced(bool x); - - //! Return the status of the clamp flag - const bool &get_clamp()const; - - //! Set the clamp flag - RendDesc &set_clamp(bool x); - - //! Set constraint flags - RendDesc &set_flags(const int &x); - - //! Clear constraint flags - RendDesc &clear_flags(); - - //! Get constraint flags - int get_flags()const; - - //! Return the aspect ratio of a single pixel - Point::value_type get_pixel_aspect()const; - - //! Return the aspect ratio of the entire image - Point::value_type get_image_aspect()const; - - //! Return the antialias amount - const int &get_antialias()const; - - //! Set the antialias amount - RendDesc &set_antialias(const int &x); - - //! Return the distance from the bottom-right to the top-left - Real get_span()const; - - //! Set the span distance - RendDesc& set_span(const Real &x); - - //const Gamma &get_gamma()const; - - //RendDesc &set_gamma(const Gamma &x); - - const Point &get_focus()const; - - RendDesc &set_focus(const Point &x); - - const Point &get_tl()const; - - RendDesc &set_tl(const Point &x); - - const Point &get_br()const; - - RendDesc &set_br(const Point &x); - - Rect get_rect()const { return Rect(get_tl(),get_br()); } - - RendDesc &set_viewport(const Point &__tl, const Point &__br); - - RendDesc &set_viewport(Vector::value_type a,Vector::value_type b,Vector::value_type c,Vector::value_type d); - - //! Returns the width of one pixel - Real get_pw()const; - - //! Returns the height of one pixel - Real get_ph()const; - - //! Sets viewport to represent the screen at the given pixel coordinates - RendDesc &set_subwindow(int x, int y, int w, int h); -}; // END of class RendDesc - -//! This operator allows the combining of RendDesc::Lock flags using the '|' operator -/*! \see RendDesc::Lock, RendDesc */ -inline RendDesc::Lock operator|(RendDesc::Lock lhs, RendDesc::Lock rhs) -{ - return static_cast((int)lhs|(int)rhs); -} - -//! This operator allows the masking of RendDesc::Lock flags using the '&' operator -/*! \see RendDesc::Lock, RendDesc */ -inline RendDesc::Lock operator&(RendDesc::Lock lhs, RendDesc::Lock rhs) -{ - return static_cast((int)lhs&(int)rhs); -} - -//! This operator allows the inverting of RendDesc::Lock flags using the '~' operator -/*! \see RendDesc::Lock, RendDesc */ -inline RendDesc::Lock operator~(RendDesc::Lock rhs) -{ - return static_cast(~(int)rhs); -} - -}; /* end namespace synfig */ - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/render.cpp b/synfig-core/trunk/src/synfig/render.cpp deleted file mode 100644 index af58a0e..0000000 --- a/synfig-core/trunk/src/synfig/render.cpp +++ /dev/null @@ -1,526 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file synfig/render.cpp -** \brief Renderer -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_NO_ANGLE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifndef WIN32 -#include -#include -#include -#endif - -#include "render.h" -#include "target.h" -#include "canvas.h" -#include -#include -#include "context.h" -#include "surface.h" - -#endif - -using namespace std; -using namespace synfig; -using namespace etl; - -/* === M A C R O S ========================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -bool -synfig::parametric_render( - Context context, - Surface &surface, - const RendDesc &desc, - ProgressCallback *callback -) -{ - Point::value_type - u,v, // Current location in image - su,sv, // Starting locations - du, dv, // Distance between pixels - dsu,dsv; // Distance between subpixels - - bool - no_clamp=!desc.get_clamp(); - - int - w(desc.get_w()), - h(desc.get_h()), - a(desc.get_antialias()); - - Point - tl(desc.get_tl()), - br(desc.get_br()); - - //Gamma - // gamma(desc.get_gamma()); - - int - x,y, // Current location on output bitmap - x2,y2; // Subpixel counters - - Color::value_type - pool; // Alpha pool (for correct alpha antialiasing) - - // Calculate the number of channels - //chan=channels(desc.get_pixel_format()); - - // Calculate the distance between pixels - du=(br[0]-tl[0])/(Point::value_type)w; - dv=(br[1]-tl[1])/(Point::value_type)h; - - // Calculate the distance between sub pixels - dsu=du/(Point::value_type)a; - dsv=dv/(Point::value_type)a; - - // Calculate the starting points - //su=tl[0]+(du-dsu)/(Point::value_type)2.0; - //sv=tl[1]-(dv-dsv)/(Point::value_type)2.0; - su=tl[0]; - sv=tl[1]; - - surface.set_wh(desc.get_w(),desc.get_h()); - - assert(surface); - - // Loop through all horizontal lines - for(y=0,v=sv;yamount_complete(y,h) == false ) - { - // If the callback returns false, - // then the render has been aborted. - - return false; - } - - // Loop through every pixel in row - for(x=0,u=su;xamount_complete(h,h); - - // Report our success - return(true); -} - -bool -synfig::render( - Context context, - Target_Scanline::Handle target, - const RendDesc &desc, - ProgressCallback *callback) -{ - Point::value_type - u,v, // Current location in image - su,sv, // Starting locations - du, dv, // Distance between pixels - dsu,dsv; // Distance between subpixels - - bool - no_clamp=!desc.get_clamp(); - - int - w(desc.get_w()), - h(desc.get_h()), - a(desc.get_antialias()); - - Point - tl(desc.get_tl()), - br(desc.get_br()); - - //Gamma - // gamma(desc.get_gamma()); - - int - x,y, // Current location on output bitmap - x2,y2; // Subpixel counters - - Color::value_type - pool; // Alpha pool (for correct alpha antialiasing) - - assert(target); - - // If we do not have a target then bail - if(!target) - return false; - - // Calculate the number of channels - //chan=channels(desc.get_pixel_format()); - - // Calculate the distance between pixels - du=(br[0]-tl[0])/(Point::value_type)w; - dv=(br[1]-tl[1])/(Point::value_type)h; - - // Calculate the distance between sub pixels - dsu=du/(Point::value_type)a; - dsv=dv/(Point::value_type)a; - - // Calculate the starting points - su=tl[0]+(du-dsu)/(Point::value_type)2.0; - sv=tl[1]-(dv-dsv)/(Point::value_type)2.0; - - // Mark the start of a new frame. - if(!target->start_frame(callback)) - return false; - - // Loop through all horizontal lines - for(y=0,v=sv;ystart_scanline(y); - - if(!colordata) - { - if(callback)callback->error(_("Target panic")); - else throw(string(_("Target panic"))); - return false; - } - - // If we have a callback that we need - // to report to, do so now. - if(callback) - if( callback->amount_complete(y,h) == false ) - { - // If the callback returns false, - // then the render has been aborted. - // Exit gracefully. - - target->end_scanline(); - target->end_frame(); - return false; - } - - // Loop through every pixel in row - for(x=0,u=su;xend_scanline()) - { - if(callback)callback->error(_("Target panic")); - else throw(string(_("Target panic"))); - return false; - } - } - - // Finish up the target's frame - target->end_frame(); - - // Give the callback one more last call, - // this time with the full height as the - // current line - if(callback) - callback->amount_complete(h,h); - - // Report our success - return(true); -} - -bool -synfig::render_threaded( - Context context, - Target_Scanline::Handle target, - const RendDesc &desc, - ProgressCallback *callback, - int threads) -{ -#ifndef WIN32 - struct _render_thread - { - int - pipe_read, - pipe_write, - pid; - _render_thread() - { - pipe(&pipe_read); - pid=0; - } - ~_render_thread() - { - close(pipe_read); - close(pipe_write); - if(pid) - { - kill(pid,9); - } - } - } *render_thread; - - int i, mythread=-1; - - Point::value_type - u,v, // Current location in image - su,sv, // Starting locations - du, dv, // Distance between pixels - dsu,dsv; // Distance between subpixels - - bool - no_clamp=!desc.get_clamp(); - - int - w(desc.get_w()), - h(desc.get_h()), - a(desc.get_antialias()); - - Point - tl(desc.get_tl()), - br(desc.get_br()); - - int - x,y, // Current location on output bitmap - x2,y2; // Subpixel counters - - Color::value_type - pool; // Alpha pool (for correct alpha antialiasing) - - assert(target); - - // If we do not have a target then bail - if(!target) - return false; - - // Calculate the distance between pixels - du=(br[0]-tl[0])/(Point::value_type)w; - dv=(br[1]-tl[1])/(Point::value_type)h; - - // Calculate the distance between sub pixels - dsu=du/(Point::value_type)a; - dsv=dv/(Point::value_type)a; - - // Calculate the starting points - su=tl[0]+(du-dsu)/(Point::value_type)2.0; - sv=tl[1]-(dv-dsv)/(Point::value_type)2.0; - - render_thread=new _render_thread[threads]; - - // Start the forks - for(i=0;istart_frame(callback)) - return false; - - for(y=0;ystart_scanline(y)); - - if(!colordata) - { - if(callback)callback->error(_("Target panic")); - else throw(string(_("Target panic"))); - return false; - } - - // If we have a callback that we need - // to report to, do so now. - if(callback) - if( callback->amount_complete(y,h) == false ) - { - // If the callback returns false, - // then the render has been aborted. - // Exit gracefully. - - target->end_scanline(); - target->end_frame(); - delete [] render_thread; - return false; - } - - read(render_thread[y%threads].pipe_read,colordata,w*sizeof(Color)); - - // Send the buffer to the render target. - // If anything goes wrong, cleanup and bail. - if(!target->end_scanline()) - { - delete [] render_thread; - if(callback)callback->error(_("Target panic")); - else throw(string(_("Target panic"))); - return false; - } - } - - // Finish up the target's frame - target->end_frame(); - - // Give the callback one more last call, - // this time with the full height as the - // current line - if(callback) - callback->amount_complete(h,h); - - delete [] render_thread; - return true; - -renderthread: - - // Change the random seed, so that each thread has a different one - srand(mythread*20+threads+time(0)); - - Color *buffer(new Color[w]); - - // Loop through all horizontal lines - for(y=mythread,v=sv+dv*(Real)mythread;y - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -//! Renders starting at \a context to \a target -/*! \warning \a Target::set_rend_desc() must have -** already been called on \a target before -** you call this function! -*/ -extern bool render(Context context, Target_Scanline::Handle target, const RendDesc &desc,ProgressCallback *); - -extern bool parametric_render(Context context, Surface &surface, const RendDesc &desc,ProgressCallback *); - -extern bool render_threaded( Context context, - Target_Scanline::Handle target, - const RendDesc &desc, - ProgressCallback *callback, - int threads); - -}; /* end namespace synfig */ - -/* -- E N D ----------------------------------------------------------------- */ - -#endif diff --git a/synfig-core/trunk/src/synfig/savecanvas.cpp b/synfig-core/trunk/src/synfig/savecanvas.cpp deleted file mode 100644 index a2ae0d9..0000000 --- a/synfig-core/trunk/src/synfig/savecanvas.cpp +++ /dev/null @@ -1,814 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file savecanvas.cpp -** \brief Writeme -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#ifdef HAVE_SYS_ERRNO_H -# include -#endif - -#include "savecanvas.h" -#include "general.h" -#include "valuenode.h" -#include "valuenode_subtract.h" -#include "valuenode_animated.h" -#include "valuenode_composite.h" -#include "valuenode_const.h" -#include "valuenode_linear.h" -#include "valuenode_dynamiclist.h" -#include "valuenode_reference.h" -#include "valuenode_segcalctangent.h" -#include "valuenode_segcalcvertex.h" -#include "valuenode_bline.h" -#include "time.h" -#include "keyframe.h" -#include "layer.h" -#include "string.h" -#include "paramdesc.h" - -#include -#include -#include "gradient.h" -#include - -extern "C" { -#include -} - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -#define COLOR_VALUE_TYPE_FORMAT "%f" -#define VECTOR_VALUE_TYPE_FORMAT "%0.10f" -#define TIME_TYPE_FORMAT "%0.3f" -#define VIEW_BOX_FORMAT "%f %f %f %f" - -/* === G L O B A L S ======================================================= */ - -ReleaseVersion save_canvas_version = ReleaseVersion(RELEASE_VERSION_END-1); -int valuenode_too_new_count; - -/* === P R O C E D U R E S ================================================= */ - -xmlpp::Element* encode_canvas(xmlpp::Element* root,Canvas::ConstHandle canvas); -xmlpp::Element* encode_value_node(xmlpp::Element* root,ValueNode::ConstHandle value_node,Canvas::ConstHandle canvas); - -xmlpp::Element* encode_keyframe(xmlpp::Element* root,const Keyframe &kf, float fps) -{ - root->set_name("keyframe"); - root->set_attribute("time",kf.get_time().get_string(fps)); - if(!kf.get_description().empty()) - root->set_child_text(kf.get_description()); - return root; -} - - -xmlpp::Element* encode_real(xmlpp::Element* root,Real v) -{ - root->set_name("real"); - root->set_attribute("value",strprintf(VECTOR_VALUE_TYPE_FORMAT,v)); - return root; -} - -xmlpp::Element* encode_time(xmlpp::Element* root,Time t, float /*fps*/=0) -{ - root->set_name("time"); - //root->set_attribute("value",t.get_string(fps)); - root->set_attribute("value",t.get_string()); - return root; -} - -xmlpp::Element* encode_integer(xmlpp::Element* root,int i) -{ - root->set_name("integer"); - root->set_attribute("value",strprintf("%i",i)); - return root; -} - -xmlpp::Element* encode_bool(xmlpp::Element* root,bool b) -{ - root->set_name("bool"); - root->set_attribute("value",b?"true":"false"); - return root; -} - -xmlpp::Element* encode_string(xmlpp::Element* root,const String &str) -{ - root->set_name("string"); - root->set_child_text(str); - return root; -} - -xmlpp::Element* encode_vector(xmlpp::Element* root,Vector vect) -{ - root->set_name("vector"); - root->add_child("x")->set_child_text(strprintf(VECTOR_VALUE_TYPE_FORMAT,(float)vect[0])); - root->add_child("y")->set_child_text(strprintf(VECTOR_VALUE_TYPE_FORMAT,(float)vect[1])); - return root; -} - -xmlpp::Element* encode_color(xmlpp::Element* root,Color color) -{ - root->set_name("color"); - root->add_child("r")->set_child_text(strprintf(COLOR_VALUE_TYPE_FORMAT,(float)color.get_r())); - root->add_child("g")->set_child_text(strprintf(COLOR_VALUE_TYPE_FORMAT,(float)color.get_g())); - root->add_child("b")->set_child_text(strprintf(COLOR_VALUE_TYPE_FORMAT,(float)color.get_b())); - root->add_child("a")->set_child_text(strprintf(COLOR_VALUE_TYPE_FORMAT,(float)color.get_a())); - return root; -} - -xmlpp::Element* encode_angle(xmlpp::Element* root,Angle theta) -{ - root->set_name("angle"); - root->set_attribute("value",strprintf("%f",(float)Angle::deg(theta).get())); - return root; -} - -xmlpp::Element* encode_segment(xmlpp::Element* root,Segment seg) -{ - root->set_name("segment"); - encode_vector(root->add_child("p1")->add_child("vector"),seg.p1); - encode_vector(root->add_child("t1")->add_child("vector"),seg.t1); - encode_vector(root->add_child("p2")->add_child("vector"),seg.p2); - encode_vector(root->add_child("t2")->add_child("vector"),seg.t2); - return root; -} - -xmlpp::Element* encode_bline_point(xmlpp::Element* root,BLinePoint bline_point) -{ - root->set_name(ValueBase::type_name(ValueBase::TYPE_BLINEPOINT)); - - encode_vector(root->add_child("vertex")->add_child("vector"),bline_point.get_vertex()); - encode_vector(root->add_child("t1")->add_child("vector"),bline_point.get_tangent1()); - - if(bline_point.get_split_tangent_flag()) - encode_vector(root->add_child("t2")->add_child("vector"),bline_point.get_tangent2()); - - encode_real(root->add_child("width")->add_child("real"),bline_point.get_width()); - encode_real(root->add_child("origin")->add_child("real"),bline_point.get_origin()); - return root; -} - -xmlpp::Element* encode_gradient(xmlpp::Element* root,Gradient x) -{ - root->set_name("gradient"); - - Gradient::const_iterator iter; - x.sort(); - for(iter=x.begin();iter!=x.end();iter++) - { - xmlpp::Element *cpoint(encode_color(root->add_child("color"),iter->color)); - cpoint->set_attribute("pos",strprintf("%f",iter->pos)); - } - return root; -} - - -xmlpp::Element* encode_value(xmlpp::Element* root,const ValueBase &data,Canvas::ConstHandle canvas=0); - -xmlpp::Element* encode_list(xmlpp::Element* root,std::list list, Canvas::ConstHandle canvas=0) -{ - root->set_name("list"); - - while(!list.empty()) - { - encode_value(root->add_child("value"),list.front(),canvas); - list.pop_front(); - } - - return root; -} - -xmlpp::Element* encode_value(xmlpp::Element* root,const ValueBase &data,Canvas::ConstHandle canvas) -{ - switch(data.get_type()) - { - case ValueBase::TYPE_REAL: - return encode_real(root,data.get(Real())); - case ValueBase::TYPE_TIME: - if(canvas) - return encode_time(root,data.get(Time()),canvas->rend_desc().get_frame_rate()); - else - return encode_time(root,data.get(Time())); - case ValueBase::TYPE_INTEGER: - return encode_integer(root,data.get(int())); - case ValueBase::TYPE_COLOR: - return encode_color(root,data.get(Color())); - case ValueBase::TYPE_VECTOR: - return encode_vector(root,data.get(Vector())); - case ValueBase::TYPE_ANGLE: - return encode_angle(root,data.get(Angle())); - case ValueBase::TYPE_BOOL: - return encode_bool(root,data.get(bool())); - case ValueBase::TYPE_STRING: - return encode_string(root,data.get(String())); - case ValueBase::TYPE_SEGMENT: - return encode_segment(root,data.get(Segment())); - case ValueBase::TYPE_BLINEPOINT: - return encode_bline_point(root,data.get(BLinePoint())); - case ValueBase::TYPE_GRADIENT: - return encode_gradient(root,data.get(Gradient())); - case ValueBase::TYPE_LIST: - return encode_list(root,data,canvas); - case ValueBase::TYPE_CANVAS: - return encode_canvas(root,data.get(Canvas::Handle()).get()); - case ValueBase::TYPE_NIL: - synfig::error("Encountered NIL ValueBase"); - root->set_name("nil"); - return root; - default: - synfig::error(strprintf(_("Unknown value(%s), cannot create XML representation!"),ValueBase::type_local_name(data.get_type()).c_str())); - root->set_name("nil"); - return root; - } -} - -xmlpp::Element* encode_animated(xmlpp::Element* root,ValueNode_Animated::ConstHandle value_node,Canvas::ConstHandle canvas=0) -{ - assert(value_node); - root->set_name("animated"); - - root->set_attribute("type",ValueBase::type_name(value_node->get_type())); - - const ValueNode_Animated::WaypointList &waypoint_list=value_node->waypoint_list(); - ValueNode_Animated::WaypointList::const_iterator iter; - - for(iter=waypoint_list.begin();iter!=waypoint_list.end();++iter) - { - xmlpp::Element *waypoint_node=root->add_child("waypoint"); - //waypoint_node->set_attribute("time",iter->get_time().get_string(canvas->rend_desc().get_frame_rate())); - waypoint_node->set_attribute("time",iter->get_time().get_string()); - - //waypoint_node->add_child(encode_value(iter->get_value(),canvas)); - if(iter->get_value_node()->is_exported()) - waypoint_node->set_attribute("use",iter->get_value_node()->get_relative_id(canvas)); - else { - ValueNode::ConstHandle value_node = iter->get_value_node(); - if(ValueNode_Const::ConstHandle::cast_dynamic(value_node)) { - const ValueBase data = ValueNode_Const::ConstHandle::cast_dynamic(value_node)->get_value(); - if (data.get_type() == ValueBase::TYPE_CANVAS) - waypoint_node->set_attribute("use",data.get(Canvas::Handle()).get()->get_relative_id(canvas)); - else - encode_value_node(waypoint_node->add_child("value_node"),iter->get_value_node(),canvas); - } - else - encode_value_node(waypoint_node->add_child("value_node"),iter->get_value_node(),canvas); - } - - switch(iter->get_before()) - { - case INTERPOLATION_HALT: - waypoint_node->set_attribute("before","halt"); - break; - case INTERPOLATION_LINEAR: - waypoint_node->set_attribute("before","linear"); - break; - case INTERPOLATION_MANUAL: - waypoint_node->set_attribute("before","manual"); - break; - case INTERPOLATION_CONSTANT: - waypoint_node->set_attribute("before","constant"); - break; - case INTERPOLATION_TCB: - waypoint_node->set_attribute("before","auto"); - break; - default: - error("Unknown waypoint type for \"before\" attribute"); - } - - switch(iter->get_after()) - { - case INTERPOLATION_HALT: - waypoint_node->set_attribute("after","halt"); - break; - case INTERPOLATION_LINEAR: - waypoint_node->set_attribute("after","linear"); - break; - case INTERPOLATION_MANUAL: - waypoint_node->set_attribute("after","manual"); - break; - case INTERPOLATION_CONSTANT: - waypoint_node->set_attribute("after","constant"); - break; - case INTERPOLATION_TCB: - waypoint_node->set_attribute("after","auto"); - break; - default: - error("Unknown waypoint type for \"after\" attribute"); - } - - if(iter->get_tension()!=0.0) - waypoint_node->set_attribute("tension",strprintf("%f",iter->get_tension())); - if(iter->get_temporal_tension()!=0.0) - waypoint_node->set_attribute("temporal-tension",strprintf("%f",iter->get_temporal_tension())); - if(iter->get_continuity()!=0.0) - waypoint_node->set_attribute("continuity",strprintf("%f",iter->get_continuity())); - if(iter->get_bias()!=0.0) - waypoint_node->set_attribute("bias",strprintf("%f",iter->get_bias())); - - } - - return root; -} - -xmlpp::Element* encode_subtract(xmlpp::Element* root,ValueNode_Subtract::ConstHandle value_node,Canvas::ConstHandle canvas=0) -{ - assert(value_node); - root->set_name("subtract"); - - ValueNode::ConstHandle lhs=value_node->get_lhs(); - ValueNode::ConstHandle rhs=value_node->get_rhs(); - ValueNode::ConstHandle scalar=value_node->get_scalar(); - - assert(lhs); - assert(rhs); - - root->set_attribute("type",ValueBase::type_name(value_node->get_type())); - - if(lhs==rhs) - warning("LHS is equal to RHS, this will always be zero!"); - - //if(value_node->get_scalar()!=1) - // root->set_attribute("scalar",strprintf(VECTOR_VALUE_TYPE_FORMAT,value_node->get_scalar())); - - if(!scalar->get_id().empty()) - root->set_attribute("scalar",scalar->get_relative_id(canvas)); - else - encode_value_node(root->add_child("scalar")->add_child("value_node"),scalar,canvas); - - if(!lhs->get_id().empty()) - root->set_attribute("lhs",lhs->get_relative_id(canvas)); - else - encode_value_node(root->add_child("lhs")->add_child("value_node"),lhs,canvas); - - if(!rhs->get_id().empty()) - root->set_attribute("rhs",rhs->get_relative_id(canvas)); - else - encode_value_node(root->add_child("rhs")->add_child("value_node"),rhs,canvas); - - return root; -} - -xmlpp::Element* encode_dynamic_list(xmlpp::Element* root,ValueNode_DynamicList::ConstHandle value_node,Canvas::ConstHandle canvas=0) -{ - assert(value_node); - const float fps(canvas?canvas->rend_desc().get_frame_rate():0); - - root->set_name(value_node->get_name()); - - root->set_attribute("type",ValueBase::type_name(value_node->get_contained_type())); - - vector::const_iterator iter; - - ValueNode_BLine::ConstHandle bline_value_node(ValueNode_BLine::ConstHandle::cast_dynamic(value_node)); - - if(bline_value_node) - { - if(bline_value_node->get_loop()) - root->set_attribute("loop","true"); - else - root->set_attribute("loop","false"); - } - - for(iter=value_node->list.begin();iter!=value_node->list.end();++iter) - { - xmlpp::Element *entry_node=root->add_child("entry"); - assert(iter->value_node); - if(!iter->value_node->get_id().empty()) - entry_node->set_attribute("use",iter->value_node->get_relative_id(canvas)); - else - encode_value_node(entry_node->add_child("value_node"),iter->value_node,canvas); - - // process waypoints - { - typedef synfig::ValueNode_DynamicList::ListEntry::Activepoint Activepoint; - typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; - String begin_sequence; - String end_sequence; - - const ActivepointList& timing_info(iter->timing_info); - ActivepointList::const_iterator entry_iter; - - for(entry_iter=timing_info.begin();entry_iter!=timing_info.end();++entry_iter) - if(entry_iter->state==true) - { - if(entry_iter->priority) - begin_sequence+=strprintf("p%d ",entry_iter->priority); - begin_sequence+=entry_iter->time.get_string(fps)+", "; - } - else - { - if(entry_iter->priority) - end_sequence+=strprintf("p%d ",entry_iter->priority); - end_sequence+=entry_iter->time.get_string(fps)+", "; - } - - // If this is just a plane-jane vanilla entry, - // then don't bother with begins and ends - if(end_sequence.empty() && begin_sequence=="SOT, ") - begin_sequence.clear(); - - if(!begin_sequence.empty()) - { - // Remove the last ", " stuff - begin_sequence=String(begin_sequence.begin(),begin_sequence.end()-2); - // Add the attribute - entry_node->set_attribute("on",begin_sequence); - } - - if(!end_sequence.empty()) - { - // Remove the last ", " stuff - end_sequence=String(end_sequence.begin(),end_sequence.end()-2); - // Add the attribute - entry_node->set_attribute("off",end_sequence); - } - } - } - - return root; -} - -// Generic linkable data node entry -xmlpp::Element* encode_linkable_value_node(xmlpp::Element* root,LinkableValueNode::ConstHandle value_node,Canvas::ConstHandle canvas=0) -{ - assert(value_node); - - String name(value_node->get_name()); - ReleaseVersion saving_version(get_file_version()); - ReleaseVersion feature_version(LinkableValueNode::book()[name].release_version); - - if (saving_version < feature_version) - { - valuenode_too_new_count++; - warning("can't save <%s> valuenodes in this old file format version", name.c_str()); - - ValueBase value((*value_node)(0)); - encode_value(root,value,canvas); - - // ValueNode_Const::ConstHandle const_value(ValueNode_Const::create((*value_node)(0))); - // encode_value_node(root,const_value,canvas); - - return root; - } - - root->set_name(name); - - root->set_attribute("type",ValueBase::type_name(value_node->get_type())); - - int i; - for(i=0;ilink_count();i++) - { - ValueNode::ConstHandle link=value_node->get_link(i).constant(); - if(!link) - throw runtime_error("Bad link"); - if(link->is_exported()) - root->set_attribute(value_node->link_name(i),link->get_relative_id(canvas)); - else - encode_value_node(root->add_child(value_node->link_name(i))->add_child("value_node"),link,canvas); - } - - return root; -} - -xmlpp::Element* encode_value_node(xmlpp::Element* root,ValueNode::ConstHandle value_node,Canvas::ConstHandle canvas) -{ - assert(value_node); - - if(ValueNode_Animated::ConstHandle::cast_dynamic(value_node)) - encode_animated(root,ValueNode_Animated::ConstHandle::cast_dynamic(value_node),canvas); - else - if(ValueNode_Subtract::ConstHandle::cast_dynamic(value_node)) - encode_subtract(root,ValueNode_Subtract::ConstHandle::cast_dynamic(value_node),canvas); - else - if(ValueNode_DynamicList::ConstHandle::cast_dynamic(value_node)) - encode_dynamic_list(root,ValueNode_DynamicList::ConstHandle::cast_dynamic(value_node),canvas); - else if(ValueNode_Const::ConstHandle::cast_dynamic(value_node)) - { - encode_value(root,ValueNode_Const::ConstHandle::cast_dynamic(value_node)->get_value(),canvas); - } - else - if(LinkableValueNode::ConstHandle::cast_dynamic(value_node)) - encode_linkable_value_node(root,LinkableValueNode::ConstHandle::cast_dynamic(value_node),canvas); - else - { - error(_("Unknown ValueNode Type (%s), cannot create an XML representation"),value_node->get_local_name().c_str()); - root->set_name("nil"); - } - - assert(root); - - if(!value_node->get_id().empty()) - root->set_attribute("id",value_node->get_id()); - - if(value_node->rcount()>1) - root->set_attribute("guid",(value_node->get_guid()^canvas->get_root()->get_guid()).get_string()); - - return root; -} - -xmlpp::Element* encode_layer(xmlpp::Element* root,Layer::ConstHandle layer) -{ - root->set_name("layer"); - - root->set_attribute("type",layer->get_name()); - root->set_attribute("active",layer->active()?"true":"false"); - - if(!layer->get_version().empty()) - root->set_attribute("version",layer->get_version()); - if(!layer->get_description().empty()) - root->set_attribute("desc",layer->get_description()); - if(!layer->get_group().empty()) - root->set_attribute("group",layer->get_group()); - - Layer::Vocab vocab(layer->get_param_vocab()); - Layer::Vocab::const_iterator iter; - - const Layer::DynamicParamList &dynamic_param_list=layer->dynamic_param_list(); - - for(iter=vocab.begin();iter!=vocab.end();++iter) - { - // Handle dynamic parameters - if(dynamic_param_list.count(iter->get_name())) - { - xmlpp::Element *node=root->add_child("param"); - node->set_attribute("name",iter->get_name()); - - handle value_node=dynamic_param_list.find(iter->get_name())->second; - - // If the valuenode has no ID, then it must be defined in-place - if(value_node->get_id().empty()) - { - encode_value_node(node->add_child("value_node"),value_node,layer->get_canvas().constant()); - } - else - { - node->set_attribute("use",value_node->get_relative_id(layer->get_canvas())); - } - } - else // Handle normal parameters - if(iter->get_critical()) - { - ValueBase value=layer->get_param(iter->get_name()); - if(!value.is_valid()) - { - error("Layer doesn't know its own vocabulary -- "+iter->get_name()); - continue; - } - - if(value.get_type()==ValueBase::TYPE_CANVAS) - { - // the ->is_inline() below was crashing if the canvas - // contained a PasteCanvas with the default Canvas setting; this avoids the crash - if (!value.get(Canvas::LooseHandle())) - continue; - - if (!value.get(Canvas::LooseHandle())->is_inline()) - { - Canvas::Handle child(value.get(Canvas::LooseHandle())); - - if(!value.get(Canvas::Handle())) - continue; - xmlpp::Element *node=root->add_child("param"); - node->set_attribute("name",iter->get_name()); - node->set_attribute("use",child->get_relative_id(layer->get_canvas())); - continue; - } - } - xmlpp::Element *node=root->add_child("param"); - node->set_attribute("name",iter->get_name()); - - encode_value(node->add_child("value"),value,layer->get_canvas().constant()); - } - } - - - return root; -} - -xmlpp::Element* encode_canvas(xmlpp::Element* root,Canvas::ConstHandle canvas) -{ - assert(canvas); - const RendDesc &rend_desc=canvas->rend_desc(); - root->set_name("canvas"); - - if(canvas->is_root()) - root->set_attribute("version",canvas->get_version()); - - if(!canvas->get_id().empty() && !canvas->is_root() && !canvas->is_inline()) - root->set_attribute("id",canvas->get_id()); - - if(!canvas->parent() || canvas->parent()->rend_desc().get_w()!=canvas->rend_desc().get_w()) - root->set_attribute("width",strprintf("%d",rend_desc.get_w())); - - if(!canvas->parent() || canvas->parent()->rend_desc().get_h()!=canvas->rend_desc().get_h()) - root->set_attribute("height",strprintf("%d",rend_desc.get_h())); - - if(!canvas->parent() || canvas->parent()->rend_desc().get_x_res()!=canvas->rend_desc().get_x_res()) - root->set_attribute("xres",strprintf("%f",rend_desc.get_x_res())); - - if(!canvas->parent() || canvas->parent()->rend_desc().get_y_res()!=canvas->rend_desc().get_y_res()) - root->set_attribute("yres",strprintf("%f",rend_desc.get_y_res())); - - - if(!canvas->parent() || - canvas->parent()->rend_desc().get_tl()!=canvas->rend_desc().get_tl() || - canvas->parent()->rend_desc().get_br()!=canvas->rend_desc().get_br()) - root->set_attribute("view-box",strprintf(VIEW_BOX_FORMAT, - rend_desc.get_tl()[0], - rend_desc.get_tl()[1], - rend_desc.get_br()[0], - rend_desc.get_br()[1]) - ); - - if(!canvas->parent() || canvas->parent()->rend_desc().get_antialias()!=canvas->rend_desc().get_antialias()) - root->set_attribute("antialias",strprintf("%d",rend_desc.get_antialias())); - - if(!canvas->parent()) - root->set_attribute("fps",strprintf(TIME_TYPE_FORMAT,rend_desc.get_frame_rate())); - - if(!canvas->parent() || canvas->parent()->rend_desc().get_time_start()!=canvas->rend_desc().get_time_start()) - root->set_attribute("begin-time",rend_desc.get_time_start().get_string(rend_desc.get_frame_rate())); - - if(!canvas->parent() || canvas->parent()->rend_desc().get_time_end()!=canvas->rend_desc().get_time_end()) - root->set_attribute("end-time",rend_desc.get_time_end().get_string(rend_desc.get_frame_rate())); - - if(!canvas->is_inline()) - { - root->set_attribute("bgcolor",strprintf(VIEW_BOX_FORMAT, - rend_desc.get_bg_color().get_r(), - rend_desc.get_bg_color().get_g(), - rend_desc.get_bg_color().get_b(), - rend_desc.get_bg_color().get_a()) - ); - - if(!canvas->get_name().empty()) - root->add_child("name")->set_child_text(canvas->get_name()); - if(!canvas->get_description().empty()) - root->add_child("desc")->set_child_text(canvas->get_description()); - if(!canvas->get_author().empty()) - root->add_child("author")->set_child_text(canvas->get_description()); - - std::list meta_keys(canvas->get_meta_data_keys()); - while(!meta_keys.empty()) - { - xmlpp::Element* meta_element(root->add_child("meta")); - meta_element->set_attribute("name",meta_keys.front()); - meta_element->set_attribute("content",canvas->get_meta_data(meta_keys.front())); - meta_keys.pop_front(); - } - for(KeyframeList::const_iterator iter=canvas->keyframe_list().begin();iter!=canvas->keyframe_list().end();++iter) - encode_keyframe(root->add_child("keyframe"),*iter,canvas->rend_desc().get_frame_rate()); - } - - // Output the section - //! \todo check where the parentheses should really go - around the && or the ||? - if((!canvas->is_inline() && !canvas->value_node_list().empty()) || !canvas->children().empty()) - { - xmlpp::Element *node=root->add_child("defs"); - const ValueNodeList &value_node_list(canvas->value_node_list()); - - for(ValueNodeList::const_iterator iter=value_node_list.begin();iter!=value_node_list.end();++iter) - { - // If the value_node is a constant, then use the shorthand - if(handle::cast_dynamic(*iter)) - { - ValueNode_Const::Handle value_node(ValueNode_Const::Handle::cast_dynamic(*iter)); - reinterpret_cast(encode_value(node->add_child("value"),value_node->get_value()))->set_attribute("id",value_node->get_id()); - continue; - } - encode_value_node(node->add_child("value_node"),*iter,canvas); - // writeme - } - - for(Canvas::Children::const_iterator iter=canvas->children().begin();iter!=canvas->children().end();++iter) - { - encode_canvas(node->add_child("canvas"),*iter); - } - } - - Canvas::const_reverse_iterator iter; - - for(iter=canvas->rbegin();iter!=canvas->rend();++iter) - encode_layer(root->add_child("layer"),*iter); - - return root; -} - -xmlpp::Element* encode_canvas_toplevel(xmlpp::Element* root,Canvas::ConstHandle canvas) -{ - valuenode_too_new_count = 0; - - xmlpp::Element* ret = encode_canvas(root, canvas); - - if (valuenode_too_new_count) - warning("saved %d valuenodes as constant values in old file format\n", valuenode_too_new_count); - - return ret; -} - -bool -synfig::save_canvas(const String &filename, Canvas::ConstHandle canvas) -{ - ChangeLocale change_locale(LC_NUMERIC, "C"); - - synfig::String tmp_filename(filename+".TMP"); - - if (filename_extension(filename) == ".sifz") - xmlSetCompressMode(9); - else - xmlSetCompressMode(0); - - try - { - assert(canvas); - xmlpp::Document document; - - encode_canvas_toplevel(document.create_root_node("canvas"),canvas); - - document.write_to_file_formatted(tmp_filename); - -#ifdef _WIN32 - // On Win32 platforms, rename() has bad behavior. work around it. - char old_file[80]="sif.XXXXXXXX"; - mktemp(old_file); - rename(filename.c_str(),old_file); - if(rename(tmp_filename.c_str(),filename.c_str())!=0) - { - rename(old_file,tmp_filename.c_str()); - synfig::error("synfig::save_canvas(): Unable to rename file to correct filename, errno=%d",errno); - return false; - } - remove(old_file); -#else - if(rename(tmp_filename.c_str(),filename.c_str())!=0) - { - synfig::error("synfig::save_canvas(): Unable to rename file to correct filename, errno=%d",errno); - return false; - } -#endif - } - catch(...) { synfig::error("synfig::save_canvas(): Caught unknown exception"); return false; } - - return true; -} - -String -synfig::canvas_to_string(Canvas::ConstHandle canvas) -{ - ChangeLocale change_locale(LC_NUMERIC, "C"); - assert(canvas); - - xmlpp::Document document; - - encode_canvas_toplevel(document.create_root_node("canvas"),canvas); - - return document.write_to_string_formatted(); -} - -void -synfig::set_file_version(ReleaseVersion version) -{ - save_canvas_version = version; -} - -ReleaseVersion -synfig::get_file_version() -{ - return save_canvas_version; -} diff --git a/synfig-core/trunk/src/synfig/savecanvas.h b/synfig-core/trunk/src/synfig/savecanvas.h deleted file mode 100644 index 93a3486..0000000 --- a/synfig-core/trunk/src/synfig/savecanvas.h +++ /dev/null @@ -1,59 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file savecanvas.h -** \brief writeme -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_SAVECANVAS_H -#define __SYNFIG_SAVECANVAS_H - -/* === H E A D E R S ======================================================= */ - -#include "string.h" -#include "canvas.h" -#include "releases.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/* === E X T E R N S ======================================================= */ - -//! Saves a canvas to \a filename -/*! \return \c true on success, \c false on error. */ -bool save_canvas(const String &filename, Canvas::ConstHandle canvas); - -//! Stores a Canvas in a string in XML format -String canvas_to_string(Canvas::ConstHandle canvas); - -void set_file_version(ReleaseVersion version); -ReleaseVersion get_file_version(); - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/segment.h b/synfig-core/trunk/src/synfig/segment.h deleted file mode 100644 index 30239f6..0000000 --- a/synfig-core/trunk/src/synfig/segment.h +++ /dev/null @@ -1,67 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file segment.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_SEGMENT_H -#define __SYNFIG_SEGMENT_H - -/* === H E A D E R S ======================================================= */ - -#include "vector.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/*! \struct Segment -** \todo writeme -*/ -struct Segment -{ - Point p1,p2; - Vector t1,t2; - - Segment() { } - Segment(Point p1,Vector t1,Point p2, Vector t2): - p1(p1), - p2(p2), - t1(t1), - t2(t2) - { } - Segment(Point p1,Point p2): - p1(p1), - p2(p2), - t1(p2-p1), - t2(p2-p1) - { } -}; // END of struct Segment - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/smartfile.h b/synfig-core/trunk/src/synfig/smartfile.h deleted file mode 100644 index 2e21ffc..0000000 --- a/synfig-core/trunk/src/synfig/smartfile.h +++ /dev/null @@ -1,52 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file smartfile.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_SMARTFILE_H -#define __SYNFIG_SMARTFILE_H - -/* === H E A D E R S ======================================================= */ - -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -struct _FILE_deleter -{ - void operator()(FILE* x)const { if(x!=stdout && x!=stdin) fclose(x); } -}; - -typedef etl::smart_ptr SmartFILE; - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/string.h b/synfig-core/trunk/src/synfig/string.h deleted file mode 100644 index 8296bbb..0000000 --- a/synfig-core/trunk/src/synfig/string.h +++ /dev/null @@ -1,62 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file string.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_STRING_H -#define __SYNFIG_STRING_H - -/* === H E A D E R S ======================================================= */ - -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -/* -namespace std -{ -template struct char_traits; -template<> struct char_traits; -template class allocator; -templateclass basic_string; -typedef basic_string,allocator > string; - -}; // END of namespace std -*/ - -namespace synfig -{ - -/*! \typedef String -** \todo writeme -*/ -typedef std::string String; - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/string_decl.h b/synfig-core/trunk/src/synfig/string_decl.h deleted file mode 100644 index 9dba339..0000000 --- a/synfig-core/trunk/src/synfig/string_decl.h +++ /dev/null @@ -1,58 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file string_decl.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_STRING_DECL_H -#define __SYNFIG_STRING_DECL_H - -/* === H E A D E R S ======================================================= */ - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace std -{ -template struct char_traits; -template<> struct char_traits; -template class allocator; -templateclass basic_string; -typedef basic_string,allocator > string; - -}; // END of namespace std - -namespace synfig -{ - -/*! \typedef String -** \todo writeme -*/ -typedef std::string String; - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/surface.cpp b/synfig-core/trunk/src/synfig/surface.cpp deleted file mode 100644 index 91e1663..0000000 --- a/synfig-core/trunk/src/synfig/surface.cpp +++ /dev/null @@ -1,242 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file surface.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -** -** === N O T E S =========================================================== -** -** ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_NO_ANGLE - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "canvas.h" -#include "surface.h" -#include "target_scanline.h" -#include "general.h" - -#ifdef HAS_VIMAGE -#include -#endif - -#endif - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -class target2surface : public synfig::Target_Scanline -{ -public: - Surface *surface; - bool sized; -public: - target2surface(Surface *surface); - virtual ~target2surface(); - - virtual bool set_rend_desc(synfig::RendDesc *newdesc); - - virtual bool start_frame(synfig::ProgressCallback *cb); - - virtual void end_frame(); - - virtual Color * start_scanline(int scanline); - - virtual bool end_scanline(); -}; - -target2surface::target2surface(Surface *surface):surface(surface) -{ -} - -target2surface::~target2surface() -{ -} - -bool -target2surface::set_rend_desc(synfig::RendDesc *newdesc) -{ - assert(newdesc); - assert(surface); - desc=*newdesc; - return synfig::Target_Scanline::set_rend_desc(newdesc); -} - -bool -target2surface::start_frame(synfig::ProgressCallback */*cb*/) -{ - if(surface->get_w() != desc.get_w() || surface->get_h() != desc.get_h()) - { - surface->set_wh(desc.get_w(),desc.get_h()); - } - return true; -} - -void -target2surface::end_frame() -{ - return; -} - -Color * -target2surface::start_scanline(int scanline) -{ - return (*surface)[scanline]; -} - -bool -target2surface::end_scanline() -{ - return true; -} - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -Target_Scanline::Handle -synfig::surface_target(Surface *surface) -{ - return Target_Scanline::Handle(new target2surface(surface)); -} - -void -synfig::Surface::clear() -{ -#ifdef HAS_VIMAGE - fill(Color(0.5,0.5,0.5,0.0000001)); -#else - etl::surface::clear(); -#endif -} - -void -synfig::Surface::blit_to(alpha_pen& pen, int x, int y, int w, int h) -{ - static const float epsilon(0.00001); - const float alpha(pen.get_alpha()); - if( pen.get_blend_method()==Color::BLEND_STRAIGHT && fabs(alpha-1.0f)=get_w() || y>=get_w()) - return; - - //clip source origin - if(x<0) - { - w+=x; //decrease - x=0; - } - - if(y<0) - { - h+=y; //decrease - y=0; - } - - //clip width against dest width - w = min((long)w,(long)(pen.end_x()-pen.x())); - h = min((long)h,(long)(pen.end_y()-pen.y())); - - //clip width against src width - w = min(w,get_w()-x); - h = min(h,get_h()-y); - - if(w<=0 || h<=0) - return; - - for(int i=0;i(static_cast(operator[](y)+x))+i*get_w()*sizeof(Color)); - char* dest(static_cast(static_cast(pen.x()))+i*pen.get_width()*sizeof(Color)); - memcpy(dest,src,w*sizeof(Color)); - } - return; - } - -#ifdef HAS_VIMAGE - if( pen.get_blend_method()==Color::BLEND_COMPOSITE && fabs(alpha-1.0f)=get_w() || y>=get_w()) - return; - - //clip source origin - if(x<0) - { - //u-=x; //increase - w+=x; //decrease - x=0; - } - - if(y<0) - { - //v-=y; //increase - h+=y; //decrease - y=0; - } - - //clip width against dest width - w = min(w,pen.end_x()-pen.x()); - h = min(h,pen.end_y()-pen.y()); - - //clip width against src width - w = min(w,get_w()-x); - h = min(h,get_h()-y); - - if(w<=0 || h<=0) - return; - - - - vImage_Buffer top,bottom; - vImage_Buffer& dest(bottom); - - top.data=static_cast(operator[](y)+x); - top.height=h; - top.width=w; - //top.rowBytes=get_w()*sizeof(Color); //! \todo this should get the pitch!! - top.rowBytes=get_pitch(); - - bottom.data=static_cast(pen.x()); - bottom.height=h; - bottom.width=w; - //bottom.rowBytes=pen.get_width()*sizeof(Color); //! \todo this should get the pitch!! - bottom.rowBytes=pen.get_pitch(); //! \todo this should get the pitch!! - - vImage_Error ret; - ret=vImageAlphaBlend_ARGBFFFF(&top,&bottom,&dest,kvImageNoFlags); - - assert(ret!=kvImageNoError); - - return; - } -#endif - etl::surface::blit_to(pen,x,y,w,h); -} - diff --git a/synfig-core/trunk/src/synfig/surface.h b/synfig-core/trunk/src/synfig/surface.h deleted file mode 100644 index 265d8d7..0000000 --- a/synfig-core/trunk/src/synfig/surface.h +++ /dev/null @@ -1,159 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file surface.h -** \brief Surface and Pen Definitions -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_SURFACE_H -#define __SYNFIG_SURFACE_H - -/* === H E A D E R S ======================================================= */ - -#include "color.h" -#include "renddesc.h" -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class Target; -class Target_Scanline; - -class ColorPrep -{ -public: - ColorAccumulator cook(Color x)const - { - x.set_r(x.get_r()*x.get_a()); - x.set_g(x.get_g()*x.get_a()); - x.set_b(x.get_b()*x.get_a()); - return x; - } - Color uncook(ColorAccumulator x)const - { - if(!x.get_a()) - return Color::alpha(); - - const float a(1.0f/x.get_a()); - - x.set_r(x.get_r()*a); - x.set_g(x.get_g()*a); - x.set_b(x.get_b()*a); - return x; - } -}; - -/*! \class Surface -** \brief Bitmap Surface -** \todo writeme -*/ -class Surface : public etl::surface -{ -public: - typedef Color value_type; - class alpha_pen; - - Surface() { } - - Surface(const size_type::value_type &w, const size_type::value_type &h): - etl::surface(w,h) { } - - Surface(const size_type &s): - etl::surface(s) { } - - template - Surface(const _pen &_begin, const _pen &_end): - etl::surface(_begin,_end) { } - - template void blit_to(_pen &pen) - { return blit_to(pen,0,0, get_w(),get_h()); } - - template void - blit_to(_pen& DEST_PEN, int x, int y, int w, int h) - { - etl::surface::blit_to(DEST_PEN,x,y,w,h); - } - - void clear(); - - void blit_to(alpha_pen& DEST_PEN, int x, int y, int w, int h); -}; // END of class Surface - -#ifndef DOXYGEN_SKIP - -/*! \internal Used by Pen_Alpha */ -struct _BlendFunc -{ - Color::BlendMethod blend_method; - - _BlendFunc(Color::BlendMethod b= Color::BLEND_COMPOSITE):blend_method(b) { } - - Color operator()(const Color &a,const Color &b,const Color::value_type &t)const - { - return Color::blend(b,a,t,blend_method); - } -}; // END of class _BlendFunc - -#endif - -/*! \class Surface::alpha_pen -** \brief Alpha-Blending Pen -** -** This pen works like a normal alpha pen, except that it supports -** a variety of blending methods. Use set_blend_method() to select -** which blending method you want to use. -** The default blending method is Color::BLEND_COMPOSITE. -** \see Color::BlendMethod -*/ -class Surface::alpha_pen : public etl::alpha_pen< etl::generic_pen, Color::value_type, _BlendFunc > -{ -public: - alpha_pen() { } - alpha_pen(const etl::alpha_pen< etl::generic_pen, Color::value_type, _BlendFunc > &x): - etl::alpha_pen< etl::generic_pen, Color::value_type, _BlendFunc >(x) - { } - - alpha_pen(const etl::generic_pen& pen, const Color::value_type &a = 1, const _BlendFunc &func = _BlendFunc()): - etl::alpha_pen< etl::generic_pen, Color::value_type, _BlendFunc >(pen,a,func) - { } - - //! Sets the blend method to that described by \a method - void set_blend_method(Color::BlendMethod method) { affine_func_.blend_method=method; } - - //! Returns the blend method being used for this pen - Color::BlendMethod get_blend_method()const { return affine_func_.blend_method; } -}; // END of class Surface::alpha_pen - -//! Creates a target that will render to \a surface -etl::handle surface_target(Surface *surface); - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/surfacenew.cpp b/synfig-core/trunk/src/synfig/surfacenew.cpp deleted file mode 100644 index aaed5e7..0000000 --- a/synfig-core/trunk/src/synfig/surfacenew.cpp +++ /dev/null @@ -1,706 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file surfacenew.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "surfacenew.h" -#include -#include "mutex.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -class SurfaceNew::ChannelData -{ -private: - etl::reference_counter ref_count_; - - float* data_; - float* origin_; - - int w_,h_,stride_; - -public: - - RWLock rw_lock; - - ChannelData(): - is_defined_(false), - data_(0), - origin_(0), - w_(0), - h_(0) - { - } - - ~ChannelData() - { - if(ref_count_.unique()) - delete [] data_; - } - - void set_wh(int w, int h) - { - w_=w; - h_=h; - stride_=w; - - if(data_&&ref_count_.is_unique()) - delete [] data_; - - ref_count.make_unique(); - data_=new float [w_*h_]; - origin_=data_; - clear(); - } - - void crop(int x, int y, int w, int h) - { - origin_=origin+y*stride_+x; - w_=w; - h_=h; - } - - int get_stride()const - { - return stride_; - } - - void clear() - { - for(int i=0;i::iterator iter; - for(iter=ret.channel_map_.begin();iter!=ret.channel_map_.end();++iter) - iter->crop(x,y,w,h); - - return ret; -} - -int -SurfaceNew::get_w()const -{ - return w_; -} - -int -SurfaceNew::get_h()const -{ - return h_; -} - -void -SurfaceNew::set_wh(int w, int h) -{ - if(w!=w_ || h!=h_) - { - w_=w; - h_=h; - channel_map_.clear(); - } -} - -SurfaceNew::ColorSystem -SurfaceNew::get_color_system()const -{ - return color_system_; -} - -void -SurfaceNew::set_color_system(SurfaceNew::ColorSystem x) -{ - color_system_=x; -} - -Color -SurfaceNew::get_color(int x, int y)const -{ - // This operation is rather expensive, as it should be. - // I want to discourage people from using it all over the place. - - Color ret( - lock_channel_const(CHAN_R).get_value(x,y), - lock_channel_const(CHAN_G).get_value(x,y), - lock_channel_const(CHAN_B).get_value(x,y), - lock_channel_const(CHAN_A).get_value(x,y) - ); - - if(get_premult()) - { - ret=ret.demult_alpha(); - } - - return ret; -} - -void -SurfaceNew::lock() -{ - mutex_.lock(); -} - -void -SurfaceNew::unlock() -{ - mutex_.unlock(); -} - -bool -SurfaceNew::trylock() -{ - return mutex_.trylock(); -} - -SurfaceNew::ChannelLock -SurfaceNew::lock_channel(SurfaceNew::Channel chan) -{ - if(!is_channel_defined(chan) - channel_map_[chan].set_wh(get_w(),get_h()); - else - channel_map_[chan].make_unique(); - - ChannelLockConst channel_lock; - - channel_lock.surface_=this; - channel_lock.channel_=chan; - - channel_map_[chan].rw_lock.writer_lock(); - - return channel_lock; -} - -SurfaceNew::ChannelLockConst -SurfaceNew::lock_channel_const(SurfaceNew::Channel chan)const -{ - if(!is_channel_defined(chan) - channel_map_[chan].set_wh(get_w(),get_h()); - - ChannelLockConst channel_lock; - - channel_lock.surface_=this; - channel_lock.channel_=chan; - - channel_map_[chan].rw_lock.reader_lock(); - - return channel_lock; -} - -SurfaceNew::ChannelLock -SurfaceNew::lock_channel_alpha(SurfaceNew::Channel chan) -{ - // Change this when per-channel alpha - // is implemented - return lock_channel(CHAN_A); -} - -SurfaceNew::ChannelLockConst -SurfaceNew::lock_channel_alpha_const(SurfaceNew::Channel chan)const -{ - // Change this when per-channel alpha - // is implemented - return lock_channel_const(CHAN_A); -} - -bool -SurfaceNew::is_channel_defined(Channel chan)const -{ - return channel_map_.count(chan); -} - -bool -SurfaceNew::get_premult()const -{ - return premult_flag_; -} - -void -SurfaceNew::set_premult(bool x) -{ - if(x==premult_flag_) - return; - - premult_flag_=x; - - for(int i=0;i<3;i++) - { - Channel chan; - if(get_color_system()==COLORSYS_RGB)switch(i) - { - case 0: chan=CHAN_R; - case 1: chan=CHAN_G; - case 2: chan=CHAN_B; - } - else - if(get_color_system()==COLORSYS_YUV)switch(i) - { - case 0: chan=CHAN_Y; - case 1: chan=CHAN_U; - case 2: chan=CHAN_V; - } - - // If this channel isn't defined, then - // skip it and move on to the next one - if(!is_channel_defined(chan)) - continue; - - ChannelLock color_channel(lock_channel(chan)); - ChannelLockConst alpha_channel(lock_channel_alpha_const(chan)); - const int w(get_w()); - const int h(get_h()); - - float* color_ptr(color_channel.get_data_ptr()); - const float* alpha_ptr(alpha_channel.get_data_ptr()); - - const int color_pitch(color_channel.get_data_ptr_stride()-w); - const int alpha_pitch(alpha_channel.get_data_ptr_stride()-w); - - if(premult_flag_) - { - for(int y=0;yget_w()), h(src->get_h); - - // Clip - { - int x(0), y(0); - - if(x_dest+w>dest.get_w()) - w=dest.get_w()-x_dest; - if(y_dest+h>dest.get_h()) - h=dest.get_h()-y_dest; - if(x_dest<0) - { - x-=x_dest; - w+=x_dest; - } - if(y_dest<0) - { - y-=y_dest; - h+=y_dest; - } - src=crop(src,x,y,w,h); - } - - dest=crop(dest,x_dest,y_dest,w,h); - - if(bm==Color::BLEND_STRAIGHT) - { - chan_mlt(dest,amount/(1.0-amount)); - chan_add(dest,src); - chan_mlt(dest,(1.0-amount)/amount); - } - - if(bm==Color::BLEND_COMPOSITE) - { - - } -} - - - -// ----------------------------------------------------------------------------------- - -SurfaceChannelLockConst::SurfaceChannelLockConst(): - data_ptr_checked_out_(false) -{ -} - -SurfaceChannelLockConst::~SurfaceChannelLockConst() -{ - if(data_ptr_checked_out_) - release_data_ptr(); - - if(surface_ && ref_count_.is_unique()) - return surface->channel_map_[channel_].rw_lock.reader_unlock(); - surface=0; -} - -SurfaceChannel -SurfaceChannelLockConst::get_channel()const -{ - return channel_; -} - -int -SurfaceChannelLockConst::get_w()const -{ - return surface_->get_w(); -} - -int -SurfaceChannelLockConst::get_h()const -{ - return surface_->get_h(); -} - -float -SurfaceChannelLockConst::get_value(int x, int y) -{ - // WOW! CRAZY SLOW! - const ChannelData& channel_data(surface_->channel_map_[channel_]); - return *(channel_data.get_data()+y*channel_data.get_stride()+x); -} - -const float* -SurfaceChannelLockConst::get_data_ptr()const -{ - data_ptr_checked_out_=true; - - // WOW! CRAZY SLOW! - return surface_->channel_map_[channel_].get_data(); -} - -int -SurfaceChannelLockConst::get_data_ptr_stride()const -{ - return surface_->channel_map_[channel_].get_stride(); -} - -void -SurfaceChannelLockConst::release_data_ptr()const -{ - data_ptr_checked_out_=false; -} - -SurfaceChannelLockConst::operator bool()const -{ - return static_cast(surface_); -} - -// ----------------------------------------------------------------------------------- - -SurfaceChannelLock::SurfaceChannelLock() -{ -} - -SurfaceChannelLock::~SurfaceChannelLock() -{ - if(data_ptr_checked_out_) - release_data_ptr(); - - if(surface_ && ref_count_.is_unique()) - return surface_->channel_map_[channel_].rw_lock.writer_unlock(); - surface=0; -} - -void -SurfaceChannelLock::clear() -{ - return surface_->channel_map_[channel_].clear(); -} - -void -SurfaceChannelLock::fill(float v) -{ - return surface_->channel_map_[channel_].fill(v); -} - -void -SurfaceChannelLock::set_value(int x, int y, float v) -{ - // WOW! CRAZY SLOW! - const ChannelData& channel_data(surface_->channel_map_[channel_]); - *(channel_data.get_data()+y*channel_data.get_stride()+x)=v; -} - -float* -SurfaceChannelLock::get_data_ptr() -{ - data_ptr_checked_out_=true; - - // WOW! CRAZY SLOW! - return surface_->channel_map_[channel_].get_data(); -} - - - -// ----------------------------------------------------------------------------------- - - - -void -SurfaceNew::chan_mlt(ChannelLock& dest, float x) -{ - float* ptr(dest.get_data_ptr()); - const int w(dest.get_w()); - const int h(dest.get_h()); - const int pitch(dest.get_data_pitch()-w); - - int(y=0;y -#include -#include "color.h" -#include "mutex.h" -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class Surface; -class SurfaceChannelLock; -class SurfaceChannelLockConst; - -//! \writeme -enum SurfaceColorSystem -{ - COLORSYS_RGB, - COLORSYS_YUV, - - COLORSYS_END -}; // END of enum SurfaceColorSystem - -//! \writeme -enum SurfaceChannel -{ - CHAN_A, - CHAN_R, - CHAN_G, - CHAN_B, - - CHAN_Y, - CHAN_U, - CHAN_V, - - CHAN_END -}; // END of enum SurfaceChannel - -class SurfaceNew : etl::shared_object -{ - friend class SurfaceChannelLock; - - /* - -- ** -- T Y P E S ----------------------------------------------------------- - */ - -public: - - //! \writeme - typedef etl::handle Handle; - - //! \writeme - typedef etl::handle HandleConst; - - //! \writeme - typedef etl::loose_handle LooseHandle; - - //! \writeme - typedef SurfaceChannel; - - //! \writeme - typedef SurfaceChannelLock ChannelLock; - - //! \writeme - typedef SurfaceChannelLockConst ChannelLockConst; - - //! \writeme - typedef SurfaceColorSystem; - - //! \writeme - class Lock - { - Handle x; - public: - Lock(const Handle& x):x(x) { x->lock(); } - void unlock() { if(x){ x->unlock(); x=0; } } - ~Lock() { unlock(); } - }; // END of class Lock - friend class Lock; - -private: - - //! \writeme - class ChannelData; - - /* - -- ** -- D A T A ------------------------------------------------------------- - */ - -private: - - //! \writeme - RecMutex mutex_; - - //! \writeme - int w_,h_; - - //! \writeme - ColorSystem color_system_; - - //! \writeme - bool premult_flag_; - - //! \writeme - std::map channel_map_; - - /* - -- ** -- S I G N A L S ------------------------------------------------------- - */ - -private: - - /* - -- ** -- S I G N A L I N T E R F A C E ------------------------------------- - */ - -public: - - /* - -- ** -- C O N S T R U C T O R S --------------------------------------------- - */ - -protected: - - //! \writeme - SurfaceNew(); - -public: - - //! \writeme - virtual ~SurfaceNew(); - - /* - -- ** -- M E M B E R F U N C T I O N S ------------------------------------- - */ - -public: - - //! \writeme - int get_w()const; - - //! \writeme - int get_h()const; - - //! \writeme - void set_wh(int w, int h); - - //! \writeme - ColorSystem get_color_system()const; - - //! \writeme - void set_color_system(ColorSystem x); - - //! Should only be used in certain circumstances - Color get_color(int x, int y)const; - - //! \writeme - void lock(); - - //! \writeme - void unlock(); - - //! \writeme - bool trylock(); - - //! \writeme - ChannelLock lock_channel(Channel chan); - - //! \writeme - ChannelLockConst lock_channel_const(Channel chan)const; - - //! \writeme - ChannelLock lock_channel_alpha(Channel chan); - - //! \writeme - ChannelLockConst lock_channel_alpha_const(Channel chan)const; - - //! \writeme - bool is_channel_defined(Channel chan)const; - - //! \writeme - bool get_premult()const; - - //! \writeme - void set_premult(); - - /* - -- ** -- S T A T I C F U N C T I O N S ------------------------------------- - */ - -public: - - //! Normal SurfaceNew Constructor - static Handle create(int w=0, int h=0, ColorSystem sys=COLORSYS_RGB); - - //! Converts an old Surface to a SurfaceNew - static Handle create(const Surface&); - - //! Duplicates a surface - static Handle create(HandleConst); - - //! Creates a cropped copy of a surface - static Handle crop(HandleConst, int x, int y, int w, int h); - - static void blit( - Handle dest, - int x_dest, - int y_dest, - HandleConst src, - float amount=1.0, - Color::BlendMethod bm=Color::BLEND_COMPOSITE - ); - - static void blit( - Handle dest, - int x_dest, - int y_dest, - Handle src, - int x_src, - int y_src, - int w_src, - int h_src, - float amount=1.0, - Color::BlendMethod bm=Color::BLEND_COMPOSITE - ); - - - static void chan_mlt(ChannelLock& dest, float x); - static void chan_mlt(ChannelLock& dest, const ChannelLockConst& x); - - static void chan_div(ChannelLock& dest, float x); - static void chan_div(ChannelLock& dest, const ChannelLockConst& x); - - static void chan_add(ChannelLock& dest, float x); - static void chan_add(ChannelLock& dest, const ChannelLockConst& x); - - static void chan_sub(ChannelLock& dest, float x); - static void chan_sub(ChannelLock& dest, const ChannelLockConst& x); -}; // END of class SurfaceNew - -//! \writeme -class SurfaceChannelLockConst -{ - friend class SurfaceNew; - - /* - -- ** -- T Y P E S ----------------------------------------------------------- - */ - -public: - - /* - -- ** -- D A T A ------------------------------------------------------------- - */ - -protected: - - //! \writeme - SurfaceNew::Handle surface_; - - //! \writeme - etl::reference_counter ref_count_; - - //! \writeme - SurfaceChannel channel_; - - //! \writeme - bool data_ptr_checked_out_; - - /* - -- ** -- C O N S T R U C T O R S --------------------------------------------- - */ - -public: - - SurfaceChannelLockConst(); - - //! \writeme - ~SurfaceChannelLockConst(); - - /* - -- ** -- M E M B E R F U N C T I O N S ------------------------------------- - */ - -public: - - //! \writeme - SurfaceChannel get_channel()const; - - //! \writeme - int get_w()const; - - //! \writeme - int get_h()const; - - //! \writeme - float get_value(int x, int y); - - //! \writeme - const float* get_data_ptr()const; - - //! \writeme - int get_data_ptr_stride()const; - - //! Releases the pointer obtained with get_data_ptr() - void release_data_ptr()const; - - //! \writeme - operator bool()const; -}; // END of class SurfaceChannelLockConst - - -//! \writeme -class SurfaceChannelLock : public SurfaceChannelLockConst -{ - friend class SurfaceNew; - - using SurfaceChannelLock::get_data_ptr; - - /* - -- ** -- T Y P E S ----------------------------------------------------------- - */ - -public: - - /* - -- ** -- D A T A ------------------------------------------------------------- - */ - -private: - - /* - -- ** -- C O N S T R U C T O R S --------------------------------------------- - */ - -public: - - //! \writeme - SurfaceChannelLock(); - - //! \writeme - ~SurfaceChannelLock(); - - /* - -- ** -- M E M B E R F U N C T I O N S ------------------------------------- - */ - -public: - - //! \writeme - void clear(); - - //! \writeme - void fill(float value); - - //! \writeme - void set_value(int x, int y, float v); - - float* get_data_ptr(); -}; // END of class ChannelLock - - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/synfig.h b/synfig-core/trunk/src/synfig/synfig.h deleted file mode 100644 index b56029c..0000000 --- a/synfig-core/trunk/src/synfig/synfig.h +++ /dev/null @@ -1,140 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file synfig.h -** \brief Primary Header for Synfig -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG__ -#define __SYNFIG__ - -#ifndef __cplusplus -#error Sorry, Synfig only supports C++ at this time. See README for details. -#endif - -#warning The use of this header is deprecated. Please use the individual header files. - -/* === M A C R O S ========================================================= */ - -#define SYNFIG_LEAN -#undef SYNFIG_LEAN -/*! \def SYNFIG_LEAN -** \brief Define this to remove unused features, speeding up compile time. -** -** Define SYNFIG_LEAN if your plug-in -** or program doesn't use the synfig::Angle class -** or the rendering subsystem. This can speed up -** compiles. You may also wish to individually -** use the macros SYNFIG_NO_ANGLE and -** SYNFIG_NO_RENDER. -** \see SYNFIG_NO_ANGLE, SYNFIG_NO_RENDER -*/ -#ifdef SYNFIG_LEAN -# ifndef SYNFIG_NO_ANGLE -# define SYNFIG_NO_ANGLE -# endif -# ifndef SYNFIG_NO_RENDER -# define SYNFIG_NO_RENDER -# endif -#endif - -/*! \def SYNFIG_LAYER -** The SYNFIG_LAYER macro is useful for when you -** are compiling layers, and can help to improve -** build time. -*/ -#ifdef SYNFIG_LAYER -# ifndef SYNFIG_NO_RENDER -# define SYNFIG_NO_RENDER -# endif -# define SYNFIG_NO_LOADSAVE -#endif - -/*! \def SYNFIG_TARGET -** The SYNFIG_TARGET macro is useful for when you -** are compiling render targets, and can help to -** improve build time. -*/ -#ifdef SYNFIG_TARGET -# ifdef SYNFIG_NO_RENDER -# error You defined SYNFIG_TARGET, but also SYNFIG_NO_RENDER. This does not make sense. -# endif -# ifndef SYNFIG_NO_ANGLE -# define SYNFIG_NO_ANGLE -# endif -# define SYNFIG_NO_LOADSAVE -#endif - -/*! \def SYNFIG_MODULE -** \todo Writeme -*/ -#ifdef SYNFIG_MODULE -# define SYNFIG_NO_LOADSAVE -#endif - -/*! \namespace synfig -** \brief Where every function and class of the synfig library can be found -** \todo Writeme -*/ - -/* === H E A D E R S ======================================================= */ - -#include "version.h" -#include "general.h" -#include "module.h" -#include "color.h" -#include "canvas.h" -#include "layer.h" -#include "vector.h" -#include "types.h" -#include "segment.h" - -#ifndef SYNFIG_NO_RENDER -# include "render.h" -#endif - -#ifndef SYNFIG_LAYER -#include "target.h" -#endif - -#include "valuenode.h" -#include "valuenode_subtract.h" -//#include "valuenode_animated.h" -#include "valuenode_composite.h" -#include "valuenode_const.h" -#include "valuenode_linear.h" -#include "valuenode_dynamiclist.h" -#include "valuenode_reference.h" - -#ifndef SYNFIG_NO_LOADSAVE -# include "savecanvas.h" -# include "loadcanvas.h" -#endif - -#include "importer.h" -#include "surface.h" - -#include "string.h" - -/* === C L A S S E S & S T R U C T S ======================================= */ - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/synfig.nsh b/synfig-core/trunk/src/synfig/synfig.nsh deleted file mode 100644 index 2fc4c53..0000000 --- a/synfig-core/trunk/src/synfig/synfig.nsh +++ /dev/null @@ -1,20 +0,0 @@ -; The stuff to install -Section "Synfig Core" - - SectionIn RO - - ; Set output path to the installation directory. - SetOutPath "$INSTDIR\bin" - - ; Put file there - File "src\synfig\.libs\libsynfig-0.dll" - -SectionEnd - -Section "un.Synfig Core" - Delete "$INSTDIR\bin\libsynfig-0.dll" - RMDir "$INSTDIR\bin" - RMDir "$INSTDIR" -SectionEnd - - diff --git a/synfig-core/trunk/src/synfig/target.cpp b/synfig-core/trunk/src/synfig/target.cpp deleted file mode 100644 index 6a73822..0000000 --- a/synfig-core/trunk/src/synfig/target.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file target.cpp -** \brief Target Class Implementation -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_NO_ANGLE - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "target.h" -#include "string.h" -#include "canvas.h" -#include "target_null.h" -#include "target_null_tile.h" - -using namespace synfig; -using namespace etl; -using namespace std; - -synfig::Target::Book* synfig::Target::book_; -synfig::Target::ExtBook* synfig::Target::ext_book_; - -static synfig::Gamma* default_gamma_; - -/* === P R O C E D U R E S ================================================= */ - -bool -Target::subsys_init() -{ - book_=new synfig::Target::Book(); - ext_book_=new synfig::Target::ExtBook(); - - default_gamma_=new synfig::Gamma(1.0/2.2); - //default_gamma_->set_black_level(0.05); // Default to 5% black level. - - book()["null"]=std::pair(Target_Null::create,"null"); - ext_book()["null"]="null"; - book()["null-tile"]=std::pair(Target_Null_Tile::create,"null-tile"); - ext_book()["null-tile"]="null-tile"; - - return true; -} - -bool -Target::subsys_stop() -{ - delete book_; - delete ext_book_; - delete default_gamma_; - return true; -} - -Target::Book& -Target::book() -{ - return *book_; -} - -Target::ExtBook& -Target::ext_book() -{ - return *ext_book_; -} - - -/* === M E T H O D S ======================================================= */ - -Target::Target(): - quality_(4), - gamma_(*default_gamma_), - remove_alpha(false), - avoid_time_sync_(false) -{ -} - -void -synfig::Target::set_canvas(etl::handle c) -{ - canvas=c; - RendDesc desc=canvas->rend_desc(); - set_rend_desc(&desc); -} - - -Target::Handle -Target::create(const String &name, const String &filename) -{ - if(!book().count(name)) - return handle(); - - return Target::Handle(book()[name].first(filename.c_str())); -} diff --git a/synfig-core/trunk/src/synfig/target.h b/synfig-core/trunk/src/synfig/target.h deleted file mode 100644 index 9f6e304..0000000 --- a/synfig-core/trunk/src/synfig/target.h +++ /dev/null @@ -1,187 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file target.h -** \brief Target Class Implementation -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TARGET_H -#define __SYNFIG_TARGET_H - -/* === H E A D E R S ======================================================= */ - -#include -#include "string_decl.h" -#include -//#include -#include -#include -#include "renddesc.h" -//#include "general.h" -#include "color.h" -#include "canvas.h" - -/* === M A C R O S ========================================================= */ - -//! \writeme -#define SYNFIG_TARGET_MODULE_EXT public: static const char name__[], version__[], ext__[],cvs_id__[]; static Target *create(const char *filename); - -//! Sets the name of the target -#define SYNFIG_TARGET_SET_NAME(class,x) const char class::name__[]=x - -//! \writeme -#define SYNFIG_TARGET_SET_EXT(class,x) const char class::ext__[]=x - -//! Sets the version of the target -#define SYNFIG_TARGET_SET_VERSION(class,x) const char class::version__[]=x - -//! Sets the CVS ID of the target -#define SYNFIG_TARGET_SET_CVS_ID(class,x) const char class::cvs_id__[]=x - -//! \writeme -#define SYNFIG_TARGET_INIT(class) synfig::Target* class::create(const char *filename) { return new class(filename); } - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class Surface; -class RendDesc; -class Canvas; -class ProgressCallback; - -/*! \class Target -** \brief Render-target -** \todo writeme -*/ -class Target : public etl::shared_object -{ -public: - typedef etl::handle Handle; - typedef etl::loose_handle LooseHandle; - typedef etl::handle ConstHandle; - - /* - -- ** -- S I G N A L S ------------------------------------------------------- - */ - -private: - - sigc::signal signal_progress_; - - /* - -- ** -- S I G N A L I N T E R F A C E ------------------------------------- - */ - -public: - - sigc::signal& signal_progress() { return signal_progress_; } - - /* - -- ** -- C O N S T R U C T O R S --------------------------------------------- - */ - -public: - typedef Target* (*Factory)(const char *filename); - - //! A type for a map of targets, indexed by the name of the Target - typedef std::map > Book; - - typedef std::map ExtBook; - - //! Target Book, indexed by the target's name - static Book* book_; - - //! Map of target names indexed by associated file extension - static ExtBook* ext_book_; - - static Book& book(); - static ExtBook& ext_book(); - - static bool subsys_init(); - static bool subsys_stop(); - - //! Adjusted Render description set by set_rend_desc() - RendDesc desc; - - etl::handle canvas; - - int quality_; - Gamma gamma_; - - bool remove_alpha; - - bool avoid_time_sync_; - -protected: - - Target(); - -public: - virtual ~Target() { } - - int get_quality()const { return quality_; } - - void set_quality(int q) { quality_=q; } - - void set_avoid_time_sync(bool x=true) { avoid_time_sync_=x; } - - bool get_avoid_time_sync()const { return avoid_time_sync_; } - - bool get_remove_alpha()const { return remove_alpha; } - - void set_remove_alpha(bool x=true) { remove_alpha=x; } - - Gamma &gamma() { return gamma_; } - - const Gamma &gamma()const { return gamma_; } - - virtual void set_canvas(etl::handle c); - - const etl::handle &get_canvas()const { return canvas; } - - RendDesc &rend_desc() { return desc; } - const RendDesc &rend_desc()const { return desc; } - - //! Renders the canvas to the target - virtual bool render(ProgressCallback *cb=NULL)=0; - - //! Sets the RendDesc for the Target to \a desc. - /*! If there are any parts of \a desc that the render target - ** is not capable of doing, the render target will adjust - ** \a desc to fit its needs. - */ - virtual bool set_rend_desc(RendDesc *d) { desc=*d; return true; } - - virtual bool init() { return true; } - - //! Creates a new Target described by \a type, outputting to a file described by \a filename. - static Handle create(const String &type, const String &filename); -}; // END of class Target - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#include "canvas.h" -#endif diff --git a/synfig-core/trunk/src/synfig/target_multi.cpp b/synfig-core/trunk/src/synfig/target_multi.cpp deleted file mode 100644 index 825b322..0000000 --- a/synfig-core/trunk/src/synfig/target_multi.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file target_multi.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "target_multi.h" -#include "string.h" -#include "surface.h" -#include "canvas.h" -#include "context.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -Target_Multi::Target_Multi(Target_Scanline::Handle a,Target_Scanline::Handle b): - a(a), - b(b) -{ -} - -Target_Multi::~Target_Multi() -{ -} - -void -Target_Multi::set_canvas(etl::handle c) -{ - canvas=c; - RendDesc desc=canvas->rend_desc(); - a->set_canvas(c); - b->set_canvas(c); - set_rend_desc(&desc); -} - -bool -Target_Multi::set_rend_desc(RendDesc *d) -{ - desc=*d; - return a->set_rend_desc(d) && b->set_rend_desc(d); -} - -bool -Target_Multi::init() -{ - return a->init() && b->init(); -} - -bool -Target_Multi::add_frame(const synfig::Surface *surface) -{ - return a->add_frame(surface) && b->add_frame(surface); -} - -bool -Target_Multi::start_frame(ProgressCallback *cb) -{ - return a->start_frame(cb) && b->start_frame(cb); -} - -void -Target_Multi::end_frame() -{ - a->end_frame(); - b->end_frame(); -} - -Color * -Target_Multi::start_scanline(int scanline) -{ - buffer_a=a->start_scanline(scanline); - buffer_b=b->start_scanline(scanline); - return buffer_a; -} - -bool -Target_Multi::end_scanline() -{ - memcpy(buffer_b,buffer_a,sizeof(Color)*desc.get_w()); - return a->end_scanline() && b->end_scanline(); -} diff --git a/synfig-core/trunk/src/synfig/target_multi.h b/synfig-core/trunk/src/synfig/target_multi.h deleted file mode 100644 index f42b81a..0000000 --- a/synfig-core/trunk/src/synfig/target_multi.h +++ /dev/null @@ -1,68 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file target_multi.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TARGET_MULTI_H -#define __SYNFIG_TARGET_MULTI_H - -/* === H E A D E R S ======================================================= */ - -#include "target_scanline.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/*! \class Target_Multi -** \brief Render-target -** \todo writeme -*/ -class Target_Multi : public Target_Scanline -{ - Target_Scanline::Handle a,b; - Color *buffer_a; - Color *buffer_b; -public: - - Target_Multi(Target_Scanline::Handle a,Target_Scanline::Handle b); - virtual ~Target_Multi(); - virtual bool add_frame(const synfig::Surface *surface); - virtual bool start_frame(ProgressCallback *cb=NULL); - virtual void end_frame(); - virtual Color * start_scanline(int scanline); - virtual bool end_scanline(); - - virtual void set_canvas(etl::handle c); - virtual bool set_rend_desc(RendDesc *d); - virtual bool init(); -}; // END of class Target_Multi - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/target_null.cpp b/synfig-core/trunk/src/synfig/target_null.cpp deleted file mode 100644 index 16fb552..0000000 --- a/synfig-core/trunk/src/synfig/target_null.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file target_null.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -//#include "target_null.h" - -#endif - -/* === U S I N G =========================================================== */ - -//using namespace std; -//using namespace etl; -//using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ diff --git a/synfig-core/trunk/src/synfig/target_null.h b/synfig-core/trunk/src/synfig/target_null.h deleted file mode 100644 index 45c90f2..0000000 --- a/synfig-core/trunk/src/synfig/target_null.h +++ /dev/null @@ -1,71 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file target_null.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TARGET_NULL_H -#define __SYNFIG_TARGET_NULL_H - -/* === H E A D E R S ======================================================= */ - -#include "target_scanline.h" -#include "general.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/*! \class Target_Null -** \brief A target which renders to nothing. Useful for benchmarks and other tests. -** \todo writeme -*/ -class Target_Null : public Target_Scanline -{ - Color *buffer; - - Target_Null():buffer(0) { } - -public: - - ~Target_Null() { delete buffer; } - - virtual bool start_frame(ProgressCallback */*cb*/=NULL) - { delete buffer; buffer=new Color[desc.get_w()*sizeof(Color)]; return true; } - - virtual void end_frame() { delete buffer; buffer=0; return; } - - virtual Color * start_scanline(int /*scanline*/) { return buffer; } - - virtual bool end_scanline() { return true; } - - static Target* create(const char */*filename*/=0) { return new Target_Null(); } -}; // END of class Target_Null - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/target_null_tile.cpp b/synfig-core/trunk/src/synfig/target_null_tile.cpp deleted file mode 100644 index 091ee28..0000000 --- a/synfig-core/trunk/src/synfig/target_null_tile.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file target_null_tile.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -//#include "target_null.h" - -#endif - -/* === U S I N G =========================================================== */ - -//using namespace std; -//using namespace etl; -//using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ diff --git a/synfig-core/trunk/src/synfig/target_null_tile.h b/synfig-core/trunk/src/synfig/target_null_tile.h deleted file mode 100644 index f493e2b..0000000 --- a/synfig-core/trunk/src/synfig/target_null_tile.h +++ /dev/null @@ -1,66 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file target_null_tile.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TARGET_NULL_TILE_H -#define __SYNFIG_TARGET_NULL_TILE_H - -/* === H E A D E R S ======================================================= */ - -#include "target_tile.h" -#include "general.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/*! \class Target_Null_Tile -** \brief A target which renders to nothing using tiles. Useful for benchmarks and other tests. -** \todo writeme -*/ -class Target_Null_Tile : public Target_Tile -{ - Target_Null_Tile() { } - -public: - - ~Target_Null_Tile() { } - virtual bool add_tile(const synfig::Surface &/*surface*/, int /*x*/, int /*y*/) { return true; } - - virtual bool start_frame(ProgressCallback */*cb*/=NULL) - { return true; } - - virtual void end_frame() { return; } - - static Target* create(const char */*filename*/=0) { return new Target_Null_Tile(); } -}; // END of class Target_Null_Tile - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/target_scanline.cpp b/synfig-core/trunk/src/synfig/target_scanline.cpp deleted file mode 100644 index b4745fe..0000000 --- a/synfig-core/trunk/src/synfig/target_scanline.cpp +++ /dev/null @@ -1,524 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file target_scanline.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "target_scanline.h" -#include "string.h" -#include "surface.h" -#include "render.h" -#include "canvas.h" -#include "context.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -// note that if this isn't defined then the rendering is incorrect for -// the straight blend method since the optimize_layers() function in -// canvas.cpp which makes the straight blend method work correctly -// isn't called. ie. leave this defined. to see the problem, draw a -// small circle over a solid background. set circle to amount 0.99 -// and blend method 'straight'. the background should vanish but doesn't -#define SYNFIG_OPTIMIZE_LAYER_TREE - -#define PIXEL_RENDERING_LIMIT 1500000 - -#define USE_PIXELRENDERING_LIMIT 1 - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -Target_Scanline::Target_Scanline(): - threads_(2) -{ - curr_frame_=0; -} - -int -Target_Scanline::next_frame(Time& time) -{ - int - total_frames(1), - frame_start(0), - frame_end(0); - Time - time_start(0), - time_end(0); - - // If the description's end frame is equal to - // the start frame, then it is assumed that we - // are rendering only one frame. Correct it. - if(desc.get_frame_end()==desc.get_frame_start()) - desc.set_frame_end(desc.get_frame_start()+1); - - frame_start=desc.get_frame_start(); - frame_end=desc.get_frame_end(); - time_start=desc.get_time_start(); - time_end=desc.get_time_end(); - - // Calculate the number of frames - total_frames=frame_end-frame_start; - if(total_frames<=0)total_frames=1; - - //RendDesc rend_desc=desc; - //rend_desc.set_gamma(1); - -// int total_tiles(total_tiles()); - time=(time_end-time_start)*curr_frame_/total_frames+time_start; - curr_frame_++; - -/* synfig::info("curr_frame_: %d",curr_frame_); - synfig::info("total_frames: %d",total_frames); - synfig::info("time_end: %s",time_end.get_string().c_str()); - synfig::info("time_start: %s",time_start.get_string().c_str()); -*/ -// synfig::info("time: %s",time.get_string().c_str()); - - return total_frames- curr_frame_+1; -} -bool -synfig::Target_Scanline::render(ProgressCallback *cb) -{ - SuperCallback super_cb; - int -// i=0, - total_frames, - quality=get_quality(), - frame_start, - frame_end; - Time - t=0, - time_start, - time_end; - - assert(canvas); - curr_frame_=0; - - if( !init() ){ - if(cb) cb->error(_("Target initialization failure")); - return false; - } - - // If the description's end frame is equal to - // the start frame, then it is assumed that we - // are rendering only one frame. Correct it. - if(desc.get_frame_end()==desc.get_frame_start()) - desc.set_frame_end(desc.get_frame_start()+1); - - frame_start=desc.get_frame_start(); - frame_end=desc.get_frame_end(); - time_start=desc.get_time_start(); - time_end=desc.get_time_end(); - - // Calculate the number of frames - total_frames=frame_end-frame_start; - - - //RendDesc rend_desc=desc; - - try { - // Grab the time - int i=next_frame(t); - - //synfig::info("1time_set_to %s",t.get_string().c_str()); - - if(i>1) - do{ - - //if(total_frames>1) - //for(i=0,t=time_start;iamount_complete(total_frames-(i-1),total_frames)) - return false; - - // Set the time that we wish to render - if(!get_avoid_time_sync() || canvas->get_time()!=t) - canvas->set_time(t); - - Context context; - -#ifdef SYNFIG_OPTIMIZE_LAYER_TREE - Canvas::Handle op_canvas; - if (!getenv("SYNFIG_DISABLE_OPTIMIZE_LAYER_TREE")) - { - op_canvas = Canvas::create(); - op_canvas->set_file_name(canvas->get_file_name()); - optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); - context=op_canvas->get_context(); - } - else - context=canvas->get_context(); -#else - context=canvas->get_context(); -#endif - - // If the quality is set to zero, then we - // use the parametric scanline-renderer. - if(quality==0) - { - if(threads_<=0) - { - if(!synfig::render(context,this,desc,0)) - return false; - } - else - { - if(!synfig::render_threaded(context,this,desc,0,threads_)) - return false; - } - } - else // If quality is set otherwise, then we use the accelerated renderer - { - #if USE_PIXELRENDERING_LIMIT - if(desc.get_w()*desc.get_h() > PIXEL_RENDERING_LIMIT) - { - Surface surface; - int rowheight = PIXEL_RENDERING_LIMIT/desc.get_w(); - if (!rowheight) rowheight = 1; // TODO: render partial lines to stay within the limit? - int rows = desc.get_h()/rowheight; - int lastrowheight = desc.get_h() - rows*rowheight; - - rows++; - - synfig::info("Render broken up into %d block%s %d pixels tall, and a final block %d pixels tall", - rows-1, rows==2?"":"s", rowheight, lastrowheight); - - // loop through all the full rows - if(!start_frame()) - { - throw(string("add_frame(): target panic on start_frame()")); - return false; - } - - for(int i=0; i < rows; ++i) - { - RendDesc blockrd = desc; - - //render the strip at the normal size unless it's the last one... - if(i == rows-1) - { - if(!lastrowheight) break; - blockrd.set_subwindow(0,i*rowheight,desc.get_w(),lastrowheight); - } - else - { - blockrd.set_subwindow(0,i*rowheight,desc.get_w(),rowheight); - } - - if(!context.accelerated_render(&surface,quality,blockrd,0)) - { - if(cb)cb->error(_("Accelerated Renderer Failure")); - return false; - }else - { - int y; - int rowspan=sizeof(Color)*surface.get_w(); - Surface::pen pen = surface.begin(); - - int yoff = i*rowheight; - - for(y = 0; y < blockrd.get_h(); y++, pen.inc_y()) - { - Color *colordata= start_scanline(y + yoff); - if(!colordata) - { - throw(string("add_frame(): call to start_scanline(y) returned NULL")); - return false; - } - - if(get_remove_alpha()) - { - for(int i = 0; i < surface.get_w(); i++) - colordata[i] = Color::blend(surface[y][i],desc.get_bg_color(),1.0f); - } - else - memcpy(colordata,surface[y],rowspan); - - if(!end_scanline()) - { - throw(string("add_frame(): target panic on end_scanline()")); - return false; - } - } - } - } - - end_frame(); - - }else //use normal rendering... - { - #endif - Surface surface; - - if(!context.accelerated_render(&surface,quality,desc,0)) - { - // For some reason, the accelerated renderer failed. - if(cb)cb->error(_("Accelerated Renderer Failure")); - return false; - } - else - { - // Put the surface we renderer - // onto the target. - if(!add_frame(&surface)) - { - if(cb)cb->error(_("Unable to put surface on target")); - return false; - } - } - #if USE_PIXELRENDERING_LIMIT - } - #endif - } - }while((i=next_frame(t))); - else - { - // Set the time that we wish to render - if(!get_avoid_time_sync() || canvas->get_time()!=t) - canvas->set_time(t); - Context context; - -#ifdef SYNFIG_OPTIMIZE_LAYER_TREE - Canvas::Handle op_canvas; - if (!getenv("SYNFIG_DISABLE_OPTIMIZE_LAYER_TREE")) - { - op_canvas = Canvas::create(); - op_canvas->set_file_name(canvas->get_file_name()); - optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); - context=op_canvas->get_context(); - } - else - context=canvas->get_context(); -#else - context=canvas->get_context(); -#endif - - // If the quality is set to zero, then we - // use the parametric scanline-renderer. - if(quality==0) - { - if(threads_<=0) - { - if(!synfig::render(context,this,desc,cb)) - return false; - } - else - { - if(!synfig::render_threaded(context,this,desc,cb,threads_)) - return false; - } - } - else // If quality is set otherwise, then we use the accelerated renderer - { - #if USE_PIXELRENDERING_LIMIT - if(desc.get_w()*desc.get_h() > PIXEL_RENDERING_LIMIT) - { - Surface surface; - int totalheight = desc.get_h(); - int rowheight = PIXEL_RENDERING_LIMIT/desc.get_w(); - if (!rowheight) rowheight = 1; // TODO: render partial lines to stay within the limit? - int rows = desc.get_h()/rowheight; - int lastrowheight = desc.get_h() - rows*rowheight; - - rows++; - - synfig::info("Render broken up into %d block%s %d pixels tall, and a final block %d pixels tall", - rows-1, rows==2?"":"s", rowheight, lastrowheight); - - // loop through all the full rows - if(!start_frame()) - { - throw(string("add_frame(): target panic on start_frame()")); - return false; - } - - for(int i=0; i < rows; ++i) - { - RendDesc blockrd = desc; - - //render the strip at the normal size unless it's the last one... - if(i == rows-1) - { - if(!lastrowheight) break; - blockrd.set_subwindow(0,i*rowheight,desc.get_w(),lastrowheight); - } - else - { - blockrd.set_subwindow(0,i*rowheight,desc.get_w(),rowheight); - } - - SuperCallback sc(cb, i*rowheight, (i+1)*rowheight, totalheight); - - if(!context.accelerated_render(&surface,quality,blockrd,&sc)) - { - if(cb)cb->error(_("Accelerated Renderer Failure")); - return false; - }else - { - int y; - int rowspan=sizeof(Color)*surface.get_w(); - Surface::pen pen = surface.begin(); - - int yoff = i*rowheight; - - for(y = 0; y < blockrd.get_h(); y++, pen.inc_y()) - { - Color *colordata= start_scanline(y + yoff); - if(!colordata) - { - throw(string("add_frame(): call to start_scanline(y) returned NULL")); - return false; - } - - if(get_remove_alpha()) - { - for(int i = 0; i < surface.get_w(); i++) - colordata[i] = Color::blend(surface[y][i],desc.get_bg_color(),1.0f); - } - else - memcpy(colordata,surface[y],rowspan); - - if(!end_scanline()) - { - throw(string("add_frame(): target panic on end_scanline()")); - return false; - } - } - } - - //I'm done with this part - sc.amount_complete(100,100); - } - - end_frame(); - - }else - { - #endif - Surface surface; - - if(!context.accelerated_render(&surface,quality,desc,cb)) - { - if(cb)cb->error(_("Accelerated Renderer Failure")); - return false; - } - else - { - // Put the surface we renderer - // onto the target. - if(!add_frame(&surface)) - { - if(cb)cb->error(_("Unable to put surface on target")); - return false; - } - } - #if USE_PIXELRENDERING_LIMIT - } - #endif - } - } - - } - catch(String str) - { - if(cb)cb->error(_("Caught string :")+str); - return false; - } - catch(std::bad_alloc) - { - if(cb)cb->error(_("Ran out of memory (Probably a bug)")); - return false; - } - catch(...) - { - if(cb)cb->error(_("Caught unknown error, rethrowing...")); - throw; - } - return true; -} - -bool -Target_Scanline::add_frame(const Surface *surface) -{ - assert(surface); - - - int y; - int rowspan=sizeof(Color)*surface->get_w(); - Surface::const_pen pen=surface->begin(); - - if(!start_frame()) - { - throw(string("add_frame(): target panic on start_frame()")); - return false; - } - - for(y=0;yget_h();y++,pen.inc_y()) - { - Color *colordata= start_scanline(y); - if(!colordata) - { - throw(string("add_frame(): call to start_scanline(y) returned NULL")); - return false; - } - - if(get_remove_alpha()) - { - for(int i=0;iget_w();i++) - colordata[i]=Color::blend((*surface)[y][i],desc.get_bg_color(),1.0f); - } - else - memcpy(colordata,(*surface)[y],rowspan); - - if(!end_scanline()) - { - throw(string("add_frame(): target panic on end_scanline()")); - return false; - } - } - - end_frame(); - - return true; -} diff --git a/synfig-core/trunk/src/synfig/target_scanline.h b/synfig-core/trunk/src/synfig/target_scanline.h deleted file mode 100644 index c9e8199..0000000 --- a/synfig-core/trunk/src/synfig/target_scanline.h +++ /dev/null @@ -1,100 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file target_scanline.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TARGET_SCANLINE_H -#define __SYNFIG_TARGET_SCANLINE_H - -/* === H E A D E R S ======================================================= */ - -#include "target.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/*! \class Target_Scanline -** \brief Render-target -** \todo writeme -*/ -class Target_Scanline : public Target -{ - int threads_; - int curr_frame_; - -public: - typedef etl::handle Handle; - typedef etl::loose_handle LooseHandle; - typedef etl::handle ConstHandle; - - Target_Scanline(); - - //! Renders the canvas to the target - virtual bool render(ProgressCallback *cb=NULL); - - //! Marks the start of a frame - /*! \return \c true on success, \c false upon an error. - ** \see end_frame(), start_scanline() - */ - virtual bool start_frame(ProgressCallback *cb=NULL)=0; - - virtual int next_frame(Time& time); - - //! Marks the end of a frame - /*! \see start_frame() */ - virtual void end_frame()=0; - - //! Marks the start of a scanline - /*! \param scanline Which scanline is going to be rendered. - ** \return The address where the target wants the scanline - ** to be written. - ** \warning Must be called after start_frame() - ** \see end_scanline(), start_frame() - */ - virtual Color * start_scanline(int scanline)=0; - - //! Marks the end of a scanline - /*! Takes the data that was put at the address returned to by start_scanline() - ** and does whatever it is supposed to do with it. - ** \return \c true on success, \c false on failure. - ** \see start_scanline() - */ - virtual bool end_scanline()=0; - - void set_threads(int x) { threads_=x; } - - int get_threads()const { return threads_; } - - bool add_frame(const synfig::Surface *surface); -private: -}; // END of class Target_Scanline - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/target_tile.cpp b/synfig-core/trunk/src/synfig/target_tile.cpp deleted file mode 100644 index f02b71b..0000000 --- a/synfig-core/trunk/src/synfig/target_tile.cpp +++ /dev/null @@ -1,456 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file target_tile.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "target_tile.h" -#include "string.h" -#include "surface.h" -#include "render.h" -#include "canvas.h" -#include "context.h" -#include "general.h" -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ -const unsigned int DEF_TILE_WIDTH = TILE_SIZE / 2; -const unsigned int DEF_TILE_HEIGHT= TILE_SIZE / 2; - -// note that if this isn't defined then the rendering is incorrect for -// the straight blend method since the optimize_layers() function in -// canvas.cpp which makes the straight blend method work correctly -// isn't called. ie. leave this defined. to see the problem, draw a -// small circle over a solid background. set circle to amount 0.99 -// and blend method 'straight'. the background should vanish but doesn't -#define SYNFIG_OPTIMIZE_LAYER_TREE - -#ifdef _DEBUG -// #define SYNFIG_DISPLAY_EFFICIENCY -#endif - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -Target_Tile::Target_Tile(): - threads_(2), - tile_w_(DEF_TILE_WIDTH), - tile_h_(DEF_TILE_HEIGHT), - curr_tile_(0), - clipping_(true) -{ - curr_frame_=0; -} - -int -Target_Tile::next_frame(Time& time) -{ - int - total_frames(1), - frame_start(0), - frame_end(0); - Time - time_start(0), - time_end(0); - - // If the description's end frame is equal to - // the start frame, then it is assumed that we - // are rendering only one frame. Correct it. - if(desc.get_frame_end()==desc.get_frame_start()) - desc.set_frame_end(desc.get_frame_start()+1); - - frame_start=desc.get_frame_start(); - frame_end=desc.get_frame_end(); - time_start=desc.get_time_start(); - time_end=desc.get_time_end(); - - // Calculate the number of frames - total_frames=frame_end-frame_start; - if(total_frames<=0)total_frames=1; - - //RendDesc rend_desc=desc; - //rend_desc.set_gamma(1); - -// int total_tiles(total_tiles()); - time=(time_end-time_start)*curr_frame_/total_frames+time_start; - curr_frame_++; - -/* synfig::info("curr_frame_: %d",curr_frame_); - synfig::info("total_frames: %d",total_frames); - synfig::info("time_end: %s",time_end.get_string().c_str()); - synfig::info("time_start: %s",time_start.get_string().c_str()); -*/ -// synfig::info("time: %s",time.get_string().c_str()); - - return total_frames- curr_frame_+1; -} - -int -Target_Tile::next_tile(int& x, int& y) -{ - // Width of the image(in tiles) - int tw(rend_desc().get_w()/tile_w_); - int th(rend_desc().get_h()/tile_h_); - - // Add the last tiles (which will be clipped) - if(rend_desc().get_w()%tile_w_!=0)tw++; - if(rend_desc().get_h()%tile_h_!=0)th++; - - x=(curr_tile_%tw)*tile_h_; - y=(curr_tile_/tw)*tile_w_; - - curr_tile_++; - return (tw*th)-curr_tile_+1; -} - -bool -synfig::Target_Tile::render_frame_(Context context,ProgressCallback *cb) -{ - if(tile_w_<=0||tile_h_<=0) - { - if(cb)cb->error(_("Bad Tile Size")); - return false; - } - const RendDesc &rend_desc(desc); -#define total_tiles total_tiles() - - etl::clock total_time; - etl::clock::value_type work_time(0); - etl::clock::value_type find_tile_time(0); - etl::clock::value_type add_tile_time(0); - total_time.reset(); - - // If the quality is set to zero, then we - // use the parametric scanline-renderer. - if(get_quality()==0) - { - Surface surface; - - RendDesc tile_desc; - int x,y,w,h; - int i; - etl::clock tile_timer; - tile_timer.reset(); - while((i=next_tile(x,y))) - { - find_tile_time+=tile_timer(); - SuperCallback super(cb,(total_tiles-i+1)*1000,(total_tiles-i+2)*1000,total_tiles*1000); - if(!super.amount_complete(0,1000)) - return false; - //if(cb && !cb->amount_complete(total_tiles-i,total_tiles)) - // return false; - - // Perform clipping on the tile - if(clipping_) - { - w=x+tile_w_error(_("Parametric Renderer Failure")); - return false; - } - else - { - if(!surface) - { - if(cb)cb->error(_("Bad surface")); - return false; - } - if(get_remove_alpha()) - for(int i=0;ierror(_("add_tile():Unable to put surface on target")); - return false; - } - } - tile_timer.reset(); - } - } - else // If quality is set otherwise, then we use the accelerated renderer - { - Surface surface; - - RendDesc tile_desc; - int x,y,w,h; - int i; - etl::clock tile_timer; - tile_timer.reset(); - while((i=next_tile(x,y))) - { - find_tile_time+=tile_timer(); - SuperCallback super(cb,(total_tiles-i)*1000,(total_tiles-i+1)*1000,total_tiles*1000); - if(!super.amount_complete(0,1000)) - return false; -// if(cb && !cb->amount_complete(total_tiles-i,total_tiles)) -// return false; - // Perform clipping on the tile - if(clipping_) - { - w=x+tile_w_error(_("Accelerated Renderer Failure")); - return false; - } - else - { - work_time+=timer2(); - if(!surface) - { - if(cb)cb->error(_("Bad surface")); - return false; - } - if(get_remove_alpha()) - for(int i=0;ierror(_("add_tile():Unable to put surface on target")); - return false; - } - add_tile_time+=timer(); - } - tile_timer.reset(); - signal_progress()(); - } - } - if(cb && !cb->amount_complete(total_tiles,total_tiles)) - return false; - -#ifdef SYNFIG_DISPLAY_EFFICIENCY - synfig::info(">>>>>> Render Time: %fsec, Find Tile Time: %fsec, Add Tile Time: %fsec, Total Time: %fsec",work_time,find_tile_time,add_tile_time,total_time()); - synfig::info(">>>>>> FRAME EFFICIENCY: %f%%",(100.0f*work_time/total_time())); -#endif -#undef total_tiles - return true; -} - -bool -synfig::Target_Tile::render(ProgressCallback *cb) -{ - SuperCallback super_cb; - int - i=0, - total_frames, - frame_start, - frame_end; - Time - t=0, - time_start, - time_end; - - assert(canvas); - curr_frame_=0; - init(); - if( !init() ){ - if(cb) cb->error(_("Target initialization failure")); - return false; - } - - - // If the description's end frame is equal to - // the start frame, then it is assumed that we - // are rendering only one frame. Correct it. - if(desc.get_frame_end()==desc.get_frame_start()) - desc.set_frame_end(desc.get_frame_start()+1); - - frame_start=desc.get_frame_start(); - frame_end=desc.get_frame_end(); - time_start=desc.get_time_start(); - time_end=desc.get_time_end(); - - // Calculate the number of frames - total_frames=frame_end-frame_start; - - - - try { - // Grab the time - i=next_frame(t); - - //synfig::info("1time_set_to %s",t.get_string().c_str()); - - if(i>=1) - { - do - { - curr_tile_=0; - - // If we have a callback, and it returns - // false, go ahead and bail. (maybe a use cancel) - if(cb && !cb->amount_complete(total_frames-(i-1),total_frames)) - return false; - - if(!start_frame(cb)) - return false; - - // Set the time that we wish to render - //if(!get_avoid_time_sync() || canvas->get_time()!=t) - canvas->set_time(t); - - Context context; - -#ifdef SYNFIG_OPTIMIZE_LAYER_TREE - Canvas::Handle op_canvas; - if (!getenv("SYNFIG_DISABLE_OPTIMIZE_LAYER_TREE")) - { - op_canvas = Canvas::create(); - op_canvas->set_file_name(canvas->get_file_name()); - optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); - context=op_canvas->get_context(); - } - else - context=canvas->get_context(); -#else - context=canvas->get_context(); -#endif - -/* - #ifdef SYNFIG_OPTIMIZE_LAYER_TREE - Context context; - Canvas::Handle op_canvas(Canvas::create()); - op_canvas->set_file_name(canvas->get_file_name()); - // Set the time that we wish to render - canvas->set_time(t); - optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); - context=op_canvas->get_context(); - #else - Context context; - // Set the time that we wish to render - canvas->set_time(t); - context=canvas->get_context(); - #endif -*/ - - if(!render_frame_(context,0)) - return false; - end_frame(); - }while((i=next_frame(t))); - //synfig::info("tilerenderer: i=%d, t=%s",i,t.get_string().c_str()); - } - else - { - curr_tile_=0; - - if(!start_frame(cb)) - return false; - - // Set the time that we wish to render -// if(!get_avoid_time_sync() || canvas->get_time()!=t) - canvas->set_time(t); - - //synfig::info("2time_set_to %s",t.get_string().c_str()); - - Context context; - -#ifdef SYNFIG_OPTIMIZE_LAYER_TREE - Canvas::Handle op_canvas; - if (!getenv("SYNFIG_DISABLE_OPTIMIZE_LAYER_TREE")) - { - op_canvas = Canvas::create(); - op_canvas->set_file_name(canvas->get_file_name()); - optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas); - context=op_canvas->get_context(); - } - else - context=canvas->get_context(); -#else - context=canvas->get_context(); -#endif - - if(!render_frame_(context, cb)) - return false; - end_frame(); - } - - } - catch(String str) - { - if(cb)cb->error(_("Caught string :")+str); - return false; - } - catch(std::bad_alloc) - { - if(cb)cb->error(_("Ran out of memory (Probably a bug)")); - return false; - } - catch(...) - { - if(cb)cb->error(_("Caught unknown error, rethrowing...")); - throw; - } - return true; -} diff --git a/synfig-core/trunk/src/synfig/target_tile.h b/synfig-core/trunk/src/synfig/target_tile.h deleted file mode 100644 index 84ef50e..0000000 --- a/synfig-core/trunk/src/synfig/target_tile.h +++ /dev/null @@ -1,124 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file target_tile.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TARGET_TILE_H -#define __SYNFIG_TARGET_TILE_H - -/* === H E A D E R S ======================================================= */ - -#include "target.h" - -/* === M A C R O S ========================================================= */ - -#define TILE_SIZE 120 - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/*! \class Target_Tile -** \brief Render-target -** \todo writeme -*/ -class Target_Tile : public Target -{ - int threads_; - int tile_w_; - int tile_h_; - int curr_tile_; - int curr_frame_; - bool clipping_; -public: - typedef etl::handle Handle; - typedef etl::loose_handle LooseHandle; - typedef etl::handle ConstHandle; - - Target_Tile(); - - //! Renders the canvas to the target - virtual bool render(ProgressCallback *cb=NULL); - - //! Determines which tile needs to be rendered next. - /*! Most cases will not have to redefine this function. - ** The default should be adequate in nearly all situations. - ** \returns The number of tiles left to go plus one. - ** This means that whenever this function returns zero, - ** there are no more tiles to render and that any value - ** in \a x or \a y should be disregarded. */ - virtual int next_tile(int& x, int& y); - - virtual int next_frame(Time& time); - - //! Adds the tile at \a x , \a y contained in \a surface - virtual bool add_tile(const synfig::Surface &surface, int x, int y)=0; - - virtual int total_tiles()const - { - // Width of the image(in tiles) - const int tw(rend_desc().get_w()/tile_w_+(rend_desc().get_w()%tile_w_?1:0)); - const int th(rend_desc().get_h()/tile_h_+(rend_desc().get_h()%tile_h_?1:0)); - - return tw*th; - } - - //! Marks the start of a frame - /*! \return \c true on success, \c false upon an error. - ** \see end_frame(), start_scanline() - */ - virtual bool start_frame(ProgressCallback *cb=NULL)=0; - - //! Marks the end of a frame - /*! \see start_frame() */ - virtual void end_frame()=0; - - void set_threads(int x) { threads_=x; } - - int get_threads()const { return threads_; } - - void set_tile_w(int w) { tile_w_=w; } - - int get_tile_w()const { return tile_w_; } - - void set_tile_h(int h) { tile_h_=h; } - - int get_tile_h()const { return tile_h_; } - - bool get_clipping()const { return clipping_; } - - void set_clipping(bool x) { clipping_=x; } - -private: - - bool render_frame_(Context context,ProgressCallback *cb=0); - -}; // END of class Target_Tile - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/time.cpp b/synfig-core/trunk/src/synfig/time.cpp deleted file mode 100644 index f9fae68..0000000 --- a/synfig-core/trunk/src/synfig/time.cpp +++ /dev/null @@ -1,324 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file time.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** Copyright (c) 2008 Gerco Ballintijn -** Copyright (c) 2008 Carlos López -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "time.h" -#include -#include -#include "general.h" -#include -#include -#include -#include -#include -#include - - -#ifdef WIN32 -#include -#ifndef isnan -extern "C" { int _isnan(double x); } -#define isnan _isnan -#endif -#endif - -// For some reason isnan() isn't working on macosx any more. -// This is a quick fix. -#if defined(__APPLE__) && !defined(SYNFIG_ISNAN_FIX) -#ifdef isnan -#undef isnan -#endif -inline bool isnan(double x) { return x != x; } -inline bool isnan(float x) { return x != x; } -#define SYNFIG_ISNAN_FIX 1 -#endif - - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -#define tolower ::tolower - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === M E T H O D S ======================================================= */ - -Time::Time(const String &str_, float fps): - value_(0) -{ - String str(str_); - std::transform(str.begin(),str.end(),str.begin(),&tolower); - - // Start/Begin Of Time - if(str=="sot" || str=="bot") - { - operator=(begin()); - return; - } - // End Of Time - if(str=="eot") - { - operator=(end()); - return; - } - - - unsigned int pos=0; - int read; - float amount; - - // Now try to read it in the letter-abbreviated format - while(pos=str.size() || read==0) - { - // Throw up a warning if there are no units - // and the amount isn't zero. There is no need - // to warn about units if the value is zero - // it is the only case where units are irrelevant. - if(amount!=0) - synfig::warning("Time(): No unit provided in time code, assuming SECONDS (\"%s\")",str.c_str()); - value_+=amount; - return; - } - switch(str[pos]) - { - case 'h': - case 'H': - value_+=amount*3600; - break; - case 'm': - case 'M': - value_+=amount*60; - break; - case 's': - case 'S': - value_+=amount; - break; - case 'f': - case 'F': - if(fps) - value_+=amount/fps; - else - synfig::warning("Time(): Individual frames referenced, but frame rate is unknown"); - break; - case ':': - // try to read it in as a traditional time format - { - int hour,minute,second; - float frame; - if(fps && sscanf(str.c_str(),"%d:%d:%d.%f",&hour,&minute,&second,&frame)==4) - { - value_=frame/fps+(hour*3600+minute*60+second); - return; - } - - if(sscanf(str.c_str(),"%d:%d:%d",&hour,&minute,&second)==3) - { - value_=hour*3600+minute*60+second; - return; - } - } - synfig::warning("Time(): Bad time format"); - break; - - default: - value_+=amount; - synfig::warning("Time(): Unexpected character '%c' when parsing time string \"%s\"",str[pos],str.c_str()); - break; - } - pos++; - amount=0; - } -} - -String -Time::get_string(float fps, Time::Format format)const -{ - Time time(*this); - - if(time<=begin()) - return "SOT"; // Start Of Time - if(time>=end()) - return "EOT"; // End Of Time - - if(fps<0)fps=0; - - if(ceil(time.value_)-time.value_1) - { - int frame; - frame=round_to_int(time*fps); - - return strprintf("%02d:%02d:%02d.%02d",hour,minute,second,frame); - } - else - return strprintf("%02d:%02d:%02d",hour,minute,second); - } - - if (format <= FORMAT_FRAMES) - { - if (fps && fps>0) - return strprintf("%df", round_to_int(time * fps)); - else - return strprintf("%ds", round_to_int(time * 1)); - } - - String ret; - bool started = false; - - if(format<=FORMAT_FULL || hour) - { - ret+=strprintf("%dh",hour); - started = true; - } - - if(format<=FORMAT_FULL || minute) - { - if (!(format<=FORMAT_NOSPACES) && started) - ret += " "; - - ret += strprintf("%dm", minute); - started = true; - } - - if(fps && fps>1) - { - int second; - float frame; - second=time;time-=second; - frame=time*fps; - - if(format<=FORMAT_FULL || second) - { - if (!(format<=FORMAT_NOSPACES) && started) - ret += " "; - - ret += strprintf("%ds", (int)second); - started = true; - } - - if(format<=FORMAT_FULL || abs(frame) > epsilon_() || !started) - { - if (!(format<=FORMAT_NOSPACES) && started) - ret += " "; - - if(abs(frame-floor(frame) >= epsilon_())) - ret += strprintf("%0.3ff", frame); - else - ret += strprintf("%0.0ff", frame); - } - } - else - { - float second; - second=time; - if(format<=FORMAT_FULL || second || !started) - { - if (!(format<=FORMAT_NOSPACES) && started) - ret += " "; - - if(abs(second-floor(second))>=epsilon_()) - { - String seconds(strprintf("%0.8f",second)); - - // skip trailing zeros - int count = 0; - String::reverse_iterator i = seconds.rbegin(); - for ( ; (*i) == '0'; i++) - count++; - - // if we removed too many, go back one place, leaving one zero - if (*i < '0' || *i > '9') count--; - - ret += seconds.substr(0, seconds.size()-count) + "s"; - } - else - ret+=strprintf("%0.0fs",second); - } - } - - return ret; -} - -Time -Time::round(float fps)const -{ - assert(fps>0); - - value_type time(*this); - - time*=fps; - - if(abs(time-floor(time))<0.5) - return floor(time)/fps; - else - return ceil(time)/fps; -} - -#ifdef _DEBUG -const char * -Time::c_str()const -{ - return get_string().c_str(); -} -#endif - -//! \writeme -bool -Time::is_valid()const -{ - return !isnan(value_); -} diff --git a/synfig-core/trunk/src/synfig/time.h b/synfig-core/trunk/src/synfig/time.h deleted file mode 100644 index 5acc15e..0000000 --- a/synfig-core/trunk/src/synfig/time.h +++ /dev/null @@ -1,171 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file time.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TIME_H -#define __SYNFIG_TIME_H - -/* === H E A D E R S ======================================================= */ - -#include "string_decl.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/*! \class Time -** \todo writeme -** \see TimeFormat, time_to_string(), string_to_time() -*/ -class Time -{ -public: - typedef double value_type; - - /*! \enum Format - ** \todo writeme - ** \see Time, get_string() */ - enum Format - { - FORMAT_NORMAL=0, //!< Represents the default method of printing the time - FORMAT_NOSPACES=(1<<0), //!< Remove any whitespace - FORMAT_FULL=(1<<1), //!< Do not remove units that have "zero" value - FORMAT_VIDEO=(1<<2), //!< Use the HH:MM:SS.FF format - FORMAT_FRAMES=(1<<3), //!< Use the FF format (frames only) - - FORMAT_END=(1<<4) //!< \internal Not used - }; // END of enum Format - -private: - value_type value_; - - static value_type epsilon_() { return static_cast(0.0005); } - -public: - Time() { } - - Time(const value_type &x):value_(x) { } - - Time(int x):value_(x) { } - - Time(int hour, int minute, float second):value_(static_cast(second+hour*3600+minute*60)) { } - - //! Constructs Time from the given string. - /*! \note If the string references frames, then the - ** frame rate (\a fps) should be provided from the - ** correct source. (Which is most likely the RendDesc - ** of the current Canvas) - ** The frame count will be ignored if the - ** FPS is not given. */ - Time(const String &string, float fps=0); - - //! Marks the exclusive negative boundary of time - static const Time begin() { return static_cast(-32767.0f*512.0f); } - - //! Marks the exclusive positive boundary of time - static const Time end() { return static_cast(32767.0f*512.0f); } - - //! Marks zero time - static const Time zero() { return static_cast(0); } - - //! The amount of allowable error in calculations - static const Time epsilon() { return static_cast(epsilon_()); } - - //! Returns a string describing the current time value - /*! \see Format */ - String get_string(float fps=0, Time::Format format=FORMAT_NORMAL)const; - -#ifdef _DEBUG - const char *c_str()const; -#endif - - //! \writeme - bool is_valid()const; - - //! Rounds time to the nearest frame for the given frame rate, \a fps - Time round(float fps)const; - - bool is_equal(const Time& rhs)const { return (value_>rhs.value_)?value_-rhs.value_<=epsilon_():rhs.value_-value_<=epsilon_(); } - bool is_less_than(const Time& rhs)const { return rhs.value_-value_ > epsilon_(); } - bool is_more_than(const Time& rhs)const { return value_-rhs.value_ > epsilon_(); } - - operator double()const { return value_; } - - template bool operator<(const U& rhs)const { return value_ bool operator>(const U& rhs)const { return value_>rhs; } - template bool operator<=(const U& rhs)const { return value_<=rhs; } - template bool operator>=(const U& rhs)const { return value_>=rhs; } - template bool operator==(const U& rhs)const { return value_==rhs; } - template bool operator!=(const U& rhs)const { return value_!=rhs; } - -#if 0 - bool operator<(const Time& rhs)const { return value_(const Time& rhs)const { return value_>rhs.value_; } - bool operator<=(const Time& rhs)const { return value_<=rhs.value_; } - bool operator>=(const Time& rhs)const { return value_>=rhs.value_; } - bool operator==(const Time& rhs)const { return value_==rhs.value_; } - bool operator!=(const Time& rhs)const { return value_!=rhs.value_; } -#else - bool operator<(const Time& rhs)const { return is_less_than(rhs); } - bool operator>(const Time& rhs)const { return is_more_than(rhs); } - bool operator<=(const Time& rhs)const { return is_less_than(rhs)||is_equal(rhs); } - bool operator>=(const Time& rhs)const { return is_more_than(rhs)||is_equal(rhs); } - bool operator==(const Time& rhs)const { return is_equal(rhs); } - bool operator!=(const Time& rhs)const { return !is_equal(rhs); } -#endif - - template const Time& operator+=(const U &rhs) { value_+=static_cast(rhs); return *this; } - template const Time& operator-=(const U &rhs) { value_-=static_cast(rhs); return *this; } - template const Time& operator*=(const U &rhs) { value_*=static_cast(rhs); return *this; } - template const Time& operator/=(const U &rhs) { value_/=static_cast(rhs); return *this; } - - template Time operator+(const U &rhs)const { return value_+static_cast(rhs); } - template Time operator-(const U &rhs)const { return value_-static_cast(rhs); } - template Time operator*(const U &rhs)const { return value_*static_cast(rhs); } - template Time operator/(const U &rhs)const { return value_/static_cast(rhs); } - - Time operator-()const { return -value_; } -}; // END of class Time - -//! This operator allows the combining of Time::Format flags using the '|' operator -/*! \see Time::Format, Time::get_string() */ -inline Time::Format operator|(Time::Format lhs, Time::Format rhs) -{ return static_cast((int)lhs|(int)rhs); } - -//! This operator is for checking Time::Format flags. -/*! Don't think of it as "less then or equal to", but think of it -** like an arrow. Is \a rhs inside of \a lhs ? -** \see Time::Format, Time::get_string() */ -inline bool operator<=(Time::Format lhs, Time::Format rhs) -{ return (static_cast(lhs) & static_cast(rhs))==static_cast(rhs); } - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/timepointcollect.cpp b/synfig-core/trunk/src/synfig/timepointcollect.cpp deleted file mode 100644 index c395dfd..0000000 --- a/synfig-core/trunk/src/synfig/timepointcollect.cpp +++ /dev/null @@ -1,153 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file timepointcollect.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "timepointcollect.h" -#include "valuenode_animated.h" -#include "layer_pastecanvas.h" -#include "layer.h" -#include "canvas.h" -#include "value.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -//! \writeme -int -synfig::waypoint_collect(set > &waypoint_set, - const Time &time, - const etl::handle &node) -{ - const TimePointSet& timepoint_set(node->get_times()); - - // Check to see if there is anything in here at the given time - if(timepoint_set.find(time)==timepoint_set.end()) - return 0; - - // Check if we are a linkable value node - LinkableValueNode::Handle linkable_value_node; - linkable_value_node=linkable_value_node.cast_dynamic(node); - if(linkable_value_node) - { - const int link_count(linkable_value_node->link_count()); - int i,ret(0); - for(i=0;iget_link(i).get()); - - return ret; - } - - // Check if we are a layer - Layer::Handle layer; - layer=layer.cast_dynamic(node); - if(layer) - { - const Layer::DynamicParamList& dyn_param_list(layer->dynamic_param_list()); - Layer::DynamicParamList::const_iterator iter; - int ret(0); - for(iter=dyn_param_list.begin();iter!=dyn_param_list.end();++iter) - ret+=waypoint_collect(waypoint_set,time,iter->second); - - ValueBase canvas_value(layer->get_param("canvas")); - if(canvas_value.get_type()==ValueBase::TYPE_CANVAS) - { - etl::handle p = etl::handle::cast_dynamic(layer); - if (p) - ret+=waypoint_collect(waypoint_set, time + p->get_time_offset(), - Canvas::Handle(canvas_value.get(Canvas::Handle()))); - else - ret+=waypoint_collect(waypoint_set, time, - Canvas::Handle(canvas_value.get(Canvas::Handle()))); - } - return ret; - } - - // Check if we are a canvas - Canvas::Handle canvas; - canvas=canvas.cast_dynamic(node); - if(canvas) - { - Canvas::const_iterator iter; - int ret(0); - for(iter=canvas->begin();iter!=canvas->end();++iter) - ret+=waypoint_collect(waypoint_set,time,*iter); - return ret; - } - - // Check if we are an animated value node - ValueNode_Animated::Handle value_node_animated; - value_node_animated=value_node_animated.cast_dynamic(node); - if(value_node_animated) - { - try{ - Waypoint waypoint=*value_node_animated->find(time); - - // If it is already in the waypoint set, then - // don't bother adding it again - if(waypoint_set.find(waypoint)!=waypoint_set.end()) - return 0; - - waypoint_set.insert(waypoint); - return 1; - }catch(...) - { - return 0; - } - } - - return 0; -} - -//! \writeme -int -synfig::activepoint_collect(set >& /*activepoint_set*/,const Time& time, const etl::handle& node) -{ - const TimePointSet& timepoint_set(node->get_times()); - - // Check to see if there is anything in here at the given time - if(timepoint_set.find(time)==timepoint_set.end()) - return 0; - - return 0; -} diff --git a/synfig-core/trunk/src/synfig/timepointcollect.h b/synfig-core/trunk/src/synfig/timepointcollect.h deleted file mode 100644 index 7f6827c..0000000 --- a/synfig-core/trunk/src/synfig/timepointcollect.h +++ /dev/null @@ -1,54 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file timepointcollect.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TIMEPOINTCOLLECT_H -#define __SYNFIG_TIMEPOINTCOLLECT_H - -/* === H E A D E R S ======================================================= */ - -#include -#include "activepoint.h" -#include "waypoint.h" -#include "node.h" -#include "time.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -//! \writeme -int waypoint_collect(std::set >& waypoint_set,const Time& time, const etl::handle& node); - -//! \writeme -int activepoint_collect(std::set >& activepoint_set,const Time& time, const etl::handle& node); - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/transform.cpp b/synfig-core/trunk/src/synfig/transform.cpp deleted file mode 100644 index 2e9de68..0000000 --- a/synfig-core/trunk/src/synfig/transform.cpp +++ /dev/null @@ -1,149 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file transform.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "transform.h" -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -synfig::GUID -TransformStack::get_guid()const -{ - GUID ret(0); - - for(const_iterator iter(begin());iter!=end();++iter) - ret%=(*iter)->get_guid(); - return ret; -} - -synfig::Vector -TransformStack::perform(const synfig::Vector& x)const -{ - synfig::Vector ret(x); - - for(const_reverse_iterator iter(rbegin());iter!=rend();++iter) - ret=(*iter)->perform(ret); - - return ret; -} - -synfig::Vector -TransformStack::unperform(const synfig::Vector& x)const -{ - synfig::Vector ret(x); - - for(const_iterator iter(begin());iter!=end();++iter) - ret=(*iter)->unperform(ret); - - return ret; -} - -synfig::Rect -TransformStack::perform(const synfig::Rect& x)const -{ - Point min(x.get_min()); - Point max(x.get_max()); - Rect ret(perform(min),perform(max)); - - std::swap(min[1],max[1]); - ret - .expand(perform(min)) - .expand(perform(max)) - ; - return ret; -} - -synfig::Rect -TransformStack::unperform(const synfig::Rect& x)const -{ - Point min(x.get_min()); - Point max(x.get_max()); - Rect ret(unperform(min),unperform(max)); - - std::swap(min[1],max[1]); - ret - .expand(unperform(min)) - .expand(unperform(max)) - ; - return ret; -} - -synfig::Rect -Transform::perform(const synfig::Rect& x)const -{ - if(x.area()>1000000000000.0) - return Rect::full_plane(); - - Point min(x.get_min()); - Point max(x.get_max()); - - Rect ret(perform(min),perform(max)); - - std::swap(min[1],max[1]); - ret - .expand(perform(min)) - .expand(perform(max)) - ; - return ret; -} - -synfig::Rect -Transform::unperform(const synfig::Rect& x)const -{ - if(x.area()>1000000000000.0) - return Rect::full_plane(); - - Point min(x.get_min()); - Point max(x.get_max()); - - Rect ret(unperform(min),unperform(max)); - - std::swap(min[1],max[1]); - ret - .expand(unperform(min)) - .expand(unperform(max)) - ; - return ret; -} diff --git a/synfig-core/trunk/src/synfig/transform.h b/synfig-core/trunk/src/synfig/transform.h deleted file mode 100644 index 50bf7ff..0000000 --- a/synfig-core/trunk/src/synfig/transform.h +++ /dev/null @@ -1,86 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file transform.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TRANSFORM_H -#define __SYNFIG_TRANSFORM_H - -/* === H E A D E R S ======================================================= */ - -#include -#include "vector.h" -#include -#include "rect.h" -#include "guid.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class Transform : public etl::shared_object -{ - GUID guid_; - -public: - typedef etl::handle Handle; - -protected: - Transform(const GUID& guid):guid_(guid) { } - -public: - - const GUID& get_guid()const { return guid_; } - - virtual ~Transform() { } - virtual synfig::Vector perform(const synfig::Vector& x)const=0; - virtual synfig::Vector unperform(const synfig::Vector& x)const=0; - - virtual synfig::Rect perform(const synfig::Rect& x)const; - virtual synfig::Rect unperform(const synfig::Rect& x)const; - -}; // END of class Transform - -class TransformStack : public std::list -{ -public: - GUID get_guid()const; - - synfig::Vector perform(const synfig::Vector& x)const; - synfig::Vector unperform(const synfig::Vector& x)const; - - synfig::Rect perform(const synfig::Rect& x)const; - synfig::Rect unperform(const synfig::Rect& x)const; - - void push(const Transform::Handle& x) { if(x)push_back(x); } - void pop() { pop_back(); } -}; // END of class TransformStack - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/types.h b/synfig-core/trunk/src/synfig/types.h deleted file mode 100644 index 6c3b7ea..0000000 --- a/synfig-core/trunk/src/synfig/types.h +++ /dev/null @@ -1,47 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file types.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TYPES_H -#define __SYNFIG_TYPES_H - -/* === H E A D E R S ======================================================= */ - -#include - -#ifndef SYNFIG_NO_ANGLE -#include "angle.h" -#endif - -#include "time.h" -#include "vector.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/uniqueid.cpp b/synfig-core/trunk/src/synfig/uniqueid.cpp deleted file mode 100644 index d89141b..0000000 --- a/synfig-core/trunk/src/synfig/uniqueid.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file uniqueid.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "uniqueid.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace synfig; - -/* === G L O B A L S ======================================================= */ - -static int uniqueid_pool_(0); - -/* === M E T H O D S ======================================================= */ - -int -synfig::UniqueID::next_id() -{ - return ++uniqueid_pool_; -} diff --git a/synfig-core/trunk/src/synfig/uniqueid.h b/synfig-core/trunk/src/synfig/uniqueid.h deleted file mode 100644 index cab6593..0000000 --- a/synfig-core/trunk/src/synfig/uniqueid.h +++ /dev/null @@ -1,91 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file uniqueid.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_UNIQUEID_H -#define __SYNFIG_UNIQUEID_H - -/* === H E A D E R S ======================================================= */ - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class UniqueIDLessThan; - -/*! \class UniqueID -** \brief \todo -*/ -class UniqueID -{ - friend class UniqueIDLessThan; - - int id_; - - explicit UniqueID(int id_):id_(id_) { } - - static int next_id(); - -public: - - //! Returns the internal unique identifier for this object. - /*! The return value from this isn't really useful for - ** much other than debug output. Nonetheless, that is - ** one step above useless, so here it is. */ - const int &get_uid()const { return id_; } - - UniqueID():id_(next_id()) { } - - void make_unique() { id_=next_id(); } - - static const UniqueID nil() { return UniqueID(0); } - - operator bool()const { return static_cast(id_); } - - void mimic(const UniqueID& x) { id_=x.id_; } - - bool operator==(const UniqueID &rhs)const { return id_==rhs.id_; } - bool operator!=(const UniqueID &rhs)const { return id_!=rhs.id_; } - bool operator<(const UniqueID &rhs)const { return id_ -#endif - -#include "value.h" -#include "general.h" -#include -#include "canvas.h" -#include "gradient.h" - - - -#include "vector.h" -#include "time.h" -#include "segment.h" -#include "color.h" - -#endif - -using namespace synfig; -using namespace std; -using namespace etl; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueBase::ValueBase():type(TYPE_NIL),data(0),ref_count(0),loop_(0) -{ -} - -ValueBase::ValueBase(Type x): - type(x), - data(0), - loop_(0) -{ - switch(type) - { - case TYPE_BOOL: data=static_cast(new bool()); break; - case TYPE_INTEGER: data=static_cast(new int()); break; - case TYPE_ANGLE: data=static_cast(new Angle()); break; - case TYPE_VECTOR: data=static_cast(new Vector()); break; - case TYPE_TIME: data=static_cast(new Time()); break; - case TYPE_REAL: data=static_cast(new Real()); break; - case TYPE_COLOR: data=static_cast(new Color()); break; - case TYPE_SEGMENT: data=static_cast(new Segment()); break; - case TYPE_BLINEPOINT: data=static_cast(new BLinePoint()); break; - case TYPE_LIST: data=static_cast(new list_type()); break; - case TYPE_STRING: data=static_cast(new String()); break; - case TYPE_GRADIENT: data=static_cast(new Gradient()); break; - case TYPE_CANVAS: data=static_cast(new etl::handle()); break; - default: break; - } -} - -ValueBase::~ValueBase() -{ - clear(); -} - -const char* -ValueBase::get(const char*)const -{ - return get(String()).c_str(); -} - -#ifdef _DEBUG -String -ValueBase::get_string() const -{ - switch(type) - { - case TYPE_NIL: return "Nil"; - case TYPE_BOOL: return strprintf("Bool (%s)", get(bool()) ? "true" : "false"); - case TYPE_INTEGER: return strprintf("Integer (%s)", get(int())); - case TYPE_ANGLE: return strprintf("Angle (%.2f)", Angle::deg(get(Angle())).get()); - - // All types after this point are larger than 32 bits - - case TYPE_TIME: return strprintf("Time (%s)", get(Time()).get_string().c_str()); - case TYPE_REAL: return strprintf("Real (%f)", get(Real())); - - // All types after this point are larger than 64 bits - - case TYPE_VECTOR: return strprintf("Vector (%f, %f)", get(Vector())[0], get(Vector())[1]); - case TYPE_COLOR: return strprintf("Color (%s)", get(Color()).get_string().c_str()); - case TYPE_SEGMENT: return strprintf("Segment ((%f, %f) to (%f, %f))", get(Segment()).p1[0], get(Segment()).p1[1], get(Segment()).p2[0], get(Segment()).p2[1]); - case TYPE_BLINEPOINT: return strprintf("BLinePoint (%s)", get(BLinePoint()).get_vertex()[0], get(BLinePoint()).get_vertex()[1]); - - // All types after this point require construction/destruction - - case TYPE_LIST: return strprintf("List (%d elements)", get(list_type()).size()); - case TYPE_CANVAS: return strprintf("Canvas (%s)", get(etl::loose_handle())->get_id().c_str()); - case TYPE_STRING: return strprintf("String (%s)", get(String()).c_str()); - case TYPE_GRADIENT: return strprintf("Gradient (%d cpoints)", get(Gradient()).size()); - default: return "Invalid type"; - } -} -#endif // _DEBUG - -void -ValueBase::set(Canvas* x) -{ - clear(); - if(x && x->is_inline()) - { - _set(etl::handle(x)); - } - else - { - _set(etl::loose_handle(x)); - } - assert(get(x)==x); -} - -void -ValueBase::set(etl::loose_handle x) -{ - clear(); - if(x && x->is_inline()) - _set(etl::handle(x)); - else - _set(etl::loose_handle(x)); - assert(get(x)==x); -} - -void -ValueBase::set(etl::handle x) -{ - clear(); - if(x && x->is_inline()) - _set(etl::handle(x)); - else - _set(etl::loose_handle(x)); - assert(get(x)==x); -} - -void -ValueBase::set(const list_type &x) -{ - _set(x); -} - -void -ValueBase::set(const char* x) -{ - _set(String(x)); -} - -void -ValueBase::set(char* x) -{ - _set(String(x)); -} - -bool -ValueBase::is_valid()const -{ - return type>TYPE_NIL && type(data); break; - case TYPE_INTEGER: delete static_cast(data); break; - case TYPE_ANGLE: delete static_cast(data); break; - case TYPE_TIME: delete static_cast(data); break; - case TYPE_REAL: delete static_cast(data); break; - case TYPE_VECTOR: delete static_cast(data); break; - case TYPE_COLOR: delete static_cast(data); break; - case TYPE_SEGMENT: delete static_cast(data); break; - case TYPE_BLINEPOINT: delete static_cast(data); break; - case TYPE_LIST: delete static_cast(data); break; - case TYPE_CANVAS: - { - etl::handle canvas(get(etl::loose_handle())); - if(canvas && canvas->is_inline()) - delete static_cast*>(data); - else - delete static_cast*>(data); - break; - } - case TYPE_STRING: delete static_cast(data); break; - case TYPE_GRADIENT: delete static_cast(data); break; - default: - break; - } - } - - ref_count.detach(); - data=0; - type=TYPE_NIL; -} - - -String -ValueBase::type_name(Type id) -{ - // don't internationalize these type names - they're using in .sif files - switch(id) - { - /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ - case TYPE_BOOL: return N_("bool"); - /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ - case TYPE_INTEGER: return N_("integer"); - /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ - case TYPE_ANGLE: return N_("angle"); - /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ - case TYPE_TIME: return N_("time"); - /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ - case TYPE_REAL: return N_("real"); - /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ - case TYPE_VECTOR: return N_("vector"); - /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ - case TYPE_COLOR: return N_("color"); - /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ - case TYPE_SEGMENT: return N_("segment"); - /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ - case TYPE_BLINEPOINT: return N_("bline_point"); - /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ - case TYPE_LIST: return N_("list"); - /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ - case TYPE_CANVAS: return N_("canvas"); - /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ - case TYPE_STRING: return N_("string"); - /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ - case TYPE_GRADIENT: return N_("gradient"); - /* TRANSLATORS: this is the name of a type -- see http://synfig.org/Types */ - case TYPE_NIL: return N_("nil"); - default: - break; - } - synfig::warning("Encountered unknown ValueBase with an Type of %d",id); -// assert(0); - return "UNKNOWN"; -} - -String -ValueBase::type_local_name(Type id) -{ - return dgettext("synfig",type_name(id).c_str()); -} - -ValueBase::Type -ValueBase::ident_type(const String &str) -{ - if(str=="nil" || - str=="null") return TYPE_NIL; - else if(str=="time" || - str==_("time")) return TYPE_TIME; - else if(str=="real" || - str=="float" || - str==_("real")) return TYPE_REAL; - else if(str=="integer" || - str=="int" || - str==_("integer")) return TYPE_INTEGER; - else if(str=="bool" || - str==_("bool")) return TYPE_BOOL; - else if(str=="angle" || - str=="degrees" || - str=="radians" || - str=="rotations") return TYPE_ANGLE; - else if(str=="vector" || - str=="point") return TYPE_VECTOR; - else if(str=="color") return TYPE_COLOR; - else if(str=="string") return TYPE_STRING; - else if(str=="canvas") return TYPE_CANVAS; - else if(str=="list") return TYPE_LIST; - else if(str=="segment") return TYPE_SEGMENT; - else if(str=="gradient") return TYPE_GRADIENT; - else if(str=="bline_point" || - str=="blinepoint") return TYPE_BLINEPOINT; - - return TYPE_NIL; -} - -bool -ValueBase::operator==(const ValueBase& rhs)const -{ - if(get_type()!=rhs.get_type()) - return false; - if(data==rhs.data) - return true; - - switch(get_type()) - { - case TYPE_TIME: return get(Time()).is_equal(rhs.get(Time())); - case TYPE_REAL: return abs(get(Real())-rhs.get(Real()))<=0.00000000000001; - case TYPE_INTEGER: return get(int())==rhs.get(int()); - case TYPE_BOOL: return get(bool())==rhs.get(bool()); - case TYPE_ANGLE: return get(Angle())==rhs.get(Angle()); - case TYPE_VECTOR: return get(Vector()).is_equal_to(rhs.get(Vector())); - case TYPE_COLOR: return get(Color())==rhs.get(Color()); - case TYPE_STRING: return get(String())==rhs.get(String()); - case TYPE_CANVAS: return get(Canvas::LooseHandle())==rhs.get(Canvas::LooseHandle()); - case TYPE_LIST: return get_list()==rhs.get_list(); - case TYPE_SEGMENT: // return get(Segment())==rhs.get(Segment()); - case TYPE_GRADIENT: // return get(Gradient())==rhs.get(Gradient()); - case TYPE_BLINEPOINT: // return get(BLinePoint())==rhs.get(BLinePoint()); - case TYPE_NIL: - default: return false; - } - return false; -} diff --git a/synfig-core/trunk/src/synfig/value.h b/synfig-core/trunk/src/synfig/value.h deleted file mode 100644 index 7079dba..0000000 --- a/synfig-core/trunk/src/synfig/value.h +++ /dev/null @@ -1,481 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file value.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_VALUE_H -#define __SYNFIG_VALUE_H - -/* === H E A D E R S ======================================================= */ - -//#include "vector.h" -//#include "time.h" -#include "segment.h" -//#include "color.h" -#include "string.h" -#include -#include -#include -#include -#include "general.h" -//#include "gradient.h" -#include "blinepoint.h" -#include "exception.h" - -#ifdef USE_HALF_TYPE -#include -#endif - -#ifndef SYNFIG_NO_ANGLE -#include "angle.h" -#endif - -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class Canvas; -class Vector; -class Time; -class Segment; -class Gradient; -class BLinePoint; -class Color; - -/*! \class ValueBase -** \todo writeme -*/ -class ValueBase -{ - /* - -- ** -- T Y P E S ----------------------------------------------------------- - */ - -public: - - //! \writeme - enum Type - { - TYPE_NIL=0, //!< Represents an empty value - - TYPE_BOOL, - TYPE_INTEGER, - TYPE_ANGLE, //!< Angle - - // All types after this point are larger than 32 bits - - TYPE_TIME, //!< Time - TYPE_REAL, //!< Real - - // All types after this point are larger than 64 bits - - TYPE_VECTOR, //!< Vector - TYPE_COLOR, //!< Color - TYPE_SEGMENT, //!< Segment - TYPE_BLINEPOINT, //!< BLinePoint - - // All types after this point require construction/destruction - - TYPE_LIST, //!< List - TYPE_CANVAS, //!< Canvas - TYPE_STRING, //!< String - TYPE_GRADIENT, //!< Color Gradient - - TYPE_END //!< Not a valid type, used for sanity checks - }; - -private: - - typedef std::vector list_type; - - /* - -- ** -- D A T A ------------------------------------------------------------- - */ - -protected: - - Type type; - void *data; - etl::reference_counter ref_count; - bool loop_; - - /* - -- ** -- C O N S T R U C T O R S ----------------------------------- - */ - -public: - - //! \writeme - ValueBase(); - - //! \writeme - template - ValueBase(const T &x, bool loop_=false): - type(TYPE_NIL),data(0),ref_count(0),loop_(loop_) - { set(x); } - - //! \writeme - ValueBase(Type x); - - //! \writeme - ~ValueBase(); - - /* - -- ** -- O P E R A T O R S --------------------------------------------------- - */ - -public: - - //! \writeme - template ValueBase& operator=(const T& x) - { set(x); return *this; } - - //! \writeme - ValueBase& operator=(const ValueBase& x); - - //! \writeme - bool operator==(const ValueBase& rhs)const; - - //! \writeme - bool operator!=(const ValueBase& rhs)const { return !operator==(rhs); } - - //! Constant index operator for when value is of type TYPE_LIST - const ValueBase &operator[](int index)const - { assert(type==TYPE_LIST); assert(index>0); return get_list()[index]; } - - /* - -- ** -- M E M B E R F U N C T I O N S ------------------------------------- - */ - -public: - - //! \writeme - void clear(); - - //! \writeme - bool get_loop()const { return loop_; } - - //! \writeme - void set_loop(bool x) { loop_=x; } - - //! \writeme - bool empty()const; - - //! \writeme - Type get_contained_type()const; - - //! Returns true if the contained value is defined and valid. - bool is_valid()const; - - //! Returns a string containing the name of the type - String type_name()const { return type_name(type); } - - //! Returns the type of the contained value - const Type & get_type()const { return type; } - - //! Checks the type of the parameter against itself. Returns true if they are of the same type. - template bool - same_type_as(const T &x)const - { - const Type testtype(get_type(x)); - - return same_type_as(type, testtype); - } - - bool same_type_as(const Type testtype)const - { - return same_type_as(type, testtype); - } - - //! Compares two types. Returns true if they are the same type. - static bool same_type_as(const Type type1, const Type type2) - { - if (type1 == type2) return true; - if ((type1 == TYPE_REAL || type1 == TYPE_TIME) && - (type2 == TYPE_REAL || type2 == TYPE_TIME)) - return true; - return false; - } - - - // === GET MEMBERS ======================================================== - template - const T &get(const T& x __attribute__ ((unused)))const - { - assert(is_valid() && same_type_as(x)); - return *static_cast(data); - } - float get(const float &)const { return get(Real()); } - etl::loose_handle get(const etl::handle&)const - { return get(etl::loose_handle()); } - etl::loose_handle get(Canvas*)const - { return get(etl::loose_handle()); } - const char* get(const char*)const; - const list_type& get_list()const { return get(list_type()); } - -#ifdef _DEBUG - String get_string() const; -#endif // _DEBUG - // ======================================================================== - - - - // === PUT MEMBERS ======================================================== - template - void put(T* x)const - { - assert(same_type_as(*x)); - *x=*static_cast(data); - } - void put(float* x)const { *x=get(Real()); } - void put(char** x)const; - // ======================================================================== - - - - // === SET MEMBERS ======================================================== - template void set(const T& x) { _set(x); } - void set(const float &x) { _set(Real(x)); } - void set(const list_type &x); - void set(const char* x); - void set(char* x); - void set(Canvas*x); - void set(etl::loose_handle x); - void set(etl::handle x); - template void set(const std::vector &x) - { _set(list_type(x.begin(),x.end())); } - template void set(const std::list &x) - { _set(list_type(x.begin(),x.end())); } - // ======================================================================== - - - /* - -- ** -- S T A T I C F U N C T I O N S ------------------------------------- - */ - -public: - - //! Returns a string containing the name of the given Type - static String type_name(Type id); - - //! Returns a string containing the translated name of the given Type - static String type_local_name(Type id); - - //! Returns a the corresponding Type of the described type - static Type ident_type(const String &str); - - - // === GET TYPE MEMBERS =================================================== - static Type get_type(bool) { return TYPE_BOOL; } - static Type get_type(int) { return TYPE_INTEGER; } - static Type get_type(const Time&) { return TYPE_TIME; } - static Type get_type(const Real&) { return TYPE_REAL; } - static Type get_type(const float&) { return TYPE_REAL; } - static Type get_type(const Vector&) { return TYPE_VECTOR; } - static Type get_type(const Color&) { return TYPE_COLOR; } - static Type get_type(const Segment&) { return TYPE_SEGMENT; } - static Type get_type(const BLinePoint&) { return TYPE_BLINEPOINT; } - static Type get_type(const String&) { return TYPE_STRING; } - static Type get_type(const Gradient&) { return TYPE_GRADIENT; } - static Type get_type(Canvas*) { return TYPE_CANVAS; } - static Type get_type(const etl::handle&) - { return TYPE_CANVAS; } - static Type get_type(const etl::loose_handle&) - { return TYPE_CANVAS; } - static Type get_type(const list_type&) { return TYPE_LIST; } - template static Type get_type(const std::vector &/*x*/) - { return TYPE_LIST; } - template static Type get_type(const std::list &/*x*/) - { return TYPE_LIST; } - // ======================================================================== - - - /* - -- ** -- C A S T O P E R A T O R S ----------------------------------------- - */ - -public: - - operator const list_type&()const { return get_list(); } - //operator const Color&()const { return get(Color()); } - operator const Real&()const { return get(Real()); } - //operator const Time&()const { return get(Time()); } - - operator const Vector&()const { return get(Vector()); } - operator const BLinePoint&()const { return get(BLinePoint()); } - //operator const int&()const { return get(int()); } - //operator const String&()const { return get(String()); } - //operator const char *()const { return get(String()).c_str(); } - operator const Segment&()const { return get(Segment()); } - - - /* - -- ** -- O T H E R ----------------------------------------------------------- - */ - -public: - -#ifdef USE_HALF_TYPE - half get(const half &)const { return get(Real()); } - void put(half*x)const { *x=get(Real()); } - void set(const half &x) { _set(Real(x)); } - static Type get_type(const half&) { return TYPE_REAL; } - operator half()const { return get(Real()); } -#endif - -#ifndef SYNFIG_NO_ANGLE - operator const Angle&()const { return get(Angle()); } - static Type get_type(const Angle&) { return TYPE_ANGLE; } -#endif - - template - operator std::list()const - { - assert(type==TYPE_LIST); - std::list ret(get_list().begin(),get_list().end()); - return ret; - } - template - operator std::vector()const - { - assert(type==TYPE_LIST); - std::vector ret(get_list().begin(),get_list().end()); - return ret; - } - - -private: - - template void - _set(const T& x) - { - const Type newtype(get_type(x)); - - assert(newtype!=TYPE_NIL); - - if(newtype==type) - { - if(ref_count.unique()) - { - *reinterpret_cast(data)=x; - return; - } - } - - clear(); - - type=newtype; - ref_count.reset(); - data=new T(x); - } -}; // END of class ValueBase - - -/*! \class Value -** \todo writeme -*/ -template -class Value : public ValueBase -{ -public: - Value(const T &x):ValueBase(x) - { - } - - Value(const ValueBase &x):ValueBase(x) - { - if(!x.same_type_as(T())) - throw Exception::BadType("Value(ValueBase): Type Mismatch"); - } - - Value() - { - } - - T get()const { return ValueBase::get(T()); } - - void put(T* x)const { ValueBase::put(x); } - - void set(const T& x) { ValueBase::operator=(x); } - - Value& operator=(const T& x) { set(x); return *this; } - - Value& operator=(const Value& x) { return ValueBase::operator=(x); } - - Value& operator=(const ValueBase& x) - { - if(!x.same_type_as(T())) - throw Exception::BadType("Value(ValueBase): Type Mismatch"); - return ValueBase::operator=(x); - } - -}; // END of class Value - -/* -template <> -class Value< std::list > : public ValueBase -{ -public: - Value(const T &x):ValueBase(x) - { - } - Value(const ValueBase &x):ValueBase(x) - { - if(!x.same_type_as(T())) - throw Exception::BadType("Value(ValueBase): Type Mismatch"); - } - Value() - { - } - - T get()const { return ValueBase::get(T()); } - - void put(T* x)const { ValueBase::put(x); } - - void set(const T& x) { ValueBase::operator=(x); } - - Value& operator=(const T& x) { set(x); return *this; } - - Value& operator=(const Value& x) { return ValueBase::operator=(x); } - - Value& operator=(const ValueBase& x) - { - if(!x.same_type_as(T())) - throw Exception::BadType("Value(ValueBase): Type Mismatch"); - return ValueBase::operator=(x); - } - -}; // END of class Value -*/ - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode.cpp b/synfig-core/trunk/src/synfig/valuenode.cpp deleted file mode 100644 index d1e3256..0000000 --- a/synfig-core/trunk/src/synfig/valuenode.cpp +++ /dev/null @@ -1,704 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode.cpp -** \brief Implementation of the "Placeholder" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** Copyright (c) 2008 Carlos López -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#define SYNFIG_NO_ANGLE - -//#define HAS_HASH_MAP 1 - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode.h" -#include "general.h" -#include "canvas.h" -#include "paramdesc.h" -#include "releases.h" - -#include "valuenode_const.h" -#include "valuenode_linear.h" -#include "valuenode_composite.h" -#include "valuenode_reference.h" -#include "valuenode_greyed.h" -#include "valuenode_scale.h" -#include "valuenode_blinecalctangent.h" -#include "valuenode_blinecalcvertex.h" -#include "valuenode_blinecalcwidth.h" -#include "valuenode_blinereversetangent.h" -#include "valuenode_segcalctangent.h" -#include "valuenode_segcalcvertex.h" -#include "valuenode_repeat_gradient.h" -#include "valuenode_stripes.h" -#include "valuenode_range.h" -#include "valuenode_add.h" -#include "valuenode_subtract.h" -#include "valuenode_timedswap.h" -#include "valuenode_twotone.h" -#include "valuenode_bline.h" -#include "valuenode_dynamiclist.h" -#include "valuenode_radialcomposite.h" -#include "valuenode_gradientrotate.h" -#include "valuenode_sine.h" -#include "valuenode_cos.h" -#include "valuenode_atan2.h" -#include "valuenode_exp.h" -#include "valuenode_switch.h" -#include "valuenode_timeloop.h" -#include "valuenode_reciprocal.h" -#include "valuenode_duplicate.h" -#include "valuenode_integer.h" -#include "valuenode_step.h" -#include "valuenode_vectorangle.h" -#include "valuenode_vectorlength.h" -#include "valuenode_vectorx.h" -#include "valuenode_vectory.h" -#include "valuenode_gradientcolor.h" -#include "valuenode_dotproduct.h" -#include "valuenode_timestring.h" -#include "valuenode_realstring.h" -#include "valuenode_join.h" -#include "valuenode_anglestring.h" -#include "valuenode_intstring.h" -#include "valuenode_log.h" -#include "valuenode_pow.h" -#include "valuenode_compare.h" -#include "valuenode_not.h" -#include "valuenode_and.h" -#include "valuenode_or.h" - -#include "layer.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -static int value_node_count(0); - -static LinkableValueNode::Book *book_; - - -ValueNode::LooseHandle -synfig::find_value_node(const GUID& guid) -{ - return guid_cast(guid); -} - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -bool -ValueNode::subsys_init() -{ - book_=new LinkableValueNode::Book(); - -#define ADD_VALUENODE(class,name,local,version) \ - (*book_)[name].factory=reinterpret_cast(&class::create); \ - (*book_)[name].check_type=&class::check_type; \ - (*book_)[name].local_name=local; \ - (*book_)[name].release_version=version - -#define ADD_VALUENODE2(class,name,local,version) \ - (*book_)[name].factory=reinterpret_cast(&class::create_from); \ - (*book_)[name].check_type=&class::check_type; \ - (*book_)[name].local_name=local; \ - (*book_)[name].release_version=version - - ADD_VALUENODE(ValueNode_Linear, "linear", _("Linear"), RELEASE_VERSION_0_61_06); - ADD_VALUENODE(ValueNode_Composite, "composite", _("Composite"), RELEASE_VERSION_0_61_06); - ADD_VALUENODE(ValueNode_RadialComposite, "radial_composite", _("Radial Composite"), RELEASE_VERSION_0_61_06); - ADD_VALUENODE(ValueNode_Reference, "reference", _("Reference"), RELEASE_VERSION_0_61_06); - ADD_VALUENODE(ValueNode_Scale, "scale", _("Scale"), RELEASE_VERSION_0_61_06); - ADD_VALUENODE(ValueNode_SegCalcTangent, "segcalctangent", _("Segment Tangent"), RELEASE_VERSION_0_61_06); - ADD_VALUENODE(ValueNode_SegCalcVertex, "segcalcvertex", _("Segment Vertex"), RELEASE_VERSION_0_61_06); - ADD_VALUENODE(ValueNode_Stripes, "stripes", _("Stripes"), RELEASE_VERSION_0_61_06); - ADD_VALUENODE(ValueNode_Subtract, "subtract", _("Subtract"), RELEASE_VERSION_0_61_06); - ADD_VALUENODE(ValueNode_TwoTone, "twotone", _("Two-Tone"), RELEASE_VERSION_0_61_06); - ADD_VALUENODE(ValueNode_BLine, "bline", _("BLine"), RELEASE_VERSION_0_61_06); - ADD_VALUENODE2(ValueNode_DynamicList, "dynamic_list", _("Dynamic List"), RELEASE_VERSION_0_61_06); - ADD_VALUENODE(ValueNode_GradientRotate, "gradient_rotate", _("Gradient Rotate"), RELEASE_VERSION_0_61_06); - ADD_VALUENODE(ValueNode_Sine, "sine", _("Sine"), RELEASE_VERSION_0_61_06); - - ADD_VALUENODE(ValueNode_TimedSwap, "timed_swap", _("Timed Swap"), RELEASE_VERSION_0_61_07); // SVN r610 - ADD_VALUENODE(ValueNode_Repeat_Gradient, "repeat_gradient", _("Repeat Gradient"), RELEASE_VERSION_0_61_07); // SVN r666 - ADD_VALUENODE(ValueNode_Exp, "exp", _("Exponential"), RELEASE_VERSION_0_61_07); // SVN r739 - ADD_VALUENODE(ValueNode_Add, "add", _("Add"), RELEASE_VERSION_0_61_07); // SVN r742 - ADD_VALUENODE(ValueNode_BLineCalcTangent, "blinecalctangent", _("BLine Tangent"), RELEASE_VERSION_0_61_07); // SVN r744 - ADD_VALUENODE(ValueNode_BLineCalcVertex, "blinecalcvertex", _("BLine Vertex"), RELEASE_VERSION_0_61_07); // SVN r744 - ADD_VALUENODE(ValueNode_Range, "range", _("Range"), RELEASE_VERSION_0_61_07); // SVN r776 - - ADD_VALUENODE(ValueNode_Switch, "switch", _("Switch"), RELEASE_VERSION_0_61_08); // SVN r923 - ADD_VALUENODE(ValueNode_Cos, "cos", _("Cos"), RELEASE_VERSION_0_61_08); // SVN r1111 - ADD_VALUENODE(ValueNode_Atan2, "atan2", _("aTan2"), RELEASE_VERSION_0_61_08); // SVN r1132 - ADD_VALUENODE(ValueNode_BLineRevTangent, "blinerevtangent", _("Reverse Tangent"), RELEASE_VERSION_0_61_08); // SVN r1162 - ADD_VALUENODE(ValueNode_TimeLoop, "timeloop", _("Time Loop"), RELEASE_VERSION_0_61_08); // SVN r1226 - ADD_VALUENODE(ValueNode_Reciprocal, "reciprocal", _("Reciprocal"), RELEASE_VERSION_0_61_08); // SVN r1238 - ADD_VALUENODE(ValueNode_Duplicate, "duplicate", _("Duplicate"), RELEASE_VERSION_0_61_08); // SVN r1267 - ADD_VALUENODE(ValueNode_Integer, "fromint", _("From Integer"), RELEASE_VERSION_0_61_08); // SVN r1267 - ADD_VALUENODE(ValueNode_Step, "step", _("Step"), RELEASE_VERSION_0_61_08); // SVN r1691 - ADD_VALUENODE(ValueNode_BLineCalcWidth, "blinecalcwidth", _("BLine Width"), RELEASE_VERSION_0_61_08); // SVN r1694 - - ADD_VALUENODE(ValueNode_VectorAngle, "vectorangle", _("Vector Angle"), RELEASE_VERSION_0_61_09); // SVN r1880 - ADD_VALUENODE(ValueNode_VectorLength, "vectorlength", _("Vector Length"), RELEASE_VERSION_0_61_09); // SVN r1881 - ADD_VALUENODE(ValueNode_VectorX, "vectorx", _("Vector X"), RELEASE_VERSION_0_61_09); // SVN r1882 - ADD_VALUENODE(ValueNode_VectorY, "vectory", _("Vector Y"), RELEASE_VERSION_0_61_09); // SVN r1882 - ADD_VALUENODE(ValueNode_GradientColor, "gradientcolor", _("Gradient Color"), RELEASE_VERSION_0_61_09); // SVN r1885 - ADD_VALUENODE(ValueNode_DotProduct, "dotproduct", _("Dot Product"), RELEASE_VERSION_0_61_09); // SVN r1891 - ADD_VALUENODE(ValueNode_TimeString, "timestring", _("Time String"), RELEASE_VERSION_0_61_09); // SVN r2000 - ADD_VALUENODE(ValueNode_RealString, "realstring", _("Real String"), RELEASE_VERSION_0_61_09); // SVN r2003 - ADD_VALUENODE(ValueNode_Join, "join", _("Joined List"), RELEASE_VERSION_0_61_09); // SVN r2007 - ADD_VALUENODE(ValueNode_AngleString, "anglestring", _("Angle String"), RELEASE_VERSION_0_61_09); // SVN r2010 - ADD_VALUENODE(ValueNode_IntString, "intstring", _("Int String"), RELEASE_VERSION_0_61_09); // SVN r2010 - ADD_VALUENODE(ValueNode_Logarithm, "logarithm", _("Logarithm"), RELEASE_VERSION_0_61_09); // SVN r2034 - - ADD_VALUENODE(ValueNode_Greyed, "greyed", _("Greyed"), RELEASE_VERSION_0_61_10); // SVN r2305 - ADD_VALUENODE(ValueNode_Pow, "power", _("Power"), RELEASE_VERSION_0_61_10); // SVN r2362 - ADD_VALUENODE(ValueNode_Compare, "compare", _("Compare"), RELEASE_VERSION_0_61_10); // SVN r2364 - ADD_VALUENODE(ValueNode_Not, "not", _("Not"), RELEASE_VERSION_0_61_10); // SVN r2364 - ADD_VALUENODE(ValueNode_And, "and", _("And"), RELEASE_VERSION_0_61_10); // SVN r2364 - ADD_VALUENODE(ValueNode_Or, "or", _("Or"), RELEASE_VERSION_0_61_10); // SVN r2364 - -#undef ADD_VALUENODE -#undef ADD_VALUENODE2 - - return true; -} - -bool -ValueNode::subsys_stop() -{ - delete book_; -/* if(global_value_node_map.size() || value_node_count) - { - if(value_node_count) - synfig::error("%d ValueNodes haven't been destroyed yet!",value_node_count); - - if(global_value_node_map.size()!=value_node_count) - synfig::error("value node count mismatch! map.size()!=value_node_count (%d!=%d)",global_value_node_map.size(),value_node_count); - - GlobalValueNodeMap::iterator iter; - for(iter=global_value_node_map.begin();iter!=global_value_node_map.end();++iter) - { - if(!iter->second->is_exported()) - synfig::info(_("%s: count:%d name:%s type:%s"), - iter->first.get_string().c_str(), - iter->second->count(), - iter->second->get_name().c_str(), - ValueBase::type_local_name(iter->second->get_type()).c_str() - ); - else - synfig::info(_("%s: id:%s count:%d name:%s type:%s"), - iter->first.get_string().c_str(), - iter->second->get_id().c_str(), - iter->second->count(), - iter->second->get_name().c_str(), - ValueBase::type_local_name(iter->second->get_type()).c_str() - ); - } - } -*/ - return true; -} - -ValueNode::ValueNode(ValueBase::Type type):type(type) -{ - value_node_count++; -} - -LinkableValueNode::Book& -LinkableValueNode::book() -{ - return *book_; -} - -LinkableValueNode::Handle -LinkableValueNode::create(const String &name, const ValueBase& x) -{ - if(!book().count(name)) - return 0; - - if (!check_type(name, x.get_type()) && - // the Duplicate ValueNode is an exception - we don't want the - // user creating it for themselves, so check_type() fails for - // it even when it is valid - !(name == "duplicate" && x.get_type() == ValueBase::TYPE_REAL)) - { - error(_("Bad type: ValueNode '%s' doesn't accept type '%s'"), book()[name].local_name.c_str(), ValueBase::type_local_name(x.get_type()).c_str()); - return 0; - } - - return book()[name].factory(x); -} - -bool -LinkableValueNode::check_type(const String &name, ValueBase::Type x) -{ - if(!book().count(name) || !book()[name].check_type) - return false; - return book()[name].check_type(x); -} - -bool -LinkableValueNode::set_link(int i,ValueNode::Handle x) -{ - ValueNode::Handle previous(get_link(i)); - - if(set_link_vfunc(i,x)) - { - // Fix 2412072: remove the previous link from the parent_set unless one of the other links is also - // using it when we convert a value to 'switch', both 'on' and 'off' are linked to the same valuenode - // if we then disconnect one of the two, the one we disconnect is set to be a new valuenode_const - // and the previously shared value is removed from the parent set even though the other is still - // using it - if(previous) - { - int size = link_count(), index; - for (index=0; index < size; ++index) - { - if (i == index) continue; - if (get_link(index) == previous) - break; - } - if (index == size) - remove_child(previous.get()); - } - add_child(x.get()); - - if(!x->is_exported() && get_parent_canvas()) - { - x->set_parent_canvas(get_parent_canvas()); - } - changed(); - return true; - } - return false; -} - -ValueNode::LooseHandle -LinkableValueNode::get_link(int i)const -{ - return get_link_vfunc(i); -} - -void -LinkableValueNode::unlink_all() -{ - for(int i=0;iparent_set.erase(this); - } -} - -ValueNode::~ValueNode() -{ - value_node_count--; - - begin_delete(); -} - -void -ValueNode::on_changed() -{ - etl::loose_handle parent_canvas = get_parent_canvas(); - if(parent_canvas) - do // signal to all the ancestor canvases - parent_canvas->signal_value_node_changed()(this); - while (parent_canvas = parent_canvas->parent()); - else if(get_root_canvas()) - get_root_canvas()->signal_value_node_changed()(this); - - Node::on_changed(); -} - -int -ValueNode::replace(etl::handle x) -{ - if(x.get()==this) - return 0; - - while(parent_set.size()) - { - (*parent_set.begin())->add_child(x.get()); - (*parent_set.begin())->remove_child(this); - //x->parent_set.insert(*parent_set.begin()); - //parent_set.erase(parent_set.begin()); - } - int r(RHandle(this).replace(x)); - x->changed(); - return r; -} - -void -ValueNode::set_id(const String &x) -{ - if(name!=x) - { - name=x; - signal_id_changed_(); - } -} - -String -ValueNode::get_description(bool show_exported_name)const -{ - String ret(_("ValueNode")); - - if (dynamic_cast(this)) - return (dynamic_cast(this))->get_description(-1, show_exported_name); - - if (show_exported_name && !is_exported()) - show_exported_name = false; - - if (show_exported_name) - ret += strprintf(" (%s)", get_id().c_str()); - - return ret; -} - -ValueNodeList::ValueNodeList(): - placeholder_count_(0) -{ -} - -bool -ValueNodeList::count(const String &id)const -{ - const_iterator iter; - - if(id.empty()) - return false; - - for(iter=begin();iter!=end() && id!=(*iter)->get_id();++iter) - ; - - if(iter==end()) - return false; - - return true; -} - -ValueNode::Handle -ValueNodeList::find(const String &id) -{ - iterator iter; - - if(id.empty()) - throw Exception::IDNotFound("Empty ID"); - - for(iter=begin();iter!=end() && id!=(*iter)->get_id();++iter) - ; - - if(iter==end()) - throw Exception::IDNotFound("ValueNode in ValueNodeList: "+id); - - return *iter; -} - -ValueNode::ConstHandle -ValueNodeList::find(const String &id)const -{ - const_iterator iter; - - if(id.empty()) - throw Exception::IDNotFound("Empty ID"); - - for(iter=begin();iter!=end() && id!=(*iter)->get_id();++iter) - ; - - if(iter==end()) - throw Exception::IDNotFound("ValueNode in ValueNodeList: "+id); - - return *iter; -} - -ValueNode::Handle -ValueNodeList::surefind(const String &id) -{ - if(id.empty()) - throw Exception::IDNotFound("Empty ID"); - - ValueNode::Handle value_node; - - try - { - value_node=find(id); - } - catch(Exception::IDNotFound) - { - value_node=PlaceholderValueNode::create(); - value_node->set_id(id); - push_back(value_node); - placeholder_count_++; - } - - return value_node; -} - -bool -ValueNodeList::erase(ValueNode::Handle value_node) -{ - assert(value_node); - - iterator iter; - - for(iter=begin();iter!=end();++iter) - if(value_node.get()==iter->get()) - { - std::list::erase(iter); - if(PlaceholderValueNode::Handle::cast_dynamic(value_node)) - placeholder_count_--; - return true; - } - return false; -} - -bool -ValueNodeList::add(ValueNode::Handle value_node) -{ - if(!value_node) - return false; - if(value_node->get_id().empty()) - return false; - - try - { - ValueNode::RHandle other_value_node=find(value_node->get_id()); - if(PlaceholderValueNode::Handle::cast_dynamic(other_value_node)) - { - other_value_node->replace(value_node); - placeholder_count_--; - return true; - } - - return false; - } - catch(Exception::IDNotFound) - { - push_back(value_node); - return true; - } - - return false; -} - -void -ValueNodeList::audit() -{ - iterator iter,next; - - for(next=begin(),iter=next++;iter!=end();iter=next++) - if(iter->count()==1) - std::list::erase(iter); -} - - -String -PlaceholderValueNode::get_name()const -{ - return "placeholder"; -} - -String -PlaceholderValueNode::get_local_name()const -{ - return _("Placeholder"); -} - -ValueNode* -PlaceholderValueNode::clone(const GUID& deriv_guid)const -{ - ValueNode* ret(new PlaceholderValueNode()); - ret->set_guid(get_guid()^deriv_guid); - return ret; -} - -PlaceholderValueNode::Handle -PlaceholderValueNode::create(ValueBase::Type type) -{ - return new PlaceholderValueNode(type); -} - -ValueBase -PlaceholderValueNode::operator()(Time /*t*/)const -{ - assert(0); - return ValueBase(); -} - -PlaceholderValueNode::PlaceholderValueNode(ValueBase::Type type): - ValueNode(type) -{ -} - -ValueNode* -LinkableValueNode::clone(const GUID& deriv_guid)const -{ - { - ValueNode* x(find_value_node(get_guid()^deriv_guid).get()); - if(x) - return x; - } - - int i; - LinkableValueNode *ret=create_new(); - ret->set_guid(get_guid()^deriv_guid); - - for(i=0;iis_exported()) - { - ValueNode::LooseHandle value_node(find_value_node(link->get_guid()^deriv_guid)); - if(!value_node) - value_node=link->clone(deriv_guid); - ret->set_link(i,value_node); - } - else - ret->set_link(i,link); - } - - return ret; -} - -String -ValueNode::get_relative_id(etl::loose_handle x)const -{ - assert(is_exported()); - assert(canvas_); - - if(x.get()==canvas_.get()) - return get_id(); - - return canvas_->_get_relative_id(x)+':'+get_id(); -} - -void -ValueNode::set_parent_canvas(etl::loose_handle x) -{ - canvas_=x; if(x) root_canvas_=x->get_root(); -} - -void -ValueNode::set_root_canvas(etl::loose_handle x) -{ - root_canvas_=x->get_root(); -} - -void LinkableValueNode::get_times_vfunc(Node::time_set &set) const -{ - ValueNode::LooseHandle h; - - int size = link_count(); - - //just add it to the set... - for(int i=0; i < size; ++i) - { - h = get_link(i); - - if(h) - { - const Node::time_set &tset = h->get_times(); - set.insert(tset.begin(),tset.end()); - } - } -} - -String -LinkableValueNode::get_description(int index, bool show_exported_name)const -{ - String description; - - if (index == -1) - { - if (show_exported_name && is_exported()) - description += strprintf(" (%s)", get_id().c_str()); - } - else - { - description = String(":") + link_local_name(index); - - if (show_exported_name) - { - ValueNode::LooseHandle link(get_link(index)); - if (link->is_exported()) - description += strprintf(" (%s)", link->get_id().c_str()); - } - } - - const synfig::Node* node = this; - LinkableValueNode::ConstHandle parent_linkable_vn = 0; - - // walk up through the valuenodes trying to find the layer at the top - while (!node->parent_set.empty() && !dynamic_cast(node)) - { - LinkableValueNode::ConstHandle linkable_value_node(dynamic_cast(node)); - if (linkable_value_node) - { - String link; - int cnt = linkable_value_node->link_count(); - for (int i = 0; i < cnt; i++) - if (linkable_value_node->get_link(i) == parent_linkable_vn) - { - link = String(":") + linkable_value_node->link_local_name(i); - break; - } - - description = linkable_value_node->get_local_name() + link + (parent_linkable_vn?">":"") + description; - } - node = *node->parent_set.begin(); - parent_linkable_vn = linkable_value_node; - } - - Layer::ConstHandle parent_layer(dynamic_cast(node)); - if(parent_layer) - { - String param; - const Layer::DynamicParamList &dynamic_param_list(parent_layer->dynamic_param_list()); - // loop to find the parameter in the dynamic parameter list - this gives us its name - for (Layer::DynamicParamList::const_iterator iter = dynamic_param_list.begin(); iter != dynamic_param_list.end(); iter++) - if (iter->second == parent_linkable_vn) - param = String(":") + parent_layer->get_param_local_name(iter->first); - description = strprintf("(%s)%s>%s", - parent_layer->get_non_empty_description().c_str(), - param.c_str(), - description.c_str()); - } - - return description; -} diff --git a/synfig-core/trunk/src/synfig/valuenode.h b/synfig-core/trunk/src/synfig/valuenode.h deleted file mode 100644 index 38e5c56..0000000 --- a/synfig-core/trunk/src/synfig/valuenode.h +++ /dev/null @@ -1,418 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode.h -** \brief Header file for implementation of the "Placeholder" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_VALUENODE_H -#define __SYNFIG_VALUENODE_H - -/* === H E A D E R S ======================================================= */ - -#include "vector.h" -#include "value.h" -#include "string.h" -#include "releases.h" -#include -#include -#include "exception.h" -#include -#include -#include "guid.h" - -#ifndef SYNFIG_NO_ANGLE -#include -#endif - -#include "node.h" - -#include - -/* === M A C R O S ========================================================= */ - -// This is a hack for GCC 3.0.4... which has a broken dynamic_cast<> -// It is deprecated, and will be removed soon. -#if ( __GNUC__ == 3 ) && ( __GNUC__MINOR__ == 0 ) -# define DCAST_HACK_BASECLASS() int cast__ -# define DCAST_HACK_ID(x) static const int my_cast__(void) { return x; } -# define DCAST_HACK_ENABLE() cast__=my_cast__() -#else -# define DCAST_HACK_BASECLASS() -# define DCAST_HACK_ID(x) -# define DCAST_HACK_ENABLE() -#endif - -#define CHECK_TYPE_AND_SET_VALUE(variable, type) \ - /* I don't think this ever happens - maybe remove this code? */ \ - if (get_type() == ValueBase::TYPE_NIL) { \ - warning("%s:%d get_type() IS nil sometimes!", \ - __FILE__, __LINE__); \ - return false; \ - } \ - if (get_type() != ValueBase::TYPE_NIL && \ - !(ValueBase::same_type_as(value->get_type(), type)) && \ - !PlaceholderValueNode::Handle::cast_dynamic(value)) { \ - error(_("%s:%d wrong type for %s: need %s but got %s"), \ - __FILE__, __LINE__, \ - link_local_name(i).c_str(), \ - ValueBase::type_local_name(type).c_str(), \ - ValueBase::type_local_name(value->get_type()).c_str()); \ - return false; \ - } \ - variable = value; \ - signal_child_changed()(i); \ - signal_value_changed()(); \ - return true - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class Canvas; -class LinkableValueNode; -class Layer; - -/*! \class ValueNode -** \todo writeme -*/ -class ValueNode : public synfig::Node -{ - friend class Layer; - friend class LinkableValueNode; - - /* - -- ** -- T Y P E S ----------------------------------------------------------- - */ - -public: - - typedef etl::handle Handle; - - typedef etl::loose_handle LooseHandle; - - typedef etl::handle ConstHandle; - - typedef etl::rhandle RHandle; - - - static bool subsys_init(); - - static bool subsys_stop(); - - /* - -- ** -- D A T A ------------------------------------------------------------- - */ - -private: - ValueBase::Type type; - String name; - etl::loose_handle canvas_; - etl::loose_handle root_canvas_; - - /* - -- ** -- S I G N A L S ------------------------------------------------------- - */ - -private: - - //! ValueBase Changed - sigc::signal signal_value_changed_; - - //! Children Reordered - sigc::signal signal_children_reordered_; - - //! Child Changed - sigc::signal signal_child_changed_; - - //! Child Removed - sigc::signal signal_child_removed_; - - //! Child Inserted - sigc::signal signal_child_inserted_; - - //! ID Changed - sigc::signal signal_id_changed_; - - /* - -- ** -- S I G N A L I N T E R F A C E ------------------------------------- - */ - -public: - - //! ValueBase Changed - sigc::signal& signal_value_changed() { return signal_value_changed_; } - - //! Children Reordered - sigc::signal& signal_children_reordered() { return signal_children_reordered_; } - - //! Child Changed - sigc::signal& signal_child_changed() { return signal_child_changed_; } - - //! Child Removed - sigc::signal& signal_child_removed() { return signal_child_removed_; } - - //! Child Inserted - sigc::signal& signal_child_inserted() { return signal_child_inserted_; } - - //! ID Changed - sigc::signal& signal_id_changed() { return signal_id_changed_; } - - /* - -- ** -- C O N S T R U C T O R S --------------------------------------------- - */ - -protected: - - ValueNode(ValueBase::Type type=ValueBase::TYPE_NIL); - -public: - - virtual ~ValueNode(); - - /* - -- ** -- M E M B E R F U N C T I O N S ------------------------------------- - */ - -public: - - //! Returns the value of the ValueNode at time \a t - virtual ValueBase operator()(Time /*t*/)const - { return ValueBase(); } - - //! \internal Sets the id of the ValueNode - void set_id(const String &x); - - //! Returns the id of the ValueNode - /*! The ID is used for keeping track of a - ** specific instance of a ValueNode. */ - const String &get_id()const { return name; } - - //! Returns the name of the ValueNode type - virtual String get_name()const=0; - - //! Returns the localized name of the ValueNode type - virtual String get_local_name()const=0; - - //! Return a full description of the ValueNode and its parentage - virtual String get_description(bool show_exported_name = true)const; - - - //! \writeme - virtual ValueNode* clone(const GUID& deriv_guid=GUID())const=0; - - //! \writeme - bool is_exported()const { return !get_id().empty(); } - - //! Returns the type of the ValueNode - ValueBase::Type get_type()const { return type; } - - //! Returns a handle to the parent canvas, if it has one. - etl::loose_handle get_parent_canvas()const { return canvas_; } - - //! Returns a handle to the parent canvas, if it has one. - etl::loose_handle get_root_canvas()const { return root_canvas_; } - - //! \writeme - void set_parent_canvas(etl::loose_handle x); - - //! \writeme - void set_root_canvas(etl::loose_handle x); - - //! \writeme - String get_relative_id(etl::loose_handle x)const; - - int replace(etl::handle x); - -protected: - //! Sets the type of the ValueNode - void set_type(ValueBase::Type t) { type=t; } - - virtual void on_changed(); - -public: - DCAST_HACK_BASECLASS(); - DCAST_HACK_ID(0); -}; // END of class ValueNode - -/*! \class PlaceholderValueNode -** \todo writeme -*/ -class PlaceholderValueNode : public ValueNode -{ -public: - typedef etl::handle Handle; - typedef etl::loose_handle LooseHandle; - typedef etl::handle ConstHandle; - typedef etl::rhandle RHandle; - -private: - - PlaceholderValueNode(ValueBase::Type type=ValueBase::TYPE_NIL); - -public: - - virtual ValueBase operator()(Time t)const; - - virtual String get_name()const; - - virtual String get_local_name()const; - - virtual ValueNode* clone(const GUID& deriv_guid=GUID())const; - - static Handle create(ValueBase::Type type=ValueBase::TYPE_NIL); - -protected: - virtual void get_times_vfunc(Node::time_set &/*set*/) const {} -}; // END of class PlaceholderValueNode - - -/*! \class LinkableValueNode -** \todo writeme -*/ -class LinkableValueNode : public ValueNode -{ - friend class ValueNode; -public: - - typedef etl::handle Handle; - - typedef etl::loose_handle LooseHandle; - - typedef etl::handle ConstHandle; - - typedef etl::rhandle RHandle; - - - //! Type that represents a pointer to a ValueNode's constructor - typedef LinkableValueNode* (*Factory)(const ValueBase&); - - typedef bool (*CheckType)(ValueBase::Type); - - struct BookEntry - { - String local_name; - Factory factory; - CheckType check_type; - ReleaseVersion release_version; // which version of synfig introduced this valuenode type - }; - - typedef std::map Book; - - static Book& book(); - - static Handle create(const String &name, const ValueBase& x); - - static bool check_type(const String &name, ValueBase::Type x); - -public: - LinkableValueNode(ValueBase::Type type=ValueBase::TYPE_NIL): - ValueNode(type) { } - -protected: - virtual bool set_link_vfunc(int i,ValueNode::Handle x)=0; - - void unlink_all(); - -public: - - virtual int link_count()const=0; - - virtual String link_local_name(int i)const=0; - - virtual String link_name(int i)const=0; - - virtual int get_link_index_from_name(const String &name)const=0; - - virtual ValueNode* clone(const GUID& deriv_guid=GUID())const; - - bool set_link(int i,ValueNode::Handle x); - bool set_link(const String &name,ValueNode::Handle x) { return set_link(get_link_index_from_name(name),x); } - - ValueNode::LooseHandle get_link(int i)const; - ValueNode::LooseHandle get_link(const String &name)const { return get_link(get_link_index_from_name(name)); } - - String - get_description(int index = -1, bool show_exported_name = true)const; - -protected: - //! Sets the type of the ValueNode - void set_type(ValueBase::Type t) { ValueNode::set_type(t); } - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const=0; - - // Wrapper for new operator, used by clone() - virtual LinkableValueNode* create_new()const=0; - - virtual void get_times_vfunc(Node::time_set &set) const; -}; // END of class LinkableValueNode - -/*! \class ValueNodeList -** \brief A searchable value_node list container -** \warning Do not confuse with ValueNode_DynamicList! -** \todo writeme -*/ -class ValueNodeList : public std::list -{ - int placeholder_count_; -public: - ValueNodeList(); - - //! Finds the ValueNode in the list with the given \a name - /*! \return If found, returns a handle to the ValueNode. - ** Otherwise, returns an empty handle. - */ - ValueNode::Handle find(const String &name); - - //! Finds the ValueNode in the list with the given \a name - /*! \return If found, returns a handle to the ValueNode. - ** Otherwise, returns an empty handle. - */ - ValueNode::ConstHandle find(const String &name)const; - - //! Removes the \a value_node from the list - bool erase(ValueNode::Handle value_node); - - //! \writeme - bool add(ValueNode::Handle value_node); - - //! \writeme - bool count(const String &id)const; - - //! Similar to find, but will create a placeholder value_node if it cannot be found. - ValueNode::Handle surefind(const String &name); - - //! Removes any value_nodes with reference counts of 1. - void audit(); - - //! Placeholder Count - int placeholder_count()const { return placeholder_count_; } -}; - -ValueNode::LooseHandle find_value_node(const GUID& guid); - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_add.cpp b/synfig-core/trunk/src/synfig/valuenode_add.cpp deleted file mode 100644 index c67d74e..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_add.cpp +++ /dev/null @@ -1,243 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_add.cpp -** \brief Implementation of the "Add" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "general.h" -#include "valuenode_add.h" -#include "valuenode_const.h" -#include -#include "color.h" -#include "gradient.h" -#include "vector.h" -#include "angle.h" -#include "real.h" -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -synfig::ValueNode_Add::ValueNode_Add(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - set_link("scalar",ValueNode_Const::create(Real(1.0))); - ValueBase::Type id(value.get_type()); - - switch(id) - { - case ValueBase::TYPE_ANGLE: - set_link("lhs",ValueNode_Const::create(value.get(Angle()))); - set_link("rhs",ValueNode_Const::create(Angle::deg(0))); - break; - case ValueBase::TYPE_COLOR: - set_link("lhs",ValueNode_Const::create(value.get(Color()))); - set_link("rhs",ValueNode_Const::create(Color(0,0,0,0))); - break; - case ValueBase::TYPE_GRADIENT: - set_link("lhs",ValueNode_Const::create(value.get(Gradient()))); - set_link("rhs",ValueNode_Const::create(Gradient())); - break; - case ValueBase::TYPE_INTEGER: - set_link("lhs",ValueNode_Const::create(value.get(int()))); - set_link("rhs",ValueNode_Const::create(int(0))); - break; - case ValueBase::TYPE_REAL: - set_link("lhs",ValueNode_Const::create(value.get(Real()))); - set_link("rhs",ValueNode_Const::create(Real(0))); - break; - case ValueBase::TYPE_TIME: - set_link("lhs",ValueNode_Const::create(value.get(Time()))); - set_link("rhs",ValueNode_Const::create(Time(0))); - break; - case ValueBase::TYPE_VECTOR: - set_link("lhs",ValueNode_Const::create(value.get(Vector()))); - set_link("rhs",ValueNode_Const::create(Vector(0,0))); - break; - default: - assert(0); - throw runtime_error(get_local_name()+_(":Bad type ")+ValueBase::type_local_name(id)); - } -} - -LinkableValueNode* -ValueNode_Add::create_new()const -{ - return new ValueNode_Add(get_type()); -} - -ValueNode_Add* -ValueNode_Add::create(const ValueBase& value) -{ - return new ValueNode_Add(value); -} - -synfig::ValueNode_Add::~ValueNode_Add() -{ - unlink_all(); -} - -synfig::ValueBase -synfig::ValueNode_Add::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - if(!ref_a || !ref_b) - throw runtime_error(strprintf("ValueNode_Add: %s",_("One or both of my parameters aren't set!"))); - switch(get_type()) - { - case ValueBase::TYPE_ANGLE: - return ((*ref_a)(t).get(Angle())+(*ref_b)(t).get(Angle()))*(*scalar)(t).get(Real()); - case ValueBase::TYPE_COLOR: - return ((*ref_a)(t).get(Color())+(*ref_b)(t).get(Color()))*(*scalar)(t).get(Real()); - case ValueBase::TYPE_GRADIENT: - return ((*ref_a)(t).get(Gradient())+(*ref_b)(t).get(Gradient()))*(*scalar)(t).get(Real()); - case ValueBase::TYPE_INTEGER: - return round_to_int(((*ref_a)(t).get(int())+(*ref_b)(t).get(int()))*(*scalar)(t).get(Real())); - case ValueBase::TYPE_REAL: - return ((*ref_a)(t).get(Vector::value_type())+(*ref_b)(t).get(Vector::value_type()))*(*scalar)(t).get(Real()); - case ValueBase::TYPE_TIME: - return ((*ref_a)(t).get(Time())+(*ref_b)(t).get(Time()))*(*scalar)(t).get(Real()); - case ValueBase::TYPE_VECTOR: - return ((*ref_a)(t).get(Vector())+(*ref_b)(t).get(Vector()))*(*scalar)(t).get(Real()); - default: - assert(0); - break; - } - return ValueBase(); -} - -bool -ValueNode_Add::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - -protected: - ValueNode_Add(const ValueBase &value); - -private: - ValueNode::RHandle ref_a; - ValueNode::RHandle ref_b; - ValueNode::RHandle scalar; - -public: - LinkableValueNode* create_new()const; - static ValueNode_Add* create(const ValueBase &value=ValueBase()); - virtual ~ValueNode_Add(); - virtual ValueBase operator()(Time t)const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_local_name(int i)const; - virtual String link_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - virtual String get_name()const; - virtual String get_local_name()const; - static bool check_type(ValueBase::Type type); -}; // END of class ValueNode_Add - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_and.cpp b/synfig-core/trunk/src/synfig/valuenode_and.cpp deleted file mode 100644 index 974485c..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_and.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_and.cpp -** \brief Implementation of the "And" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** Copyright (c) 2009 Nikita Kitaev -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_and.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_And::ValueNode_And(const ValueBase &x): - LinkableValueNode(x.get_type()) -{ - bool value(x.get(bool())); - - set_link("link1", ValueNode_Const::create(bool(true))); - set_link("link2", ValueNode_Const::create(bool(false))); - if (value) - set_link("link2",ValueNode_Const::create(bool(true))); -} - -ValueNode_And* -ValueNode_And::create(const ValueBase &x) -{ - return new ValueNode_And(x); -} - -LinkableValueNode* -ValueNode_And::create_new()const -{ - return new ValueNode_And(get_type()); -} - -ValueNode_And::~ValueNode_And() -{ - unlink_all(); -} - -bool -ValueNode_And::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - ValueNode_And(const ValueBase &x); - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_And(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_And* create(const ValueBase &x); -}; // END of class ValueNode_And - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_anglestring.cpp b/synfig-core/trunk/src/synfig/valuenode_anglestring.cpp deleted file mode 100644 index 978b8b8..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_anglestring.cpp +++ /dev/null @@ -1,210 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_anglestring.cpp -** \brief Implementation of the "AngleString" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_anglestring.h" -#include "valuenode_const.h" -#include "canvas.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_AngleString::ValueNode_AngleString(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - switch(value.get_type()) - { - case ValueBase::TYPE_STRING: - set_link("angle",ValueNode_Const::create(Angle::deg(0))); - set_link("width",ValueNode_Const::create(int(0))); - set_link("precision",ValueNode_Const::create(int(3))); - set_link("zero_pad",ValueNode_Const::create(bool(false))); - break; - default: - throw Exception::BadType(ValueBase::type_local_name(value.get_type())); - } - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_AngleString::create_new()const -{ - return new ValueNode_AngleString(get_type()); -} - -ValueNode_AngleString* -ValueNode_AngleString::create(const ValueBase &x) -{ - return new ValueNode_AngleString(x); -} - -ValueNode_AngleString::~ValueNode_AngleString() -{ - unlink_all(); -} - -ValueBase -ValueNode_AngleString::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - Real angle(Angle::deg((*angle_)(t).get(Angle())).get()); - int width((*width_)(t).get(int())); - int precision((*precision_)(t).get(int())); - int zero_pad((*zero_pad_)(t).get(bool())); - - switch (get_type()) - { - case ValueBase::TYPE_STRING: - return strprintf(strprintf("%%%s%d.%df", - zero_pad ? "0" : "", - width, - precision).c_str(), angle); - default: - break; - } - - assert(0); - return ValueBase(); -} - -String -ValueNode_AngleString::get_name()const -{ - return "anglestring"; -} - -String -ValueNode_AngleString::get_local_name()const -{ - return _("Angle String"); -} - -bool -ValueNode_AngleString::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_AngleString(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_AngleString* create(const ValueBase &x); -}; // END of class ValueNode_AngleString - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_animated.cpp b/synfig-core/trunk/src/synfig/valuenode_animated.cpp deleted file mode 100644 index c2a32fc..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_animated.cpp +++ /dev/null @@ -1,1194 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_animated.cpp -** \brief Implementation of the "Animated" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include "canvas.h" -#include "general.h" -#include "valuenode_animated.h" -#include "valuenode_const.h" -#include "exception.h" -#include "gradient.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -// Fast binary search implementation -/* -template inline I -binary_find(I begin, I end, const T& value) -{ - I iter(begin+(end-begin)/2); - - while(end-begin>1 && !(*iter==value)) - { - ((*iter String tangent_info(T a, T b, T v) -{ - return "..."; -} - -String tangent_info(Vector a, Vector b, Vector v) -{ - if(a==b) - return strprintf("(should be zero) T=[%f,%f], Pp=[%f,%f], Pn=[%f,%f]",v[0],v[1],a[0],a[1],b[0],b[1]); - else - return strprintf("(should NOT be zero) T=[%f,%f], Pp=[%f,%f], Pn=[%f,%f]",v[0],v[1],a[0],a[1],b[0],b[1]); -} -*/ - -template -struct subtractor : public std::binary_function -{ - T operator()(const T &a,const T &b)const - { - return a-b; - } -}; - -template <> -struct subtractor : public std::binary_function -{ - Angle operator()(const Angle &a,const Angle &b)const - { - return a.dist(b); - } -}; - -template -struct magnitude : public std::unary_function -{ - float operator()(const T &a)const - { - return abs(a); - } -}; - -template <> -struct magnitude : public std::unary_function -{ - float operator()(const Angle &a)const - { - return abs(Angle::rad(a).get()); - } -}; - -template <> -struct magnitude : public std::unary_function -{ - float operator()(const Vector &a)const - { - return a.mag(); - } -}; - -template <> -struct magnitude : public std::unary_function -{ - float operator()(const Color &a)const - { - return abs(a.get_y()); - } -}; - - - - - -template -struct is_angle_type -{ - bool operator()()const - { - return false; - } -}; - -#ifdef ANGLES_USE_LINEAR_INTERPOLATION -template <> -struct is_angle_type -{ - bool operator()()const - { - return true; - } -}; -#endif // ANGLES_USE_LINEAR_INTERPOLATION - -/* === G L O B A L S ======================================================= */ - -/* === C L A S S E S ======================================================= */ - -template -class _Hermite : public synfig::ValueNode_Animated -{ -public: - typedef T value_type; - affine_combo affine_combo_func; - subtractor subtract_func; - magnitude magnitude_func; - is_angle_type is_angle; -private: - struct PathSegment - { - is_angle_type is_angle; - subtractor subtract_func; - - mutable hermite first; - mutable hermite second; - WaypointList::iterator start; - WaypointList::iterator end; - - value_type resolve(const Time &t)const - { - bool start_static(start->is_static()); - bool end_static(end->is_static()); - - if(!start_static || !end_static) - { - //if(!start_static) - second.p1()=start->get_value(t).get(value_type()); - if(start->get_after()==INTERPOLATION_CONSTANT || end->get_before()==INTERPOLATION_CONSTANT) - return second.p1(); - //if(!end_static) - second.p2()=end->get_value(t).get(value_type()); - - // At the moment, the only type of non-constant interpolation - // that we support is linear. - second.t1()= - second.t2()=subtract_func(second.p2(),second.p1()); - - second.sync(); - } - - return second(first(t)); - } - }; - typedef vector < - PathSegment - /* - pair < - hermite, - hermite - > - */ - > curve_list_type; - - curve_list_type curve_list; - - // Bounds of this curve - Time r,s; - -public: - ValueNode* clone(const synfig::GUID& deriv_guid)const - { - { ValueNode* x(find_value_node(get_guid()^deriv_guid).get()); if(x)return x; } - _Hermite* ret(new _Hermite()); - ret->set_guid(get_guid()^deriv_guid); - for(WaypointList::const_iterator iter=waypoint_list().begin();iter!=waypoint_list().end();++iter) - ret->add(iter->clone(deriv_guid)); - return ret; - } - - _Hermite() - { - set_type(ValueBase(value_type()).get_type()); - } - - virtual WaypointList::iterator new_waypoint(Time t, ValueBase value) - { - // Make sure we are getting data of the correct type - //if(data.type!=type) - // return waypoint_list_type::iterator(); - - try { find(t); throw Exception::BadTime(_("A waypoint already exists at this point in time")); } catch(Exception::NotFound) { }; - Waypoint waypoint(value,t); - waypoint.set_parent_value_node(this); - - waypoint_list_.push_back(waypoint); - WaypointList::iterator ret=waypoint_list_.end(); - --ret; - - if(is_angle()) - { - ret->set_before(INTERPOLATION_LINEAR); - ret->set_after(INTERPOLATION_LINEAR); - } - - changed(); - - return ret; - } - - virtual WaypointList::iterator new_waypoint(Time t, ValueNode::Handle value_node) - { - // Make sure we are getting data of the correct type - //if(data.type!=type) - // return waypoint_list_type::iterator(); - try { find(t); throw Exception::BadTime(_("A waypoint already exists at this point in time")); } catch(Exception::NotFound) { }; - - Waypoint waypoint(value_node,t); - waypoint.set_parent_value_node(this); - - waypoint_list_.push_back(waypoint); - WaypointList::iterator ret=waypoint_list_.end(); - --ret; - - if(is_angle()) - { - ret->set_before(INTERPOLATION_LINEAR); - ret->set_after(INTERPOLATION_LINEAR); - } - - changed(); - - return ret; - } - - virtual void on_changed() - { - ValueNode_Animated::on_changed(); - - if(waypoint_list_.size()<=1) - return; - std::sort(waypoint_list_.begin(),waypoint_list_.end()); - //waypoint_list_.sort(); - - r=waypoint_list_.front().get_time(); - s=waypoint_list_.back().get_time(); - - curve_list.clear(); - - WaypointList::iterator prev,iter,next=waypoint_list_.begin(); - int i=0; - - for(iter=next++;iter!=waypoint_list_.end() && next!=waypoint_list_.end();prev=iter,iter=next++,i++) - { - typename curve_list_type::value_type curve; - WaypointList::iterator after_next(next); - ++after_next; - - curve.start=iter; - curve.end=next; - - // Set up the positions - curve.first.set_rs(iter->get_time(), next->get_time()); - curve.second.set_rs(iter->get_time(), next->get_time()); - - Waypoint::Interpolation iter_get_after(iter->get_after()); - Waypoint::Interpolation next_get_after(next->get_after()); - Waypoint::Interpolation iter_get_before(iter->get_before()); - Waypoint::Interpolation next_get_before(next->get_before()); - - if(is_angle()) - { - if(iter_get_after==INTERPOLATION_TCB) - iter_get_after=INTERPOLATION_LINEAR; - if(next_get_after==INTERPOLATION_TCB) - next_get_after=INTERPOLATION_LINEAR; - if(iter_get_before==INTERPOLATION_TCB) - iter_get_before=INTERPOLATION_LINEAR; - if(next_get_before==INTERPOLATION_TCB) - next_get_before=INTERPOLATION_LINEAR; - } - - if(iter->is_static() && next->is_static()) - { - curve.second.p1()=iter->get_value().get(T()); - curve.second.p2()=next->get_value().get(T()); - if(iter_get_after==INTERPOLATION_CONSTANT || next_get_before==INTERPOLATION_CONSTANT) - { - // Sections must be constant on both sides. - // NOTE: this is commented out because of some - // user interface issues. Namely, if a section is - // constant and the user turns off the constant on - // one waypoint, this will end up turning it back on. - // Confusing. - //iter->get_after()=next->get_before()=INTERPOLATION_CONSTANT; - curve.second.p1()= - curve.second.p2()=iter->get_value().get(T()); - curve.second.t1()= - curve.second.t2()=subtract_func(curve.second.p1(),curve.second.p2()); - } - else - { - if(iter_get_after==INTERPOLATION_TCB && iter!=waypoint_list_.begin() && !is_angle()) - { - if(iter->get_before()!=INTERPOLATION_TCB && !curve_list.empty()) - { - curve.second.t1()=curve_list.back().second.t2(); - } - else - { - const Real& t(iter->get_tension()); // Tension - const Real& c(iter->get_continuity()); // Continuity - const Real& b(iter->get_bias()); // Bias - - // The following line works where the previous line fails. - value_type Pp; Pp=curve_list.back().second.p1(); // P_{i-1} - - const value_type& Pc(curve.second.p1()); // P_i - const value_type& Pn(curve.second.p2()); // P_{i+1} - - // TCB - value_type vect(static_cast - (subtract_func(Pc,Pp) * - (((1.0-t) * (1.0+c) * (1.0+b)) / 2.0) + - (Pn-Pc) * (((1.0-t) * (1.0-c) * (1.0-b)) / 2.0))); - - // Tension Only - //value_type vect=(value_type)((Pn-Pp)*(1.0-t)); - - // Linear - //value_type vect=(value_type)(Pn-Pc); - - // Debugging stuff - //synfig::info("%d:t1: %s",i,tangent_info(Pp,Pn,vect).c_str()); - - // Adjust for time - //vect=value_type(vect*(curve.second.get_dt()*2.0)/(curve.second.get_dt()+curve_list.back().second.get_dt())); - //vect=value_type(vect*(curve.second.get_dt())/(curve_list.back().second.get_dt())); - - curve.second.t1()=vect; - } - } - else if( - iter_get_after==INTERPOLATION_LINEAR || iter_get_after==INTERPOLATION_HALT || - (iter_get_after==INTERPOLATION_TCB && iter==waypoint_list_.begin())) - { - curve.second.t1()=subtract_func(curve.second.p2(),curve.second.p1()); - } - - if(iter_get_before==INTERPOLATION_TCB && iter->get_after()!=INTERPOLATION_TCB && !curve_list.empty()) - { - curve_list.back().second.t2()=curve.second.t1(); - curve_list.back().second.sync(); - } - - - if(next_get_before==INTERPOLATION_TCB && after_next!=waypoint_list_.end() && !is_angle()) - { - const Real &t(next->get_tension()); // Tension - const Real &c(next->get_continuity()); // Continuity - const Real &b(next->get_bias()); // Bias - const value_type &Pp(curve.second.p1()); // P_{i-1} - const value_type &Pc(curve.second.p2()); // P_i - value_type Pn; Pn=after_next->get_value().get(T()); // P_{i+1} - - // TCB - value_type vect(static_cast(subtract_func(Pc,Pp) * (((1.0-t)*(1.0-c)*(1.0+b))/2.0) + - (Pn-Pc) * (((1.0-t)*(1.0+c)*(1.0-b))/2.0))); - - // Tension Only - //value_type vect((value_type)((Pn-Pp)*(1.0-t))); - - // Linear - //value_type vect=(value_type)(Pc-Pp); - - // Debugging stuff - //synfig::info("%d:t2: %s",i,tangent_info(Pp,Pn,vect).c_str()); - - // Adjust for time - //vect=value_type(vect*(curve.second.get_dt()*2.0)/(curve.second.get_dt()+(after_next->get_time()-next->get_time()))); - //vect=value_type(vect*(curve.second.get_dt()/((after_next->get_time()-next->get_time())))); - - curve.second.t2()=vect; - } - else if( - next_get_before==INTERPOLATION_LINEAR || next_get_before==INTERPOLATION_HALT || - (next_get_before==INTERPOLATION_TCB && after_next==waypoint_list_.end())) - { - curve.second.t2()=subtract_func(curve.second.p2(),curve.second.p1()); - } - - // Adjust for time - const float timeadjust(0.5); - - if(iter_get_after==INTERPOLATION_HALT) - curve.second.t1()*=0; - // if this isn't the first curve - else if(iter_get_after != INTERPOLATION_LINEAR && !curve_list.empty()) - // adjust it for the curve that came before it - curve.second.t1() = static_cast(curve.second.t1() * // cast to prevent warning - // (time span of this curve) * 1.5 - // ----------------------------------------------------------------- - // ((time span of this curve) * 0.5) + (time span of previous curve) - (curve.second.get_dt()*(timeadjust+1)) / - (curve.second.get_dt()*timeadjust + curve_list.back().second.get_dt())); - - if(next_get_before==INTERPOLATION_HALT) - curve.second.t2()*=0; - // if this isn't the last curve - else if(next_get_before != INTERPOLATION_LINEAR && after_next!=waypoint_list_.end()) - // adjust it for the curve that came after it - curve.second.t2() = static_cast(curve.second.t2() * // cast to prevent warning - // (time span of this curve) * 1.5 - // ------------------------------------------------------------- - // ((time span of this curve) * 0.5) + (time span of next curve) - (curve.second.get_dt()*(timeadjust+1)) / - (curve.second.get_dt()*timeadjust+(after_next->get_time()-next->get_time()))); - } // not CONSTANT - } - - // Set up the time to the default stuff - curve.first.set_rs(iter->get_time(), next->get_time()); - curve.first.p1()=iter->get_time(); - curve.first.p2()=next->get_time(); - curve.first.t1()=(curve.first.p2()-curve.first.p1())*(1.0f-iter->get_temporal_tension()); - curve.first.t2()=(curve.first.p2()-curve.first.p1())*(1.0f-next->get_temporal_tension()); - - - curve.first.sync(); - curve.second.sync(); - - curve_list.push_back(curve); - } - } - - virtual ValueBase operator()(Time t)const - { - if(waypoint_list_.empty()) - return value_type(); //! \todo Perhaps we should throw something here? - if(waypoint_list_.size()==1) - return waypoint_list_.front().get_value(t); - if(t<=r) - return waypoint_list_.front().get_value(t); - if(t>=s) - return waypoint_list_.back().get_value(t); - - typename curve_list_type::const_iterator iter; - - // This next line will set iter to the - // correct iterator for the given time. - for(iter=curve_list.begin();iter=iter->first.get_s();++iter) - continue; - if(iter==curve_list.end()) - return waypoint_list_.back().get_value(t); - return iter->resolve(t); - } -}; - - -template -class _Constant : public synfig::ValueNode_Animated -{ -public: - typedef T value_type; - -private: - - // Bounds of this curve - Time r,s; - -public: - ValueNode* clone(const synfig::GUID& deriv_guid)const - { - { ValueNode* x(find_value_node(get_guid()^deriv_guid).get()); if(x)return x; } - _Constant* ret(new _Constant()); - ret->set_guid(get_guid()^deriv_guid); - for(WaypointList::const_iterator iter=waypoint_list().begin();iter!=waypoint_list().end();++iter) - ret->add(iter->clone(deriv_guid)); - return ret; - } - - _Constant() - { - set_type(ValueBase(value_type()).get_type()); - } - - virtual WaypointList::iterator new_waypoint(Time t, ValueBase value) - { - // Make sure we are getting data of the correct type - //if(data.type!=type) - // return waypoint_list_type::iterator(); - try { find(t); throw Exception::BadTime(_("A waypoint already exists at this point in time")); } catch(Exception::NotFound) { }; - - Waypoint waypoint(value,t); - waypoint.set_parent_value_node(this); - - waypoint_list_.push_back(waypoint); - WaypointList::iterator ret=waypoint_list_.end(); - --ret; - changed(); - - return ret; - } - - virtual WaypointList::iterator new_waypoint(Time t, ValueNode::Handle value_node) - { - // Make sure we are getting data of the correct type - //if(data.type!=type) - // return waypoint_list_type::iterator(); - try { find(t); throw Exception::BadTime(_("A waypoint already exists at this point in time")); } catch(Exception::NotFound) { }; - - Waypoint waypoint(value_node,t); - waypoint.set_parent_value_node(this); - - waypoint_list_.push_back(waypoint); - WaypointList::iterator ret=waypoint_list_.end(); - --ret; - changed(); - - return ret; - } - - virtual void on_changed() - { - ValueNode_Animated::on_changed(); - - if(waypoint_list_.size()<=1) - return; - std::sort(waypoint_list_.begin(),waypoint_list_.end()); - //waypoint_list_.sort(); - r=waypoint_list_.front().get_time(); - s=waypoint_list_.back().get_time(); - - } - - virtual ValueBase operator()(Time t)const - { - if(waypoint_list_.size()==1) - return waypoint_list_.front().get_value(t); - if(waypoint_list_.empty()) - return value_type(); - if(t<=r) - return waypoint_list_.front().get_value(t); - if(t>=s) - return waypoint_list_.back().get_value(t); - - typename WaypointList::const_iterator iter; - typename WaypointList::const_iterator next; - - // This next line will set iter to the - // correct iterator for the given time. - for(next=waypoint_list_.begin(),iter=next++;next!=waypoint_list_.end() && t>=next->get_time();iter=next++) - continue; - - return iter->get_value(t); - } -}; - -class _AnimBool : public synfig::ValueNode_Animated -{ -public: - typedef bool value_type; - -private: - - // Bounds of this curve - Time r,s; - -public: - ValueNode* clone(const synfig::GUID& deriv_guid)const - { - { ValueNode* x(find_value_node(get_guid()^deriv_guid).get()); if(x)return x; } - _AnimBool* ret(new _AnimBool()); - ret->set_guid(get_guid()^deriv_guid); - for(WaypointList::const_iterator iter=waypoint_list().begin();iter!=waypoint_list().end();++iter) - ret->add(iter->clone(deriv_guid)); - return ret; - } - - _AnimBool() - { - set_type(ValueBase(value_type()).get_type()); - } - - virtual WaypointList::iterator new_waypoint(Time t, ValueBase value) - { - // Make sure we are getting data of the correct type - //if(data.type!=type) - // return waypoint_list_type::iterator(); - try { find(t); throw Exception::BadTime(_("A waypoint already exists at this point in time")); } catch(Exception::NotFound) { }; - - - Waypoint waypoint(value,t); - waypoint.set_parent_value_node(this); - - waypoint_list_.push_back(waypoint); - WaypointList::iterator ret=waypoint_list_.end(); - --ret; - changed(); - - return ret; - } - - virtual WaypointList::iterator new_waypoint(Time t, ValueNode::Handle value_node) - { - // Make sure we are getting data of the correct type - //if(data.type!=type) - // return waypoint_list_type::iterator(); - try { find(t); throw Exception::BadTime(_("A waypoint already exists at this point in time")); } catch(Exception::NotFound) { }; - - Waypoint waypoint(value_node,t); - waypoint.set_parent_value_node(this); - - waypoint_list_.push_back(waypoint); - WaypointList::iterator ret=waypoint_list_.end(); - --ret; - changed(); - - return ret; - } - - virtual void on_changed() - { - ValueNode_Animated::on_changed(); - - if(waypoint_list_.size()<=1) - return; - std::sort(waypoint_list_.begin(),waypoint_list_.end()); - //waypoint_list_.sort(); - r=waypoint_list_.front().get_time(); - s=waypoint_list_.back().get_time(); - - } - - virtual ValueBase operator()(Time t)const - { - if(waypoint_list_.size()==1) - return waypoint_list_.front().get_value(t); - if(waypoint_list_.empty()) - return false; - if(ts) - return waypoint_list_.back().get_value(t); - - WaypointList::const_iterator iter; - WaypointList::const_iterator next; - - // This next line will set iter to the - // correct iterator for the given time. - for(next=waypoint_list_.begin(),iter=next++;next!=waypoint_list_.end() && t>=next->get_time();iter=next++) - if(iter->get_time()==t) - return iter->get_value(t); - - if(iter->get_time()==t) - return iter->get_value(t); - - if(next!=waypoint_list_.end()) - return iter->get_value(t).get(bool()) || next->get_value(t).get(bool()); - return iter->get_value(t); - } -}; - -/* === M E T H O D S ======================================================= */ - -ValueNode_Animated::ValueNode_Animated() -{ - DCAST_HACK_ENABLE(); -} - -int -ValueNode_Animated::find(const Time& begin,const Time& end,std::vector& selected) -{ - Time curr_time(begin); - int ret(0); - - // try to grab first waypoint - try - { - WaypointList::iterator iter; - iter=find(curr_time); - selected.push_back(&*iter); - ret++; - } - catch(...) { } - - try - { - WaypointList::iterator iter; - while(true) - { - iter=find_next(curr_time); - curr_time=iter->get_time(); - if(curr_time>=end) - break; - selected.push_back(&*iter); - ret++; - } - } - catch(...) { } - - return ret; -} - -/* -void -ValueNode_Animated::manipulate_time(const Time& old_begin,const Time& old_end,const Time& new_begin,const Time& new_end) -{ -#define old_2_new(x) (((x)-old_begin)/(old_end-old_begin)*(new_end-new_begin)+new_begin) - std::vector selected; - std::vector::iterator iter; - - if(find(old_begin,old_end,selected)) - { - // check to make sure this operation is OK - for(iter=selected.begin();iter!=selected.end();++iter) - { - try - { - Time new_time(old_2_new((*iter)->get_time())); - if(new_time>=old_begin && new_timeset_time(old_2_new(selected.back()->get_time())); - selected.pop_back(); - } - - - while(!selected.empty()) - { - selected.back()->set_time(old_2_new(selected.back()->get_time())); - selected.pop_back(); - } - - changed(); - } -#undef old_2_new -} -*/ - -Waypoint -ValueNode_Animated::new_waypoint_at_time(const Time& time)const -{ - Waypoint waypoint; - try - { - // Trivial case, we are sitting on a waypoint - waypoint=*find(time); - waypoint.make_unique(); - } - catch(...) - { - if(waypoint_list().empty()) - { - waypoint.set_value((*this)(time)); - } - else - { - WaypointList::const_iterator prev; - WaypointList::const_iterator next; - - bool has_prev(false), has_next(false); - - try { prev=find_prev(time); has_prev=true; } catch(...) { } - try { next=find_next(time); has_next=true; } catch(...) { } - - /* - WaypointList::const_iterator closest; - - if(has_prev&&!has_next) - closest=prev; - else if(has_next&&!has_prev) - closest=next; - else if(time-prev->get_time()get_time()-time) - closest=prev; - else - closest=next; - - for(iter=waypoint_list().begin();iter!=waypoint_list().end();++iter) - { - const Real dist(abs(iter->get_time()-time)); - if(distget_time()-time)) - closest=iter; - } - */ - - if(has_prev && !prev->is_static()) - waypoint.set_value_node(prev->get_value_node()); - if(has_next && !next->is_static()) - waypoint.set_value_node(next->get_value_node()); - else - waypoint.set_value((*this)(time)); - - /*if(has_prev) - waypoint.set_after(prev->get_before()); - if(has_next) - waypoint.set_before(next->get_after()); - */ - } - } - waypoint.set_time(time); - waypoint.set_parent_value_node(const_cast(this)); -// synfig::info("waypoint.get_after()=set to %d",waypoint.get_after()); -// synfig::info("waypoint.get_before()=set to %d",waypoint.get_before()); - - return waypoint; -} - -ValueNode_Animated::WaypointList::iterator -ValueNode_Animated::find(const UniqueID &x) -{ - ValueNode_Animated::WaypointList::iterator iter; - iter=std::find(waypoint_list().begin(),waypoint_list().end(),x); - if(iter==waypoint_list().end() || iter->get_uid()!=x.get_uid()) - throw Exception::NotFound(strprintf("ValueNode_Animated::find(): Can't find UniqueID %d",x.get_uid())); - return iter; -} - -ValueNode_Animated::WaypointList::const_iterator -ValueNode_Animated::find(const UniqueID &x)const -{ - return const_cast(this)->find(x); - /* - ValueNode_Animated::WaypointList::const_iterator iter; - iter=std::find(waypoint_list().begin(),waypoint_list().end(),x); - if(iter!=waypoint_list().end() && iter->get_uid()!=x.get_uid()) - throw Exception::NotFound(strprintf("ValueNode_Animated::find()const: Can't find UniqueID %d",x.get_uid())); - return iter; - */ -} - -ValueNode_Animated::WaypointList::iterator -ValueNode_Animated::find(const Time &x) -{ - WaypointList::iterator iter(binary_find(waypoint_list().begin(),waypoint_list().end(),x)); - - if(iter!=waypoint_list().end() && x.is_equal(iter->get_time())) - return iter; - - throw Exception::NotFound(strprintf("ValueNode_Animated::find(): Can't find Waypoint at %s",x.get_string().c_str())); -} - -ValueNode_Animated::WaypointList::const_iterator -ValueNode_Animated::find(const Time &x)const -{ - return const_cast(this)->find(x); - /* - WaypointList::const_iterator iter(binary_find(waypoint_list().begin(),waypoint_list().end(),x)); - - if(iter!=waypoint_list().end() && x.is_equal(iter->get_time())) - return iter; - - throw Exception::NotFound(strprintf("ValueNode_Animated::find(): Can't find Waypoint at %s",x.get_string().c_str())); - */ -} - -ValueNode_Animated::WaypointList::iterator -ValueNode_Animated::find_next(const Time &x) -{ - WaypointList::iterator iter(binary_find(waypoint_list().begin(),waypoint_list().end(),x)); - - if(iter!=waypoint_list().end()) - { - if(iter->get_time().is_more_than(x)) - return iter; - ++iter; - if(iter!=waypoint_list().end() && iter->get_time().is_more_than(x)) - return iter; - } - - throw Exception::NotFound(strprintf("ValueNode_Animated::find_next(): Can't find Waypoint after %s",x.get_string().c_str())); -} - -ValueNode_Animated::WaypointList::const_iterator -ValueNode_Animated::find_next(const Time &x)const -{ - return const_cast(this)->find_next(x); - /* - WaypointList::const_iterator iter(binary_find(waypoint_list().begin(),waypoint_list().end(),x)); - - if(iter!=waypoint_list().end()) - { - if(iter->get_time()-Time::epsilon()>x) - return iter; - ++iter; - if(iter!=waypoint_list().end() && iter->get_time()-Time::epsilon()>x) - return iter; - } - - throw Exception::NotFound(strprintf("ValueNode_Animated::find_next(): Can't find Waypoint after %s",x.get_string().c_str())); -*/ -} - -ValueNode_Animated::WaypointList::iterator -ValueNode_Animated::find_prev(const Time &x) -{ - WaypointList::iterator iter(binary_find(waypoint_list().begin(),waypoint_list().end(),x)); - - if(iter!=waypoint_list().end()) - { - if(iter->get_time().is_less_than(x)) - return iter; - if(iter!=waypoint_list().begin() && (--iter)->get_time().is_less_than(x)) - return iter; - } - - throw Exception::NotFound(strprintf("ValueNode_Animated::find_prev(): Can't find Waypoint after %s",x.get_string().c_str())); -} - -ValueNode_Animated::WaypointList::const_iterator -ValueNode_Animated::find_prev(const Time &x)const -{ - return const_cast(this)->find_prev(x); - /* - WaypointList::const_iterator iter(binary_find(waypoint_list().begin(),waypoint_list().end(),x)); - - if(iter!=waypoint_list().end()) - { - if(iter->get_time()+Time::epsilon()get_time()+Time::epsilon()); - case ValueBase::TYPE_REAL: - return ValueNode_Animated::Handle(new _Hermite); - case ValueBase::TYPE_INTEGER: - return ValueNode_Animated::Handle(new _Hermite); - case ValueBase::TYPE_ANGLE: - return ValueNode_Animated::Handle(new _Hermite); - case ValueBase::TYPE_VECTOR: - return ValueNode_Animated::Handle(new _Hermite); - case ValueBase::TYPE_COLOR: - return ValueNode_Animated::Handle(new _Hermite); - - case ValueBase::TYPE_STRING: - return ValueNode_Animated::Handle(new _Constant); - case ValueBase::TYPE_GRADIENT: - return ValueNode_Animated::Handle(new _Hermite); - case ValueBase::TYPE_BOOL: - return ValueNode_Animated::Handle(new _AnimBool); - case ValueBase::TYPE_CANVAS: - return ValueNode_Animated::Handle(new _Constant); - default: - throw - Exception::BadType(strprintf(_("%s: You cannot use a %s in an animated ValueNode"),"synfig::ValueNode_Animated::create()", - ValueBase::type_local_name(type).c_str()) - ); - break; - } - return ValueNode_Animated::Handle(); -} - -ValueNode_Animated::Handle -ValueNode_Animated::create(const ValueBase& value, const Time& time) -{ - return create(ValueNode::Handle(ValueNode_Const::create(value)),time); -} - -ValueNode_Animated::Handle -ValueNode_Animated::create(ValueNode::Handle value_node, const Time& time) -{ - ValueNode_Animated::Handle ret(create(value_node->get_type())); - ret->new_waypoint(time,value_node); - return ret; -} - -ValueNode_Animated::~ValueNode_Animated() -{ -} - -String -ValueNode_Animated::get_name()const -{ - return "animated"; -} - -String -ValueNode_Animated::get_local_name()const -{ - return _("Animated"); -} - -void ValueNode_Animated::get_times_vfunc(Node::time_set &set) const -{ - //add all the way point times to the value node... - - WaypointList::const_iterator i = waypoint_list().begin(), - end = waypoint_list().end(); - - for(; i != end; ++i) - { - TimePoint t; - t.set_time(i->get_time()); - t.set_before(i->get_before()); - t.set_after(i->get_after()); - t.set_guid(i->get_guid()); - set.insert(t); - } -} -struct timecmp - { - Time t; - - timecmp(const Time &c) :t(c) {} - - bool operator()(const Waypoint &rhs) const - { - return t.is_equal(rhs.get_time()); - } - }; - - ValueNode_Animated::findresult - ValueNode_Animated::find_uid(const UniqueID &x) - { - findresult f; - f.second = false; - - //search for it... and set the bool part of the return value to true if we found it! - f.first = std::find(waypoint_list_.begin(), waypoint_list_.end(), x); - if(f.first != waypoint_list_.end()) - f.second = true; - - return f; - } - - ValueNode_Animated::const_findresult - ValueNode_Animated::find_uid(const UniqueID &x)const - { - const_findresult f; - f.second = false; - - //search for it... and set the bool part of the return value to true if we found it! - f.first = std::find(waypoint_list_.begin(), waypoint_list_.end(), x); - if(f.first != waypoint_list_.end()) - f.second = true; - - return f; - } - - ValueNode_Animated::findresult - ValueNode_Animated::find_time(const Time &x) - { - findresult f; - f.second = false; - - //search for it... and set the bool part of the return value to true if we found it! - f.first = std::find_if(waypoint_list_.begin(), waypoint_list_.end(), timecmp(x)); - if(f.first != waypoint_list_.end()) - f.second = true; - - return f; - } - -ValueNode_Animated::const_findresult -ValueNode_Animated::find_time(const Time &x)const -{ - const_findresult f; - f.second = false; - - //search for it... and set the bool part of the return value to true if we found it! - f.first = std::find_if(waypoint_list_.begin(), waypoint_list_.end(), timecmp(x)); - if(f.first != waypoint_list_.end()) - f.second = true; - - return f; -} - -void -ValueNode_Animated::insert_time(const Time& location, const Time& delta) -{ - if(!delta) - return; - try - { - WaypointList::iterator iter(find_next(location)); - for(;iter!=waypoint_list().end();++iter) - { - iter->set_time(iter->get_time()+delta); - } - changed(); - } - catch(Exception::NotFound) { } -} diff --git a/synfig-core/trunk/src/synfig/valuenode_animated.h b/synfig-core/trunk/src/synfig/valuenode_animated.h deleted file mode 100644 index c153526..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_animated.h +++ /dev/null @@ -1,117 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_animated.h -** \brief Header file for implementation of the "Animated" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_VALUENODE_ANIMATED_H -#define __SYNFIG_VALUENODE_ANIMATED_H - -/* === H E A D E R S ======================================================= */ - -#include - -#include "valuenode.h" -#include "uniqueid.h" -#include "waypoint.h" - -/* === M A C R O S ========================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -struct ValueNode_Animated : public ValueNode -{ -public: - typedef etl::handle Handle; - typedef etl::handle ConstHandle; - - typedef synfig::Waypoint Waypoint; - typedef synfig::WaypointList WaypointList; - - typedef std::pair findresult; - typedef std::pair const_findresult; - -protected: - WaypointList waypoint_list_; - -public: - WaypointList &waypoint_list() { return waypoint_list_; } - - const WaypointList &waypoint_list()const { return waypoint_list_; } - - virtual WaypointList::iterator new_waypoint(Time t, ValueBase value)=0; - - virtual WaypointList::iterator new_waypoint(Time t, ValueNode::Handle value_node)=0; - - /*! \note this does not add any waypoint to the ValueNode! */ - Waypoint new_waypoint_at_time(const Time& t)const; - - WaypointList::iterator add(const Waypoint &x); - - void erase(const UniqueID &x); - - //either use find result (return bool and iterator) or - findresult find_uid(const UniqueID &x); - const_findresult find_uid(const UniqueID &x)const; - findresult find_time(const Time &x); - const_findresult find_time(const Time &x)const; - - WaypointList::iterator find(const UniqueID &x); - WaypointList::const_iterator find(const UniqueID &x)const; - WaypointList::iterator find(const Time &x); - WaypointList::const_iterator find(const Time &x)const; - - WaypointList::iterator find_next(const Time &x); - WaypointList::const_iterator find_next(const Time &x)const; - WaypointList::iterator find_prev(const Time &x); - WaypointList::const_iterator find_prev(const Time &x)const; - - virtual ~ValueNode_Animated(); - - virtual String get_name()const; - virtual String get_local_name()const; - - static Handle create(ValueBase::Type type); - - static Handle create(const ValueBase& value, const Time& time); - - static Handle create(ValueNode::Handle value_node, const Time& time); - - int find(const Time& begin,const Time& end,std::vector& list); - - void insert_time(const Time& location, const Time& delta); - -protected: - ValueNode_Animated(); - - void set_type(ValueBase::Type t); - virtual void get_times_vfunc(Node::time_set &set) const; -public: - DCAST_HACK_ID(4); -}; - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_atan2.cpp b/synfig-core/trunk/src/synfig/valuenode_atan2.cpp deleted file mode 100644 index c4dd5e7..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_atan2.cpp +++ /dev/null @@ -1,180 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_atan2.cpp -** \brief Implementation of the "aTan2" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_atan2.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Atan2::ValueNode_Atan2(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - switch(value.get_type()) - { - case ValueBase::TYPE_ANGLE: - set_link("x",ValueNode_Const::create(Angle::cos(value.get(Angle())).get())); - set_link("y",ValueNode_Const::create(Angle::sin(value.get(Angle())).get())); - break; - default: - throw Exception::BadType(ValueBase::type_local_name(value.get_type())); - } - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_Atan2::create_new()const -{ - return new ValueNode_Atan2(get_type()); -} - -ValueNode_Atan2* -ValueNode_Atan2::create(const ValueBase &x) -{ - return new ValueNode_Atan2(x); -} - -ValueNode_Atan2::~ValueNode_Atan2() -{ - unlink_all(); -} - -ValueBase -ValueNode_Atan2::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - return Angle::tan((*y_)(t).get(Real()), - (*x_)(t).get(Real())); -} - - -String -ValueNode_Atan2::get_name()const -{ - return "atan2"; -} - -String -ValueNode_Atan2::get_local_name()const -{ - return _("aTan2"); -} - -bool -ValueNode_Atan2::check_type(ValueBase::Type type) -{ - return type==ValueBase::TYPE_ANGLE; -} - -bool -ValueNode_Atan2::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_Atan2(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Atan2* create(const ValueBase &x); -}; // END of class ValueNode_Atan2 - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_bline.cpp b/synfig-core/trunk/src/synfig/valuenode_bline.cpp deleted file mode 100644 index fc3e916..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_bline.cpp +++ /dev/null @@ -1,844 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_bline.cpp -** \brief Implementation of the "BLine" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_bline.h" -#include "valuenode_const.h" -#include "valuenode_composite.h" -#include "general.h" -#include "exception.h" -#include "blinepoint.h" -#include -#include -#include -#include -#include -#include "segment.h" -#include "curve_helper.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -#define EPSILON 0.0000001f - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -inline float -linear_interpolation(const float& a, const float& b, float c) -{ return (b-a)*c+a; } - -inline Vector -linear_interpolation(const Vector& a, const Vector& b, float c) -{ return (b-a)*c+a; } - -inline Vector -radial_interpolation(const Vector& a, const Vector& b, float c) -{ - // if either extreme is zero then use linear interpolation instead - if (a.is_equal_to(Vector::zero()) || b.is_equal_to(Vector::zero())) - return linear_interpolation(a, b, c); - - affine_combo mag_combo; - affine_combo ang_combo; - - Real mag(mag_combo(a.mag(),b.mag(),c)); - Angle angle_a(Angle::tan(a[1],a[0])); - Angle angle_b(Angle::tan(b[1],b[0])); - float diff = Angle::deg(angle_b - angle_a).get(); - if (diff < -180) angle_b += Angle::deg(360); - else if (diff > 180) angle_a += Angle::deg(360); - Angle ang(ang_combo(angle_a, angle_b, c)); - - return Point( mag*Angle::cos(ang).get(),mag*Angle::sin(ang).get() ); -} - -inline void -transform_coords(Vector in, Vector& out, const Point& coord_origin, const Point *coord_sys) -{ - in -= coord_origin; - out[0] = in * coord_sys[0]; - out[1] = in * coord_sys[1]; -} - -inline void -untransform_coords(const Vector& in, Vector& out, const Point& coord_origin, const Point *coord_sys) -{ - out[0] = in * coord_sys[0]; - out[1] = in * coord_sys[1]; - out += coord_origin; -} - -ValueBase -synfig::convert_bline_to_segment_list(const ValueBase& bline) -{ - std::vector ret; - -// std::vector list(bline.operator std::vector()); - //std::vector list(bline); - std::vector list(bline.get_list().begin(),bline.get_list().end()); - std::vector::const_iterator iter; - - BLinePoint prev,first; - - //start with prev = first and iter on the second... - - if(list.empty()) return ValueBase(ret,bline.get_loop()); - first = prev = list.front(); - - for(iter=++list.begin();iter!=list.end();++iter) - { - ret.push_back( - Segment( - prev.get_vertex(), - prev.get_tangent2(), - iter->get_vertex(), - iter->get_tangent1() - ) - ); - prev=*iter; - } - if(bline.get_loop()) - { - ret.push_back( - Segment( - prev.get_vertex(), - prev.get_tangent2(), - first.get_vertex(), - first.get_tangent1() - ) - ); - } - return ValueBase(ret,bline.get_loop()); -} - -ValueBase -synfig::convert_bline_to_width_list(const ValueBase& bline) -{ - std::vector ret; -// std::vector list(bline.operator std::vector()); - //std::vector list(bline); - std::vector list(bline.get_list().begin(),bline.get_list().end()); - std::vector::const_iterator iter; - - if(bline.empty()) - return ValueBase(ValueBase::TYPE_LIST); - - for(iter=list.begin();iter!=list.end();++iter) - ret.push_back(iter->get_width()); - - if(bline.get_loop()) - ret.push_back(list.front().get_width()); - - return ValueBase(ret,bline.get_loop()); -} - -Real -synfig::find_closest_point(const ValueBase &bline, const Point &pos, Real &radius, bool loop, Point *out_point) -{ - Real d,step; - float time = 0; - float best_time = 0; - int best_index = -1; - synfig::Point best_point; - - if(radius==0)radius=10000000; - Real closest(10000000); - - int i=0; - std::vector list(bline.get_list().begin(),bline.get_list().end()); - typedef std::vector::const_iterator iterT; - iterT iter, prev, first; - for(iter=list.begin(); iter!=list.end(); ++i, ++iter) - { - if( first == iterT() ) - first = iter; - - if( prev != iterT() ) - { - bezier curve; - - curve[0] = (*prev).get_vertex(); - curve[1] = curve[0] + (*prev).get_tangent2()/3; - curve[3] = (*iter).get_vertex(); - curve[2] = curve[3] - (*iter).get_tangent1()/3; - curve.sync(); - - #if 0 - // I don't know why this doesn't work - time=curve.find_closest(pos,6); - d=((curve(time)-pos).mag_squared()); - - #else - //set the step size based on the size of the picture - d = (curve[1] - curve[0]).mag() + (curve[2]-curve[1]).mag() + (curve[3]-curve[2]).mag(); - - step = d/(2*radius); //want to make the distance between lines happy - - step = max(step,0.01); //100 samples should be plenty - step = min(step,0.1); //10 is minimum - - d = find_closest(curve,pos,step,&closest,&time); - #endif - - if(d < closest) - { - closest = d; - best_time = time; - best_index = i; - best_point = curve(best_time); - } - - } - - prev = iter; - } - - // Loop if necessary - if( loop && ( first != iterT() ) && ( prev != iterT() ) ) - { - bezier curve; - - curve[0] = (*prev).get_vertex(); - curve[1] = curve[0] + (*prev).get_tangent2()/3; - curve[3] = (*first).get_vertex(); - curve[2] = curve[3] - (*first).get_tangent1()/3; - curve.sync(); - - #if 0 - // I don't know why this doesn't work - time=curve.find_closest(pos,6); - d=((curve(time)-pos).mag_squared()); - - #else - //set the step size based on the size of the picture - d = (curve[1] - curve[0]).mag() + (curve[2]-curve[1]).mag() + (curve[3]-curve[2]).mag(); - - step = d/(2*radius); //want to make the distance between lines happy - - step = max(step,0.01); //100 samples should be plenty - step = min(step,0.1); //10 is minimum - - d = find_closest(curve,pos,step,&closest,&time); - #endif - - if(d < closest) - { - closest = d; - best_time = time; - best_index = 0; - best_point = curve(best_time); - } - } - - if(best_index != -1) - { - if(out_point) - *out_point = best_point; - - int loop_adjust(loop ? 0 : -1); - int size = list.size(); - Real amount = (best_index + best_time + loop_adjust) / (size + loop_adjust); - return amount; - } - - return 0.0; - -} - -/* === M E T H O D S ======================================================= */ - - -ValueNode_BLine::ValueNode_BLine(): - ValueNode_DynamicList(ValueBase::TYPE_BLINEPOINT) -{ -} - -ValueNode_BLine::~ValueNode_BLine() -{ -} - -ValueNode_BLine* -ValueNode_BLine::create(const ValueBase &value) -{ - if(value.get_type()!=ValueBase::TYPE_LIST) - return 0; - - ValueNode_BLine* value_node(new ValueNode_BLine()); - - if(!value.empty()) - { - switch(value.get_contained_type()) - { - case ValueBase::TYPE_BLINEPOINT: - { -// std::vector bline_points(value.operator std::vector()); - //std::vector bline_points(value); - std::vector bline_points(value.get_list().begin(),value.get_list().end()); - std::vector::const_iterator iter; - - for(iter=bline_points.begin();iter!=bline_points.end();iter++) - { - value_node->add(ValueNode::Handle(ValueNode_Composite::create(*iter))); - } - value_node->set_loop(value.get_loop()); - } - break; - case ValueBase::TYPE_SEGMENT: - { - // Here, we want to convert a list of segments - // into a list of BLinePoints. We make an assumption - // that the segment list is continuous(sp), but not necessarily - // smooth. - - value_node->set_loop(false); -// std::vector segments(value.operator std::vector()); -// std::vector segments(value); - std::vector segments(value.get_list().begin(),value.get_list().end()); - std::vector::const_iterator iter,last(segments.end()); - --last; - ValueNode_Const::Handle prev,first; - - for(iter=segments.begin();iter!=segments.end();iter++) - { -#define PREV_POINT prev->get_value().get(BLinePoint()) -#define FIRST_POINT first->get_value().get(BLinePoint()) -#define CURR_POINT curr->get_value().get(BLinePoint()) - if(iter==segments.begin()) - { - prev=ValueNode_Const::create(ValueBase::TYPE_BLINEPOINT); - { - BLinePoint prev_point(PREV_POINT); - prev_point.set_vertex(iter->p1); - prev_point.set_tangent1(iter->t1); - prev_point.set_width(0.01); - prev_point.set_origin(0.5); - prev_point.set_split_tangent_flag(false); - prev->set_value(prev_point); - } - first=prev; - value_node->add(ValueNode::Handle(prev)); - - } - if(iter==last && iter->p2.is_equal_to(FIRST_POINT.get_vertex())) - { - value_node->set_loop(true); - if(!iter->t2.is_equal_to(FIRST_POINT.get_tangent1())) - { - BLinePoint first_point(FIRST_POINT); - first_point.set_tangent1(iter->t2); - first->set_value(first_point); - } - continue; - } - - ValueNode_Const::Handle curr; - curr=ValueNode_Const::create(ValueBase::TYPE_BLINEPOINT); - { - BLinePoint curr_point(CURR_POINT); - curr_point.set_vertex(iter->p2); - curr_point.set_tangent1(iter->t2); - curr_point.set_width(0.01); - curr_point.set_origin(0.5); - curr_point.set_split_tangent_flag(false); - curr->set_value(curr_point); - } - if(!PREV_POINT.get_tangent1().is_equal_to(iter->t1)) - { - BLinePoint prev_point(PREV_POINT); - prev_point.set_split_tangent_flag(true); - prev_point.set_tangent2(iter->t1); - prev->set_value(prev_point); - } - value_node->add(ValueNode::Handle(curr)); - prev=curr; - } - - } - break; - default: - // We got a list of who-knows-what. We don't have any idea - // what to do with it. - return 0; - break; - } - } - - return value_node; -} - -ValueNode_BLine::ListEntry -ValueNode_BLine::create_list_entry(int index, Time time, Real origin) -{ - ValueNode_BLine::ListEntry ret; - - synfig::BLinePoint prev,next; - - int prev_i,next_i; - - index=index%link_count(); - - assert(index>=0); - ret.index=index; - ret.set_parent_value_node(this); - - if(!list[index].status_at_time(time)) - next_i=find_next_valid_entry(index,time); - else - next_i=index; - prev_i=find_prev_valid_entry(index,time); - - //synfig::info("index=%d, next_i=%d, prev_i=%d",index,next_i,prev_i); - - next=(*list[next_i].value_node)(time); - prev=(*list[prev_i].value_node)(time); - - etl::hermite curve(prev.get_vertex(),next.get_vertex(),prev.get_tangent2(),next.get_tangent1()); - etl::derivative< etl::hermite > deriv(curve); - - synfig::BLinePoint bline_point; - bline_point.set_vertex(curve(origin)); - bline_point.set_width((next.get_width()-prev.get_width())*origin+prev.get_width()); - bline_point.set_tangent1(deriv(origin)*min(1.0-origin,origin)); - bline_point.set_tangent2(bline_point.get_tangent1()); - bline_point.set_split_tangent_flag(false); - bline_point.set_origin(origin); - - ret.value_node=ValueNode_Composite::create(bline_point); - - return ret; -} - -static int instance_count; - -ValueBase -ValueNode_BLine::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - std::vector ret_list; - - std::vector::const_iterator iter,first_iter; - bool first_flag(true); - bool rising; - int index(0); - float next_scale(1.0f); - - BLinePoint prev,first; - first.set_origin(100.0f); - - // loop through all the list's entries - for(iter=list.begin();iter!=list.end();++iter,index++) - { - // how 'on' is this vertex? - float amount(iter->amount_at_time(t,&rising)); - - assert(amount>=0.0f); - assert(amount<=1.0f); - - // it's fully on - if (amount > 1.0f - EPSILON) - { - if(first_flag) - { - first_iter=iter; - first=prev=(*iter->value_node)(t).get(prev); - first_flag=false; - ret_list.push_back(first); - continue; - } - - BLinePoint curr; - curr=(*iter->value_node)(t).get(prev); - - if(next_scale!=1.0f) - { - ret_list.back().set_split_tangent_flag(true); - ret_list.back().set_tangent2(prev.get_tangent2()*next_scale); - - ret_list.push_back(curr); - - ret_list.back().set_split_tangent_flag(true); - ret_list.back().set_tangent2(curr.get_tangent2()); - ret_list.back().set_tangent1(curr.get_tangent1()*next_scale); - - next_scale=1.0f; - } - else - { - ret_list.push_back(curr); - } - - prev=curr; - } - // it's partly on - else if(amount>0.0f) - { - std::vector::const_iterator begin_iter,end_iter; - - // This is where the interesting stuff happens - // We need to seek forward in the list to see what the next - // active point is - - BLinePoint blp_here_on; // the current vertex, when fully on - BLinePoint blp_here_off; // the current vertex, when fully off - BLinePoint blp_here_now; // the current vertex, right now (between on and off) - BLinePoint blp_prev_off; // the beginning of dynamic group when fully off - BLinePoint blp_next_off; // the end of the dynamic group when fully off - - int dist_from_begin(0), dist_from_end(0); - Time off_time, on_time; - - if(!rising) // if not rising, then we were fully on in the past, and will be fully off in the future - { - try{ on_time=iter->find_prev(t)->get_time(); } - catch(...) { on_time=Time::begin(); } - try{ off_time=iter->find_next(t)->get_time(); } - catch(...) { off_time=Time::end(); } - } - else // otherwise we were fully off in the past, and will be fully on in the future - { - try{ off_time=iter->find_prev(t)->get_time(); } - catch(...) { off_time=Time::begin(); } - try{ on_time=iter->find_next(t)->get_time(); } - catch(...) { on_time=Time::end(); } - } - - blp_here_on=(*iter->value_node)(on_time).get(blp_here_on); -// blp_here_on=(*iter->value_node)(t).get(blp_here_on); - - // Find "end" of dynamic group - ie. search forward along - // the bline from the current point until we find a point - // which is more 'on' than the current one - end_iter=iter; -// for(++end_iter;begin_iter!=list.end();++end_iter) - for(++end_iter;end_iter!=list.end();++end_iter) - if(end_iter->amount_at_time(t)>amount) - break; - - // If we did not find an end of the dynamic group... - // Writeme! at least now it doesn't crash if first_iter - // isn't set yet - if(end_iter==list.end()) - { - if(get_loop() && !first_flag) - end_iter=first_iter; - else - end_iter=--list.end(); - } - - blp_next_off=(*end_iter->value_node)(off_time).get(prev); - - // Find "begin" of dynamic group - begin_iter=iter; - blp_prev_off.set_origin(100.0f); // set the origin to 100 (which is crazy) so that we can check to see if it was found - do - { - if(begin_iter==list.begin()) - { - if(get_loop()) - begin_iter=list.end(); - else - break; - } - - --begin_iter; - dist_from_begin++; - - // if we've gone all around the loop, give up - if(begin_iter==iter) - break; - - if(begin_iter->amount_at_time(t)>amount) - { - blp_prev_off=(*begin_iter->value_node)(off_time).get(prev); - break; - } - }while(true); - - // If we did not find a begin - if(blp_prev_off.get_origin()==100.0f) - { - // Writeme! - this needs work, but at least now it - // doesn't crash - if(first_flag) - begin_iter=list.begin(); - else - begin_iter=first_iter; - blp_prev_off=(*begin_iter->value_node)(off_time).get(prev); - } - - // this is how the curve looks when we have completely vanished - etl::hermite curve(blp_prev_off.get_vertex(), blp_next_off.get_vertex(), - blp_prev_off.get_tangent2(), blp_next_off.get_tangent1()); - etl::derivative< etl::hermite > deriv(curve); - - // where would we be on this curve, how wide will we be, and - // where will our tangents point (all assuming that we hadn't vanished) - blp_here_off.set_vertex(curve(blp_here_on.get_origin())); - blp_here_off.set_width((blp_next_off.get_width()-blp_prev_off.get_width())*blp_here_on.get_origin()+blp_prev_off.get_width()); - blp_here_off.set_tangent1(deriv(blp_here_on.get_origin())); - blp_here_off.set_tangent2(deriv(blp_here_on.get_origin())); - - float prev_tangent_scalar(1.0f); - float next_tangent_scalar(1.0f); - - //synfig::info("index_%d:dist_from_begin=%d",index,dist_from_begin); - //synfig::info("index_%d:dist_from_end=%d",index,dist_from_end); - - // If we are the next to the begin - if(begin_iter==--std::vector::const_iterator(iter) || dist_from_begin==1) - prev_tangent_scalar=linear_interpolation(blp_here_on.get_origin(), 1.0f, amount); - else - prev_tangent_scalar=linear_interpolation(blp_here_on.get_origin()-prev.get_origin(), 1.0f, amount); - - // If we are the next to the end - if(end_iter==++std::vector::const_iterator(iter) || dist_from_end==1) - next_tangent_scalar=linear_interpolation(1.0-blp_here_on.get_origin(), 1.0f, amount); - else if(list.end()!=++std::vector::const_iterator(iter)) - { - BLinePoint next; - next=((*(++std::vector::const_iterator(iter))->value_node)(t).get(prev)); - next_tangent_scalar=linear_interpolation(next.get_origin()-blp_here_on.get_origin(), 1.0f, amount); - } - else - //! \todo this isn't quite right; we should handle looped blines identically no matter where the loop happens - //! and we currently don't. this at least makes it a lot better than it was before - next_tangent_scalar=linear_interpolation(blp_next_off.get_origin()-blp_here_on.get_origin(), 1.0f, amount); - next_scale=next_tangent_scalar; - - //blp_here_now.set_vertex(linear_interpolation(blp_here_off.get_vertex(), blp_here_on.get_vertex(), amount)); - // if(false) - // { - // // My first try - // Point ref_point_begin(((*begin_iter->value_node)(off_time).get(prev).get_vertex() + - // (*end_iter->value_node)(off_time).get(prev).get_vertex()) * 0.5); - // Point ref_point_end(((*begin_iter->value_node)(on_time).get(prev).get_vertex() + - // (*end_iter->value_node)(on_time).get(prev).get_vertex()) * 0.5); - // Point ref_point_now(((*begin_iter->value_node)(t).get(prev).get_vertex() + - // (*end_iter->value_node)(t).get(prev).get_vertex()) * 0.5); - // Point ref_point_linear(linear_interpolation(ref_point_begin, ref_point_end, amount)); - // - // blp_here_now.set_vertex(linear_interpolation(blp_here_off.get_vertex(), blp_here_on.get_vertex(), amount) + - // (ref_point_now-ref_point_linear)); - // blp_here_now.set_tangent1(linear_interpolation(blp_here_off.get_tangent1(), blp_here_on.get_tangent1(), amount)); - // blp_here_now.set_split_tangent_flag(blp_here_on.get_split_tangent_flag()); - // if(blp_here_now.get_split_tangent_flag()) - // blp_here_now.set_tangent2(linear_interpolation(blp_here_off.get_tangent2(), blp_here_on.get_tangent2(), amount)); - // } - // else - { - // My second try - - // define 3 coordinate systems: - Point off_coord_sys[2], off_coord_origin; // when the current vertex is completely off - Point on_coord_sys[2] , on_coord_origin; // when the current vertex is completely on - Point curr_coord_sys[2], curr_coord_origin; // the current state - somewhere in between - - // for each of the 3 systems, the origin is half way between the previous and next active point - // and the axes are based on a vector from the next active point to the previous - { - const Point end_pos_at_off_time(( *end_iter->value_node)(off_time).get(prev).get_vertex()); - const Point begin_pos_at_off_time((*begin_iter->value_node)(off_time).get(prev).get_vertex()); - off_coord_origin=(begin_pos_at_off_time + end_pos_at_off_time)/2; - off_coord_sys[0]=(begin_pos_at_off_time - end_pos_at_off_time).norm(); - off_coord_sys[1]=off_coord_sys[0].perp(); - - const Point end_pos_at_on_time(( *end_iter->value_node)(on_time).get(prev).get_vertex()); - const Point begin_pos_at_on_time((*begin_iter->value_node)(on_time).get(prev).get_vertex()); - on_coord_origin=(begin_pos_at_on_time + end_pos_at_on_time)/2; - on_coord_sys[0]=(begin_pos_at_on_time - end_pos_at_on_time).norm(); - on_coord_sys[1]=on_coord_sys[0].perp(); - - const Point end_pos_at_current_time(( *end_iter->value_node)(t).get(prev).get_vertex()); - const Point begin_pos_at_current_time((*begin_iter->value_node)(t).get(prev).get_vertex()); - curr_coord_origin=(begin_pos_at_current_time + end_pos_at_current_time)/2; - curr_coord_sys[0]=(begin_pos_at_current_time - end_pos_at_current_time).norm(); - curr_coord_sys[1]=curr_coord_sys[0].perp(); - - // Invert (transpose) the last of these matrices, since we use it for transform back - swap(curr_coord_sys[0][1],curr_coord_sys[1][0]); - } - - /* The code that was here before used just end_iter as the origin, rather than the mid-point */ - - // We know our location and tangent(s) when fully on and fully off - // Transform each of these into their corresponding coordinate system - Point trans_on_point, trans_off_point; - Vector trans_on_t1, trans_on_t2, trans_off_t1, trans_off_t2; - - transform_coords(blp_here_on.get_vertex(), trans_on_point, on_coord_origin, on_coord_sys); - transform_coords(blp_here_off.get_vertex(), trans_off_point, off_coord_origin, off_coord_sys); - -#define COORD_SYS_RADIAL_TAN_INTERP 1 - -#ifdef COORD_SYS_RADIAL_TAN_INTERP - transform_coords(blp_here_on.get_tangent1(), trans_on_t1, Point::zero(), on_coord_sys); - transform_coords(blp_here_off.get_tangent1(), trans_off_t1, Point::zero(), off_coord_sys); - - if(blp_here_on.get_split_tangent_flag()) - { - transform_coords(blp_here_on.get_tangent2(), trans_on_t2, Point::zero(), on_coord_sys); - transform_coords(blp_here_off.get_tangent2(), trans_off_t2, Point::zero(), off_coord_sys); - } -#endif - - { - // Interpolate between the 'on' point and the 'off' point and untransform to get our point's location - Point tmp; - untransform_coords(linear_interpolation(trans_off_point, trans_on_point, amount), - tmp, curr_coord_origin, curr_coord_sys); - blp_here_now.set_vertex(tmp); - } - -#define INTERP_FUNCTION radial_interpolation -//#define INTERP_FUNCTION linear_interpolation - -#ifdef COORD_SYS_RADIAL_TAN_INTERP - { - Vector tmp; - untransform_coords(INTERP_FUNCTION(trans_off_t1,trans_on_t1,amount), tmp, Point::zero(), curr_coord_sys); - blp_here_now.set_tangent1(tmp); - } -#else - blp_here_now.set_tangent1(radial_interpolation(blp_here_off.get_tangent1(),blp_here_on.get_tangent1(),amount)); -#endif - - if (blp_here_on.get_split_tangent_flag()) - { - blp_here_now.set_split_tangent_flag(true); -#ifdef COORD_SYS_RADIAL_TAN_INTERP - { - Vector tmp; - untransform_coords(INTERP_FUNCTION(trans_off_t2,trans_on_t2,amount), tmp, Point::zero(), curr_coord_sys); - blp_here_now.set_tangent2(tmp); - } -#else - blp_here_now.set_tangent2(radial_interpolation(blp_here_off.get_tangent2(),blp_here_on.get_tangent2(),amount)); -#endif - } - else - blp_here_now.set_split_tangent_flag(false); - } - - blp_here_now.set_origin(blp_here_on.get_origin()); - blp_here_now.set_width(linear_interpolation(blp_here_off.get_width(), blp_here_on.get_width(), amount)); - - // Handle the case where we are the first vertex - if(first_flag) - { - blp_here_now.set_tangent1(blp_here_now.get_tangent1()*prev_tangent_scalar); - first_iter=iter; - first=prev=blp_here_now; - first_flag=false; - ret_list.push_back(blp_here_now); - continue; - } - - ret_list.back().set_split_tangent_flag(true); - ret_list.back().set_tangent2(prev.get_tangent2()*prev_tangent_scalar); - ret_list.push_back(blp_here_now); - ret_list.back().set_split_tangent_flag(true); - //ret_list.back().set_tangent2(blp_here_now.get_tangent1()); - ret_list.back().set_tangent1(blp_here_now.get_tangent1()*prev_tangent_scalar); - - prev=blp_here_now; - } - } - - if(next_scale!=1.0f) - { - ret_list.back().set_split_tangent_flag(true); - ret_list.back().set_tangent2(prev.get_tangent2()*next_scale); - } - -/* - if(get_loop() && !first_flag) - { - ret_list.push_back( - Segment( - prev.get_vertex(), - prev.get_tangent2(), - first.get_vertex(), - first.get_tangent1() - ) - ); - } -*/ - - if(list.empty()) - synfig::warning(string("ValueNode_BLine::operator()():")+_("No entries in list")); - else - if(ret_list.empty()) - synfig::warning(string("ValueNode_BLine::operator()():")+_("No entries in ret_list")); - - return ValueBase(ret_list,get_loop()); -} - -String -ValueNode_BLine::link_local_name(int i)const -{ - assert(i>=0 && (unsigned)i -#include - -#include "valuenode.h" -#include "time.h" -#include "uniqueid.h" -#include "blinepoint.h" -#include "valuenode_dynamiclist.h" - -/* === M A C R O S ========================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - - -//! Converts a list of bline points into a list of segments -ValueBase convert_bline_to_segment_list(const ValueBase &bline); - -//! Converts a list of bline points into a list of widths -ValueBase convert_bline_to_width_list(const ValueBase &bline); - -//! Finds the closest point to pos in bline -Real find_closest_point(const ValueBase &bline, const Point &pos, Real &radius, bool loop, Point *out_point = 0); - -/*! \class ValueNode_BLine -** \brief \writeme -*/ -class ValueNode_BLine : public ValueNode_DynamicList -{ -public: - - typedef etl::handle Handle; - typedef etl::handle ConstHandle; - - - ValueNode_BLine(); - -public: - - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_BLine(); - - virtual String link_local_name(int i)const; - - virtual String get_name()const; - virtual String get_local_name()const; - - virtual ListEntry create_list_entry(int index, Time time=0, Real origin=0.5); - -protected: - - LinkableValueNode* create_new()const; - -public: - //using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_BLine* create(const ValueBase &x=ValueBase::TYPE_LIST); -}; // END of class ValueNode_BLine - -typedef ValueNode_BLine::ListEntry::ActivepointList ActivepointList; - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_blinecalctangent.cpp b/synfig-core/trunk/src/synfig/valuenode_blinecalctangent.cpp deleted file mode 100644 index 3a3c2cc..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_blinecalctangent.cpp +++ /dev/null @@ -1,271 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_blinecalctangent.cpp -** \brief Implementation of the "BLine Tangent" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_blinecalctangent.h" -#include "valuenode_bline.h" -#include "valuenode_const.h" -#include "valuenode_composite.h" -#include "general.h" -#include "exception.h" -#include -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_BLineCalcTangent::ValueNode_BLineCalcTangent(const ValueBase::Type &x): - LinkableValueNode(x) -{ - if(x!=ValueBase::TYPE_ANGLE && x!=ValueBase::TYPE_REAL && x!=ValueBase::TYPE_VECTOR) - throw Exception::BadType(ValueBase::type_local_name(x)); - - ValueNode_BLine* value_node(new ValueNode_BLine()); - set_link("bline",value_node); - set_link("loop",ValueNode_Const::create(bool(false))); - set_link("amount",ValueNode_Const::create(Real(0.5))); - set_link("offset",ValueNode_Const::create(Angle::deg(0))); - set_link("scale",ValueNode_Const::create(Real(1.0))); - set_link("fixed_length",ValueNode_Const::create(bool(false))); -} - -LinkableValueNode* -ValueNode_BLineCalcTangent::create_new()const -{ - return new ValueNode_BLineCalcTangent(get_type()); -} - -ValueNode_BLineCalcTangent* -ValueNode_BLineCalcTangent::create(const ValueBase &x) -{ - return new ValueNode_BLineCalcTangent(x.get_type()); -} - -ValueNode_BLineCalcTangent::~ValueNode_BLineCalcTangent() -{ - unlink_all(); -} - -ValueBase -ValueNode_BLineCalcTangent::operator()(Time t, Real amount)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - const std::vector bline((*bline_)(t).get_list()); - handle bline_value_node(bline_); - const bool looped(bline_value_node->get_loop()); - int size = bline.size(), from_vertex; - bool loop((*loop_)(t).get(bool())); - Angle offset((*offset_)(t).get(Angle())); - Real scale((*scale_)(t).get(Real())); - bool fixed_length((*fixed_length_)(t).get(bool())); - BLinePoint blinepoint0, blinepoint1; - - if (!looped) size--; - if (size < 1) - switch (get_type()) - { - case ValueBase::TYPE_ANGLE: return Angle(); - case ValueBase::TYPE_REAL: return Real(); - case ValueBase::TYPE_VECTOR: return Vector(); - default: assert(0); return ValueBase(); - } - if (loop) - { - amount = amount - int(amount); - if (amount < 0) amount++; - } - else - { - if (amount < 0) amount = 0; - if (amount > 1) amount = 1; - } - - vector::const_iterator iter, next(bline.begin()); - - iter = looped ? --bline.end() : next++; - amount = amount * size; - from_vertex = int(amount); - if (from_vertex > size-1) from_vertex = size-1; - blinepoint0 = from_vertex ? *(next+from_vertex-1) : *iter; - blinepoint1 = *(next+from_vertex); - - etl::hermite curve(blinepoint0.get_vertex(), blinepoint1.get_vertex(), - blinepoint0.get_tangent2(), blinepoint1.get_tangent1()); - etl::derivative< etl::hermite > deriv(curve); - - switch (get_type()) - { - case ValueBase::TYPE_ANGLE: return deriv(amount-from_vertex).angle() + offset; - case ValueBase::TYPE_REAL: - { - if (fixed_length) return scale; - return deriv(amount-from_vertex).mag() * scale; - } - case ValueBase::TYPE_VECTOR: - { - Vector tangent(deriv(amount-from_vertex)); - Angle angle(tangent.angle() + offset); - Real mag = fixed_length ? scale : (tangent.mag() * scale); - return Vector(Angle::cos(angle).get()*mag, - Angle::sin(angle).get()*mag); - } - default: assert(0); return ValueBase(); - } -} - -ValueBase -ValueNode_BLineCalcTangent::operator()(Time t)const -{ - Real amount((*amount_)(t).get(Real())); - return (*this)(t, amount); -} - -String -ValueNode_BLineCalcTangent::get_name()const -{ - return "blinecalctangent"; -} - -String -ValueNode_BLineCalcTangent::get_local_name()const -{ - return _("BLine Tangent"); -} - -bool -ValueNode_BLineCalcTangent::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - virtual ValueBase operator()(Time t, Real amount)const; - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_BLineCalcTangent(); - - virtual String get_name()const; - virtual String get_local_name()const; - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - LinkableValueNode* create_new()const; - -public: - using synfig::LinkableValueNode::get_link_vfunc; - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_BLineCalcTangent* create(const ValueBase &x=ValueBase::TYPE_VECTOR); -}; // END of class ValueNode_BLineCalcTangent - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_blinecalcvertex.cpp b/synfig-core/trunk/src/synfig/valuenode_blinecalcvertex.cpp deleted file mode 100644 index a6fc589..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_blinecalcvertex.cpp +++ /dev/null @@ -1,222 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_blinecalcvertex.cpp -** \brief Implementation of the "BLine Vertex" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_blinecalcvertex.h" -#include "valuenode_bline.h" -#include "valuenode_const.h" -#include "valuenode_composite.h" -#include "general.h" -#include "exception.h" -#include - -#endif - - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_BLineCalcVertex::ValueNode_BLineCalcVertex(const ValueBase::Type &x): - LinkableValueNode(x) -{ - if(x!=ValueBase::TYPE_VECTOR) - throw Exception::BadType(ValueBase::type_local_name(x)); - - ValueNode_BLine* value_node(new ValueNode_BLine()); - set_link("bline",value_node); - set_link("loop",ValueNode_Const::create(bool(false))); - set_link("amount",ValueNode_Const::create(Real(0.5))); -} - -LinkableValueNode* -ValueNode_BLineCalcVertex::create_new()const -{ - return new ValueNode_BLineCalcVertex(ValueBase::TYPE_VECTOR); -} - -ValueNode_BLineCalcVertex* -ValueNode_BLineCalcVertex::create(const ValueBase &x) -{ - return new ValueNode_BLineCalcVertex(x.get_type()); -} - -ValueNode_BLineCalcVertex::~ValueNode_BLineCalcVertex() -{ - unlink_all(); -} - -ValueBase -ValueNode_BLineCalcVertex::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - const std::vector bline((*bline_)(t).get_list()); - handle bline_value_node(bline_); - const bool looped(bline_value_node->get_loop()); - int size = bline.size(), from_vertex; - bool loop((*loop_)(t).get(bool())); - Real amount((*amount_)(t).get(Real())); - BLinePoint blinepoint0, blinepoint1; - - if (!looped) size--; - if (size < 1) return Vector(); - if (loop) - { - amount = amount - int(amount); - if (amount < 0) amount++; - } - else - { - if (amount < 0) amount = 0; - if (amount > 1) amount = 1; - } - - vector::const_iterator iter, next(bline.begin()); - - iter = looped ? --bline.end() : next++; - amount = amount * size; - from_vertex = int(amount); - if (from_vertex > size-1) from_vertex = size-1; - blinepoint0 = from_vertex ? *(next+from_vertex-1) : *iter; - blinepoint1 = *(next+from_vertex); - - etl::hermite curve(blinepoint0.get_vertex(), blinepoint1.get_vertex(), - blinepoint0.get_tangent2(), blinepoint1.get_tangent1()); - return curve(amount-from_vertex); -} - - - - - - - -String -ValueNode_BLineCalcVertex::get_name()const -{ - return "blinecalcvertex"; -} - -String -ValueNode_BLineCalcVertex::get_local_name()const -{ - return _("BLine Vertex"); -} - -bool -ValueNode_BLineCalcVertex::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_BLineCalcVertex(); - - virtual String get_name()const; - virtual String get_local_name()const; - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_BLineCalcVertex* create(const ValueBase &x=ValueBase::TYPE_VECTOR); -}; // END of class ValueNode_BLineCalcVertex - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_blinecalcwidth.cpp b/synfig-core/trunk/src/synfig/valuenode_blinecalcwidth.cpp deleted file mode 100644 index 4d8ee0e..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_blinecalcwidth.cpp +++ /dev/null @@ -1,230 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_blinecalcwidth.cpp -** \brief Implementation of the "BLine Width" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_blinecalcwidth.h" -#include "valuenode_bline.h" -#include "valuenode_const.h" -#include "valuenode_composite.h" -#include "general.h" -#include "exception.h" -#include - -#endif - - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_BLineCalcWidth::ValueNode_BLineCalcWidth(const ValueBase::Type &x): - LinkableValueNode(x) -{ - if(x!=ValueBase::TYPE_REAL) - throw Exception::BadType(ValueBase::type_local_name(x)); - - ValueNode_BLine* value_node(new ValueNode_BLine()); - set_link("bline",value_node); - set_link("loop",ValueNode_Const::create(bool(false))); - set_link("amount",ValueNode_Const::create(Real(0.5))); - set_link("scale",ValueNode_Const::create(Real(1.0))); -} - -LinkableValueNode* -ValueNode_BLineCalcWidth::create_new()const -{ - return new ValueNode_BLineCalcWidth(ValueBase::TYPE_REAL); -} - -ValueNode_BLineCalcWidth* -ValueNode_BLineCalcWidth::create(const ValueBase &x) -{ - return new ValueNode_BLineCalcWidth(x.get_type()); -} - -ValueNode_BLineCalcWidth::~ValueNode_BLineCalcWidth() -{ - unlink_all(); -} - -ValueBase -ValueNode_BLineCalcWidth::operator()(Time t, Real amount)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - const std::vector bline((*bline_)(t).get_list()); - handle bline_value_node(bline_); - const bool looped(bline_value_node->get_loop()); - int size = bline.size(), from_vertex; - bool loop((*loop_)(t).get(bool())); - Real scale((*scale_)(t).get(Real())); - BLinePoint blinepoint0, blinepoint1; - - if (!looped) size--; - if (size < 1) return Real(); - if (loop) - { - amount = amount - int(amount); - if (amount < 0) amount++; - } - else - { - if (amount < 0) amount = 0; - if (amount > 1) amount = 1; - } - - vector::const_iterator iter, next(bline.begin()); - - iter = looped ? --bline.end() : next++; - amount = amount * size; - from_vertex = int(amount); - if (from_vertex > size-1) from_vertex = size-1; - blinepoint0 = from_vertex ? *(next+from_vertex-1) : *iter; - blinepoint1 = *(next+from_vertex); - - float width0 = blinepoint0.get_width(); - float width1 = blinepoint1.get_width(); - - return Real((width0 + (amount-from_vertex) * (width1-width0)) * scale); -} - -ValueBase -ValueNode_BLineCalcWidth::operator()(Time t)const -{ - Real amount((*amount_)(t).get(Real())); - return (*this)(t, amount); -} - -String -ValueNode_BLineCalcWidth::get_name()const -{ - return "blinecalcwidth"; -} - -String -ValueNode_BLineCalcWidth::get_local_name()const -{ - return _("BLine Width"); -} - -bool -ValueNode_BLineCalcWidth::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - virtual ValueBase operator()(Time t, Real amount)const; - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_BLineCalcWidth(); - - virtual String get_name()const; - virtual String get_local_name()const; - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_BLineCalcWidth* create(const ValueBase &x=ValueBase::TYPE_REAL); -}; // END of class ValueNode_BLineCalcWidth - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_blinereversetangent.cpp b/synfig-core/trunk/src/synfig/valuenode_blinereversetangent.cpp deleted file mode 100644 index ed2928b..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_blinereversetangent.cpp +++ /dev/null @@ -1,202 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_blinereversetangent.cpp -** \brief Implementation of the "Reverse Tangent" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_blinereversetangent.h" -#include "valuenode_bline.h" -#include "valuenode_const.h" -#include "valuenode_composite.h" -#include "general.h" -#include "exception.h" -#include -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_BLineRevTangent::ValueNode_BLineRevTangent(const ValueBase::Type &x): - LinkableValueNode(x) -{ -} - -ValueNode_BLineRevTangent::ValueNode_BLineRevTangent(const ValueNode::Handle &x): - LinkableValueNode(x->get_type()) -{ - if(x->get_type()!=ValueBase::TYPE_BLINEPOINT) - throw Exception::BadType(ValueBase::type_local_name(x->get_type())); - - set_link("reference",x); - set_link("reverse",ValueNode_Const::create(bool(false))); -} - -ValueNode_BLineRevTangent* -ValueNode_BLineRevTangent::create(const ValueBase &x) -{ - return new ValueNode_BLineRevTangent(ValueNode_Const::create(x)); -} - -LinkableValueNode* -ValueNode_BLineRevTangent::create_new()const -{ - return new ValueNode_BLineRevTangent(get_type()); -} - -ValueNode_BLineRevTangent::~ValueNode_BLineRevTangent() -{ - unlink_all(); -} - -ValueBase -ValueNode_BLineRevTangent::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - if ((*reverse_)(t).get(bool())) - { - BLinePoint reference((*reference_)(t)); - BLinePoint ret(reference); - if(ret.get_split_tangent_flag()) - { - ret.set_tangent1(-reference.get_tangent2()); - ret.set_tangent2(-reference.get_tangent1()); - } - else - { - // \todo what should we do here really? - // it seems that there's some pre-existing bug - // with the 'reference' convert, too - referencing - // a non-split blinepoint causes some problems - ret.set_tangent1(-reference.get_tangent1()); - } - return ret; - } - else - return (*reference_)(t); -} - -String -ValueNode_BLineRevTangent::get_name()const -{ - return "blinerevtangent"; -} - -String -ValueNode_BLineRevTangent::get_local_name()const -{ - return _("Reverse Tangent"); -} - -bool -ValueNode_BLineRevTangent::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_BLineRevTangent(); - - virtual String get_name()const; - virtual String get_local_name()const; - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - LinkableValueNode* create_new()const; - -public: - using synfig::LinkableValueNode::get_link_vfunc; - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_BLineRevTangent* create(const ValueBase &x=ValueBase::TYPE_VECTOR); -}; // END of class ValueNode_BLineRevTangent - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_compare.cpp b/synfig-core/trunk/src/synfig/valuenode_compare.cpp deleted file mode 100644 index 68c3427..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_compare.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_compare.cpp -** \brief Implementation of the "Compare" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** Copyright (c) 2009 Nikita Kitaev -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_compare.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Compare::ValueNode_Compare(const ValueBase &x): - LinkableValueNode(x.get_type()) -{ - bool value(x.get(bool())); - - set_link("lhs", ValueNode_Const::create(Real(0))); - set_link("rhs", ValueNode_Const::create(Real(0))); - set_link("greater", ValueNode_Const::create(bool(false))); - if (value) - set_link("equal",ValueNode_Const::create(bool(true))); - else - set_link("equal",ValueNode_Const::create(bool(false))); - set_link("less", ValueNode_Const::create(bool(false))); -} - -ValueNode_Compare* -ValueNode_Compare::create(const ValueBase &x) -{ - return new ValueNode_Compare(x); -} - -LinkableValueNode* -ValueNode_Compare::create_new()const -{ - return new ValueNode_Compare(get_type()); -} - -ValueNode_Compare::~ValueNode_Compare() -{ - unlink_all(); -} - -bool -ValueNode_Compare::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i rhs) - return true; - if (equal && lhs == rhs) - return true; - if (less && lhs < rhs) - return true; - - return false; -} - -String -ValueNode_Compare::get_name()const -{ - return "compare"; -} - -String -ValueNode_Compare::get_local_name()const -{ - return _("Compare"); -} - -bool -ValueNode_Compare::check_type(ValueBase::Type type) -{ - return type==ValueBase::TYPE_BOOL; -} diff --git a/synfig-core/trunk/src/synfig/valuenode_compare.h b/synfig-core/trunk/src/synfig/valuenode_compare.h deleted file mode 100644 index da156de..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_compare.h +++ /dev/null @@ -1,85 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_compare.h -** \brief Header file for implementation of the "Compare" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** Copyright (c) 2009 Nikita Kitaev -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_VALUENODE_COMPARE_H -#define __SYNFIG_VALUENODE_COMPARE_H - -/* === H E A D E R S ======================================================= */ - -#include "valuenode.h" - -/* === M A C R O S ========================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class ValueNode_Compare : public LinkableValueNode -{ - ValueNode::RHandle lhs_; - ValueNode::RHandle rhs_; - ValueNode::RHandle greater_; - ValueNode::RHandle equal_; - ValueNode::RHandle less_; - -public: - typedef etl::handle Handle; - typedef etl::handle ConstHandle; - - ValueNode_Compare(const ValueBase &x); - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_Compare(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Compare* create(const ValueBase &x); -}; // END of class ValueNode_Compare - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_composite.cpp b/synfig-core/trunk/src/synfig/valuenode_composite.cpp deleted file mode 100644 index 7e18ea0..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_composite.cpp +++ /dev/null @@ -1,445 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_composite.cpp -** \brief Implementation of the "Composite" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_composite.h" -#include "valuenode_const.h" -#include -#include "general.h" -#include "valuenode_radialcomposite.h" -#include "vector.h" -#include "color.h" -#include "segment.h" -#include "savecanvas.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -synfig::ValueNode_Composite::ValueNode_Composite(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - switch(get_type()) - { - case ValueBase::TYPE_VECTOR: - set_link("x",ValueNode_Const::create(value.get(Vector())[0])); - set_link("y",ValueNode_Const::create(value.get(Vector())[1])); - break; - case ValueBase::TYPE_COLOR: - set_link("r",ValueNode_Const::create(value.get(Color()).get_r())); - set_link("g",ValueNode_Const::create(value.get(Color()).get_g())); - set_link("b",ValueNode_Const::create(value.get(Color()).get_b())); - set_link("a",ValueNode_Const::create(value.get(Color()).get_a())); - break; - case ValueBase::TYPE_SEGMENT: - set_link("p1",ValueNode_Const::create(value.get(Segment()).p1)); - set_link("t1",ValueNode_Const::create(value.get(Segment()).t1)); - set_link("p2",ValueNode_Const::create(value.get(Segment()).p2)); - set_link("t2",ValueNode_Const::create(value.get(Segment()).t2)); - break; - case ValueBase::TYPE_BLINEPOINT: - { - BLinePoint bline_point(value); - set_link(0,ValueNode_Const::create(bline_point.get_vertex())); - set_link(1,ValueNode_Const::create(bline_point.get_width())); - set_link(2,ValueNode_Const::create(bline_point.get_origin())); - set_link(3,ValueNode_Const::create(bline_point.get_split_tangent_flag())); - set_link(4,ValueNode_RadialComposite::create(bline_point.get_tangent1())); - set_link(5,ValueNode_RadialComposite::create(bline_point.get_tangent2())); - break; - } - default: - assert(0); - throw Exception::BadType(ValueBase::type_local_name(get_type())); - } -} - -ValueNode_Composite::~ValueNode_Composite() -{ - unlink_all(); -} - -ValueNode_Composite* -ValueNode_Composite::create(const ValueBase &value) -{ - return new ValueNode_Composite(value); -} - -LinkableValueNode* -ValueNode_Composite::create_new()const -{ - return new ValueNode_Composite(ValueBase(get_type())); -} - -ValueBase -synfig::ValueNode_Composite::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - switch(get_type()) - { - case ValueBase::TYPE_VECTOR: - { - Vector vect; - assert(components[0] && components[1]); - vect[0]=(*components[0])(t).get(Vector::value_type()); - vect[1]=(*components[1])(t).get(Vector::value_type()); - return vect; - } - case ValueBase::TYPE_COLOR: - { - Color color; - assert(components[0] && components[1] && components[2] && components[3]); - color.set_r((*components[0])(t).get(Vector::value_type())); - color.set_g((*components[1])(t).get(Vector::value_type())); - color.set_b((*components[2])(t).get(Vector::value_type())); - color.set_a((*components[3])(t).get(Vector::value_type())); - return color; - } - case ValueBase::TYPE_SEGMENT: - { - Segment seg; - assert(components[0] && components[1] && components[2] && components[3]); - seg.p1=(*components[0])(t).get(Point()); - seg.t1=(*components[1])(t).get(Vector()); - seg.p2=(*components[2])(t).get(Point()); - seg.t2=(*components[3])(t).get(Vector()); - return seg; - } - case ValueBase::TYPE_BLINEPOINT: - { - BLinePoint ret; - assert(components[0] && components[1] && components[2] && components[3] && components[4] && components[5]); - ret.set_vertex((*components[0])(t).get(Point())); - ret.set_width((*components[1])(t).get(Real())); - ret.set_origin((*components[2])(t).get(Real())); - ret.set_split_tangent_flag((*components[3])(t).get(bool())); - ret.set_tangent1((*components[4])(t).get(Vector())); - if(ret.get_split_tangent_flag()) - ret.set_tangent2((*components[5])(t).get(Vector())); - return ret; - } - default: - synfig::error(string("ValueNode_Composite::operator():")+_("Bad type for composite")); - assert(components[0]); - return (*components[0])(t); - } -} - -int -ValueNode_Composite::link_count()const -{ - switch(get_type()) - { - case ValueBase::TYPE_VECTOR: - return 2; - case ValueBase::TYPE_COLOR: - return 4; - case ValueBase::TYPE_SEGMENT: - return 4; - case ValueBase::TYPE_BLINEPOINT: - return 6; - default: - synfig::warning(string("ValueNode_Composite::component_count():")+_("Bad type for composite")); - return 1; - } -} - -bool -ValueNode_Composite::set_link_vfunc(int i,ValueNode::Handle x) -{ - assert(i>=0 && iget_type()==ValueBase(Real()).get_type() || PlaceholderValueNode::Handle::cast_dynamic(x)) - { - components[i]=x; - return true; - } - break; - - case ValueBase::TYPE_COLOR: - if(x->get_type()==ValueBase(Real()).get_type() || PlaceholderValueNode::Handle::cast_dynamic(x)) - { - components[i]=x; - return true; - } - break; - - case ValueBase::TYPE_SEGMENT: - if(x->get_type()==ValueBase(Point()).get_type() || PlaceholderValueNode::Handle::cast_dynamic(x)) - { - components[i]=x; - return true; - } - break; - - case ValueBase::TYPE_BLINEPOINT: - if((i==0 || i==4 || i==5) && x->get_type()==ValueBase(Point()).get_type()) - { - components[i]=x; - return true; - } - if((i==1 || i==2) && x->get_type()==ValueBase(Real()).get_type()) - { - components[i]=x; - return true; - } - if(i==3 && x->get_type()==ValueBase(bool()).get_type()) - { - components[i]=x; - return true; - } - break; - - default: - break; - } - return false; -} - -ValueNode::LooseHandle -ValueNode_Composite::get_link_vfunc(int i)const -{ - assert(i>=0 && i=0 && i=0 && i= 0 && name[1]-'1' < link_count()) - return name[1]-'1'; - - switch(get_type()) - { - case ValueBase::TYPE_COLOR: - if(name[0]=='r') - return 0; - if(name[0]=='g') - return 1; - if(name[0]=='b') - return 2; - if(name[0]=='a') - return 3; - case ValueBase::TYPE_SEGMENT: - if(name=="p1") - return 0; - if(name=="t1") - return 1; - if(name=="p2") - return 2; - if(name=="t2") - return 3; - case ValueBase::TYPE_VECTOR: - if(name[0]=='x') - return 0; - if(name[0]=='y') - return 1; - if(name[0]=='z') // \todo "z"? really? - return 2; - case ValueBase::TYPE_BLINEPOINT: - if(name[0]=='p' || name=="v1" || name=="p1") - return 0; - if(name=="w" || name=="width") - return 1; - if(name=="o" || name=="origin") - return 2; - if(name=="split") - return 3; - if(name=="t1") - return 4; - if(name=="t2") - return 5; - default: - break; - } - - throw Exception::BadLinkName(name); -} - -String -ValueNode_Composite::get_name()const -{ - return "composite"; -} - -String -ValueNode_Composite::get_local_name()const -{ - return _("Composite"); -} - -bool -ValueNode_Composite::check_type(ValueBase::Type type) -{ - return - type==ValueBase::TYPE_SEGMENT || - type==ValueBase::TYPE_VECTOR || - type==ValueBase::TYPE_COLOR || - type==ValueBase::TYPE_BLINEPOINT; -} diff --git a/synfig-core/trunk/src/synfig/valuenode_composite.h b/synfig-core/trunk/src/synfig/valuenode_composite.h deleted file mode 100644 index 6da5b2c..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_composite.h +++ /dev/null @@ -1,77 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_composite.h -** \brief Header file for implementation of the "Composite" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_VALUENODE_COMPOSITE_H -#define __SYNFIG_VALUENODE_COMPOSITE_H - -/* === H E A D E R S ======================================================= */ - -#include "valuenode.h" - -/* === M A C R O S ========================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class ValueNode_Composite : public LinkableValueNode -{ - ValueNode::RHandle components[6]; - ValueNode_Composite(const ValueBase &value); - -public: - typedef etl::handle Handle; - typedef etl::handle ConstHandle; - - - ~ValueNode_Composite(); - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - virtual String link_local_name(int i)const; - virtual ValueBase operator()(Time t)const; - - - virtual String get_name()const; - virtual String get_local_name()const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - - LinkableValueNode* create_new()const; - -public: - using synfig::LinkableValueNode::set_link_vfunc; - using synfig::LinkableValueNode::get_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Composite* create(const ValueBase &x); -}; // END of class ValueNode_Composite - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_const.cpp b/synfig-core/trunk/src/synfig/valuenode_const.cpp deleted file mode 100644 index dcf3d41..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_const.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_const.cpp -** \brief Implementation of the "Constant" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Const::ValueNode_Const() -{ - DCAST_HACK_ENABLE(); -} - - -ValueNode_Const::ValueNode_Const(const ValueBase &x): - ValueNode (x.get_type()), - value (x) -{ - DCAST_HACK_ENABLE(); -} - - -ValueNode_Const* -ValueNode_Const::create(const ValueBase &x) -{ - return new ValueNode_Const(x); -} - - -ValueNode* -ValueNode_Const::clone(const GUID& deriv_guid)const -{ - { ValueNode* x(find_value_node(get_guid()^deriv_guid).get()); if(x)return x; } - ValueNode* ret(new ValueNode_Const(value)); - ret->set_guid(get_guid()^deriv_guid); - return ret; -} - - -ValueNode_Const::~ValueNode_Const() -{ -} - - -ValueBase -ValueNode_Const::operator()(Time /*t*/)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - return value; -} - - -const ValueBase & -ValueNode_Const::get_value()const -{ - return value; -} - -ValueBase & -ValueNode_Const::get_value() -{ - return value; -} - -void -ValueNode_Const::set_value(const ValueBase &data) -{ - if(data!=value) - { - value=data; - changed(); - } -} - - -String -ValueNode_Const::get_name()const -{ - return "constant"; -} - -String -ValueNode_Const::get_local_name()const -{ - return _("Constant"); -} - -void ValueNode_Const::get_times_vfunc(Node::time_set &/*set*/) const -{ -} diff --git a/synfig-core/trunk/src/synfig/valuenode_const.h b/synfig-core/trunk/src/synfig/valuenode_const.h deleted file mode 100644 index 08a4559..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_const.h +++ /dev/null @@ -1,76 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_const.h -** \brief Header file for implementation of the "Constant" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_VALUENODE_CONST_H -#define __SYNFIG_VALUENODE_CONST_H - -/* === H E A D E R S ======================================================= */ - -#include "valuenode.h" - -/* === M A C R O S ========================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class ValueNode_Const : public ValueNode -{ -public: - typedef etl::handle Handle; - typedef etl::handle ConstHandle; - -private: - ValueBase value; - - ValueNode_Const(); - ValueNode_Const(const ValueBase &x); - -public: - - virtual ValueBase operator()(Time t)const; - virtual ~ValueNode_Const(); - - const ValueBase &get_value()const; - ValueBase &get_value(); - void set_value(const ValueBase &data); - - - virtual String get_name()const; - virtual String get_local_name()const; - - virtual ValueNode* clone(const GUID& deriv_guid=GUID())const; - -public: - static ValueNode_Const* create(const ValueBase &x=ValueBase()); - -protected: - virtual void get_times_vfunc(Node::time_set &set) const; -}; - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_cos.cpp b/synfig-core/trunk/src/synfig/valuenode_cos.cpp deleted file mode 100644 index f3e4793..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_cos.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_cos.cpp -** \brief Implementation of the "Cos" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_cos.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Cos::ValueNode_Cos(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - switch(value.get_type()) - { - case ValueBase::TYPE_REAL: - set_link("angle",ValueNode_Const::create(Angle::deg(0))); - set_link("amp",ValueNode_Const::create(value.get(Real()))); - break; - default: - throw Exception::BadType(ValueBase::type_local_name(value.get_type())); - } - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_Cos::create_new()const -{ - return new ValueNode_Cos(get_type()); -} - -ValueNode_Cos* -ValueNode_Cos::create(const ValueBase &x) -{ - return new ValueNode_Cos(x); -} - -ValueNode_Cos::~ValueNode_Cos() -{ - unlink_all(); -} - -ValueBase -ValueNode_Cos::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - return - Angle::cos( - (*angle_)(t).get(Angle()) - ).get() * (*amp_)(t).get(Real()); -} - - -String -ValueNode_Cos::get_name()const -{ - return "cos"; -} - -String -ValueNode_Cos::get_local_name()const -{ - return _("Cos"); -} - -bool -ValueNode_Cos::check_type(ValueBase::Type type) -{ - return type==ValueBase::TYPE_REAL; -} - -bool -ValueNode_Cos::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_Cos(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Cos* create(const ValueBase &x); -}; // END of class ValueNode_Cos - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_dotproduct.cpp b/synfig-core/trunk/src/synfig/valuenode_dotproduct.cpp deleted file mode 100644 index 55de6ae..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_dotproduct.cpp +++ /dev/null @@ -1,199 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_dotproduct.cpp -** \brief Implementation of the "DotProduct" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_dotproduct.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_DotProduct::ValueNode_DotProduct(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - switch(value.get_type()) - { - case ValueBase::TYPE_REAL: - set_link("lhs",ValueNode_Const::create(Vector(value.get(Real()),0))); - set_link("rhs",ValueNode_Const::create(Vector(1,0))); - break; - case ValueBase::TYPE_ANGLE: - set_link("lhs",ValueNode_Const::create(Vector(Angle::cos(value.get(Angle())).get(), Angle::sin(value.get(Angle())).get()))); - set_link("rhs",ValueNode_Const::create(Vector(1,0))); - break; - default: - throw Exception::BadType(ValueBase::type_local_name(value.get_type())); - } - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_DotProduct::create_new()const -{ - return new ValueNode_DotProduct(get_type()); -} - -ValueNode_DotProduct* -ValueNode_DotProduct::create(const ValueBase &x) -{ - return new ValueNode_DotProduct(x); -} - -ValueNode_DotProduct::~ValueNode_DotProduct() -{ - unlink_all(); -} - -ValueBase -ValueNode_DotProduct::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - Vector lhs((*lhs_)(t).get(Vector())); - Vector rhs((*rhs_)(t).get(Vector())); - - switch (get_type()) - { - case ValueBase::TYPE_ANGLE: - return Angle::cos(lhs * rhs / lhs.mag() / rhs.mag()).mod(); - case ValueBase::TYPE_REAL: - return lhs * rhs; - default: - break; - } - - assert(0); - return ValueBase(); -} - -String -ValueNode_DotProduct::get_name()const -{ - return "dotproduct"; -} - -String -ValueNode_DotProduct::get_local_name()const -{ - return _("Dot Product"); -} - -bool -ValueNode_DotProduct::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_DotProduct(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_DotProduct* create(const ValueBase &x); -}; // END of class ValueNode_DotProduct - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_duplicate.cpp b/synfig-core/trunk/src/synfig/valuenode_duplicate.cpp deleted file mode 100644 index 540c3a9..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_duplicate.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_duplicate.cpp -** \brief Implementation of the "Duplicate" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_duplicate.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Duplicate::ValueNode_Duplicate(const ValueBase::Type &x): - LinkableValueNode(x) -{ -} - -ValueNode_Duplicate::ValueNode_Duplicate(const ValueBase &x): - LinkableValueNode(x.get_type()) -{ - set_link("from", ValueNode_Const::create(Real(1.0))); - set_link("to", ValueNode_Const::create(x.get(Real()))); - set_link("step", ValueNode_Const::create(Real(1.0))); - index = 1.0; -} - -ValueNode_Duplicate* -ValueNode_Duplicate::create(const ValueBase &x) -{ - return new ValueNode_Duplicate(x); -} - -LinkableValueNode* -ValueNode_Duplicate::create_new()const -{ - return new ValueNode_Duplicate(get_type()); -} - -ValueNode_Duplicate::~ValueNode_Duplicate() -{ - unlink_all(); -} - -bool -ValueNode_Duplicate::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i= to) return true; - - // at the end of the loop, leave the index at the last value that was used - index = prev; - return false; -} - -int -ValueNode_Duplicate::count_steps(Time t)const -{ - Real from = (*from_)(t).get(Real()); - Real to = (*to_ )(t).get(Real()); - Real step = (*step_)(t).get(Real()); - - if (step == 0) return 1; - - return abs((from - to) / step) + 1; -} - -ValueBase -ValueNode_Duplicate::operator()(Time t __attribute__ ((unused)))const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - return index; -} - -String -ValueNode_Duplicate::get_name()const -{ - return "duplicate"; -} - -String -ValueNode_Duplicate::get_local_name()const -{ - return _("Duplicate"); -} - -bool -ValueNode_Duplicate::check_type(ValueBase::Type type __attribute__ ((unused))) -{ - // never offer this as a choice. it's used automatically by the 'Duplicate' layer. - return false; -} diff --git a/synfig-core/trunk/src/synfig/valuenode_duplicate.h b/synfig-core/trunk/src/synfig/valuenode_duplicate.h deleted file mode 100644 index b9d2429..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_duplicate.h +++ /dev/null @@ -1,87 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_duplicate.h -** \brief Header file for implementation of the "Duplicate" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_VALUENODE_DUPLICATE_H -#define __SYNFIG_VALUENODE_DUPLICATE_H - -/* === H E A D E R S ======================================================= */ - -#include "valuenode.h" - -/* === M A C R O S ========================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class ValueNode_Duplicate : public LinkableValueNode -{ - ValueNode::RHandle from_; - ValueNode::RHandle to_; - ValueNode::RHandle step_; - mutable Real index; - -public: - typedef etl::handle Handle; - typedef etl::handle ConstHandle; - - ValueNode_Duplicate(const ValueBase::Type &x); - ValueNode_Duplicate(const ValueBase &x); - - virtual ValueBase operator()(Time t)const; - void reset_index(Time t)const; - bool step(Time t)const; - int count_steps(Time t)const; - - virtual ~ValueNode_Duplicate(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Duplicate* create(const ValueBase &x); -}; // END of class ValueNode_Duplicate - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp b/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp deleted file mode 100644 index a8c253a..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp +++ /dev/null @@ -1,909 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_dynamiclist.cpp -** \brief Implementation of the "Dynamic List" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_dynamiclist.h" -#include "valuenode_const.h" -#include "valuenode_composite.h" -#include "general.h" -#include "exception.h" -#include -#include -#include -#include "canvas.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_DynamicList::ListEntry::ListEntry(): - index(0) -{ -} - -ValueNode_DynamicList::ListEntry::ListEntry(const ValueNode::Handle &value_node): - value_node(value_node), - index(0) -{ -} - -ValueNode_DynamicList::ListEntry::ListEntry(const ValueNode::Handle &value_node,Time begin, Time end): - value_node(value_node) -{ - add(begin,false); - add(end,false); - add((begin+end)*0.5,true); -} - -ValueNode_DynamicList::ListEntry::ActivepointList::iterator -ValueNode_DynamicList::ListEntry::add(Time time, bool status, int priority) -{ - typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList::iterator iterator; - - //! \optimize - Activepoint ap(time,status,priority); - ap.set_parent_index(get_index()); - ap.set_parent_value_node(get_parent_value_node()); - timing_info.push_back(ap); - iterator iter(--iterator(timing_info.end())); - timing_info.sort(); - - return iter; -} - -ValueNode_DynamicList::ListEntry::ActivepointList::iterator -ValueNode_DynamicList::ListEntry::add(const Activepoint &x) -{ - typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList::iterator iterator; - - //! \optimize - Activepoint ap(x); - ap.set_parent_index(get_index()); - ap.set_parent_value_node(get_parent_value_node()); - timing_info.push_back(ap); - iterator iter(--iterator(timing_info.end())); - timing_info.sort(); - - return iter; -} - -void -ValueNode_DynamicList::reindex() -{ - int i(0); - - std::vector::iterator iter; - - for(iter=list.begin();iter!=list.end();++iter) - { - assert(iter->value_node); - if(iter->index!=i || iter->get_parent_value_node().get()!=this) - { - ActivepointList::iterator iter2; - - if(iter->timing_info.size()) // is this line really necessary? - for(iter2=iter->timing_info.begin();iter2!=iter->timing_info.end();++iter2) - { - iter2->set_parent_index(i); - iter2->set_parent_value_node(this); - } - iter->index=i; - iter->set_parent_value_node(this); - } - } -} - -ValueNode_DynamicList::ListEntry -ValueNode_DynamicList::create_list_entry(int index, Time time, Real origin) -{ - ValueNode_DynamicList::ListEntry ret; - - - synfig::ValueBase prev,next; - - index=index%link_count(); - - assert(index>=0); - - ret.index=index; - ret.set_parent_value_node(this); - - next=(*list[index].value_node)(time); - - if(index!=0) - prev=(*list[index-1].value_node)(time); - else - { - if(get_loop()) - prev=(*list[link_count()-1].value_node)(time); - else - { - prev=next; - } - } - - - switch(get_contained_type()) - { - case ValueBase::TYPE_VECTOR: - { - Vector a(prev.get(Vector())), b(next.get(Vector())); - ret.value_node=ValueNode_Const::create((b-a)*origin+a); - break; - } - case ValueBase::TYPE_REAL: - { - Real a(prev.get(Real())), b(next.get(Real())); - ret.value_node=ValueNode_Const::create((b-a)*origin+a); - break; - } - case ValueBase::TYPE_COLOR: - { - Color a(prev.get(Color())), b(next.get(Color())); - ret.value_node=ValueNode_Composite::create((b-a)*origin+a); - break; - } - case ValueBase::TYPE_ANGLE: - { - Angle a(prev.get(Angle())), b(next.get(Angle())); - ret.value_node=ValueNode_Const::create((b-a)*origin+a); - break; - } - case ValueBase::TYPE_TIME: - { - Time a(prev.get(Time())), b(next.get(Time())); - ret.value_node=ValueNode_Const::create((b-a)*origin+a); - break; - } - default: - ret.value_node=ValueNode_Const::create(get_contained_type()); - break; - } - - - return ret; -} - -ValueNode_DynamicList::ListEntry::ActivepointList::iterator -ValueNode_DynamicList::ListEntry::find(const UniqueID& x) -{ - return std::find(timing_info.begin(),timing_info.end(),x); -} - -ValueNode_DynamicList::ListEntry::ActivepointList::const_iterator -ValueNode_DynamicList::ListEntry::find(const UniqueID& x)const -{ - return std::find(timing_info.begin(),timing_info.end(),x); -} - -void -ValueNode_DynamicList::ListEntry::erase(const UniqueID& x) -{ - timing_info.erase(find(x)); -} - -ValueNode_DynamicList::ListEntry::ActivepointList::iterator -ValueNode_DynamicList::ListEntry::find(const Time& x) -{ - typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; - - ActivepointList::iterator iter; - - for(iter=timing_info.begin();iter!=timing_info.end();++iter) - if(iter->time==x) - return iter; - - throw Exception::NotFound("ValueNode_DynamicList::ListEntry::find():"+x.get_string()); -} - -ValueNode_DynamicList::ListEntry::ActivepointList::const_iterator -ValueNode_DynamicList::ListEntry::find(const Time& x)const -{ - typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; - - ActivepointList::const_iterator iter; - - for(iter=timing_info.begin();iter!=timing_info.end();++iter) - if(iter->time==x) - return iter; - - throw Exception::NotFound("ValueNode_DynamicList::ListEntry::find()const:"+x.get_string()); -} - -ValueNode_DynamicList::ListEntry::ActivepointList::iterator -ValueNode_DynamicList::ListEntry::find_next(const Time& x) -{ - typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; - - ActivepointList::iterator iter; - - for(iter=timing_info.begin();iter!=timing_info.end();++iter) - if(iter->time>x) - return iter; - - throw Exception::NotFound("ValueNode_DynamicList::ListEntry::find_next():"+x.get_string()); -} - -ValueNode_DynamicList::ListEntry::ActivepointList::const_iterator -ValueNode_DynamicList::ListEntry::find_next(const Time& x)const -{ - typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; - - ActivepointList::const_iterator iter; - - for(iter=timing_info.begin();iter!=timing_info.end();++iter) - if(iter->time>x) - return iter; - - throw Exception::NotFound("ValueNode_DynamicList::ListEntry::find_next()const:"+x.get_string()); -} - -ValueNode_DynamicList::ListEntry::ActivepointList::iterator -ValueNode_DynamicList::ListEntry::find_prev(const Time& x) -{ - typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; - - ActivepointList::iterator iter; - iter=timing_info.end(); - do - { - --iter; - if(iter->timetime& selected) -{ - Time curr_time(begin); - int ret(0); - - // try to grab first waypoint - try - { - ActivepointList::iterator iter; - iter=find(curr_time); - selected.push_back(&*iter); - ret++; - } - catch(...) { } - - try - { - ActivepointList::iterator iter; - while(true) - { - iter=find_next(curr_time); - curr_time=iter->get_time(); - if(curr_time>=end) - break; - selected.push_back(&*iter); - ret++; - } - } - catch(...) { } - - return ret; -} - -float -ValueNode_DynamicList::ListEntry::amount_at_time(const Time &t,bool *rising)const -{ - typedef synfig::ValueNode_DynamicList::ListEntry::Activepoint Activepoint; - typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; - - if(timing_info.empty()) - return 1.0f; - - try - { - ActivepointList::const_iterator iter; - iter=find(t); - return iter->state?1.0f:0.0f; - } - catch(...) { } - - ActivepointList::const_iterator prev_iter; - ActivepointList::const_iterator next_iter; - - try { prev_iter=find_prev(t); } - catch(...) { return find_next(t)->state?1.0f:0.0f; } - - try { next_iter=find_next(t); } - catch(...) { return prev_iter->state?1.0f:0.0f; } - - if(next_iter->state==prev_iter->state) - return next_iter->state?1.0f:0.0f; - - if(rising)*rising=next_iter->state; - - if(next_iter->state==true) - return float((t-prev_iter->time)/(next_iter->time-prev_iter->time)); - - return float((next_iter->time-t)/(next_iter->time-prev_iter->time)); -} - -Activepoint -ValueNode_DynamicList::ListEntry::new_activepoint_at_time(const Time& time)const -{ - Activepoint activepoint; - - activepoint.set_state(status_at_time(time)); - activepoint.set_priority(0); - - return activepoint; -} - -bool -ValueNode_DynamicList::ListEntry::status_at_time(const Time &t)const -{ - typedef synfig::ValueNode_DynamicList::ListEntry::Activepoint Activepoint; - typedef synfig::ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; - - ActivepointList::const_iterator entry_iter; - ActivepointList::const_iterator prev_iter; - bool state(true); - - // New "symmetric" state mechanism - if(!timing_info.empty()) - { - if(timing_info.size()==1) - state=timing_info.front().state; - else - { - //! \optimize Perhaps we should use a binary search...? - // This will give us the first activepoint that is after t. - for(entry_iter=timing_info.begin();entry_iter!=timing_info.end();++entry_iter) - { - if(entry_iter->time==t) - { - // If we hit the entry right on the nose, then we don't - // have to do anything more - return entry_iter->state; - } - if(entry_iter->time>t) - break; - - } - prev_iter=entry_iter; - prev_iter--; - - // ie: - // - // |-------|---t---|-------| - // prev_iter^ ^entry_iter - - if(entry_iter==timing_info.end()) - { - state=prev_iter->state; - } - else - if(entry_iter==timing_info.begin()) - { - state=entry_iter->state; - } - else - if(entry_iter->priority==prev_iter->priority) - { - state=entry_iter->state || prev_iter->state; - } - else - if(entry_iter->priority>prev_iter->priority) - { - state=entry_iter->state; - } - else - { - state=prev_iter->state; - } - } - } - return state; -} - - - - -void -ValueNode_DynamicList::add(const ValueNode::Handle &value_node, int index) -{ - ListEntry list_entry(value_node); - list_entry.timing_info.size(); - - if(index<0 || index>=(int)list.size()) - { - list.push_back(list_entry); - } - else - { - list.insert(list.begin()+index,list_entry); - } - - add_child(value_node.get()); - reindex(); - //changed(); - - if(get_parent_canvas()) - get_parent_canvas()->signal_value_node_child_added()(this,value_node); - else if(get_root_canvas() && get_parent_canvas()) - get_root_canvas()->signal_value_node_child_added()(this,value_node); -} - -void -ValueNode_DynamicList::add(const ListEntry &list_entry, int index) -{ - if(index<0 || index>=(int)list.size()) - list.push_back(list_entry); - else - list.insert(list.begin()+index,list_entry); - add_child(list_entry.value_node.get()); - - reindex(); - //changed(); - - if(get_parent_canvas()) - get_parent_canvas()->signal_value_node_child_added()(this,list_entry.value_node); - else if(get_root_canvas() && get_parent_canvas()) - get_root_canvas()->signal_value_node_child_added()(this,list_entry.value_node); -} - -void -ValueNode_DynamicList::erase(const ValueNode::Handle &value_node_) -{ - ValueNode::Handle value_node(value_node_); - - assert(value_node); - if(!value_node) - throw String("ValueNode_DynamicList::erase(): Passed bad value node"); - - std::vector::iterator iter; - for(iter=list.begin();iter!=list.end();++iter) - if(iter->value_node==value_node) - { - list.erase(iter); - if(value_node) - { - remove_child(value_node.get()); - // changed to fix bug 1420091 - it seems that when a .sif file containing a bline layer encapsulated inside - // another layer, get_parent_canvas() is false and get_root_canvas() is true, but when we come to erase a - // vertex, both are true. So the signal is sent to the parent, but the signal wasn't sent to the parent - // when it was added. This probably isn't the right fix, but it seems to work for now. Note that the same - // strange "if (X) else if (Y && X)" code is also present in the two previous functions, above. - - // if(get_parent_canvas()) - // get_parent_canvas()->signal_value_node_child_removed()(this,value_node); - // else if(get_root_canvas() && get_parent_canvas()) - // get_root_canvas()->signal_value_node_child_removed()(this,value_node); - if(get_root_canvas()) - get_root_canvas()->signal_value_node_child_removed()(this,value_node); - } - break; - } - reindex(); -} - - -ValueNode_DynamicList::ValueNode_DynamicList(ValueBase::Type container_type): - LinkableValueNode(ValueBase::TYPE_LIST), - container_type (container_type), - loop_(false) -{ - DCAST_HACK_ENABLE(); -} - -ValueNode_DynamicList::Handle -ValueNode_DynamicList::create(ValueBase::Type id) -{ - return new ValueNode_DynamicList(id); -} - -ValueNode_DynamicList::~ValueNode_DynamicList() -{ - unlink_all(); -} - -ValueNode_DynamicList* -ValueNode_DynamicList::create_from(const ValueBase &value) -{ - //vector value_list(value.operator vector()); - vector value_list(value.get_list()); - - vector::iterator iter; - - if(value_list.empty()) - return 0; - - ValueNode_DynamicList* value_node(new ValueNode_DynamicList(value_list.front().get_type())); - - // when creating a list of vectors, start it off being looped. - // I think the only time this is used if for creating polygons, - // and we want them to be looped by default - if (value_node->get_contained_type() == ValueBase::TYPE_VECTOR) - value_node->set_loop(true); - - for(iter=value_list.begin();iter!=value_list.end();++iter) - { - ValueNode::Handle item(ValueNode_Const::create(*iter)); - value_node->add(ListEntry(item)); - assert(value_node->list.back().value_node); - } - return value_node; -} - -ValueBase -ValueNode_DynamicList::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - std::vector ret_list; - std::vector::const_iterator iter; - - assert(container_type); - - for(iter=list.begin();iter!=list.end();++iter) - { - bool state(iter->status_at_time(t)); - - if(state) - { - if(iter->value_node->get_type()==container_type) - ret_list.push_back((*iter->value_node)(t)); - else - { - synfig::warning(string("ValueNode_DynamicList::operator()():")+_("List type/item type mismatch, throwing away mismatch")); - } - } - } - - if(list.empty()) - synfig::warning(string("ValueNode_DynamicList::operator()():")+_("No entries in list")); - else - if(ret_list.empty()) - synfig::warning(string("ValueNode_DynamicList::operator()():")+_("No entries in ret_list")); - - return ret_list; -} - -bool -ValueNode_DynamicList::set_link_vfunc(int i,ValueNode::Handle x) -{ - assert(i>=0); - - if((unsigned)i>=list.size()) - return false; - if(x->get_type()!=container_type) - return false; - list[i].value_node=x; - return true; -} - -ValueNode::LooseHandle -ValueNode_DynamicList::get_link_vfunc(int i)const -{ - assert(i>=0); - - if((unsigned)i>=list.size()) - return 0; - return list[i].value_node; -} - -int -ValueNode_DynamicList::link_count()const -{ - return list.size(); -} - -String -ValueNode_DynamicList::link_local_name(int i)const -{ - assert(i>=0 && i(create_new()); - ret->set_guid(get_guid()^deriv_guid); - - std::vector::const_iterator iter; - - for(iter=list.begin();iter!=list.end();++iter) - { - if(iter->value_node->is_exported()) - ret->add(*iter); - else - { - ListEntry list_entry(*iter); - //list_entry.value_node=find_value_node(iter->value_node->get_guid()^deriv_guid).get(); - //if(!list_entry.value_node) - list_entry.value_node=iter->value_node->clone(deriv_guid); - ret->add(list_entry); - //ret->list.back().value_node=iter->value_node.clone(); - } - } - ret->set_loop(get_loop()); - return ret; -} - -String -ValueNode_DynamicList::link_name(int i)const -{ - return strprintf("item%04d",i); -} - -int -ValueNode_DynamicList::get_link_index_from_name(const String &name)const -{ - throw Exception::BadLinkName(name); -} - -String -ValueNode_DynamicList::get_name()const -{ - return "dynamic_list"; -} - -String -ValueNode_DynamicList::get_local_name()const -{ - return _("Dynamic List"); -} - -bool -ValueNode_DynamicList::check_type(ValueBase::Type type) -{ - return type==ValueBase::TYPE_LIST; -} - -void -ValueNode_DynamicList::set_member_canvas(etl::loose_handle canvas) -{ - for (vector::iterator iter = list.begin(); iter != list.end(); iter++) - iter->value_node->set_parent_canvas(canvas); -} - -ValueBase::Type -ValueNode_DynamicList::get_contained_type()const -{ - return container_type; -} - -LinkableValueNode* -ValueNode_DynamicList::create_new()const -{ - return new ValueNode_DynamicList(container_type); -} - -int -ValueNode_DynamicList::find_next_valid_entry(int orig_item, Time t)const -{ - int curr_item; - - for(curr_item=orig_item+1;curr_item!=orig_item;curr_item++) - { - if(curr_item==(int)list.size()) - { - curr_item=0; - continue; - } - if(list[curr_item].status_at_time(t)) - return curr_item; - } - return curr_item; -} - -int -ValueNode_DynamicList::find_prev_valid_entry(int orig_item, Time t)const -{ - int curr_item; - - for(curr_item=orig_item-1;curr_item!=orig_item;curr_item--) - { - if(curr_item==-1) - { - curr_item=list.size(); - continue; - } - if(list[curr_item].status_at_time(t)) - return curr_item; - } - return curr_item; -} - -const synfig::Node::time_set & ValueNode_DynamicList::ListEntry::get_times() const -{ - synfig::ActivepointList::const_iterator j = timing_info.begin(), - end = timing_info.end(); - - //must remerge with all the other values because we don't know if we've changed... - times = value_node->get_times(); - - for(; j != end; ++j) - { - TimePoint t; - t.set_time(j->get_time()); - t.set_guid(j->get_guid()); - - times.insert(t); - } - - return times; -} - -void ValueNode_DynamicList::get_times_vfunc(Node::time_set &set) const -{ - //add in the active points - int size = list.size(); - - //rebuild all the info... - for(int i = 0; i < size; ++i) - { - const Node::time_set & tset= list[i].get_times(); - set.insert(tset.begin(),tset.end()); - } -} - - -//new find functions that don't throw -struct timecmp -{ - Time t; - - timecmp(const Time &c) :t(c) {} - - bool operator()(const Activepoint &rhs) const - { - return t.is_equal(rhs.get_time()); - } -}; - -ValueNode_DynamicList::ListEntry::findresult ValueNode_DynamicList::ListEntry::find_uid(const UniqueID& x) -{ - findresult f; - f.second = false; - - f.first = std::find(timing_info.begin(),timing_info.end(),x); - - if(f.first != timing_info.end()) - { - f.second = true; - } - - return f; -} - -ValueNode_DynamicList::ListEntry::const_findresult ValueNode_DynamicList::ListEntry::find_uid(const UniqueID& x) const -{ - const_findresult f; - f.second = false; - - f.first = std::find(timing_info.begin(),timing_info.end(),x); - - if(f.first != timing_info.end()) - { - f.second = true; - } - - return f; -} - -ValueNode_DynamicList::ListEntry::findresult ValueNode_DynamicList::ListEntry::find_time(const Time& x) -{ - findresult f; - f.second = false; - - f.first = std::find_if(timing_info.begin(),timing_info.end(),timecmp(x)); - - if(f.first != timing_info.end()) - { - f.second = true; - } - - return f; -} - -ValueNode_DynamicList::ListEntry::const_findresult ValueNode_DynamicList::ListEntry::find_time(const Time& x)const -{ - const_findresult f; - f.second = false; - - f.first = std::find_if(timing_info.begin(),timing_info.end(),timecmp(x)); - - if(f.first != timing_info.end()) - { - f.second = true; - } - - return f; -} - -void -ValueNode_DynamicList::insert_time(const Time& location, const Time& delta) -{ - if(!delta) - return; - - std::vector::iterator iter(list.begin()); - for(;iter!=list.end();++iter) - { - try - { - ListEntry& item(*iter); - - ActivepointList::iterator iter(item.find_next(location)); - for(;iter!=item.timing_info.end();++iter) - { - iter->set_time(iter->get_time()+delta); - } - } - catch(Exception::NotFound) { } - } - changed(); -} diff --git a/synfig-core/trunk/src/synfig/valuenode_dynamiclist.h b/synfig-core/trunk/src/synfig/valuenode_dynamiclist.h deleted file mode 100644 index e73afd9..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_dynamiclist.h +++ /dev/null @@ -1,248 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_dynamiclist.h -** \brief Header file for implementation of the "Dynamic List" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_VALUENODE_DYNAMICLIST_H -#define __SYNFIG_VALUENODE_DYNAMICLIST_H - -/* === H E A D E R S ======================================================= */ - -#include -#include - -#include "valuenode.h" -#include "time.h" -#include "uniqueid.h" -#include "activepoint.h" - -/* === M A C R O S ========================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { -class ValueNode_BLine; -class Canvas; - -/*! \class ValueNode_DynamicList -** \brief Animated List ValueNode -** -** This ValueNode was originally set up to have a list -** of ValueNodes and their associated "on" and "off" points. -** ie: Any time that was directly after an "on" point, -** the item would be "on", and any time that was directly -** after an "off" point would be "off". This is pretty intuitive. -** However, it does have its problems. -** -** The problems arise when we introduce the concept of a -** Keyframe. Keyframes can be manipulated via the Synfig -** Application Library. They allow the user to quickly -** and "automagically" rearrange an animation by moving -** the associated keyframes. With the old way that the -** "on" and "off" points were handled, this task became -** overly complicated. -** -** What is required is a "symmetric" system of describing -** "on" and "off" points. Instead of the point representing -** the state of the item after that point in time, we have -** the point represent only that frame. The state -** of the item is calculated by looking at the points -** around it: If either (or both) points are "on", then the -** current state is "on". Otherwise, the point is "off" -** -** This may be a bit confusing at first, but it is required -** if we want the keyframe mechanism to "just work". -*/ -class ValueNode_DynamicList : public LinkableValueNode -{ -public: - - /*! \class ListEntry - ** \brief Contains a potential list item, and associated timing information - ** - ** This structure contains a RHandle to a ValueNode, - ** as well as the associated on/off timing information - ** which determines when this item is included in the list. - ** - ** The timing information is stored in the member timing_info. - */ - struct ListEntry : public UniqueID - { - friend class ValueNode_DynamicList; - friend class ValueNode_BLine; - public: - typedef synfig::Activepoint Activepoint; - - typedef std::list ActivepointList; - - typedef std::pair findresult; - typedef std::pair const_findresult; - - - private: - mutable Node::time_set times; - public: - ValueNode::RHandle value_node; - - ActivepointList timing_info; - - private: - int index; - etl::loose_handle parent_; - void set_parent_value_node(const etl::loose_handle &x) { parent_=x; } - - public: - - int get_index()const { return index; } - - - bool status_at_time(const Time &x)const; - - float amount_at_time(const Time &x, bool *rising=0)const; - - ActivepointList::iterator add(Time time, bool status, int priority=0); - ActivepointList::iterator add(const Activepoint &x); - - findresult find_uid(const UniqueID& x); - const_findresult find_uid(const UniqueID& x)const; - - findresult find_time(const Time& x); - const_findresult find_time(const Time& x)const; - - ActivepointList::iterator find(const UniqueID& x); - ActivepointList::const_iterator find(const UniqueID& x)const; - ActivepointList::iterator find(const Time& x); - ActivepointList::const_iterator find(const Time& x)const; - ActivepointList::iterator find_prev(const Time& x); - ActivepointList::const_iterator find_prev(const Time& x)const; - ActivepointList::iterator find_next(const Time& x); - ActivepointList::const_iterator find_next(const Time& x)const; - - Activepoint new_activepoint_at_time(const Time& x)const; - - ActivepointList::iterator add(Time time) - { return add(time, status_at_time(time)); } - - void erase(const UniqueID& x); - - int find(const Time& begin,const Time& end,std::vector& list); - - const synfig::Node::time_set &get_times() const; - - const etl::loose_handle &get_parent_value_node()const { return parent_; } - - ListEntry(); - ListEntry(const ValueNode::Handle &value_node); - ListEntry(const ValueNode::Handle &value_node,Time begin, Time end); - }; // END of struct ValueNode_DynamicList::ListEntry - - typedef etl::handle Handle; - typedef etl::handle ConstHandle; - -protected: - ValueNode_DynamicList(ValueBase::Type container_type=ValueBase::TYPE_NIL); - - ValueBase::Type container_type; - - bool loop_; - - -public: - std::vector list; - -public: - - void add(const ValueNode::Handle &value_node, int index=-1); - void add(const ListEntry &value_node, int index=-1); - void erase(const ValueNode::Handle &value_node); - void reindex(); - - int find_next_valid_entry(int x, Time t)const; - int find_prev_valid_entry(int x, Time t)const; - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - - virtual int link_count()const; - - virtual String link_name(int i)const; - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_DynamicList(); - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - - virtual String get_name()const; - virtual String get_local_name()const; - - bool get_loop()const { return loop_; } - void set_loop(bool x) { loop_=x; } - - void set_member_canvas(etl::loose_handle); - - ValueBase::Type get_contained_type()const; - - - template static Handle - create(iterator begin, iterator end) - { - Handle ret=create((*begin)->get_type()); - for(;begin!=end;++begin) - ret->add(ListEntry(*begin)); - return ret; - } - - void insert_time(const Time& location, const Time& delta); - //void manipulate_time(const Time& old_begin,const Time& old_end,const Time& new_begin,const Time& new_end); - - virtual ValueNode* clone(const GUID& deriv_guid=GUID())const; - - virtual ListEntry create_list_entry(int index, Time time=0, Real origin=0.5); - -protected: - - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - LinkableValueNode* create_new()const; - - virtual void get_times_vfunc(Node::time_set &set) const; - -public: - /*! \note The construction parameter (\a id) is the type that the list - ** contains, rather than the type that it will yield - ** (which is ValueBase::TYPE_LIST) - */ - static Handle create(ValueBase::Type id=ValueBase::TYPE_NIL); - using synfig::LinkableValueNode::get_link_vfunc; - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_DynamicList* create_from(const ValueBase &x=ValueBase::TYPE_GRADIENT); -}; // END of class ValueNode_DynamicList - -typedef ValueNode_DynamicList::ListEntry::Activepoint Activepoint; -typedef ValueNode_DynamicList::ListEntry::ActivepointList ActivepointList; - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_exp.cpp b/synfig-core/trunk/src/synfig/valuenode_exp.cpp deleted file mode 100644 index 05d4b63..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_exp.cpp +++ /dev/null @@ -1,179 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_exp.cpp -** \brief Implementation of the "Exponential" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_exp.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Exp::ValueNode_Exp(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - switch(value.get_type()) - { - case ValueBase::TYPE_REAL: - set_link("exp",ValueNode_Const::create(Real(0))); - set_link("scale",ValueNode_Const::create(value.get(Real()))); - break; - default: - throw Exception::BadType(ValueBase::type_local_name(value.get_type())); - } - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_Exp::create_new()const -{ - return new ValueNode_Exp(get_type()); -} - -ValueNode_Exp* -ValueNode_Exp::create(const ValueBase &x) -{ - return new ValueNode_Exp(x); -} - -ValueNode_Exp::~ValueNode_Exp() -{ - unlink_all(); -} - -ValueBase -ValueNode_Exp::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - return (exp((*exp_)(t).get(Real())) * - (*scale_)(t).get(Real())); -} - -String -ValueNode_Exp::get_name()const -{ - return "exp"; -} - -String -ValueNode_Exp::get_local_name()const -{ - return _("Exponential"); -} - -bool -ValueNode_Exp::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_Exp(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Exp* create(const ValueBase &x); -}; // END of class ValueNode_Exp - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_gradientcolor.cpp b/synfig-core/trunk/src/synfig/valuenode_gradientcolor.cpp deleted file mode 100644 index 60c6e7e..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_gradientcolor.cpp +++ /dev/null @@ -1,189 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_gradientcolor.cpp -** \brief Implementation of the "Gradient Color" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_gradientcolor.h" -#include "valuenode_const.h" -#include "gradient.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_GradientColor::ValueNode_GradientColor(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - switch(value.get_type()) - { - case ValueBase::TYPE_COLOR: - set_link("gradient", ValueNode_Const::create(Gradient(value.get(Color()),value.get(Color())))); - set_link("index", ValueNode_Const::create(Real(0.5))); - set_link("loop", ValueNode_Const::create(bool(false))); - break; - default: - throw Exception::BadType(ValueBase::type_local_name(value.get_type())); - } - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_GradientColor::create_new()const -{ - return new ValueNode_GradientColor(get_type()); -} - -ValueNode_GradientColor* -ValueNode_GradientColor::create(const ValueBase &x) -{ - return new ValueNode_GradientColor(x); -} - -ValueNode_GradientColor::~ValueNode_GradientColor() -{ - unlink_all(); -} - -ValueBase -ValueNode_GradientColor::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - Real index((*index_)(t).get(Real())); - bool loop((*loop_)(t).get(bool())); - if (loop) index -= floor(index); - return (*gradient_)(t).get(Gradient())(index); -} - - -bool -ValueNode_GradientColor::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_GradientColor(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_GradientColor* create(const ValueBase &x); -}; // END of class ValueNode_GradientColor - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp b/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp deleted file mode 100644 index 3e06bfc..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp +++ /dev/null @@ -1,198 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_gradientrotate.cpp -** \brief Implementation of the "Gradient Rotate" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "general.h" -#include "valuenode_gradientrotate.h" -#include "valuenode_const.h" -#include -#include "gradient.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -synfig::ValueNode_GradientRotate::ValueNode_GradientRotate(const Gradient& x): - LinkableValueNode(synfig::ValueBase::TYPE_GRADIENT) -{ - set_link("gradient",ValueNode_Const::create(x)); - set_link("offset",ValueNode_Const::create(Real(0))); - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_GradientRotate::create_new()const -{ - return new ValueNode_GradientRotate(Gradient()); -} - -ValueNode_GradientRotate* -ValueNode_GradientRotate::create(const ValueBase& x) -{ - ValueBase::Type id(x.get_type()); - if(id!=ValueBase::TYPE_GRADIENT) - { - assert(0); - throw runtime_error(String(_("Gradient Rotate"))+_(":Bad type ")+ValueBase::type_local_name(id)); - } - - ValueNode_GradientRotate* value_node=new ValueNode_GradientRotate(x.get(Gradient())); - - assert(value_node->get_type()==id); - - return value_node; -} - -synfig::ValueNode_GradientRotate::~ValueNode_GradientRotate() -{ - unlink_all(); -} - -synfig::ValueBase -synfig::ValueNode_GradientRotate::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - Gradient gradient; - gradient=(*ref_gradient)(t).get(gradient); - Real offset((*ref_offset)(t).get(Real())); - Gradient::iterator iter; - for(iter=gradient.begin();iter!=gradient.end();++iter) - iter->pos+=offset; - - return gradient; -} - -bool -ValueNode_GradientRotate::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - -protected: - - ValueNode_GradientRotate(const Gradient& x); - -private: - - ValueNode::RHandle ref_gradient; - ValueNode::RHandle ref_offset; - -public: - - virtual ~ValueNode_GradientRotate(); - -// static Handle create(ValueBase::Type id=ValueBase::TYPE_GRADIENT); - - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - - virtual int link_count()const; - - virtual String link_local_name(int i)const; - virtual String link_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - - virtual ValueBase operator()(Time t)const; - - virtual String get_name()const; - virtual String get_local_name()const; - -// static bool check_type(const ValueBase::Type &type); -protected: - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - - LinkableValueNode* create_new()const; - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_GradientRotate* create(const ValueBase &x=ValueBase::TYPE_GRADIENT); -}; // END of class ValueNode_GradientRotate - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_greyed.cpp b/synfig-core/trunk/src/synfig/valuenode_greyed.cpp deleted file mode 100644 index 4e3536e..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_greyed.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_greyed.cpp -** \brief Implementation of the "Greyed" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_greyed.h" -#include "valuenode_const.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Greyed::ValueNode_Greyed(const ValueBase::Type &x): - ValueNode_Reference(x) -{ -} - -ValueNode_Greyed::ValueNode_Greyed(const ValueNode::Handle &x): - ValueNode_Reference(x->get_type()) -{ - set_link("link",x); -} - -ValueNode_Greyed* -ValueNode_Greyed::create(const ValueBase &x) -{ - return new ValueNode_Greyed(ValueNode_Const::create(x)); -} - -LinkableValueNode* -ValueNode_Greyed::create_new()const -{ - return new ValueNode_Greyed(get_type()); -} - -String -ValueNode_Greyed::get_name()const -{ - return "greyed"; -} - -String -ValueNode_Greyed::get_local_name()const -{ - return _("Greyed"); -} diff --git a/synfig-core/trunk/src/synfig/valuenode_greyed.h b/synfig-core/trunk/src/synfig/valuenode_greyed.h deleted file mode 100644 index 6996336..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_greyed.h +++ /dev/null @@ -1,60 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_greyed.h -** \brief Header file for implementation of the "Greyed" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_VALUENODE_GREYED_H -#define __SYNFIG_VALUENODE_GREYED_H - -/* === H E A D E R S ======================================================= */ - -#include "valuenode_reference.h" - -/* === M A C R O S ========================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class ValueNode_Greyed : public ValueNode_Reference -{ -public: - typedef etl::handle Handle; - ValueNode_Greyed(const ValueBase::Type &x); - ValueNode_Greyed(const ValueNode::Handle &x); - - virtual String get_name()const; - virtual String get_local_name()const; - -protected: - LinkableValueNode* create_new()const; - -public: - static ValueNode_Greyed* create(const ValueBase &x); - -}; // END of class ValueNode_Greyed - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_integer.cpp b/synfig-core/trunk/src/synfig/valuenode_integer.cpp deleted file mode 100644 index 38cd082..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_integer.cpp +++ /dev/null @@ -1,199 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_integer.cpp -** \brief Implementation of the "Integer" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_integer.h" -#include "valuenode_const.h" -#include "general.h" -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Integer::ValueNode_Integer(const ValueBase::Type &x): - LinkableValueNode(x) -{ -} - -ValueNode_Integer::ValueNode_Integer(const ValueBase &x): - LinkableValueNode(x.get_type()) -{ - switch(x.get_type()) - { - case ValueBase::TYPE_ANGLE: - set_link("integer", ValueNode_Const::create(round_to_int(Angle::deg(x.get(Angle())).get()))); - break; - case ValueBase::TYPE_BOOL: - set_link("integer", ValueNode_Const::create(int(x.get(bool())))); - break; - case ValueBase::TYPE_REAL: - set_link("integer", ValueNode_Const::create(round_to_int(x.get(Real())))); - break; - case ValueBase::TYPE_TIME: - set_link("integer", ValueNode_Const::create(round_to_int(x.get(Time())))); - break; - default: - assert(0); - throw runtime_error(get_local_name()+_(":Bad type ")+ValueBase::type_local_name(x.get_type())); - } -} - -ValueNode_Integer* -ValueNode_Integer::create(const ValueBase &x) -{ - return new ValueNode_Integer(x); -} - -LinkableValueNode* -ValueNode_Integer::create_new()const -{ - return new ValueNode_Integer(get_type()); -} - -ValueNode_Integer::~ValueNode_Integer() -{ - unlink_all(); -} - -bool -ValueNode_Integer::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - ValueNode_Integer(const ValueBase::Type &x); - ValueNode_Integer(const ValueBase &x); - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_Integer(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Integer* create(const ValueBase &x); -}; // END of class ValueNode_Integer - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_intstring.cpp b/synfig-core/trunk/src/synfig/valuenode_intstring.cpp deleted file mode 100644 index c7011d2..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_intstring.cpp +++ /dev/null @@ -1,202 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_intstring.cpp -** \brief Implementation of the "IntString" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_intstring.h" -#include "valuenode_const.h" -#include "canvas.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_IntString::ValueNode_IntString(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - switch(value.get_type()) - { - case ValueBase::TYPE_STRING: - set_link("int",ValueNode_Const::create(int(0))); - set_link("width",ValueNode_Const::create(int(0))); - set_link("zero_pad",ValueNode_Const::create(bool(false))); - break; - default: - throw Exception::BadType(ValueBase::type_local_name(value.get_type())); - } - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_IntString::create_new()const -{ - return new ValueNode_IntString(get_type()); -} - -ValueNode_IntString* -ValueNode_IntString::create(const ValueBase &x) -{ - return new ValueNode_IntString(x); -} - -ValueNode_IntString::~ValueNode_IntString() -{ - unlink_all(); -} - -ValueBase -ValueNode_IntString::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - int integer((*int_)(t).get(int())); - int width((*width_)(t).get(int())); - int zero_pad((*zero_pad_)(t).get(bool())); - - switch (get_type()) - { - case ValueBase::TYPE_STRING: - return strprintf(strprintf("%%%s%dd", - zero_pad ? "0" : "", - width).c_str(), integer); - default: - break; - } - - assert(0); - return ValueBase(); -} - -String -ValueNode_IntString::get_name()const -{ - return "intstring"; -} - -String -ValueNode_IntString::get_local_name()const -{ - return _("Int String"); -} - -bool -ValueNode_IntString::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_IntString(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_IntString* create(const ValueBase &x); -}; // END of class ValueNode_IntString - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_join.cpp b/synfig-core/trunk/src/synfig/valuenode_join.cpp deleted file mode 100644 index eaa8fbc..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_join.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_join.cpp -** \brief Implementation of the "Join" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_join.h" -#include "valuenode_const.h" -#include "valuenode_dynamiclist.h" -#include "canvas.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Join::ValueNode_Join(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - switch(value.get_type()) - { - case ValueBase::TYPE_STRING: - { - vector v(1, value.get(String())); - - // "insert item (smart)" inserts before the selected entry, making it hard to append to the end - // add an extra element at the end to allow the easy insertion of text after the given value's string - v.push_back("..."); - - set_link("strings",ValueNode_DynamicList::create_from(v)); - set_link("before",ValueNode_Const::create(String(""))); - set_link("separator",ValueNode_Const::create(String(" "))); - set_link("after",ValueNode_Const::create(String(""))); - break; - } - default: - throw Exception::BadType(ValueBase::type_local_name(value.get_type())); - } - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_Join::create_new()const -{ - return new ValueNode_Join(get_type()); -} - -ValueNode_Join* -ValueNode_Join::create(const ValueBase &x) -{ - return new ValueNode_Join(x); -} - -ValueNode_Join::~ValueNode_Join() -{ - unlink_all(); -} - -ValueBase -ValueNode_Join::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - const std::vector strings((*strings_)(t).get_list()); - const String before((*before_)(t).get(String())); - const String separator((*separator_)(t).get(String())); - const String after((*after_)(t).get(String())); - - switch (get_type()) - { - case ValueBase::TYPE_STRING: - { - bool first = true; - String ret(before); - for (std::vector::const_iterator iter = strings.begin(); iter != strings.end(); iter++) - { - if (first) - first = false; - else - ret += separator; - ret += iter->get(String()); - } - ret += after; - return ret; - } - default: - break; - } - - assert(0); - return ValueBase(); -} - -String -ValueNode_Join::get_name()const -{ - return "join"; -} - -String -ValueNode_Join::get_local_name()const -{ - return _("Joined List"); -} - -bool -ValueNode_Join::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_Join(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Join* create(const ValueBase &x); -}; // END of class ValueNode_Join - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_linear.cpp b/synfig-core/trunk/src/synfig/valuenode_linear.cpp deleted file mode 100644 index 583612e..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_linear.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_linear.cpp -** \brief Implementation of the "Linear" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_linear.h" -#include "valuenode_const.h" -#include "general.h" -#include "color.h" -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Linear::ValueNode_Linear(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - switch(get_type()) - { - case ValueBase::TYPE_ANGLE: - set_link("slope",ValueNode_Const::create(Angle::deg(0))); - set_link("offset",ValueNode_Const::create(value.get(Angle()))); - break; - case ValueBase::TYPE_COLOR: - set_link("slope",ValueNode_Const::create(Color(0,0,0,0))); - set_link("offset",ValueNode_Const::create(value.get(Color()))); - break; - case ValueBase::TYPE_INTEGER: - set_link("slope",ValueNode_Const::create(int(0))); - set_link("offset",ValueNode_Const::create(value.get(int()))); - break; - case ValueBase::TYPE_REAL: - set_link("slope",ValueNode_Const::create(Real(0))); - set_link("offset",ValueNode_Const::create(value.get(Real()))); - break; - case ValueBase::TYPE_TIME: - set_link("slope",ValueNode_Const::create(Time(0))); - set_link("offset",ValueNode_Const::create(value.get(Time()))); - break; - case ValueBase::TYPE_VECTOR: - set_link("slope",ValueNode_Const::create(Vector(0,0))); - set_link("offset",ValueNode_Const::create(value.get(Vector()))); - break; - default: - throw Exception::BadType(ValueBase::type_local_name(get_type())); - } - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_Linear::create_new()const -{ - return new ValueNode_Linear(get_type()); -} - -ValueNode_Linear* -ValueNode_Linear::create(const ValueBase &x) -{ - return new ValueNode_Linear(x); -} - -ValueNode_Linear::~ValueNode_Linear() -{ - unlink_all(); -} - -ValueBase -ValueNode_Linear::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - switch(get_type()) - { - case ValueBase::TYPE_ANGLE: - return (*m_)(t).get( Angle())*t+(*b_)(t).get( Angle()); - case ValueBase::TYPE_COLOR: - return (*m_)(t).get( Color())*t+(*b_)(t).get( Color()); - case ValueBase::TYPE_INTEGER: - return round_to_int((*m_)(t).get(int())*t+(*b_)(t).get(int())); - case ValueBase::TYPE_REAL: - return (*m_)(t).get( Real())*t+(*b_)(t).get( Real()); - case ValueBase::TYPE_TIME: - return (*m_)(t).get( Time())*t+(*b_)(t).get( Time()); - case ValueBase::TYPE_VECTOR: - return (*m_)(t).get(Vector())*t+(*b_)(t).get(Vector()); - default: - assert(0); - break; - } - return ValueBase(); -} - - -String -ValueNode_Linear::get_name()const -{ - return "linear"; -} - -String -ValueNode_Linear::get_local_name()const -{ - return _("Linear"); -} - -bool -ValueNode_Linear::check_type(ValueBase::Type type) -{ - return - type==ValueBase::TYPE_ANGLE || - type==ValueBase::TYPE_COLOR || - type==ValueBase::TYPE_INTEGER || - type==ValueBase::TYPE_REAL || - type==ValueBase::TYPE_TIME || - type==ValueBase::TYPE_VECTOR ; -} - -bool -ValueNode_Linear::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_Linear(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Linear* create(const ValueBase &x); -}; // END of class ValueNode_Linear - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_log.cpp b/synfig-core/trunk/src/synfig/valuenode_log.cpp deleted file mode 100644 index 59f82e5..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_log.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_log.cpp -** \brief Implementation of the "Natural Logarithm" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** Copyright (c) 2008 Carlos López -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_log.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Logarithm::ValueNode_Logarithm(const ValueBase &x): - LinkableValueNode(x.get_type()) -{ - Real value(x.get(Real())); - Real infinity(999999.0); - Real epsilon(0.000001); - - value = exp(value); - - set_link("link", ValueNode_Const::create(Real(value))); - set_link("epsilon", ValueNode_Const::create(Real(epsilon))); - set_link("infinite", ValueNode_Const::create(Real(infinity))); -} - -ValueNode_Logarithm* -ValueNode_Logarithm::create(const ValueBase &x) -{ - return new ValueNode_Logarithm(x); -} - -LinkableValueNode* -ValueNode_Logarithm::create_new()const -{ - return new ValueNode_Logarithm(get_type()); -} - -ValueNode_Logarithm::~ValueNode_Logarithm() -{ - unlink_all(); -} - -bool -ValueNode_Logarithm::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - ValueNode_Logarithm(const ValueBase &x); - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_Logarithm(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Logarithm* create(const ValueBase &x); -}; // END of class ValueNode_Logarithm - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif - - diff --git a/synfig-core/trunk/src/synfig/valuenode_not.cpp b/synfig-core/trunk/src/synfig/valuenode_not.cpp deleted file mode 100644 index b7ca310..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_not.cpp +++ /dev/null @@ -1,159 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_not.cpp -** \brief Implementation of the "Not" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** Copyright (c) 2009 Nikita Kitaev -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_not.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Not::ValueNode_Not(const ValueBase &x): - LinkableValueNode(x.get_type()) -{ - bool value(x.get(bool())); - - set_link("link", ValueNode_Const::create(!value)); -} - -ValueNode_Not* -ValueNode_Not::create(const ValueBase &x) -{ - return new ValueNode_Not(x); -} - -LinkableValueNode* -ValueNode_Not::create_new()const -{ - return new ValueNode_Not(get_type()); -} - -ValueNode_Not::~ValueNode_Not() -{ - unlink_all(); -} - -bool -ValueNode_Not::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - ValueNode_Not(const ValueBase &x); - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_Not(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Not* create(const ValueBase &x); -}; // END of class ValueNode_Not - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_or.cpp b/synfig-core/trunk/src/synfig/valuenode_or.cpp deleted file mode 100644 index a2d9e71..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_or.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_or.cpp -** \brief Implementation of the "Or" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** Copyright (c) 2009 Nikita Kitaev -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_or.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Or::ValueNode_Or(const ValueBase &x): - LinkableValueNode(x.get_type()) -{ - bool value(x.get(bool())); - - set_link("link1", ValueNode_Const::create(bool(false))); - set_link("link2", ValueNode_Const::create(bool(false))); - if (value) - set_link("link1",ValueNode_Const::create(bool(true))); -} - -ValueNode_Or* -ValueNode_Or::create(const ValueBase &x) -{ - return new ValueNode_Or(x); -} - -LinkableValueNode* -ValueNode_Or::create_new()const -{ - return new ValueNode_Or(get_type()); -} - -ValueNode_Or::~ValueNode_Or() -{ - unlink_all(); -} - -bool -ValueNode_Or::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - ValueNode_Or(const ValueBase &x); - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_Or(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Or* create(const ValueBase &x); -}; // END of class ValueNode_Or - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_pow.cpp b/synfig-core/trunk/src/synfig/valuenode_pow.cpp deleted file mode 100644 index fa00618..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_pow.cpp +++ /dev/null @@ -1,204 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_pow.cpp -** \brief Implementation of the "Power" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** Copyright (c) 2009 Nikita Kitaev -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_pow.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Pow::ValueNode_Pow(const ValueBase &x): - LinkableValueNode(x.get_type()) -{ - Real value(x.get(Real())); - Real infinity(999999.0); - Real epsilon(0.000001); - - set_link("base", ValueNode_Const::create(Real(value))); - set_link("power", ValueNode_Const::create(Real(1))); - set_link("epsilon", ValueNode_Const::create(Real(epsilon))); - set_link("infinite", ValueNode_Const::create(Real(infinity))); -} - -ValueNode_Pow* -ValueNode_Pow::create(const ValueBase &x) -{ - return new ValueNode_Pow(x); -} - -LinkableValueNode* -ValueNode_Pow::create_new()const -{ - return new ValueNode_Pow(get_type()); -} - -ValueNode_Pow::~ValueNode_Pow() -{ - unlink_all(); -} - -bool -ValueNode_Pow::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i 0) //0^x=0 - return Real(0); - else - if ( ( ((int) power) % 2 != 0) && (base < 0) ) //(-0)^(-odd)=-inf - return -infinite; - else - return infinite; - - if (base <= epsilon && ((int) power) != power) //negative number to fractional power -> undefined - power = ((int) power); //so round off power to nearest integer - - return pow(base,power); - -} - -String -ValueNode_Pow::get_name()const -{ - return "power"; -} - -String -ValueNode_Pow::get_local_name()const -{ - return _("Power"); -} - -bool -ValueNode_Pow::check_type(ValueBase::Type type) -{ - return type==ValueBase::TYPE_REAL; -} diff --git a/synfig-core/trunk/src/synfig/valuenode_pow.h b/synfig-core/trunk/src/synfig/valuenode_pow.h deleted file mode 100644 index 69237fd..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_pow.h +++ /dev/null @@ -1,84 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_pow.h -** \brief Header file for implementation of the "Power" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** Copyright (c) 2009 Nikita Kitaev -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_VALUENODE_POW_H -#define __SYNFIG_VALUENODE_POW_H - -/* === H E A D E R S ======================================================= */ - -#include "valuenode.h" - -/* === M A C R O S ========================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class ValueNode_Pow : public LinkableValueNode -{ - ValueNode::RHandle base_; - ValueNode::RHandle power_; - ValueNode::RHandle epsilon_; - ValueNode::RHandle infinite_; - -public: - typedef etl::handle Handle; - typedef etl::handle ConstHandle; - - ValueNode_Pow(const ValueBase &x); - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_Pow(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Pow* create(const ValueBase &x); -}; // END of class ValueNode_Pow - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_radialcomposite.cpp b/synfig-core/trunk/src/synfig/valuenode_radialcomposite.cpp deleted file mode 100644 index a889c78..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_radialcomposite.cpp +++ /dev/null @@ -1,315 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_radialcomposite.cpp -** \brief Implementation of the "Radial Composite" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_radialcomposite.h" -#include "valuenode_const.h" -#include -#include "general.h" -#include "color.h" -#include "savecanvas.h" -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -synfig::ValueNode_RadialComposite::ValueNode_RadialComposite(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - switch(get_type()) - { - case ValueBase::TYPE_VECTOR: - { - Vector vect(value.get(Vector())); - set_link("r",ValueNode_Const::create(vect.mag())); - set_link("t",ValueNode_Const::create(Angle(Angle::tan(vect[1],vect[0])))); - } - break; - case ValueBase::TYPE_COLOR: - set_link("y",ValueNode_Const::create(value.get(Color()).get_y())); - set_link("s",ValueNode_Const::create(value.get(Color()).get_s())); - set_link("h",ValueNode_Const::create(value.get(Color()).get_hue())); - set_link("a",ValueNode_Const::create(value.get(Color()).get_a())); - break; - default: - assert(0); - throw Exception::BadType(ValueBase::type_local_name(get_type())); - } -} - -ValueNode_RadialComposite::~ValueNode_RadialComposite() -{ - unlink_all(); -} - -ValueNode_RadialComposite* -ValueNode_RadialComposite::create(const ValueBase &value) -{ - return new ValueNode_RadialComposite(value); -} - -LinkableValueNode* -ValueNode_RadialComposite::create_new()const -{ - return new ValueNode_RadialComposite(ValueBase(get_type())); -} - -ValueBase -synfig::ValueNode_RadialComposite::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - switch(get_type()) - { - case ValueBase::TYPE_VECTOR: - { - Real mag; - Angle angle; - assert(components[0] && components[1]); - mag=(*components[0])(t).get(mag); - angle=(*components[1])(t).get(angle); - return Vector(Angle::cos(angle).get()*mag,Angle::sin(angle).get()*mag); - } - case ValueBase::TYPE_COLOR: - { - assert(components[0] && components[1] && components[2] && components[3]); - return Color::YUV( - (*components[0])(t).get(Real()), - (*components[1])(t).get(Real()), - (*components[2])(t).get(Angle()), - (*components[3])(t).get(Real()) - ); - } - default: - synfig::error(string("ValueNode_RadialComposite::operator():")+_("Bad type for radialcomposite")); - assert(components[0]); - return (*components[0])(t); - } -} - -int -ValueNode_RadialComposite::link_count()const -{ - switch(get_type()) - { - case ValueBase::TYPE_VECTOR: - return 2; - case ValueBase::TYPE_COLOR: - return 4; - default: - synfig::warning(string("ValueNode_RadialComposite::component_count():")+_("Bad type for radialcomposite")); - return 1; - } -} - -bool -ValueNode_RadialComposite::set_link_vfunc(int i,ValueNode::Handle x) -{ - assert(i>=0 && iget_type()!=ValueBase::TYPE_REAL) - return false; - if(i==1 && x->get_type()!=ValueBase::TYPE_ANGLE) - return false; - components[i]=x; - return true; - break; - - case ValueBase::TYPE_COLOR: - if((i==0 || i==1 || i==3) && x->get_type()!=ValueBase::TYPE_REAL) - return false; - if((i==2) && x->get_type()!=ValueBase::TYPE_ANGLE) - return false; - components[i]=x; - return true; - break; - - - default: - break; - } - return false; -} - -ValueNode::LooseHandle -ValueNode_RadialComposite::get_link_vfunc(int i)const -{ - assert(i>=0 && i=0 && i=0 && i= 0 && name[1]-'0' < link_count()) - return name[1]-'0'; - - switch(get_type()) - { - case ValueBase::TYPE_COLOR: - if(name[0]=='y') - return 0; - if(name[0]=='s') - return 1; - if(name[0]=='h') - return 2; - if(name[0]=='a') - return 3; - case ValueBase::TYPE_VECTOR: - if(name[0]=='r') - return 0; - if(name[0]=='t') - return 1; - default: - break; - } - - throw Exception::BadLinkName(name); -} - -String -ValueNode_RadialComposite::get_name()const -{ - return "radial_composite"; -} - -String -ValueNode_RadialComposite::get_local_name()const -{ - return _("Radial Composite"); -} - -bool -ValueNode_RadialComposite::check_type(ValueBase::Type type) -{ - return - type==ValueBase::TYPE_VECTOR || - type==ValueBase::TYPE_COLOR; -} diff --git a/synfig-core/trunk/src/synfig/valuenode_radialcomposite.h b/synfig-core/trunk/src/synfig/valuenode_radialcomposite.h deleted file mode 100644 index c9c06e3..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_radialcomposite.h +++ /dev/null @@ -1,77 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_radialcomposite.h -** \brief Header file for implementation of the "Radial Composite" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_VALUENODE_RADIALCOMPOSITE_H -#define __SYNFIG_VALUENODE_RADIALCOMPOSITE_H - -/* === H E A D E R S ======================================================= */ - -#include "valuenode.h" - -/* === M A C R O S ========================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class ValueNode_RadialComposite : public LinkableValueNode -{ - ValueNode::RHandle components[6]; - ValueNode_RadialComposite(const ValueBase &value); - -public: - typedef etl::handle Handle; - typedef etl::handle ConstHandle; - - - virtual ~ValueNode_RadialComposite(); - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - virtual String link_local_name(int i)const; - virtual ValueBase operator()(Time t)const; - - - virtual String get_name()const; - virtual String get_local_name()const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - - LinkableValueNode* create_new()const; - -public: - using synfig::LinkableValueNode::set_link_vfunc; - using synfig::LinkableValueNode::get_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_RadialComposite* create(const ValueBase &x); -}; // END of class ValueNode_RadialComposite - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_range.cpp b/synfig-core/trunk/src/synfig/valuenode_range.cpp deleted file mode 100644 index c45f369..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_range.cpp +++ /dev/null @@ -1,243 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_range.cpp -** \brief Implementation of the "Range" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "general.h" -#include "valuenode_range.h" -#include "valuenode_const.h" -#include -#include "vector.h" -#include "angle.h" -#include "real.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -synfig::ValueNode_Range::ValueNode_Range(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - ValueBase::Type id(value.get_type()); - - switch(id) - { - case ValueBase::TYPE_ANGLE: - set_link("min",ValueNode_Const::create(value.get(Angle()))); - set_link("max",ValueNode_Const::create(value.get(Angle()))); - set_link("link",ValueNode_Const::create(value.get(Angle()))); - break; - case ValueBase::TYPE_INTEGER: - set_link("min",ValueNode_Const::create(value.get(int()))); - set_link("max",ValueNode_Const::create(value.get(int()))); - set_link("link",ValueNode_Const::create(value.get(int()))); - break; - case ValueBase::TYPE_REAL: - set_link("min",ValueNode_Const::create(value.get(Real()))); - set_link("max",ValueNode_Const::create(value.get(Real()))); - set_link("link",ValueNode_Const::create(value.get(Real()))); - break; - case ValueBase::TYPE_TIME: - set_link("min",ValueNode_Const::create(value.get(Time()))); - set_link("max",ValueNode_Const::create(value.get(Time()))); - set_link("link",ValueNode_Const::create(value.get(Time()))); - break; - default: - assert(0); - throw runtime_error(get_local_name()+_(":Bad type ")+ValueBase::type_local_name(id)); - } - - assert(min_->get_type()==id); - assert(max_->get_type()==id); - assert(link_->get_type()==id); - assert(get_type()==id); - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_Range::create_new()const -{ - return new ValueNode_Range(get_type()); -} - -ValueNode_Range* -ValueNode_Range::create(const ValueBase& value) -{ - return new ValueNode_Range(value); -} - -synfig::ValueNode_Range::~ValueNode_Range() -{ - unlink_all(); -} - -synfig::ValueBase -synfig::ValueNode_Range::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - if(!min_ || !max_ || !link_) - throw runtime_error(strprintf("ValueNode_Range: %s",_("Some of my parameters aren't set!"))); - - switch(get_type()) - { - case ValueBase::TYPE_ANGLE: - { - Angle minimum = (* min_)(t).get(Angle()); - Angle maximum = (* max_)(t).get(Angle()); - Angle link = (*link_)(t).get(Angle()); - - // if link is between min and max, use it - if (Angle::deg((link-minimum).mod()).get() < Angle::deg((maximum-minimum).mod()).get()) - return link; - // otherwise use whichever of min and max is closest to link - else if (link.dist(minimum).abs() < link.dist(maximum).abs()) - return minimum; - else - return maximum; - } - case ValueBase::TYPE_INTEGER: - return std::max((*min_)(t).get(int()), std::min((*max_)(t).get(int()), (*link_)(t).get(int()))); - case ValueBase::TYPE_REAL: - return std::max((*min_)(t).get(Real()), std::min((*max_)(t).get(Real()), (*link_)(t).get(Real()))); - case ValueBase::TYPE_TIME: - return std::max((*min_)(t).get(Time()), std::min((*max_)(t).get(Time()), (*link_)(t).get(Time()))); - default: - assert(0); - break; - } - return ValueBase(); -} - -bool -ValueNode_Range::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_Range(); - - virtual String get_name()const; - virtual String get_local_name()const; - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - LinkableValueNode* create_new()const; - -public: - using synfig::LinkableValueNode::get_link_vfunc; - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Range* create(const ValueBase &value=ValueBase()); -}; // END of class ValueNode_Range - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_realstring.cpp b/synfig-core/trunk/src/synfig/valuenode_realstring.cpp deleted file mode 100644 index e8231e7..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_realstring.cpp +++ /dev/null @@ -1,210 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_realstring.cpp -** \brief Implementation of the "RealString" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_realstring.h" -#include "valuenode_const.h" -#include "canvas.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_RealString::ValueNode_RealString(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - switch(value.get_type()) - { - case ValueBase::TYPE_STRING: - set_link("real",ValueNode_Const::create(Real(0))); - set_link("width",ValueNode_Const::create(int(0))); - set_link("precision",ValueNode_Const::create(int(3))); - set_link("zero_pad",ValueNode_Const::create(bool(false))); - break; - default: - throw Exception::BadType(ValueBase::type_local_name(value.get_type())); - } - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_RealString::create_new()const -{ - return new ValueNode_RealString(get_type()); -} - -ValueNode_RealString* -ValueNode_RealString::create(const ValueBase &x) -{ - return new ValueNode_RealString(x); -} - -ValueNode_RealString::~ValueNode_RealString() -{ - unlink_all(); -} - -ValueBase -ValueNode_RealString::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - Real real((*real_)(t).get(Real())); - int width((*width_)(t).get(int())); - int precision((*precision_)(t).get(int())); - int zero_pad((*zero_pad_)(t).get(bool())); - - switch (get_type()) - { - case ValueBase::TYPE_STRING: - return strprintf(strprintf("%%%s%d.%df", - zero_pad ? "0" : "", - width, - precision).c_str(), real); - default: - break; - } - - assert(0); - return ValueBase(); -} - -String -ValueNode_RealString::get_name()const -{ - return "realstring"; -} - -String -ValueNode_RealString::get_local_name()const -{ - return _("Real String"); -} - -bool -ValueNode_RealString::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_RealString(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_RealString* create(const ValueBase &x); -}; // END of class ValueNode_RealString - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_reciprocal.cpp b/synfig-core/trunk/src/synfig/valuenode_reciprocal.cpp deleted file mode 100644 index d31a995..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_reciprocal.cpp +++ /dev/null @@ -1,189 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_reciprocal.cpp -** \brief Implementation of the "Reciprocal" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_reciprocal.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Reciprocal::ValueNode_Reciprocal(const ValueBase &x): - LinkableValueNode(x.get_type()) -{ - Real value(x.get(Real())); - Real infinity(999999.0); - Real epsilon(0.000001); - - if (value == 0) - value = infinity; - else - value = 1.0/value; - - set_link("link", ValueNode_Const::create(Real(value))); - set_link("epsilon", ValueNode_Const::create(Real(epsilon))); - set_link("infinite", ValueNode_Const::create(Real(infinity))); -} - -ValueNode_Reciprocal* -ValueNode_Reciprocal::create(const ValueBase &x) -{ - return new ValueNode_Reciprocal(x); -} - -LinkableValueNode* -ValueNode_Reciprocal::create_new()const -{ - return new ValueNode_Reciprocal(get_type()); -} - -ValueNode_Reciprocal::~ValueNode_Reciprocal() -{ - unlink_all(); -} - -bool -ValueNode_Reciprocal::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - ValueNode_Reciprocal(const ValueBase &x); - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_Reciprocal(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Reciprocal* create(const ValueBase &x); -}; // END of class ValueNode_Reciprocal - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_reference.cpp b/synfig-core/trunk/src/synfig/valuenode_reference.cpp deleted file mode 100644 index a235f02..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_reference.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_reference.cpp -** \brief Implementation of the "Reference" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_reference.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Reference::ValueNode_Reference(const ValueBase::Type &x): - LinkableValueNode(x) -{ -} - -ValueNode_Reference::ValueNode_Reference(const ValueNode::Handle &x): - LinkableValueNode(x->get_type()) -{ - set_link("link",x); -} - -ValueNode_Reference* -ValueNode_Reference::create(const ValueBase &x) -{ - return new ValueNode_Reference(ValueNode_Const::create(x)); -} - -LinkableValueNode* -ValueNode_Reference::create_new()const -{ - return new ValueNode_Reference(get_type()); -} - -ValueNode_Reference::~ValueNode_Reference() -{ - unlink_all(); -} - -bool -ValueNode_Reference::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - ValueNode_Reference(const ValueBase::Type &x); - - ValueNode_Reference(const ValueNode::Handle &x); - -// static Handle create(const ValueBase::Type &x); -// static Handle create(const ValueNode::Handle &x); - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - - virtual int link_count()const; - - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_Reference(); - - virtual String get_name()const; - - virtual String get_local_name()const; - -protected: - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - - LinkableValueNode* create_new()const; - -public: - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Reference* create(const ValueBase &x); -}; // END of class ValueNode_Reference - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_repeat_gradient.cpp b/synfig-core/trunk/src/synfig/valuenode_repeat_gradient.cpp deleted file mode 100644 index c9ad14a..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_repeat_gradient.cpp +++ /dev/null @@ -1,244 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_repeat_gradient.cpp -** \brief Implementation of the "Repeat Gradient" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "general.h" -#include "valuenode_repeat_gradient.h" -#include "valuenode_const.h" -#include -#include "color.h" -#include "gradient.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -synfig::ValueNode_Repeat_Gradient::ValueNode_Repeat_Gradient(const Gradient& x):LinkableValueNode(synfig::ValueBase::TYPE_GRADIENT) -{ - set_link("gradient",ValueNode_Const::create(x)); - set_link("count",count_=ValueNode_Const::create(int(3))); - set_link("width",ValueNode_Const::create(0.5)); - set_link("specify_start",ValueNode_Const::create(true)); - set_link("specify_end",ValueNode_Const::create(true)); - set_link("start_color",ValueNode_Const::create(Color::alpha())); - set_link("end_color",ValueNode_Const::create(Color::alpha())); -} - -LinkableValueNode* -ValueNode_Repeat_Gradient::create_new()const -{ - return new ValueNode_Repeat_Gradient(Gradient()); -} - -ValueNode_Repeat_Gradient* -ValueNode_Repeat_Gradient::create(const ValueBase& x) -{ - ValueBase::Type id(x.get_type()); - - if(id!=ValueBase::TYPE_GRADIENT) - { - assert(0); - throw runtime_error(String(_("Repeat Gradient"))+_(":Bad type ")+ValueBase::type_local_name(id)); - } - - ValueNode_Repeat_Gradient* value_node=new ValueNode_Repeat_Gradient(x.get(Gradient())); - - assert(value_node->get_type()==id); - - return value_node; -} - -synfig::ValueNode_Repeat_Gradient::~ValueNode_Repeat_Gradient() -{ - unlink_all(); -} - -synfig::ValueBase -synfig::ValueNode_Repeat_Gradient::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - const int count((*count_)(t).get(int())); - int i; - Gradient ret; - - if(count<=0) - return ret; - - const Gradient gradient((*gradient_)(t).get(Gradient())); - const float width(max(0.0,min(1.0,(*width_)(t).get(Real())))); - const bool specify_start((*specify_start_)(t).get(bool())); - const bool specify_end((*specify_end_)(t).get(bool())); - - const float gradient_width_a(width/count); - const float gradient_width_b((1.0-width)/count); - - Gradient::const_iterator iter; - Gradient::const_reverse_iterator riter; - if (specify_start) - ret.push_back(Gradient::CPoint(0,(*start_color_)(t).get(Color()))); - for(i=0;ipos,iter->color)); - pos+=gradient_width_a; - if (width != 1.0) - for(riter=gradient.rbegin();riter!=gradient.rend();riter++) - ret.push_back(Gradient::CPoint(pos+gradient_width_b*(1-(riter->pos)),riter->color)); - } - if (specify_end) - ret.push_back(Gradient::CPoint(1,(*end_color_)(t).get(Color()))); - return ret; -} - -bool -ValueNode_Repeat_Gradient::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - -protected: - - ValueNode_Repeat_Gradient(const Gradient& x); - -private: - - ValueNode::RHandle gradient_; - ValueNode::RHandle count_; - ValueNode::RHandle width_; - ValueNode::RHandle specify_start_; - ValueNode::RHandle specify_end_; - ValueNode::RHandle start_color_; - ValueNode::RHandle end_color_; - -public: - - virtual ~ValueNode_Repeat_Gradient(); - - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - - virtual int link_count()const; - - virtual String link_local_name(int i)const; - virtual String link_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - - virtual ValueBase operator()(Time t)const; - - virtual String get_name()const; - virtual String get_local_name()const; - -// static bool check_type(const ValueBase::Type &type); - - LinkableValueNode* create_new()const; - -public: - using synfig::LinkableValueNode::get_link_vfunc; - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Repeat_Gradient* create(const ValueBase &x=ValueBase::TYPE_GRADIENT); -}; // END of class ValueNode_Repeat_Gradient - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_scale.cpp b/synfig-core/trunk/src/synfig/valuenode_scale.cpp deleted file mode 100644 index b272d7d..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_scale.cpp +++ /dev/null @@ -1,277 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_scale.cpp -** \brief Implementation of the "Scale" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "general.h" -#include "valuenode_scale.h" -#include "valuenode_const.h" -#include -#include "color.h" -#include "vector.h" -#include "time.h" -#include "angle.h" -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Scale::ValueNode_Scale(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - set_link("scalar",ValueNode::Handle(ValueNode_Const::create(Real(1.0)))); - ValueBase::Type id(value.get_type()); - - switch(id) - { - case ValueBase::TYPE_ANGLE: - set_link("link",ValueNode_Const::create(value.get(Angle()))); - break; - case ValueBase::TYPE_COLOR: - set_link("link",ValueNode_Const::create(value.get(Color()))); - break; - case ValueBase::TYPE_INTEGER: - set_link("link",ValueNode_Const::create(value.get(int()))); - break; - case ValueBase::TYPE_REAL: - set_link("link",ValueNode_Const::create(value.get(Real()))); - break; - case ValueBase::TYPE_TIME: - set_link("link",ValueNode_Const::create(value.get(Time()))); - break; - case ValueBase::TYPE_VECTOR: - set_link("link",ValueNode_Const::create(value.get(Vector()))); - break; - default: - assert(0); - throw runtime_error(get_local_name()+_(":Bad type ")+ValueBase::type_local_name(id)); - } - - assert(value_node); - assert(value_node->get_type()==id); - assert(get_type()==id); -} - -LinkableValueNode* -ValueNode_Scale::create_new()const -{ - return new ValueNode_Scale(get_type()); -} - -ValueNode_Scale* -ValueNode_Scale::create(const ValueBase& value) -{ - return new ValueNode_Scale(value); -} - -synfig::ValueNode_Scale::~ValueNode_Scale() -{ - unlink_all(); -} - -synfig::ValueBase -synfig::ValueNode_Scale::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - if(!value_node || !scalar) - throw runtime_error(strprintf("ValueNode_Scale: %s",_("One or both of my parameters aren't set!"))); - else if(get_type()==ValueBase::TYPE_ANGLE) - return (*value_node)(t).get(Angle())*(*scalar)(t).get(Real()); - else if(get_type()==ValueBase::TYPE_COLOR) - { - Color ret((*value_node)(t).get(Color())); - Real s((*scalar)(t).get(Real())); - ret.set_r(ret.get_r()*s); - ret.set_g(ret.get_g()*s); - ret.set_b(ret.get_b()*s); - return ret; - } - else if(get_type()==ValueBase::TYPE_INTEGER) - return round_to_int((*value_node)(t).get(int())*(*scalar)(t).get(Real())); - else if(get_type()==ValueBase::TYPE_REAL) - return (*value_node)(t).get(Real())*(*scalar)(t).get(Real()); - else if(get_type()==ValueBase::TYPE_TIME) - return (*value_node)(t).get(Time())*(*scalar)(t).get(Time()); - else if(get_type()==ValueBase::TYPE_VECTOR) - return (*value_node)(t).get(Vector())*(*scalar)(t).get(Real()); - - assert(0); - return ValueBase(); -} - -synfig::ValueBase -synfig::ValueNode_Scale::get_inverse(Time t, const synfig::Vector &target_value) const -{ - Real scalar_value((*scalar)(t).get(Real())); - if(scalar_value==0) - throw runtime_error(strprintf("ValueNode_Scale: %s",_("Attempting to get the inverse of a non invertible Valuenode"))); - else - { - switch (get_type()) - { - case ValueBase::TYPE_REAL: - return target_value.mag() / scalar_value; - case ValueBase::TYPE_ANGLE: - return Angle::tan(target_value[1] / scalar_value ,target_value[0] / scalar_value); - default: - return target_value / scalar_value; - } - } - return ValueBase(); -} - -synfig::ValueBase -synfig::ValueNode_Scale::get_inverse(Time t, const synfig::Angle &target_value) const -{ - Real scalar_value((*scalar)(t).get(Real())); - if(scalar_value==0) - throw runtime_error(strprintf("ValueNode_Scale: %s",_("Attempting to get the inverse of a non invertible Valuenode"))); - else - { - switch (get_type()) - { - default: - return (*value_node)(t).get(Angle()) + target_value / scalar_value; - } - } - return ValueBase(); -} - -bool -synfig::ValueNode_Scale::is_invertible(Time t) const -{ - Real scalar_value((*scalar)(t).get(Real())); - return (!scalar_value==0); -} - -bool -ValueNode_Scale::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - -private: - ValueNode::RHandle value_node; - ValueNode::RHandle scalar; - - ValueNode_Scale(const ValueBase &value); - -public: - - //static Handle create(ValueBase::Type id=ValueBase::TYPE_NIL); - - //static Handle create(ValueNode::Handle value_node, Real scalar); - - virtual ~ValueNode_Scale(); - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - - virtual int link_count()const; - - virtual String link_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - - virtual ValueBase operator()(Time t)const; - - //! Returns the modified Link to match the target value at time t - ValueBase get_inverse(Time t, const synfig::Vector &target_value) const; - ValueBase get_inverse(Time t, const synfig::Angle &target_value) const; - - bool is_invertible(Time t)const; - - virtual String get_name()const; - - virtual String get_local_name()const; - - virtual String link_local_name(int i)const; - -protected: - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - - virtual LinkableValueNode* create_new()const; - -public: - using synfig::LinkableValueNode::get_link_vfunc; - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Scale* create(const ValueBase &x); -}; // END of class ValueNode_Scale - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_segcalctangent.cpp b/synfig-core/trunk/src/synfig/valuenode_segcalctangent.cpp deleted file mode 100644 index 245bf62..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_segcalctangent.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_segcalctangent.cpp -** \brief Implementation of the "Segment Tangent" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_segcalctangent.h" -#include "valuenode_const.h" -#include "valuenode_composite.h" -#include "general.h" -#include "exception.h" -#include -#include -#include "segment.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_SegCalcTangent::ValueNode_SegCalcTangent(const ValueBase::Type &x): - LinkableValueNode(x) -{ - if(x!=ValueBase::TYPE_VECTOR) - throw Exception::BadType(ValueBase::type_local_name(x)); - - set_link("segment",ValueNode_Const::create(ValueBase::TYPE_SEGMENT)); - set_link("amount",ValueNode_Const::create(Real(0.5))); -} - -ValueNode_SegCalcTangent* -ValueNode_SegCalcTangent::create(const ValueBase &x) -{ - return new ValueNode_SegCalcTangent(x.get_type()); -} - -ValueNode_SegCalcTangent::~ValueNode_SegCalcTangent() -{ - unlink_all(); -} - -ValueBase -ValueNode_SegCalcTangent::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - Segment segment((*segment_)(t).get(Segment())); - - etl::hermite curve(segment.p1,segment.p2,segment.t1,segment.t2); - etl::derivative< etl::hermite > deriv(curve); - - return deriv((*amount_)(t).get(Real())); -} - - -String -ValueNode_SegCalcTangent::get_name()const -{ - return "segcalctangent"; -} - -String -ValueNode_SegCalcTangent::get_local_name()const -{ - return _("Segment Tangent"); -} - -bool -ValueNode_SegCalcTangent::check_type(ValueBase::Type type) -{ - return type==ValueBase::TYPE_VECTOR; -} - -bool -ValueNode_SegCalcTangent::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - //static Handle create(const ValueBase::Type &x=ValueBase::TYPE_VECTOR); - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_SegCalcTangent(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - LinkableValueNode* create_new()const; - -public: - using synfig::LinkableValueNode::get_link_vfunc; - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_SegCalcTangent* create(const ValueBase &x=ValueBase::TYPE_VECTOR); -}; // END of class ValueNode_SegCalcTangent - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_segcalcvertex.cpp b/synfig-core/trunk/src/synfig/valuenode_segcalcvertex.cpp deleted file mode 100644 index 6391f39..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_segcalcvertex.cpp +++ /dev/null @@ -1,181 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_segcalcvertex.cpp -** \brief Implementation of the "Segment Vertex" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_segcalcvertex.h" -#include "valuenode_const.h" -#include "valuenode_composite.h" -#include "general.h" -#include "exception.h" -#include -#include "segment.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_SegCalcVertex::ValueNode_SegCalcVertex(const ValueBase::Type &x): - LinkableValueNode(x) -{ - if(x!=ValueBase::TYPE_VECTOR) - throw Exception::BadType(ValueBase::type_local_name(x)); - - set_link("segment",ValueNode_Const::create(ValueBase::TYPE_SEGMENT)); - set_link("amount",ValueNode_Const::create(Real(0.5))); -} - -ValueNode_SegCalcVertex* -ValueNode_SegCalcVertex::create(const ValueBase &x) -{ - return new ValueNode_SegCalcVertex(x.get_type()); -} - -ValueNode_SegCalcVertex::~ValueNode_SegCalcVertex() -{ - unlink_all(); -} - -ValueBase -ValueNode_SegCalcVertex::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - Segment segment((*segment_)(t).get(Segment())); - - etl::hermite curve(segment.p1,segment.p2,segment.t1,segment.t2); - - return curve((*amount_)(t).get(Real())); -} - - -String -ValueNode_SegCalcVertex::get_name()const -{ - return "segcalcvertex"; -} - -String -ValueNode_SegCalcVertex::get_local_name()const -{ - return _("Segment Vertex"); -} - -bool -ValueNode_SegCalcVertex::check_type(ValueBase::Type type) -{ - return type==ValueBase::TYPE_VECTOR; -} - -bool -ValueNode_SegCalcVertex::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - -// static Handle create(const ValueBase::Type &x=ValueBase::TYPE_VECTOR); - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_SegCalcVertex(); - - virtual String get_name()const; - virtual String get_local_name()const; -// static bool check_type(const ValueBase::Type &type); - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_SegCalcVertex* create(const ValueBase &x=ValueBase::TYPE_VECTOR); -}; // END of class ValueNode_SegCalcVertex - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_sine.cpp b/synfig-core/trunk/src/synfig/valuenode_sine.cpp deleted file mode 100644 index 6e42dc7..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_sine.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_sine.cpp -** \brief Implementation of the "Sine" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_sine.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Sine::ValueNode_Sine(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - switch(value.get_type()) - { - case ValueBase::TYPE_REAL: - set_link("angle",ValueNode_Const::create(Angle::deg(90))); - set_link("amp",ValueNode_Const::create(value.get(Real()))); - break; - default: - throw Exception::BadType(ValueBase::type_local_name(value.get_type())); - } - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_Sine::create_new()const -{ - return new ValueNode_Sine(get_type()); -} - -ValueNode_Sine* -ValueNode_Sine::create(const ValueBase &x) -{ - return new ValueNode_Sine(x); -} - -ValueNode_Sine::~ValueNode_Sine() -{ - unlink_all(); -} - -ValueBase -ValueNode_Sine::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - return - Angle::sin( - (*angle_)(t).get(Angle()) - ).get() * (*amp_)(t).get(Real()) - ; -} - - -String -ValueNode_Sine::get_name()const -{ - return "sine"; -} - -String -ValueNode_Sine::get_local_name()const -{ - return _("Sine"); -} - -bool -ValueNode_Sine::check_type(ValueBase::Type type) -{ - return type==ValueBase::TYPE_REAL; -} - -bool -ValueNode_Sine::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_Sine(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Sine* create(const ValueBase &x); -}; // END of class ValueNode_Sine - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_step.cpp b/synfig-core/trunk/src/synfig/valuenode_step.cpp deleted file mode 100644 index 98d9d80..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_step.cpp +++ /dev/null @@ -1,234 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_step.cpp -** \brief Implementation of the "Step" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_step.h" -#include "valuenode_const.h" -#include "general.h" -#include "color.h" -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Step::ValueNode_Step(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - set_link("duration", ValueNode_Const::create(Time(1))); - set_link("start_time", ValueNode_Const::create(Time(0))); - set_link("intersection", ValueNode_Const::create(Real(0.5))); - - switch(get_type()) - { - case ValueBase::TYPE_ANGLE: - set_link("link",ValueNode_Const::create(value.get(Angle()))); - break; - case ValueBase::TYPE_COLOR: - set_link("link",ValueNode_Const::create(value.get(Color()))); - break; - case ValueBase::TYPE_INTEGER: - set_link("link",ValueNode_Const::create(value.get(int()))); - break; - case ValueBase::TYPE_REAL: - set_link("link",ValueNode_Const::create(value.get(Real()))); - break; - case ValueBase::TYPE_TIME: - set_link("link",ValueNode_Const::create(value.get(Time()))); - break; - case ValueBase::TYPE_VECTOR: - set_link("link",ValueNode_Const::create(value.get(Vector()))); - break; - default: - throw Exception::BadType(ValueBase::type_local_name(get_type())); - } - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_Step::create_new()const -{ - return new ValueNode_Step(get_type()); -} - -ValueNode_Step* -ValueNode_Step::create(const ValueBase &x) -{ - return new ValueNode_Step(x); -} - -ValueNode_Step::~ValueNode_Step() -{ - unlink_all(); -} - -ValueBase -ValueNode_Step::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - Time duration ((*duration_ )(t).get(Time())); - Time start_time ((*start_time_ )(t).get(Time())); - Real intersection((*intersection_)(t).get(Real())); - - t = (floor((t - start_time) / duration) + intersection) * duration + start_time; - - switch(get_type()) - { - case ValueBase::TYPE_ANGLE: return (*link_)(t).get( Angle()); - case ValueBase::TYPE_COLOR: return (*link_)(t).get( Color()); - case ValueBase::TYPE_INTEGER: return (*link_)(t).get( int()); - case ValueBase::TYPE_REAL: return (*link_)(t).get( Real()); - case ValueBase::TYPE_TIME: return (*link_)(t).get( Time()); - case ValueBase::TYPE_VECTOR: return (*link_)(t).get(Vector()); - default: - assert(0); - return ValueBase(); - } -} - - -String -ValueNode_Step::get_name()const -{ - return "step"; -} - -String -ValueNode_Step::get_local_name()const -{ - return _("Step"); -} - -bool -ValueNode_Step::check_type(ValueBase::Type type) -{ - return - type==ValueBase::TYPE_ANGLE || - type==ValueBase::TYPE_COLOR || - type==ValueBase::TYPE_INTEGER || - type==ValueBase::TYPE_REAL || - type==ValueBase::TYPE_TIME || - type==ValueBase::TYPE_VECTOR ; -} - -bool -ValueNode_Step::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_Step(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Step* create(const ValueBase &x); -}; // END of class ValueNode_Step - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_stripes.cpp b/synfig-core/trunk/src/synfig/valuenode_stripes.cpp deleted file mode 100644 index ce4b694..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_stripes.cpp +++ /dev/null @@ -1,235 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_stripes.cpp -** \brief Implementation of the "Stripes" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "general.h" -#include "valuenode_stripes.h" -#include "valuenode_const.h" -#include -#include "color.h" -#include "gradient.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -synfig::ValueNode_Stripes::ValueNode_Stripes():LinkableValueNode(synfig::ValueBase::TYPE_GRADIENT) -{ - set_link("color1",ValueNode_Const::create(Color::alpha())); - set_link("color2",ValueNode_Const::create(Color::black())); - set_link("stripes",stripes_=ValueNode_Const::create(int(5))); - set_link("width",ValueNode_Const::create(0.5)); -} - -LinkableValueNode* -ValueNode_Stripes::create_new()const -{ - return new ValueNode_Stripes(); -} - -ValueNode_Stripes* -ValueNode_Stripes::create(const ValueBase& x) -{ - ValueBase::Type id(x.get_type()); - - if(id!=ValueBase::TYPE_GRADIENT) - { - assert(0); - throw runtime_error(String(_("Stripes"))+_(":Bad type ")+ValueBase::type_local_name(id)); - } - - ValueNode_Stripes* value_node=new ValueNode_Stripes(); - - assert(value_node->get_type()==id); - - return value_node; -} - -synfig::ValueNode_Stripes::~ValueNode_Stripes() -{ - unlink_all(); -} - -synfig::ValueBase -synfig::ValueNode_Stripes::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - const int total((*stripes_)(t).get(int())); - int i; - Gradient ret; - - if(total<=0) - return ret; - - const Color color1((*color1_)(t).get(Color())); - const Color color2((*color2_)(t).get(Color())); - const float width(max(0.0,min(1.0,(*width_)(t).get(Real())))); - - const float stripe_width_a(width/total); - const float stripe_width_b((1.0-width)/total); - - for(i=0;i=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - -protected: - - ValueNode_Stripes(); - -private: - - ValueNode::RHandle color1_; - ValueNode::RHandle color2_; - ValueNode::RHandle stripes_; - ValueNode::RHandle width_; - -public: - - virtual ~ValueNode_Stripes(); - - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - - virtual int link_count()const; - - virtual String link_local_name(int i)const; - virtual String link_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - - virtual ValueBase operator()(Time t)const; - - virtual String get_name()const; - virtual String get_local_name()const; - -// static bool check_type(const ValueBase::Type &type); - - LinkableValueNode* create_new()const; - -public: - using synfig::LinkableValueNode::get_link_vfunc; - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Stripes* create(const ValueBase &x=ValueBase::TYPE_GRADIENT); -}; // END of class ValueNode_Stripes - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_subtract.cpp b/synfig-core/trunk/src/synfig/valuenode_subtract.cpp deleted file mode 100644 index 3ba475e..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_subtract.cpp +++ /dev/null @@ -1,249 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_subtract.cpp -** \brief Implementation of the "Subtract" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "general.h" -#include "valuenode_subtract.h" -#include "valuenode_const.h" -#include -#include "color.h" -#include "gradient.h" -#include "vector.h" -#include "angle.h" -#include "real.h" -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -synfig::ValueNode_Subtract::ValueNode_Subtract(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - set_link("scalar",ValueNode_Const::create(Real(1.0))); - ValueBase::Type id(value.get_type()); - - switch(id) - { - case ValueBase::TYPE_ANGLE: - set_link("lhs",ValueNode_Const::create(value.get(Angle()))); - set_link("rhs",ValueNode_Const::create(Angle::deg(0))); - break; - case ValueBase::TYPE_COLOR: - set_link("lhs",ValueNode_Const::create(value.get(Color()))); - set_link("rhs",ValueNode_Const::create(Color(0,0,0,0))); - break; - case ValueBase::TYPE_GRADIENT: - set_link("lhs",ValueNode_Const::create(value.get(Gradient()))); - set_link("rhs",ValueNode_Const::create(Gradient())); - break; - case ValueBase::TYPE_INTEGER: - set_link("lhs",ValueNode_Const::create(value.get(int()))); - set_link("rhs",ValueNode_Const::create(int(0))); - break; - case ValueBase::TYPE_REAL: - set_link("lhs",ValueNode_Const::create(value.get(Real()))); - set_link("rhs",ValueNode_Const::create(Real(0))); - break; - case ValueBase::TYPE_TIME: - set_link("lhs",ValueNode_Const::create(value.get(Time()))); - set_link("rhs",ValueNode_Const::create(Time(0))); - break; - case ValueBase::TYPE_VECTOR: - set_link("lhs",ValueNode_Const::create(value.get(Vector()))); - set_link("rhs",ValueNode_Const::create(Vector(0,0))); - break; - default: - assert(0); - throw runtime_error(get_local_name()+_(":Bad type ")+ValueBase::type_local_name(id)); - } - - assert(ref_a->get_type()==id); - assert(ref_b->get_type()==id); - assert(get_type()==id); - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_Subtract::create_new()const -{ - return new ValueNode_Subtract(get_type()); -} - -ValueNode_Subtract* -ValueNode_Subtract::create(const ValueBase& value) -{ - return new ValueNode_Subtract(value); -} - -synfig::ValueNode_Subtract::~ValueNode_Subtract() -{ - unlink_all(); -} - -synfig::ValueBase -synfig::ValueNode_Subtract::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - if(!ref_a || !ref_b) - throw runtime_error(strprintf("ValueNode_Subtract: %s",_("One or both of my parameters aren't set!"))); - switch(get_type()) - { - case ValueBase::TYPE_ANGLE: - return ((*ref_a)(t).get(Angle())-(*ref_b)(t).get(Angle()))*(*scalar)(t).get(Real()); - case ValueBase::TYPE_COLOR: - return ((*ref_a)(t).get(Color())-(*ref_b)(t).get(Color()))*(*scalar)(t).get(Real()); - case ValueBase::TYPE_GRADIENT: - return ((*ref_a)(t).get(Gradient())-(*ref_b)(t).get(Gradient()))*(*scalar)(t).get(Real()); - case ValueBase::TYPE_INTEGER: - return round_to_int(((*ref_a)(t).get(int())-(*ref_b)(t).get(int()))*(*scalar)(t).get(Real())); - case ValueBase::TYPE_REAL: - return ((*ref_a)(t).get(Vector::value_type())-(*ref_b)(t).get(Vector::value_type()))*(*scalar)(t).get(Real()); - case ValueBase::TYPE_TIME: - return ((*ref_a)(t).get(Time())-(*ref_b)(t).get(Time()))*(*scalar)(t).get(Real()); - case ValueBase::TYPE_VECTOR: - return ((*ref_a)(t).get(Vector())-(*ref_b)(t).get(Vector()))*(*scalar)(t).get(Real()); - default: - assert(0); - break; - } - return ValueBase(); -} - -bool -ValueNode_Subtract::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - -protected: - ValueNode_Subtract(const ValueBase &value); - -private: - ValueNode::RHandle ref_a; - ValueNode::RHandle ref_b; - ValueNode::RHandle scalar; - -public: - LinkableValueNode* create_new()const; - static ValueNode_Subtract* create(const ValueBase &value=ValueBase()); - virtual ~ValueNode_Subtract(); - virtual ValueBase operator()(Time t)const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_local_name(int i)const; - virtual String link_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - virtual String get_name()const; - virtual String get_local_name()const; - static bool check_type(ValueBase::Type type); - - //! Gets the left-hand-side value_node - ValueNode::Handle get_lhs()const { return ref_a; } - - //! Gets the right-hand-side value_node - ValueNode::Handle get_rhs()const { return ref_b; } - - //! Gets the scalar value_node - ValueNode::Handle get_scalar()const { return scalar; } - -}; // END of class ValueNode_Subtract - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_switch.cpp b/synfig-core/trunk/src/synfig/valuenode_switch.cpp deleted file mode 100644 index 195bd95..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_switch.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_switch.cpp -** \brief Implementation of the "Switch" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_switch.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_Switch::ValueNode_Switch(const ValueBase::Type &x): - LinkableValueNode(x) -{ -} - -ValueNode_Switch::ValueNode_Switch(const ValueNode::Handle &x): - LinkableValueNode(x->get_type()) -{ - set_link("link_off",x); - set_link("link_on",x); - set_link("switch",ValueNode_Const::create(bool(false))); -} - -ValueNode_Switch* -ValueNode_Switch::create(const ValueBase &x) -{ - return new ValueNode_Switch(ValueNode_Const::create(x)); -} - -LinkableValueNode* -ValueNode_Switch::create_new()const -{ - return new ValueNode_Switch(get_type()); -} - -ValueNode_Switch::~ValueNode_Switch() -{ - unlink_all(); -} - -bool -ValueNode_Switch::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - ValueNode_Switch(const ValueBase::Type &x); - - ValueNode_Switch(const ValueNode::Handle &x); - -// static Handle create(const ValueBase::Type &x); -// static Handle create(const ValueNode::Handle &x); - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - - virtual int link_count()const; - - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_Switch(); - - virtual String get_name()const; - - virtual String get_local_name()const; - -protected: - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - - LinkableValueNode* create_new()const; - -public: - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_Switch* create(const ValueBase &x); -}; // END of class ValueNode_Switch - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_timedswap.cpp b/synfig-core/trunk/src/synfig/valuenode_timedswap.cpp deleted file mode 100644 index 378535a..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_timedswap.cpp +++ /dev/null @@ -1,280 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_timedswap.cpp -** \brief Implementation of the "Timed Swap" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "general.h" -#include "valuenode_timedswap.h" -#include "valuenode_const.h" -#include -#include "color.h" -#include - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_TimedSwap::ValueNode_TimedSwap(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - switch(get_type()) - { - case ValueBase::TYPE_ANGLE: - set_link("before",ValueNode_Const::create(value.get(Angle()))); - set_link("after",ValueNode_Const::create(value.get(Angle()))); - break; - case ValueBase::TYPE_COLOR: - set_link("before",ValueNode_Const::create(value.get(Color()))); - set_link("after",ValueNode_Const::create(value.get(Color()))); - break; - case ValueBase::TYPE_INTEGER: - set_link("before",ValueNode_Const::create(value.get(int()))); - set_link("after",ValueNode_Const::create(value.get(int()))); - break; - case ValueBase::TYPE_REAL: - set_link("before",ValueNode_Const::create(value.get(Real()))); - set_link("after",ValueNode_Const::create(value.get(Real()))); - break; - case ValueBase::TYPE_TIME: - set_link("before",ValueNode_Const::create(value.get(Time()))); - set_link("after",ValueNode_Const::create(value.get(Time()))); - break; - case ValueBase::TYPE_VECTOR: - set_link("before",ValueNode_Const::create(value.get(Vector()))); - set_link("after",ValueNode_Const::create(value.get(Vector()))); - break; - default: - throw Exception::BadType(ValueBase::type_local_name(get_type())); - } - - set_link("time",ValueNode_Const::create(Time(2))); - set_link("length",ValueNode_Const::create(Time(1))); - - DCAST_HACK_ENABLE(); -} - -ValueNode_TimedSwap* -ValueNode_TimedSwap::create(const ValueBase& x) -{ - return new ValueNode_TimedSwap(x); -} - -LinkableValueNode* -ValueNode_TimedSwap::create_new()const -{ - return new ValueNode_TimedSwap(get_type()); -} - -synfig::ValueNode_TimedSwap::~ValueNode_TimedSwap() -{ - unlink_all(); -} - -synfig::ValueBase -synfig::ValueNode_TimedSwap::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - Time swptime=(*swap_time)(t).get(Time()); - Time swplength=(*swap_length)(t).get(Time()); - - if(t>swptime) - return (*after)(t); - - if(t<=swptime && t>swptime-swplength) - { - Real amount=(swptime-t)/swplength; - // if amount==0.0, then we are after - // if amount==1.0, then we are before - - switch(get_type()) - { - case ValueBase::TYPE_ANGLE: - { - Angle a=(*after)(t).get(Angle()); - Angle b=(*before)(t).get(Angle()); - return (b-a)*amount+a; - } - case ValueBase::TYPE_COLOR: - { - Color a=(*after)(t).get(Color()); - Color b=(*before)(t).get(Color()); - // note: Shouldn't this use a straight blend? - return (b-a)*amount+a; - } - case ValueBase::TYPE_INTEGER: - { - float a=(float)(*after)(t).get(int()); - float b=(float)(*before)(t).get(int()); - return round_to_int((b-a)*amount+a); - } - case ValueBase::TYPE_REAL: - { - Real a=(*after)(t).get(Real()); - Real b=(*before)(t).get(Real()); - return (b-a)*amount+a; - } - case ValueBase::TYPE_TIME: - { - Time a=(*after)(t).get(Time()); - Time b=(*before)(t).get(Time()); - return (b-a)*amount+a; - } - case ValueBase::TYPE_VECTOR: - { - Vector a=(*after)(t).get(Vector()); - Vector b=(*before)(t).get(Vector()); - return (b-a)*amount+a; - } - default: - break; - } - } - - /*! \todo this should interpolate from - ** before to after over the period defined - ** by swap_length */ - - return (*before)(t); -} - -bool -ValueNode_TimedSwap::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - -private: - - ValueNode::RHandle before; - ValueNode::RHandle after; - ValueNode::RHandle swap_time; - ValueNode::RHandle swap_length; - - ValueNode_TimedSwap(const ValueBase &value); - -public: - -// static Handle create(ValueBase::Type id); - - virtual ~ValueNode_TimedSwap(); - - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_local_name(int i)const; - virtual String link_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - - virtual ValueBase operator()(Time t)const; - - virtual String get_name()const; - virtual String get_local_name()const; -// static bool check_type(const ValueBase::Type &type); - -protected: - - virtual LinkableValueNode* create_new()const; - -public: - using synfig::LinkableValueNode::get_link_vfunc; - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_TimedSwap* create(const ValueBase &x); -}; // END of class ValueNode_TimedSwap - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_timeloop.cpp b/synfig-core/trunk/src/synfig/valuenode_timeloop.cpp deleted file mode 100644 index 60ba1a0..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_timeloop.cpp +++ /dev/null @@ -1,200 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_timeloop.cpp -** \brief Implementation of the "Time Loop" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_timeloop.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_TimeLoop::ValueNode_TimeLoop(const ValueBase::Type &x): - LinkableValueNode(x) -{ -} - -ValueNode_TimeLoop::ValueNode_TimeLoop(const ValueNode::Handle &x): - LinkableValueNode(x->get_type()) -{ - set_link("link", x); - set_link("link_time", ValueNode_Const::create(Time(0))); - set_link("local_time", ValueNode_Const::create(Time(0))); - set_link("duration", ValueNode_Const::create(Time(1))); -} - -ValueNode_TimeLoop* -ValueNode_TimeLoop::create(const ValueBase &x) -{ - return new ValueNode_TimeLoop(ValueNode_Const::create(x)); -} - -LinkableValueNode* -ValueNode_TimeLoop::create_new()const -{ - return new ValueNode_TimeLoop(get_type()); -} - -ValueNode_TimeLoop::~ValueNode_TimeLoop() -{ - unlink_all(); -} - -bool -ValueNode_TimeLoop::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i 0) - { - t -= local_time; - t -= floor(t / duration) * duration; - t = link_time + t; - } - else - { - duration = -duration; - t -= local_time; - t -= floor(t / duration) * duration; - t = link_time - t; - } - - return (*link_)(t); -} - -String -ValueNode_TimeLoop::get_name()const -{ - return "timeloop"; -} - -String -ValueNode_TimeLoop::get_local_name()const -{ - return _("Time Loop"); -} - -bool -ValueNode_TimeLoop::check_type(ValueBase::Type type) -{ - if(type) - return true; - return false; -} diff --git a/synfig-core/trunk/src/synfig/valuenode_timeloop.h b/synfig-core/trunk/src/synfig/valuenode_timeloop.h deleted file mode 100644 index f237d7b..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_timeloop.h +++ /dev/null @@ -1,84 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_timeloop.h -** \brief Header file for implementation of the "TimeLoop" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_VALUENODE_TIMELOOP_H -#define __SYNFIG_VALUENODE_TIMELOOP_H - -/* === H E A D E R S ======================================================= */ - -#include "valuenode.h" - -/* === M A C R O S ========================================================= */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class ValueNode_TimeLoop : public LinkableValueNode -{ - ValueNode::RHandle link_; - ValueNode::RHandle link_time_; - ValueNode::RHandle local_time_; - ValueNode::RHandle duration_; - -public: - typedef etl::handle Handle; - typedef etl::handle ConstHandle; - - ValueNode_TimeLoop(const ValueBase::Type &x); - ValueNode_TimeLoop(const ValueNode::Handle &x); - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_TimeLoop(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_TimeLoop* create(const ValueBase &x); -}; // END of class ValueNode_TimeLoop - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_timestring.cpp b/synfig-core/trunk/src/synfig/valuenode_timestring.cpp deleted file mode 100644 index a0808aa..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_timestring.cpp +++ /dev/null @@ -1,189 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_timestring.cpp -** \brief Implementation of the "TimeString" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_timestring.h" -#include "valuenode_const.h" -#include "canvas.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_TimeString::ValueNode_TimeString(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - switch(value.get_type()) - { - case ValueBase::TYPE_STRING: - set_link("time",ValueNode_Const::create(Time(0))); - break; - default: - throw Exception::BadType(ValueBase::type_local_name(value.get_type())); - } - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_TimeString::create_new()const -{ - return new ValueNode_TimeString(get_type()); -} - -ValueNode_TimeString* -ValueNode_TimeString::create(const ValueBase &x) -{ - return new ValueNode_TimeString(x); -} - -ValueNode_TimeString::~ValueNode_TimeString() -{ - unlink_all(); -} - -ValueBase -ValueNode_TimeString::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - Time time((*time_)(t).get(Time())); - - switch (get_type()) - { - case ValueBase::TYPE_STRING: - if (get_root_canvas()) - return time.get_string(get_root_canvas()->rend_desc().get_frame_rate()); - else - return time.get_string(); - default: - break; - } - - assert(0); - return ValueBase(); -} - -String -ValueNode_TimeString::get_name()const -{ - return "timestring"; -} - -String -ValueNode_TimeString::get_local_name()const -{ - return _("Time String"); -} - -bool -ValueNode_TimeString::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_TimeString(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_TimeString* create(const ValueBase &x); -}; // END of class ValueNode_TimeString - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_twotone.cpp b/synfig-core/trunk/src/synfig/valuenode_twotone.cpp deleted file mode 100644 index 3c18ce0..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_twotone.cpp +++ /dev/null @@ -1,189 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_twotone.cpp -** \brief Implementation of the "Two-Tone" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "general.h" -#include "valuenode_twotone.h" -#include "valuenode_const.h" -#include -#include "color.h" -#include "gradient.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -synfig::ValueNode_TwoTone::ValueNode_TwoTone(const ValueBase &value):LinkableValueNode(synfig::ValueBase::TYPE_GRADIENT) -{ - switch(value.get_type()) - { - case ValueBase::TYPE_GRADIENT: - set_link("color1",ValueNode_Const::create(value.get(Gradient())(0))); - set_link("color2",ValueNode_Const::create(value.get(Gradient())(1))); - break; - default: - throw Exception::BadType(ValueBase::type_local_name(value.get_type())); - } - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_TwoTone::create_new()const -{ - return new ValueNode_TwoTone(get_type()); -} - -ValueNode_TwoTone* -ValueNode_TwoTone::create(const ValueBase& x) -{ - return new ValueNode_TwoTone(x); -} - -synfig::ValueNode_TwoTone::~ValueNode_TwoTone() -{ - unlink_all(); -} - -synfig::ValueBase -synfig::ValueNode_TwoTone::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - return Gradient((*ref_a)(t).get(Color()),(*ref_b)(t).get(Color())); -} - -bool -ValueNode_TwoTone::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - virtual ~ValueNode_TwoTone(); - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - - virtual int link_count()const; - - virtual String link_local_name(int i)const; - virtual String link_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - - virtual ValueBase operator()(Time t)const; - - virtual String get_name()const; - virtual String get_local_name()const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_TwoTone* create(const ValueBase &x); -}; // END of class ValueNode_TwoTone - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_vectorangle.cpp b/synfig-core/trunk/src/synfig/valuenode_vectorangle.cpp deleted file mode 100644 index c339d2f..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_vectorangle.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_vectorangle.cpp -** \brief Implementation of the "Vector Angle" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_vectorangle.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_VectorAngle::ValueNode_VectorAngle(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - switch(value.get_type()) - { - case ValueBase::TYPE_ANGLE: - set_link("vector",ValueNode_Const::create(Vector(Angle::cos(value.get(Angle())).get(), - Angle::sin(value.get(Angle())).get()))); - break; - default: - throw Exception::BadType(ValueBase::type_local_name(value.get_type())); - } - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_VectorAngle::create_new()const -{ - return new ValueNode_VectorAngle(get_type()); -} - -ValueNode_VectorAngle* -ValueNode_VectorAngle::create(const ValueBase &x) -{ - return new ValueNode_VectorAngle(x); -} - -ValueNode_VectorAngle::~ValueNode_VectorAngle() -{ - unlink_all(); -} - -ValueBase -ValueNode_VectorAngle::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - return (*vector_)(t).get(Vector()).angle(); -} - - -bool -ValueNode_VectorAngle::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_VectorAngle(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_VectorAngle* create(const ValueBase &x); -}; // END of class ValueNode_VectorAngle - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_vectorlength.cpp b/synfig-core/trunk/src/synfig/valuenode_vectorlength.cpp deleted file mode 100644 index 5d85f98..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_vectorlength.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_vectorlength.cpp -** \brief Implementation of the "Vector Length" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_vectorlength.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_VectorLength::ValueNode_VectorLength(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - switch(value.get_type()) - { - case ValueBase::TYPE_REAL: - set_link("vector",ValueNode_Const::create(Vector(value.get(Real()), 0))); - break; - default: - throw Exception::BadType(ValueBase::type_local_name(value.get_type())); - } - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_VectorLength::create_new()const -{ - return new ValueNode_VectorLength(get_type()); -} - -ValueNode_VectorLength* -ValueNode_VectorLength::create(const ValueBase &x) -{ - return new ValueNode_VectorLength(x); -} - -ValueNode_VectorLength::~ValueNode_VectorLength() -{ - unlink_all(); -} - -ValueBase -ValueNode_VectorLength::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - return (*vector_)(t).get(Vector()).mag(); -} - - -bool -ValueNode_VectorLength::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_VectorLength(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_VectorLength* create(const ValueBase &x); -}; // END of class ValueNode_VectorLength - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_vectorx.cpp b/synfig-core/trunk/src/synfig/valuenode_vectorx.cpp deleted file mode 100644 index 48f9180..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_vectorx.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_vectorx.cpp -** \brief Implementation of the "Vector X" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_vectorx.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_VectorX::ValueNode_VectorX(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - switch(value.get_type()) - { - case ValueBase::TYPE_REAL: - set_link("vector",ValueNode_Const::create(Vector(value.get(Real()), 0))); - break; - default: - throw Exception::BadType(ValueBase::type_local_name(value.get_type())); - } - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_VectorX::create_new()const -{ - return new ValueNode_VectorX(get_type()); -} - -ValueNode_VectorX* -ValueNode_VectorX::create(const ValueBase &x) -{ - return new ValueNode_VectorX(x); -} - -ValueNode_VectorX::~ValueNode_VectorX() -{ - unlink_all(); -} - -ValueBase -ValueNode_VectorX::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - return (*vector_)(t).get(Vector())[0]; -} - - -bool -ValueNode_VectorX::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_VectorX(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_VectorX* create(const ValueBase &x); -}; // END of class ValueNode_VectorX - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/valuenode_vectory.cpp b/synfig-core/trunk/src/synfig/valuenode_vectory.cpp deleted file mode 100644 index 4063eae..0000000 --- a/synfig-core/trunk/src/synfig/valuenode_vectory.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file valuenode_vectory.cpp -** \brief Implementation of the "Vector Y" valuenode conversion. -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "valuenode_vectory.h" -#include "valuenode_const.h" -#include "general.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -ValueNode_VectorY::ValueNode_VectorY(const ValueBase &value): - LinkableValueNode(value.get_type()) -{ - switch(value.get_type()) - { - case ValueBase::TYPE_REAL: - set_link("vector",ValueNode_Const::create(Vector(0, value.get(Real())))); - break; - default: - throw Exception::BadType(ValueBase::type_local_name(value.get_type())); - } - - DCAST_HACK_ENABLE(); -} - -LinkableValueNode* -ValueNode_VectorY::create_new()const -{ - return new ValueNode_VectorY(get_type()); -} - -ValueNode_VectorY* -ValueNode_VectorY::create(const ValueBase &x) -{ - return new ValueNode_VectorY(x); -} - -ValueNode_VectorY::~ValueNode_VectorY() -{ - unlink_all(); -} - -ValueBase -ValueNode_VectorY::operator()(Time t)const -{ - if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) - printf("%s:%d operator()\n", __FILE__, __LINE__); - - return (*vector_)(t).get(Vector())[1]; -} - - -bool -ValueNode_VectorY::set_link_vfunc(int i,ValueNode::Handle value) -{ - assert(i>=0 && i=0 && i=0 && i=0 && i Handle; - typedef etl::handle ConstHandle; - - - virtual ValueBase operator()(Time t)const; - - virtual ~ValueNode_VectorY(); - - virtual String get_name()const; - virtual String get_local_name()const; - - - virtual ValueNode::LooseHandle get_link_vfunc(int i)const; - virtual int link_count()const; - virtual String link_name(int i)const; - - virtual String link_local_name(int i)const; - virtual int get_link_index_from_name(const String &name)const; - -protected: - LinkableValueNode* create_new()const; - virtual bool set_link_vfunc(int i,ValueNode::Handle x); - -public: - using synfig::LinkableValueNode::get_link_vfunc; - - using synfig::LinkableValueNode::set_link_vfunc; - static bool check_type(ValueBase::Type type); - static ValueNode_VectorY* create(const ValueBase &x); -}; // END of class ValueNode_VectorY - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/vector.h b/synfig-core/trunk/src/synfig/vector.h deleted file mode 100644 index 46baff8..0000000 --- a/synfig-core/trunk/src/synfig/vector.h +++ /dev/null @@ -1,290 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file vector.h -** \brief Various discreet type definitions -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_VECTOR_H -#define __SYNFIG_VECTOR_H - -/* === H E A D E R S ======================================================= */ - -#include "angle.h" -#include "real.h" -#include - -/* === M A C R O S ========================================================= */ - - -#ifdef WIN32 -#include -#ifndef isnan -extern "C" { int _isnan(double x); } -#define isnan _isnan -#endif -#endif - -// For some reason isnan() isn't working on macosx any more. -// This is a quick fix. -#if defined(__APPLE__) && !defined(SYNFIG_ISNAN_FIX) -#ifdef isnan -#undef isnan -#endif -inline bool isnan(double x) { return x != x; } -inline bool isnan(float x) { return x != x; } -#define SYNFIG_ISNAN_FIX 1 -#endif - - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -/*! \class Vector -** \todo writeme -*/ -class Vector -{ -public: - typedef Real value_type; - -private: - value_type _x, _y; - -public: - Vector(): _x(0.0), _y(0.0) { }; - Vector(const value_type &x, const value_type &y):_x(x),_y(y) { }; - - bool is_valid()const { return !(isnan(_x) || isnan(_y)); } - - value_type & - operator[](const int& i) - { return i?_y:_x; } - - const value_type & - operator[](const int& i) const - { return i?_y:_x; } - - const Vector & - operator+=(const Vector &rhs) - { - _x+=rhs._x; - _y+=rhs._y; - return *this; - } - - const Vector & - operator-=(const Vector &rhs) - { - _x-=rhs._x; - _y-=rhs._y; - return *this; - } - - const Vector & - operator*=(const value_type &rhs) - { - _x*=rhs; - _y*=rhs; - return *this; - } - - const Vector & - operator/=(const value_type &rhs) - { - value_type tmp=1.0/rhs; - _x*=tmp; - _y*=tmp; - return *this; - } - - Vector - operator+(const Vector &rhs)const - { return Vector(*this)+=rhs; } - - Vector - operator-(const Vector &rhs)const - { return Vector(*this)-=rhs; } - - Vector - operator*(const value_type &rhs)const - { return Vector(*this)*=rhs; } - - Vector - operator/(const value_type &rhs)const - { return Vector(*this)/=rhs; } - - Vector - operator-()const - { return Vector(-_x,-_y); } - - value_type - operator*(const Vector &rhs)const - { return _x*rhs._x+_y*rhs._y; } - - bool - operator==(const Vector &rhs)const - { return _x==rhs._x && _y==rhs._y; } - - bool - operator!=(const Vector &rhs)const - { return _y!=rhs._y || _x!=rhs._x; } - - //! Returns the squared magnitude of the vector - value_type mag_squared()const - { return _x*_x+_y*_y; } - - //! Returns the magnitude of the vector - value_type mag()const - { return sqrt(mag_squared()); } - - //! Returns the reciprocal of the magnitude of the vector - value_type inv_mag()const - { return 1.0/sqrt(mag_squared()); } - - //! Returns a normalized version of the vector - Vector norm()const - { return (*this)*inv_mag(); } - - //! Returns a perpendicular version of the vector - Vector perp()const - { return Vector(_y,-_x); } - - Angle angle()const - { return Angle::rad(atan2(_y, _x)); } - - bool is_equal_to(const Vector& rhs)const - { - static const value_type epsilon(0.0000000000001); -// return (_x>rhs._x)?_x-rhs._x<=epsilon:rhs._x-_x<=epsilon && (_y>rhs._y)?_y-rhs._y<=epsilon:rhs._y-_y<=epsilon; - return (*this-rhs).mag_squared()<=epsilon; - } - - static const Vector zero() { return Vector(0,0); } -}; - -/*! \typedef Point -** \todo writeme -*/ -typedef Vector Point; - - - -}; // END of namespace synfig - -namespace std { - -inline synfig::Vector::value_type -abs(const synfig::Vector &rhs) - { return rhs.mag(); } - -}; // END of namespace std - -#include - -_ETL_BEGIN_NAMESPACE - -template <> -class bezier_base : public std::unary_function -{ -public: - typedef synfig::Vector value_type; - typedef float time_type; -private: - - bezier_base bezier_x,bezier_y; - - value_type a,b,c,d; - -protected: - affine_combo affine_func; - -public: - bezier_base() { } - bezier_base( - const value_type &a, const value_type &b, const value_type &c, const value_type &d, - const time_type &r=0.0, const time_type &s=1.0): - a(a),b(b),c(c),d(d) { set_rs(r,s); sync(); } - - void sync() - { - bezier_x[0]=a[0],bezier_y[0]=a[1]; - bezier_x[1]=b[0],bezier_y[1]=b[1]; - bezier_x[2]=c[0],bezier_y[2]=c[1]; - bezier_x[3]=d[0],bezier_y[3]=d[1]; - bezier_x.sync(); - bezier_y.sync(); - } - - value_type - operator()(time_type t)const - { - return synfig::Vector(bezier_x(t),bezier_y(t)); - } - - void evaluate(time_type t, value_type &f, value_type &df) const - { - t=(t-get_r())/get_dt(); - - const value_type p1 = affine_func( - affine_func(a,b,t), - affine_func(b,c,t) - ,t); - const value_type p2 = affine_func( - affine_func(b,c,t), - affine_func(c,d,t) - ,t); - - f = affine_func(p1,p2,t); - df = (p2-p1)*3; - } - - void set_rs(time_type new_r, time_type new_s) { bezier_x.set_rs(new_r,new_s); bezier_y.set_rs(new_r,new_s); } - void set_r(time_type new_r) { bezier_x.set_r(new_r); bezier_y.set_r(new_r); } - void set_s(time_type new_s) { bezier_x.set_s(new_s); bezier_y.set_s(new_s); } - const time_type &get_r()const { return bezier_x.get_r(); } - const time_type &get_s()const { return bezier_x.get_s(); } - time_type get_dt()const { return bezier_x.get_dt(); } - - value_type & - operator[](int i) - { return (&a)[i]; } - - const value_type & - operator[](int i) const - { return (&a)[i]; } - - //! Bezier curve intersection function - time_type intersect(const bezier_base &/*x*/, time_type /*near*/=0.0)const - { - return 0; - } -}; - -_ETL_END_NAMESPACE - - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/version.h b/synfig-core/trunk/src/synfig/version.h deleted file mode 100644 index aba3cfd..0000000 --- a/synfig-core/trunk/src/synfig/version.h +++ /dev/null @@ -1,75 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file version.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_VERSION_H -#define __SYNFIG_VERSION_H - -/* === H E A D E R S ======================================================= */ - -/* === M A C R O S ========================================================= */ - -/*! \def SYNFIG_VERSION -** \brief Synfig API Version -** -** The macro SYNFIG_VERSION can be set to ensure -** compile-time compatibility with future versions -** of Synfig. The first two digits are the major -** version, the second two digits are the minor -** version, and the last two digits are the -** revision release. -*/ -#ifndef SYNFIG_VERSION -#define SYNFIG_VERSION (006000) -#endif - -/*! Increment this value whenever -** the library changes in a way -** that breaks library compatibility -*/ -#define SYNFIG_LIBRARY_VERSION 47 - -/*! \writeme */ -#define SYNFIG_CHECK_VERSION() synfig::check_version_(SYNFIG_LIBRARY_VERSION,sizeof(synfig::Vector),sizeof(synfig::Color),sizeof(synfig::Canvas),sizeof(synfig::Layer)) - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -//! Version checker \internal -/*! Checks to make sure that the library -** version matches with what the program -** was compiled against. -** \see SYNFIG_CHECK_VERSION() -*/ -extern bool check_version_(int v,int vec_size, int color_size,int canvas_size,int layer_size); - -extern const char *get_version(); - -extern const char *get_build_date(); - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/synfig/waypoint.cpp b/synfig-core/trunk/src/synfig/waypoint.cpp deleted file mode 100644 index 1befa6f..0000000 --- a/synfig-core/trunk/src/synfig/waypoint.cpp +++ /dev/null @@ -1,155 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file waypoint.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "waypoint.h" -#include "valuenode_const.h" - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -Waypoint::Waypoint(ValueBase value, Time time): - priority_(0), - before(INTERPOLATION_TCB), - after(INTERPOLATION_TCB), - value_node(ValueNode_Const::create(value)), - time(time), - tension(0.0), - continuity(0.0), - bias(0), - time_tension(0.0f) -{ - if(value.get_type()==ValueBase::TYPE_ANGLE) - after=before=INTERPOLATION_LINEAR; -} - -Waypoint::Waypoint(etl::handle value_node, Time time): - priority_(0), - before(INTERPOLATION_TCB), - after(INTERPOLATION_TCB), - value_node(value_node), - time(time), - tension(0.0), - continuity(0), - bias(0), - time_tension(0.0f) -{ - if(value_node->get_type()==ValueBase::TYPE_ANGLE) - after=before=INTERPOLATION_LINEAR; -} - -Waypoint::Waypoint(): - priority_(0), - before(INTERPOLATION_TCB), - after(INTERPOLATION_TCB), - tension(0), - continuity(0), - bias(0), - time_tension(0.0f) -{ -} - -void -Waypoint::set_value(const ValueBase &x) -{ - if(!value_node && x.get_type()==ValueBase::TYPE_ANGLE) - after=before=INTERPOLATION_LINEAR; - - value_node=ValueNode_Const::create(x); -} - -void -Waypoint::set_value_node(const etl::handle &x) -{ - if(!value_node && x->get_type()==ValueBase::TYPE_ANGLE) - after=before=INTERPOLATION_LINEAR; - - value_node=x; -} - -bool -Waypoint::is_static()const -{ - return static_cast(ValueNode_Const::Handle::cast_dynamic(value_node)) && value_node && !value_node->is_exported(); -} - -void -Waypoint::set_time(const Time &x) -{ - time=x; -} - -void -Waypoint::apply_model(const Model &x) -{ - if(x.priority_flag) set_priority(x.get_priority()); - if(x.before_flag) set_before(x.get_before()); - if(x.after_flag) set_after(x.get_after()); - if(x.tension_flag) set_tension(x.get_tension()); - if(x.continuity_flag) set_continuity(x.get_continuity()); - if(x.bias_flag) set_bias(x.get_bias()); - if(x.temporal_tension_flag) set_temporal_tension(x.get_temporal_tension()); -} - -Waypoint -Waypoint::clone(const GUID& deriv_guid)const -{ - Waypoint ret(*this); - ret.make_unique(); - if(!ret.value_node->is_exported()) - ret.value_node=value_node->clone(deriv_guid); - ret.parent_=0; - return ret; -} - -ValueBase -Waypoint::get_value()const { return (*value_node)(0); } - -ValueBase -Waypoint::get_value(const Time &t)const { return (*value_node)(t); } - -synfig::GUID -Waypoint::get_guid()const -{ - return GUID::hasher(get_uid()); -} diff --git a/synfig-core/trunk/src/synfig/waypoint.h b/synfig-core/trunk/src/synfig/waypoint.h deleted file mode 100644 index d94cf21..0000000 --- a/synfig-core/trunk/src/synfig/waypoint.h +++ /dev/null @@ -1,267 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file waypoint.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2008 Chris Moore -** Copyright (c) 2008 Paul Wise -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_WAYPOINT_H -#define __SYNFIG_WAYPOINT_H - -/* === H E A D E R S ======================================================= */ - -#include "time.h" -#include "real.h" -#include "value.h" -//#include "valuenode.h" -#include "uniqueid.h" -#include -#include "guid.h" -#include "interpolation.h" - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfig { - -class ValueNode; -class GUID; - - -/*! \class Waypoint -** \brief \writeme -*/ -class Waypoint : public UniqueID -{ - /* - -- ** -- T Y P E S ----------------------------------------------------------- - */ - -public: - - typedef synfig::Interpolation Interpolation; - - class Model - { - friend class Waypoint; - - int priority; - Interpolation before; - Interpolation after; - Real tension; - Real continuity; - Real bias; - Real temporal_tension; - - bool priority_flag,before_flag,after_flag,tension_flag,continuity_flag,bias_flag,temporal_tension_flag; - - public: - Model(): - // we don't need to initialise these 5, but the compiler thinks they're used uninitialised if we don't - // and this constructor isn't called often, so it's ok - priority(0), before(INTERPOLATION_NIL), after(INTERPOLATION_NIL), tension(0), continuity(0), bias(0), temporal_tension(0), - - priority_flag(false), - before_flag(false), - after_flag(false), - tension_flag(false), - continuity_flag(false), - bias_flag(false), - temporal_tension_flag(false) { } - - Interpolation get_before()const { return before; } - void set_before(Interpolation x) { before=x; before_flag=true;} - - Interpolation get_after()const { return after; } - void set_after(Interpolation x) { after=x; after_flag=true;} - - const Real &get_tension()const { return tension; } - void set_tension(const Real &x) { tension=x; tension_flag=true;} - - const Real &get_continuity()const { return continuity; } - void set_continuity(const Real &x) { continuity=x; continuity_flag=true;} - - const Real &get_bias()const { return bias; } - void set_bias(const Real &x) { bias=x; bias_flag=true;} - - const Real &get_temporal_tension()const { return temporal_tension; } - void set_temporal_tension(const Real &x) { temporal_tension=x; temporal_tension_flag=true;} - - int get_priority()const { return priority; } - void set_priority(int x) { priority=x; priority_flag=true;} - - #define FLAG_MACRO(x) bool get_##x##_flag()const { return x##_flag; } void set_##x##_flag(bool y) { x##_flag=y; } - FLAG_MACRO(priority) - FLAG_MACRO(before) - FLAG_MACRO(after) - FLAG_MACRO(tension) - FLAG_MACRO(continuity) - FLAG_MACRO(bias) - FLAG_MACRO(temporal_tension) - #undef FLAG_MACRO - - void reset() - { - priority_flag=false; - before_flag=false; - after_flag=false; - tension_flag=false; - continuity_flag=false; - bias_flag=false; - temporal_tension_flag=false; - } - - bool is_trivial()const - { - return !( - priority_flag|| - before_flag|| - after_flag|| - tension_flag|| - continuity_flag|| - bias_flag|| - temporal_tension_flag - ); - } - }; - - enum Side - { - SIDE_UNSPECIFIED, SIDE_LEFT, SIDE_RIGHT, - - SIDE_END=2 //!< \internal - }; - - /* - -- ** -- D A T A ------------------------------------------------------------- - */ - -private: - - int priority_; - etl::loose_handle parent_; - - Interpolation before, after; - - etl::rhandle value_node; - - Time time; - - // The following are for the INTERPOLATION_TCB type - Real tension; - Real continuity; - Real bias; - - // The following are for the INTERPOLATION_MANUAL type - ValueBase cpoint_before,cpoint_after; - - - float time_tension; - - /* - -- ** -- C O N S T R U C T O R S --------------------------------------------- - */ - -public: - - Waypoint(ValueBase value, Time time); - Waypoint(etl::handle value_node, Time time); - - Waypoint(); - - /* - -- ** -- M E M B E R F U N C T I O N S ------------------------------------- - */ - -public: - - void apply_model(const Model &x); - - Interpolation get_before()const { return before; } - void set_before(Interpolation x) { before=x; } - - Interpolation get_after()const { return after; } - void set_after(Interpolation x) { after=x; } - - ValueBase get_value()const; - ValueBase get_value(const Time &t)const; - void set_value(const ValueBase &x); - - const etl::rhandle &get_value_node()const { return value_node; } - void set_value_node(const etl::handle &x); - - const Real &get_tension()const { return tension; } - void set_tension(const Real &x) { tension=x; } - - const Real &get_continuity()const { return continuity; } - void set_continuity(const Real &x) { continuity=x; } - - const Real &get_bias()const { return bias; } - void set_bias(const Real &x) { bias=x; } - - const Time &get_time()const { return time; } - void set_time(const Time &x); - - int get_priority()const { return priority_; } - void set_priority(int x) { priority_=x; } - - const etl::loose_handle &get_parent_value_node()const { return parent_; } - void set_parent_value_node(const etl::loose_handle &x) { parent_=x; } - - bool is_static()const; - - float get_temporal_tension()const { return time_tension; } - void set_temporal_tension(const float& x) { time_tension=x; } - - bool operator<(const Waypoint &rhs)const - { return time(const Time &rhs)const - { return time.is_more_than(rhs); } - - bool operator==(const Time &rhs)const - { return time.is_equal(rhs); } - bool operator!=(const Time &rhs)const - { return !time.is_equal(rhs); } - - bool operator==(const UniqueID &rhs)const - { return get_uid()==rhs.get_uid(); } - bool operator!=(const UniqueID &rhs)const - { return get_uid()!=rhs.get_uid(); } - - Waypoint clone(const GUID& deriv_guid=GUID())const; - - GUID get_guid()const; -}; // END of class Waypoint - -typedef std::vector< Waypoint > WaypointList; - -}; // END of namespace synfig - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/template.cpp b/synfig-core/trunk/src/template.cpp deleted file mode 100644 index 0adf303..0000000 --- a/synfig-core/trunk/src/template.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file template.cpp -** \brief Template File -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -/* -** Insert headers here -*/ - -#endif - -/* === U S I N G =========================================================== */ - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -/* === G L O B A L S ======================================================= */ - -/* === P R O C E D U R E S ================================================= */ - -/* === M E T H O D S ======================================================= */ - -/* === E N T R Y P O I N T ================================================= */ - - diff --git a/synfig-core/trunk/src/template.h b/synfig-core/trunk/src/template.h deleted file mode 100644 index 124824c..0000000 --- a/synfig-core/trunk/src/template.h +++ /dev/null @@ -1,38 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file template.h -** \brief Template Header -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_TEMPLATE_H -#define __SYNFIG_TEMPLATE_H - -/* === H E A D E R S ======================================================= */ - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -/* === E N D =============================================================== */ - -#endif diff --git a/synfig-core/trunk/src/tool/Makefile.am b/synfig-core/trunk/src/tool/Makefile.am deleted file mode 100644 index dabe04e..0000000 --- a/synfig-core/trunk/src/tool/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# $Id$ - -MAINTAINERCLEANFILES = \ - Makefile.in - -EXTRA_DIST = \ - tool.nsh - -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src - - -bin_PROGRAMS = \ - synfig - - -synfig_SOURCES = \ - main.cpp - -synfig_LDADD = \ - ../synfig/libsynfig.la \ - @SYNFIG_LIBS@ \ - @OPENEXR_HALF_LIBS@ - -synfig_CXXFLAGS = \ - @SYNFIG_CFLAGS@ diff --git a/synfig-core/trunk/src/tool/main.cpp b/synfig-core/trunk/src/tool/main.cpp deleted file mode 100644 index fbf64b0..0000000 --- a/synfig-core/trunk/src/tool/main.cpp +++ /dev/null @@ -1,1434 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file tool/main.cpp -** \brief SYNFIG Tool -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007, 2008 Chris Moore -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === H E A D E R S ======================================================= */ - -#ifdef USING_PCH -# include "pch.h" -#else -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif - -using namespace std; -using namespace etl; -using namespace synfig; - -/* === M A C R O S ========================================================= */ - -#ifdef ENABLE_NLS -#undef _ -#define _(x) gettext(x) -#else -#undef _ -#define _(x) (x) -#endif - -enum exit_code -{ - SYNFIGTOOL_OK = 0, - SYNFIGTOOL_FILENOTFOUND = 1, - SYNFIGTOOL_BORED = 2, - SYNFIGTOOL_HELP = 3, - SYNFIGTOOL_UNKNOWNARGUMENT = 4, - SYNFIGTOOL_UNKNOWNERROR = 5, - SYNFIGTOOL_INVALIDTARGET = 6, - SYNFIGTOOL_RENDERFAILURE = 7, - SYNFIGTOOL_BLANK = 8, - SYNFIGTOOL_BADVERSION = 9, - SYNFIGTOOL_MISSINGARGUMENT =10 -}; - -#ifndef VERSION -#define VERSION "unknown" -#define PACKAGE "synfig-tool" -#endif - -#ifdef DEFAULT_QUALITY -#undef DEFAULT_QUALITY -#endif - -#define DEFAULT_QUALITY 2 -#define VERBOSE_OUT(x) if(verbosity>=(x))std::cerr - -/* === G L O B A L S ======================================================= */ - -const char *progname; -int verbosity=0; -bool be_quiet=false; -bool print_benchmarks=false; - -/* === M E T H O D S ======================================================= */ - -class Progress : public synfig::ProgressCallback -{ - const char *program; - -public: - - Progress(const char *name):program(name) { } - - virtual bool - task(const String &task) - { - VERBOSE_OUT(1)<=60) - minutes++,seconds-=60; - while(minutes>=60) - hours++,minutes-=60; - while(hours>=24) - days++,hours-=24; - while(days>=7) - weeks++,days-=7; - - cerr<=-time/(h-clk_scanline) ) - cerr<<">"; - */ - if(delta>=0 && clk()>4.0 && scanline>clk_scanline+200) - { - //cerr<<"reset"< arg_list_t; -typedef list job_list_t; - -void guid_test() -{ - cout<<"GUID Test"< sig; - sigc::connection conn; - cout<<"Signal Test"<", _("Specify output target (Default:unknown)")); - display_help_option("-w", "", _("Set the image width (Use zero for file default)")); - display_help_option("-h", "", _("Set the image height (Use zero for file default)")); - display_help_option("-s", "", _("Set the diagonal size of image window (Span)")); - display_help_option("-a", "<1...30>", _("Set antialias amount for parametric renderer.")); - display_help_option("-Q", "<0...10>", strprintf(_("Specify image quality for accelerated renderer (default=%d)"), DEFAULT_QUALITY).c_str()); - display_help_option("-g", "", _("Gamma (default=2.2)")); - display_help_option("-v", NULL, _("Verbose Output (add more for more verbosity)")); - display_help_option("-q", NULL, _("Quiet mode (No progress/time-remaining display)")); - display_help_option("-c", "", _("Render the canvas with the given id instead of the root.")); - display_help_option("-o", "", _("Specify output filename")); - display_help_option("-T", "<# of threads>", _("Enable multithreaded renderer using specified # of threads")); - display_help_option("-b", NULL, _("Print Benchmarks")); - display_help_option("--fps", "", _("Set the frame rate")); - display_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KCCkoQ\a*a.W3Xm(;6kii8a>lE^>U#qqrkMEE/5+FrO7F'C7cPkpco0- +d(nlFi69LX6p7-X-2i(O:0mf^i%53MA[jmV(%n,E@T^@Ucgj6kdsnK.r(,ffCcJ5-%[n/i&.?Q8I+$ +1e*>o04Pl-&:p,an+C!o:IR!3m^QM#Yn_knNR][554_\-g\h<10a:+8PEhf8+llCpE&l!?[;B1IJ85 +@pV2:SItd[4KD>J'q&bUl5FM=sSbZWdq7i^#s/#S,WVBgnqVS4JIdgshEAATcj#ZCfK*a0M6>F9^CE +Lu?5M,kKec#O$rZBtq5O&/smJ^J_rkJ((s7@E?`0(`:"G+Bt&9q.m)$u&7iR&Kq:*14-7A>ohe7Jp9 +BsXH#\%CJR-$?cSnp*p':>TWgLEhAo`,bmI9'6hde"0,!OM0iL)&3L06_dLm'M;@HQV"&Ql.$\h:8( +XdP^2WX=`'GIV@tDSg&GlR[@(gb`Tm&A^L(prbSC-_J\kjbfUOQI& +WF\=EZ"_?4"6<7jRUuo`c!N$c"FANr>(/[Mn;Vno1PV1GGhocFrL=F]4nP(m.T2)`p[iZh/BclrYGf +r^uKD/r*DlHQ-JCE/fL^Se"=kLo=EbLa)A0;m1,_I;^E\rt*8THq_,tZNqT.*AfUh5.-~> +%%EndData +end restore showpage +%%Trailer +%%EOF diff --git a/synfig-docs/ca/interface/toolbox.sgml b/synfig-docs/ca/interface/toolbox.sgml new file mode 100644 index 0000000..c2ae500 --- /dev/null +++ b/synfig-docs/ca/interface/toolbox.sgml @@ -0,0 +1,48 @@ + + + + +The toolbox + +apsldkfjañsdlfads ñlaskdfjñald skfañdkl fjañsdklfj añdslvf kjadsñfkjadñfjkaflñjak añ kfjañ fñakjd fañ +a dfñladjf añdlkfj añlkf añldkf adlkf ajdñlf adñflkj dsñalj kfañldkf asjdñfkl asdñf akj +añ kfd ñaj kasñj kds ñjk sñljks añljskañ kñasjksdañ jk dfñljk + +

      + Toolbox + + + + + + + +
      + +asdf a dsf dsfa sdf adf adfadf ad f adsfasd fa sdf asd f asdf asdf asf adsf asdf asd fa + adsf asdf asd f asdf a dfa sdf as fasdf asdf adf ad faf f asdf af asd fa sf asdf adf adf + a dsf a dfa sdf ad fa df asdf asdf asd f af + + + + + + + +New +Open +Save +Save As + + +Save All +Undo +Redo +About Synfig Studio + + + +
      + +
      + diff --git a/synfig-docs/ca/interface/tooloptions.sgml b/synfig-docs/ca/interface/tooloptions.sgml new file mode 100644 index 0000000..aa89313 --- /dev/null +++ b/synfig-docs/ca/interface/tooloptions.sgml @@ -0,0 +1,8 @@ + + + +Tool Options Dialog + +TODO + + diff --git a/synfig-docs/ca/introduction/introduction.sgml b/synfig-docs/ca/introduction/introduction.sgml new file mode 100644 index 0000000..2db1360 --- /dev/null +++ b/synfig-docs/ca/introduction/introduction.sgml @@ -0,0 +1,52 @@ + + + + + <acronym>Introduction</acronym> + Synfig, like most every other competent graphics program, breaks down + individual elements of a Canvas into Layers. However, it differs from other + programs in two major ways: + + + An individual layer in Synfig usually represents a single "Primitive". + ie: A single region, an outline of a region, an imported JPEG, etc... This + allows you to have a great deal of flexibility and control. It is not + uncommon for a composition to have hundreds of layers(organized into a + hierarchy for artist sanity of course). + + + A layer can not only composite information on top of the image below it, + but also distort and/or modify it in some other way. In this sense, Synfig + Layers act much like filters do in Adobe Photoshop or the GIMP. For example, + we have a Blur Layer, Radial Blur Layer, Spherical Distortion Layer, + color-correct layer, bevel layer, etc... + + + + Each layer has a set of parameters which determine how it behaves. When + you click on a layer (either in the canvas window, or in the Layer Dialog), + you will see its parameters in the Params Dialog. + + Synfig Studio has an autorecover feature. If it crashes, even if the + current file has not been saved, it will not lose more than 5 minutes of work. + At restart it will automatically prompt the user to recover the unsaved changes. + Unfortunately history isn't recovered yet. That feature comes later. + + One thing you may notice is that Synfig Studio is SLOW, making it + practically unusable on hardware that is over 3 years old. The biggest reason + for this is that all of the color calculations are done in floating point + because Synfig Studio was built from the ground up with High-Dynamic-Range + Imaging in mind. HOWEVER, this will not be the case forever. + + darco has some fairly major re-implementations and optimizations that + he plans to implement that should quite dramatically improve the performance + of Synfig on all platforms. The goal is not a 200% speed increase, it is at + least a 2000% speed increase. With the optimizations that are planned to be + implemented, we will be able to pipeline operations in such a way that this + performance improvement can be realized. It should also pave the way to hardware + acceleration using todays powerful graphics processors, which should yield + further performance improvements measurable in orders of magnitude. + + + + diff --git a/synfig-docs/ca/steps/done b/synfig-docs/ca/steps/done new file mode 100644 index 0000000..e69de29 diff --git a/synfig-docs/ca/steps/firststeps.sgml b/synfig-docs/ca/steps/firststeps.sgml new file mode 100644 index 0000000..6f53169 --- /dev/null +++ b/synfig-docs/ca/steps/firststeps.sgml @@ -0,0 +1,69 @@ + + + +First Steps + Lets create something +so that we can tweak with it. Now that you have a new composition open +and the properties dialog is out of the way, go over to the toolbox and +click on the circle tool(If you don't know which one it is, just mouse +over them until you find the one with the tooltip that says "circle"). + +The second you click on the circle tool, you should notice that the tool +options tab changed. But we'll get to that later. + + Some laptop users might experience trouble where click-drag on + the canvas when using the circle tool doesn't seem to do anything + or produce insanely huge circles. The problem is that Synfig has + detected the touchpad and enabled that device (incorrectly!) To fix + this: click File->Input devices... In the resulting dialog window, + select 'Disabled' for your touchpad device. After this change, + your external mouse and the touchpad will work as expected. + + With the circle tool selected, you can now create circles in the + canvas window. This pretty much works exactly as you might expect + it to. Go ahead and create two (or more, if you fancy) circles. If + by accident you just clicked on the canvas instead of clicking and + dragging(with mouse button pressed) to draw the circle, you end up + creating a circle with 0 radius and it is effectively invisible! No + need to worry, you can easily fix this. In the Params dialog, you + can change the parameters of the selected object. If you just made + a 0 radius circle, it should be the current selected object. you can + change its radius to some value other than 0, say 10, and manipulate + it to your liking with the canvas ducks later. + + Now go back to the toolbox and click on the normal tool (the blue + circle with the arrow on it). After you do this, click on one of your + circles. You will then see a bounding box(which is kinda useless + at this point in time, but I digress), a green dot at the center, + and a cyan dot on the radius. Those dots are called ducks. If you + want to modify the circle, grab a duck and drag it around. Easy! + + So you can select a layer by clicking on it. If you want to select + more than one layer, hold down CONTROL while you are clicking--this + works in both the canvas window and the layer tab. Try it! + + You can also select multiple ducks. You can do this in several + ways. First, you can hold down CONTROL and individually click the + ducks that you want selected, but this can be tedious. However, there + is a much faster method--just create a selection box by clicking the + mouse and dragging it over the area of ducks that you want selected. + + Go ahead and select two circles, and select all of their ducks. With + several ducks selected, moving one duck will move all of the + ducks. This behavior is dependent on the normal tool. Thus, a + more descriptive name for this tool might have been the "move" or + "translate" tool. + + The Rotate and Scale tools work much like the Normal tool, except in + the case where you have multiple ducks selected. It is much easier + to just try it than read about it. Select a few circles, select all + of their ducks, and try using the rotate and scale tools. + + Note that, unlike the normal tool, the other duck manipulation tools + DO have options associated with them. If a particular tool isn't + doing what you want, take a look in the tool options tab to see if + it is set up like you want it. +&linking.sgml; +&steplayers.sgml; +&shapes.sgml; + diff --git a/synfig-docs/ca/steps/layers/combining.sgml b/synfig-docs/ca/steps/layers/combining.sgml new file mode 100644 index 0000000..ce7b421 --- /dev/null +++ b/synfig-docs/ca/steps/layers/combining.sgml @@ -0,0 +1,32 @@ + + + +Combining +Now there are two ways to proceed. In the first way, pick the gradient +tool from the Synfig Toolbox, and click into the canvas once. You should note +that another layer was added in the Layers Dialog called 'Gradient'. This is +nothing special. If you see no gradient but just a plain color, pick the normal +tool, click into the canvas to acivate the gradient's ducks. You need to grab +the one you see and move it a bit until a gradient appears. + +You now have a gradient but it is not what you wanted: It spreads the +whole canvas and the goal was to have a gradient on the rectangle. Let's fix +this now. + +Select the gradient and the rectangle layer in the Layers Dialog. They +should appear with a blue background now. Then, context-click (ie. right-click +on Windows and Linux) and select 'Encapsulate' from the menu. The view of your +layer tab should change now, showing a small box called 'Inline Canvas' with an +arrow in front. If you click the arrow, it will unfold and show your previous +two layers; the gradient and the rectangle. + +You can treat this layer like any other layer -- move it around, +duplicate it, copy and paste it. You'll notice an arrow next to the icon of the +box. By clicking on this arrow, you can expand the inline canvas to see its +contents. + +If you want to change the name of it to something more descriptive, just +select the layer in the layer tab and click on its label. Then you just edit it +in place. You can do this for ANY layer, and are strongly encouraged to do so. + + diff --git a/synfig-docs/ca/steps/layers/done b/synfig-docs/ca/steps/layers/done new file mode 100644 index 0000000..e69de29 diff --git a/synfig-docs/ca/steps/layers/layers.sgml b/synfig-docs/ca/steps/layers/layers.sgml new file mode 100644 index 0000000..f574dba --- /dev/null +++ b/synfig-docs/ca/steps/layers/layers.sgml @@ -0,0 +1,37 @@ + + + +Layers + In the previous tutorial, you made a +first simple animation by changing the attributes of primitive objects +such as its position, color, and size. These simple types, however, are +seldomly sufficient to create advanced characters and objects. To do so, +Synfig uses Layers. They are similar to layers known from other drawing +application such as the GIMP, for instance. + +However, Synfig is different to simple layers in at least two +respects: + + + You can organize layers into hierachical groups. + + + You can use upper layers to change the behaviour (or look) + or underlying layers. + + + +Doing so is quite easy. Let's look at a simple example. + + + + Create a new file with 0 duration. There's no need to bother + with a timeline at this point. + + + Create a simple rectangle. + + +&using.sgml; +&combining.sgml; + diff --git a/synfig-docs/ca/steps/layers/using.sgml b/synfig-docs/ca/steps/layers/using.sgml new file mode 100644 index 0000000..4eef8ca --- /dev/null +++ b/synfig-docs/ca/steps/layers/using.sgml @@ -0,0 +1,57 @@ + + + +Using + However, there is still a problem: The gradient still covers the whole +canvas althought we wanted it to be restricted on the rectangle. To do so, +activate the gradient layer in the Layer tab. Now go to the Params Dialog (by +default a tab in the Params-Children-Keyframes window), and search the attribute +called 'Blend Method'. Double-click the entry and select 'Onto' from the +appearing drop-down menu. + +The gradient should now be restricted to the rectangle. Congratulations! +You just made your first interacting layers with Synfig. + +If only for the additional organization, encapsulating layers into inline +canvases dramatically improves the ease of use of Synfig Studio. But +lots of programs can do this. The concept of scope as just demonstrated +sets Synfig apart from other programs with layer hierarchies. + +The following remarks seem to be outdated already! A blur +defaults to 'Straight' here (using SVN 110). --Claus 06:45, 11 Jan 2006 (PST) + + + It defaulted to composite for me, as described (using + SVN 147) Matumio 07:56, 12 Mar 2006 (PST) + + However, a layer can only modify the data that it gets from directly + below it. In other words, if you were to throw a Blur Layer at + the top of the objects inside the inline canvas we just created, + it would just blur them -- anything under it would not be blurred! + + Lets try it. Add a few circles under the inline canvas we just + created. Expand the inline canvas to show its contents, and select + the top layer inside of it (should be the "Outline" layer). This + is where we want to insert the blur. Right click on the selected + layer and a popup menu will appear. The first item in that popup + is "New Layer". Inside of the "New Layer" menu, you'll see several + categories of layers you could create, but what we want is a blur, + so goto the Blur category and select the "Blur" layer. (so that + would be "New Layer->Blurs->Blur") + + Well, it blurred... but something is not quite right--the inside edge + of the outline is now all soft, but it still kinda looks like there is + a hard edge on the outside. It is doing this because the blend method + of the blur defaulted to "Composite" (you can change the default + blend method for new layers from the New Layer Defaults section of + the Toolbox). What we want is a blend method of "Straight". Just + select the blur layer, and change the Blend Method to "Straight" + in the Params Dialog. + + (NOTE: I will probably change the way that default blend methods are + handled in the future--as the way it is currently handled seems to + only create hassles like this) + + Ok, now we have all of the contents of the inline canvas blurred, + but everything under it is sharp! + diff --git a/synfig-docs/ca/steps/linking.sgml b/synfig-docs/ca/steps/linking.sgml new file mode 100644 index 0000000..bc17b4d --- /dev/null +++ b/synfig-docs/ca/steps/linking.sgml @@ -0,0 +1,53 @@ + + + +Linking +Now lets try linking. Lets say we always +want these two circles to be the same size. Select two circles, and then +select both of their Radius ducks(the cyan dot). Then right click on +either duck and a menu will pop up. Click on "Link". Boom. The parameters +are linked together. You can prove it to yourself by selecting just one +of the circles and changing its radius--the other one will change as +well. Neat stuff, eh? + +Linking is a fundamental concept in Synfig. You can create links not only +between ducks, but also between parameters as well by selecting multiple +layers, right clicking on the parameter in the param tab, and selecting +"Link". + +DIGRESSION: This is how outlines are attached to their regions-but +I'm getting ahead of myself. At the moment, the fundamental power and +flexibility of linking in Synfig Core is beyond what Synfig Studio +currently allows for. This will change in the future. Anyway, back +on track... + +Lets say you want one of the circles to be a different color. If you look +in the toolbox below the tools, you'll see the foreground/background +color selector, the outline width selector, and some other stuff like +the default blend method and gradient. The foreground/background color +widget works exactly as you might expect--you can click on the foreground +color, and a modest color chooser will appear. Now to can change the +color pretty easily. + +But sometimes you just want to click on a color and go. This is where +the palette editor tab comes in. It's functionality isn't quite 100% yet +(ie: saving and loading custom palettes hasn't been implemented yet), +but the default palette is pretty decent. Click on the Palette editor tab +and have a look--it's the one with the palette-ish looking icon. Clicking +on colors in here will immediately change the default foreground color. + +That's all great, but we still haven't changed the color of the +circle. There are two ways to do this. The first way is that you select +the circle layer you want to modify, goto the params tab and double click +on the color parameter--a color selector dialog shows up and you just +tweak away. But lets say you already got the color you wanted selected as +the default foreground color. Easy. Just click on the "Fill tool" from the +toolbox, and then click on the circle in the canvas window. Boom. Circle +changes color. This works with more than just circles, but we'll get to +that in a sec. + +Try playing around with the circles for a bit. Muck around with the +parameters, and see what happens. To get you started, play around with +feather a bit. + + diff --git a/synfig-docs/ca/steps/shapes.sgml b/synfig-docs/ca/steps/shapes.sgml new file mode 100644 index 0000000..23a46bb --- /dev/null +++ b/synfig-docs/ca/steps/shapes.sgml @@ -0,0 +1,82 @@ + + + + Shapes + Basic primitives such as circles or +rectangles are all great, but they are pretty much geometrically +inflexible. What about shapes? To do this, we use the bline tool. + In Synfig, the construct for describing shapes is called a Bline. This +is roughly analogous to a "path" in other programs, except that it is +strictly a hermite spline. + When you click on the bline tool, you will see that the ducks from +your currently selected layer (if there was one) will disappear, but +the layer(s) will still remain selected in the Layers Dialog. This is +normal. Anything you create in the bline tool will be inserted above the +currently selected layer. Keep in mind that if you want to insert a shape +somewhere, you should select where you want to insert it before you go +into the Bline tool-changing the selection afterward will automaticly +swap you back to the normal tool. + If you take a look at the tool options dialog, you'll notice that the +first things you see are three checkboxes. Make sure that only "Fill" +AND "Outline" are checked. + First, go ahead and click on the "R" button in the lower left corner of +the FG/BG color widget in the toolbox. This will reset us back to black +and white. Also, go ahead and set the default line width (right next to +the FG/BG widget) to something nice and thick -- 10pt should do the +trick. + Clicking with your mouse in the canvas will place vertices. While you are +placing a vertex, you can drag out its tangent by dragging the mouse. Do +this over and over, and you construct a Bline. + Keep in mind, however, that during this construction, there is nothing +stopping you from just moving it if you don't like where you placed +a vertex or a tangent. Honest! If you want to remove a vertex, right +click on it and delete it. Want to split the tangents? Right click on +the tangent and hit "split tangents". Want to loop the bline? right +click on the first vertex and select "loop". + So I assume you got your first Bline laid out like you want it. That's +great. But we are still in construction mode -- the layers haven't been +created yet. There are two ways to create the layers: + + + just switch to another tool, or + + + press the "create" button at the bottom of the tool options tab + (it's the icon that looks like a gear). + + + For now, just go ahead and click on the normal tool because we + are done with the bline tool. + // Insert Figure about here + Ok, we now have a nice pretty white region with a thick black + outline. Notice that there are two layers that we have created--the + Outline and the Region. Despite the fact that they are two separate + layers, their vertices parameter has already been linked--so you + can select either one and move its ducks around and the other one + will also change. + If you want to manipulate the vertices after you have created + the layers, it is very easy to do so. Just click on one of the + layers and have at it. If you want to remove a vertex, right + click on it and hit "Remove Item (smart)". Want to insert a point + somewhere? Right click on the segment where you want to insert + something and his "Insert item (smart)". + NOTE: The only major difference between this normal editing mode + and the construction mode is in how you split the tangents--in + construction mode you right click on the tangent itself. In normal + duck editing mode, you must right click on the vertex that the + tangents are attached to. This could be considered a usability bug, + and it will be resolved at some point. + This may appear to be leading to a mess of layers. And yes, if + you aren't using the software properly, that is exactly what you + will get. But there is a way to make this more sane: Just study + the previous tutorial + One quick thing to mention before I finish up. You can change the + width of an outline at each vertex. You do this by selecting the + outline layer (NOTE: you must select the Outline Layer, the Region + Layer has no width data) and tweaking with the width ducks. By + default, these are masked. To show them, press Alt-5. Repeat to + hide them again. You can also see other things to mask via the + Canvas Menu Caret > View Menu > Mask Ducks Menu. + That should give you enough of a grasp of the software to be able + to figure out more stuff on your own. + diff --git a/synfig-docs/ca/synfig-studio.sgml b/synfig-docs/ca/synfig-studio.sgml new file mode 100644 index 0000000..e7103df --- /dev/null +++ b/synfig-docs/ca/synfig-studio.sgml @@ -0,0 +1,64 @@ + + + + %commondata; --> + + + + + + + + + + + + + + + + + + + + + + +]> + + + 28 Aug 2006 + <acronym>Synfig Studio</acronym> + + Getting Started + Intial Release + + + Miguel + Gea Milvaques + + + et Alt. + + +
      synfig@miguelgea.com
      + + Released with GFDL license + + + + 0.1 + 2006-8-28 + mgm + Document start + + +
      +&introduction.sgml; +&interface.sgml; +&firststeps.sgml; +&apendices.sgml; +&index.sgml; +
      + diff --git a/synfig-docs/ca/tips/bitmap.sgml b/synfig-docs/ca/tips/bitmap.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/ca/tips/bitmap.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/ca/tips/closebline.sgml b/synfig-docs/ca/tips/closebline.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/ca/tips/closebline.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/ca/tips/dock.sgml b/synfig-docs/ca/tips/dock.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/ca/tips/dock.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/ca/tips/filloutline.sgml b/synfig-docs/ca/tips/filloutline.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/ca/tips/filloutline.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/ca/tips/gradient_object.sgml b/synfig-docs/ca/tips/gradient_object.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/ca/tips/gradient_object.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/ca/tips/layer.sgml b/synfig-docs/ca/tips/layer.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/ca/tips/layer.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/en/animation/conclusion.sgml b/synfig-docs/en/animation/conclusion.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/en/animation/conclusion.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/en/animation/introduction.sgml b/synfig-docs/en/animation/introduction.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/en/animation/introduction.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/en/animation/keyframe.sgml b/synfig-docs/en/animation/keyframe.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/en/animation/keyframe.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/en/animation/movement.sgml b/synfig-docs/en/animation/movement.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/en/animation/movement.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/en/animation/rendering.sgml b/synfig-docs/en/animation/rendering.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/en/animation/rendering.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/en/animation/timeline.sgml b/synfig-docs/en/animation/timeline.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/en/animation/timeline.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/en/animation/workspace.sgml b/synfig-docs/en/animation/workspace.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/en/animation/workspace.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/en/appendix/apendices.sgml b/synfig-docs/en/appendix/apendices.sgml new file mode 100644 index 0000000..4a80e12 --- /dev/null +++ b/synfig-docs/en/appendix/apendices.sgml @@ -0,0 +1,46 @@ + + El archivo <filename>hola.txt</filename> + Por motivos de referencia incluímos el contenido del + archivo hola.txt + + + +Hola Mundo + + + + + + Preguntas Frecuentes + + + + ¿Qué es DocBook? + + + Es un lenguaje de marcado útil para escribir + documentación técnica. + + + + + + + DocBook + + Lenguaje de marcado definido en + SGMLque permite escribir documentación + técnica + + + + emacs + + Editor de amplio uso en unix. Su + nombre proviene de Editor MACroS (Macros de Edición). + + + + + + \ No newline at end of file diff --git a/synfig-docs/en/appendix/glossary.sgml b/synfig-docs/en/appendix/glossary.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/en/appendix/glossary.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/en/appendix/keyboard.sgml b/synfig-docs/en/appendix/keyboard.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/en/appendix/keyboard.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/en/installation/installation.sgml b/synfig-docs/en/installation/installation.sgml new file mode 100644 index 0000000..07f85f3 --- /dev/null +++ b/synfig-docs/en/installation/installation.sgml @@ -0,0 +1,4 @@ + + + + diff --git a/synfig-docs/en/interface/history.sgml b/synfig-docs/en/interface/history.sgml new file mode 100644 index 0000000..c771488 --- /dev/null +++ b/synfig-docs/en/interface/history.sgml @@ -0,0 +1,8 @@ + + + +History Dialog + +TODO + + diff --git a/synfig-docs/en/interface/interface.sgml b/synfig-docs/en/interface/interface.sgml new file mode 100644 index 0000000..dc661c7 --- /dev/null +++ b/synfig-docs/en/interface/interface.sgml @@ -0,0 +1,76 @@ + + + + +The user Interface +When you start Synfig Studio, it will display a splash graphic and boot +itself up. After it finishes loading, you should see three windows. The window +in the upper left is the toolbox. This is where you can open files, change tools, +etc. You'll notice that most of the buttons are greyed out--because there is no +file open yet. + +The other two windows (one on the bottom, and one to the right) are +customizable dock dialogs. You can rearrange the contents of these however +you wish by simply dragging the tab to where you want it. You can even create a +new dock dialog by dragging a tab out of the dock dialog it was inside of. + +If you ever accidently close a dock tabs (by dragging it out of the dock +dialog, and closing the new dock dialog that gets created), no worries. Simply +goto the toolbox and goto "File->Dialogs", and then click on the name of the +dialog you need. + +There are a lot of dock tabs. If you have no idea what a dock tab does, +simply hold your mouse over its icon and a tooltip will pop up describing the +name of the tab. + +Here are some of the more important ones: + + + Layers Dialog () - This tab shows you the layer + hierarchy for the currently selected canvas. It also allows you to manipulate + these layers. + + + Params Dialog ()- This tab will show you the + parameters of the currently selected layer, (OR, if multiple layers are + selected, it shows you only the parameters that the selected layers have + in common) + + + Tool Options Dialog () - Shows you any + options specific to the currently selected tool + + + Navigator () - Shows you a thumbnail of what the currently selected Canvas + looks like. You can also zoom in and move the focus around with this tab. + + + History Dialog (- Shows you the history stack for the current composition. + You can also edit the actions in history. + + + +If you click the "new composition" button in the toolbox, a new composition +will be opened and the canvas properties dialog will appear. + +The canvas properties dialog is a mess, I know. I'll have it re-designed into +something much more comprehendible in the next few days. For now, ignore the +"Image Area" and "Locks and Links" sections. + +If you click OK, the canvas properties dialog will disappear and you will see +the Canvas window. This window represents the Root Canvas, not that that means much +to you at the moment, but that's OK--I'm just trying to show you around. + +In the upper left corner of the Canvas Window, you'll see a button with a +caret If you click on this button, the canvas window menu will pop up. (As an aside, +if you right click in the canvas area and there is not a layer under the mouse +position, this menu will also appear) So now you know where the menu is in the Canvas +Window. Good. Everything else should be pretty self-explanatory in the Canvas Window. +(Explanations on the menu stuff is to come in a sec) +&toolbox.sgml; +&layers.sgml; +¶ms.sgml; +&tooloptions.sgml; +&navigator.sgml; +&history.sgml; + diff --git a/synfig-docs/en/interface/layers.sgml b/synfig-docs/en/interface/layers.sgml new file mode 100644 index 0000000..1c3f9bf --- /dev/null +++ b/synfig-docs/en/interface/layers.sgml @@ -0,0 +1,8 @@ + + + +Layers Dialog + +TODO + + diff --git a/synfig-docs/en/interface/navigator.sgml b/synfig-docs/en/interface/navigator.sgml new file mode 100644 index 0000000..350955c --- /dev/null +++ b/synfig-docs/en/interface/navigator.sgml @@ -0,0 +1,8 @@ + + + +Navigator + +TODO + + diff --git a/synfig-docs/en/interface/params.sgml b/synfig-docs/en/interface/params.sgml new file mode 100644 index 0000000..a62ae96 --- /dev/null +++ b/synfig-docs/en/interface/params.sgml @@ -0,0 +1,8 @@ + + + +Params Dialog + +TODO + + diff --git a/synfig-docs/en/interface/toolbox.eps b/synfig-docs/en/interface/toolbox.eps new file mode 100644 index 0000000..e1240d0 --- /dev/null +++ b/synfig-docs/en/interface/toolbox.eps @@ -0,0 +1,806 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Pages: 1 +%%BoundingBox: 0 0 138 432 +%%DocumentData: Clean7Bit +%%LanguageLevel: 2 +%%EndComments +%%Page: 1 1 +save 9 dict begin +{/T currentfile/ASCII85Decode filter def/DeviceRGB setcolorspace +/F T/LZWDecode filter def +<> image + F closefile T closefile} +%%BeginData:; +exec +J,g]g3$]1l+:uBJ0Si[d)%VG>@F6KV:+[3>73bZSgh&PgO%:Z%6AeR/R(2Z +""7*pggFRFKF=B;\/\'6mLs` +f=6WmPbN=f'.ChhJUrG`U<\Q^gAcsr#Q(LLVmS?\@b9e'og:EnlY7U7k9eHAoej&'cn**[a-a4I3t" +LSC?_F)SK1\;m4bg2;9(#jI09,DDqB_k3m`0i,\W&O__V9+f+i9MlPCnSD2A7?Mt/(rh\kD&L@`XDo9$;=&?G_MuXf8Je +ZPM]t^?9T^XBnnaR=8W\#t"[\;#FIik.1`J#>1>KPqbS'!D.1eor;CIQ9ThJrj7PI^eNFGho0['&%l +Tr.LM;!Lr76g8r(QaP45&;VOWUcamLX_1j@G&_B\JcCX_Cs,Tj +24NkF(afg_UE0E84KrZ#a1d^!h&Y=)HW7h0,pBE*\^%HJ(,tNCu.^u'C,,j+GA/IcHOl4E.>%8K63UV=NLV:E?*9Vc#p][k;T^RUTqEU"+\mt&WMEMcq_3CK +*$l&!+K>*l8"Wt5h!C*?i\naJc[@@$^7'/[SiO5g!=VtA.]XmLOmOCTGOICN#7?p`9o[Q."m-02=\%S3F@!nTP3Wa7;?[a3*uNc4/-@>k_IRpR.Vl#!&MuMkf&k09>09r`=p\D%4#L[; +CpdY%J)/mKN!)52X'Aqk?p@8cT^\+?Z(-_#*d&@)2t]"!:%YB7-L_E[m*!#J'g1s6'#'8,H1h!9>DY +TS+%b(gRYk*&Y9WPSh=%P\P$>=MOUAbF.So87L,EXeC]t@*%LOA)'5(iHkO\A&qd3EML+Sr_qp5(Tm=Ie[1$K62'28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I-=ScH +%V\)+gChL4kJ^%pNUe)*h*gg.EF]hdM@gYNt,h`[m>*Wb3U*St*7iZe'JTaBB>af\p7B6 +,&$R4^fT)F'ti5\'QKhF$?,-0.HEjCH%YhGuCi0BKoJjk`0VSkqZN:-u[5jJ3&J*b".o60:@Pk<=IY +SpBLjGNArZjuuB$*ae.qIHKCCkoQ\a*a.W3Xm(;6kii8a>lE^>U#qqrkMEE/5+FrO7F'C7cPkpco0- +d(nlFi69LX6p7-X-2i(O:0mf^i%53MA[jmV(%n,E@T^@Ucgj6kdsnK.r(,ffCcJ5-%[n/i&.?Q8I+$ +1e*>o04Pl-&:p,an+C!o:IR!3m^QM#Yn_knNR][554_\-g\h<10a:+8PEhf8+llCpE&l!?[;B1IJ85 +@pV2:SItd[4KD>J'q&bUl5FM=sSbZWdq7i^#s/#S,WVBgnqVS4JIdgshEAATcj#ZCfK*a0M6>F9^CE +Lu?5M,kKec#O$rZBtq5O&/smJ^J_rkJ((s7@E?`0(`:"G+Bt&9q.m)$u&7iR&Kq:*14-7A>ohe7Jp9 +BsXH#\%CJR-$?cSnp*p':>TWgLEhAo`,bmI9'6hde"0,!OM0iL)&3L06_dLm'M;@HQV"&Ql.$\h:8( +XdP^2WX=`'GIV@tDSg&GlR[@(gb`Tm&A^L(prbSC-_J\kjbfUOQI& +WF\=EZ"_?4"6<7jRUuo`c!N$c"FANr>(/[Mn;Vno1PV1GGhocFrL=F]4nP(m.T2)`p[iZh/BclrYGf +r^uKD/r*DlHQ-JCE/fL^Se"=kLo=EbLa)A0;m1,_I;^E\rt*8THq_,tZNqT.*AfUh5.-~> +%%EndData +end restore showpage +%%Trailer +%%EOF diff --git a/synfig-docs/en/interface/toolbox.sgml b/synfig-docs/en/interface/toolbox.sgml new file mode 100644 index 0000000..c2ae500 --- /dev/null +++ b/synfig-docs/en/interface/toolbox.sgml @@ -0,0 +1,48 @@ + + + + +The toolbox + +apsldkfjañsdlfads ñlaskdfjñald skfañdkl fjañsdklfj añdslvf kjadsñfkjadñfjkaflñjak añ kfjañ fñakjd fañ +a dfñladjf añdlkfj añlkf añldkf adlkf ajdñlf adñflkj dsñalj kfañldkf asjdñfkl asdñf akj +añ kfd ñaj kasñj kds ñjk sñljks añljskañ kñasjksdañ jk dfñljk + +

      + Toolbox + + + + + + + +
      + +asdf a dsf dsfa sdf adf adfadf ad f adsfasd fa sdf asd f asdf asdf asf adsf asdf asd fa + adsf asdf asd f asdf a dfa sdf as fasdf asdf adf ad faf f asdf af asd fa sf asdf adf adf + a dsf a dfa sdf ad fa df asdf asdf asd f af + + + + + + + +New +Open +Save +Save As + + +Save All +Undo +Redo +About Synfig Studio + + + +
      + +
      + diff --git a/synfig-docs/en/interface/tooloptions.sgml b/synfig-docs/en/interface/tooloptions.sgml new file mode 100644 index 0000000..aa89313 --- /dev/null +++ b/synfig-docs/en/interface/tooloptions.sgml @@ -0,0 +1,8 @@ + + + +Tool Options Dialog + +TODO + + diff --git a/synfig-docs/en/introduction/introduction.sgml b/synfig-docs/en/introduction/introduction.sgml new file mode 100644 index 0000000..2db1360 --- /dev/null +++ b/synfig-docs/en/introduction/introduction.sgml @@ -0,0 +1,52 @@ + + + + + <acronym>Introduction</acronym> + Synfig, like most every other competent graphics program, breaks down + individual elements of a Canvas into Layers. However, it differs from other + programs in two major ways: + + + An individual layer in Synfig usually represents a single "Primitive". + ie: A single region, an outline of a region, an imported JPEG, etc... This + allows you to have a great deal of flexibility and control. It is not + uncommon for a composition to have hundreds of layers(organized into a + hierarchy for artist sanity of course). + + + A layer can not only composite information on top of the image below it, + but also distort and/or modify it in some other way. In this sense, Synfig + Layers act much like filters do in Adobe Photoshop or the GIMP. For example, + we have a Blur Layer, Radial Blur Layer, Spherical Distortion Layer, + color-correct layer, bevel layer, etc... + + + + Each layer has a set of parameters which determine how it behaves. When + you click on a layer (either in the canvas window, or in the Layer Dialog), + you will see its parameters in the Params Dialog. + + Synfig Studio has an autorecover feature. If it crashes, even if the + current file has not been saved, it will not lose more than 5 minutes of work. + At restart it will automatically prompt the user to recover the unsaved changes. + Unfortunately history isn't recovered yet. That feature comes later. + + One thing you may notice is that Synfig Studio is SLOW, making it + practically unusable on hardware that is over 3 years old. The biggest reason + for this is that all of the color calculations are done in floating point + because Synfig Studio was built from the ground up with High-Dynamic-Range + Imaging in mind. HOWEVER, this will not be the case forever. + + darco has some fairly major re-implementations and optimizations that + he plans to implement that should quite dramatically improve the performance + of Synfig on all platforms. The goal is not a 200% speed increase, it is at + least a 2000% speed increase. With the optimizations that are planned to be + implemented, we will be able to pipeline operations in such a way that this + performance improvement can be realized. It should also pave the way to hardware + acceleration using todays powerful graphics processors, which should yield + further performance improvements measurable in orders of magnitude. + + + + diff --git a/synfig-docs/en/steps/done b/synfig-docs/en/steps/done new file mode 100644 index 0000000..e69de29 diff --git a/synfig-docs/en/steps/firststeps.sgml b/synfig-docs/en/steps/firststeps.sgml new file mode 100644 index 0000000..6f53169 --- /dev/null +++ b/synfig-docs/en/steps/firststeps.sgml @@ -0,0 +1,69 @@ + + + +First Steps + Lets create something +so that we can tweak with it. Now that you have a new composition open +and the properties dialog is out of the way, go over to the toolbox and +click on the circle tool(If you don't know which one it is, just mouse +over them until you find the one with the tooltip that says "circle"). + +The second you click on the circle tool, you should notice that the tool +options tab changed. But we'll get to that later. + + Some laptop users might experience trouble where click-drag on + the canvas when using the circle tool doesn't seem to do anything + or produce insanely huge circles. The problem is that Synfig has + detected the touchpad and enabled that device (incorrectly!) To fix + this: click File->Input devices... In the resulting dialog window, + select 'Disabled' for your touchpad device. After this change, + your external mouse and the touchpad will work as expected. + + With the circle tool selected, you can now create circles in the + canvas window. This pretty much works exactly as you might expect + it to. Go ahead and create two (or more, if you fancy) circles. If + by accident you just clicked on the canvas instead of clicking and + dragging(with mouse button pressed) to draw the circle, you end up + creating a circle with 0 radius and it is effectively invisible! No + need to worry, you can easily fix this. In the Params dialog, you + can change the parameters of the selected object. If you just made + a 0 radius circle, it should be the current selected object. you can + change its radius to some value other than 0, say 10, and manipulate + it to your liking with the canvas ducks later. + + Now go back to the toolbox and click on the normal tool (the blue + circle with the arrow on it). After you do this, click on one of your + circles. You will then see a bounding box(which is kinda useless + at this point in time, but I digress), a green dot at the center, + and a cyan dot on the radius. Those dots are called ducks. If you + want to modify the circle, grab a duck and drag it around. Easy! + + So you can select a layer by clicking on it. If you want to select + more than one layer, hold down CONTROL while you are clicking--this + works in both the canvas window and the layer tab. Try it! + + You can also select multiple ducks. You can do this in several + ways. First, you can hold down CONTROL and individually click the + ducks that you want selected, but this can be tedious. However, there + is a much faster method--just create a selection box by clicking the + mouse and dragging it over the area of ducks that you want selected. + + Go ahead and select two circles, and select all of their ducks. With + several ducks selected, moving one duck will move all of the + ducks. This behavior is dependent on the normal tool. Thus, a + more descriptive name for this tool might have been the "move" or + "translate" tool. + + The Rotate and Scale tools work much like the Normal tool, except in + the case where you have multiple ducks selected. It is much easier + to just try it than read about it. Select a few circles, select all + of their ducks, and try using the rotate and scale tools. + + Note that, unlike the normal tool, the other duck manipulation tools + DO have options associated with them. If a particular tool isn't + doing what you want, take a look in the tool options tab to see if + it is set up like you want it. +&linking.sgml; +&steplayers.sgml; +&shapes.sgml; + diff --git a/synfig-docs/en/steps/layers/combining.sgml b/synfig-docs/en/steps/layers/combining.sgml new file mode 100644 index 0000000..ce7b421 --- /dev/null +++ b/synfig-docs/en/steps/layers/combining.sgml @@ -0,0 +1,32 @@ + + + +Combining +Now there are two ways to proceed. In the first way, pick the gradient +tool from the Synfig Toolbox, and click into the canvas once. You should note +that another layer was added in the Layers Dialog called 'Gradient'. This is +nothing special. If you see no gradient but just a plain color, pick the normal +tool, click into the canvas to acivate the gradient's ducks. You need to grab +the one you see and move it a bit until a gradient appears. + +You now have a gradient but it is not what you wanted: It spreads the +whole canvas and the goal was to have a gradient on the rectangle. Let's fix +this now. + +Select the gradient and the rectangle layer in the Layers Dialog. They +should appear with a blue background now. Then, context-click (ie. right-click +on Windows and Linux) and select 'Encapsulate' from the menu. The view of your +layer tab should change now, showing a small box called 'Inline Canvas' with an +arrow in front. If you click the arrow, it will unfold and show your previous +two layers; the gradient and the rectangle. + +You can treat this layer like any other layer -- move it around, +duplicate it, copy and paste it. You'll notice an arrow next to the icon of the +box. By clicking on this arrow, you can expand the inline canvas to see its +contents. + +If you want to change the name of it to something more descriptive, just +select the layer in the layer tab and click on its label. Then you just edit it +in place. You can do this for ANY layer, and are strongly encouraged to do so. + + diff --git a/synfig-docs/en/steps/layers/done b/synfig-docs/en/steps/layers/done new file mode 100644 index 0000000..e69de29 diff --git a/synfig-docs/en/steps/layers/layers.sgml b/synfig-docs/en/steps/layers/layers.sgml new file mode 100644 index 0000000..f574dba --- /dev/null +++ b/synfig-docs/en/steps/layers/layers.sgml @@ -0,0 +1,37 @@ + + + +Layers + In the previous tutorial, you made a +first simple animation by changing the attributes of primitive objects +such as its position, color, and size. These simple types, however, are +seldomly sufficient to create advanced characters and objects. To do so, +Synfig uses Layers. They are similar to layers known from other drawing +application such as the GIMP, for instance. + +However, Synfig is different to simple layers in at least two +respects: + + + You can organize layers into hierachical groups. + + + You can use upper layers to change the behaviour (or look) + or underlying layers. + + + +Doing so is quite easy. Let's look at a simple example. + + + + Create a new file with 0 duration. There's no need to bother + with a timeline at this point. + + + Create a simple rectangle. + + +&using.sgml; +&combining.sgml; + diff --git a/synfig-docs/en/steps/layers/using.sgml b/synfig-docs/en/steps/layers/using.sgml new file mode 100644 index 0000000..4eef8ca --- /dev/null +++ b/synfig-docs/en/steps/layers/using.sgml @@ -0,0 +1,57 @@ + + + +Using + However, there is still a problem: The gradient still covers the whole +canvas althought we wanted it to be restricted on the rectangle. To do so, +activate the gradient layer in the Layer tab. Now go to the Params Dialog (by +default a tab in the Params-Children-Keyframes window), and search the attribute +called 'Blend Method'. Double-click the entry and select 'Onto' from the +appearing drop-down menu. + +The gradient should now be restricted to the rectangle. Congratulations! +You just made your first interacting layers with Synfig. + +If only for the additional organization, encapsulating layers into inline +canvases dramatically improves the ease of use of Synfig Studio. But +lots of programs can do this. The concept of scope as just demonstrated +sets Synfig apart from other programs with layer hierarchies. + +The following remarks seem to be outdated already! A blur +defaults to 'Straight' here (using SVN 110). --Claus 06:45, 11 Jan 2006 (PST) + + + It defaulted to composite for me, as described (using + SVN 147) Matumio 07:56, 12 Mar 2006 (PST) + + However, a layer can only modify the data that it gets from directly + below it. In other words, if you were to throw a Blur Layer at + the top of the objects inside the inline canvas we just created, + it would just blur them -- anything under it would not be blurred! + + Lets try it. Add a few circles under the inline canvas we just + created. Expand the inline canvas to show its contents, and select + the top layer inside of it (should be the "Outline" layer). This + is where we want to insert the blur. Right click on the selected + layer and a popup menu will appear. The first item in that popup + is "New Layer". Inside of the "New Layer" menu, you'll see several + categories of layers you could create, but what we want is a blur, + so goto the Blur category and select the "Blur" layer. (so that + would be "New Layer->Blurs->Blur") + + Well, it blurred... but something is not quite right--the inside edge + of the outline is now all soft, but it still kinda looks like there is + a hard edge on the outside. It is doing this because the blend method + of the blur defaulted to "Composite" (you can change the default + blend method for new layers from the New Layer Defaults section of + the Toolbox). What we want is a blend method of "Straight". Just + select the blur layer, and change the Blend Method to "Straight" + in the Params Dialog. + + (NOTE: I will probably change the way that default blend methods are + handled in the future--as the way it is currently handled seems to + only create hassles like this) + + Ok, now we have all of the contents of the inline canvas blurred, + but everything under it is sharp! + diff --git a/synfig-docs/en/steps/linking.sgml b/synfig-docs/en/steps/linking.sgml new file mode 100644 index 0000000..bc17b4d --- /dev/null +++ b/synfig-docs/en/steps/linking.sgml @@ -0,0 +1,53 @@ + + + +Linking +Now lets try linking. Lets say we always +want these two circles to be the same size. Select two circles, and then +select both of their Radius ducks(the cyan dot). Then right click on +either duck and a menu will pop up. Click on "Link". Boom. The parameters +are linked together. You can prove it to yourself by selecting just one +of the circles and changing its radius--the other one will change as +well. Neat stuff, eh? + +Linking is a fundamental concept in Synfig. You can create links not only +between ducks, but also between parameters as well by selecting multiple +layers, right clicking on the parameter in the param tab, and selecting +"Link". + +DIGRESSION: This is how outlines are attached to their regions-but +I'm getting ahead of myself. At the moment, the fundamental power and +flexibility of linking in Synfig Core is beyond what Synfig Studio +currently allows for. This will change in the future. Anyway, back +on track... + +Lets say you want one of the circles to be a different color. If you look +in the toolbox below the tools, you'll see the foreground/background +color selector, the outline width selector, and some other stuff like +the default blend method and gradient. The foreground/background color +widget works exactly as you might expect--you can click on the foreground +color, and a modest color chooser will appear. Now to can change the +color pretty easily. + +But sometimes you just want to click on a color and go. This is where +the palette editor tab comes in. It's functionality isn't quite 100% yet +(ie: saving and loading custom palettes hasn't been implemented yet), +but the default palette is pretty decent. Click on the Palette editor tab +and have a look--it's the one with the palette-ish looking icon. Clicking +on colors in here will immediately change the default foreground color. + +That's all great, but we still haven't changed the color of the +circle. There are two ways to do this. The first way is that you select +the circle layer you want to modify, goto the params tab and double click +on the color parameter--a color selector dialog shows up and you just +tweak away. But lets say you already got the color you wanted selected as +the default foreground color. Easy. Just click on the "Fill tool" from the +toolbox, and then click on the circle in the canvas window. Boom. Circle +changes color. This works with more than just circles, but we'll get to +that in a sec. + +Try playing around with the circles for a bit. Muck around with the +parameters, and see what happens. To get you started, play around with +feather a bit. + + diff --git a/synfig-docs/en/steps/shapes.sgml b/synfig-docs/en/steps/shapes.sgml new file mode 100644 index 0000000..23a46bb --- /dev/null +++ b/synfig-docs/en/steps/shapes.sgml @@ -0,0 +1,82 @@ + + + + Shapes + Basic primitives such as circles or +rectangles are all great, but they are pretty much geometrically +inflexible. What about shapes? To do this, we use the bline tool. + In Synfig, the construct for describing shapes is called a Bline. This +is roughly analogous to a "path" in other programs, except that it is +strictly a hermite spline. + When you click on the bline tool, you will see that the ducks from +your currently selected layer (if there was one) will disappear, but +the layer(s) will still remain selected in the Layers Dialog. This is +normal. Anything you create in the bline tool will be inserted above the +currently selected layer. Keep in mind that if you want to insert a shape +somewhere, you should select where you want to insert it before you go +into the Bline tool-changing the selection afterward will automaticly +swap you back to the normal tool. + If you take a look at the tool options dialog, you'll notice that the +first things you see are three checkboxes. Make sure that only "Fill" +AND "Outline" are checked. + First, go ahead and click on the "R" button in the lower left corner of +the FG/BG color widget in the toolbox. This will reset us back to black +and white. Also, go ahead and set the default line width (right next to +the FG/BG widget) to something nice and thick -- 10pt should do the +trick. + Clicking with your mouse in the canvas will place vertices. While you are +placing a vertex, you can drag out its tangent by dragging the mouse. Do +this over and over, and you construct a Bline. + Keep in mind, however, that during this construction, there is nothing +stopping you from just moving it if you don't like where you placed +a vertex or a tangent. Honest! If you want to remove a vertex, right +click on it and delete it. Want to split the tangents? Right click on +the tangent and hit "split tangents". Want to loop the bline? right +click on the first vertex and select "loop". + So I assume you got your first Bline laid out like you want it. That's +great. But we are still in construction mode -- the layers haven't been +created yet. There are two ways to create the layers: + + + just switch to another tool, or + + + press the "create" button at the bottom of the tool options tab + (it's the icon that looks like a gear). + + + For now, just go ahead and click on the normal tool because we + are done with the bline tool. + // Insert Figure about here + Ok, we now have a nice pretty white region with a thick black + outline. Notice that there are two layers that we have created--the + Outline and the Region. Despite the fact that they are two separate + layers, their vertices parameter has already been linked--so you + can select either one and move its ducks around and the other one + will also change. + If you want to manipulate the vertices after you have created + the layers, it is very easy to do so. Just click on one of the + layers and have at it. If you want to remove a vertex, right + click on it and hit "Remove Item (smart)". Want to insert a point + somewhere? Right click on the segment where you want to insert + something and his "Insert item (smart)". + NOTE: The only major difference between this normal editing mode + and the construction mode is in how you split the tangents--in + construction mode you right click on the tangent itself. In normal + duck editing mode, you must right click on the vertex that the + tangents are attached to. This could be considered a usability bug, + and it will be resolved at some point. + This may appear to be leading to a mess of layers. And yes, if + you aren't using the software properly, that is exactly what you + will get. But there is a way to make this more sane: Just study + the previous tutorial + One quick thing to mention before I finish up. You can change the + width of an outline at each vertex. You do this by selecting the + outline layer (NOTE: you must select the Outline Layer, the Region + Layer has no width data) and tweaking with the width ducks. By + default, these are masked. To show them, press Alt-5. Repeat to + hide them again. You can also see other things to mask via the + Canvas Menu Caret > View Menu > Mask Ducks Menu. + That should give you enough of a grasp of the software to be able + to figure out more stuff on your own. + diff --git a/synfig-docs/en/synfig-studio.sgml b/synfig-docs/en/synfig-studio.sgml new file mode 100644 index 0000000..31266a3 --- /dev/null +++ b/synfig-docs/en/synfig-studio.sgml @@ -0,0 +1,64 @@ + + + + %commondata; --> + + + + + + + + + + + + + + + + + + + + + + +]> + + + 28 Aug 2006 + <acronym>Synfig Studio</acronym> + + Getting Started + Intial Release + + + xxxx + xxx xxxxxx + + + et Alt. + + +
      synfig@miguelgea.com
      + + Released with GFDL license + + + + 0.1 + 2006-8-28 + mgm + Document start + + +
      +&introduction.sgml; +&interface.sgml; +&firststeps.sgml; +&apendices.sgml; +&index.sgml; +
      + diff --git a/synfig-docs/en/tips/bitmap.sgml b/synfig-docs/en/tips/bitmap.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/en/tips/bitmap.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/en/tips/closebline.sgml b/synfig-docs/en/tips/closebline.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/en/tips/closebline.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/en/tips/dock.sgml b/synfig-docs/en/tips/dock.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/en/tips/dock.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/en/tips/filloutline.sgml b/synfig-docs/en/tips/filloutline.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/en/tips/filloutline.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/en/tips/gradient_object.sgml b/synfig-docs/en/tips/gradient_object.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/en/tips/gradient_object.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/en/tips/layer.sgml b/synfig-docs/en/tips/layer.sgml new file mode 100644 index 0000000..67c575a --- /dev/null +++ b/synfig-docs/en/tips/layer.sgml @@ -0,0 +1,2 @@ + + diff --git a/synfig-docs/others/Authors b/synfig-docs/others/Authors new file mode 100644 index 0000000..144393b --- /dev/null +++ b/synfig-docs/others/Authors @@ -0,0 +1 @@ +snapSilverlight is AdrianW, and he did a lot of the wiki diff --git a/synfig-docs/others/hola.txt b/synfig-docs/others/hola.txt new file mode 100644 index 0000000..ade1f58 --- /dev/null +++ b/synfig-docs/others/hola.txt @@ -0,0 +1 @@ +Hola Mundo \ No newline at end of file diff --git a/synfig-docs/png/toolbox.png b/synfig-docs/png/toolbox.png new file mode 100644 index 0000000000000000000000000000000000000000..988e28d3c3ad9175e263b637eb38f773b544477a GIT binary patch literal 36891 zcmV)%K#jkNP)r00FQF0ssI2`EzPa00003b3#c}2nYz< z;ZNWI0016zMObu0Qbj>jPf`G9Zf|X6EpTCOWo#{TV{&C>ZgXgFbR3sAcK`q&07*na zRCt{1y?tmLSGF(uoA=7F3OY~)3Uq-DDzGnUF^1D(3?uRUhx_0Mk;#EbWMJIPK%$($ zM1Fx2>jqBJ$2@YB9LP~}AY)~?nNjB51bHAq4ot8N*WC6WezXQWs0R{M1{+FXLp4}X z#dGs&alCoFKlVrM>Tb!(B%Y6RvN7#a)!u8bz1IF*dwqNl1!rQS|#|M@-h zBpGw=o%KI8M&BhXU3_g07Lycvs^g(#Onfi-b7A&f0uUY!09<@+PIBmb(7gGMF^?l{ zUtc?5&WTe^^PJr7Ze3mN?Zi&;UF=slO=4ya!rC8$i@45_39}TO=zT?n=QhZ~5^7Q<{^QWA}H`dSmWKr@Wi=(Zp zt9tb8J#<)bd@El1`*{E>zgeS-=RFyG6TJUZB?ccfs{nvplz8!I_C(#S@aW{_CX^G{FLk5mq zfPb0=(EaUl?eETgEjariw*F6N0nGjLrEh}gJ}CX_A7%i&_-`9~y-_R>C0_h5``5R9 zFYQ(9S*6PT4E-#tRI_R=&Y1IjpHd6YOiw*kZT-u;6DOyeFTEJwiQ)rqU`8f6ZsKS= zI5r&~Z=89dHF07Z0LR;33(g}Ei++3Yo8UPj30D6AN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0>iVnWVjHk(ZQ z``duWXY*_kCdD$%TlN*u>#^Q;y<6x|-@wE7Bupl_vV@ZwX`mN&I-!S5d9B&ynTY5k zeuX-z78YuU!sT3wJ1ri+12cND(E=FBn!*6|A{Y&UsPcrW(O9`rZ{$ViQg#NsG`crW ztM>4rQ=KE>g#eVp8iTaOF>KkeC-2aJJoqq28LoKZdeu9e=l#Ax4 zL%TLDeuNPrHEN;z3B}oJMJiOubnlQAUA^SABelog39tjGMQFKG|-S8(86`C<-WwP5NL;kU^QOnt8*t zWy$WtmbAQ^7NdZ{3d)m;H$3U6^*d2EFTY^g7Q@+s0Sj2^)*17dgpSSP#L9U;+R>f| zYZIo-3SAv#2b6J_0Bm@ui^mpj5ID}KSN1!j=v|fLwuXQtM|RkK)7NAO&sn6-f^DRh z&oIid$ckdOu+RA3*(}_`HSFf-HrQbu5C4R6t?q0@af)fmYBxMSrhtxv=p2HX*|Yzk5pQKX>pXEX--ylHsc#G4&3{$r63C4gVcWm-ceSPk ziIiAXtISxryE5DQ`&#wFLd+U`yVOS^#rKcb&tb?-S$k=l<5J99L$Wpa;ZVMg9a+ay zAZe6wX;_n32B+SPHE0C7ZFo32ix)Ize$1`EA>Nz{j)WuppCFy}$=L&{-kA-mTPC-) zCJAf3=8X5#EL5=rX(fd*97^o&l%s~oYxS6Y0mqZQy)s7{w!GUmM78J;B zRaDFo|KJ<0ug=oqja>US^y1SghCH$B-}H!xbXTPN0*@nWe)A^`KJ(LwBF2V?XRs?* z*Euo$U-V!xtse5Ytk@;YO<7(UVrJ&Tf3dmVFqb1NH0!{YT3t?oILF5QNIFSoEimY` zTO0frNWRvqtR#iM#q8w_eOqz#tl$px&-v+pe&n?SyhZ|#o~/dev/null + done +done diff --git a/synfig-docs/scripts/clean.sh b/synfig-docs/scripts/clean.sh new file mode 100755 index 0000000..ddc27e3 --- /dev/null +++ b/synfig-docs/scripts/clean.sh @@ -0,0 +1,7 @@ +LANGSAVAL="en ca" + +for i in $LANGSAVAL + do + make SGMLDIR=$i clean + rm -Rf result/ +done diff --git a/synfig-docs/trunk/IndexToDo b/synfig-docs/trunk/IndexToDo deleted file mode 100644 index 2469d30..0000000 --- a/synfig-docs/trunk/IndexToDo +++ /dev/null @@ -1,33 +0,0 @@ -*+ 1.- Introduction -2.- Installation -3.- The user Interface - * 3.0.- The Toolbox - 3.1.- Layers Dialog - 3.2.- Params Dialog - 3.3.- Tool Options Dialog - 3.4.- Navigator - 3.5.- History Dialog -4.- First steps - *+ 4.1.- Linking - 4.2.- Layers - 4.2.1.- Combining - 4.2.2.- Using - 4.3.- Shapes -5.- Animation Basics - 5.1 Introduction - 5.2 Setting up the workspace - 5.3 Adding movement - 5.4 The s's and f's: Understanding the Timeline - 5.5 The Keyframe List - 5.6 Rendering your animation - 5.7 Conclusion -6.- Tips - 6.1 Apply a gradient to an object instead of the entire canvas? - 6.2 Show or hide a layer, or fade the effect of a blur? - 6.3 Fill an outline? - 6.4 Dock Together Windows? - 6.5 Use an external Bitmap? - 6.6 Close a bline? -Appendix -A.- Keyboard Shortcuts -B.- Glossary diff --git a/synfig-docs/trunk/Makefile b/synfig-docs/trunk/Makefile deleted file mode 100644 index f29e3dc..0000000 --- a/synfig-docs/trunk/Makefile +++ /dev/null @@ -1,165 +0,0 @@ -#Author: Jaime Irving Davila -#Date: 23/09/2001 -#Modified on 15/04/2002 -#Given to the public domain - -#Variables useful for the customization of the makefile - -#Name of the document (without the sgml extension) - -DOC = synfig-studio - -#Name of the file used for the index (without the sgml extension) -INDEX = index - -#Name of the compiler of the sgml, could be jade, openjade, .. -COMPILER = openjade - -#Location of the stylesheet for the html output - -DBSTYLESHEET = /usr/share/sgml/docbook/stylesheet/dsssl/ldp/ldp.dsl - -#Options for generating multiple HTML output -MULTIPLEHTMLOPT = -t sgml -ihtml -d${DBSTYLESHEET}\#html - -#Name of the directory for the source sgml -SGMLDIR = en - -#Name of the directory for the "others" files -OTHERSDIR = ${SGMLDIR}/others - -#Name of the directory for the png files -PNGDIR = png - -RESULTDIR = result/${SGMLDIR} - -#Name of the directory for the output of the multiple html -MULTIPLEHTMLDIR = ${RESULTDIR}/out-htmls - -#Name of the directory for the output the ps file -PSDIR = ${RESULTDIR}/out-ps - -#Name of the script which generates the ps file, in RedHat it's db2ps -SCRIPTPS = db2ps - -#Name of the directory for the temp and tmp-output the pdf file -PDFDIR = ${RESULTDIR}/tmp-pdf -#Name of the script which generates the ps file, in RedHat it's db2ps -SCRIPTPDF = db2pdf - -#Variables needed by the rules, should NOT be changed -#Variable for including the sgml source file -VPATH = ${SGMLDIR} - -#Variable for knowing if there exists the sgml index file, in case it -#NOT exists its value is empty, otherwise it's the name of the index -ISINDEX = ${findstring ${INDEX}, ${wildcard ${SGMLDIR}/*.sgml}} - -#Variable for knowing if the tag init will be needed -ifneq (${ISINDEX}, ${INDEX}) - USEINIT = init -endif - -#Variable for storing the name of all the sgml source files directory -SRCFILES = $(patsubst ${SGMLDIR}/${INDEX}.sgml,,$(wildcard ${SGMLDIR}/*)) - -#Variable for storing the name of all the files in the "others" directory -OTHERFILES = $(wildcard ${OTHERSDIR}/*) - -#Variable for storing the names of the "others" files placed in the - -#Variable for storing the names of the "others" files placed in the -#multiple-html directory -OTHERMULTIPLE = $(patsubst ${SGMLDIR}/others/%, ${MULTIPLEHTMLDIR}/%, ${OTHERFILES} ) - -#Variable for storing the names of the png's pictures -PNGFILES = $(wildcard ${PNGDIR}/*.png) - -#Variable for storing the names of the png's files placed on the - -#Variable for storing the names of the png's files placed on the -#single-html directory -PNGMULTIPLE = $(patsubst ${PNGDIR}/%, ${MULTIPLEHTMLDIR}/%, ${PNGFILES}) - -#Variable for storing the names of the eps files -FIGEPS = $(patsubst ${PNGDIR}/%.png, ${PSDIR}/%.eps, ${PNGFILES}) - -PATH_LANG = ${CURDIR}/${SGMLDIR} - -all: multiple-html ps pdf - -.PHONY: all clean init cpfilessingle multiple-html cpfilesmultiple distsource ps - -#Rules needed for generating multiple html files - -multiple-html: ${MULTIPLEHTMLDIR}/${DOC}.html cpfilesmultiple - -${MULTIPLEHTMLDIR}/${DOC}.html: ${MULTIPLEHTMLDIR} ${INDEX}.sgml.m ${SGMLDIR}/${DOC}.tmp.sgml - #cp -f ${SGMLDIR}/${INDEX}.sgml.m ${SGMLDIR}/${INDEX}.sgml - ${COMPILER} ${MULTIPLEHTMLOPT} ${SGMLDIR}/${DOC}.tmp.sgml - mv *.html ${MULTIPLEHTMLDIR} - -${SGMLDIR}/${DOC}.tmp.sgml: ${SGMLDIR}/${DOC}.sgml - sed "s:##PATHLANG##:${PATH_LANG}:" ${SGMLDIR}/${DOC}.sgml > ${SGMLDIR}/${DOC}.tmp.sgml - -HTML.index.m: ${DOC}.sgml ${SRCFILES} ${USEINIT} ${SGMLDIR}/${DOC}.tmp.sgml - ${COMPILER} ${MULTIPLEHTMLOPT} -V html-index ${SGMLDIR}/${DOC}.tmp.sgml > /dev/null - mv HTML.index ${SGMLDIR}/HTML.index.m - rm *.html - -${INDEX}.sgml.m: HTML.index.m - perl -S collateindex.pl -o ${SGMLDIR}/${INDEX}.sgml.m ${SGMLDIR}/HTML.index.m - -${MULTIPLEHTMLDIR}: - mkdir -p ${MULTIPLEHTMLDIR} - -cpfilesmultiple: ${PNGMULTIPLE} ${OTHERMULTIPLE} - -${MULTIPLEHTMLDIR}/%.png: ${PNGDIR}/%.png - cp -rf $< $@ - -${MULTIPLEHTMLDIR}/%: ${OTHERSDIR}/% - cp -rf $< $@ - -#Rules needed for generating the ps file - -ps: ${PSDIR}/${DOC}.ps - -${PSDIR}/${DOC}.ps: ${PSDIR} ${FIGEPS} ${INDEX}.sgml.m - cp -rf ${SGMLDIR}/*.sgml ${PSDIR} - cd ${PSDIR}; ${SCRIPTPS} ${DOC}.tmp.sgml ; mv ${DOC}.tmp.ps ${DOC}.ps - cd .. - -${PSDIR}/%.eps: ${PNGDIR}/%.png ${PSDIR} - convert $< $@ - -${PSDIR}: - mkdir -p ${PSDIR} - -#Rules needed for generating the pdf file - -pdf: ${PDFDIR}/${DOC}.pdf - -${PDFDIR}/${DOC}.pdf: ${PDFDIR} ${INDEX}.sgml.m - cp -rf ${PNGDIR}/* ${PDFDIR} - cp -rf ${SGMLDIR}/*.sgml ${PDFDIR} - cp -rf ${SGMLDIR}/* ${PDFDIR} - mv ${PDFDIR}/${DOC}.tmp.sgml ${PDFDIR}/${DOC}.sgml - cd ${PDFDIR};${SCRIPTPDF} ${DOC}.sgml - cd .. - -${PDFDIR}: - mkdir -p ${PDFDIR} - -#Some additional and standard tags -init: - perl -S collateindex.pl -N -o ${SGMLDIR}/${INDEX}.sgml - -distsource: clean - tar cvfz ${DOC}.tar.gz * - -clean: - rm -rf ${MULTIPLEHTMLDIR} ${SGMLDIR}/*.index.* ${SGMLDIR}/${INDEX}.sgml* nil ${PSDIR} ${PDFDIR} - - - diff --git a/synfig-docs/trunk/README b/synfig-docs/trunk/README deleted file mode 100644 index 9536a6c..0000000 --- a/synfig-docs/trunk/README +++ /dev/null @@ -1,23 +0,0 @@ -synfig-docs 0.1 -=============== - -Build Dependences -================= -The complete file list I use in my system to build synfig-docs is included in -build-deps file. Of course, it could be reduced... - -Build: -====== -- To build all langs/formats exec: - scripts/build.sh - -- To build the lang $lang with format $format (pdf, ps or multiple-html) - make SGMLDIR=$lang $format - example: make SGMLDIR=en pdf - -- To clean tree: - scripts/clean.sh -Documents: -========== - -All built documents could be found in results directory. diff --git a/synfig-docs/trunk/TODO b/synfig-docs/trunk/TODO deleted file mode 100644 index 3aec27c..0000000 --- a/synfig-docs/trunk/TODO +++ /dev/null @@ -1,3 +0,0 @@ -- Insert all wiki contents in each file -- Create snapshots from synfigstudio to include in documentation -- Remove unnecessary dependences in build-deps diff --git a/synfig-docs/trunk/build-deps b/synfig-docs/trunk/build-deps deleted file mode 100644 index ad37084..0000000 --- a/synfig-docs/trunk/build-deps +++ /dev/null @@ -1 +0,0 @@ -coreutils (>= 5.97-5.3 ), debianutils (>= 2.17.5 ), docbook (>= 4.4-1 ), docbook-dsssl (>= 1.79-4 ), docbook-html-forms (>= 1.1.0-3 ), docbook-jrefentry (>= 1.1.0-1 ), docbook-mathml (>= 1.0.0-2 ), docbook-simple (>= 1.0.0-6.1 ), docbook-slides (>= 3.3.1.0-1.1 ), docbook-utils (>= 0.6.14-1 ), docbook-website (>= 2.5.0.0-7.2 ), docbook-xml (>= 4.4-5 ), festival (>= 1.4.3-17.2 ), grep (>= 2.5.1.ds2-6 ), jadetex (>= 3.13-7.1 ), ldp-docbook-dsssl (>= 0.0.20040321-2 ), libacl1 (>= 2.2.42-1 ), libattr1 (>= 1 ), libbz2-1.0 (>= 1.0.3-6 ), libc6 (>= 2.3.6.ds1-13 ), libexpat1 (>= 1.95.8-3.4 ), libfontconfig1 (>= 2.4.2-1.2 ), libfreetype6 (>= 2.2.1-5 ), libgcc1 (>= 1 ), libice6 (>= 1 ), libjasper-1.701-1 (>= 1.701.0-2 ), libjpeg62 (>= 6b-13 ), libkpathsea4 (>= 3.0-30 ), liblcms1 (>= 1.15-1 ), libmagick9 (>= 7 ), libncurses5 (>= 5.5-5 ), libosp5 (>= 1.5.2-3 ), libpng12-0 (>= 1.2.15~beta5-1 ), libpoppler0c2 (>= 0.4.5-5.1 ), libselinux1 (>= 1.32-3 ), libsepol1 (>= 1.14-3 ), libsm6 (>= 1 ), libsp1c2 (>= 1.3.4-1.2.1-47 ), libstdc++6 (>= 4.1.1-21 ), libtiff4 (>= 3.8.2-7 ), libx11-6 (>= 2 ), libxau6 (>= 1 ), libxdmcp6 (>= 1 ), libxext6 (>= 1 ), libxml2 (>= 2.6.27.dfsg-1 ), libxt6 (>= 1 ), locales (>= 2.3.6.ds1-13 ), metacity-common (>= 1 ), openjade (>= 1.4devel1-18 ), openjade1.3 (>= 1.3.2-9 ), sgml-data (>= 2.0.3 ), sgmltools-lite (>= 3.0.3.0.cvs.20010909-13 ), tetex-base (>= 3.0.dfsg.3-5 ), tetex-bin (>= 3.0-30 ), tetex-extra (>= 3.0.dfsg.3-5 ), tex-common (>= 1.0.1 ), tipa (>= 2 ), w3c-dtd-xhtml (>= 1.1-5 ), w3-dtd-mathml (>= 2.0.0.0-1 ), xml-core (>= 0.09-0.1 ), zlib1g (>= 1 ), \ No newline at end of file diff --git a/synfig-docs/trunk/ca/animation/conclusion.sgml b/synfig-docs/trunk/ca/animation/conclusion.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/ca/animation/conclusion.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/ca/animation/introduction.sgml b/synfig-docs/trunk/ca/animation/introduction.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/ca/animation/introduction.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/ca/animation/keyframe.sgml b/synfig-docs/trunk/ca/animation/keyframe.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/ca/animation/keyframe.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/ca/animation/movement.sgml b/synfig-docs/trunk/ca/animation/movement.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/ca/animation/movement.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/ca/animation/rendering.sgml b/synfig-docs/trunk/ca/animation/rendering.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/ca/animation/rendering.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/ca/animation/timeline.sgml b/synfig-docs/trunk/ca/animation/timeline.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/ca/animation/timeline.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/ca/animation/workspace.sgml b/synfig-docs/trunk/ca/animation/workspace.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/ca/animation/workspace.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/ca/appendix/apendices.sgml b/synfig-docs/trunk/ca/appendix/apendices.sgml deleted file mode 100644 index 4a80e12..0000000 --- a/synfig-docs/trunk/ca/appendix/apendices.sgml +++ /dev/null @@ -1,46 +0,0 @@ - - El archivo <filename>hola.txt</filename> - Por motivos de referencia incluímos el contenido del - archivo hola.txt - - - -Hola Mundo - - - - - - Preguntas Frecuentes - - - - ¿Qué es DocBook? - - - Es un lenguaje de marcado útil para escribir - documentación técnica. - - - - - - - DocBook - - Lenguaje de marcado definido en - SGMLque permite escribir documentación - técnica - - - - emacs - - Editor de amplio uso en unix. Su - nombre proviene de Editor MACroS (Macros de Edición). - - - - - - \ No newline at end of file diff --git a/synfig-docs/trunk/ca/appendix/glossary.sgml b/synfig-docs/trunk/ca/appendix/glossary.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/ca/appendix/glossary.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/ca/appendix/keyboard.sgml b/synfig-docs/trunk/ca/appendix/keyboard.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/ca/appendix/keyboard.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/ca/installation/installation.sgml b/synfig-docs/trunk/ca/installation/installation.sgml deleted file mode 100644 index 07f85f3..0000000 --- a/synfig-docs/trunk/ca/installation/installation.sgml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/synfig-docs/trunk/ca/interface/history.sgml b/synfig-docs/trunk/ca/interface/history.sgml deleted file mode 100644 index c771488..0000000 --- a/synfig-docs/trunk/ca/interface/history.sgml +++ /dev/null @@ -1,8 +0,0 @@ - - - -History Dialog - -TODO - - diff --git a/synfig-docs/trunk/ca/interface/interface.sgml b/synfig-docs/trunk/ca/interface/interface.sgml deleted file mode 100644 index dc661c7..0000000 --- a/synfig-docs/trunk/ca/interface/interface.sgml +++ /dev/null @@ -1,76 +0,0 @@ - - - - -The user Interface -When you start Synfig Studio, it will display a splash graphic and boot -itself up. After it finishes loading, you should see three windows. The window -in the upper left is the toolbox. This is where you can open files, change tools, -etc. You'll notice that most of the buttons are greyed out--because there is no -file open yet. - -The other two windows (one on the bottom, and one to the right) are -customizable dock dialogs. You can rearrange the contents of these however -you wish by simply dragging the tab to where you want it. You can even create a -new dock dialog by dragging a tab out of the dock dialog it was inside of. - -If you ever accidently close a dock tabs (by dragging it out of the dock -dialog, and closing the new dock dialog that gets created), no worries. Simply -goto the toolbox and goto "File->Dialogs", and then click on the name of the -dialog you need. - -There are a lot of dock tabs. If you have no idea what a dock tab does, -simply hold your mouse over its icon and a tooltip will pop up describing the -name of the tab. - -Here are some of the more important ones: - - - Layers Dialog () - This tab shows you the layer - hierarchy for the currently selected canvas. It also allows you to manipulate - these layers. - - - Params Dialog ()- This tab will show you the - parameters of the currently selected layer, (OR, if multiple layers are - selected, it shows you only the parameters that the selected layers have - in common) - - - Tool Options Dialog () - Shows you any - options specific to the currently selected tool - - - Navigator () - Shows you a thumbnail of what the currently selected Canvas - looks like. You can also zoom in and move the focus around with this tab. - - - History Dialog (- Shows you the history stack for the current composition. - You can also edit the actions in history. - - - -If you click the "new composition" button in the toolbox, a new composition -will be opened and the canvas properties dialog will appear. - -The canvas properties dialog is a mess, I know. I'll have it re-designed into -something much more comprehendible in the next few days. For now, ignore the -"Image Area" and "Locks and Links" sections. - -If you click OK, the canvas properties dialog will disappear and you will see -the Canvas window. This window represents the Root Canvas, not that that means much -to you at the moment, but that's OK--I'm just trying to show you around. - -In the upper left corner of the Canvas Window, you'll see a button with a -caret If you click on this button, the canvas window menu will pop up. (As an aside, -if you right click in the canvas area and there is not a layer under the mouse -position, this menu will also appear) So now you know where the menu is in the Canvas -Window. Good. Everything else should be pretty self-explanatory in the Canvas Window. -(Explanations on the menu stuff is to come in a sec) -&toolbox.sgml; -&layers.sgml; -¶ms.sgml; -&tooloptions.sgml; -&navigator.sgml; -&history.sgml; - diff --git a/synfig-docs/trunk/ca/interface/layers.sgml b/synfig-docs/trunk/ca/interface/layers.sgml deleted file mode 100644 index 1c3f9bf..0000000 --- a/synfig-docs/trunk/ca/interface/layers.sgml +++ /dev/null @@ -1,8 +0,0 @@ - - - -Layers Dialog - -TODO - - diff --git a/synfig-docs/trunk/ca/interface/navigator.sgml b/synfig-docs/trunk/ca/interface/navigator.sgml deleted file mode 100644 index 350955c..0000000 --- a/synfig-docs/trunk/ca/interface/navigator.sgml +++ /dev/null @@ -1,8 +0,0 @@ - - - -Navigator - -TODO - - diff --git a/synfig-docs/trunk/ca/interface/params.sgml b/synfig-docs/trunk/ca/interface/params.sgml deleted file mode 100644 index a62ae96..0000000 --- a/synfig-docs/trunk/ca/interface/params.sgml +++ /dev/null @@ -1,8 +0,0 @@ - - - -Params Dialog - -TODO - - diff --git a/synfig-docs/trunk/ca/interface/toolbox.eps b/synfig-docs/trunk/ca/interface/toolbox.eps deleted file mode 100644 index e1240d0..0000000 --- a/synfig-docs/trunk/ca/interface/toolbox.eps +++ /dev/null @@ -1,806 +0,0 @@ -%!PS-Adobe-3.0 EPSF-3.0 -%%Pages: 1 -%%BoundingBox: 0 0 138 432 -%%DocumentData: Clean7Bit -%%LanguageLevel: 2 -%%EndComments -%%Page: 1 1 -save 9 dict begin -{/T currentfile/ASCII85Decode filter def/DeviceRGB setcolorspace -/F T/LZWDecode filter def -<> image - F closefile T closefile} -%%BeginData:; -exec -J,g]g3$]1l+:uBJ0Si[d)%VG>@F6KV:+[3>73bZSgh&PgO%:Z%6AeR/R(2Z -""7*pggFRFKF=B;\/\'6mLs` -f=6WmPbN=f'.ChhJUrG`U<\Q^gAcsr#Q(LLVmS?\@b9e'og:EnlY7U7k9eHAoej&'cn**[a-a4I3t" -LSC?_F)SK1\;m4bg2;9(#jI09,DDqB_k3m`0i,\W&O__V9+f+i9MlPCnSD2A7?Mt/(rh\kD&L@`XDo9$;=&?G_MuXf8Je -ZPM]t^?9T^XBnnaR=8W\#t"[\;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J((s7@E?`0(`:"G+Bt&9q.m)$u&7iR&Kq:*14-7A>ohe7Jp9 -BsXH#\%CJR-$?cSnp*p':>TWgLEhAo`,bmI9'6hde"0,!OM0iL)&3L06_dLm'M;@HQV"&Ql.$\h:8( -XdP^2WX=`'GIV@tDSg&GlR[@(gb`Tm&A^L(prbSC-_J\kjbfUOQI& -WF\=EZ"_?4"6<7jRUuo`c!N$c"FANr>(/[Mn;Vno1PV1GGhocFrL=F]4nP(m.T2)`p[iZh/BclrYGf -r^uKD/r*DlHQ-JCE/fL^Se"=kLo=EbLa)A0;m1,_I;^E\rt*8THq_,tZNqT.*AfUh5.-~> -%%EndData -end restore showpage -%%Trailer -%%EOF diff --git a/synfig-docs/trunk/ca/interface/toolbox.sgml b/synfig-docs/trunk/ca/interface/toolbox.sgml deleted file mode 100644 index c2ae500..0000000 --- a/synfig-docs/trunk/ca/interface/toolbox.sgml +++ /dev/null @@ -1,48 +0,0 @@ - - - - -The toolbox - -apsldkfjañsdlfads ñlaskdfjñald skfañdkl fjañsdklfj añdslvf kjadsñfkjadñfjkaflñjak añ kfjañ fñakjd fañ -a dfñladjf añdlkfj añlkf añldkf adlkf ajdñlf adñflkj dsñalj kfañldkf asjdñfkl asdñf akj -añ kfd ñaj kasñj kds ñjk sñljks añljskañ kñasjksdañ jk dfñljk - -

      - Toolbox - - - - - - - -
      - -asdf a dsf dsfa sdf adf adfadf ad f adsfasd fa sdf asd f asdf asdf asf adsf asdf asd fa - adsf asdf asd f asdf a dfa sdf as fasdf asdf adf ad faf f asdf af asd fa sf asdf adf adf - a dsf a dfa sdf ad fa df asdf asdf asd f af - - - - - - - -New -Open -Save -Save As - - -Save All -Undo -Redo -About Synfig Studio - - - -
      - -
      - diff --git a/synfig-docs/trunk/ca/interface/tooloptions.sgml b/synfig-docs/trunk/ca/interface/tooloptions.sgml deleted file mode 100644 index aa89313..0000000 --- a/synfig-docs/trunk/ca/interface/tooloptions.sgml +++ /dev/null @@ -1,8 +0,0 @@ - - - -Tool Options Dialog - -TODO - - diff --git a/synfig-docs/trunk/ca/introduction/introduction.sgml b/synfig-docs/trunk/ca/introduction/introduction.sgml deleted file mode 100644 index 2db1360..0000000 --- a/synfig-docs/trunk/ca/introduction/introduction.sgml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - <acronym>Introduction</acronym> - Synfig, like most every other competent graphics program, breaks down - individual elements of a Canvas into Layers. However, it differs from other - programs in two major ways: - - - An individual layer in Synfig usually represents a single "Primitive". - ie: A single region, an outline of a region, an imported JPEG, etc... This - allows you to have a great deal of flexibility and control. It is not - uncommon for a composition to have hundreds of layers(organized into a - hierarchy for artist sanity of course). - - - A layer can not only composite information on top of the image below it, - but also distort and/or modify it in some other way. In this sense, Synfig - Layers act much like filters do in Adobe Photoshop or the GIMP. For example, - we have a Blur Layer, Radial Blur Layer, Spherical Distortion Layer, - color-correct layer, bevel layer, etc... - - - - Each layer has a set of parameters which determine how it behaves. When - you click on a layer (either in the canvas window, or in the Layer Dialog), - you will see its parameters in the Params Dialog. - - Synfig Studio has an autorecover feature. If it crashes, even if the - current file has not been saved, it will not lose more than 5 minutes of work. - At restart it will automatically prompt the user to recover the unsaved changes. - Unfortunately history isn't recovered yet. That feature comes later. - - One thing you may notice is that Synfig Studio is SLOW, making it - practically unusable on hardware that is over 3 years old. The biggest reason - for this is that all of the color calculations are done in floating point - because Synfig Studio was built from the ground up with High-Dynamic-Range - Imaging in mind. HOWEVER, this will not be the case forever. - - darco has some fairly major re-implementations and optimizations that - he plans to implement that should quite dramatically improve the performance - of Synfig on all platforms. The goal is not a 200% speed increase, it is at - least a 2000% speed increase. With the optimizations that are planned to be - implemented, we will be able to pipeline operations in such a way that this - performance improvement can be realized. It should also pave the way to hardware - acceleration using todays powerful graphics processors, which should yield - further performance improvements measurable in orders of magnitude. - - - - diff --git a/synfig-docs/trunk/ca/steps/done b/synfig-docs/trunk/ca/steps/done deleted file mode 100644 index e69de29..0000000 diff --git a/synfig-docs/trunk/ca/steps/firststeps.sgml b/synfig-docs/trunk/ca/steps/firststeps.sgml deleted file mode 100644 index 6f53169..0000000 --- a/synfig-docs/trunk/ca/steps/firststeps.sgml +++ /dev/null @@ -1,69 +0,0 @@ - - - -First Steps - Lets create something -so that we can tweak with it. Now that you have a new composition open -and the properties dialog is out of the way, go over to the toolbox and -click on the circle tool(If you don't know which one it is, just mouse -over them until you find the one with the tooltip that says "circle"). - -The second you click on the circle tool, you should notice that the tool -options tab changed. But we'll get to that later. - - Some laptop users might experience trouble where click-drag on - the canvas when using the circle tool doesn't seem to do anything - or produce insanely huge circles. The problem is that Synfig has - detected the touchpad and enabled that device (incorrectly!) To fix - this: click File->Input devices... In the resulting dialog window, - select 'Disabled' for your touchpad device. After this change, - your external mouse and the touchpad will work as expected. - - With the circle tool selected, you can now create circles in the - canvas window. This pretty much works exactly as you might expect - it to. Go ahead and create two (or more, if you fancy) circles. If - by accident you just clicked on the canvas instead of clicking and - dragging(with mouse button pressed) to draw the circle, you end up - creating a circle with 0 radius and it is effectively invisible! No - need to worry, you can easily fix this. In the Params dialog, you - can change the parameters of the selected object. If you just made - a 0 radius circle, it should be the current selected object. you can - change its radius to some value other than 0, say 10, and manipulate - it to your liking with the canvas ducks later. - - Now go back to the toolbox and click on the normal tool (the blue - circle with the arrow on it). After you do this, click on one of your - circles. You will then see a bounding box(which is kinda useless - at this point in time, but I digress), a green dot at the center, - and a cyan dot on the radius. Those dots are called ducks. If you - want to modify the circle, grab a duck and drag it around. Easy! - - So you can select a layer by clicking on it. If you want to select - more than one layer, hold down CONTROL while you are clicking--this - works in both the canvas window and the layer tab. Try it! - - You can also select multiple ducks. You can do this in several - ways. First, you can hold down CONTROL and individually click the - ducks that you want selected, but this can be tedious. However, there - is a much faster method--just create a selection box by clicking the - mouse and dragging it over the area of ducks that you want selected. - - Go ahead and select two circles, and select all of their ducks. With - several ducks selected, moving one duck will move all of the - ducks. This behavior is dependent on the normal tool. Thus, a - more descriptive name for this tool might have been the "move" or - "translate" tool. - - The Rotate and Scale tools work much like the Normal tool, except in - the case where you have multiple ducks selected. It is much easier - to just try it than read about it. Select a few circles, select all - of their ducks, and try using the rotate and scale tools. - - Note that, unlike the normal tool, the other duck manipulation tools - DO have options associated with them. If a particular tool isn't - doing what you want, take a look in the tool options tab to see if - it is set up like you want it. -&linking.sgml; -&steplayers.sgml; -&shapes.sgml; - diff --git a/synfig-docs/trunk/ca/steps/layers/combining.sgml b/synfig-docs/trunk/ca/steps/layers/combining.sgml deleted file mode 100644 index ce7b421..0000000 --- a/synfig-docs/trunk/ca/steps/layers/combining.sgml +++ /dev/null @@ -1,32 +0,0 @@ - - - -Combining -Now there are two ways to proceed. In the first way, pick the gradient -tool from the Synfig Toolbox, and click into the canvas once. You should note -that another layer was added in the Layers Dialog called 'Gradient'. This is -nothing special. If you see no gradient but just a plain color, pick the normal -tool, click into the canvas to acivate the gradient's ducks. You need to grab -the one you see and move it a bit until a gradient appears. - -You now have a gradient but it is not what you wanted: It spreads the -whole canvas and the goal was to have a gradient on the rectangle. Let's fix -this now. - -Select the gradient and the rectangle layer in the Layers Dialog. They -should appear with a blue background now. Then, context-click (ie. right-click -on Windows and Linux) and select 'Encapsulate' from the menu. The view of your -layer tab should change now, showing a small box called 'Inline Canvas' with an -arrow in front. If you click the arrow, it will unfold and show your previous -two layers; the gradient and the rectangle. - -You can treat this layer like any other layer -- move it around, -duplicate it, copy and paste it. You'll notice an arrow next to the icon of the -box. By clicking on this arrow, you can expand the inline canvas to see its -contents. - -If you want to change the name of it to something more descriptive, just -select the layer in the layer tab and click on its label. Then you just edit it -in place. You can do this for ANY layer, and are strongly encouraged to do so. - - diff --git a/synfig-docs/trunk/ca/steps/layers/done b/synfig-docs/trunk/ca/steps/layers/done deleted file mode 100644 index e69de29..0000000 diff --git a/synfig-docs/trunk/ca/steps/layers/layers.sgml b/synfig-docs/trunk/ca/steps/layers/layers.sgml deleted file mode 100644 index f574dba..0000000 --- a/synfig-docs/trunk/ca/steps/layers/layers.sgml +++ /dev/null @@ -1,37 +0,0 @@ - - - -Layers - In the previous tutorial, you made a -first simple animation by changing the attributes of primitive objects -such as its position, color, and size. These simple types, however, are -seldomly sufficient to create advanced characters and objects. To do so, -Synfig uses Layers. They are similar to layers known from other drawing -application such as the GIMP, for instance. - -However, Synfig is different to simple layers in at least two -respects: - - - You can organize layers into hierachical groups. - - - You can use upper layers to change the behaviour (or look) - or underlying layers. - - - -Doing so is quite easy. Let's look at a simple example. - - - - Create a new file with 0 duration. There's no need to bother - with a timeline at this point. - - - Create a simple rectangle. - - -&using.sgml; -&combining.sgml; - diff --git a/synfig-docs/trunk/ca/steps/layers/using.sgml b/synfig-docs/trunk/ca/steps/layers/using.sgml deleted file mode 100644 index 4eef8ca..0000000 --- a/synfig-docs/trunk/ca/steps/layers/using.sgml +++ /dev/null @@ -1,57 +0,0 @@ - - - -Using - However, there is still a problem: The gradient still covers the whole -canvas althought we wanted it to be restricted on the rectangle. To do so, -activate the gradient layer in the Layer tab. Now go to the Params Dialog (by -default a tab in the Params-Children-Keyframes window), and search the attribute -called 'Blend Method'. Double-click the entry and select 'Onto' from the -appearing drop-down menu. - -The gradient should now be restricted to the rectangle. Congratulations! -You just made your first interacting layers with Synfig. - -If only for the additional organization, encapsulating layers into inline -canvases dramatically improves the ease of use of Synfig Studio. But -lots of programs can do this. The concept of scope as just demonstrated -sets Synfig apart from other programs with layer hierarchies. - -The following remarks seem to be outdated already! A blur -defaults to 'Straight' here (using SVN 110). --Claus 06:45, 11 Jan 2006 (PST) - - - It defaulted to composite for me, as described (using - SVN 147) Matumio 07:56, 12 Mar 2006 (PST) - - However, a layer can only modify the data that it gets from directly - below it. In other words, if you were to throw a Blur Layer at - the top of the objects inside the inline canvas we just created, - it would just blur them -- anything under it would not be blurred! - - Lets try it. Add a few circles under the inline canvas we just - created. Expand the inline canvas to show its contents, and select - the top layer inside of it (should be the "Outline" layer). This - is where we want to insert the blur. Right click on the selected - layer and a popup menu will appear. The first item in that popup - is "New Layer". Inside of the "New Layer" menu, you'll see several - categories of layers you could create, but what we want is a blur, - so goto the Blur category and select the "Blur" layer. (so that - would be "New Layer->Blurs->Blur") - - Well, it blurred... but something is not quite right--the inside edge - of the outline is now all soft, but it still kinda looks like there is - a hard edge on the outside. It is doing this because the blend method - of the blur defaulted to "Composite" (you can change the default - blend method for new layers from the New Layer Defaults section of - the Toolbox). What we want is a blend method of "Straight". Just - select the blur layer, and change the Blend Method to "Straight" - in the Params Dialog. - - (NOTE: I will probably change the way that default blend methods are - handled in the future--as the way it is currently handled seems to - only create hassles like this) - - Ok, now we have all of the contents of the inline canvas blurred, - but everything under it is sharp! - diff --git a/synfig-docs/trunk/ca/steps/linking.sgml b/synfig-docs/trunk/ca/steps/linking.sgml deleted file mode 100644 index bc17b4d..0000000 --- a/synfig-docs/trunk/ca/steps/linking.sgml +++ /dev/null @@ -1,53 +0,0 @@ - - - -Linking -Now lets try linking. Lets say we always -want these two circles to be the same size. Select two circles, and then -select both of their Radius ducks(the cyan dot). Then right click on -either duck and a menu will pop up. Click on "Link". Boom. The parameters -are linked together. You can prove it to yourself by selecting just one -of the circles and changing its radius--the other one will change as -well. Neat stuff, eh? - -Linking is a fundamental concept in Synfig. You can create links not only -between ducks, but also between parameters as well by selecting multiple -layers, right clicking on the parameter in the param tab, and selecting -"Link". - -DIGRESSION: This is how outlines are attached to their regions-but -I'm getting ahead of myself. At the moment, the fundamental power and -flexibility of linking in Synfig Core is beyond what Synfig Studio -currently allows for. This will change in the future. Anyway, back -on track... - -Lets say you want one of the circles to be a different color. If you look -in the toolbox below the tools, you'll see the foreground/background -color selector, the outline width selector, and some other stuff like -the default blend method and gradient. The foreground/background color -widget works exactly as you might expect--you can click on the foreground -color, and a modest color chooser will appear. Now to can change the -color pretty easily. - -But sometimes you just want to click on a color and go. This is where -the palette editor tab comes in. It's functionality isn't quite 100% yet -(ie: saving and loading custom palettes hasn't been implemented yet), -but the default palette is pretty decent. Click on the Palette editor tab -and have a look--it's the one with the palette-ish looking icon. Clicking -on colors in here will immediately change the default foreground color. - -That's all great, but we still haven't changed the color of the -circle. There are two ways to do this. The first way is that you select -the circle layer you want to modify, goto the params tab and double click -on the color parameter--a color selector dialog shows up and you just -tweak away. But lets say you already got the color you wanted selected as -the default foreground color. Easy. Just click on the "Fill tool" from the -toolbox, and then click on the circle in the canvas window. Boom. Circle -changes color. This works with more than just circles, but we'll get to -that in a sec. - -Try playing around with the circles for a bit. Muck around with the -parameters, and see what happens. To get you started, play around with -feather a bit. - - diff --git a/synfig-docs/trunk/ca/steps/shapes.sgml b/synfig-docs/trunk/ca/steps/shapes.sgml deleted file mode 100644 index 23a46bb..0000000 --- a/synfig-docs/trunk/ca/steps/shapes.sgml +++ /dev/null @@ -1,82 +0,0 @@ - - - - Shapes - Basic primitives such as circles or -rectangles are all great, but they are pretty much geometrically -inflexible. What about shapes? To do this, we use the bline tool. - In Synfig, the construct for describing shapes is called a Bline. This -is roughly analogous to a "path" in other programs, except that it is -strictly a hermite spline. - When you click on the bline tool, you will see that the ducks from -your currently selected layer (if there was one) will disappear, but -the layer(s) will still remain selected in the Layers Dialog. This is -normal. Anything you create in the bline tool will be inserted above the -currently selected layer. Keep in mind that if you want to insert a shape -somewhere, you should select where you want to insert it before you go -into the Bline tool-changing the selection afterward will automaticly -swap you back to the normal tool. - If you take a look at the tool options dialog, you'll notice that the -first things you see are three checkboxes. Make sure that only "Fill" -AND "Outline" are checked. - First, go ahead and click on the "R" button in the lower left corner of -the FG/BG color widget in the toolbox. This will reset us back to black -and white. Also, go ahead and set the default line width (right next to -the FG/BG widget) to something nice and thick -- 10pt should do the -trick. - Clicking with your mouse in the canvas will place vertices. While you are -placing a vertex, you can drag out its tangent by dragging the mouse. Do -this over and over, and you construct a Bline. - Keep in mind, however, that during this construction, there is nothing -stopping you from just moving it if you don't like where you placed -a vertex or a tangent. Honest! If you want to remove a vertex, right -click on it and delete it. Want to split the tangents? Right click on -the tangent and hit "split tangents". Want to loop the bline? right -click on the first vertex and select "loop". - So I assume you got your first Bline laid out like you want it. That's -great. But we are still in construction mode -- the layers haven't been -created yet. There are two ways to create the layers: - - - just switch to another tool, or - - - press the "create" button at the bottom of the tool options tab - (it's the icon that looks like a gear). - - - For now, just go ahead and click on the normal tool because we - are done with the bline tool. - // Insert Figure about here - Ok, we now have a nice pretty white region with a thick black - outline. Notice that there are two layers that we have created--the - Outline and the Region. Despite the fact that they are two separate - layers, their vertices parameter has already been linked--so you - can select either one and move its ducks around and the other one - will also change. - If you want to manipulate the vertices after you have created - the layers, it is very easy to do so. Just click on one of the - layers and have at it. If you want to remove a vertex, right - click on it and hit "Remove Item (smart)". Want to insert a point - somewhere? Right click on the segment where you want to insert - something and his "Insert item (smart)". - NOTE: The only major difference between this normal editing mode - and the construction mode is in how you split the tangents--in - construction mode you right click on the tangent itself. In normal - duck editing mode, you must right click on the vertex that the - tangents are attached to. This could be considered a usability bug, - and it will be resolved at some point. - This may appear to be leading to a mess of layers. And yes, if - you aren't using the software properly, that is exactly what you - will get. But there is a way to make this more sane: Just study - the previous tutorial - One quick thing to mention before I finish up. You can change the - width of an outline at each vertex. You do this by selecting the - outline layer (NOTE: you must select the Outline Layer, the Region - Layer has no width data) and tweaking with the width ducks. By - default, these are masked. To show them, press Alt-5. Repeat to - hide them again. You can also see other things to mask via the - Canvas Menu Caret > View Menu > Mask Ducks Menu. - That should give you enough of a grasp of the software to be able - to figure out more stuff on your own. - diff --git a/synfig-docs/trunk/ca/synfig-studio.sgml b/synfig-docs/trunk/ca/synfig-studio.sgml deleted file mode 100644 index e7103df..0000000 --- a/synfig-docs/trunk/ca/synfig-studio.sgml +++ /dev/null @@ -1,64 +0,0 @@ - - - - %commondata; --> - - - - - - - - - - - - - - - - - - - - - - -]> - - - 28 Aug 2006 - <acronym>Synfig Studio</acronym> - - Getting Started - Intial Release - - - Miguel - Gea Milvaques - - - et Alt. - - -
      synfig@miguelgea.com
      - - Released with GFDL license - - - - 0.1 - 2006-8-28 - mgm - Document start - - -
      -&introduction.sgml; -&interface.sgml; -&firststeps.sgml; -&apendices.sgml; -&index.sgml; -
      - diff --git a/synfig-docs/trunk/ca/tips/bitmap.sgml b/synfig-docs/trunk/ca/tips/bitmap.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/ca/tips/bitmap.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/ca/tips/closebline.sgml b/synfig-docs/trunk/ca/tips/closebline.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/ca/tips/closebline.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/ca/tips/dock.sgml b/synfig-docs/trunk/ca/tips/dock.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/ca/tips/dock.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/ca/tips/filloutline.sgml b/synfig-docs/trunk/ca/tips/filloutline.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/ca/tips/filloutline.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/ca/tips/gradient_object.sgml b/synfig-docs/trunk/ca/tips/gradient_object.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/ca/tips/gradient_object.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/ca/tips/layer.sgml b/synfig-docs/trunk/ca/tips/layer.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/ca/tips/layer.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/en/animation/conclusion.sgml b/synfig-docs/trunk/en/animation/conclusion.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/en/animation/conclusion.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/en/animation/introduction.sgml b/synfig-docs/trunk/en/animation/introduction.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/en/animation/introduction.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/en/animation/keyframe.sgml b/synfig-docs/trunk/en/animation/keyframe.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/en/animation/keyframe.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/en/animation/movement.sgml b/synfig-docs/trunk/en/animation/movement.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/en/animation/movement.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/en/animation/rendering.sgml b/synfig-docs/trunk/en/animation/rendering.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/en/animation/rendering.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/en/animation/timeline.sgml b/synfig-docs/trunk/en/animation/timeline.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/en/animation/timeline.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/en/animation/workspace.sgml b/synfig-docs/trunk/en/animation/workspace.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/en/animation/workspace.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/en/appendix/apendices.sgml b/synfig-docs/trunk/en/appendix/apendices.sgml deleted file mode 100644 index 4a80e12..0000000 --- a/synfig-docs/trunk/en/appendix/apendices.sgml +++ /dev/null @@ -1,46 +0,0 @@ - - El archivo <filename>hola.txt</filename> - Por motivos de referencia incluímos el contenido del - archivo hola.txt - - - -Hola Mundo - - - - - - Preguntas Frecuentes - - - - ¿Qué es DocBook? - - - Es un lenguaje de marcado útil para escribir - documentación técnica. - - - - - - - DocBook - - Lenguaje de marcado definido en - SGMLque permite escribir documentación - técnica - - - - emacs - - Editor de amplio uso en unix. Su - nombre proviene de Editor MACroS (Macros de Edición). - - - - - - \ No newline at end of file diff --git a/synfig-docs/trunk/en/appendix/glossary.sgml b/synfig-docs/trunk/en/appendix/glossary.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/en/appendix/glossary.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/en/appendix/keyboard.sgml b/synfig-docs/trunk/en/appendix/keyboard.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/en/appendix/keyboard.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/en/installation/installation.sgml b/synfig-docs/trunk/en/installation/installation.sgml deleted file mode 100644 index 07f85f3..0000000 --- a/synfig-docs/trunk/en/installation/installation.sgml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/synfig-docs/trunk/en/interface/history.sgml b/synfig-docs/trunk/en/interface/history.sgml deleted file mode 100644 index c771488..0000000 --- a/synfig-docs/trunk/en/interface/history.sgml +++ /dev/null @@ -1,8 +0,0 @@ - - - -History Dialog - -TODO - - diff --git a/synfig-docs/trunk/en/interface/interface.sgml b/synfig-docs/trunk/en/interface/interface.sgml deleted file mode 100644 index dc661c7..0000000 --- a/synfig-docs/trunk/en/interface/interface.sgml +++ /dev/null @@ -1,76 +0,0 @@ - - - - -The user Interface -When you start Synfig Studio, it will display a splash graphic and boot -itself up. After it finishes loading, you should see three windows. The window -in the upper left is the toolbox. This is where you can open files, change tools, -etc. You'll notice that most of the buttons are greyed out--because there is no -file open yet. - -The other two windows (one on the bottom, and one to the right) are -customizable dock dialogs. You can rearrange the contents of these however -you wish by simply dragging the tab to where you want it. You can even create a -new dock dialog by dragging a tab out of the dock dialog it was inside of. - -If you ever accidently close a dock tabs (by dragging it out of the dock -dialog, and closing the new dock dialog that gets created), no worries. Simply -goto the toolbox and goto "File->Dialogs", and then click on the name of the -dialog you need. - -There are a lot of dock tabs. If you have no idea what a dock tab does, -simply hold your mouse over its icon and a tooltip will pop up describing the -name of the tab. - -Here are some of the more important ones: - - - Layers Dialog () - This tab shows you the layer - hierarchy for the currently selected canvas. It also allows you to manipulate - these layers. - - - Params Dialog ()- This tab will show you the - parameters of the currently selected layer, (OR, if multiple layers are - selected, it shows you only the parameters that the selected layers have - in common) - - - Tool Options Dialog () - Shows you any - options specific to the currently selected tool - - - Navigator () - Shows you a thumbnail of what the currently selected Canvas - looks like. You can also zoom in and move the focus around with this tab. - - - History Dialog (- Shows you the history stack for the current composition. - You can also edit the actions in history. - - - -If you click the "new composition" button in the toolbox, a new composition -will be opened and the canvas properties dialog will appear. - -The canvas properties dialog is a mess, I know. I'll have it re-designed into -something much more comprehendible in the next few days. For now, ignore the -"Image Area" and "Locks and Links" sections. - -If you click OK, the canvas properties dialog will disappear and you will see -the Canvas window. This window represents the Root Canvas, not that that means much -to you at the moment, but that's OK--I'm just trying to show you around. - -In the upper left corner of the Canvas Window, you'll see a button with a -caret If you click on this button, the canvas window menu will pop up. (As an aside, -if you right click in the canvas area and there is not a layer under the mouse -position, this menu will also appear) So now you know where the menu is in the Canvas -Window. Good. Everything else should be pretty self-explanatory in the Canvas Window. -(Explanations on the menu stuff is to come in a sec) -&toolbox.sgml; -&layers.sgml; -¶ms.sgml; -&tooloptions.sgml; -&navigator.sgml; -&history.sgml; - diff --git a/synfig-docs/trunk/en/interface/layers.sgml b/synfig-docs/trunk/en/interface/layers.sgml deleted file mode 100644 index 1c3f9bf..0000000 --- a/synfig-docs/trunk/en/interface/layers.sgml +++ /dev/null @@ -1,8 +0,0 @@ - - - -Layers Dialog - -TODO - - diff --git a/synfig-docs/trunk/en/interface/navigator.sgml b/synfig-docs/trunk/en/interface/navigator.sgml deleted file mode 100644 index 350955c..0000000 --- a/synfig-docs/trunk/en/interface/navigator.sgml +++ /dev/null @@ -1,8 +0,0 @@ - - - -Navigator - -TODO - - diff --git a/synfig-docs/trunk/en/interface/params.sgml b/synfig-docs/trunk/en/interface/params.sgml deleted file mode 100644 index a62ae96..0000000 --- a/synfig-docs/trunk/en/interface/params.sgml +++ /dev/null @@ -1,8 +0,0 @@ - - - -Params Dialog - -TODO - - diff --git a/synfig-docs/trunk/en/interface/toolbox.eps b/synfig-docs/trunk/en/interface/toolbox.eps deleted file mode 100644 index e1240d0..0000000 --- a/synfig-docs/trunk/en/interface/toolbox.eps +++ /dev/null @@ -1,806 +0,0 @@ -%!PS-Adobe-3.0 EPSF-3.0 -%%Pages: 1 -%%BoundingBox: 0 0 138 432 -%%DocumentData: Clean7Bit -%%LanguageLevel: 2 -%%EndComments -%%Page: 1 1 -save 9 dict begin -{/T currentfile/ASCII85Decode filter def/DeviceRGB setcolorspace -/F T/LZWDecode filter def -<> image - F closefile T closefile} -%%BeginData:; -exec -J,g]g3$]1l+:uBJ0Si[d)%VG>@F6KV:+[3>73bZSgh&PgO%:Z%6AeR/R(2Z -""7*pggFRFKF=B;\/\'6mLs` -f=6WmPbN=f'.ChhJUrG`U<\Q^gAcsr#Q(LLVmS?\@b9e'og:EnlY7U7k9eHAoej&'cn**[a-a4I3t" -LSC?_F)SK1\;m4bg2;9(#jI09,DDqB_k3m`0i,\W&O__V9+f+i9MlPCnSD2A7?Mt/(rh\kD&L@`XDo9$;=&?G_MuXf8Je -ZPM]t^?9T^XBnnaR=8W\#t"[\;#FIik.1`J#>1>KPqbS'!D.1eor;CIQ9ThJrj7PI^eNFGho0['&%l -Tr.LM;!Lr76g8r(QaP45&;VOWUcamLX_1j@G&_B\JcCX_Cs,Tj -24NkF(afg_UE0E84KrZ#a1d^!h&Y=)HW7h0,pBE*\^%HJ(,tNCu.^u'C,,j+GA/IcHOl4E.>%8K63UV=NLV:E?*9Vc#p][k;T^RUTqEU"+\mt&WMEMcq_3CK -*$l&!+K>*l8"Wt5h!C*?i\naJc[@@$^7'/[SiO5g!=VtA.]XmLOmOCTGOICN#7?p`9o[Q."m-02=\%S3F@!nTP3Wa7;?[a3*uNc4/-@>k_IRpR.Vl#!&MuMkf&k09>09r`=p\D%4#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diff --git a/synfig-docs/trunk/en/interface/toolbox.sgml b/synfig-docs/trunk/en/interface/toolbox.sgml deleted file mode 100644 index c2ae500..0000000 --- a/synfig-docs/trunk/en/interface/toolbox.sgml +++ /dev/null @@ -1,48 +0,0 @@ - - - - -The toolbox - -apsldkfjañsdlfads ñlaskdfjñald skfañdkl fjañsdklfj añdslvf kjadsñfkjadñfjkaflñjak añ kfjañ fñakjd fañ -a dfñladjf añdlkfj añlkf añldkf adlkf ajdñlf adñflkj dsñalj kfañldkf asjdñfkl asdñf akj -añ kfd ñaj kasñj kds ñjk sñljks añljskañ kñasjksdañ jk dfñljk - -

      - Toolbox - - - - - - - -
      - -asdf a dsf dsfa sdf adf adfadf ad f adsfasd fa sdf asd f asdf asdf asf adsf asdf asd fa - adsf asdf asd f asdf a dfa sdf as fasdf asdf adf ad faf f asdf af asd fa sf asdf adf adf - a dsf a dfa sdf ad fa df asdf asdf asd f af - - - - - - - -New -Open -Save -Save As - - -Save All -Undo -Redo -About Synfig Studio - - - -
      - -
      - diff --git a/synfig-docs/trunk/en/interface/tooloptions.sgml b/synfig-docs/trunk/en/interface/tooloptions.sgml deleted file mode 100644 index aa89313..0000000 --- a/synfig-docs/trunk/en/interface/tooloptions.sgml +++ /dev/null @@ -1,8 +0,0 @@ - - - -Tool Options Dialog - -TODO - - diff --git a/synfig-docs/trunk/en/introduction/introduction.sgml b/synfig-docs/trunk/en/introduction/introduction.sgml deleted file mode 100644 index 2db1360..0000000 --- a/synfig-docs/trunk/en/introduction/introduction.sgml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - <acronym>Introduction</acronym> - Synfig, like most every other competent graphics program, breaks down - individual elements of a Canvas into Layers. However, it differs from other - programs in two major ways: - - - An individual layer in Synfig usually represents a single "Primitive". - ie: A single region, an outline of a region, an imported JPEG, etc... This - allows you to have a great deal of flexibility and control. It is not - uncommon for a composition to have hundreds of layers(organized into a - hierarchy for artist sanity of course). - - - A layer can not only composite information on top of the image below it, - but also distort and/or modify it in some other way. In this sense, Synfig - Layers act much like filters do in Adobe Photoshop or the GIMP. For example, - we have a Blur Layer, Radial Blur Layer, Spherical Distortion Layer, - color-correct layer, bevel layer, etc... - - - - Each layer has a set of parameters which determine how it behaves. When - you click on a layer (either in the canvas window, or in the Layer Dialog), - you will see its parameters in the Params Dialog. - - Synfig Studio has an autorecover feature. If it crashes, even if the - current file has not been saved, it will not lose more than 5 minutes of work. - At restart it will automatically prompt the user to recover the unsaved changes. - Unfortunately history isn't recovered yet. That feature comes later. - - One thing you may notice is that Synfig Studio is SLOW, making it - practically unusable on hardware that is over 3 years old. The biggest reason - for this is that all of the color calculations are done in floating point - because Synfig Studio was built from the ground up with High-Dynamic-Range - Imaging in mind. HOWEVER, this will not be the case forever. - - darco has some fairly major re-implementations and optimizations that - he plans to implement that should quite dramatically improve the performance - of Synfig on all platforms. The goal is not a 200% speed increase, it is at - least a 2000% speed increase. With the optimizations that are planned to be - implemented, we will be able to pipeline operations in such a way that this - performance improvement can be realized. It should also pave the way to hardware - acceleration using todays powerful graphics processors, which should yield - further performance improvements measurable in orders of magnitude. - - - - diff --git a/synfig-docs/trunk/en/steps/done b/synfig-docs/trunk/en/steps/done deleted file mode 100644 index e69de29..0000000 diff --git a/synfig-docs/trunk/en/steps/firststeps.sgml b/synfig-docs/trunk/en/steps/firststeps.sgml deleted file mode 100644 index 6f53169..0000000 --- a/synfig-docs/trunk/en/steps/firststeps.sgml +++ /dev/null @@ -1,69 +0,0 @@ - - - -First Steps - Lets create something -so that we can tweak with it. Now that you have a new composition open -and the properties dialog is out of the way, go over to the toolbox and -click on the circle tool(If you don't know which one it is, just mouse -over them until you find the one with the tooltip that says "circle"). - -The second you click on the circle tool, you should notice that the tool -options tab changed. But we'll get to that later. - - Some laptop users might experience trouble where click-drag on - the canvas when using the circle tool doesn't seem to do anything - or produce insanely huge circles. The problem is that Synfig has - detected the touchpad and enabled that device (incorrectly!) To fix - this: click File->Input devices... In the resulting dialog window, - select 'Disabled' for your touchpad device. After this change, - your external mouse and the touchpad will work as expected. - - With the circle tool selected, you can now create circles in the - canvas window. This pretty much works exactly as you might expect - it to. Go ahead and create two (or more, if you fancy) circles. If - by accident you just clicked on the canvas instead of clicking and - dragging(with mouse button pressed) to draw the circle, you end up - creating a circle with 0 radius and it is effectively invisible! No - need to worry, you can easily fix this. In the Params dialog, you - can change the parameters of the selected object. If you just made - a 0 radius circle, it should be the current selected object. you can - change its radius to some value other than 0, say 10, and manipulate - it to your liking with the canvas ducks later. - - Now go back to the toolbox and click on the normal tool (the blue - circle with the arrow on it). After you do this, click on one of your - circles. You will then see a bounding box(which is kinda useless - at this point in time, but I digress), a green dot at the center, - and a cyan dot on the radius. Those dots are called ducks. If you - want to modify the circle, grab a duck and drag it around. Easy! - - So you can select a layer by clicking on it. If you want to select - more than one layer, hold down CONTROL while you are clicking--this - works in both the canvas window and the layer tab. Try it! - - You can also select multiple ducks. You can do this in several - ways. First, you can hold down CONTROL and individually click the - ducks that you want selected, but this can be tedious. However, there - is a much faster method--just create a selection box by clicking the - mouse and dragging it over the area of ducks that you want selected. - - Go ahead and select two circles, and select all of their ducks. With - several ducks selected, moving one duck will move all of the - ducks. This behavior is dependent on the normal tool. Thus, a - more descriptive name for this tool might have been the "move" or - "translate" tool. - - The Rotate and Scale tools work much like the Normal tool, except in - the case where you have multiple ducks selected. It is much easier - to just try it than read about it. Select a few circles, select all - of their ducks, and try using the rotate and scale tools. - - Note that, unlike the normal tool, the other duck manipulation tools - DO have options associated with them. If a particular tool isn't - doing what you want, take a look in the tool options tab to see if - it is set up like you want it. -&linking.sgml; -&steplayers.sgml; -&shapes.sgml; - diff --git a/synfig-docs/trunk/en/steps/layers/combining.sgml b/synfig-docs/trunk/en/steps/layers/combining.sgml deleted file mode 100644 index ce7b421..0000000 --- a/synfig-docs/trunk/en/steps/layers/combining.sgml +++ /dev/null @@ -1,32 +0,0 @@ - - - -Combining -Now there are two ways to proceed. In the first way, pick the gradient -tool from the Synfig Toolbox, and click into the canvas once. You should note -that another layer was added in the Layers Dialog called 'Gradient'. This is -nothing special. If you see no gradient but just a plain color, pick the normal -tool, click into the canvas to acivate the gradient's ducks. You need to grab -the one you see and move it a bit until a gradient appears. - -You now have a gradient but it is not what you wanted: It spreads the -whole canvas and the goal was to have a gradient on the rectangle. Let's fix -this now. - -Select the gradient and the rectangle layer in the Layers Dialog. They -should appear with a blue background now. Then, context-click (ie. right-click -on Windows and Linux) and select 'Encapsulate' from the menu. The view of your -layer tab should change now, showing a small box called 'Inline Canvas' with an -arrow in front. If you click the arrow, it will unfold and show your previous -two layers; the gradient and the rectangle. - -You can treat this layer like any other layer -- move it around, -duplicate it, copy and paste it. You'll notice an arrow next to the icon of the -box. By clicking on this arrow, you can expand the inline canvas to see its -contents. - -If you want to change the name of it to something more descriptive, just -select the layer in the layer tab and click on its label. Then you just edit it -in place. You can do this for ANY layer, and are strongly encouraged to do so. - - diff --git a/synfig-docs/trunk/en/steps/layers/done b/synfig-docs/trunk/en/steps/layers/done deleted file mode 100644 index e69de29..0000000 diff --git a/synfig-docs/trunk/en/steps/layers/layers.sgml b/synfig-docs/trunk/en/steps/layers/layers.sgml deleted file mode 100644 index f574dba..0000000 --- a/synfig-docs/trunk/en/steps/layers/layers.sgml +++ /dev/null @@ -1,37 +0,0 @@ - - - -Layers - In the previous tutorial, you made a -first simple animation by changing the attributes of primitive objects -such as its position, color, and size. These simple types, however, are -seldomly sufficient to create advanced characters and objects. To do so, -Synfig uses Layers. They are similar to layers known from other drawing -application such as the GIMP, for instance. - -However, Synfig is different to simple layers in at least two -respects: - - - You can organize layers into hierachical groups. - - - You can use upper layers to change the behaviour (or look) - or underlying layers. - - - -Doing so is quite easy. Let's look at a simple example. - - - - Create a new file with 0 duration. There's no need to bother - with a timeline at this point. - - - Create a simple rectangle. - - -&using.sgml; -&combining.sgml; - diff --git a/synfig-docs/trunk/en/steps/layers/using.sgml b/synfig-docs/trunk/en/steps/layers/using.sgml deleted file mode 100644 index 4eef8ca..0000000 --- a/synfig-docs/trunk/en/steps/layers/using.sgml +++ /dev/null @@ -1,57 +0,0 @@ - - - -Using - However, there is still a problem: The gradient still covers the whole -canvas althought we wanted it to be restricted on the rectangle. To do so, -activate the gradient layer in the Layer tab. Now go to the Params Dialog (by -default a tab in the Params-Children-Keyframes window), and search the attribute -called 'Blend Method'. Double-click the entry and select 'Onto' from the -appearing drop-down menu. - -The gradient should now be restricted to the rectangle. Congratulations! -You just made your first interacting layers with Synfig. - -If only for the additional organization, encapsulating layers into inline -canvases dramatically improves the ease of use of Synfig Studio. But -lots of programs can do this. The concept of scope as just demonstrated -sets Synfig apart from other programs with layer hierarchies. - -The following remarks seem to be outdated already! A blur -defaults to 'Straight' here (using SVN 110). --Claus 06:45, 11 Jan 2006 (PST) - - - It defaulted to composite for me, as described (using - SVN 147) Matumio 07:56, 12 Mar 2006 (PST) - - However, a layer can only modify the data that it gets from directly - below it. In other words, if you were to throw a Blur Layer at - the top of the objects inside the inline canvas we just created, - it would just blur them -- anything under it would not be blurred! - - Lets try it. Add a few circles under the inline canvas we just - created. Expand the inline canvas to show its contents, and select - the top layer inside of it (should be the "Outline" layer). This - is where we want to insert the blur. Right click on the selected - layer and a popup menu will appear. The first item in that popup - is "New Layer". Inside of the "New Layer" menu, you'll see several - categories of layers you could create, but what we want is a blur, - so goto the Blur category and select the "Blur" layer. (so that - would be "New Layer->Blurs->Blur") - - Well, it blurred... but something is not quite right--the inside edge - of the outline is now all soft, but it still kinda looks like there is - a hard edge on the outside. It is doing this because the blend method - of the blur defaulted to "Composite" (you can change the default - blend method for new layers from the New Layer Defaults section of - the Toolbox). What we want is a blend method of "Straight". Just - select the blur layer, and change the Blend Method to "Straight" - in the Params Dialog. - - (NOTE: I will probably change the way that default blend methods are - handled in the future--as the way it is currently handled seems to - only create hassles like this) - - Ok, now we have all of the contents of the inline canvas blurred, - but everything under it is sharp! - diff --git a/synfig-docs/trunk/en/steps/linking.sgml b/synfig-docs/trunk/en/steps/linking.sgml deleted file mode 100644 index bc17b4d..0000000 --- a/synfig-docs/trunk/en/steps/linking.sgml +++ /dev/null @@ -1,53 +0,0 @@ - - - -Linking -Now lets try linking. Lets say we always -want these two circles to be the same size. Select two circles, and then -select both of their Radius ducks(the cyan dot). Then right click on -either duck and a menu will pop up. Click on "Link". Boom. The parameters -are linked together. You can prove it to yourself by selecting just one -of the circles and changing its radius--the other one will change as -well. Neat stuff, eh? - -Linking is a fundamental concept in Synfig. You can create links not only -between ducks, but also between parameters as well by selecting multiple -layers, right clicking on the parameter in the param tab, and selecting -"Link". - -DIGRESSION: This is how outlines are attached to their regions-but -I'm getting ahead of myself. At the moment, the fundamental power and -flexibility of linking in Synfig Core is beyond what Synfig Studio -currently allows for. This will change in the future. Anyway, back -on track... - -Lets say you want one of the circles to be a different color. If you look -in the toolbox below the tools, you'll see the foreground/background -color selector, the outline width selector, and some other stuff like -the default blend method and gradient. The foreground/background color -widget works exactly as you might expect--you can click on the foreground -color, and a modest color chooser will appear. Now to can change the -color pretty easily. - -But sometimes you just want to click on a color and go. This is where -the palette editor tab comes in. It's functionality isn't quite 100% yet -(ie: saving and loading custom palettes hasn't been implemented yet), -but the default palette is pretty decent. Click on the Palette editor tab -and have a look--it's the one with the palette-ish looking icon. Clicking -on colors in here will immediately change the default foreground color. - -That's all great, but we still haven't changed the color of the -circle. There are two ways to do this. The first way is that you select -the circle layer you want to modify, goto the params tab and double click -on the color parameter--a color selector dialog shows up and you just -tweak away. But lets say you already got the color you wanted selected as -the default foreground color. Easy. Just click on the "Fill tool" from the -toolbox, and then click on the circle in the canvas window. Boom. Circle -changes color. This works with more than just circles, but we'll get to -that in a sec. - -Try playing around with the circles for a bit. Muck around with the -parameters, and see what happens. To get you started, play around with -feather a bit. - - diff --git a/synfig-docs/trunk/en/steps/shapes.sgml b/synfig-docs/trunk/en/steps/shapes.sgml deleted file mode 100644 index 23a46bb..0000000 --- a/synfig-docs/trunk/en/steps/shapes.sgml +++ /dev/null @@ -1,82 +0,0 @@ - - - - Shapes - Basic primitives such as circles or -rectangles are all great, but they are pretty much geometrically -inflexible. What about shapes? To do this, we use the bline tool. - In Synfig, the construct for describing shapes is called a Bline. This -is roughly analogous to a "path" in other programs, except that it is -strictly a hermite spline. - When you click on the bline tool, you will see that the ducks from -your currently selected layer (if there was one) will disappear, but -the layer(s) will still remain selected in the Layers Dialog. This is -normal. Anything you create in the bline tool will be inserted above the -currently selected layer. Keep in mind that if you want to insert a shape -somewhere, you should select where you want to insert it before you go -into the Bline tool-changing the selection afterward will automaticly -swap you back to the normal tool. - If you take a look at the tool options dialog, you'll notice that the -first things you see are three checkboxes. Make sure that only "Fill" -AND "Outline" are checked. - First, go ahead and click on the "R" button in the lower left corner of -the FG/BG color widget in the toolbox. This will reset us back to black -and white. Also, go ahead and set the default line width (right next to -the FG/BG widget) to something nice and thick -- 10pt should do the -trick. - Clicking with your mouse in the canvas will place vertices. While you are -placing a vertex, you can drag out its tangent by dragging the mouse. Do -this over and over, and you construct a Bline. - Keep in mind, however, that during this construction, there is nothing -stopping you from just moving it if you don't like where you placed -a vertex or a tangent. Honest! If you want to remove a vertex, right -click on it and delete it. Want to split the tangents? Right click on -the tangent and hit "split tangents". Want to loop the bline? right -click on the first vertex and select "loop". - So I assume you got your first Bline laid out like you want it. That's -great. But we are still in construction mode -- the layers haven't been -created yet. There are two ways to create the layers: - - - just switch to another tool, or - - - press the "create" button at the bottom of the tool options tab - (it's the icon that looks like a gear). - - - For now, just go ahead and click on the normal tool because we - are done with the bline tool. - // Insert Figure about here - Ok, we now have a nice pretty white region with a thick black - outline. Notice that there are two layers that we have created--the - Outline and the Region. Despite the fact that they are two separate - layers, their vertices parameter has already been linked--so you - can select either one and move its ducks around and the other one - will also change. - If you want to manipulate the vertices after you have created - the layers, it is very easy to do so. Just click on one of the - layers and have at it. If you want to remove a vertex, right - click on it and hit "Remove Item (smart)". Want to insert a point - somewhere? Right click on the segment where you want to insert - something and his "Insert item (smart)". - NOTE: The only major difference between this normal editing mode - and the construction mode is in how you split the tangents--in - construction mode you right click on the tangent itself. In normal - duck editing mode, you must right click on the vertex that the - tangents are attached to. This could be considered a usability bug, - and it will be resolved at some point. - This may appear to be leading to a mess of layers. And yes, if - you aren't using the software properly, that is exactly what you - will get. But there is a way to make this more sane: Just study - the previous tutorial - One quick thing to mention before I finish up. You can change the - width of an outline at each vertex. You do this by selecting the - outline layer (NOTE: you must select the Outline Layer, the Region - Layer has no width data) and tweaking with the width ducks. By - default, these are masked. To show them, press Alt-5. Repeat to - hide them again. You can also see other things to mask via the - Canvas Menu Caret > View Menu > Mask Ducks Menu. - That should give you enough of a grasp of the software to be able - to figure out more stuff on your own. - diff --git a/synfig-docs/trunk/en/synfig-studio.sgml b/synfig-docs/trunk/en/synfig-studio.sgml deleted file mode 100644 index 31266a3..0000000 --- a/synfig-docs/trunk/en/synfig-studio.sgml +++ /dev/null @@ -1,64 +0,0 @@ - - - - %commondata; --> - - - - - - - - - - - - - - - - - - - - - - -]> - - - 28 Aug 2006 - <acronym>Synfig Studio</acronym> - - Getting Started - Intial Release - - - xxxx - xxx xxxxxx - - - et Alt. - - -
      synfig@miguelgea.com
      - - Released with GFDL license - - - - 0.1 - 2006-8-28 - mgm - Document start - - -
      -&introduction.sgml; -&interface.sgml; -&firststeps.sgml; -&apendices.sgml; -&index.sgml; -
      - diff --git a/synfig-docs/trunk/en/tips/bitmap.sgml b/synfig-docs/trunk/en/tips/bitmap.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/en/tips/bitmap.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/en/tips/closebline.sgml b/synfig-docs/trunk/en/tips/closebline.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/en/tips/closebline.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/en/tips/dock.sgml b/synfig-docs/trunk/en/tips/dock.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/en/tips/dock.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/en/tips/filloutline.sgml b/synfig-docs/trunk/en/tips/filloutline.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/en/tips/filloutline.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/en/tips/gradient_object.sgml b/synfig-docs/trunk/en/tips/gradient_object.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/en/tips/gradient_object.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/en/tips/layer.sgml b/synfig-docs/trunk/en/tips/layer.sgml deleted file mode 100644 index 67c575a..0000000 --- a/synfig-docs/trunk/en/tips/layer.sgml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/synfig-docs/trunk/others/Authors b/synfig-docs/trunk/others/Authors deleted file mode 100644 index 144393b..0000000 --- a/synfig-docs/trunk/others/Authors +++ /dev/null @@ -1 +0,0 @@ -snapSilverlight is AdrianW, and he did a lot of the wiki diff --git a/synfig-docs/trunk/others/hola.txt b/synfig-docs/trunk/others/hola.txt deleted file mode 100644 index ade1f58..0000000 --- a/synfig-docs/trunk/others/hola.txt +++ /dev/null @@ -1 +0,0 @@ -Hola Mundo \ No newline at end of file diff --git a/synfig-docs/trunk/png/toolbox.png b/synfig-docs/trunk/png/toolbox.png deleted file mode 100644 index 988e28d3c3ad9175e263b637eb38f773b544477a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 36891 zcmV)%K#jkNP)r00FQF0ssI2`EzPa00003b3#c}2nYz< z;ZNWI0016zMObu0Qbj>jPf`G9Zf|X6EpTCOWo#{TV{&C>ZgXgFbR3sAcK`q&07*na zRCt{1y?tmLSGF(uoA=7F3OY~)3Uq-DDzGnUF^1D(3?uRUhx_0Mk;#EbWMJIPK%$($ zM1Fx2>jqBJ$2@YB9LP~}AY)~?nNjB51bHAq4ot8N*WC6WezXQWs0R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$k=l<5J99L$Wpa;ZVMg9a+ay zAZe6wX;_n32B+SPHE0C7ZFo32ix)Ize$1`EA>Nz{j)WuppCFy}$=L&{-kA-mTPC-) zCJAf3=8X5#EL5=rX(fd*97^o&l%s~oYxS6Y0mqZQy)s7{w!GUmM78J;B zRaDFo|KJ<0ug=oqja>US^y1SghCH$B-}H!xbXTPN0*@nWe)A^`KJ(LwBF2V?XRs?* z*Euo$U-V!xtse5Ytk@;YO<7(UVrJ&Tf3dmVFqb1NH0!{YT3t?oILF5QNIFSoEimY` zTO0frNWRvqtR#iM#q8w_eOqz#tl$px&-v+pe&n?SyhZ|#o~/dev/null - done -done diff --git a/synfig-docs/trunk/scripts/clean.sh b/synfig-docs/trunk/scripts/clean.sh deleted file mode 100755 index ddc27e3..0000000 --- a/synfig-docs/trunk/scripts/clean.sh +++ /dev/null @@ -1,7 +0,0 @@ -LANGSAVAL="en ca" - -for i in $LANGSAVAL - do - make SGMLDIR=$i clean - rm -Rf result/ -done diff --git a/synfig-osx/launcher/.cvsignore b/synfig-osx/launcher/.cvsignore new file mode 100644 index 0000000..bc414e1 --- /dev/null +++ b/synfig-osx/launcher/.cvsignore @@ -0,0 +1,9 @@ +Makefile +Xquartz.1.html +Xquartz._man +XFree86.1.html +XFree86._man +XFree86.man +appledri.h appledristr.h +xf86drm.h +build diff --git a/synfig-osx/launcher/English.lproj/.cvsignore b/synfig-osx/launcher/English.lproj/.cvsignore new file mode 100644 index 0000000..033b104 --- /dev/null +++ b/synfig-osx/launcher/English.lproj/.cvsignore @@ -0,0 +1 @@ +main~.nib diff --git a/synfig-osx/launcher/English.lproj/InfoPlist.strings b/synfig-osx/launcher/English.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..a95d5c7e8dde370707aa5007e09e2462233379f4 GIT binary patch literal 380 zcmZ{fOACTP6ot>aUm-3f%A#GgNhktoBe;)zB$bMfpniPyjX@wN!_0lmIp?1H{%9^o zmV6aD>!h19y%Z~=_aIiP=@iO|7BS&HP$lFul^woTL-z{$*`XXXCmc^ZZPkK~z{NVE ze + + + + IBDocumentLocation + 61 48 372 379 0 0 1280 832 + IBEditorPositions + + 29 + 530 771 319 44 0 0 1280 832 + 423 + 525 668 148 61 0 0 1280 832 + + IBFramework Version + 437.0 + IBGroupedObjects + + 0 + + 371 + 372 + + 1 + + 385 + 382 + 386 + + 3 + + 370 + 369 + + 4 + + 363 + 365 + + 5 + + 368 + 364 + + 6 + + 543 + 541 + + 7 + + 375 + 377 + + 8 + + 374 + 376 + + + IBLastGroupID + 9 + IBLockedObjects + + 285 + 348 + 244 + + IBOpenObjects + + 423 + 29 + + IBSystem Version + 8C46 + + diff --git a/synfig-osx/launcher/English.lproj/main.nib/objects.nib b/synfig-osx/launcher/English.lproj/main.nib/objects.nib new file mode 100644 index 0000000000000000000000000000000000000000..181e294151aa96cb9c30dab9d727b2df63b12612 GIT binary patch literal 12364 zcmb7K4Rlr2l|J|8hmeH)B18u3WyC3>P-7|zLop%1K$Q?lEH0s>FYn#tU3q`LdmkaT zgPd^RE7Lk1eJk8C#TiB|)q)0wpW-YXD59-Ptd8T)8e6U%T}xV*%(@b(c0R|?8hD}T^%s2l$>vU!t(Wo z^tO21H^^*z8fc5h;gO28{p0jLdj>|WTSr4%ml<;SJ&`~(1v<)usUcR!*w90lFJER! z5UlIyk_*_Vo6$tvuir5201;Hzg?;@x4XTwKwFhR_0G1l{GU>$|@sMqg#sP0B2l|9;keJ2VD!YK`x3soUND%i;L>zlA29&fXu#aG4$3&R> zNH3~7y1Mlp)*3?(1+KR3>DZ)b#EM5lHwXp!mZ1;e30T;*STqvQ;|$7kI-MM0c6BTM z`Z9m^{*h^(o`HQdLQbOU4bn?6H3mrg?M{Qg#^K)LMd z?6`J46uLvaxA{ql>AhYsLr-ncd&3wiRW4x%ONjxjarQl?u9<@nd|2~^^th$zeSMG? z=`pl?4OaA(;gR`v+2)od{%@CK^XK6IrOWItmSBEnumJP1zhH6vM)0hIw9+@jR{ZRU za)cczO(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>%2M)*6q`X_E1 zS9{#gxbl~7C0FMFx|S<9W7=o9GJv;lapn7Hu+;nA>p25^$V1hu+|N-v0vrN73eX;| zEOcQ*|KNVX)oa{Ox$+P?1JD6C3{}PRt(=_&;tR-D-8W$&?yTGK`V^RU=W+%GQ{r41 ub(eGXJ8n5??k=v*1;%fEDD)s*sP6)UF literal 0 HcmV?d00001 diff --git a/synfig-osx/launcher/English.lproj/main~.nib/classes.nib b/synfig-osx/launcher/English.lproj/main~.nib/classes.nib new file mode 100644 index 0000000..c247ea9 --- /dev/null +++ b/synfig-osx/launcher/English.lproj/main~.nib/classes.nib @@ -0,0 +1,49 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + ACTIONS = { + "apps_table_cancel" = id; + "apps_table_delete" = id; + "apps_table_done" = id; + "apps_table_duplicate" = id; + "apps_table_new" = id; + "apps_table_show" = id; + "bring_to_front" = id; + "close_window" = id; + "enable_fullscreen_changed" = id; + "minimize_window" = id; + "next_window" = id; + "prefs_changed" = id; + "prefs_show" = id; + "previous_window" = id; + "toggle_fullscreen" = id; + "x11_help" = id; + "zoom_window" = id; + }; + CLASS = X11Controller; + LANGUAGE = ObjC; + OUTLETS = { + "apps_separator" = id; + "apps_table" = id; + depth = id; + "dock_apps_menu" = id; + "dock_menu" = id; + "dock_window_separator" = id; + "enable_auth" = id; + "enable_fullscreen" = id; + "enable_keyequivs" = id; + "enable_tcp" = id; + "fake_buttons" = id; + "prefs_panel" = id; + "sync_keymap" = id; + "toggle_fullscreen_item" = id; + "use_sysbeep" = id; + "window_separator" = id; + "x11_about_item" = id; + }; + SUPERCLASS = NSObject; + } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/synfig-osx/launcher/English.lproj/main~.nib/info.nib b/synfig-osx/launcher/English.lproj/main~.nib/info.nib new file mode 100644 index 0000000..91ebde6 --- /dev/null +++ b/synfig-osx/launcher/English.lproj/main~.nib/info.nib @@ -0,0 +1,78 @@ + + + + + IBDocumentLocation + 61 48 372 379 0 0 1280 832 + IBEditorPositions + + 29 + 530 771 301 44 0 0 1280 832 + 423 + 525 668 142 61 0 0 1280 832 + + IBFramework Version + 349.0 + IBGroupedObjects + + 0 + + 371 + 372 + + 1 + + 385 + 382 + 386 + + 3 + + 370 + 369 + + 4 + + 363 + 365 + + 5 + + 368 + 364 + + 6 + + 543 + 541 + + 7 + + 375 + 377 + + 8 + + 374 + 376 + + + IBLastGroupID + 9 + IBLockedObjects + + 285 + 348 + 244 + + IBOpenObjects + + 423 + 29 + 285 + 244 + + IBSystem Version + 7R28 + + diff --git a/synfig-osx/launcher/English.lproj/main~.nib/objects.nib b/synfig-osx/launcher/English.lproj/main~.nib/objects.nib new file mode 100644 index 0000000000000000000000000000000000000000..d348ff21647c4c31dbf5ec5e603964691b51a684 GIT binary patch literal 15083 zcmb_j4Rlo1oxgXI3_}tiK|aKV^18*fLZyJ#5018h0BafuNYJ)c8;6;fz1>U|(izN-we|M)wzVY^#mgHB58H0_L9W;1Nj=xDr&9B6dj>l7 zoz^--PbI1AgSOp_JrcA$eQ&kxXjeCVS_O;@W3ZmT&6r)^h97(X{#bXvnX?iF%fSW! zTxVvi*?Wf;*$p4R{K~|wQO4Ls`1kgCww@JOf*CBy;_Po(4!<+_tYa&Ig-;E8!ajzK=>| zfn}4=;F}D6;5yr$N=Rp{oSC{*@`k$c2~eB$eAdiB2y8Ejz7c>aBTM5epP&v%pgVzi zDe4mJ7wCMVR2*Vtu4e22m|4HZ z%;?VKnKjL4R(+XSPuWxRdBY%T+64R7JU-|Qww=e)jPwXP=~LxvKJ}Au=0mMkT&>h< zmQt(hp+YIP1HUaOSAxY42D@R3}_?g(x2!Z@28_sI!KaoGqdj!I0lJ)TME zsR|`8jkC!p9OKbRP!d~}Ollo;BFhXrJN7nEg(ByI|61@X8B?v&!&1>18oc~2=&5~j zsG)SsKOyQs=sCg89xWXo8e{~aG`XvFhG5@hjDDAnt5v=Vi5E-9?YiFHm2A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PG^W1FW;ny1f85W{h{DG2SU$i4_2GmIK!`>Ve^F65Z9Ug9B-sOqNG!dDJ z@)Am62hre=WW5_iB#jT}1pj-lUqs^QhXN0H^8_FCV)z>bbbLcZrhBGfU-H)A+R=Mc z@K2-nw1_l&1A+~ET_VzlHNGR*cd<#G;E$uZSVS^_!o}XL82fkBIneyK;D3kClOi$$ z%>fa)5RfxOA9BtiOcL!-8-17GpvFTf9v6+64Q&2fMliL-z`P(7Rahui*135t$8`rx0sn ziB=JrgXXV9WD&-W34Xhm5|OO{ct)@%(7Yx1eHa1${|C5*B4VKPCxS0UCvFQtF#8pv z3h!#cK8Me6B|FgIJbxSD?-7x0-de%#_KpjFiMK+qJ(!K;;5eG^!~FvWccK4;=G`Ll zNp${B@Ov=-S;4pC8#wS)e0!w9+sDzqDmX+Ixd8a$+kF>$OBSGo$=v467m)?tcI=N? ze-`}n-WCzL&D)Kq(wHz+aL~$sD){>W51!oSeN04pylb&7I*tmy%ezTLbin*laG=N@ z6?`YYA@chS8eGX7L+6tsG7I0ng`~zaM5Nyv7W}>F7lM5myUZ4m`Q9xe@^KG5yUV*( zM0!0qKk${G$3+()ngl17;{Rp%wg9T)^@_+X-W!51_Ern#dY1@(r-#22d&uh)ktEiB zNJK93;QOw`Bp8}AUP44}M*r`-@#{Ikd(aR5+i3nE_`PU;D0saGxBVUf+#~pxu+v-- z`D<_4HQv&zz1szQ*t<KP_XZNzY+XWbfGDt!MXS>MxdxEG@uy@O`a-;u^$OO1t`peGN8c)`4M#D z+UP|z|0ehcylX^6!{`4L+`+68A@Kvj +#define IHaveSubdirs + +LinkSourceFile(XFree86.man,../xfree86) +LinkSourceFile(appledri.h,$(LIBSRC)/GL/apple) +LinkSourceFile(appledristr.h,$(LIBSRC)/GL/apple) + +SRCS = darwin.c \ + darwin-input.c \ + darwin-keyboard.c \ + darwin-new-keymap.c \ + darwin-old-keymap.c \ + keysym2ucs.c \ + quartz.c \ + quartz-audio.c \ + quartz-cursor.c \ + quartz-server.c \ + rootless-common.c \ + rootless-gc.c \ + rootless-picture.c \ + rootless-screen.c \ + rootless-val-tree.c \ + rootless-window.c \ + pseudoramiX.c \ + appledri.c \ + applewm-impl.c \ + dri-surface.c \ + x-list.c \ + x-hash.c \ + x-hook.c \ + X11Application.m \ + X11Controller.m + +OBJS = darwin.o \ + darwin-input.o \ + darwin-keyboard.o \ + darwin-new-keymap.o \ + darwin-old-keymap.o \ + keysym2ucs.o \ + quartz.o \ + quartz-audio.o \ + quartz-cursor.o \ + quartz-server.o \ + rootless-common.o \ + rootless-gc.o \ + rootless-picture.o \ + rootless-screen.o \ + rootless-val-tree.o \ + rootless-window.o \ + pseudoramiX.o \ + appledri.o \ + applewm-impl.o \ + dri-surface.o \ + x-list.o \ + x-hash.o \ + x-hook.o \ + X11Application.o \ + X11Controller.o + +AS := /System/Library/Frameworks/ApplicationServices.framework + +INCLUDES = -I. -I$(SERVERSRC)/mi -I$(SERVERSRC)/fb -I$(EXTINCSRC) \ + -I$(SERVERSRC)/render -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ + -I$(SERVERSRC)/os -I$(SERVERSRC)/Xext -I$(SERVERSRC)/GL/apple \ + -I$(INCLUDESRC) -I$(FONTINCSRC) -F$(AS)/Frameworks \ + $(XPLUGIN_INCLUDE) + +OSNAME = OSName +OSVENDOR = OSVendor +OSNAMEDEF = -DOSNAME='" $(OSNAME)"' -DOSVENDOR='" $(OSVENDOR)"' + +#if defined(XFree86CustomVersion) +CUSTOMVERSION = XFree86CustomVersion +CUSTOMVERDEF = -DXF86_CUSTOM_VERSION='$(CUSTOMVERSION)' +#endif + +#if defined(BuilderString) +BUILDERSTRING = BuilderString +BUILDERMSG = -DBUILDERSTRING='$(BUILDERSTRING)' +#endif + +SUBDIRS = utils + +DEFINES = $(CUSTOMVERDEF) -DXBINDIR=$(BINDIR) -DXINITDIR=$(XINITDIR) \ + $(QUARTZDEFINES) $(DEBUGDEFINES) + +#if XFree86Devel +DEBUGDEFINES = -DROOTLESSDEBUG +#endif + +EXTRAMANDEFS = -D__logdir__=$(LOGDIRECTORY) + +SpecialCObjectRule(darwin,$(ICONFIGFILES),$(OSNAMEDEF) $(BUILDERMSG) $(CUSTOMVERDEF)) + +NormalLibraryObjectRule() +NormalLibraryTarget(XQuartz,$(OBJS)) + +InstallManPage(Xquartz,$(MANDIR)) +InstallManPage(XFree86,$(MANDIR)) + +DependTarget() + +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) + +#ifndef DarwinArchEnv +#define DarwinArchEnv +#endif + +PBXBUILD = DarwinArchEnv pbxbuild +PBXBUILDSTYLE = Development +PBXBUILDDIR= ./build + +DITTO = ditto + +#if NothingOutsideProjectRoot +APPINSTALLDIR = $(BINDIR)/../Applications +#else +APPINSTALLDIR = /Applications/Utilities +#endif + +all:: + $(PBXBUILD) -buildstyle $(PBXBUILDSTYLE) build + +install:: + $(PBXBUILD) -buildstyle $(PBXBUILDSTYLE) install + mkdir -p $(DESTDIR)$(APPINSTALLDIR) + $(DITTO) $(PBXBUILDDIR)/UninstalledProducts/X11.app $(DESTDIR)$(APPINSTALLDIR)/X11.app + +clean:: + $(PBXBUILD) 'clean' + +%.o : %.m + $(CC) $(CFLAGS) -c -o $@ $< diff --git a/synfig-osx/launcher/Synfig Studio.pbproj/.cvsignore b/synfig-osx/launcher/Synfig Studio.pbproj/.cvsignore new file mode 100644 index 0000000..3cc7cb5 --- /dev/null +++ b/synfig-osx/launcher/Synfig Studio.pbproj/.cvsignore @@ -0,0 +1 @@ +jsh.pbxuser diff --git a/synfig-osx/launcher/Synfig Studio.pbproj/darco.mode1 b/synfig-osx/launcher/Synfig Studio.pbproj/darco.mode1 new file mode 100644 index 0000000..b7a78d1 --- /dev/null +++ b/synfig-osx/launcher/Synfig Studio.pbproj/darco.mode1 @@ -0,0 +1,1315 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXRunSessionModule + Name + Run Log + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + Description + DefaultDescriptionKey + DockingSystemVisible + + Extension + mode1 + FavBarConfig + + PBXProjectModuleGUID + A66420E408E74B62005A12D3 + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.mode1 + MajorVersion + 31 + MinorVersion + 1 + Name + Default + Notifications + + OpenEditors + + + Content + + PBXProjectModuleGUID + A664210208E74CC8005A12D3 + PBXProjectModuleLabel + Target: SynfigStudio + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + A664210308E74CC8005A12D3 + PBXProjectModuleLabel + Target: SynfigStudio + _historyCapacity + 0 + bookmark + A664210908E77262005A12D3 + history + + A664210408E74CC8005A12D3 + + + SplitCount + 1 + + StatusBarVisibility + + + Geometry + + Frame + {{0, 20}, {784, 658}} + PBXModuleWindowStatusBarHidden2 + + RubberWindowFrame + 42 107 784 699 0 0 1280 832 + + + + PerspectiveWidths + + -1 + -1 + + Perspectives + + + ChosenToolbarItems + + active-target-popup + active-buildstyle-popup + action + NSToolbarFlexibleSpaceItem + build-and-debug + buildOrClean + get-info + toggle-editor + servicesModuleCVS + NSToolbarFlexibleSpaceItem + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProjectWithEditor + Identifier + perspective.project + IsVertical + + Layout + + + BecomeActive + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 20286C29FDCF999611CA2CEA + 20286C2CFDCF999611CA2CEA + 02345980000FD03B11CA0E72 + 1C37FBAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 7 + 2 + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 617}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 635}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 297 92 845 676 0 0 1280 832 + + Module + PBXSmartGroupTreeModule + Proportion + 203pt + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20306471E060097A5F4 + PBXProjectModuleLabel + bundle-main.c + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CE0B20406471E060097A5F4 + PBXProjectModuleLabel + bundle-main.c + _historyCapacity + 0 + bookmark + A664210808E77262005A12D3 + history + + A66420F808E74CC8005A12D3 + A66420F908E74CC8005A12D3 + A66420FA08E74CC8005A12D3 + A66420FB08E74CC8005A12D3 + + prevStack + + A66420FC08E74CC8005A12D3 + A66420FD08E74CC8005A12D3 + A66420FE08E74CC8005A12D3 + A66420FF08E74CC8005A12D3 + A664210008E74CC8005A12D3 + + + SplitCount + 1 + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {637, 384}} + RubberWindowFrame + 297 92 845 676 0 0 1280 832 + + Module + PBXNavigatorGroup + Proportion + 384pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20506471E060097A5F4 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{0, 389}, {637, 246}} + RubberWindowFrame + 297 92 845 676 0 0 1280 832 + + Module + XCDetailModule + Proportion + 246pt + + + Proportion + 637pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDetailModule + + TableOfContents + + A66420E208E74B62005A12D3 + 1CE0B1FE06471DED0097A5F4 + A66420E308E74B62005A12D3 + 1CE0B20306471E060097A5F4 + 1CE0B20506471E060097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.default + + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.morph + IsVertical + 0 + Layout + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 11E0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 29B97314FDCFA39411CA2CEA + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 337}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 1 + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 355}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 373 269 690 397 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 100% + + + Name + Morph + PreferredWidth + 300 + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + + TableOfContents + + 11E0B1FE06471DED0097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.default.short + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCPerspectivesSpecificationMode1.xcperspec' + StatusbarIsVisible + + TimeStamp + 0.0 + ToolbarDisplayMode + 2 + ToolbarIsVisible + + ToolbarSizeMode + 2 + Type + Perspectives + UpdateMessage + The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? + WindowJustification + 5 + WindowOrderList + + A66420EE08E74B62005A12D3 + A66420EF08E74B62005A12D3 + A66420EC08E74B62005A12D3 + A66420EB08E74B62005A12D3 + 1CD10A99069EF8BA00B06720 + /Users/darco/Projects/X11App/Synfig Studio.pbproj + A664210208E74CC8005A12D3 + + WindowString + 297 92 845 676 0 0 1280 832 + WindowTools + + + Identifier + windowTool.build + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD052900623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {500, 215}} + RubberWindowFrame + 192 257 500 500 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 218pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build + + GeometryConfiguration + + Frame + {{0, 222}, {500, 236}} + RubberWindowFrame + 192 257 500 500 0 0 1280 1002 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 458pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAA5065D492600B07095 + 1C78EAA6065D492600B07095 + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.build + WindowString + 192 257 500 500 0 0 1280 1002 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.debugger + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {305, 162}} + {{305, 0}, {389, 162}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 162}} + {{0, 162}, {694, 219}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleDrawerSize + {100, 120} + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 381}} + RubberWindowFrame + 318 323 694 422 0 0 1280 832 + + Module + PBXDebugSessionModule + Proportion + 381pt + + + Proportion + 381pt + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + + TableOfContents + + 1CD10A99069EF8BA00B06720 + A66420E508E74B62005A12D3 + 1C162984064C10D400B95A72 + A66420E608E74B62005A12D3 + A66420E708E74B62005A12D3 + A66420E808E74B62005A12D3 + A66420E908E74B62005A12D3 + A66420EA08E74B62005A12D3 + A66420EB08E74B62005A12D3 + + ToolbarConfiguration + xcode.toolbar.config.debug + WindowString + 318 323 694 422 0 0 1280 832 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + MENUSEPARATOR + + + FirstTimeWindowDisplayed + + Identifier + windowTool.debuggerConsole + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {440, 358}} + RubberWindowFrame + 339 322 440 400 0 0 1280 832 + + Module + PBXDebugCLIModule + Proportion + 358pt + + + Proportion + 359pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + + TableOfContents + + A66420EC08E74B62005A12D3 + A66420ED08E74B62005A12D3 + 1C78EAAC065D492600B07095 + + WindowString + 339 322 440 400 0 0 1280 832 + WindowToolGUID + A66420EC08E74B62005A12D3 + WindowToolIsVisible + + + + Identifier + windowTool.run + Layout + + + Dock + + + ContentConfiguration + + LauncherConfigVersion + 3 + PBXProjectModuleGUID + 1CD0528B0623707200166675 + PBXProjectModuleLabel + Run + Runner + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {493, 167}} + {{0, 176}, {493, 267}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {405, 443}} + {{414, 0}, {514, 443}} + + + + + GeometryConfiguration + + Frame + {{0, 0}, {460, 159}} + RubberWindowFrame + 316 696 459 200 0 0 1280 1002 + + Module + PBXRunSessionModule + Proportion + 159pt + + + Proportion + 159pt + + + Name + Run Log + ServiceClasses + + PBXRunSessionModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C0AD2B3069F1EA900FABCE6 + 1C0AD2B4069F1EA900FABCE6 + 1CD0528B0623707200166675 + 1C0AD2B5069F1EA900FABCE6 + + ToolbarConfiguration + xcode.toolbar.config.run + WindowString + 316 696 459 200 0 0 1280 1002 + WindowToolGUID + 1C0AD2B3069F1EA900FABCE6 + WindowToolIsVisible + 0 + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.09500122070312 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scm + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052930623707200166675 + PBXProjectModuleLabel + Breakpoints + + GeometryConfiguration + + BreakpointsTreeTableConfiguration + + enabledColumn + 16 + breakpointColumn + 201.5830078125 + + Frame + {{0, 0}, {240, 195}} + RubberWindowFrame + 342 421 240 216 0 0 1440 878 + + Module + PBXDebugBreakpointsModule + Proportion + 195pt + + + Proportion + 195pt + + + Name + Breakpoints + ServiceClasses + + PBXDebugBreakpointsModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C0AD2AD069F1E9B00FABCE6 + 1C0AD2AE069F1E9B00FABCE6 + 1CD052930623707200166675 + + WindowString + 342 421 240 216 0 0 1440 878 + WindowToolGUID + 1C0AD2AD069F1E9B00FABCE6 + WindowToolIsVisible + 0 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 100% + + + Proportion + 100% + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {374, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {630, 331}} + MembersFrame + {{0, 105}, {374, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 97 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 385 179 630 352 0 0 1440 878 + + Module + PBXClassBrowserModule + Proportion + 332pt + + + Proportion + 332pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C0AD2AF069F1E9B00FABCE6 + 1C0AD2B0069F1E9B00FABCE6 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 385 179 630 352 0 0 1440 878 + WindowToolGUID + 1C0AD2AF069F1E9B00FABCE6 + WindowToolIsVisible + 0 + + + + diff --git a/synfig-osx/launcher/Synfig Studio.pbproj/darco.pbxuser b/synfig-osx/launcher/Synfig Studio.pbproj/darco.pbxuser new file mode 100644 index 0000000..bb463a6 --- /dev/null +++ b/synfig-osx/launcher/Synfig Studio.pbproj/darco.pbxuser @@ -0,0 +1,1624 @@ +// !$*UTF8*$! +{ + 20286C28FDCF999611CA2CEA = { + activeBuildStyle = 4A9504C5FFE6A39111CA0CBA; + activeExecutable = A65E397F07515B8200A66E82; + activeTarget = 20286C34FDCF999611CA2CEA; + addToTargets = ( + 20286C34FDCF999611CA2CEA, + ); + codeSenseManager = A66420E108E74B3D005A12D3; + executables = ( + A65E397F07515B8200A66E82, + ); + perUserDictionary = { + PBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_MessageID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 300, + 200, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXErrorsWarningsDataSource_TypeID, + PBXErrorsWarningsDataSource_MessageID, + PBXErrorsWarningsDataSource_LocationID, + ); + }; + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 398, + 20, + 48, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 200, + 218, + 20, + 48.1626, + 43, + 43, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXTargetDataSource_PrimaryAttribute, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 149375796; + "PBXTemplateGeometry-F5CA7ECB015C094F0DCA290F" = { + ContentSize = "{668, 621}"; + LeftSlideOut = { + Collapsed = NO; + Frame = "{{0, 0}, {668, 621}}"; + Split0 = { + Collapsed = NO; + Frame = "{{0, 0}, {668, 621}}"; + Split0 = { + Frame = "{{0, 0}, {668, 621}}"; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {484, 208}}"; + }; + Tab1 = { + Debugger = { + Collapsed = NO; + Frame = "{{0, 0}, {664, 208}}"; + Split0 = { + Frame = "{{0, 24}, {664, 184}}"; + Split0 = { + Frame = "{{0, 0}, {325, 184}}"; + }; + Split1 = { + DebugVariablesTableConfiguration = ( + Name, + 123, + Value, + 85, + Summary, + 96.123, + ); + Frame = "{{334, 0}, {330, 184}}"; + }; + SplitCount = 2; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {100, 50}}"; + }; + Tab1 = { + Frame = "{{0, 0}, {100, 50}}"; + }; + TabCount = 2; + TabsVisible = YES; + }; + Frame = "{{0, 0}, {664, 208}}"; + LauncherConfigVersion = 7; + }; + Tab2 = { + Frame = "{{0, 0}, {664, 50}}"; + LauncherConfigVersion = 3; + Runner = { + Frame = "{{0, 0}, {664, 50}}"; + }; + }; + Tab3 = { + BuildMessageFrame = "{{0, 0}, {614, 203}}"; + BuildTranscriptFrame = "{{0, 212}, {614, 85}}"; + BuildTranscriptFrameExpanded = YES; + Frame = "{{0, 0}, {612, 295}}"; + }; + Tab4 = { + Frame = "{{0, 0}, {612, 295}}"; + }; + TabCount = 5; + TabsVisible = NO; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {313, 531}}"; + GroupTreeTableConfiguration = ( + TargetStatusColumn, + 18, + MainColumn, + 280, + ); + }; + Tab1 = { + ClassesFrame = "{{0, 0}, {280, 398}}"; + ClassesTreeTableConfiguration = ( + PBXBookColumnIdentifier, + 20, + PBXClassColumnIdentifier, + 237, + ); + Frame = "{{0, 0}, {278, 659}}"; + MembersFrame = "{{0, 407}, {280, 252}}"; + MembersTreeTableConfiguration = ( + PBXBookColumnIdentifier, + 20, + PBXMethodColumnIdentifier, + 236, + ); + }; + Tab2 = { + Frame = "{{0, 0}, {200, 100}}"; + }; + Tab3 = { + Frame = "{{0, 0}, {200, 557}}"; + TargetTableConfiguration = ( + ActiveObject, + 16, + ObjectNames, + 202.296, + ); + }; + Tab4 = { + BreakpointsTreeTableConfiguration = ( + breakpointColumn, + 197, + enabledColumn, + 31, + ); + Frame = "{{0, 0}, {250, 100}}"; + }; + TabCount = 5; + TabsVisible = NO; + }; + NavBarShownByDefault = YES; + StatusViewVisible = NO; + Template = F5CA7ECB015C094F0DCA290F; + ToolbarVisible = NO; + WindowLocation = "{425, 95}"; + }; + PBXWorkspaceContents = ( + { + LeftSlideOut = { + Split0 = { + Split0 = { + NavContent0 = { + bookmark = A65E48C007518C4E00A66E82; + history = ( + A65E3D3907515FE000A66E82, + A65E488907518C4E00A66E82, + A65E488A07518C4E00A66E82, + A65E488B07518C4E00A66E82, + A65E488C07518C4E00A66E82, + A65E488D07518C4E00A66E82, + A65E488E07518C4E00A66E82, + A65E488F07518C4E00A66E82, + A65E489007518C4E00A66E82, + A65E489107518C4E00A66E82, + A65E489207518C4E00A66E82, + A65E489307518C4E00A66E82, + A65E489407518C4E00A66E82, + A65E489507518C4E00A66E82, + A65E489607518C4E00A66E82, + A65E489707518C4E00A66E82, + A65E489807518C4E00A66E82, + A65E489907518C4E00A66E82, + ); + prevStack = ( + A65E3D3B07515FE000A66E82, + A65E3D3C07515FE000A66E82, + A65E3D3D07515FE000A66E82, + A65E3D3E07515FE000A66E82, + A65E3D3F07515FE000A66E82, + A65E3D4007515FE000A66E82, + A65E3D4107515FE000A66E82, + A65E489A07518C4E00A66E82, + A65E489B07518C4E00A66E82, + A65E489C07518C4E00A66E82, + A65E489D07518C4E00A66E82, + A65E489E07518C4E00A66E82, + A65E489F07518C4E00A66E82, + A65E48A007518C4E00A66E82, + A65E48A107518C4E00A66E82, + A65E48A207518C4E00A66E82, + A65E48A307518C4E00A66E82, + A65E48A407518C4E00A66E82, + A65E48A507518C4E00A66E82, + A65E48A607518C4E00A66E82, + A65E48A707518C4E00A66E82, + A65E48A807518C4E00A66E82, + A65E48A907518C4E00A66E82, + A65E48AA07518C4E00A66E82, + A65E48AB07518C4E00A66E82, + A65E48AC07518C4E00A66E82, + A65E48AD07518C4E00A66E82, + A65E48AE07518C4E00A66E82, + A65E48AF07518C4E00A66E82, + A65E48B007518C4E00A66E82, + A65E48B107518C4E00A66E82, + A65E48B207518C4E00A66E82, + A65E48B307518C4E00A66E82, + A65E48B407518C4E00A66E82, + A65E48B507518C4E00A66E82, + A65E48B607518C4E00A66E82, + A65E48B707518C4E00A66E82, + A65E48B807518C4E00A66E82, + A65E48B907518C4E00A66E82, + A65E48BA07518C4E00A66E82, + A65E48BB07518C4E00A66E82, + A65E48BC07518C4E00A66E82, + A65E48BD07518C4E00A66E82, + A65E48BE07518C4E00A66E82, + A65E48BF07518C4E00A66E82, + ); + }; + NavCount = 1; + NavGeometry0 = { + Frame = "{{0, 0}, {819, 439}}"; + NavBarVisible = YES; + }; + NavSplitVertical = NO; + }; + SplitCount = 1; + Tab1 = { + Debugger = { + Split0 = { + SplitCount = 2; + }; + SplitCount = 1; + TabCount = 2; + }; + LauncherConfigVersion = 7; + }; + Tab2 = { + LauncherConfigVersion = 3; + Runner = { + }; + }; + TabCount = 5; + }; + SplitCount = 1; + Tab1 = { + OptionsSetName = "Hierarchy, all classes"; + }; + TabCount = 5; + }; + }, + { + LeftSlideOut = { + Split0 = { + Split0 = { + NavContent0 = { + bookmark = A65E48C207518C4E00A66E82; + history = ( + A65E48C107518C4E00A66E82, + ); + }; + NavCount = 1; + NavGeometry0 = { + Frame = "{{0, 0}, {668, 621}}"; + NavBarVisible = YES; + }; + NavSplitVertical = NO; + }; + SplitCount = 1; + Tab1 = { + Debugger = { + Split0 = { + SplitCount = 2; + }; + SplitCount = 1; + TabCount = 2; + }; + LauncherConfigVersion = 7; + }; + Tab2 = { + LauncherConfigVersion = 3; + Runner = { + }; + }; + TabCount = 5; + }; + SplitCount = 1; + Tab1 = { + OptionsSetName = "Hierarchy, all classes"; + }; + TabCount = 5; + }; + }, + { + LeftSlideOut = { + Split0 = { + Split0 = { + NavContent0 = { + bookmark = A65E48C407518C4E00A66E82; + history = ( + A65E48C307518C4E00A66E82, + ); + }; + NavCount = 1; + NavGeometry0 = { + Frame = "{{0, 0}, {668, 621}}"; + NavBarVisible = YES; + }; + NavSplitVertical = NO; + }; + SplitCount = 1; + Tab1 = { + Debugger = { + Split0 = { + SplitCount = 2; + }; + SplitCount = 1; + TabCount = 2; + }; + LauncherConfigVersion = 7; + }; + Tab2 = { + LauncherConfigVersion = 3; + Runner = { + }; + }; + TabCount = 5; + }; + SplitCount = 1; + Tab1 = { + OptionsSetName = "Hierarchy, all classes"; + }; + TabCount = 5; + }; + }, + { + LeftSlideOut = { + Split0 = { + Split0 = { + NavContent0 = { + bookmark = A65E48C607518C4E00A66E82; + history = ( + A65E48C507518C4E00A66E82, + ); + }; + NavCount = 1; + NavGeometry0 = { + Frame = "{{0, 0}, {668, 621}}"; + NavBarVisible = YES; + }; + NavSplitVertical = NO; + }; + SplitCount = 1; + Tab1 = { + Debugger = { + Split0 = { + SplitCount = 2; + }; + SplitCount = 1; + TabCount = 2; + }; + LauncherConfigVersion = 7; + }; + Tab2 = { + LauncherConfigVersion = 3; + Runner = { + }; + }; + TabCount = 5; + }; + SplitCount = 1; + Tab1 = { + OptionsSetName = "Hierarchy, all classes"; + }; + TabCount = 5; + }; + }, + ); + PBXWorkspaceGeometries = ( + { + ContentSize = "{1103, 612}"; + LeftSlideOut = { + ActiveTab = 0; + ActiveTabName = PBXGroupTreeModule; + Collapsed = NO; + Frame = "{{0, 23}, {1103, 589}}"; + Split0 = { + ActiveTab = 1; + ActiveTabName = PBXRunSessionModule; + Collapsed = NO; + Frame = "{{284, 0}, {819, 589}}"; + Split0 = { + Frame = "{{0, 150}, {819, 439}}"; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {572, 214}}"; + }; + Tab1 = { + Debugger = { + Collapsed = NO; + Frame = "{{0, 0}, {572, 150}}"; + Split0 = { + Frame = "{{0, 24}, {572, 126}}"; + Split0 = { + Frame = "{{0, 0}, {279, 126}}"; + }; + Split1 = { + DebugVariablesTableConfiguration = ( + Name, + 123, + Value, + 85, + Summary, + 62.123, + ); + Frame = "{{288, 0}, {284, 126}}"; + }; + SplitCount = 2; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {100, 50}}"; + }; + Tab1 = { + Frame = "{{0, 0}, {100, 50}}"; + }; + TabCount = 2; + TabsVisible = YES; + }; + Frame = "{{0, 0}, {572, 125}}"; + LauncherConfigVersion = 7; + }; + Tab2 = { + Frame = "{{0, 0}, {819, 126}}"; + LauncherConfigVersion = 3; + Runner = { + Frame = "{{0, 0}, {819, 126}}"; + }; + }; + Tab3 = { + BuildMessageFrame = "{{0, 0}, {821, 165}}"; + BuildTranscriptFrame = "{{0, 174}, {821, 69}}"; + BuildTranscriptFrameExpanded = YES; + Frame = "{{0, 0}, {819, 265}}"; + }; + Tab4 = { + Frame = "{{0, 0}, {819, 295}}"; + }; + TabCount = 5; + TabsVisible = YES; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {260, 589}}"; + GroupTreeTableConfiguration = ( + TargetStatusColumn, + 18, + MainColumn, + 227, + ); + }; + Tab1 = { + ClassesFrame = "{{0, 0}, {247, 330}}"; + ClassesTreeTableConfiguration = ( + PBXBookColumnIdentifier, + 20, + PBXClassColumnIdentifier, + 204, + ); + Frame = "{{0, 0}, {245, 549}}"; + MembersFrame = "{{0, 339}, {247, 210}}"; + MembersTreeTableConfiguration = ( + PBXBookColumnIdentifier, + 20, + PBXMethodColumnIdentifier, + 203, + ); + }; + Tab2 = { + Frame = "{{0, 0}, {226, 549}}"; + }; + Tab3 = { + Frame = "{{0, 0}, {191, 589}}"; + TargetTableConfiguration = ( + ActiveObject, + 16, + ObjectNames, + 202.296, + ); + }; + Tab4 = { + BreakpointsTreeTableConfiguration = ( + breakpointColumn, + 138, + enabledColumn, + 31, + ); + Frame = "{{0, 0}, {191, 549}}"; + }; + TabCount = 5; + TabsVisible = YES; + }; + NavBarShownByDefault = YES; + StatusViewVisible = YES; + Template = F5F68CF101725D4C0D7A8F4C; + ToolbarVisible = YES; + WindowLocation = "{123, 29}"; + }, + { + ContentSize = "{668, 621}"; + LeftSlideOut = { + Collapsed = NO; + Frame = "{{0, 0}, {668, 621}}"; + Split0 = { + Collapsed = NO; + Frame = "{{0, 0}, {668, 621}}"; + Split0 = { + Frame = "{{0, 0}, {668, 621}}"; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {484, 208}}"; + }; + Tab1 = { + Debugger = { + Collapsed = NO; + Frame = "{{0, 0}, {664, 208}}"; + Split0 = { + Frame = "{{0, 24}, {664, 184}}"; + Split0 = { + Frame = "{{0, 0}, {325, 184}}"; + }; + Split1 = { + DebugVariablesTableConfiguration = ( + Name, + 123, + Value, + 85, + Summary, + 96.123, + ); + Frame = "{{334, 0}, {330, 184}}"; + }; + SplitCount = 2; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {100, 50}}"; + }; + Tab1 = { + Frame = "{{0, 0}, {100, 50}}"; + }; + TabCount = 2; + TabsVisible = YES; + }; + Frame = "{{0, 0}, {664, 208}}"; + LauncherConfigVersion = 7; + }; + Tab2 = { + Frame = "{{0, 0}, {664, 50}}"; + LauncherConfigVersion = 3; + Runner = { + Frame = "{{0, 0}, {664, 50}}"; + }; + }; + Tab3 = { + BuildMessageFrame = "{{0, 0}, {614, 203}}"; + BuildTranscriptFrame = "{{0, 212}, {614, 85}}"; + BuildTranscriptFrameExpanded = YES; + Frame = "{{0, 0}, {612, 295}}"; + }; + Tab4 = { + Frame = "{{0, 0}, {612, 295}}"; + }; + TabCount = 5; + TabsVisible = NO; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {313, 531}}"; + GroupTreeTableConfiguration = ( + TargetStatusColumn, + 18, + MainColumn, + 280, + ); + }; + Tab1 = { + ClassesFrame = "{{0, 0}, {280, 398}}"; + ClassesTreeTableConfiguration = ( + PBXBookColumnIdentifier, + 20, + PBXClassColumnIdentifier, + 237, + ); + Frame = "{{0, 0}, {278, 659}}"; + MembersFrame = "{{0, 407}, {280, 252}}"; + MembersTreeTableConfiguration = ( + PBXBookColumnIdentifier, + 20, + PBXMethodColumnIdentifier, + 236, + ); + }; + Tab2 = { + Frame = "{{0, 0}, {200, 100}}"; + }; + Tab3 = { + Frame = "{{0, 0}, {200, 557}}"; + TargetTableConfiguration = ( + ActiveObject, + 16, + ObjectNames, + 202.296, + ); + }; + Tab4 = { + BreakpointsTreeTableConfiguration = ( + breakpointColumn, + 197, + enabledColumn, + 31, + ); + Frame = "{{0, 0}, {250, 100}}"; + }; + TabCount = 5; + TabsVisible = NO; + }; + NavBarShownByDefault = YES; + StatusViewVisible = NO; + Template = F5CA7ECB015C094F0DCA290F; + ToolbarVisible = NO; + WindowLocation = "{357, 158}"; + }, + { + ContentSize = "{668, 621}"; + LeftSlideOut = { + Collapsed = NO; + Frame = "{{0, 0}, {668, 621}}"; + Split0 = { + Collapsed = NO; + Frame = "{{0, 0}, {668, 621}}"; + Split0 = { + Frame = "{{0, 0}, {668, 621}}"; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {484, 208}}"; + }; + Tab1 = { + Debugger = { + Collapsed = NO; + Frame = "{{0, 0}, {664, 208}}"; + Split0 = { + Frame = "{{0, 24}, {664, 184}}"; + Split0 = { + Frame = "{{0, 0}, {325, 184}}"; + }; + Split1 = { + DebugVariablesTableConfiguration = ( + Name, + 123, + Value, + 85, + Summary, + 96.123, + ); + Frame = "{{334, 0}, {330, 184}}"; + }; + SplitCount = 2; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {100, 50}}"; + }; + Tab1 = { + Frame = "{{0, 0}, {100, 50}}"; + }; + TabCount = 2; + TabsVisible = YES; + }; + Frame = "{{0, 0}, {664, 208}}"; + LauncherConfigVersion = 7; + }; + Tab2 = { + Frame = "{{0, 0}, {664, 50}}"; + LauncherConfigVersion = 3; + Runner = { + Frame = "{{0, 0}, {664, 50}}"; + }; + }; + Tab3 = { + BuildMessageFrame = "{{0, 0}, {614, 203}}"; + BuildTranscriptFrame = "{{0, 212}, {614, 85}}"; + BuildTranscriptFrameExpanded = YES; + Frame = "{{0, 0}, {612, 295}}"; + }; + Tab4 = { + Frame = "{{0, 0}, {612, 295}}"; + }; + TabCount = 5; + TabsVisible = NO; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {313, 531}}"; + GroupTreeTableConfiguration = ( + TargetStatusColumn, + 18, + MainColumn, + 280, + ); + }; + Tab1 = { + ClassesFrame = "{{0, 0}, {280, 398}}"; + ClassesTreeTableConfiguration = ( + PBXBookColumnIdentifier, + 20, + PBXClassColumnIdentifier, + 237, + ); + Frame = "{{0, 0}, {278, 659}}"; + MembersFrame = "{{0, 407}, {280, 252}}"; + MembersTreeTableConfiguration = ( + PBXBookColumnIdentifier, + 20, + PBXMethodColumnIdentifier, + 236, + ); + }; + Tab2 = { + Frame = "{{0, 0}, {200, 100}}"; + }; + Tab3 = { + Frame = "{{0, 0}, {200, 557}}"; + TargetTableConfiguration = ( + ActiveObject, + 16, + ObjectNames, + 202.296, + ); + }; + Tab4 = { + BreakpointsTreeTableConfiguration = ( + breakpointColumn, + 197, + enabledColumn, + 31, + ); + Frame = "{{0, 0}, {250, 100}}"; + }; + TabCount = 5; + TabsVisible = NO; + }; + NavBarShownByDefault = YES; + StatusViewVisible = NO; + Template = F5CA7ECB015C094F0DCA290F; + ToolbarVisible = NO; + WindowLocation = "{380, 137}"; + }, + { + ContentSize = "{668, 621}"; + LeftSlideOut = { + Collapsed = NO; + Frame = "{{0, 0}, {668, 621}}"; + Split0 = { + Collapsed = NO; + Frame = "{{0, 0}, {668, 621}}"; + Split0 = { + Frame = "{{0, 0}, {668, 621}}"; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {484, 208}}"; + }; + Tab1 = { + Debugger = { + Collapsed = NO; + Frame = "{{0, 0}, {664, 208}}"; + Split0 = { + Frame = "{{0, 24}, {664, 184}}"; + Split0 = { + Frame = "{{0, 0}, {325, 184}}"; + }; + Split1 = { + DebugVariablesTableConfiguration = ( + Name, + 123, + Value, + 85, + Summary, + 96.123, + ); + Frame = "{{334, 0}, {330, 184}}"; + }; + SplitCount = 2; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {100, 50}}"; + }; + Tab1 = { + Frame = "{{0, 0}, {100, 50}}"; + }; + TabCount = 2; + TabsVisible = YES; + }; + Frame = "{{0, 0}, {664, 208}}"; + LauncherConfigVersion = 7; + }; + Tab2 = { + Frame = "{{0, 0}, {664, 50}}"; + LauncherConfigVersion = 3; + Runner = { + Frame = "{{0, 0}, {664, 50}}"; + }; + }; + Tab3 = { + BuildMessageFrame = "{{0, 0}, {614, 203}}"; + BuildTranscriptFrame = "{{0, 212}, {614, 85}}"; + BuildTranscriptFrameExpanded = YES; + Frame = "{{0, 0}, {612, 295}}"; + }; + Tab4 = { + Frame = "{{0, 0}, {612, 295}}"; + }; + TabCount = 5; + TabsVisible = NO; + }; + SplitCount = 1; + Tab0 = { + Frame = "{{0, 0}, {313, 531}}"; + GroupTreeTableConfiguration = ( + TargetStatusColumn, + 18, + MainColumn, + 280, + ); + }; + Tab1 = { + ClassesFrame = "{{0, 0}, {280, 398}}"; + ClassesTreeTableConfiguration = ( + PBXBookColumnIdentifier, + 20, + PBXClassColumnIdentifier, + 237, + ); + Frame = "{{0, 0}, {278, 659}}"; + MembersFrame = "{{0, 407}, {280, 252}}"; + MembersTreeTableConfiguration = ( + PBXBookColumnIdentifier, + 20, + PBXMethodColumnIdentifier, + 236, + ); + }; + Tab2 = { + Frame = "{{0, 0}, {200, 100}}"; + }; + Tab3 = { + Frame = "{{0, 0}, {200, 557}}"; + TargetTableConfiguration = ( + ActiveObject, + 16, + ObjectNames, + 202.296, + ); + }; + Tab4 = { + BreakpointsTreeTableConfiguration = ( + breakpointColumn, + 197, + enabledColumn, + 31, + ); + Frame = "{{0, 0}, {250, 100}}"; + }; + TabCount = 5; + TabsVisible = NO; + }; + NavBarShownByDefault = YES; + StatusViewVisible = NO; + Template = F5CA7ECB015C094F0DCA290F; + ToolbarVisible = NO; + WindowLocation = "{403, 116}"; + }, + ); + PBXWorkspaceStateSaveDate = 149375796; + }; + perUserProjectItems = { + A66420F808E74CC8005A12D3 = A66420F808E74CC8005A12D3; + A66420F908E74CC8005A12D3 = A66420F908E74CC8005A12D3; + A66420FA08E74CC8005A12D3 = A66420FA08E74CC8005A12D3; + A66420FB08E74CC8005A12D3 = A66420FB08E74CC8005A12D3; + A66420FC08E74CC8005A12D3 = A66420FC08E74CC8005A12D3; + A66420FD08E74CC8005A12D3 = A66420FD08E74CC8005A12D3; + A66420FE08E74CC8005A12D3 = A66420FE08E74CC8005A12D3; + A66420FF08E74CC8005A12D3 = A66420FF08E74CC8005A12D3; + A664210008E74CC8005A12D3 = A664210008E74CC8005A12D3; + A664210408E74CC8005A12D3 = A664210408E74CC8005A12D3; + A664210808E77262005A12D3 = A664210808E77262005A12D3; + A664210908E77262005A12D3 = A664210908E77262005A12D3; + }; + sourceControlManager = A66420E008E74B3D005A12D3; + userBuildSettings = { + }; + }; + 20286C34FDCF999611CA2CEA = { + activeExec = 0; + executables = ( + A65E397F07515B8200A66E82, + ); + }; + 50EE2AB703849F0B0ECA21EC = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {596, 12726}}"; + sepNavSelRange = "{19522, 64}"; + sepNavVisRect = "{{0, 12081}, {596, 352}}"; + sepNavWindowFrame = "{{19, 72}, {784, 755}}"; + }; + }; + A65E397F07515B8200A66E82 = { + activeArgIndex = 2147483647; + activeArgIndices = ( + ); + argumentStrings = ( + ); + configStateDict = { + "PBXLSLaunchAction-0" = { + PBXLSLaunchAction = 0; + PBXLSLaunchStartAction = 1; + PBXLSLaunchStdioStyle = 1; + PBXLSLaunchStyle = 0; + class = PBXLSRunLaunchConfig; + identifier = com.apple.ProjectBuilder.launch.runConfig; + remoteHostInfo = ""; + startActionInfo = ""; + }; + }; + cppStopOnCatchEnabled = 0; + cppStopOnThrowEnabled = 0; + customDataFormattersEnabled = 1; + debuggerPlugin = GDBDebugging; + disassemblyDisplayState = 0; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + executableSystemSymbolLevel = 0; + executableUserSymbolLevel = 0; + isa = PBXExecutable; + libgmallocEnabled = 0; + name = SynfigStudio; + savedGlobals = { + }; + shlibInfoDictList = ( + ); + shlibInfoDictList_v2 = ( + { + level = 0; + path = /usr/lib/system/libmathCommon.A.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /usr/lib/libSystem.B.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /usr/X11R6/lib/libX11.6.2.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /usr/lib/libicucore.A.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /usr/lib/libauto.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /usr/lib/libobjc.A.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration; + whenToLoad = 0; + }, + { + level = 0; + path = /usr/lib/libz.1.2.3.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Security.framework/Versions/A/Security; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServicesCore.framework/Versions/A/WebServicesCore; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound; + whenToLoad = 0; + }, + { + level = 0; + path = /usr/lib/libbsm.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS; + whenToLoad = 0; + }, + { + level = 0; + path = /usr/lib/libcrypto.0.9.7.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD; + whenToLoad = 0; + }, + { + level = 0; + path = /usr/lib/libcups.2.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/FindByContent.framework/Versions/A/FindByContent; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRaw.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /usr/lib/libmx.A.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices; + whenToLoad = 0; + }, + { + level = 0; + path = /usr/lib/libiconv.2.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /usr/lib/libxml2.2.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox; + whenToLoad = 0; + }, + { + level = 0; + path = /usr/lib/libsqlite3.0.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore; + whenToLoad = 0; + }, + { + level = 0; + path = /usr/lib/libxslt.1.dylib; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/OSAKit.framework/Versions/A/OSAKit; + whenToLoad = 0; + }, + { + level = 0; + path = /System/Library/Frameworks/AppleScriptKit.framework/Versions/A/AppleScriptKit; + whenToLoad = 0; + }, + { + level = 0; + path = "/Users/darco/Projects/X11App/build/Synfig Studio.app/Contents/MacOS/Synfig Studio"; + whenToLoad = 0; + }, + ); + sourceDirectories = ( + ); + }; + A65E4880075176F200A66E82 = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {512, 271}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRect = "{{0, 0}, {512, 271}}"; + }; + }; + A65E4881075176F200A66E82 = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {512, 271}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRect = "{{0, 0}, {512, 271}}"; + }; + }; + A65E48D507518C4E00A66E82 = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + name = X11Controller.m; + path = /Users/darco/Projects/X11App/X11Controller.m; + refType = 0; + sourceTree = ""; + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {662, 9674}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRect = "{{0, 409}, {596, 352}}"; + }; + }; + A66420E008E74B3D005A12D3 = { + fallbackIsa = XCSourceControlManager; + isSCMEnabled = 0; + isa = PBXSourceControlManager; + scmConfiguration = { + }; + scmType = ""; + }; + A66420E108E74B3D005A12D3 = { + indexTemplatePath = ""; + isa = PBXCodeSenseManager; + }; + A66420F508E74C31005A12D3 = { + isa = PBXFileReference; + name = "bundle-main.c"; + path = "/Users/darco/Projects/X11App/bundle-main.c"; + refType = 0; + sourceTree = ""; + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {596, 12726}}"; + sepNavSelRange = "{19522, 64}"; + sepNavVisRect = "{{0, 12081}, {596, 352}}"; + }; + }; + A66420F808E74CC8005A12D3 = { + fRef = A65E4881075176F200A66E82; + isa = PBXTextBookmark; + name = "SynfigApplication.m: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 241; + vrLoc = 0; + }; + A66420F908E74CC8005A12D3 = { + fRef = A65E4880075176F200A66E82; + isa = PBXTextBookmark; + name = "SynfigApplication.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 288; + vrLoc = 0; + }; + A66420FA08E74CC8005A12D3 = { + fRef = A65E48D507518C4E00A66E82; + isa = PBXTextBookmark; + name = "X11Controller.m: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 463; + vrLoc = 1513; + }; + A66420FB08E74CC8005A12D3 = { + fRef = A66420F508E74C31005A12D3; + isa = PBXTextBookmark; + rLen = 1; + rLoc = 875; + rType = 1; + }; + A66420FC08E74CC8005A12D3 = { + fRef = A65E4881075176F200A66E82; + isa = PBXTextBookmark; + name = "SynfigApplication.m: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 241; + vrLoc = 0; + }; + A66420FD08E74CC8005A12D3 = { + fRef = 50EE2AB703849F0B0ECA21EC; + isa = PBXTextBookmark; + name = "bundle-main.c: 535"; + rLen = 0; + rLoc = 12130; + rType = 0; + vrLen = 531; + vrLoc = 11734; + }; + A66420FE08E74CC8005A12D3 = { + fRef = A65E4881075176F200A66E82; + isa = PBXTextBookmark; + name = "SynfigApplication.m: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 241; + vrLoc = 0; + }; + A66420FF08E74CC8005A12D3 = { + fRef = A65E4880075176F200A66E82; + isa = PBXTextBookmark; + name = "SynfigApplication.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 288; + vrLoc = 0; + }; + A664210008E74CC8005A12D3 = { + fRef = A65E48D507518C4E00A66E82; + isa = PBXTextBookmark; + name = "X11Controller.m: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 463; + vrLoc = 1513; + }; + A664210408E74CC8005A12D3 = { + isa = PBXTargetBookmark; + trg = 20286C34FDCF999611CA2CEA; + }; + A664210808E77262005A12D3 = { + fRef = 50EE2AB703849F0B0ECA21EC; + isa = PBXTextBookmark; + name = "void (*initializeASKFunc)(void) = NSAddressOfSymbol(symbol);"; + rLen = 64; + rLoc = 19522; + rType = 0; + vrLen = 488; + vrLoc = 19274; + }; + A664210908E77262005A12D3 = { + isa = PBXTargetBookmark; + trg = 20286C34FDCF999611CA2CEA; + uiCtxt = { + TOCViewDetailVisibleRect = "{{0, 0}, {534, 609}}"; + TOCViewExpandedItems = ( + "com.apple.target-editor-pane.settings", + "com.apple.target-editor-pane.settings.simple", + "com.apple.target-editor-pane.info-plist", + "com.apple.target-editor-pane.info-plist.simple", + "com.apple.target-editor-pane.buildphases", + ); + TOCViewMasterVisibleRect = "{{0, 0}, {211, 609}}"; + TOCViewSelectedItems = ( + "com.apple.target-editor-pane.info-plist", + ); + }; + }; +} diff --git a/synfig-osx/launcher/Synfig Studio.pbproj/project.pbxproj b/synfig-osx/launcher/Synfig Studio.pbproj/project.pbxproj new file mode 100644 index 0000000..208775e --- /dev/null +++ b/synfig-osx/launcher/Synfig Studio.pbproj/project.pbxproj @@ -0,0 +1,552 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 39; + objects = { + 02345980000FD03B11CA0E72 = { + children = ( + 1870340FFE93FCAF11CA0CD7, + ); + isa = PBXVariantGroup; + name = main.nib; + refType = 4; + sourceTree = ""; + }; + 02345981000FD03B11CA0E72 = { + fileRef = 02345980000FD03B11CA0E72; + isa = PBXBuildFile; + settings = { + }; + }; + 0249A667FF388E1711CA2CEA = { + explicitFileType = wrapper.application; + isa = PBXFileReference; + path = "Synfig Studio.app"; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; +//020 +//021 +//022 +//023 +//024 +//040 +//041 +//042 +//043 +//044 + 04313892FE3035C9C02AAC07 = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXRezBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; +//040 +//041 +//042 +//043 +//044 +//080 +//081 +//082 +//083 +//084 + 0867D6AAFE840B52C02AAC07 = { + children = ( + 0867D6ABFE840B52C02AAC07, + ); + isa = PBXVariantGroup; + name = InfoPlist.strings; + refType = 4; + sourceTree = ""; + }; + 0867D6ABFE840B52C02AAC07 = { + fileEncoding = 10; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = English; + path = English.lproj/InfoPlist.strings; + refType = 4; + sourceTree = ""; + }; + 0867D6ACFE840B52C02AAC07 = { + fileRef = 0867D6AAFE840B52C02AAC07; + isa = PBXBuildFile; + settings = { + }; + }; +//080 +//081 +//082 +//083 +//084 +//180 +//181 +//182 +//183 +//184 + 1870340FFE93FCAF11CA0CD7 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.nib; + name = English; + path = English.lproj/main.nib; + refType = 4; + sourceTree = ""; + }; +//180 +//181 +//182 +//183 +//184 +//190 +//191 +//192 +//193 +//194 + 195DF8CFFE9D517E11CA2CBB = { + children = ( + 0249A667FF388E1711CA2CEA, + ); + isa = PBXGroup; + name = Products; + refType = 4; + sourceTree = ""; + }; +//190 +//191 +//192 +//193 +//194 +//200 +//201 +//202 +//203 +//204 + 20286C28FDCF999611CA2CEA = { + buildSettings = { + }; + buildStyles = ( + 4A9504C5FFE6A39111CA0CBA, + 4A9504C6FFE6A39111CA0CBA, + ); + hasScannedForEncodings = 1; + isa = PBXProject; + mainGroup = 20286C29FDCF999611CA2CEA; + projectDirPath = ""; + targets = ( + 20286C34FDCF999611CA2CEA, + ); + }; + 20286C29FDCF999611CA2CEA = { + children = ( + 20286C2AFDCF999611CA2CEA, + 20286C2CFDCF999611CA2CEA, + 20286C32FDCF999611CA2CEA, + 195DF8CFFE9D517E11CA2CBB, + ); + isa = PBXGroup; + name = X11; + path = ""; + refType = 4; + sourceTree = ""; + }; + 20286C2AFDCF999611CA2CEA = { + children = ( + 50EE2AB703849F0B0ECA21EC, + A65E488407517A2600A66E82, + A65E44C807516A5C00A66E82, + A65E44C907516A5C00A66E82, + A65E4880075176F200A66E82, + A65E4881075176F200A66E82, + ); + isa = PBXGroup; + name = Sources; + path = ""; + refType = 4; + sourceTree = ""; + }; + 20286C2CFDCF999611CA2CEA = { + children = ( + A65E3D3307515F5900A66E82, + A65E3D3407515F5900A66E82, + 50459C5F038587C60ECA21EC, + 0867D6AAFE840B52C02AAC07, + 02345980000FD03B11CA0E72, + ); + isa = PBXGroup; + name = Resources; + path = ""; + refType = 4; + sourceTree = ""; + }; + 20286C32FDCF999611CA2CEA = { + children = ( + 50F4F0A7039D6ACA0E82C0CB, + A65E488607517A6900A66E82, + 570C5748047186C400ACF82F, + ); + isa = PBXGroup; + name = "External Frameworks and Libraries"; + path = ""; + refType = 4; + sourceTree = ""; + }; + 20286C34FDCF999611CA2CEA = { + buildPhases = ( + 20286C35FDCF999611CA2CEA, + A65E44BC075161B900A66E82, + 20286C36FDCF999611CA2CEA, + 20286C38FDCF999611CA2CEA, + 20286C3BFDCF999611CA2CEA, + 04313892FE3035C9C02AAC07, + ); + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ""; + HEADER_SEARCH_PATHS = "/Users/darco/Desktop/X11ForMacOSXSource-1.0/xc/programs/Xserver/include /usr/X11R6/include/X11 /usr/X11R6/include"; + LIBRARY_SEARCH_PATHS = /usr/X11R6/lib; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = "-lXau -lX11"; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = "Synfig Studio"; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + WRAPPER_EXTENSION = app; + }; + dependencies = ( + ); + isa = PBXApplicationTarget; + name = SynfigStudio; + productName = X11; + productReference = 0249A667FF388E1711CA2CEA; + productSettingsXML = " + + + + CFBundleDevelopmentRegion + English + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + sif + + CFBundleTypeIconFile + sif_file.icns + CFBundleTypeMIMETypes + + image/x-sif + + CFBundleTypeName + Synfig Composition + CFBundleTypeOSTypes + + **** + + CFBundleTypeRole + Editor + LSIsAppleDefaultForType + + NSDocumentClass + image + + + CFBundleExecutable + Synfig Studio + CFBundleGetInfoString + Synfig + CFBundleIconFile + voria.icns + CFBundleIdentifier + com.voria.synfig + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Synfig Studio + CFBundlePackageType + APPL + CFBundleShortVersionString + 0.1 + CFBundleSignature + ???? + CFBundleVersion + 0.1 + CSResourcesFileMapped + + NSHumanReadableCopyright + Copyright © 2003, Apple Computer, Inc. +Copyright © 2003, XFree86 Project, Inc. + NSMainNibFile + main + NSPrincipalClass + SynfigApplication + + +"; + }; + 20286C35FDCF999611CA2CEA = { + buildActionMask = 2147483647; + files = ( + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 20286C36FDCF999611CA2CEA = { + buildActionMask = 2147483647; + files = ( + 0867D6ACFE840B52C02AAC07, + 02345981000FD03B11CA0E72, + A65E488807517AA400A66E82, + 50459C60038587C60ECA21EC, + A65E3D3507515F5900A66E82, + A65E3D3607515F5900A66E82, + ); + isa = PBXResourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 20286C38FDCF999611CA2CEA = { + buildActionMask = 2147483647; + files = ( + 50EE2AB803849F0B0ECA21EC, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 20286C3BFDCF999611CA2CEA = { + buildActionMask = 2147483647; + files = ( + 50F4F0E8039D6ACA0E82C0CB, + 570C5749047186C400ACF82F, + A65E488707517A6900A66E82, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; +//200 +//201 +//202 +//203 +//204 +//4A0 +//4A1 +//4A2 +//4A3 +//4A4 + 4A9504C5FFE6A39111CA0CBA = { + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + OPTIMIZATION_CFLAGS = "-O0"; + ZERO_LINK = YES; + }; + isa = PBXBuildStyle; + name = Development; + }; + 4A9504C6FFE6A39111CA0CBA = { + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + ZERO_LINK = NO; + }; + isa = PBXBuildStyle; + name = Deployment; + }; +//4A0 +//4A1 +//4A2 +//4A3 +//4A4 +//500 +//501 +//502 +//503 +//504 + 50459C5F038587C60ECA21EC = { + isa = PBXFileReference; + lastKnownFileType = image.icns; + path = X11.icns; + refType = 4; + sourceTree = ""; + }; + 50459C60038587C60ECA21EC = { + fileRef = 50459C5F038587C60ECA21EC; + isa = PBXBuildFile; + settings = { + }; + }; + 50EE2AB703849F0B0ECA21EC = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.c; + path = "bundle-main.c"; + refType = 4; + sourceTree = ""; + }; + 50EE2AB803849F0B0ECA21EC = { + fileRef = 50EE2AB703849F0B0ECA21EC; + isa = PBXBuildFile; + settings = { + }; + }; + 50F4F0A7039D6ACA0E82C0CB = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = CoreFoundation.framework; + path = /System/Library/Frameworks/CoreFoundation.framework; + refType = 0; + sourceTree = ""; + }; + 50F4F0E8039D6ACA0E82C0CB = { + fileRef = 50F4F0A7039D6ACA0E82C0CB; + isa = PBXBuildFile; + settings = { + }; + }; +//500 +//501 +//502 +//503 +//504 +//570 +//571 +//572 +//573 +//574 + 570C5748047186C400ACF82F = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = SystemConfiguration.framework; + path = /System/Library/Frameworks/SystemConfiguration.framework; + refType = 0; + sourceTree = ""; + }; + 570C5749047186C400ACF82F = { + fileRef = 570C5748047186C400ACF82F; + isa = PBXBuildFile; + settings = { + }; + }; +//570 +//571 +//572 +//573 +//574 +//A60 +//A61 +//A62 +//A63 +//A64 + A65E3D3307515F5900A66E82 = { + isa = PBXFileReference; + lastKnownFileType = image.icns; + path = sif_file.icns; + refType = 4; + sourceTree = ""; + }; + A65E3D3407515F5900A66E82 = { + isa = PBXFileReference; + lastKnownFileType = image.icns; + path = voria.icns; + refType = 4; + sourceTree = ""; + }; + A65E3D3507515F5900A66E82 = { + fileRef = A65E3D3307515F5900A66E82; + isa = PBXBuildFile; + settings = { + }; + }; + A65E3D3607515F5900A66E82 = { + fileRef = A65E3D3407515F5900A66E82; + isa = PBXBuildFile; + settings = { + }; + }; + A65E44BC075161B900A66E82 = { + buildActionMask = 2147483647; + contextName = ""; + files = ( + A65E488507517A2600A66E82, + ); + isSharedContext = 0; + isa = PBXAppleScriptBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + A65E44C807516A5C00A66E82 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = X11Controller.h; + refType = 4; + sourceTree = ""; + }; + A65E44C907516A5C00A66E82 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = X11Controller.m; + refType = 4; + sourceTree = ""; + }; + A65E4880075176F200A66E82 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = SynfigApplication.h; + refType = 4; + sourceTree = ""; + }; + A65E4881075176F200A66E82 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = SynfigApplication.m; + refType = 4; + sourceTree = ""; + }; + A65E488407517A2600A66E82 = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.applescript; + path = events.applescript; + refType = 4; + sourceTree = ""; + }; + A65E488507517A2600A66E82 = { + fileRef = A65E488407517A2600A66E82; + isa = PBXBuildFile; + settings = { + ATTRIBUTES = ( + Debug, + ); + }; + }; + A65E488607517A6900A66E82 = { + isa = PBXFileReference; + lastKnownFileType = wrapper.framework; + name = AppleScriptKit.framework; + path = /System/Library/Frameworks/AppleScriptKit.framework; + refType = 0; + sourceTree = ""; + }; + A65E488707517A6900A66E82 = { + fileRef = A65E488607517A6900A66E82; + isa = PBXBuildFile; + settings = { + }; + }; + A65E488807517AA400A66E82 = { + fileRef = A65E488407517A2600A66E82; + isa = PBXBuildFile; + settings = { + }; + }; + }; + rootObject = 20286C28FDCF999611CA2CEA; +} diff --git a/synfig-osx/launcher/SynfigApplication.h b/synfig-osx/launcher/SynfigApplication.h new file mode 100644 index 0000000..a2dcf10 --- /dev/null +++ b/synfig-osx/launcher/SynfigApplication.h @@ -0,0 +1,16 @@ +// +// SynfigApplication.h +// Synfig Studio +// +// Created by Robert Quattlebaum on Sun Nov 21 2004. +// Copyright (c) 2004 __MyCompanyName__. All rights reserved. +// + +#import +#import "X11Application.h" + +@interface SynfigApplication : X11Application { + +} + +@end diff --git a/synfig-osx/launcher/SynfigApplication.m b/synfig-osx/launcher/SynfigApplication.m new file mode 100644 index 0000000..d5f5f93 --- /dev/null +++ b/synfig-osx/launcher/SynfigApplication.m @@ -0,0 +1,14 @@ +// +// SynfigApplication.m +// Synfig Studio +// +// Created by Robert Quattlebaum on Sun Nov 21 2004. +// Copyright (c) 2004 __MyCompanyName__. All rights reserved. +// + +#import "SynfigApplication.h" + + +@implementation SynfigApplication + +@end diff --git a/synfig-osx/launcher/X11.icns b/synfig-osx/launcher/X11.icns new file mode 100644 index 0000000000000000000000000000000000000000..4c4717726399030db37efe54e4d95f3d746855ec GIT binary patch literal 28104 zcmeHPeQ*?25`Qzu0Buiw!@-dm+zV0`hu!#}*= zz0L0Id%vF7{kr>g_e>_q$^K(5WAm$WvU3M9#vWm8ssCoL@56I)6$@kXi$#ouuQao8 zmBr1zeEO3!=gyr!ckb-RmuE5d>ZwyJzKT5cDq|}ARmpN%A=-Wntki`?$_pwaoP86h zZv}8?DRyXD>@)f*n9ro9eXcrG2qWAIVWp|BRN^7fv%i+A26{+)abZomQi1aY=6co% z?<(nae6FPcOD?Jqy;#Zi!BXO7FSo)S$Zr$a7@JtSV$JI-3-a@e))tmbT+PICe$Lj( zO`HE5V^Rb(cK|-yQGXNBK6Nt2$X#b)xD7etxo?pz>j8*A|<~59Gw)K5A8OH(qR8RE#L=!ZZAUp;QQUZ6XH*U zhA~Hn`T-3%XyE+_$DeBhh7P&M&1tnk2Z+$%O>(HvTZ5zV;}RZ6T!+lrpjm@pE5vB< zVq9k278I!Hm%e3PuwH&>O}lqg!X@}L={opqL7o&BhD=v z^#Qc$y6>FJr|H)AUb?2&U%K+;*M3d+kUIoBj=c5rf2*h2sWqqNs=E9C%Y;XQ&NV7L zQh20@kvAf|h>@K!@_Am(nZ8}kQCZQY$zk8!q%M>_b;8(V2M@g6V>@tgT|8s4mjEw3 zdTcr@VC>F1(As-$EubP^k9oi6)=t+qi2@h;`6>P5D){_8H|>Y`-<_9QUGARSby&<; z)Y!>c-_<7Fhg(jPzq`?nly1@(%UMWO{D5SlgdShlnVkO4m9KsBm3PvMnEbL&uWgrg z-^;65Si0Bcti2xQba_V?GU<40LyOdU48PS}Yj8-{Y6=kTt>gzt;nsSE#V%c3|_Z3aeO;=d1_Gk%@y9 zdx4eVU|}&176Yp+RHXEp-5^z^s){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zrXv6d{zCtu-~V?D{|h8wvH!&W6Z@5MExh~Kdu20e?|Ni@i)X85cx;sACZ4V{y`0h{44Trh_jEl z{t@|CVPk3Qa>!5#gpA?D5|z%V8#SD4QuvmO7V@Apj)^ZR^6FqVP@rqx4S! N5lhj825z|q{s$ZBfJ6WQ literal 0 HcmV?d00001 diff --git a/synfig-osx/launcher/X11Application.h b/synfig-osx/launcher/X11Application.h new file mode 100644 index 0000000..b1636cf --- /dev/null +++ b/synfig-osx/launcher/X11Application.h @@ -0,0 +1,102 @@ +/* X11Application.h -- subclass of NSApplication to multiplex events + $Id: X11Application.h,v 1.26 2003/08/08 19:16:13 jharper Exp $ + + Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. */ + +#ifndef X11APPLICATION_H +#define X11APPLICATION_H 1 + +#if __OBJC__ + +#import +#import "X11Controller.h" + +@interface X11Application : NSApplication { + X11Controller *_controller; + + unsigned int _x_active :1; +} + +- (void) set_controller:controller; +- (void) set_window_menu:(NSArray *)list; + +- (int) prefs_get_integer:(NSString *)key default:(int)def; +- (const char *) prefs_get_string:(NSString *)key default:(const char *)def; +- (float) prefs_get_float:(NSString *)key default:(float)def; +- (int) prefs_get_boolean:(NSString *)key default:(int)def; +- (NSArray *) prefs_get_array:(NSString *)key; +- (void) prefs_set_integer:(NSString *)key value:(int)value; +- (void) prefs_set_float:(NSString *)key value:(float)value; +- (void) prefs_set_boolean:(NSString *)key value:(int)value; +- (void) prefs_set_array:(NSString *)key value:(NSArray *)value; +- (void) prefs_set_string:(NSString *)key value:(NSString *)value; +- (void) prefs_synchronize; + +- (BOOL) x_active; + +@end + +extern X11Application *X11App; + +#endif /* __OBJC__ */ + +extern void X11ApplicationSetWindowMenu (int nitems, const char **items, + const char *shortcuts); +extern void X11ApplicationSetWindowMenuCheck (int idx); +extern void X11ApplicationSetFrontProcess (void); +extern void X11ApplicationSetCanQuit (int state); +extern void X11ApplicationServerReady (void); +extern void X11ApplicationShowHideMenubar (int state); + +extern void X11ApplicationMain (int argc, const char *argv[], + void (*server_thread) (void *), + void *server_arg); + +extern int X11EnableKeyEquivalents; + +#define APP_PREFS "com.apple.x11" + +#define PREFS_APPSMENU "apps_menu" +#define PREFS_FAKEBUTTONS "enable_fake_buttons" +#define PREFS_SYSBEEP "enable_system_beep" +#define PREFS_KEYEQUIVS "enable_key_equivalents" +#define PREFS_KEYMAP_FILE "keymap_file" +#define PREFS_SYNC_KEYMAP "sync_keymap" +#define PREFS_DEPTH "depth" +#define PREFS_NO_AUTH "no_auth" +#define PREFS_NO_TCP "nolisten_tcp" +#define PREFS_DONE_XINIT_CHECK "done_xinit_check" +#define PREFS_NO_QUIT_ALERT "no_quit_alert" +#define PREFS_FAKE_BUTTON2 "fake_button2" +#define PREFS_FAKE_BUTTON3 "fake_button3" +#define PREFS_ROOTLESS "rootless" +#define PREFS_FULLSCREEN_HOTKEYS "fullscreen_hotkeys" +#define PREFS_SWAP_ALT_META "swap_alt_meta" +#define PREFS_XP_OPTIONS "xp_options" + +#endif /* X11APPLICATION_H */ diff --git a/synfig-osx/launcher/X11Application.m b/synfig-osx/launcher/X11Application.m new file mode 100644 index 0000000..094e064 --- /dev/null +++ b/synfig-osx/launcher/X11Application.m @@ -0,0 +1,1085 @@ +/* X11Application.m -- subclass of NSApplication to multiplex events + $Id: X11Application.m,v 1.53 2003/09/13 02:00:46 jharper Exp $ + + Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. */ + +#import "X11Application.h" +#include + +/* ouch! */ +#define BOOL X_BOOL +# include "Xproto.h" +#define WindowPtr X_WindowPtr +#define Cursor X_Cursor +# include "quartz.h" +# define _APPLEWM_SERVER_ +# include "applewm.h" +# include "X.h" +#undef Cursor +#undef WindowPtr +#undef BOOL + +#include "xf86Version.h" + +#include +#include +#include + +#define DEFAULTS_FILE "/etc/X11/xserver/Xquartz.plist" + +int X11EnableKeyEquivalents = TRUE; + +X11Application *X11App; + +#define ALL_KEY_MASKS (NSShiftKeyMask | NSControlKeyMask \ + | NSAlternateKeyMask | NSCommandKeyMask) + +@implementation X11Application + +typedef struct message_struct message; +struct message_struct { + mach_msg_header_t hdr; + SEL selector; + NSObject *arg; +}; + +static mach_port_t _port; + +static void send_nsevent (NSEventType type, NSEvent *e); + +/* avoid header conflict hell */ +extern int RootlessKnowsWindowNumber (int number); +extern void DarwinEnqueueEvent (const xEvent *e); + +static void +init_ports (void) +{ + kern_return_t r; + NSPort *p; + + if (_port != MACH_PORT_NULL) + return; + + r = mach_port_allocate (mach_task_self (), MACH_PORT_RIGHT_RECEIVE, &_port); + if (r != KERN_SUCCESS) + return; + + p = [NSMachPort portWithMachPort:_port]; + [p setDelegate:NSApp]; + [p scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; +} + +static void +message_kit_thread (SEL selector, NSObject *arg) +{ + message msg; + kern_return_t r; + + msg.hdr.msgh_bits = MACH_MSGH_BITS (MACH_MSG_TYPE_MAKE_SEND, 0); + msg.hdr.msgh_size = sizeof (msg); + msg.hdr.msgh_remote_port = _port; + msg.hdr.msgh_local_port = MACH_PORT_NULL; + msg.hdr.msgh_reserved = 0; + msg.hdr.msgh_id = 0; + + msg.selector = selector; + msg.arg = [arg retain]; + + r = mach_msg (&msg.hdr, MACH_SEND_MSG, msg.hdr.msgh_size, + 0, MACH_PORT_NULL, 0, MACH_PORT_NULL); + if (r != KERN_SUCCESS) + fprintf (stderr, "%s: mach_msg failed: %x\n", __FUNCTION__, r); +} + +- (void) handleMachMessage:(void *)_msg +{ + message *msg = _msg; + + [self performSelector:msg->selector withObject:msg->arg]; + [msg->arg release]; +} + +- (void) set_controller:obj +{ + if (_controller == nil) + _controller = [obj retain]; +} + +- (void) dealloc +{ + if (_controller != nil) + [_controller release]; + + if (_port != MACH_PORT_NULL) + mach_port_deallocate (mach_task_self (), _port); + + [super dealloc]; +} + +- (void) orderFrontStandardAboutPanel: (id) sender +{ + NSMutableDictionary *dict; + NSDictionary *infoDict; + NSString *tem; + + dict = [NSMutableDictionary dictionaryWithCapacity:2]; + infoDict = [[NSBundle mainBundle] infoDictionary]; + + [dict setObject: NSLocalizedString (@"The X Window System", @"About panel") + forKey:@"ApplicationName"]; + + tem = [infoDict objectForKey:@"CFBundleShortVersionString"]; + + [dict setObject:[NSString stringWithFormat:@"X11 %@ - XFree86 %d.%d.%d", + tem, XF86_VERSION_MAJOR, XF86_VERSION_MINOR, + XF86_VERSION_PATCH] forKey:@"ApplicationVersion"]; + + [self orderFrontStandardAboutPanelWithOptions: dict]; +} + +- (void) activateX:(BOOL)state +{ + /* Create a TSM document that supports full Unicode input, and + have it activated while X is active (unless using the old + keymapping files) */ + static TSMDocumentID x11_document; + + if (state) + { + QuartzMessageMainThread (kXquartzActivate, 0); + + if (!_x_active) + { + if (x11_document == 0 && darwinKeymapFile == NULL) + { + OSType types[1]; + types[0] = kUnicodeDocument; + NewTSMDocument (1, types, &x11_document, 0); + } + + if (x11_document != 0) + ActivateTSMDocument (x11_document); + } + } + else + { + QuartzMessageMainThread (kXquartzDeactivate, 0); + + if (_x_active) + { + if (x11_document != 0) + DeactivateTSMDocument (x11_document); + } + } + + _x_active = state; +} + +- (void) became_key:(NSWindow *)win +{ + [self activateX:NO]; +} + +- (void) sendEvent:(NSEvent *)e +{ + NSEventType type; + BOOL for_appkit, for_x; + + type = [e type]; + + /* By default pass down the responder chain and to X. */ + for_appkit = YES; + for_x = YES; + + switch (type) + { + case NSLeftMouseDown: case NSRightMouseDown: case NSOtherMouseDown: + case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp: + if ([e window] != nil) + { + /* Pointer event has a window. Probably something for the kit. */ + + for_x = NO; + + if (_x_active) + [self activateX:NO]; + } + else if ([self modalWindow] == nil) + { + /* Must be an X window. Tell appkit it doesn't have focus. */ + + for_appkit = NO; + + if ([self isActive]) + { + [self deactivate]; + + if (!_x_active && RootlessKnowsWindowNumber ([e windowNumber])) + [self activateX:YES]; + } + } + break; + + case NSKeyDown: case NSKeyUp: + if (_x_active) + { + static int swallow_up; + + /* No kit window is focused, so send it to X. */ + + for_appkit = NO; + + if (type == NSKeyDown) + { + /* Before that though, see if there are any global + shortcuts bound to it. */ + + if (X11EnableKeyEquivalents + && [[self mainMenu] performKeyEquivalent:e]) + { + swallow_up = [e keyCode]; + for_x = NO; + } + else if (!quartzEnableRootless + && ([e modifierFlags] & ALL_KEY_MASKS) + == (NSCommandKeyMask | NSAlternateKeyMask) + && ([e keyCode] == 0 /*a*/ + || [e keyCode] == 53 /*Esc*/)) + { + swallow_up = 0; + for_x = NO; + QuartzMessageMainThread (kXquartzToggleFullscreen, 0); + } + } + else + { + /* If we saw a key equivalent on the down, don't pass + the up through to X. */ + + if (swallow_up != 0 && [e keyCode] == swallow_up) + { + swallow_up = 0; + for_x = NO; + } + } + } + else + { + for_x = NO; + } + break; + + case NSFlagsChanged: + /* For the l33t X users who remap modifier keys to normal keysyms. */ + if (!_x_active) + for_x = NO; + break; + + case NSAppKitDefined: + switch ([e subtype]) + { + case NSApplicationActivatedEventType: + for_x = NO; + if ([self modalWindow] == nil) + { + for_appkit = NO; + + /* FIXME: hack to avoid having to pass the event to appkit, + which would cause it to raise one of its windows. */ + _appFlags._active = YES; + + [self activateX:YES]; + } + break; + + case 18: /* ApplicationDidReactivate */ + if (quartzHasRoot) + for_appkit = NO; + break; + + case NSApplicationDeactivatedEventType: + for_x = NO; + [self activateX:NO]; + break; + } + break; + + default: break; /* for gcc */ + } + + if (for_appkit) + { + [super sendEvent:e]; + } + + if (for_x) + { + send_nsevent (type, e); + } +} + +- (void) set_window_menu:(NSArray *)list +{ + [_controller set_window_menu:list]; +} + +- (void) set_window_menu_check:(NSNumber *)n +{ + [_controller set_window_menu_check:n]; +} + +- (void) set_apps_menu:(NSArray *)list +{ + [_controller set_apps_menu:list]; +} + +- (void) set_front_process:unused +{ + [NSApp activateIgnoringOtherApps:YES]; + + if ([self modalWindow] == nil) + [self activateX:YES]; +} + +- (void) set_can_quit:(NSNumber *)state +{ + [_controller set_can_quit:[state boolValue]]; +} + +- (void) server_ready:unused +{ + [_controller server_ready]; +} + +- (void) show_hide_menubar:(NSNumber *)state +{ + if ([state boolValue]) + ShowMenuBar (); + else + HideMenuBar (); +} + + +/* user preferences */ + +/* Note that these functions only work for arrays whose elements + can be toll-free-bridged between NS and CF worlds. */ + +static const void *cfretain (CFAllocatorRef a, const void *b) { + return CFRetain (b); +} +static void cfrelease (CFAllocatorRef a, const void *b) { + CFRelease (b); +} +static CFMutableArrayRef +nsarray_to_cfarray (NSArray *in) +{ + CFMutableArrayRef out; + CFArrayCallBacks cb; + NSObject *ns; + const CFTypeRef *cf; + int i, count; + + memset (&cb, 0, sizeof (cb)); + cb.version = 0; + cb.retain = cfretain; + cb.release = cfrelease; + + count = [in count]; + out = CFArrayCreateMutable (NULL, count, &cb); + + for (i = 0; i < count; i++) + { + ns = [in objectAtIndex:i]; + + if ([ns isKindOfClass:[NSArray class]]) + cf = (CFTypeRef) nsarray_to_cfarray ((NSArray *) ns); + else + cf = CFRetain ((CFTypeRef) ns); + + CFArrayAppendValue (out, cf); + CFRelease (cf); + } + + return out; +} +static NSMutableArray * +cfarray_to_nsarray (CFArrayRef in) +{ + NSMutableArray *out; + const CFTypeRef *cf; + NSObject *ns; + int i, count; + + count = CFArrayGetCount (in); + out = [[NSMutableArray alloc] initWithCapacity:count]; + + for (i = 0; i < count; i++) + { + cf = CFArrayGetValueAtIndex (in, i); + + if (CFGetTypeID (cf) == CFArrayGetTypeID ()) + ns = cfarray_to_nsarray ((CFArrayRef) cf); + else + ns = [(id)cf retain]; + + [out addObject:ns]; + [ns release]; + } + + return out; +} + +- (CFPropertyListRef) prefs_get:(NSString *)key +{ + CFPropertyListRef value; + + value = CFPreferencesCopyAppValue ((CFStringRef) key, CFSTR (APP_PREFS)); + + if (value == NULL) + { + static CFDictionaryRef defaults; + + if (defaults == NULL) + { + CFStringRef error = NULL; + CFDataRef data; + CFURLRef url; + SInt32 error_code; + + url = (CFURLCreateFromFileSystemRepresentation + (NULL, DEFAULTS_FILE, strlen (DEFAULTS_FILE), false)); + if (CFURLCreateDataAndPropertiesFromResource (NULL, url, &data, + NULL, NULL, + &error_code)) + { + defaults = (CFPropertyListCreateFromXMLData + (NULL, data, kCFPropertyListImmutable, &error)); + if (error != NULL) + CFRelease (error); + CFRelease (data); + } + CFRelease (url); + } + + if (defaults != NULL) + value = CFDictionaryGetValue (defaults, key); + + if (value != NULL) + CFRetain (value); + } + + return value; +} + +- (int) prefs_get_integer:(NSString *)key default:(int)def +{ + CFPropertyListRef value; + int ret; + + value = [self prefs_get:key]; + + if (value != NULL && CFGetTypeID (value) == CFNumberGetTypeID ()) + CFNumberGetValue (value, kCFNumberIntType, &ret); + else if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ()) + ret = CFStringGetIntValue (value); + else + ret = def; + + if (value != NULL) + CFRelease (value); + + return ret; +} + +- (const char *) prefs_get_string:(NSString *)key default:(const char *)def +{ + CFPropertyListRef value; + const char *ret = NULL; + + value = [self prefs_get:key]; + + if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ()) + { + NSString *s = (NSString *) value; + + ret = [s UTF8String]; + } + + if (value != NULL) + CFRelease (value); + + return ret != NULL ? ret : def; +} + +- (float) prefs_get_float:(NSString *)key default:(float)def +{ + CFPropertyListRef value; + float ret = def; + + value = [self prefs_get:key]; + + if (value != NULL + && CFGetTypeID (value) == CFNumberGetTypeID () + && CFNumberIsFloatType (value)) + { + CFNumberGetValue (value, kCFNumberFloatType, &ret); + } + else if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ()) + { + ret = CFStringGetDoubleValue (value); + } + + if (value != NULL) + CFRelease (value); + + return ret; +} + +- (int) prefs_get_boolean:(NSString *)key default:(int)def +{ + CFPropertyListRef value; + int ret = def; + + value = [self prefs_get:key]; + + if (value != NULL) + { + if (CFGetTypeID (value) == CFNumberGetTypeID ()) + CFNumberGetValue (value, kCFNumberIntType, &ret); + else if (CFGetTypeID (value) == CFBooleanGetTypeID ()) + ret = CFBooleanGetValue (value); + else if (CFGetTypeID (value) == CFStringGetTypeID ()) + { + const char *tem = [(NSString *) value lossyCString]; + if (strcasecmp (tem, "true") == 0 || strcasecmp (tem, "yes") == 0) + ret = YES; + else + ret = NO; + } + + CFRelease (value); + } + + return ret; +} + +- (NSArray *) prefs_get_array:(NSString *)key +{ + NSArray *ret = nil; + CFPropertyListRef value; + + value = [self prefs_get:key]; + + if (value != NULL) + { + if (CFGetTypeID (value) == CFArrayGetTypeID ()) + ret = [cfarray_to_nsarray (value) autorelease]; + + CFRelease (value); + } + + return ret; +} + +- (void) prefs_set_integer:(NSString *)key value:(int)value +{ + CFNumberRef x; + + x = CFNumberCreate (NULL, kCFNumberIntType, &value); + + CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) x, CFSTR (APP_PREFS), + kCFPreferencesCurrentUser, kCFPreferencesAnyHost); + + CFRelease (x); +} + +- (void) prefs_set_float:(NSString *)key value:(float)value +{ + CFNumberRef x; + + x = CFNumberCreate (NULL, kCFNumberFloatType, &value); + + CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) x, CFSTR (APP_PREFS), + kCFPreferencesCurrentUser, kCFPreferencesAnyHost); + + CFRelease (x); +} + +- (void) prefs_set_boolean:(NSString *)key value:(int)value +{ + CFPreferencesSetValue ((CFStringRef) key, + (CFTypeRef) value ? kCFBooleanTrue + : kCFBooleanFalse, CFSTR (APP_PREFS), + kCFPreferencesCurrentUser, kCFPreferencesAnyHost); + +} + +- (void) prefs_set_array:(NSString *)key value:(NSArray *)value +{ + CFArrayRef cfarray; + + cfarray = nsarray_to_cfarray (value); + CFPreferencesSetValue ((CFStringRef) key, + (CFTypeRef) cfarray, + CFSTR (APP_PREFS), + kCFPreferencesCurrentUser, kCFPreferencesAnyHost); + CFRelease (cfarray); +} + +- (void) prefs_set_string:(NSString *)key value:(NSString *)value +{ + CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) value, + CFSTR (APP_PREFS), kCFPreferencesCurrentUser, + kCFPreferencesAnyHost); +} + +- (void) prefs_synchronize +{ + CFPreferencesAppSynchronize (kCFPreferencesCurrentApplication); +} + +- (void) read_defaults +{ + extern int darwinFakeButtons; + const char *tem; + + quartzUseSysBeep = [self prefs_get_boolean:@PREFS_SYSBEEP + default:quartzUseSysBeep]; + quartzEnableRootless = [self prefs_get_boolean:@PREFS_ROOTLESS + default:quartzEnableRootless]; + quartzFullscreenDisableHotkeys = ![self prefs_get_boolean: + @PREFS_FULLSCREEN_HOTKEYS default: + !quartzFullscreenDisableHotkeys]; + quartzXpluginOptions = [self prefs_get_integer:@PREFS_XP_OPTIONS + default:quartzXpluginOptions]; + + darwinSwapAltMeta = [self prefs_get_boolean:@PREFS_SWAP_ALT_META + default:darwinSwapAltMeta]; + darwinFakeButtons = [self prefs_get_boolean:@PREFS_FAKEBUTTONS + default:darwinFakeButtons]; + if (darwinFakeButtons) + { + const char *fake2, *fake3; + + fake2 = [self prefs_get_string:@PREFS_FAKE_BUTTON2 default:NULL]; + fake3 = [self prefs_get_string:@PREFS_FAKE_BUTTON3 default:NULL]; + + DarwinSetFakeButtons (fake2, fake3); + } + + X11EnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS + default:X11EnableKeyEquivalents]; + + darwinSyncKeymap = [self prefs_get_boolean:@PREFS_SYNC_KEYMAP + default:darwinSyncKeymap]; + + tem = [self prefs_get_string:@PREFS_KEYMAP_FILE default:NULL]; + if (tem != NULL) + darwinKeymapFile = strdup (tem); + + quartzDesiredDepth = [self prefs_get_integer:@PREFS_DEPTH + default:quartzDesiredDepth]; +} + +/* This will end up at the end of the responder chain. */ +- (void) copy:sender +{ + QuartzMessageMainThread (kXquartzPasteboardNotify, 1, + AppleWMCopyToPasteboard); +} + +- (BOOL) x_active +{ + return _x_active; +} + +@end + +static NSArray * +array_with_strings_and_numbers (int nitems, const char **items, + const char *numbers) +{ + NSMutableArray *array, *subarray; + NSString *string; + NSString *number; + int i; + + /* (Can't autorelease on the X server thread) */ + + array = [[NSMutableArray alloc] initWithCapacity:nitems]; + + for (i = 0; i < nitems; i++) + { + subarray = [[NSMutableArray alloc] initWithCapacity:2]; + + string = [[NSString alloc] initWithUTF8String:items[i]]; + [subarray addObject:string]; + [string release]; + + if (numbers[i] != 0) + { + number = [[NSString alloc] initWithFormat:@"%d", numbers[i]]; + [subarray addObject:number]; + [number release]; + } + else + [subarray addObject:@""]; + + [array addObject:subarray]; + [subarray release]; + } + + return array; +} + +void +X11ApplicationSetWindowMenu (int nitems, const char **items, + const char *shortcuts) +{ + NSArray *array; + + array = array_with_strings_and_numbers (nitems, items, shortcuts); + + /* Send the array of strings over to the appkit thread */ + + message_kit_thread (@selector (set_window_menu:), array); + [array release]; +} + +void +X11ApplicationSetWindowMenuCheck (int idx) +{ + NSNumber *n; + + n = [[NSNumber alloc] initWithInt:idx]; + + message_kit_thread (@selector (set_window_menu_check:), n); + + [n release]; +} + +void +X11ApplicationSetFrontProcess (void) +{ + message_kit_thread (@selector (set_front_process:), nil); +} + +void +X11ApplicationSetCanQuit (int state) +{ + NSNumber *n; + + n = [[NSNumber alloc] initWithBool:state]; + + message_kit_thread (@selector (set_can_quit:), n); + + [n release]; +} + +void +X11ApplicationServerReady (void) +{ + message_kit_thread (@selector (server_ready:), nil); +} + +void +X11ApplicationShowHideMenubar (int state) +{ + NSNumber *n; + + n = [[NSNumber alloc] initWithBool:state]; + + message_kit_thread (@selector (show_hide_menubar:), n); + + [n release]; +} + +static void * +create_thread (void *func, void *arg) +{ + pthread_attr_t attr; + pthread_t tid; + + pthread_attr_init (&attr); + + pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM); + pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); + + pthread_create (&tid, &attr, func, arg); + + pthread_attr_destroy (&attr); + + return (void *) tid; +} + +static void +check_xinitrc (void) +{ + char *tem, buf[1024]; + NSString *msg; + + if ([X11App prefs_get_boolean:@PREFS_DONE_XINIT_CHECK default:NO]) + return; + + tem = getenv ("HOME"); + if (tem == NULL) + goto done; + + snprintf (buf, sizeof (buf), "%s/.xinitrc", tem); + if (access (buf, F_OK) != 0) + goto done; + + /* FIXME: put localized strings into Resources/English.lproj */ + + msg = NSLocalizedString ( +@"You have an existing ~/.xinitrc file.\n\n\ +Windows displayed by X11 applications may not have titlebars, or may look \ +different to windows displayed by native applications.\n\n\ +Would you like to move aside the existing file and use the standard X11 \ +environment?", @""); + + if (NSRunAlertPanel (nil, msg, NSLocalizedString (@"Yes", @""), + NSLocalizedString (@"No", @""), nil) + == NSAlertDefaultReturn) + { + char buf2[1024]; + int i = -1; + + snprintf (buf2, sizeof (buf2), "%s.old", buf); + + for (i = 1; access (buf2, F_OK) == 0; i++) + snprintf (buf2, sizeof (buf2), "%s.old.%d", buf, i); + + rename (buf, buf2); + } + +done: + [X11App prefs_set_boolean:@PREFS_DONE_XINIT_CHECK value:YES]; + [X11App prefs_synchronize]; +} + +void +X11ApplicationMain (int argc, const char *argv[], + void (*server_thread) (void *), void *server_arg) +{ + NSAutoreleasePool *pool; + +#ifdef DEBUG + while (access ("/tmp/x11-block", F_OK) == 0) + sleep (1); +#endif + + pool = [[NSAutoreleasePool alloc] init]; + + X11App = (X11Application *) [X11Application sharedApplication]; + + init_ports (); + + [NSApp read_defaults]; + + [NSBundle loadNibNamed:@"main" owner:NSApp]; + + [[NSNotificationCenter defaultCenter] addObserver:NSApp + selector:@selector (became_key:) + name:NSWindowDidBecomeKeyNotification object:nil]; + + check_xinitrc (); + + if (!create_thread (server_thread, server_arg)) + { + fprintf (stderr, "can't create secondary thread\n"); + exit (1); + } + + [NSApp run]; + + /* not reached */ +} + + +/* event conversion */ + +static inline unsigned short +convert_flags (unsigned int nsflags) +{ + unsigned int xflags; + + if (nsflags == ~0) + return 0xffff; + + xflags = 0; + + if (nsflags & NSAlphaShiftKeyMask) + xflags |= LockMask; + if (nsflags & NSShiftKeyMask) + xflags |= ShiftMask; + if (nsflags & NSControlKeyMask) + xflags |= ControlMask; + if (nsflags & NSAlternateKeyMask) + xflags |= Mod1Mask; + if (nsflags & NSCommandKeyMask) + xflags |= Mod2Mask; + /* FIXME: secondaryfn? */ + + return xflags; +} + +static void +send_nsevent (NSEventType type, NSEvent *e) +{ + static unsigned int button_state = 0; + + xEvent xe; + + memset (&xe, 0, sizeof (xe)); + + switch (type) + { + NSRect screen; + NSPoint location; + NSWindow *window; + int pointer_x, pointer_y, count; + + case NSLeftMouseDown: + xe.u.u.type = ButtonPress; + xe.u.u.detail = 1; + goto do_press_event; + + case NSRightMouseDown: + xe.u.u.type = ButtonPress; + xe.u.u.detail = 3; + goto do_press_event; + + case NSOtherMouseDown: + xe.u.u.type = ButtonPress; + xe.u.u.detail = 2; /* FIXME? */ + goto do_press_event; + + do_press_event: + if (RootlessKnowsWindowNumber ([e windowNumber]) == NULL) + { + /* X server doesn't grok this window, drop the event. + + Note: theoretically this isn't necessary, but if I click + on the menubar, we get sent a LeftMouseDown when the + release happens, but no LeftMouseUp is ever seen! */ + + break; + } + goto do_event; + + case NSLeftMouseUp: + xe.u.u.type = ButtonRelease; + xe.u.u.detail = 1; + goto do_release_event; + + case NSRightMouseUp: + xe.u.u.type = ButtonRelease; + xe.u.u.detail = 3; + goto do_release_event; + + case NSOtherMouseUp: + xe.u.u.type = ButtonRelease; + xe.u.u.detail = 2; /* FIXME? */ + goto do_release_event; + + do_release_event: + if ((button_state & (1 << xe.u.u.detail)) == 0) + { + /* X didn't see the button press for this release, so skip it */ + break; + } + goto do_event; + + case NSMouseMoved: + case NSLeftMouseDragged: + case NSRightMouseDragged: + case NSOtherMouseDragged: + /* convert location to global top-left coordinates */ + + location = [e locationInWindow]; + window = [e window]; + screen = [[[NSScreen screens] objectAtIndex:0] frame]; + + if (window != nil) + { + NSRect frame = [window frame]; + pointer_x = location.x + frame.origin.x; + pointer_y = (((screen.origin.y + screen.size.height) + - location.y) - frame.origin.y); + } + else + { + pointer_x = location.x; + pointer_y = (screen.origin.y + screen.size.height) - location.y; + } + + xe.u.keyButtonPointer.rootX = pointer_x; + xe.u.keyButtonPointer.rootY = pointer_y; + xe.u.u.type = MotionNotify; + goto do_event; + + case NSKeyDown: + xe.u.u.type = KeyPress; + xe.u.u.detail = [e keyCode]; + goto do_event; + + case NSKeyUp: + xe.u.u.type = KeyRelease; + xe.u.u.detail = [e keyCode]; + goto do_event; + + case NSScrollWheel: + xe.u.keyButtonPointer.state = convert_flags ([e modifierFlags]); + count = [e deltaY]; + xe.u.u.detail = count > 0 ? 4 : 5; + for (count = abs (count); count-- > 0;) + { + xe.u.u.type = ButtonPress; + DarwinEnqueueEvent (&xe); + xe.u.u.type = ButtonRelease; + DarwinEnqueueEvent (&xe); + } + xe.u.u.type = 0; + break; + + case NSFlagsChanged: + do_event: + xe.u.keyButtonPointer.state = convert_flags ([e modifierFlags]); + DarwinEnqueueEvent (&xe); + break; + + default: break; /* for gcc */ + } + + if (xe.u.u.type == ButtonPress) + button_state |= (1 << xe.u.u.detail); + else if (xe.u.u.type == ButtonRelease) + button_state &= ~(1 << xe.u.u.detail); +} diff --git a/synfig-osx/launcher/X11Controller.h b/synfig-osx/launcher/X11Controller.h new file mode 100644 index 0000000..d8dbbd0 --- /dev/null +++ b/synfig-osx/launcher/X11Controller.h @@ -0,0 +1,86 @@ +/* X11Controller.h -- connect the IB ui + $Id: X11Controller.h,v 1.21 2003/07/24 17:52:29 jharper Exp $ + + Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. */ + +#ifndef X11CONTROLLER_H +#define X11CONTROLLER_H 1 + +#if __OBJC__ + +#import +#include "x-list.h" + +@interface X11Controller : NSObject +{ + NSPanel *prefs_panel; + + NSButton *fake_buttons; + NSButton *enable_fullscreen; + NSButton *use_sysbeep; + NSButton *enable_keyequivs; + NSButton *sync_keymap; + NSButton *enable_auth; + NSButton *enable_tcp; + NSPopUpButton *depth; + + NSMenuItem *x11_about_item; + NSMenuItem *window_separator; + NSMenuItem *dock_window_separator; + NSMenuItem *apps_separator; + NSMenuItem *toggle_fullscreen_item; + NSMenu *dock_apps_menu; + NSTableView *apps_table; + + NSArray *apps; + NSMutableArray *table_apps; + + NSMenu *dock_menu; + + int checked_window_item; + x_list *pending_apps; + + BOOL finished_launching; + BOOL can_quit; +} + +- (void) set_window_menu:(NSArray *)list; +- (void) set_window_menu_check:(NSNumber *)n; +- (void) set_apps_menu:(NSArray *)list; +- (void) set_can_quit:(BOOL)state; +- (void) server_ready; + +@end + +#endif /* __OBJC__ */ + +extern void X11ControllerMain (int argc, const char *argv[], + void (*server_thread) (void *), + void *server_arg); + +#endif /* X11CONTROLLER_H */ diff --git a/synfig-osx/launcher/X11Controller.m b/synfig-osx/launcher/X11Controller.m new file mode 100644 index 0000000..c103804 --- /dev/null +++ b/synfig-osx/launcher/X11Controller.m @@ -0,0 +1,690 @@ +/* X11Controller.m -- connect the IB ui, also the NSApp delegate + $Id: X11Controller.m,v 1.36 2003/07/24 17:52:29 jharper Exp $ + + Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. */ +#define __DARWIN__ + +#import "X11Controller.h" +#import "X11Application.h" +#import + + +/* ouch! */ +#define BOOL X_BOOL +# include "Xproto.h" +#define WindowPtr X_WindowPtr +#define Cursor X_Cursor +# include "quartz.h" +# define _APPLEWM_SERVER_ +# include "applewm.h" +# include "X.h" +#undef Cursor +#undef WindowPtr +#undef BOOL + +#include +#include + +#define TRACE() fprintf (stderr, "%s\n", __FUNCTION__) + +@implementation X11Controller + +- (void) awakeFromNib +{ + X11Application *xapp = NSApp; + NSArray *array; + + /* Point X11Application at ourself. */ + [xapp set_controller:self]; +#if 0 + array = [xapp prefs_get_array:@PREFS_APPSMENU]; + if (array != nil) + { + int count; + + /* convert from [TITLE1 COMMAND1 TITLE2 COMMAND2 ...] + to [[TITLE1 COMMAND1] [TITLE2 COMMAND2] ...] format. */ + + count = [array count]; + if (count > 0 + && ![[array objectAtIndex:0] isKindOfClass:[NSArray class]]) + { + int i; + NSMutableArray *copy, *sub; + + copy = [NSMutableArray arrayWithCapacity:(count / 2)]; + + for (i = 0; i < count / 2; i++) + { + sub = [[NSMutableArray alloc] initWithCapacity:3]; + [sub addObject:[array objectAtIndex:i*2]]; + [sub addObject:[array objectAtIndex:i*2+1]]; + [sub addObject:@""]; + [copy addObject:sub]; + [sub release]; + } + + array = copy; + } + + [self set_apps_menu:array]; + } + #endif +} + +- (void) item_selected:sender +{ + [NSApp activateIgnoringOtherApps:YES]; + + QuartzMessageMainThread (kXquartzControllerNotify, 2, + AppleWMWindowMenuItem, [sender tag]); +} + +- (void) remove_window_menu +{ + NSMenu *menu; + int first, count, i; + + /* Work backwards so we don't mess up the indices */ + menu = [window_separator menu]; + first = [menu indexOfItem:window_separator] + 1; + count = [menu numberOfItems]; + for (i = count - 1; i >= first; i--) + [menu removeItemAtIndex:i]; + + menu = [dock_window_separator menu]; + count = [menu indexOfItem:dock_window_separator]; + for (i = 0; i < count; i++) + [dock_menu removeItemAtIndex:0]; +} + +- (void) install_window_menu:(NSArray *)list +{ + NSMenu *menu; + NSMenuItem *item; + int first, count, i; + + menu = [window_separator menu]; + first = [menu indexOfItem:window_separator] + 1; + count = [list count]; + + for (i = 0; i < count; i++) + { + NSString *name, *shortcut; + + name = [[list objectAtIndex:i] objectAtIndex:0]; + shortcut = [[list objectAtIndex:i] objectAtIndex:1]; + + item = (NSMenuItem *) [menu addItemWithTitle:name action:@selector + (item_selected:) keyEquivalent:shortcut]; + [item setTarget:self]; + [item setTag:i]; + [item setEnabled:YES]; + + item = (NSMenuItem *) [dock_menu insertItemWithTitle:name + action:@selector + (item_selected:) keyEquivalent:shortcut + atIndex:i]; + [item setTarget:self]; + [item setTag:i]; + [item setEnabled:YES]; + } + + if (checked_window_item >= 0 && checked_window_item < count) + { + item = (NSMenuItem *) [menu itemAtIndex:first + checked_window_item]; + [item setState:NSOnState]; + item = (NSMenuItem *) [dock_menu itemAtIndex:checked_window_item]; + [item setState:NSOnState]; + } +} + +- (void) remove_apps_menu +{ + NSMenu *menu; + NSMenuItem *item; + int i; + + if (apps == nil || apps_separator == nil) + return; + + menu = [apps_separator menu]; + + if (menu != nil) + { + for (i = [menu numberOfItems] - 1; i >= 0; i--) + { + item = (NSMenuItem *) [menu itemAtIndex:i]; + if ([item tag] != 0) + [menu removeItemAtIndex:i]; + } + } + + if (dock_apps_menu != nil) + { + for (i = [dock_apps_menu numberOfItems] - 1; i >= 0; i--) + { + item = (NSMenuItem *) [dock_apps_menu itemAtIndex:i]; + if ([item tag] != 0) + [dock_apps_menu removeItemAtIndex:i]; + } + } + + [apps release]; + apps = nil; +} + +- (void) prepend_apps_item:(NSArray *)list index:(int)i menu:(NSMenu *)menu +{ + NSString *title, *shortcut = @""; + NSArray *group; + NSMenuItem *item; + + group = [list objectAtIndex:i]; + title = [group objectAtIndex:0]; + if ([group count] >= 3) + shortcut = [group objectAtIndex:2]; + + if ([title length] != 0) + { + item = (NSMenuItem *) [menu insertItemWithTitle:title + action:@selector (app_selected:) + keyEquivalent:shortcut atIndex:0]; + [item setTarget:self]; + [item setEnabled:YES]; + } + else + { + item = (NSMenuItem *) [NSMenuItem separatorItem]; + [menu insertItem:item atIndex:0]; + } + + [item setTag:i+1]; /* can't be zero, so add one */ +} + +- (void) install_apps_menu:(NSArray *)list +{ + NSMenu *menu; + int i, count; + + count = [list count]; + + if (count == 0 || apps_separator == nil) + return; + + menu = [apps_separator menu]; + + for (i = count - 1; i >= 0; i--) + { + if (menu != nil) + [self prepend_apps_item:list index:i menu:menu]; + if (dock_apps_menu != nil) + [self prepend_apps_item:list index:i menu:dock_apps_menu]; + } + + apps = [list retain]; +} + +- (void) set_window_menu:(NSArray *)list +{ + [self remove_window_menu]; + [self install_window_menu:list]; + + QuartzMessageMainThread (kXquartzControllerNotify, 1, + AppleWMWindowMenuNotify); +} + +- (void) set_window_menu_check:(NSNumber *)nn +{ + NSMenu *menu; + NSMenuItem *item; + int first, count; + int n = [nn intValue]; + + menu = [window_separator menu]; + first = [menu indexOfItem:window_separator] + 1; + count = [menu numberOfItems] - first; + + if (checked_window_item >= 0 && checked_window_item < count) + { + item = (NSMenuItem *) [menu itemAtIndex:first + checked_window_item]; + [item setState:NSOffState]; + item = (NSMenuItem *) [dock_menu itemAtIndex:checked_window_item]; + [item setState:NSOffState]; + } + if (n >= 0 && n < count) + { + item = (NSMenuItem *) [menu itemAtIndex:first + n]; + [item setState:NSOnState]; + item = (NSMenuItem *) [dock_menu itemAtIndex:n]; + [item setState:NSOnState]; + } + checked_window_item = n; +} + +- (void) set_apps_menu:(NSArray *)list +{ + [self remove_apps_menu]; + [self install_apps_menu:list]; +} + +- (void) launch_client:(NSString *)command +{ + QuartzRunClient ([command cString]); +} + +- (void) app_selected:sender +{ + int tag; + NSString *item; + + tag = [sender tag] - 1; + if (apps == nil || tag < 0 || tag >= [apps count]) + return; + + item = [[apps objectAtIndex:tag] objectAtIndex:1]; + + [self launch_client:item]; +} + +- (IBAction) apps_table_show:sender +{ + NSArray *columns; + + if (table_apps == nil) + { + table_apps = [[NSMutableArray alloc] initWithCapacity:1]; + + if (apps != nil) + [table_apps addObjectsFromArray:apps]; + } + + columns = [apps_table tableColumns]; + [[columns objectAtIndex:0] setIdentifier:@"0"]; + [[columns objectAtIndex:1] setIdentifier:@"1"]; + [[columns objectAtIndex:2] setIdentifier:@"2"]; + + [apps_table setDataSource:self]; + [apps_table selectRow:0 byExtendingSelection:NO]; + + [[apps_table window] makeKeyAndOrderFront:sender]; +} + +- (IBAction) apps_table_cancel:sender +{ + [[apps_table window] orderOut:sender]; + + [table_apps release]; + table_apps = nil; +} + +- (IBAction) apps_table_done:sender +{ + [apps_table deselectAll:sender]; /* flush edits? */ + + [self remove_apps_menu]; + [self install_apps_menu:table_apps]; + + [NSApp prefs_set_array:@PREFS_APPSMENU value:table_apps]; + [NSApp prefs_synchronize]; + + [[apps_table window] orderOut:sender]; + + [table_apps release]; + table_apps = nil; +} + +- (IBAction) apps_table_new:sender +{ + NSMutableArray *item; + + int row = [apps_table selectedRow], i; + + if (row < 0) + row = 0; + else + row = row + 1; + + i = row; + if (i > [table_apps count]) + return; /* avoid exceptions */ + + item = [[NSMutableArray alloc] initWithCapacity:3]; + [item addObject:@""]; + [item addObject:@""]; + [item addObject:@""]; + + [table_apps insertObject:item atIndex:i]; + [item release]; + + [apps_table noteNumberOfRowsChanged]; + [apps_table selectRow:row byExtendingSelection:NO]; +} + +- (IBAction) apps_table_duplicate:sender +{ + int row = [apps_table selectedRow], i; + NSObject *a; + + if (row < 0) + { + [self apps_table_new:sender]; + return; + } + + i = row; + if (i > [table_apps count] - 1) + return; /* avoid exceptions */ + + a = [table_apps objectAtIndex:i]; + [table_apps insertObject:[a copy] atIndex:i]; + + [apps_table noteNumberOfRowsChanged]; + [apps_table selectRow:row+1 byExtendingSelection:NO]; +} + +- (IBAction) apps_table_delete:sender +{ + int row = [apps_table selectedRow]; + + if (row >= 0) + { + int i = row; + + if (i > [table_apps count] - 1) + return; /* avoid exceptions */ + + [table_apps removeObjectAtIndex:i]; + } + + [apps_table noteNumberOfRowsChanged]; +} + +- (int) numberOfRowsInTableView:(NSTableView *)tableView +{ + if (table_apps == nil) + return 0; + + return [table_apps count]; +} + +- (id) tableView:(NSTableView *)tableView + objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row +{ + NSArray *item; + int col; + + if (table_apps == nil) + return nil; + + col = [[tableColumn identifier] intValue]; + + item = [table_apps objectAtIndex:row]; + if ([item count] > col) + return [item objectAtIndex:col]; + else + return @""; +} + +- (void) tableView:(NSTableView *)tableView setObjectValue:(id)object + forTableColumn:(NSTableColumn *)tableColumn row:(int)row +{ + NSMutableArray *item; + int col; + + if (table_apps == nil) + return; + + col = [[tableColumn identifier] intValue]; + + item = [table_apps objectAtIndex:row]; + [item replaceObjectAtIndex:col withObject:object]; +} + +- (void) hide_window:sender +{ + if ([X11App x_active]) + QuartzMessageMainThread (kXquartzControllerNotify, 1, AppleWMHideWindow); + else + NSBeep (); /* FIXME: something here */ +} + +- (IBAction)bring_to_front:sender +{ + QuartzMessageMainThread (kXquartzControllerNotify, 1, + AppleWMBringAllToFront); +} + +- (IBAction)close_window:sender +{ + if ([X11App x_active]) + QuartzMessageMainThread (kXquartzControllerNotify, 1, AppleWMCloseWindow); + else + [[NSApp keyWindow] performClose:sender]; +} + +- (IBAction)minimize_window:sender +{ + if ([X11App x_active]) + QuartzMessageMainThread (kXquartzControllerNotify, 1, AppleWMMinimizeWindow); + else + [[NSApp keyWindow] performMiniaturize:sender]; +} + +- (IBAction)zoom_window:sender +{ + if ([X11App x_active]) + QuartzMessageMainThread (kXquartzControllerNotify, 1, AppleWMZoomWindow); + else + [[NSApp keyWindow] performZoom:sender]; +} + +- (IBAction) next_window:sender +{ + QuartzMessageMainThread (kXquartzControllerNotify, 1, AppleWMNextWindow); +} + +- (IBAction) previous_window:sender +{ + QuartzMessageMainThread (kXquartzControllerNotify, + 1, AppleWMPreviousWindow); +} + +- (IBAction) enable_fullscreen_changed:sender +{ + int value = ![enable_fullscreen intValue]; + + QuartzMessageMainThread (kXquartzSetRootless, 1, value); + + [NSApp prefs_set_boolean:@PREFS_ROOTLESS value:value]; + [NSApp prefs_synchronize]; +} + +- (IBAction) toggle_fullscreen:sender +{ + QuartzMessageMainThread (kXquartzToggleFullscreen, 0); +} + +- (void) set_can_quit:(BOOL)state +{ + can_quit = state; +} + +- (IBAction)prefs_changed:sender +{ + darwinFakeButtons = [fake_buttons intValue]; + quartzUseSysBeep = [use_sysbeep intValue]; + X11EnableKeyEquivalents = [enable_keyequivs intValue]; + darwinSyncKeymap = [sync_keymap intValue]; + + /* after adding prefs here, also add to [X11Application read_defaults] + and below */ + + [NSApp prefs_set_boolean:@PREFS_FAKEBUTTONS value:darwinFakeButtons]; + [NSApp prefs_set_boolean:@PREFS_SYSBEEP value:quartzUseSysBeep]; + [NSApp prefs_set_boolean:@PREFS_KEYEQUIVS value:X11EnableKeyEquivalents]; + [NSApp prefs_set_boolean:@PREFS_SYNC_KEYMAP value:darwinSyncKeymap]; + [NSApp prefs_set_boolean:@PREFS_NO_AUTH value:![enable_auth intValue]]; + [NSApp prefs_set_boolean:@PREFS_NO_TCP value:![enable_tcp intValue]]; + [NSApp prefs_set_integer:@PREFS_DEPTH value:[depth selectedTag]]; + + [NSApp prefs_synchronize]; +} + +- (IBAction) prefs_show:sender +{ + [fake_buttons setIntValue:darwinFakeButtons]; + [use_sysbeep setIntValue:quartzUseSysBeep]; + [enable_keyequivs setIntValue:X11EnableKeyEquivalents]; + [sync_keymap setIntValue:darwinSyncKeymap]; + [sync_keymap setEnabled:darwinKeymapFile == NULL]; + + [enable_auth setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_AUTH default:NO]]; + [enable_tcp setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_TCP default:NO]]; + [depth selectItemAtIndex:[depth indexOfItemWithTag:[NSApp prefs_get_integer:@PREFS_DEPTH default:-1]]]; + + [enable_fullscreen setIntValue:!quartzEnableRootless]; + + [prefs_panel makeKeyAndOrderFront:sender]; +} + +- (IBAction) quit:sender +{ + QuartzMessageMainThread (kXdarwinQuit, 0); +} + +- (IBAction) x11_help:sender +{ + AHLookupAnchor (CFSTR ("Mac Help"), CFSTR ("mchlp2276")); +} + +- (BOOL) validateMenuItem:(NSMenuItem *)item +{ + NSMenu *menu = [item menu]; + + if (item == toggle_fullscreen_item) + { + return !quartzEnableRootless; + } + else if (menu == [window_separator menu] || menu == dock_menu + || (menu == [x11_about_item menu] && [item tag] == 42)) + { + return (AppleWMSelectedEvents () & AppleWMControllerNotifyMask) != 0; + } + else + { + return TRUE; + } +} + +- (void) applicationDidHide:(NSNotification *)notify +{ + QuartzMessageMainThread (kXquartzControllerNotify, 1, AppleWMHideAll); +} + +- (void) applicationDidUnhide:(NSNotification *)notify +{ + QuartzMessageMainThread (kXquartzControllerNotify, 1, AppleWMShowAll); +} + +- (NSApplicationTerminateReply) applicationShouldTerminate:sender +{ + NSString *msg; + + if (can_quit || [X11App prefs_get_boolean:@PREFS_NO_QUIT_ALERT default:NO]) + { + return NSTerminateNow; + } + + /* Make sure we're frontmost. */ + [NSApp activateIgnoringOtherApps:YES]; + + msg = NSLocalizedString (@"Are you sure you want to quit X11?\n\n\ +If you quit X11, any X11 applications you are running will stop immediately \ +and you will lose any changes you have not saved.", @""); + + /* FIXME: safe to run the alert in here? Or should we return Later + and then run the alert on a timer? It seems to work here, so.. */ + + return (NSRunAlertPanel (nil, msg, NSLocalizedString (@"Quit", @""), + NSLocalizedString (@"Cancel", @""), nil) + == NSAlertDefaultReturn) ? NSTerminateNow : NSTerminateCancel; +} + +- (void) applicationWillTerminate:(NSNotification *)aNotification +{ + [X11App prefs_synchronize]; + + /* shutdown the X server, it will exit () for us. */ + QuartzMessageMainThread (kXdarwinQuit, 0); + + /* In case it doesn't, exit anyway after a while. */ + while (sleep (10) != 0) ; + exit (1); +} + +- (void) server_ready +{ + x_list *node; + + finished_launching = YES; + + for (node = pending_apps; node != NULL; node = node->next) + { + NSString *filename = node->data; + QuartzRunClient ([filename UTF8String]); + [filename release]; + } + + x_list_free (pending_apps); + pending_apps = NULL; +} + +- (BOOL) application:(NSApplication *)app openFile:(NSString *)filename +{ +#if 0 + const char *name = [filename UTF8String]; + + if (finished_launching) + QuartzRunClient (name); + else if (name[0] != ':') /* ignore display names */ + pending_apps = x_list_prepend (pending_apps, [filename retain]); + + /* FIXME: report failures. */ + return YES; +#endif + return NO; +} + +@end + +void X11ControllerMain (int argc, const char *argv[], + void (*server_thread) (void *), void *server_arg) +{ + X11ApplicationMain (argc, argv, server_thread, server_arg); +} diff --git a/synfig-osx/launcher/Xquartz.man b/synfig-osx/launcher/Xquartz.man new file mode 100644 index 0000000..edac30e --- /dev/null +++ b/synfig-osx/launcher/Xquartz.man @@ -0,0 +1,158 @@ +.\" $XFree86: xc/programs/Xserver/hw/darwin/XDarwin.man,v 1.4 2002/01/09 18:01:58 torrey Exp $ +.\" +.TH XQUARTZ 1 __vendorversion__ +.SH NAME +Xquartz \- X window system server for Quartz operating system +.SH SYNOPSIS +.B Xquartz +[ options ] ... +.SH DESCRIPTION +.I Xquartz +is the X window server for Mac OS X provided by Apple. +.I Xquartz +runs in parallel with Aqua in rootless mode. In rootless mode, the X +window system and Mac OS X share your display. The root window of the +X11 display is the size of the screen and contains all the other +windows. The X11 root window is not displayed in rootless mode as Mac +OS X handles the desktop background. +.SH OPTIONS +.PP +In addition to the normal server options described in the \fIXserver(1)\fP +manual page, \fIXquartz\fP accepts the following command line switches: +.TP 8 +.B \-fakebuttons +Emulates a 3 button mouse using modifier keys. By default, the Command modifier +is used to emulate button 2 and Option is used for button 3. Thus, clicking the +first mouse button while holding down Command will act like clicking +button 2. Holding down Option will simulate button 3. +.TP 8 +.B \-nofakebuttons +Do not emulate a 3 button mouse. This is the default. +.TP 8 +.B "\-fakemouse2 \fImodifiers\fP" +Change the modifier keys used to emulate the second mouse button. By default, +Command is used to emulate the second button. Any combination of the following +modifier names may be used: Shift, Option, Control, Command, Fn. For example, +.B \-fakemouse2 """Option,Shift"" +will set holding Option, Shift and clicking on button one as equivalent to +clicking the second mouse button. +.TP 8 +.B "\-fakemouse3 \fImodifiers\fP" +Change the modifier keys used to emulate the third mouse button. By default, +Option is used to emulate the third button. Any combination of the following +modifier names may be used: Shift, Option, Control, Command, Fn. For example, +.B \-fakemouse3 """Control,Shift"" +will set holding Control, Shift and clicking on button one as equivalent to +clicking the third mouse button. +.TP 8 +.B "\-swapAltMeta" +Swaps the meaning of the Alt and Meta modifier keys. +.TP 8 +.B "\-keymap \fIfile\fP" +On startup \fIXquartz\fP translates a Darwin keymapping into an X keymap. +The default is to read this keymapping from USA.keymapping. With this option +the keymapping will be read from \fIfile\fP instead. If the file's path is +not specified, it will be searched for in Library/Keyboards/ underneath the +following directories (in order): ~, /, /Network, /System. +.TP 8 +.B \-nokeymap +On startup \fIXquartz\fP translates a Darwin keymapping into an X keymap. +With this option \fIXquartz\fP queries the kernel for the current keymapping +instead of reading it from a file. This will often fail on newer kernels. +.TP 8 +.B "\-depth \fIdepth\fP" +Specifies the color bit depth to use. Currently only 15, and 24 color +bits per pixel are supported. If not specified, defaults to the depth +of the main display. +.SH CUSTOMIZATION +\fIXquartz\fP can also be customized using the defaults(1) command. The available options are: +.TP 8 +.B defaults write com.apple.x11 enable_fake_buttons -boolean true +Equivalent to the \fB-fakebuttons\fP command line option. +.TP 8 +.B defaults write com.apple.x11 fake_button2 \fImodifiers\fP +Equivalent to the \fB-fakemouse2\fP option. +.TP 8 +.B defaults write com.apple.x11 fake_button3 \fImodifiers\fP +Equivalent to the \fB-fakemouse3\fP option. +.TP 8 +.B defaults write com.apple.x11 swap_alt_meta -boolean true +Equivalent to the \fB-swapAltMeta\fP option. +.TP 8 +.B defaults write com.apple.x11 keymap_file \fIfilename\fP +Equivalent to the \fB-keymap\fP option. +.TP 8 +.B defaults write com.apple.x11 no_quit_alert -boolean true +Disables the alert dialog displayed when attempting to quit X11. +.TP 8 +.B defaults write com.apple.x11 no_auth -boolean true +Stops the X server requiring that clients authenticate themselves when +connecting. See Xsecurity(__miscmansuffix__). +.TP 8 +.B defaults write com.apple.x11 nolisten_tcp -boolean true +Prevents the X server accepting remote connections. +.TP 8 +.B defaults write com.apple.x11 xinit_kills_server -boolean false +Stops the X server exiting when the xinitrc script terminates. +.TP 8 +.B defaults write com.apple.x11 fullscreen_hotkeys -boolean false +Allows system hotkeys to be handled while in X11 fullscreen mode. +.TP 8 +.B defaults write com.apple.x11 enable_system_beep -boolean false +Don't use the standard system beep effect for X11 alerts. +.TP 8 +.B defaults write com.apple.x11 enable_key_equivalents -boolean false +Disable menu keyboard equivalents while X11 windows are focused. +.TP 8 +.B defaults write com.apple.x11 depth \fIdepth\fP +Equivalent to the \fB-depth\fP option. +.SH "SEE ALSO" +.PP +X(__miscmansuffix__), XFree86(1), Xserver(1), xdm(1), xinit(1) +.PP +.SH AUTHORS +XFree86 was originally ported to Mac OS X Server by John Carmack. Dave +Zarzycki used this as the basis of his port of XFree86 4.0 to Darwin 1.0. +Torrey T. Lyons improved and integrated this code into the XFree86 +Project's mainline for the 4.0.2 release. +.PP +The following members of the XonX Team contributed to the following +releases (in alphabetical order): +.TP 4 +XFree86 4.1.0: +.br +Rob Braun - Darwin x86 support +.br +Torrey T. Lyons - Project Lead +.br +Andreas Monitzer - Cocoa version of XDarwin front end +.br +Gregory Robert Parker - Original Quartz implementation +.br +Christoph Pfisterer - Dynamic shared X libraries +.br +Toshimitsu Tanaka - Japanese localization +.TP 4 +XFree86 4.2.0: +.br +Rob Braun - Darwin x86 support +.br +Pablo Di Noto - Spanish localization +.br +Paul Edens - Dutch localization +.br +Kyunghwan Kim - Korean localization +.br +Mario Klebsch - Non-US keyboard support +.br +Torrey T. Lyons - Project Lead +.br +Andreas Monitzer - German localization +.br +Patrik Montgomery - Swedish localization +.br +Greg Parker - Rootless support +.br +Toshimitsu Tanaka - Japanese localization +.br +Olivier Verdier - French localization diff --git a/synfig-osx/launcher/appledri.c b/synfig-osx/launcher/appledri.c new file mode 100644 index 0000000..212ac94 --- /dev/null +++ b/synfig-osx/launcher/appledri.c @@ -0,0 +1,349 @@ +/* $XFree86: xc/programs/Xserver/GL/dri/xf86dri.c,v 1.10 2000/12/07 20:26:14 dawes Exp $ */ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright 2000 VA Linux Systems, Inc. +Copyright (c) 2002 Apple Computer, Inc. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Jens Owen + * Rickard E. (Rik) Faith + * + */ + +#define NEED_REPLIES +#define NEED_EVENTS +#include "X.h" +#include "Xproto.h" +#include "misc.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include "colormapst.h" +#include "cursorstr.h" +#include "scrnintstr.h" +#include "servermd.h" +#define _APPLEDRI_SERVER_ +#include "appledristr.h" +#include "swaprep.h" +#include "dri.h" +#include "dri-surface.h" +#include "dristruct.h" +#include "rootless-common.h" +#include "X11Application.h" + +static int DRIErrorBase; + +static DISPATCH_PROC(ProcAppleDRIDispatch); +static DISPATCH_PROC(SProcAppleDRIDispatch); + +static void AppleDRIResetProc(ExtensionEntry* extEntry); + +static unsigned char DRIReqCode = 0; +static int DRIEventBase = 0; + +extern void AppleDRIExtensionInit(void); + +static void SNotifyEvent(xAppleDRINotifyEvent *from, xAppleDRINotifyEvent *to); + +typedef struct _DRIEvent *DRIEventPtr; +typedef struct _DRIEvent { + DRIEventPtr next; + ClientPtr client; + XID clientResource; + unsigned int mask; +} DRIEventRec; + +void +AppleDRIExtensionInit(void) +{ + ExtensionEntry* extEntry; + + if (DRIExtensionInit() && + (extEntry = AddExtension(APPLEDRINAME, + AppleDRINumberEvents, + AppleDRINumberErrors, + ProcAppleDRIDispatch, + SProcAppleDRIDispatch, + AppleDRIResetProc, + StandardMinorOpcode))) { + DRIReqCode = (unsigned char)extEntry->base; + DRIErrorBase = extEntry->errorBase; + DRIEventBase = extEntry->eventBase; + EventSwapVector[DRIEventBase] = (EventSwapPtr) SNotifyEvent; + } +} + +/*ARGSUSED*/ +static void +AppleDRIResetProc ( + ExtensionEntry* extEntry +) +{ + DRIReset(); +} + +static int +ProcAppleDRIQueryVersion( + register ClientPtr client +) +{ + xAppleDRIQueryVersionReply rep; + register int n; + + REQUEST_SIZE_MATCH(xAppleDRIQueryVersionReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.majorVersion = APPLE_DRI_MAJOR_VERSION; + rep.minorVersion = APPLE_DRI_MINOR_VERSION; + rep.patchVersion = APPLE_DRI_PATCH_VERSION; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + } + WriteToClient(client, sizeof(xAppleDRIQueryVersionReply), (char *)&rep); + return (client->noClientException); +} + + +/* surfaces */ + +static int +ProcAppleDRIQueryDirectRenderingCapable( + register ClientPtr client +) +{ + xAppleDRIQueryDirectRenderingCapableReply rep; + Bool isCapable; + + REQUEST(xAppleDRIQueryDirectRenderingCapableReq); + REQUEST_SIZE_MATCH(xAppleDRIQueryDirectRenderingCapableReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + if (!DRIQueryDirectRenderingCapable( screenInfo.screens[stuff->screen], + &isCapable)) { + return BadValue; + } + rep.isCapable = isCapable; + + if (!LocalClient(client)) + rep.isCapable = 0; + + WriteToClient(client, + sizeof(xAppleDRIQueryDirectRenderingCapableReply), (char *)&rep); + return (client->noClientException); +} + +static int +ProcAppleDRIAuthConnection( + register ClientPtr client +) +{ + xAppleDRIAuthConnectionReply rep; + + REQUEST(xAppleDRIAuthConnectionReq); + REQUEST_SIZE_MATCH(xAppleDRIAuthConnectionReq); + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.authenticated = 1; + + if (!DRIAuthConnection( screenInfo.screens[stuff->screen], stuff->magic)) { + ErrorF("Failed to authenticate %u\n", stuff->magic); + rep.authenticated = 0; + } + WriteToClient(client, sizeof(xAppleDRIAuthConnectionReply), (char *)&rep); + return (client->noClientException); +} + +static void surface_notify (void *_arg, void *data) +{ + DRISurfaceNotifyArg *arg = _arg; + int client_index = (int) data; + ClientPtr client; + xAppleDRINotifyEvent se; + + if (client_index < 0 || client_index >= currentMaxClients) + return; + + client = clients[client_index]; + if (client == NULL || client == serverClient || client->clientGone) + return; + + se.type = DRIEventBase + AppleDRISurfaceNotify; + se.kind = arg->kind; + se.arg = arg->id; + se.sequenceNumber = client->sequence; + se.time = currentTime.milliseconds; + WriteEventsToClient (client, 1, (xEvent *) &se); +} + +static int +ProcAppleDRICreateSurface( + ClientPtr client +) +{ + xAppleDRICreateSurfaceReply rep; + DrawablePtr pDrawable; + xp_surface_id sid; + unsigned int key[2]; + + REQUEST(xAppleDRICreateSurfaceReq); + REQUEST_SIZE_MATCH(xAppleDRICreateSurfaceReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + if (!(pDrawable = (DrawablePtr)SecurityLookupDrawable( + (Drawable)stuff->drawable, + client, + SecurityReadAccess))) { + return BadValue; + } + + rep.key_0 = rep.key_1 = rep.uid = 0; + + if (!DRICreateSurface( screenInfo.screens[stuff->screen], + (Drawable)stuff->drawable, pDrawable, + stuff->client_id, &sid, key, + surface_notify, (void *) client->index)) { + return BadValue; + } + + rep.key_0 = key[0]; + rep.key_1 = key[1]; + rep.uid = sid; + + WriteToClient(client, sizeof(xAppleDRICreateSurfaceReply), (char *)&rep); + return (client->noClientException); +} + +static int +ProcAppleDRIDestroySurface( + register ClientPtr client +) +{ + REQUEST(xAppleDRIDestroySurfaceReq); + DrawablePtr pDrawable; + REQUEST_SIZE_MATCH(xAppleDRIDestroySurfaceReq); + + if (!(pDrawable = (DrawablePtr)SecurityLookupDrawable( + (Drawable)stuff->drawable, + client, + SecurityReadAccess))) { + return BadValue; + } + + if (!DRIDestroySurface( screenInfo.screens[stuff->screen], + (Drawable)stuff->drawable, + pDrawable, NULL, NULL)) { + return BadValue; + } + + return (client->noClientException); +} + + +/* dispatch */ + +static int +ProcAppleDRIDispatch ( + register ClientPtr client +) +{ + REQUEST(xReq); + + switch (stuff->data) + { + case X_AppleDRIQueryVersion: + return ProcAppleDRIQueryVersion(client); + case X_AppleDRIQueryDirectRenderingCapable: + return ProcAppleDRIQueryDirectRenderingCapable(client); + } + + if (!LocalClient(client)) + return DRIErrorBase + AppleDRIClientNotLocal; + + switch (stuff->data) + { + case X_AppleDRIAuthConnection: + return ProcAppleDRIAuthConnection(client); + case X_AppleDRICreateSurface: + return ProcAppleDRICreateSurface(client); + case X_AppleDRIDestroySurface: + return ProcAppleDRIDestroySurface(client); + default: + return BadRequest; + } +} + +static void +SNotifyEvent(from, to) + xAppleDRINotifyEvent *from, *to; +{ + to->type = from->type; + to->kind = from->kind; + cpswaps (from->sequenceNumber, to->sequenceNumber); + cpswapl (from->time, to->time); + cpswapl (from->arg, to->arg); +} + +static int +SProcAppleDRIQueryVersion( + register ClientPtr client +) +{ + register int n; + REQUEST(xAppleDRIQueryVersionReq); + swaps(&stuff->length, n); + return ProcAppleDRIQueryVersion(client); +} + +static int +SProcAppleDRIDispatch ( + register ClientPtr client +) +{ + REQUEST(xReq); + + /* It is bound to be non-local when there is byte swapping */ + if (!LocalClient(client)) + return DRIErrorBase + AppleDRIClientNotLocal; + + /* only local clients are allowed DRI access */ + switch (stuff->data) + { + case X_AppleDRIQueryVersion: + return SProcAppleDRIQueryVersion(client); + default: + return BadRequest; + } +} diff --git a/synfig-osx/launcher/applewm-impl.c b/synfig-osx/launcher/applewm-impl.c new file mode 100644 index 0000000..941d2b0 --- /dev/null +++ b/synfig-osx/launcher/applewm-impl.c @@ -0,0 +1,656 @@ +/* $XFree86: xc/programs/Xserver/GL/dri/xf86dri.c,v 1.10 2000/12/07 20:26:14 dawes Exp $ */ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright 2000 VA Linux Systems, Inc. +Copyright (c) 2002 Apple Computer, Inc. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +#define NEED_REPLIES +#define NEED_EVENTS +#include "X.h" +#include "Xproto.h" +#include "misc.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include "colormapst.h" +#include "cursorstr.h" +#include "scrnintstr.h" +#include "servermd.h" +#define _APPLEWM_SERVER_ +#include "applewmstr.h" +#include "swaprep.h" +#include "rootless-common.h" +#include "X11Application.h" + +static int WMErrorBase; + +static DISPATCH_PROC(ProcAppleWMDispatch); +static DISPATCH_PROC(SProcAppleWMDispatch); + +static void AppleWMResetProc(ExtensionEntry* extEntry); + +static unsigned char WMReqCode = 0; +static int WMEventBase = 0; + +static RESTYPE ClientType, EventType; /* resource types for event masks */ +static XID eventResource; + +/* Currently selected events */ +static unsigned int eventMask = 0; + +extern void AppleWMExtensionInit(void); + +static int WMFreeClient (pointer data, XID id); +static int WMFreeEvents (pointer data, XID id); +static void SNotifyEvent(xAppleWMNotifyEvent *from, xAppleWMNotifyEvent *to); + +typedef struct _WMEvent *WMEventPtr; +typedef struct _WMEvent { + WMEventPtr next; + ClientPtr client; + XID clientResource; + unsigned int mask; +} WMEventRec; + +static inline BoxRec +make_box (int x, int y, int w, int h) +{ + BoxRec r; + r.x1 = x; + r.y1 = y; + r.x2 = x + w; + r.y2 = y + h; + return r; +} + +void +AppleWMExtensionInit(void) +{ + ExtensionEntry* extEntry; + + ClientType = CreateNewResourceType(WMFreeClient); + EventType = CreateNewResourceType(WMFreeEvents); + eventResource = FakeClientID(0); + + if (ClientType && EventType && + (extEntry = AddExtension(APPLEWMNAME, + AppleWMNumberEvents, + AppleWMNumberErrors, + ProcAppleWMDispatch, + SProcAppleWMDispatch, + AppleWMResetProc, + StandardMinorOpcode))) { + WMReqCode = (unsigned char)extEntry->base; + WMErrorBase = extEntry->errorBase; + WMEventBase = extEntry->eventBase; + EventSwapVector[WMEventBase] = (EventSwapPtr) SNotifyEvent; + } +} + +/*ARGSUSED*/ +static void +AppleWMResetProc ( + ExtensionEntry* extEntry +) +{ +} + +static int +ProcAppleWMQueryVersion( + register ClientPtr client +) +{ + xAppleWMQueryVersionReply rep; + register int n; + + REQUEST_SIZE_MATCH(xAppleWMQueryVersionReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.majorVersion = APPLE_WM_MAJOR_VERSION; + rep.minorVersion = APPLE_WM_MINOR_VERSION; + rep.patchVersion = APPLE_WM_PATCH_VERSION; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + } + WriteToClient(client, sizeof(xAppleWMQueryVersionReply), (char *)&rep); + return (client->noClientException); +} + + +/* events */ + +static inline void +updateEventMask (WMEventPtr *pHead) +{ + WMEventPtr pCur; + + eventMask = 0; + for (pCur = *pHead; pCur != NULL; pCur = pCur->next) + eventMask |= pCur->mask; +} + +/*ARGSUSED*/ +static int +WMFreeClient (data, id) + pointer data; + XID id; +{ + WMEventPtr pEvent; + WMEventPtr *pHead, pCur, pPrev; + + pEvent = (WMEventPtr) data; + pHead = (WMEventPtr *) LookupIDByType(eventResource, EventType); + if (pHead) { + pPrev = 0; + for (pCur = *pHead; pCur && pCur != pEvent; pCur=pCur->next) + pPrev = pCur; + if (pCur) + { + if (pPrev) + pPrev->next = pEvent->next; + else + *pHead = pEvent->next; + } + updateEventMask (pHead); + } + xfree ((pointer) pEvent); + return 1; +} + +/*ARGSUSED*/ +static int +WMFreeEvents (data, id) + pointer data; + XID id; +{ + WMEventPtr *pHead, pCur, pNext; + + pHead = (WMEventPtr *) data; + for (pCur = *pHead; pCur; pCur = pNext) { + pNext = pCur->next; + FreeResource (pCur->clientResource, ClientType); + xfree ((pointer) pCur); + } + xfree ((pointer) pHead); + eventMask = 0; + return 1; +} + +static int +ProcAppleWMSelectInput (client) + register ClientPtr client; +{ + REQUEST(xAppleWMSelectInputReq); + WMEventPtr pEvent, pNewEvent, *pHead; + XID clientResource; + + REQUEST_SIZE_MATCH (xAppleWMSelectInputReq); + pHead = (WMEventPtr *)SecurityLookupIDByType(client, + eventResource, EventType, SecurityWriteAccess); + if (stuff->mask != 0) { + if (pHead) { + /* check for existing entry. */ + for (pEvent = *pHead; pEvent; pEvent = pEvent->next) + { + if (pEvent->client == client) + { + pEvent->mask = stuff->mask; + updateEventMask (pHead); + return Success; + } + } + } + + /* build the entry */ + pNewEvent = (WMEventPtr) xalloc (sizeof (WMEventRec)); + if (!pNewEvent) + return BadAlloc; + pNewEvent->next = 0; + pNewEvent->client = client; + pNewEvent->mask = stuff->mask; + /* + * add a resource that will be deleted when + * the client goes away + */ + clientResource = FakeClientID (client->index); + pNewEvent->clientResource = clientResource; + if (!AddResource (clientResource, ClientType, (pointer)pNewEvent)) + return BadAlloc; + /* + * create a resource to contain a pointer to the list + * of clients selecting input. This must be indirect as + * the list may be arbitrarily rearranged which cannot be + * done through the resource database. + */ + if (!pHead) + { + pHead = (WMEventPtr *) xalloc (sizeof (WMEventPtr)); + if (!pHead || + !AddResource (eventResource, EventType, (pointer)pHead)) + { + FreeResource (clientResource, RT_NONE); + return BadAlloc; + } + *pHead = 0; + } + pNewEvent->next = *pHead; + *pHead = pNewEvent; + updateEventMask (pHead); + } else if (stuff->mask == 0) { + /* delete the interest */ + if (pHead) { + pNewEvent = 0; + for (pEvent = *pHead; pEvent; pEvent = pEvent->next) { + if (pEvent->client == client) + break; + pNewEvent = pEvent; + } + if (pEvent) { + FreeResource (pEvent->clientResource, ClientType); + if (pNewEvent) + pNewEvent->next = pEvent->next; + else + *pHead = pEvent->next; + xfree (pEvent); + updateEventMask (pHead); + } + } + } else { + client->errorValue = stuff->mask; + return BadValue; + } + return Success; +} + +/* + * deliver the event + */ + +void +AppleWMSendEvent (type, mask, which, arg) + int type, which, arg; + unsigned int mask; +{ + WMEventPtr *pHead, pEvent; + ClientPtr client; + xAppleWMNotifyEvent se; + + pHead = (WMEventPtr *) LookupIDByType(eventResource, EventType); + if (!pHead) + return; + for (pEvent = *pHead; pEvent; pEvent = pEvent->next) { + client = pEvent->client; + if ((pEvent->mask & mask) == 0 + || client == serverClient || client->clientGone) + { + continue; + } + se.type = type + WMEventBase; + se.kind = which; + se.arg = arg; + se.sequenceNumber = client->sequence; + se.time = currentTime.milliseconds; + WriteEventsToClient (client, 1, (xEvent *) &se); + } +} + +/* Safe to call from any thread. */ +unsigned int +AppleWMSelectedEvents (void) +{ + return eventMask; +} + + +/* general utility functions */ + +static int +ProcAppleWMDisableUpdate( + register ClientPtr client +) +{ + REQUEST_SIZE_MATCH(xAppleWMDisableUpdateReq); + + xp_disable_update (); + + return (client->noClientException); +} + +static int +ProcAppleWMReenableUpdate( + register ClientPtr client +) +{ + REQUEST_SIZE_MATCH(xAppleWMReenableUpdateReq); + + xp_reenable_update (); + + return (client->noClientException); +} + + +/* window functions */ + +static int +ProcAppleWMSetWindowMenu( + register ClientPtr client +) +{ + const char *bytes, **items; + char *shortcuts; + int max_len, nitems, i, j; + REQUEST(xAppleWMSetWindowMenuReq); + + REQUEST_AT_LEAST_SIZE(xAppleWMSetWindowMenuReq); + + nitems = stuff->nitems; + items = alloca (sizeof (char *) * nitems); + shortcuts = alloca (sizeof (char) * nitems); + + max_len = (stuff->length << 2) - sizeof(xAppleWMSetWindowMenuReq); + bytes = (char *) &stuff[1]; + + for (i = j = 0; i < max_len && j < nitems;) + { + shortcuts[j] = bytes[i++]; + items[j++] = bytes + i; + + while (i < max_len) + { + if (bytes[i++] == 0) + break; + } + } + + X11ApplicationSetWindowMenu (nitems, items, shortcuts); + + return (client->noClientException); +} + +static int +ProcAppleWMSetWindowMenuCheck( + register ClientPtr client +) +{ + REQUEST(xAppleWMSetWindowMenuCheckReq); + + REQUEST_SIZE_MATCH(xAppleWMSetWindowMenuCheckReq); + + X11ApplicationSetWindowMenuCheck (stuff->index); + + return (client->noClientException); +} + +static int +ProcAppleWMSetFrontProcess( + register ClientPtr client +) +{ + REQUEST_SIZE_MATCH(xAppleWMSetFrontProcessReq); + + X11ApplicationSetFrontProcess (); + + return (client->noClientException); +} + +static int +ProcAppleWMSetWindowLevel( + register ClientPtr client +) +{ + REQUEST(xAppleWMSetWindowLevelReq); + WindowPtr pWin; + + REQUEST_SIZE_MATCH(xAppleWMSetWindowLevelReq); + + if (!(pWin = SecurityLookupWindow((Drawable)stuff->window, + client, SecurityReadAccess))) { + return BadValue; + } + + if (stuff->level < 0 || stuff->level >= AppleWMNumWindowLevels) { + return BadValue; + } + + RootlessSetWindowLevel (pWin, stuff->level); + + return (client->noClientException); +} + +static int +ProcAppleWMSetCanQuit( + register ClientPtr client +) +{ + REQUEST(xAppleWMSetCanQuitReq); + + REQUEST_SIZE_MATCH(xAppleWMSetCanQuitReq); + + X11ApplicationSetCanQuit (stuff->state); + + return (client->noClientException); +} + + +/* frame functions */ + +static int +ProcAppleWMFrameGetRect( + register ClientPtr client +) +{ + xAppleWMFrameGetRectReply rep; + BoxRec ir, or, rr; + REQUEST(xAppleWMFrameGetRectReq); + + REQUEST_SIZE_MATCH(xAppleWMFrameGetRectReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + ir = make_box (stuff->ix, stuff->iy, stuff->iw, stuff->ih); + or = make_box (stuff->ox, stuff->oy, stuff->ow, stuff->oh); + + if (xp_frame_get_rect (stuff->frame_rect, + stuff->frame_class, + &or, &ir, &rr) != Success) { + return BadValue; + } + + rep.x = rr.x1; + rep.y = rr.y1; + rep.w = rr.x2 - rr.x1; + rep.h = rr.y2 - rr.y1; + + WriteToClient(client, sizeof(xAppleWMFrameGetRectReply), (char *)&rep); + return (client->noClientException); +} + +static int +ProcAppleWMFrameHitTest( + register ClientPtr client +) +{ + xAppleWMFrameHitTestReply rep; + BoxRec ir, or; + int ret; + REQUEST(xAppleWMFrameHitTestReq); + + REQUEST_SIZE_MATCH(xAppleWMFrameHitTestReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + + ir = make_box (stuff->ix, stuff->iy, stuff->iw, stuff->ih); + or = make_box (stuff->ox, stuff->oy, stuff->ow, stuff->oh); + + if (xp_frame_hit_test (stuff->frame_class, stuff->px, + stuff->py, &or, &ir, &ret) != Success) + { + return BadValue; + } + + rep.ret = ret; + + WriteToClient(client, sizeof(xAppleWMFrameHitTestReply), (char *)&rep); + return (client->noClientException); +} + +static int +ProcAppleWMFrameDraw( + register ClientPtr client +) +{ + BoxRec ir, or; + unsigned int title_length, title_max; + unsigned char *title_bytes; + REQUEST(xAppleWMFrameDrawReq); + WindowPtr pWin; + xp_window_id wid; + + REQUEST_AT_LEAST_SIZE(xAppleWMFrameDrawReq); + + if (!(pWin = SecurityLookupWindow((Drawable)stuff->window, + client, SecurityReadAccess))) { + return BadValue; + } + + ir = make_box (stuff->ix, stuff->iy, stuff->iw, stuff->ih); + or = make_box (stuff->ox, stuff->oy, stuff->ow, stuff->oh); + + title_length = stuff->title_length; + title_max = (stuff->length << 2) - sizeof(xAppleWMFrameDrawReq); + + if (title_max < title_length) + return BadValue; + + title_bytes = (unsigned char *) &stuff[1]; + + wid = RootlessGetPhysicalWindow (pWin, FALSE); + if (wid == 0) + return BadWindow; + + if (xp_frame_draw (wid, stuff->frame_class, + stuff->frame_attr, &or, &ir, + title_length, title_bytes) != Success) { + return BadValue; + } + + return (client->noClientException); +} + + +/* dispatch */ + +static int +ProcAppleWMDispatch ( + register ClientPtr client +) +{ + REQUEST(xReq); + + switch (stuff->data) + { + case X_AppleWMQueryVersion: + return ProcAppleWMQueryVersion(client); + } + + if (!LocalClient(client)) + return WMErrorBase + AppleWMClientNotLocal; + + switch (stuff->data) + { + case X_AppleWMSelectInput: + return ProcAppleWMSelectInput(client); + case X_AppleWMDisableUpdate: + return ProcAppleWMDisableUpdate(client); + case X_AppleWMReenableUpdate: + return ProcAppleWMReenableUpdate(client); + case X_AppleWMSetWindowMenu: + return ProcAppleWMSetWindowMenu(client); + case X_AppleWMSetWindowMenuCheck: + return ProcAppleWMSetWindowMenuCheck(client); + case X_AppleWMSetFrontProcess: + return ProcAppleWMSetFrontProcess(client); + case X_AppleWMSetWindowLevel: + return ProcAppleWMSetWindowLevel(client); + case X_AppleWMSetCanQuit: + return ProcAppleWMSetCanQuit(client); + case X_AppleWMFrameGetRect: + return ProcAppleWMFrameGetRect(client); + case X_AppleWMFrameHitTest: + return ProcAppleWMFrameHitTest(client); + case X_AppleWMFrameDraw: + return ProcAppleWMFrameDraw(client); + default: + return BadRequest; + } +} + +static void +SNotifyEvent(from, to) + xAppleWMNotifyEvent *from, *to; +{ + to->type = from->type; + to->kind = from->kind; + cpswaps (from->sequenceNumber, to->sequenceNumber); + cpswapl (from->time, to->time); + cpswapl (from->arg, to->arg); +} + +static int +SProcAppleWMQueryVersion( + register ClientPtr client +) +{ + register int n; + REQUEST(xAppleWMQueryVersionReq); + swaps(&stuff->length, n); + return ProcAppleWMQueryVersion(client); +} + +static int +SProcAppleWMDispatch ( + register ClientPtr client +) +{ + REQUEST(xReq); + + /* It is bound to be non-local when there is byte swapping */ + if (!LocalClient(client)) + return WMErrorBase + AppleWMClientNotLocal; + + /* only local clients are allowed WM access */ + switch (stuff->data) + { + case X_AppleWMQueryVersion: + return SProcAppleWMQueryVersion(client); + default: + return BadRequest; + } +} diff --git a/synfig-osx/launcher/applewm.c b/synfig-osx/launcher/applewm.c new file mode 100644 index 0000000..e79a5d6 --- /dev/null +++ b/synfig-osx/launcher/applewm.c @@ -0,0 +1,529 @@ +/* $XFree86: xc/lib/GL/dri/XF86dri.c,v 1.12 2001/08/27 17:40:57 dawes Exp $ */ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright 2000 VA Linux Systems, Inc. +Copyright (c) 2002 Apple Computer, Inc. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* THIS IS NOT AN X CONSORTIUM STANDARD */ + +#define NEED_EVENTS +#define NEED_REPLIES +#include +#include "applewmstr.h" +#include +#include "extutil.h" +#include + +static XExtensionInfo _applewm_info_data; +static XExtensionInfo *applewm_info = &_applewm_info_data; +static char *applewm_extension_name = APPLEWMNAME; + +#define AppleWMCheckExtension(dpy,i,val) \ + XextCheckExtension (dpy, i, applewm_extension_name, val) + +/***************************************************************************** + * * + * private utility routines * + * * + *****************************************************************************/ + +static int close_display(Display *dpy, XExtCodes *extCodes); +static Bool wire_to_event(); +static Status event_to_wire(); + +static /* const */ XExtensionHooks applewm_extension_hooks = { + NULL, /* create_gc */ + NULL, /* copy_gc */ + NULL, /* flush_gc */ + NULL, /* free_gc */ + NULL, /* create_font */ + NULL, /* free_font */ + close_display, /* close_display */ + wire_to_event, /* wire_to_event */ + event_to_wire, /* event_to_wire */ + NULL, /* error */ + NULL, /* error_string */ +}; + +static XEXT_GENERATE_FIND_DISPLAY (find_display, applewm_info, + applewm_extension_name, + &applewm_extension_hooks, + AppleWMNumberEvents, NULL) + +static XEXT_GENERATE_CLOSE_DISPLAY (close_display, applewm_info) + +static Bool wire_to_event (dpy, re, event) + Display *dpy; + XEvent *re; + xEvent *event; +{ + XExtDisplayInfo *info = find_display (dpy); + XAppleWMNotifyEvent *se; + xAppleWMNotifyEvent *sevent; + + AppleWMCheckExtension (dpy, info, False); + + switch ((event->u.u.type & 0x7f) - info->codes->first_event) { + case AppleWMControllerNotify: + case AppleWMActivationNotify: + case AppleWMPasteboardNotify: + se = (XAppleWMNotifyEvent *) re; + sevent = (xAppleWMNotifyEvent *) event; + se->type = sevent->type & 0x7f; + se->serial = _XSetLastRequestRead(dpy,(xGenericReply *) event); + se->send_event = (sevent->type & 0x80) != 0; + se->display = dpy; + se->window = 0; + se->time = sevent->time; + se->kind = sevent->kind; + se->arg = sevent->arg; + return True; + } + return False; +} + +static Status event_to_wire (dpy, re, event) + Display *dpy; + XEvent *re; + xEvent *event; +{ + XExtDisplayInfo *info = find_display (dpy); + XAppleWMNotifyEvent *se; + xAppleWMNotifyEvent *sevent; + + AppleWMCheckExtension (dpy, info, False); + + switch ((re->type & 0x7f) - info->codes->first_event) { + case AppleWMControllerNotify: + case AppleWMActivationNotify: + case AppleWMPasteboardNotify: + se = (XAppleWMNotifyEvent *) re; + sevent = (xAppleWMNotifyEvent *) event; + sevent->type = se->type | (se->send_event ? 0x80 : 0); + sevent->sequenceNumber = se->serial & 0xffff; + sevent->kind = se->kind; + sevent->arg = se->arg; + sevent->time = se->time; + return 1; + } + return 0; +} + +/***************************************************************************** + * * + * public Apple-WM Extension routines * + * * + *****************************************************************************/ + +#if 0 +#include +#define TRACE(msg) fprintf(stderr, "AppleWM%s\n", msg); +#else +#define TRACE(msg) +#endif + + +Bool XAppleWMQueryExtension (dpy, event_basep, error_basep) + Display *dpy; + int *event_basep, *error_basep; +{ + XExtDisplayInfo *info = find_display (dpy); + + TRACE("QueryExtension..."); + if (XextHasExtension(info)) { + *event_basep = info->codes->first_event; + *error_basep = info->codes->first_error; + TRACE("QueryExtension... return True"); + return True; + } else { + TRACE("QueryExtension... return False"); + return False; + } +} + +Bool XAppleWMQueryVersion(dpy, majorVersion, minorVersion, patchVersion) + Display* dpy; + int* majorVersion; + int* minorVersion; + int* patchVersion; +{ + XExtDisplayInfo *info = find_display (dpy); + xAppleWMQueryVersionReply rep; + xAppleWMQueryVersionReq *req; + + TRACE("QueryVersion..."); + AppleWMCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleWMQueryVersion, req); + req->reqType = info->codes->major_opcode; + req->wmReqType = X_AppleWMQueryVersion; + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + TRACE("QueryVersion... return False"); + return False; + } + *majorVersion = rep.majorVersion; + *minorVersion = rep.minorVersion; + *patchVersion = rep.patchVersion; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("QueryVersion... return True"); + return True; +} + +Bool XAppleWMDisableUpdate(dpy, screen) + Display* dpy; + int screen; +{ + XExtDisplayInfo *info = find_display (dpy); + xAppleWMDisableUpdateReq *req; + + TRACE("DisableUpdate..."); + AppleWMCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleWMDisableUpdate, req); + req->reqType = info->codes->major_opcode; + req->wmReqType = X_AppleWMDisableUpdate; + req->screen = screen; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("DisableUpdate... return True"); + return True; +} + +Bool XAppleWMReenableUpdate(dpy, screen) + Display* dpy; + int screen; +{ + XExtDisplayInfo *info = find_display (dpy); + xAppleWMReenableUpdateReq *req; + + TRACE("ReenableUpdate..."); + AppleWMCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleWMReenableUpdate, req); + req->reqType = info->codes->major_opcode; + req->wmReqType = X_AppleWMReenableUpdate; + req->screen = screen; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("ReenableUpdate... return True"); + return True; +} + +Bool XAppleWMSelectInput(dpy, mask) + Display* dpy; + unsigned long mask; +{ + XExtDisplayInfo *info = find_display (dpy); + xAppleWMSelectInputReq *req; + + TRACE("SelectInput..."); + AppleWMCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleWMSelectInput, req); + req->reqType = info->codes->major_opcode; + req->wmReqType = X_AppleWMSelectInput; + req->mask = mask; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("SetlectInput... return True"); + return True; +} + +Bool XAppleWMSetWindowMenuWithShortcuts(dpy, nitems, items, shortcuts) + Display* dpy; + int nitems; + const char **items; + const char *shortcuts; +{ + XExtDisplayInfo *info = find_display (dpy); + xAppleWMSetWindowMenuReq *req; + int i, total_length, len; + char *buf, *ptr; + + TRACE("SetWindowMenu..."); + AppleWMCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleWMSetWindowMenu, req); + req->reqType = info->codes->major_opcode; + req->wmReqType = X_AppleWMSetWindowMenu; + req->nitems = nitems; + + total_length = 0; + for (i = 0; i < nitems; i++) + total_length += strlen (items[i]) + 2; + + ptr = buf = alloca (total_length); + for (i = 0; i < nitems; i++) + { + len = strlen (items[i]); + *ptr++ = shortcuts ? shortcuts[i] : 0; + memcpy (ptr, items[i], len); + ptr[len] = 0; + ptr += len + 1; + } + + req->length += (total_length + 3) >> 2; + Data (dpy, buf, total_length); + + UnlockDisplay(dpy); + SyncHandle(); + TRACE("SetlectInput... return True"); + return True; +} + +Bool XAppleWMSetWindowMenu(dpy, nitems, items) + Display* dpy; + int nitems; + const char **items; +{ + return XAppleWMSetWindowMenuWithShortcuts (dpy, nitems, items, NULL); +} + +Bool XAppleWMSetWindowMenuCheck(dpy, idx) + Display* dpy; + int idx; +{ + XExtDisplayInfo *info = find_display (dpy); + xAppleWMSetWindowMenuCheckReq *req; + + TRACE("SetWindowMenuCheck..."); + AppleWMCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleWMSetWindowMenuCheck, req); + req->reqType = info->codes->major_opcode; + req->wmReqType = X_AppleWMSetWindowMenuCheck; + req->index = idx; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("SetWindowMenuCheck... return True"); + return True; +} + +Bool XAppleWMSetFrontProcess(dpy) + Display* dpy; +{ + XExtDisplayInfo *info = find_display (dpy); + xAppleWMSetFrontProcessReq *req; + + TRACE("SetFrontProcess..."); + AppleWMCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleWMSetFrontProcess, req); + req->reqType = info->codes->major_opcode; + req->wmReqType = X_AppleWMSetFrontProcess; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("SetFrontProcess... return True"); + return True; +} + +Bool XAppleWMSetWindowLevel(dpy, id, level) + Display* dpy; + Window id; + int level; +{ + XExtDisplayInfo *info = find_display (dpy); + xAppleWMSetWindowLevelReq *req; + + TRACE("SetWindowLevel..."); + AppleWMCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleWMSetWindowLevel, req); + req->reqType = info->codes->major_opcode; + req->wmReqType = X_AppleWMSetWindowLevel; + req->window = id; + req->level = level; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("SetWindowLevel... return True"); + return True; +} + +Bool XAppleWMSetCanQuit(dpy, state) + Display* dpy; + Bool state; +{ + XExtDisplayInfo *info = find_display (dpy); + xAppleWMSetCanQuitReq *req; + + TRACE("SetCanQuit..."); + AppleWMCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleWMSetCanQuit, req); + req->reqType = info->codes->major_opcode; + req->wmReqType = X_AppleWMSetCanQuit; + req->state = state; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("SetCanQuit... return True"); + return True; +} + +Bool XAppleWMFrameGetRect(dpy, frame_class, frame_rect, + ix, iy, iw, ih, ox, oy, ow, oh, rx, ry, rw, rh) + Display* dpy; + unsigned int frame_class, frame_rect; + short ix, iy, iw, ih; + short ox, oy, ow, oh; + short *rx, *ry, *rw, *rh; +{ + XExtDisplayInfo *info = find_display (dpy); + xAppleWMFrameGetRectReply rep; + xAppleWMFrameGetRectReq *req; + + TRACE("FrameGetRect..."); + AppleWMCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleWMFrameGetRect, req); + req->reqType = info->codes->major_opcode; + req->wmReqType = X_AppleWMFrameGetRect; + req->frame_class = frame_class; + req->frame_rect = frame_rect; + req->ix = ix; + req->iy = iy; + req->iw = iw; + req->ih = ih; + req->ox = ox; + req->oy = oy; + req->ow = ow; + req->oh = oh; + rep.x = rep.y = rep.w = rep.h = 0; + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + TRACE("FrameGetRect... return False"); + return False; + } + *rx = rep.x; *ry = rep.y; + *rw = rep.w; *rh = rep.h; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("FrameGetRect... return True"); + return True; +} + +unsigned int XAppleWMFrameHitTest(dpy, frame_class, px, py, + ix, iy, iw, ih, ox, oy, ow, oh) + Display* dpy; + unsigned int frame_class; + short px, py; + short ix, iy, iw, ih; + short ox, oy, ow, oh; +{ + XExtDisplayInfo *info = find_display (dpy); + xAppleWMFrameHitTestReply rep; + xAppleWMFrameHitTestReq *req; + + TRACE("FrameHitTest..."); + AppleWMCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleWMFrameHitTest, req); + req->reqType = info->codes->major_opcode; + req->wmReqType = X_AppleWMFrameHitTest; + req->frame_class = frame_class; + req->px = px; + req->py = py; + req->ix = ix; + req->iy = iy; + req->iw = iw; + req->ih = ih; + req->ox = ox; + req->oy = oy; + req->ow = ow; + req->oh = oh; + rep.ret = 0; + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + TRACE("FrameHitTest... return False"); + return False; + } + UnlockDisplay(dpy); + SyncHandle(); + TRACE("FrameHiTest... return True"); + return rep.ret; +} + +Bool XAppleWMFrameDraw(dpy, screen, window, + frame_class, frame_attr, + ix, iy, iw, ih, ox, oy, ow, oh, + title_length, title_bytes) + Display* dpy; + int screen; + Window window; + unsigned int frame_class, frame_attr; + short ix, iy, iw, ih; + short ox, oy, ow, oh; + unsigned int title_length; + const unsigned char *title_bytes; +{ + XExtDisplayInfo *info = find_display (dpy); + xAppleWMFrameDrawReq *req; + + TRACE("FrameDraw..."); + AppleWMCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleWMFrameDraw, req); + req->reqType = info->codes->major_opcode; + req->wmReqType = X_AppleWMFrameDraw; + req->screen = screen; + req->window = window; + req->frame_class = frame_class; + req->frame_attr = frame_attr; + req->ix = ix; + req->iy = iy; + req->iw = iw; + req->ih = ih; + req->ox = ox; + req->oy = oy; + req->ow = ow; + req->oh = oh; + req->title_length = title_length; + + req->length += (title_length + 3)>>2; + Data (dpy, title_bytes, title_length); + + UnlockDisplay(dpy); + SyncHandle(); + TRACE("FrameDraw... return True"); + return True; +} diff --git a/synfig-osx/launcher/applewm.h b/synfig-osx/launcher/applewm.h new file mode 100644 index 0000000..43a12bc --- /dev/null +++ b/synfig-osx/launcher/applewm.h @@ -0,0 +1,160 @@ +/* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.7 2000/12/07 20:26:02 dawes Exp $ */ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright 2000 VA Linux Systems, Inc. +Copyright (c) 2002 Apple Computer, Inc. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +#ifndef _APPLEWM_H_ +#define _APPLEWM_H_ + +#include + +#define X_AppleWMQueryVersion 0 +#define X_AppleWMFrameGetRect 1 +#define X_AppleWMFrameHitTest 2 +#define X_AppleWMFrameDraw 3 +#define X_AppleWMDisableUpdate 4 +#define X_AppleWMReenableUpdate 5 +#define X_AppleWMSelectInput 6 +#define X_AppleWMSetWindowMenuCheck 7 +#define X_AppleWMSetFrontProcess 8 +#define X_AppleWMSetWindowLevel 9 +#define X_AppleWMSetCanQuit 10 +#define X_AppleWMSetWindowMenu 11 + +/* Events */ +#define AppleWMControllerNotify 0 +#define AppleWMActivationNotify 1 +#define AppleWMPasteboardNotify 2 +#define AppleWMNumberEvents 3 + +#define AppleWMControllerNotifyMask (1L << 0) +#define AppleWMActivationNotifyMask (1L << 1) +#define AppleWMPasteboardNotifyMask (1L << 2) + +/* "Kinds" of ControllerNotify events */ +#define AppleWMMinimizeWindow 0 +#define AppleWMZoomWindow 1 +#define AppleWMCloseWindow 2 +#define AppleWMBringAllToFront 3 +#define AppleWMHideWindow 4 +#define AppleWMHideAll 5 +#define AppleWMShowAll 6 +#define AppleWMWindowMenuItem 9 +#define AppleWMWindowMenuNotify 10 +#define AppleWMNextWindow 11 +#define AppleWMPreviousWindow 12 + +/* "Kinds" of ActivationNotify events */ +#define AppleWMIsActive 0 +#define AppleWMIsInactive 1 + +/* "Kinds" of PasteboardNotify events */ +#define AppleWMCopyToPasteboard 0 + +/* Errors */ +#define AppleWMClientNotLocal 0 +#define AppleWMOperationNotSupported 1 +#define AppleWMNumberErrors (AppleWMOperationNotSupported + 1) + +/* Window level ids */ +#define AppleWMWindowLevelNormal 0 +#define AppleWMWindowLevelFloating 1 +#define AppleWMWindowLevelTornOff 2 +#define AppleWMWindowLevelDock 3 +#define AppleWMWindowLevelDesktop 4 +#define AppleWMNumWindowLevels 5 + +#ifndef _APPLEWM_SERVER_ + +typedef struct { + int type; /* of event */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* window of event */ + Time time; /* server timestamp when event happened */ + int kind; /* subtype of event */ + int arg; +} XAppleWMNotifyEvent; + +_XFUNCPROTOBEGIN + +Bool XAppleWMQueryExtension (Display *dpy, int *event_base, int *error_base); + +Bool XAppleWMQueryVersion (Display *dpy, int *majorVersion, + int *minorVersion, int *patchVersion); + +Bool XAppleWMDisableUpdate (Display *dpy, int screen); + +Bool XAppleWMReenableUpdate (Display *dpy, int screen); + +Bool XAppleWMSelectInput (Display *dpy, unsigned long mask); + +Bool XAppleWMSetWindowMenu (Display *dpy, int nitems, const char **items); +Bool XAppleWMSetWindowMenuWithShortcuts (Display *dpy, int nitems, + const char **items, + const char *shortcuts); + +Bool XAppleWMSetWindowMenuCheck (Display *dpy, int index); + +Bool XAppleWMSetFrontProcess (Display *dpy); + +Bool XAppleWMSetWindowLevel (Display *dpy, Window id, int level); + +Bool XAppleWMSetCanQuit (Display *dpy, Bool state); + +Bool XAppleWMFrameGetRect (Display *dpy, + unsigned int frame_class, unsigned int frame_rect, + short inner_x, short inner_y, + short inner_w, short inner_h, + short outer_x, short outer_y, + short outer_w, short outer_h, + short *ret_x, short *ret_y, + short *ret_w, short *ret_h); + +unsigned int XAppleWMFrameHitTest (Display *dpy, + unsigned int frame_class, + short point_x, short point_y, + short inner_x, short inner_y, + short inner_w, short inner_h, + short outer_x, short outer_y, + short outer_w, short outer_h); + +Bool XAppleWMFrameDraw (Display *dpy, int screen, Window window, + unsigned int frame_class, unsigned int frame_attr, + short inner_x, short inner_y, + short inner_w, short inner_h, + short outer_x, short outer_y, + short outer_w, short outer_h, + unsigned int title_length, + const unsigned char * title_bytes); + +_XFUNCPROTOEND + +#endif /* _APPLEWM_SERVER_ */ +#endif /* _APPLEWM_H_ */ diff --git a/synfig-osx/launcher/applewmstr.h b/synfig-osx/launcher/applewmstr.h new file mode 100644 index 0000000..90f4345 --- /dev/null +++ b/synfig-osx/launcher/applewmstr.h @@ -0,0 +1,333 @@ +/* $XFree86: xc/lib/GL/dri/xf86dristr.h,v 1.9 2001/03/21 16:01:08 dawes Exp $ */ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright 2000 VA Linux Systems, Inc. +Copyright (c) 2002 Apple Computer, Inc. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin + * Jens Owen + * Rickard E. (Rik) Fiath + * + */ + +#ifndef _APPLEWMSTR_H_ +#define _APPLEWMSTR_H_ + +#include "applewm.h" + +#define APPLEWMNAME "Apple-WM" + +#define APPLE_WM_MAJOR_VERSION 1 /* current version numbers */ +#define APPLE_WM_MINOR_VERSION 0 +#define APPLE_WM_PATCH_VERSION 0 + +typedef struct _AppleWMQueryVersion { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_WMQueryVersion */ + CARD16 length B16; +} xAppleWMQueryVersionReq; +#define sz_xAppleWMQueryVersionReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 majorVersion B16; /* major version of WM protocol */ + CARD16 minorVersion B16; /* minor version of WM protocol */ + CARD32 patchVersion B32; /* patch version of WM protocol */ + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xAppleWMQueryVersionReply; +#define sz_xAppleWMQueryVersionReply 32 + +typedef struct _AppleWMQueryDirectRenderingCapable { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* X_WMQueryDirectRenderingCapable */ + CARD16 length B16; + CARD32 screen B32; +} xAppleWMQueryDirectRenderingCapableReq; +#define sz_xAppleWMQueryDirectRenderingCapableReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + BOOL isCapable; + BOOL pad2; + BOOL pad3; + BOOL pad4; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; + CARD32 pad8 B32; + CARD32 pad9 B32; +} xAppleDRIQueryDirectRenderingCapableReply; +#define sz_xAppleWMQueryDirectRenderingCapableReply 32 + +typedef struct _AppleWMAuthConnection { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_WMCloseConnection */ + CARD16 length B16; + CARD32 screen B32; + CARD32 magic B32; +} xAppleWMAuthConnectionReq; +#define sz_xAppleWMAuthConnectionReq 12 + +typedef struct { + BYTE type; + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 authenticated B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xAppleWMAuthConnectionReply; +#define zx_xAppleWMAuthConnectionReply 32 + +typedef struct _AppleWMCreateSurface { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_WMCreateSurface */ + CARD16 length B16; + CARD32 screen B32; + CARD32 drawable B32; + CARD32 client_id B32; +} xAppleWMCreateSurfaceReq; +#define sz_xAppleWMCreateSurfaceReq 16 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 key_0 B32; + CARD32 key_1 B32; + CARD32 uid B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xAppleWMCreateSurfaceReply; +#define sz_xAppleWMCreateSurfaceReply 32 + +typedef struct _AppleWMDestroySurface { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_WMDestroySurface */ + CARD16 length B16; + CARD32 screen B32; + CARD32 drawable B32; +} xAppleWMDestroySurfaceReq; +#define sz_xAppleWMDestroySurfaceReq 12 + +typedef struct _AppleWMDisableUpdate { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_WMDisableUpdate */ + CARD16 length B16; + CARD32 screen B32; +} xAppleWMDisableUpdateReq; +#define sz_xAppleWMDisableUpdateReq 8 + +typedef struct _AppleWMReenableUpdate { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_WMReenableUpdate */ + CARD16 length B16; + CARD32 screen B32; +} xAppleWMReenableUpdateReq; +#define sz_xAppleWMReenableUpdateReq 8 + +typedef struct _AppleWMSelectInput { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_WMSelectInput */ + CARD16 length B16; + CARD32 mask B32; +} xAppleWMSelectInputReq; +#define sz_xAppleWMSelectInputReq 8 + +typedef struct _AppleWMNotify { + BYTE type; /* always eventBase + event type */ + BYTE kind; + CARD16 sequenceNumber B16; + Time time B32; /* time of change */ + CARD16 pad1 B16; + CARD32 arg B32; + CARD32 pad3 B32; +} xAppleWMNotifyEvent; +#define sz_xAppleWMNotifyEvent 20 + +typedef struct _AppleWMSetWindowMenu { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_WMSetWindowMenu */ + CARD16 length B16; + CARD16 nitems B16; + CARD16 pad1 B16; +} xAppleWMSetWindowMenuReq; +#define sz_xAppleWMSetWindowMenuReq 8 + +typedef struct _AppleWMSetWindowMenuCheck { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_WMSetWindowMenuCheck */ + CARD16 length B16; + CARD32 index; +} xAppleWMSetWindowMenuCheckReq; +#define sz_xAppleWMSetWindowMenuCheckReq 8 + +typedef struct _AppleWMSetFrontProcess { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_WMSetFrontProcess */ + CARD16 length B16; +} xAppleWMSetFrontProcessReq; +#define sz_xAppleWMSetFrontProcessReq 4 + +typedef struct _AppleWMSetWindowLevel { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_WMSetWindowLevel */ + CARD16 length B16; + CARD32 window; + CARD32 level; +} xAppleWMSetWindowLevelReq; +#define sz_xAppleWMSetWindowLevelReq 12 + +typedef struct _AppleWMSetCanQuit { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_WMSetCanQuit */ + CARD16 length B16; + CARD32 state; +} xAppleWMSetCanQuitReq; +#define sz_xAppleWMSetCanQuitReq 8 + +typedef struct _AppleWMFrameGetRect { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_WMFrameGetRect */ + CARD16 length B16; + CARD16 frame_class B16; + CARD16 frame_rect B16; + CARD16 ix B16; + CARD16 iy B16; + CARD16 iw B16; + CARD16 ih B16; + CARD16 ox B16; + CARD16 oy B16; + CARD16 ow B16; + CARD16 oh B16; +} xAppleWMFrameGetRectReq; +#define sz_xAppleWMFrameGetRectReq 24 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 x B16; + CARD16 y B16; + CARD16 w B16; + CARD16 h B16; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xAppleWMFrameGetRectReply; +#define sz_xAppleWMFrameGetRectReply 32 + +typedef struct _AppleWMFrameHitTest { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_WMFrameHitTest */ + CARD16 length B16; + CARD16 frame_class B16; + CARD16 pad1 B16; + CARD16 px B16; + CARD16 py B16; + CARD16 ix B16; + CARD16 iy B16; + CARD16 iw B16; + CARD16 ih B16; + CARD16 ox B16; + CARD16 oy B16; + CARD16 ow B16; + CARD16 oh B16; +} xAppleWMFrameHitTestReq; +#define sz_xAppleWMFrameHitTestReq 28 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 ret B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xAppleWMFrameHitTestReply; +#define sz_xAppleWMFrameHitTestReply 32 + +typedef struct _AppleWMFrameDraw { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_WMFrameDraw */ + CARD16 length B16; + CARD32 screen B32; + CARD32 window B32; + CARD16 frame_class B16; + CARD16 frame_attr B16; + CARD16 ix B16; + CARD16 iy B16; + CARD16 iw B16; + CARD16 ih B16; + CARD16 ox B16; + CARD16 oy B16; + CARD16 ow B16; + CARD16 oh B16; + CARD32 title_length B32; +} xAppleWMFrameDrawReq; +#define sz_xAppleWMFrameDrawReq 36 + +#ifdef _APPLEWM_SERVER_ + +void AppleWMSendEvent ( +#if NeedFunctionPrototypes + int /* type */, + unsigned int /* mask */, + int /* which */, + int /* arg */ +#endif +); + +unsigned int AppleWMSelectedEvents ( +#if NeedFunctionPrototypes + void +#endif +); + +#endif /* _APPLEWM_SERVER_ */ +#endif /* _APPLEWMSTR_H_ */ diff --git a/synfig-osx/launcher/bundle-main.c b/synfig-osx/launcher/bundle-main.c new file mode 100644 index 0000000..2e0add2 --- /dev/null +++ b/synfig-osx/launcher/bundle-main.c @@ -0,0 +1,908 @@ +/* bundle-main.c -- X server launcher + $Id: bundle-main.c,v 1.17 2003/09/11 00:17:10 jharper Exp $ + + Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. + + Parts of this file are derived from xdm, which has this copyright: + + Copyright 1988, 1998 The Open Group + + Permission to use, copy, modify, distribute, and sell this software + and its documentation for any purpose is hereby granted without fee, + provided that the above copyright notice appear in all copies and + that both that copyright notice and this permission notice appear in + supporting documentation. + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of The Open Group shall + not be used in advertising or otherwise to promote the sale, use or + other dealings in this Software without prior written authorization + from The Open Group. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#define X_SERVER "/usr/X11R6/bin/Xquartz" +#define XTERM_PATH "/usr/X11R6/bin/xterm" +#define WM_PATH "/usr/X11R6/bin/quartz-wm" +#define DEFAULT_XINITRC "/usr/X11R6/lib/X11/xinit/xinitrc" +#include + +/* what xinit does */ +#ifndef SHELL +# define SHELL "sh" +#endif + +#undef FALSE +#define FALSE 0 +#undef TRUE +#define TRUE 1 + +#define MAX_DISPLAYS 64 + +static int server_pid = -1, client_pid = -1; +static int xinit_kills_server = FALSE; +static jmp_buf exit_continuation; +static const char *server_name = NULL; +static Display *server_dpy; + +static char *auth_file; + +typedef struct addr_list_struct addr_list; + +struct addr_list_struct { + addr_list *next; + Xauth auth; +}; + +static addr_list *addresses; + + +/* Utility functions. */ + +/* Return the current host name. Matches what Xlib does. */ +static char * +host_name (void) +{ +#ifdef NEED_UTSNAME + static struct utsname name; + + uname(&name); + + return name.nodename; +#else + static char buf[100]; + + gethostname(buf, sizeof(buf)); + + return buf; +#endif +} + +static int +read_boolean_pref (CFStringRef name, int default_) +{ + int value; + Boolean ok; + + value = CFPreferencesGetAppBooleanValue (name, + CFSTR ("com.apple.x11"), &ok); + return ok ? value : default_; +} + +static inline int +binary_equal (const void *a, const void *b, int length) +{ + return memcmp (a, b, length) == 0; +} + +static inline void * +binary_dup (const void *a, int length) +{ + void *b = malloc (length); + if (b != NULL) + memcpy (b, a, length); + return b; +} + +static inline void +binary_free (void *data, int length) +{ + if (data != NULL) + free (data); +} + + +/* Functions for managing the authentication entries. */ + +/* Returns true if something matching AUTH is in our list of auth items */ +static int +check_auth_item (Xauth *auth) +{ + addr_list *a; + + for (a = addresses; a != NULL; a = a->next) + { + if (a->auth.family == auth->family + && a->auth.address_length == auth->address_length + && binary_equal (a->auth.address, auth->address, auth->address_length) + && a->auth.number_length == auth->number_length + && binary_equal (a->auth.number, auth->number, auth->number_length) + && a->auth.name_length == auth->name_length + && binary_equal (a->auth.name, auth->name, auth->name_length)) + { + return TRUE; + } + } + + return FALSE; +} + +/* Add one item to our list of auth items. */ +static void +add_auth_item (Xauth *auth) +{ + addr_list *a = malloc (sizeof (addr_list)); + + a->auth.family = auth->family; + a->auth.address_length = auth->address_length; + a->auth.address = binary_dup (auth->address, auth->address_length); + a->auth.number_length = auth->number_length; + a->auth.number = binary_dup (auth->number, auth->number_length); + a->auth.name_length = auth->name_length; + a->auth.name = binary_dup (auth->name, auth->name_length); + a->auth.data_length = auth->data_length; + a->auth.data = binary_dup (auth->data, auth->data_length); + + a->next = addresses; + addresses = a; +} + +/* Free all allocated auth items. */ +static void +free_auth_items (void) +{ + addr_list *a; + + while ((a = addresses) != NULL) + { + addresses = a->next; + + binary_free (a->auth.address, a->auth.address_length); + binary_free (a->auth.number, a->auth.number_length); + binary_free (a->auth.name, a->auth.name_length); + binary_free (a->auth.data, a->auth.data_length); + free (a); + } +} + +/* Add the unix domain auth item. */ +static void +define_local (Xauth *auth) +{ + char *host = host_name (); + +#ifdef DEBUG + fprintf (stderr, "x11: hostname is %s\n", host); +#endif + + auth->family = FamilyLocal; + auth->address_length = strlen (host); + auth->address = host; + + add_auth_item (auth); +} + +/* Add the tcp auth item. */ +static void +define_named (Xauth *auth, const char *name) +{ + struct ifaddrs *addrs, *ptr; + + if (getifaddrs (&addrs) != 0) + return; + + for (ptr = addrs; ptr != NULL; ptr = ptr->ifa_next) + { + if (ptr->ifa_addr->sa_family != AF_INET) + continue; + + auth->family = FamilyInternet; + auth->address_length = sizeof (struct sockaddr_in); + auth->address = (char *) &(((struct sockaddr_in *) ptr->ifa_addr)->sin_addr); + +#ifdef DEBUG + fprintf (stderr, "x11: ipaddr is %d.%d.%d.%d\n", + (unsigned char) auth->address[0], + (unsigned char) auth->address[1], + (unsigned char) auth->address[2], + (unsigned char) auth->address[3]); +#endif + + add_auth_item (auth); + } + + freeifaddrs (addrs); +} + +/* Parse the display number from NAME and add it to AUTH. */ +static void +set_auth_number (Xauth *auth, const char *name) +{ + char *colon; + char *dot, *number; + + colon = strrchr(name, ':'); + if (colon != NULL) + { + colon++; + dot = strchr(colon, '.'); + + if (dot != NULL) + auth->number_length = dot - colon; + else + auth->number_length = strlen (colon); + + number = malloc (auth->number_length + 1); + if (number != NULL) + { + strncpy (number, colon, auth->number_length); + number[auth->number_length] = '\0'; + } + else + { + auth->number_length = 0; + } + + auth->number = number; + } +} + +/* Put 128 bits of random data into DATA. If possible, it will be "high + quality" */ +static int +generate_mit_magic_cookie (char data[16]) +{ + int fd, ret, i; + long *ldata = (long *) data; + + fd = open ("/dev/random", O_RDONLY); + if (fd > 0) + { + ret = read (fd, data, 16); + if (ret == 16) + return TRUE; + + close (fd); + } + + /* fall back to the usual crappy rng */ + + srand48 (getpid () ^ time (NULL)); + + for (i = 0; i < 4; i++) + ldata[i] = lrand48 (); + + return TRUE; +} + +/* Create the keys we'll be using for the display named NAME. */ +static int +make_auth_keys (const char *name) +{ + Xauth auth; + char key[16]; + + if (auth_file == NULL) + return FALSE; + + auth.name = "MIT-MAGIC-COOKIE-1"; + auth.name_length = strlen (auth.name); + + if (!generate_mit_magic_cookie (key)) + { + auth_file = NULL; + return FALSE; + } + + auth.data = key; + auth.data_length = 16; + + set_auth_number (&auth, name); + + define_named (&auth, host_name ()); + define_local (&auth); + + free (auth.number); + + return TRUE; +} + +/* If ADD-ENTRIES is true, merge our auth entries into the existing + Xauthority file. If ADD-ENTRIES is false, remove our entries. */ +static int +write_auth_file (int add_entries) +{ + char *home, newname[1024]; + int fd, ret; + FILE *new_fh, *old_fh; + addr_list *addr; + Xauth *auth; + + if (auth_file == NULL) + return FALSE; + + home = getenv ("HOME"); + if (home == NULL) + { + auth_file = NULL; + return FALSE; + } + + snprintf (newname, sizeof (newname), "%s/.XauthorityXXXXXX", home); + mktemp (newname); + + if (XauLockAuth (auth_file, 1, 2, 10) != LOCK_SUCCESS) + { + /* FIXME: do something here? */ + + auth_file = NULL; + return FALSE; + } + + fd = open (newname, O_WRONLY | O_CREAT | O_TRUNC, 0600); + if (fd >= 0) + { + new_fh = fdopen (fd, "w"); + if (new_fh != NULL) + { + if (add_entries) + { + for (addr = addresses; addr != NULL; addr = addr->next) + { + XauWriteAuth (new_fh, &addr->auth); + } + } + + old_fh = fopen (auth_file, "r"); + if (old_fh != NULL) + { + while ((auth = XauReadAuth (old_fh)) != NULL) + { + if (!check_auth_item (auth)) + XauWriteAuth (new_fh, auth); + XauDisposeAuth (auth); + } + fclose (old_fh); + } + + fclose (new_fh); + unlink (auth_file); + + ret = rename (newname, auth_file); + + if (ret != 0) + auth_file = NULL; + + XauUnlockAuth (auth_file); + return ret == 0; + } + + close (fd); + } + + XauUnlockAuth (auth_file); + auth_file = NULL; + return FALSE; +} + + +/* Subprocess management functions. */ + +static int +start_server (char **xargv) +{ + int child; + + child = fork (); + + switch (child) + { + case -1: /* error */ + perror ("fork"); + return FALSE; + + case 0: /* child */ + execv (X_SERVER, xargv); + perror ("Couldn't exec " X_SERVER); + _exit (1); + + default: /* parent */ + server_pid = child; + return TRUE; + } +} + +static int +wait_for_server (void) +{ + int count = 100; + + while (count-- > 0) + { + int status; + + server_dpy = XOpenDisplay (server_name); + if (server_dpy != NULL) + return TRUE; + + if (waitpid (server_pid, &status, WNOHANG) == server_pid) + return FALSE; + + sleep (1); + } + + return FALSE; +} + +static int +start_client (void) +{ + int child; + + child = fork (); + + switch (child) + { + char *tem, buf[1024]; + + case -1: /* error */ + perror ("fork"); + return FALSE; + + case 0: /* child */ + /* cd $HOME */ + tem = getenv ("HOME"); + if (tem != NULL) + chdir (tem); + + /* Setup environment */ + + setenv ("DISPLAY", server_name, TRUE); + tem = getenv ("PATH"); + if (tem != NULL && tem[0] != NULL) + snprintf (buf, sizeof (buf), "%s:/usr/X11R6/bin", tem); + else + snprintf (buf, sizeof (buf), "/bin:/usr/bin:/usr/X11R6/bin"); + setenv ("PATH", buf, TRUE); + +#if 1 + setenv("GTK_USE_XFT","1",0); + system(WM_PATH " &"); + execl("/usr/local/bin/synfigstudio","/usr/local/bin/synfigstudio",NULL); + +#else + /* First look for .xinitrc in user's home directory. */ + + tem = getenv ("HOME"); + if (tem != NULL) + { + snprintf (buf, sizeof (buf), "%s/.xinitrc", tem); + if (access (buf, R_OK) == 0) + execlp (SHELL, SHELL, buf, NULL); + } + + /* Then try the default xinitrc in the lib directory. */ + + if (access (DEFAULT_XINITRC, R_OK) == 0) + execlp (SHELL, SHELL, DEFAULT_XINITRC, NULL); + + /* Then fallback to hardcoding an xterm and the window manager. */ + + system (XTERM_PATH " &"); + execl (WM_PATH, WM_PATH, NULL); + +#endif + perror ("exec"); + _exit (1); + + default: /* parent */ + client_pid = child; + return TRUE; + } +} + +static void +sigchld_handler (int sig) +{ + int pid, status; + +again: + pid = waitpid (WAIT_ANY, &status, WNOHANG); + + if (pid > 0) + { + if (pid == server_pid) + { + server_pid = -1; + + if (client_pid >= 0) + kill (client_pid, SIGTERM); + } + else if (pid == client_pid) + { + client_pid = -1; + + if (server_pid >= 0 && xinit_kills_server) + kill (server_pid, SIGTERM); + } + goto again; + } + + if (server_pid == -1 && client_pid == -1) + longjmp (exit_continuation, 1); + + signal (SIGCHLD, sigchld_handler); +} + + +/* Server utilities. */ + +static Boolean +display_exists_p (int number) +{ + char buf[64]; + void *conn; + char *fullname = NULL; + int idisplay, iscreen; + char *conn_auth_name, *conn_auth_data; + int conn_auth_namelen, conn_auth_datalen; + + extern void *_X11TransConnectDisplay (); + extern void _XDisconnectDisplay (); + + /* Since connecting to the display waits for a few seconds if the + display doesn't exist, check for trivial non-existence - if the + socket in /tmp exists or not.. (note: if the socket exists, the + server may still not, so we need to try to connect in that case..) */ + + sprintf (buf, "/tmp/.X11-unix/X%d", number); + if (access (buf, F_OK) != 0) + return FALSE; + + /* This is a private function that we shouldn't really be calling, + but it's the best way to see if the server exists (without + needing to hold the necessary authentication to use it) */ + + sprintf (buf, ":%d", number); + conn = _X11TransConnectDisplay (buf, &fullname, &idisplay, &iscreen, + &conn_auth_name, &conn_auth_namelen, + &conn_auth_data, &conn_auth_datalen); + if (conn == NULL) + return FALSE; + + _XDisconnectDisplay (conn); + return TRUE; +} + + +/* Monitoring when the system's ip addresses change. */ + +static Boolean pending_timer; + +static void +timer_callback (CFRunLoopTimerRef timer, void *info) +{ + pending_timer = FALSE; + + /* Update authentication names. Need to write .Xauthority file first + without the existing entries, then again with the new entries.. */ + + write_auth_file (FALSE); + + free_auth_items (); + make_auth_keys (server_name); + + write_auth_file (TRUE); +} + +/* This function is called when the system's ip addresses may have changed. */ +static void +ipaddr_callback (SCDynamicStoreRef store, CFArrayRef changed_keys, void *info) +{ + if (auth_file != NULL && !pending_timer) + { + CFRunLoopTimerRef timer; + + timer = CFRunLoopTimerCreate (NULL, CFAbsoluteTimeGetCurrent () + 1.0, + 0.0, 0, 0, timer_callback, NULL); + CFRunLoopAddTimer (CFRunLoopGetCurrent (), timer, + kCFRunLoopDefaultMode); + CFRelease (timer); + + pending_timer = TRUE; + } +} + +/* This code adapted from "Living in a Dynamic TCP/IP Environment" technote. */ +static Boolean +install_ipaddr_source (void) +{ + CFRunLoopSourceRef source = NULL; + + SCDynamicStoreContext context = {0}; + SCDynamicStoreRef ref; + + ref = SCDynamicStoreCreate (NULL, + CFSTR ("AddIPAddressListChangeCallbackSCF"), + ipaddr_callback, &context); + + if (ref != NULL) + { + const void *keys[2]; + + /* This should tell us when any IPV4 address changes */ + keys[0] = (SCDynamicStoreKeyCreateNetworkServiceEntity + (NULL, kSCDynamicStoreDomainState, + kSCCompAnyRegex, kSCEntNetIPv4)); + + /* This should tell us when the hostname(s) change */ + keys[1] = SCDynamicStoreKeyCreateHostNames (NULL); + + if (keys[0] != NULL && keys[1] != NULL) + { + CFArrayRef pattern_array; + + pattern_array = CFArrayCreate (NULL, keys, 2, + &kCFTypeArrayCallBacks); + + if (pattern_array != NULL) + { + SCDynamicStoreSetNotificationKeys (ref, NULL, pattern_array); + source = SCDynamicStoreCreateRunLoopSource (NULL, ref, 0); + + CFRelease (pattern_array); + } + + if (keys[0] != NULL) + CFRelease (keys[0]); + if (keys[1] != NULL) + CFRelease (keys[1]); + } + + CFRelease (ref); + } + + if (source != NULL) + { + CFRunLoopAddSource (CFRunLoopGetCurrent (), + source, kCFRunLoopDefaultMode); + CFRelease (source); + } + + return source != NULL; +} + + + +/* Entrypoint. */ +int +main (int argc, char **argv) +{ + char **xargv; + int i, j; + int fd; + + + + + + + xargv = alloca (sizeof (char *) * (argc + 32)); + + if (!read_boolean_pref (CFSTR ("no_auth"), FALSE)) + auth_file = XauFileName (); + + /* The standard X11 behaviour is for the server to quit when the first + client exits. But it can be useful for debugging (and to mimic our + behaviour in the beta releases) to not do that. */ + + xinit_kills_server = read_boolean_pref (CFSTR ("xinit_kills_server"), TRUE); + + for (i = 1; i < argc; i++) + { + if (argv[i][0] == ':') + server_name = argv[i]; + } + + if (server_name == NULL) + { + static char name[8]; + + /* No display number specified, so search for the first unused. + + There's a big old race condition here if two servers start at + the same time, but that's fairly unlikely. We could create + lockfiles or something, but that's seems more likely to cause + problems than the race condition itself.. */ + + for (i = 2; i < MAX_DISPLAYS; i++) + { + if (!display_exists_p (i)) + break; + } + + if (i == MAX_DISPLAYS) + { + fprintf (stderr, "%s: couldn't allocate a display number", argv[0]); + exit (1); + } + + sprintf (name, ":%d", i); + server_name = name; + } + + if (auth_file != NULL) + { + /* Create new Xauth keys and add them to the .Xauthority file */ + + make_auth_keys (server_name); + write_auth_file (TRUE); + } + + /* Construct our new argv */ + + i = j = 0; + + xargv[i++] = argv[j++]; + + if (auth_file != NULL) + { + xargv[i++] = "-auth"; + xargv[i++] = auth_file; + } + + /* By default, don't listen on tcp sockets if Xauth is disabled. */ + + if (read_boolean_pref (CFSTR ("nolisten_tcp"), auth_file == NULL)) + { + xargv[i++] = "-nolisten"; + xargv[i++] = "tcp"; + } + + while (j < argc) + { + if (argv[j++][0] != ':') + xargv[i++] = argv[j-1]; + } + + xargv[i++] = (char *) server_name; + xargv[i++] = NULL; + + /* Detach from any controlling terminal and connect stdin to /dev/null */ + +#ifdef TIOCNOTTY + fd = open ("/dev/tty", O_RDONLY); + if (fd != -1) + { + ioctl (fd, TIOCNOTTY, 0); + close (fd); + } +#endif + + fd = open ("/dev/null", O_RDWR, 0); + if (fd >= 0) + { + dup2 (fd, 0); + if (fd > 0) + close (fd); + } + + if (!start_server (xargv)) + return 1; + + if (!wait_for_server ()) + { + kill (server_pid, SIGTERM); + return 1; + } + + if (!start_client ()) + { + kill (server_pid, SIGTERM); + return 1; + } + + signal (SIGCHLD, sigchld_handler); + + if (NSIsSymbolNameDefined("_ASKInitialize")) + { + NSSymbol *symbol = NSLookupAndBindSymbol("_ASKInitialize"); + if (symbol) + { + void (*initializeASKFunc)(void) = NSAddressOfSymbol(symbol); + if (initializeASKFunc) + { + initializeASKFunc(); + } + else + return 666; + } + else return 667; + }else + return 668; + + if (setjmp (exit_continuation) == 0) + { + if (install_ipaddr_source ()) + CFRunLoopRun (); + else + while (1) pause (); + } + + signal (SIGCHLD, SIG_IGN); + + if (auth_file != NULL) + { + /* Remove our Xauth keys */ + + write_auth_file (FALSE); + } + + free_auth_items (); + + return 0; +} diff --git a/synfig-osx/launcher/darwin-input.c b/synfig-osx/launcher/darwin-input.c new file mode 100644 index 0000000..e4c79b7 --- /dev/null +++ b/synfig-osx/launcher/darwin-input.c @@ -0,0 +1,216 @@ +/* darwin-input.c -- code to manage the input event queue + $Id: darwin-input.c,v 1.4 2002/12/13 00:22:51 jharper Exp $ */ + +/* + * Copyright (c) 2001-2002 Torrey T. Lyons. All Rights Reserved. + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in this Software without prior written authorization. + */ + +#include "darwin.h" + +#include "mipointer.h" // mi software cursor + +#include + +#define QUEUE_SIZE 256 + +static struct { + pthread_mutex_t mutex; + + /* DIX looks at these two integer values, when they're equal + it won't call ProcessInputEvents (). */ + HWEventQueueType head, tail; + + xEvent events[QUEUE_SIZE]; +} event_queue; + +/* fd[0] = reading, fd[1] = writing */ +static int event_fd[2]; + +void +DarwinEnqueueEvent (const xEvent *e) +{ + int newtail, oldtail; + int need_write = FALSE; + + pthread_mutex_lock (&event_queue.mutex); + + oldtail = (event_queue.tail - 1) % QUEUE_SIZE; + + if (e->u.u.type == MotionNotify + && event_queue.tail != event_queue.head + && event_queue.events[oldtail].u.u.type == MotionNotify) + { + /* Two adjacent motion notify events. Coalesce them. */ + + memcpy (&event_queue.events[oldtail], e, sizeof (xEvent)); + } + else + { + newtail = (event_queue.tail + 1) % QUEUE_SIZE; + + if (newtail != event_queue.head) + { + memcpy (&event_queue.events[event_queue.tail], e, sizeof (xEvent)); + event_queue.tail = newtail; + need_write = TRUE; + } + } + + pthread_mutex_unlock (&event_queue.mutex); + + if (need_write) + write (event_fd[1], &need_write, sizeof (need_write)); +} + +Bool +DarwinDequeueEvent (xEvent *e) +{ + Bool ret = FALSE; + int unused; + + pthread_mutex_lock (&event_queue.mutex); + + if (event_queue.head != event_queue.tail) + { + memcpy (e, &event_queue.events[event_queue.head], sizeof (xEvent)); + event_queue.head = (event_queue.head + 1) % QUEUE_SIZE; + ret = TRUE; + } + + pthread_mutex_unlock (&event_queue.mutex); + + if (ret) + read (event_fd[0], &unused, sizeof (unused)); + + return ret; +} + +void +DarwinInputPreInit (void) +{ + if (pipe (event_fd) != 0) + { + perror ("pipe"); + exit (1); + } + + event_queue.head = event_queue.tail = 0; + pthread_mutex_init (&event_queue.mutex, NULL); +} + +void +DarwinInputInit (void) +{ + SetInputCheck (&event_queue.head, &event_queue.tail); +} + + +/* + ============================================================================= + + mouse and keyboard callbacks + + ============================================================================= +*/ + +/* + * DarwinChangePointerControl + * Set mouse acceleration and thresholding + * FIXME: We currently ignore the threshold in ctrl->threshold. + */ +static void DarwinChangePointerControl(DeviceIntPtr device, PtrCtrl *ctrl) +{ + /* do nothing here */ +} + + +/* + * DarwinMouseProc + * Handle the initialization, etc. of a mouse + */ + +int DarwinMouseProc(DeviceIntPtr pPointer, int what) +{ + char map[6]; + + switch (what) { + + case DEVICE_INIT: + pPointer->public.on = FALSE; + + // Set button map. + map[1] = 1; + map[2] = 2; + map[3] = 3; + map[4] = 4; + map[5] = 5; + InitPointerDeviceStruct( (DevicePtr)pPointer, + map, + 5, // numbuttons (4 & 5 are scroll wheel) + miPointerGetMotionEvents, + DarwinChangePointerControl, + 0 ); + break; + + case DEVICE_ON: + pPointer->public.on = TRUE; + AddEnabledDevice(event_fd[0]); + return Success; + + case DEVICE_CLOSE: + case DEVICE_OFF: + pPointer->public.on = FALSE; + RemoveEnabledDevice(event_fd[0]); + return Success; + } + + return Success; +} + +/* + * DarwinKeybdProc + * Callback from X + */ +int DarwinKeybdProc(DeviceIntPtr pDev, int onoff) +{ + switch ( onoff ) { + case DEVICE_INIT: + DarwinKeyboardInit( pDev ); + break; + case DEVICE_ON: + pDev->public.on = TRUE; + AddEnabledDevice(event_fd[0]); + break; + case DEVICE_OFF: + pDev->public.on = FALSE; + RemoveEnabledDevice(event_fd[0]); + break; + case DEVICE_CLOSE: + break; + } + + return Success; +} diff --git a/synfig-osx/launcher/darwin-keyboard.c b/synfig-osx/launcher/darwin-keyboard.c new file mode 100644 index 0000000..0e8594e --- /dev/null +++ b/synfig-osx/launcher/darwin-keyboard.c @@ -0,0 +1,301 @@ +/* darwin-keyboard.c -- Keyboard support for the Darwin X Server + + Copyright (c) 2001-2002 Torrey T. Lyons. All Rights Reserved. + Copyright (c) 2003 Apple Computer, Inc. All Rights Reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/* $XFree86: xc/programs/Xserver/hw/darwin/darwinKeyboard.c,v 1.16 2002/03/28 02:21:08 torrey Exp $ */ + + +/* An X keyCode must be in the range XkbMinLegalKeyCode (8) to + XkbMaxLegalKeyCode(255). + + The keyCodes we get from the kernel range from 0 to 127, so we need to + offset the range before passing the keyCode to X. + + An X KeySym is an extended ascii code that is device independent. + + The modifier map is accessed by the keyCode, but the normal map is + accessed by keyCode - MIN_KEYCODE. Sigh. */ + + +/* Define this to get a diagnostic output to stderr which is helpful + in determining how the X server is interpreting the Darwin keymap. */ +#undef DUMP_DARWIN_KEYMAP + +/* Define this to use Alt for Mode_switch. */ +#define ALT_IS_MODE_SWITCH 1 + +#include "darwin.h" +#include "darwin-keyboard.h" + +#include +#include +#include "darwin.h" +#include "quartz-audio.h" + +/* For NX_ constants */ +#include +#include + +#include "keysym.h" + +static darwin_keyboard_info info; + +static void +DarwinChangeKeyboardControl (DeviceIntPtr device, KeybdCtrl *ctrl) +{ + /* keyclick, bell volume / pitch, autorepeat, LED's */ +} + +/* Use the key_map field of INFO to populate the mod_map and + modifier_keycodes fields */ +static void +build_modifier_maps (darwin_keyboard_info *info) +{ + int i; + KeySym *k; + + memset (info->mod_map, NoSymbol, sizeof (info->mod_map)); + memset (info->modifier_keycodes, 0, sizeof (info->modifier_keycodes)); + + for (i = 0; i < NUM_KEYCODES; i++) + { + k = info->key_map + i * GLYPHS_PER_KEY; + + switch (k[0]) + { + case XK_Shift_L: + info->modifier_keycodes[NX_MODIFIERKEY_SHIFT][0] = i; + info->mod_map[MIN_KEYCODE + i] = ShiftMask; + break; + + case XK_Shift_R: + info->modifier_keycodes[NX_MODIFIERKEY_SHIFT][1] = i; + info->mod_map[MIN_KEYCODE + i] = ShiftMask; + break; + + case XK_Control_L: + info->modifier_keycodes[NX_MODIFIERKEY_CONTROL][0] = i; + info->mod_map[MIN_KEYCODE + i] = ControlMask; + break; + + case XK_Control_R: + info->modifier_keycodes[NX_MODIFIERKEY_CONTROL][1] = i; + info->mod_map[MIN_KEYCODE + i] = ControlMask; + break; + + case XK_Caps_Lock: + info->modifier_keycodes[NX_MODIFIERKEY_ALPHALOCK][0] = i; + info->mod_map[MIN_KEYCODE + i] = LockMask; + break; + + case XK_Alt_L: + info->modifier_keycodes[NX_MODIFIERKEY_ALTERNATE][0] = i; + info->mod_map[MIN_KEYCODE + i] = Mod1Mask; + break; + + case XK_Alt_R: + info->modifier_keycodes[NX_MODIFIERKEY_ALTERNATE][1] = i; + info->mod_map[MIN_KEYCODE + i] = Mod1Mask; + break; + + case XK_Mode_switch: + info->mod_map[MIN_KEYCODE + i] = Mod1Mask; + break; + + case XK_Meta_L: + info->modifier_keycodes[NX_MODIFIERKEY_COMMAND][0] = i; + info->mod_map[MIN_KEYCODE + i] = Mod2Mask; + break; + + case XK_Meta_R: + info->modifier_keycodes[NX_MODIFIERKEY_COMMAND][1] = i; + info->mod_map[MIN_KEYCODE + i] = Mod2Mask; + break; + + case XK_Num_Lock: + info->mod_map[MIN_KEYCODE + i] = Mod3Mask; + break; + } + + if (darwinSwapAltMeta) + { + switch (k[0]) + { + case XK_Alt_L: + k[0] = XK_Meta_L; break; + case XK_Alt_R: + k[0] = XK_Meta_R; break; + case XK_Meta_L: + k[0] = XK_Alt_L; break; + case XK_Meta_R: + k[0] = XK_Alt_R; break; + } + } + +#if ALT_IS_MODE_SWITCH + if (k[0] == XK_Alt_L || k[0] == XK_Alt_R) + k[0] = XK_Mode_switch; +#endif + } +} + +static void +load_keyboard_mapping (KeySymsRec *keysyms) +{ + memset (info.key_map, 0, sizeof (info.key_map)); + + if (darwinKeymapFile == NULL + || !DarwinParseKeymapFile (&info)) + { + /* Load the system keymapping. */ + + DarwinReadSystemKeymap (&info); + } + + build_modifier_maps (&info); + +#ifdef DUMP_DARWIN_KEYMAP + ErrorF("Darwin -> X converted keyboard map\n"); + for (i = 0, k = map; i < NX_NUMKEYCODES; i++, k += GLYPHS_PER_KEY) { + int j; + ErrorF("0x%02x:", i); + for (j = 0; j < GLYPHS_PER_KEY; j++) { + if (k[j] == NoSymbol) { + ErrorF("\tNoSym"); + } else { + ErrorF("\t0x%x", k[j]); + } + } + ErrorF("\n"); + } +#endif + + keysyms->map = info.key_map; + keysyms->mapWidth = GLYPHS_PER_KEY; + keysyms->minKeyCode = MIN_KEYCODE; + keysyms->maxKeyCode = MAX_KEYCODE; +} + +/* Get the Darwin keyboard map and compute an equivalent X keyboard map + and modifier map. Set the new keyboard device structure. */ +void +DarwinKeyboardInit (DeviceIntPtr pDev) +{ + KeySymsRec keysyms; + BellProcPtr bellProc; + + load_keyboard_mapping (&keysyms); + + /* Initialize the seed, so we don't reload the keymap unnecessarily + (and possibly overwrite xinitrc changes) */ + DarwinSystemKeymapSeed (); + + bellProc = QuartzBell; + + InitKeyboardDeviceStruct ((DevicePtr) pDev, &keysyms, info.mod_map, + bellProc, DarwinChangeKeyboardControl); +} + +/* Borrowed from dix/devices.c */ +static Bool +InitModMap(register KeyClassPtr keyc) +{ + int i, j; + CARD8 keysPerModifier[8]; + CARD8 mask; + + if (keyc->modifierKeyMap != NULL) + xfree (keyc->modifierKeyMap); + + keyc->maxKeysPerModifier = 0; + for (i = 0; i < 8; i++) + keysPerModifier[i] = 0; + for (i = 8; i < MAP_LENGTH; i++) + { + for (j = 0, mask = 1; j < 8; j++, mask <<= 1) + { + if (mask & keyc->modifierMap[i]) + { + if (++keysPerModifier[j] > keyc->maxKeysPerModifier) + keyc->maxKeysPerModifier = keysPerModifier[j]; + } + } + } + keyc->modifierKeyMap = (KeyCode *)xalloc(8*keyc->maxKeysPerModifier); + if (!keyc->modifierKeyMap && keyc->maxKeysPerModifier) + return (FALSE); + bzero((char *)keyc->modifierKeyMap, 8*(int)keyc->maxKeysPerModifier); + for (i = 0; i < 8; i++) + keysPerModifier[i] = 0; + for (i = 8; i < MAP_LENGTH; i++) + { + for (j = 0, mask = 1; j < 8; j++, mask <<= 1) + { + if (mask & keyc->modifierMap[i]) + { + keyc->modifierKeyMap[(j*keyc->maxKeysPerModifier) + + keysPerModifier[j]] = i; + keysPerModifier[j]++; + } + } + } + return TRUE; +} + +void +DarwinKeyboardReload (DeviceIntPtr pDev) +{ + KeySymsRec keysyms; + + load_keyboard_mapping (&keysyms); + + if (SetKeySymsMap (&pDev->key->curKeySyms, &keysyms)) + { + /* now try to update modifiers. */ + + memmove (pDev->key->modifierMap, info.mod_map, MAP_LENGTH); + InitModMap (pDev->key); + } + + SendMappingNotify (MappingKeyboard, MIN_KEYCODE, NUM_KEYCODES, 0); + SendMappingNotify (MappingModifier, 0, 0, 0); +} + +/* Return the keycode for an NX_MODIFIERKEY_* modifier. side = 0 for left + or 1 for right. Returns 0 if key+side is not a known modifier. */ +int +DarwinModifierNXKeyToNXKeycode (int key, int side) +{ + return info.modifier_keycodes[key][side]; +} + +/* This allows the ddx layer to prevent some keys from being remapped + as modifier keys. */ +Bool +LegalModifier (unsigned int key, DevicePtr pDev) +{ + return 1; +} diff --git a/synfig-osx/launcher/darwin-keyboard.h b/synfig-osx/launcher/darwin-keyboard.h new file mode 100644 index 0000000..7e31b26 --- /dev/null +++ b/synfig-osx/launcher/darwin-keyboard.h @@ -0,0 +1,58 @@ +/* darwin-keyboard.h + $Id: darwin-keyboard.h,v 1.1 2003/01/22 01:54:10 jharper Exp $ + + Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. */ + +#ifndef DARWIN_KEYBOARD_H +#define DARWIN_KEYBOARD_H 1 + +#include "X.h" + +/* Each key can generate 4 glyphs. They are, in order: + unshifted, shifted, modeswitch unshifted, modeswitch shifted */ + +#ifndef MIN_KEYCODE +# define MIN_KEYCODE 8 +#endif + +#define GLYPHS_PER_KEY 4 +#define NUM_KEYCODES 248 +#define MAX_KEYCODE NUM_KEYCODES + MIN_KEYCODE - 1 + +typedef struct darwin_keyboard_info_struct darwin_keyboard_info; + +struct darwin_keyboard_info_struct { + unsigned char mod_map[MAX_KEYCODE+1]; + KeySym key_map[NUM_KEYCODES * GLYPHS_PER_KEY]; + unsigned char modifier_keycodes[32][2]; +}; + +extern int DarwinReadSystemKeymap (darwin_keyboard_info *info); +extern int DarwinParseKeymapFile (darwin_keyboard_info *info); + +#endif /* DARWIN_KEYBOARD_H */ diff --git a/synfig-osx/launcher/darwin-new-keymap.c b/synfig-osx/launcher/darwin-new-keymap.c new file mode 100644 index 0000000..1109bae --- /dev/null +++ b/synfig-osx/launcher/darwin-new-keymap.c @@ -0,0 +1,364 @@ +/* darwin-new-keymap.c -- code to build a keymap from the system + $Id: darwin-new-keymap.c,v 1.7 2003/02/21 22:33:19 jharper Exp $ + + Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. */ + + +#define Cursor X_Cursor +# include "darwin-keyboard.h" +# include "keysym.h" +#undef Cursor + +#include +#include + +#include "keysym2ucs.h" + +#define HACK_MISSING 1 +#define HACK_KEYPAD 1 + +enum { + MOD_COMMAND = 256, + MOD_SHIFT = 512, + MOD_OPTION = 2048, + MOD_CONTROL = 4096, +}; + +#define UKEYSYM(u) ((u) | 0x01000000) + +/* Table of keycode->keysym mappings we use to fallback on for important + keys that are often not in the Unicode mapping. */ + +const static struct { + unsigned short keycode; + KeySym keysym; +} known_keys[] = { + {55, XK_Meta_L}, + {56, XK_Shift_L}, + {57, XK_Caps_Lock}, + {58, XK_Alt_L}, + {59, XK_Control_L}, + {60, XK_Shift_R}, + {61, XK_Alt_R}, + {62, XK_Control_R}, + + {122, XK_F1}, + {120, XK_F2}, + {99, XK_F3}, + {118, XK_F4}, + {96, XK_F5}, + {97, XK_F6}, + {98, XK_F7}, + {100, XK_F8}, + {101, XK_F9}, + {109, XK_F10}, + {103, XK_F11}, + {111, XK_F12}, + {105, XK_F13}, + {107, XK_F14}, + {113, XK_F15}, +}; + +/* Table of keycode->old,new-keysym mappings we use to fixup the numeric + keypad entries. */ + +const static struct { + unsigned short keycode; + KeySym normal, keypad; +} known_numeric_keys[] = { + {65, XK_period, XK_KP_Decimal}, + {67, XK_asterisk, XK_KP_Multiply}, + {69, XK_plus, XK_KP_Add}, + {75, XK_slash, XK_KP_Divide}, + {76, 0x01000003, XK_KP_Enter}, + {78, XK_minus, XK_KP_Subtract}, + {81, XK_equal, XK_KP_Equal}, + {82, XK_0, XK_KP_0}, + {83, XK_1, XK_KP_1}, + {84, XK_2, XK_KP_2}, + {85, XK_3, XK_KP_3}, + {86, XK_4, XK_KP_4}, + {87, XK_5, XK_KP_5}, + {88, XK_6, XK_KP_6}, + {89, XK_7, XK_KP_7}, + {91, XK_8, XK_KP_8}, + {92, XK_9, XK_KP_9}, +}; + +/* Table mapping normal keysyms to their dead equivalents. + FIXME: all the unicode keysyms (apart from circumflex) were guessed. */ + +const static struct { + KeySym normal, dead; +} dead_keys[] = { + {XK_grave, XK_dead_grave}, + {XK_acute, XK_dead_acute}, + {XK_asciicircum, XK_dead_circumflex}, + {UKEYSYM (0x2c6), XK_dead_circumflex}, /* MODIFIER LETTER CIRCUMFLEX ACCENT */ + {XK_asciitilde, XK_dead_tilde}, + {UKEYSYM (0x2dc), XK_dead_tilde}, /* SMALL TILDE */ + {XK_macron, XK_dead_macron}, + {XK_breve, XK_dead_breve}, + {XK_abovedot, XK_dead_abovedot}, + {XK_diaeresis, XK_dead_diaeresis}, + {UKEYSYM (0x2da), XK_dead_abovering}, /* DOT ABOVE */ + {XK_doubleacute, XK_dead_doubleacute}, + {XK_caron, XK_dead_caron}, + {XK_cedilla, XK_dead_cedilla}, + {XK_ogonek, XK_dead_ogonek}, + {UKEYSYM (0x269), XK_dead_iota}, /* LATIN SMALL LETTER IOTA */ + {UKEYSYM (0x2ec), XK_dead_voiced_sound}, /* MODIFIER LETTER VOICING */ +/* {XK_semivoiced_sound, XK_dead_semivoiced_sound}, */ + {UKEYSYM (0x323), XK_dead_belowdot}, /* COMBINING DOT BELOW */ + {UKEYSYM (0x309), XK_dead_hook}, /* COMBINING HOOK ABOVE */ + {UKEYSYM (0x31b), XK_dead_horn}, /* COMBINING HORN */ +}; + +unsigned int +DarwinSystemKeymapSeed (void) +{ + static unsigned int seed; + + static KeyboardLayoutRef last_key_layout; + KeyboardLayoutRef key_layout; + + KLGetCurrentKeyboardLayout (&key_layout); + + if (key_layout != last_key_layout) + seed++; + + last_key_layout = key_layout; + + return seed; +} + +static inline UniChar +macroman2ucs (unsigned char c) +{ + /* Precalculated table mapping MacRoman-128 to Unicode. Generated + by creating single element CFStringRefs then extracting the + first character. */ + + static const unsigned short table[128] = { + 0xc4, 0xc5, 0xc7, 0xc9, 0xd1, 0xd6, 0xdc, 0xe1, + 0xe0, 0xe2, 0xe4, 0xe3, 0xe5, 0xe7, 0xe9, 0xe8, + 0xea, 0xeb, 0xed, 0xec, 0xee, 0xef, 0xf1, 0xf3, + 0xf2, 0xf4, 0xf6, 0xf5, 0xfa, 0xf9, 0xfb, 0xfc, + 0x2020, 0xb0, 0xa2, 0xa3, 0xa7, 0x2022, 0xb6, 0xdf, + 0xae, 0xa9, 0x2122, 0xb4, 0xa8, 0x2260, 0xc6, 0xd8, + 0x221e, 0xb1, 0x2264, 0x2265, 0xa5, 0xb5, 0x2202, 0x2211, + 0x220f, 0x3c0, 0x222b, 0xaa, 0xba, 0x3a9, 0xe6, 0xf8, + 0xbf, 0xa1, 0xac, 0x221a, 0x192, 0x2248, 0x2206, 0xab, + 0xbb, 0x2026, 0xa0, 0xc0, 0xc3, 0xd5, 0x152, 0x153, + 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0xf7, 0x25ca, + 0xff, 0x178, 0x2044, 0x20ac, 0x2039, 0x203a, 0xfb01, 0xfb02, + 0x2021, 0xb7, 0x201a, 0x201e, 0x2030, 0xc2, 0xca, 0xc1, + 0xcb, 0xc8, 0xcd, 0xce, 0xcf, 0xcc, 0xd3, 0xd4, + 0xf8ff, 0xd2, 0xda, 0xdb, 0xd9, 0x131, 0x2c6, 0x2dc, + 0xaf, 0x2d8, 0x2d9, 0x2da, 0xb8, 0x2dd, 0x2db, 0x2c7, + }; + + if (c < 128) + return c; + else + return table[c - 128]; +} + +static KeySym +make_dead_key (KeySym in) +{ + int i; + + for (i = 0; i < sizeof (dead_keys) / sizeof (dead_keys[0]); i++) + { + if (dead_keys[i].normal == in) + return dead_keys[i].dead; + } + + return in; +} + +int +DarwinReadSystemKeymap (darwin_keyboard_info *info) +{ + KeyboardLayoutRef key_layout; + const void *chr_data; + int num_keycodes = NUM_KEYCODES; + UInt32 keyboard_type = 0; + int is_uchr, i, j; + OSStatus err; + KeySym *k; + + KLGetCurrentKeyboardLayout (&key_layout); + KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data); + + if (chr_data != NULL) + { + is_uchr = 1; + keyboard_type = LMGetKbdType (); + } + else + { + KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data); + + if (chr_data == NULL) + { + fprintf (stderr, "couldn't get uchr or kchr resource\n"); + return FALSE; + } + + is_uchr = 0; + num_keycodes = 128; + } + + + /* Scan the keycode range for the Unicode character that each + key produces in the four shift states. Then convert that to + an X11 keysym (which may just the bit that says "this is + Unicode" if it can't find the real symbol.) */ + + for (i = 0; i < num_keycodes; i++) + { + static const int mods[4] = {0, MOD_SHIFT, MOD_OPTION, + MOD_OPTION | MOD_SHIFT}; + + k = info->key_map + i * GLYPHS_PER_KEY; + + for (j = 0; j < 4; j++) + { + if (is_uchr) + { + UniChar s[8]; + UniCharCount len; + UInt32 dead_key_state, extra_dead; + + dead_key_state = 0; + err = UCKeyTranslate (chr_data, i, kUCKeyActionDown, + mods[j] >> 8, keyboard_type, 0, + &dead_key_state, 8, &len, s); + if (err != noErr) + continue; + + if (len == 0 && dead_key_state != 0) + { + /* Found a dead key. Work out which one it is, but + remembering that it's dead. */ + + extra_dead = 0; + err = UCKeyTranslate (chr_data, i, kUCKeyActionDown, + mods[j] >> 8, keyboard_type, + kUCKeyTranslateNoDeadKeysMask, + &extra_dead, 8, &len, s); + if (err != noErr) + continue; + } + + if (len > 0 && s[0] != 0x0010) + { + k[j] = ucs2keysym (s[0]); + + if (dead_key_state != 0) + k[j] = make_dead_key (k[j]); + } + } + else + { + UInt32 c, state = 0; + UInt16 code; + + code = i | mods[j]; + c = KeyTranslate (chr_data, code, &state); + + /* Dead keys are only processed on key-down, so ask + to translate those events. When we find a dead key, + translating the matching key up event will give + us the actual dead character. */ + + if (state != 0) + { + UInt32 state2 = 0; + c = KeyTranslate (chr_data, code | 128, &state2); + } + + /* Characters seem to be in MacRoman encoding. */ + + if (c != 0 && c != 0x0010) + { + k[j] = ucs2keysym (macroman2ucs (c & 255)); + + if (state != 0) + k[j] = make_dead_key (k[j]); + } + } + } + + if (k[3] == k[2]) + k[3] = NoSymbol; + if (k[2] == k[1]) + k[2] = NoSymbol; + if (k[1] == k[0]) + k[1] = NoSymbol; + if (k[0] == k[2] && k[1] == k[3]) + k[2] = k[3] = NoSymbol; + } + + /* Fix up some things that are normally missing.. */ + + if (HACK_MISSING) + { + for (i = 0; i < sizeof (known_keys) / sizeof (known_keys[0]); i++) + { + k = info->key_map + known_keys[i].keycode * GLYPHS_PER_KEY; + + if (k[0] == NoSymbol && k[1] == NoSymbol + && k[2] == NoSymbol && k[3] == NoSymbol) + { + k[0] = known_keys[i].keysym; + } + } + } + + /* And some more things. We find the right symbols for the numeric + keypad, but not the KP_ keysyms. So try to convert known keycodes. */ + + if (HACK_KEYPAD) + { + for (i = 0; i < sizeof (known_numeric_keys) + / sizeof (known_numeric_keys[0]); i++) + { + k = info->key_map + known_numeric_keys[i].keycode * GLYPHS_PER_KEY; + + if (k[0] == known_numeric_keys[i].normal) + { + k[0] = known_numeric_keys[i].keypad; + } + } + } + + return TRUE; +} diff --git a/synfig-osx/launcher/darwin-old-keymap.c b/synfig-osx/launcher/darwin-old-keymap.c new file mode 100644 index 0000000..89a43a0 --- /dev/null +++ b/synfig-osx/launcher/darwin-old-keymap.c @@ -0,0 +1,613 @@ +/* darwin-old-keymap.c -- ugly code we need to keep around for now + + Copyright (c) 2001-2002 Torrey T. Lyons. All Rights Reserved. + + The code to parse the Darwin keymap is derived from dumpkeymap.c + by Eric Sunshine, which includes the following copyright: + + Copyright (C) 1999,2000 by Eric Sunshine + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "darwin.h" +#include "darwin-keyboard.h" +#include +#include +#include +#include +#include // For the NXSwap* + +#define XK_TECHNICAL // needed to get XK_Escape +#define XK_PUBLISHING +#include "keysym.h" + +static FILE *fref = NULL; +static char *inBuffer = NULL; + +// FIXME: It would be nice to support some of the extra keys in XF86keysym.h, +// at least the volume controls that now ship on every Apple keyboard. + +#define UK(a) NoSymbol // unknown symbol + +static KeySym const next_to_x[256] = { + NoSymbol, NoSymbol, NoSymbol, XK_KP_Enter, + NoSymbol, NoSymbol, NoSymbol, NoSymbol, + XK_BackSpace, XK_Tab, XK_Linefeed, NoSymbol, + NoSymbol, XK_Return, NoSymbol, NoSymbol, + NoSymbol, NoSymbol, NoSymbol, NoSymbol, + NoSymbol, NoSymbol, NoSymbol, NoSymbol, + NoSymbol, NoSymbol, NoSymbol, XK_Escape, + NoSymbol, NoSymbol, NoSymbol, NoSymbol, + XK_space, XK_exclam, XK_quotedbl, XK_numbersign, + XK_dollar, XK_percent, XK_ampersand, XK_apostrophe, + XK_parenleft, XK_parenright, XK_asterisk, XK_plus, + XK_comma, XK_minus, XK_period, XK_slash, + XK_0, XK_1, XK_2, XK_3, + XK_4, XK_5, XK_6, XK_7, + XK_8, XK_9, XK_colon, XK_semicolon, + XK_less, XK_equal, XK_greater, XK_question, + XK_at, XK_A, XK_B, XK_C, + XK_D, XK_E, XK_F, XK_G, + XK_H, XK_I, XK_J, XK_K, + XK_L, XK_M, XK_N, XK_O, + XK_P, XK_Q, XK_R, XK_S, + XK_T, XK_U, XK_V, XK_W, + XK_X, XK_Y, XK_Z, XK_bracketleft, + XK_backslash, XK_bracketright,XK_asciicircum, XK_underscore, + XK_grave, XK_a, XK_b, XK_c, + XK_d, XK_e, XK_f, XK_g, + XK_h, XK_i, XK_j, XK_k, + XK_l, XK_m, XK_n, XK_o, + XK_p, XK_q, XK_r, XK_s, + XK_t, XK_u, XK_v, XK_w, + XK_x, XK_y, XK_z, XK_braceleft, + XK_bar, XK_braceright, XK_asciitilde, XK_BackSpace, +// 128 + NoSymbol, XK_Agrave, XK_Aacute, XK_Acircumflex, + XK_Atilde, XK_Adiaeresis, XK_Aring, XK_Ccedilla, + XK_Egrave, XK_Eacute, XK_Ecircumflex, XK_Ediaeresis, + XK_Igrave, XK_Iacute, XK_Icircumflex, XK_Idiaeresis, +// 144 + XK_ETH, XK_Ntilde, XK_Ograve, XK_Oacute, + XK_Ocircumflex, XK_Otilde, XK_Odiaeresis, XK_Ugrave, + XK_Uacute, XK_Ucircumflex, XK_Udiaeresis, XK_Yacute, + XK_THORN, XK_mu, XK_multiply, XK_division, +// 160 + XK_copyright, XK_exclamdown, XK_cent, XK_sterling, + UK(fraction), XK_yen, UK(fhook), XK_section, + XK_currency, XK_rightsinglequotemark, + XK_leftdoublequotemark, + XK_guillemotleft, + XK_leftanglebracket, + XK_rightanglebracket, + UK(filigature), UK(flligature), +// 176 + XK_registered, XK_endash, XK_dagger, XK_doubledagger, + XK_periodcentered,XK_brokenbar, XK_paragraph, UK(bullet), + XK_singlelowquotemark, + XK_doublelowquotemark, + XK_rightdoublequotemark, + XK_guillemotright, + XK_ellipsis, UK(permille), XK_notsign, XK_questiondown, +// 192 + XK_onesuperior, XK_dead_grave, XK_dead_acute, XK_dead_circumflex, + XK_dead_tilde, XK_dead_macron, XK_dead_breve, XK_dead_abovedot, + XK_dead_diaeresis, + XK_twosuperior, XK_dead_abovering, + XK_dead_cedilla, + XK_threesuperior, + XK_dead_doubleacute, + XK_dead_ogonek, XK_dead_caron, +// 208 + XK_emdash, XK_plusminus, XK_onequarter, XK_onehalf, + XK_threequarters, + XK_agrave, XK_aacute, XK_acircumflex, + XK_atilde, XK_adiaeresis, XK_aring, XK_ccedilla, + XK_egrave, XK_eacute, XK_ecircumflex, XK_ediaeresis, +// 224 + XK_igrave, XK_AE, XK_iacute, XK_ordfeminine, + XK_icircumflex, XK_idiaeresis, XK_eth, XK_ntilde, + XK_Lstroke, XK_Ooblique, XK_OE, XK_masculine, + XK_ograve, XK_oacute, XK_ocircumflex, XK_otilde, +// 240 + XK_odiaeresis, XK_ae, XK_ugrave, XK_uacute, + XK_ucircumflex, XK_idotless, XK_udiaeresis, XK_ygrave, + XK_lstroke, XK_ooblique, XK_oe, XK_ssharp, + XK_thorn, XK_ydiaeresis, NoSymbol, NoSymbol, + }; + +#define MIN_SYMBOL 0xAC +static KeySym const symbol_to_x[] = { + XK_Left, XK_Up, XK_Right, XK_Down + }; +int const NUM_SYMBOL = sizeof(symbol_to_x) / sizeof(symbol_to_x[0]); + +#define MIN_FUNCKEY 0x20 +static KeySym const funckey_to_x[] = { + XK_F1, XK_F2, XK_F3, XK_F4, + XK_F5, XK_F6, XK_F7, XK_F8, + XK_F9, XK_F10, XK_F11, XK_F12, + XK_Insert, XK_Delete, XK_Home, XK_End, + XK_Page_Up, XK_Page_Down, XK_F13, XK_F14, + XK_F15 + }; +int const NUM_FUNCKEY = sizeof(funckey_to_x) / sizeof(funckey_to_x[0]); + +typedef struct { + KeySym normalSym; + KeySym keypadSym; +} darwinKeyPad_t; + +static darwinKeyPad_t const normal_to_keypad[] = { + { XK_0, XK_KP_0 }, + { XK_1, XK_KP_1 }, + { XK_2, XK_KP_2 }, + { XK_3, XK_KP_3 }, + { XK_4, XK_KP_4 }, + { XK_5, XK_KP_5 }, + { XK_6, XK_KP_6 }, + { XK_7, XK_KP_7 }, + { XK_8, XK_KP_8 }, + { XK_9, XK_KP_9 }, + { XK_equal, XK_KP_Equal }, + { XK_asterisk, XK_KP_Multiply }, + { XK_plus, XK_KP_Add }, + { XK_comma, XK_KP_Separator }, + { XK_minus, XK_KP_Subtract }, + { XK_period, XK_KP_Decimal }, + { XK_slash, XK_KP_Divide } +}; +int const NUM_KEYPAD = sizeof(normal_to_keypad) / sizeof(normal_to_keypad[0]); + + +//----------------------------------------------------------------------------- +// Data Stream Object +// Can be configured to treat embedded "numbers" as being composed of +// either 1, 2, or 4 bytes, apiece. +//----------------------------------------------------------------------------- +typedef struct _DataStream +{ + unsigned char const *data; + unsigned char const *data_end; + short number_size; // Size in bytes of a "number" in the stream. +} DataStream; + +static DataStream* new_data_stream( unsigned char const* data, int size ) +{ + DataStream* s = (DataStream*)xalloc( sizeof(DataStream) ); + s->data = data; + s->data_end = data + size; + s->number_size = 1; // Default to byte-sized numbers. + return s; +} + +static void destroy_data_stream( DataStream* s ) +{ + xfree(s); +} + +static unsigned char get_byte( DataStream* s ) +{ + assert(s->data + 1 <= s->data_end); + return *s->data++; +} + +static short get_word( DataStream* s ) +{ + short hi, lo; + assert(s->data + 2 <= s->data_end); + hi = *s->data++; + lo = *s->data++; + return ((hi << 8) | lo); +} + +static int get_dword( DataStream* s ) +{ + int b1, b2, b3, b4; + assert(s->data + 4 <= s->data_end); + b4 = *s->data++; + b3 = *s->data++; + b2 = *s->data++; + b1 = *s->data++; + return ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1); +} + +static int get_number( DataStream* s ) +{ + switch (s->number_size) { + case 4: return get_dword(s); + case 2: return get_word(s); + default: return get_byte(s); + } +} + + +//----------------------------------------------------------------------------- +// Utility functions to help parse Darwin keymap +//----------------------------------------------------------------------------- + +/* + * bits_set + * Calculate number of bits set in the modifier mask. + */ +static short bits_set( short mask ) +{ + short n = 0; + + for ( ; mask != 0; mask >>= 1) + if ((mask & 0x01) != 0) + n++; + return n; +} + +/* + * parse_next_char_code + * Read the next character code from the Darwin keymapping + * and write it to the X keymap. + */ +static void parse_next_char_code( + DataStream *s, + KeySym *k ) +{ + const short charSet = get_number(s); + const short charCode = get_number(s); + + if (charSet == 0) { // ascii character + if (charCode >= 0 && charCode < 256) + *k = next_to_x[charCode]; + } else if (charSet == 0x01) { // symbol character + if (charCode >= MIN_SYMBOL && + charCode <= MIN_SYMBOL + NUM_SYMBOL) + *k = symbol_to_x[charCode - MIN_SYMBOL]; + } else if (charSet == 0xFE) { // function key + if (charCode >= MIN_FUNCKEY && + charCode <= MIN_FUNCKEY + NUM_FUNCKEY) + *k = funckey_to_x[charCode - MIN_FUNCKEY]; + } +} + +/* + * DarwinReadKeymapFile + * Read the appropriate keymapping from a keymapping file. + */ +static Bool _DarwinReadKeymapFile( + NXKeyMapping *keyMap) +{ + struct stat st; + NXEventSystemDevice info[20]; + int interface = 0, handler_id = 0; + int map_interface, map_handler_id, map_size = 0; + unsigned int i, size; + int *bufferEnd; + union km_tag { + int *intP; + char *charP; + } km; + char *filename; + + filename = DarwinFindLibraryFile (darwinKeymapFile, "Keyboards"); + if (filename == NULL) { + FatalError("Could not find keymapping file %s.\n", darwinKeymapFile); + return FALSE; + } + + fref = fopen( filename, "rb" ); + xfree (filename); + + if (fref == NULL) { + ErrorF("Unable to open keymapping file '%s' (errno %d).\n", + darwinKeymapFile, errno); + return FALSE; + } + if (fstat(fileno(fref), &st) == -1) { + ErrorF("Could not stat keymapping file '%s' (errno %d).\n", + darwinKeymapFile, errno); + return FALSE; + } + + // check to make sure we don't crash later + if (st.st_size <= 16*sizeof(int)) { + ErrorF("Keymapping file '%s' is invalid (too small).\n", + darwinKeymapFile); + return FALSE; + } + + inBuffer = (char*) xalloc( st.st_size ); + bufferEnd = (int *) (inBuffer + st.st_size); + if (fread(inBuffer, st.st_size, 1, fref) != 1) { + ErrorF("Could not read %qd bytes from keymapping file '%s' (errno %d).\n", + st.st_size, darwinKeymapFile, errno); + return FALSE; + } + + if (strncmp( inBuffer, "KYM1", 4 ) == 0) { + // Magic number OK. + } else if (strncmp( inBuffer, "KYMP", 4 ) == 0) { + ErrorF("Keymapping file '%s' is intended for use with the original NeXT keyboards and cannot be used by XDarwin.\n", darwinKeymapFile); + return FALSE; + } else { + ErrorF("Keymapping file '%s' has a bad magic number and cannot be used by XDarwin.\n", darwinKeymapFile); + return FALSE; + } + + // find the keyboard interface and handler id + {NXEventHandle hid; + NXEventSystemInfoType info_type; + + size = sizeof( info ) / sizeof( int ); + hid = NXOpenEventStatus (); + info_type = NXEventSystemInfo (hid, NX_EVS_DEVICE_INFO, + (int *) info, &size); + NXCloseEventStatus (hid); + if (!info_type) { + ErrorF("Error reading event status driver info.\n"); + return FALSE; + }} + + size = size * sizeof( int ) / sizeof( info[0] ); + for( i = 0; i < size; i++) { + if (info[i].dev_type == NX_EVS_DEVICE_TYPE_KEYBOARD) { + Bool hasInterface = FALSE; + Bool hasMatch = FALSE; + + interface = info[i].interface; + handler_id = info[i].id; + + // Find an appropriate keymapping: + // The first time we try to match both interface and handler_id. + // If we can't match both, we take the first match for interface. + + do { + km.charP = inBuffer; + km.intP++; + while (km.intP+3 < bufferEnd) { + map_interface = NXSwapBigIntToHost(*(km.intP++)); + map_handler_id = NXSwapBigIntToHost(*(km.intP++)); + map_size = NXSwapBigIntToHost(*(km.intP++)); + if (map_interface == interface) { + if (map_handler_id == handler_id || hasInterface) { + hasMatch = TRUE; + break; + } else { + hasInterface = TRUE; + } + } + km.charP += map_size; + } + } while (hasInterface && !hasMatch); + + if (hasMatch) { + // fill in NXKeyMapping structure + keyMap->size = map_size; + keyMap->mapping = (char*) xalloc(map_size); + memcpy(keyMap->mapping, km.charP, map_size); + return TRUE; + } + } // if dev_id == keyboard device + } // foreach info struct + + // The keymapping file didn't match any of the info structs + // returned by NXEventSystemInfo. + ErrorF("Keymapping file '%s' did not contain appropriate keyboard interface.\n", darwinKeymapFile); + return FALSE; +} + +static Bool DarwinReadKeymapFile(NXKeyMapping *keyMap) +{ + Bool ret; + + ret = _DarwinReadKeymapFile (keyMap); + + if (inBuffer != NULL) + xfree (inBuffer); + if (fref != NULL) + fclose (fref); + + return ret; +} + +int DarwinParseKeymapFile (darwin_keyboard_info *info) +{ + short numMods, numKeys, numPadKeys = 0; + NXKeyMapping keyMap; + DataStream *keyMapStream; + unsigned char const *numPadStart = 0; + Bool haveKeymap; + int i; + KeySym *k; + + if (darwinKeymapFile == NULL) + return FALSE; + + haveKeymap = DarwinReadKeymapFile(&keyMap); + if (!haveKeymap) { + ErrorF("Reverting to system keymapping.\n"); + return FALSE; + } + + keyMapStream = new_data_stream( (unsigned char const*)keyMap.mapping, + keyMap.size ); + + // check the type of map + if (get_word(keyMapStream)) { + keyMapStream->number_size = 2; + ErrorF("Current 16-bit keymapping may not be interpreted correctly.\n"); + } + + // Compute the modifier map and + // insert X modifier KeySyms into keyboard map. + // Store modifier keycodes in modifierKeycodes. + numMods = get_number(keyMapStream); + while (numMods-- > 0) { + int left = 1; // first keycode is left + short const charCode = get_number(keyMapStream); + short numKeyCodes = get_number(keyMapStream); + + // This is just a marker, not a real modifier. + // Store numeric keypad keys for later. + if (charCode == NX_MODIFIERKEY_NUMERICPAD) { + numPadStart = keyMapStream->data; + numPadKeys = numKeyCodes; + } + + while (numKeyCodes-- > 0) { + const short keyCode = get_number(keyMapStream); + if (charCode != NX_MODIFIERKEY_NUMERICPAD) { + switch (charCode) { + case NX_MODIFIERKEY_ALPHALOCK: + info->key_map[keyCode * GLYPHS_PER_KEY] = XK_Caps_Lock; + break; + case NX_MODIFIERKEY_SHIFT: + info->key_map[keyCode * GLYPHS_PER_KEY] = + (left ? XK_Shift_L : XK_Shift_R); + break; + case NX_MODIFIERKEY_CONTROL: + info->key_map[keyCode * GLYPHS_PER_KEY] = + (left ? XK_Control_L : XK_Control_R); + break; + case NX_MODIFIERKEY_ALTERNATE: + info->key_map[keyCode * GLYPHS_PER_KEY] = + (left ? XK_Alt_L : XK_Alt_R); + break; + case NX_MODIFIERKEY_COMMAND: + info->key_map[keyCode * GLYPHS_PER_KEY] = + (left ? XK_Meta_L : XK_Meta_R); + break; + case NX_MODIFIERKEY_SECONDARYFN: + info->key_map[keyCode * GLYPHS_PER_KEY] = + (left ? XK_Control_L : XK_Control_R); + break; + case NX_MODIFIERKEY_HELP: + info->key_map[keyCode * GLYPHS_PER_KEY] = XK_Help; + break; + } + } + left = 0; + } + } + + // Convert the Darwin keyboard map to an X keyboard map. + // A key can have a different character code for each combination of + // modifiers. We currently ignore all modifier combinations except + // those with Shift, AlphaLock, and Alt. + numKeys = get_number(keyMapStream); + for (i = 0, k = info->key_map; i < numKeys; i++, k += GLYPHS_PER_KEY) { + short const charGenMask = get_number(keyMapStream); + if (charGenMask != 0xFF) { // is key bound? + short numKeyCodes = 1 << bits_set(charGenMask); + + // Record unmodified case + parse_next_char_code( keyMapStream, k ); + numKeyCodes--; + + // If AlphaLock and Shift modifiers produce different codes, + // we record the Shift case since X handles AlphaLock. + if (charGenMask & 0x01) { // AlphaLock + parse_next_char_code( keyMapStream, k+1 ); + numKeyCodes--; + } + + if (charGenMask & 0x02) { // Shift + parse_next_char_code( keyMapStream, k+1 ); + numKeyCodes--; + + if (charGenMask & 0x01) { // Shift-AlphaLock + get_number(keyMapStream); get_number(keyMapStream); + numKeyCodes--; + } + } + + // Skip the Control cases + if (charGenMask & 0x04) { // Control + get_number(keyMapStream); get_number(keyMapStream); + numKeyCodes--; + + if (charGenMask & 0x01) { // Control-AlphaLock + get_number(keyMapStream); get_number(keyMapStream); + numKeyCodes--; + } + + if (charGenMask & 0x02) { // Control-Shift + get_number(keyMapStream); get_number(keyMapStream); + numKeyCodes--; + + if (charGenMask & 0x01) { // Shift-Control-AlphaLock + get_number(keyMapStream); get_number(keyMapStream); + numKeyCodes--; + } + } + } + + // Process Alt cases + if (charGenMask & 0x08) { // Alt + parse_next_char_code( keyMapStream, k+2 ); + numKeyCodes--; + + if (charGenMask & 0x01) { // Alt-AlphaLock + parse_next_char_code( keyMapStream, k+3 ); + numKeyCodes--; + } + + if (charGenMask & 0x02) { // Alt-Shift + parse_next_char_code( keyMapStream, k+3 ); + numKeyCodes--; + + if (charGenMask & 0x01) { // Alt-Shift-AlphaLock + get_number(keyMapStream); get_number(keyMapStream); + numKeyCodes--; + } + } + } + + while (numKeyCodes-- > 0) { + get_number(keyMapStream); get_number(keyMapStream); + } + + if (k[3] == k[2]) k[3] = NoSymbol; + if (k[2] == k[1]) k[2] = NoSymbol; + if (k[1] == k[0]) k[1] = NoSymbol; + if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol; + } + } + + // Now we have to go back through the list of keycodes that are on the + // numeric keypad and update the X keymap. + keyMapStream->data = numPadStart; + while(numPadKeys-- > 0) { + const short keyCode = get_number(keyMapStream); + k = &info->key_map[keyCode * GLYPHS_PER_KEY]; + for (i = 0; i < NUM_KEYPAD; i++) { + if (*k == normal_to_keypad[i].normalSym) { + k[0] = normal_to_keypad[i].keypadSym; + break; + } + } + } + + // free Darwin keyboard map + destroy_data_stream( keyMapStream ); + xfree( keyMap.mapping ); + + return TRUE; +} diff --git a/synfig-osx/launcher/darwin.c b/synfig-osx/launcher/darwin.c new file mode 100644 index 0000000..93549e8 --- /dev/null +++ b/synfig-osx/launcher/darwin.c @@ -0,0 +1,982 @@ +/************************************************************** + * + * Shared code for the Darwin X Server + * running with Quartz or the IOKit + * + **************************************************************/ +/* + * Copyright (c) 2001-2002 Torrey T. Lyons. All Rights Reserved. + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in this Software without prior written authorization. + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.c,v 1.45 2002/03/28 02:21:08 torrey Exp $ */ + +#include + +#include "X.h" +#include "Xproto.h" +#include "os.h" +#include "servermd.h" +#include "inputstr.h" +#include "scrnintstr.h" +#include "mibstore.h" // mi backing store implementation +#include "mipointer.h" // mi software cursor +#include "micmap.h" // mi colormap code +#include "fb.h" // fb framebuffer code +#include "site.h" +#include "globals.h" +#include "xf86Version.h" +#include "dix.h" +#include "dri-surface.h" +#define _APPLEDRI_SERVER_ +#include "appledristr.h" + +#include +#include +#include +#include +#include +#include +#include + +#define NO_CFPLUGIN +#include +#include +#include + +#include "darwin.h" +#include "quartz.h" +#include "rootless-common.h" +#include "pseudoramiX.h" +#include "X11Application.h" + +/* Fake button press/release for scroll wheel move. */ +#define SCROLLWHEELUPFAKE 4 +#define SCROLLWHEELDOWNFAKE 5 + +/* X server shared global variables */ +int darwinScreensFound = 0; +int darwinScreenIndex = 0; +int darwinFakeButtons = 1; +Bool darwinSwapAltMeta = FALSE; + +/* location of X11's (0,0) point in global screen coordinates */ +int darwinMainScreenX = 0; +int darwinMainScreenY = 0; + +/* parameters read from the command line or user preferences */ +char *darwinKeymapFile; +Bool darwinSyncKeymap = TRUE; + +/* modifier masks for faking mouse buttons */ +static int darwinFakeMouse2Mask = Mod1Mask; /* option */ +static int darwinFakeMouse3Mask = Mod2Mask; /* command */ + +static DeviceIntPtr darwinPointer; +static DeviceIntPtr darwinKeyboard; + +/* Track our view of the keyboard state. Everything we sent to dix will + be represented here until released. */ +static CARD8 keysDown[DOWN_LENGTH]; +static int lockMods; + +#define SetBit(ptr,bit) \ + do {((BYTE *) ptr)[(bit) >> 3] |= (1 << ((bit) & 7));} while (0) + +#define ClearBit(ptr,bit) \ + do {((BYTE *) ptr)[(bit) >> 3] &= ~(1 << ((bit) & 7));} while (0) + +/* Common pixmap formats */ +static PixmapFormatRec formats[] = { + { 1, 1, BITMAP_SCANLINE_PAD }, + { 4, 8, BITMAP_SCANLINE_PAD }, + { 8, 8, BITMAP_SCANLINE_PAD }, + { 15, 16, BITMAP_SCANLINE_PAD }, + { 16, 16, BITMAP_SCANLINE_PAD }, + { 24, 32, BITMAP_SCANLINE_PAD }, + { 32, 32, BITMAP_SCANLINE_PAD } +}; +const int NUMFORMATS = sizeof(formats)/sizeof(formats[0]); + +#ifndef OSNAME +#define OSNAME " Mac OS X" +#endif +#ifndef OSVENDOR +#define OSVENDOR " Apple" +#endif +#ifndef PRE_RELEASE +#define PRE_RELEASE XF86_VERSION_SNAP +#endif + +extern void AppleDRIExtensionInit(void); +extern void AppleWMExtensionInit(void); + +static void +DarwinPrintBanner (void) +{ + ErrorF("\nXFree86 Version %d.%d.%d", XF86_VERSION_MAJOR, XF86_VERSION_MINOR, + XF86_VERSION_PATCH); +#if XF86_VERSION_SNAP > 0 + ErrorF(".%d", XF86_VERSION_SNAP); +#endif + +#if XF86_VERSION_SNAP >= 900 + ErrorF(" (%d.%d.0 RC %d)", XF86_VERSION_MAJOR, XF86_VERSION_MINOR + 1, + XF86_VERSION_SNAP - 900); +#endif + +#ifdef XF86_CUSTOM_VERSION + ErrorF(" (%s)", XF86_CUSTOM_VERSION); +#endif + ErrorF(" / X Window System\n"); + ErrorF("(protocol Version %d, revision %d, vendor release %d)\n", + X_PROTOCOL, X_PROTOCOL_REVISION, VENDOR_RELEASE ); +} + +/* X screensaver support. Not implemented. */ +static Bool +DarwinSaveScreen (ScreenPtr pScreen, int on) +{ + return TRUE; +} + +/* This is a callback from dix during AddScreen() from InitOutput(). + Initialize the screen and communicate information about it back to dix. */ +static Bool +DarwinAddScreen (int index, ScreenPtr pScreen, int argc, char **argv) +{ + int i, dpi; + static int foundIndex = 0; + Bool ret; + VisualPtr visual; + DarwinFramebufferPtr dfb; + + /* reset index of found screens for each server generation */ + if (index == 0) + foundIndex = 0; + + /* allocate space for private per screen storage */ + dfb = xalloc (sizeof (DarwinFramebufferRec)); + SCREEN_PRIV(pScreen) = dfb; + + /* setup hardware/mode specific details */ + ret = QuartzAddScreen (foundIndex, pScreen); + foundIndex++; + if (!ret) + return FALSE; + + /* reset the visual list */ + miClearVisualTypes(); + + /* setup a single visual appropriate for our pixel type. Note: we use + TrueColor, not DirectColor */ + if (dfb->componentCount != 1) + { + if (!miSetVisualTypes (dfb->colorBitsPerPixel, TrueColorMask, + dfb->bitsPerComponent, TrueColor)) + return FALSE; +#ifdef ENABLE_PSEUDOCOLOR + /* FIXME: currently we can't handle pseudocolor windows + inside truecolor top-level windows, so disable this. */ + if (!miSetVisualTypes (8, PseudoColorMask, 8, PseudoColor)) + return FALSE; +#endif + } + else + { + if (!miSetVisualTypes (8, PseudoColorMask, 8, PseudoColor)) + return FALSE; + } + + /* create the common 8 bit PseudoColor visual; do this last to prevent + it becoming the root visual. */ + + miSetPixmapDepths(); + + /* Machine independent screen init */ + if (monitorResolution) + dpi = monitorResolution; + else + dpi = 75; + + /* initialize fb */ + if (!fbScreenInit (pScreen, dfb->framebuffer, dfb->width, + dfb->height, dpi, dpi, + dfb->pitch/(dfb->bitsPerPixel/8), dfb->bitsPerPixel)) + { + return FALSE; + } + + /* set the RGB order correctly for TrueColor */ + if (dfb->bitsPerPixel > 8) + { + int bitsPerRGB = dfb->bitsPerComponent; + + for (i = 0, visual = pScreen->visuals; + i < pScreen->numVisuals; i++, visual++) + { + if (visual->class == TrueColor) { + visual->offsetRed = bitsPerRGB * 2; + visual->offsetGreen = bitsPerRGB; + visual->offsetBlue = 0; + visual->redMask = ((1<offsetRed; + visual->greenMask = ((1<offsetGreen; + visual->blueMask = ((1<offsetBlue; + } + } + } + +#ifdef RENDER + if (! fbPictureInit (pScreen, 0, 0)) + return FALSE; +#endif + +#ifdef MITSHM + ShmRegisterFbFuncs (pScreen); +#endif + + /* this must be initialized (why doesn't X have a default?) */ + pScreen->SaveScreen = DarwinSaveScreen; + + /* finish mode dependent screen setup including cursor support */ + if (!QuartzSetupScreen (index, pScreen)) + return FALSE; + + /* create and install the default colormap and set black / white pixels */ + if (!miCreateDefColormap (pScreen)) + return FALSE; + + dixScreenOrigins[index].x = dfb->x; + dixScreenOrigins[index].y = dfb->y; + + ErrorF("Screen %d added: %dx%d @ (%d,%d)\n", + index, dfb->width, dfb->height, dfb->x, dfb->y); + + return TRUE; +} + +/* Search for a file in the standard Library paths, which are (in order): + + ~/Library/ user specific + /Library/ host specific + /Network/Library/ LAN specific + /System/Library/ OS specific + + A sub-path can be specified to search in below the various Library + directories. Returns a new character string (owned by the caller) + containing the full path to the first file found. */ + +/* Library search paths */ +static const char *libraryPathList[] = { + "", + "/Network", + "/System", + NULL +}; + +char * +DarwinFindLibraryFile (const char *file, const char *pathext) +{ + char *home; + char *fullPath; + int i = 0; + + // Return the file name as is if it is already a fully qualified path. + if (!access(file, F_OK)) { + fullPath = xalloc(strlen(file)+1); + strcpy(fullPath, file); + return fullPath; + } + + fullPath = xalloc(PATH_MAX); + + home = getenv("HOME"); + if (home) { + snprintf(fullPath, PATH_MAX, "%s/Library/%s/%s", home, pathext, file); + if (!access(fullPath, F_OK)) + return fullPath; + } + + while (libraryPathList[i]) { + snprintf(fullPath, PATH_MAX, "%s/Library/%s/%s", libraryPathList[i++], + pathext, file); + if (!access(fullPath, F_OK)) + return fullPath; + } + + xfree(fullPath); + return NULL; +} + +/* Press or release the given key, specified by NX keycode. xe must already + have event time and mouse location filled in. pressed is KeyPress or + KeyRelease. keycode is NX keycode without MIN_KEYCODE adjustment. */ +static inline void +DarwinPressKeycode (xEvent *xe, int pressed, int keycode) +{ + if (pressed == KeyRelease && !BitIsOn (keysDown, keycode + MIN_KEYCODE)) + { + /* Don't release keys that aren't pressed. It generates extra + KeyPress events instead of just discarding them. */ + + return; + } + + if (pressed == KeyPress) + SetBit (keysDown, keycode + MIN_KEYCODE); + else + ClearBit (keysDown, keycode + MIN_KEYCODE); + + xe->u.u.type = pressed; + xe->u.u.detail = keycode + MIN_KEYCODE; + (darwinKeyboard->public.processInputProc) (xe, darwinKeyboard, 1); +} + +/* Ensure that X's idea of what modifiers are down matches the real + window server's. Do this by looking at what keys we previously sent + X and deciding if they need to be released/toggled yet to make FLAGS + become X's current modifier state. */ +static void +DarwinUpdateModifiers (xEvent xe, unsigned int flags) +{ + static const struct {int mask; int nxkey;} pairs[] = { + {ShiftMask, NX_MODIFIERKEY_SHIFT}, + {ControlMask, NX_MODIFIERKEY_CONTROL}, + {Mod1Mask, NX_MODIFIERKEY_ALTERNATE}, + {Mod2Mask, NX_MODIFIERKEY_COMMAND}, + {Mod3Mask, NX_MODIFIERKEY_SECONDARYFN} + }; + + int i, keycode; + + for (i = 0; i < (int) (sizeof (pairs) / sizeof (pairs[0])); i++) + { + keycode = DarwinModifierNXKeyToNXKeycode (pairs[i].nxkey, 0); + + if (keycode == 0) + continue; + + /* For each known modifier, sync up the state of the key X thinks + it's bound to and the real value of the flag. */ + + if ((flags & pairs[i].mask) + && !BitIsOn (keysDown, keycode + MIN_KEYCODE)) + { + DarwinPressKeycode (&xe, KeyPress, keycode); + } + else if (!(flags & pairs[i].mask) + && BitIsOn (keysDown, keycode + MIN_KEYCODE)) + { + DarwinPressKeycode (&xe, KeyRelease, keycode); + } + } + + /* Do the same for Lock, but need both press and release to toggle it. */ + + if ((flags ^ lockMods) & LockMask) + { + keycode = DarwinModifierNXKeyToNXKeycode (NX_MODIFIERKEY_ALPHALOCK, 0); + + if (keycode != 0) + { + DarwinPressKeycode (&xe, KeyPress, keycode); + DarwinPressKeycode (&xe, KeyRelease, keycode); + + lockMods ^= LockMask; + } + } +} + +/* Release all non-modifier keys that we think are currently pressed. + Usually this is done when X becomes inactive to avoid leaving keys + stuck down when we become active again. Modifiers are handled separately + in the function above. */ +static void +DarwinReleaseKeys (void) +{ + KeyClassPtr keyc = darwinKeyboard->key; + xEvent xe; + int i, x, y; + + memset (&xe, 0, sizeof (xe)); + xe.u.keyButtonPointer.time = GetTimeInMillis (); + xe.u.keyButtonPointer.state = darwinKeyboard->key->state; + GetSpritePosition (&x, &y); + xe.u.keyButtonPointer.rootX = x; + xe.u.keyButtonPointer.rootY = y; + + for (i = 0; i < DOWN_LENGTH * 8; i++) + { + if (!keyc->modifierMap[i] && BitIsOn (keysDown, i)) + DarwinPressKeycode (&xe, KeyRelease, i - MIN_KEYCODE); + } +} + +static int +parseModifierString (const char *str) +{ + if (strcasecmp (str, "shift") == 0) + return ShiftMask; + else if (strcasecmp (str, "control") == 0) + return ControlMask; + else if (strcasecmp (str, "option") == 0) + return Mod1Mask; + else if (strcasecmp (str, "command") == 0) + return Mod2Mask; + else if (strcasecmp (str, "fn") == 0) + return Mod3Mask; + else + return 0; +} + +/* Parse a list of modifier names and return a corresponding modifier mask */ +static int +DarwinParseModifierList (const char *constmodifiers) +{ + int result, mask; + char *modifiers, *modifier, *p; + + if (constmodifiers == NULL + || strlen (constmodifiers) == 0 + || strcasecmp (constmodifiers, "none") == 0) + { + return 0; + } + + modifiers = strdup (constmodifiers); + p = modifiers; + result = 0; + + while (p != NULL) + { + modifier = strsep (&p, " ,+&|/"); /* allow lots of separators */ + mask = parseModifierString (modifier); + if (mask != 0) + result |= mask; + else + ErrorF ("fakebuttons: Unknown modifier \"%s\"\n", modifier); + } + + free (modifiers); + return result; +} + +void +DarwinSetFakeButtons (const char *mod2, const char *mod3) +{ + if (mod2 != NULL) + darwinFakeMouse2Mask = DarwinParseModifierList (mod2); + if (mod3 != NULL) + darwinFakeMouse3Mask = DarwinParseModifierList (mod3); +} + +/* Read and process events from the event pipe until it is empty. */ +void +ProcessInputEvents (void) +{ + static int here_before = 0; + + /* last known modifier state */ + static unsigned int current_flags = 0; + + /* button number and modifier mask of currently pressed fake button */ + static int fake_button; + static unsigned int fake_button_mask, fake_button_modifier; + + xEvent xe; + + if (!here_before) + { + X11ApplicationServerReady (); + here_before = TRUE; + } + + while (DarwinDequeueEvent (&xe)) + { + unsigned int real_state; + + real_state = xe.u.keyButtonPointer.state; + xe.u.keyButtonPointer.state |= fake_button_modifier; + + /* Filter event for faked mouse button presses. */ + if (darwinFakeButtons) + { + switch (xe.u.u.type) + { + case ButtonPress: + if (xe.u.u.detail != 1) + break; + if ((xe.u.keyButtonPointer.state & darwinFakeMouse2Mask) + == darwinFakeMouse2Mask) + { + fake_button = 2; + fake_button_modifier = Button2Mask; + fake_button_mask = darwinFakeMouse2Mask; + xe.u.u.detail = 2; + } + else if ((xe.u.keyButtonPointer.state & darwinFakeMouse3Mask) + == darwinFakeMouse3Mask) + { + fake_button = 3; + fake_button_modifier = Button3Mask; + fake_button_mask = darwinFakeMouse3Mask; + xe.u.u.detail = 3; + } + break; + + case ButtonRelease: + if (fake_button != 0 && xe.u.u.detail == 1) + xe.u.u.detail = fake_button; + break; + } + } + + xe.u.keyButtonPointer.state &= ~fake_button_mask; + + switch (xe.u.u.type) + { + case 0: /* flags-changed */ + case KeyPress: + if (current_flags == 0 + && darwinSyncKeymap && darwinKeymapFile == NULL) + { + /* See if keymap has changed. */ + + static unsigned int last_seed; + unsigned int this_seed; + + this_seed = DarwinSystemKeymapSeed (); + if (this_seed != last_seed) + { + last_seed = this_seed; + DarwinKeyboardReload (darwinKeyboard); + } + } + /* fall through */ + + case KeyRelease: + case ButtonPress: + case ButtonRelease: + case MotionNotify: + + /* Initialize time field. */ + + xe.u.keyButtonPointer.time = GetTimeInMillis (); + + /* Update X's idea of what modifiers are set. */ + + if (xe.u.keyButtonPointer.state != 0xffff + && current_flags != xe.u.keyButtonPointer.state) + { + current_flags = xe.u.keyButtonPointer.state; + DarwinUpdateModifiers (xe, current_flags); + } + } + + switch (xe.u.u.type) + { + case 0: + break; + + case MotionNotify: + if (!quartzServerVisible) + { + xp_window_id wid; + + /* Sigh. Need to check that we're really over one of + our windows. (We need to receive pointer events while + not in the foreground, and the only way to do that + right now is to ask for _all_ pointer events..) */ + + wid = 0; + xp_find_window (xe.u.keyButtonPointer.rootX, + xe.u.keyButtonPointer.rootY, 0, &wid); + if (wid == 0) + break; + } + + /* Shift from global screen coordinates to coordinates + relative to the origin of the current screen. */ + + xe.u.keyButtonPointer.rootX -= darwinMainScreenX - + dixScreenOrigins[miPointerCurrentScreen()->myNum].x; + xe.u.keyButtonPointer.rootY -= darwinMainScreenY - + dixScreenOrigins[miPointerCurrentScreen()->myNum].y; + + miPointerAbsoluteCursor (xe.u.keyButtonPointer.rootX, + xe.u.keyButtonPointer.rootY, + xe.u.keyButtonPointer.time); + break; + + case ButtonPress: + case ButtonRelease: + darwinPointer->public.processInputProc (&xe, darwinPointer, 1); + break; + + case KeyPress: + case KeyRelease: + DarwinPressKeycode (&xe, xe.u.u.type, xe.u.u.detail); + break; + + case ClientMessage: + /* Update server's current time, since we may generate + events, and it's nice if the timestamps are correct. */ + currentTime.milliseconds = GetTimeInMillis (); + + switch (xe.u.clientMessage.u.l.type) + { + case kXdarwinQuit: + GiveUp (0); + break; + + case kXquartzDeactivate: + DarwinReleaseKeys (); + /* fall through */ + + default: + if (xe.u.clientMessage.u.l.type >= kXquartzFirstEvent + && xe.u.clientMessage.u.l.type <= kXquartzLastEvent) + { + QuartzClientMessage (&xe); + } + else + { + ErrorF ("Unknown application defined event: %d.\n", + xe.u.clientMessage.u.l.longs0); + } + break; + } + break; + + default: + ErrorF("Unknown event caught: %d\n", xe.u.u.type); + break; + } + + /* Filter event for faked mouse button releases. */ + if (fake_button != 0 && xe.u.u.type == ButtonRelease) + { + current_flags |= (real_state & fake_button_mask); + DarwinUpdateModifiers (xe, current_flags); + + fake_button = 0; + fake_button_modifier = 0; + fake_button_mask = 0; + } + } + + miPointerUpdate (); +} + +void +DarwinEnqueuePointerEvent (xEvent *xe) +{ + darwinPointer->public.processInputProc (xe, darwinPointer, 1); +} + +/* Register the keyboard and mouse devices */ +void +InitInput (int argc, char **argv) +{ + DarwinInputInit (); + + darwinPointer = AddInputDevice(DarwinMouseProc, TRUE); + RegisterPointerDevice( darwinPointer ); + + darwinKeyboard = AddInputDevice(DarwinKeybdProc, TRUE); + RegisterKeyboardDevice( darwinKeyboard ); +} + +void +DarwinAdjustScreenOrigins (ScreenInfo *pScreenInfo) +{ + int i, left, top; + + /* Shift all screens so the X11 (0, 0) coordinate is at the top + left of the global screen coordinates. + + Screens can be arranged so the top left isn't on any screen, so + instead use the top left of the leftmost screen as (0,0). This + may mean some screen space is in -y, but it's better that (0,0) + be onscreen, or else default xterms disappear. It's better that + -y be used than -x, because when popup menus are forced + "onscreen" by dumb window managers like twm, they'll shift the + menus down instead of left, which still looks funny but is an + easier target to hit. */ + + left = dixScreenOrigins[0].x; + top = dixScreenOrigins[0].y; + + /* Find leftmost screen. If there's a tie, take the topmost of the two. */ + for (i = 1; i < pScreenInfo->numScreens; i++) { + if (dixScreenOrigins[i].x < left || + (dixScreenOrigins[i].x == left && + dixScreenOrigins[i].y < top)) + { + left = dixScreenOrigins[i].x; + top = dixScreenOrigins[i].y; + } + } + + darwinMainScreenX = left; + darwinMainScreenY = top; + + /* Shift all screens so that there is a screen whose top left + is at X11 (0,0) and at global screen coordinate + (darwinMainScreenX, darwinMainScreenY). */ + + if (darwinMainScreenX != 0 || darwinMainScreenY != 0) { + for (i = 0; i < pScreenInfo->numScreens; i++) { + dixScreenOrigins[i].x -= darwinMainScreenX; + dixScreenOrigins[i].y -= darwinMainScreenY; + ErrorF("Screen %d placed at X11 coordinate (%d,%d).\n", + i, dixScreenOrigins[i].x, dixScreenOrigins[i].y); + } + } +} + +/* Initialize screenInfo for all actually accessible framebuffers. + + The display mode dependent code gets called three times. The mode + specific InitOutput routines are expected to discover the number of + potentially useful screens and cache routes to them internally. + Inside DarwinAddScreen are two other mode specific calls. A mode + specific AddScreen routine is called for each screen to actually + initialize the screen with the ScreenPtr structure. After other + screen setup has been done, a mode specific SetupScreen function can + be called to finalize screen setup. */ + +void +InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) +{ + int i; + static unsigned long generation = 0; + + pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER; + pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; + pScreenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; + pScreenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; + + /* List how we want common pixmap formats to be padded */ + pScreenInfo->numPixmapFormats = NUMFORMATS; + for (i = 0; i < NUMFORMATS; i++) + pScreenInfo->formats[i] = formats[i]; + + /* Allocate private storage for each screen's Darwin specific info */ + if (generation != serverGeneration) { + darwinScreenIndex = AllocateScreenPrivateIndex(); + generation = serverGeneration; + } + + /* Discover screens and do mode specific initialization */ + QuartzInitOutput(argc, argv); + + for (i = 0; i < darwinScreensFound; i++) + AddScreen( DarwinAddScreen, argc, argv ); + + DarwinAdjustScreenOrigins (pScreenInfo); + + PseudoramiXExtensionInit (argc, argv); + AppleDRIExtensionInit (); + AppleWMExtensionInit (); + + DRIExtensionInit (); +} + +void +OsVendorFatalError (void) +{ + ErrorF( " OsVendorFatalError\n" ); +} + +void +OsVendorInit (void) +{ + if (serverGeneration == 1) + DarwinPrintBanner(); +} + +/* Process device-dependent command line args. Returns 0 if argument is + not device dependent, otherwise Count of number of elements of argv + that are part of a device dependent commandline option. */ +int +ddxProcessArgument (int argc, char *argv[], int i) +{ + int numDone; + + if ((numDone = QuartzProcessArgument( argc, argv, i ))) + return numDone; + + if ( !strcmp( argv[i], "-fakebuttons" ) ) { + darwinFakeButtons = TRUE; + ErrorF( "Faking a three button mouse\n" ); + return 1; + } + + if ( !strcmp( argv[i], "-nofakebuttons" ) ) { + darwinFakeButtons = FALSE; + ErrorF( "Not faking a three button mouse\n" ); + return 1; + } + + if (!strcmp( argv[i], "-fakemouse2" ) ) { + if ( i == argc-1 ) { + FatalError( "-fakemouse2 must be followed by a modifer list\n" ); + } + darwinFakeMouse2Mask = DarwinParseModifierList(argv[i+1]); + return 2; + } + + if (!strcmp( argv[i], "-fakemouse3" ) ) { + if ( i == argc-1 ) { + FatalError( "-fakemouse3 must be followed by a modifer list\n" ); + } + darwinFakeMouse3Mask = DarwinParseModifierList(argv[i+1]); + return 2; + } + + if ( !strcmp( argv[i], "-keymap" ) ) { + if ( i == argc-1 ) { + FatalError( "-keymap must be followed by a filename\n" ); + } + darwinKeymapFile = argv[i+1]; + return 2; + } + + if ( !strcmp( argv[i], "-nokeymap" ) ) { + darwinKeymapFile = NULL; + return 1; + } + + if ( !strcmp( argv[i], "+synckeymap" ) ) { + darwinSyncKeymap = TRUE; + return 1; + } + if ( !strcmp( argv[i], "-synckeymap" ) ) { + darwinSyncKeymap = FALSE; + return 1; + } + + if (strcmp (argv[i], "-swapAltMeta") == 0) { + darwinSwapAltMeta = TRUE; + return 1; + } + + if (!strcmp( argv[i], "-showconfig" ) || !strcmp( argv[i], "-version" )) { + DarwinPrintBanner(); + exit(0); + } + + /* XDarwinStartup uses this argument to indicate the IOKit X server + should be started. Ignore it here. */ + if ( !strcmp( argv[i], "-iokit" ) ) { + return 1; + } + + return 0; +} + +/* Print out correct use of device dependent commandline options. + Maybe the user now knows what really to do ... */ +void +ddxUseMsg (void) +{ + ErrorF("\n"); + ErrorF("\n"); + ErrorF("Device Dependent Usage:\n"); + ErrorF("\n"); + ErrorF("-depth use bits per pixel. Options: 8, 15, 24\b\n"); + ErrorF("-fakebuttons fake a 3 button mouse with Command and Option\n"); + ErrorF("-nofakebuttons\n"); + ErrorF("-fakemouse2 fake middle mouse button with modifier keys\n"); + ErrorF("-fakemouse3 fake right mouse button with modifier keys\n"); + ErrorF(" e.g.: -fakemouse2 \"option,shift\"\n"); + ErrorF("-keymap read the keymap from \n"); + ErrorF("-nokeymap\n"); + ErrorF("+synckeymap synchronize X keymap with system keymap\n"); + ErrorF("-synckeymap only set X keymap on server startup\n"); + ErrorF("-swapAltMeta swap meaning of Alt and Meta modifiers\n"); + ErrorF("-version show server version.\n"); + ErrorF("\n"); +} + +/* Device dependent cleanup. Called by dix before normal server death. */ +void +ddxGiveUp (void) +{ + ErrorF( "Quitting XDarwin...\n" ); + QuartzGiveUp(); +} + +/* DDX - specific abort routine. Called by AbortServer(). The attempt is + made to restore all original setting of the displays. Also all devices + are closed. */ +void +AbortDDX (void) +{ + ErrorF( " AbortDDX\n" ); + + /* This is needed for a abnormal server exit, since the normal exit stuff + MUST also be performed (i.e. the vt must be left in a defined state) */ + ddxGiveUp(); +} + +extern void GlxExtensionInit(); +extern void GlxWrapInitVisuals(void *procPtr); +void DarwinGlxExtensionInit (void) { GlxExtensionInit (); } +void DarwinGlxWrapInitVisuals (void *ptr) { GlxWrapInitVisuals (ptr); } + +#ifdef DPMSExtension +Bool +DPMSSupported (void) +{ + return FALSE; +} + +void +DPMSSet (int level) +{ +} + +int +DPMSGet (int *level) +{ + return -1; +} +#endif + +#ifdef DDXTIME +CARD32 +GetTimeInMillis (void) +{ + extern void Microseconds (); + UnsignedWide usec; + + /* This doesn't involve trapping into the kernel, unlike gettimeofday. */ + Microseconds (&usec); + + /* Should be good enough? (-2% error) */ + return (usec.hi << 22) | (usec.lo >> 10); +} +#endif diff --git a/synfig-osx/launcher/darwin.h b/synfig-osx/launcher/darwin.h new file mode 100644 index 0000000..845036e --- /dev/null +++ b/synfig-osx/launcher/darwin.h @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2001 Torrey T. Lyons. All Rights Reserved. + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in this Software without prior written authorization. + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.h,v 1.11 2002/03/28 02:21:08 torrey Exp $ */ + +#ifndef _DARWIN_H +#define _DARWIN_H + +#include "inputstr.h" +#include "screenint.h" +#include "scrnintstr.h" +#include "extensions/XKB.h" + +typedef struct { + void *framebuffer; + int x; + int y; + int width; + int height; + int pitch; + int bitsPerPixel; + int componentCount; + int bitsPerComponent; + int colorBitsPerPixel; + unsigned int redMask, greenMask, blueMask; +} DarwinFramebufferRec, *DarwinFramebufferPtr; + +/* From darwinKeyboard.c */ +int DarwinModifierNXKeyToNXKeycode(int key, int side); +void DarwinKeyboardInit(DeviceIntPtr pDev); +void DarwinKeyboardReload (DeviceIntPtr pDev); + +/* from darwin-new-keymap.c */ +unsigned int DarwinSystemKeymapSeed (void); + +/* from darwin-input.c */ +void DarwinEnqueueEvent (const xEvent *e); +Bool DarwinDequeueEvent (xEvent *e); +void DarwinInputInit (void); +void DarwinInputPreInit (void); +int DarwinMouseProc(DeviceIntPtr pPointer, int what); +int DarwinKeybdProc(DeviceIntPtr pDev, int onoff); + +#undef assert +#define assert(x) { if ((x) == 0) \ + FatalError("assert failed on line %d of %s!\n", __LINE__, __FILE__); } +#define kern_assert(x) { if ((x) != KERN_SUCCESS) \ + FatalError("assert failed on line %d of %s with kernel return 0x%x!\n", \ + __LINE__, __FILE__, x); } +#define SCREEN_PRIV(pScreen) \ + ((DarwinFramebufferPtr)pScreen->devPrivates[darwinScreenIndex].ptr) + +#define MIN_KEYCODE XkbMinLegalKeyCode // unfortunately, this isn't 0... + +extern void DarwinEnqueuePointerEvent (xEvent *xe); +extern void DarwinAdjustScreenOrigins (ScreenInfo *pScreenInfo); + +/* Global variables from darwin.c */ +extern int darwinScreenIndex; // index into pScreen.devPrivates +extern int darwinScreensFound; + +/* User preferences used by generic Darwin X server code */ +extern Bool darwinSwapAltMeta; +extern int darwinFakeButtons; +extern char *darwinKeymapFile; +extern Bool darwinSyncKeymap; + +/* location of X11's (0,0) point in global screen coordinates */ +extern int darwinMainScreenX; +extern int darwinMainScreenY; + +/* Client message event type ranges. */ +enum { + kXdarwinFirstEvent = 1, + kXdarwinLastEvent = kXdarwinFirstEvent + 99, + kXquartzFirstEvent = kXdarwinLastEvent + 1, + kXquartzLastEvent = kXquartzFirstEvent + 99, +}; + +/* "Darwin" client message types */ +enum { + kXdarwinQuit = kXdarwinFirstEvent, +}; + +extern char *DarwinFindLibraryFile (const char *file, const char *pathext); +extern void DarwinForeachLibraryFile (const char *dir, + void (*callback) (const char *dir, + const char *file, + void *data), + void *data); + +extern void DarwinSetFakeButtons (const char *mod2, const char *mod3); + +#endif /* _DARWIN_H */ diff --git a/synfig-osx/launcher/dri-surface.c b/synfig-osx/launcher/dri-surface.c new file mode 100644 index 0000000..f7249cf --- /dev/null +++ b/synfig-osx/launcher/dri-surface.c @@ -0,0 +1,940 @@ +/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.34 2001/12/10 19:07:19 dawes Exp $ */ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright 2000 VA Linux Systems, Inc. +Copyright (c) 2002 Apple Computer, Inc. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Jens Owen + * Rickard E. (Rik) Faith + * + */ + +#ifdef XFree86LOADER +#include "xf86.h" +#include "xf86_ansic.h" +#else +#include +#include +#endif + +#define NEED_REPLIES +#define NEED_EVENTS +#include "X.h" +#include "Xproto.h" +#include "misc.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include "colormapst.h" +#include "cursorstr.h" +#include "scrnintstr.h" +#include "windowstr.h" +#include "servermd.h" +#define _APPLEDRI_SERVER_ +#include "appledristr.h" +#include "swaprep.h" +#include "dri-surface.h" +#include "dristruct.h" +#include "mi.h" +#include "mipointer.h" +#include "rootless-common.h" +#include "x-hash.h" +#include "x-hook.h" + +#include + +static int DRIScreenPrivIndex = -1; +static int DRIWindowPrivIndex = -1; +static int DRIPixmapPrivIndex = -1; +static unsigned long DRIGeneration = 0; + +static RESTYPE DRIDrawablePrivResType; + +static x_hash_table *surface_hash; /* maps surface ids -> drawablePrivs */ + +Bool +DRIScreenInit(ScreenPtr pScreen) +{ + DRIScreenPrivPtr pDRIPriv; + int i; + + if (DRIGeneration != serverGeneration) { + if ((DRIScreenPrivIndex = AllocateScreenPrivateIndex()) < 0) + return FALSE; + DRIGeneration = serverGeneration; + } + + pDRIPriv = (DRIScreenPrivPtr) xcalloc(1, sizeof(DRIScreenPrivRec)); + if (!pDRIPriv) { + pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; + return FALSE; + } + + pScreen->devPrivates[DRIScreenPrivIndex].ptr = (pointer) pDRIPriv; + pDRIPriv->directRenderingSupport = TRUE; + pDRIPriv->nrWindows = 0; + + /* Initialize drawable tables */ + for( i=0; i < DRI_MAX_DRAWABLES; i++) { + pDRIPriv->DRIDrawables[i] = NULL; + } + + return TRUE; +} + +Bool +DRIFinishScreenInit(ScreenPtr pScreen) +{ + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + + /* Wrap DRI support */ + pDRIPriv->wrap.ValidateTree = pScreen->ValidateTree; + pScreen->ValidateTree = DRIValidateTree; + + pDRIPriv->wrap.PostValidateTree = pScreen->PostValidateTree; + pScreen->PostValidateTree = DRIPostValidateTree; + + pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures; + pScreen->WindowExposures = DRIWindowExposures; + + pDRIPriv->wrap.CopyWindow = pScreen->CopyWindow; + pScreen->CopyWindow = DRICopyWindow; + + pDRIPriv->wrap.ClipNotify = pScreen->ClipNotify; + pScreen->ClipNotify = DRIClipNotify; + + ErrorF("[DRI] screen %d installation complete\n", pScreen->myNum); + + return TRUE; +} + +void +DRICloseScreen(ScreenPtr pScreen) +{ + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + + if (pDRIPriv && pDRIPriv->directRenderingSupport) { + xfree(pDRIPriv); + pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; + } +} + +Bool +DRIExtensionInit(void) +{ + int i; + ScreenPtr pScreen; + + if (DRIScreenPrivIndex < 0) { + return FALSE; + } + + /* Allocate a window private index with a zero sized private area for + * each window, then should a window become a DRI window, we'll hang + * a DRIWindowPrivateRec off of this private index. + */ + if ((DRIWindowPrivIndex = AllocateWindowPrivateIndex()) < 0) + return FALSE; + if ((DRIPixmapPrivIndex = AllocatePixmapPrivateIndex()) < 0) + return FALSE; + + DRIDrawablePrivResType = CreateNewResourceType(DRIDrawablePrivDelete); + + for (i = 0; i < screenInfo.numScreens; i++) + { + pScreen = screenInfo.screens[i]; + if (!AllocateWindowPrivate(pScreen, DRIWindowPrivIndex, 0)) + return FALSE; + if (!AllocatePixmapPrivate(pScreen, DRIPixmapPrivIndex, 0)) + return FALSE; + } + + return TRUE; +} + +void +DRIReset(void) +{ + /* + * This stub routine is called when the X Server recycles, resources + * allocated by DRIExtensionInit need to be managed here. + * + * Currently this routine is a stub because all the interesting resources + * are managed via the screen init process. + */ +} + +Bool +DRIQueryDirectRenderingCapable(ScreenPtr pScreen, Bool* isCapable) +{ + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + + if (pDRIPriv) + *isCapable = pDRIPriv->directRenderingSupport; + else + *isCapable = FALSE; + + return TRUE; +} + +Bool +DRIAuthConnection(ScreenPtr pScreen, unsigned int magic) +{ +#if 0 + /* FIXME: something? */ + + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + + if (drmAuthMagic(pDRIPriv->drmFD, magic)) return FALSE; +#endif + return TRUE; +} + +static void +DRIUpdateSurface (DRIDrawablePrivPtr pDRIDrawablePriv, DrawablePtr pDraw) +{ + WindowPtr pTopWin; + xp_window_changes wc; + unsigned int flags = 0; + + if (pDRIDrawablePriv->sid == 0) + return; + +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 + wc.depth = (pDraw->bitsPerPixel == 32 ? XP_DEPTH_ARGB8888 + : pDraw->bitsPerPixel == 16 ? XP_DEPTH_RGB555 : XP_DEPTH_NIL); + if (wc.depth != XP_DEPTH_NIL) + flags |= XP_DEPTH; +#endif + + if (pDraw->type == DRAWABLE_WINDOW) { + WindowPtr pWin = (WindowPtr) pDraw; + + DRIStopDrawing (&pWin->drawable, FALSE); + + pTopWin = TopLevelParent (pWin); + + wc.x = pWin->drawable.x - (pTopWin->drawable.x - pTopWin->borderWidth); + wc.y = pWin->drawable.y - (pTopWin->drawable.y - pTopWin->borderWidth); + wc.width = pWin->drawable.width; + wc.height = pWin->drawable.height; + wc.bit_gravity = XP_GRAVITY_NONE; + + wc.shape_nrects = REGION_NUM_RECTS (&pWin->clipList); + wc.shape_rects = REGION_RECTS (&pWin->clipList); + wc.shape_tx = - (pTopWin->drawable.x - pTopWin->borderWidth); + wc.shape_ty = - (pTopWin->drawable.y - pTopWin->borderWidth); + + flags |= XP_BOUNDS | XP_SHAPE; + + pDRIDrawablePriv->x = pWin->drawable.x - pTopWin->borderWidth; + pDRIDrawablePriv->y = pWin->drawable.y - pTopWin->borderWidth; + + } else if (pDraw->type == DRAWABLE_PIXMAP) { + wc.x = 0; + wc.y = 0; + wc.width = pDraw->width; + wc.height = pDraw->height; + wc.bit_gravity = XP_GRAVITY_NONE; + flags |= XP_BOUNDS; + } + + xp_configure_surface (pDRIDrawablePriv->sid, flags, &wc); +} + +Bool +DRICreateSurface (ScreenPtr pScreen, Drawable id, + DrawablePtr pDrawable, xp_client_id client_id, + xp_surface_id *surface_id, unsigned int ret_key[2], + void (*notify) (void *arg, void *data), void *notify_data) +{ + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + DRIDrawablePrivPtr pDRIDrawablePriv; + WindowPtr pWin; + PixmapPtr pPix; + xp_window_id wid = 0; + + if (pDrawable->type == DRAWABLE_WINDOW) { + pWin = (WindowPtr)pDrawable; + pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); + if (pDRIDrawablePriv == NULL) { + WindowPtr pTopWin; + xp_error err; + xp_window_changes wc; + + pTopWin = TopLevelParent (pWin); + + /* allocate a DRI Window Private record */ + if (!(pDRIDrawablePriv = xcalloc(1, sizeof(DRIDrawablePrivRec)))) { + return FALSE; + } + + pDRIDrawablePriv->pDraw = pDrawable; + pDRIDrawablePriv->pScreen = pScreen; + pDRIDrawablePriv->refCount = 0; + pDRIDrawablePriv->drawableIndex = -1; + pDRIDrawablePriv->notifiers = NULL; + + /* find the physical window */ + wid = RootlessGetPhysicalWindow (pTopWin, TRUE); + if (wid == 0) { + xfree (pDRIDrawablePriv); + return FALSE; + } + + /* allocate the physical surface */ + err = xp_create_surface (wid, &pDRIDrawablePriv->sid); + if (err != Success) { + xfree (pDRIDrawablePriv); + return FALSE; + } + + /* Make it visible */ + wc.stack_mode = XP_MAPPED_ABOVE; + wc.sibling = 0; + err = xp_configure_surface (pDRIDrawablePriv->sid, + XP_STACKING, &wc); + if (err != Success) + { + xp_destroy_surface (pDRIDrawablePriv->sid); + xfree (pDRIDrawablePriv); + return FALSE; + } + + /* save private off of preallocated index */ + pWin->devPrivates[DRIWindowPrivIndex].ptr = (pointer)pDRIDrawablePriv; + } + } +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 + else if (pDrawable->type == DRAWABLE_PIXMAP) { + pPix = (PixmapPtr)pDrawable; + pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix); + if (pDRIDrawablePriv == NULL) { + xp_error err; + + /* allocate a DRI Window Private record */ + if (!(pDRIDrawablePriv = xcalloc(1, sizeof(DRIDrawablePrivRec)))) { + return FALSE; + } + + pDRIDrawablePriv->pDraw = pDrawable; + pDRIDrawablePriv->pScreen = pScreen; + pDRIDrawablePriv->refCount = 0; + pDRIDrawablePriv->drawableIndex = -1; + pDRIDrawablePriv->notifiers = NULL; + + /* Passing a null window id to Xplugin in 10.3+ asks for + an accelerated offscreen surface. */ + + err = xp_create_surface (0, &pDRIDrawablePriv->sid); + if (err != Success) { + xfree (pDRIDrawablePriv); + return FALSE; + } + + /* save private off of preallocated index */ + pPix->devPrivates[DRIPixmapPrivIndex].ptr = (pointer)pDRIDrawablePriv; + } + } +#endif + else { /* for GLX 1.3, a PBuffer */ + /* NOT_DONE */ + return FALSE; + } + + /* Finish initialization of new surfaces */ + if (pDRIDrawablePriv->refCount == 0) { + unsigned int key[2] = {0}; + xp_error err; + + /* try to give the client access to the surface + FIXME: how to export pixmaps? */ + if (client_id != 0 && wid != 0) + { + err = xp_export_surface (wid, pDRIDrawablePriv->sid, + client_id, key); + if (err != Success) { + xp_destroy_surface (pDRIDrawablePriv->sid); + xfree (pDRIDrawablePriv); + return FALSE; + } + } + + pDRIDrawablePriv->key[0] = key[0]; + pDRIDrawablePriv->key[1] = key[1]; + + ++pDRIPriv->nrWindows; + + /* and stash it by surface id */ + if (surface_hash == NULL) + surface_hash = x_hash_table_new (NULL, NULL, NULL, NULL); + x_hash_table_insert (surface_hash, + (void *) pDRIDrawablePriv->sid, pDRIDrawablePriv); + + /* track this in case this window is destroyed */ + AddResource(id, DRIDrawablePrivResType, (pointer)pDrawable); + + /* Initialize shape */ + DRIUpdateSurface (pDRIDrawablePriv, pDrawable); + } + + pDRIDrawablePriv->refCount++; + + *surface_id = pDRIDrawablePriv->sid; + + if (ret_key != NULL) { + ret_key[0] = pDRIDrawablePriv->key[0]; + ret_key[1] = pDRIDrawablePriv->key[1]; + } + + if (notify != NULL) { + pDRIDrawablePriv->notifiers = x_hook_add (pDRIDrawablePriv->notifiers, + notify, notify_data); + } + + return TRUE; +} + +Bool +DRIDestroySurface(ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable, + void (*notify) (void *, void *), void *notify_data) +{ + DRIDrawablePrivPtr pDRIDrawablePriv; + + if (pDrawable->type == DRAWABLE_WINDOW) { + pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW((WindowPtr)pDrawable); + } else if (pDrawable->type == DRAWABLE_PIXMAP) { + pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_PIXMAP((PixmapPtr)pDrawable); + } else { + return FALSE; + } + + if (pDRIDrawablePriv != NULL) { + if (notify != NULL) { + pDRIDrawablePriv->notifiers = x_hook_remove (pDRIDrawablePriv->notifiers, + notify, notify_data); + } + if (--pDRIDrawablePriv->refCount <= 0) { + /* This calls back to DRIDrawablePrivDelete + which frees the private area */ + FreeResourceByType(id, DRIDrawablePrivResType, FALSE); + } + } + + return TRUE; +} + +Bool +DRIDrawablePrivDelete(pointer pResource, XID id) +{ + DrawablePtr pDrawable = (DrawablePtr)pResource; + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pDrawable->pScreen); + DRIDrawablePrivPtr pDRIDrawablePriv = NULL; + WindowPtr pWin = NULL; + PixmapPtr pPix = NULL; + + if (pDrawable->type == DRAWABLE_WINDOW) { + pWin = (WindowPtr)pDrawable; + pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); + DRIStopDrawing (pDrawable, FALSE); + pDRIPriv->drawing = x_list_remove (pDRIPriv->drawing, + pDRIDrawablePriv); + } else if (pDrawable->type == DRAWABLE_PIXMAP) { + pPix = (PixmapPtr)pDrawable; + pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix); + } + + if (pDRIDrawablePriv == NULL) + return FALSE; + + if (pDRIDrawablePriv->drawableIndex != -1) { + /* release drawable table entry */ + pDRIPriv->DRIDrawables[pDRIDrawablePriv->drawableIndex] = NULL; + } + + if (pDRIDrawablePriv->sid != 0) { + xp_destroy_surface (pDRIDrawablePriv->sid); + x_hash_table_remove (surface_hash, (void *) pDRIDrawablePriv->sid); + } + + if (pDRIDrawablePriv->notifiers != NULL) + x_hook_free (pDRIDrawablePriv->notifiers); + + xfree(pDRIDrawablePriv); + + if (pDrawable->type == DRAWABLE_WINDOW) { + pWin->devPrivates[DRIWindowPrivIndex].ptr = NULL; + } else if (pDrawable->type == DRAWABLE_PIXMAP) { + pPix->devPrivates[DRIPixmapPrivIndex].ptr = NULL; + } + + --pDRIPriv->nrWindows; + + return TRUE; +} + +void +DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + DRIDrawablePrivPtr pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); + + if(pDRIDrawablePriv) { + /* FIXME: something? */ + } + + pScreen->WindowExposures = pDRIPriv->wrap.WindowExposures; + + (*pScreen->WindowExposures)(pWin, prgn, bsreg); + + pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures; + pScreen->WindowExposures = DRIWindowExposures; + +} + +void +DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + DRIDrawablePrivPtr pDRIDrawablePriv; + + if(pDRIPriv->nrWindows > 0) { + pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW (pWin); + if (pDRIDrawablePriv != NULL) { + DRIUpdateSurface (pDRIDrawablePriv, &pWin->drawable); + } + } + + /* unwrap */ + pScreen->CopyWindow = pDRIPriv->wrap.CopyWindow; + + /* call lower layers */ + (*pScreen->CopyWindow)(pWin, ptOldOrg, prgnSrc); + + /* rewrap */ + pDRIPriv->wrap.CopyWindow = pScreen->CopyWindow; + pScreen->CopyWindow = DRICopyWindow; +} + +int +DRIValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) +{ + ScreenPtr pScreen = pParent->drawable.pScreen; + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + int returnValue; + + /* unwrap */ + pScreen->ValidateTree = pDRIPriv->wrap.ValidateTree; + + /* call lower layers */ + returnValue = (*pScreen->ValidateTree)(pParent, pChild, kind); + + /* rewrap */ + pDRIPriv->wrap.ValidateTree = pScreen->ValidateTree; + pScreen->ValidateTree = DRIValidateTree; + + return returnValue; +} + +void +DRIPostValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) +{ + ScreenPtr pScreen; + DRIScreenPrivPtr pDRIPriv; + + if (pParent) { + pScreen = pParent->drawable.pScreen; + } else { + pScreen = pChild->drawable.pScreen; + } + pDRIPriv = DRI_SCREEN_PRIV(pScreen); + + if (pDRIPriv->wrap.PostValidateTree) { + /* unwrap */ + pScreen->PostValidateTree = pDRIPriv->wrap.PostValidateTree; + + /* call lower layers */ + (*pScreen->PostValidateTree)(pParent, pChild, kind); + + /* rewrap */ + pDRIPriv->wrap.PostValidateTree = pScreen->PostValidateTree; + pScreen->PostValidateTree = DRIPostValidateTree; + } +} + +void +DRIClipNotify(WindowPtr pWin, int dx, int dy) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + DRIDrawablePrivPtr pDRIDrawablePriv; + + if ((pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin))) { + DRIUpdateSurface (pDRIDrawablePriv, &pWin->drawable); + } + + if(pDRIPriv->wrap.ClipNotify) { + pScreen->ClipNotify = pDRIPriv->wrap.ClipNotify; + + (*pScreen->ClipNotify)(pWin, dx, dy); + + pDRIPriv->wrap.ClipNotify = pScreen->ClipNotify; + pScreen->ClipNotify = DRIClipNotify; + } +} + +/* This lets get at the unwrapped functions so that they can correctly + * call the lowerlevel functions, and choose whether they will be + * called at every level of recursion (eg in validatetree). + */ +DRIWrappedFuncsRec * +DRIGetWrappedFuncs(ScreenPtr pScreen) +{ + return &(DRI_SCREEN_PRIV(pScreen)->wrap); +} + +void +DRIQueryVersion(int *majorVersion, + int *minorVersion, + int *patchVersion) +{ + *majorVersion = APPLE_DRI_MAJOR_VERSION; + *minorVersion = APPLE_DRI_MINOR_VERSION; + *patchVersion = APPLE_DRI_PATCH_VERSION; +} + +void +DRISurfaceNotify (xp_surface_id id, int kind) +{ + DRIDrawablePrivPtr pDRIDrawablePriv = NULL; + DRISurfaceNotifyArg arg; + + arg.id = id; + arg.kind = kind; + + if (surface_hash != NULL) + { + pDRIDrawablePriv = x_hash_table_lookup (surface_hash, + (void *) id, NULL); + } + + if (pDRIDrawablePriv == NULL) + return; + + if (kind == AppleDRISurfaceNotifyDestroyed) + { + pDRIDrawablePriv->sid = 0; + x_hash_table_remove (surface_hash, (void *) id); + } + + x_hook_run (pDRIDrawablePriv->notifiers, &arg); + + if (kind == AppleDRISurfaceNotifyDestroyed) + { + /* Kill off the handle. */ + + FreeResourceByType (pDRIDrawablePriv->pDraw->id, + DRIDrawablePrivResType, FALSE); + } +} + + +/* Experimental support for X drawing directly into VRAM surfaces. */ + +Bool +DRIStartDrawing (DrawablePtr pDraw) +{ +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 + return FALSE; +#else + DRIDrawablePrivPtr priv = NULL; + DRIScreenPrivPtr pDRIPriv; + + if (pDraw->type == DRAWABLE_WINDOW) + priv = DRI_DRAWABLE_PRIV_FROM_WINDOW ((WindowPtr)pDraw); +#if 0 + /* FIXME: support pixmaps */ + else if (pDraw->type == DRAWABLE_PIXMAP) + priv = DRI_DRAWABLE_PRIV_FROM_PIXMAP ((PixmapPtr)pDraw); +#endif + + if (priv == NULL) + return FALSE; + + pDRIPriv = DRI_SCREEN_PRIV(priv->pScreen); + + if (!priv->is_drawing) + { + xp_error err; + xp_box r; + + err = xp_lock_window (priv->sid, NULL, NULL, + &priv->data, &priv->rowbytes, &r); + if (err != Success) + return FALSE; + + if (pDraw->type == DRAWABLE_WINDOW) + { + WindowPtr pWin = (WindowPtr) pDraw; + int bw = wBorderWidth (pWin); + + priv->pixmap = + GetScratchPixmapHeader(pWin->drawable.pScreen, r.x2 - r.x1, + r.y2 - r.y1, pWin->drawable.depth, + pWin->drawable.bitsPerPixel, + priv->rowbytes, priv->data); + TranslatePixmapBase (priv->pixmap, + - (pWin->drawable.x - bw), + - (pWin->drawable.y - bw)); + } + + priv->is_drawing = TRUE; + pDRIPriv->drawing = x_list_prepend (pDRIPriv->drawing, priv); + } + + if (pDraw->type == DRAWABLE_WINDOW) + { + WindowPtr pWin = (WindowPtr) pDraw; + + priv->oldPixmap = pWin->drawable.pScreen->GetWindowPixmap (pWin); + pWin->drawable.pScreen->SetWindowPixmap (pWin, priv->pixmap); + } + + return TRUE; +#endif +} + +Bool +DRIStopDrawing (DrawablePtr pDraw, Bool flush) +{ +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 + return FALSE; +#else + DRIDrawablePrivPtr priv = NULL; + ScreenPtr pScreen; + DRIScreenPrivPtr pDRIPriv; + + if (pDraw->type == DRAWABLE_WINDOW) + priv = DRI_DRAWABLE_PRIV_FROM_WINDOW ((WindowPtr)pDraw); + else if (pDraw->type == DRAWABLE_PIXMAP) + priv = DRI_DRAWABLE_PRIV_FROM_PIXMAP ((PixmapPtr)pDraw); + + if (priv == NULL) + return FALSE; + + pScreen = priv->pScreen; + pDRIPriv = DRI_SCREEN_PRIV(pScreen); + + if (priv->is_drawing) + { + xp_unlock_window (priv->sid, flush); + + if (pDraw->type == DRAWABLE_WINDOW) + { + FreeScratchPixmapHeader (priv->pixmap); + pScreen->SetWindowPixmap ((WindowPtr)pDraw, priv->oldPixmap); + } + + priv->pixmap = NULL; + + /* If we didn't flush don't forget that we still need to.. */ + if (flush) + pDRIPriv->drawing = x_list_remove (pDRIPriv->drawing, priv); + + priv->is_drawing = FALSE; + } + else if (flush) + { + xp_flush_window (priv->sid); + } + + return TRUE; +#endif /* 10.3 */ +} + +/* true iff two Boxes overlap */ +#define EXTENTCHECK(r1,r2) \ + (!( ((r1)->x2 <= (r2)->x1) || \ + ((r1)->x1 >= (r2)->x2) || \ + ((r1)->y2 <= (r2)->y1) || \ + ((r1)->y1 >= (r2)->y2) ) ) + +Bool +DRIDamageRegion (DrawablePtr pDraw, RegionPtr pRegion) +{ +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 + return FALSE; +#else + DRIDrawablePrivPtr priv = NULL; + RegionRec clipped; + BoxPtr b1, b2; + + if (pDraw->type == DRAWABLE_WINDOW) + priv = DRI_DRAWABLE_PRIV_FROM_WINDOW ((WindowPtr)pDraw); + + if (priv == NULL) + return FALSE; + + /* adapted from RootlessDamageRegion () */ + + if (pDraw->type == DRAWABLE_WINDOW) + { + WindowPtr pWin = (WindowPtr) pDraw; + + b1 = REGION_EXTENTS (pWin->drawable.pScreen, &pWin->borderClip); + b2 = REGION_EXTENTS (pWin->drawable.pScreen, pRegion); + + if (EXTENTCHECK (b1, b2)) + { + /* Regions may overlap. */ + + if (REGION_NUM_RECTS (pRegion) == 1) + { + int in; + + /* Damaged region only has a single rect, so we can + just compare that against the region */ + + in = RECT_IN_REGION (pWin->drawable.pScreen, &pWin->borderClip, + REGION_RECTS (pRegion)); + if (in == rgnIN) + { + /* clip totally contains pRegion */ + + xp_mark_window (priv->sid, REGION_NUM_RECTS (pRegion), + REGION_RECTS (pRegion), + -priv->x, -priv->y); + + RootlessQueueRedisplay (pWin->drawable.pScreen); + goto out; + } + else if (in == rgnOUT) + { + /* clip doesn't contain pRegion */ + + goto out; + } + } + + /* clip overlaps pRegion, need to intersect */ + + REGION_INIT (pWin->drawable.pScreen, &clipped, NullBox, 0); + REGION_INTERSECT (pWin->drawable.pScreen, &clipped, + &pWin->borderClip, pRegion); + + xp_mark_window (priv->sid, REGION_NUM_RECTS (&clipped), + REGION_RECTS (&clipped), -priv->x, -priv->y); + + REGION_UNINIT (pWin->drawable.pScreen, &clipped); + + RootlessQueueRedisplay (pWin->drawable.pScreen); + } + } + +out: + return TRUE; +#endif /* 10.3 */ +} + +void +DRISynchronizeDrawable (DrawablePtr pDraw, Bool flush) +{ +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 + ScreenPtr pScreen; + DRIScreenPrivPtr pDRIPriv; + DRIDrawablePrivPtr priv; + x_list *node, *copy; + + pScreen = pDraw->pScreen; + pDRIPriv = DRI_SCREEN_PRIV(pScreen); + + if (pDRIPriv == NULL || pDRIPriv->drawing == NULL) + return; + + if (pDraw->type == DRAWABLE_WINDOW) + { + WindowPtr pWin = TopLevelParent ((WindowPtr) pDraw); + + /* need to find _any_ window under pWin that is drawing. Scan the + list looking for candidates. */ + + copy = x_list_copy (pDRIPriv->drawing); + + for (node = copy; node != NULL; node = node->next) + { + priv = node->data; + + if (priv->pDraw->type == DRAWABLE_WINDOW + && TopLevelParent ((WindowPtr) priv->pDraw) == pWin) + { + DRIStopDrawing (priv->pDraw, flush); + } + } + + x_list_free (copy); + } + else + { + DRIStopDrawing (pDraw, flush); + } +#endif /* 10.3 */ +} + +void +DRISynchronize (Bool flush) +{ +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 + int i; + ScreenPtr pScreen; + DRIScreenPrivPtr pDRIPriv; + DRIDrawablePrivPtr priv; + x_list *node, *copy; + + for (i = 0; i < screenInfo.numScreens; i++) + { + pScreen = screenInfo.screens[i]; + pDRIPriv = DRI_SCREEN_PRIV(pScreen); + + if (pDRIPriv == NULL || pDRIPriv->drawing == NULL) + continue; + + copy = x_list_copy (pDRIPriv->drawing); + + for (node = copy; node != NULL; node = node->next) + { + priv = node->data; + + DRIStopDrawing (priv->pDraw, flush); + } + + x_list_free (copy); + } +#endif /* 10.3 */ +} diff --git a/synfig-osx/launcher/dri-surface.h b/synfig-osx/launcher/dri-surface.h new file mode 100644 index 0000000..8f11739 --- /dev/null +++ b/synfig-osx/launcher/dri-surface.h @@ -0,0 +1,115 @@ +/* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.18 2001/03/21 16:21:40 dawes Exp $ */ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright (c) 2002 Apple Computer, Inc. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Jens Owen + * + */ + +/* Prototypes for DRI functions */ + +#ifndef _DRI_SURFACE_H_ +#define _DRI_SURFACE_H_ + +#include "dri.h" +#include "Xplugin.h" + +typedef void (*ClipNotifyPtr)( WindowPtr, int, int ); + + +/* + * These functions can be wrapped by the DRI. Each of these have + * generic default funcs (initialized in DRICreateInfoRec) and can be + * overridden by the driver in its [driver]DRIScreenInit function. + */ +typedef struct { + WindowExposuresProcPtr WindowExposures; + CopyWindowProcPtr CopyWindow; + ValidateTreeProcPtr ValidateTree; + PostValidateTreeProcPtr PostValidateTree; + ClipNotifyProcPtr ClipNotify; +} DRIWrappedFuncsRec, *DRIWrappedFuncsPtr; + +typedef struct { + xp_surface_id id; + int kind; +} DRISurfaceNotifyArg; + +extern void DRIClipNotify(WindowPtr pWin, + int dx, + int dy); + +extern void DRICloseScreen(ScreenPtr pScreen); + +extern void DRICopyWindow(WindowPtr pWin, + DDXPointRec ptOldOrg, + RegionPtr prgnSrc); + +extern Bool DRICreateSurface(ScreenPtr pScreen, + Drawable id, + DrawablePtr pDrawable, + xp_client_id client_id, + xp_surface_id *surface_id, + unsigned int key[2], + void (*notify) (void *arg, void *data), + void *notify_data); + +extern Bool DRIDestroySurface(ScreenPtr pScreen, + Drawable id, + DrawablePtr pDrawable, + void (*notify) (void *arg, void *data), + void *notify_data); + +extern Bool DRIDrawablePrivDelete(pointer pResource, + XID id); + +extern DRIWrappedFuncsRec *DRIGetWrappedFuncs(ScreenPtr pScreen); + +extern void DRIPostValidateTree(WindowPtr pParent, + WindowPtr pChild, + VTKind kind); + +extern int DRIValidateTree(WindowPtr pParent, + WindowPtr pChild, + VTKind kind); + +extern void DRIWindowExposures(WindowPtr pWin, + RegionPtr prgn, + RegionPtr bsreg); + +extern void DRISurfaceNotify (xp_surface_id id, int kind); + +extern Bool DRIStartDrawing (DrawablePtr pDraw); +extern Bool DRIStopDrawing (DrawablePtr pDraw, Bool flush); +extern Bool DRIDamageRegion (DrawablePtr pDraw, RegionPtr pRegion); +extern void DRISynchronizeDrawable (DrawablePtr pDraw, Bool flush); +extern void DRISynchronize (Bool flush); + +#endif diff --git a/synfig-osx/launcher/dri.h b/synfig-osx/launcher/dri.h new file mode 100644 index 0000000..a0766bd --- /dev/null +++ b/synfig-osx/launcher/dri.h @@ -0,0 +1,64 @@ +/* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.18 2001/03/21 16:21:40 dawes Exp $ */ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright (c) 2002 Apple Computer, Inc. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Jens Owen + * + */ + +/* Prototypes for DRI functions */ + +#ifndef _DRI_H_ + +#include "Xdefs.h" +#include "screenint.h" +#define _APPLEDRI_SERVER_ +#include "appledri.h" + +extern Bool DRIAuthConnection(ScreenPtr pScreen, unsigned int magic); + +extern Bool DRIExtensionInit(void); + +extern Bool DRIFinishScreenInit(ScreenPtr pScreen); + +extern Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen, + Bool *isCapable); + +extern void DRIQueryVersion(int *majorVersion, + int *minorVersion, + int *patchVersion); + +extern void DRIReset(void); + +extern Bool DRIScreenInit(ScreenPtr pScreen); + +#define _DRI_H_ + +#endif diff --git a/synfig-osx/launcher/dristruct.h b/synfig-osx/launcher/dristruct.h new file mode 100644 index 0000000..51185a5 --- /dev/null +++ b/synfig-osx/launcher/dristruct.h @@ -0,0 +1,91 @@ +/* $XFree86: xc/programs/Xserver/GL/dri/dristruct.h,v 1.10 2001/03/21 16:21:40 dawes Exp $ */ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright (c) 2002 Apple Computer, Inc. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Jens Owen + * + */ + +#ifndef DRI_STRUCT_H +#define DRI_STRUCT_H + +#include "dri-surface.h" +#include "x-list.h" + +#define DRI_MAX_DRAWABLES 256 + +#define DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin) \ + ((DRIWindowPrivIndex < 0) ? \ + NULL : \ + ((DRIDrawablePrivPtr)((pWin)->devPrivates[DRIWindowPrivIndex].ptr))) + +#define DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix) \ + ((DRIPixmapPrivIndex < 0) ? \ + NULL : \ + ((DRIDrawablePrivPtr)((pPix)->devPrivates[DRIPixmapPrivIndex].ptr))) + +typedef struct _DRIDrawablePrivRec +{ + xp_surface_id sid; + int drawableIndex; + DrawablePtr pDraw; + ScreenPtr pScreen; + int refCount; + unsigned int key[2]; + x_list *notifiers; /* list of (FUN . DATA) */ + + int x, y; /* relative to physical window */ + + void *data; + unsigned int rowbytes; + PixmapPtr pixmap, oldPixmap; + + unsigned int is_drawing :1; +} DRIDrawablePrivRec, *DRIDrawablePrivPtr; + +#define DRI_SCREEN_PRIV(pScreen) \ + ((DRIScreenPrivIndex < 0) ? \ + NULL : \ + ((DRIScreenPrivPtr)((pScreen)->devPrivates[DRIScreenPrivIndex].ptr))) + +#define DRI_SCREEN_PRIV_FROM_INDEX(screenIndex) ((DRIScreenPrivPtr) \ + (screenInfo.screens[screenIndex]->devPrivates[DRIScreenPrivIndex].ptr)) + + +typedef struct _DRIScreenPrivRec +{ + Bool directRenderingSupport; + int nrWindows; + DRIWrappedFuncsRec wrap; + DrawablePtr DRIDrawables[DRI_MAX_DRAWABLES]; + x_list *drawing; /* list of DRIDrawablePrivPtr */ +} DRIScreenPrivRec, *DRIScreenPrivPtr; + +#endif /* DRI_STRUCT_H */ diff --git a/synfig-osx/launcher/events.applescript b/synfig-osx/launcher/events.applescript new file mode 100644 index 0000000..1da65de --- /dev/null +++ b/synfig-osx/launcher/events.applescript @@ -0,0 +1,14 @@ +on open names + set fileNames to {} + repeat with i from 1 to count of names + set fileNames to fileNames & {quoted form of (POSIX path of (item i of names))} + end repeat + + set fifoLocation to " >> ~/sinfg/fifo" + + repeat with fileName in fileNames + set cmdLine to {"echo O " & fileName & fifoLocation} + do shell script cmdLine + end repeat +end open + diff --git a/synfig-osx/launcher/keysym2ucs.c b/synfig-osx/launcher/keysym2ucs.c new file mode 100644 index 0000000..4186457 --- /dev/null +++ b/synfig-osx/launcher/keysym2ucs.c @@ -0,0 +1,908 @@ +/* $XFree86$ + * This module converts keysym values into the corresponding ISO 10646 + * (UCS, Unicode) values. + * + * The array keysymtab[] contains pairs of X11 keysym values for graphical + * characters and the corresponding Unicode value. The function + * keysym2ucs() maps a keysym onto a Unicode value using a binary search, + * therefore keysymtab[] must remain SORTED by keysym value. + * + * The keysym -> UTF-8 conversion will hopefully one day be provided + * by Xlib via XmbLookupString() and should ideally not have to be + * done in X applications. But we are not there yet. + * + * We allow to represent any UCS character in the range U-00000000 to + * U-00FFFFFF by a keysym value in the range 0x01000000 to 0x01ffffff. + * This admittedly does not cover the entire 31-bit space of UCS, but + * it does cover all of the characters up to U-10FFFF, which can be + * represented by UTF-16, and more, and it is very unlikely that higher + * UCS codes will ever be assigned by ISO. So to get Unicode character + * U+ABCD you can directly use keysym 0x0100abcd. + * + * NOTE: The comments in the table below contain the actual character + * encoded in UTF-8, so for viewing and editing best use an editor in + * UTF-8 mode. + * + * Author: Markus G. Kuhn , University of Cambridge, April 2001 + * + * Special thanks to Richard Verhoeven for preparing + * an initial draft of the mapping table. + * + * This software is in the public domain. Share and enjoy! + * + * AUTOMATICALLY GENERATED FILE, DO NOT EDIT !!! (unicode/convmap.pl) + */ + +#include "keysym2ucs.h" + +#include +#include + +struct codepair { + unsigned short keysym; + unsigned short ucs; +}; + +const static struct codepair keysymtab[] = { + { 0x01a1, 0x0104 }, + { 0x01a2, 0x02d8 }, + { 0x01a3, 0x0141 }, + { 0x01a5, 0x013d }, + { 0x01a6, 0x015a }, + { 0x01a9, 0x0160 }, + { 0x01aa, 0x015e }, + { 0x01ab, 0x0164 }, + { 0x01ac, 0x0179 }, + { 0x01ae, 0x017d }, + { 0x01af, 0x017b }, + { 0x01b1, 0x0105 }, + { 0x01b2, 0x02db }, + { 0x01b3, 0x0142 }, + { 0x01b5, 0x013e }, + { 0x01b6, 0x015b }, + { 0x01b7, 0x02c7 }, + { 0x01b9, 0x0161 }, + { 0x01ba, 0x015f }, + { 0x01bb, 0x0165 }, + { 0x01bc, 0x017a }, + { 0x01bd, 0x02dd }, + { 0x01be, 0x017e }, + { 0x01bf, 0x017c }, + { 0x01c0, 0x0154 }, + { 0x01c3, 0x0102 }, + { 0x01c5, 0x0139 }, + { 0x01c6, 0x0106 }, + { 0x01c8, 0x010c }, + { 0x01ca, 0x0118 }, + { 0x01cc, 0x011a }, + { 0x01cf, 0x010e }, + { 0x01d0, 0x0110 }, + { 0x01d1, 0x0143 }, + { 0x01d2, 0x0147 }, + { 0x01d5, 0x0150 }, + { 0x01d8, 0x0158 }, + { 0x01d9, 0x016e }, + { 0x01db, 0x0170 }, + { 0x01de, 0x0162 }, + { 0x01e0, 0x0155 }, + { 0x01e3, 0x0103 }, + { 0x01e5, 0x013a }, + { 0x01e6, 0x0107 }, + { 0x01e8, 0x010d }, + { 0x01ea, 0x0119 }, + { 0x01ec, 0x011b }, + { 0x01ef, 0x010f }, + { 0x01f0, 0x0111 }, + { 0x01f1, 0x0144 }, + { 0x01f2, 0x0148 }, + { 0x01f5, 0x0151 }, + { 0x01f8, 0x0159 }, + { 0x01f9, 0x016f }, + { 0x01fb, 0x0171 }, + { 0x01fe, 0x0163 }, + { 0x01ff, 0x02d9 }, + { 0x02a1, 0x0126 }, + { 0x02a6, 0x0124 }, + { 0x02a9, 0x0130 }, + { 0x02ab, 0x011e }, + { 0x02ac, 0x0134 }, + { 0x02b1, 0x0127 }, + { 0x02b6, 0x0125 }, + { 0x02b9, 0x0131 }, + { 0x02bb, 0x011f }, + { 0x02bc, 0x0135 }, + { 0x02c5, 0x010a }, + { 0x02c6, 0x0108 }, + { 0x02d5, 0x0120 }, + { 0x02d8, 0x011c }, + { 0x02dd, 0x016c }, + { 0x02de, 0x015c }, + { 0x02e5, 0x010b }, + { 0x02e6, 0x0109 }, + { 0x02f5, 0x0121 }, + { 0x02f8, 0x011d }, + { 0x02fd, 0x016d }, + { 0x02fe, 0x015d }, + { 0x03a2, 0x0138 }, + { 0x03a3, 0x0156 }, + { 0x03a5, 0x0128 }, + { 0x03a6, 0x013b }, + { 0x03aa, 0x0112 }, + { 0x03ab, 0x0122 }, + { 0x03ac, 0x0166 }, + { 0x03b3, 0x0157 }, + { 0x03b5, 0x0129 }, + { 0x03b6, 0x013c }, + { 0x03ba, 0x0113 }, + { 0x03bb, 0x0123 }, + { 0x03bc, 0x0167 }, + { 0x03bd, 0x014a }, + { 0x03bf, 0x014b }, + { 0x03c0, 0x0100 }, + { 0x03c7, 0x012e }, + { 0x03cc, 0x0116 }, + { 0x03cf, 0x012a }, + { 0x03d1, 0x0145 }, + { 0x03d2, 0x014c }, + { 0x03d3, 0x0136 }, + { 0x03d9, 0x0172 }, + { 0x03dd, 0x0168 }, + { 0x03de, 0x016a }, + { 0x03e0, 0x0101 }, + { 0x03e7, 0x012f }, + { 0x03ec, 0x0117 }, + { 0x03ef, 0x012b }, + { 0x03f1, 0x0146 }, + { 0x03f2, 0x014d }, + { 0x03f3, 0x0137 }, + { 0x03f9, 0x0173 }, + { 0x03fd, 0x0169 }, + { 0x03fe, 0x016b }, + { 0x047e, 0x203e }, + { 0x04a1, 0x3002 }, + { 0x04a2, 0x300c }, + { 0x04a3, 0x300d }, + { 0x04a4, 0x3001 }, + { 0x04a5, 0x30fb }, + { 0x04a6, 0x30f2 }, + { 0x04a7, 0x30a1 }, + { 0x04a8, 0x30a3 }, + { 0x04a9, 0x30a5 }, + { 0x04aa, 0x30a7 }, + { 0x04ab, 0x30a9 }, + { 0x04ac, 0x30e3 }, + { 0x04ad, 0x30e5 }, + { 0x04ae, 0x30e7 }, + { 0x04af, 0x30c3 }, + { 0x04b0, 0x30fc }, + { 0x04b1, 0x30a2 }, + { 0x04b2, 0x30a4 }, + { 0x04b3, 0x30a6 }, + { 0x04b4, 0x30a8 }, + { 0x04b5, 0x30aa }, + { 0x04b6, 0x30ab }, + { 0x04b7, 0x30ad }, + { 0x04b8, 0x30af }, + { 0x04b9, 0x30b1 }, + { 0x04ba, 0x30b3 }, + { 0x04bb, 0x30b5 }, + { 0x04bc, 0x30b7 }, + { 0x04bd, 0x30b9 }, + { 0x04be, 0x30bb }, + { 0x04bf, 0x30bd }, + { 0x04c0, 0x30bf }, + { 0x04c1, 0x30c1 }, + { 0x04c2, 0x30c4 }, + { 0x04c3, 0x30c6 }, + { 0x04c4, 0x30c8 }, + { 0x04c5, 0x30ca }, + { 0x04c6, 0x30cb }, + { 0x04c7, 0x30cc }, + { 0x04c8, 0x30cd }, + { 0x04c9, 0x30ce }, + { 0x04ca, 0x30cf }, + { 0x04cb, 0x30d2 }, + { 0x04cc, 0x30d5 }, + { 0x04cd, 0x30d8 }, + { 0x04ce, 0x30db }, + { 0x04cf, 0x30de }, + { 0x04d0, 0x30df }, + { 0x04d1, 0x30e0 }, + { 0x04d2, 0x30e1 }, + { 0x04d3, 0x30e2 }, + { 0x04d4, 0x30e4 }, + { 0x04d5, 0x30e6 }, + { 0x04d6, 0x30e8 }, + { 0x04d7, 0x30e9 }, + { 0x04d8, 0x30ea }, + { 0x04d9, 0x30eb }, + { 0x04da, 0x30ec }, + { 0x04db, 0x30ed }, + { 0x04dc, 0x30ef }, + { 0x04dd, 0x30f3 }, + { 0x04de, 0x309b }, + { 0x04df, 0x309c }, + { 0x05ac, 0x060c }, + { 0x05bb, 0x061b }, + { 0x05bf, 0x061f }, + { 0x05c1, 0x0621 }, + { 0x05c2, 0x0622 }, + { 0x05c3, 0x0623 }, + { 0x05c4, 0x0624 }, + { 0x05c5, 0x0625 }, + { 0x05c6, 0x0626 }, + { 0x05c7, 0x0627 }, + { 0x05c8, 0x0628 }, + { 0x05c9, 0x0629 }, + { 0x05ca, 0x062a }, + { 0x05cb, 0x062b }, + { 0x05cc, 0x062c }, + { 0x05cd, 0x062d }, + { 0x05ce, 0x062e }, + { 0x05cf, 0x062f }, + { 0x05d0, 0x0630 }, + { 0x05d1, 0x0631 }, + { 0x05d2, 0x0632 }, + { 0x05d3, 0x0633 }, + { 0x05d4, 0x0634 }, + { 0x05d5, 0x0635 }, + { 0x05d6, 0x0636 }, + { 0x05d7, 0x0637 }, + { 0x05d8, 0x0638 }, + { 0x05d9, 0x0639 }, + { 0x05da, 0x063a }, + { 0x05e0, 0x0640 }, + { 0x05e1, 0x0641 }, + { 0x05e2, 0x0642 }, + { 0x05e3, 0x0643 }, + { 0x05e4, 0x0644 }, + { 0x05e5, 0x0645 }, + { 0x05e6, 0x0646 }, + { 0x05e7, 0x0647 }, + { 0x05e8, 0x0648 }, + { 0x05e9, 0x0649 }, + { 0x05ea, 0x064a }, + { 0x05eb, 0x064b }, + { 0x05ec, 0x064c }, + { 0x05ed, 0x064d }, + { 0x05ee, 0x064e }, + { 0x05ef, 0x064f }, + { 0x05f0, 0x0650 }, + { 0x05f1, 0x0651 }, + { 0x05f2, 0x0652 }, + { 0x06a1, 0x0452 }, + { 0x06a2, 0x0453 }, + { 0x06a3, 0x0451 }, + { 0x06a4, 0x0454 }, + { 0x06a5, 0x0455 }, + { 0x06a6, 0x0456 }, + { 0x06a7, 0x0457 }, + { 0x06a8, 0x0458 }, + { 0x06a9, 0x0459 }, + { 0x06aa, 0x045a }, + { 0x06ab, 0x045b }, + { 0x06ac, 0x045c }, + { 0x06ae, 0x045e }, + { 0x06af, 0x045f }, + { 0x06b0, 0x2116 }, + { 0x06b1, 0x0402 }, + { 0x06b2, 0x0403 }, + { 0x06b3, 0x0401 }, + { 0x06b4, 0x0404 }, + { 0x06b5, 0x0405 }, + { 0x06b6, 0x0406 }, + { 0x06b7, 0x0407 }, + { 0x06b8, 0x0408 }, + { 0x06b9, 0x0409 }, + { 0x06ba, 0x040a }, + { 0x06bb, 0x040b }, + { 0x06bc, 0x040c }, + { 0x06be, 0x040e }, + { 0x06bf, 0x040f }, + { 0x06c0, 0x044e }, + { 0x06c1, 0x0430 }, + { 0x06c2, 0x0431 }, + { 0x06c3, 0x0446 }, + { 0x06c4, 0x0434 }, + { 0x06c5, 0x0435 }, + { 0x06c6, 0x0444 }, + { 0x06c7, 0x0433 }, + { 0x06c8, 0x0445 }, + { 0x06c9, 0x0438 }, + { 0x06ca, 0x0439 }, + { 0x06cb, 0x043a }, + { 0x06cc, 0x043b }, + { 0x06cd, 0x043c }, + { 0x06ce, 0x043d }, + { 0x06cf, 0x043e }, + { 0x06d0, 0x043f }, + { 0x06d1, 0x044f }, + { 0x06d2, 0x0440 }, + { 0x06d3, 0x0441 }, + { 0x06d4, 0x0442 }, + { 0x06d5, 0x0443 }, + { 0x06d6, 0x0436 }, + { 0x06d7, 0x0432 }, + { 0x06d8, 0x044c }, + { 0x06d9, 0x044b }, + { 0x06da, 0x0437 }, + { 0x06db, 0x0448 }, + { 0x06dc, 0x044d }, + { 0x06dd, 0x0449 }, + { 0x06de, 0x0447 }, + { 0x06df, 0x044a }, + { 0x06e0, 0x042e }, + { 0x06e1, 0x0410 }, + { 0x06e2, 0x0411 }, + { 0x06e3, 0x0426 }, + { 0x06e4, 0x0414 }, + { 0x06e5, 0x0415 }, + { 0x06e6, 0x0424 }, + { 0x06e7, 0x0413 }, + { 0x06e8, 0x0425 }, + { 0x06e9, 0x0418 }, + { 0x06ea, 0x0419 }, + { 0x06eb, 0x041a }, + { 0x06ec, 0x041b }, + { 0x06ed, 0x041c }, + { 0x06ee, 0x041d }, + { 0x06ef, 0x041e }, + { 0x06f0, 0x041f }, + { 0x06f1, 0x042f }, + { 0x06f2, 0x0420 }, + { 0x06f3, 0x0421 }, + { 0x06f4, 0x0422 }, + { 0x06f5, 0x0423 }, + { 0x06f6, 0x0416 }, + { 0x06f7, 0x0412 }, + { 0x06f8, 0x042c }, + { 0x06f9, 0x042b }, + { 0x06fa, 0x0417 }, + { 0x06fb, 0x0428 }, + { 0x06fc, 0x042d }, + { 0x06fd, 0x0429 }, + { 0x06fe, 0x0427 }, + { 0x06ff, 0x042a }, + { 0x07a1, 0x0386 }, + { 0x07a2, 0x0388 }, + { 0x07a3, 0x0389 }, + { 0x07a4, 0x038a }, + { 0x07a5, 0x03aa }, + { 0x07a7, 0x038c }, + { 0x07a8, 0x038e }, + { 0x07a9, 0x03ab }, + { 0x07ab, 0x038f }, + { 0x07ae, 0x0385 }, + { 0x07af, 0x2015 }, + { 0x07b1, 0x03ac }, + { 0x07b2, 0x03ad }, + { 0x07b3, 0x03ae }, + { 0x07b4, 0x03af }, + { 0x07b5, 0x03ca }, + { 0x07b6, 0x0390 }, + { 0x07b7, 0x03cc }, + { 0x07b8, 0x03cd }, + { 0x07b9, 0x03cb }, + { 0x07ba, 0x03b0 }, + { 0x07bb, 0x03ce }, + { 0x07c1, 0x0391 }, + { 0x07c2, 0x0392 }, + { 0x07c3, 0x0393 }, + { 0x07c4, 0x0394 }, + { 0x07c5, 0x0395 }, + { 0x07c6, 0x0396 }, + { 0x07c7, 0x0397 }, + { 0x07c8, 0x0398 }, + { 0x07c9, 0x0399 }, + { 0x07ca, 0x039a }, + { 0x07cb, 0x039b }, + { 0x07cc, 0x039c }, + { 0x07cd, 0x039d }, + { 0x07ce, 0x039e }, + { 0x07cf, 0x039f }, + { 0x07d0, 0x03a0 }, + { 0x07d1, 0x03a1 }, + { 0x07d2, 0x03a3 }, + { 0x07d4, 0x03a4 }, + { 0x07d5, 0x03a5 }, + { 0x07d6, 0x03a6 }, + { 0x07d7, 0x03a7 }, + { 0x07d8, 0x03a8 }, + { 0x07d9, 0x03a9 }, + { 0x07e1, 0x03b1 }, + { 0x07e2, 0x03b2 }, + { 0x07e3, 0x03b3 }, + { 0x07e4, 0x03b4 }, + { 0x07e5, 0x03b5 }, + { 0x07e6, 0x03b6 }, + { 0x07e7, 0x03b7 }, + { 0x07e8, 0x03b8 }, + { 0x07e9, 0x03b9 }, + { 0x07ea, 0x03ba }, + { 0x07eb, 0x03bb }, + { 0x07ec, 0x03bc }, + { 0x07ed, 0x03bd }, + { 0x07ee, 0x03be }, + { 0x07ef, 0x03bf }, + { 0x07f0, 0x03c0 }, + { 0x07f1, 0x03c1 }, + { 0x07f2, 0x03c3 }, + { 0x07f3, 0x03c2 }, + { 0x07f4, 0x03c4 }, + { 0x07f5, 0x03c5 }, + { 0x07f6, 0x03c6 }, + { 0x07f7, 0x03c7 }, + { 0x07f8, 0x03c8 }, + { 0x07f9, 0x03c9 }, + { 0x08a1, 0x23b7 }, + { 0x08a2, 0x250c }, + { 0x08a3, 0x2500 }, + { 0x08a4, 0x2320 }, + { 0x08a5, 0x2321 }, + { 0x08a6, 0x2502 }, + { 0x08a7, 0x23a1 }, + { 0x08a8, 0x23a3 }, + { 0x08a9, 0x23a4 }, + { 0x08aa, 0x23a6 }, + { 0x08ab, 0x239b }, + { 0x08ac, 0x239d }, + { 0x08ad, 0x239e }, + { 0x08ae, 0x23a0 }, + { 0x08af, 0x23a8 }, + { 0x08b0, 0x23ac }, + { 0x08bc, 0x2264 }, + { 0x08bd, 0x2260 }, + { 0x08be, 0x2265 }, + { 0x08bf, 0x222b }, + { 0x08c0, 0x2234 }, + { 0x08c1, 0x221d }, + { 0x08c2, 0x221e }, + { 0x08c5, 0x2207 }, + { 0x08c8, 0x223c }, + { 0x08c9, 0x2243 }, + { 0x08cd, 0x21d4 }, + { 0x08ce, 0x21d2 }, + { 0x08cf, 0x2261 }, + { 0x08d6, 0x221a }, + { 0x08da, 0x2282 }, + { 0x08db, 0x2283 }, + { 0x08dc, 0x2229 }, + { 0x08dd, 0x222a }, + { 0x08de, 0x2227 }, + { 0x08df, 0x2228 }, + { 0x08ef, 0x2202 }, + { 0x08f6, 0x0192 }, + { 0x08fb, 0x2190 }, + { 0x08fc, 0x2191 }, + { 0x08fd, 0x2192 }, + { 0x08fe, 0x2193 }, + { 0x09e0, 0x25c6 }, + { 0x09e1, 0x2592 }, + { 0x09e2, 0x2409 }, + { 0x09e3, 0x240c }, + { 0x09e4, 0x240d }, + { 0x09e5, 0x240a }, + { 0x09e8, 0x2424 }, + { 0x09e9, 0x240b }, + { 0x09ea, 0x2518 }, + { 0x09eb, 0x2510 }, + { 0x09ec, 0x250c }, + { 0x09ed, 0x2514 }, + { 0x09ee, 0x253c }, + { 0x09ef, 0x23ba }, + { 0x09f0, 0x23bb }, + { 0x09f1, 0x2500 }, + { 0x09f2, 0x23bc }, + { 0x09f3, 0x23bd }, + { 0x09f4, 0x251c }, + { 0x09f5, 0x2524 }, + { 0x09f6, 0x2534 }, + { 0x09f7, 0x252c }, + { 0x09f8, 0x2502 }, + { 0x0aa1, 0x2003 }, + { 0x0aa2, 0x2002 }, + { 0x0aa3, 0x2004 }, + { 0x0aa4, 0x2005 }, + { 0x0aa5, 0x2007 }, + { 0x0aa6, 0x2008 }, + { 0x0aa7, 0x2009 }, + { 0x0aa8, 0x200a }, + { 0x0aa9, 0x2014 }, + { 0x0aaa, 0x2013 }, + { 0x0aae, 0x2026 }, + { 0x0aaf, 0x2025 }, + { 0x0ab0, 0x2153 }, + { 0x0ab1, 0x2154 }, + { 0x0ab2, 0x2155 }, + { 0x0ab3, 0x2156 }, + { 0x0ab4, 0x2157 }, + { 0x0ab5, 0x2158 }, + { 0x0ab6, 0x2159 }, + { 0x0ab7, 0x215a }, + { 0x0ab8, 0x2105 }, + { 0x0abb, 0x2012 }, + { 0x0abc, 0x2329 }, + { 0x0abe, 0x232a }, + { 0x0ac3, 0x215b }, + { 0x0ac4, 0x215c }, + { 0x0ac5, 0x215d }, + { 0x0ac6, 0x215e }, + { 0x0ac9, 0x2122 }, + { 0x0aca, 0x2613 }, + { 0x0acc, 0x25c1 }, + { 0x0acd, 0x25b7 }, + { 0x0ace, 0x25cb }, + { 0x0acf, 0x25af }, + { 0x0ad0, 0x2018 }, + { 0x0ad1, 0x2019 }, + { 0x0ad2, 0x201c }, + { 0x0ad3, 0x201d }, + { 0x0ad4, 0x211e }, + { 0x0ad6, 0x2032 }, + { 0x0ad7, 0x2033 }, + { 0x0ad9, 0x271d }, + { 0x0adb, 0x25ac }, + { 0x0adc, 0x25c0 }, + { 0x0add, 0x25b6 }, + { 0x0ade, 0x25cf }, + { 0x0adf, 0x25ae }, + { 0x0ae0, 0x25e6 }, + { 0x0ae1, 0x25ab }, + { 0x0ae2, 0x25ad }, + { 0x0ae3, 0x25b3 }, + { 0x0ae4, 0x25bd }, + { 0x0ae5, 0x2606 }, + { 0x0ae6, 0x2022 }, + { 0x0ae7, 0x25aa }, + { 0x0ae8, 0x25b2 }, + { 0x0ae9, 0x25bc }, + { 0x0aea, 0x261c }, + { 0x0aeb, 0x261e }, + { 0x0aec, 0x2663 }, + { 0x0aed, 0x2666 }, + { 0x0aee, 0x2665 }, + { 0x0af0, 0x2720 }, + { 0x0af1, 0x2020 }, + { 0x0af2, 0x2021 }, + { 0x0af3, 0x2713 }, + { 0x0af4, 0x2717 }, + { 0x0af5, 0x266f }, + { 0x0af6, 0x266d }, + { 0x0af7, 0x2642 }, + { 0x0af8, 0x2640 }, + { 0x0af9, 0x260e }, + { 0x0afa, 0x2315 }, + { 0x0afb, 0x2117 }, + { 0x0afc, 0x2038 }, + { 0x0afd, 0x201a }, + { 0x0afe, 0x201e }, + { 0x0ba3, 0x003c }, + { 0x0ba6, 0x003e }, + { 0x0ba8, 0x2228 }, + { 0x0ba9, 0x2227 }, + { 0x0bc0, 0x00af }, + { 0x0bc2, 0x22a5 }, + { 0x0bc3, 0x2229 }, + { 0x0bc4, 0x230a }, + { 0x0bc6, 0x005f }, + { 0x0bca, 0x2218 }, + { 0x0bcc, 0x2395 }, + { 0x0bce, 0x22a4 }, + { 0x0bcf, 0x25cb }, + { 0x0bd3, 0x2308 }, + { 0x0bd6, 0x222a }, + { 0x0bd8, 0x2283 }, + { 0x0bda, 0x2282 }, + { 0x0bdc, 0x22a2 }, + { 0x0bfc, 0x22a3 }, + { 0x0cdf, 0x2017 }, + { 0x0ce0, 0x05d0 }, + { 0x0ce1, 0x05d1 }, + { 0x0ce2, 0x05d2 }, + { 0x0ce3, 0x05d3 }, + { 0x0ce4, 0x05d4 }, + { 0x0ce5, 0x05d5 }, + { 0x0ce6, 0x05d6 }, + { 0x0ce7, 0x05d7 }, + { 0x0ce8, 0x05d8 }, + { 0x0ce9, 0x05d9 }, + { 0x0cea, 0x05da }, + { 0x0ceb, 0x05db }, + { 0x0cec, 0x05dc }, + { 0x0ced, 0x05dd }, + { 0x0cee, 0x05de }, + { 0x0cef, 0x05df }, + { 0x0cf0, 0x05e0 }, + { 0x0cf1, 0x05e1 }, + { 0x0cf2, 0x05e2 }, + { 0x0cf3, 0x05e3 }, + { 0x0cf4, 0x05e4 }, + { 0x0cf5, 0x05e5 }, + { 0x0cf6, 0x05e6 }, + { 0x0cf7, 0x05e7 }, + { 0x0cf8, 0x05e8 }, + { 0x0cf9, 0x05e9 }, + { 0x0cfa, 0x05ea }, + { 0x0da1, 0x0e01 }, + { 0x0da2, 0x0e02 }, + { 0x0da3, 0x0e03 }, + { 0x0da4, 0x0e04 }, + { 0x0da5, 0x0e05 }, + { 0x0da6, 0x0e06 }, + { 0x0da7, 0x0e07 }, + { 0x0da8, 0x0e08 }, + { 0x0da9, 0x0e09 }, + { 0x0daa, 0x0e0a }, + { 0x0dab, 0x0e0b }, + { 0x0dac, 0x0e0c }, + { 0x0dad, 0x0e0d }, + { 0x0dae, 0x0e0e }, + { 0x0daf, 0x0e0f }, + { 0x0db0, 0x0e10 }, + { 0x0db1, 0x0e11 }, + { 0x0db2, 0x0e12 }, + { 0x0db3, 0x0e13 }, + { 0x0db4, 0x0e14 }, + { 0x0db5, 0x0e15 }, + { 0x0db6, 0x0e16 }, + { 0x0db7, 0x0e17 }, + { 0x0db8, 0x0e18 }, + { 0x0db9, 0x0e19 }, + { 0x0dba, 0x0e1a }, + { 0x0dbb, 0x0e1b }, + { 0x0dbc, 0x0e1c }, + { 0x0dbd, 0x0e1d }, + { 0x0dbe, 0x0e1e }, + { 0x0dbf, 0x0e1f }, + { 0x0dc0, 0x0e20 }, + { 0x0dc1, 0x0e21 }, + { 0x0dc2, 0x0e22 }, + { 0x0dc3, 0x0e23 }, + { 0x0dc4, 0x0e24 }, + { 0x0dc5, 0x0e25 }, + { 0x0dc6, 0x0e26 }, + { 0x0dc7, 0x0e27 }, + { 0x0dc8, 0x0e28 }, + { 0x0dc9, 0x0e29 }, + { 0x0dca, 0x0e2a }, + { 0x0dcb, 0x0e2b }, + { 0x0dcc, 0x0e2c }, + { 0x0dcd, 0x0e2d }, + { 0x0dce, 0x0e2e }, + { 0x0dcf, 0x0e2f }, + { 0x0dd0, 0x0e30 }, + { 0x0dd1, 0x0e31 }, + { 0x0dd2, 0x0e32 }, + { 0x0dd3, 0x0e33 }, + { 0x0dd4, 0x0e34 }, + { 0x0dd5, 0x0e35 }, + { 0x0dd6, 0x0e36 }, + { 0x0dd7, 0x0e37 }, + { 0x0dd8, 0x0e38 }, + { 0x0dd9, 0x0e39 }, + { 0x0dda, 0x0e3a }, + { 0x0ddf, 0x0e3f }, + { 0x0de0, 0x0e40 }, + { 0x0de1, 0x0e41 }, + { 0x0de2, 0x0e42 }, + { 0x0de3, 0x0e43 }, + { 0x0de4, 0x0e44 }, + { 0x0de5, 0x0e45 }, + { 0x0de6, 0x0e46 }, + { 0x0de7, 0x0e47 }, + { 0x0de8, 0x0e48 }, + { 0x0de9, 0x0e49 }, + { 0x0dea, 0x0e4a }, + { 0x0deb, 0x0e4b }, + { 0x0dec, 0x0e4c }, + { 0x0ded, 0x0e4d }, + { 0x0df0, 0x0e50 }, + { 0x0df1, 0x0e51 }, + { 0x0df2, 0x0e52 }, + { 0x0df3, 0x0e53 }, + { 0x0df4, 0x0e54 }, + { 0x0df5, 0x0e55 }, + { 0x0df6, 0x0e56 }, + { 0x0df7, 0x0e57 }, + { 0x0df8, 0x0e58 }, + { 0x0df9, 0x0e59 }, + { 0x0ea1, 0x3131 }, + { 0x0ea2, 0x3132 }, + { 0x0ea3, 0x3133 }, + { 0x0ea4, 0x3134 }, + { 0x0ea5, 0x3135 }, + { 0x0ea6, 0x3136 }, + { 0x0ea7, 0x3137 }, + { 0x0ea8, 0x3138 }, + { 0x0ea9, 0x3139 }, + { 0x0eaa, 0x313a }, + { 0x0eab, 0x313b }, + { 0x0eac, 0x313c }, + { 0x0ead, 0x313d }, + { 0x0eae, 0x313e }, + { 0x0eaf, 0x313f }, + { 0x0eb0, 0x3140 }, + { 0x0eb1, 0x3141 }, + { 0x0eb2, 0x3142 }, + { 0x0eb3, 0x3143 }, + { 0x0eb4, 0x3144 }, + { 0x0eb5, 0x3145 }, + { 0x0eb6, 0x3146 }, + { 0x0eb7, 0x3147 }, + { 0x0eb8, 0x3148 }, + { 0x0eb9, 0x3149 }, + { 0x0eba, 0x314a }, + { 0x0ebb, 0x314b }, + { 0x0ebc, 0x314c }, + { 0x0ebd, 0x314d }, + { 0x0ebe, 0x314e }, + { 0x0ebf, 0x314f }, + { 0x0ec0, 0x3150 }, + { 0x0ec1, 0x3151 }, + { 0x0ec2, 0x3152 }, + { 0x0ec3, 0x3153 }, + { 0x0ec4, 0x3154 }, + { 0x0ec5, 0x3155 }, + { 0x0ec6, 0x3156 }, + { 0x0ec7, 0x3157 }, + { 0x0ec8, 0x3158 }, + { 0x0ec9, 0x3159 }, + { 0x0eca, 0x315a }, + { 0x0ecb, 0x315b }, + { 0x0ecc, 0x315c }, + { 0x0ecd, 0x315d }, + { 0x0ece, 0x315e }, + { 0x0ecf, 0x315f }, + { 0x0ed0, 0x3160 }, + { 0x0ed1, 0x3161 }, + { 0x0ed2, 0x3162 }, + { 0x0ed3, 0x3163 }, + { 0x0ed4, 0x11a8 }, + { 0x0ed5, 0x11a9 }, + { 0x0ed6, 0x11aa }, + { 0x0ed7, 0x11ab }, + { 0x0ed8, 0x11ac }, + { 0x0ed9, 0x11ad }, + { 0x0eda, 0x11ae }, + { 0x0edb, 0x11af }, + { 0x0edc, 0x11b0 }, + { 0x0edd, 0x11b1 }, + { 0x0ede, 0x11b2 }, + { 0x0edf, 0x11b3 }, + { 0x0ee0, 0x11b4 }, + { 0x0ee1, 0x11b5 }, + { 0x0ee2, 0x11b6 }, + { 0x0ee3, 0x11b7 }, + { 0x0ee4, 0x11b8 }, + { 0x0ee5, 0x11b9 }, + { 0x0ee6, 0x11ba }, + { 0x0ee7, 0x11bb }, + { 0x0ee8, 0x11bc }, + { 0x0ee9, 0x11bd }, + { 0x0eea, 0x11be }, + { 0x0eeb, 0x11bf }, + { 0x0eec, 0x11c0 }, + { 0x0eed, 0x11c1 }, + { 0x0eee, 0x11c2 }, + { 0x0eef, 0x316d }, + { 0x0ef0, 0x3171 }, + { 0x0ef1, 0x3178 }, + { 0x0ef2, 0x317f }, + { 0x0ef3, 0x3181 }, + { 0x0ef4, 0x3184 }, + { 0x0ef5, 0x3186 }, + { 0x0ef6, 0x318d }, + { 0x0ef7, 0x318e }, + { 0x0ef8, 0x11eb }, + { 0x0ef9, 0x11f0 }, + { 0x0efa, 0x11f9 }, + { 0x0eff, 0x20a9 }, +#if 0 + /* FIXME: there is no keysym 0x13a4? But 0x20ac is EuroSign in both + keysym and Unicode */ + { 0x13a4, 0x20ac }, +#endif + { 0x13bc, 0x0152 }, + { 0x13bd, 0x0153 }, + { 0x13be, 0x0178 }, + { 0x20ac, 0x20ac }, + + /* Special function keys. */ + + { 0xff08, 0x0008 }, /* XK_BackSpace */ + { 0xff09, 0x0009 }, /* XK_Tab */ + { 0xff0a, 0x000a }, /* XK_Linefeed */ + { 0xff0d, 0x000d }, /* XK_Return */ + { 0xff13, 0x0013 }, /* XK_Pause */ + { 0xff1b, 0x001b }, /* XK_Escape */ + { 0xff50, 0x0001 }, /* XK_Home */ + { 0xff51, 0x001c }, /* XK_Left */ + { 0xff52, 0x001e }, /* XK_Up */ + { 0xff53, 0x001d }, /* XK_Right */ + { 0xff54, 0x001f }, /* XK_Down */ + { 0xff55, 0x000b }, /* XK_Prior */ + { 0xff56, 0x000c }, /* XK_Next */ + { 0xff57, 0x0004 }, /* XK_End */ + { 0xff6a, 0x0005 }, /* XK_Help */ + { 0xffff, 0x007f }, /* XK_Delete */ +}; + +long keysym2ucs(int keysym) +{ + int min = 0; + int max = sizeof(keysymtab) / sizeof(struct codepair) - 1; + int mid; + + /* first check for Latin-1 characters (1:1 mapping) */ + if ((keysym >= 0x0020 && keysym <= 0x007e) || + (keysym >= 0x00a0 && keysym <= 0x00ff)) + return keysym; + + /* also check for directly encoded 24-bit UCS characters */ + if ((keysym & 0xff000000) == 0x01000000) + return keysym & 0x00ffffff; + + /* binary search in table */ + while (max >= min) { + mid = (min + max) / 2; + if (keysymtab[mid].keysym < keysym) + min = mid + 1; + else if (keysymtab[mid].keysym > keysym) + max = mid - 1; + else { + /* found it */ + return keysymtab[mid].ucs; + } + } + + /* no matching Unicode value found */ + return -1; +} + +static int reverse_compare (const void *a, const void *b) +{ + const struct codepair *ca = a, *cb = b; + + return ca->ucs - cb->ucs; +} + +int ucs2keysym(long ucs) +{ + static struct codepair *reverse_keysymtab; + + int min = 0; + int max = sizeof(keysymtab) / sizeof(struct codepair) - 1; + int mid; + + if (reverse_keysymtab == NULL) + { + reverse_keysymtab = malloc (sizeof (keysymtab)); + memcpy (reverse_keysymtab, keysymtab, sizeof (keysymtab)); + + qsort (reverse_keysymtab, + sizeof (keysymtab) / sizeof (struct codepair), + sizeof (struct codepair), + reverse_compare); + } + + /* first check for Latin-1 characters (1:1 mapping) */ + if ((ucs >= 0x0020 && ucs <= 0x007e) || + (ucs >= 0x00a0 && ucs <= 0x00ff)) + return ucs; + + /* binary search in table */ + while (max >= min) { + mid = (min + max) / 2; + if (reverse_keysymtab[mid].ucs < ucs) + min = mid + 1; + else if (reverse_keysymtab[mid].ucs > ucs) + max = mid - 1; + else { + /* found it */ + return reverse_keysymtab[mid].keysym; + } + } + + /* finally, assume a directly encoded 24-bit UCS character */ + return ucs | 0x01000000; +} diff --git a/synfig-osx/launcher/keysym2ucs.h b/synfig-osx/launcher/keysym2ucs.h new file mode 100644 index 0000000..1b04def --- /dev/null +++ b/synfig-osx/launcher/keysym2ucs.h @@ -0,0 +1,36 @@ +/* $XFree86$ + * This module converts keysym values into the corresponding ISO 10646 + * (UCS, Unicode) values. + * + * The array keysymtab[] contains pairs of X11 keysym values for graphical + * characters and the corresponding Unicode value. The function + * keysym2ucs() maps a keysym onto a Unicode value using a binary search, + * therefore keysymtab[] must remain SORTED by keysym value. + * + * The keysym -> UTF-8 conversion will hopefully one day be provided + * by Xlib via XmbLookupString() and should ideally not have to be + * done in X applications. But we are not there yet. + * + * We allow to represent any UCS character in the range U-00000000 to + * U-00FFFFFF by a keysym value in the range 0x01000000 to 0x01ffffff. + * This admittedly does not cover the entire 31-bit space of UCS, but + * it does cover all of the characters up to U-10FFFF, which can be + * represented by UTF-16, and more, and it is very unlikely that higher + * UCS codes will ever be assigned by ISO. So to get Unicode character + * U+ABCD you can directly use keysym 0x0100abcd. + * + * Author: Markus G. Kuhn , University of Cambridge, April 2001 + * + * Special thanks to Richard Verhoeven for preparing + * an initial draft of the mapping table. + * + * This software is in the public domain. Share and enjoy! + */ + +#ifndef KEYSYM2UCS_H +#define KEYSYM2UCS_H 1 + +extern long keysym2ucs(int keysym); +extern int ucs2keysym(long ucs); + +#endif /* KEYSYM2UCS_H */ diff --git a/synfig-osx/launcher/pseudoramiX.c b/synfig-osx/launcher/pseudoramiX.c new file mode 100644 index 0000000..cf1bd48 --- /dev/null +++ b/synfig-osx/launcher/pseudoramiX.c @@ -0,0 +1,426 @@ +/* + * Minimal implementation of PanoramiX/Xinerama + * + * This is used in rootless mode where the underlying window server + * already provides an abstracted view of multiple screens as one + * large screen area. + * + * This code is largely based on panoramiX.c, which contains the + * following copyright notice: + */ +/***************************************************************** +Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. +******************************************************************/ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.c,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ + +#include "pseudoramiX.h" + +#include "extnsionst.h" +#include "dixstruct.h" +#include "window.h" +#include "panoramiXproto.h" +#include "globals.h" + +extern int ProcPanoramiXQueryVersion (ClientPtr client); + +static void PseudoramiXResetProc(ExtensionEntry *extEntry); + +static int ProcPseudoramiXQueryVersion(ClientPtr client); +static int ProcPseudoramiXGetState(ClientPtr client); +static int ProcPseudoramiXGetScreenCount(ClientPtr client); +static int ProcPseudoramiXGetScreenSize(ClientPtr client); +static int ProcPseudoramiXIsActive(ClientPtr client); +static int ProcPseudoramiXQueryScreens(ClientPtr client); +static int ProcPseudoramiXDispatch(ClientPtr client); + +static int SProcPseudoramiXQueryVersion(ClientPtr client); +static int SProcPseudoramiXGetState(ClientPtr client); +static int SProcPseudoramiXGetScreenCount(ClientPtr client); +static int SProcPseudoramiXGetScreenSize(ClientPtr client); +static int SProcPseudoramiXIsActive(ClientPtr client); +static int SProcPseudoramiXQueryScreens(ClientPtr client); +static int SProcPseudoramiXDispatch(ClientPtr client); + + +typedef struct { + int x; + int y; + int w; + int h; +} PseudoramiXScreenRec; + +static PseudoramiXScreenRec *pseudoramiXScreens = NULL; +static int pseudoramiXScreensAllocated = 0; +static int pseudoramiXNumScreens = 0; +static int pseudoramiXGeneration = -1; + + +// Add a PseudoramiX screen. +// The rest of the X server will know nothing about this screen. +// Can be called before or after extension init. +// Screens must be re-added once per generation. +void +PseudoramiXAddScreen(int x, int y, int w, int h) +{ + PseudoramiXScreenRec *s; + + if (noPseudoramiXExtension) return; + + if (pseudoramiXNumScreens == pseudoramiXScreensAllocated) { + pseudoramiXScreensAllocated += pseudoramiXScreensAllocated + 1; + pseudoramiXScreens = xrealloc(pseudoramiXScreens, + pseudoramiXScreensAllocated * + sizeof(PseudoramiXScreenRec)); + } + + s = &pseudoramiXScreens[pseudoramiXNumScreens++]; + s->x = x; + s->y = y; + s->w = w; + s->h = h; +} + + +// Initialize PseudoramiX. +// Copied from PanoramiXExtensionInit +void PseudoramiXExtensionInit(int argc, char *argv[]) +{ + Bool success = FALSE; + ExtensionEntry *extEntry; + + if (noPseudoramiXExtension) return; + +#if 0 + if (pseudoramiXNumScreens == 1) { + // Only one screen - disable Xinerama extension. + noPseudoramiXExtension = TRUE; + return; + } +#endif + + // The server must not run the PanoramiX operations. + noPanoramiXExtension = TRUE; + + if (pseudoramiXGeneration != serverGeneration) { + extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0, + ProcPseudoramiXDispatch, + SProcPseudoramiXDispatch, + PseudoramiXResetProc, + StandardMinorOpcode); + if (!extEntry) { + ErrorF("PseudoramiXExtensionInit(): AddExtension failed\n"); + } else { + pseudoramiXGeneration = serverGeneration; + success = TRUE; + } + } + + if (!success) { + ErrorF("%s Extension (PseudoramiX) failed to initialize\n", + PANORAMIX_PROTOCOL_NAME); + return; + } +} + + +static void PseudoramiXResetProc(ExtensionEntry *extEntry) +{ + pseudoramiXNumScreens = 0; +} + +void PseudoramiXResetScreens (void) +{ + pseudoramiXNumScreens = 0; +} + +// was PanoramiX +static int ProcPseudoramiXQueryVersion(ClientPtr client) +{ + return ProcPanoramiXQueryVersion(client); +} + + +// was PanoramiX +static int ProcPseudoramiXGetState(ClientPtr client) +{ + REQUEST(xPanoramiXGetStateReq); + WindowPtr pWin; + xPanoramiXGetStateReply rep; + register int n; + + REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); + pWin = LookupWindow (stuff->window, client); + if (!pWin) + return BadWindow; + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.state = !noPseudoramiXExtension; + if (client->swapped) { + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swaps (&rep.state, n); + } + WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep); + return client->noClientException; +} + + +// was PanoramiX +static int ProcPseudoramiXGetScreenCount(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenCountReq); + WindowPtr pWin; + xPanoramiXGetScreenCountReply rep; + register int n; + + REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); + pWin = LookupWindow (stuff->window, client); + if (!pWin) + return BadWindow; + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.ScreenCount = pseudoramiXNumScreens; + if (client->swapped) { + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swaps (&rep.ScreenCount, n); + } + WriteToClient (client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep); + return client->noClientException; +} + + +// was PanoramiX +static int ProcPseudoramiXGetScreenSize(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenSizeReq); + WindowPtr pWin; + xPanoramiXGetScreenSizeReply rep; + register int n; + + REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); + pWin = LookupWindow (stuff->window, client); + if (!pWin) + return BadWindow; + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + /* screen dimensions */ + rep.width = pseudoramiXScreens[stuff->screen].w; + // was panoramiXdataPtr[stuff->screen].width; + rep.height = pseudoramiXScreens[stuff->screen].h; + // was panoramiXdataPtr[stuff->screen].height; + if (client->swapped) { + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swaps (&rep.width, n); + swaps (&rep.height, n); + } + WriteToClient (client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep); + return client->noClientException; +} + + +// was Xinerama +static int ProcPseudoramiXIsActive(ClientPtr client) +{ + /* REQUEST(xXineramaIsActiveReq); */ + xXineramaIsActiveReply rep; + + REQUEST_SIZE_MATCH(xXineramaIsActiveReq); + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.state = !noPseudoramiXExtension; + if (client->swapped) { + register int n; + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swapl (&rep.state, n); + } + WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep); + return client->noClientException; +} + + +// was Xinerama +static int ProcPseudoramiXQueryScreens(ClientPtr client) +{ + /* REQUEST(xXineramaQueryScreensReq); */ + xXineramaQueryScreensReply rep; + + REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); + + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.number = noPseudoramiXExtension ? 0 : pseudoramiXNumScreens; + rep.length = rep.number * sz_XineramaScreenInfo >> 2; + if (client->swapped) { + register int n; + swaps (&rep.sequenceNumber, n); + swapl (&rep.length, n); + swapl (&rep.number, n); + } + WriteToClient (client, sizeof (xXineramaQueryScreensReply), (char *) &rep); + + if (!noPseudoramiXExtension) { + xXineramaScreenInfo scratch; + int i; + + for(i = 0; i < pseudoramiXNumScreens; i++) { + scratch.x_org = pseudoramiXScreens[i].x; + scratch.y_org = pseudoramiXScreens[i].y; + scratch.width = pseudoramiXScreens[i].w; + scratch.height = pseudoramiXScreens[i].h; + + if(client->swapped) { + register int n; + swaps (&scratch.x_org, n); + swaps (&scratch.y_org, n); + swaps (&scratch.width, n); + swaps (&scratch.height, n); + } + WriteToClient (client, sz_XineramaScreenInfo, (char *) &scratch); + } + } + + return client->noClientException; +} + + +// was PanoramiX +static int ProcPseudoramiXDispatch (ClientPtr client) +{ REQUEST(xReq); + switch (stuff->data) + { + case X_PanoramiXQueryVersion: + return ProcPseudoramiXQueryVersion(client); + case X_PanoramiXGetState: + return ProcPseudoramiXGetState(client); + case X_PanoramiXGetScreenCount: + return ProcPseudoramiXGetScreenCount(client); + case X_PanoramiXGetScreenSize: + return ProcPseudoramiXGetScreenSize(client); + case X_XineramaIsActive: + return ProcPseudoramiXIsActive(client); + case X_XineramaQueryScreens: + return ProcPseudoramiXQueryScreens(client); + } + return BadRequest; +} + + + +static int +SProcPseudoramiXQueryVersion (ClientPtr client) +{ + REQUEST(xPanoramiXQueryVersionReq); + register int n; + + swaps(&stuff->length,n); + REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq); + return ProcPseudoramiXQueryVersion(client); +} + +static int +SProcPseudoramiXGetState(ClientPtr client) +{ + REQUEST(xPanoramiXGetStateReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); + return ProcPseudoramiXGetState(client); +} + +static int +SProcPseudoramiXGetScreenCount(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenCountReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); + return ProcPseudoramiXGetScreenCount(client); +} + +static int +SProcPseudoramiXGetScreenSize(ClientPtr client) +{ + REQUEST(xPanoramiXGetScreenSizeReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); + return ProcPseudoramiXGetScreenSize(client); +} + + +static int +SProcPseudoramiXIsActive(ClientPtr client) +{ + REQUEST(xXineramaIsActiveReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xXineramaIsActiveReq); + return ProcPseudoramiXIsActive(client); +} + + +static int +SProcPseudoramiXQueryScreens(ClientPtr client) +{ + REQUEST(xXineramaQueryScreensReq); + register int n; + + swaps (&stuff->length, n); + REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); + return ProcPseudoramiXQueryScreens(client); +} + + +static int +SProcPseudoramiXDispatch (ClientPtr client) +{ REQUEST(xReq); + switch (stuff->data) + { + case X_PanoramiXQueryVersion: + return SProcPseudoramiXQueryVersion(client); + case X_PanoramiXGetState: + return SProcPseudoramiXGetState(client); + case X_PanoramiXGetScreenCount: + return SProcPseudoramiXGetScreenCount(client); + case X_PanoramiXGetScreenSize: + return SProcPseudoramiXGetScreenSize(client); + case X_XineramaIsActive: + return SProcPseudoramiXIsActive(client); + case X_XineramaQueryScreens: + return SProcPseudoramiXQueryScreens(client); + } + return BadRequest; +} diff --git a/synfig-osx/launcher/pseudoramiX.h b/synfig-osx/launcher/pseudoramiX.h new file mode 100644 index 0000000..3427eb1 --- /dev/null +++ b/synfig-osx/launcher/pseudoramiX.h @@ -0,0 +1,10 @@ +/* + * Minimal implementation of PanoramiX/Xinerama + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.h,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ + +extern int noPseudoramiXExtension; + +void PseudoramiXAddScreen(int x, int y, int w, int h); +void PseudoramiXExtensionInit(int argc, char *argv[]); +void PseudoramiXResetScreens (void); diff --git a/synfig-osx/launcher/quartz-audio.c b/synfig-osx/launcher/quartz-audio.c new file mode 100644 index 0000000..4ea7746 --- /dev/null +++ b/synfig-osx/launcher/quartz-audio.c @@ -0,0 +1,342 @@ +// +// QuartzAudio.m +// +// X Window bell support using CoreAudio or AppKit. +// Greg Parker gparker@cs.stanford.edu 19 Feb 2001 +// +// Info about sine wave sound playback: +// CoreAudio code derived from macosx-dev posting by Tim Wood +// http://www.omnigroup.com/mailman/archive/macosx-dev/2000-May/002004.html +// Smoothing transitions between sounds +// http://www.wam.umd.edu/~mphoenix/dss/dss.html +// +/* + * Copyright (c) 2001 Greg Parker. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in this Software without prior written authorization. + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzAudio.c,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ + +#include "quartz.h" +#include "quartz-audio.h" + +#include +#include + +#include "inputstr.h" +#include "extensions/XI.h" + +void NSBeep(); + +typedef struct QuartzAudioRec { + double frequency; + double amplitude; + + UInt32 curFrame; + UInt32 remainingFrames; + UInt32 totalFrames; + UInt32 bytesPerFrame; + double sampleRate; + UInt32 fadeLength; + + UInt32 bufferByteCount; + Boolean playing; + pthread_mutex_t lock; + + // used to fade out interrupted sound and avoid 'pop' + double prevFrequency; + double prevAmplitude; + UInt32 prevFrame; +} QuartzAudioRec; + +static AudioDeviceID quartzAudioDevice = kAudioDeviceUnknown; +static QuartzAudioRec data; + + +/* + * QuartzAudioEnvelope + * Fade sound in and out to avoid pop. + * Sounds with shorter duration will never reach full amplitude. Deal. + */ +static double QuartzAudioEnvelope( + UInt32 curFrame, + UInt32 totalFrames, + UInt32 fadeLength ) +{ + double fadeFrames = min(fadeLength, totalFrames / 2); + if (fadeFrames < 1) return 0; + + if (curFrame < fadeFrames) { + return curFrame / fadeFrames; + } else if (curFrame > totalFrames - fadeFrames) { + return (totalFrames-curFrame) / fadeFrames; + } else { + return 1.0; + } +} + + +/* + * QuartzFillBuffer + * Fill this buffer with data and update the data position. + * FIXME: this is ugly + */ +static void QuartzFillBuffer( + AudioBuffer *audiobuffer, + QuartzAudioRec *data ) +{ + float *buffer, *b; + unsigned int frame, frameCount; + unsigned int bufferFrameCount; + float multiplier, v; + int i; + + buffer = (float *)audiobuffer->mData; + bufferFrameCount = audiobuffer->mDataByteSize / data->bytesPerFrame; + + frameCount = min(bufferFrameCount, data->remainingFrames); + + // Fade out previous sine wave, if any. + b = buffer; + if (data->prevFrame) { + multiplier = 2*M_PI*(data->prevFrequency/data->sampleRate); + for (frame = 0; frame < data->fadeLength; frame++) { + v = data->prevAmplitude * + QuartzAudioEnvelope(frame+data->fadeLength, + 2*data->fadeLength, + data->fadeLength) * + sin(multiplier * (data->prevFrame+frame)); + for (i = 0; i < audiobuffer->mNumberChannels; i++) { + *b++ = v; + } + } + // no more prev fade + data->prevFrame = 0; + + // adjust for space eaten by prev fade + buffer += audiobuffer->mNumberChannels*frame; + bufferFrameCount -= frame; + frameCount = min(bufferFrameCount, data->remainingFrames); + } + + // Write a sine wave with the specified frequency and amplitude + multiplier = 2*M_PI*(data->frequency/data->sampleRate); + for (frame = 0; frame < frameCount; frame++) { + v = data->amplitude * + QuartzAudioEnvelope(data->curFrame+frame, data->totalFrames, + data->fadeLength) * + sin(multiplier * (data->curFrame+frame)); + for (i = 0; i < audiobuffer->mNumberChannels; i++) { + *b++ = v; + } + } + + // Zero out the rest of the buffer, if any + memset(b, 0, sizeof(float) * audiobuffer->mNumberChannels * + (bufferFrameCount-frame)); + + data->curFrame += frameCount; + data->remainingFrames -= frameCount; + if (data->remainingFrames == 0) { + data->playing = FALSE; + data->curFrame = 0; + } +} + + +/* + * QuartzAudioIOProc + * Callback function for audio playback. + * FIXME: use inOutputTime to correct for skipping + */ +static OSStatus +QuartzAudioIOProc( + AudioDeviceID inDevice, + const AudioTimeStamp *inNow, + const AudioBufferList *inInputData, + const AudioTimeStamp *inInputTime, + AudioBufferList *outOutputData, + const AudioTimeStamp *inOutputTime, + void *inClientData ) +{ + QuartzAudioRec *data = (QuartzAudioRec *)inClientData; + int i; + Boolean wasPlaying; + + pthread_mutex_lock(&data->lock); + wasPlaying = data->playing; + for (i = 0; i < outOutputData->mNumberBuffers; i++) { + if (data->playing) { + QuartzFillBuffer(outOutputData->mBuffers+i, data); + } + else { + memset(outOutputData->mBuffers[i].mData, 0, + outOutputData->mBuffers[i].mDataByteSize); + } + } + if (wasPlaying && !data->playing) { + OSStatus err; + err = AudioDeviceStop(inDevice, QuartzAudioIOProc); + } + pthread_mutex_unlock(&data->lock); + return 0; +} + + +/* + * QuartzCoreAudioBell + * Play a tone using the CoreAudio API + */ +static void QuartzCoreAudioBell( + int volume, // volume is % of max + int pitch, // pitch is Hz + int duration ) // duration is milliseconds +{ + if (quartzAudioDevice == kAudioDeviceUnknown) return; + + pthread_mutex_lock(&data.lock); + + // fade previous sound, if any + data.prevFrequency = data.frequency; + data.prevAmplitude = data.amplitude; + data.prevFrame = data.curFrame; + + // set new sound + data.frequency = pitch; + data.amplitude = volume / 100.0; + data.curFrame = 0; + data.totalFrames = (int)(data.sampleRate * duration / 1000.0); + data.remainingFrames = data.totalFrames; + + if (! data.playing) { + OSStatus status; + status = AudioDeviceStart(quartzAudioDevice, QuartzAudioIOProc); + if (status) { + ErrorF("QuartzAudioBell: AudioDeviceStart returned %d\n", status); + } else { + data.playing = TRUE; + } + } + pthread_mutex_unlock(&data.lock); +} + + +/* + * QuartzBell + * Ring the bell + */ +void QuartzBell( + int volume, // volume in percent of max + DeviceIntPtr pDevice, + pointer ctrl, + int class ) +{ + int pitch; // pitch in Hz + int duration; // duration in milliseconds + + if (class == BellFeedbackClass) { + pitch = ((BellCtrl*)ctrl)->pitch; + duration = ((BellCtrl*)ctrl)->duration; + } else if (class == KbdFeedbackClass) { + pitch = ((KeybdCtrl*)ctrl)->bell_pitch; + duration = ((KeybdCtrl*)ctrl)->bell_duration; + } else { + ErrorF("QuartzBell: bad bell class %d\n", class); + return; + } + + if (quartzUseSysBeep) { + if (volume) + NSBeep(); + } else { + QuartzCoreAudioBell(volume, pitch, duration); + } +} + + +/* + * QuartzAudioInit + * Prepare to play the bell with the CoreAudio API + */ +void QuartzAudioInit(void) +{ + UInt32 propertySize; + OSStatus status; + AudioDeviceID outputDevice; + AudioStreamBasicDescription outputStreamDescription; + double sampleRate; + + // Get the default output device + propertySize = sizeof(outputDevice); + status = AudioHardwareGetProperty( + kAudioHardwarePropertyDefaultOutputDevice, + &propertySize, &outputDevice); + if (status) { + ErrorF("QuartzAudioInit: AudioHardwareGetProperty returned %d\n", + status); + return; + } + if (outputDevice == kAudioDeviceUnknown) { + ErrorF("QuartzAudioInit: No audio output devices available.\n"); + return; + } + + // Get the basic device description + propertySize = sizeof(outputStreamDescription); + status = AudioDeviceGetProperty(outputDevice, 0, FALSE, + kAudioDevicePropertyStreamFormat, + &propertySize, &outputStreamDescription); + if (status) { + ErrorF("QuartzAudioInit: GetProperty(stream format) returned %d\n", + status); + return; + } + sampleRate = outputStreamDescription.mSampleRate; + + // Fill in the playback data + data.frequency = 0; + data.amplitude = 0; + data.curFrame = 0; + data.remainingFrames = 0; + data.bytesPerFrame = outputStreamDescription.mBytesPerFrame; + data.sampleRate = sampleRate; + // data.bufferByteCount = bufferByteCount; + data.playing = FALSE; + data.prevAmplitude = 0; + data.prevFrame = 0; + data.prevFrequency = 0; + data.fadeLength = data.sampleRate / 200; + pthread_mutex_init(&data.lock, NULL); // fixme error check + + // fixme assert fadeLength + +typedef struct { + int CursorVisible; + QueryBestSizeProcPtr QueryBestSize; + miPointerSpriteFuncPtr spriteFuncs; +} QuartzCursorScreenRec, *QuartzCursorScreenPtr; + +static int darwinCursorScreenIndex = -1; +static unsigned long darwinCursorGeneration = 0; + +static Bool movedCursor = FALSE; + +#define CURSOR_PRIV(pScreen) \ + ((QuartzCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr) + +static Bool +load_cursor (CursorPtr src, int screen) +{ + uint32_t *data; + uint32_t rowbytes; + int width, height; + int hot_x, hot_y; + + uint32_t fg_color, bg_color; + uint8_t *srow, *sptr; + uint8_t *mrow, *mptr; + uint32_t *drow, *dptr; + unsigned xcount, ycount; + + xp_error err; + + width = src->bits->width; + height = src->bits->height; + hot_x = src->bits->xhot; + hot_y = src->bits->yhot; + +#ifdef ARGB_CURSOR + if (src->bits->argb != NULL) + { + rowbytes = src->bits->width * sizeof (CARD32); + data = (uint32_t *) src->bits->argb; + } + else +#endif + { + fg_color = 0xFF00 | (src->foreRed >> 8); + fg_color <<= 16; + fg_color |= src->foreGreen & 0xFF00; + fg_color |= src->foreBlue >> 8; + + bg_color = 0xFF00 | (src->backRed >> 8); + bg_color <<= 16; + bg_color |= src->backGreen & 0xFF00; + bg_color |= src->backBlue >> 8; + + fg_color = htonl (fg_color); + bg_color = htonl (bg_color); + + /* round up to 8 pixel boundary so we can convert whole bytes */ + rowbytes = ((src->bits->width * 4) + 31) & ~31; + data = alloca (rowbytes * src->bits->height); + + if (!src->bits->emptyMask) + { + ycount = src->bits->height; + srow = src->bits->source; mrow = src->bits->mask; + drow = data; + + while (ycount-- > 0) + { + xcount = (src->bits->width + 7) / 8; + sptr = srow; mptr = mrow; + dptr = drow; + + while (xcount-- > 0) + { + uint8_t s, m; + int i; + + s = *sptr++; m = *mptr++; + for (i = 0; i < 8; i++) + { +#if BITMAP_BIT_ORDER == MSBFirst + if (m & 128) + *dptr++ = (s & 128) ? fg_color : bg_color; + else + *dptr++ = 0; + s <<= 1; m <<= 1; +#else + if (m & 1) + *dptr++ = (s & 1) ? fg_color : bg_color; + else + *dptr++ = 0; + s >>= 1; m >>= 1; +#endif + } + } + + srow += BitmapBytePad (src->bits->width); + mrow += BitmapBytePad (src->bits->width); + drow = (uint32_t *) ((char *) drow + rowbytes); + } + } + else + { + memset (data, 0, src->bits->height * rowbytes); + } + } + + err = xp_set_cursor (width, height, hot_x, hot_y, data, rowbytes); + return err == Success; +} + +/* Convert the X cursor representation to native format if possible. */ +static Bool +QuartzRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) +{ + if(pCursor == NULL || pCursor->bits == NULL) + return FALSE; + + /* FIXME: cache ARGB8888 representation? */ + + return TRUE; +} + +/* Free the storage space associated with a realized cursor. */ +static Bool +QuartzUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) +{ + return TRUE; +} + +/* Set the cursor sprite and position. */ +static void +QuartzSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + if (!quartzServerVisible) + return; + + if (pCursor == NULL) + { + if (ScreenPriv->CursorVisible) + { + xp_hide_cursor (); + ScreenPriv->CursorVisible = FALSE; + } + } + else + { + load_cursor (pCursor, pScreen->myNum); + + if (!ScreenPriv->CursorVisible) + { + xp_show_cursor (); + ScreenPriv->CursorVisible = TRUE; + } + } +} + +/* Move the cursor. This is a noop for us. */ +static void +QuartzMoveCursor (ScreenPtr pScreen, int x, int y) +{ +} + +static miPointerSpriteFuncRec quartzSpriteFuncsRec = { + QuartzRealizeCursor, + QuartzUnrealizeCursor, + QuartzSetCursor, + QuartzMoveCursor +}; + +static Bool +QuartzCursorOffScreen (ScreenPtr *pScreen, int *x, int *y) +{ + return FALSE; +} + +static void +QuartzCrossScreen (ScreenPtr pScreen, Bool entering) +{ + return; +} + +/* Change the cursor position without generating an event or motion history. + The input coordinates (x,y) are in pScreen-local X11 coordinates. */ +static void +QuartzWarpCursor (ScreenPtr pScreen, int x, int y) +{ + if (!movedCursor) + { + /* Don't move the cursor the first time. This is the + jump-to-center initialization, and it's annoying. */ + + movedCursor = TRUE; + return; + } + + if (quartzServerVisible) + { + int sx, sy; + + sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + CGWarpMouseCursorPosition (CGPointMake (sx + x, sy + y)); + } + + miPointerWarpCursor (pScreen, x, y); +} + +void +QuartzIgnoreNextWarpCursor (void) +{ + movedCursor = FALSE; +} + +static miPointerScreenFuncRec quartzScreenFuncsRec = { + QuartzCursorOffScreen, + QuartzCrossScreen, + QuartzWarpCursor, + DarwinEnqueuePointerEvent, +}; + +/* Handle queries for best cursor size */ +static void +QuartzCursorQueryBestSize (int class, unsigned short *width, + unsigned short *height, ScreenPtr pScreen) +{ + QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); + + if (class == CursorShape) + { + /* FIXME: query window server? */ + *width = 32; + *height = 32; + } + else + { + (*ScreenPriv->QueryBestSize) (class, width, height, pScreen); + } +} + +/* Initialize cursor support */ +Bool +QuartzInitCursor (ScreenPtr pScreen) +{ + QuartzCursorScreenPtr ScreenPriv; + miPointerScreenPtr PointPriv; + + /* initialize software cursor handling (always needed as backup) */ + if (!miDCInitialize (pScreen, &quartzScreenFuncsRec)) + return FALSE; + + /* allocate private storage for this screen's QuickDraw cursor info */ + if (darwinCursorGeneration != serverGeneration) + { + if ((darwinCursorScreenIndex = AllocateScreenPrivateIndex ()) < 0) + return FALSE; + + darwinCursorGeneration = serverGeneration; + } + + ScreenPriv = xcalloc (1, sizeof(QuartzCursorScreenRec)); + if (ScreenPriv == NULL) + return FALSE; + + CURSOR_PRIV (pScreen) = ScreenPriv; + + /* override some screen procedures */ + ScreenPriv->QueryBestSize = pScreen->QueryBestSize; + pScreen->QueryBestSize = QuartzCursorQueryBestSize; + + PointPriv = (miPointerScreenPtr) pScreen->devPrivates[miPointerScreenIndex].ptr; + + ScreenPriv->spriteFuncs = PointPriv->spriteFuncs; + PointPriv->spriteFuncs = &quartzSpriteFuncsRec; + + ScreenPriv->CursorVisible = TRUE; + return TRUE; +} + +/* X server is hiding. Restore the Aqua cursor. */ +void +QuartzSuspendXCursor (ScreenPtr pScreen) +{ +} + +/* X server is showing. Restore the X cursor. */ +void +QuartzResumeXCursor (ScreenPtr pScreen) +{ + WindowPtr pWin; + CursorPtr pCursor; + int x, y; + + pWin = GetSpriteWindow (); + if (pWin->drawable.pScreen != pScreen) + return; + + pCursor = GetSpriteCursor (); + if (pCursor == NULL) + return; + + GetSpritePosition (&x, &y); + QuartzSetCursor (pScreen, pCursor, x, y); +} diff --git a/synfig-osx/launcher/quartz-cursor.h b/synfig-osx/launcher/quartz-cursor.h new file mode 100644 index 0000000..6078c39 --- /dev/null +++ b/synfig-osx/launcher/quartz-cursor.h @@ -0,0 +1,45 @@ +/* + * quartzCursor.h + * + * External interface for Quartz hardware cursor + */ +/* + * Copyright (c) 2001 Torrey T. Lyons and Greg Parker. + * Copyright (c) 2002 Apple Computer, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in this Software without prior written authorization. + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCursor.h,v 1.1 2002/03/28 02:21:19 torrey Exp $ */ + +#ifndef QUARTZCURSOR_H +#define QUARTZCURSOR_H + +#include "screenint.h" + +Bool QuartzInitCursor(ScreenPtr pScreen); +void QuartzSuspendXCursor(ScreenPtr pScreen); +void QuartzResumeXCursor(ScreenPtr pScreen); +void QuartzIgnoreNextWarpCursor (void); + +#endif diff --git a/synfig-osx/launcher/quartz-server.c b/synfig-osx/launcher/quartz-server.c new file mode 100644 index 0000000..212dce8 --- /dev/null +++ b/synfig-osx/launcher/quartz-server.c @@ -0,0 +1,190 @@ +// +// quartzServer.c +// +// This class handles the interaction between CG and the X server thread +// +/* + * Copyright (c) 2001 Andreas Monitzer. All Rights Reserved. + * Copyright (c) 2002 Torrey T. Lyons. All Rights Reserved. + * Copyright (c) 2002 Apple Software, Inc. All Rights Reserved. + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the + * sale, use or other dealings in this Software without prior written + * authorization. + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.3 2002/07/15 18:57:44 torrey Exp $ */ + +#include "quartz.h" +#include "Xplugin.h" +#include "X11Controller.h" +#define _APPLEDRI_SERVER_ +#include "appledri.h" +#include "dri-surface.h" +#include "opaque.h" +#include "globals.h" +#include +#include +#include + +char **envpGlobal; // argcGlobal and argvGlobal + // are from dix/globals.c + +void +QuartzMessageMainThread (int type, int argc, ...) +{ + xEvent xe; + INT32 *argv; + int i, max_args; + va_list args; + + memset (&xe, 0, sizeof (xe)); + xe.u.u.type = ClientMessage; + xe.u.clientMessage.u.l.type = type; + + argv = &xe.u.clientMessage.u.l.longs0; + max_args = 4; + + if (argc > 0 && argc <= max_args) + { + va_start (args, argc); + for (i = 0; i < argc; i++) + argv[i] = (int) va_arg (args, int); + va_end (args); + } + + DarwinEnqueueEvent (&xe); +} + +static void +event_handler (unsigned int type, const void *arg, + unsigned int arg_size, void *data) +{ + switch (type) + { + case XP_EVENT_DISPLAY_CHANGED: + QuartzMessageMainThread (kXquartzDisplayChanged, 0); + break; + + case XP_EVENT_WINDOW_STATE_CHANGED: + if (arg_size >= sizeof (xp_window_state_event)) + { + const xp_window_state_event *ws_arg = arg; + QuartzMessageMainThread (kXquartzWindowState, 2, + ws_arg->id, ws_arg->state); + } + break; + + case XP_EVENT_WINDOW_MOVED: + if (arg_size == sizeof (xp_window_id)) + { + xp_window_id id = * (xp_window_id *) arg; + + QuartzMessageMainThread (kXquartzWindowMoved, 1, id); + } + break; + + case XP_EVENT_SURFACE_DESTROYED: + case XP_EVENT_SURFACE_CHANGED: + if (arg_size == sizeof (xp_surface_id)) + { + int kind; + + if (type == XP_EVENT_SURFACE_DESTROYED) + kind = AppleDRISurfaceNotifyDestroyed; + else + kind = AppleDRISurfaceNotifyChanged; + + DRISurfaceNotify (*(xp_surface_id *) arg, kind); + } + break; + } +} + +static void +server_thread (void *arg) +{ + extern int main (int argc, char **argv, char **envp); + + /* Xinerama defaults to enabled */ + noPanoramiXExtension = FALSE; + + if (xp_init (XP_BACKGROUND_EVENTS | quartzXpluginOptions) != Success) + { + fprintf (stderr, "can't initialize window system\n"); + exit (1); + } + + xp_select_events (XP_EVENT_DISPLAY_CHANGED + | XP_EVENT_WINDOW_STATE_CHANGED + | XP_EVENT_WINDOW_MOVED + | XP_EVENT_SURFACE_CHANGED + | XP_EVENT_SURFACE_DESTROYED, + event_handler, NULL); + + exit (main (argcGlobal, argvGlobal, envpGlobal)); +} + +/* + * DarwinHandleGUI + * This function is called first from main(). We use it to connect to + * the cg window server and spawn the the thread that will listen for + * cg events + */ +void DarwinHandleGUI( + int argc, + char *argv[], + char *envp[] ) +{ + static Bool here_before; + + extern void _InitHLTB (void); + + if (here_before) + return; + + here_before = TRUE; + + DarwinInputPreInit (); + + // Store command line arguments to pass back to main() + argcGlobal = argc; + argvGlobal = argv; + envpGlobal = envp; + + /* Initially I ran the X server on the main thread, and received + events on the second thread. But now we may be using Carbon, + that needs to run on the main thread. (Otherwise, when it's + prebound, it will initialize itself on the wrong thread) + + grr.. but doing that means that if the X thread gets scheduled + before the main thread when we're _not_ prebound, things fail, + so initialize by hand. */ + + _InitHLTB (); + + X11ControllerMain (argc, argv, server_thread, NULL); + + /* not reached */ + exit (1); +} diff --git a/synfig-osx/launcher/quartz.c b/synfig-osx/launcher/quartz.c new file mode 100644 index 0000000..0e9ae7c --- /dev/null +++ b/synfig-osx/launcher/quartz.c @@ -0,0 +1,683 @@ +/************************************************************** + * + * Quartz-specific support for the Darwin X Server + * + **************************************************************/ +/* + * Copyright (c) 2001 Greg Parker and Torrey T. Lyons. + * Copyright (c) 2002 Apple Computer, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in this Software without prior written authorization. + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartz.c,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ + +#include "quartz.h" +#include "darwin.h" +#include "quartz-audio.h" +#include "quartz-cursor.h" +#include "rootless.h" +#include "rootless-window.h" +#include "pseudoramiX.h" +#include "globals.h" +#include "dri.h" +#define _APPLEWM_SERVER_ +#include "applewmstr.h" +#include "X11Application.h" + +#include "scrnintstr.h" +#include "colormapst.h" + +#include +#include +#include +#include +#include + +#include +#include + +/* Shared global variables for Quartz modes */ +int quartzEventWriteFD = -1; +int quartzUseSysBeep = 1; +int quartzServerVisible = FALSE; +int quartzDesiredDepth = -1; +int quartzHasRoot = FALSE, quartzEnableRootless = TRUE; +int quartzFullscreenDisableHotkeys = TRUE; +int noPseudoramiXExtension = FALSE; +int quartzXpluginOptions = 0; + +extern char *display; + +static CGDirectDisplayID +display_at_index (int index) +{ + CGError err; + CGDisplayCount cnt; + CGDirectDisplayID dpy[index+1]; + + err = CGGetActiveDisplayList (index + 1, dpy, &cnt); + if (err == kCGErrorSuccess && (int) cnt == index + 1) + return dpy[index]; + else + return kCGNullDirectDisplay; +} + +static CGRect +display_screen_bounds (CGDirectDisplayID id, Bool remove_menubar) +{ + CGRect frame; + + frame = CGDisplayBounds (id); + + if (remove_menubar && !quartzHasRoot + && frame.origin.x == 0 && frame.origin.y == 0) + { + /* Remove Aqua menubar from display bounds. */ + + frame.origin.y += 22; + frame.size.height -= 22; + } + + return frame; +} + +static void +addPseudoramiXScreens (int *x, int *y, int *width, int *height) +{ + CGDisplayCount i, total = 16; /* FIXME: hardcoded maximum */ + CGRect unionRect = CGRectNull, frame; + CGDirectDisplayID screens[total]; + + CGGetActiveDisplayList (total, screens, &total); + + /* Get the union of all screens */ + for (i = 0; i < total; i++) + { + CGDirectDisplayID dpy = screens[i]; + + /* we can't remove the menubar from the screen - doing so + would constrain the pointer to the screen, not allowing it + to reach the menubar.. */ + + frame = display_screen_bounds (dpy, FALSE); + unionRect = CGRectUnion (unionRect, frame); + } + + /* Use unionRect as the screen size for the X server. */ + *x = unionRect.origin.x; + *y = unionRect.origin.y; + *width = unionRect.size.width; + *height = unionRect.size.height; + + /* Tell PseudoramiX about the real screens. */ + for (i = 0; i < total; i++) + { + CGDirectDisplayID dpy = screens[i]; + + frame = display_screen_bounds (dpy, TRUE); + +#ifdef DEBUG + ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i, + (int)frame.size.width, (int)frame.size.height, + (int)frame.origin.x, (int)frame.origin.y); +#endif + + frame.origin.x -= unionRect.origin.x; + frame.origin.y -= unionRect.origin.y; + +#ifdef DEBUG + ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n", + i, (int)frame.origin.x, (int)frame.origin.y); +#endif + + PseudoramiXAddScreen(frame.origin.x, frame.origin.y, + frame.size.width, frame.size.height); + } +} + +/* Do mode dependent initialization of each screen for Quartz. */ +Bool +QuartzAddScreen (int index, ScreenPtr pScreen) +{ + DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); + + /* If no specific depth chosen, look for the depth of the main display. + Else if 16bpp specified, use that. Else use 32bpp. */ + + dfb->componentCount = 3; + dfb->bitsPerComponent = 8; + dfb->bitsPerPixel = 32; + + if (quartzDesiredDepth == -1) + { + dfb->bitsPerComponent = CGDisplayBitsPerSample (kCGDirectMainDisplay); + dfb->bitsPerPixel = CGDisplayBitsPerPixel (kCGDirectMainDisplay); + } + else if (quartzDesiredDepth == 15) + { + dfb->bitsPerComponent = 5; + dfb->bitsPerPixel = 16; + } + else if (quartzDesiredDepth == 8) + { + dfb->bitsPerComponent = 8; + dfb->bitsPerPixel = 8; + dfb->componentCount = 1; + } + + if (noPseudoramiXExtension) + { + CGDirectDisplayID dpy; + CGRect frame; + + dpy = display_at_index (index); + + frame = display_screen_bounds (dpy, TRUE); + + dfb->x = frame.origin.x; + dfb->y = frame.origin.y; + dfb->width = frame.size.width; + dfb->height = frame.size.height; + } + else + { + addPseudoramiXScreens (&dfb->x, &dfb->y, &dfb->width, &dfb->height); + } + + dfb->colorBitsPerPixel = dfb->bitsPerComponent * dfb->componentCount; + + /* Passing zero width (pitch) makes miCreateScreenResources set the + screen pixmap to the framebuffer pointer, i.e. null. We'll take + it from there.. */ + dfb->pitch = 0; + dfb->framebuffer = NULL; + + DRIScreenInit (pScreen); + + return TRUE; +} + +/* Finalize mode specific setup of each screen. */ +Bool +QuartzSetupScreen (int index, ScreenPtr pScreen) +{ + // do full screen or rootless specific setup + if (! RootlessSetupScreen(index, pScreen)) + return FALSE; + + // setup cursor support + if (! QuartzInitCursor(pScreen)) + return FALSE; + + DRIFinishScreenInit (pScreen); + + return TRUE; +} + + +/* Quartz display initialization. */ +void +QuartzInitOutput (int argc, char **argv) +{ + static int orig_noPanoramiXExtension; + int total; + + if (serverGeneration == 1) { + orig_noPanoramiXExtension = noPanoramiXExtension; + QuartzAudioInit(); + } + + /* +xinerama option sets noPanoramiXExtension variable */ + noPseudoramiXExtension = orig_noPanoramiXExtension; + + total = 16; /* FIXME: hardcoded maximum */ + if (total > 0) + { + CGDirectDisplayID screens[total]; + CGGetActiveDisplayList (total, screens, &total); + } + + if (noPseudoramiXExtension) + darwinScreensFound = total; + else + darwinScreensFound = 1; // only PseudoramiX knows about the rest + + if (!quartzEnableRootless) + RootlessHideAllWindows (); +} + +/* This function from randr.c */ +extern char *ConnectionInfo; +static int padlength[4] = {0, 3, 2, 1}; +static void +RREditConnectionInfo (ScreenPtr pScreen) +{ + xConnSetup *connSetup; + char *vendor; + xPixmapFormat *formats; + xWindowRoot *root; + xDepth *depth; + xVisualType *visual; + int screen = 0; + int d; + + connSetup = (xConnSetup *) ConnectionInfo; + vendor = (char *) connSetup + sizeof (xConnSetup); + formats = (xPixmapFormat *) ((char *) vendor + + connSetup->nbytesVendor + + padlength[connSetup->nbytesVendor & 3]); + root = (xWindowRoot *) ((char *) formats + + sizeof (xPixmapFormat) * screenInfo.numPixmapFormats); + while (screen != pScreen->myNum) + { + depth = (xDepth *) ((char *) root + + sizeof (xWindowRoot)); + for (d = 0; d < root->nDepths; d++) + { + visual = (xVisualType *) ((char *) depth + + sizeof (xDepth)); + depth = (xDepth *) ((char *) visual + + depth->nVisuals * sizeof (xVisualType)); + } + root = (xWindowRoot *) ((char *) depth); + screen++; + } + root->pixWidth = pScreen->width; + root->pixHeight = pScreen->height; + root->mmWidth = pScreen->mmWidth; + root->mmHeight = pScreen->mmHeight; +} + +static void +QuartzUpdateScreens (void) +{ + ScreenPtr pScreen; + WindowPtr pRoot; + int x, y, width, height, sx, sy; + xEvent e; + + if (noPseudoramiXExtension || screenInfo.numScreens != 1) + { + /* FIXME: if not using Xinerama, we have multiple screens, and + to do this properly may need to add or remove screens. Which + isn't possible. So don't do anything. Another reason why + we default to running with Xinerama. */ + + return; + } + + pScreen = screenInfo.screens[0]; + + PseudoramiXResetScreens (); + addPseudoramiXScreens (&x, &y, &width, &height); + + dixScreenOrigins[pScreen->myNum].x = x; + dixScreenOrigins[pScreen->myNum].y = y; + pScreen->mmWidth = pScreen->mmWidth * ((double) width / pScreen->width); + pScreen->mmHeight = pScreen->mmHeight * ((double) height / pScreen->height); + pScreen->width = width; + pScreen->height = height; + + /* FIXME: should probably do something with RandR here. */ + + DarwinAdjustScreenOrigins (&screenInfo); + RootlessRepositionWindows (screenInfo.screens[0]); + RootlessUpdateScreenPixmap (screenInfo.screens[0]); + + sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + /* Adjust the root window. */ + + pRoot = WindowTable[pScreen->myNum]; + pScreen->ResizeWindow (pRoot, x - sx, y - sy, width, height, NULL); + pScreen->PaintWindowBackground (pRoot, &pRoot->borderClip, PW_BACKGROUND); + QuartzIgnoreNextWarpCursor (); + DefineInitialRootWindow (pRoot); + + /* Send an event for the root reconfigure */ + + e.u.u.type = ConfigureNotify; + e.u.configureNotify.window = pRoot->drawable.id; + e.u.configureNotify.aboveSibling = None; + e.u.configureNotify.x = x - sx; + e.u.configureNotify.y = y - sy; + e.u.configureNotify.width = width; + e.u.configureNotify.height = height; + e.u.configureNotify.borderWidth = wBorderWidth (pRoot); + e.u.configureNotify.override = pRoot->overrideRedirect; + DeliverEvents (pRoot, &e, 1, NullWindow); + + /* FIXME: what does this do? */ + RREditConnectionInfo (pScreen); +} + +static void +do_exec (void (*callback) (void *data), void *data) +{ + /* Do the fork-twice trick to avoid needing to reap zombies */ + + int child1, child2 = 0; + int status; + + /* we should really try to report errors here.. */ + + child1 = fork (); + + switch (child1) + { + case -1: /* error */ + break; + + case 0: /* child1 */ + child2 = fork (); + + switch (child2) + { + int max_files, i; + char buf[1024], *tem; + + case -1: /* error */ + _exit (1); + + case 0: /* child2 */ + /* close all open files except for standard streams */ + max_files = sysconf (_SC_OPEN_MAX); + for (i = 3; i < max_files; i++) + close (i); + + /* ensure stdin is on /dev/null */ + close (0); + open ("/dev/null", O_RDONLY); + + /* cd $HOME */ + tem = getenv ("HOME"); + if (tem != NULL) + chdir (tem); + + /* Setup environment */ + snprintf (buf, sizeof (buf), ":%s", display); + setenv ("DISPLAY", buf, TRUE); + tem = getenv ("PATH"); + if (tem != NULL && tem[0] != NULL) + snprintf (buf, sizeof (buf), "%s:/usr/X11R6/bin", tem); + else + snprintf (buf, sizeof (buf), "/bin:/usr/bin:/usr/X11R6/bin"); + setenv ("PATH", buf, TRUE); + + (*callback) (data); + + _exit (2); + + default: /* parent (child1) */ + _exit (0); + } + break; + + default: /* parent */ + waitpid (child1, &status, 0); + } +} + +static void +run_client_callback (void *data) +{ + char **argv = data; + execvp (argv[0], argv); +} + +/* Note that this function is called from both X server and appkit threads */ +void +QuartzRunClient (const char *command) +{ + const char *shell; + const char *argv[5]; + + shell = getenv ("SHELL"); + if (shell == NULL) + shell = "/bin/bash"; + + /* At least [ba]sh, [t]csh and zsh all work with this syntax. We + need to use an interactive shell to force it to load the user's + environment. Otherwise things like fink don't work at all well.. */ + + argv[0] = shell; + argv[1] = "-i"; + argv[2] = "-c"; + argv[3] = command; + argv[4] = NULL; + + do_exec (run_client_callback, argv); +} + +static void +QuartzSetFullscreen (Bool state) +{ + if (quartzHasRoot == state) + return; + + quartzHasRoot = state; + + xp_disable_update (); + + if (!quartzHasRoot && !quartzEnableRootless) + RootlessHideAllWindows (); + + RootlessUpdateRooted (quartzHasRoot); + + if (quartzHasRoot && !quartzEnableRootless) + RootlessShowAllWindows (); + + /* Only update screen info when something is visible. Avoids the wm + moving the windows out from under the menubar when it shouldn't */ + + if (quartzHasRoot || quartzEnableRootless) + QuartzUpdateScreens (); + + /* Somehow the menubar manages to interfere with our event stream + in fullscreen mode, even though it's not visible. */ + + X11ApplicationShowHideMenubar (!quartzHasRoot); + + xp_reenable_update (); + +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 + if (quartzFullscreenDisableHotkeys) + xp_disable_hot_keys (quartzHasRoot); +#endif +} + +static void +QuartzSetRootless (Bool state) +{ + if (quartzEnableRootless == state) + return; + + quartzEnableRootless = state; + + if (!quartzEnableRootless && !quartzHasRoot) + { + xp_disable_update (); + RootlessHideAllWindows (); + xp_reenable_update (); + } + else if (quartzEnableRootless && !quartzHasRoot) + { + xp_disable_update (); + RootlessShowAllWindows (); + QuartzUpdateScreens (); + xp_reenable_update (); + } +} + +/* Show the X server on screen. Does nothing if already shown. Restore the + X clip regions the X server cursor state. */ +static void +QuartzShow (void) +{ + int i; + + if (quartzServerVisible) + return; + + quartzServerVisible = TRUE; + + for (i = 0; i < screenInfo.numScreens; i++) + { + if (screenInfo.screens[i]) + QuartzResumeXCursor(screenInfo.screens[i]); + } + + /* FIXME: not sure about this, it may need to have a preference like + in XDarwin..? */ + + if (!quartzEnableRootless) + QuartzSetFullscreen (TRUE); +} + +/* Remove the X server display from the screen. Does nothing if already + hidden. Set X clip regions to prevent drawing, and restore the Aqua + cursor. */ +static void +QuartzHide (void) +{ + int i; + + if (!quartzServerVisible) + return; + + for (i = 0; i < screenInfo.numScreens; i++) + { + if (screenInfo.screens[i]) + QuartzSuspendXCursor(screenInfo.screens[i]); + } + + QuartzSetFullscreen (FALSE); + + quartzServerVisible = FALSE; +} + +/* Cleanup before X server shutdown. Release the screen and restore the + Aqua cursor. */ +void +QuartzGiveUp (void) +{ + int i; + + for (i = 0; i < screenInfo.numScreens; i++) { + if (screenInfo.screens[i]) { + QuartzSuspendXCursor(screenInfo.screens[i]); + } + } +} + +int +QuartzProcessArgument( int argc, char *argv[], int i ) +{ + /* This arg is passed when launched from the Aqua GUI. */ + if (strncmp (argv[i], "-psn_", 5) == 0) + { + return 1; + } + + if (strcmp (argv[i], "-depth") == 0) + { + int arg; + + if (i == argc - 1) + FatalError ("-depth requires an argument\n"); + + arg = atoi (argv[i + 1]); + if (arg == 8 || arg == 15 || arg == 24) + quartzDesiredDepth = arg; + else + FatalError ("Only 8, 15 and 24 bit color depths are supported.\n"); + + return 2; + } + + return 0; +} + +void +QuartzClientMessage (const xEvent *xe) +{ + switch (xe->u.clientMessage.u.l.type) + { + case kXquartzControllerNotify: + AppleWMSendEvent (AppleWMControllerNotify, + AppleWMControllerNotifyMask, + xe->u.clientMessage.u.l.longs0, + xe->u.clientMessage.u.l.longs1); + break; + + case kXquartzPasteboardNotify: + AppleWMSendEvent (AppleWMPasteboardNotify, + AppleWMPasteboardNotifyMask, + xe->u.clientMessage.u.l.longs0, + xe->u.clientMessage.u.l.longs1); + break; + + case kXquartzActivate: + QuartzShow (); + AppleWMSendEvent (AppleWMActivationNotify, + AppleWMActivationNotifyMask, + AppleWMIsActive, 0); + break; + + case kXquartzDeactivate: + AppleWMSendEvent (AppleWMActivationNotify, + AppleWMActivationNotifyMask, + AppleWMIsInactive, 0); + QuartzHide (); + break; + + case kXquartzDisplayChanged: + QuartzUpdateScreens (); + break; + + case kXquartzWindowState: + RootlessNativeWindowStateChanged (xe->u.clientMessage.u.l.longs0, + xe->u.clientMessage.u.l.longs1); + break; + + case kXquartzWindowMoved: + RootlessNativeWindowMoved (xe->u.clientMessage.u.l.longs0); + break; + + case kXquartzToggleFullscreen: + if (quartzEnableRootless) + QuartzSetFullscreen (!quartzHasRoot); + else if (quartzHasRoot) + QuartzHide (); + else + QuartzShow (); + break; + + case kXquartzSetRootless: + QuartzSetRootless (xe->u.clientMessage.u.l.longs0); + if (!quartzEnableRootless && !quartzHasRoot) + QuartzHide (); + } +} diff --git a/synfig-osx/launcher/quartz.h b/synfig-osx/launcher/quartz.h new file mode 100644 index 0000000..66ad0cb --- /dev/null +++ b/synfig-osx/launcher/quartz.h @@ -0,0 +1,73 @@ +/* + * quartz.h + * + * External interface of the Quartz modes seen by the generic, mode + * independent parts of the Darwin X server. + */ +/* + * Copyright (c) 2001 Greg Parker and Torrey T. Lyons. + * Copyright (c) 2002 Apple Computer, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in this Software without prior written authorization. + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartz.h,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ + +#ifndef _QUARTZ_H +#define _QUARTZ_H + +#include "darwin.h" + +/* Local client message types */ +enum { + kXquartzControllerNotify = kXquartzFirstEvent, + kXquartzPasteboardNotify, + kXquartzActivate, + kXquartzDeactivate, + kXquartzDisplayChanged, + kXquartzWindowState, + kXquartzWindowMoved, + kXquartzToggleFullscreen, + kXquartzSetRootless, +}; + +extern int quartzUseSysBeep; +extern int quartzServerVisible; +extern int quartzDesiredDepth; +extern int quartzHasRoot, quartzEnableRootless; +extern int quartzFullscreenDisableHotkeys; +extern int quartzXpluginOptions; + +int QuartzProcessArgument(int argc, char *argv[], int i); +void QuartzInitOutput(int argc, char **argv); +void QuartzGiveUp(void); + +void QuartzMessageMainThread (int type, int argc, ...); +void QuartzClientMessage (const struct _xEvent *xe); + +void QuartzRunClient (const char *command); + +Bool QuartzAddScreen(int index, ScreenPtr pScreen); +Bool QuartzSetupScreen(int index, ScreenPtr pScreen); + +#endif diff --git a/synfig-osx/launcher/rootless-common.c b/synfig-osx/launcher/rootless-common.c new file mode 100644 index 0000000..9294e54 --- /dev/null +++ b/synfig-osx/launcher/rootless-common.c @@ -0,0 +1,497 @@ +/* + * Common rootless definitions and code + * + * Greg Parker gparker@cs.stanford.edu + */ + +/* Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. */ + +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessCommon.c,v 1.6 2002/07/15 19:58:31 torrey Exp $ */ + +#include "rootless-common.h" +#include "dri-surface.h" +#include "fb.h" +#include "colormapst.h" + +RegionRec rootlessHugeRoot = {{-32767, -32767, 32767, 32767}, NULL}; + +/* Following two macros from miregion.c */ + +/* true iff two Boxes overlap */ +#define EXTENTCHECK(r1,r2) \ + (!( ((r1)->x2 <= (r2)->x1) || \ + ((r1)->x1 >= (r2)->x2) || \ + ((r1)->y2 <= (r2)->y1) || \ + ((r1)->y1 >= (r2)->y2) ) ) + +/* true iff Box r1 contains Box r2 */ +#define SUBSUMES(r1,r2) \ + ( ((r1)->x1 <= (r2)->x1) && \ + ((r1)->x2 >= (r2)->x2) && \ + ((r1)->y1 <= (r2)->y1) && \ + ((r1)->y2 >= (r2)->y2) ) + +int rootlessNoDRIDrawing = 0; + +/* Returns the top-level parent of pWindow. The root is the top-level + parent of itself, even though the root is not otherwise considered + to be a top-level window. */ +WindowPtr +TopLevelParent (WindowPtr pWindow) +{ + WindowPtr top; + + if (IsRoot (pWindow)) + return pWindow; + + top = pWindow; + while (top != NULL && !IsTopLevel (top)) + top = top->parent; + + return top; +} + +/* Returns TRUE if this window is visible inside a frame (e.g. it is + visible and has a top-level parent) */ +Bool +IsFramedWindow (WindowPtr pWin) +{ + WindowPtr top; + + if (!pWin->realized) + return FALSE; + + top = TopLevelParent (pWin); + + return top != NULL && WINREC (top) != NULL; +} + +void +TranslatePixmapBase (PixmapPtr pPix, int dx, int dy) +{ + unsigned diff; + + pPix->devPrivate.ptr = ((char *) pPix->devPrivate.ptr + + ((dx + pPix->drawable.x) + * pPix->drawable.bitsPerPixel / 8 + + dy * pPix->devKind)); + + if (pPix->drawable.bitsPerPixel != FB_UNIT) + { + diff = ((unsigned) pPix->devPrivate.ptr) & (FB_UNIT / CHAR_BIT - 1); + pPix->devPrivate.ptr = ((char *) pPix->devPrivate.ptr) - diff; + + if (pPix->drawable.bitsPerPixel == 16) + pPix->drawable.x = diff / (16 / CHAR_BIT); + else if (pPix->drawable.bitsPerPixel == 8) + pPix->drawable.x = diff / (8 / CHAR_BIT); + else + pPix->drawable.x = diff / (pPix->drawable.bitsPerPixel / CHAR_BIT); + } +} + +void +RootlessDisableUpdate (WindowPtr pWin) +{ + RootlessWindowRec *winRec = WINREC (pWin); + + if (winRec != NULL + && !winRec->is_offscreen + && !winRec->is_reorder_pending + && !winRec->is_update_disabled) + { + xp_disable_update (); + winRec->is_update_disabled = TRUE; + } +} + +void +RootlessReenableUpdate (WindowPtr pWin) +{ + RootlessWindowRec *winRec = WINREC (pWin); + + if (winRec != NULL && winRec->is_update_disabled) + { + xp_reenable_update (); + winRec->is_update_disabled = FALSE; + } +} + +Bool +RootlessResolveColormap (ScreenPtr pScreen, int first_color, + int n_colors, uint32_t *colors) +{ + int last, i; + ColormapPtr map; + + map = RootlessGetColormap (pScreen); + if (map == NULL || map->class != PseudoColor) + return FALSE; + + last = MIN (map->pVisual->ColormapEntries, first_color + n_colors); + for (i = MAX (0, first_color); i < last; i++) + { + Entry *ent = map->red + i; + uint16_t red, green, blue; + + if (!ent->refcnt) + continue; + if (ent->fShared) + { + red = ent->co.shco.red->color; + green = ent->co.shco.green->color; + blue = ent->co.shco.blue->color; + } + else + { + red = ent->co.local.red; + green = ent->co.local.green; + blue = ent->co.local.blue; + } + + colors[i - first_color] = (0xFF000000UL + | ((uint32_t) red & 0xff00) << 8 + | (green & 0xff00) + | (blue >> 8)); + } + + return TRUE; +} + +/* Prepare a window for direct access to its backing buffer. Each + top-level parent has a Pixmap representing its backing store, which + all of its children inherit. */ +void +RootlessStartDrawing (WindowPtr pWindow) +{ + ScreenPtr pScreen = pWindow->drawable.pScreen; + WindowPtr top = TopLevelParent (pWindow); + RootlessWindowRec *winRec; + + if (!rootlessNoDRIDrawing && DRIStartDrawing (&pWindow->drawable)) + { + return; + } + + /* At the top of the stack now. */ + + if (top == NULL || WINREC (top) == NULL) + return; + + winRec = WINREC(top); + + /* Make sure the window's top-level parent is prepared for drawing. */ + + if (!winRec->is_drawing) + { + void *data[2]; + unsigned int rowbytes[2]; + xp_error err; + + int bw = wBorderWidth (top); + + err = xp_lock_window (winRec->wid, NULL, NULL, data, rowbytes, NULL); + if (err != Success) + abort (); /* FIXME: */ + + winRec->data = data[0]; + winRec->rowbytes = rowbytes[0]; + + winRec->pixmap = + GetScratchPixmapHeader(pScreen, winRec->width, winRec->height, + winRec->win->drawable.depth, + winRec->win->drawable.bitsPerPixel, + winRec->rowbytes, winRec->data); + TranslatePixmapBase (winRec->pixmap, + - (top->drawable.x - bw), + - (top->drawable.y - bw)); + + winRec->is_drawing = TRUE; + } + + winRec->oldPixmap = pScreen->GetWindowPixmap (pWindow); + pScreen->SetWindowPixmap (pWindow, winRec->pixmap); +} + +void +RootlessFinishedDrawing (WindowPtr pWindow) +{ + /* Called after each drawing primitive, lets us unlock surfaces + as often as possible (which is a Good Thing to do.) */ + + DRIStopDrawing (&pWindow->drawable, FALSE); + + /* Also, see if we're due a flush. */ + + RootlessMayRedisplay (pWindow->drawable.pScreen); +} + +void +RootlessStopDrawing (WindowPtr pWindow, Bool flush) +{ + WindowPtr top = TopLevelParent (pWindow); + RootlessWindowRec *winRec; + + if (top == NULL || WINREC (top) == NULL) + return; + + winRec = WINREC(top); + + DRIStopDrawing (&pWindow->drawable, flush); + + if (winRec->is_drawing) + { + ScreenPtr pScreen = pWindow->drawable.pScreen; + + xp_unlock_window (winRec->wid, flush); + + FreeScratchPixmapHeader (winRec->pixmap); + pScreen->SetWindowPixmap (pWindow, winRec->oldPixmap); + winRec->pixmap = NULL; + + winRec->is_drawing = FALSE; + } + else if (flush) + { + xp_flush_window (winRec->wid); + } + + /* FIXME: instead of just checking if we tried to flush (which + happens everytime we block for I/O), I used to check if + anything was actually marked in the window. But that often + caused problems with some window managers, and it didn't really + make any noticeable difference, so... */ + + if (flush && winRec->is_reorder_pending) + { + winRec->is_reorder_pending = FALSE; + RootlessReorderWindow (pWindow); + } + + if (flush && winRec->is_update_disabled) + { + RootlessReenableUpdate (pWindow); + } +} + +/* pRegion is GLOBAL */ +void +RootlessDamageRegion (WindowPtr pWindow, RegionPtr pRegion) +{ + RootlessWindowRec *winRec; + RegionRec clipped; + WindowPtr pTop; + BoxPtr b1, b2; + + RL_DEBUG_MSG("Damaged win 0x%x ", pWindow); + + pTop = TopLevelParent (pWindow); + if (pTop == NULL) + return; + + winRec = WINREC (pTop); + if (winRec == NULL) + return; + + if (DRIDamageRegion (&pWindow->drawable, pRegion)) + { + return; + } + + /* We need to intersect the drawn region with the clip of the window + to avoid marking places we didn't actually draw (which can cause + problems when the window has an extra client-side backing store) + + But this is a costly operation and since we'll normally just be + drawing inside the clip, go to some lengths to avoid the general + case intersection. */ + + b1 = REGION_EXTENTS (pScreen, &pWindow->borderClip); + b2 = REGION_EXTENTS (pScreen, pRegion); + + if (EXTENTCHECK (b1, b2)) + { + /* Regions may overlap. */ + + if (REGION_NUM_RECTS (pRegion) == 1) + { + int in; + + /* Damaged region only has a single rect, so we can + just compare that against the region */ + + in = RECT_IN_REGION (pScreen, &pWindow->borderClip, + REGION_RECTS (pRegion)); + if (in == rgnIN) + { + /* clip totally contains pRegion */ + + xp_mark_window (winRec->wid, REGION_NUM_RECTS (pRegion), + REGION_RECTS (pRegion), + -winRec->x, -winRec->y); + + RootlessQueueRedisplay (pTop->drawable.pScreen); + goto out; + } + else if (in == rgnOUT) + { + /* clip doesn't contain pRegion */ + + goto out; + } + } + + /* clip overlaps pRegion, need to intersect */ + + REGION_INIT (pScreen, &clipped, NullBox, 0); + REGION_INTERSECT (pScreen, &clipped, &pWindow->borderClip, pRegion); + + xp_mark_window (winRec->wid, REGION_NUM_RECTS (&clipped), + REGION_RECTS (&clipped), -winRec->x, -winRec->y); + + REGION_UNINIT (pScreen, &clipped); + + RootlessQueueRedisplay (pTop->drawable.pScreen); + } + +out: +#ifdef ROOTLESSDEBUG + { + BoxRec *box = REGION_RECTS(pRegion), *end; + int numBox = REGION_NUM_RECTS(pRegion); + + for (end = box+numBox; box < end; box++) { + RL_DEBUG_MSG("Damage rect: %i, %i, %i, %i\n", + box->x1, box->x2, box->y1, box->y2); + } + } +#endif + return; +} + +/* pBox is GLOBAL */ +void +RootlessDamageBox (WindowPtr pWindow, BoxPtr pBox) +{ + RegionRec region; + + REGION_INIT (pWindow->drawable.pScreen, ®ion, pBox, 1); + + RootlessDamageRegion (pWindow, ®ion); + + REGION_UNINIT (pWindow->drawable.pScreen, ®ion); /* no-op */ +} + + +/* (x, y, w, h) is in window-local coordinates. */ +void +RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h) +{ + BoxRec box; + RegionRec region; + + x += pWindow->drawable.x; + y += pWindow->drawable.y; + + box.x1 = x; + box.x2 = x + w; + box.y1 = y; + box.y2 = y + h; + + REGION_INIT (pWindow->drawable.pScreen, ®ion, &box, 1); + + RootlessDamageRegion (pWindow, ®ion); + + REGION_UNINIT (pWindow->drawable.pScreen, ®ion); /* no-op */ +} + +/* Stop drawing and redisplay the damaged region of a window. */ +void +RootlessRedisplay (WindowPtr pWindow) +{ + DRISynchronizeDrawable (&pWindow->drawable, TRUE); + RootlessStopDrawing(pWindow, TRUE); +} + +/* Walk every window on a screen and redisplay the damaged regions. */ +void +RootlessRedisplayScreen (ScreenPtr pScreen) +{ + RootlessScreenRec *screenRec = SCREENREC (pScreen); + WindowPtr root = WindowTable[pScreen->myNum]; + WindowPtr win; + + if (root != NULL) + { + RootlessRedisplay(root); + + for (win = root->firstChild; win; win = win->nextSib) + { + if (WINREC (win) != NULL) + RootlessRedisplay (win); + } + } + + screenRec->last_redisplay = GetTimeInMillis (); +} + +void +RootlessRepositionWindows (ScreenPtr pScreen) +{ + WindowPtr root = WindowTable[pScreen->myNum]; + WindowPtr win; + + if (root != NULL) + { + RootlessRepositionWindow (root); + + for (win = root->firstChild; win; win = win->nextSib) + { + if (WINREC (win) != NULL) + RootlessRepositionWindow (win); + } + } +} + +void +RootlessFlushScreenColormaps (ScreenPtr pScreen) +{ + WindowPtr root = WindowTable[pScreen->myNum]; + WindowPtr win; + + if (root != NULL) + { + RootlessRepositionWindow (root); + + for (win = root->firstChild; win; win = win->nextSib) + { + if (WINREC (win) != NULL) + RootlessFlushWindowColormap (win); + } + } +} diff --git a/synfig-osx/launcher/rootless-common.h b/synfig-osx/launcher/rootless-common.h new file mode 100644 index 0000000..d2aa7b3 --- /dev/null +++ b/synfig-osx/launcher/rootless-common.h @@ -0,0 +1,305 @@ +/* + * Common internal rootless definitions and code + * + * Greg Parker gparker@cs.stanford.edu + */ + +/* Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. */ + +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessCommon.h,v 1.6 2002/07/24 05:58:33 torrey Exp $ */ + +#ifndef _ROOTLESSCOMMON_H +#define _ROOTLESSCOMMON_H + +#include "rootless.h" + +#include "pixmapstr.h" +#include "windowstr.h" + +#ifdef RENDER +#include "picturestr.h" +#endif + +/* Debug output, or not. */ +#ifdef ROOTLESSDEBUG +#define RL_DEBUG_MSG ErrorF +#else +#define RL_DEBUG_MSG(a, ...) +#endif + +#undef MIN +#define MIN(x,y) ((x) < (y) ? (x) : (y)) +#undef MAX +#define MAX(x,y) ((x) > (y) ? (x) : (y)) + +/* Global variables */ +extern int rootlessGCPrivateIndex; +extern int rootlessScreenPrivateIndex; +extern int rootlessWindowPrivateIndex; +extern int rootlessNoDRIDrawing; + +/* RootlessGCRec: private per-gc data */ +typedef struct { + GCFuncs *originalFuncs; + GCOps *originalOps; +} RootlessGCRec; + +/* RootlessWindowRec: private per-window data */ +typedef struct RootlessWindowRec { + int x, y; + unsigned int width, height; + unsigned int borderWidth; + int level; + + xp_window_id wid; + WindowPtr win; + + /* Valid when locked (i.e. is_drawing is set) */ + void *data; + unsigned int rowbytes; + + PixmapPtr pixmap; + PixmapPtr oldPixmap; + + unsigned long unrealize_time; /* in seconds */ + + unsigned int is_drawing :1; + unsigned int is_update_disabled :1; + unsigned int is_reorder_pending :1; + unsigned int is_offscreen :1; + unsigned int is_obscured :1; +} RootlessWindowRec; + +/* RootlessScreenRec: per-screen private data */ +typedef struct { + ScreenPtr pScreen; + + CreateScreenResourcesProcPtr CreateScreenResources; + CloseScreenProcPtr CloseScreen; + + CreateWindowProcPtr CreateWindow; + DestroyWindowProcPtr DestroyWindow; + RealizeWindowProcPtr RealizeWindow; + UnrealizeWindowProcPtr UnrealizeWindow; + ReparentWindowProcPtr ReparentWindow; + MoveWindowProcPtr MoveWindow; + ResizeWindowProcPtr ResizeWindow; + RestackWindowProcPtr RestackWindow; + ChangeBorderWidthProcPtr ChangeBorderWidth; + PositionWindowProcPtr PositionWindow; + ChangeWindowAttributesProcPtr ChangeWindowAttributes; + + CreateGCProcPtr CreateGC; + PaintWindowBackgroundProcPtr PaintWindowBackground; + PaintWindowBorderProcPtr PaintWindowBorder; + CopyWindowProcPtr CopyWindow; + GetImageProcPtr GetImage; + SourceValidateProcPtr SourceValidate; + + MarkOverlappedWindowsProcPtr MarkOverlappedWindows; + ValidateTreeProcPtr ValidateTree; + +#ifdef SHAPE + SetShapeProcPtr SetShape; +#endif + +#ifdef RENDER + CompositeProcPtr Composite; + GlyphsProcPtr Glyphs; +#endif + + InstallColormapProcPtr InstallColormap; + UninstallColormapProcPtr UninstallColormap; + StoreColorsProcPtr StoreColors; + + void *pixmap_data; + unsigned int pixmap_data_size; + + ColormapPtr colormap; + + void *redisplay_timer; + CARD32 last_redisplay; + + unsigned int redisplay_timer_set :1; + unsigned int redisplay_queued :1; + unsigned int redisplay_expired :1; + unsigned int colormap_changed :1; +} RootlessScreenRec; + + +/* "Definition of the Porting Layer for the X11 Sample Server" says + unwrap and rewrap of screen functions is unnecessary, but + screen->CreateGC changes after a call to cfbCreateGC. */ + +#define SCREEN_UNWRAP(screen, fn) \ + screen->fn = SCREENREC(screen)->fn; + +#define SCREEN_WRAP(screen, fn) \ + SCREENREC(screen)->fn = screen->fn; \ + screen->fn = Rootless##fn + +/* Accessors for screen and window privates */ + +#define SCREENREC(pScreen) \ + ((RootlessScreenRec*)(pScreen)->devPrivates[rootlessScreenPrivateIndex].ptr) + +#define WINREC(pWin) \ + ((RootlessWindowRec *)(pWin)->devPrivates[rootlessWindowPrivateIndex].ptr) + +/* BoxRec manipulators (Copied from shadowfb) */ + +#define TRIM_BOX(box, pGC) { \ + BoxPtr extents = &pGC->pCompositeClip->extents;\ + if(box.x1 < extents->x1) box.x1 = extents->x1; \ + if(box.x2 > extents->x2) box.x2 = extents->x2; \ + if(box.y1 < extents->y1) box.y1 = extents->y1; \ + if(box.y2 > extents->y2) box.y2 = extents->y2; \ +} + +#define TRANSLATE_BOX(box, pDraw) { \ + box.x1 += pDraw->x; \ + box.x2 += pDraw->x; \ + box.y1 += pDraw->y; \ + box.y2 += pDraw->y; \ +} + +#define TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC) { \ + TRANSLATE_BOX(box, pDraw); \ + TRIM_BOX(box, pGC); \ +} + +#define BOX_NOT_EMPTY(box) \ + (((box.x2 - box.x1) > 0) && ((box.y2 - box.y1) > 0)) + +/* We don't want to clip windows to the edge of the screen. HUGE_ROOT + temporarily makes the root window really big. This is needed as a + wrapper around any function that calls SetWinSize or SetBorderSize + which clip a window against its parents, including the root. */ + +extern RegionRec rootlessHugeRoot; + +#define HUGE_ROOT(pWin) \ + do { \ + WindowPtr w = pWin; \ + while (w->parent != NULL) \ + w = w->parent; \ + saveRoot = w->winSize; \ + w->winSize = rootlessHugeRoot; \ + } while (0) + +#define NORMAL_ROOT(pWin) \ + do { \ + WindowPtr w = pWin; \ + while (w->parent != NULL) \ + w = w->parent; \ + w->winSize = saveRoot; \ + } while (0) + +/* Returns TRUE if this window is a top-level window (i.e. child of the root) + The root is not a top-level window. */ +#define IsTopLevel(pWin) \ + ((pWin) != NULL && (pWin)->parent != NULL && (pWin)->parent->parent == NULL) + +/* Returns TRUE if this window is a root window */ +#define IsRoot(pWin) \ + ((pWin) == WindowTable[(pWin)->drawable.pScreen->myNum]) + +/* Returns the top-level parent of pWindow. + The root is the top-level parent of itself, even though the root is + not otherwise considered to be a top-level window. */ +extern WindowPtr TopLevelParent (WindowPtr pWindow); + +/* Returns TRUE if this window is visible inside a frame (e.g. it is + visible and has a top-level or root parent) */ +extern Bool IsFramedWindow (WindowPtr pWin); + +/* Adjust base address of pixmap by DX,DY */ +extern void TranslatePixmapBase (PixmapPtr pPix, int dx, int dy); + +/* Prepare a window for direct access to its backing buffer. */ +extern void RootlessStartDrawing (WindowPtr pWindow); + +/* Mark that no more drawing operations will hit the window until ``start + drawing'' is issued again. */ +extern void RootlessFinishedDrawing (WindowPtr pWindow); + +/* Finish drawing to a window's backing buffer. */ +extern void RootlessStopDrawing (WindowPtr pWindow, Bool flush); + +/* Routines that cause regions to get redrawn. + DamageRegion and DamageRect are in global coordinates. + DamageBox is in window-local coordinates. */ +extern void RootlessDamageRegion (WindowPtr pWindow, RegionPtr pRegion); +extern void RootlessDamageRect (WindowPtr pWindow, int x, int y, int w, int h); +extern void RootlessDamageBox (WindowPtr pWindow, BoxPtr pBox); +extern void RootlessRedisplay (WindowPtr pWindow); +extern void RootlessRedisplayScreen (ScreenPtr pScreen); + +extern void RootlessQueueRedisplay (ScreenPtr pScreen); +extern Bool RootlessMayRedisplay (ScreenPtr pScreen); +extern void RootlessScreenExpose (ScreenPtr pScreen); + +/* Return the colormap currently installed on the given screen. */ +extern ColormapPtr RootlessGetColormap (ScreenPtr pScreen); + +/* Convert colormap to ARGB. */ +extern Bool RootlessResolveColormap (ScreenPtr pScreen, int first_color, + int n_colors, uint32_t *colors); + +extern void RootlessFlushWindowColormap (WindowPtr pWin); +extern void RootlessFlushScreenColormaps (ScreenPtr pScreen); + +/* Move windows back to their position relative to the screen origin. */ +extern void RootlessRepositionWindow (WindowPtr pWin); +extern void RootlessRepositionWindows (ScreenPtr pScreen); + +/* Move the window to it's correct place in the physical stacking order */ +extern void RootlessReorderWindow (WindowPtr pWin); + +/* Bit mask for alpha channel with a particular number of bits per + pixel. Note that we only care for 32bpp data. OS X uses planar alpha + for 16bpp. */ +#define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0) + +#ifdef RENDER +extern void RootlessComposite(CARD8 op, PicturePtr pSrc, + PicturePtr pMask, PicturePtr pDst, + INT16 xSrc, INT16 ySrc, + INT16 xMask, INT16 yMask, + INT16 xDst, INT16 yDst, + CARD16 width, CARD16 height); +#endif + +extern void RootlessNativeWindowStateChanged (xp_window_id id, + unsigned int state); + +extern void RootlessEnableRoot (ScreenPtr pScreen); +extern void RootlessDisableRoot (ScreenPtr pScreen); +extern void RootlessSetWindowLevel (WindowPtr pWin, int level); + +#endif /* _ROOTLESSCOMMON_H */ diff --git a/synfig-osx/launcher/rootless-gc.c b/synfig-osx/launcher/rootless-gc.c new file mode 100644 index 0000000..dea17e9 --- /dev/null +++ b/synfig-osx/launcher/rootless-gc.c @@ -0,0 +1,1526 @@ +/* + * Graphics Context support for Mac OS X rootless X server + */ +/* + * Copyright (c) 2001 Greg Parker. All Rights Reserved. + * Copyright (c) 2002 Torrey T. Lyons. All Rights Reserved. + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in this Software without prior written authorization. + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessGC.c,v 1.3 2002/07/24 05:58:33 torrey Exp $ */ + +#include "mi.h" +#include "scrnintstr.h" +#include "gcstruct.h" +#include "pixmapstr.h" +#include "windowstr.h" +#include "dixfontstr.h" +#include "mivalidate.h" +#include "fb.h" + +#include +#include +#include + +#include "rootless-common.h" + + +// GC functions +static void +RootlessValidateGC(GCPtr pGC, unsigned long changes, + DrawablePtr pDrawable); +static void RootlessChangeGC(GCPtr pGC, unsigned long mask); +static void RootlessCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); +static void RootlessDestroyGC(GCPtr pGC); +static void RootlessChangeClip(GCPtr pGC, int type, pointer pvalue, + int nrects); +static void RootlessDestroyClip(GCPtr pGC); +static void RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc); + +GCFuncs rootlessGCFuncs = { + RootlessValidateGC, + RootlessChangeGC, + RootlessCopyGC, + RootlessDestroyGC, + RootlessChangeClip, + RootlessDestroyClip, + RootlessCopyClip, +}; + +// GC operations +static void RootlessFillSpans(); +static void RootlessSetSpans(); +static void RootlessPutImage(); +static RegionPtr RootlessCopyArea(); +static RegionPtr RootlessCopyPlane(); +static void RootlessPolyPoint(); +static void RootlessPolylines(); +static void RootlessPolySegment(); +static void RootlessPolyRectangle(); +static void RootlessPolyArc(); +static void RootlessFillPolygon(); +static void RootlessPolyFillRect(); +static void RootlessPolyFillArc(); +static int RootlessPolyText8(); +static int RootlessPolyText16(); +static void RootlessImageText8(); +static void RootlessImageText16(); +static void RootlessImageGlyphBlt(); +static void RootlessPolyGlyphBlt(); +static void RootlessPushPixels(); + +static GCOps rootlessGCOps = { + RootlessFillSpans, + RootlessSetSpans, + RootlessPutImage, + RootlessCopyArea, + RootlessCopyPlane, + RootlessPolyPoint, + RootlessPolylines, + RootlessPolySegment, + RootlessPolyRectangle, + RootlessPolyArc, + RootlessFillPolygon, + RootlessPolyFillRect, + RootlessPolyFillArc, + RootlessPolyText8, + RootlessPolyText16, + RootlessImageText8, + RootlessImageText16, + RootlessImageGlyphBlt, + RootlessPolyGlyphBlt, + RootlessPushPixels +#ifdef NEED_LINEHELPER + , NULL +#endif +}; + + +Bool +RootlessCreateGC(GCPtr pGC) +{ + RootlessGCRec *gcrec; + RootlessScreenRec *s; + Bool result; + + SCREEN_UNWRAP(pGC->pScreen, CreateGC); + s = (RootlessScreenRec *) pGC->pScreen-> + devPrivates[rootlessScreenPrivateIndex].ptr; + result = s->CreateGC(pGC); + gcrec = (RootlessGCRec *) pGC->devPrivates[rootlessGCPrivateIndex].ptr; + gcrec->originalOps = NULL; // don't wrap ops yet + gcrec->originalFuncs = pGC->funcs; + pGC->funcs = &rootlessGCFuncs; + + SCREEN_WRAP(pGC->pScreen, CreateGC); + return result; +} + + +// GC func wrapping +// ValidateGC wraps gcOps iff dest is viewable. All others just unwrap&call. + +// GCFUN_UNRAP assumes funcs have been wrapped and +// does not assume ops have been wrapped +#define GCFUNC_UNWRAP(pGC) \ + RootlessGCRec *gcrec = (RootlessGCRec *) \ + (pGC)->devPrivates[rootlessGCPrivateIndex].ptr; \ + (pGC)->funcs = gcrec->originalFuncs; \ + if (gcrec->originalOps) { \ + (pGC)->ops = gcrec->originalOps; \ +} + +#define GCFUNC_WRAP(pGC) \ + gcrec->originalFuncs = (pGC)->funcs; \ + (pGC)->funcs = &rootlessGCFuncs; \ + if (gcrec->originalOps) { \ + gcrec->originalOps = (pGC)->ops; \ + (pGC)->ops = &rootlessGCOps; \ +} + +/* Turn drawing on the root into a no-op */ +#define GC_IS_ROOT(pDst) ((pDst)->type == DRAWABLE_WINDOW \ + && IsRoot ((WindowPtr) (pDst)) \ + && WINREC ((WindowPtr) (pDst)) == NULL) + +#define GC_SKIP_ROOT(pDst) \ + do { \ + if (GC_IS_ROOT (pDst)) \ + return; \ + } while (0) + +/* Our main problem when drawing is that we have to make sure that + the alpha channel of the windows we're drawing in is always opaque. + + fb makes this harder than it would otherwise be by noticing that a + planemask of 0x00ffffff includes all bits when depth=24, and so + "optimizes" the pm to 0xffffffff. We work around that by temporarily + setting depth=bpp while changing the GC. + + Anyway, so the normal situation (in 32 bit mode) is that the + planemask is 0x00ffffff and thus fb leaves the alpha channel alone + (and it's opaque initially, so things work out). + + But there's a problem with drawing with a planemask that doesn't + have all bits set - it normally causes fb to fall off its fastest + paths when blitting and filling. + + So my solution to that is to try to recognize when we can relax the + planemask back to ~0, and do that for the duration of the drawing + operation, setting the alpha channel in fg/bg pixels to opaque at + the same time. We can do this when drawing op is GXcopy. We can also + do it when copying from another window (since its alpha channel must + also be opaque). + + Note that even when we can't set planemask to all ones, fbBlt may + still choose altivec'd code if it's GXcopy and a forwards copy. This + is mainly intended for copying from pixmaps to windows. The copy + operation used sets alpha to opaque. + + The three macros below are used to implement this, drawing ops look + something like this: + + OP { + GC_SAVE (gc); + GCFUNC_UNWRAP (gc); + + ... + + if (can_accel_xxx (..) && otherwise-suitable) + GC_UNSET_PM (gc, dst); + + gc->funcs->OP (gc, ...); + + GC_RESTORE (gc, dst); + GCFUNC_WRAP (gc); + } + + */ + +#define GC_SAVE(pGC) \ + unsigned long _save_fg = (pGC)->fgPixel; \ + unsigned long _save_bg = (pGC)->bgPixel; \ + unsigned long _save_pm = (pGC)->planemask; \ + Bool _changed = FALSE + +#define GC_RESTORE(pGC, pDraw) \ + do { \ + if (_changed) { \ + unsigned int depth = (pDraw)->depth; \ + (pGC)->fgPixel = _save_fg; \ + (pGC)->bgPixel = _save_bg; \ + (pGC)->planemask = _save_pm; \ + (pDraw)->depth = (pDraw)->bitsPerPixel; \ + validate_gc (pGC, GCForeground | GCBackground \ + | GCPlaneMask, pDraw); \ + (pDraw)->depth = depth; \ + } \ + } while (0) + +#define GC_UNSET_PM(pGC, pDraw) \ + do { \ + unsigned int mask = RootlessAlphaMask ((pDraw)->bitsPerPixel); \ + if (((pGC)->planemask & mask) != mask) { \ + unsigned int depth = (pDraw)->depth; \ + (pGC)->fgPixel |= mask; \ + (pGC)->bgPixel |= mask; \ + (pGC)->planemask |= mask; \ + (pDraw)->depth = (pDraw)->bitsPerPixel; \ + validate_gc (pGC, GCForeground \ + | GCBackground | GCPlaneMask, pDraw); \ + (pDraw)->depth = depth; \ + _changed = TRUE; \ + } \ + } while (0) + +static void +validate_gc (GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) +{ + RootlessGCRec *gcrec = (RootlessGCRec *) + (pGC)->devPrivates[rootlessGCPrivateIndex].ptr; + + pGC->funcs->ValidateGC(pGC, changes, pDrawable); + + if (((WindowPtr) pDrawable)->viewable) + { + gcrec->originalOps = pGC->ops; + } +} + +static RootlessWindowRec * +can_accel_blit (DrawablePtr pDraw, GCPtr pGC) +{ + WindowPtr pTop; + RootlessWindowRec *winRec; + unsigned int pm; + + if (pGC->alu != GXcopy) + return NULL; + + if (pDraw->type != DRAWABLE_WINDOW) + return NULL; + + pm = ~RootlessAlphaMask (pDraw->bitsPerPixel); + if ((pGC->planemask & pm) != pm) + return NULL; + + pTop = TopLevelParent ((WindowPtr) pDraw); + if (pTop == NULL) + return NULL; + + winRec = WINREC(pTop); + if (winRec == NULL) + return NULL; + + return winRec; +} + +static inline RootlessWindowRec * +can_accel_fill (DrawablePtr pDraw, GCPtr pGC) +{ + if (pGC->fillStyle != FillSolid) + return NULL; + + return can_accel_blit (pDraw, pGC); +} + +static unsigned int +box_bytes (DrawablePtr pDraw, BoxRec *box) +{ + unsigned int pixels; + + pixels = (box->x2 - box->x1) * (box->y2 - box->y1); + + return pixels * (pDraw->bitsPerPixel >> 3); +} + +static void +RootlessValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) +{ + GCFUNC_UNWRAP(pGC); + + gcrec->originalOps = NULL; + + if (pDrawable->type == DRAWABLE_WINDOW) + { + /* Prevent fb relaxing planemask by telling it we use all + bits temporarily. */ + + unsigned int depth = pDrawable->depth; + pDrawable->depth = pDrawable->bitsPerPixel; + pGC->planemask &= ~RootlessAlphaMask (pDrawable->bitsPerPixel); + validate_gc (pGC, changes | GCPlaneMask, pDrawable); + pDrawable->depth = depth; + } + else + pGC->funcs->ValidateGC(pGC, changes, pDrawable); + + GCFUNC_WRAP(pGC); +} + +static void RootlessChangeGC(GCPtr pGC, unsigned long mask) +{ + GCFUNC_UNWRAP(pGC); + pGC->funcs->ChangeGC(pGC, mask); + GCFUNC_WRAP(pGC); +} + +static void RootlessCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) +{ + GCFUNC_UNWRAP(pGCDst); + pGCDst->funcs->CopyGC(pGCSrc, mask, pGCDst); + GCFUNC_WRAP(pGCDst); +} + +static void RootlessDestroyGC(GCPtr pGC) +{ + GCFUNC_UNWRAP(pGC); + pGC->funcs->DestroyGC(pGC); + GCFUNC_WRAP(pGC); +} + +static void RootlessChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects) +{ + GCFUNC_UNWRAP(pGC); + pGC->funcs->ChangeClip(pGC, type, pvalue, nrects); + GCFUNC_WRAP(pGC); +} + +static void RootlessDestroyClip(GCPtr pGC) +{ + GCFUNC_UNWRAP(pGC); + pGC->funcs->DestroyClip(pGC); + GCFUNC_WRAP(pGC); +} + +static void RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc) +{ + GCFUNC_UNWRAP(pgcDst); + pgcDst->funcs->CopyClip(pgcDst, pgcSrc); + GCFUNC_WRAP(pgcDst); +} + + +// GC ops +// We can't use shadowfb because shadowfb assumes one pixmap +// and our root window is a special case. +// So much of this code is copied from shadowfb. + +// assumes both funcs and ops are wrapped +#define GCOP_UNWRAP(pGC) \ + RootlessGCRec *gcrec = (RootlessGCRec *) \ + (pGC)->devPrivates[rootlessGCPrivateIndex].ptr; \ + GCFuncs *saveFuncs = pGC->funcs; \ + (pGC)->funcs = gcrec->originalFuncs; \ + (pGC)->ops = gcrec->originalOps; + +#define GCOP_WRAP(pGC) \ + gcrec->originalOps = (pGC)->ops; \ + (pGC)->funcs = saveFuncs; \ + (pGC)->ops = &rootlessGCOps; + + +static void +RootlessFillSpans(DrawablePtr dst, GCPtr pGC, int nInit, + DDXPointPtr pptInit, int *pwidthInit, int sorted) +{ + GC_SAVE (pGC); + + GC_SKIP_ROOT (dst); + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("fill spans start\n"); + + if (nInit <= 0) { + pGC->ops->FillSpans(dst, pGC, nInit, pptInit, pwidthInit, sorted); + } else { + DDXPointPtr ppt = pptInit; + int *pwidth = pwidthInit; + int i = nInit; + BoxRec box; + + box.x1 = ppt->x; + box.x2 = box.x1 + *pwidth; + box.y2 = box.y1 = ppt->y; + + while(--i) { + ppt++; + pwidthInit++; + if(box.x1 > ppt->x) + box.x1 = ppt->x; + if(box.x2 < (ppt->x + *pwidth)) + box.x2 = ppt->x + *pwidth; + if(box.y1 > ppt->y) + box.y1 = ppt->y; + else if(box.y2 < ppt->y) + box.y2 = ppt->y; + } + + box.y2++; + + RootlessStartDrawing((WindowPtr) dst); + + if (can_accel_fill (dst, pGC) + && box_bytes (dst, &box) >= xp_fill_bytes_threshold) + { + GC_UNSET_PM (pGC, dst); + } + + pGC->ops->FillSpans(dst, pGC, nInit, pptInit, pwidthInit, sorted); + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + RootlessFinishedDrawing ((WindowPtr) dst); + } + + GC_RESTORE (pGC, dst); + GCOP_WRAP(pGC); + RL_DEBUG_MSG("fill spans end\n"); +} + +static void +RootlessSetSpans(DrawablePtr dst, GCPtr pGC, char *pSrc, + DDXPointPtr pptInit, int *pwidthInit, + int nspans, int sorted) +{ + GC_SKIP_ROOT (dst); + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("set spans start\n"); + + if (nspans <= 0) { + pGC->ops->SetSpans(dst, pGC, pSrc, pptInit, pwidthInit, + nspans, sorted); + } else { + DDXPointPtr ppt = pptInit; + int *pwidth = pwidthInit; + int i = nspans; + BoxRec box; + + box.x1 = ppt->x; + box.x2 = box.x1 + *pwidth; + box.y2 = box.y1 = ppt->y; + + while(--i) { + ppt++; + pwidth++; + if(box.x1 > ppt->x) + box.x1 = ppt->x; + if(box.x2 < (ppt->x + *pwidth)) + box.x2 = ppt->x + *pwidth; + if(box.y1 > ppt->y) + box.y1 = ppt->y; + else if(box.y2 < ppt->y) + box.y2 = ppt->y; + } + + box.y2++; + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->SetSpans(dst, pGC, pSrc, pptInit, pwidthInit, + nspans, sorted); + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + RootlessFinishedDrawing ((WindowPtr) dst); + } + GCOP_WRAP(pGC); + RL_DEBUG_MSG("set spans end\n"); +} + +static void +RootlessPutImage(DrawablePtr dst, GCPtr pGC, + int depth, int x, int y, int w, int h, + int leftPad, int format, char *pBits) +{ + BoxRec box; + + GC_SKIP_ROOT (dst); + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("put image start\n"); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->PutImage(dst, pGC, depth, x,y,w,h, leftPad, format, pBits); + + box.x1 = x + dst->x; + box.x2 = box.x1 + w; + box.y1 = y + dst->y; + box.y2 = box.y1 + h; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + RootlessFinishedDrawing ((WindowPtr) dst); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("put image end\n"); +} + +/* changed area is *dest* rect */ +static RegionPtr +RootlessCopyArea(DrawablePtr pSrc, DrawablePtr dst, GCPtr pGC, + int srcx, int srcy, int w, int h, + int dstx, int dsty) +{ + RegionPtr result; + BoxRec box; + GC_SAVE (pGC); + Bool src_drawing = FALSE; + + if (GC_IS_ROOT (dst) || GC_IS_ROOT (pSrc)) + return NULL; /* nothing exposed */ + + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("copy area start (src 0x%x, dst 0x%x)\n", pSrc, dst); + + if (pSrc->type == DRAWABLE_WINDOW && IsFramedWindow((WindowPtr)pSrc)) + { + unsigned int bytes; + + /* If both source and dest are windows, and we're doing + a simple copy operation, we can remove the alpha-protecting + planemask (since source has opaque alpha as well) */ + + bytes = w * h * (pSrc->depth >> 3); + + if (bytes >= xp_copy_bytes_threshold && can_accel_blit (pSrc, pGC)) + { + GC_UNSET_PM (pGC, dst); + } + + RootlessStartDrawing((WindowPtr) pSrc); + src_drawing = TRUE; + } + RootlessStartDrawing((WindowPtr) dst); + result = pGC->ops->CopyArea(pSrc, dst, pGC, srcx, srcy, w, h, dstx, dsty); + + box.x1 = dstx + dst->x; + box.x2 = box.x1 + w; + box.y1 = dsty + dst->y; + box.y2 = box.y1 + h; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + RootlessFinishedDrawing ((WindowPtr) dst); + if (src_drawing) + RootlessFinishedDrawing ((WindowPtr) pSrc); + + GC_RESTORE (pGC, dst); + GCOP_WRAP(pGC); + RL_DEBUG_MSG("copy area end\n"); + return result; +} + +/* changed area is *dest* rect */ +static RegionPtr RootlessCopyPlane(DrawablePtr pSrc, DrawablePtr dst, + GCPtr pGC, int srcx, int srcy, + int w, int h, int dstx, int dsty, + unsigned long plane) +{ + RegionPtr result; + BoxRec box; + Bool src_drawing = FALSE; + + if (GC_IS_ROOT (dst) || GC_IS_ROOT (pSrc)) + return NULL; /* nothing exposed */ + + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("copy plane start\n"); + + if (pSrc->type == DRAWABLE_WINDOW && IsFramedWindow((WindowPtr)pSrc)) { + RootlessStartDrawing((WindowPtr) pSrc); + src_drawing = TRUE; + } + RootlessStartDrawing((WindowPtr) dst); + result = pGC->ops->CopyPlane(pSrc, dst, pGC, srcx, srcy, w, h, + dstx, dsty, plane); + + box.x1 = dstx + dst->x; + box.x2 = box.x1 + w; + box.y1 = dsty + dst->y; + box.y2 = box.y1 + h; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + RootlessFinishedDrawing ((WindowPtr) dst); + if (src_drawing) + RootlessFinishedDrawing ((WindowPtr) pSrc); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("copy plane end\n"); + return result; +} + +// Options for size of changed area: +// 0 = box per point +// 1 = big box around all points +// 2 = accumulate point in 20 pixel radius +#define ROOTLESS_CHANGED_AREA 1 +#define abs(a) ((a) > 0 ? (a) : -(a)) + +/* changed area is box around all points */ +static void RootlessPolyPoint(DrawablePtr dst, GCPtr pGC, + int mode, int npt, DDXPointPtr pptInit) +{ + GC_SKIP_ROOT (dst); + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("polypoint start\n"); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->PolyPoint(dst, pGC, mode, npt, pptInit); + + if (npt > 0) { +#if ROOTLESS_CHANGED_AREA==0 + // box per point + BoxRec box; + + while (npt) { + box.x1 = pptInit->x; + box.y1 = pptInit->y; + box.x2 = box.x1 + 1; + box.y2 = box.y1 + 1; + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + npt--; + pptInit++; + } + +#elif ROOTLESS_CHANGED_AREA==1 + // one big box + BoxRec box; + + box.x2 = box.x1 = pptInit->x; + box.y2 = box.y1 = pptInit->y; + while(--npt) { + pptInit++; + if(box.x1 > pptInit->x) + box.x1 = pptInit->x; + else if(box.x2 < pptInit->x) + box.x2 = pptInit->x; + if(box.y1 > pptInit->y) + box.y1 = pptInit->y; + else if(box.y2 < pptInit->y) + box.y2 = pptInit->y; + } + + box.x2++; + box.y2++; + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + +#elif ROOTLESS_CHANGED_AREA==2 + // clever(?) method: accumulate point in 20-pixel radius + BoxRec box; + int firstx, firsty; + + box.x2 = box.x1 = firstx = pptInit->x; + box.y2 = box.y1 = firsty = pptInit->y; + while(--npt) { + pptInit++; + if (abs(pptInit->x - firstx) > 20 || + abs(pptInit->y - firsty) > 20) { + box.x2++; + box.y2++; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + box.x2 = box.x1 = firstx = pptInit->x; + box.y2 = box.y1 = firsty = pptInit->y; + } else { + if (box.x1 > pptInit->x) box.x1 = pptInit->x; + else if (box.x2 < pptInit->x) box.x2 = pptInit->x; + if (box.y1 > pptInit->y) box.y1 = pptInit->y; + else if (box.y2 < pptInit->y) box.y2 = pptInit->y; + } + } + box.x2++; + box.y2++; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); +#endif /* ROOTLESS_CHANGED_AREA */ + } + + RootlessFinishedDrawing ((WindowPtr) dst); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("polypoint end\n"); +} + +#undef ROOTLESS_CHANGED_AREA + +/* changed area is box around each line */ +static void RootlessPolylines(DrawablePtr dst, GCPtr pGC, + int mode, int npt, DDXPointPtr pptInit) +{ + GC_SKIP_ROOT (dst); + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("poly lines start\n"); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->Polylines(dst, pGC, mode, npt, pptInit); + + if (npt > 0) { + BoxRec box; + int extra = pGC->lineWidth >> 1; + + box.x2 = box.x1 = pptInit->x; + box.y2 = box.y1 = pptInit->y; + + if(npt > 1) { + if(pGC->joinStyle == JoinMiter) + extra = 6 * pGC->lineWidth; + else if(pGC->capStyle == CapProjecting) + extra = pGC->lineWidth; + } + + if(mode == CoordModePrevious) { + int x = box.x1; + int y = box.y1; + + while(--npt) { + pptInit++; + x += pptInit->x; + y += pptInit->y; + if(box.x1 > x) + box.x1 = x; + else if(box.x2 < x) + box.x2 = x; + if(box.y1 > y) + box.y1 = y; + else if(box.y2 < y) + box.y2 = y; + } + } else { + while(--npt) { + pptInit++; + if(box.x1 > pptInit->x) + box.x1 = pptInit->x; + else if(box.x2 < pptInit->x) + box.x2 = pptInit->x; + if(box.y1 > pptInit->y) + box.y1 = pptInit->y; + else if(box.y2 < pptInit->y) + box.y2 = pptInit->y; + } + } + + box.x2++; + box.y2++; + + if(extra) { + box.x1 -= extra; + box.x2 += extra; + box.y1 -= extra; + box.y2 += extra; + } + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + RootlessFinishedDrawing ((WindowPtr) dst); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("poly lines end\n"); +} + +/* changed area is box around each line segment */ +static void RootlessPolySegment(DrawablePtr dst, GCPtr pGC, + int nseg, xSegment *pSeg) +{ + GC_SKIP_ROOT (dst); + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("poly segment start (win 0x%x)\n", dst); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->PolySegment(dst, pGC, nseg, pSeg); + + if (nseg > 0) { + BoxRec box; + int extra = pGC->lineWidth; + + if(pGC->capStyle != CapProjecting) + extra >>= 1; + + if(pSeg->x2 > pSeg->x1) { + box.x1 = pSeg->x1; + box.x2 = pSeg->x2; + } else { + box.x2 = pSeg->x1; + box.x1 = pSeg->x2; + } + + if(pSeg->y2 > pSeg->y1) { + box.y1 = pSeg->y1; + box.y2 = pSeg->y2; + } else { + box.y2 = pSeg->y1; + box.y1 = pSeg->y2; + } + + while(--nseg) { + pSeg++; + if(pSeg->x2 > pSeg->x1) { + if(pSeg->x1 < box.x1) box.x1 = pSeg->x1; + if(pSeg->x2 > box.x2) box.x2 = pSeg->x2; + } else { + if(pSeg->x2 < box.x1) box.x1 = pSeg->x2; + if(pSeg->x1 > box.x2) box.x2 = pSeg->x1; + } + if(pSeg->y2 > pSeg->y1) { + if(pSeg->y1 < box.y1) box.y1 = pSeg->y1; + if(pSeg->y2 > box.y2) box.y2 = pSeg->y2; + } else { + if(pSeg->y2 < box.y1) box.y1 = pSeg->y2; + if(pSeg->y1 > box.y2) box.y2 = pSeg->y1; + } + } + + box.x2++; + box.y2++; + + if(extra) { + box.x1 -= extra; + box.x2 += extra; + box.y1 -= extra; + box.y2 += extra; + } + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + RootlessFinishedDrawing ((WindowPtr) dst); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("poly segment end\n"); +} + +/* changed area is box around each line (not entire rects) */ +static void RootlessPolyRectangle(DrawablePtr dst, GCPtr pGC, + int nRects, xRectangle *pRects) +{ + GC_SKIP_ROOT (dst); + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("poly rectangle start\n"); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->PolyRectangle(dst, pGC, nRects, pRects); + + if (nRects > 0) { + BoxRec box; + int offset1, offset2, offset3; + + offset2 = pGC->lineWidth; + if(!offset2) offset2 = 1; + offset1 = offset2 >> 1; + offset3 = offset2 - offset1; + + while(nRects--) { + box.x1 = pRects->x - offset1; + box.y1 = pRects->y - offset1; + box.x2 = box.x1 + pRects->width + offset2; + box.y2 = box.y1 + offset2; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + box.x1 = pRects->x - offset1; + box.y1 = pRects->y + offset3; + box.x2 = box.x1 + offset2; + box.y2 = box.y1 + pRects->height - offset2; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + box.x1 = pRects->x + pRects->width - offset1; + box.y1 = pRects->y + offset3; + box.x2 = box.x1 + offset2; + box.y2 = box.y1 + pRects->height - offset2; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + box.x1 = pRects->x - offset1; + box.y1 = pRects->y + pRects->height - offset1; + box.x2 = box.x1 + pRects->width + offset2; + box.y2 = box.y1 + offset2; + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + pRects++; + } + } + + RootlessFinishedDrawing ((WindowPtr) dst); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("poly rectangle end\n"); +} + + +/* changed area is box around each arc (assumes all arcs are 360 degrees) */ +static void RootlessPolyArc(DrawablePtr dst, GCPtr pGC, int narcs, xArc *parcs) +{ + GC_SKIP_ROOT (dst); + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("poly arc start\n"); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->PolyArc(dst, pGC, narcs, parcs); + + if (narcs > 0) { + int extra = pGC->lineWidth >> 1; + BoxRec box; + + box.x1 = parcs->x; + box.x2 = box.x1 + parcs->width; + box.y1 = parcs->y; + box.y2 = box.y1 + parcs->height; + + /* should I break these up instead ? */ + + while(--narcs) { + parcs++; + if(box.x1 > parcs->x) + box.x1 = parcs->x; + if(box.x2 < (parcs->x + parcs->width)) + box.x2 = parcs->x + parcs->width; + if(box.y1 > parcs->y) + box.y1 = parcs->y; + if(box.y2 < (parcs->y + parcs->height)) + box.y2 = parcs->y + parcs->height; + } + + if(extra) { + box.x1 -= extra; + box.x2 += extra; + box.y1 -= extra; + box.y2 += extra; + } + + box.x2++; + box.y2++; + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + RootlessFinishedDrawing ((WindowPtr) dst); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("poly arc end\n"); +} + + +/* changed area is box around each poly */ +static void RootlessFillPolygon(DrawablePtr dst, GCPtr pGC, + int shape, int mode, int count, + DDXPointPtr pptInit) +{ + GC_SAVE (pGC); + + GC_SKIP_ROOT (dst); + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("fill poly start (win 0x%x, fillStyle 0x%x)\n", dst, + pGC->fillStyle); + + if (count <= 2) { + pGC->ops->FillPolygon(dst, pGC, shape, mode, count, pptInit); + } else { + DDXPointPtr ppt = pptInit; + int i = count; + BoxRec box; + + box.x2 = box.x1 = ppt->x; + box.y2 = box.y1 = ppt->y; + + if(mode != CoordModeOrigin) { + int x = box.x1; + int y = box.y1; + + while(--i) { + ppt++; + x += ppt->x; + y += ppt->y; + if(box.x1 > x) + box.x1 = x; + else if(box.x2 < x) + box.x2 = x; + if(box.y1 > y) + box.y1 = y; + else if(box.y2 < y) + box.y2 = y; + } + } else { + while(--i) { + ppt++; + if(box.x1 > ppt->x) + box.x1 = ppt->x; + else if(box.x2 < ppt->x) + box.x2 = ppt->x; + if(box.y1 > ppt->y) + box.y1 = ppt->y; + else if(box.y2 < ppt->y) + box.y2 = ppt->y; + } + } + + box.x2++; + box.y2++; + + RootlessStartDrawing((WindowPtr) dst); + + if (can_accel_fill (dst, pGC) + && box_bytes (dst, &box) >= xp_fill_bytes_threshold) + { + GC_UNSET_PM (pGC, dst); + } + + pGC->ops->FillPolygon(dst, pGC, shape, mode, count, pptInit); + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + RootlessFinishedDrawing ((WindowPtr) dst); + } + + GC_RESTORE (pGC, dst); + GCOP_WRAP(pGC); + RL_DEBUG_MSG("fill poly end\n"); +} + +/* changed area is the rects */ +static void RootlessPolyFillRect(DrawablePtr dst, GCPtr pGC, + int nRectsInit, xRectangle *pRectsInit) +{ + GC_SAVE (pGC); + + GC_SKIP_ROOT (dst); + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("fill rect start (win 0x%x, fillStyle 0x%x)\n", dst, + pGC->fillStyle); + + if (nRectsInit <= 0) { + pGC->ops->PolyFillRect(dst, pGC, nRectsInit, pRectsInit); + } else { + BoxRec box; + xRectangle *pRects = pRectsInit; + int nRects = nRectsInit; + + box.x1 = pRects->x; + box.x2 = box.x1 + pRects->width; + box.y1 = pRects->y; + box.y2 = box.y1 + pRects->height; + + while(--nRects) { + pRects++; + if(box.x1 > pRects->x) + box.x1 = pRects->x; + if(box.x2 < (pRects->x + pRects->width)) + box.x2 = pRects->x + pRects->width; + if(box.y1 > pRects->y) + box.y1 = pRects->y; + if(box.y2 < (pRects->y + pRects->height)) + box.y2 = pRects->y + pRects->height; + } + + /* cfb messes with the pRectsInit so we have to do our + calculations first */ + + RootlessStartDrawing((WindowPtr) dst); + + if (can_accel_fill (dst, pGC) + && box_bytes (dst, &box) >= xp_fill_bytes_threshold) + { + GC_UNSET_PM (pGC, dst); + } + + pGC->ops->PolyFillRect (dst, pGC, nRectsInit, pRectsInit); + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + RootlessFinishedDrawing ((WindowPtr) dst); + } + + GC_RESTORE (pGC, dst); + GCOP_WRAP(pGC); + RL_DEBUG_MSG("fill rect end\n"); +} + + +/* changed area is box around each arc (assuming arcs are all 360 degrees) */ +static void RootlessPolyFillArc(DrawablePtr dst, GCPtr pGC, + int narcs, xArc *parcs) +{ + GC_SAVE (pGC); + + GC_SKIP_ROOT (dst); + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("fill arc start\n"); + + if (narcs > 0) { + BoxRec box; + int i; + + box.x1 = parcs->x; + box.x2 = box.x1 + parcs->width; + box.y1 = parcs->y; + box.y2 = box.y1 + parcs->height; + + /* should I break these up instead ? */ + + for (i = 0; i < narcs; i++) + { + if(box.x1 > parcs[i].x) + box.x1 = parcs[i].x; + if(box.x2 < (parcs[i].x + parcs[i].width)) + box.x2 = parcs[i].x + parcs[i].width; + if(box.y1 > parcs[i].y) + box.y1 = parcs[i].y; + if(box.y2 < (parcs[i].y + parcs[i].height)) + box.y2 = parcs[i].y + parcs[i].height; + } + + RootlessStartDrawing((WindowPtr) dst); + + if (can_accel_fill (dst, pGC) + && box_bytes (dst, &box) >= xp_fill_bytes_threshold) + { + GC_UNSET_PM (pGC, dst); + } + + pGC->ops->PolyFillArc(dst, pGC, narcs, parcs); + + TRIM_AND_TRANSLATE_BOX(box, dst, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + RootlessFinishedDrawing ((WindowPtr) dst); + } + else + pGC->ops->PolyFillArc(dst, pGC, narcs, parcs); + + GC_RESTORE (pGC, dst); + GCOP_WRAP(pGC); + RL_DEBUG_MSG("fill arc end\n"); +} + + +static void RootlessImageText8(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, char *chars) +{ + GC_SAVE (pGC); + + GC_SKIP_ROOT (dst); + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("imagetext8 start\n"); + + RootlessStartDrawing((WindowPtr) dst); + + if (count > 0) { + int top, bot, Min, Max; + BoxRec box; + + top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); + bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); + + Min = count * FONTMINBOUNDS(pGC->font, characterWidth); + if(Min > 0) Min = 0; + Max = count * FONTMAXBOUNDS(pGC->font, characterWidth); + if(Max < 0) Max = 0; + + /* ugh */ + box.x1 = dst->x + x + Min + + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = dst->x + x + Max + + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + box.y1 = dst->y + y - top; + box.y2 = dst->y + y + bot; + + if (can_accel_fill (dst, pGC) + && box_bytes (dst, &box) >= xp_fill_bytes_threshold) + { + GC_UNSET_PM (pGC, dst); + } + + pGC->ops->ImageText8(dst, pGC, x, y, count, chars); + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + else + pGC->ops->ImageText8(dst, pGC, x, y, count, chars); + + RootlessFinishedDrawing ((WindowPtr) dst); + + GC_RESTORE (pGC, dst); + GCOP_WRAP(pGC); + RL_DEBUG_MSG("imagetext8 end\n"); +} + +static int RootlessPolyText8(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, char *chars) +{ + int width; // the result, sorta + + if (GC_IS_ROOT (dst)) + return 0; /* FIXME: ok? */ + + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("polytext8 start\n"); + + RootlessStartDrawing((WindowPtr) dst); + width = pGC->ops->PolyText8(dst, pGC, x, y, count, chars); + width -= x; + + if(width > 0) { + BoxRec box; + + /* ugh */ + box.x1 = dst->x + x + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = dst->x + x + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + if(count > 1) { + if(width > 0) box.x2 += width; + else box.x1 += width; + } + + box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent); + box.y2 = dst->y + y + FONTMAXBOUNDS(pGC->font, descent); + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + RootlessFinishedDrawing ((WindowPtr) dst); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("polytext8 end\n"); + return (width + x); +} + +static void RootlessImageText16(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, unsigned short *chars) +{ + GC_SAVE (pGC); + + GC_SKIP_ROOT (dst); + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("imagetext16 start\n"); + + if (count > 0) { + int top, bot, Min, Max; + BoxRec box; + + top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); + bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); + + Min = count * FONTMINBOUNDS(pGC->font, characterWidth); + if(Min > 0) Min = 0; + Max = count * FONTMAXBOUNDS(pGC->font, characterWidth); + if(Max < 0) Max = 0; + + /* ugh */ + box.x1 = dst->x + x + Min + + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = dst->x + x + Max + + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + box.y1 = dst->y + y - top; + box.y2 = dst->y + y + bot; + + RootlessStartDrawing((WindowPtr) dst); + + if (can_accel_fill (dst, pGC) + && box_bytes (dst, &box) >= xp_fill_bytes_threshold) + { + GC_UNSET_PM (pGC, dst); + } + + pGC->ops->ImageText16(dst, pGC, x, y, count, chars); + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + RootlessFinishedDrawing ((WindowPtr) dst); + } + else + pGC->ops->ImageText16(dst, pGC, x, y, count, chars); + + GC_RESTORE (pGC, dst); + GCOP_WRAP(pGC); + RL_DEBUG_MSG("imagetext16 end\n"); +} + +static int RootlessPolyText16(DrawablePtr dst, GCPtr pGC, + int x, int y, int count, unsigned short *chars) +{ + int width; // the result, sorta + + if (GC_IS_ROOT (dst)) + return 0; /* FIXME: ok? */ + + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("polytext16 start\n"); + + RootlessStartDrawing((WindowPtr) dst); + width = pGC->ops->PolyText16(dst, pGC, x, y, count, chars); + width -= x; + + if (width > 0) { + BoxRec box; + + /* ugh */ + box.x1 = dst->x + x + FONTMINBOUNDS(pGC->font, leftSideBearing); + box.x2 = dst->x + x + FONTMAXBOUNDS(pGC->font, rightSideBearing); + + if(count > 1) { + if(width > 0) box.x2 += width; + else box.x1 += width; + } + + box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent); + box.y2 = dst->y + y + FONTMAXBOUNDS(pGC->font, descent); + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + RootlessFinishedDrawing ((WindowPtr) dst); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("polytext16 end\n"); + return width + x; +} + +static void RootlessImageGlyphBlt(DrawablePtr dst, GCPtr pGC, + int x, int y, unsigned int nglyph, + CharInfoPtr *ppci, pointer unused) +{ + GC_SKIP_ROOT (dst); + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("imageglyph start\n"); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->ImageGlyphBlt(dst, pGC, x, y, nglyph, ppci, unused); + + if (nglyph > 0) { + int top, bot, width = 0; + BoxRec box; + + top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); + bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); + + box.x1 = ppci[0]->metrics.leftSideBearing; + if(box.x1 > 0) box.x1 = 0; + box.x2 = ppci[nglyph - 1]->metrics.rightSideBearing - + ppci[nglyph - 1]->metrics.characterWidth; + if(box.x2 < 0) box.x2 = 0; + + box.x2 += dst->x + x; + box.x1 += dst->x + x; + + while(nglyph--) { + width += (*ppci)->metrics.characterWidth; + ppci++; + } + + if(width > 0) + box.x2 += width; + else + box.x1 += width; + + box.y1 = dst->y + y - top; + box.y2 = dst->y + y + bot; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + RootlessFinishedDrawing ((WindowPtr) dst); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("imageglyph end\n"); +} + +static void RootlessPolyGlyphBlt(DrawablePtr dst, GCPtr pGC, + int x, int y, unsigned int nglyph, + CharInfoPtr *ppci, pointer pglyphBase) +{ + GC_SKIP_ROOT (dst); + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("polyglyph start\n"); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->PolyGlyphBlt(dst, pGC, x, y, nglyph, ppci, pglyphBase); + + if (nglyph > 0) { + BoxRec box; + + /* ugh */ + box.x1 = dst->x + x + ppci[0]->metrics.leftSideBearing; + box.x2 = dst->x + x + ppci[nglyph - 1]->metrics.rightSideBearing; + + if(nglyph > 1) { + int width = 0; + + while(--nglyph) { + width += (*ppci)->metrics.characterWidth; + ppci++; + } + + if(width > 0) box.x2 += width; + else box.x1 += width; + } + + box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent); + box.y2 = dst->y + y + FONTMAXBOUNDS(pGC->font, descent); + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + } + + RootlessFinishedDrawing ((WindowPtr) dst); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("polyglyph end\n"); +} + + +/* changed area is in dest */ +static void +RootlessPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr dst, + int dx, int dy, int xOrg, int yOrg) +{ + BoxRec box; + + GC_SKIP_ROOT (dst); + GCOP_UNWRAP(pGC); + RL_DEBUG_MSG("push pixels start\n"); + + RootlessStartDrawing((WindowPtr) dst); + pGC->ops->PushPixels(pGC, pBitMap, dst, dx, dy, xOrg, yOrg); + + box.x1 = xOrg + dst->x; + box.x2 = box.x1 + dx; + box.y1 = yOrg + dst->y; + box.y2 = box.y1 + dy; + + TRIM_BOX(box, pGC); + if(BOX_NOT_EMPTY(box)) + RootlessDamageBox ((WindowPtr) dst, &box); + + RootlessFinishedDrawing ((WindowPtr) dst); + + GCOP_WRAP(pGC); + RL_DEBUG_MSG("push pixels end\n"); +} diff --git a/synfig-osx/launcher/rootless-picture.c b/synfig-osx/launcher/rootless-picture.c new file mode 100644 index 0000000..8db5ca8 --- /dev/null +++ b/synfig-osx/launcher/rootless-picture.c @@ -0,0 +1,540 @@ +/* + * Support for RENDER extension with rootless + */ +/* + * Copyright (c) 2002 Torrey T. Lyons. All Rights Reserved. + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in this Software without prior written authorization. + */ +/* This file is largely based on fbcompose.c and fbpict.c, which contain + * the following copyright: + * + * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. + */ + /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/aquaPicture.c,v 1.3 2002/09/28 00:00:03 torrey Exp $ */ + +#define DEFAULT_LOG_FORMATS 0 + +#ifdef RENDER + +#include "fb.h" +#include "picturestr.h" +#include "mipict.h" +#include "fbpict.h" +#include "rootless.h" + +# define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b)) + + +// Replacement for fbStore_x8r8g8b8 that sets the alpha channel +void +RootlessStore_x8r8g8b8 (FbCompositeOperand *op, CARD32 value) +{ + FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; + ((CARD32 *)line)[offset >> 5] = (value & 0xffffff) | 0xff000000; +} + + +// Defined in fbcompose.c +extern FbCombineFunc fbCombineFuncU[]; +extern FbCombineFunc fbCombineFuncC[]; + +void +RootlessCompositeGeneral( + CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height) +{ + FbCompositeOperand src[4],msk[4],dst[4],*pmsk; + FbCompositeOperand *srcPict, *srcAlpha; + FbCompositeOperand *dstPict, *dstAlpha; + FbCompositeOperand *mskPict = 0, *mskAlpha = 0; + FbCombineFunc f; + int w; + + if (!fbBuildCompositeOperand (pSrc, src, xSrc, ySrc, TRUE, TRUE)) + return; + if (!fbBuildCompositeOperand (pDst, dst, xDst, yDst, FALSE, TRUE)) + return; + + // Use Rootless operands for on screen picture formats + if (pDst->format == PICT_x8r8g8b8) { + dst[0].store = RootlessStore_x8r8g8b8; + } + + if (pSrc->alphaMap) + { + srcPict = &src[1]; + srcAlpha = &src[2]; + } + else + { + srcPict = &src[0]; + srcAlpha = 0; + } + if (pDst->alphaMap) + { + dstPict = &dst[1]; + dstAlpha = &dst[2]; + } + else + { + dstPict = &dst[0]; + dstAlpha = 0; + } + f = fbCombineFuncU[op]; + if (pMask) + { + if (!fbBuildCompositeOperand (pMask, msk, xMask, yMask, TRUE, TRUE)) + return; + pmsk = msk; + if (pMask->componentAlpha) + f = fbCombineFuncC[op]; + if (pMask->alphaMap) + { + mskPict = &msk[1]; + mskAlpha = &msk[2]; + } + else + { + mskPict = &msk[0]; + mskAlpha = 0; + } + } + else + pmsk = 0; + while (height--) + { + w = width; + + while (w--) + { + (*f) (src, pmsk, dst); + (*src->over) (src); + (*dst->over) (dst); + if (pmsk) + (*pmsk->over) (pmsk); + } + (*src->down) (src); + (*dst->down) (dst); + if (pmsk) + (*pmsk->down) (pmsk); + } +} + +static int rootless_log_pict_formats = DEFAULT_LOG_FORMATS; + +static const char *op_name (int op) +{ + static const char *ops[] = { + "Clear", "Src", "Dst", "Over", "OverReverse", "In", "InReverse", + "Out", "OutReverse", "Atop", "AtopReverse", "Xor", "Add", + "Saturate", "Maximum", + + "DisjointClear", "DisjointSrc", "DisjointDst", "DisjointOver", + "DisjointOverReverse", "DisjointIn", "DisjointInReverse", + "DisjointOut", "DisjointOutReverse", "DisjointAtop", + "DisjointAtopReverse", "DisjointXor", "DisjointMaximum", + + "ConjointClear", "ConjointSrc", "ConjointDst", "ConjointOver", + "ConjointOverReverse", "ConjointIn", "ConjointInReverse", + "ConjointOut", "ConjointOutReverse", "ConjointAtop", + "ConjointAtopReverse", "ConjointXor", "ConjointMaximum", + }; + + if (op >= 0 && op < (int) (sizeof (ops) / sizeof (ops[0]))) + return ops[op]; + else + return "Unknown"; +} + +static const char *type_name (int type) +{ + switch (type) + { + case PICT_TYPE_OTHER: + return "Other"; + case PICT_TYPE_A: + return "A"; + case PICT_TYPE_ARGB: + return "ARGB"; + case PICT_TYPE_ABGR: + return "ABGR"; + case PICT_TYPE_COLOR: + return "Color"; + case PICT_TYPE_GRAY: + return "Gray"; + default: + return "Unknown"; + } +} + +static void log_format (int op, unsigned int src, + unsigned int dst, unsigned int mask) +{ + struct op { + int op; + unsigned int src, dst, mask; + }; + + static struct op *ops; + static int n_ops, allocated_ops; + + int i; + + for (i = 0; i < n_ops; i++) + { + if (ops[i].op == op && ops[i].src == src + && ops[i].dst == dst && ops[i].mask == mask) + { + return; + } + } + + if (n_ops == allocated_ops) + { + allocated_ops *= 2; + ops = realloc (ops, allocated_ops * sizeof (struct op)); + } + + ops[n_ops].op = op; + ops[n_ops].src = src; + ops[n_ops].dst = dst; + ops[n_ops].mask = mask; + n_ops++; + + fprintf (stderr, + "op: %s src (%dbpp %s %04x) dst (%dbpp %s %04x) mask (%dbpp %s %04x)\n", + op_name (op), PICT_FORMAT_BPP (src), + type_name (PICT_FORMAT_TYPE (src)), + src & 0xffff, PICT_FORMAT_BPP (dst), + type_name (PICT_FORMAT_TYPE (dst)), + dst & 0xffff, PICT_FORMAT_BPP (mask), + type_name (PICT_FORMAT_TYPE (mask)), + mask & 0xffff); +} + +void +RootlessComposite( + CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height) +{ + RegionRec region; + int n; + BoxPtr pbox; + CompositeFunc func; + Bool srcRepeat = pSrc->repeat; + Bool maskRepeat = FALSE; + Bool srcAlphaMap = pSrc->alphaMap != 0; + Bool maskAlphaMap = FALSE; + Bool dstAlphaMap = pDst->alphaMap != 0; + int x_msk, y_msk, x_src, y_src, x_dst, y_dst; + int w, h, w_this, h_this; + int dstDepth = pDst->pDrawable->depth; + + xDst += pDst->pDrawable->x; + yDst += pDst->pDrawable->y; + xSrc += pSrc->pDrawable->x; + ySrc += pSrc->pDrawable->y; + if (pMask) + { + xMask += pMask->pDrawable->x; + yMask += pMask->pDrawable->y; + maskRepeat = pMask->repeat; + maskAlphaMap = pMask->alphaMap != 0; + } + + if (rootless_log_pict_formats) + { + log_format (op, pSrc->format, pDst->format, + pMask != 0 ? pMask->format : 0); + } + + if (!miComputeCompositeRegion (®ion, + pSrc, + pMask, + pDst, + xSrc, + ySrc, + xMask, + yMask, + xDst, + yDst, + width, + height)) + return; + + if (pDst->pDrawable->type == DRAWABLE_WINDOW + && pDst->pDrawable->depth == 24 + && pDst->pDrawable->bitsPerPixel == 32) + { + /* fbpict code sets bits above depth to zero. We don't want that! */ + + pDst->pDrawable->depth = 32; + } + + func = RootlessCompositeGeneral; + + if (!maskAlphaMap && !srcAlphaMap && !dstAlphaMap) + switch (op) { + case PictOpOver: + if (pMask) + { + if (srcRepeat && + pSrc->pDrawable->width == 1 && + pSrc->pDrawable->height == 1) + { + srcRepeat = FALSE; + if (PICT_FORMAT_COLOR(pSrc->format)) { + switch (pMask->format) { + case PICT_a8: + switch (pDst->format) { + case PICT_r5g6b5: + case PICT_b5g6r5: + func = fbCompositeSolidMask_nx8x0565; + break; + case PICT_r8g8b8: + case PICT_b8g8r8: + func = fbCompositeSolidMask_nx8x0888; + break; + case PICT_a8r8g8b8: + case PICT_x8r8g8b8: + case PICT_a8b8g8r8: + case PICT_x8b8g8r8: + func = fbCompositeSolidMask_nx8x8888; + break; + } + break; + case PICT_a8r8g8b8: + if (pMask->componentAlpha) { + switch (pDst->format) { + case PICT_a8r8g8b8: + case PICT_x8r8g8b8: + func = fbCompositeSolidMask_nx8888x8888C; + break; + case PICT_r5g6b5: + func = fbCompositeSolidMask_nx8888x0565C; + break; + } + } + break; + case PICT_a8b8g8r8: + if (pMask->componentAlpha) { + switch (pDst->format) { + case PICT_a8b8g8r8: + case PICT_x8b8g8r8: + func = fbCompositeSolidMask_nx8888x8888C; + break; + case PICT_b5g6r5: + func = fbCompositeSolidMask_nx8888x0565C; + break; + } + } + break; + case PICT_a1: + switch (pDst->format) { + case PICT_r5g6b5: + case PICT_b5g6r5: + case PICT_r8g8b8: + case PICT_b8g8r8: + case PICT_a8r8g8b8: + case PICT_x8r8g8b8: + case PICT_a8b8g8r8: + case PICT_x8b8g8r8: + func = fbCompositeSolidMask_nx1xn; + break; + } + } + } + } + } + else + { + switch (pSrc->format) { + case PICT_a8r8g8b8: + case PICT_x8r8g8b8: + switch (pDst->format) { + case PICT_a8r8g8b8: + case PICT_x8r8g8b8: + func = fbCompositeSrc_8888x8888; + break; + case PICT_r8g8b8: + func = fbCompositeSrc_8888x0888; + break; + case PICT_r5g6b5: + func = fbCompositeSrc_8888x0565; + break; + } + break; + case PICT_a8b8g8r8: + case PICT_x8b8g8r8: + switch (pDst->format) { + case PICT_a8b8g8r8: + case PICT_x8b8g8r8: + func = fbCompositeSrc_8888x8888; + break; + case PICT_b8g8r8: + func = fbCompositeSrc_8888x0888; + break; + case PICT_b5g6r5: + func = fbCompositeSrc_8888x0565; + break; + } + break; + case PICT_r5g6b5: + switch (pDst->format) { + case PICT_r5g6b5: + func = fbCompositeSrc_0565x0565; + break; + } + break; + case PICT_b5g6r5: + switch (pDst->format) { + case PICT_b5g6r5: + func = fbCompositeSrc_0565x0565; + break; + } + break; + } + } + break; + case PictOpAdd: + if (pMask == 0) + { + switch (pSrc->format) { + case PICT_a8r8g8b8: + switch (pDst->format) { + case PICT_a8r8g8b8: + func = fbCompositeSrcAdd_8888x8888; + break; + } + break; + case PICT_a8b8g8r8: + switch (pDst->format) { + case PICT_a8b8g8r8: + func = fbCompositeSrcAdd_8888x8888; + break; + } + break; + case PICT_a8: + switch (pDst->format) { + case PICT_a8: + func = fbCompositeSrcAdd_8000x8000; + break; + } + break; + case PICT_a1: + switch (pDst->format) { + case PICT_a1: + func = fbCompositeSrcAdd_1000x1000; + break; + } + break; + } + } + break; + } + + n = REGION_NUM_RECTS (®ion); + pbox = REGION_RECTS (®ion); + while (n--) + { + h = pbox->y2 - pbox->y1; + y_src = pbox->y1 - yDst + ySrc; + y_msk = pbox->y1 - yDst + yMask; + y_dst = pbox->y1; + while (h) + { + h_this = h; + w = pbox->x2 - pbox->x1; + x_src = pbox->x1 - xDst + xSrc; + x_msk = pbox->x1 - xDst + xMask; + x_dst = pbox->x1; + if (maskRepeat) + { + y_msk = mod (y_msk, pMask->pDrawable->height); + if (h_this > pMask->pDrawable->height - y_msk) + h_this = pMask->pDrawable->height - y_msk; + } + if (srcRepeat) + { + y_src = mod (y_src, pSrc->pDrawable->height); + if (h_this > pSrc->pDrawable->height - y_src) + h_this = pSrc->pDrawable->height - y_src; + } + while (w) + { + w_this = w; + if (maskRepeat) + { + x_msk = mod (x_msk, pMask->pDrawable->width); + if (w_this > pMask->pDrawable->width - x_msk) + w_this = pMask->pDrawable->width - x_msk; + } + if (srcRepeat) + { + x_src = mod (x_src, pSrc->pDrawable->width); + if (w_this > pSrc->pDrawable->width - x_src) + w_this = pSrc->pDrawable->width - x_src; + } + (*func) (op, pSrc, pMask, pDst, + x_src, y_src, x_msk, y_msk, x_dst, y_dst, + w_this, h_this); + w -= w_this; + x_src += w_this; + x_msk += w_this; + x_dst += w_this; + } + h -= h_this; + y_src += h_this; + y_msk += h_this; + y_dst += h_this; + } + pbox++; + } + REGION_UNINIT (pDst->pDrawable->pScreen, ®ion); + + pDst->pDrawable->depth = dstDepth; +} + +#endif /* RENDER */ diff --git a/synfig-osx/launcher/rootless-screen.c b/synfig-osx/launcher/rootless-screen.c new file mode 100644 index 0000000..46fb916 --- /dev/null +++ b/synfig-osx/launcher/rootless-screen.c @@ -0,0 +1,794 @@ +/* + * Screen routines for Mac OS X rootless X server + * + * Greg Parker gparker@cs.stanford.edu + * + * February 2001 Created + * March 3, 2001 Restructured as generic rootless mode + */ + +/* Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. */ + +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessScreen.c,v 1.2 2002/04/03 00:06:32 torrey Exp $ */ + + +#include "mi.h" +#include "scrnintstr.h" +#include "gcstruct.h" +#include "pixmapstr.h" +#include "windowstr.h" +#include "propertyst.h" +#include "mivalidate.h" +#include "picturestr.h" +#include "os.h" +#include "servermd.h" +#include "colormapst.h" + +#include +#include +#include + +#include "rootless-common.h" +#include "rootless-window.h" + +/* In milcroseconds */ +#define REDISPLAY_DELAY 10 +#define REDISPLAY_MAX_DELAY 60 + +extern int RootlessMiValidateTree(WindowPtr pRoot, + WindowPtr pChild, VTKind kind); +extern Bool RootlessCreateGC(GCPtr pGC); + +int rootlessGCPrivateIndex = -1; +int rootlessScreenPrivateIndex = -1; +int rootlessWindowPrivateIndex = -1; + +void +RootlessUpdateScreenPixmap (ScreenPtr pScreen) +{ + RootlessScreenRec *s = SCREENREC(pScreen); + PixmapPtr pPix; + unsigned int rowbytes; + + pPix = (*pScreen->GetScreenPixmap) (pScreen); + if (pPix == NULL) + { + pPix = (*pScreen->CreatePixmap) (pScreen, 0, 0, pScreen->rootDepth); + (*pScreen->SetScreenPixmap) (pPix); + } + + rowbytes = PixmapBytePad (pScreen->width, pScreen->rootDepth); + + if (s->pixmap_data_size < rowbytes) + { + if (s->pixmap_data != NULL) + xfree (s->pixmap_data); + + s->pixmap_data_size = rowbytes; + s->pixmap_data = xalloc (s->pixmap_data_size); + if (s->pixmap_data == NULL) + return; + + xp_fill_bytes (s->pixmap_data_size, 1, ~0, + s->pixmap_data, s->pixmap_data_size); + + pScreen->ModifyPixmapHeader (pPix, pScreen->width, pScreen->height, + pScreen->rootDepth, + BitsPerPixel (pScreen->rootDepth), + 0, s->pixmap_data); + /* ModifyPixmapHeader ignores zero arguments, so install rowbytes + by hand. */ + pPix->devKind = 0; + } +} + +static Bool +RootlessCreateScreenResources (ScreenPtr pScreen) +{ + Bool ret = TRUE; + + SCREEN_UNWRAP (pScreen, CreateScreenResources); + + if (pScreen->CreateScreenResources != NULL) + ret = (*pScreen->CreateScreenResources) (pScreen); + + SCREEN_WRAP(pScreen, CreateScreenResources); + + if (!ret) + return ret; + + /* miCreateScreenResources doesn't like our null framebuffer pointer, + it leaves the screen pixmap with an uninitialized data pointer. So + we gave it depth=0,bits=0, which says, leave it the fsck alone. + So we have some work to do since we need the screen pixmap to be + valid (e.g. CopyArea from the root window) */ + + RootlessUpdateScreenPixmap (pScreen); + + return ret; +} + +static Bool +RootlessCloseScreen(int i, ScreenPtr pScreen) +{ + RootlessScreenRec *s; + + s = SCREENREC(pScreen); + + /* FIXME: unwrap everything that was wrapped? */ + pScreen->CloseScreen = s->CloseScreen; + + if (s->pixmap_data != NULL) + { + xfree (s->pixmap_data); + s->pixmap_data = NULL; + s->pixmap_data_size = 0; + } + + xfree(s); + return pScreen->CloseScreen(i, pScreen); +} + +static void +RootlessGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h, + unsigned int format, unsigned long planeMask, char *pdstLine) +{ + ScreenPtr pScreen = pDrawable->pScreen; + SCREEN_UNWRAP(pScreen, GetImage); + + if (pDrawable->type == DRAWABLE_WINDOW) + { + int x0, y0, x1, y1; + + RootlessWindowRec *winRec; + + /* Many apps use GetImage to sync with the visible frame buffer + FIXME: entire screen or just window or all screens? */ + RootlessRedisplayScreen (pScreen); + + /* RedisplayScreen stops drawing, so we need to start it again */ + RootlessStartDrawing ((WindowPtr) pDrawable); + + /* Check that we have some place to read from. */ + winRec = WINREC (TopLevelParent ((WindowPtr) pDrawable)); + if (winRec == NULL) + goto out; + + /* Clip to top-level window bounds. */ + + x0 = pDrawable->x + sx; + y0 = pDrawable->y + sy; + x1 = x0 + w; + y1 = y0 + h; + + x0 = MAX (x0, winRec->x); + y0 = MAX (y0, winRec->y); + x1 = MIN (x1, winRec->x + (int) winRec->width); + y1 = MIN (y1, winRec->y + (int) winRec->height); + + /* FIXME: if clipped we need to adjust the data returned from + fbGetImage (), since it calculates the destination stride + from the passed in width.. */ + + sx = x0 - pDrawable->x; + sy = y0 - pDrawable->y; + w = x1 - x0; + h = y1 - y0; + + if (w <= 0 || h <= 0) + goto out; + } + + pScreen->GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); + +out: + SCREEN_WRAP(pScreen, GetImage); +} + +/* + * RootlessSourceValidate + * CopyArea and CopyPlane use a GC tied to the destination drawable. + * StartDrawing/StopDrawing wrappers won't be called if source is + * a visible window but the destination isn't. So, we call StartDrawing + * here and leave StopDrawing for the block handler. + */ +static void +RootlessSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h) +{ + SCREEN_UNWRAP(pDrawable->pScreen, SourceValidate); + if (pDrawable->type == DRAWABLE_WINDOW) { + WindowPtr pWin = (WindowPtr)pDrawable; + RootlessStartDrawing(pWin); + } + if (pDrawable->pScreen->SourceValidate) { + pDrawable->pScreen->SourceValidate(pDrawable, x, y, w, h); + } + SCREEN_WRAP(pDrawable->pScreen, SourceValidate); +} + +#ifdef RENDER + +static void +rootlessComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, + INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, + INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + WindowPtr srcWin, dstWin, maskWin = NULL; + + if (pMask) { + maskWin = (pMask->pDrawable->type == DRAWABLE_WINDOW) ? + (WindowPtr)pMask->pDrawable : NULL; + } + srcWin = (pSrc->pDrawable->type == DRAWABLE_WINDOW) ? + (WindowPtr)pSrc->pDrawable : NULL; + dstWin = (pDst->pDrawable->type == DRAWABLE_WINDOW) ? + (WindowPtr)pDst->pDrawable : NULL; + + ps->Composite = SCREENREC(pScreen)->Composite; + + if (srcWin && IsFramedWindow(srcWin)) RootlessStartDrawing(srcWin); + if (maskWin && IsFramedWindow(maskWin)) RootlessStartDrawing(maskWin); + if (dstWin && IsFramedWindow(dstWin)) RootlessStartDrawing(dstWin); + + ps->Composite(op, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, + xDst, yDst, width, height); + + if (dstWin && IsFramedWindow(dstWin)) { + RootlessDamageRect(dstWin, xDst, yDst, width, height); + } + + ps->Composite = RootlessComposite; +} + +static void +RootlessGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, + int nlist, GlyphListPtr list, GlyphPtr *glyphs) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + int x, y; + int n; + GlyphPtr glyph; + WindowPtr srcWin, dstWin; + + srcWin = (pSrc->pDrawable->type == DRAWABLE_WINDOW) ? + (WindowPtr)pSrc->pDrawable : NULL; + dstWin = (pDst->pDrawable->type == DRAWABLE_WINDOW) ? + (WindowPtr)pDst->pDrawable : NULL; + + if (srcWin && IsFramedWindow(srcWin)) RootlessStartDrawing(srcWin); + if (dstWin && IsFramedWindow(dstWin)) RootlessStartDrawing(dstWin); + + ps->Glyphs = SCREENREC(pScreen)->Glyphs; + ps->Glyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); + ps->Glyphs = RootlessGlyphs; + + if (dstWin && IsFramedWindow(dstWin)) + { + x = xSrc; + y = ySrc; + + while (nlist--) + { + /* Originally this code called DamageRect for the bounding + box of each glyph. But that was causing way too much + time to be spent in CGSBoundingRegionAddRect. So compute + the union of all glyphs in a list and damage that. It + shouldn't be very different. */ + + x += list->xOff; + y += list->yOff; + n = list->len; + + if (n > 0) + { + BoxRec box; + + glyph = *glyphs++; + + box.x1 = x - glyph->info.x; + box.y1 = y - glyph->info.y; + box.x2 = box.x1 + glyph->info.width; + box.y2 = box.y2 + glyph->info.height; + + x += glyph->info.xOff; + y += glyph->info.yOff; + + while (--n > 0) + { + short x1, y1, x2, y2; + + glyph = *glyphs++; + + x1 = x - glyph->info.x; + y1 = y - glyph->info.y; + x2 = x1 + glyph->info.width; + y2 = y1 + glyph->info.height; + + box.x1 = MAX (box.x1, x1); + box.y1 = MAX (box.y1, y1); + box.x2 = MAX (box.x2, x2); + box.y2 = MAX (box.y2, y2); + + x += glyph->info.xOff; + y += glyph->info.yOff; + } + + RootlessDamageBox (dstWin, &box); + } + + list++; + } + } +} + +#endif /* RENDER */ + +/* ValidateTree is modified in two ways: + - top-level windows don't clip each other + - windows aren't clipped against root. + These only matter when validating from the root. */ +static int +RootlessValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) +{ + int result; + RegionRec saveRoot; + ScreenPtr pScreen = pParent->drawable.pScreen; + + SCREEN_UNWRAP(pScreen, ValidateTree); + RL_DEBUG_MSG("VALIDATETREE start "); + + /* Use our custom version to validate from root */ + if (IsRoot(pParent)) { + RL_DEBUG_MSG("custom "); + result = RootlessMiValidateTree(pParent, pChild, kind); + } else { + HUGE_ROOT(pParent); + result = pScreen->ValidateTree(pParent, pChild, kind); + NORMAL_ROOT(pParent); + } + + SCREEN_WRAP(pScreen, ValidateTree); + RL_DEBUG_MSG("VALIDATETREE end\n"); + + return result; +} + +/* MarkOverlappedWindows is modified to ignore overlapping top-level + windows. */ +static Bool +RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, + WindowPtr *ppLayerWin) +{ + RegionRec saveRoot; + Bool result; + ScreenPtr pScreen = pWin->drawable.pScreen; + SCREEN_UNWRAP(pScreen, MarkOverlappedWindows); + RL_DEBUG_MSG("MARKOVERLAPPEDWINDOWS start "); + + HUGE_ROOT(pWin); + if (IsRoot(pWin)) { + /* root - mark nothing */ + RL_DEBUG_MSG("is root not marking "); + result = FALSE; + } + else if (! IsTopLevel(pWin)) { + /* not top-level window - mark normally */ + result = pScreen->MarkOverlappedWindows(pWin, pFirst, ppLayerWin); + } + else { + /* top-level window - mark children ONLY - NO overlaps with sibs (?) + This code copied from miMarkOverlappedWindows() */ + + register WindowPtr pChild; + Bool anyMarked = FALSE; + void (* MarkWindow)() = pScreen->MarkWindow; + + RL_DEBUG_MSG("is top level! "); + /* single layered systems are easy */ + if (ppLayerWin) *ppLayerWin = pWin; + + if (pWin == pFirst) { + /* Blindly mark pWin and all of its inferiors. This is a slight + * overkill if there are mapped windows that outside pWin's border, + * but it's better than wasting time on RectIn checks. + */ + pChild = pWin; + while (1) { + if (pChild->viewable) { + if (REGION_BROKEN (pScreen, &pChild->winSize)) + SetWinSize (pChild); + if (REGION_BROKEN (pScreen, &pChild->borderSize)) + SetBorderSize (pChild); + (* MarkWindow)(pChild); + if (pChild->firstChild) { + pChild = pChild->firstChild; + continue; + } + } + while (!pChild->nextSib && (pChild != pWin)) + pChild = pChild->parent; + if (pChild == pWin) + break; + pChild = pChild->nextSib; + } + anyMarked = TRUE; + pFirst = pFirst->nextSib; + } + if (anyMarked) + (* MarkWindow)(pWin->parent); + result = anyMarked; + } + NORMAL_ROOT(pWin); + SCREEN_WRAP(pScreen, MarkOverlappedWindows); + RL_DEBUG_MSG("MARKOVERLAPPEDWINDOWS end\n"); + return result; +} + +static void +expose_1 (WindowPtr pWin) +{ + WindowPtr pChild; + + if (!pWin->realized) + return; + + (*pWin->drawable.pScreen->PaintWindowBackground) (pWin, &pWin->borderClip, + PW_BACKGROUND); + + /* FIXME: comments in windowstr.h indicate that borderClip doesn't + include subwindow visibility. But I'm not so sure.. so we may + be exposing too much.. */ + + miSendExposures (pWin, &pWin->borderClip, + pWin->drawable.x, pWin->drawable.y); + + for (pChild = pWin->firstChild; pChild != NULL; pChild = pChild->nextSib) + expose_1 (pChild); +} + +void +RootlessScreenExpose (ScreenPtr pScreen) +{ + expose_1 (WindowTable[pScreen->myNum]); +} + +ColormapPtr +RootlessGetColormap (ScreenPtr pScreen) +{ + RootlessScreenRec *s = SCREENREC (pScreen); + + return s->colormap; +} + +static void +RootlessInstallColormap (ColormapPtr pMap) +{ + ScreenPtr pScreen = pMap->pScreen; + RootlessScreenRec *s = SCREENREC (pScreen); + + SCREEN_UNWRAP(pScreen, InstallColormap); + + if (s->colormap != pMap) + { + s->colormap = pMap; + s->colormap_changed = TRUE; + RootlessQueueRedisplay (pScreen); + } + + pScreen->InstallColormap (pMap); + + SCREEN_WRAP (pScreen, InstallColormap); +} + +static void +RootlessUninstallColormap (ColormapPtr pMap) +{ + ScreenPtr pScreen = pMap->pScreen; + RootlessScreenRec *s = SCREENREC (pScreen); + + SCREEN_UNWRAP(pScreen, UninstallColormap); + + if (s->colormap == pMap) + s->colormap = NULL; + + pScreen->UninstallColormap (pMap); + + SCREEN_WRAP(pScreen, UninstallColormap); +} + +static void +RootlessStoreColors (ColormapPtr pMap, int ndef, xColorItem *pdef) +{ + ScreenPtr pScreen = pMap->pScreen; + RootlessScreenRec *s = SCREENREC (pScreen); + + SCREEN_UNWRAP(pScreen, StoreColors); + + if (s->colormap == pMap && ndef > 0) + { + s->colormap_changed = TRUE; + RootlessQueueRedisplay (pScreen); + } + + pScreen->StoreColors (pMap, ndef, pdef); + + SCREEN_WRAP(pScreen, StoreColors); +} + +static CARD32 +redisplay_callback (OsTimerPtr timer, CARD32 time, void *arg) +{ + RootlessScreenRec *screenRec = arg; + + if (!screenRec->redisplay_queued) + { + /* No update needed. Stop the timer. */ + + screenRec->redisplay_timer_set = FALSE; + return 0; + } + + screenRec->redisplay_queued = FALSE; + + /* Mark that we should redisplay before waiting for I/O next time */ + screenRec->redisplay_expired = TRUE; + + /* Reinstall the timer immediately, so we get as close to our + redisplay interval as possible. */ + + return REDISPLAY_DELAY; +} + +void +RootlessQueueRedisplay (ScreenPtr pScreen) +{ + RootlessScreenRec *screenRec = SCREENREC (pScreen); + + screenRec->redisplay_queued = TRUE; + + if (screenRec->redisplay_timer_set) + return; + + screenRec->redisplay_timer = TimerSet (screenRec->redisplay_timer, + 0, REDISPLAY_DELAY, + redisplay_callback, screenRec); + screenRec->redisplay_timer_set = TRUE; +} + +/* Call this function when it might be a good idea to flush updates. + Note that it will unlock window buffers! */ +Bool +RootlessMayRedisplay (ScreenPtr pScreen) +{ + RootlessScreenRec *screenRec = SCREENREC (pScreen); + + if (!screenRec->redisplay_queued) + return FALSE; + + /* If the timer has fired, or it's been long enough since the last + update, redisplay everything now. */ + + if (!screenRec->redisplay_expired) + { + CARD32 now = GetTimeInMillis (); + + if (screenRec->last_redisplay + REDISPLAY_MAX_DELAY >= now) + return FALSE; + } + + if (screenRec->redisplay_timer_set) + { + TimerCancel (screenRec->redisplay_timer); + screenRec->redisplay_timer_set = FALSE; + } + + RootlessRedisplayScreen (screenRec->pScreen); + screenRec->redisplay_expired = FALSE; + + return TRUE; +} + +/* Flush drawing before blocking on select(). */ +static void +RootlessBlockHandler(pointer pbdata, OSTimePtr pTimeout, pointer pReadmask) +{ + ScreenPtr pScreen = pbdata; + RootlessScreenRec *screenRec = SCREENREC (pScreen); + + if (screenRec->redisplay_expired) + { + screenRec->redisplay_expired = FALSE; + + if (screenRec->colormap_changed) + { + RootlessFlushScreenColormaps (screenRec->pScreen); + screenRec->colormap_changed = FALSE; + } + + RootlessRedisplayScreen (screenRec->pScreen); + } +} + +static void +RootlessWakeupHandler(pointer data, int i, pointer LastSelectMask) +{ +} + +static Bool +RootlessAllocatePrivates(ScreenPtr pScreen) +{ + RootlessScreenRec *s; + static unsigned int rootlessGeneration = -1; + + if (rootlessGeneration != serverGeneration) { + rootlessScreenPrivateIndex = AllocateScreenPrivateIndex(); + if (rootlessScreenPrivateIndex == -1) return FALSE; + rootlessGCPrivateIndex = AllocateGCPrivateIndex(); + if (rootlessGCPrivateIndex == -1) return FALSE; + rootlessWindowPrivateIndex = AllocateWindowPrivateIndex(); + if (rootlessWindowPrivateIndex == -1) return FALSE; + rootlessGeneration = serverGeneration; + } + + /* no allocation needed for screen privates */ + if (!AllocateGCPrivate(pScreen, rootlessGCPrivateIndex, + sizeof(RootlessGCRec))) + return FALSE; + if (!AllocateWindowPrivate(pScreen, rootlessWindowPrivateIndex, 0)) + return FALSE; + + s = xalloc(sizeof(RootlessScreenRec)); + if (! s) return FALSE; + SCREENREC(pScreen) = s; + + s->pixmap_data = NULL; + s->pixmap_data_size = 0; + + s->redisplay_timer = NULL; + s->redisplay_timer_set = FALSE; + + return TRUE; +} + +static void +RootlessWrap(ScreenPtr pScreen) +{ + RootlessScreenRec *s = (RootlessScreenRec*) + pScreen->devPrivates[rootlessScreenPrivateIndex].ptr; + +#define WRAP(a) \ + if (pScreen->a) { \ + s->a = pScreen->a; \ + } else { \ + RL_DEBUG_MSG("null screen fn " #a "\n"); \ + s->a = NULL; \ + } \ + pScreen->a = Rootless##a + + WRAP(CreateScreenResources); + WRAP(CloseScreen); + WRAP(CreateGC); + WRAP(PaintWindowBackground); + WRAP(PaintWindowBorder); + WRAP(CopyWindow); + WRAP(GetImage); + WRAP(SourceValidate); + WRAP(CreateWindow); + WRAP(DestroyWindow); + WRAP(RealizeWindow); + WRAP(UnrealizeWindow); + WRAP(ReparentWindow); + WRAP(MoveWindow); + WRAP(PositionWindow); + WRAP(ResizeWindow); + WRAP(RestackWindow); + WRAP(ChangeBorderWidth); + WRAP(MarkOverlappedWindows); + WRAP(ValidateTree); + WRAP(ChangeWindowAttributes); + WRAP(InstallColormap); + WRAP(UninstallColormap); + WRAP(StoreColors); + +#ifdef SHAPE + WRAP(SetShape); +#endif + +#ifdef RENDER + { + /* Composite and Glyphs don't use normal screen wrapping */ + PictureScreenPtr ps = GetPictureScreen(pScreen); + s->Composite = ps->Composite; + ps->Composite = rootlessComposite; + s->Glyphs = ps->Glyphs; + ps->Glyphs = RootlessGlyphs; + } +#endif + + // WRAP(ClearToBackground); fixme put this back? useful for shaped wins? + // WRAP(RestoreAreas); fixme put this back? + +#undef WRAP +} + +Bool +RootlessSetupScreen(int index, ScreenPtr pScreen) +{ + RootlessScreenRec *s; + + /* Add replacements for fb screen functions */ + pScreen->PaintWindowBackground = RootlessPaintWindow; + pScreen->PaintWindowBorder = RootlessPaintWindow; + +#ifdef RENDER + { + PictureScreenPtr ps = GetPictureScreen(pScreen); + ps->Composite = RootlessComposite; + } +#endif + + if (!RootlessAllocatePrivates(pScreen)) + return FALSE; + + s = ((RootlessScreenRec*) + pScreen->devPrivates[rootlessScreenPrivateIndex].ptr); + + s->pScreen = pScreen; + RootlessWrap(pScreen); + + if (!RegisterBlockAndWakeupHandlers (RootlessBlockHandler, + RootlessWakeupHandler, + (pointer) pScreen)) + { + return FALSE; + } + + return TRUE; +} + +void +RootlessUpdateRooted (Bool state) +{ + int i; + + if (!state) + { + for (i = 0; i < screenInfo.numScreens; i++) + RootlessDisableRoot (screenInfo.screens[i]); + } + else + { + for (i = 0; i < screenInfo.numScreens; i++) + RootlessEnableRoot (screenInfo.screens[i]); + } +} diff --git a/synfig-osx/launcher/rootless-val-tree.c b/synfig-osx/launcher/rootless-val-tree.c new file mode 100644 index 0000000..c8e5ad0 --- /dev/null +++ b/synfig-osx/launcher/rootless-val-tree.c @@ -0,0 +1,640 @@ +/* + * Calculate window clip lists for rootless mode + * + * This file is very closely based on mivaltree.c. + */ + /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessValTree.c,v 1.2 2002/06/18 19:43:04 torrey Exp $ */ + +/* + * mivaltree.c -- + * Functions for recalculating window clip lists. Main function + * is miValidateTree. + * + +Copyright 1987, 1988, 1989, 1998 The Open Group + +All Rights Reserved. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + + * + * Copyright 1987, 1988, 1989 by + * Digital Equipment Corporation, Maynard, Massachusetts, + * + * All Rights Reserved + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation, and that the name of Digital not be + * used in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. + * + * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR + * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + * + ******************************************************************/ + +/* The panoramix components contained the following notice */ +/**************************************************************** +* * +* Copyright (c) Digital Equipment Corporation, 1991, 1997 * +* * +* All Rights Reserved. Unpublished rights reserved under * +* the copyright laws of the United States. * +* * +* The software contained on this media is proprietary to * +* and embodies the confidential technology of Digital * +* Equipment Corporation. Possession, use, duplication or * +* dissemination of the software and media is authorized only * +* pursuant to a valid written license from Digital Equipment * +* Corporation. * +* * +* RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure * +* by the U.S. Government is subject to restrictions as set * +* forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, * +* or in FAR 52.227-19, as applicable. * +* * +*****************************************************************/ + + /* + * Aug '86: Susan Angebranndt -- original code + * July '87: Adam de Boor -- substantially modified and commented + * Summer '89: Joel McCormack -- so fast you wouldn't believe it possible. + * In particular, much improved code for window mapping and + * circulating. + * Bob Scheifler -- avoid miComputeClips for unmapped windows, + * valdata changes + */ +#include "X.h" +#include "scrnintstr.h" +#include "validate.h" +#include "windowstr.h" +#include "mi.h" +#include "regionstr.h" +#include "mivalidate.h" + +#include "globals.h" + +#ifdef SHAPE +/* + * Compute the visibility of a shaped window + */ +int +RootlessShapedWindowIn (pScreen, universe, bounding, rect, x, y) + ScreenPtr pScreen; + RegionPtr universe, bounding; + BoxPtr rect; + register int x, y; +{ + BoxRec box; + register BoxPtr boundBox; + int nbox; + Bool someIn, someOut; + register int t, x1, y1, x2, y2; + + nbox = REGION_NUM_RECTS (bounding); + boundBox = REGION_RECTS (bounding); + someIn = someOut = FALSE; + x1 = rect->x1; + y1 = rect->y1; + x2 = rect->x2; + y2 = rect->y2; + while (nbox--) + { + if ((t = boundBox->x1 + x) < x1) + t = x1; + box.x1 = t; + if ((t = boundBox->y1 + y) < y1) + t = y1; + box.y1 = t; + if ((t = boundBox->x2 + x) > x2) + t = x2; + box.x2 = t; + if ((t = boundBox->y2 + y) > y2) + t = y2; + box.y2 = t; + if (box.x1 > box.x2) + box.x2 = box.x1; + if (box.y1 > box.y2) + box.y2 = box.y1; + switch (RECT_IN_REGION(pScreen, universe, &box)) + { + case rgnIN: + if (someOut) + return rgnPART; + someIn = TRUE; + break; + case rgnOUT: + if (someIn) + return rgnPART; + someOut = TRUE; + break; + default: + return rgnPART; + } + boundBox++; + } + if (someIn) + return rgnIN; + return rgnOUT; +} +#endif + +#define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \ + HasBorder(w) && \ + (w)->backgroundState == ParentRelative) + + +/* + *----------------------------------------------------------------------- + * RootlessComputeClips -- + * Recompute the clipList, borderClip, exposed and borderExposed + * regions for pParent and its children. Only viewable windows are + * taken into account. + * + * Results: + * None. + * + * Side Effects: + * clipList, borderClip, exposed and borderExposed are altered. + * A VisibilityNotify event may be generated on the parent window. + * + *----------------------------------------------------------------------- + */ +static void +RootlessComputeClips (pParent, pScreen, universe, kind, exposed) + register WindowPtr pParent; + register ScreenPtr pScreen; + register RegionPtr universe; + VTKind kind; + RegionPtr exposed; /* for intermediate calculations */ +{ + int dx, + dy; + RegionRec childUniverse; + register WindowPtr pChild; + int oldVis, newVis; + BoxRec borderSize; + RegionRec childUnion; + Bool overlap; + RegionPtr borderVisible; + Bool resized; + /* + * Figure out the new visibility of this window. + * The extent of the universe should be the same as the extent of + * the borderSize region. If the window is unobscured, this rectangle + * will be completely inside the universe (the universe will cover it + * completely). If the window is completely obscured, none of the + * universe will cover the rectangle. + */ + borderSize.x1 = pParent->drawable.x - wBorderWidth(pParent); + borderSize.y1 = pParent->drawable.y - wBorderWidth(pParent); + dx = (int) pParent->drawable.x + (int) pParent->drawable.width + wBorderWidth(pParent); + if (dx > 32767) + dx = 32767; + borderSize.x2 = dx; + dy = (int) pParent->drawable.y + (int) pParent->drawable.height + wBorderWidth(pParent); + if (dy > 32767) + dy = 32767; + borderSize.y2 = dy; + + oldVis = pParent->visibility; + switch (RECT_IN_REGION( pScreen, universe, &borderSize)) + { + case rgnIN: + newVis = VisibilityUnobscured; + break; + case rgnPART: + newVis = VisibilityPartiallyObscured; +#ifdef SHAPE + { + RegionPtr pBounding; + + if ((pBounding = wBoundingShape (pParent))) + { + switch (RootlessShapedWindowIn (pScreen, universe, + pBounding, &borderSize, + pParent->drawable.x, + pParent->drawable.y)) + { + case rgnIN: + newVis = VisibilityUnobscured; + break; + case rgnOUT: + newVis = VisibilityFullyObscured; + break; + } + } + } +#endif + break; + default: + newVis = VisibilityFullyObscured; + break; + } + + pParent->visibility = newVis; + if (oldVis != newVis && + ((pParent->eventMask | wOtherEventMasks(pParent)) & VisibilityChangeMask)) + SendVisibilityNotify(pParent); + + dx = pParent->drawable.x - pParent->valdata->before.oldAbsCorner.x; + dy = pParent->drawable.y - pParent->valdata->before.oldAbsCorner.y; + + /* + * avoid computations when dealing with simple operations + */ + + switch (kind) { + case VTMap: + case VTStack: + case VTUnmap: + break; + case VTMove: + if ((oldVis == newVis) && + ((oldVis == VisibilityFullyObscured) || + (oldVis == VisibilityUnobscured))) + { + pChild = pParent; + while (1) + { + if (pChild->viewable) + { + if (pChild->visibility != VisibilityFullyObscured) + { + REGION_TRANSLATE( pScreen, &pChild->borderClip, + dx, dy); + REGION_TRANSLATE( pScreen, &pChild->clipList, + dx, dy); + pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER; + if (pScreen->ClipNotify) + (* pScreen->ClipNotify) (pChild, dx, dy); + + } + if (pChild->valdata) + { + REGION_INIT(pScreen, + &pChild->valdata->after.borderExposed, + NullBox, 0); + if (HasParentRelativeBorder(pChild)) + { + REGION_SUBTRACT(pScreen, + &pChild->valdata->after.borderExposed, + &pChild->borderClip, + &pChild->winSize); + } + REGION_INIT( pScreen, &pChild->valdata->after.exposed, + NullBox, 0); + } + if (pChild->firstChild) + { + pChild = pChild->firstChild; + continue; + } + } + while (!pChild->nextSib && (pChild != pParent)) + pChild = pChild->parent; + if (pChild == pParent) + break; + pChild = pChild->nextSib; + } + return; + } + /* fall through */ + default: + /* + * To calculate exposures correctly, we have to translate the old + * borderClip and clipList regions to the window's new location so there + * is a correspondence between pieces of the new and old clipping regions. + */ + if (dx || dy) + { + /* + * We translate the old clipList because that will be exposed or copied + * if gravity is right. + */ + REGION_TRANSLATE( pScreen, &pParent->borderClip, dx, dy); + REGION_TRANSLATE( pScreen, &pParent->clipList, dx, dy); + } + break; + case VTBroken: + REGION_EMPTY (pScreen, &pParent->borderClip); + REGION_EMPTY (pScreen, &pParent->clipList); + break; + } + + borderVisible = pParent->valdata->before.borderVisible; + resized = pParent->valdata->before.resized; + REGION_INIT( pScreen, &pParent->valdata->after.borderExposed, NullBox, 0); + REGION_INIT( pScreen, &pParent->valdata->after.exposed, NullBox, 0); + + /* + * Since the borderClip must not be clipped by the children, we do + * the border exposure first... + * + * 'universe' is the window's borderClip. To figure the exposures, remove + * the area that used to be exposed from the new. + * This leaves a region of pieces that weren't exposed before. + */ + + if (HasBorder (pParent)) + { + if (borderVisible) + { + /* + * when the border changes shape, the old visible portions + * of the border will be saved by DIX in borderVisible -- + * use that region and destroy it + */ + REGION_SUBTRACT( pScreen, exposed, universe, borderVisible); + REGION_DESTROY( pScreen, borderVisible); + } + else + { + REGION_SUBTRACT( pScreen, exposed, universe, &pParent->borderClip); + } + if (HasParentRelativeBorder(pParent) && (dx || dy)) { + REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed, + universe, + &pParent->winSize); + } else { + REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed, + exposed, &pParent->winSize); + } + + REGION_COPY( pScreen, &pParent->borderClip, universe); + + /* + * To get the right clipList for the parent, and to make doubly sure + * that no child overlaps the parent's border, we remove the parent's + * border from the universe before proceeding. + */ + + REGION_INTERSECT( pScreen, universe, universe, &pParent->winSize); + } + else + REGION_COPY( pScreen, &pParent->borderClip, universe); + + if ((pChild = pParent->firstChild) && pParent->mapped) + { + REGION_INIT(pScreen, &childUniverse, NullBox, 0); + REGION_INIT(pScreen, &childUnion, NullBox, 0); + if ((pChild->drawable.y < pParent->lastChild->drawable.y) || + ((pChild->drawable.y == pParent->lastChild->drawable.y) && + (pChild->drawable.x < pParent->lastChild->drawable.x))) + { + for (; pChild; pChild = pChild->nextSib) + { + if (pChild->viewable) + REGION_APPEND( pScreen, &childUnion, &pChild->borderSize); + } + } + else + { + for (pChild = pParent->lastChild; pChild; pChild = pChild->prevSib) + { + if (pChild->viewable) + REGION_APPEND( pScreen, &childUnion, &pChild->borderSize); + } + } + REGION_VALIDATE( pScreen, &childUnion, &overlap); + + for (pChild = pParent->firstChild; + pChild; + pChild = pChild->nextSib) + { + if (pChild->viewable) { + /* + * If the child is viewable, we want to remove its extents + * from the current universe, but we only re-clip it if + * it's been marked. + */ + if (pChild->valdata) { + /* + * Figure out the new universe from the child's + * perspective and recurse. + */ + REGION_INTERSECT( pScreen, &childUniverse, + universe, + &pChild->borderSize); + RootlessComputeClips (pChild, pScreen, &childUniverse, + kind, exposed); + } + /* + * Once the child has been processed, we remove its extents + * from the current universe, thus denying its space to any + * other sibling. + */ + if (overlap) + REGION_SUBTRACT( pScreen, universe, universe, + &pChild->borderSize); + } + } + if (!overlap) + REGION_SUBTRACT( pScreen, universe, universe, &childUnion); + REGION_UNINIT( pScreen, &childUnion); + REGION_UNINIT( pScreen, &childUniverse); + } /* if any children */ + + /* + * 'universe' now contains the new clipList for the parent window. + * + * To figure the exposure of the window we subtract the old clip from the + * new, just as for the border. + */ + + if (oldVis == VisibilityFullyObscured || + oldVis == VisibilityNotViewable) + { + REGION_COPY( pScreen, &pParent->valdata->after.exposed, universe); + } + else if (newVis != VisibilityFullyObscured && + newVis != VisibilityNotViewable) + { + REGION_SUBTRACT( pScreen, &pParent->valdata->after.exposed, + universe, &pParent->clipList); + } + + /* + * One last thing: backing storage. We have to try to save what parts of + * the window are about to be obscured. We can just subtract the universe + * from the old clipList and get the areas that were in the old but aren't + * in the new and, hence, are about to be obscured. + */ + if (pParent->backStorage && !resized) + { + REGION_SUBTRACT( pScreen, exposed, &pParent->clipList, universe); + (* pScreen->SaveDoomedAreas)(pParent, exposed, dx, dy); + } + + /* HACK ALERT - copying contents of regions, instead of regions */ + { + RegionRec tmp; + + tmp = pParent->clipList; + pParent->clipList = *universe; + *universe = tmp; + } + +#ifdef NOTDEF + REGION_COPY( pScreen, &pParent->clipList, universe); +#endif + + pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER; + + if (pScreen->ClipNotify) + (* pScreen->ClipNotify) (pParent, dx, dy); +} + +static void +RootlessTreeObscured(pParent) + register WindowPtr pParent; +{ + register WindowPtr pChild; + register int oldVis; + + pChild = pParent; + while (1) + { + if (pChild->viewable) + { + oldVis = pChild->visibility; + if (oldVis != (pChild->visibility = VisibilityFullyObscured) && + ((pChild->eventMask | wOtherEventMasks(pChild)) & VisibilityChangeMask)) + SendVisibilityNotify(pChild); + if (pChild->firstChild) + { + pChild = pChild->firstChild; + continue; + } + } + while (!pChild->nextSib && (pChild != pParent)) + pChild = pChild->parent; + if (pChild == pParent) + break; + pChild = pChild->nextSib; + } +} + +/* + *----------------------------------------------------------------------- + * RootlessMiValidateTree -- + * Recomputes the clip list for pParent and all its inferiors. + * + * Results: + * Always returns 1. + * + * Side Effects: + * The clipList, borderClip, exposed, and borderExposed regions for + * each marked window are altered. + * + * Notes: + * This routine assumes that all affected windows have been marked + * (valdata created) and their winSize and borderSize regions + * adjusted to correspond to their new positions. The borderClip and + * clipList regions should not have been touched. + * + * The top-most level is treated differently from all lower levels + * because pParent is unchanged. For the top level, we merge the + * regions taken up by the marked children back into the clipList + * for pParent, thus forming a region from which the marked children + * can claim their areas. For lower levels, where the old clipList + * and borderClip are invalid, we can't do this and have to do the + * extra operations done in miComputeClips, but this is much faster + * e.g. when only one child has moved... + * + *----------------------------------------------------------------------- + */ +/* + Quartz version: used for validate from root in rootless mode. + We need to make sure top-level windows don't clip each other, + and that top-level windows aren't clipped to the root window. +*/ +/*ARGSUSED*/ +// fixme this is ugly +// Xprint/ValTree.c doesn't work, but maybe that method can? +int +RootlessMiValidateTree (pRoot, pChild, kind) + WindowPtr pRoot; /* Parent to validate */ + WindowPtr pChild; /* First child of pRoot that was + * affected */ + VTKind kind; /* What kind of configuration caused call */ +{ + RegionRec childClip; /* The new borderClip for the current + * child */ + RegionRec exposed; /* For intermediate calculations */ + register ScreenPtr pScreen; + register WindowPtr pWin; + + pScreen = pRoot->drawable.pScreen; + if (pChild == NullWindow) + pChild = pRoot->firstChild; + + REGION_INIT(pScreen, &childClip, NullBox, 0); + REGION_INIT(pScreen, &exposed, NullBox, 0); + + if (REGION_BROKEN (pScreen, &pRoot->clipList) && + !REGION_BROKEN (pScreen, &pRoot->borderClip)) + { + // fixme this might not work, but hopefully doesn't happen anyway. + kind = VTBroken; + REGION_EMPTY (pScreen, &pRoot->clipList); + ErrorF("ValidateTree: BUSTED!\n"); + } + + /* + * Recursively compute the clips for all children of the root. + * They don't clip against each other or the root itself, so + * childClip is always reset to that child's size. + */ + + for (pWin = pChild; + pWin != NullWindow; + pWin = pWin->nextSib) + { + if (pWin->viewable) { + if (pWin->valdata) { + REGION_COPY( pScreen, &childClip, &pWin->borderSize); + RootlessComputeClips (pWin, pScreen, &childClip, kind, &exposed); + } else if (pWin->visibility == VisibilityNotViewable) { + RootlessTreeObscured(pWin); + } + } else { + if (pWin->valdata) { + REGION_EMPTY( pScreen, &pWin->clipList); + if (pScreen->ClipNotify) + (* pScreen->ClipNotify) (pWin, 0, 0); + REGION_EMPTY( pScreen, &pWin->borderClip); + pWin->valdata = (ValidatePtr)NULL; + } + } + } + + REGION_UNINIT( pScreen, &childClip); + + /* The root is never clipped by its children, so nothing on the root + is ever exposed by moving or mapping its children. */ + REGION_INIT( pScreen, &pRoot->valdata->after.exposed, NullBox, 0); + REGION_INIT( pScreen, &pRoot->valdata->after.borderExposed, NullBox, 0); + + return 1; +} diff --git a/synfig-osx/launcher/rootless-window.c b/synfig-osx/launcher/rootless-window.c new file mode 100644 index 0000000..2ae8a44 --- /dev/null +++ b/synfig-osx/launcher/rootless-window.c @@ -0,0 +1,2056 @@ +/* + * Rootless window management + */ +/* + * Copyright (c) 2001 Greg Parker. All Rights Reserved. + * Copyright (c) 2002 Torrey T. Lyons. All Rights Reserved. + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in this Software without prior written authorization. + */ +/* Portions of this file are based on fbwindow.c, which contains the + * following copyright: + * + * Copyright © 1998 Keith Packard + */ +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessWindow.c,v 1.11 2002/09/28 00:43:39 torrey Exp $ */ + +#include "rootless-common.h" +#include "rootless-window.h" +#include "darwin.h" +#include "Xplugin.h" +#include "x-hash.h" +#include "x-list.h" +#define _APPLEWM_SERVER_ +#include "applewmstr.h" + +#include "fb.h" +#include "propertyst.h" + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif + +#include +#include + +#define DEFINE_ATOM_HELPER(func,atom_name) \ +static Atom func (void) { \ + static unsigned int generation; \ + static Atom atom; \ + if (generation != serverGeneration) { \ + generation = serverGeneration; \ + atom = MakeAtom (atom_name, strlen (atom_name), TRUE); \ + } \ + return atom; \ +} + +DEFINE_ATOM_HELPER (xa_native_screen_origin, "_NATIVE_SCREEN_ORIGIN") +DEFINE_ATOM_HELPER (xa_native_window_id, "_NATIVE_WINDOW_ID") +DEFINE_ATOM_HELPER (xa_apple_no_order_in, "_APPLE_NO_ORDER_IN") + +/* Maps xp_window_id -> AquaWindowRec */ +static x_hash_table *window_hash; +static pthread_mutex_t window_hash_mutex; + +static Bool no_configure_window; +static Bool windows_hidden; + +static const int normal_window_levels[AppleWMNumWindowLevels+1] = { + 0, 3, 4, 5, LONG_MIN + 30, LONG_MIN + 29, +}; +static const int rooted_window_levels[AppleWMNumWindowLevels+1] = { + 202, 203, 204, 205, 201, 200 +}; + +static inline xp_error +configure_window (xp_window_id id, unsigned int mask, + const xp_window_changes *values) +{ + if (!no_configure_window) + return xp_configure_window (id, mask, values); + else + return XP_Success; +} + +static inline unsigned long +current_time_in_seconds (void) +{ + unsigned long t = 0; + + t += currentTime.milliseconds / 1000; + t += currentTime.months * 4294967; + + return t; +} + +static inline Bool +rootlessHasRoot (ScreenPtr pScreen) +{ + return WINREC (WindowTable[pScreen->myNum]) != NULL; +} + +void +RootlessNativeWindowStateChanged (xp_window_id id, unsigned int state) +{ + WindowPtr pWin; + RootlessWindowRec *winRec; + + pWin = RootlessGetXWindow (id); + if (pWin == NULL) + return; + + winRec = WINREC (pWin); + if (winRec == NULL) + return; + + winRec->is_offscreen = (state & XP_WINDOW_STATE_OFFSCREEN) != 0; + winRec->is_obscured = (state & XP_WINDOW_STATE_OBSCURED) != 0; + +#ifdef ROOTLESS + pWin->rootlessUnhittable = winRec->is_offscreen; +#endif +} + +void +RootlessNativeWindowMoved (xp_window_id id) +{ + WindowPtr pWin; + xp_box bounds; + int sx, sy; + XID vlist[2]; + Mask mask; + ClientPtr client; + + pWin = RootlessGetXWindow (id); + if (pWin == NULL) + return; + + if (xp_get_window_bounds (id, &bounds) != Success) + return; + + sx = dixScreenOrigins[pWin->drawable.pScreen->myNum].x + darwinMainScreenX; + sy = dixScreenOrigins[pWin->drawable.pScreen->myNum].y + darwinMainScreenY; + + /* Fake up a ConfigureWindow packet to resize the window to the + current bounds. */ + + vlist[0] = (INT16) bounds.x1 - sx; + vlist[1] = (INT16) bounds.y1 - sy; + mask = CWX | CWY; + + /* pretend we're the owner of the window! */ + client = LookupClient (pWin->drawable.id, NullClient); + + /* Don't want to do anything to the physical window (avoids + notification-response feedback loops) */ + + no_configure_window = TRUE; + ConfigureWindow (pWin, mask, vlist, client); + no_configure_window = FALSE; +} + +/* Updates the _NATIVE_SCREEN_ORIGIN property on the given root window. */ +static void +set_screen_origin (WindowPtr pWin) +{ + long data[2]; + + if (!IsRoot (pWin)) + return; + + /* FIXME: move this to an extension? */ + + data[0] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].x + + darwinMainScreenX); + data[1] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].y + + darwinMainScreenY); + + ChangeWindowProperty (pWin, xa_native_screen_origin (), XA_INTEGER, + 32, PropModeReplace, 2, data, TRUE); +} + +/* For now, don't create a physical window until either the window is + realized, or we really need it (e.g. to attach VRAM surfaces to). + Do reset the window size so it's not clipped by the root window. */ +Bool +RootlessCreateWindow (WindowPtr pWin) +{ + Bool result; + RegionRec saveRoot; + + SCREEN_UNWRAP (pWin->drawable.pScreen, CreateWindow); + + if (!IsRoot (pWin)) + { + /* win/border size set by DIX, not by wrapped CreateWindow, so + correct it here. Don't HUGE_ROOT when pWin is the root! */ + + HUGE_ROOT (pWin); + SetWinSize (pWin); + SetBorderSize (pWin); + } + else + { + set_screen_origin (pWin); + } + + result = pWin->drawable.pScreen->CreateWindow (pWin); + + if (pWin->parent) + NORMAL_ROOT (pWin); + + SCREEN_WRAP (pWin->drawable.pScreen, CreateWindow); + + return result; +} + +/* Destroy the physical window associated with the given window */ +static void +rootlessDestroyFrame (WindowPtr pWin, RootlessWindowRec *winRec) +{ + RootlessStopDrawing (pWin, FALSE); + + pthread_mutex_lock (&window_hash_mutex); + x_hash_table_remove (window_hash, (void *) winRec->wid); + pthread_mutex_unlock (&window_hash_mutex); + + xp_destroy_window (winRec->wid); + + xfree (winRec); + WINREC (pWin) = NULL; +} + +Bool +RootlessDestroyWindow (WindowPtr pWin) +{ + RootlessWindowRec *winRec = WINREC(pWin); + Bool result; + + if (winRec != NULL) + rootlessDestroyFrame (pWin, winRec); + + /* winRec is gone now */ + + SCREEN_UNWRAP(pWin->drawable.pScreen, DestroyWindow); + + result = pWin->drawable.pScreen->DestroyWindow (pWin); + + SCREEN_WRAP(pWin->drawable.pScreen, DestroyWindow); + + return result; +} + +#ifdef SHAPE +static Bool +RootlessGetShape (WindowPtr pWin, RegionPtr pShape) +{ + if (wBoundingShape (pWin) == NULL) + return FALSE; + + /* wBoundingShape is relative to *inner* origin of window. + Translate by borderWidth to get the outside-relative position. */ + + REGION_INIT (pScreen, pShape, NullBox, 0); + REGION_COPY (pScreen, pShape, wBoundingShape (pWin)); + REGION_TRANSLATE (pScreen, pShape, pWin->borderWidth, pWin->borderWidth); + + return TRUE; +} + +/* boundingShape = outside border (like borderClip) + clipShape = inside border (like clipList) + Both are in window-local coordinates + We only care about boundingShape (FIXME true?) + + RootlessReallySetShape is used in several places other than SetShape. + Most importantly, SetShape is often called on unmapped windows, so we + have to wait until the window is mapped to reshape the frame. */ +static void +rootlessSetShape (WindowPtr pWin) +{ + RootlessWindowRec *winRec = WINREC (pWin); + + RegionRec newShape; + RegionPtr pShape; + xp_window_changes wc; + + if (winRec == NULL) + return; + + RootlessStopDrawing (pWin, FALSE); + + pShape = RootlessGetShape (pWin, &newShape) ? &newShape : NULL; + + RL_DEBUG_MSG("reshaping..."); + RL_DEBUG_MSG("numrects %d, extents %d %d %d %d\n", + REGION_NUM_RECTS(&newShape), + newShape.extents.x1, newShape.extents.y1, + newShape.extents.x2, newShape.extents.y2); + + RootlessDisableUpdate (pWin); + + if (pShape != NULL) + { + wc.shape_nrects = REGION_NUM_RECTS (pShape); + wc.shape_rects = REGION_RECTS (pShape); + } + else + { + wc.shape_nrects = -1; + wc.shape_rects = NULL; + } + + wc.shape_tx = wc.shape_ty = 0; + + configure_window (winRec->wid, XP_SHAPE, &wc); + + if (pShape != NULL) + REGION_UNINIT(pScreen, &newShape); +} + +void +RootlessSetShape (WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + + SCREEN_UNWRAP (pScreen, SetShape); + + pScreen->SetShape (pWin); + + SCREEN_WRAP (pScreen, SetShape); + + rootlessSetShape (pWin); +} +#endif + +/* Disallow ParentRelative background on top-level windows + because the root window doesn't really have the right background + and fb will try to draw on the root instead of on the window. + ParentRelative prevention is also in PaintWindowBackground/Border() + so it is no longer really needed here. */ +Bool +RootlessChangeWindowAttributes (WindowPtr pWin, unsigned long vmask) +{ + Bool result; + ScreenPtr pScreen = pWin->drawable.pScreen; + + RL_DEBUG_MSG("change window attributes start\n"); + + SCREEN_UNWRAP (pScreen, ChangeWindowAttributes); + + result = pScreen->ChangeWindowAttributes (pWin, vmask); + + SCREEN_WRAP (pScreen, ChangeWindowAttributes); + + if (WINREC (pWin) != NULL) + { + /* disallow ParentRelative background state */ + + if (pWin->backgroundState == ParentRelative) + { + XID pixel = 0; + ChangeWindowAttributes (pWin, CWBackPixel, &pixel, serverClient); + } + } + + RL_DEBUG_MSG("change window attributes end\n"); + return result; +} + +/* This is a hook for when DIX moves or resizes a window. + Update the frame position now. (x, y) are *inside* position. + After this, mi and fb are expecting the pixmap to be at the new location. */ +Bool +RootlessPositionWindow (WindowPtr pWin, int x, int y) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + RootlessWindowRec *winRec = WINREC (pWin); + Bool result; + + RL_DEBUG_MSG("positionwindow start (win 0x%x)\n", pWin); + + if (winRec != NULL) + { + if (winRec->is_drawing) + { + /* Reset frame's pixmap and move it to the new position. */ + int bw = wBorderWidth (pWin); + + winRec->pixmap->devPrivate.ptr = winRec->data; + TranslatePixmapBase (winRec->pixmap, - (x - bw), - (y - bw)); + } + } + + SCREEN_UNWRAP (pScreen, PositionWindow); + + result = pScreen->PositionWindow (pWin, x, y); + + SCREEN_WRAP(pScreen, PositionWindow); + + RL_DEBUG_MSG("positionwindow end\n"); + return result; +} + +/* Initialize some basic attributes of the frame. Note that winRec + may already have valid data in it, so don't overwrite anything + valuable. */ +static void +rootlessInitializeFrame (WindowPtr pWin, RootlessWindowRec *winRec) +{ + DrawablePtr d = &pWin->drawable; + int bw = wBorderWidth (pWin); + + winRec->win = pWin; + + winRec->x = d->x - bw; + winRec->y = d->y - bw; + winRec->width = d->width + 2*bw; + winRec->height = d->height + 2*bw; + winRec->borderWidth = bw; +} + +static void +rootlessSetNativeProperty (RootlessWindowRec *winRec) +{ + xp_error err; + unsigned int native_id; + long data; + + err = xp_get_native_window (winRec->wid, &native_id); + if (err == Success) + { + /* FIXME: move this to an extension? */ + + data = native_id; + ChangeWindowProperty (winRec->win, xa_native_window_id (), + XA_INTEGER, 32, PropModeReplace, 1, &data, TRUE); + } +} + +static xp_error +rootlessColormapCallback (void *data, int first_color, + int n_colors, uint32_t *colors) +{ + return (RootlessResolveColormap (data, first_color, n_colors, colors) + ? XP_Success : XP_BadMatch); +} + +/* If the given window doesn't have a physical window associated with it, + attempt to create one. If that's unsuccessful, return null. */ +static RootlessWindowRec * +rootlessEnsureFrame (WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + RootlessWindowRec *winRec; + RegionRec shape; + RegionPtr pShape = NULL; + + xp_window_changes wc; + unsigned int mask; + xp_error err; + int sx, sy; + + if (WINREC (pWin) != NULL) + return WINREC (pWin); + + if (pWin->drawable.class != InputOutput) + return NULL; + + winRec = xalloc (sizeof(RootlessWindowRec)); + + if (!winRec) + return NULL; + + rootlessInitializeFrame (pWin, winRec); + + winRec->is_drawing = FALSE; + winRec->pixmap = NULL; + winRec->wid = 0; + winRec->is_update_disabled = FALSE; + winRec->is_reorder_pending = FALSE; + winRec->level = !IsRoot (pWin) ? 0 : AppleWMNumWindowLevels; + WINREC(pWin) = winRec; + +#ifdef SHAPE + if (RootlessGetShape (pWin, &shape)) + pShape = &shape; +#endif + + sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + mask = 0; + + wc.x = sx + winRec->x; + wc.y = sy + winRec->y; + wc.width = winRec->width; + wc.height = winRec->height; + wc.bit_gravity = XP_GRAVITY_NONE; + mask |= XP_BOUNDS; + + if (pWin->drawable.depth == 8) + { + wc.depth = XP_DEPTH_INDEX8; + wc.colormap = rootlessColormapCallback; + wc.colormap_data = pScreen; + mask |= XP_COLORMAP; + } + else if (pWin->drawable.depth == 15) + wc.depth = XP_DEPTH_RGB555; + else if (pWin->drawable.depth == 24) + wc.depth = XP_DEPTH_ARGB8888; + else + wc.depth = XP_DEPTH_NIL; + mask |= XP_DEPTH; + + if (pShape != NULL) + { + wc.shape_nrects = REGION_NUM_RECTS (pShape); + wc.shape_rects = REGION_RECTS (pShape); + wc.shape_tx = wc.shape_ty = 0; + mask |= XP_SHAPE; + } + + if (!rootlessHasRoot (pScreen)) + wc.window_level = normal_window_levels[winRec->level]; + else + wc.window_level = rooted_window_levels[winRec->level]; + mask |= XP_WINDOW_LEVEL; + + err = xp_create_window (mask, &wc, &winRec->wid); + + if (err != Success) + { + xfree (winRec); + return NULL; + } + + if (window_hash == NULL) + { + window_hash = x_hash_table_new (NULL, NULL, NULL, NULL); + pthread_mutex_init (&window_hash_mutex, NULL); + } + + pthread_mutex_lock (&window_hash_mutex); + x_hash_table_insert (window_hash, (void *) winRec->wid, winRec); + pthread_mutex_unlock (&window_hash_mutex); + + rootlessSetNativeProperty (winRec); + + if (pShape != NULL) + REGION_UNINIT (pScreen, &shape); + + return winRec; +} + +/* The frame is usually created here and not in CreateWindow so that + windows do not eat memory until they are realized. */ +Bool +RootlessRealizeWindow(WindowPtr pWin) +{ + Bool result = FALSE; + RegionRec saveRoot; + ScreenPtr pScreen = pWin->drawable.pScreen; + XID pixel; + + RL_DEBUG_MSG("realizewindow start (win 0x%x)\n", pWin); + + if (IsTopLevel (pWin) && pWin->drawable.class == InputOutput) + { + RootlessWindowRec *winRec; + + winRec = rootlessEnsureFrame (pWin); + if (winRec == NULL) + return NULL; + + winRec->is_reorder_pending = TRUE; + + /* Disallow ParentRelative background state on top-level windows. + This might have been set before the window was mapped. */ + + if (pWin->backgroundState == ParentRelative) + { + pixel = 0; + ChangeWindowAttributes (pWin, CWBackPixel, &pixel, serverClient); + } + } + + if (!IsRoot(pWin)) HUGE_ROOT(pWin); + SCREEN_UNWRAP (pScreen, RealizeWindow); + + result = pScreen->RealizeWindow (pWin); + + SCREEN_WRAP (pScreen, RealizeWindow); + if (!IsRoot(pWin)) NORMAL_ROOT(pWin); + + RL_DEBUG_MSG("realizewindow end\n"); + return result; +} + +void +RootlessEnableRoot (ScreenPtr pScreen) +{ + WindowPtr pRoot; + pRoot = WindowTable[pScreen->myNum]; + + rootlessEnsureFrame (pRoot); + (*pScreen->ClearToBackground) (pRoot, 0, 0, 0, 0, TRUE); + RootlessReorderWindow (pRoot); +} + +void +RootlessDisableRoot (ScreenPtr pScreen) +{ + WindowPtr pRoot; + RootlessWindowRec *winRec; + + pRoot = WindowTable[pScreen->myNum]; + winRec = WINREC (pRoot); + + if (winRec != NULL) + { + rootlessDestroyFrame (pRoot, winRec); + DeleteProperty (pRoot, xa_native_window_id ()); + } +} + +void +RootlessHideAllWindows (void) +{ + int i; + ScreenPtr pScreen; + WindowPtr pWin; + RootlessWindowRec *winRec; + xp_window_changes wc; + + if (windows_hidden) + return; + + windows_hidden = TRUE; + + for (i = 0; i < screenInfo.numScreens; i++) + { + pScreen = screenInfo.screens[i]; + pWin = WindowTable[i]; + if (pScreen == NULL || pWin == NULL) + continue; + + for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) + { + if (!pWin->realized) + continue; + + RootlessStopDrawing (pWin, FALSE); + + winRec = WINREC (pWin); + if (winRec != NULL) + { + wc.stack_mode = XP_UNMAPPED; + wc.sibling = 0; + configure_window (winRec->wid, XP_STACKING, &wc); + } + } + } +} + +void +RootlessShowAllWindows (void) +{ + int i; + ScreenPtr pScreen; + WindowPtr pWin; + RootlessWindowRec *winRec; + + if (!windows_hidden) + return; + + windows_hidden = FALSE; + + for (i = 0; i < screenInfo.numScreens; i++) + { + pScreen = screenInfo.screens[i]; + pWin = WindowTable[i]; + if (pScreen == NULL || pWin == NULL) + continue; + + for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) + { + if (!pWin->realized) + continue; + + winRec = rootlessEnsureFrame (pWin); + if (winRec == NULL) + continue; + + RootlessReorderWindow (pWin); + } + + RootlessScreenExpose (pScreen); + } +} + +void +RootlessSetWindowLevel (WindowPtr pWin, int level) +{ + RootlessWindowRec *winRec; + xp_window_changes wc; + + winRec = WINREC (pWin); + if (!IsTopLevel (pWin) || winRec == NULL || winRec->level == level) + return; + + RootlessStopDrawing (pWin, FALSE); + + winRec->level = level; + + if (!rootlessHasRoot (pWin->drawable.pScreen)) + wc.window_level = normal_window_levels[level]; + else + wc.window_level = rooted_window_levels[level]; + + configure_window (winRec->wid, XP_WINDOW_LEVEL, &wc); +} + +/* Return the id of the physical window displaying the given window. If + CREATE is true and the window has no frame, attempt to create one. */ +xp_window_id +RootlessGetPhysicalWindow (WindowPtr pWin, Bool create) +{ + RootlessWindowRec *winRec; + + if (TopLevelParent (pWin) == NULL) + return 0; + + winRec = WINREC (pWin); + + if (winRec == NULL && create && !IsRoot (pWin) + && pWin->drawable.class == InputOutput) + { + rootlessEnsureFrame (pWin); + winRec = WINREC (pWin); + } + + if (winRec == NULL) + return 0; + + return winRec->wid; +} + +/* Given the id of a physical window, try to find the top-level (or root) + X window that it represents. */ +WindowPtr +RootlessGetXWindow (xp_window_id wid) +{ + RootlessWindowRec *winRec; + + if (window_hash == NULL) + return NULL; + + winRec = x_hash_table_lookup (window_hash, (void *) wid, NULL); + + return winRec != NULL ? winRec->win : NULL; +} + +/* Number is an appkit window number. Returns true if X is displaying + a window with that number. */ +int +RootlessKnowsWindowNumber (int number) +{ + Bool ret; + xp_window_id wid; + + /* need to lock, since this function can be called by any thread */ + + if (window_hash == NULL) + return FALSE; + + pthread_mutex_lock (&window_hash_mutex); + + if (xp_lookup_native_window (number, &wid)) + ret = RootlessGetXWindow (wid) != NULL; + else + ret = FALSE; + + pthread_mutex_unlock (&window_hash_mutex); + + return ret; +} + +Bool +RootlessUnrealizeWindow (WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + RootlessWindowRec *winRec = WINREC(pWin); + xp_window_changes wc; + Bool result; + + RL_DEBUG_MSG("unrealizewindow start\n"); + + if (winRec != NULL) + { + RootlessStopDrawing (pWin, FALSE); + + wc.stack_mode = XP_UNMAPPED; + wc.sibling = 0; + + configure_window (winRec->wid, XP_STACKING, &wc); + + winRec->unrealize_time = current_time_in_seconds (); + winRec->is_reorder_pending = FALSE; + + RootlessReenableUpdate (pWin); + } + + SCREEN_UNWRAP (pScreen, UnrealizeWindow); + + result = pScreen->UnrealizeWindow (pWin); + + SCREEN_WRAP (pScreen, UnrealizeWindow); + + RL_DEBUG_MSG ("unrealizewindow end\n"); + return result; +} + +void +RootlessReparentWindow (WindowPtr pWin, WindowPtr pPriorParent) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + RootlessWindowRec *winRec = WINREC (pWin); + + WindowPtr pTopWin; + + if (IsRoot (pWin) || IsRoot (pWin->parent) + || IsTopLevel (pWin) || winRec == NULL) + { + return; + } + + /* If the window is moving upwards towards the root has a frame, + we want to try to move it onto its new toplevel parent. If we + can't do that, we'll just have to jettison it.. */ + + pTopWin = TopLevelParent (pWin); + assert (pTopWin != pWin); + + pWin->rootlessUnhittable = FALSE; + + DeleteProperty (pWin, xa_native_window_id ()); + + if (WINREC (pTopWin) != NULL) + { + /* We're screwed. */ + rootlessDestroyFrame (pWin, winRec); + } + else + { + xp_window_changes wc; + int sx, sy; + + if (!pTopWin->realized && pWin->realized) + { + wc.stack_mode = XP_UNMAPPED; + wc.sibling = 0; + + RootlessStopDrawing (pWin, FALSE); + configure_window (winRec->wid, XP_STACKING, &wc); + } + + /* Switch the frame record from one to the other. */ + + WINREC (pWin) = NULL; + WINREC (pTopWin) = winRec; + + rootlessInitializeFrame (pTopWin, winRec); + rootlessSetShape (pTopWin); + + sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + wc.x = sx + winRec->x; + wc.y = sy + winRec->y; + wc.width = winRec->width; + wc.height = winRec->height; + wc.bit_gravity = XP_GRAVITY_NONE; + + RootlessStopDrawing (pWin, FALSE); + configure_window (winRec->wid, XP_BOUNDS, &wc); + + rootlessSetNativeProperty (winRec); + + if (pTopWin->realized && !pWin->realized) + winRec->is_reorder_pending = TRUE; + } +} + +/* Reorder the window associated with the given frame so that it's + physically above the window below it in the X stacking order. */ +void +RootlessReorderWindow (WindowPtr pWin) +{ + RootlessWindowRec *winRec = WINREC (pWin); + + if (pWin->realized && winRec != NULL + && !winRec->is_reorder_pending && !windows_hidden) + { + WindowPtr newPrevW; + RootlessWindowRec *newPrev; + xp_window_changes wc; + Atom atom; + PropertyPtr prop; + + /* quartz-wm sets the _APPLE_NO_ORDER_IN property on windows + that are being genie-restored from the Dock. We want them to + be mapped but remain ordered-out until the animation + completes (when the Dock will order them in) */ + + atom = xa_apple_no_order_in (); + for (prop = wUserProps (pWin); prop != NULL; prop = prop->next) + { + if (prop->propertyName == atom && prop->type == atom) + return; + } + + RootlessStopDrawing (pWin, FALSE); + + if (IsRoot (pWin)) + { + wc.stack_mode = XP_MAPPED_BELOW; + wc.sibling = 0; + } + else + { + /* Find the next window above this one that has a mapped frame. */ + + newPrevW = pWin->prevSib; + while (newPrevW + && (WINREC (newPrevW) == NULL || !newPrevW->realized)) + { + newPrevW = newPrevW->prevSib; + } + + newPrev = newPrevW != NULL ? WINREC (newPrevW) : NULL; + + /* Then either stack ourselves below it if it exists, or raise + ourselves above everything otherwise. */ + + if (newPrev == NULL) + { + wc.stack_mode = XP_MAPPED_ABOVE; + wc.sibling = 0; + } + else + { + if (newPrev->is_reorder_pending) + { + newPrev->is_reorder_pending = FALSE; + RootlessReorderWindow (newPrevW); + } + + wc.stack_mode = XP_MAPPED_BELOW; + wc.sibling = newPrev->wid; + } + } + + configure_window (winRec->wid, XP_STACKING, &wc); + } +} + +void +RootlessRestackWindow (WindowPtr pWin, WindowPtr pOldNextSib) +{ + RegionRec saveRoot; + RootlessWindowRec *winRec = WINREC (pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + + RL_DEBUG_MSG("restackwindow start\n"); + if (winRec != NULL) + RL_DEBUG_MSG("restack top level \n"); + + HUGE_ROOT(pWin); + SCREEN_UNWRAP(pScreen, RestackWindow); + + if (pScreen->RestackWindow != NULL) + pScreen->RestackWindow (pWin, pOldNextSib); + + SCREEN_WRAP(pScreen, RestackWindow); + NORMAL_ROOT(pWin); + + if (winRec != NULL && pWin->viewable) + RootlessReorderWindow (pWin); + + RL_DEBUG_MSG("restackwindow end\n"); +} + +/* + * Specialized window copy procedures + */ + +/* Globals needed during window resize and move. */ +static pointer gResizeDeathBits = NULL; +static int gResizeDeathCount; +static PixmapPtr gResizeDeathPix[2]; +static BoxRec gResizeDeathBounds[2]; +static CopyWindowProcPtr gResizeOldCopyWindowProc = NULL; + +/* CopyWindow () that doesn't do anything. For MoveWindow() of + top-level windows. */ +static void +RootlessNoCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) +{ + /* Some code expects the region to be translated */ + + int dx = ptOldOrg.x - pWin->drawable.x; + int dy = ptOldOrg.y - pWin->drawable.y; + + REGION_TRANSLATE (pWin->drawable.pScreen, prgnSrc, -dx, -dy); +} + +/* CopyWindow used during ResizeWindow for gravity moves. (from fbCopyWindow) + The original always draws on the root pixmap (which we don't have). + Instead, draw on the parent window's pixmap. + Resize version: the old location's pixels are in gResizeCopyWindowSource */ +static void +RootlessResizeCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, + RegionPtr prgnSrc) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + RegionRec rgnDst; + int dx, dy; + + RL_DEBUG_MSG("resizecopywindowFB start (win 0x%x)\n", pWin); + + /* Don't unwrap pScreen->CopyWindow. + The bogus rewrap with RootlessCopyWindow causes a crash if + CopyWindow is called again during the same resize. */ + + if (gResizeDeathCount == 0) + return; + + RootlessStartDrawing (pWin); + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + REGION_TRANSLATE (pScreen, prgnSrc, -dx, -dy); + REGION_INIT (pScreen, &rgnDst, NullBox, 0); + REGION_INTERSECT (pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + + if (gResizeDeathCount == 1) + { + /* Simple case, we only have a single source pixmap. */ + + fbCopyRegion (&gResizeDeathPix[0]->drawable, + &pScreen->GetWindowPixmap(pWin)->drawable, 0, + &rgnDst, dx, dy, fbCopyWindowProc, 0, 0); + } + else + { + int i; + RegionRec clip, clipped; + + /* More complex case, N source pixmaps (usually two). So we + intersect the destination with each source and copy those bits. */ + + for (i = 0; i < gResizeDeathCount; i++) + { + REGION_INIT (pScreen, &clip, gResizeDeathBounds + 0, 1); + REGION_INIT (pScreen, &clipped, NullBox, 0); + REGION_INTERSECT (pScreen, &rgnDst, &clip, &clipped); + + fbCopyRegion (&gResizeDeathPix[i]->drawable, + &pScreen->GetWindowPixmap(pWin)->drawable, 0, + &clipped, dx, dy, fbCopyWindowProc, 0, 0); + + REGION_UNINIT (pScreen, &clipped); + REGION_UNINIT (pScreen, &clip); + } + } + + /* Don't update - resize will update everything */ + REGION_UNINIT (pScreen, &rgnDst); + + fbValidateDrawable (&pWin->drawable); + + RL_DEBUG_MSG("resizecopywindowFB end\n"); +} + +/* Update *new* location of window. Old location is redrawn with + PaintWindowBackground/Border. Cloned from fbCopyWindow + The original always draws on the root pixmap (which we don't have). + Instead, draw on the parent window's pixmap. */ +void +RootlessCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + RootlessWindowRec *winRec; + WindowPtr top; + + RegionRec rgnDst; + int dx, dy; + BoxPtr extents; + unsigned int area; + + RL_DEBUG_MSG("copywindowFB start (win 0x%x)\n", pWin); + + top = TopLevelParent (pWin); + if (top == NULL) + { + RL_DEBUG_MSG("no parent\n"); + return; + } + + winRec = WINREC(top); + if (winRec == NULL) + { + RL_DEBUG_MSG("not framed\n"); + return; + } + + SCREEN_UNWRAP (pScreen, CopyWindow); + + dx = ptOldOrg.x - pWin->drawable.x; + dy = ptOldOrg.y - pWin->drawable.y; + REGION_TRANSLATE (pScreen, prgnSrc, -dx, -dy); + + REGION_INIT (pScreen, &rgnDst, NullBox, 0); + REGION_INTERSECT (pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + + extents = REGION_EXTENTS (pScreen, &rgnDst); + area = (extents->x2 - extents->x1) * (extents->y2 - extents->y1); + + if (area > xp_scroll_area_threshold) + { + /* Move region to window local coords */ + REGION_TRANSLATE (pScreen, &rgnDst, -winRec->x, -winRec->y); + + RootlessStopDrawing (pWin, FALSE); + + xp_copy_window (winRec->wid, winRec->wid, + REGION_NUM_RECTS (&rgnDst), + REGION_RECTS (&rgnDst), dx, dy); + } + else + { + RootlessStartDrawing (pWin); + + fbCopyRegion ((DrawablePtr) pWin, (DrawablePtr) pWin, + 0, &rgnDst, dx, dy, fbCopyWindowProc, 0, 0); + + /* prgnSrc has been translated to dst position */ + RootlessDamageRegion(pWin, prgnSrc); + } + + REGION_UNINIT (pScreen, &rgnDst); + fbValidateDrawable (&pWin->drawable); + + SCREEN_WRAP (pScreen, CopyWindow); + + RL_DEBUG_MSG("copywindowFB end\n"); +} + +/* + * Window resize procedures + */ + +enum { + WIDTH_SMALLER = 1, + HEIGHT_SMALLER = 2, +}; + +/* Compute which directions the window is resizing in. */ +static inline unsigned int +resize_code (int oldX, int oldY, int oldW, int oldH, + int newX, int newY, int newW, int newH) +{ + unsigned int code = 0; + + /* These comparisons were chosen to avoid setting bits when the sizes + are the same. (So the fastest case automatically gets taken when + dimensions are unchanging.) */ + + if (newW < oldW) + code |= WIDTH_SMALLER; + + if (newH < oldH) + code |= HEIGHT_SMALLER; + + return code; +} + +static inline unsigned int +resize_weighting (int oldX1, int oldY1, int oldX2, int oldY2, int oldBW, + int newX1, int newY1, int newX2, int newY2, int newBW) +{ + /* Choose gravity to avoid local copies. Do that by looking for + a corner that doesn't move _relative to the screen_ */ + + if (newBW != oldBW) + return XP_GRAVITY_NONE; + + if (newX1 == oldX1 && newY1 == oldY1) + return XP_GRAVITY_NORTH_WEST; + else if (newX1 == oldX1 && newY2 == oldY2) + return XP_GRAVITY_SOUTH_WEST; + else if (newX2 == oldX2 && newY2 == oldY2) + return XP_GRAVITY_SOUTH_EAST; + else if (newX2 == oldX2 && newY1 == oldY1) + return XP_GRAVITY_NORTH_EAST; + else + return XP_GRAVITY_NONE; +} + +/* Resize the given window to its new position and size. */ +static void +resize_frame (ScreenPtr pScreen, WindowPtr pWin, + RootlessWindowRec *winRec, int gravity) +{ + int sx, sy; + xp_window_changes wc; + + sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + wc.x = sx + winRec->x; + wc.y = sy + winRec->y; + wc.width = winRec->width; + wc.height = winRec->height; + wc.bit_gravity = gravity; + + /* It's unlikely that being async will save us anything here. + But it can't hurt. */ + + configure_window (winRec->wid, XP_BOUNDS, &wc); +} + +/* Prepare to resize a top-level window. The old window's pixels are + saved and the implementation is told to change the window size. + (x,y,w,h) is outer frame of window (outside border) */ +static Bool +StartFrameResize (WindowPtr pWin, Bool gravity, + int oldX, int oldY, int oldW, int oldH, int oldBW, + int newX, int newY, int newW, int newH, int newBW) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + RootlessWindowRec *winRec = WINREC(pWin); + Bool need_window_source = FALSE, resize_after = FALSE; + + BoxRec rect, copy_rect; + int oldX2, newX2; + int oldY2, newY2; + unsigned int weight; + + oldX2 = oldX + oldW, newX2 = newX + newW; + oldY2 = oldY + oldH, newY2 = newY + newH; + + /* Decide which resize weighting to use */ + weight = resize_weighting (oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + + /* Compute intersection between old and new rects */ + rect.x1 = max(oldX, newX); + rect.y1 = max(oldY, newY); + rect.x2 = min(oldX2, newX2); + rect.y2 = min(oldY2, newY2); + + RL_DEBUG_MSG("RESIZE TOPLEVEL WINDOW with gravity %i ", gravity); + RL_DEBUG_MSG("%d %d %d %d %d %d %d %d %d %d\n", + oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + + RootlessDisableUpdate (pWin); + RootlessRedisplay (pWin); + + /* If gravity is true, then we need to have a way of recovering all + the original bits in the window for when X rearranges the contents + based on the various gravity settings. The obvious way is to just + snapshot the entire backing store before resizing it, but that + it slow on large windows. + + So the optimization here is to use CG's resize weighting options + to allow us to reason about what is left in the backing store + after the resize. We can then only copy what won't be there after + the resize, and do a two-stage copy operation. + + Most of these optimizations are only applied when the top-left + corner of the window is fixed, since that's the common case. They + could probably be extended with some thought. */ + + gResizeDeathCount = 0; + + if (gravity && weight == XP_GRAVITY_NORTH_WEST) + { + unsigned int code; + + /* Top left corner is anchored. We never need to copy the + entire window. */ + + need_window_source = TRUE; + + code = resize_code (oldX, oldY, oldW, oldH, + newX, newY, newW, newH); + + if (((code ^ (code >> 1)) & 1) == 0) + { + /* Both dimensions are either getting larger, or both + are getting smaller. No need to copy anything. */ + + if (code == (WIDTH_SMALLER | HEIGHT_SMALLER)) + { + /* Since the window is getting smaller, we can do gravity + repair on it with it's current size, then resize it + afterwards. */ + + resize_after = TRUE; + } + + gResizeDeathCount = 1; + } + else + { + unsigned int copy_rowbytes, Bpp; + + /* We can get away with a partial copy. 'rect' is the + intersection between old and new bounds, so copy + everything to the right of or below the intersection. */ + + RootlessStartDrawing (pWin); + + if (code == WIDTH_SMALLER) + { + copy_rect.x1 = rect.x2; + copy_rect.y1 = rect.y1; + copy_rect.x2 = oldX2; + copy_rect.y2 = oldY2; + } + else if (code == HEIGHT_SMALLER) + { + copy_rect.x1 = rect.x1; + copy_rect.y1 = rect.y2; + copy_rect.x2 = oldX2; + copy_rect.y2 = oldY2; + } + else + abort (); + + Bpp = winRec->win->drawable.bitsPerPixel / 8; + copy_rowbytes = (((copy_rect.x2 - copy_rect.x1) * Bpp) + 31) & ~31; + gResizeDeathBits = xalloc (copy_rowbytes + * (copy_rect.y2 - copy_rect.y1)); + + xp_copy_bytes ((copy_rect.x2 - copy_rect.x1) * Bpp, + copy_rect.y2 - copy_rect.y1, ((char *) winRec->data) + + ((copy_rect.y1 - oldY) * winRec->rowbytes) + + (copy_rect.x1 - oldX) * Bpp, winRec->rowbytes, + gResizeDeathBits, copy_rowbytes); + + gResizeDeathBounds[1] = copy_rect; + gResizeDeathPix[1] + = GetScratchPixmapHeader(pScreen, copy_rect.x2 - copy_rect.x1, + copy_rect.y2 - copy_rect.y1, + winRec->win->drawable.depth, + winRec->win->drawable.bitsPerPixel, + winRec->rowbytes, + (void *) gResizeDeathBits); + + TranslatePixmapBase (gResizeDeathPix[1], + -copy_rect.x1, -copy_rect.y1); + + gResizeDeathCount = 2; + } + } + else if (gravity) + { + /* The general case. Just copy everything. */ + + RootlessStartDrawing (pWin); + + gResizeDeathBits = xalloc(winRec->rowbytes * winRec->height); + + memcpy(gResizeDeathBits, winRec->data, + winRec->rowbytes * winRec->height); + + gResizeDeathBounds[0] = (BoxRec) {oldX, oldY, oldX2, oldY2}; + gResizeDeathPix[0] + = GetScratchPixmapHeader(pScreen, winRec->width, + winRec->height, + winRec->win->drawable.depth, + winRec->win->drawable.bitsPerPixel, + winRec->rowbytes, + (void *) gResizeDeathBits); + + TranslatePixmapBase (gResizeDeathPix[0], -oldX, -oldY); + gResizeDeathCount = 1; + } + + RootlessStopDrawing (pWin, FALSE); + + winRec->x = newX; + winRec->y = newY; + winRec->width = newW; + winRec->height = newH; + winRec->borderWidth = newBW; + + /* Unless both dimensions are getting smaller, Resize the frame + before doing gravity repair */ + + if (!resize_after) + resize_frame (pScreen, pWin, winRec, weight); + + RootlessStartDrawing(pWin); + + /* If necessary, create a source pixmap pointing at the current + window bits. */ + + if (need_window_source) + { + gResizeDeathBounds[0] = (BoxRec) {oldX, oldY, oldX2, oldY2}; + gResizeDeathPix[0] + = GetScratchPixmapHeader (pScreen, oldW, oldH, + winRec->win->drawable.depth, + winRec->win->drawable.bitsPerPixel, + winRec->rowbytes, winRec->data); + + TranslatePixmapBase (gResizeDeathPix[0], -oldX, -oldY); + } + + /* Use custom CopyWindow when moving gravity bits around + ResizeWindow assumes the old window contents are in the same + pixmap, but here they're in deathPix instead. */ + + if (gravity) + { + gResizeOldCopyWindowProc = pScreen->CopyWindow; + pScreen->CopyWindow = RootlessResizeCopyWindow; + } + + /* If we can't rely on the window server preserving the bits we + need in the position we need, copy the pixels in the + intersection from src to dst. ResizeWindow assumes these pixels + are already present when making gravity adjustments. pWin + currently has new-sized pixmap but is in old position. + + FIXME: border width change! (?) */ + + if (gravity && weight == XP_GRAVITY_NONE) + { + PixmapPtr src, dst; + + assert (gResizeDeathCount == 1); + + src = gResizeDeathPix[0]; + dst = pScreen->GetWindowPixmap(pWin); + + RL_DEBUG_MSG("Resize copy rect %d %d %d %d\n", + rect.x1, rect.y1, rect.x2, rect.y2); + + /* rect is the intersection of the old location and new location */ + if (BOX_NOT_EMPTY(rect) && src != NULL && dst != NULL) + { + int dx, dy; + + /* The window drawable still has the old frame position, which + means that DST doesn't actually point at the origin of our + physical backing store when adjusted by the drawable.x,y + position. So sneakily adjust it temporarily while copying.. */ + + dx = newX - oldX; + dy = newY - oldY; + TranslatePixmapBase (dst, -dx, -dy); + + fbCopyWindowProc(&src->drawable, &dst->drawable, NULL, + &rect, 1, 0, 0, FALSE, FALSE, 0, 0); + + TranslatePixmapBase (dst, dx, dy); + } + } + + return resize_after; +} + +static void +FinishFrameResize (WindowPtr pWin, Bool gravity, int oldX, int oldY, + unsigned int oldW, unsigned int oldH, unsigned int oldBW, + int newX, int newY, unsigned int newW, unsigned int newH, + unsigned int newBW, Bool resize_now) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + RootlessWindowRec *winRec = WINREC(pWin); + BoxRec box; + int i; + + RootlessStopDrawing (pWin, FALSE); + + if (resize_now) + { + unsigned int weight; + + /* We didn't resize anything earlier, so do it now, now that + we've finished gravitating the bits. */ + + weight = resize_weighting (oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + + resize_frame (pScreen, pWin, winRec, weight); + } + + /* Redraw everything. FIXME: there must be times when we don't need + to do this. Perhaps when top-left weighting and no gravity? */ + + box.x1 = 0; + box.y1 = 0; + box.x2 = winRec->width; + box.y2 = winRec->height; + + xp_mark_window (winRec->wid, 1, &box, 0, 0); + + for (i = 0; i < 2; i++) + { + if (gResizeDeathPix[i] != NULL) + { + FreeScratchPixmapHeader (gResizeDeathPix[i]); + gResizeDeathPix[i] = NULL; + } + } + + if (gResizeDeathBits != NULL) + { + xfree (gResizeDeathBits); + gResizeDeathBits = NULL; + } + + if (gravity) + pScreen->CopyWindow = gResizeOldCopyWindowProc; +} + +/* If kind==VTOther, window border is resizing (and borderWidth is + already changed!!@#$) This case works like window resize, not move. */ +void +RootlessMoveWindow (WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind) +{ + RootlessWindowRec *winRec = WINREC(pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + CopyWindowProcPtr oldCopyWindowProc = NULL; + + int oldX = 0, oldY = 0; + unsigned int oldW = 0, oldH = 0, oldBW = 0; + int newX = 0, newY = 0; + unsigned int newW = 0, newH = 0, newBW = 0; + + Bool resize_after = FALSE; + RegionRec saveRoot; + + RL_DEBUG_MSG("movewindow start \n"); + + if (winRec != NULL) + { + if (kind == VTMove) + { + oldX = winRec->x; + oldY = winRec->y; + RootlessRedisplay (pWin); + RootlessStartDrawing (pWin); + } + else + { + RL_DEBUG_MSG("movewindow border resizing "); + + oldBW = winRec->borderWidth; + oldX = winRec->x; + oldY = winRec->y; + oldW = winRec->width; + oldH = winRec->height; + + newBW = wBorderWidth (pWin); + newX = x; + newY = y; + newW = pWin->drawable.width + 2*newBW; + newH = pWin->drawable.height + 2*newBW; + + resize_after = StartFrameResize (pWin, FALSE, + oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + } + + HUGE_ROOT (pWin); + SCREEN_UNWRAP (pScreen, MoveWindow); + + oldCopyWindowProc = pScreen->CopyWindow; + + if (winRec != NULL) + pScreen->CopyWindow = RootlessNoCopyWindow; + + pScreen->MoveWindow (pWin, x, y, pSib, kind); + + if (winRec != NULL) + pScreen->CopyWindow = oldCopyWindowProc; + + NORMAL_ROOT (pWin); + SCREEN_WRAP (pScreen, MoveWindow); + + if (winRec != NULL) + { + if (kind == VTMove) + { + xp_window_changes wc; + int sx, sy; + + RootlessStopDrawing (pWin, FALSE); + + winRec->x = x; + winRec->y = y; + + sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + wc.x = sx + winRec->x; + wc.y = sy + winRec->y; + + configure_window (winRec->wid, XP_ORIGIN, &wc); + } + else + { + FinishFrameResize (pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW, resize_after); + } + } + + RL_DEBUG_MSG("movewindow end\n"); +} + + +/* Note: (x, y, w, h) as passed to this procedure don't match the frame + definition. (x,y) is corner of very outer edge, *outside* border + w,h is width and height *inside* border, *ignoring* border width + The rect (x, y, w, h) doesn't mean anything. (x, y, w+2*bw, h+2*bw) + is total rect (x+bw, y+bw, w, h) is inner rect */ +void +RootlessResizeWindow (WindowPtr pWin, int x, int y, + unsigned int w, unsigned int h, WindowPtr pSib) +{ + RootlessWindowRec *winRec = WINREC(pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + RegionRec saveRoot; + + int oldX = 0, oldY = 0; + unsigned int oldW = 0, oldH = 0, oldBW = 0; + int newX = 0, newY = 0; + unsigned int newW = 0, newH = 0, newBW = 0; + + Bool resize_after = FALSE; + + RL_DEBUG_MSG("resizewindow start (win 0x%x)\n", pWin); + + if (winRec != NULL) + { + oldBW = winRec->borderWidth; + oldX = winRec->x; + oldY = winRec->y; + oldW = winRec->width; + oldH = winRec->height; + + newBW = oldBW; + newX = x; + newY = y; + newW = w + 2*newBW; + newH = h + 2*newBW; + + resize_after = StartFrameResize (pWin, TRUE, + oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + + HUGE_ROOT (pWin); + SCREEN_UNWRAP (pScreen, ResizeWindow); + + if (!IsRoot (pWin)) + { + pScreen->ResizeWindow (pWin, x, y, w, h, pSib); + } + else + { + BoxRec box; + + /* mi won't resize the root. So do it ourselves... */ + + pWin->drawable.x = x; + pWin->drawable.y = y; + pWin->drawable.width = w; + pWin->drawable.height = h; + + box.x1 = x; box.y1 = y; + box.x2 = x + w; box.y2 = y + h; + REGION_UNINIT (pScreen, &pWin->winSize); + REGION_INIT (pScreen, &pWin->winSize, &box, 1); + REGION_COPY (pScreen, &pWin->borderSize, &pWin->winSize); + REGION_COPY (pScreen, &pWin->clipList, &pWin->winSize); + REGION_COPY (pScreen, &pWin->borderClip, &pWin->winSize); + + miSendExposures (pWin, &pWin->borderClip, + pWin->drawable.x, pWin->drawable.y); + } + + SCREEN_WRAP (pScreen, ResizeWindow); + NORMAL_ROOT (pWin); + + if (winRec != NULL) + { + FinishFrameResize (pWin, TRUE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW, resize_after); + } + + RL_DEBUG_MSG("resizewindow end\n"); +} + +void +RootlessRepositionWindow (WindowPtr pWin) +{ + RootlessWindowRec *winRec = WINREC (pWin); + ScreenPtr pScreen = pWin->drawable.pScreen; + xp_window_changes wc; + int sx, sy; + + if (IsRoot (pWin)) + set_screen_origin (pWin); + + if (winRec == NULL) + return; + + RootlessStopDrawing (pWin, FALSE); + + sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; + sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + + wc.x = sx + winRec->x; + wc.y = sy + winRec->y; + + if (!rootlessHasRoot (pScreen)) + wc.window_level = normal_window_levels[winRec->level]; + else + wc.window_level = rooted_window_levels[winRec->level]; + + configure_window (winRec->wid, XP_ORIGIN | XP_WINDOW_LEVEL, &wc); + + RootlessReorderWindow (pWin); +} + +void +RootlessFlushWindowColormap (WindowPtr pWin) +{ + RootlessWindowRec *winRec = WINREC (pWin); + xp_window_changes wc; + + if (winRec == NULL) + return; + + RootlessStopDrawing (pWin, FALSE); + + /* This is how we tell xp that the colormap may have changed. */ + + wc.colormap = rootlessColormapCallback; + wc.colormap_data = pWin->drawable.pScreen; + + configure_window (winRec->wid, XP_COLORMAP, &wc); +} + +/* Set the Pixmaps on all ParentRelative windows up the ancestor chain. */ +static void +SetPixmapOfAncestors (WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + WindowPtr topWin = TopLevelParent (pWin); + RootlessWindowRec *topWinRec = WINREC (topWin); + XID pixel; + + while (pWin->backgroundState == ParentRelative) + { + if (pWin == topWin) + { + /* disallow ParentRelative background state on top level */ + + pixel = 0; + ChangeWindowAttributes(pWin, CWBackPixel, &pixel, serverClient); + + RL_DEBUG_MSG("Cleared ParentRelative on 0x%x.\n", pWin); + break; + } + + pWin = pWin->parent; + pScreen->SetWindowPixmap (pWin, topWinRec->pixmap); + } +} + +/* RootlessPaintWindowBackground + Paint the window background while filling in the alpha channel + with all on. */ +void +RootlessPaintWindowBackground (WindowPtr pWin, RegionPtr pRegion, int what) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + + SCREEN_UNWRAP (pScreen, PaintWindowBackground); + + RL_DEBUG_MSG("paintwindowbackground start (win 0x%x, framed %i)\n", + pWin, IsFramedWindow(pWin)); + + if (IsFramedWindow (pWin)) + { + /* Don't bother trying to paint the surface background.. */ + rootlessNoDRIDrawing++; + + RootlessStartDrawing (pWin); + RootlessDamageRegion (pWin, pRegion); + + /* For ParentRelative windows, we have to make sure the window + pixmap is set correctly all the way up the ancestor chain. */ + + if (pWin->backgroundState == ParentRelative) + SetPixmapOfAncestors (pWin); + + pScreen->PaintWindowBackground (pWin, pRegion, what); + + rootlessNoDRIDrawing--; + } + + SCREEN_WRAP (pScreen, PaintWindowBackground); + + RL_DEBUG_MSG("paintwindowbackground end\n"); +} + + +/* RootlessPaintWindowBorder + Paint the window border while filling in the alpha channel with all on. */ +void +RootlessPaintWindowBorder (WindowPtr pWin, RegionPtr pRegion, int what) +{ + SCREEN_UNWRAP (pWin->drawable.pScreen, PaintWindowBorder); + + RL_DEBUG_MSG("paintwindowborder start (win 0x%x)\n", pWin); + + if (IsFramedWindow (pWin)) + { + RootlessStartDrawing (pWin); + RootlessDamageRegion (pWin, pRegion); + + /* For ParentRelative windows with tiled borders, we have to make + sure the window pixmap is set correctly all the way up the + ancestor chain. */ + + if (!pWin->borderIsPixel && pWin->backgroundState == ParentRelative) + SetPixmapOfAncestors (pWin); + } + + pWin->drawable.pScreen->PaintWindowBorder (pWin, pRegion, what); + + SCREEN_WRAP (pWin->drawable.pScreen, PaintWindowBorder); + + RL_DEBUG_MSG("paintwindowborder end\n"); +} + + +/* FIXME: untested! + pWin inside corner stays the same; pWin->drawable.[xy] stays the same + frame moves and resizes */ +void +RootlessChangeBorderWidth (WindowPtr pWin, unsigned int width) +{ + RegionRec saveRoot; + Bool resize_after = FALSE; + + RL_DEBUG_MSG("change border width\n"); + + if ((int) width != wBorderWidth (pWin)) + { + RootlessWindowRec *winRec = WINREC(pWin); + + int oldX = 0, oldY = 0, newX = 0, newY = 0; + unsigned int oldW = 0, oldH = 0, oldBW = 0; + unsigned int newW = 0, newH = 0, newBW = 0; + + if (winRec != NULL) + { + oldBW = winRec->borderWidth; + oldX = winRec->x; + oldY = winRec->y; + oldW = winRec->width; + oldH = winRec->height; + + newBW = width; + newX = pWin->drawable.x - newBW; + newY = pWin->drawable.y - newBW; + newW = pWin->drawable.width + 2*newBW; + newH = pWin->drawable.height + 2*newBW; + + resize_after = StartFrameResize (pWin, FALSE, + oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW); + } + + HUGE_ROOT (pWin); + SCREEN_UNWRAP (pWin->drawable.pScreen, ChangeBorderWidth); + + pWin->drawable.pScreen->ChangeBorderWidth (pWin, width); + + SCREEN_WRAP (pWin->drawable.pScreen, ChangeBorderWidth); + NORMAL_ROOT (pWin); + + if (winRec != NULL) + { + FinishFrameResize (pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, + newX, newY, newW, newH, newBW, resize_after); + } + } + + RL_DEBUG_MSG("change border width end\n"); +} + +/* + * RootlessFillRegionTiled + * Fill using a tile while leaving the alpha channel untouched. + * Based on fbfillRegionTiled. + */ +static void +RootlessFillRegionTiled( + DrawablePtr pDrawable, + RegionPtr pRegion, + PixmapPtr pTile) +{ + FbBits *dst; + FbStride dstStride; + int dstBpp; + int dstXoff, dstYoff; + FbBits *tile; + FbStride tileStride; + int tileBpp; + int tileXoff, tileYoff; /* XXX assumed to be zero */ + int tileWidth, tileHeight; + int n = REGION_NUM_RECTS(pRegion); + BoxPtr pbox = REGION_RECTS(pRegion); + int xRot = pDrawable->x; + int yRot = pDrawable->y; + FbBits planeMask; + +#ifdef PANORAMIX + if(!noPanoramiXExtension) + { + int index = pDrawable->pScreen->myNum; + if(&WindowTable[index]->drawable == pDrawable) + { + xRot -= panoramiXdataPtr[index].x; + yRot -= panoramiXdataPtr[index].y; + } + } +#endif + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + fbGetDrawable (&pTile->drawable, tile, tileStride, tileBpp, + tileXoff, tileYoff); + tileWidth = pTile->drawable.width; + tileHeight = pTile->drawable.height; + xRot += dstXoff; + yRot += dstYoff; + planeMask = FB_ALLONES & ~RootlessAlphaMask(dstBpp); + + while (n--) + { + fbTile (dst + (pbox->y1 + dstYoff) * dstStride, + dstStride, + (pbox->x1 + dstXoff) * dstBpp, + (pbox->x2 - pbox->x1) * dstBpp, + pbox->y2 - pbox->y1, + tile, + tileStride, + tileWidth * dstBpp, + tileHeight, + GXcopy, + planeMask, + dstBpp, + xRot * dstBpp, + yRot - pbox->y1); + pbox++; + } +} + +/* + * RootlessPaintWindow + * Paint the window while filling in the alpha channel with all on. + * We can't use fbPaintWindow because it zeros the alpha channel. + */ +void +RootlessPaintWindow( + WindowPtr pWin, + RegionPtr pRegion, + int what) +{ + switch (what) { + case PW_BACKGROUND: + + switch (pWin->backgroundState) { + case None: + break; + case ParentRelative: + do { + pWin = pWin->parent; + } while (pWin->backgroundState == ParentRelative); + (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion, + what); + break; + case BackgroundPixmap: + RootlessFillRegionTiled (&pWin->drawable, + pRegion, + pWin->background.pixmap); + break; + case BackgroundPixel: + { + Pixel pixel = pWin->background.pixel | + RootlessAlphaMask(pWin->drawable.bitsPerPixel); + fbFillRegionSolid (&pWin->drawable, pRegion, 0, + fbReplicatePixel (pixel, + pWin->drawable.bitsPerPixel)); + break; + } + } + break; + case PW_BORDER: + if (pWin->borderIsPixel) + { + Pixel pixel = pWin->border.pixel | + RootlessAlphaMask(pWin->drawable.bitsPerPixel); + fbFillRegionSolid (&pWin->drawable, pRegion, 0, + fbReplicatePixel (pixel, + pWin->drawable.bitsPerPixel)); + } + else + { + WindowPtr pBgWin; + for (pBgWin = pWin; pBgWin->backgroundState == ParentRelative; + pBgWin = pBgWin->parent); + + RootlessFillRegionTiled (&pBgWin->drawable, + pRegion, + pWin->border.pixmap); + } + break; + } + fbValidateDrawable (&pWin->drawable); +} diff --git a/synfig-osx/launcher/rootless-window.h b/synfig-osx/launcher/rootless-window.h new file mode 100644 index 0000000..097afc4 --- /dev/null +++ b/synfig-osx/launcher/rootless-window.h @@ -0,0 +1,65 @@ +/* + * Rootless window management + * + * Greg Parker gparker@cs.stanford.edu + */ + +/* Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. */ + +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessWindow.h,v 1.2 2002/04/03 00:06:32 torrey Exp $ */ + +#ifndef _ROOTLESSWINDOW_H +#define _ROOTLESSWINDOW_H + +#include "rootless-common.h" + +Bool RootlessCreateWindow(WindowPtr pWin); +Bool RootlessDestroyWindow(WindowPtr pWin); + +#ifdef SHAPE +void RootlessSetShape(WindowPtr pWin); +#endif // SHAPE + +Bool RootlessChangeWindowAttributes(WindowPtr pWin, unsigned long vmask); +Bool RootlessPositionWindow(WindowPtr pWin, int x, int y); +Bool RootlessRealizeWindow(WindowPtr pWin); +Bool RootlessUnrealizeWindow(WindowPtr pWin); +void RootlessReparentWindow(WindowPtr pWin, WindowPtr pPriorParent); +void RootlessRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib); +void RootlessCopyWindow(WindowPtr pWin,DDXPointRec ptOldOrg,RegionPtr prgnSrc); +void RootlessMoveWindow(WindowPtr pWin,int x,int y,WindowPtr pSib,VTKind kind); +void RootlessResizeWindow(WindowPtr pWin, int x, int y, + unsigned int w, unsigned int h, WindowPtr pSib); +void RootlessPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, + int what); +void RootlessPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, + int what); +void RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width); +void RootlessPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what); + +#endif diff --git a/synfig-osx/launcher/rootless.h b/synfig-osx/launcher/rootless.h new file mode 100644 index 0000000..93b3542 --- /dev/null +++ b/synfig-osx/launcher/rootless.h @@ -0,0 +1,61 @@ +/* + * External interface to generic rootless mode + * + * Greg Parker gparker@cs.stanford.edu March 3, 2001 + */ + +/* Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. */ + +/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootless.h,v 1.2 2002/08/28 06:41:26 torrey Exp $ */ + +#ifndef _ROOTLESS_H +#define _ROOTLESS_H + +#include "mi.h" +#include "gcstruct.h" + +#include "Xplugin.h" + +/* Initialize rootless mode on the given screen. */ +extern Bool RootlessSetupScreen(int index, ScreenPtr pScreen); + +extern void RootlessUpdateScreenPixmap (ScreenPtr pScreen); + +extern xp_window_id RootlessGetPhysicalWindow (WindowPtr pWin, Bool create); +extern WindowPtr RootlessGetXWindow (xp_window_id wid); + +extern int RootlessKnowsWindowNumber (int number); + +extern void RootlessDisableUpdate (WindowPtr pWin); +extern void RootlessReenableUpdate (WindowPtr pWin); + +extern void RootlessUpdateRooted (Bool state); +extern void RootlessHideAllWindows (void); +extern void RootlessShowAllWindows (void); + +#endif /* _ROOTLESS_H */ diff --git a/synfig-osx/launcher/sif_file.icns b/synfig-osx/launcher/sif_file.icns new file mode 100644 index 0000000000000000000000000000000000000000..3092df60cfa8bb35ec5919607b73a5d3d64455b5 GIT binary patch literal 50361 zcmeIb2V7Lw);@e@r~}e_QJOSC1r((hVd!0Yuc7xMgf=s@&`anLx}k?2Krnz96}Yx* zy|x!ijCySm^=gWI>kLH@mC=j8_x=69Ou{&G&fd>jd+oK?*=Ij%pYit!iA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k^rDxqNtEz`SiQG5j05Q9J_RU5c;iK{~)HpVN(QP|-E2(K4SU7lxC074y zgFE4)@)0aG{U%oU{pQWWTcvmI(KNF2iEjQtAp6Y2AD53{uv9egtM3f(6SO>nVls;R zETTSB&$K0!VLy+MQ9 z{sExRJp4)WQ4PdCQ_u&heWH8>5&8hoXCD4!`CC3y&mVU++-4OEXV;B-IhyR|rF%!h$G=ju2<_OTv{5fb8Np5K +Eric Sunshine, 1 December 2000 + +OVERVIEW +======== +This package contains the diagnostic utility dumpkeymap, as well as highly +detailed documentation describing the internal layout of the Apple/NeXT +.keymapping file. + +The dumpkeymap utility displays detailed information about each .keymapping +file mentioned on the command-line. On Apple and NeXT platforms, if no +.keymapping files are mentioned on the command-line, then it will instead +dissect the key mapping currently in use by the WindowServer and AppKit. + +Documentation includes a thorough and detailed description of the internal +layout of the .keymapping file, as well as an explanation of how to interpret +the output of dumpkeymap. + +The complete set of documentation is available for perusal via dumpkeymap's +manual page (dumpkeymap.1), as well as via the command-line options described +below. + + --help + Usage summary. + --help-keymapping + Detailed discussion of the internal format of a .keymapping file. + --help-output + Explanation of dumpkeymap's output. + --help-files + List of key mapping-related files and directories. + --help-diagnostics + Explanation of diagnostic messages. + +Once the manual page is been installed, documentation can also be accessed +with the Unix `man' command: + + % man dumpkeymap + + +COMPILATION +=========== +MacOS/X, Darwin + + cc -Wall -o dumpkeymap dumpkeymap.c -framework IOKit + +MacOS/X DP4 (Developer Preview 4) + + cc -Wall -o dumpkeymap dumpkeymap.c -FKernel -framework IOKit + +MacOS/X Server, OpenStep, NextStep + + cc -Wall -o dumpkeymap dumpkeymap.c + +By default, dumpkeymap is configured to interface with the HID driver (Apple) +or event-status driver (NeXT), thus allowing it to dump the key mapping which +is currently in use by the WindowServer and AppKit. However, these facilities +are specific to Apple/NeXT. In order to build dumpkeymap for non-Apple/NeXT +platforms, you must define the DUMPKEYMAP_FILE_ONLY flag when compiling the +program. This flag inhibits use of the HID and event-status drivers and +configures dumpkeymap to work strictly with raw key mapping files. + +For example, to compile for Linux: + + gcc -Wall -DDUMPKEYMAP_FILE_ONLY -o dumpkeymap dumpkeymap.c + + +INSTALLATION +============ +Install the dumpkeymap executable image in a location mentioned in the PATH +environment variable. Typicall locations for executable files are: + + /usr/local/bin + $(HOME)/bin + +Install the manual page, dumpkeymap.1, in the `man1' subdirectory one of the +standard manual page locations or in any other location mentioned by the +MANPATH environment variable. + +Typical locations for manual pages on most Unix platforms are: + + /usr/local/man/man1 + +Typical locations for manual pages on MacOS/X, Darwin, and MacOS/X Server are: + + /usr/local/man/man1 + /Local/Documentation/ManPages/man1 + /Network/Documentation/ManPages/man1 + +Typical locations for manual pages on OpenStep and NextStep are: + + /usr/local/man/man1 + /LocalLibrary/Documentation/ManPages/man1 + /LocalDeveloper/Documentation/ManPages/man1 + + +CONCLUSION +========== +This program and its accompanying documentation were written by Eric Sunshine +and are copyright (C)1999,2000 by Eric Sunshine . + +The implementation of dumpkeymap is based upon information gathered on +September 3, 1997 by Eric Sunshine and Paul S. +McCarthy during an effort to reverse engineer the format +of the NeXT .keymapping file. + + + +$XFree86: xc/programs/Xserver/hw/darwin/utils/README.txt,v 1.2 2000/12/05 21:18:34 dawes Exp $ diff --git a/synfig-osx/launcher/utils/dumpkeymap.c b/synfig-osx/launcher/utils/dumpkeymap.c new file mode 100644 index 0000000..c1b6ea1 --- /dev/null +++ b/synfig-osx/launcher/utils/dumpkeymap.c @@ -0,0 +1,1453 @@ +// $XFree86: xc/programs/Xserver/hw/darwin/utils/dumpkeymap.c,v 1.3 2000/12/05 21:18:34 dawes Exp $ +//============================================================================= +// +// Copyright (C) 1999,2000 by Eric Sunshine +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN +// NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +//============================================================================= +//----------------------------------------------------------------------------- +// dumpkeymap.c +// +// Prints a textual representation of each Apple/NeXT .keymapping file +// mentioned on the command-line. If no files are mentioned and if the +// local machine is an Apple or NeXT installation, then the key mapping +// currently in use by the WindowServer and the AppKit is printed +// instead. +// +// Invoke dumpkeymap with one of the options listed below in order to +// view detailed documentation about .keymapping files and the use of +// this program. +// +// --help: Usage summary. +// --help-keymapping: Detailed discussion of the internal format of a +// .keymapping file. +// --help-output: Explanation of dumpkeymap's output. +// --help-files: List of key mapping-related files and directories. +// --help-diagnostics: Explanation of diagnostic messages. +// +// COMPILATION INSTRUCTIONS +// +// MacOS/X, Darwin +// cc -Wall -o dumpkeymap dumpkeymap.c -framework IOKit +// +// MacOS/X DP4 (Developer Preview 4) +// cc -Wall -o dumpkeymap dumpkeymap.c -FKernel -framework IOKit +// +// MacOS/X Server, OpenStep, NextStep +// cc -Wall -o dumpkeymap dumpkeymap.c +// +// By default, dumpkeymap is configured to interface with the HID driver +// (Apple) or event-status driver (NeXT), thus allowing it to dump the +// key mapping which is currently in use by the WindowServer and AppKit. +// However, these facilities are specific to Apple/NeXT. In order to +// build dumpkeymap for non-Apple/NeXT platforms, you must define the +// DUMPKEYMAP_FILE_ONLY flag when compiling the program. This flag +// inhibits use of the HID and event-status drivers and configures +// dumpkeymap to work strictly with raw key mapping files. +// +// For example, to compile for Linux: +// gcc -Wall -DDUMPKEYMAP_FILE_ONLY -o dumpkeymap dumpkeymap.c +// +// CONCLUSION +// +// This program and its accompanying documentation were written by Eric +// Sunshine and are copyright (C)1999,2000 by Eric Sunshine +// . +// +// The implementation of dumpkeymap is based upon information gathered +// on September 3, 1997 by Eric Sunshine and +// Paul S. McCarthy during an effort to reverse +// engineer the format of the NeXT .keymapping file. +// +// HISTORY +// +// v4 2000/12/01 Eric Sunshine +// Updated manual page to work with `rman', the `man' to `HTML' +// translator. Unfortunately, however, rman is missing important +// roff features such as diversions, indentation, and tab stops, +// and is also hideously buggy, so getting the manual to work with +// rman required quite a few work-arounds. +// The manual page has now been tested with nroff (plain text), troff +// (PostScript, etc.), groff (PostScript), and rman (HTML, etc.) +// +// v3 2000/11/28 Eric Sunshine +// Considerably expanded the documentation. +// Augmented the existing description of .keymapping internals. +// Added these new documentation topics: +// - Output: Very important section describing how to interpret +// the output of dumpkeymap. +// - Files: Lists files and directories related to key mappings. +// - Diagnostics: Explains diagnostic messages issued by +// dumpkeymap. +// Created a manual page (dumpkeymap.1) which contains the complete +// set of documentation for key mapping files and dumpkeymap. +// Added command-line options (--help, --help-keymapping, +// --help-output, --help-files, --help-diagnostics) which allow +// access to all key mapping documentation. Previously the +// description of the internal layout of a .keymapping file was +// only available as source code comments. +// Added --version option. +// Ported to non-Apple/NeXT platforms. Defining the pre-processor +// flag DUMPKEYMAP_FILE_ONLY at compilation time inhibits use of +// Apple/NeXT-specific API. +// Added a README file. +// +// v2 2000/11/13 Eric Sunshine +// Converted from C++ to plain-C. +// Now parses and takes into account the "number-size" flag stored +// with each key map. This flag indicates the size, in bytes, of +// all remaining numeric values in the mapping. Updated all code +// to respect this flag. (Previously, the purpose of this field +// was unknown, and it was thus denoted as +// `KeyMapping::fill[2]'.) +// Updated all documentation; especially the "KEY MAPPING +// DESCRIPTION" section. Added discussion of the "number-size" +// flag and revamped all structure definitions to use the generic +// data type `number' instead of `uchar' or 'byte'. Clarified +// several sections of the documentation and added missing +// discussions about type definitions and the relationship of +// `interface' and `handler_id' to .keymapping and .keyboard +// files. +// Updated compilation instructions to include directions for all +// platforms on which this program might be built. +// Now published under the formal BSD license rather than a +// home-grown license. +// +// v1 1999/09/08 Eric Sunshine +// Created. +//----------------------------------------------------------------------------- +#include +#include +#include +#include +#if !defined(DUMPKEYMAP_FILE_ONLY) +#include +#endif + +#define PROG_NAME "dumpkeymap" +#define PROG_VERSION "4" +#define AUTHOR_NAME "Eric Sunshine" +#define AUTHOR_EMAIL "sunshine@sunshineco.com" +#define AUTHOR_INFO AUTHOR_NAME " <" AUTHOR_EMAIL ">" +#define COPYRIGHT "Copyright (C) 1999,2000 by " AUTHOR_INFO + +typedef unsigned char byte; +typedef unsigned short word; +typedef unsigned int natural; +typedef unsigned long dword; +typedef dword number; + +#define ASCII_SET 0x00 +#define BIND_FUNCTION 0xfe +#define BIND_SPECIAL 0xff + +#define OPT_SWITCH(X) { char const* switched_str__=(X); if (0) { +#define OPT_CASE(X,Y) } else if (strcmp(switched_str__,(#X)) == 0 || \ + strcmp(switched_str__,(#Y)) == 0) { +#define OPT_DEFAULT } else { +#define OPT_SWITCH_END }} + +//----------------------------------------------------------------------------- +// Translation Tables +//----------------------------------------------------------------------------- +static char const* const SPECIAL_CODE[] = + { + "sound-up", + "sound-down", + "brightness-up", + "brightness-down", + "alpha-lock", + "help", + "power", + "secondary-up-arrow", + "secondary-down-arrow" + }; +#define N_SPECIAL_CODE (sizeof(SPECIAL_CODE) / sizeof(SPECIAL_CODE[0])) + +static char const* const MODIFIER_CODE[] = + { + "alpha-lock", + "shift", + "control", + "alternate", + "command", + "keypad", + "help" + }; +#define N_MODIFIER_CODE (sizeof(MODIFIER_CODE) / sizeof(MODIFIER_CODE[0])) + +static char const* const MODIFIER_MASK[] = + { + "-----", // R = carriage-return + "----L", // A = alternate + "---S-", // C = control + "---SL", // S = shift + "--C--", // L = alpha-lock + "--C-L", + "--CS-", + "--CSL", + "-A---", + "-A--L", + "-A-S-", + "-A-SL", + "-AC--", + "-AC-L", + "-ACS-", + "-ACSL", + "R----", + "R---L", + "R--S-", + "R--SL", + "R-C--", + "R-C-L", + "R-CS-", + "R-CSL", + "RA---", + "RA--L", + "RA-S-", + "RA-SL", + "RAC--", + "RAC-L", + "RACS-", + "RACSL", + }; +#define N_MODIFIER_MASK (sizeof(MODIFIER_MASK) / sizeof(MODIFIER_MASK[0])) + +#define FUNCTION_KEY_FIRST 0x20 +static char const* const FUNCTION_KEY[] = + { + "F1", // 0x20 + "F2", // 0x21 + "F3", // 0x22 + "F4", // 0x23 + "F5", // 0x24 + "F6", // 0x25 + "F7", // 0x26 + "F8", // 0x27 + "F9", // 0x28 + "F10", // 0x29 + "F11", // 0x2a + "F12", // 0x2b + "insert", // 0x2c + "delete", // 0x2d + "home", // 0x2e + "end", // 0x2f + "page up", // 0x30 + "page down", // 0x31 + "print screen", // 0x32 + "scroll lock", // 0x33 + "pause", // 0x34 + "sys-request", // 0x35 + "break", // 0x36 + "reset (HIL)", // 0x37 + "stop (HIL)", // 0x38 + "menu (HIL)", // 0x39 + "user (HIL)", // 0x3a + "system (HIL)", // 0x3b + "print (HIL)", // 0x3c + "clear line (HIL)", // 0x3d + "clear display (HIL)", // 0x3e + "insert line (HIL)", // 0x3f + "delete line (HIL)", // 0x40 + "insert char (HIL)", // 0x41 + "delete char (HIL)", // 0x42 + "prev (HIL)", // 0x43 + "next (HIL)", // 0x44 + "select (HIL)", // 0x45 + }; +#define N_FUNCTION_KEY (sizeof(FUNCTION_KEY) / sizeof(FUNCTION_KEY[0])) + + +//----------------------------------------------------------------------------- +// Data Stream Object +// Can be configured to treat embedded "numbers" as being composed of +// either 1, 2, or 4 bytes, apiece. +//----------------------------------------------------------------------------- +typedef struct _DataStream + { + byte const* data; + byte const* data_end; + natural number_size; // Size in bytes of a "number" in the stream. + } DataStream; + +static DataStream* new_data_stream( byte const* data, int size ) + { + DataStream* s = (DataStream*)malloc( sizeof(DataStream) ); + s->data = data; + s->data_end = data + size; + s->number_size = 1; // Default to byte-sized numbers. + return s; + } + +static void destroy_data_stream( DataStream* s ) + { + free(s); + } + +static int end_of_stream( DataStream* s ) + { + return (s->data >= s->data_end); + } + +static void expect_nbytes( DataStream* s, int nbytes ) + { + if (s->data + nbytes > s->data_end) + { + fputs( "Insufficient data in keymapping data stream.\n", stderr ); + exit(-1); + } + } + +static byte get_byte( DataStream* s ) + { + expect_nbytes( s, 1 ); + return *s->data++; + } + +static word get_word( DataStream* s ) + { + word hi, lo; + expect_nbytes( s, 2 ); + hi = *s->data++; + lo = *s->data++; + return ((hi << 8) | lo); + } + +static dword get_dword( DataStream* s ) + { + dword b1, b2, b3, b4; + expect_nbytes( s, 4 ); + b4 = *s->data++; + b3 = *s->data++; + b2 = *s->data++; + b1 = *s->data++; + return ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1); + } + +static number get_number( DataStream* s ) + { + switch (s->number_size) + { + case 4: return get_dword(s); + case 2: return get_word(s); + default: return get_byte(s); + } + } + + +//----------------------------------------------------------------------------- +// Translation Utility Functions +//----------------------------------------------------------------------------- +static char const* special_code_desc( number n ) + { + if (n < N_SPECIAL_CODE) + return SPECIAL_CODE[n]; + else + return "invalid"; + } + +static char const* modifier_code_desc( number n ) + { + if (n < N_MODIFIER_CODE) + return MODIFIER_CODE[n]; + else + return "invalid"; + } + +static char const* modifier_mask_desc( number n ) + { + if (n < N_MODIFIER_MASK) + return MODIFIER_MASK[n]; + else + return "?????"; + } + +static char const* function_key_desc( number n ) + { + if (n >= FUNCTION_KEY_FIRST && n < N_FUNCTION_KEY + FUNCTION_KEY_FIRST) + return FUNCTION_KEY[ n - FUNCTION_KEY_FIRST ]; + else + return "unknown"; + } + +static number bits_set( number mask ) + { + number n = 0; + for ( ; mask != 0; mask >>= 1) + if ((mask & 0x01) != 0) + n++; + return n; + } + + +//----------------------------------------------------------------------------- +// Unparse a list of Modifier records. +//----------------------------------------------------------------------------- +static void unparse_modifiers( DataStream* s ) + { + number nmod = get_number(s); // Modifier count + printf( "MODIFIERS [%lu]\n", nmod ); + while (nmod-- > 0) + { + number nscan; + number const code = get_number(s); + printf( "%s:", modifier_code_desc(code) ); + nscan = get_number(s); + while (nscan-- > 0) + printf( " 0x%02x", (natural)get_number(s) ); + putchar( '\n' ); + } + putchar( '\n' ); + } + + +//----------------------------------------------------------------------------- +// Unparse a list of Character records. +//----------------------------------------------------------------------------- +typedef void (*UnparseSpecialFunc)( number code ); + +static void unparse_char_codes( + DataStream* s, number ncodes, UnparseSpecialFunc unparse_special ) + { + if (ncodes != 0) + { + while (ncodes-- > 0) + { + number const char_set = get_number(s); + number const code = get_number(s); + putchar(' '); + switch (char_set) + { + case ASCII_SET: + { + int const c = (int)code; + if (isprint(c)) + printf( "\"%c\"", c ); + else if (code < ' ') + printf( "\"^%c\"", c + '@' ); + else + printf( "%02x", c ); + break; + } + case BIND_FUNCTION: + printf( "[%s]", function_key_desc(code) ); + break; + case BIND_SPECIAL: + unparse_special( code ); + break; + default: + printf( "%02x/%02x", (natural)char_set, (natural)code ); + break; + } + } + } + } + + +//----------------------------------------------------------------------------- +// Unparse a list of scan code bindings. +//----------------------------------------------------------------------------- +static void unparse_key_special( number code ) + { + printf( "{seq#%lu}", code ); + } + +static void unparse_characters( DataStream* s ) + { + number const NOT_BOUND = 0xff; + number const nscans = get_number(s); + number scan; + printf( "CHARACTERS [%lu]\n", nscans ); + for (scan = 0; scan < nscans; scan++) + { + number const mask = get_number(s); + printf( "scan 0x%02x: ", (natural)scan ); + if (mask == NOT_BOUND) + fputs( "not-bound\n", stdout ); + else + { + number const bits = bits_set( mask ); + number const codes = 1 << bits; + printf( "%s ", modifier_mask_desc(mask) ); + unparse_char_codes( s, codes, unparse_key_special ); + putchar( '\n' ); + } + } + putchar( '\n' ); + } + + +//----------------------------------------------------------------------------- +// Unparse a list of key sequences. +//----------------------------------------------------------------------------- +static void unparse_sequence_special( number code ) + { + printf( "{%s}", (code == 0 ? "unmodify" : modifier_code_desc(code)) ); + } + +static void unparse_sequences( DataStream* s ) + { + number const nseqs = get_number(s); + number seq; + printf( "SEQUENCES [%lu]\n", nseqs ); + for (seq = 0; seq < nseqs; seq++) + { + number const nchars = get_number(s); + printf( "sequence %lu:", seq ); + unparse_char_codes( s, nchars, unparse_sequence_special ); + putchar( '\n' ); + } + putchar( '\n' ); + } + + +//----------------------------------------------------------------------------- +// Unparse a list of special keys. +//----------------------------------------------------------------------------- +static void unparse_specials( DataStream* s ) + { + number nspecials = get_number(s); + printf( "SPECIALS [%lu]\n", nspecials ); + while (nspecials-- > 0) + { + number const special = get_number(s); + number const scan = get_number(s); + printf( "%s: 0x%02x\n", special_code_desc(special), (natural)scan ); + } + putchar( '\n' ); + } + + +//----------------------------------------------------------------------------- +// Unparse the number-size flag. +//----------------------------------------------------------------------------- +static void unparse_numeric_size( DataStream* s ) + { + word const numbers_are_shorts = get_word(s); + s->number_size = numbers_are_shorts ? 2 : 1; + } + + +//----------------------------------------------------------------------------- +// Unparse an entire key map. +//----------------------------------------------------------------------------- +static void unparse_keymap_data( DataStream* s ) + { + unparse_numeric_size(s); + unparse_modifiers(s); + unparse_characters(s); + unparse_sequences(s); + unparse_specials(s); + } + + +//----------------------------------------------------------------------------- +// Unparse the active key map. +//----------------------------------------------------------------------------- +#if !defined(DUMPKEYMAP_FILE_ONLY) +static int unparse_active_keymap( void ) + { + int rc = 1; + NXEventHandle const h = NXOpenEventStatus(); + if (h == 0) + fputs( "Unable to open event status driver.\n", stderr ); + else + { + NXKeyMapping km; + km.size = NXKeyMappingLength(h); + if (km.size <= 0) + fprintf( stderr, "Bad key mapping length (%d).\n", km.size ); + else + { + km.mapping = (char*)malloc( km.size ); + if (NXGetKeyMapping( h, &km ) == 0) + fputs( "Unable to get current key mapping.\n", stderr ); + else + { + DataStream* stream = + new_data_stream( (byte const*)km.mapping, km.size ); + fputs( "=============\nACTIVE KEYMAP\n=============\n\n", + stdout); + unparse_keymap_data( stream ); + destroy_data_stream( stream ); + rc = 0; + } + free( km.mapping ); + } + NXCloseEventStatus(h); + } + return rc; + } +#endif + + +//----------------------------------------------------------------------------- +// Unparse one key map from a keymapping file. +//----------------------------------------------------------------------------- +static void unparse_keymap( DataStream* s ) + { + dword const interface = get_dword(s); + dword const handler_id = get_dword(s); + dword const map_size = get_dword(s); + printf( "interface: 0x%02lx\nhandler_id: 0x%02lx\nmap_size: %lu bytes\n\n", + interface, handler_id, map_size ); + unparse_keymap_data(s); + } + + +//----------------------------------------------------------------------------- +// Check the magic number of a keymapping file. +//----------------------------------------------------------------------------- +static int check_magic_number( DataStream* s ) + { + return (get_byte(s) == 'K' && + get_byte(s) == 'Y' && + get_byte(s) == 'M' && + get_byte(s) == '1'); + } + + +//----------------------------------------------------------------------------- +// Unparse all key maps within a keymapping file. +//----------------------------------------------------------------------------- +static int unparse_keymaps( DataStream* s ) + { + int rc = 0; + if (check_magic_number(s)) + { + int n = 1; + while (!end_of_stream(s)) + { + printf( "---------\nKEYMAP #%d\n---------\n", n++ ); + unparse_keymap(s); + } + } + else + { + fputs( "Bad magic number.\n", stderr ); + rc = 1; + } + return rc; + } + + +//----------------------------------------------------------------------------- +// Unparse a keymapping file. +//----------------------------------------------------------------------------- +static int unparse_keymap_file( char const* const path ) + { + int rc = 1; + FILE* file; + printf( "===========\nKEYMAP FILE\n===========\n%s\n\n", path ); + file = fopen( path, "rb" ); + if (file == 0) + perror( "Unable to open key mapping file" ); + else + { + struct stat st; + if (fstat( fileno(file), &st ) != 0) + perror( "Unable to determine key mapping file size" ); + else + { + byte* buffer = (byte*)malloc( st.st_size ); + if (fread( buffer, st.st_size, 1, file ) != 1) + perror( "Unable to read key mapping file" ); + else + { + DataStream* stream = new_data_stream(buffer, (int)st.st_size); + fclose( file ); file = 0; + rc = unparse_keymaps( stream ); + destroy_data_stream( stream ); + } + free( buffer ); + } + if (file != 0) + fclose( file ); + } + return rc; + } + + +//----------------------------------------------------------------------------- +// Handle the case when no documents are mentioned on the command-line. For +// Apple/NeXT platforms, dump the currently active key mapping; else display +// an error message. +//----------------------------------------------------------------------------- +static int handle_empty_document_list( void ) + { +#if !defined(DUMPKEYMAP_FILE_ONLY) + return unparse_active_keymap(); +#else + fputs( "ERROR: Must specify at least one .keymapping file.\n\n", stderr ); + return 1; +#endif + } + + +//----------------------------------------------------------------------------- +// Print a detailed description of the internal layout of a key mapping. +//----------------------------------------------------------------------------- +static void print_internal_layout_info( FILE* f ) + { + fputs( +"What follows is a detailed descriptions of the internal layout of an\n" +"Apple/NeXT .keymapping file.\n" +"\n" +"Types and Data\n" +"--------------\n" +"The following type definitions are employed throughout this discussion:\n" +"\n" +" typedef unsigned char byte;\n" +" typedef unsigned short word;\n" +" typedef unsigned long dword;\n" +"\n" +"Additionally, the type definition `number' is used generically to indicate\n" +"a numeric value. The actual size of the `number' type may be one or two\n" +"bytes depending upon how the data is stored in the key map. Although most\n" +"key maps use byte-sized numeric values, word-sized values are also allowed.\n" +"\n" +"Multi-byte values in a key mapping file are stored in big-endian byte\n" +"order.\n" +"\n" +"Key Mapping File and Device Mapping\n" +"-----------------------------------\n" +"A key mapping file begins with a magic-number and continues with a variable\n" +"number of device-specific key mappings.\n" +"\n" +" struct KeyMappingFile {\n" +" char magic_number[4]; // `KYM1'\n" +" DeviceMapping maps[...]; // Variable number of maps\n" +" };\n" +"\n" +" struct DeviceMapping {\n" +" dword interface; // Interface type\n" +" dword handler_id; // Interface subtype\n" +" dword map_size; // Byte count of `map' (below)\n" +" KeyMapping map;\n" +" };\n" +"\n" +"The value of `interface' represents a family of keyboard device types\n" +"(such as Intel PC, ADB, NeXT, Sun Type5, etc.), and is generally\n" +"specified as one of the constant values NX_EVS_DEVICE_INTERFACE_ADB,\n" +"NX_EVS_DEVICE_INTERFACE_ACE, etc., which are are defined in IOHIDTypes.h on\n" +"MacOS/X and Darwin, and in ev_types.h on MacOS/X Server, OpenStep, and\n" +"NextStep.\n" +"\n" +"The value of `handler_id' represents a specific keyboard layout within the\n" +"much broader `interface' family. For instance, for a 101-key Intel PC\n" +"keyboard (of type NX_EVS_DEVICE_INTERFACE_ACE) the `handler_id' is '0',\n" +"whereas for a 102-key keyboard it is `1'.\n" +"\n" +"Together, `interface' and `handler_id' identify the exact keyboard hardware\n" +"to which this mapping applies. Programs which display a visual\n" +"representation of a keyboard layout, match `interface' and `handler_id'\n" +"from the .keymapping file against the `interface' and `handler_id' values\n" +"found in each .keyboard file.\n" +"\n" +"Key Mapping\n" +"-----------\n" +"A key mapping completely defines the relationship of all scan codes with\n" +"their associated functionality. A KeyMapping structure is embedded within\n" +"the DeviceMapping structure in a KeyMappingFile. The key mapping currently\n" +"in use by the WindowServer and AppKit is also represented by a KeyMapping\n" +"structure, and can be referred to directly by calling NXGetKeyMapping() and\n" +"accessing the `mapping' data member of the returned NXKeyMapping structure.\n" +"\n" +" struct KeyMapping {\n" +" word number_size; // 0=1 byte, non-zero=2 bytes\n" +" number num_modifier_groups; // Modifier groups\n" +" ModifierGroup modifier_groups[...];\n" +" number num_scan_codes; // Scan groups\n" +" ScanGroup scan_table[...];\n" +" number num_sequence_lists; // Sequence lists\n" +" Sequence sequence_lists[...];\n" +" number num_special_keys; // Special keys\n" +" SpecialKey special_key[...];\n" +" };\n" +"\n" +"The `number_size' flag determines the size, in bytes, of all remaining\n" +"numeric values (denoted by the type definition `number') within the key\n" +"mapping. If its value is zero, then numbers are represented by a single\n" +"byte. If it is non-zero, then numbers are represented by a word (two\n" +"bytes).\n" +"\n" +"Modifier Group\n" +"--------------\n" +"A modifier group defines all scan codes which map to a particular type of\n" +"modifier, such as `shift', `control', etc.\n" +"\n" +" enum Modifier {\n" +" ALPHALOCK = 0,\n" +" SHIFT,\n" +" CONTROL,\n" +" ALTERNATE,\n" +" COMMAND,\n" +" KEYPAD,\n" +" HELP\n" +" };\n" +"\n" +" struct ModifierGroup {\n" +" number modifier; // A Modifier constant\n" +" number num_scan_codes;\n" +" number scan_codes[...]; // Variable number of scan codes\n" +" };\n" +"\n" +"The scan_codes[] array contains a list of all scan codes which map to the\n" +"specified modifier. The `shift', `command', and `alternate' modifiers are\n" +"frequently mapped to two different scan codes, apiece, since these\n" +"modifiers often appear on both the left and right sides of the keyboard.\n" +"\n" +"Scan Group\n" +"----------\n" +"There is one ScanGroup for each scan code generated by the given keyboard.\n" +"This number is given by KeyMapping::num_scan_codes. The first scan group\n" +"represents hardware scan code 0, the second represents scan code 1, etc.\n" +"\n" +" enum ModifierMask {\n" +" ALPHALOCK_MASK = 1 << 0,\n" +" SHIFT_MASK = 1 << 1,\n" +" CONTROL_MASK = 1 << 2,\n" +" ALTERNATE_MASK = 1 << 3,\n" +" CARRIAGE_RETURN_MASK = 1 << 4\n" +" };\n" +" #define NOT_BOUND 0xff\n" +"\n" +" struct ScanGroup {\n" +" number mask;\n" +" Character characters[...];\n" +" };\n" +"\n" +"For each scan code, `mask' defines which modifier combinations generate\n" +"characters. If `mask' is NOT_BOUND (0xff) then then this scan code does\n" +"not generate any characters ever, and its characters[] array is zero\n" +"length. Otherwise, the characters[] array contains one Character record\n" +"for each modifier combination.\n" +"\n" +"The number of records in characters[] is determined by computing (1 <<\n" +"bits_set_in_mask). In other words, if mask is zero, then zero bits are\n" +"set, so characters[] contains only one record. If `mask' is (SHIFT_MASK |\n" +"CONTROL_MASK), then two bits are set, so characters[] contains four\n" +"records.\n" +"\n" +"The first record always represents the character which is generated by that\n" +"key when no modifiers are active. The remaining records represent\n" +"characters generated by the various modifier combinations. Using the\n" +"example with the `shift' and `control' masks set, record two would\n" +"represent the character with the `shift' modifier active; record three, the\n" +"`control' modifier active; and record four, both the `shift' and `control'\n" +"modifiers active.\n" +"\n" +"As a special case, ALPHALOCK_MASK implies SHIFT_MASK, though only\n" +"ALPHALOCK_MASK appears in `mask'. In this case the same character is\n" +"generated for both the `shift' and `alpha-lock' modifiers, but only needs\n" +"to appear once in the characters[] array.\n" +"\n" +"CARRIAGE_RETURN_MASK does not actually refer to a modifier key. Instead,\n" +"it is used to distinguish the scan code which is given the special\n" +"pseudo-designation of `carriage return' key. Typically, this mask appears\n" +"solo in a ScanGroup record and only the two Character records for control-M\n" +"and control-C follow. This flag may be a throwback to an earlier time or\n" +"may be specially interpreted by the low-level keyboard driver, but its\n" +"purpose is otherwise enigmatic.\n" +"Character\n" +"---------\n" +"Each Character record indicates the character generated when this key is\n" +"pressed, as well as the character set which contains the character. Well\n" +"known character sets are `ASCII' and `Symbol'. The character set can also\n" +"be one of the meta values FUNCTION_KEY or KEY_SEQUENCE. If it is\n" +"FUNCTION_KEY then `char_code' represents a generally well-known function\n" +"key such as those enumerated by FunctionKey. If the character set is\n" +"KEY_SEQUENCE then `char_code' represents a zero-base index into\n" +"KeyMapping::sequence_lists[].\n" +"\n" +" enum CharacterSet {\n" +" ASCII = 0x00,\n" +" SYMBOL = 0x01,\n" +" ...\n" +" FUNCTION_KEY = 0xfe,\n" +" KEY_SEQUENCE = 0xff\n" +" };\n" +"\n" +" struct Character {\n" +" number set; // CharacterSet of generated character\n" +" number char_code; // Actual character generated\n" +" };\n" +"\n" +" enum FunctionKey {\n" +" F1 = 0x20, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,\n" +" INSERT, DELETE, HOME, END, PAGE_UP, PAGE_DOWN, PRINT_SCREEN,\n" +" SCROLL_LOCK, PAUSE, SYS_REQUEST, BREAK, RESET, STOP, MENU, USER,\n" +" SYSTEM, PRINT, CLEAR_LINE, CLEAR_DISPLAY, INSERT_LINE,\n" +" DELETE_LINE, INSERT_CHAR, DELETE_CHAR, PREV, NEXT, SELECT\n" +" };\n" +"\n" +"Sequence\n" +"--------\n" +"When Character::set contains the meta value KEY_SEQUENCE, the scan code is\n" +"bound to a sequence of keys rather than a single character. A sequence is\n" +"a series of modifiers and characters which are automatically generated when\n" +"the associated key is depressed.\n" +"\n" +" #define MODIFIER_KEY 0xff\n" +"\n" +" struct Sequence {\n" +" number num_chars;\n" +" Character characters[...];\n" +" };\n" +"\n" +"Each generated Character is represented as previously described, with the\n" +"exception that MODIFIER_KEY may appear in place of KEY_SEQUENCE. When the\n" +"value of Character::set is MODIFIER_KEY then Character::char_code\n" +"represents a modifier key rather than an actual character. If the modifier\n" +"represented by `char_code' is non-zero, then it indicates that the\n" +"associated modifier key has been depressed. In this case, the value is one\n" +"of the constants enumerated by Modifier (SHIFT, CONTROL, ALTERNATE, etc.).\n" +"If the value is zero then it means that the modifier keys have been\n" +"released.\n" +"\n" +"Special Key\n" +"-----------\n" +"A special key is one which is scanned directly by the Mach kernel rather\n" +"than by the WindowServer. In general, events are not generated for special\n" +"keys.\n" +"\n" +" enum SpecialKeyType {\n" +" VOLUME_UP = 0,\n" +" VOLUME_DOWN,\n" +" BRIGHTNESS_UP,\n" +" BRIGHTNESS_DOWN,\n" +" ALPHA_LOCK,\n" +" HELP,\n" +" POWER,\n" +" SECONDARY_ARROW_UP,\n" +" SECONDARY_ARROW_DOWN\n" +" };\n" +"\n" +" struct SpecialKey {\n" +" number type; // A SpecialKeyType constant\n" +" number scan_code; // Actual scan code\n" +" };\n" +"\n", f ); + } + + +//----------------------------------------------------------------------------- +// Print an explanation of the output generated by this program. +//----------------------------------------------------------------------------- +static void print_output_info( FILE* f ) + { + fputs( +"What follows is an explanation and description of the various pieces of\n" +"information emitted by dumpkeymap.\n" +"\n" +"For a more thorough discussion of any particular piece of information\n" +"described here, refer to the detailed description of the internal layout of\n" +"a key mapping given by the --help-layout option.\n" +"\n" +"Conventions\n" +"-----------\n" +"Depending upon context, some numeric values are displayed in decimal\n" +"notation, whereas others are displayed in hexadecimal notation.\n" +"Hexadecimal numbers are denoted by a `0x' prefix (for instance, `0x7b'),\n" +"except when explicitly noted otherwise.\n" +"\n" +"Key Mapping Source\n" +"------------------\n" +"The first piece of information presented about a particular key mapping is\n" +"the source from which the data was gleaned. For a .keymapping file, the\n" +"title `KEYMAP FILE' is emitted along with the path and name of the file in\n" +"question. For the key mapping currently in use by the WindowServer and\n" +"AppKit, the title `ACTIVE KEYMAP' is emitted instead.\n" +"\n" +"Device Information\n" +"------------------\n" +"Each .keymapping file may contain one or more raw key mappings. For\n" +"example, a file which maps keys to a Dvorak-style layout might contain raw\n" +"mappings for Intel PC, ADB, NeXT, and Sun Type5 keyboards.\n" +"\n" +"For each raw mapping, the following information is emitted:\n" +"\n" +" o The title `KEYMAP' along with the mapping's relative position in the\n" +" .keymapping file.\n" +" o The `interface' identifier.\n" +" o The `handler_id' sub-identifier.\n" +" o The size of the raw mapping resource counted in bytes.\n" +"\n" +"The `interface' and `handler_id' values, taken together, define a specific\n" +"keyboard device. A .keyboard file, which describes the visual layout of a\n" +"keyboard, also contains `interface' and `handler_id' identifiers. The\n" +".keyboard file corresponding to a particular key mapping can be found by\n" +"matching the `interface' and `handler_id' values from each resource.\n" +"\n" +"Modifiers\n" +"---------\n" +"Each mapping may contain zero or more modifier records which associate\n" +"hardware scan codes with modifier descriptions such as `shift', `control',\n" +"`alternate', etc. The title `MODIFIERS' is printed along with the count of\n" +"modifier records which follow. For each modifier record, the modifier's\n" +"name is printed along with a list of scan codes, in hexadecimal format,\n" +"which generate that modifier value. For example:\n" +"\n" +" MODIFIERS [4]\n" +" alternate: 0x1d 0x60\n" +" control: 0x3a\n" +" keypad: 0x52 0x53 ... 0x63 0x62\n" +" shift: 0x2a 0x36\n" +"\n" +"Characters\n" +"----------\n" +"Each mapping may contain zero or more character records which associate\n" +"hardware scan codes with the actual characters generated by those scan\n" +"codes in the presence or absence of various modifier combinations. The\n" +"title `CHARACTERS' is printed along with the count of character records\n" +"which follow. Here is a highly abbreviated example:\n" +"\n" +" CHARACTERS [9]\n" +" scan 0x00: -AC-L \"a\" \"A\" \"^A\" \"^A\" ca c7 \"^A\" \"^A\"\n" +" scan 0x07: -AC-L \"x\" \"X\" \"^X\" \"^X\" 01/b4 01/ce \"^X\" \"^X\"\n" +" scan 0x0a: ---S- \"<\" \">\"\n" +" scan 0x13: -ACS- \"2\" \"@\" \"^@\" \"^@\" b2 b3 \"^@\" \"^@\"\n" +" scan 0x24: R---- \"^M\" \"^C\"\n" +" scan 0x3e: ----- [F4]\n" +" scan 0x4a: ----- [page up]\n" +" scan 0x60: ----- {seq#3}\n" +" scan 0x68: not-bound\n" +"\n" +"For each record, the hexadecimal value of the hardware scan code is\n" +"printed, followed by a list of modifier flag combinations and the actual\n" +"characters generated by this scan code with and without modifiers applied.\n" +"\n" +"The modifier flags field is composed of a combination of single letter\n" +"representations of the various modifier types. The letters stand for:\n" +"\n" +" L - alpha-lock\n" +" S - shift\n" +" C - control\n" +" A - alternate\n" +" R - carriage-return\n" +"\n" +"As a special case, the `alpha-lock' flag also implies the `shift' flag, so\n" +"these two flags never appear together in the same record.\n" +"\n" +"The combination of modifier flags determines the meaning and number of\n" +"fields which follow. The first field after the modifier flags always\n" +"represents the character that will be generated if no modifier keys are\n" +"depressed. The remaining fields represent characters generated by the\n" +"various modifier combinations. The order of the fields follows this\n" +"general pattern:\n" +"\n" +" o The character generated by this scan code when no modifiers are in\n" +" effect is listed first.\n" +"\n" +" o If the `L' or `S' flag is active, then the shifted character\n" +" generated by this scan code is listed next.\n" +"\n" +" o If the `C' flag is active, then the control-character generated by\n" +" this scan code is listed next. Furthermore, if the `L' or `S' flag\n" +" is also active, then the shifted control-character is listed after\n" +" that.\n" +"\n" +" o If the `A' flag is active, then the alternate-character generated by\n" +" this scan code is listed next. Furthermore, if the `L' or `S' flag\n" +" is active, then the shifted alternate-character is listed after that.\n" +" If the `C' flag is also active, then the alternate-control-character\n" +" is listed next. Finally, if the `C' and `L' or `C' and `S' flags are\n" +" also active, then the shifted alternate-control-character is listed.\n" +"\n" +"The `R' flag does not actually refer to a modifier key. Instead, it is\n" +"used to distinguish the scan code which is given the special\n" +"pseudo-designation of `carriage return' key. Typically, this mask appears\n" +"solo and only the two fields for control-M and control-C follow. This flag\n" +"may be a throwback to an earlier time or may be specially interpreted by\n" +"the low-level keyboard driver, but its purpose is otherwise enigmatic.\n" +"\n" +"Recalling the example from above, the following fields can be identified:\n" +"\n" +" scan 0x00: -AC-L \"a\" \"A\" \"^A\" \"^A\" ca c7 \"^A\" \"^A\"\n" +"\n" +" o Lower-case `a' is generated when no modifiers are active.\n" +" o Upper-case `A' is generated when `shift' or `alpha-lock' are active.\n" +" o Control-A is generated when `control' is active.\n" +" o Control-A is generated when `control' and `shift' are active.\n" +" o The character represented by the hexadecimal code 0xca is generated\n" +" when `alternate' is active.\n" +" o The character represented by 0xc7 is generated when `alternate' and\n" +" `shift' (or `alpha-lock') are active.\n" +" o Control-A is generated when `alternate' and `control' are active.\n" +" o Control-A is generated when `alternate', `control' and `shift' (or\n" +" `alpha-lock') are active.\n" +"\n" +"The notation used to represent a particular generated character varies.\n" +"\n" +" o Printable ASCII characters are quoted, as in \"x\" or \"X\".\n" +"\n" +" o Control-characters are quoted and prefixed with `^', as in \"^X\".\n" +"\n" +" o Characters with values greater than 127 (0x7f) are displayed as\n" +" hexadecimal values without the `0x' prefix.\n" +"\n" +" o Characters in a non-ASCII character set (such as `Symbol') are\n" +" displayed as two hexadecimal numbers separated by a slash, as in\n" +" `01/4a'. The first number is the character set's identification code\n" +" (such as `01' for the `Symbol' set), and the second number is the\n" +" value of the generated character.\n" +"\n" +" o Non-printing special function characters are displayed with the\n" +" function's common name enclosed in brackets, as in `[page up]' or\n" +" `[F4]'.\n" +"\n" +" o If the binding represents a key sequence rather than a single\n" +" character, then the sequence's identification number is enclosed in\n" +" braces, as in `{seq#3}'.\n" +"\n" +"Recalling a few examples from above, the following interpretations can be\n" +"made:\n" +"\n" +" scan 0x07: -AC-L \"x\" \"X\" \"^X\" \"^X\" 01/b4 01/ce \"^X\" \"^X\"\n" +" scan 0x3e: ----- [F4]\n" +" scan 0x4a: ----- [page up]\n" +" scan 0x60: ----- {seq#3}\n" +"\n" +" o \"x\" and \"X\" are printable ASCII characters.\n" +" o \"^X\" is a control-character.\n" +" o `01/b4' and `01/ce' represent the character codes 0xb4 and 0xce in\n" +" the `Symbol' character set.\n" +" o Scan code 0x3e generates function-key `F4', and scan code 0x4a\n" +" generates function-key `page up'.\n" +" o Scan code 0x60 is bound to key sequence #3.\n" +"\n" +"Finally, if a scan code is not bound to any characters, then it is\n" +"annotated with the label `not-bound', as with example scan code 0x68 from\n" +"above.\n" +"\n" +"Sequences\n" +"---------\n" +"A scan code (modified and unmodified) can be bound to a key sequence rather\n" +"than generating a single character or acting as a modifier. When it is\n" +"bound to a key sequence, a series of character invocations and modifier\n" +"actions are automatically generated rather than a single keystroke.\n" +"\n" +"Each mapping may contain zero or more key sequence records. The title\n" +"`SEQUENCES' is printed along with the count of sequence records which\n" +"follow. For example:\n" +"\n" +" SEQUENCES [3]\n" +" sequence 0: \"f\" \"o\" \"o\"\n" +" sequence 1: {alternate} \"b\" \"a\" \"r\" {unmodify}\n" +" sequence 2: [home] \"b\" \"a\" \"z\"\n" +"\n" +"The notation used to represent the sequence of generated characters is\n" +"identical to the notation already described in the `Characters' section\n" +"above, with the exception that modifier actions may be interposed between\n" +"generated characters. Such modifier actions are represented by the\n" +"modifier's name enclosed in braces. The special name `{unmodify}'\n" +"indicates the release of the modifier keys.\n" +"\n" +"Thus, the sequences in the above example can be interpreted as follows:\n" +"\n" +" o Sequence #0 generates `foo'.\n" +" o Sequence #1 invokes the `alternate' modifier, generates `bar', and\n" +" then releases `alternate'.\n" +" o Sequence #2 invokes the `home' key and then generates `baz'. In a\n" +" text editor, this would probably result in `baz' being prepended to\n" +" the line of text on which the cursor resides.\n" +"\n" +"Special Keys\n" +"------------\n" +"Certain keyboards feature keys which perform some type of special purpose\n" +"function rather than generating a character or acting as a modifier. For\n" +"instance, Apple keyboards often contain a `power' key, and NeXT keyboards\n" +"have historically featured screen brightness and volume control keys.\n" +"\n" +"Each mapping may contain zero or more special-key records which associate\n" +"hardware scan codes with such special purpose functions. The title\n" +"`SPECIALS' is printed along with the count of records which follow. For\n" +"each record, the special function's name is printed along with a list of\n" +"scan codes, in hexadecimal format, which are bound to that function. For\n" +"example:\n" +"\n" +" SPECIALS [6]\n" +" alpha-lock: 0x39\n" +" brightness-down: 0x79\n" +" brightness-up: 0x74\n" +" power: 0x7f\n" +" sound-down: 0x77\n" +" sound-up: 0x73\n" +"\n", f ); + } + + +//----------------------------------------------------------------------------- +// Print a summary of the various files and directories which are related to +// key mappings. +//----------------------------------------------------------------------------- +static void print_files_info( FILE* f ) + { + fputs( +"This is a summary of the various files and directories which are related to\n" +"key mappings.\n" +"\n" +"*.keymapping\n" +" A key mapping file which precisely defines the relationship of all\n" +" hardware-specific keyboard scan-codes with their associated\n" +" functionality.\n" +"\n" +"*.keyboard\n" +" A file describing the physical layout of keys on a particular type of\n" +" keyboard. Each `key' token in this file defines the position and shape\n" +" of the key on the keyboard, as well as the associated scan code which\n" +" that key generates. A .keymapping file, on the other hand, defines the\n" +" characters which are generated by a particular scan code depending upon\n" +" the state of the various modifier keys (such as shift, control, etc.).\n" +" The `interface' and `handler_id' values from a .keymapping file are\n" +" matched against those in each .keyboard file in order to associate a\n" +" particular .keyboard file with a key mapping. Various GUI programs use\n" +" the .keyboard file to display a visual representation of a keyboard for\n" +" the user. Since these files are just plain text, they can be easily\n" +" viewed and interpreted without the aid of a specialized program, thus\n" +" dumpkeymap leaves these files alone.\n" +"\n" +"/System/Library/Keyboards\n" +"/Network/Library/Keyboards\n" +"/Local/Library/Keyboards\n" +"/Library/Keyboards\n" +" Repositories for .keymapping and .keyboard files for MacOS/X, Darwin,\n" +" and MacOS/X Server.\n" +"\n" +"/NextLibrary/Keyboards\n" +"/LocalLibrary/Keyboards\n" +" Repositories for .keymapping and .keyboard files for OpenStep and\n" +" NextStep.\n" +"\n" +"$(HOME)/Library/Keyboards\n" +" Repository for personal .keymapping and .keyboard files.\n" +"\n", f ); + } + + +//----------------------------------------------------------------------------- +// Print a list of the various diagnostic messages which may be emitted. +//----------------------------------------------------------------------------- +static void print_diagnostics_info( FILE* f ) + { + fputs( +"The following diagnostic messages may be issued to the standard error\n" +"stream.\n" +"\n" +"Unrecognized option.\n" +" An unrecognized option was specified on the command-line. Invoke\n" +" dumpkeymap with the --help option to view a list of valid options.\n" +"\n" +"Insufficient data in keymapping data stream.\n" +" The key mapping file or data stream is corrupt. Either the file has\n" +" been incorrectly truncated or a field, such as those which indicates\n" +" the number of variable records which follow, contains a corrupt value.\n" +"\n" +"The following diagnostic messages have significance only when trying to\n" +"print .keymapping files mentioned on the command-line.\n" +"\n" +"Bad magic number.\n" +" The mentioned file is not a .keymapping file. The file's content does\n" +" not start with the string `KYM1'.\n" +"\n" +"Unable to open key mapping file.\n" +" The call to fopen() failed; probably because the specified path is\n" +" invalid or dumpkeymap does not have permission to read the file.\n" +"\n" +"Unable to determine key mapping file size.\n" +" The call to fstat() failed, thus memory can not be allocated for\n" +" loading the file.\n" +"\n" +"Unable to read key mapping file.\n" +" The call to fread() failed.\n" +"\n" +"The following diagnostic messages have significance only when trying to\n" +"print the currently active key mapping when no .keymapping files have been\n" +"mentioned on the command-line.\n" +"\n" +"Unable to open event status driver.\n" +" The call to NXOpenEventStatus() failed.\n" +"\n" +"Bad key mapping length.\n" +" The call to NXKeyMappingLength() returned a bogus value.\n" +"\n" +"Unable to get current key mapping.\n" +" The call to NXGetKeyMapping() failed.\n" +"\n" +"The following diagnostic messages have significance only when using\n" +"dumpkeymap on a non-Apple/NeXT platform.\n" +"\n" +"Must specify at least one .keymapping file.\n" +" No .keymapping files were mentioned on the command-line. On\n" +" non-Apple/NeXT platforms, there is no concept of a currently active\n" +" .keymapping file, so at least one file must be mentioned on the\n" +" command-line.\n" +"\n", f ); + } + + +//----------------------------------------------------------------------------- +// Print warranty. +//----------------------------------------------------------------------------- +static void print_warranty( FILE* f ) + { + fputs( +"This software is provided by the author `AS IS' and any express or implied\n" +"WARRANTIES, including, but not limited to, the implied warranties of\n" +"MERCHANTABILITY and FITNESS FOR A PARTICULAR PURPOSE are DISCLAIMED. In NO\n" +"EVENT shall the author be LIABLE for any DIRECT, INDIRECT, INCIDENTAL,\n" +"SPECIAL, EXEMPLARY, or CONSEQUENTIAL damages (including, but not limited\n" +"to, procurement of substitute goods or services; loss of use, data, or\n" +"profits; or business interruption) however caused and on any theory of\n" +"liability, whether in contract, strict liability, or tort (including\n" +"negligence or otherwise) arising in any way out of the use of this\n" +"software, even if advised of the possibility of such damage.\n" +"\n", f ); + } + + +//----------------------------------------------------------------------------- +// Print this program's version number. +//----------------------------------------------------------------------------- +static void print_version( FILE* f ) + { + fputs( "Version " PROG_VERSION " (built " __DATE__ ")\n\n", f ); + } + + +//----------------------------------------------------------------------------- +// Print a usage summary. +//----------------------------------------------------------------------------- +static void print_usage( FILE* f ) + { + fputs( +"Usage: dumpkeymap [options] [-] [file ...]\n" +"\n" +"Prints a textual representation of each Apple/NeXT .keymapping file\n" +"mentioned on the command-line. If no files are mentioned and if the local\n" +"machine is an Apple or NeXT installation, then the key mapping currently in\n" +"use by the WindowServer and the AppKit is printed instead.\n" +"\n" +"Options:\n" +" -h --help\n" +" Display general program instructions and option summary.\n" +"\n" +" -k --help-keymapping\n" +" Display a detailed description of the internal layout of a\n" +" .keymapping file.\n" +"\n" +" -o --help-output\n" +" Display an explanation of the output generated by dumpkeymap when\n" +" dissecting a .keymapping file.\n" +"\n" +" -f --help-files\n" +" Display a summary of the various files and directories which are\n" +" related to key mappings.\n" +"\n" +" -d --help-diagnostics\n" +" Display a list of the various diagnostic messages which may be\n" +" emitted by dumpkeymap.\n" +"\n" +" -v --version\n" +" Display the dumpkeymap version number and warranty information.\n" +"\n" +" - --\n" +" Inhibit processing of options at this point in the argument list.\n" +" An occurrence of `-' or `--' in the argument list causes all\n" +" following arguments to be treated as file names even if an argument\n" +" begins with a `-' character.\n" +"\n", f ); + } + + +//----------------------------------------------------------------------------- +// Print an informational banner. +//----------------------------------------------------------------------------- +static void print_banner( FILE* f ) + { + fputs( "\n" PROG_NAME " v" PROG_VERSION " by " AUTHOR_INFO "\n" + COPYRIGHT "\n\n", f ); + } + + +//----------------------------------------------------------------------------- +// Process command-line arguments. Examine options first; collecting files +// along the way. If all is well, process collected file list. +//----------------------------------------------------------------------------- +int main( int const argc, char const* const argv[] ) + { + int rc = 0, i, nfiles = 0, more_options = 1, process_files = 1; + int* files = (int*)calloc( argc - 1, sizeof(int) ); + print_banner( stdout ); + + for (i = 1; i < argc; i++) + { + char const* const s = argv[i]; + if (!more_options || *s != '-') + files[ nfiles++ ] = i; + else + { + OPT_SWITCH(s) + OPT_CASE(-,--) + more_options = 0; + OPT_CASE(-h,--help) + print_usage( stdout ); + process_files = 0; + OPT_CASE(-k,--help-keymapping) + print_internal_layout_info( stdout ); + process_files = 0; + OPT_CASE(-o,--help-output) + print_output_info( stdout ); + process_files = 0; + OPT_CASE(-f,--help-files) + print_files_info( stdout ); + process_files = 0; + OPT_CASE(-d,--help-diagnostics) + print_diagnostics_info( stdout ); + process_files = 0; + OPT_CASE(-v,--version) + print_version( stdout ); + print_warranty( stdout ); + process_files = 0; + OPT_DEFAULT + fprintf( stderr, "ERROR: Unrecognized option: %s\n\n", s ); + process_files = 0; + rc = 1; + OPT_SWITCH_END + } + } + + if (process_files) + { + if (nfiles == 0) + rc = handle_empty_document_list(); + else + for (i = 0; i < nfiles; i++) + rc |= unparse_keymap_file( argv[files[i]] ); + } + + free( files ); + return rc; + } diff --git a/synfig-osx/launcher/utils/dumpkeymap.man b/synfig-osx/launcher/utils/dumpkeymap.man new file mode 100644 index 0000000..2ad6d54 --- /dev/null +++ b/synfig-osx/launcher/utils/dumpkeymap.man @@ -0,0 +1,1004 @@ +.ig +//============================================================================= +// +// Manual page for `dumpkeymap'. +// +// Copyright (C) 1999,2000 by Eric Sunshine +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +//============================================================================= +// +// $XFree86: xc/programs/Xserver/hw/darwin/utils/dumpkeymap.man,v 1.2 2000/12/05 21:18:34 dawes Exp $ +// +.. +.ig +//----------------------------------------------------------------------------- +// Local identification information. +//----------------------------------------------------------------------------- +.. +.nr VE 4 \" Version number +.TH DUMPKEYMAP 1 "v\n(VE \-\- 1 December 2000" "Version \n(VE" +.de UP +1 December 2000 +.. +.ig +//----------------------------------------------------------------------------- +// Annotation Macros +// ----------------- +// Facilitate creation of annotated, non-filled blocks of text. An +// annotated block is initiated with the `AS' macro. Each annotated, +// non-filled line within the block must be introduced with the `AN' macro +// which takes three arguments. The first argument is the detail text to +// be annotated. The second is a string of spaces used to align the +// annotations by certain (broken) roff interpreters which fail to +// implement the proper set of roff commands (such as diversions, +// indentation, and tab stops). It is assumed that the spaces will be +// used with fixed-point font. The third argument is the annotation +// itself. The block should be terminated with the `AE' macro. For all +// roff interpreters which properly implement diversions, indentation, and +// tab stops, all anotations within the block are automatically aligned at +// the same horizontal position. This position is guaranteed to be just +// to the right of the widest `AN' detail line. For broken roff +// interpreters, such as `rman', the string of spaces from the second +// argument are used to align the annotations. Finally, the `AZ' macro, +// which takes a single argument, can be used to to insert a non-annotated +// line into the block which does not play a part in the calculation of +// the horizontal annotation alignment. +// +// Implementation Notes +// -------------------- +// *1* These macros utilize a diversion (named `AD'). Since the prevailing +// indentation is stored along with the diverted text, we must muck with +// the indentation level in order to prevent the indentation from being +// applied to the text a second time when `AD' is finally emitted. +// +// *2* Unfortunately, `.if' strips leading whitespace from following text, so +// `AN' uses \& to preserve the whitespace. +// +// *3* This manual page has been tested for proper formatting with troff, +// groff, nroff and rman (the `man' to `HTML' converter). Unfortunately, +// rman fails to implement many useful features such as diversions, +// indentation, and tab stops, and is also hideously buggy. Furthermore +// it identifies itself as nroff and fails to provide any further +// identification, so there is no way to create macros which specifically +// work around its limitations. Following is a list of several bugs in +// rman which the implementation of these macros must avoid: +// o Fails with multi-line conditionals within macros. +// o Fails on macro definition within multi-line conditionals. +// o Fails when macro arguments are not delimited by exactly 1 space. +// o String definition `.ds' ignores the value; uses empty "" instead. +// As a consequence of these problems, the following macros are written +// using a series of ugly single-line `.if' conditionals rather than the +// more natural multi-line `.if' and `.ie' conditionals. Also, rman fails +// to understand the common idiom of `.\"' to introduce a comment, which +// is why all comments in this file are wrapped in ignore `.ig' blocks. +//----------------------------------------------------------------------------- +.. +.de AS +.if t .nr AW 0 +.if t .nr AI \\n(.i +.if t .in -\\n(AI +.nf +.. +.de AN +.if t .if \w'\\$1'>\\n(AW .nr AW \w'\\$1' +.if t .da AD +.if t \\&\\$1\\t\\$3 +.if t .da +.if n \\&\\$1 \\$2\\$3 +.. +.de AZ +.if t .da AD +\\$1 +.if t .da +.. +.de AE +.if t .in +\\n(AIu +.if t .if \\n(AW .ta \\n(AWu+\w'\\(em'u +.if t .AD +.if t .DT +.if t .rm AD +.if t .rm AW +.fi +.. +.ig +//----------------------------------------------------------------------------- +// Bulleted list macros -- `BG' begins a bulleted list; `BU' delimits +// bulleted entries; `BE' ends a bulleted list. +//----------------------------------------------------------------------------- +.. +.de BG +.PP +.RS +.. +.de BU +.HP +\\(bu\\ \\c +.. +.de BE +.RE +.PP +.. +.ig +//----------------------------------------------------------------------------- +// Indented paragraph with stylized hanging tag macro. `TG' takes a single +// argument and treats it as the hanging tag of the indented paragraph. +// The tag is italicized in troff but not in nroff. +//----------------------------------------------------------------------------- +.. +.de TG +.TP +.ie t .I "\\$1" +.el \\$1 +.. +.ig +//----------------------------------------------------------------------------- +// Manual page for `dumpkeymap'. +//----------------------------------------------------------------------------- +.. +.SH NAME +dumpkeymap \- Dianostic dump of a .keymapping file +.SH SYNOPSIS +.B dumpkeymap +.RI [ options "] [-] [" file "...]" +.SH DESCRIPTION +.I dumpkeymap +prints a textual representation of each Apple/\c +.SM NeXT +.I .keymapping +file mentioned on the command-line. If no files are mentioned and if the +local machine is an Apple or +.SM NeXT +installation, then the key mapping currently in use by the WindowServer and the +AppKit is printed instead. +.SH OPTIONS +.TP +.B "\-h \-\^\-help" +Display general program instructions and option summary. +.TP +.B "\-k \-\^\-help\-keymapping" +Display a detailed description of the internal layout of a +.I .keymapping +file. This is the same information as that presented in the +.I "Key Mapping Description" +section of this document. +.TP +.B "\-o \-\^\-help\-output" +Display an explanation of the output generated by +.I dumpkeymap +when dissecting a +.I .keymapping +file. This is the same information as that presented in the +.I "Output Description" +section of this document. +.TP +.B "\-f \-\^\-help\-files" +Display a summary of the various files and directories which are related to +key mappings. This is the same information as that presented in the +.I "Files" +section of this document. +.TP +.B "\-d \-\^\-help\-diagnostics" +Display a list of the various diagnostic messages which may be emitted by +.I dumpkeymap. +This is the same information as that presented in the +.I "Diagnostics" +section of this document. +.TP +.B "\-v \-\^\-version" +Display the +.I dumpkeymap +version number and warranty information. +.TP +.B "\- \-\^\-" +Inhibit processing of options at this point in the argument list. An +occurrence of `\-' or `\-\^\-' in the argument list causes all following +arguments to be treated as file names even if an argument begins with a `\-' +character. +.SH "KEY MAPPING DESCRIPTION" +The following sections describe, in complete detail, the format of a raw key +mapping resource, as well as the format of the +.I .keymapping +file which encapsulates one or more raw mappings. +.SH "Types and Data" +The following type definitions are employed throughout this discussion: +.PP +.RS +.AS +.AZ "typedef unsigned char byte;" +.AZ "typedef unsigned short word;" +.AZ "typedef unsigned long dword;" +.AE +.RE +.PP +Additionally, the type definition +.RI ` number ' +is used generically to +indicate a numeric value. The actual size of the +.RI ` number ' +type may be one or two bytes depending upon how the data is stored in the key +map. Although most key maps use byte-sized numeric values, word-sized values +are also allowed. +.PP +Multi-byte values in a key mapping file are stored in big-endian byte order. +.SH "Key Mapping File and Device Mapping" +A key mapping file begins with a magic-number and continues with a +variable number of device-specific key mappings. +.PP +.RS +.AS +.AZ "struct KeyMappingFile {" +.AN " char magic_number[4];" " " "// `KYM1'" +.AN " DeviceMapping maps[...];" "" "// Variable number of maps" +.AZ }; +.AE +.PP +.AS +.AZ "struct DeviceMapping {" +.AN " dword interface;" " " "// Interface type" +.AN " dword handler_id;" "" "// Interface subtype" +.AN " dword map_size;" " " "// Byte count of `map' (below)" +.AN " KeyMapping map;" +.AZ }; +.AE +.RE +.PP +The value of `interface' represents a family of keyboard device types +(such as Intel +.SM "PC, ADB, NeXT," +Sun Type5, etc.), and is generally specified as one of the constant values +.SM "NX_EVS_DEVICE_INTERFACE_ADB, NX_EVS_DEVICE_INTERFACE_ACE," +etc., which are are defined in IOHIDTypes.h on MacOS/X and Darwin, and in +ev_types.h on MacOS/X Server, OpenStep, and NextStep. +.PP +The value of `handler_id' represents a specific keyboard layout within the +much broader `interface' family. For instance, for a 101-key Intel +.SM PC +keyboard (of type +.SM NX_EVS_DEVICE_INTERFACE_ACE\c +) the `handler_id' is '0', whereas for a 102-key keyboard it is `1'. +.PP +Together, `interface' and `handler_id' identify the exact keyboard hardware to +which this mapping applies. Programs which display a visual representation of +a keyboard layout, match `interface' and `handler_id' from the +.I .keymapping +file against the `interface' and `handler_id' values found in each +.I .keyboard +file. +.SH "Key Mapping" +A key mapping completely defines the relationship of all scan codes with their +associated functionality. A +.I KeyMapping +structure is embedded within the +.I DeviceMapping +structure in a +.IR KeyMappingFile . +The key mapping currently in use by the WindowServer and AppKit is also +represented by a +.I KeyMapping +structure, and can be referred to directly by calling NXGetKeyMapping() and +accessing the `mapping' data member of the returned +.I NXKeyMapping +structure. +.PP +.RS +.AS +.AZ "struct KeyMapping {" +.AN " word number_size;" " " "// 0=1 byte, non-zero=2 bytes" +.AN " number num_modifier_groups;" "" "// Modifier groups" +.AZ " ModifierGroup modifier_groups[...];" +.AN " number num_scan_codes;" " " "// Scan groups" +.AN " ScanGroup scan_table[...];" +.AN " number num_sequence_lists;" " " "// Sequence lists" +.AN " Sequence sequence_lists[...];" +.AN " number num_special_keys;" " " "// Special keys" +.AN " SpecialKey special_key[...];" +.AZ }; +.AE +.RE +.PP +The `number_size' flag determines the size, in bytes, of all remaining numeric +values (denoted by the type definition +.RI ` number ') +within the +key mapping. If its value is zero, then numbers are represented by a single +byte. If it is non-zero, then numbers are represented by a word (two bytes). +.SH "Modifier Group" +A modifier group defines all scan codes which map to a particular type of +modifier, such as +.IR shift , +.IR control , +etc. +.PP +.RS +.AS +.AZ "enum Modifier {" +.AZ " ALPHALOCK = 0," +.AZ " SHIFT," +.AZ " CONTROL," +.AZ " ALTERNATE," +.AZ " COMMAND," +.AZ " KEYPAD," +.AZ " HELP" +.AZ }; +.AE +.PP +.AS +.AZ "struct ModifierGroup {" +.AN " number modifier;" " " "// A Modifier constant" +.AN " number num_scan_codes;" +.AN " number scan_codes[...];" "" "// Variable number of scan codes" +.AZ }; +.AE +.RE +.PP +The scan_codes[] array contains a list of all scan codes which map to the +specified modifier. The +.IR shift ", " command ", and " alternate +modifiers are frequently mapped to two different scan codes, apiece, +since these modifiers often appear on both the left and right sides of +the keyboard. +.SH "Scan Group" +There is one +.I ScanGroup +for each scan code generated by the given keyboard. This number is given by +KeyMapping::num_scan_codes. The first scan group represents hardware scan +code 0, the second represents scan code 1, etc. +.PP +.RS +.AS +.AZ "enum ModifierMask {" +.AN " ALPHALOCK_MASK" " " "= 1 << 0," +.AN " SHIFT_MASK" " " "= 1 << 1," +.AN " CONTROL_MASK" " " "= 1 << 2," +.AN " ALTERNATE_MASK" " " "= 1 << 3," +.AN " CARRIAGE_RETURN_MASK" "" "= 1 << 4" +.AZ }; +.AZ "#define NOT_BOUND 0xff" +.AE +.PP +.AS +.AZ "struct ScanGroup {" +.AN " number mask;" +.AN " Character characters[...];" +.AZ }; +.AE +.RE +.PP +For each scan code, `mask' defines which modifier combinations generate +characters. If `mask' is +.SM NOT_BOUND +(0xff) then then this scan code does not generate any characters ever, and its +characters[] array is zero length. Otherwise, the characters[] array contains +one +.I Character +record for each modifier combination. +.PP +The number of records in characters[] is determined by computing (1 << +bits_set_in_mask). In other words, if mask is zero, then zero bits are set, +so characters[] contains only one record. If `mask' is +.SM "(SHIFT_MASK | CONTROL_MASK)," +then two bits are set, so characters[] contains four records. +.PP +The first record always represents the character which is generated by that +key when no modifiers are active. The remaining records represent characters +generated by the various modifier combinations. Using the example with the +.I shift +and +.I control +masks set, record two would represent the character with the +.I shift +modifier active; record three, the +.I control +modifier active; and record four, both the +.I shift +and +.I control +modifiers active. +.PP +As a special case, +.SM ALPHALOCK_MASK +implies +.SM SHIFT_MASK, +though only +.SM ALPHALOCK_MASK +appears in `mask'. In this case the same character is generated for both the +.I shift +and +.I alpha-lock +modifiers, but only needs to appear once in the characters[] array. +.PP +.SM CARRIAGE_RETURN_MASK +does not actually refer to a modifier key. Instead, it is used to +distinguish the scan code which is given the special pseudo-designation of +.I "carriage return" +key. Typically, this mask appears solo in a +.I ScanGroup +record and only the two +.I Character +records for control-M and control-C follow. This flag may be a throwback to +an earlier time or may be specially interpreted by the low-level keyboard +driver, but its purpose is otherwise enigmatic. +.SH Character +Each +.I Character +record indicates the character generated when this key is pressed, as well as +the character set which contains the character. Well known character sets are +.SM `ASCII' +and `Symbol'. The character set can also be one of the meta values +.SM FUNCTION_KEY +or +.SM KEY_SEQUENCE. +If it is +.SM FUNCTION_KEY +then `char_code' represents a generally well-known function key such as those +enumerated by +.I FunctionKey. +If the character set is +.SM KEY_SEQUENCE +then `char_code' represents is a zero-base index into +KeyMapping::sequence_lists[]. +.PP +.RS +.AS +.AZ "enum CharacterSet {" +.AN " ASCII" " " "= 0x00," +.AN " SYMBOL" " " "= 0x01," +.AN " ..." +.AN " FUNCTION_KEY" "" "= 0xfe," +.AN " KEY_SEQUENCE" "" "= 0xff" +.AZ }; +.AE +.PP +.AS +.AZ "struct Character {" +.AN " number set;" " " "// CharacterSet of generated character" +.AN " number char_code;" "" "// Actual character generated" +.AZ }; +.AE +.PP +.AS +.AZ "enum FunctionKey {" +.AZ " F1 = 0x20, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12," +.AZ " INSERT, DELETE, HOME, END, PAGE_UP, PAGE_DOWN, PRINT_SCREEN," +.AZ " SCROLL_LOCK, PAUSE, SYS_REQUEST, BREAK, RESET, STOP, MENU," +.AZ " USER, SYSTEM, PRINT, CLEAR_LINE, CLEAR_DISPLAY, INSERT_LINE," +.AZ " DELETE_LINE, INSERT_CHAR, DELETE_CHAR, PREV, NEXT, SELECT" +.AZ }; +.AE +.RE +.SH Sequence +When Character::set contains the meta value +.SM KEY_SEQUENCE, +the scan code is bound to a sequence of keys rather than a single character. +A sequence is a series of modifiers and characters which are automatically +generated when the associated key is depressed. +.PP +.RS +.AS +.AZ "#define MODIFIER_KEY 0xff" +.AE +.PP +.AS +.AZ "struct Sequence {" +.AN " number num_chars;" +.AN " Character characters[...];" +.AZ }; +.AE +.RE +.PP +Each generated +.I Character +is represented as previously described, with the exception that +.SM MODIFIER_KEY +may appear in place of +.SM KEY_SEQUENCE. +When the value of Character::set is +.SM MODIFIER_KEY +then Character::char_code represents a modifier key rather than an actual +character. If the modifier represented by `char_code' is non-zero, then it +indicates that the associated modifier key has been depressed. In this case, +the value is one of the constants enumerated by +.I Modifier +(\c +.SM "SHIFT, CONTROL, ALTERNATE," +etc.). If the value is zero then it means that the modifier keys have been +released. +.SH "Special Key" +A special key is one which is scanned directly by the Mach kernel rather than +by the WindowServer. In general, events are not generated for special keys. +.PP +.RS +.AS +.AZ "enum SpecialKeyType {" +.AZ " VOLUME_UP = 0," +.AZ " VOLUME_DOWN," +.AZ " BRIGHTNESS_UP," +.AZ " BRIGHTNESS_DOWN," +.AZ " ALPHA_LOCK," +.AZ " HELP," +.AZ " POWER," +.AZ " SECONDARY_ARROW_UP," +.AZ " SECONDARY_ARROW_DOWN" +.AZ }; +.AE +.PP +.AS +.AZ "struct SpecialKey {" +.AN " number type;" " " "// A SpecialKeyType constant" +.AN " number scan_code;" "" "// Actual scan code" +.AZ }; +.AE +.RE +.SH OUTPUT +What follows is an explanation and description of the various pieces of +information emitted by +.I dumpkeymap. +.PP +For a more thorough discussion of any particular piece of information described +here, refer to the detailed description of the internal layout of a key mapping +provided by the +.I "Key Mapping Description" +section above. +.SH Conventions +Depending upon context, some numeric values are displayed in decimal +notation, whereas others are displayed in hexadecimal notation. +Hexadecimal numbers are denoted by a `0x' prefix (for instance, `0x7b'), +except when explicitly noted otherwise. +.SH "Key Mapping Source" +The first piece of information presented about a particular key mapping is the +source from which the data was gleaned. For a +.I .keymapping +file, the title +.SM "`KEYMAP FILE'" +is emitted along with the path and name of the file in question. For the key +mapping currently in use by the WindowServer and AppKit, the title +.SM "`ACTIVE KEYMAP'" +is emitted instead. +.SH "Device Information" +Each +.I .keymapping +file may contain one or more raw key mappings. For example, a file which maps +keys to a Dvorak-style layout might contain raw mappings for Intel +.SM "PC, ADB, NeXT," +and Sun Type5 keyboards. +.PP +For each raw mapping, the following information is emitted: +.BG +.BU +The title +.SM `KEYMAP' +along with the mapping's relative position in the +.I .keymapping +file. +.BU +The `interface' identifier. +.BU +The `handler_id' sub-identifier. +.BU +The size of the raw mapping resource counted in bytes. +.BE +The `interface' and `handler_id' values, taken together, define a specific +keyboard device. A +.I .keyboard +file, which describes the visual layout of a keyboard, also contains +`interface' and `handler_id' identifiers. The +.I .keyboard +file corresponding to a particular key mapping can be found by matching the +`interface' and `handler_id' values from each resource. +.SH Modifiers +Each mapping may contain zero or more modifier records which associate hardware +scan codes with modifier descriptions such as +.I "shift, control, alternate," +etc. The title +.SM `MODIFIERS' +is printed along with the count of modifier records which follow. For each +modifier record, the modifier's name is printed along with a list of scan +codes, in hexadecimal format, which generate that modifier value. For example: +.PP +.RS +.nf +MODIFIERS [4] +alternate: 0x1d 0x60 +control: 0x3a +keypad: 0x52 0x53 ... 0x63 0x62 +shift: 0x2a 0x36 +.fi +.RE +.SH Characters +Each mapping may contain zero or more character records which associate +hardware scan codes with the actual characters generated by those scan +codes in the presence or absence of various modifier combinations. The +title +.SM `CHARACTERS' +is printed along with the count of character records which follow. Here is a +highly abbreviated example: +.PP +.RS +.nf +CHARACTERS [9] +scan 0x00: -AC-L "a" "A" "^A" "^A" ca c7 "^A" "^A" +scan 0x07: -AC-L "x" "X" "^X" "^X" 01/b4 01/ce "^X" "^X" +scan 0x0a: ---S- "<" ">" +scan 0x13: -ACS- "2" "@" "^@" "^@" b2 b3 "^@" "^@" +scan 0x24: R---- "^M" "^C" +scan 0x3e: ----- [F4] +scan 0x4a: ----- [page up] +scan 0x60: ----- {seq#3} +scan 0x68: not-bound +.fi +.RE +.PP +For each record, the hexadecimal value of the hardware scan code is printed, +followed by a list of modifier flag combinations and the actual characters +generated by this scan code with and without modifiers applied. +.PP +The modifier flags field is composed of a combination of single letter +representations of the various modifier types. The letters stand for: +.PP +.RS +.nf +L \- alpha-lock +S \- shift +C \- control +A \- alternate +R \- carriage-return +.fi +.RE +.PP +As a special case, the +.I alpha-lock +flag also implies the +.I shift +flag, so these two flags never appear together in the same record. +.PP +The combination of modifier flags determines the meaning and number of fields +which follow. The first field after the modifier flags always represents the +character that will be generated if no modifier keys are depressed. The +remaining fields represent characters generated by the various modifier +combinations. The order of the fields follows this general pattern: +.BG +.BU +The character generated by this scan code when no modifiers are in effect is +listed first. +.BU +If the `L' or `S' flag is active, then the shifted character generated by this +scan code is listed next. +.BU +If the `C' flag is active, then the control-character generated by this scan +code is listed next. Furthermore, if the `L' or `S' flag is also active, then +the shifted control-character is listed after that. +.BU +If the `A' flag is active, then the alternate-character generated by this scan +code is listed next. Furthermore, if the `L' or `S' flag is active, then the +shifted alternate-character is listed after that. If the `C' flag is also +active, then the alternate-control-character is listed next. Finally, if the +`C' and `L' or `C' and `S' flags are also active, then the shifted +alternate-control-character is listed. +.BE +The `R' flag does not actually refer to a modifier key. Instead, it is used to +distinguish the scan code which is given the special pseudo-designation of +.I "carriage return" +key. Typically, this mask appears solo and only the two fields for control-M +and control-C follow. This flag may be a throwback to an earlier time or may +be specially interpreted by the low-level keyboard driver, but its purpose is +otherwise enigmatic. +.PP +Recalling the example from above, the following fields can be identified: +.PP +.RS +.nf +scan 0x00: -AC-L "a" "A" "^A" "^A" ca c7 "^A" "^A" +.fi +.RE +.BG +.BU +Lower-case `a' is generated when no modifiers are active. +.BU +Upper-case `A' is generated when +.IR shift " or " alpha-lock +are active. +.BU +Control-A is generated when +.I control +is active. +.BU +Control-A is generated when +.IR control " and " shift +are active. +.BU +The character represented by the hexadecimal code 0xca is generated when +.I alternate +is active. +.BU +The character represented by 0xc7 is generated when +.IR alternate " and " shift " (or " alpha-lock ") are active." +.BU +Control-A is generated when +.IR alternate " and " control +are active. +.BU +Control-A is generated when +.IR "alternate, control" " and " shift " (or " alpha-lock ") are active." +.BE +The notation used to represent a particular generated character varies. +.BG +.BU +Printable +.SM ASCII +characters are quoted, as in "x" or "X". +.BU +Control-characters are quoted and prefixed with `^', as in "^X". +.BU +Characters with values greater than 127 (0x7f) are displayed as hexadecimal +values without the `0x' prefix. +.BU +Characters in a non-\c +.SM ASCII +character set (such as `Symbol') are displayed as two hexadecimal numbers +separated by a slash, as in `01/4a'. The first number is the character set's +identification code (such as `01' for the `Symbol' set), and the second number +is the value of the generated character. +.BU +Non-printing special function characters are displayed with the function's +common name enclosed in brackets, as in `[page up]' or `[F4]'. +.BU +If the binding represents a key sequence rather than a single character, then +the sequence's identification number is enclosed in braces, as in `{seq#3}'. +.BE +Recalling a few examples from above, the following interpretations can be made: +.PP +.RS +.nf +scan 0x07: -AC-L "x" "X" "^X" "^X" 01/b4 01/ce "^X" "^X" +scan 0x3e: ----- [F4] +scan 0x4a: ----- [page up] +scan 0x60: ----- {seq#3} +.fi +.RE +.BG +.BU +"x" and "X" are printable +.SM ASCII +characters. +.BU +"^X" is a control-character. +.BU +`01/b4' and `01/ce' represent the character codes 0xb4 and 0xce in the `Symbol' +character set. +.BU +Scan code 0x3e generates function-key `F4', and scan code 0x4a generates +function-key `page up'. +.BU +Scan code 0x60 is bound to key sequence #3. +.BE +Finally, if a scan code is not bound to any characters, then it is annotated +with the label `not-bound', as with example scan code 0x68 from above. +.SH Sequences +A scan code (modified and unmodified) can be bound to a key sequence rather +than generating a single character or acting as a modifier. When it is bound +to a key sequence, a series of character invocations and modifier actions are +automatically generated rather than a single keystroke. +.PP +Each mapping may contain zero or more key sequence records. The title +.SM `SEQUENCES' +is printed along with the count of sequence records which follow. For example: +.PP +.RS +.nf +SEQUENCES [3] +sequence 0: "f" "o" "o" +sequence 1: {alternate} "b" "a" "r" {unmodify} +sequence 2: [home] "b" "a" "z" +.fi +.RE +.PP +The notation used to represent the sequence of generated characters is +identical to the notation already described in the +.I Characters +section above, with the exception that modifier actions may be interposed +between generated characters. Such modifier actions are represented by the +modifier's name enclosed in braces. The special name `{unmodify}' indicates +the release of the modifier keys. +.PP +Thus, the sequences in the above example can be interpreted as follows: +.BG +.BU +Sequence\ #0 generates `foo'. +.BU +Sequence\ #1 invokes the +.I alternate +modifier, generates `bar', and then releases +.I alternate. +.BU +Sequence\ #2 invokes the +.I home +key and then generates `baz'. In a text editor, this would probably result in +`baz' being prepended to the line of text on which the cursor resides. +.BE +.SH Special Keys +Certain keyboards feature keys which perform some type of special purpose +function rather than generating a character or acting as a modifier. For +instance, Apple keyboards often contain a +.I power +key, and +.SM NeXT +keyboards have historically featured screen brightness and volume control keys. +.PP +Each mapping may contain zero or more special-key records which associate +hardware scan codes with such special purpose functions. The title +.SM `SPECIALS' +is printed along with the count of records which follow. For each record, the +special function's name is printed along with a list of scan codes, in +hexadecimal format, which are bound to that function. For example: +.PP +.RS +.nf +SPECIALS [6] +alpha-lock: 0x39 +brightness-down: 0x79 +brightness-up: 0x74 +power: 0x7f +sound-down: 0x77 +sound-up: 0x73 +.fi +.RE +.SH FILES +.IP *.keymapping +A key mapping file which precisely defines the relationship of all +hardware-specific keyboard scan-codes with their associated functionality. +.IP *.keyboard +A file describing the physical layout of keys on a particular type of +keyboard. Each `key' token in this file defines the position and shape of the +key on the keyboard, as well as the associated scan code which that key +generates. A +.I .keymapping +file, on the other hand, defines the characters which are generated by a +particular scan code depending upon the state of the various modifier keys +(such as +.I shift, +.I control, +etc.). The `interface' and `handler_id' values from a +.I .keymapping +file are matched against those in each +.I .keyboard +file in order to associate a particular +.I .keyboard +file with a key mapping. Various +.SM GUI +programs use the +.I .keyboard +file to display a visual representation of a keyboard for the user. Since +these files are just plain text, they can be easily viewed and interpreted +without the aid of a specialized program, thus +.I dumpkeymap +leaves these files alone. +.PP +/System/Library/Keyboards +.br +/Network/Library/Keyboards +.br +/Local/Library/Keyboards +.br +/Library/Keyboards +.RS +Repositories for +.I .keymapping +and +.I .keyboard +files for MacOS/X, Darwin, and MacOS/X Server. +.RE +.PP +/NextLibrary/Keyboards +.br +/LocalLibrary/Keyboards +.RS +Repositories for +.I .keymapping +and +.I .keyboard +files for OpenStep and NextStep. +.RE +.IP $(HOME)/Library/Keyboards +Repository for personal +.I .keymapping +and +.I .keyboard +files. +.SH DIGANOSTICS +The following diagnostic messages may be issued to the standard error stream. +.TG "Unrecognized option." +An unrecognized option was specified on the command-line. Invoke +.I dumpkeymap +with the +.B "\-\^\-help" +option to view a list of valid options. +.TG "Insufficient data in keymapping data stream." +The key mapping file or data stream is corrupt. Either the file has been +incorrectly truncated or a field, such as those which indicates the number of +variable records which follow, contains a corrupt value. +.PP +The following diagnostic messages have significance only when trying to print +.I .keymapping +files mentioned on the command-line. +.TG "Bad magic number." +The mentioned file is not a +.I .keymapping +file. The file's content does not start with the string `KYM1'. +.TG "Unable to open key mapping file." +The call to fopen() failed; probably because the specified path is invalid or +.I dumpkeymap +does not have permission to read the file. +.TG "Unable to determine key mapping file size." +The call to fstat() failed, thus memory can not be allocated for loading the +file. +.TG "Unable to read key mapping file." +The call to fread() failed. +.PP +The following diagnostic messages have significance only when trying to print +the currently active key mapping when no +.I .keymapping +files have been mentioned on the command-line. +.TG "Unable to open event status driver." +The call to NXOpenEventStatus() failed. +.TG "Bad key mapping length." +The call to NXKeyMappingLength() returned a bogus value. +.TG "Unable to get current key mapping." +The call to NXGetKeyMapping() failed. +.PP +The following diagnostic messages have significance only when using +.I dumpkeymap +on a non-Apple/\c +.SM NeXT +platform. +.TG "Must specify at least one .keymapping file." +No +.I .keymapping +files were mentioned on the command-line. On non-Apple/\c +.SM NeXT +platforms, there is no concept of a currently active +.I .keymapping +file, so at least one file must be mentioned on the command-line. +.SH AUTHOR +Eric Sunshine wrote +.I dumpkeymap +and this document, the +.I "dumpkeymap user's manual." +Both +.I dumpkeymap +and this document are copyright \(co1999,2000 by Eric Sunshine +. All rights reserved. +.PP +The implementation of +.I dumpkeymap +is based upon information gathered on September 3, 1997 by Eric Sunshine + and Paul S. McCarthy during an +effort to reverse engineer the format of the +.SM NeXT +.I .keymapping +file. +.if n .PP +.if n Version \n(VE \-\- +.if n .UP diff --git a/synfig-osx/launcher/voria.icns b/synfig-osx/launcher/voria.icns new file mode 100644 index 0000000000000000000000000000000000000000..3d3d20f409aa707d8f5f4f2004cbc3e2586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tcGTs6$Dhm(K#kKg@yYO%;3d@Ft zim_Z|(Vull3$& +#include + +struct x_hash_table_struct { + unsigned int bucket_index; + unsigned int total_keys; + x_list **buckets; + + x_hash_fun *hash_key; + x_compare_fun *compare_keys; + x_destroy_fun *destroy_key; + x_destroy_fun *destroy_value; +}; + +#define ITEM_NEW(k, v) X_PFX (list_prepend) ((x_list *) (k), v) +#define ITEM_FREE(i) X_PFX (list_free_1) (i) +#define ITEM_KEY(i) ((void *) (i)->next) +#define ITEM_VALUE(i) ((i)->data) + +#define SPLIT_THRESHOLD_FACTOR 2 + +/* http://planetmath.org/?op=getobj&from=objects&name=GoodHashTablePrimes */ +static const unsigned int bucket_sizes[] = { + 29, 53, 97, 193, 389, 769, 1543, 3079, 6151, 12289, 24593, 49157, + 98317, 196613, 393241, 786433, 1572869, 3145739, 6291469, 12582917, + 25165843, 50331653, 100663319, 201326611, 402653189, 805306457, + 1610612741 +}; + +#define N_BUCKET_SIZES (sizeof (bucket_sizes) / sizeof (bucket_sizes[0])) + +static inline unsigned int +hash_table_total_buckets (x_hash_table *h) +{ + return bucket_sizes[h->bucket_index]; +} + +static inline void +hash_table_destroy_item (x_hash_table *h, void *k, void *v) +{ + if (h->destroy_key != 0) + (*h->destroy_key) (k); + + if (h->destroy_value != 0) + (*h->destroy_value) (v); +} + +static inline unsigned int +hash_table_hash_key (x_hash_table *h, void *k) +{ + if (h->hash_key != 0) + return (*h->hash_key) (k); + else + return (unsigned int) k; +} + +static inline int +hash_table_compare_keys (x_hash_table *h, void *k1, void *k2) +{ + if (h->compare_keys == 0) + return k1 == k2; + else + return (*h->compare_keys) (k1, k2) == 0; +} + +static void +hash_table_split (x_hash_table *h) +{ + x_list **new, **old; + x_list *node, *item, *next; + int new_size, old_size; + unsigned int b; + int i; + + if (h->bucket_index == N_BUCKET_SIZES - 1) + return; + + old_size = hash_table_total_buckets (h); + old = h->buckets; + + h->bucket_index++; + + new_size = hash_table_total_buckets (h); + new = calloc (new_size, sizeof (x_list *)); + + if (new == 0) + { + h->bucket_index--; + return; + } + + for (i = 0; i < old_size; i++) + { + for (node = old[i]; node != 0; node = next) + { + next = node->next; + item = node->data; + + b = hash_table_hash_key (h, ITEM_KEY (item)) % new_size; + + node->next = new[b]; + new[b] = node; + } + } + + h->buckets = new; + free (old); +} + +X_EXTERN x_hash_table * +X_PFX (hash_table_new) (x_hash_fun *hash, + x_compare_fun *compare, + x_destroy_fun *key_destroy, + x_destroy_fun *value_destroy) +{ + x_hash_table *h; + + h = calloc (1, sizeof (x_hash_table)); + if (h == 0) + return 0; + + h->bucket_index = 0; + h->buckets = calloc (hash_table_total_buckets (h), sizeof (x_list *)); + + if (h->buckets == 0) + { + free (h); + return 0; + } + + h->hash_key = hash; + h->compare_keys = compare; + h->destroy_key = key_destroy; + h->destroy_value = value_destroy; + + return h; +} + +X_EXTERN void +X_PFX (hash_table_free) (x_hash_table *h) +{ + int n, i; + x_list *node, *item; + + assert (h != NULL); + + n = hash_table_total_buckets (h); + + for (i = 0; i < n; i++) + { + for (node = h->buckets[i]; node != 0; node = node->next) + { + item = node->data; + hash_table_destroy_item (h, ITEM_KEY (item), ITEM_VALUE (item)); + ITEM_FREE (item); + } + X_PFX (list_free) (h->buckets[i]); + } + + free (h->buckets); + free (h); +} + +X_EXTERN unsigned int +X_PFX (hash_table_size) (x_hash_table *h) +{ + assert (h != NULL); + + return h->total_keys; +} + +static void +hash_table_modify (x_hash_table *h, void *k, void *v, int replace) +{ + unsigned int hash_value; + x_list *node, *item; + + assert (h != NULL); + + hash_value = hash_table_hash_key (h, k); + + for (node = h->buckets[hash_value % hash_table_total_buckets (h)]; + node != 0; node = node->next) + { + item = node->data; + + if (hash_table_compare_keys (h, ITEM_KEY (item), k)) + { + if (replace) + { + hash_table_destroy_item (h, ITEM_KEY (item), + ITEM_VALUE (item)); + ITEM_KEY (item) = k; + ITEM_VALUE (item) = v; + } + else + { + hash_table_destroy_item (h, k, ITEM_VALUE (item)); + ITEM_VALUE (item) = v; + } + return; + } + } + + /* Key isn't already in the table. Insert it. */ + + if (h->total_keys + 1 + > hash_table_total_buckets (h) * SPLIT_THRESHOLD_FACTOR) + { + hash_table_split (h); + } + + hash_value = hash_value % hash_table_total_buckets (h); + h->buckets[hash_value] = X_PFX (list_prepend) (h->buckets[hash_value], + ITEM_NEW (k, v)); + h->total_keys++; +} + +X_EXTERN void +X_PFX (hash_table_insert) (x_hash_table *h, void *k, void *v) +{ + hash_table_modify (h, k, v, 0); +} + +X_EXTERN void +X_PFX (hash_table_replace) (x_hash_table *h, void *k, void *v) +{ + hash_table_modify (h, k, v, 1); +} + +X_EXTERN void +X_PFX (hash_table_remove) (x_hash_table *h, void *k) +{ + unsigned int hash_value; + x_list **ptr, *item; + + assert (h != NULL); + + hash_value = hash_table_hash_key (h, k); + + for (ptr = &h->buckets[hash_value % hash_table_total_buckets (h)]; + *ptr != 0; ptr = &((*ptr)->next)) + { + item = (*ptr)->data; + + if (hash_table_compare_keys (h, ITEM_KEY (item), k)) + { + hash_table_destroy_item (h, ITEM_KEY (item), ITEM_VALUE (item)); + ITEM_FREE (item); + item = *ptr; + *ptr = item->next; + X_PFX (list_free_1) (item); + h->total_keys--; + return; + } + } +} + +X_EXTERN void * +X_PFX (hash_table_lookup) (x_hash_table *h, void *k, void **k_ret) +{ + unsigned int hash_value; + x_list *node, *item; + + assert (h != NULL); + + hash_value = hash_table_hash_key (h, k); + + for (node = h->buckets[hash_value % hash_table_total_buckets (h)]; + node != 0; node = node->next) + { + item = node->data; + + if (hash_table_compare_keys (h, ITEM_KEY (item), k)) + { + if (k_ret != 0) + *k_ret = ITEM_KEY (item); + + return ITEM_VALUE (item); + } + } + + if (k_ret != 0) + *k_ret = 0; + + return 0; +} + +X_EXTERN void +X_PFX (hash_table_foreach) (x_hash_table *h, + x_hash_foreach_fun *fun, void *data) +{ + int i, n; + x_list *node, *item; + + assert (h != NULL); + + n = hash_table_total_buckets (h); + + for (i = 0; i < n; i++) + { + for (node = h->buckets[i]; node != 0; node = node->next) + { + item = node->data; + (*fun) (ITEM_KEY (item), ITEM_VALUE (item), data); + } + } +} diff --git a/synfig-osx/launcher/x-hash.h b/synfig-osx/launcher/x-hash.h new file mode 100644 index 0000000..7de998d --- /dev/null +++ b/synfig-osx/launcher/x-hash.h @@ -0,0 +1,61 @@ +/* x-hash.h -- basic hash table class + $Id: x-hash.h,v 1.4 2003/04/16 00:42:14 jharper Exp $ + + Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. */ + +#ifndef X_HASH_H +#define X_HASH_H 1 + +typedef struct x_hash_table_struct x_hash_table; + +typedef int (x_compare_fun) (const void *a, const void *b); +typedef unsigned int (x_hash_fun) (const void *k); +typedef void (x_destroy_fun) (void *x); +typedef void (x_hash_foreach_fun) (void *k, void *v, void *data); + +/* for X_PFX and X_EXTERN */ +#include "x-list.h" + +X_EXTERN x_hash_table *X_PFX (hash_table_new) (x_hash_fun *hash, + x_compare_fun *compare, + x_destroy_fun *key_destroy, + x_destroy_fun *value_destroy); +X_EXTERN void X_PFX (hash_table_free) (x_hash_table *h); + +X_EXTERN unsigned int X_PFX (hash_table_size) (x_hash_table *h); + +X_EXTERN void X_PFX (hash_table_insert) (x_hash_table *h, void *k, void *v); +X_EXTERN void X_PFX (hash_table_replace) (x_hash_table *h, void *k, void *v); +X_EXTERN void X_PFX (hash_table_remove) (x_hash_table *h, void *k); +X_EXTERN void *X_PFX (hash_table_lookup) (x_hash_table *h, + void *k, void **k_ret); +X_EXTERN void X_PFX (hash_table_foreach) (x_hash_table *h, + x_hash_foreach_fun *fun, + void *data); + +#endif /* X_HASH_H */ diff --git a/synfig-osx/launcher/x-hook.c b/synfig-osx/launcher/x-hook.c new file mode 100644 index 0000000..127dc81 --- /dev/null +++ b/synfig-osx/launcher/x-hook.c @@ -0,0 +1,105 @@ +/* x-hook.c + $Id: x-hook.c,v 1.2 2003/04/16 00:42:14 jharper Exp $ + + Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. */ + +#include "x-hook.h" +#include +#include + +#define CELL_NEW(f,d) X_PFX (list_prepend) ((x_list *) (f), (d)) +#define CELL_FREE(c) X_PFX (list_free_1) (c) +#define CELL_FUN(c) ((x_hook_function *) ((c)->next)) +#define CELL_DATA(c) ((c)->data) + +X_EXTERN x_list * +X_PFX (hook_add) (x_list *lst, x_hook_function *fun, void *data) +{ + return X_PFX (list_prepend) (lst, CELL_NEW (fun, data)); +} + +X_EXTERN x_list * +X_PFX (hook_remove) (x_list *lst, x_hook_function *fun, void *data) +{ + x_list *node, *cell; + x_list *to_delete = NULL; + + for (node = lst; node != NULL; node = node->next) + { + cell = node->data; + if (CELL_FUN (cell) == fun && CELL_DATA (cell) == data) + to_delete = X_PFX (list_prepend) (to_delete, cell); + } + + for (node = to_delete; node != NULL; node = node->next) + { + cell = node->data; + lst = X_PFX (list_remove) (lst, cell); + CELL_FREE (cell); + } + + X_PFX (list_free) (to_delete); +} + +X_EXTERN void +X_PFX (hook_run) (x_list *lst, void *arg) +{ + x_list *node, *cell; + x_hook_function **fun; + void **data; + int length, i; + + length = X_PFX (list_length) (lst); + fun = alloca (sizeof (x_hook_function *) * length); + data = alloca (sizeof (void *) * length); + + for (i = 0, node = lst; node != NULL; node = node->next, i++) + { + cell = node->data; + fun[i] = CELL_FUN (cell); + data[i] = CELL_DATA (cell); + } + + for (i = 0; i < length; i++) + { + (*fun[i]) (arg, data[i]); + } +} + +X_EXTERN void +X_PFX (hook_free) (x_list *lst) +{ + x_list *node; + + for (node = lst; node != NULL; node = node->next) + { + CELL_FREE (node->data); + } + + X_PFX (list_free) (lst); +} diff --git a/synfig-osx/launcher/x-hook.h b/synfig-osx/launcher/x-hook.h new file mode 100644 index 0000000..b146a93 --- /dev/null +++ b/synfig-osx/launcher/x-hook.h @@ -0,0 +1,43 @@ +/* x-hook.h -- lists of function,data pairs to call. + $Id: x-hook.h,v 1.2 2003/04/16 00:42:14 jharper Exp $ + + Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. */ + +#ifndef X_HOOK_H +#define X_HOOK_H 1 + +#include "x-list.h" + +typedef void x_hook_function (void *arg, void *data); + +X_EXTERN x_list *X_PFX (hook_add) (x_list *lst, x_hook_function *fun, void *data); +X_EXTERN x_list *X_PFX (hook_remove) (x_list *lst, x_hook_function *fun, void *data); +X_EXTERN void X_PFX (hook_run) (x_list *lst, void *arg); +X_EXTERN void X_PFX (hook_free) (x_list *lst); + +#endif /* X_HOOK_H */ diff --git a/synfig-osx/launcher/x-list.c b/synfig-osx/launcher/x-list.c new file mode 100644 index 0000000..57e9b09 --- /dev/null +++ b/synfig-osx/launcher/x-list.c @@ -0,0 +1,334 @@ +/* x-list.c + $Id: x-list.c,v 1.16 2003/07/18 00:52:19 jharper Exp $ + + Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. */ + +#include "x-list.h" +#include +#include +#include + +/* Allocate in ~4k blocks */ +#define NODES_PER_BLOCK 508 + +typedef struct x_list_block_struct x_list_block; + +struct x_list_block_struct { + x_list l[NODES_PER_BLOCK]; +}; + +static x_list *freelist; + +static pthread_mutex_t freelist_lock = PTHREAD_MUTEX_INITIALIZER; + +static inline void +list_free_1 (x_list *node) +{ + node->next = freelist; + freelist = node; +} + +X_EXTERN void +X_PFX (list_free_1) (x_list *node) +{ + assert (node != NULL); + + pthread_mutex_lock (&freelist_lock); + + list_free_1 (node); + + pthread_mutex_unlock (&freelist_lock); +} + +X_EXTERN void +X_PFX (list_free) (x_list *lst) +{ + x_list *next; + + pthread_mutex_lock (&freelist_lock); + + for (; lst != NULL; lst = next) + { + next = lst->next; + list_free_1 (lst); + } + + pthread_mutex_unlock (&freelist_lock); +} + +X_EXTERN x_list * +X_PFX (list_prepend) (x_list *lst, void *data) +{ + x_list *node; + + pthread_mutex_lock (&freelist_lock); + + if (freelist == NULL) + { + x_list_block *b; + int i; + + b = malloc (sizeof (x_list_block)); + + for (i = 0; i < NODES_PER_BLOCK - 1; i++) + b->l[i].next = &(b->l[i+1]); + b->l[i].next = NULL; + + freelist = b->l; + } + + node = freelist; + freelist = node->next; + + pthread_mutex_unlock (&freelist_lock); + + node->next = lst; + node->data = data; + + return node; +} + +X_EXTERN x_list * +X_PFX (list_append) (x_list *lst, void *data) +{ + x_list *head = lst; + + if (lst == NULL) + return X_PFX (list_prepend) (NULL, data); + + while (lst->next != NULL) + lst = lst->next; + + lst->next = X_PFX (list_prepend) (NULL, data); + + return head; +} + +X_EXTERN x_list * +X_PFX (list_reverse) (x_list *lst) +{ + x_list *head = NULL, *next; + + while (lst != NULL) + { + next = lst->next; + lst->next = head; + head = lst; + lst = next; + } + + return head; +} + +X_EXTERN x_list * +X_PFX (list_find) (x_list *lst, void *data) +{ + for (; lst != NULL; lst = lst->next) + { + if (lst->data == data) + return lst; + } + + return NULL; +} + +X_EXTERN x_list * +X_PFX (list_nth) (x_list *lst, int n) +{ + while (n-- > 0 && lst != NULL) + lst = lst->next; + + return lst; +} + +X_EXTERN x_list * +X_PFX (list_pop) (x_list *lst, void **data_ret) +{ + void *data = NULL; + + if (lst != NULL) + { + x_list *tem = lst; + data = lst->data; + lst = lst->next; + X_PFX (list_free_1) (tem); + } + + if (data_ret != NULL) + *data_ret = data; + + return lst; +} + +X_EXTERN x_list * +X_PFX (list_filter) (x_list *lst, + int (*pred) (void *item, void *data), void *data) +{ + x_list *ret = NULL, *node; + + for (node = lst; node != NULL; node = node->next) + { + if ((*pred) (node->data, data)) + ret = X_PFX (list_prepend) (ret, node->data); + } + + return X_PFX (list_reverse) (ret); +} + +X_EXTERN x_list * +X_PFX (list_map) (x_list *lst, + void *(*fun) (void *item, void *data), void *data) +{ + x_list *ret = NULL, *node; + + for (node = lst; node != NULL; node = node->next) + { + X_PFX (list_prepend) (ret, fun (node->data, data)); + } + + return X_PFX (list_reverse) (ret); +} + +X_EXTERN x_list * +X_PFX (list_copy) (x_list *lst) +{ + x_list *copy = NULL; + + for (; lst != NULL; lst = lst->next) + { + copy = X_PFX (list_prepend) (copy, lst->data); + } + + return X_PFX (list_reverse) (copy); +} + +X_EXTERN x_list * +X_PFX (list_remove) (x_list *lst, void *data) +{ + x_list **ptr, *node; + + for (ptr = &lst; *ptr != NULL;) + { + node = *ptr; + + if (node->data == data) + { + *ptr = node->next; + X_PFX (list_free_1) (node); + } + else + ptr = &((*ptr)->next); + } + + return lst; +} + +X_EXTERN unsigned int +X_PFX (list_length) (x_list *lst) +{ + unsigned int n; + + n = 0; + for (; lst != NULL; lst = lst->next) + n++; + + return n; +} + +X_EXTERN void +X_PFX (list_foreach) (x_list *lst, + void (*fun) (void *data, void *user_data), + void *user_data) +{ + for (; lst != NULL; lst = lst->next) + { + (*fun) (lst->data, user_data); + } +} + +static x_list * +list_sort_1 (x_list *lst, int length, + int (*less) (const void *, const void *)) +{ + x_list *mid, *ptr; + x_list *out_head, *out; + int mid_point, i; + + /* This is a standard (stable) list merge sort */ + + if (length < 2) + return lst; + + /* Calculate the halfway point. Split the list into two sub-lists. */ + + mid_point = length / 2; + ptr = lst; + for (i = mid_point - 1; i > 0; i--) + ptr = ptr->next; + mid = ptr->next; + ptr->next = NULL; + + /* Sort each sub-list. */ + + lst = list_sort_1 (lst, mid_point, less); + mid = list_sort_1 (mid, length - mid_point, less); + + /* Then merge them back together. */ + + assert (lst != NULL && mid != NULL); + + if ((*less) (mid->data, lst->data)) + out = out_head = mid, mid = mid->next; + else + out = out_head = lst, lst = lst->next; + + while (lst != NULL && mid != NULL) + { + if ((*less) (mid->data, lst->data)) + out = out->next = mid, mid = mid->next; + else + out = out->next = lst, lst = lst->next; + } + + if (lst != NULL) + out->next = lst; + else + out->next = mid; + + return out_head; +} + +X_EXTERN x_list * +X_PFX (list_sort) (x_list *lst, int (*less) (const void *, const void *)) +{ + int length; + + length = X_PFX (list_length) (lst); + + return list_sort_1 (lst, length, less); +} diff --git a/synfig-osx/launcher/x-list.h b/synfig-osx/launcher/x-list.h new file mode 100644 index 0000000..3e19eba --- /dev/null +++ b/synfig-osx/launcher/x-list.h @@ -0,0 +1,78 @@ +/* x-list.h -- simple list type + $Id: x-list.h,v 1.10 2003/07/18 00:52:19 jharper Exp $ + + Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. */ + +#ifndef X_LIST_H +#define X_LIST_H 1 + +/* This is just a cons. */ + +typedef struct x_list_struct x_list; + +struct x_list_struct { + void *data; + x_list *next; +}; + +#ifndef X_PFX +# define X_PFX(x) x_ ## x +#endif + +#ifndef X_EXTERN +# define X_EXTERN __private_extern__ +#endif + +X_EXTERN void X_PFX (list_free_1) (x_list *node); +X_EXTERN x_list *X_PFX (list_prepend) (x_list *lst, void *data); + +X_EXTERN x_list *X_PFX (list_append) (x_list *lst, void *data); +X_EXTERN x_list *X_PFX (list_remove) (x_list *lst, void *data); +X_EXTERN void X_PFX (list_free) (x_list *lst); +X_EXTERN x_list *X_PFX (list_pop) (x_list *lst, void **data_ret); + +X_EXTERN x_list *X_PFX (list_copy) (x_list *lst); +X_EXTERN x_list *X_PFX (list_reverse) (x_list *lst); +X_EXTERN x_list *X_PFX (list_find) (x_list *lst, void *data); +X_EXTERN x_list *X_PFX (list_nth) (x_list *lst, int n); +X_EXTERN x_list *X_PFX (list_filter) (x_list *src, + int (*pred) (void *item, void *data), + void *data); +X_EXTERN x_list *X_PFX (list_map) (x_list *src, + void *(*fun) (void *item, void *data), + void *data); + +X_EXTERN unsigned int X_PFX (list_length) (x_list *lst); +X_EXTERN void X_PFX (list_foreach) (x_list *lst, void (*fun) + (void *data, void *user_data), + void *user_data); + +X_EXTERN x_list *X_PFX (list_sort) (x_list *lst, int (*less) (const void *, + const void *)); + +#endif /* X_LIST_H */ diff --git a/synfig-osx/trunk/launcher/.cvsignore b/synfig-osx/trunk/launcher/.cvsignore deleted file mode 100644 index bc414e1..0000000 --- a/synfig-osx/trunk/launcher/.cvsignore +++ /dev/null @@ -1,9 +0,0 @@ -Makefile -Xquartz.1.html -Xquartz._man -XFree86.1.html -XFree86._man -XFree86.man -appledri.h appledristr.h -xf86drm.h -build diff --git a/synfig-osx/trunk/launcher/English.lproj/.cvsignore b/synfig-osx/trunk/launcher/English.lproj/.cvsignore deleted file mode 100644 index 033b104..0000000 --- a/synfig-osx/trunk/launcher/English.lproj/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -main~.nib diff --git a/synfig-osx/trunk/launcher/English.lproj/InfoPlist.strings b/synfig-osx/trunk/launcher/English.lproj/InfoPlist.strings deleted file mode 100644 index a95d5c7e8dde370707aa5007e09e2462233379f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 380 zcmZ{fOACTP6ot>aUm-3f%A#GgNhktoBe;)zB$bMfpniPyjX@wN!_0lmIp?1H{%9^o zmV6aD>!h19y%Z~=_aIiP=@iO|7BS&HP$lFul^woTL-z{$*`XXXCmc^ZZPkK~z{NVE ze - - - - IBDocumentLocation - 61 48 372 379 0 0 1280 832 - IBEditorPositions - - 29 - 530 771 319 44 0 0 1280 832 - 423 - 525 668 148 61 0 0 1280 832 - - IBFramework Version - 437.0 - IBGroupedObjects - - 0 - - 371 - 372 - - 1 - - 385 - 382 - 386 - - 3 - - 370 - 369 - - 4 - - 363 - 365 - - 5 - - 368 - 364 - - 6 - - 543 - 541 - - 7 - - 375 - 377 - - 8 - - 374 - 376 - - - IBLastGroupID - 9 - IBLockedObjects - - 285 - 348 - 244 - - IBOpenObjects - - 423 - 29 - - IBSystem Version - 8C46 - - diff --git a/synfig-osx/trunk/launcher/English.lproj/main.nib/objects.nib b/synfig-osx/trunk/launcher/English.lproj/main.nib/objects.nib deleted file mode 100644 index 181e294151aa96cb9c30dab9d727b2df63b12612..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12364 zcmb7K4Rlr2l|J|8hmeH)B18u3WyC3>P-7|zLop%1K$Q?lEH0s>FYn#tU3q`LdmkaT zgPd^RE7Lk1eJk8C#TiB|)q)0wpW-YXD59-Ptd8T)8e6U%T}xV*%(@b(c0R|?8hD}T^%s2l$>vU!t(Wo z^tO21H^^*z8fc5h;gO28{p0jLdj>|WTSr4%ml<;SJ&`~(1v<)usUcR!*w90lFJER! z5UlIyk_*_Vo6$tvuir5201;Hzg?;@x4XTwKwFhR_0G1l{GU>$|@sMqg#sP0B2l|9;keJ2VD!YK`x3soUND%i;L>zlA29&fXu#aG4$3&R> zNH3~7y1Mlp)*3?(1+KR3>DZ)b#EM5lHwXp!mZ1;e30T;*STqvQ;|$7kI-MM0c6BTM z`Z9m^{*h^(o`HQdLQbOU4bn?6H3mrg?M{Qg#^K)LMd z?6`J46uLvaxA{ql>AhYsLr-ncd&3wiRW4x%ONjxjarQl?u9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gJXEbNI9k&#Sny*j<SlK#u36l}oc*2qF;{lE zcXIVUw~=-{&DBTH^m65|(X>ES+_PLU@%#g>8txLV_Pd**3;@Kq@|>%2M)*6q`X_E1 zS9{#gxbl~7C0FMFx|S<9W7=o9GJv;lapn7Hu+;nA>p25^$V1hu+|N-v0vrN73eX;| zEOcQ*|KNVX)oa{Ox$+P?1JD6C3{}PRt(=_&;tR-D-8W$&?yTGK`V^RU=W+%GQ{r41 ub(eGXJ8n5??k=v*1;%fEDD)s*sP6)UF diff --git a/synfig-osx/trunk/launcher/English.lproj/main~.nib/classes.nib b/synfig-osx/trunk/launcher/English.lproj/main~.nib/classes.nib deleted file mode 100644 index c247ea9..0000000 --- a/synfig-osx/trunk/launcher/English.lproj/main~.nib/classes.nib +++ /dev/null @@ -1,49 +0,0 @@ -{ - IBClasses = ( - {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, - { - ACTIONS = { - "apps_table_cancel" = id; - "apps_table_delete" = id; - "apps_table_done" = id; - "apps_table_duplicate" = id; - "apps_table_new" = id; - "apps_table_show" = id; - "bring_to_front" = id; - "close_window" = id; - "enable_fullscreen_changed" = id; - "minimize_window" = id; - "next_window" = id; - "prefs_changed" = id; - "prefs_show" = id; - "previous_window" = id; - "toggle_fullscreen" = id; - "x11_help" = id; - "zoom_window" = id; - }; - CLASS = X11Controller; - LANGUAGE = ObjC; - OUTLETS = { - "apps_separator" = id; - "apps_table" = id; - depth = id; - "dock_apps_menu" = id; - "dock_menu" = id; - "dock_window_separator" = id; - "enable_auth" = id; - "enable_fullscreen" = id; - "enable_keyequivs" = id; - "enable_tcp" = id; - "fake_buttons" = id; - "prefs_panel" = id; - "sync_keymap" = id; - "toggle_fullscreen_item" = id; - "use_sysbeep" = id; - "window_separator" = id; - "x11_about_item" = id; - }; - SUPERCLASS = NSObject; - } - ); - IBVersion = 1; -} \ No newline at end of file diff --git a/synfig-osx/trunk/launcher/English.lproj/main~.nib/info.nib b/synfig-osx/trunk/launcher/English.lproj/main~.nib/info.nib deleted file mode 100644 index 91ebde6..0000000 --- a/synfig-osx/trunk/launcher/English.lproj/main~.nib/info.nib +++ /dev/null @@ -1,78 +0,0 @@ - - - - - IBDocumentLocation - 61 48 372 379 0 0 1280 832 - IBEditorPositions - - 29 - 530 771 301 44 0 0 1280 832 - 423 - 525 668 142 61 0 0 1280 832 - - IBFramework Version - 349.0 - IBGroupedObjects - - 0 - - 371 - 372 - - 1 - - 385 - 382 - 386 - - 3 - - 370 - 369 - - 4 - - 363 - 365 - - 5 - - 368 - 364 - - 6 - - 543 - 541 - - 7 - - 375 - 377 - - 8 - - 374 - 376 - - - IBLastGroupID - 9 - IBLockedObjects - - 285 - 348 - 244 - - IBOpenObjects - - 423 - 29 - 285 - 244 - - IBSystem Version - 7R28 - - diff --git a/synfig-osx/trunk/launcher/English.lproj/main~.nib/objects.nib b/synfig-osx/trunk/launcher/English.lproj/main~.nib/objects.nib deleted file mode 100644 index d348ff21647c4c31dbf5ec5e603964691b51a684..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15083 zcmb_j4Rlo1oxgXI3_}tiK|aKV^18*fLZyJ#5018h0BafuNYJ)c8;6;fz1>U|(izN-we|M)wzVY^#mgHB58H0_L9W;1Nj=xDr&9B6dj>l7 zoz^--PbI1AgSOp_JrcA$eQ&kxXjeCVS_O;@W3ZmT&6r)^h97(X{#bXvnX?iF%fSW! zTxVvi*?Wf;*$p4R{K~|wQO4Ls`1kgCww@JOf*CBy;_Po(4!<+_tYa&Ig-;E8!ajzK=>| zfn}4=;F}D6;5yr$N=Rp{oSC{*@`k$c2~eB$eAdiB2y8Ejz7c>aBTM5epP&v%pgVzi zDe4mJ7wCMVR2*Vtu4e22m|4HZ z%;?VKnKjL4R(+XSPuWxRdBY%T+64R7JU-|Qww=e)jPwXP=~LxvKJ}Au=0mMkT&>h< zmQt(hp+YIP1HUaOSAxY42D@R3}_?g(x2!Z@28_sI!KaoGqdj!I0lJ)TME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C)/GL/apple) - -SRCS = darwin.c \ - darwin-input.c \ - darwin-keyboard.c \ - darwin-new-keymap.c \ - darwin-old-keymap.c \ - keysym2ucs.c \ - quartz.c \ - quartz-audio.c \ - quartz-cursor.c \ - quartz-server.c \ - rootless-common.c \ - rootless-gc.c \ - rootless-picture.c \ - rootless-screen.c \ - rootless-val-tree.c \ - rootless-window.c \ - pseudoramiX.c \ - appledri.c \ - applewm-impl.c \ - dri-surface.c \ - x-list.c \ - x-hash.c \ - x-hook.c \ - X11Application.m \ - X11Controller.m - -OBJS = darwin.o \ - darwin-input.o \ - darwin-keyboard.o \ - darwin-new-keymap.o \ - darwin-old-keymap.o \ - keysym2ucs.o \ - quartz.o \ - quartz-audio.o \ - quartz-cursor.o \ - quartz-server.o \ - rootless-common.o \ - rootless-gc.o \ - rootless-picture.o \ - rootless-screen.o \ - rootless-val-tree.o \ - rootless-window.o \ - pseudoramiX.o \ - appledri.o \ - applewm-impl.o \ - dri-surface.o \ - x-list.o \ - x-hash.o \ - x-hook.o \ - X11Application.o \ - X11Controller.o - -AS := /System/Library/Frameworks/ApplicationServices.framework - -INCLUDES = -I. -I$(SERVERSRC)/mi -I$(SERVERSRC)/fb -I$(EXTINCSRC) \ - -I$(SERVERSRC)/render -I$(SERVERSRC)/include -I$(XINCLUDESRC) \ - -I$(SERVERSRC)/os -I$(SERVERSRC)/Xext -I$(SERVERSRC)/GL/apple \ - -I$(INCLUDESRC) -I$(FONTINCSRC) -F$(AS)/Frameworks \ - $(XPLUGIN_INCLUDE) - -OSNAME = OSName -OSVENDOR = OSVendor -OSNAMEDEF = -DOSNAME='" $(OSNAME)"' -DOSVENDOR='" $(OSVENDOR)"' - -#if defined(XFree86CustomVersion) -CUSTOMVERSION = XFree86CustomVersion -CUSTOMVERDEF = -DXF86_CUSTOM_VERSION='$(CUSTOMVERSION)' -#endif - -#if defined(BuilderString) -BUILDERSTRING = BuilderString -BUILDERMSG = -DBUILDERSTRING='$(BUILDERSTRING)' -#endif - -SUBDIRS = utils - -DEFINES = $(CUSTOMVERDEF) -DXBINDIR=$(BINDIR) -DXINITDIR=$(XINITDIR) \ - $(QUARTZDEFINES) $(DEBUGDEFINES) - -#if XFree86Devel -DEBUGDEFINES = -DROOTLESSDEBUG -#endif - -EXTRAMANDEFS = -D__logdir__=$(LOGDIRECTORY) - -SpecialCObjectRule(darwin,$(ICONFIGFILES),$(OSNAMEDEF) $(BUILDERMSG) $(CUSTOMVERDEF)) - -NormalLibraryObjectRule() -NormalLibraryTarget(XQuartz,$(OBJS)) - -InstallManPage(Xquartz,$(MANDIR)) -InstallManPage(XFree86,$(MANDIR)) - -DependTarget() - -MakeSubdirs($(SUBDIRS)) -DependSubdirs($(SUBDIRS)) - -#ifndef DarwinArchEnv -#define DarwinArchEnv -#endif - -PBXBUILD = DarwinArchEnv pbxbuild -PBXBUILDSTYLE = Development -PBXBUILDDIR= ./build - -DITTO = ditto - -#if NothingOutsideProjectRoot -APPINSTALLDIR = $(BINDIR)/../Applications -#else -APPINSTALLDIR = /Applications/Utilities -#endif - -all:: - $(PBXBUILD) -buildstyle $(PBXBUILDSTYLE) build - -install:: - $(PBXBUILD) -buildstyle $(PBXBUILDSTYLE) install - mkdir -p $(DESTDIR)$(APPINSTALLDIR) - $(DITTO) $(PBXBUILDDIR)/UninstalledProducts/X11.app $(DESTDIR)$(APPINSTALLDIR)/X11.app - -clean:: - $(PBXBUILD) 'clean' - -%.o : %.m - $(CC) $(CFLAGS) -c -o $@ $< diff --git a/synfig-osx/trunk/launcher/Synfig Studio.pbproj/.cvsignore b/synfig-osx/trunk/launcher/Synfig Studio.pbproj/.cvsignore deleted file mode 100644 index 3cc7cb5..0000000 --- a/synfig-osx/trunk/launcher/Synfig Studio.pbproj/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -jsh.pbxuser diff --git a/synfig-osx/trunk/launcher/Synfig Studio.pbproj/darco.mode1 b/synfig-osx/trunk/launcher/Synfig Studio.pbproj/darco.mode1 deleted file mode 100644 index b7a78d1..0000000 --- a/synfig-osx/trunk/launcher/Synfig Studio.pbproj/darco.mode1 +++ /dev/null @@ -1,1315 +0,0 @@ - - - - - ActivePerspectiveName - Project - AllowedModules - - - BundleLoadPath - - MaxInstances - n - Module - PBXSmartGroupTreeModule - Name - Groups and Files Outline View - - - BundleLoadPath - - MaxInstances - n - Module - PBXNavigatorGroup - Name - Editor - - - BundleLoadPath - - MaxInstances - n - Module - XCTaskListModule - Name - Task List - - - BundleLoadPath - - MaxInstances - n - Module - XCDetailModule - Name - File and Smart Group Detail Viewer - - - BundleLoadPath - - MaxInstances - 1 - Module - PBXBuildResultsModule - Name - Detailed Build Results Viewer - - - BundleLoadPath - - MaxInstances - 1 - Module - PBXProjectFindModule - Name - Project Batch Find Tool - - - BundleLoadPath - - MaxInstances - n - Module - PBXRunSessionModule - Name - Run Log - - - BundleLoadPath - - MaxInstances - n - Module - PBXBookmarksModule - Name - Bookmarks Tool - - - BundleLoadPath - - MaxInstances - n - Module - PBXClassBrowserModule - Name - Class Browser - - - BundleLoadPath - - MaxInstances - n - Module - PBXCVSModule - Name - Source Code Control Tool - - - BundleLoadPath - - MaxInstances - n - Module - PBXDebugBreakpointsModule - Name - Debug Breakpoints Tool - - - BundleLoadPath - - MaxInstances - n - Module - XCDockableInspector - Name - Inspector - - - BundleLoadPath - - MaxInstances - n - Module - PBXOpenQuicklyModule - Name - Open Quickly Tool - - - BundleLoadPath - - MaxInstances - 1 - Module - PBXDebugSessionModule - Name - Debugger - - - BundleLoadPath - - MaxInstances - 1 - Module - PBXDebugCLIModule - Name - Debug Console - - - Description - DefaultDescriptionKey - DockingSystemVisible - - Extension - mode1 - FavBarConfig - - PBXProjectModuleGUID - A66420E408E74B62005A12D3 - XCBarModuleItemNames - - XCBarModuleItems - - - FirstTimeWindowDisplayed - - Identifier - com.apple.perspectives.project.mode1 - MajorVersion - 31 - MinorVersion - 1 - Name - Default - Notifications - - OpenEditors - - - Content - - PBXProjectModuleGUID - A664210208E74CC8005A12D3 - PBXProjectModuleLabel - Target: SynfigStudio - PBXSplitModuleInNavigatorKey - - Split0 - - PBXProjectModuleGUID - A664210308E74CC8005A12D3 - PBXProjectModuleLabel - Target: SynfigStudio - _historyCapacity - 0 - bookmark - A664210908E77262005A12D3 - history - - A664210408E74CC8005A12D3 - - - SplitCount - 1 - - StatusBarVisibility - - - Geometry - - Frame - {{0, 20}, {784, 658}} - PBXModuleWindowStatusBarHidden2 - - RubberWindowFrame - 42 107 784 699 0 0 1280 832 - - - - PerspectiveWidths - - -1 - -1 - - Perspectives - - - ChosenToolbarItems - - active-target-popup - active-buildstyle-popup - action - NSToolbarFlexibleSpaceItem - build-and-debug - buildOrClean - get-info - toggle-editor - servicesModuleCVS - NSToolbarFlexibleSpaceItem - com.apple.pbx.toolbar.searchfield - - ControllerClassBaseName - - IconName - WindowOfProjectWithEditor - Identifier - perspective.project - IsVertical - - Layout - - - BecomeActive - - ContentConfiguration - - PBXBottomSmartGroupGIDs - - 1C37FBAC04509CD000000102 - 1C37FAAC04509CD000000102 - 1C08E77C0454961000C914BD - 1C37FABC05509CD000000102 - 1C37FABC05539CD112110102 - E2644B35053B69B200211256 - 1C37FABC04509CD000100104 - 1CC0EA4004350EF90044410B - 1CC0EA4004350EF90041110B - - PBXProjectModuleGUID - 1CE0B1FE06471DED0097A5F4 - PBXProjectModuleLabel - Files - PBXProjectStructureProvided - yes - PBXSmartGroupTreeModuleColumnData - - PBXSmartGroupTreeModuleColumnWidthsKey - - 186 - - PBXSmartGroupTreeModuleColumnsKey_v4 - - MainColumn - - - PBXSmartGroupTreeModuleOutlineStateKey_v7 - - PBXSmartGroupTreeModuleOutlineStateExpansionKey - - 20286C29FDCF999611CA2CEA - 20286C2CFDCF999611CA2CEA - 02345980000FD03B11CA0E72 - 1C37FBAC04509CD000000102 - 1C08E77C0454961000C914BD - 1C37FABC05509CD000000102 - - PBXSmartGroupTreeModuleOutlineStateSelectionKey - - - 7 - 2 - 0 - - - PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {186, 617}} - - PBXTopSmartGroupGIDs - - XCIncludePerspectivesSwitch - - XCSharingToken - com.apple.Xcode.GFSharingToken - - GeometryConfiguration - - Frame - {{0, 0}, {203, 635}} - GroupTreeTableConfiguration - - MainColumn - 186 - - RubberWindowFrame - 297 92 845 676 0 0 1280 832 - - Module - PBXSmartGroupTreeModule - Proportion - 203pt - - - Dock - - - ContentConfiguration - - PBXProjectModuleGUID - 1CE0B20306471E060097A5F4 - PBXProjectModuleLabel - bundle-main.c - PBXSplitModuleInNavigatorKey - - Split0 - - PBXProjectModuleGUID - 1CE0B20406471E060097A5F4 - PBXProjectModuleLabel - bundle-main.c - _historyCapacity - 0 - bookmark - A664210808E77262005A12D3 - history - - A66420F808E74CC8005A12D3 - A66420F908E74CC8005A12D3 - A66420FA08E74CC8005A12D3 - A66420FB08E74CC8005A12D3 - - prevStack - - A66420FC08E74CC8005A12D3 - A66420FD08E74CC8005A12D3 - A66420FE08E74CC8005A12D3 - A66420FF08E74CC8005A12D3 - A664210008E74CC8005A12D3 - - - SplitCount - 1 - - StatusBarVisibility - - - GeometryConfiguration - - Frame - {{0, 0}, {637, 384}} - RubberWindowFrame - 297 92 845 676 0 0 1280 832 - - Module - PBXNavigatorGroup - Proportion - 384pt - - - ContentConfiguration - - PBXProjectModuleGUID - 1CE0B20506471E060097A5F4 - PBXProjectModuleLabel - Detail - - GeometryConfiguration - - Frame - {{0, 389}, {637, 246}} - RubberWindowFrame - 297 92 845 676 0 0 1280 832 - - Module - XCDetailModule - Proportion - 246pt - - - Proportion - 637pt - - - Name - Project - ServiceClasses - - XCModuleDock - PBXSmartGroupTreeModule - XCModuleDock - PBXNavigatorGroup - XCDetailModule - - TableOfContents - - A66420E208E74B62005A12D3 - 1CE0B1FE06471DED0097A5F4 - A66420E308E74B62005A12D3 - 1CE0B20306471E060097A5F4 - 1CE0B20506471E060097A5F4 - - ToolbarConfiguration - xcode.toolbar.config.default - - - ControllerClassBaseName - - IconName - WindowOfProject - Identifier - perspective.morph - IsVertical - 0 - Layout - - - BecomeActive - 1 - ContentConfiguration - - PBXBottomSmartGroupGIDs - - 1C37FBAC04509CD000000102 - 1C37FAAC04509CD000000102 - 1C08E77C0454961000C914BD - 1C37FABC05509CD000000102 - 1C37FABC05539CD112110102 - E2644B35053B69B200211256 - 1C37FABC04509CD000100104 - 1CC0EA4004350EF90044410B - 1CC0EA4004350EF90041110B - - PBXProjectModuleGUID - 11E0B1FE06471DED0097A5F4 - PBXProjectModuleLabel - Files - PBXProjectStructureProvided - yes - PBXSmartGroupTreeModuleColumnData - - PBXSmartGroupTreeModuleColumnWidthsKey - - 186 - - PBXSmartGroupTreeModuleColumnsKey_v4 - - MainColumn - - - PBXSmartGroupTreeModuleOutlineStateKey_v7 - - PBXSmartGroupTreeModuleOutlineStateExpansionKey - - 29B97314FDCFA39411CA2CEA - 1C37FABC05509CD000000102 - - PBXSmartGroupTreeModuleOutlineStateSelectionKey - - - 0 - - - PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {186, 337}} - - PBXTopSmartGroupGIDs - - XCIncludePerspectivesSwitch - 1 - XCSharingToken - com.apple.Xcode.GFSharingToken - - GeometryConfiguration - - Frame - {{0, 0}, {203, 355}} - GroupTreeTableConfiguration - - MainColumn - 186 - - RubberWindowFrame - 373 269 690 397 0 0 1440 878 - - Module - PBXSmartGroupTreeModule - Proportion - 100% - - - Name - Morph - PreferredWidth - 300 - ServiceClasses - - XCModuleDock - PBXSmartGroupTreeModule - - TableOfContents - - 11E0B1FE06471DED0097A5F4 - - ToolbarConfiguration - xcode.toolbar.config.default.short - - - PerspectivesBarVisible - - ShelfIsVisible - - SourceDescription - file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCPerspectivesSpecificationMode1.xcperspec' - StatusbarIsVisible - - TimeStamp - 0.0 - ToolbarDisplayMode - 2 - ToolbarIsVisible - - ToolbarSizeMode - 2 - Type - Perspectives - UpdateMessage - The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? - WindowJustification - 5 - WindowOrderList - - A66420EE08E74B62005A12D3 - A66420EF08E74B62005A12D3 - A66420EC08E74B62005A12D3 - A66420EB08E74B62005A12D3 - 1CD10A99069EF8BA00B06720 - /Users/darco/Projects/X11App/Synfig Studio.pbproj - A664210208E74CC8005A12D3 - - WindowString - 297 92 845 676 0 0 1280 832 - WindowTools - - - Identifier - windowTool.build - Layout - - - Dock - - - ContentConfiguration - - PBXProjectModuleGUID - 1CD0528F0623707200166675 - PBXProjectModuleLabel - <No Editor> - PBXSplitModuleInNavigatorKey - - Split0 - - PBXProjectModuleGUID - 1CD052900623707200166675 - - SplitCount - 1 - - StatusBarVisibility - 1 - - GeometryConfiguration - - Frame - {{0, 0}, {500, 215}} - RubberWindowFrame - 192 257 500 500 0 0 1280 1002 - - Module - PBXNavigatorGroup - Proportion - 218pt - - - BecomeActive - 1 - ContentConfiguration - - PBXProjectModuleGUID - XCMainBuildResultsModuleGUID - PBXProjectModuleLabel - Build - - GeometryConfiguration - - Frame - {{0, 222}, {500, 236}} - RubberWindowFrame - 192 257 500 500 0 0 1280 1002 - - Module - PBXBuildResultsModule - Proportion - 236pt - - - Proportion - 458pt - - - Name - Build Results - ServiceClasses - - PBXBuildResultsModule - - StatusbarIsVisible - 1 - TableOfContents - - 1C78EAA5065D492600B07095 - 1C78EAA6065D492600B07095 - 1CD0528F0623707200166675 - XCMainBuildResultsModuleGUID - - ToolbarConfiguration - xcode.toolbar.config.build - WindowString - 192 257 500 500 0 0 1280 1002 - - - FirstTimeWindowDisplayed - - Identifier - windowTool.debugger - IsVertical - - Layout - - - Dock - - - ContentConfiguration - - Debugger - - HorizontalSplitView - - _collapsingFrameDimension - 0.0 - _indexOfCollapsedView - 0 - _percentageOfCollapsedView - 0.0 - isCollapsed - yes - sizes - - {{0, 0}, {305, 162}} - {{305, 0}, {389, 162}} - - - VerticalSplitView - - _collapsingFrameDimension - 0.0 - _indexOfCollapsedView - 0 - _percentageOfCollapsedView - 0.0 - isCollapsed - yes - sizes - - {{0, 0}, {694, 162}} - {{0, 162}, {694, 219}} - - - - LauncherConfigVersion - 8 - PBXProjectModuleGUID - 1C162984064C10D400B95A72 - PBXProjectModuleLabel - Debug - GLUTExamples (Underwater) - - GeometryConfiguration - - DebugConsoleDrawerSize - {100, 120} - DebugConsoleVisible - None - DebugConsoleWindowFrame - {{200, 200}, {500, 300}} - DebugSTDIOWindowFrame - {{200, 200}, {500, 300}} - Frame - {{0, 0}, {694, 381}} - RubberWindowFrame - 318 323 694 422 0 0 1280 832 - - Module - PBXDebugSessionModule - Proportion - 381pt - - - Proportion - 381pt - - - Name - Debugger - ServiceClasses - - PBXDebugSessionModule - - StatusbarIsVisible - - TableOfContents - - 1CD10A99069EF8BA00B06720 - A66420E508E74B62005A12D3 - 1C162984064C10D400B95A72 - A66420E608E74B62005A12D3 - A66420E708E74B62005A12D3 - A66420E808E74B62005A12D3 - A66420E908E74B62005A12D3 - A66420EA08E74B62005A12D3 - A66420EB08E74B62005A12D3 - - ToolbarConfiguration - xcode.toolbar.config.debug - WindowString - 318 323 694 422 0 0 1280 832 - WindowToolGUID - 1CD10A99069EF8BA00B06720 - WindowToolIsVisible - - - - Identifier - windowTool.find - Layout - - - Dock - - - Dock - - - ContentConfiguration - - PBXProjectModuleGUID - 1CDD528C0622207200134675 - PBXProjectModuleLabel - <No Editor> - PBXSplitModuleInNavigatorKey - - Split0 - - PBXProjectModuleGUID - 1CD0528D0623707200166675 - - SplitCount - 1 - - StatusBarVisibility - 1 - - GeometryConfiguration - - Frame - {{0, 0}, {781, 167}} - RubberWindowFrame - 62 385 781 470 0 0 1440 878 - - Module - PBXNavigatorGroup - Proportion - 781pt - - - Proportion - 50% - - - BecomeActive - 1 - ContentConfiguration - - PBXProjectModuleGUID - 1CD0528E0623707200166675 - PBXProjectModuleLabel - Project Find - - GeometryConfiguration - - Frame - {{8, 0}, {773, 254}} - RubberWindowFrame - 62 385 781 470 0 0 1440 878 - - Module - PBXProjectFindModule - Proportion - 50% - - - Proportion - 428pt - - - Name - Project Find - ServiceClasses - - PBXProjectFindModule - - StatusbarIsVisible - 1 - TableOfContents - - 1C530D57069F1CE1000CFCEE - 1C530D58069F1CE1000CFCEE - 1C530D59069F1CE1000CFCEE - 1CDD528C0622207200134675 - 1C530D5A069F1CE1000CFCEE - 1CE0B1FE06471DED0097A5F4 - 1CD0528E0623707200166675 - - WindowString - 62 385 781 470 0 0 1440 878 - WindowToolGUID - 1C530D57069F1CE1000CFCEE - WindowToolIsVisible - 0 - - - Identifier - MENUSEPARATOR - - - FirstTimeWindowDisplayed - - Identifier - windowTool.debuggerConsole - IsVertical - - Layout - - - Dock - - - ContentConfiguration - - PBXProjectModuleGUID - 1C78EAAC065D492600B07095 - PBXProjectModuleLabel - Debugger Console - - GeometryConfiguration - - Frame - {{0, 0}, {440, 358}} - RubberWindowFrame - 339 322 440 400 0 0 1280 832 - - Module - PBXDebugCLIModule - Proportion - 358pt - - - Proportion - 359pt - - - Name - Debugger Console - ServiceClasses - - PBXDebugCLIModule - - StatusbarIsVisible - - TableOfContents - - A66420EC08E74B62005A12D3 - A66420ED08E74B62005A12D3 - 1C78EAAC065D492600B07095 - - WindowString - 339 322 440 400 0 0 1280 832 - WindowToolGUID - A66420EC08E74B62005A12D3 - WindowToolIsVisible - - - - Identifier - windowTool.run - Layout - - - Dock - - - ContentConfiguration - - LauncherConfigVersion - 3 - PBXProjectModuleGUID - 1CD0528B0623707200166675 - PBXProjectModuleLabel - Run - Runner - - HorizontalSplitView - - _collapsingFrameDimension - 0.0 - _indexOfCollapsedView - 0 - _percentageOfCollapsedView - 0.0 - isCollapsed - yes - sizes - - {{0, 0}, {493, 167}} - {{0, 176}, {493, 267}} - - - VerticalSplitView - - _collapsingFrameDimension - 0.0 - _indexOfCollapsedView - 0 - _percentageOfCollapsedView - 0.0 - isCollapsed - yes - sizes - - {{0, 0}, {405, 443}} - {{414, 0}, {514, 443}} - - - - - GeometryConfiguration - - Frame - {{0, 0}, {460, 159}} - RubberWindowFrame - 316 696 459 200 0 0 1280 1002 - - Module - PBXRunSessionModule - Proportion - 159pt - - - Proportion - 159pt - - - Name - Run Log - ServiceClasses - - PBXRunSessionModule - - StatusbarIsVisible - 1 - TableOfContents - - 1C0AD2B3069F1EA900FABCE6 - 1C0AD2B4069F1EA900FABCE6 - 1CD0528B0623707200166675 - 1C0AD2B5069F1EA900FABCE6 - - ToolbarConfiguration - xcode.toolbar.config.run - WindowString - 316 696 459 200 0 0 1280 1002 - WindowToolGUID - 1C0AD2B3069F1EA900FABCE6 - WindowToolIsVisible - 0 - - - Identifier - windowTool.scm - Layout - - - Dock - - - ContentConfiguration - - PBXProjectModuleGUID - 1C78EAB2065D492600B07095 - PBXProjectModuleLabel - <No Editor> - PBXSplitModuleInNavigatorKey - - Split0 - - PBXProjectModuleGUID - 1C78EAB3065D492600B07095 - - SplitCount - 1 - - StatusBarVisibility - 1 - - GeometryConfiguration - - Frame - {{0, 0}, {452, 0}} - RubberWindowFrame - 743 379 452 308 0 0 1280 1002 - - Module - PBXNavigatorGroup - Proportion - 0pt - - - BecomeActive - 1 - ContentConfiguration - - PBXProjectModuleGUID - 1CD052920623707200166675 - PBXProjectModuleLabel - SCM - - GeometryConfiguration - - ConsoleFrame - {{0, 259}, {452, 0}} - Frame - {{0, 7}, {452, 259}} - RubberWindowFrame - 743 379 452 308 0 0 1280 1002 - TableConfiguration - - Status - 30 - FileName - 199 - Path - 197.09500122070312 - - TableFrame - {{0, 0}, {452, 250}} - - Module - PBXCVSModule - Proportion - 262pt - - - Proportion - 266pt - - - Name - SCM - ServiceClasses - - PBXCVSModule - - StatusbarIsVisible - 1 - TableOfContents - - 1C78EAB4065D492600B07095 - 1C78EAB5065D492600B07095 - 1C78EAB2065D492600B07095 - 1CD052920623707200166675 - - ToolbarConfiguration - xcode.toolbar.config.scm - WindowString - 743 379 452 308 0 0 1280 1002 - - - Identifier - windowTool.breakpoints - Layout - - - Dock - - - BecomeActive - 1 - ContentConfiguration - - PBXProjectModuleGUID - 1CD052930623707200166675 - PBXProjectModuleLabel - Breakpoints - - GeometryConfiguration - - BreakpointsTreeTableConfiguration - - enabledColumn - 16 - breakpointColumn - 201.5830078125 - - Frame - {{0, 0}, {240, 195}} - RubberWindowFrame - 342 421 240 216 0 0 1440 878 - - Module - PBXDebugBreakpointsModule - Proportion - 195pt - - - Proportion - 195pt - - - Name - Breakpoints - ServiceClasses - - PBXDebugBreakpointsModule - - StatusbarIsVisible - 0 - TableOfContents - - 1C0AD2AD069F1E9B00FABCE6 - 1C0AD2AE069F1E9B00FABCE6 - 1CD052930623707200166675 - - WindowString - 342 421 240 216 0 0 1440 878 - WindowToolGUID - 1C0AD2AD069F1E9B00FABCE6 - WindowToolIsVisible - 0 - - - Identifier - windowTool.bookmarks - Layout - - - Dock - - - Module - PBXBookmarksModule - Proportion - 100% - - - Proportion - 100% - - - Name - Bookmarks - ServiceClasses - - PBXBookmarksModule - - StatusbarIsVisible - 0 - WindowString - 538 42 401 187 0 0 1280 1002 - - - Identifier - windowTool.classBrowser - Layout - - - Dock - - - BecomeActive - 1 - ContentConfiguration - - OptionsSetName - Hierarchy, all classes - PBXProjectModuleGUID - 1CA6456E063B45B4001379D8 - PBXProjectModuleLabel - Class Browser - NSObject - - GeometryConfiguration - - ClassesFrame - {{0, 0}, {374, 96}} - ClassesTreeTableConfiguration - - PBXClassNameColumnIdentifier - 208 - PBXClassBookColumnIdentifier - 22 - - Frame - {{0, 0}, {630, 331}} - MembersFrame - {{0, 105}, {374, 395}} - MembersTreeTableConfiguration - - PBXMemberTypeIconColumnIdentifier - 22 - PBXMemberNameColumnIdentifier - 216 - PBXMemberTypeColumnIdentifier - 97 - PBXMemberBookColumnIdentifier - 22 - - PBXModuleWindowStatusBarHidden2 - 1 - RubberWindowFrame - 385 179 630 352 0 0 1440 878 - - Module - PBXClassBrowserModule - Proportion - 332pt - - - Proportion - 332pt - - - Name - Class Browser - ServiceClasses - - PBXClassBrowserModule - - StatusbarIsVisible - 0 - TableOfContents - - 1C0AD2AF069F1E9B00FABCE6 - 1C0AD2B0069F1E9B00FABCE6 - 1CA6456E063B45B4001379D8 - - ToolbarConfiguration - xcode.toolbar.config.classbrowser - WindowString - 385 179 630 352 0 0 1440 878 - WindowToolGUID - 1C0AD2AF069F1E9B00FABCE6 - WindowToolIsVisible - 0 - - - - diff --git a/synfig-osx/trunk/launcher/Synfig Studio.pbproj/darco.pbxuser b/synfig-osx/trunk/launcher/Synfig Studio.pbproj/darco.pbxuser deleted file mode 100644 index bb463a6..0000000 --- a/synfig-osx/trunk/launcher/Synfig Studio.pbproj/darco.pbxuser +++ /dev/null @@ -1,1624 +0,0 @@ -// !$*UTF8*$! -{ - 20286C28FDCF999611CA2CEA = { - activeBuildStyle = 4A9504C5FFE6A39111CA0CBA; - activeExecutable = A65E397F07515B8200A66E82; - activeTarget = 20286C34FDCF999611CA2CEA; - addToTargets = ( - 20286C34FDCF999611CA2CEA, - ); - codeSenseManager = A66420E108E74B3D005A12D3; - executables = ( - A65E397F07515B8200A66E82, - ); - perUserDictionary = { - PBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = { - PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; - PBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_MessageID; - PBXFileTableDataSourceColumnWidthsKey = ( - 20, - 300, - 200, - ); - PBXFileTableDataSourceColumnsKey = ( - PBXErrorsWarningsDataSource_TypeID, - PBXErrorsWarningsDataSource_MessageID, - PBXErrorsWarningsDataSource_LocationID, - ); - }; - PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { - PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; - PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; - PBXFileTableDataSourceColumnWidthsKey = ( - 20, - 398, - 20, - 48, - 43, - 43, - 20, - ); - PBXFileTableDataSourceColumnsKey = ( - PBXFileDataSource_FiletypeID, - PBXFileDataSource_Filename_ColumnID, - PBXFileDataSource_Built_ColumnID, - PBXFileDataSource_ObjectSize_ColumnID, - PBXFileDataSource_Errors_ColumnID, - PBXFileDataSource_Warnings_ColumnID, - PBXFileDataSource_Target_ColumnID, - ); - }; - PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { - PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; - PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; - PBXFileTableDataSourceColumnWidthsKey = ( - 20, - 200, - 218, - 20, - 48.1626, - 43, - 43, - ); - PBXFileTableDataSourceColumnsKey = ( - PBXFileDataSource_FiletypeID, - PBXFileDataSource_Filename_ColumnID, - PBXTargetDataSource_PrimaryAttribute, - PBXFileDataSource_Built_ColumnID, - PBXFileDataSource_ObjectSize_ColumnID, - PBXFileDataSource_Errors_ColumnID, - PBXFileDataSource_Warnings_ColumnID, - ); - }; - PBXPerProjectTemplateStateSaveDate = 149375796; - "PBXTemplateGeometry-F5CA7ECB015C094F0DCA290F" = { - ContentSize = "{668, 621}"; - LeftSlideOut = { - Collapsed = NO; - Frame = "{{0, 0}, {668, 621}}"; - Split0 = { - Collapsed = NO; - Frame = "{{0, 0}, {668, 621}}"; - Split0 = { - Frame = "{{0, 0}, {668, 621}}"; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {484, 208}}"; - }; - Tab1 = { - Debugger = { - Collapsed = NO; - Frame = "{{0, 0}, {664, 208}}"; - Split0 = { - Frame = "{{0, 24}, {664, 184}}"; - Split0 = { - Frame = "{{0, 0}, {325, 184}}"; - }; - Split1 = { - DebugVariablesTableConfiguration = ( - Name, - 123, - Value, - 85, - Summary, - 96.123, - ); - Frame = "{{334, 0}, {330, 184}}"; - }; - SplitCount = 2; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - Tab1 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - TabCount = 2; - TabsVisible = YES; - }; - Frame = "{{0, 0}, {664, 208}}"; - LauncherConfigVersion = 7; - }; - Tab2 = { - Frame = "{{0, 0}, {664, 50}}"; - LauncherConfigVersion = 3; - Runner = { - Frame = "{{0, 0}, {664, 50}}"; - }; - }; - Tab3 = { - BuildMessageFrame = "{{0, 0}, {614, 203}}"; - BuildTranscriptFrame = "{{0, 212}, {614, 85}}"; - BuildTranscriptFrameExpanded = YES; - Frame = "{{0, 0}, {612, 295}}"; - }; - Tab4 = { - Frame = "{{0, 0}, {612, 295}}"; - }; - TabCount = 5; - TabsVisible = NO; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {313, 531}}"; - GroupTreeTableConfiguration = ( - TargetStatusColumn, - 18, - MainColumn, - 280, - ); - }; - Tab1 = { - ClassesFrame = "{{0, 0}, {280, 398}}"; - ClassesTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXClassColumnIdentifier, - 237, - ); - Frame = "{{0, 0}, {278, 659}}"; - MembersFrame = "{{0, 407}, {280, 252}}"; - MembersTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXMethodColumnIdentifier, - 236, - ); - }; - Tab2 = { - Frame = "{{0, 0}, {200, 100}}"; - }; - Tab3 = { - Frame = "{{0, 0}, {200, 557}}"; - TargetTableConfiguration = ( - ActiveObject, - 16, - ObjectNames, - 202.296, - ); - }; - Tab4 = { - BreakpointsTreeTableConfiguration = ( - breakpointColumn, - 197, - enabledColumn, - 31, - ); - Frame = "{{0, 0}, {250, 100}}"; - }; - TabCount = 5; - TabsVisible = NO; - }; - NavBarShownByDefault = YES; - StatusViewVisible = NO; - Template = F5CA7ECB015C094F0DCA290F; - ToolbarVisible = NO; - WindowLocation = "{425, 95}"; - }; - PBXWorkspaceContents = ( - { - LeftSlideOut = { - Split0 = { - Split0 = { - NavContent0 = { - bookmark = A65E48C007518C4E00A66E82; - history = ( - A65E3D3907515FE000A66E82, - A65E488907518C4E00A66E82, - A65E488A07518C4E00A66E82, - A65E488B07518C4E00A66E82, - A65E488C07518C4E00A66E82, - A65E488D07518C4E00A66E82, - A65E488E07518C4E00A66E82, - A65E488F07518C4E00A66E82, - A65E489007518C4E00A66E82, - A65E489107518C4E00A66E82, - A65E489207518C4E00A66E82, - A65E489307518C4E00A66E82, - A65E489407518C4E00A66E82, - A65E489507518C4E00A66E82, - A65E489607518C4E00A66E82, - A65E489707518C4E00A66E82, - A65E489807518C4E00A66E82, - A65E489907518C4E00A66E82, - ); - prevStack = ( - A65E3D3B07515FE000A66E82, - A65E3D3C07515FE000A66E82, - A65E3D3D07515FE000A66E82, - A65E3D3E07515FE000A66E82, - A65E3D3F07515FE000A66E82, - A65E3D4007515FE000A66E82, - A65E3D4107515FE000A66E82, - A65E489A07518C4E00A66E82, - A65E489B07518C4E00A66E82, - A65E489C07518C4E00A66E82, - A65E489D07518C4E00A66E82, - A65E489E07518C4E00A66E82, - A65E489F07518C4E00A66E82, - A65E48A007518C4E00A66E82, - A65E48A107518C4E00A66E82, - A65E48A207518C4E00A66E82, - A65E48A307518C4E00A66E82, - A65E48A407518C4E00A66E82, - A65E48A507518C4E00A66E82, - A65E48A607518C4E00A66E82, - A65E48A707518C4E00A66E82, - A65E48A807518C4E00A66E82, - A65E48A907518C4E00A66E82, - A65E48AA07518C4E00A66E82, - A65E48AB07518C4E00A66E82, - A65E48AC07518C4E00A66E82, - A65E48AD07518C4E00A66E82, - A65E48AE07518C4E00A66E82, - A65E48AF07518C4E00A66E82, - A65E48B007518C4E00A66E82, - A65E48B107518C4E00A66E82, - A65E48B207518C4E00A66E82, - A65E48B307518C4E00A66E82, - A65E48B407518C4E00A66E82, - A65E48B507518C4E00A66E82, - A65E48B607518C4E00A66E82, - A65E48B707518C4E00A66E82, - A65E48B807518C4E00A66E82, - A65E48B907518C4E00A66E82, - A65E48BA07518C4E00A66E82, - A65E48BB07518C4E00A66E82, - A65E48BC07518C4E00A66E82, - A65E48BD07518C4E00A66E82, - A65E48BE07518C4E00A66E82, - A65E48BF07518C4E00A66E82, - ); - }; - NavCount = 1; - NavGeometry0 = { - Frame = "{{0, 0}, {819, 439}}"; - NavBarVisible = YES; - }; - NavSplitVertical = NO; - }; - SplitCount = 1; - Tab1 = { - Debugger = { - Split0 = { - SplitCount = 2; - }; - SplitCount = 1; - TabCount = 2; - }; - LauncherConfigVersion = 7; - }; - Tab2 = { - LauncherConfigVersion = 3; - Runner = { - }; - }; - TabCount = 5; - }; - SplitCount = 1; - Tab1 = { - OptionsSetName = "Hierarchy, all classes"; - }; - TabCount = 5; - }; - }, - { - LeftSlideOut = { - Split0 = { - Split0 = { - NavContent0 = { - bookmark = A65E48C207518C4E00A66E82; - history = ( - A65E48C107518C4E00A66E82, - ); - }; - NavCount = 1; - NavGeometry0 = { - Frame = "{{0, 0}, {668, 621}}"; - NavBarVisible = YES; - }; - NavSplitVertical = NO; - }; - SplitCount = 1; - Tab1 = { - Debugger = { - Split0 = { - SplitCount = 2; - }; - SplitCount = 1; - TabCount = 2; - }; - LauncherConfigVersion = 7; - }; - Tab2 = { - LauncherConfigVersion = 3; - Runner = { - }; - }; - TabCount = 5; - }; - SplitCount = 1; - Tab1 = { - OptionsSetName = "Hierarchy, all classes"; - }; - TabCount = 5; - }; - }, - { - LeftSlideOut = { - Split0 = { - Split0 = { - NavContent0 = { - bookmark = A65E48C407518C4E00A66E82; - history = ( - A65E48C307518C4E00A66E82, - ); - }; - NavCount = 1; - NavGeometry0 = { - Frame = "{{0, 0}, {668, 621}}"; - NavBarVisible = YES; - }; - NavSplitVertical = NO; - }; - SplitCount = 1; - Tab1 = { - Debugger = { - Split0 = { - SplitCount = 2; - }; - SplitCount = 1; - TabCount = 2; - }; - LauncherConfigVersion = 7; - }; - Tab2 = { - LauncherConfigVersion = 3; - Runner = { - }; - }; - TabCount = 5; - }; - SplitCount = 1; - Tab1 = { - OptionsSetName = "Hierarchy, all classes"; - }; - TabCount = 5; - }; - }, - { - LeftSlideOut = { - Split0 = { - Split0 = { - NavContent0 = { - bookmark = A65E48C607518C4E00A66E82; - history = ( - A65E48C507518C4E00A66E82, - ); - }; - NavCount = 1; - NavGeometry0 = { - Frame = "{{0, 0}, {668, 621}}"; - NavBarVisible = YES; - }; - NavSplitVertical = NO; - }; - SplitCount = 1; - Tab1 = { - Debugger = { - Split0 = { - SplitCount = 2; - }; - SplitCount = 1; - TabCount = 2; - }; - LauncherConfigVersion = 7; - }; - Tab2 = { - LauncherConfigVersion = 3; - Runner = { - }; - }; - TabCount = 5; - }; - SplitCount = 1; - Tab1 = { - OptionsSetName = "Hierarchy, all classes"; - }; - TabCount = 5; - }; - }, - ); - PBXWorkspaceGeometries = ( - { - ContentSize = "{1103, 612}"; - LeftSlideOut = { - ActiveTab = 0; - ActiveTabName = PBXGroupTreeModule; - Collapsed = NO; - Frame = "{{0, 23}, {1103, 589}}"; - Split0 = { - ActiveTab = 1; - ActiveTabName = PBXRunSessionModule; - Collapsed = NO; - Frame = "{{284, 0}, {819, 589}}"; - Split0 = { - Frame = "{{0, 150}, {819, 439}}"; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {572, 214}}"; - }; - Tab1 = { - Debugger = { - Collapsed = NO; - Frame = "{{0, 0}, {572, 150}}"; - Split0 = { - Frame = "{{0, 24}, {572, 126}}"; - Split0 = { - Frame = "{{0, 0}, {279, 126}}"; - }; - Split1 = { - DebugVariablesTableConfiguration = ( - Name, - 123, - Value, - 85, - Summary, - 62.123, - ); - Frame = "{{288, 0}, {284, 126}}"; - }; - SplitCount = 2; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - Tab1 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - TabCount = 2; - TabsVisible = YES; - }; - Frame = "{{0, 0}, {572, 125}}"; - LauncherConfigVersion = 7; - }; - Tab2 = { - Frame = "{{0, 0}, {819, 126}}"; - LauncherConfigVersion = 3; - Runner = { - Frame = "{{0, 0}, {819, 126}}"; - }; - }; - Tab3 = { - BuildMessageFrame = "{{0, 0}, {821, 165}}"; - BuildTranscriptFrame = "{{0, 174}, {821, 69}}"; - BuildTranscriptFrameExpanded = YES; - Frame = "{{0, 0}, {819, 265}}"; - }; - Tab4 = { - Frame = "{{0, 0}, {819, 295}}"; - }; - TabCount = 5; - TabsVisible = YES; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {260, 589}}"; - GroupTreeTableConfiguration = ( - TargetStatusColumn, - 18, - MainColumn, - 227, - ); - }; - Tab1 = { - ClassesFrame = "{{0, 0}, {247, 330}}"; - ClassesTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXClassColumnIdentifier, - 204, - ); - Frame = "{{0, 0}, {245, 549}}"; - MembersFrame = "{{0, 339}, {247, 210}}"; - MembersTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXMethodColumnIdentifier, - 203, - ); - }; - Tab2 = { - Frame = "{{0, 0}, {226, 549}}"; - }; - Tab3 = { - Frame = "{{0, 0}, {191, 589}}"; - TargetTableConfiguration = ( - ActiveObject, - 16, - ObjectNames, - 202.296, - ); - }; - Tab4 = { - BreakpointsTreeTableConfiguration = ( - breakpointColumn, - 138, - enabledColumn, - 31, - ); - Frame = "{{0, 0}, {191, 549}}"; - }; - TabCount = 5; - TabsVisible = YES; - }; - NavBarShownByDefault = YES; - StatusViewVisible = YES; - Template = F5F68CF101725D4C0D7A8F4C; - ToolbarVisible = YES; - WindowLocation = "{123, 29}"; - }, - { - ContentSize = "{668, 621}"; - LeftSlideOut = { - Collapsed = NO; - Frame = "{{0, 0}, {668, 621}}"; - Split0 = { - Collapsed = NO; - Frame = "{{0, 0}, {668, 621}}"; - Split0 = { - Frame = "{{0, 0}, {668, 621}}"; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {484, 208}}"; - }; - Tab1 = { - Debugger = { - Collapsed = NO; - Frame = "{{0, 0}, {664, 208}}"; - Split0 = { - Frame = "{{0, 24}, {664, 184}}"; - Split0 = { - Frame = "{{0, 0}, {325, 184}}"; - }; - Split1 = { - DebugVariablesTableConfiguration = ( - Name, - 123, - Value, - 85, - Summary, - 96.123, - ); - Frame = "{{334, 0}, {330, 184}}"; - }; - SplitCount = 2; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - Tab1 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - TabCount = 2; - TabsVisible = YES; - }; - Frame = "{{0, 0}, {664, 208}}"; - LauncherConfigVersion = 7; - }; - Tab2 = { - Frame = "{{0, 0}, {664, 50}}"; - LauncherConfigVersion = 3; - Runner = { - Frame = "{{0, 0}, {664, 50}}"; - }; - }; - Tab3 = { - BuildMessageFrame = "{{0, 0}, {614, 203}}"; - BuildTranscriptFrame = "{{0, 212}, {614, 85}}"; - BuildTranscriptFrameExpanded = YES; - Frame = "{{0, 0}, {612, 295}}"; - }; - Tab4 = { - Frame = "{{0, 0}, {612, 295}}"; - }; - TabCount = 5; - TabsVisible = NO; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {313, 531}}"; - GroupTreeTableConfiguration = ( - TargetStatusColumn, - 18, - MainColumn, - 280, - ); - }; - Tab1 = { - ClassesFrame = "{{0, 0}, {280, 398}}"; - ClassesTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXClassColumnIdentifier, - 237, - ); - Frame = "{{0, 0}, {278, 659}}"; - MembersFrame = "{{0, 407}, {280, 252}}"; - MembersTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXMethodColumnIdentifier, - 236, - ); - }; - Tab2 = { - Frame = "{{0, 0}, {200, 100}}"; - }; - Tab3 = { - Frame = "{{0, 0}, {200, 557}}"; - TargetTableConfiguration = ( - ActiveObject, - 16, - ObjectNames, - 202.296, - ); - }; - Tab4 = { - BreakpointsTreeTableConfiguration = ( - breakpointColumn, - 197, - enabledColumn, - 31, - ); - Frame = "{{0, 0}, {250, 100}}"; - }; - TabCount = 5; - TabsVisible = NO; - }; - NavBarShownByDefault = YES; - StatusViewVisible = NO; - Template = F5CA7ECB015C094F0DCA290F; - ToolbarVisible = NO; - WindowLocation = "{357, 158}"; - }, - { - ContentSize = "{668, 621}"; - LeftSlideOut = { - Collapsed = NO; - Frame = "{{0, 0}, {668, 621}}"; - Split0 = { - Collapsed = NO; - Frame = "{{0, 0}, {668, 621}}"; - Split0 = { - Frame = "{{0, 0}, {668, 621}}"; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {484, 208}}"; - }; - Tab1 = { - Debugger = { - Collapsed = NO; - Frame = "{{0, 0}, {664, 208}}"; - Split0 = { - Frame = "{{0, 24}, {664, 184}}"; - Split0 = { - Frame = "{{0, 0}, {325, 184}}"; - }; - Split1 = { - DebugVariablesTableConfiguration = ( - Name, - 123, - Value, - 85, - Summary, - 96.123, - ); - Frame = "{{334, 0}, {330, 184}}"; - }; - SplitCount = 2; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - Tab1 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - TabCount = 2; - TabsVisible = YES; - }; - Frame = "{{0, 0}, {664, 208}}"; - LauncherConfigVersion = 7; - }; - Tab2 = { - Frame = "{{0, 0}, {664, 50}}"; - LauncherConfigVersion = 3; - Runner = { - Frame = "{{0, 0}, {664, 50}}"; - }; - }; - Tab3 = { - BuildMessageFrame = "{{0, 0}, {614, 203}}"; - BuildTranscriptFrame = "{{0, 212}, {614, 85}}"; - BuildTranscriptFrameExpanded = YES; - Frame = "{{0, 0}, {612, 295}}"; - }; - Tab4 = { - Frame = "{{0, 0}, {612, 295}}"; - }; - TabCount = 5; - TabsVisible = NO; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {313, 531}}"; - GroupTreeTableConfiguration = ( - TargetStatusColumn, - 18, - MainColumn, - 280, - ); - }; - Tab1 = { - ClassesFrame = "{{0, 0}, {280, 398}}"; - ClassesTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXClassColumnIdentifier, - 237, - ); - Frame = "{{0, 0}, {278, 659}}"; - MembersFrame = "{{0, 407}, {280, 252}}"; - MembersTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXMethodColumnIdentifier, - 236, - ); - }; - Tab2 = { - Frame = "{{0, 0}, {200, 100}}"; - }; - Tab3 = { - Frame = "{{0, 0}, {200, 557}}"; - TargetTableConfiguration = ( - ActiveObject, - 16, - ObjectNames, - 202.296, - ); - }; - Tab4 = { - BreakpointsTreeTableConfiguration = ( - breakpointColumn, - 197, - enabledColumn, - 31, - ); - Frame = "{{0, 0}, {250, 100}}"; - }; - TabCount = 5; - TabsVisible = NO; - }; - NavBarShownByDefault = YES; - StatusViewVisible = NO; - Template = F5CA7ECB015C094F0DCA290F; - ToolbarVisible = NO; - WindowLocation = "{380, 137}"; - }, - { - ContentSize = "{668, 621}"; - LeftSlideOut = { - Collapsed = NO; - Frame = "{{0, 0}, {668, 621}}"; - Split0 = { - Collapsed = NO; - Frame = "{{0, 0}, {668, 621}}"; - Split0 = { - Frame = "{{0, 0}, {668, 621}}"; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {484, 208}}"; - }; - Tab1 = { - Debugger = { - Collapsed = NO; - Frame = "{{0, 0}, {664, 208}}"; - Split0 = { - Frame = "{{0, 24}, {664, 184}}"; - Split0 = { - Frame = "{{0, 0}, {325, 184}}"; - }; - Split1 = { - DebugVariablesTableConfiguration = ( - Name, - 123, - Value, - 85, - Summary, - 96.123, - ); - Frame = "{{334, 0}, {330, 184}}"; - }; - SplitCount = 2; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - Tab1 = { - Frame = "{{0, 0}, {100, 50}}"; - }; - TabCount = 2; - TabsVisible = YES; - }; - Frame = "{{0, 0}, {664, 208}}"; - LauncherConfigVersion = 7; - }; - Tab2 = { - Frame = "{{0, 0}, {664, 50}}"; - LauncherConfigVersion = 3; - Runner = { - Frame = "{{0, 0}, {664, 50}}"; - }; - }; - Tab3 = { - BuildMessageFrame = "{{0, 0}, {614, 203}}"; - BuildTranscriptFrame = "{{0, 212}, {614, 85}}"; - BuildTranscriptFrameExpanded = YES; - Frame = "{{0, 0}, {612, 295}}"; - }; - Tab4 = { - Frame = "{{0, 0}, {612, 295}}"; - }; - TabCount = 5; - TabsVisible = NO; - }; - SplitCount = 1; - Tab0 = { - Frame = "{{0, 0}, {313, 531}}"; - GroupTreeTableConfiguration = ( - TargetStatusColumn, - 18, - MainColumn, - 280, - ); - }; - Tab1 = { - ClassesFrame = "{{0, 0}, {280, 398}}"; - ClassesTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXClassColumnIdentifier, - 237, - ); - Frame = "{{0, 0}, {278, 659}}"; - MembersFrame = "{{0, 407}, {280, 252}}"; - MembersTreeTableConfiguration = ( - PBXBookColumnIdentifier, - 20, - PBXMethodColumnIdentifier, - 236, - ); - }; - Tab2 = { - Frame = "{{0, 0}, {200, 100}}"; - }; - Tab3 = { - Frame = "{{0, 0}, {200, 557}}"; - TargetTableConfiguration = ( - ActiveObject, - 16, - ObjectNames, - 202.296, - ); - }; - Tab4 = { - BreakpointsTreeTableConfiguration = ( - breakpointColumn, - 197, - enabledColumn, - 31, - ); - Frame = "{{0, 0}, {250, 100}}"; - }; - TabCount = 5; - TabsVisible = NO; - }; - NavBarShownByDefault = YES; - StatusViewVisible = NO; - Template = F5CA7ECB015C094F0DCA290F; - ToolbarVisible = NO; - WindowLocation = "{403, 116}"; - }, - ); - PBXWorkspaceStateSaveDate = 149375796; - }; - perUserProjectItems = { - A66420F808E74CC8005A12D3 = A66420F808E74CC8005A12D3; - A66420F908E74CC8005A12D3 = A66420F908E74CC8005A12D3; - A66420FA08E74CC8005A12D3 = A66420FA08E74CC8005A12D3; - A66420FB08E74CC8005A12D3 = A66420FB08E74CC8005A12D3; - A66420FC08E74CC8005A12D3 = A66420FC08E74CC8005A12D3; - A66420FD08E74CC8005A12D3 = A66420FD08E74CC8005A12D3; - A66420FE08E74CC8005A12D3 = A66420FE08E74CC8005A12D3; - A66420FF08E74CC8005A12D3 = A66420FF08E74CC8005A12D3; - A664210008E74CC8005A12D3 = A664210008E74CC8005A12D3; - A664210408E74CC8005A12D3 = A664210408E74CC8005A12D3; - A664210808E77262005A12D3 = A664210808E77262005A12D3; - A664210908E77262005A12D3 = A664210908E77262005A12D3; - }; - sourceControlManager = A66420E008E74B3D005A12D3; - userBuildSettings = { - }; - }; - 20286C34FDCF999611CA2CEA = { - activeExec = 0; - executables = ( - A65E397F07515B8200A66E82, - ); - }; - 50EE2AB703849F0B0ECA21EC = { - uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {596, 12726}}"; - sepNavSelRange = "{19522, 64}"; - sepNavVisRect = "{{0, 12081}, {596, 352}}"; - sepNavWindowFrame = "{{19, 72}, {784, 755}}"; - }; - }; - A65E397F07515B8200A66E82 = { - activeArgIndex = 2147483647; - activeArgIndices = ( - ); - argumentStrings = ( - ); - configStateDict = { - "PBXLSLaunchAction-0" = { - PBXLSLaunchAction = 0; - PBXLSLaunchStartAction = 1; - PBXLSLaunchStdioStyle = 1; - PBXLSLaunchStyle = 0; - class = PBXLSRunLaunchConfig; - identifier = com.apple.ProjectBuilder.launch.runConfig; - remoteHostInfo = ""; - startActionInfo = ""; - }; - }; - cppStopOnCatchEnabled = 0; - cppStopOnThrowEnabled = 0; - customDataFormattersEnabled = 1; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - dylibVariantSuffix = ""; - enableDebugStr = 1; - environmentEntries = ( - ); - executableSystemSymbolLevel = 0; - executableUserSymbolLevel = 0; - isa = PBXExecutable; - libgmallocEnabled = 0; - name = SynfigStudio; - savedGlobals = { - }; - shlibInfoDictList = ( - ); - shlibInfoDictList_v2 = ( - { - level = 0; - path = /usr/lib/system/libmathCommon.A.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /usr/lib/libSystem.B.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /usr/X11R6/lib/libX11.6.2.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /usr/lib/libicucore.A.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /usr/lib/libauto.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /usr/lib/libobjc.A.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration; - whenToLoad = 0; - }, - { - level = 0; - path = /usr/lib/libz.1.2.3.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Security.framework/Versions/A/Security; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServicesCore.framework/Versions/A/WebServicesCore; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound; - whenToLoad = 0; - }, - { - level = 0; - path = /usr/lib/libbsm.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS; - whenToLoad = 0; - }, - { - level = 0; - path = /usr/lib/libcrypto.0.9.7.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD; - whenToLoad = 0; - }, - { - level = 0; - path = /usr/lib/libcups.2.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/FindByContent.framework/Versions/A/FindByContent; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRaw.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /usr/lib/libmx.A.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices; - whenToLoad = 0; - }, - { - level = 0; - path = /usr/lib/libiconv.2.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /usr/lib/libxml2.2.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox; - whenToLoad = 0; - }, - { - level = 0; - path = /usr/lib/libsqlite3.0.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore; - whenToLoad = 0; - }, - { - level = 0; - path = /usr/lib/libxslt.1.dylib; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/OSAKit.framework/Versions/A/OSAKit; - whenToLoad = 0; - }, - { - level = 0; - path = /System/Library/Frameworks/AppleScriptKit.framework/Versions/A/AppleScriptKit; - whenToLoad = 0; - }, - { - level = 0; - path = "/Users/darco/Projects/X11App/build/Synfig Studio.app/Contents/MacOS/Synfig Studio"; - whenToLoad = 0; - }, - ); - sourceDirectories = ( - ); - }; - A65E4880075176F200A66E82 = { - uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {512, 271}}"; - sepNavSelRange = "{0, 0}"; - sepNavVisRect = "{{0, 0}, {512, 271}}"; - }; - }; - A65E4881075176F200A66E82 = { - uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {512, 271}}"; - sepNavSelRange = "{0, 0}"; - sepNavVisRect = "{{0, 0}, {512, 271}}"; - }; - }; - A65E48D507518C4E00A66E82 = { - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.objc; - name = X11Controller.m; - path = /Users/darco/Projects/X11App/X11Controller.m; - refType = 0; - sourceTree = ""; - uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {662, 9674}}"; - sepNavSelRange = "{0, 0}"; - sepNavVisRect = "{{0, 409}, {596, 352}}"; - }; - }; - A66420E008E74B3D005A12D3 = { - fallbackIsa = XCSourceControlManager; - isSCMEnabled = 0; - isa = PBXSourceControlManager; - scmConfiguration = { - }; - scmType = ""; - }; - A66420E108E74B3D005A12D3 = { - indexTemplatePath = ""; - isa = PBXCodeSenseManager; - }; - A66420F508E74C31005A12D3 = { - isa = PBXFileReference; - name = "bundle-main.c"; - path = "/Users/darco/Projects/X11App/bundle-main.c"; - refType = 0; - sourceTree = ""; - uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {596, 12726}}"; - sepNavSelRange = "{19522, 64}"; - sepNavVisRect = "{{0, 12081}, {596, 352}}"; - }; - }; - A66420F808E74CC8005A12D3 = { - fRef = A65E4881075176F200A66E82; - isa = PBXTextBookmark; - name = "SynfigApplication.m: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 241; - vrLoc = 0; - }; - A66420F908E74CC8005A12D3 = { - fRef = A65E4880075176F200A66E82; - isa = PBXTextBookmark; - name = "SynfigApplication.h: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 288; - vrLoc = 0; - }; - A66420FA08E74CC8005A12D3 = { - fRef = A65E48D507518C4E00A66E82; - isa = PBXTextBookmark; - name = "X11Controller.m: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 463; - vrLoc = 1513; - }; - A66420FB08E74CC8005A12D3 = { - fRef = A66420F508E74C31005A12D3; - isa = PBXTextBookmark; - rLen = 1; - rLoc = 875; - rType = 1; - }; - A66420FC08E74CC8005A12D3 = { - fRef = A65E4881075176F200A66E82; - isa = PBXTextBookmark; - name = "SynfigApplication.m: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 241; - vrLoc = 0; - }; - A66420FD08E74CC8005A12D3 = { - fRef = 50EE2AB703849F0B0ECA21EC; - isa = PBXTextBookmark; - name = "bundle-main.c: 535"; - rLen = 0; - rLoc = 12130; - rType = 0; - vrLen = 531; - vrLoc = 11734; - }; - A66420FE08E74CC8005A12D3 = { - fRef = A65E4881075176F200A66E82; - isa = PBXTextBookmark; - name = "SynfigApplication.m: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 241; - vrLoc = 0; - }; - A66420FF08E74CC8005A12D3 = { - fRef = A65E4880075176F200A66E82; - isa = PBXTextBookmark; - name = "SynfigApplication.h: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 288; - vrLoc = 0; - }; - A664210008E74CC8005A12D3 = { - fRef = A65E48D507518C4E00A66E82; - isa = PBXTextBookmark; - name = "X11Controller.m: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 463; - vrLoc = 1513; - }; - A664210408E74CC8005A12D3 = { - isa = PBXTargetBookmark; - trg = 20286C34FDCF999611CA2CEA; - }; - A664210808E77262005A12D3 = { - fRef = 50EE2AB703849F0B0ECA21EC; - isa = PBXTextBookmark; - name = "void (*initializeASKFunc)(void) = NSAddressOfSymbol(symbol);"; - rLen = 64; - rLoc = 19522; - rType = 0; - vrLen = 488; - vrLoc = 19274; - }; - A664210908E77262005A12D3 = { - isa = PBXTargetBookmark; - trg = 20286C34FDCF999611CA2CEA; - uiCtxt = { - TOCViewDetailVisibleRect = "{{0, 0}, {534, 609}}"; - TOCViewExpandedItems = ( - "com.apple.target-editor-pane.settings", - "com.apple.target-editor-pane.settings.simple", - "com.apple.target-editor-pane.info-plist", - "com.apple.target-editor-pane.info-plist.simple", - "com.apple.target-editor-pane.buildphases", - ); - TOCViewMasterVisibleRect = "{{0, 0}, {211, 609}}"; - TOCViewSelectedItems = ( - "com.apple.target-editor-pane.info-plist", - ); - }; - }; -} diff --git a/synfig-osx/trunk/launcher/Synfig Studio.pbproj/project.pbxproj b/synfig-osx/trunk/launcher/Synfig Studio.pbproj/project.pbxproj deleted file mode 100644 index 208775e..0000000 --- a/synfig-osx/trunk/launcher/Synfig Studio.pbproj/project.pbxproj +++ /dev/null @@ -1,552 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 39; - objects = { - 02345980000FD03B11CA0E72 = { - children = ( - 1870340FFE93FCAF11CA0CD7, - ); - isa = PBXVariantGroup; - name = main.nib; - refType = 4; - sourceTree = ""; - }; - 02345981000FD03B11CA0E72 = { - fileRef = 02345980000FD03B11CA0E72; - isa = PBXBuildFile; - settings = { - }; - }; - 0249A667FF388E1711CA2CEA = { - explicitFileType = wrapper.application; - isa = PBXFileReference; - path = "Synfig Studio.app"; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; -//020 -//021 -//022 -//023 -//024 -//040 -//041 -//042 -//043 -//044 - 04313892FE3035C9C02AAC07 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXRezBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; -//040 -//041 -//042 -//043 -//044 -//080 -//081 -//082 -//083 -//084 - 0867D6AAFE840B52C02AAC07 = { - children = ( - 0867D6ABFE840B52C02AAC07, - ); - isa = PBXVariantGroup; - name = InfoPlist.strings; - refType = 4; - sourceTree = ""; - }; - 0867D6ABFE840B52C02AAC07 = { - fileEncoding = 10; - isa = PBXFileReference; - lastKnownFileType = text.plist.strings; - name = English; - path = English.lproj/InfoPlist.strings; - refType = 4; - sourceTree = ""; - }; - 0867D6ACFE840B52C02AAC07 = { - fileRef = 0867D6AAFE840B52C02AAC07; - isa = PBXBuildFile; - settings = { - }; - }; -//080 -//081 -//082 -//083 -//084 -//180 -//181 -//182 -//183 -//184 - 1870340FFE93FCAF11CA0CD7 = { - isa = PBXFileReference; - lastKnownFileType = wrapper.nib; - name = English; - path = English.lproj/main.nib; - refType = 4; - sourceTree = ""; - }; -//180 -//181 -//182 -//183 -//184 -//190 -//191 -//192 -//193 -//194 - 195DF8CFFE9D517E11CA2CBB = { - children = ( - 0249A667FF388E1711CA2CEA, - ); - isa = PBXGroup; - name = Products; - refType = 4; - sourceTree = ""; - }; -//190 -//191 -//192 -//193 -//194 -//200 -//201 -//202 -//203 -//204 - 20286C28FDCF999611CA2CEA = { - buildSettings = { - }; - buildStyles = ( - 4A9504C5FFE6A39111CA0CBA, - 4A9504C6FFE6A39111CA0CBA, - ); - hasScannedForEncodings = 1; - isa = PBXProject; - mainGroup = 20286C29FDCF999611CA2CEA; - projectDirPath = ""; - targets = ( - 20286C34FDCF999611CA2CEA, - ); - }; - 20286C29FDCF999611CA2CEA = { - children = ( - 20286C2AFDCF999611CA2CEA, - 20286C2CFDCF999611CA2CEA, - 20286C32FDCF999611CA2CEA, - 195DF8CFFE9D517E11CA2CBB, - ); - isa = PBXGroup; - name = X11; - path = ""; - refType = 4; - sourceTree = ""; - }; - 20286C2AFDCF999611CA2CEA = { - children = ( - 50EE2AB703849F0B0ECA21EC, - A65E488407517A2600A66E82, - A65E44C807516A5C00A66E82, - A65E44C907516A5C00A66E82, - A65E4880075176F200A66E82, - A65E4881075176F200A66E82, - ); - isa = PBXGroup; - name = Sources; - path = ""; - refType = 4; - sourceTree = ""; - }; - 20286C2CFDCF999611CA2CEA = { - children = ( - A65E3D3307515F5900A66E82, - A65E3D3407515F5900A66E82, - 50459C5F038587C60ECA21EC, - 0867D6AAFE840B52C02AAC07, - 02345980000FD03B11CA0E72, - ); - isa = PBXGroup; - name = Resources; - path = ""; - refType = 4; - sourceTree = ""; - }; - 20286C32FDCF999611CA2CEA = { - children = ( - 50F4F0A7039D6ACA0E82C0CB, - A65E488607517A6900A66E82, - 570C5748047186C400ACF82F, - ); - isa = PBXGroup; - name = "External Frameworks and Libraries"; - path = ""; - refType = 4; - sourceTree = ""; - }; - 20286C34FDCF999611CA2CEA = { - buildPhases = ( - 20286C35FDCF999611CA2CEA, - A65E44BC075161B900A66E82, - 20286C36FDCF999611CA2CEA, - 20286C38FDCF999611CA2CEA, - 20286C3BFDCF999611CA2CEA, - 04313892FE3035C9C02AAC07, - ); - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ""; - HEADER_SEARCH_PATHS = "/Users/darco/Desktop/X11ForMacOSXSource-1.0/xc/programs/Xserver/include /usr/X11R6/include/X11 /usr/X11R6/include"; - LIBRARY_SEARCH_PATHS = /usr/X11R6/lib; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = "-lXau -lX11"; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = "Synfig Studio"; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - WRAPPER_EXTENSION = app; - }; - dependencies = ( - ); - isa = PBXApplicationTarget; - name = SynfigStudio; - productName = X11; - productReference = 0249A667FF388E1711CA2CEA; - productSettingsXML = " - - - - CFBundleDevelopmentRegion - English - CFBundleDocumentTypes - - - CFBundleTypeExtensions - - sif - - CFBundleTypeIconFile - sif_file.icns - CFBundleTypeMIMETypes - - image/x-sif - - CFBundleTypeName - Synfig Composition - CFBundleTypeOSTypes - - **** - - CFBundleTypeRole - Editor - LSIsAppleDefaultForType - - NSDocumentClass - image - - - CFBundleExecutable - Synfig Studio - CFBundleGetInfoString - Synfig - CFBundleIconFile - voria.icns - CFBundleIdentifier - com.voria.synfig - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - Synfig Studio - CFBundlePackageType - APPL - CFBundleShortVersionString - 0.1 - CFBundleSignature - ???? - CFBundleVersion - 0.1 - CSResourcesFileMapped - - NSHumanReadableCopyright - Copyright © 2003, Apple Computer, Inc. -Copyright © 2003, XFree86 Project, Inc. - NSMainNibFile - main - NSPrincipalClass - SynfigApplication - - -"; - }; - 20286C35FDCF999611CA2CEA = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXHeadersBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 20286C36FDCF999611CA2CEA = { - buildActionMask = 2147483647; - files = ( - 0867D6ACFE840B52C02AAC07, - 02345981000FD03B11CA0E72, - A65E488807517AA400A66E82, - 50459C60038587C60ECA21EC, - A65E3D3507515F5900A66E82, - A65E3D3607515F5900A66E82, - ); - isa = PBXResourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 20286C38FDCF999611CA2CEA = { - buildActionMask = 2147483647; - files = ( - 50EE2AB803849F0B0ECA21EC, - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 20286C3BFDCF999611CA2CEA = { - buildActionMask = 2147483647; - files = ( - 50F4F0E8039D6ACA0E82C0CB, - 570C5749047186C400ACF82F, - A65E488707517A6900A66E82, - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; -//200 -//201 -//202 -//203 -//204 -//4A0 -//4A1 -//4A2 -//4A3 -//4A4 - 4A9504C5FFE6A39111CA0CBA = { - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - OPTIMIZATION_CFLAGS = "-O0"; - ZERO_LINK = YES; - }; - isa = PBXBuildStyle; - name = Development; - }; - 4A9504C6FFE6A39111CA0CBA = { - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - ZERO_LINK = NO; - }; - isa = PBXBuildStyle; - name = Deployment; - }; -//4A0 -//4A1 -//4A2 -//4A3 -//4A4 -//500 -//501 -//502 -//503 -//504 - 50459C5F038587C60ECA21EC = { - isa = PBXFileReference; - lastKnownFileType = image.icns; - path = X11.icns; - refType = 4; - sourceTree = ""; - }; - 50459C60038587C60ECA21EC = { - fileRef = 50459C5F038587C60ECA21EC; - isa = PBXBuildFile; - settings = { - }; - }; - 50EE2AB703849F0B0ECA21EC = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = "bundle-main.c"; - refType = 4; - sourceTree = ""; - }; - 50EE2AB803849F0B0ECA21EC = { - fileRef = 50EE2AB703849F0B0ECA21EC; - isa = PBXBuildFile; - settings = { - }; - }; - 50F4F0A7039D6ACA0E82C0CB = { - isa = PBXFileReference; - lastKnownFileType = wrapper.framework; - name = CoreFoundation.framework; - path = /System/Library/Frameworks/CoreFoundation.framework; - refType = 0; - sourceTree = ""; - }; - 50F4F0E8039D6ACA0E82C0CB = { - fileRef = 50F4F0A7039D6ACA0E82C0CB; - isa = PBXBuildFile; - settings = { - }; - }; -//500 -//501 -//502 -//503 -//504 -//570 -//571 -//572 -//573 -//574 - 570C5748047186C400ACF82F = { - isa = PBXFileReference; - lastKnownFileType = wrapper.framework; - name = SystemConfiguration.framework; - path = /System/Library/Frameworks/SystemConfiguration.framework; - refType = 0; - sourceTree = ""; - }; - 570C5749047186C400ACF82F = { - fileRef = 570C5748047186C400ACF82F; - isa = PBXBuildFile; - settings = { - }; - }; -//570 -//571 -//572 -//573 -//574 -//A60 -//A61 -//A62 -//A63 -//A64 - A65E3D3307515F5900A66E82 = { - isa = PBXFileReference; - lastKnownFileType = image.icns; - path = sif_file.icns; - refType = 4; - sourceTree = ""; - }; - A65E3D3407515F5900A66E82 = { - isa = PBXFileReference; - lastKnownFileType = image.icns; - path = voria.icns; - refType = 4; - sourceTree = ""; - }; - A65E3D3507515F5900A66E82 = { - fileRef = A65E3D3307515F5900A66E82; - isa = PBXBuildFile; - settings = { - }; - }; - A65E3D3607515F5900A66E82 = { - fileRef = A65E3D3407515F5900A66E82; - isa = PBXBuildFile; - settings = { - }; - }; - A65E44BC075161B900A66E82 = { - buildActionMask = 2147483647; - contextName = ""; - files = ( - A65E488507517A2600A66E82, - ); - isSharedContext = 0; - isa = PBXAppleScriptBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - A65E44C807516A5C00A66E82 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = X11Controller.h; - refType = 4; - sourceTree = ""; - }; - A65E44C907516A5C00A66E82 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.objc; - path = X11Controller.m; - refType = 4; - sourceTree = ""; - }; - A65E4880075176F200A66E82 = { - fileEncoding = 4; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = SynfigApplication.h; - refType = 4; - sourceTree = ""; - }; - A65E4881075176F200A66E82 = { - fileEncoding = 4; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.objc; - path = SynfigApplication.m; - refType = 4; - sourceTree = ""; - }; - A65E488407517A2600A66E82 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.applescript; - path = events.applescript; - refType = 4; - sourceTree = ""; - }; - A65E488507517A2600A66E82 = { - fileRef = A65E488407517A2600A66E82; - isa = PBXBuildFile; - settings = { - ATTRIBUTES = ( - Debug, - ); - }; - }; - A65E488607517A6900A66E82 = { - isa = PBXFileReference; - lastKnownFileType = wrapper.framework; - name = AppleScriptKit.framework; - path = /System/Library/Frameworks/AppleScriptKit.framework; - refType = 0; - sourceTree = ""; - }; - A65E488707517A6900A66E82 = { - fileRef = A65E488607517A6900A66E82; - isa = PBXBuildFile; - settings = { - }; - }; - A65E488807517AA400A66E82 = { - fileRef = A65E488407517A2600A66E82; - isa = PBXBuildFile; - settings = { - }; - }; - }; - rootObject = 20286C28FDCF999611CA2CEA; -} diff --git a/synfig-osx/trunk/launcher/SynfigApplication.h b/synfig-osx/trunk/launcher/SynfigApplication.h deleted file mode 100644 index a2dcf10..0000000 --- a/synfig-osx/trunk/launcher/SynfigApplication.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// SynfigApplication.h -// Synfig Studio -// -// Created by Robert Quattlebaum on Sun Nov 21 2004. -// Copyright (c) 2004 __MyCompanyName__. All rights reserved. -// - -#import -#import "X11Application.h" - -@interface SynfigApplication : X11Application { - -} - -@end diff --git a/synfig-osx/trunk/launcher/SynfigApplication.m b/synfig-osx/trunk/launcher/SynfigApplication.m deleted file mode 100644 index d5f5f93..0000000 --- a/synfig-osx/trunk/launcher/SynfigApplication.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// SynfigApplication.m -// Synfig Studio -// -// Created by Robert Quattlebaum on Sun Nov 21 2004. -// Copyright (c) 2004 __MyCompanyName__. All rights reserved. -// - -#import "SynfigApplication.h" - - -@implementation SynfigApplication - -@end diff --git a/synfig-osx/trunk/launcher/X11.icns b/synfig-osx/trunk/launcher/X11.icns deleted file mode 100644 index 4c4717726399030db37efe54e4d95f3d746855ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 28104 zcmeHPeQ*?25`Qzu0Buiw!@-dm+zV0`hu!#}*= zz0L0Id%vF7{kr>g_e>_q$^K(5WAm$WvU3M9#vWm8ssCoL@56I)6$@kXi$#ouuQao8 zmBr1zeEO3!=gyr!ckb-RmuE5d>ZwyJzKT5cDq|}ARmpN%A=-Wntki`?$_pwaoP86h zZv}8?DRyXD>@)f*n9ro9eXcrG2qWAIVWp|BRN^7fv%i+A26{+)abZomQi1aY=6co% z?<(nae6FPcOD?Jqy;#Zi!BXO7FSo)S$Zr$a7@JtSV$JI-3-a@e))tmbT+PICe$Lj( zO`HE5V^Rb(cK|-yQGXNBK6Nt2$X#b)xD7etxo?pz>j8*A|<~59Gw)K5A8OH(qR8RE#L=!ZZAUp;QQUZ6XH*U zhA~Hn`T-3%XyE+_$DeBhh7P&M&1tnk2Z+$%O>(HvTZ5zV;}RZ6T!+lrpjm@pE5vB< zVq9k278I!Hm%e3PuwH&>O}lqg!X@}L={opqL7o&BhD=v z^#Qc$y6>FJr|H)AUb?2&U%K+;*M3d+kUIoBj=c5rf2*h2sWqqNs=E9C%Y;XQ&NV7L zQh20@kvAf|h>@K!@_Am(nZ8}kQCZQY$zk8!q%M>_b;8(V2M@g6V>@tgT|8s4mjEw3 zdTcr@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~SLAFs9lFZc+`&F!dYc z(6$;_8&aG%);T>8A0=%jQanT}f|Y@%f2m;It-6D8ZX%gwGOsJP1}?y})Uow&;;?y{weyKLevo4Cs+?y~*g z-DO+IAC?&R10I&3U!#g9G$1q}G$1taQ)wVJd05)WQK4uf(}pF-c3Xy&I5PW4ZO@Ms z{ph2$N3usIc6rQBiW^<@qqDi$ghiwK1PfpqmV=LQhp_3-3^m;_fgCaZObD41t5f46 zrXv6d{zCtu-~V?D{|h8wvH!&W6Z@5MExh~Kdu20e?|Ni@i)X85cx;sACZ4V{y`0h{44Trh_jEl z{t@|CVPk3Qa>!5#gpA?D5|z%V8#SD4QuvmO7V@Apj)^ZR^6FqVP@rqx4S! N5lhj825z|q{s$ZBfJ6WQ diff --git a/synfig-osx/trunk/launcher/X11Application.h b/synfig-osx/trunk/launcher/X11Application.h deleted file mode 100644 index b1636cf..0000000 --- a/synfig-osx/trunk/launcher/X11Application.h +++ /dev/null @@ -1,102 +0,0 @@ -/* X11Application.h -- subclass of NSApplication to multiplex events - $Id: X11Application.h,v 1.26 2003/08/08 19:16:13 jharper Exp $ - - Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. */ - -#ifndef X11APPLICATION_H -#define X11APPLICATION_H 1 - -#if __OBJC__ - -#import -#import "X11Controller.h" - -@interface X11Application : NSApplication { - X11Controller *_controller; - - unsigned int _x_active :1; -} - -- (void) set_controller:controller; -- (void) set_window_menu:(NSArray *)list; - -- (int) prefs_get_integer:(NSString *)key default:(int)def; -- (const char *) prefs_get_string:(NSString *)key default:(const char *)def; -- (float) prefs_get_float:(NSString *)key default:(float)def; -- (int) prefs_get_boolean:(NSString *)key default:(int)def; -- (NSArray *) prefs_get_array:(NSString *)key; -- (void) prefs_set_integer:(NSString *)key value:(int)value; -- (void) prefs_set_float:(NSString *)key value:(float)value; -- (void) prefs_set_boolean:(NSString *)key value:(int)value; -- (void) prefs_set_array:(NSString *)key value:(NSArray *)value; -- (void) prefs_set_string:(NSString *)key value:(NSString *)value; -- (void) prefs_synchronize; - -- (BOOL) x_active; - -@end - -extern X11Application *X11App; - -#endif /* __OBJC__ */ - -extern void X11ApplicationSetWindowMenu (int nitems, const char **items, - const char *shortcuts); -extern void X11ApplicationSetWindowMenuCheck (int idx); -extern void X11ApplicationSetFrontProcess (void); -extern void X11ApplicationSetCanQuit (int state); -extern void X11ApplicationServerReady (void); -extern void X11ApplicationShowHideMenubar (int state); - -extern void X11ApplicationMain (int argc, const char *argv[], - void (*server_thread) (void *), - void *server_arg); - -extern int X11EnableKeyEquivalents; - -#define APP_PREFS "com.apple.x11" - -#define PREFS_APPSMENU "apps_menu" -#define PREFS_FAKEBUTTONS "enable_fake_buttons" -#define PREFS_SYSBEEP "enable_system_beep" -#define PREFS_KEYEQUIVS "enable_key_equivalents" -#define PREFS_KEYMAP_FILE "keymap_file" -#define PREFS_SYNC_KEYMAP "sync_keymap" -#define PREFS_DEPTH "depth" -#define PREFS_NO_AUTH "no_auth" -#define PREFS_NO_TCP "nolisten_tcp" -#define PREFS_DONE_XINIT_CHECK "done_xinit_check" -#define PREFS_NO_QUIT_ALERT "no_quit_alert" -#define PREFS_FAKE_BUTTON2 "fake_button2" -#define PREFS_FAKE_BUTTON3 "fake_button3" -#define PREFS_ROOTLESS "rootless" -#define PREFS_FULLSCREEN_HOTKEYS "fullscreen_hotkeys" -#define PREFS_SWAP_ALT_META "swap_alt_meta" -#define PREFS_XP_OPTIONS "xp_options" - -#endif /* X11APPLICATION_H */ diff --git a/synfig-osx/trunk/launcher/X11Application.m b/synfig-osx/trunk/launcher/X11Application.m deleted file mode 100644 index 094e064..0000000 --- a/synfig-osx/trunk/launcher/X11Application.m +++ /dev/null @@ -1,1085 +0,0 @@ -/* X11Application.m -- subclass of NSApplication to multiplex events - $Id: X11Application.m,v 1.53 2003/09/13 02:00:46 jharper Exp $ - - Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. */ - -#import "X11Application.h" -#include - -/* ouch! */ -#define BOOL X_BOOL -# include "Xproto.h" -#define WindowPtr X_WindowPtr -#define Cursor X_Cursor -# include "quartz.h" -# define _APPLEWM_SERVER_ -# include "applewm.h" -# include "X.h" -#undef Cursor -#undef WindowPtr -#undef BOOL - -#include "xf86Version.h" - -#include -#include -#include - -#define DEFAULTS_FILE "/etc/X11/xserver/Xquartz.plist" - -int X11EnableKeyEquivalents = TRUE; - -X11Application *X11App; - -#define ALL_KEY_MASKS (NSShiftKeyMask | NSControlKeyMask \ - | NSAlternateKeyMask | NSCommandKeyMask) - -@implementation X11Application - -typedef struct message_struct message; -struct message_struct { - mach_msg_header_t hdr; - SEL selector; - NSObject *arg; -}; - -static mach_port_t _port; - -static void send_nsevent (NSEventType type, NSEvent *e); - -/* avoid header conflict hell */ -extern int RootlessKnowsWindowNumber (int number); -extern void DarwinEnqueueEvent (const xEvent *e); - -static void -init_ports (void) -{ - kern_return_t r; - NSPort *p; - - if (_port != MACH_PORT_NULL) - return; - - r = mach_port_allocate (mach_task_self (), MACH_PORT_RIGHT_RECEIVE, &_port); - if (r != KERN_SUCCESS) - return; - - p = [NSMachPort portWithMachPort:_port]; - [p setDelegate:NSApp]; - [p scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; -} - -static void -message_kit_thread (SEL selector, NSObject *arg) -{ - message msg; - kern_return_t r; - - msg.hdr.msgh_bits = MACH_MSGH_BITS (MACH_MSG_TYPE_MAKE_SEND, 0); - msg.hdr.msgh_size = sizeof (msg); - msg.hdr.msgh_remote_port = _port; - msg.hdr.msgh_local_port = MACH_PORT_NULL; - msg.hdr.msgh_reserved = 0; - msg.hdr.msgh_id = 0; - - msg.selector = selector; - msg.arg = [arg retain]; - - r = mach_msg (&msg.hdr, MACH_SEND_MSG, msg.hdr.msgh_size, - 0, MACH_PORT_NULL, 0, MACH_PORT_NULL); - if (r != KERN_SUCCESS) - fprintf (stderr, "%s: mach_msg failed: %x\n", __FUNCTION__, r); -} - -- (void) handleMachMessage:(void *)_msg -{ - message *msg = _msg; - - [self performSelector:msg->selector withObject:msg->arg]; - [msg->arg release]; -} - -- (void) set_controller:obj -{ - if (_controller == nil) - _controller = [obj retain]; -} - -- (void) dealloc -{ - if (_controller != nil) - [_controller release]; - - if (_port != MACH_PORT_NULL) - mach_port_deallocate (mach_task_self (), _port); - - [super dealloc]; -} - -- (void) orderFrontStandardAboutPanel: (id) sender -{ - NSMutableDictionary *dict; - NSDictionary *infoDict; - NSString *tem; - - dict = [NSMutableDictionary dictionaryWithCapacity:2]; - infoDict = [[NSBundle mainBundle] infoDictionary]; - - [dict setObject: NSLocalizedString (@"The X Window System", @"About panel") - forKey:@"ApplicationName"]; - - tem = [infoDict objectForKey:@"CFBundleShortVersionString"]; - - [dict setObject:[NSString stringWithFormat:@"X11 %@ - XFree86 %d.%d.%d", - tem, XF86_VERSION_MAJOR, XF86_VERSION_MINOR, - XF86_VERSION_PATCH] forKey:@"ApplicationVersion"]; - - [self orderFrontStandardAboutPanelWithOptions: dict]; -} - -- (void) activateX:(BOOL)state -{ - /* Create a TSM document that supports full Unicode input, and - have it activated while X is active (unless using the old - keymapping files) */ - static TSMDocumentID x11_document; - - if (state) - { - QuartzMessageMainThread (kXquartzActivate, 0); - - if (!_x_active) - { - if (x11_document == 0 && darwinKeymapFile == NULL) - { - OSType types[1]; - types[0] = kUnicodeDocument; - NewTSMDocument (1, types, &x11_document, 0); - } - - if (x11_document != 0) - ActivateTSMDocument (x11_document); - } - } - else - { - QuartzMessageMainThread (kXquartzDeactivate, 0); - - if (_x_active) - { - if (x11_document != 0) - DeactivateTSMDocument (x11_document); - } - } - - _x_active = state; -} - -- (void) became_key:(NSWindow *)win -{ - [self activateX:NO]; -} - -- (void) sendEvent:(NSEvent *)e -{ - NSEventType type; - BOOL for_appkit, for_x; - - type = [e type]; - - /* By default pass down the responder chain and to X. */ - for_appkit = YES; - for_x = YES; - - switch (type) - { - case NSLeftMouseDown: case NSRightMouseDown: case NSOtherMouseDown: - case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp: - if ([e window] != nil) - { - /* Pointer event has a window. Probably something for the kit. */ - - for_x = NO; - - if (_x_active) - [self activateX:NO]; - } - else if ([self modalWindow] == nil) - { - /* Must be an X window. Tell appkit it doesn't have focus. */ - - for_appkit = NO; - - if ([self isActive]) - { - [self deactivate]; - - if (!_x_active && RootlessKnowsWindowNumber ([e windowNumber])) - [self activateX:YES]; - } - } - break; - - case NSKeyDown: case NSKeyUp: - if (_x_active) - { - static int swallow_up; - - /* No kit window is focused, so send it to X. */ - - for_appkit = NO; - - if (type == NSKeyDown) - { - /* Before that though, see if there are any global - shortcuts bound to it. */ - - if (X11EnableKeyEquivalents - && [[self mainMenu] performKeyEquivalent:e]) - { - swallow_up = [e keyCode]; - for_x = NO; - } - else if (!quartzEnableRootless - && ([e modifierFlags] & ALL_KEY_MASKS) - == (NSCommandKeyMask | NSAlternateKeyMask) - && ([e keyCode] == 0 /*a*/ - || [e keyCode] == 53 /*Esc*/)) - { - swallow_up = 0; - for_x = NO; - QuartzMessageMainThread (kXquartzToggleFullscreen, 0); - } - } - else - { - /* If we saw a key equivalent on the down, don't pass - the up through to X. */ - - if (swallow_up != 0 && [e keyCode] == swallow_up) - { - swallow_up = 0; - for_x = NO; - } - } - } - else - { - for_x = NO; - } - break; - - case NSFlagsChanged: - /* For the l33t X users who remap modifier keys to normal keysyms. */ - if (!_x_active) - for_x = NO; - break; - - case NSAppKitDefined: - switch ([e subtype]) - { - case NSApplicationActivatedEventType: - for_x = NO; - if ([self modalWindow] == nil) - { - for_appkit = NO; - - /* FIXME: hack to avoid having to pass the event to appkit, - which would cause it to raise one of its windows. */ - _appFlags._active = YES; - - [self activateX:YES]; - } - break; - - case 18: /* ApplicationDidReactivate */ - if (quartzHasRoot) - for_appkit = NO; - break; - - case NSApplicationDeactivatedEventType: - for_x = NO; - [self activateX:NO]; - break; - } - break; - - default: break; /* for gcc */ - } - - if (for_appkit) - { - [super sendEvent:e]; - } - - if (for_x) - { - send_nsevent (type, e); - } -} - -- (void) set_window_menu:(NSArray *)list -{ - [_controller set_window_menu:list]; -} - -- (void) set_window_menu_check:(NSNumber *)n -{ - [_controller set_window_menu_check:n]; -} - -- (void) set_apps_menu:(NSArray *)list -{ - [_controller set_apps_menu:list]; -} - -- (void) set_front_process:unused -{ - [NSApp activateIgnoringOtherApps:YES]; - - if ([self modalWindow] == nil) - [self activateX:YES]; -} - -- (void) set_can_quit:(NSNumber *)state -{ - [_controller set_can_quit:[state boolValue]]; -} - -- (void) server_ready:unused -{ - [_controller server_ready]; -} - -- (void) show_hide_menubar:(NSNumber *)state -{ - if ([state boolValue]) - ShowMenuBar (); - else - HideMenuBar (); -} - - -/* user preferences */ - -/* Note that these functions only work for arrays whose elements - can be toll-free-bridged between NS and CF worlds. */ - -static const void *cfretain (CFAllocatorRef a, const void *b) { - return CFRetain (b); -} -static void cfrelease (CFAllocatorRef a, const void *b) { - CFRelease (b); -} -static CFMutableArrayRef -nsarray_to_cfarray (NSArray *in) -{ - CFMutableArrayRef out; - CFArrayCallBacks cb; - NSObject *ns; - const CFTypeRef *cf; - int i, count; - - memset (&cb, 0, sizeof (cb)); - cb.version = 0; - cb.retain = cfretain; - cb.release = cfrelease; - - count = [in count]; - out = CFArrayCreateMutable (NULL, count, &cb); - - for (i = 0; i < count; i++) - { - ns = [in objectAtIndex:i]; - - if ([ns isKindOfClass:[NSArray class]]) - cf = (CFTypeRef) nsarray_to_cfarray ((NSArray *) ns); - else - cf = CFRetain ((CFTypeRef) ns); - - CFArrayAppendValue (out, cf); - CFRelease (cf); - } - - return out; -} -static NSMutableArray * -cfarray_to_nsarray (CFArrayRef in) -{ - NSMutableArray *out; - const CFTypeRef *cf; - NSObject *ns; - int i, count; - - count = CFArrayGetCount (in); - out = [[NSMutableArray alloc] initWithCapacity:count]; - - for (i = 0; i < count; i++) - { - cf = CFArrayGetValueAtIndex (in, i); - - if (CFGetTypeID (cf) == CFArrayGetTypeID ()) - ns = cfarray_to_nsarray ((CFArrayRef) cf); - else - ns = [(id)cf retain]; - - [out addObject:ns]; - [ns release]; - } - - return out; -} - -- (CFPropertyListRef) prefs_get:(NSString *)key -{ - CFPropertyListRef value; - - value = CFPreferencesCopyAppValue ((CFStringRef) key, CFSTR (APP_PREFS)); - - if (value == NULL) - { - static CFDictionaryRef defaults; - - if (defaults == NULL) - { - CFStringRef error = NULL; - CFDataRef data; - CFURLRef url; - SInt32 error_code; - - url = (CFURLCreateFromFileSystemRepresentation - (NULL, DEFAULTS_FILE, strlen (DEFAULTS_FILE), false)); - if (CFURLCreateDataAndPropertiesFromResource (NULL, url, &data, - NULL, NULL, - &error_code)) - { - defaults = (CFPropertyListCreateFromXMLData - (NULL, data, kCFPropertyListImmutable, &error)); - if (error != NULL) - CFRelease (error); - CFRelease (data); - } - CFRelease (url); - } - - if (defaults != NULL) - value = CFDictionaryGetValue (defaults, key); - - if (value != NULL) - CFRetain (value); - } - - return value; -} - -- (int) prefs_get_integer:(NSString *)key default:(int)def -{ - CFPropertyListRef value; - int ret; - - value = [self prefs_get:key]; - - if (value != NULL && CFGetTypeID (value) == CFNumberGetTypeID ()) - CFNumberGetValue (value, kCFNumberIntType, &ret); - else if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ()) - ret = CFStringGetIntValue (value); - else - ret = def; - - if (value != NULL) - CFRelease (value); - - return ret; -} - -- (const char *) prefs_get_string:(NSString *)key default:(const char *)def -{ - CFPropertyListRef value; - const char *ret = NULL; - - value = [self prefs_get:key]; - - if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ()) - { - NSString *s = (NSString *) value; - - ret = [s UTF8String]; - } - - if (value != NULL) - CFRelease (value); - - return ret != NULL ? ret : def; -} - -- (float) prefs_get_float:(NSString *)key default:(float)def -{ - CFPropertyListRef value; - float ret = def; - - value = [self prefs_get:key]; - - if (value != NULL - && CFGetTypeID (value) == CFNumberGetTypeID () - && CFNumberIsFloatType (value)) - { - CFNumberGetValue (value, kCFNumberFloatType, &ret); - } - else if (value != NULL && CFGetTypeID (value) == CFStringGetTypeID ()) - { - ret = CFStringGetDoubleValue (value); - } - - if (value != NULL) - CFRelease (value); - - return ret; -} - -- (int) prefs_get_boolean:(NSString *)key default:(int)def -{ - CFPropertyListRef value; - int ret = def; - - value = [self prefs_get:key]; - - if (value != NULL) - { - if (CFGetTypeID (value) == CFNumberGetTypeID ()) - CFNumberGetValue (value, kCFNumberIntType, &ret); - else if (CFGetTypeID (value) == CFBooleanGetTypeID ()) - ret = CFBooleanGetValue (value); - else if (CFGetTypeID (value) == CFStringGetTypeID ()) - { - const char *tem = [(NSString *) value lossyCString]; - if (strcasecmp (tem, "true") == 0 || strcasecmp (tem, "yes") == 0) - ret = YES; - else - ret = NO; - } - - CFRelease (value); - } - - return ret; -} - -- (NSArray *) prefs_get_array:(NSString *)key -{ - NSArray *ret = nil; - CFPropertyListRef value; - - value = [self prefs_get:key]; - - if (value != NULL) - { - if (CFGetTypeID (value) == CFArrayGetTypeID ()) - ret = [cfarray_to_nsarray (value) autorelease]; - - CFRelease (value); - } - - return ret; -} - -- (void) prefs_set_integer:(NSString *)key value:(int)value -{ - CFNumberRef x; - - x = CFNumberCreate (NULL, kCFNumberIntType, &value); - - CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) x, CFSTR (APP_PREFS), - kCFPreferencesCurrentUser, kCFPreferencesAnyHost); - - CFRelease (x); -} - -- (void) prefs_set_float:(NSString *)key value:(float)value -{ - CFNumberRef x; - - x = CFNumberCreate (NULL, kCFNumberFloatType, &value); - - CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) x, CFSTR (APP_PREFS), - kCFPreferencesCurrentUser, kCFPreferencesAnyHost); - - CFRelease (x); -} - -- (void) prefs_set_boolean:(NSString *)key value:(int)value -{ - CFPreferencesSetValue ((CFStringRef) key, - (CFTypeRef) value ? kCFBooleanTrue - : kCFBooleanFalse, CFSTR (APP_PREFS), - kCFPreferencesCurrentUser, kCFPreferencesAnyHost); - -} - -- (void) prefs_set_array:(NSString *)key value:(NSArray *)value -{ - CFArrayRef cfarray; - - cfarray = nsarray_to_cfarray (value); - CFPreferencesSetValue ((CFStringRef) key, - (CFTypeRef) cfarray, - CFSTR (APP_PREFS), - kCFPreferencesCurrentUser, kCFPreferencesAnyHost); - CFRelease (cfarray); -} - -- (void) prefs_set_string:(NSString *)key value:(NSString *)value -{ - CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) value, - CFSTR (APP_PREFS), kCFPreferencesCurrentUser, - kCFPreferencesAnyHost); -} - -- (void) prefs_synchronize -{ - CFPreferencesAppSynchronize (kCFPreferencesCurrentApplication); -} - -- (void) read_defaults -{ - extern int darwinFakeButtons; - const char *tem; - - quartzUseSysBeep = [self prefs_get_boolean:@PREFS_SYSBEEP - default:quartzUseSysBeep]; - quartzEnableRootless = [self prefs_get_boolean:@PREFS_ROOTLESS - default:quartzEnableRootless]; - quartzFullscreenDisableHotkeys = ![self prefs_get_boolean: - @PREFS_FULLSCREEN_HOTKEYS default: - !quartzFullscreenDisableHotkeys]; - quartzXpluginOptions = [self prefs_get_integer:@PREFS_XP_OPTIONS - default:quartzXpluginOptions]; - - darwinSwapAltMeta = [self prefs_get_boolean:@PREFS_SWAP_ALT_META - default:darwinSwapAltMeta]; - darwinFakeButtons = [self prefs_get_boolean:@PREFS_FAKEBUTTONS - default:darwinFakeButtons]; - if (darwinFakeButtons) - { - const char *fake2, *fake3; - - fake2 = [self prefs_get_string:@PREFS_FAKE_BUTTON2 default:NULL]; - fake3 = [self prefs_get_string:@PREFS_FAKE_BUTTON3 default:NULL]; - - DarwinSetFakeButtons (fake2, fake3); - } - - X11EnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS - default:X11EnableKeyEquivalents]; - - darwinSyncKeymap = [self prefs_get_boolean:@PREFS_SYNC_KEYMAP - default:darwinSyncKeymap]; - - tem = [self prefs_get_string:@PREFS_KEYMAP_FILE default:NULL]; - if (tem != NULL) - darwinKeymapFile = strdup (tem); - - quartzDesiredDepth = [self prefs_get_integer:@PREFS_DEPTH - default:quartzDesiredDepth]; -} - -/* This will end up at the end of the responder chain. */ -- (void) copy:sender -{ - QuartzMessageMainThread (kXquartzPasteboardNotify, 1, - AppleWMCopyToPasteboard); -} - -- (BOOL) x_active -{ - return _x_active; -} - -@end - -static NSArray * -array_with_strings_and_numbers (int nitems, const char **items, - const char *numbers) -{ - NSMutableArray *array, *subarray; - NSString *string; - NSString *number; - int i; - - /* (Can't autorelease on the X server thread) */ - - array = [[NSMutableArray alloc] initWithCapacity:nitems]; - - for (i = 0; i < nitems; i++) - { - subarray = [[NSMutableArray alloc] initWithCapacity:2]; - - string = [[NSString alloc] initWithUTF8String:items[i]]; - [subarray addObject:string]; - [string release]; - - if (numbers[i] != 0) - { - number = [[NSString alloc] initWithFormat:@"%d", numbers[i]]; - [subarray addObject:number]; - [number release]; - } - else - [subarray addObject:@""]; - - [array addObject:subarray]; - [subarray release]; - } - - return array; -} - -void -X11ApplicationSetWindowMenu (int nitems, const char **items, - const char *shortcuts) -{ - NSArray *array; - - array = array_with_strings_and_numbers (nitems, items, shortcuts); - - /* Send the array of strings over to the appkit thread */ - - message_kit_thread (@selector (set_window_menu:), array); - [array release]; -} - -void -X11ApplicationSetWindowMenuCheck (int idx) -{ - NSNumber *n; - - n = [[NSNumber alloc] initWithInt:idx]; - - message_kit_thread (@selector (set_window_menu_check:), n); - - [n release]; -} - -void -X11ApplicationSetFrontProcess (void) -{ - message_kit_thread (@selector (set_front_process:), nil); -} - -void -X11ApplicationSetCanQuit (int state) -{ - NSNumber *n; - - n = [[NSNumber alloc] initWithBool:state]; - - message_kit_thread (@selector (set_can_quit:), n); - - [n release]; -} - -void -X11ApplicationServerReady (void) -{ - message_kit_thread (@selector (server_ready:), nil); -} - -void -X11ApplicationShowHideMenubar (int state) -{ - NSNumber *n; - - n = [[NSNumber alloc] initWithBool:state]; - - message_kit_thread (@selector (show_hide_menubar:), n); - - [n release]; -} - -static void * -create_thread (void *func, void *arg) -{ - pthread_attr_t attr; - pthread_t tid; - - pthread_attr_init (&attr); - - pthread_attr_setscope (&attr, PTHREAD_SCOPE_SYSTEM); - pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); - - pthread_create (&tid, &attr, func, arg); - - pthread_attr_destroy (&attr); - - return (void *) tid; -} - -static void -check_xinitrc (void) -{ - char *tem, buf[1024]; - NSString *msg; - - if ([X11App prefs_get_boolean:@PREFS_DONE_XINIT_CHECK default:NO]) - return; - - tem = getenv ("HOME"); - if (tem == NULL) - goto done; - - snprintf (buf, sizeof (buf), "%s/.xinitrc", tem); - if (access (buf, F_OK) != 0) - goto done; - - /* FIXME: put localized strings into Resources/English.lproj */ - - msg = NSLocalizedString ( -@"You have an existing ~/.xinitrc file.\n\n\ -Windows displayed by X11 applications may not have titlebars, or may look \ -different to windows displayed by native applications.\n\n\ -Would you like to move aside the existing file and use the standard X11 \ -environment?", @""); - - if (NSRunAlertPanel (nil, msg, NSLocalizedString (@"Yes", @""), - NSLocalizedString (@"No", @""), nil) - == NSAlertDefaultReturn) - { - char buf2[1024]; - int i = -1; - - snprintf (buf2, sizeof (buf2), "%s.old", buf); - - for (i = 1; access (buf2, F_OK) == 0; i++) - snprintf (buf2, sizeof (buf2), "%s.old.%d", buf, i); - - rename (buf, buf2); - } - -done: - [X11App prefs_set_boolean:@PREFS_DONE_XINIT_CHECK value:YES]; - [X11App prefs_synchronize]; -} - -void -X11ApplicationMain (int argc, const char *argv[], - void (*server_thread) (void *), void *server_arg) -{ - NSAutoreleasePool *pool; - -#ifdef DEBUG - while (access ("/tmp/x11-block", F_OK) == 0) - sleep (1); -#endif - - pool = [[NSAutoreleasePool alloc] init]; - - X11App = (X11Application *) [X11Application sharedApplication]; - - init_ports (); - - [NSApp read_defaults]; - - [NSBundle loadNibNamed:@"main" owner:NSApp]; - - [[NSNotificationCenter defaultCenter] addObserver:NSApp - selector:@selector (became_key:) - name:NSWindowDidBecomeKeyNotification object:nil]; - - check_xinitrc (); - - if (!create_thread (server_thread, server_arg)) - { - fprintf (stderr, "can't create secondary thread\n"); - exit (1); - } - - [NSApp run]; - - /* not reached */ -} - - -/* event conversion */ - -static inline unsigned short -convert_flags (unsigned int nsflags) -{ - unsigned int xflags; - - if (nsflags == ~0) - return 0xffff; - - xflags = 0; - - if (nsflags & NSAlphaShiftKeyMask) - xflags |= LockMask; - if (nsflags & NSShiftKeyMask) - xflags |= ShiftMask; - if (nsflags & NSControlKeyMask) - xflags |= ControlMask; - if (nsflags & NSAlternateKeyMask) - xflags |= Mod1Mask; - if (nsflags & NSCommandKeyMask) - xflags |= Mod2Mask; - /* FIXME: secondaryfn? */ - - return xflags; -} - -static void -send_nsevent (NSEventType type, NSEvent *e) -{ - static unsigned int button_state = 0; - - xEvent xe; - - memset (&xe, 0, sizeof (xe)); - - switch (type) - { - NSRect screen; - NSPoint location; - NSWindow *window; - int pointer_x, pointer_y, count; - - case NSLeftMouseDown: - xe.u.u.type = ButtonPress; - xe.u.u.detail = 1; - goto do_press_event; - - case NSRightMouseDown: - xe.u.u.type = ButtonPress; - xe.u.u.detail = 3; - goto do_press_event; - - case NSOtherMouseDown: - xe.u.u.type = ButtonPress; - xe.u.u.detail = 2; /* FIXME? */ - goto do_press_event; - - do_press_event: - if (RootlessKnowsWindowNumber ([e windowNumber]) == NULL) - { - /* X server doesn't grok this window, drop the event. - - Note: theoretically this isn't necessary, but if I click - on the menubar, we get sent a LeftMouseDown when the - release happens, but no LeftMouseUp is ever seen! */ - - break; - } - goto do_event; - - case NSLeftMouseUp: - xe.u.u.type = ButtonRelease; - xe.u.u.detail = 1; - goto do_release_event; - - case NSRightMouseUp: - xe.u.u.type = ButtonRelease; - xe.u.u.detail = 3; - goto do_release_event; - - case NSOtherMouseUp: - xe.u.u.type = ButtonRelease; - xe.u.u.detail = 2; /* FIXME? */ - goto do_release_event; - - do_release_event: - if ((button_state & (1 << xe.u.u.detail)) == 0) - { - /* X didn't see the button press for this release, so skip it */ - break; - } - goto do_event; - - case NSMouseMoved: - case NSLeftMouseDragged: - case NSRightMouseDragged: - case NSOtherMouseDragged: - /* convert location to global top-left coordinates */ - - location = [e locationInWindow]; - window = [e window]; - screen = [[[NSScreen screens] objectAtIndex:0] frame]; - - if (window != nil) - { - NSRect frame = [window frame]; - pointer_x = location.x + frame.origin.x; - pointer_y = (((screen.origin.y + screen.size.height) - - location.y) - frame.origin.y); - } - else - { - pointer_x = location.x; - pointer_y = (screen.origin.y + screen.size.height) - location.y; - } - - xe.u.keyButtonPointer.rootX = pointer_x; - xe.u.keyButtonPointer.rootY = pointer_y; - xe.u.u.type = MotionNotify; - goto do_event; - - case NSKeyDown: - xe.u.u.type = KeyPress; - xe.u.u.detail = [e keyCode]; - goto do_event; - - case NSKeyUp: - xe.u.u.type = KeyRelease; - xe.u.u.detail = [e keyCode]; - goto do_event; - - case NSScrollWheel: - xe.u.keyButtonPointer.state = convert_flags ([e modifierFlags]); - count = [e deltaY]; - xe.u.u.detail = count > 0 ? 4 : 5; - for (count = abs (count); count-- > 0;) - { - xe.u.u.type = ButtonPress; - DarwinEnqueueEvent (&xe); - xe.u.u.type = ButtonRelease; - DarwinEnqueueEvent (&xe); - } - xe.u.u.type = 0; - break; - - case NSFlagsChanged: - do_event: - xe.u.keyButtonPointer.state = convert_flags ([e modifierFlags]); - DarwinEnqueueEvent (&xe); - break; - - default: break; /* for gcc */ - } - - if (xe.u.u.type == ButtonPress) - button_state |= (1 << xe.u.u.detail); - else if (xe.u.u.type == ButtonRelease) - button_state &= ~(1 << xe.u.u.detail); -} diff --git a/synfig-osx/trunk/launcher/X11Controller.h b/synfig-osx/trunk/launcher/X11Controller.h deleted file mode 100644 index d8dbbd0..0000000 --- a/synfig-osx/trunk/launcher/X11Controller.h +++ /dev/null @@ -1,86 +0,0 @@ -/* X11Controller.h -- connect the IB ui - $Id: X11Controller.h,v 1.21 2003/07/24 17:52:29 jharper Exp $ - - Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. */ - -#ifndef X11CONTROLLER_H -#define X11CONTROLLER_H 1 - -#if __OBJC__ - -#import -#include "x-list.h" - -@interface X11Controller : NSObject -{ - NSPanel *prefs_panel; - - NSButton *fake_buttons; - NSButton *enable_fullscreen; - NSButton *use_sysbeep; - NSButton *enable_keyequivs; - NSButton *sync_keymap; - NSButton *enable_auth; - NSButton *enable_tcp; - NSPopUpButton *depth; - - NSMenuItem *x11_about_item; - NSMenuItem *window_separator; - NSMenuItem *dock_window_separator; - NSMenuItem *apps_separator; - NSMenuItem *toggle_fullscreen_item; - NSMenu *dock_apps_menu; - NSTableView *apps_table; - - NSArray *apps; - NSMutableArray *table_apps; - - NSMenu *dock_menu; - - int checked_window_item; - x_list *pending_apps; - - BOOL finished_launching; - BOOL can_quit; -} - -- (void) set_window_menu:(NSArray *)list; -- (void) set_window_menu_check:(NSNumber *)n; -- (void) set_apps_menu:(NSArray *)list; -- (void) set_can_quit:(BOOL)state; -- (void) server_ready; - -@end - -#endif /* __OBJC__ */ - -extern void X11ControllerMain (int argc, const char *argv[], - void (*server_thread) (void *), - void *server_arg); - -#endif /* X11CONTROLLER_H */ diff --git a/synfig-osx/trunk/launcher/X11Controller.m b/synfig-osx/trunk/launcher/X11Controller.m deleted file mode 100644 index c103804..0000000 --- a/synfig-osx/trunk/launcher/X11Controller.m +++ /dev/null @@ -1,690 +0,0 @@ -/* X11Controller.m -- connect the IB ui, also the NSApp delegate - $Id: X11Controller.m,v 1.36 2003/07/24 17:52:29 jharper Exp $ - - Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. */ -#define __DARWIN__ - -#import "X11Controller.h" -#import "X11Application.h" -#import - - -/* ouch! */ -#define BOOL X_BOOL -# include "Xproto.h" -#define WindowPtr X_WindowPtr -#define Cursor X_Cursor -# include "quartz.h" -# define _APPLEWM_SERVER_ -# include "applewm.h" -# include "X.h" -#undef Cursor -#undef WindowPtr -#undef BOOL - -#include -#include - -#define TRACE() fprintf (stderr, "%s\n", __FUNCTION__) - -@implementation X11Controller - -- (void) awakeFromNib -{ - X11Application *xapp = NSApp; - NSArray *array; - - /* Point X11Application at ourself. */ - [xapp set_controller:self]; -#if 0 - array = [xapp prefs_get_array:@PREFS_APPSMENU]; - if (array != nil) - { - int count; - - /* convert from [TITLE1 COMMAND1 TITLE2 COMMAND2 ...] - to [[TITLE1 COMMAND1] [TITLE2 COMMAND2] ...] format. */ - - count = [array count]; - if (count > 0 - && ![[array objectAtIndex:0] isKindOfClass:[NSArray class]]) - { - int i; - NSMutableArray *copy, *sub; - - copy = [NSMutableArray arrayWithCapacity:(count / 2)]; - - for (i = 0; i < count / 2; i++) - { - sub = [[NSMutableArray alloc] initWithCapacity:3]; - [sub addObject:[array objectAtIndex:i*2]]; - [sub addObject:[array objectAtIndex:i*2+1]]; - [sub addObject:@""]; - [copy addObject:sub]; - [sub release]; - } - - array = copy; - } - - [self set_apps_menu:array]; - } - #endif -} - -- (void) item_selected:sender -{ - [NSApp activateIgnoringOtherApps:YES]; - - QuartzMessageMainThread (kXquartzControllerNotify, 2, - AppleWMWindowMenuItem, [sender tag]); -} - -- (void) remove_window_menu -{ - NSMenu *menu; - int first, count, i; - - /* Work backwards so we don't mess up the indices */ - menu = [window_separator menu]; - first = [menu indexOfItem:window_separator] + 1; - count = [menu numberOfItems]; - for (i = count - 1; i >= first; i--) - [menu removeItemAtIndex:i]; - - menu = [dock_window_separator menu]; - count = [menu indexOfItem:dock_window_separator]; - for (i = 0; i < count; i++) - [dock_menu removeItemAtIndex:0]; -} - -- (void) install_window_menu:(NSArray *)list -{ - NSMenu *menu; - NSMenuItem *item; - int first, count, i; - - menu = [window_separator menu]; - first = [menu indexOfItem:window_separator] + 1; - count = [list count]; - - for (i = 0; i < count; i++) - { - NSString *name, *shortcut; - - name = [[list objectAtIndex:i] objectAtIndex:0]; - shortcut = [[list objectAtIndex:i] objectAtIndex:1]; - - item = (NSMenuItem *) [menu addItemWithTitle:name action:@selector - (item_selected:) keyEquivalent:shortcut]; - [item setTarget:self]; - [item setTag:i]; - [item setEnabled:YES]; - - item = (NSMenuItem *) [dock_menu insertItemWithTitle:name - action:@selector - (item_selected:) keyEquivalent:shortcut - atIndex:i]; - [item setTarget:self]; - [item setTag:i]; - [item setEnabled:YES]; - } - - if (checked_window_item >= 0 && checked_window_item < count) - { - item = (NSMenuItem *) [menu itemAtIndex:first + checked_window_item]; - [item setState:NSOnState]; - item = (NSMenuItem *) [dock_menu itemAtIndex:checked_window_item]; - [item setState:NSOnState]; - } -} - -- (void) remove_apps_menu -{ - NSMenu *menu; - NSMenuItem *item; - int i; - - if (apps == nil || apps_separator == nil) - return; - - menu = [apps_separator menu]; - - if (menu != nil) - { - for (i = [menu numberOfItems] - 1; i >= 0; i--) - { - item = (NSMenuItem *) [menu itemAtIndex:i]; - if ([item tag] != 0) - [menu removeItemAtIndex:i]; - } - } - - if (dock_apps_menu != nil) - { - for (i = [dock_apps_menu numberOfItems] - 1; i >= 0; i--) - { - item = (NSMenuItem *) [dock_apps_menu itemAtIndex:i]; - if ([item tag] != 0) - [dock_apps_menu removeItemAtIndex:i]; - } - } - - [apps release]; - apps = nil; -} - -- (void) prepend_apps_item:(NSArray *)list index:(int)i menu:(NSMenu *)menu -{ - NSString *title, *shortcut = @""; - NSArray *group; - NSMenuItem *item; - - group = [list objectAtIndex:i]; - title = [group objectAtIndex:0]; - if ([group count] >= 3) - shortcut = [group objectAtIndex:2]; - - if ([title length] != 0) - { - item = (NSMenuItem *) [menu insertItemWithTitle:title - action:@selector (app_selected:) - keyEquivalent:shortcut atIndex:0]; - [item setTarget:self]; - [item setEnabled:YES]; - } - else - { - item = (NSMenuItem *) [NSMenuItem separatorItem]; - [menu insertItem:item atIndex:0]; - } - - [item setTag:i+1]; /* can't be zero, so add one */ -} - -- (void) install_apps_menu:(NSArray *)list -{ - NSMenu *menu; - int i, count; - - count = [list count]; - - if (count == 0 || apps_separator == nil) - return; - - menu = [apps_separator menu]; - - for (i = count - 1; i >= 0; i--) - { - if (menu != nil) - [self prepend_apps_item:list index:i menu:menu]; - if (dock_apps_menu != nil) - [self prepend_apps_item:list index:i menu:dock_apps_menu]; - } - - apps = [list retain]; -} - -- (void) set_window_menu:(NSArray *)list -{ - [self remove_window_menu]; - [self install_window_menu:list]; - - QuartzMessageMainThread (kXquartzControllerNotify, 1, - AppleWMWindowMenuNotify); -} - -- (void) set_window_menu_check:(NSNumber *)nn -{ - NSMenu *menu; - NSMenuItem *item; - int first, count; - int n = [nn intValue]; - - menu = [window_separator menu]; - first = [menu indexOfItem:window_separator] + 1; - count = [menu numberOfItems] - first; - - if (checked_window_item >= 0 && checked_window_item < count) - { - item = (NSMenuItem *) [menu itemAtIndex:first + checked_window_item]; - [item setState:NSOffState]; - item = (NSMenuItem *) [dock_menu itemAtIndex:checked_window_item]; - [item setState:NSOffState]; - } - if (n >= 0 && n < count) - { - item = (NSMenuItem *) [menu itemAtIndex:first + n]; - [item setState:NSOnState]; - item = (NSMenuItem *) [dock_menu itemAtIndex:n]; - [item setState:NSOnState]; - } - checked_window_item = n; -} - -- (void) set_apps_menu:(NSArray *)list -{ - [self remove_apps_menu]; - [self install_apps_menu:list]; -} - -- (void) launch_client:(NSString *)command -{ - QuartzRunClient ([command cString]); -} - -- (void) app_selected:sender -{ - int tag; - NSString *item; - - tag = [sender tag] - 1; - if (apps == nil || tag < 0 || tag >= [apps count]) - return; - - item = [[apps objectAtIndex:tag] objectAtIndex:1]; - - [self launch_client:item]; -} - -- (IBAction) apps_table_show:sender -{ - NSArray *columns; - - if (table_apps == nil) - { - table_apps = [[NSMutableArray alloc] initWithCapacity:1]; - - if (apps != nil) - [table_apps addObjectsFromArray:apps]; - } - - columns = [apps_table tableColumns]; - [[columns objectAtIndex:0] setIdentifier:@"0"]; - [[columns objectAtIndex:1] setIdentifier:@"1"]; - [[columns objectAtIndex:2] setIdentifier:@"2"]; - - [apps_table setDataSource:self]; - [apps_table selectRow:0 byExtendingSelection:NO]; - - [[apps_table window] makeKeyAndOrderFront:sender]; -} - -- (IBAction) apps_table_cancel:sender -{ - [[apps_table window] orderOut:sender]; - - [table_apps release]; - table_apps = nil; -} - -- (IBAction) apps_table_done:sender -{ - [apps_table deselectAll:sender]; /* flush edits? */ - - [self remove_apps_menu]; - [self install_apps_menu:table_apps]; - - [NSApp prefs_set_array:@PREFS_APPSMENU value:table_apps]; - [NSApp prefs_synchronize]; - - [[apps_table window] orderOut:sender]; - - [table_apps release]; - table_apps = nil; -} - -- (IBAction) apps_table_new:sender -{ - NSMutableArray *item; - - int row = [apps_table selectedRow], i; - - if (row < 0) - row = 0; - else - row = row + 1; - - i = row; - if (i > [table_apps count]) - return; /* avoid exceptions */ - - item = [[NSMutableArray alloc] initWithCapacity:3]; - [item addObject:@""]; - [item addObject:@""]; - [item addObject:@""]; - - [table_apps insertObject:item atIndex:i]; - [item release]; - - [apps_table noteNumberOfRowsChanged]; - [apps_table selectRow:row byExtendingSelection:NO]; -} - -- (IBAction) apps_table_duplicate:sender -{ - int row = [apps_table selectedRow], i; - NSObject *a; - - if (row < 0) - { - [self apps_table_new:sender]; - return; - } - - i = row; - if (i > [table_apps count] - 1) - return; /* avoid exceptions */ - - a = [table_apps objectAtIndex:i]; - [table_apps insertObject:[a copy] atIndex:i]; - - [apps_table noteNumberOfRowsChanged]; - [apps_table selectRow:row+1 byExtendingSelection:NO]; -} - -- (IBAction) apps_table_delete:sender -{ - int row = [apps_table selectedRow]; - - if (row >= 0) - { - int i = row; - - if (i > [table_apps count] - 1) - return; /* avoid exceptions */ - - [table_apps removeObjectAtIndex:i]; - } - - [apps_table noteNumberOfRowsChanged]; -} - -- (int) numberOfRowsInTableView:(NSTableView *)tableView -{ - if (table_apps == nil) - return 0; - - return [table_apps count]; -} - -- (id) tableView:(NSTableView *)tableView - objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row -{ - NSArray *item; - int col; - - if (table_apps == nil) - return nil; - - col = [[tableColumn identifier] intValue]; - - item = [table_apps objectAtIndex:row]; - if ([item count] > col) - return [item objectAtIndex:col]; - else - return @""; -} - -- (void) tableView:(NSTableView *)tableView setObjectValue:(id)object - forTableColumn:(NSTableColumn *)tableColumn row:(int)row -{ - NSMutableArray *item; - int col; - - if (table_apps == nil) - return; - - col = [[tableColumn identifier] intValue]; - - item = [table_apps objectAtIndex:row]; - [item replaceObjectAtIndex:col withObject:object]; -} - -- (void) hide_window:sender -{ - if ([X11App x_active]) - QuartzMessageMainThread (kXquartzControllerNotify, 1, AppleWMHideWindow); - else - NSBeep (); /* FIXME: something here */ -} - -- (IBAction)bring_to_front:sender -{ - QuartzMessageMainThread (kXquartzControllerNotify, 1, - AppleWMBringAllToFront); -} - -- (IBAction)close_window:sender -{ - if ([X11App x_active]) - QuartzMessageMainThread (kXquartzControllerNotify, 1, AppleWMCloseWindow); - else - [[NSApp keyWindow] performClose:sender]; -} - -- (IBAction)minimize_window:sender -{ - if ([X11App x_active]) - QuartzMessageMainThread (kXquartzControllerNotify, 1, AppleWMMinimizeWindow); - else - [[NSApp keyWindow] performMiniaturize:sender]; -} - -- (IBAction)zoom_window:sender -{ - if ([X11App x_active]) - QuartzMessageMainThread (kXquartzControllerNotify, 1, AppleWMZoomWindow); - else - [[NSApp keyWindow] performZoom:sender]; -} - -- (IBAction) next_window:sender -{ - QuartzMessageMainThread (kXquartzControllerNotify, 1, AppleWMNextWindow); -} - -- (IBAction) previous_window:sender -{ - QuartzMessageMainThread (kXquartzControllerNotify, - 1, AppleWMPreviousWindow); -} - -- (IBAction) enable_fullscreen_changed:sender -{ - int value = ![enable_fullscreen intValue]; - - QuartzMessageMainThread (kXquartzSetRootless, 1, value); - - [NSApp prefs_set_boolean:@PREFS_ROOTLESS value:value]; - [NSApp prefs_synchronize]; -} - -- (IBAction) toggle_fullscreen:sender -{ - QuartzMessageMainThread (kXquartzToggleFullscreen, 0); -} - -- (void) set_can_quit:(BOOL)state -{ - can_quit = state; -} - -- (IBAction)prefs_changed:sender -{ - darwinFakeButtons = [fake_buttons intValue]; - quartzUseSysBeep = [use_sysbeep intValue]; - X11EnableKeyEquivalents = [enable_keyequivs intValue]; - darwinSyncKeymap = [sync_keymap intValue]; - - /* after adding prefs here, also add to [X11Application read_defaults] - and below */ - - [NSApp prefs_set_boolean:@PREFS_FAKEBUTTONS value:darwinFakeButtons]; - [NSApp prefs_set_boolean:@PREFS_SYSBEEP value:quartzUseSysBeep]; - [NSApp prefs_set_boolean:@PREFS_KEYEQUIVS value:X11EnableKeyEquivalents]; - [NSApp prefs_set_boolean:@PREFS_SYNC_KEYMAP value:darwinSyncKeymap]; - [NSApp prefs_set_boolean:@PREFS_NO_AUTH value:![enable_auth intValue]]; - [NSApp prefs_set_boolean:@PREFS_NO_TCP value:![enable_tcp intValue]]; - [NSApp prefs_set_integer:@PREFS_DEPTH value:[depth selectedTag]]; - - [NSApp prefs_synchronize]; -} - -- (IBAction) prefs_show:sender -{ - [fake_buttons setIntValue:darwinFakeButtons]; - [use_sysbeep setIntValue:quartzUseSysBeep]; - [enable_keyequivs setIntValue:X11EnableKeyEquivalents]; - [sync_keymap setIntValue:darwinSyncKeymap]; - [sync_keymap setEnabled:darwinKeymapFile == NULL]; - - [enable_auth setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_AUTH default:NO]]; - [enable_tcp setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_TCP default:NO]]; - [depth selectItemAtIndex:[depth indexOfItemWithTag:[NSApp prefs_get_integer:@PREFS_DEPTH default:-1]]]; - - [enable_fullscreen setIntValue:!quartzEnableRootless]; - - [prefs_panel makeKeyAndOrderFront:sender]; -} - -- (IBAction) quit:sender -{ - QuartzMessageMainThread (kXdarwinQuit, 0); -} - -- (IBAction) x11_help:sender -{ - AHLookupAnchor (CFSTR ("Mac Help"), CFSTR ("mchlp2276")); -} - -- (BOOL) validateMenuItem:(NSMenuItem *)item -{ - NSMenu *menu = [item menu]; - - if (item == toggle_fullscreen_item) - { - return !quartzEnableRootless; - } - else if (menu == [window_separator menu] || menu == dock_menu - || (menu == [x11_about_item menu] && [item tag] == 42)) - { - return (AppleWMSelectedEvents () & AppleWMControllerNotifyMask) != 0; - } - else - { - return TRUE; - } -} - -- (void) applicationDidHide:(NSNotification *)notify -{ - QuartzMessageMainThread (kXquartzControllerNotify, 1, AppleWMHideAll); -} - -- (void) applicationDidUnhide:(NSNotification *)notify -{ - QuartzMessageMainThread (kXquartzControllerNotify, 1, AppleWMShowAll); -} - -- (NSApplicationTerminateReply) applicationShouldTerminate:sender -{ - NSString *msg; - - if (can_quit || [X11App prefs_get_boolean:@PREFS_NO_QUIT_ALERT default:NO]) - { - return NSTerminateNow; - } - - /* Make sure we're frontmost. */ - [NSApp activateIgnoringOtherApps:YES]; - - msg = NSLocalizedString (@"Are you sure you want to quit X11?\n\n\ -If you quit X11, any X11 applications you are running will stop immediately \ -and you will lose any changes you have not saved.", @""); - - /* FIXME: safe to run the alert in here? Or should we return Later - and then run the alert on a timer? It seems to work here, so.. */ - - return (NSRunAlertPanel (nil, msg, NSLocalizedString (@"Quit", @""), - NSLocalizedString (@"Cancel", @""), nil) - == NSAlertDefaultReturn) ? NSTerminateNow : NSTerminateCancel; -} - -- (void) applicationWillTerminate:(NSNotification *)aNotification -{ - [X11App prefs_synchronize]; - - /* shutdown the X server, it will exit () for us. */ - QuartzMessageMainThread (kXdarwinQuit, 0); - - /* In case it doesn't, exit anyway after a while. */ - while (sleep (10) != 0) ; - exit (1); -} - -- (void) server_ready -{ - x_list *node; - - finished_launching = YES; - - for (node = pending_apps; node != NULL; node = node->next) - { - NSString *filename = node->data; - QuartzRunClient ([filename UTF8String]); - [filename release]; - } - - x_list_free (pending_apps); - pending_apps = NULL; -} - -- (BOOL) application:(NSApplication *)app openFile:(NSString *)filename -{ -#if 0 - const char *name = [filename UTF8String]; - - if (finished_launching) - QuartzRunClient (name); - else if (name[0] != ':') /* ignore display names */ - pending_apps = x_list_prepend (pending_apps, [filename retain]); - - /* FIXME: report failures. */ - return YES; -#endif - return NO; -} - -@end - -void X11ControllerMain (int argc, const char *argv[], - void (*server_thread) (void *), void *server_arg) -{ - X11ApplicationMain (argc, argv, server_thread, server_arg); -} diff --git a/synfig-osx/trunk/launcher/Xquartz.man b/synfig-osx/trunk/launcher/Xquartz.man deleted file mode 100644 index edac30e..0000000 --- a/synfig-osx/trunk/launcher/Xquartz.man +++ /dev/null @@ -1,158 +0,0 @@ -.\" $XFree86: xc/programs/Xserver/hw/darwin/XDarwin.man,v 1.4 2002/01/09 18:01:58 torrey Exp $ -.\" -.TH XQUARTZ 1 __vendorversion__ -.SH NAME -Xquartz \- X window system server for Quartz operating system -.SH SYNOPSIS -.B Xquartz -[ options ] ... -.SH DESCRIPTION -.I Xquartz -is the X window server for Mac OS X provided by Apple. -.I Xquartz -runs in parallel with Aqua in rootless mode. In rootless mode, the X -window system and Mac OS X share your display. The root window of the -X11 display is the size of the screen and contains all the other -windows. The X11 root window is not displayed in rootless mode as Mac -OS X handles the desktop background. -.SH OPTIONS -.PP -In addition to the normal server options described in the \fIXserver(1)\fP -manual page, \fIXquartz\fP accepts the following command line switches: -.TP 8 -.B \-fakebuttons -Emulates a 3 button mouse using modifier keys. By default, the Command modifier -is used to emulate button 2 and Option is used for button 3. Thus, clicking the -first mouse button while holding down Command will act like clicking -button 2. Holding down Option will simulate button 3. -.TP 8 -.B \-nofakebuttons -Do not emulate a 3 button mouse. This is the default. -.TP 8 -.B "\-fakemouse2 \fImodifiers\fP" -Change the modifier keys used to emulate the second mouse button. By default, -Command is used to emulate the second button. Any combination of the following -modifier names may be used: Shift, Option, Control, Command, Fn. For example, -.B \-fakemouse2 """Option,Shift"" -will set holding Option, Shift and clicking on button one as equivalent to -clicking the second mouse button. -.TP 8 -.B "\-fakemouse3 \fImodifiers\fP" -Change the modifier keys used to emulate the third mouse button. By default, -Option is used to emulate the third button. Any combination of the following -modifier names may be used: Shift, Option, Control, Command, Fn. For example, -.B \-fakemouse3 """Control,Shift"" -will set holding Control, Shift and clicking on button one as equivalent to -clicking the third mouse button. -.TP 8 -.B "\-swapAltMeta" -Swaps the meaning of the Alt and Meta modifier keys. -.TP 8 -.B "\-keymap \fIfile\fP" -On startup \fIXquartz\fP translates a Darwin keymapping into an X keymap. -The default is to read this keymapping from USA.keymapping. With this option -the keymapping will be read from \fIfile\fP instead. If the file's path is -not specified, it will be searched for in Library/Keyboards/ underneath the -following directories (in order): ~, /, /Network, /System. -.TP 8 -.B \-nokeymap -On startup \fIXquartz\fP translates a Darwin keymapping into an X keymap. -With this option \fIXquartz\fP queries the kernel for the current keymapping -instead of reading it from a file. This will often fail on newer kernels. -.TP 8 -.B "\-depth \fIdepth\fP" -Specifies the color bit depth to use. Currently only 15, and 24 color -bits per pixel are supported. If not specified, defaults to the depth -of the main display. -.SH CUSTOMIZATION -\fIXquartz\fP can also be customized using the defaults(1) command. The available options are: -.TP 8 -.B defaults write com.apple.x11 enable_fake_buttons -boolean true -Equivalent to the \fB-fakebuttons\fP command line option. -.TP 8 -.B defaults write com.apple.x11 fake_button2 \fImodifiers\fP -Equivalent to the \fB-fakemouse2\fP option. -.TP 8 -.B defaults write com.apple.x11 fake_button3 \fImodifiers\fP -Equivalent to the \fB-fakemouse3\fP option. -.TP 8 -.B defaults write com.apple.x11 swap_alt_meta -boolean true -Equivalent to the \fB-swapAltMeta\fP option. -.TP 8 -.B defaults write com.apple.x11 keymap_file \fIfilename\fP -Equivalent to the \fB-keymap\fP option. -.TP 8 -.B defaults write com.apple.x11 no_quit_alert -boolean true -Disables the alert dialog displayed when attempting to quit X11. -.TP 8 -.B defaults write com.apple.x11 no_auth -boolean true -Stops the X server requiring that clients authenticate themselves when -connecting. See Xsecurity(__miscmansuffix__). -.TP 8 -.B defaults write com.apple.x11 nolisten_tcp -boolean true -Prevents the X server accepting remote connections. -.TP 8 -.B defaults write com.apple.x11 xinit_kills_server -boolean false -Stops the X server exiting when the xinitrc script terminates. -.TP 8 -.B defaults write com.apple.x11 fullscreen_hotkeys -boolean false -Allows system hotkeys to be handled while in X11 fullscreen mode. -.TP 8 -.B defaults write com.apple.x11 enable_system_beep -boolean false -Don't use the standard system beep effect for X11 alerts. -.TP 8 -.B defaults write com.apple.x11 enable_key_equivalents -boolean false -Disable menu keyboard equivalents while X11 windows are focused. -.TP 8 -.B defaults write com.apple.x11 depth \fIdepth\fP -Equivalent to the \fB-depth\fP option. -.SH "SEE ALSO" -.PP -X(__miscmansuffix__), XFree86(1), Xserver(1), xdm(1), xinit(1) -.PP -.SH AUTHORS -XFree86 was originally ported to Mac OS X Server by John Carmack. Dave -Zarzycki used this as the basis of his port of XFree86 4.0 to Darwin 1.0. -Torrey T. Lyons improved and integrated this code into the XFree86 -Project's mainline for the 4.0.2 release. -.PP -The following members of the XonX Team contributed to the following -releases (in alphabetical order): -.TP 4 -XFree86 4.1.0: -.br -Rob Braun - Darwin x86 support -.br -Torrey T. Lyons - Project Lead -.br -Andreas Monitzer - Cocoa version of XDarwin front end -.br -Gregory Robert Parker - Original Quartz implementation -.br -Christoph Pfisterer - Dynamic shared X libraries -.br -Toshimitsu Tanaka - Japanese localization -.TP 4 -XFree86 4.2.0: -.br -Rob Braun - Darwin x86 support -.br -Pablo Di Noto - Spanish localization -.br -Paul Edens - Dutch localization -.br -Kyunghwan Kim - Korean localization -.br -Mario Klebsch - Non-US keyboard support -.br -Torrey T. Lyons - Project Lead -.br -Andreas Monitzer - German localization -.br -Patrik Montgomery - Swedish localization -.br -Greg Parker - Rootless support -.br -Toshimitsu Tanaka - Japanese localization -.br -Olivier Verdier - French localization diff --git a/synfig-osx/trunk/launcher/appledri.c b/synfig-osx/trunk/launcher/appledri.c deleted file mode 100644 index 212ac94..0000000 --- a/synfig-osx/trunk/launcher/appledri.c +++ /dev/null @@ -1,349 +0,0 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/xf86dri.c,v 1.10 2000/12/07 20:26:14 dawes Exp $ */ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -Copyright 2000 VA Linux Systems, Inc. -Copyright (c) 2002 Apple Computer, Inc. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * Jens Owen - * Rickard E. (Rik) Faith - * - */ - -#define NEED_REPLIES -#define NEED_EVENTS -#include "X.h" -#include "Xproto.h" -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "colormapst.h" -#include "cursorstr.h" -#include "scrnintstr.h" -#include "servermd.h" -#define _APPLEDRI_SERVER_ -#include "appledristr.h" -#include "swaprep.h" -#include "dri.h" -#include "dri-surface.h" -#include "dristruct.h" -#include "rootless-common.h" -#include "X11Application.h" - -static int DRIErrorBase; - -static DISPATCH_PROC(ProcAppleDRIDispatch); -static DISPATCH_PROC(SProcAppleDRIDispatch); - -static void AppleDRIResetProc(ExtensionEntry* extEntry); - -static unsigned char DRIReqCode = 0; -static int DRIEventBase = 0; - -extern void AppleDRIExtensionInit(void); - -static void SNotifyEvent(xAppleDRINotifyEvent *from, xAppleDRINotifyEvent *to); - -typedef struct _DRIEvent *DRIEventPtr; -typedef struct _DRIEvent { - DRIEventPtr next; - ClientPtr client; - XID clientResource; - unsigned int mask; -} DRIEventRec; - -void -AppleDRIExtensionInit(void) -{ - ExtensionEntry* extEntry; - - if (DRIExtensionInit() && - (extEntry = AddExtension(APPLEDRINAME, - AppleDRINumberEvents, - AppleDRINumberErrors, - ProcAppleDRIDispatch, - SProcAppleDRIDispatch, - AppleDRIResetProc, - StandardMinorOpcode))) { - DRIReqCode = (unsigned char)extEntry->base; - DRIErrorBase = extEntry->errorBase; - DRIEventBase = extEntry->eventBase; - EventSwapVector[DRIEventBase] = (EventSwapPtr) SNotifyEvent; - } -} - -/*ARGSUSED*/ -static void -AppleDRIResetProc ( - ExtensionEntry* extEntry -) -{ - DRIReset(); -} - -static int -ProcAppleDRIQueryVersion( - register ClientPtr client -) -{ - xAppleDRIQueryVersionReply rep; - register int n; - - REQUEST_SIZE_MATCH(xAppleDRIQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.majorVersion = APPLE_DRI_MAJOR_VERSION; - rep.minorVersion = APPLE_DRI_MINOR_VERSION; - rep.patchVersion = APPLE_DRI_PATCH_VERSION; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - } - WriteToClient(client, sizeof(xAppleDRIQueryVersionReply), (char *)&rep); - return (client->noClientException); -} - - -/* surfaces */ - -static int -ProcAppleDRIQueryDirectRenderingCapable( - register ClientPtr client -) -{ - xAppleDRIQueryDirectRenderingCapableReply rep; - Bool isCapable; - - REQUEST(xAppleDRIQueryDirectRenderingCapableReq); - REQUEST_SIZE_MATCH(xAppleDRIQueryDirectRenderingCapableReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - if (!DRIQueryDirectRenderingCapable( screenInfo.screens[stuff->screen], - &isCapable)) { - return BadValue; - } - rep.isCapable = isCapable; - - if (!LocalClient(client)) - rep.isCapable = 0; - - WriteToClient(client, - sizeof(xAppleDRIQueryDirectRenderingCapableReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcAppleDRIAuthConnection( - register ClientPtr client -) -{ - xAppleDRIAuthConnectionReply rep; - - REQUEST(xAppleDRIAuthConnectionReq); - REQUEST_SIZE_MATCH(xAppleDRIAuthConnectionReq); - - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.authenticated = 1; - - if (!DRIAuthConnection( screenInfo.screens[stuff->screen], stuff->magic)) { - ErrorF("Failed to authenticate %u\n", stuff->magic); - rep.authenticated = 0; - } - WriteToClient(client, sizeof(xAppleDRIAuthConnectionReply), (char *)&rep); - return (client->noClientException); -} - -static void surface_notify (void *_arg, void *data) -{ - DRISurfaceNotifyArg *arg = _arg; - int client_index = (int) data; - ClientPtr client; - xAppleDRINotifyEvent se; - - if (client_index < 0 || client_index >= currentMaxClients) - return; - - client = clients[client_index]; - if (client == NULL || client == serverClient || client->clientGone) - return; - - se.type = DRIEventBase + AppleDRISurfaceNotify; - se.kind = arg->kind; - se.arg = arg->id; - se.sequenceNumber = client->sequence; - se.time = currentTime.milliseconds; - WriteEventsToClient (client, 1, (xEvent *) &se); -} - -static int -ProcAppleDRICreateSurface( - ClientPtr client -) -{ - xAppleDRICreateSurfaceReply rep; - DrawablePtr pDrawable; - xp_surface_id sid; - unsigned int key[2]; - - REQUEST(xAppleDRICreateSurfaceReq); - REQUEST_SIZE_MATCH(xAppleDRICreateSurfaceReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - if (!(pDrawable = (DrawablePtr)SecurityLookupDrawable( - (Drawable)stuff->drawable, - client, - SecurityReadAccess))) { - return BadValue; - } - - rep.key_0 = rep.key_1 = rep.uid = 0; - - if (!DRICreateSurface( screenInfo.screens[stuff->screen], - (Drawable)stuff->drawable, pDrawable, - stuff->client_id, &sid, key, - surface_notify, (void *) client->index)) { - return BadValue; - } - - rep.key_0 = key[0]; - rep.key_1 = key[1]; - rep.uid = sid; - - WriteToClient(client, sizeof(xAppleDRICreateSurfaceReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcAppleDRIDestroySurface( - register ClientPtr client -) -{ - REQUEST(xAppleDRIDestroySurfaceReq); - DrawablePtr pDrawable; - REQUEST_SIZE_MATCH(xAppleDRIDestroySurfaceReq); - - if (!(pDrawable = (DrawablePtr)SecurityLookupDrawable( - (Drawable)stuff->drawable, - client, - SecurityReadAccess))) { - return BadValue; - } - - if (!DRIDestroySurface( screenInfo.screens[stuff->screen], - (Drawable)stuff->drawable, - pDrawable, NULL, NULL)) { - return BadValue; - } - - return (client->noClientException); -} - - -/* dispatch */ - -static int -ProcAppleDRIDispatch ( - register ClientPtr client -) -{ - REQUEST(xReq); - - switch (stuff->data) - { - case X_AppleDRIQueryVersion: - return ProcAppleDRIQueryVersion(client); - case X_AppleDRIQueryDirectRenderingCapable: - return ProcAppleDRIQueryDirectRenderingCapable(client); - } - - if (!LocalClient(client)) - return DRIErrorBase + AppleDRIClientNotLocal; - - switch (stuff->data) - { - case X_AppleDRIAuthConnection: - return ProcAppleDRIAuthConnection(client); - case X_AppleDRICreateSurface: - return ProcAppleDRICreateSurface(client); - case X_AppleDRIDestroySurface: - return ProcAppleDRIDestroySurface(client); - default: - return BadRequest; - } -} - -static void -SNotifyEvent(from, to) - xAppleDRINotifyEvent *from, *to; -{ - to->type = from->type; - to->kind = from->kind; - cpswaps (from->sequenceNumber, to->sequenceNumber); - cpswapl (from->time, to->time); - cpswapl (from->arg, to->arg); -} - -static int -SProcAppleDRIQueryVersion( - register ClientPtr client -) -{ - register int n; - REQUEST(xAppleDRIQueryVersionReq); - swaps(&stuff->length, n); - return ProcAppleDRIQueryVersion(client); -} - -static int -SProcAppleDRIDispatch ( - register ClientPtr client -) -{ - REQUEST(xReq); - - /* It is bound to be non-local when there is byte swapping */ - if (!LocalClient(client)) - return DRIErrorBase + AppleDRIClientNotLocal; - - /* only local clients are allowed DRI access */ - switch (stuff->data) - { - case X_AppleDRIQueryVersion: - return SProcAppleDRIQueryVersion(client); - default: - return BadRequest; - } -} diff --git a/synfig-osx/trunk/launcher/applewm-impl.c b/synfig-osx/trunk/launcher/applewm-impl.c deleted file mode 100644 index 941d2b0..0000000 --- a/synfig-osx/trunk/launcher/applewm-impl.c +++ /dev/null @@ -1,656 +0,0 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/xf86dri.c,v 1.10 2000/12/07 20:26:14 dawes Exp $ */ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -Copyright 2000 VA Linux Systems, Inc. -Copyright (c) 2002 Apple Computer, Inc. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -#define NEED_REPLIES -#define NEED_EVENTS -#include "X.h" -#include "Xproto.h" -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "colormapst.h" -#include "cursorstr.h" -#include "scrnintstr.h" -#include "servermd.h" -#define _APPLEWM_SERVER_ -#include "applewmstr.h" -#include "swaprep.h" -#include "rootless-common.h" -#include "X11Application.h" - -static int WMErrorBase; - -static DISPATCH_PROC(ProcAppleWMDispatch); -static DISPATCH_PROC(SProcAppleWMDispatch); - -static void AppleWMResetProc(ExtensionEntry* extEntry); - -static unsigned char WMReqCode = 0; -static int WMEventBase = 0; - -static RESTYPE ClientType, EventType; /* resource types for event masks */ -static XID eventResource; - -/* Currently selected events */ -static unsigned int eventMask = 0; - -extern void AppleWMExtensionInit(void); - -static int WMFreeClient (pointer data, XID id); -static int WMFreeEvents (pointer data, XID id); -static void SNotifyEvent(xAppleWMNotifyEvent *from, xAppleWMNotifyEvent *to); - -typedef struct _WMEvent *WMEventPtr; -typedef struct _WMEvent { - WMEventPtr next; - ClientPtr client; - XID clientResource; - unsigned int mask; -} WMEventRec; - -static inline BoxRec -make_box (int x, int y, int w, int h) -{ - BoxRec r; - r.x1 = x; - r.y1 = y; - r.x2 = x + w; - r.y2 = y + h; - return r; -} - -void -AppleWMExtensionInit(void) -{ - ExtensionEntry* extEntry; - - ClientType = CreateNewResourceType(WMFreeClient); - EventType = CreateNewResourceType(WMFreeEvents); - eventResource = FakeClientID(0); - - if (ClientType && EventType && - (extEntry = AddExtension(APPLEWMNAME, - AppleWMNumberEvents, - AppleWMNumberErrors, - ProcAppleWMDispatch, - SProcAppleWMDispatch, - AppleWMResetProc, - StandardMinorOpcode))) { - WMReqCode = (unsigned char)extEntry->base; - WMErrorBase = extEntry->errorBase; - WMEventBase = extEntry->eventBase; - EventSwapVector[WMEventBase] = (EventSwapPtr) SNotifyEvent; - } -} - -/*ARGSUSED*/ -static void -AppleWMResetProc ( - ExtensionEntry* extEntry -) -{ -} - -static int -ProcAppleWMQueryVersion( - register ClientPtr client -) -{ - xAppleWMQueryVersionReply rep; - register int n; - - REQUEST_SIZE_MATCH(xAppleWMQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.majorVersion = APPLE_WM_MAJOR_VERSION; - rep.minorVersion = APPLE_WM_MINOR_VERSION; - rep.patchVersion = APPLE_WM_PATCH_VERSION; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - } - WriteToClient(client, sizeof(xAppleWMQueryVersionReply), (char *)&rep); - return (client->noClientException); -} - - -/* events */ - -static inline void -updateEventMask (WMEventPtr *pHead) -{ - WMEventPtr pCur; - - eventMask = 0; - for (pCur = *pHead; pCur != NULL; pCur = pCur->next) - eventMask |= pCur->mask; -} - -/*ARGSUSED*/ -static int -WMFreeClient (data, id) - pointer data; - XID id; -{ - WMEventPtr pEvent; - WMEventPtr *pHead, pCur, pPrev; - - pEvent = (WMEventPtr) data; - pHead = (WMEventPtr *) LookupIDByType(eventResource, EventType); - if (pHead) { - pPrev = 0; - for (pCur = *pHead; pCur && pCur != pEvent; pCur=pCur->next) - pPrev = pCur; - if (pCur) - { - if (pPrev) - pPrev->next = pEvent->next; - else - *pHead = pEvent->next; - } - updateEventMask (pHead); - } - xfree ((pointer) pEvent); - return 1; -} - -/*ARGSUSED*/ -static int -WMFreeEvents (data, id) - pointer data; - XID id; -{ - WMEventPtr *pHead, pCur, pNext; - - pHead = (WMEventPtr *) data; - for (pCur = *pHead; pCur; pCur = pNext) { - pNext = pCur->next; - FreeResource (pCur->clientResource, ClientType); - xfree ((pointer) pCur); - } - xfree ((pointer) pHead); - eventMask = 0; - return 1; -} - -static int -ProcAppleWMSelectInput (client) - register ClientPtr client; -{ - REQUEST(xAppleWMSelectInputReq); - WMEventPtr pEvent, pNewEvent, *pHead; - XID clientResource; - - REQUEST_SIZE_MATCH (xAppleWMSelectInputReq); - pHead = (WMEventPtr *)SecurityLookupIDByType(client, - eventResource, EventType, SecurityWriteAccess); - if (stuff->mask != 0) { - if (pHead) { - /* check for existing entry. */ - for (pEvent = *pHead; pEvent; pEvent = pEvent->next) - { - if (pEvent->client == client) - { - pEvent->mask = stuff->mask; - updateEventMask (pHead); - return Success; - } - } - } - - /* build the entry */ - pNewEvent = (WMEventPtr) xalloc (sizeof (WMEventRec)); - if (!pNewEvent) - return BadAlloc; - pNewEvent->next = 0; - pNewEvent->client = client; - pNewEvent->mask = stuff->mask; - /* - * add a resource that will be deleted when - * the client goes away - */ - clientResource = FakeClientID (client->index); - pNewEvent->clientResource = clientResource; - if (!AddResource (clientResource, ClientType, (pointer)pNewEvent)) - return BadAlloc; - /* - * create a resource to contain a pointer to the list - * of clients selecting input. This must be indirect as - * the list may be arbitrarily rearranged which cannot be - * done through the resource database. - */ - if (!pHead) - { - pHead = (WMEventPtr *) xalloc (sizeof (WMEventPtr)); - if (!pHead || - !AddResource (eventResource, EventType, (pointer)pHead)) - { - FreeResource (clientResource, RT_NONE); - return BadAlloc; - } - *pHead = 0; - } - pNewEvent->next = *pHead; - *pHead = pNewEvent; - updateEventMask (pHead); - } else if (stuff->mask == 0) { - /* delete the interest */ - if (pHead) { - pNewEvent = 0; - for (pEvent = *pHead; pEvent; pEvent = pEvent->next) { - if (pEvent->client == client) - break; - pNewEvent = pEvent; - } - if (pEvent) { - FreeResource (pEvent->clientResource, ClientType); - if (pNewEvent) - pNewEvent->next = pEvent->next; - else - *pHead = pEvent->next; - xfree (pEvent); - updateEventMask (pHead); - } - } - } else { - client->errorValue = stuff->mask; - return BadValue; - } - return Success; -} - -/* - * deliver the event - */ - -void -AppleWMSendEvent (type, mask, which, arg) - int type, which, arg; - unsigned int mask; -{ - WMEventPtr *pHead, pEvent; - ClientPtr client; - xAppleWMNotifyEvent se; - - pHead = (WMEventPtr *) LookupIDByType(eventResource, EventType); - if (!pHead) - return; - for (pEvent = *pHead; pEvent; pEvent = pEvent->next) { - client = pEvent->client; - if ((pEvent->mask & mask) == 0 - || client == serverClient || client->clientGone) - { - continue; - } - se.type = type + WMEventBase; - se.kind = which; - se.arg = arg; - se.sequenceNumber = client->sequence; - se.time = currentTime.milliseconds; - WriteEventsToClient (client, 1, (xEvent *) &se); - } -} - -/* Safe to call from any thread. */ -unsigned int -AppleWMSelectedEvents (void) -{ - return eventMask; -} - - -/* general utility functions */ - -static int -ProcAppleWMDisableUpdate( - register ClientPtr client -) -{ - REQUEST_SIZE_MATCH(xAppleWMDisableUpdateReq); - - xp_disable_update (); - - return (client->noClientException); -} - -static int -ProcAppleWMReenableUpdate( - register ClientPtr client -) -{ - REQUEST_SIZE_MATCH(xAppleWMReenableUpdateReq); - - xp_reenable_update (); - - return (client->noClientException); -} - - -/* window functions */ - -static int -ProcAppleWMSetWindowMenu( - register ClientPtr client -) -{ - const char *bytes, **items; - char *shortcuts; - int max_len, nitems, i, j; - REQUEST(xAppleWMSetWindowMenuReq); - - REQUEST_AT_LEAST_SIZE(xAppleWMSetWindowMenuReq); - - nitems = stuff->nitems; - items = alloca (sizeof (char *) * nitems); - shortcuts = alloca (sizeof (char) * nitems); - - max_len = (stuff->length << 2) - sizeof(xAppleWMSetWindowMenuReq); - bytes = (char *) &stuff[1]; - - for (i = j = 0; i < max_len && j < nitems;) - { - shortcuts[j] = bytes[i++]; - items[j++] = bytes + i; - - while (i < max_len) - { - if (bytes[i++] == 0) - break; - } - } - - X11ApplicationSetWindowMenu (nitems, items, shortcuts); - - return (client->noClientException); -} - -static int -ProcAppleWMSetWindowMenuCheck( - register ClientPtr client -) -{ - REQUEST(xAppleWMSetWindowMenuCheckReq); - - REQUEST_SIZE_MATCH(xAppleWMSetWindowMenuCheckReq); - - X11ApplicationSetWindowMenuCheck (stuff->index); - - return (client->noClientException); -} - -static int -ProcAppleWMSetFrontProcess( - register ClientPtr client -) -{ - REQUEST_SIZE_MATCH(xAppleWMSetFrontProcessReq); - - X11ApplicationSetFrontProcess (); - - return (client->noClientException); -} - -static int -ProcAppleWMSetWindowLevel( - register ClientPtr client -) -{ - REQUEST(xAppleWMSetWindowLevelReq); - WindowPtr pWin; - - REQUEST_SIZE_MATCH(xAppleWMSetWindowLevelReq); - - if (!(pWin = SecurityLookupWindow((Drawable)stuff->window, - client, SecurityReadAccess))) { - return BadValue; - } - - if (stuff->level < 0 || stuff->level >= AppleWMNumWindowLevels) { - return BadValue; - } - - RootlessSetWindowLevel (pWin, stuff->level); - - return (client->noClientException); -} - -static int -ProcAppleWMSetCanQuit( - register ClientPtr client -) -{ - REQUEST(xAppleWMSetCanQuitReq); - - REQUEST_SIZE_MATCH(xAppleWMSetCanQuitReq); - - X11ApplicationSetCanQuit (stuff->state); - - return (client->noClientException); -} - - -/* frame functions */ - -static int -ProcAppleWMFrameGetRect( - register ClientPtr client -) -{ - xAppleWMFrameGetRectReply rep; - BoxRec ir, or, rr; - REQUEST(xAppleWMFrameGetRectReq); - - REQUEST_SIZE_MATCH(xAppleWMFrameGetRectReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - ir = make_box (stuff->ix, stuff->iy, stuff->iw, stuff->ih); - or = make_box (stuff->ox, stuff->oy, stuff->ow, stuff->oh); - - if (xp_frame_get_rect (stuff->frame_rect, - stuff->frame_class, - &or, &ir, &rr) != Success) { - return BadValue; - } - - rep.x = rr.x1; - rep.y = rr.y1; - rep.w = rr.x2 - rr.x1; - rep.h = rr.y2 - rr.y1; - - WriteToClient(client, sizeof(xAppleWMFrameGetRectReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcAppleWMFrameHitTest( - register ClientPtr client -) -{ - xAppleWMFrameHitTestReply rep; - BoxRec ir, or; - int ret; - REQUEST(xAppleWMFrameHitTestReq); - - REQUEST_SIZE_MATCH(xAppleWMFrameHitTestReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - ir = make_box (stuff->ix, stuff->iy, stuff->iw, stuff->ih); - or = make_box (stuff->ox, stuff->oy, stuff->ow, stuff->oh); - - if (xp_frame_hit_test (stuff->frame_class, stuff->px, - stuff->py, &or, &ir, &ret) != Success) - { - return BadValue; - } - - rep.ret = ret; - - WriteToClient(client, sizeof(xAppleWMFrameHitTestReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcAppleWMFrameDraw( - register ClientPtr client -) -{ - BoxRec ir, or; - unsigned int title_length, title_max; - unsigned char *title_bytes; - REQUEST(xAppleWMFrameDrawReq); - WindowPtr pWin; - xp_window_id wid; - - REQUEST_AT_LEAST_SIZE(xAppleWMFrameDrawReq); - - if (!(pWin = SecurityLookupWindow((Drawable)stuff->window, - client, SecurityReadAccess))) { - return BadValue; - } - - ir = make_box (stuff->ix, stuff->iy, stuff->iw, stuff->ih); - or = make_box (stuff->ox, stuff->oy, stuff->ow, stuff->oh); - - title_length = stuff->title_length; - title_max = (stuff->length << 2) - sizeof(xAppleWMFrameDrawReq); - - if (title_max < title_length) - return BadValue; - - title_bytes = (unsigned char *) &stuff[1]; - - wid = RootlessGetPhysicalWindow (pWin, FALSE); - if (wid == 0) - return BadWindow; - - if (xp_frame_draw (wid, stuff->frame_class, - stuff->frame_attr, &or, &ir, - title_length, title_bytes) != Success) { - return BadValue; - } - - return (client->noClientException); -} - - -/* dispatch */ - -static int -ProcAppleWMDispatch ( - register ClientPtr client -) -{ - REQUEST(xReq); - - switch (stuff->data) - { - case X_AppleWMQueryVersion: - return ProcAppleWMQueryVersion(client); - } - - if (!LocalClient(client)) - return WMErrorBase + AppleWMClientNotLocal; - - switch (stuff->data) - { - case X_AppleWMSelectInput: - return ProcAppleWMSelectInput(client); - case X_AppleWMDisableUpdate: - return ProcAppleWMDisableUpdate(client); - case X_AppleWMReenableUpdate: - return ProcAppleWMReenableUpdate(client); - case X_AppleWMSetWindowMenu: - return ProcAppleWMSetWindowMenu(client); - case X_AppleWMSetWindowMenuCheck: - return ProcAppleWMSetWindowMenuCheck(client); - case X_AppleWMSetFrontProcess: - return ProcAppleWMSetFrontProcess(client); - case X_AppleWMSetWindowLevel: - return ProcAppleWMSetWindowLevel(client); - case X_AppleWMSetCanQuit: - return ProcAppleWMSetCanQuit(client); - case X_AppleWMFrameGetRect: - return ProcAppleWMFrameGetRect(client); - case X_AppleWMFrameHitTest: - return ProcAppleWMFrameHitTest(client); - case X_AppleWMFrameDraw: - return ProcAppleWMFrameDraw(client); - default: - return BadRequest; - } -} - -static void -SNotifyEvent(from, to) - xAppleWMNotifyEvent *from, *to; -{ - to->type = from->type; - to->kind = from->kind; - cpswaps (from->sequenceNumber, to->sequenceNumber); - cpswapl (from->time, to->time); - cpswapl (from->arg, to->arg); -} - -static int -SProcAppleWMQueryVersion( - register ClientPtr client -) -{ - register int n; - REQUEST(xAppleWMQueryVersionReq); - swaps(&stuff->length, n); - return ProcAppleWMQueryVersion(client); -} - -static int -SProcAppleWMDispatch ( - register ClientPtr client -) -{ - REQUEST(xReq); - - /* It is bound to be non-local when there is byte swapping */ - if (!LocalClient(client)) - return WMErrorBase + AppleWMClientNotLocal; - - /* only local clients are allowed WM access */ - switch (stuff->data) - { - case X_AppleWMQueryVersion: - return SProcAppleWMQueryVersion(client); - default: - return BadRequest; - } -} diff --git a/synfig-osx/trunk/launcher/applewm.c b/synfig-osx/trunk/launcher/applewm.c deleted file mode 100644 index e79a5d6..0000000 --- a/synfig-osx/trunk/launcher/applewm.c +++ /dev/null @@ -1,529 +0,0 @@ -/* $XFree86: xc/lib/GL/dri/XF86dri.c,v 1.12 2001/08/27 17:40:57 dawes Exp $ */ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -Copyright 2000 VA Linux Systems, Inc. -Copyright (c) 2002 Apple Computer, Inc. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#define NEED_EVENTS -#define NEED_REPLIES -#include -#include "applewmstr.h" -#include -#include "extutil.h" -#include - -static XExtensionInfo _applewm_info_data; -static XExtensionInfo *applewm_info = &_applewm_info_data; -static char *applewm_extension_name = APPLEWMNAME; - -#define AppleWMCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, applewm_extension_name, val) - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -static int close_display(Display *dpy, XExtCodes *extCodes); -static Bool wire_to_event(); -static Status event_to_wire(); - -static /* const */ XExtensionHooks applewm_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - wire_to_event, /* wire_to_event */ - event_to_wire, /* event_to_wire */ - NULL, /* error */ - NULL, /* error_string */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, applewm_info, - applewm_extension_name, - &applewm_extension_hooks, - AppleWMNumberEvents, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, applewm_info) - -static Bool wire_to_event (dpy, re, event) - Display *dpy; - XEvent *re; - xEvent *event; -{ - XExtDisplayInfo *info = find_display (dpy); - XAppleWMNotifyEvent *se; - xAppleWMNotifyEvent *sevent; - - AppleWMCheckExtension (dpy, info, False); - - switch ((event->u.u.type & 0x7f) - info->codes->first_event) { - case AppleWMControllerNotify: - case AppleWMActivationNotify: - case AppleWMPasteboardNotify: - se = (XAppleWMNotifyEvent *) re; - sevent = (xAppleWMNotifyEvent *) event; - se->type = sevent->type & 0x7f; - se->serial = _XSetLastRequestRead(dpy,(xGenericReply *) event); - se->send_event = (sevent->type & 0x80) != 0; - se->display = dpy; - se->window = 0; - se->time = sevent->time; - se->kind = sevent->kind; - se->arg = sevent->arg; - return True; - } - return False; -} - -static Status event_to_wire (dpy, re, event) - Display *dpy; - XEvent *re; - xEvent *event; -{ - XExtDisplayInfo *info = find_display (dpy); - XAppleWMNotifyEvent *se; - xAppleWMNotifyEvent *sevent; - - AppleWMCheckExtension (dpy, info, False); - - switch ((re->type & 0x7f) - info->codes->first_event) { - case AppleWMControllerNotify: - case AppleWMActivationNotify: - case AppleWMPasteboardNotify: - se = (XAppleWMNotifyEvent *) re; - sevent = (xAppleWMNotifyEvent *) event; - sevent->type = se->type | (se->send_event ? 0x80 : 0); - sevent->sequenceNumber = se->serial & 0xffff; - sevent->kind = se->kind; - sevent->arg = se->arg; - sevent->time = se->time; - return 1; - } - return 0; -} - -/***************************************************************************** - * * - * public Apple-WM Extension routines * - * * - *****************************************************************************/ - -#if 0 -#include -#define TRACE(msg) fprintf(stderr, "AppleWM%s\n", msg); -#else -#define TRACE(msg) -#endif - - -Bool XAppleWMQueryExtension (dpy, event_basep, error_basep) - Display *dpy; - int *event_basep, *error_basep; -{ - XExtDisplayInfo *info = find_display (dpy); - - TRACE("QueryExtension..."); - if (XextHasExtension(info)) { - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - TRACE("QueryExtension... return True"); - return True; - } else { - TRACE("QueryExtension... return False"); - return False; - } -} - -Bool XAppleWMQueryVersion(dpy, majorVersion, minorVersion, patchVersion) - Display* dpy; - int* majorVersion; - int* minorVersion; - int* patchVersion; -{ - XExtDisplayInfo *info = find_display (dpy); - xAppleWMQueryVersionReply rep; - xAppleWMQueryVersionReq *req; - - TRACE("QueryVersion..."); - AppleWMCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(AppleWMQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->wmReqType = X_AppleWMQueryVersion; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("QueryVersion... return False"); - return False; - } - *majorVersion = rep.majorVersion; - *minorVersion = rep.minorVersion; - *patchVersion = rep.patchVersion; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("QueryVersion... return True"); - return True; -} - -Bool XAppleWMDisableUpdate(dpy, screen) - Display* dpy; - int screen; -{ - XExtDisplayInfo *info = find_display (dpy); - xAppleWMDisableUpdateReq *req; - - TRACE("DisableUpdate..."); - AppleWMCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(AppleWMDisableUpdate, req); - req->reqType = info->codes->major_opcode; - req->wmReqType = X_AppleWMDisableUpdate; - req->screen = screen; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("DisableUpdate... return True"); - return True; -} - -Bool XAppleWMReenableUpdate(dpy, screen) - Display* dpy; - int screen; -{ - XExtDisplayInfo *info = find_display (dpy); - xAppleWMReenableUpdateReq *req; - - TRACE("ReenableUpdate..."); - AppleWMCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(AppleWMReenableUpdate, req); - req->reqType = info->codes->major_opcode; - req->wmReqType = X_AppleWMReenableUpdate; - req->screen = screen; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("ReenableUpdate... return True"); - return True; -} - -Bool XAppleWMSelectInput(dpy, mask) - Display* dpy; - unsigned long mask; -{ - XExtDisplayInfo *info = find_display (dpy); - xAppleWMSelectInputReq *req; - - TRACE("SelectInput..."); - AppleWMCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(AppleWMSelectInput, req); - req->reqType = info->codes->major_opcode; - req->wmReqType = X_AppleWMSelectInput; - req->mask = mask; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("SetlectInput... return True"); - return True; -} - -Bool XAppleWMSetWindowMenuWithShortcuts(dpy, nitems, items, shortcuts) - Display* dpy; - int nitems; - const char **items; - const char *shortcuts; -{ - XExtDisplayInfo *info = find_display (dpy); - xAppleWMSetWindowMenuReq *req; - int i, total_length, len; - char *buf, *ptr; - - TRACE("SetWindowMenu..."); - AppleWMCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(AppleWMSetWindowMenu, req); - req->reqType = info->codes->major_opcode; - req->wmReqType = X_AppleWMSetWindowMenu; - req->nitems = nitems; - - total_length = 0; - for (i = 0; i < nitems; i++) - total_length += strlen (items[i]) + 2; - - ptr = buf = alloca (total_length); - for (i = 0; i < nitems; i++) - { - len = strlen (items[i]); - *ptr++ = shortcuts ? shortcuts[i] : 0; - memcpy (ptr, items[i], len); - ptr[len] = 0; - ptr += len + 1; - } - - req->length += (total_length + 3) >> 2; - Data (dpy, buf, total_length); - - UnlockDisplay(dpy); - SyncHandle(); - TRACE("SetlectInput... return True"); - return True; -} - -Bool XAppleWMSetWindowMenu(dpy, nitems, items) - Display* dpy; - int nitems; - const char **items; -{ - return XAppleWMSetWindowMenuWithShortcuts (dpy, nitems, items, NULL); -} - -Bool XAppleWMSetWindowMenuCheck(dpy, idx) - Display* dpy; - int idx; -{ - XExtDisplayInfo *info = find_display (dpy); - xAppleWMSetWindowMenuCheckReq *req; - - TRACE("SetWindowMenuCheck..."); - AppleWMCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(AppleWMSetWindowMenuCheck, req); - req->reqType = info->codes->major_opcode; - req->wmReqType = X_AppleWMSetWindowMenuCheck; - req->index = idx; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("SetWindowMenuCheck... return True"); - return True; -} - -Bool XAppleWMSetFrontProcess(dpy) - Display* dpy; -{ - XExtDisplayInfo *info = find_display (dpy); - xAppleWMSetFrontProcessReq *req; - - TRACE("SetFrontProcess..."); - AppleWMCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(AppleWMSetFrontProcess, req); - req->reqType = info->codes->major_opcode; - req->wmReqType = X_AppleWMSetFrontProcess; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("SetFrontProcess... return True"); - return True; -} - -Bool XAppleWMSetWindowLevel(dpy, id, level) - Display* dpy; - Window id; - int level; -{ - XExtDisplayInfo *info = find_display (dpy); - xAppleWMSetWindowLevelReq *req; - - TRACE("SetWindowLevel..."); - AppleWMCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(AppleWMSetWindowLevel, req); - req->reqType = info->codes->major_opcode; - req->wmReqType = X_AppleWMSetWindowLevel; - req->window = id; - req->level = level; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("SetWindowLevel... return True"); - return True; -} - -Bool XAppleWMSetCanQuit(dpy, state) - Display* dpy; - Bool state; -{ - XExtDisplayInfo *info = find_display (dpy); - xAppleWMSetCanQuitReq *req; - - TRACE("SetCanQuit..."); - AppleWMCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(AppleWMSetCanQuit, req); - req->reqType = info->codes->major_opcode; - req->wmReqType = X_AppleWMSetCanQuit; - req->state = state; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("SetCanQuit... return True"); - return True; -} - -Bool XAppleWMFrameGetRect(dpy, frame_class, frame_rect, - ix, iy, iw, ih, ox, oy, ow, oh, rx, ry, rw, rh) - Display* dpy; - unsigned int frame_class, frame_rect; - short ix, iy, iw, ih; - short ox, oy, ow, oh; - short *rx, *ry, *rw, *rh; -{ - XExtDisplayInfo *info = find_display (dpy); - xAppleWMFrameGetRectReply rep; - xAppleWMFrameGetRectReq *req; - - TRACE("FrameGetRect..."); - AppleWMCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(AppleWMFrameGetRect, req); - req->reqType = info->codes->major_opcode; - req->wmReqType = X_AppleWMFrameGetRect; - req->frame_class = frame_class; - req->frame_rect = frame_rect; - req->ix = ix; - req->iy = iy; - req->iw = iw; - req->ih = ih; - req->ox = ox; - req->oy = oy; - req->ow = ow; - req->oh = oh; - rep.x = rep.y = rep.w = rep.h = 0; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("FrameGetRect... return False"); - return False; - } - *rx = rep.x; *ry = rep.y; - *rw = rep.w; *rh = rep.h; - UnlockDisplay(dpy); - SyncHandle(); - TRACE("FrameGetRect... return True"); - return True; -} - -unsigned int XAppleWMFrameHitTest(dpy, frame_class, px, py, - ix, iy, iw, ih, ox, oy, ow, oh) - Display* dpy; - unsigned int frame_class; - short px, py; - short ix, iy, iw, ih; - short ox, oy, ow, oh; -{ - XExtDisplayInfo *info = find_display (dpy); - xAppleWMFrameHitTestReply rep; - xAppleWMFrameHitTestReq *req; - - TRACE("FrameHitTest..."); - AppleWMCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(AppleWMFrameHitTest, req); - req->reqType = info->codes->major_opcode; - req->wmReqType = X_AppleWMFrameHitTest; - req->frame_class = frame_class; - req->px = px; - req->py = py; - req->ix = ix; - req->iy = iy; - req->iw = iw; - req->ih = ih; - req->ox = ox; - req->oy = oy; - req->ow = ow; - req->oh = oh; - rep.ret = 0; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - TRACE("FrameHitTest... return False"); - return False; - } - UnlockDisplay(dpy); - SyncHandle(); - TRACE("FrameHiTest... return True"); - return rep.ret; -} - -Bool XAppleWMFrameDraw(dpy, screen, window, - frame_class, frame_attr, - ix, iy, iw, ih, ox, oy, ow, oh, - title_length, title_bytes) - Display* dpy; - int screen; - Window window; - unsigned int frame_class, frame_attr; - short ix, iy, iw, ih; - short ox, oy, ow, oh; - unsigned int title_length; - const unsigned char *title_bytes; -{ - XExtDisplayInfo *info = find_display (dpy); - xAppleWMFrameDrawReq *req; - - TRACE("FrameDraw..."); - AppleWMCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(AppleWMFrameDraw, req); - req->reqType = info->codes->major_opcode; - req->wmReqType = X_AppleWMFrameDraw; - req->screen = screen; - req->window = window; - req->frame_class = frame_class; - req->frame_attr = frame_attr; - req->ix = ix; - req->iy = iy; - req->iw = iw; - req->ih = ih; - req->ox = ox; - req->oy = oy; - req->ow = ow; - req->oh = oh; - req->title_length = title_length; - - req->length += (title_length + 3)>>2; - Data (dpy, title_bytes, title_length); - - UnlockDisplay(dpy); - SyncHandle(); - TRACE("FrameDraw... return True"); - return True; -} diff --git a/synfig-osx/trunk/launcher/applewm.h b/synfig-osx/trunk/launcher/applewm.h deleted file mode 100644 index 43a12bc..0000000 --- a/synfig-osx/trunk/launcher/applewm.h +++ /dev/null @@ -1,160 +0,0 @@ -/* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.7 2000/12/07 20:26:02 dawes Exp $ */ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -Copyright 2000 VA Linux Systems, Inc. -Copyright (c) 2002 Apple Computer, Inc. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -#ifndef _APPLEWM_H_ -#define _APPLEWM_H_ - -#include - -#define X_AppleWMQueryVersion 0 -#define X_AppleWMFrameGetRect 1 -#define X_AppleWMFrameHitTest 2 -#define X_AppleWMFrameDraw 3 -#define X_AppleWMDisableUpdate 4 -#define X_AppleWMReenableUpdate 5 -#define X_AppleWMSelectInput 6 -#define X_AppleWMSetWindowMenuCheck 7 -#define X_AppleWMSetFrontProcess 8 -#define X_AppleWMSetWindowLevel 9 -#define X_AppleWMSetCanQuit 10 -#define X_AppleWMSetWindowMenu 11 - -/* Events */ -#define AppleWMControllerNotify 0 -#define AppleWMActivationNotify 1 -#define AppleWMPasteboardNotify 2 -#define AppleWMNumberEvents 3 - -#define AppleWMControllerNotifyMask (1L << 0) -#define AppleWMActivationNotifyMask (1L << 1) -#define AppleWMPasteboardNotifyMask (1L << 2) - -/* "Kinds" of ControllerNotify events */ -#define AppleWMMinimizeWindow 0 -#define AppleWMZoomWindow 1 -#define AppleWMCloseWindow 2 -#define AppleWMBringAllToFront 3 -#define AppleWMHideWindow 4 -#define AppleWMHideAll 5 -#define AppleWMShowAll 6 -#define AppleWMWindowMenuItem 9 -#define AppleWMWindowMenuNotify 10 -#define AppleWMNextWindow 11 -#define AppleWMPreviousWindow 12 - -/* "Kinds" of ActivationNotify events */ -#define AppleWMIsActive 0 -#define AppleWMIsInactive 1 - -/* "Kinds" of PasteboardNotify events */ -#define AppleWMCopyToPasteboard 0 - -/* Errors */ -#define AppleWMClientNotLocal 0 -#define AppleWMOperationNotSupported 1 -#define AppleWMNumberErrors (AppleWMOperationNotSupported + 1) - -/* Window level ids */ -#define AppleWMWindowLevelNormal 0 -#define AppleWMWindowLevelFloating 1 -#define AppleWMWindowLevelTornOff 2 -#define AppleWMWindowLevelDock 3 -#define AppleWMWindowLevelDesktop 4 -#define AppleWMNumWindowLevels 5 - -#ifndef _APPLEWM_SERVER_ - -typedef struct { - int type; /* of event */ - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came from a SendEvent request */ - Display *display; /* Display the event was read from */ - Window window; /* window of event */ - Time time; /* server timestamp when event happened */ - int kind; /* subtype of event */ - int arg; -} XAppleWMNotifyEvent; - -_XFUNCPROTOBEGIN - -Bool XAppleWMQueryExtension (Display *dpy, int *event_base, int *error_base); - -Bool XAppleWMQueryVersion (Display *dpy, int *majorVersion, - int *minorVersion, int *patchVersion); - -Bool XAppleWMDisableUpdate (Display *dpy, int screen); - -Bool XAppleWMReenableUpdate (Display *dpy, int screen); - -Bool XAppleWMSelectInput (Display *dpy, unsigned long mask); - -Bool XAppleWMSetWindowMenu (Display *dpy, int nitems, const char **items); -Bool XAppleWMSetWindowMenuWithShortcuts (Display *dpy, int nitems, - const char **items, - const char *shortcuts); - -Bool XAppleWMSetWindowMenuCheck (Display *dpy, int index); - -Bool XAppleWMSetFrontProcess (Display *dpy); - -Bool XAppleWMSetWindowLevel (Display *dpy, Window id, int level); - -Bool XAppleWMSetCanQuit (Display *dpy, Bool state); - -Bool XAppleWMFrameGetRect (Display *dpy, - unsigned int frame_class, unsigned int frame_rect, - short inner_x, short inner_y, - short inner_w, short inner_h, - short outer_x, short outer_y, - short outer_w, short outer_h, - short *ret_x, short *ret_y, - short *ret_w, short *ret_h); - -unsigned int XAppleWMFrameHitTest (Display *dpy, - unsigned int frame_class, - short point_x, short point_y, - short inner_x, short inner_y, - short inner_w, short inner_h, - short outer_x, short outer_y, - short outer_w, short outer_h); - -Bool XAppleWMFrameDraw (Display *dpy, int screen, Window window, - unsigned int frame_class, unsigned int frame_attr, - short inner_x, short inner_y, - short inner_w, short inner_h, - short outer_x, short outer_y, - short outer_w, short outer_h, - unsigned int title_length, - const unsigned char * title_bytes); - -_XFUNCPROTOEND - -#endif /* _APPLEWM_SERVER_ */ -#endif /* _APPLEWM_H_ */ diff --git a/synfig-osx/trunk/launcher/applewmstr.h b/synfig-osx/trunk/launcher/applewmstr.h deleted file mode 100644 index 90f4345..0000000 --- a/synfig-osx/trunk/launcher/applewmstr.h +++ /dev/null @@ -1,333 +0,0 @@ -/* $XFree86: xc/lib/GL/dri/xf86dristr.h,v 1.9 2001/03/21 16:01:08 dawes Exp $ */ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -Copyright 2000 VA Linux Systems, Inc. -Copyright (c) 2002 Apple Computer, Inc. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin - * Jens Owen - * Rickard E. (Rik) Fiath - * - */ - -#ifndef _APPLEWMSTR_H_ -#define _APPLEWMSTR_H_ - -#include "applewm.h" - -#define APPLEWMNAME "Apple-WM" - -#define APPLE_WM_MAJOR_VERSION 1 /* current version numbers */ -#define APPLE_WM_MINOR_VERSION 0 -#define APPLE_WM_PATCH_VERSION 0 - -typedef struct _AppleWMQueryVersion { - CARD8 reqType; /* always WMReqCode */ - CARD8 wmReqType; /* always X_WMQueryVersion */ - CARD16 length B16; -} xAppleWMQueryVersionReq; -#define sz_xAppleWMQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of WM protocol */ - CARD16 minorVersion B16; /* minor version of WM protocol */ - CARD32 patchVersion B32; /* patch version of WM protocol */ - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xAppleWMQueryVersionReply; -#define sz_xAppleWMQueryVersionReply 32 - -typedef struct _AppleWMQueryDirectRenderingCapable { - CARD8 reqType; /* always WMReqCode */ - CARD8 wmReqType; /* X_WMQueryDirectRenderingCapable */ - CARD16 length B16; - CARD32 screen B32; -} xAppleWMQueryDirectRenderingCapableReq; -#define sz_xAppleWMQueryDirectRenderingCapableReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - BOOL isCapable; - BOOL pad2; - BOOL pad3; - BOOL pad4; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; - CARD32 pad8 B32; - CARD32 pad9 B32; -} xAppleDRIQueryDirectRenderingCapableReply; -#define sz_xAppleWMQueryDirectRenderingCapableReply 32 - -typedef struct _AppleWMAuthConnection { - CARD8 reqType; /* always WMReqCode */ - CARD8 wmReqType; /* always X_WMCloseConnection */ - CARD16 length B16; - CARD32 screen B32; - CARD32 magic B32; -} xAppleWMAuthConnectionReq; -#define sz_xAppleWMAuthConnectionReq 12 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 authenticated B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xAppleWMAuthConnectionReply; -#define zx_xAppleWMAuthConnectionReply 32 - -typedef struct _AppleWMCreateSurface { - CARD8 reqType; /* always WMReqCode */ - CARD8 wmReqType; /* always X_WMCreateSurface */ - CARD16 length B16; - CARD32 screen B32; - CARD32 drawable B32; - CARD32 client_id B32; -} xAppleWMCreateSurfaceReq; -#define sz_xAppleWMCreateSurfaceReq 16 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 key_0 B32; - CARD32 key_1 B32; - CARD32 uid B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xAppleWMCreateSurfaceReply; -#define sz_xAppleWMCreateSurfaceReply 32 - -typedef struct _AppleWMDestroySurface { - CARD8 reqType; /* always WMReqCode */ - CARD8 wmReqType; /* always X_WMDestroySurface */ - CARD16 length B16; - CARD32 screen B32; - CARD32 drawable B32; -} xAppleWMDestroySurfaceReq; -#define sz_xAppleWMDestroySurfaceReq 12 - -typedef struct _AppleWMDisableUpdate { - CARD8 reqType; /* always WMReqCode */ - CARD8 wmReqType; /* always X_WMDisableUpdate */ - CARD16 length B16; - CARD32 screen B32; -} xAppleWMDisableUpdateReq; -#define sz_xAppleWMDisableUpdateReq 8 - -typedef struct _AppleWMReenableUpdate { - CARD8 reqType; /* always WMReqCode */ - CARD8 wmReqType; /* always X_WMReenableUpdate */ - CARD16 length B16; - CARD32 screen B32; -} xAppleWMReenableUpdateReq; -#define sz_xAppleWMReenableUpdateReq 8 - -typedef struct _AppleWMSelectInput { - CARD8 reqType; /* always WMReqCode */ - CARD8 wmReqType; /* always X_WMSelectInput */ - CARD16 length B16; - CARD32 mask B32; -} xAppleWMSelectInputReq; -#define sz_xAppleWMSelectInputReq 8 - -typedef struct _AppleWMNotify { - BYTE type; /* always eventBase + event type */ - BYTE kind; - CARD16 sequenceNumber B16; - Time time B32; /* time of change */ - CARD16 pad1 B16; - CARD32 arg B32; - CARD32 pad3 B32; -} xAppleWMNotifyEvent; -#define sz_xAppleWMNotifyEvent 20 - -typedef struct _AppleWMSetWindowMenu { - CARD8 reqType; /* always WMReqCode */ - CARD8 wmReqType; /* always X_WMSetWindowMenu */ - CARD16 length B16; - CARD16 nitems B16; - CARD16 pad1 B16; -} xAppleWMSetWindowMenuReq; -#define sz_xAppleWMSetWindowMenuReq 8 - -typedef struct _AppleWMSetWindowMenuCheck { - CARD8 reqType; /* always WMReqCode */ - CARD8 wmReqType; /* always X_WMSetWindowMenuCheck */ - CARD16 length B16; - CARD32 index; -} xAppleWMSetWindowMenuCheckReq; -#define sz_xAppleWMSetWindowMenuCheckReq 8 - -typedef struct _AppleWMSetFrontProcess { - CARD8 reqType; /* always WMReqCode */ - CARD8 wmReqType; /* always X_WMSetFrontProcess */ - CARD16 length B16; -} xAppleWMSetFrontProcessReq; -#define sz_xAppleWMSetFrontProcessReq 4 - -typedef struct _AppleWMSetWindowLevel { - CARD8 reqType; /* always WMReqCode */ - CARD8 wmReqType; /* always X_WMSetWindowLevel */ - CARD16 length B16; - CARD32 window; - CARD32 level; -} xAppleWMSetWindowLevelReq; -#define sz_xAppleWMSetWindowLevelReq 12 - -typedef struct _AppleWMSetCanQuit { - CARD8 reqType; /* always WMReqCode */ - CARD8 wmReqType; /* always X_WMSetCanQuit */ - CARD16 length B16; - CARD32 state; -} xAppleWMSetCanQuitReq; -#define sz_xAppleWMSetCanQuitReq 8 - -typedef struct _AppleWMFrameGetRect { - CARD8 reqType; /* always WMReqCode */ - CARD8 wmReqType; /* always X_WMFrameGetRect */ - CARD16 length B16; - CARD16 frame_class B16; - CARD16 frame_rect B16; - CARD16 ix B16; - CARD16 iy B16; - CARD16 iw B16; - CARD16 ih B16; - CARD16 ox B16; - CARD16 oy B16; - CARD16 ow B16; - CARD16 oh B16; -} xAppleWMFrameGetRectReq; -#define sz_xAppleWMFrameGetRectReq 24 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 x B16; - CARD16 y B16; - CARD16 w B16; - CARD16 h B16; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xAppleWMFrameGetRectReply; -#define sz_xAppleWMFrameGetRectReply 32 - -typedef struct _AppleWMFrameHitTest { - CARD8 reqType; /* always WMReqCode */ - CARD8 wmReqType; /* always X_WMFrameHitTest */ - CARD16 length B16; - CARD16 frame_class B16; - CARD16 pad1 B16; - CARD16 px B16; - CARD16 py B16; - CARD16 ix B16; - CARD16 iy B16; - CARD16 iw B16; - CARD16 ih B16; - CARD16 ox B16; - CARD16 oy B16; - CARD16 ow B16; - CARD16 oh B16; -} xAppleWMFrameHitTestReq; -#define sz_xAppleWMFrameHitTestReq 28 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 ret B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xAppleWMFrameHitTestReply; -#define sz_xAppleWMFrameHitTestReply 32 - -typedef struct _AppleWMFrameDraw { - CARD8 reqType; /* always WMReqCode */ - CARD8 wmReqType; /* always X_WMFrameDraw */ - CARD16 length B16; - CARD32 screen B32; - CARD32 window B32; - CARD16 frame_class B16; - CARD16 frame_attr B16; - CARD16 ix B16; - CARD16 iy B16; - CARD16 iw B16; - CARD16 ih B16; - CARD16 ox B16; - CARD16 oy B16; - CARD16 ow B16; - CARD16 oh B16; - CARD32 title_length B32; -} xAppleWMFrameDrawReq; -#define sz_xAppleWMFrameDrawReq 36 - -#ifdef _APPLEWM_SERVER_ - -void AppleWMSendEvent ( -#if NeedFunctionPrototypes - int /* type */, - unsigned int /* mask */, - int /* which */, - int /* arg */ -#endif -); - -unsigned int AppleWMSelectedEvents ( -#if NeedFunctionPrototypes - void -#endif -); - -#endif /* _APPLEWM_SERVER_ */ -#endif /* _APPLEWMSTR_H_ */ diff --git a/synfig-osx/trunk/launcher/bundle-main.c b/synfig-osx/trunk/launcher/bundle-main.c deleted file mode 100644 index 2e0add2..0000000 --- a/synfig-osx/trunk/launcher/bundle-main.c +++ /dev/null @@ -1,908 +0,0 @@ -/* bundle-main.c -- X server launcher - $Id: bundle-main.c,v 1.17 2003/09/11 00:17:10 jharper Exp $ - - Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. - - Parts of this file are derived from xdm, which has this copyright: - - Copyright 1988, 1998 The Open Group - - Permission to use, copy, modify, distribute, and sell this software - and its documentation for any purpose is hereby granted without fee, - provided that the above copyright notice appear in all copies and - that both that copyright notice and this permission notice appear in - supporting documentation. - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name of The Open Group shall - not be used in advertising or otherwise to promote the sale, use or - other dealings in this Software without prior written authorization - from The Open Group. */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#define X_SERVER "/usr/X11R6/bin/Xquartz" -#define XTERM_PATH "/usr/X11R6/bin/xterm" -#define WM_PATH "/usr/X11R6/bin/quartz-wm" -#define DEFAULT_XINITRC "/usr/X11R6/lib/X11/xinit/xinitrc" -#include - -/* what xinit does */ -#ifndef SHELL -# define SHELL "sh" -#endif - -#undef FALSE -#define FALSE 0 -#undef TRUE -#define TRUE 1 - -#define MAX_DISPLAYS 64 - -static int server_pid = -1, client_pid = -1; -static int xinit_kills_server = FALSE; -static jmp_buf exit_continuation; -static const char *server_name = NULL; -static Display *server_dpy; - -static char *auth_file; - -typedef struct addr_list_struct addr_list; - -struct addr_list_struct { - addr_list *next; - Xauth auth; -}; - -static addr_list *addresses; - - -/* Utility functions. */ - -/* Return the current host name. Matches what Xlib does. */ -static char * -host_name (void) -{ -#ifdef NEED_UTSNAME - static struct utsname name; - - uname(&name); - - return name.nodename; -#else - static char buf[100]; - - gethostname(buf, sizeof(buf)); - - return buf; -#endif -} - -static int -read_boolean_pref (CFStringRef name, int default_) -{ - int value; - Boolean ok; - - value = CFPreferencesGetAppBooleanValue (name, - CFSTR ("com.apple.x11"), &ok); - return ok ? value : default_; -} - -static inline int -binary_equal (const void *a, const void *b, int length) -{ - return memcmp (a, b, length) == 0; -} - -static inline void * -binary_dup (const void *a, int length) -{ - void *b = malloc (length); - if (b != NULL) - memcpy (b, a, length); - return b; -} - -static inline void -binary_free (void *data, int length) -{ - if (data != NULL) - free (data); -} - - -/* Functions for managing the authentication entries. */ - -/* Returns true if something matching AUTH is in our list of auth items */ -static int -check_auth_item (Xauth *auth) -{ - addr_list *a; - - for (a = addresses; a != NULL; a = a->next) - { - if (a->auth.family == auth->family - && a->auth.address_length == auth->address_length - && binary_equal (a->auth.address, auth->address, auth->address_length) - && a->auth.number_length == auth->number_length - && binary_equal (a->auth.number, auth->number, auth->number_length) - && a->auth.name_length == auth->name_length - && binary_equal (a->auth.name, auth->name, auth->name_length)) - { - return TRUE; - } - } - - return FALSE; -} - -/* Add one item to our list of auth items. */ -static void -add_auth_item (Xauth *auth) -{ - addr_list *a = malloc (sizeof (addr_list)); - - a->auth.family = auth->family; - a->auth.address_length = auth->address_length; - a->auth.address = binary_dup (auth->address, auth->address_length); - a->auth.number_length = auth->number_length; - a->auth.number = binary_dup (auth->number, auth->number_length); - a->auth.name_length = auth->name_length; - a->auth.name = binary_dup (auth->name, auth->name_length); - a->auth.data_length = auth->data_length; - a->auth.data = binary_dup (auth->data, auth->data_length); - - a->next = addresses; - addresses = a; -} - -/* Free all allocated auth items. */ -static void -free_auth_items (void) -{ - addr_list *a; - - while ((a = addresses) != NULL) - { - addresses = a->next; - - binary_free (a->auth.address, a->auth.address_length); - binary_free (a->auth.number, a->auth.number_length); - binary_free (a->auth.name, a->auth.name_length); - binary_free (a->auth.data, a->auth.data_length); - free (a); - } -} - -/* Add the unix domain auth item. */ -static void -define_local (Xauth *auth) -{ - char *host = host_name (); - -#ifdef DEBUG - fprintf (stderr, "x11: hostname is %s\n", host); -#endif - - auth->family = FamilyLocal; - auth->address_length = strlen (host); - auth->address = host; - - add_auth_item (auth); -} - -/* Add the tcp auth item. */ -static void -define_named (Xauth *auth, const char *name) -{ - struct ifaddrs *addrs, *ptr; - - if (getifaddrs (&addrs) != 0) - return; - - for (ptr = addrs; ptr != NULL; ptr = ptr->ifa_next) - { - if (ptr->ifa_addr->sa_family != AF_INET) - continue; - - auth->family = FamilyInternet; - auth->address_length = sizeof (struct sockaddr_in); - auth->address = (char *) &(((struct sockaddr_in *) ptr->ifa_addr)->sin_addr); - -#ifdef DEBUG - fprintf (stderr, "x11: ipaddr is %d.%d.%d.%d\n", - (unsigned char) auth->address[0], - (unsigned char) auth->address[1], - (unsigned char) auth->address[2], - (unsigned char) auth->address[3]); -#endif - - add_auth_item (auth); - } - - freeifaddrs (addrs); -} - -/* Parse the display number from NAME and add it to AUTH. */ -static void -set_auth_number (Xauth *auth, const char *name) -{ - char *colon; - char *dot, *number; - - colon = strrchr(name, ':'); - if (colon != NULL) - { - colon++; - dot = strchr(colon, '.'); - - if (dot != NULL) - auth->number_length = dot - colon; - else - auth->number_length = strlen (colon); - - number = malloc (auth->number_length + 1); - if (number != NULL) - { - strncpy (number, colon, auth->number_length); - number[auth->number_length] = '\0'; - } - else - { - auth->number_length = 0; - } - - auth->number = number; - } -} - -/* Put 128 bits of random data into DATA. If possible, it will be "high - quality" */ -static int -generate_mit_magic_cookie (char data[16]) -{ - int fd, ret, i; - long *ldata = (long *) data; - - fd = open ("/dev/random", O_RDONLY); - if (fd > 0) - { - ret = read (fd, data, 16); - if (ret == 16) - return TRUE; - - close (fd); - } - - /* fall back to the usual crappy rng */ - - srand48 (getpid () ^ time (NULL)); - - for (i = 0; i < 4; i++) - ldata[i] = lrand48 (); - - return TRUE; -} - -/* Create the keys we'll be using for the display named NAME. */ -static int -make_auth_keys (const char *name) -{ - Xauth auth; - char key[16]; - - if (auth_file == NULL) - return FALSE; - - auth.name = "MIT-MAGIC-COOKIE-1"; - auth.name_length = strlen (auth.name); - - if (!generate_mit_magic_cookie (key)) - { - auth_file = NULL; - return FALSE; - } - - auth.data = key; - auth.data_length = 16; - - set_auth_number (&auth, name); - - define_named (&auth, host_name ()); - define_local (&auth); - - free (auth.number); - - return TRUE; -} - -/* If ADD-ENTRIES is true, merge our auth entries into the existing - Xauthority file. If ADD-ENTRIES is false, remove our entries. */ -static int -write_auth_file (int add_entries) -{ - char *home, newname[1024]; - int fd, ret; - FILE *new_fh, *old_fh; - addr_list *addr; - Xauth *auth; - - if (auth_file == NULL) - return FALSE; - - home = getenv ("HOME"); - if (home == NULL) - { - auth_file = NULL; - return FALSE; - } - - snprintf (newname, sizeof (newname), "%s/.XauthorityXXXXXX", home); - mktemp (newname); - - if (XauLockAuth (auth_file, 1, 2, 10) != LOCK_SUCCESS) - { - /* FIXME: do something here? */ - - auth_file = NULL; - return FALSE; - } - - fd = open (newname, O_WRONLY | O_CREAT | O_TRUNC, 0600); - if (fd >= 0) - { - new_fh = fdopen (fd, "w"); - if (new_fh != NULL) - { - if (add_entries) - { - for (addr = addresses; addr != NULL; addr = addr->next) - { - XauWriteAuth (new_fh, &addr->auth); - } - } - - old_fh = fopen (auth_file, "r"); - if (old_fh != NULL) - { - while ((auth = XauReadAuth (old_fh)) != NULL) - { - if (!check_auth_item (auth)) - XauWriteAuth (new_fh, auth); - XauDisposeAuth (auth); - } - fclose (old_fh); - } - - fclose (new_fh); - unlink (auth_file); - - ret = rename (newname, auth_file); - - if (ret != 0) - auth_file = NULL; - - XauUnlockAuth (auth_file); - return ret == 0; - } - - close (fd); - } - - XauUnlockAuth (auth_file); - auth_file = NULL; - return FALSE; -} - - -/* Subprocess management functions. */ - -static int -start_server (char **xargv) -{ - int child; - - child = fork (); - - switch (child) - { - case -1: /* error */ - perror ("fork"); - return FALSE; - - case 0: /* child */ - execv (X_SERVER, xargv); - perror ("Couldn't exec " X_SERVER); - _exit (1); - - default: /* parent */ - server_pid = child; - return TRUE; - } -} - -static int -wait_for_server (void) -{ - int count = 100; - - while (count-- > 0) - { - int status; - - server_dpy = XOpenDisplay (server_name); - if (server_dpy != NULL) - return TRUE; - - if (waitpid (server_pid, &status, WNOHANG) == server_pid) - return FALSE; - - sleep (1); - } - - return FALSE; -} - -static int -start_client (void) -{ - int child; - - child = fork (); - - switch (child) - { - char *tem, buf[1024]; - - case -1: /* error */ - perror ("fork"); - return FALSE; - - case 0: /* child */ - /* cd $HOME */ - tem = getenv ("HOME"); - if (tem != NULL) - chdir (tem); - - /* Setup environment */ - - setenv ("DISPLAY", server_name, TRUE); - tem = getenv ("PATH"); - if (tem != NULL && tem[0] != NULL) - snprintf (buf, sizeof (buf), "%s:/usr/X11R6/bin", tem); - else - snprintf (buf, sizeof (buf), "/bin:/usr/bin:/usr/X11R6/bin"); - setenv ("PATH", buf, TRUE); - -#if 1 - setenv("GTK_USE_XFT","1",0); - system(WM_PATH " &"); - execl("/usr/local/bin/synfigstudio","/usr/local/bin/synfigstudio",NULL); - -#else - /* First look for .xinitrc in user's home directory. */ - - tem = getenv ("HOME"); - if (tem != NULL) - { - snprintf (buf, sizeof (buf), "%s/.xinitrc", tem); - if (access (buf, R_OK) == 0) - execlp (SHELL, SHELL, buf, NULL); - } - - /* Then try the default xinitrc in the lib directory. */ - - if (access (DEFAULT_XINITRC, R_OK) == 0) - execlp (SHELL, SHELL, DEFAULT_XINITRC, NULL); - - /* Then fallback to hardcoding an xterm and the window manager. */ - - system (XTERM_PATH " &"); - execl (WM_PATH, WM_PATH, NULL); - -#endif - perror ("exec"); - _exit (1); - - default: /* parent */ - client_pid = child; - return TRUE; - } -} - -static void -sigchld_handler (int sig) -{ - int pid, status; - -again: - pid = waitpid (WAIT_ANY, &status, WNOHANG); - - if (pid > 0) - { - if (pid == server_pid) - { - server_pid = -1; - - if (client_pid >= 0) - kill (client_pid, SIGTERM); - } - else if (pid == client_pid) - { - client_pid = -1; - - if (server_pid >= 0 && xinit_kills_server) - kill (server_pid, SIGTERM); - } - goto again; - } - - if (server_pid == -1 && client_pid == -1) - longjmp (exit_continuation, 1); - - signal (SIGCHLD, sigchld_handler); -} - - -/* Server utilities. */ - -static Boolean -display_exists_p (int number) -{ - char buf[64]; - void *conn; - char *fullname = NULL; - int idisplay, iscreen; - char *conn_auth_name, *conn_auth_data; - int conn_auth_namelen, conn_auth_datalen; - - extern void *_X11TransConnectDisplay (); - extern void _XDisconnectDisplay (); - - /* Since connecting to the display waits for a few seconds if the - display doesn't exist, check for trivial non-existence - if the - socket in /tmp exists or not.. (note: if the socket exists, the - server may still not, so we need to try to connect in that case..) */ - - sprintf (buf, "/tmp/.X11-unix/X%d", number); - if (access (buf, F_OK) != 0) - return FALSE; - - /* This is a private function that we shouldn't really be calling, - but it's the best way to see if the server exists (without - needing to hold the necessary authentication to use it) */ - - sprintf (buf, ":%d", number); - conn = _X11TransConnectDisplay (buf, &fullname, &idisplay, &iscreen, - &conn_auth_name, &conn_auth_namelen, - &conn_auth_data, &conn_auth_datalen); - if (conn == NULL) - return FALSE; - - _XDisconnectDisplay (conn); - return TRUE; -} - - -/* Monitoring when the system's ip addresses change. */ - -static Boolean pending_timer; - -static void -timer_callback (CFRunLoopTimerRef timer, void *info) -{ - pending_timer = FALSE; - - /* Update authentication names. Need to write .Xauthority file first - without the existing entries, then again with the new entries.. */ - - write_auth_file (FALSE); - - free_auth_items (); - make_auth_keys (server_name); - - write_auth_file (TRUE); -} - -/* This function is called when the system's ip addresses may have changed. */ -static void -ipaddr_callback (SCDynamicStoreRef store, CFArrayRef changed_keys, void *info) -{ - if (auth_file != NULL && !pending_timer) - { - CFRunLoopTimerRef timer; - - timer = CFRunLoopTimerCreate (NULL, CFAbsoluteTimeGetCurrent () + 1.0, - 0.0, 0, 0, timer_callback, NULL); - CFRunLoopAddTimer (CFRunLoopGetCurrent (), timer, - kCFRunLoopDefaultMode); - CFRelease (timer); - - pending_timer = TRUE; - } -} - -/* This code adapted from "Living in a Dynamic TCP/IP Environment" technote. */ -static Boolean -install_ipaddr_source (void) -{ - CFRunLoopSourceRef source = NULL; - - SCDynamicStoreContext context = {0}; - SCDynamicStoreRef ref; - - ref = SCDynamicStoreCreate (NULL, - CFSTR ("AddIPAddressListChangeCallbackSCF"), - ipaddr_callback, &context); - - if (ref != NULL) - { - const void *keys[2]; - - /* This should tell us when any IPV4 address changes */ - keys[0] = (SCDynamicStoreKeyCreateNetworkServiceEntity - (NULL, kSCDynamicStoreDomainState, - kSCCompAnyRegex, kSCEntNetIPv4)); - - /* This should tell us when the hostname(s) change */ - keys[1] = SCDynamicStoreKeyCreateHostNames (NULL); - - if (keys[0] != NULL && keys[1] != NULL) - { - CFArrayRef pattern_array; - - pattern_array = CFArrayCreate (NULL, keys, 2, - &kCFTypeArrayCallBacks); - - if (pattern_array != NULL) - { - SCDynamicStoreSetNotificationKeys (ref, NULL, pattern_array); - source = SCDynamicStoreCreateRunLoopSource (NULL, ref, 0); - - CFRelease (pattern_array); - } - - if (keys[0] != NULL) - CFRelease (keys[0]); - if (keys[1] != NULL) - CFRelease (keys[1]); - } - - CFRelease (ref); - } - - if (source != NULL) - { - CFRunLoopAddSource (CFRunLoopGetCurrent (), - source, kCFRunLoopDefaultMode); - CFRelease (source); - } - - return source != NULL; -} - - - -/* Entrypoint. */ -int -main (int argc, char **argv) -{ - char **xargv; - int i, j; - int fd; - - - - - - - xargv = alloca (sizeof (char *) * (argc + 32)); - - if (!read_boolean_pref (CFSTR ("no_auth"), FALSE)) - auth_file = XauFileName (); - - /* The standard X11 behaviour is for the server to quit when the first - client exits. But it can be useful for debugging (and to mimic our - behaviour in the beta releases) to not do that. */ - - xinit_kills_server = read_boolean_pref (CFSTR ("xinit_kills_server"), TRUE); - - for (i = 1; i < argc; i++) - { - if (argv[i][0] == ':') - server_name = argv[i]; - } - - if (server_name == NULL) - { - static char name[8]; - - /* No display number specified, so search for the first unused. - - There's a big old race condition here if two servers start at - the same time, but that's fairly unlikely. We could create - lockfiles or something, but that's seems more likely to cause - problems than the race condition itself.. */ - - for (i = 2; i < MAX_DISPLAYS; i++) - { - if (!display_exists_p (i)) - break; - } - - if (i == MAX_DISPLAYS) - { - fprintf (stderr, "%s: couldn't allocate a display number", argv[0]); - exit (1); - } - - sprintf (name, ":%d", i); - server_name = name; - } - - if (auth_file != NULL) - { - /* Create new Xauth keys and add them to the .Xauthority file */ - - make_auth_keys (server_name); - write_auth_file (TRUE); - } - - /* Construct our new argv */ - - i = j = 0; - - xargv[i++] = argv[j++]; - - if (auth_file != NULL) - { - xargv[i++] = "-auth"; - xargv[i++] = auth_file; - } - - /* By default, don't listen on tcp sockets if Xauth is disabled. */ - - if (read_boolean_pref (CFSTR ("nolisten_tcp"), auth_file == NULL)) - { - xargv[i++] = "-nolisten"; - xargv[i++] = "tcp"; - } - - while (j < argc) - { - if (argv[j++][0] != ':') - xargv[i++] = argv[j-1]; - } - - xargv[i++] = (char *) server_name; - xargv[i++] = NULL; - - /* Detach from any controlling terminal and connect stdin to /dev/null */ - -#ifdef TIOCNOTTY - fd = open ("/dev/tty", O_RDONLY); - if (fd != -1) - { - ioctl (fd, TIOCNOTTY, 0); - close (fd); - } -#endif - - fd = open ("/dev/null", O_RDWR, 0); - if (fd >= 0) - { - dup2 (fd, 0); - if (fd > 0) - close (fd); - } - - if (!start_server (xargv)) - return 1; - - if (!wait_for_server ()) - { - kill (server_pid, SIGTERM); - return 1; - } - - if (!start_client ()) - { - kill (server_pid, SIGTERM); - return 1; - } - - signal (SIGCHLD, sigchld_handler); - - if (NSIsSymbolNameDefined("_ASKInitialize")) - { - NSSymbol *symbol = NSLookupAndBindSymbol("_ASKInitialize"); - if (symbol) - { - void (*initializeASKFunc)(void) = NSAddressOfSymbol(symbol); - if (initializeASKFunc) - { - initializeASKFunc(); - } - else - return 666; - } - else return 667; - }else - return 668; - - if (setjmp (exit_continuation) == 0) - { - if (install_ipaddr_source ()) - CFRunLoopRun (); - else - while (1) pause (); - } - - signal (SIGCHLD, SIG_IGN); - - if (auth_file != NULL) - { - /* Remove our Xauth keys */ - - write_auth_file (FALSE); - } - - free_auth_items (); - - return 0; -} diff --git a/synfig-osx/trunk/launcher/darwin-input.c b/synfig-osx/trunk/launcher/darwin-input.c deleted file mode 100644 index e4c79b7..0000000 --- a/synfig-osx/trunk/launcher/darwin-input.c +++ /dev/null @@ -1,216 +0,0 @@ -/* darwin-input.c -- code to manage the input event queue - $Id: darwin-input.c,v 1.4 2002/12/13 00:22:51 jharper Exp $ */ - -/* - * Copyright (c) 2001-2002 Torrey T. Lyons. All Rights Reserved. - * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ - -#include "darwin.h" - -#include "mipointer.h" // mi software cursor - -#include - -#define QUEUE_SIZE 256 - -static struct { - pthread_mutex_t mutex; - - /* DIX looks at these two integer values, when they're equal - it won't call ProcessInputEvents (). */ - HWEventQueueType head, tail; - - xEvent events[QUEUE_SIZE]; -} event_queue; - -/* fd[0] = reading, fd[1] = writing */ -static int event_fd[2]; - -void -DarwinEnqueueEvent (const xEvent *e) -{ - int newtail, oldtail; - int need_write = FALSE; - - pthread_mutex_lock (&event_queue.mutex); - - oldtail = (event_queue.tail - 1) % QUEUE_SIZE; - - if (e->u.u.type == MotionNotify - && event_queue.tail != event_queue.head - && event_queue.events[oldtail].u.u.type == MotionNotify) - { - /* Two adjacent motion notify events. Coalesce them. */ - - memcpy (&event_queue.events[oldtail], e, sizeof (xEvent)); - } - else - { - newtail = (event_queue.tail + 1) % QUEUE_SIZE; - - if (newtail != event_queue.head) - { - memcpy (&event_queue.events[event_queue.tail], e, sizeof (xEvent)); - event_queue.tail = newtail; - need_write = TRUE; - } - } - - pthread_mutex_unlock (&event_queue.mutex); - - if (need_write) - write (event_fd[1], &need_write, sizeof (need_write)); -} - -Bool -DarwinDequeueEvent (xEvent *e) -{ - Bool ret = FALSE; - int unused; - - pthread_mutex_lock (&event_queue.mutex); - - if (event_queue.head != event_queue.tail) - { - memcpy (e, &event_queue.events[event_queue.head], sizeof (xEvent)); - event_queue.head = (event_queue.head + 1) % QUEUE_SIZE; - ret = TRUE; - } - - pthread_mutex_unlock (&event_queue.mutex); - - if (ret) - read (event_fd[0], &unused, sizeof (unused)); - - return ret; -} - -void -DarwinInputPreInit (void) -{ - if (pipe (event_fd) != 0) - { - perror ("pipe"); - exit (1); - } - - event_queue.head = event_queue.tail = 0; - pthread_mutex_init (&event_queue.mutex, NULL); -} - -void -DarwinInputInit (void) -{ - SetInputCheck (&event_queue.head, &event_queue.tail); -} - - -/* - ============================================================================= - - mouse and keyboard callbacks - - ============================================================================= -*/ - -/* - * DarwinChangePointerControl - * Set mouse acceleration and thresholding - * FIXME: We currently ignore the threshold in ctrl->threshold. - */ -static void DarwinChangePointerControl(DeviceIntPtr device, PtrCtrl *ctrl) -{ - /* do nothing here */ -} - - -/* - * DarwinMouseProc - * Handle the initialization, etc. of a mouse - */ - -int DarwinMouseProc(DeviceIntPtr pPointer, int what) -{ - char map[6]; - - switch (what) { - - case DEVICE_INIT: - pPointer->public.on = FALSE; - - // Set button map. - map[1] = 1; - map[2] = 2; - map[3] = 3; - map[4] = 4; - map[5] = 5; - InitPointerDeviceStruct( (DevicePtr)pPointer, - map, - 5, // numbuttons (4 & 5 are scroll wheel) - miPointerGetMotionEvents, - DarwinChangePointerControl, - 0 ); - break; - - case DEVICE_ON: - pPointer->public.on = TRUE; - AddEnabledDevice(event_fd[0]); - return Success; - - case DEVICE_CLOSE: - case DEVICE_OFF: - pPointer->public.on = FALSE; - RemoveEnabledDevice(event_fd[0]); - return Success; - } - - return Success; -} - -/* - * DarwinKeybdProc - * Callback from X - */ -int DarwinKeybdProc(DeviceIntPtr pDev, int onoff) -{ - switch ( onoff ) { - case DEVICE_INIT: - DarwinKeyboardInit( pDev ); - break; - case DEVICE_ON: - pDev->public.on = TRUE; - AddEnabledDevice(event_fd[0]); - break; - case DEVICE_OFF: - pDev->public.on = FALSE; - RemoveEnabledDevice(event_fd[0]); - break; - case DEVICE_CLOSE: - break; - } - - return Success; -} diff --git a/synfig-osx/trunk/launcher/darwin-keyboard.c b/synfig-osx/trunk/launcher/darwin-keyboard.c deleted file mode 100644 index 0e8594e..0000000 --- a/synfig-osx/trunk/launcher/darwin-keyboard.c +++ /dev/null @@ -1,301 +0,0 @@ -/* darwin-keyboard.c -- Keyboard support for the Darwin X Server - - Copyright (c) 2001-2002 Torrey T. Lyons. All Rights Reserved. - Copyright (c) 2003 Apple Computer, Inc. All Rights Reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN - NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* $XFree86: xc/programs/Xserver/hw/darwin/darwinKeyboard.c,v 1.16 2002/03/28 02:21:08 torrey Exp $ */ - - -/* An X keyCode must be in the range XkbMinLegalKeyCode (8) to - XkbMaxLegalKeyCode(255). - - The keyCodes we get from the kernel range from 0 to 127, so we need to - offset the range before passing the keyCode to X. - - An X KeySym is an extended ascii code that is device independent. - - The modifier map is accessed by the keyCode, but the normal map is - accessed by keyCode - MIN_KEYCODE. Sigh. */ - - -/* Define this to get a diagnostic output to stderr which is helpful - in determining how the X server is interpreting the Darwin keymap. */ -#undef DUMP_DARWIN_KEYMAP - -/* Define this to use Alt for Mode_switch. */ -#define ALT_IS_MODE_SWITCH 1 - -#include "darwin.h" -#include "darwin-keyboard.h" - -#include -#include -#include "darwin.h" -#include "quartz-audio.h" - -/* For NX_ constants */ -#include -#include - -#include "keysym.h" - -static darwin_keyboard_info info; - -static void -DarwinChangeKeyboardControl (DeviceIntPtr device, KeybdCtrl *ctrl) -{ - /* keyclick, bell volume / pitch, autorepeat, LED's */ -} - -/* Use the key_map field of INFO to populate the mod_map and - modifier_keycodes fields */ -static void -build_modifier_maps (darwin_keyboard_info *info) -{ - int i; - KeySym *k; - - memset (info->mod_map, NoSymbol, sizeof (info->mod_map)); - memset (info->modifier_keycodes, 0, sizeof (info->modifier_keycodes)); - - for (i = 0; i < NUM_KEYCODES; i++) - { - k = info->key_map + i * GLYPHS_PER_KEY; - - switch (k[0]) - { - case XK_Shift_L: - info->modifier_keycodes[NX_MODIFIERKEY_SHIFT][0] = i; - info->mod_map[MIN_KEYCODE + i] = ShiftMask; - break; - - case XK_Shift_R: - info->modifier_keycodes[NX_MODIFIERKEY_SHIFT][1] = i; - info->mod_map[MIN_KEYCODE + i] = ShiftMask; - break; - - case XK_Control_L: - info->modifier_keycodes[NX_MODIFIERKEY_CONTROL][0] = i; - info->mod_map[MIN_KEYCODE + i] = ControlMask; - break; - - case XK_Control_R: - info->modifier_keycodes[NX_MODIFIERKEY_CONTROL][1] = i; - info->mod_map[MIN_KEYCODE + i] = ControlMask; - break; - - case XK_Caps_Lock: - info->modifier_keycodes[NX_MODIFIERKEY_ALPHALOCK][0] = i; - info->mod_map[MIN_KEYCODE + i] = LockMask; - break; - - case XK_Alt_L: - info->modifier_keycodes[NX_MODIFIERKEY_ALTERNATE][0] = i; - info->mod_map[MIN_KEYCODE + i] = Mod1Mask; - break; - - case XK_Alt_R: - info->modifier_keycodes[NX_MODIFIERKEY_ALTERNATE][1] = i; - info->mod_map[MIN_KEYCODE + i] = Mod1Mask; - break; - - case XK_Mode_switch: - info->mod_map[MIN_KEYCODE + i] = Mod1Mask; - break; - - case XK_Meta_L: - info->modifier_keycodes[NX_MODIFIERKEY_COMMAND][0] = i; - info->mod_map[MIN_KEYCODE + i] = Mod2Mask; - break; - - case XK_Meta_R: - info->modifier_keycodes[NX_MODIFIERKEY_COMMAND][1] = i; - info->mod_map[MIN_KEYCODE + i] = Mod2Mask; - break; - - case XK_Num_Lock: - info->mod_map[MIN_KEYCODE + i] = Mod3Mask; - break; - } - - if (darwinSwapAltMeta) - { - switch (k[0]) - { - case XK_Alt_L: - k[0] = XK_Meta_L; break; - case XK_Alt_R: - k[0] = XK_Meta_R; break; - case XK_Meta_L: - k[0] = XK_Alt_L; break; - case XK_Meta_R: - k[0] = XK_Alt_R; break; - } - } - -#if ALT_IS_MODE_SWITCH - if (k[0] == XK_Alt_L || k[0] == XK_Alt_R) - k[0] = XK_Mode_switch; -#endif - } -} - -static void -load_keyboard_mapping (KeySymsRec *keysyms) -{ - memset (info.key_map, 0, sizeof (info.key_map)); - - if (darwinKeymapFile == NULL - || !DarwinParseKeymapFile (&info)) - { - /* Load the system keymapping. */ - - DarwinReadSystemKeymap (&info); - } - - build_modifier_maps (&info); - -#ifdef DUMP_DARWIN_KEYMAP - ErrorF("Darwin -> X converted keyboard map\n"); - for (i = 0, k = map; i < NX_NUMKEYCODES; i++, k += GLYPHS_PER_KEY) { - int j; - ErrorF("0x%02x:", i); - for (j = 0; j < GLYPHS_PER_KEY; j++) { - if (k[j] == NoSymbol) { - ErrorF("\tNoSym"); - } else { - ErrorF("\t0x%x", k[j]); - } - } - ErrorF("\n"); - } -#endif - - keysyms->map = info.key_map; - keysyms->mapWidth = GLYPHS_PER_KEY; - keysyms->minKeyCode = MIN_KEYCODE; - keysyms->maxKeyCode = MAX_KEYCODE; -} - -/* Get the Darwin keyboard map and compute an equivalent X keyboard map - and modifier map. Set the new keyboard device structure. */ -void -DarwinKeyboardInit (DeviceIntPtr pDev) -{ - KeySymsRec keysyms; - BellProcPtr bellProc; - - load_keyboard_mapping (&keysyms); - - /* Initialize the seed, so we don't reload the keymap unnecessarily - (and possibly overwrite xinitrc changes) */ - DarwinSystemKeymapSeed (); - - bellProc = QuartzBell; - - InitKeyboardDeviceStruct ((DevicePtr) pDev, &keysyms, info.mod_map, - bellProc, DarwinChangeKeyboardControl); -} - -/* Borrowed from dix/devices.c */ -static Bool -InitModMap(register KeyClassPtr keyc) -{ - int i, j; - CARD8 keysPerModifier[8]; - CARD8 mask; - - if (keyc->modifierKeyMap != NULL) - xfree (keyc->modifierKeyMap); - - keyc->maxKeysPerModifier = 0; - for (i = 0; i < 8; i++) - keysPerModifier[i] = 0; - for (i = 8; i < MAP_LENGTH; i++) - { - for (j = 0, mask = 1; j < 8; j++, mask <<= 1) - { - if (mask & keyc->modifierMap[i]) - { - if (++keysPerModifier[j] > keyc->maxKeysPerModifier) - keyc->maxKeysPerModifier = keysPerModifier[j]; - } - } - } - keyc->modifierKeyMap = (KeyCode *)xalloc(8*keyc->maxKeysPerModifier); - if (!keyc->modifierKeyMap && keyc->maxKeysPerModifier) - return (FALSE); - bzero((char *)keyc->modifierKeyMap, 8*(int)keyc->maxKeysPerModifier); - for (i = 0; i < 8; i++) - keysPerModifier[i] = 0; - for (i = 8; i < MAP_LENGTH; i++) - { - for (j = 0, mask = 1; j < 8; j++, mask <<= 1) - { - if (mask & keyc->modifierMap[i]) - { - keyc->modifierKeyMap[(j*keyc->maxKeysPerModifier) + - keysPerModifier[j]] = i; - keysPerModifier[j]++; - } - } - } - return TRUE; -} - -void -DarwinKeyboardReload (DeviceIntPtr pDev) -{ - KeySymsRec keysyms; - - load_keyboard_mapping (&keysyms); - - if (SetKeySymsMap (&pDev->key->curKeySyms, &keysyms)) - { - /* now try to update modifiers. */ - - memmove (pDev->key->modifierMap, info.mod_map, MAP_LENGTH); - InitModMap (pDev->key); - } - - SendMappingNotify (MappingKeyboard, MIN_KEYCODE, NUM_KEYCODES, 0); - SendMappingNotify (MappingModifier, 0, 0, 0); -} - -/* Return the keycode for an NX_MODIFIERKEY_* modifier. side = 0 for left - or 1 for right. Returns 0 if key+side is not a known modifier. */ -int -DarwinModifierNXKeyToNXKeycode (int key, int side) -{ - return info.modifier_keycodes[key][side]; -} - -/* This allows the ddx layer to prevent some keys from being remapped - as modifier keys. */ -Bool -LegalModifier (unsigned int key, DevicePtr pDev) -{ - return 1; -} diff --git a/synfig-osx/trunk/launcher/darwin-keyboard.h b/synfig-osx/trunk/launcher/darwin-keyboard.h deleted file mode 100644 index 7e31b26..0000000 --- a/synfig-osx/trunk/launcher/darwin-keyboard.h +++ /dev/null @@ -1,58 +0,0 @@ -/* darwin-keyboard.h - $Id: darwin-keyboard.h,v 1.1 2003/01/22 01:54:10 jharper Exp $ - - Copyright (c) 2003 Apple Computer, Inc. All rights reserved. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. */ - -#ifndef DARWIN_KEYBOARD_H -#define DARWIN_KEYBOARD_H 1 - -#include "X.h" - -/* Each key can generate 4 glyphs. They are, in order: - unshifted, shifted, modeswitch unshifted, modeswitch shifted */ - -#ifndef MIN_KEYCODE -# define MIN_KEYCODE 8 -#endif - -#define GLYPHS_PER_KEY 4 -#define NUM_KEYCODES 248 -#define MAX_KEYCODE NUM_KEYCODES + MIN_KEYCODE - 1 - -typedef struct darwin_keyboard_info_struct darwin_keyboard_info; - -struct darwin_keyboard_info_struct { - unsigned char mod_map[MAX_KEYCODE+1]; - KeySym key_map[NUM_KEYCODES * GLYPHS_PER_KEY]; - unsigned char modifier_keycodes[32][2]; -}; - -extern int DarwinReadSystemKeymap (darwin_keyboard_info *info); -extern int DarwinParseKeymapFile (darwin_keyboard_info *info); - -#endif /* DARWIN_KEYBOARD_H */ diff --git a/synfig-osx/trunk/launcher/darwin-new-keymap.c b/synfig-osx/trunk/launcher/darwin-new-keymap.c deleted file mode 100644 index 1109bae..0000000 --- a/synfig-osx/trunk/launcher/darwin-new-keymap.c +++ /dev/null @@ -1,364 +0,0 @@ -/* darwin-new-keymap.c -- code to build a keymap from the system - $Id: darwin-new-keymap.c,v 1.7 2003/02/21 22:33:19 jharper Exp $ - - Copyright (c) 2003 Apple Computer, Inc. All rights reserved. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. */ - - -#define Cursor X_Cursor -# include "darwin-keyboard.h" -# include "keysym.h" -#undef Cursor - -#include -#include - -#include "keysym2ucs.h" - -#define HACK_MISSING 1 -#define HACK_KEYPAD 1 - -enum { - MOD_COMMAND = 256, - MOD_SHIFT = 512, - MOD_OPTION = 2048, - MOD_CONTROL = 4096, -}; - -#define UKEYSYM(u) ((u) | 0x01000000) - -/* Table of keycode->keysym mappings we use to fallback on for important - keys that are often not in the Unicode mapping. */ - -const static struct { - unsigned short keycode; - KeySym keysym; -} known_keys[] = { - {55, XK_Meta_L}, - {56, XK_Shift_L}, - {57, XK_Caps_Lock}, - {58, XK_Alt_L}, - {59, XK_Control_L}, - {60, XK_Shift_R}, - {61, XK_Alt_R}, - {62, XK_Control_R}, - - {122, XK_F1}, - {120, XK_F2}, - {99, XK_F3}, - {118, XK_F4}, - {96, XK_F5}, - {97, XK_F6}, - {98, XK_F7}, - {100, XK_F8}, - {101, XK_F9}, - {109, XK_F10}, - {103, XK_F11}, - {111, XK_F12}, - {105, XK_F13}, - {107, XK_F14}, - {113, XK_F15}, -}; - -/* Table of keycode->old,new-keysym mappings we use to fixup the numeric - keypad entries. */ - -const static struct { - unsigned short keycode; - KeySym normal, keypad; -} known_numeric_keys[] = { - {65, XK_period, XK_KP_Decimal}, - {67, XK_asterisk, XK_KP_Multiply}, - {69, XK_plus, XK_KP_Add}, - {75, XK_slash, XK_KP_Divide}, - {76, 0x01000003, XK_KP_Enter}, - {78, XK_minus, XK_KP_Subtract}, - {81, XK_equal, XK_KP_Equal}, - {82, XK_0, XK_KP_0}, - {83, XK_1, XK_KP_1}, - {84, XK_2, XK_KP_2}, - {85, XK_3, XK_KP_3}, - {86, XK_4, XK_KP_4}, - {87, XK_5, XK_KP_5}, - {88, XK_6, XK_KP_6}, - {89, XK_7, XK_KP_7}, - {91, XK_8, XK_KP_8}, - {92, XK_9, XK_KP_9}, -}; - -/* Table mapping normal keysyms to their dead equivalents. - FIXME: all the unicode keysyms (apart from circumflex) were guessed. */ - -const static struct { - KeySym normal, dead; -} dead_keys[] = { - {XK_grave, XK_dead_grave}, - {XK_acute, XK_dead_acute}, - {XK_asciicircum, XK_dead_circumflex}, - {UKEYSYM (0x2c6), XK_dead_circumflex}, /* MODIFIER LETTER CIRCUMFLEX ACCENT */ - {XK_asciitilde, XK_dead_tilde}, - {UKEYSYM (0x2dc), XK_dead_tilde}, /* SMALL TILDE */ - {XK_macron, XK_dead_macron}, - {XK_breve, XK_dead_breve}, - {XK_abovedot, XK_dead_abovedot}, - {XK_diaeresis, XK_dead_diaeresis}, - {UKEYSYM (0x2da), XK_dead_abovering}, /* DOT ABOVE */ - {XK_doubleacute, XK_dead_doubleacute}, - {XK_caron, XK_dead_caron}, - {XK_cedilla, XK_dead_cedilla}, - {XK_ogonek, XK_dead_ogonek}, - {UKEYSYM (0x269), XK_dead_iota}, /* LATIN SMALL LETTER IOTA */ - {UKEYSYM (0x2ec), XK_dead_voiced_sound}, /* MODIFIER LETTER VOICING */ -/* {XK_semivoiced_sound, XK_dead_semivoiced_sound}, */ - {UKEYSYM (0x323), XK_dead_belowdot}, /* COMBINING DOT BELOW */ - {UKEYSYM (0x309), XK_dead_hook}, /* COMBINING HOOK ABOVE */ - {UKEYSYM (0x31b), XK_dead_horn}, /* COMBINING HORN */ -}; - -unsigned int -DarwinSystemKeymapSeed (void) -{ - static unsigned int seed; - - static KeyboardLayoutRef last_key_layout; - KeyboardLayoutRef key_layout; - - KLGetCurrentKeyboardLayout (&key_layout); - - if (key_layout != last_key_layout) - seed++; - - last_key_layout = key_layout; - - return seed; -} - -static inline UniChar -macroman2ucs (unsigned char c) -{ - /* Precalculated table mapping MacRoman-128 to Unicode. Generated - by creating single element CFStringRefs then extracting the - first character. */ - - static const unsigned short table[128] = { - 0xc4, 0xc5, 0xc7, 0xc9, 0xd1, 0xd6, 0xdc, 0xe1, - 0xe0, 0xe2, 0xe4, 0xe3, 0xe5, 0xe7, 0xe9, 0xe8, - 0xea, 0xeb, 0xed, 0xec, 0xee, 0xef, 0xf1, 0xf3, - 0xf2, 0xf4, 0xf6, 0xf5, 0xfa, 0xf9, 0xfb, 0xfc, - 0x2020, 0xb0, 0xa2, 0xa3, 0xa7, 0x2022, 0xb6, 0xdf, - 0xae, 0xa9, 0x2122, 0xb4, 0xa8, 0x2260, 0xc6, 0xd8, - 0x221e, 0xb1, 0x2264, 0x2265, 0xa5, 0xb5, 0x2202, 0x2211, - 0x220f, 0x3c0, 0x222b, 0xaa, 0xba, 0x3a9, 0xe6, 0xf8, - 0xbf, 0xa1, 0xac, 0x221a, 0x192, 0x2248, 0x2206, 0xab, - 0xbb, 0x2026, 0xa0, 0xc0, 0xc3, 0xd5, 0x152, 0x153, - 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0xf7, 0x25ca, - 0xff, 0x178, 0x2044, 0x20ac, 0x2039, 0x203a, 0xfb01, 0xfb02, - 0x2021, 0xb7, 0x201a, 0x201e, 0x2030, 0xc2, 0xca, 0xc1, - 0xcb, 0xc8, 0xcd, 0xce, 0xcf, 0xcc, 0xd3, 0xd4, - 0xf8ff, 0xd2, 0xda, 0xdb, 0xd9, 0x131, 0x2c6, 0x2dc, - 0xaf, 0x2d8, 0x2d9, 0x2da, 0xb8, 0x2dd, 0x2db, 0x2c7, - }; - - if (c < 128) - return c; - else - return table[c - 128]; -} - -static KeySym -make_dead_key (KeySym in) -{ - int i; - - for (i = 0; i < sizeof (dead_keys) / sizeof (dead_keys[0]); i++) - { - if (dead_keys[i].normal == in) - return dead_keys[i].dead; - } - - return in; -} - -int -DarwinReadSystemKeymap (darwin_keyboard_info *info) -{ - KeyboardLayoutRef key_layout; - const void *chr_data; - int num_keycodes = NUM_KEYCODES; - UInt32 keyboard_type = 0; - int is_uchr, i, j; - OSStatus err; - KeySym *k; - - KLGetCurrentKeyboardLayout (&key_layout); - KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data); - - if (chr_data != NULL) - { - is_uchr = 1; - keyboard_type = LMGetKbdType (); - } - else - { - KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data); - - if (chr_data == NULL) - { - fprintf (stderr, "couldn't get uchr or kchr resource\n"); - return FALSE; - } - - is_uchr = 0; - num_keycodes = 128; - } - - - /* Scan the keycode range for the Unicode character that each - key produces in the four shift states. Then convert that to - an X11 keysym (which may just the bit that says "this is - Unicode" if it can't find the real symbol.) */ - - for (i = 0; i < num_keycodes; i++) - { - static const int mods[4] = {0, MOD_SHIFT, MOD_OPTION, - MOD_OPTION | MOD_SHIFT}; - - k = info->key_map + i * GLYPHS_PER_KEY; - - for (j = 0; j < 4; j++) - { - if (is_uchr) - { - UniChar s[8]; - UniCharCount len; - UInt32 dead_key_state, extra_dead; - - dead_key_state = 0; - err = UCKeyTranslate (chr_data, i, kUCKeyActionDown, - mods[j] >> 8, keyboard_type, 0, - &dead_key_state, 8, &len, s); - if (err != noErr) - continue; - - if (len == 0 && dead_key_state != 0) - { - /* Found a dead key. Work out which one it is, but - remembering that it's dead. */ - - extra_dead = 0; - err = UCKeyTranslate (chr_data, i, kUCKeyActionDown, - mods[j] >> 8, keyboard_type, - kUCKeyTranslateNoDeadKeysMask, - &extra_dead, 8, &len, s); - if (err != noErr) - continue; - } - - if (len > 0 && s[0] != 0x0010) - { - k[j] = ucs2keysym (s[0]); - - if (dead_key_state != 0) - k[j] = make_dead_key (k[j]); - } - } - else - { - UInt32 c, state = 0; - UInt16 code; - - code = i | mods[j]; - c = KeyTranslate (chr_data, code, &state); - - /* Dead keys are only processed on key-down, so ask - to translate those events. When we find a dead key, - translating the matching key up event will give - us the actual dead character. */ - - if (state != 0) - { - UInt32 state2 = 0; - c = KeyTranslate (chr_data, code | 128, &state2); - } - - /* Characters seem to be in MacRoman encoding. */ - - if (c != 0 && c != 0x0010) - { - k[j] = ucs2keysym (macroman2ucs (c & 255)); - - if (state != 0) - k[j] = make_dead_key (k[j]); - } - } - } - - if (k[3] == k[2]) - k[3] = NoSymbol; - if (k[2] == k[1]) - k[2] = NoSymbol; - if (k[1] == k[0]) - k[1] = NoSymbol; - if (k[0] == k[2] && k[1] == k[3]) - k[2] = k[3] = NoSymbol; - } - - /* Fix up some things that are normally missing.. */ - - if (HACK_MISSING) - { - for (i = 0; i < sizeof (known_keys) / sizeof (known_keys[0]); i++) - { - k = info->key_map + known_keys[i].keycode * GLYPHS_PER_KEY; - - if (k[0] == NoSymbol && k[1] == NoSymbol - && k[2] == NoSymbol && k[3] == NoSymbol) - { - k[0] = known_keys[i].keysym; - } - } - } - - /* And some more things. We find the right symbols for the numeric - keypad, but not the KP_ keysyms. So try to convert known keycodes. */ - - if (HACK_KEYPAD) - { - for (i = 0; i < sizeof (known_numeric_keys) - / sizeof (known_numeric_keys[0]); i++) - { - k = info->key_map + known_numeric_keys[i].keycode * GLYPHS_PER_KEY; - - if (k[0] == known_numeric_keys[i].normal) - { - k[0] = known_numeric_keys[i].keypad; - } - } - } - - return TRUE; -} diff --git a/synfig-osx/trunk/launcher/darwin-old-keymap.c b/synfig-osx/trunk/launcher/darwin-old-keymap.c deleted file mode 100644 index 89a43a0..0000000 --- a/synfig-osx/trunk/launcher/darwin-old-keymap.c +++ /dev/null @@ -1,613 +0,0 @@ -/* darwin-old-keymap.c -- ugly code we need to keep around for now - - Copyright (c) 2001-2002 Torrey T. Lyons. All Rights Reserved. - - The code to parse the Darwin keymap is derived from dumpkeymap.c - by Eric Sunshine, which includes the following copyright: - - Copyright (C) 1999,2000 by Eric Sunshine - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN - NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#include "darwin.h" -#include "darwin-keyboard.h" -#include -#include -#include -#include -#include // For the NXSwap* - -#define XK_TECHNICAL // needed to get XK_Escape -#define XK_PUBLISHING -#include "keysym.h" - -static FILE *fref = NULL; -static char *inBuffer = NULL; - -// FIXME: It would be nice to support some of the extra keys in XF86keysym.h, -// at least the volume controls that now ship on every Apple keyboard. - -#define UK(a) NoSymbol // unknown symbol - -static KeySym const next_to_x[256] = { - NoSymbol, NoSymbol, NoSymbol, XK_KP_Enter, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, - XK_BackSpace, XK_Tab, XK_Linefeed, NoSymbol, - NoSymbol, XK_Return, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, - NoSymbol, NoSymbol, NoSymbol, XK_Escape, - NoSymbol, NoSymbol, NoSymbol, NoSymbol, - XK_space, XK_exclam, XK_quotedbl, XK_numbersign, - XK_dollar, XK_percent, XK_ampersand, XK_apostrophe, - XK_parenleft, XK_parenright, XK_asterisk, XK_plus, - XK_comma, XK_minus, XK_period, XK_slash, - XK_0, XK_1, XK_2, XK_3, - XK_4, XK_5, XK_6, XK_7, - XK_8, XK_9, XK_colon, XK_semicolon, - XK_less, XK_equal, XK_greater, XK_question, - XK_at, XK_A, XK_B, XK_C, - XK_D, XK_E, XK_F, XK_G, - XK_H, XK_I, XK_J, XK_K, - XK_L, XK_M, XK_N, XK_O, - XK_P, XK_Q, XK_R, XK_S, - XK_T, XK_U, XK_V, XK_W, - XK_X, XK_Y, XK_Z, XK_bracketleft, - XK_backslash, XK_bracketright,XK_asciicircum, XK_underscore, - XK_grave, XK_a, XK_b, XK_c, - XK_d, XK_e, XK_f, XK_g, - XK_h, XK_i, XK_j, XK_k, - XK_l, XK_m, XK_n, XK_o, - XK_p, XK_q, XK_r, XK_s, - XK_t, XK_u, XK_v, XK_w, - XK_x, XK_y, XK_z, XK_braceleft, - XK_bar, XK_braceright, XK_asciitilde, XK_BackSpace, -// 128 - NoSymbol, XK_Agrave, XK_Aacute, XK_Acircumflex, - XK_Atilde, XK_Adiaeresis, XK_Aring, XK_Ccedilla, - XK_Egrave, XK_Eacute, XK_Ecircumflex, XK_Ediaeresis, - XK_Igrave, XK_Iacute, XK_Icircumflex, XK_Idiaeresis, -// 144 - XK_ETH, XK_Ntilde, XK_Ograve, XK_Oacute, - XK_Ocircumflex, XK_Otilde, XK_Odiaeresis, XK_Ugrave, - XK_Uacute, XK_Ucircumflex, XK_Udiaeresis, XK_Yacute, - XK_THORN, XK_mu, XK_multiply, XK_division, -// 160 - XK_copyright, XK_exclamdown, XK_cent, XK_sterling, - UK(fraction), XK_yen, UK(fhook), XK_section, - XK_currency, XK_rightsinglequotemark, - XK_leftdoublequotemark, - XK_guillemotleft, - XK_leftanglebracket, - XK_rightanglebracket, - UK(filigature), UK(flligature), -// 176 - XK_registered, XK_endash, XK_dagger, XK_doubledagger, - XK_periodcentered,XK_brokenbar, XK_paragraph, UK(bullet), - XK_singlelowquotemark, - XK_doublelowquotemark, - XK_rightdoublequotemark, - XK_guillemotright, - XK_ellipsis, UK(permille), XK_notsign, XK_questiondown, -// 192 - XK_onesuperior, XK_dead_grave, XK_dead_acute, XK_dead_circumflex, - XK_dead_tilde, XK_dead_macron, XK_dead_breve, XK_dead_abovedot, - XK_dead_diaeresis, - XK_twosuperior, XK_dead_abovering, - XK_dead_cedilla, - XK_threesuperior, - XK_dead_doubleacute, - XK_dead_ogonek, XK_dead_caron, -// 208 - XK_emdash, XK_plusminus, XK_onequarter, XK_onehalf, - XK_threequarters, - XK_agrave, XK_aacute, XK_acircumflex, - XK_atilde, XK_adiaeresis, XK_aring, XK_ccedilla, - XK_egrave, XK_eacute, XK_ecircumflex, XK_ediaeresis, -// 224 - XK_igrave, XK_AE, XK_iacute, XK_ordfeminine, - XK_icircumflex, XK_idiaeresis, XK_eth, XK_ntilde, - XK_Lstroke, XK_Ooblique, XK_OE, XK_masculine, - XK_ograve, XK_oacute, XK_ocircumflex, XK_otilde, -// 240 - XK_odiaeresis, XK_ae, XK_ugrave, XK_uacute, - XK_ucircumflex, XK_idotless, XK_udiaeresis, XK_ygrave, - XK_lstroke, XK_ooblique, XK_oe, XK_ssharp, - XK_thorn, XK_ydiaeresis, NoSymbol, NoSymbol, - }; - -#define MIN_SYMBOL 0xAC -static KeySym const symbol_to_x[] = { - XK_Left, XK_Up, XK_Right, XK_Down - }; -int const NUM_SYMBOL = sizeof(symbol_to_x) / sizeof(symbol_to_x[0]); - -#define MIN_FUNCKEY 0x20 -static KeySym const funckey_to_x[] = { - XK_F1, XK_F2, XK_F3, XK_F4, - XK_F5, XK_F6, XK_F7, XK_F8, - XK_F9, XK_F10, XK_F11, XK_F12, - XK_Insert, XK_Delete, XK_Home, XK_End, - XK_Page_Up, XK_Page_Down, XK_F13, XK_F14, - XK_F15 - }; -int const NUM_FUNCKEY = sizeof(funckey_to_x) / sizeof(funckey_to_x[0]); - -typedef struct { - KeySym normalSym; - KeySym keypadSym; -} darwinKeyPad_t; - -static darwinKeyPad_t const normal_to_keypad[] = { - { XK_0, XK_KP_0 }, - { XK_1, XK_KP_1 }, - { XK_2, XK_KP_2 }, - { XK_3, XK_KP_3 }, - { XK_4, XK_KP_4 }, - { XK_5, XK_KP_5 }, - { XK_6, XK_KP_6 }, - { XK_7, XK_KP_7 }, - { XK_8, XK_KP_8 }, - { XK_9, XK_KP_9 }, - { XK_equal, XK_KP_Equal }, - { XK_asterisk, XK_KP_Multiply }, - { XK_plus, XK_KP_Add }, - { XK_comma, XK_KP_Separator }, - { XK_minus, XK_KP_Subtract }, - { XK_period, XK_KP_Decimal }, - { XK_slash, XK_KP_Divide } -}; -int const NUM_KEYPAD = sizeof(normal_to_keypad) / sizeof(normal_to_keypad[0]); - - -//----------------------------------------------------------------------------- -// Data Stream Object -// Can be configured to treat embedded "numbers" as being composed of -// either 1, 2, or 4 bytes, apiece. -//----------------------------------------------------------------------------- -typedef struct _DataStream -{ - unsigned char const *data; - unsigned char const *data_end; - short number_size; // Size in bytes of a "number" in the stream. -} DataStream; - -static DataStream* new_data_stream( unsigned char const* data, int size ) -{ - DataStream* s = (DataStream*)xalloc( sizeof(DataStream) ); - s->data = data; - s->data_end = data + size; - s->number_size = 1; // Default to byte-sized numbers. - return s; -} - -static void destroy_data_stream( DataStream* s ) -{ - xfree(s); -} - -static unsigned char get_byte( DataStream* s ) -{ - assert(s->data + 1 <= s->data_end); - return *s->data++; -} - -static short get_word( DataStream* s ) -{ - short hi, lo; - assert(s->data + 2 <= s->data_end); - hi = *s->data++; - lo = *s->data++; - return ((hi << 8) | lo); -} - -static int get_dword( DataStream* s ) -{ - int b1, b2, b3, b4; - assert(s->data + 4 <= s->data_end); - b4 = *s->data++; - b3 = *s->data++; - b2 = *s->data++; - b1 = *s->data++; - return ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1); -} - -static int get_number( DataStream* s ) -{ - switch (s->number_size) { - case 4: return get_dword(s); - case 2: return get_word(s); - default: return get_byte(s); - } -} - - -//----------------------------------------------------------------------------- -// Utility functions to help parse Darwin keymap -//----------------------------------------------------------------------------- - -/* - * bits_set - * Calculate number of bits set in the modifier mask. - */ -static short bits_set( short mask ) -{ - short n = 0; - - for ( ; mask != 0; mask >>= 1) - if ((mask & 0x01) != 0) - n++; - return n; -} - -/* - * parse_next_char_code - * Read the next character code from the Darwin keymapping - * and write it to the X keymap. - */ -static void parse_next_char_code( - DataStream *s, - KeySym *k ) -{ - const short charSet = get_number(s); - const short charCode = get_number(s); - - if (charSet == 0) { // ascii character - if (charCode >= 0 && charCode < 256) - *k = next_to_x[charCode]; - } else if (charSet == 0x01) { // symbol character - if (charCode >= MIN_SYMBOL && - charCode <= MIN_SYMBOL + NUM_SYMBOL) - *k = symbol_to_x[charCode - MIN_SYMBOL]; - } else if (charSet == 0xFE) { // function key - if (charCode >= MIN_FUNCKEY && - charCode <= MIN_FUNCKEY + NUM_FUNCKEY) - *k = funckey_to_x[charCode - MIN_FUNCKEY]; - } -} - -/* - * DarwinReadKeymapFile - * Read the appropriate keymapping from a keymapping file. - */ -static Bool _DarwinReadKeymapFile( - NXKeyMapping *keyMap) -{ - struct stat st; - NXEventSystemDevice info[20]; - int interface = 0, handler_id = 0; - int map_interface, map_handler_id, map_size = 0; - unsigned int i, size; - int *bufferEnd; - union km_tag { - int *intP; - char *charP; - } km; - char *filename; - - filename = DarwinFindLibraryFile (darwinKeymapFile, "Keyboards"); - if (filename == NULL) { - FatalError("Could not find keymapping file %s.\n", darwinKeymapFile); - return FALSE; - } - - fref = fopen( filename, "rb" ); - xfree (filename); - - if (fref == NULL) { - ErrorF("Unable to open keymapping file '%s' (errno %d).\n", - darwinKeymapFile, errno); - return FALSE; - } - if (fstat(fileno(fref), &st) == -1) { - ErrorF("Could not stat keymapping file '%s' (errno %d).\n", - darwinKeymapFile, errno); - return FALSE; - } - - // check to make sure we don't crash later - if (st.st_size <= 16*sizeof(int)) { - ErrorF("Keymapping file '%s' is invalid (too small).\n", - darwinKeymapFile); - return FALSE; - } - - inBuffer = (char*) xalloc( st.st_size ); - bufferEnd = (int *) (inBuffer + st.st_size); - if (fread(inBuffer, st.st_size, 1, fref) != 1) { - ErrorF("Could not read %qd bytes from keymapping file '%s' (errno %d).\n", - st.st_size, darwinKeymapFile, errno); - return FALSE; - } - - if (strncmp( inBuffer, "KYM1", 4 ) == 0) { - // Magic number OK. - } else if (strncmp( inBuffer, "KYMP", 4 ) == 0) { - ErrorF("Keymapping file '%s' is intended for use with the original NeXT keyboards and cannot be used by XDarwin.\n", darwinKeymapFile); - return FALSE; - } else { - ErrorF("Keymapping file '%s' has a bad magic number and cannot be used by XDarwin.\n", darwinKeymapFile); - return FALSE; - } - - // find the keyboard interface and handler id - {NXEventHandle hid; - NXEventSystemInfoType info_type; - - size = sizeof( info ) / sizeof( int ); - hid = NXOpenEventStatus (); - info_type = NXEventSystemInfo (hid, NX_EVS_DEVICE_INFO, - (int *) info, &size); - NXCloseEventStatus (hid); - if (!info_type) { - ErrorF("Error reading event status driver info.\n"); - return FALSE; - }} - - size = size * sizeof( int ) / sizeof( info[0] ); - for( i = 0; i < size; i++) { - if (info[i].dev_type == NX_EVS_DEVICE_TYPE_KEYBOARD) { - Bool hasInterface = FALSE; - Bool hasMatch = FALSE; - - interface = info[i].interface; - handler_id = info[i].id; - - // Find an appropriate keymapping: - // The first time we try to match both interface and handler_id. - // If we can't match both, we take the first match for interface. - - do { - km.charP = inBuffer; - km.intP++; - while (km.intP+3 < bufferEnd) { - map_interface = NXSwapBigIntToHost(*(km.intP++)); - map_handler_id = NXSwapBigIntToHost(*(km.intP++)); - map_size = NXSwapBigIntToHost(*(km.intP++)); - if (map_interface == interface) { - if (map_handler_id == handler_id || hasInterface) { - hasMatch = TRUE; - break; - } else { - hasInterface = TRUE; - } - } - km.charP += map_size; - } - } while (hasInterface && !hasMatch); - - if (hasMatch) { - // fill in NXKeyMapping structure - keyMap->size = map_size; - keyMap->mapping = (char*) xalloc(map_size); - memcpy(keyMap->mapping, km.charP, map_size); - return TRUE; - } - } // if dev_id == keyboard device - } // foreach info struct - - // The keymapping file didn't match any of the info structs - // returned by NXEventSystemInfo. - ErrorF("Keymapping file '%s' did not contain appropriate keyboard interface.\n", darwinKeymapFile); - return FALSE; -} - -static Bool DarwinReadKeymapFile(NXKeyMapping *keyMap) -{ - Bool ret; - - ret = _DarwinReadKeymapFile (keyMap); - - if (inBuffer != NULL) - xfree (inBuffer); - if (fref != NULL) - fclose (fref); - - return ret; -} - -int DarwinParseKeymapFile (darwin_keyboard_info *info) -{ - short numMods, numKeys, numPadKeys = 0; - NXKeyMapping keyMap; - DataStream *keyMapStream; - unsigned char const *numPadStart = 0; - Bool haveKeymap; - int i; - KeySym *k; - - if (darwinKeymapFile == NULL) - return FALSE; - - haveKeymap = DarwinReadKeymapFile(&keyMap); - if (!haveKeymap) { - ErrorF("Reverting to system keymapping.\n"); - return FALSE; - } - - keyMapStream = new_data_stream( (unsigned char const*)keyMap.mapping, - keyMap.size ); - - // check the type of map - if (get_word(keyMapStream)) { - keyMapStream->number_size = 2; - ErrorF("Current 16-bit keymapping may not be interpreted correctly.\n"); - } - - // Compute the modifier map and - // insert X modifier KeySyms into keyboard map. - // Store modifier keycodes in modifierKeycodes. - numMods = get_number(keyMapStream); - while (numMods-- > 0) { - int left = 1; // first keycode is left - short const charCode = get_number(keyMapStream); - short numKeyCodes = get_number(keyMapStream); - - // This is just a marker, not a real modifier. - // Store numeric keypad keys for later. - if (charCode == NX_MODIFIERKEY_NUMERICPAD) { - numPadStart = keyMapStream->data; - numPadKeys = numKeyCodes; - } - - while (numKeyCodes-- > 0) { - const short keyCode = get_number(keyMapStream); - if (charCode != NX_MODIFIERKEY_NUMERICPAD) { - switch (charCode) { - case NX_MODIFIERKEY_ALPHALOCK: - info->key_map[keyCode * GLYPHS_PER_KEY] = XK_Caps_Lock; - break; - case NX_MODIFIERKEY_SHIFT: - info->key_map[keyCode * GLYPHS_PER_KEY] = - (left ? XK_Shift_L : XK_Shift_R); - break; - case NX_MODIFIERKEY_CONTROL: - info->key_map[keyCode * GLYPHS_PER_KEY] = - (left ? XK_Control_L : XK_Control_R); - break; - case NX_MODIFIERKEY_ALTERNATE: - info->key_map[keyCode * GLYPHS_PER_KEY] = - (left ? XK_Alt_L : XK_Alt_R); - break; - case NX_MODIFIERKEY_COMMAND: - info->key_map[keyCode * GLYPHS_PER_KEY] = - (left ? XK_Meta_L : XK_Meta_R); - break; - case NX_MODIFIERKEY_SECONDARYFN: - info->key_map[keyCode * GLYPHS_PER_KEY] = - (left ? XK_Control_L : XK_Control_R); - break; - case NX_MODIFIERKEY_HELP: - info->key_map[keyCode * GLYPHS_PER_KEY] = XK_Help; - break; - } - } - left = 0; - } - } - - // Convert the Darwin keyboard map to an X keyboard map. - // A key can have a different character code for each combination of - // modifiers. We currently ignore all modifier combinations except - // those with Shift, AlphaLock, and Alt. - numKeys = get_number(keyMapStream); - for (i = 0, k = info->key_map; i < numKeys; i++, k += GLYPHS_PER_KEY) { - short const charGenMask = get_number(keyMapStream); - if (charGenMask != 0xFF) { // is key bound? - short numKeyCodes = 1 << bits_set(charGenMask); - - // Record unmodified case - parse_next_char_code( keyMapStream, k ); - numKeyCodes--; - - // If AlphaLock and Shift modifiers produce different codes, - // we record the Shift case since X handles AlphaLock. - if (charGenMask & 0x01) { // AlphaLock - parse_next_char_code( keyMapStream, k+1 ); - numKeyCodes--; - } - - if (charGenMask & 0x02) { // Shift - parse_next_char_code( keyMapStream, k+1 ); - numKeyCodes--; - - if (charGenMask & 0x01) { // Shift-AlphaLock - get_number(keyMapStream); get_number(keyMapStream); - numKeyCodes--; - } - } - - // Skip the Control cases - if (charGenMask & 0x04) { // Control - get_number(keyMapStream); get_number(keyMapStream); - numKeyCodes--; - - if (charGenMask & 0x01) { // Control-AlphaLock - get_number(keyMapStream); get_number(keyMapStream); - numKeyCodes--; - } - - if (charGenMask & 0x02) { // Control-Shift - get_number(keyMapStream); get_number(keyMapStream); - numKeyCodes--; - - if (charGenMask & 0x01) { // Shift-Control-AlphaLock - get_number(keyMapStream); get_number(keyMapStream); - numKeyCodes--; - } - } - } - - // Process Alt cases - if (charGenMask & 0x08) { // Alt - parse_next_char_code( keyMapStream, k+2 ); - numKeyCodes--; - - if (charGenMask & 0x01) { // Alt-AlphaLock - parse_next_char_code( keyMapStream, k+3 ); - numKeyCodes--; - } - - if (charGenMask & 0x02) { // Alt-Shift - parse_next_char_code( keyMapStream, k+3 ); - numKeyCodes--; - - if (charGenMask & 0x01) { // Alt-Shift-AlphaLock - get_number(keyMapStream); get_number(keyMapStream); - numKeyCodes--; - } - } - } - - while (numKeyCodes-- > 0) { - get_number(keyMapStream); get_number(keyMapStream); - } - - if (k[3] == k[2]) k[3] = NoSymbol; - if (k[2] == k[1]) k[2] = NoSymbol; - if (k[1] == k[0]) k[1] = NoSymbol; - if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol; - } - } - - // Now we have to go back through the list of keycodes that are on the - // numeric keypad and update the X keymap. - keyMapStream->data = numPadStart; - while(numPadKeys-- > 0) { - const short keyCode = get_number(keyMapStream); - k = &info->key_map[keyCode * GLYPHS_PER_KEY]; - for (i = 0; i < NUM_KEYPAD; i++) { - if (*k == normal_to_keypad[i].normalSym) { - k[0] = normal_to_keypad[i].keypadSym; - break; - } - } - } - - // free Darwin keyboard map - destroy_data_stream( keyMapStream ); - xfree( keyMap.mapping ); - - return TRUE; -} diff --git a/synfig-osx/trunk/launcher/darwin.c b/synfig-osx/trunk/launcher/darwin.c deleted file mode 100644 index 93549e8..0000000 --- a/synfig-osx/trunk/launcher/darwin.c +++ /dev/null @@ -1,982 +0,0 @@ -/************************************************************** - * - * Shared code for the Darwin X Server - * running with Quartz or the IOKit - * - **************************************************************/ -/* - * Copyright (c) 2001-2002 Torrey T. Lyons. All Rights Reserved. - * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ -/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.c,v 1.45 2002/03/28 02:21:08 torrey Exp $ */ - -#include - -#include "X.h" -#include "Xproto.h" -#include "os.h" -#include "servermd.h" -#include "inputstr.h" -#include "scrnintstr.h" -#include "mibstore.h" // mi backing store implementation -#include "mipointer.h" // mi software cursor -#include "micmap.h" // mi colormap code -#include "fb.h" // fb framebuffer code -#include "site.h" -#include "globals.h" -#include "xf86Version.h" -#include "dix.h" -#include "dri-surface.h" -#define _APPLEDRI_SERVER_ -#include "appledristr.h" - -#include -#include -#include -#include -#include -#include -#include - -#define NO_CFPLUGIN -#include -#include -#include - -#include "darwin.h" -#include "quartz.h" -#include "rootless-common.h" -#include "pseudoramiX.h" -#include "X11Application.h" - -/* Fake button press/release for scroll wheel move. */ -#define SCROLLWHEELUPFAKE 4 -#define SCROLLWHEELDOWNFAKE 5 - -/* X server shared global variables */ -int darwinScreensFound = 0; -int darwinScreenIndex = 0; -int darwinFakeButtons = 1; -Bool darwinSwapAltMeta = FALSE; - -/* location of X11's (0,0) point in global screen coordinates */ -int darwinMainScreenX = 0; -int darwinMainScreenY = 0; - -/* parameters read from the command line or user preferences */ -char *darwinKeymapFile; -Bool darwinSyncKeymap = TRUE; - -/* modifier masks for faking mouse buttons */ -static int darwinFakeMouse2Mask = Mod1Mask; /* option */ -static int darwinFakeMouse3Mask = Mod2Mask; /* command */ - -static DeviceIntPtr darwinPointer; -static DeviceIntPtr darwinKeyboard; - -/* Track our view of the keyboard state. Everything we sent to dix will - be represented here until released. */ -static CARD8 keysDown[DOWN_LENGTH]; -static int lockMods; - -#define SetBit(ptr,bit) \ - do {((BYTE *) ptr)[(bit) >> 3] |= (1 << ((bit) & 7));} while (0) - -#define ClearBit(ptr,bit) \ - do {((BYTE *) ptr)[(bit) >> 3] &= ~(1 << ((bit) & 7));} while (0) - -/* Common pixmap formats */ -static PixmapFormatRec formats[] = { - { 1, 1, BITMAP_SCANLINE_PAD }, - { 4, 8, BITMAP_SCANLINE_PAD }, - { 8, 8, BITMAP_SCANLINE_PAD }, - { 15, 16, BITMAP_SCANLINE_PAD }, - { 16, 16, BITMAP_SCANLINE_PAD }, - { 24, 32, BITMAP_SCANLINE_PAD }, - { 32, 32, BITMAP_SCANLINE_PAD } -}; -const int NUMFORMATS = sizeof(formats)/sizeof(formats[0]); - -#ifndef OSNAME -#define OSNAME " Mac OS X" -#endif -#ifndef OSVENDOR -#define OSVENDOR " Apple" -#endif -#ifndef PRE_RELEASE -#define PRE_RELEASE XF86_VERSION_SNAP -#endif - -extern void AppleDRIExtensionInit(void); -extern void AppleWMExtensionInit(void); - -static void -DarwinPrintBanner (void) -{ - ErrorF("\nXFree86 Version %d.%d.%d", XF86_VERSION_MAJOR, XF86_VERSION_MINOR, - XF86_VERSION_PATCH); -#if XF86_VERSION_SNAP > 0 - ErrorF(".%d", XF86_VERSION_SNAP); -#endif - -#if XF86_VERSION_SNAP >= 900 - ErrorF(" (%d.%d.0 RC %d)", XF86_VERSION_MAJOR, XF86_VERSION_MINOR + 1, - XF86_VERSION_SNAP - 900); -#endif - -#ifdef XF86_CUSTOM_VERSION - ErrorF(" (%s)", XF86_CUSTOM_VERSION); -#endif - ErrorF(" / X Window System\n"); - ErrorF("(protocol Version %d, revision %d, vendor release %d)\n", - X_PROTOCOL, X_PROTOCOL_REVISION, VENDOR_RELEASE ); -} - -/* X screensaver support. Not implemented. */ -static Bool -DarwinSaveScreen (ScreenPtr pScreen, int on) -{ - return TRUE; -} - -/* This is a callback from dix during AddScreen() from InitOutput(). - Initialize the screen and communicate information about it back to dix. */ -static Bool -DarwinAddScreen (int index, ScreenPtr pScreen, int argc, char **argv) -{ - int i, dpi; - static int foundIndex = 0; - Bool ret; - VisualPtr visual; - DarwinFramebufferPtr dfb; - - /* reset index of found screens for each server generation */ - if (index == 0) - foundIndex = 0; - - /* allocate space for private per screen storage */ - dfb = xalloc (sizeof (DarwinFramebufferRec)); - SCREEN_PRIV(pScreen) = dfb; - - /* setup hardware/mode specific details */ - ret = QuartzAddScreen (foundIndex, pScreen); - foundIndex++; - if (!ret) - return FALSE; - - /* reset the visual list */ - miClearVisualTypes(); - - /* setup a single visual appropriate for our pixel type. Note: we use - TrueColor, not DirectColor */ - if (dfb->componentCount != 1) - { - if (!miSetVisualTypes (dfb->colorBitsPerPixel, TrueColorMask, - dfb->bitsPerComponent, TrueColor)) - return FALSE; -#ifdef ENABLE_PSEUDOCOLOR - /* FIXME: currently we can't handle pseudocolor windows - inside truecolor top-level windows, so disable this. */ - if (!miSetVisualTypes (8, PseudoColorMask, 8, PseudoColor)) - return FALSE; -#endif - } - else - { - if (!miSetVisualTypes (8, PseudoColorMask, 8, PseudoColor)) - return FALSE; - } - - /* create the common 8 bit PseudoColor visual; do this last to prevent - it becoming the root visual. */ - - miSetPixmapDepths(); - - /* Machine independent screen init */ - if (monitorResolution) - dpi = monitorResolution; - else - dpi = 75; - - /* initialize fb */ - if (!fbScreenInit (pScreen, dfb->framebuffer, dfb->width, - dfb->height, dpi, dpi, - dfb->pitch/(dfb->bitsPerPixel/8), dfb->bitsPerPixel)) - { - return FALSE; - } - - /* set the RGB order correctly for TrueColor */ - if (dfb->bitsPerPixel > 8) - { - int bitsPerRGB = dfb->bitsPerComponent; - - for (i = 0, visual = pScreen->visuals; - i < pScreen->numVisuals; i++, visual++) - { - if (visual->class == TrueColor) { - visual->offsetRed = bitsPerRGB * 2; - visual->offsetGreen = bitsPerRGB; - visual->offsetBlue = 0; - visual->redMask = ((1<offsetRed; - visual->greenMask = ((1<offsetGreen; - visual->blueMask = ((1<offsetBlue; - } - } - } - -#ifdef RENDER - if (! fbPictureInit (pScreen, 0, 0)) - return FALSE; -#endif - -#ifdef MITSHM - ShmRegisterFbFuncs (pScreen); -#endif - - /* this must be initialized (why doesn't X have a default?) */ - pScreen->SaveScreen = DarwinSaveScreen; - - /* finish mode dependent screen setup including cursor support */ - if (!QuartzSetupScreen (index, pScreen)) - return FALSE; - - /* create and install the default colormap and set black / white pixels */ - if (!miCreateDefColormap (pScreen)) - return FALSE; - - dixScreenOrigins[index].x = dfb->x; - dixScreenOrigins[index].y = dfb->y; - - ErrorF("Screen %d added: %dx%d @ (%d,%d)\n", - index, dfb->width, dfb->height, dfb->x, dfb->y); - - return TRUE; -} - -/* Search for a file in the standard Library paths, which are (in order): - - ~/Library/ user specific - /Library/ host specific - /Network/Library/ LAN specific - /System/Library/ OS specific - - A sub-path can be specified to search in below the various Library - directories. Returns a new character string (owned by the caller) - containing the full path to the first file found. */ - -/* Library search paths */ -static const char *libraryPathList[] = { - "", - "/Network", - "/System", - NULL -}; - -char * -DarwinFindLibraryFile (const char *file, const char *pathext) -{ - char *home; - char *fullPath; - int i = 0; - - // Return the file name as is if it is already a fully qualified path. - if (!access(file, F_OK)) { - fullPath = xalloc(strlen(file)+1); - strcpy(fullPath, file); - return fullPath; - } - - fullPath = xalloc(PATH_MAX); - - home = getenv("HOME"); - if (home) { - snprintf(fullPath, PATH_MAX, "%s/Library/%s/%s", home, pathext, file); - if (!access(fullPath, F_OK)) - return fullPath; - } - - while (libraryPathList[i]) { - snprintf(fullPath, PATH_MAX, "%s/Library/%s/%s", libraryPathList[i++], - pathext, file); - if (!access(fullPath, F_OK)) - return fullPath; - } - - xfree(fullPath); - return NULL; -} - -/* Press or release the given key, specified by NX keycode. xe must already - have event time and mouse location filled in. pressed is KeyPress or - KeyRelease. keycode is NX keycode without MIN_KEYCODE adjustment. */ -static inline void -DarwinPressKeycode (xEvent *xe, int pressed, int keycode) -{ - if (pressed == KeyRelease && !BitIsOn (keysDown, keycode + MIN_KEYCODE)) - { - /* Don't release keys that aren't pressed. It generates extra - KeyPress events instead of just discarding them. */ - - return; - } - - if (pressed == KeyPress) - SetBit (keysDown, keycode + MIN_KEYCODE); - else - ClearBit (keysDown, keycode + MIN_KEYCODE); - - xe->u.u.type = pressed; - xe->u.u.detail = keycode + MIN_KEYCODE; - (darwinKeyboard->public.processInputProc) (xe, darwinKeyboard, 1); -} - -/* Ensure that X's idea of what modifiers are down matches the real - window server's. Do this by looking at what keys we previously sent - X and deciding if they need to be released/toggled yet to make FLAGS - become X's current modifier state. */ -static void -DarwinUpdateModifiers (xEvent xe, unsigned int flags) -{ - static const struct {int mask; int nxkey;} pairs[] = { - {ShiftMask, NX_MODIFIERKEY_SHIFT}, - {ControlMask, NX_MODIFIERKEY_CONTROL}, - {Mod1Mask, NX_MODIFIERKEY_ALTERNATE}, - {Mod2Mask, NX_MODIFIERKEY_COMMAND}, - {Mod3Mask, NX_MODIFIERKEY_SECONDARYFN} - }; - - int i, keycode; - - for (i = 0; i < (int) (sizeof (pairs) / sizeof (pairs[0])); i++) - { - keycode = DarwinModifierNXKeyToNXKeycode (pairs[i].nxkey, 0); - - if (keycode == 0) - continue; - - /* For each known modifier, sync up the state of the key X thinks - it's bound to and the real value of the flag. */ - - if ((flags & pairs[i].mask) - && !BitIsOn (keysDown, keycode + MIN_KEYCODE)) - { - DarwinPressKeycode (&xe, KeyPress, keycode); - } - else if (!(flags & pairs[i].mask) - && BitIsOn (keysDown, keycode + MIN_KEYCODE)) - { - DarwinPressKeycode (&xe, KeyRelease, keycode); - } - } - - /* Do the same for Lock, but need both press and release to toggle it. */ - - if ((flags ^ lockMods) & LockMask) - { - keycode = DarwinModifierNXKeyToNXKeycode (NX_MODIFIERKEY_ALPHALOCK, 0); - - if (keycode != 0) - { - DarwinPressKeycode (&xe, KeyPress, keycode); - DarwinPressKeycode (&xe, KeyRelease, keycode); - - lockMods ^= LockMask; - } - } -} - -/* Release all non-modifier keys that we think are currently pressed. - Usually this is done when X becomes inactive to avoid leaving keys - stuck down when we become active again. Modifiers are handled separately - in the function above. */ -static void -DarwinReleaseKeys (void) -{ - KeyClassPtr keyc = darwinKeyboard->key; - xEvent xe; - int i, x, y; - - memset (&xe, 0, sizeof (xe)); - xe.u.keyButtonPointer.time = GetTimeInMillis (); - xe.u.keyButtonPointer.state = darwinKeyboard->key->state; - GetSpritePosition (&x, &y); - xe.u.keyButtonPointer.rootX = x; - xe.u.keyButtonPointer.rootY = y; - - for (i = 0; i < DOWN_LENGTH * 8; i++) - { - if (!keyc->modifierMap[i] && BitIsOn (keysDown, i)) - DarwinPressKeycode (&xe, KeyRelease, i - MIN_KEYCODE); - } -} - -static int -parseModifierString (const char *str) -{ - if (strcasecmp (str, "shift") == 0) - return ShiftMask; - else if (strcasecmp (str, "control") == 0) - return ControlMask; - else if (strcasecmp (str, "option") == 0) - return Mod1Mask; - else if (strcasecmp (str, "command") == 0) - return Mod2Mask; - else if (strcasecmp (str, "fn") == 0) - return Mod3Mask; - else - return 0; -} - -/* Parse a list of modifier names and return a corresponding modifier mask */ -static int -DarwinParseModifierList (const char *constmodifiers) -{ - int result, mask; - char *modifiers, *modifier, *p; - - if (constmodifiers == NULL - || strlen (constmodifiers) == 0 - || strcasecmp (constmodifiers, "none") == 0) - { - return 0; - } - - modifiers = strdup (constmodifiers); - p = modifiers; - result = 0; - - while (p != NULL) - { - modifier = strsep (&p, " ,+&|/"); /* allow lots of separators */ - mask = parseModifierString (modifier); - if (mask != 0) - result |= mask; - else - ErrorF ("fakebuttons: Unknown modifier \"%s\"\n", modifier); - } - - free (modifiers); - return result; -} - -void -DarwinSetFakeButtons (const char *mod2, const char *mod3) -{ - if (mod2 != NULL) - darwinFakeMouse2Mask = DarwinParseModifierList (mod2); - if (mod3 != NULL) - darwinFakeMouse3Mask = DarwinParseModifierList (mod3); -} - -/* Read and process events from the event pipe until it is empty. */ -void -ProcessInputEvents (void) -{ - static int here_before = 0; - - /* last known modifier state */ - static unsigned int current_flags = 0; - - /* button number and modifier mask of currently pressed fake button */ - static int fake_button; - static unsigned int fake_button_mask, fake_button_modifier; - - xEvent xe; - - if (!here_before) - { - X11ApplicationServerReady (); - here_before = TRUE; - } - - while (DarwinDequeueEvent (&xe)) - { - unsigned int real_state; - - real_state = xe.u.keyButtonPointer.state; - xe.u.keyButtonPointer.state |= fake_button_modifier; - - /* Filter event for faked mouse button presses. */ - if (darwinFakeButtons) - { - switch (xe.u.u.type) - { - case ButtonPress: - if (xe.u.u.detail != 1) - break; - if ((xe.u.keyButtonPointer.state & darwinFakeMouse2Mask) - == darwinFakeMouse2Mask) - { - fake_button = 2; - fake_button_modifier = Button2Mask; - fake_button_mask = darwinFakeMouse2Mask; - xe.u.u.detail = 2; - } - else if ((xe.u.keyButtonPointer.state & darwinFakeMouse3Mask) - == darwinFakeMouse3Mask) - { - fake_button = 3; - fake_button_modifier = Button3Mask; - fake_button_mask = darwinFakeMouse3Mask; - xe.u.u.detail = 3; - } - break; - - case ButtonRelease: - if (fake_button != 0 && xe.u.u.detail == 1) - xe.u.u.detail = fake_button; - break; - } - } - - xe.u.keyButtonPointer.state &= ~fake_button_mask; - - switch (xe.u.u.type) - { - case 0: /* flags-changed */ - case KeyPress: - if (current_flags == 0 - && darwinSyncKeymap && darwinKeymapFile == NULL) - { - /* See if keymap has changed. */ - - static unsigned int last_seed; - unsigned int this_seed; - - this_seed = DarwinSystemKeymapSeed (); - if (this_seed != last_seed) - { - last_seed = this_seed; - DarwinKeyboardReload (darwinKeyboard); - } - } - /* fall through */ - - case KeyRelease: - case ButtonPress: - case ButtonRelease: - case MotionNotify: - - /* Initialize time field. */ - - xe.u.keyButtonPointer.time = GetTimeInMillis (); - - /* Update X's idea of what modifiers are set. */ - - if (xe.u.keyButtonPointer.state != 0xffff - && current_flags != xe.u.keyButtonPointer.state) - { - current_flags = xe.u.keyButtonPointer.state; - DarwinUpdateModifiers (xe, current_flags); - } - } - - switch (xe.u.u.type) - { - case 0: - break; - - case MotionNotify: - if (!quartzServerVisible) - { - xp_window_id wid; - - /* Sigh. Need to check that we're really over one of - our windows. (We need to receive pointer events while - not in the foreground, and the only way to do that - right now is to ask for _all_ pointer events..) */ - - wid = 0; - xp_find_window (xe.u.keyButtonPointer.rootX, - xe.u.keyButtonPointer.rootY, 0, &wid); - if (wid == 0) - break; - } - - /* Shift from global screen coordinates to coordinates - relative to the origin of the current screen. */ - - xe.u.keyButtonPointer.rootX -= darwinMainScreenX - - dixScreenOrigins[miPointerCurrentScreen()->myNum].x; - xe.u.keyButtonPointer.rootY -= darwinMainScreenY - - dixScreenOrigins[miPointerCurrentScreen()->myNum].y; - - miPointerAbsoluteCursor (xe.u.keyButtonPointer.rootX, - xe.u.keyButtonPointer.rootY, - xe.u.keyButtonPointer.time); - break; - - case ButtonPress: - case ButtonRelease: - darwinPointer->public.processInputProc (&xe, darwinPointer, 1); - break; - - case KeyPress: - case KeyRelease: - DarwinPressKeycode (&xe, xe.u.u.type, xe.u.u.detail); - break; - - case ClientMessage: - /* Update server's current time, since we may generate - events, and it's nice if the timestamps are correct. */ - currentTime.milliseconds = GetTimeInMillis (); - - switch (xe.u.clientMessage.u.l.type) - { - case kXdarwinQuit: - GiveUp (0); - break; - - case kXquartzDeactivate: - DarwinReleaseKeys (); - /* fall through */ - - default: - if (xe.u.clientMessage.u.l.type >= kXquartzFirstEvent - && xe.u.clientMessage.u.l.type <= kXquartzLastEvent) - { - QuartzClientMessage (&xe); - } - else - { - ErrorF ("Unknown application defined event: %d.\n", - xe.u.clientMessage.u.l.longs0); - } - break; - } - break; - - default: - ErrorF("Unknown event caught: %d\n", xe.u.u.type); - break; - } - - /* Filter event for faked mouse button releases. */ - if (fake_button != 0 && xe.u.u.type == ButtonRelease) - { - current_flags |= (real_state & fake_button_mask); - DarwinUpdateModifiers (xe, current_flags); - - fake_button = 0; - fake_button_modifier = 0; - fake_button_mask = 0; - } - } - - miPointerUpdate (); -} - -void -DarwinEnqueuePointerEvent (xEvent *xe) -{ - darwinPointer->public.processInputProc (xe, darwinPointer, 1); -} - -/* Register the keyboard and mouse devices */ -void -InitInput (int argc, char **argv) -{ - DarwinInputInit (); - - darwinPointer = AddInputDevice(DarwinMouseProc, TRUE); - RegisterPointerDevice( darwinPointer ); - - darwinKeyboard = AddInputDevice(DarwinKeybdProc, TRUE); - RegisterKeyboardDevice( darwinKeyboard ); -} - -void -DarwinAdjustScreenOrigins (ScreenInfo *pScreenInfo) -{ - int i, left, top; - - /* Shift all screens so the X11 (0, 0) coordinate is at the top - left of the global screen coordinates. - - Screens can be arranged so the top left isn't on any screen, so - instead use the top left of the leftmost screen as (0,0). This - may mean some screen space is in -y, but it's better that (0,0) - be onscreen, or else default xterms disappear. It's better that - -y be used than -x, because when popup menus are forced - "onscreen" by dumb window managers like twm, they'll shift the - menus down instead of left, which still looks funny but is an - easier target to hit. */ - - left = dixScreenOrigins[0].x; - top = dixScreenOrigins[0].y; - - /* Find leftmost screen. If there's a tie, take the topmost of the two. */ - for (i = 1; i < pScreenInfo->numScreens; i++) { - if (dixScreenOrigins[i].x < left || - (dixScreenOrigins[i].x == left && - dixScreenOrigins[i].y < top)) - { - left = dixScreenOrigins[i].x; - top = dixScreenOrigins[i].y; - } - } - - darwinMainScreenX = left; - darwinMainScreenY = top; - - /* Shift all screens so that there is a screen whose top left - is at X11 (0,0) and at global screen coordinate - (darwinMainScreenX, darwinMainScreenY). */ - - if (darwinMainScreenX != 0 || darwinMainScreenY != 0) { - for (i = 0; i < pScreenInfo->numScreens; i++) { - dixScreenOrigins[i].x -= darwinMainScreenX; - dixScreenOrigins[i].y -= darwinMainScreenY; - ErrorF("Screen %d placed at X11 coordinate (%d,%d).\n", - i, dixScreenOrigins[i].x, dixScreenOrigins[i].y); - } - } -} - -/* Initialize screenInfo for all actually accessible framebuffers. - - The display mode dependent code gets called three times. The mode - specific InitOutput routines are expected to discover the number of - potentially useful screens and cache routes to them internally. - Inside DarwinAddScreen are two other mode specific calls. A mode - specific AddScreen routine is called for each screen to actually - initialize the screen with the ScreenPtr structure. After other - screen setup has been done, a mode specific SetupScreen function can - be called to finalize screen setup. */ - -void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) -{ - int i; - static unsigned long generation = 0; - - pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER; - pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; - pScreenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; - pScreenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; - - /* List how we want common pixmap formats to be padded */ - pScreenInfo->numPixmapFormats = NUMFORMATS; - for (i = 0; i < NUMFORMATS; i++) - pScreenInfo->formats[i] = formats[i]; - - /* Allocate private storage for each screen's Darwin specific info */ - if (generation != serverGeneration) { - darwinScreenIndex = AllocateScreenPrivateIndex(); - generation = serverGeneration; - } - - /* Discover screens and do mode specific initialization */ - QuartzInitOutput(argc, argv); - - for (i = 0; i < darwinScreensFound; i++) - AddScreen( DarwinAddScreen, argc, argv ); - - DarwinAdjustScreenOrigins (pScreenInfo); - - PseudoramiXExtensionInit (argc, argv); - AppleDRIExtensionInit (); - AppleWMExtensionInit (); - - DRIExtensionInit (); -} - -void -OsVendorFatalError (void) -{ - ErrorF( " OsVendorFatalError\n" ); -} - -void -OsVendorInit (void) -{ - if (serverGeneration == 1) - DarwinPrintBanner(); -} - -/* Process device-dependent command line args. Returns 0 if argument is - not device dependent, otherwise Count of number of elements of argv - that are part of a device dependent commandline option. */ -int -ddxProcessArgument (int argc, char *argv[], int i) -{ - int numDone; - - if ((numDone = QuartzProcessArgument( argc, argv, i ))) - return numDone; - - if ( !strcmp( argv[i], "-fakebuttons" ) ) { - darwinFakeButtons = TRUE; - ErrorF( "Faking a three button mouse\n" ); - return 1; - } - - if ( !strcmp( argv[i], "-nofakebuttons" ) ) { - darwinFakeButtons = FALSE; - ErrorF( "Not faking a three button mouse\n" ); - return 1; - } - - if (!strcmp( argv[i], "-fakemouse2" ) ) { - if ( i == argc-1 ) { - FatalError( "-fakemouse2 must be followed by a modifer list\n" ); - } - darwinFakeMouse2Mask = DarwinParseModifierList(argv[i+1]); - return 2; - } - - if (!strcmp( argv[i], "-fakemouse3" ) ) { - if ( i == argc-1 ) { - FatalError( "-fakemouse3 must be followed by a modifer list\n" ); - } - darwinFakeMouse3Mask = DarwinParseModifierList(argv[i+1]); - return 2; - } - - if ( !strcmp( argv[i], "-keymap" ) ) { - if ( i == argc-1 ) { - FatalError( "-keymap must be followed by a filename\n" ); - } - darwinKeymapFile = argv[i+1]; - return 2; - } - - if ( !strcmp( argv[i], "-nokeymap" ) ) { - darwinKeymapFile = NULL; - return 1; - } - - if ( !strcmp( argv[i], "+synckeymap" ) ) { - darwinSyncKeymap = TRUE; - return 1; - } - if ( !strcmp( argv[i], "-synckeymap" ) ) { - darwinSyncKeymap = FALSE; - return 1; - } - - if (strcmp (argv[i], "-swapAltMeta") == 0) { - darwinSwapAltMeta = TRUE; - return 1; - } - - if (!strcmp( argv[i], "-showconfig" ) || !strcmp( argv[i], "-version" )) { - DarwinPrintBanner(); - exit(0); - } - - /* XDarwinStartup uses this argument to indicate the IOKit X server - should be started. Ignore it here. */ - if ( !strcmp( argv[i], "-iokit" ) ) { - return 1; - } - - return 0; -} - -/* Print out correct use of device dependent commandline options. - Maybe the user now knows what really to do ... */ -void -ddxUseMsg (void) -{ - ErrorF("\n"); - ErrorF("\n"); - ErrorF("Device Dependent Usage:\n"); - ErrorF("\n"); - ErrorF("-depth use bits per pixel. Options: 8, 15, 24\b\n"); - ErrorF("-fakebuttons fake a 3 button mouse with Command and Option\n"); - ErrorF("-nofakebuttons\n"); - ErrorF("-fakemouse2 fake middle mouse button with modifier keys\n"); - ErrorF("-fakemouse3 fake right mouse button with modifier keys\n"); - ErrorF(" e.g.: -fakemouse2 \"option,shift\"\n"); - ErrorF("-keymap read the keymap from \n"); - ErrorF("-nokeymap\n"); - ErrorF("+synckeymap synchronize X keymap with system keymap\n"); - ErrorF("-synckeymap only set X keymap on server startup\n"); - ErrorF("-swapAltMeta swap meaning of Alt and Meta modifiers\n"); - ErrorF("-version show server version.\n"); - ErrorF("\n"); -} - -/* Device dependent cleanup. Called by dix before normal server death. */ -void -ddxGiveUp (void) -{ - ErrorF( "Quitting XDarwin...\n" ); - QuartzGiveUp(); -} - -/* DDX - specific abort routine. Called by AbortServer(). The attempt is - made to restore all original setting of the displays. Also all devices - are closed. */ -void -AbortDDX (void) -{ - ErrorF( " AbortDDX\n" ); - - /* This is needed for a abnormal server exit, since the normal exit stuff - MUST also be performed (i.e. the vt must be left in a defined state) */ - ddxGiveUp(); -} - -extern void GlxExtensionInit(); -extern void GlxWrapInitVisuals(void *procPtr); -void DarwinGlxExtensionInit (void) { GlxExtensionInit (); } -void DarwinGlxWrapInitVisuals (void *ptr) { GlxWrapInitVisuals (ptr); } - -#ifdef DPMSExtension -Bool -DPMSSupported (void) -{ - return FALSE; -} - -void -DPMSSet (int level) -{ -} - -int -DPMSGet (int *level) -{ - return -1; -} -#endif - -#ifdef DDXTIME -CARD32 -GetTimeInMillis (void) -{ - extern void Microseconds (); - UnsignedWide usec; - - /* This doesn't involve trapping into the kernel, unlike gettimeofday. */ - Microseconds (&usec); - - /* Should be good enough? (-2% error) */ - return (usec.hi << 22) | (usec.lo >> 10); -} -#endif diff --git a/synfig-osx/trunk/launcher/darwin.h b/synfig-osx/trunk/launcher/darwin.h deleted file mode 100644 index 845036e..0000000 --- a/synfig-osx/trunk/launcher/darwin.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2001 Torrey T. Lyons. All Rights Reserved. - * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ -/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.h,v 1.11 2002/03/28 02:21:08 torrey Exp $ */ - -#ifndef _DARWIN_H -#define _DARWIN_H - -#include "inputstr.h" -#include "screenint.h" -#include "scrnintstr.h" -#include "extensions/XKB.h" - -typedef struct { - void *framebuffer; - int x; - int y; - int width; - int height; - int pitch; - int bitsPerPixel; - int componentCount; - int bitsPerComponent; - int colorBitsPerPixel; - unsigned int redMask, greenMask, blueMask; -} DarwinFramebufferRec, *DarwinFramebufferPtr; - -/* From darwinKeyboard.c */ -int DarwinModifierNXKeyToNXKeycode(int key, int side); -void DarwinKeyboardInit(DeviceIntPtr pDev); -void DarwinKeyboardReload (DeviceIntPtr pDev); - -/* from darwin-new-keymap.c */ -unsigned int DarwinSystemKeymapSeed (void); - -/* from darwin-input.c */ -void DarwinEnqueueEvent (const xEvent *e); -Bool DarwinDequeueEvent (xEvent *e); -void DarwinInputInit (void); -void DarwinInputPreInit (void); -int DarwinMouseProc(DeviceIntPtr pPointer, int what); -int DarwinKeybdProc(DeviceIntPtr pDev, int onoff); - -#undef assert -#define assert(x) { if ((x) == 0) \ - FatalError("assert failed on line %d of %s!\n", __LINE__, __FILE__); } -#define kern_assert(x) { if ((x) != KERN_SUCCESS) \ - FatalError("assert failed on line %d of %s with kernel return 0x%x!\n", \ - __LINE__, __FILE__, x); } -#define SCREEN_PRIV(pScreen) \ - ((DarwinFramebufferPtr)pScreen->devPrivates[darwinScreenIndex].ptr) - -#define MIN_KEYCODE XkbMinLegalKeyCode // unfortunately, this isn't 0... - -extern void DarwinEnqueuePointerEvent (xEvent *xe); -extern void DarwinAdjustScreenOrigins (ScreenInfo *pScreenInfo); - -/* Global variables from darwin.c */ -extern int darwinScreenIndex; // index into pScreen.devPrivates -extern int darwinScreensFound; - -/* User preferences used by generic Darwin X server code */ -extern Bool darwinSwapAltMeta; -extern int darwinFakeButtons; -extern char *darwinKeymapFile; -extern Bool darwinSyncKeymap; - -/* location of X11's (0,0) point in global screen coordinates */ -extern int darwinMainScreenX; -extern int darwinMainScreenY; - -/* Client message event type ranges. */ -enum { - kXdarwinFirstEvent = 1, - kXdarwinLastEvent = kXdarwinFirstEvent + 99, - kXquartzFirstEvent = kXdarwinLastEvent + 1, - kXquartzLastEvent = kXquartzFirstEvent + 99, -}; - -/* "Darwin" client message types */ -enum { - kXdarwinQuit = kXdarwinFirstEvent, -}; - -extern char *DarwinFindLibraryFile (const char *file, const char *pathext); -extern void DarwinForeachLibraryFile (const char *dir, - void (*callback) (const char *dir, - const char *file, - void *data), - void *data); - -extern void DarwinSetFakeButtons (const char *mod2, const char *mod3); - -#endif /* _DARWIN_H */ diff --git a/synfig-osx/trunk/launcher/dri-surface.c b/synfig-osx/trunk/launcher/dri-surface.c deleted file mode 100644 index f7249cf..0000000 --- a/synfig-osx/trunk/launcher/dri-surface.c +++ /dev/null @@ -1,940 +0,0 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.34 2001/12/10 19:07:19 dawes Exp $ */ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -Copyright 2000 VA Linux Systems, Inc. -Copyright (c) 2002 Apple Computer, Inc. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Jens Owen - * Rickard E. (Rik) Faith - * - */ - -#ifdef XFree86LOADER -#include "xf86.h" -#include "xf86_ansic.h" -#else -#include -#include -#endif - -#define NEED_REPLIES -#define NEED_EVENTS -#include "X.h" -#include "Xproto.h" -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "colormapst.h" -#include "cursorstr.h" -#include "scrnintstr.h" -#include "windowstr.h" -#include "servermd.h" -#define _APPLEDRI_SERVER_ -#include "appledristr.h" -#include "swaprep.h" -#include "dri-surface.h" -#include "dristruct.h" -#include "mi.h" -#include "mipointer.h" -#include "rootless-common.h" -#include "x-hash.h" -#include "x-hook.h" - -#include - -static int DRIScreenPrivIndex = -1; -static int DRIWindowPrivIndex = -1; -static int DRIPixmapPrivIndex = -1; -static unsigned long DRIGeneration = 0; - -static RESTYPE DRIDrawablePrivResType; - -static x_hash_table *surface_hash; /* maps surface ids -> drawablePrivs */ - -Bool -DRIScreenInit(ScreenPtr pScreen) -{ - DRIScreenPrivPtr pDRIPriv; - int i; - - if (DRIGeneration != serverGeneration) { - if ((DRIScreenPrivIndex = AllocateScreenPrivateIndex()) < 0) - return FALSE; - DRIGeneration = serverGeneration; - } - - pDRIPriv = (DRIScreenPrivPtr) xcalloc(1, sizeof(DRIScreenPrivRec)); - if (!pDRIPriv) { - pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; - return FALSE; - } - - pScreen->devPrivates[DRIScreenPrivIndex].ptr = (pointer) pDRIPriv; - pDRIPriv->directRenderingSupport = TRUE; - pDRIPriv->nrWindows = 0; - - /* Initialize drawable tables */ - for( i=0; i < DRI_MAX_DRAWABLES; i++) { - pDRIPriv->DRIDrawables[i] = NULL; - } - - return TRUE; -} - -Bool -DRIFinishScreenInit(ScreenPtr pScreen) -{ - DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - - /* Wrap DRI support */ - pDRIPriv->wrap.ValidateTree = pScreen->ValidateTree; - pScreen->ValidateTree = DRIValidateTree; - - pDRIPriv->wrap.PostValidateTree = pScreen->PostValidateTree; - pScreen->PostValidateTree = DRIPostValidateTree; - - pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures; - pScreen->WindowExposures = DRIWindowExposures; - - pDRIPriv->wrap.CopyWindow = pScreen->CopyWindow; - pScreen->CopyWindow = DRICopyWindow; - - pDRIPriv->wrap.ClipNotify = pScreen->ClipNotify; - pScreen->ClipNotify = DRIClipNotify; - - ErrorF("[DRI] screen %d installation complete\n", pScreen->myNum); - - return TRUE; -} - -void -DRICloseScreen(ScreenPtr pScreen) -{ - DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - - if (pDRIPriv && pDRIPriv->directRenderingSupport) { - xfree(pDRIPriv); - pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; - } -} - -Bool -DRIExtensionInit(void) -{ - int i; - ScreenPtr pScreen; - - if (DRIScreenPrivIndex < 0) { - return FALSE; - } - - /* Allocate a window private index with a zero sized private area for - * each window, then should a window become a DRI window, we'll hang - * a DRIWindowPrivateRec off of this private index. - */ - if ((DRIWindowPrivIndex = AllocateWindowPrivateIndex()) < 0) - return FALSE; - if ((DRIPixmapPrivIndex = AllocatePixmapPrivateIndex()) < 0) - return FALSE; - - DRIDrawablePrivResType = CreateNewResourceType(DRIDrawablePrivDelete); - - for (i = 0; i < screenInfo.numScreens; i++) - { - pScreen = screenInfo.screens[i]; - if (!AllocateWindowPrivate(pScreen, DRIWindowPrivIndex, 0)) - return FALSE; - if (!AllocatePixmapPrivate(pScreen, DRIPixmapPrivIndex, 0)) - return FALSE; - } - - return TRUE; -} - -void -DRIReset(void) -{ - /* - * This stub routine is called when the X Server recycles, resources - * allocated by DRIExtensionInit need to be managed here. - * - * Currently this routine is a stub because all the interesting resources - * are managed via the screen init process. - */ -} - -Bool -DRIQueryDirectRenderingCapable(ScreenPtr pScreen, Bool* isCapable) -{ - DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - - if (pDRIPriv) - *isCapable = pDRIPriv->directRenderingSupport; - else - *isCapable = FALSE; - - return TRUE; -} - -Bool -DRIAuthConnection(ScreenPtr pScreen, unsigned int magic) -{ -#if 0 - /* FIXME: something? */ - - DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - - if (drmAuthMagic(pDRIPriv->drmFD, magic)) return FALSE; -#endif - return TRUE; -} - -static void -DRIUpdateSurface (DRIDrawablePrivPtr pDRIDrawablePriv, DrawablePtr pDraw) -{ - WindowPtr pTopWin; - xp_window_changes wc; - unsigned int flags = 0; - - if (pDRIDrawablePriv->sid == 0) - return; - -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 - wc.depth = (pDraw->bitsPerPixel == 32 ? XP_DEPTH_ARGB8888 - : pDraw->bitsPerPixel == 16 ? XP_DEPTH_RGB555 : XP_DEPTH_NIL); - if (wc.depth != XP_DEPTH_NIL) - flags |= XP_DEPTH; -#endif - - if (pDraw->type == DRAWABLE_WINDOW) { - WindowPtr pWin = (WindowPtr) pDraw; - - DRIStopDrawing (&pWin->drawable, FALSE); - - pTopWin = TopLevelParent (pWin); - - wc.x = pWin->drawable.x - (pTopWin->drawable.x - pTopWin->borderWidth); - wc.y = pWin->drawable.y - (pTopWin->drawable.y - pTopWin->borderWidth); - wc.width = pWin->drawable.width; - wc.height = pWin->drawable.height; - wc.bit_gravity = XP_GRAVITY_NONE; - - wc.shape_nrects = REGION_NUM_RECTS (&pWin->clipList); - wc.shape_rects = REGION_RECTS (&pWin->clipList); - wc.shape_tx = - (pTopWin->drawable.x - pTopWin->borderWidth); - wc.shape_ty = - (pTopWin->drawable.y - pTopWin->borderWidth); - - flags |= XP_BOUNDS | XP_SHAPE; - - pDRIDrawablePriv->x = pWin->drawable.x - pTopWin->borderWidth; - pDRIDrawablePriv->y = pWin->drawable.y - pTopWin->borderWidth; - - } else if (pDraw->type == DRAWABLE_PIXMAP) { - wc.x = 0; - wc.y = 0; - wc.width = pDraw->width; - wc.height = pDraw->height; - wc.bit_gravity = XP_GRAVITY_NONE; - flags |= XP_BOUNDS; - } - - xp_configure_surface (pDRIDrawablePriv->sid, flags, &wc); -} - -Bool -DRICreateSurface (ScreenPtr pScreen, Drawable id, - DrawablePtr pDrawable, xp_client_id client_id, - xp_surface_id *surface_id, unsigned int ret_key[2], - void (*notify) (void *arg, void *data), void *notify_data) -{ - DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - DRIDrawablePrivPtr pDRIDrawablePriv; - WindowPtr pWin; - PixmapPtr pPix; - xp_window_id wid = 0; - - if (pDrawable->type == DRAWABLE_WINDOW) { - pWin = (WindowPtr)pDrawable; - pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); - if (pDRIDrawablePriv == NULL) { - WindowPtr pTopWin; - xp_error err; - xp_window_changes wc; - - pTopWin = TopLevelParent (pWin); - - /* allocate a DRI Window Private record */ - if (!(pDRIDrawablePriv = xcalloc(1, sizeof(DRIDrawablePrivRec)))) { - return FALSE; - } - - pDRIDrawablePriv->pDraw = pDrawable; - pDRIDrawablePriv->pScreen = pScreen; - pDRIDrawablePriv->refCount = 0; - pDRIDrawablePriv->drawableIndex = -1; - pDRIDrawablePriv->notifiers = NULL; - - /* find the physical window */ - wid = RootlessGetPhysicalWindow (pTopWin, TRUE); - if (wid == 0) { - xfree (pDRIDrawablePriv); - return FALSE; - } - - /* allocate the physical surface */ - err = xp_create_surface (wid, &pDRIDrawablePriv->sid); - if (err != Success) { - xfree (pDRIDrawablePriv); - return FALSE; - } - - /* Make it visible */ - wc.stack_mode = XP_MAPPED_ABOVE; - wc.sibling = 0; - err = xp_configure_surface (pDRIDrawablePriv->sid, - XP_STACKING, &wc); - if (err != Success) - { - xp_destroy_surface (pDRIDrawablePriv->sid); - xfree (pDRIDrawablePriv); - return FALSE; - } - - /* save private off of preallocated index */ - pWin->devPrivates[DRIWindowPrivIndex].ptr = (pointer)pDRIDrawablePriv; - } - } -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 - else if (pDrawable->type == DRAWABLE_PIXMAP) { - pPix = (PixmapPtr)pDrawable; - pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix); - if (pDRIDrawablePriv == NULL) { - xp_error err; - - /* allocate a DRI Window Private record */ - if (!(pDRIDrawablePriv = xcalloc(1, sizeof(DRIDrawablePrivRec)))) { - return FALSE; - } - - pDRIDrawablePriv->pDraw = pDrawable; - pDRIDrawablePriv->pScreen = pScreen; - pDRIDrawablePriv->refCount = 0; - pDRIDrawablePriv->drawableIndex = -1; - pDRIDrawablePriv->notifiers = NULL; - - /* Passing a null window id to Xplugin in 10.3+ asks for - an accelerated offscreen surface. */ - - err = xp_create_surface (0, &pDRIDrawablePriv->sid); - if (err != Success) { - xfree (pDRIDrawablePriv); - return FALSE; - } - - /* save private off of preallocated index */ - pPix->devPrivates[DRIPixmapPrivIndex].ptr = (pointer)pDRIDrawablePriv; - } - } -#endif - else { /* for GLX 1.3, a PBuffer */ - /* NOT_DONE */ - return FALSE; - } - - /* Finish initialization of new surfaces */ - if (pDRIDrawablePriv->refCount == 0) { - unsigned int key[2] = {0}; - xp_error err; - - /* try to give the client access to the surface - FIXME: how to export pixmaps? */ - if (client_id != 0 && wid != 0) - { - err = xp_export_surface (wid, pDRIDrawablePriv->sid, - client_id, key); - if (err != Success) { - xp_destroy_surface (pDRIDrawablePriv->sid); - xfree (pDRIDrawablePriv); - return FALSE; - } - } - - pDRIDrawablePriv->key[0] = key[0]; - pDRIDrawablePriv->key[1] = key[1]; - - ++pDRIPriv->nrWindows; - - /* and stash it by surface id */ - if (surface_hash == NULL) - surface_hash = x_hash_table_new (NULL, NULL, NULL, NULL); - x_hash_table_insert (surface_hash, - (void *) pDRIDrawablePriv->sid, pDRIDrawablePriv); - - /* track this in case this window is destroyed */ - AddResource(id, DRIDrawablePrivResType, (pointer)pDrawable); - - /* Initialize shape */ - DRIUpdateSurface (pDRIDrawablePriv, pDrawable); - } - - pDRIDrawablePriv->refCount++; - - *surface_id = pDRIDrawablePriv->sid; - - if (ret_key != NULL) { - ret_key[0] = pDRIDrawablePriv->key[0]; - ret_key[1] = pDRIDrawablePriv->key[1]; - } - - if (notify != NULL) { - pDRIDrawablePriv->notifiers = x_hook_add (pDRIDrawablePriv->notifiers, - notify, notify_data); - } - - return TRUE; -} - -Bool -DRIDestroySurface(ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable, - void (*notify) (void *, void *), void *notify_data) -{ - DRIDrawablePrivPtr pDRIDrawablePriv; - - if (pDrawable->type == DRAWABLE_WINDOW) { - pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW((WindowPtr)pDrawable); - } else if (pDrawable->type == DRAWABLE_PIXMAP) { - pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_PIXMAP((PixmapPtr)pDrawable); - } else { - return FALSE; - } - - if (pDRIDrawablePriv != NULL) { - if (notify != NULL) { - pDRIDrawablePriv->notifiers = x_hook_remove (pDRIDrawablePriv->notifiers, - notify, notify_data); - } - if (--pDRIDrawablePriv->refCount <= 0) { - /* This calls back to DRIDrawablePrivDelete - which frees the private area */ - FreeResourceByType(id, DRIDrawablePrivResType, FALSE); - } - } - - return TRUE; -} - -Bool -DRIDrawablePrivDelete(pointer pResource, XID id) -{ - DrawablePtr pDrawable = (DrawablePtr)pResource; - DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pDrawable->pScreen); - DRIDrawablePrivPtr pDRIDrawablePriv = NULL; - WindowPtr pWin = NULL; - PixmapPtr pPix = NULL; - - if (pDrawable->type == DRAWABLE_WINDOW) { - pWin = (WindowPtr)pDrawable; - pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); - DRIStopDrawing (pDrawable, FALSE); - pDRIPriv->drawing = x_list_remove (pDRIPriv->drawing, - pDRIDrawablePriv); - } else if (pDrawable->type == DRAWABLE_PIXMAP) { - pPix = (PixmapPtr)pDrawable; - pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix); - } - - if (pDRIDrawablePriv == NULL) - return FALSE; - - if (pDRIDrawablePriv->drawableIndex != -1) { - /* release drawable table entry */ - pDRIPriv->DRIDrawables[pDRIDrawablePriv->drawableIndex] = NULL; - } - - if (pDRIDrawablePriv->sid != 0) { - xp_destroy_surface (pDRIDrawablePriv->sid); - x_hash_table_remove (surface_hash, (void *) pDRIDrawablePriv->sid); - } - - if (pDRIDrawablePriv->notifiers != NULL) - x_hook_free (pDRIDrawablePriv->notifiers); - - xfree(pDRIDrawablePriv); - - if (pDrawable->type == DRAWABLE_WINDOW) { - pWin->devPrivates[DRIWindowPrivIndex].ptr = NULL; - } else if (pDrawable->type == DRAWABLE_PIXMAP) { - pPix->devPrivates[DRIPixmapPrivIndex].ptr = NULL; - } - - --pDRIPriv->nrWindows; - - return TRUE; -} - -void -DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - DRIDrawablePrivPtr pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); - - if(pDRIDrawablePriv) { - /* FIXME: something? */ - } - - pScreen->WindowExposures = pDRIPriv->wrap.WindowExposures; - - (*pScreen->WindowExposures)(pWin, prgn, bsreg); - - pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures; - pScreen->WindowExposures = DRIWindowExposures; - -} - -void -DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - DRIDrawablePrivPtr pDRIDrawablePriv; - - if(pDRIPriv->nrWindows > 0) { - pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW (pWin); - if (pDRIDrawablePriv != NULL) { - DRIUpdateSurface (pDRIDrawablePriv, &pWin->drawable); - } - } - - /* unwrap */ - pScreen->CopyWindow = pDRIPriv->wrap.CopyWindow; - - /* call lower layers */ - (*pScreen->CopyWindow)(pWin, ptOldOrg, prgnSrc); - - /* rewrap */ - pDRIPriv->wrap.CopyWindow = pScreen->CopyWindow; - pScreen->CopyWindow = DRICopyWindow; -} - -int -DRIValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) -{ - ScreenPtr pScreen = pParent->drawable.pScreen; - DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - int returnValue; - - /* unwrap */ - pScreen->ValidateTree = pDRIPriv->wrap.ValidateTree; - - /* call lower layers */ - returnValue = (*pScreen->ValidateTree)(pParent, pChild, kind); - - /* rewrap */ - pDRIPriv->wrap.ValidateTree = pScreen->ValidateTree; - pScreen->ValidateTree = DRIValidateTree; - - return returnValue; -} - -void -DRIPostValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) -{ - ScreenPtr pScreen; - DRIScreenPrivPtr pDRIPriv; - - if (pParent) { - pScreen = pParent->drawable.pScreen; - } else { - pScreen = pChild->drawable.pScreen; - } - pDRIPriv = DRI_SCREEN_PRIV(pScreen); - - if (pDRIPriv->wrap.PostValidateTree) { - /* unwrap */ - pScreen->PostValidateTree = pDRIPriv->wrap.PostValidateTree; - - /* call lower layers */ - (*pScreen->PostValidateTree)(pParent, pChild, kind); - - /* rewrap */ - pDRIPriv->wrap.PostValidateTree = pScreen->PostValidateTree; - pScreen->PostValidateTree = DRIPostValidateTree; - } -} - -void -DRIClipNotify(WindowPtr pWin, int dx, int dy) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - DRIDrawablePrivPtr pDRIDrawablePriv; - - if ((pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin))) { - DRIUpdateSurface (pDRIDrawablePriv, &pWin->drawable); - } - - if(pDRIPriv->wrap.ClipNotify) { - pScreen->ClipNotify = pDRIPriv->wrap.ClipNotify; - - (*pScreen->ClipNotify)(pWin, dx, dy); - - pDRIPriv->wrap.ClipNotify = pScreen->ClipNotify; - pScreen->ClipNotify = DRIClipNotify; - } -} - -/* This lets get at the unwrapped functions so that they can correctly - * call the lowerlevel functions, and choose whether they will be - * called at every level of recursion (eg in validatetree). - */ -DRIWrappedFuncsRec * -DRIGetWrappedFuncs(ScreenPtr pScreen) -{ - return &(DRI_SCREEN_PRIV(pScreen)->wrap); -} - -void -DRIQueryVersion(int *majorVersion, - int *minorVersion, - int *patchVersion) -{ - *majorVersion = APPLE_DRI_MAJOR_VERSION; - *minorVersion = APPLE_DRI_MINOR_VERSION; - *patchVersion = APPLE_DRI_PATCH_VERSION; -} - -void -DRISurfaceNotify (xp_surface_id id, int kind) -{ - DRIDrawablePrivPtr pDRIDrawablePriv = NULL; - DRISurfaceNotifyArg arg; - - arg.id = id; - arg.kind = kind; - - if (surface_hash != NULL) - { - pDRIDrawablePriv = x_hash_table_lookup (surface_hash, - (void *) id, NULL); - } - - if (pDRIDrawablePriv == NULL) - return; - - if (kind == AppleDRISurfaceNotifyDestroyed) - { - pDRIDrawablePriv->sid = 0; - x_hash_table_remove (surface_hash, (void *) id); - } - - x_hook_run (pDRIDrawablePriv->notifiers, &arg); - - if (kind == AppleDRISurfaceNotifyDestroyed) - { - /* Kill off the handle. */ - - FreeResourceByType (pDRIDrawablePriv->pDraw->id, - DRIDrawablePrivResType, FALSE); - } -} - - -/* Experimental support for X drawing directly into VRAM surfaces. */ - -Bool -DRIStartDrawing (DrawablePtr pDraw) -{ -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 - return FALSE; -#else - DRIDrawablePrivPtr priv = NULL; - DRIScreenPrivPtr pDRIPriv; - - if (pDraw->type == DRAWABLE_WINDOW) - priv = DRI_DRAWABLE_PRIV_FROM_WINDOW ((WindowPtr)pDraw); -#if 0 - /* FIXME: support pixmaps */ - else if (pDraw->type == DRAWABLE_PIXMAP) - priv = DRI_DRAWABLE_PRIV_FROM_PIXMAP ((PixmapPtr)pDraw); -#endif - - if (priv == NULL) - return FALSE; - - pDRIPriv = DRI_SCREEN_PRIV(priv->pScreen); - - if (!priv->is_drawing) - { - xp_error err; - xp_box r; - - err = xp_lock_window (priv->sid, NULL, NULL, - &priv->data, &priv->rowbytes, &r); - if (err != Success) - return FALSE; - - if (pDraw->type == DRAWABLE_WINDOW) - { - WindowPtr pWin = (WindowPtr) pDraw; - int bw = wBorderWidth (pWin); - - priv->pixmap = - GetScratchPixmapHeader(pWin->drawable.pScreen, r.x2 - r.x1, - r.y2 - r.y1, pWin->drawable.depth, - pWin->drawable.bitsPerPixel, - priv->rowbytes, priv->data); - TranslatePixmapBase (priv->pixmap, - - (pWin->drawable.x - bw), - - (pWin->drawable.y - bw)); - } - - priv->is_drawing = TRUE; - pDRIPriv->drawing = x_list_prepend (pDRIPriv->drawing, priv); - } - - if (pDraw->type == DRAWABLE_WINDOW) - { - WindowPtr pWin = (WindowPtr) pDraw; - - priv->oldPixmap = pWin->drawable.pScreen->GetWindowPixmap (pWin); - pWin->drawable.pScreen->SetWindowPixmap (pWin, priv->pixmap); - } - - return TRUE; -#endif -} - -Bool -DRIStopDrawing (DrawablePtr pDraw, Bool flush) -{ -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 - return FALSE; -#else - DRIDrawablePrivPtr priv = NULL; - ScreenPtr pScreen; - DRIScreenPrivPtr pDRIPriv; - - if (pDraw->type == DRAWABLE_WINDOW) - priv = DRI_DRAWABLE_PRIV_FROM_WINDOW ((WindowPtr)pDraw); - else if (pDraw->type == DRAWABLE_PIXMAP) - priv = DRI_DRAWABLE_PRIV_FROM_PIXMAP ((PixmapPtr)pDraw); - - if (priv == NULL) - return FALSE; - - pScreen = priv->pScreen; - pDRIPriv = DRI_SCREEN_PRIV(pScreen); - - if (priv->is_drawing) - { - xp_unlock_window (priv->sid, flush); - - if (pDraw->type == DRAWABLE_WINDOW) - { - FreeScratchPixmapHeader (priv->pixmap); - pScreen->SetWindowPixmap ((WindowPtr)pDraw, priv->oldPixmap); - } - - priv->pixmap = NULL; - - /* If we didn't flush don't forget that we still need to.. */ - if (flush) - pDRIPriv->drawing = x_list_remove (pDRIPriv->drawing, priv); - - priv->is_drawing = FALSE; - } - else if (flush) - { - xp_flush_window (priv->sid); - } - - return TRUE; -#endif /* 10.3 */ -} - -/* true iff two Boxes overlap */ -#define EXTENTCHECK(r1,r2) \ - (!( ((r1)->x2 <= (r2)->x1) || \ - ((r1)->x1 >= (r2)->x2) || \ - ((r1)->y2 <= (r2)->y1) || \ - ((r1)->y1 >= (r2)->y2) ) ) - -Bool -DRIDamageRegion (DrawablePtr pDraw, RegionPtr pRegion) -{ -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 - return FALSE; -#else - DRIDrawablePrivPtr priv = NULL; - RegionRec clipped; - BoxPtr b1, b2; - - if (pDraw->type == DRAWABLE_WINDOW) - priv = DRI_DRAWABLE_PRIV_FROM_WINDOW ((WindowPtr)pDraw); - - if (priv == NULL) - return FALSE; - - /* adapted from RootlessDamageRegion () */ - - if (pDraw->type == DRAWABLE_WINDOW) - { - WindowPtr pWin = (WindowPtr) pDraw; - - b1 = REGION_EXTENTS (pWin->drawable.pScreen, &pWin->borderClip); - b2 = REGION_EXTENTS (pWin->drawable.pScreen, pRegion); - - if (EXTENTCHECK (b1, b2)) - { - /* Regions may overlap. */ - - if (REGION_NUM_RECTS (pRegion) == 1) - { - int in; - - /* Damaged region only has a single rect, so we can - just compare that against the region */ - - in = RECT_IN_REGION (pWin->drawable.pScreen, &pWin->borderClip, - REGION_RECTS (pRegion)); - if (in == rgnIN) - { - /* clip totally contains pRegion */ - - xp_mark_window (priv->sid, REGION_NUM_RECTS (pRegion), - REGION_RECTS (pRegion), - -priv->x, -priv->y); - - RootlessQueueRedisplay (pWin->drawable.pScreen); - goto out; - } - else if (in == rgnOUT) - { - /* clip doesn't contain pRegion */ - - goto out; - } - } - - /* clip overlaps pRegion, need to intersect */ - - REGION_INIT (pWin->drawable.pScreen, &clipped, NullBox, 0); - REGION_INTERSECT (pWin->drawable.pScreen, &clipped, - &pWin->borderClip, pRegion); - - xp_mark_window (priv->sid, REGION_NUM_RECTS (&clipped), - REGION_RECTS (&clipped), -priv->x, -priv->y); - - REGION_UNINIT (pWin->drawable.pScreen, &clipped); - - RootlessQueueRedisplay (pWin->drawable.pScreen); - } - } - -out: - return TRUE; -#endif /* 10.3 */ -} - -void -DRISynchronizeDrawable (DrawablePtr pDraw, Bool flush) -{ -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 - ScreenPtr pScreen; - DRIScreenPrivPtr pDRIPriv; - DRIDrawablePrivPtr priv; - x_list *node, *copy; - - pScreen = pDraw->pScreen; - pDRIPriv = DRI_SCREEN_PRIV(pScreen); - - if (pDRIPriv == NULL || pDRIPriv->drawing == NULL) - return; - - if (pDraw->type == DRAWABLE_WINDOW) - { - WindowPtr pWin = TopLevelParent ((WindowPtr) pDraw); - - /* need to find _any_ window under pWin that is drawing. Scan the - list looking for candidates. */ - - copy = x_list_copy (pDRIPriv->drawing); - - for (node = copy; node != NULL; node = node->next) - { - priv = node->data; - - if (priv->pDraw->type == DRAWABLE_WINDOW - && TopLevelParent ((WindowPtr) priv->pDraw) == pWin) - { - DRIStopDrawing (priv->pDraw, flush); - } - } - - x_list_free (copy); - } - else - { - DRIStopDrawing (pDraw, flush); - } -#endif /* 10.3 */ -} - -void -DRISynchronize (Bool flush) -{ -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 - int i; - ScreenPtr pScreen; - DRIScreenPrivPtr pDRIPriv; - DRIDrawablePrivPtr priv; - x_list *node, *copy; - - for (i = 0; i < screenInfo.numScreens; i++) - { - pScreen = screenInfo.screens[i]; - pDRIPriv = DRI_SCREEN_PRIV(pScreen); - - if (pDRIPriv == NULL || pDRIPriv->drawing == NULL) - continue; - - copy = x_list_copy (pDRIPriv->drawing); - - for (node = copy; node != NULL; node = node->next) - { - priv = node->data; - - DRIStopDrawing (priv->pDraw, flush); - } - - x_list_free (copy); - } -#endif /* 10.3 */ -} diff --git a/synfig-osx/trunk/launcher/dri-surface.h b/synfig-osx/trunk/launcher/dri-surface.h deleted file mode 100644 index 8f11739..0000000 --- a/synfig-osx/trunk/launcher/dri-surface.h +++ /dev/null @@ -1,115 +0,0 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.18 2001/03/21 16:21:40 dawes Exp $ */ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -Copyright (c) 2002 Apple Computer, Inc. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Jens Owen - * - */ - -/* Prototypes for DRI functions */ - -#ifndef _DRI_SURFACE_H_ -#define _DRI_SURFACE_H_ - -#include "dri.h" -#include "Xplugin.h" - -typedef void (*ClipNotifyPtr)( WindowPtr, int, int ); - - -/* - * These functions can be wrapped by the DRI. Each of these have - * generic default funcs (initialized in DRICreateInfoRec) and can be - * overridden by the driver in its [driver]DRIScreenInit function. - */ -typedef struct { - WindowExposuresProcPtr WindowExposures; - CopyWindowProcPtr CopyWindow; - ValidateTreeProcPtr ValidateTree; - PostValidateTreeProcPtr PostValidateTree; - ClipNotifyProcPtr ClipNotify; -} DRIWrappedFuncsRec, *DRIWrappedFuncsPtr; - -typedef struct { - xp_surface_id id; - int kind; -} DRISurfaceNotifyArg; - -extern void DRIClipNotify(WindowPtr pWin, - int dx, - int dy); - -extern void DRICloseScreen(ScreenPtr pScreen); - -extern void DRICopyWindow(WindowPtr pWin, - DDXPointRec ptOldOrg, - RegionPtr prgnSrc); - -extern Bool DRICreateSurface(ScreenPtr pScreen, - Drawable id, - DrawablePtr pDrawable, - xp_client_id client_id, - xp_surface_id *surface_id, - unsigned int key[2], - void (*notify) (void *arg, void *data), - void *notify_data); - -extern Bool DRIDestroySurface(ScreenPtr pScreen, - Drawable id, - DrawablePtr pDrawable, - void (*notify) (void *arg, void *data), - void *notify_data); - -extern Bool DRIDrawablePrivDelete(pointer pResource, - XID id); - -extern DRIWrappedFuncsRec *DRIGetWrappedFuncs(ScreenPtr pScreen); - -extern void DRIPostValidateTree(WindowPtr pParent, - WindowPtr pChild, - VTKind kind); - -extern int DRIValidateTree(WindowPtr pParent, - WindowPtr pChild, - VTKind kind); - -extern void DRIWindowExposures(WindowPtr pWin, - RegionPtr prgn, - RegionPtr bsreg); - -extern void DRISurfaceNotify (xp_surface_id id, int kind); - -extern Bool DRIStartDrawing (DrawablePtr pDraw); -extern Bool DRIStopDrawing (DrawablePtr pDraw, Bool flush); -extern Bool DRIDamageRegion (DrawablePtr pDraw, RegionPtr pRegion); -extern void DRISynchronizeDrawable (DrawablePtr pDraw, Bool flush); -extern void DRISynchronize (Bool flush); - -#endif diff --git a/synfig-osx/trunk/launcher/dri.h b/synfig-osx/trunk/launcher/dri.h deleted file mode 100644 index a0766bd..0000000 --- a/synfig-osx/trunk/launcher/dri.h +++ /dev/null @@ -1,64 +0,0 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.18 2001/03/21 16:21:40 dawes Exp $ */ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -Copyright (c) 2002 Apple Computer, Inc. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Jens Owen - * - */ - -/* Prototypes for DRI functions */ - -#ifndef _DRI_H_ - -#include "Xdefs.h" -#include "screenint.h" -#define _APPLEDRI_SERVER_ -#include "appledri.h" - -extern Bool DRIAuthConnection(ScreenPtr pScreen, unsigned int magic); - -extern Bool DRIExtensionInit(void); - -extern Bool DRIFinishScreenInit(ScreenPtr pScreen); - -extern Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen, - Bool *isCapable); - -extern void DRIQueryVersion(int *majorVersion, - int *minorVersion, - int *patchVersion); - -extern void DRIReset(void); - -extern Bool DRIScreenInit(ScreenPtr pScreen); - -#define _DRI_H_ - -#endif diff --git a/synfig-osx/trunk/launcher/dristruct.h b/synfig-osx/trunk/launcher/dristruct.h deleted file mode 100644 index 51185a5..0000000 --- a/synfig-osx/trunk/launcher/dristruct.h +++ /dev/null @@ -1,91 +0,0 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/dristruct.h,v 1.10 2001/03/21 16:21:40 dawes Exp $ */ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -Copyright (c) 2002 Apple Computer, Inc. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Jens Owen - * - */ - -#ifndef DRI_STRUCT_H -#define DRI_STRUCT_H - -#include "dri-surface.h" -#include "x-list.h" - -#define DRI_MAX_DRAWABLES 256 - -#define DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin) \ - ((DRIWindowPrivIndex < 0) ? \ - NULL : \ - ((DRIDrawablePrivPtr)((pWin)->devPrivates[DRIWindowPrivIndex].ptr))) - -#define DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix) \ - ((DRIPixmapPrivIndex < 0) ? \ - NULL : \ - ((DRIDrawablePrivPtr)((pPix)->devPrivates[DRIPixmapPrivIndex].ptr))) - -typedef struct _DRIDrawablePrivRec -{ - xp_surface_id sid; - int drawableIndex; - DrawablePtr pDraw; - ScreenPtr pScreen; - int refCount; - unsigned int key[2]; - x_list *notifiers; /* list of (FUN . DATA) */ - - int x, y; /* relative to physical window */ - - void *data; - unsigned int rowbytes; - PixmapPtr pixmap, oldPixmap; - - unsigned int is_drawing :1; -} DRIDrawablePrivRec, *DRIDrawablePrivPtr; - -#define DRI_SCREEN_PRIV(pScreen) \ - ((DRIScreenPrivIndex < 0) ? \ - NULL : \ - ((DRIScreenPrivPtr)((pScreen)->devPrivates[DRIScreenPrivIndex].ptr))) - -#define DRI_SCREEN_PRIV_FROM_INDEX(screenIndex) ((DRIScreenPrivPtr) \ - (screenInfo.screens[screenIndex]->devPrivates[DRIScreenPrivIndex].ptr)) - - -typedef struct _DRIScreenPrivRec -{ - Bool directRenderingSupport; - int nrWindows; - DRIWrappedFuncsRec wrap; - DrawablePtr DRIDrawables[DRI_MAX_DRAWABLES]; - x_list *drawing; /* list of DRIDrawablePrivPtr */ -} DRIScreenPrivRec, *DRIScreenPrivPtr; - -#endif /* DRI_STRUCT_H */ diff --git a/synfig-osx/trunk/launcher/events.applescript b/synfig-osx/trunk/launcher/events.applescript deleted file mode 100644 index 1da65de..0000000 --- a/synfig-osx/trunk/launcher/events.applescript +++ /dev/null @@ -1,14 +0,0 @@ -on open names - set fileNames to {} - repeat with i from 1 to count of names - set fileNames to fileNames & {quoted form of (POSIX path of (item i of names))} - end repeat - - set fifoLocation to " >> ~/sinfg/fifo" - - repeat with fileName in fileNames - set cmdLine to {"echo O " & fileName & fifoLocation} - do shell script cmdLine - end repeat -end open - diff --git a/synfig-osx/trunk/launcher/keysym2ucs.c b/synfig-osx/trunk/launcher/keysym2ucs.c deleted file mode 100644 index 4186457..0000000 --- a/synfig-osx/trunk/launcher/keysym2ucs.c +++ /dev/null @@ -1,908 +0,0 @@ -/* $XFree86$ - * This module converts keysym values into the corresponding ISO 10646 - * (UCS, Unicode) values. - * - * The array keysymtab[] contains pairs of X11 keysym values for graphical - * characters and the corresponding Unicode value. The function - * keysym2ucs() maps a keysym onto a Unicode value using a binary search, - * therefore keysymtab[] must remain SORTED by keysym value. - * - * The keysym -> UTF-8 conversion will hopefully one day be provided - * by Xlib via XmbLookupString() and should ideally not have to be - * done in X applications. But we are not there yet. - * - * We allow to represent any UCS character in the range U-00000000 to - * U-00FFFFFF by a keysym value in the range 0x01000000 to 0x01ffffff. - * This admittedly does not cover the entire 31-bit space of UCS, but - * it does cover all of the characters up to U-10FFFF, which can be - * represented by UTF-16, and more, and it is very unlikely that higher - * UCS codes will ever be assigned by ISO. So to get Unicode character - * U+ABCD you can directly use keysym 0x0100abcd. - * - * NOTE: The comments in the table below contain the actual character - * encoded in UTF-8, so for viewing and editing best use an editor in - * UTF-8 mode. - * - * Author: Markus G. Kuhn , University of Cambridge, April 2001 - * - * Special thanks to Richard Verhoeven for preparing - * an initial draft of the mapping table. - * - * This software is in the public domain. Share and enjoy! - * - * AUTOMATICALLY GENERATED FILE, DO NOT EDIT !!! (unicode/convmap.pl) - */ - -#include "keysym2ucs.h" - -#include -#include - -struct codepair { - unsigned short keysym; - unsigned short ucs; -}; - -const static struct codepair keysymtab[] = { - { 0x01a1, 0x0104 }, - { 0x01a2, 0x02d8 }, - { 0x01a3, 0x0141 }, - { 0x01a5, 0x013d }, - { 0x01a6, 0x015a }, - { 0x01a9, 0x0160 }, - { 0x01aa, 0x015e }, - { 0x01ab, 0x0164 }, - { 0x01ac, 0x0179 }, - { 0x01ae, 0x017d }, - { 0x01af, 0x017b }, - { 0x01b1, 0x0105 }, - { 0x01b2, 0x02db }, - { 0x01b3, 0x0142 }, - { 0x01b5, 0x013e }, - { 0x01b6, 0x015b }, - { 0x01b7, 0x02c7 }, - { 0x01b9, 0x0161 }, - { 0x01ba, 0x015f }, - { 0x01bb, 0x0165 }, - { 0x01bc, 0x017a }, - { 0x01bd, 0x02dd }, - { 0x01be, 0x017e }, - { 0x01bf, 0x017c }, - { 0x01c0, 0x0154 }, - { 0x01c3, 0x0102 }, - { 0x01c5, 0x0139 }, - { 0x01c6, 0x0106 }, - { 0x01c8, 0x010c }, - { 0x01ca, 0x0118 }, - { 0x01cc, 0x011a }, - { 0x01cf, 0x010e }, - { 0x01d0, 0x0110 }, - { 0x01d1, 0x0143 }, - { 0x01d2, 0x0147 }, - { 0x01d5, 0x0150 }, - { 0x01d8, 0x0158 }, - { 0x01d9, 0x016e }, - { 0x01db, 0x0170 }, - { 0x01de, 0x0162 }, - { 0x01e0, 0x0155 }, - { 0x01e3, 0x0103 }, - { 0x01e5, 0x013a }, - { 0x01e6, 0x0107 }, - { 0x01e8, 0x010d }, - { 0x01ea, 0x0119 }, - { 0x01ec, 0x011b }, - { 0x01ef, 0x010f }, - { 0x01f0, 0x0111 }, - { 0x01f1, 0x0144 }, - { 0x01f2, 0x0148 }, - { 0x01f5, 0x0151 }, - { 0x01f8, 0x0159 }, - { 0x01f9, 0x016f }, - { 0x01fb, 0x0171 }, - { 0x01fe, 0x0163 }, - { 0x01ff, 0x02d9 }, - { 0x02a1, 0x0126 }, - { 0x02a6, 0x0124 }, - { 0x02a9, 0x0130 }, - { 0x02ab, 0x011e }, - { 0x02ac, 0x0134 }, - { 0x02b1, 0x0127 }, - { 0x02b6, 0x0125 }, - { 0x02b9, 0x0131 }, - { 0x02bb, 0x011f }, - { 0x02bc, 0x0135 }, - { 0x02c5, 0x010a }, - { 0x02c6, 0x0108 }, - { 0x02d5, 0x0120 }, - { 0x02d8, 0x011c }, - { 0x02dd, 0x016c }, - { 0x02de, 0x015c }, - { 0x02e5, 0x010b }, - { 0x02e6, 0x0109 }, - { 0x02f5, 0x0121 }, - { 0x02f8, 0x011d }, - { 0x02fd, 0x016d }, - { 0x02fe, 0x015d }, - { 0x03a2, 0x0138 }, - { 0x03a3, 0x0156 }, - { 0x03a5, 0x0128 }, - { 0x03a6, 0x013b }, - { 0x03aa, 0x0112 }, - { 0x03ab, 0x0122 }, - { 0x03ac, 0x0166 }, - { 0x03b3, 0x0157 }, - { 0x03b5, 0x0129 }, - { 0x03b6, 0x013c }, - { 0x03ba, 0x0113 }, - { 0x03bb, 0x0123 }, - { 0x03bc, 0x0167 }, - { 0x03bd, 0x014a }, - { 0x03bf, 0x014b }, - { 0x03c0, 0x0100 }, - { 0x03c7, 0x012e }, - { 0x03cc, 0x0116 }, - { 0x03cf, 0x012a }, - { 0x03d1, 0x0145 }, - { 0x03d2, 0x014c }, - { 0x03d3, 0x0136 }, - { 0x03d9, 0x0172 }, - { 0x03dd, 0x0168 }, - { 0x03de, 0x016a }, - { 0x03e0, 0x0101 }, - { 0x03e7, 0x012f }, - { 0x03ec, 0x0117 }, - { 0x03ef, 0x012b }, - { 0x03f1, 0x0146 }, - { 0x03f2, 0x014d }, - { 0x03f3, 0x0137 }, - { 0x03f9, 0x0173 }, - { 0x03fd, 0x0169 }, - { 0x03fe, 0x016b }, - { 0x047e, 0x203e }, - { 0x04a1, 0x3002 }, - { 0x04a2, 0x300c }, - { 0x04a3, 0x300d }, - { 0x04a4, 0x3001 }, - { 0x04a5, 0x30fb }, - { 0x04a6, 0x30f2 }, - { 0x04a7, 0x30a1 }, - { 0x04a8, 0x30a3 }, - { 0x04a9, 0x30a5 }, - { 0x04aa, 0x30a7 }, - { 0x04ab, 0x30a9 }, - { 0x04ac, 0x30e3 }, - { 0x04ad, 0x30e5 }, - { 0x04ae, 0x30e7 }, - { 0x04af, 0x30c3 }, - { 0x04b0, 0x30fc }, - { 0x04b1, 0x30a2 }, - { 0x04b2, 0x30a4 }, - { 0x04b3, 0x30a6 }, - { 0x04b4, 0x30a8 }, - { 0x04b5, 0x30aa }, - { 0x04b6, 0x30ab }, - { 0x04b7, 0x30ad }, - { 0x04b8, 0x30af }, - { 0x04b9, 0x30b1 }, - { 0x04ba, 0x30b3 }, - { 0x04bb, 0x30b5 }, - { 0x04bc, 0x30b7 }, - { 0x04bd, 0x30b9 }, - { 0x04be, 0x30bb }, - { 0x04bf, 0x30bd }, - { 0x04c0, 0x30bf }, - { 0x04c1, 0x30c1 }, - { 0x04c2, 0x30c4 }, - { 0x04c3, 0x30c6 }, - { 0x04c4, 0x30c8 }, - { 0x04c5, 0x30ca }, - { 0x04c6, 0x30cb }, - { 0x04c7, 0x30cc }, - { 0x04c8, 0x30cd }, - { 0x04c9, 0x30ce }, - { 0x04ca, 0x30cf }, - { 0x04cb, 0x30d2 }, - { 0x04cc, 0x30d5 }, - { 0x04cd, 0x30d8 }, - { 0x04ce, 0x30db }, - { 0x04cf, 0x30de }, - { 0x04d0, 0x30df }, - { 0x04d1, 0x30e0 }, - { 0x04d2, 0x30e1 }, - { 0x04d3, 0x30e2 }, - { 0x04d4, 0x30e4 }, - { 0x04d5, 0x30e6 }, - { 0x04d6, 0x30e8 }, - { 0x04d7, 0x30e9 }, - { 0x04d8, 0x30ea }, - { 0x04d9, 0x30eb }, - { 0x04da, 0x30ec }, - { 0x04db, 0x30ed }, - { 0x04dc, 0x30ef }, - { 0x04dd, 0x30f3 }, - { 0x04de, 0x309b }, - { 0x04df, 0x309c }, - { 0x05ac, 0x060c }, - { 0x05bb, 0x061b }, - { 0x05bf, 0x061f }, - { 0x05c1, 0x0621 }, - { 0x05c2, 0x0622 }, - { 0x05c3, 0x0623 }, - { 0x05c4, 0x0624 }, - { 0x05c5, 0x0625 }, - { 0x05c6, 0x0626 }, - { 0x05c7, 0x0627 }, - { 0x05c8, 0x0628 }, - { 0x05c9, 0x0629 }, - { 0x05ca, 0x062a }, - { 0x05cb, 0x062b }, - { 0x05cc, 0x062c }, - { 0x05cd, 0x062d }, - { 0x05ce, 0x062e }, - { 0x05cf, 0x062f }, - { 0x05d0, 0x0630 }, - { 0x05d1, 0x0631 }, - { 0x05d2, 0x0632 }, - { 0x05d3, 0x0633 }, - { 0x05d4, 0x0634 }, - { 0x05d5, 0x0635 }, - { 0x05d6, 0x0636 }, - { 0x05d7, 0x0637 }, - { 0x05d8, 0x0638 }, - { 0x05d9, 0x0639 }, - { 0x05da, 0x063a }, - { 0x05e0, 0x0640 }, - { 0x05e1, 0x0641 }, - { 0x05e2, 0x0642 }, - { 0x05e3, 0x0643 }, - { 0x05e4, 0x0644 }, - { 0x05e5, 0x0645 }, - { 0x05e6, 0x0646 }, - { 0x05e7, 0x0647 }, - { 0x05e8, 0x0648 }, - { 0x05e9, 0x0649 }, - { 0x05ea, 0x064a }, - { 0x05eb, 0x064b }, - { 0x05ec, 0x064c }, - { 0x05ed, 0x064d }, - { 0x05ee, 0x064e }, - { 0x05ef, 0x064f }, - { 0x05f0, 0x0650 }, - { 0x05f1, 0x0651 }, - { 0x05f2, 0x0652 }, - { 0x06a1, 0x0452 }, - { 0x06a2, 0x0453 }, - { 0x06a3, 0x0451 }, - { 0x06a4, 0x0454 }, - { 0x06a5, 0x0455 }, - { 0x06a6, 0x0456 }, - { 0x06a7, 0x0457 }, - { 0x06a8, 0x0458 }, - { 0x06a9, 0x0459 }, - { 0x06aa, 0x045a }, - { 0x06ab, 0x045b }, - { 0x06ac, 0x045c }, - { 0x06ae, 0x045e }, - { 0x06af, 0x045f }, - { 0x06b0, 0x2116 }, - { 0x06b1, 0x0402 }, - { 0x06b2, 0x0403 }, - { 0x06b3, 0x0401 }, - { 0x06b4, 0x0404 }, - { 0x06b5, 0x0405 }, - { 0x06b6, 0x0406 }, - { 0x06b7, 0x0407 }, - { 0x06b8, 0x0408 }, - { 0x06b9, 0x0409 }, - { 0x06ba, 0x040a }, - { 0x06bb, 0x040b }, - { 0x06bc, 0x040c }, - { 0x06be, 0x040e }, - { 0x06bf, 0x040f }, - { 0x06c0, 0x044e }, - { 0x06c1, 0x0430 }, - { 0x06c2, 0x0431 }, - { 0x06c3, 0x0446 }, - { 0x06c4, 0x0434 }, - { 0x06c5, 0x0435 }, - { 0x06c6, 0x0444 }, - { 0x06c7, 0x0433 }, - { 0x06c8, 0x0445 }, - { 0x06c9, 0x0438 }, - { 0x06ca, 0x0439 }, - { 0x06cb, 0x043a }, - { 0x06cc, 0x043b }, - { 0x06cd, 0x043c }, - { 0x06ce, 0x043d }, - { 0x06cf, 0x043e }, - { 0x06d0, 0x043f }, - { 0x06d1, 0x044f }, - { 0x06d2, 0x0440 }, - { 0x06d3, 0x0441 }, - { 0x06d4, 0x0442 }, - { 0x06d5, 0x0443 }, - { 0x06d6, 0x0436 }, - { 0x06d7, 0x0432 }, - { 0x06d8, 0x044c }, - { 0x06d9, 0x044b }, - { 0x06da, 0x0437 }, - { 0x06db, 0x0448 }, - { 0x06dc, 0x044d }, - { 0x06dd, 0x0449 }, - { 0x06de, 0x0447 }, - { 0x06df, 0x044a }, - { 0x06e0, 0x042e }, - { 0x06e1, 0x0410 }, - { 0x06e2, 0x0411 }, - { 0x06e3, 0x0426 }, - { 0x06e4, 0x0414 }, - { 0x06e5, 0x0415 }, - { 0x06e6, 0x0424 }, - { 0x06e7, 0x0413 }, - { 0x06e8, 0x0425 }, - { 0x06e9, 0x0418 }, - { 0x06ea, 0x0419 }, - { 0x06eb, 0x041a }, - { 0x06ec, 0x041b }, - { 0x06ed, 0x041c }, - { 0x06ee, 0x041d }, - { 0x06ef, 0x041e }, - { 0x06f0, 0x041f }, - { 0x06f1, 0x042f }, - { 0x06f2, 0x0420 }, - { 0x06f3, 0x0421 }, - { 0x06f4, 0x0422 }, - { 0x06f5, 0x0423 }, - { 0x06f6, 0x0416 }, - { 0x06f7, 0x0412 }, - { 0x06f8, 0x042c }, - { 0x06f9, 0x042b }, - { 0x06fa, 0x0417 }, - { 0x06fb, 0x0428 }, - { 0x06fc, 0x042d }, - { 0x06fd, 0x0429 }, - { 0x06fe, 0x0427 }, - { 0x06ff, 0x042a }, - { 0x07a1, 0x0386 }, - { 0x07a2, 0x0388 }, - { 0x07a3, 0x0389 }, - { 0x07a4, 0x038a }, - { 0x07a5, 0x03aa }, - { 0x07a7, 0x038c }, - { 0x07a8, 0x038e }, - { 0x07a9, 0x03ab }, - { 0x07ab, 0x038f }, - { 0x07ae, 0x0385 }, - { 0x07af, 0x2015 }, - { 0x07b1, 0x03ac }, - { 0x07b2, 0x03ad }, - { 0x07b3, 0x03ae }, - { 0x07b4, 0x03af }, - { 0x07b5, 0x03ca }, - { 0x07b6, 0x0390 }, - { 0x07b7, 0x03cc }, - { 0x07b8, 0x03cd }, - { 0x07b9, 0x03cb }, - { 0x07ba, 0x03b0 }, - { 0x07bb, 0x03ce }, - { 0x07c1, 0x0391 }, - { 0x07c2, 0x0392 }, - { 0x07c3, 0x0393 }, - { 0x07c4, 0x0394 }, - { 0x07c5, 0x0395 }, - { 0x07c6, 0x0396 }, - { 0x07c7, 0x0397 }, - { 0x07c8, 0x0398 }, - { 0x07c9, 0x0399 }, - { 0x07ca, 0x039a }, - { 0x07cb, 0x039b }, - { 0x07cc, 0x039c }, - { 0x07cd, 0x039d }, - { 0x07ce, 0x039e }, - { 0x07cf, 0x039f }, - { 0x07d0, 0x03a0 }, - { 0x07d1, 0x03a1 }, - { 0x07d2, 0x03a3 }, - { 0x07d4, 0x03a4 }, - { 0x07d5, 0x03a5 }, - { 0x07d6, 0x03a6 }, - { 0x07d7, 0x03a7 }, - { 0x07d8, 0x03a8 }, - { 0x07d9, 0x03a9 }, - { 0x07e1, 0x03b1 }, - { 0x07e2, 0x03b2 }, - { 0x07e3, 0x03b3 }, - { 0x07e4, 0x03b4 }, - { 0x07e5, 0x03b5 }, - { 0x07e6, 0x03b6 }, - { 0x07e7, 0x03b7 }, - { 0x07e8, 0x03b8 }, - { 0x07e9, 0x03b9 }, - { 0x07ea, 0x03ba }, - { 0x07eb, 0x03bb }, - { 0x07ec, 0x03bc }, - { 0x07ed, 0x03bd }, - { 0x07ee, 0x03be }, - { 0x07ef, 0x03bf }, - { 0x07f0, 0x03c0 }, - { 0x07f1, 0x03c1 }, - { 0x07f2, 0x03c3 }, - { 0x07f3, 0x03c2 }, - { 0x07f4, 0x03c4 }, - { 0x07f5, 0x03c5 }, - { 0x07f6, 0x03c6 }, - { 0x07f7, 0x03c7 }, - { 0x07f8, 0x03c8 }, - { 0x07f9, 0x03c9 }, - { 0x08a1, 0x23b7 }, - { 0x08a2, 0x250c }, - { 0x08a3, 0x2500 }, - { 0x08a4, 0x2320 }, - { 0x08a5, 0x2321 }, - { 0x08a6, 0x2502 }, - { 0x08a7, 0x23a1 }, - { 0x08a8, 0x23a3 }, - { 0x08a9, 0x23a4 }, - { 0x08aa, 0x23a6 }, - { 0x08ab, 0x239b }, - { 0x08ac, 0x239d }, - { 0x08ad, 0x239e }, - { 0x08ae, 0x23a0 }, - { 0x08af, 0x23a8 }, - { 0x08b0, 0x23ac }, - { 0x08bc, 0x2264 }, - { 0x08bd, 0x2260 }, - { 0x08be, 0x2265 }, - { 0x08bf, 0x222b }, - { 0x08c0, 0x2234 }, - { 0x08c1, 0x221d }, - { 0x08c2, 0x221e }, - { 0x08c5, 0x2207 }, - { 0x08c8, 0x223c }, - { 0x08c9, 0x2243 }, - { 0x08cd, 0x21d4 }, - { 0x08ce, 0x21d2 }, - { 0x08cf, 0x2261 }, - { 0x08d6, 0x221a }, - { 0x08da, 0x2282 }, - { 0x08db, 0x2283 }, - { 0x08dc, 0x2229 }, - { 0x08dd, 0x222a }, - { 0x08de, 0x2227 }, - { 0x08df, 0x2228 }, - { 0x08ef, 0x2202 }, - { 0x08f6, 0x0192 }, - { 0x08fb, 0x2190 }, - { 0x08fc, 0x2191 }, - { 0x08fd, 0x2192 }, - { 0x08fe, 0x2193 }, - { 0x09e0, 0x25c6 }, - { 0x09e1, 0x2592 }, - { 0x09e2, 0x2409 }, - { 0x09e3, 0x240c }, - { 0x09e4, 0x240d }, - { 0x09e5, 0x240a }, - { 0x09e8, 0x2424 }, - { 0x09e9, 0x240b }, - { 0x09ea, 0x2518 }, - { 0x09eb, 0x2510 }, - { 0x09ec, 0x250c }, - { 0x09ed, 0x2514 }, - { 0x09ee, 0x253c }, - { 0x09ef, 0x23ba }, - { 0x09f0, 0x23bb }, - { 0x09f1, 0x2500 }, - { 0x09f2, 0x23bc }, - { 0x09f3, 0x23bd }, - { 0x09f4, 0x251c }, - { 0x09f5, 0x2524 }, - { 0x09f6, 0x2534 }, - { 0x09f7, 0x252c }, - { 0x09f8, 0x2502 }, - { 0x0aa1, 0x2003 }, - { 0x0aa2, 0x2002 }, - { 0x0aa3, 0x2004 }, - { 0x0aa4, 0x2005 }, - { 0x0aa5, 0x2007 }, - { 0x0aa6, 0x2008 }, - { 0x0aa7, 0x2009 }, - { 0x0aa8, 0x200a }, - { 0x0aa9, 0x2014 }, - { 0x0aaa, 0x2013 }, - { 0x0aae, 0x2026 }, - { 0x0aaf, 0x2025 }, - { 0x0ab0, 0x2153 }, - { 0x0ab1, 0x2154 }, - { 0x0ab2, 0x2155 }, - { 0x0ab3, 0x2156 }, - { 0x0ab4, 0x2157 }, - { 0x0ab5, 0x2158 }, - { 0x0ab6, 0x2159 }, - { 0x0ab7, 0x215a }, - { 0x0ab8, 0x2105 }, - { 0x0abb, 0x2012 }, - { 0x0abc, 0x2329 }, - { 0x0abe, 0x232a }, - { 0x0ac3, 0x215b }, - { 0x0ac4, 0x215c }, - { 0x0ac5, 0x215d }, - { 0x0ac6, 0x215e }, - { 0x0ac9, 0x2122 }, - { 0x0aca, 0x2613 }, - { 0x0acc, 0x25c1 }, - { 0x0acd, 0x25b7 }, - { 0x0ace, 0x25cb }, - { 0x0acf, 0x25af }, - { 0x0ad0, 0x2018 }, - { 0x0ad1, 0x2019 }, - { 0x0ad2, 0x201c }, - { 0x0ad3, 0x201d }, - { 0x0ad4, 0x211e }, - { 0x0ad6, 0x2032 }, - { 0x0ad7, 0x2033 }, - { 0x0ad9, 0x271d }, - { 0x0adb, 0x25ac }, - { 0x0adc, 0x25c0 }, - { 0x0add, 0x25b6 }, - { 0x0ade, 0x25cf }, - { 0x0adf, 0x25ae }, - { 0x0ae0, 0x25e6 }, - { 0x0ae1, 0x25ab }, - { 0x0ae2, 0x25ad }, - { 0x0ae3, 0x25b3 }, - { 0x0ae4, 0x25bd }, - { 0x0ae5, 0x2606 }, - { 0x0ae6, 0x2022 }, - { 0x0ae7, 0x25aa }, - { 0x0ae8, 0x25b2 }, - { 0x0ae9, 0x25bc }, - { 0x0aea, 0x261c }, - { 0x0aeb, 0x261e }, - { 0x0aec, 0x2663 }, - { 0x0aed, 0x2666 }, - { 0x0aee, 0x2665 }, - { 0x0af0, 0x2720 }, - { 0x0af1, 0x2020 }, - { 0x0af2, 0x2021 }, - { 0x0af3, 0x2713 }, - { 0x0af4, 0x2717 }, - { 0x0af5, 0x266f }, - { 0x0af6, 0x266d }, - { 0x0af7, 0x2642 }, - { 0x0af8, 0x2640 }, - { 0x0af9, 0x260e }, - { 0x0afa, 0x2315 }, - { 0x0afb, 0x2117 }, - { 0x0afc, 0x2038 }, - { 0x0afd, 0x201a }, - { 0x0afe, 0x201e }, - { 0x0ba3, 0x003c }, - { 0x0ba6, 0x003e }, - { 0x0ba8, 0x2228 }, - { 0x0ba9, 0x2227 }, - { 0x0bc0, 0x00af }, - { 0x0bc2, 0x22a5 }, - { 0x0bc3, 0x2229 }, - { 0x0bc4, 0x230a }, - { 0x0bc6, 0x005f }, - { 0x0bca, 0x2218 }, - { 0x0bcc, 0x2395 }, - { 0x0bce, 0x22a4 }, - { 0x0bcf, 0x25cb }, - { 0x0bd3, 0x2308 }, - { 0x0bd6, 0x222a }, - { 0x0bd8, 0x2283 }, - { 0x0bda, 0x2282 }, - { 0x0bdc, 0x22a2 }, - { 0x0bfc, 0x22a3 }, - { 0x0cdf, 0x2017 }, - { 0x0ce0, 0x05d0 }, - { 0x0ce1, 0x05d1 }, - { 0x0ce2, 0x05d2 }, - { 0x0ce3, 0x05d3 }, - { 0x0ce4, 0x05d4 }, - { 0x0ce5, 0x05d5 }, - { 0x0ce6, 0x05d6 }, - { 0x0ce7, 0x05d7 }, - { 0x0ce8, 0x05d8 }, - { 0x0ce9, 0x05d9 }, - { 0x0cea, 0x05da }, - { 0x0ceb, 0x05db }, - { 0x0cec, 0x05dc }, - { 0x0ced, 0x05dd }, - { 0x0cee, 0x05de }, - { 0x0cef, 0x05df }, - { 0x0cf0, 0x05e0 }, - { 0x0cf1, 0x05e1 }, - { 0x0cf2, 0x05e2 }, - { 0x0cf3, 0x05e3 }, - { 0x0cf4, 0x05e4 }, - { 0x0cf5, 0x05e5 }, - { 0x0cf6, 0x05e6 }, - { 0x0cf7, 0x05e7 }, - { 0x0cf8, 0x05e8 }, - { 0x0cf9, 0x05e9 }, - { 0x0cfa, 0x05ea }, - { 0x0da1, 0x0e01 }, - { 0x0da2, 0x0e02 }, - { 0x0da3, 0x0e03 }, - { 0x0da4, 0x0e04 }, - { 0x0da5, 0x0e05 }, - { 0x0da6, 0x0e06 }, - { 0x0da7, 0x0e07 }, - { 0x0da8, 0x0e08 }, - { 0x0da9, 0x0e09 }, - { 0x0daa, 0x0e0a }, - { 0x0dab, 0x0e0b }, - { 0x0dac, 0x0e0c }, - { 0x0dad, 0x0e0d }, - { 0x0dae, 0x0e0e }, - { 0x0daf, 0x0e0f }, - { 0x0db0, 0x0e10 }, - { 0x0db1, 0x0e11 }, - { 0x0db2, 0x0e12 }, - { 0x0db3, 0x0e13 }, - { 0x0db4, 0x0e14 }, - { 0x0db5, 0x0e15 }, - { 0x0db6, 0x0e16 }, - { 0x0db7, 0x0e17 }, - { 0x0db8, 0x0e18 }, - { 0x0db9, 0x0e19 }, - { 0x0dba, 0x0e1a }, - { 0x0dbb, 0x0e1b }, - { 0x0dbc, 0x0e1c }, - { 0x0dbd, 0x0e1d }, - { 0x0dbe, 0x0e1e }, - { 0x0dbf, 0x0e1f }, - { 0x0dc0, 0x0e20 }, - { 0x0dc1, 0x0e21 }, - { 0x0dc2, 0x0e22 }, - { 0x0dc3, 0x0e23 }, - { 0x0dc4, 0x0e24 }, - { 0x0dc5, 0x0e25 }, - { 0x0dc6, 0x0e26 }, - { 0x0dc7, 0x0e27 }, - { 0x0dc8, 0x0e28 }, - { 0x0dc9, 0x0e29 }, - { 0x0dca, 0x0e2a }, - { 0x0dcb, 0x0e2b }, - { 0x0dcc, 0x0e2c }, - { 0x0dcd, 0x0e2d }, - { 0x0dce, 0x0e2e }, - { 0x0dcf, 0x0e2f }, - { 0x0dd0, 0x0e30 }, - { 0x0dd1, 0x0e31 }, - { 0x0dd2, 0x0e32 }, - { 0x0dd3, 0x0e33 }, - { 0x0dd4, 0x0e34 }, - { 0x0dd5, 0x0e35 }, - { 0x0dd6, 0x0e36 }, - { 0x0dd7, 0x0e37 }, - { 0x0dd8, 0x0e38 }, - { 0x0dd9, 0x0e39 }, - { 0x0dda, 0x0e3a }, - { 0x0ddf, 0x0e3f }, - { 0x0de0, 0x0e40 }, - { 0x0de1, 0x0e41 }, - { 0x0de2, 0x0e42 }, - { 0x0de3, 0x0e43 }, - { 0x0de4, 0x0e44 }, - { 0x0de5, 0x0e45 }, - { 0x0de6, 0x0e46 }, - { 0x0de7, 0x0e47 }, - { 0x0de8, 0x0e48 }, - { 0x0de9, 0x0e49 }, - { 0x0dea, 0x0e4a }, - { 0x0deb, 0x0e4b }, - { 0x0dec, 0x0e4c }, - { 0x0ded, 0x0e4d }, - { 0x0df0, 0x0e50 }, - { 0x0df1, 0x0e51 }, - { 0x0df2, 0x0e52 }, - { 0x0df3, 0x0e53 }, - { 0x0df4, 0x0e54 }, - { 0x0df5, 0x0e55 }, - { 0x0df6, 0x0e56 }, - { 0x0df7, 0x0e57 }, - { 0x0df8, 0x0e58 }, - { 0x0df9, 0x0e59 }, - { 0x0ea1, 0x3131 }, - { 0x0ea2, 0x3132 }, - { 0x0ea3, 0x3133 }, - { 0x0ea4, 0x3134 }, - { 0x0ea5, 0x3135 }, - { 0x0ea6, 0x3136 }, - { 0x0ea7, 0x3137 }, - { 0x0ea8, 0x3138 }, - { 0x0ea9, 0x3139 }, - { 0x0eaa, 0x313a }, - { 0x0eab, 0x313b }, - { 0x0eac, 0x313c }, - { 0x0ead, 0x313d }, - { 0x0eae, 0x313e }, - { 0x0eaf, 0x313f }, - { 0x0eb0, 0x3140 }, - { 0x0eb1, 0x3141 }, - { 0x0eb2, 0x3142 }, - { 0x0eb3, 0x3143 }, - { 0x0eb4, 0x3144 }, - { 0x0eb5, 0x3145 }, - { 0x0eb6, 0x3146 }, - { 0x0eb7, 0x3147 }, - { 0x0eb8, 0x3148 }, - { 0x0eb9, 0x3149 }, - { 0x0eba, 0x314a }, - { 0x0ebb, 0x314b }, - { 0x0ebc, 0x314c }, - { 0x0ebd, 0x314d }, - { 0x0ebe, 0x314e }, - { 0x0ebf, 0x314f }, - { 0x0ec0, 0x3150 }, - { 0x0ec1, 0x3151 }, - { 0x0ec2, 0x3152 }, - { 0x0ec3, 0x3153 }, - { 0x0ec4, 0x3154 }, - { 0x0ec5, 0x3155 }, - { 0x0ec6, 0x3156 }, - { 0x0ec7, 0x3157 }, - { 0x0ec8, 0x3158 }, - { 0x0ec9, 0x3159 }, - { 0x0eca, 0x315a }, - { 0x0ecb, 0x315b }, - { 0x0ecc, 0x315c }, - { 0x0ecd, 0x315d }, - { 0x0ece, 0x315e }, - { 0x0ecf, 0x315f }, - { 0x0ed0, 0x3160 }, - { 0x0ed1, 0x3161 }, - { 0x0ed2, 0x3162 }, - { 0x0ed3, 0x3163 }, - { 0x0ed4, 0x11a8 }, - { 0x0ed5, 0x11a9 }, - { 0x0ed6, 0x11aa }, - { 0x0ed7, 0x11ab }, - { 0x0ed8, 0x11ac }, - { 0x0ed9, 0x11ad }, - { 0x0eda, 0x11ae }, - { 0x0edb, 0x11af }, - { 0x0edc, 0x11b0 }, - { 0x0edd, 0x11b1 }, - { 0x0ede, 0x11b2 }, - { 0x0edf, 0x11b3 }, - { 0x0ee0, 0x11b4 }, - { 0x0ee1, 0x11b5 }, - { 0x0ee2, 0x11b6 }, - { 0x0ee3, 0x11b7 }, - { 0x0ee4, 0x11b8 }, - { 0x0ee5, 0x11b9 }, - { 0x0ee6, 0x11ba }, - { 0x0ee7, 0x11bb }, - { 0x0ee8, 0x11bc }, - { 0x0ee9, 0x11bd }, - { 0x0eea, 0x11be }, - { 0x0eeb, 0x11bf }, - { 0x0eec, 0x11c0 }, - { 0x0eed, 0x11c1 }, - { 0x0eee, 0x11c2 }, - { 0x0eef, 0x316d }, - { 0x0ef0, 0x3171 }, - { 0x0ef1, 0x3178 }, - { 0x0ef2, 0x317f }, - { 0x0ef3, 0x3181 }, - { 0x0ef4, 0x3184 }, - { 0x0ef5, 0x3186 }, - { 0x0ef6, 0x318d }, - { 0x0ef7, 0x318e }, - { 0x0ef8, 0x11eb }, - { 0x0ef9, 0x11f0 }, - { 0x0efa, 0x11f9 }, - { 0x0eff, 0x20a9 }, -#if 0 - /* FIXME: there is no keysym 0x13a4? But 0x20ac is EuroSign in both - keysym and Unicode */ - { 0x13a4, 0x20ac }, -#endif - { 0x13bc, 0x0152 }, - { 0x13bd, 0x0153 }, - { 0x13be, 0x0178 }, - { 0x20ac, 0x20ac }, - - /* Special function keys. */ - - { 0xff08, 0x0008 }, /* XK_BackSpace */ - { 0xff09, 0x0009 }, /* XK_Tab */ - { 0xff0a, 0x000a }, /* XK_Linefeed */ - { 0xff0d, 0x000d }, /* XK_Return */ - { 0xff13, 0x0013 }, /* XK_Pause */ - { 0xff1b, 0x001b }, /* XK_Escape */ - { 0xff50, 0x0001 }, /* XK_Home */ - { 0xff51, 0x001c }, /* XK_Left */ - { 0xff52, 0x001e }, /* XK_Up */ - { 0xff53, 0x001d }, /* XK_Right */ - { 0xff54, 0x001f }, /* XK_Down */ - { 0xff55, 0x000b }, /* XK_Prior */ - { 0xff56, 0x000c }, /* XK_Next */ - { 0xff57, 0x0004 }, /* XK_End */ - { 0xff6a, 0x0005 }, /* XK_Help */ - { 0xffff, 0x007f }, /* XK_Delete */ -}; - -long keysym2ucs(int keysym) -{ - int min = 0; - int max = sizeof(keysymtab) / sizeof(struct codepair) - 1; - int mid; - - /* first check for Latin-1 characters (1:1 mapping) */ - if ((keysym >= 0x0020 && keysym <= 0x007e) || - (keysym >= 0x00a0 && keysym <= 0x00ff)) - return keysym; - - /* also check for directly encoded 24-bit UCS characters */ - if ((keysym & 0xff000000) == 0x01000000) - return keysym & 0x00ffffff; - - /* binary search in table */ - while (max >= min) { - mid = (min + max) / 2; - if (keysymtab[mid].keysym < keysym) - min = mid + 1; - else if (keysymtab[mid].keysym > keysym) - max = mid - 1; - else { - /* found it */ - return keysymtab[mid].ucs; - } - } - - /* no matching Unicode value found */ - return -1; -} - -static int reverse_compare (const void *a, const void *b) -{ - const struct codepair *ca = a, *cb = b; - - return ca->ucs - cb->ucs; -} - -int ucs2keysym(long ucs) -{ - static struct codepair *reverse_keysymtab; - - int min = 0; - int max = sizeof(keysymtab) / sizeof(struct codepair) - 1; - int mid; - - if (reverse_keysymtab == NULL) - { - reverse_keysymtab = malloc (sizeof (keysymtab)); - memcpy (reverse_keysymtab, keysymtab, sizeof (keysymtab)); - - qsort (reverse_keysymtab, - sizeof (keysymtab) / sizeof (struct codepair), - sizeof (struct codepair), - reverse_compare); - } - - /* first check for Latin-1 characters (1:1 mapping) */ - if ((ucs >= 0x0020 && ucs <= 0x007e) || - (ucs >= 0x00a0 && ucs <= 0x00ff)) - return ucs; - - /* binary search in table */ - while (max >= min) { - mid = (min + max) / 2; - if (reverse_keysymtab[mid].ucs < ucs) - min = mid + 1; - else if (reverse_keysymtab[mid].ucs > ucs) - max = mid - 1; - else { - /* found it */ - return reverse_keysymtab[mid].keysym; - } - } - - /* finally, assume a directly encoded 24-bit UCS character */ - return ucs | 0x01000000; -} diff --git a/synfig-osx/trunk/launcher/keysym2ucs.h b/synfig-osx/trunk/launcher/keysym2ucs.h deleted file mode 100644 index 1b04def..0000000 --- a/synfig-osx/trunk/launcher/keysym2ucs.h +++ /dev/null @@ -1,36 +0,0 @@ -/* $XFree86$ - * This module converts keysym values into the corresponding ISO 10646 - * (UCS, Unicode) values. - * - * The array keysymtab[] contains pairs of X11 keysym values for graphical - * characters and the corresponding Unicode value. The function - * keysym2ucs() maps a keysym onto a Unicode value using a binary search, - * therefore keysymtab[] must remain SORTED by keysym value. - * - * The keysym -> UTF-8 conversion will hopefully one day be provided - * by Xlib via XmbLookupString() and should ideally not have to be - * done in X applications. But we are not there yet. - * - * We allow to represent any UCS character in the range U-00000000 to - * U-00FFFFFF by a keysym value in the range 0x01000000 to 0x01ffffff. - * This admittedly does not cover the entire 31-bit space of UCS, but - * it does cover all of the characters up to U-10FFFF, which can be - * represented by UTF-16, and more, and it is very unlikely that higher - * UCS codes will ever be assigned by ISO. So to get Unicode character - * U+ABCD you can directly use keysym 0x0100abcd. - * - * Author: Markus G. Kuhn , University of Cambridge, April 2001 - * - * Special thanks to Richard Verhoeven for preparing - * an initial draft of the mapping table. - * - * This software is in the public domain. Share and enjoy! - */ - -#ifndef KEYSYM2UCS_H -#define KEYSYM2UCS_H 1 - -extern long keysym2ucs(int keysym); -extern int ucs2keysym(long ucs); - -#endif /* KEYSYM2UCS_H */ diff --git a/synfig-osx/trunk/launcher/pseudoramiX.c b/synfig-osx/trunk/launcher/pseudoramiX.c deleted file mode 100644 index cf1bd48..0000000 --- a/synfig-osx/trunk/launcher/pseudoramiX.c +++ /dev/null @@ -1,426 +0,0 @@ -/* - * Minimal implementation of PanoramiX/Xinerama - * - * This is used in rootless mode where the underlying window server - * already provides an abstracted view of multiple screens as one - * large screen area. - * - * This code is largely based on panoramiX.c, which contains the - * following copyright notice: - */ -/***************************************************************** -Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, -BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Digital Equipment Corporation -shall not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from Digital -Equipment Corporation. -******************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.c,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ - -#include "pseudoramiX.h" - -#include "extnsionst.h" -#include "dixstruct.h" -#include "window.h" -#include "panoramiXproto.h" -#include "globals.h" - -extern int ProcPanoramiXQueryVersion (ClientPtr client); - -static void PseudoramiXResetProc(ExtensionEntry *extEntry); - -static int ProcPseudoramiXQueryVersion(ClientPtr client); -static int ProcPseudoramiXGetState(ClientPtr client); -static int ProcPseudoramiXGetScreenCount(ClientPtr client); -static int ProcPseudoramiXGetScreenSize(ClientPtr client); -static int ProcPseudoramiXIsActive(ClientPtr client); -static int ProcPseudoramiXQueryScreens(ClientPtr client); -static int ProcPseudoramiXDispatch(ClientPtr client); - -static int SProcPseudoramiXQueryVersion(ClientPtr client); -static int SProcPseudoramiXGetState(ClientPtr client); -static int SProcPseudoramiXGetScreenCount(ClientPtr client); -static int SProcPseudoramiXGetScreenSize(ClientPtr client); -static int SProcPseudoramiXIsActive(ClientPtr client); -static int SProcPseudoramiXQueryScreens(ClientPtr client); -static int SProcPseudoramiXDispatch(ClientPtr client); - - -typedef struct { - int x; - int y; - int w; - int h; -} PseudoramiXScreenRec; - -static PseudoramiXScreenRec *pseudoramiXScreens = NULL; -static int pseudoramiXScreensAllocated = 0; -static int pseudoramiXNumScreens = 0; -static int pseudoramiXGeneration = -1; - - -// Add a PseudoramiX screen. -// The rest of the X server will know nothing about this screen. -// Can be called before or after extension init. -// Screens must be re-added once per generation. -void -PseudoramiXAddScreen(int x, int y, int w, int h) -{ - PseudoramiXScreenRec *s; - - if (noPseudoramiXExtension) return; - - if (pseudoramiXNumScreens == pseudoramiXScreensAllocated) { - pseudoramiXScreensAllocated += pseudoramiXScreensAllocated + 1; - pseudoramiXScreens = xrealloc(pseudoramiXScreens, - pseudoramiXScreensAllocated * - sizeof(PseudoramiXScreenRec)); - } - - s = &pseudoramiXScreens[pseudoramiXNumScreens++]; - s->x = x; - s->y = y; - s->w = w; - s->h = h; -} - - -// Initialize PseudoramiX. -// Copied from PanoramiXExtensionInit -void PseudoramiXExtensionInit(int argc, char *argv[]) -{ - Bool success = FALSE; - ExtensionEntry *extEntry; - - if (noPseudoramiXExtension) return; - -#if 0 - if (pseudoramiXNumScreens == 1) { - // Only one screen - disable Xinerama extension. - noPseudoramiXExtension = TRUE; - return; - } -#endif - - // The server must not run the PanoramiX operations. - noPanoramiXExtension = TRUE; - - if (pseudoramiXGeneration != serverGeneration) { - extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0, - ProcPseudoramiXDispatch, - SProcPseudoramiXDispatch, - PseudoramiXResetProc, - StandardMinorOpcode); - if (!extEntry) { - ErrorF("PseudoramiXExtensionInit(): AddExtension failed\n"); - } else { - pseudoramiXGeneration = serverGeneration; - success = TRUE; - } - } - - if (!success) { - ErrorF("%s Extension (PseudoramiX) failed to initialize\n", - PANORAMIX_PROTOCOL_NAME); - return; - } -} - - -static void PseudoramiXResetProc(ExtensionEntry *extEntry) -{ - pseudoramiXNumScreens = 0; -} - -void PseudoramiXResetScreens (void) -{ - pseudoramiXNumScreens = 0; -} - -// was PanoramiX -static int ProcPseudoramiXQueryVersion(ClientPtr client) -{ - return ProcPanoramiXQueryVersion(client); -} - - -// was PanoramiX -static int ProcPseudoramiXGetState(ClientPtr client) -{ - REQUEST(xPanoramiXGetStateReq); - WindowPtr pWin; - xPanoramiXGetStateReply rep; - register int n; - - REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); - pWin = LookupWindow (stuff->window, client); - if (!pWin) - return BadWindow; - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.state = !noPseudoramiXExtension; - if (client->swapped) { - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); - swaps (&rep.state, n); - } - WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep); - return client->noClientException; -} - - -// was PanoramiX -static int ProcPseudoramiXGetScreenCount(ClientPtr client) -{ - REQUEST(xPanoramiXGetScreenCountReq); - WindowPtr pWin; - xPanoramiXGetScreenCountReply rep; - register int n; - - REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); - pWin = LookupWindow (stuff->window, client); - if (!pWin) - return BadWindow; - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.ScreenCount = pseudoramiXNumScreens; - if (client->swapped) { - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); - swaps (&rep.ScreenCount, n); - } - WriteToClient (client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep); - return client->noClientException; -} - - -// was PanoramiX -static int ProcPseudoramiXGetScreenSize(ClientPtr client) -{ - REQUEST(xPanoramiXGetScreenSizeReq); - WindowPtr pWin; - xPanoramiXGetScreenSizeReply rep; - register int n; - - REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); - pWin = LookupWindow (stuff->window, client); - if (!pWin) - return BadWindow; - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - /* screen dimensions */ - rep.width = pseudoramiXScreens[stuff->screen].w; - // was panoramiXdataPtr[stuff->screen].width; - rep.height = pseudoramiXScreens[stuff->screen].h; - // was panoramiXdataPtr[stuff->screen].height; - if (client->swapped) { - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); - swaps (&rep.width, n); - swaps (&rep.height, n); - } - WriteToClient (client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep); - return client->noClientException; -} - - -// was Xinerama -static int ProcPseudoramiXIsActive(ClientPtr client) -{ - /* REQUEST(xXineramaIsActiveReq); */ - xXineramaIsActiveReply rep; - - REQUEST_SIZE_MATCH(xXineramaIsActiveReq); - - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.state = !noPseudoramiXExtension; - if (client->swapped) { - register int n; - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); - swapl (&rep.state, n); - } - WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep); - return client->noClientException; -} - - -// was Xinerama -static int ProcPseudoramiXQueryScreens(ClientPtr client) -{ - /* REQUEST(xXineramaQueryScreensReq); */ - xXineramaQueryScreensReply rep; - - REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.number = noPseudoramiXExtension ? 0 : pseudoramiXNumScreens; - rep.length = rep.number * sz_XineramaScreenInfo >> 2; - if (client->swapped) { - register int n; - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); - swapl (&rep.number, n); - } - WriteToClient (client, sizeof (xXineramaQueryScreensReply), (char *) &rep); - - if (!noPseudoramiXExtension) { - xXineramaScreenInfo scratch; - int i; - - for(i = 0; i < pseudoramiXNumScreens; i++) { - scratch.x_org = pseudoramiXScreens[i].x; - scratch.y_org = pseudoramiXScreens[i].y; - scratch.width = pseudoramiXScreens[i].w; - scratch.height = pseudoramiXScreens[i].h; - - if(client->swapped) { - register int n; - swaps (&scratch.x_org, n); - swaps (&scratch.y_org, n); - swaps (&scratch.width, n); - swaps (&scratch.height, n); - } - WriteToClient (client, sz_XineramaScreenInfo, (char *) &scratch); - } - } - - return client->noClientException; -} - - -// was PanoramiX -static int ProcPseudoramiXDispatch (ClientPtr client) -{ REQUEST(xReq); - switch (stuff->data) - { - case X_PanoramiXQueryVersion: - return ProcPseudoramiXQueryVersion(client); - case X_PanoramiXGetState: - return ProcPseudoramiXGetState(client); - case X_PanoramiXGetScreenCount: - return ProcPseudoramiXGetScreenCount(client); - case X_PanoramiXGetScreenSize: - return ProcPseudoramiXGetScreenSize(client); - case X_XineramaIsActive: - return ProcPseudoramiXIsActive(client); - case X_XineramaQueryScreens: - return ProcPseudoramiXQueryScreens(client); - } - return BadRequest; -} - - - -static int -SProcPseudoramiXQueryVersion (ClientPtr client) -{ - REQUEST(xPanoramiXQueryVersionReq); - register int n; - - swaps(&stuff->length,n); - REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq); - return ProcPseudoramiXQueryVersion(client); -} - -static int -SProcPseudoramiXGetState(ClientPtr client) -{ - REQUEST(xPanoramiXGetStateReq); - register int n; - - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); - return ProcPseudoramiXGetState(client); -} - -static int -SProcPseudoramiXGetScreenCount(ClientPtr client) -{ - REQUEST(xPanoramiXGetScreenCountReq); - register int n; - - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); - return ProcPseudoramiXGetScreenCount(client); -} - -static int -SProcPseudoramiXGetScreenSize(ClientPtr client) -{ - REQUEST(xPanoramiXGetScreenSizeReq); - register int n; - - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); - return ProcPseudoramiXGetScreenSize(client); -} - - -static int -SProcPseudoramiXIsActive(ClientPtr client) -{ - REQUEST(xXineramaIsActiveReq); - register int n; - - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH(xXineramaIsActiveReq); - return ProcPseudoramiXIsActive(client); -} - - -static int -SProcPseudoramiXQueryScreens(ClientPtr client) -{ - REQUEST(xXineramaQueryScreensReq); - register int n; - - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); - return ProcPseudoramiXQueryScreens(client); -} - - -static int -SProcPseudoramiXDispatch (ClientPtr client) -{ REQUEST(xReq); - switch (stuff->data) - { - case X_PanoramiXQueryVersion: - return SProcPseudoramiXQueryVersion(client); - case X_PanoramiXGetState: - return SProcPseudoramiXGetState(client); - case X_PanoramiXGetScreenCount: - return SProcPseudoramiXGetScreenCount(client); - case X_PanoramiXGetScreenSize: - return SProcPseudoramiXGetScreenSize(client); - case X_XineramaIsActive: - return SProcPseudoramiXIsActive(client); - case X_XineramaQueryScreens: - return SProcPseudoramiXQueryScreens(client); - } - return BadRequest; -} diff --git a/synfig-osx/trunk/launcher/pseudoramiX.h b/synfig-osx/trunk/launcher/pseudoramiX.h deleted file mode 100644 index 3427eb1..0000000 --- a/synfig-osx/trunk/launcher/pseudoramiX.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Minimal implementation of PanoramiX/Xinerama - */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.h,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ - -extern int noPseudoramiXExtension; - -void PseudoramiXAddScreen(int x, int y, int w, int h); -void PseudoramiXExtensionInit(int argc, char *argv[]); -void PseudoramiXResetScreens (void); diff --git a/synfig-osx/trunk/launcher/quartz-audio.c b/synfig-osx/trunk/launcher/quartz-audio.c deleted file mode 100644 index 4ea7746..0000000 --- a/synfig-osx/trunk/launcher/quartz-audio.c +++ /dev/null @@ -1,342 +0,0 @@ -// -// QuartzAudio.m -// -// X Window bell support using CoreAudio or AppKit. -// Greg Parker gparker@cs.stanford.edu 19 Feb 2001 -// -// Info about sine wave sound playback: -// CoreAudio code derived from macosx-dev posting by Tim Wood -// http://www.omnigroup.com/mailman/archive/macosx-dev/2000-May/002004.html -// Smoothing transitions between sounds -// http://www.wam.umd.edu/~mphoenix/dss/dss.html -// -/* - * Copyright (c) 2001 Greg Parker. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzAudio.c,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ - -#include "quartz.h" -#include "quartz-audio.h" - -#include -#include - -#include "inputstr.h" -#include "extensions/XI.h" - -void NSBeep(); - -typedef struct QuartzAudioRec { - double frequency; - double amplitude; - - UInt32 curFrame; - UInt32 remainingFrames; - UInt32 totalFrames; - UInt32 bytesPerFrame; - double sampleRate; - UInt32 fadeLength; - - UInt32 bufferByteCount; - Boolean playing; - pthread_mutex_t lock; - - // used to fade out interrupted sound and avoid 'pop' - double prevFrequency; - double prevAmplitude; - UInt32 prevFrame; -} QuartzAudioRec; - -static AudioDeviceID quartzAudioDevice = kAudioDeviceUnknown; -static QuartzAudioRec data; - - -/* - * QuartzAudioEnvelope - * Fade sound in and out to avoid pop. - * Sounds with shorter duration will never reach full amplitude. Deal. - */ -static double QuartzAudioEnvelope( - UInt32 curFrame, - UInt32 totalFrames, - UInt32 fadeLength ) -{ - double fadeFrames = min(fadeLength, totalFrames / 2); - if (fadeFrames < 1) return 0; - - if (curFrame < fadeFrames) { - return curFrame / fadeFrames; - } else if (curFrame > totalFrames - fadeFrames) { - return (totalFrames-curFrame) / fadeFrames; - } else { - return 1.0; - } -} - - -/* - * QuartzFillBuffer - * Fill this buffer with data and update the data position. - * FIXME: this is ugly - */ -static void QuartzFillBuffer( - AudioBuffer *audiobuffer, - QuartzAudioRec *data ) -{ - float *buffer, *b; - unsigned int frame, frameCount; - unsigned int bufferFrameCount; - float multiplier, v; - int i; - - buffer = (float *)audiobuffer->mData; - bufferFrameCount = audiobuffer->mDataByteSize / data->bytesPerFrame; - - frameCount = min(bufferFrameCount, data->remainingFrames); - - // Fade out previous sine wave, if any. - b = buffer; - if (data->prevFrame) { - multiplier = 2*M_PI*(data->prevFrequency/data->sampleRate); - for (frame = 0; frame < data->fadeLength; frame++) { - v = data->prevAmplitude * - QuartzAudioEnvelope(frame+data->fadeLength, - 2*data->fadeLength, - data->fadeLength) * - sin(multiplier * (data->prevFrame+frame)); - for (i = 0; i < audiobuffer->mNumberChannels; i++) { - *b++ = v; - } - } - // no more prev fade - data->prevFrame = 0; - - // adjust for space eaten by prev fade - buffer += audiobuffer->mNumberChannels*frame; - bufferFrameCount -= frame; - frameCount = min(bufferFrameCount, data->remainingFrames); - } - - // Write a sine wave with the specified frequency and amplitude - multiplier = 2*M_PI*(data->frequency/data->sampleRate); - for (frame = 0; frame < frameCount; frame++) { - v = data->amplitude * - QuartzAudioEnvelope(data->curFrame+frame, data->totalFrames, - data->fadeLength) * - sin(multiplier * (data->curFrame+frame)); - for (i = 0; i < audiobuffer->mNumberChannels; i++) { - *b++ = v; - } - } - - // Zero out the rest of the buffer, if any - memset(b, 0, sizeof(float) * audiobuffer->mNumberChannels * - (bufferFrameCount-frame)); - - data->curFrame += frameCount; - data->remainingFrames -= frameCount; - if (data->remainingFrames == 0) { - data->playing = FALSE; - data->curFrame = 0; - } -} - - -/* - * QuartzAudioIOProc - * Callback function for audio playback. - * FIXME: use inOutputTime to correct for skipping - */ -static OSStatus -QuartzAudioIOProc( - AudioDeviceID inDevice, - const AudioTimeStamp *inNow, - const AudioBufferList *inInputData, - const AudioTimeStamp *inInputTime, - AudioBufferList *outOutputData, - const AudioTimeStamp *inOutputTime, - void *inClientData ) -{ - QuartzAudioRec *data = (QuartzAudioRec *)inClientData; - int i; - Boolean wasPlaying; - - pthread_mutex_lock(&data->lock); - wasPlaying = data->playing; - for (i = 0; i < outOutputData->mNumberBuffers; i++) { - if (data->playing) { - QuartzFillBuffer(outOutputData->mBuffers+i, data); - } - else { - memset(outOutputData->mBuffers[i].mData, 0, - outOutputData->mBuffers[i].mDataByteSize); - } - } - if (wasPlaying && !data->playing) { - OSStatus err; - err = AudioDeviceStop(inDevice, QuartzAudioIOProc); - } - pthread_mutex_unlock(&data->lock); - return 0; -} - - -/* - * QuartzCoreAudioBell - * Play a tone using the CoreAudio API - */ -static void QuartzCoreAudioBell( - int volume, // volume is % of max - int pitch, // pitch is Hz - int duration ) // duration is milliseconds -{ - if (quartzAudioDevice == kAudioDeviceUnknown) return; - - pthread_mutex_lock(&data.lock); - - // fade previous sound, if any - data.prevFrequency = data.frequency; - data.prevAmplitude = data.amplitude; - data.prevFrame = data.curFrame; - - // set new sound - data.frequency = pitch; - data.amplitude = volume / 100.0; - data.curFrame = 0; - data.totalFrames = (int)(data.sampleRate * duration / 1000.0); - data.remainingFrames = data.totalFrames; - - if (! data.playing) { - OSStatus status; - status = AudioDeviceStart(quartzAudioDevice, QuartzAudioIOProc); - if (status) { - ErrorF("QuartzAudioBell: AudioDeviceStart returned %d\n", status); - } else { - data.playing = TRUE; - } - } - pthread_mutex_unlock(&data.lock); -} - - -/* - * QuartzBell - * Ring the bell - */ -void QuartzBell( - int volume, // volume in percent of max - DeviceIntPtr pDevice, - pointer ctrl, - int class ) -{ - int pitch; // pitch in Hz - int duration; // duration in milliseconds - - if (class == BellFeedbackClass) { - pitch = ((BellCtrl*)ctrl)->pitch; - duration = ((BellCtrl*)ctrl)->duration; - } else if (class == KbdFeedbackClass) { - pitch = ((KeybdCtrl*)ctrl)->bell_pitch; - duration = ((KeybdCtrl*)ctrl)->bell_duration; - } else { - ErrorF("QuartzBell: bad bell class %d\n", class); - return; - } - - if (quartzUseSysBeep) { - if (volume) - NSBeep(); - } else { - QuartzCoreAudioBell(volume, pitch, duration); - } -} - - -/* - * QuartzAudioInit - * Prepare to play the bell with the CoreAudio API - */ -void QuartzAudioInit(void) -{ - UInt32 propertySize; - OSStatus status; - AudioDeviceID outputDevice; - AudioStreamBasicDescription outputStreamDescription; - double sampleRate; - - // Get the default output device - propertySize = sizeof(outputDevice); - status = AudioHardwareGetProperty( - kAudioHardwarePropertyDefaultOutputDevice, - &propertySize, &outputDevice); - if (status) { - ErrorF("QuartzAudioInit: AudioHardwareGetProperty returned %d\n", - status); - return; - } - if (outputDevice == kAudioDeviceUnknown) { - ErrorF("QuartzAudioInit: No audio output devices available.\n"); - return; - } - - // Get the basic device description - propertySize = sizeof(outputStreamDescription); - status = AudioDeviceGetProperty(outputDevice, 0, FALSE, - kAudioDevicePropertyStreamFormat, - &propertySize, &outputStreamDescription); - if (status) { - ErrorF("QuartzAudioInit: GetProperty(stream format) returned %d\n", - status); - return; - } - sampleRate = outputStreamDescription.mSampleRate; - - // Fill in the playback data - data.frequency = 0; - data.amplitude = 0; - data.curFrame = 0; - data.remainingFrames = 0; - data.bytesPerFrame = outputStreamDescription.mBytesPerFrame; - data.sampleRate = sampleRate; - // data.bufferByteCount = bufferByteCount; - data.playing = FALSE; - data.prevAmplitude = 0; - data.prevFrame = 0; - data.prevFrequency = 0; - data.fadeLength = data.sampleRate / 200; - pthread_mutex_init(&data.lock, NULL); // fixme error check - - // fixme assert fadeLength - -typedef struct { - int CursorVisible; - QueryBestSizeProcPtr QueryBestSize; - miPointerSpriteFuncPtr spriteFuncs; -} QuartzCursorScreenRec, *QuartzCursorScreenPtr; - -static int darwinCursorScreenIndex = -1; -static unsigned long darwinCursorGeneration = 0; - -static Bool movedCursor = FALSE; - -#define CURSOR_PRIV(pScreen) \ - ((QuartzCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr) - -static Bool -load_cursor (CursorPtr src, int screen) -{ - uint32_t *data; - uint32_t rowbytes; - int width, height; - int hot_x, hot_y; - - uint32_t fg_color, bg_color; - uint8_t *srow, *sptr; - uint8_t *mrow, *mptr; - uint32_t *drow, *dptr; - unsigned xcount, ycount; - - xp_error err; - - width = src->bits->width; - height = src->bits->height; - hot_x = src->bits->xhot; - hot_y = src->bits->yhot; - -#ifdef ARGB_CURSOR - if (src->bits->argb != NULL) - { - rowbytes = src->bits->width * sizeof (CARD32); - data = (uint32_t *) src->bits->argb; - } - else -#endif - { - fg_color = 0xFF00 | (src->foreRed >> 8); - fg_color <<= 16; - fg_color |= src->foreGreen & 0xFF00; - fg_color |= src->foreBlue >> 8; - - bg_color = 0xFF00 | (src->backRed >> 8); - bg_color <<= 16; - bg_color |= src->backGreen & 0xFF00; - bg_color |= src->backBlue >> 8; - - fg_color = htonl (fg_color); - bg_color = htonl (bg_color); - - /* round up to 8 pixel boundary so we can convert whole bytes */ - rowbytes = ((src->bits->width * 4) + 31) & ~31; - data = alloca (rowbytes * src->bits->height); - - if (!src->bits->emptyMask) - { - ycount = src->bits->height; - srow = src->bits->source; mrow = src->bits->mask; - drow = data; - - while (ycount-- > 0) - { - xcount = (src->bits->width + 7) / 8; - sptr = srow; mptr = mrow; - dptr = drow; - - while (xcount-- > 0) - { - uint8_t s, m; - int i; - - s = *sptr++; m = *mptr++; - for (i = 0; i < 8; i++) - { -#if BITMAP_BIT_ORDER == MSBFirst - if (m & 128) - *dptr++ = (s & 128) ? fg_color : bg_color; - else - *dptr++ = 0; - s <<= 1; m <<= 1; -#else - if (m & 1) - *dptr++ = (s & 1) ? fg_color : bg_color; - else - *dptr++ = 0; - s >>= 1; m >>= 1; -#endif - } - } - - srow += BitmapBytePad (src->bits->width); - mrow += BitmapBytePad (src->bits->width); - drow = (uint32_t *) ((char *) drow + rowbytes); - } - } - else - { - memset (data, 0, src->bits->height * rowbytes); - } - } - - err = xp_set_cursor (width, height, hot_x, hot_y, data, rowbytes); - return err == Success; -} - -/* Convert the X cursor representation to native format if possible. */ -static Bool -QuartzRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - if(pCursor == NULL || pCursor->bits == NULL) - return FALSE; - - /* FIXME: cache ARGB8888 representation? */ - - return TRUE; -} - -/* Free the storage space associated with a realized cursor. */ -static Bool -QuartzUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) -{ - return TRUE; -} - -/* Set the cursor sprite and position. */ -static void -QuartzSetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y) -{ - QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); - - if (!quartzServerVisible) - return; - - if (pCursor == NULL) - { - if (ScreenPriv->CursorVisible) - { - xp_hide_cursor (); - ScreenPriv->CursorVisible = FALSE; - } - } - else - { - load_cursor (pCursor, pScreen->myNum); - - if (!ScreenPriv->CursorVisible) - { - xp_show_cursor (); - ScreenPriv->CursorVisible = TRUE; - } - } -} - -/* Move the cursor. This is a noop for us. */ -static void -QuartzMoveCursor (ScreenPtr pScreen, int x, int y) -{ -} - -static miPointerSpriteFuncRec quartzSpriteFuncsRec = { - QuartzRealizeCursor, - QuartzUnrealizeCursor, - QuartzSetCursor, - QuartzMoveCursor -}; - -static Bool -QuartzCursorOffScreen (ScreenPtr *pScreen, int *x, int *y) -{ - return FALSE; -} - -static void -QuartzCrossScreen (ScreenPtr pScreen, Bool entering) -{ - return; -} - -/* Change the cursor position without generating an event or motion history. - The input coordinates (x,y) are in pScreen-local X11 coordinates. */ -static void -QuartzWarpCursor (ScreenPtr pScreen, int x, int y) -{ - if (!movedCursor) - { - /* Don't move the cursor the first time. This is the - jump-to-center initialization, and it's annoying. */ - - movedCursor = TRUE; - return; - } - - if (quartzServerVisible) - { - int sx, sy; - - sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; - sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; - - CGWarpMouseCursorPosition (CGPointMake (sx + x, sy + y)); - } - - miPointerWarpCursor (pScreen, x, y); -} - -void -QuartzIgnoreNextWarpCursor (void) -{ - movedCursor = FALSE; -} - -static miPointerScreenFuncRec quartzScreenFuncsRec = { - QuartzCursorOffScreen, - QuartzCrossScreen, - QuartzWarpCursor, - DarwinEnqueuePointerEvent, -}; - -/* Handle queries for best cursor size */ -static void -QuartzCursorQueryBestSize (int class, unsigned short *width, - unsigned short *height, ScreenPtr pScreen) -{ - QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); - - if (class == CursorShape) - { - /* FIXME: query window server? */ - *width = 32; - *height = 32; - } - else - { - (*ScreenPriv->QueryBestSize) (class, width, height, pScreen); - } -} - -/* Initialize cursor support */ -Bool -QuartzInitCursor (ScreenPtr pScreen) -{ - QuartzCursorScreenPtr ScreenPriv; - miPointerScreenPtr PointPriv; - - /* initialize software cursor handling (always needed as backup) */ - if (!miDCInitialize (pScreen, &quartzScreenFuncsRec)) - return FALSE; - - /* allocate private storage for this screen's QuickDraw cursor info */ - if (darwinCursorGeneration != serverGeneration) - { - if ((darwinCursorScreenIndex = AllocateScreenPrivateIndex ()) < 0) - return FALSE; - - darwinCursorGeneration = serverGeneration; - } - - ScreenPriv = xcalloc (1, sizeof(QuartzCursorScreenRec)); - if (ScreenPriv == NULL) - return FALSE; - - CURSOR_PRIV (pScreen) = ScreenPriv; - - /* override some screen procedures */ - ScreenPriv->QueryBestSize = pScreen->QueryBestSize; - pScreen->QueryBestSize = QuartzCursorQueryBestSize; - - PointPriv = (miPointerScreenPtr) pScreen->devPrivates[miPointerScreenIndex].ptr; - - ScreenPriv->spriteFuncs = PointPriv->spriteFuncs; - PointPriv->spriteFuncs = &quartzSpriteFuncsRec; - - ScreenPriv->CursorVisible = TRUE; - return TRUE; -} - -/* X server is hiding. Restore the Aqua cursor. */ -void -QuartzSuspendXCursor (ScreenPtr pScreen) -{ -} - -/* X server is showing. Restore the X cursor. */ -void -QuartzResumeXCursor (ScreenPtr pScreen) -{ - WindowPtr pWin; - CursorPtr pCursor; - int x, y; - - pWin = GetSpriteWindow (); - if (pWin->drawable.pScreen != pScreen) - return; - - pCursor = GetSpriteCursor (); - if (pCursor == NULL) - return; - - GetSpritePosition (&x, &y); - QuartzSetCursor (pScreen, pCursor, x, y); -} diff --git a/synfig-osx/trunk/launcher/quartz-cursor.h b/synfig-osx/trunk/launcher/quartz-cursor.h deleted file mode 100644 index 6078c39..0000000 --- a/synfig-osx/trunk/launcher/quartz-cursor.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * quartzCursor.h - * - * External interface for Quartz hardware cursor - */ -/* - * Copyright (c) 2001 Torrey T. Lyons and Greg Parker. - * Copyright (c) 2002 Apple Computer, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCursor.h,v 1.1 2002/03/28 02:21:19 torrey Exp $ */ - -#ifndef QUARTZCURSOR_H -#define QUARTZCURSOR_H - -#include "screenint.h" - -Bool QuartzInitCursor(ScreenPtr pScreen); -void QuartzSuspendXCursor(ScreenPtr pScreen); -void QuartzResumeXCursor(ScreenPtr pScreen); -void QuartzIgnoreNextWarpCursor (void); - -#endif diff --git a/synfig-osx/trunk/launcher/quartz-server.c b/synfig-osx/trunk/launcher/quartz-server.c deleted file mode 100644 index 212dce8..0000000 --- a/synfig-osx/trunk/launcher/quartz-server.c +++ /dev/null @@ -1,190 +0,0 @@ -// -// quartzServer.c -// -// This class handles the interaction between CG and the X server thread -// -/* - * Copyright (c) 2001 Andreas Monitzer. All Rights Reserved. - * Copyright (c) 2002 Torrey T. Lyons. All Rights Reserved. - * Copyright (c) 2002 Apple Software, Inc. All Rights Reserved. - * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the - * sale, use or other dealings in this Software without prior written - * authorization. - */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XServer.m,v 1.3 2002/07/15 18:57:44 torrey Exp $ */ - -#include "quartz.h" -#include "Xplugin.h" -#include "X11Controller.h" -#define _APPLEDRI_SERVER_ -#include "appledri.h" -#include "dri-surface.h" -#include "opaque.h" -#include "globals.h" -#include -#include -#include - -char **envpGlobal; // argcGlobal and argvGlobal - // are from dix/globals.c - -void -QuartzMessageMainThread (int type, int argc, ...) -{ - xEvent xe; - INT32 *argv; - int i, max_args; - va_list args; - - memset (&xe, 0, sizeof (xe)); - xe.u.u.type = ClientMessage; - xe.u.clientMessage.u.l.type = type; - - argv = &xe.u.clientMessage.u.l.longs0; - max_args = 4; - - if (argc > 0 && argc <= max_args) - { - va_start (args, argc); - for (i = 0; i < argc; i++) - argv[i] = (int) va_arg (args, int); - va_end (args); - } - - DarwinEnqueueEvent (&xe); -} - -static void -event_handler (unsigned int type, const void *arg, - unsigned int arg_size, void *data) -{ - switch (type) - { - case XP_EVENT_DISPLAY_CHANGED: - QuartzMessageMainThread (kXquartzDisplayChanged, 0); - break; - - case XP_EVENT_WINDOW_STATE_CHANGED: - if (arg_size >= sizeof (xp_window_state_event)) - { - const xp_window_state_event *ws_arg = arg; - QuartzMessageMainThread (kXquartzWindowState, 2, - ws_arg->id, ws_arg->state); - } - break; - - case XP_EVENT_WINDOW_MOVED: - if (arg_size == sizeof (xp_window_id)) - { - xp_window_id id = * (xp_window_id *) arg; - - QuartzMessageMainThread (kXquartzWindowMoved, 1, id); - } - break; - - case XP_EVENT_SURFACE_DESTROYED: - case XP_EVENT_SURFACE_CHANGED: - if (arg_size == sizeof (xp_surface_id)) - { - int kind; - - if (type == XP_EVENT_SURFACE_DESTROYED) - kind = AppleDRISurfaceNotifyDestroyed; - else - kind = AppleDRISurfaceNotifyChanged; - - DRISurfaceNotify (*(xp_surface_id *) arg, kind); - } - break; - } -} - -static void -server_thread (void *arg) -{ - extern int main (int argc, char **argv, char **envp); - - /* Xinerama defaults to enabled */ - noPanoramiXExtension = FALSE; - - if (xp_init (XP_BACKGROUND_EVENTS | quartzXpluginOptions) != Success) - { - fprintf (stderr, "can't initialize window system\n"); - exit (1); - } - - xp_select_events (XP_EVENT_DISPLAY_CHANGED - | XP_EVENT_WINDOW_STATE_CHANGED - | XP_EVENT_WINDOW_MOVED - | XP_EVENT_SURFACE_CHANGED - | XP_EVENT_SURFACE_DESTROYED, - event_handler, NULL); - - exit (main (argcGlobal, argvGlobal, envpGlobal)); -} - -/* - * DarwinHandleGUI - * This function is called first from main(). We use it to connect to - * the cg window server and spawn the the thread that will listen for - * cg events - */ -void DarwinHandleGUI( - int argc, - char *argv[], - char *envp[] ) -{ - static Bool here_before; - - extern void _InitHLTB (void); - - if (here_before) - return; - - here_before = TRUE; - - DarwinInputPreInit (); - - // Store command line arguments to pass back to main() - argcGlobal = argc; - argvGlobal = argv; - envpGlobal = envp; - - /* Initially I ran the X server on the main thread, and received - events on the second thread. But now we may be using Carbon, - that needs to run on the main thread. (Otherwise, when it's - prebound, it will initialize itself on the wrong thread) - - grr.. but doing that means that if the X thread gets scheduled - before the main thread when we're _not_ prebound, things fail, - so initialize by hand. */ - - _InitHLTB (); - - X11ControllerMain (argc, argv, server_thread, NULL); - - /* not reached */ - exit (1); -} diff --git a/synfig-osx/trunk/launcher/quartz.c b/synfig-osx/trunk/launcher/quartz.c deleted file mode 100644 index 0e9ae7c..0000000 --- a/synfig-osx/trunk/launcher/quartz.c +++ /dev/null @@ -1,683 +0,0 @@ -/************************************************************** - * - * Quartz-specific support for the Darwin X Server - * - **************************************************************/ -/* - * Copyright (c) 2001 Greg Parker and Torrey T. Lyons. - * Copyright (c) 2002 Apple Computer, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartz.c,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ - -#include "quartz.h" -#include "darwin.h" -#include "quartz-audio.h" -#include "quartz-cursor.h" -#include "rootless.h" -#include "rootless-window.h" -#include "pseudoramiX.h" -#include "globals.h" -#include "dri.h" -#define _APPLEWM_SERVER_ -#include "applewmstr.h" -#include "X11Application.h" - -#include "scrnintstr.h" -#include "colormapst.h" - -#include -#include -#include -#include -#include - -#include -#include - -/* Shared global variables for Quartz modes */ -int quartzEventWriteFD = -1; -int quartzUseSysBeep = 1; -int quartzServerVisible = FALSE; -int quartzDesiredDepth = -1; -int quartzHasRoot = FALSE, quartzEnableRootless = TRUE; -int quartzFullscreenDisableHotkeys = TRUE; -int noPseudoramiXExtension = FALSE; -int quartzXpluginOptions = 0; - -extern char *display; - -static CGDirectDisplayID -display_at_index (int index) -{ - CGError err; - CGDisplayCount cnt; - CGDirectDisplayID dpy[index+1]; - - err = CGGetActiveDisplayList (index + 1, dpy, &cnt); - if (err == kCGErrorSuccess && (int) cnt == index + 1) - return dpy[index]; - else - return kCGNullDirectDisplay; -} - -static CGRect -display_screen_bounds (CGDirectDisplayID id, Bool remove_menubar) -{ - CGRect frame; - - frame = CGDisplayBounds (id); - - if (remove_menubar && !quartzHasRoot - && frame.origin.x == 0 && frame.origin.y == 0) - { - /* Remove Aqua menubar from display bounds. */ - - frame.origin.y += 22; - frame.size.height -= 22; - } - - return frame; -} - -static void -addPseudoramiXScreens (int *x, int *y, int *width, int *height) -{ - CGDisplayCount i, total = 16; /* FIXME: hardcoded maximum */ - CGRect unionRect = CGRectNull, frame; - CGDirectDisplayID screens[total]; - - CGGetActiveDisplayList (total, screens, &total); - - /* Get the union of all screens */ - for (i = 0; i < total; i++) - { - CGDirectDisplayID dpy = screens[i]; - - /* we can't remove the menubar from the screen - doing so - would constrain the pointer to the screen, not allowing it - to reach the menubar.. */ - - frame = display_screen_bounds (dpy, FALSE); - unionRect = CGRectUnion (unionRect, frame); - } - - /* Use unionRect as the screen size for the X server. */ - *x = unionRect.origin.x; - *y = unionRect.origin.y; - *width = unionRect.size.width; - *height = unionRect.size.height; - - /* Tell PseudoramiX about the real screens. */ - for (i = 0; i < total; i++) - { - CGDirectDisplayID dpy = screens[i]; - - frame = display_screen_bounds (dpy, TRUE); - -#ifdef DEBUG - ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i, - (int)frame.size.width, (int)frame.size.height, - (int)frame.origin.x, (int)frame.origin.y); -#endif - - frame.origin.x -= unionRect.origin.x; - frame.origin.y -= unionRect.origin.y; - -#ifdef DEBUG - ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n", - i, (int)frame.origin.x, (int)frame.origin.y); -#endif - - PseudoramiXAddScreen(frame.origin.x, frame.origin.y, - frame.size.width, frame.size.height); - } -} - -/* Do mode dependent initialization of each screen for Quartz. */ -Bool -QuartzAddScreen (int index, ScreenPtr pScreen) -{ - DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); - - /* If no specific depth chosen, look for the depth of the main display. - Else if 16bpp specified, use that. Else use 32bpp. */ - - dfb->componentCount = 3; - dfb->bitsPerComponent = 8; - dfb->bitsPerPixel = 32; - - if (quartzDesiredDepth == -1) - { - dfb->bitsPerComponent = CGDisplayBitsPerSample (kCGDirectMainDisplay); - dfb->bitsPerPixel = CGDisplayBitsPerPixel (kCGDirectMainDisplay); - } - else if (quartzDesiredDepth == 15) - { - dfb->bitsPerComponent = 5; - dfb->bitsPerPixel = 16; - } - else if (quartzDesiredDepth == 8) - { - dfb->bitsPerComponent = 8; - dfb->bitsPerPixel = 8; - dfb->componentCount = 1; - } - - if (noPseudoramiXExtension) - { - CGDirectDisplayID dpy; - CGRect frame; - - dpy = display_at_index (index); - - frame = display_screen_bounds (dpy, TRUE); - - dfb->x = frame.origin.x; - dfb->y = frame.origin.y; - dfb->width = frame.size.width; - dfb->height = frame.size.height; - } - else - { - addPseudoramiXScreens (&dfb->x, &dfb->y, &dfb->width, &dfb->height); - } - - dfb->colorBitsPerPixel = dfb->bitsPerComponent * dfb->componentCount; - - /* Passing zero width (pitch) makes miCreateScreenResources set the - screen pixmap to the framebuffer pointer, i.e. null. We'll take - it from there.. */ - dfb->pitch = 0; - dfb->framebuffer = NULL; - - DRIScreenInit (pScreen); - - return TRUE; -} - -/* Finalize mode specific setup of each screen. */ -Bool -QuartzSetupScreen (int index, ScreenPtr pScreen) -{ - // do full screen or rootless specific setup - if (! RootlessSetupScreen(index, pScreen)) - return FALSE; - - // setup cursor support - if (! QuartzInitCursor(pScreen)) - return FALSE; - - DRIFinishScreenInit (pScreen); - - return TRUE; -} - - -/* Quartz display initialization. */ -void -QuartzInitOutput (int argc, char **argv) -{ - static int orig_noPanoramiXExtension; - int total; - - if (serverGeneration == 1) { - orig_noPanoramiXExtension = noPanoramiXExtension; - QuartzAudioInit(); - } - - /* +xinerama option sets noPanoramiXExtension variable */ - noPseudoramiXExtension = orig_noPanoramiXExtension; - - total = 16; /* FIXME: hardcoded maximum */ - if (total > 0) - { - CGDirectDisplayID screens[total]; - CGGetActiveDisplayList (total, screens, &total); - } - - if (noPseudoramiXExtension) - darwinScreensFound = total; - else - darwinScreensFound = 1; // only PseudoramiX knows about the rest - - if (!quartzEnableRootless) - RootlessHideAllWindows (); -} - -/* This function from randr.c */ -extern char *ConnectionInfo; -static int padlength[4] = {0, 3, 2, 1}; -static void -RREditConnectionInfo (ScreenPtr pScreen) -{ - xConnSetup *connSetup; - char *vendor; - xPixmapFormat *formats; - xWindowRoot *root; - xDepth *depth; - xVisualType *visual; - int screen = 0; - int d; - - connSetup = (xConnSetup *) ConnectionInfo; - vendor = (char *) connSetup + sizeof (xConnSetup); - formats = (xPixmapFormat *) ((char *) vendor + - connSetup->nbytesVendor + - padlength[connSetup->nbytesVendor & 3]); - root = (xWindowRoot *) ((char *) formats + - sizeof (xPixmapFormat) * screenInfo.numPixmapFormats); - while (screen != pScreen->myNum) - { - depth = (xDepth *) ((char *) root + - sizeof (xWindowRoot)); - for (d = 0; d < root->nDepths; d++) - { - visual = (xVisualType *) ((char *) depth + - sizeof (xDepth)); - depth = (xDepth *) ((char *) visual + - depth->nVisuals * sizeof (xVisualType)); - } - root = (xWindowRoot *) ((char *) depth); - screen++; - } - root->pixWidth = pScreen->width; - root->pixHeight = pScreen->height; - root->mmWidth = pScreen->mmWidth; - root->mmHeight = pScreen->mmHeight; -} - -static void -QuartzUpdateScreens (void) -{ - ScreenPtr pScreen; - WindowPtr pRoot; - int x, y, width, height, sx, sy; - xEvent e; - - if (noPseudoramiXExtension || screenInfo.numScreens != 1) - { - /* FIXME: if not using Xinerama, we have multiple screens, and - to do this properly may need to add or remove screens. Which - isn't possible. So don't do anything. Another reason why - we default to running with Xinerama. */ - - return; - } - - pScreen = screenInfo.screens[0]; - - PseudoramiXResetScreens (); - addPseudoramiXScreens (&x, &y, &width, &height); - - dixScreenOrigins[pScreen->myNum].x = x; - dixScreenOrigins[pScreen->myNum].y = y; - pScreen->mmWidth = pScreen->mmWidth * ((double) width / pScreen->width); - pScreen->mmHeight = pScreen->mmHeight * ((double) height / pScreen->height); - pScreen->width = width; - pScreen->height = height; - - /* FIXME: should probably do something with RandR here. */ - - DarwinAdjustScreenOrigins (&screenInfo); - RootlessRepositionWindows (screenInfo.screens[0]); - RootlessUpdateScreenPixmap (screenInfo.screens[0]); - - sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; - sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; - - /* Adjust the root window. */ - - pRoot = WindowTable[pScreen->myNum]; - pScreen->ResizeWindow (pRoot, x - sx, y - sy, width, height, NULL); - pScreen->PaintWindowBackground (pRoot, &pRoot->borderClip, PW_BACKGROUND); - QuartzIgnoreNextWarpCursor (); - DefineInitialRootWindow (pRoot); - - /* Send an event for the root reconfigure */ - - e.u.u.type = ConfigureNotify; - e.u.configureNotify.window = pRoot->drawable.id; - e.u.configureNotify.aboveSibling = None; - e.u.configureNotify.x = x - sx; - e.u.configureNotify.y = y - sy; - e.u.configureNotify.width = width; - e.u.configureNotify.height = height; - e.u.configureNotify.borderWidth = wBorderWidth (pRoot); - e.u.configureNotify.override = pRoot->overrideRedirect; - DeliverEvents (pRoot, &e, 1, NullWindow); - - /* FIXME: what does this do? */ - RREditConnectionInfo (pScreen); -} - -static void -do_exec (void (*callback) (void *data), void *data) -{ - /* Do the fork-twice trick to avoid needing to reap zombies */ - - int child1, child2 = 0; - int status; - - /* we should really try to report errors here.. */ - - child1 = fork (); - - switch (child1) - { - case -1: /* error */ - break; - - case 0: /* child1 */ - child2 = fork (); - - switch (child2) - { - int max_files, i; - char buf[1024], *tem; - - case -1: /* error */ - _exit (1); - - case 0: /* child2 */ - /* close all open files except for standard streams */ - max_files = sysconf (_SC_OPEN_MAX); - for (i = 3; i < max_files; i++) - close (i); - - /* ensure stdin is on /dev/null */ - close (0); - open ("/dev/null", O_RDONLY); - - /* cd $HOME */ - tem = getenv ("HOME"); - if (tem != NULL) - chdir (tem); - - /* Setup environment */ - snprintf (buf, sizeof (buf), ":%s", display); - setenv ("DISPLAY", buf, TRUE); - tem = getenv ("PATH"); - if (tem != NULL && tem[0] != NULL) - snprintf (buf, sizeof (buf), "%s:/usr/X11R6/bin", tem); - else - snprintf (buf, sizeof (buf), "/bin:/usr/bin:/usr/X11R6/bin"); - setenv ("PATH", buf, TRUE); - - (*callback) (data); - - _exit (2); - - default: /* parent (child1) */ - _exit (0); - } - break; - - default: /* parent */ - waitpid (child1, &status, 0); - } -} - -static void -run_client_callback (void *data) -{ - char **argv = data; - execvp (argv[0], argv); -} - -/* Note that this function is called from both X server and appkit threads */ -void -QuartzRunClient (const char *command) -{ - const char *shell; - const char *argv[5]; - - shell = getenv ("SHELL"); - if (shell == NULL) - shell = "/bin/bash"; - - /* At least [ba]sh, [t]csh and zsh all work with this syntax. We - need to use an interactive shell to force it to load the user's - environment. Otherwise things like fink don't work at all well.. */ - - argv[0] = shell; - argv[1] = "-i"; - argv[2] = "-c"; - argv[3] = command; - argv[4] = NULL; - - do_exec (run_client_callback, argv); -} - -static void -QuartzSetFullscreen (Bool state) -{ - if (quartzHasRoot == state) - return; - - quartzHasRoot = state; - - xp_disable_update (); - - if (!quartzHasRoot && !quartzEnableRootless) - RootlessHideAllWindows (); - - RootlessUpdateRooted (quartzHasRoot); - - if (quartzHasRoot && !quartzEnableRootless) - RootlessShowAllWindows (); - - /* Only update screen info when something is visible. Avoids the wm - moving the windows out from under the menubar when it shouldn't */ - - if (quartzHasRoot || quartzEnableRootless) - QuartzUpdateScreens (); - - /* Somehow the menubar manages to interfere with our event stream - in fullscreen mode, even though it's not visible. */ - - X11ApplicationShowHideMenubar (!quartzHasRoot); - - xp_reenable_update (); - -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 - if (quartzFullscreenDisableHotkeys) - xp_disable_hot_keys (quartzHasRoot); -#endif -} - -static void -QuartzSetRootless (Bool state) -{ - if (quartzEnableRootless == state) - return; - - quartzEnableRootless = state; - - if (!quartzEnableRootless && !quartzHasRoot) - { - xp_disable_update (); - RootlessHideAllWindows (); - xp_reenable_update (); - } - else if (quartzEnableRootless && !quartzHasRoot) - { - xp_disable_update (); - RootlessShowAllWindows (); - QuartzUpdateScreens (); - xp_reenable_update (); - } -} - -/* Show the X server on screen. Does nothing if already shown. Restore the - X clip regions the X server cursor state. */ -static void -QuartzShow (void) -{ - int i; - - if (quartzServerVisible) - return; - - quartzServerVisible = TRUE; - - for (i = 0; i < screenInfo.numScreens; i++) - { - if (screenInfo.screens[i]) - QuartzResumeXCursor(screenInfo.screens[i]); - } - - /* FIXME: not sure about this, it may need to have a preference like - in XDarwin..? */ - - if (!quartzEnableRootless) - QuartzSetFullscreen (TRUE); -} - -/* Remove the X server display from the screen. Does nothing if already - hidden. Set X clip regions to prevent drawing, and restore the Aqua - cursor. */ -static void -QuartzHide (void) -{ - int i; - - if (!quartzServerVisible) - return; - - for (i = 0; i < screenInfo.numScreens; i++) - { - if (screenInfo.screens[i]) - QuartzSuspendXCursor(screenInfo.screens[i]); - } - - QuartzSetFullscreen (FALSE); - - quartzServerVisible = FALSE; -} - -/* Cleanup before X server shutdown. Release the screen and restore the - Aqua cursor. */ -void -QuartzGiveUp (void) -{ - int i; - - for (i = 0; i < screenInfo.numScreens; i++) { - if (screenInfo.screens[i]) { - QuartzSuspendXCursor(screenInfo.screens[i]); - } - } -} - -int -QuartzProcessArgument( int argc, char *argv[], int i ) -{ - /* This arg is passed when launched from the Aqua GUI. */ - if (strncmp (argv[i], "-psn_", 5) == 0) - { - return 1; - } - - if (strcmp (argv[i], "-depth") == 0) - { - int arg; - - if (i == argc - 1) - FatalError ("-depth requires an argument\n"); - - arg = atoi (argv[i + 1]); - if (arg == 8 || arg == 15 || arg == 24) - quartzDesiredDepth = arg; - else - FatalError ("Only 8, 15 and 24 bit color depths are supported.\n"); - - return 2; - } - - return 0; -} - -void -QuartzClientMessage (const xEvent *xe) -{ - switch (xe->u.clientMessage.u.l.type) - { - case kXquartzControllerNotify: - AppleWMSendEvent (AppleWMControllerNotify, - AppleWMControllerNotifyMask, - xe->u.clientMessage.u.l.longs0, - xe->u.clientMessage.u.l.longs1); - break; - - case kXquartzPasteboardNotify: - AppleWMSendEvent (AppleWMPasteboardNotify, - AppleWMPasteboardNotifyMask, - xe->u.clientMessage.u.l.longs0, - xe->u.clientMessage.u.l.longs1); - break; - - case kXquartzActivate: - QuartzShow (); - AppleWMSendEvent (AppleWMActivationNotify, - AppleWMActivationNotifyMask, - AppleWMIsActive, 0); - break; - - case kXquartzDeactivate: - AppleWMSendEvent (AppleWMActivationNotify, - AppleWMActivationNotifyMask, - AppleWMIsInactive, 0); - QuartzHide (); - break; - - case kXquartzDisplayChanged: - QuartzUpdateScreens (); - break; - - case kXquartzWindowState: - RootlessNativeWindowStateChanged (xe->u.clientMessage.u.l.longs0, - xe->u.clientMessage.u.l.longs1); - break; - - case kXquartzWindowMoved: - RootlessNativeWindowMoved (xe->u.clientMessage.u.l.longs0); - break; - - case kXquartzToggleFullscreen: - if (quartzEnableRootless) - QuartzSetFullscreen (!quartzHasRoot); - else if (quartzHasRoot) - QuartzHide (); - else - QuartzShow (); - break; - - case kXquartzSetRootless: - QuartzSetRootless (xe->u.clientMessage.u.l.longs0); - if (!quartzEnableRootless && !quartzHasRoot) - QuartzHide (); - } -} diff --git a/synfig-osx/trunk/launcher/quartz.h b/synfig-osx/trunk/launcher/quartz.h deleted file mode 100644 index 66ad0cb..0000000 --- a/synfig-osx/trunk/launcher/quartz.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * quartz.h - * - * External interface of the Quartz modes seen by the generic, mode - * independent parts of the Darwin X server. - */ -/* - * Copyright (c) 2001 Greg Parker and Torrey T. Lyons. - * Copyright (c) 2002 Apple Computer, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartz.h,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ - -#ifndef _QUARTZ_H -#define _QUARTZ_H - -#include "darwin.h" - -/* Local client message types */ -enum { - kXquartzControllerNotify = kXquartzFirstEvent, - kXquartzPasteboardNotify, - kXquartzActivate, - kXquartzDeactivate, - kXquartzDisplayChanged, - kXquartzWindowState, - kXquartzWindowMoved, - kXquartzToggleFullscreen, - kXquartzSetRootless, -}; - -extern int quartzUseSysBeep; -extern int quartzServerVisible; -extern int quartzDesiredDepth; -extern int quartzHasRoot, quartzEnableRootless; -extern int quartzFullscreenDisableHotkeys; -extern int quartzXpluginOptions; - -int QuartzProcessArgument(int argc, char *argv[], int i); -void QuartzInitOutput(int argc, char **argv); -void QuartzGiveUp(void); - -void QuartzMessageMainThread (int type, int argc, ...); -void QuartzClientMessage (const struct _xEvent *xe); - -void QuartzRunClient (const char *command); - -Bool QuartzAddScreen(int index, ScreenPtr pScreen); -Bool QuartzSetupScreen(int index, ScreenPtr pScreen); - -#endif diff --git a/synfig-osx/trunk/launcher/rootless-common.c b/synfig-osx/trunk/launcher/rootless-common.c deleted file mode 100644 index 9294e54..0000000 --- a/synfig-osx/trunk/launcher/rootless-common.c +++ /dev/null @@ -1,497 +0,0 @@ -/* - * Common rootless definitions and code - * - * Greg Parker gparker@cs.stanford.edu - */ - -/* Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. */ - -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessCommon.c,v 1.6 2002/07/15 19:58:31 torrey Exp $ */ - -#include "rootless-common.h" -#include "dri-surface.h" -#include "fb.h" -#include "colormapst.h" - -RegionRec rootlessHugeRoot = {{-32767, -32767, 32767, 32767}, NULL}; - -/* Following two macros from miregion.c */ - -/* true iff two Boxes overlap */ -#define EXTENTCHECK(r1,r2) \ - (!( ((r1)->x2 <= (r2)->x1) || \ - ((r1)->x1 >= (r2)->x2) || \ - ((r1)->y2 <= (r2)->y1) || \ - ((r1)->y1 >= (r2)->y2) ) ) - -/* true iff Box r1 contains Box r2 */ -#define SUBSUMES(r1,r2) \ - ( ((r1)->x1 <= (r2)->x1) && \ - ((r1)->x2 >= (r2)->x2) && \ - ((r1)->y1 <= (r2)->y1) && \ - ((r1)->y2 >= (r2)->y2) ) - -int rootlessNoDRIDrawing = 0; - -/* Returns the top-level parent of pWindow. The root is the top-level - parent of itself, even though the root is not otherwise considered - to be a top-level window. */ -WindowPtr -TopLevelParent (WindowPtr pWindow) -{ - WindowPtr top; - - if (IsRoot (pWindow)) - return pWindow; - - top = pWindow; - while (top != NULL && !IsTopLevel (top)) - top = top->parent; - - return top; -} - -/* Returns TRUE if this window is visible inside a frame (e.g. it is - visible and has a top-level parent) */ -Bool -IsFramedWindow (WindowPtr pWin) -{ - WindowPtr top; - - if (!pWin->realized) - return FALSE; - - top = TopLevelParent (pWin); - - return top != NULL && WINREC (top) != NULL; -} - -void -TranslatePixmapBase (PixmapPtr pPix, int dx, int dy) -{ - unsigned diff; - - pPix->devPrivate.ptr = ((char *) pPix->devPrivate.ptr + - ((dx + pPix->drawable.x) - * pPix->drawable.bitsPerPixel / 8 + - dy * pPix->devKind)); - - if (pPix->drawable.bitsPerPixel != FB_UNIT) - { - diff = ((unsigned) pPix->devPrivate.ptr) & (FB_UNIT / CHAR_BIT - 1); - pPix->devPrivate.ptr = ((char *) pPix->devPrivate.ptr) - diff; - - if (pPix->drawable.bitsPerPixel == 16) - pPix->drawable.x = diff / (16 / CHAR_BIT); - else if (pPix->drawable.bitsPerPixel == 8) - pPix->drawable.x = diff / (8 / CHAR_BIT); - else - pPix->drawable.x = diff / (pPix->drawable.bitsPerPixel / CHAR_BIT); - } -} - -void -RootlessDisableUpdate (WindowPtr pWin) -{ - RootlessWindowRec *winRec = WINREC (pWin); - - if (winRec != NULL - && !winRec->is_offscreen - && !winRec->is_reorder_pending - && !winRec->is_update_disabled) - { - xp_disable_update (); - winRec->is_update_disabled = TRUE; - } -} - -void -RootlessReenableUpdate (WindowPtr pWin) -{ - RootlessWindowRec *winRec = WINREC (pWin); - - if (winRec != NULL && winRec->is_update_disabled) - { - xp_reenable_update (); - winRec->is_update_disabled = FALSE; - } -} - -Bool -RootlessResolveColormap (ScreenPtr pScreen, int first_color, - int n_colors, uint32_t *colors) -{ - int last, i; - ColormapPtr map; - - map = RootlessGetColormap (pScreen); - if (map == NULL || map->class != PseudoColor) - return FALSE; - - last = MIN (map->pVisual->ColormapEntries, first_color + n_colors); - for (i = MAX (0, first_color); i < last; i++) - { - Entry *ent = map->red + i; - uint16_t red, green, blue; - - if (!ent->refcnt) - continue; - if (ent->fShared) - { - red = ent->co.shco.red->color; - green = ent->co.shco.green->color; - blue = ent->co.shco.blue->color; - } - else - { - red = ent->co.local.red; - green = ent->co.local.green; - blue = ent->co.local.blue; - } - - colors[i - first_color] = (0xFF000000UL - | ((uint32_t) red & 0xff00) << 8 - | (green & 0xff00) - | (blue >> 8)); - } - - return TRUE; -} - -/* Prepare a window for direct access to its backing buffer. Each - top-level parent has a Pixmap representing its backing store, which - all of its children inherit. */ -void -RootlessStartDrawing (WindowPtr pWindow) -{ - ScreenPtr pScreen = pWindow->drawable.pScreen; - WindowPtr top = TopLevelParent (pWindow); - RootlessWindowRec *winRec; - - if (!rootlessNoDRIDrawing && DRIStartDrawing (&pWindow->drawable)) - { - return; - } - - /* At the top of the stack now. */ - - if (top == NULL || WINREC (top) == NULL) - return; - - winRec = WINREC(top); - - /* Make sure the window's top-level parent is prepared for drawing. */ - - if (!winRec->is_drawing) - { - void *data[2]; - unsigned int rowbytes[2]; - xp_error err; - - int bw = wBorderWidth (top); - - err = xp_lock_window (winRec->wid, NULL, NULL, data, rowbytes, NULL); - if (err != Success) - abort (); /* FIXME: */ - - winRec->data = data[0]; - winRec->rowbytes = rowbytes[0]; - - winRec->pixmap = - GetScratchPixmapHeader(pScreen, winRec->width, winRec->height, - winRec->win->drawable.depth, - winRec->win->drawable.bitsPerPixel, - winRec->rowbytes, winRec->data); - TranslatePixmapBase (winRec->pixmap, - - (top->drawable.x - bw), - - (top->drawable.y - bw)); - - winRec->is_drawing = TRUE; - } - - winRec->oldPixmap = pScreen->GetWindowPixmap (pWindow); - pScreen->SetWindowPixmap (pWindow, winRec->pixmap); -} - -void -RootlessFinishedDrawing (WindowPtr pWindow) -{ - /* Called after each drawing primitive, lets us unlock surfaces - as often as possible (which is a Good Thing to do.) */ - - DRIStopDrawing (&pWindow->drawable, FALSE); - - /* Also, see if we're due a flush. */ - - RootlessMayRedisplay (pWindow->drawable.pScreen); -} - -void -RootlessStopDrawing (WindowPtr pWindow, Bool flush) -{ - WindowPtr top = TopLevelParent (pWindow); - RootlessWindowRec *winRec; - - if (top == NULL || WINREC (top) == NULL) - return; - - winRec = WINREC(top); - - DRIStopDrawing (&pWindow->drawable, flush); - - if (winRec->is_drawing) - { - ScreenPtr pScreen = pWindow->drawable.pScreen; - - xp_unlock_window (winRec->wid, flush); - - FreeScratchPixmapHeader (winRec->pixmap); - pScreen->SetWindowPixmap (pWindow, winRec->oldPixmap); - winRec->pixmap = NULL; - - winRec->is_drawing = FALSE; - } - else if (flush) - { - xp_flush_window (winRec->wid); - } - - /* FIXME: instead of just checking if we tried to flush (which - happens everytime we block for I/O), I used to check if - anything was actually marked in the window. But that often - caused problems with some window managers, and it didn't really - make any noticeable difference, so... */ - - if (flush && winRec->is_reorder_pending) - { - winRec->is_reorder_pending = FALSE; - RootlessReorderWindow (pWindow); - } - - if (flush && winRec->is_update_disabled) - { - RootlessReenableUpdate (pWindow); - } -} - -/* pRegion is GLOBAL */ -void -RootlessDamageRegion (WindowPtr pWindow, RegionPtr pRegion) -{ - RootlessWindowRec *winRec; - RegionRec clipped; - WindowPtr pTop; - BoxPtr b1, b2; - - RL_DEBUG_MSG("Damaged win 0x%x ", pWindow); - - pTop = TopLevelParent (pWindow); - if (pTop == NULL) - return; - - winRec = WINREC (pTop); - if (winRec == NULL) - return; - - if (DRIDamageRegion (&pWindow->drawable, pRegion)) - { - return; - } - - /* We need to intersect the drawn region with the clip of the window - to avoid marking places we didn't actually draw (which can cause - problems when the window has an extra client-side backing store) - - But this is a costly operation and since we'll normally just be - drawing inside the clip, go to some lengths to avoid the general - case intersection. */ - - b1 = REGION_EXTENTS (pScreen, &pWindow->borderClip); - b2 = REGION_EXTENTS (pScreen, pRegion); - - if (EXTENTCHECK (b1, b2)) - { - /* Regions may overlap. */ - - if (REGION_NUM_RECTS (pRegion) == 1) - { - int in; - - /* Damaged region only has a single rect, so we can - just compare that against the region */ - - in = RECT_IN_REGION (pScreen, &pWindow->borderClip, - REGION_RECTS (pRegion)); - if (in == rgnIN) - { - /* clip totally contains pRegion */ - - xp_mark_window (winRec->wid, REGION_NUM_RECTS (pRegion), - REGION_RECTS (pRegion), - -winRec->x, -winRec->y); - - RootlessQueueRedisplay (pTop->drawable.pScreen); - goto out; - } - else if (in == rgnOUT) - { - /* clip doesn't contain pRegion */ - - goto out; - } - } - - /* clip overlaps pRegion, need to intersect */ - - REGION_INIT (pScreen, &clipped, NullBox, 0); - REGION_INTERSECT (pScreen, &clipped, &pWindow->borderClip, pRegion); - - xp_mark_window (winRec->wid, REGION_NUM_RECTS (&clipped), - REGION_RECTS (&clipped), -winRec->x, -winRec->y); - - REGION_UNINIT (pScreen, &clipped); - - RootlessQueueRedisplay (pTop->drawable.pScreen); - } - -out: -#ifdef ROOTLESSDEBUG - { - BoxRec *box = REGION_RECTS(pRegion), *end; - int numBox = REGION_NUM_RECTS(pRegion); - - for (end = box+numBox; box < end; box++) { - RL_DEBUG_MSG("Damage rect: %i, %i, %i, %i\n", - box->x1, box->x2, box->y1, box->y2); - } - } -#endif - return; -} - -/* pBox is GLOBAL */ -void -RootlessDamageBox (WindowPtr pWindow, BoxPtr pBox) -{ - RegionRec region; - - REGION_INIT (pWindow->drawable.pScreen, ®ion, pBox, 1); - - RootlessDamageRegion (pWindow, ®ion); - - REGION_UNINIT (pWindow->drawable.pScreen, ®ion); /* no-op */ -} - - -/* (x, y, w, h) is in window-local coordinates. */ -void -RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h) -{ - BoxRec box; - RegionRec region; - - x += pWindow->drawable.x; - y += pWindow->drawable.y; - - box.x1 = x; - box.x2 = x + w; - box.y1 = y; - box.y2 = y + h; - - REGION_INIT (pWindow->drawable.pScreen, ®ion, &box, 1); - - RootlessDamageRegion (pWindow, ®ion); - - REGION_UNINIT (pWindow->drawable.pScreen, ®ion); /* no-op */ -} - -/* Stop drawing and redisplay the damaged region of a window. */ -void -RootlessRedisplay (WindowPtr pWindow) -{ - DRISynchronizeDrawable (&pWindow->drawable, TRUE); - RootlessStopDrawing(pWindow, TRUE); -} - -/* Walk every window on a screen and redisplay the damaged regions. */ -void -RootlessRedisplayScreen (ScreenPtr pScreen) -{ - RootlessScreenRec *screenRec = SCREENREC (pScreen); - WindowPtr root = WindowTable[pScreen->myNum]; - WindowPtr win; - - if (root != NULL) - { - RootlessRedisplay(root); - - for (win = root->firstChild; win; win = win->nextSib) - { - if (WINREC (win) != NULL) - RootlessRedisplay (win); - } - } - - screenRec->last_redisplay = GetTimeInMillis (); -} - -void -RootlessRepositionWindows (ScreenPtr pScreen) -{ - WindowPtr root = WindowTable[pScreen->myNum]; - WindowPtr win; - - if (root != NULL) - { - RootlessRepositionWindow (root); - - for (win = root->firstChild; win; win = win->nextSib) - { - if (WINREC (win) != NULL) - RootlessRepositionWindow (win); - } - } -} - -void -RootlessFlushScreenColormaps (ScreenPtr pScreen) -{ - WindowPtr root = WindowTable[pScreen->myNum]; - WindowPtr win; - - if (root != NULL) - { - RootlessRepositionWindow (root); - - for (win = root->firstChild; win; win = win->nextSib) - { - if (WINREC (win) != NULL) - RootlessFlushWindowColormap (win); - } - } -} diff --git a/synfig-osx/trunk/launcher/rootless-common.h b/synfig-osx/trunk/launcher/rootless-common.h deleted file mode 100644 index d2aa7b3..0000000 --- a/synfig-osx/trunk/launcher/rootless-common.h +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Common internal rootless definitions and code - * - * Greg Parker gparker@cs.stanford.edu - */ - -/* Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. */ - -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessCommon.h,v 1.6 2002/07/24 05:58:33 torrey Exp $ */ - -#ifndef _ROOTLESSCOMMON_H -#define _ROOTLESSCOMMON_H - -#include "rootless.h" - -#include "pixmapstr.h" -#include "windowstr.h" - -#ifdef RENDER -#include "picturestr.h" -#endif - -/* Debug output, or not. */ -#ifdef ROOTLESSDEBUG -#define RL_DEBUG_MSG ErrorF -#else -#define RL_DEBUG_MSG(a, ...) -#endif - -#undef MIN -#define MIN(x,y) ((x) < (y) ? (x) : (y)) -#undef MAX -#define MAX(x,y) ((x) > (y) ? (x) : (y)) - -/* Global variables */ -extern int rootlessGCPrivateIndex; -extern int rootlessScreenPrivateIndex; -extern int rootlessWindowPrivateIndex; -extern int rootlessNoDRIDrawing; - -/* RootlessGCRec: private per-gc data */ -typedef struct { - GCFuncs *originalFuncs; - GCOps *originalOps; -} RootlessGCRec; - -/* RootlessWindowRec: private per-window data */ -typedef struct RootlessWindowRec { - int x, y; - unsigned int width, height; - unsigned int borderWidth; - int level; - - xp_window_id wid; - WindowPtr win; - - /* Valid when locked (i.e. is_drawing is set) */ - void *data; - unsigned int rowbytes; - - PixmapPtr pixmap; - PixmapPtr oldPixmap; - - unsigned long unrealize_time; /* in seconds */ - - unsigned int is_drawing :1; - unsigned int is_update_disabled :1; - unsigned int is_reorder_pending :1; - unsigned int is_offscreen :1; - unsigned int is_obscured :1; -} RootlessWindowRec; - -/* RootlessScreenRec: per-screen private data */ -typedef struct { - ScreenPtr pScreen; - - CreateScreenResourcesProcPtr CreateScreenResources; - CloseScreenProcPtr CloseScreen; - - CreateWindowProcPtr CreateWindow; - DestroyWindowProcPtr DestroyWindow; - RealizeWindowProcPtr RealizeWindow; - UnrealizeWindowProcPtr UnrealizeWindow; - ReparentWindowProcPtr ReparentWindow; - MoveWindowProcPtr MoveWindow; - ResizeWindowProcPtr ResizeWindow; - RestackWindowProcPtr RestackWindow; - ChangeBorderWidthProcPtr ChangeBorderWidth; - PositionWindowProcPtr PositionWindow; - ChangeWindowAttributesProcPtr ChangeWindowAttributes; - - CreateGCProcPtr CreateGC; - PaintWindowBackgroundProcPtr PaintWindowBackground; - PaintWindowBorderProcPtr PaintWindowBorder; - CopyWindowProcPtr CopyWindow; - GetImageProcPtr GetImage; - SourceValidateProcPtr SourceValidate; - - MarkOverlappedWindowsProcPtr MarkOverlappedWindows; - ValidateTreeProcPtr ValidateTree; - -#ifdef SHAPE - SetShapeProcPtr SetShape; -#endif - -#ifdef RENDER - CompositeProcPtr Composite; - GlyphsProcPtr Glyphs; -#endif - - InstallColormapProcPtr InstallColormap; - UninstallColormapProcPtr UninstallColormap; - StoreColorsProcPtr StoreColors; - - void *pixmap_data; - unsigned int pixmap_data_size; - - ColormapPtr colormap; - - void *redisplay_timer; - CARD32 last_redisplay; - - unsigned int redisplay_timer_set :1; - unsigned int redisplay_queued :1; - unsigned int redisplay_expired :1; - unsigned int colormap_changed :1; -} RootlessScreenRec; - - -/* "Definition of the Porting Layer for the X11 Sample Server" says - unwrap and rewrap of screen functions is unnecessary, but - screen->CreateGC changes after a call to cfbCreateGC. */ - -#define SCREEN_UNWRAP(screen, fn) \ - screen->fn = SCREENREC(screen)->fn; - -#define SCREEN_WRAP(screen, fn) \ - SCREENREC(screen)->fn = screen->fn; \ - screen->fn = Rootless##fn - -/* Accessors for screen and window privates */ - -#define SCREENREC(pScreen) \ - ((RootlessScreenRec*)(pScreen)->devPrivates[rootlessScreenPrivateIndex].ptr) - -#define WINREC(pWin) \ - ((RootlessWindowRec *)(pWin)->devPrivates[rootlessWindowPrivateIndex].ptr) - -/* BoxRec manipulators (Copied from shadowfb) */ - -#define TRIM_BOX(box, pGC) { \ - BoxPtr extents = &pGC->pCompositeClip->extents;\ - if(box.x1 < extents->x1) box.x1 = extents->x1; \ - if(box.x2 > extents->x2) box.x2 = extents->x2; \ - if(box.y1 < extents->y1) box.y1 = extents->y1; \ - if(box.y2 > extents->y2) box.y2 = extents->y2; \ -} - -#define TRANSLATE_BOX(box, pDraw) { \ - box.x1 += pDraw->x; \ - box.x2 += pDraw->x; \ - box.y1 += pDraw->y; \ - box.y2 += pDraw->y; \ -} - -#define TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC) { \ - TRANSLATE_BOX(box, pDraw); \ - TRIM_BOX(box, pGC); \ -} - -#define BOX_NOT_EMPTY(box) \ - (((box.x2 - box.x1) > 0) && ((box.y2 - box.y1) > 0)) - -/* We don't want to clip windows to the edge of the screen. HUGE_ROOT - temporarily makes the root window really big. This is needed as a - wrapper around any function that calls SetWinSize or SetBorderSize - which clip a window against its parents, including the root. */ - -extern RegionRec rootlessHugeRoot; - -#define HUGE_ROOT(pWin) \ - do { \ - WindowPtr w = pWin; \ - while (w->parent != NULL) \ - w = w->parent; \ - saveRoot = w->winSize; \ - w->winSize = rootlessHugeRoot; \ - } while (0) - -#define NORMAL_ROOT(pWin) \ - do { \ - WindowPtr w = pWin; \ - while (w->parent != NULL) \ - w = w->parent; \ - w->winSize = saveRoot; \ - } while (0) - -/* Returns TRUE if this window is a top-level window (i.e. child of the root) - The root is not a top-level window. */ -#define IsTopLevel(pWin) \ - ((pWin) != NULL && (pWin)->parent != NULL && (pWin)->parent->parent == NULL) - -/* Returns TRUE if this window is a root window */ -#define IsRoot(pWin) \ - ((pWin) == WindowTable[(pWin)->drawable.pScreen->myNum]) - -/* Returns the top-level parent of pWindow. - The root is the top-level parent of itself, even though the root is - not otherwise considered to be a top-level window. */ -extern WindowPtr TopLevelParent (WindowPtr pWindow); - -/* Returns TRUE if this window is visible inside a frame (e.g. it is - visible and has a top-level or root parent) */ -extern Bool IsFramedWindow (WindowPtr pWin); - -/* Adjust base address of pixmap by DX,DY */ -extern void TranslatePixmapBase (PixmapPtr pPix, int dx, int dy); - -/* Prepare a window for direct access to its backing buffer. */ -extern void RootlessStartDrawing (WindowPtr pWindow); - -/* Mark that no more drawing operations will hit the window until ``start - drawing'' is issued again. */ -extern void RootlessFinishedDrawing (WindowPtr pWindow); - -/* Finish drawing to a window's backing buffer. */ -extern void RootlessStopDrawing (WindowPtr pWindow, Bool flush); - -/* Routines that cause regions to get redrawn. - DamageRegion and DamageRect are in global coordinates. - DamageBox is in window-local coordinates. */ -extern void RootlessDamageRegion (WindowPtr pWindow, RegionPtr pRegion); -extern void RootlessDamageRect (WindowPtr pWindow, int x, int y, int w, int h); -extern void RootlessDamageBox (WindowPtr pWindow, BoxPtr pBox); -extern void RootlessRedisplay (WindowPtr pWindow); -extern void RootlessRedisplayScreen (ScreenPtr pScreen); - -extern void RootlessQueueRedisplay (ScreenPtr pScreen); -extern Bool RootlessMayRedisplay (ScreenPtr pScreen); -extern void RootlessScreenExpose (ScreenPtr pScreen); - -/* Return the colormap currently installed on the given screen. */ -extern ColormapPtr RootlessGetColormap (ScreenPtr pScreen); - -/* Convert colormap to ARGB. */ -extern Bool RootlessResolveColormap (ScreenPtr pScreen, int first_color, - int n_colors, uint32_t *colors); - -extern void RootlessFlushWindowColormap (WindowPtr pWin); -extern void RootlessFlushScreenColormaps (ScreenPtr pScreen); - -/* Move windows back to their position relative to the screen origin. */ -extern void RootlessRepositionWindow (WindowPtr pWin); -extern void RootlessRepositionWindows (ScreenPtr pScreen); - -/* Move the window to it's correct place in the physical stacking order */ -extern void RootlessReorderWindow (WindowPtr pWin); - -/* Bit mask for alpha channel with a particular number of bits per - pixel. Note that we only care for 32bpp data. OS X uses planar alpha - for 16bpp. */ -#define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0) - -#ifdef RENDER -extern void RootlessComposite(CARD8 op, PicturePtr pSrc, - PicturePtr pMask, PicturePtr pDst, - INT16 xSrc, INT16 ySrc, - INT16 xMask, INT16 yMask, - INT16 xDst, INT16 yDst, - CARD16 width, CARD16 height); -#endif - -extern void RootlessNativeWindowStateChanged (xp_window_id id, - unsigned int state); - -extern void RootlessEnableRoot (ScreenPtr pScreen); -extern void RootlessDisableRoot (ScreenPtr pScreen); -extern void RootlessSetWindowLevel (WindowPtr pWin, int level); - -#endif /* _ROOTLESSCOMMON_H */ diff --git a/synfig-osx/trunk/launcher/rootless-gc.c b/synfig-osx/trunk/launcher/rootless-gc.c deleted file mode 100644 index dea17e9..0000000 --- a/synfig-osx/trunk/launcher/rootless-gc.c +++ /dev/null @@ -1,1526 +0,0 @@ -/* - * Graphics Context support for Mac OS X rootless X server - */ -/* - * Copyright (c) 2001 Greg Parker. All Rights Reserved. - * Copyright (c) 2002 Torrey T. Lyons. All Rights Reserved. - * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessGC.c,v 1.3 2002/07/24 05:58:33 torrey Exp $ */ - -#include "mi.h" -#include "scrnintstr.h" -#include "gcstruct.h" -#include "pixmapstr.h" -#include "windowstr.h" -#include "dixfontstr.h" -#include "mivalidate.h" -#include "fb.h" - -#include -#include -#include - -#include "rootless-common.h" - - -// GC functions -static void -RootlessValidateGC(GCPtr pGC, unsigned long changes, - DrawablePtr pDrawable); -static void RootlessChangeGC(GCPtr pGC, unsigned long mask); -static void RootlessCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); -static void RootlessDestroyGC(GCPtr pGC); -static void RootlessChangeClip(GCPtr pGC, int type, pointer pvalue, - int nrects); -static void RootlessDestroyClip(GCPtr pGC); -static void RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc); - -GCFuncs rootlessGCFuncs = { - RootlessValidateGC, - RootlessChangeGC, - RootlessCopyGC, - RootlessDestroyGC, - RootlessChangeClip, - RootlessDestroyClip, - RootlessCopyClip, -}; - -// GC operations -static void RootlessFillSpans(); -static void RootlessSetSpans(); -static void RootlessPutImage(); -static RegionPtr RootlessCopyArea(); -static RegionPtr RootlessCopyPlane(); -static void RootlessPolyPoint(); -static void RootlessPolylines(); -static void RootlessPolySegment(); -static void RootlessPolyRectangle(); -static void RootlessPolyArc(); -static void RootlessFillPolygon(); -static void RootlessPolyFillRect(); -static void RootlessPolyFillArc(); -static int RootlessPolyText8(); -static int RootlessPolyText16(); -static void RootlessImageText8(); -static void RootlessImageText16(); -static void RootlessImageGlyphBlt(); -static void RootlessPolyGlyphBlt(); -static void RootlessPushPixels(); - -static GCOps rootlessGCOps = { - RootlessFillSpans, - RootlessSetSpans, - RootlessPutImage, - RootlessCopyArea, - RootlessCopyPlane, - RootlessPolyPoint, - RootlessPolylines, - RootlessPolySegment, - RootlessPolyRectangle, - RootlessPolyArc, - RootlessFillPolygon, - RootlessPolyFillRect, - RootlessPolyFillArc, - RootlessPolyText8, - RootlessPolyText16, - RootlessImageText8, - RootlessImageText16, - RootlessImageGlyphBlt, - RootlessPolyGlyphBlt, - RootlessPushPixels -#ifdef NEED_LINEHELPER - , NULL -#endif -}; - - -Bool -RootlessCreateGC(GCPtr pGC) -{ - RootlessGCRec *gcrec; - RootlessScreenRec *s; - Bool result; - - SCREEN_UNWRAP(pGC->pScreen, CreateGC); - s = (RootlessScreenRec *) pGC->pScreen-> - devPrivates[rootlessScreenPrivateIndex].ptr; - result = s->CreateGC(pGC); - gcrec = (RootlessGCRec *) pGC->devPrivates[rootlessGCPrivateIndex].ptr; - gcrec->originalOps = NULL; // don't wrap ops yet - gcrec->originalFuncs = pGC->funcs; - pGC->funcs = &rootlessGCFuncs; - - SCREEN_WRAP(pGC->pScreen, CreateGC); - return result; -} - - -// GC func wrapping -// ValidateGC wraps gcOps iff dest is viewable. All others just unwrap&call. - -// GCFUN_UNRAP assumes funcs have been wrapped and -// does not assume ops have been wrapped -#define GCFUNC_UNWRAP(pGC) \ - RootlessGCRec *gcrec = (RootlessGCRec *) \ - (pGC)->devPrivates[rootlessGCPrivateIndex].ptr; \ - (pGC)->funcs = gcrec->originalFuncs; \ - if (gcrec->originalOps) { \ - (pGC)->ops = gcrec->originalOps; \ -} - -#define GCFUNC_WRAP(pGC) \ - gcrec->originalFuncs = (pGC)->funcs; \ - (pGC)->funcs = &rootlessGCFuncs; \ - if (gcrec->originalOps) { \ - gcrec->originalOps = (pGC)->ops; \ - (pGC)->ops = &rootlessGCOps; \ -} - -/* Turn drawing on the root into a no-op */ -#define GC_IS_ROOT(pDst) ((pDst)->type == DRAWABLE_WINDOW \ - && IsRoot ((WindowPtr) (pDst)) \ - && WINREC ((WindowPtr) (pDst)) == NULL) - -#define GC_SKIP_ROOT(pDst) \ - do { \ - if (GC_IS_ROOT (pDst)) \ - return; \ - } while (0) - -/* Our main problem when drawing is that we have to make sure that - the alpha channel of the windows we're drawing in is always opaque. - - fb makes this harder than it would otherwise be by noticing that a - planemask of 0x00ffffff includes all bits when depth=24, and so - "optimizes" the pm to 0xffffffff. We work around that by temporarily - setting depth=bpp while changing the GC. - - Anyway, so the normal situation (in 32 bit mode) is that the - planemask is 0x00ffffff and thus fb leaves the alpha channel alone - (and it's opaque initially, so things work out). - - But there's a problem with drawing with a planemask that doesn't - have all bits set - it normally causes fb to fall off its fastest - paths when blitting and filling. - - So my solution to that is to try to recognize when we can relax the - planemask back to ~0, and do that for the duration of the drawing - operation, setting the alpha channel in fg/bg pixels to opaque at - the same time. We can do this when drawing op is GXcopy. We can also - do it when copying from another window (since its alpha channel must - also be opaque). - - Note that even when we can't set planemask to all ones, fbBlt may - still choose altivec'd code if it's GXcopy and a forwards copy. This - is mainly intended for copying from pixmaps to windows. The copy - operation used sets alpha to opaque. - - The three macros below are used to implement this, drawing ops look - something like this: - - OP { - GC_SAVE (gc); - GCFUNC_UNWRAP (gc); - - ... - - if (can_accel_xxx (..) && otherwise-suitable) - GC_UNSET_PM (gc, dst); - - gc->funcs->OP (gc, ...); - - GC_RESTORE (gc, dst); - GCFUNC_WRAP (gc); - } - - */ - -#define GC_SAVE(pGC) \ - unsigned long _save_fg = (pGC)->fgPixel; \ - unsigned long _save_bg = (pGC)->bgPixel; \ - unsigned long _save_pm = (pGC)->planemask; \ - Bool _changed = FALSE - -#define GC_RESTORE(pGC, pDraw) \ - do { \ - if (_changed) { \ - unsigned int depth = (pDraw)->depth; \ - (pGC)->fgPixel = _save_fg; \ - (pGC)->bgPixel = _save_bg; \ - (pGC)->planemask = _save_pm; \ - (pDraw)->depth = (pDraw)->bitsPerPixel; \ - validate_gc (pGC, GCForeground | GCBackground \ - | GCPlaneMask, pDraw); \ - (pDraw)->depth = depth; \ - } \ - } while (0) - -#define GC_UNSET_PM(pGC, pDraw) \ - do { \ - unsigned int mask = RootlessAlphaMask ((pDraw)->bitsPerPixel); \ - if (((pGC)->planemask & mask) != mask) { \ - unsigned int depth = (pDraw)->depth; \ - (pGC)->fgPixel |= mask; \ - (pGC)->bgPixel |= mask; \ - (pGC)->planemask |= mask; \ - (pDraw)->depth = (pDraw)->bitsPerPixel; \ - validate_gc (pGC, GCForeground \ - | GCBackground | GCPlaneMask, pDraw); \ - (pDraw)->depth = depth; \ - _changed = TRUE; \ - } \ - } while (0) - -static void -validate_gc (GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) -{ - RootlessGCRec *gcrec = (RootlessGCRec *) - (pGC)->devPrivates[rootlessGCPrivateIndex].ptr; - - pGC->funcs->ValidateGC(pGC, changes, pDrawable); - - if (((WindowPtr) pDrawable)->viewable) - { - gcrec->originalOps = pGC->ops; - } -} - -static RootlessWindowRec * -can_accel_blit (DrawablePtr pDraw, GCPtr pGC) -{ - WindowPtr pTop; - RootlessWindowRec *winRec; - unsigned int pm; - - if (pGC->alu != GXcopy) - return NULL; - - if (pDraw->type != DRAWABLE_WINDOW) - return NULL; - - pm = ~RootlessAlphaMask (pDraw->bitsPerPixel); - if ((pGC->planemask & pm) != pm) - return NULL; - - pTop = TopLevelParent ((WindowPtr) pDraw); - if (pTop == NULL) - return NULL; - - winRec = WINREC(pTop); - if (winRec == NULL) - return NULL; - - return winRec; -} - -static inline RootlessWindowRec * -can_accel_fill (DrawablePtr pDraw, GCPtr pGC) -{ - if (pGC->fillStyle != FillSolid) - return NULL; - - return can_accel_blit (pDraw, pGC); -} - -static unsigned int -box_bytes (DrawablePtr pDraw, BoxRec *box) -{ - unsigned int pixels; - - pixels = (box->x2 - box->x1) * (box->y2 - box->y1); - - return pixels * (pDraw->bitsPerPixel >> 3); -} - -static void -RootlessValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) -{ - GCFUNC_UNWRAP(pGC); - - gcrec->originalOps = NULL; - - if (pDrawable->type == DRAWABLE_WINDOW) - { - /* Prevent fb relaxing planemask by telling it we use all - bits temporarily. */ - - unsigned int depth = pDrawable->depth; - pDrawable->depth = pDrawable->bitsPerPixel; - pGC->planemask &= ~RootlessAlphaMask (pDrawable->bitsPerPixel); - validate_gc (pGC, changes | GCPlaneMask, pDrawable); - pDrawable->depth = depth; - } - else - pGC->funcs->ValidateGC(pGC, changes, pDrawable); - - GCFUNC_WRAP(pGC); -} - -static void RootlessChangeGC(GCPtr pGC, unsigned long mask) -{ - GCFUNC_UNWRAP(pGC); - pGC->funcs->ChangeGC(pGC, mask); - GCFUNC_WRAP(pGC); -} - -static void RootlessCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) -{ - GCFUNC_UNWRAP(pGCDst); - pGCDst->funcs->CopyGC(pGCSrc, mask, pGCDst); - GCFUNC_WRAP(pGCDst); -} - -static void RootlessDestroyGC(GCPtr pGC) -{ - GCFUNC_UNWRAP(pGC); - pGC->funcs->DestroyGC(pGC); - GCFUNC_WRAP(pGC); -} - -static void RootlessChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects) -{ - GCFUNC_UNWRAP(pGC); - pGC->funcs->ChangeClip(pGC, type, pvalue, nrects); - GCFUNC_WRAP(pGC); -} - -static void RootlessDestroyClip(GCPtr pGC) -{ - GCFUNC_UNWRAP(pGC); - pGC->funcs->DestroyClip(pGC); - GCFUNC_WRAP(pGC); -} - -static void RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc) -{ - GCFUNC_UNWRAP(pgcDst); - pgcDst->funcs->CopyClip(pgcDst, pgcSrc); - GCFUNC_WRAP(pgcDst); -} - - -// GC ops -// We can't use shadowfb because shadowfb assumes one pixmap -// and our root window is a special case. -// So much of this code is copied from shadowfb. - -// assumes both funcs and ops are wrapped -#define GCOP_UNWRAP(pGC) \ - RootlessGCRec *gcrec = (RootlessGCRec *) \ - (pGC)->devPrivates[rootlessGCPrivateIndex].ptr; \ - GCFuncs *saveFuncs = pGC->funcs; \ - (pGC)->funcs = gcrec->originalFuncs; \ - (pGC)->ops = gcrec->originalOps; - -#define GCOP_WRAP(pGC) \ - gcrec->originalOps = (pGC)->ops; \ - (pGC)->funcs = saveFuncs; \ - (pGC)->ops = &rootlessGCOps; - - -static void -RootlessFillSpans(DrawablePtr dst, GCPtr pGC, int nInit, - DDXPointPtr pptInit, int *pwidthInit, int sorted) -{ - GC_SAVE (pGC); - - GC_SKIP_ROOT (dst); - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("fill spans start\n"); - - if (nInit <= 0) { - pGC->ops->FillSpans(dst, pGC, nInit, pptInit, pwidthInit, sorted); - } else { - DDXPointPtr ppt = pptInit; - int *pwidth = pwidthInit; - int i = nInit; - BoxRec box; - - box.x1 = ppt->x; - box.x2 = box.x1 + *pwidth; - box.y2 = box.y1 = ppt->y; - - while(--i) { - ppt++; - pwidthInit++; - if(box.x1 > ppt->x) - box.x1 = ppt->x; - if(box.x2 < (ppt->x + *pwidth)) - box.x2 = ppt->x + *pwidth; - if(box.y1 > ppt->y) - box.y1 = ppt->y; - else if(box.y2 < ppt->y) - box.y2 = ppt->y; - } - - box.y2++; - - RootlessStartDrawing((WindowPtr) dst); - - if (can_accel_fill (dst, pGC) - && box_bytes (dst, &box) >= xp_fill_bytes_threshold) - { - GC_UNSET_PM (pGC, dst); - } - - pGC->ops->FillSpans(dst, pGC, nInit, pptInit, pwidthInit, sorted); - - TRIM_AND_TRANSLATE_BOX(box, dst, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - - RootlessFinishedDrawing ((WindowPtr) dst); - } - - GC_RESTORE (pGC, dst); - GCOP_WRAP(pGC); - RL_DEBUG_MSG("fill spans end\n"); -} - -static void -RootlessSetSpans(DrawablePtr dst, GCPtr pGC, char *pSrc, - DDXPointPtr pptInit, int *pwidthInit, - int nspans, int sorted) -{ - GC_SKIP_ROOT (dst); - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("set spans start\n"); - - if (nspans <= 0) { - pGC->ops->SetSpans(dst, pGC, pSrc, pptInit, pwidthInit, - nspans, sorted); - } else { - DDXPointPtr ppt = pptInit; - int *pwidth = pwidthInit; - int i = nspans; - BoxRec box; - - box.x1 = ppt->x; - box.x2 = box.x1 + *pwidth; - box.y2 = box.y1 = ppt->y; - - while(--i) { - ppt++; - pwidth++; - if(box.x1 > ppt->x) - box.x1 = ppt->x; - if(box.x2 < (ppt->x + *pwidth)) - box.x2 = ppt->x + *pwidth; - if(box.y1 > ppt->y) - box.y1 = ppt->y; - else if(box.y2 < ppt->y) - box.y2 = ppt->y; - } - - box.y2++; - - RootlessStartDrawing((WindowPtr) dst); - pGC->ops->SetSpans(dst, pGC, pSrc, pptInit, pwidthInit, - nspans, sorted); - - TRIM_AND_TRANSLATE_BOX(box, dst, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - - RootlessFinishedDrawing ((WindowPtr) dst); - } - GCOP_WRAP(pGC); - RL_DEBUG_MSG("set spans end\n"); -} - -static void -RootlessPutImage(DrawablePtr dst, GCPtr pGC, - int depth, int x, int y, int w, int h, - int leftPad, int format, char *pBits) -{ - BoxRec box; - - GC_SKIP_ROOT (dst); - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("put image start\n"); - - RootlessStartDrawing((WindowPtr) dst); - pGC->ops->PutImage(dst, pGC, depth, x,y,w,h, leftPad, format, pBits); - - box.x1 = x + dst->x; - box.x2 = box.x1 + w; - box.y1 = y + dst->y; - box.y2 = box.y1 + h; - - TRIM_BOX(box, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - - RootlessFinishedDrawing ((WindowPtr) dst); - - GCOP_WRAP(pGC); - RL_DEBUG_MSG("put image end\n"); -} - -/* changed area is *dest* rect */ -static RegionPtr -RootlessCopyArea(DrawablePtr pSrc, DrawablePtr dst, GCPtr pGC, - int srcx, int srcy, int w, int h, - int dstx, int dsty) -{ - RegionPtr result; - BoxRec box; - GC_SAVE (pGC); - Bool src_drawing = FALSE; - - if (GC_IS_ROOT (dst) || GC_IS_ROOT (pSrc)) - return NULL; /* nothing exposed */ - - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("copy area start (src 0x%x, dst 0x%x)\n", pSrc, dst); - - if (pSrc->type == DRAWABLE_WINDOW && IsFramedWindow((WindowPtr)pSrc)) - { - unsigned int bytes; - - /* If both source and dest are windows, and we're doing - a simple copy operation, we can remove the alpha-protecting - planemask (since source has opaque alpha as well) */ - - bytes = w * h * (pSrc->depth >> 3); - - if (bytes >= xp_copy_bytes_threshold && can_accel_blit (pSrc, pGC)) - { - GC_UNSET_PM (pGC, dst); - } - - RootlessStartDrawing((WindowPtr) pSrc); - src_drawing = TRUE; - } - RootlessStartDrawing((WindowPtr) dst); - result = pGC->ops->CopyArea(pSrc, dst, pGC, srcx, srcy, w, h, dstx, dsty); - - box.x1 = dstx + dst->x; - box.x2 = box.x1 + w; - box.y1 = dsty + dst->y; - box.y2 = box.y1 + h; - - TRIM_BOX(box, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - - RootlessFinishedDrawing ((WindowPtr) dst); - if (src_drawing) - RootlessFinishedDrawing ((WindowPtr) pSrc); - - GC_RESTORE (pGC, dst); - GCOP_WRAP(pGC); - RL_DEBUG_MSG("copy area end\n"); - return result; -} - -/* changed area is *dest* rect */ -static RegionPtr RootlessCopyPlane(DrawablePtr pSrc, DrawablePtr dst, - GCPtr pGC, int srcx, int srcy, - int w, int h, int dstx, int dsty, - unsigned long plane) -{ - RegionPtr result; - BoxRec box; - Bool src_drawing = FALSE; - - if (GC_IS_ROOT (dst) || GC_IS_ROOT (pSrc)) - return NULL; /* nothing exposed */ - - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("copy plane start\n"); - - if (pSrc->type == DRAWABLE_WINDOW && IsFramedWindow((WindowPtr)pSrc)) { - RootlessStartDrawing((WindowPtr) pSrc); - src_drawing = TRUE; - } - RootlessStartDrawing((WindowPtr) dst); - result = pGC->ops->CopyPlane(pSrc, dst, pGC, srcx, srcy, w, h, - dstx, dsty, plane); - - box.x1 = dstx + dst->x; - box.x2 = box.x1 + w; - box.y1 = dsty + dst->y; - box.y2 = box.y1 + h; - - TRIM_BOX(box, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - - RootlessFinishedDrawing ((WindowPtr) dst); - if (src_drawing) - RootlessFinishedDrawing ((WindowPtr) pSrc); - - GCOP_WRAP(pGC); - RL_DEBUG_MSG("copy plane end\n"); - return result; -} - -// Options for size of changed area: -// 0 = box per point -// 1 = big box around all points -// 2 = accumulate point in 20 pixel radius -#define ROOTLESS_CHANGED_AREA 1 -#define abs(a) ((a) > 0 ? (a) : -(a)) - -/* changed area is box around all points */ -static void RootlessPolyPoint(DrawablePtr dst, GCPtr pGC, - int mode, int npt, DDXPointPtr pptInit) -{ - GC_SKIP_ROOT (dst); - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("polypoint start\n"); - - RootlessStartDrawing((WindowPtr) dst); - pGC->ops->PolyPoint(dst, pGC, mode, npt, pptInit); - - if (npt > 0) { -#if ROOTLESS_CHANGED_AREA==0 - // box per point - BoxRec box; - - while (npt) { - box.x1 = pptInit->x; - box.y1 = pptInit->y; - box.x2 = box.x1 + 1; - box.y2 = box.y1 + 1; - - TRIM_AND_TRANSLATE_BOX(box, dst, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - - npt--; - pptInit++; - } - -#elif ROOTLESS_CHANGED_AREA==1 - // one big box - BoxRec box; - - box.x2 = box.x1 = pptInit->x; - box.y2 = box.y1 = pptInit->y; - while(--npt) { - pptInit++; - if(box.x1 > pptInit->x) - box.x1 = pptInit->x; - else if(box.x2 < pptInit->x) - box.x2 = pptInit->x; - if(box.y1 > pptInit->y) - box.y1 = pptInit->y; - else if(box.y2 < pptInit->y) - box.y2 = pptInit->y; - } - - box.x2++; - box.y2++; - - TRIM_AND_TRANSLATE_BOX(box, dst, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - -#elif ROOTLESS_CHANGED_AREA==2 - // clever(?) method: accumulate point in 20-pixel radius - BoxRec box; - int firstx, firsty; - - box.x2 = box.x1 = firstx = pptInit->x; - box.y2 = box.y1 = firsty = pptInit->y; - while(--npt) { - pptInit++; - if (abs(pptInit->x - firstx) > 20 || - abs(pptInit->y - firsty) > 20) { - box.x2++; - box.y2++; - TRIM_AND_TRANSLATE_BOX(box, dst, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - box.x2 = box.x1 = firstx = pptInit->x; - box.y2 = box.y1 = firsty = pptInit->y; - } else { - if (box.x1 > pptInit->x) box.x1 = pptInit->x; - else if (box.x2 < pptInit->x) box.x2 = pptInit->x; - if (box.y1 > pptInit->y) box.y1 = pptInit->y; - else if (box.y2 < pptInit->y) box.y2 = pptInit->y; - } - } - box.x2++; - box.y2++; - TRIM_AND_TRANSLATE_BOX(box, dst, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); -#endif /* ROOTLESS_CHANGED_AREA */ - } - - RootlessFinishedDrawing ((WindowPtr) dst); - - GCOP_WRAP(pGC); - RL_DEBUG_MSG("polypoint end\n"); -} - -#undef ROOTLESS_CHANGED_AREA - -/* changed area is box around each line */ -static void RootlessPolylines(DrawablePtr dst, GCPtr pGC, - int mode, int npt, DDXPointPtr pptInit) -{ - GC_SKIP_ROOT (dst); - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("poly lines start\n"); - - RootlessStartDrawing((WindowPtr) dst); - pGC->ops->Polylines(dst, pGC, mode, npt, pptInit); - - if (npt > 0) { - BoxRec box; - int extra = pGC->lineWidth >> 1; - - box.x2 = box.x1 = pptInit->x; - box.y2 = box.y1 = pptInit->y; - - if(npt > 1) { - if(pGC->joinStyle == JoinMiter) - extra = 6 * pGC->lineWidth; - else if(pGC->capStyle == CapProjecting) - extra = pGC->lineWidth; - } - - if(mode == CoordModePrevious) { - int x = box.x1; - int y = box.y1; - - while(--npt) { - pptInit++; - x += pptInit->x; - y += pptInit->y; - if(box.x1 > x) - box.x1 = x; - else if(box.x2 < x) - box.x2 = x; - if(box.y1 > y) - box.y1 = y; - else if(box.y2 < y) - box.y2 = y; - } - } else { - while(--npt) { - pptInit++; - if(box.x1 > pptInit->x) - box.x1 = pptInit->x; - else if(box.x2 < pptInit->x) - box.x2 = pptInit->x; - if(box.y1 > pptInit->y) - box.y1 = pptInit->y; - else if(box.y2 < pptInit->y) - box.y2 = pptInit->y; - } - } - - box.x2++; - box.y2++; - - if(extra) { - box.x1 -= extra; - box.x2 += extra; - box.y1 -= extra; - box.y2 += extra; - } - - TRIM_AND_TRANSLATE_BOX(box, dst, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - } - - RootlessFinishedDrawing ((WindowPtr) dst); - - GCOP_WRAP(pGC); - RL_DEBUG_MSG("poly lines end\n"); -} - -/* changed area is box around each line segment */ -static void RootlessPolySegment(DrawablePtr dst, GCPtr pGC, - int nseg, xSegment *pSeg) -{ - GC_SKIP_ROOT (dst); - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("poly segment start (win 0x%x)\n", dst); - - RootlessStartDrawing((WindowPtr) dst); - pGC->ops->PolySegment(dst, pGC, nseg, pSeg); - - if (nseg > 0) { - BoxRec box; - int extra = pGC->lineWidth; - - if(pGC->capStyle != CapProjecting) - extra >>= 1; - - if(pSeg->x2 > pSeg->x1) { - box.x1 = pSeg->x1; - box.x2 = pSeg->x2; - } else { - box.x2 = pSeg->x1; - box.x1 = pSeg->x2; - } - - if(pSeg->y2 > pSeg->y1) { - box.y1 = pSeg->y1; - box.y2 = pSeg->y2; - } else { - box.y2 = pSeg->y1; - box.y1 = pSeg->y2; - } - - while(--nseg) { - pSeg++; - if(pSeg->x2 > pSeg->x1) { - if(pSeg->x1 < box.x1) box.x1 = pSeg->x1; - if(pSeg->x2 > box.x2) box.x2 = pSeg->x2; - } else { - if(pSeg->x2 < box.x1) box.x1 = pSeg->x2; - if(pSeg->x1 > box.x2) box.x2 = pSeg->x1; - } - if(pSeg->y2 > pSeg->y1) { - if(pSeg->y1 < box.y1) box.y1 = pSeg->y1; - if(pSeg->y2 > box.y2) box.y2 = pSeg->y2; - } else { - if(pSeg->y2 < box.y1) box.y1 = pSeg->y2; - if(pSeg->y1 > box.y2) box.y2 = pSeg->y1; - } - } - - box.x2++; - box.y2++; - - if(extra) { - box.x1 -= extra; - box.x2 += extra; - box.y1 -= extra; - box.y2 += extra; - } - - TRIM_AND_TRANSLATE_BOX(box, dst, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - } - - RootlessFinishedDrawing ((WindowPtr) dst); - - GCOP_WRAP(pGC); - RL_DEBUG_MSG("poly segment end\n"); -} - -/* changed area is box around each line (not entire rects) */ -static void RootlessPolyRectangle(DrawablePtr dst, GCPtr pGC, - int nRects, xRectangle *pRects) -{ - GC_SKIP_ROOT (dst); - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("poly rectangle start\n"); - - RootlessStartDrawing((WindowPtr) dst); - pGC->ops->PolyRectangle(dst, pGC, nRects, pRects); - - if (nRects > 0) { - BoxRec box; - int offset1, offset2, offset3; - - offset2 = pGC->lineWidth; - if(!offset2) offset2 = 1; - offset1 = offset2 >> 1; - offset3 = offset2 - offset1; - - while(nRects--) { - box.x1 = pRects->x - offset1; - box.y1 = pRects->y - offset1; - box.x2 = box.x1 + pRects->width + offset2; - box.y2 = box.y1 + offset2; - TRIM_AND_TRANSLATE_BOX(box, dst, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - - box.x1 = pRects->x - offset1; - box.y1 = pRects->y + offset3; - box.x2 = box.x1 + offset2; - box.y2 = box.y1 + pRects->height - offset2; - TRIM_AND_TRANSLATE_BOX(box, dst, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - - box.x1 = pRects->x + pRects->width - offset1; - box.y1 = pRects->y + offset3; - box.x2 = box.x1 + offset2; - box.y2 = box.y1 + pRects->height - offset2; - TRIM_AND_TRANSLATE_BOX(box, dst, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - - box.x1 = pRects->x - offset1; - box.y1 = pRects->y + pRects->height - offset1; - box.x2 = box.x1 + pRects->width + offset2; - box.y2 = box.y1 + offset2; - TRIM_AND_TRANSLATE_BOX(box, dst, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - - pRects++; - } - } - - RootlessFinishedDrawing ((WindowPtr) dst); - - GCOP_WRAP(pGC); - RL_DEBUG_MSG("poly rectangle end\n"); -} - - -/* changed area is box around each arc (assumes all arcs are 360 degrees) */ -static void RootlessPolyArc(DrawablePtr dst, GCPtr pGC, int narcs, xArc *parcs) -{ - GC_SKIP_ROOT (dst); - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("poly arc start\n"); - - RootlessStartDrawing((WindowPtr) dst); - pGC->ops->PolyArc(dst, pGC, narcs, parcs); - - if (narcs > 0) { - int extra = pGC->lineWidth >> 1; - BoxRec box; - - box.x1 = parcs->x; - box.x2 = box.x1 + parcs->width; - box.y1 = parcs->y; - box.y2 = box.y1 + parcs->height; - - /* should I break these up instead ? */ - - while(--narcs) { - parcs++; - if(box.x1 > parcs->x) - box.x1 = parcs->x; - if(box.x2 < (parcs->x + parcs->width)) - box.x2 = parcs->x + parcs->width; - if(box.y1 > parcs->y) - box.y1 = parcs->y; - if(box.y2 < (parcs->y + parcs->height)) - box.y2 = parcs->y + parcs->height; - } - - if(extra) { - box.x1 -= extra; - box.x2 += extra; - box.y1 -= extra; - box.y2 += extra; - } - - box.x2++; - box.y2++; - - TRIM_AND_TRANSLATE_BOX(box, dst, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - } - - RootlessFinishedDrawing ((WindowPtr) dst); - - GCOP_WRAP(pGC); - RL_DEBUG_MSG("poly arc end\n"); -} - - -/* changed area is box around each poly */ -static void RootlessFillPolygon(DrawablePtr dst, GCPtr pGC, - int shape, int mode, int count, - DDXPointPtr pptInit) -{ - GC_SAVE (pGC); - - GC_SKIP_ROOT (dst); - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("fill poly start (win 0x%x, fillStyle 0x%x)\n", dst, - pGC->fillStyle); - - if (count <= 2) { - pGC->ops->FillPolygon(dst, pGC, shape, mode, count, pptInit); - } else { - DDXPointPtr ppt = pptInit; - int i = count; - BoxRec box; - - box.x2 = box.x1 = ppt->x; - box.y2 = box.y1 = ppt->y; - - if(mode != CoordModeOrigin) { - int x = box.x1; - int y = box.y1; - - while(--i) { - ppt++; - x += ppt->x; - y += ppt->y; - if(box.x1 > x) - box.x1 = x; - else if(box.x2 < x) - box.x2 = x; - if(box.y1 > y) - box.y1 = y; - else if(box.y2 < y) - box.y2 = y; - } - } else { - while(--i) { - ppt++; - if(box.x1 > ppt->x) - box.x1 = ppt->x; - else if(box.x2 < ppt->x) - box.x2 = ppt->x; - if(box.y1 > ppt->y) - box.y1 = ppt->y; - else if(box.y2 < ppt->y) - box.y2 = ppt->y; - } - } - - box.x2++; - box.y2++; - - RootlessStartDrawing((WindowPtr) dst); - - if (can_accel_fill (dst, pGC) - && box_bytes (dst, &box) >= xp_fill_bytes_threshold) - { - GC_UNSET_PM (pGC, dst); - } - - pGC->ops->FillPolygon(dst, pGC, shape, mode, count, pptInit); - - TRIM_AND_TRANSLATE_BOX(box, dst, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - - RootlessFinishedDrawing ((WindowPtr) dst); - } - - GC_RESTORE (pGC, dst); - GCOP_WRAP(pGC); - RL_DEBUG_MSG("fill poly end\n"); -} - -/* changed area is the rects */ -static void RootlessPolyFillRect(DrawablePtr dst, GCPtr pGC, - int nRectsInit, xRectangle *pRectsInit) -{ - GC_SAVE (pGC); - - GC_SKIP_ROOT (dst); - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("fill rect start (win 0x%x, fillStyle 0x%x)\n", dst, - pGC->fillStyle); - - if (nRectsInit <= 0) { - pGC->ops->PolyFillRect(dst, pGC, nRectsInit, pRectsInit); - } else { - BoxRec box; - xRectangle *pRects = pRectsInit; - int nRects = nRectsInit; - - box.x1 = pRects->x; - box.x2 = box.x1 + pRects->width; - box.y1 = pRects->y; - box.y2 = box.y1 + pRects->height; - - while(--nRects) { - pRects++; - if(box.x1 > pRects->x) - box.x1 = pRects->x; - if(box.x2 < (pRects->x + pRects->width)) - box.x2 = pRects->x + pRects->width; - if(box.y1 > pRects->y) - box.y1 = pRects->y; - if(box.y2 < (pRects->y + pRects->height)) - box.y2 = pRects->y + pRects->height; - } - - /* cfb messes with the pRectsInit so we have to do our - calculations first */ - - RootlessStartDrawing((WindowPtr) dst); - - if (can_accel_fill (dst, pGC) - && box_bytes (dst, &box) >= xp_fill_bytes_threshold) - { - GC_UNSET_PM (pGC, dst); - } - - pGC->ops->PolyFillRect (dst, pGC, nRectsInit, pRectsInit); - - TRIM_AND_TRANSLATE_BOX(box, dst, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - - RootlessFinishedDrawing ((WindowPtr) dst); - } - - GC_RESTORE (pGC, dst); - GCOP_WRAP(pGC); - RL_DEBUG_MSG("fill rect end\n"); -} - - -/* changed area is box around each arc (assuming arcs are all 360 degrees) */ -static void RootlessPolyFillArc(DrawablePtr dst, GCPtr pGC, - int narcs, xArc *parcs) -{ - GC_SAVE (pGC); - - GC_SKIP_ROOT (dst); - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("fill arc start\n"); - - if (narcs > 0) { - BoxRec box; - int i; - - box.x1 = parcs->x; - box.x2 = box.x1 + parcs->width; - box.y1 = parcs->y; - box.y2 = box.y1 + parcs->height; - - /* should I break these up instead ? */ - - for (i = 0; i < narcs; i++) - { - if(box.x1 > parcs[i].x) - box.x1 = parcs[i].x; - if(box.x2 < (parcs[i].x + parcs[i].width)) - box.x2 = parcs[i].x + parcs[i].width; - if(box.y1 > parcs[i].y) - box.y1 = parcs[i].y; - if(box.y2 < (parcs[i].y + parcs[i].height)) - box.y2 = parcs[i].y + parcs[i].height; - } - - RootlessStartDrawing((WindowPtr) dst); - - if (can_accel_fill (dst, pGC) - && box_bytes (dst, &box) >= xp_fill_bytes_threshold) - { - GC_UNSET_PM (pGC, dst); - } - - pGC->ops->PolyFillArc(dst, pGC, narcs, parcs); - - TRIM_AND_TRANSLATE_BOX(box, dst, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - - RootlessFinishedDrawing ((WindowPtr) dst); - } - else - pGC->ops->PolyFillArc(dst, pGC, narcs, parcs); - - GC_RESTORE (pGC, dst); - GCOP_WRAP(pGC); - RL_DEBUG_MSG("fill arc end\n"); -} - - -static void RootlessImageText8(DrawablePtr dst, GCPtr pGC, - int x, int y, int count, char *chars) -{ - GC_SAVE (pGC); - - GC_SKIP_ROOT (dst); - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("imagetext8 start\n"); - - RootlessStartDrawing((WindowPtr) dst); - - if (count > 0) { - int top, bot, Min, Max; - BoxRec box; - - top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); - bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); - - Min = count * FONTMINBOUNDS(pGC->font, characterWidth); - if(Min > 0) Min = 0; - Max = count * FONTMAXBOUNDS(pGC->font, characterWidth); - if(Max < 0) Max = 0; - - /* ugh */ - box.x1 = dst->x + x + Min + - FONTMINBOUNDS(pGC->font, leftSideBearing); - box.x2 = dst->x + x + Max + - FONTMAXBOUNDS(pGC->font, rightSideBearing); - - box.y1 = dst->y + y - top; - box.y2 = dst->y + y + bot; - - if (can_accel_fill (dst, pGC) - && box_bytes (dst, &box) >= xp_fill_bytes_threshold) - { - GC_UNSET_PM (pGC, dst); - } - - pGC->ops->ImageText8(dst, pGC, x, y, count, chars); - - TRIM_BOX(box, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - } - else - pGC->ops->ImageText8(dst, pGC, x, y, count, chars); - - RootlessFinishedDrawing ((WindowPtr) dst); - - GC_RESTORE (pGC, dst); - GCOP_WRAP(pGC); - RL_DEBUG_MSG("imagetext8 end\n"); -} - -static int RootlessPolyText8(DrawablePtr dst, GCPtr pGC, - int x, int y, int count, char *chars) -{ - int width; // the result, sorta - - if (GC_IS_ROOT (dst)) - return 0; /* FIXME: ok? */ - - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("polytext8 start\n"); - - RootlessStartDrawing((WindowPtr) dst); - width = pGC->ops->PolyText8(dst, pGC, x, y, count, chars); - width -= x; - - if(width > 0) { - BoxRec box; - - /* ugh */ - box.x1 = dst->x + x + FONTMINBOUNDS(pGC->font, leftSideBearing); - box.x2 = dst->x + x + FONTMAXBOUNDS(pGC->font, rightSideBearing); - - if(count > 1) { - if(width > 0) box.x2 += width; - else box.x1 += width; - } - - box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent); - box.y2 = dst->y + y + FONTMAXBOUNDS(pGC->font, descent); - - TRIM_BOX(box, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - } - - RootlessFinishedDrawing ((WindowPtr) dst); - - GCOP_WRAP(pGC); - RL_DEBUG_MSG("polytext8 end\n"); - return (width + x); -} - -static void RootlessImageText16(DrawablePtr dst, GCPtr pGC, - int x, int y, int count, unsigned short *chars) -{ - GC_SAVE (pGC); - - GC_SKIP_ROOT (dst); - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("imagetext16 start\n"); - - if (count > 0) { - int top, bot, Min, Max; - BoxRec box; - - top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); - bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); - - Min = count * FONTMINBOUNDS(pGC->font, characterWidth); - if(Min > 0) Min = 0; - Max = count * FONTMAXBOUNDS(pGC->font, characterWidth); - if(Max < 0) Max = 0; - - /* ugh */ - box.x1 = dst->x + x + Min + - FONTMINBOUNDS(pGC->font, leftSideBearing); - box.x2 = dst->x + x + Max + - FONTMAXBOUNDS(pGC->font, rightSideBearing); - - box.y1 = dst->y + y - top; - box.y2 = dst->y + y + bot; - - RootlessStartDrawing((WindowPtr) dst); - - if (can_accel_fill (dst, pGC) - && box_bytes (dst, &box) >= xp_fill_bytes_threshold) - { - GC_UNSET_PM (pGC, dst); - } - - pGC->ops->ImageText16(dst, pGC, x, y, count, chars); - - TRIM_BOX(box, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - - RootlessFinishedDrawing ((WindowPtr) dst); - } - else - pGC->ops->ImageText16(dst, pGC, x, y, count, chars); - - GC_RESTORE (pGC, dst); - GCOP_WRAP(pGC); - RL_DEBUG_MSG("imagetext16 end\n"); -} - -static int RootlessPolyText16(DrawablePtr dst, GCPtr pGC, - int x, int y, int count, unsigned short *chars) -{ - int width; // the result, sorta - - if (GC_IS_ROOT (dst)) - return 0; /* FIXME: ok? */ - - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("polytext16 start\n"); - - RootlessStartDrawing((WindowPtr) dst); - width = pGC->ops->PolyText16(dst, pGC, x, y, count, chars); - width -= x; - - if (width > 0) { - BoxRec box; - - /* ugh */ - box.x1 = dst->x + x + FONTMINBOUNDS(pGC->font, leftSideBearing); - box.x2 = dst->x + x + FONTMAXBOUNDS(pGC->font, rightSideBearing); - - if(count > 1) { - if(width > 0) box.x2 += width; - else box.x1 += width; - } - - box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent); - box.y2 = dst->y + y + FONTMAXBOUNDS(pGC->font, descent); - - TRIM_BOX(box, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - } - - RootlessFinishedDrawing ((WindowPtr) dst); - - GCOP_WRAP(pGC); - RL_DEBUG_MSG("polytext16 end\n"); - return width + x; -} - -static void RootlessImageGlyphBlt(DrawablePtr dst, GCPtr pGC, - int x, int y, unsigned int nglyph, - CharInfoPtr *ppci, pointer unused) -{ - GC_SKIP_ROOT (dst); - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("imageglyph start\n"); - - RootlessStartDrawing((WindowPtr) dst); - pGC->ops->ImageGlyphBlt(dst, pGC, x, y, nglyph, ppci, unused); - - if (nglyph > 0) { - int top, bot, width = 0; - BoxRec box; - - top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); - bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); - - box.x1 = ppci[0]->metrics.leftSideBearing; - if(box.x1 > 0) box.x1 = 0; - box.x2 = ppci[nglyph - 1]->metrics.rightSideBearing - - ppci[nglyph - 1]->metrics.characterWidth; - if(box.x2 < 0) box.x2 = 0; - - box.x2 += dst->x + x; - box.x1 += dst->x + x; - - while(nglyph--) { - width += (*ppci)->metrics.characterWidth; - ppci++; - } - - if(width > 0) - box.x2 += width; - else - box.x1 += width; - - box.y1 = dst->y + y - top; - box.y2 = dst->y + y + bot; - - TRIM_BOX(box, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - } - - RootlessFinishedDrawing ((WindowPtr) dst); - - GCOP_WRAP(pGC); - RL_DEBUG_MSG("imageglyph end\n"); -} - -static void RootlessPolyGlyphBlt(DrawablePtr dst, GCPtr pGC, - int x, int y, unsigned int nglyph, - CharInfoPtr *ppci, pointer pglyphBase) -{ - GC_SKIP_ROOT (dst); - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("polyglyph start\n"); - - RootlessStartDrawing((WindowPtr) dst); - pGC->ops->PolyGlyphBlt(dst, pGC, x, y, nglyph, ppci, pglyphBase); - - if (nglyph > 0) { - BoxRec box; - - /* ugh */ - box.x1 = dst->x + x + ppci[0]->metrics.leftSideBearing; - box.x2 = dst->x + x + ppci[nglyph - 1]->metrics.rightSideBearing; - - if(nglyph > 1) { - int width = 0; - - while(--nglyph) { - width += (*ppci)->metrics.characterWidth; - ppci++; - } - - if(width > 0) box.x2 += width; - else box.x1 += width; - } - - box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent); - box.y2 = dst->y + y + FONTMAXBOUNDS(pGC->font, descent); - - TRIM_BOX(box, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - } - - RootlessFinishedDrawing ((WindowPtr) dst); - - GCOP_WRAP(pGC); - RL_DEBUG_MSG("polyglyph end\n"); -} - - -/* changed area is in dest */ -static void -RootlessPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr dst, - int dx, int dy, int xOrg, int yOrg) -{ - BoxRec box; - - GC_SKIP_ROOT (dst); - GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("push pixels start\n"); - - RootlessStartDrawing((WindowPtr) dst); - pGC->ops->PushPixels(pGC, pBitMap, dst, dx, dy, xOrg, yOrg); - - box.x1 = xOrg + dst->x; - box.x2 = box.x1 + dx; - box.y1 = yOrg + dst->y; - box.y2 = box.y1 + dy; - - TRIM_BOX(box, pGC); - if(BOX_NOT_EMPTY(box)) - RootlessDamageBox ((WindowPtr) dst, &box); - - RootlessFinishedDrawing ((WindowPtr) dst); - - GCOP_WRAP(pGC); - RL_DEBUG_MSG("push pixels end\n"); -} diff --git a/synfig-osx/trunk/launcher/rootless-picture.c b/synfig-osx/trunk/launcher/rootless-picture.c deleted file mode 100644 index 8db5ca8..0000000 --- a/synfig-osx/trunk/launcher/rootless-picture.c +++ /dev/null @@ -1,540 +0,0 @@ -/* - * Support for RENDER extension with rootless - */ -/* - * Copyright (c) 2002 Torrey T. Lyons. All Rights Reserved. - * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ -/* This file is largely based on fbcompose.c and fbpict.c, which contain - * the following copyright: - * - * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. - */ - /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/aquaPicture.c,v 1.3 2002/09/28 00:00:03 torrey Exp $ */ - -#define DEFAULT_LOG_FORMATS 0 - -#ifdef RENDER - -#include "fb.h" -#include "picturestr.h" -#include "mipict.h" -#include "fbpict.h" -#include "rootless.h" - -# define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b)) - - -// Replacement for fbStore_x8r8g8b8 that sets the alpha channel -void -RootlessStore_x8r8g8b8 (FbCompositeOperand *op, CARD32 value) -{ - FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; - ((CARD32 *)line)[offset >> 5] = (value & 0xffffff) | 0xff000000; -} - - -// Defined in fbcompose.c -extern FbCombineFunc fbCombineFuncU[]; -extern FbCombineFunc fbCombineFuncC[]; - -void -RootlessCompositeGeneral( - CARD8 op, - PicturePtr pSrc, - PicturePtr pMask, - PicturePtr pDst, - INT16 xSrc, - INT16 ySrc, - INT16 xMask, - INT16 yMask, - INT16 xDst, - INT16 yDst, - CARD16 width, - CARD16 height) -{ - FbCompositeOperand src[4],msk[4],dst[4],*pmsk; - FbCompositeOperand *srcPict, *srcAlpha; - FbCompositeOperand *dstPict, *dstAlpha; - FbCompositeOperand *mskPict = 0, *mskAlpha = 0; - FbCombineFunc f; - int w; - - if (!fbBuildCompositeOperand (pSrc, src, xSrc, ySrc, TRUE, TRUE)) - return; - if (!fbBuildCompositeOperand (pDst, dst, xDst, yDst, FALSE, TRUE)) - return; - - // Use Rootless operands for on screen picture formats - if (pDst->format == PICT_x8r8g8b8) { - dst[0].store = RootlessStore_x8r8g8b8; - } - - if (pSrc->alphaMap) - { - srcPict = &src[1]; - srcAlpha = &src[2]; - } - else - { - srcPict = &src[0]; - srcAlpha = 0; - } - if (pDst->alphaMap) - { - dstPict = &dst[1]; - dstAlpha = &dst[2]; - } - else - { - dstPict = &dst[0]; - dstAlpha = 0; - } - f = fbCombineFuncU[op]; - if (pMask) - { - if (!fbBuildCompositeOperand (pMask, msk, xMask, yMask, TRUE, TRUE)) - return; - pmsk = msk; - if (pMask->componentAlpha) - f = fbCombineFuncC[op]; - if (pMask->alphaMap) - { - mskPict = &msk[1]; - mskAlpha = &msk[2]; - } - else - { - mskPict = &msk[0]; - mskAlpha = 0; - } - } - else - pmsk = 0; - while (height--) - { - w = width; - - while (w--) - { - (*f) (src, pmsk, dst); - (*src->over) (src); - (*dst->over) (dst); - if (pmsk) - (*pmsk->over) (pmsk); - } - (*src->down) (src); - (*dst->down) (dst); - if (pmsk) - (*pmsk->down) (pmsk); - } -} - -static int rootless_log_pict_formats = DEFAULT_LOG_FORMATS; - -static const char *op_name (int op) -{ - static const char *ops[] = { - "Clear", "Src", "Dst", "Over", "OverReverse", "In", "InReverse", - "Out", "OutReverse", "Atop", "AtopReverse", "Xor", "Add", - "Saturate", "Maximum", - - "DisjointClear", "DisjointSrc", "DisjointDst", "DisjointOver", - "DisjointOverReverse", "DisjointIn", "DisjointInReverse", - "DisjointOut", "DisjointOutReverse", "DisjointAtop", - "DisjointAtopReverse", "DisjointXor", "DisjointMaximum", - - "ConjointClear", "ConjointSrc", "ConjointDst", "ConjointOver", - "ConjointOverReverse", "ConjointIn", "ConjointInReverse", - "ConjointOut", "ConjointOutReverse", "ConjointAtop", - "ConjointAtopReverse", "ConjointXor", "ConjointMaximum", - }; - - if (op >= 0 && op < (int) (sizeof (ops) / sizeof (ops[0]))) - return ops[op]; - else - return "Unknown"; -} - -static const char *type_name (int type) -{ - switch (type) - { - case PICT_TYPE_OTHER: - return "Other"; - case PICT_TYPE_A: - return "A"; - case PICT_TYPE_ARGB: - return "ARGB"; - case PICT_TYPE_ABGR: - return "ABGR"; - case PICT_TYPE_COLOR: - return "Color"; - case PICT_TYPE_GRAY: - return "Gray"; - default: - return "Unknown"; - } -} - -static void log_format (int op, unsigned int src, - unsigned int dst, unsigned int mask) -{ - struct op { - int op; - unsigned int src, dst, mask; - }; - - static struct op *ops; - static int n_ops, allocated_ops; - - int i; - - for (i = 0; i < n_ops; i++) - { - if (ops[i].op == op && ops[i].src == src - && ops[i].dst == dst && ops[i].mask == mask) - { - return; - } - } - - if (n_ops == allocated_ops) - { - allocated_ops *= 2; - ops = realloc (ops, allocated_ops * sizeof (struct op)); - } - - ops[n_ops].op = op; - ops[n_ops].src = src; - ops[n_ops].dst = dst; - ops[n_ops].mask = mask; - n_ops++; - - fprintf (stderr, - "op: %s src (%dbpp %s %04x) dst (%dbpp %s %04x) mask (%dbpp %s %04x)\n", - op_name (op), PICT_FORMAT_BPP (src), - type_name (PICT_FORMAT_TYPE (src)), - src & 0xffff, PICT_FORMAT_BPP (dst), - type_name (PICT_FORMAT_TYPE (dst)), - dst & 0xffff, PICT_FORMAT_BPP (mask), - type_name (PICT_FORMAT_TYPE (mask)), - mask & 0xffff); -} - -void -RootlessComposite( - CARD8 op, - PicturePtr pSrc, - PicturePtr pMask, - PicturePtr pDst, - INT16 xSrc, - INT16 ySrc, - INT16 xMask, - INT16 yMask, - INT16 xDst, - INT16 yDst, - CARD16 width, - CARD16 height) -{ - RegionRec region; - int n; - BoxPtr pbox; - CompositeFunc func; - Bool srcRepeat = pSrc->repeat; - Bool maskRepeat = FALSE; - Bool srcAlphaMap = pSrc->alphaMap != 0; - Bool maskAlphaMap = FALSE; - Bool dstAlphaMap = pDst->alphaMap != 0; - int x_msk, y_msk, x_src, y_src, x_dst, y_dst; - int w, h, w_this, h_this; - int dstDepth = pDst->pDrawable->depth; - - xDst += pDst->pDrawable->x; - yDst += pDst->pDrawable->y; - xSrc += pSrc->pDrawable->x; - ySrc += pSrc->pDrawable->y; - if (pMask) - { - xMask += pMask->pDrawable->x; - yMask += pMask->pDrawable->y; - maskRepeat = pMask->repeat; - maskAlphaMap = pMask->alphaMap != 0; - } - - if (rootless_log_pict_formats) - { - log_format (op, pSrc->format, pDst->format, - pMask != 0 ? pMask->format : 0); - } - - if (!miComputeCompositeRegion (®ion, - pSrc, - pMask, - pDst, - xSrc, - ySrc, - xMask, - yMask, - xDst, - yDst, - width, - height)) - return; - - if (pDst->pDrawable->type == DRAWABLE_WINDOW - && pDst->pDrawable->depth == 24 - && pDst->pDrawable->bitsPerPixel == 32) - { - /* fbpict code sets bits above depth to zero. We don't want that! */ - - pDst->pDrawable->depth = 32; - } - - func = RootlessCompositeGeneral; - - if (!maskAlphaMap && !srcAlphaMap && !dstAlphaMap) - switch (op) { - case PictOpOver: - if (pMask) - { - if (srcRepeat && - pSrc->pDrawable->width == 1 && - pSrc->pDrawable->height == 1) - { - srcRepeat = FALSE; - if (PICT_FORMAT_COLOR(pSrc->format)) { - switch (pMask->format) { - case PICT_a8: - switch (pDst->format) { - case PICT_r5g6b5: - case PICT_b5g6r5: - func = fbCompositeSolidMask_nx8x0565; - break; - case PICT_r8g8b8: - case PICT_b8g8r8: - func = fbCompositeSolidMask_nx8x0888; - break; - case PICT_a8r8g8b8: - case PICT_x8r8g8b8: - case PICT_a8b8g8r8: - case PICT_x8b8g8r8: - func = fbCompositeSolidMask_nx8x8888; - break; - } - break; - case PICT_a8r8g8b8: - if (pMask->componentAlpha) { - switch (pDst->format) { - case PICT_a8r8g8b8: - case PICT_x8r8g8b8: - func = fbCompositeSolidMask_nx8888x8888C; - break; - case PICT_r5g6b5: - func = fbCompositeSolidMask_nx8888x0565C; - break; - } - } - break; - case PICT_a8b8g8r8: - if (pMask->componentAlpha) { - switch (pDst->format) { - case PICT_a8b8g8r8: - case PICT_x8b8g8r8: - func = fbCompositeSolidMask_nx8888x8888C; - break; - case PICT_b5g6r5: - func = fbCompositeSolidMask_nx8888x0565C; - break; - } - } - break; - case PICT_a1: - switch (pDst->format) { - case PICT_r5g6b5: - case PICT_b5g6r5: - case PICT_r8g8b8: - case PICT_b8g8r8: - case PICT_a8r8g8b8: - case PICT_x8r8g8b8: - case PICT_a8b8g8r8: - case PICT_x8b8g8r8: - func = fbCompositeSolidMask_nx1xn; - break; - } - } - } - } - } - else - { - switch (pSrc->format) { - case PICT_a8r8g8b8: - case PICT_x8r8g8b8: - switch (pDst->format) { - case PICT_a8r8g8b8: - case PICT_x8r8g8b8: - func = fbCompositeSrc_8888x8888; - break; - case PICT_r8g8b8: - func = fbCompositeSrc_8888x0888; - break; - case PICT_r5g6b5: - func = fbCompositeSrc_8888x0565; - break; - } - break; - case PICT_a8b8g8r8: - case PICT_x8b8g8r8: - switch (pDst->format) { - case PICT_a8b8g8r8: - case PICT_x8b8g8r8: - func = fbCompositeSrc_8888x8888; - break; - case PICT_b8g8r8: - func = fbCompositeSrc_8888x0888; - break; - case PICT_b5g6r5: - func = fbCompositeSrc_8888x0565; - break; - } - break; - case PICT_r5g6b5: - switch (pDst->format) { - case PICT_r5g6b5: - func = fbCompositeSrc_0565x0565; - break; - } - break; - case PICT_b5g6r5: - switch (pDst->format) { - case PICT_b5g6r5: - func = fbCompositeSrc_0565x0565; - break; - } - break; - } - } - break; - case PictOpAdd: - if (pMask == 0) - { - switch (pSrc->format) { - case PICT_a8r8g8b8: - switch (pDst->format) { - case PICT_a8r8g8b8: - func = fbCompositeSrcAdd_8888x8888; - break; - } - break; - case PICT_a8b8g8r8: - switch (pDst->format) { - case PICT_a8b8g8r8: - func = fbCompositeSrcAdd_8888x8888; - break; - } - break; - case PICT_a8: - switch (pDst->format) { - case PICT_a8: - func = fbCompositeSrcAdd_8000x8000; - break; - } - break; - case PICT_a1: - switch (pDst->format) { - case PICT_a1: - func = fbCompositeSrcAdd_1000x1000; - break; - } - break; - } - } - break; - } - - n = REGION_NUM_RECTS (®ion); - pbox = REGION_RECTS (®ion); - while (n--) - { - h = pbox->y2 - pbox->y1; - y_src = pbox->y1 - yDst + ySrc; - y_msk = pbox->y1 - yDst + yMask; - y_dst = pbox->y1; - while (h) - { - h_this = h; - w = pbox->x2 - pbox->x1; - x_src = pbox->x1 - xDst + xSrc; - x_msk = pbox->x1 - xDst + xMask; - x_dst = pbox->x1; - if (maskRepeat) - { - y_msk = mod (y_msk, pMask->pDrawable->height); - if (h_this > pMask->pDrawable->height - y_msk) - h_this = pMask->pDrawable->height - y_msk; - } - if (srcRepeat) - { - y_src = mod (y_src, pSrc->pDrawable->height); - if (h_this > pSrc->pDrawable->height - y_src) - h_this = pSrc->pDrawable->height - y_src; - } - while (w) - { - w_this = w; - if (maskRepeat) - { - x_msk = mod (x_msk, pMask->pDrawable->width); - if (w_this > pMask->pDrawable->width - x_msk) - w_this = pMask->pDrawable->width - x_msk; - } - if (srcRepeat) - { - x_src = mod (x_src, pSrc->pDrawable->width); - if (w_this > pSrc->pDrawable->width - x_src) - w_this = pSrc->pDrawable->width - x_src; - } - (*func) (op, pSrc, pMask, pDst, - x_src, y_src, x_msk, y_msk, x_dst, y_dst, - w_this, h_this); - w -= w_this; - x_src += w_this; - x_msk += w_this; - x_dst += w_this; - } - h -= h_this; - y_src += h_this; - y_msk += h_this; - y_dst += h_this; - } - pbox++; - } - REGION_UNINIT (pDst->pDrawable->pScreen, ®ion); - - pDst->pDrawable->depth = dstDepth; -} - -#endif /* RENDER */ diff --git a/synfig-osx/trunk/launcher/rootless-screen.c b/synfig-osx/trunk/launcher/rootless-screen.c deleted file mode 100644 index 46fb916..0000000 --- a/synfig-osx/trunk/launcher/rootless-screen.c +++ /dev/null @@ -1,794 +0,0 @@ -/* - * Screen routines for Mac OS X rootless X server - * - * Greg Parker gparker@cs.stanford.edu - * - * February 2001 Created - * March 3, 2001 Restructured as generic rootless mode - */ - -/* Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. */ - -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessScreen.c,v 1.2 2002/04/03 00:06:32 torrey Exp $ */ - - -#include "mi.h" -#include "scrnintstr.h" -#include "gcstruct.h" -#include "pixmapstr.h" -#include "windowstr.h" -#include "propertyst.h" -#include "mivalidate.h" -#include "picturestr.h" -#include "os.h" -#include "servermd.h" -#include "colormapst.h" - -#include -#include -#include - -#include "rootless-common.h" -#include "rootless-window.h" - -/* In milcroseconds */ -#define REDISPLAY_DELAY 10 -#define REDISPLAY_MAX_DELAY 60 - -extern int RootlessMiValidateTree(WindowPtr pRoot, - WindowPtr pChild, VTKind kind); -extern Bool RootlessCreateGC(GCPtr pGC); - -int rootlessGCPrivateIndex = -1; -int rootlessScreenPrivateIndex = -1; -int rootlessWindowPrivateIndex = -1; - -void -RootlessUpdateScreenPixmap (ScreenPtr pScreen) -{ - RootlessScreenRec *s = SCREENREC(pScreen); - PixmapPtr pPix; - unsigned int rowbytes; - - pPix = (*pScreen->GetScreenPixmap) (pScreen); - if (pPix == NULL) - { - pPix = (*pScreen->CreatePixmap) (pScreen, 0, 0, pScreen->rootDepth); - (*pScreen->SetScreenPixmap) (pPix); - } - - rowbytes = PixmapBytePad (pScreen->width, pScreen->rootDepth); - - if (s->pixmap_data_size < rowbytes) - { - if (s->pixmap_data != NULL) - xfree (s->pixmap_data); - - s->pixmap_data_size = rowbytes; - s->pixmap_data = xalloc (s->pixmap_data_size); - if (s->pixmap_data == NULL) - return; - - xp_fill_bytes (s->pixmap_data_size, 1, ~0, - s->pixmap_data, s->pixmap_data_size); - - pScreen->ModifyPixmapHeader (pPix, pScreen->width, pScreen->height, - pScreen->rootDepth, - BitsPerPixel (pScreen->rootDepth), - 0, s->pixmap_data); - /* ModifyPixmapHeader ignores zero arguments, so install rowbytes - by hand. */ - pPix->devKind = 0; - } -} - -static Bool -RootlessCreateScreenResources (ScreenPtr pScreen) -{ - Bool ret = TRUE; - - SCREEN_UNWRAP (pScreen, CreateScreenResources); - - if (pScreen->CreateScreenResources != NULL) - ret = (*pScreen->CreateScreenResources) (pScreen); - - SCREEN_WRAP(pScreen, CreateScreenResources); - - if (!ret) - return ret; - - /* miCreateScreenResources doesn't like our null framebuffer pointer, - it leaves the screen pixmap with an uninitialized data pointer. So - we gave it depth=0,bits=0, which says, leave it the fsck alone. - So we have some work to do since we need the screen pixmap to be - valid (e.g. CopyArea from the root window) */ - - RootlessUpdateScreenPixmap (pScreen); - - return ret; -} - -static Bool -RootlessCloseScreen(int i, ScreenPtr pScreen) -{ - RootlessScreenRec *s; - - s = SCREENREC(pScreen); - - /* FIXME: unwrap everything that was wrapped? */ - pScreen->CloseScreen = s->CloseScreen; - - if (s->pixmap_data != NULL) - { - xfree (s->pixmap_data); - s->pixmap_data = NULL; - s->pixmap_data_size = 0; - } - - xfree(s); - return pScreen->CloseScreen(i, pScreen); -} - -static void -RootlessGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h, - unsigned int format, unsigned long planeMask, char *pdstLine) -{ - ScreenPtr pScreen = pDrawable->pScreen; - SCREEN_UNWRAP(pScreen, GetImage); - - if (pDrawable->type == DRAWABLE_WINDOW) - { - int x0, y0, x1, y1; - - RootlessWindowRec *winRec; - - /* Many apps use GetImage to sync with the visible frame buffer - FIXME: entire screen or just window or all screens? */ - RootlessRedisplayScreen (pScreen); - - /* RedisplayScreen stops drawing, so we need to start it again */ - RootlessStartDrawing ((WindowPtr) pDrawable); - - /* Check that we have some place to read from. */ - winRec = WINREC (TopLevelParent ((WindowPtr) pDrawable)); - if (winRec == NULL) - goto out; - - /* Clip to top-level window bounds. */ - - x0 = pDrawable->x + sx; - y0 = pDrawable->y + sy; - x1 = x0 + w; - y1 = y0 + h; - - x0 = MAX (x0, winRec->x); - y0 = MAX (y0, winRec->y); - x1 = MIN (x1, winRec->x + (int) winRec->width); - y1 = MIN (y1, winRec->y + (int) winRec->height); - - /* FIXME: if clipped we need to adjust the data returned from - fbGetImage (), since it calculates the destination stride - from the passed in width.. */ - - sx = x0 - pDrawable->x; - sy = y0 - pDrawable->y; - w = x1 - x0; - h = y1 - y0; - - if (w <= 0 || h <= 0) - goto out; - } - - pScreen->GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); - -out: - SCREEN_WRAP(pScreen, GetImage); -} - -/* - * RootlessSourceValidate - * CopyArea and CopyPlane use a GC tied to the destination drawable. - * StartDrawing/StopDrawing wrappers won't be called if source is - * a visible window but the destination isn't. So, we call StartDrawing - * here and leave StopDrawing for the block handler. - */ -static void -RootlessSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h) -{ - SCREEN_UNWRAP(pDrawable->pScreen, SourceValidate); - if (pDrawable->type == DRAWABLE_WINDOW) { - WindowPtr pWin = (WindowPtr)pDrawable; - RootlessStartDrawing(pWin); - } - if (pDrawable->pScreen->SourceValidate) { - pDrawable->pScreen->SourceValidate(pDrawable, x, y, w, h); - } - SCREEN_WRAP(pDrawable->pScreen, SourceValidate); -} - -#ifdef RENDER - -static void -rootlessComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, - INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, - INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) -{ - ScreenPtr pScreen = pDst->pDrawable->pScreen; - PictureScreenPtr ps = GetPictureScreen(pScreen); - WindowPtr srcWin, dstWin, maskWin = NULL; - - if (pMask) { - maskWin = (pMask->pDrawable->type == DRAWABLE_WINDOW) ? - (WindowPtr)pMask->pDrawable : NULL; - } - srcWin = (pSrc->pDrawable->type == DRAWABLE_WINDOW) ? - (WindowPtr)pSrc->pDrawable : NULL; - dstWin = (pDst->pDrawable->type == DRAWABLE_WINDOW) ? - (WindowPtr)pDst->pDrawable : NULL; - - ps->Composite = SCREENREC(pScreen)->Composite; - - if (srcWin && IsFramedWindow(srcWin)) RootlessStartDrawing(srcWin); - if (maskWin && IsFramedWindow(maskWin)) RootlessStartDrawing(maskWin); - if (dstWin && IsFramedWindow(dstWin)) RootlessStartDrawing(dstWin); - - ps->Composite(op, pSrc, pMask, pDst, - xSrc, ySrc, xMask, yMask, - xDst, yDst, width, height); - - if (dstWin && IsFramedWindow(dstWin)) { - RootlessDamageRect(dstWin, xDst, yDst, width, height); - } - - ps->Composite = RootlessComposite; -} - -static void -RootlessGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, - PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, - int nlist, GlyphListPtr list, GlyphPtr *glyphs) -{ - ScreenPtr pScreen = pDst->pDrawable->pScreen; - PictureScreenPtr ps = GetPictureScreen(pScreen); - int x, y; - int n; - GlyphPtr glyph; - WindowPtr srcWin, dstWin; - - srcWin = (pSrc->pDrawable->type == DRAWABLE_WINDOW) ? - (WindowPtr)pSrc->pDrawable : NULL; - dstWin = (pDst->pDrawable->type == DRAWABLE_WINDOW) ? - (WindowPtr)pDst->pDrawable : NULL; - - if (srcWin && IsFramedWindow(srcWin)) RootlessStartDrawing(srcWin); - if (dstWin && IsFramedWindow(dstWin)) RootlessStartDrawing(dstWin); - - ps->Glyphs = SCREENREC(pScreen)->Glyphs; - ps->Glyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); - ps->Glyphs = RootlessGlyphs; - - if (dstWin && IsFramedWindow(dstWin)) - { - x = xSrc; - y = ySrc; - - while (nlist--) - { - /* Originally this code called DamageRect for the bounding - box of each glyph. But that was causing way too much - time to be spent in CGSBoundingRegionAddRect. So compute - the union of all glyphs in a list and damage that. It - shouldn't be very different. */ - - x += list->xOff; - y += list->yOff; - n = list->len; - - if (n > 0) - { - BoxRec box; - - glyph = *glyphs++; - - box.x1 = x - glyph->info.x; - box.y1 = y - glyph->info.y; - box.x2 = box.x1 + glyph->info.width; - box.y2 = box.y2 + glyph->info.height; - - x += glyph->info.xOff; - y += glyph->info.yOff; - - while (--n > 0) - { - short x1, y1, x2, y2; - - glyph = *glyphs++; - - x1 = x - glyph->info.x; - y1 = y - glyph->info.y; - x2 = x1 + glyph->info.width; - y2 = y1 + glyph->info.height; - - box.x1 = MAX (box.x1, x1); - box.y1 = MAX (box.y1, y1); - box.x2 = MAX (box.x2, x2); - box.y2 = MAX (box.y2, y2); - - x += glyph->info.xOff; - y += glyph->info.yOff; - } - - RootlessDamageBox (dstWin, &box); - } - - list++; - } - } -} - -#endif /* RENDER */ - -/* ValidateTree is modified in two ways: - - top-level windows don't clip each other - - windows aren't clipped against root. - These only matter when validating from the root. */ -static int -RootlessValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) -{ - int result; - RegionRec saveRoot; - ScreenPtr pScreen = pParent->drawable.pScreen; - - SCREEN_UNWRAP(pScreen, ValidateTree); - RL_DEBUG_MSG("VALIDATETREE start "); - - /* Use our custom version to validate from root */ - if (IsRoot(pParent)) { - RL_DEBUG_MSG("custom "); - result = RootlessMiValidateTree(pParent, pChild, kind); - } else { - HUGE_ROOT(pParent); - result = pScreen->ValidateTree(pParent, pChild, kind); - NORMAL_ROOT(pParent); - } - - SCREEN_WRAP(pScreen, ValidateTree); - RL_DEBUG_MSG("VALIDATETREE end\n"); - - return result; -} - -/* MarkOverlappedWindows is modified to ignore overlapping top-level - windows. */ -static Bool -RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, - WindowPtr *ppLayerWin) -{ - RegionRec saveRoot; - Bool result; - ScreenPtr pScreen = pWin->drawable.pScreen; - SCREEN_UNWRAP(pScreen, MarkOverlappedWindows); - RL_DEBUG_MSG("MARKOVERLAPPEDWINDOWS start "); - - HUGE_ROOT(pWin); - if (IsRoot(pWin)) { - /* root - mark nothing */ - RL_DEBUG_MSG("is root not marking "); - result = FALSE; - } - else if (! IsTopLevel(pWin)) { - /* not top-level window - mark normally */ - result = pScreen->MarkOverlappedWindows(pWin, pFirst, ppLayerWin); - } - else { - /* top-level window - mark children ONLY - NO overlaps with sibs (?) - This code copied from miMarkOverlappedWindows() */ - - register WindowPtr pChild; - Bool anyMarked = FALSE; - void (* MarkWindow)() = pScreen->MarkWindow; - - RL_DEBUG_MSG("is top level! "); - /* single layered systems are easy */ - if (ppLayerWin) *ppLayerWin = pWin; - - if (pWin == pFirst) { - /* Blindly mark pWin and all of its inferiors. This is a slight - * overkill if there are mapped windows that outside pWin's border, - * but it's better than wasting time on RectIn checks. - */ - pChild = pWin; - while (1) { - if (pChild->viewable) { - if (REGION_BROKEN (pScreen, &pChild->winSize)) - SetWinSize (pChild); - if (REGION_BROKEN (pScreen, &pChild->borderSize)) - SetBorderSize (pChild); - (* MarkWindow)(pChild); - if (pChild->firstChild) { - pChild = pChild->firstChild; - continue; - } - } - while (!pChild->nextSib && (pChild != pWin)) - pChild = pChild->parent; - if (pChild == pWin) - break; - pChild = pChild->nextSib; - } - anyMarked = TRUE; - pFirst = pFirst->nextSib; - } - if (anyMarked) - (* MarkWindow)(pWin->parent); - result = anyMarked; - } - NORMAL_ROOT(pWin); - SCREEN_WRAP(pScreen, MarkOverlappedWindows); - RL_DEBUG_MSG("MARKOVERLAPPEDWINDOWS end\n"); - return result; -} - -static void -expose_1 (WindowPtr pWin) -{ - WindowPtr pChild; - - if (!pWin->realized) - return; - - (*pWin->drawable.pScreen->PaintWindowBackground) (pWin, &pWin->borderClip, - PW_BACKGROUND); - - /* FIXME: comments in windowstr.h indicate that borderClip doesn't - include subwindow visibility. But I'm not so sure.. so we may - be exposing too much.. */ - - miSendExposures (pWin, &pWin->borderClip, - pWin->drawable.x, pWin->drawable.y); - - for (pChild = pWin->firstChild; pChild != NULL; pChild = pChild->nextSib) - expose_1 (pChild); -} - -void -RootlessScreenExpose (ScreenPtr pScreen) -{ - expose_1 (WindowTable[pScreen->myNum]); -} - -ColormapPtr -RootlessGetColormap (ScreenPtr pScreen) -{ - RootlessScreenRec *s = SCREENREC (pScreen); - - return s->colormap; -} - -static void -RootlessInstallColormap (ColormapPtr pMap) -{ - ScreenPtr pScreen = pMap->pScreen; - RootlessScreenRec *s = SCREENREC (pScreen); - - SCREEN_UNWRAP(pScreen, InstallColormap); - - if (s->colormap != pMap) - { - s->colormap = pMap; - s->colormap_changed = TRUE; - RootlessQueueRedisplay (pScreen); - } - - pScreen->InstallColormap (pMap); - - SCREEN_WRAP (pScreen, InstallColormap); -} - -static void -RootlessUninstallColormap (ColormapPtr pMap) -{ - ScreenPtr pScreen = pMap->pScreen; - RootlessScreenRec *s = SCREENREC (pScreen); - - SCREEN_UNWRAP(pScreen, UninstallColormap); - - if (s->colormap == pMap) - s->colormap = NULL; - - pScreen->UninstallColormap (pMap); - - SCREEN_WRAP(pScreen, UninstallColormap); -} - -static void -RootlessStoreColors (ColormapPtr pMap, int ndef, xColorItem *pdef) -{ - ScreenPtr pScreen = pMap->pScreen; - RootlessScreenRec *s = SCREENREC (pScreen); - - SCREEN_UNWRAP(pScreen, StoreColors); - - if (s->colormap == pMap && ndef > 0) - { - s->colormap_changed = TRUE; - RootlessQueueRedisplay (pScreen); - } - - pScreen->StoreColors (pMap, ndef, pdef); - - SCREEN_WRAP(pScreen, StoreColors); -} - -static CARD32 -redisplay_callback (OsTimerPtr timer, CARD32 time, void *arg) -{ - RootlessScreenRec *screenRec = arg; - - if (!screenRec->redisplay_queued) - { - /* No update needed. Stop the timer. */ - - screenRec->redisplay_timer_set = FALSE; - return 0; - } - - screenRec->redisplay_queued = FALSE; - - /* Mark that we should redisplay before waiting for I/O next time */ - screenRec->redisplay_expired = TRUE; - - /* Reinstall the timer immediately, so we get as close to our - redisplay interval as possible. */ - - return REDISPLAY_DELAY; -} - -void -RootlessQueueRedisplay (ScreenPtr pScreen) -{ - RootlessScreenRec *screenRec = SCREENREC (pScreen); - - screenRec->redisplay_queued = TRUE; - - if (screenRec->redisplay_timer_set) - return; - - screenRec->redisplay_timer = TimerSet (screenRec->redisplay_timer, - 0, REDISPLAY_DELAY, - redisplay_callback, screenRec); - screenRec->redisplay_timer_set = TRUE; -} - -/* Call this function when it might be a good idea to flush updates. - Note that it will unlock window buffers! */ -Bool -RootlessMayRedisplay (ScreenPtr pScreen) -{ - RootlessScreenRec *screenRec = SCREENREC (pScreen); - - if (!screenRec->redisplay_queued) - return FALSE; - - /* If the timer has fired, or it's been long enough since the last - update, redisplay everything now. */ - - if (!screenRec->redisplay_expired) - { - CARD32 now = GetTimeInMillis (); - - if (screenRec->last_redisplay + REDISPLAY_MAX_DELAY >= now) - return FALSE; - } - - if (screenRec->redisplay_timer_set) - { - TimerCancel (screenRec->redisplay_timer); - screenRec->redisplay_timer_set = FALSE; - } - - RootlessRedisplayScreen (screenRec->pScreen); - screenRec->redisplay_expired = FALSE; - - return TRUE; -} - -/* Flush drawing before blocking on select(). */ -static void -RootlessBlockHandler(pointer pbdata, OSTimePtr pTimeout, pointer pReadmask) -{ - ScreenPtr pScreen = pbdata; - RootlessScreenRec *screenRec = SCREENREC (pScreen); - - if (screenRec->redisplay_expired) - { - screenRec->redisplay_expired = FALSE; - - if (screenRec->colormap_changed) - { - RootlessFlushScreenColormaps (screenRec->pScreen); - screenRec->colormap_changed = FALSE; - } - - RootlessRedisplayScreen (screenRec->pScreen); - } -} - -static void -RootlessWakeupHandler(pointer data, int i, pointer LastSelectMask) -{ -} - -static Bool -RootlessAllocatePrivates(ScreenPtr pScreen) -{ - RootlessScreenRec *s; - static unsigned int rootlessGeneration = -1; - - if (rootlessGeneration != serverGeneration) { - rootlessScreenPrivateIndex = AllocateScreenPrivateIndex(); - if (rootlessScreenPrivateIndex == -1) return FALSE; - rootlessGCPrivateIndex = AllocateGCPrivateIndex(); - if (rootlessGCPrivateIndex == -1) return FALSE; - rootlessWindowPrivateIndex = AllocateWindowPrivateIndex(); - if (rootlessWindowPrivateIndex == -1) return FALSE; - rootlessGeneration = serverGeneration; - } - - /* no allocation needed for screen privates */ - if (!AllocateGCPrivate(pScreen, rootlessGCPrivateIndex, - sizeof(RootlessGCRec))) - return FALSE; - if (!AllocateWindowPrivate(pScreen, rootlessWindowPrivateIndex, 0)) - return FALSE; - - s = xalloc(sizeof(RootlessScreenRec)); - if (! s) return FALSE; - SCREENREC(pScreen) = s; - - s->pixmap_data = NULL; - s->pixmap_data_size = 0; - - s->redisplay_timer = NULL; - s->redisplay_timer_set = FALSE; - - return TRUE; -} - -static void -RootlessWrap(ScreenPtr pScreen) -{ - RootlessScreenRec *s = (RootlessScreenRec*) - pScreen->devPrivates[rootlessScreenPrivateIndex].ptr; - -#define WRAP(a) \ - if (pScreen->a) { \ - s->a = pScreen->a; \ - } else { \ - RL_DEBUG_MSG("null screen fn " #a "\n"); \ - s->a = NULL; \ - } \ - pScreen->a = Rootless##a - - WRAP(CreateScreenResources); - WRAP(CloseScreen); - WRAP(CreateGC); - WRAP(PaintWindowBackground); - WRAP(PaintWindowBorder); - WRAP(CopyWindow); - WRAP(GetImage); - WRAP(SourceValidate); - WRAP(CreateWindow); - WRAP(DestroyWindow); - WRAP(RealizeWindow); - WRAP(UnrealizeWindow); - WRAP(ReparentWindow); - WRAP(MoveWindow); - WRAP(PositionWindow); - WRAP(ResizeWindow); - WRAP(RestackWindow); - WRAP(ChangeBorderWidth); - WRAP(MarkOverlappedWindows); - WRAP(ValidateTree); - WRAP(ChangeWindowAttributes); - WRAP(InstallColormap); - WRAP(UninstallColormap); - WRAP(StoreColors); - -#ifdef SHAPE - WRAP(SetShape); -#endif - -#ifdef RENDER - { - /* Composite and Glyphs don't use normal screen wrapping */ - PictureScreenPtr ps = GetPictureScreen(pScreen); - s->Composite = ps->Composite; - ps->Composite = rootlessComposite; - s->Glyphs = ps->Glyphs; - ps->Glyphs = RootlessGlyphs; - } -#endif - - // WRAP(ClearToBackground); fixme put this back? useful for shaped wins? - // WRAP(RestoreAreas); fixme put this back? - -#undef WRAP -} - -Bool -RootlessSetupScreen(int index, ScreenPtr pScreen) -{ - RootlessScreenRec *s; - - /* Add replacements for fb screen functions */ - pScreen->PaintWindowBackground = RootlessPaintWindow; - pScreen->PaintWindowBorder = RootlessPaintWindow; - -#ifdef RENDER - { - PictureScreenPtr ps = GetPictureScreen(pScreen); - ps->Composite = RootlessComposite; - } -#endif - - if (!RootlessAllocatePrivates(pScreen)) - return FALSE; - - s = ((RootlessScreenRec*) - pScreen->devPrivates[rootlessScreenPrivateIndex].ptr); - - s->pScreen = pScreen; - RootlessWrap(pScreen); - - if (!RegisterBlockAndWakeupHandlers (RootlessBlockHandler, - RootlessWakeupHandler, - (pointer) pScreen)) - { - return FALSE; - } - - return TRUE; -} - -void -RootlessUpdateRooted (Bool state) -{ - int i; - - if (!state) - { - for (i = 0; i < screenInfo.numScreens; i++) - RootlessDisableRoot (screenInfo.screens[i]); - } - else - { - for (i = 0; i < screenInfo.numScreens; i++) - RootlessEnableRoot (screenInfo.screens[i]); - } -} diff --git a/synfig-osx/trunk/launcher/rootless-val-tree.c b/synfig-osx/trunk/launcher/rootless-val-tree.c deleted file mode 100644 index c8e5ad0..0000000 --- a/synfig-osx/trunk/launcher/rootless-val-tree.c +++ /dev/null @@ -1,640 +0,0 @@ -/* - * Calculate window clip lists for rootless mode - * - * This file is very closely based on mivaltree.c. - */ - /* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessValTree.c,v 1.2 2002/06/18 19:43:04 torrey Exp $ */ - -/* - * mivaltree.c -- - * Functions for recalculating window clip lists. Main function - * is miValidateTree. - * - -Copyright 1987, 1988, 1989, 1998 The Open Group - -All Rights Reserved. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - - * - * Copyright 1987, 1988, 1989 by - * Digital Equipment Corporation, Maynard, Massachusetts, - * - * All Rights Reserved - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of Digital not be - * used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * - * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR - * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * - ******************************************************************/ - -/* The panoramix components contained the following notice */ -/**************************************************************** -* * -* Copyright (c) Digital Equipment Corporation, 1991, 1997 * -* * -* All Rights Reserved. Unpublished rights reserved under * -* the copyright laws of the United States. * -* * -* The software contained on this media is proprietary to * -* and embodies the confidential technology of Digital * -* Equipment Corporation. Possession, use, duplication or * -* dissemination of the software and media is authorized only * -* pursuant to a valid written license from Digital Equipment * -* Corporation. * -* * -* RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure * -* by the U.S. Government is subject to restrictions as set * -* forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, * -* or in FAR 52.227-19, as applicable. * -* * -*****************************************************************/ - - /* - * Aug '86: Susan Angebranndt -- original code - * July '87: Adam de Boor -- substantially modified and commented - * Summer '89: Joel McCormack -- so fast you wouldn't believe it possible. - * In particular, much improved code for window mapping and - * circulating. - * Bob Scheifler -- avoid miComputeClips for unmapped windows, - * valdata changes - */ -#include "X.h" -#include "scrnintstr.h" -#include "validate.h" -#include "windowstr.h" -#include "mi.h" -#include "regionstr.h" -#include "mivalidate.h" - -#include "globals.h" - -#ifdef SHAPE -/* - * Compute the visibility of a shaped window - */ -int -RootlessShapedWindowIn (pScreen, universe, bounding, rect, x, y) - ScreenPtr pScreen; - RegionPtr universe, bounding; - BoxPtr rect; - register int x, y; -{ - BoxRec box; - register BoxPtr boundBox; - int nbox; - Bool someIn, someOut; - register int t, x1, y1, x2, y2; - - nbox = REGION_NUM_RECTS (bounding); - boundBox = REGION_RECTS (bounding); - someIn = someOut = FALSE; - x1 = rect->x1; - y1 = rect->y1; - x2 = rect->x2; - y2 = rect->y2; - while (nbox--) - { - if ((t = boundBox->x1 + x) < x1) - t = x1; - box.x1 = t; - if ((t = boundBox->y1 + y) < y1) - t = y1; - box.y1 = t; - if ((t = boundBox->x2 + x) > x2) - t = x2; - box.x2 = t; - if ((t = boundBox->y2 + y) > y2) - t = y2; - box.y2 = t; - if (box.x1 > box.x2) - box.x2 = box.x1; - if (box.y1 > box.y2) - box.y2 = box.y1; - switch (RECT_IN_REGION(pScreen, universe, &box)) - { - case rgnIN: - if (someOut) - return rgnPART; - someIn = TRUE; - break; - case rgnOUT: - if (someIn) - return rgnPART; - someOut = TRUE; - break; - default: - return rgnPART; - } - boundBox++; - } - if (someIn) - return rgnIN; - return rgnOUT; -} -#endif - -#define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \ - HasBorder(w) && \ - (w)->backgroundState == ParentRelative) - - -/* - *----------------------------------------------------------------------- - * RootlessComputeClips -- - * Recompute the clipList, borderClip, exposed and borderExposed - * regions for pParent and its children. Only viewable windows are - * taken into account. - * - * Results: - * None. - * - * Side Effects: - * clipList, borderClip, exposed and borderExposed are altered. - * A VisibilityNotify event may be generated on the parent window. - * - *----------------------------------------------------------------------- - */ -static void -RootlessComputeClips (pParent, pScreen, universe, kind, exposed) - register WindowPtr pParent; - register ScreenPtr pScreen; - register RegionPtr universe; - VTKind kind; - RegionPtr exposed; /* for intermediate calculations */ -{ - int dx, - dy; - RegionRec childUniverse; - register WindowPtr pChild; - int oldVis, newVis; - BoxRec borderSize; - RegionRec childUnion; - Bool overlap; - RegionPtr borderVisible; - Bool resized; - /* - * Figure out the new visibility of this window. - * The extent of the universe should be the same as the extent of - * the borderSize region. If the window is unobscured, this rectangle - * will be completely inside the universe (the universe will cover it - * completely). If the window is completely obscured, none of the - * universe will cover the rectangle. - */ - borderSize.x1 = pParent->drawable.x - wBorderWidth(pParent); - borderSize.y1 = pParent->drawable.y - wBorderWidth(pParent); - dx = (int) pParent->drawable.x + (int) pParent->drawable.width + wBorderWidth(pParent); - if (dx > 32767) - dx = 32767; - borderSize.x2 = dx; - dy = (int) pParent->drawable.y + (int) pParent->drawable.height + wBorderWidth(pParent); - if (dy > 32767) - dy = 32767; - borderSize.y2 = dy; - - oldVis = pParent->visibility; - switch (RECT_IN_REGION( pScreen, universe, &borderSize)) - { - case rgnIN: - newVis = VisibilityUnobscured; - break; - case rgnPART: - newVis = VisibilityPartiallyObscured; -#ifdef SHAPE - { - RegionPtr pBounding; - - if ((pBounding = wBoundingShape (pParent))) - { - switch (RootlessShapedWindowIn (pScreen, universe, - pBounding, &borderSize, - pParent->drawable.x, - pParent->drawable.y)) - { - case rgnIN: - newVis = VisibilityUnobscured; - break; - case rgnOUT: - newVis = VisibilityFullyObscured; - break; - } - } - } -#endif - break; - default: - newVis = VisibilityFullyObscured; - break; - } - - pParent->visibility = newVis; - if (oldVis != newVis && - ((pParent->eventMask | wOtherEventMasks(pParent)) & VisibilityChangeMask)) - SendVisibilityNotify(pParent); - - dx = pParent->drawable.x - pParent->valdata->before.oldAbsCorner.x; - dy = pParent->drawable.y - pParent->valdata->before.oldAbsCorner.y; - - /* - * avoid computations when dealing with simple operations - */ - - switch (kind) { - case VTMap: - case VTStack: - case VTUnmap: - break; - case VTMove: - if ((oldVis == newVis) && - ((oldVis == VisibilityFullyObscured) || - (oldVis == VisibilityUnobscured))) - { - pChild = pParent; - while (1) - { - if (pChild->viewable) - { - if (pChild->visibility != VisibilityFullyObscured) - { - REGION_TRANSLATE( pScreen, &pChild->borderClip, - dx, dy); - REGION_TRANSLATE( pScreen, &pChild->clipList, - dx, dy); - pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER; - if (pScreen->ClipNotify) - (* pScreen->ClipNotify) (pChild, dx, dy); - - } - if (pChild->valdata) - { - REGION_INIT(pScreen, - &pChild->valdata->after.borderExposed, - NullBox, 0); - if (HasParentRelativeBorder(pChild)) - { - REGION_SUBTRACT(pScreen, - &pChild->valdata->after.borderExposed, - &pChild->borderClip, - &pChild->winSize); - } - REGION_INIT( pScreen, &pChild->valdata->after.exposed, - NullBox, 0); - } - if (pChild->firstChild) - { - pChild = pChild->firstChild; - continue; - } - } - while (!pChild->nextSib && (pChild != pParent)) - pChild = pChild->parent; - if (pChild == pParent) - break; - pChild = pChild->nextSib; - } - return; - } - /* fall through */ - default: - /* - * To calculate exposures correctly, we have to translate the old - * borderClip and clipList regions to the window's new location so there - * is a correspondence between pieces of the new and old clipping regions. - */ - if (dx || dy) - { - /* - * We translate the old clipList because that will be exposed or copied - * if gravity is right. - */ - REGION_TRANSLATE( pScreen, &pParent->borderClip, dx, dy); - REGION_TRANSLATE( pScreen, &pParent->clipList, dx, dy); - } - break; - case VTBroken: - REGION_EMPTY (pScreen, &pParent->borderClip); - REGION_EMPTY (pScreen, &pParent->clipList); - break; - } - - borderVisible = pParent->valdata->before.borderVisible; - resized = pParent->valdata->before.resized; - REGION_INIT( pScreen, &pParent->valdata->after.borderExposed, NullBox, 0); - REGION_INIT( pScreen, &pParent->valdata->after.exposed, NullBox, 0); - - /* - * Since the borderClip must not be clipped by the children, we do - * the border exposure first... - * - * 'universe' is the window's borderClip. To figure the exposures, remove - * the area that used to be exposed from the new. - * This leaves a region of pieces that weren't exposed before. - */ - - if (HasBorder (pParent)) - { - if (borderVisible) - { - /* - * when the border changes shape, the old visible portions - * of the border will be saved by DIX in borderVisible -- - * use that region and destroy it - */ - REGION_SUBTRACT( pScreen, exposed, universe, borderVisible); - REGION_DESTROY( pScreen, borderVisible); - } - else - { - REGION_SUBTRACT( pScreen, exposed, universe, &pParent->borderClip); - } - if (HasParentRelativeBorder(pParent) && (dx || dy)) { - REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed, - universe, - &pParent->winSize); - } else { - REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed, - exposed, &pParent->winSize); - } - - REGION_COPY( pScreen, &pParent->borderClip, universe); - - /* - * To get the right clipList for the parent, and to make doubly sure - * that no child overlaps the parent's border, we remove the parent's - * border from the universe before proceeding. - */ - - REGION_INTERSECT( pScreen, universe, universe, &pParent->winSize); - } - else - REGION_COPY( pScreen, &pParent->borderClip, universe); - - if ((pChild = pParent->firstChild) && pParent->mapped) - { - REGION_INIT(pScreen, &childUniverse, NullBox, 0); - REGION_INIT(pScreen, &childUnion, NullBox, 0); - if ((pChild->drawable.y < pParent->lastChild->drawable.y) || - ((pChild->drawable.y == pParent->lastChild->drawable.y) && - (pChild->drawable.x < pParent->lastChild->drawable.x))) - { - for (; pChild; pChild = pChild->nextSib) - { - if (pChild->viewable) - REGION_APPEND( pScreen, &childUnion, &pChild->borderSize); - } - } - else - { - for (pChild = pParent->lastChild; pChild; pChild = pChild->prevSib) - { - if (pChild->viewable) - REGION_APPEND( pScreen, &childUnion, &pChild->borderSize); - } - } - REGION_VALIDATE( pScreen, &childUnion, &overlap); - - for (pChild = pParent->firstChild; - pChild; - pChild = pChild->nextSib) - { - if (pChild->viewable) { - /* - * If the child is viewable, we want to remove its extents - * from the current universe, but we only re-clip it if - * it's been marked. - */ - if (pChild->valdata) { - /* - * Figure out the new universe from the child's - * perspective and recurse. - */ - REGION_INTERSECT( pScreen, &childUniverse, - universe, - &pChild->borderSize); - RootlessComputeClips (pChild, pScreen, &childUniverse, - kind, exposed); - } - /* - * Once the child has been processed, we remove its extents - * from the current universe, thus denying its space to any - * other sibling. - */ - if (overlap) - REGION_SUBTRACT( pScreen, universe, universe, - &pChild->borderSize); - } - } - if (!overlap) - REGION_SUBTRACT( pScreen, universe, universe, &childUnion); - REGION_UNINIT( pScreen, &childUnion); - REGION_UNINIT( pScreen, &childUniverse); - } /* if any children */ - - /* - * 'universe' now contains the new clipList for the parent window. - * - * To figure the exposure of the window we subtract the old clip from the - * new, just as for the border. - */ - - if (oldVis == VisibilityFullyObscured || - oldVis == VisibilityNotViewable) - { - REGION_COPY( pScreen, &pParent->valdata->after.exposed, universe); - } - else if (newVis != VisibilityFullyObscured && - newVis != VisibilityNotViewable) - { - REGION_SUBTRACT( pScreen, &pParent->valdata->after.exposed, - universe, &pParent->clipList); - } - - /* - * One last thing: backing storage. We have to try to save what parts of - * the window are about to be obscured. We can just subtract the universe - * from the old clipList and get the areas that were in the old but aren't - * in the new and, hence, are about to be obscured. - */ - if (pParent->backStorage && !resized) - { - REGION_SUBTRACT( pScreen, exposed, &pParent->clipList, universe); - (* pScreen->SaveDoomedAreas)(pParent, exposed, dx, dy); - } - - /* HACK ALERT - copying contents of regions, instead of regions */ - { - RegionRec tmp; - - tmp = pParent->clipList; - pParent->clipList = *universe; - *universe = tmp; - } - -#ifdef NOTDEF - REGION_COPY( pScreen, &pParent->clipList, universe); -#endif - - pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER; - - if (pScreen->ClipNotify) - (* pScreen->ClipNotify) (pParent, dx, dy); -} - -static void -RootlessTreeObscured(pParent) - register WindowPtr pParent; -{ - register WindowPtr pChild; - register int oldVis; - - pChild = pParent; - while (1) - { - if (pChild->viewable) - { - oldVis = pChild->visibility; - if (oldVis != (pChild->visibility = VisibilityFullyObscured) && - ((pChild->eventMask | wOtherEventMasks(pChild)) & VisibilityChangeMask)) - SendVisibilityNotify(pChild); - if (pChild->firstChild) - { - pChild = pChild->firstChild; - continue; - } - } - while (!pChild->nextSib && (pChild != pParent)) - pChild = pChild->parent; - if (pChild == pParent) - break; - pChild = pChild->nextSib; - } -} - -/* - *----------------------------------------------------------------------- - * RootlessMiValidateTree -- - * Recomputes the clip list for pParent and all its inferiors. - * - * Results: - * Always returns 1. - * - * Side Effects: - * The clipList, borderClip, exposed, and borderExposed regions for - * each marked window are altered. - * - * Notes: - * This routine assumes that all affected windows have been marked - * (valdata created) and their winSize and borderSize regions - * adjusted to correspond to their new positions. The borderClip and - * clipList regions should not have been touched. - * - * The top-most level is treated differently from all lower levels - * because pParent is unchanged. For the top level, we merge the - * regions taken up by the marked children back into the clipList - * for pParent, thus forming a region from which the marked children - * can claim their areas. For lower levels, where the old clipList - * and borderClip are invalid, we can't do this and have to do the - * extra operations done in miComputeClips, but this is much faster - * e.g. when only one child has moved... - * - *----------------------------------------------------------------------- - */ -/* - Quartz version: used for validate from root in rootless mode. - We need to make sure top-level windows don't clip each other, - and that top-level windows aren't clipped to the root window. -*/ -/*ARGSUSED*/ -// fixme this is ugly -// Xprint/ValTree.c doesn't work, but maybe that method can? -int -RootlessMiValidateTree (pRoot, pChild, kind) - WindowPtr pRoot; /* Parent to validate */ - WindowPtr pChild; /* First child of pRoot that was - * affected */ - VTKind kind; /* What kind of configuration caused call */ -{ - RegionRec childClip; /* The new borderClip for the current - * child */ - RegionRec exposed; /* For intermediate calculations */ - register ScreenPtr pScreen; - register WindowPtr pWin; - - pScreen = pRoot->drawable.pScreen; - if (pChild == NullWindow) - pChild = pRoot->firstChild; - - REGION_INIT(pScreen, &childClip, NullBox, 0); - REGION_INIT(pScreen, &exposed, NullBox, 0); - - if (REGION_BROKEN (pScreen, &pRoot->clipList) && - !REGION_BROKEN (pScreen, &pRoot->borderClip)) - { - // fixme this might not work, but hopefully doesn't happen anyway. - kind = VTBroken; - REGION_EMPTY (pScreen, &pRoot->clipList); - ErrorF("ValidateTree: BUSTED!\n"); - } - - /* - * Recursively compute the clips for all children of the root. - * They don't clip against each other or the root itself, so - * childClip is always reset to that child's size. - */ - - for (pWin = pChild; - pWin != NullWindow; - pWin = pWin->nextSib) - { - if (pWin->viewable) { - if (pWin->valdata) { - REGION_COPY( pScreen, &childClip, &pWin->borderSize); - RootlessComputeClips (pWin, pScreen, &childClip, kind, &exposed); - } else if (pWin->visibility == VisibilityNotViewable) { - RootlessTreeObscured(pWin); - } - } else { - if (pWin->valdata) { - REGION_EMPTY( pScreen, &pWin->clipList); - if (pScreen->ClipNotify) - (* pScreen->ClipNotify) (pWin, 0, 0); - REGION_EMPTY( pScreen, &pWin->borderClip); - pWin->valdata = (ValidatePtr)NULL; - } - } - } - - REGION_UNINIT( pScreen, &childClip); - - /* The root is never clipped by its children, so nothing on the root - is ever exposed by moving or mapping its children. */ - REGION_INIT( pScreen, &pRoot->valdata->after.exposed, NullBox, 0); - REGION_INIT( pScreen, &pRoot->valdata->after.borderExposed, NullBox, 0); - - return 1; -} diff --git a/synfig-osx/trunk/launcher/rootless-window.c b/synfig-osx/trunk/launcher/rootless-window.c deleted file mode 100644 index 2ae8a44..0000000 --- a/synfig-osx/trunk/launcher/rootless-window.c +++ /dev/null @@ -1,2056 +0,0 @@ -/* - * Rootless window management - */ -/* - * Copyright (c) 2001 Greg Parker. All Rights Reserved. - * Copyright (c) 2002 Torrey T. Lyons. All Rights Reserved. - * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ -/* Portions of this file are based on fbwindow.c, which contains the - * following copyright: - * - * Copyright © 1998 Keith Packard - */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessWindow.c,v 1.11 2002/09/28 00:43:39 torrey Exp $ */ - -#include "rootless-common.h" -#include "rootless-window.h" -#include "darwin.h" -#include "Xplugin.h" -#include "x-hash.h" -#include "x-list.h" -#define _APPLEWM_SERVER_ -#include "applewmstr.h" - -#include "fb.h" -#include "propertyst.h" - -#ifdef PANORAMIX -#include "panoramiX.h" -#include "panoramiXsrv.h" -#endif - -#include -#include - -#define DEFINE_ATOM_HELPER(func,atom_name) \ -static Atom func (void) { \ - static unsigned int generation; \ - static Atom atom; \ - if (generation != serverGeneration) { \ - generation = serverGeneration; \ - atom = MakeAtom (atom_name, strlen (atom_name), TRUE); \ - } \ - return atom; \ -} - -DEFINE_ATOM_HELPER (xa_native_screen_origin, "_NATIVE_SCREEN_ORIGIN") -DEFINE_ATOM_HELPER (xa_native_window_id, "_NATIVE_WINDOW_ID") -DEFINE_ATOM_HELPER (xa_apple_no_order_in, "_APPLE_NO_ORDER_IN") - -/* Maps xp_window_id -> AquaWindowRec */ -static x_hash_table *window_hash; -static pthread_mutex_t window_hash_mutex; - -static Bool no_configure_window; -static Bool windows_hidden; - -static const int normal_window_levels[AppleWMNumWindowLevels+1] = { - 0, 3, 4, 5, LONG_MIN + 30, LONG_MIN + 29, -}; -static const int rooted_window_levels[AppleWMNumWindowLevels+1] = { - 202, 203, 204, 205, 201, 200 -}; - -static inline xp_error -configure_window (xp_window_id id, unsigned int mask, - const xp_window_changes *values) -{ - if (!no_configure_window) - return xp_configure_window (id, mask, values); - else - return XP_Success; -} - -static inline unsigned long -current_time_in_seconds (void) -{ - unsigned long t = 0; - - t += currentTime.milliseconds / 1000; - t += currentTime.months * 4294967; - - return t; -} - -static inline Bool -rootlessHasRoot (ScreenPtr pScreen) -{ - return WINREC (WindowTable[pScreen->myNum]) != NULL; -} - -void -RootlessNativeWindowStateChanged (xp_window_id id, unsigned int state) -{ - WindowPtr pWin; - RootlessWindowRec *winRec; - - pWin = RootlessGetXWindow (id); - if (pWin == NULL) - return; - - winRec = WINREC (pWin); - if (winRec == NULL) - return; - - winRec->is_offscreen = (state & XP_WINDOW_STATE_OFFSCREEN) != 0; - winRec->is_obscured = (state & XP_WINDOW_STATE_OBSCURED) != 0; - -#ifdef ROOTLESS - pWin->rootlessUnhittable = winRec->is_offscreen; -#endif -} - -void -RootlessNativeWindowMoved (xp_window_id id) -{ - WindowPtr pWin; - xp_box bounds; - int sx, sy; - XID vlist[2]; - Mask mask; - ClientPtr client; - - pWin = RootlessGetXWindow (id); - if (pWin == NULL) - return; - - if (xp_get_window_bounds (id, &bounds) != Success) - return; - - sx = dixScreenOrigins[pWin->drawable.pScreen->myNum].x + darwinMainScreenX; - sy = dixScreenOrigins[pWin->drawable.pScreen->myNum].y + darwinMainScreenY; - - /* Fake up a ConfigureWindow packet to resize the window to the - current bounds. */ - - vlist[0] = (INT16) bounds.x1 - sx; - vlist[1] = (INT16) bounds.y1 - sy; - mask = CWX | CWY; - - /* pretend we're the owner of the window! */ - client = LookupClient (pWin->drawable.id, NullClient); - - /* Don't want to do anything to the physical window (avoids - notification-response feedback loops) */ - - no_configure_window = TRUE; - ConfigureWindow (pWin, mask, vlist, client); - no_configure_window = FALSE; -} - -/* Updates the _NATIVE_SCREEN_ORIGIN property on the given root window. */ -static void -set_screen_origin (WindowPtr pWin) -{ - long data[2]; - - if (!IsRoot (pWin)) - return; - - /* FIXME: move this to an extension? */ - - data[0] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].x - + darwinMainScreenX); - data[1] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].y - + darwinMainScreenY); - - ChangeWindowProperty (pWin, xa_native_screen_origin (), XA_INTEGER, - 32, PropModeReplace, 2, data, TRUE); -} - -/* For now, don't create a physical window until either the window is - realized, or we really need it (e.g. to attach VRAM surfaces to). - Do reset the window size so it's not clipped by the root window. */ -Bool -RootlessCreateWindow (WindowPtr pWin) -{ - Bool result; - RegionRec saveRoot; - - SCREEN_UNWRAP (pWin->drawable.pScreen, CreateWindow); - - if (!IsRoot (pWin)) - { - /* win/border size set by DIX, not by wrapped CreateWindow, so - correct it here. Don't HUGE_ROOT when pWin is the root! */ - - HUGE_ROOT (pWin); - SetWinSize (pWin); - SetBorderSize (pWin); - } - else - { - set_screen_origin (pWin); - } - - result = pWin->drawable.pScreen->CreateWindow (pWin); - - if (pWin->parent) - NORMAL_ROOT (pWin); - - SCREEN_WRAP (pWin->drawable.pScreen, CreateWindow); - - return result; -} - -/* Destroy the physical window associated with the given window */ -static void -rootlessDestroyFrame (WindowPtr pWin, RootlessWindowRec *winRec) -{ - RootlessStopDrawing (pWin, FALSE); - - pthread_mutex_lock (&window_hash_mutex); - x_hash_table_remove (window_hash, (void *) winRec->wid); - pthread_mutex_unlock (&window_hash_mutex); - - xp_destroy_window (winRec->wid); - - xfree (winRec); - WINREC (pWin) = NULL; -} - -Bool -RootlessDestroyWindow (WindowPtr pWin) -{ - RootlessWindowRec *winRec = WINREC(pWin); - Bool result; - - if (winRec != NULL) - rootlessDestroyFrame (pWin, winRec); - - /* winRec is gone now */ - - SCREEN_UNWRAP(pWin->drawable.pScreen, DestroyWindow); - - result = pWin->drawable.pScreen->DestroyWindow (pWin); - - SCREEN_WRAP(pWin->drawable.pScreen, DestroyWindow); - - return result; -} - -#ifdef SHAPE -static Bool -RootlessGetShape (WindowPtr pWin, RegionPtr pShape) -{ - if (wBoundingShape (pWin) == NULL) - return FALSE; - - /* wBoundingShape is relative to *inner* origin of window. - Translate by borderWidth to get the outside-relative position. */ - - REGION_INIT (pScreen, pShape, NullBox, 0); - REGION_COPY (pScreen, pShape, wBoundingShape (pWin)); - REGION_TRANSLATE (pScreen, pShape, pWin->borderWidth, pWin->borderWidth); - - return TRUE; -} - -/* boundingShape = outside border (like borderClip) - clipShape = inside border (like clipList) - Both are in window-local coordinates - We only care about boundingShape (FIXME true?) - - RootlessReallySetShape is used in several places other than SetShape. - Most importantly, SetShape is often called on unmapped windows, so we - have to wait until the window is mapped to reshape the frame. */ -static void -rootlessSetShape (WindowPtr pWin) -{ - RootlessWindowRec *winRec = WINREC (pWin); - - RegionRec newShape; - RegionPtr pShape; - xp_window_changes wc; - - if (winRec == NULL) - return; - - RootlessStopDrawing (pWin, FALSE); - - pShape = RootlessGetShape (pWin, &newShape) ? &newShape : NULL; - - RL_DEBUG_MSG("reshaping..."); - RL_DEBUG_MSG("numrects %d, extents %d %d %d %d\n", - REGION_NUM_RECTS(&newShape), - newShape.extents.x1, newShape.extents.y1, - newShape.extents.x2, newShape.extents.y2); - - RootlessDisableUpdate (pWin); - - if (pShape != NULL) - { - wc.shape_nrects = REGION_NUM_RECTS (pShape); - wc.shape_rects = REGION_RECTS (pShape); - } - else - { - wc.shape_nrects = -1; - wc.shape_rects = NULL; - } - - wc.shape_tx = wc.shape_ty = 0; - - configure_window (winRec->wid, XP_SHAPE, &wc); - - if (pShape != NULL) - REGION_UNINIT(pScreen, &newShape); -} - -void -RootlessSetShape (WindowPtr pWin) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - - SCREEN_UNWRAP (pScreen, SetShape); - - pScreen->SetShape (pWin); - - SCREEN_WRAP (pScreen, SetShape); - - rootlessSetShape (pWin); -} -#endif - -/* Disallow ParentRelative background on top-level windows - because the root window doesn't really have the right background - and fb will try to draw on the root instead of on the window. - ParentRelative prevention is also in PaintWindowBackground/Border() - so it is no longer really needed here. */ -Bool -RootlessChangeWindowAttributes (WindowPtr pWin, unsigned long vmask) -{ - Bool result; - ScreenPtr pScreen = pWin->drawable.pScreen; - - RL_DEBUG_MSG("change window attributes start\n"); - - SCREEN_UNWRAP (pScreen, ChangeWindowAttributes); - - result = pScreen->ChangeWindowAttributes (pWin, vmask); - - SCREEN_WRAP (pScreen, ChangeWindowAttributes); - - if (WINREC (pWin) != NULL) - { - /* disallow ParentRelative background state */ - - if (pWin->backgroundState == ParentRelative) - { - XID pixel = 0; - ChangeWindowAttributes (pWin, CWBackPixel, &pixel, serverClient); - } - } - - RL_DEBUG_MSG("change window attributes end\n"); - return result; -} - -/* This is a hook for when DIX moves or resizes a window. - Update the frame position now. (x, y) are *inside* position. - After this, mi and fb are expecting the pixmap to be at the new location. */ -Bool -RootlessPositionWindow (WindowPtr pWin, int x, int y) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - RootlessWindowRec *winRec = WINREC (pWin); - Bool result; - - RL_DEBUG_MSG("positionwindow start (win 0x%x)\n", pWin); - - if (winRec != NULL) - { - if (winRec->is_drawing) - { - /* Reset frame's pixmap and move it to the new position. */ - int bw = wBorderWidth (pWin); - - winRec->pixmap->devPrivate.ptr = winRec->data; - TranslatePixmapBase (winRec->pixmap, - (x - bw), - (y - bw)); - } - } - - SCREEN_UNWRAP (pScreen, PositionWindow); - - result = pScreen->PositionWindow (pWin, x, y); - - SCREEN_WRAP(pScreen, PositionWindow); - - RL_DEBUG_MSG("positionwindow end\n"); - return result; -} - -/* Initialize some basic attributes of the frame. Note that winRec - may already have valid data in it, so don't overwrite anything - valuable. */ -static void -rootlessInitializeFrame (WindowPtr pWin, RootlessWindowRec *winRec) -{ - DrawablePtr d = &pWin->drawable; - int bw = wBorderWidth (pWin); - - winRec->win = pWin; - - winRec->x = d->x - bw; - winRec->y = d->y - bw; - winRec->width = d->width + 2*bw; - winRec->height = d->height + 2*bw; - winRec->borderWidth = bw; -} - -static void -rootlessSetNativeProperty (RootlessWindowRec *winRec) -{ - xp_error err; - unsigned int native_id; - long data; - - err = xp_get_native_window (winRec->wid, &native_id); - if (err == Success) - { - /* FIXME: move this to an extension? */ - - data = native_id; - ChangeWindowProperty (winRec->win, xa_native_window_id (), - XA_INTEGER, 32, PropModeReplace, 1, &data, TRUE); - } -} - -static xp_error -rootlessColormapCallback (void *data, int first_color, - int n_colors, uint32_t *colors) -{ - return (RootlessResolveColormap (data, first_color, n_colors, colors) - ? XP_Success : XP_BadMatch); -} - -/* If the given window doesn't have a physical window associated with it, - attempt to create one. If that's unsuccessful, return null. */ -static RootlessWindowRec * -rootlessEnsureFrame (WindowPtr pWin) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - RootlessWindowRec *winRec; - RegionRec shape; - RegionPtr pShape = NULL; - - xp_window_changes wc; - unsigned int mask; - xp_error err; - int sx, sy; - - if (WINREC (pWin) != NULL) - return WINREC (pWin); - - if (pWin->drawable.class != InputOutput) - return NULL; - - winRec = xalloc (sizeof(RootlessWindowRec)); - - if (!winRec) - return NULL; - - rootlessInitializeFrame (pWin, winRec); - - winRec->is_drawing = FALSE; - winRec->pixmap = NULL; - winRec->wid = 0; - winRec->is_update_disabled = FALSE; - winRec->is_reorder_pending = FALSE; - winRec->level = !IsRoot (pWin) ? 0 : AppleWMNumWindowLevels; - WINREC(pWin) = winRec; - -#ifdef SHAPE - if (RootlessGetShape (pWin, &shape)) - pShape = &shape; -#endif - - sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; - sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; - - mask = 0; - - wc.x = sx + winRec->x; - wc.y = sy + winRec->y; - wc.width = winRec->width; - wc.height = winRec->height; - wc.bit_gravity = XP_GRAVITY_NONE; - mask |= XP_BOUNDS; - - if (pWin->drawable.depth == 8) - { - wc.depth = XP_DEPTH_INDEX8; - wc.colormap = rootlessColormapCallback; - wc.colormap_data = pScreen; - mask |= XP_COLORMAP; - } - else if (pWin->drawable.depth == 15) - wc.depth = XP_DEPTH_RGB555; - else if (pWin->drawable.depth == 24) - wc.depth = XP_DEPTH_ARGB8888; - else - wc.depth = XP_DEPTH_NIL; - mask |= XP_DEPTH; - - if (pShape != NULL) - { - wc.shape_nrects = REGION_NUM_RECTS (pShape); - wc.shape_rects = REGION_RECTS (pShape); - wc.shape_tx = wc.shape_ty = 0; - mask |= XP_SHAPE; - } - - if (!rootlessHasRoot (pScreen)) - wc.window_level = normal_window_levels[winRec->level]; - else - wc.window_level = rooted_window_levels[winRec->level]; - mask |= XP_WINDOW_LEVEL; - - err = xp_create_window (mask, &wc, &winRec->wid); - - if (err != Success) - { - xfree (winRec); - return NULL; - } - - if (window_hash == NULL) - { - window_hash = x_hash_table_new (NULL, NULL, NULL, NULL); - pthread_mutex_init (&window_hash_mutex, NULL); - } - - pthread_mutex_lock (&window_hash_mutex); - x_hash_table_insert (window_hash, (void *) winRec->wid, winRec); - pthread_mutex_unlock (&window_hash_mutex); - - rootlessSetNativeProperty (winRec); - - if (pShape != NULL) - REGION_UNINIT (pScreen, &shape); - - return winRec; -} - -/* The frame is usually created here and not in CreateWindow so that - windows do not eat memory until they are realized. */ -Bool -RootlessRealizeWindow(WindowPtr pWin) -{ - Bool result = FALSE; - RegionRec saveRoot; - ScreenPtr pScreen = pWin->drawable.pScreen; - XID pixel; - - RL_DEBUG_MSG("realizewindow start (win 0x%x)\n", pWin); - - if (IsTopLevel (pWin) && pWin->drawable.class == InputOutput) - { - RootlessWindowRec *winRec; - - winRec = rootlessEnsureFrame (pWin); - if (winRec == NULL) - return NULL; - - winRec->is_reorder_pending = TRUE; - - /* Disallow ParentRelative background state on top-level windows. - This might have been set before the window was mapped. */ - - if (pWin->backgroundState == ParentRelative) - { - pixel = 0; - ChangeWindowAttributes (pWin, CWBackPixel, &pixel, serverClient); - } - } - - if (!IsRoot(pWin)) HUGE_ROOT(pWin); - SCREEN_UNWRAP (pScreen, RealizeWindow); - - result = pScreen->RealizeWindow (pWin); - - SCREEN_WRAP (pScreen, RealizeWindow); - if (!IsRoot(pWin)) NORMAL_ROOT(pWin); - - RL_DEBUG_MSG("realizewindow end\n"); - return result; -} - -void -RootlessEnableRoot (ScreenPtr pScreen) -{ - WindowPtr pRoot; - pRoot = WindowTable[pScreen->myNum]; - - rootlessEnsureFrame (pRoot); - (*pScreen->ClearToBackground) (pRoot, 0, 0, 0, 0, TRUE); - RootlessReorderWindow (pRoot); -} - -void -RootlessDisableRoot (ScreenPtr pScreen) -{ - WindowPtr pRoot; - RootlessWindowRec *winRec; - - pRoot = WindowTable[pScreen->myNum]; - winRec = WINREC (pRoot); - - if (winRec != NULL) - { - rootlessDestroyFrame (pRoot, winRec); - DeleteProperty (pRoot, xa_native_window_id ()); - } -} - -void -RootlessHideAllWindows (void) -{ - int i; - ScreenPtr pScreen; - WindowPtr pWin; - RootlessWindowRec *winRec; - xp_window_changes wc; - - if (windows_hidden) - return; - - windows_hidden = TRUE; - - for (i = 0; i < screenInfo.numScreens; i++) - { - pScreen = screenInfo.screens[i]; - pWin = WindowTable[i]; - if (pScreen == NULL || pWin == NULL) - continue; - - for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) - { - if (!pWin->realized) - continue; - - RootlessStopDrawing (pWin, FALSE); - - winRec = WINREC (pWin); - if (winRec != NULL) - { - wc.stack_mode = XP_UNMAPPED; - wc.sibling = 0; - configure_window (winRec->wid, XP_STACKING, &wc); - } - } - } -} - -void -RootlessShowAllWindows (void) -{ - int i; - ScreenPtr pScreen; - WindowPtr pWin; - RootlessWindowRec *winRec; - - if (!windows_hidden) - return; - - windows_hidden = FALSE; - - for (i = 0; i < screenInfo.numScreens; i++) - { - pScreen = screenInfo.screens[i]; - pWin = WindowTable[i]; - if (pScreen == NULL || pWin == NULL) - continue; - - for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) - { - if (!pWin->realized) - continue; - - winRec = rootlessEnsureFrame (pWin); - if (winRec == NULL) - continue; - - RootlessReorderWindow (pWin); - } - - RootlessScreenExpose (pScreen); - } -} - -void -RootlessSetWindowLevel (WindowPtr pWin, int level) -{ - RootlessWindowRec *winRec; - xp_window_changes wc; - - winRec = WINREC (pWin); - if (!IsTopLevel (pWin) || winRec == NULL || winRec->level == level) - return; - - RootlessStopDrawing (pWin, FALSE); - - winRec->level = level; - - if (!rootlessHasRoot (pWin->drawable.pScreen)) - wc.window_level = normal_window_levels[level]; - else - wc.window_level = rooted_window_levels[level]; - - configure_window (winRec->wid, XP_WINDOW_LEVEL, &wc); -} - -/* Return the id of the physical window displaying the given window. If - CREATE is true and the window has no frame, attempt to create one. */ -xp_window_id -RootlessGetPhysicalWindow (WindowPtr pWin, Bool create) -{ - RootlessWindowRec *winRec; - - if (TopLevelParent (pWin) == NULL) - return 0; - - winRec = WINREC (pWin); - - if (winRec == NULL && create && !IsRoot (pWin) - && pWin->drawable.class == InputOutput) - { - rootlessEnsureFrame (pWin); - winRec = WINREC (pWin); - } - - if (winRec == NULL) - return 0; - - return winRec->wid; -} - -/* Given the id of a physical window, try to find the top-level (or root) - X window that it represents. */ -WindowPtr -RootlessGetXWindow (xp_window_id wid) -{ - RootlessWindowRec *winRec; - - if (window_hash == NULL) - return NULL; - - winRec = x_hash_table_lookup (window_hash, (void *) wid, NULL); - - return winRec != NULL ? winRec->win : NULL; -} - -/* Number is an appkit window number. Returns true if X is displaying - a window with that number. */ -int -RootlessKnowsWindowNumber (int number) -{ - Bool ret; - xp_window_id wid; - - /* need to lock, since this function can be called by any thread */ - - if (window_hash == NULL) - return FALSE; - - pthread_mutex_lock (&window_hash_mutex); - - if (xp_lookup_native_window (number, &wid)) - ret = RootlessGetXWindow (wid) != NULL; - else - ret = FALSE; - - pthread_mutex_unlock (&window_hash_mutex); - - return ret; -} - -Bool -RootlessUnrealizeWindow (WindowPtr pWin) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - RootlessWindowRec *winRec = WINREC(pWin); - xp_window_changes wc; - Bool result; - - RL_DEBUG_MSG("unrealizewindow start\n"); - - if (winRec != NULL) - { - RootlessStopDrawing (pWin, FALSE); - - wc.stack_mode = XP_UNMAPPED; - wc.sibling = 0; - - configure_window (winRec->wid, XP_STACKING, &wc); - - winRec->unrealize_time = current_time_in_seconds (); - winRec->is_reorder_pending = FALSE; - - RootlessReenableUpdate (pWin); - } - - SCREEN_UNWRAP (pScreen, UnrealizeWindow); - - result = pScreen->UnrealizeWindow (pWin); - - SCREEN_WRAP (pScreen, UnrealizeWindow); - - RL_DEBUG_MSG ("unrealizewindow end\n"); - return result; -} - -void -RootlessReparentWindow (WindowPtr pWin, WindowPtr pPriorParent) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - RootlessWindowRec *winRec = WINREC (pWin); - - WindowPtr pTopWin; - - if (IsRoot (pWin) || IsRoot (pWin->parent) - || IsTopLevel (pWin) || winRec == NULL) - { - return; - } - - /* If the window is moving upwards towards the root has a frame, - we want to try to move it onto its new toplevel parent. If we - can't do that, we'll just have to jettison it.. */ - - pTopWin = TopLevelParent (pWin); - assert (pTopWin != pWin); - - pWin->rootlessUnhittable = FALSE; - - DeleteProperty (pWin, xa_native_window_id ()); - - if (WINREC (pTopWin) != NULL) - { - /* We're screwed. */ - rootlessDestroyFrame (pWin, winRec); - } - else - { - xp_window_changes wc; - int sx, sy; - - if (!pTopWin->realized && pWin->realized) - { - wc.stack_mode = XP_UNMAPPED; - wc.sibling = 0; - - RootlessStopDrawing (pWin, FALSE); - configure_window (winRec->wid, XP_STACKING, &wc); - } - - /* Switch the frame record from one to the other. */ - - WINREC (pWin) = NULL; - WINREC (pTopWin) = winRec; - - rootlessInitializeFrame (pTopWin, winRec); - rootlessSetShape (pTopWin); - - sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; - sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; - - wc.x = sx + winRec->x; - wc.y = sy + winRec->y; - wc.width = winRec->width; - wc.height = winRec->height; - wc.bit_gravity = XP_GRAVITY_NONE; - - RootlessStopDrawing (pWin, FALSE); - configure_window (winRec->wid, XP_BOUNDS, &wc); - - rootlessSetNativeProperty (winRec); - - if (pTopWin->realized && !pWin->realized) - winRec->is_reorder_pending = TRUE; - } -} - -/* Reorder the window associated with the given frame so that it's - physically above the window below it in the X stacking order. */ -void -RootlessReorderWindow (WindowPtr pWin) -{ - RootlessWindowRec *winRec = WINREC (pWin); - - if (pWin->realized && winRec != NULL - && !winRec->is_reorder_pending && !windows_hidden) - { - WindowPtr newPrevW; - RootlessWindowRec *newPrev; - xp_window_changes wc; - Atom atom; - PropertyPtr prop; - - /* quartz-wm sets the _APPLE_NO_ORDER_IN property on windows - that are being genie-restored from the Dock. We want them to - be mapped but remain ordered-out until the animation - completes (when the Dock will order them in) */ - - atom = xa_apple_no_order_in (); - for (prop = wUserProps (pWin); prop != NULL; prop = prop->next) - { - if (prop->propertyName == atom && prop->type == atom) - return; - } - - RootlessStopDrawing (pWin, FALSE); - - if (IsRoot (pWin)) - { - wc.stack_mode = XP_MAPPED_BELOW; - wc.sibling = 0; - } - else - { - /* Find the next window above this one that has a mapped frame. */ - - newPrevW = pWin->prevSib; - while (newPrevW - && (WINREC (newPrevW) == NULL || !newPrevW->realized)) - { - newPrevW = newPrevW->prevSib; - } - - newPrev = newPrevW != NULL ? WINREC (newPrevW) : NULL; - - /* Then either stack ourselves below it if it exists, or raise - ourselves above everything otherwise. */ - - if (newPrev == NULL) - { - wc.stack_mode = XP_MAPPED_ABOVE; - wc.sibling = 0; - } - else - { - if (newPrev->is_reorder_pending) - { - newPrev->is_reorder_pending = FALSE; - RootlessReorderWindow (newPrevW); - } - - wc.stack_mode = XP_MAPPED_BELOW; - wc.sibling = newPrev->wid; - } - } - - configure_window (winRec->wid, XP_STACKING, &wc); - } -} - -void -RootlessRestackWindow (WindowPtr pWin, WindowPtr pOldNextSib) -{ - RegionRec saveRoot; - RootlessWindowRec *winRec = WINREC (pWin); - ScreenPtr pScreen = pWin->drawable.pScreen; - - RL_DEBUG_MSG("restackwindow start\n"); - if (winRec != NULL) - RL_DEBUG_MSG("restack top level \n"); - - HUGE_ROOT(pWin); - SCREEN_UNWRAP(pScreen, RestackWindow); - - if (pScreen->RestackWindow != NULL) - pScreen->RestackWindow (pWin, pOldNextSib); - - SCREEN_WRAP(pScreen, RestackWindow); - NORMAL_ROOT(pWin); - - if (winRec != NULL && pWin->viewable) - RootlessReorderWindow (pWin); - - RL_DEBUG_MSG("restackwindow end\n"); -} - -/* - * Specialized window copy procedures - */ - -/* Globals needed during window resize and move. */ -static pointer gResizeDeathBits = NULL; -static int gResizeDeathCount; -static PixmapPtr gResizeDeathPix[2]; -static BoxRec gResizeDeathBounds[2]; -static CopyWindowProcPtr gResizeOldCopyWindowProc = NULL; - -/* CopyWindow () that doesn't do anything. For MoveWindow() of - top-level windows. */ -static void -RootlessNoCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) -{ - /* Some code expects the region to be translated */ - - int dx = ptOldOrg.x - pWin->drawable.x; - int dy = ptOldOrg.y - pWin->drawable.y; - - REGION_TRANSLATE (pWin->drawable.pScreen, prgnSrc, -dx, -dy); -} - -/* CopyWindow used during ResizeWindow for gravity moves. (from fbCopyWindow) - The original always draws on the root pixmap (which we don't have). - Instead, draw on the parent window's pixmap. - Resize version: the old location's pixels are in gResizeCopyWindowSource */ -static void -RootlessResizeCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, - RegionPtr prgnSrc) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - RegionRec rgnDst; - int dx, dy; - - RL_DEBUG_MSG("resizecopywindowFB start (win 0x%x)\n", pWin); - - /* Don't unwrap pScreen->CopyWindow. - The bogus rewrap with RootlessCopyWindow causes a crash if - CopyWindow is called again during the same resize. */ - - if (gResizeDeathCount == 0) - return; - - RootlessStartDrawing (pWin); - - dx = ptOldOrg.x - pWin->drawable.x; - dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE (pScreen, prgnSrc, -dx, -dy); - REGION_INIT (pScreen, &rgnDst, NullBox, 0); - REGION_INTERSECT (pScreen, &rgnDst, &pWin->borderClip, prgnSrc); - - if (gResizeDeathCount == 1) - { - /* Simple case, we only have a single source pixmap. */ - - fbCopyRegion (&gResizeDeathPix[0]->drawable, - &pScreen->GetWindowPixmap(pWin)->drawable, 0, - &rgnDst, dx, dy, fbCopyWindowProc, 0, 0); - } - else - { - int i; - RegionRec clip, clipped; - - /* More complex case, N source pixmaps (usually two). So we - intersect the destination with each source and copy those bits. */ - - for (i = 0; i < gResizeDeathCount; i++) - { - REGION_INIT (pScreen, &clip, gResizeDeathBounds + 0, 1); - REGION_INIT (pScreen, &clipped, NullBox, 0); - REGION_INTERSECT (pScreen, &rgnDst, &clip, &clipped); - - fbCopyRegion (&gResizeDeathPix[i]->drawable, - &pScreen->GetWindowPixmap(pWin)->drawable, 0, - &clipped, dx, dy, fbCopyWindowProc, 0, 0); - - REGION_UNINIT (pScreen, &clipped); - REGION_UNINIT (pScreen, &clip); - } - } - - /* Don't update - resize will update everything */ - REGION_UNINIT (pScreen, &rgnDst); - - fbValidateDrawable (&pWin->drawable); - - RL_DEBUG_MSG("resizecopywindowFB end\n"); -} - -/* Update *new* location of window. Old location is redrawn with - PaintWindowBackground/Border. Cloned from fbCopyWindow - The original always draws on the root pixmap (which we don't have). - Instead, draw on the parent window's pixmap. */ -void -RootlessCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - RootlessWindowRec *winRec; - WindowPtr top; - - RegionRec rgnDst; - int dx, dy; - BoxPtr extents; - unsigned int area; - - RL_DEBUG_MSG("copywindowFB start (win 0x%x)\n", pWin); - - top = TopLevelParent (pWin); - if (top == NULL) - { - RL_DEBUG_MSG("no parent\n"); - return; - } - - winRec = WINREC(top); - if (winRec == NULL) - { - RL_DEBUG_MSG("not framed\n"); - return; - } - - SCREEN_UNWRAP (pScreen, CopyWindow); - - dx = ptOldOrg.x - pWin->drawable.x; - dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE (pScreen, prgnSrc, -dx, -dy); - - REGION_INIT (pScreen, &rgnDst, NullBox, 0); - REGION_INTERSECT (pScreen, &rgnDst, &pWin->borderClip, prgnSrc); - - extents = REGION_EXTENTS (pScreen, &rgnDst); - area = (extents->x2 - extents->x1) * (extents->y2 - extents->y1); - - if (area > xp_scroll_area_threshold) - { - /* Move region to window local coords */ - REGION_TRANSLATE (pScreen, &rgnDst, -winRec->x, -winRec->y); - - RootlessStopDrawing (pWin, FALSE); - - xp_copy_window (winRec->wid, winRec->wid, - REGION_NUM_RECTS (&rgnDst), - REGION_RECTS (&rgnDst), dx, dy); - } - else - { - RootlessStartDrawing (pWin); - - fbCopyRegion ((DrawablePtr) pWin, (DrawablePtr) pWin, - 0, &rgnDst, dx, dy, fbCopyWindowProc, 0, 0); - - /* prgnSrc has been translated to dst position */ - RootlessDamageRegion(pWin, prgnSrc); - } - - REGION_UNINIT (pScreen, &rgnDst); - fbValidateDrawable (&pWin->drawable); - - SCREEN_WRAP (pScreen, CopyWindow); - - RL_DEBUG_MSG("copywindowFB end\n"); -} - -/* - * Window resize procedures - */ - -enum { - WIDTH_SMALLER = 1, - HEIGHT_SMALLER = 2, -}; - -/* Compute which directions the window is resizing in. */ -static inline unsigned int -resize_code (int oldX, int oldY, int oldW, int oldH, - int newX, int newY, int newW, int newH) -{ - unsigned int code = 0; - - /* These comparisons were chosen to avoid setting bits when the sizes - are the same. (So the fastest case automatically gets taken when - dimensions are unchanging.) */ - - if (newW < oldW) - code |= WIDTH_SMALLER; - - if (newH < oldH) - code |= HEIGHT_SMALLER; - - return code; -} - -static inline unsigned int -resize_weighting (int oldX1, int oldY1, int oldX2, int oldY2, int oldBW, - int newX1, int newY1, int newX2, int newY2, int newBW) -{ - /* Choose gravity to avoid local copies. Do that by looking for - a corner that doesn't move _relative to the screen_ */ - - if (newBW != oldBW) - return XP_GRAVITY_NONE; - - if (newX1 == oldX1 && newY1 == oldY1) - return XP_GRAVITY_NORTH_WEST; - else if (newX1 == oldX1 && newY2 == oldY2) - return XP_GRAVITY_SOUTH_WEST; - else if (newX2 == oldX2 && newY2 == oldY2) - return XP_GRAVITY_SOUTH_EAST; - else if (newX2 == oldX2 && newY1 == oldY1) - return XP_GRAVITY_NORTH_EAST; - else - return XP_GRAVITY_NONE; -} - -/* Resize the given window to its new position and size. */ -static void -resize_frame (ScreenPtr pScreen, WindowPtr pWin, - RootlessWindowRec *winRec, int gravity) -{ - int sx, sy; - xp_window_changes wc; - - sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; - sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; - - wc.x = sx + winRec->x; - wc.y = sy + winRec->y; - wc.width = winRec->width; - wc.height = winRec->height; - wc.bit_gravity = gravity; - - /* It's unlikely that being async will save us anything here. - But it can't hurt. */ - - configure_window (winRec->wid, XP_BOUNDS, &wc); -} - -/* Prepare to resize a top-level window. The old window's pixels are - saved and the implementation is told to change the window size. - (x,y,w,h) is outer frame of window (outside border) */ -static Bool -StartFrameResize (WindowPtr pWin, Bool gravity, - int oldX, int oldY, int oldW, int oldH, int oldBW, - int newX, int newY, int newW, int newH, int newBW) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - RootlessWindowRec *winRec = WINREC(pWin); - Bool need_window_source = FALSE, resize_after = FALSE; - - BoxRec rect, copy_rect; - int oldX2, newX2; - int oldY2, newY2; - unsigned int weight; - - oldX2 = oldX + oldW, newX2 = newX + newW; - oldY2 = oldY + oldH, newY2 = newY + newH; - - /* Decide which resize weighting to use */ - weight = resize_weighting (oldX, oldY, oldW, oldH, oldBW, - newX, newY, newW, newH, newBW); - - /* Compute intersection between old and new rects */ - rect.x1 = max(oldX, newX); - rect.y1 = max(oldY, newY); - rect.x2 = min(oldX2, newX2); - rect.y2 = min(oldY2, newY2); - - RL_DEBUG_MSG("RESIZE TOPLEVEL WINDOW with gravity %i ", gravity); - RL_DEBUG_MSG("%d %d %d %d %d %d %d %d %d %d\n", - oldX, oldY, oldW, oldH, oldBW, - newX, newY, newW, newH, newBW); - - RootlessDisableUpdate (pWin); - RootlessRedisplay (pWin); - - /* If gravity is true, then we need to have a way of recovering all - the original bits in the window for when X rearranges the contents - based on the various gravity settings. The obvious way is to just - snapshot the entire backing store before resizing it, but that - it slow on large windows. - - So the optimization here is to use CG's resize weighting options - to allow us to reason about what is left in the backing store - after the resize. We can then only copy what won't be there after - the resize, and do a two-stage copy operation. - - Most of these optimizations are only applied when the top-left - corner of the window is fixed, since that's the common case. They - could probably be extended with some thought. */ - - gResizeDeathCount = 0; - - if (gravity && weight == XP_GRAVITY_NORTH_WEST) - { - unsigned int code; - - /* Top left corner is anchored. We never need to copy the - entire window. */ - - need_window_source = TRUE; - - code = resize_code (oldX, oldY, oldW, oldH, - newX, newY, newW, newH); - - if (((code ^ (code >> 1)) & 1) == 0) - { - /* Both dimensions are either getting larger, or both - are getting smaller. No need to copy anything. */ - - if (code == (WIDTH_SMALLER | HEIGHT_SMALLER)) - { - /* Since the window is getting smaller, we can do gravity - repair on it with it's current size, then resize it - afterwards. */ - - resize_after = TRUE; - } - - gResizeDeathCount = 1; - } - else - { - unsigned int copy_rowbytes, Bpp; - - /* We can get away with a partial copy. 'rect' is the - intersection between old and new bounds, so copy - everything to the right of or below the intersection. */ - - RootlessStartDrawing (pWin); - - if (code == WIDTH_SMALLER) - { - copy_rect.x1 = rect.x2; - copy_rect.y1 = rect.y1; - copy_rect.x2 = oldX2; - copy_rect.y2 = oldY2; - } - else if (code == HEIGHT_SMALLER) - { - copy_rect.x1 = rect.x1; - copy_rect.y1 = rect.y2; - copy_rect.x2 = oldX2; - copy_rect.y2 = oldY2; - } - else - abort (); - - Bpp = winRec->win->drawable.bitsPerPixel / 8; - copy_rowbytes = (((copy_rect.x2 - copy_rect.x1) * Bpp) + 31) & ~31; - gResizeDeathBits = xalloc (copy_rowbytes - * (copy_rect.y2 - copy_rect.y1)); - - xp_copy_bytes ((copy_rect.x2 - copy_rect.x1) * Bpp, - copy_rect.y2 - copy_rect.y1, ((char *) winRec->data) - + ((copy_rect.y1 - oldY) * winRec->rowbytes) - + (copy_rect.x1 - oldX) * Bpp, winRec->rowbytes, - gResizeDeathBits, copy_rowbytes); - - gResizeDeathBounds[1] = copy_rect; - gResizeDeathPix[1] - = GetScratchPixmapHeader(pScreen, copy_rect.x2 - copy_rect.x1, - copy_rect.y2 - copy_rect.y1, - winRec->win->drawable.depth, - winRec->win->drawable.bitsPerPixel, - winRec->rowbytes, - (void *) gResizeDeathBits); - - TranslatePixmapBase (gResizeDeathPix[1], - -copy_rect.x1, -copy_rect.y1); - - gResizeDeathCount = 2; - } - } - else if (gravity) - { - /* The general case. Just copy everything. */ - - RootlessStartDrawing (pWin); - - gResizeDeathBits = xalloc(winRec->rowbytes * winRec->height); - - memcpy(gResizeDeathBits, winRec->data, - winRec->rowbytes * winRec->height); - - gResizeDeathBounds[0] = (BoxRec) {oldX, oldY, oldX2, oldY2}; - gResizeDeathPix[0] - = GetScratchPixmapHeader(pScreen, winRec->width, - winRec->height, - winRec->win->drawable.depth, - winRec->win->drawable.bitsPerPixel, - winRec->rowbytes, - (void *) gResizeDeathBits); - - TranslatePixmapBase (gResizeDeathPix[0], -oldX, -oldY); - gResizeDeathCount = 1; - } - - RootlessStopDrawing (pWin, FALSE); - - winRec->x = newX; - winRec->y = newY; - winRec->width = newW; - winRec->height = newH; - winRec->borderWidth = newBW; - - /* Unless both dimensions are getting smaller, Resize the frame - before doing gravity repair */ - - if (!resize_after) - resize_frame (pScreen, pWin, winRec, weight); - - RootlessStartDrawing(pWin); - - /* If necessary, create a source pixmap pointing at the current - window bits. */ - - if (need_window_source) - { - gResizeDeathBounds[0] = (BoxRec) {oldX, oldY, oldX2, oldY2}; - gResizeDeathPix[0] - = GetScratchPixmapHeader (pScreen, oldW, oldH, - winRec->win->drawable.depth, - winRec->win->drawable.bitsPerPixel, - winRec->rowbytes, winRec->data); - - TranslatePixmapBase (gResizeDeathPix[0], -oldX, -oldY); - } - - /* Use custom CopyWindow when moving gravity bits around - ResizeWindow assumes the old window contents are in the same - pixmap, but here they're in deathPix instead. */ - - if (gravity) - { - gResizeOldCopyWindowProc = pScreen->CopyWindow; - pScreen->CopyWindow = RootlessResizeCopyWindow; - } - - /* If we can't rely on the window server preserving the bits we - need in the position we need, copy the pixels in the - intersection from src to dst. ResizeWindow assumes these pixels - are already present when making gravity adjustments. pWin - currently has new-sized pixmap but is in old position. - - FIXME: border width change! (?) */ - - if (gravity && weight == XP_GRAVITY_NONE) - { - PixmapPtr src, dst; - - assert (gResizeDeathCount == 1); - - src = gResizeDeathPix[0]; - dst = pScreen->GetWindowPixmap(pWin); - - RL_DEBUG_MSG("Resize copy rect %d %d %d %d\n", - rect.x1, rect.y1, rect.x2, rect.y2); - - /* rect is the intersection of the old location and new location */ - if (BOX_NOT_EMPTY(rect) && src != NULL && dst != NULL) - { - int dx, dy; - - /* The window drawable still has the old frame position, which - means that DST doesn't actually point at the origin of our - physical backing store when adjusted by the drawable.x,y - position. So sneakily adjust it temporarily while copying.. */ - - dx = newX - oldX; - dy = newY - oldY; - TranslatePixmapBase (dst, -dx, -dy); - - fbCopyWindowProc(&src->drawable, &dst->drawable, NULL, - &rect, 1, 0, 0, FALSE, FALSE, 0, 0); - - TranslatePixmapBase (dst, dx, dy); - } - } - - return resize_after; -} - -static void -FinishFrameResize (WindowPtr pWin, Bool gravity, int oldX, int oldY, - unsigned int oldW, unsigned int oldH, unsigned int oldBW, - int newX, int newY, unsigned int newW, unsigned int newH, - unsigned int newBW, Bool resize_now) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - RootlessWindowRec *winRec = WINREC(pWin); - BoxRec box; - int i; - - RootlessStopDrawing (pWin, FALSE); - - if (resize_now) - { - unsigned int weight; - - /* We didn't resize anything earlier, so do it now, now that - we've finished gravitating the bits. */ - - weight = resize_weighting (oldX, oldY, oldW, oldH, oldBW, - newX, newY, newW, newH, newBW); - - resize_frame (pScreen, pWin, winRec, weight); - } - - /* Redraw everything. FIXME: there must be times when we don't need - to do this. Perhaps when top-left weighting and no gravity? */ - - box.x1 = 0; - box.y1 = 0; - box.x2 = winRec->width; - box.y2 = winRec->height; - - xp_mark_window (winRec->wid, 1, &box, 0, 0); - - for (i = 0; i < 2; i++) - { - if (gResizeDeathPix[i] != NULL) - { - FreeScratchPixmapHeader (gResizeDeathPix[i]); - gResizeDeathPix[i] = NULL; - } - } - - if (gResizeDeathBits != NULL) - { - xfree (gResizeDeathBits); - gResizeDeathBits = NULL; - } - - if (gravity) - pScreen->CopyWindow = gResizeOldCopyWindowProc; -} - -/* If kind==VTOther, window border is resizing (and borderWidth is - already changed!!@#$) This case works like window resize, not move. */ -void -RootlessMoveWindow (WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind) -{ - RootlessWindowRec *winRec = WINREC(pWin); - ScreenPtr pScreen = pWin->drawable.pScreen; - CopyWindowProcPtr oldCopyWindowProc = NULL; - - int oldX = 0, oldY = 0; - unsigned int oldW = 0, oldH = 0, oldBW = 0; - int newX = 0, newY = 0; - unsigned int newW = 0, newH = 0, newBW = 0; - - Bool resize_after = FALSE; - RegionRec saveRoot; - - RL_DEBUG_MSG("movewindow start \n"); - - if (winRec != NULL) - { - if (kind == VTMove) - { - oldX = winRec->x; - oldY = winRec->y; - RootlessRedisplay (pWin); - RootlessStartDrawing (pWin); - } - else - { - RL_DEBUG_MSG("movewindow border resizing "); - - oldBW = winRec->borderWidth; - oldX = winRec->x; - oldY = winRec->y; - oldW = winRec->width; - oldH = winRec->height; - - newBW = wBorderWidth (pWin); - newX = x; - newY = y; - newW = pWin->drawable.width + 2*newBW; - newH = pWin->drawable.height + 2*newBW; - - resize_after = StartFrameResize (pWin, FALSE, - oldX, oldY, oldW, oldH, oldBW, - newX, newY, newW, newH, newBW); - } - } - - HUGE_ROOT (pWin); - SCREEN_UNWRAP (pScreen, MoveWindow); - - oldCopyWindowProc = pScreen->CopyWindow; - - if (winRec != NULL) - pScreen->CopyWindow = RootlessNoCopyWindow; - - pScreen->MoveWindow (pWin, x, y, pSib, kind); - - if (winRec != NULL) - pScreen->CopyWindow = oldCopyWindowProc; - - NORMAL_ROOT (pWin); - SCREEN_WRAP (pScreen, MoveWindow); - - if (winRec != NULL) - { - if (kind == VTMove) - { - xp_window_changes wc; - int sx, sy; - - RootlessStopDrawing (pWin, FALSE); - - winRec->x = x; - winRec->y = y; - - sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; - sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; - - wc.x = sx + winRec->x; - wc.y = sy + winRec->y; - - configure_window (winRec->wid, XP_ORIGIN, &wc); - } - else - { - FinishFrameResize (pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, - newX, newY, newW, newH, newBW, resize_after); - } - } - - RL_DEBUG_MSG("movewindow end\n"); -} - - -/* Note: (x, y, w, h) as passed to this procedure don't match the frame - definition. (x,y) is corner of very outer edge, *outside* border - w,h is width and height *inside* border, *ignoring* border width - The rect (x, y, w, h) doesn't mean anything. (x, y, w+2*bw, h+2*bw) - is total rect (x+bw, y+bw, w, h) is inner rect */ -void -RootlessResizeWindow (WindowPtr pWin, int x, int y, - unsigned int w, unsigned int h, WindowPtr pSib) -{ - RootlessWindowRec *winRec = WINREC(pWin); - ScreenPtr pScreen = pWin->drawable.pScreen; - RegionRec saveRoot; - - int oldX = 0, oldY = 0; - unsigned int oldW = 0, oldH = 0, oldBW = 0; - int newX = 0, newY = 0; - unsigned int newW = 0, newH = 0, newBW = 0; - - Bool resize_after = FALSE; - - RL_DEBUG_MSG("resizewindow start (win 0x%x)\n", pWin); - - if (winRec != NULL) - { - oldBW = winRec->borderWidth; - oldX = winRec->x; - oldY = winRec->y; - oldW = winRec->width; - oldH = winRec->height; - - newBW = oldBW; - newX = x; - newY = y; - newW = w + 2*newBW; - newH = h + 2*newBW; - - resize_after = StartFrameResize (pWin, TRUE, - oldX, oldY, oldW, oldH, oldBW, - newX, newY, newW, newH, newBW); - } - - HUGE_ROOT (pWin); - SCREEN_UNWRAP (pScreen, ResizeWindow); - - if (!IsRoot (pWin)) - { - pScreen->ResizeWindow (pWin, x, y, w, h, pSib); - } - else - { - BoxRec box; - - /* mi won't resize the root. So do it ourselves... */ - - pWin->drawable.x = x; - pWin->drawable.y = y; - pWin->drawable.width = w; - pWin->drawable.height = h; - - box.x1 = x; box.y1 = y; - box.x2 = x + w; box.y2 = y + h; - REGION_UNINIT (pScreen, &pWin->winSize); - REGION_INIT (pScreen, &pWin->winSize, &box, 1); - REGION_COPY (pScreen, &pWin->borderSize, &pWin->winSize); - REGION_COPY (pScreen, &pWin->clipList, &pWin->winSize); - REGION_COPY (pScreen, &pWin->borderClip, &pWin->winSize); - - miSendExposures (pWin, &pWin->borderClip, - pWin->drawable.x, pWin->drawable.y); - } - - SCREEN_WRAP (pScreen, ResizeWindow); - NORMAL_ROOT (pWin); - - if (winRec != NULL) - { - FinishFrameResize (pWin, TRUE, oldX, oldY, oldW, oldH, oldBW, - newX, newY, newW, newH, newBW, resize_after); - } - - RL_DEBUG_MSG("resizewindow end\n"); -} - -void -RootlessRepositionWindow (WindowPtr pWin) -{ - RootlessWindowRec *winRec = WINREC (pWin); - ScreenPtr pScreen = pWin->drawable.pScreen; - xp_window_changes wc; - int sx, sy; - - if (IsRoot (pWin)) - set_screen_origin (pWin); - - if (winRec == NULL) - return; - - RootlessStopDrawing (pWin, FALSE); - - sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; - sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; - - wc.x = sx + winRec->x; - wc.y = sy + winRec->y; - - if (!rootlessHasRoot (pScreen)) - wc.window_level = normal_window_levels[winRec->level]; - else - wc.window_level = rooted_window_levels[winRec->level]; - - configure_window (winRec->wid, XP_ORIGIN | XP_WINDOW_LEVEL, &wc); - - RootlessReorderWindow (pWin); -} - -void -RootlessFlushWindowColormap (WindowPtr pWin) -{ - RootlessWindowRec *winRec = WINREC (pWin); - xp_window_changes wc; - - if (winRec == NULL) - return; - - RootlessStopDrawing (pWin, FALSE); - - /* This is how we tell xp that the colormap may have changed. */ - - wc.colormap = rootlessColormapCallback; - wc.colormap_data = pWin->drawable.pScreen; - - configure_window (winRec->wid, XP_COLORMAP, &wc); -} - -/* Set the Pixmaps on all ParentRelative windows up the ancestor chain. */ -static void -SetPixmapOfAncestors (WindowPtr pWin) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - WindowPtr topWin = TopLevelParent (pWin); - RootlessWindowRec *topWinRec = WINREC (topWin); - XID pixel; - - while (pWin->backgroundState == ParentRelative) - { - if (pWin == topWin) - { - /* disallow ParentRelative background state on top level */ - - pixel = 0; - ChangeWindowAttributes(pWin, CWBackPixel, &pixel, serverClient); - - RL_DEBUG_MSG("Cleared ParentRelative on 0x%x.\n", pWin); - break; - } - - pWin = pWin->parent; - pScreen->SetWindowPixmap (pWin, topWinRec->pixmap); - } -} - -/* RootlessPaintWindowBackground - Paint the window background while filling in the alpha channel - with all on. */ -void -RootlessPaintWindowBackground (WindowPtr pWin, RegionPtr pRegion, int what) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - - SCREEN_UNWRAP (pScreen, PaintWindowBackground); - - RL_DEBUG_MSG("paintwindowbackground start (win 0x%x, framed %i)\n", - pWin, IsFramedWindow(pWin)); - - if (IsFramedWindow (pWin)) - { - /* Don't bother trying to paint the surface background.. */ - rootlessNoDRIDrawing++; - - RootlessStartDrawing (pWin); - RootlessDamageRegion (pWin, pRegion); - - /* For ParentRelative windows, we have to make sure the window - pixmap is set correctly all the way up the ancestor chain. */ - - if (pWin->backgroundState == ParentRelative) - SetPixmapOfAncestors (pWin); - - pScreen->PaintWindowBackground (pWin, pRegion, what); - - rootlessNoDRIDrawing--; - } - - SCREEN_WRAP (pScreen, PaintWindowBackground); - - RL_DEBUG_MSG("paintwindowbackground end\n"); -} - - -/* RootlessPaintWindowBorder - Paint the window border while filling in the alpha channel with all on. */ -void -RootlessPaintWindowBorder (WindowPtr pWin, RegionPtr pRegion, int what) -{ - SCREEN_UNWRAP (pWin->drawable.pScreen, PaintWindowBorder); - - RL_DEBUG_MSG("paintwindowborder start (win 0x%x)\n", pWin); - - if (IsFramedWindow (pWin)) - { - RootlessStartDrawing (pWin); - RootlessDamageRegion (pWin, pRegion); - - /* For ParentRelative windows with tiled borders, we have to make - sure the window pixmap is set correctly all the way up the - ancestor chain. */ - - if (!pWin->borderIsPixel && pWin->backgroundState == ParentRelative) - SetPixmapOfAncestors (pWin); - } - - pWin->drawable.pScreen->PaintWindowBorder (pWin, pRegion, what); - - SCREEN_WRAP (pWin->drawable.pScreen, PaintWindowBorder); - - RL_DEBUG_MSG("paintwindowborder end\n"); -} - - -/* FIXME: untested! - pWin inside corner stays the same; pWin->drawable.[xy] stays the same - frame moves and resizes */ -void -RootlessChangeBorderWidth (WindowPtr pWin, unsigned int width) -{ - RegionRec saveRoot; - Bool resize_after = FALSE; - - RL_DEBUG_MSG("change border width\n"); - - if ((int) width != wBorderWidth (pWin)) - { - RootlessWindowRec *winRec = WINREC(pWin); - - int oldX = 0, oldY = 0, newX = 0, newY = 0; - unsigned int oldW = 0, oldH = 0, oldBW = 0; - unsigned int newW = 0, newH = 0, newBW = 0; - - if (winRec != NULL) - { - oldBW = winRec->borderWidth; - oldX = winRec->x; - oldY = winRec->y; - oldW = winRec->width; - oldH = winRec->height; - - newBW = width; - newX = pWin->drawable.x - newBW; - newY = pWin->drawable.y - newBW; - newW = pWin->drawable.width + 2*newBW; - newH = pWin->drawable.height + 2*newBW; - - resize_after = StartFrameResize (pWin, FALSE, - oldX, oldY, oldW, oldH, oldBW, - newX, newY, newW, newH, newBW); - } - - HUGE_ROOT (pWin); - SCREEN_UNWRAP (pWin->drawable.pScreen, ChangeBorderWidth); - - pWin->drawable.pScreen->ChangeBorderWidth (pWin, width); - - SCREEN_WRAP (pWin->drawable.pScreen, ChangeBorderWidth); - NORMAL_ROOT (pWin); - - if (winRec != NULL) - { - FinishFrameResize (pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, - newX, newY, newW, newH, newBW, resize_after); - } - } - - RL_DEBUG_MSG("change border width end\n"); -} - -/* - * RootlessFillRegionTiled - * Fill using a tile while leaving the alpha channel untouched. - * Based on fbfillRegionTiled. - */ -static void -RootlessFillRegionTiled( - DrawablePtr pDrawable, - RegionPtr pRegion, - PixmapPtr pTile) -{ - FbBits *dst; - FbStride dstStride; - int dstBpp; - int dstXoff, dstYoff; - FbBits *tile; - FbStride tileStride; - int tileBpp; - int tileXoff, tileYoff; /* XXX assumed to be zero */ - int tileWidth, tileHeight; - int n = REGION_NUM_RECTS(pRegion); - BoxPtr pbox = REGION_RECTS(pRegion); - int xRot = pDrawable->x; - int yRot = pDrawable->y; - FbBits planeMask; - -#ifdef PANORAMIX - if(!noPanoramiXExtension) - { - int index = pDrawable->pScreen->myNum; - if(&WindowTable[index]->drawable == pDrawable) - { - xRot -= panoramiXdataPtr[index].x; - yRot -= panoramiXdataPtr[index].y; - } - } -#endif - fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); - fbGetDrawable (&pTile->drawable, tile, tileStride, tileBpp, - tileXoff, tileYoff); - tileWidth = pTile->drawable.width; - tileHeight = pTile->drawable.height; - xRot += dstXoff; - yRot += dstYoff; - planeMask = FB_ALLONES & ~RootlessAlphaMask(dstBpp); - - while (n--) - { - fbTile (dst + (pbox->y1 + dstYoff) * dstStride, - dstStride, - (pbox->x1 + dstXoff) * dstBpp, - (pbox->x2 - pbox->x1) * dstBpp, - pbox->y2 - pbox->y1, - tile, - tileStride, - tileWidth * dstBpp, - tileHeight, - GXcopy, - planeMask, - dstBpp, - xRot * dstBpp, - yRot - pbox->y1); - pbox++; - } -} - -/* - * RootlessPaintWindow - * Paint the window while filling in the alpha channel with all on. - * We can't use fbPaintWindow because it zeros the alpha channel. - */ -void -RootlessPaintWindow( - WindowPtr pWin, - RegionPtr pRegion, - int what) -{ - switch (what) { - case PW_BACKGROUND: - - switch (pWin->backgroundState) { - case None: - break; - case ParentRelative: - do { - pWin = pWin->parent; - } while (pWin->backgroundState == ParentRelative); - (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion, - what); - break; - case BackgroundPixmap: - RootlessFillRegionTiled (&pWin->drawable, - pRegion, - pWin->background.pixmap); - break; - case BackgroundPixel: - { - Pixel pixel = pWin->background.pixel | - RootlessAlphaMask(pWin->drawable.bitsPerPixel); - fbFillRegionSolid (&pWin->drawable, pRegion, 0, - fbReplicatePixel (pixel, - pWin->drawable.bitsPerPixel)); - break; - } - } - break; - case PW_BORDER: - if (pWin->borderIsPixel) - { - Pixel pixel = pWin->border.pixel | - RootlessAlphaMask(pWin->drawable.bitsPerPixel); - fbFillRegionSolid (&pWin->drawable, pRegion, 0, - fbReplicatePixel (pixel, - pWin->drawable.bitsPerPixel)); - } - else - { - WindowPtr pBgWin; - for (pBgWin = pWin; pBgWin->backgroundState == ParentRelative; - pBgWin = pBgWin->parent); - - RootlessFillRegionTiled (&pBgWin->drawable, - pRegion, - pWin->border.pixmap); - } - break; - } - fbValidateDrawable (&pWin->drawable); -} diff --git a/synfig-osx/trunk/launcher/rootless-window.h b/synfig-osx/trunk/launcher/rootless-window.h deleted file mode 100644 index 097afc4..0000000 --- a/synfig-osx/trunk/launcher/rootless-window.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Rootless window management - * - * Greg Parker gparker@cs.stanford.edu - */ - -/* Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. */ - -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootlessWindow.h,v 1.2 2002/04/03 00:06:32 torrey Exp $ */ - -#ifndef _ROOTLESSWINDOW_H -#define _ROOTLESSWINDOW_H - -#include "rootless-common.h" - -Bool RootlessCreateWindow(WindowPtr pWin); -Bool RootlessDestroyWindow(WindowPtr pWin); - -#ifdef SHAPE -void RootlessSetShape(WindowPtr pWin); -#endif // SHAPE - -Bool RootlessChangeWindowAttributes(WindowPtr pWin, unsigned long vmask); -Bool RootlessPositionWindow(WindowPtr pWin, int x, int y); -Bool RootlessRealizeWindow(WindowPtr pWin); -Bool RootlessUnrealizeWindow(WindowPtr pWin); -void RootlessReparentWindow(WindowPtr pWin, WindowPtr pPriorParent); -void RootlessRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib); -void RootlessCopyWindow(WindowPtr pWin,DDXPointRec ptOldOrg,RegionPtr prgnSrc); -void RootlessMoveWindow(WindowPtr pWin,int x,int y,WindowPtr pSib,VTKind kind); -void RootlessResizeWindow(WindowPtr pWin, int x, int y, - unsigned int w, unsigned int h, WindowPtr pSib); -void RootlessPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, - int what); -void RootlessPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, - int what); -void RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width); -void RootlessPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what); - -#endif diff --git a/synfig-osx/trunk/launcher/rootless.h b/synfig-osx/trunk/launcher/rootless.h deleted file mode 100644 index 93b3542..0000000 --- a/synfig-osx/trunk/launcher/rootless.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * External interface to generic rootless mode - * - * Greg Parker gparker@cs.stanford.edu March 3, 2001 - */ - -/* Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. */ - -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/rootless.h,v 1.2 2002/08/28 06:41:26 torrey Exp $ */ - -#ifndef _ROOTLESS_H -#define _ROOTLESS_H - -#include "mi.h" -#include "gcstruct.h" - -#include "Xplugin.h" - -/* Initialize rootless mode on the given screen. */ -extern Bool RootlessSetupScreen(int index, ScreenPtr pScreen); - -extern void RootlessUpdateScreenPixmap (ScreenPtr pScreen); - -extern xp_window_id RootlessGetPhysicalWindow (WindowPtr pWin, Bool create); -extern WindowPtr RootlessGetXWindow (xp_window_id wid); - -extern int RootlessKnowsWindowNumber (int number); - -extern void RootlessDisableUpdate (WindowPtr pWin); -extern void RootlessReenableUpdate (WindowPtr pWin); - -extern void RootlessUpdateRooted (Bool state); -extern void RootlessHideAllWindows (void); -extern void RootlessShowAllWindows (void); - -#endif /* _ROOTLESS_H */ diff --git a/synfig-osx/trunk/launcher/sif_file.icns b/synfig-osx/trunk/launcher/sif_file.icns deleted file mode 100644 index 3092df60cfa8bb35ec5919607b73a5d3d64455b5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 50361 zcmeIb2V7Lw);@e@r~}e_QJOSC1r((hVd!0Yuc7xMgf=s@&`anLx}k?2Krnz96}Yx* zy|x!ijCySm^=gWI>kLH@mC=j8_x=69Ou{&G&fd>jd+oK?*=Ij%pYit!iA0d2!~R~8 zVhDm5z#qag&N9pLROpq^E6qQb{$u%*u#3=#3X;CMHN(=U%fy*YpqQI=ZN9 zetGqxt}1SgHAf#TnAIV@y{Tqqe8H^oy&XT)^e^eERe9u}XFIAdE$ZsrF)@AO$I`Jy zUH$8i_Vf*8HJ(_|)vfx_^t=A+rSJ36==a>^uk*3+m1gGc_XF^q{qE}T^j`H3myV$45r(Y` z^5G!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OTv{5fb8Np5K -Eric Sunshine, 1 December 2000 - -OVERVIEW -======== -This package contains the diagnostic utility dumpkeymap, as well as highly -detailed documentation describing the internal layout of the Apple/NeXT -.keymapping file. - -The dumpkeymap utility displays detailed information about each .keymapping -file mentioned on the command-line. On Apple and NeXT platforms, if no -.keymapping files are mentioned on the command-line, then it will instead -dissect the key mapping currently in use by the WindowServer and AppKit. - -Documentation includes a thorough and detailed description of the internal -layout of the .keymapping file, as well as an explanation of how to interpret -the output of dumpkeymap. - -The complete set of documentation is available for perusal via dumpkeymap's -manual page (dumpkeymap.1), as well as via the command-line options described -below. - - --help - Usage summary. - --help-keymapping - Detailed discussion of the internal format of a .keymapping file. - --help-output - Explanation of dumpkeymap's output. - --help-files - List of key mapping-related files and directories. - --help-diagnostics - Explanation of diagnostic messages. - -Once the manual page is been installed, documentation can also be accessed -with the Unix `man' command: - - % man dumpkeymap - - -COMPILATION -=========== -MacOS/X, Darwin - - cc -Wall -o dumpkeymap dumpkeymap.c -framework IOKit - -MacOS/X DP4 (Developer Preview 4) - - cc -Wall -o dumpkeymap dumpkeymap.c -FKernel -framework IOKit - -MacOS/X Server, OpenStep, NextStep - - cc -Wall -o dumpkeymap dumpkeymap.c - -By default, dumpkeymap is configured to interface with the HID driver (Apple) -or event-status driver (NeXT), thus allowing it to dump the key mapping which -is currently in use by the WindowServer and AppKit. However, these facilities -are specific to Apple/NeXT. In order to build dumpkeymap for non-Apple/NeXT -platforms, you must define the DUMPKEYMAP_FILE_ONLY flag when compiling the -program. This flag inhibits use of the HID and event-status drivers and -configures dumpkeymap to work strictly with raw key mapping files. - -For example, to compile for Linux: - - gcc -Wall -DDUMPKEYMAP_FILE_ONLY -o dumpkeymap dumpkeymap.c - - -INSTALLATION -============ -Install the dumpkeymap executable image in a location mentioned in the PATH -environment variable. Typicall locations for executable files are: - - /usr/local/bin - $(HOME)/bin - -Install the manual page, dumpkeymap.1, in the `man1' subdirectory one of the -standard manual page locations or in any other location mentioned by the -MANPATH environment variable. - -Typical locations for manual pages on most Unix platforms are: - - /usr/local/man/man1 - -Typical locations for manual pages on MacOS/X, Darwin, and MacOS/X Server are: - - /usr/local/man/man1 - /Local/Documentation/ManPages/man1 - /Network/Documentation/ManPages/man1 - -Typical locations for manual pages on OpenStep and NextStep are: - - /usr/local/man/man1 - /LocalLibrary/Documentation/ManPages/man1 - /LocalDeveloper/Documentation/ManPages/man1 - - -CONCLUSION -========== -This program and its accompanying documentation were written by Eric Sunshine -and are copyright (C)1999,2000 by Eric Sunshine . - -The implementation of dumpkeymap is based upon information gathered on -September 3, 1997 by Eric Sunshine and Paul S. -McCarthy during an effort to reverse engineer the format -of the NeXT .keymapping file. - - - -$XFree86: xc/programs/Xserver/hw/darwin/utils/README.txt,v 1.2 2000/12/05 21:18:34 dawes Exp $ diff --git a/synfig-osx/trunk/launcher/utils/dumpkeymap.c b/synfig-osx/trunk/launcher/utils/dumpkeymap.c deleted file mode 100644 index c1b6ea1..0000000 --- a/synfig-osx/trunk/launcher/utils/dumpkeymap.c +++ /dev/null @@ -1,1453 +0,0 @@ -// $XFree86: xc/programs/Xserver/hw/darwin/utils/dumpkeymap.c,v 1.3 2000/12/05 21:18:34 dawes Exp $ -//============================================================================= -// -// Copyright (C) 1999,2000 by Eric Sunshine -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// 3. The name of the author may not be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -// NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -//============================================================================= -//----------------------------------------------------------------------------- -// dumpkeymap.c -// -// Prints a textual representation of each Apple/NeXT .keymapping file -// mentioned on the command-line. If no files are mentioned and if the -// local machine is an Apple or NeXT installation, then the key mapping -// currently in use by the WindowServer and the AppKit is printed -// instead. -// -// Invoke dumpkeymap with one of the options listed below in order to -// view detailed documentation about .keymapping files and the use of -// this program. -// -// --help: Usage summary. -// --help-keymapping: Detailed discussion of the internal format of a -// .keymapping file. -// --help-output: Explanation of dumpkeymap's output. -// --help-files: List of key mapping-related files and directories. -// --help-diagnostics: Explanation of diagnostic messages. -// -// COMPILATION INSTRUCTIONS -// -// MacOS/X, Darwin -// cc -Wall -o dumpkeymap dumpkeymap.c -framework IOKit -// -// MacOS/X DP4 (Developer Preview 4) -// cc -Wall -o dumpkeymap dumpkeymap.c -FKernel -framework IOKit -// -// MacOS/X Server, OpenStep, NextStep -// cc -Wall -o dumpkeymap dumpkeymap.c -// -// By default, dumpkeymap is configured to interface with the HID driver -// (Apple) or event-status driver (NeXT), thus allowing it to dump the -// key mapping which is currently in use by the WindowServer and AppKit. -// However, these facilities are specific to Apple/NeXT. In order to -// build dumpkeymap for non-Apple/NeXT platforms, you must define the -// DUMPKEYMAP_FILE_ONLY flag when compiling the program. This flag -// inhibits use of the HID and event-status drivers and configures -// dumpkeymap to work strictly with raw key mapping files. -// -// For example, to compile for Linux: -// gcc -Wall -DDUMPKEYMAP_FILE_ONLY -o dumpkeymap dumpkeymap.c -// -// CONCLUSION -// -// This program and its accompanying documentation were written by Eric -// Sunshine and are copyright (C)1999,2000 by Eric Sunshine -// . -// -// The implementation of dumpkeymap is based upon information gathered -// on September 3, 1997 by Eric Sunshine and -// Paul S. McCarthy during an effort to reverse -// engineer the format of the NeXT .keymapping file. -// -// HISTORY -// -// v4 2000/12/01 Eric Sunshine -// Updated manual page to work with `rman', the `man' to `HTML' -// translator. Unfortunately, however, rman is missing important -// roff features such as diversions, indentation, and tab stops, -// and is also hideously buggy, so getting the manual to work with -// rman required quite a few work-arounds. -// The manual page has now been tested with nroff (plain text), troff -// (PostScript, etc.), groff (PostScript), and rman (HTML, etc.) -// -// v3 2000/11/28 Eric Sunshine -// Considerably expanded the documentation. -// Augmented the existing description of .keymapping internals. -// Added these new documentation topics: -// - Output: Very important section describing how to interpret -// the output of dumpkeymap. -// - Files: Lists files and directories related to key mappings. -// - Diagnostics: Explains diagnostic messages issued by -// dumpkeymap. -// Created a manual page (dumpkeymap.1) which contains the complete -// set of documentation for key mapping files and dumpkeymap. -// Added command-line options (--help, --help-keymapping, -// --help-output, --help-files, --help-diagnostics) which allow -// access to all key mapping documentation. Previously the -// description of the internal layout of a .keymapping file was -// only available as source code comments. -// Added --version option. -// Ported to non-Apple/NeXT platforms. Defining the pre-processor -// flag DUMPKEYMAP_FILE_ONLY at compilation time inhibits use of -// Apple/NeXT-specific API. -// Added a README file. -// -// v2 2000/11/13 Eric Sunshine -// Converted from C++ to plain-C. -// Now parses and takes into account the "number-size" flag stored -// with each key map. This flag indicates the size, in bytes, of -// all remaining numeric values in the mapping. Updated all code -// to respect this flag. (Previously, the purpose of this field -// was unknown, and it was thus denoted as -// `KeyMapping::fill[2]'.) -// Updated all documentation; especially the "KEY MAPPING -// DESCRIPTION" section. Added discussion of the "number-size" -// flag and revamped all structure definitions to use the generic -// data type `number' instead of `uchar' or 'byte'. Clarified -// several sections of the documentation and added missing -// discussions about type definitions and the relationship of -// `interface' and `handler_id' to .keymapping and .keyboard -// files. -// Updated compilation instructions to include directions for all -// platforms on which this program might be built. -// Now published under the formal BSD license rather than a -// home-grown license. -// -// v1 1999/09/08 Eric Sunshine -// Created. -//----------------------------------------------------------------------------- -#include -#include -#include -#include -#if !defined(DUMPKEYMAP_FILE_ONLY) -#include -#endif - -#define PROG_NAME "dumpkeymap" -#define PROG_VERSION "4" -#define AUTHOR_NAME "Eric Sunshine" -#define AUTHOR_EMAIL "sunshine@sunshineco.com" -#define AUTHOR_INFO AUTHOR_NAME " <" AUTHOR_EMAIL ">" -#define COPYRIGHT "Copyright (C) 1999,2000 by " AUTHOR_INFO - -typedef unsigned char byte; -typedef unsigned short word; -typedef unsigned int natural; -typedef unsigned long dword; -typedef dword number; - -#define ASCII_SET 0x00 -#define BIND_FUNCTION 0xfe -#define BIND_SPECIAL 0xff - -#define OPT_SWITCH(X) { char const* switched_str__=(X); if (0) { -#define OPT_CASE(X,Y) } else if (strcmp(switched_str__,(#X)) == 0 || \ - strcmp(switched_str__,(#Y)) == 0) { -#define OPT_DEFAULT } else { -#define OPT_SWITCH_END }} - -//----------------------------------------------------------------------------- -// Translation Tables -//----------------------------------------------------------------------------- -static char const* const SPECIAL_CODE[] = - { - "sound-up", - "sound-down", - "brightness-up", - "brightness-down", - "alpha-lock", - "help", - "power", - "secondary-up-arrow", - "secondary-down-arrow" - }; -#define N_SPECIAL_CODE (sizeof(SPECIAL_CODE) / sizeof(SPECIAL_CODE[0])) - -static char const* const MODIFIER_CODE[] = - { - "alpha-lock", - "shift", - "control", - "alternate", - "command", - "keypad", - "help" - }; -#define N_MODIFIER_CODE (sizeof(MODIFIER_CODE) / sizeof(MODIFIER_CODE[0])) - -static char const* const MODIFIER_MASK[] = - { - "-----", // R = carriage-return - "----L", // A = alternate - "---S-", // C = control - "---SL", // S = shift - "--C--", // L = alpha-lock - "--C-L", - "--CS-", - "--CSL", - "-A---", - "-A--L", - "-A-S-", - "-A-SL", - "-AC--", - "-AC-L", - "-ACS-", - "-ACSL", - "R----", - "R---L", - "R--S-", - "R--SL", - "R-C--", - "R-C-L", - "R-CS-", - "R-CSL", - "RA---", - "RA--L", - "RA-S-", - "RA-SL", - "RAC--", - "RAC-L", - "RACS-", - "RACSL", - }; -#define N_MODIFIER_MASK (sizeof(MODIFIER_MASK) / sizeof(MODIFIER_MASK[0])) - -#define FUNCTION_KEY_FIRST 0x20 -static char const* const FUNCTION_KEY[] = - { - "F1", // 0x20 - "F2", // 0x21 - "F3", // 0x22 - "F4", // 0x23 - "F5", // 0x24 - "F6", // 0x25 - "F7", // 0x26 - "F8", // 0x27 - "F9", // 0x28 - "F10", // 0x29 - "F11", // 0x2a - "F12", // 0x2b - "insert", // 0x2c - "delete", // 0x2d - "home", // 0x2e - "end", // 0x2f - "page up", // 0x30 - "page down", // 0x31 - "print screen", // 0x32 - "scroll lock", // 0x33 - "pause", // 0x34 - "sys-request", // 0x35 - "break", // 0x36 - "reset (HIL)", // 0x37 - "stop (HIL)", // 0x38 - "menu (HIL)", // 0x39 - "user (HIL)", // 0x3a - "system (HIL)", // 0x3b - "print (HIL)", // 0x3c - "clear line (HIL)", // 0x3d - "clear display (HIL)", // 0x3e - "insert line (HIL)", // 0x3f - "delete line (HIL)", // 0x40 - "insert char (HIL)", // 0x41 - "delete char (HIL)", // 0x42 - "prev (HIL)", // 0x43 - "next (HIL)", // 0x44 - "select (HIL)", // 0x45 - }; -#define N_FUNCTION_KEY (sizeof(FUNCTION_KEY) / sizeof(FUNCTION_KEY[0])) - - -//----------------------------------------------------------------------------- -// Data Stream Object -// Can be configured to treat embedded "numbers" as being composed of -// either 1, 2, or 4 bytes, apiece. -//----------------------------------------------------------------------------- -typedef struct _DataStream - { - byte const* data; - byte const* data_end; - natural number_size; // Size in bytes of a "number" in the stream. - } DataStream; - -static DataStream* new_data_stream( byte const* data, int size ) - { - DataStream* s = (DataStream*)malloc( sizeof(DataStream) ); - s->data = data; - s->data_end = data + size; - s->number_size = 1; // Default to byte-sized numbers. - return s; - } - -static void destroy_data_stream( DataStream* s ) - { - free(s); - } - -static int end_of_stream( DataStream* s ) - { - return (s->data >= s->data_end); - } - -static void expect_nbytes( DataStream* s, int nbytes ) - { - if (s->data + nbytes > s->data_end) - { - fputs( "Insufficient data in keymapping data stream.\n", stderr ); - exit(-1); - } - } - -static byte get_byte( DataStream* s ) - { - expect_nbytes( s, 1 ); - return *s->data++; - } - -static word get_word( DataStream* s ) - { - word hi, lo; - expect_nbytes( s, 2 ); - hi = *s->data++; - lo = *s->data++; - return ((hi << 8) | lo); - } - -static dword get_dword( DataStream* s ) - { - dword b1, b2, b3, b4; - expect_nbytes( s, 4 ); - b4 = *s->data++; - b3 = *s->data++; - b2 = *s->data++; - b1 = *s->data++; - return ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1); - } - -static number get_number( DataStream* s ) - { - switch (s->number_size) - { - case 4: return get_dword(s); - case 2: return get_word(s); - default: return get_byte(s); - } - } - - -//----------------------------------------------------------------------------- -// Translation Utility Functions -//----------------------------------------------------------------------------- -static char const* special_code_desc( number n ) - { - if (n < N_SPECIAL_CODE) - return SPECIAL_CODE[n]; - else - return "invalid"; - } - -static char const* modifier_code_desc( number n ) - { - if (n < N_MODIFIER_CODE) - return MODIFIER_CODE[n]; - else - return "invalid"; - } - -static char const* modifier_mask_desc( number n ) - { - if (n < N_MODIFIER_MASK) - return MODIFIER_MASK[n]; - else - return "?????"; - } - -static char const* function_key_desc( number n ) - { - if (n >= FUNCTION_KEY_FIRST && n < N_FUNCTION_KEY + FUNCTION_KEY_FIRST) - return FUNCTION_KEY[ n - FUNCTION_KEY_FIRST ]; - else - return "unknown"; - } - -static number bits_set( number mask ) - { - number n = 0; - for ( ; mask != 0; mask >>= 1) - if ((mask & 0x01) != 0) - n++; - return n; - } - - -//----------------------------------------------------------------------------- -// Unparse a list of Modifier records. -//----------------------------------------------------------------------------- -static void unparse_modifiers( DataStream* s ) - { - number nmod = get_number(s); // Modifier count - printf( "MODIFIERS [%lu]\n", nmod ); - while (nmod-- > 0) - { - number nscan; - number const code = get_number(s); - printf( "%s:", modifier_code_desc(code) ); - nscan = get_number(s); - while (nscan-- > 0) - printf( " 0x%02x", (natural)get_number(s) ); - putchar( '\n' ); - } - putchar( '\n' ); - } - - -//----------------------------------------------------------------------------- -// Unparse a list of Character records. -//----------------------------------------------------------------------------- -typedef void (*UnparseSpecialFunc)( number code ); - -static void unparse_char_codes( - DataStream* s, number ncodes, UnparseSpecialFunc unparse_special ) - { - if (ncodes != 0) - { - while (ncodes-- > 0) - { - number const char_set = get_number(s); - number const code = get_number(s); - putchar(' '); - switch (char_set) - { - case ASCII_SET: - { - int const c = (int)code; - if (isprint(c)) - printf( "\"%c\"", c ); - else if (code < ' ') - printf( "\"^%c\"", c + '@' ); - else - printf( "%02x", c ); - break; - } - case BIND_FUNCTION: - printf( "[%s]", function_key_desc(code) ); - break; - case BIND_SPECIAL: - unparse_special( code ); - break; - default: - printf( "%02x/%02x", (natural)char_set, (natural)code ); - break; - } - } - } - } - - -//----------------------------------------------------------------------------- -// Unparse a list of scan code bindings. -//----------------------------------------------------------------------------- -static void unparse_key_special( number code ) - { - printf( "{seq#%lu}", code ); - } - -static void unparse_characters( DataStream* s ) - { - number const NOT_BOUND = 0xff; - number const nscans = get_number(s); - number scan; - printf( "CHARACTERS [%lu]\n", nscans ); - for (scan = 0; scan < nscans; scan++) - { - number const mask = get_number(s); - printf( "scan 0x%02x: ", (natural)scan ); - if (mask == NOT_BOUND) - fputs( "not-bound\n", stdout ); - else - { - number const bits = bits_set( mask ); - number const codes = 1 << bits; - printf( "%s ", modifier_mask_desc(mask) ); - unparse_char_codes( s, codes, unparse_key_special ); - putchar( '\n' ); - } - } - putchar( '\n' ); - } - - -//----------------------------------------------------------------------------- -// Unparse a list of key sequences. -//----------------------------------------------------------------------------- -static void unparse_sequence_special( number code ) - { - printf( "{%s}", (code == 0 ? "unmodify" : modifier_code_desc(code)) ); - } - -static void unparse_sequences( DataStream* s ) - { - number const nseqs = get_number(s); - number seq; - printf( "SEQUENCES [%lu]\n", nseqs ); - for (seq = 0; seq < nseqs; seq++) - { - number const nchars = get_number(s); - printf( "sequence %lu:", seq ); - unparse_char_codes( s, nchars, unparse_sequence_special ); - putchar( '\n' ); - } - putchar( '\n' ); - } - - -//----------------------------------------------------------------------------- -// Unparse a list of special keys. -//----------------------------------------------------------------------------- -static void unparse_specials( DataStream* s ) - { - number nspecials = get_number(s); - printf( "SPECIALS [%lu]\n", nspecials ); - while (nspecials-- > 0) - { - number const special = get_number(s); - number const scan = get_number(s); - printf( "%s: 0x%02x\n", special_code_desc(special), (natural)scan ); - } - putchar( '\n' ); - } - - -//----------------------------------------------------------------------------- -// Unparse the number-size flag. -//----------------------------------------------------------------------------- -static void unparse_numeric_size( DataStream* s ) - { - word const numbers_are_shorts = get_word(s); - s->number_size = numbers_are_shorts ? 2 : 1; - } - - -//----------------------------------------------------------------------------- -// Unparse an entire key map. -//----------------------------------------------------------------------------- -static void unparse_keymap_data( DataStream* s ) - { - unparse_numeric_size(s); - unparse_modifiers(s); - unparse_characters(s); - unparse_sequences(s); - unparse_specials(s); - } - - -//----------------------------------------------------------------------------- -// Unparse the active key map. -//----------------------------------------------------------------------------- -#if !defined(DUMPKEYMAP_FILE_ONLY) -static int unparse_active_keymap( void ) - { - int rc = 1; - NXEventHandle const h = NXOpenEventStatus(); - if (h == 0) - fputs( "Unable to open event status driver.\n", stderr ); - else - { - NXKeyMapping km; - km.size = NXKeyMappingLength(h); - if (km.size <= 0) - fprintf( stderr, "Bad key mapping length (%d).\n", km.size ); - else - { - km.mapping = (char*)malloc( km.size ); - if (NXGetKeyMapping( h, &km ) == 0) - fputs( "Unable to get current key mapping.\n", stderr ); - else - { - DataStream* stream = - new_data_stream( (byte const*)km.mapping, km.size ); - fputs( "=============\nACTIVE KEYMAP\n=============\n\n", - stdout); - unparse_keymap_data( stream ); - destroy_data_stream( stream ); - rc = 0; - } - free( km.mapping ); - } - NXCloseEventStatus(h); - } - return rc; - } -#endif - - -//----------------------------------------------------------------------------- -// Unparse one key map from a keymapping file. -//----------------------------------------------------------------------------- -static void unparse_keymap( DataStream* s ) - { - dword const interface = get_dword(s); - dword const handler_id = get_dword(s); - dword const map_size = get_dword(s); - printf( "interface: 0x%02lx\nhandler_id: 0x%02lx\nmap_size: %lu bytes\n\n", - interface, handler_id, map_size ); - unparse_keymap_data(s); - } - - -//----------------------------------------------------------------------------- -// Check the magic number of a keymapping file. -//----------------------------------------------------------------------------- -static int check_magic_number( DataStream* s ) - { - return (get_byte(s) == 'K' && - get_byte(s) == 'Y' && - get_byte(s) == 'M' && - get_byte(s) == '1'); - } - - -//----------------------------------------------------------------------------- -// Unparse all key maps within a keymapping file. -//----------------------------------------------------------------------------- -static int unparse_keymaps( DataStream* s ) - { - int rc = 0; - if (check_magic_number(s)) - { - int n = 1; - while (!end_of_stream(s)) - { - printf( "---------\nKEYMAP #%d\n---------\n", n++ ); - unparse_keymap(s); - } - } - else - { - fputs( "Bad magic number.\n", stderr ); - rc = 1; - } - return rc; - } - - -//----------------------------------------------------------------------------- -// Unparse a keymapping file. -//----------------------------------------------------------------------------- -static int unparse_keymap_file( char const* const path ) - { - int rc = 1; - FILE* file; - printf( "===========\nKEYMAP FILE\n===========\n%s\n\n", path ); - file = fopen( path, "rb" ); - if (file == 0) - perror( "Unable to open key mapping file" ); - else - { - struct stat st; - if (fstat( fileno(file), &st ) != 0) - perror( "Unable to determine key mapping file size" ); - else - { - byte* buffer = (byte*)malloc( st.st_size ); - if (fread( buffer, st.st_size, 1, file ) != 1) - perror( "Unable to read key mapping file" ); - else - { - DataStream* stream = new_data_stream(buffer, (int)st.st_size); - fclose( file ); file = 0; - rc = unparse_keymaps( stream ); - destroy_data_stream( stream ); - } - free( buffer ); - } - if (file != 0) - fclose( file ); - } - return rc; - } - - -//----------------------------------------------------------------------------- -// Handle the case when no documents are mentioned on the command-line. For -// Apple/NeXT platforms, dump the currently active key mapping; else display -// an error message. -//----------------------------------------------------------------------------- -static int handle_empty_document_list( void ) - { -#if !defined(DUMPKEYMAP_FILE_ONLY) - return unparse_active_keymap(); -#else - fputs( "ERROR: Must specify at least one .keymapping file.\n\n", stderr ); - return 1; -#endif - } - - -//----------------------------------------------------------------------------- -// Print a detailed description of the internal layout of a key mapping. -//----------------------------------------------------------------------------- -static void print_internal_layout_info( FILE* f ) - { - fputs( -"What follows is a detailed descriptions of the internal layout of an\n" -"Apple/NeXT .keymapping file.\n" -"\n" -"Types and Data\n" -"--------------\n" -"The following type definitions are employed throughout this discussion:\n" -"\n" -" typedef unsigned char byte;\n" -" typedef unsigned short word;\n" -" typedef unsigned long dword;\n" -"\n" -"Additionally, the type definition `number' is used generically to indicate\n" -"a numeric value. The actual size of the `number' type may be one or two\n" -"bytes depending upon how the data is stored in the key map. Although most\n" -"key maps use byte-sized numeric values, word-sized values are also allowed.\n" -"\n" -"Multi-byte values in a key mapping file are stored in big-endian byte\n" -"order.\n" -"\n" -"Key Mapping File and Device Mapping\n" -"-----------------------------------\n" -"A key mapping file begins with a magic-number and continues with a variable\n" -"number of device-specific key mappings.\n" -"\n" -" struct KeyMappingFile {\n" -" char magic_number[4]; // `KYM1'\n" -" DeviceMapping maps[...]; // Variable number of maps\n" -" };\n" -"\n" -" struct DeviceMapping {\n" -" dword interface; // Interface type\n" -" dword handler_id; // Interface subtype\n" -" dword map_size; // Byte count of `map' (below)\n" -" KeyMapping map;\n" -" };\n" -"\n" -"The value of `interface' represents a family of keyboard device types\n" -"(such as Intel PC, ADB, NeXT, Sun Type5, etc.), and is generally\n" -"specified as one of the constant values NX_EVS_DEVICE_INTERFACE_ADB,\n" -"NX_EVS_DEVICE_INTERFACE_ACE, etc., which are are defined in IOHIDTypes.h on\n" -"MacOS/X and Darwin, and in ev_types.h on MacOS/X Server, OpenStep, and\n" -"NextStep.\n" -"\n" -"The value of `handler_id' represents a specific keyboard layout within the\n" -"much broader `interface' family. For instance, for a 101-key Intel PC\n" -"keyboard (of type NX_EVS_DEVICE_INTERFACE_ACE) the `handler_id' is '0',\n" -"whereas for a 102-key keyboard it is `1'.\n" -"\n" -"Together, `interface' and `handler_id' identify the exact keyboard hardware\n" -"to which this mapping applies. Programs which display a visual\n" -"representation of a keyboard layout, match `interface' and `handler_id'\n" -"from the .keymapping file against the `interface' and `handler_id' values\n" -"found in each .keyboard file.\n" -"\n" -"Key Mapping\n" -"-----------\n" -"A key mapping completely defines the relationship of all scan codes with\n" -"their associated functionality. A KeyMapping structure is embedded within\n" -"the DeviceMapping structure in a KeyMappingFile. The key mapping currently\n" -"in use by the WindowServer and AppKit is also represented by a KeyMapping\n" -"structure, and can be referred to directly by calling NXGetKeyMapping() and\n" -"accessing the `mapping' data member of the returned NXKeyMapping structure.\n" -"\n" -" struct KeyMapping {\n" -" word number_size; // 0=1 byte, non-zero=2 bytes\n" -" number num_modifier_groups; // Modifier groups\n" -" ModifierGroup modifier_groups[...];\n" -" number num_scan_codes; // Scan groups\n" -" ScanGroup scan_table[...];\n" -" number num_sequence_lists; // Sequence lists\n" -" Sequence sequence_lists[...];\n" -" number num_special_keys; // Special keys\n" -" SpecialKey special_key[...];\n" -" };\n" -"\n" -"The `number_size' flag determines the size, in bytes, of all remaining\n" -"numeric values (denoted by the type definition `number') within the key\n" -"mapping. If its value is zero, then numbers are represented by a single\n" -"byte. If it is non-zero, then numbers are represented by a word (two\n" -"bytes).\n" -"\n" -"Modifier Group\n" -"--------------\n" -"A modifier group defines all scan codes which map to a particular type of\n" -"modifier, such as `shift', `control', etc.\n" -"\n" -" enum Modifier {\n" -" ALPHALOCK = 0,\n" -" SHIFT,\n" -" CONTROL,\n" -" ALTERNATE,\n" -" COMMAND,\n" -" KEYPAD,\n" -" HELP\n" -" };\n" -"\n" -" struct ModifierGroup {\n" -" number modifier; // A Modifier constant\n" -" number num_scan_codes;\n" -" number scan_codes[...]; // Variable number of scan codes\n" -" };\n" -"\n" -"The scan_codes[] array contains a list of all scan codes which map to the\n" -"specified modifier. The `shift', `command', and `alternate' modifiers are\n" -"frequently mapped to two different scan codes, apiece, since these\n" -"modifiers often appear on both the left and right sides of the keyboard.\n" -"\n" -"Scan Group\n" -"----------\n" -"There is one ScanGroup for each scan code generated by the given keyboard.\n" -"This number is given by KeyMapping::num_scan_codes. The first scan group\n" -"represents hardware scan code 0, the second represents scan code 1, etc.\n" -"\n" -" enum ModifierMask {\n" -" ALPHALOCK_MASK = 1 << 0,\n" -" SHIFT_MASK = 1 << 1,\n" -" CONTROL_MASK = 1 << 2,\n" -" ALTERNATE_MASK = 1 << 3,\n" -" CARRIAGE_RETURN_MASK = 1 << 4\n" -" };\n" -" #define NOT_BOUND 0xff\n" -"\n" -" struct ScanGroup {\n" -" number mask;\n" -" Character characters[...];\n" -" };\n" -"\n" -"For each scan code, `mask' defines which modifier combinations generate\n" -"characters. If `mask' is NOT_BOUND (0xff) then then this scan code does\n" -"not generate any characters ever, and its characters[] array is zero\n" -"length. Otherwise, the characters[] array contains one Character record\n" -"for each modifier combination.\n" -"\n" -"The number of records in characters[] is determined by computing (1 <<\n" -"bits_set_in_mask). In other words, if mask is zero, then zero bits are\n" -"set, so characters[] contains only one record. If `mask' is (SHIFT_MASK |\n" -"CONTROL_MASK), then two bits are set, so characters[] contains four\n" -"records.\n" -"\n" -"The first record always represents the character which is generated by that\n" -"key when no modifiers are active. The remaining records represent\n" -"characters generated by the various modifier combinations. Using the\n" -"example with the `shift' and `control' masks set, record two would\n" -"represent the character with the `shift' modifier active; record three, the\n" -"`control' modifier active; and record four, both the `shift' and `control'\n" -"modifiers active.\n" -"\n" -"As a special case, ALPHALOCK_MASK implies SHIFT_MASK, though only\n" -"ALPHALOCK_MASK appears in `mask'. In this case the same character is\n" -"generated for both the `shift' and `alpha-lock' modifiers, but only needs\n" -"to appear once in the characters[] array.\n" -"\n" -"CARRIAGE_RETURN_MASK does not actually refer to a modifier key. Instead,\n" -"it is used to distinguish the scan code which is given the special\n" -"pseudo-designation of `carriage return' key. Typically, this mask appears\n" -"solo in a ScanGroup record and only the two Character records for control-M\n" -"and control-C follow. This flag may be a throwback to an earlier time or\n" -"may be specially interpreted by the low-level keyboard driver, but its\n" -"purpose is otherwise enigmatic.\n" -"Character\n" -"---------\n" -"Each Character record indicates the character generated when this key is\n" -"pressed, as well as the character set which contains the character. Well\n" -"known character sets are `ASCII' and `Symbol'. The character set can also\n" -"be one of the meta values FUNCTION_KEY or KEY_SEQUENCE. If it is\n" -"FUNCTION_KEY then `char_code' represents a generally well-known function\n" -"key such as those enumerated by FunctionKey. If the character set is\n" -"KEY_SEQUENCE then `char_code' represents a zero-base index into\n" -"KeyMapping::sequence_lists[].\n" -"\n" -" enum CharacterSet {\n" -" ASCII = 0x00,\n" -" SYMBOL = 0x01,\n" -" ...\n" -" FUNCTION_KEY = 0xfe,\n" -" KEY_SEQUENCE = 0xff\n" -" };\n" -"\n" -" struct Character {\n" -" number set; // CharacterSet of generated character\n" -" number char_code; // Actual character generated\n" -" };\n" -"\n" -" enum FunctionKey {\n" -" F1 = 0x20, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,\n" -" INSERT, DELETE, HOME, END, PAGE_UP, PAGE_DOWN, PRINT_SCREEN,\n" -" SCROLL_LOCK, PAUSE, SYS_REQUEST, BREAK, RESET, STOP, MENU, USER,\n" -" SYSTEM, PRINT, CLEAR_LINE, CLEAR_DISPLAY, INSERT_LINE,\n" -" DELETE_LINE, INSERT_CHAR, DELETE_CHAR, PREV, NEXT, SELECT\n" -" };\n" -"\n" -"Sequence\n" -"--------\n" -"When Character::set contains the meta value KEY_SEQUENCE, the scan code is\n" -"bound to a sequence of keys rather than a single character. A sequence is\n" -"a series of modifiers and characters which are automatically generated when\n" -"the associated key is depressed.\n" -"\n" -" #define MODIFIER_KEY 0xff\n" -"\n" -" struct Sequence {\n" -" number num_chars;\n" -" Character characters[...];\n" -" };\n" -"\n" -"Each generated Character is represented as previously described, with the\n" -"exception that MODIFIER_KEY may appear in place of KEY_SEQUENCE. When the\n" -"value of Character::set is MODIFIER_KEY then Character::char_code\n" -"represents a modifier key rather than an actual character. If the modifier\n" -"represented by `char_code' is non-zero, then it indicates that the\n" -"associated modifier key has been depressed. In this case, the value is one\n" -"of the constants enumerated by Modifier (SHIFT, CONTROL, ALTERNATE, etc.).\n" -"If the value is zero then it means that the modifier keys have been\n" -"released.\n" -"\n" -"Special Key\n" -"-----------\n" -"A special key is one which is scanned directly by the Mach kernel rather\n" -"than by the WindowServer. In general, events are not generated for special\n" -"keys.\n" -"\n" -" enum SpecialKeyType {\n" -" VOLUME_UP = 0,\n" -" VOLUME_DOWN,\n" -" BRIGHTNESS_UP,\n" -" BRIGHTNESS_DOWN,\n" -" ALPHA_LOCK,\n" -" HELP,\n" -" POWER,\n" -" SECONDARY_ARROW_UP,\n" -" SECONDARY_ARROW_DOWN\n" -" };\n" -"\n" -" struct SpecialKey {\n" -" number type; // A SpecialKeyType constant\n" -" number scan_code; // Actual scan code\n" -" };\n" -"\n", f ); - } - - -//----------------------------------------------------------------------------- -// Print an explanation of the output generated by this program. -//----------------------------------------------------------------------------- -static void print_output_info( FILE* f ) - { - fputs( -"What follows is an explanation and description of the various pieces of\n" -"information emitted by dumpkeymap.\n" -"\n" -"For a more thorough discussion of any particular piece of information\n" -"described here, refer to the detailed description of the internal layout of\n" -"a key mapping given by the --help-layout option.\n" -"\n" -"Conventions\n" -"-----------\n" -"Depending upon context, some numeric values are displayed in decimal\n" -"notation, whereas others are displayed in hexadecimal notation.\n" -"Hexadecimal numbers are denoted by a `0x' prefix (for instance, `0x7b'),\n" -"except when explicitly noted otherwise.\n" -"\n" -"Key Mapping Source\n" -"------------------\n" -"The first piece of information presented about a particular key mapping is\n" -"the source from which the data was gleaned. For a .keymapping file, the\n" -"title `KEYMAP FILE' is emitted along with the path and name of the file in\n" -"question. For the key mapping currently in use by the WindowServer and\n" -"AppKit, the title `ACTIVE KEYMAP' is emitted instead.\n" -"\n" -"Device Information\n" -"------------------\n" -"Each .keymapping file may contain one or more raw key mappings. For\n" -"example, a file which maps keys to a Dvorak-style layout might contain raw\n" -"mappings for Intel PC, ADB, NeXT, and Sun Type5 keyboards.\n" -"\n" -"For each raw mapping, the following information is emitted:\n" -"\n" -" o The title `KEYMAP' along with the mapping's relative position in the\n" -" .keymapping file.\n" -" o The `interface' identifier.\n" -" o The `handler_id' sub-identifier.\n" -" o The size of the raw mapping resource counted in bytes.\n" -"\n" -"The `interface' and `handler_id' values, taken together, define a specific\n" -"keyboard device. A .keyboard file, which describes the visual layout of a\n" -"keyboard, also contains `interface' and `handler_id' identifiers. The\n" -".keyboard file corresponding to a particular key mapping can be found by\n" -"matching the `interface' and `handler_id' values from each resource.\n" -"\n" -"Modifiers\n" -"---------\n" -"Each mapping may contain zero or more modifier records which associate\n" -"hardware scan codes with modifier descriptions such as `shift', `control',\n" -"`alternate', etc. The title `MODIFIERS' is printed along with the count of\n" -"modifier records which follow. For each modifier record, the modifier's\n" -"name is printed along with a list of scan codes, in hexadecimal format,\n" -"which generate that modifier value. For example:\n" -"\n" -" MODIFIERS [4]\n" -" alternate: 0x1d 0x60\n" -" control: 0x3a\n" -" keypad: 0x52 0x53 ... 0x63 0x62\n" -" shift: 0x2a 0x36\n" -"\n" -"Characters\n" -"----------\n" -"Each mapping may contain zero or more character records which associate\n" -"hardware scan codes with the actual characters generated by those scan\n" -"codes in the presence or absence of various modifier combinations. The\n" -"title `CHARACTERS' is printed along with the count of character records\n" -"which follow. Here is a highly abbreviated example:\n" -"\n" -" CHARACTERS [9]\n" -" scan 0x00: -AC-L \"a\" \"A\" \"^A\" \"^A\" ca c7 \"^A\" \"^A\"\n" -" scan 0x07: -AC-L \"x\" \"X\" \"^X\" \"^X\" 01/b4 01/ce \"^X\" \"^X\"\n" -" scan 0x0a: ---S- \"<\" \">\"\n" -" scan 0x13: -ACS- \"2\" \"@\" \"^@\" \"^@\" b2 b3 \"^@\" \"^@\"\n" -" scan 0x24: R---- \"^M\" \"^C\"\n" -" scan 0x3e: ----- [F4]\n" -" scan 0x4a: ----- [page up]\n" -" scan 0x60: ----- {seq#3}\n" -" scan 0x68: not-bound\n" -"\n" -"For each record, the hexadecimal value of the hardware scan code is\n" -"printed, followed by a list of modifier flag combinations and the actual\n" -"characters generated by this scan code with and without modifiers applied.\n" -"\n" -"The modifier flags field is composed of a combination of single letter\n" -"representations of the various modifier types. The letters stand for:\n" -"\n" -" L - alpha-lock\n" -" S - shift\n" -" C - control\n" -" A - alternate\n" -" R - carriage-return\n" -"\n" -"As a special case, the `alpha-lock' flag also implies the `shift' flag, so\n" -"these two flags never appear together in the same record.\n" -"\n" -"The combination of modifier flags determines the meaning and number of\n" -"fields which follow. The first field after the modifier flags always\n" -"represents the character that will be generated if no modifier keys are\n" -"depressed. The remaining fields represent characters generated by the\n" -"various modifier combinations. The order of the fields follows this\n" -"general pattern:\n" -"\n" -" o The character generated by this scan code when no modifiers are in\n" -" effect is listed first.\n" -"\n" -" o If the `L' or `S' flag is active, then the shifted character\n" -" generated by this scan code is listed next.\n" -"\n" -" o If the `C' flag is active, then the control-character generated by\n" -" this scan code is listed next. Furthermore, if the `L' or `S' flag\n" -" is also active, then the shifted control-character is listed after\n" -" that.\n" -"\n" -" o If the `A' flag is active, then the alternate-character generated by\n" -" this scan code is listed next. Furthermore, if the `L' or `S' flag\n" -" is active, then the shifted alternate-character is listed after that.\n" -" If the `C' flag is also active, then the alternate-control-character\n" -" is listed next. Finally, if the `C' and `L' or `C' and `S' flags are\n" -" also active, then the shifted alternate-control-character is listed.\n" -"\n" -"The `R' flag does not actually refer to a modifier key. Instead, it is\n" -"used to distinguish the scan code which is given the special\n" -"pseudo-designation of `carriage return' key. Typically, this mask appears\n" -"solo and only the two fields for control-M and control-C follow. This flag\n" -"may be a throwback to an earlier time or may be specially interpreted by\n" -"the low-level keyboard driver, but its purpose is otherwise enigmatic.\n" -"\n" -"Recalling the example from above, the following fields can be identified:\n" -"\n" -" scan 0x00: -AC-L \"a\" \"A\" \"^A\" \"^A\" ca c7 \"^A\" \"^A\"\n" -"\n" -" o Lower-case `a' is generated when no modifiers are active.\n" -" o Upper-case `A' is generated when `shift' or `alpha-lock' are active.\n" -" o Control-A is generated when `control' is active.\n" -" o Control-A is generated when `control' and `shift' are active.\n" -" o The character represented by the hexadecimal code 0xca is generated\n" -" when `alternate' is active.\n" -" o The character represented by 0xc7 is generated when `alternate' and\n" -" `shift' (or `alpha-lock') are active.\n" -" o Control-A is generated when `alternate' and `control' are active.\n" -" o Control-A is generated when `alternate', `control' and `shift' (or\n" -" `alpha-lock') are active.\n" -"\n" -"The notation used to represent a particular generated character varies.\n" -"\n" -" o Printable ASCII characters are quoted, as in \"x\" or \"X\".\n" -"\n" -" o Control-characters are quoted and prefixed with `^', as in \"^X\".\n" -"\n" -" o Characters with values greater than 127 (0x7f) are displayed as\n" -" hexadecimal values without the `0x' prefix.\n" -"\n" -" o Characters in a non-ASCII character set (such as `Symbol') are\n" -" displayed as two hexadecimal numbers separated by a slash, as in\n" -" `01/4a'. The first number is the character set's identification code\n" -" (such as `01' for the `Symbol' set), and the second number is the\n" -" value of the generated character.\n" -"\n" -" o Non-printing special function characters are displayed with the\n" -" function's common name enclosed in brackets, as in `[page up]' or\n" -" `[F4]'.\n" -"\n" -" o If the binding represents a key sequence rather than a single\n" -" character, then the sequence's identification number is enclosed in\n" -" braces, as in `{seq#3}'.\n" -"\n" -"Recalling a few examples from above, the following interpretations can be\n" -"made:\n" -"\n" -" scan 0x07: -AC-L \"x\" \"X\" \"^X\" \"^X\" 01/b4 01/ce \"^X\" \"^X\"\n" -" scan 0x3e: ----- [F4]\n" -" scan 0x4a: ----- [page up]\n" -" scan 0x60: ----- {seq#3}\n" -"\n" -" o \"x\" and \"X\" are printable ASCII characters.\n" -" o \"^X\" is a control-character.\n" -" o `01/b4' and `01/ce' represent the character codes 0xb4 and 0xce in\n" -" the `Symbol' character set.\n" -" o Scan code 0x3e generates function-key `F4', and scan code 0x4a\n" -" generates function-key `page up'.\n" -" o Scan code 0x60 is bound to key sequence #3.\n" -"\n" -"Finally, if a scan code is not bound to any characters, then it is\n" -"annotated with the label `not-bound', as with example scan code 0x68 from\n" -"above.\n" -"\n" -"Sequences\n" -"---------\n" -"A scan code (modified and unmodified) can be bound to a key sequence rather\n" -"than generating a single character or acting as a modifier. When it is\n" -"bound to a key sequence, a series of character invocations and modifier\n" -"actions are automatically generated rather than a single keystroke.\n" -"\n" -"Each mapping may contain zero or more key sequence records. The title\n" -"`SEQUENCES' is printed along with the count of sequence records which\n" -"follow. For example:\n" -"\n" -" SEQUENCES [3]\n" -" sequence 0: \"f\" \"o\" \"o\"\n" -" sequence 1: {alternate} \"b\" \"a\" \"r\" {unmodify}\n" -" sequence 2: [home] \"b\" \"a\" \"z\"\n" -"\n" -"The notation used to represent the sequence of generated characters is\n" -"identical to the notation already described in the `Characters' section\n" -"above, with the exception that modifier actions may be interposed between\n" -"generated characters. Such modifier actions are represented by the\n" -"modifier's name enclosed in braces. The special name `{unmodify}'\n" -"indicates the release of the modifier keys.\n" -"\n" -"Thus, the sequences in the above example can be interpreted as follows:\n" -"\n" -" o Sequence #0 generates `foo'.\n" -" o Sequence #1 invokes the `alternate' modifier, generates `bar', and\n" -" then releases `alternate'.\n" -" o Sequence #2 invokes the `home' key and then generates `baz'. In a\n" -" text editor, this would probably result in `baz' being prepended to\n" -" the line of text on which the cursor resides.\n" -"\n" -"Special Keys\n" -"------------\n" -"Certain keyboards feature keys which perform some type of special purpose\n" -"function rather than generating a character or acting as a modifier. For\n" -"instance, Apple keyboards often contain a `power' key, and NeXT keyboards\n" -"have historically featured screen brightness and volume control keys.\n" -"\n" -"Each mapping may contain zero or more special-key records which associate\n" -"hardware scan codes with such special purpose functions. The title\n" -"`SPECIALS' is printed along with the count of records which follow. For\n" -"each record, the special function's name is printed along with a list of\n" -"scan codes, in hexadecimal format, which are bound to that function. For\n" -"example:\n" -"\n" -" SPECIALS [6]\n" -" alpha-lock: 0x39\n" -" brightness-down: 0x79\n" -" brightness-up: 0x74\n" -" power: 0x7f\n" -" sound-down: 0x77\n" -" sound-up: 0x73\n" -"\n", f ); - } - - -//----------------------------------------------------------------------------- -// Print a summary of the various files and directories which are related to -// key mappings. -//----------------------------------------------------------------------------- -static void print_files_info( FILE* f ) - { - fputs( -"This is a summary of the various files and directories which are related to\n" -"key mappings.\n" -"\n" -"*.keymapping\n" -" A key mapping file which precisely defines the relationship of all\n" -" hardware-specific keyboard scan-codes with their associated\n" -" functionality.\n" -"\n" -"*.keyboard\n" -" A file describing the physical layout of keys on a particular type of\n" -" keyboard. Each `key' token in this file defines the position and shape\n" -" of the key on the keyboard, as well as the associated scan code which\n" -" that key generates. A .keymapping file, on the other hand, defines the\n" -" characters which are generated by a particular scan code depending upon\n" -" the state of the various modifier keys (such as shift, control, etc.).\n" -" The `interface' and `handler_id' values from a .keymapping file are\n" -" matched against those in each .keyboard file in order to associate a\n" -" particular .keyboard file with a key mapping. Various GUI programs use\n" -" the .keyboard file to display a visual representation of a keyboard for\n" -" the user. Since these files are just plain text, they can be easily\n" -" viewed and interpreted without the aid of a specialized program, thus\n" -" dumpkeymap leaves these files alone.\n" -"\n" -"/System/Library/Keyboards\n" -"/Network/Library/Keyboards\n" -"/Local/Library/Keyboards\n" -"/Library/Keyboards\n" -" Repositories for .keymapping and .keyboard files for MacOS/X, Darwin,\n" -" and MacOS/X Server.\n" -"\n" -"/NextLibrary/Keyboards\n" -"/LocalLibrary/Keyboards\n" -" Repositories for .keymapping and .keyboard files for OpenStep and\n" -" NextStep.\n" -"\n" -"$(HOME)/Library/Keyboards\n" -" Repository for personal .keymapping and .keyboard files.\n" -"\n", f ); - } - - -//----------------------------------------------------------------------------- -// Print a list of the various diagnostic messages which may be emitted. -//----------------------------------------------------------------------------- -static void print_diagnostics_info( FILE* f ) - { - fputs( -"The following diagnostic messages may be issued to the standard error\n" -"stream.\n" -"\n" -"Unrecognized option.\n" -" An unrecognized option was specified on the command-line. Invoke\n" -" dumpkeymap with the --help option to view a list of valid options.\n" -"\n" -"Insufficient data in keymapping data stream.\n" -" The key mapping file or data stream is corrupt. Either the file has\n" -" been incorrectly truncated or a field, such as those which indicates\n" -" the number of variable records which follow, contains a corrupt value.\n" -"\n" -"The following diagnostic messages have significance only when trying to\n" -"print .keymapping files mentioned on the command-line.\n" -"\n" -"Bad magic number.\n" -" The mentioned file is not a .keymapping file. The file's content does\n" -" not start with the string `KYM1'.\n" -"\n" -"Unable to open key mapping file.\n" -" The call to fopen() failed; probably because the specified path is\n" -" invalid or dumpkeymap does not have permission to read the file.\n" -"\n" -"Unable to determine key mapping file size.\n" -" The call to fstat() failed, thus memory can not be allocated for\n" -" loading the file.\n" -"\n" -"Unable to read key mapping file.\n" -" The call to fread() failed.\n" -"\n" -"The following diagnostic messages have significance only when trying to\n" -"print the currently active key mapping when no .keymapping files have been\n" -"mentioned on the command-line.\n" -"\n" -"Unable to open event status driver.\n" -" The call to NXOpenEventStatus() failed.\n" -"\n" -"Bad key mapping length.\n" -" The call to NXKeyMappingLength() returned a bogus value.\n" -"\n" -"Unable to get current key mapping.\n" -" The call to NXGetKeyMapping() failed.\n" -"\n" -"The following diagnostic messages have significance only when using\n" -"dumpkeymap on a non-Apple/NeXT platform.\n" -"\n" -"Must specify at least one .keymapping file.\n" -" No .keymapping files were mentioned on the command-line. On\n" -" non-Apple/NeXT platforms, there is no concept of a currently active\n" -" .keymapping file, so at least one file must be mentioned on the\n" -" command-line.\n" -"\n", f ); - } - - -//----------------------------------------------------------------------------- -// Print warranty. -//----------------------------------------------------------------------------- -static void print_warranty( FILE* f ) - { - fputs( -"This software is provided by the author `AS IS' and any express or implied\n" -"WARRANTIES, including, but not limited to, the implied warranties of\n" -"MERCHANTABILITY and FITNESS FOR A PARTICULAR PURPOSE are DISCLAIMED. In NO\n" -"EVENT shall the author be LIABLE for any DIRECT, INDIRECT, INCIDENTAL,\n" -"SPECIAL, EXEMPLARY, or CONSEQUENTIAL damages (including, but not limited\n" -"to, procurement of substitute goods or services; loss of use, data, or\n" -"profits; or business interruption) however caused and on any theory of\n" -"liability, whether in contract, strict liability, or tort (including\n" -"negligence or otherwise) arising in any way out of the use of this\n" -"software, even if advised of the possibility of such damage.\n" -"\n", f ); - } - - -//----------------------------------------------------------------------------- -// Print this program's version number. -//----------------------------------------------------------------------------- -static void print_version( FILE* f ) - { - fputs( "Version " PROG_VERSION " (built " __DATE__ ")\n\n", f ); - } - - -//----------------------------------------------------------------------------- -// Print a usage summary. -//----------------------------------------------------------------------------- -static void print_usage( FILE* f ) - { - fputs( -"Usage: dumpkeymap [options] [-] [file ...]\n" -"\n" -"Prints a textual representation of each Apple/NeXT .keymapping file\n" -"mentioned on the command-line. If no files are mentioned and if the local\n" -"machine is an Apple or NeXT installation, then the key mapping currently in\n" -"use by the WindowServer and the AppKit is printed instead.\n" -"\n" -"Options:\n" -" -h --help\n" -" Display general program instructions and option summary.\n" -"\n" -" -k --help-keymapping\n" -" Display a detailed description of the internal layout of a\n" -" .keymapping file.\n" -"\n" -" -o --help-output\n" -" Display an explanation of the output generated by dumpkeymap when\n" -" dissecting a .keymapping file.\n" -"\n" -" -f --help-files\n" -" Display a summary of the various files and directories which are\n" -" related to key mappings.\n" -"\n" -" -d --help-diagnostics\n" -" Display a list of the various diagnostic messages which may be\n" -" emitted by dumpkeymap.\n" -"\n" -" -v --version\n" -" Display the dumpkeymap version number and warranty information.\n" -"\n" -" - --\n" -" Inhibit processing of options at this point in the argument list.\n" -" An occurrence of `-' or `--' in the argument list causes all\n" -" following arguments to be treated as file names even if an argument\n" -" begins with a `-' character.\n" -"\n", f ); - } - - -//----------------------------------------------------------------------------- -// Print an informational banner. -//----------------------------------------------------------------------------- -static void print_banner( FILE* f ) - { - fputs( "\n" PROG_NAME " v" PROG_VERSION " by " AUTHOR_INFO "\n" - COPYRIGHT "\n\n", f ); - } - - -//----------------------------------------------------------------------------- -// Process command-line arguments. Examine options first; collecting files -// along the way. If all is well, process collected file list. -//----------------------------------------------------------------------------- -int main( int const argc, char const* const argv[] ) - { - int rc = 0, i, nfiles = 0, more_options = 1, process_files = 1; - int* files = (int*)calloc( argc - 1, sizeof(int) ); - print_banner( stdout ); - - for (i = 1; i < argc; i++) - { - char const* const s = argv[i]; - if (!more_options || *s != '-') - files[ nfiles++ ] = i; - else - { - OPT_SWITCH(s) - OPT_CASE(-,--) - more_options = 0; - OPT_CASE(-h,--help) - print_usage( stdout ); - process_files = 0; - OPT_CASE(-k,--help-keymapping) - print_internal_layout_info( stdout ); - process_files = 0; - OPT_CASE(-o,--help-output) - print_output_info( stdout ); - process_files = 0; - OPT_CASE(-f,--help-files) - print_files_info( stdout ); - process_files = 0; - OPT_CASE(-d,--help-diagnostics) - print_diagnostics_info( stdout ); - process_files = 0; - OPT_CASE(-v,--version) - print_version( stdout ); - print_warranty( stdout ); - process_files = 0; - OPT_DEFAULT - fprintf( stderr, "ERROR: Unrecognized option: %s\n\n", s ); - process_files = 0; - rc = 1; - OPT_SWITCH_END - } - } - - if (process_files) - { - if (nfiles == 0) - rc = handle_empty_document_list(); - else - for (i = 0; i < nfiles; i++) - rc |= unparse_keymap_file( argv[files[i]] ); - } - - free( files ); - return rc; - } diff --git a/synfig-osx/trunk/launcher/utils/dumpkeymap.man b/synfig-osx/trunk/launcher/utils/dumpkeymap.man deleted file mode 100644 index 2ad6d54..0000000 --- a/synfig-osx/trunk/launcher/utils/dumpkeymap.man +++ /dev/null @@ -1,1004 +0,0 @@ -.ig -//============================================================================= -// -// Manual page for `dumpkeymap'. -// -// Copyright (C) 1999,2000 by Eric Sunshine -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// 3. The name of the author may not be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -//============================================================================= -// -// $XFree86: xc/programs/Xserver/hw/darwin/utils/dumpkeymap.man,v 1.2 2000/12/05 21:18:34 dawes Exp $ -// -.. -.ig -//----------------------------------------------------------------------------- -// Local identification information. -//----------------------------------------------------------------------------- -.. -.nr VE 4 \" Version number -.TH DUMPKEYMAP 1 "v\n(VE \-\- 1 December 2000" "Version \n(VE" -.de UP -1 December 2000 -.. -.ig -//----------------------------------------------------------------------------- -// Annotation Macros -// ----------------- -// Facilitate creation of annotated, non-filled blocks of text. An -// annotated block is initiated with the `AS' macro. Each annotated, -// non-filled line within the block must be introduced with the `AN' macro -// which takes three arguments. The first argument is the detail text to -// be annotated. The second is a string of spaces used to align the -// annotations by certain (broken) roff interpreters which fail to -// implement the proper set of roff commands (such as diversions, -// indentation, and tab stops). It is assumed that the spaces will be -// used with fixed-point font. The third argument is the annotation -// itself. The block should be terminated with the `AE' macro. For all -// roff interpreters which properly implement diversions, indentation, and -// tab stops, all anotations within the block are automatically aligned at -// the same horizontal position. This position is guaranteed to be just -// to the right of the widest `AN' detail line. For broken roff -// interpreters, such as `rman', the string of spaces from the second -// argument are used to align the annotations. Finally, the `AZ' macro, -// which takes a single argument, can be used to to insert a non-annotated -// line into the block which does not play a part in the calculation of -// the horizontal annotation alignment. -// -// Implementation Notes -// -------------------- -// *1* These macros utilize a diversion (named `AD'). Since the prevailing -// indentation is stored along with the diverted text, we must muck with -// the indentation level in order to prevent the indentation from being -// applied to the text a second time when `AD' is finally emitted. -// -// *2* Unfortunately, `.if' strips leading whitespace from following text, so -// `AN' uses \& to preserve the whitespace. -// -// *3* This manual page has been tested for proper formatting with troff, -// groff, nroff and rman (the `man' to `HTML' converter). Unfortunately, -// rman fails to implement many useful features such as diversions, -// indentation, and tab stops, and is also hideously buggy. Furthermore -// it identifies itself as nroff and fails to provide any further -// identification, so there is no way to create macros which specifically -// work around its limitations. Following is a list of several bugs in -// rman which the implementation of these macros must avoid: -// o Fails with multi-line conditionals within macros. -// o Fails on macro definition within multi-line conditionals. -// o Fails when macro arguments are not delimited by exactly 1 space. -// o String definition `.ds' ignores the value; uses empty "" instead. -// As a consequence of these problems, the following macros are written -// using a series of ugly single-line `.if' conditionals rather than the -// more natural multi-line `.if' and `.ie' conditionals. Also, rman fails -// to understand the common idiom of `.\"' to introduce a comment, which -// is why all comments in this file are wrapped in ignore `.ig' blocks. -//----------------------------------------------------------------------------- -.. -.de AS -.if t .nr AW 0 -.if t .nr AI \\n(.i -.if t .in -\\n(AI -.nf -.. -.de AN -.if t .if \w'\\$1'>\\n(AW .nr AW \w'\\$1' -.if t .da AD -.if t \\&\\$1\\t\\$3 -.if t .da -.if n \\&\\$1 \\$2\\$3 -.. -.de AZ -.if t .da AD -\\$1 -.if t .da -.. -.de AE -.if t .in +\\n(AIu -.if t .if \\n(AW .ta \\n(AWu+\w'\\(em'u -.if t .AD -.if t .DT -.if t .rm AD -.if t .rm AW -.fi -.. -.ig -//----------------------------------------------------------------------------- -// Bulleted list macros -- `BG' begins a bulleted list; `BU' delimits -// bulleted entries; `BE' ends a bulleted list. -//----------------------------------------------------------------------------- -.. -.de BG -.PP -.RS -.. -.de BU -.HP -\\(bu\\ \\c -.. -.de BE -.RE -.PP -.. -.ig -//----------------------------------------------------------------------------- -// Indented paragraph with stylized hanging tag macro. `TG' takes a single -// argument and treats it as the hanging tag of the indented paragraph. -// The tag is italicized in troff but not in nroff. -//----------------------------------------------------------------------------- -.. -.de TG -.TP -.ie t .I "\\$1" -.el \\$1 -.. -.ig -//----------------------------------------------------------------------------- -// Manual page for `dumpkeymap'. -//----------------------------------------------------------------------------- -.. -.SH NAME -dumpkeymap \- Dianostic dump of a .keymapping file -.SH SYNOPSIS -.B dumpkeymap -.RI [ options "] [-] [" file "...]" -.SH DESCRIPTION -.I dumpkeymap -prints a textual representation of each Apple/\c -.SM NeXT -.I .keymapping -file mentioned on the command-line. If no files are mentioned and if the -local machine is an Apple or -.SM NeXT -installation, then the key mapping currently in use by the WindowServer and the -AppKit is printed instead. -.SH OPTIONS -.TP -.B "\-h \-\^\-help" -Display general program instructions and option summary. -.TP -.B "\-k \-\^\-help\-keymapping" -Display a detailed description of the internal layout of a -.I .keymapping -file. This is the same information as that presented in the -.I "Key Mapping Description" -section of this document. -.TP -.B "\-o \-\^\-help\-output" -Display an explanation of the output generated by -.I dumpkeymap -when dissecting a -.I .keymapping -file. This is the same information as that presented in the -.I "Output Description" -section of this document. -.TP -.B "\-f \-\^\-help\-files" -Display a summary of the various files and directories which are related to -key mappings. This is the same information as that presented in the -.I "Files" -section of this document. -.TP -.B "\-d \-\^\-help\-diagnostics" -Display a list of the various diagnostic messages which may be emitted by -.I dumpkeymap. -This is the same information as that presented in the -.I "Diagnostics" -section of this document. -.TP -.B "\-v \-\^\-version" -Display the -.I dumpkeymap -version number and warranty information. -.TP -.B "\- \-\^\-" -Inhibit processing of options at this point in the argument list. An -occurrence of `\-' or `\-\^\-' in the argument list causes all following -arguments to be treated as file names even if an argument begins with a `\-' -character. -.SH "KEY MAPPING DESCRIPTION" -The following sections describe, in complete detail, the format of a raw key -mapping resource, as well as the format of the -.I .keymapping -file which encapsulates one or more raw mappings. -.SH "Types and Data" -The following type definitions are employed throughout this discussion: -.PP -.RS -.AS -.AZ "typedef unsigned char byte;" -.AZ "typedef unsigned short word;" -.AZ "typedef unsigned long dword;" -.AE -.RE -.PP -Additionally, the type definition -.RI ` number ' -is used generically to -indicate a numeric value. The actual size of the -.RI ` number ' -type may be one or two bytes depending upon how the data is stored in the key -map. Although most key maps use byte-sized numeric values, word-sized values -are also allowed. -.PP -Multi-byte values in a key mapping file are stored in big-endian byte order. -.SH "Key Mapping File and Device Mapping" -A key mapping file begins with a magic-number and continues with a -variable number of device-specific key mappings. -.PP -.RS -.AS -.AZ "struct KeyMappingFile {" -.AN " char magic_number[4];" " " "// `KYM1'" -.AN " DeviceMapping maps[...];" "" "// Variable number of maps" -.AZ }; -.AE -.PP -.AS -.AZ "struct DeviceMapping {" -.AN " dword interface;" " " "// Interface type" -.AN " dword handler_id;" "" "// Interface subtype" -.AN " dword map_size;" " " "// Byte count of `map' (below)" -.AN " KeyMapping map;" -.AZ }; -.AE -.RE -.PP -The value of `interface' represents a family of keyboard device types -(such as Intel -.SM "PC, ADB, NeXT," -Sun Type5, etc.), and is generally specified as one of the constant values -.SM "NX_EVS_DEVICE_INTERFACE_ADB, NX_EVS_DEVICE_INTERFACE_ACE," -etc., which are are defined in IOHIDTypes.h on MacOS/X and Darwin, and in -ev_types.h on MacOS/X Server, OpenStep, and NextStep. -.PP -The value of `handler_id' represents a specific keyboard layout within the -much broader `interface' family. For instance, for a 101-key Intel -.SM PC -keyboard (of type -.SM NX_EVS_DEVICE_INTERFACE_ACE\c -) the `handler_id' is '0', whereas for a 102-key keyboard it is `1'. -.PP -Together, `interface' and `handler_id' identify the exact keyboard hardware to -which this mapping applies. Programs which display a visual representation of -a keyboard layout, match `interface' and `handler_id' from the -.I .keymapping -file against the `interface' and `handler_id' values found in each -.I .keyboard -file. -.SH "Key Mapping" -A key mapping completely defines the relationship of all scan codes with their -associated functionality. A -.I KeyMapping -structure is embedded within the -.I DeviceMapping -structure in a -.IR KeyMappingFile . -The key mapping currently in use by the WindowServer and AppKit is also -represented by a -.I KeyMapping -structure, and can be referred to directly by calling NXGetKeyMapping() and -accessing the `mapping' data member of the returned -.I NXKeyMapping -structure. -.PP -.RS -.AS -.AZ "struct KeyMapping {" -.AN " word number_size;" " " "// 0=1 byte, non-zero=2 bytes" -.AN " number num_modifier_groups;" "" "// Modifier groups" -.AZ " ModifierGroup modifier_groups[...];" -.AN " number num_scan_codes;" " " "// Scan groups" -.AN " ScanGroup scan_table[...];" -.AN " number num_sequence_lists;" " " "// Sequence lists" -.AN " Sequence sequence_lists[...];" -.AN " number num_special_keys;" " " "// Special keys" -.AN " SpecialKey special_key[...];" -.AZ }; -.AE -.RE -.PP -The `number_size' flag determines the size, in bytes, of all remaining numeric -values (denoted by the type definition -.RI ` number ') -within the -key mapping. If its value is zero, then numbers are represented by a single -byte. If it is non-zero, then numbers are represented by a word (two bytes). -.SH "Modifier Group" -A modifier group defines all scan codes which map to a particular type of -modifier, such as -.IR shift , -.IR control , -etc. -.PP -.RS -.AS -.AZ "enum Modifier {" -.AZ " ALPHALOCK = 0," -.AZ " SHIFT," -.AZ " CONTROL," -.AZ " ALTERNATE," -.AZ " COMMAND," -.AZ " KEYPAD," -.AZ " HELP" -.AZ }; -.AE -.PP -.AS -.AZ "struct ModifierGroup {" -.AN " number modifier;" " " "// A Modifier constant" -.AN " number num_scan_codes;" -.AN " number scan_codes[...];" "" "// Variable number of scan codes" -.AZ }; -.AE -.RE -.PP -The scan_codes[] array contains a list of all scan codes which map to the -specified modifier. The -.IR shift ", " command ", and " alternate -modifiers are frequently mapped to two different scan codes, apiece, -since these modifiers often appear on both the left and right sides of -the keyboard. -.SH "Scan Group" -There is one -.I ScanGroup -for each scan code generated by the given keyboard. This number is given by -KeyMapping::num_scan_codes. The first scan group represents hardware scan -code 0, the second represents scan code 1, etc. -.PP -.RS -.AS -.AZ "enum ModifierMask {" -.AN " ALPHALOCK_MASK" " " "= 1 << 0," -.AN " SHIFT_MASK" " " "= 1 << 1," -.AN " CONTROL_MASK" " " "= 1 << 2," -.AN " ALTERNATE_MASK" " " "= 1 << 3," -.AN " CARRIAGE_RETURN_MASK" "" "= 1 << 4" -.AZ }; -.AZ "#define NOT_BOUND 0xff" -.AE -.PP -.AS -.AZ "struct ScanGroup {" -.AN " number mask;" -.AN " Character characters[...];" -.AZ }; -.AE -.RE -.PP -For each scan code, `mask' defines which modifier combinations generate -characters. If `mask' is -.SM NOT_BOUND -(0xff) then then this scan code does not generate any characters ever, and its -characters[] array is zero length. Otherwise, the characters[] array contains -one -.I Character -record for each modifier combination. -.PP -The number of records in characters[] is determined by computing (1 << -bits_set_in_mask). In other words, if mask is zero, then zero bits are set, -so characters[] contains only one record. If `mask' is -.SM "(SHIFT_MASK | CONTROL_MASK)," -then two bits are set, so characters[] contains four records. -.PP -The first record always represents the character which is generated by that -key when no modifiers are active. The remaining records represent characters -generated by the various modifier combinations. Using the example with the -.I shift -and -.I control -masks set, record two would represent the character with the -.I shift -modifier active; record three, the -.I control -modifier active; and record four, both the -.I shift -and -.I control -modifiers active. -.PP -As a special case, -.SM ALPHALOCK_MASK -implies -.SM SHIFT_MASK, -though only -.SM ALPHALOCK_MASK -appears in `mask'. In this case the same character is generated for both the -.I shift -and -.I alpha-lock -modifiers, but only needs to appear once in the characters[] array. -.PP -.SM CARRIAGE_RETURN_MASK -does not actually refer to a modifier key. Instead, it is used to -distinguish the scan code which is given the special pseudo-designation of -.I "carriage return" -key. Typically, this mask appears solo in a -.I ScanGroup -record and only the two -.I Character -records for control-M and control-C follow. This flag may be a throwback to -an earlier time or may be specially interpreted by the low-level keyboard -driver, but its purpose is otherwise enigmatic. -.SH Character -Each -.I Character -record indicates the character generated when this key is pressed, as well as -the character set which contains the character. Well known character sets are -.SM `ASCII' -and `Symbol'. The character set can also be one of the meta values -.SM FUNCTION_KEY -or -.SM KEY_SEQUENCE. -If it is -.SM FUNCTION_KEY -then `char_code' represents a generally well-known function key such as those -enumerated by -.I FunctionKey. -If the character set is -.SM KEY_SEQUENCE -then `char_code' represents is a zero-base index into -KeyMapping::sequence_lists[]. -.PP -.RS -.AS -.AZ "enum CharacterSet {" -.AN " ASCII" " " "= 0x00," -.AN " SYMBOL" " " "= 0x01," -.AN " ..." -.AN " FUNCTION_KEY" "" "= 0xfe," -.AN " KEY_SEQUENCE" "" "= 0xff" -.AZ }; -.AE -.PP -.AS -.AZ "struct Character {" -.AN " number set;" " " "// CharacterSet of generated character" -.AN " number char_code;" "" "// Actual character generated" -.AZ }; -.AE -.PP -.AS -.AZ "enum FunctionKey {" -.AZ " F1 = 0x20, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12," -.AZ " INSERT, DELETE, HOME, END, PAGE_UP, PAGE_DOWN, PRINT_SCREEN," -.AZ " SCROLL_LOCK, PAUSE, SYS_REQUEST, BREAK, RESET, STOP, MENU," -.AZ " USER, SYSTEM, PRINT, CLEAR_LINE, CLEAR_DISPLAY, INSERT_LINE," -.AZ " DELETE_LINE, INSERT_CHAR, DELETE_CHAR, PREV, NEXT, SELECT" -.AZ }; -.AE -.RE -.SH Sequence -When Character::set contains the meta value -.SM KEY_SEQUENCE, -the scan code is bound to a sequence of keys rather than a single character. -A sequence is a series of modifiers and characters which are automatically -generated when the associated key is depressed. -.PP -.RS -.AS -.AZ "#define MODIFIER_KEY 0xff" -.AE -.PP -.AS -.AZ "struct Sequence {" -.AN " number num_chars;" -.AN " Character characters[...];" -.AZ }; -.AE -.RE -.PP -Each generated -.I Character -is represented as previously described, with the exception that -.SM MODIFIER_KEY -may appear in place of -.SM KEY_SEQUENCE. -When the value of Character::set is -.SM MODIFIER_KEY -then Character::char_code represents a modifier key rather than an actual -character. If the modifier represented by `char_code' is non-zero, then it -indicates that the associated modifier key has been depressed. In this case, -the value is one of the constants enumerated by -.I Modifier -(\c -.SM "SHIFT, CONTROL, ALTERNATE," -etc.). If the value is zero then it means that the modifier keys have been -released. -.SH "Special Key" -A special key is one which is scanned directly by the Mach kernel rather than -by the WindowServer. In general, events are not generated for special keys. -.PP -.RS -.AS -.AZ "enum SpecialKeyType {" -.AZ " VOLUME_UP = 0," -.AZ " VOLUME_DOWN," -.AZ " BRIGHTNESS_UP," -.AZ " BRIGHTNESS_DOWN," -.AZ " ALPHA_LOCK," -.AZ " HELP," -.AZ " POWER," -.AZ " SECONDARY_ARROW_UP," -.AZ " SECONDARY_ARROW_DOWN" -.AZ }; -.AE -.PP -.AS -.AZ "struct SpecialKey {" -.AN " number type;" " " "// A SpecialKeyType constant" -.AN " number scan_code;" "" "// Actual scan code" -.AZ }; -.AE -.RE -.SH OUTPUT -What follows is an explanation and description of the various pieces of -information emitted by -.I dumpkeymap. -.PP -For a more thorough discussion of any particular piece of information described -here, refer to the detailed description of the internal layout of a key mapping -provided by the -.I "Key Mapping Description" -section above. -.SH Conventions -Depending upon context, some numeric values are displayed in decimal -notation, whereas others are displayed in hexadecimal notation. -Hexadecimal numbers are denoted by a `0x' prefix (for instance, `0x7b'), -except when explicitly noted otherwise. -.SH "Key Mapping Source" -The first piece of information presented about a particular key mapping is the -source from which the data was gleaned. For a -.I .keymapping -file, the title -.SM "`KEYMAP FILE'" -is emitted along with the path and name of the file in question. For the key -mapping currently in use by the WindowServer and AppKit, the title -.SM "`ACTIVE KEYMAP'" -is emitted instead. -.SH "Device Information" -Each -.I .keymapping -file may contain one or more raw key mappings. For example, a file which maps -keys to a Dvorak-style layout might contain raw mappings for Intel -.SM "PC, ADB, NeXT," -and Sun Type5 keyboards. -.PP -For each raw mapping, the following information is emitted: -.BG -.BU -The title -.SM `KEYMAP' -along with the mapping's relative position in the -.I .keymapping -file. -.BU -The `interface' identifier. -.BU -The `handler_id' sub-identifier. -.BU -The size of the raw mapping resource counted in bytes. -.BE -The `interface' and `handler_id' values, taken together, define a specific -keyboard device. A -.I .keyboard -file, which describes the visual layout of a keyboard, also contains -`interface' and `handler_id' identifiers. The -.I .keyboard -file corresponding to a particular key mapping can be found by matching the -`interface' and `handler_id' values from each resource. -.SH Modifiers -Each mapping may contain zero or more modifier records which associate hardware -scan codes with modifier descriptions such as -.I "shift, control, alternate," -etc. The title -.SM `MODIFIERS' -is printed along with the count of modifier records which follow. For each -modifier record, the modifier's name is printed along with a list of scan -codes, in hexadecimal format, which generate that modifier value. For example: -.PP -.RS -.nf -MODIFIERS [4] -alternate: 0x1d 0x60 -control: 0x3a -keypad: 0x52 0x53 ... 0x63 0x62 -shift: 0x2a 0x36 -.fi -.RE -.SH Characters -Each mapping may contain zero or more character records which associate -hardware scan codes with the actual characters generated by those scan -codes in the presence or absence of various modifier combinations. The -title -.SM `CHARACTERS' -is printed along with the count of character records which follow. Here is a -highly abbreviated example: -.PP -.RS -.nf -CHARACTERS [9] -scan 0x00: -AC-L "a" "A" "^A" "^A" ca c7 "^A" "^A" -scan 0x07: -AC-L "x" "X" "^X" "^X" 01/b4 01/ce "^X" "^X" -scan 0x0a: ---S- "<" ">" -scan 0x13: -ACS- "2" "@" "^@" "^@" b2 b3 "^@" "^@" -scan 0x24: R---- "^M" "^C" -scan 0x3e: ----- [F4] -scan 0x4a: ----- [page up] -scan 0x60: ----- {seq#3} -scan 0x68: not-bound -.fi -.RE -.PP -For each record, the hexadecimal value of the hardware scan code is printed, -followed by a list of modifier flag combinations and the actual characters -generated by this scan code with and without modifiers applied. -.PP -The modifier flags field is composed of a combination of single letter -representations of the various modifier types. The letters stand for: -.PP -.RS -.nf -L \- alpha-lock -S \- shift -C \- control -A \- alternate -R \- carriage-return -.fi -.RE -.PP -As a special case, the -.I alpha-lock -flag also implies the -.I shift -flag, so these two flags never appear together in the same record. -.PP -The combination of modifier flags determines the meaning and number of fields -which follow. The first field after the modifier flags always represents the -character that will be generated if no modifier keys are depressed. The -remaining fields represent characters generated by the various modifier -combinations. The order of the fields follows this general pattern: -.BG -.BU -The character generated by this scan code when no modifiers are in effect is -listed first. -.BU -If the `L' or `S' flag is active, then the shifted character generated by this -scan code is listed next. -.BU -If the `C' flag is active, then the control-character generated by this scan -code is listed next. Furthermore, if the `L' or `S' flag is also active, then -the shifted control-character is listed after that. -.BU -If the `A' flag is active, then the alternate-character generated by this scan -code is listed next. Furthermore, if the `L' or `S' flag is active, then the -shifted alternate-character is listed after that. If the `C' flag is also -active, then the alternate-control-character is listed next. Finally, if the -`C' and `L' or `C' and `S' flags are also active, then the shifted -alternate-control-character is listed. -.BE -The `R' flag does not actually refer to a modifier key. Instead, it is used to -distinguish the scan code which is given the special pseudo-designation of -.I "carriage return" -key. Typically, this mask appears solo and only the two fields for control-M -and control-C follow. This flag may be a throwback to an earlier time or may -be specially interpreted by the low-level keyboard driver, but its purpose is -otherwise enigmatic. -.PP -Recalling the example from above, the following fields can be identified: -.PP -.RS -.nf -scan 0x00: -AC-L "a" "A" "^A" "^A" ca c7 "^A" "^A" -.fi -.RE -.BG -.BU -Lower-case `a' is generated when no modifiers are active. -.BU -Upper-case `A' is generated when -.IR shift " or " alpha-lock -are active. -.BU -Control-A is generated when -.I control -is active. -.BU -Control-A is generated when -.IR control " and " shift -are active. -.BU -The character represented by the hexadecimal code 0xca is generated when -.I alternate -is active. -.BU -The character represented by 0xc7 is generated when -.IR alternate " and " shift " (or " alpha-lock ") are active." -.BU -Control-A is generated when -.IR alternate " and " control -are active. -.BU -Control-A is generated when -.IR "alternate, control" " and " shift " (or " alpha-lock ") are active." -.BE -The notation used to represent a particular generated character varies. -.BG -.BU -Printable -.SM ASCII -characters are quoted, as in "x" or "X". -.BU -Control-characters are quoted and prefixed with `^', as in "^X". -.BU -Characters with values greater than 127 (0x7f) are displayed as hexadecimal -values without the `0x' prefix. -.BU -Characters in a non-\c -.SM ASCII -character set (such as `Symbol') are displayed as two hexadecimal numbers -separated by a slash, as in `01/4a'. The first number is the character set's -identification code (such as `01' for the `Symbol' set), and the second number -is the value of the generated character. -.BU -Non-printing special function characters are displayed with the function's -common name enclosed in brackets, as in `[page up]' or `[F4]'. -.BU -If the binding represents a key sequence rather than a single character, then -the sequence's identification number is enclosed in braces, as in `{seq#3}'. -.BE -Recalling a few examples from above, the following interpretations can be made: -.PP -.RS -.nf -scan 0x07: -AC-L "x" "X" "^X" "^X" 01/b4 01/ce "^X" "^X" -scan 0x3e: ----- [F4] -scan 0x4a: ----- [page up] -scan 0x60: ----- {seq#3} -.fi -.RE -.BG -.BU -"x" and "X" are printable -.SM ASCII -characters. -.BU -"^X" is a control-character. -.BU -`01/b4' and `01/ce' represent the character codes 0xb4 and 0xce in the `Symbol' -character set. -.BU -Scan code 0x3e generates function-key `F4', and scan code 0x4a generates -function-key `page up'. -.BU -Scan code 0x60 is bound to key sequence #3. -.BE -Finally, if a scan code is not bound to any characters, then it is annotated -with the label `not-bound', as with example scan code 0x68 from above. -.SH Sequences -A scan code (modified and unmodified) can be bound to a key sequence rather -than generating a single character or acting as a modifier. When it is bound -to a key sequence, a series of character invocations and modifier actions are -automatically generated rather than a single keystroke. -.PP -Each mapping may contain zero or more key sequence records. The title -.SM `SEQUENCES' -is printed along with the count of sequence records which follow. For example: -.PP -.RS -.nf -SEQUENCES [3] -sequence 0: "f" "o" "o" -sequence 1: {alternate} "b" "a" "r" {unmodify} -sequence 2: [home] "b" "a" "z" -.fi -.RE -.PP -The notation used to represent the sequence of generated characters is -identical to the notation already described in the -.I Characters -section above, with the exception that modifier actions may be interposed -between generated characters. Such modifier actions are represented by the -modifier's name enclosed in braces. The special name `{unmodify}' indicates -the release of the modifier keys. -.PP -Thus, the sequences in the above example can be interpreted as follows: -.BG -.BU -Sequence\ #0 generates `foo'. -.BU -Sequence\ #1 invokes the -.I alternate -modifier, generates `bar', and then releases -.I alternate. -.BU -Sequence\ #2 invokes the -.I home -key and then generates `baz'. In a text editor, this would probably result in -`baz' being prepended to the line of text on which the cursor resides. -.BE -.SH Special Keys -Certain keyboards feature keys which perform some type of special purpose -function rather than generating a character or acting as a modifier. For -instance, Apple keyboards often contain a -.I power -key, and -.SM NeXT -keyboards have historically featured screen brightness and volume control keys. -.PP -Each mapping may contain zero or more special-key records which associate -hardware scan codes with such special purpose functions. The title -.SM `SPECIALS' -is printed along with the count of records which follow. For each record, the -special function's name is printed along with a list of scan codes, in -hexadecimal format, which are bound to that function. For example: -.PP -.RS -.nf -SPECIALS [6] -alpha-lock: 0x39 -brightness-down: 0x79 -brightness-up: 0x74 -power: 0x7f -sound-down: 0x77 -sound-up: 0x73 -.fi -.RE -.SH FILES -.IP *.keymapping -A key mapping file which precisely defines the relationship of all -hardware-specific keyboard scan-codes with their associated functionality. -.IP *.keyboard -A file describing the physical layout of keys on a particular type of -keyboard. Each `key' token in this file defines the position and shape of the -key on the keyboard, as well as the associated scan code which that key -generates. A -.I .keymapping -file, on the other hand, defines the characters which are generated by a -particular scan code depending upon the state of the various modifier keys -(such as -.I shift, -.I control, -etc.). The `interface' and `handler_id' values from a -.I .keymapping -file are matched against those in each -.I .keyboard -file in order to associate a particular -.I .keyboard -file with a key mapping. Various -.SM GUI -programs use the -.I .keyboard -file to display a visual representation of a keyboard for the user. Since -these files are just plain text, they can be easily viewed and interpreted -without the aid of a specialized program, thus -.I dumpkeymap -leaves these files alone. -.PP -/System/Library/Keyboards -.br -/Network/Library/Keyboards -.br -/Local/Library/Keyboards -.br -/Library/Keyboards -.RS -Repositories for -.I .keymapping -and -.I .keyboard -files for MacOS/X, Darwin, and MacOS/X Server. -.RE -.PP -/NextLibrary/Keyboards -.br -/LocalLibrary/Keyboards -.RS -Repositories for -.I .keymapping -and -.I .keyboard -files for OpenStep and NextStep. -.RE -.IP $(HOME)/Library/Keyboards -Repository for personal -.I .keymapping -and -.I .keyboard -files. -.SH DIGANOSTICS -The following diagnostic messages may be issued to the standard error stream. -.TG "Unrecognized option." -An unrecognized option was specified on the command-line. Invoke -.I dumpkeymap -with the -.B "\-\^\-help" -option to view a list of valid options. -.TG "Insufficient data in keymapping data stream." -The key mapping file or data stream is corrupt. Either the file has been -incorrectly truncated or a field, such as those which indicates the number of -variable records which follow, contains a corrupt value. -.PP -The following diagnostic messages have significance only when trying to print -.I .keymapping -files mentioned on the command-line. -.TG "Bad magic number." -The mentioned file is not a -.I .keymapping -file. The file's content does not start with the string `KYM1'. -.TG "Unable to open key mapping file." -The call to fopen() failed; probably because the specified path is invalid or -.I dumpkeymap -does not have permission to read the file. -.TG "Unable to determine key mapping file size." -The call to fstat() failed, thus memory can not be allocated for loading the -file. -.TG "Unable to read key mapping file." -The call to fread() failed. -.PP -The following diagnostic messages have significance only when trying to print -the currently active key mapping when no -.I .keymapping -files have been mentioned on the command-line. -.TG "Unable to open event status driver." -The call to NXOpenEventStatus() failed. -.TG "Bad key mapping length." -The call to NXKeyMappingLength() returned a bogus value. -.TG "Unable to get current key mapping." -The call to NXGetKeyMapping() failed. -.PP -The following diagnostic messages have significance only when using -.I dumpkeymap -on a non-Apple/\c -.SM NeXT -platform. -.TG "Must specify at least one .keymapping file." -No -.I .keymapping -files were mentioned on the command-line. On non-Apple/\c -.SM NeXT -platforms, there is no concept of a currently active -.I .keymapping -file, so at least one file must be mentioned on the command-line. -.SH AUTHOR -Eric Sunshine wrote -.I dumpkeymap -and this document, the -.I "dumpkeymap user's manual." -Both -.I dumpkeymap -and this document are copyright \(co1999,2000 by Eric Sunshine -. All rights reserved. -.PP -The implementation of -.I dumpkeymap -is based upon information gathered on September 3, 1997 by Eric Sunshine - and Paul S. McCarthy during an -effort to reverse engineer the format of the -.SM NeXT -.I .keymapping -file. -.if n .PP -.if n Version \n(VE \-\- -.if n .UP diff --git a/synfig-osx/trunk/launcher/voria.icns b/synfig-osx/trunk/launcher/voria.icns deleted file mode 100644 index 3d3d20f409aa707d8f5f4f2004cbc3e2586eb690..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43570 zcmeFZby!^2_Aq?L6$W>A3+_HRgS!kcID@-GIK$xX?j%HjxDY3vrqM>5q;1+;Z`$Uz zy>0Kkz2#kJNZO=LfAT%w^SuAO@Bnl6UTf{O_u5PMK4hmAlp@G(%j~pLZ3IF55Cn%3 z)(PvB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P?vGdz~ zVvf47WE4BF6VG_9VO%#Ba`^VPPtaoLuJ)%n`9wZ4r*ohL8a`gnNd|FC6`%p5SC;tA z9P|*O<1gsZM3XjfNrZ*>%%I3pPc%^U%lfTjK%99pkL(;|-#9l_d)StNi!L#Ab&XSJ z{yTh~ZNI1l6K4-|aHK@Qdgd)nzr@!KtRc)^s)lWs)QvezJrg_)-xQ-?J!YwV(@uAv zAc^kIYb`S*`uP&g=x`X7F4)eV8gy}vvUi-H;mhoapeYCaj1yz$*PSh6SfY*{EPBsm z!2vqxub(*}eBN@?caR+sc!yq9*h@2DLkkj2WDkqpQ({V zM}*&7K3>S7cSjjct-{>?p?Avjjvc8rH`IxzgO{Qme=8d&o}T+%5$X=GonxaP;eK!* zS~dL4+$%kq!dbMjS+~hg&;8yLtprG!JLY5xsVIFxt2s3HkMmIbHM%KaFGsr{xI*O7 z1xC+~GtQ~si|G8(958&Qa_)dm2}SMio{Bc}Um_}BoEVeSC1=uSmQuDJ%@p_@hr1t* z*7pk<3HTec>Y&bl^EVm^cmp+krVpr~iHk=wC5O6zJ(>ZKkD5Hw2cl80gFk%WZ zYk?vZVfk$+qiwSSzsn?}7=VAVLJ(z{_T8-OpvO_tW~KP(Db@!ddjTINT%gc_6PS=< zD;vwY70zbBX?C`}SysWgXFd9Pb`-|B*^;c<04w1ONzPwnmR<2bvJq}&&Tl=-0$@Id zAC1<|^0J(B%qzoA36^b;)ud5Q>mP4k(Gu6OtN}^L$jENle-7i5RzJtCFkGMRhf(-- zi|huOk64DE7$-a{ww`d$eaTL1gV9;weBzrGXw#J=X@Ti}*DvT6 zoUcT&>(3{TgEo#Y_+-YonDV6fK+{bQOM7PMkS}tcGTs6$Dhm(K#kKg@yYO%;3d@Ft zim_Z|(Vull3$& -#include - -struct x_hash_table_struct { - unsigned int bucket_index; - unsigned int total_keys; - x_list **buckets; - - x_hash_fun *hash_key; - x_compare_fun *compare_keys; - x_destroy_fun *destroy_key; - x_destroy_fun *destroy_value; -}; - -#define ITEM_NEW(k, v) X_PFX (list_prepend) ((x_list *) (k), v) -#define ITEM_FREE(i) X_PFX (list_free_1) (i) -#define ITEM_KEY(i) ((void *) (i)->next) -#define ITEM_VALUE(i) ((i)->data) - -#define SPLIT_THRESHOLD_FACTOR 2 - -/* http://planetmath.org/?op=getobj&from=objects&name=GoodHashTablePrimes */ -static const unsigned int bucket_sizes[] = { - 29, 53, 97, 193, 389, 769, 1543, 3079, 6151, 12289, 24593, 49157, - 98317, 196613, 393241, 786433, 1572869, 3145739, 6291469, 12582917, - 25165843, 50331653, 100663319, 201326611, 402653189, 805306457, - 1610612741 -}; - -#define N_BUCKET_SIZES (sizeof (bucket_sizes) / sizeof (bucket_sizes[0])) - -static inline unsigned int -hash_table_total_buckets (x_hash_table *h) -{ - return bucket_sizes[h->bucket_index]; -} - -static inline void -hash_table_destroy_item (x_hash_table *h, void *k, void *v) -{ - if (h->destroy_key != 0) - (*h->destroy_key) (k); - - if (h->destroy_value != 0) - (*h->destroy_value) (v); -} - -static inline unsigned int -hash_table_hash_key (x_hash_table *h, void *k) -{ - if (h->hash_key != 0) - return (*h->hash_key) (k); - else - return (unsigned int) k; -} - -static inline int -hash_table_compare_keys (x_hash_table *h, void *k1, void *k2) -{ - if (h->compare_keys == 0) - return k1 == k2; - else - return (*h->compare_keys) (k1, k2) == 0; -} - -static void -hash_table_split (x_hash_table *h) -{ - x_list **new, **old; - x_list *node, *item, *next; - int new_size, old_size; - unsigned int b; - int i; - - if (h->bucket_index == N_BUCKET_SIZES - 1) - return; - - old_size = hash_table_total_buckets (h); - old = h->buckets; - - h->bucket_index++; - - new_size = hash_table_total_buckets (h); - new = calloc (new_size, sizeof (x_list *)); - - if (new == 0) - { - h->bucket_index--; - return; - } - - for (i = 0; i < old_size; i++) - { - for (node = old[i]; node != 0; node = next) - { - next = node->next; - item = node->data; - - b = hash_table_hash_key (h, ITEM_KEY (item)) % new_size; - - node->next = new[b]; - new[b] = node; - } - } - - h->buckets = new; - free (old); -} - -X_EXTERN x_hash_table * -X_PFX (hash_table_new) (x_hash_fun *hash, - x_compare_fun *compare, - x_destroy_fun *key_destroy, - x_destroy_fun *value_destroy) -{ - x_hash_table *h; - - h = calloc (1, sizeof (x_hash_table)); - if (h == 0) - return 0; - - h->bucket_index = 0; - h->buckets = calloc (hash_table_total_buckets (h), sizeof (x_list *)); - - if (h->buckets == 0) - { - free (h); - return 0; - } - - h->hash_key = hash; - h->compare_keys = compare; - h->destroy_key = key_destroy; - h->destroy_value = value_destroy; - - return h; -} - -X_EXTERN void -X_PFX (hash_table_free) (x_hash_table *h) -{ - int n, i; - x_list *node, *item; - - assert (h != NULL); - - n = hash_table_total_buckets (h); - - for (i = 0; i < n; i++) - { - for (node = h->buckets[i]; node != 0; node = node->next) - { - item = node->data; - hash_table_destroy_item (h, ITEM_KEY (item), ITEM_VALUE (item)); - ITEM_FREE (item); - } - X_PFX (list_free) (h->buckets[i]); - } - - free (h->buckets); - free (h); -} - -X_EXTERN unsigned int -X_PFX (hash_table_size) (x_hash_table *h) -{ - assert (h != NULL); - - return h->total_keys; -} - -static void -hash_table_modify (x_hash_table *h, void *k, void *v, int replace) -{ - unsigned int hash_value; - x_list *node, *item; - - assert (h != NULL); - - hash_value = hash_table_hash_key (h, k); - - for (node = h->buckets[hash_value % hash_table_total_buckets (h)]; - node != 0; node = node->next) - { - item = node->data; - - if (hash_table_compare_keys (h, ITEM_KEY (item), k)) - { - if (replace) - { - hash_table_destroy_item (h, ITEM_KEY (item), - ITEM_VALUE (item)); - ITEM_KEY (item) = k; - ITEM_VALUE (item) = v; - } - else - { - hash_table_destroy_item (h, k, ITEM_VALUE (item)); - ITEM_VALUE (item) = v; - } - return; - } - } - - /* Key isn't already in the table. Insert it. */ - - if (h->total_keys + 1 - > hash_table_total_buckets (h) * SPLIT_THRESHOLD_FACTOR) - { - hash_table_split (h); - } - - hash_value = hash_value % hash_table_total_buckets (h); - h->buckets[hash_value] = X_PFX (list_prepend) (h->buckets[hash_value], - ITEM_NEW (k, v)); - h->total_keys++; -} - -X_EXTERN void -X_PFX (hash_table_insert) (x_hash_table *h, void *k, void *v) -{ - hash_table_modify (h, k, v, 0); -} - -X_EXTERN void -X_PFX (hash_table_replace) (x_hash_table *h, void *k, void *v) -{ - hash_table_modify (h, k, v, 1); -} - -X_EXTERN void -X_PFX (hash_table_remove) (x_hash_table *h, void *k) -{ - unsigned int hash_value; - x_list **ptr, *item; - - assert (h != NULL); - - hash_value = hash_table_hash_key (h, k); - - for (ptr = &h->buckets[hash_value % hash_table_total_buckets (h)]; - *ptr != 0; ptr = &((*ptr)->next)) - { - item = (*ptr)->data; - - if (hash_table_compare_keys (h, ITEM_KEY (item), k)) - { - hash_table_destroy_item (h, ITEM_KEY (item), ITEM_VALUE (item)); - ITEM_FREE (item); - item = *ptr; - *ptr = item->next; - X_PFX (list_free_1) (item); - h->total_keys--; - return; - } - } -} - -X_EXTERN void * -X_PFX (hash_table_lookup) (x_hash_table *h, void *k, void **k_ret) -{ - unsigned int hash_value; - x_list *node, *item; - - assert (h != NULL); - - hash_value = hash_table_hash_key (h, k); - - for (node = h->buckets[hash_value % hash_table_total_buckets (h)]; - node != 0; node = node->next) - { - item = node->data; - - if (hash_table_compare_keys (h, ITEM_KEY (item), k)) - { - if (k_ret != 0) - *k_ret = ITEM_KEY (item); - - return ITEM_VALUE (item); - } - } - - if (k_ret != 0) - *k_ret = 0; - - return 0; -} - -X_EXTERN void -X_PFX (hash_table_foreach) (x_hash_table *h, - x_hash_foreach_fun *fun, void *data) -{ - int i, n; - x_list *node, *item; - - assert (h != NULL); - - n = hash_table_total_buckets (h); - - for (i = 0; i < n; i++) - { - for (node = h->buckets[i]; node != 0; node = node->next) - { - item = node->data; - (*fun) (ITEM_KEY (item), ITEM_VALUE (item), data); - } - } -} diff --git a/synfig-osx/trunk/launcher/x-hash.h b/synfig-osx/trunk/launcher/x-hash.h deleted file mode 100644 index 7de998d..0000000 --- a/synfig-osx/trunk/launcher/x-hash.h +++ /dev/null @@ -1,61 +0,0 @@ -/* x-hash.h -- basic hash table class - $Id: x-hash.h,v 1.4 2003/04/16 00:42:14 jharper Exp $ - - Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. */ - -#ifndef X_HASH_H -#define X_HASH_H 1 - -typedef struct x_hash_table_struct x_hash_table; - -typedef int (x_compare_fun) (const void *a, const void *b); -typedef unsigned int (x_hash_fun) (const void *k); -typedef void (x_destroy_fun) (void *x); -typedef void (x_hash_foreach_fun) (void *k, void *v, void *data); - -/* for X_PFX and X_EXTERN */ -#include "x-list.h" - -X_EXTERN x_hash_table *X_PFX (hash_table_new) (x_hash_fun *hash, - x_compare_fun *compare, - x_destroy_fun *key_destroy, - x_destroy_fun *value_destroy); -X_EXTERN void X_PFX (hash_table_free) (x_hash_table *h); - -X_EXTERN unsigned int X_PFX (hash_table_size) (x_hash_table *h); - -X_EXTERN void X_PFX (hash_table_insert) (x_hash_table *h, void *k, void *v); -X_EXTERN void X_PFX (hash_table_replace) (x_hash_table *h, void *k, void *v); -X_EXTERN void X_PFX (hash_table_remove) (x_hash_table *h, void *k); -X_EXTERN void *X_PFX (hash_table_lookup) (x_hash_table *h, - void *k, void **k_ret); -X_EXTERN void X_PFX (hash_table_foreach) (x_hash_table *h, - x_hash_foreach_fun *fun, - void *data); - -#endif /* X_HASH_H */ diff --git a/synfig-osx/trunk/launcher/x-hook.c b/synfig-osx/trunk/launcher/x-hook.c deleted file mode 100644 index 127dc81..0000000 --- a/synfig-osx/trunk/launcher/x-hook.c +++ /dev/null @@ -1,105 +0,0 @@ -/* x-hook.c - $Id: x-hook.c,v 1.2 2003/04/16 00:42:14 jharper Exp $ - - Copyright (c) 2003 Apple Computer, Inc. All rights reserved. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. */ - -#include "x-hook.h" -#include -#include - -#define CELL_NEW(f,d) X_PFX (list_prepend) ((x_list *) (f), (d)) -#define CELL_FREE(c) X_PFX (list_free_1) (c) -#define CELL_FUN(c) ((x_hook_function *) ((c)->next)) -#define CELL_DATA(c) ((c)->data) - -X_EXTERN x_list * -X_PFX (hook_add) (x_list *lst, x_hook_function *fun, void *data) -{ - return X_PFX (list_prepend) (lst, CELL_NEW (fun, data)); -} - -X_EXTERN x_list * -X_PFX (hook_remove) (x_list *lst, x_hook_function *fun, void *data) -{ - x_list *node, *cell; - x_list *to_delete = NULL; - - for (node = lst; node != NULL; node = node->next) - { - cell = node->data; - if (CELL_FUN (cell) == fun && CELL_DATA (cell) == data) - to_delete = X_PFX (list_prepend) (to_delete, cell); - } - - for (node = to_delete; node != NULL; node = node->next) - { - cell = node->data; - lst = X_PFX (list_remove) (lst, cell); - CELL_FREE (cell); - } - - X_PFX (list_free) (to_delete); -} - -X_EXTERN void -X_PFX (hook_run) (x_list *lst, void *arg) -{ - x_list *node, *cell; - x_hook_function **fun; - void **data; - int length, i; - - length = X_PFX (list_length) (lst); - fun = alloca (sizeof (x_hook_function *) * length); - data = alloca (sizeof (void *) * length); - - for (i = 0, node = lst; node != NULL; node = node->next, i++) - { - cell = node->data; - fun[i] = CELL_FUN (cell); - data[i] = CELL_DATA (cell); - } - - for (i = 0; i < length; i++) - { - (*fun[i]) (arg, data[i]); - } -} - -X_EXTERN void -X_PFX (hook_free) (x_list *lst) -{ - x_list *node; - - for (node = lst; node != NULL; node = node->next) - { - CELL_FREE (node->data); - } - - X_PFX (list_free) (lst); -} diff --git a/synfig-osx/trunk/launcher/x-hook.h b/synfig-osx/trunk/launcher/x-hook.h deleted file mode 100644 index b146a93..0000000 --- a/synfig-osx/trunk/launcher/x-hook.h +++ /dev/null @@ -1,43 +0,0 @@ -/* x-hook.h -- lists of function,data pairs to call. - $Id: x-hook.h,v 1.2 2003/04/16 00:42:14 jharper Exp $ - - Copyright (c) 2003 Apple Computer, Inc. All rights reserved. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. */ - -#ifndef X_HOOK_H -#define X_HOOK_H 1 - -#include "x-list.h" - -typedef void x_hook_function (void *arg, void *data); - -X_EXTERN x_list *X_PFX (hook_add) (x_list *lst, x_hook_function *fun, void *data); -X_EXTERN x_list *X_PFX (hook_remove) (x_list *lst, x_hook_function *fun, void *data); -X_EXTERN void X_PFX (hook_run) (x_list *lst, void *arg); -X_EXTERN void X_PFX (hook_free) (x_list *lst); - -#endif /* X_HOOK_H */ diff --git a/synfig-osx/trunk/launcher/x-list.c b/synfig-osx/trunk/launcher/x-list.c deleted file mode 100644 index 57e9b09..0000000 --- a/synfig-osx/trunk/launcher/x-list.c +++ /dev/null @@ -1,334 +0,0 @@ -/* x-list.c - $Id: x-list.c,v 1.16 2003/07/18 00:52:19 jharper Exp $ - - Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. */ - -#include "x-list.h" -#include -#include -#include - -/* Allocate in ~4k blocks */ -#define NODES_PER_BLOCK 508 - -typedef struct x_list_block_struct x_list_block; - -struct x_list_block_struct { - x_list l[NODES_PER_BLOCK]; -}; - -static x_list *freelist; - -static pthread_mutex_t freelist_lock = PTHREAD_MUTEX_INITIALIZER; - -static inline void -list_free_1 (x_list *node) -{ - node->next = freelist; - freelist = node; -} - -X_EXTERN void -X_PFX (list_free_1) (x_list *node) -{ - assert (node != NULL); - - pthread_mutex_lock (&freelist_lock); - - list_free_1 (node); - - pthread_mutex_unlock (&freelist_lock); -} - -X_EXTERN void -X_PFX (list_free) (x_list *lst) -{ - x_list *next; - - pthread_mutex_lock (&freelist_lock); - - for (; lst != NULL; lst = next) - { - next = lst->next; - list_free_1 (lst); - } - - pthread_mutex_unlock (&freelist_lock); -} - -X_EXTERN x_list * -X_PFX (list_prepend) (x_list *lst, void *data) -{ - x_list *node; - - pthread_mutex_lock (&freelist_lock); - - if (freelist == NULL) - { - x_list_block *b; - int i; - - b = malloc (sizeof (x_list_block)); - - for (i = 0; i < NODES_PER_BLOCK - 1; i++) - b->l[i].next = &(b->l[i+1]); - b->l[i].next = NULL; - - freelist = b->l; - } - - node = freelist; - freelist = node->next; - - pthread_mutex_unlock (&freelist_lock); - - node->next = lst; - node->data = data; - - return node; -} - -X_EXTERN x_list * -X_PFX (list_append) (x_list *lst, void *data) -{ - x_list *head = lst; - - if (lst == NULL) - return X_PFX (list_prepend) (NULL, data); - - while (lst->next != NULL) - lst = lst->next; - - lst->next = X_PFX (list_prepend) (NULL, data); - - return head; -} - -X_EXTERN x_list * -X_PFX (list_reverse) (x_list *lst) -{ - x_list *head = NULL, *next; - - while (lst != NULL) - { - next = lst->next; - lst->next = head; - head = lst; - lst = next; - } - - return head; -} - -X_EXTERN x_list * -X_PFX (list_find) (x_list *lst, void *data) -{ - for (; lst != NULL; lst = lst->next) - { - if (lst->data == data) - return lst; - } - - return NULL; -} - -X_EXTERN x_list * -X_PFX (list_nth) (x_list *lst, int n) -{ - while (n-- > 0 && lst != NULL) - lst = lst->next; - - return lst; -} - -X_EXTERN x_list * -X_PFX (list_pop) (x_list *lst, void **data_ret) -{ - void *data = NULL; - - if (lst != NULL) - { - x_list *tem = lst; - data = lst->data; - lst = lst->next; - X_PFX (list_free_1) (tem); - } - - if (data_ret != NULL) - *data_ret = data; - - return lst; -} - -X_EXTERN x_list * -X_PFX (list_filter) (x_list *lst, - int (*pred) (void *item, void *data), void *data) -{ - x_list *ret = NULL, *node; - - for (node = lst; node != NULL; node = node->next) - { - if ((*pred) (node->data, data)) - ret = X_PFX (list_prepend) (ret, node->data); - } - - return X_PFX (list_reverse) (ret); -} - -X_EXTERN x_list * -X_PFX (list_map) (x_list *lst, - void *(*fun) (void *item, void *data), void *data) -{ - x_list *ret = NULL, *node; - - for (node = lst; node != NULL; node = node->next) - { - X_PFX (list_prepend) (ret, fun (node->data, data)); - } - - return X_PFX (list_reverse) (ret); -} - -X_EXTERN x_list * -X_PFX (list_copy) (x_list *lst) -{ - x_list *copy = NULL; - - for (; lst != NULL; lst = lst->next) - { - copy = X_PFX (list_prepend) (copy, lst->data); - } - - return X_PFX (list_reverse) (copy); -} - -X_EXTERN x_list * -X_PFX (list_remove) (x_list *lst, void *data) -{ - x_list **ptr, *node; - - for (ptr = &lst; *ptr != NULL;) - { - node = *ptr; - - if (node->data == data) - { - *ptr = node->next; - X_PFX (list_free_1) (node); - } - else - ptr = &((*ptr)->next); - } - - return lst; -} - -X_EXTERN unsigned int -X_PFX (list_length) (x_list *lst) -{ - unsigned int n; - - n = 0; - for (; lst != NULL; lst = lst->next) - n++; - - return n; -} - -X_EXTERN void -X_PFX (list_foreach) (x_list *lst, - void (*fun) (void *data, void *user_data), - void *user_data) -{ - for (; lst != NULL; lst = lst->next) - { - (*fun) (lst->data, user_data); - } -} - -static x_list * -list_sort_1 (x_list *lst, int length, - int (*less) (const void *, const void *)) -{ - x_list *mid, *ptr; - x_list *out_head, *out; - int mid_point, i; - - /* This is a standard (stable) list merge sort */ - - if (length < 2) - return lst; - - /* Calculate the halfway point. Split the list into two sub-lists. */ - - mid_point = length / 2; - ptr = lst; - for (i = mid_point - 1; i > 0; i--) - ptr = ptr->next; - mid = ptr->next; - ptr->next = NULL; - - /* Sort each sub-list. */ - - lst = list_sort_1 (lst, mid_point, less); - mid = list_sort_1 (mid, length - mid_point, less); - - /* Then merge them back together. */ - - assert (lst != NULL && mid != NULL); - - if ((*less) (mid->data, lst->data)) - out = out_head = mid, mid = mid->next; - else - out = out_head = lst, lst = lst->next; - - while (lst != NULL && mid != NULL) - { - if ((*less) (mid->data, lst->data)) - out = out->next = mid, mid = mid->next; - else - out = out->next = lst, lst = lst->next; - } - - if (lst != NULL) - out->next = lst; - else - out->next = mid; - - return out_head; -} - -X_EXTERN x_list * -X_PFX (list_sort) (x_list *lst, int (*less) (const void *, const void *)) -{ - int length; - - length = X_PFX (list_length) (lst); - - return list_sort_1 (lst, length, less); -} diff --git a/synfig-osx/trunk/launcher/x-list.h b/synfig-osx/trunk/launcher/x-list.h deleted file mode 100644 index 3e19eba..0000000 --- a/synfig-osx/trunk/launcher/x-list.h +++ /dev/null @@ -1,78 +0,0 @@ -/* x-list.h -- simple list type - $Id: x-list.h,v 1.10 2003/07/18 00:52:19 jharper Exp $ - - Copyright (c) 2002 Apple Computer, Inc. All rights reserved. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation files - (the "Software"), to deal in the Software without restriction, - including without limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of the Software, - and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. */ - -#ifndef X_LIST_H -#define X_LIST_H 1 - -/* This is just a cons. */ - -typedef struct x_list_struct x_list; - -struct x_list_struct { - void *data; - x_list *next; -}; - -#ifndef X_PFX -# define X_PFX(x) x_ ## x -#endif - -#ifndef X_EXTERN -# define X_EXTERN __private_extern__ -#endif - -X_EXTERN void X_PFX (list_free_1) (x_list *node); -X_EXTERN x_list *X_PFX (list_prepend) (x_list *lst, void *data); - -X_EXTERN x_list *X_PFX (list_append) (x_list *lst, void *data); -X_EXTERN x_list *X_PFX (list_remove) (x_list *lst, void *data); -X_EXTERN void X_PFX (list_free) (x_list *lst); -X_EXTERN x_list *X_PFX (list_pop) (x_list *lst, void **data_ret); - -X_EXTERN x_list *X_PFX (list_copy) (x_list *lst); -X_EXTERN x_list *X_PFX (list_reverse) (x_list *lst); -X_EXTERN x_list *X_PFX (list_find) (x_list *lst, void *data); -X_EXTERN x_list *X_PFX (list_nth) (x_list *lst, int n); -X_EXTERN x_list *X_PFX (list_filter) (x_list *src, - int (*pred) (void *item, void *data), - void *data); -X_EXTERN x_list *X_PFX (list_map) (x_list *src, - void *(*fun) (void *item, void *data), - void *data); - -X_EXTERN unsigned int X_PFX (list_length) (x_list *lst); -X_EXTERN void X_PFX (list_foreach) (x_list *lst, void (*fun) - (void *data, void *user_data), - void *user_data); - -X_EXTERN x_list *X_PFX (list_sort) (x_list *lst, int (*less) (const void *, - const void *)); - -#endif /* X_LIST_H */ diff --git a/synfig-studio/AUTHORS b/synfig-studio/AUTHORS new file mode 100644 index 0000000..5c60ae2 --- /dev/null +++ b/synfig-studio/AUTHORS @@ -0,0 +1,36 @@ +Developers: + +Robert B. Quattlebaum Jr (darco) +Adrian Bentley + +Contributors: + +Paul Wise (pabs) +Chris Moore (dooglus) +Yue Shi Lai +Douglas Lau +Miguel Gea Milvaques +David Roden (Bombe) +Dmitriy Pomerantsev (Atrus) +Adrian Winchell (SnapSilverlight) +Andreas Jochens +Chris Norman (pixelgeek) +Timo Paulssen (timonator) +IL'dar AKHmetgaleev (AkhIL) +Gerald Young (Yoyobuae) +Cyril Brulebois (KiBi) +Gerco Ballintijn + +Translators: + +Catalan: Miguel Gea Milvaques (xerakko) +Français: Aurore D (rore) +Español: Carlos López González (genete) + +Artists: + +Chris Norman (pixelgeek) +Carlos López González (genete) +Aurore D (rore) +Daniel Hornung (rubikcube) +Franco Iacomella (Yaco) diff --git a/synfig-studio/ChangeLog.old b/synfig-studio/ChangeLog.old new file mode 100644 index 0000000..7ce32e4 --- /dev/null +++ b/synfig-studio/ChangeLog.old @@ -0,0 +1,342 @@ +2005-11-26 Robert Quattlebaum + * src/gtkmm/layertreestore.cpp: Fixed bug which caused crash on DND layer move + +2005-11-03 Robert Quattlebaum + * src/gtkmm/render.cpp: Fixed default render file to use the directory seperator for the given OS, rather than just use forward slashes all the time. + +2004-04-26 (darco): Delete button now deletes layers +2004-04-21 (darco): Various improvements to the dock/dialog system +2004-04-19 (adruab): Added Zoom out to the zoom tool using the Ctrl key +2004-04-16 (adruab): Added basic zoom tool +2004-04-15 (darco): Added meta data stuff to properties dialog +2004-04-12 (darco): Dockable Dialog madness! +2004-04-08 (darco): Changed "Select All Ducks" from CTRL-F to CTRL-G +2004-04-08 (darco): Added search capability to layer tree. (Ctrl-F) +2004-04-08 (darco): The order of the layers is now accurate for a given moment in time +2004-04-07 (darco): Foldy... Powers? +2004-04-07 (darco): Added the length field to keyframe tab +2004-04-02 (adruab): Added a preview thing... it's cool +2004-04-02 (darco): The rulers now adhere to the default unit system +2004-04-02 (darco): Improved defaults display +2004-04-01 (darco): Different units now supported +2004-03-31 (darco): Tweaks now preserved! +2004-03-30 (darco): Checkerboard pattern now used to convey alpha +2004-03-30 (darco): got rid of stupid negative zero thing in color selection dialog +2004-03-30 (darco): Adjustments to color dialog to reduce crashes (hopefully) +2004-03-30 (darco): Changed default frame rate from 30 to 24 FPS +2004-03-30 (darco): Fixed keyframe weirdness +2004-03-25 (darco): fixed the zillion dialog box bug +2004-03-25 (darco): Minor improvements to parameter view +2004-03-25 (darco): Added "Select all children" option for layers +2004-03-24 (darco): Added hack to make connecting and disconnecting BLinePoints(vertices) easier +2004-03-22 (darco): Improved grid snap +2004-03-18 (darco): You can now rotate the order of the items in a list! +2004-03-17 (darco): Linking! +2004-03-16 (darco): You can now rename layers with a single click +2004-03-16 (darco): You can now edit parameters even when you have multiple layers selected (Useful!) +2004-03-15 (darco): Added the ability to jump around on the history tab +2004-03-15 (darco): You can now right-click on ducks to edit waypoints! Group selection even! +2004-03-08 (darco): Improved vertex addition/removal +2004-03-05 (darco): Fixed weird tangent bug in BLine tool +2004-03-05 (darco): You can now change all of the waypoints in a keyframe rather easily by right clicking on the keyframe in the keyframe tab and selecting "Properties". +2004-03-05 (darco): Keyframe manipulation now much faster +2004-03-04 (darco): BLine tool will now automaticly create if you leave the tool with something in it +2004-03-04 (darco): You can now close polygons in the polygon tool by clicking on the first point in the polygon +2004-03-04 (darco): Improved grid snap stuff +2004-03-02 (darco): Fixed weird selection box when using fill tool +2004-03-02 (darco): Fixed crash on undo stroke from sketch tool +2004-03-02 (darco): Added Rotate Tool +2004-03-02 (darco): Improved the performance of the duck manipulation tools +2004-03-01 (darco): minor adjustment for deleting waypoints +2004-03-01 (darco): Fixed a crash bug on waypoint manipulation +2004-02-20 (darco): Changed the way the BLine tool operates +2004-02-20 (darco): Added "Clear History" button to the "history" tab +2004-02-18 (darco): Added palette dialog +2004-02-18 (darco): Menus no longer activate the first item in the menu when you click to open it +2004-02-16 (darco): slight improvement to the way gradients are handled +2004-02-16 (darco): Added "Apply Deafult Gradient" action for gradient parameters. (just right click on them) +2004-02-16 (darco): The mouse pointer will now change depending on the currently selected tool. +2004-02-16 (darco): Moved icons around +2004-02-16 (darco): File selection dialog box now remembers previous path +2004-02-13 (darco): Added box select +2004-02-12 (darco): Added Scale tool! +2004-02-12 (darco): Added SmoothMove tool! +2004-02-11 (darco): You can now drag sketch files into canvases to load the sketch +2004-02-11 (adruab): Added rect tool and futzed with the tool options for the draw tool. +2004-02-11 (darco) : Fixed crash-on-exit bug +2004-02-11 (darco) : Added "File->Revert" menu option +2004-02-10 (darco) : Crash on "CVS-Update" bug fixed +2004-02-10 (darco) : Fixed layer-click problem after using the gradient tool +2004-02-10 (darco) : Added "Grab" button +2004-02-10 (darco) : Draw, Gradient, and BLine tool now add layers "in place" +2004-02-09 (darco) : Added preliminary gradient support +2004-02-09 (darco) : Added "CTRL-D" to unselect all layers +2004-02-09 (darco) : Added feather option to the draw and bline tools. +2004-02-09 (darco) : Polygon tool is now implemented correctly +2004-02-09 (darco) : Increased the size of the "One moment please..." font. +2004-02-09 (darco) : Negative color values are now clamped off. +2004-02-07 (darco) : Auto recovery now no longer saves the recovery files in the same directory, which should lead to a more tidy filesystem. +2004-02-06 (darco) : You can now move multiple layers at once +2004-02-06 (darco) : Layer heirarchies are now less likely to collapse when moving layers. +2004-02-06 (darco) : Raising multiple layers at the same time now works correctly +2004-02-06 (darco) : Encapsulating no longer puts the encapsulated layer at the top +2004-02-06 (darco) : Gradient previews are now antialiased +2004-02-06 (darco) : Fixed odd positioning of dialogs +2004-02-06 (darco) : Changed the BLine tool to have a more consistant user interface +2004-02-05 (darco) : Fixed a bug in the text layer regarding the size duck +2004-01-27 (darco) : Strokes in the draw tool should now draw better and undo better. +2004-01-27 (darco) : Added "fill last stroke" button to draw tool options +2004-01-27 (darco) : Auto crash-recovery feature now implemented! +2004-01-27 (darco) : Canvas should now only redraw when a value is truly changed. (ie: just opening a parameter and not changing it will now no longer force a redraw, or add a new action) +2004-01-24 (darco) : Improved consistancy of tool options dialog when working with several canvases at the same time +2004-01-24 (darco) : Fixed a bug with loading sketches where the loaded sketch would dissapear. +2004-01-23 (darco) : Fixed width duck size bug +2004-01-23 (darco) : Improved existing icons +2004-01-23 (darco) : Added new icons +2004-01-23 (darco) : Fixed bug where studio would ask you to commit file not in repository or sandbox +2004-01-22 (darco) : Initial version of the split layer tab +2004-01-21 (darco) : Changed the "default width" to "0.01" and the default increment to "0.005" +2004-01-21 (darco) : SINFG Studio will now ask you to commit your file to CVS upon exit if you haven't already. +2004-01-21 (darco) : Fixed bug where the color sliders in the gradient editor didn't work. +2004-01-21 (darco) : You can now load and save sketches +2004-01-19 (darco) : Minor fix for remembering settings +2004-01-19 (darco) : Added "Auto Loop" and "Auto Connect" toggles to the tool options for the draw tool. +2004-01-19 (darco) : Tool options for the draw tool are now retained between sessions. Tool options can also be customized for specific input devices.(that last part may be slightly buggy) +2004-01-19 (darco) : Added a "show sketch" toggle to the tool options for the scribble tool. This allows you to temporarily hide the sketch. +2004-01-19 (darco) : changed default grid size from 0.2,0.2 to 0.25,0.25 +2004-01-17 (darco) : Individual input devices should now remember their associated settings +2004-01-17 (darco) : Dialogs should now remember their positions +2004-01-17 (darco) : Added some tool options for draw tool +2004-01-16 (darco) : Tool Options dialog has been implemented. Currently the only tool that supports it is the sketch tool +2004-01-16 (darco) : You can now clear the sketch area via the tool options dialog when the sketch tool is selected +2004-01-16 (darco) : Changes in the color dialog are now immediately reflected in whatever is in context. (As opposed to having to always hit "apply") +2004-01-16 (darco) : Sketch tool is now persistant. Still needs some work--as it stands, you can't undo or turn off the sketch without closing the file and opening it up again. +2004-01-15 (darco) : Added preliminary version of the sketch tool. This version doesn't suport colors, or persist across different tools yet. This support is on the way. +2004-01-15 (darco) : Renamed tools +2004-01-14 (darco) : Updates for supporting new BLines +2004-01-14 (darco) : Import tool now respects the width and height of a bitmap when placing it +2004-01-13 (darco) : Added support for multiple-line strings (for layers such as the Text layer) +2004-01-13 (darco) : Added low-resolution mode to work area to speed up render times. You can toggle it on and off via the View->ToggleLow-Res menu item. (Low-res mode is ON by default) +2004-01-09 (darco) : drawing onto the start or end of an existing BLine will now extend it rather than creating a new BLine +2004-01-09 (darco) : You can now delete canvases from the canvas browser. +2004-01-07 (adruab) : Pen sample grouping, gets rid of small errors in line, but also tends to cause breaking to occur at lower curvatures than it should +2004-01-06 (darco) : Preliminary support for creating regions now implemented. It is EXTREMELY buggy, but it gives you an idea of what you can do with it. +2004-01-06 (darco) : I fixed an error that is probably the source for many of the random crashes that seem to occur. +2004-01-05 (darco) : Individual input devices (mouse, wacom tablet, etc) will now remember their associated tool, color, and BLine width. These settings are not yet saved on program exit--this will be implemented in the future. +2004-01-05 (darco) : You can now adjust the default BLine size by directly clicking up the upper or lower part of the BLine size indicator. +2004-01-05 (darco) : You can now draw looped blines in the sketch tool. +2004-01-02 (adruab) : Fixed weird reversing tangents bug +2004-01-01 (adruab) : Added tangent breaking to the curve input tool (first post of 2004 :P) +2003-12-28 (adruab) : Fixed the dumb adaptive tesselator, and put pressure sensitivity back in +2003-12-28 (adruab) : Finished the "dumb" adaptive curve tesselator (-bugs) +2003-12-28 (darco) : Added physical dimensions to properties and render dialogs +2003-12-24 (darco) : The clicking-too-fast bug should be fixed +2003-12-24 (darco) : Added Fill Tool +2003-12-23 (darco) : Preliminary support for automatic vertex connection when scribbiling in the new rotoscope tool +2003-12-19 (darco) : Fix for last vertex width being wrong when drawing +2003-12-18 (darco) : The zero-tangent bug with the new rotoscope should also be fixed +2003-12-18 (darco) : Tangent handles are now turned off when rotoscoping +2003-12-18 (darco) : Improved pressure sensitivity. +2003-12-18 (darco) : Pressure sensitivity... :) +2003-12-18 (darco) : Preliminary tablet support now implemented +2003-12-17 (darco) : A handful of under-the-hood tweaks that should make using the program a tad more friendly. +2003-12-17 (darco) : Improvements to the new rotoscope +2003-12-17 (darco) : Creating a new layer will now insert it at the depth of the currently selected layer +2003-12-03 (darco) : The place-holder for the new rotoscope now creates blines +2003-12-03 (darco) : Fixed minor bug with disconnecting value nodes +2003-12-02 (darco) : Improved about dialog graphic +2003-12-02 (darco) : When you open a really big canvas, it is now auto-zoomed out to fit the window. +2003-12-01 (darco) : Tool buttons can now show you which tool is currently active. +2003-11-29 (darco) : Changed default aspect ratio of new composition from 4:3 to 16:9 +2003-11-29 (darco) : Changed default resolution of new composition from 75dpi to 72dpi +2003-11-29 (darco) : Added locks&links to properties dialog. +2003-11-29 (darco) : Converted resolution in Properties from Dots-per-meter to Dots-per-inch +2003-11-29 (darco) : Added stub for new rotoscope tool. It doesn't do much at the moment other than let you temporarily draw over the window. +2003-11-25 (darco) : Removed the useless red-blue selection +2003-11-18 (darco) : Fixed weird crash-bug when importing compositions +2003-11-13 (darco) : Fixed bug where encapsulating might re-order the layers +2003-11-12 (darco) : Opening a new large composition will no longer result in un-weildly large canvas windows. +2003-11-12 (darco) : Improved all of the CVS command. +2003-11-12 (darco) : "CVS Add" will no longer ask you for a log entry. You enter the log entry when you "commit" +2003-11-12 (darco) : Using "saveas" will now append ".sif" to the filename if you didn't specify an extension. +2003-11-10 (darco) : The default value increment/decrement for the Waypoint Dialog has been changed from 1.0(which is fairly useless) to 0.1. (This is mostly for the TCB controls) +2003-11-10 (darco) : Ducks now (for the most part) are always accurate with respect to what they are visually representing. They are now context-sensitive. :) +2003-11-06 (darco) : You can now import other SINFG compositions in the exact same way you would import any other image. +2003-11-06 (darco) : Added "remove" to waypoint right-click menu. +2003-11-05 (darco) : Fixed a refresh bug with the time window and the children tab +2003-11-05 (darco) : Added the ability to duplicate waypoints +2003-10-31 (darco) : Grid snap now works again +2003-10-31 (darco) : Added "Jump" column to keyframe tab +2003-10-31 (darco) : MUCH IMPROVED support for selecting and moving multiple ducks +2003-10-30 (darco) : Preliminary support for selecting and moving multiple ducks +2003-10-28 (darco) : Fixed CVS-MODIFIED bug due to daylight-saving time +2003-10-22 (darco) : Added some CVS features (Although their usefulness is limited in windows) +2003-10-22 (darco) : Fixed some weirdness with undo/redo/refresh +2003-10-21 (darco) : Fixed some rotoscope weirdness +2003-10-21 (darco) : Minor improvement for confusing behavior of progress bar when rendering +2003-10-21 (darco) : A dialog box will now pop up whenever it is unable to open a composition +2003-10-21 (darco) : Added placeholders for icons +2003-10-21 (darco) : Fixed most (all?) of the crazy Gtk/Glib errors. +2003-10-19 (darco) : Fixed a bug where the "Use Current Frame" option in the Render Dialog was not being checked properly (meaning you couldn't render animatons) +2003-10-15 (darco) : Added eyedrop tool icon +2003-10-15 (darco) : Improved scrolling of work area +2003-10-15 (darco) : Added Eyedrop tool +2003-10-11 (darco) : Changed default undo/redo behavior to NOT clear the "redo" stack when a new action is performed. (the previous action was to clear the redo stack) +2003-10-11 (darco) : Fixed some weirdness with the children tab +2003-10-11 (darco) : Several speed improvements for the tables. This will greatly speed up loading files, editing values, and adjustments to keyframes. +2003-10-10 (darco) : The "Zoom to 100%" feature can now be accessed by pressing the "`" key. (This is the that has the "~" on it) +2003-10-10 (darco) : The "Zoom to 100%" feature will not "toggle", meaning that if you are alreay at a "100%" zoom level, then it will return to the previous zoom amount. +2003-10-08 (darco) : Fixed first/last point on looped bline not being splitable from the work area duck. +2003-10-07 (darco) : Fixed weird idle->rendering->idle->rendering switching bug +2003-10-07 (darco) : Added blend_method option to layer tab +2003-10-07 (darco) : Added amount slider to Layer tab +2003-10-07 (darco) : Layers are now categorized +2003-10-06 (darco) : Added red-blue gamma adjustment to setup dialog +2003-10-06 (darco) : Implemented Image Import Tool. (CTRL-I) +2003-10-06 (darco) : The Ducks in the Work Area are now more percisely placed. (Especially obvious for radiuses) +2003-10-06 (darco) : Implemented adjustable default BLine width. To adjust it, use the scroll wheel on your mouse. +2003-10-06 (darco) : Fixed bug where changing parameters may not always refresh the work area. (AGAIN) +2003-10-06 (darco) : Fixed dragging-layer-into-inline-canvas crash bug. +2003-10-06 (darco) : Removed activepoint-specific actions for non-animated canvases +2003-10-04 (darco) : Fixed bug where when dragging a layer below it ends up being one off. +2003-10-04 (darco) : Added button to toolbox for quickly displaying the color dialog +2003-10-04 (darco) : Fixed some minor consistancy issues regarding the layer tab. (ie: disconnections not being visible...) +2003-10-04 (darco) : You can now sort the ValueNodes in the Children tab +2003-10-04 (darco) : Fixed bug where changing parameters may not always refresh the work area. +2003-10-04 (darco) : Hopefuly fixed "dissapearing new layer menu" bug +2003-10-03 (darco) : Preliminary support for editing layer descriptions +2003-09-30 (darco) : Changing a canvas parameter now no longer requires you to click elsewhere before it takes effect. +2003-09-30 (darco) : Changing an Enum parameter now no longer requires you to click elsewhere before it takes effect. +2003-09-30 (darco) : The Keyframe tab and the TimeTrack columns are now hidden when the canvas's start and end times are equal (ie: if it isn't animated) +2003-09-30 (darco) : Added hotkey for toggling grid snap -- CONTROL-L +2003-09-30 (darco) : Added hotkey for toggling the grid -- CONTROL-G +2003-09-30 (darco) : Right clicking on the default colors (in the toolbox) will swap the FG and BG colors. +2003-09-30 (darco) : Right clicking on the default gradient (in the toolbox) will revert it back to being the FG->BG gradient. +2003-09-30 (darco) : Added several keyboard accelerators. F8="Properties Dialog", F9="Render", F12="Options" +2003-09-30 (darco) : Added "SaveAs..." to CanvasView "File" menu. +2003-09-30 (darco) : The "Escape" key is now bound to the stop button. +2003-09-30 (darco) : Added red-border visual queue for when we are in animate mode. +2003-09-30 (darco) : You can now right click on layers inside of the work area and raise/lower them +2003-09-30 (darco) : Added the ability to change the render quality of the work area. (View->PreviewQuality) +2003-09-30 (darco) : You can now loop/unloop BLines and DynamicLists by right clicking on them. +2003-09-30 (darco) : You can now halt rendering by pressing the stop button +2003-09-30 (darco) : Improved BLine editing via BLine Rotoscope tool. You now insert points by right clicking on the curve rather than the vertex. +2003-09-29 (darco) : Improved layer Drag-N-Drop +2003-09-25 (darco) : Layers can now be rearanged via Drag-N-Drop +2003-09-25 (darco) : The BLine Rotoscope tool now automaticly uses more reasonable tangents +2003-09-24 (darco) : You can now select layers from the work area that are inside inline canvases by just clicking on them. +2003-09-24 (darco) : Selecting a layer from the work area will now cause the layer tab to scroll to make that layer visible. +2003-09-24 (darco) : Improved in-line canvas editing (now it doesn't collapse ever time you make a change) +2003-09-24 (darco) : Fixed the bug where the canvas wouldn't refresh if values were edited too quickly +2003-09-24 (darco) : Added some icons to dynamicly generated menus +2003-09-24 (darco) : Added jump-to-(next/prev)-keyframe feature (Press '[' and ']') +2003-09-24 (darco) : Added time-zoom feature (Hold down shift and press '-' and '=') +2003-09-24 (darco) : Fixed lagging duck bug +2003-09-23 (darco) : Color editor will now intelegently clamp values if necessary +2003-09-23 (darco) : Added "selected color" box to color editing dialog +2003-09-23 (darco) : Implemented keyboard accelerators for zoom. (GIMP style -- '-' for zoom out and '=' for zoom in) +2003-09-23 (darco) : Implemented keyboard accelerators for Duck Hiding. (press ALT-1...6) +2003-09-23 (darco) : Angles can now be visually edited +2003-09-23 (darco) : Added "Split Tangents" action for BLinePoints +2003-09-23 (darco) : Added "Merge Tangents" action for BLinePoints +2003-09-23 (darco) : Added visual BLine width adjustment +2003-09-23 (darco) : Added smart dynamic list item remove and smart dynamic list item insert (works for BLines, too) +2003-09-22 (darco) : Implemented Duck Masking (see menu View->DuckMask from canvasview menu) +2003-09-22 (darco) : Implemented key accelerators in CanvasView... (eg: Ctrl-Z=Undo, Ctrl-S=Save, etc) +2003-09-22 (darco) : Added "Keyframe Lock" button +2003-09-17 (darco) : Added "Duplicate Keyframe" feature +2003-09-17 (darco) : Added "Remove Keyframe" feature +2003-09-17 (darco) : Finished SINFGApp re-write. +2003-09-05 (darco) : Added default foreground/background colors, as well as a default gradient. +2003-09-03 (darco) : Version Increment +2003-09-01 (darco) : If a given layer has a color parameter, then you can now edit the color of a layer by just selecting the layer and adjusting it's color in the color dialog. You can also adjust the color of all selected layers in this way. +2003-08-31 (darco) : Added color-selection dialog, improving the ease and intuitiveness of color selection. +2003-08-18 (darco) : Preliminary support for dynamic point removal. +2003-08-18 (darco) : Improved support for adding points dynamicly. +2003-08-14 (darco) : Preliminary support for animating the addition and removal of points +2003-08-12 (darco) : You can now right click on segments! To add a point ot a bline, right click on the segment where you want to add the point, and then select "add point". +2003-08-12 (darco) : You can now click on a layer in the work area and it will be selected. (Not yet supported for all layers) +2003-08-12 (darco) : Gradient editor now works. Right click on the gradient in the editor to display a menu for adding and removing CPoints. +2003-08-11 (darco) : You can now see ducks appear as you select children. This greatly improves the ability to edit and work with complex images. +2003-08-06 (darco) : The canvas browser is now hidden by default. When you first load a canvas, it will pop up automaticlly. +2003-08-06 (darco) : Added blacklevel test pattern to the gamma tab of the setup dialog. As with the other patterns, try to make the middle of the square match the outside of the square. The goal is to have the highest blacklevel setting where the blacklevel pattern looks solid black. +2003-08-06 (darco) : I am currently working on adding support for the color gradient editor. It isn't done yet, but if you double click on a gradient, you can bring up what will be the gradient editor. +2003-08-06 (darco) : Added "Visually Linear Color Selection" checkbox to the setup. This adjusts all color values that you see so that they are more linear in scale. The default is ON. +2003-08-05 (darco) : The "insert point" option in the rotoscope (bline) is being implemented. It currently only works for adding points to the start of the BLine. +2003-08-05 (darco) : The "delete point" option in the rotoscope (bline) now works. (Although, it seems to crash when you try to delete the most recent point. Investigating...) +2003-08-04 (darco) : The setup dialog now saves your changes to disk immediately. This makes is so that if the program crashes, then we don't loose our recently-updated changes +2003-08-04 (darco) : The setup dialog is now broken down into tabs. +2003-08-04 (darco) : Improved the speed of the gamma adjustments in the setup dialog. +2003-08-01 (darco) : Changes made to the setup dialog are now saved to disk, and will be automaticly reloaded upon restarting the program. +2003-08-01 (darco) : Setup dialog is now implemented, with visual gamma adjustments and the ability to choose the type of timestamp you want +2003-07-28 (darco) : Added gradients as viewable parameters. (the gradient editor isn't ready yet though) +2003-07-23 (darco) : Added buttons to the toolbar for poly and bline rotoscope +2003-07-21 (darco) : Faster window scrolling, and better tiling +2003-07-15 (darco) : For canvas parameters, you can now select canvases that are outside of the current canvas, even in other files +2003-07-14 (darco) : TCB controls now implemented +2003-05-22 (darco) : The time code in the canvas view work area will turn turn "red" if you are on a keyframe +2003-05-22 (darco) : Activepoint keyframe stuff was more broken than I realized, but it should work now.. +2003-05-22 (darco) : Activepoints can now be viewed in the track view. You can select them, but not much else. Red lines are "off" and green lines are "on" +2003-05-19 (darco) : Fixed a crashing bug that would sneak up while animating stuff. +2003-05-19 (darco) : Improved keyframe editing even more. +2003-05-08 (darco) : Improved keyframe editing. One step closer to "just working". *sigh* Ahh... Automagick... +2003-05-08 (darco) : Many, Many under the hood updates and cleanups +2003-04-27 (darco) : Adding a new layer now inserts it at the selected depth in the stack +2003-04-27 (darco) : Duplicating a layer now puts the clone layer next to the original layer +2003-04-24 (darco) : Preliminary support for keyframes/dope-sheet has now been implemented! +2003-04-23 (darco) : Fixed bug where new canvases would have weird time +2003-04-23 (darco) : You can now import image files into a canvas by dragging them onto the canvas window +2003-04-22 (darco) : Raising and lowering layers is now faster +2003-04-22 (darco) : Added some convenience buttons for raising and lowering the layers +2003-04-19 (darco) : Added timecode readout on keyframe view. (still rather non-functional) +2003-04-17 (darco) : PasteCanvas layers will now display the name of the canvas it is pasting instead of just "PasteCanvas" +2003-04-17 (darco) : You can now view and edit the contents of an inline canvas +2003-04-13 (darco) : Fixed crash bug when pressing render button on render dialog with empty filename +2003-04-13 (darco) : The render dialog now has a default file name. +2003-04-13 (darco) : On the Canvas Browser -- renamed "Undo/Redo" tab to "History" +2003-04-13 (darco) : The layer and children tables now do a better job of keeping in sync with the scene -- meaning that you don't have to hit "refresh" as often. +2003-04-13 (darco) : Fixed the bug where you could not see the polygon as you were rotoscoping it. +2003-04-11 (darco) : Fixed a bug in the time widget which would crash the program if you pressed "enter" and the de-focused it. +2003-04-11 (darco) : Start of significant under-the-hood updates +2003-04-11 (darco) : "Time Bar" now only appears when start time and end time are not equal. +2003-04-11 (darco) : Implemented the "move to top" and "move to bottom" +2003-04-07 (darco) : Changes to properties window of canvas is now undoable +2003-04-07 (darco) : Creation of Canvases is now undoable +2003-04-04 (darco) : Improved path rotoscope +2003-04-03 (darco) : Added "encapsulate" option to layer menu +2003-04-03 (darco) : All references to time now use the time code format. +2003-04-02 (darco) : Using the rotoscope tool to create a path is now WYSIWYG (Instead of just showing lines, you now see the curve and the control points) +2003-04-01 (darco) : Set the default frame-rate for new compositions to 30. +2003-03-31 (darco) : Tons of under-the-hood changes. +2003-03-31 (darco) : Added the ability to delete, raise, and lower items on a dynamic list +2003-03-31 (darco) : Added dialog box to path rotoscope +2003-03-26 (darco) : Removed the "ID" entrybox from the Canvas Properties when the canvas is root. +2003-03-26 (darco) : Set the default end-time for new compositions to ZERO. +2003-03-26 (darco) : Set the default frame-rate for new compositions to 15. +2003-03-22 (darco) : Added canvas options dialog +2003-03-22 (darco) : Added ability to adjust grid size + +2003-03-21 (darco) : Added "Delete" button to waypoint dialog + +2003-03-20 (darco) : Version Increment (0.60.03) +2003-03-20 (darco) : Added Waypoint dialog for editing waypoints + +2003-03-20 (darco) : Version Increment (0.60.02) +2003-03-20 (darco) : Names of DataNode parameters are now more readable +2003-03-20 (darco) : Removed "Rotoscope", added "Rotoscope Path" and "Rotoscope Poly" + +2003-03-19 (darco) : Added "Find" button to parameters that represent filenames + +2003-03-17 (darco) : Fixed a bug where the "Open Recent" list is reversed when restarting the program +2003-03-17 (darco) : Added an "Open Recent" option to the file menu on the toolbox. It remembers the last 10 files opened or saved. +2003-03-17 (darco) : Added target selection box to render dialog. +2003-03-17 (darco) : Added "Use current frame" checkbox to render dialog. + +2003-03-04 (darco) : Implemented Render Functionality. +2003-03-04 (darco) : Added support for "angle" type. +2003-03-04 (darco) : Deselecting a parameter-edit popup will now make it dissapear immediately, rather than after the refresh. + +2003-03-01 (darco) : The root canvas on a new composition is now clean, instead of having a mandelbrot set. + +2003-02-26 (darco) : Changed the file dialogs to use the native Win32 file open/save dialogs when built for Win32 rather than the nasty looking Gtk+ file dialogs. +2003-02-26 (darco) : Fixed Bug 0000007 (http://dev.sinfg.com/mantis/view_bug_page.php?f_id=0000007) diff --git a/synfig-studio/Makefile.am b/synfig-studio/Makefile.am new file mode 100644 index 0000000..af7326c --- /dev/null +++ b/synfig-studio/Makefile.am @@ -0,0 +1,145 @@ +# $Id$ + +MAINTAINERCLEANFILES = \ + COPYING \ + INSTALL \ + config/ltmain.sh \ + doxygen.cfg \ + config/config.guess \ + config/config.sub \ + config/ltmain.sh \ + config/install-sh \ + config/mkinstalldirs \ + config/aclocal.m4 \ + config/missing \ + config/texinfo.tex \ + config/depcomp \ + aclocal.m4 \ + config.h.in \ + configure \ + stamp-h.in \ + Makefile.in \ + config.log \ + config.status \ + .doc_stamp \ + .DS_Store + +SUBDIRS = \ + build_tools \ + src \ + images \ + po + +EXTRA_DIST = \ + COPYING \ + TODO \ + m4/subs.m4 \ + doxygen.cfg.in \ + doxygen.cfg \ + macosxbuild.sh \ + win32build.sh \ + win32inst.nsi.in \ + config/package \ + config/depcomp \ + m4/cxx_macros.m4 \ + m4/ETL.m4 \ + ChangeLog.old \ + synfigstudio.xml.in \ + synfigstudio-thumbnailer.schemas.in + + +# Desktop entry +desktopdir = $(prefix)/share/applications +desktop_DATA = synfigstudio.desktop + +# @INTLTOOL_DESKTOP_RULE@ + +mimedir = $(prefix)/share/mime-info +mime_DATA = synfigstudio.keys synfigstudio.mime + +# Icon +icondir = $(datadir)/pixmaps +icon_DATA = images/synfig_icon.png images/sif_icon.png + +ACLOCAL_AMFLAGS=-I m4 + +GREP=grep +PRINTF=printf +SH=sh +DOXYGEN=doxygen +#SVN_REPOSITORY=@SVN_REPOSITORY@ + +SVN=svn +TAG=@PACKAGE_TARNAME@_@VERSION_MAJ@_@VERSION_MIN@_@VERSION_REV@ + + +tagstable: + -$(SVN) delete $(SVN_REPOSITORY)/tags/stable -m "Stable Tag: Removing old tag" + $(SVN) copy $(top_srcdir) $(SVN_REPOSITORY)/tags/stable -m "Stable Tag: Copying everything over" + +tagrelease: + $(SVN) copy $(top_srcdir) $(SVN_REPOSITORY)/tags/$(TAG) -m "Release $(TAG)" + +ChangeLog: + -svn update + svn2cl --include-rev || touch ChangeLog + +stats: + -@echo + -@echo -- Stats + -@echo + -@$(PRINTF) "Total lines: " + -@wc -l $(shell find $(top_srcdir)/src -name '*.[ch]*' | $(GREP) -v libavcodec) | $(GREP) total + -@$(PRINTF) "Total size: " + -@du -hcs $(shell find $(top_srcdir)/src -name '*.[ch]*' | $(GREP) -v libavcodec) | $(GREP) total + -@echo + +listfixmes: + -@echo + -@echo -- List of pending FIXMEs + -@echo + -@$(GREP) FIXME -n $(shell find $(top_srcdir) -name '*.[ch]*' | grep -v svn) + -@echo + +listhacks: + -@echo + -@echo -- List of pending HACKs + -@echo + -@$(GREP) HACK -n $(shell find $(top_srcdir) -name '*.[ch]*' | grep -v svn) + -@echo + +run: check + +.doc_stamp: doxygen.cfg + $(DOXYGEN) doxygen.cfg + touch .doc_stamp + +package-win32: all win32inst.nsi + convert images/installer_logo.png bmp3:images/installer_logo.bmp + make -C images sif_icon.ico synfig_icon.ico + grep -v -e 'installer_logo' -e 'sif_icon' images/images.nsh >images/images.nsh.tmp + grep -v -e 'installer_logo' -e 'sif_icon' images/unimages.nsh >images/unimages.nsh.tmp + mv -f images/images.nsh.tmp images/images.nsh + mv -f images/unimages.nsh.tmp images/unimages.nsh + makensis win32inst.nsi + +package-osx: all pkg-info/macosx/synfig-studio.info + [ -d pkg_root ] && $(RMDIR) pkg_root || true + convert images/installer_logo_osx.png $(srcdir)/pkg-info/macosx/studio-resources/background.tif + make install prefix="`pwd`/pkg_root" + $(srcdir)/config/package pkg_root pkg-info/macosx/synfig-studio.info -r $(srcdir)/pkg-info/macosx/studio-resources +if WIN32_PKG +package: package-win32 +else +if MACOSX_PKG +package: package-osx +endif +endif + +html: .doc_stamp + +rtf: .doc_stamp + +docs: pdf html + +.PHONY: stats tagstable tagrelease listfixmes listhacks check docs pdf html rtf diff --git a/synfig-studio/NEWS b/synfig-studio/NEWS new file mode 100644 index 0000000..eb16f4b --- /dev/null +++ b/synfig-studio/NEWS @@ -0,0 +1,147 @@ + synfigstudio releases + +More detailed notes are available on the releases page: + +http://synfig.org/Releases + + 0.61.09 (SVN 2114) - October 21, 2008 - Bug fixes, features + + * Fix building synfigstudio in the fink distribution + * Improved plant layer + * Added new options for Circle and Rectangle tools + * Added Text and Star tools. + * Added new plant, text, star and polygon icons + * Added Spanish, French and Catalan translations + * Added "Link to Bline" feature + * Improved main window zoom behaviour and added new zoom icons + * Several fixes and improvements on timetrack slider and waypoints drawing + * Depreciate Manual as interpolation type + * Added new icons for reset and swap FG and BG colors. Re-arrange them + to show properly in all GTK themes + * Added some improvements in the Render Description + * Improved GUI for the sound selection dialog + * When adding layers leave the previously selected layer selected + * Button tools are arranged in the Tool box + * Added and fixed some keyboard shortcuts + * Show only shared compatible parameters when more than one layer is selected + * Added more functionality to colour and time sliders + * Added new 'Document' tab in Setup dialog for more user preferences + * Fixed some crashes and errors + * Width tool returned to the Tool Box by default. + + 0.61.08 (SVN 1839) - March 3, 2008 - Bug fixes, features + + * Update the website URL to synfig.org instead of synfig.com + * Synfig is now translatable using gettext + * Removed the 'bootstrap' script for building. Use autoreconf instead + * Fixed errors and warnings detected by a pre-release version of GCC 4.3 + * Fixes to allow sigc++ 2.1 and newer to be used. + * Add a new bog-standard about dialog and a new splash screen + * Add a new icons for rename, encapsulate, show child layers and time + * Usability enhancements for new users, env vars to control them + * Improvements to the draw, bline and sketch tools + * Improvements for linking, quality menu, save dialog, render dialog + * Cut down on the console output and output a user-friendly message + * Don't wrap angles at 360 degrees, allows better rotations + * Settings for auto-backup interval, run everything in one thread + * Fix waypoint issues; drawing, menus, crash, label and others + * Fix time issues; time field expansion & editing, ticks and others + * Fix ducks issues; prioritise & restrict radius, show circle size, others + * Allow horizontal scrolling the time field and the default brush size + * Allow different pixel sizes in the workarea window + * Remember window locations and ignore corrupted values + * Widen the toolbox to 5 icons instead of 4 icons + * Tile renderer changes: disable with env var, fix wrong placing + * Improves the details in the history dialog quite a bit + * Fix typos, several crashes, usability and other issues + +0.61.07 (SVN 878) - October 10, 2007 - Bug fixes + + * Fix some tooltips and menu stuff (#1787437) + * Allow left-right scrolling in canvas window with shift + mouse-wheel + * Rework mouse interaction with ducks and tangents + * Move icons to a subdir + * Fix some typos, several crashes (#1780016, #1785598) and other bugs + * Re-enable sketch, draw, polygon by default + * Add keyboard shortcuts for all tools ( http://synfig.org/Keyboard_Shortcuts ) + * Fix crash when setting canvas resolution to zero (#1779616) + * Add 'auto-export' checkbox and layer name box to the draw tool + * Various GUI fixes (#1794006, #1796110) + * File-selector fixes (#1383736) + * Fix the View>Play menu entry to allow playback inside the workarea, shortcut Ctrl-P + * Save to .sifz (compressed) format by default if no extension is given + * Remember the path used when saving a document and default to it in future + * Call new documents "Synfig Animation " by default, rather than "untitled0" + * Don't quit until the user clearly answers "do you want to save?" (#1799722) + * Remember the filename the animation was last rendered to, and default to it (#1799250) + * Improved the 'Groups' function a little (#1368694). It's still quite broken + * Fixed the colors displayed on the sliders in the Color Editor dialog + * Added option to Bline Tool to allow positions to be automatically linked (#1776156) + * Added menu entry to restore all dialogs to their default positions + * Fix red "Animate Editing Mode" frame so it shows up in all themes (#1801220) + * Allow user to "export SYNFIG_DISABLE_POPUP_WINDOWS=1" to make splash screen etc. less obtrusive + * Fixed the logic used to decide which value to use when linking values together + * Update child canvas time sliders when parent time slider is moved + * Prevent the caret menu entries from being disabled when another canvas is closed + * Show the correct initial quality level in the View > Preview Quality menu + + 0.61.06 (SVN 543) - June 20, 2007 - Bug fixes + + * Fix amd64 issues + * Fix corruption of gamma settings + * Fix manipulating layers in the layer dialog + * Disable the timebar instead of hiding it + * Fix File -> Close & input devices close button + * Fix targets that crash in synfigstudio + * Fix some doxygen warnings + * Fixes in the sketch tool + * Fixes in the draw tool + * Fix several crashes + * Fix bline looping + * Misc Win32 fixes + * Add optional GNOME thumbnailer + * Rework several dialogs to use GNOME HIG + * Disable several tools, see FAQ to re-enable + * Disable the empty Palette Browser dialog + * Add mousewheel support in canvas windows + * Add tooltips to preview window & give it a default size + * Display HTML values in the colour dialog + * Add an icon for the curves dialog + * New Tango ArtLibreSet styled icons by PXEGeek + + 0.61.05 (SVN 128) - February 27, 2006 - build issues + + * Fixed building with gtkmm 2.8 (#1373933, #1358304) + * Allow the toolbox to come to the front (#1367916) + * Make the user prefs dir configurable at build time + * Fixed minor build issues + + 0.61.04 (SVN 103) - January 10, 2006 - MacOS X packaging + + * Fixes for the MacOS X packaging + + 0.61.03 - December 8, 2005 - Build & copyright fixes + + * Update more old copyright and licence notices + * Fully fix building with GCC 4 + + 0.61.02 - November 26, 2005 - Build fixes + + * Better Win32 / MacOS X packaging + * Use new GTK+ file chooser + * Adds some GCC 4 tweaks + * Fixes crash on layer reorder + * Include errno.h where needed + * Other tweaks + + 0.61.01 - November 6, 2005 - Copyright updates + + * Update old copyright and licence notices + * Add ./configure options for debug, warnings, optimisation, profiling + * Uses per-os directory separator + * Add TODO file + + 0.61.00-39 - November 1, 2005 - Developer preview + + * First public release! + diff --git a/synfig-studio/README b/synfig-studio/README new file mode 100644 index 0000000..6bd0973 --- /dev/null +++ b/synfig-studio/README @@ -0,0 +1,57 @@ + synfigstudio -- vector animation studio + +synfig is a vector based 2D animation package. It is designed to be +capable of producing feature-film quality animation. It eliminates the +need for tweening, preventing the need to hand-draw each frame. synfig +features spatial and temporal resolution independence (sharp and smooth +at any resolution or framerate), high dynamic range images, and a +flexible plugin system. + +synfigstudio is the animation studio for synfig and provides the GUI +interface to create synfig animations which are saved in synfig .sif +format. + +Links + +Web: http://synfig.org/ +Code: http://synfig.org/Source_code +Proj: http://sf.net/projects/synfig/ +IRC: irc://irc.freenode.net/synfig + +Please use the IRC channel and the sf.net tracker to get support and +report bugs, request features and submit patches. + +Copyright + +Copyright 2002 Robert B. Quattlebaum Jr. +Copyright 2002 Adrian Bentley +Copyright 2006 Yue Shi Lai +Copyright 2007-2008 Chris Moore +Copyright 2007-2008 Paul Wise +Copyright 2008 Aurore D. +Copyright 2008 Gerald Young +Copyright 2008 David Roden +Copyright 2008 Daniel Hornung +Copyright 2008 Carlos López +Copyright 2008-2009 Gerco Ballintijn + +Some of the icons are placed in the Public Domain by Chris Norman +Some of the icons are placed in the Public Domain by Carlos López González +Some of the artwork is placed in the Public Domain by Franco Iacomella and Carlos López González + +Licence + +This package is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of +the License, or (at your option) any later version. + +This package is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +or visit http://www.gnu.org/licenses/gpl.html diff --git a/synfig-studio/TODO b/synfig-studio/TODO new file mode 100644 index 0000000..0e822d2 --- /dev/null +++ b/synfig-studio/TODO @@ -0,0 +1,32 @@ +## FIXMEs ## + +* Install freedesktop.org mime info +* Install gnome thumbnailer + +## General ## + +* Re-implement draw tool +* Re-implement WorkArea class to use OpenGL +* Migrate toward extensible plug-in architecture +* Migrate toward scripted architecture +* Ability for "Auto Recover" feature to recover history +* Ability to edit curves in the curves tab. +* Subversion integration +* Integrated error console tab +* Clean up crazy confusing console output +* Implement palette browser feature +* Move to icon theming so synfig icons can be customised +* Switch icon naming to Tango and ArtLibreSet + +## Wishful Thinking ## + +* Visual conflict resolution for version control merging conflicts + +## Long Term ## + +* Make majority of user-interface components controlled by scripts + +## User-requested features ## + +http://synfig.org/Wish_list +http://sf.net/tracker/?group_id=144022&atid=757419 diff --git a/synfig-studio/build_tools/Makefile.am b/synfig-studio/build_tools/Makefile.am new file mode 100644 index 0000000..29b053f --- /dev/null +++ b/synfig-studio/build_tools/Makefile.am @@ -0,0 +1,8 @@ +dist_noinst_SCRIPTS = autorevision.sh + +all-local: + sh $(srcdir)/autorevision.sh "$(top_srcdir)" "$(top_builddir)" + +clean-local: + -rm -f $(top_builddir)/autorevision.h + diff --git a/synfig-studio/build_tools/autorevision.sh b/synfig-studio/build_tools/autorevision.sh new file mode 100644 index 0000000..d8a5c8b --- /dev/null +++ b/synfig-studio/build_tools/autorevision.sh @@ -0,0 +1,108 @@ +#!/bin/sh + +# Copyright 2008 Paul Wise +# Copyright 2009 Konstantin Dmitriev +# +# This package is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This package is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +get_git_id(){ + export SCM=git + export REVISION_ID=`cd "$1"; git log --no-color -1 | head -n 1 | cut -f 2 -d ' '` + export BRANCH="`cd "$1"; git branch -a --no-color --contains HEAD | sed -e s/\*\ // | sed -e s/\(no\ branch\)// | tr '\n' ' ' | tr -s ' ' | sed s/^' '//`" + if ( echo $BRANCH | egrep origin/master > /dev/null ); then + #give a priority to master branch + BRANCH='master' + else + BRANCH=`echo $BRANCH | cut -d ' ' -f 1` + BRANCH=${BRANCH##*/} + fi + export REVISION=`git show --pretty=format:%ci HEAD | head -c 10 | tr -d '-'` + export COMPARE=`git rev-parse --git-dir` + # The extra * at the end is for Modified + #REVISION="$REVISION"`cd "$1"; [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"` +} + +get_git_svn_id(){ + export SCM=git-svn + export REVISION=`cd "$1"; git svn find-rev HEAD` + export COMPARE="$1/.git/" + if [ x = "x$REVISION" ] ; then + # The extra M at the end is for Modified + export REVISION=`cd "$1"; git svn find-rev \`git rev-list --max-count=1 --grep='git-svn-id: ' HEAD\``M + else + export REVISION="$REVISION"`cd "$1"; git diff --quiet HEAD || echo M` + fi +} + +get_svn_id(){ + export SCM=svn + export REVISION=`cd "$1"; svnversion || svn info | sed -n 's/^Revision: \(.*\)/\1/p'` +} + + +HEADER="$2/autorevision.h" +SCM=none + + +if [ ! -f "$HEADER" ] ; then + touch -t 197001010101 "$HEADER" +fi + + +# Extract the revision from SVN/git/etc +if git rev-parse --git-dir > /dev/null 2>&1 ; then + get_git_id "." +elif [ -d "$1/.git/svn" ] ; then + get_git_svn_id "$1" +elif [ -d "$1/../.git/svn" ] ; then + get_git_svn_id "$1/.." +elif [ -d "$1/../../.git/svn" ] ; then + get_git_svn_id "$1/../.." +elif [ -d "$1/.svn" ] ; then + COMPARE="$1/.svn" + get_svn_id "$1" +elif [ -d "$1/_svn" ] ; then + COMPARE="$1/_svn" + get_svn_id "$1" +fi + + +# Allow overriding both REVISION and DEVEL_VERSION +if [ -f "$2/autorevision.conf" ] ; then + SCM=manual + . "$2/autorevision.conf" +fi + + +# Abort if the header is newer +if [ "$COMPARE" -ot "$HEADER" ] ; then exit; fi + +# Set the development version string +if [ x = "x$DEVEL_VERSION" ] ; then + if [ x != "x$REVISION" ] ; then + if [ $SCM = svn ] ; then + DEVEL_VERSION="SVN r$REVISION" + elif [ $SCM = git-svn ] ; then + DEVEL_VERSION="SVN r$REVISION (via git)" + elif [ $SCM = git ] ; then + DEVEL_VERSION="Revision: ${REVISION}\\\\nBranch: ${BRANCH}\\\\nRevision ID: ${REVISION_ID}" + elif [ $SCM = manual ] ; then + DEVEL_VERSION="$REVISION (manually configured)" + fi + fi +fi + + +# Output the header +if [ x != "x$DEVEL_VERSION" ] ; then + printf "#define SHOW_EXTRA_INFO\n" > "$HEADER" + printf "#define DEVEL_VERSION \"$DEVEL_VERSION\"\n" >> "$HEADER" +fi diff --git a/synfig-studio/config/ltmain.patch b/synfig-studio/config/ltmain.patch new file mode 100644 index 0000000..9d51a5c --- /dev/null +++ b/synfig-studio/config/ltmain.patch @@ -0,0 +1,17 @@ +--- ltmain.bak Thu Apr 7 19:12:55 2005 ++++ ltmain.sh Thu Apr 7 19:20:28 2005 +@@ -5362,10 +5362,10 @@ + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. +- if test "$inst_prefix_dir" = "$destdir"; then +- $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 +- exit 1 +- fi ++# if test "$inst_prefix_dir" = "$destdir"; then ++# $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 ++# exit 1 ++# fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. diff --git a/synfig-studio/config/package b/synfig-studio/config/package new file mode 100755 index 0000000..28b7896 --- /dev/null +++ b/synfig-studio/config/package @@ -0,0 +1,293 @@ +#! /bin/csh -ef +# this file was orignally distributed by Apple in the Developer Tools package +#it is distributed under the Apple Open Source License +set version=0.2 +set prog = `/usr/bin/basename $0` +set usage = "Usage: $prog [-f] root-dir info-file [tiff-file] [-d dest-dir] [-r resource-dir] [-traditional | -gnutar] [-bzip]" +set noglob + +if (-x /usr/bin/mkbom) then + set mkbom=/usr/bin/mkbom + set lsbom=/usr/bin/lsbom +else + set mkbom=/usr/etc/mkbom + set lsbom=/usr/etc/lsbom +endif + +if (-x /usr/bin/awk) then + set awk=/usr/bin/awk +else + set awk=/bin/awk +endif +set bzip2=`which bzip2` +set gnutar=/usr/bin/gnutar +set tar=/usr/bin/tar +set pax=/bin/pax + +# gather parameters +if ($#argv == 0) then + echo $usage + exit(1) +endif +unset usebzip +while ( $#argv > 0 ) + switch ( $argv[1] ) + case -d: + if ( $?destDir ) then + echo ${prog}: dest-dir parameter already set to ${destDir}. + echo $usage + exit(1) + else if ( $#argv < 2 ) then + echo ${prog}: -d option requires destination directory. + echo $usage + exit(1) + else + set destDir = $argv[2] + shift; shift + breaksw + endif + case -f: + if ( $?rootDir ) then + echo ${prog}: root-dir parameter already set to ${rootDir}. + echo $usage + exit(1) + else if ( $#argv < 2 ) then + echo ${prog}: -f option requires package root directory. + echo $usage + exit(1) + else + set rootDir = $argv[2] + set fflag + shift; shift + breaksw + endif + case -r: + if ( $?resDir ) then + echo ${prog}: resource-dir parameter already set to ${resDir}. + echo $usage + exit(1) + else if ( $#argv < 2 ) then + echo ${prog}: -r option requires package resource directory. + echo $usage + exit(1) + else + set resDir = $argv[2] + shift; shift + breaksw + endif + case -traditional: + echo useing standard tar + set usetar + unset usegnutar + unset usepax + breaksw + case -gnutar: + echo using gnutar + set usegnutar + unset usepax + unset usetar + shift + case -bzip: + if (-x $bzip2) then + set usebzip + echo using bzip compression + else + echo COMPRESSION ERROR: You can not use BZIP2 you do not have it installed + exit(1) + endif + shift + breaksw + case -*: + echo ${prog}: Unknown option: $argv[1] + echo $usage + exit(1) + case *.info: + if ( $?info ) then + echo ${prog}: info-file parameter already set to ${info}. + echo $usage + exit(1) + else + set info = "$argv[1]" + shift + breaksw + endif + case *.tiff: + if ( $?tiff ) then + echo ${prog}: tiff-file parameter already set to ${tiff}. + echo $usage + exit(1) + else + set tiff = "$argv[1]" + shift + breaksw + endif + default: + if ( $?rootDir ) then + echo ${prog}: unrecognized parameter: $argv[1] + echo $usage + exit(1) + else + set rootDir = "$argv[1]" + shift + breaksw + endif + endsw +end + +# check for mandatory parameters +if ( ! $?rootDir ) then + echo ${prog}: missing root-dir parameter. + echo $usage + exit(1) +else if ( ! $?info) then + echo ${prog}: missing info-file parameter. + echo $usage + exit(1) +endif + +# destDir gets default value if unset on command line +if ( $?destDir ) then + /bin/mkdir -p $destDir +else + set destDir = . +endif + +# derive the root name for the package from the root name of the info file +set root = `/usr/bin/basename $info .info` + +# create package directory +set pkg = ${destDir}/${root}.pkg +echo Generating Installer package $pkg ... +if ( -e $pkg ) /bin/rm -rf $pkg +/bin/mkdir -p -m 755 $pkg +/bin/mkdir -p -m 755 $pkg/Contents +/bin/mkdir -p -m 755 $pkg/Contents/Resources +/bin/mkdir -p -m 755 $pkg/Contents/Resources/English.lproj/ +echo "gxpmpkg2" >$pkg/Contents/PkgInfo +chmod 755 $pkg/Contents/PkgInfo +# (gnu)tar/pax and compress root directory to package archive +echo -n " creating package archive ... " +if ( $?fflag ) then + set pkgTop = ${rootDir:t} + set parent = ${rootDir:h} + if ( "$parent" == "$pkgTop" ) set parent = "." +else + set parent = $rootDir + set pkgTop = . +endif +if ( $?usetar ) then + set pkgArchive = $pkg/Contents/Resources/$root.tar.Z + (cd $parent; $tar -w $pkgTop) | /usr/bin/tar -f -c > $pkgArchive +else if ( $?usegnutar ) then + if ( $?usebzip ) then + set pkgArchive = $pkg/Contents/Resources/$root.tar.bz2 + (cd $parent; $gnutar c $pkgTop) | $bzip2 -f -c > $pkgArchive + else + set pkgArchive = $pkg/Contents/Resources/$root.tar.gz + (cd $parent; $gnutar zcf $pkgArchive $pkgTop) + endif +else + set pkgArchive = $pkg/Contents/Resources/$root.pax.gz + (cd $parent; $pax -w -z -x cpio $pkgTop) > $pkgArchive +endif +/bin/chmod 755 $pkgArchive +echo done. + +# copy info file to package +set pkgInfo = $pkg/Contents/Resources/English.lproj/$root.info +echo -n " copying ${info:t} ... " +/bin/cp $info $pkgInfo +/bin/chmod 755 $pkgInfo +echo done. + +# copy tiff file to package +if ( $?tiff ) then + set pkgTiff = $pkg/$root.tiff + echo -n " copying ${tiff:t} ... " + /bin/cp $tiff $pkgTiff + /bin/chmod 444 $pkgTiff + echo done. +endif + +# copy resources to package +if ( $?resDir ) then + echo -n " copying ${resDir:t} ... " + + # don't want to see push/pop output + pushd $resDir > /dev/null + # get lists of resources. We'll want to change + # permissions on just these things later. + set directoriesInResDir = `find . -type d | grep -v -e svn -e CVS` + set filesInResDir = `find . -type f | grep -v -e svn -e CVS` + popd > /dev/null + + # copy the resource directory contents into the package directory + foreach resFile (`cd $resDir && find . | grep -v svn`) + + cp -fr "$resDir/$resFile" "$pkg/Contents/Resources" + end + + pushd $pkg/Contents/Resources > /dev/null + # Change all directories to +r+x, except the package + # directory itself + foreach resFileItem ($directoriesInResDir) + if ( $resFileItem != "." ) then + chmod 755 "$resFileItem" + endif + end + # change all flat files to read only + foreach resFileItem ($filesInResDir) + if ( $resFileItem != "./.DS_Store" ) then + chmod 755 "$resFileItem" + endif + end + popd > /dev/null + + echo done. +endif + +# generate bom file +set pkgBom = $pkg/Contents/Resources/$root.bom +echo -n " generating bom file ... " +/bin/rm -f $pkgBom +if ( $?fflag ) then + $mkbom $parent $pkgBom >& /dev/null +else + $mkbom $rootDir $pkgBom >& /dev/null +endif +/bin/chmod 444 $pkgArchive +echo done. + +# generate sizes file +set pkgSizes = $pkg/Contents/Resources/$root.sizes +echo -n " generating sizes file ... " + +# compute number of files in package +set numFiles = `$lsbom -s $pkgBom | /usr/bin/wc -l` + +# compute package size when compressed +@ compressedSize = `/usr/bin/du -k -s $pkg | $awk '{print $1}'` +@ compressedSize += 3 # add 1KB each for sizes, location, status files + +@ infoSize = `/bin/ls -s $pkgInfo | $awk '{print $1}'` +@ bomSize = `/bin/ls -s $pkgBom | $awk '{print $1}'` +if ( $?tiff ) then + @ tiffSize = `/bin/ls -s $pkgTiff | $awk '{print $1}'` +else + @ tiffSize = 0 +endif + +@ installedSize = `/usr/bin/du -k -s $rootDir | $awk '{print $1}'` +@ installedSize += $infoSize + $bomSize + $tiffSize + 3 + +# echo size parameters to sizes file +echo NumFiles $numFiles > $pkgSizes +echo InstalledSize $installedSize >> $pkgSizes +echo CompressedSize $compressedSize >> $pkgSizes +echo done. +echo " ... finished generating $pkg." + +exit(0) + +# end package + diff --git a/synfig-studio/configure.ac b/synfig-studio/configure.ac new file mode 100755 index 0000000..dd93dbe --- /dev/null +++ b/synfig-studio/configure.ac @@ -0,0 +1,309 @@ +# $Id$ + +# -- I N I T -------------------------------------------------- + +AC_INIT([Synfig Studio],[0.61.09],[http://synfig.org/Bugs],[synfigstudio]) +AC_REVISION + +AC_CONFIG_AUX_DIR(config) +AC_CONFIG_HEADERS([config.h]) +AC_CANONICAL_HOST +dnl AC_CANONICAL_TARGET + +AM_INIT_AUTOMAKE +AM_MAINTAINER_MODE + +API_VERSION=0.0 + +# -- V A R I A B L E S ---------------------------------------- + +SVN_REPOSITORY=https://synfig.svn.sourceforge.net/svnroot/synfig/synfig-studio + +# -- P R O G R A M S ------------------------------------------ + +AC_PROG_CC +AC_GNU_SOURCE +AC_PROG_CXX +AC_PROG_CPP +AC_PROG_CXXCPP +AC_PROG_INSTALL + +AC_LANG([C++]) + + +AC_ARG_DEBUG + +case "$debug" in + yes) + AC_DEFINE(SHOW_EXTRA_INFO,[],[Show extra info in the about dialog]) + ;; +esac + +AC_ARG_OPTIMIZATION +AC_ARG_WARNINGS +AC_ARG_PROFILE_ARCS +AC_ARG_BRANCH_PROBABILITIES +AC_ARG_PROFILING + +AC_ARG_ENABLE(g5opt,[ + --enable-g5opt enable optimizations specific to G5 proc],[ + G5OPTFLAGS="-mpowerpc-gpopt -mno-multiple -mno-update -mcpu=970 -mtune=970 -falign-loops=16 -falign-functions=16" +], +[ + G5OPTFLAGS= +]) + +AC_WIN32_QUIRKS + +AC_LIBTOOL_WIN32_DLL +AC_LIBTOOL_DLOPEN +AC_DISABLE_STATIC +AC_ENABLE_SHARED +AC_PROG_LIBTOOL +AC_SUBST(LIBTOOL_DEPS) +AC_LIBTOOL_PATCH + +## FIXME: add i18n for .desktop and other non-compiled files +## AM_GLIB_GNU_GETTEXT([external]) +## AC_PROG_INTLTOOL(0.11) +ALL_LINGUAS="ca fr es ru" +AM_GNU_GETTEXT([external]) +# This is here so autoreconf will run autopoint +AM_GNU_GETTEXT_VERSION([0.15]) + +case "$host" in + *mingw* | *cygwin*) + AM_CONDITIONAL(WIN32_PKG, true) + AM_CONDITIONAL(MACOSX_PKG, false) + ;; + *darwin*) + AM_CONDITIONAL(WIN32_PKG, false) + AM_CONDITIONAL(MACOSX_PKG, true) + AC_DEFINE(USE_OPEN_FOR_URLS,[],[On MacOS X "open " works, on Linux it tries to open a virtual console.] ) + ;; + *) + AM_CONDITIONAL(WIN32_PKG, false) + AM_CONDITIONAL(MACOSX_PKG, false) + ;; +esac +# -- L I B R A R I E S ---------------------------------------- + +PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 gthread-2.0,[ + AC_MSG_CHECKING([for Gtk::AboutDialog::set_program_name]) + synfigstudio_save_cxxflags="$CXXFLAGS" + CXXFLAGS="$GTKMM_CFLAGS $CXXFLAGS" + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include ] + ],[ + [Gtk::AboutDialog about; about.set_program_name(PACKAGE_NAME)] + ]) + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_GTK_ABOUTDIALOG_SET_PROGRAM_NAME,[],[Define if GTKmm provides Gtk::AboutDialog::set_program_name()] ) + AM_CONDITIONAL(HAVE_GTK_ABOUTDIALOG_SET_PROGRAM_NAME,true) + ],[ + AC_MSG_RESULT([no]) + AM_CONDITIONAL(HAVE_GTK_ABOUTDIALOG_SET_PROGRAM_NAME,false) + ] + ) + CXXFLAGS="$synfigstudio_save_cxxflags" + AC_MSG_CHECKING([for Gtk::AboutDialog::set_wrap_license]) + synfigstudio_save_cxxflags="$CXXFLAGS" + CXXFLAGS="$GTKMM_CFLAGS $CXXFLAGS" + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([ + [#include ] + ],[ + [Gtk::AboutDialog about; about.set_wrap_license(true)] + ]) + ],[ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_GTK_ABOUTDIALOG_SET_WRAP_LICENSE,[],[Define if GTKmm provides Gtk::AboutDialog::set_wrap_license()] ) + AM_CONDITIONAL(HAVE_GTK_ABOUTDIALOG_SET_WRAP_LICENSE,true) + ],[ + AC_MSG_RESULT([no]) + AM_CONDITIONAL(HAVE_GTK_ABOUTDIALOG_SET_WRAP_LICENSE,false) + ] + ) + CXXFLAGS="$synfigstudio_save_cxxflags" +],[ + AC_MSG_ERROR([ ** Gtkmm-2.4 Is a required library, aborting.]) +]) +AC_SUBST(GTKMM_CFLAGS) +AC_SUBST(GTKMM_LIBS) + +PKG_CHECK_MODULES(SYNFIG, [synfig >= 0.61.09] [ETL >= 0.04.12] sigc++-2.0,,[ + AC_MSG_ERROR([ ** Unable to set up dependent libraries (synfig >= 0.61.09, ETL >= 0.04.12)]) +]) +AC_SUBST(SYNFIG_CFLAGS) +AC_SUBST(SYNFIG_LIBS) + +windowsys="gtkmm" +AC_DEFINE(STUDIO_WINSYS_H,"gtkmm/winsys.h",[blah]) +AM_CONDITIONAL(WINDOWSYS_GTKMM,true) + +AC_ARG_WITH(userdir,[ + --with-userdir=(dirname) Relative path to user directory],[ +],[ +case "$host" in + *mingw* | *cygwin*) + with_userdir="Synfig" + ;; + *darwin*) + with_userdir="Library/Synfig" + ;; + *) + with_userdir=".synfig" + ;; +esac +]) +AC_DEFINE_UNQUOTED(SYNFIG_USER_APP_DIR,"$with_userdir",[Synfig User Data Directory]) + +# --- FMOD CHECK ------------- +AC_ARG_WITH(libfmod,[ + --with-libfmod Enable support for FMOD],[ +],[ + AC_CHECK_LIB(fmod, FSOUND_Init,[ + with_libfmod="yes" + ],[ + with_libfmod="no" + ]) +]) +if test $with_libfmod = "yes" ; then { + AM_CONDITIONAL(WITH_FMOD,true) + FMOD_LIBS="/usr/lib/libfmod.so" + AC_DEFINE(WITH_FMOD,"I'm here damnit",[blah]) +} else { + AM_CONDITIONAL(WITH_FMOD,false) + FMOD_LIBS= +} ; fi + +# Check for unordered_map or hash_map headers +AC_MSG_CHECKING([for unordered_map::const_iterator]) +AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([ + [#include ] + ],[ + [std::tr1::unordered_map::const_iterator iter;] + ])],[ + AC_MSG_RESULT([yes]) + AC_DEFINE([HASH_MAP_CLASS],[HASH_MAP_NAMESPACE::unordered_map],[The template name for unordered maps.]) + AC_DEFINE([HASH_MAP_H],[],[The header file to include for unordered maps.]) + AC_DEFINE([HASH_MAP_NAMESPACE],[std::tr1],[The namespace for unordered maps.]) + AC_DEFINE([FUNCTIONAL_H],[],[The header file for hash.]) + AC_DEFINE([FUNCTIONAL_HASH_ON_STRING],[1],[Define to 1 if hash needs to use T=String rather than T=char* to hash strings.]) +],[ + AC_MSG_RESULT([no]) + AC_CHECK_HEADERS([ext/hash_map],[ + AC_DEFINE([HASH_MAP_CLASS],[HASH_MAP_NAMESPACE::hash_map],[The template name for unordered maps.]) + AC_DEFINE([HASH_MAP_H],[],[The header file to include for unordered maps.]) + AC_DEFINE([HASH_MAP_NAMESPACE],[__gnu_cxx],[The namespace for unordered maps.]) + AC_DEFINE([FUNCTIONAL_H],[],[The header file for hash.]) + ],[ + AC_MSG_ERROR([C++ compiler does not seem to support unordered containers]) + ]) +]) + +# Check for unordered_set or hash_set headers +AC_MSG_CHECKING([for unordered_set::const_iterator]) +AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([ + [#include ] + ],[ + [std::tr1::unordered_set::const_iterator iter;] + ])],[ + AC_MSG_RESULT([yes]) + AC_DEFINE([HASH_SET_CLASS],[HASH_SET_NAMESPACE::unordered_set],[The template name for unordered sets.]) + AC_DEFINE([HASH_SET_H],[],[The header file to include for unordered sets.]) + AC_DEFINE([HASH_SET_NAMESPACE],[std::tr1],[The namespace for unordered sets.]) +],[ + AC_MSG_RESULT([no]) + AC_CHECK_HEADERS([ext/hash_set],[ + AC_DEFINE([HASH_SET_CLASS],[HASH_SET_NAMESPACE::hash_set],[The template name for unordered sets.]) + AC_DEFINE([HASH_SET_H],[],[The header file to include for unordered sets.]) + AC_DEFINE([HASH_SET_NAMESPACE],[__gnu_cxx],[The namespace for unordered sets.]) + ],[ + AC_MSG_ERROR([C++ compiler does not seem to support unordered containers]) + ]) +]) + +# -- H E A D E R S -------------------------------------------- + +AC_CHECK_HEADERS([unistd.h signal.h fcntl.h]) +AC_CHECK_HEADERS([sys/types.h sys/wait.h sys/stat.h sys/time.h sys/resource.h sys/errno.h]) + +# -- T Y P E S & S T R U C T S -------------------------------- + +# -- F U N C T I O N S ---------------------------------------- + +AC_CHECK_FUNCS([fork]) +AC_CHECK_FUNCS([kill]) +AC_CHECK_FUNCS([pipe]) +AC_CHECK_FUNCS([setpriority mkfifo stat]) + +# -- A R G U M E N T S ---------------------------------------- + +# -- O U T P U T ---------------------------------------------- + +AC_SUBST(CFLAGS) +AC_SUBST(CPPFLAGS) +AC_SUBST(CXXFLAGS) +AC_SUBST(LDFLAGS) +AC_SUBST(SVN_REPOSITORY) + +AC_SUBST(API_VERSION) + +# fmod stuff... +AC_SUBST(FMOD_LIBS) + +imageext=png +AC_SUBST(imageext) + +imagedir="${datadir}/pixmaps/synfigstudio" +AC_SUBST(imagedir) + +AC_CONFIG_FILES([Makefile +build_tools/Makefile +doxygen.cfg +po/Makefile.in +synfigstudio.desktop +synfigstudio.mime +synfigstudio.keys +synfigstudio.xml +synfigstudio-thumbnailer.schemas +src/Makefile +src/gtkmm/Makefile +src/synfigapp/Makefile +images/Makefile +win32inst.nsi +pkg-info/macosx/synfig-studio.info +]) +AC_OUTPUT + +# -- S U M M A R Y -------------------------------------------- + +echo " +$PACKAGE_NAME v.$VERSION +Configuration Summary +- - - - - - + +Install Prefix -------------------> $prefix +Host Platform --------------------> $host +Icon Format ----------------------> $imageext +Debug Mode -----------------------> $debug +Profiling Mode -------------------> $profiling +Optimizations --------------------> $optimization +Window System --------------------> $windowsys +FMOD Enabled ---------------------> $with_libfmod + +"'$'"CXX ------------------------------> '$CXX' +"'$'"CXXFLAGS -------------------------> '$CXXFLAGS' +"'$'"LDFLAGS --------------------------> '$LDFLAGS' +"'$'"SYNFIG_CFLAGS ---------------------> '$SYNFIG_CFLAGS' +"'$'"SYNFIG_LIBS -----------------------> '$SYNFIG_LIBS' +"'$'"GTKMM_CFLAGS ---------------------> '$GTKMM_CFLAGS' +"'$'"GTKMM_LIBS -----------------------> '$GTKMM_LIBS' +" diff --git a/synfig-studio/debugcrash b/synfig-studio/debugcrash new file mode 100755 index 0000000..467bd6a --- /dev/null +++ b/synfig-studio/debugcrash @@ -0,0 +1,2 @@ +#!/bin/sh +gdb -nw --core=~/core src/gtkmm/.libs/lt-synfigstudio diff --git a/synfig-studio/doxygen.cfg.in b/synfig-studio/doxygen.cfg.in new file mode 100644 index 0000000..11cc015 --- /dev/null +++ b/synfig-studio/doxygen.cfg.in @@ -0,0 +1,1220 @@ +# Doxyfile 1.4.6 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = @PACKAGE@ + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = @VERSION@ + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = doc + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, +# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, +# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, +# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, +# Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explicit @brief command for a brief description. + +JAVADOC_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = "legal=\if legal" \ + endlegal=\endif \ + "writeme=\todo This needs to be documented further." \ + "stub=\todo This is a non-functional stub." \ + "optimize=\todo This needs to be optimized further." + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to +# include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = YES + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = NO + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = YES + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = NO + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = src + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py + +FILE_PATTERNS = *.h \ + *.hxx \ + *.hpp \ + *.cpp \ + *.cxx + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = src/template.cpp src/template.h + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = SYNFIG_NO_DEPRECATED \ + DOXYGEN_SKIP + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = gif + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that a graph may be further truncated if the graph's +# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH +# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), +# the graph is not depth-constrained. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, which results in a white background. +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO diff --git a/synfig-studio/images/Makefile.am b/synfig-studio/images/Makefile.am new file mode 100644 index 0000000..84e53fa --- /dev/null +++ b/synfig-studio/images/Makefile.am @@ -0,0 +1,305 @@ +SYNFIG = synfig + +EXT = @imageext@ + + +EXTRA_DIST = \ + installer_logo.sif \ + installer_logo_osx.sif \ + splash_screen.sifz \ + splash_screen-0.61.08.sif \ + splash_screen-0.61.07.sif \ + about_icon.sif \ + angle_icon.sif \ + bline_icon.sif \ + blinepoint_icon.sif \ + bool_icon.sif \ + canvas_icon.sif \ + canvas_pointer_icon.sif \ + children_icon.sif \ + circle_icon.sif \ + clear_redo_icon.sif \ + clear_undo_icon.sif \ + color_icon.sif \ + curves_icon.sif \ + draw_icon.sif \ + duplicate_icon.sif \ + encapsulate_icon.sif \ + eyedrop_icon.sif \ + fill_icon.sif \ + gradient_icon.sif \ + group_icon.sif \ + info_icon.sif \ + integer_icon.sif \ + keyframe_icon.sif \ + keyframe_lock_icon.sif \ + layer_icon.sif \ + list_icon.sif \ + logo.sif \ + meta_data_icon.sif \ + mirror_icon.sif \ + navigator_icon.sif \ + normal_icon.sif \ + pastecanvas_icon.sif \ + polygon_icon.sif \ + real_icon.sif \ + rectangle_icon.sif \ + rotate_icon.sif \ + saveall_icon.sif \ + scale_icon.sif \ + segment_icon.sif \ + select_all_child_layers_icon.sif \ + sif_icon.sif \ + sketch_icon.sif \ + smooth_move_icon.sif \ + string_icon.sif \ + reset_colors_icon.sif \ + swap_colors_icon.sif \ + synfig_icon.sif \ + synfig_icon.svg \ + time_icon.sif \ + time_track_icon.sif \ + valuenode_icon.sif \ + vector_icon.sif \ + wallpaper.sif \ + width_icon.sif \ + zoom_icon.sif \ + rename_icon.sif \ + plant_icon.sif \ + text_icon.sif \ + polyline_icon.sif \ + star_icon.sif \ + set_fill_color.sif \ + set_outline_color.sif \ + seek_begin.sif \ + seek_end.sif \ + seek_next_frame.sif \ + seek_prev_frame.sif \ + duck_position_icon.sif \ + duck_vertex_icon.sif \ + duck_tangent_icon.sif \ + duck_radius_icon.sif \ + duck_width_icon.sif \ + duck_angle_icon.sif \ + show_grid_icon.sif \ + snap_grid_icon.sif \ + onion_skin_icon.sif + + +IMAGES = \ + installer_logo.$(EXT) \ + installer_logo_osx.$(EXT) \ + mirror_icon.$(EXT) \ + time_icon.$(EXT) \ + time_track_icon.$(EXT) \ + curves_icon.$(EXT) \ + pastecanvas_icon.$(EXT) \ + group_icon.$(EXT) \ + clear_redo_icon.$(EXT) \ + clear_undo_icon.$(EXT) \ + navigator_icon.$(EXT) \ + info_icon.$(EXT) \ + zoom_icon.$(EXT) \ + meta_data_icon.$(EXT) \ + children_icon.$(EXT) \ + keyframe_icon.$(EXT) \ + reset_colors_icon.$(EXT) \ + swap_colors_icon.$(EXT) \ + rotate_icon.$(EXT) \ + scale_icon.$(EXT) \ + smooth_move_icon.$(EXT) \ + width_icon.$(EXT) \ + rectangle_icon.$(EXT) \ + circle_icon.$(EXT) \ + draw_icon.$(EXT) \ + sketch_icon.$(EXT) \ + fill_icon.$(EXT) \ + normal_icon.$(EXT) \ + select_all_child_layers_icon.$(EXT) \ + sif_icon.$(EXT) \ + synfig_icon.$(EXT) \ + saveall_icon.$(EXT) \ + bool_icon.$(EXT) \ + integer_icon.$(EXT) \ + angle_icon.$(EXT) \ + segment_icon.$(EXT) \ + blinepoint_icon.$(EXT) \ + list_icon.$(EXT) \ + canvas_pointer_icon.$(EXT) \ + string_icon.$(EXT) \ + eyedrop_icon.$(EXT) \ + about_icon.$(EXT) \ + splash_screen.$(EXT) \ + canvas_icon.$(EXT) \ + vector_icon.$(EXT) \ + real_icon.$(EXT) \ + color_icon.$(EXT) \ + valuenode_icon.$(EXT) \ + polygon_icon.$(EXT) \ + bline_icon.$(EXT) \ + layer_icon.$(EXT) \ + duplicate_icon.$(EXT) \ + encapsulate_icon.$(EXT) \ + gradient_icon.$(EXT) \ + keyframe_lock_all.$(EXT) \ + keyframe_lock_past.$(EXT) \ + keyframe_lock_future.$(EXT) \ + keyframe_lock_none.$(EXT) \ + rename_icon.$(EXT) \ + plant_icon.$(EXT) \ + text_icon.$(EXT) \ + polyline_icon.$(EXT) \ + star_icon.$(EXT) \ + set_fill_color.$(EXT) \ + set_outline_color.$(EXT) \ + seek_begin.$(EXT) \ + seek_end.$(EXT) \ + seek_next_frame.$(EXT) \ + seek_prev_frame.$(EXT) \ + duck_position_icon.$(EXT) \ + duck_vertex_icon.$(EXT) \ + duck_tangent_icon.$(EXT) \ + duck_radius_icon.$(EXT) \ + duck_width_icon.$(EXT) \ + duck_angle_icon.$(EXT) \ + show_grid_icon.$(EXT) \ + snap_grid_icon.$(EXT) \ + onion_skin_icon.$(EXT) + + +MAINTAINERCLEANFILES = \ + Makefile.in + + +CLEANFILES = \ + $(IMAGES) \ + images.nsh \ + unimages.nsh \ + installer_logo.bmp \ + sif_icon.ico \ + synfig_icon.ico \ + icons.nsh \ + unicons.nsh + +CLEANDIRS = \ + 16x16 \ + 22x22 \ + 24x24 \ + 32x32 \ + 48x48 \ + 64x64 \ + 128x128 + +image_DATA = $(IMAGES) + + +all: $(IMAGES) + +SUFFIXES = .sif .tif .png + +#.SUFFIXES: $(SUFFIXES) + +PNGTOICO = png2ico + +.sif.ico: + $(SYNFIG) $< -w 16 -h 16 -o $*-16x16.png $< -w 32 -h 32 -o $*-32x32.png $< -w 48 -h 48 -o $*-48x48.png $< -w 64 -h 64 -o $*-64x64.png + cp -f `which $(PNGTOICO)`.* ./ + $(PNGTOICO) $@ $*-16x16.png $*-32x32.png $*-48x48.png $*-64x64.png + rm -f ./$(PNGTOICO).* $*-16x16.png $*-32x32.png $*-48x48.png $*-64x64.png + echo " File \"images\\$@\"" >>./icons.nsh + echo " Delete \"\$$INSTDIR\\share\\pixmaps\\$@\"" >>./unicons.nsh + +clean-local: + $(RM) -r $(CLEANDIRS) + +.sif.bmp: + $(SYNFIG) -q $< -o $@ --time 0 + +.sif.$(EXT): + $(SYNFIG) -q $< -o $@ --time 0 + echo " File \"images\\$@\"" >>./images.nsh + echo " Delete \"\$$INSTDIR\\share\\pixmaps\\$@\"" >>./unimages.nsh + +.sifz.$(EXT): + $(SYNFIG) -q $< -o $@ --time 0 + echo " File \"images\\$@\"" >>./images.nsh + echo " Delete \"\$$INSTDIR\\share\\pixmaps\\$@\"" >>./unimages.nsh + +keyframe_lock_all.$(EXT): $(srcdir)/keyframe_lock_icon.sif + $(SYNFIG) -q $< -o $@ --time 0 + echo " File \"images\\$@\"" >>./images.nsh + echo " Delete \"\$$INSTDIR\\share\\pixmaps\\$@\"" >>./unimages.nsh + +keyframe_lock_past.$(EXT): $(srcdir)/keyframe_lock_icon.sif + $(SYNFIG) -q $< -o $@ --time 0 -c PastOnly + echo " File \"images\\$@\"" >>./images.nsh + echo " Delete \"\$$INSTDIR\\share\\pixmaps\\$@\"" >>./unimages.nsh + +keyframe_lock_future.$(EXT): $(srcdir)/keyframe_lock_icon.sif + $(SYNFIG) -q $< -o $@ --time 0 -c FutureOnly + echo " File \"images\\$@\"" >>./images.nsh + echo " Delete \"\$$INSTDIR\\share\\pixmaps\\$@\"" >>./unimages.nsh + +keyframe_lock_none.$(EXT): $(srcdir)/keyframe_lock_icon.sif + $(SYNFIG) -q $< -o $@ --time 0 -c Disabled + echo " File \"images\\$@\"" >>./images.nsh + echo " Delete \"\$$INSTDIR\\share\\pixmaps\\$@\"" >>./unimages.nsh + + +if !WIN32_PKG +if !MACOSX_PKG + +16x16/synfig_icon.$(EXT): synfig_icon.sif + -mkdir 16x16 + $(SYNFIG) -q $< -o $@ --time 0 -w 16 -h 16 + +icons16dir = $(datadir)/icons/hicolor/16x16/apps +icons16_DATA = 16x16/synfig_icon.$(EXT) + +22x22/synfig_icon.$(EXT): synfig_icon.sif + -mkdir 22x22 + $(SYNFIG) -q $< -o $@ --time 0 -w 22 -h 22 + +icons22dir = $(datadir)/icons/hicolor/22x22/apps +icons22_DATA = 22x22/synfig_icon.$(EXT) + +24x24/synfig_icon.$(EXT): synfig_icon.sif + -mkdir 24x24 + $(SYNFIG) -q $< -o $@ --time 0 -w 24 -h 24 + +icons24dir = $(datadir)/icons/hicolor/24x24/apps +icons24_DATA = 24x24/synfig_icon.$(EXT) + +32x32/synfig_icon.$(EXT): synfig_icon.sif + -mkdir 32x32 + $(SYNFIG) -q $< -o $@ --time 0 -w 32 -h 32 + +icons32dir = $(datadir)/icons/hicolor/32x32/apps +icons32_DATA = 32x32/synfig_icon.$(EXT) + +48x48/synfig_icon.$(EXT): synfig_icon.sif + -mkdir 48x48 + $(SYNFIG) -q $< -o $@ --time 0 -w 48 -h 48 + +icons48dir = $(datadir)/icons/hicolor/48x48/apps +icons48_DATA = 48x48/synfig_icon.$(EXT) + +64x64/synfig_icon.$(EXT): synfig_icon.sif + -mkdir 64x64 + $(SYNFIG) -q $< -o $@ --time 0 -w 64 -h 64 + +icons64dir = $(datadir)/icons/hicolor/64x64/apps +icons64_DATA = 64x64/synfig_icon.$(EXT) + +128x128/synfig_icon.$(EXT): synfig_icon.sif + -mkdir 128x128 + $(SYNFIG) -q $< -o $@ --time 0 -w 128 -h 128 + +icons128dir = $(datadir)/icons/hicolor/128x128/apps +icons128_DATA = 128x128/synfig_icon.$(EXT) + +iconsscalabledir = $(datadir)/icons/hicolor/scalable/apps +iconsscalable_DATA = synfig_icon.svg + +endif +endif diff --git a/synfig-studio/images/Makefile.inc b/synfig-studio/images/Makefile.inc new file mode 100644 index 0000000..9736508 --- /dev/null +++ b/synfig-studio/images/Makefile.inc @@ -0,0 +1,35 @@ + +EXT=png +SYNFIG=synfig + +EXTRA_DIST=studio_about.sif +IMAGES=fill_icon.$(EXT) normal_icon.$(EXT) sif_icon.$(EXT) synfig_icon.$(EXT) saveall_icon.$(EXT) bool_icon.$(EXT) integer_icon.$(EXT) angle_icon.$(EXT) segment_icon.$(EXT) blinepoint_icon.$(EXT) list_icon.$(EXT) canvas_pointer_icon.$(EXT) string_icon.$(EXT) eyedrop_icon.$(EXT) about_icon.$(EXT) splash_screen.$(EXT) canvas_icon.$(EXT) vector_icon.$(EXT) real_icon.$(EXT) color_icon.$(EXT) valuenode_icon.$(EXT) polygon_icon.$(EXT) bline_icon.$(EXT) layer_icon.$(EXT) duplicate_icon.$(EXT) gradient_icon.$(EXT) keyframe_lock_all.$(EXT) keyframe_lock_past.$(EXT) keyframe_lock_future.$(EXT) keyframe_lock_none.$(EXT) + +CLEANFILES=$(IMAGES) + + +all: $(IMAGES) + +.SUFFIXES:.sif .tif .png + +clean: + $(RM) $(CLEANFILES) + +.sif.tif: + $(SYNFIG) -q $< -o $@ --time 0 + +.sif.png: + $(SYNFIG) -q $< -o $@ --time 0 + +keyframe_lock_all.$(EXT): keyframe_lock_icon.sif + $(SYNFIG) -q $< -o $@ --time 0 + +keyframe_lock_past.$(EXT): keyframe_lock_icon.sif + $(SYNFIG) -q $< -o $@ --time 0 -c PastOnly + +keyframe_lock_future.$(EXT): keyframe_lock_icon.sif + $(SYNFIG) -q $< -o $@ --time 0 -c FutureOnly + +keyframe_lock_none.$(EXT): keyframe_lock_icon.sif + $(SYNFIG) -q $< -o $@ --time 0 -c Disabled + diff --git a/synfig-studio/images/about_icon.sif b/synfig-studio/images/about_icon.sif new file mode 100644 index 0000000..079b1d2 --- /dev/null +++ b/synfig-studio/images/about_icon.sif @@ -0,0 +1,65 @@ + + + Untitled0 + + + + + + + + + + + + + 0.0000000000 + 0.0500000007 + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.2000000030 + 0.2000000030 + + + + + + + + + + diff --git a/synfig-studio/images/angle_icon.sif b/synfig-studio/images/angle_icon.sif new file mode 100644 index 0000000..d53afe1 --- /dev/null +++ b/synfig-studio/images/angle_icon.sif @@ -0,0 +1,65 @@ + + + Untitled0 + + + + + + + + + + + + DEG + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Arial + + + + + + + + + + + + + + + + 1.0000000000 + 1.2031250000 + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + diff --git a/synfig-studio/images/bline_icon.sif b/synfig-studio/images/bline_icon.sif new file mode 100644 index 0000000..ceb7b63 --- /dev/null +++ b/synfig-studio/images/bline_icon.sif @@ -0,0 +1,1813 @@ + + + Synfig Studio B-Line Icon + Placed in the Public Domain in 2007 by Chris Norman (pixelgeek) + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0377842039 + -0.1834019721 + + + + + + + + + + + + + + + + + + + + + -2.9584641457 + -1.9259779453 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.9849041700 + 0.3456619680 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.4225540161 + 1.8059999943 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -2.2716398239 + -2.7584199905 + + + + + -1.4603400230 + 2.9206800461 + + + + + + + + + + + + + + + + + + + + + + 0.039242 + 0.733975 + 0.703853 + 1.000000 + + + + + -2.1093800068 + -2.5961599350 + + + + + -1.6225999594 + 2.7584199905 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + -1.8659877777 + 2.4338970184 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + -1.8659877777 + 0.0811299011 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + -1.8659877777 + -2.3527672291 + + + + + + + + + + + + + + + + + + + + + + 0.537454 + 0.563494 + 0.016721 + 1.000000 + + + + + + + + + + + -1.8659877777 + -2.3527672291 + + + + + + + + + + + + + + + + + + + + + + 0.428529 + 0.100841 + 0.016721 + 1.000000 + + + + + + + + + + + -1.8659877777 + 0.0811299011 + + + + + + + + + + + + + + + + + + + + + + 0.233646 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + -1.8659877777 + 2.4338970184 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.844853 + 0.828491 + 0.118994 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.3245196044 + -0.3245196044 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.9735588431 + 1.1358186007 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.9735588431 + 1.6225980520 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.6225980520 + 1.6225980520 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.6225980520 + 1.1358186007 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.2716372013 + -0.3245196044 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7848578691 + -1.2980784178 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.8112990260 + -1.2980784178 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.9471199512 + -1.2980799675 + + + + + 0.4867799878 + 1.4603400230 + + + + + + 1.000000 + 0.537059 + 0.001616 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.828491 + 0.537454 + 0.003862 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.3245196044 + -0.3245196044 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.9735588431 + 1.1358186007 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.9735588431 + 1.6225980520 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.6225980520 + 1.6225980520 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.6225980520 + 1.1358186007 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.2716372013 + -0.3245196044 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7848578691 + -1.2980784178 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.8112990260 + -1.2980784178 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 1.2980784178 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.2980784178 + 1.7848578691 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 1.2980784178 + -0.1622598022 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 1.000000 + + + + + 0.6490392089 + -1.4603382349 + + + + + 1.9471176863 + -3.0829362869 + + + + + + + + + + + + + + + + + + + + + + 0.172611 + 0.349351 + 0.629024 + 1.000000 + + + + + 0.9735588431 + -1.7848578691 + + + + + 1.6225980520 + -3.0829362869 + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 1.3067390919 + -3.0541522503 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.3275415897 + -2.1596431732 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.111449 + 0.112213 + 0.111449 + 0.111111 + + + + + 0.2000000030 + -0.2000000030 + + + + + 0.1649046391 + 0.1649046391 + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.4867794216 + -3.0829362869 + + + + + 2.5961568356 + -3.2451961040 + + + + + + + + + + diff --git a/synfig-studio/images/blinepoint_icon.sif b/synfig-studio/images/blinepoint_icon.sif new file mode 100644 index 0000000..badbf3a --- /dev/null +++ b/synfig-studio/images/blinepoint_icon.sif @@ -0,0 +1,66 @@ + + + Untitled0 + + + + + + + + + + + + BLINE +POINT + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Arial + + + + + + + + + + + + + + + + 0.6250000000 + 1.2500000000 + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + diff --git a/synfig-studio/images/bool_icon.sif b/synfig-studio/images/bool_icon.sif new file mode 100644 index 0000000..2f1a95e --- /dev/null +++ b/synfig-studio/images/bool_icon.sif @@ -0,0 +1,266 @@ + + + Untitled0 + + + + + + + + + + + + ON +OFF + + + + 0.531049 + 0.000000 + 0.000000 + 1.000000 + + + + Sans Serif + + + + + + + + + + + + + + + + 0.6250000000 + 0.7500000000 + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + -0.000000 + 0.217638 + -0.000000 + 1.000000 + + + + + -1.2500000000 + 0.1250000000 + + + + + 1.3750000000 + 1.3750000000 + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.000000 + -0.000000 + -0.000000 + 1.000000 + + + + + -1.5000000000 + -0.1250000000 + + + + + 1.5000000000 + 0.1250000000 + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + 0.0000000000 + 0.1250000000 + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/canvas_icon.sif b/synfig-studio/images/canvas_icon.sif new file mode 100644 index 0000000..ec2c1b5 --- /dev/null +++ b/synfig-studio/images/canvas_icon.sif @@ -0,0 +1,332 @@ + + + Synfig Studio Canvas Icon + + + Sphere + + + + + + + + + + + + + 0.000000 + 0.744518 + 0.825040 + 1.000000 + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 0.587045 + 0.941024 + 1.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.7500000000 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + -0.1500000060 + -0.3499999940 + + + + + + + + + + + + + + + + + + + + + + 0.2000000030 + 0.2000000030 + + + + + + + + + + + + + + + + + + + 0.000000 + 0.762890 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + diff --git a/synfig-studio/images/canvas_pointer_icon.sif b/synfig-studio/images/canvas_pointer_icon.sif new file mode 100644 index 0000000..99a4c06 --- /dev/null +++ b/synfig-studio/images/canvas_pointer_icon.sif @@ -0,0 +1,193 @@ + + + Untitled0 + + + + + + + + + + + + + 0.985195 + 0.174900 + -0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -0.6000000238 + 0.2000000030 + + + + + 0.8000000119 + 0.2000000030 + + + + + 0.8000000119 + -0.2000000030 + + + + + 1.6000000238 + 0.6000000238 + + + + + 0.8000000119 + 1.3999999762 + + + + + 0.8000000119 + 1.0000000000 + + + + + -0.6000000238 + 1.0000000000 + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + -0.0000000000 + + + + + 0.3499999940 + 0.3499999940 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + diff --git a/synfig-studio/images/children_icon.sif b/synfig-studio/images/children_icon.sif new file mode 100644 index 0000000..c3bb476 --- /dev/null +++ b/synfig-studio/images/children_icon.sif @@ -0,0 +1,80 @@ + + + Untitled0 + + + + + + + + + + + + + + + + CHILD + + + + 0.000000 + 0.189396 + 0.155043 + 1.000000 + + + + Arial Black + + + + + + + + + + + + + + + + 0.7919595838 + 0.7919595838 + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + diff --git a/synfig-studio/images/circle_icon.sif b/synfig-studio/images/circle_icon.sif new file mode 100644 index 0000000..fcfb2d5 --- /dev/null +++ b/synfig-studio/images/circle_icon.sif @@ -0,0 +1,289 @@ + + + Synfig Studio Circle Icon + Placed in the Public Domain in 2007 by Chris Norman (pixelgeek) + + + + + + + + + + + + + + + + + + + + 0.012910 + 0.012910 + 0.012910 + 1.000000 + + + 0.012910 + 0.012910 + 0.012910 + 0.731343 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + 0.1808688790 + -0.3216028810 + + + + + + + + + + + + + + + + -1.8803261518 + 2.0255250931 + + + + + 1.9384056330 + -1.9093658924 + + + + + -2.7515196800 + -1.2269309759 + + + + + 2.7515196800 + -1.2269309759 + + + + + 2.7515196800 + -2.7224798203 + + + + + -2.7515196800 + -2.7079598904 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 1.6642030478 + -1.9762411118 + + + + + -0.6339452267 + 0.8150724769 + + + + + + 0.064115 + 0.064115 + 0.064115 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/clear_redo_icon.sif b/synfig-studio/images/clear_redo_icon.sif new file mode 100644 index 0000000..9f89262 --- /dev/null +++ b/synfig-studio/images/clear_redo_icon.sif @@ -0,0 +1,1834 @@ + + + Untitled0 + + + + + + + + + + + + + + + + + 0.213899 + 0.706536 + 0.150728 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 1.2500000000 + 0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2499999702 + 1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2499999702 + 1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0000001192 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2499999702 + -1.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000298 + -0.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2499999702 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2499999702 + -0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 1.2500000000 + 0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2499999702 + 1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2499999702 + 1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0000001192 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2499999702 + -1.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000298 + -0.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2499999702 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2499999702 + -0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.7500000000 + 1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2500000000 + 1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.2500000000 + 1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7500000000 + 1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.5000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7500000000 + -1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.2500000000 + -1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + -0.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2500000000 + -1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7500000000 + -1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.5000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.7500000000 + 1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2500000000 + 1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.2500000000 + 1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7500000000 + 1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.5000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7500000000 + -1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.2500000000 + -1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + -0.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2500000000 + -1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7500000000 + -1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.5000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/clear_undo_icon.sif b/synfig-studio/images/clear_undo_icon.sif new file mode 100644 index 0000000..f5eaa34 --- /dev/null +++ b/synfig-studio/images/clear_undo_icon.sif @@ -0,0 +1,1834 @@ + + + Untitled0 + + + + + + + + + + + + + + + + + 1.000000 + 0.250000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.2500000000 + 0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -1.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.2500000000 + 0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -1.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.7500000000 + 1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2500000000 + 1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.2500000000 + 1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7500000000 + 1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.5000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7500000000 + -1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.2500000000 + -1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + -0.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2500000000 + -1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7500000000 + -1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.5000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.7500000000 + 1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2500000000 + 1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.2500000000 + 1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7500000000 + 1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.5000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7500000000 + -1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.2500000000 + -1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + -0.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2500000000 + -1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7500000000 + -1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.5000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/color_icon.sif b/synfig-studio/images/color_icon.sif new file mode 100644 index 0000000..d3883d9 --- /dev/null +++ b/synfig-studio/images/color_icon.sif @@ -0,0 +1,391 @@ + + + Synfig Studio Color Icon + + + ColorDisc + + + + 1.000000 + 0.000000 + 0.000000 + 1.000000 + + + 1.000000 + 1.000000 + 0.000000 + 1.000000 + + + 0.000000 + 1.000000 + 0.000000 + 1.000000 + + + 0.000000 + 1.000000 + 1.000000 + 1.000000 + + + 0.000000 + 0.000000 + 1.000000 + 1.000000 + + + 1.000000 + 0.000000 + 1.000000 + 1.000000 + + + 1.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 0.2000000030 + 0.2000000030 + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + 0.0625000000 + 0.1093750000 + + + + + + + + + + + + + + + + + + + + + + 0.333252 + 0.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + -0.1093750000 + -0.1406250000 + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 0.1151999980 + 0.1151999980 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + diff --git a/synfig-studio/images/curves_icon.sif b/synfig-studio/images/curves_icon.sif new file mode 100644 index 0000000..242f85a --- /dev/null +++ b/synfig-studio/images/curves_icon.sif @@ -0,0 +1,1178 @@ + + + Untitled0 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -2.0000000000 + -1.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7500000000 + -1.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 1.7500000000 + -1.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.2500000000 + -2.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 1.7500000000 + -1.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.2500000000 + -1.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.5000000000 + -2.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.5000000000 + 1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.5000000000 + 1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.0000000000 + 1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.5000000000 + 1.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0000000000 + 1.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -2.5000000000 + -1.1153845787 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0000000000 + 0.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.7500000000 + 2.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.265306 + 0.153061 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0937500000 + -0.0937500000 + + + + + 0.1250000000 + 0.1250000000 + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + diff --git a/synfig-studio/images/draw_icon.sif b/synfig-studio/images/draw_icon.sif new file mode 100644 index 0000000..ccab320 --- /dev/null +++ b/synfig-studio/images/draw_icon.sif @@ -0,0 +1,2879 @@ + + + Synfig Studio Draw Icon + Placed in the Public Domain in 2007 by Chris Norman (pixelgeek) + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.4680073857 + -0.1302433461 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.0151638985 + 0.0332840607 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.8139812946 + 0.3994087279 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.6309189796 + -0.3661246896 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.3631684780 + -0.2496304661 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.8291451931 + -0.5159029365 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.1801059246 + -0.7156073451 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7159649134 + -1.1748492718 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.0690946579 + -1.4653589725 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.5316315889 + -1.6045765877 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.1150161028 + -1.1483001709 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.4659768641 + -1.4312146902 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.1664203107 + -1.5976349115 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.1331362426 + -1.1649421453 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.5824710727 + -0.6656812429 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.1015108600 + -0.2318952978 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0594419725 + 0.1615791917 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.3323673308 + 0.3501750827 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 1.000000 + + + + + + + + + + + -0.4277517200 + -1.7467887402 + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 1.000000 + + + + + + + + + + + 0.7232670188 + 0.8187858462 + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 1.000000 + + + + + + + + + + + 2.5515329838 + 1.0178622007 + + + + + + + + + + + + + + + + + + + + + + 1.0000000000 + 1.0000000000 + + + + + 0.3795310557 + -1.9670532942 + + + + + + 0.172611 + 0.349351 + 0.629024 + 1.000000 + + + 0.011238 + 0.065656 + 0.247404 + 1.000000 + + + + + + + + + + + + + + -2.0000000000 + 2.0000000000 + + + + + 2.0000000000 + -2.0000000000 + + + + + -1.3954342604 + -0.3894235194 + + + + + 1.3305304050 + -0.3894235194 + + + + + 3.4723596573 + -3.1802921295 + + + + + -3.2776479721 + -3.2776479721 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + 0.012910 + 0.012910 + 0.012910 + 1.000000 + + + 0.012910 + 0.012910 + 0.012910 + 0.731343 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + -0.1869648695 + 1.3090070486 + + + + + + + + + + + + + + + + -1.8803261518 + 2.0255250931 + + + + + 1.9384056330 + -1.9093658924 + + + + + -2.7515196800 + -1.2269309759 + + + + + 2.7515196800 + -1.2269309759 + + + + + 2.7515196800 + -2.7224798203 + + + + + -2.7515196800 + -2.7079598904 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -2.2716372013 + -1.2980784178 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.2716372013 + 0.3245196044 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.9471176863 + 0.3245196044 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.3245196044 + 0.3245196044 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.6490392089 + 0.3245196044 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.6490392089 + -1.2980784178 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.172611 + 0.349351 + 0.629024 + 1.000000 + + + + + + + + + + + -0.7169033289 + 0.1413370967 + + + + + + + + + + + + + -2.6490392685 + 2.4992609024 + + + + + 1.3509606123 + -1.5007389784 + + + + + -2.2716374397 + 0.8237805963 + + + + + 0.8321015239 + 0.8154594898 + + + + + 2.1301798820 + -0.3245196044 + + + + + -3.7111730576 + -0.3245196044 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1967480183 + 0.3827666938 + + + + + 0.5325449705 + 0.3827666938 + + + + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + 0.000000 + 0.003862 + 0.077982 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.0249629989 + -1.5477088690 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6475610733 + -1.5477088690 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.2716372013 + -1.2980784178 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.2716372013 + 1.2980784178 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.9471176863 + 1.6225980520 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.3245196044 + 1.6225980520 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.6490392089 + 1.2980784178 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.6490392089 + -1.2980784178 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 1.2980784178 + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -1.9471175671 + 2.5745220184 + + + + + 0.3494826555 + -0.0216347706 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + -0.8112990260 + -0.2596156895 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + -0.8112990260 + 2.5745220184 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.134413 + 0.134413 + 0.134413 + 1.000000 + + + + + -1.7474132776 + 2.2283678055 + + + + + 0.1331362426 + -0.1081733331 + + + + + + + + + + + + + + + + + + + + + + 0.134413 + 0.134413 + 0.134413 + 1.000000 + + + + + + + + + + + -0.8112990260 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 0.1622598022 + 0.6490392089 + + + + + -1.7848578691 + 0.6490392089 + + + + + + 0.001151 + 0.001616 + 0.001616 + 1.000000 + + + 0.134413 + 0.134413 + 0.134413 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.134413 + 0.134413 + 0.134413 + 1.000000 + + + + + + + + + + + -0.8112990260 + 2.2716372013 + + + + + + + + + + + + + -2.9206764698 + 2.2716372013 + + + + + 1.1358186007 + -1.9471176863 + + + + + -2.9206764698 + 1.2980784178 + + + + + 1.1358186007 + 1.2980784178 + + + + + 1.1358186007 + -0.3245196044 + + + + + -2.9206764698 + -0.3245196044 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0166420303 + 0.1331362426 + + + + + + + + + + + + + + + + + + + + + -1.8306233883 + 1.0983740091 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.8487435579 + 0.8487435579 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2163463980 + 1.1150161028 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + -0.3661246896 + 0.4160507619 + + + + + + + + + + + + + + + + + + + + + -1.6766846180 + -1.6642030478 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6766846180 + 0.4576558769 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.3521651030 + 0.7821754813 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.6309189796 + -1.3812885284 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225980520 + 0.6490392089 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980784178 + 0.9735588431 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/duck_angle_icon.sif b/synfig-studio/images/duck_angle_icon.sif new file mode 100644 index 0000000..882da55 --- /dev/null +++ b/synfig-studio/images/duck_angle_icon.sif @@ -0,0 +1,1139 @@ + + + Duck Angle Icon. + Copyright 2009 Carlos López and Gerald Young. Released under GNU Public License published by the Free Software Foundation version 2.0 of the License or any later version. + + + + + + + + + + + + + + + + + + + 0.172709 + 0.660939 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -3.0423660278 + -2.5353050232 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.0288373232 + 1.5358983278 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.5358983278 + 1.0288373232 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5353050232 + -3.0423660278 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -3.0423660278 + -2.5353050232 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.0288373232 + 1.5358983278 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.5358983278 + 1.0288373232 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5353050232 + -3.0423660278 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 1.000000 + 1.000000 + + + + + 2.0282440186 + 2.0282440186 + + + + + + + + + + + + + + + + + + + + + + + + 1.0141220093 + -0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0082739592 + 1.0223959684 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0306698084 + -0.0000000894 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0082738996 + -1.0223959684 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 2.0282440186 + 2.0282440186 + + + + + + + + + + + + + + + + + + + + + + + + 1.0141220093 + -0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0082739592 + 1.0223959684 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0306698084 + -0.0000000894 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0082738996 + -1.0223959684 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -2.5353050232 + -3.0423660278 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3.0423660278 + -3.0423660278 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -2.5353050232 + -3.0423660278 + + + + + + + + + + + + + + + + + + + + + + + + 4.0564880371 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.8683700562 + 2.8683700562 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/duck_position_icon.sif b/synfig-studio/images/duck_position_icon.sif new file mode 100644 index 0000000..ef219c0 --- /dev/null +++ b/synfig-studio/images/duck_position_icon.sif @@ -0,0 +1,959 @@ + + + Duck Position Icon. + Copyright 2009 Carlos López and Gerald Young. Released under GNU Public License published by the Free Software Foundation version 2.0 of the License or any later version. + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 1.6642030478 + -1.9762411118 + + + + + -0.6339452267 + 0.8150724769 + + + + + + 0.064115 + 0.064115 + 0.064115 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 1.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.0194250345 + 0.0000000290 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000000515 + 1.0194250345 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0194250345 + -0.0000000601 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000052 + -1.0194250345 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.0194250345 + 0.0000000290 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000000515 + 1.0194250345 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0194250345 + -0.0000000601 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000052 + -1.0194250345 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -2.9076893330 + 0.5070610046 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.5070610046 + 2.0282440186 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5353050232 + 2.9336509705 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.0282440186 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.1557690650 + -2.6480741501 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.5211830139 + -1.0141220093 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/duck_radius_icon.sif b/synfig-studio/images/duck_radius_icon.sif new file mode 100644 index 0000000..b50a62d --- /dev/null +++ b/synfig-studio/images/duck_radius_icon.sif @@ -0,0 +1,1232 @@ + + + Duck Vertex Icon. + Copyright 2009 Carlos López and Gerald Young. Released under GNU Public License published by the Free Software Foundation version 2.0 of the License or any later version. + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 2.5353050232 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000001108 + 2.5353050232 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5353050232 + -0.0000002216 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000302 + -2.5353050232 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.488248 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 2.3105745316 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000001010 + 2.3105745316 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.3105745316 + -0.0000002020 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000276 + -2.3105745316 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 2.0309278965 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000000888 + 2.0309278965 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.0309278965 + -0.0000001775 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000242 + -2.0309278965 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.8432673216 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000000806 + 1.8432673216 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.8432673216 + -0.0000001611 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000220 + -1.8432673216 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 2.0282440186 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.0141220093 + 0.0000000291 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000000513 + 1.0141220093 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0141220093 + -0.0000000595 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000051 + -1.0141220093 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 2.0282440186 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.0141220093 + 0.0000000291 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000000513 + 1.0141220093 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0141220093 + -0.0000000595 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000051 + -1.0141220093 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/duck_tangent_icon.sif b/synfig-studio/images/duck_tangent_icon.sif new file mode 100644 index 0000000..0fead6c --- /dev/null +++ b/synfig-studio/images/duck_tangent_icon.sif @@ -0,0 +1,1838 @@ + + + Duck Tangent Icon. + Copyright 2009 Carlos López and Gerald Young. Released under GNU Public License published by the Free Software Foundation version 2.0 of the License or any later version. + + + + + + + + + + + + + + + + + + + 0.172709 + 0.660939 + 1.000000 + 1.000000 + + + + + -0.5070610046 + 2.0282440186 + + + + + + + + + + + + + + + + + + + + + + + + -2.5107734203 + 0.3518353105 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5088565350 + 0.3652547002 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5107734203 + -0.3518353105 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5088565350 + -0.3652547002 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -0.5070610046 + 2.0282440186 + + + + + + + + + + + + + + + + + + + + + + + + -2.5107734203 + 0.3518353105 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5088565350 + 0.3652547002 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5107734203 + -0.3518353105 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5088565350 + -0.3652547002 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.172709 + 0.660939 + 1.000000 + 1.000000 + + + + + 0.5070610046 + -2.0282440186 + + + + + + + + + + + + + + + + + + + + + + + + -2.5107734203 + 0.3518353105 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5088565350 + 0.3652547002 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5107734203 + -0.3518353105 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5088565350 + -0.3652547002 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -3.0423660278 + 2.0282440186 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3.0423660278 + -2.0282440186 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.5070610046 + -2.0282440186 + + + + + + + + + + + + + + + + + + + + + + + + -2.5107734203 + 0.3518353105 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5088565350 + 0.3652547002 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5107734203 + -0.3518353105 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5088565350 + -0.3652547002 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 2.0282440186 + 2.0282440186 + + + + + + + + + + + + + + + + + + + + + + + + 1.0194891691 + 0.0000000290 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000000515 + 1.0194891691 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0194891691 + -0.0000000601 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000052 + -1.0194891691 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 2.0282440186 + 2.0282440186 + + + + + + + + + + + + + + + + + + + + + + + + 1.0194891691 + 0.0000000290 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000000515 + 1.0194891691 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0194891691 + -0.0000000601 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000052 + -1.0194891691 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 0.000000 + 1.000000 + + + + + -2.0282440186 + -2.0282440186 + + + + + + + + + + + + + + + + + + + + + + + + 1.0264549255 + 0.0000000288 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000000517 + 1.0264549255 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0264549255 + -0.0000000609 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000053 + -1.0264549255 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -2.0282440186 + -2.0282440186 + + + + + + + + + + + + + + + + + + + + + + + + 1.0264549255 + 0.0000000288 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000000517 + 1.0264549255 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0264549255 + -0.0000000609 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000053 + -1.0264549255 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/duck_vertex_icon.sif b/synfig-studio/images/duck_vertex_icon.sif new file mode 100644 index 0000000..ff7bba5 --- /dev/null +++ b/synfig-studio/images/duck_vertex_icon.sif @@ -0,0 +1,575 @@ + + + Duck Vertex Icon. + Copyright 2009 Carlos López and Gerald Young. Released under GNU Public License published by the Free Software Foundation version 2.0 of the License or any later version. + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -3.0423660278 + 3.0423660278 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3.0423660278 + -3.0423660278 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 0.498039 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.0141220093 + 0.0000000291 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000000513 + 1.0141220093 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0141220093 + -0.0000000596 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000051 + -1.0141220093 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.0141220093 + 0.0000000291 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000000513 + 1.0141220093 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0141220093 + -0.0000000596 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000051 + -1.0141220093 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/duck_width_icon.sif b/synfig-studio/images/duck_width_icon.sif new file mode 100644 index 0000000..19f7199 --- /dev/null +++ b/synfig-studio/images/duck_width_icon.sif @@ -0,0 +1,1426 @@ + + + Duck Width Icon. + Copyright 2009 Carlos López and Gerald Young. Released under GNU Public License published by the Free Software Foundation version 2.0 of the License or any later version. + + + + + + + + + + + + + + + + + + + 0.0000000000 + -0.5070610046 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 2.5394833088 + 0.0000000046 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000001121 + 2.5394833088 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5394833088 + -0.0000002174 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000292 + -2.5394835472 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.488248 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 2.3143825531 + 0.0000000046 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000001023 + 2.3143825531 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.3143825531 + -0.0000001978 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000265 + -2.3143825531 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 2.0342750549 + 0.0000000046 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000000900 + 2.0342750549 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.0342750549 + -0.0000001732 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000231 + -2.0342750549 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.8463052511 + 0.0000000046 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000000818 + 1.8463052511 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.8463052511 + -0.0000001568 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000209 + -1.8463051319 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -3.0216197968 + 2.5601470470 + + + + + + + + + + + + + + 3.7107613087 + 3.3926959038 + + + + + 3.7107613087 + 3.3926959038 + + + + + + + + + 0.0000000000 + -0.0373858735 + + + + + + + + + + + + + + 0.7456641793 + -3.0892977715 + + + + + 0.7456641793 + -3.0892977715 + + + + + + + + + 3.0216197968 + -2.7939512730 + + + + + + + + + + + + + + 5.6191525459 + 2.5975327492 + + + + + 5.6191525459 + 2.5975327492 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 0.000000 + 1.000000 + 1.000000 + + + + + 2.0282440186 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.0194250345 + 0.0000000290 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000000515 + 1.0194250345 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0194250345 + -0.0000000601 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000052 + -1.0194250345 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 2.0282440186 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.0194250345 + 0.0000000290 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000000515 + 1.0194250345 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0194250345 + -0.0000000601 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000052 + -1.0194250345 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/duplicate_icon.sif b/synfig-studio/images/duplicate_icon.sif new file mode 100644 index 0000000..83e12c8 --- /dev/null +++ b/synfig-studio/images/duplicate_icon.sif @@ -0,0 +1,366 @@ + + + Untitled1 + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + + + + + + + + + + + + + + + -0.4000000060 + 0.4000000060 + + + + + -0.4000000060 + -0.4000000060 + + + + + 0.4000000060 + -0.4000000060 + + + + + 0.4000000060 + 0.4000000060 + + + + + + + + + + + + + + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -0.4000000060 + 0.4000000060 + + + + + -0.4000000060 + -0.4000000060 + + + + + 0.4000000060 + -0.4000000060 + + + + + 0.4000000060 + 0.4000000060 + + + + + + + + + + + + + + + + + + 1.000000 + 0.900000 + 0.600000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -0.3000000119 + 0.3000000119 + + + + + -0.3000000119 + -0.3000000119 + + + + + 0.3000000119 + -0.3000000119 + + + + + 0.3000000119 + 0.3000000119 + + + + + + + + + + + + + + + + + + + + 0.4000000060 + -0.4000000060 + + + + + + + + + + + + + + + + + + + + + -0.5000000000 + 0.5000000000 + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -0.8000000119 + -0.1000000015 + + + + + -0.6000000238 + -0.1000000015 + + + + + -0.6000000238 + -0.4000000060 + + + + + -0.4000000060 + -0.4000000060 + + + + + -0.4000000060 + -0.2000000030 + + + + + -0.1000000015 + -0.5000000000 + + + + + -0.4000000060 + -0.8000000119 + + + + + -0.4000000060 + -0.6000000238 + + + + + -0.8000000119 + -0.6000000238 + + + + + + diff --git a/synfig-studio/images/encapsulate_icon.sif b/synfig-studio/images/encapsulate_icon.sif new file mode 100644 index 0000000..a87c884 --- /dev/null +++ b/synfig-studio/images/encapsulate_icon.sif @@ -0,0 +1,2548 @@ + + + Synfig Studio Encapsulate Icon + Placed in the Public Domain in 2008 by Carlos López (Genete) + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + + + + + + + + + + + + + + + + + + -0.4000000060 + 0.4000000060 + + + + + -0.4000000060 + -0.4000000060 + + + + + 0.4000000060 + -0.4000000060 + + + + + 0.4000000060 + 0.4000000060 + + + + + + + + + + + + + + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + -0.4000000060 + 0.4000000060 + + + + + -0.4000000060 + -0.4000000060 + + + + + 0.4000000060 + -0.4000000060 + + + + + 0.4000000060 + 0.4000000060 + + + + + + + + + + + + + + + + + + 1.000000 + 0.900000 + 0.600000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + -0.3000000119 + 0.3000000119 + + + + + -0.3000000119 + -0.3000000119 + + + + + 0.3000000119 + -0.3000000119 + + + + + 0.3000000119 + 0.3000000119 + + + + + + + + Untitled0 + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + + + + + + + + + + + + + + + + + + -0.8000000119 + 0.8000000119 + + + + + -0.8000000119 + -0.2000000030 + + + + + 0.2000000030 + -0.2000000030 + + + + + 0.2000000030 + 0.8000000119 + + + + + + + + + + + + + + + + + + 0.2000000030 + 0.2000000030 + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + -0.8000000119 + 0.8000000119 + + + + + -0.8000000119 + -0.2000000030 + + + + + 0.2000000030 + -0.2000000030 + + + + + 0.2000000030 + 0.8000000119 + + + + + + + + + + + + + + + + + + 1.000000 + 0.900000 + 0.600000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + -0.6999999881 + 0.6999999881 + + + + + -0.6999999881 + -0.1000000015 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.1000000015 + 0.6999999881 + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.850000 + 0.640000 + 0.200000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.850000 + 0.640000 + 0.200000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 0.3589743674 + -0.1217948720 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.850000 + 0.640000 + 0.200000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.850000 + 0.640000 + 0.200000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.5064102411 + 0.5257631540 + + + + + + + + + + + + + + + + + + + + + 0.4307692349 + -0.4410256445 + + + + + + + + + + + + + + + + + + + + + 0.2000000030 + 0.2102564126 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + -0.1729302704 + 0.6133797169 + + + + + -0.1718716621 + 0.4133825302 + + + + + 0.1281241328 + 0.4149704278 + + + + + 0.1291827410 + 0.1084988564 + + + + + -0.0708144605 + 0.1074402481 + + + + + 0.2307692319 + -0.1909676492 + + + + + 0.5291771293 + 0.1106160656 + + + + + 0.3291799426 + 0.1095574647 + + + + + 0.3270627260 + 0.6160262227 + + + + + + + + + + + + + diff --git a/synfig-studio/images/eyedrop_icon.sif b/synfig-studio/images/eyedrop_icon.sif new file mode 100644 index 0000000..e071cf1 --- /dev/null +++ b/synfig-studio/images/eyedrop_icon.sif @@ -0,0 +1,2834 @@ + + + Synfig Studio Eye-drop Icon + Placed in the Public Domain in 2007 by Chris Norman (pixelgeek) + + + + + + + + + + + + + + + + + + + 0.0000000000 + -0.4867799878 + + + + + + + + + + + + + + + + + + 0.012910 + 0.012910 + 0.012910 + 1.000000 + + + 0.013228 + 0.012910 + 0.012910 + 0.731343 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + 0.1808688790 + -0.3216028810 + + + + + + + + + + + + + + + + -1.8803261518 + 2.0255250931 + + + + + 1.9384056330 + -1.9093658924 + + + + + -2.9820623398 + -1.8497612476 + + + + + 2.5961568356 + 0.4867799878 + + + + + 2.9924266338 + -0.8112984300 + + + + + -2.9206800461 + -2.9206800461 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + -0.4867799878 + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 1.000000 + + + + + -0.0132999839 + -0.6649991870 + + + + + + + + + + + + + + + + + + + + + -2.2920219898 + -0.7859437466 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5535967350 + -1.3166984320 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1412973404 + -1.6491979361 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7555978298 + -1.3432983160 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.0060851574 + -0.7668812871 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1412973404 + -0.2792996466 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0930998847 + -0.6250992417 + + + + + + + + + + + + -2.2559943199 + -0.8017961979 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.4569699764 + -1.3428850174 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1106762886 + -1.5562306643 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7458248138 + -1.3274253607 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.0240991116 + -0.7863364816 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1323168278 + -0.1834089756 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + 0.028991 + 0.133209 + 0.374624 + 1.000000 + + + 0.011238 + 0.065656 + 0.247059 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -0.0265999679 + -0.7314990759 + + + + + + + + + + + + + + + + + + + + + -2.2738904953 + -0.7939217091 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5003969669 + -1.2634984255 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1013975143 + -1.6092979908 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7422978878 + -1.2634984255 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.0151507854 + -0.7766723633 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1412973404 + -0.2393997014 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + -0.4867799878 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 1.1530662775 + 1.5584833622 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.4430936575 + -1.0376765728 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7676136494 + -1.0376765728 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.0186016560 + -1.2941199541 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.3603677750 + -0.9054833651 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -0.6490399837 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.4867799878 + 2.2716398239 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + -0.8112999797 + + + + + -1.2980799675 + 1.7848598957 + + + + + + 0.017745 + 0.111701 + 0.372646 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + -0.0789170563 + -0.0841611475 + + + + + -0.9735599756 + 0.8112999797 + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + + + + + + + + + + + + + + + + + + -0.2005944252 + 0.0375162214 + + + + + -0.9735599756 + 0.8112999797 + + + + + + 0.000000 + 0.000000 + 0.000000 + 0.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 1.1530662775 + 1.5584833622 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.4430936575 + -1.0376765728 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7676136494 + -1.0376765728 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.0186016560 + -1.2941199541 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.3603677750 + -0.9054833651 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -0.6490399837 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.4867799878 + 2.2716398239 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0194535479 + -0.0824068487 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + -0.4867799878 + + + + + + + + + + + + + + + + + + + + + 0.1673063785 + 2.4640371799 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.5627578497 + 2.4488275051 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7452738881 + 3.1332626343 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.8555798531 + 3.1028432846 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.8707895279 + 2.0229568481 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.2167736292 + 1.8252310753 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.2167736292 + 1.4449892044 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7652084827 + 2.6126971245 + + + + + 1.6358979940 + 1.5693980455 + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + 0.028991 + 0.133209 + 0.374624 + 1.000000 + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.028991 + 0.133209 + 0.374624 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.5852279067 + 1.6465466022 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.3107939661 + 1.8741867542 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.8695641160 + 1.7695893049 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + -0.4867799878 + + + + + + + + + + + + + + + + + + + + + 0.1673063785 + 2.4640371799 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.5627578497 + 2.4488275051 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7452738881 + 3.1332626343 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.8555798531 + 3.1028432846 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.8707895279 + 2.0229568481 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.2167736292 + 1.8252310753 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.2167736292 + 1.4449892044 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.2962405682 + 2.1288678646 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + diff --git a/synfig-studio/images/fill_icon.sif b/synfig-studio/images/fill_icon.sif new file mode 100644 index 0000000..67ad86a --- /dev/null +++ b/synfig-studio/images/fill_icon.sif @@ -0,0 +1,1935 @@ + + + Synfig Studio Fill Icon + Placed in the Public Domain in 2007 by Chris Norman (pixelgeek) + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + 0.012910 + 0.012910 + 0.012910 + 1.000000 + + + 0.012910 + 0.012910 + 0.012910 + 0.731343 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + 0.4421221614 + -0.2282502055 + + + + + + + + + + + + + + + + -1.8803261518 + 2.0255250931 + + + + + 1.9384056330 + -1.9093658924 + + + + + -2.7515196800 + -1.2269309759 + + + + + 2.7515196800 + -1.2269309759 + + + + + 2.7515196800 + -2.7224798203 + + + + + -2.7515196800 + -2.7079598904 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.4603400230 + 1.2980799675 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.2716398239 + 1.1358199120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.4338970184 + 0.8112990260 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.4338970184 + -1.1358186007 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -1.4603400230 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7848598957 + -1.1358199120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7848578691 + 0.8112990260 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.4867799878 + 0.8112999797 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0797998980 + 0.0531999357 + + + + + + + + + + + + -1.4603400230 + 1.2980799675 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.2716398239 + 1.1358199120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.4338970184 + 0.8112990260 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.4338970184 + -1.1358186007 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -1.4603400230 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7848598957 + -1.1358199120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7848578691 + 0.8112990260 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.4867799878 + 0.8112999797 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + 0.028991 + 0.133209 + 0.374624 + 1.000000 + + + 0.011238 + 0.065656 + 0.247059 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247059 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.4603400230 + 1.2980799675 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.2716398239 + 1.1358199120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.4338970184 + 0.8112990260 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.4338970184 + -1.1358186007 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -1.4603400230 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7848598957 + -1.1358199120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7848578691 + 0.8112990260 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.4867799878 + 0.8112999797 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.4867794216 + 0.3245196044 + + + + + + + + + + + + + + + + + + + -2.2821619511 + 0.5186938047 + + + + + 0.5516833067 + 2.2716372013 + + + + + 2.3689930439 + -0.8437509537 + + + + + -0.4867794216 + -2.6610608101 + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -1.5144248009 + 0.7655333877 + + + + + 0.9818798304 + 2.2799582481 + + + + + 2.5462307930 + -0.4493348300 + + + + + 0.0998521820 + -1.9804016352 + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.2081265152 + -0.1595559418 + + + + + + + + + + + + + + + + + + + -1.4562788010 + 0.8751632571 + + + + + 0.7071851492 + 2.1565995216 + + + + + 2.0718317032 + -0.2232107669 + + + + + -0.0250641759 + -1.5046471357 + + + + + + + + + + + + + + + + + + 1.6445538998 + 0.8490541577 + + + + + -0.6709950566 + -0.5245345235 + + + + + + 0.133333 + 0.133333 + 0.133333 + 1.000000 + + + 0.880142 + 0.880142 + 0.880142 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + 0.133333 + 0.133333 + 0.133333 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 0.1497782767 + 0.6656812429 + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + 0.1497782767 + 0.6656812429 + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.1595997959 + 1.0107988119 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.1622598022 + 2.4338970184 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.9735588431 + 2.9206764698 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7640552521 + 2.4297363758 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7806973457 + 1.1483001709 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/gradient_icon.sif b/synfig-studio/images/gradient_icon.sif new file mode 100644 index 0000000..c202802 --- /dev/null +++ b/synfig-studio/images/gradient_icon.sif @@ -0,0 +1,286 @@ + + + Synfig Studio Gradient Icon + Placed in the Public Domain in 2007 by Chris Norman (pixelgeek) + + + + + + + + + + + + + + + + + + + -0.6717824340 + 8.4043684006 + + + + + -0.4427109957 + -1.6098945141 + + + + + + 0.064115 + 0.064115 + 0.064115 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + + + + + + + + + -1.8803261518 + 2.0255250931 + + + + + 1.9384056330 + -1.9093658924 + + + + + -2.3365411758 + -2.3365411758 + + + + + 2.3365411758 + -2.3365411758 + + + + + 3.1153881550 + -3.1153881550 + + + + + -1.5576940775 + -3.1153881550 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -2.3365411758 + -2.3365411758 + + + + + 2.3365411758 + 2.3365411758 + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + -2.0769255161 + -2.0769255161 + + + + + 2.0769255161 + 2.0769255161 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + -1.8173098564 + -1.8173098564 + + + + + 1.8173098564 + 1.8173098564 + + + + + + + + + + + + + + + + + + + + + + -2.2322316170 + 0.0718793422 + + + + + 2.4828822613 + 0.0593391433 + + + + + + 0.064115 + 0.064115 + 0.064115 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/group_icon.sif b/synfig-studio/images/group_icon.sif new file mode 100644 index 0000000..f84e075 --- /dev/null +++ b/synfig-studio/images/group_icon.sif @@ -0,0 +1,2065 @@ + + + Untitled0 + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + + + + + + + + + + + + + + + -0.8000000119 + 0.8000000119 + + + + + -0.8000000119 + -0.2000000030 + + + + + 0.2000000030 + -0.2000000030 + + + + + 0.2000000030 + 0.8000000119 + + + + + + + + + + + + + + + + + + 0.2000000030 + 0.2000000030 + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -0.8000000119 + 0.8000000119 + + + + + -0.8000000119 + -0.2000000030 + + + + + 0.2000000030 + -0.2000000030 + + + + + 0.2000000030 + 0.8000000119 + + + + + + + + + + + + + + + + + + 1.000000 + 0.900000 + 0.600000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -0.6999999881 + 0.6999999881 + + + + + -0.6999999881 + -0.1000000015 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.1000000015 + 0.6999999881 + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 1.000000 + 0.250000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 1.000000 + 0.250000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 0.3589743674 + -0.1217948720 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 1.000000 + 0.250000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 1.000000 + 0.250000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/info_icon.sif b/synfig-studio/images/info_icon.sif new file mode 100644 index 0000000..38b549e --- /dev/null +++ b/synfig-studio/images/info_icon.sif @@ -0,0 +1,106 @@ + + + Untitled0 + + + + + + + + + + + + + + + + + 0.000000 + 0.265778 + 0.265778 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + i + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + Times New Roman + + + + + + + + + + + + + + + + 2.2500000000 + 2.2500000000 + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + diff --git a/synfig-studio/images/installer_logo.sif b/synfig-studio/images/installer_logo.sif new file mode 100644 index 0000000..08f797b --- /dev/null +++ b/synfig-studio/images/installer_logo.sif @@ -0,0 +1,568 @@ + + + Untitled0 + + + + + + + + + + + + + -0.0000000000 + -3.9643168449 + + + + + -0.0000000000 + 4.0161380768 + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + 0.000000 + 0.396489 + 0.634903 + 1.000000 + + + 0.000000 + 0.122969 + 0.361867 + 0.985507 + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + -1.2437071800 + 0.9068698287 + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1481799483 + -0.1481799483 + + + + + 0.3109268248 + 0.3109268248 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0099999998 + -3.5756583214 + + + + + + + + + + + + + + + + + -0.0990606323 + 0.4690153301 + + + + + -0.0990606323 + -0.0307283755 + + + + + + 0.000000 + 0.000000 + 0.000000 + 0.000000 + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + S T U D I O + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Times New Roman + + + + + + + + + + + + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.5000000000 + 1.0000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + -2.0734415054 + 0.6111532450 + + + + + 2.1833333969 + -0.0333333351 + + + + + -2.5265016556 + -0.3445624709 + + + + + 2.6473100185 + -0.3445624709 + + + + + 2.1666667461 + 0.0170713197 + + + + + -2.0499999523 + 0.0170713197 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.1000000015 + 0.0000000000 + + + + + + + + + + + + + + + + + + S T U D I O + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Times New Roman + + + + + + + + + + + + + + + + 0.5000000000 + 0.4500000179 + + + + + 0.5000000000 + 1.0000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 0.000000 + + + + + -2.5000000000 + 0.7500000000 + + + + + 2.5000000000 + -0.5000000000 + + + + + + + + + + + + + + + + + + + + + S Y N F I G + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Arial + + + + + + + + + + + + + + + + 0.3000000119 + 0.2166666687 + + + + + 0.5000000000 + 1.0000000000 + + + + + 0.0000000000 + 0.5666666627 + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/installer_logo_osx.sif b/synfig-studio/images/installer_logo_osx.sif new file mode 100644 index 0000000..077ea30 --- /dev/null +++ b/synfig-studio/images/installer_logo_osx.sif @@ -0,0 +1,613 @@ + + + Untitled0 + + + + + + + + + + + + + 5.7804918289 + 0.0777316988 + + + + + -0.7748818994 + 0.0777316988 + + + + + + 0.000000 + 0.000000 + 0.000000 + 0.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + -0.0000000000 + 4.0485877991 + + + + + -0.0000000000 + -3.2156248093 + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + 0.000000 + 0.396489 + 0.634903 + 1.000000 + + + 0.000000 + 0.122969 + 0.361867 + 0.985507 + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + -0.6178145409 + -2.1114645004 + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1481799483 + -0.1481799483 + + + + + 0.3109268248 + 0.3109268248 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.3659884930 + 3.2156248093 + + + + + + + + + + + + + + + + + -0.0990606323 + 0.4690153301 + + + + + -0.0990606323 + -0.0307283755 + + + + + + 0.000000 + 0.000000 + 0.000000 + 0.000000 + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + S T U D I O + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Times New Roman + + + + + + + + + + + + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.5000000000 + 1.0000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + -2.0734415054 + 0.6111532450 + + + + + 2.1833333969 + -0.0333333351 + + + + + -2.5265016556 + -0.3445624709 + + + + + 2.6473100185 + -0.3445624709 + + + + + 2.1666667461 + 0.0170713197 + + + + + -2.0499999523 + 0.0170713197 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.1000000015 + 0.0000000000 + + + + + + + + + + + + + + + + + + S T U D I O + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Times New Roman + + + + + + + + + + + + + + + + 0.5000000000 + 0.4500000179 + + + + + 0.5000000000 + 1.0000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 0.000000 + + + + + -2.5000000000 + 0.7500000000 + + + + + 2.5000000000 + -0.5000000000 + + + + + + + + + + + + + + + + + + + + + S Y N F I G + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Arial + + + + + + + + + + + + + + + + 0.3000000119 + 0.2166666687 + + + + + 0.5000000000 + 1.0000000000 + + + + + 0.0000000000 + 0.5666666627 + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/integer_icon.sif b/synfig-studio/images/integer_icon.sif new file mode 100644 index 0000000..48fe158 --- /dev/null +++ b/synfig-studio/images/integer_icon.sif @@ -0,0 +1,66 @@ + + + Untitled0 + + + + + + + + + + + + 123 +456 + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Sans Serif + + + + + + + + + + + + + + + + 1.2656250000 + 1.2968750000 + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + diff --git a/synfig-studio/images/keyframe_icon.sif b/synfig-studio/images/keyframe_icon.sif new file mode 100644 index 0000000..3474cc8 --- /dev/null +++ b/synfig-studio/images/keyframe_icon.sif @@ -0,0 +1,331 @@ + + + Untitled0 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -1.0000000000 + 0.2500000000 + + + + + 1.7500000000 + 0.2500000000 + + + + + 1.7500000000 + -0.7500000000 + + + + + 1.5000000000 + -0.7500000000 + + + + + 1.5000000000 + 0.0000000000 + + + + + 1.2500000000 + 0.0000000000 + + + + + 1.2500000000 + -0.2500000000 + + + + + 1.0000000000 + -0.2500000000 + + + + + 1.0000000000 + 0.0000000000 + + + + + 0.7500000000 + 0.0000000000 + + + + + 0.7500000000 + -0.5000000000 + + + + + 0.5000000000 + -0.5000000000 + + + + + 0.5000000000 + 0.0000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + -0.2500000000 + -0.5000000000 + + + + + -1.0000000000 + -0.5000000000 + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + -1.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + -1.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 0.377273 + 0.210909 + 0.054545 + 1.000000 + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0937500000 + -0.0937500000 + + + + + 0.1250000000 + 0.1250000000 + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + diff --git a/synfig-studio/images/keyframe_lock_icon.sif b/synfig-studio/images/keyframe_lock_icon.sif new file mode 100644 index 0000000..bd8f202 --- /dev/null +++ b/synfig-studio/images/keyframe_lock_icon.sif @@ -0,0 +1,2407 @@ + + + Keyframe Lock Button + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + 0.7500000000 + 0.7500000000 + + + + + 0.7500000000 + -1.5000000000 + + + + + 2.0000000000 + -1.5000000000 + + + + + 2.0000000000 + 0.7500000000 + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -2.0000000000 + 2.0000000000 + + + + + 0.0000000000 + -2.0000000000 + + + + + + + + + + + + + + + + + + + + -2.0000000000 + 0.7500000000 + + + + + -2.0000000000 + -1.2500000000 + + + + + -0.7500000000 + -1.2500000000 + + + + + -0.7500000000 + 0.7500000000 + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 2.0000000000 + + + + + 2.0000000000 + -2.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + -0.5000000000 + + + + + + + + + + + + + + + + + 0.493452 + 0.491552 + 0.491552 + 1.000000 + + + + + -0.7500000000 + 0.7500000000 + + + + + 0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + 0.0000000000 + + + + + 0.7500000000 + 0.0000000000 + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + 0.505263 + 0.505263 + 0.505263 + 1.000000 + + + 0.485435 + 0.484084 + 0.485435 + 1.000000 + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -0.7500000000 + 0.7500000000 + + + + + 0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0900000036 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.2500000000 + + + + + -0.2151769996 + -0.6455309987 + + + + + 0.2151769996 + -0.6455309987 + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.280608 + 0.280608 + 0.280608 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.0000000000 + 1.6250000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.6250000000 + 0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.3750000000 + 0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000000000 + 1.3750000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.3750000000 + 0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.6250000000 + 0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.0000000000 + 1.6250000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.6250000000 + 0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.3750000000 + 0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0000000000 + 1.3750000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.3750000000 + 0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.6250000000 + 0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.2000000030 + 0.2000000030 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + -0.5000000000 + + + + + + + + + + + + + + + + + 0.2500000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.7500000000 + 0.0000000000 + + + + + + + + + + + + + + -0.7500000000 + 0.7500000000 + + + + + 0.7500000000 + 0.7500000000 + + + + + + + + + -1.0000000000 + 0.7500000000 + + + + + + + + + + + + + + 0.7500000000 + 0.7500000000 + + + + + 0.0000000000 + -0.7500000000 + + + + + + + + + -1.0000000000 + 0.2500000000 + + + + + + + + + + + + + + 0.0192307699 + -0.6346153617 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + -0.5000000000 + 0.2500000000 + + + + + + + + + + + + + + -0.0000000000 + -0.0000000000 + + + + + 0.0000000000 + -0.7500000000 + + + + + + + + + -0.5000000000 + -0.2500000000 + + + + + + + + + + + + + + -0.0000000000 + -0.7500000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + -1.0000000000 + -0.2500000000 + + + + + + + + + + + + + + -0.0000000000 + -0.0000000000 + + + + + 0.0000000000 + -0.7500000000 + + + + + + + + + -1.0000000000 + -0.7500000000 + + + + + + + + + + + + + + -0.0000000000 + -0.7500000000 + + + + + -0.7500000000 + 0.7500000000 + + + + + + + + + + + + + + + + + + + + 0.352394 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.7500000000 + 0.0000000000 + + + + + + + + + + + + + + -0.7500000000 + 0.7500000000 + + + + + 0.7500000000 + 0.7500000000 + + + + + + + + + -1.0000000000 + 0.7500000000 + + + + + + + + + + + + + + 0.7500000000 + 0.7500000000 + + + + + 0.0000000000 + -0.7500000000 + + + + + + + + + -1.0000000000 + 0.2500000000 + + + + + + + + + + + + + + 0.0192307699 + -0.6346153617 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + -0.5000000000 + 0.2500000000 + + + + + + + + + + + + + + -0.0000000000 + -0.0000000000 + + + + + 0.0000000000 + -0.7500000000 + + + + + + + + + -0.5000000000 + -0.2500000000 + + + + + + + + + + + + + + -0.0000000000 + -0.7500000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + -1.0000000000 + -0.2500000000 + + + + + + + + + + + + + + -0.0000000000 + -0.0000000000 + + + + + 0.0000000000 + -0.7500000000 + + + + + + + + + -1.0000000000 + -0.7500000000 + + + + + + + + + + + + + + -0.0000000000 + -0.7500000000 + + + + + -0.7500000000 + 0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 1.7500000000 + 0.0000000000 + + + + + + + + + + + + + + 0.7500000000 + -0.7500000000 + + + + + -0.7500000000 + -0.7500000000 + + + + + + + + + 1.0000000000 + -0.7500000000 + + + + + + + + + + + + + + -0.7500000000 + -0.7500000000 + + + + + 0.0000000000 + 0.7500000000 + + + + + + + + + 1.0000000000 + -0.2500000000 + + + + + + + + + + + + + + -0.0000000000 + 0.7500000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + 0.5000000000 + -0.2500000000 + + + + + + + + + + + + + + -0.0000000000 + -0.0000000000 + + + + + 0.0000000000 + 0.7500000000 + + + + + + + + + 0.5000000000 + 0.2500000000 + + + + + + + + + + + + + + -0.0000000000 + 0.7500000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + 1.0000000000 + 0.2500000000 + + + + + + + + + + + + + + -0.0000000000 + -0.0000000000 + + + + + 0.0000000000 + 0.7500000000 + + + + + + + + + 1.0000000000 + 0.7500000000 + + + + + + + + + + + + + + -0.0000000000 + 0.7500000000 + + + + + 0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + 0.352394 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 1.7500000000 + 0.0000000000 + + + + + + + + + + + + + + 0.7500000000 + -0.7500000000 + + + + + -0.7500000000 + -0.7500000000 + + + + + + + + + 1.0000000000 + -0.7500000000 + + + + + + + + + + + + + + -0.7500000000 + -0.7500000000 + + + + + 0.0000000000 + 0.7500000000 + + + + + + + + + 1.0000000000 + -0.2500000000 + + + + + + + + + + + + + + -0.0000000000 + 0.7500000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + 0.5000000000 + -0.2500000000 + + + + + + + + + + + + + + -0.0000000000 + -0.0000000000 + + + + + 0.0000000000 + 0.7500000000 + + + + + + + + + 0.5000000000 + 0.2500000000 + + + + + + + + + + + + + + -0.0000000000 + 0.7500000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + 1.0000000000 + 0.2500000000 + + + + + + + + + + + + + + -0.0000000000 + -0.0000000000 + + + + + 0.0000000000 + 0.7500000000 + + + + + + + + + 1.0000000000 + 0.7500000000 + + + + + + + + + + + + + + -0.0000000000 + 0.7500000000 + + + + + 0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.2000000030 + 0.2000000030 + + + + + + + + + + + + + + + + + + + + 0.0000000000 + -0.2500000000 + + + + diff --git a/synfig-studio/images/layer_icon.sif b/synfig-studio/images/layer_icon.sif new file mode 100644 index 0000000..73c8b73 --- /dev/null +++ b/synfig-studio/images/layer_icon.sif @@ -0,0 +1,332 @@ + + + Untitled0 + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + + + + + + + + + + + + + + + -0.8000000119 + 0.8000000119 + + + + + -0.8000000119 + -0.2000000030 + + + + + 0.2000000030 + -0.2000000030 + + + + + 0.2000000030 + 0.8000000119 + + + + + + + + + + + + + + + + + + 0.2000000030 + 0.2000000030 + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -0.8000000119 + 0.8000000119 + + + + + -0.8000000119 + -0.2000000030 + + + + + 0.2000000030 + -0.2000000030 + + + + + 0.2000000030 + 0.8000000119 + + + + + + + + + + + + + + + + + + 1.000000 + 0.900000 + 0.600000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -0.6999999881 + 0.6999999881 + + + + + -0.6999999881 + -0.1000000015 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.1000000015 + 0.6999999881 + + + + + + + + + + + + + + + + + + + + 0.5000000000 + -0.5000000000 + + + + + + + + + + + + + + + + + + + + + 0.2000000030 + -0.2000000030 + + + + + + + + + + + + + + + + + + + + + -0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + -0.6999999881 + 0.6999999881 + + + + + + + + + + diff --git a/synfig-studio/images/list_icon.sif b/synfig-studio/images/list_icon.sif new file mode 100644 index 0000000..07c99dc --- /dev/null +++ b/synfig-studio/images/list_icon.sif @@ -0,0 +1,65 @@ + + + Untitled0 + + + + + + + + + + + + LIST + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Sans Serif + + + + + + + + + + + + + + + + 0.9375000000 + 1.0781250000 + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + diff --git a/synfig-studio/images/logo.sif b/synfig-studio/images/logo.sif new file mode 100644 index 0000000..87f8ffc --- /dev/null +++ b/synfig-studio/images/logo.sif @@ -0,0 +1,3062 @@ + + + Voria Logo + + + WhiteBG + + + + + + + + + + + + + 0.0000000000 + 0.0273553673 + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0495141000 + -0.0378637239 + + + + + 0.1417397559 + 0.1417397559 + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.333333 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 1.2500000000 + + + + + + + + + + + + + + -2.2500000000 + 2.2500000000 + + + + + -2.2500000000 + -2.2500000000 + + + + + + + + + -1.0000000000 + -1.0000000000 + + + + + + + + + + + + + + -0.2500000000 + -2.2500000000 + + + + + 1.5000000000 + 0.0000000000 + + + + + + + + + 0.0000000000 + -1.5000000000 + + + + + + + + + + + + + + 0.7500000000 + -0.7500000000 + + + + + 0.7500000000 + 0.7500000000 + + + + + + + + + 1.0000000000 + -1.0000000000 + + + + + + + + + + + + + + 1.5000000000 + 0.0000000000 + + + + + -0.2500000000 + 2.2500000000 + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 1.2500000000 + + + + + + + + + + + + + + -2.2500000000 + 2.2500000000 + + + + + -2.2500000000 + -2.2500000000 + + + + + + + + + -1.0000000000 + -1.0000000000 + + + + + + + + + + + + + + -0.2500000000 + -2.2500000000 + + + + + 1.5000000000 + 0.0000000000 + + + + + + + + + 0.0000000000 + -1.5000000000 + + + + + + + + + + + + + + 0.7500000000 + -0.7500000000 + + + + + 0.7500000000 + 0.7500000000 + + + + + + + + + 1.0000000000 + -1.0000000000 + + + + + + + + + + + + + + 1.5000000000 + 0.0000000000 + + + + + -0.2500000000 + 2.2500000000 + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + -1.3750000000 + + + + + 0.7500000000 + 0.7500000000 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + 1.3999999762 + 1.3999999762 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + -0.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + -0.000000 + -0.000000 + -0.000000 + -0.000000 + + + + + -0.000000 + -0.000000 + -0.000000 + 1.000000 + + + + + + + + + + 0.0000000000 + -0.5000000000 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + -0.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 1.2500000000 + + + + + + + + + + + + + + -2.2500000000 + 2.2500000000 + + + + + -2.2500000000 + -2.2500000000 + + + + + + + + + -1.0000000000 + -1.0000000000 + + + + + + + + + + + + + + -0.2500000000 + -2.2500000000 + + + + + 1.5000000000 + 0.0000000000 + + + + + + + + + 0.0000000000 + -1.5000000000 + + + + + + + + + + + + + + 0.7500000000 + -0.7500000000 + + + + + 0.7500000000 + 0.7500000000 + + + + + + + + + 1.0000000000 + -1.0000000000 + + + + + + + + + + + + + + 1.5000000000 + 0.0000000000 + + + + + -0.2500000000 + 2.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + 0.0000000000 + + + + + + + + + + + + + + 0.7500000000 + -0.2500000000 + + + + + 1.0000000000 + 1.0000000000 + + + + + + + + + 0.0000000000 + -0.5000000000 + + + + + + + + + + + + + + 0.5000000000 + -0.5000000000 + + + + + 0.7300000191 + -0.2599999905 + + + + + + + + + 0.5000000000 + -1.1250000000 + + + + + + + + + + + + + + 0.3750000000 + -0.6250000000 + + + + + 0.4900000095 + -0.6999999881 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + 0.0000000000 + + + + + + + + + + + + + + -0.7500000000 + -0.2500000000 + + + + + 1.0000000000 + 1.0000000000 + + + + + + + + + 0.0000000000 + -0.5000000000 + + + + + + + + + + + + + + -0.5000000000 + -0.5000000000 + + + + + -0.8012820482 + -0.5311999917 + + + + + + + + + -0.5000000000 + -1.1250000000 + + + + + + + + + + + + + + -0.3750000000 + -0.6250000000 + + + + + -0.5833333135 + -0.3968000114 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.8846153617 + -0.4679712355 + + + + + + + + + + + + + + 0.3538461626 + -0.0614596680 + + + + + 1.0000000000 + 1.0000000000 + + + + + + + + + -0.5615384579 + -0.5704039931 + + + + + + + + + + + + + + 0.2500000000 + -0.1250000000 + + + + + 0.3076923192 + -0.1280000061 + + + + + + + + + -0.2794871926 + -0.7752695680 + + + + + + + + + + + + + + 0.2615384758 + -0.2612035871 + + + + + 0.1923076957 + -0.1536000073 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.3871794939 + -0.2170109153 + + + + + + + + + + + + + + -0.1846153885 + -0.2612035871 + + + + + 1.0000000000 + 1.0000000000 + + + + + + + + + -0.5615384579 + -0.5704039931 + + + + + + + + + + + + + + -0.1538461596 + -0.3533930779 + + + + + 0.3076923192 + -0.1280000061 + + + + + + + + + -0.6999999881 + -0.9955000281 + + + + + + + + + + + + + + -0.0769230798 + -0.3687579930 + + + + + 0.1923076957 + -0.1536000073 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.8846153617 + -0.4679712355 + + + + + + + + + + + + + + -0.3538461626 + -0.0614596680 + + + + + 1.0000000000 + 1.0000000000 + + + + + + + + + 0.5615384579 + -0.5704039931 + + + + + + + + + + + + + + -0.2500000000 + -0.1250000000 + + + + + 0.3076923192 + -0.1280000061 + + + + + + + + + 0.2794871926 + -0.7752695680 + + + + + + + + + + + + + + -0.2615384758 + -0.2612035871 + + + + + 0.1923076957 + -0.1536000073 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.3871794939 + -0.2170109153 + + + + + + + + + + + + + + 0.1846153885 + -0.2612035871 + + + + + 1.0000000000 + 1.0000000000 + + + + + + + + + 0.5615384579 + -0.5704039931 + + + + + + + + + + + + + + 0.1538461596 + -0.3533930779 + + + + + 0.3076923192 + -0.1280000061 + + + + + + + + + 0.6999999881 + -0.9955000281 + + + + + + + + + + + + + + 0.0769230798 + -0.3687579930 + + + + + 0.1923076957 + -0.1536000073 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.4713114798 + 0.6239523292 + + + + + + + + + + + + + + -0.5000000000 + -0.1875000000 + + + + + 1.0000000000 + 1.0000000000 + + + + + + + + + 0.0000000000 + 0.3125000000 + + + + + + + + + + + + + + -0.3750000000 + -0.3750000000 + + + + + 0.3076923192 + -0.1280000061 + + + + + + + + + -0.3639999926 + -0.1780321598 + + + + + + + + + + + + + + -0.1875000000 + -0.5000000000 + + + + + 0.1923076957 + -0.1536000073 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.4713114798 + 0.6239523292 + + + + + + + + + + + + + + 0.5000000000 + -0.1875000000 + + + + + 1.0000000000 + 1.0000000000 + + + + + + + + + 0.0000000000 + 0.3125000000 + + + + + + + + + + + + + + 0.3750000000 + -0.3750000000 + + + + + 0.3076923192 + -0.1280000061 + + + + + + + + + 0.3639999926 + -0.1780321598 + + + + + + + + + + + + + + 0.1875000000 + -0.5000000000 + + + + + 0.1923076957 + -0.1536000073 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -0.8125000000 + + + + + + + + + + + + + + 0.2500000000 + -0.1250000000 + + + + + 1.0000000000 + 1.0000000000 + + + + + + + + + 0.0000000000 + -1.0000000000 + + + + + + + + + + + + + + 0.1875000000 + -0.1875000000 + + + + + 0.3076923192 + -0.1280000061 + + + + + + + + + 0.2019230723 + -1.2694432735 + + + + + + + + + + + + + + 0.1888111830 + -0.3540983498 + + + + + 0.1923076957 + -0.1536000073 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.8125000000 + + + + + + + + + + + + + + -0.2500000000 + -0.1250000000 + + + + + 1.0000000000 + 1.0000000000 + + + + + + + + + 0.0000000000 + -1.0000000000 + + + + + + + + + + + + + + -0.1875000000 + -0.1875000000 + + + + + 0.3076923192 + -0.1280000061 + + + + + + + + + -0.2045454532 + -1.2720662355 + + + + + + + + + + + + + + -0.1730769277 + -0.3304918110 + + + + + 0.1923076957 + -0.1536000073 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + 0.0000000000 + 0.3750000000 + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.3750000000 + + + + + 0.0000000000 + 1.0000000000 + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.0000000150 + 1.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.5000000000 + 0.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.5000000000 + 0.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.1250000000 + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0500000007 + -0.0500000007 + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + diff --git a/synfig-studio/images/meta_data_icon.sif b/synfig-studio/images/meta_data_icon.sif new file mode 100644 index 0000000..dc77e29 --- /dev/null +++ b/synfig-studio/images/meta_data_icon.sif @@ -0,0 +1,80 @@ + + + Untitled0 + + + + + + + + + + + + + + + + META + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Arial Black + + + + + + + + + + + + + + + + 0.7919595838 + 0.7919595838 + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + diff --git a/synfig-studio/images/mirror_icon.sif b/synfig-studio/images/mirror_icon.sif new file mode 100644 index 0000000..56a55f1 --- /dev/null +++ b/synfig-studio/images/mirror_icon.sif @@ -0,0 +1,3147 @@ + + + Synfig Studio Mirror Icon + Placed in the Public Domain in 2007 by Chris Norman (pixelgeek) + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + 0.300000 + 0.300000 + 0.300000 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + -2.5961599350 + 2.5961599350 + + + + + 2.6703450680 + -2.1673052311 + + + + + -3.2451999187 + -1.6225999594 + + + + + 2.7584199905 + -1.6225999594 + + + + + 3.2451999187 + -2.9206800461 + + + + + -2.7584199905 + -2.9206800461 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.4867799878 + -0.6490399837 + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247059 + 1.000000 + + + + + -3.6021683216 + -1.4278855324 + + + + + 2.3689925671 + 2.9855811596 + + + + + + + + + + + + + + + + + + + + + + 0.172611 + 0.349351 + 0.629024 + 1.000000 + + + + + -3.3425526619 + -1.1682698727 + + + + + 1.8497612476 + 2.7259654999 + + + + + + + + + + + + + + + + + + + + + + -1.7848598957 + 1.9471199512 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + -1.2980769873 + -2.8557741642 + + + + + 3.6346211433 + 0.5192298293 + + + + + + + + + + + + + + + + + + + + + + -1.7848600149 + -1.1358200312 + + + + + 6.0036196709 + -1.1358200312 + + + + + + 0.028991 + 0.133209 + 0.374624 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.4867799878 + -0.6490399837 + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 1.000000 + + + + + -3.6021683216 + -1.4278855324 + + + + + 2.3689925671 + 2.9855811596 + + + + + + + + + + + + + + + + + + + + + + 0.172611 + 0.349351 + 0.629024 + 1.000000 + + + + + -3.3425526619 + -1.1682698727 + + + + + 2.1093769073 + 2.7259654999 + + + + + + + + + + + + + + + + + + + + + + -1.7848598957 + 1.9471199512 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + -1.2980769873 + -2.8557741642 + + + + + 3.6346211433 + 0.5192298293 + + + + + + + + + + + + + + + + + + + + + + -1.7848600149 + 1.9471199512 + + + + + 2.9206800461 + -4.0564999580 + + + + + + 0.028991 + 0.133209 + 0.374624 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + -0.3245199919 + 3.4074599743 + + + + + 2.4338998795 + -1.6225999594 + + + + + -0.3245199919 + 3.4074599743 + + + + + 2.7584199905 + 4.5432796478 + + + + + 2.7584199905 + -2.7584199905 + + + + + -0.3245199919 + -1.6225999594 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.3631684780 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.1622599959 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -2.5254285336 + -0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7141284943 + -0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1940643787 + -0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1940643787 + -1.1358199120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0582443662 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1940643787 + 1.1358199120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1940643787 + 0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.5185843706 + 0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5254285336 + 0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.447059 + 0.623529 + 0.811765 + 1.000000 + + + + + 0.1622599959 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -2.3631684780 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.3896085024 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0650885105 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0650885105 + -0.8112999797 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2537885308 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0650885105 + 0.8112999797 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0650885105 + 0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.3896085024 + 0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.3631684780 + 0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 1.000000 + + + + + 0.1622599959 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -2.5254285336 + -0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7141284943 + -0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1940643787 + -0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1940643787 + -1.1358199120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0582443662 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1940643787 + 1.1358199120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1940643787 + 0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.5185843706 + 0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5254285336 + 0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.8763884306 + 0.0000000000 + + + + + -2.2009084225 + 0.0000000000 + + + + + + 0.011238 + 0.065656 + 0.247059 + 0.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.1622599959 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.1622599959 + -0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.8112999797 + -0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.4603400230 + -0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.4603400230 + -1.1358199120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5961599350 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.4603400230 + 1.1358199120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.4603400230 + 0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1358199120 + 0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.1622599959 + 0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.447059 + 0.623529 + 0.811765 + 1.000000 + + + + + 0.1622599959 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.3245199919 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1358199120 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + -0.8112999797 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.4338998795 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 0.8112999797 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + 0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.3245199919 + 0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 1.000000 + + + + + 0.1622599959 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.1622599959 + -0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.9735599756 + -0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.4603400230 + -0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.4603400230 + -1.1358199120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5961599350 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.4603400230 + 1.1358199120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.4603400230 + 0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1358199120 + 0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.1622599959 + 0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.6490399837 + 0.0000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + 0.011238 + 0.065656 + 0.247059 + 0.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/navigator_icon.sif b/synfig-studio/images/navigator_icon.sif new file mode 100644 index 0000000..f09c758 --- /dev/null +++ b/synfig-studio/images/navigator_icon.sif @@ -0,0 +1,451 @@ + + + Untitled0 + + + + + + + + + + + + + + + + + 0.000000 + 0.411657 + 1.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.068166 + 0.086724 + 0.444444 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + 0.0000000000 + 1.7500000000 + + + + + -0.5000000000 + 1.0000000000 + + + + + 0.5000000000 + 1.0000000000 + + + + + + + + + + + + + + + + + + 0.068166 + 0.086724 + 0.444444 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + 1.7500000000 + 0.0000000000 + + + + + 1.0000000000 + 0.5000000000 + + + + + 1.0000000000 + -0.5000000000 + + + + + + + + + + + + + + + + + + 0.068166 + 0.086724 + 0.444444 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + 0.0000000000 + -1.7500000000 + + + + + 0.5000000000 + -1.0000000000 + + + + + -0.5000000000 + -1.0000000000 + + + + + + + + + + + + + + + + + + 0.068166 + 0.086724 + 0.444444 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -1.7500000000 + 0.0000000000 + + + + + -1.0000000000 + -0.5000000000 + + + + + -1.0000000000 + 0.5000000000 + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NAV + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Sans Serif + + + + + + + + + + + + + + + + 0.5000000000 + 0.7500000000 + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + 0.1562500000 + 0.1562500000 + + + + + + + + + + diff --git a/synfig-studio/images/normal_icon.sif b/synfig-studio/images/normal_icon.sif new file mode 100644 index 0000000..8934fb8 --- /dev/null +++ b/synfig-studio/images/normal_icon.sif @@ -0,0 +1,310 @@ + + + Untitled0 + + + + + + + + + + + + + -0.000000 + 0.147464 + 0.764577 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 4.594794 + 4.594794 + 4.594794 + 1.000000 + + + + + 0.1005025133 + -0.0201005023 + + + + + + + + + + + + + + + + + + + 0.4000000060 + 0.4000000060 + + + + + -0.8000000119 + 1.6000000238 + + + + + -0.8000000119 + -0.2000000030 + + + + + -0.4000000060 + 0.0000000000 + + + + + 0.4000000060 + -1.6000000238 + + + + + 0.8000000119 + -1.3999999762 + + + + + -0.0000000000 + 0.2000000030 + + + + + + + + + + + + + + + + + + 0.2500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1005025133 + -0.0201005023 + + + + + + + + + + + + + + + + + + + 0.4000000060 + 0.4000000060 + + + + + -0.8000000119 + 1.6000000238 + + + + + -0.8000000119 + -0.2000000030 + + + + + -0.4000000060 + 0.0000000000 + + + + + 0.4000000060 + -1.6000000238 + + + + + 0.8000000119 + -1.3999999762 + + + + + -0.0000000000 + 0.2000000030 + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + diff --git a/synfig-studio/images/onion_skin_icon.sif b/synfig-studio/images/onion_skin_icon.sif new file mode 100644 index 0000000..c05b49a --- /dev/null +++ b/synfig-studio/images/onion_skin_icon.sif @@ -0,0 +1,3897 @@ + + + Onion Skin Icon + opyright 2009 Carlos López. Released under GNU Public License published by the Free Software Foundation version 2.0 of the License or any later version. + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -2.9229531288 + -2.9576816559 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.1877044588 + -3.2387652397 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3.3171010017 + -2.8265094757 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.1127488539 + -2.4892091751 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.068320 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.1829863787 + -2.1152374744 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.8230646849 + -2.4402816296 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.068320 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 0.5269945860 + -2.3839306831 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.4706437290 + -3.1352758408 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.068320 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 0.7523981333 + -2.3651473522 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.0153688192 + -2.9098720551 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.068320 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 0.9449565411 + -2.2688050270 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.4661759138 + -2.7408194542 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.368591 + 0.054592 + 0.000367 + 1.000000 + + + + + -0.0643781647 + -0.2328656912 + + + + + + + + + + + + + + + + + + + + + + + + -2.3215346336 + 3.2606282234 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.8768180609 + 3.0616166592 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.4014495611 + 2.6467370987 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.0805414915 + 2.2623436451 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.6633694172 + -0.6326169372 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6852339506 + -2.3124501705 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.4364871979 + 0.5622851253 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.8326535225 + 2.6206669807 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -1.0193932056 + 1.8821717501 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.9770790339 + 2.8565862179 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.8248791099 + 2.0168352127 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.8384674788 + 1.1490032673 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.3447009325 + -1.9482592344 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.4344767332 + 0.9245639443 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -1.8273745775 + 2.6303029060 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.9146548510 + 1.6876575947 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.3147757053 + 0.5804236531 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.9706354141 + -2.2026238441 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.8958223462 + 0.3709469736 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2587951422 + 1.7624707222 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -1.8423373699 + 2.8397793770 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.3503803015 + -0.6677243114 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.8021189570 + -2.2205784321 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.9296174645 + -0.3921466768 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -1.6627858877 + 2.2412745953 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2413368821 + -0.0928942785 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7761213183 + -2.1726987362 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.6004397869 + -0.3023709953 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -1.8124120235 + 2.5255644321 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.4020558298 + 0.3859095871 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.8359718919 + -2.2325491905 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0318601802 + 0.1315450519 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -1.8707103729 + 2.7586135864 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6582746506 + 1.4638130665 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.9770009518 + -1.0355393887 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.3404104412 + -2.3694448471 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7076736689 + -0.7961374521 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.5131137371 + 1.7846834660 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -1.6627858877 + 1.5679566860 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1719386578 + 2.8153848648 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7675241232 + 1.5230687857 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.4707674980 + -1.3497544527 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.3466558754 + -2.4507670403 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.2240104675 + -1.1337386370 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.4867386520 + 0.3261826038 + + + + + -1.1016255617 + -0.5668530464 + + + + + + + + 1.000000 + 0.526239 + 0.229116 + 1.000000 + + + 0.368591 + 0.054592 + 0.000367 + 1.000000 + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 0.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 0.000000 + + + + + + + + + + + + + + + -0.2920670211 + -0.0973556712 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.368590 + 0.093209 + 0.000000 + 1.000000 + + + 0.614758 + 0.205665 + 0.000000 + 1.000000 + + + + + + -0.0933790579 + -0.1468464881 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 0.492537 + + + 0.368591 + 0.054592 + 0.000367 + 0.000000 + + + + + + -1.5252388716 + -0.7139415741 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.668137 + 0.445613 + 0.180129 + 1.000000 + + + + + -0.0643781647 + -0.2328656912 + + + + + + + + + + + + + + + + + + + + + + + + -2.3215346336 + 3.2606282234 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.8768180609 + 3.0616166592 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.4014495611 + 2.6467370987 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.0805414915 + 2.2623436451 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.6633694172 + -0.6326169372 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6852339506 + -2.3124501705 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.4364871979 + 0.5622851253 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.8326535225 + 2.6206669807 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.136579 + 0.025753 + 0.003409 + 1.000000 + + + + + -0.0643781647 + -0.2328656912 + + + + + + + + + + + + + + + + + + + + + + + + -2.5124592781 + 3.4483561516 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7273231745 + 3.2022943497 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2700022459 + 2.7833168507 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.1697320938 + 2.4385998249 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.8539276123 + -0.6387156248 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7990334034 + -2.4649844170 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.6231255531 + 0.6254264116 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.0307235718 + 2.5930707455 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/pastecanvas_icon.sif b/synfig-studio/images/pastecanvas_icon.sif new file mode 100644 index 0000000..58e809e --- /dev/null +++ b/synfig-studio/images/pastecanvas_icon.sif @@ -0,0 +1,2065 @@ + + + Untitled0 + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + + + + + + + + + + + + + + + -0.8000000119 + 0.8000000119 + + + + + -0.8000000119 + -0.2000000030 + + + + + 0.2000000030 + -0.2000000030 + + + + + 0.2000000030 + 0.8000000119 + + + + + + + + + + + + + + + + + + 0.2000000030 + 0.2000000030 + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -0.8000000119 + 0.8000000119 + + + + + -0.8000000119 + -0.2000000030 + + + + + 0.2000000030 + -0.2000000030 + + + + + 0.2000000030 + 0.8000000119 + + + + + + + + + + + + + + + + + + 1.000000 + 0.900000 + 0.600000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -0.6999999881 + 0.6999999881 + + + + + -0.6999999881 + -0.1000000015 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.1000000015 + 0.6999999881 + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.850000 + 0.640000 + 0.200000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.850000 + 0.640000 + 0.200000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 0.3589743674 + -0.1217948720 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.850000 + 0.640000 + 0.200000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.850000 + 0.640000 + 0.200000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/plant_icon.sif b/synfig-studio/images/plant_icon.sif new file mode 100644 index 0000000..55b49d2 --- /dev/null +++ b/synfig-studio/images/plant_icon.sif @@ -0,0 +1,961 @@ + + + Synfig Studio Plant Icon + Placed in the Public Domain in 2008 by Carlos López (Genete) + + + + + + + + + + + + + -2.3637278080 + 0.2062759846 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.5688224435 + 2.1194937229 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.4810948372 + -0.9839330316 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.5429599285 + -2.0844035149 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.6772783995 + 0.3616140485 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6594920158 + -0.6549533606 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.036189 + 0.036189 + 0.036189 + 1.000000 + + + 0.012910 + 0.012910 + 0.012910 + 0.731343 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + 1.6070324183 + 0.3102017045 + + + + + 0.0000000000 + -3.4489021301 + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + -1.7831057310 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + -0.9735599756 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + 1.000000 + 0.899507 + 0.600345 + 1.000000 + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + -1.7831057310 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + -0.9735599756 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + 1.000000 + 0.899507 + 0.600345 + 1.000000 + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + -1.7831057310 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + -0.9735599756 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + 1.000000 + 0.899507 + 0.600345 + 1.000000 + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.1613876820 + -2.2716398239 + + + + + -1.6225999594 + 2.5961599350 + + + + + + 0.064115 + 0.064115 + 0.064115 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/polygon_icon.sif b/synfig-studio/images/polygon_icon.sif new file mode 100644 index 0000000..03f2411 --- /dev/null +++ b/synfig-studio/images/polygon_icon.sif @@ -0,0 +1,886 @@ + + + Synfig Studio Polygon Icon + Placed in the Public Domain in 2007 by Chris Norman (pixelgeek) + + + + + + + + + + + + + + + + + + + + 0.012910 + 0.012910 + 0.012910 + 1.000000 + + + 0.012910 + 0.012910 + 0.012910 + 0.731343 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + 0.1808688790 + -0.3216028810 + + + + + + + + + + + + + + + + -1.8803261518 + 2.0255250931 + + + + + 1.9384056330 + -1.9093658924 + + + + + -2.7515196800 + -1.2269309759 + + + + + 2.7515196800 + -1.2269309759 + + + + + 2.7515196800 + -2.7224798203 + + + + + -2.7515196800 + -2.7079598904 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 2.5961568356 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.3407971859 + 0.4787994027 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.3033983707 + -2.2077972889 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.4895981550 + -2.2077972889 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.3008971214 + 0.4920994043 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 2.2875971794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.0747973919 + 0.4388994575 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1171985865 + -1.9816975594 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.3432983160 + -1.9550975561 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.0747973919 + 0.4388994575 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.428529 + 0.428529 + 0.428529 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 2.0215976238 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.8619977236 + 0.3989995122 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.9708988070 + -1.7821978331 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.1836985350 + -1.7821978331 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.8619977236 + 0.3457995653 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5355694294 + -3.3529567719 + + + + + -0.6339452267 + 0.8150724769 + + + + + + 0.064115 + 0.064115 + 0.064115 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/polyline_icon.sif b/synfig-studio/images/polyline_icon.sif new file mode 100644 index 0000000..8b5e593 --- /dev/null +++ b/synfig-studio/images/polyline_icon.sif @@ -0,0 +1,788 @@ + + + Synfig Studio Polyline Icon + Placed in the Public Domain in 2008 by Carlos López (Genete) + + + + + + + + + + + + + -2.3637278080 + 0.2062759846 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.5688224435 + 2.1194937229 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.4810948372 + -0.9839330316 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.5429599285 + -2.0844035149 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.6772783995 + 0.3616140485 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6594920158 + -0.6549533606 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.036189 + 0.036189 + 0.036189 + 1.000000 + + + 0.012910 + 0.012910 + 0.012910 + 0.731343 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + 1.6070324183 + 0.3102017045 + + + + + 0.0000000000 + -3.4489021301 + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.9432895184 + -3.7802658081 + + + + + -1.0177584887 + 0.9443578720 + + + + + + 0.064115 + 0.064115 + 0.064115 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -2.6194977760 + 0.2062759846 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.5688224435 + 2.3933870792 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.7468631268 + -0.9839330316 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.5429599285 + -2.3679156303 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.6772783995 + 0.1130477637 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6594920158 + -0.9259382486 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/real_icon.sif b/synfig-studio/images/real_icon.sif new file mode 100644 index 0000000..783619c --- /dev/null +++ b/synfig-studio/images/real_icon.sif @@ -0,0 +1,281 @@ + + + Synfig Studio Canvas Icon + + + Untitled + + + + + + + + + + + + + 1.000000 + 0.300000 + 0.100000 + 1.000000 + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + -0.2187500000 + -0.2812500000 + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + -0.2031250000 + -0.2656250000 + + + + + + + + + + + + + + + + + + + + + + 0.2000000030 + 0.2000000030 + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + 0.4215 + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Sans Serif + + + + + + + + + + + + + + + + 0.3281250000 + 0.3828125000 + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.2624999881 + -0.8750000000 + + + + + + + + + + + + + + + + + + + + + 3.1415 + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Sans Serif + + + + + + + + + + + + + + + + 0.4046874940 + 0.6234375238 + + + + + 0.5000000000 + 0.5000000000 + + + + + -0.1312499940 + 0.2843750119 + + + + + + + + + + diff --git a/synfig-studio/images/rectangle_icon.sif b/synfig-studio/images/rectangle_icon.sif new file mode 100644 index 0000000..dac8a49 --- /dev/null +++ b/synfig-studio/images/rectangle_icon.sif @@ -0,0 +1,286 @@ + + + Synfig Studio Rectangle Icon + Placed in the Public Domain in 2007 by Chris Norman (pixelgeek) + + + + + + + + + + + + + + + + + + + -0.6717824340 + 8.4043684006 + + + + + -0.4427109957 + -1.6098945141 + + + + + + 0.064115 + 0.064115 + 0.064115 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + + + + + + + + + -1.8803261518 + 2.0255250931 + + + + + 1.9384056330 + -1.9093658924 + + + + + -2.3365411758 + -2.3365411758 + + + + + 2.3365411758 + -2.3365411758 + + + + + 3.1153881550 + -3.1153881550 + + + + + -1.5576940775 + -3.1153881550 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -2.3365411758 + -2.3365411758 + + + + + 2.3365411758 + 2.3365411758 + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + -2.0769255161 + -2.0769255161 + + + + + 2.0769255161 + 2.0769255161 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + -1.8173098564 + -1.8173098564 + + + + + 1.8173098564 + 1.8173098564 + + + + + + + + + + + + + + + + + + + + + + 2.1013975143 + -2.0880973339 + + + + + -1.7954977751 + 1.7954977751 + + + + + + 0.064115 + 0.064115 + 0.064115 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/rename_icon.sif b/synfig-studio/images/rename_icon.sif new file mode 100644 index 0000000..89e1fdc --- /dev/null +++ b/synfig-studio/images/rename_icon.sif @@ -0,0 +1,3542 @@ + + + Untitled1 + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -4.3990993500 + 2.2938718796 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -4.3990993500 + -6.8018569946 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5564579964 + -6.8018569946 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5564579964 + 0.1537004113 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.4162864685 + 2.2938718796 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 0.4162864685 + 0.1537004113 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5564579964 + 0.1537004113 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.4162864685 + 2.2938718796 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.1830623448 + 3.0621335506 + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -4.3990993500 + 2.2938718796 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -4.3990993500 + -6.8018569946 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5564579964 + -6.8018569946 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5564579964 + 0.1537004113 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.4162864685 + 2.2938718796 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 0.4162864685 + 0.1537004113 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5564579964 + 0.1537004113 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.4162864685 + 2.2938718796 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + b + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Sans Serif + + + + + + + + + + + + + + + + 2.6752145290 + 2.6752145290 + + + + + 0.5000000000 + 0.5000000000 + + + + + -1.7238850594 + -4.1266427040 + + + + + + + + + + + + + + + + + + + + + + + + a + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Sans Serif + + + + + + + + + + + + + + + + 2.6752145290 + 3.2102572918 + + + + + 0.5000000000 + 0.5000000000 + + + + + -1.7238850594 + -0.3813425004 + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -3.3290138245 + -1.9864711761 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.1187564358 + 1.2237862349 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.0214152336 + -4.1266427040 + + + + + + + + + + + + + + + + + + 0.012910 + 0.012910 + 0.012910 + 1.000000 + + + 0.013228 + 0.012910 + 0.012910 + 0.731343 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + 0.2707099915 + -0.5653312802 + + + + + + + + + + + + + + + + -1.8803261518 + 2.0255250931 + + + + + 1.9384056330 + -1.9093658924 + + + + + -2.8436625004 + -1.2998692989 + + + + + 2.9688537121 + 2.2388386726 + + + + + 2.9537954330 + -0.7728276849 + + + + + -2.5876708031 + -2.2636024952 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.0214152336 + -4.1266427040 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 2.5961599350 + 2.7584199905 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + -1.1358200312 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -1.4603400230 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5961599350 + -1.6225999594 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.4338998795 + -1.1358200312 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7848598957 + 3.5697197914 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.4338998795 + 3.4074599743 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.4338998795 + -1.4603400230 + + + + + 2.1093800068 + 2.9206798077 + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + 0.706375 + 0.315940 + 0.001616 + 1.000000 + + + 0.625088 + 0.423825 + 0.000000 + 1.000000 + + + 1.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -2.4338998795 + -1.1358200312 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1906459332 + -1.2300417423 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -1.4603400230 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5961599350 + -1.6225999594 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 0.718828 + 0.313430 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -1.4603400230 + -0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + -1.1358200312 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -1.4603400230 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1958444118 + -1.2352403402 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.4338998795 + -1.1358200312 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.718828 + 0.323086 + 0.100841 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -1.4603400230 + -0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + -1.1358200312 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.6225999594 + 1.7848598957 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.4603400230 + 2.4338998795 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.8112999797 + 2.5961599350 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.485435 + 0.487383 + 0.487383 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.4603400230 + 2.4338998795 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.6225999594 + 1.7848598957 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.9471199512 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7848598957 + 2.7584199905 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.1358199120 + 2.9206798077 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.8112999797 + 2.5961599350 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.7848598957 + 2.7584199905 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.9471199512 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5961599350 + 2.7584199905 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.4338998795 + 3.4074599743 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7848598957 + 3.5697197914 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.1358199120 + 2.9206798077 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.1622599959 + -0.1622599959 + + + + + -0.9735599756 + 0.6490399837 + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + + + + + + + + + + + + + + + + + + -0.6490399837 + 0.4867799878 + + + + + -1.1358199120 + 0.9735599756 + + + + + + 0.000000 + 0.000000 + 0.000000 + 0.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 2.5961599350 + 2.7584199905 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + -1.1358200312 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -1.4603400230 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5961599350 + -1.6225999594 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.4338998795 + -1.1358200312 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7848598957 + 3.5697197914 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.4338998795 + 3.4074599743 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.1830623448 + 3.0621335506 + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/reset_colors_icon.sif b/synfig-studio/images/reset_colors_icon.sif new file mode 100644 index 0000000..353e336 --- /dev/null +++ b/synfig-studio/images/reset_colors_icon.sif @@ -0,0 +1,219 @@ + + + Synfig Studio Reset Colors Icon + Placed in the Public Domain in 2008 by Carlos López (Genete) + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + -0.3750000000 + 0.1250000000 + + + + + 0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0625000000 + -0.0625000000 + + + + + 0.0625000000 + 0.0625000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -0.7500000000 + 0.7500000000 + + + + + 0.3750000000 + -0.1250000000 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0625000000 + -0.0625000000 + + + + + 0.0625000000 + 0.0625000000 + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/rotate_icon.sif b/synfig-studio/images/rotate_icon.sif new file mode 100644 index 0000000..7fab72e --- /dev/null +++ b/synfig-studio/images/rotate_icon.sif @@ -0,0 +1,2393 @@ + + + Synfig Studio Rotate Icon + Placed in the Public Domain in 2007 by Chris Norman (pixelgeek) + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + 0.300000 + 0.300000 + 0.300000 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + -2.5961599350 + 2.5961599350 + + + + + 2.6703450680 + -2.1673052311 + + + + + -3.2451999187 + 0.8112999797 + + + + + 1.7848598957 + 0.8112999797 + + + + + 2.2716398239 + -0.3245199919 + + + + + -2.9206800461 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + 0.300000 + 0.300000 + 0.300000 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + -2.5961599350 + 2.5961599350 + + + + + 2.6703450680 + -2.1673052311 + + + + + -2.2716398239 + -1.4603400230 + + + + + 2.7584199905 + -1.4603400230 + + + + + 3.2451999187 + -2.5961599350 + + + + + -1.9471199512 + -2.5961599350 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.4867799878 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247059 + 1.000000 + + + + + -3.3425526619 + 0.0000000000 + + + + + 0.5516827703 + 3.1153881550 + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + -3.0829367638 + 0.2596156895 + + + + + 0.2920670807 + 2.8557724953 + + + + + + + + + + + + + + + + + + + + + + -1.7848598957 + 1.9471199512 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + -1.0384613276 + -1.4278886318 + + + + + 1.8173112869 + 0.6490369439 + + + + + + + + + + + + + + + + + + + + + + -1.7848600149 + 1.9471199512 + + + + + 2.9206800461 + -4.0564999580 + + + + + + 0.028991 + 0.133209 + 0.374624 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247059 + 1.000000 + + + + + -1.1146180630 + -2.0209679604 + + + + + 2.5569021702 + 0.9162484407 + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + -0.8734864593 + -1.7986452579 + + + + + 2.3052372932 + 0.6841450930 + + + + + + + + + + + + + + + + + + + + + + 0.1622599959 + -0.3245199919 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + -0.8288472295 + -1.2672259808 + + + + + 1.9548872709 + 0.7829568982 + + + + + + + + + + + + + + + + + + + + + + 2.0723481178 + -2.8204009533 + + + + + -2.8938808441 + 3.8485348225 + + + + + + 0.028991 + 0.133209 + 0.374624 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + 0.9735599756 + -0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + -4.0240430832 + -2.9855804443 + + + + + + + + + + + + + + + + + + + + + 2.7908737659 + 0.8437545300 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7524110079 + 1.4927937984 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7524110079 + 1.8822172880 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.1033717394 + 1.8822172880 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.9471199512 + 2.7584199905 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.7908737659 + 1.8822172880 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.1418344975 + 1.8822172880 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.1418344975 + 1.6226016283 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.7908737659 + 1.2331780195 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.303279 + 0.295082 + 0.303279 + 0.333333 + + + + + -0.1894220859 + -0.1675494760 + + + + + 0.1000007167 + 0.1000007167 + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247059 + 1.000000 + + + + + -4.0240430832 + -2.9855804443 + + + + + + + + + + + + + + + + + + + + + 2.7908737659 + 0.8437545300 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7524110079 + 1.4927937984 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7524110079 + 1.8822172880 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.1033717394 + 1.8822172880 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.9471199512 + 2.7584199905 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.7908737659 + 1.8822172880 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.1418344975 + 1.8822172880 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.1418344975 + 1.6226016283 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.7908737659 + 1.2331780195 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.1622599959 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + 1.1358199120 + 2.9206800461 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.1742811203 + 2.4014453888 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.1742811203 + 1.8822140694 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.8233203888 + 1.8822140694 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.9795694351 + 1.1033670902 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.1358184814 + 1.8822140694 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7848576307 + 1.8822140694 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7848598957 + 2.2716398239 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.1358184814 + 2.5312533379 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 1.000000 + + + + + 0.1622599959 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + 1.1358199120 + 2.9206800461 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.1742811203 + 2.4014453888 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.1742811203 + 1.8822140694 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.8233203888 + 1.8822140694 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.9795694351 + 1.1033670902 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.1358184814 + 1.8822140694 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7848576307 + 1.8822140694 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7848598957 + 2.2716398239 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.1358184814 + 2.5312533379 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/saveall_icon.sif b/synfig-studio/images/saveall_icon.sif new file mode 100644 index 0000000..98d9282 --- /dev/null +++ b/synfig-studio/images/saveall_icon.sif @@ -0,0 +1,66 @@ + + + Untitled0 + + + + + + + + + + + + SAVE +ALL + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Arial + + + + + + + + + + + + + + + + 0.7500000000 + 1.0000000000 + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + diff --git a/synfig-studio/images/scale_icon.sif b/synfig-studio/images/scale_icon.sif new file mode 100644 index 0000000..cd3c687 --- /dev/null +++ b/synfig-studio/images/scale_icon.sif @@ -0,0 +1,3494 @@ + + + Synfig Studio Scale Icon + Placed in the Public Domain in 2007 by Chris Norman (pixelgeek) + + + + + + + + + + + + + + + + + + + -0.6717824340 + 8.4043684006 + + + + + -0.4427109957 + -1.6098945141 + + + + + + 0.064115 + 0.064115 + 0.064115 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + + + + + + + + + -1.1483865976 + 1.7675857544 + + + + + 2.6703450680 + -2.1673052311 + + + + + -1.6225999594 + -2.2716398239 + + + + + 2.7584199905 + -2.2716398239 + + + + + 3.4074599743 + -3.0829398632 + + + + + -1.1358199120 + -3.0829398632 + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + -1.8173098564 + -2.5961568356 + + + + + 3.1153881550 + 1.5576940775 + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + -1.5576940775 + -2.3365411758 + + + + + 2.8557724953 + 1.2980784178 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + -1.2980784178 + -2.0769255161 + + + + + 2.5961568356 + 1.0384627581 + + + + + + + + + + + + + + + + + + + + + + -1.7848600149 + 1.9471199512 + + + + + 2.9206800461 + -4.0564999580 + + + + + + 0.028991 + 0.133209 + 0.374624 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + -3.1153881550 + 0.2596156895 + + + + + 0.0000000000 + 2.8557724953 + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + -2.8557724953 + 0.5192313790 + + + + + -0.2596156895 + 2.5961568356 + + + + + + + + + + + + + + + + + + + + + + -1.7848598957 + 1.9471199512 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + -0.8112969995 + -1.1682728529 + + + + + 1.2656285763 + 0.3894212246 + + + + + + + + + + + + + + + + + + + + + + -1.7848600149 + 1.9471199512 + + + + + 2.9206800461 + -4.0564999580 + + + + + + 0.028991 + 0.133209 + 0.374624 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.2769572735 + -1.7023979425 + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + 1.9471199512 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.2716398239 + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -1.9471199512 + 1.9471199512 + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + 1.9471199512 + 0.6490399837 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.2716398239 + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -1.9471199512 + 1.9471199512 + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + 1.9471199512 + 1.2980799675 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.2716398239 + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -1.9471199512 + 1.9471199512 + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + 1.9471199512 + -0.6490399837 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.2716398239 + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -1.9471199512 + 1.9471199512 + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.9788787961 + -1.5747181177 + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + 1.9471199512 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.2716398239 + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -1.9471199512 + 1.9471199512 + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + 1.9471199512 + 0.6490399837 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.2716398239 + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -1.9471199512 + 1.9471199512 + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + 1.9471199512 + 1.2980799675 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.2716398239 + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -1.9471199512 + 1.9471199512 + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + 1.9471199512 + -0.6490399837 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.2716398239 + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -1.9471199512 + 1.9471199512 + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0957598835 + -2.7983164787 + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + 2.2716398239 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + 1.7848598957 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + 1.2980799675 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + 0.8112999797 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + 0.3245199919 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + -0.1622599959 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0286085363 + 0.0443108305 + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + 2.2716398239 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + 1.7848598957 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + 1.2980799675 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + 0.8112999797 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + 0.3245199919 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + -0.1622599959 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.9471199512 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.064115 + 0.247404 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -1.7130378485 + 2.0215976238 + + + + + -2.0641574860 + 1.6385580301 + + + + + 0.7235190868 + -0.7979990244 + + + + + -0.0033114245 + -1.5410472155 + + + + + 1.8586863279 + -1.5304071903 + + + + + 1.8513576984 + 0.3191995919 + + + + + 1.0852786303 + -0.4468794465 + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -1.7236778736 + 1.7875177860 + + + + + -1.8407176733 + 1.6704779863 + + + + + 0.9682388306 + -0.7979990244 + + + + + 0.4222880602 + -1.3601673841 + + + + + 1.6990864277 + -1.3601673841 + + + + + 1.6704779863 + -0.1063998714 + + + + + 1.1065586805 + -0.6703191996 + + + + + + diff --git a/synfig-studio/images/seek_begin.sif b/synfig-studio/images/seek_begin.sif new file mode 100644 index 0000000..8198a46 --- /dev/null +++ b/synfig-studio/images/seek_begin.sif @@ -0,0 +1,339 @@ + + + Jump to first frame + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -0.1781170517 + 0.0458015278 + + + + + + + + + + + + + + + + + + + + + + 1.3129770756 + 1.6488549709 + + + + + -0.7430025339 + 0.0712468177 + + + + + 1.2824426889 + -1.6488549709 + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -1.1806615591 + 1.7201018333 + + + + + -0.7124682069 + -1.6590330601 + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/seek_end.sif b/synfig-studio/images/seek_end.sif new file mode 100644 index 0000000..c7aaec6 --- /dev/null +++ b/synfig-studio/images/seek_end.sif @@ -0,0 +1,339 @@ + + + Jump to last frame + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 1.1147744656 + 1.7167723179 + + + + + 0.6465811133 + -1.6623625755 + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -0.1781170517 + 0.0458015278 + + + + + + + + + + + + + + + + + + + + + + -1.0226300955 + 1.6455254555 + + + + + 1.0333495140 + 0.0679172799 + + + + + -0.9920957088 + -1.6521844864 + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/seek_next_frame.sif b/synfig-studio/images/seek_next_frame.sif new file mode 100644 index 0000000..9b79070 --- /dev/null +++ b/synfig-studio/images/seek_next_frame.sif @@ -0,0 +1,339 @@ + + + Jump to next frame + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -0.9920424223 + 1.6923077106 + + + + + -1.4602357149 + -1.6868271828 + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -0.1781170517 + 0.0458015278 + + + + + + + + + + + + + + + + + + + + + + -0.3623986542 + 1.6039716005 + + + + + 1.6935809851 + 0.0263634212 + + + + + -0.3318642676 + -1.6937383413 + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/seek_prev_frame.sif b/synfig-studio/images/seek_prev_frame.sif new file mode 100644 index 0000000..adeeef0 --- /dev/null +++ b/synfig-studio/images/seek_prev_frame.sif @@ -0,0 +1,339 @@ + + + Jump to previous frame + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -0.1781170517 + 0.0458015278 + + + + + + + + + + + + + + + + + + + + + + 0.7133283019 + 1.5936350822 + + + + + -1.3426512480 + 0.0160269383 + + + + + 0.6827939153 + -1.7040748596 + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.9893617034 + 1.6914893389 + + + + + 1.4575549364 + -1.6876455545 + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/segment_icon.sif b/synfig-studio/images/segment_icon.sif new file mode 100644 index 0000000..9ec6a04 --- /dev/null +++ b/synfig-studio/images/segment_icon.sif @@ -0,0 +1,65 @@ + + + Untitled0 + + + + + + + + + + + + SEG + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Sans Serif + + + + + + + + + + + + + + + + 1.0000000000 + 1.2500000000 + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + diff --git a/synfig-studio/images/select_all_child_layers_icon.sif b/synfig-studio/images/select_all_child_layers_icon.sif new file mode 100644 index 0000000..f056364 --- /dev/null +++ b/synfig-studio/images/select_all_child_layers_icon.sif @@ -0,0 +1,2949 @@ + + + Synfig Studio Select All Child Icon + Placed in the Public Domain in 2008 by Carlos López (Genete) + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + + + + + + + + + + + + + + + + + + -0.4000000060 + 0.4000000060 + + + + + -0.4000000060 + -0.4000000060 + + + + + 0.4000000060 + -0.4000000060 + + + + + 0.4000000060 + 0.4000000060 + + + + + + + + + + + + + + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + -0.4000000060 + 0.4000000060 + + + + + -0.4000000060 + -0.4000000060 + + + + + 0.4000000060 + -0.4000000060 + + + + + 0.4000000060 + 0.4000000060 + + + + + + + + + + + + + + + + + + 1.000000 + 0.900000 + 0.600000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + -0.3000000119 + 0.3000000119 + + + + + -0.3000000119 + -0.3000000119 + + + + + 0.3000000119 + -0.3000000119 + + + + + 0.3000000119 + 0.3000000119 + + + + + + + + Untitled0 + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + + + + + + + + + + + + + + + + + + -0.8000000119 + 0.8000000119 + + + + + -0.8000000119 + -0.2000000030 + + + + + 0.2000000030 + -0.2000000030 + + + + + 0.2000000030 + 0.8000000119 + + + + + + + + + + + + + + + + + + 0.2000000030 + 0.2000000030 + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + -0.8000000119 + 0.8000000119 + + + + + -0.8000000119 + -0.2000000030 + + + + + 0.2000000030 + -0.2000000030 + + + + + 0.2000000030 + 0.8000000119 + + + + + + + + + + + + + + + + + + 1.000000 + 0.900000 + 0.600000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + -0.6999999881 + 0.6999999881 + + + + + -0.6999999881 + -0.1000000015 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.1000000015 + 0.6999999881 + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.850000 + 0.640000 + 0.200000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.850000 + 0.640000 + 0.200000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 0.3589743674 + -0.1217948720 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.850000 + 0.640000 + 0.200000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + 0.6217948794 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7500000000 + -0.3782051206 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.850000 + 0.640000 + 0.200000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7500000000 + -0.7500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + -0.7500000000 + 0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.2500000000 + -0.2500000000 + + + + + + + + + + + + + + + + + + + + + -0.0012820513 + 0.0064102565 + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.4871794879 + 0.5750963688 + + + + + + + + + + + + + + + + + + + + + -0.8560000062 + 0.8719999790 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -0.0209230706 + 0.0100513026 + + + + + + + + + + + + + + + + + + + + + + + + 0.0102564106 + -1.7641025782 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7692307234 + -0.0102564106 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7641025782 + -1.7641025782 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0209230706 + 0.0100513026 + + + + + + + + + + + + 0.0102564106 + -1.7641025782 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7692307234 + -0.0102564106 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7641025782 + -1.7641025782 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 0.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/set_fill_color.sif b/synfig-studio/images/set_fill_color.sif new file mode 100644 index 0000000..9c77c44 --- /dev/null +++ b/synfig-studio/images/set_fill_color.sif @@ -0,0 +1,306 @@ + + + Synfig Studio Save as Default Fill Color + Placed in the Public Domain in 2009 by Carlos López (genete) + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -2.5000000000 + -1.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.0000000000 + -1.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.0000000000 + 2.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5000000000 + 2.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.960827 + 0.960701 + 0.960701 + 1.000000 + + + + + -1.0000000000 + 1.0000000000 + + + + + 2.5000000000 + -2.5000000000 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.2000000030 + -0.2000000030 + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + diff --git a/synfig-studio/images/set_outline_color.sif b/synfig-studio/images/set_outline_color.sif new file mode 100644 index 0000000..fd0a9f6 --- /dev/null +++ b/synfig-studio/images/set_outline_color.sif @@ -0,0 +1,306 @@ + + + Synfig Studio Save as Default Outline Color + Placed in the Public Domain in 2009 by Carlos López (genete) + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -1.0000000000 + -2.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5000000000 + -2.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5000000000 + 1.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.0000000000 + 1.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -2.5000000000 + 2.5000000000 + + + + + 1.0000000000 + -1.0000000000 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.2000000030 + -0.2000000030 + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + diff --git a/synfig-studio/images/show_grid_icon.sif b/synfig-studio/images/show_grid_icon.sif new file mode 100644 index 0000000..8799241 --- /dev/null +++ b/synfig-studio/images/show_grid_icon.sif @@ -0,0 +1,1155 @@ + + + Show Grig Icon + Copyright 2009 Carlos López. Released under GNU Public License published by the Free Software Foundation version 2.0 of the License or any later version. + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -3.1952149868 + 0.7988043427 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3.1952171326 + 0.7988043427 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -3.1952161789 + -0.7988040447 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3.1952159405 + -0.7988040447 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -3.1952161789 + -2.3964121342 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3.1952159405 + -2.3964121342 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -2.3964121342 + 3.1952161789 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.3964121342 + -3.1952161789 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -0.7988041639 + 3.1952161789 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7988041639 + -3.1952161789 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 0.7988039255 + 3.1952161789 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7988039255 + -3.1952161789 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 2.3964118958 + 3.1952161789 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.3964118958 + -3.1952161789 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -3.1952161789 + 2.3964121342 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3.1952159405 + 2.3964121342 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/sif_icon.sif b/synfig-studio/images/sif_icon.sif new file mode 100644 index 0000000..6088c92 --- /dev/null +++ b/synfig-studio/images/sif_icon.sif @@ -0,0 +1,1236 @@ + + + Untitled0 + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.5091290474 + 1.5202518702 + + + + + + + + + + + + + + -0.0000000000 + 1.2000000477 + + + + + 1.2000000477 + -1.2000000477 + + + + + + + + + 1.5202518702 + 0.5133263469 + + + + + + + + + + + + + + 1.2000000477 + -1.2000000477 + + + + + -1.2000000477 + 0.0000000000 + + + + + + + + + 0.4000000060 + 0.4000000060 + + + + + + + + + + + + + + -1.2000000477 + -0.0000000000 + + + + + 0.0000000000 + 1.2000000477 + + + + + + + + + + + + + + + + + + + + 1.0499999523 + 1.0499999523 + + + + + 0.6999999881 + 0.6999999881 + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.5091290474 + 1.5202518702 + + + + + + + + + + + + + + -0.0000000000 + 1.2000000477 + + + + + 1.2000000477 + -1.2000000477 + + + + + + + + + 1.5202518702 + 0.5133263469 + + + + + + + + + + + + + + 1.2000000477 + -1.2000000477 + + + + + -1.2000000477 + 0.0000000000 + + + + + + + + + 0.4000000060 + 0.4000000060 + + + + + + + + + + + + + + -1.2000000477 + -0.0000000000 + + + + + 0.0000000000 + 1.2000000477 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.8000000119 + 1.6000000238 + + + + + + + + + + + + + + -1.2000000477 + -0.0000000000 + + + + + 0.0000000000 + -1.7999999523 + + + + + + + + + -0.8000000119 + -1.6000000238 + + + + + + + + + + + + + + -0.0000000000 + -2.4000000954 + + + + + 1.7999999523 + 0.0000000000 + + + + + + + + + 1.6000000238 + -1.6000000238 + + + + + + + + + + + + + + 1.7999999523 + -0.0000000000 + + + + + -0.0000000000 + 1.7999999523 + + + + + + + + + 1.6000000238 + 0.2000000030 + + + + + + + + + + + + + + -0.0000000000 + 1.7999999523 + + + + + 0.0000000000 + 0.6000000238 + + + + + + + + + 1.2000000477 + 0.6000000238 + + + + + + + + + + + + + + -1.2000000477 + -0.0000000000 + + + + + -0.6000000238 + 0.0000000000 + + + + + + + + + 0.6000000238 + 0.6000000238 + + + + + + + + + + + + + + -0.6000000238 + -0.0000000000 + + + + + 0.0000000000 + 0.6000000238 + + + + + + + + + 0.6000000238 + 1.2000000477 + + + + + + + + + + + + + + 0.0000000000 + 1.2000000477 + + + + + -0.0000000000 + 0.6000000238 + + + + + + + + + 0.2000000030 + 1.6000000238 + + + + + + + + + + + + + + -0.6000000238 + -0.0000000000 + + + + + -0.6000000238 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + 1.0499999523 + 1.0499999523 + + + + + 0.8500000238 + 0.8500000238 + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.8000000119 + 1.6000000238 + + + + + + + + + + + + + + -1.2000000477 + -0.0000000000 + + + + + 0.0000000000 + -1.7999999523 + + + + + + + + + -0.8000000119 + -1.6000000238 + + + + + + + + + + + + + + -0.0000000000 + -2.4000000954 + + + + + 1.7999999523 + 0.0000000000 + + + + + + + + + 1.6000000238 + -1.6000000238 + + + + + + + + + + + + + + 1.7999999523 + -0.0000000000 + + + + + -0.0000000000 + 1.7999999523 + + + + + + + + + 1.6000000238 + 0.2000000030 + + + + + + + + + + + + + + -0.0000000000 + 1.7999999523 + + + + + 0.0000000000 + 0.6000000238 + + + + + + + + + 1.2000000477 + 0.6000000238 + + + + + + + + + + + + + + -1.2000000477 + -0.0000000000 + + + + + -0.6000000238 + 0.0000000000 + + + + + + + + + 0.6000000238 + 0.6000000238 + + + + + + + + + + + + + + -0.6000000238 + -0.0000000000 + + + + + 0.0000000000 + 0.6000000238 + + + + + + + + + 0.6000000238 + 1.2000000477 + + + + + + + + + + + + + + 0.0000000000 + 1.2000000477 + + + + + -0.0000000000 + 0.6000000238 + + + + + + + + + 0.2000000030 + 1.6000000238 + + + + + + + + + + + + + + -0.6000000238 + -0.0000000000 + + + + + -0.6000000238 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + -0.2307692319 + 0.7179487348 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + -0.4000000060 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0750000030 + -0.0750000030 + + + + + 0.1500000060 + 0.1500000060 + + + + + + + + + + + + + + + + + + + + -0.2000000030 + 0.0000000000 + + + + diff --git a/synfig-studio/images/sketch_icon.sif b/synfig-studio/images/sketch_icon.sif new file mode 100644 index 0000000..201a04c --- /dev/null +++ b/synfig-studio/images/sketch_icon.sif @@ -0,0 +1,2351 @@ + + + Synfig Studio Sketch Icon + Placed in the Public Domain in 2007 by Chris Norman (pixelgeek) + + + + + + + + + + + + + + + + + + + 0.0000000000 + -0.4867799878 + + + + + + + + + + + + + + + + + + 0.012910 + 0.012910 + 0.012910 + 1.000000 + + + 0.013228 + 0.012910 + 0.012910 + 0.731343 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + 0.2707099915 + -0.5653312802 + + + + + + + + + + + + + + + + -1.8803261518 + 2.0255250931 + + + + + 1.9384056330 + -1.9093658924 + + + + + -2.8436625004 + -1.2998692989 + + + + + 2.9688537121 + 2.2388386726 + + + + + 2.9537954330 + -0.7728276849 + + + + + -2.5876708031 + -2.2636024952 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + -0.4867799878 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 2.5961599350 + 2.7584199905 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + -1.1358200312 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -1.4603400230 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5961599350 + -1.6225999594 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.4338998795 + -1.1358200312 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7848598957 + 3.5697197914 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.4338998795 + 3.4074599743 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.4338998795 + -1.4603400230 + + + + + 2.1093800068 + 2.9206798077 + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + 0.706375 + 0.315940 + 0.001616 + 1.000000 + + + 0.625088 + 0.423825 + 0.000000 + 1.000000 + + + 1.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -2.4338998795 + -1.1358200312 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1906459332 + -1.2300417423 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -1.4603400230 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5961599350 + -1.6225999594 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 0.718828 + 0.313430 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.4603400230 + -0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + -1.1358200312 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -1.4603400230 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1958444118 + -1.2352403402 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.4338998795 + -1.1358200312 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.718828 + 0.323086 + 0.100841 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -1.4603400230 + -0.4867799878 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + -1.1358200312 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.6225999594 + 1.7848598957 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.4603400230 + 2.4338998795 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.8112999797 + 2.5961599350 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.485435 + 0.487383 + 0.487383 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 1.4603400230 + 2.4338998795 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.6225999594 + 1.7848598957 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.9471199512 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7848598957 + 2.7584199905 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.1358199120 + 2.9206798077 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.8112999797 + 2.5961599350 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 1.7848598957 + 2.7584199905 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.9471199512 + 2.1093800068 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5961599350 + 2.7584199905 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.4338998795 + 3.4074599743 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7848598957 + 3.5697197914 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.1358199120 + 2.9206798077 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.1622599959 + -0.1622599959 + + + + + -0.9735599756 + 0.6490399837 + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + + + + + + + + + + + + + + + + + + -0.6490399837 + 0.4867799878 + + + + + -1.1358199120 + 0.9735599756 + + + + + + 0.000000 + 0.000000 + 0.000000 + 0.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 2.5961599350 + 2.7584199905 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + -1.1358200312 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -1.4603400230 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.5961599350 + -1.6225999594 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.4338998795 + -1.1358200312 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7848598957 + 3.5697197914 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.4338998795 + 3.4074599743 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.1830623448 + 3.0621335506 + + + + diff --git a/synfig-studio/images/smooth_move_icon.sif b/synfig-studio/images/smooth_move_icon.sif new file mode 100644 index 0000000..2e184b7 --- /dev/null +++ b/synfig-studio/images/smooth_move_icon.sif @@ -0,0 +1,3458 @@ + + + Synfig Studio Smooth Move Icon + Placed in the Public Domain in 2007 by Chris Norman (pixelgeek) + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + 0.169382 + 0.175873 + 0.175873 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + -0.1586221159 + -0.3810055256 + + + + + + + + + + + + + + + + -2.5961599350 + 2.5961599350 + + + + + 2.6703450680 + -2.1673052311 + + + + + -3.2451999187 + -1.6225999594 + + + + + 2.7584199905 + -1.6225999594 + + + + + 3.4074599743 + -3.0829398632 + + + + + -2.5961599350 + -3.0829398632 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 0.103175 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 0.404762 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 0.680000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 1.000000 + + + + + 2.9206800461 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -3.0829398632 + -0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + -0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1358199120 + -0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1358201504 + -0.8112999797 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.3245201111 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1358201504 + 0.8112999797 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1358199120 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -3.0829398632 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 1.000000 + + + + + 1.4603400230 + -0.9735599756 + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + 0.9735599756 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + -0.8112999797 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.6490400434 + -0.8112999797 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.4603400230 + -1.6225999594 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.2716400623 + -0.8112999797 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + -0.8112999797 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 0.9735599756 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 1.000000 + + + + + 1.4603400230 + 1.6225999594 + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + -1.6225999594 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.2716400623 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.4603400230 + 0.9735599756 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.6490400434 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + -1.6225999594 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.011238 + 0.065656 + 0.247404 + 1.000000 + + + + + 0.3245199919 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.1622599959 + -0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1358199120 + -0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -0.8112999797 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.9206800461 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + 0.8112999797 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1358199120 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.1622599959 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.447059 + 0.623529 + 0.811765 + 1.000000 + + + + + 1.4603400230 + -1.6225999594 + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + 1.6225999594 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + -0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.8112999797 + -0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.4603400230 + -0.8112999797 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + -0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 1.6225999594 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.447059 + 0.623529 + 0.811765 + 1.000000 + + + + + 1.4603400230 + 1.6225999594 + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + -1.6225999594 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6225999594 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.4603400230 + 0.8112999797 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.8112999797 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + -0.3245199919 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + -1.6225999594 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.447059 + 0.623529 + 0.811765 + 1.000000 + + + + + 2.9206800461 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -2.9206800461 + -0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.3896085024 + -0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1358199120 + -0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1358199120 + -0.6490399837 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.4867799878 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1358199120 + 0.6490399837 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1358199120 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.3896085024 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.9206800461 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.447059 + 0.623529 + 0.811765 + 1.000000 + + + + + 0.3245199919 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.1622599959 + -0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + -0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + -0.6490399837 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.7584199905 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + 0.6490399837 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.1093800068 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2980799675 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.1622599959 + 0.1622599959 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/snap_grid_icon.sif b/synfig-studio/images/snap_grid_icon.sif new file mode 100644 index 0000000..96c5613 --- /dev/null +++ b/synfig-studio/images/snap_grid_icon.sif @@ -0,0 +1,1155 @@ + + + Snap Grig Icon + Copyright 2009 Carlos López. Released under GNU Public License published by the Free Software Foundation version 2.0 of the License or any later version. + + + + + + + + + + + + + + + + + + + 0.100000 + 0.100000 + 0.100000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -3.1952149868 + 0.7988043427 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3.1952171326 + 0.7988043427 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.100000 + 0.100000 + 0.100000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -3.1952161789 + -2.3964121342 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3.1952159405 + -2.3964121342 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.100000 + 0.100000 + 0.100000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -2.3964121342 + 3.1952161789 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.3964121342 + -3.1952161789 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.100000 + 0.100000 + 0.100000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -0.7988041639 + 3.1952161789 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7988041639 + -3.1952161789 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.100000 + 0.100000 + 0.100000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 2.3964118958 + 3.1952161789 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.3964118958 + -3.1952161789 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.100000 + 0.100000 + 0.100000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -3.1952161789 + 2.3964121342 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3.1952159405 + 2.3964121342 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -3.1952161789 + -0.7988040447 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3.1952159405 + -0.7988040447 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 0.7988039255 + 3.1952161789 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7988039255 + -3.1952161789 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/splash_screen-0.61.07.sif b/synfig-studio/images/splash_screen-0.61.07.sif new file mode 100644 index 0000000..4844e6c --- /dev/null +++ b/synfig-studio/images/splash_screen-0.61.07.sif @@ -0,0 +1,1992 @@ + + + Splash Screen Graphic + This is the splash screen graphic which is displayed when Synfig Studio starts. + + + + + + + + + + Aqua Sphere + This aqua-colored sphere reminds me of something from MacOS X. + + + + + + + + + + + + + 0.000000 + 0.744518 + 0.825040 + 1.000000 + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 0.587045 + 0.941024 + 1.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.7500000000 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + -0.1500000060 + -0.3499999940 + + + + + + + + + + + + + + + + + + + + + + 0.2000000030 + 0.2000000030 + + + + + + + + + + + + + + + + + + + 0.000000 + 0.762890 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + SYNFIG Studio + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + luxisr + + + + + + + + + + + + + + + + 0.1899999976 + 0.2000000030 + + + + + 1.0000000000 + 1.0000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + 0.0500000007 + 0.0500000007 + + + + + + + + + + + + + + + + + + SYNFIG Studio + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + luxisr + + + + + + + + + + + + + + + + 0.1899999976 + 0.2000000030 + + + + + 1.0000000000 + 1.0000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + 0.0000000000 + 0.2500000000 + + + + + 0.0000000000 + 2.7500000000 + + + + + + 0.000000 + 0.000000 + 0.000000 + 0.000000 + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -1.7500000000 + 2.5000000000 + + + + + 1.7500000000 + 2.2500703335 + + + + + + + + + + + + + + + + + + + + + + -1.5000000000 + 2.5000000000 + + + + + -1.2500000000 + 2.2500000000 + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 0.000000 + + + 1.000000 + 1.000000 + 0.000000 + 1.000000 + + + 1.000000 + 1.000000 + 0.000000 + 1.000000 + + + 0.000000 + 0.000000 + 0.000000 + 0.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 2.3697917461 + + + + + + + + + + + + + + + + A + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + arial + + + + + + + + + + + + + + + + 0.0937500000 + 0.0773138478 + + + + + 0.5000000000 + 0.5000000000 + + + + + 1.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + H + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + arial + + + + + + + + + + + + + + + + 0.0937500000 + 0.0773138478 + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.5000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + P + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + arial + + + + + + + + + + + + + + + + 0.0937500000 + 0.0773138478 + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + L + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + arial + + + + + + + + + + + + + + + + 0.0937500000 + 0.0773138478 + + + + + 0.5000000000 + 0.5000000000 + + + + + -0.5000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + A + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + arial + + + + + + + + + + + + + + + + 0.0937500000 + 0.0773138478 + + + + + 0.5000000000 + 0.5000000000 + + + + + -1.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + -1.5000000000 + 2.3711292744 + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.5000000000 + 2.5000000000 + + + + + 1.5000000000 + 2.2500000000 + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + 0.483334 + 0.483334 + 0.483334 + 1.000000 + + + 0.801383 + 0.801383 + 0.801384 + 1.000000 + + + 0.546153 + 0.546153 + 0.546153 + 1.000000 + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0416666679 + -0.0416666679 + + + + + 0.0416666679 + 0.0416666679 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 1.2500000000 + + + + + + + + + + + + + + + + + + 0.920368 + 0.920368 + 0.920368 + 0.000000 + + + 0.934270 + 0.934270 + 0.934270 + 0.820503 + + + 0.929226 + 0.929226 + 0.929226 + 0.404875 + + + 1.000000 + 1.000000 + 1.000000 + 0.425000 + + + 0.876978 + 0.876978 + 0.876978 + 0.064816 + + + 0.940432 + 0.940432 + 0.940432 + 0.353949 + + + 0.976427 + 0.976427 + 0.976427 + 0.252097 + + + 1.000000 + 1.000000 + 1.000000 + 0.800000 + + + -0.000000 + -0.000000 + -0.000000 + 0.008584 + + + 1.000000 + 1.000000 + 1.000000 + 0.655000 + + + -0.000000 + -0.000000 + -0.000000 + 0.008584 + + + 0.997147 + 0.997147 + 0.997147 + 0.752147 + + + -0.000000 + -0.000000 + -0.000000 + 0.008584 + + + 1.000000 + 1.000000 + 1.000000 + 0.697727 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + 0.958579 + 0.958579 + 0.958579 + 0.150345 + + + 0.930914 + 0.930914 + 0.930914 + 1.000000 + + + -0.000000 + -0.000000 + -0.000000 + 0.008584 + + + 0.992545 + 0.992545 + 0.992545 + 0.537339 + + + -0.000000 + -0.000000 + -0.000000 + 0.008584 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + 1.000000 + 1.000000 + 1.000000 + 0.525000 + + + -0.000000 + -0.000000 + -0.000000 + 0.008584 + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 1.493478 + 1.439264 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + 0.0374999978 + 0.0374999978 + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.0000000000 + 1.2500000000 + + + + + + + + + + + + + + + + + + + + + 0.013829 + 0.013829 + 0.013829 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + 0.1041666642 + 0.1041666642 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0099999998 + 0.1424999982 + + + + + + + + + + + + + + + + + -0.0990606323 + 0.4690153301 + + + + + -0.0990606323 + -0.0307283755 + + + + + + 0.000000 + 0.000000 + 0.000000 + 0.000000 + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + S T U D I O + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Times New Roman + + + + + + + + + + + + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.5000000000 + 1.0000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + -2.0734415054 + 0.6111532450 + + + + + 2.1833333969 + -0.0333333351 + + + + + -2.5265016556 + -0.3445624709 + + + + + 2.6473100185 + -0.3445624709 + + + + + 2.1666667461 + 0.0170713197 + + + + + -2.0499999523 + 0.0170713197 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.1000000015 + 0.0000000000 + + + + + + + + + + + + + + + + + + S T U D I O + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Times New Roman + + + + + + + + + + + + + + + + 0.5000000000 + 0.4500000179 + + + + + 0.5000000000 + 1.0000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -2.5000000000 + 0.7500000000 + + + + + 2.5000000000 + -0.5000000000 + + + + + + + + + + + + + + + + + + + + + S Y N F I G + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Arial + + + + + + + + + + + + + + + + 0.3000000119 + 0.2166666687 + + + + + 0.5000000000 + 1.0000000000 + + + + + 0.0000000000 + 0.5666666627 + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.0000000000 + -0.5000000000 + + + + + 0.0000000000 + 2.5000000000 + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -1.5000000000 + 2.5000000000 + + + + + 1.5000000000 + -1.0000000000 + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/splash_screen-0.61.08.sif b/synfig-studio/images/splash_screen-0.61.08.sif new file mode 100644 index 0000000..0d6edca --- /dev/null +++ b/synfig-studio/images/splash_screen-0.61.08.sif @@ -0,0 +1,3075 @@ + + + Synfig Splash Screen + Licenced under GPLv2 and above, by Aurore D. (rore) + + + + + + + + + + + + + 0.313598 + 0.000338 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.506508 + 0.023233 + 0.033219 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -1.1452138424 + -3.9326298237 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.5435938835 + 3.9727866650 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.8817074299 + 4.0854911804 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.9639706612 + -4.0614352226 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.6097564697 + 1.9441053867 + + + + + 2.6706390381 + 0.7204564214 + + + + + + 0.557123 + 0.042463 + 0.003340 + 1.000000 + + + 0.313598 + 0.000338 + 0.000000 + 0.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.506508 + 0.023233 + 0.033219 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -1.9019440413 + 3.8761827946 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.8512661457 + -3.8843278885 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.9842073321 + -4.3029446602 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.2078564167 + 3.9083840847 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7587983012 + 1.2034757137 + + + + + -2.5459699631 + 0.0120280515 + + + + + + 0.630060 + 0.042463 + 0.000000 + 1.000000 + + + 0.313598 + 0.000338 + 0.000000 + 0.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.506508 + 0.023233 + 0.033219 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -0.4206847847 + 4.3431015015 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.2842235565 + -4.1902403831 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.6706390381 + -3.7716233730 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.3664867878 + 4.3592019081 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.2520222664 + -3.1920001507 + + + + + 0.4165487289 + 2.9745466709 + + + + + + 0.557123 + 0.042463 + 0.003340 + 1.000000 + + + 0.313598 + 0.000338 + 0.000000 + 0.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.980719 + 0.042463 + 0.003340 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -3.2657737732 + -2.8742499352 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.5566513538 + -1.5943112373 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.8919279575 + -1.9295026064 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.3116415739 + -1.0915242434 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7701739073 + -2.7776460648 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0939468369 + -2.1175196171 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.8398905396 + -3.2767660618 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.9708181620 + -1.9939625263 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.4737330675 + -0.0859501958 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.1700766087 + -0.6531971097 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.5253140926 + -0.4856014252 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.0411241055 + -1.7361229658 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.6858868599 + -1.0141724348 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3.2388865948 + -2.4556331635 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3.5447988510 + -4.5809183121 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.9598615170 + -4.1462006569 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0036742054 + -0.6145212054 + + + + + 0.4034270644 + -3.2444841862 + + + + + + 0.810842 + 0.072322 + 0.000000 + 1.000000 + + + 0.313598 + 0.000338 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.506508 + 0.023233 + 0.033219 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 0.5292532444 + 3.8439815044 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.1935157776 + -4.0292339325 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.8375414610 + -4.1419382095 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.5977918506 + 4.2786989212 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.2901196480 + -1.1311177015 + + + + + -2.6425738335 + 2.6525337696 + + + + + + 0.557123 + 0.042463 + 0.003340 + 1.000000 + + + 0.313598 + 0.000338 + 0.000000 + 0.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.506508 + 0.023233 + 0.033219 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 2.8316454887 + 3.1194524765 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.5292532444 + -3.9004285336 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2435777038 + -4.0292339325 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.3723828495 + 4.1176924706 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.1249771118 + -0.8091048002 + + + + + -2.6908757687 + 1.3644821644 + + + + + + 0.557123 + 0.042463 + 0.003340 + 1.000000 + + + 0.313598 + 0.000338 + 0.000000 + 0.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.506508 + 0.023233 + 0.033219 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 2.1393177509 + 3.3770627975 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3.2985641956 + -3.5462143421 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.5936558247 + -3.8682272434 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.3808274269 + 3.7956795692 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.5579345226 + -1.0828157663 + + + + + -0.7587983012 + -1.2438222170 + + + + + + 0.557123 + 0.042463 + 0.003340 + 1.000000 + + + 0.313598 + 0.000338 + 0.000000 + 0.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.506508 + 0.023233 + 0.033219 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.8656067848 + 3.6507737637 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.1106364802 + -3.9326298237 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0986718982 + -3.8360259533 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.2274770588 + 3.7473776340 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.6240971088 + -0.3260854781 + + + + + -0.7587983012 + -1.2438222170 + + + + + + 0.669578 + 0.056951 + 0.000000 + 1.000000 + + + 0.313598 + 0.000338 + 0.000000 + 0.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0342693217 + -1.4531306028 + + + + + + + + + + + + + + + + + 0.0000000000 + 1.2500000000 + + + + + + + + + + + + + + + + + + + + + 0.013829 + 0.013829 + 0.013829 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + 0.1524682790 + 0.1524682790 + + + + + + + + + + + + + + + + + + + + + + 0.833806 + 0.087474 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + 0.3220129013 + 0.3220129013 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.0503699630 + -2.0649549961 + + + + + + + + + + + + + + + + + 0.1000000015 + 0.0000000000 + + + + + + + + + + + + + + + + + + S T U D I O + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Times New Roman + + + + + + + + + + + + + + + + 0.5000000000 + 0.4500000179 + + + + + 0.5000000000 + 1.0000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -2.6026895046 + 0.7568103671 + + + + + 2.6368906498 + -0.5291483402 + + + + + + + + + + + + + + + + + + + + + S Y N F I G + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Arial + + + + + + + + + + + + + + + + 0.3000000119 + 0.2166666687 + + + + + 0.5000000000 + 1.0000000000 + + + + + -0.0056594773 + 0.6860917807 + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 0.106447 + 0.015346 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/splash_screen.sifz b/synfig-studio/images/splash_screen.sifz new file mode 100644 index 0000000000000000000000000000000000000000..3e95b66bccfa56eab4c1808b8405d36c75109fef GIT binary patch literal 323622 zcmZ6xWmFtZ)V7O5kOY^(CBdD+HMj&17F>r3ZVB$r;O_43u3>QZU?GFMJK^xW@A}R< z=lj{cR`sslRr}u8UEP$CXlSf?Cvpgg&JH#v&LAUaGbalRJ2q!)OAol?taUrmp?JTu zDGlt-rP8AwK(04i{qi7!Cl1vIV^v&MoKPC%IJf-H3DE)3e)qbQV!Ch1(oTs5CON-$ zkirK^T%C){kB$xxtJ9xfT8;+yua4bBj951zd5W-}p4ZiFul8qQ1K$^6S3!yw!JcLP zE>aBz*vx{Bk9(6l-|pjpeM`el2dAK83CkybigoYTnZ1YOrG$nB`!gv0a#}2IOsNJU zJel{y_Vz`=1*m;(yd?6Wkp~GjGnDb0>POk_Pu`A9b`{>MBi#o(%Atal%fA;Tu5BLf z-FlUFM@z|?uTkBv7%r=?B^OUU5SfIXYmeK1DIGgQ4;F3GV}rtvJC>XVMi3u?o~()F zgt-&en~lho$LE)+$b*MtQy!yeUhRgNshml|tE(B`%IcDxgoch8-woxIy^0xMl_~9| zhCx%k>>bnVxofvNy_kP{Ij=vspS-V)Dt69ZpEn1O@9dn~ZR?x8MOKw$n@WDb##SE& zLvI!imoE0bn%2gXcWg^84#rw0d~-y)swCZi{(kB?er(#g-W5N}*(GWa-TeEnJMg3` zSvpI!@|Dx5+hNnxgRg_!_S9|^BBrvGv7+*gl_kQVJI$Ak(#}pSX~-)-QJVFz!jsSN z6=uggJUcpZ?dI_^y?#c?X33XP5vsWJ_ryl8(YyU#6SyOR*xjA$G;nacWCQ|xbUik% zb*|x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g(r6!YC3%-UGQEXT+(%Mofx!uOSu@kU7)zh_DE+iuhGm z#++9UwM;_AVHy2xSv7W=RVtG>sb%Zll=Q3RkMSTloxN}&nIobnyymiI(B-hB)sv" +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +; + + for(list::iterator iter = CanvasView::get_pixel_sizes().begin(); iter != CanvasView::get_pixel_sizes().end(); iter++) + ui_info += strprintf(" ", *iter); + + ui_info += +" " +" " +" " +//" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +" " +//" " +//" " +//" " +//" " +" " +" " +" " +" " +" " +" " +" " +" " + +"" +; +/* "" + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + ""; +*/ + try + { + actions_action_group->set_sensitive(false); + App::ui_manager()->set_add_tearoffs(true); + App::ui_manager()->insert_action_group(menus_action_group,1); + App::ui_manager()->insert_action_group(actions_action_group,1); + App::ui_manager()->add_ui_from_string(ui_info); + + //App::ui_manager()->get_accel_group()->unlock(); + } + catch(const Glib::Error& ex) + { + synfig::error("building menus and toolbars failed: " + ex.what()); + } + + // Add default keyboard accelerators +#define ACCEL(accel,path) \ + { \ + Gtk::AccelKey accel_key(accel,path); \ + Gtk::AccelMap::add_entry(accel_key.get_path(), accel_key.get_key(), accel_key.get_mod()); \ + } + +#define ACCEL2(accel) \ + { \ + Gtk::AccelKey accel_key(accel); \ + Gtk::AccelMap::add_entry(accel_key.get_path(), accel_key.get_key(), accel_key.get_mod()); \ + } + + // the toolbox + ACCEL("a", "//state-normal" ); + ACCEL("v", "//state-smooth_move" ); + ACCEL("s", "//state-scale" ); + ACCEL("t", "//state-rotate" ); + ACCEL("m", "//state-mirror" ); + ACCEL("c", "//state-circle" ); + ACCEL("r", "//state-rectangle" ); + ACCEL("q", "//state-star" ); + ACCEL("g", "//state-gradient" ); + ACCEL("p", "//state-polygon" ); + ACCEL("b", "//state-bline" ); + ACCEL("x", "//state-text" ); + ACCEL("f", "//state-fill" ); + ACCEL("e", "//state-eyedrop" ); + ACCEL("z", "//state-zoom" ); + ACCEL("d", "//state-draw" ); + ACCEL("k", "//state-sketch" ); + ACCEL("w", "//state-width" ); + + // everything else + ACCEL("a", "//select-all-ducks" ); + ACCEL("d", "//unselect-all-ducks" ); + ACCEL("a", "//select-all-layers" ); + ACCEL("d", "//unselect-all-layers" ); + ACCEL("F9", "//render" ); + ACCEL("F11", "//preview" ); + ACCEL("F8", "//properties" ); + ACCEL("F12", "//options" ); + ACCEL("i", "//import" ); + ACCEL2(Gtk::AccelKey(GDK_Escape,static_cast(0), "//stop" )); + ACCEL("g", "//toggle-grid-show" ); + ACCEL("l", "//toggle-grid-snap" ); + ACCEL2(Gtk::AccelKey('`',Gdk::CONTROL_MASK, "//toggle-low-res" )); + ACCEL("1", "//mask-position-ducks" ); + ACCEL("2", "//mask-vertex-ducks" ); + ACCEL("3", "//mask-tangent-ducks" ); + ACCEL("4", "//mask-radius-ducks" ); + ACCEL("5", "//mask-width-ducks" ); + ACCEL("6", "//mask-angle-ducks" ); + ACCEL2(Gtk::AccelKey(GDK_Page_Up,Gdk::SHIFT_MASK, "//action-LayerRaise" )); + ACCEL2(Gtk::AccelKey(GDK_Page_Down,Gdk::SHIFT_MASK, "//action-LayerLower" )); + ACCEL("1", "//quality-01" ); + ACCEL("2", "//quality-02" ); + ACCEL("3", "//quality-03" ); + ACCEL("4", "//quality-04" ); + ACCEL("5", "//quality-05" ); + ACCEL("6", "//quality-06" ); + ACCEL("7", "//quality-07" ); + ACCEL("8", "//quality-08" ); + ACCEL("9", "//quality-09" ); + ACCEL("0", "//quality-10" ); + ACCEL("z", "//undo" ); + ACCEL("r", "//redo" ); + ACCEL2(Gtk::AccelKey(GDK_Delete,Gdk::CONTROL_MASK, "//action-LayerRemove" )); + ACCEL2(Gtk::AccelKey('(',Gdk::CONTROL_MASK, "//decrease-low-res-pixel-size" )); + ACCEL2(Gtk::AccelKey(')',Gdk::CONTROL_MASK, "//increase-low-res-pixel-size" )); + ACCEL2(Gtk::AccelKey('(',Gdk::MOD1_MASK|Gdk::CONTROL_MASK, "//amount-dec" )); + ACCEL2(Gtk::AccelKey(')',Gdk::MOD1_MASK|Gdk::CONTROL_MASK, "//amount-inc" )); + ACCEL2(Gtk::AccelKey(']',Gdk::CONTROL_MASK, "//jump-next-keyframe" )); + ACCEL2(Gtk::AccelKey('[',Gdk::CONTROL_MASK, "//jump-prev-keyframe" )); + ACCEL2(Gtk::AccelKey('=',Gdk::CONTROL_MASK, "//canvas-zoom-in" )); + ACCEL2(Gtk::AccelKey('-',Gdk::CONTROL_MASK, "//canvas-zoom-out" )); + ACCEL2(Gtk::AccelKey('+',Gdk::CONTROL_MASK, "//time-zoom-in" )); + ACCEL2(Gtk::AccelKey('_',Gdk::CONTROL_MASK, "//time-zoom-out" )); + ACCEL2(Gtk::AccelKey('.',Gdk::CONTROL_MASK, "//seek-next-frame" )); + ACCEL2(Gtk::AccelKey(',',Gdk::CONTROL_MASK, "//seek-prev-frame" )); + ACCEL2(Gtk::AccelKey('>',Gdk::CONTROL_MASK, "//seek-next-second" )); + ACCEL2(Gtk::AccelKey('<',Gdk::CONTROL_MASK, "//seek-prev-second" )); + ACCEL("o", "//toggle-onion-skin" ); + ACCEL("z", "//canvas-zoom-fit" ); + ACCEL("p", "//play" ); + ACCEL("Home", "//seek-begin" ); + ACCEL("End", "//seek-end" ); + +#undef ACCEL +} + +#ifdef _WIN32 +#define mkdir(x,y) mkdir(x) +#endif + +/* === M E T H O D S ======================================================= */ + +App::App(int *argc, char ***argv): + Gtk::Main(argc,argv), + IconController(etl::dirname((*argv)[0])) +{ + app_base_path_=etl::dirname(etl::dirname((*argv)[0])); + + + ui_interface_=new GlobalUIInterface(); + + gdk_rgb_init(); + + // don't call thread_init() if threads are already initialized + // on some machines bonobo_init() initialized threads before we get here + if (!g_thread_supported()) + Glib::thread_init(); + + distance_system=Distance::SYSTEM_UNITS; + + if(mkdir(get_user_app_directory().c_str(),ACCESSPERMS)<0) + { + if(errno!=EEXIST) + synfig::error("UNABLE TO CREATE \"%s\"",get_user_app_directory().c_str()); + } + else + { + synfig::info("Created directory \"%s\"",get_user_app_directory().c_str()); + } + + + ipc=new IPC(); + + if(!SYNFIG_CHECK_VERSION()) + { + cerr<<"FATAL: Synfig Version Mismatch"<(new synfigapp::Main(etl::dirname((*argv)[0]),&synfig_init_cb)); } + catch(std::runtime_error x) + { + get_ui_interface()->error(strprintf("%s\n\n%s", _("Failed to initialize synfig!"), x.what())); + throw; + } + catch(...) + { + get_ui_interface()->error(_("Failed to initialize synfig!")); + throw; + } + + // add the preferences to the settings + synfigapp::Main::settings().add_domain(&_preferences,"pref"); + + try + { + studio_init_cb.task(_("Init UI Manager...")); + App::ui_manager_=studio::UIManager::create(); + init_ui_manager(); + + studio_init_cb.task(_("Init Dock Manager...")); + dock_manager=new studio::DockManager(); + + studio_init_cb.task(_("Init State Manager...")); + state_manager=new StateManager(); + + studio_init_cb.task(_("Init Toolbox...")); + toolbox=new studio::Toolbox(); + + studio_init_cb.task(_("Init About Dialog...")); + about=new studio::About(); + + studio_init_cb.task(_("Init Tool Options...")); + dialog_tool_options=new studio::Dialog_ToolOptions(); + dock_manager->register_dockable(*dialog_tool_options); + + studio_init_cb.task(_("Init History...")); + dock_history=new studio::Dock_History(); + dock_manager->register_dockable(*dock_history); + + studio_init_cb.task(_("Init Canvases...")); + dock_canvases=new studio::Dock_Canvases(); + dock_manager->register_dockable(*dock_canvases); + + studio_init_cb.task(_("Init Keyframes...")); + dock_keyframes=new studio::Dock_Keyframes(); + dock_manager->register_dockable(*dock_keyframes); + + studio_init_cb.task(_("Init Layers...")); + dock_layers=new studio::Dock_Layers(); + dock_manager->register_dockable(*dock_layers); + + studio_init_cb.task(_("Init Params...")); + dock_params=new studio::Dock_Params(); + dock_manager->register_dockable(*dock_params); + + studio_init_cb.task(_("Init MetaData...")); + dock_meta_data=new studio::Dock_MetaData(); + dock_manager->register_dockable(*dock_meta_data); + + studio_init_cb.task(_("Init Children...")); + dock_children=new studio::Dock_Children(); + dock_manager->register_dockable(*dock_children); + + studio_init_cb.task(_("Init Info...")); + dock_info = new studio::Dock_Info(); + dock_manager->register_dockable(*dock_info); + + studio_init_cb.task(_("Init Navigator...")); + dock_navigator = new studio::Dock_Navigator(); + dock_manager->register_dockable(*dock_navigator); + + studio_init_cb.task(_("Init Timetrack...")); + dock_timetrack = new studio::Dock_Timetrack(); + dock_manager->register_dockable(*dock_timetrack); + + studio_init_cb.task(_("Init Curve Editor...")); + dock_curves = new studio::Dock_Curves(); + dock_manager->register_dockable(*dock_curves); + + studio_init_cb.task(_("Init Layer Groups...")); + dock_layer_groups = new studio::Dock_LayerGroups(); + dock_manager->register_dockable(*dock_layer_groups); + + + studio_init_cb.task(_("Init Color Dialog...")); + dialog_color=new studio::Dialog_Color(); + + studio_init_cb.task(_("Init Gradient Dialog...")); + dialog_gradient=new studio::Dialog_Gradient(); + + studio_init_cb.task(_("Init DeviceTracker...")); + device_tracker=new studio::DeviceTracker(); + + studio_init_cb.task(_("Init Tools...")); + + /* row 1 */ + state_manager->add_state(&state_normal); + state_manager->add_state(&state_smooth_move); + state_manager->add_state(&state_scale); + state_manager->add_state(&state_rotate); + studio_init_cb.task(_("Init ModMirror...")); module_list_.push_back(new ModMirror()); module_list_.back()->start(); + + /* row 2 */ + state_manager->add_state(&state_circle); + state_manager->add_state(&state_rectangle); + state_manager->add_state(&state_star); + state_manager->add_state(&state_gradient); + if(!getenv("SYNFIG_DISABLE_POLYGON")) state_manager->add_state(&state_polygon); // Enabled - for working without ducks + + /* row 3 */ + state_manager->add_state(&state_bline); + state_manager->add_state(&state_text); + state_manager->add_state(&state_fill); + state_manager->add_state(&state_eyedrop); + state_manager->add_state(&state_zoom); + + if(!getenv("SYNFIG_DISABLE_DRAW" )) state_manager->add_state(&state_draw); // Enabled for now. Let's see whether they're good enough yet. + if(!getenv("SYNFIG_DISABLE_SKETCH" )) state_manager->add_state(&state_sketch); + if(!getenv("SYNFIG_DISABLE_WIDTH" )) state_manager->add_state(&state_width); // Enabled since 0.61.09 + + studio_init_cb.task(_("Init ModPalette...")); + module_list_.push_back(new ModPalette()); module_list_.back()->start(); + + studio_init_cb.task(_("Init Setup Dialog...")); + dialog_setup=new studio::Dialog_Setup(); + + studio_init_cb.task(_("Init Input Dialog...")); + dialog_input=new Gtk::InputDialog(); + dialog_input->get_close_button()->signal_clicked().connect( sigc::mem_fun( *dialog_input, &Gtk::InputDialog::hide ) ); + dialog_input->get_save_button()->signal_clicked().connect( sigc::mem_fun( *device_tracker, &DeviceTracker::save_preferences) ); + + studio_init_cb.task(_("Init auto recovery...")); + auto_recover=new AutoRecover(); + + studio_init_cb.amount_complete(9250,10000); + studio_init_cb.task(_("Loading Settings...")); + load_settings(); + device_tracker->load_preferences(); + + studio_init_cb.task(_("Checking auto-recover...")); + + studio_init_cb.amount_complete(9900,10000); + + bool opened_any = false; + if(auto_recover->recovery_needed()) + { + splash_screen.hide(); + if (get_ui_interface()->confirmation("Crash Recovery", + _("Auto recovery file found"), + _("Synfig Studio seems to have crashed\n" + "before you could save all your files.\n" + "Recover unsaved changes?"), + _("Recover"), _("Ignore")) + == synfigapp::UIInterface::RESPONSE_OK) + { + int number_recovered; + if(!auto_recover->recover(number_recovered)) + if (number_recovered) + get_ui_interface()->error(_("Unable to fully recover from previous crash")); + else + get_ui_interface()->error(_("Unable to recover from previous crash")); + else + get_ui_interface()->error( + _("Synfig Studio has attempted to recover\n" + "from a previous crash. The files that it has\n" + "recovered are NOT YET SAVED. It would be a good\n" + "idea to review them and save them now.")); + + if (number_recovered) + opened_any = true; + } + splash_screen.show(); + } + + // Look for any files given on the command line, + // and load them if found. + for(;*argc>=1;(*argc)--) + if((*argv)[*argc] && (*argv)[*argc][0]!='-') + { + studio_init_cb.task(_("Loading files...")); + splash_screen.hide(); + open((*argv)[*argc]); + opened_any = true; + splash_screen.show(); + } + + // if no file was specified to be opened, create a new document to help new users get started more easily + if (!opened_any && !getenv("SYNFIG_DISABLE_AUTOMATIC_DOCUMENT_CREATION")) + new_instance(); + + studio_init_cb.task(_("Done.")); + studio_init_cb.amount_complete(10000,10000); + + toolbox->present(); + } + catch(String x) + { + get_ui_interface()->error(_("Unknown exception caught when constructing App.\nThis software may be unstable.") + String("\n\n") + x); + } + catch(...) + { + get_ui_interface()->error(_("Unknown exception caught when constructing App.\nThis software may be unstable.")); + } +} + +StateManager* App::get_state_manager() { return state_manager; } + +App::~App() +{ + shutdown_in_progress=true; + + save_settings(); + + synfigapp::Main::settings().remove_domain("pref"); + + selected_instance=0; + + // Unload all of the modules + for(;!module_list_.empty();module_list_.pop_back()) + ; + + delete state_manager; + + delete ipc; + + delete auto_recover; + + delete about; + + toolbox->hide(); + +// studio::App::iteration(false); + + delete toolbox; + +// studio::App::iteration(false); + +// studio::App::iteration(false); + + delete dialog_setup; + + delete dialog_gradient; + + delete dialog_color; + + delete dialog_input; + + delete dock_manager; + + instance_list.clear(); + +// studio::App::iteration(false); +} + +String +App::get_user_app_directory() +{ +//! \todo do we need locale_from_utf8() on non-Windows boxes too? (bug #1837445) +#ifdef WIN32 + return Glib::locale_from_utf8(Glib::build_filename(Glib::get_home_dir(),SYNFIG_USER_APP_DIR)); +#else + return Glib::build_filename(Glib::get_home_dir(),SYNFIG_USER_APP_DIR); +#endif +} + +synfig::String +App::get_config_file(const synfig::String& file) +{ + return Glib::build_filename(get_user_app_directory(),file); +} + +#define SCALE_FACTOR (1280) +//! set the \a instance's canvas(es) position and size to be those specified in the first entry of recent_files_window_size +void +App::set_recent_file_window_size(etl::handle instance) +{ + int screen_w(Gdk::screen_width()); + int screen_h(Gdk::screen_height()); + + const std::string &canvas_window_size = *recent_files_window_size.begin(); + + if(canvas_window_size.empty()) + return; + + synfig::String::size_type current=0; + bool seen_root(false), shown_non_root(false); + + while(current != synfig::String::npos) + { + // find end of first field (canvas) or return + synfig::String::size_type separator = canvas_window_size.find_first_of(' ', current); + if(separator == synfig::String::npos) break; + + // find the canvas + synfig::Canvas::Handle canvas; + try { + String warnings; + canvas = instance->get_canvas()->find_canvas(String(canvas_window_size, current, separator-current), warnings); + } + catch(Exception::IDNotFound) { + // can't find the canvas; skip to the next canvas or return + separator = canvas_window_size.find_first_of('\t', current); + if(separator == synfig::String::npos) return; + current = separator+1; + continue; + } + + if (canvas->is_root()) + seen_root = true; + else + shown_non_root = true; + + // check that we have the tab character the ends this canvas' data or return + current = separator+1; + separator = canvas_window_size.find_first_of('\t', current); + if(separator == synfig::String::npos) return; + + int x,y,w,h; + if(!strscanf(String(canvas_window_size, current, separator-current),"%d %d %d %d",&x, &y, &w, &h)) + { + current = separator+1; + continue; + } + + if (x > SCALE_FACTOR) x = SCALE_FACTOR - 150; if (x < 0) x = 0; + if (y > SCALE_FACTOR) y = SCALE_FACTOR - 150; if (y < 0) y = 0; + x=x*screen_w/SCALE_FACTOR; + y=y*screen_h/SCALE_FACTOR; + if(getenv("SYNFIG_WINDOW_POSITION_X_OFFSET")) + x += atoi(getenv("SYNFIG_WINDOW_POSITION_X_OFFSET")); + if(getenv("SYNFIG_WINDOW_POSITION_Y_OFFSET")) + y += atoi(getenv("SYNFIG_WINDOW_POSITION_Y_OFFSET")); + + if (w > SCALE_FACTOR) w = 150; if (w < 0) w = 0; + if (h > SCALE_FACTOR) h = 150; if (h < 0) h = 0; + + CanvasView::Handle canvasview = instance->find_canvas_view(canvas); + canvasview->move(x,y); + canvasview->resize(w*screen_w/SCALE_FACTOR,h*screen_h/SCALE_FACTOR); + canvasview->present(); + + current = separator+1; + } + + if (shown_non_root && !seen_root) + instance->find_canvas_view(instance->get_canvas())->hide(); +} + +void +App::add_recent_file(const etl::handle instance) +{ + int screen_w(Gdk::screen_width()); + int screen_h(Gdk::screen_height()); + + std::string canvas_window_size; + + const Instance::CanvasViewList& cview_list = instance->canvas_view_list(); + Instance::CanvasViewList::const_iterator iter; + + for(iter=cview_list.begin();iter!=cview_list.end();iter++) + { + if( !((*iter)->is_visible()) ) + continue; + + etl::handle canvas = (*iter)->get_canvas(); + int x_pos, y_pos, x_size, y_size; + (*iter)->get_position(x_pos,y_pos); + (*iter)->get_size(x_size,y_size); + + canvas_window_size += strprintf("%s %d %d %d %d\t", + canvas->get_relative_id(canvas->get_root()).c_str(), + x_pos*SCALE_FACTOR/screen_w, y_pos*SCALE_FACTOR/screen_h, + x_size*SCALE_FACTOR/screen_w, y_size*SCALE_FACTOR/screen_h); + } + + add_recent_file(absolute_path(instance->get_file_name()), canvas_window_size); +} +#undef SCALE_FACTOR + +void +App::add_recent_file(const std::string &file_name, const std::string &window_size) +{ + std::string filename(file_name); + + assert(!filename.empty()); + + if(filename.empty()) + return; + + // Toss out any "hidden" files + if(basename(filename)[0]=='.') + return; + + // If we aren't an absolute path, turn ourselves into one + if(!is_absolute_path(filename)) + filename=absolute_path(filename); + + std::string old_window_size; + + list::iterator iter; + list::iterator iter_wsize; + // Check to see if the file is already on the list. + // If it is, then remove it from the list + for(iter=recent_files.begin(), iter_wsize=recent_files_window_size.begin();iter!=recent_files.end();iter++, iter_wsize++) + if(*iter==filename) + { + recent_files.erase(iter); + old_window_size = *iter_wsize; + recent_files_window_size.erase(iter_wsize); + break; + } + + + // Push the filename to the front of the list + recent_files.push_front(filename); + if(window_size.empty()) + recent_files_window_size.push_front(old_window_size); + else + recent_files_window_size.push_front(window_size); + + // Clean out the files at the end of the list. + while(recent_files.size()>(unsigned)get_max_recent_files()) + { + recent_files.pop_back(); + recent_files_window_size.pop_back(); + } + + signal_recent_files_changed_(); + + return; +} + +static Time::Format _App_time_format(Time::FORMAT_NORMAL); + +Time::Format +App::get_time_format() +{ + return _App_time_format; +} + +void +App::set_time_format(synfig::Time::Format x) +{ + _App_time_format=x; +} + + +void +App::save_settings() +{ + char * old_locale; + try + { + old_locale=strdup(setlocale(LC_NUMERIC, NULL)); + setlocale(LC_NUMERIC, "C"); + { + std::string filename=get_config_file("accelrc"); + Gtk::AccelMap::save(filename); + } + do{ + std::string filename=get_config_file("recentfiles"); + + std::ofstream file(filename.c_str()); + + if(!file) + { + synfig::warning("Unable to save %s",filename.c_str()); + break; + } + + list::reverse_iterator iter; + + for(iter=recent_files.rbegin();iter!=recent_files.rend();iter++) + file<<*iter<::reverse_iterator iter; + + for(iter=recent_files_window_size.rbegin();iter!=recent_files_window_size.rend();iter++) + file<<*iter<task(_("Quit Request")); + if(Busy::count) + { + dialog_error_blocking(_("Cannot quit!"),_("Tasks are currently running.\nPlease cancel the current tasks and try again")); + return; + } + + std::list >::iterator iter; + for(iter=instance_list.begin();!instance_list.empty();iter=instance_list.begin()) + { + if(!(*iter)->safe_close()) + return; + +/* + if((*iter)->synfigapp::Instance::get_action_count()) + { + handle uim; + uim=(*iter)->find_canvas_view((*iter)->get_canvas())->get_ui_interface(); + assert(uim); + string str=strprintf(_("Would you like to save your changes to %s?"),(*iter)->get_file_name().c_str() ); + switch(uim->yes_no_cancel((*iter)->get_canvas()->get_name(),str,synfigapp::UIInterface::RESPONSE_YES)) + { + case synfigapp::UIInterface::RESPONSE_NO: + break; + case synfigapp::UIInterface::RESPONSE_YES: + (*iter)->save(); + break; + case synfigapp::UIInterface::RESPONSE_CANCEL: + return; + default: + assert(0); + return; + } + } + + + if((*iter)->synfigapp::Instance::is_modified()) + { + handle uim; + uim=(*iter)->find_canvas_view((*iter)->get_canvas())->get_ui_interface(); + assert(uim); + string str=strprintf(_("%s has changes not yet on the CVS repository.\nWould you like to commit these changes?"),(*iter)->get_file_name().c_str() ); + switch(uim->yes_no_cancel((*iter)->get_canvas()->get_name(),str,synfigapp::UIInterface::RESPONSE_YES)) + { + case synfigapp::UIInterface::RESPONSE_NO: + break; + case synfigapp::UIInterface::RESPONSE_YES: + (*iter)->dialog_cvs_commit(); + break; + case synfigapp::UIInterface::RESPONSE_CANCEL: + return; + default: + assert(0); + return; + } + } +*/ + + // This next line causes things to crash for some reason + //(*iter)->close(); + } + + shutdown_in_progress=true; + + instance_list.clear(); + + while(studio::App::events_pending())studio::App::iteration(false); + + Gtk::Main::quit(); + auto_recover->normal_shutdown(); + + get_ui_interface()->task(_("Quit Request sent")); +} + +void +App::show_setup() +{ + dialog_setup->refresh(); + dialog_setup->show(); +} + +gint Signal_Open_Ok(GtkWidget */*widget*/, int *val){*val=1;return 0;} +gint Signal_Open_Cancel(GtkWidget */*widget*/, int *val){*val=2;return 0;} + +//#ifdef WIN32 +//#define USE_WIN32_FILE_DIALOGS 1 +//#endif + +#ifdef USE_WIN32_FILE_DIALOGS +static OPENFILENAME ofn={}; +#endif + +#ifdef WIN32 +#include +#endif + +bool +App::dialog_open_file(const std::string &title, std::string &filename, std::string preference) +{ + // info("App::dialog_open_file('%s', '%s', '%s')", title.c_str(), filename.c_str(), preference.c_str()); + +#ifdef USE_WIN32_FILE_DIALOGS + static TCHAR szFilter[] = TEXT ("All Files (*.*)\0*.*\0\0") ; + + GdkWindow *gdkWinPtr=toolbox->get_window()->gobj(); + HINSTANCE hInstance=static_cast(GetModuleHandle(NULL)); + HWND hWnd=static_cast(GDK_WINDOW_HWND(gdkWinPtr)); + + ofn.lStructSize=sizeof(OPENFILENAME); + ofn.hwndOwner = hWnd; + ofn.hInstance = hInstance; + ofn.lpstrFilter = szFilter; +// ofn.lpstrCustomFilter=NULL; +// ofn.nMaxCustFilter=0; +// ofn.nFilterIndex=0; +// ofn.lpstrFile=NULL; + ofn.nMaxFile=MAX_PATH; +// ofn.lpstrFileTitle=NULL; +// ofn.lpstrInitialDir=NULL; +// ofn.lpstrTitle=NULL; + ofn.Flags=OFN_HIDEREADONLY; +// ofn.nFileOffset=0; +// ofn.nFileExtension=0; + ofn.lpstrDefExt=TEXT("sif"); +// ofn.lCustData = 0l; + ofn.lpfnHook=NULL; +// ofn.lpTemplateName=NULL; + + CHAR szFilename[MAX_PATH]; + CHAR szTitle[500]; + strcpy(szFilename,filename.c_str()); + strcpy(szTitle,title.c_str()); + + ofn.lpstrFile=szFilename; + ofn.lpstrFileTitle=szTitle; + + if(GetOpenFileName(&ofn)) + { + filename=szFilename; + return true; + } + return false; + +#else + synfig::String prev_path; + + if(!_preferences.get_value(preference, prev_path)) + prev_path = "."; + + prev_path = absolute_path(prev_path); + + Gtk::FileChooserDialog *dialog = new Gtk::FileChooserDialog(title, Gtk::FILE_CHOOSER_ACTION_OPEN); + + dialog->set_current_folder(prev_path); + dialog->add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); + dialog->add_button(Gtk::Stock::OPEN, Gtk::RESPONSE_ACCEPT); + + if (filename.empty()) + dialog->set_filename(prev_path); + else if (is_absolute_path(filename)) + dialog->set_filename(filename); + else + dialog->set_filename(prev_path + ETL_DIRECTORY_SEPARATOR + filename); + + if(dialog->run() == GTK_RESPONSE_ACCEPT) { + filename = dialog->get_filename(); + // info("Saving preference %s = '%s' in App::dialog_open_file()", preference.c_str(), dirname(filename).c_str()); + _preferences.set_value(preference, dirname(filename)); + delete dialog; + return true; + } + + delete dialog; + return false; + + /* + + GtkWidget *ok; + GtkWidget *cancel; + int val=0; + + GtkWidget *fileselection; + fileselection = gtk_file_selection_new(title.c_str()); + + + if(basename(filename)==filename) + { + gtk_file_selection_set_filename(GTK_FILE_SELECTION(fileselection),(prev_path+ETL_DIRECTORY_SEPARATOR).c_str()); + } + else + gtk_file_selection_set_filename(GTK_FILE_SELECTION(fileselection),dirname(filename).c_str()); + + gtk_file_selection_complete(GTK_FILE_SELECTION(fileselection),basename(filename).c_str()); + + ok=GTK_FILE_SELECTION(fileselection)->ok_button; + cancel=GTK_FILE_SELECTION(fileselection)->cancel_button; + + gtk_signal_connect(GTK_OBJECT(ok),"clicked",GTK_SIGNAL_FUNC(Signal_Open_Ok),&val); + gtk_signal_connect(GTK_OBJECT(cancel),"clicked",GTK_SIGNAL_FUNC(Signal_Open_Cancel),&val); + + gtk_widget_show(fileselection); + + while(!val) + iteration(); + + + if(val==1) + { + filename=gtk_file_selection_get_filename(GTK_FILE_SELECTION(fileselection)); + _preferences.set_value(preference,dirname(filename)); + } + else + { + gtk_widget_destroy(fileselection); + return false; + } + gtk_widget_destroy(fileselection); + return true; + */ +#endif +} + +bool +App::dialog_save_file(const std::string &title, std::string &filename, std::string preference) +{ + // info("App::dialog_save_file('%s', '%s', '%s')", title.c_str(), filename.c_str(), preference.c_str()); + +#if USE_WIN32_FILE_DIALOGS + static TCHAR szFilter[] = TEXT ("All Files (*.*)\0*.*\0\0") ; + + GdkWindow *gdkWinPtr=toolbox->get_window()->gobj(); + HINSTANCE hInstance=static_cast(GetModuleHandle(NULL)); + HWND hWnd=static_cast(GDK_WINDOW_HWND(gdkWinPtr)); + + ofn.lStructSize=sizeof(OPENFILENAME); + ofn.hwndOwner = hWnd; + ofn.hInstance = hInstance; + ofn.lpstrFilter = szFilter; +// ofn.lpstrCustomFilter=NULL; +// ofn.nMaxCustFilter=0; +// ofn.nFilterIndex=0; +// ofn.lpstrFile=NULL; + ofn.nMaxFile=MAX_PATH; +// ofn.lpstrFileTitle=NULL; +// ofn.lpstrInitialDir=NULL; +// ofn.lpstrTitle=NULL; + ofn.Flags=OFN_OVERWRITEPROMPT; +// ofn.nFileOffset=0; +// ofn.nFileExtension=0; + ofn.lpstrDefExt=TEXT("sif"); +// ofn.lCustData = 0l; + ofn.lpfnHook=NULL; +// ofn.lpTemplateName=NULL; + + CHAR szFilename[MAX_PATH]; + CHAR szTitle[500]; + strcpy(szFilename,filename.c_str()); + strcpy(szTitle,title.c_str()); + + ofn.lpstrFile=szFilename; + ofn.lpstrFileTitle=szTitle; + + if(GetSaveFileName(&ofn)) + { + filename=szFilename; + _preferences.set_value(preference,dirname(filename)); + return true; + } + return false; +#else + synfig::String prev_path; + + if(!_preferences.get_value(preference, prev_path)) + prev_path="."; + + prev_path = absolute_path(prev_path); + + Gtk::FileChooserDialog *dialog = new Gtk::FileChooserDialog(title, Gtk::FILE_CHOOSER_ACTION_SAVE); + + dialog->set_current_folder(prev_path); + dialog->add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); + dialog->add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT); + + Widget_Enum *file_type_enum = 0; + if (preference == ANIMATION_DIR_PREFERENCE) + { + file_type_enum = manage(new Widget_Enum()); + file_type_enum->set_param_desc(ParamDesc().set_hint("enum") + .add_enum_value(synfig::RELEASE_VERSION_0_61_09, "0.61.09", strprintf("0.61.09 (%s)", _("current"))) + .add_enum_value(synfig::RELEASE_VERSION_0_61_08, "0.61.08", "0.61.08") + .add_enum_value(synfig::RELEASE_VERSION_0_61_07, "0.61.07", "0.61.07") + .add_enum_value(synfig::RELEASE_VERSION_0_61_06, "0.61.06", strprintf("0.61.06 %s", _("and older")))); + file_type_enum->set_value(RELEASE_VERSION_END-1); // default to the most recent version + + Gtk::HBox *hbox = manage(new Gtk::HBox); + hbox->pack_start(*manage(new Gtk::Label(_("File Format Version: "))),Gtk::PACK_SHRINK,0); + hbox->pack_start(*file_type_enum,Gtk::PACK_EXPAND_WIDGET,0); + hbox->show_all(); + + dialog->set_extra_widget(*hbox); + } + + if (filename.empty()) + dialog->set_filename(prev_path); + else + { + std::string full_path; + if (is_absolute_path(filename)) + full_path = filename; + else + full_path = prev_path + ETL_DIRECTORY_SEPARATOR + filename; + + // select the file if it exists + dialog->set_filename(full_path); + + // if the file doesn't exist, put its name into the filename box + struct stat s; + if(stat(full_path.c_str(),&s) == -1 && errno == ENOENT) + dialog->set_current_name(basename(filename)); + } + + if(dialog->run() == GTK_RESPONSE_ACCEPT) { + if (preference == ANIMATION_DIR_PREFERENCE) + set_file_version(synfig::ReleaseVersion(file_type_enum->get_value())); + filename = dialog->get_filename(); + // info("Saving preference %s = '%s' in App::dialog_save_file()", preference.c_str(), dirname(filename).c_str()); + _preferences.set_value(preference, dirname(filename)); + delete dialog; + return true; + } + + delete dialog; + return false; +#endif +} + +void +App::dialog_error_blocking(const std::string &title, const std::string &message) +{ + Gtk::MessageDialog dialog(message, false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_CLOSE, true); + dialog.set_title(title); + dialog.show(); + dialog.run(); +} + +void +App::dialog_warning_blocking(const std::string &title, const std::string &message) +{ + Gtk::MessageDialog dialog(message, false, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); + dialog.set_title(title); + dialog.show(); + dialog.run(); +} + +bool +App::dialog_yes_no(const std::string &title, const std::string &message) +{ + Gtk::Dialog dialog( + title, // Title + true, // Modal + true // use_separator + ); + Gtk::Label label(message); + label.show(); + + dialog.get_vbox()->pack_start(label); + dialog.add_button(Gtk::StockID("gtk-yes"),1); + dialog.add_button(Gtk::StockID("gtk-no"),0); + dialog.show(); + return dialog.run(); +} + +int +App::dialog_yes_no_cancel(const std::string &title, const std::string &message) +{ + Gtk::Dialog dialog( + title, // Title + true, // Modal + true // use_separator + ); + Gtk::Label label(message); + label.show(); + + dialog.get_vbox()->pack_start(label); + dialog.add_button(Gtk::StockID("gtk-yes"),1); + dialog.add_button(Gtk::StockID("gtk-no"),0); + dialog.add_button(Gtk::StockID("gtk-cancel"),2); + dialog.show(); + return dialog.run(); +} + +void +App::dialog_not_implemented() +{ + Gtk::MessageDialog dialog(_("Feature not available"), false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_CLOSE, true); + dialog.set_secondary_text(_("Sorry, this feature has not yet been implemented.")); + dialog.run(); +} + +static bool +try_open_url(const std::string &url) +{ +#ifdef WIN32 + return ShellExecute(GetDesktopWindow(), "open", url.c_str(), NULL, NULL, SW_SHOW); +#else // !WIN32 + std::vector command_line; + std::vector browsers; + browsers.reserve(23); + + // Browser wrapper scripts +#ifdef USE_OPEN_FOR_URLS + browsers.push_back("open"); // Apple MacOS X wrapper, on Linux it opens a virtual console +#endif + browsers.push_back("xdg-open"); // XDG wrapper + browsers.push_back("sensible-browser"); // Debian wrapper + browsers.push_back("gnome-open"); // GNOME wrapper + browsers.push_back("kfmclient"); // KDE wrapper + browsers.push_back("exo-open"); // XFCE wrapper + + // Alternatives system + browsers.push_back("gnome-www-browser"); // Debian GNOME alternative + browsers.push_back("x-www-browser"); // Debian GUI alternative + + // Individual browsers + browsers.push_back("firefox"); + browsers.push_back("epiphany-browser"); + browsers.push_back("epiphany"); + browsers.push_back("konqueror"); + browsers.push_back("iceweasel"); + browsers.push_back("mozilla"); + browsers.push_back("netscape"); + browsers.push_back("icecat"); + browsers.push_back("galeon"); + browsers.push_back("midori"); + browsers.push_back("safari"); + browsers.push_back("opera"); + browsers.push_back("amaya"); + browsers.push_back("netsurf"); + browsers.push_back("dillo"); + + // Try the user-specified browser first + command_line.push_back(App::browser_command); + if( command_line[0] == "kfmclient" ) command_line.push_back("openURL"); + command_line.push_back(url); + + try { Glib::spawn_async(".", command_line, Glib::SPAWN_SEARCH_PATH); return true; } + catch( Glib::SpawnError& exception ){ + + while ( !browsers.empty() ) + { + // Skip the browser if we already tried it + if( browsers[0] == App::browser_command ) + continue; + + // Construct the command line + command_line.clear(); + command_line.push_back(browsers[0]); + if( command_line[0] == "kfmclient" ) command_line.push_back("openURL"); + command_line.push_back(url); + + // Remove the browser from the list + browsers.erase(browsers.begin()); + + // Try to spawn the browser + try { Glib::spawn_async(".", command_line, Glib::SPAWN_SEARCH_PATH); } + // Failed, move on to the next one + catch(Glib::SpawnError& exception){ continue; } + return true; // No exception means we succeeded! + } + } + + return false; +#endif // !WIN32 +} + +void +App::dialog_help() +{ + if (!try_open_url("http://synfig.org/Documentation")) + { + Gtk::MessageDialog dialog(_("Documentation"), false, Gtk::MESSAGE_INFO, Gtk::BUTTONS_CLOSE, true); + dialog.set_secondary_text(_("Documentation for Synfig Studio is available on the website:\n\nhttp://www.synfig.org/Documentation")); + dialog.set_title(_("Help")); + dialog.run(); + } +} + +void +App::open_url(const std::string &url) +{ + if(!try_open_url(url)) + { + Gtk::MessageDialog dialog(_("No browser was found. Please load this website manually:"), false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_CLOSE, true); + dialog.set_secondary_text(url); + dialog.set_title(_("No browser found")); + dialog.run(); + } +} + +bool +App::dialog_entry(const std::string &title, const std::string &message,std::string &text) +{ + Gtk::Dialog dialog( + title, // Title + true, // Modal + true); // use_separator + + Gtk::Label label(message); + label.show(); + dialog.get_vbox()->pack_start(label); + + Gtk::Entry entry; + entry.set_text(text); + entry.show(); + entry.set_activates_default(true); + + dialog.get_vbox()->pack_start(entry); + + dialog.add_button(Gtk::StockID("gtk-ok"),Gtk::RESPONSE_OK); + dialog.add_button(Gtk::StockID("gtk-cancel"),Gtk::RESPONSE_CANCEL); + dialog.set_default_response(Gtk::RESPONSE_OK); + + entry.signal_activate().connect(sigc::bind(sigc::mem_fun(dialog,&Gtk::Dialog::response),Gtk::RESPONSE_OK)); + dialog.show(); + + if(dialog.run()!=Gtk::RESPONSE_OK) + return false; + + text=entry.get_text(); + + return true; +} + +bool +App::dialog_paragraph(const std::string &title, const std::string &message,std::string &text) +{ + Gtk::Dialog dialog( + title, // Title + true, // Modal + true); // use_separator + + Gtk::Label label(message); + label.show(); + dialog.get_vbox()->pack_start(label); + + Glib::RefPtr text_buffer(Gtk::TextBuffer::create()); + text_buffer->set_text(text); + Gtk::TextView text_view(text_buffer); + text_view.show(); + + dialog.get_vbox()->pack_start(text_view); + + dialog.add_button(Gtk::StockID("gtk-ok"),Gtk::RESPONSE_OK); + dialog.add_button(Gtk::StockID("gtk-cancel"),Gtk::RESPONSE_CANCEL); + dialog.set_default_response(Gtk::RESPONSE_OK); + + //text_entry.signal_activate().connect(sigc::bind(sigc::mem_fun(dialog,&Gtk::Dialog::response),Gtk::RESPONSE_OK)); + dialog.show(); + + if(dialog.run()!=Gtk::RESPONSE_OK) + return false; + + text=text_buffer->get_text(); + + return true; +} + +bool +App::open(std::string filename) +{ + return open_as(filename,filename); +} + +// this is called from autorecover.cpp: +// App::open_as(get_shadow_file_name(filename),filename) +// other than that, 'filename' and 'as' are the same +bool +App::open_as(std::string filename,std::string as) +{ +#ifdef WIN32 + char long_name[1024]; + if(GetLongPathName(as.c_str(),long_name,sizeof(long_name))); + // when called from autorecover.cpp, filename doesn't exist, and so long_name is empty + // don't use it if that's the case + if (long_name[0] != '\0') + as=long_name; +#endif + + try + { + OneMoment one_moment; + String errors, warnings; + + etl::handle canvas(open_canvas_as(filename,as,errors,warnings)); + if(canvas && get_instance(canvas)) + { + get_instance(canvas)->find_canvas_view(canvas)->present(); + info("%s is already open", filename.c_str()); + // throw (String)strprintf(_("\"%s\" appears to already be open!"),filename.c_str()); + } + else + { + if(!canvas) + throw (String)strprintf(_("Unable to load \"%s\":\n\n"),filename.c_str()) + errors; + + if (warnings != "") + dialog_warning_blocking(_("Warnings"), strprintf("%s:\n\n%s", _("Warnings"), warnings.c_str())); + + if (as.find(custom_filename_prefix.c_str()) != 0) + add_recent_file(as); + + handle instance(Instance::create(canvas)); + + if(!instance) + throw (String)strprintf(_("Unable to create instance for \"%s\""),filename.c_str()); + + set_recent_file_window_size(instance); + + one_moment.hide(); + + if(instance->is_updated() && App::dialog_yes_no(_("CVS Update"), _("There appears to be a newer version of this file available on the CVS repository.\nWould you like to update now? (It would probably be a good idea)"))) + instance->dialog_cvs_update(); + } + } + catch(String x) + { + dialog_error_blocking(_("Error"), x); + return false; + } + catch(runtime_error x) + { + dialog_error_blocking(_("Error"), x.what()); + return false; + } + catch(...) + { + dialog_error_blocking(_("Error"), _("Uncaught error on file open (BUG)")); + return false; + } + + return true; +} + + +void +App::new_instance() +{ + handle canvas=synfig::Canvas::create(); + + String file_name(strprintf("%s%d", App::custom_filename_prefix.c_str(), Instance::get_count()+1)); + canvas->set_name(file_name); + file_name += ".sifz"; + + canvas->rend_desc().set_frame_rate(preferred_fps); + canvas->rend_desc().set_time_start(0.0); + canvas->rend_desc().set_time_end(5.0); + canvas->rend_desc().set_x_res(DPI2DPM(72.0f)); + canvas->rend_desc().set_y_res(DPI2DPM(72.0f)); + // The top left and botton right positions are expressed in units + // Original convention is that 1 unit = 60 pixels + canvas->rend_desc().set_tl(Vector(-(preferred_x_size/60.0)/2.0,(preferred_y_size/60.0)/2.0)); + canvas->rend_desc().set_br(Vector((preferred_x_size/60.0)/2.0,-(preferred_y_size/60.0)/2.0)); + canvas->rend_desc().set_w(preferred_x_size); + canvas->rend_desc().set_h(preferred_y_size); + canvas->rend_desc().set_antialias(1); + canvas->rend_desc().set_flags(RendDesc::PX_ASPECT|RendDesc::IM_SPAN); + canvas->set_file_name(file_name); + + handle instance = Instance::create(canvas); + + if (getenv("SYNFIG_ENABLE_NEW_CANVAS_EDIT_PROPERTIES")) + instance->find_canvas_view(canvas)->canvas_properties.present(); +} + +void +App::dialog_open(string filename) +{ + if (filename.empty()) + filename="*.sif"; + + while(dialog_open_file("Open", filename, ANIMATION_DIR_PREFERENCE)) + { + // If the filename still has wildcards, then we should + // continue looking for the file we want + if(find(filename.begin(),filename.end(),'*')!=filename.end()) + continue; + + if(open(filename)) + break; + + get_ui_interface()->error(_("Unable to open file")); + } +} + +void +App::set_selected_instance(etl::loose_handle instance) +{ +/* if(get_selected_instance()==instance) + { + selected_instance=instance; + signal_instance_selected()(instance); + return; + } + else + { +*/ + selected_instance=instance; + if(get_selected_canvas_view() && get_selected_canvas_view()->get_instance()!=instance) + { + if(instance) + { + instance->focus(instance->get_canvas()); + } + else + set_selected_canvas_view(0); + } + signal_instance_selected()(instance); +} + +void +App::set_selected_canvas_view(etl::loose_handle canvas_view) +{ + selected_canvas_view=canvas_view; + signal_canvas_view_focus()(selected_canvas_view); + if(canvas_view) + { + selected_instance=canvas_view->get_instance(); + signal_instance_selected()(canvas_view->get_instance()); + } +/* + if(get_selected_canvas_view()==canvas_view) + { + signal_canvas_view_focus()(selected_canvas_view); + signal_instance_selected()(canvas_view->get_instance()); + return; + } + selected_canvas_view=canvas_view; + if(canvas_view && canvas_view->get_instance() != get_selected_instance()) + set_selected_instance(canvas_view->get_instance()); + signal_canvas_view_focus()(selected_canvas_view); +*/ +} + +etl::loose_handle +App::get_instance(etl::handle canvas) +{ + if(!canvas) return 0; + canvas=canvas->get_root(); + + std::list >::iterator iter; + for(iter=instance_list.begin();iter!=instance_list.end();++iter) + { + if((*iter)->get_canvas()==canvas) + return *iter; + } + return 0; +} + +void +App::dialog_about() +{ + if(about) + about->show(); +} + +void +studio::App::undo() +{ + if(selected_instance) + selected_instance->undo(); +} + +void +studio::App::redo() +{ + if(selected_instance) + selected_instance->redo(); +} + +synfig::String +studio::App::get_base_path() +{ + return app_base_path_; +} diff --git a/synfig-studio/src/gtkmm/app.h b/synfig-studio/src/gtkmm/app.h new file mode 100644 index 0000000..89cd528 --- /dev/null +++ b/synfig-studio/src/gtkmm/app.h @@ -0,0 +1,363 @@ +/* === S Y N F I G ========================================================= */ +/*! \file app.h +** \brief writeme +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** Copyright (c) 2008 Carlos López +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_STUDIO_APP_H +#define __SYNFIG_STUDIO_APP_H + +/* === H E A D E R S ======================================================= */ + +#include + +#include +#include +#include + +#include + +#include +#include +#include + +#include + +#include +#include "iconcontroller.h" + +/* === M A C R O S ========================================================= */ + +#define MISC_DIR_PREFERENCE "misc_dir" +#define ANIMATION_DIR_PREFERENCE "animation_dir" +#define IMAGE_DIR_PREFERENCE "image_dir" +#define SKETCH_DIR_PREFERENCE "sketch_dir" +#define RENDER_DIR_PREFERENCE "render_dir" + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace Gtk +{ + class InputDialog; + class UIManager; + class ActionGroup; +}; + +namespace synfigapp +{ + class UIInterface; + class Main; +}; + +class Preferences; + +namespace studio { + +typedef Gtk::UIManager UIManager; + +class About; +class Toolbox; +class Instance; +class CanvasView; +class Dialog_Setup; +class Dialog_Gradient; +class Dialog_Color; +class Dialog_ToolOptions; +class DeviceTracker; +class AutoRecover; + +class DockManager; + +class Dock_History; +class Dock_Canvases; + +class Dock_Keyframes; +class Dock_Params; +class Dock_Layers; +class Dock_MetaData; +class Dock_Children; +class Dock_Info; +class Dock_Navigator; +class Dock_LayerGroups; +class IPC; + +class Module; + +class StateManager; +class IconController; + +class App : public Gtk::Main, private IconController +{ + friend class Preferences; + friend class Dialog_Setup; + + /* + -- ** -- P U B L I C T Y P E S --------------------------------------------- + */ + +public: + + struct Busy + { + static int count; + Busy(){count++;} + ~Busy(){count--;} + }; + + + /* + -- ** -- P R I V A T E D A T A --------------------------------------------- + */ + +private: + //static etl::handle ui_interface_; + //static int max_recent_files; + +/* + static Dock_Keyframes *dock_keyframes; + static Dock_Layers *dock_layers; + static Dock_Params *dock_params; + static Dock_MetaData *dock_meta_data; + static Dock_Children *dock_children; + static Dock_Info *dock_info; + static Dock_Navigator *dock_navigator; + static Dock_History *dock_history; + static Dock_Canvases *dock_canvases; + static Dock_LayerGroups *dock_layer_groups; + + static IPC *ipc; +*/ + + etl::smart_ptr synfigapp_main; + + + static etl::handle selected_instance; + static etl::handle selected_canvas_view; + + static Glib::RefPtr ui_manager_; + +// static std::list< etl::handle< Module > > module_list_; + + /* + -- ** -- P U B L I C D A T A ----------------------------------------------- + */ + +public: + static Gtk::InputDialog* dialog_input; + + static DeviceTracker* device_tracker; + static AutoRecover* auto_recover; + static DockManager* dock_manager; + + static DockManager* get_dock_manager() { return dock_manager; } + + static Dialog_Setup* dialog_setup; + static Dialog_Gradient* dialog_gradient; + static Dialog_Color* dialog_color; +// static Dialog_Palette* dialog_palette; + static Dialog_ToolOptions *dialog_tool_options; + + static synfig::Distance::System distance_system; + + static synfig::Gamma gamma; + + static About *about; + static Toolbox *toolbox; + + static std::list > instance_list; + + static bool shutdown_in_progress; + + static bool use_colorspace_gamma; + +#ifdef SINGLE_THREADED + static bool single_threaded; +#endif + + static bool restrict_radius_ducks; + static bool resize_imported_images; + + static synfig::String browser_command; + static synfig::String custom_filename_prefix; + static int preferred_x_size; + static int preferred_y_size; + static synfig::String predefined_size; + static synfig::String predefined_fps; + static float preferred_fps; + /* + -- ** -- S I G N A L S ------------------------------------------------------- + */ +/* + static sigc::signal< + void, + etl::loose_handle + > signal_canvas_view_focus_; + static sigc::signal< + void, + etl::handle + > signal_instance_selected_; + static sigc::signal< + void, + etl::handle + > signal_instance_created_; + static sigc::signal< + void, + etl::handle + > signal_instance_deleted_; + static sigc::signal signal_recent_files_changed_; + static sigc::signal signal_present_all_; +*/ +public: + + static sigc::signal &signal_present_all(); + + static sigc::signal &signal_recent_files_changed(); + + static sigc::signal< + void, + etl::loose_handle + >& signal_canvas_view_focus(); + + static sigc::signal< + void, + etl::handle + > &signal_instance_selected(); + + static sigc::signal< + void, + etl::handle + > &signal_instance_created(); + + static sigc::signal< + void, + etl::handle + > &signal_instance_deleted(); + + /* + -- ** -- P R I V A T E M E T H O D S --------------------------------------- + */ + +private: + static void add_recent_file(const std::string &filename, const std::string &window_size = std::string()); + + /* + -- ** -- P U B L I C M E T H O D S ----------------------------------------- + */ + +public: + + App(int *argc, char ***argv); + virtual ~App(); + + /* + -- ** -- S T A T I C P U B L I C M E T H O D S --------------------------- + */ + +public: + + static StateManager* get_state_manager(); + + static Glib::RefPtr& ui_manager() { return ui_manager_; } + + static void set_recent_file_window_size(etl::handle instance); + static void add_recent_file(const etl::handle instance); + + static synfig::String get_base_path(); + static void save_settings(); + static void load_settings(); + static void reset_initial_window_configuration(); + + static const std::list& get_recent_files(); + + static const etl::handle& get_ui_interface(); + + + static void set_selected_instance(etl::loose_handle instance); + static void set_selected_canvas_view(etl::loose_handle); + + static etl::loose_handle get_instance(etl::handle canvas); + + static etl::loose_handle get_selected_instance() { return selected_instance; } + static etl::loose_handle get_selected_canvas_view() { return selected_canvas_view; } + + static bool open(std::string filename); + + static bool open_as(std::string filename,std::string as); + + static void new_instance(); + + static void dialog_open(std::string filename = ""); + + static void dialog_about(); + + static void quit(); + + static void show_setup(); + + static void undo(); + static void redo(); + + static int get_max_recent_files(); + static void set_max_recent_files(int x); + + + static synfig::Time::Format get_time_format(); + static void set_time_format(synfig::Time::Format x); + + static bool shutdown_request(GdkEventAny*bleh=NULL); + +// static bool dialog_file(const std::string &title, std::string &filename); + + static bool dialog_open_file(const std::string &title, std::string &filename, std::string preference); + static bool dialog_save_file(const std::string &title, std::string &filename, std::string preference); + + static void dialog_error_blocking(const std::string &title, const std::string &message); + + static void dialog_warning_blocking(const std::string &title, const std::string &message); + + static bool dialog_entry(const std::string &title, const std::string &message,std::string &text); + static bool dialog_paragraph(const std::string &title, const std::string &message,std::string &text); + + static bool dialog_yes_no(const std::string &title, const std::string &message); + + static int dialog_yes_no_cancel(const std::string &title, const std::string &message); + + static void dialog_not_implemented(); + + static void dialog_help(); + + static void open_url(const std::string &url); + + static synfig::String get_user_app_directory(); + static synfig::String get_config_file(const synfig::String& file); +}; // END of class App + + void delete_widget(Gtk::Widget *widget); + +}; // END namespace studio + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-studio/src/gtkmm/asyncrenderer.cpp b/synfig-studio/src/gtkmm/asyncrenderer.cpp new file mode 100644 index 0000000..72a286c --- /dev/null +++ b/synfig-studio/src/gtkmm/asyncrenderer.cpp @@ -0,0 +1,541 @@ +/* === S Y N F I G ========================================================= */ +/*! \file asyncrenderer.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "asyncrenderer.h" +#include "app.h" +#include +#include + +#ifdef HAVE_UNISTD_H +#include +#endif + +#ifdef HAVE_SYS_TYPES_H +#include +#endif + +#ifdef HAVE_SYS_WAIT_H +#include +#endif + +#ifdef HAVE_SIGNAL_H +#include +#endif + +#include +#include + +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; +using namespace studio; + +#define BOREDOM_TIMEOUT 50 + +#define REJOIN_ON_STOP 1 + +// The Glib::Dispatcher class is broken as of Glibmm 2.4.5. +// Defining this macro enables the workaround. +#define GLIB_DISPATCHER_BROKEN 1 + +/* === C L A S S E S ======================================================= */ + +class AsyncTarget_Tile : public synfig::Target_Tile +{ +public: + etl::handle warm_target; + + struct tile_t + { + Surface surface; + int x,y; + tile_t(const Surface& surface,int x, int y): + surface(surface), + x(x),y(y) + { + } + }; + std::list tile_queue; + Glib::Mutex mutex; + +#ifndef GLIB_DISPATCHER_BROKEN + Glib::Dispatcher tile_ready_signal; +#endif + Glib::Cond cond_tile_queue_empty; + bool alive_flag; + + sigc::connection ready_connection; + +public: + AsyncTarget_Tile(etl::handle warm_target): + warm_target(warm_target) + { + set_avoid_time_sync(warm_target->get_avoid_time_sync()); + set_tile_w(warm_target->get_tile_w()); + set_tile_h(warm_target->get_tile_h()); + set_canvas(warm_target->get_canvas()); + set_quality(warm_target->get_quality()); + set_remove_alpha(warm_target->get_remove_alpha()); + set_threads(warm_target->get_threads()); + set_clipping(warm_target->get_clipping()); + set_rend_desc(&warm_target->rend_desc()); + alive_flag=true; +#ifndef GLIB_DISPATCHER_BROKEN + ready_connection=tile_ready_signal.connect(sigc::mem_fun(*this,&AsyncTarget_Tile::tile_ready)); +#endif + } + + ~AsyncTarget_Tile() + { + ready_connection.disconnect(); + } + void set_dead() + { + Glib::Mutex::Lock lock(mutex); + alive_flag=false; + } + + virtual int total_tiles()const + { + return warm_target->total_tiles(); + } + + virtual int next_tile(int& x, int& y) + { + if(!alive_flag) + return 0; + + return warm_target->next_tile(x,y); + } + + virtual int next_frame(Time& time) + { + if(!alive_flag) + return 0; + return warm_target->next_frame(time); + } + + virtual bool start_frame(synfig::ProgressCallback *cb=0) + { + if(!alive_flag) + return false; + return warm_target->start_frame(cb); + } + + virtual bool add_tile(const synfig::Surface &surface, int gx, int gy) + { + assert(surface); + if(!alive_flag) + return false; + Glib::Mutex::Lock lock(mutex); + tile_queue.push_back(tile_t(surface,gx,gy)); + if(tile_queue.size()==1) + { +#ifdef GLIB_DISPATCHER_BROKEN + ready_connection=Glib::signal_timeout().connect( + sigc::bind_return( + sigc::mem_fun(*this,&AsyncTarget_Tile::tile_ready), + false + ) + ,0 + ); +#else + tile_ready_signal(); +#endif + } + + return alive_flag; + } + + void tile_ready() + { + Glib::Mutex::Lock lock(mutex); + if(!alive_flag) + { + tile_queue.clear(); + cond_tile_queue_empty.signal(); + return; + } + while(!tile_queue.empty() && alive_flag) + { + tile_t& tile(tile_queue.front()); + + if (getenv("SYNFIG_SHOW_TILE_OUTLINES")) + { + Color red(1,0,0); + tile.surface.fill(red, 0, 0, 1, tile.surface.get_h()); + tile.surface.fill(red, 0, 0, tile.surface.get_w(), 1); + } + + alive_flag=warm_target->add_tile(tile.surface,tile.x,tile.y); + + tile_queue.pop_front(); + } + cond_tile_queue_empty.signal(); + } + + virtual void end_frame() + { +#ifdef SINGLE_THREADED + if (!single_threaded()) + { +#endif + while(alive_flag) + { + Glib::Mutex::Lock lock(mutex); + if(!tile_queue.empty() && alive_flag) + { + if(cond_tile_queue_empty.timed_wait(mutex,Glib::TimeVal(0,BOREDOM_TIMEOUT))) + break; + } + else + break; + } +#ifdef SINGLE_THREADED + } +#endif + Glib::Mutex::Lock lock(mutex); + if(!alive_flag) + return; + return warm_target->end_frame(); + } +}; + + + +class AsyncTarget_Scanline : public synfig::Target_Scanline +{ +public: + etl::handle warm_target; + + int scanline_; + Surface surface; + + Glib::Mutex mutex; + +#ifndef GLIB_DISPATCHER_BROKEN + Glib::Dispatcher frame_ready_signal; +#endif + Glib::Cond cond_frame_queue_empty; + bool alive_flag; + bool ready_next; + sigc::connection ready_connection; + + +public: + AsyncTarget_Scanline(etl::handle warm_target): + warm_target(warm_target) + { + set_avoid_time_sync(warm_target->get_avoid_time_sync()); + set_canvas(warm_target->get_canvas()); + set_quality(warm_target->get_quality()); + set_remove_alpha(warm_target->get_remove_alpha()); + set_threads(warm_target->get_threads()); + set_rend_desc(&warm_target->rend_desc()); + alive_flag=true; +#ifndef GLIB_DISPATCHER_BROKEN + ready_connection=frame_ready_signal.connect(sigc::mem_fun(*this,&AsyncTarget_Scanline::frame_ready)); +#endif + surface.set_wh(warm_target->rend_desc().get_w(),warm_target->rend_desc().get_h()); + } + + ~AsyncTarget_Scanline() + { + ready_connection.disconnect(); + } + + virtual int next_frame(Time& time) + { + if(!alive_flag) + return 0; + return warm_target->next_frame(time); + + } + + void set_dead() + { + Glib::Mutex::Lock lock(mutex); + alive_flag=false; + } + + virtual bool start_frame(synfig::ProgressCallback */*cb*/=0) + { + return alive_flag; + } + + virtual void end_frame() + { + { + Glib::Mutex::Lock lock(mutex); + + if(!alive_flag) + return; + ready_next=false; + +#ifdef GLIB_DISPATCHER_BROKEN + ready_connection=Glib::signal_timeout().connect( + sigc::bind_return( + sigc::mem_fun(*this,&AsyncTarget_Scanline::frame_ready), + false + ) + ,0 + ); +#else + frame_ready_signal(); +#endif + } + +#ifdef SINGLE_THREADED + if (single_threaded()) + signal_progress()(); + else +#endif + while(alive_flag && !ready_next) + { + Glib::Mutex::Lock lock(mutex); + if(cond_frame_queue_empty.timed_wait(mutex,Glib::TimeVal(0,BOREDOM_TIMEOUT))) + break; + } + } + + + virtual Color * start_scanline(int scanline) + { + Glib::Mutex::Lock lock(mutex); + + return surface[scanline]; + } + + virtual bool end_scanline() + { + return alive_flag; + } + + void frame_ready() + { + Glib::Mutex::Lock lock(mutex); + if(alive_flag) + alive_flag=warm_target->add_frame(&surface); +#ifdef SINGLE_THREADED + if (!single_threaded()) +#endif + cond_frame_queue_empty.signal(); + ready_next=true; + } +}; + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +AsyncRenderer::AsyncRenderer(etl::handle target_,synfig::ProgressCallback *cb): + error(false), + success(false), + cb(cb) +#ifdef SINGLE_THREADED + , updating(false) +#endif +{ + render_thread=0; + if(etl::handle::cast_dynamic(target_)) + { + etl::handle wrap_target( + new AsyncTarget_Tile(etl::handle::cast_dynamic(target_)) + ); + + signal_stop_.connect(sigc::mem_fun(*wrap_target,&AsyncTarget_Tile::set_dead)); + + target=wrap_target; + } + else if(etl::handle::cast_dynamic(target_)) + { + etl::handle wrap_target( + new AsyncTarget_Scanline( + etl::handle::cast_dynamic(target_) + ) + ); + + signal_stop_.connect(sigc::mem_fun(*wrap_target,&AsyncTarget_Scanline::set_dead)); + + target=wrap_target; + } +} + +AsyncRenderer::~AsyncRenderer() +{ + stop(); +} + +void +AsyncRenderer::stop() +{ + if(target) + { + Glib::Mutex::Lock lock(mutex); + done_connection.disconnect(); + + if(render_thread) + { + signal_stop_(); + +#if REJOIN_ON_STOP +#ifdef SINGLE_THREADED + if (!single_threaded()) +#endif + render_thread->join(); +#endif + + // Make sure all the dispatch crap is cleared out + //Glib::MainContext::get_default()->iteration(false); + + if(success) + signal_success_(); + + signal_finished_(); + + target=0; + render_thread=0; + } + } +} + +void +AsyncRenderer::pause() +{ +} + +void +AsyncRenderer::resume() +{ +} + +void +AsyncRenderer::start() +{ + done_connection=Glib::signal_timeout().connect( + sigc::bind_return( + mem_fun(*this,&AsyncRenderer::start_), + false + ) + ,50 + ); +} + +#ifdef SINGLE_THREADED +void +AsyncRenderer::rendering_progress() +{ + updating = true; + while(studio::App::events_pending()) studio::App::iteration(false); + updating = false; +} +#endif + +void +AsyncRenderer::start_() +{ + error=false;success=false; + if(target) + { +#ifndef GLIB_DISPATCHER_BROKEN + done_connection=signal_done_.connect(mem_fun(*this,&AsyncRenderer::stop)); +#endif + +#ifdef SINGLE_THREADED + if (single_threaded()) + { + synfig::info("%s:%d rendering in the same thread", __FILE__, __LINE__); + target->signal_progress().connect(sigc::mem_fun(this,&AsyncRenderer::rendering_progress)); + render_thread = (Glib::Thread*)1; + render_target(); + } + else +#endif + { + render_thread=Glib::Thread::create( + sigc::mem_fun(*this,&AsyncRenderer::render_target), +#if REJOIN_ON_STOP + true +#else + false +#endif + ); + assert(render_thread); + } + } + else + { + stop(); + } +} + +void +AsyncRenderer::render_target() +{ + etl::handle target(AsyncRenderer::target); + + if(target && target->render()) + { + success=true; + } + else + { + error=true; +#ifndef REJOIN_ON_STOP + return; +#endif + } + + if(mutex.trylock()) + { +#ifdef GLIB_DISPATCHER_BROKEN + done_connection=Glib::signal_timeout().connect( + sigc::bind_return( + mem_fun(*this,&AsyncRenderer::stop), + false + ) + ,0 + ); +#else + signal_done_.emit(); +#endif + mutex.unlock(); + } +} diff --git a/synfig-studio/src/gtkmm/asyncrenderer.h b/synfig-studio/src/gtkmm/asyncrenderer.h new file mode 100644 index 0000000..6678e4e --- /dev/null +++ b/synfig-studio/src/gtkmm/asyncrenderer.h @@ -0,0 +1,121 @@ +/* === S Y N F I G ========================================================= */ +/*! \file asyncrenderer.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_ASYNCRENDERER_H +#define __SYNFIG_ASYNCRENDERER_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +// uncomment to use a single thread, and hopefully get more stability +// #define SINGLE_THREADED +#ifdef SINGLE_THREADED +# define single_threaded() App::single_threaded +#endif + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace studio { + +class AsyncRenderer : public etl::shared_object, public sigc::trackable +{ + sigc::signal signal_finished_; + sigc::signal signal_success_; + + std::list activity_connection_list; + + //etl::handle target_scanline; + //etl::handle target_tile; + etl::handle target; + + bool error; + bool success; + + synfig::ProgressCallback *cb; + + sigc::signal signal_stop_; + + Glib::Thread* render_thread; + Glib::Dispatcher signal_done_; + Glib::Mutex mutex; + sigc::connection done_connection; + + /* + -- ** -- P A R E N T M E M B E R S ----------------------------------------- + */ +public: + + AsyncRenderer(etl::handle target,synfig::ProgressCallback *cb=0); + virtual ~AsyncRenderer(); + + void start(); + void stop(); + void pause(); + void resume(); +#ifdef SINGLE_THREADED + void rendering_progress(); + bool updating; +#endif + + bool has_error()const { return error; } + bool has_success()const { return success; } + + sigc::signal& signal_finished() { return signal_finished_; } + sigc::signal& signal_success() { return signal_success_; } + +private: + + void render_target(); + void start_(); + + /* + -- ** -- C H I L D M E M B E R S ------------------------------------------- + */ + +protected: + +}; + +}; // END of namespace studio + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-studio/src/gtkmm/audiocontainer.cpp b/synfig-studio/src/gtkmm/audiocontainer.cpp new file mode 100644 index 0000000..70d5dd9 --- /dev/null +++ b/synfig-studio/src/gtkmm/audiocontainer.cpp @@ -0,0 +1,1429 @@ +/* === S Y N F I G ========================================================= */ +/*! \file audiocontainer.cpp +** \brief Audio Container implementation File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#include +#include +//#include +#include + +#include + +#include + +#include "audiocontainer.h" + +#include +#include +#include + +#include +#include + +#ifdef WITH_FMOD +#include +#endif + +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; + +/* === M A C R O S ========================================================= */ +#ifdef __WIN32 +#else //linux... +#define AUDIO_OUTPUT FSOUND_OUTPUT_OSS +#endif + +/* === G L O B A L S ======================================================= */ +const double delay_factor = 3; + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +//Help constructing stuff +struct FSOUND_SAMPLE; +using studio::AudioContainer; + +#ifdef WITH_FMOD +bool build_profile(FSOUND_SAMPLE *sample, double &samplerate, std::vector &samples) +#else +bool build_profile(FSOUND_SAMPLE */*sample*/, double &/*samplerate*/, std::vector &/*samples*/) +#endif +{ +#ifdef WITH_FMOD + + float sps = samplerate; + + //trivial rejection... + if(!sample || sps < 1) + { + synfig::warning("build_profile: Sample rate was too low or sample was invalid"); + return false; + } + + //lock for all samples and process them into a subset + unsigned int mode = FSOUND_Sample_GetMode(sample); + + //make sure that it's 8 bit... I hope this works... + + //sample rate of the actual song... + int allsamplerate = 0; + FSOUND_Sample_GetDefaults(sample,&allsamplerate,0,0,0); + + //get the size of the sample defaults from the mode + int channels = 1; + int channelsize = 1; //number of bytes + + if(mode & FSOUND_16BITS) channelsize = 2; //this shouldn't happen + if(mode & FSOUND_STEREO) channels = 2; + + //Get the sample information + int samplesize = channels*channelsize; //the only two things that increase samplesize + int numsamples = FSOUND_Sample_GetLength(sample); //number of samples in the sound + int sizeall = samplesize*numsamples; //should be the size of the entire song... + + if(sizeall <= 0) + { + synfig::warning("ProfileAudio: Sample buffer cannot be size smaller than 1 (%X)",FSOUND_GetError()); + return false; + } + + //be sure that the new sample rate is less than or equal to the original + if(sps > allsamplerate) sps = allsamplerate; + + float stride = allsamplerate/(float)sps; + + //down sampling to 8 bit min/max values + synfig::warning("About to downsample from %d Hz to %.1f Hz, sample stride: %f", allsamplerate, sps, stride); + + char *sampledata=0,*useless = 0; + unsigned int len1,len2; + // vector samples; + { + if(!FSOUND_Sample_Lock(sample,0,sizeall,(void**)&sampledata,(void**)&useless,&len1,&len2)) + { + synfig::warning("ProfileAudio: Unable to lock the sound buffer... (%X)",FSOUND_GetError()); + return false; + } + synfig::warning("Locked: %X: %d bytes, %X: %d bytes",sampledata,len1,useless,len2); + + if(channelsize == 1) + { + //process the data + char *iter = sampledata; + char *end = iter + sizeall; + + float curaccum = 0; + float numinc = sps/(float)allsamplerate; + + /* Loop per sample DDA alg. + */ + + int i = 0; + + //HACK - to prevent if statement inside inner loop + //synfig::warning("wo baby wo baby, inc: %d, stride: %f, size: %d", inc, stride, sizeall); + while(iter < end) + { + int maxs = 0, mins = 0; + + for(;curaccum < 1; curaccum += numinc) + { + for(i = 0; iter < end && i < channels; ++i, iter += channelsize) + { + maxs = std::max(maxs,(int)*iter); + mins = std::min(mins,(int)*iter); + } + } + //insert onto new list + samples.push_back(maxs); + samples.push_back(mins); + + //and flush all the used samples for curaccum + curaccum -= 1; + } + }else if(channelsize == 2) + { + //process the data + char *iter = sampledata; + char *end = iter + sizeall; + + float curaccum = 0; + float numinc = sps/(float)allsamplerate; + + /* Loop per sample DDA alg. + */ + + int i = 0; + + //HACK - to prevent if statement inside inner loop + //synfig::warning("wo baby wo baby, inc: %d, stride: %f, size: %d", inc, stride, sizeall); + while(iter < end) + { + int maxs = 0, mins = 0; + + for(;curaccum < 1; curaccum += numinc) + { + for(i = 0; iter < end && i < channels; ++i, iter += channelsize) + { + maxs = std::max(maxs,(int)*(short*)iter); + mins = std::min(mins,(int)*(short*)iter); + } + } + //insert onto new list + samples.push_back(maxs / 256); + samples.push_back(mins / 256); + + //and flush all the used samples for curaccum + curaccum -= 1; + } + } + } + + synfig::warning("Stats: %f seconds with %d bytes now %d bytes", (samples.size()/2)/sps, sizeall, samples.size()); + synfig::warning(" %f seconds before", numsamples/(float)allsamplerate); + + //we're done yay!, unlock + FSOUND_Sample_Unlock(sample,sampledata,useless,len1,len2); + synfig::info("Unlocked"); + + //FSOUND_PlaySound(FSOUND_FREE,sound); //test + + //we're done + samplerate = sps*2; //it must be x2 because we are sampling max and min + + return true; + + #else + + return false; + + #endif +} + + +//FMOD Systemwide Specific data mostly here... + +struct scrubinfo; + +#ifdef WITH_FMOD +static double buffer_length_sec = 0; + +//------- Scrubbing -------------- +/* Scrubbing works as follows: + + The sound is played using PlaySoundEx + we specify a user created DSP for scrubbing + set it initially to inactive + + When the program initiates it + we set the initial data in the shared structure and activate the dsp unit + then for each cursor update we get we set the value in the shared structure +*/ + +/* Things to check: + If IsPlaying just governs the channel play/stop value or if it also concerns the pause state + +*/ + +//so we can know where to create all this stuff +struct scrubinfo +{ + /* Linearly fit the frequency to hit the desired zero point... + */ + /*struct scrubelement + { + double pos; + double dt; + //the amount of time left til the cursor hits this one + // it's incremental so that the cursor must pass previous + // ones before decrementing this value + }; + */ + + //the time it should take to get to the next position... + + //to prevent from writing to the same location at once... (pos, deltatime, delaystart) + //Glib::Mutex lock; + + //the queue system would provide a more accurate representation... + volatile double pos; + volatile double deltatime; + + volatile double delaystart; //the amount of time we need to go before we start interpolating... + + volatile int channel; + + /*std::list queue; + + volatile int channel; + + //current position is FSOUND_GetCurrentPosition and current time is always 0... + + void add(const scrubelement &elem) + { + lock.LockWrite(); + + queue.push_back(elem); + + lock.UnlockWrite(); + } + + //Function to safely get rid of all the old samples (dt < 0) + void flush() + { + lock.LockWrite(); + + while(queue.size() && queue.front().dt < 0) + { + queue.pop_front(); + } + + lock.UnlockWrite(); + }*/ + + void Lock() + { + //lock.lock(); + } + + void Unlock() + { + //lock.unlock(); + } + + //All parameters and state should be set by the time we get here... + void scrub_dsp_process() + { + const double epsilon = 1e-5; + + //Trivial reject... we go nowhere if we aren't playing (hit boundary...) + if(!FSOUND_IsPlaying(channel)) return; + + //Get rid of all the old samples + //flush(); + + //Trivial reject #2 - We also go nowhere with no future samples (pause) + /*if(queue.size() <= 0) + { + FSOUND_SetPaused(channel,true); + return; + }*/ + + double dt = buffer_length_sec; + + //Lock ourselves so we don't die + Lock(); + + //printf("DSP data: delay = %.3f s, pos = %d, dt = %.3f\n", delaystart, (int)pos, deltatime); + + //Check delay + if(delaystart > 0) + { + delaystart -= dt; + + if(delaystart < 0) + { + dt = -delaystart; //add time back... + delaystart = 0; + } + } + + //Trivial reject for if we're past current sample... + if(delaystart > 0 || deltatime <= 0) + { + FSOUND_SetPaused(channel,true); + Unlock(); + return; + } + + //Calculate stretched frequency based on delayed future sample... + + //NOTE: BY NOT TRACKING POSITION AS A FLOAT AND JUST USING THE SOUNDS VALUE + // WE ARE LOSING A TINY AMOUNT OF PRECISION ACCURACY EVERY UPDATE + // (THIS SHOULDN'T BE A PROBLEM) + const double p0 = FSOUND_GetCurrentPosition(channel); + double curdp = 0; + + if(!FSOUND_GetPaused(channel)) + { + curdp = FSOUND_GetFrequency(channel) * deltatime; + } + + //need to rescale derivative... + + //Extrapolate from difference in position and deltatime vs dt... + const double pa = p0 + curdp/2; + + const double p1 = pos; + + //const double pb = p0/3 + p1*2/3; + + //will extrapolate if needed... (could be funky on a curve) + double t = 0; + if(deltatime > epsilon) + { + t = dt / deltatime; + } + + //Decrement deltatime (we may have gone past but that's what happens when we don't get input...) + deltatime -= dt; + + //we don't need to look at the current variables anymore... + Unlock(); + + const double invt = 1-t; + //double deltapos = (p1-p0)*t; //linear version + double deltapos = invt*invt*p0 + 2*t*invt*pa + t*t*p1 - p0; //quadratic smoothing version + + //Attempted cubic smoothing + //const double invt2 = invt*invt; + //const double t2 = t*t; + //double deltapos = invt2*invt*p0 + 3*t*invt2*pa + 3*t2*invt*pb + t2*t*p1; + //double deltapos = p0 + t*(3*(pa-p0) + t*(3*(p0+2*pa+pb) + t*((p1-3*pb+3*ba-p0)))); //unwound cubic + + //printf("\ttime = %.2f; p(%d,%d,%d) dp:%d - delta = %d\n",t,(int)p0,(int)p1,(int)p2,(int)curdp,(int)deltapos); + + //Based on the delta info calculate the stretched frequency + const int dest_samplesize = FSOUND_DSP_GetBufferLength(); + + //rounded to nearest frequency... (hopefully...) + int freq = (int)(deltapos * FSOUND_GetOutputRate() / (double)dest_samplesize); + + //NOTE: WE MIGHT WANT TO DO THIS TO BE MORE ACCURATE BUT YEAH... ISSUES WITH SMALL NUMBERS + //double newdp = deltapos / t; + + //printf("\tfreq = %d Hz\n", freq); + + // !If I failed... um assume we have to pause it... ? + if(abs(freq) < 100) + { + FSOUND_SetPaused(channel,true); + }else + { + //synfig::info("DSP f = %d Hz", freq); + FSOUND_SetPaused(channel,false); + if(!FSOUND_SetFrequency(channel,freq)) + { + //ERROR WILL ROBINSON!!!... + printf("Error in Freq... what do I do?\n"); + } + } + } +}; + +struct scrubuserdata +{ + /* //for use with multiple + //each one is a 'handle' to a pointer that will be effected by something else + typedef scrubinfo** value_type; + typedef std::set< value_type > scrubslist; + scrubslist scrubs; + + //so we can lock access to the list... + ReadWriteLock lock; + + void AddScrub(scrubinfo **i) + { + lock.LockWrite(); + scrubs.insert(i); + lock.UnLockWrite(); + } + + void RemoveScrub(scrubinfo **i) + { + lock.LockWrite(); + scrubs.erase(i); + lock.UnLockWrite(); + }*/ + + scrubinfo * volatile * scrub; +}; + +//Scrubbing data structures +static const int default_scrub_priority = 5; //between clear and sfx/music mix +static scrubuserdata g_scrubdata = {0}; +static FSOUND_DSPUNIT *scrubdspunit = 0; + +void * scrubdspwrap(void *originalbuffer, void *newbuffer, int length, void *userdata) +{ + //std::string dsp = "DSP"; + if(userdata) + { + scrubuserdata &sd = *(scrubuserdata*)userdata; + + /* //For use with multiple scrubs... + //Lock so no one can write to it while we're reading from it... + sd.lock.LockRead(); + + //make a copy of it... + std::vector v(sd.scrubs.begin(),sd.scrubs.end()); + + //other things can do stuff with it again... + sd.lock.UnLockRead(); + + //loop through the list and process all the active scrub units + std::vector::iterator i = v.begin(), + end = v.end(); + for(;i != end; ++i) + { + //check to make sure this object is active... + if(*i && **i) + { + (**i)->scrub_dsp_process(); + } + } + */ + + if(sd.scrub && *sd.scrub) + { + //dsp += " processing..."; + scrubinfo * info = (*sd.scrub); + info->scrub_dsp_process(); + } + } + + //synfig::info(dsp); + + return newbuffer; +} + +//------- Class for loading fmod on demand ------- + +class FMODInitializer +{ + bool loaded; + int refcount; + +public: + FMODInitializer():loaded(false),refcount(0) {} + ~FMODInitializer() + { + clear(); + } + + void addref() + { + if(!loaded) + { + #ifdef WITH_FMOD + synfig::info("Initializing FMOD on demand..."); + + { + FSOUND_SetOutput(AUDIO_OUTPUT); + + /*int numdrivers = FSOUND_GetNumDrivers(); + synfig::info("Num FMOD drivers = %d",numdrivers); + synfig::info("Current Driver is #%d", FSOUND_GetDriver()); + + for(int i = 0; i < numdrivers; ++i) + { + unsigned int caps = 0; + FSOUND_GetDriverCaps(i,&caps); + + synfig::info(" Caps for driver %d (%s) = %x",i,FSOUND_GetDriverName(i),caps); + } + + FSOUND_SetDriver(0);*/ + + //Modify buffer size... + //FSOUND_SetBufferSize(100); + + if(!FSOUND_Init(44100, 32, 0)) + { + synfig::warning("Unable to load FMOD"); + }else + { + loaded = true; + + //Create the DSP for processing scrubbing... + scrubdspunit = FSOUND_DSP_Create(&scrubdspwrap,default_scrub_priority,&g_scrubdata); + + //Load the number of sec per buffer into the global variable... + buffer_length_sec = FSOUND_DSP_GetBufferLength() / (double)FSOUND_GetOutputRate(); + } + } + #endif + } + + //add to the refcount + ++refcount; + //synfig::info("Audio: increment fmod refcount %d", refcount); + } + + void decref() + { + if(refcount <= 0) + { + synfig::warning("FMOD refcount is already 0..."); + }else + { + --refcount; + //synfig::info("Audio: decrement fmod refcount %d", refcount); + + //NOTE: UNCOMMENT THIS IF YOU WANT FMOD TO UNLOAD ITSELF WHEN IT ISN'T NEEDED ANYMORE... + flush(); + } + } + + bool is_loaded() const { return loaded; } + + void clear() + { + refcount = 0; + flush(); + } + + void flush() + { + if(loaded && refcount <= 0) + { + #ifdef WITH_FMOD + synfig::info("Unloading FMOD"); + if(scrubdspunit) FSOUND_DSP_Free(scrubdspunit); + FSOUND_Close(); + #endif + loaded = false; + } + } +}; + +//The global counter for FMOD.... +FMODInitializer fmodinit; + +#endif + +//----- AudioProfile Implementation ----------- +void studio::AudioProfile::clear() +{ + samplerate = 0; + samples.clear(); +} + +handle studio::AudioProfile::get_parent() const +{ + return parent; +} + +void studio::AudioProfile::set_parent(etl::handle i) +{ + parent = i; +} + +double studio::AudioProfile::get_offset() const +{ + if(parent) + return parent->get_offset(); + return 0; +} + +//---------- AudioContainer definitions --------------------- + +struct studio::AudioContainer::AudioImp +{ + //Sample load time information + FSOUND_SAMPLE * sample; + int channel; + int sfreq; + int length; + + //Time information + double offset; //time offset for playing... + + //We don't need it now that we've adopted the play(t) time schedule... + //current time... and playing info.... + //float seekpost; + //bool useseekval; + + //Make sure to sever our delayed start if we are stopped prematurely + sigc::connection delaycon; + + //Action information + bool playing; + double curscrubpos; + etl::clock timer; //for getting the time diff between scrub input points + + //Scrubbing information... + //the current position of the sound will be sufficient for normal stuff... + #ifdef WITH_FMOD + scrubinfo scrinfo; + #endif + + scrubinfo *scrptr; + + bool is_scrubbing() const {return scrptr != 0;} +#ifdef WITH_FMOD + void set_scrubbing(bool s) +#else + void set_scrubbing(bool /*s*/) +#endif + { + #ifdef WITH_FMOD + if(s) + scrptr = &scrinfo; + else + #endif + scrptr = 0; + } + + //helper to make sure we are actually playing (and to get a new channel...) + bool init_play() + { + #ifdef WITH_FMOD + if(!FSOUND_IsPlaying(channel)) + { + if(sample) + { + //play sound paused etc. + channel = FSOUND_PlaySoundEx(FSOUND_FREE,sample,0,true); + if(channel < 0 || FSOUND_GetError() != FMOD_ERR_NONE) + { + synfig::warning("Could not play the sample..."); + return false; + } + } + }else + { + FSOUND_SetPaused(channel,true); + FSOUND_SetFrequency(channel,sfreq); + } + return true; + + #else + + return false; + + #endif + } + +public: //structors + AudioImp() + :sample(0), + channel(0), + sfreq(0), + length(0), + offset(0), + playing(false), + scrptr(0) + { + //reuse the channel... + #ifdef WITH_FMOD + channel = FSOUND_FREE; + #endif + } + + ~AudioImp() + { + clear(); + } + +public: //helper/accessor funcs + bool start_playing_now() //callback for timer... + { + #ifdef WITH_FMOD + if(playing) + { + //Make sure the sound is playing and if it is un pause it... + if(init_play()) + FSOUND_SetPaused(channel,false); + } + #endif + + return false; //so the timer doesn't repeat itself + } + + bool isRunning() + { + #ifdef WITH_FMOD + return FSOUND_IsPlaying(channel); + #else + return false; + #endif + } + + bool isPaused() + { +#ifdef WITH_FMOD + return FSOUND_GetPaused(channel); +#else + return false; +#endif + } + + +public: //forward interface + + //Accessors for the offset - in seconds + const double &get_offset() const {return offset;} + void set_offset(const double &d) + { + offset = d; + } + + //Will override the parameter timevalue if the sound is running, and not if it's not... +#ifdef WITH_FMOD + bool get_current_time(double &out) +#else + bool get_current_time(double &/*out*/) +#endif + { + if(isRunning()) + { + #ifdef WITH_FMOD + unsigned int pos = FSOUND_GetCurrentPosition(channel); + + //adjust back by 1 frame... HACK.... + //pos -= FSOUND_DSP_GetBufferLength(); + + //set the position + out = pos/(double)sfreq + offset; + #endif + + return true; + } + return false; + } + + //Big implementation functions... + bool load(const std::string &filename, const std::string &filedirectory); + void clear(); + + //playing functions + void play(double t); + void stop(); + + //scrubbing functions + void start_scrubbing(double t); + void scrub(double t); + void stop_scrubbing(); + + double scrub_time() + { + return curscrubpos; + } +}; + +//--------------- Audio Container definitions -------------------------- +studio::AudioContainer::AudioContainer() +{ + imp = 0; +} + +studio::AudioContainer::~AudioContainer() +{ + if(imp) delete (imp); +} + +bool studio::AudioContainer::load(const std::string &filename,const std::string &filedirectory) +{ + if(!imp) + { + imp = new AudioImp; + } + + profilevalid = false; + return imp->load(filename,filedirectory); +} + +#ifdef WITH_FMOD +handle studio::AudioContainer::get_profile(float samplerate) +#else +handle studio::AudioContainer::get_profile(float /*samplerate*/) +#endif +{ + #ifdef WITH_FMOD + + //if we already have done our work, then we're good + if(profilevalid && prof) + { + //synfig::info("Using already built profile"); + return prof; + } + + //synfig::info("Before profile"); + //make a new profile at current sample rate + + //NOTE: We might want to reuse the structure already there... + prof = new AudioProfile; + prof->set_parent(this); //Our parent is THIS!!! + + if(!prof) + { + synfig::warning("Couldn't allocate audioprofile..."); + return handle(); + } + + //setting the info for the sample rate + //synfig::info("Setting info..."); + + synfig::info("Building Profile..."); + prof->samplerate = samplerate; + if(build_profile(imp->sample,prof->samplerate,prof->samples)) + { + synfig::info(" Success!"); + profilevalid = true; + return prof; + }else + { + return handle(); + } + + #else + + return handle(); + + #endif +} + +void studio::AudioContainer::clear() +{ + if(imp) + { + delete imp; + imp = 0; + } + + profilevalid = false; +} + +void studio::AudioContainer::play(double t) +{ + if(imp) imp->play(t); +} + +void studio::AudioContainer::stop() +{ + if(imp) imp->stop(); +} + +bool studio::AudioContainer::get_current_time(double &out) +{ + if(imp) return imp->get_current_time(out); + else return false; +} + +void AudioContainer::set_offset(const double &s) +{ + if(imp) imp->set_offset(s); +} + +double AudioContainer::get_offset() const +{ + static double zero = 0; + if(imp) + return imp->get_offset(); + return zero; +} + +bool AudioContainer::is_playing() const +{ + if(imp) + return imp->playing; + return false; +} + +bool AudioContainer::is_scrubbing() const +{ + if(imp) + return imp->is_scrubbing(); + return false; +} + +void AudioContainer::start_scrubbing(double t) +{ + if(imp) imp->start_scrubbing(t); +} + +void AudioContainer::stop_scrubbing() +{ + if(imp) imp->stop_scrubbing(); +} + +void AudioContainer::scrub(double t) +{ + if(imp) imp->scrub(t); +} + +double AudioContainer::scrub_time() const +{ + if(imp) return imp->scrub_time(); + else return 0; +} + +bool AudioContainer::isRunning() const +{ + if(imp) return imp->isRunning(); + else return false; +} + +bool AudioContainer::isPaused() const +{ + if(imp) return imp->isPaused(); + else return false; +} + +//----------- Audio imp information ------------------- + +#ifdef WITH_FMOD +bool studio::AudioContainer::AudioImp::load(const std::string &filename, + const std::string &filedirectory) +#else +bool studio::AudioContainer::AudioImp::load(const std::string &/*filename*/, + const std::string &/*filedirectory*/) +#endif +{ + clear(); + + #ifdef WITH_FMOD + + //And continue with the sound loading... + string file = filename; + + //Trivial reject... (fixes stat call problem... where it just looks at directory and not file...) + if(file.length() == 0) return false; + + //we don't need the file directory? + if(!is_absolute_path(file)) + { + file=filedirectory+filename; + synfig::warning("Not absolute hoooray"); + } + synfig::info("Loading Audio file: %s", file.c_str()); + + //check to see if file exists + { + struct stat s; + if(stat(file.c_str(),&s) == -1 && errno == ENOENT) + { + synfig::info("There was no audio file..."); + return false; + } + } + + //load fmod if we can... + //synfig::warning("I'm compiled with FMOD!"); + fmodinit.addref(); + + //load the stream + int ch = FSOUND_FREE; + FSOUND_SAMPLE *sm = FSOUND_Sample_Load(FSOUND_FREE,file.c_str(),FSOUND_LOOP_OFF|FSOUND_MPEGACCURATE,0,0); + + if(!sm) + { + synfig::warning("Could not open the audio file as a sample: %s",file.c_str()); + goto error; + } + + //synfig::warning("Opened a file as a sample! :)"); + + /*{ + int bufferlen = FSOUND_DSP_GetBufferLength(); + synfig::info("Buffer length = %d samples, %.3lf s",bufferlen, bufferlen / (double)FSOUND_GetOutputRate()); + }*/ + + //set all the variables since everything has worked out... + //get the length of the stream + { + length = FSOUND_Sample_GetLength(sm); + + int volume = 0; + FSOUND_Sample_GetDefaults(sm,&sfreq,&volume,0,0); + + //double len = length / (double)sfreq; + //synfig::info("Sound info: %.2lf s long, %d Hz, %d Vol",(double)length,sfreq,volume); + } + + //synfig::warning("Got all info, and setting up everything, %.2f sec.", length); + //synfig::warning(" BigSample: composed of %d samples", FSOUND_Sample_GetLength(sm)); + synfig::info("Successfully opened %s as a sample and initialized it.",file.c_str()); + + //set up the playable info + sample = sm; + channel = ch; + + //the length and sfreq params have already been initialized + + return true; + +error: + if(sm) FSOUND_Sample_Free(sm); + file = ""; + + fmodinit.decref(); + + return false; + + #else + return false; + #endif +} + +#ifdef WITH_FMOD +void studio::AudioContainer::AudioImp::play(double t) +#else +void studio::AudioContainer::AudioImp::play(double /*t*/) +#endif +{ + #ifdef WITH_FMOD + if(!sample) return; + + //stop scrubbing if we are... + if(is_scrubbing()) stop_scrubbing(); + + //t -= offset; + t -= get_offset(); + playing = true; + + if(t < 0) + { + unsigned int timeout = (int)floor(-t * 1000 + 0.5); + //synfig::info("Playing audio delayed by %d ms",timeout); + //delay for t seconds... + delaycon = Glib::signal_timeout().connect( + sigc::mem_fun(*this,&studio::AudioContainer::AudioImp::start_playing_now),timeout); + + init_play(); + FSOUND_SetFrequency(channel,sfreq); + FSOUND_SetCurrentPosition(channel,0); + return; + } + + unsigned int position = (int)floor(t*sfreq + 0.5); + + if(position >= FSOUND_Sample_GetLength(sample)) + { + synfig::warning("Can't play audio when past length..."); + return; + } + + init_play(); + FSOUND_SetFrequency(channel,sfreq); + FSOUND_SetCurrentPosition(channel,position); + FSOUND_SetPaused(channel,false); + + //synfig::info("Playing audio with position %d samples",position); + + #endif +} + +void studio::AudioContainer::AudioImp::stop() +{ + delaycon.disconnect(); + + #ifdef WITH_FMOD + if(fmodinit.is_loaded() && playing && isRunning()) + { + FSOUND_SetPaused(channel,true); + } + #endif + + playing = false; +} + +void studio::AudioContainer::AudioImp::clear() +{ + #ifdef WITH_FMOD + delaycon.disconnect(); + + stop(); + stop_scrubbing(); + + if(sample) + { + if(FSOUND_IsPlaying(channel)) + { + FSOUND_StopSound(channel); + } + channel = FSOUND_FREE; + FSOUND_Sample_Free(sample); + fmodinit.decref(); + } + + playing = false; + + #else + channel = 0; + #endif + + sample = 0; + playing = false; +} + +#ifdef WITH_FMOD +void studio::AudioContainer::AudioImp::start_scrubbing(double t) +#else +void studio::AudioContainer::AudioImp::start_scrubbing(double /*t*/) +#endif +{ + //synfig::info("Start scrubbing: %lf", t); + if(playing) stop(); + + set_scrubbing(true); + + #ifdef WITH_FMOD + //make sure the other one is not scrubbing... + if(g_scrubdata.scrub) + { + *g_scrubdata.scrub = 0; //nullify the pointer... + } + + //Set up the initial state for the delayed audio position + scrinfo.delaystart = 0; + scrinfo.pos = 0; + scrinfo.deltatime = 0; + + //set it to point to our pointer (dizzy...) + g_scrubdata.scrub = &scrptr; + + //setup position info so we can know what to do on boundary conditions... + curscrubpos = (t - get_offset()) * sfreq; + + //So we can get an accurate difference... + timer.reset(); + + //reposition the sound if it won't be when scrubbed (if it's already in the range...) + int curi = (int)curscrubpos; + if(curi >= 0 && curi < length) + { + init_play(); + FSOUND_SetCurrentPosition(channel,curi); + + //Set the values... + scrinfo.pos = curscrubpos; + scrinfo.delaystart = delay_factor*buffer_length_sec; + + //synfig::info("\tStarting at %d samps, with %d p %.3f delay", + // FSOUND_GetCurrentPosition(channel), (int)scrinfo.pos, scrinfo.delaystart); + } + + + + //enable the dsp... + //synfig::info("\tActivating DSP"); + FSOUND_DSP_SetActive(scrubdspunit,true); + #endif +} + +void studio::AudioContainer::AudioImp::stop_scrubbing() +{ + //synfig::info("Stop scrubbing"); + + if(is_scrubbing()) + { + set_scrubbing(false); + + #ifdef WITH_FMOD + g_scrubdata.scrub = 0; + + //stop the dsp... + //synfig::info("\tDeactivating DSP"); + FSOUND_DSP_SetActive(scrubdspunit,false); + if(FSOUND_IsPlaying(channel)) FSOUND_SetPaused(channel,true); + #endif + } + + curscrubpos = 0; +} + +#ifdef WITH_FMOD +void studio::AudioContainer::AudioImp::scrub(double t) +#else +void studio::AudioContainer::AudioImp::scrub(double /*t*/) +#endif +{ + #ifdef WITH_FMOD + //synfig::info("Scrub to %lf",t); + if(is_scrubbing()) + { + //What should we do? + + /* Different special cases + All outside, all inside, + coming in (left or right), + going out (left or right) + */ + double oldpos = curscrubpos; + double newpos = (t - get_offset()) * sfreq; + + curscrubpos = newpos; + + //Ok the sound is running, now we need to tweak it + if(newpos > oldpos) + { + //Outside so completely stopped... + if(newpos < 0 || oldpos >= length) + { + //synfig::info("\tOut +"); + if(FSOUND_IsPlaying(channel)) + { + FSOUND_SetPaused(channel,true); + } + + //Zero out the data! + scrinfo.Lock(); + scrinfo.delaystart = 0; + scrinfo.deltatime = 0; + scrinfo.Unlock(); + + return; + } + + //going in? - start the sound at the beginning... + /*else if(oldpos < 0) + { + //Set up the sound to be playing paused at the start... + init_play(); + FSOUND_SetCurrentPosition(channel,0); + + synfig::info("\tIn + %d", FSOUND_GetCurrentPosition(channel)); + + scrinfo.Lock(); + scrinfo.pos = 0; + scrinfo.delaystart = delay_factor*buffer_length_sec; + scrinfo.deltatime = 0; + scrinfo.Unlock(); + }*/ + //don't need to deal with leaving... automatically dealt with... + + else //We're all inside... + { + //Set new position and decide what to do with time... + scrinfo.Lock(); + scrinfo.pos = newpos; + + //should we restart the delay cycle... (is it done?) + if(!isRunning() || (scrinfo.delaystart <= 0 && scrinfo.deltatime <= 0 && isPaused())) + { + //synfig::info("Starting + at %d",(int)newpos); + scrinfo.deltatime = 0; + scrinfo.delaystart = delay_factor*buffer_length_sec; + scrinfo.Unlock(); + + //Set up the sound paused at the current position + init_play(); + int setpos = min(max((int)newpos,0),length); + FSOUND_SetCurrentPosition(channel,setpos); + timer.reset(); + return; + } + + //No! just increment the time delta... + scrinfo.deltatime += timer.pop_time(); + + //Nope... continue and just increment the deltatime and reset position... + scrinfo.Unlock(); + + //set channel and unpause + FSOUND_SetPaused(channel,false); + scrinfo.channel = channel; + + } + }else if(newpos < oldpos) + { + //completely stopped... + if(newpos >= length || oldpos < 0) + { + //synfig::info("Out -"); + if(FSOUND_IsPlaying(channel)) + { + FSOUND_SetPaused(channel,true); + } + + //Zero out the data! + scrinfo.Lock(); + scrinfo.delaystart = 0; + scrinfo.deltatime = 0; + scrinfo.Unlock(); + } + + //going in? - start going backwards at the end... + /*else if(oldpos >= length) + { + synfig::info("In -"); + //Set up the sound to be playing paused at the start... + init_play(); + FSOUND_SetCurrentPosition(channel,length-1); + + scrinfo.Lock(); + scrinfo.pos = length-1; + scrinfo.delaystart = delay_factor*buffer_length_sec; + scrinfo.deltatime = 0; + scrinfo.Unlock(); + }*/ + //we don't have to worry about the leaving case... + + else //We're all inside... + { + //Set new position and decide what to do with time... + scrinfo.Lock(); + scrinfo.pos = newpos; + + //should we restart the delay cycle... (is it done?) + if(!isRunning() ||(scrinfo.delaystart <= 0 && scrinfo.deltatime <= 0 && isPaused())) + { + //synfig::info("Starting - at %d",(int)newpos); + scrinfo.deltatime = 0; + scrinfo.delaystart = delay_factor*buffer_length_sec; + scrinfo.Unlock(); + + //reset timing so next update will be a valid diff... + init_play(); + int setpos = min(max((int)newpos,0),length); + FSOUND_SetCurrentPosition(channel,setpos); + timer.reset(); + return; + } + + //No! just increment the time delta... + scrinfo.deltatime += timer.pop_time(); + + //Nope... continue and just increment the deltatime and reset position... + scrinfo.Unlock(); + + //set channel and unpause + FSOUND_SetPaused(channel,false); + scrinfo.channel = channel; + } + } + } + #endif +} diff --git a/synfig-studio/src/gtkmm/audiocontainer.h b/synfig-studio/src/gtkmm/audiocontainer.h new file mode 100644 index 0000000..21d5f51 --- /dev/null +++ b/synfig-studio/src/gtkmm/audiocontainer.h @@ -0,0 +1,139 @@ +/* === S Y N F I G ========================================================= */ +/*! \file audiocontainer.h +** \brief Sound info header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_AUDIOCONTAINER_H +#define __SYNFIG_AUDIOCONTAINER_H + +/* === H E A D E R S ======================================================= */ +#include + +#include + +#include +#include + +#include + +/* === M A C R O S ========================================================= */ +const float DEF_DISPLAYSAMPLERATE = 400; +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace studio { + +class AudioContainer; + +//Note: Might want to abstract something to share data between profile and parent +class AudioProfile : public etl::shared_object +{ +public: + typedef std::vector SampleProfile; + +private: + SampleProfile samples; + double samplerate; //samples / second of the profile + + //reference our parent for any native sound info + etl::loose_handle parent; + +public: //samples interface + + SampleProfile::const_iterator begin() const {return samples.begin();} + SampleProfile::const_iterator end() const {return samples.end();} + + void clear(); + unsigned int size() const {return samples.size();} + + char operator[](int i) const + { + if(i >= 0 && i < (int)samples.size()) return samples[i]; + else return 0; + } + +public: // + + double get_samplerate() const {return samplerate;} + void set_samplerate(double f) {samplerate = f;} + + double get_offset() const; + + etl::handle get_parent() const; + void set_parent(etl::handle i); + friend class AudioContainer; +}; + +/* Audio container actually implements all the cool stuff + Note: May be a bit too monolithic... +*/ +class AudioContainer : public sigc::trackable, public etl::shared_object +{ + etl::handle prof; + + struct AudioImp; + AudioImp *imp; + + bool profilevalid; //this is only half useful + //it makes it so we don't always have to realloc memory when the file switches... + +public: //structors + + AudioContainer(); + ~AudioContainer(); + +public: //accessor interface + void set_offset(const double &s); + double get_offset() const; + +public: //info gather interface + etl::handle get_profile(float samplerate = DEF_DISPLAYSAMPLERATE); + bool get_current_time(double &out); + +public: //operational interface + bool load(const std::string &filename, const std::string &filedirectory = ""); + void clear(); + + //play functions... + void play(double t); + void stop(); + //Note: this refers to the wrapper concept of the audio, the actual sound may or may not be playing... + bool is_playing() const; + + //scrubbing functions... + void start_scrubbing(double t); + void stop_scrubbing(); + void scrub(double t); //!< if we are not currently scrubbing this will not work + bool is_scrubbing() const; + + double scrub_time() const; + + bool isRunning() const; + bool isPaused() const; +}; + +} // END of namespace studio + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-studio/src/gtkmm/autorecover.cpp b/synfig-studio/src/gtkmm/autorecover.cpp new file mode 100644 index 0000000..1b55eb4 --- /dev/null +++ b/synfig-studio/src/gtkmm/autorecover.cpp @@ -0,0 +1,330 @@ +/* === S Y N F I G ========================================================= */ +/*! \file autorecover.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "autorecover.h" + +#ifdef HAVE_SYS_ERRNO_H +#include +#endif +//#include +#include "app.h" +#include +#include +#include +#include +#include "instance.h" + +#ifdef HAVE_SYS_STAT_H +#include +#endif + +#ifdef HAVE_SYS_TIME_H +#include +#endif + +#ifdef HAVE_SYS_WAIT_H +#include +#endif + +#ifdef HAVE_SYS_RESOURCE_H +#include +#endif + +#ifdef HAVE_UNISTD_H +#include +#endif + +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; +using namespace studio; + +/* === M A C R O S ========================================================= */ + +#ifdef _WIN32 +#define mkdir(x,y) mkdir(x) +#endif + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +AutoRecover::AutoRecover() +{ + // Three Minutes + set_timeout(3*60*1000); + + if(mkdir(get_shadow_directory().c_str(),ACCESSPERMS)<0) + { + if(errno!=EEXIST) + synfig::error("UNABLE TO CREATE \"%s\"",get_shadow_directory().c_str()); + } + else + { + synfig::info("Created directory \"%s\"",get_shadow_directory().c_str()); + } +} + +AutoRecover::~AutoRecover() +{ +} + +synfig::String +AutoRecover::get_shadow_directory() +{ + return Glib::build_filename(App::get_user_app_directory(),"tmp"); +} + +int +AutoRecover::pid() +{ +// return getpid(); + return 0; +} + +void +AutoRecover::set_timeout(int milliseconds) +{ + timeout=milliseconds; + auto_backup_connect.disconnect(); + if(timeout) + auto_backup_connect=Glib::signal_timeout().connect(sigc::ptr_fun(&AutoRecover::auto_backup),timeout); +// auto_backup_connect=App::main.get_context()->signal_timeout().connect(sigc::mem_fun(&AutoRecover::auto_backup),timeout); +} + +synfig::String +AutoRecover::get_shadow_file_name(const synfig::String& filename) +{ + unsigned int hash1(0xdeadbeef); + unsigned int hash2(0x83502529); + char* str_hash1(reinterpret_cast(&hash1)); + char* str_hash2(reinterpret_cast(&hash2)); + + // First we need to hash up the directory + { + String pool(dirname(filename)); + + while(pool.size()>4) + { + str_hash1[0]^=pool[1];str_hash1[1]^=pool[2];str_hash1[2]^=pool[3];str_hash1[3]^=pool[0]; + str_hash2[3]+=pool[0];str_hash2[2]+=pool[1];str_hash2[1]+=pool[2];str_hash2[0]+=pool[3]; + swap(hash1,hash2); + pool=String(pool,4,pool.size()); + } + while(pool.size()) + { + str_hash1[0]^=pool[0]; + str_hash1[2]^=pool[0]; + str_hash2[1]^=pool[0]; + str_hash2[3]^=pool[0]; + swap(hash1,hash2); + pool=String(pool,1,pool.size()); + } + } + hash1^=hash2; + + return Glib::build_filename(get_shadow_directory(),strprintf("%08X-%s",hash1,basename(filename).c_str())); + +// return dirname(filename) + ETL_DIRECTORY_SEPARATOR + ".shadow_" + basename(filename); +} + +bool +AutoRecover::cleanup_pid(int pid) +{ +#ifdef HAVE_FORK + int status=0; + if(waitpid(pid,&status,WNOHANG)==-1) + { + synfig::info("PID %d isn't a zombie yet",pid); + return true; + } + if(WEXITSTATUS(status)!=0) + { + synfig::error("Autobackup seems to have failed! (PID=%d)",pid); + } +// else +// synfig::info("PID=%d has been cleaned up",pid); +#endif + return false; +} + +bool +AutoRecover::auto_backup() +{ + int pid(0); + +#ifdef HAVE_FORK + pid=fork(); +#endif + + if(pid<=0) + { +#ifdef HAVE_SETPRIORITY + // make us low priority so that we don't + // cause the machine to slow down too much + setpriority(PRIO_PROCESS,0,15); +#endif + + try + { + std::list >::iterator iter; + + std::string filename=App::get_config_file("autorecovery"); + std::ofstream file(filename.c_str()); + + int savecount(0); + + for(iter=App::instance_list.begin();iter!=App::instance_list.end();++iter) + { + // If this file hasn't even been changed + // since it was last saved, then don't bother + // backing it up. + if((*iter)->get_action_count()==0) + continue; + + Canvas::Handle canvas((*iter)->get_canvas()); + file<get_file_name()<get_file_name()),canvas); + savecount++; + } + +// if(savecount) +// synfig::info("AutoRecover::auto_backup(): %d Files backed up.",savecount); + } + catch(...) + { + synfig::error("AutoRecover::auto_backup(): UNKNOWN EXCEPTION THROWN."); + synfig::error("AutoRecover::auto_backup(): FILES NOT BACKED UP."); + } + +#ifdef HAVE_FORK + if(pid==0) + { + _exit(0); + } +#endif + } + +#ifdef HAVE_FORK + Glib::signal_timeout().connect( + sigc::bind( + sigc::ptr_fun(&AutoRecover::cleanup_pid), + pid + ), + 60*1000 + ); +#endif + + // Also go ahead and save the settings + App::save_settings(); + + return true; +} + +bool +AutoRecover::recovery_needed()const +{ + std::string filename=App::get_config_file("autorecovery"); + std::ifstream file(filename.c_str()); + if(!file) + return false; + + while(file) + { + std::string filename; + getline(file,filename); + if(!filename.empty()) + return true; + } + + return false; +} + +bool +AutoRecover::recover(int& number_recovered) +{ + std::string filename=App::get_config_file("autorecovery"); + std::ifstream file(filename.c_str()); + number_recovered = 0; + if(!file) + return false; + bool success=true; + + while(file) + { + std::string filename; + getline(file,filename); + if(filename.empty()) + continue; + + // Open the file + if(App::open_as(get_shadow_file_name(filename),filename)) + { + // Correct the file name + App::instance_list.back()->set_file_name(filename); + + // This file isn't saved! mark it as such + App::instance_list.back()->inc_action_count(); + + number_recovered++; + } + else + success=false; + } + + return success; +} + +void +AutoRecover::normal_shutdown() +{ + // Turn off the timer + auto_backup_connect.disconnect(); + + std::string filename=App::get_config_file("autorecovery"); + remove(filename.c_str()); +} + +void +AutoRecover::clear_backup(synfig::Canvas::Handle canvas) +{ + if(canvas) + remove(get_shadow_file_name(canvas->get_file_name()).c_str()); +} diff --git a/synfig-studio/src/gtkmm/autorecover.h b/synfig-studio/src/gtkmm/autorecover.h new file mode 100644 index 0000000..9bdedac --- /dev/null +++ b/synfig-studio/src/gtkmm/autorecover.h @@ -0,0 +1,75 @@ +/* === S Y N F I G ========================================================= */ +/*! \file autorecover.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_AUTORECOVER_H +#define __SYNFIG_AUTORECOVER_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace studio { + +class AutoRecover +{ + int timeout; + sigc::connection auto_backup_connect; +public: + AutoRecover(); + ~AutoRecover(); + + static int pid(); + static synfig::String get_shadow_file_name(const synfig::String& filename); + + static bool auto_backup(); + + static bool cleanup_pid(int pid); + + void set_timeout(int milliseconds); + int get_timeout()const { return timeout; } + + static synfig::String get_shadow_directory(); + + bool recovery_needed()const; + bool recover(int& number_recovered); + + void normal_shutdown(); + + void clear_backup(synfig::Canvas::Handle canvas); +}; // END of class AutoRecover + +}; // END of namespace studio + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-studio/src/gtkmm/canvasoptions.cpp b/synfig-studio/src/gtkmm/canvasoptions.cpp new file mode 100644 index 0000000..dfc15ed --- /dev/null +++ b/synfig-studio/src/gtkmm/canvasoptions.cpp @@ -0,0 +1,215 @@ +/* === S Y N F I G ========================================================= */ +/*! \file canvasoptions.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "canvasoptions.h" +#include +#include +#include +#include +#include +#include "canvasview.h" +#include "workarea.h" + +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; +using namespace studio; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +CanvasOptions::CanvasOptions(etl::loose_handle canvas_view): + Gtk::Dialog(_("Canvas Options"),*canvas_view,false,true), + canvas_view_(canvas_view), + toggle_grid_snap(_("_Snap to grid"), true), + toggle_grid_show(_("S_how grid"), true), + toggle_time_snap(_("Snap to _frame"), true) +{ + vector_grid_size.set_canvas(canvas_view->get_canvas()); + + Gtk::Alignment *dialogPadding = manage(new Gtk::Alignment(0, 0, 1, 1)); + dialogPadding->set_padding(12, 12, 12, 12); + + Gtk::Notebook *notebook=manage(new class Gtk::Notebook()); + dialogPadding->add(*notebook); + + toggle_grid_snap.signal_toggled().connect(sigc::mem_fun(*this, &studio::CanvasOptions::on_grid_snap_toggle)); + toggle_grid_show.signal_toggled().connect(sigc::mem_fun(*this, &studio::CanvasOptions::on_grid_show_toggle)); + + Gtk::Alignment *gridPadding = manage(new Gtk::Alignment(0, 0, 1, 1)); + gridPadding->set_padding(12, 12, 12, 12); + notebook->append_page(*gridPadding, _("Grid")); + + Gtk::VBox *gridBox = manage(new Gtk::VBox(false, 12)); + gridPadding->add(*gridBox); + + Gtk::Table *gridTable = manage(new Gtk::Table(3, 2, false)); + gridTable->set_row_spacings(6); + gridTable->set_col_spacings(12); + gridBox->pack_start(*gridTable, false, false, 0); + + Gtk::Label *gridSizeLabel = manage(new Gtk::Label(_("_Grid size"), true)); + gridSizeLabel->set_alignment(0, 0.5); + gridSizeLabel->set_mnemonic_widget(vector_grid_size); + + toggle_grid_show.set_alignment(0, 0.5); + toggle_grid_snap.set_alignment(0, 0.5); + + gridTable->attach(*gridSizeLabel, 0, 1, 0, 1, Gtk::SHRINK | Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 0, 0); + gridTable->attach(vector_grid_size, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 0, 0); + gridTable->attach(toggle_grid_show, 0, 2, 1, 2, Gtk::EXPAND | Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 0, 0); + gridTable->attach(toggle_grid_snap, 0, 2, 2, 3, Gtk::EXPAND | Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 0, 0); + + Gtk::Alignment *timePadding = manage(new Gtk::Alignment(0, 0, 1, 1)); + timePadding->set_padding(12, 12, 12, 12); + notebook->append_page(*timePadding, _("Time")); + + Gtk::VBox *timeBox = manage(new Gtk::VBox(false, 12)); + timePadding->add(*timeBox); + + timeBox->pack_start(toggle_time_snap, false, false, 0); + + Gtk::Alignment *unitPadding = manage(new Gtk::Alignment(0, 0, 1, 1)); + unitPadding->set_padding(12, 12, 12, 12); + notebook->append_page(*unitPadding, _("Units")); + unitPadding->add(*manage(new Gtk::Label(_("Not yet implemented!")))); + + Gtk::Button *ok_button(manage(new class Gtk::Button(Gtk::StockID("gtk-ok")))); + ok_button->show(); + add_action_widget(*ok_button,2); + ok_button->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasOptions::on_ok_pressed)); + + Gtk::Button *apply_button(manage(new class Gtk::Button(Gtk::StockID("gtk-apply")))); + apply_button->show(); + add_action_widget(*apply_button,1); + apply_button->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasOptions::on_apply_pressed)); + + Gtk::Button *cancel_button(manage(new class Gtk::Button(Gtk::StockID("gtk-close")))); + cancel_button->show(); + add_action_widget(*cancel_button,0); + cancel_button->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasOptions::on_cancel_pressed)); + + //set_default_response(1); + + + get_vbox()->pack_start(*dialogPadding); + get_vbox()->show_all(); + + signal_show().connect(sigc::mem_fun(*this, &studio::CanvasOptions::refresh)); + + vector_grid_size.set_digits(5); + + update_title(); +} + +CanvasOptions::~CanvasOptions() +{ +} + +void +CanvasOptions::update_title() +{ + set_title(_("Options")+String(" - ")+canvas_view_->get_canvas()->get_name()); +} + +void +CanvasOptions::refresh() +{ + if(canvas_view_->work_area->grid_status()) + toggle_grid_show.set_active(true); + else + toggle_grid_show.set_active(false); + + if(canvas_view_->work_area->get_grid_snap()) + toggle_grid_snap.set_active(true); + else + toggle_grid_snap.set_active(false); + + vector_grid_size.set_value(canvas_view_->work_area->get_grid_size()); + + tooltips.set_tip(toggle_time_snap,_("Not yet implemented")); + toggle_time_snap.set_sensitive(false); + + update_title(); +} + +void +CanvasOptions::on_grid_snap_toggle() +{ +} + +void +CanvasOptions::on_grid_show_toggle() +{ +} + +void +CanvasOptions::on_apply_pressed() +{ + canvas_view_->set_grid_snap_toggle(toggle_grid_snap.get_active()); + if(toggle_grid_snap.get_active()) + canvas_view_->work_area->enable_grid_snap(); + else + canvas_view_->work_area->disable_grid_snap(); + + canvas_view_->set_grid_show_toggle(toggle_grid_show.get_active()); + if(toggle_grid_show.get_active()) + canvas_view_->work_area->enable_grid(); + else + canvas_view_->work_area->disable_grid(); + + canvas_view_->work_area->set_grid_size(vector_grid_size.get_value()); +} + +void +CanvasOptions::on_ok_pressed() +{ + on_apply_pressed(); + hide(); +} + +void +CanvasOptions::on_cancel_pressed() +{ + refresh(); + hide(); +} diff --git a/synfig-studio/src/gtkmm/canvasoptions.h b/synfig-studio/src/gtkmm/canvasoptions.h new file mode 100644 index 0000000..452ab3f --- /dev/null +++ b/synfig-studio/src/gtkmm/canvasoptions.h @@ -0,0 +1,82 @@ +/* === S Y N F I G ========================================================= */ +/*! \file canvasoptions.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_GTKMM_CANVASOPTIONS_H +#define __SYNFIG_GTKMM_CANVASOPTIONS_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include "widget_value.h" +#include "widget_vector.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace studio +{ + +class CanvasView; + +class CanvasOptions : public Gtk::Dialog +{ + Gtk::Tooltips tooltips; + + etl::loose_handle canvas_view_; + + Gtk::CheckButton toggle_grid_snap; + Gtk::CheckButton toggle_grid_show; + + Widget_Vector vector_grid_size; + + Gtk::CheckButton toggle_time_snap; + +public: + CanvasOptions(etl::loose_handle canvas_view); + ~CanvasOptions(); + + void refresh(); + void update_title(); +private: + + void on_grid_snap_toggle(); + void on_grid_show_toggle(); + + void on_ok_pressed(); + void on_apply_pressed(); + void on_cancel_pressed(); +}; // END of class CanvasOptions + +}; // END of namespace studio + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-studio/src/gtkmm/canvasproperties.cpp b/synfig-studio/src/gtkmm/canvasproperties.cpp new file mode 100644 index 0000000..d095331 --- /dev/null +++ b/synfig-studio/src/gtkmm/canvasproperties.cpp @@ -0,0 +1,255 @@ +/* === S Y N F I G ========================================================= */ +/*! \file canvasproperties.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "canvasproperties.h" +#include +#include +#include +#include +#include +#include "metadatatreestore.h" +#include +#include +#include "app.h" + +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; +using namespace studio; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +CanvasProperties::CanvasProperties(Gtk::Window& parent,etl::handle canvas_interface): + Gtk::Dialog(_("Canvas Properties"),parent,false,true), + canvas_interface_(canvas_interface) +{ + widget_rend_desc.show(); + widget_rend_desc.signal_changed().connect(sigc::mem_fun(*this,&studio::CanvasProperties::on_rend_desc_changed)); + + Gtk::Alignment *dialogPadding = manage(new Gtk::Alignment(0, 0, 1, 1)); + dialogPadding->set_padding(12, 12, 12, 12); + get_vbox()->pack_start(*dialogPadding, false, false, 0); + + Gtk::VBox *dialogBox = manage(new Gtk::VBox(false, 12)); + dialogPadding->add(*dialogBox); + + Gtk::Frame *info_frame=manage(new Gtk::Frame(_("Canvas Info"))); + info_frame->set_shadow_type(Gtk::SHADOW_NONE); + ((Gtk::Label *) info_frame->get_label_widget())->set_markup(_("Canvas Info")); + dialogBox->pack_start(*info_frame, false, false, 0); + + Gtk::Alignment *infoPadding = manage(new Gtk::Alignment(0, 0, 1, 1)); + infoPadding->set_padding(6, 0, 24, 0); + info_frame->add(*infoPadding); + + Gtk::Table *info_table=manage(new Gtk::Table(2,2,false)); + info_table->set_row_spacings(6); + info_table->set_col_spacings(12); + infoPadding->add(*info_table); + + // The root canvas doesn't have an ID, so don't + // display it if this is a root canvas. + if(!canvas_interface_->get_canvas()->is_root()) + { + Gtk::Label *idLabel = manage(new Gtk::Label(_("_ID"), true)); + idLabel->set_alignment(0, 0.5); + idLabel->set_mnemonic_widget(entry_id); + info_table->attach(*idLabel, 0, 1, 0, 1, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + info_table->attach(entry_id, 1, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + } + Gtk::Label *nameLabel = manage(new Gtk::Label(_("_Name"), true)); + nameLabel->set_alignment(0, 0.5); + nameLabel->set_mnemonic_widget(entry_name); + Gtk::Label *descriptionLabel = manage(new Gtk::Label(_("_Description"), true)); + descriptionLabel->set_alignment(0, 0.5); + descriptionLabel->set_mnemonic_widget(entry_description); + info_table->attach(*nameLabel, 0, 1, 1, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + info_table->attach(*descriptionLabel, 0, 1, 2, 3, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + info_table->attach(entry_name, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + info_table->attach(entry_description, 1, 2, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + + dialogBox->pack_start(widget_rend_desc, false, false, 0); + + canvas_interface_->signal_rend_desc_changed().connect(sigc::mem_fun(*this,&studio::CanvasProperties::refresh)); + canvas_interface_->signal_id_changed().connect(sigc::mem_fun(*this,&studio::CanvasProperties::refresh)); + + Gtk::Button *ok_button(manage(new class Gtk::Button(Gtk::StockID("gtk-ok")))); + ok_button->show(); + add_action_widget(*ok_button,2); + ok_button->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasProperties::on_ok_pressed)); + + Gtk::Button *apply_button(manage(new class Gtk::Button(Gtk::StockID("gtk-apply")))); + apply_button->show(); + add_action_widget(*apply_button,1); + apply_button->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasProperties::on_apply_pressed)); + + Gtk::Button *cancel_button(manage(new class Gtk::Button(Gtk::StockID("gtk-close")))); + cancel_button->show(); + add_action_widget(*cancel_button,0); + cancel_button->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasProperties::on_cancel_pressed)); + + //set_default_response(1); + + get_vbox()->show_all(); + refresh(); + + update_title(); +} + +Gtk::Widget& +CanvasProperties::create_meta_data_view() +{ + MetaDataTreeStore::Model model; + meta_data_tree_view=(manage(new class Gtk::TreeView())); + + meta_data_tree_view->append_column(_("Key"),model.key); + meta_data_tree_view->append_column_editable(_("Data"),model.data); + meta_data_tree_view->set_model(MetaDataTreeStore::create(canvas_interface_)); + meta_data_tree_view->set_rules_hint(); + meta_data_tree_view->show(); + + Gtk::ScrolledWindow *scrolledwindow = manage(new class Gtk::ScrolledWindow()); + scrolledwindow->set_flags(Gtk::CAN_FOCUS); + scrolledwindow->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); + scrolledwindow->add(*meta_data_tree_view); + scrolledwindow->set_shadow_type(Gtk::SHADOW_ETCHED_IN); + scrolledwindow->show(); + + + + Gtk::Table *table=manage(new Gtk::Table()); + table->attach(*scrolledwindow, 0, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); + + Gtk::Button* button_add(manage(new Gtk::Button(Gtk::StockID("gtk-add")))); + button_add->show(); + button_add->signal_clicked().connect(sigc::mem_fun(*this,&CanvasProperties::on_button_meta_data_add)); + table->attach(*button_add, 0, 1, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + + Gtk::Button* button_delete(manage(new Gtk::Button(Gtk::StockID("gtk-delete")))); + button_delete->show(); + button_delete->signal_clicked().connect(sigc::mem_fun(*this,&CanvasProperties::on_button_meta_data_delete)); + table->attach(*button_delete, 1, 2, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + + table->show(); + return *table; +} + +void +CanvasProperties::on_button_meta_data_add() +{ + synfig::String key; + if(App::dialog_entry(_("New MetaData Entry"), _("Please enter the name of the key"),key) && !key.empty()) + { + canvas_interface_->set_meta_data(key," "); + } + +} + +void +CanvasProperties::on_button_meta_data_delete() +{ +} + +void +CanvasProperties::update_title() +{ + set_title(_("Properties")+String(" - ")+canvas_interface_->get_canvas()->get_name()); +} + +void +CanvasProperties::refresh() +{ + widget_rend_desc.set_rend_desc(canvas_interface_->get_canvas()->rend_desc()); + entry_id.set_text(canvas_interface_->get_canvas()->get_id()); + entry_name.set_text(canvas_interface_->get_canvas()->get_name()); + entry_description.set_text(canvas_interface_->get_canvas()->get_description()); + + dirty_rend_desc=false; + + update_title(); +} + +CanvasProperties::~CanvasProperties() +{ +} + +void +CanvasProperties::on_rend_desc_changed() +{ + dirty_rend_desc=true; +} + +void +CanvasProperties::on_apply_pressed() +{ + synfigapp::Action::PassiveGrouper group(canvas_interface_->get_instance().get(),_("Edit Canvas Properties")); + + // fetch these three values first, because each set_() method refreshes the dialog with currently set values + String id = entry_id.get_text(); + String name = entry_name.get_text(); + String description = entry_description.get_text(); + + // do this first, because the other three cause the dialog to be refreshed with currently set values + if (dirty_rend_desc) canvas_interface_->set_rend_desc(widget_rend_desc.get_rend_desc()); + + if (id != canvas_interface_->get_canvas()->get_id() && !id.empty()) canvas_interface_->set_id(id); + if (name != canvas_interface_->get_canvas()->get_name()) canvas_interface_->set_name(name); + if (description != canvas_interface_->get_canvas()->get_description()) canvas_interface_->set_description(description); + + dirty_rend_desc=false; +} + +void +CanvasProperties::on_ok_pressed() +{ + on_apply_pressed(); + hide(); +} + +void +CanvasProperties::on_cancel_pressed() +{ + refresh(); + hide(); +} diff --git a/synfig-studio/src/gtkmm/canvasproperties.h b/synfig-studio/src/gtkmm/canvasproperties.h new file mode 100644 index 0000000..3a32d40 --- /dev/null +++ b/synfig-studio/src/gtkmm/canvasproperties.h @@ -0,0 +1,87 @@ +/* === S Y N F I G ========================================================= */ +/*! \file canvasproperties.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_GTKMM_CANVASPROPERTIES_H +#define __SYNFIG_GTKMM_CANVASPROPERTIES_H + +/* === H E A D E R S ======================================================= */ + +#include + +#include +#include +#include +#include +#include + +#include "renddesc.h" + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace Gtk { class TreeView; }; +namespace synfigapp { class CanvasInterface; }; + +namespace studio +{ +class CanvasProperties : public Gtk::Dialog +{ + Gtk::Tooltips tooltips; + + etl::handle canvas_interface_; + Widget_RendDesc widget_rend_desc; + Gtk::Entry entry_id; + Gtk::Entry entry_name; + Gtk::Entry entry_description; + + bool dirty_rend_desc; + + Gtk::TreeView* meta_data_tree_view; + void on_button_meta_data_add(); + void on_button_meta_data_delete(); + +public: + CanvasProperties(Gtk::Window& parent,etl::handle canvas_interface); + ~CanvasProperties(); + + void refresh(); + void update_title(); +private: + void on_rend_desc_changed(); + + Gtk::Widget& create_meta_data_view(); + + void on_ok_pressed(); + void on_apply_pressed(); + void on_cancel_pressed(); +}; // END of class CanvasProperties + +}; // END of namespace studio + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-studio/src/gtkmm/canvastreestore.cpp b/synfig-studio/src/gtkmm/canvastreestore.cpp new file mode 100644 index 0000000..f49d7a3 --- /dev/null +++ b/synfig-studio/src/gtkmm/canvastreestore.cpp @@ -0,0 +1,622 @@ +/* === S Y N F I G ========================================================= */ +/*! \file canvastreestore.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "canvastreestore.h" +#include +#include "iconcontroller.h" +#include +#include +#include +#include +#include "cellrenderer_value.h" +#include "cellrenderer_timetrack.h" +#include + +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; +using namespace studio; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +static CanvasTreeStore::Model& ModelHack() +{ + static CanvasTreeStore::Model* model(0); + if(!model)model=new CanvasTreeStore::Model; + return *model; +} + +CanvasTreeStore::CanvasTreeStore(etl::loose_handle canvas_interface_): + Gtk::TreeStore(ModelHack()), + canvas_interface_ (canvas_interface_) +{ +} + +CanvasTreeStore::~CanvasTreeStore() +{ +} + +void +CanvasTreeStore::get_value_vfunc(const Gtk::TreeModel::iterator& iter, int column, Glib::ValueBase& value)const +{ + if(column==model.value.index()) + { + synfigapp::ValueDesc value_desc((*iter)[model.value_desc]); + + Glib::Value x; + g_value_init(x.gobj(),x.value_type()); + + if(!value_desc) + { + x.set(ValueBase()); + } + else + if(value_desc.is_const()) + x.set(value_desc.get_value()); + else + if(value_desc.is_value_node()) + x.set((*value_desc.get_value_node())(canvas_interface()->get_time())); + else + { + synfig::error(__FILE__":%d: Unable to figure out value",__LINE__); + return; + } + + g_value_init(value.gobj(),x.value_type()); + g_value_copy(x.gobj(),value.gobj()); + } + else + if(column==model.is_value_node.index()) + { + synfigapp::ValueDesc value_desc((*iter)[model.value_desc]); + + Glib::Value x; + g_value_init(x.gobj(),x.value_type()); + + x.set(value_desc && value_desc.is_value_node()); + + g_value_init(value.gobj(),x.value_type()); + g_value_copy(x.gobj(),value.gobj()); + } + else + if(column==model.is_shared.index()) + { + synfigapp::ValueDesc value_desc((*iter)[model.value_desc]); + + Glib::Value x; + g_value_init(x.gobj(),x.value_type()); + + x.set(value_desc.is_value_node() && value_desc.get_value_node()->rcount()>1); + + g_value_init(value.gobj(),x.value_type()); + g_value_copy(x.gobj(),value.gobj()); + } + else + if(column==model.is_exported.index()) + { + synfigapp::ValueDesc value_desc((*iter)[model.value_desc]); + + Glib::Value x; + g_value_init(x.gobj(),x.value_type()); + + x.set(value_desc.is_value_node() && value_desc.get_value_node()->is_exported()); + + g_value_init(value.gobj(),x.value_type()); + g_value_copy(x.gobj(),value.gobj()); + } + else + if(column==model.is_canvas.index()) + { + synfigapp::ValueDesc value_desc((*iter)[model.value_desc]); + + Glib::Value x; + g_value_init(x.gobj(),x.value_type()); + + x.set(!value_desc && (Canvas::Handle)(*iter)[model.canvas]); + + g_value_init(value.gobj(),x.value_type()); + g_value_copy(x.gobj(),value.gobj()); + } + else + if(column==model.id.index()) + { + synfigapp::ValueDesc value_desc((*iter)[model.value_desc]); + + Glib::Value x; + g_value_init(x.gobj(),x.value_type()); + + if(value_desc && value_desc.is_value_node()) + x.set(value_desc.get_value_node()->get_id()); + else if(!value_desc && Canvas::Handle((*iter)[model.canvas])) + x.set(Canvas::Handle((*iter)[model.canvas])->get_id()); + else + return Gtk::TreeStore::get_value_vfunc(iter,column,value); + + g_value_init(value.gobj(),x.value_type()); + g_value_copy(x.gobj(),value.gobj()); + } + else + if(column==model.is_editable.index()) + { + synfigapp::ValueDesc value_desc((*iter)[model.value_desc]); + + Glib::Value x; + g_value_init(x.gobj(),x.value_type()); + + x.set(!value_desc.is_value_node() || synfigapp::is_editable(value_desc.get_value_node())); + + g_value_init(value.gobj(),x.value_type()); + g_value_copy(x.gobj(),value.gobj()); + } + else + if(column==model.type.index()) + { + synfigapp::ValueDesc value_desc((*iter)[model.value_desc]); + + Glib::Value x; + g_value_init(x.gobj(),x.value_type()); + + // Set the type + if(!value_desc) + { + if((*iter)[model.is_canvas]) + x.set(_("Canvas")); + } + else + { + if(!value_desc.is_value_node() || value_desc.get_value_node()->get_name()=="constant") + { + x.set(ValueBase::type_local_name(value_desc.get_value_type())); + } + else + { + x.set(value_desc.get_value_node()->get_local_name()); + } + } + + g_value_init(value.gobj(),x.value_type()); + g_value_copy(x.gobj(),value.gobj()); + } + else + if(column==model.label.index()) + { + synfigapp::ValueDesc value_desc((*iter)[model.value_desc]); + + Glib::Value x; + g_value_init(x.gobj(),x.value_type()); + + // Set the type + if(!value_desc) + { + Canvas::Handle canvas((*iter)[model.canvas]); + if(canvas) + { + if(!canvas->get_id().empty()) + x.set(canvas->get_id()); + else + if(!canvas->get_name().empty()) + x.set(canvas->get_name()); + else + x.set(_("[Unnamed]")); + x.set(_("Canvas")); + } + return Gtk::TreeStore::get_value_vfunc(iter,column,value); + } + else + { + ValueNode::Handle value_node=value_desc.get_value_node(); + + // Setup the row's label + if(value_node->get_id().empty()) + x.set(Glib::ustring((*iter)[model.name])); + else if(Glib::ustring((*iter)[model.name]).empty()) + x.set(value_node->get_id()); + else + x.set(Glib::ustring((*iter)[model.name])+" ("+value_node->get_id()+')'); + } + + g_value_init(value.gobj(),x.value_type()); + g_value_copy(x.gobj(),value.gobj()); + } + else + if(column==model.icon.index()) + { + synfigapp::ValueDesc value_desc((*iter)[model.value_desc]); + if(!value_desc) + return Gtk::TreeStore::get_value_vfunc(iter,column,value); + + Glib::Value > x; + g_value_init(x.gobj(),x.value_type()); + + x.set(get_tree_pixbuf(value_desc.get_value_type())); + + g_value_init(value.gobj(),x.value_type()); + g_value_copy(x.gobj(),value.gobj()); + } + else + Gtk::TreeStore::get_value_vfunc(iter,column,value); +} + +bool +CanvasTreeStore::find_first_value_desc(const synfigapp::ValueDesc& value_desc, Gtk::TreeIter& iter) +{ + iter=children().begin(); + while(iter && value_desc!=(*iter)[model.value_desc]) + { + if(!iter->children().empty()) + { + Gtk::TreeIter iter2(iter->children().begin()); + //! \todo confirm that the && should be done before the || + if((iter2 && value_desc==(*iter2)[model.value_desc]) || find_next_value_desc(value_desc, iter2)) + { + iter=iter2; + return true; + } + } + Gtk::TreeIter iter2(++iter); + if(!iter2) + iter==iter->parent(); + else + iter=iter2; + } + return (bool)iter && value_desc==(*iter)[model.value_desc]; +} + +bool +CanvasTreeStore::find_next_value_desc(const synfigapp::ValueDesc& value_desc, Gtk::TreeIter& iter) +{ + if(!iter) return find_first_value_desc(value_desc,iter); + + if(iter) do { + if(!iter->children().empty()) + { + Gtk::TreeIter iter2(iter->children().begin()); + //! \todo confirm that the && should be done before the || + if((iter2 && value_desc==(*iter2)[model.value_desc]) || find_next_value_desc(value_desc, iter2)) + { + iter=iter2; + return true; + } + } + Gtk::TreeIter iter2(++iter); + if(!iter2) + { + iter==iter->parent(); + if(iter)++iter; + } + else + iter=iter2; + } while(iter && value_desc!=(*iter)[model.value_desc]); + return (bool)iter && value_desc==(*iter)[model.value_desc]; +} + +bool +CanvasTreeStore::find_first_value_node(const synfig::ValueNode::Handle& value_node, Gtk::TreeIter& iter) +{ + iter=children().begin(); + while(iter && value_node!=(ValueNode::Handle)(*iter)[model.value_node]) + { + if(!iter->children().empty()) + { + Gtk::TreeIter iter2(iter->children().begin()); + //! \todo confirm that the && should be done before the || + if((iter2 && value_node==(ValueNode::Handle)(*iter2)[model.value_node]) || find_next_value_node(value_node, iter2)) + { + iter=iter2; + return true; + } + } + Gtk::TreeIter iter2(++iter); + if(!iter2) + iter==iter->parent(); + else + iter=iter2; + } + return (bool)iter && value_node==(ValueNode::Handle)(*iter)[model.value_node]; +} + +bool +CanvasTreeStore::find_next_value_node(const synfig::ValueNode::Handle& value_node, Gtk::TreeIter& iter) +{ + if(!iter) return find_first_value_node(value_node,iter); + + if(iter) do { + if(!iter->children().empty()) + { + Gtk::TreeIter iter2(iter->children().begin()); + //! \todo confirm that the && should be done before the || + if((iter2 && value_node==(ValueNode::Handle)(*iter2)[model.value_node]) || find_next_value_node(value_node, iter2)) + { + iter=iter2; + return true; + } + } + Gtk::TreeIter iter2(++iter); + if(!iter2) + { + iter==iter->parent(); + if(iter)++iter; + } + else + iter=iter2; + } while(iter && value_node!=(ValueNode::Handle)(*iter)[model.value_node]); + return (bool)iter && value_node==(ValueNode::Handle)(*iter)[model.value_node]; +} + +void +CanvasTreeStore::set_row(Gtk::TreeRow row,synfigapp::ValueDesc value_desc, bool do_children) +{ + Gtk::TreeModel::Children children = row.children(); + while(!children.empty() && erase(children.begin())) + ; + + row[model.value_desc]=value_desc; + try + { + //row[model.icon] = get_tree_pixbuf(value_desc.get_value_type()); + + if(value_desc.is_value_node()) + { + ValueNode::Handle value_node=value_desc.get_value_node(); + + assert(value_node); + + row[model.value_node] = value_node; + //row[model.is_canvas] = false; + //row[model.is_value_node] = true; + //row[model.is_editable] = synfigapp::is_editable(value_node); + //row[model.id]=value_node->get_id(); + + // Set the canvas + if(value_desc.parent_is_canvas()) + row[model.canvas]=value_desc.get_canvas(); + else + row[model.canvas]=canvas_interface()->get_canvas(); + + LinkableValueNode::Handle linkable; + linkable=LinkableValueNode::Handle::cast_dynamic(value_node); + + if(linkable && do_children) + { + row[model.link_count] = linkable->link_count(); + for(int i=0;ilink_count();i++) + { + Gtk::TreeRow child_row=*(append(row.children())); + child_row[model.link_id] = i; + child_row[model.canvas] = static_cast(row[model.canvas]); + child_row[model.name] = linkable->link_local_name(i); + set_row(child_row,synfigapp::ValueDesc(linkable,i)); + } + } + return; + } + else + { + //row[model.is_value_node] = false; + //row[model.is_editable] = true; + //row[model.label] = Glib::ustring(row[model.name]); + return; + } + } + catch(synfig::Exception::IDNotFound x) + { + synfig::error(__FILE__":%d: IDNotFound thrown",__LINE__); + erase(row); + return; + } + + // We should never get to this point + assert(0); +} + +void +CanvasTreeStore::refresh_row(Gtk::TreeModel::Row &row, bool do_children) +{ + synfigapp::ValueDesc value_desc=row[model.value_desc]; + + if(value_desc) + { + if((bool)row[model.is_value_node] != value_desc.is_value_node() || + (!bool(row[model.is_value_node]) && row[model.link_count]!=0)) + { + set_row(row,value_desc,do_children); + return; + } + + if(row[model.is_value_node]) + { + ValueNode::Handle value_node(value_desc.get_value_node()); + + if(ValueNode::Handle(row[model.value_node])!=value_node) + { + rebuild_row(row,do_children); + return; + } + + //row[model.id]=value_node->get_id(); + + // Setup the row's label + /* + if(value_node->get_id().empty()) + row[model.label] = Glib::ustring(row[model.name]); + else if(Glib::ustring(row[model.name]).empty()) + row[model.label] = value_node->get_id(); + else + row[model.label] = Glib::ustring(row[model.name])+" ("+value_node->get_id()+')'; + */ + + LinkableValueNode::Handle linkable; + linkable=LinkableValueNode::Handle::cast_dynamic(value_node); + if(do_children && linkable && ((int)row[model.link_count] != linkable->link_count())) + { + // Gtk::TreeModel::Children children = row.children(); + // while(!children.empty() && erase(children.begin())); + + set_row(row,value_desc); + return; + } + } + else + { + //row[model.label] = Glib::ustring(row[model.name]); + //row[model.is_value_node] = false; + //row[model.is_editable] = true; + } + } + if(!do_children) + return; + + Gtk::TreeModel::Children children = row.children(); + Gtk::TreeModel::Children::iterator iter; + + if(!children.empty()) + for(iter = children.begin(); iter != children.end(); ++iter) + { + Gtk::TreeRow row=*iter; + refresh_row(row); + } +} + +void +CanvasTreeStore::rebuild_row(Gtk::TreeModel::Row &row, bool do_children) +{ + synfigapp::ValueDesc value_desc=(synfigapp::ValueDesc)row[model.value_desc]; + + if(value_desc && value_desc.get_value_node()) + { + ValueNode::Handle value_node; + value_node=value_desc.get_value_node(); + + assert(value_node);if(!value_node)return; + + if(value_node && value_node!=(ValueNode::Handle)row[model.value_node]) + { +// Gtk::TreeModel::Children children = row.children(); +// while(!children.empty() && erase(children.begin())); + + set_row(row,value_desc,do_children); + return; + } + + LinkableValueNode::Handle linkable; + linkable=LinkableValueNode::Handle::cast_dynamic(value_node); + + if( do_children && linkable && (int)row[model.link_count] != linkable->link_count()) + { +// Gtk::TreeModel::Children children = row.children(); +// while(!children.empty() && erase(children.begin())); + + set_row(row,value_desc); + return; + } + + //if(!value_node) + // value_node=row[model.value_node]; + + row[model.id]=value_node->get_id(); + + // Setup the row's label + if(value_node->get_id().empty()) + row[model.label] = Glib::ustring(row[model.name]); + else if(Glib::ustring(row[model.name]).empty()) + row[model.label] = value_node->get_id(); + else + row[model.label] = Glib::ustring(row[model.name])+" ("+value_node->get_id()+')'; + } + else + { + row[model.label] = Glib::ustring(row[model.name]); + row[model.is_value_node] = false; + row[model.is_editable] = true; + Gtk::TreeModel::Children children = row.children(); + while(!children.empty() && erase(children.begin())) + ; + } + if(!do_children) + return; + + Gtk::TreeModel::Children children = row.children(); + Gtk::TreeModel::Children::iterator iter; + if(!children.empty()) + for(iter = children.begin(); iter != children.end(); ++iter) + { + Gtk::TreeRow row=*iter; + rebuild_row(row); + } +} + +CellRenderer_ValueBase* +CanvasTreeStore::add_cell_renderer_value(Gtk::TreeView::Column* column) +{ + const CanvasTreeStore::Model model; + + CellRenderer_ValueBase* ret; + + ret=Gtk::manage( new CellRenderer_ValueBase() ); + + column->pack_start(*ret,true); + column->add_attribute(ret->property_value(), model.value); + column->add_attribute(ret->property_editable(), model.is_editable); + column->add_attribute(ret->property_canvas(), model.canvas); + + return ret; +} + +CellRenderer_TimeTrack* +CanvasTreeStore::add_cell_renderer_value_node(Gtk::TreeView::Column* column) +{ + const CanvasTreeStore::Model model; + + CellRenderer_TimeTrack* ret; + + ret = Gtk::manage( new CellRenderer_TimeTrack() ); + + column->pack_start(*ret,true); + //column->add_attribute(ret->property_visible(), model.is_value_node); + column->add_attribute(ret->property_value_desc(), model.value_desc); + column->add_attribute(ret->property_canvas(), model.canvas); + + + return ret; +} diff --git a/synfig-studio/src/gtkmm/canvastreestore.h b/synfig-studio/src/gtkmm/canvastreestore.h new file mode 100644 index 0000000..faed8b6 --- /dev/null +++ b/synfig-studio/src/gtkmm/canvastreestore.h @@ -0,0 +1,195 @@ +/* === S Y N F I G ========================================================= */ +/*! \file canvastreestore.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_STUDIO_CANVASTREESTORE_H +#define __SYNFIG_STUDIO_CANVASTREESTORE_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace studio { + +class CellRenderer_TimeTrack; +class CellRenderer_ValueBase; + + enum ColumnID + { + COLUMNID_ID, + COLUMNID_VALUE, + COLUMNID_TIME_TRACK, + COLUMNID_TYPE, + + COLUMNID_END //!< \internal + }; +#define COLUMNID_NAME COLUMNID_ID + +class CanvasTreeStore : virtual public Gtk::TreeStore +{ + /* + -- ** -- P U B L I C T Y P E S --------------------------------------------- + */ + +public: + + class Model : public Gtk::TreeModel::ColumnRecord + { + public: + Gtk::TreeModelColumn > icon; + Gtk::TreeModelColumn label; + Gtk::TreeModelColumn name; + Gtk::TreeModelColumn id; + + Gtk::TreeModelColumn canvas; + Gtk::TreeModelColumn is_canvas; + + Gtk::TreeModelColumn value_node; + Gtk::TreeModelColumn is_value_node; + Gtk::TreeModelColumn value; + Gtk::TreeModelColumn type; + Gtk::TreeModelColumn link_id; + Gtk::TreeModelColumn link_count; + + Gtk::TreeModelColumn is_editable; + + Gtk::TreeModelColumn is_shared; + Gtk::TreeModelColumn is_exported; + + Gtk::TreeModelColumn value_desc; + + Gtk::TreeModelColumn tooltip; + + Model() + { + add(value); + add(name); + add(label); + add(icon); + add(type); + add(id); + add(canvas); + add(value_node); + add(is_canvas); + add(is_value_node); + + add(is_shared); + add(is_exported); + add(is_editable); + add(value_desc); + add(link_count); + add(link_id); + + add(tooltip); + } + }; + + /* + -- ** -- P U B L I C D A T A ------------------------------------------------ + */ + +public: + + const Model model; + + //std::multimap, sigc::connection> connection_map; + + /* + -- ** -- P R I V A T E D A T A --------------------------------------------- + */ + +private: + + etl::loose_handle canvas_interface_; + + /* + -- ** -- P R I V A T E M E T H O D S --------------------------------------- + */ + +private: + +protected: + virtual void get_value_vfunc (const Gtk::TreeModel::iterator& iter, int column, Glib::ValueBase& value)const; + + /* + -- ** -- S I G N A L T E R M I N A L S ------------------------------------- + */ + +private: + + /* + -- ** -- P U B L I C M E T H O D S ----------------------------------------- + */ + +public: + + CanvasTreeStore(etl::loose_handle canvas_interface_); + ~CanvasTreeStore(); + + etl::loose_handle canvas_interface() { return canvas_interface_; } + etl::loose_handle canvas_interface()const { return canvas_interface_; } + + virtual void rebuild_row(Gtk::TreeModel::Row &row, bool do_children=true); + + virtual void refresh_row(Gtk::TreeModel::Row &row, bool do_children=true); + + virtual void set_row(Gtk::TreeRow row,synfigapp::ValueDesc value_desc, bool do_children=true); + + bool find_first_value_desc(const synfigapp::ValueDesc& value_desc, Gtk::TreeIter& iter); + bool find_next_value_desc(const synfigapp::ValueDesc& value_desc, Gtk::TreeIter& iter); + + bool find_first_value_node(const synfig::ValueNode::Handle& value_node, Gtk::TreeIter& iter); + bool find_next_value_node(const synfig::ValueNode::Handle& value_node, Gtk::TreeIter& iter); + + + static CellRenderer_ValueBase* add_cell_renderer_value(Gtk::TreeView::Column* column); + + static CellRenderer_TimeTrack* add_cell_renderer_value_node(Gtk::TreeView::Column* column); + + etl::loose_handle get_canvas_interface()const { return canvas_interface_; } + + virtual void on_value_node_changed(synfig::ValueNode::Handle value_node)=0; + + /* + -- ** -- P R O T E C T E D M E T H O D S ----------------------------------- + */ + +public: + +}; // END of class CanvasTreeStore + +}; // END of namespace studio + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-studio/src/gtkmm/canvasview.cpp b/synfig-studio/src/gtkmm/canvasview.cpp new file mode 100644 index 0000000..7ffc505 --- /dev/null +++ b/synfig-studio/src/gtkmm/canvasview.cpp @@ -0,0 +1,4273 @@ +/* === S Y N F I G ========================================================= */ +/*! \file canvasview.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** Copyright (c) 2009 Carlos López +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +//#include +//#include + +#include +#include +//#include + +#include "canvasview.h" +#include "instance.h" +#include "app.h" +#include "cellrenderer_value.h" +#include "cellrenderer_timetrack.h" +#include "workarea.h" +#include "dialog_color.h" +#include "eventkey.h" + +#include "state_polygon.h" +#include "state_bline.h" +#include "state_normal.h" +#include "state_eyedrop.h" +#include "state_draw.h" + +#include "ducktransform_scale.h" +#include "ducktransform_translate.h" +#include "ducktransform_rotate.h" + +#include "event_mouse.h" +#include "event_layerclick.h" + +#include "toolbox.h" + +#include "dialog_preview.h" +#include "dialog_soundselect.h" + +#include "preview.h" +#include "audiocontainer.h" +#include "widget_timeslider.h" +#include "keyframedial.h" + +#include +#include + +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; +using namespace studio; +using namespace sigc; + +/* === M A C R O S ========================================================= */ + +#define GRAB_HINT_DATA(y) { \ + String x; \ + if(synfigapp::Main::settings().get_value(String("pref.")+y+"_hints",x)) \ + { \ + set_type_hint((Gdk::WindowTypeHint)atoi(x.c_str())); \ + } \ + } + +#define DEFAULT_TIME_WINDOW_SIZE (10.0) + +#ifndef SMALL_BUTTON +#define SMALL_BUTTON(button,stockid,tooltip) \ + button = manage(new class Gtk::Button()); \ + icon=manage(new Gtk::Image(Gtk::StockID(stockid),iconsize)); \ + button->add(*icon); \ + tooltips.set_tip(*button,tooltip); \ + icon->set_padding(0,0);\ + icon->show(); \ + button->set_relief(Gtk::RELIEF_NONE); \ + button->show() +#endif + +#ifndef NORMAL_BUTTON +#define NORMAL_BUTTON(button,stockid,tooltip) \ + button = manage(new class Gtk::Button()); \ + icon=manage(new Gtk::Image(Gtk::StockID(stockid),Gtk::ICON_SIZE_BUTTON)); \ + button->add(*icon); \ + tooltips.set_tip(*button,tooltip); \ + icon->set_padding(0,0);\ + icon->show(); \ + /*button->set_relief(Gtk::RELIEF_NONE);*/ \ + button->show() +#endif + +#define NEW_SMALL_BUTTON(x,y,z) Gtk::Button *SMALL_BUTTON(x,y,z) + +#define NOT_IMPLEMENTED_SLOT sigc::mem_fun(*reinterpret_cast(get_ui_interface().get()),&studio::CanvasViewUIInterface::not_implemented) + +#define SLOT_EVENT(x) sigc::hide_return(sigc::bind(sigc::mem_fun(*this,&studio::CanvasView::process_event_key),x)) + +/* === C L A S S E S ======================================================= */ + +class studio::UniversalScrubber +{ + CanvasView *canvas_view; + + bool scrubbing; + etl::clock scrub_timer; + + sigc::connection end_scrub_connection; +public: + UniversalScrubber(CanvasView *canvas_view): + canvas_view(canvas_view), + scrubbing(false) + { + canvas_view->canvas_interface()->signal_time_changed().connect( + sigc::mem_fun(*this,&studio::UniversalScrubber::on_time_changed) + ); + } + + ~UniversalScrubber() + { + end_scrub_connection.disconnect(); + } + + void on_time_changed() + { + // Make sure we are changing the time quickly + // before we enable scrubbing + if(!scrubbing && scrub_timer()>1) + { + scrub_timer.reset(); + return; + } + + // If we aren't scrubbing already, enable it + if(!scrubbing) + { + scrubbing=true; + audio_container()->start_scrubbing(canvas_view->get_time()); + } + + // Reset the scrubber ender + end_scrub_connection.disconnect(); + end_scrub_connection=Glib::signal_timeout().connect( + sigc::bind_return( + sigc::mem_fun(*this,&UniversalScrubber::end_of_scrubbing), + false + ), + 1000 + ); + + // Scrub! + audio_container()->scrub(canvas_view->get_time()); + + scrub_timer.reset(); + } + + void end_of_scrubbing() + { + scrubbing=false; + audio_container()->stop_scrubbing(); + scrub_timer.reset(); + } + + handle audio_container() + { + assert(canvas_view->audio); + return canvas_view->audio; + } +}; + +class studio::CanvasViewUIInterface : public synfigapp::UIInterface +{ + CanvasView *view; + +public: + + CanvasViewUIInterface(CanvasView *view): + view(view) + { + view->statusbar->push(_("Idle")); + } + + ~CanvasViewUIInterface() + { + //view->statusbar->pop(); + //view->progressbar->set_fraction(0); + } + + virtual Response confirmation(const std::string &title, + const std::string &primaryText, + const std::string &secondaryText, + const std::string &confirmPhrase, + const std::string &cancelPhrase, + Response defaultResponse=RESPONSE_OK) + { + view->present(); + //while(studio::App::events_pending())studio::App::iteration(false); + Gtk::MessageDialog dialog( + *view, // Parent + primaryText, // Message + false, // Markup + Gtk::MESSAGE_WARNING, // Type + Gtk::BUTTONS_NONE, // Buttons + true // Modal + ); + + if (! title.empty()) + dialog.set_title(title); + if (! secondaryText.empty()) + dialog.set_secondary_text(secondaryText); + + dialog.add_button(cancelPhrase, RESPONSE_CANCEL); + dialog.add_button(confirmPhrase, RESPONSE_OK); + dialog.set_default_response(defaultResponse); + + dialog.show_all(); + return (Response) dialog.run(); + } + + virtual Response yes_no(const std::string &title, const std::string &message,Response dflt=RESPONSE_YES) + { + view->present(); + //while(studio::App::events_pending())studio::App::iteration(false); + Gtk::Dialog dialog( + title, // Title + *view, // Parent + true, // Modal + true // use_separator + ); + Gtk::Label label(message); + label.show(); + + dialog.get_vbox()->pack_start(label); + dialog.add_button(Gtk::StockID("gtk-yes"),RESPONSE_YES); + dialog.add_button(Gtk::StockID("gtk-no"),RESPONSE_NO); + + dialog.set_default_response(dflt); + dialog.show(); + return (Response)dialog.run(); + } + virtual Response yes_no_cancel(const std::string &title, const std::string &message,Response dflt=RESPONSE_YES) + { + view->present(); + //while(studio::App::events_pending())studio::App::iteration(false); + Gtk::Dialog dialog( + title, // Title + *view, // Parent + true, // Modal + true // use_separator + ); + Gtk::Label label(message); + label.show(); + + dialog.get_vbox()->pack_start(label); + dialog.add_button(Gtk::StockID("gtk-yes"),RESPONSE_YES); + dialog.add_button(Gtk::StockID("gtk-no"),RESPONSE_NO); + dialog.add_button(Gtk::StockID("gtk-cancel"),RESPONSE_CANCEL); + + dialog.set_default_response(dflt); + dialog.show(); + return (Response)dialog.run(); + } + virtual Response ok_cancel(const std::string &title, const std::string &message,Response dflt=RESPONSE_OK) + { + view->present(); + //while(studio::App::events_pending())studio::App::iteration(false); + Gtk::Dialog dialog( + title, // Title + *view, // Parent + true, // Modal + true // use_separator + ); + Gtk::Label label(message); + label.show(); + + dialog.get_vbox()->pack_start(label); + dialog.add_button(Gtk::StockID("gtk-ok"),RESPONSE_OK); + dialog.add_button(Gtk::StockID("gtk-cancel"),RESPONSE_CANCEL); + + dialog.set_default_response(dflt); + dialog.show(); + return (Response)dialog.run(); + } + + virtual bool + task(const std::string &task) + { + if(!view->is_playing_) + { + view->statusbar->pop(); + view->statusbar->push(task); + } + //while(studio::App::events_pending())studio::App::iteration(false); + if(view->cancel){return false;} + return true; + } + + virtual bool + error(const std::string &err) + { + view->statusbar->push(_("ERROR")); + + // If we are in the process of canceling, + // then just go ahead and return false -- + // don't bother displaying a dialog + if(view->cancel)return false; + Gtk::MessageDialog dialog(*view, err, false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_CLOSE, true); + dialog.show(); + dialog.run(); + view->statusbar->pop(); + return true; + } + + virtual bool + warning(const std::string &err) + { + view->statusbar->pop(); + view->statusbar->push(err); + + //while(studio::App::events_pending())studio::App::iteration(false); + if(view->cancel)return false; + return true; + } + + virtual bool + amount_complete(int current, int total) + { + if(!view->is_playing_) + { + if(!view->working_depth) + { + if(current) + view->stopbutton->set_sensitive(true); + else + view->stopbutton->set_sensitive(false); + } + float x((float)current/(float)total); + if(x<0)x=0; + else if(x>1)x=1; + view->progressbar->set_fraction(x); + } + //while(studio::App::events_pending())studio::App::iteration(false); + if(view->cancel){/*view->cancel=false;*/return false;} + return true; + } + + void + not_implemented() + { + error(_("Feature not yet implemented")); + } +}; + +class studio::CanvasViewSelectionManager : public synfigapp::SelectionManager +{ + CanvasView *view; + CanvasView::LayerTreeModel layer_tree_model; + CanvasView::ChildrenTreeModel children_tree_model; + +public: + CanvasViewSelectionManager(CanvasView *view): view(view) { } + +private: + void _set_selected_layer(const synfig::Layer::Handle &layer) + { + view->layer_tree->select_layer(layer); +/* + // Don't change the selection while we are busy + // I cannot remember exactly why I put this here... + // It musta been for some reason, but I cannot recall. + //if(App::Busy::count) + // return; + + if(view->layer_tree->get_selection()->get_selected()) + { + const Gtk::TreeRow row = *(view->layer_tree->get_selection()->get_selected()); + + // Don't do anything if that layer is already selected + if(layer == static_cast(row[layer_tree_model.layer])) + return; + } + Gtk::TreeModel::Children::iterator iter; + if(view->layer_tree_store()->find_layer_row(layer,iter)) + { + Gtk::TreePath path(iter); + for(int i=path.get_depth();i;i--) + { + int j; + path=Gtk::TreePath(iter); + for(j=i;j;j--) + path.up(); + view->layer_tree->get_tree_view().expand_row(path,false); + } + view->layer_tree->get_tree_view().scroll_to_row(Gtk::TreePath(iter)); + view->layer_tree->get_selection()->select(iter); + } +*/ + } +public: + + //! Returns the number of layers selected. + virtual int get_selected_layer_count()const + { + return get_selected_layers().size(); + } + + //! Returns a list of the currently selected layers. + virtual LayerList get_selected_layers()const + { +// assert(view->layer_tree); + + if(!view->layer_tree) { synfig::error("%s:%d canvas_view.layer_tree not defined!?", __FILE__, __LINE__); return LayerList(); } + return view->layer_tree->get_selected_layers(); + } + + //! Returns the first layer selected or an empty handle if none are selected. + virtual synfig::Layer::Handle get_selected_layer()const + { +// assert(view->layer_tree); + + if(!view->layer_tree) { synfig::error("%s:%d canvas_view.layer_tree not defined!?", __FILE__, __LINE__); return 0; } + return view->layer_tree->get_selected_layer(); + } + + //! Sets which layers should be selected + virtual void set_selected_layers(const LayerList &layer_list) + { +// assert(view->layer_tree); + + if(!view->layer_tree) { synfig::error("%s:%d canvas_view.layer_tree not defined!?", __FILE__, __LINE__); return; } + view->layer_tree->select_layers(layer_list); + //view->get_smach().process_event(EVENT_REFRESH_DUCKS); + + //view->queue_rebuild_ducks(); + } + + //! Sets which layer should be selected. + virtual void set_selected_layer(const synfig::Layer::Handle &layer) + { +// assert(view->layer_tree); + + if(!view->layer_tree) { synfig::error("canvas_view.layer_tree not defined!?"); return; } + view->layer_tree->select_layer(layer); + //view->queue_rebuild_ducks(); + } + + //! Clears the layer selection list + virtual void clear_selected_layers() + { + if(!view->layer_tree) return; + view->layer_tree->clear_selected_layers(); + } + + //! Returns the number of value_nodes selected. + virtual int get_selected_children_count()const + { + return get_selected_children().size(); + } + + static inline void __child_grabber(const Gtk::TreeModel::iterator& iter, ChildrenList* ret) + { + const CanvasView::ChildrenTreeModel children_tree_model; + synfigapp::ValueDesc value_desc((*iter)[children_tree_model.value_desc]); + if(value_desc) + ret->push_back(value_desc); + } + + //! Returns a list of the currently selected value_nodes. + virtual ChildrenList get_selected_children()const + { + if(!view->children_tree) return ChildrenList(); + + Glib::RefPtr selection=view->children_tree->get_selection(); + + if(!selection) + return ChildrenList(); + + ChildrenList ret; + + selection->selected_foreach_iter( + sigc::bind( + sigc::ptr_fun( + &studio::CanvasViewSelectionManager::__child_grabber + ), + &ret + ) + ); + + /* + Gtk::TreeModel::Children::iterator iter(view->children_tree_store()->children().begin()); + iter++; + Gtk::TreeModel::Children children = iter->children(); + for(iter = children.begin(); iter != children.end(); ++iter) + { + Gtk::TreeModel::Row row = *iter; + if(selection->is_selected(row)) + ret.push_back((synfigapp::ValueDesc)row[children_tree_model.value_desc]); + } + */ + return ret; + } + + //! Returns the first value_node selected or an empty handle if none are selected. + virtual ChildrenList::value_type get_selected_child()const + { + if(!view->children_tree) return ChildrenList::value_type(); + + ChildrenList children(get_selected_children()); + + if(children.empty()) + return ChildrenList::value_type(); + + return children.front(); + } + + //! Sets which value_nodes should be selected + virtual void set_selected_children(const ChildrenList &/*children_list*/) + { + return; + } + + //! Sets which value_node should be selected. Empty handle if none. + virtual void set_selected_child(const ChildrenList::value_type &/*child*/) + { + return; + } + + //! Clears the value_node selection list + virtual void clear_selected_children() + { + return; + } + + int get_selected_layer_parameter_count()const + { + return get_selected_layer_parameters().size(); + } + + LayerParamList get_selected_layer_parameters()const + { + if(!view->layer_tree) return LayerParamList(); + + Glib::RefPtr selection=view->layer_tree->get_selection(); + + if(!selection) + return LayerParamList(); + + LayerParamList ret; + + Gtk::TreeModel::Children children = const_cast(view)->layer_tree_store()->children(); + Gtk::TreeModel::Children::iterator iter; + for(iter = children.begin(); iter != children.end(); ++iter) + { + Gtk::TreeModel::Row row = *iter; + Gtk::TreeModel::Children::iterator iter; + for(iter=row.children().begin();iter!=row.children().end();iter++) + { + Gtk::TreeModel::Row row = *iter; + if(selection->is_selected(row)) + ret.push_back(LayerParam(row[layer_tree_model.layer],(Glib::ustring)row[layer_tree_model.id])); + } + } + return ret; + } + + LayerParam get_selected_layer_parameter() const + { + if(!view->layer_tree) return LayerParam(); + return get_selected_layer_parameters().front(); + } + + void set_selected_layer_parameters(const LayerParamList &/*layer_param_list*/) + { + return; + } + + void set_selected_layer_param(const LayerParam &/*layer_param*/) + { + return; + } + + void clear_selected_layer_parameters() + { + return; + } + +}; // END of class SelectionManager + +CanvasView::IsWorking::IsWorking(CanvasView &canvas_view_): + canvas_view_(canvas_view_) +{ + if(!canvas_view_.working_depth) + canvas_view_.stopbutton->set_sensitive(true); + canvas_view_.working_depth++; + canvas_view_.cancel=false; +} + +CanvasView::IsWorking::~IsWorking() +{ + canvas_view_.working_depth--; + if(!canvas_view_.working_depth) + canvas_view_.stopbutton->set_sensitive(false); +} + +CanvasView::IsWorking::operator bool()const +{ + if(canvas_view_.cancel) + return false; + return true; +} + +/* === M E T H O D S ======================================================= */ + +CanvasView::CanvasView(etl::loose_handle instance,etl::handle canvas_interface_): + smach_ (this), + instance_ (instance), + canvas_interface_ (canvas_interface_), + //layer_tree_store_ (LayerTreeStore::create(canvas_interface_)), + //children_tree_store_ (ChildrenTreeStore::create(canvas_interface_)), + //keyframe_tree_store_ (KeyframeTreeStore::create(canvas_interface_)), + time_adjustment_ (0,0,25,0,0,0), + time_window_adjustment_ (0,0,25,0,0,0), + quality_adjustment_ (8,1,10,1,1,0), + future_onion_adjustment_ (0,0,2,1,1,0), + past_onion_adjustment_ (0,0,2,1,1,0), + statusbar (manage(new class Gtk::Statusbar())), + + timeslider (new Widget_Timeslider), + widget_kf_list (new Widget_Keyframe_List), + + ui_interface_ (new CanvasViewUIInterface(this)), + selection_manager_ (new CanvasViewSelectionManager(this)), + is_playing_ (false), + + working_depth (0), + cancel (false), + + canvas_properties (*this,canvas_interface_), + canvas_options (this), + render_settings (*this,canvas_interface_), + waypoint_dialog (*this,canvas_interface_->get_canvas()), + keyframe_dialog (*this,canvas_interface_), + preview_dialog (new Dialog_Preview), + sound_dialog (new Dialog_SoundSelect(*this,canvas_interface_)) +{ + layer_tree=0; + children_tree=0; + duck_refresh_flag=true; + toggling_ducks_=false; + changing_resolution_=false; + updating_quality_=false; + toggling_show_grid=false; + toggling_snap_grid=false; + toggling_onion_skin=false; + + smach_.set_default_state(&state_normal); + + disp_audio = new Widget_Sound(); + + //synfig::info("Canvasview: Entered constructor"); + // Minor hack + get_canvas()->set_time(0); + //layer_tree_store_->rebuild(); + + // Set up the UI and Selection managers + canvas_interface()->set_ui_interface(get_ui_interface()); + canvas_interface()->set_selection_manager(get_selection_manager()); + rebuild_ducks_queued=false; + + //notebook=manage(new class Gtk::Notebook()); + //Gtk::VPaned *vpaned = manage(new class Gtk::VPaned()); + //vpaned->pack1(*create_work_area(), Gtk::EXPAND|Gtk::SHRINK); + //vpaned->pack2(*notebook, Gtk::SHRINK); + //vpaned->show_all(); + + //notebook->show(); + + //notebook->append_page(*create_layer_tree(),_("Layers")); + //notebook->append_page(*create_children_tree(),_("Children")); + //notebook->append_page(*create_keyframe_tree(),_("Keyframes")); + + //synfig::info("Canvasview: Before big chunk of allocation and tabling stuff"); + //create all allocated stuff for this canvas + audio = new AudioContainer(); + + Gtk::Table *layout_table= manage(new class Gtk::Table(1, 4, false)); + //layout_table->attach(*vpaned, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); + layout_table->attach(*create_work_area(), 0, 1, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); + layout_table->attach(*create_display_bar(), 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + init_menus(); + //layout_table->attach(*App::ui_manager()->get_widget("/menu-main"), 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + + layout_table->attach(*create_time_bar(), 0, 1, 3, 4, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + layout_table->attach(*create_status_bar(), 0, 1, 4, 5, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + + update_title(); + + layout_table->show(); + add(*layout_table); + + //set_transient_for(*App::toolbox); + + //synfig::info("Canvasview: Before Signals"); + /* + -- ** -- Signals ------------------------------------------------------------- + */ + + canvas_interface()->signal_dirty_preview().connect(sigc::mem_fun(*this,&studio::CanvasView::on_dirty_preview)); + canvas_interface()->signal_mode_changed().connect(sigc::mem_fun(*this,&studio::CanvasView::on_mode_changed)); + + canvas_interface()->signal_time_changed().connect(sigc::mem_fun(*this,&studio::CanvasView::on_time_changed)); + + //canvas_interface()->signal_time_changed().connect(sigc::mem_fun(*this,&studio::CanvasView::refresh_tables)); + canvas_interface()->signal_id_changed().connect(sigc::mem_fun(*this,&studio::CanvasView::on_id_changed)); + canvas_interface()->signal_rend_desc_changed().connect(sigc::mem_fun(*this,&studio::CanvasView::refresh_rend_desc)); + waypoint_dialog.signal_changed().connect(sigc::mem_fun(*this,&studio::CanvasView::on_waypoint_changed)); + waypoint_dialog.signal_delete().connect(sigc::mem_fun(*this,&studio::CanvasView::on_waypoint_delete)); + + //MODIFIED TIME ADJUSTMENT STUFF.... + time_window_adjustment().set_child_adjustment(&time_adjustment()); + time_window_adjustment().signal_value_changed().connect(sigc::mem_fun(*this,&studio::CanvasView::refresh_time_window)); + time_adjustment().signal_value_changed().connect(sigc::mem_fun(*this,&studio::CanvasView::time_was_changed)); + + work_area->signal_layer_selected().connect(sigc::mem_fun(*this,&studio::CanvasView::workarea_layer_selected)); + work_area->signal_input_device_changed().connect(sigc::mem_fun(*this,&studio::CanvasView::on_input_device_changed)); + + canvas_interface()->signal_canvas_added().connect( + sigc::hide( + sigc::mem_fun(*instance,&studio::Instance::refresh_canvas_tree) + ) + ); + canvas_interface()->signal_canvas_removed().connect( + sigc::hide( + sigc::mem_fun(*instance,&studio::Instance::refresh_canvas_tree) + ) + ); + + canvas_interface()->signal_layer_param_changed().connect( + sigc::hide( + sigc::hide( + SLOT_EVENT(EVENT_REFRESH_DUCKS) + ) + ) + ); + + //MUCH TIME STUFF TAKES PLACE IN HERE + refresh_rend_desc(); + refresh_time_window(); + + /*! \todo We shouldn't need to do this at construction -- + ** This should be performed at the first time the window + ** becomes visible. + */ + work_area->queue_render_preview(); + + // If the canvas is really big, zoom out so that we can fit it all in the window + /*! \todo In other words, this is a zoom-to-fit, and should be + ** in its own function. + */ + int w=get_canvas()->rend_desc().get_w()+70; + int h=get_canvas()->rend_desc().get_h()+70; + while(w>700 || h>600) + { + // Minor hack: + // zoom_out() => + // WorkArea::async_update_preview() => + // WorkArea::set_zoom(float) => + // WorkArea::async_update_preview() => + // desc.set_time(cur_time), where cur_time isn't initialized + work_area->set_time(0); + work_area->zoom_out(); + w=round_to_int(get_canvas()->rend_desc().get_w()*work_area->get_zoom()+70); + h=round_to_int(get_canvas()->rend_desc().get_h()*work_area->get_zoom()+70); + } + if(w>700)w=700; + if(h>600)h=600; + set_default_size(w,h); + property_window_position().set_value(Gtk::WIN_POS_NONE); + + std::list listTargets; + listTargets.push_back( Gtk::TargetEntry("STRING") ); + listTargets.push_back( Gtk::TargetEntry("text/plain") ); + listTargets.push_back( Gtk::TargetEntry("image") ); + + drag_dest_set(listTargets); + signal_drag_data_received().connect( sigc::mem_fun(*this, &studio::CanvasView::on_drop_drag_data_received) ); + + /* + Time length(get_canvas()->rend_desc().get_time_end()-get_canvas()->rend_desc().get_time_start()); + if(length<10.0) + { + time_window_adjustment().set_page_increment(length); + time_window_adjustment().set_page_size(length); + } + else + { + time_window_adjustment().set_page_increment(10.0); + time_window_adjustment().set_page_size(10.0); + } + */ + + //synfig::info("Canvasview: Before Sound Hookup"); + //load sound info from meta data + { + //synfig::warning("Should load Audio: %s with %s offset",apath.c_str(),aoffset.c_str()); + + on_audio_file_notify(); //redundant setting of the metadata, but oh well, it's no big deal :) + on_audio_offset_notify(); + + //signal connection - since they are all associated with the canvas view + + //hook in signals for sound options box + sound_dialog->signal_file_changed().connect(sigc::mem_fun(*this,&CanvasView::on_audio_file_change)); + sound_dialog->signal_offset_changed().connect(sigc::mem_fun(*this,&CanvasView::on_audio_offset_change)); + + //attach to the preview when it's visible + //preview_dialog->get_widget().signal_play().connect(sigc::mem_fun(*this,&CanvasView::play_audio)); + //preview_dialog->get_widget().signal_stop().connect(sigc::mem_fun(*this,&CanvasView::stop_audio)); + + //hook to metadata signals + get_canvas()->signal_meta_data_changed("audiofile").connect(sigc::mem_fun(*this,&CanvasView::on_audio_file_notify)); + get_canvas()->signal_meta_data_changed("audiooffset").connect(sigc::mem_fun(*this,&CanvasView::on_audio_offset_notify)); + + //universal_scrubber=std::auto_ptr(new UniversalScrubber(this)); + } + + //synfig::info("Canvasview: Before Final time set up"); + //MORE TIME STUFF + time_window_adjustment().set_value(get_canvas()->rend_desc().get_time_start()); + time_window_adjustment().value_changed(); + + GRAB_HINT_DATA("canvas_view"); + /* + { + set_skip_taskbar_hint(true); + set_skip_pager_hint(true); + set_type_hint(Gdk::WINDOW_TYPE_HINT_UTILITY); + } + */ + + refresh_rend_desc(); + hide_tables(); + + on_time_changed(); + //synfig::info("Canvasview: Constructor Done"); +} + +CanvasView::~CanvasView() +{ + signal_deleted()(); + + App::ui_manager()->remove_action_group(action_group); + + // Shut down the smach + smach_.egress(); + smach_.set_default_state(0); + + // We want to ensure that the UI_Manager and + // the selection manager get destructed right now. + ui_interface_.reset(); + selection_manager_.reset(); + + // Delete any external widgets + for(;!ext_widget_book_.empty();ext_widget_book_.erase(ext_widget_book_.begin())) + { + if(ext_widget_book_.begin()->second) + delete ext_widget_book_.begin()->second; + } + + //delete preview + audio.reset(); + + hide(); + + // don't be calling on_dirty_preview once this object has been deleted; + // this was causing a crash before + canvas_interface()->signal_dirty_preview().clear(); + + if (getenv("SYNFIG_DEBUG_DESTRUCTORS")) + synfig::info("CanvasView::~CanvasView(): Deleted"); +} + +std::list& +CanvasView::get_pixel_sizes() +{ + // prime factors of 120 are 2, 2, 2, 3, 5 - see TILE_SIZE in synfig-core/trunk/src/synfig/target_tile.h + static int pixel_size_array[] = {2,3,4,5,6,8,10,12,15,20,24,30,40,60,120}; + static list pixel_sizes = list(pixel_size_array, pixel_size_array + sizeof(pixel_size_array) / sizeof(int)); + + return pixel_sizes; +} + +Gtk::Widget * +CanvasView::create_time_bar() +{ + Gtk::Image *icon; + + //Setup the Time Slider and the Time window scroll + Gtk::HScrollbar *time_window_scroll = manage(new class Gtk::HScrollbar(time_window_adjustment())); + //Gtk::HScrollbar *time_scroll = manage(new class Gtk::HScrollbar(time_adjustment())); + //TIME BAR TEMPORARY POSITION + //Widget_Timeslider *time_scroll = manage(new Widget_Timeslider); + timeslider->set_time_adjustment(&time_adjustment()); + timeslider->set_bounds_adjustment(&time_window_adjustment()); + //layout_table->attach(*timeslider, 0, 1, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL); + //Setup the keyframe list widget + widget_kf_list->set_time_adjustment(&time_adjustment()); + widget_kf_list->set_canvas_interface(canvas_interface()); + widget_kf_list->show(); + + tooltips.set_tip(*time_window_scroll,_("Moves the time window")); + tooltips.set_tip(*timeslider,_("Changes the current time")); + time_window_scroll->show(); + timeslider->show(); + //time_window_scroll->set_flags(Gtk::CAN_FOCUS); // Uncomment this produce bad render of the HScroll + timeslider->set_flags(Gtk::CAN_FOCUS); + + //time_scroll->signal_value_changed().connect(sigc::mem_fun(*work_area, &studio::WorkArea::render_preview_hook)); + //time_scroll->set_update_policy(Gtk::UPDATE_DISCONTINUOUS); + + //Setup the Animation Mode Button and the Keyframe Lock button + Gtk::IconSize iconsize=Gtk::IconSize::from_name("synfig-small_icon"); + SMALL_BUTTON(animatebutton,"gtk-yes",_("Animate")); + animatebutton->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_animate_button_pressed)); + animatebutton->show(); + + //Setup the audio display + disp_audio->set_size_request(-1,32); //disp_audio->show(); + disp_audio->set_time_adjustment(&time_adjustment()); + disp_audio->signal_start_scrubbing().connect( + sigc::mem_fun(*audio,&AudioContainer::start_scrubbing) + ); + disp_audio->signal_scrub().connect( + sigc::mem_fun(*audio,&AudioContainer::scrub) + ); + disp_audio->signal_stop_scrubbing().connect( + sigc::mem_fun(*audio,&AudioContainer::stop_scrubbing) + ); + //Setup the current time widget + current_time_widget=manage(new Widget_Time); + current_time_widget->set_value(get_time()); + current_time_widget->set_fps(get_canvas()->rend_desc().get_frame_rate()); + current_time_widget->signal_value_changed().connect( + sigc::mem_fun(*this,&CanvasView::on_current_time_widget_changed) + ); + current_time_widget->set_size_request(0,-1); // request horizontal shrink + tooltips.set_tip(*current_time_widget,_("Current time")); + current_time_widget->show(); + + //Setup the FrameDial widget + framedial = manage(new class FrameDial()); + framedial->signal_seek_begin().connect( + sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_time), Time::begin()) + ); + framedial->signal_seek_prev_frame().connect( + sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_frame), -1) + ); + framedial->signal_play_stop().connect( + sigc::mem_fun(*this, &studio::CanvasView::on_play_stop_pressed) + ); + framedial->signal_seek_next_frame().connect( + sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_frame), 1) + ); + framedial->signal_seek_end().connect( + sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_time), Time::end()) + ); + framedial->show(); + + //Setup the KeyFrameDial widget + KeyFrameDial *keyframedial = Gtk::manage(new class KeyFrameDial()); + keyframedial->signal_seek_prev_keyframe().connect(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::jump_to_prev_keyframe)); + keyframedial->signal_seek_next_keyframe().connect(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::jump_to_next_keyframe)); + keyframedial->signal_lock_keyframe().connect(sigc::mem_fun(*this, &studio::CanvasView::on_keyframe_button_pressed)); + keyframedial->show(); + keyframebutton=keyframedial->get_lock_button(); + + timebar = Gtk::manage(new class Gtk::Table(5, 4, false)); + + //Adjust both widgets to be the same as the + int header_height = 0; + if(getenv("SYNFIG_TIMETRACK_HEADER_HEIGHT")) + header_height = atoi(getenv("SYNFIG_TIMETRACK_HEADER_HEIGHT")); + if (header_height < 3) + header_height = 24; + timeslider->set_size_request(-1,header_height-header_height/3+1); + widget_kf_list->set_size_request(-1,header_height/3+1); + + //Attach widgets to the timebar + //timebar->attach(*manage(disp_audio), 1, 5, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); + timebar->attach(*current_time_widget, 0, 1, 0, 2, Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, 0, 0); + timebar->attach(*framedial, 0, 1, 2, 3, Gtk::SHRINK, Gtk::SHRINK); + timebar->attach(*timeslider, 1, 3, 1, 2, Gtk::FILL|Gtk::SHRINK, Gtk::FILL|Gtk::SHRINK); + timebar->attach(*widget_kf_list, 1, 3, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::SHRINK); + timebar->attach(*time_window_scroll, 1, 3, 2, 3, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK); + timebar->attach(*keyframedial, 3, 4, 0, 2, Gtk::SHRINK, Gtk::SHRINK); + timebar->attach(*animatebutton, 4, 5, 0, 2, Gtk::SHRINK, Gtk::SHRINK); + //timebar->attach(*keyframebutton, 1, 2, 3, 4, Gtk::SHRINK, Gtk::SHRINK); + + timebar->show(); + + return timebar; +} + +Gtk::Widget * +CanvasView::create_work_area() +{ + work_area=std::auto_ptr(new class studio::WorkArea(canvas_interface_)); + work_area->set_instance(get_instance()); + work_area->set_canvas(get_canvas()); + work_area->set_canvas_view(this); + work_area->set_progress_callback(get_ui_interface().get()); + work_area->signal_popup_menu().connect(sigc::mem_fun(*this, &studio::CanvasView::popup_main_menu)); + work_area->show(); + return work_area.get(); +} + +Gtk::Widget* +CanvasView::create_status_bar() +{ + Gtk::Image *icon; + Gtk::IconSize iconsize=Gtk::IconSize::from_name("synfig-small_icon"); + cancel=false; + + // Create the status bar at the bottom of the window + Gtk::Table *statusbartable= manage(new class Gtk::Table(5, 1, false)); +// statusbar = manage(new class Gtk::Statusbar()); // This is already done at construction + progressbar =manage(new class Gtk::ProgressBar()); + SMALL_BUTTON(stopbutton,"gtk-stop",_("Stop")); + SMALL_BUTTON(refreshbutton,"gtk-refresh",_("Refresh")); + //SMALL_BUTTON(treetogglebutton,"gtk-go-down",_("Toggle Layer Tree")); +// NEW_SMALL_BUTTON(raisebutton,"gtk-go-up",_("Raise Layer")); +// NEW_SMALL_BUTTON(lowerbutton,"gtk-go-down",_("Lower Layer")); + //statusbartable->attach(*treetogglebutton, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); +// statusbartable->attach(*lowerbutton, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); +// statusbartable->attach(*raisebutton, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); + + statusbartable->attach(*statusbar, 1, 2, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); + statusbartable->attach(*progressbar, 2, 3, 0, 1, Gtk::SHRINK, Gtk::EXPAND|Gtk::FILL, 0, 0); + statusbartable->attach(*refreshbutton, 3, 4, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); + statusbartable->attach(*stopbutton, 4, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); + statusbar->set_has_resize_grip(false); + statusbar->show(); + stopbutton->show(); + refreshbutton->show(); + progressbar->show(); + stopbutton->set_sensitive(false); + + //refreshbutton->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_refresh_pressed)); + //stopbutton->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::stop)); + //treetogglebutton->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::toggle_tables)); + + refreshbutton->signal_clicked().connect(SLOT_EVENT(EVENT_REFRESH)); + stopbutton->signal_clicked().connect(SLOT_EVENT(EVENT_STOP)); + + statusbartable->show_all(); + return statusbartable; +} + +Gtk::Widget* +CanvasView::create_display_bar() +{ + displaybar = manage(new class Gtk::Table(1, 7, false)); + + // Setup the ToggleDuckDial widget + toggleducksdial = Gtk::manage(new class ToggleDucksDial()); + + Duck::Type m = work_area->get_type_mask(); + toggleducksdial->update_toggles(m); + + toggleducksdial->signal_ducks_position().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_POSITION) + ); + toggleducksdial->signal_ducks_vertex().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_VERTEX) + ); + toggleducksdial->signal_ducks_tangent().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_TANGENT) + ); + toggleducksdial->signal_ducks_radius().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_RADIUS) + ); + toggleducksdial->signal_ducks_width().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_WIDTH) + ); + toggleducksdial->signal_ducks_angle().connect( + sigc::bind(sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask),Duck::TYPE_ANGLE) + ); + toggleducksdial->show(); + + // Set up the ResolutionDial widget + resolutiondial=Gtk::manage(new class ResolutionDial()); + + resolutiondial->update_lowres(work_area->get_low_resolution_flag()); + resolutiondial->signal_increase_resolution().connect( + sigc::mem_fun(*this, &studio::CanvasView::decrease_low_res_pixel_size)); + resolutiondial->signal_decrease_resolution().connect( + sigc::mem_fun(*this, &studio::CanvasView::increase_low_res_pixel_size)); + resolutiondial->signal_use_low_resolution().connect( + sigc::mem_fun(*this, &studio::CanvasView::toggle_low_res_pixel_flag)); + resolutiondial->show(); + + // Set up a separator + Gtk::VSeparator *separator1 = Gtk::manage(new class Gtk::VSeparator()); + separator1->show(); + Gtk::VSeparator *separator2 = Gtk::manage(new class Gtk::VSeparator()); + separator2->show(); + + // Set up quality spin button + quality_spin=Gtk::manage(new class Gtk::SpinButton(quality_adjustment_)); + quality_spin->signal_value_changed().connect( + sigc::mem_fun(*this, &studio::CanvasView::update_quality)); + tooltips.set_tip(*quality_spin, _("Quality (lower is better)")); + quality_spin->show(); + + // Set up the show grid toggle button + show_grid = Gtk::manage(new class Gtk::ToggleButton()); + show_grid->set_active(work_area->grid_status()); + Gtk::Image *icon = manage(new Gtk::Image(Gtk::StockID("synfig-toggle_show_grid"), Gtk::IconSize::from_name("synfig-small_icon"))); + icon->set_padding(0, 0); + icon->show(); + show_grid->add(*icon); + show_grid->signal_toggled().connect( + sigc::mem_fun(*this, &studio::CanvasView::toggle_show_grid)); + tooltips.set_tip(*show_grid, _("Show grid when enabled")); + show_grid->set_relief(Gtk::RELIEF_NONE); + show_grid->show(); + + // Set up the snap to grid toggle button + snap_grid = Gtk::manage(new class Gtk::ToggleButton()); + snap_grid->set_active(work_area->grid_status()); + Gtk::Image *icon2 = manage(new Gtk::Image(Gtk::StockID("synfig-toggle_snap_grid"), Gtk::IconSize::from_name("synfig-small_icon"))); + icon2->set_padding(0, 0); + icon2->show(); + snap_grid->add(*icon2); + snap_grid->signal_toggled().connect( + sigc::mem_fun(*this, &studio::CanvasView::toggle_snap_grid)); + tooltips.set_tip(*snap_grid, _("Snap grid when enabled")); + snap_grid->set_relief(Gtk::RELIEF_NONE); + snap_grid->show(); + + // Set up the onion skin toggle button + onion_skin = Gtk::manage(new class Gtk::ToggleButton()); + onion_skin->set_active(work_area->get_onion_skin()); + Gtk::Image *icon3 = manage(new Gtk::Image(Gtk::StockID("synfig-toggle_onion_skin"), Gtk::IconSize::from_name("synfig-small_icon"))); + icon3->set_padding(0, 0); + icon3->show(); + onion_skin->add(*icon3); + onion_skin->signal_toggled().connect( + sigc::mem_fun(*this, &studio::CanvasView::toggle_onion_skin)); + tooltips.set_tip(*onion_skin, _("Shows onion skin when enabled")); + onion_skin->set_relief(Gtk::RELIEF_NONE); + onion_skin->show(); + + // Set up past onion skin spin button + past_onion_spin=Gtk::manage(new class Gtk::SpinButton(past_onion_adjustment_)); + past_onion_spin->signal_value_changed().connect( + sigc::mem_fun(*this, &studio::CanvasView::set_onion_skins)); + tooltips.set_tip(*past_onion_spin, _("Past onion skins")); + past_onion_spin->show(); + + // Set up future onion skin spin button + future_onion_spin=Gtk::manage(new class Gtk::SpinButton(future_onion_adjustment_)); + future_onion_spin->signal_value_changed().connect( + sigc::mem_fun(*this, &studio::CanvasView::set_onion_skins)); + tooltips.set_tip(*future_onion_spin, _("Future onion skins")); + future_onion_spin->show(); + + + displaybar->attach(*toggleducksdial, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK); + displaybar->attach(*separator1, 1, 2, 0, 1, Gtk::FILL, Gtk::FILL); + displaybar->attach(*resolutiondial, 2, 3, 0, 1, Gtk::SHRINK, Gtk::SHRINK); + displaybar->attach(*separator2, 3, 4, 0, 1, Gtk::FILL, Gtk::FILL); + displaybar->attach(*quality_spin, 4, 5, 0, 1, Gtk::SHRINK, Gtk::SHRINK); + displaybar->attach(*show_grid, 5, 6, 0, 1, Gtk::SHRINK, Gtk::SHRINK); + displaybar->attach(*snap_grid, 6, 7, 0, 1, Gtk::SHRINK, Gtk::SHRINK); + displaybar->attach(*past_onion_spin, 7, 8, 0, 1, Gtk::SHRINK, Gtk::SHRINK); + displaybar->attach(*onion_skin, 8, 9, 0, 1, Gtk::SHRINK, Gtk::SHRINK); + displaybar->attach(*future_onion_spin, 9, 10, 0, 1, Gtk::SHRINK, Gtk::SHRINK); + + displaybar->show(); + + return displaybar; + +} + +void +CanvasView::on_current_time_widget_changed() +{ + set_time(current_time_widget->get_value()); + + // show the value being used - it will have been rounded to nearest frame + // this was already being done elsewhere, but only if the time was really changed; + // if the current time was 6f and the user edited it to 6.1f, then the 6.1f would + // be left in the display without the following line to fix it + current_time_widget->set_value(get_time()); + current_time_widget->set_position(-1); // leave the cursor at the end +} + +// Gtk::Widget* +// CanvasView::create_children_tree() +// { +// // Create the layer tree +// children_tree=manage(new class ChildrenTree()); +// +// // Set up the layer tree +// //children_tree->set_model(children_tree_store()); +// if(children_tree)children_tree->set_time_adjustment(time_adjustment()); +// if(children_tree)children_tree->show(); +// +// // Connect Signals +// if(children_tree)children_tree->signal_edited_value().connect(sigc::mem_fun(*this, &studio::CanvasView::on_edited_value)); +// if(children_tree)children_tree->signal_user_click().connect(sigc::mem_fun(*this, &studio::CanvasView::on_children_user_click)); +// if(children_tree)children_tree->signal_waypoint_clicked_childrentree().connect(sigc::mem_fun(*this, &studio::CanvasView::on_waypoint_clicked_canvasview)); +// if(children_tree)children_tree->get_selection()->signal_changed().connect(SLOT_EVENT(EVENT_REFRESH_DUCKS)); +// +// return children_tree; +// } + +// Gtk::Widget* +// CanvasView::create_keyframe_tree() +// { +// keyframe_tree=manage(new KeyframeTree()); +// +// //keyframe_tree->get_selection()->set_mode(Gtk::SELECTION_MULTIPLE); +// //keyframe_tree->show(); +// //keyframe_tree->set_model(keyframe_tree_store()); +// keyframe_tree->set_editable(true); +// //keyframe_tree->signal_edited().connect(sigc::hide_return(sigc::mem_fun(*canvas_interface(), &synfigapp::CanvasInterface::update_keyframe))); +// +// keyframe_tree->signal_event().connect(sigc::mem_fun(*this, &studio::CanvasView::on_keyframe_tree_event)); +// +// Gtk::ScrolledWindow *scroll_layer_tree = manage(new class Gtk::ScrolledWindow()); +// scroll_layer_tree->set_flags(Gtk::CAN_FOCUS); +// scroll_layer_tree->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); +// scroll_layer_tree->add(*keyframe_tree); +// scroll_layer_tree->set_shadow_type(Gtk::SHADOW_ETCHED_IN); +// //scroll_layer_tree->show(); +// +// +// Gtk::Table *layout_table= manage(new Gtk::Table(1, 2, false)); +// layout_table->attach(*scroll_layer_tree, 0, 1, 0, 1, Gtk::EXPAND|Gtk::FILL, Gtk::EXPAND|Gtk::FILL, 0, 0); +// +// Gtk::Image *icon; +// Gtk::IconSize iconsize(Gtk::IconSize::from_name("synfig-small_icon")); +// +// NEW_SMALL_BUTTON(button_add,"gtk-add",_("New Keyframe")); +// NEW_SMALL_BUTTON(button_duplicate,"synfig-duplicate",_("Duplicate Keyframe")); +// NEW_SMALL_BUTTON(button_delete,"gtk-delete",_("Delete Keyframe")); +// +// Gtk::HBox *hbox(manage(new Gtk::HBox())); +// layout_table->attach(*hbox, 0, 1, 1, 2, Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK, 0, 0); +// +// hbox->pack_start(*button_add,Gtk::PACK_SHRINK); +// hbox->pack_start(*button_duplicate,Gtk::PACK_SHRINK); +// hbox->pack_start(*button_delete,Gtk::PACK_SHRINK); +// +// /* +// button_raise->set_relief(Gtk::RELIEF_HALF); +// button_lower->set_relief(Gtk::RELIEF_HALF); +// button_duplicate->set_relief(Gtk::RELIEF_HALF); +// button_delete->set_relief(Gtk::RELIEF_HALF); +// */ +// +// button_add->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_keyframe_add_pressed)); +// button_duplicate->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_keyframe_duplicate_pressed)); +// button_delete->signal_clicked().connect(sigc::mem_fun(*this, &studio::CanvasView::on_keyframe_remove_pressed)); +// +// //layout_table->show_all(); +// +// keyframe_tab_child=layout_table; +// +// +// layout_table->hide(); +// +// return layout_table; +// } + +// Gtk::Widget* +// CanvasView::create_layer_tree() +// { +// // Create the layer tree +// printf("CanvasView::create_layer_tree()\n"); +// layer_tree=manage(new class LayerTree()); +// +// // Set up the layer tree +// //layer_tree->set_model(layer_tree_store()); +// layer_tree->set_time_adjustment(time_adjustment()); +// layer_tree->show(); +// +// // Connect Signals +// layer_tree->signal_layer_toggle().connect(sigc::mem_fun(*this, &studio::CanvasView::on_layer_toggle)); +// layer_tree->signal_edited_value().connect(sigc::mem_fun(*this, &studio::CanvasView::on_edited_value)); +// layer_tree->signal_layer_user_click().connect(sigc::mem_fun(*this, &studio::CanvasView::on_layer_user_click)); +// layer_tree->signal_param_user_click().connect(sigc::mem_fun(*this, &studio::CanvasView::on_children_user_click)); +// layer_tree->signal_waypoint_clicked_layertree().connect(sigc::mem_fun(*this, &studio::CanvasView::on_waypoint_clicked_canvasview)); +// layer_tree->get_selection()->signal_changed().connect(SLOT_EVENT(EVENT_REFRESH_DUCKS)); +// +// layer_tree->hide(); +// return layer_tree; +// } + +void +CanvasView::init_menus() +{ +/* + mainmenu.set_accel_group(get_accel_group()); + mainmenu.set_accel_path(""); + + filemenu.set_accel_group(get_accel_group()); + filemenu.set_accel_path("/File"); + + editmenu.set_accel_group(get_accel_group()); + editmenu.set_accel_path("/Edit"); + + layermenu.set_accel_group(get_accel_group()); + layermenu.set_accel_path("/Layer"); +*/ + //cache the position of desired widgets + + /*Menus to worry about: + - filemenu + - editmenu + - layermenu + - duckmaskmenu + - mainmenu + - canvasmenu + - viewmenu + */ + action_group = Gtk::ActionGroup::create(); + + //action_group->add( Gtk::Action::create("MenuFile", _("_File")) ); + action_group->add( Gtk::Action::create("new", Gtk::Stock::NEW), + sigc::hide_return(sigc::ptr_fun(&studio::App::new_instance)) + ); + action_group->add( Gtk::Action::create("open", Gtk::Stock::OPEN), + sigc::hide_return(sigc::mem_fun(*get_instance().get(), &studio::Instance::open)) + ); + action_group->add( Gtk::Action::create("save", Gtk::Stock::SAVE), + hide_return(sigc::mem_fun(*get_instance().get(), &studio::Instance::save)) + ); + action_group->add( Gtk::Action::create("save-as", Gtk::Stock::SAVE_AS), + sigc::hide_return(sigc::mem_fun(*get_instance().get(), &studio::Instance::dialog_save_as)) + ); + action_group->add( Gtk::Action::create("revert", Gtk::Stock::REVERT_TO_SAVED), + sigc::hide_return(sigc::mem_fun(*get_instance().get(), &studio::Instance::safe_revert)) + ); + action_group->add( Gtk::Action::create("cvs-add", Gtk::StockID("synfig-cvs_add")), + sigc::hide_return(sigc::mem_fun(*get_instance(), &studio::Instance::dialog_cvs_add)) + ); + action_group->add( Gtk::Action::create("cvs-update", Gtk::StockID("synfig-cvs_update")), + sigc::hide_return(sigc::mem_fun(*get_instance(), &studio::Instance::dialog_cvs_update)) + ); + action_group->add( Gtk::Action::create("cvs-revert", Gtk::StockID("synfig-cvs_revert")), + sigc::hide_return(sigc::mem_fun(*get_instance(), &studio::Instance::dialog_cvs_revert)) + ); + action_group->add( Gtk::Action::create("cvs-commit", Gtk::StockID("synfig-cvs_commit")), + sigc::hide_return(sigc::mem_fun(*get_instance(), &studio::Instance::dialog_cvs_commit)) + ); + action_group->add( Gtk::Action::create("import", _("Import")), + sigc::hide_return(sigc::mem_fun(*this, &studio::CanvasView::image_import)) + ); + action_group->add( Gtk::Action::create("render", _("Render")), + sigc::mem_fun0(render_settings,&studio::RenderSettings::present) + ); + action_group->add( Gtk::Action::create("preview", _("Preview")), + sigc::mem_fun(*this,&CanvasView::on_preview_option) + ); + action_group->add( Gtk::Action::create("sound", _("Sound File")), + sigc::mem_fun(*this,&CanvasView::on_audio_option) + ); + action_group->add( Gtk::Action::create("options", _("Options")), + sigc::mem_fun0(canvas_options,&studio::CanvasOptions::present) + ); + action_group->add( Gtk::Action::create("close", Gtk::StockID("gtk-close"), _("Close Window")), + sigc::hide_return(sigc::mem_fun(*this,&studio::CanvasView::close_view)) + ); + action_group->add( Gtk::Action::create("close-document", Gtk::StockID("gtk-close"), _("Close Document")), + sigc::hide_return(sigc::mem_fun(*this,&studio::CanvasView::close_instance)) + ); + action_group->add( Gtk::Action::create("quit", Gtk::StockID("gtk-quit"), _("Quit")), + sigc::hide_return(sigc::ptr_fun(&studio::App::quit)) + ); + + //action_group->add( Gtk::Action::create("undo", Gtk::StockID("gtk-undo")), + // SLOT_EVENT(EVENT_UNDO) + //); + + //action_group->add( Gtk::Action::create("redo", Gtk::StockID("gtk-redo")), + // SLOT_EVENT(EVENT_REDO) + //); + + action_group->add( Gtk::Action::create("select-all-ducks", _("Select All Ducks")), + sigc::mem_fun(*work_area,&studio::WorkArea::select_all_ducks) + ); + + action_group->add( Gtk::Action::create("unselect-all-ducks", _("Unselect All Ducks")), + sigc::mem_fun(*work_area,&studio::WorkArea::unselect_all_ducks) + ); + + action_group->add( Gtk::Action::create("select-all-layers", _("Select All Layers")), + sigc::mem_fun(*this,&CanvasView::on_select_layers) + ); + + action_group->add( Gtk::Action::create("unselect-all-layers", _("Unselect All Layers")), + sigc::mem_fun(*this,&CanvasView::on_unselect_layers) + ); + + action_group->add( Gtk::Action::create("stop", Gtk::StockID("gtk-stop")), + SLOT_EVENT(EVENT_STOP) + ); + + action_group->add( Gtk::Action::create("refresh", Gtk::StockID("gtk-refresh")), + SLOT_EVENT(EVENT_REFRESH) + ); + + action_group->add( Gtk::Action::create("properties", Gtk::StockID("gtk-properties")), + sigc::mem_fun0(canvas_properties,&studio::CanvasProperties::present) + ); + + // Preview Quality Menu + { + int i; + action_group->add( Gtk::RadioAction::create(quality_group,"quality-00", _("Use Parametric Renderer")), + sigc::bind( + sigc::mem_fun(*work_area, &studio::WorkArea::set_quality), + 0 + ) + ); + for(i=1;i<=10;i++) + { + String note; + if (i == 1) note = _(" (best)"); + if (i == 10) note = _(" (fastest)"); + Glib::RefPtr action(Gtk::RadioAction::create(quality_group,strprintf("quality-%02d",i), + strprintf(_("Set Quality to %d"),i) + note)); + if (i==8) // default quality + { + action->set_active(); + work_area->set_quality(i); + } + action_group->add( action, + sigc::bind( + sigc::mem_fun(*this, &studio::CanvasView::set_quality), + i + ) + ); + } + } + + // Low-Res Quality Menu + { + int i; + for(list::iterator iter = CanvasView::get_pixel_sizes().begin(); iter != CanvasView::get_pixel_sizes().end(); iter++) + { + i = *iter; + Glib::RefPtr action(Gtk::RadioAction::create(low_res_pixel_size_group,strprintf("lowres-pixel-%d",i), + strprintf(_("Set Low-Res pixel size to %d"),i))); + if(i==2) // default pixel size + { + action->set_active(); + work_area->set_low_res_pixel_size(i); + } + action_group->add( action, + sigc::bind( + sigc::mem_fun(*work_area, &studio::WorkArea::set_low_res_pixel_size), + i + ) + ); + } + + Glib::RefPtr action; + + action=Gtk::Action::create("decrease-low-res-pixel-size", _("Decrease Low-Res Pixel Size")); + action_group->add( action,sigc::mem_fun(this, &studio::CanvasView::decrease_low_res_pixel_size)); + + action=Gtk::Action::create("increase-low-res-pixel-size", _("Increase Low-Res Pixel Size")); + action_group->add( action, sigc::mem_fun(this, &studio::CanvasView::increase_low_res_pixel_size)); + + } + + action_group->add( Gtk::Action::create("play", Gtk::Stock::MEDIA_PLAY), + sigc::mem_fun(*this, &studio::CanvasView::play) + ); + + action_group->add( Gtk::Action::create("dialog-flipbook", _("Preview Window")), + sigc::mem_fun0(*preview_dialog, &studio::Dialog_Preview::present) + ); + + { + Glib::RefPtr action; + + grid_show_toggle = Gtk::ToggleAction::create("toggle-grid-show", _("Show Grid")); + grid_show_toggle->set_active(work_area->grid_status()); + action_group->add(grid_show_toggle, sigc::mem_fun(*this, &studio::CanvasView::toggle_show_grid)); + + grid_snap_toggle = Gtk::ToggleAction::create("toggle-grid-snap", _("Snap to Grid")); + grid_snap_toggle->set_active(work_area->get_grid_snap()); + action_group->add(grid_snap_toggle, sigc::mem_fun(*this, &studio::CanvasView::toggle_snap_grid)); + + action = Gtk::ToggleAction::create("toggle-guide-show", _("Show Guides")); + action->set_active(work_area->get_show_guides()); + action_group->add(action, sigc::mem_fun(*work_area, &studio::WorkArea::toggle_guide_snap)); + + action = Gtk::ToggleAction::create("toggle-low-res", _("Use Low-Res")); + action->set_active(work_area->get_low_resolution_flag()); + action_group->add(action, sigc::mem_fun(*this, &studio::CanvasView::toggle_low_res_pixel_flag)); + + action = Gtk::ToggleAction::create("toggle-onion-skin", _("Show Onion Skin")); + action->set_active(work_area->get_onion_skin()); + action_group->add(action, sigc::mem_fun(*this, &studio::CanvasView::toggle_onion_skin)); + } + + action_group->add( Gtk::Action::create("canvas-zoom-fit", Gtk::StockID("gtk-zoom-fit")), + sigc::mem_fun(*work_area, &studio::WorkArea::zoom_fit) + ); + action_group->add( Gtk::Action::create("canvas-zoom-100", Gtk::StockID("gtk-zoom-100")), + sigc::mem_fun(*work_area, &studio::WorkArea::zoom_norm) + ); + + { + Glib::RefPtr action; + + action=Gtk::Action::create("seek-next-frame", Gtk::Stock::GO_FORWARD,_("Next Frame"),_("Next Frame")); + action_group->add(action,sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_frame),1)); + action=Gtk::Action::create("seek-prev-frame", Gtk::Stock::GO_BACK,_("Prev Frame"),_("Prev Frame")); + action_group->add( action, sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_frame),-1)); + + action=Gtk::Action::create("seek-next-second", Gtk::Stock::GO_FORWARD,_("Seek Forward"),_("Seek Forward")); + action_group->add(action,sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_time),Time(1))); + action=Gtk::Action::create("seek-prev-second", Gtk::Stock::GO_BACK,_("Seek Backward"),_("Seek Backward")); + action_group->add( action, sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_time),Time(-1))); + + action=Gtk::Action::create("seek-end", Gtk::Stock::GOTO_LAST,_("Seek to End"),_("Seek to End")); + action_group->add(action,sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_time),Time::end())); + + action=Gtk::Action::create("seek-begin", Gtk::Stock::GOTO_FIRST,_("Seek to Begin"),_("Seek to Begin")); + action_group->add( action, sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek_time),Time::begin())); + + action=Gtk::Action::create("jump-next-keyframe", Gtk::Stock::GO_FORWARD,_("Jump to Next Keyframe"),_("Jump to Next Keyframe")); + action_group->add( action,sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::jump_to_next_keyframe)); + + action=Gtk::Action::create("jump-prev-keyframe", Gtk::Stock::GO_BACK,_("Jump to Prev Keyframe"),_("Jump to Prev Keyframe")); + action_group->add( action,sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::jump_to_prev_keyframe)); + + action=Gtk::Action::create("canvas-zoom-in", Gtk::Stock::ZOOM_IN); + action_group->add( action,sigc::mem_fun(*work_area, &studio::WorkArea::zoom_in)); + + action=Gtk::Action::create("canvas-zoom-out", Gtk::Stock::ZOOM_OUT); + action_group->add( action, sigc::mem_fun(*work_area, &studio::WorkArea::zoom_out) ); + + action=Gtk::Action::create("time-zoom-in", Gtk::Stock::ZOOM_IN, _("Zoom In on Timeline")); + action_group->add( action, sigc::mem_fun(*this, &studio::CanvasView::time_zoom_in) ); + + action=Gtk::Action::create("time-zoom-out", Gtk::Stock::ZOOM_OUT, _("Zoom Out on Timeline")); + action_group->add( action, sigc::mem_fun(*this, &studio::CanvasView::time_zoom_out) ); + + } + + { + Glib::RefPtr action; + +#define DUCK_MASK(lower,upper,string) \ + action=Gtk::ToggleAction::create("mask-" #lower "-ducks", string); \ + action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_##upper)); \ + action_group->add(action, \ + sigc::bind( \ + sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask), \ + Duck::TYPE_##upper)) + + DUCK_MASK(position,POSITION,_("Show Position Ducks")); + DUCK_MASK(tangent,TANGENT,_("Show Tangent Ducks")); + DUCK_MASK(vertex,VERTEX,_("Show Vertex Ducks")); + DUCK_MASK(radius,RADIUS,_("Show Radius Ducks")); + DUCK_MASK(width,WIDTH,_("Show Width Ducks")); + DUCK_MASK(angle,ANGLE,_("Show Angle Ducks")); + +#undef DUCK_MASK + } + + add_accel_group(App::ui_manager()->get_accel_group()); + +/* // Here is where we add the actions that may have conflicting + // keyboard accelerators. + { + Glib::RefPtr accel_action_group(Gtk::ActionGroup::create("canvas_view")); + Glib::RefPtr action; + + action=Gtk::Action::create("seek-next-frame", Gtk::StockID("gtk-forward"),_("Next Frame"),_("Next Frame")); + accel_action_group->add(action,sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek),1)); + + action=Gtk::Action::create("seek-prev-frame", Gtk::StockID("gtk-forward"),_("Prev Frame"),_("Prev Frame")); + accel_action_group->add( action, sigc::bind(sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::seek),-1)); + + action=Gtk::Action::create("jump-next-keyframe", Gtk::StockID("gtk-forward"),_("Jump to Next Keyframe"),_("Jump to Next Keyframe")); + accel_action_group->add( action,sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::jump_to_next_keyframe)); + + action=Gtk::Action::create("jump-prev-keyframe", Gtk::StockID("gtk-back"),_("Jump to Prev Keyframe"),_("Jump to Prev Keyframe")); + accel_action_group->add( action,sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::jump_to_prev_keyframe)); + + action=Gtk::Action::create("canvas-zoom-in", Gtk::StockID("gtk-zoom-in")); + accel_action_group->add( action,sigc::mem_fun(*work_area, &studio::WorkArea::zoom_in)); + + action=Gtk::Action::create("canvas-zoom-out", Gtk::StockID("gtk-zoom-out")); + accel_action_group->add( action, sigc::mem_fun(*work_area, &studio::WorkArea::zoom_out) ); + + action=Gtk::Action::create("time-zoom-in", Gtk::StockID("gtk-zoom-in"), _("Zoom In on Timeline")); + accel_action_group->add( action, sigc::mem_fun(*this, &studio::CanvasView::time_zoom_in) ); + + action=Gtk::Action::create("time-zoom-out", Gtk::StockID("gtk-zoom-out"), _("Zoom Out on Timeline")); + accel_action_group->add( action, sigc::mem_fun(*this, &studio::CanvasView::time_zoom_out) ); + + Glib::RefPtr accel_ui_manager(Gtk::UIManager::create()); + + Glib::ustring ui_info = + " + + + + + + + + + + + "; + + accel_ui_manager->add_ui_from_string(ui_info); + add_accel_group(accel_ui_manager->get_accel_group()); + + accel_ui_manager->insert_action_group(accel_action_group); + set_ref_obj("accel_ui_manager",accel_ui_manager); + set_ref_obj("accel_action_group",accel_action_group); + } +*/ + +#if 0 +// +// //Test some key stuff +// +// filemenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-save"), +// hide_return(sigc::mem_fun(*get_instance().get(), &studio::Instance::save)))); +// filemenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-save-as"),sigc::hide_return(sigc::mem_fun(*get_instance(), &studio::Instance::dialog_save_as)))); +// filemenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-revert-to-saved"),hide_return(sigc::mem_fun(*get_instance().get(), &studio::Instance::safe_revert)))); +// filemenu.items().push_back(Gtk::Menu_Helpers::SeparatorElem()); +// +// filemenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("synfig-cvs_add"),sigc::hide_return(sigc::mem_fun(*get_instance(), &studio::Instance::dialog_cvs_add)))); +// filemenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("synfig-cvs_update"),sigc::hide_return(sigc::mem_fun(*get_instance(), &studio::Instance::dialog_cvs_update)))); +// filemenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("synfig-cvs_commit"),sigc::hide_return(sigc::mem_fun(*get_instance(), &studio::Instance::dialog_cvs_commit)))); +// +// filemenu.items().push_back(Gtk::Menu_Helpers::SeparatorElem()); +// filemenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Import..."),Gtk::AccelKey('I',Gdk::CONTROL_MASK),sigc::hide_return(sigc::mem_fun(*this, &studio::CanvasView::image_import)))); +// filemenu.items().push_back(Gtk::Menu_Helpers::SeparatorElem()); +// filemenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Render"),Gtk::AccelKey("F9"), +// sigc::mem_fun(render_settings,&studio::RenderSettings::present) +// )); +// filemenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Preview"),Gtk::AccelKey("F11"), +// sigc::mem_fun(*this,&CanvasView::on_preview_option) +// )); +// filemenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Sound File"), +// sigc::mem_fun(*this,&CanvasView::on_audio_option) +// )); +// +// filemenu.items().push_back(Gtk::Menu_Helpers::SeparatorElem()); +// filemenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Options"),Gtk::AccelKey("F12"), +// sigc::mem_fun(canvas_options,&studio::CanvasOptions::present) +// )); +// filemenu.items().push_back(Gtk::Menu_Helpers::SeparatorElem()); +// filemenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Close View"), +// sigc::hide_return(sigc::mem_fun(*this,&studio::CanvasView::close_view)) +// )); +// filemenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Close Document"), +// sigc::hide_return(sigc::mem_fun(*this,&studio::CanvasView::close_document)) +// )); +// +// editmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-undo"),Gtk::AccelKey('Z',Gdk::CONTROL_MASK),SLOT_EVENT(EVENT_UNDO))); +// editmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-redo"),Gtk::AccelKey('R',Gdk::CONTROL_MASK),SLOT_EVENT(EVENT_REDO))); +// editmenu.items().push_back(Gtk::Menu_Helpers::SeparatorElem()); +// editmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-cut"),NOT_IMPLEMENTED_SLOT)); +// editmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-copy"),NOT_IMPLEMENTED_SLOT)); +// editmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-paste"),NOT_IMPLEMENTED_SLOT)); +// editmenu.items().push_back(Gtk::Menu_Helpers::SeparatorElem()); +// editmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Select All Ducks"),Gtk::AccelKey('E',Gdk::CONTROL_MASK),sigc::mem_fun(*work_area,&studio::WorkArea::select_all_ducks))); +// editmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Unselect All Ducks"),Gtk::AccelKey('E',Gdk::CONTROL_MASK),sigc::mem_fun(*work_area,&studio::WorkArea::unselect_all_ducks))); +// editmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Select All Layers"),Gtk::AccelKey('A',Gdk::CONTROL_MASK),sigc::mem_fun(*this,&CanvasView::on_select_layers))); +// editmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Unselect All Layers"),Gtk::AccelKey('D',Gdk::CONTROL_MASK),sigc::mem_fun(*this,&CanvasView::on_unselect_layers))); +// editmenu.items().push_back(Gtk::Menu_Helpers::SeparatorElem()); +// +// //editmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-stop"),Gtk::AccelKey(GDK_Escape,static_cast(0)),sigc::hide_return(sigc::mem_fun(*this, &studio::CanvasView::stop)))); +// //editmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-refresh"),Gtk::AccelKey('k',Gdk::CONTROL_MASK),sigc::hide_return(sigc::mem_fun(*this, &studio::CanvasView::on_refresh_pressed)))); +// editmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-stop"),Gtk::AccelKey(GDK_Escape,static_cast(0)),SLOT_EVENT(EVENT_STOP))); +// editmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-refresh"),Gtk::AccelKey('k',Gdk::CONTROL_MASK),SLOT_EVENT(EVENT_REFRESH))); +// editmenu.items().push_back(Gtk::Menu_Helpers::SeparatorElem()); +// editmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-properties"),Gtk::AccelKey("F8"), +// sigc::mem_fun(canvas_properties,&studio::CanvasProperties::present) +// )); +// +// build_new_layer_menu(newlayermenu); +// layermenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("New"),newlayermenu)); +// +// +// { +// synfigapp::Action::ParamList param_list; +// param_list.add("canvas",Canvas::Handle(get_canvas())); +// param_list.add("canvas_interface",canvas_interface()); +// add_actions_to_menu(&canvasmenu, param_list,synfigapp::Action::CATEGORY_CANVAS); +// } +// +// +// //canvasmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Keyframe Dialog"),sigc::mem_fun(keyframe_dialog,&studio::Dialog_Keyframe::present))); +// +// // Duck Mask Menu +// if(1) +// { +// duckmaskmenu.items().push_back(Gtk::Menu_Helpers::TearoffMenuElem()); +// +// duckmaskmenu.items().push_back(Gtk::Menu_Helpers::CheckMenuElem(_("Position Ducks"),Gtk::AccelKey('1',Gdk::MOD1_MASK))); +// duck_mask_position=static_cast(&duckmaskmenu.items().back()); +// duck_mask_position->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_POSITION)); +// duck_mask_position->signal_toggled().connect( +// sigc::bind( +// sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask), +// Duck::TYPE_POSITION +// ) +// ); +// +// duckmaskmenu.items().push_back(Gtk::Menu_Helpers::CheckMenuElem(_("Vertex Ducks"),Gtk::AccelKey('2',Gdk::MOD1_MASK))); +// duck_mask_vertex=static_cast(&duckmaskmenu.items().back()); +// duck_mask_vertex->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_VERTEX)); +// duck_mask_vertex->signal_toggled().connect( +// sigc::bind( +// sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask), +// Duck::TYPE_VERTEX +// ) +// ); +// +// duckmaskmenu.items().push_back(Gtk::Menu_Helpers::CheckMenuElem(_("Tangent Ducks"),Gtk::AccelKey('3',Gdk::MOD1_MASK))); +// duck_mask_tangent=static_cast(&duckmaskmenu.items().back()); +// duck_mask_tangent->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_TANGENT)); +// duck_mask_tangent->signal_toggled().connect( +// sigc::bind( +// sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask), +// Duck::TYPE_TANGENT +// ) +// ); +// +// duckmaskmenu.items().push_back(Gtk::Menu_Helpers::CheckMenuElem(_("Radius Ducks"),Gtk::AccelKey('4',Gdk::MOD1_MASK))); +// duck_mask_radius=static_cast(&duckmaskmenu.items().back()); +// duck_mask_radius->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_RADIUS)); +// duck_mask_radius->signal_toggled().connect( +// sigc::bind( +// sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask), +// Duck::TYPE_RADIUS +// ) +// ); +// +// duckmaskmenu.items().push_back(Gtk::Menu_Helpers::CheckMenuElem(_("Width Ducks"),Gtk::AccelKey('5',Gdk::MOD1_MASK))); +// duck_mask_width=static_cast(&duckmaskmenu.items().back()); +// duck_mask_width->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_WIDTH)); +// duck_mask_width->signal_toggled().connect( +// sigc::bind( +// sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask), +// Duck::TYPE_WIDTH +// ) +// ); +// +// duckmaskmenu.items().push_back(Gtk::Menu_Helpers::CheckMenuElem(_("Angle Ducks"),Gtk::AccelKey('6',Gdk::MOD1_MASK))); +// duck_mask_angle=static_cast(&duckmaskmenu.items().back()); +// duck_mask_angle->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_ANGLE)); +// duck_mask_angle->signal_toggled().connect( +// sigc::bind( +// sigc::mem_fun(*this, &studio::CanvasView::toggle_duck_mask), +// Duck::TYPE_ANGLE +// ) +// ); +// +// viewmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Mask Ducks"),duckmaskmenu)); +// } +// +// // Preview Quality Menu +// if(1) +// { +// qualitymenu.items().push_back(Gtk::Menu_Helpers::TearoffMenuElem()); +// int i; +// qualitymenu.items().push_back(Gtk::Menu_Helpers::MenuElem(strprintf(_("Use Parametric Renderer"),0), +// sigc::bind( +// sigc::mem_fun(*work_area, &studio::WorkArea::set_quality), +// 0 +// ) +// )); +// for(i=1;i<=10;i++) +// { +// qualitymenu.items().push_back(Gtk::Menu_Helpers::MenuElem(strprintf(_("Set Quality to %d"),i),Gtk::AccelKey('0'+(i%10),Gdk::CONTROL_MASK), +// sigc::bind( +// sigc::mem_fun(*work_area, &studio::WorkArea::set_quality), +// i +// ) +// )); +// } +// viewmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Preview Quality"),qualitymenu)); +// } +// +// viewmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::Stock::MEDIA_PLAY, +// sigc::mem_fun(*this, &studio::CanvasView::play))); +// viewmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("Flipbook Dialog"), +// sigc::mem_fun(*preview_dialog, &studio::Dialog_Preview::present))); +// +// viewmenu.items().push_back(Gtk::Menu_Helpers::SeparatorElem()); +// +// viewmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Toggle Grid Show"),Gtk::AccelKey('g',Gdk::CONTROL_MASK), +// sigc::mem_fun(*work_area, &studio::WorkArea::toggle_grid))); +// viewmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Toggle Grid Snap"),Gtk::AccelKey('l',Gdk::CONTROL_MASK), +// sigc::mem_fun(*work_area, &studio::WorkArea::toggle_grid_snap))); +// viewmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Toggle Guide Snap"),Gtk::AccelKey('k',Gdk::CONTROL_MASK), +// sigc::mem_fun(*work_area, &studio::WorkArea::toggle_guide_snap))); +// viewmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Toggle Low-Res"),Gtk::AccelKey('`',Gdk::CONTROL_MASK), +// sigc::mem_fun(*work_area, &studio::WorkArea::toggle_low_resolution_flag))); +// +// viewmenu.items().push_back(Gtk::Menu_Helpers::SeparatorElem()); +// +// viewmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-zoom-in"),Gtk::AccelKey('=',static_cast(0)), +// sigc::mem_fun(*work_area, &studio::WorkArea::zoom_in))); +// viewmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-zoom-out"),Gtk::AccelKey('-',static_cast(0)), +// sigc::mem_fun(*work_area, &studio::WorkArea::zoom_out))); +// viewmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-zoom-fit"), +// sigc::mem_fun(*work_area, &studio::WorkArea::zoom_fit))); +// viewmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-zoom-100"),Gtk::AccelKey('`',static_cast(0)), +// sigc::mem_fun(*work_area, &studio::WorkArea::zoom_norm))); +// viewmenu.items().push_back(Gtk::Menu_Helpers::SeparatorElem()); +// +// viewmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-zoom-in"),Gtk::AccelKey('+',static_cast(0)), +// sigc::mem_fun(*this, &studio::CanvasView::time_zoom_in))); +// viewmenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-zoom-out"),Gtk::AccelKey('_',static_cast(0)), +// sigc::mem_fun(*this, &studio::CanvasView::time_zoom_out))); +// +// viewmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Jump to Next Keyframe"),Gtk::AccelKey(']',static_cast(0)), +// sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::jump_to_next_keyframe))); +// viewmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Jump to Prev Keyframe"),Gtk::AccelKey('[',static_cast(0)), +// sigc::mem_fun(*canvas_interface().get(), &synfigapp::CanvasInterface::jump_to_prev_keyframe))); +// +// mainmenu.items().push_back(Gtk::Menu_Helpers::TearoffMenuElem()); +// mainmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("_File"),filemenu)); +// mainmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Edit"),editmenu)); +// mainmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("_View"),viewmenu)); +// mainmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Canvas"),canvasmenu)); +// mainmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Layer"),layermenu)); +// +// mainmenu.accelerate(*this); +// +///* +// { +// +// trackmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("New Waypoint"),NOT_IMPLEMENTED_SLOT)); +// trackmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Delete Waypoint"),NOT_IMPLEMENTED_SLOT)); +// trackmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Export"),NOT_IMPLEMENTED_SLOT)); +// trackmenu.items().push_back(Gtk::Menu_Helpers::SeparatorElem()); +// trackmenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Properties"),NOT_IMPLEMENTED_SLOT)); +// } +//*/ +// mainmenu.show(); +// filemenu.show(); +// editmenu.show(); +// canvasmenu.show(); +// layermenu.show(); +// +// keyframemenu.items().push_back(Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-properties"), +// sigc::mem_fun(*this,&studio::CanvasView::show_keyframe_dialog) +// )); +// +// +// get_accel_group()->unlock(); +// +// //Set the accelerator paths for all the menus +// filemenu.set_accel_path("/File"); +// editmenu.set_accel_path("/Edit"); +// layermenu.set_accel_path("/Layer"); +// //mainmenu.set_accel_path(""); +// canvasmenu.set_accel_path("/Canvas"); +// viewmenu.set_accel_path("/View"); +// duckmaskmenu.set_accel_path("/DuckMask"); +#endif +} + +void +CanvasView::on_select_layers() +{ + Canvas::Handle canvas(get_canvas()); + for (CanvasBase::iterator iter = canvas->begin(); iter != canvas->end(); iter++) + layer_tree->select_all_children_layers(*iter); +} + +void +CanvasView::on_unselect_layers() +{ + layer_tree->clear_selected_layers(); +} + +void +CanvasView::show_keyframe_dialog() +{ + Glib::RefPtr selection(keyframe_tree->get_selection()); + if(selection->get_selected()) + { + Gtk::TreeRow row(*selection->get_selected()); + + Keyframe keyframe(row[keyframe_tree->model.keyframe]); + + keyframe_dialog.set_keyframe(keyframe); + keyframe_dialog.present(); + } +} + +void +CanvasView::add_layer(synfig::String x) +{ + Canvas::Handle canvas; + + synfigapp::SelectionManager::LayerList layer_list(get_selection_manager()->get_selected_layers()); + + int target_depth(0); + + if(layer_list.empty()) + { + canvas=get_canvas(); + } + else + { + canvas=(*layer_list.begin())->get_canvas(); + target_depth=canvas->get_depth(*layer_list.begin()); + } + + Layer::Handle layer(canvas_interface()->add_layer_to(x,canvas,target_depth)); + if(layer) + { + get_selection_manager()->clear_selected_layers(); + get_selection_manager()->set_selected_layer(layer); + } +} + +void +CanvasView::popup_layer_menu(synfig::Layer::Handle layer) +{ + //Gtk::Menu* menu(manage(new Gtk::Menu)); + Gtk::Menu* menu(¶mmenu); + menu->items().clear(); + + synfigapp::Action::ParamList param_list; + param_list.add("time",canvas_interface()->get_time()); + param_list.add("canvas",Canvas::Handle(layer->get_canvas())); + param_list.add("canvas_interface",canvas_interface()); + param_list.add("layer",layer); + + //Gtk::Menu *newlayers(manage(new Gtk::Menu())); + //build_new_layer_menu(*newlayers); + + //parammenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("New Layer"),*newlayers)); + + if(layer->get_name()=="PasteCanvas") + { + menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("Select All Children"), + sigc::bind( + sigc::mem_fun( + *layer_tree, + &studio::LayerTree::select_all_children_layers + ), + layer + ) + )); + } + + add_actions_to_menu(menu, param_list,synfigapp::Action::CATEGORY_LAYER); + + menu->popup(3,gtk_get_current_event_time()); +} + +void +CanvasView::register_layer_type(synfig::Layer::Book::value_type &/*lyr*/,std::map* /*category_map*/) +{ +/* if(lyr.second.category==CATEGORY_DO_NOT_USE) + return; + + if(category_map->count(lyr.second.category)==0) + (*category_map)[lyr.second.category]=manage(new Gtk::Menu()); + + (*category_map)[lyr.second.category]->items().push_back(Gtk::Menu_Helpers::MenuElem(lyr.second.local_name, + sigc::hide_return( + sigc::bind( + sigc::mem_fun(*this,&studio::CanvasView::add_layer), + lyr.first + ) + ) + )); +*/ +} + +void +CanvasView::build_new_layer_menu(Gtk::Menu &/*menu*/) +{ +/* + std::map category_map; + + std::for_each( + synfig::Layer::book().begin(), + synfig::Layer::book().end(), + sigc::bind( + sigc::mem_fun( + *this, + &studio::CanvasView::register_layer_type + ), + &category_map + ) + ); + + menu.items().clear(); + menu.items().push_back(Gtk::Menu_Helpers::TearoffMenuElem()); + + std::map::iterator iter; + for(iter=category_map.begin();iter!=category_map.end();++iter) + menu.items().push_back(Gtk::Menu_Helpers::MenuElem(iter->first,*iter->second)); + + menu.show(); +*/ +} + +void +CanvasView::popup_main_menu() +{ + //mainmenu.popup(0,gtk_get_current_event_time()); + Gtk::Menu* menu = dynamic_cast(App::ui_manager()->get_widget("/menu-main")); + if(menu) + { + //menu->set_accel_group(App::ui_manager()->get_accel_group()); + //menu->accelerate(*this); + menu->popup(0,gtk_get_current_event_time()); + } +} + +void +CanvasView::on_refresh_pressed() +{ + rebuild_tables(); + rebuild_ducks(); + work_area->queue_render_preview(); +} + +void +CanvasView::workarea_layer_selected(synfig::Layer::Handle layer) +{ + get_selection_manager()->clear_selected_layers(); + if(layer) + get_selection_manager()->set_selected_layer(layer); +} + +void +CanvasView::refresh_rend_desc() +{ + current_time_widget->set_fps(get_canvas()->rend_desc().get_frame_rate()); + + //???? + //synfig::info("Canvasview: Refreshing render desc info"); + if(!get_time().is_equal(time_adjustment().get_value())) + { + time_adjustment().set_value(get_time()); + time_adjustment().value_changed(); + } + + Time length(get_canvas()->rend_desc().get_time_end()-get_canvas()->rend_desc().get_time_start()); + if(lengthset_global_fps(get_canvas()->rend_desc().get_frame_rate()); + + //set the beginning and ending time of the time slider + Time begin_time=get_canvas()->rend_desc().get_time_start(); + Time end_time=get_canvas()->rend_desc().get_time_end(); + + // Setup the time_window adjustment + time_window_adjustment().set_lower(begin_time); + time_window_adjustment().set_upper(end_time); + time_window_adjustment().set_step_increment(synfig::Time(1.0/get_canvas()->rend_desc().get_frame_rate())); + + //Time length(get_canvas()->rend_desc().get_time_end()-get_canvas()->rend_desc().get_time_start()); + if(length < time_window_adjustment().get_page_size()) + { + time_window_adjustment().set_page_increment(length); + time_window_adjustment().set_page_size(length); + } + + /*synfig::info("w: %p - [%.3f,%.3f] (%.3f,%.3f) child: %p\n", + &time_window_adjustment_, time_window_adjustment_.get_lower(), + time_window_adjustment_.get_upper(),time_window_adjustment_.get_value(), + time_window_adjustment_.get_page_size(),time_window_adjustment_.get_child_adjustment() + );*/ + + time_window_adjustment().changed(); //only non-value stuff was changed + + // Setup the time adjustment + + //NOTE THESE TWO SHOULD BE CHANGED BY THE changed() CALL ABOVE + //time_adjustment().set_lower(time_window_adjustment().get_value()); + //time_adjustment().set_upper(time_window_adjustment().get_value()+time_window_adjustment().get_page_size()); + +// time_adjustment().set_lower(get_canvas()->rend_desc().get_time_start()); +// time_adjustment().set_upper(get_canvas()->rend_desc().get_time_end()); + time_adjustment().set_step_increment(synfig::Time(1.0/get_canvas()->rend_desc().get_frame_rate())); + time_adjustment().set_page_increment(synfig::Time(1.0)); + time_adjustment().set_page_size(0); + + time_adjustment().changed(); + + /*synfig::info("w: %p - [%.3f,%.3f] (%.3f,%.3f) child: %p\n", + &time_window_adjustment_, time_window_adjustment_.get_lower(), + time_window_adjustment_.get_upper(),time_window_adjustment_.get_value(), + time_window_adjustment_.get_page_size(),time_window_adjustment_.get_child_adjustment() + ); */ + + if(begin_time==end_time) + { + hide_timebar(); + } + else + { + show_timebar(); + } + + //clamp time to big bounds... + if(time_window_adjustment().get_value() < begin_time) + { + time_window_adjustment().set_value(begin_time); + time_window_adjustment().value_changed(); + } + + if(time_window_adjustment().get_value() + time_window_adjustment().get_page_size() > end_time) + { + time_window_adjustment().set_value(end_time - time_window_adjustment().get_page_size()); + time_window_adjustment().value_changed(); + } + + if(time_adjustment().get_value() < begin_time) + { + time_adjustment().set_value(begin_time); + time_adjustment().value_changed(); + } + + if(time_adjustment().get_value() > end_time) + { + time_adjustment().set_value(end_time); + time_adjustment().value_changed(); + } + + /*synfig::info("Time stats: \n" + "w: %p - [%.3f,%.3f] (%.3f,%.3f) child: %p\n" + "t: %p - [%.3f,%.3f] %.3f", + &time_window_adjustment_, time_window_adjustment_.get_lower(), + time_window_adjustment_.get_upper(),time_window_adjustment_.get_value(), + time_window_adjustment_.get_page_size(),time_window_adjustment_.get_child_adjustment(), + &time_adjustment_,time_adjustment_.get_lower(),time_adjustment_.get_upper(), + time_adjustment_.get_value() + );*/ + + work_area->queue_render_preview(); +} + +bool +CanvasView::close_view() +{ + if(get_instance()->get_visible_canvases()==1) + close_instance(); + else + hide(); + return false; +} + +static bool _close_instance(etl::handle instance) +{ + etl::handle argh(instance); + instance->safe_close(); + synfig::info("closed"); + return false; +} + +bool +CanvasView::close_instance() +{ +#ifdef SINGLE_THREADED + if (get_work_area()->get_updating()) + { + get_work_area()->stop_updating(true); // stop and mark as cancelled + + // give the workarea chances to stop updating + Glib::signal_timeout().connect( + sigc::mem_fun(*this, &CanvasView::close_instance), + 250); + } + else +#endif + Glib::signal_timeout().connect( + sigc::bind(sigc::ptr_fun(_close_instance), + (etl::handle)get_instance()), + 250); + return false; +} + +handle +CanvasView::create(etl::loose_handle instance, etl::handle canvas) +{ + etl::handle view(new CanvasView(instance,instance->synfigapp::Instance::find_canvas_interface(canvas))); + instance->canvas_view_list().push_front(view); + instance->signal_canvas_view_created()(view.get()); + return view; +} + +void +CanvasView::update_title() +{ + string title; + + title = strprintf("%s%s\"%s\"", + ( + get_instance()->get_action_count() + ? "*" + : "" + ), ( + get_instance()->has_real_filename() + ? (etl::basename(get_instance()->get_file_name()) + " : ").c_str() + : "" + ), ( + get_canvas()->get_name().empty() + ? get_canvas()->get_id().c_str() + : get_canvas()->get_name().c_str() + )); + + if(get_instance()->synfigapp::Instance::in_repository()) + { + title+=" (CVS"; + if(get_instance()->synfigapp::Instance::is_modified()) + title+=_("-MODIFIED"); + if(get_instance()->synfigapp::Instance::is_updated()) + title+=_("-UPDATED"); + title+=')'; + } + + if(get_canvas()->is_root()) + title+=_(" (Root)"); + + set_title(title); +} + +void +CanvasView::on_hide() +{ + smach_.egress(); + Gtk::Window::on_hide(); +} + +void +CanvasView::present() +{ + grab_focus();//on_focus_in_event(0); + Gtk::Window::present(); +} + +bool +CanvasView::on_focus_in_event(GdkEventFocus*x) +{ + if(studio::App::get_selected_canvas_view()!=this) + { + if(studio::App::get_selected_canvas_view()) + { + studio::App::get_selected_canvas_view()->get_smach().process_event(EVENT_YIELD_TOOL_OPTIONS); + App::ui_manager()->remove_action_group(App::get_selected_canvas_view()->action_group); + } + + get_smach().process_event(EVENT_REFRESH_TOOL_OPTIONS); + + studio::App::set_selected_canvas_view(this); + + App::ui_manager()->insert_action_group(action_group); + } + + // HACK ... Questionable...? + if(x) + return Gtk::Window::on_focus_in_event(x); + + return true; +} + +bool +CanvasView::on_focus_out_event(GdkEventFocus*x) +{ + //App::ui_manager()->remove_action_group(action_group); + //App::ui_manager()->ensure_update(); + return Gtk::Window::on_focus_out_event(x); +} + +void +CanvasView::refresh_tables() +{ +// if(layer_tree_store_)layer_tree_store_->refresh(); +// if(children_tree_store_)children_tree_store_->refresh(); +} + +void +CanvasView::rebuild_tables() +{ +// layer_tree_store_->rebuild(); +// children_tree_store_->rebuild(); +} + +void +CanvasView::build_tables() +{ +// layer_tree_store_->rebuild(); +// children_tree_store_->rebuild(); +} + +void +CanvasView::on_layer_toggle(synfig::Layer::Handle layer) +{ + synfigapp::Action::Handle action(synfigapp::Action::create("LayerActivate")); + assert(action); + + if(!action) + return; + + action->set_param("canvas",Canvas::Handle(layer->get_canvas())); + if(!action->set_param("canvas_interface",canvas_interface())) +// if(!action->set_param("canvas_interface",get_instance()->find_canvas_interface(layer->get_canvas()))) + synfig::error("LayerActivate didn't like CanvasInterface...?"); + action->set_param("time",get_time()); + action->set_param("layer",layer); + action->set_param("new_status",!layer->active()); + + assert(action->is_ready()); + + canvas_interface()->get_instance()->perform_action(action); +} + +void +CanvasView::popup_param_menu(synfigapp::ValueDesc value_desc, float location, bool bezier) +{ + parammenu.items().clear(); + get_instance()->make_param_menu(¶mmenu,get_canvas(),value_desc,location,bezier); + + parammenu.popup(3,gtk_get_current_event_time()); +} + +void +CanvasView::add_actions_to_menu(Gtk::Menu *menu, const synfigapp::Action::ParamList ¶m_list,synfigapp::Action::Category category)const +{ + get_instance()->add_actions_to_menu(menu, param_list, category); +} + +bool +CanvasView::on_layer_user_click(int button, Gtk::TreeRow /*row*/, LayerTree::ColumnID /*column_id*/) +{ + switch(button) + { + case 3: + { + Gtk::MenuItem* menu = dynamic_cast(App::ui_manager()->get_widget("/menu-main/menu-layer")); + if(menu && menu->get_submenu()) + { + //menu->set_accel_group(App::ui_manager()->get_accel_group()); + //menu->accelerate(*this); + menu->get_submenu()->popup(button,gtk_get_current_event_time()); + } + + #if 0 + bool multiple_selected=true; + + if(layer_tree->get_selection()->count_selected_rows()<=1) + multiple_selected=false; + + // If the clicked row is not selected, then unselect + // everything that isn't selected and select this row + if(multiple_selected && !layer_tree->get_selection()->is_selected(row)) + { + layer_tree->get_selection()->unselect_all(); + layer_tree->get_selection()->select(row); + multiple_selected=false; + } + + if(column_id==COLUMNID_TIME_TRACK) + return false; + + //synfigapp::ValueDesc value_desc(row[layer_param_tree_model.value_desc]); + //ValueNode::Handle value_node(row[layer_param_tree_model.value_node]); + //ValueNode::Handle parent_value_node; + //ValueBase value=row[layer_param_tree_model.value]; + + //if(row.parent()) + //{ + // parent_value_node=(*row.parent())[layer_tree_model.value_node]; + //} + + { + Layer::Handle layer(row[layer_tree_model.layer]); + synfigapp::Action::ParamList param_list; + param_list.add("time",canvas_interface()->get_time()); + param_list.add("canvas",Canvas::Handle(row[layer_tree_model.canvas])); + param_list.add("canvas_interface",canvas_interface()); + if(!multiple_selected) + param_list.add("layer",layer); + else + { + synfigapp::SelectionManager::LayerList layer_list(get_selection_manager()->get_selected_layers()); + synfigapp::SelectionManager::LayerList::iterator iter; + + for(iter=layer_list.begin();iter!=layer_list.end();++iter) + param_list.add("layer",Layer::Handle(*iter)); + } + + parammenu.items().clear(); + + Gtk::Menu *newlayers(manage(new Gtk::Menu())); + // do we need this? the code is all #ifdef'ed out anyway + // newlayers->signal_hide().connect(sigc::bind(sigc::ptr_fun(&delete_widget), newlayers)); + build_new_layer_menu(*newlayers); + + parammenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("New Layer"),*newlayers)); + if(!multiple_selected && layer->get_name()=="PasteCanvas") + { + parammenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Select All Children"), + sigc::bind( + sigc::mem_fun( + *layer_tree, + &studio::LayerTree::select_all_children_layers + ), + layer + ) + )); + } + + add_actions_to_menu(¶mmenu, param_list,synfigapp::Action::CATEGORY_LAYER); + parammenu.popup(button,gtk_get_current_event_time()); + return true; + } +/* + else if(column_id==LayerTree::COLUMNID_TIME_TRACK && value_node && handle::cast_dynamic(value_node)) + { + // Right-click on time track with animated +// trackmenu.popup(0,0); + return true; + } + else + { + if(!multiple_selected) + { + popup_param_menu(value_desc); + return true; + } + else + { +#warning update me! +#if 0 + parammenu.items().clear(); + parammenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Connect"), + hide_return(sigc::mem_fun(*canvas_interface().get(),&synfigapp::CanvasInterface::connect_selected_layer_params)) + )); + parammenu.items().push_back(Gtk::Menu_Helpers::MenuElem(_("Disconnect"), + hide_return(sigc::mem_fun(*canvas_interface().get(),&synfigapp::CanvasInterface::disconnect_selected_layer_params)) + )); + parammenu.popup(0,0); +#endif + } + return true; + } + */ +#endif +} + return true; + break; + + default: + return false; + break; + } +} + +bool +CanvasView::on_children_user_click(int button, Gtk::TreeRow row, ChildrenTree::ColumnID column_id) +{ + switch(button) + { + case 3: + { + if(column_id==COLUMNID_TIME_TRACK) + return false; + if(!(bool)row[children_tree_model.is_canvas]) + { + synfigapp::ValueDesc value_desc=row[children_tree_model.value_desc]; + if (!value_desc) + { + //! \todo fix properly -- what is the child dialog for? + synfig::info("preventing child dialog right-click crash"); + return true; + } + assert(value_desc); + popup_param_menu(value_desc); + return true; + } + } + return true; + break; + + default: + return false; + break; + } +} + +bool +CanvasView::on_keyframe_tree_event(GdkEvent *event) +{ + switch(event->type) + { + case GDK_BUTTON_PRESS: + switch(event->button.button) + { + case 3: + { + //keyframemenu.popup(event->button.button,gtk_get_current_event_time()); + return true; + } + break; + } + break; + case GDK_MOTION_NOTIFY: + break; + case GDK_BUTTON_RELEASE: + break; + default: + break; + } + return false; +} + +void +CanvasView::refresh_time_window() +{ + //THESE SHOULD AUTOMATICALLY BE TAKEN CARE OF + //time_adjustment().set_lower(time_window_adjustment().get_value()); + //time_adjustment().set_upper(time_window_adjustment().get_value()+time_window_adjustment().get_page_size()); + + time_adjustment().set_page_increment(1.0); // One second + time_adjustment().set_page_size(0); + + if(get_canvas()) + time_adjustment().set_step_increment(1.0/get_canvas()->rend_desc().get_frame_rate()); + time_adjustment().changed(); + + //NOTE THIS SHOULD HOOK INTO THE CORRECT SIGNALS... + if(children_tree) + children_tree->queue_draw(); +} + +void +CanvasView::on_time_changed() +{ + Time time(get_time()); + + current_time_widget->set_value(time); + try { + get_canvas()->keyframe_list().find(time); + current_time_widget->modify_text(Gtk::STATE_NORMAL,Gdk::Color("#FF0000")); + }catch(...){ + current_time_widget->modify_text(Gtk::STATE_NORMAL,Gdk::Color("#000000")); + } + + if(get_time() != time_adjustment().get_value()) + { + //Recenters the window, causing it to jump (possibly undesirably... but whatever) + if(time < time_window_adjustment().get_value() || + time > time_window_adjustment().get_value()+time_window_adjustment().get_page_size()) + { + time_window_adjustment().set_value( + time-time_window_adjustment().get_page_size()/2 + ); + } + time_adjustment().set_value(time); + time_adjustment().value_changed(); + + // Shouldn't these trees just hook into + // the time changed signal...? + //YES THEY SHOULD... + if(layer_tree)layer_tree->queue_draw(); + if(children_tree)children_tree->queue_draw(); + } +} + +void +CanvasView::time_zoom_in() +{ + float frame_rate = get_canvas()->rend_desc().get_frame_rate(); + Time min_page_size = 2/frame_rate; + + time_window_adjustment().set_page_size(time_window_adjustment().get_page_size()*0.75); + if (time_window_adjustment().get_page_size() < min_page_size) + time_window_adjustment().set_page_size(min_page_size); + time_window_adjustment().set_page_increment(time_window_adjustment().get_page_size()); + time_window_adjustment().changed(); + + refresh_time_window(); +} + +void +CanvasView::time_zoom_out() +{ + Time length = (get_canvas()->rend_desc().get_time_end() - + get_canvas()->rend_desc().get_time_start()); + + time_window_adjustment().set_page_size(time_window_adjustment().get_page_size()/0.75); + if (time_window_adjustment().get_page_size() > length) + time_window_adjustment().set_page_size(length); + time_window_adjustment().set_page_increment(time_window_adjustment().get_page_size()); + time_window_adjustment().changed(); + + refresh_time_window(); +} + +void +CanvasView::time_was_changed() +{ + synfig::Time time((synfig::Time)(double)time_adjustment().get_value()); + set_time(time); +} + +void +CanvasView::on_edited_value(synfigapp::ValueDesc value_desc,synfig::ValueBase new_value) +{ + canvas_interface()->change_value(value_desc,new_value); +} + +/* +void +CanvasView::on_children_edited_value(const Glib::ustring&path_string,synfig::ValueBase value) +{ + Gtk::TreePath path(path_string); + + const Gtk::TreeRow row = *(children_tree->get_model()->get_iter(path)); + + assert((bool)row[children_tree_model.is_value_node]); + + synfigapp::ValueDesc value_desc=row[children_tree_model.value_desc]; + assert(value_desc); + + on_edited_value(value_desc,value); +} +*/ + +void +CanvasView::on_id_changed() +{ + update_title(); +} + +void +CanvasView::on_mode_changed(synfigapp::CanvasInterface::Mode mode) +{ + // If the animate flag was set in mode... + Gtk::IconSize iconsize=Gtk::IconSize::from_name("synfig-small_icon"); + if(mode&synfigapp::MODE_ANIMATE) + { + Gtk::Image *icon; + icon=manage(new Gtk::Image(Gtk::StockID("gtk-no"),iconsize)); + animatebutton->remove(); + animatebutton->add(*icon); + tooltips.set_tip(*animatebutton,_("In Animate Editing Mode")); + icon->set_padding(0,0); + icon->show(); + } + else + { + Gtk::Image *icon; + icon=manage(new Gtk::Image(Gtk::StockID("gtk-yes"),iconsize)); + animatebutton->remove(); + animatebutton->add(*icon); + tooltips.set_tip(*animatebutton,_("Not in Animate Editing Mode")); + icon->set_padding(0,0); + icon->show(); + } + + if((mode&synfigapp::MODE_ANIMATE_FUTURE) && (mode&synfigapp::MODE_ANIMATE_PAST)) + { + Gtk::Image *icon; + icon=manage(new Gtk::Image(Gtk::StockID("synfig-keyframe_lock_all"),Gtk::ICON_SIZE_BUTTON)); + keyframebutton->remove(); + keyframebutton->add(*icon); + tooltips.set_tip(*keyframebutton,_("All Keyframes Locked")); + icon->set_padding(0,0); + icon->show(); + } + else if((mode&synfigapp::MODE_ANIMATE_FUTURE) && !(mode&synfigapp::MODE_ANIMATE_PAST)) + { + Gtk::Image *icon; + icon=manage(new Gtk::Image(Gtk::StockID("synfig-keyframe_lock_future"),Gtk::ICON_SIZE_BUTTON)); + keyframebutton->remove(); + keyframebutton->add(*icon); + tooltips.set_tip(*keyframebutton,_("Future Keyframes Locked")); + icon->set_padding(0,0); + icon->show(); + } + else if(!(mode&synfigapp::MODE_ANIMATE_FUTURE) && (mode&synfigapp::MODE_ANIMATE_PAST)) + { + Gtk::Image *icon; + icon=manage(new Gtk::Image(Gtk::StockID("synfig-keyframe_lock_past"),Gtk::ICON_SIZE_BUTTON)); + keyframebutton->remove(); + keyframebutton->add(*icon); + tooltips.set_tip(*keyframebutton,_("Past Keyframes Locked")); + icon->set_padding(0,0); + icon->show(); + } + else if(!(mode&synfigapp::MODE_ANIMATE_FUTURE) && !(mode&synfigapp::MODE_ANIMATE_PAST)) + { + Gtk::Image *icon; + icon=manage(new Gtk::Image(Gtk::StockID("synfig-keyframe_lock_none"),Gtk::ICON_SIZE_BUTTON)); + keyframebutton->remove(); + keyframebutton->add(*icon); + tooltips.set_tip(*keyframebutton,_("No Keyframes Locked")); + icon->set_padding(0,0); + icon->show(); + } + + work_area->queue_draw(); +} + +void +CanvasView::on_animate_button_pressed() +{ + if(get_mode()&synfigapp::MODE_ANIMATE) + set_mode(get_mode()-synfigapp::MODE_ANIMATE); + else + set_mode(get_mode()|synfigapp::MODE_ANIMATE); +} + +void +CanvasView::on_keyframe_button_pressed() +{ + synfigapp::CanvasInterface::Mode mode(get_mode()); + + // future && past --> past + if((mode&synfigapp::MODE_ANIMATE_FUTURE) && (mode&synfigapp::MODE_ANIMATE_PAST)) + set_mode(get_mode()-synfigapp::MODE_ANIMATE_FUTURE); + // past --> future + else if(!(mode&synfigapp::MODE_ANIMATE_FUTURE) && (mode&synfigapp::MODE_ANIMATE_PAST)) + set_mode((get_mode()-synfigapp::MODE_ANIMATE_PAST)|synfigapp::MODE_ANIMATE_FUTURE); + // future --> (nothing) + else if((mode&synfigapp::MODE_ANIMATE_FUTURE) && !(mode&synfigapp::MODE_ANIMATE_PAST)) + set_mode(get_mode()-synfigapp::MODE_ANIMATE_FUTURE); + // (nothing) --> future && past + else if(!(mode&synfigapp::MODE_ANIMATE_FUTURE) && !(mode&synfigapp::MODE_ANIMATE_PAST)) + set_mode(get_mode()|synfigapp::MODE_ANIMATE_FUTURE|synfigapp::MODE_ANIMATE_PAST); +} + +bool +CanvasView::duck_change_param(const synfig::Point &value,synfig::Layer::Handle layer, synfig::String param_name) +{ + return canvas_interface()->change_value(synfigapp::ValueDesc(layer,param_name),value); +} + +bool +CanvasView::on_duck_changed(const synfig::Point &value,const synfigapp::ValueDesc& value_desc) +{ + if (ValueNode_BLineCalcWidth::Handle bline_width = ValueNode_BLineCalcWidth::Handle::cast_dynamic(value_desc.get_value_node())) + { + Real old_width((*bline_width)(get_time()).get(Real())); + Real new_width(value.mag()); + int scale_index(bline_width->get_link_index_from_name("scale")); + Real scale((*(bline_width->get_link(scale_index)))(get_time()).get(Real())); + return canvas_interface()->change_value(synfigapp::ValueDesc(bline_width,scale_index), new_width * scale / old_width); + } + + if (ValueNode_BLineCalcVertex::Handle bline_vertex = ValueNode_BLineCalcVertex::Handle::cast_dynamic(value_desc.get_value_node())) + { + ValueNode_BLine::Handle bline = ValueNode_BLine::Handle::cast_dynamic(bline_vertex->get_link(bline_vertex->get_link_index_from_name("bline"))); + Real radius = 0.0; + Real amount = synfig::find_closest_point((*bline)(get_time()), value, radius, bline->get_loop()); + return canvas_interface()->change_value(synfigapp::ValueDesc(bline_vertex,bline_vertex->get_link_index_from_name("amount")), amount); + } + + if (ValueNode_BLineCalcTangent::Handle bline_tangent = ValueNode_BLineCalcTangent::Handle::cast_dynamic(value_desc.get_value_node())) + { + switch(value_desc.get_value_type()) + { + case ValueBase::TYPE_REAL: + { + Real old_length = (*bline_tangent)(get_time()).get(Real()); + Real new_length = value.mag(); + int scale_index(bline_tangent->get_link_index_from_name("scale")); + int fixed_length_index(bline_tangent->get_link_index_from_name("fixed_length")); + Real scale((*(bline_tangent->get_link(scale_index)))(get_time()).get(Real())); + bool fixed_length((*(bline_tangent->get_link(fixed_length_index)))(get_time()).get(bool())); + if (fixed_length) + return canvas_interface()->change_value(synfigapp::ValueDesc(bline_tangent,scale_index), new_length); + if (old_length == 0) + return true; + return canvas_interface()->change_value(synfigapp::ValueDesc(bline_tangent,scale_index), new_length * scale / old_length); + } + + case ValueBase::TYPE_ANGLE: + assert(0); // doesn't happen? + break; + + case ValueBase::TYPE_VECTOR: + { + Vector old_tangent = (*bline_tangent)(get_time()).get(Vector()); + Angle old_angle = old_tangent.angle(); + Real old_length = old_tangent.mag(); + Angle new_angle = value.angle(); + Real new_length = value.mag(); + int offset_index(bline_tangent->get_link_index_from_name("offset")); + int scale_index(bline_tangent->get_link_index_from_name("scale")); + int fixed_length_index(bline_tangent->get_link_index_from_name("fixed_length")); + Angle old_offset((*(bline_tangent->get_link(offset_index)))(get_time()).get(Angle())); + Real scale((*(bline_tangent->get_link(scale_index)))(get_time()).get(Real())); + bool fixed_length((*(bline_tangent->get_link(fixed_length_index)))(get_time()).get(bool())); + if (fixed_length) + { + if (!(canvas_interface()->change_value(synfigapp::ValueDesc(bline_tangent,scale_index), new_length))) + return false; + } + else if (old_length != 0 && !(canvas_interface()->change_value(synfigapp::ValueDesc(bline_tangent,scale_index), new_length * scale / old_length))) + return false; + return canvas_interface()->change_value(synfigapp::ValueDesc(bline_tangent,offset_index), old_offset + new_angle - old_angle); + } + default: + break; + } + } + + if (ValueNode_Scale::Handle scale_value_node = ValueNode_Scale::Handle::cast_dynamic(value_desc.get_value_node())) + { + int link_index(scale_value_node->get_link_index_from_name("link")); + if(scale_value_node->is_invertible(get_time())) + return canvas_interface()->change_value( + synfigapp::ValueDesc(scale_value_node,link_index), + scale_value_node->get_inverse(get_time(), value) + ); + else + return false; + } + + switch(value_desc.get_value_type()) + { + case ValueBase::TYPE_REAL: + return canvas_interface()->change_value(value_desc,value.mag()); + case ValueBase::TYPE_ANGLE: + return canvas_interface()->change_value(value_desc,Angle::tan(value[1],value[0])); + default: + return canvas_interface()->change_value(value_desc,value); + } +} + +bool +CanvasView::on_duck_angle_changed(const synfig::Angle &rotation,const synfigapp::ValueDesc& value_desc) +{ + if (ValueNode_BLineCalcTangent::Handle bline_tangent = ValueNode_BLineCalcTangent::Handle::cast_dynamic(value_desc.get_value_node())) + { + int offset_index(bline_tangent->get_link_index_from_name("offset")); + Angle old_offset((*(bline_tangent->get_link(offset_index)))(get_time()).get(Angle())); + return canvas_interface()->change_value(synfigapp::ValueDesc(bline_tangent,offset_index), old_offset + rotation); + } + + if (ValueNode_Scale::Handle scale_value_node = ValueNode_Scale::Handle::cast_dynamic(value_desc.get_value_node())) + { + int link_index(scale_value_node->get_link_index_from_name("link")); + if(scale_value_node->is_invertible(get_time())) + return canvas_interface()->change_value( + synfigapp::ValueDesc(scale_value_node,link_index), + scale_value_node->get_inverse(get_time(), rotation) + ); + else + return false; + + } + // \todo will this really always be the case? + assert(value_desc.get_value_type() == ValueBase::TYPE_ANGLE); + return canvas_interface()->change_value(value_desc, value_desc.get_value(get_time()).get(Angle()) + rotation); +} + +void +CanvasView::selected_layer_color_set(synfig::Color color) +{ + synfigapp::SelectionManager::LayerList selected_list(get_selection_manager()->get_selected_layers()); + synfigapp::SelectionManager::LayerList::iterator iter; + + // Create the action group + //synfigapp::PassiveGrouper group(canvas_interface()->get_instance(),_("Set Colors")); + + Layer::Handle layer; + for(iter=selected_list.begin();iter!=selected_list.end();++iter) + { + if(*iter==layer) + continue; + layer=*iter; + on_edited_value(synfigapp::ValueDesc(layer,"color"),color); + } +} + +void +CanvasView::rebuild_ducks_layer_(synfig::TransformStack& transform_stack, synfig::Canvas::Handle canvas, std::set& selected_list) +{ + int transforms(0); + String layer_name; + +#define QUEUE_REBUILD_DUCKS sigc::mem_fun(*this,&CanvasView::queue_rebuild_ducks) + + if(!canvas) + { + synfig::warning("CanvasView::rebuild_ducks_layer_(): Layer doesn't have canvas set"); + return; + } + for(Canvas::iterator iter(canvas->begin());iter!=canvas->end();++iter) + { + Layer::Handle layer(*iter); + + if(selected_list.count(layer)) + { + if(!curr_transform_stack_set) + { + curr_transform_stack_set=true; + curr_transform_stack=transform_stack; + } + + // This layer is currently selected. + duck_changed_connections.push_back(layer->signal_changed().connect(QUEUE_REBUILD_DUCKS)); + + // do the bounding box thing + bbox|=transform_stack.perform(layer->get_bounding_rect()); + + // Grab the layer's list of parameters + Layer::ParamList paramlist(layer->get_param_list()); + + // Grab the layer vocabulary + Layer::Vocab vocab=layer->get_param_vocab(); + Layer::Vocab::iterator iter; + + for(iter=vocab.begin();iter!=vocab.end();iter++) + { + if(!iter->get_hidden() && !iter->get_invisible_duck()) + { + synfigapp::ValueDesc value_desc(layer,iter->get_name()); + work_area->add_to_ducks(value_desc,this,transform_stack,&*iter); + if(value_desc.is_value_node()) + duck_changed_connections.push_back(value_desc.get_value_node()->signal_changed().connect(QUEUE_REBUILD_DUCKS)); + } + if(iter->get_name()=="color") + { + /* + if(!App::dialog_color->busy()) + { + App::dialog_color->reset(); + App::dialog_color->set_color(layer->get_param("color").get(Color())); + App::dialog_color->signal_edited().connect( + sigc::mem_fun( + *this, + &studio::CanvasView::selected_layer_color_set + ) + ); + } + */ + } + } + } + + layer_name=layer->get_name(); + + if(layer->active()) + { + Transform::Handle trans(layer->get_transform()); + if(trans) + { + transform_stack.push(trans); + transforms++; + } + +/* // Add transforms onto the stack + if(layer_name=="Translate") + { + transform_stack.push(synfig::Transform_Translate(layer->get_param("origin").get(Vector()))); + transforms++; + }else + if(layer_name=="Zoom") + { + Vector scale; + scale[0]=scale[1]=exp(layer->get_param("amount").get(Real())); + transform_stack.push(synfig::Transform_Scale(scale,layer->get_param("center").get(Vector()))); + transforms++; + }else + if(layer_name=="stretch") + { + Vector scale(layer->get_param("amount").get(Vector())); + transform_stack.push(synfig::Transform_Scale(scale,layer->get_param("center").get(Vector()))); + transforms++; + }else + if(layer_name=="Rotate") + { + transform_stack.push(synfig::Transform_Rotate(layer->get_param("amount").get(Angle()),layer->get_param("origin").get(Vector()))); + transforms++; + } +*/ + } + + // If this is a paste canvas layer, then we need to + // descend into it + if(layer_name=="PasteCanvas") + { + Vector scale; + scale[0]=scale[1]=exp(layer->get_param("zoom").get(Real())); + Vector origin(layer->get_param("origin").get(Vector())); + + Canvas::Handle child_canvas(layer->get_param("canvas").get(Canvas::Handle())); + Vector focus(layer->get_param("focus").get(Vector())); + + if(!scale.is_equal_to(Vector(1,1))) + transform_stack.push(new Transform_Scale(layer->get_guid(), scale,origin+focus)); + if(!origin.is_equal_to(Vector(0,0))) + transform_stack.push(new Transform_Translate(layer->get_guid(), origin)); + + rebuild_ducks_layer_(transform_stack,child_canvas,selected_list); + + if(!origin.is_equal_to(Vector(0,0))) + transform_stack.pop(); + if(!scale.is_equal_to(Vector(1,1))) + transform_stack.pop(); + } + } + // Remove all of the transforms we have added + while(transforms--) { transform_stack.pop(); } + +#undef QUEUE_REBUILD_DUCKS +} + +void +CanvasView::queue_rebuild_ducks() +{ +#if 0 + if(rebuild_ducks_queued) + return; +#else + if(rebuild_ducks_queued) + queue_rebuild_ducks_connection.disconnect(); +#endif + + queue_rebuild_ducks_connection=Glib::signal_timeout().connect( + sigc::bind_return( + sigc::mem_fun(*this,&CanvasView::rebuild_ducks), + false + ), + 50 + ); + + rebuild_ducks_queued=true; +} + +void +CanvasView::rebuild_ducks() +{ + /*static int i=0; + i++; + if(i>30) + synfig::info("%d",i/(i-i)); + */ + + rebuild_ducks_queued=false; + //queue_rebuild_ducks_connection.disconnect(); + + if(work_area->is_dragging()) + { + queue_rebuild_ducks(); + return; + } + + if(!duck_refresh_flag) + { + duck_refresh_needed=true; + return; + } + + bbox=Rect::zero(); + + work_area->clear_ducks(); + work_area->set_time(get_time()); + get_canvas()->set_time(get_time()); + curr_transform_stack.clear(); + //curr_transform_stack.push(new Transform_Translate(Point(0,0))); + curr_transform_stack_set=false; + + for(;!duck_changed_connections.empty();duck_changed_connections.pop_back())duck_changed_connections.back().disconnect(); + + //get_canvas()->set_time(get_time()); + bool not_empty(false); + + // First do the layers... + do{ + synfigapp::SelectionManager::LayerList selected_list(get_selection_manager()->get_selected_layers()); + std::set layer_set(selected_list.begin(),selected_list.end()); + + if(!layer_set.empty()) + not_empty=true; + + synfig::TransformStack transform_stack; + + rebuild_ducks_layer_(transform_stack, get_canvas(), layer_set); + + }while(0); + + // Now do the children + do{ + synfigapp::SelectionManager::ChildrenList selected_list(get_selection_manager()->get_selected_children()); + synfigapp::SelectionManager::ChildrenList::iterator iter; + synfig::TransformStack transform_stack; + + if(selected_list.empty()) + { + break; + } + else + { + not_empty=true; + for(iter=selected_list.begin();iter!=selected_list.end();++iter) + { + work_area->add_to_ducks(*iter,this,transform_stack); + } + } + }while(0); + work_area->refresh_selected_ducks(); + work_area->queue_draw_preview(); +} + +void +CanvasView::decrease_low_res_pixel_size() +{ + if(changing_resolution_) + return; + changing_resolution_=true; + list sizes = CanvasView::get_pixel_sizes(); + int pixel_size = work_area->get_low_res_pixel_size(); + for (list::iterator iter = sizes.begin(); iter != sizes.end(); iter++) + if (*iter == pixel_size) + { + if (iter == sizes.begin()) + // we already have the smallest low-res pixels possible - turn off low-res instead + work_area->set_low_resolution_flag(false); + else + { + iter--; + Glib::RefPtr action = action_group->get_action(strprintf("lowres-pixel-%d", *iter)); + action->activate(); // to make sure the radiobutton in the menu is updated too + work_area->set_low_resolution_flag(true); + } + break; + } + // Update the "toggle-low-res" action + Glib::RefPtr action = Glib::RefPtr::cast_dynamic(action_group->get_action("toggle-low-res")); + action->set_active(work_area->get_low_resolution_flag()); + // Update toggle low res button + resolutiondial->update_lowres(work_area->get_low_resolution_flag()); + changing_resolution_=false; +} + +void +CanvasView::increase_low_res_pixel_size() +{ + if(changing_resolution_) + return; + changing_resolution_=true; + list sizes = CanvasView::get_pixel_sizes(); + int pixel_size = work_area->get_low_res_pixel_size(); + if (!work_area->get_low_resolution_flag()) + { + // We were using "hi res" so change it to low res. + work_area->set_low_resolution_flag(true); + // Update the "toggle-low-res" action + Glib::RefPtr action = Glib::RefPtr::cast_dynamic(action_group->get_action("toggle-low-res")); + action->set_active(true); + // Update the toggle low res button + resolutiondial->update_lowres(true); + changing_resolution_=false; + return; + } + + for (list::iterator iter = sizes.begin(); iter != sizes.end(); iter++) + if (*iter == pixel_size) + { + iter++; + if (iter != sizes.end()) + { + Glib::RefPtr action = action_group->get_action(strprintf("lowres-pixel-%d", *iter)); + action->activate(); // to make sure the radiobutton in the menu is updated too + work_area->set_low_resolution_flag(true); + } + break; + } + // Update the "toggle-low-res" action + Glib::RefPtr action = Glib::RefPtr::cast_dynamic(action_group->get_action("toggle-low-res")); + action->set_active(work_area->get_low_resolution_flag()); + // Update toggle low res button + resolutiondial->update_lowres(work_area->get_low_resolution_flag()); + changing_resolution_=false; +} + +void +CanvasView::toggle_low_res_pixel_flag() +{ + if(changing_resolution_) + return; + changing_resolution_=true; + work_area->toggle_low_resolution_flag(); + // Update the toggle low res button + resolutiondial->update_lowres(work_area->get_low_resolution_flag()); + // Update the "toggle-low-res" action + Glib::RefPtr action = Glib::RefPtr::cast_dynamic(action_group->get_action("toggle-low-res")); + action->set_active(work_area->get_low_resolution_flag()); + changing_resolution_=false; +} + +void +CanvasView::update_quality() +{ + //if(working_depth) + // return; + if(updating_quality_) + return; + updating_quality_=true; + work_area->set_quality((int) quality_spin->get_value()); + // Update Quality Radio actions + Glib::RefPtr action=Glib::RefPtr::cast_dynamic( + action_group->get_action(strprintf("quality-%02d",(int) quality_spin->get_value())) + ); + action->set_active(); + + updating_quality_=false; +} + +void +CanvasView::set_quality(int x) +{ + if(updating_quality_) + return; + work_area->set_quality(x); + // Update the quality spin button + quality_spin->set_value(x); +} + +void +CanvasView::set_onion_skins() +{ + if(toggling_onion_skin) + return; + int onion_skins[2]; + onion_skins[0]=past_onion_spin->get_value(); + onion_skins[1]=future_onion_spin->get_value(); + work_area->set_onion_skins(onion_skins); +} + +void +CanvasView::toggle_show_grid() +{ + if(toggling_show_grid) + return; + toggling_show_grid=true; + work_area->toggle_grid(); + // Update the toggle grid show action + set_grid_show_toggle(work_area->grid_status()); + // Update the toggle grid show check button + show_grid->set_active(work_area->grid_status()); + toggling_show_grid=false; +} + +void +CanvasView::toggle_snap_grid() +{ + if(toggling_snap_grid) + return; + toggling_snap_grid=true; + work_area->toggle_grid_snap(); + // Update the toggle grid snap action + set_grid_snap_toggle(work_area->get_grid_snap()); + // Update the toggle grid snap check button + snap_grid->set_active(work_area->get_grid_snap()); + toggling_snap_grid=false; +} + +void +CanvasView::toggle_onion_skin() +{ + if(toggling_onion_skin) + return; + toggling_onion_skin=true; + work_area->toggle_onion_skin(); + // Update the toggle onion skin action + Glib::RefPtr action = Glib::RefPtr::cast_dynamic(action_group->get_action("toggle-onion-skin")); + action->set_active(work_area->get_onion_skin()); + // Update the toggle grid snap check button + onion_skin->set_active(work_area->get_onion_skin()); + toggling_onion_skin=false; +} + +void +CanvasView::on_dirty_preview() +{ + if(!is_playing_) + { + IsWorking is_working(*this); + + work_area->queue_render_preview(); + } +} + +void +CanvasView::play() +{ + assert(get_canvas()); + + // If we are already busy, don't play! + if(working_depth)return; + + // Set us up as working + IsWorking is_working(*this); + + etl::clock timer; + Time + time=work_area->get_time(), + endtime=get_canvas()->rend_desc().get_time_end(); + + // If we are already at the end of time, start over + if(time==endtime) + time=get_canvas()->rend_desc().get_time_start(); + + is_playing_=true; + + work_area->clear_ducks(); + + for(timer.reset(); time + timer() < endtime;) + { + //Clamp the time window so we can see the time value as it races across the horizon + bool timewindreset = false; + + while( time + timer() > Time(time_window_adjustment().get_sub_upper()) ) + { + time_window_adjustment().set_value( + min( + time_window_adjustment().get_value()+time_window_adjustment().get_page_size()/2, + time_window_adjustment().get_upper()-time_window_adjustment().get_page_size() ) + ); + timewindreset = true; + } + + while( time + timer() < Time(time_window_adjustment().get_sub_lower()) ) + { + time_window_adjustment().set_value( + max( + time_window_adjustment().get_value()-time_window_adjustment().get_page_size()/2, + time_window_adjustment().get_lower()) + ); + + timewindreset = true; + } + + //we need to tell people that the value changed + if(timewindreset) time_window_adjustment().value_changed(); + + //update actual time to next step + time_adjustment().set_value(time+timer()); + time_adjustment().value_changed(); + + if(!work_area->sync_render_preview()) + break; + + // wait for the workarea to refresh itself + while (studio::App::events_pending()) + studio::App::iteration(false); + + if(get_cancel_status()) + { + is_playing_=false; + return; + } + } + on_play_stop_pressed(); + is_playing_=false; + time_adjustment().set_value(endtime); + time_adjustment().value_changed(); +} + +void +CanvasView::show_tables() +{ +/* + Smach::event_result x(process_event_key(EVENT_TABLES_SHOW)); + if(x==Smach::RESULT_OK || x==Smach::RESULT_ACCEPT) + { + Gtk::IconSize iconsize=Gtk::IconSize::from_name("synfig-small_icon"); + treetogglebutton->remove(); + treetogglebutton->add(*manage(new Gtk::Image(Gtk::StockID("gtk-go-down"),iconsize))); + treetogglebutton->show_all(); + notebook->show(); + } +*/ +} + +void +CanvasView::hide_tables() +{ +/* + Smach::event_result x(process_event_key(EVENT_TABLES_HIDE)); + if(x==Smach::RESULT_OK || x==Smach::RESULT_ACCEPT) + { + Gtk::IconSize iconsize=Gtk::IconSize::from_name("synfig-small_icon"); + treetogglebutton->remove(); + treetogglebutton->add(*manage(new Gtk::Image(Gtk::StockID("gtk-go-up"),iconsize))); + treetogglebutton->show_all(); + notebook->hide(); + } +*/ +} + +bool +CanvasView::tables_are_visible() +{ +// return notebook->is_visible(); + return false; +} + +void +CanvasView::toggle_tables() +{ +// if(tables_are_visible()) +// hide_tables(); +// else +// show_tables(); +} + +void +CanvasView::show_timebar() +{ + timebar->show(); + //current_time_widget->show(); // not needed now that belongs to the timebar + + //keyframe_tab_child->show(); + if(layer_tree) + layer_tree->set_show_timetrack(true); + if(children_tree) + children_tree->set_show_timetrack(true); +} + +void +CanvasView::hide_timebar() +{ + timebar->hide(); + //current_time_widget->hide(); // not needed now that belongs to the timebar + //keyframe_tab_child->hide(); + if(layer_tree) + layer_tree->set_show_timetrack(false); + if(children_tree) + children_tree->set_show_timetrack(false); +} + +void +CanvasView::set_sensitive_timebar(bool sensitive) +{ + timebar->set_sensitive(sensitive); + //current_time_widget->set_sensitive(sensitive); //not needed now that belongs to timebar + //keyframe_tab_child->set_sensitive(sensitive); + if(layer_tree) + layer_tree->set_sensitive(sensitive); + if(children_tree) + children_tree->set_sensitive(sensitive); +} + +static void +set_waypoint_model(std::set > waypoints, + Waypoint::Model model, + etl::loose_handle canvas_interface) +{ + // Create the action group + synfigapp::Action::PassiveGrouper group(canvas_interface->get_instance().get(),_("Change Waypoint Group")); + + std::set >::const_iterator iter; + for(iter=waypoints.begin();iter!=waypoints.end();++iter) + { + Waypoint waypoint(*iter); + waypoint.apply_model(model); + + synfigapp::Action::Handle action(synfigapp::Action::create("WaypointSet")); + + assert(action); + + action->set_param("canvas",canvas_interface->get_canvas()); + action->set_param("canvas_interface",canvas_interface); + + action->set_param("waypoint",waypoint); + action->set_param("value_node",waypoint.get_parent_value_node()); + + if(!canvas_interface->get_instance()->perform_action(action)) + { + group.cancel(); + return; + } + } +} + +static void +duplicate_waypoints(std::set > waypoints, + etl::loose_handle canvas_interface) +{ + // Create the action group + synfigapp::Action::PassiveGrouper group(canvas_interface->get_instance().get(),_("Duplicate Waypoints")); + + std::set >::const_iterator iter; + for (iter = waypoints.begin(); iter != waypoints.end(); iter++) + { + Waypoint waypoint(*iter); + ValueNode::Handle value_node(iter->get_parent_value_node()); + canvas_interface->waypoint_duplicate(value_node, waypoint); + } +} + +static void +remove_waypoints(std::set > waypoints, + etl::loose_handle canvas_interface) +{ + // Create the action group + synfigapp::Action::PassiveGrouper group(canvas_interface->get_instance().get(),_("Remove Waypoints")); + + std::set >::const_iterator iter; + for (iter = waypoints.begin(); iter != waypoints.end(); iter++) + { + Waypoint waypoint(*iter); + ValueNode::Handle value_node(iter->get_parent_value_node()); + canvas_interface->waypoint_remove(value_node, waypoint); + } +} + +void +CanvasView::on_waypoint_clicked_canvasview(synfigapp::ValueDesc value_desc, + std::set > waypoint_set, + int button) +{ + int size = waypoint_set.size(); + Waypoint waypoint(*(waypoint_set.begin())); + Time time(waypoint.get_time()); + + if (size == 1) + { + waypoint_dialog.set_value_desc(value_desc); + waypoint_dialog.set_waypoint(waypoint); + } + + switch(button) + { + case -1: + if (size == 1) + waypoint_dialog.show(); + break; + case 2: + { + Gtk::Menu* waypoint_menu(manage(new Gtk::Menu())); + waypoint_menu->signal_hide().connect(sigc::bind(sigc::ptr_fun(&delete_widget), waypoint_menu)); + + Gtk::Menu* interp_menu_in(manage(new Gtk::Menu())); + Gtk::Menu* interp_menu_out(manage(new Gtk::Menu())); + Gtk::Menu* interp_menu_both(manage(new Gtk::Menu())); + + { + Waypoint::Model model; + + model.reset(); model.set_before(INTERPOLATION_TCB); + interp_menu_in->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_TCB"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + model.reset(); model.set_after(INTERPOLATION_TCB); + interp_menu_out->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_TCB"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + model.set_before(INTERPOLATION_TCB); + interp_menu_both->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_TCB"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + + model.reset(); model.set_before(INTERPOLATION_LINEAR); + interp_menu_in->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Linear"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + model.reset(); model.set_after(INTERPOLATION_LINEAR); + interp_menu_out->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Linear"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + model.set_before(INTERPOLATION_LINEAR); + interp_menu_both->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Linear"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + + model.reset(); model.set_before(INTERPOLATION_HALT); + interp_menu_in->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Ease In"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + model.reset(); model.set_after(INTERPOLATION_HALT); + interp_menu_out->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Ease Out"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + model.set_before(INTERPOLATION_HALT); + interp_menu_both->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Ease In/Out"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + + model.reset(); model.set_before(INTERPOLATION_CONSTANT); + interp_menu_in->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Constant"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + model.reset(); model.set_after(INTERPOLATION_CONSTANT); + interp_menu_out->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Constant"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + model.set_before(INTERPOLATION_CONSTANT); + interp_menu_both->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Constant"), + sigc::bind(sigc::ptr_fun(set_waypoint_model), waypoint_set, model, canvas_interface()))); + } + + // ------------------------------------------------------------------------ + if (size == 1) + { + const synfigapp::ValueDesc value_desc(synfig::ValueNode_Animated::Handle::cast_reinterpret(waypoint.get_parent_value_node()), time); + get_instance()->make_param_menu(waypoint_menu,canvas_interface()->get_canvas(),value_desc,0.5f); + + // ------------------------------------------------------------------------ + waypoint_menu->items().push_back(Gtk::Menu_Helpers::SeparatorElem()); + } + + // ------------------------------------------------------------------------ + waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Jump To"), + sigc::bind(sigc::mem_fun(*canvas_interface(), &synfigapp::CanvasInterface::set_time), time))); + + waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Duplicate"), + sigc::bind(sigc::ptr_fun(duplicate_waypoints), waypoint_set, canvas_interface()))); + + waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem((size == 1) ? _("_Remove") : strprintf(_("_Remove %d Waypoints"), size), + sigc::bind(sigc::ptr_fun(remove_waypoints), waypoint_set, canvas_interface()))); + + if (size == 1 && value_desc.is_valid()) + waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Edit"), + sigc::mem_fun(waypoint_dialog,&Gtk::Widget::show))); + + // ------------------------------------------------------------------------ + waypoint_menu->items().push_back(Gtk::Menu_Helpers::SeparatorElem()); + + // ------------------------------------------------------------------------ + waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Both"), *interp_menu_both)); + waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_In"), *interp_menu_in)); + waypoint_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("_Out"), *interp_menu_out)); + + // ------------------------------------------------------------------------ + waypoint_menu->popup(button+1,gtk_get_current_event_time()); + } + break; + + default: + break; + } +} + +void +CanvasView::on_waypoint_changed() +{ + synfigapp::Action::ParamList param_list; + param_list.add("canvas",get_canvas()); + param_list.add("canvas_interface",canvas_interface()); + param_list.add("value_node",waypoint_dialog.get_value_desc().get_value_node()); + param_list.add("waypoint",waypoint_dialog.get_waypoint()); +// param_list.add("time",canvas_interface()->get_time()); + + get_instance()->process_action("WaypointSetSmart", param_list); +} + +void +CanvasView::on_waypoint_delete() +{ + synfigapp::Action::ParamList param_list; + param_list.add("canvas",get_canvas()); + param_list.add("canvas_interface",canvas_interface()); + param_list.add("value_node",waypoint_dialog.get_value_desc().get_value_node()); + param_list.add("waypoint",waypoint_dialog.get_waypoint()); +// param_list.add("time",canvas_interface()->get_time()); + + get_instance()->process_action("WaypointRemove", param_list); +} + +void +CanvasView::on_drop_drag_data_received(const Glib::RefPtr& context, int /*x*/, int /*y*/, const Gtk::SelectionData& selection_data_, guint /*info*/, guint time) +{ + // We will make this true once we have a solid drop + bool success(false); + //synfig::info("Dropped data of type \"%s\"",selection_data.get_data_type()); + //synfig::info("Dropped data of target \"%s\"",gdk_atom_name(selection_data->target)); + //synfig::info("selection=\"%s\"",gdk_atom_name(selection_data->selection)); + + if ((selection_data_.get_length() >= 0) && (selection_data_.get_format() == 8)) + { + if(synfig::String(selection_data_.get_data_type())=="STRING")do + { + synfig::String selection_data((gchar *)(selection_data_.get_data())); + + Layer::Handle layer(synfig::Layer::create("Text")); + if(!layer) + break; + if(!layer->set_param("text",ValueBase(selection_data))) + break; + + synfigapp::Action::Handle action(synfigapp::Action::create("LayerAdd")); + + assert(action); + if(!action) + break; + + action->set_param("canvas",get_canvas()); + action->set_param("canvas_interface",canvas_interface()); + action->set_param("new",layer); + + if(!get_instance()->perform_action(action)) + break; + + // Ok, we have successfully imported at least one item. + success=true; + } while(0); // END of "STRING" + + if(synfig::String(selection_data_.get_data_type())=="text/plain") + { + synfig::String selection_data((gchar *)(selection_data_.get_data())); + + // For some reason, GTK hands us a list of URLs separated + // by not only Carriage-Returns, but also Line-Feeds. + // Line-Feeds will mess us up. Remove all the line-feeds. + while(selection_data.find_first_of('\r')!=synfig::String::npos) + selection_data.erase(selection_data.begin()+selection_data.find_first_of('\r')); + + std::stringstream stream(selection_data); + + //synfigapp::PassiveGrouper group(canvas_interface()->get_instance(),_("Insert Image")); + while(stream) + { + synfig::String filename,URI; + getline(stream,filename); + + // If we don't have a filename, move on. + if(filename.empty()) + continue; + + // Make sure this URL is of the "file://" type. + URI=String(filename.begin(),filename.begin()+sizeof("file://")-1); + if(URI!="file://") + { + synfig::warning("Unknown URI (%s) in \"%s\"",URI.c_str(),filename.c_str()); + continue; + } + + // Strip the "file://" part from the filename + filename=synfig::String(filename.begin()+sizeof("file://")-1,filename.end()); + + String ext(filename_extension(filename)); + if (ext.size()) ext = ext.substr(1); // skip initial '.' + + // If this is a SIF file, then we need to do things slightly differently + if(ext=="sketch") + { + if(work_area->load_sketch(filename)) + { + success=true; + work_area->queue_draw(); + } + } + else + { + String errors, warnings; + if(canvas_interface()->import(filename, errors, warnings, App::resize_imported_images)) + success=true; + if (warnings != "") + App::dialog_warning_blocking(_("Warnings"), strprintf("%s:\n\n%s", _("Warnings"), warnings.c_str())); + } + + continue; + } + } // END of "text/plain" + } + else + ui_interface_->error("Drop failed: bad selection data"); + + // Finish the drag + context->drag_finish(success, false, time); +} + +void +CanvasView::on_keyframe_add_pressed() +{ + synfigapp::Action::Handle action(synfigapp::Action::create("KeyframeAdd")); + + if(!action) + { + ui_interface_->error("I am unable to find the appropriate action"); + return; + } + + action->set_param("canvas",get_canvas()); + action->set_param("canvas_interface",canvas_interface()); + action->set_param("keyframe",Keyframe(get_time())); + + canvas_interface()->get_instance()->perform_action(action); +} + +void +CanvasView::on_keyframe_duplicate_pressed() +{ + const KeyframeTreeStore::Model model; + const Gtk::TreeRow row(*keyframe_tree->get_selection()->get_selected()); + Keyframe keyframe; + if(!row) + { + ui_interface_->error("I am unable to duplicate the keyframe"); + return; + } + keyframe=row[model.keyframe]; + + synfigapp::Action::Handle action(synfigapp::Action::create("KeyframeDuplicate")); + + if(!action) + { + ui_interface_->error("I am unable to find the appropriate action"); + return; + } + + action->set_param("canvas",get_canvas()); + action->set_param("canvas_interface",canvas_interface()); + action->set_param("keyframe",keyframe); + action->set_param("time",get_time()); + + canvas_interface()->get_instance()->perform_action(action); +} + +void +CanvasView::on_keyframe_remove_pressed() +{ + const KeyframeTreeStore::Model model; + const Gtk::TreeRow row(*keyframe_tree->get_selection()->get_selected()); + Keyframe keyframe; + if(!row) + { + ui_interface_->error("I am unable to remove the keyframe"); + return; + } + keyframe=row[model.keyframe]; + + synfigapp::Action::Handle action(synfigapp::Action::create("KeyframeRemove")); + + if(!action) + { + ui_interface_->error("I am unable to find the appropriate action"); + return; + } + + action->set_param("canvas",get_canvas()); + action->set_param("canvas_interface",canvas_interface()); + action->set_param("keyframe",keyframe); + + canvas_interface()->get_instance()->perform_action(action); +} + +void +CanvasView::toggle_duck_mask(Duckmatic::Type type) +{ + if(toggling_ducks_) + return; + toggling_ducks_=true; + bool is_currently_on(work_area->get_type_mask()&type); + + if(is_currently_on) + work_area->set_type_mask(work_area->get_type_mask()-type); + else + work_area->set_type_mask(work_area->get_type_mask()|type); + + work_area->queue_draw(); + try + { + // Update the toggle ducks actions + Glib::RefPtr action; + action = Glib::RefPtr::cast_dynamic(action_group->get_action("mask-position-ducks")); + action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_POSITION)); + action = Glib::RefPtr::cast_dynamic(action_group->get_action("mask-tangent-ducks")); + action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_TANGENT)); + action = Glib::RefPtr::cast_dynamic(action_group->get_action("mask-vertex-ducks")); + action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_VERTEX)); + action = Glib::RefPtr::cast_dynamic(action_group->get_action("mask-radius-ducks")); + action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_RADIUS)); + action = Glib::RefPtr::cast_dynamic(action_group->get_action("mask-width-ducks")); + action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_WIDTH)); + action = Glib::RefPtr::cast_dynamic(action_group->get_action("mask-angle-ducks")); + action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_ANGLE)); + // Update toggle ducks buttons + toggleducksdial->update_toggles(work_area->get_type_mask()); + } + catch(...) + { + toggling_ducks_=false; + } + toggling_ducks_=false; +} + +void +CanvasView::image_import() +{ + // String filename(dirname(get_canvas()->get_file_name())); + String filename("*.*"); + String errors, warnings; + if(App::dialog_open_file(_("Import Image"), filename, IMAGE_DIR_PREFERENCE)) + { + canvas_interface()->import(filename, errors, warnings, App::resize_imported_images); + if (warnings != "") + App::dialog_warning_blocking(_("Warnings"), strprintf("%s:\n\n%s", _("Warnings"), warnings.c_str())); + } +} + +Smach::event_result +CanvasView::process_event_key(EventKey x) +{ + return smach_.process_event(x); +} + +void +CanvasView::on_input_device_changed(GdkDevice* device) +{ + if(!device) + { + get_smach().egress(); + } + assert(device); + + synfigapp::InputDevice::Handle input_device; + input_device=synfigapp::Main::select_input_device(device->name); + App::toolbox->change_state(input_device->get_state()); + process_event_key(EVENT_INPUT_DEVICE_CHANGED); +} + +void +CanvasView::on_preview_option() +{ + Dialog_PreviewOptions *po = dynamic_cast(get_ext_widget("prevoptions")); + + Canvas::Handle canv = get_canvas(); + + if(canv) + { + RendDesc &r = canv->rend_desc(); + if(r.get_frame_rate()) + { + float rate = 1/r.get_frame_rate(); + float beg = r.get_time_start() + r.get_frame_start()*rate; + float end = r.get_time_start() + r.get_frame_end()*rate; + + if(!po) + { + po = new Dialog_PreviewOptions; + po->set_zoom(work_area->get_zoom()/2); + po->set_fps(r.get_frame_rate()/2); + po->set_begintime(beg); + po->set_begin_override(false); + po->set_endtime(end); + po->set_end_override(false); + + set_ext_widget("prevoptions",po); + } + /*po->set_zoom(work_area->get_zoom()/2); + po->set_fps(r.get_frame_rate()/2); + po->set_begintime(beg); + po->set_begin_override(false); + po->set_endtime(end); + po->set_end_override(false);*/ + + po->set_global_fps(r.get_frame_rate()); + po->signal_finish().connect(sigc::mem_fun(*this,&CanvasView::on_preview_create)); + po->present(); + } + } +} + +void +CanvasView::on_preview_create(const PreviewInfo &info) +{ + //set all the options + etl::handle prev = new Preview; + + prev->set_canvasview(this); + prev->set_zoom(info.zoom); + prev->set_fps(info.fps); + prev->set_overbegin(info.overbegin); + prev->set_begintime(info.begintime); + prev->set_overend(info.overend); + prev->set_endtime(info.endtime); + prev->set_quality(work_area->get_quality()); + + //render it out... + prev->render(); + + Dialog_Preview *pd = preview_dialog.get(); + assert(pd); + + pd->set_default_size(700,510); + pd->set_preview(prev.get()); + pd->present(); +} + +void +CanvasView::on_audio_option() +{ + synfig::warning("Launching Audio Options"); + sound_dialog->set_global_fps(get_canvas()->rend_desc().get_frame_rate()); + sound_dialog->present(); +} + +void +CanvasView::on_audio_file_change(const std::string &f) +{ + //save in meta data - always even when not valid... + canvas_interface()->set_meta_data("audiofile",f); +} + +void +CanvasView::on_audio_offset_change(const synfig::Time &t) +{ + canvas_interface()->set_meta_data("audiooffset",t.get_string()); +} + +void +CanvasView::on_audio_file_notify() +{ + std::string file(get_canvas()->get_meta_data("audiofile")); + if(!file.c_str()) return; + + if(!audio->load(file,dirname(get_canvas()->get_file_name())+string("/"))) + { + if(file != "") synfig::warning("Could not load the file: %s", file.c_str()); + get_canvas()->erase_meta_data("audiofile"); + disp_audio->hide(); + disp_audio->set_profile(etl::handle()); + }else + { + //save in canvasview + synfig::warning("Getting the profile of the music stuff"); + + //profile specific stuff for the preview widget + //similar for other attachments + Dialog_Preview *pd = preview_dialog.get(); + pd->get_widget().set_audio(audio); + + handle prof = audio->get_profile(); + + if(!prof) + { + synfig::warning("Agh, I couldn't build the profile captain!"); + } + pd->get_widget().set_audioprofile(prof); + + disp_audio->set_profile(audio->get_profile()); + disp_audio->show(); + + synfig::warning("successfully set the profiles and stuff"); + } + disp_audio->queue_draw(); +} + +void +CanvasView::on_audio_offset_notify() +{ + Time t(get_canvas()->get_meta_data("audiooffset"),get_canvas()->rend_desc().get_frame_rate()); + audio->set_offset(t); + sound_dialog->set_offset(t); + disp_audio->queue_draw(); + + // synfig::info("CanvasView::on_audio_offset_notify(): offset time set to %s",t.get_string(get_canvas()->rend_desc().get_frame_rate()).c_str()); +} + +void +CanvasView::play_audio(float t) +{ + if(audio.get()) + { + synfig::info("Playing audio at %f s",t); + audio->play(t); + } +} + +void +CanvasView::stop_audio() +{ + if(audio.get()) + { + audio->stop(); + } +} + +bool +CanvasView::on_audio_scrub() +{ + disp_audio->draw(); + return true; +} + +Glib::RefPtr +CanvasView::get_ref_obj(const synfig::String& x) +{ + return ref_obj_book_[x]; +} + +Glib::RefPtr +CanvasView::get_ref_obj(const synfig::String& x)const +{ + return ref_obj_book_.find(x)->second; +} + +void +CanvasView::set_ref_obj(const synfig::String& x, Glib::RefPtr y) +{ + ref_obj_book_[x]=y; +} + +Glib::RefPtr +CanvasView::get_tree_model(const synfig::String& x) +{ + return Glib::RefPtr::cast_dynamic(ref_obj_book_["_tree_model_"+x]); +} + +Glib::RefPtr +CanvasView::get_tree_model(const synfig::String& x)const +{ + return Glib::RefPtr::cast_dynamic(ref_obj_book_.find("_tree_model_"+x)->second); +} + +void +CanvasView::set_tree_model(const synfig::String& x, Glib::RefPtr y) +{ + ref_obj_book_["_tree_model_"+x]=Glib::RefPtr::cast_static(y); +} + +Gtk::Widget* +CanvasView::get_ext_widget(const synfig::String& x) +{ + return ext_widget_book_[x]; +} + +void +CanvasView::set_ext_widget(const synfig::String& x, Gtk::Widget* y) +{ + ext_widget_book_[x]=y; + if(x=="layers_cmp") + { + layer_tree=dynamic_cast(y); + + layer_tree->get_selection()->signal_changed().connect(SLOT_EVENT(EVENT_LAYER_SELECTION_CHANGED)); + layer_tree->get_selection()->signal_changed().connect(SLOT_EVENT(EVENT_REFRESH_DUCKS)); + layer_tree->signal_layer_user_click().connect(sigc::mem_fun(*this, &studio::CanvasView::on_layer_user_click)); + layer_tree->signal_param_user_click().connect(sigc::mem_fun(*this, &studio::CanvasView::on_children_user_click)); + layer_tree->signal_waypoint_clicked_layertree().connect(sigc::mem_fun(*this, &studio::CanvasView::on_waypoint_clicked_canvasview)); + } + if(x=="children") + { + children_tree=dynamic_cast(y); + if(children_tree)children_tree->signal_user_click().connect(sigc::mem_fun(*this, &studio::CanvasView::on_children_user_click)); + if(children_tree)children_tree->signal_waypoint_clicked_childrentree().connect(sigc::mem_fun(*this, &studio::CanvasView::on_waypoint_clicked_canvasview)); + if(children_tree)children_tree->get_selection()->signal_changed().connect(SLOT_EVENT(EVENT_REFRESH_DUCKS)); + } + if(x=="keyframes") + keyframe_tree=dynamic_cast(y); +} + +bool +CanvasView::on_delete_event(GdkEventAny* event __attribute__ ((unused))) +{ + close_view(); + + //! \todo This causes the window to be deleted straight away - but what if we prompt 'save?' and the user cancels? + // Is there ever any need to pass on the delete event to the window here? + // if(event) return Gtk::Window::on_delete_event(event); + + return true; +} + +//! Modify the play stop button apearence and play stop the animation +void +CanvasView::on_play_stop_pressed() +{ + Gtk::Image *icon; + Gtk::Button *stop_button; + stop_button=framedial->get_play_button(); + bool play_flag; + if(!is_playing()) + { + icon = manage(new Gtk::Image(Gtk::Stock::MEDIA_STOP, Gtk::IconSize::from_name("synfig-small_icon"))); + stop_button->set_relief(Gtk::RELIEF_NORMAL); + play_flag=true; + } + else + { + icon = manage(new Gtk::Image(Gtk::Stock::MEDIA_PLAY, Gtk::IconSize::from_name("synfig-small_icon"))); + stop_button->set_relief(Gtk::RELIEF_NONE); + play_flag=false; + } + stop_button->remove(); + stop_button->add(*icon); + icon->set_padding(0, 0); + icon->show(); + if(play_flag) play(); else stop(); +} diff --git a/synfig-studio/src/gtkmm/canvasview.h b/synfig-studio/src/gtkmm/canvasview.h new file mode 100644 index 0000000..cddcbe2 --- /dev/null +++ b/synfig-studio/src/gtkmm/canvasview.h @@ -0,0 +1,741 @@ +/* === S Y N F I G ========================================================= */ +/*! \file canvasview.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** Copyright (c) 2009 Carlos López +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_STUDIO_GTKMM_CANVASVIEW_H +#define __SYNFIG_STUDIO_GTKMM_CANVASVIEW_H + +/* === H E A D E R S ======================================================= */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include "instance.h" +#include "canvasproperties.h" +#include "canvasoptions.h" +#include "render.h" +#include "cellrenderer_timetrack.h" +#include "app.h" + +#include "layertreestore.h" +#include "layertree.h" +#include "childrentreestore.h" +#include "childrentree.h" +#include "keyframetreestore.h" +#include "keyframetree.h" + +#include "dialog_waypoint.h" +#include "dialog_keyframe.h" +#include "framedial.h" +#include "toggleducksdial.h" +#include "resolutiondial.h" +#include "widget_keyframe_list.h" + +#include "duckmatic.h" +#include + +#include + +#include "smach.h" + +#include +#include +#include +#include +#include +#include + +#include "adjust_window.h" + +#include + +/* === M A C R O S ========================================================= */ + +#ifndef DEBUGPOINT_CLASS +#if _DEBUG +#define DEBUGPOINT_CLASS(x) struct debugpointclass_ ## x { debugpointclass_ ## x () { DEBUGPOINT(); } ~debugpointclass_ ## x () { DEBUGPOINT(); } } badfthguae_ ## x ; +#else +#define DEBUGPOINT_CLASS(x) +#endif +#endif + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace synfig { + class TransformStack; +} + +namespace studio { + +class CanvasViewUIInterface; +class CanvasViewSelectionManager; + +class CellRenderer_TimeTrack; +class CellRenderer_ValueBase; +class UniversalScrubber; +class WorkArea; + +class Duckmatic; + +class Preview; +struct PreviewInfo; +class AudioContainer; + +class Widget_Sound; +class Widget_Timeslider; +class Widget_Time; + +class Dialog_SoundSelect; +class Dialog_Preview; + +class Dock_Layers; +class Dock_Children; +class Dock_Keyframes; + +class CanvasView : public Gtk::Window, public etl::shared_object +{ + friend class UniversalScrubber; + friend class Dock_Layers; + friend class Dock_Children; + friend class Dock_Keyframes; + + friend class CanvasViewUIInterface; + friend class CanvasViewSelectionManager; + + friend class Duckmatic; + + /* + -- ** -- P U B L I C T Y P E S --------------------------------------------- + */ + +public: + + typedef etl::handle Handle; + + typedef etl::handle ConstHandle; + + typedef etl::loose_handle LooseHandle; + + typedef LayerTreeStore::Model LayerTreeModel; + + typedef ChildrenTreeStore::Model ChildrenTreeModel; + + //! Create an instance of this class whenever doing a longer task. + /*! Make sure that you check the bool value of this class occasionally + ** to make sure the action has not been canceled. */ + class IsWorking + { + CanvasView &canvas_view_; + + public: + IsWorking(CanvasView &canvas_view_); + ~IsWorking(); + operator bool()const; + }; + friend class IsWorking; + + typedef synfigapp::CanvasInterface::Mode Mode; + + void set_grid_snap_toggle(bool flag) { grid_snap_toggle->set_active(flag); } + void set_grid_show_toggle(bool flag) { grid_show_toggle->set_active(flag); } + + /* + -- ** -- P R I V A T E D A T A --------------------------------------------- + */ + +public: + std::auto_ptr work_area; + + WorkArea* get_work_area() { return work_area.get(); } +private: + + synfig::TransformStack curr_transform_stack; + bool curr_transform_stack_set; + + synfig::Rect bbox; + + // DEBUGPOINT_CLASS(1); + + //! State Machine + Smach smach_; + + // DEBUGPOINT_CLASS(2); + + etl::loose_handle instance_; + etl::handle canvas_interface_; + + // DEBUGPOINT_CLASS(3); + + //! Sound and information to play it + etl::handle audio; + studio::Widget_Sound *disp_audio; //should this be put into thing too? + + sigc::connection playcon; + sigc::connection stopcon; + + std::auto_ptr universal_scrubber; + + //! Tooltip controller + Gtk::Tooltips tooltips; + + // DEBUGPOINT_CLASS(4); + + //! TreeModel for the layers + LayerTreeModel layer_tree_model; + + //! TreeModel for the the children + ChildrenTreeModel children_tree_model; + + //Glib::RefPtr layer_tree_store_; + + //Glib::RefPtr children_tree_store_; + + //Glib::RefPtr keyframe_tree_store_; + + // DEBUGPOINT_CLASS(5); + + //std::map > tree_model_book_; + std::map > ref_obj_book_; + std::map ext_widget_book_; + + //! The time adjustment's scope is defined by the time_window adjustment + Gtk::Adjustment time_adjustment_; + + //! The time_window adjustment governs the position of the time window on the whole time line + //Gtk::Adjustment time_window_adjustment_; + studio::Adjust_Window time_window_adjustment_; + + LayerTree *layer_tree; + + ChildrenTree *children_tree; + + KeyframeTree *keyframe_tree; + + Gtk::Widget *keyframe_tab_child; + + Gtk::ProgressBar *progressbar; + Gtk::Statusbar *statusbar; + + Gtk::TreeRow children_canvas_row; + Gtk::TreeRow children_valuenode_row; + + Gtk::Button *stopbutton; + Gtk::Button *refreshbutton; + Gtk::Button *treetogglebutton; // not used + Gtk::Notebook *notebook; // not used + Gtk::Table *timebar; + Gtk::Table *displaybar; + Gtk::Button *animatebutton; + Gtk::Button *keyframebutton; + FrameDial *framedial; + ToggleDucksDial *toggleducksdial; + bool toggling_ducks_; + ResolutionDial *resolutiondial; + bool changing_resolution_; + Gtk::Adjustment quality_adjustment_; + Gtk::SpinButton *quality_spin; + Gtk::Adjustment past_onion_adjustment_; + Gtk::SpinButton *past_onion_spin; + Gtk::Adjustment future_onion_adjustment_; + Gtk::SpinButton *future_onion_spin; + bool updating_quality_; + Gtk::ToggleButton *show_grid; + Gtk::ToggleButton *snap_grid; + Gtk::ToggleButton *onion_skin; + bool toggling_show_grid; + bool toggling_snap_grid; + bool toggling_onion_skin; + //! Shows current time and allows edition + Widget_Time *current_time_widget; + void on_current_time_widget_changed(); + + //! Time slider class. Same than the Time track panel + std::auto_ptr timeslider; + + //!Keyframe list slider + std::auto_ptr widget_kf_list; + + std::list duck_changed_connections; + +/* DEBUGPOINT_CLASS(8); + + Gtk::Menu duckmaskmenu; + DEBUGPOINT_CLASS(77); + Gtk::Menu qualitymenu; + DEBUGPOINT_CLASS(6); + + Gtk::Menu filemenu; + DEBUGPOINT_CLASS(777); + Gtk::Menu editmenu; + DEBUGPOINT_CLASS(71); + Gtk::Menu canvasmenu; + DEBUGPOINT_CLASS(73); +public: + Gtk::Menu layermenu; +private: + DEBUGPOINT_CLASS(74); + Gtk::Menu newlayermenu; + DEBUGPOINT_CLASS(76); + Gtk::Menu viewmenu; + + DEBUGPOINT_CLASS(99); + Gtk::Menu keyframemenu; + + Gtk::Menu parammenu; + DEBUGPOINT_CLASS(9); + Gtk::Menu trackmenu; + DEBUGPOINT_CLASS(7); + + Gtk::CheckMenuItem* duck_mask_position; + Gtk::CheckMenuItem* duck_mask_vertex; + Gtk::CheckMenuItem* duck_mask_tangent; + Gtk::CheckMenuItem* duck_mask_radius; + Gtk::CheckMenuItem* duck_mask_width; + Gtk::CheckMenuItem* duck_mask_angle; +*/ + //! Menu members + Gtk::Menu parammenu; + + Glib::RefPtr grid_snap_toggle; + Glib::RefPtr grid_show_toggle; + + Gtk::RadioButtonGroup quality_group; + Gtk::RadioButtonGroup low_res_pixel_size_group; + + Glib::RefPtr action_group; + + etl::handle ui_interface_; + etl::handle selection_manager_; + + bool is_playing_; + + sigc::signal signal_deleted_; + + bool rebuild_ducks_queued; + sigc::connection queue_rebuild_ducks_connection; + + /* + -- ** -- P U B L I C D A T A ----------------------------------------------- + */ + +public: + void queue_rebuild_ducks(); + sigc::signal& signal_deleted() { return signal_deleted_; } + + Gtk::Menu mainmenu; + + bool duck_refresh_flag; + bool duck_refresh_needed; + + //! This is for the IsWorking class. + int working_depth; + + bool cancel; + + /* + -- ** -- D I A L O G S ------------------------------------------------------- + */ + +public: + + CanvasProperties canvas_properties; + CanvasOptions canvas_options; + RenderSettings render_settings; + Dialog_Waypoint waypoint_dialog; + Dialog_Keyframe keyframe_dialog; + + std::auto_ptr preview_dialog; + //std::auto_ptr previewoption_dialog; + std::auto_ptr sound_dialog; + + /* + -- ** -- P R I V A T E M E T H O D S --------------------------------------- + */ + +private: + + // Constructor is private to force the use of the "create()" constructor + CanvasView(etl::loose_handle instance,etl::handle canvas_interface); + + //! Constructor Helper + // Gtk::Widget* create_layer_tree(); + + //! Constructor Helper + // Gtk::Widget* create_children_tree(); + + //! Constructor Helper + // Gtk::Widget* create_keyframe_tree(); + + //! Constructor Helper + Gtk::Widget* create_status_bar(); + + //! Constructor Helper - Initializes all of the menus + void init_menus(); + + bool duck_change_param(const synfig::Point &value,synfig::Layer::Handle layer, synfig::String param_name); + + void refresh_time_window(); + + void time_was_changed(); + + void refresh_rend_desc(); + + void toggle_duck_mask(Duckmatic::Type type); + + Gtk::Widget *create_work_area(); + + Gtk::Widget *create_time_bar(); + + Gtk::Widget *create_display_bar(); + + //! Pop up menu for the bezier (bline, draw) tool (?) + void popup_param_menu_bezier(float location, synfigapp::ValueDesc value_desc) + { popup_param_menu(value_desc,location,true); } + + //! Pop up menu for the tools but not the bezier ones. + void popup_param_menu(synfigapp::ValueDesc value_desc, float location=0, bool bezier=false); + + void workarea_layer_selected(synfig::Layer::Handle layer); + + void selected_layer_color_set(synfig::Color color); + + void register_layer_type(synfig::Layer::Book::value_type &lyr,std::map*); + + //! Rebuilds the "new layer" menu + void build_new_layer_menu(Gtk::Menu &menu); + + void rebuild_ducks_layer_(synfig::TransformStack& transform_stack, synfig::Canvas::Handle canvas, std::set& selected_list); + + void decrease_low_res_pixel_size(); + void increase_low_res_pixel_size(); + void toggle_low_res_pixel_flag(); + void set_quality(int x); + void set_onion_skins(); + void toggle_show_grid(); + void toggle_snap_grid(); + void toggle_onion_skin(); + + /* + -- ** -- P U B L I C M E T H O D S ----------------------------------------- + */ + +public: + const synfig::TransformStack& get_curr_transform_stack()const { return curr_transform_stack; } + + const synfig::Rect& get_bbox()const { return bbox; } + + Glib::RefPtr get_ref_obj(const synfig::String& x); + Glib::RefPtr get_ref_obj(const synfig::String& x)const; + void set_ref_obj(const synfig::String& x, Glib::RefPtr y); + + Glib::RefPtr get_tree_model(const synfig::String& x); + Glib::RefPtr get_tree_model(const synfig::String& x)const; + void set_tree_model(const synfig::String& x, Glib::RefPtr y); + + Gtk::Widget* get_ext_widget(const synfig::String& x); + void set_ext_widget(const synfig::String& x, Gtk::Widget* y); + + //std::map& tree_view_book() { return tree_view_book_; } + //std::map& ext_widget_book() { return tree_view_book_; } + + void popup_main_menu(); + + Smach& get_smach() { return smach_; } + + const Smach& get_smach()const { return smach_; } + + Smach::event_result process_event_key(EventKey x); + + void popup_layer_menu(synfig::Layer::Handle layer); + + virtual ~CanvasView(); + + void set_mode(Mode x) { canvas_interface()->set_mode(x); } + + Mode get_mode()const { return canvas_interface()->get_mode(); } + + Gtk::Adjustment &time_adjustment() { return time_adjustment_; } + + const Gtk::Adjustment &time_adjustment()const { return time_adjustment_; } + + studio::Adjust_Window &time_window_adjustment() { return time_window_adjustment_; } + + const studio::Adjust_Window &time_window_adjustment()const { return time_window_adjustment_; } + + etl::handle get_ui_interface() { return ui_interface_;} + + etl::handle get_selection_manager() { return selection_manager_; } + + Glib::RefPtr layer_tree_store() { return get_tree_model("layers"); } + + Glib::RefPtr layer_tree_store()const { return get_tree_model("layers"); } + + Glib::RefPtr children_tree_store() { return get_tree_model("children"); } + + Glib::RefPtr children_tree_store()const { return get_tree_model("children"); } + + Glib::RefPtr keyframe_tree_store() { return get_tree_model("keyframes"); } + + Glib::RefPtr keyframe_tree_store()const { return get_tree_model("keyframes"); } + + void set_time(synfig::Time t) { canvas_interface_->set_time(t); } + + synfig::Time get_time() { return canvas_interface_->get_time(); } + + etl::handle get_canvas()const { return canvas_interface_->get_canvas(); } + + etl::handle get_instance()const { return instance_; } + + etl::handle canvas_interface() { return canvas_interface_; } + + etl::handle canvas_interface()const { return canvas_interface_; } + + void add_actions_to_menu(Gtk::Menu *menu, const synfigapp::Action::ParamList ¶m_list, synfigapp::Action::Category category=synfigapp::Action::CATEGORY_ALL)const; + + //! Updates the title of the window + void update_title(); + + //! Closes this document + bool close_instance(); + + //! Closes this canvas view + bool close_view(); + + //! Stops the currently executing action + /*! \see get_cancel_status(), reset_cancel_status(), IsWorking */ + void stop() { cancel=true; } + + //! Returns the cancel status + /*! \see stop(), reset_cancel_status(), IsWorking */ + bool get_cancel_status()const { return cancel; } + + //! Resets the cancel status + /*! \see stop(), get_cancel_status(), IsWorking */ + void reset_cancel_status() { cancel=false; } + + void new_child_canvas(); + + //! Rebuilds layer_tree_store_ from the Canvas. Maintains selected items. + void rebuild_tables(); + + //! Builds layer_tree_store_ from the Canvas. Does not maintain selected items. + void build_tables(); + + //! Refreshes the data for the tables + void refresh_tables(); + + //void rebuild_layer_table(); + //void build_layer_table(); + //void refresh_layer_table(); + +// void rebuild_canvas_table(); +// void build_canvas_table(); +// void refresh_canvas_table(); + +// void rebuild_valuenode_table(); +// void build_valuenode_table(); +// void refresh_valuenode_table(); + + //! \writeme + void rebuild_ducks(); + + //bool add_to_ducks(synfigapp::ValueDesc value_desc, synfig::ParamDesc *param_desc=NULL); + + //! Starts "playing" the animation in real-time + void play(); + + //! Shows the tables (Layer/Children) + void show_tables(); + + //! Hides the tables (Layer/Children) + void hide_tables(); + + //! Toggles the tables + void toggle_tables(); + + //! Gets the table status + bool tables_are_visible(); + + //! Shows the time bar + void show_timebar(); + + //! Hides the time bar + void hide_timebar(); + + //t Enables or disables interaction with the timebar + void set_sensitive_timebar(bool sensitive); + + void time_zoom_in(); + void time_zoom_out(); + + void add_layer(synfig::String x); + + void show_keyframe_dialog(); + + void play_audio(float t); + void stop_audio(); + + void image_import(); + + void on_waypoint_clicked_canvasview(synfigapp::ValueDesc,std::set >, int button); + + void preview_option() {on_preview_option();} + + void present(); + + bool is_playing() { return is_playing_; } + + void update_quality(); + + + + /* + -- ** -- S I G N A L T E R M I N A L S ------------------------------------- + */ + +private: + + void on_select_layers(); + void on_unselect_layers(); + + void on_input_device_changed(GdkDevice*); + + virtual void on_hide(); + + virtual bool on_focus_in_event(GdkEventFocus*); + virtual bool on_focus_out_event(GdkEventFocus*); + + //bool on_children_tree_event(GdkEvent *event); + + bool on_keyframe_tree_event(GdkEvent *event); + + //void on_children_edited_value(const Glib::ustring&path_string,synfig::ValueBase value); + + void on_dirty_preview(); + + bool on_children_user_click(int, Gtk::TreeRow, ChildrenTree::ColumnID); + + bool on_layer_user_click(int, Gtk::TreeRow, LayerTree::ColumnID); + +// void on_layer_toggle(const Glib::ustring& path_string, Gtk::TreeModelColumn column); + + void on_mode_changed(synfigapp::CanvasInterface::Mode mode); + +// void on_layer_waypoint_clicked(const Glib::ustring &, synfig::ValueNode_Animated::WaypointList::iterator); + + //void on_children_waypoint_clicked(const Glib::ustring &, synfig::ValueNode_Animated::WaypointList::iterator); + + void on_waypoint_changed(); + + void on_waypoint_delete(); + + void on_refresh_pressed(); + + void on_id_changed(); + + void on_time_changed(); + + /* + void on_layer_raise_pressed(); + void on_layer_lower_pressed(); + void on_layer_duplicate_pressed(); + void on_layer_delete_pressed(); + */ + + void on_keyframe_add_pressed(); + + void on_keyframe_duplicate_pressed(); + + void on_keyframe_remove_pressed(); + + void on_animate_button_pressed(); + + void on_keyframe_button_pressed(); + + void on_preview_option(); + void on_preview_create(const PreviewInfo &); + + void on_audio_option(); + void on_audio_file_change(const std::string &f); + void on_audio_offset_change(const synfig::Time &t); + + void on_audio_file_notify(); + void on_audio_offset_notify(); + + bool on_duck_changed(const synfig::Point &value,const synfigapp::ValueDesc& value_desc); + bool on_duck_angle_changed(const synfig::Angle &rotation,const synfigapp::ValueDesc& value_desc); + + void on_layer_toggle(synfig::Layer::Handle); + + void on_edited_value(synfigapp::ValueDesc,synfig::ValueBase); + + void on_drop_drag_data_received(const Glib::RefPtr& context, int x, int y, const Gtk::SelectionData& selection_data, guint info, guint time); + + //void on_audio_play(); + bool on_audio_scrub(); + + void on_play_stop_pressed(); + +protected: + bool close_instance_when_safe(); + bool on_delete_event(GdkEventAny* event); + + /* + -- ** -- S T A T I C P U B L I C M E T H O D S --------------------------- + */ + +public: + + static etl::handle create(etl::loose_handle instance,etl::handle canvas); + static std::list& get_pixel_sizes(); + +}; // END of class CanvasView + +}; // END of namespace studio + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-studio/src/gtkmm/cellrenderer_gradient.cpp b/synfig-studio/src/gtkmm/cellrenderer_gradient.cpp new file mode 100644 index 0000000..ffbc218 --- /dev/null +++ b/synfig-studio/src/gtkmm/cellrenderer_gradient.cpp @@ -0,0 +1,95 @@ +/* === S Y N F I G ========================================================= */ +/*! \file cellrenderer_gradient.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include "cellrenderer_gradient.h" +#include "widget_gradient.h" +#include "app.h" + +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +//using namespace etl; +using namespace synfig; +using namespace studio; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +CellRenderer_Gradient::CellRenderer_Gradient(): + Glib::ObjectBase (typeid(CellRenderer_Gradient)), + Gtk::CellRendererText (), + property_gradient_(*this,"gradient",synfig::Gradient()) +{ + //CellRendererText::signal_edited().connect(sigc::mem_fun(*this,&studio::CellRenderer_Gradient::string_edited_)); +} + +CellRenderer_Gradient::~CellRenderer_Gradient() +{ +} + + +void +CellRenderer_Gradient::render_vfunc( + const Glib::RefPtr& window, + Gtk::Widget& /*widget*/, + const Gdk::Rectangle& /*background_area*/, + const Gdk::Rectangle& ca, + const Gdk::Rectangle& /*expose_area*/, + Gtk::CellRendererState /*flags*/) +{ + if(!window) + return; + render_gradient_to_window(window,ca,property_gradient_.get_value()); +} + + +Gtk::CellEditable* +CellRenderer_Gradient::start_editing_vfunc( + GdkEvent* /*event*/, + Gtk::Widget& /*widget*/, + const Glib::ustring& /*path*/, + const Gdk::Rectangle& /*background_area*/, + const Gdk::Rectangle& /*cell_area*/, + Gtk::CellRendererState /*flags*/) +{ + return 0; +} diff --git a/synfig-studio/src/gtkmm/cellrenderer_gradient.h b/synfig-studio/src/gtkmm/cellrenderer_gradient.h new file mode 100644 index 0000000..10b54c5 --- /dev/null +++ b/synfig-studio/src/gtkmm/cellrenderer_gradient.h @@ -0,0 +1,88 @@ +/* === S Y N F I G ========================================================= */ +/*! \file cellrenderer_gradient.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_STUDIO_CELLRENDERER_GRADIENT_H +#define __SYNFIG_STUDIO_CELLRENDERER_GRADIENT_H + +/* === H E A D E R S ======================================================= */ + +#include +#include + +#include +#include + +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace Gtk { class Entry; class Button; }; + +namespace studio { + +class CellRenderer_Gradient : public Gtk::CellRendererText +{ + sigc::signal signal_secondary_click_; + sigc::signal signal_edited_; + + Glib::Property property_gradient_; + +public: + sigc::signal &signal_edited() + {return signal_edited_; } + + Glib::PropertyProxy property_gradient() { return property_gradient_.get_proxy();} + + CellRenderer_Gradient(); + ~CellRenderer_Gradient(); + +protected: + + virtual void + render_vfunc( + const Glib::RefPtr& window, + Gtk::Widget& widget, + const Gdk::Rectangle& background_area, + const Gdk::Rectangle& ca, + const Gdk::Rectangle& expose_area, + Gtk::CellRendererState flags); + + virtual Gtk::CellEditable* start_editing_vfunc(GdkEvent* event, + Gtk::Widget& widget, + const Glib::ustring& path, + const Gdk::Rectangle& background_area, + const Gdk::Rectangle& cell_area, + Gtk::CellRendererState flags); + +}; // END of class CellRenderer_Gradient + +}; // END of namespace studio + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-studio/src/gtkmm/cellrenderer_time.cpp b/synfig-studio/src/gtkmm/cellrenderer_time.cpp new file mode 100644 index 0000000..5567a35 --- /dev/null +++ b/synfig-studio/src/gtkmm/cellrenderer_time.cpp @@ -0,0 +1,133 @@ +/* === S Y N F I G ========================================================= */ +/*! \file cellrenderer_time.cpp +** \brief Template File +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include "cellrenderer_time.h" +#include "app.h" +#include "widget_time.h" + +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +//using namespace etl; +using namespace synfig; +using namespace studio; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +CellRenderer_Time::CellRenderer_Time(): + Glib::ObjectBase (typeid(CellRenderer_Time)), + Gtk::CellRendererText (), + property_time_(*this,"time",synfig::Time(0)), + property_fps_(*this,"fps", float(0)) +{ + CellRendererText::signal_edited().connect(sigc::mem_fun(*this,&studio::CellRenderer_Time::string_edited_)); +} + +CellRenderer_Time::~CellRenderer_Time() +{ + if (getenv("SYNFIG_DEBUG_DESTRUCTORS")) + synfig::info("CellRenderer_Time::~CellRenderer_Time(): Deleted"); +} + +void +CellRenderer_Time::string_edited_(const Glib::ustring&path,const Glib::ustring&str) +{ + signal_edited_(path,Time((String)str,(Real)Time(property_fps_))); +} + +void +CellRenderer_Time::render_vfunc( + const Glib::RefPtr& window, + Gtk::Widget& widget, + const Gdk::Rectangle& background_area, + const Gdk::Rectangle& ca, + const Gdk::Rectangle& expose_area, + Gtk::CellRendererState flags) +{ + if(!window) + return; + //int height = ca.get_height(); + + Gtk::StateType state = Gtk::STATE_INSENSITIVE; + if(property_editable()) + state = Gtk::STATE_NORMAL; + if((flags & Gtk::CELL_RENDERER_SELECTED) != 0) + state = (widget.has_focus()) ? Gtk::STATE_SELECTED : Gtk::STATE_ACTIVE; + + const Time time(property_time_); + const float fps((Real)Time(property_fps_)); + + property_text()=(Glib::ustring)time.get_string(fps,App::get_time_format()); + + CellRendererText::render_vfunc(window,widget,background_area,ca,expose_area,flags); +} + + +Gtk::CellEditable* +CellRenderer_Time::start_editing_vfunc( + GdkEvent* event, + Gtk::Widget& widget, + const Glib::ustring& path, + const Gdk::Rectangle& background_area, + const Gdk::Rectangle& cell_area, + Gtk::CellRendererState flags) +{ + // If we aren't editable, then there is nothing to do + if(!property_editable()) + return 0; + + const Time time(property_time_); + const float fps((Real)Time(property_fps_)); + + property_text()=(Glib::ustring)time.get_string(fps,App::get_time_format()|Time::FORMAT_FULL); +#if 0 + Widget_Time* widget_time(manage(new Widget_Time)); + widget_time->set_fps(fps); + widget_time->set_value(time); + widget_time->signal_editing_done().connect(sigc::mem_fun(*this, &CellRenderer_Time::on_value_editing_done)); + return widget_time; +#else + return CellRendererText::start_editing_vfunc(event,widget,path,background_area,cell_area,flags); +#endif +} diff --git a/synfig-studio/src/gtkmm/cellrenderer_time.h b/synfig-studio/src/gtkmm/cellrenderer_time.h new file mode 100644 index 0000000..149f7d8 --- /dev/null +++ b/synfig-studio/src/gtkmm/cellrenderer_time.h @@ -0,0 +1,94 @@ +/* === S Y N F I G ========================================================= */ +/*! \file cellrenderer_time.h +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_STUDIO_CELLRENDERER_TIME_H +#define __SYNFIG_STUDIO_CELLRENDERER_TIME_H + +/* === H E A D E R S ======================================================= */ + +#include +#include + +#include +#include + +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace Gtk { class Entry; class Button; }; + +namespace studio { + +class CellRenderer_Time : public Gtk::CellRendererText +{ + sigc::signal signal_secondary_click_; + sigc::signal signal_edited_; + + Glib::Property property_time_; + Glib::Property property_fps_; + + void string_edited_(const Glib::ustring&,const Glib::ustring&); + + void on_value_editing_done(); + +public: + sigc::signal &signal_edited() + {return signal_edited_; } + + Glib::PropertyProxy property_time() { return property_time_.get_proxy();} + Glib::PropertyProxy property_fps() { return property_fps_.get_proxy();} + + CellRenderer_Time(); + ~CellRenderer_Time(); + +protected: + + virtual void + render_vfunc( + const Glib::RefPtr& window, + Gtk::Widget& widget, + const Gdk::Rectangle& background_area, + const Gdk::Rectangle& ca, + const Gdk::Rectangle& expose_area, + Gtk::CellRendererState flags); + + virtual Gtk::CellEditable* start_editing_vfunc(GdkEvent* event, + Gtk::Widget& widget, + const Glib::ustring& path, + const Gdk::Rectangle& background_area, + const Gdk::Rectangle& cell_area, + Gtk::CellRendererState flags); + +}; // END of class CellRenderer_Time + +}; // END of namespace studio + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-studio/src/gtkmm/cellrenderer_timetrack.cpp b/synfig-studio/src/gtkmm/cellrenderer_timetrack.cpp new file mode 100644 index 0000000..8382465 --- /dev/null +++ b/synfig-studio/src/gtkmm/cellrenderer_timetrack.cpp @@ -0,0 +1,906 @@ +/* === S Y N F I G ========================================================= */ +/*! \file cellrenderer_timetrack.cpp +** \brief Template Header +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "cellrenderer_timetrack.h" +#include +#include +#include +#include +#include "widget_value.h" +#include "app.h" +#include +#include +#include "widget_time.h" +#include "widget_timeslider.h" + +#include +#include "instance.h" + +#include "general.h" + +#endif + +using namespace synfig; +using namespace std; +using namespace etl; +using namespace studio; + +/* === M A C R O S ========================================================= */ + +/* === G L O B A L S ======================================================= */ + +static char stipple_xpm[] = { 2, 0 }; + +//mode for modifier keys +enum MODMODE +{ + NONE = 0, + SELECT_MASK = Gdk::CONTROL_MASK, + COPY_MASK = Gdk::SHIFT_MASK, + DELETE_MASK = Gdk::MOD1_MASK +}; + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +CellRenderer_TimeTrack::CellRenderer_TimeTrack(): + Glib::ObjectBase (typeid(CellRenderer_TimeTrack)), + Gtk::CellRenderer (), + adjustment_ (10,10,20,0,0,0), + + property_valuedesc_ (*this,"value_desc",synfigapp::ValueDesc()), + property_canvas_ (*this,"canvas",synfig::Canvas::Handle()), + property_adjustment_(*this,"adjustment",&adjustment_), + property_enable_timing_info_(*this,"enable-timing-info", false) +{ + dragging=false; + selection=false; +} + +CellRenderer_TimeTrack::~CellRenderer_TimeTrack() +{ + if (getenv("SYNFIG_DEBUG_DESTRUCTORS")) + synfig::info("CellRenderer_TimeTrack::~CellRenderer_TimeTrack(): Deleted"); +} + +void +CellRenderer_TimeTrack::set_adjustment(Gtk::Adjustment &x) +{ + property_adjustment_=&x; +// x.signal_value_changed().connect(sigc::mem_fun(*this,&Gtk::Widget::queue_draw)); +} + +synfig::Canvas::Handle +CellRenderer_TimeTrack::get_canvas()const +{ + return const_cast(this)->property_canvas().get_value(); +} + +Gtk::Adjustment * +CellRenderer_TimeTrack::get_adjustment() +{ + return (Gtk::Adjustment*)property_adjustment_; +} + +const Gtk::Adjustment * +CellRenderer_TimeTrack::get_adjustment()const +{ + return (const Gtk::Adjustment*)property_adjustment_; +} + +bool +CellRenderer_TimeTrack::is_selected(const Waypoint& waypoint)const +{ + return selected==waypoint; +} + +const synfig::Time get_time_offset_from_vdesc(const synfigapp::ValueDesc &v) +{ +#ifdef ADJUST_WAYPOINTS_FOR_TIME_OFFSET + if(getenv("SYNFIG_SHOW_CANVAS_PARAM_WAYPOINTS") || + v.get_value_type() != synfig::ValueBase::TYPE_CANVAS) + return synfig::Time::zero(); + + synfig::Canvas::Handle canvasparam = v.get_value().get(Canvas::Handle()); + if(!canvasparam) + return synfig::Time::zero(); + + if (!v.parent_is_layer_param()) + return synfig::Time::zero(); + + synfig::Layer::Handle layer = v.get_layer(); + + if (layer->get_name()!="PasteCanvas") + return synfig::Time::zero(); + + return layer->get_param("time_offset").get(Time()); +#else // ADJUST_WAYPOINTS_FOR_TIME_OFFSET + return synfig::Time::zero(); +#endif +} + +//kind of a hack... pointer is ugly +const synfig::Node::time_set *get_times_from_vdesc(const synfigapp::ValueDesc &v) +{ + if(!getenv("SYNFIG_SHOW_CANVAS_PARAM_WAYPOINTS") && + v.get_value_type() == synfig::ValueBase::TYPE_CANVAS) + { + synfig::Canvas::Handle canvasparam = v.get_value().get(Canvas::Handle()); + + if(canvasparam) + return &canvasparam->get_times(); + } + + ValueNode *base_value = v.get_value_node().get(); + + ValueNode_DynamicList *parent_value_node = + v.parent_is_value_node() ? + dynamic_cast(v.get_parent_value_node().get()) : + 0; + + //we want a dynamic list entry to override the normal... + if(parent_value_node) + { + return &parent_value_node->list[v.get_index()].get_times(); + }else if(base_value) //don't render stuff if it's just animated... + { + return &base_value->get_times(); + } + return 0; +} + +bool get_closest_time(const synfig::Node::time_set &tset, const Time &t, const Time &range, Time &out) +{ + Node::time_set::const_iterator i,j,end = tset.end(); + + // stop the crash mentioned in bug #1689282 + // doesn't solve the underlying problem though, I don't think + if (tset.size() == 0) + { + synfig::error(__FILE__":%d: tset.size() == 0",__LINE__); + return false; + } + + //TODO add in RangeGet so it's not so damn hard to click on points + + i = tset.upper_bound(t); //where t is the lower bound, t < [first,i) + j = i; --j; + + double dist = Time::end(); + double closest = 0; + + if(i != end) + { + closest = i->get_time(); + dist = abs(i->get_time() - t); + } + + if(j != end && (abs(j->get_time() - t) < dist) ) + { + closest = j->get_time(); + dist = abs(j->get_time() - t); + } + + if( dist <= range/2 ) + { + out = closest; + return true; + } + + return false; +} + +void +CellRenderer_TimeTrack::render_vfunc( + const Glib::RefPtr& window, + Gtk::Widget& widget, + const Gdk::Rectangle& /*background_area*/, + const Gdk::Rectangle& area_, + const Gdk::Rectangle& /*expose_area*/, + Gtk::CellRendererState /*flags*/) +{ + if(!window) + return; + + Glib::RefPtr gc(Gdk::GC::create(window)); + Glib::RefPtr inactive_gc(Gdk::GC::create(window)); + Gtk::Adjustment *adjustment=get_adjustment(); + // Gtk::StateType state = Gtk::STATE_ACTIVE; + // Gtk::ShadowType shadow; + + Gdk::Color + curr_time_color("#0000ff"), + inactive_color("#000000"), + keyframe_color("#a07f7f"); + Gdk::Color activepoint_color[2]; + + activepoint_color[0]=Gdk::Color("#ff0000"); + activepoint_color[1]=Gdk::Color("#00ff00"); + + inactive_gc->set_rgb_fg_color(inactive_color); + inactive_gc->set_stipple(Gdk::Bitmap::create(stipple_xpm,2,2)); + inactive_gc->set_fill(Gdk::STIPPLED); + + synfig::Canvas::Handle canvas(property_canvas().get_value()); + + synfigapp::ValueDesc value_desc = property_value_desc().get_value(); + synfig::ValueNode *base_value = value_desc.get_value_node().get(); + // synfig::ValueNode_Animated *value_node=dynamic_cast(base_value); + + synfig::ValueNode_DynamicList *parent_value_node(0); + if(property_value_desc().get_value().parent_is_value_node()) + parent_value_node=dynamic_cast(property_value_desc().get_value().get_parent_value_node().get()); + + // If the canvas is defined, then load up the keyframes + if(canvas) + { + const synfig::KeyframeList& keyframe_list(canvas->keyframe_list()); + synfig::KeyframeList::const_iterator iter; + + for(iter=keyframe_list.begin();iter!=keyframe_list.end();++iter) + { + if(!iter->get_time().is_valid()) + continue; + + const int x((int)((float)area_.get_width()/(adjustment->get_upper()-adjustment->get_lower())*(iter->get_time()-adjustment->get_lower()))); + if(iter->get_time()>=adjustment->get_lower() && iter->get_time()get_upper()) + { + gc->set_rgb_fg_color(keyframe_color); + window->draw_rectangle(gc, true, area_.get_x()+x, area_.get_y(), 1, area_.get_height()+1); + } + } + } + + //render all the time points that exist + { + const synfig::Node::time_set *tset = get_times_from_vdesc(value_desc); + + if(tset) + { + const synfig::Time time_offset = get_time_offset_from_vdesc(value_desc); + synfig::Node::time_set::const_iterator i = tset->begin(), end = tset->end(); + + float lower = adjustment->get_lower(), + upper = adjustment->get_upper(); + + Glib::RefPtr gc = Gdk::GC::create(widget.get_window()); + + Gdk::Rectangle area(area_); + gc->set_clip_rectangle(area); + gc->set_line_attributes(1,Gdk::LINE_SOLID,Gdk::CAP_BUTT,Gdk::JOIN_MITER); + + bool valselected = sel_value.get_value_node() == base_value && !sel_times.empty(); + + float cfps = get_canvas()->rend_desc().get_frame_rate(); + + vector

      f%LwUyOZeRu>0XPmg4y}Shp&|1z>Do^ z5lU<=TJtW0$rI{Lld%&k%RxR3X0`r4F1^FgdpcTv7C_4f$EX!dg|r67ZI&bHf2_Ck z^{XcB7J25dq1_zdMzefcL6qk?erdbzH~6WK4%6XhY|juriBlh{e^5BvZfgd_+%{XR zi(yFE0^}c$f_UXfS)hiq7t4J8Lz!fg`x}e-9%X9?d8`uK7_G9PtZV2{iV>6_pM1q{ zf;SFAF7TV+Ck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0U57hb0lT}(@L`P%j!+p=o`=tAxqeSZa&M`K?Ldj3S$Woc@u-c()^ZinRmcluV|lC8D1oaz)0I=aR5t0g#azq0--rEgbl!B;oE^l)~-!~{3X+SvF`PWwp(@D=F* z1p--vD7E`>zSIu3V9d9Wr;7uw<2KdoW4`FF%X5*NC}iL6fixxI5w=ZuTwx89lCK~A Tl>hU_Gg{8MjsA-IcZB~125_q5 literal 0 HcmV?d00001 diff --git a/synfig-studio/images/star_icon.sif b/synfig-studio/images/star_icon.sif new file mode 100644 index 0000000..b933e42 --- /dev/null +++ b/synfig-studio/images/star_icon.sif @@ -0,0 +1,551 @@ + + + Synfig Studio Star Icon + Placed in the Public Domain in 2008 by Carlos López (Genete) + + + + + + + + + + + + + -2.3637278080 + 0.2062759846 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.5688224435 + 2.1194937229 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.4810948372 + -0.9839330316 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.5429599285 + -2.0844035149 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.6772783995 + 0.3616140485 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6594920158 + -0.6549533606 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.036189 + 0.036189 + 0.036189 + 1.000000 + + + 0.012910 + 0.012910 + 0.012910 + 0.731343 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + 1.6070324183 + 0.3102017045 + + + + + 0.0000000000 + -3.4489021301 + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.4688332081 + -3.3694140911 + + + + + -0.5900356174 + 0.8074172139 + + + + + + 0.064115 + 0.064115 + 0.064115 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/string_icon.sif b/synfig-studio/images/string_icon.sif new file mode 100644 index 0000000..04f81d5 --- /dev/null +++ b/synfig-studio/images/string_icon.sif @@ -0,0 +1,65 @@ + + + Untitled0 + + + + + + + + + + + + STR + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + Sans Serif + + + + + + + + + + + + + + + + 1.0000000000 + 1.1250000000 + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + diff --git a/synfig-studio/images/swap_colors_icon.sif b/synfig-studio/images/swap_colors_icon.sif new file mode 100644 index 0000000..2b75b0b --- /dev/null +++ b/synfig-studio/images/swap_colors_icon.sif @@ -0,0 +1,308 @@ + + + Untitled1 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.3750000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.3750000000 + -0.2500000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -0.1250000000 + -0.2500000000 + + + + + 0.3750000000 + -0.8750000000 + + + + + 0.8750000000 + -0.2500000000 + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -0.2500000000 + 0.8750000000 + + + + + -0.8750000000 + 0.3750000000 + + + + + -0.2500000000 + -0.1250000000 + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0625000000 + -0.0625000000 + + + + + 0.0625000000 + 0.0625000000 + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + diff --git a/synfig-studio/images/synfig_icon.sif b/synfig-studio/images/synfig_icon.sif new file mode 100644 index 0000000..079b1d2 --- /dev/null +++ b/synfig-studio/images/synfig_icon.sif @@ -0,0 +1,65 @@ + + + Untitled0 + + + + + + + + + + + + + 0.0000000000 + 0.0500000007 + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.1000000015 + -0.1000000015 + + + + + 0.2000000030 + 0.2000000030 + + + + + + + + + + diff --git a/synfig-studio/images/synfig_icon.svg b/synfig-studio/images/synfig_icon.svg new file mode 100644 index 0000000..ddac44b --- /dev/null +++ b/synfig-studio/images/synfig_icon.svg @@ -0,0 +1,256 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Daniel Hornung (rubikcube) + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/text_icon.sif b/synfig-studio/images/text_icon.sif new file mode 100644 index 0000000..a40ff4b --- /dev/null +++ b/synfig-studio/images/text_icon.sif @@ -0,0 +1,1868 @@ + + + Synfig Studio Text Icon + Placed in the Public Domain in 2008 by Carlos López (Genete) + + + + + + + + + + + + + + + + + + + + 0.036189 + 0.036189 + 0.036189 + 1.000000 + + + 0.012910 + 0.012910 + 0.012910 + 0.731343 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + 1.6070324183 + 0.3102017045 + + + + + 0.0000000000 + -3.4489021301 + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.3328331709 + -1.5989754200 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.3515033722 + -1.5989754200 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6543942690 + -2.5721487999 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.8276066780 + -2.5721487999 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7600739598 + 2.8449206352 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.8354287744 + 2.8449206352 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.8667397499 + -2.5576670170 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7163097858 + -2.5576670170 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.9870144725 + 1.5960564613 + + + + + 1.4410723448 + -1.2588839531 + + + + + + 0.122233 + 0.122449 + 0.122233 + 1.000000 + + + 0.011832 + 0.011832 + 0.012264 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 0.999972 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.4444633722 + -1.4626319408 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.4637980461 + -1.4466253519 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.7722994089 + -2.4195909500 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.6048722267 + -2.4197824001 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.6569486260 + 2.6944108009 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.7075762153 + 2.6944108009 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.6455960274 + -2.4195909500 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.8268811703 + -2.4195909500 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.1559827924 + 0.8094826937 + + + + + -1.2790821791 + 1.5311524868 + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + 0.070740 + 0.070740 + 0.070740 + 0.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.547074 + 0.547074 + 0.547074 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + -0.000032 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.3328331709 + -1.5989754200 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.3515033722 + -1.5989754200 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1.6543942690 + -2.5721487999 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -2.8276066780 + -2.5721487999 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.7600739598 + 2.8449206352 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.8354287744 + 2.8449206352 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.8667397499 + -2.5576670170 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.7163097858 + -2.5576670170 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 1.9024590254 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.8326944113 + -0.4500553310 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.8326944113 + -0.4500553310 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 1.9024590254 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.8326944113 + -0.4500553310 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.8326944113 + -0.4500553310 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.484528 + 0.484528 + 0.484528 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + -0.9735588431 + -0.6490392089 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.9735588431 + -0.6490392089 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/time_icon.sif b/synfig-studio/images/time_icon.sif new file mode 100644 index 0000000..04c7bf4 --- /dev/null +++ b/synfig-studio/images/time_icon.sif @@ -0,0 +1,1198 @@ + + + Synfig Studio Time Icon + Placed in the Public Domain in 2008 by Carlos López (Genete) + + + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 0.302831 + + + + + + + + + + + 0.0000000000 + -4.1999998093 + + + + + + + + + + + + + 1.0609271526 + 0.4160498679 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.116374 + 0.093697 + 0.173189 + 0.998120 + + + + + + + + + + + 0.0000000000 + 0.2535304129 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.284698 + 0.292440 + 0.430366 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.2535304129 + + + + + + + + + + + + + + + + + + + + + + 1.8662887812 + -2.0927865505 + + + + + -1.6451721191 + 2.3339841366 + + + + + + 0.000000 + 0.000000 + 0.000000 + 0.998689 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.116308 + 0.093644 + 0.173090 + 0.998689 + + + + + + + + + + + 0.0000000000 + 0.2535304129 + + + + + + + + + + + + + + + + + + + + + + 0.6514231563 + -0.6562495232 + + + + + -2.6456887722 + 3.5754768848 + + + + + + 0.000000 + 0.000000 + 0.000000 + 0.998689 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 0.998689 + + + + + + + + + + + 0.0000000000 + 0.2496299297 + + + + + + + + + + + + + + + + + + + + + + -1.4121842384 + 2.0011441708 + + + + + 1.5667328835 + -1.4603906870 + + + + + + 0.302631 + 0.302631 + 0.309557 + 0.998689 + + + 0.956527 + 0.956527 + 0.956527 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 0.998689 + + + + + + + + + + + 0.0000000000 + 0.2535304129 + + + + + + + + + + + + + + + + + + + + + + + 0.956527 + 0.956527 + 0.956527 + 0.000000 + + + 0.361867 + 0.361867 + 0.361867 + 0.801471 + + + + + + -0.7488897443 + 1.1025321484 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.476177 + 0.493616 + 0.447871 + 1.000000 + + + + + + + + + + + 0.0000000000 + -1.5211824179 + + + + + + + + + + + + + + + + + + + + + + 0.476177 + 0.493616 + 0.447871 + 1.000000 + + + + + + + + + + + 0.0000000000 + 2.0282433033 + + + + + + + + + + + + + + + + + + + + + + 0.476177 + 0.493616 + 0.447871 + 1.000000 + + + + + + + + + + + 1.7747128010 + 0.2535304129 + + + + + + + + + + + + + + + + + + + + + + 0.476177 + 0.493616 + 0.447871 + 1.000000 + + + + + + + + + + + -1.7747128010 + 0.2535304129 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.2535304129 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.6402822733 + 1.5116592646 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.2535304129 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.9831250906 + 1.0006059408 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.2535304129 + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.2535304129 + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/time_track_icon.sif b/synfig-studio/images/time_track_icon.sif new file mode 100644 index 0000000..cceda49 --- /dev/null +++ b/synfig-studio/images/time_track_icon.sif @@ -0,0 +1,242 @@ + + + Untitled0 + + + + + + + + + + + + + + + + + + + 0.000000 + 0.265778 + 0.265778 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + i + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + Times New Roman + + + + + + + + + + + + + + + + 2.2500000000 + 2.2500000000 + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 0.444444 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -1.7500000000 + 1.7500000000 + + + + + 1.7500000000 + 1.7500000000 + + + + + 1.7500000000 + 0.7500000000 + + + + + 0.5000000000 + 0.7500000000 + + + + + 0.5000000000 + -1.7500000000 + + + + + -0.5000000000 + -1.7500000000 + + + + + -0.5000000000 + 0.7500000000 + + + + + -1.7500000000 + 0.7500000000 + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/valuenode_icon.sif b/synfig-studio/images/valuenode_icon.sif new file mode 100644 index 0000000..90b4d7e --- /dev/null +++ b/synfig-studio/images/valuenode_icon.sif @@ -0,0 +1,240 @@ + + + DataNode Icon + + + Untitled + + + + + + + + + + + + + 1.000000 + 0.300000 + 0.100000 + 1.000000 + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + -0.2187500000 + -0.2812500000 + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + -0.2031250000 + -0.2656250000 + + + + + + + + + + + + + + + + + + + + + + 0.2000000030 + 0.2000000030 + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + DYN + + + + 0.500000 + 0.750000 + 1.000000 + 1.000000 + + + + Sans Serif + + + + + + + + + + + + + + + + 0.6250000000 + 1.0000000000 + + + + + 0.5000000000 + 0.5000000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 0.1000000015 + 0.1000000015 + + + + + + + diff --git a/synfig-studio/images/vector_icon.sif b/synfig-studio/images/vector_icon.sif new file mode 100644 index 0000000..38030f3 --- /dev/null +++ b/synfig-studio/images/vector_icon.sif @@ -0,0 +1,250 @@ + + + Synfig Studio Vector Icon + + + Sphere + + + + + + + + + + + + + 0.898889 + 0.100146 + 0.001630 + 0.986486 + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + -0.2187500000 + -0.2812500000 + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + -0.2031250000 + -0.2656250000 + + + + + + + + + + + + + + + + + + + + + + 0.4375000000 + 0.4218750000 + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 0.1000000015 + 0.1000000015 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + 0.5749999881 + 0.5500000119 + + + + diff --git a/synfig-studio/images/wallpaper.sif b/synfig-studio/images/wallpaper.sif new file mode 100644 index 0000000..66db075 --- /dev/null +++ b/synfig-studio/images/wallpaper.sif @@ -0,0 +1,687 @@ + + + Untitled0 + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + 0.0149999997 + 0.1562500000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.1000000015 + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + 0.470726 + 0.477000 + 0.477000 + 1.000000 + + + + + + + + + + + + + + + + 0.638086 + 0.509474 + 0.361408 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + 0.531049 + 0.531049 + 0.531049 + 0.000000 + + + 0.006310 + 0.000000 + 0.000000 + 0.485794 + + + 0.006310 + 0.000000 + 0.000000 + 0.750000 + + + 0.076829 + 0.010931 + 0.001345 + 0.652360 + + + + + + + + + 1.0000000000 + 1.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + -1.5000000000 + + + + + 0.0000000000 + 1.5000000000 + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + 0.457498 + 0.383419 + 0.344119 + 0.000000 + + + 0.500000 + 0.500000 + 0.500000 + 1.000000 + + + + + + + + + 1.0000000000 + 1.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.295985 + 0.026400 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + 0.0750000030 + 0.0750000030 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + 0.0111111114 + 0.0111111114 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.881822 + 0.788820 + 0.722108 + 0.602041 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.956527 + 0.878455 + 0.809212 + 0.500000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 0.561224 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.100000 + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/width_icon.sif b/synfig-studio/images/width_icon.sif new file mode 100644 index 0000000..886143a --- /dev/null +++ b/synfig-studio/images/width_icon.sif @@ -0,0 +1,153 @@ + + + Untitled0 + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -0.8906250000 + 0.7656250000 + + + + + + + + + + + + + + 1.0937500000 + 1.0000000000 + + + + + 1.0937500000 + 1.0000000000 + + + + + + + + + -0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + 0.2197851539 + -0.9105731249 + + + + + 0.2197851539 + -0.9105731249 + + + + + + + + + 0.8906250000 + -0.8125000000 + + + + + + + + + + + + + + 1.6562500000 + 0.7656250000 + + + + + 1.6562500000 + 0.7656250000 + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/images/zoom_icon.sif b/synfig-studio/images/zoom_icon.sif new file mode 100644 index 0000000..df7d888 --- /dev/null +++ b/synfig-studio/images/zoom_icon.sif @@ -0,0 +1,1967 @@ + + + Synfig Studio Zoom Icon + Placed in the Public Domain in 2007 by Chris Norman (pixelgeek) + + + + + + + + + + + + + + + + + + + + 0.012910 + 0.012910 + 0.012910 + 0.791045 + + + 0.013228 + 0.012910 + 0.012910 + 0.000000 + + + 1.000000 + 1.000000 + 1.000000 + 0.000000 + + + + + + 0.1808688790 + -0.3216028810 + + + + + + + + + + + + + + + + -1.8803261518 + 2.0255250931 + + + + + 1.9384056330 + -1.9093658924 + + + + + -2.7515196800 + -1.2269309759 + + + + + 2.7515196800 + -1.2269309759 + + + + + 2.7515196800 + -2.7224798203 + + + + + -2.7515196800 + -2.7079598904 + + + + + + + + + + + + + + + + + + + + + + 0.373780 + 0.373780 + 0.373780 + 1.000000 + + + + + 0.2596156895 + -0.2596156895 + + + + + + + + + + + + + + + + + + + + + 0.3228553534 + -0.6057698131 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.5558438301 + -0.9885365963 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.2548090219 + -1.9038481712 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.1534788609 + -2.6860237122 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.6194555759 + -2.5695295334 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.8025181293 + -2.1035525799 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.0369846821 + -1.3213771582 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.8720423579 + -0.6224118471 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.5059177279 + -0.4060654938 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.5059177279 + -0.3894234598 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.006310 + 0.006310 + 0.006310 + 1.000000 + + + + + 0.2596156895 + -0.2596156895 + + + + + + + + + + + + + + + + + + + + + 0.3228553534 + -0.6057698131 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.5558438301 + -0.9885365963 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.2548090219 + -1.9038481712 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.1534788609 + -2.6860237122 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.6194555759 + -2.5695295334 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.8025181293 + -2.1035525799 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.0369846821 + -1.3213771582 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.8720423579 + -0.6224118471 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.5059177279 + -0.4060654938 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.5059177279 + -0.3894234598 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.006310 + 0.006310 + 0.006310 + 1.000000 + + + + + 0.8154594898 + -0.7322493792 + + + + + + + + + + + + + + + + + + + + + 1.9304755926 + -1.1150159836 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.6142770052 + -1.5477088690 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.0983740091 + -1.9138334990 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.006310 + 0.006310 + 0.006310 + 1.000000 + + + + + 0.3994087279 + -0.3661246896 + + + + + + + + + + + + + + + + + + + + + 1.8971915245 + -1.0817320347 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.6142770052 + -1.5477088690 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.1316580772 + -1.9304755926 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.006310 + 0.006310 + 0.006310 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 1.8805494308 + -1.1316580772 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.6142770052 + -1.5477088690 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.1316580772 + -1.9304755926 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.006310 + 0.006310 + 0.006310 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + 1.2814362049 + -1.3247057199 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.6960089207 + -2.5395739079 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.006310 + 0.006310 + 0.006310 + 1.000000 + + + + + + + + + + + -0.7788470387 + 0.7788470387 + + + + + + + + + + + + + + + + + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + -0.7788470387 + 0.7788470387 + + + + + + + + + + + + + + + + + + + + + + 0.172611 + 0.349351 + 0.629024 + 1.000000 + + + + + + + + + + + -0.7788470387 + 0.7788470387 + + + + + + + + + + + + + + + + + + + + + + 0.028991 + 0.133209 + 0.374624 + 1.000000 + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + + + -2.5961568356 + 0.7788470387 + + + + + + + + + + + + + + 0.0000000000 + 0.0000000000 + + + + + + + + + + + + + + + + + + + -0.7788470387 + -1.0384627581 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1.0384627581 + 0.7788470387 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.8154594898 + 0.3328406215 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/synfig-studio/m4/ETL.m4 b/synfig-studio/m4/ETL.m4 new file mode 100755 index 0000000..d79a7a8 --- /dev/null +++ b/synfig-studio/m4/ETL.m4 @@ -0,0 +1,75 @@ +# ETL M4 Macro +# For GNU Autotools +# $Id$ +# +# By Robert B. Quattlebaum Jr. +# + +AC_DEFUN([ETL_DEPS], +[ + AC_C_BIGENDIAN + + AC_CHECK_LIB(user32, main) + AC_CHECK_LIB([kernel32], [CreateMutex]) + AC_CHECK_LIB([pthread], [pthread_mutex_init]) + + AC_HEADER_STDC + + AC_CHECK_HEADERS(pthread.h) + AC_CHECK_HEADERS(sched.h) + AC_CHECK_HEADERS(sys/times.h) + AC_CHECK_HEADERS(sys/time.h) + AC_CHECK_HEADERS(unistd.h) + AC_CHECK_HEADERS(windows.h) + AC_CHECK_FUNCS([pthread_create]) + AC_CHECK_FUNCS([pthread_rwlock_init]) + AC_CHECK_FUNCS([pthread_yield]) + AC_CHECK_FUNCS([sched_yield]) + AC_CHECK_FUNCS([CreateThread]) + AC_CHECK_FUNCS([__clone]) + AC_CHECK_FUNCS([QueryPerformanceCounter]) + + AC_CHECK_FUNCS([gettimeofday]) + AC_CHECK_FUNCS([vsscanf]) + AC_CHECK_FUNCS([vsprintf]) + AC_CHECK_FUNCS([vasprintf]) + AC_CHECK_FUNCS([vsnprintf],[],[ + AC_CHECK_FUNC([_vsnprintf],[ + AC_DEFINE(vsnprintf,_vsnprintf,[define if the vsnprintf function is mangled]) + AC_DEFINE(HAVE_VSNPRINTF,1) + ]) + ]) + + $1 +]) + +AC_DEFUN([USING_ETL], +[ + AC_ARG_WITH(ETL-includes, + [ --with-ETL-includes Specify location of ETL headers],[ + CXXFLAGS="$CXXFLAGS -I$withval" + ]) + + AC_PATH_PROG(ETL_CONFIG,ETL-config,no) + + if test "$ETL_CONFIG" = "no"; then + no_ETL_config="yes" + $2 + else + AC_MSG_CHECKING([if $ETL_CONFIG works]) + if $ETL_CONFIG --libs >/dev/null 2>&1; then + ETL_VERSION="`$ETL_CONFIG --version`" + AC_MSG_RESULT([yes, $ETL_VERSION]) + CXXFLAGS="$CXXFLAGS `$ETL_CONFIG --cxxflags`" + $1 + else + AC_MSG_RESULT(no) + no_ETL_config="yes" + $2 + fi + fi + + ETL_DEPS($1,$2) +]) + + diff --git a/synfig-studio/m4/cxx_macros.m4 b/synfig-studio/m4/cxx_macros.m4 new file mode 100755 index 0000000..8fc247a --- /dev/null +++ b/synfig-studio/m4/cxx_macros.m4 @@ -0,0 +1,88 @@ +AC_DEFUN([AC_CXX_FUNCTION_NONTYPE_PARAMETERS], +[AC_CACHE_CHECK(whether the compiler supports function templates with non-type parameters, +ac_cv_cxx_function_nontype_parameters, +[AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([ +template class A {}; +template int f(const A& x) { return 0; } +],[A z; return f(z);], + ac_cv_cxx_function_nontype_parameters=yes, ac_cv_cxx_function_nontype_parameters=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_function_nontype_parameters" = yes; then + AC_DEFINE(HAVE_FUNCTION_NONTYPE_PARAMETERS,, + [define if the compiler supports function templates with non-type parameters]) +fi +]) + +AC_DEFUN([AC_CXX_NAMESPACES], +[AC_CACHE_CHECK(whether the compiler implements namespaces, +ac_cv_cxx_namespaces, +[AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], + [using namespace Outer::Inner; return i;], + ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_namespaces" = yes; then + AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) +fi +]) + +AC_DEFUN([AC_CXX_HAVE_COMPLEX], +[AC_CACHE_CHECK(whether the compiler has complex, +ac_cv_cxx_have_complex, +[AC_REQUIRE([AC_CXX_NAMESPACES]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif],[complex a; complex b; return 0;], + ac_cv_cxx_have_complex=yes, ac_cv_cxx_have_complex=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_have_complex" = yes; then + AC_DEFINE(HAVE_COMPLEX,,[define if the compiler has complex]) +fi +]) + +AC_DEFUN([AC_CXX_HAVE_SSTREAM], +[AC_CACHE_CHECK(whether the compiler has stringstream, +ac_cv_cxx_have_sstream, +[AC_REQUIRE([AC_CXX_NAMESPACES]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([#include +#ifdef HAVE_NAMESPACES +using namespace std; +#endif],[stringstream message; message << "Hello"; return 0;], + ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_have_sstream" = yes; then + AC_DEFINE(HAVE_SSTREAM,,[define if the compiler has stringstream]) +fi +]) + +AC_DEFUN([AC_CXX_MUTABLE], +[AC_CACHE_CHECK(whether the compiler supports the mutable keyword, +ac_cv_cxx_mutable, +[AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([ +class A { mutable int i; + public: + int f (int n) const { i = n; return i; } + }; +],[A a; return a.f (1);], + ac_cv_cxx_mutable=yes, ac_cv_cxx_mutable=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_mutable" = yes; then + AC_DEFINE(HAVE_MUTABLE,,[define if the compiler supports the mutable keyword]) +fi +]) + diff --git a/synfig-studio/m4/gnome.m4 b/synfig-studio/m4/gnome.m4 new file mode 100755 index 0000000..1bc2a90 --- /dev/null +++ b/synfig-studio/m4/gnome.m4 @@ -0,0 +1,405 @@ +# gnome-common.m4 +# + +dnl GNOME_COMMON_INIT + +AC_DEFUN([GNOME_COMMON_INIT], +[ + AC_CACHE_VAL(ac_cv_gnome_aclocal_dir, + [ac_cv_gnome_aclocal_dir="$GNOME_COMMON_MACROS_DIR"]) + AC_CACHE_VAL(ac_cv_gnome_aclocal_flags, + [ac_cv_gnome_aclocal_flags="$ACLOCAL_FLAGS"]) + GNOME_ACLOCAL_DIR="$ac_cv_gnome_aclocal_dir" + GNOME_ACLOCAL_FLAGS="$ac_cv_gnome_aclocal_flags" + AC_SUBST(GNOME_ACLOCAL_DIR) + AC_SUBST(GNOME_ACLOCAL_FLAGS) + + ACLOCAL="$ACLOCAL $GNOME_ACLOCAL_FLAGS" + + AM_CONDITIONAL(INSIDE_GNOME_DOCU, false) +]) + +AC_DEFUN([GNOME_GTKDOC_CHECK], +[ + AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) + AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC) + AC_SUBST(HAVE_GTK_DOC) + + dnl Let people disable the gtk-doc stuff. + AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto) + + if test x$enable_gtk_doc = xauto ; then + if test x$GTKDOC = xtrue ; then + enable_gtk_doc=yes + else + enable_gtk_doc=no + fi + fi + + dnl NOTE: We need to use a separate automake conditional for this + dnl to make this work with the tarballs. + AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) +]) + +AC_DEFUN([GNOME_DEBUG_CHECK], +[ + AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]], enable_debug="$enableval", enable_debug=no) + + if test x$enable_debug = xyes ; then + AC_DEFINE(GNOME_ENABLE_DEBUG) + fi +]) + +# Define a conditional. + +AC_DEFUN([AM_CONDITIONAL], +[AC_SUBST($1_TRUE) +AC_SUBST($1_FALSE) +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi]) + + +dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) +dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page +dnl also defines GSTUFF_PKG_ERRORS on error +AC_DEFUN([PKG_CHECK_MODULES], [ + succeeded=no + + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + AC_MSG_CHECKING(for $2) + + if $PKG_CONFIG --exists "$2" ; then + AC_MSG_RESULT(yes) + succeeded=yes + + AC_MSG_CHECKING($1_CFLAGS) + $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` + AC_MSG_RESULT($$1_CFLAGS) + + AC_MSG_CHECKING($1_LIBS) + $1_LIBS=`$PKG_CONFIG --libs "$2"` + AC_MSG_RESULT($$1_LIBS) + else + $1_CFLAGS="" + $1_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + ifelse([$4], ,echo $$1_PKG_ERRORS,) + fi + + AC_SUBST($1_CFLAGS) + AC_SUBST($1_LIBS) + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + ifelse([$3], , :, [$3]) + else + ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) + fi +]) + + + +# Macro to add for using GNU gettext. +# Ulrich Drepper , 1995, 1996 +# +# Modified to never use included libintl. +# Owen Taylor , 12/15/1998 +# +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU Public License +# but which still want to provide support for the GNU gettext functionality. +# Please note that the actual code is *not* freely available. +# +# +# If you make changes to this file, you MUST update the copy in +# acinclude.m4. [ aclocal dies on duplicate macros, so if +# we run 'aclocal -I macros/' then we'll run into problems +# once we've installed glib-gettext.m4 :-( ] +# + +AC_DEFUN([AM_GLIB_LC_MESSAGES], + [if test $ac_cv_header_locale_h = yes; then + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, + [AC_TRY_LINK([#include ], [return LC_MESSAGES], + am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) + if test $am_cv_val_LC_MESSAGES = yes; then + AC_DEFINE(HAVE_LC_MESSAGES, 1, + [Define if your file defines LC_MESSAGES.]) + fi + fi]) + +dnl AM_GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN([AM_GLIB_PATH_PROG_WITH_TEST], +[# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL(ac_cv_path_$1, +[case "[$]$1" in + /*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in ifelse([$5], , $PATH, [$5]); do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) + +AC_DEFUN([AM_GLIB_WITH_NLS], + dnl NLS is obligatory + [USE_NLS=yes + AC_SUBST(USE_NLS) + + dnl Figure out what method + nls_cv_force_use_gnu_gettext="no" + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If gettext or catgets are available (in this order) we + dnl use this. Else we have to fall back to GNU NLS library. + dnl catgets is only used if permitted by option --with-catgets. + nls_cv_header_intl= + nls_cv_header_libgt= + CATOBJEXT=NONE + XGETTEXT=: + + AC_CHECK_HEADER(libintl.h, + [AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, + [AC_TRY_LINK([#include ], [return (int) dgettext ("","")], + gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no)]) + + gt_cv_func_dgettext_libintl="no" + libintl_extra_libs="" + + if test "$gt_cv_func_dgettext_libc" != "yes" ; then + AC_CHECK_LIB(intl, bindtextdomain, + [AC_CHECK_LIB(intl, dgettext, + gt_cv_func_dgettext_libintl=yes)]) + + if test "$gt_cv_func_dgettext_libc" != "yes" ; then + AC_MSG_CHECKING([if -liconv is needed to use gettext]) + AC_MSG_RESULT([]) + AC_CHECK_LIB(intl, dcgettext, + [gt_cv_func_dgettext_libintl=yes + libintl_extra_libs=-liconv], + :,-liconv) + fi + fi + + if test "$gt_cv_func_dgettext_libintl" = "yes"; then + LIBS="$LIBS -lintl $libintl_extra_libs"; + fi + + if test "$gt_cv_func_dgettext_libc" = "yes" \ + || test "$gt_cv_func_dgettext_libintl" = "yes"; then + AC_DEFINE(HAVE_GETTEXT,1, + [Define if the GNU gettext() function is already present or preinstalled.]) + AM_GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl + if test "$MSGFMT" != "no"; then + AC_CHECK_FUNCS(dcgettext) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + AM_GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) + AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr], + [CATOBJEXT=.gmo + DATADIRNAME=share], + [CATOBJEXT=.mo + DATADIRNAME=lib]) + INSTOBJEXT=.mo + fi + fi + + # Added by Martin Baulig 12/15/98 for libc5 systems + if test "$gt_cv_func_dgettext_libc" != "yes" \ + && test "$gt_cv_func_dgettext_libintl" = "yes"; then + INTLLIBS="-lintl $libintl_extra_libs" + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + fi + ]) + + if test "$CATOBJEXT" = "NONE"; then + dnl Neither gettext nor catgets in included in the C library. + dnl Fall back on GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" != "yes"; then + AC_DEFINE(ENABLE_NLS, 1, + [always defined to indicate that i18n is enabled]) + else + dnl Unset this variable since we use the non-zero value as a flag. + CATOBJEXT= + fi + + dnl Test whether we really found GNU xgettext. + if test "$XGETTEXT" != ":"; then + dnl If it is no GNU xgettext we define it as : so that the + dnl Makefiles still can work. + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then + : ; + else + AC_MSG_RESULT( + [found xgettext program is not GNU xgettext; ignore it]) + XGETTEXT=":" + fi + fi + + # We need to process the po/ directory. + POSUB=po + + AC_OUTPUT_COMMANDS( + [case "$CONFIG_FILES" in *po/Makefile.in*) + sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile + esac]) + + dnl These rules are solely for the distribution goal. While doing this + dnl we only have to keep exactly one list of the available catalogs + dnl in configure.in. + for lang in $ALL_LINGUAS; do + GMOFILES="$GMOFILES $lang.gmo" + POFILES="$POFILES $lang.po" + done + + dnl Make all variables we use known to autoconf. + AC_SUBST(CATALOGS) + AC_SUBST(CATOBJEXT) + AC_SUBST(DATADIRNAME) + AC_SUBST(GMOFILES) + AC_SUBST(INSTOBJEXT) + AC_SUBST(INTLDEPS) + AC_SUBST(INTLLIBS) + AC_SUBST(INTLOBJS) + AC_SUBST(POFILES) + AC_SUBST(POSUB) + ]) + +AC_DEFUN([AM_GLIB_GNU_GETTEXT], + [AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_PROG_RANLIB])dnl + AC_REQUIRE([AC_HEADER_STDC])dnl + AC_REQUIRE([AC_C_CONST])dnl + AC_REQUIRE([AC_C_INLINE])dnl + AC_REQUIRE([AC_TYPE_OFF_T])dnl + AC_REQUIRE([AC_TYPE_SIZE_T])dnl + AC_REQUIRE([AC_FUNC_ALLOCA])dnl + AC_REQUIRE([AC_FUNC_MMAP])dnl + + AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ +unistd.h sys/param.h]) + AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ +strdup __argz_count __argz_stringify __argz_next]) + + AM_GLIB_LC_MESSAGES + AM_GLIB_WITH_NLS + + if test "x$CATOBJEXT" != "x"; then + if test "x$ALL_LINGUAS" = "x"; then + LINGUAS= + else + AC_MSG_CHECKING(for catalogs to be installed) + NEW_LINGUAS= + for lang in ${LINGUAS=$ALL_LINGUAS}; do + case "$ALL_LINGUAS" in + *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; + esac + done + LINGUAS=$NEW_LINGUAS + AC_MSG_RESULT($LINGUAS) + fi + + dnl Construct list of names of catalog files to be constructed. + if test -n "$LINGUAS"; then + for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done + fi + fi + + dnl Determine which catalog format we have (if any is needed) + dnl For now we know about two different formats: + dnl Linux libc-5 and the normal X/Open format + test -d po || mkdir po + if test "$CATOBJEXT" = ".cat"; then + AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) + + dnl Transform the SED scripts while copying because some dumb SEDs + dnl cannot handle comments. + sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed + fi + + dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly + dnl find the mkinstalldirs script in another subdir but ($top_srcdir). + dnl Try to locate is. + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + AC_SUBST(MKINSTALLDIRS) + + dnl Generate list of files to be processed by xgettext which will + dnl be included in po/Makefile. + test -d po || mkdir po + if test "x$srcdir" != "x."; then + if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then + posrcprefix="$srcdir/" + else + posrcprefix="../$srcdir/" + fi + else + posrcprefix="../" + fi + rm -f po/POTFILES + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES + ]) + diff --git a/synfig-studio/m4/libxml.m4 b/synfig-studio/m4/libxml.m4 new file mode 100755 index 0000000..8b0e006 --- /dev/null +++ b/synfig-studio/m4/libxml.m4 @@ -0,0 +1,389 @@ +# Configure paths for LIBXML2 +# Toshio Kuratomi 2001-04-21 +# Adapted from: +# Configure paths for GLIB +# Owen Taylor 97-11-3 + +dnl AM_PATH_XML([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for XML, and define XML_CFLAGS and XML_LIBS +dnl +AC_DEFUN([AM_PATH_XML],[ +AC_ARG_WITH(xml-prefix, + [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)], + xml_config_prefix="$withval", xml_config_prefix="") +AC_ARG_WITH(xml-exec-prefix, + [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)], + xml_config_exec_prefix="$withval", xml_config_exec_prefix="") +AC_ARG_ENABLE(xmltest, + [ --disable-xmltest Do not try to compile and run a test LIBXML program],, + enable_xmltest=yes) + + if test x$xml_config_exec_prefix != x ; then + xml_config_args="$xml_config_args --exec-prefix=$xml_config_exec_prefix" + if test x${XML_CONFIG+set} != xset ; then + XML_CONFIG=$xml_config_exec_prefix/bin/xml-config + fi + fi + if test x$xml_config_prefix != x ; then + xml_config_args="$xml_config_args --prefix=$xml_config_prefix" + if test x${XML_CONFIG+set} != xset ; then + XML_CONFIG=$xml_config_prefix/bin/xml-config + fi + fi + + AC_PATH_PROG(XML_CONFIG, xml-config, no) + min_xml_version=ifelse([$1], ,1.0.0,[$1]) + AC_MSG_CHECKING(for libxml - version >= $min_xml_version) + no_xml="" + if test "$XML_CONFIG" = "no" ; then + no_xml=yes + else + XML_CFLAGS=`$XML_CONFIG $xml_config_args --cflags` + XML_LIBS=`$XML_CONFIG $xml_config_args --libs` + xml_config_major_version=`$XML_CONFIG $xml_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + xml_config_minor_version=`$XML_CONFIG $xml_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + xml_config_micro_version=`$XML_CONFIG $xml_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_xmltest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $XML_CFLAGS" + LIBS="$XML_LIBS $LIBS" +dnl +dnl Now check if the installed libxml is sufficiently new. +dnl (Also sanity checks the results of xml-config to some extent) +dnl + rm -f conf.xmltest + AC_TRY_RUN([ +#include +#include +#include +#include + +int +main() +{ + int xml_major_version, xml_minor_version, xml_micro_version; + int major, minor, micro; + char *tmp_version; + int tmp_int_version; + + system("touch conf.xmltest"); + + /* Capture xml-config output via autoconf/configure variables */ + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = (char *)strdup("$min_xml_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string from xml-config\n", "$min_xml_version"); + exit(1); + } + free(tmp_version); + + /* Capture the version information from the header files */ + tmp_int_version = LIBXML_VERSION; + xml_major_version=tmp_int_version / 10000; + xml_minor_version=(tmp_int_version - xml_major_version * 10000) / 100; + xml_micro_version=(tmp_int_version - xml_minor_version * 100 - xml_major_version * 10000); + + /* Compare xml-config output to the libxml headers */ + if ((xml_major_version != $xml_config_major_version) || + (xml_minor_version != $xml_config_minor_version) +#if 0 + || +/* The last released version of libxml-1.x has an incorrect micro version in + * the header file so neither the includes nor the library will match the + * micro_version to the output of xml-config + */ + (xml_micro_version != $xml_config_micro_version) +#endif + ) + + { + printf("*** libxml header files (version %d.%d.%d) do not match\n", + xml_major_version, xml_minor_version, xml_micro_version); + printf("*** xml-config (version %d.%d.%d)\n", + $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version); + return 1; + } +/* Compare the headers to the library to make sure we match */ + /* Less than ideal -- doesn't provide us with return value feedback, + * only exits if there's a serious mismatch between header and library. + */ + LIBXML_TEST_VERSION; + + /* Test that the library is greater than our minimum version */ + if (($xml_config_major_version > major) || + (($xml_config_major_version == major) && ($xml_config_minor_version > minor)) || + (($xml_config_major_version == major) && ($xml_config_minor_version == minor) && + ($xml_config_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of libxml (%d.%d.%d) was found.\n", + xml_major_version, xml_minor_version, xml_micro_version); + printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the xml-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of LIBXML, but you can also set the XML_CONFIG environment to point to the\n"); + printf("*** correct copy of xml-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + return 1; +} +],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + + if test "x$no_xml" = x ; then + AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version)) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$XML_CONFIG" = "no" ; then + echo "*** The xml-config script installed by LIBXML could not be found" + echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the XML_CONFIG environment variable to the" + echo "*** full path to xml-config." + else + if test -f conf.xmltest ; then + : + else + echo "*** Could not run libxml test program, checking why..." + CFLAGS="$CFLAGS $XML_CFLAGS" + LIBS="$LIBS $XML_LIBS" + AC_TRY_LINK([ +#include +#include +], [ LIBXML_TEST_VERSION; return 0;], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding LIBXML or finding the wrong" + echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means LIBXML was incorrectly installed" + echo "*** or that you have moved LIBXML since it was installed. In the latter case, you" + echo "*** may want to edit the xml-config script: $XML_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + + XML_CFLAGS="" + XML_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(XML_CFLAGS) + AC_SUBST(XML_LIBS) + rm -f conf.xmltest +]) + +# Configure paths for LIBXML2 +# Toshio Kuratomi 2001-04-21 +# Adapted from: +# Configure paths for GLIB +# Owen Taylor 97-11-3 + +dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for XML, and define XML_CFLAGS and XML_LIBS +dnl +AC_DEFUN([AM_PATH_XML2],[ +AC_ARG_WITH(xml-prefix, + [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)], + xml_config_prefix="$withval", xml_config_prefix="") +AC_ARG_WITH(xml-exec-prefix, + [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)], + xml_config_exec_prefix="$withval", xml_config_exec_prefix="") +AC_ARG_ENABLE(xmltest, + [ --disable-xmltest Do not try to compile and run a test LIBXML program],, + enable_xmltest=yes) + + if test x$xml_config_exec_prefix != x ; then + xml_config_args="$xml_config_args --exec-prefix=$xml_config_exec_prefix" + if test x${XML2_CONFIG+set} != xset ; then + XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config + fi + fi + if test x$xml_config_prefix != x ; then + xml_config_args="$xml_config_args --prefix=$xml_config_prefix" + if test x${XML2_CONFIG+set} != xset ; then + XML2_CONFIG=$xml_config_prefix/bin/xml2-config + fi + fi + + AC_PATH_PROG(XML2_CONFIG, xml2-config, no) + min_xml_version=ifelse([$1], ,2.0.0,[$1]) + AC_MSG_CHECKING(for libxml - version >= $min_xml_version) + no_xml="" + if test "$XML2_CONFIG" = "no" ; then + no_xml=yes + else + XML_CFLAGS=`$XML2_CONFIG $xml_config_args --cflags` + XML_LIBS=`$XML2_CONFIG $xml_config_args --libs` + xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_xmltest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_CXXFLAGS="$CXXFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $XML_CFLAGS" + CXXFLAGS="$CXXFLAGS $XML_CFLAGS" + LIBS="$XML_LIBS $LIBS" +dnl +dnl Now check if the installed libxml is sufficiently new. +dnl (Also sanity checks the results of xml2-config to some extent) +dnl + rm -f conf.xmltest + AC_TRY_RUN([ +#include +#include +#include +#include + +int +main() +{ + int xml_major_version, xml_minor_version, xml_micro_version; + int major, minor, micro; + char *tmp_version; + + system("touch conf.xmltest"); + + /* Capture xml2-config output via autoconf/configure variables */ + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = (char *)strdup("$min_xml_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string from xml2-config\n", "$min_xml_version"); + exit(1); + } + free(tmp_version); + + /* Capture the version information from the header files */ + tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION); + if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) { + printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION"); + exit(1); + } + free(tmp_version); + + /* Compare xml2-config output to the libxml headers */ + if ((xml_major_version != $xml_config_major_version) || + (xml_minor_version != $xml_config_minor_version) || + (xml_micro_version != $xml_config_micro_version)) + { + printf("*** libxml header files (version %d.%d.%d) do not match\n", + xml_major_version, xml_minor_version, xml_micro_version); + printf("*** xml2-config (version %d.%d.%d)\n", + $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version); + return 1; + } +/* Compare the headers to the library to make sure we match */ + /* Less than ideal -- doesn't provide us with return value feedback, + * only exits if there's a serious mismatch between header and library. + */ + LIBXML_TEST_VERSION; + + /* Test that the library is greater than our minimum version */ + if ((xml_major_version > major) || + ((xml_major_version == major) && (xml_minor_version > minor)) || + ((xml_major_version == major) && (xml_minor_version == minor) && + (xml_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of libxml (%d.%d.%d) was found.\n", + xml_major_version, xml_minor_version, xml_micro_version); + printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the xml2-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n"); + printf("*** correct copy of xml2-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + return 1; +} +],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + + if test "x$no_xml" = x ; then + AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version)) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$XML2_CONFIG" = "no" ; then + echo "*** The xml2-config script installed by LIBXML could not be found" + echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the XML2_CONFIG environment variable to the" + echo "*** full path to xml2-config." + else + if test -f conf.xmltest ; then + : + else + echo "*** Could not run libxml test program, checking why..." + CFLAGS="$CFLAGS $XML_CFLAGS" + CXXFLAGS="$CXXFLAGS $XML_CFLAGS" + LIBS="$LIBS $XML_LIBS" + AC_TRY_LINK([ +#include +#include +], [ LIBXML_TEST_VERSION; return 0;], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding LIBXML or finding the wrong" + echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means LIBXML was incorrectly installed" + echo "*** or that you have moved LIBXML since it was installed. In the latter case, you" + echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + + XML_CFLAGS="" + XML_LIBS="" + $3 + + + ifelse([$3], , :, [$3]) + fi + AC_SUBST(XML_CFLAGS) + AC_SUBST(XML_LIBS) + rm -f conf.xmltest +]) diff --git a/synfig-studio/m4/subs.m4 b/synfig-studio/m4/subs.m4 new file mode 100755 index 0000000..9614e65 --- /dev/null +++ b/synfig-studio/m4/subs.m4 @@ -0,0 +1,245 @@ + +## AC_ARG_WARNINGS() +## +## Provide the --enable-warnings configure argument, set to 'minimum' +## by default. +## +AC_DEFUN([AC_ARG_WARNINGS], +[ + AC_ARG_ENABLE([warnings], + [ --enable-warnings=[[none|minimum|maximum|hardcore]] + Control compiler pickyness. [[default=maximum]]], + [gtkmm_enable_warnings="$enableval"], + gtkmm_enable_warnings="maximum") + + AC_MSG_CHECKING([for compiler warning flags to use]) + + gtkmm_warning_flags='' + + # -W is now known as -Wextra, but that's not known by gcc 2 or 3 + case "$gtkmm_enable_warnings" in + none|no) gtkmm_warning_flags='';; + minimum|yes) gtkmm_warning_flags='-Wall -Wno-unused-parameter';; + maximum) gtkmm_warning_flags='-W -Wall';; + hardcore) gtkmm_warning_flags='-W -Wall -Werror';; + esac + + gtkmm_use_flags='' + + if test "x$gtkmm_warning_flags" != "x" + then + echo 'int foo() { return 0; }' > conftest.cc + + for flag in $gtkmm_warning_flags + do + # Test whether the compiler accepts the flag. GCC doesn't bail + # out when given an unsupported flag but prints a warning, so + # check the compiler output instead. + gtkmm_cxx_out="`$CXX $flag -c conftest.cc 2>&1`" + rm -f conftest.$OBJEXT + test "x${gtkmm_cxx_out}" = "x" && \ + gtkmm_use_flags="${gtkmm_use_flags:+$gtkmm_use_flags }$flag" + done + + rm -f conftest.cc + gtkmm_cxx_out='' + fi + + if test "x$gtkmm_use_flags" != "x" + then + for flag in $gtkmm_use_flags + do + case " $CXXFLAGS " in + *" $flag "*) ;; # don't add flags twice + *) CXXFLAGS="${CXXFLAGS:+$CXXFLAGS }$flag";; + esac + done + else + gtkmm_use_flags='none' + fi + + AC_MSG_RESULT([$gtkmm_use_flags]) +]) + + + + +AC_DEFUN([AC_ARG_DEBUG], +[ + AC_MSG_CHECKING([for debug flags]) + + AC_ARG_ENABLE(debug,[ --enable-debug Build in debugging mode],[ + debug=$enableval + ],[ + debug="no" + ]) + debug_flags='' + + case "$debug" in + yes) + debug_flags="-D_DEBUG -g" + ;; + half) + debug_flags="-DNDEBUG -g" + ;; + no|*) + debug_flags="-DNDEBUG" + ;; + esac + + + CXXFLAGS="`echo $CXXFLAGS | sed s:-g::` $debug_flags" + CFLAGS="`echo $CFLAGS | sed s:-g::` $debug_flags" + + AC_MSG_RESULT([$debug_flags]) +]) + + + + +AC_DEFUN([AC_ARG_OPTIMIZATION], +[ + AC_MSG_CHECKING([for optimization flags]) + + AC_ARG_ENABLE(optimization,[ --enable-optimization=[[0,1,2,3,4]] Select optimization level (default=2)],[ + optimization=$enableval + ],[ + optimization="2" + ]) + optimization_flags='' + case "$optimization" in + 0|no) optimization_flags="-O0";; + 1) optimization_flags="-O1";; + 2|yes) optimization_flags="-O2";; + pass1) optimization_flags="-O2 -fprofile-arcs";; + pass2) optimization_flags="-O2 -fbranch-probabilities";; + 3) optimization_flags="-O3";; + *) optimization_flags="-O4";; + esac + CXXFLAGS="`echo $CXXFLAGS | sed 's:-O.::g'` $optimization_flags" + CFLAGS="`echo $CFLAGS | sed 's:-O.::g'` $optimization_flags" + AC_MSG_RESULT([$optimization_flags]) +]) + +AC_DEFUN([AC_ARG_PROFILE_ARCS], +[ + AC_MSG_CHECKING([for arc profiling]) + + AC_ARG_ENABLE(profile-arcs,[ --enable-profile-arcs Enable arc profiling],[ + profile_arcs=$enableval + ],[ + profile_arcs=no + ]) + + if test $profile_arcs = "yes" ; then { + CXXFLAGS="$CXXFLAGS -fprofile-arcs"; + CFLAGS="$CFLAGS -fprofile-arcs"; + } ; fi + + AC_MSG_RESULT([$profile_arcs]) +]) + +AC_DEFUN([AC_ARG_BRANCH_PROBABILITIES], +[ + AC_MSG_CHECKING([for branch-probabilities]) + + AC_ARG_ENABLE(branch-probabilities,[ --enable-branch-probabilities Enable branch-probabilities],[ + branch_probabilities=$enableval + ],[ + branch_probabilities=no + ]) + + if test $branch_probabilities = "yes" ; then { + CXXFLAGS="$CXXFLAGS -fbranch-probabilities"; + CFLAGS="$CFLAGS -fbranch-probabilities"; + } ; fi + + AC_MSG_RESULT([$branch_probabilities]) +]) + +AC_DEFUN([AC_ARG_PROFILING], +[ + AC_MSG_CHECKING([for profiling]) + + AC_ARG_ENABLE(profiling,[ --enable-profiling Enable profiling using gprof],[ + profiling=$enableval + ],[ + profiling=no + ]) + + if test $profiling = "yes" ; then { + CFLAGS="$CFLAGS -pg"; + CXXFLAGS="$CXXFLAGS -pg"; + LDFLAGS="$LDFLAGS -pg"; + LIBS="$LIBS"; + } ; fi + + AC_MSG_RESULT([$profiling]) +]) + +MINGW_FLAGS="-mno-cygwin" + + +AC_DEFUN([AC_WIN32_QUIRKS], +[ + +case "$host" in + *mingw*) + AC_MSG_CHECKING([the flavor of the compiler]) + if ( $CC --version | grep -q mingw ) ; then { + AC_MSG_RESULT([compiler is mingw special]) + LIBTOOL_PATCH_SED=" + s/dir=\"\$absdir\"/dir=\`cygpath -d -m \"\$absdir\"\`/; + s/absdir=\`cd \"\$dir\" && pwd\`/absdir=\`cygpath -d -m \"\$dir\"\`/; + s/# We need an absolute path/dir=\`cygpath -d -m \"\$dir\"\` # We need an absolute path/; + s- /usr/lib- C:/mingw/lib-g; + s-\"/lib -\"C:/mingw/lib -g; + s- /lib/ - -g; + "; + sys_lib_dlsearch_path_spec="C:/mingw/lib" + ac_default_prefix=`cygpath -d -m "$ac_default_prefix"`; + } else { + AC_MSG_RESULT([compiler is cygwin stock, adding -mno-cygwin]) + CPP="$CPP $MINGW_FLAGS" + CC="$CC $MINGW_FLAGS" + CXX="$CXX $MINGW_FLAGS -L/usr/$host/lib -I/usr/include/c++/3.3.3/$host" + CXXCPP="$CXXCPP $MINGW_FLAGS" + + +} ; fi + + LTCC="gcc" + CXXFLAGS="$CXXFLAGS -LC:/GTK/lib" + CFLAGS="$CFLAGS -LC:/GTK/lib" + LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols -Wl,--subsystem=console -Wl,--enable-runtime-pseudo-reloc" +dnl LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--subsystem=console -Wl,--enable-runtime-pseudo-reloc" + ;; + *cygwin*) + LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols" +dnl LDFLAGS="$LDFLAGS -lole32 -no-undefined -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--subsystem=console" + CXXFLAGS="$CXXFLAGS -I/target/include" + CFLAGS="$CFLAGS -I/target/include" + ;; + powerpc-apple*) + echo Adding mac-specific optimization flags. . . + CXXFLAGS="$CXXFLAGS $G5OPTFLAGS" + ;; +esac + + +]) + +AC_DEFUN([AC_LIBTOOL_PATCH], +[ + +if [[ "$LIBTOOL_PATCH_SED""x" != "x" ]] ; then { + printf "Patching libtool... " + cat libtool | sed "$LIBTOOL_PATCH_SED" > libtool2 + rm libtool + mv libtool2 libtool + chmod +x libtool + AC_MSG_RESULT([patched]) +} fi ; + + +]) diff --git a/synfig-studio/m4/synfig.m4 b/synfig-studio/m4/synfig.m4 new file mode 100755 index 0000000..5c9ca83 --- /dev/null +++ b/synfig-studio/m4/synfig.m4 @@ -0,0 +1,51 @@ +# SYNFIG M4 Macro +# For GNU Autotools +# $Id$ +# +# By Robert B. Quattlebaum Jr. +# + +AC_DEFUN([SYNFIG_DEPS], +[ + USING_ETL(,$2) + AM_PATH_XML2(,,$2) + AC_CHECK_FUNCS([floor pow sqrt],,$2) + $1 +]) + +AC_DEFUN([USING_SYNFIG], +[ + AC_ARG_WITH(synfig-includes, + [ --with-synfig-includes Specify location of synfig headers],[ + CXXFLAGS="$CXXFLAGS -I$withval" + ]) + + AC_PATH_PROG(SYNFIG_CONFIG,synfig-config,no) + + if test "$SYNFIG_CONFIG" = "no"; then + no_SYNFIG_config="yes" + $2 + else + AC_MSG_CHECKING([if $SYNFIG_CONFIG works]) + if $SYNFIG_CONFIG --libs >/dev/null 2>&1; then + SYNFIG_VERSION="`$SYNFIG_CONFIG --version`" + AC_MSG_RESULT([yes, $SYNFIG_VERSION]) + SYNFIG_CXXFLAGS="`$SYNFIG_CONFIG --cxxflags`" + SYNFIG_CFLAGS="`$SYNFIG_CONFIG --cflags`" + SYNFIG_LIBS="`$SYNFIG_CONFIG --libs`" + CXXFLAGS="$CXXFLAGS $SYNFIG_CXXFLAGS" + AC_SUBST(SYNFIG_CXXFLAGS) + AC_SUBST(SYNFIG_LIBS) + AC_SUBST(SYNFIG_CFLAGS) + $1 + else + AC_MSG_RESULT(no) + no_SYNFIG_config="yes" + $2 + fi + fi + + SYNFIG_DEPS($1,$2) +]) + + diff --git a/synfig-studio/macosxbuild.sh b/synfig-studio/macosxbuild.sh new file mode 100755 index 0000000..6dcfcbe --- /dev/null +++ b/synfig-studio/macosxbuild.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +#PREFIX=/Applications/SynfigStudio.app/Contents/synfig +PREFIX=/Users/darco/Projects/Voria/synfig-build +#OPTIONS="--disable-optimization --enable-debug" +export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11R6/lib/pkgconfig +export MACOSX_DEPLOYMENT_TARGET=10.4 +OPTIONS="--prefix=$PREFIX" +OPTIONS="$OPTIONS --enable-optimization=2" +#OPTIONS="$OPTIONS --enable-optimization=3 --enable-g5opt" +#OPTIONS="$OPTIONS --disable-optimization" +OPTIONS="$OPTIONS --disable-debug" +OPTIONS="$OPTIONS --disable-dependency-tracking" +#OPTIONS="$OPTIONS --enable-debug" +#export LDFLAGS='-undefined dynamic-lookup' +LDFLAGS="-prebind -prebind_all_twolevel_modules -twolevel_namespace -bind_at_load -undefined dynamic_lookup" +BUILDDIR=macosxbuild + +ARCH_FLAGS="" +#ARCH_FLAGS="$ARCH_FLAGS -arch ppc" +ARCH_FLAGS="$ARCH_FLAGS -arch i386" + +CC="gcc $ARCH_FLAGS" +CXX="g++ $ARCH_FLAGS" + +CPP="gcc -E" +CXXCPP="g++ -E" + + +[ -e configure ] || autoreconf --force --install || exit 1 + +[ -d $BUILDDIR ] && rm -fr $BUILDDIR + +mkdir $BUILDDIR + +cd $BUILDDIR + +set -x + +../configure $OPTIONS LDFLAGS="$LDFLAGS" CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" || exit 1 + +make -j2 +make install-strip +#make package + +#make installer + + diff --git a/synfig-studio/pkg-info/macosx/studio-resources/Description.plist b/synfig-studio/pkg-info/macosx/studio-resources/Description.plist new file mode 100644 index 0000000..2fb0360 --- /dev/null +++ b/synfig-studio/pkg-info/macosx/studio-resources/Description.plist @@ -0,0 +1,8 @@ + + + + + IFPkgFlagBackgroundScaling + none + + \ No newline at end of file diff --git a/synfig-studio/pkg-info/macosx/studio-resources/English.lproj/InstallationCheck.strings b/synfig-studio/pkg-info/macosx/studio-resources/English.lproj/InstallationCheck.strings new file mode 100644 index 0000000..1bde3de --- /dev/null +++ b/synfig-studio/pkg-info/macosx/studio-resources/English.lproj/InstallationCheck.strings @@ -0,0 +1,2 @@ +"16" = "Synfig Studio requires GTKMM 2.4, which was not found on your computer." +"17" = "Synfig Studio requires Synfig Core, which was not found on your computer." diff --git a/synfig-studio/pkg-info/macosx/studio-resources/ReadMe.txt b/synfig-studio/pkg-info/macosx/studio-resources/ReadMe.txt new file mode 100644 index 0000000..cdb5c31 --- /dev/null +++ b/synfig-studio/pkg-info/macosx/studio-resources/ReadMe.txt @@ -0,0 +1 @@ +This is the readme for Synfig Core. diff --git a/synfig-studio/pkg-info/macosx/studio-resources/Welcome.txt b/synfig-studio/pkg-info/macosx/studio-resources/Welcome.txt new file mode 100644 index 0000000..f1e8e92 --- /dev/null +++ b/synfig-studio/pkg-info/macosx/studio-resources/Welcome.txt @@ -0,0 +1 @@ +This is the welcome for Synfig. diff --git a/synfig-studio/pkg-info/macosx/studio-resources/install.sh b/synfig-studio/pkg-info/macosx/studio-resources/install.sh new file mode 100755 index 0000000..42e2b02 --- /dev/null +++ b/synfig-studio/pkg-info/macosx/studio-resources/install.sh @@ -0,0 +1,61 @@ +#!/bin/sh +# finish up the installation +# this script should be executed using the sudo command +# this file is copied to synfig-devel.post_install and synfig-devel.post_upgrade +# inside the .pkg bundle +LOGFILE="~/synfig-core_install.log" + +/usr/X11R6/bin/fc-cache +/usr/X11R6/bin/fc-list + +exit 0 + + +umask 022 + +RESOURCE_DIR=`dirname $0` +PREFIX=/usr/local + +cd $RESOURCE_DIR + +echo "Creating synfig-config script" +[ -d $PREFIX ] || mkdir $PREFIX +[ -d $PREFIX/bin ] || mkdir $PREFIX/bin +[ -d $PREFIX/include ] || mkdir $PREFIX/include +[ -d $PREFIX/lib ] || mkdir $PREFIX/lib +[ -d $PREFIX/sbin ] || mkdir $PREFIX/sbin + +echo "Cleaning up any previous installation" +[ -d $PREFIX/include/synfig ] && rm -fr $PREFIX/include/synfig +ln -s /Library/Frameworks/synfig.framework/Headers $PREFIX/include/synfig + +sed ' +s:@exec_prefix@:/usr/local:g; +s:@prefix@:/usr/local:g; +s:@bindir@:$exec_prefix/bin:g; +s:@libdir@:$exec_prefix/lib:g; +s:@includedir@:$prefix/include:g; +s:@VERSION@:@_VERSION_@:g; +s:@PACKAGE@:@_PACKAGE_@:g; +s:@LIBS@::g; +s:@VERSION@:@_VERSION_@:; +s:@PACKAGE@:@_PACKAGE_@:; +s:@CONFIG_LIBS@:-F/Library/Frameworks/synfig.framework:; +s:@synfig_LIBS@:-F/Library/Frameworks/synfig.framework:; +s:@CONFIG_CFLAGS@:-framework synfig:; +' < $RESOURCE_DIR/synfig-config.in > $PREFIX/bin/synfig-config +chmod 775 $PREFIX/bin/synfig-config + +echo "Precompiling Headers" +#/usr/bin/c++ -precomp /Library/Frameworks/synfig.framework/Headers/synfig.h -o /Library/Frameworks/synfig.framework/Headers/synfig.p + +echo "Moving synfig tool" +cp $RESOURCE_DIR/synfig $PREFIX/bin || exit 1 + +echo "Done with shell script" + + +exit 0 + + + diff --git a/synfig-studio/pkg-info/macosx/studio-resources/synfig-studio.post_install b/synfig-studio/pkg-info/macosx/studio-resources/synfig-studio.post_install new file mode 100755 index 0000000..42e2b02 --- /dev/null +++ b/synfig-studio/pkg-info/macosx/studio-resources/synfig-studio.post_install @@ -0,0 +1,61 @@ +#!/bin/sh +# finish up the installation +# this script should be executed using the sudo command +# this file is copied to synfig-devel.post_install and synfig-devel.post_upgrade +# inside the .pkg bundle +LOGFILE="~/synfig-core_install.log" + +/usr/X11R6/bin/fc-cache +/usr/X11R6/bin/fc-list + +exit 0 + + +umask 022 + +RESOURCE_DIR=`dirname $0` +PREFIX=/usr/local + +cd $RESOURCE_DIR + +echo "Creating synfig-config script" +[ -d $PREFIX ] || mkdir $PREFIX +[ -d $PREFIX/bin ] || mkdir $PREFIX/bin +[ -d $PREFIX/include ] || mkdir $PREFIX/include +[ -d $PREFIX/lib ] || mkdir $PREFIX/lib +[ -d $PREFIX/sbin ] || mkdir $PREFIX/sbin + +echo "Cleaning up any previous installation" +[ -d $PREFIX/include/synfig ] && rm -fr $PREFIX/include/synfig +ln -s /Library/Frameworks/synfig.framework/Headers $PREFIX/include/synfig + +sed ' +s:@exec_prefix@:/usr/local:g; +s:@prefix@:/usr/local:g; +s:@bindir@:$exec_prefix/bin:g; +s:@libdir@:$exec_prefix/lib:g; +s:@includedir@:$prefix/include:g; +s:@VERSION@:@_VERSION_@:g; +s:@PACKAGE@:@_PACKAGE_@:g; +s:@LIBS@::g; +s:@VERSION@:@_VERSION_@:; +s:@PACKAGE@:@_PACKAGE_@:; +s:@CONFIG_LIBS@:-F/Library/Frameworks/synfig.framework:; +s:@synfig_LIBS@:-F/Library/Frameworks/synfig.framework:; +s:@CONFIG_CFLAGS@:-framework synfig:; +' < $RESOURCE_DIR/synfig-config.in > $PREFIX/bin/synfig-config +chmod 775 $PREFIX/bin/synfig-config + +echo "Precompiling Headers" +#/usr/bin/c++ -precomp /Library/Frameworks/synfig.framework/Headers/synfig.h -o /Library/Frameworks/synfig.framework/Headers/synfig.p + +echo "Moving synfig tool" +cp $RESOURCE_DIR/synfig $PREFIX/bin || exit 1 + +echo "Done with shell script" + + +exit 0 + + + diff --git a/synfig-studio/pkg-info/macosx/studio-resources/synfig-studio.post_upgrade b/synfig-studio/pkg-info/macosx/studio-resources/synfig-studio.post_upgrade new file mode 100755 index 0000000..42e2b02 --- /dev/null +++ b/synfig-studio/pkg-info/macosx/studio-resources/synfig-studio.post_upgrade @@ -0,0 +1,61 @@ +#!/bin/sh +# finish up the installation +# this script should be executed using the sudo command +# this file is copied to synfig-devel.post_install and synfig-devel.post_upgrade +# inside the .pkg bundle +LOGFILE="~/synfig-core_install.log" + +/usr/X11R6/bin/fc-cache +/usr/X11R6/bin/fc-list + +exit 0 + + +umask 022 + +RESOURCE_DIR=`dirname $0` +PREFIX=/usr/local + +cd $RESOURCE_DIR + +echo "Creating synfig-config script" +[ -d $PREFIX ] || mkdir $PREFIX +[ -d $PREFIX/bin ] || mkdir $PREFIX/bin +[ -d $PREFIX/include ] || mkdir $PREFIX/include +[ -d $PREFIX/lib ] || mkdir $PREFIX/lib +[ -d $PREFIX/sbin ] || mkdir $PREFIX/sbin + +echo "Cleaning up any previous installation" +[ -d $PREFIX/include/synfig ] && rm -fr $PREFIX/include/synfig +ln -s /Library/Frameworks/synfig.framework/Headers $PREFIX/include/synfig + +sed ' +s:@exec_prefix@:/usr/local:g; +s:@prefix@:/usr/local:g; +s:@bindir@:$exec_prefix/bin:g; +s:@libdir@:$exec_prefix/lib:g; +s:@includedir@:$prefix/include:g; +s:@VERSION@:@_VERSION_@:g; +s:@PACKAGE@:@_PACKAGE_@:g; +s:@LIBS@::g; +s:@VERSION@:@_VERSION_@:; +s:@PACKAGE@:@_PACKAGE_@:; +s:@CONFIG_LIBS@:-F/Library/Frameworks/synfig.framework:; +s:@synfig_LIBS@:-F/Library/Frameworks/synfig.framework:; +s:@CONFIG_CFLAGS@:-framework synfig:; +' < $RESOURCE_DIR/synfig-config.in > $PREFIX/bin/synfig-config +chmod 775 $PREFIX/bin/synfig-config + +echo "Precompiling Headers" +#/usr/bin/c++ -precomp /Library/Frameworks/synfig.framework/Headers/synfig.h -o /Library/Frameworks/synfig.framework/Headers/synfig.p + +echo "Moving synfig tool" +cp $RESOURCE_DIR/synfig $PREFIX/bin || exit 1 + +echo "Done with shell script" + + +exit 0 + + + diff --git a/synfig-studio/pkg-info/macosx/studio-resources/upgrade.sh b/synfig-studio/pkg-info/macosx/studio-resources/upgrade.sh new file mode 100755 index 0000000..42e2b02 --- /dev/null +++ b/synfig-studio/pkg-info/macosx/studio-resources/upgrade.sh @@ -0,0 +1,61 @@ +#!/bin/sh +# finish up the installation +# this script should be executed using the sudo command +# this file is copied to synfig-devel.post_install and synfig-devel.post_upgrade +# inside the .pkg bundle +LOGFILE="~/synfig-core_install.log" + +/usr/X11R6/bin/fc-cache +/usr/X11R6/bin/fc-list + +exit 0 + + +umask 022 + +RESOURCE_DIR=`dirname $0` +PREFIX=/usr/local + +cd $RESOURCE_DIR + +echo "Creating synfig-config script" +[ -d $PREFIX ] || mkdir $PREFIX +[ -d $PREFIX/bin ] || mkdir $PREFIX/bin +[ -d $PREFIX/include ] || mkdir $PREFIX/include +[ -d $PREFIX/lib ] || mkdir $PREFIX/lib +[ -d $PREFIX/sbin ] || mkdir $PREFIX/sbin + +echo "Cleaning up any previous installation" +[ -d $PREFIX/include/synfig ] && rm -fr $PREFIX/include/synfig +ln -s /Library/Frameworks/synfig.framework/Headers $PREFIX/include/synfig + +sed ' +s:@exec_prefix@:/usr/local:g; +s:@prefix@:/usr/local:g; +s:@bindir@:$exec_prefix/bin:g; +s:@libdir@:$exec_prefix/lib:g; +s:@includedir@:$prefix/include:g; +s:@VERSION@:@_VERSION_@:g; +s:@PACKAGE@:@_PACKAGE_@:g; +s:@LIBS@::g; +s:@VERSION@:@_VERSION_@:; +s:@PACKAGE@:@_PACKAGE_@:; +s:@CONFIG_LIBS@:-F/Library/Frameworks/synfig.framework:; +s:@synfig_LIBS@:-F/Library/Frameworks/synfig.framework:; +s:@CONFIG_CFLAGS@:-framework synfig:; +' < $RESOURCE_DIR/synfig-config.in > $PREFIX/bin/synfig-config +chmod 775 $PREFIX/bin/synfig-config + +echo "Precompiling Headers" +#/usr/bin/c++ -precomp /Library/Frameworks/synfig.framework/Headers/synfig.h -o /Library/Frameworks/synfig.framework/Headers/synfig.p + +echo "Moving synfig tool" +cp $RESOURCE_DIR/synfig $PREFIX/bin || exit 1 + +echo "Done with shell script" + + +exit 0 + + + diff --git a/synfig-studio/pkg-info/macosx/synfig-studio.info.in b/synfig-studio/pkg-info/macosx/synfig-studio.info.in new file mode 100644 index 0000000..7dc1a3b --- /dev/null +++ b/synfig-studio/pkg-info/macosx/synfig-studio.info.in @@ -0,0 +1,14 @@ +Title @PACKAGE_NAME@ @VERSION@ +Version @VERSION@ +Description @PACKAGE_NAME@ +DefaultLocation /usr/local +DeleteWarning +NeedsAuthorization YES +DisableStop NO +UseUserMask YES +Application NO +Relocatable NO +Required NO +InstallOnly NO +RequiresReboot NO +InstallFat NO diff --git a/synfig-studio/po/Makevars b/synfig-studio/po/Makevars new file mode 100644 index 0000000..92b987a --- /dev/null +++ b/synfig-studio/po/Makevars @@ -0,0 +1,7 @@ +DOMAIN = synfigstudio +subdir = po +top_builddir = .. +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --add-comments=TRANSLATORS +COPYRIGHT_HOLDER = Synfig Contributors +MSGID_BUGS_ADDRESS = http://synfig.org/Bugs +EXTRA_LOCALE_CATEGORIES = diff --git a/synfig-studio/po/POTFILES.in b/synfig-studio/po/POTFILES.in new file mode 100644 index 0000000..dd9f9a7 --- /dev/null +++ b/synfig-studio/po/POTFILES.in @@ -0,0 +1,419 @@ +src/gtkmm/about.cpp +src/gtkmm/about.h +src/gtkmm/adjust_window.cpp +src/gtkmm/adjust_window.h +src/gtkmm/app.cpp +src/gtkmm/app.h +src/gtkmm/asyncrenderer.cpp +src/gtkmm/asyncrenderer.h +src/gtkmm/audiocontainer.cpp +src/gtkmm/audiocontainer.h +src/gtkmm/autorecover.cpp +src/gtkmm/autorecover.h +src/gtkmm/canvasoptions.cpp +src/gtkmm/canvasoptions.h +src/gtkmm/canvasproperties.cpp +src/gtkmm/canvasproperties.h +src/gtkmm/canvastreestore.cpp +src/gtkmm/canvastreestore.h +src/gtkmm/canvasview.cpp +src/gtkmm/canvasview.h +src/gtkmm/cellrenderer_gradient.cpp +src/gtkmm/cellrenderer_gradient.h +src/gtkmm/cellrenderer_time.cpp +src/gtkmm/cellrenderer_time.h +src/gtkmm/cellrenderer_timetrack.cpp +src/gtkmm/cellrenderer_timetrack.h +src/gtkmm/cellrenderer_value.cpp +src/gtkmm/cellrenderer_value.h +src/gtkmm/childrentree.cpp +src/gtkmm/childrentree.h +src/gtkmm/childrentreestore.cpp +src/gtkmm/childrentreestore.h +src/gtkmm/compview.h +src/gtkmm/devicetracker.cpp +src/gtkmm/devicetracker.h +src/gtkmm/dialog_color.cpp +src/gtkmm/dialog_color.h +src/gtkmm/dialog_gradient.cpp +src/gtkmm/dialog_gradient.h +src/gtkmm/dialog_keyframe.cpp +src/gtkmm/dialog_keyframe.h +src/gtkmm/dialog_preview.cpp +src/gtkmm/dialog_preview.h +src/gtkmm/dialogsettings.cpp +src/gtkmm/dialogsettings.h +src/gtkmm/dialog_setup.cpp +src/gtkmm/dialog_setup.h +src/gtkmm/dialog_soundselect.cpp +src/gtkmm/dialog_soundselect.h +src/gtkmm/dialog_tooloptions.cpp +src/gtkmm/dialog_tooloptions.h +src/gtkmm/dialog_waypoint.cpp +src/gtkmm/dialog_waypoint.h +src/gtkmm/dockable.cpp +src/gtkmm/dockable.h +src/gtkmm/dockbook.cpp +src/gtkmm/dockbook.h +src/gtkmm/dock_canvases.cpp +src/gtkmm/dock_canvases.h +src/gtkmm/dock_canvasspecific.cpp +src/gtkmm/dock_canvasspecific.h +src/gtkmm/dock_children.cpp +src/gtkmm/dock_children.h +src/gtkmm/dock_curves.cpp +src/gtkmm/dock_curves.h +src/gtkmm/dockdialog.cpp +src/gtkmm/dockdialog.h +src/gtkmm/dock_history.cpp +src/gtkmm/dock_history.h +src/gtkmm/dock_info.cpp +src/gtkmm/dock_info.h +src/gtkmm/dock_keyframes.cpp +src/gtkmm/dock_keyframes.h +src/gtkmm/dock_layergroups.cpp +src/gtkmm/dock_layergroups.h +src/gtkmm/dock_layers.cpp +src/gtkmm/dock_layers.h +src/gtkmm/dockmanager.cpp +src/gtkmm/dockmanager.h +src/gtkmm/dock_metadata.cpp +src/gtkmm/dock_metadata.h +src/gtkmm/dock_navigator.cpp +src/gtkmm/dock_navigator.h +src/gtkmm/dock_params.cpp +src/gtkmm/dock_params.h +src/gtkmm/dock_timetrack.cpp +src/gtkmm/dock_timetrack.h +src/gtkmm/duck.cpp +src/gtkmm/duck.h +src/gtkmm/duckmatic.cpp +src/gtkmm/duckmatic.h +src/gtkmm/ducktransform_rotate.h +src/gtkmm/ducktransform_scale.h +src/gtkmm/ducktransform_translate.h +src/gtkmm/eventkey.h +src/gtkmm/event_layerclick.h +src/gtkmm/event_mouse.h +src/gtkmm/groupactionmanager.cpp +src/gtkmm/groupactionmanager.h +src/gtkmm/historytreestore.cpp +src/gtkmm/historytreestore.h +src/gtkmm/iconcontroller.cpp +src/gtkmm/iconcontroller.h +src/gtkmm/instance.cpp +src/gtkmm/instance.h +src/gtkmm/ipc.cpp +src/gtkmm/ipc.h +src/gtkmm/keyframeactionmanager.cpp +src/gtkmm/keyframeactionmanager.h +src/gtkmm/keyframetree.cpp +src/gtkmm/keyframetree.h +src/gtkmm/keyframetreestore.cpp +src/gtkmm/keyframetreestore.h +src/gtkmm/keymapsettings.cpp +src/gtkmm/keymapsettings.h +src/gtkmm/layeractionmanager.cpp +src/gtkmm/layeractionmanager.h +src/gtkmm/layergrouptree.cpp +src/gtkmm/layergrouptree.h +src/gtkmm/layergrouptreestore.cpp +src/gtkmm/layergrouptreestore.h +src/gtkmm/layerparamtreestore.cpp +src/gtkmm/layerparamtreestore.h +src/gtkmm/layertree.cpp +src/gtkmm/layertree.h +src/gtkmm/layertreestore.cpp +src/gtkmm/layertreestore.h +src/gtkmm/main.cpp +src/gtkmm/metadatatreestore.cpp +src/gtkmm/metadatatreestore.h +src/gtkmm/mod_mirror/mod_mirror.cpp +src/gtkmm/mod_mirror/mod_mirror.h +src/gtkmm/mod_mirror/state_mirror.cpp +src/gtkmm/mod_mirror/state_mirror.h +src/gtkmm/mod_palette/dock_palbrowse.cpp +src/gtkmm/mod_palette/dock_palbrowse.h +src/gtkmm/mod_palette/dock_paledit.cpp +src/gtkmm/mod_palette/dock_paledit.h +src/gtkmm/mod_palette/mod_palette.cpp +src/gtkmm/mod_palette/mod_palette.h +src/gtkmm/module.cpp +src/gtkmm/module.h +src/gtkmm/onemoment.cpp +src/gtkmm/onemoment.h +src/gtkmm/preview.cpp +src/gtkmm/preview.h +src/gtkmm/renddesc.cpp +src/gtkmm/renddesc.h +src/gtkmm/render.cpp +src/gtkmm/renderer_bbox.cpp +src/gtkmm/renderer_bbox.h +src/gtkmm/renderer_canvas.cpp +src/gtkmm/renderer_canvas.h +src/gtkmm/renderer_dragbox.cpp +src/gtkmm/renderer_dragbox.h +src/gtkmm/renderer_ducks.cpp +src/gtkmm/renderer_ducks.h +src/gtkmm/renderer_grid.cpp +src/gtkmm/renderer_grid.h +src/gtkmm/renderer_guides.cpp +src/gtkmm/renderer_guides.h +src/gtkmm/renderer_timecode.cpp +src/gtkmm/renderer_timecode.h +src/gtkmm/render.h +src/gtkmm/smach.h +src/gtkmm/splash.cpp +src/gtkmm/splash.h +src/gtkmm/state_bline.cpp +src/gtkmm/state_bline.h +src/gtkmm/state_circle.cpp +src/gtkmm/state_circle.h +src/gtkmm/state_draw.cpp +src/gtkmm/state_draw.h +src/gtkmm/state_eyedrop.cpp +src/gtkmm/state_eyedrop.h +src/gtkmm/state_fill.cpp +src/gtkmm/state_fill.h +src/gtkmm/state_gradient.cpp +src/gtkmm/state_gradient.h +src/gtkmm/statemanager.cpp +src/gtkmm/statemanager.h +src/gtkmm/state_normal.cpp +src/gtkmm/state_normal.h +src/gtkmm/state_polygon.cpp +src/gtkmm/state_polygon.h +src/gtkmm/state_rectangle.cpp +src/gtkmm/state_rectangle.h +src/gtkmm/state_rotate.cpp +src/gtkmm/state_rotate.h +src/gtkmm/state_scale.cpp +src/gtkmm/state_scale.h +src/gtkmm/state_sketch.cpp +src/gtkmm/state_sketch.h +src/gtkmm/state_smoothmove.cpp +src/gtkmm/state_smoothmove.h +src/gtkmm/state_star.cpp +src/gtkmm/state_star.h +src/gtkmm/state_stroke.cpp +src/gtkmm/state_stroke.h +src/gtkmm/state_text.cpp +src/gtkmm/state_text.h +src/gtkmm/state_width.cpp +src/gtkmm/state_width.h +src/gtkmm/state_zoom.cpp +src/gtkmm/state_zoom.h +src/gtkmm/toolbox.cpp +src/gtkmm/toolbox.h +src/gtkmm/valuelink.cpp +src/gtkmm/valuelink.h +src/gtkmm/widget_canvaschooser.cpp +src/gtkmm/widget_canvaschooser.h +src/gtkmm/widget_color.cpp +src/gtkmm/widget_coloredit.cpp +src/gtkmm/widget_coloredit.h +src/gtkmm/widget_color.h +src/gtkmm/widget_compselect.cpp +src/gtkmm/widget_compselect.h +src/gtkmm/widget_curves.cpp +src/gtkmm/widget_curves.h +src/gtkmm/widget_defaults.cpp +src/gtkmm/widget_defaults.h +src/gtkmm/widget_distance.cpp +src/gtkmm/widget_distance.h +src/gtkmm/widget_enum.cpp +src/gtkmm/widget_enum.h +src/gtkmm/widget_filename.cpp +src/gtkmm/widget_filename.h +src/gtkmm/widget_gradient.cpp +src/gtkmm/widget_gradient.h +src/gtkmm/widget_sound.cpp +src/gtkmm/widget_sound.h +src/gtkmm/widget_time.cpp +src/gtkmm/widget_time.h +src/gtkmm/widget_timeslider.cpp +src/gtkmm/widget_timeslider.h +src/gtkmm/widget_value.cpp +src/gtkmm/widget_value.h +src/gtkmm/widget_vector.cpp +src/gtkmm/widget_vector.h +src/gtkmm/widget_waypoint.cpp +src/gtkmm/widget_waypoint.h +src/gtkmm/widget_waypointmodel.cpp +src/gtkmm/widget_waypointmodel.h +src/gtkmm/workarea.cpp +src/gtkmm/workarea.h +src/gtkmm/workarearenderer.cpp +src/gtkmm/workarearenderer.h +src/gtkmm/zoomdial.cpp +src/gtkmm/zoomdial.h +# FIXME: Split these out into a libsynfigapp domain +src/synfigapp/action.cpp +src/synfigapp/action.h +src/synfigapp/action_param.cpp +src/synfigapp/action_param.h +src/synfigapp/actions/activepointadd.cpp +src/synfigapp/actions/activepointadd.h +src/synfigapp/actions/activepointremove.cpp +src/synfigapp/actions/activepointremove.h +src/synfigapp/actions/activepointset.cpp +src/synfigapp/actions/activepointset.h +src/synfigapp/actions/activepointsetoff.cpp +src/synfigapp/actions/activepointsetoff.h +src/synfigapp/actions/activepointseton.cpp +src/synfigapp/actions/activepointseton.h +src/synfigapp/actions/activepointsetsmart.cpp +src/synfigapp/actions/activepointsetsmart.h +src/synfigapp/actions/activepointsimpleadd.cpp +src/synfigapp/actions/activepointsimpleadd.h +src/synfigapp/actions/blinepointtangentmerge.cpp +src/synfigapp/actions/blinepointtangentmerge.h +src/synfigapp/actions/blinepointtangentsplit.cpp +src/synfigapp/actions/blinepointtangentsplit.h +src/synfigapp/actions/canvasadd.cpp +src/synfigapp/actions/canvasadd.h +src/synfigapp/actions/canvasdescriptionset.cpp +src/synfigapp/actions/canvasdescriptionset.h +src/synfigapp/actions/canvasidset.cpp +src/synfigapp/actions/canvasidset.h +src/synfigapp/actions/canvasnameset.cpp +src/synfigapp/actions/canvasnameset.h +src/synfigapp/actions/canvasremove.cpp +src/synfigapp/actions/canvasremove.h +src/synfigapp/actions/canvasrenddescset.cpp +src/synfigapp/actions/canvasrenddescset.h +src/synfigapp/actions/colorset.cpp +src/synfigapp/actions/colorset.h +src/synfigapp/actions/editmodeset.cpp +src/synfigapp/actions/editmodeset.h +src/synfigapp/actions/gradientset.cpp +src/synfigapp/actions/gradientset.h +src/synfigapp/actions/groupaddlayers.cpp +src/synfigapp/actions/groupaddlayers.h +src/synfigapp/actions/groupremove.cpp +src/synfigapp/actions/groupremove.h +src/synfigapp/actions/groupremovelayers.cpp +src/synfigapp/actions/groupremovelayers.h +src/synfigapp/actions/grouprename.cpp +src/synfigapp/actions/grouprename.h +src/synfigapp/actions/keyframeadd.cpp +src/synfigapp/actions/keyframeadd.h +src/synfigapp/actions/keyframeduplicate.cpp +src/synfigapp/actions/keyframeduplicate.h +src/synfigapp/actions/keyframeremove.cpp +src/synfigapp/actions/keyframeremove.h +src/synfigapp/actions/keyframeset.cpp +src/synfigapp/actions/keyframesetdelta.cpp +src/synfigapp/actions/keyframesetdelta.h +src/synfigapp/actions/keyframeset.h +src/synfigapp/actions/keyframewaypointset.cpp +src/synfigapp/actions/keyframewaypointset.h +src/synfigapp/actions/layeractivate.cpp +src/synfigapp/actions/layeractivate.h +src/synfigapp/actions/layeradd.cpp +src/synfigapp/actions/layeradd.h +src/synfigapp/actions/layerduplicate.cpp +src/synfigapp/actions/layerduplicate.h +src/synfigapp/actions/layerencapsulate.cpp +src/synfigapp/actions/layerencapsulate.h +src/synfigapp/actions/layerlower.cpp +src/synfigapp/actions/layerlower.h +src/synfigapp/actions/layermove.cpp +src/synfigapp/actions/layermove.h +src/synfigapp/actions/layerparamconnect.cpp +src/synfigapp/actions/layerparamconnect.h +src/synfigapp/actions/layerparamdisconnect.cpp +src/synfigapp/actions/layerparamdisconnect.h +src/synfigapp/actions/layerparamset.cpp +src/synfigapp/actions/layerparamset.h +src/synfigapp/actions/layerraise.cpp +src/synfigapp/actions/layerraise.h +src/synfigapp/actions/layerremove.cpp +src/synfigapp/actions/layerremove.h +src/synfigapp/actions/layersetdesc.cpp +src/synfigapp/actions/layersetdesc.h +src/synfigapp/actions/timepointscopy.cpp +src/synfigapp/actions/timepointscopy.h +src/synfigapp/actions/timepointsdelete.cpp +src/synfigapp/actions/timepointsdelete.h +src/synfigapp/actions/timepointsmove.cpp +src/synfigapp/actions/timepointsmove.h +src/synfigapp/actions/valuedescblinelink.cpp +src/synfigapp/actions/valuedescblinelink.h +src/synfigapp/actions/valuedescconnect.cpp +src/synfigapp/actions/valuedescconnect.h +src/synfigapp/actions/valuedescconvert.cpp +src/synfigapp/actions/valuedescconvert.h +src/synfigapp/actions/valuedescdisconnect.cpp +src/synfigapp/actions/valuedescdisconnect.h +src/synfigapp/actions/valuedescexport.cpp +src/synfigapp/actions/valuedescexport.h +src/synfigapp/actions/valuedesclink.cpp +src/synfigapp/actions/valuedesclink.h +src/synfigapp/actions/valuedescset.cpp +src/synfigapp/actions/valuedescset.h +src/synfigapp/actions/valuenodeadd.cpp +src/synfigapp/actions/valuenodeadd.h +src/synfigapp/actions/valuenodeconstset.cpp +src/synfigapp/actions/valuenodeconstset.h +src/synfigapp/actions/valuenodedynamiclistinsert.cpp +src/synfigapp/actions/valuenodedynamiclistinsert.h +src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp +src/synfigapp/actions/valuenodedynamiclistinsertsmart.h +src/synfigapp/actions/valuenodedynamiclistloop.cpp +src/synfigapp/actions/valuenodedynamiclistloop.h +src/synfigapp/actions/valuenodedynamiclistremove.cpp +src/synfigapp/actions/valuenodedynamiclistremove.h +src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp +src/synfigapp/actions/valuenodedynamiclistremovesmart.h +src/synfigapp/actions/valuenodedynamiclistrotateorder.cpp +src/synfigapp/actions/valuenodedynamiclistrotateorder.h +src/synfigapp/actions/valuenodedynamiclistunloop.cpp +src/synfigapp/actions/valuenodedynamiclistunloop.h +src/synfigapp/actions/valuenodelinkconnect.cpp +src/synfigapp/actions/valuenodelinkconnect.h +src/synfigapp/actions/valuenodelinkdisconnect.cpp +src/synfigapp/actions/valuenodelinkdisconnect.h +src/synfigapp/actions/valuenoderemove.cpp +src/synfigapp/actions/valuenoderemove.h +src/synfigapp/actions/valuenoderename.cpp +src/synfigapp/actions/valuenoderename.h +src/synfigapp/actions/valuenodereplace.cpp +src/synfigapp/actions/valuenodereplace.h +src/synfigapp/actions/waypointadd.cpp +src/synfigapp/actions/waypointadd.h +src/synfigapp/actions/waypointremove.cpp +src/synfigapp/actions/waypointremove.h +src/synfigapp/actions/waypointset.cpp +src/synfigapp/actions/waypointset.h +src/synfigapp/actions/waypointsetsmart.cpp +src/synfigapp/actions/waypointsetsmart.h +src/synfigapp/actions/waypointsimpleadd.cpp +src/synfigapp/actions/waypointsimpleadd.h +src/synfigapp/action_system.cpp +src/synfigapp/action_system.h +src/synfigapp/blineconvert.cpp +src/synfigapp/blineconvert.h +src/synfigapp/canvasinterface.cpp +src/synfigapp/canvasinterface.h +src/synfigapp/cvs.cpp +src/synfigapp/cvs.h +src/synfigapp/editmode.h +src/synfigapp/inputdevice.cpp +src/synfigapp/inputdevice.h +src/synfigapp/instance.cpp +src/synfigapp/instance.h +src/synfigapp/main.cpp +src/synfigapp/main.h +src/synfigapp/selectionmanager.h +src/synfigapp/settings.cpp +src/synfigapp/settings.h +src/synfigapp/timegather.cpp +src/synfigapp/timegather.h +src/synfigapp/uimanager.cpp +src/synfigapp/uimanager.h +src/synfigapp/value_desc.cpp +src/synfigapp/value_desc.h +# Disabled because they are not built +# src/template.cpp +# src/template.h diff --git a/synfig-studio/po/ca.po b/synfig-studio/po/ca.po new file mode 100644 index 0000000..1921bdb --- /dev/null +++ b/synfig-studio/po/ca.po @@ -0,0 +1,4206 @@ +# translation of ca.po to catalan +# Carlos López González , 2008. +# Miguel Gea Milvaques , 2008. +# Copyright (C) YEAR Synfig Contributors +# This file is distributed under the same license as the PACKAGE package. +msgid "" +msgstr "" +"Project-Id-Version: ca\n" +"Report-Msgid-Bugs-To: http://synfig.org/Bugs\n" +"POT-Creation-Date: 2008-09-02 21:03+0200\n" +"PO-Revision-Date: 2008-03-10 01:16+0100\n" +"Last-Translator: Miguel Gea Milvaques \n" +"Language-Team: catalan \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#: src/gtkmm/about.cpp:104 +msgid "2D vector animation studio" +msgstr "Estudi d'animació vectorial 2D" + +#: src/gtkmm/about.cpp:108 +msgid "Visit the Synfig website" +msgstr "Visiti la web de Synfig" + +#: src/gtkmm/about.cpp:110 +msgid "" +"Copyright 2001-2008\n" +"Robert B. Quattlebaum Jr.,\n" +"Adrian Bentley and Synfig contributors" +msgstr "" +"Copyright 2001-2008\n" +"Robert B. Quattlebaum Jr.,\n" +"Adrian Bentley i els contribuïdors de Synfig" + +#. TRANSLATORS: change this to your name, separate multiple names with \n +#: src/gtkmm/about.cpp:165 +msgid "translator-credits" +msgstr "Miguel Gea Milvaques (xerakko)" + +#: src/gtkmm/about.cpp:192 +#, c-format +msgid "" +"\n" +"Development version:\n" +"%s\n" +msgstr "" +"\n" +"Versió de desenvolupament:\n" +"%s \n" + +#: src/gtkmm/about.cpp:197 +#, c-format +msgid "Built on %s\n" +msgstr "Contruït el %s\n" + +#: src/gtkmm/about.cpp:201 +msgid "Built with:\n" +msgstr "Construït amb: \n" + +#: src/gtkmm/about.cpp:202 +#, c-format +msgid "ETL %s\n" +msgstr "ETL %s\n" + +#: src/gtkmm/about.cpp:203 +#, c-format +msgid "Synfig API %s\n" +msgstr "Synfig API %s\n" + +#: src/gtkmm/about.cpp:204 +#, c-format +msgid "Synfig library %d\n" +msgstr "Biblioteca Synfig %d\n" + +#: src/gtkmm/about.cpp:205 +#, c-format +msgid "GTK+ %d.%d.%d\n" +msgstr "GTK+ %d.%d.%d\n" + +#: src/gtkmm/about.cpp:207 +#, c-format +msgid "GNU G++ %d.%d.%d\n" +msgstr "GNU G++ %d.%d.%d\n" + +#: src/gtkmm/about.cpp:212 +msgid "Using:\n" +msgstr "Usant:\n" + +#: src/gtkmm/about.cpp:213 +#, c-format +msgid "Synfig %s\n" +msgstr "Synfig %s\n" + +#: src/gtkmm/about.cpp:214 +#, c-format +msgid "GTK+ %d.%d.%d" +msgstr "GTK+ %d.%d.%d" + +#: src/gtkmm/app.cpp:616 src/gtkmm/toolbox.cpp:281 +msgid "_File" +msgstr "_Arxiu" + +#: src/gtkmm/app.cpp:617 src/gtkmm/canvasview.cpp:3320 +msgid "_Edit" +msgstr "_Edita" + +#: src/gtkmm/app.cpp:618 +msgid "_View" +msgstr "_Veure" + +#: src/gtkmm/app.cpp:619 +msgid "_Canvas" +msgstr "_Llenç" + +#: src/gtkmm/app.cpp:620 +msgid "_Layer" +msgstr "_Capa" + +#: src/gtkmm/app.cpp:621 +msgid "Show/Hide Ducks" +msgstr "Mostrar/Ocultar Ànecs" + +#: src/gtkmm/app.cpp:622 +msgid "Preview Quality" +msgstr "Qualitat de la previsualització" + +#: src/gtkmm/app.cpp:623 +msgid "Low-Res Pixel Size" +msgstr "Grandària de píxel de baixa resolució" + +#: src/gtkmm/app.cpp:624 src/gtkmm/canvasview.cpp:2265 +#: src/synfigapp/actions/layeradd.cpp:82 +msgid "New Layer" +msgstr "Nova Capa" + +#: src/gtkmm/app.cpp:625 src/synfigapp/actions/keyframeduplicate.cpp:79 +#: src/synfigapp/actions/keyframeremove.cpp:78 +#: src/synfigapp/actions/keyframesetdelta.cpp:79 +#: src/synfigapp/actions/keyframewaypointset.cpp:78 +msgid "Keyframe" +msgstr "Fotograma Clau" + +#: src/gtkmm/app.cpp:626 src/gtkmm/iconcontroller.cpp:163 +#: src/synfigapp/actions/groupaddlayers.cpp:78 +#: src/synfigapp/actions/groupremove.cpp:72 +msgid "Group" +msgstr "Grup" + +#: src/gtkmm/app.cpp:627 +msgid "State" +msgstr "Estat" + +#: src/gtkmm/app.cpp:628 +msgid "Toolbox" +msgstr "Caixa d'Eines" + +#: src/gtkmm/app.cpp:645 src/gtkmm/keyframeactionmanager.cpp:239 +msgid "Keyframe Properties" +msgstr "Propietats del fotograma clau" + +#: src/gtkmm/app.cpp:656 src/gtkmm/canvasview.cpp:1206 +msgid "Import" +msgstr "Importa" + +#: src/gtkmm/app.cpp:657 src/gtkmm/canvasview.cpp:1209 +msgid "Render" +msgstr "Mostra" + +#: src/gtkmm/app.cpp:658 src/gtkmm/canvasview.cpp:1212 +#: src/gtkmm/dialog_preview.cpp:171 +msgid "Preview" +msgstr "Previsualiza" + +#: src/gtkmm/app.cpp:659 +msgid "Preview Dialog" +msgstr "Diàleg de Previsualització" + +#: src/gtkmm/app.cpp:660 src/gtkmm/canvasview.cpp:1215 +msgid "Sound File" +msgstr "Arxiu de So" + +#: src/gtkmm/app.cpp:661 src/gtkmm/canvasoptions.cpp:151 +#: src/gtkmm/canvasview.cpp:1218 +msgid "Options" +msgstr "Opcions" + +#: src/gtkmm/app.cpp:662 +msgid "Close View" +msgstr "Tanca vista" + +#: src/gtkmm/app.cpp:663 src/gtkmm/canvasview.cpp:1224 +msgid "Close Document" +msgstr "Tanca document" + +#: src/gtkmm/app.cpp:672 src/gtkmm/canvasview.cpp:1239 +msgid "Select All Ducks" +msgstr "Selecciona tots els ànecs" + +#: src/gtkmm/app.cpp:673 src/gtkmm/canvasview.cpp:1243 +#, fuzzy +msgid "Unselect All Ducks" +msgstr "Selecciona tots els ànecs" + +#: src/gtkmm/app.cpp:674 src/gtkmm/canvasview.cpp:1247 +#, fuzzy +msgid "Select All Layers" +msgstr "Deselecciona totes les capes" + +#: src/gtkmm/app.cpp:675 src/gtkmm/canvasview.cpp:1251 +msgid "Unselect All Layers" +msgstr "Deselecciona totes les capes" + +#: src/gtkmm/app.cpp:676 src/gtkmm/canvasproperties.cpp:197 +msgid "Properties" +msgstr "Propietats" + +#: src/gtkmm/app.cpp:678 src/gtkmm/canvasview.cpp:1417 +msgid "Show Position Ducks" +msgstr "Mostra els ànecs de posició" + +#: src/gtkmm/app.cpp:679 src/gtkmm/canvasview.cpp:1419 +msgid "Show Vertex Ducks" +msgstr "Mostrar els ànecs de vèrtex" + +#: src/gtkmm/app.cpp:680 src/gtkmm/canvasview.cpp:1418 +msgid "Show Tangent Ducks" +msgstr "Mostra els ànecs de tangent" + +#: src/gtkmm/app.cpp:681 src/gtkmm/canvasview.cpp:1420 +msgid "Show Radius Ducks" +msgstr "Mostra els ànecs de ràdio" + +#: src/gtkmm/app.cpp:682 src/gtkmm/canvasview.cpp:1421 +msgid "Show Width Ducks" +msgstr "Mostrar els ànecs d'espessor" + +#: src/gtkmm/app.cpp:683 src/gtkmm/canvasview.cpp:1422 +msgid "Show Angle Ducks" +msgstr "Mostra els ànecs d'angle" + +#: src/gtkmm/app.cpp:684 src/gtkmm/canvasview.cpp:1270 +msgid "Use Parametric Renderer" +msgstr "Utilitza el renderitzador paramètric" + +#: src/gtkmm/app.cpp:685 +msgid "Use Quality Level 1" +msgstr "Utilitza el nivell de qualitat 1" + +#: src/gtkmm/app.cpp:686 +msgid "Use Quality Level 2" +msgstr "Utilitza el nivell de qualitat 2" + +#: src/gtkmm/app.cpp:687 +msgid "Use Quality Level 3" +msgstr "Utilitza el nivell de qualitat 3" + +#: src/gtkmm/app.cpp:688 +msgid "Use Quality Level 4" +msgstr "Utilitza el nivell de qualitat 4" + +#: src/gtkmm/app.cpp:689 +msgid "Use Quality Level 5" +msgstr "Utilitza el nivell de qualitat 5" + +#: src/gtkmm/app.cpp:690 +msgid "Use Quality Level 6" +msgstr "Utilitza el nivell de qualitat 6" + +#: src/gtkmm/app.cpp:691 +msgid "Use Quality Level 7" +msgstr "Utilitza el nivell de qualitat 7" + +#: src/gtkmm/app.cpp:692 +msgid "Use Quality Level 8" +msgstr "Utilitza el nivell de qualitat 8" + +#: src/gtkmm/app.cpp:693 +msgid "Use Quality Level 9" +msgstr "Utilitza el nivell de qualitat 8" + +#: src/gtkmm/app.cpp:694 +msgid "Use Quality Level 10" +msgstr "Utilitza el nivell de qualitat 10" + +#: src/gtkmm/app.cpp:696 src/gtkmm/canvasview.cpp:1304 +#, c-format +msgid "Set Low-Res pixel size to %d" +msgstr "Estableix la grandària de pixel de baixa resolució a %d" + +#: src/gtkmm/app.cpp:697 src/gtkmm/preview.cpp:358 +msgid "Play" +msgstr "Reprodueix" + +#: src/gtkmm/app.cpp:699 src/gtkmm/canvasview.cpp:994 +#: src/gtkmm/preview.cpp:364 +msgid "Stop" +msgstr "Para" + +#: src/gtkmm/app.cpp:700 +msgid "Toggle Grid Show" +msgstr "Commuta mostrar reixa" + +#: src/gtkmm/app.cpp:701 +msgid "Toggle Grid Snap" +msgstr "Commuta ajusta a la reixa" + +#: src/gtkmm/app.cpp:702 +msgid "Toggle Guide Show" +msgstr "Commuta Mostra guia" + +#: src/gtkmm/app.cpp:703 +msgid "Toggle Low-Res" +msgstr "Commuta Baixa resolució" + +#: src/gtkmm/app.cpp:704 src/gtkmm/canvasview.cpp:1320 +msgid "Decrease Low-Res Pixel Size" +msgstr "Disminueix la mida de pixel de baixa resolució" + +#: src/gtkmm/app.cpp:705 src/gtkmm/canvasview.cpp:1323 +msgid "Increase Low-Res Pixel Size" +msgstr "Augmenta la mida del pixel de Baixa Resolució" + +#: src/gtkmm/app.cpp:706 +msgid "Toggle Onion Skin" +msgstr "Commuta Pell de ceba" + +#: src/gtkmm/app.cpp:713 src/gtkmm/canvasview.cpp:1386 +msgid "Jump to Next Keyframe" +msgstr "Salta al Fotograma clau següent" + +#: src/gtkmm/app.cpp:714 src/gtkmm/canvasview.cpp:1389 +msgid "Jump to Prev Keyframe" +msgstr "Salta al Fotograma clau previ" + +#: src/gtkmm/app.cpp:715 src/gtkmm/canvasview.cpp:1370 +msgid "Next Frame" +msgstr "Fotograma següent" + +#: src/gtkmm/app.cpp:716 src/gtkmm/canvasview.cpp:1372 +msgid "Prev Frame" +msgstr "Fotograma previ" + +#: src/gtkmm/app.cpp:717 src/gtkmm/canvasview.cpp:1375 +msgid "Seek Forward" +msgstr "Avança" + +#: src/gtkmm/app.cpp:718 src/gtkmm/canvasview.cpp:1377 +msgid "Seek Backward" +msgstr "Retrocedeix" + +#: src/gtkmm/app.cpp:719 src/gtkmm/canvasview.cpp:1383 +msgid "Seek to Begin" +msgstr "Retrocedeix al principi" + +#: src/gtkmm/app.cpp:720 src/gtkmm/canvasview.cpp:1380 +msgid "Seek to End" +msgstr "Avança al final" + +#: src/gtkmm/app.cpp:722 +msgid "Add group" +msgstr "Afegeix un grup" + +#: src/gtkmm/app.cpp:724 src/gtkmm/iconcontroller.cpp:158 +#: src/synfigapp/actions/canvasadd.cpp:73 +msgid "New Canvas" +msgstr "Nou llenç" + +#: src/gtkmm/app.cpp:726 src/gtkmm/layeractionmanager.cpp:104 +#: src/gtkmm/layeractionmanager.cpp:494 +msgid "Increase Amount" +msgstr "Incrementa la quantitat" + +#: src/gtkmm/app.cpp:727 src/gtkmm/layeractionmanager.cpp:116 +#: src/gtkmm/layeractionmanager.cpp:511 +msgid "Decrease Amount" +msgstr "Disminueix la quantitat" + +#: src/gtkmm/app.cpp:1085 src/gtkmm/toolbox.cpp:359 +msgid "Synfig Studio" +msgstr "Synfig Studio" + +#: src/gtkmm/app.cpp:1098 +msgid "Failed to initialize synfig!" +msgstr "Ha fallat la inicialització de Synfig!" + +#: src/gtkmm/app.cpp:1107 +msgid "Init UI Manager..." +msgstr "Inicia el gestor d'Interfaz d'Usuari ..." + +#: src/gtkmm/app.cpp:1111 +msgid "Init Dock Manager..." +msgstr "Inicia el gestor d'acobladors..." + +#: src/gtkmm/app.cpp:1114 +msgid "Init State Manager..." +msgstr "Inicia el gestor d'Estats..." + +#: src/gtkmm/app.cpp:1117 +msgid "Init Toolbox..." +msgstr "Inicia la caixa d'eines..." + +#: src/gtkmm/app.cpp:1120 +msgid "Init About Dialog..." +msgstr "Inicia el diàleg Quant a..." + +#: src/gtkmm/app.cpp:1123 +msgid "Init Tool Options..." +msgstr "Inicia l'eina d'opcions..." + +#: src/gtkmm/app.cpp:1127 +msgid "Init History..." +msgstr "Inicia Historial..." + +#: src/gtkmm/app.cpp:1131 +msgid "Init Canvases..." +msgstr "Inicia Llenços..." + +#: src/gtkmm/app.cpp:1135 +msgid "Init Keyframes..." +msgstr "Inicia Fotogrames clau..." + +#: src/gtkmm/app.cpp:1139 +msgid "Init Layers..." +msgstr "Inicia Capes..." + +#: src/gtkmm/app.cpp:1143 +msgid "Init Params..." +msgstr "Inicia Paràmetres..." + +#: src/gtkmm/app.cpp:1147 +msgid "Init MetaData..." +msgstr "Inicia Metadades..." + +#: src/gtkmm/app.cpp:1151 +msgid "Init Children..." +msgstr "Inicia Descendents..." + +#: src/gtkmm/app.cpp:1155 +msgid "Init Info..." +msgstr "Inicia Informació..." + +#: src/gtkmm/app.cpp:1159 +msgid "Init Navigator..." +msgstr "Inicia el Navegador..." + +#: src/gtkmm/app.cpp:1163 +msgid "Init Timetrack..." +msgstr "Inicia la Linea de temps..." + +#: src/gtkmm/app.cpp:1167 +msgid "Init Curve Editor..." +msgstr "Inicia l'Editor de corbes..." + +#: src/gtkmm/app.cpp:1171 +msgid "Init Layer Groups..." +msgstr "Inicia els Grups de Capes..." + +#: src/gtkmm/app.cpp:1176 +msgid "Init Color Dialog..." +msgstr "Inicia el Diàleg de Color..." + +#: src/gtkmm/app.cpp:1179 +msgid "Init Gradient Dialog..." +msgstr "Inicia el Diàleg de gradient..." + +#: src/gtkmm/app.cpp:1182 +msgid "Init DeviceTracker..." +msgstr "Inicia el Seguiment de dispositius..." + +#: src/gtkmm/app.cpp:1185 +msgid "Init Tools..." +msgstr "Inicia Eines..." + +#: src/gtkmm/app.cpp:1192 +msgid "Init ModMirror..." +msgstr "Inicia Mirall..." + +#: src/gtkmm/app.cpp:1214 +msgid "Init ModPalette..." +msgstr "Inicia Taujana..." + +#: src/gtkmm/app.cpp:1217 +msgid "Init Setup Dialog..." +msgstr "Inicia el Diàleg d'atributs..." + +#: src/gtkmm/app.cpp:1220 +msgid "Init Input Dialog..." +msgstr "Inicia el Diàleg d'entrada..." + +#: src/gtkmm/app.cpp:1225 +msgid "Init auto recovery..." +msgstr "Inicia Autorecuperació..." + +#: src/gtkmm/app.cpp:1229 +msgid "Loading Settings..." +msgstr "Carregant Atributs..." + +#: src/gtkmm/app.cpp:1231 +msgid "Checking auto-recover..." +msgstr "Comprovant l'Autorecuperació..." + +#: src/gtkmm/app.cpp:1239 +msgid "Auto Recovery" +msgstr "Autorecuperació" + +#: src/gtkmm/app.cpp:1240 +msgid "" +"Synfig Studio seems to have crashed\n" +"before you could save all your files.\n" +"Would you like to re-open those files\n" +"and recover your unsaved changes?" +msgstr "" +"Synfig Studio sembla haver-se tancat abans \n" +"que pogués desar tots els fitxers\n" +"Voleu tornar a obrir aquests fitxers i recuperar\n" +"els canvis no desats?" + +#: src/gtkmm/app.cpp:1249 +msgid "Unable to fully recover from previous crash" +msgstr "" +"No ha estat possible fer una recuperació completa des de l'últim tancament " +"problemàtic" + +#: src/gtkmm/app.cpp:1251 +msgid "Unable to recover from previous crash" +msgstr "Ha estat impossible recuperar des de l'últim tancament problemàtic" + +#: src/gtkmm/app.cpp:1254 +msgid "" +"Synfig Studio has attempted to recover\n" +"from a previous crash. The files that it has\n" +"recovered are NOT YET SAVED. It would be a good\n" +"idea to review them and save them now." +msgstr "" +"Synfig ha intentat recuperar-se d'un\n" +"tancament previ. Els arxius que s'han\n" +"recuperat NO HAN ESTAT DESATS \n" +" ENCARA. Sembla una bona idea revisar-los\n" +"i desar-los ara." + +#: src/gtkmm/app.cpp:1270 +msgid "Loading files..." +msgstr "Carregant fitxers..." + +#: src/gtkmm/app.cpp:1281 +msgid "Done." +msgstr "Fet." + +#: src/gtkmm/app.cpp:1288 src/gtkmm/app.cpp:1292 +msgid "" +"Unknown exception caught when constructing App.\n" +"This software may be unstable." +msgstr "" +"S'ha capturat una excepció desconeguda en la construcció de l'aplicatiu.\n" +"Aquest programa pot ser inestable." + +#: src/gtkmm/app.cpp:1699 +msgid "Quit Request" +msgstr "Requeriment de Sortida" + +#: src/gtkmm/app.cpp:1702 +msgid "Cannot quit!" +msgstr "No puc Sortir!" + +#: src/gtkmm/app.cpp:1702 +msgid "" +"Tasks are currently running.\n" +"Please cancel the current tasks and try again" +msgstr "" +"Hi ha tasques en execució actualment.\n" +"Per favor canceleu-les i intenteu-ho de nou." + +#: src/gtkmm/app.cpp:1770 +msgid "Quit Request sent" +msgstr "Requeriment de Sortida enviat" + +#: src/gtkmm/app.cpp:1987 +msgid "current" +msgstr "actual" + +#: src/gtkmm/app.cpp:1990 +msgid "and older" +msgstr "i més antic" + +#: src/gtkmm/app.cpp:1994 +msgid "File Format Version: " +msgstr "Versió del Format d'Arxiu: " + +#: src/gtkmm/app.cpp:2093 +msgid "Feature not available" +msgstr "Característica no disponible" + +#: src/gtkmm/app.cpp:2094 +msgid "Sorry, this feature has not yet been implemented." +msgstr "Ho sento, aquesta característica no ha estat encara implementada" + +#: src/gtkmm/app.cpp:2179 +msgid "Documentation" +msgstr "Documentació" + +#: src/gtkmm/app.cpp:2180 +msgid "" +"Documentation for Synfig Studio is available on the website:\n" +"\n" +"http://www.synfig.org/Documentation" +msgstr "" +"La Documentació per a Synfig Studio està disponible a: \n" +"\n" +"http://www.synfig.org/Documentation" + +#: src/gtkmm/app.cpp:2181 src/gtkmm/toolbox.cpp:298 +msgid "Help" +msgstr "_Ajuda" + +#: src/gtkmm/app.cpp:2191 +msgid "No browser was found. Please load this website manually:" +msgstr "" +"No s'ha trobat cap navegador. Per favor carregueu aquesta pàgina web " +"manualment:" + +#: src/gtkmm/app.cpp:2193 +msgid "No browser found" +msgstr "No s'ha trobat cap navegador" + +#: src/gtkmm/app.cpp:2301 +#, c-format +msgid "Unable to open file \"%s\"" +msgstr "Ha estat impossible obrir l'arxiu «%s»" + +#: src/gtkmm/app.cpp:2309 +#, c-format +msgid "Unable to create instance for \"%s\"" +msgstr "Ha estat impossible crear una instància per «%s»" + +#: src/gtkmm/app.cpp:2315 src/gtkmm/iconcontroller.cpp:188 +#: src/gtkmm/instance.cpp:561 +msgid "CVS Update" +msgstr "Actualització per CVS" + +#: src/gtkmm/app.cpp:2315 +msgid "" +"There appears to be a newer version of this file available on the CVS " +"repository.\n" +"Would you like to update now? (It would probably be a good idea)" +msgstr "" +"Sembla haver-hi una nova versió d'aquest fitxer en el dipòsit CVS.\n" +"Voleu actualitzar ara? (probablement sigui una bona idea)" + +#: src/gtkmm/app.cpp:2321 src/gtkmm/app.cpp:2326 src/gtkmm/instance.cpp:483 +#: src/gtkmm/instance.cpp:499 src/gtkmm/instance.cpp:511 +#: src/gtkmm/instance.cpp:522 src/gtkmm/instance.cpp:536 +#: src/gtkmm/instance.cpp:547 src/gtkmm/instance.cpp:577 +#: src/gtkmm/instance.cpp:588 src/gtkmm/instance.cpp:604 +#: src/gtkmm/instance.cpp:613 src/gtkmm/layerparamtreestore.cpp:246 +#: src/gtkmm/widget_canvaschooser.cpp:145 +#: src/gtkmm/widget_canvaschooser.cpp:163 +msgid "Error" +msgstr "Error" + +#: src/gtkmm/app.cpp:2326 +msgid "Uncaught error on file open (BUG)" +msgstr "Error no capturat a l'obrir fitxer (BUG)" + +#: src/gtkmm/app.cpp:2378 +msgid "Unable to open file" +msgstr "Ha estat impossible d'obrir el fitxer" + +#: src/gtkmm/canvasoptions.cpp:61 +msgid "Canvas Options" +msgstr "Opcions de Llenç" + +#: src/gtkmm/canvasoptions.cpp:63 +msgid "_Snap to grid" +msgstr "Desplaça a la _Reixa" + +#: src/gtkmm/canvasoptions.cpp:64 +msgid "S_how grid" +msgstr "_Mostra la Reixa" + +#: src/gtkmm/canvasoptions.cpp:65 +msgid "Snap to _frame" +msgstr "Desplaça al _Fotograma" + +#: src/gtkmm/canvasoptions.cpp:80 +msgid "Grid" +msgstr "Reixa" + +#: src/gtkmm/canvasoptions.cpp:90 +msgid "_Grid size" +msgstr "_Grandària de la reixa" + +#: src/gtkmm/canvasoptions.cpp:104 src/gtkmm/iconcontroller.cpp:142 +#: src/gtkmm/keyframetree.cpp:62 src/gtkmm/renddesc.cpp:96 +#: src/synfigapp/actions/activepointadd.cpp:85 +#: src/synfigapp/actions/activepointsetoff.cpp:92 +#: src/synfigapp/actions/activepointseton.cpp:92 +#: src/synfigapp/actions/activepointsetsmart.cpp:92 +#: src/synfigapp/actions/blinepointtangentmerge.cpp:91 +#: src/synfigapp/actions/blinepointtangentsplit.cpp:91 +#: src/synfigapp/actions/colorset.cpp:83 +#: src/synfigapp/actions/gradientset.cpp:83 +#: src/synfigapp/actions/keyframeduplicate.cpp:84 +#: src/synfigapp/actions/layerparamdisconnect.cpp:83 +#: src/synfigapp/actions/valuedescconvert.cpp:102 +#: src/synfigapp/actions/valuedescdisconnect.cpp:94 +#: src/synfigapp/actions/valuedescset.cpp:100 +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:79 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:81 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:80 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:83 +#: src/synfigapp/actions/waypointadd.cpp:86 +#: src/synfigapp/actions/waypointsetsmart.cpp:100 +msgid "Time" +msgstr "Temps" + +#: src/gtkmm/canvasoptions.cpp:113 src/gtkmm/dialog_setup.cpp:174 +msgid "Units" +msgstr "Unitats" + +#: src/gtkmm/canvasoptions.cpp:114 +msgid "Not yet implemented!" +msgstr "Encara no creat!" + +#: src/gtkmm/canvasoptions.cpp:169 src/gtkmm/dialog_keyframe.cpp:89 +msgid "Not yet implemented" +msgstr "Per implementar" + +#: src/gtkmm/canvasproperties.cpp:64 +msgid "Canvas Properties" +msgstr "Propietats del llenç" + +#: src/gtkmm/canvasproperties.cpp:77 +msgid "Canvas Info" +msgstr "Informació del llenç" + +#: src/gtkmm/canvasproperties.cpp:79 +msgid "Canvas Info" +msgstr "Informació del llenç" + +#: src/gtkmm/canvasproperties.cpp:95 +msgid "_ID" +msgstr "_ID" + +#: src/gtkmm/canvasproperties.cpp:101 +msgid "_Name" +msgstr "_Nom" + +#: src/gtkmm/canvasproperties.cpp:104 +msgid "_Description" +msgstr "_Descripció" + +#: src/gtkmm/canvasproperties.cpp:146 src/gtkmm/dock_metadata.cpp:69 +msgid "Key" +msgstr "Clau" + +#: src/gtkmm/canvasproperties.cpp:147 src/gtkmm/dock_metadata.cpp:70 +msgid "Data" +msgstr "Dades" + +#: src/gtkmm/canvasproperties.cpp:182 src/gtkmm/dock_metadata.cpp:134 +msgid "New MetaData Entry" +msgstr "Nova Entrada de Meta Dades" + +#: src/gtkmm/canvasproperties.cpp:182 src/gtkmm/dock_metadata.cpp:134 +msgid "Please enter the name of the key" +msgstr "Per favor introduiu el nom de la clau" + +#: src/gtkmm/canvasproperties.cpp:226 +#, fuzzy +msgid "Edit Canvas Properties" +msgstr "Propietats del llenç" + +#: src/gtkmm/canvastreestore.cpp:204 src/gtkmm/canvastreestore.cpp:242 +#: src/gtkmm/childrentreestore.cpp:204 src/gtkmm/iconcontroller.cpp:149 +#: src/synfigapp/action.cpp:468 +msgid "Canvas" +msgstr "Llenç" + +#: src/gtkmm/canvastreestore.cpp:241 src/gtkmm/childrentreestore.cpp:201 +#: src/gtkmm/instance.cpp:417 +msgid "[Unnamed]" +msgstr "[Sense Nom]" + +#: src/gtkmm/canvasview.cpp:241 src/gtkmm/workarea.cpp:2344 +#: src/gtkmm/workarea.cpp:2439 +msgid "Idle" +msgstr "Inactiu" + +#: src/gtkmm/canvasview.cpp:331 +msgid "ERROR" +msgstr "ERROR" + +#: src/gtkmm/canvasview.cpp:380 +msgid "Feature not yet implemented" +msgstr "Característica per implementar" + +#: src/gtkmm/canvasview.cpp:926 +msgid "Moves the time window" +msgstr "Mou la finestra de temps" + +#: src/gtkmm/canvasview.cpp:927 +msgid "Changes the current time" +msgstr "Canvia el temps actual" + +#: src/gtkmm/canvasview.cpp:936 +msgid "Animate" +msgstr "Anima" + +#: src/gtkmm/canvasview.cpp:940 src/gtkmm/canvasview.cpp:2533 +#: src/gtkmm/iconcontroller.cpp:182 +msgid "All Keyframes Locked" +msgstr "Tots els Fotogrames clau bloquejats" + +#: src/gtkmm/canvasview.cpp:995 +msgid "Refresh" +msgstr "Refresca" + +#: src/gtkmm/canvasview.cpp:1221 +msgid "Close Window" +msgstr "Tanca la Finestra" + +#: src/gtkmm/canvasview.cpp:1227 +msgid "Quit" +msgstr "_Sortir" + +#: src/gtkmm/canvasview.cpp:1279 +msgid " (best)" +msgstr " (millor)" + +#: src/gtkmm/canvasview.cpp:1280 +msgid " (fastest)" +msgstr "(el més ràpid)" + +#: src/gtkmm/canvasview.cpp:1282 +#, c-format +msgid "Set Quality to %d" +msgstr "Establir qualitat a %d" + +#: src/gtkmm/canvasview.cpp:1332 +msgid "Flipbook Dialog" +msgstr "Diàleg de Previsualización" + +#: src/gtkmm/canvasview.cpp:1339 src/gtkmm/iconcontroller.cpp:164 +msgid "Show Grid" +msgstr "Mosta la reixa" + +#: src/gtkmm/canvasview.cpp:1343 +msgid "Snap to Grid" +msgstr "Ajusta a la _reixa" + +#: src/gtkmm/canvasview.cpp:1347 +msgid "Show Guides" +msgstr "Mosta les guies" + +#: src/gtkmm/canvasview.cpp:1351 +msgid "Use Low-Res" +msgstr "Utilitza baixa resolució" + +#: src/gtkmm/canvasview.cpp:1355 +msgid "Show Onion Skin" +msgstr "Mostra pell de ceba" + +#: src/gtkmm/canvasview.cpp:1398 +msgid "Zoom In on Timeline" +msgstr "Apropa en la línia de temps" + +#: src/gtkmm/canvasview.cpp:1401 +msgid "Zoom Out on Timeline" +msgstr "Allunya de la linea de temps" + +#: src/gtkmm/canvasview.cpp:1807 src/gtkmm/canvasview.cpp:2268 +msgid "Select All Children" +msgstr "Selecciona tots els descendents" + +#: src/gtkmm/canvasview.cpp:2081 +msgid "-MODIFIED" +msgstr "-MODIFICAT" + +#: src/gtkmm/canvasview.cpp:2083 +msgid "-UPDATED" +msgstr "-ACTUALITZAT" + +#: src/gtkmm/canvasview.cpp:2088 +msgid " (Root)" +msgstr " (Arrel)" + +#: src/gtkmm/canvasview.cpp:2512 +msgid "In Animate Editing Mode" +msgstr "En mode d'edició d'animació" + +#: src/gtkmm/canvasview.cpp:2522 +msgid "Not in Animate Editing Mode" +msgstr "No en mode d'edició d'animació" + +#: src/gtkmm/canvasview.cpp:2543 src/gtkmm/iconcontroller.cpp:184 +msgid "Future Keyframes Locked" +msgstr "Fotogrames clau futurs bloquejats" + +#: src/gtkmm/canvasview.cpp:2553 src/gtkmm/iconcontroller.cpp:183 +msgid "Past Keyframes Locked" +msgstr "Fotogrames clau anteriors bloquejats" + +#: src/gtkmm/canvasview.cpp:2563 src/gtkmm/iconcontroller.cpp:185 +msgid "No Keyframes Locked" +msgstr "No hi ha cap fotograma bloquejat" + +#: src/gtkmm/canvasview.cpp:3177 +msgid "Change Waypoint Group" +msgstr "Canvia grup d'interpolació" + +#: src/gtkmm/canvasview.cpp:3208 +msgid "Duplicate Waypoints" +msgstr "Duplica les Interpolacions" + +#: src/gtkmm/canvasview.cpp:3224 +msgid "Remove Waypoints" +msgstr "Esborra les interpolaciones" + +#: src/gtkmm/canvasview.cpp:3269 src/gtkmm/canvasview.cpp:3272 +#: src/gtkmm/canvasview.cpp:3275 src/gtkmm/widget_defaults.cpp:290 +msgid "_TCB" +msgstr "_TCB" + +#: src/gtkmm/canvasview.cpp:3279 src/gtkmm/canvasview.cpp:3282 +#: src/gtkmm/canvasview.cpp:3285 src/gtkmm/widget_defaults.cpp:293 +msgid "_Linear" +msgstr "_Lineal" + +#: src/gtkmm/canvasview.cpp:3289 +msgid "_Ease In" +msgstr "_Entrada senzilla" + +#: src/gtkmm/canvasview.cpp:3292 +msgid "_Ease Out" +msgstr "_Sortida senzilla" + +#: src/gtkmm/canvasview.cpp:3295 src/gtkmm/widget_defaults.cpp:292 +msgid "_Ease In/Out" +msgstr "Entrada/Sortida s_enzilla" + +#: src/gtkmm/canvasview.cpp:3299 src/gtkmm/canvasview.cpp:3302 +#: src/gtkmm/canvasview.cpp:3305 src/gtkmm/widget_defaults.cpp:291 +msgid "_Constant" +msgstr "_Constant" + +#: src/gtkmm/canvasview.cpp:3310 +msgid "_Jump To" +msgstr "_Salta a" + +#: src/gtkmm/canvasview.cpp:3313 +msgid "_Duplicate" +msgstr "_Duplica" + +#: src/gtkmm/canvasview.cpp:3316 +msgid "_Remove" +msgstr "_Esborra" + +#: src/gtkmm/canvasview.cpp:3316 +#, c-format +msgid "_Remove %d Waypoints" +msgstr "_Esborra %d interpolacions" + +#: src/gtkmm/canvasview.cpp:3327 +msgid "_Both" +msgstr "_Ambdós" + +#: src/gtkmm/canvasview.cpp:3328 +msgid "_In" +msgstr "_Entrada" + +#: src/gtkmm/canvasview.cpp:3329 +msgid "_Out" +msgstr "_Sortida" + +#: src/gtkmm/canvasview.cpp:3560 src/synfigapp/canvasinterface.cpp:565 +msgid "Import Image" +msgstr "Importa la imatge" + +#: src/gtkmm/cellrenderer_value.cpp:221 +msgid "Paragraph" +msgstr "Paràgraf" + +#: src/gtkmm/cellrenderer_value.cpp:225 +msgid "Enter Paragraph Text Here:" +msgstr "Introdueixi el text del paràgraf ací:" + +#: src/gtkmm/cellrenderer_value.cpp:411 +msgid "" +msgstr "" + +#: src/gtkmm/cellrenderer_value.cpp:441 src/gtkmm/iconcontroller.cpp:146 +msgid "Segment" +msgstr "Segment" + +#: src/gtkmm/cellrenderer_value.cpp:448 +msgid "List" +msgstr "Llista" + +#: src/gtkmm/cellrenderer_value.cpp:451 src/gtkmm/iconcontroller.cpp:147 +msgid "BLine Point" +msgstr "Punt de la línia de Beizer" + +#: src/gtkmm/cellrenderer_value.cpp:454 +msgid "UNKNOWN" +msgstr "DESCONEGUT" + +#: src/gtkmm/childrentree.cpp:93 src/gtkmm/dock_canvases.cpp:108 +#: src/synfigapp/actions/canvasadd.cpp:78 +msgid "ID" +msgstr "ID" + +#: src/gtkmm/childrentree.cpp:113 src/gtkmm/layertree.cpp:354 +#: src/synfigapp/actions/valuedescconvert.cpp:97 +msgid "Type" +msgstr "Tipus" + +#: src/gtkmm/childrentree.cpp:124 src/synfigapp/actions/layerparamset.cpp:80 +#: src/synfigapp/actions/valuedescset.cpp:96 +#: src/synfigapp/actions/valuenodeconstset.cpp:77 +msgid "ValueBase" +msgstr "Valor base" + +#: src/gtkmm/childrentree.cpp:140 src/gtkmm/dock_timetrack.cpp:87 +#: src/gtkmm/iconcontroller.cpp:180 src/gtkmm/layertree.cpp:367 +msgid "Time Track" +msgstr "Pista de Temps" + +#: src/gtkmm/childrentreestore.cpp:78 +msgid "Canvases" +msgstr "Llenços" + +#: src/gtkmm/childrentreestore.cpp:83 +msgid "ValueBase Nodes" +msgstr "Nodes de valor base" + +#: src/gtkmm/dialog_color.cpp:68 +msgid "Colors" +msgstr "Colors" + +#: src/gtkmm/dialog_gradient.cpp:65 +msgid "Gradient Editor" +msgstr "Editor de gradient" + +#: src/gtkmm/dialog_gradient.cpp:75 +msgid "Grab" +msgstr "Agafa" + +#: src/gtkmm/dialog_keyframe.cpp:59 +msgid "Keyframe Dialog" +msgstr "Diàleg de fotograma clau" + +#: src/gtkmm/dialog_preview.cpp:62 +msgid "Preview Window" +msgstr "Finestra de previsualització" + +#: src/gtkmm/dialog_preview.cpp:88 +msgid "Preview Options" +msgstr "Opcions de previsualizació" + +#: src/gtkmm/dialog_preview.cpp:91 +msgid "_Begin Time" +msgstr "Temps d'I_nici" + +#: src/gtkmm/dialog_preview.cpp:92 src/gtkmm/renddesc.cpp:556 +msgid "_End Time" +msgstr "Temps _final" + +#: src/gtkmm/dialog_preview.cpp:106 +msgid "General Settings" +msgstr "Atributs generals" + +#: src/gtkmm/dialog_preview.cpp:108 +msgid "General Settings" +msgstr "Atributs generals" + +#: src/gtkmm/dialog_preview.cpp:120 +msgid "_Zoom" +msgstr "_Ampliació" + +#: src/gtkmm/dialog_preview.cpp:129 src/gtkmm/renddesc.cpp:546 +msgid "_Frames per second" +msgstr "_Fotogrames per segon" + +#: src/gtkmm/dialog_preview.cpp:138 src/gtkmm/renddesc.cpp:532 +msgid "Time Settings" +msgstr "Atributs de temps" + +#: src/gtkmm/dialog_preview.cpp:140 src/gtkmm/renddesc.cpp:534 +msgid "Time Settings" +msgstr "Atributs de temps" + +#: src/gtkmm/dialog_setup.cpp:73 +msgid "Synfig Studio Setup" +msgstr "Atributs de Synfig Studio" + +#: src/gtkmm/dialog_setup.cpp:79 +msgid "Visually Linear Color Selection" +msgstr "Selecció del color de manera visualment lineal" + +#: src/gtkmm/dialog_setup.cpp:81 +msgid "Use Only a Single Thread" +msgstr "Utilitza només un únic fil" + +#: src/gtkmm/dialog_setup.cpp:83 +msgid "Restrict Real-Valued Ducks to Top Right Quadrant" +msgstr "Restringir Ànecs de valors reals al quadrant superior dret" + +#: src/gtkmm/dialog_setup.cpp:110 +msgid "Gamma" +msgstr "Gamma" + +#: src/gtkmm/dialog_setup.cpp:116 src/gtkmm/widget_coloredit.cpp:353 +msgid "Red" +msgstr "Roig" + +#: src/gtkmm/dialog_setup.cpp:121 src/gtkmm/widget_coloredit.cpp:355 +msgid "Green" +msgstr "Verd" + +#: src/gtkmm/dialog_setup.cpp:126 src/gtkmm/widget_coloredit.cpp:357 +msgid "Blue" +msgstr "Blau" + +#: src/gtkmm/dialog_setup.cpp:130 +msgid "Black Level" +msgstr "Nivell de negre" + +#: src/gtkmm/dialog_setup.cpp:141 +msgid "Misc." +msgstr "Misc." + +#: src/gtkmm/dialog_setup.cpp:147 +msgid "Timestamp" +msgstr "Marca de temps" + +#: src/gtkmm/dialog_setup.cpp:175 +msgid "Pixels" +msgstr "Píxels" + +#: src/gtkmm/dialog_setup.cpp:176 +msgid "Points" +msgstr "Punts" + +#: src/gtkmm/dialog_setup.cpp:177 +msgid "Inches" +msgstr "Polzades" + +#: src/gtkmm/dialog_setup.cpp:178 +msgid "Meters" +msgstr "Metres" + +#: src/gtkmm/dialog_setup.cpp:179 +msgid "Centimeters" +msgstr "Centímetres" + +#: src/gtkmm/dialog_setup.cpp:180 +msgid "Millimeters" +msgstr "Mil·límetres" + +#: src/gtkmm/dialog_setup.cpp:185 +msgid "Unit System" +msgstr "Sistema d'unitats" + +#: src/gtkmm/dialog_setup.cpp:191 +msgid "Recent Files" +msgstr "Arxius recents" + +#: src/gtkmm/dialog_setup.cpp:203 +msgid "Auto Backup Interval (0 to disable)" +msgstr "Interval de còpia de seguretat Automatica (0 per a deshabilitar)" + +#: src/gtkmm/dialog_setup.cpp:210 +msgid "Browser Command" +msgstr "Ordre per obrir el navegador" + +#: src/gtkmm/dialog_soundselect.cpp:60 +msgid "Sound Select" +msgstr "Selecciona So" + +#: src/gtkmm/dialog_soundselect.cpp:67 +#, fuzzy +msgid "Sound Parameters" +msgstr "Paràmetres TBC" + +#: src/gtkmm/dialog_soundselect.cpp:68 +#, fuzzy +msgid "Sound Parameters" +msgstr "Paràmetres TBC" + +#: src/gtkmm/dialog_soundselect.cpp:76 +#, fuzzy +msgid "_Sound File" +msgstr "Arxiu de So" + +#: src/gtkmm/dialog_soundselect.cpp:79 +#, fuzzy +msgid "Time _Offset" +msgstr "Enllaça els desfases" + +#: src/gtkmm/dialog_tooloptions.cpp:56 src/gtkmm/dialog_tooloptions.cpp:78 +msgid "Tool Options" +msgstr "Opcions d'eina" + +#: src/gtkmm/dialog_tooloptions.cpp:57 +msgid "This tool has no options" +msgstr "Aquesta eina no té opcions" + +#: src/gtkmm/dialog_waypoint.cpp:63 +msgid "Waypoint Editor" +msgstr "Editor d'interpolació" + +#: src/gtkmm/dockable.cpp:121 +msgid "X" +msgstr "X" + +#: src/gtkmm/dock_canvases.cpp:55 +msgid "Canvas Browser" +msgstr "Navegado de llenços" + +#: src/gtkmm/dock_children.cpp:67 src/gtkmm/iconcontroller.cpp:175 +msgid "Children" +msgstr "Descendents" + +#: src/gtkmm/dock_curves.cpp:70 src/gtkmm/iconcontroller.cpp:176 +msgid "Curves" +msgstr "Corbes" + +#: src/gtkmm/dockdialog.cpp:115 +msgid "Dock Panel" +msgstr "Panell encastable" + +#: src/gtkmm/dockdialog.cpp:563 +msgid "Empty Dock Panel" +msgstr "Panell encastable buit" + +#: src/gtkmm/dock_history.cpp:69 src/gtkmm/dock_history.cpp:125 +msgid "History" +msgstr "Historial" + +#: src/gtkmm/dock_history.cpp:78 src/gtkmm/iconcontroller.cpp:172 +msgid "Clear Undo Stack" +msgstr "Buida la pila de desfer" + +#: src/gtkmm/dock_history.cpp:79 +msgid "Clear the undo stack" +msgstr "Buida la pila de desfer" + +#: src/gtkmm/dock_history.cpp:89 src/gtkmm/iconcontroller.cpp:173 +msgid "Clear Redo Stack" +msgstr "Buidar la pila de refer" + +#: src/gtkmm/dock_history.cpp:90 +msgid "Clear the redo stack" +msgstr "Buida la pila de refer" + +#: src/gtkmm/dock_history.cpp:100 +msgid "Clear Undo and Redo Stacks" +msgstr "Buida les piles de desfer i refer" + +#: src/gtkmm/dock_history.cpp:101 +msgid "Clear the undo and redo stacks" +msgstr "Buida les piles de desfer i de refer" + +#: src/gtkmm/dock_history.cpp:111 src/gtkmm/toolbox.cpp:294 +msgid "Undo" +msgstr "Desfer" + +#: src/gtkmm/dock_history.cpp:112 +msgid "Undo the previous action" +msgstr "Desfés l'acció anterior" + +#: src/gtkmm/dock_history.cpp:119 src/gtkmm/toolbox.cpp:295 +msgid "Redo" +msgstr "Refés" + +#: src/gtkmm/dock_history.cpp:120 +msgid "Redo the previously undone action" +msgstr "Refà l'acció prèviament desfeta" + +#: src/gtkmm/dock_history.cpp:211 src/gtkmm/keyframetree.cpp:92 +msgid "Jump" +msgstr "Salta" + +#: src/gtkmm/dock_history.cpp:216 src/gtkmm/keyframetree.cpp:96 +msgid "(JMP)" +msgstr "(SALTA)" + +#: src/gtkmm/dock_history.cpp:228 +msgid "Action" +msgstr "Acció" + +#: src/gtkmm/dock_history.cpp:275 src/gtkmm/dock_history.cpp:283 +#: src/gtkmm/dock_history.cpp:291 +msgid "Clear History" +msgstr "Esborra l'historial" + +#: src/gtkmm/dock_history.cpp:276 +msgid "" +"You will not be able to undo any changes that you have made!\n" +"Are you sure you want to clear the undo stack?" +msgstr "" +"No podreu desfer cap canvi que hàgeu fet!\n" +"Esteu segurs que voleu buidar la pila de desfer?" + +#: src/gtkmm/dock_history.cpp:284 +msgid "" +"You will not be able to redo any changes that you have made!\n" +"Are you sure you want to clear the redo stack?" +msgstr "" +"No podreu desfer cap canvi que hàgeu fet!\n" +"Esteuegursque voleu buidar la pila de refer?" + +#: src/gtkmm/dock_history.cpp:292 +msgid "" +"You will not be able to undo or redo any changes that you have made!\n" +"Are you sure you want to clear the undo and redo stacks?" +msgstr "" +"No podreu desfer cap canvi que hàgeu fet!\n" +"Esteu segurs que voleu buidar les piles de desfer i refer?" + +#: src/gtkmm/dock_info.cpp:96 src/gtkmm/instance.cpp:552 +msgid "Info" +msgstr "Informació" + +#: src/gtkmm/dock_info.cpp:103 +msgid "X: " +msgstr "X: " + +#: src/gtkmm/dock_info.cpp:104 +msgid "Y: " +msgstr "Y: " + +#: src/gtkmm/dock_info.cpp:114 +msgid "R: " +msgstr "R: " + +#: src/gtkmm/dock_info.cpp:115 +msgid "G: " +msgstr "G: " + +#: src/gtkmm/dock_info.cpp:116 +msgid "B: " +msgstr "B: " + +#: src/gtkmm/dock_info.cpp:117 +msgid "A: " +msgstr "A: " + +#: src/gtkmm/dock_keyframes.cpp:66 src/gtkmm/iconcontroller.cpp:177 +msgid "Keyframes" +msgstr "Fotogrames clau" + +#: src/gtkmm/dock_layergroups.cpp:68 +msgid "Groups" +msgstr "Grups" + +#: src/gtkmm/dock_layergroups.cpp:74 +msgid "Group Ops" +msgstr "Opcions de grup" + +#: src/gtkmm/dock_layergroups.cpp:76 src/gtkmm/groupactionmanager.cpp:175 +#: src/gtkmm/groupactionmanager.cpp:176 +msgid "Add a New Group" +msgstr "Afegeix un grup nou" + +#: src/gtkmm/dock_layers.cpp:74 +msgid "Layers" +msgstr "Capes" + +#: src/gtkmm/dock_layers.cpp:146 +msgid "Layer Ops" +msgstr "Opcions de capa" + +#: src/gtkmm/dock_metadata.cpp:64 +msgid "Canvas MetaData" +msgstr "Metadades del llenç" + +#: src/gtkmm/dock_metadata.cpp:84 +msgid "Add new MetaData entry" +msgstr "Afegir una nova entrada de metadades" + +#: src/gtkmm/dock_metadata.cpp:94 +msgid "Remove selected MetaData entry" +msgstr "Esborra l'entrada de metadades seleccionada" + +#: src/gtkmm/dock_navigator.cpp:496 src/gtkmm/iconcontroller.cpp:179 +msgid "Navigator" +msgstr "Navegador" + +#: src/gtkmm/dock_params.cpp:65 +msgid "Params" +msgstr "Paràmetres" + +#: src/gtkmm/dock_timetrack.cpp:83 src/gtkmm/layergrouptree.cpp:75 +#: src/gtkmm/layertree.cpp:221 src/gtkmm/layertree.cpp:300 +#: src/synfigapp/actions/valuedescexport.cpp:92 +#: src/synfigapp/actions/valuenodeadd.cpp:77 +#: src/synfigapp/actions/valuenoderename.cpp:86 +msgid "Name" +msgstr "Nom" + +#: src/gtkmm/dock_timetrack.cpp:404 +msgid "Timetrack" +msgstr "Pista de temps" + +#: src/gtkmm/groupactionmanager.cpp:269 +msgid "UnnamedGroup" +msgstr "Grup sense nom" + +#: src/gtkmm/iconcontroller.cpp:139 +msgid "Bool" +msgstr "Booleà" + +#: src/gtkmm/iconcontroller.cpp:140 +msgid "Integer" +msgstr "Sencer" + +#: src/gtkmm/iconcontroller.cpp:141 +msgid "Angle" +msgstr "Angle" + +#: src/gtkmm/iconcontroller.cpp:143 +msgid "Real" +msgstr "Real" + +#: src/gtkmm/iconcontroller.cpp:144 +msgid "Vector" +msgstr "Vector" + +#: src/gtkmm/iconcontroller.cpp:145 +msgid "Color" +msgstr "Color" + +#: src/gtkmm/iconcontroller.cpp:148 src/gtkmm/iconcontroller.cpp:150 +#: src/gtkmm/iconcontroller.cpp:156 src/gtkmm/iconcontroller.cpp:157 +msgid "Rename" +msgstr "Renombra" + +#: src/gtkmm/iconcontroller.cpp:152 +#, fuzzy +msgid "Reset Colors" +msgstr "Colors" + +#: src/gtkmm/iconcontroller.cpp:153 +msgid "Swap Colors" +msgstr "Intercanvia els colors" + +#: src/gtkmm/iconcontroller.cpp:154 +#: src/synfigapp/actions/layerparamconnect.cpp:80 +#: src/synfigapp/actions/valuenodedynamiclistloop.cpp:72 +#: src/synfigapp/actions/valuenodedynamiclistunloop.cpp:72 +#: src/synfigapp/actions/valuenoderemove.cpp:80 +msgid "ValueNode" +msgstr "Valor del node" + +#: src/gtkmm/iconcontroller.cpp:155 +msgid "About" +msgstr "Quant a" + +#: src/gtkmm/iconcontroller.cpp:159 src/gtkmm/toolbox.cpp:293 +msgid "Save All" +msgstr "Desa Tot" + +#: src/gtkmm/iconcontroller.cpp:160 src/gtkmm/layergrouptreestore.cpp:920 +#: src/gtkmm/layertreestore.cpp:930 +#: src/synfigapp/actions/groupaddlayers.cpp:72 +#: src/synfigapp/actions/groupremovelayers.cpp:73 +#: src/synfigapp/actions/layeractivate.cpp:86 +#: src/synfigapp/actions/layerduplicate.cpp:81 +#: src/synfigapp/actions/layerencapsulate.cpp:81 +#: src/synfigapp/actions/layerlower.cpp:80 +#: src/synfigapp/actions/layermove.cpp:85 +#: src/synfigapp/actions/layerparamconnect.cpp:72 +#: src/synfigapp/actions/layerparamdisconnect.cpp:75 +#: src/synfigapp/actions/layerparamset.cpp:72 +#: src/synfigapp/actions/layerraise.cpp:80 +#: src/synfigapp/actions/layerremove.cpp:79 +#: src/synfigapp/actions/layersetdesc.cpp:85 +msgid "Layer" +msgstr "Capa" + +#: src/gtkmm/iconcontroller.cpp:161 +msgid "Paste Canvas" +msgstr "Enganxa llenç" + +#: src/gtkmm/iconcontroller.cpp:165 +msgid "Hide Grid" +msgstr "Oculta la reixa" + +#: src/gtkmm/iconcontroller.cpp:166 +msgid "Enable Grid Snap" +msgstr "Habilita el desplaçament a la reixa" + +#: src/gtkmm/iconcontroller.cpp:167 +msgid "Disable Grid Snap" +msgstr "Deshabilita el desplaçament a la reixa" + +#: src/gtkmm/iconcontroller.cpp:168 +msgid "Duplicate" +msgstr "Duplica" + +#: src/gtkmm/iconcontroller.cpp:169 +#: src/synfigapp/actions/layerencapsulate.cpp:52 +msgid "Encapsulate" +msgstr "Encapsula" + +#: src/gtkmm/iconcontroller.cpp:170 src/gtkmm/layeractionmanager.cpp:134 +msgid "Select All Child Layers" +msgstr "Selecciona totes les capes descendents" + +#: src/gtkmm/iconcontroller.cpp:178 +msgid "MetaData" +msgstr "Metadades" + +#: src/gtkmm/iconcontroller.cpp:187 +msgid "CVS Add" +msgstr "Afegeix CVS" + +#: src/gtkmm/iconcontroller.cpp:189 src/gtkmm/instance.cpp:492 +#: src/gtkmm/instance.cpp:503 +msgid "CVS Commit" +msgstr "Commit CVS" + +#: src/gtkmm/iconcontroller.cpp:190 src/gtkmm/instance.cpp:594 +msgid "CVS Revert" +msgstr "Revert CVS" + +#: src/gtkmm/iconcontroller.cpp:193 +msgid "Normal Tool" +msgstr "Eina normal" + +#: src/gtkmm/iconcontroller.cpp:194 src/gtkmm/state_polygon.cpp:234 +#: src/gtkmm/state_polygon.cpp:273 +msgid "Polygon Tool" +msgstr "Eina polígon" + +#: src/gtkmm/iconcontroller.cpp:195 src/gtkmm/state_bline.cpp:377 +#: src/gtkmm/state_bline.cpp:421 +msgid "BLine Tool" +msgstr "Eina línia Beizer" + +#: src/gtkmm/iconcontroller.cpp:196 +msgid "Eyedrop Tool" +msgstr "Eina recull color" + +#: src/gtkmm/iconcontroller.cpp:197 +msgid "Fill Tool" +msgstr "Eina de farciment" + +#: src/gtkmm/iconcontroller.cpp:198 src/gtkmm/state_draw.cpp:433 +#: src/gtkmm/state_draw.cpp:519 +msgid "Draw Tool" +msgstr "Eina de dibuix" + +#: src/gtkmm/iconcontroller.cpp:199 src/gtkmm/state_sketch.cpp:325 +#: src/gtkmm/state_sketch.cpp:399 +msgid "Sketch Tool" +msgstr "Eina d'esbós" + +#: src/gtkmm/iconcontroller.cpp:200 src/gtkmm/state_circle.cpp:402 +#: src/gtkmm/state_circle.cpp:475 +msgid "Circle Tool" +msgstr "Eina de cercle" + +#: src/gtkmm/iconcontroller.cpp:201 src/gtkmm/state_rectangle.cpp:351 +#: src/gtkmm/state_rectangle.cpp:407 +msgid "Rectangle Tool" +msgstr "Eina de rectángulo" + +#: src/gtkmm/iconcontroller.cpp:202 src/gtkmm/state_smoothmove.cpp:176 +msgid "SmoothMove Tool" +msgstr "Eina de moviment suau" + +#: src/gtkmm/iconcontroller.cpp:203 src/gtkmm/state_scale.cpp:166 +#: src/gtkmm/state_scale.cpp:192 +msgid "Scale Tool" +msgstr "Eina d'escala" + +#: src/gtkmm/iconcontroller.cpp:204 src/gtkmm/state_width.cpp:228 +#: src/gtkmm/state_width.cpp:304 +msgid "Width Tool" +msgstr "Eina d'espessor" + +#: src/gtkmm/iconcontroller.cpp:205 src/gtkmm/state_rotate.cpp:180 +#: src/gtkmm/state_rotate.cpp:207 +msgid "Rotate Tool" +msgstr "Eina de rotació" + +#: src/gtkmm/iconcontroller.cpp:206 +msgid "Zoom Tool" +msgstr "Eina de Zoom" + +#: src/gtkmm/iconcontroller.cpp:207 +msgid "Info Tool" +msgstr "Eina d'informació" + +#: src/gtkmm/iconcontroller.cpp:208 src/gtkmm/mod_mirror/state_mirror.cpp:185 +#: src/gtkmm/mod_mirror/state_mirror.cpp:213 +msgid "Mirror Tool" +msgstr "Eina de mirall" + +#: src/gtkmm/iconcontroller.cpp:210 src/gtkmm/state_gradient.cpp:266 +#: src/gtkmm/state_gradient.cpp:326 +msgid "Gradient Tool" +msgstr "Eina de Gradient" + +#: src/gtkmm/iconcontroller.cpp:211 +#, fuzzy +msgid "Star Tool" +msgstr "Eina d'escala" + +#: src/gtkmm/instance.cpp:282 +msgid "Choose a Filename to Save As" +msgstr "Trieu un nom d'arxiu amb el que desar" + +#: src/gtkmm/instance.cpp:300 +msgid "Unknown extension" +msgstr "Extensió desconeguda" + +#: src/gtkmm/instance.cpp:301 +msgid "" +"You have given the file name an extension\n" +"which I do not recognize. Are you sure this is what you want?" +msgstr "" +"Heu donat una extensió a l'arxiu desconeguda.\n" +"Esteu segurs que és això el que vulgueu?" + +#: src/gtkmm/instance.cpp:483 +msgid "You must first add this composition to the repository" +msgstr "Heu d'afegir abans aquesta composició al repositori" + +#: src/gtkmm/instance.cpp:492 src/gtkmm/instance.cpp:561 +msgid "This will save any changes you have made. Are you sure?" +msgstr "Això desarà qualsevol canvi que hagi fet. Esteu segurs?" + +#: src/gtkmm/instance.cpp:499 +msgid "" +"The local copy of the file hasn't been changed since the last update.\n" +"Nothing to commit!" +msgstr "" +"La còpia local de l'arxiu no s'ha canviat des de l'última actualització.\n" +"Res a enviar!" + +#: src/gtkmm/instance.cpp:503 +msgid "Enter a log message describing the changes you have made" +msgstr "Introduïu un missatge descrivint els canvis que heu realitzat" + +#: src/gtkmm/instance.cpp:511 +msgid "An error has occurred when trying to COMMIT" +msgstr "Ha ocorregut un error intentant al fer el COMMIT" + +#: src/gtkmm/instance.cpp:522 +msgid "This composition has already been added to the repository" +msgstr "La composició ja ha estat enviada al repositori" + +#: src/gtkmm/instance.cpp:536 +msgid "An error has occurred when trying to ADD" +msgstr "Ha ocorregut un error quan s'intentava fer el ADD" + +#: src/gtkmm/instance.cpp:547 +msgid "" +"This file is not under version control, so there is nothing to update from!" +msgstr "" +"Aquest arxiu no està actualment sota el sistema de control de versions, " +"així que no hi ha res per actualitzar!" + +#: src/gtkmm/instance.cpp:552 +msgid "This file is up-to-date" +msgstr "Aquest arxiu ja està actualitzat" + +#: src/gtkmm/instance.cpp:577 src/gtkmm/instance.cpp:613 +msgid "An error has occurred when trying to UPDATE" +msgstr "Ha ocorregut un error quan es tractava de fer l'UPDATE" + +#: src/gtkmm/instance.cpp:588 +msgid "" +"This file is not under version control, so there is nothing to revert to!" +msgstr "" +"Aquest arxiu no està actualment sota control de versió, així que hi ha res a " +"desactualizar!" + +#: src/gtkmm/instance.cpp:595 +msgid "" +"This will abandon all changes you have made\n" +"since the last time you performed a commit\n" +"operation. This cannot be undone! Are you sure\n" +"you want to do this?" +msgstr "" +"Això abandonarà tots els canvis que heu fet\n" +"des de l'última operació d'enviament realitzada.\n" +"Això no es pot desfer! Està segur que \n" +"vol fer això?" + +#: src/gtkmm/instance.cpp:604 +msgid "Unable to remove previous version" +msgstr "Impossible eliminar la versió anterior" + +#: src/gtkmm/instance.cpp:632 +msgid "Error: Revert Failed" +msgstr "Error: Ha fallat la desactualització" + +#: src/gtkmm/instance.cpp:632 +msgid "" +"The revert operation has failed. This can be due to it being\n" +"referenced by another composition that is already open, or\n" +"because of an internal error in Synfig Studio. Try closing any\n" +"compositions that might reference this composition and try\n" +"again, or restart Synfig Studio." +msgstr "" +"L'operació de desactualització ha fallat. Això es pot deure\n" +" al fet que està referenciat per un altra composició que està actualment \n" +"oberta o perquè s'ha produit un error intern al Synfig Studio. Intenteu\n" +"tancar qualsevol composició que pugui fer referència a aquesta\n" +" i intenteu-ho de nou o torneu a iniciar el Synfig Studio" + +#: src/gtkmm/instance.cpp:660 +msgid "Revert to saved" +msgstr "Desactualitza al que hi ha desat" + +#: src/gtkmm/instance.cpp:660 +msgid "" +"You will lose any changes you have made since your last save.\n" +"Are you sure?" +msgstr "" +"Es perdran els canvis que heu realitzat des de l'última vegada que heu " +"desat.\n" +"Esteu segurs?" + +#: src/gtkmm/instance.cpp:683 +#, c-format +msgid "Would you like to save your changes to %s?" +msgstr "Voleu desar els canvis a %s?" + +#: src/gtkmm/instance.cpp:699 +#, c-format +msgid "" +"%s has changes not yet on the CVS repository.\n" +"Would you like to commit these changes?" +msgstr "" +"%s te canvis que encara no estan al CVS.\n" +"Voleu fer el commit d'aquests canvis?" + +#: src/gtkmm/instance.cpp:1105 +msgid "Edit Waypoint" +msgstr "Edita la interpolació" + +#: src/gtkmm/instance.cpp:1146 +msgid "Set Waypoints" +msgstr "Estableix els punts d'interpolació" + +#: src/gtkmm/instance.cpp:1191 +msgid "Unable to convert to animated waypoint" +msgstr "No ha esta possible convertir a una interpolación animada" + +#: src/gtkmm/instance.cpp:1208 +msgid "Unable to find waypoint_set_smart action" +msgstr "No és possible trobar una acció waypoint_set_smart" + +#: src/gtkmm/instance.cpp:1221 +msgid "Unable to set a specific waypoint" +msgstr "No és possible establir el punt d'interpolació donat" + +#: src/gtkmm/instance.cpp:1249 +msgid "Edit Waypoints" +msgstr "Edita les interpolacions" + +#: src/gtkmm/instance.h:41 +msgid "Synfig Animation " +msgstr "Animació Synfig " + +#: src/gtkmm/keyframeactionmanager.cpp:221 +msgid "Add New Keyframe" +msgstr "Afegeix un nou fotograma clau" + +#: src/gtkmm/keyframetree.cpp:77 +msgid "Length" +msgstr "Longitud" + +#: src/gtkmm/keyframetree.cpp:108 +msgid "Description" +msgstr "Descripció" + +#: src/gtkmm/keyframetreestore.cpp:795 src/gtkmm/keyframetreestore.cpp:810 +msgid "Unable to find Keyframe in table" +msgstr "No és possible trobar el fotograma clau en la taula" + +#: src/gtkmm/keyframetreestore.cpp:801 +msgid "There are no keyframes n this canvas" +msgstr "No hi ha fotogrames clau en aquest llenç" + +#: src/gtkmm/layeractionmanager.cpp:128 +msgid "Amount" +msgstr "Quantitat" + +#: src/gtkmm/layeractionmanager.cpp:364 +msgid "Paste" +msgstr "Enganxa" + +#: src/gtkmm/layeractionmanager.cpp:450 +#: src/synfigapp/actions/layerduplicate.cpp:178 +#: src/synfigapp/canvasinterface.cpp:202 +#, c-format +msgid "Index %d" +msgstr "Índex %d" + +#: src/gtkmm/layergrouptree.cpp:64 src/gtkmm/layergrouptree.cpp:69 +#: src/gtkmm/layertree.cpp:193 +msgid " " +msgstr " " + +#: src/gtkmm/layergrouptreestore.cpp:442 +msgid "Activate " +msgstr "Activa " + +#: src/gtkmm/layergrouptreestore.cpp:442 +msgid "Deactivate " +msgstr "Desactiva " + +#: src/gtkmm/layergrouptreestore.cpp:566 +msgid "Regroup" +msgstr "Reagrupa " + +#: src/gtkmm/layerparamtreestore.cpp:234 +msgid "Set Layer Params" +msgstr "Estableix els paràmetres de capa" + +#: src/gtkmm/layerparamtreestore.cpp:246 +msgid "Unable to set all layer parameters." +msgstr "No ha estat possible establir tots els paràmetres de la capa" + +#: src/gtkmm/layertree.cpp:206 src/gtkmm/layertree.cpp:249 +msgid "Z" +msgstr "Z" + +#: src/gtkmm/layertree.cpp:334 +msgid "Value" +msgstr "Valor" + +#: src/gtkmm/layertreestore.cpp:462 +msgid "Move Layers" +msgstr "Mou capes" + +#: src/gtkmm/main.cpp:73 +msgid "synfig studio is already running" +msgstr "El Synfig Studio ja està en execució" + +#: src/gtkmm/main.cpp:74 +msgid "the existing process will be used" +msgstr "s'utilitzarà el procés ja existent" + +#: src/gtkmm/main.cpp:93 +msgid "synfig studio -- starting up application..." +msgstr "Synfig Studio: iniciant l'aplicació..." + +#: src/gtkmm/mod_mirror/state_mirror.cpp:181 +msgid "Horizontal" +msgstr "Horitzontal" + +#: src/gtkmm/mod_mirror/state_mirror.cpp:182 +msgid "Vertical" +msgstr "Vertical" + +#: src/gtkmm/mod_palette/dock_palbrowse.cpp:56 +msgid "Palette Browser" +msgstr "Navegador de paletes" + +#: src/gtkmm/mod_palette/dock_paledit.cpp:120 +msgid "Palette Editor" +msgstr "Editor de paleta" + +#: src/gtkmm/mod_palette/dock_paledit.cpp:128 +msgid "Add Color" +msgstr "Afegeix un color" + +#: src/gtkmm/mod_palette/dock_paledit.cpp:129 +msgid "" +"Add current foreground color\n" +"to the palette" +msgstr "" +"Afegeix el color de de front actual\n" +"a la paleta" + +#: src/gtkmm/mod_palette/dock_paledit.cpp:211 +msgid "Load Default Palette" +msgstr "Carrega la paleta per defecte" + +#: src/gtkmm/onemoment.cpp:91 src/gtkmm/onemoment.cpp:93 +msgid "One Moment, Please..." +msgstr "Un moment, per favor..." + +#: src/gtkmm/preview.cpp:352 +msgid "Toggle Looping" +msgstr "Alterna bucle" + +#: src/gtkmm/preview.cpp:376 +msgid "Halt Render" +msgstr "Atura el renderitzat" + +#: src/gtkmm/preview.cpp:382 +msgid "Re-Preview" +msgstr "Torna a visualitzar" + +#: src/gtkmm/preview.cpp:388 +msgid "Erase All" +msgstr "Esborrar-ho tot" + +#: src/gtkmm/preview.cpp:398 +msgid "Last Rendered: " +msgstr "Últim renderitzat: " + +#: src/gtkmm/renddesc.cpp:95 +msgid "Image" +msgstr "Imatge" + +#: src/gtkmm/renddesc.cpp:97 +msgid "Other" +msgstr "Un altre" + +#: src/gtkmm/renddesc.cpp:390 +msgid "_Pixel Aspect" +msgstr "_Aspecte del Pixel" + +#: src/gtkmm/renddesc.cpp:392 +msgid "Pi_xel Width" +msgstr "Ample de el _Pixel" + +#: src/gtkmm/renddesc.cpp:394 +msgid "Pix_el Height" +msgstr "A_lçada de Pixel" + +#: src/gtkmm/renddesc.cpp:396 +msgid "Image _Aspect" +msgstr "Aspecte de la _Imatge" + +#: src/gtkmm/renddesc.cpp:398 +msgid "Image _Width" +msgstr "Amplada de la Imat_ge" + +#: src/gtkmm/renddesc.cpp:400 +msgid "Image _Height" +msgstr "_Alçada de la Imatge" + +#: src/gtkmm/renddesc.cpp:402 +msgid "Image _Span" +msgstr "_Escala Imatge" + +#: src/gtkmm/renddesc.cpp:442 +msgid "Image Size" +msgstr "Grandària d'Imatge" + +#: src/gtkmm/renddesc.cpp:444 +msgid "Image Size" +msgstr "Grandària d'imatge" + +#: src/gtkmm/renddesc.cpp:455 +msgid "_Width" +msgstr "_Ample" + +#: src/gtkmm/renddesc.cpp:458 +msgid "_Height" +msgstr "Alça_da" + +#: src/gtkmm/renddesc.cpp:461 +msgid "_XRes" +msgstr "_XRes" + +#: src/gtkmm/renddesc.cpp:464 +msgid "_YRes" +msgstr "_YRes" + +#: src/gtkmm/renddesc.cpp:467 +msgid "_Physical Width" +msgstr "Amplada _Física" + +#: src/gtkmm/renddesc.cpp:470 +msgid "Phy_sical Height" +msgstr "Alçada Físi_ca" + +#: src/gtkmm/renddesc.cpp:473 +msgid "I_mage Span" +msgstr "Expansió de la I_matge" + +#: src/gtkmm/renddesc.cpp:494 +msgid "Image Area" +msgstr "Àrea de la imatge" + +#: src/gtkmm/renddesc.cpp:496 +msgid "Image Area" +msgstr "Àrea de la imatge" + +#: src/gtkmm/renddesc.cpp:508 +msgid "_Top Left" +msgstr "Superior _Esquerre" + +#: src/gtkmm/renddesc.cpp:511 +msgid "_Bottom Right" +msgstr "Inferior _Dreta" + +#: src/gtkmm/renddesc.cpp:551 +msgid "_Start Time" +msgstr "_Temps de començament" + +#: src/gtkmm/renddesc.cpp:574 +msgid "Locks and Links" +msgstr "Blocatges i enllaços" + +#: src/gtkmm/renddesc.cpp:576 +msgid "Locks and Links" +msgstr "Blocatges i enllaços" + +#: src/gtkmm/renddesc.cpp:597 +msgid "Focus Point" +msgstr "Punt de focus" + +#: src/gtkmm/renddesc.cpp:599 +msgid "Focus Point" +msgstr "Punt de focus" + +#: src/gtkmm/renddesc.cpp:609 +msgid "_Focus Point" +msgstr "Punt de _focus" + +#: src/gtkmm/render.cpp:61 src/gtkmm/render.cpp:177 +msgid "Render Settings" +msgstr "Atributs de renderitzat" + +#: src/gtkmm/render.cpp:67 +msgid "Use _current frame" +msgstr "Utilitza el fotogra_ma actual" + +#: src/gtkmm/render.cpp:77 +msgid "Auto" +msgstr "Auto" + +#: src/gtkmm/render.cpp:101 +msgid "Choose..." +msgstr "Tria..." + +#: src/gtkmm/render.cpp:105 +msgid "Target" +msgstr "Objectiu" + +#: src/gtkmm/render.cpp:107 +msgid "Target" +msgstr "Objectiu" + +#: src/gtkmm/render.cpp:118 +msgid "_Filename" +msgstr "_Nom de l'arxiu" + +#: src/gtkmm/render.cpp:125 +msgid "_Target" +msgstr "_Objectiu" + +#: src/gtkmm/render.cpp:133 +msgid "Settings" +msgstr "Atributs" + +#: src/gtkmm/render.cpp:135 +msgid "Settings" +msgstr "Atributs" + +#: src/gtkmm/render.cpp:147 +msgid "_Quality" +msgstr "_Qualitat" + +#: src/gtkmm/render.cpp:153 +msgid "_Anti-Aliasing" +msgstr "_Anti-Aliasing" + +#: src/gtkmm/render.cpp:247 +msgid "You must supply a filename!" +msgstr "Heu de subministrar un nom d'arxiu!" + +#: src/gtkmm/render.cpp:273 +msgid "Unable to determine proper target from filename." +msgstr "Impossible determinar l'objectiu adient des del nom d'arxiu." + +#: src/gtkmm/render.cpp:280 +msgid "A filename is required for this target" +msgstr "Es necessita un nom d'arxiu per a aquest objectiu" + +#: src/gtkmm/render.cpp:287 +msgid "Unable to create target for " +msgstr "Impossible crear objectiu per a " + +#: src/gtkmm/render.cpp:304 +msgid "Target initialization failure" +msgstr "Fallada d'inicialización d'objectiu" + +#: src/gtkmm/render.cpp:308 +msgid "Rendering " +msgstr "Renderitzant " + +#: src/gtkmm/render.cpp:336 +msgid "File rendered successfully" +msgstr "Arxiu renderitzat correctament" + +#: src/gtkmm/splash.cpp:113 +msgid "ERROR:" +msgstr "ERROR:" + +#: src/gtkmm/splash.cpp:129 +msgid "WARNING:" +msgstr "AVÍS:" + +#: src/gtkmm/state_bline.cpp:361 src/gtkmm/state_circle.cpp:394 +#: src/gtkmm/state_draw.cpp:413 src/gtkmm/state_rectangle.cpp:341 +#, fuzzy +msgid "Create Region BLine" +msgstr "Crea regió" + +#: src/gtkmm/state_bline.cpp:362 src/gtkmm/state_circle.cpp:395 +#: src/gtkmm/state_draw.cpp:414 src/gtkmm/state_rectangle.cpp:342 +#, fuzzy +msgid "Create Outline BLine" +msgstr "Crea contorn" + +#: src/gtkmm/state_bline.cpp:363 src/gtkmm/state_circle.cpp:396 +#: src/gtkmm/state_rectangle.cpp:343 +#, fuzzy +msgid "Create Curve Gradient BLine" +msgstr "Esborra la línia Beizer actual" + +#: src/gtkmm/state_bline.cpp:364 src/gtkmm/state_circle.cpp:397 +#: src/gtkmm/state_rectangle.cpp:344 +#, fuzzy +msgid "Create Plant BLine" +msgstr "Crea contorn" + +#: src/gtkmm/state_bline.cpp:365 +#, fuzzy +msgid "Link Origins" +msgstr "Origen" + +#: src/gtkmm/state_bline.cpp:366 src/gtkmm/state_draw.cpp:415 +msgid "Auto Export" +msgstr "Exportació automàtica" + +#: src/gtkmm/state_bline.cpp:367 src/gtkmm/state_polygon.cpp:228 +msgid "Make" +msgstr "Crea" + +#: src/gtkmm/state_bline.cpp:368 +msgid "Clear" +msgstr "Esborra" + +#: src/gtkmm/state_bline.cpp:385 src/gtkmm/state_draw.cpp:450 +msgid "Feather" +msgstr "Esvaïment" + +#: src/gtkmm/state_bline.cpp:426 +msgid "Make BLine and/or Region" +msgstr "Fes una líinea de Beizer, i/o regió" + +#: src/gtkmm/state_bline.cpp:436 +msgid "Clear current BLine" +msgstr "Esborra la línia Beizer actual" + +#: src/gtkmm/state_bline.cpp:541 +msgid "New BLine" +msgstr "Nova línia de Beizer" + +#: src/gtkmm/state_bline.cpp:584 +msgid "Unable to add value node" +msgstr "Impossible afegir valor de node" + +#: src/gtkmm/state_bline.cpp:626 src/gtkmm/state_circle.cpp:638 +#: src/gtkmm/state_rectangle.cpp:556 +msgid " Gradient" +msgstr "Gradient" + +#: src/gtkmm/state_bline.cpp:645 src/gtkmm/state_bline.cpp:668 +#: src/gtkmm/state_circle.cpp:662 src/gtkmm/state_circle.cpp:685 +#: src/gtkmm/state_rectangle.cpp:575 src/gtkmm/state_rectangle.cpp:598 +msgid "Unable to create Gradient layer" +msgstr "Impossible crear una capa Gradient" + +#: src/gtkmm/state_bline.cpp:685 src/gtkmm/state_circle.cpp:702 +#: src/gtkmm/state_rectangle.cpp:615 +msgid " Plant" +msgstr "Plant" + +#: src/gtkmm/state_bline.cpp:704 src/gtkmm/state_bline.cpp:727 +#: src/gtkmm/state_circle.cpp:726 src/gtkmm/state_circle.cpp:749 +#: src/gtkmm/state_rectangle.cpp:634 src/gtkmm/state_rectangle.cpp:657 +msgid "Unable to create Plant layer" +msgstr "Impossible crear una capa planta" + +#: src/gtkmm/state_bline.cpp:744 src/gtkmm/state_circle.cpp:766 +#: src/gtkmm/state_draw.cpp:1058 src/gtkmm/state_draw.cpp:1977 +#: src/gtkmm/state_rectangle.cpp:674 +msgid " Region" +msgstr "Regió" + +#: src/gtkmm/state_bline.cpp:774 src/gtkmm/state_bline.cpp:797 +#: src/gtkmm/state_circle.cpp:801 src/gtkmm/state_circle.cpp:824 +#: src/gtkmm/state_draw.cpp:1800 src/gtkmm/state_draw.cpp:1993 +#: src/gtkmm/state_rectangle.cpp:704 src/gtkmm/state_rectangle.cpp:727 +msgid "Unable to create Region layer" +msgstr "Impossible crear una capa de regió" + +#: src/gtkmm/state_bline.cpp:814 src/gtkmm/state_circle.cpp:839 +#: src/gtkmm/state_draw.cpp:1053 src/gtkmm/state_rectangle.cpp:742 +msgid " Outline" +msgstr "Contorn" + +#: src/gtkmm/state_bline.cpp:838 src/gtkmm/state_bline.cpp:861 +#: src/gtkmm/state_circle.cpp:869 src/gtkmm/state_circle.cpp:892 +#: src/gtkmm/state_rectangle.cpp:767 src/gtkmm/state_rectangle.cpp:790 +msgid "Unable to create Outline layer" +msgstr "Impossible crear una capa contorn" + +#: src/gtkmm/state_bline.cpp:1250 +msgid "Unloop BLine" +msgstr "Elimina el bucle de la línia de Bezier" + +#: src/gtkmm/state_bline.cpp:1254 +msgid "Loop BLine" +msgstr "Fes un bucle de línia de Bezier" + +#: src/gtkmm/state_bline.cpp:1259 +msgid "Delete Vertex" +msgstr "Esborra el vèrtex" + +#: src/gtkmm/state_bline.cpp:1274 +msgid "Insert Vertex" +msgstr "Inserta Vèrtex" + +#: src/gtkmm/state_bline.cpp:1336 +msgid "" +"Unable to find where to insert vertex, internal error, please report this bug" +msgstr "" +"Impossible trobar on inserir el vèrtex, error intern, per favor reporteu " +"aquest error" + +#: src/gtkmm/state_bline.cpp:1355 +msgid "Unable to remove vertex, internal error, please report this bug" +msgstr "" +"Impossible esborrar el vèrtex, error intern, per favor reporteu aquest error" + +#: src/gtkmm/state_bline.cpp:1369 +#: src/synfigapp/actions/blinepointtangentmerge.cpp:56 +msgid "Merge Tangents" +msgstr "Barreja les tangents" + +#: src/gtkmm/state_bline.cpp:1376 +#: src/synfigapp/actions/blinepointtangentsplit.cpp:56 +msgid "Split Tangents" +msgstr "Divideix les tangents" + +#: src/gtkmm/state_circle.cpp:392 src/gtkmm/state_rectangle.cpp:339 +msgid "Invert" +msgstr "Inverteix" + +#: src/gtkmm/state_circle.cpp:393 +#, fuzzy +msgid "Create Circle Layer" +msgstr "Desactiva la capa" + +#: src/gtkmm/state_circle.cpp:398 src/gtkmm/state_rectangle.cpp:345 +msgid "Link BLine Origins" +msgstr "" + +#: src/gtkmm/state_circle.cpp:406 +msgid "Falloff" +msgstr "Caiguda" + +#: src/gtkmm/state_circle.cpp:407 +msgid "Determines the falloff function for the feather" +msgstr "Determina la funció de caiguda de l'esvaïment" + +#: src/gtkmm/state_circle.cpp:409 src/gtkmm/state_gradient.cpp:273 +#: src/gtkmm/widget_waypoint.cpp:88 src/gtkmm/widget_waypoint.cpp:95 +#: src/gtkmm/widget_waypointmodel.cpp:74 src/gtkmm/widget_waypointmodel.cpp:81 +msgid "Linear" +msgstr "Lineal" + +#: src/gtkmm/state_circle.cpp:410 +msgid "Squared" +msgstr "Proporcional" + +#: src/gtkmm/state_circle.cpp:411 +msgid "Square Root" +msgstr "Arrel quadrada" + +#: src/gtkmm/state_circle.cpp:412 +msgid "Sigmond" +msgstr "Sigmoidea" + +#: src/gtkmm/state_circle.cpp:413 +msgid "Cosine" +msgstr "Cossinus" + +#: src/gtkmm/state_circle.cpp:417 src/gtkmm/state_gradient.cpp:280 +msgid "Blend Method" +msgstr "Mètode de barreja" + +#: src/gtkmm/state_circle.cpp:418 +msgid "Defines the blend method to be used for circles" +msgstr "Defineix el mètode de barreja utilitzat per als cercles" + +#: src/gtkmm/state_circle.cpp:424 src/gtkmm/state_rectangle.cpp:359 +msgid "Feather:" +msgstr "Esvaïment:" + +#: src/gtkmm/state_circle.cpp:437 +#, fuzzy +msgid "BLine Points:" +msgstr "Punt de la línia de Beizer" + +#: src/gtkmm/state_circle.cpp:439 +msgid "Point Angle Offset:" +msgstr "" + +#: src/gtkmm/state_circle.cpp:526 +msgid "New Circle" +msgstr "Nou Cercle" + +#: src/gtkmm/state_draw.cpp:409 +msgid "Pressure Width" +msgstr "Ample de la pressió" + +#: src/gtkmm/state_draw.cpp:410 +msgid "Auto Loop" +msgstr "Auto bucle" + +#: src/gtkmm/state_draw.cpp:411 +msgid "Auto Extend" +msgstr "Auto extensió" + +#: src/gtkmm/state_draw.cpp:412 +msgid "Auto Link" +msgstr "Auto enllaç" + +#: src/gtkmm/state_draw.cpp:416 src/gtkmm/state_draw.cpp:524 +msgid "Fill Last Stroke" +msgstr "Emplenar l'últim traç" + +#: src/gtkmm/state_draw.cpp:419 +msgid "Min Pressure" +msgstr "Pressió mínima" + +#: src/gtkmm/state_draw.cpp:425 +msgid "LocalError" +msgstr "Error local" + +#: src/gtkmm/state_draw.cpp:447 +msgid "Smooth" +msgstr "Suavitza" + +#: src/gtkmm/state_draw.cpp:778 +msgid "Sketch BLine" +msgstr "Equematitza la línia de Beizer" + +#: src/gtkmm/state_draw.cpp:1088 +msgid "Unable to create layer" +msgstr "Impossible crear la capa" + +#: src/gtkmm/state_draw.cpp:1272 +msgid "Define Region" +msgstr "Defineix regió" + +#: src/gtkmm/state_draw.cpp:1834 src/gtkmm/state_draw.cpp:1885 +msgid "Extend BLine" +msgstr "Estén Línia de Béizer" + +#: src/gtkmm/state_draw.cpp:1847 src/gtkmm/state_draw.cpp:1898 +msgid "Unable to set loop for bline" +msgstr "Impossible fer el bucle per a la línia béizer" + +#: src/gtkmm/state_draw.cpp:1871 src/gtkmm/state_draw.cpp:1922 +msgid "Unable to insert item" +msgstr "Impossible inserir l'element" + +#: src/gtkmm/state_draw.cpp:1955 +msgid "Fill Stroke" +msgstr "Emplena el traç" + +#: src/gtkmm/state_fill.cpp:145 +msgid "No layer here" +msgstr "No hi ha cap capa ací" + +#: src/gtkmm/state_fill.cpp:155 +msgid "Unable to set layer color" +msgstr "Impossible establir el color de la capa" + +#: src/gtkmm/state_gradient.cpp:270 +msgid "Gradient Type" +msgstr "Tipus de gradient" + +#: src/gtkmm/state_gradient.cpp:271 +msgid "Determines the type of Gradient used" +msgstr "Determina el tipus de Gradient utilitzat" + +#: src/gtkmm/state_gradient.cpp:274 +msgid "Radial" +msgstr "Radial" + +#: src/gtkmm/state_gradient.cpp:275 +msgid "Conical" +msgstr "Cònic" + +#: src/gtkmm/state_gradient.cpp:276 +msgid "Spiral" +msgstr "Espiral" + +#: src/gtkmm/state_gradient.cpp:281 +msgid "The blend method the gradient will use" +msgstr "El mètode de barreja que el gradient utilitzarà" + +#: src/gtkmm/state_gradient.cpp:382 +msgid "New Gradient" +msgstr "Nou Gradient" + +#: src/gtkmm/state_polygon.cpp:278 +msgid "Make Polygon" +msgstr "Crea un polígon" + +#: src/gtkmm/state_polygon.cpp:288 +msgid "Clear current Polygon" +msgstr "Esborra el polígon actual" + +#: src/gtkmm/state_polygon.cpp:370 +msgid "New Polygon" +msgstr "Nou polígon" + +#: src/gtkmm/state_rectangle.cpp:340 +#, fuzzy +msgid "Create Rectangle Layer" +msgstr "Desactiva la capa" + +#: src/gtkmm/state_rectangle.cpp:355 +msgid "Expansion:" +msgstr "Expansió:" + +#: src/gtkmm/state_rectangle.cpp:459 +msgid "New Rectangle" +msgstr "Nou rectangle" + +#: src/gtkmm/state_rotate.cpp:175 +msgid "Allow Scale" +msgstr "Permet l'escalat" + +#: src/gtkmm/state_rotate.cpp:369 +msgid "Move Duck" +msgstr "Mou ànec" + +#: src/gtkmm/state_rotate.cpp:374 +msgid "Rotate Ducks" +msgstr "Rota ànecs" + +#: src/gtkmm/state_scale.cpp:163 +msgid "Lock Aspect Ratio" +msgstr "Bloquetja la relació d'aspecte" + +#: src/gtkmm/state_sketch.cpp:158 src/gtkmm/state_sketch.cpp:239 +msgid "Save Sketch" +msgstr "Desa l'esbós" + +#: src/gtkmm/state_sketch.cpp:168 +msgid "Unable to save sketch" +msgstr "Impossible desar l'esbós" + +#: src/gtkmm/state_sketch.cpp:177 src/gtkmm/state_sketch.cpp:240 +msgid "Load Sketch" +msgstr "Carrega l'esbós" + +#: src/gtkmm/state_sketch.cpp:187 +msgid "Unable to load sketch" +msgstr "Impossible carregar l'esbós" + +#: src/gtkmm/state_sketch.cpp:237 src/gtkmm/state_sketch.cpp:268 +#: src/gtkmm/state_sketch.cpp:269 +msgid "Clear Sketch" +msgstr "Esborra l'esbós" + +#: src/gtkmm/state_sketch.cpp:238 +msgid "Undo Stroke" +msgstr "Desfés traç" + +#: src/gtkmm/state_sketch.cpp:241 +msgid "Show Sketch" +msgstr "Mostra l'esbós" + +#: src/gtkmm/state_sketch.cpp:256 src/gtkmm/state_sketch.cpp:257 +msgid "Undo Last Stroke" +msgstr "Desfés l'últim traç" + +#: src/gtkmm/state_sketch.cpp:280 src/gtkmm/state_sketch.cpp:281 +#: src/gtkmm/state_sketch.cpp:292 src/gtkmm/state_sketch.cpp:293 +msgid "Save Sketch As..." +msgstr "Desa l'esbós com a..." + +#: src/gtkmm/state_sketch.cpp:304 src/gtkmm/state_sketch.cpp:305 +msgid "Open a Sketch" +msgstr "Obri un esbós" + +#: src/gtkmm/state_smoothmove.cpp:177 +msgid "Radius" +msgstr "Ràdio" + +#: src/gtkmm/state_smoothmove.cpp:203 +msgid "Smooth Move" +msgstr "Moviment suau" + +#: src/gtkmm/state_width.cpp:223 +msgid "Relative Growth" +msgstr "Creixement relatiu" + +#: src/gtkmm/state_width.cpp:231 +msgid "Growth:" +msgstr "Creixement:" + +#: src/gtkmm/state_width.cpp:234 +msgid "Radius:" +msgstr "Ràdio:" + +#: src/gtkmm/state_width.cpp:559 +msgid "Sketch Width" +msgstr "Espessor de l'Esbós" + +#: src/gtkmm/toolbox.cpp:133 +msgid "Cannot save" +msgstr "No s'ha pogut desar" + +#: src/gtkmm/toolbox.cpp:133 src/gtkmm/toolbox.cpp:145 +msgid "Nothing to save" +msgstr "Res a desar" + +#: src/gtkmm/toolbox.cpp:145 +msgid "Cannot save as" +msgstr "No es pot desar com a" + +#: src/gtkmm/toolbox.cpp:167 +msgid "Cannot close" +msgstr "No es pot tancar" + +#: src/gtkmm/toolbox.cpp:167 +msgid "Nothing to close" +msgstr "Res per a tancar" + +#: src/gtkmm/toolbox.cpp:220 +msgid "Vertical Dock: Canvases, History" +msgstr "Encastable Vertical: Llenços, Historial" + +#: src/gtkmm/toolbox.cpp:221 +msgid "Horizontal Dock: Layers, Children, Params" +msgstr "Encastable Horitzontal: Capes, Descendents, Paràmetres" + +#: src/gtkmm/toolbox.cpp:223 +msgid "Reset Windows to Original Layout" +msgstr "Restableix les finestres a la seva disposició original" + +#: src/gtkmm/toolbox.cpp:232 +msgid "Open Recent" +msgstr "Obrir recent" + +#: src/gtkmm/toolbox.cpp:239 +msgid "Panels" +msgstr "Taulers" + +#: src/gtkmm/toolbox.cpp:251 +msgid "Input Devices..." +msgstr "Dispositius d'entrada..." + +#: src/gtkmm/toolbox.cpp:253 +msgid "Setup..." +msgstr "Atributs..." + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:268 +msgid "Synfig Wiki" +msgstr "Wiki de Synfig" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:268 +msgid "/Main_Page" +msgstr "/Main_Page" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:269 +msgid "Tutorials" +msgstr "Tutorials" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:269 +msgid "/Tutorials" +msgstr "/Tutorials" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:270 +msgid "Frequently Asked Questions" +msgstr "Preguntes més freqüents" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:270 +msgid "/FAQ" +msgstr "/FAQ" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:271 +msgid "Get Support" +msgstr "Obtenir suport" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:271 +msgid "/Contact" +msgstr "/Contact" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:272 +msgid "Keyboard Shortcuts" +msgstr "Dreceres de teclat" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:272 +msgid "/Keyboard_Shortcuts" +msgstr "/Keyboard_Shortcuts" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:273 +msgid "Mouse Shortcuts" +msgstr "Dreceres de ratolí" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:273 +msgid "/Mouse_Shortcuts" +msgstr "/Mouse_Shortcuts" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:274 +msgid "All Pages" +msgstr "Totes les pàgines" + +#: src/gtkmm/toolbox.cpp:282 +msgid "_Help" +msgstr "_Ajuda" + +#: src/gtkmm/toolbox.cpp:289 +msgid "New..." +msgstr "Nou..." + +#: src/gtkmm/toolbox.cpp:290 +msgid "Open..." +msgstr "Obre..." + +#: src/gtkmm/toolbox.cpp:291 +msgid "Save" +msgstr "Desa" + +#: src/gtkmm/toolbox.cpp:292 +msgid "Save As..." +msgstr "Desa com a..." + +#: src/gtkmm/toolbox.cpp:296 +msgid "Setup" +msgstr "Atributs" + +#: src/gtkmm/toolbox.cpp:297 +msgid "About Synfig Studio" +msgstr "Quant a Synfig Studio" + +#: src/gtkmm/widget_canvaschooser.cpp:115 +msgid "Other..." +msgstr "Un altre..." + +#: src/gtkmm/widget_canvaschooser.cpp:136 +msgid "Choose Canvas" +msgstr "Tria llenç" + +#: src/gtkmm/widget_canvaschooser.cpp:136 +msgid "Enter the relative name of the canvas that you want" +msgstr "Introduïu el nom donat al llenç que desitgeu" + +#: src/gtkmm/widget_canvaschooser.cpp:145 +msgid "No canvas name was specified" +msgstr "No s'ha especificat nom de llenç" + +#: src/gtkmm/widget_canvaschooser.cpp:158 +msgid "Error:Exception Thrown" +msgstr "Error: S'ha llançat una excepció" + +#: src/gtkmm/widget_canvaschooser.cpp:163 +msgid "Unknown Exception" +msgstr "Excepció desconeguda" + +#: src/gtkmm/widget_coloredit.cpp:304 +msgid "RGB" +msgstr "RGB" + +#: src/gtkmm/widget_coloredit.cpp:305 +msgid "YUV" +msgstr "YUV" + +#: src/gtkmm/widget_coloredit.cpp:360 +msgid "HTML code" +msgstr "Codi HTML" + +#: src/gtkmm/widget_coloredit.cpp:373 +msgid "Luma" +msgstr "Luma" + +#: src/gtkmm/widget_coloredit.cpp:374 +msgid "Hue" +msgstr "Matís" + +#: src/gtkmm/widget_coloredit.cpp:375 +msgid "Saturation" +msgstr "Saturació" + +#: src/gtkmm/widget_coloredit.cpp:376 +msgid "U" +msgstr "U" + +#: src/gtkmm/widget_coloredit.cpp:377 +msgid "V" +msgstr "V" + +#: src/gtkmm/widget_coloredit.cpp:381 +msgid "Alpha" +msgstr "Transparència" + +#: src/gtkmm/widget_defaults.cpp:213 +msgid "Foreground Color" +msgstr "Color de front" + +#: src/gtkmm/widget_defaults.cpp:221 +msgid "Background Color" +msgstr "Color de fons" + +#: src/gtkmm/widget_defaults.cpp:238 +msgid "" +"Swap Background and\n" +"Foreground Colors" +msgstr "" +"Intercanvia colors \n" +"de front i fons" + +#: src/gtkmm/widget_defaults.cpp:252 +msgid "Reset Colors to Black and White" +msgstr "Restableix colors a Blanc i Negre" + +#: src/gtkmm/widget_defaults.cpp:264 +msgid "Brush Preview" +msgstr "Previsualiza brotxa" + +#: src/gtkmm/widget_defaults.cpp:274 +msgid "Brush Size" +msgstr "Grandària de Brotxa" + +#: src/gtkmm/widget_defaults.cpp:282 +msgid "Default Blend Method" +msgstr "Mètode de barreja per defecte" + +#: src/gtkmm/widget_defaults.cpp:296 +msgid "Default Interpolation" +msgstr "Interpolació per defecte" + +#: src/gtkmm/widget_defaults.cpp:304 +msgid "Default Opacity" +msgstr "Opacitat per defecte" + +#: src/gtkmm/widget_defaults.cpp:311 +msgid "Default Gradient" +msgstr "Gradient per defecte" + +#: src/gtkmm/widget_filename.cpp:60 +msgid "Find" +msgstr "Cerca" + +#: src/gtkmm/widget_filename.cpp:114 +msgid "Choose File" +msgstr "Trieu un arxiu" + +#: src/gtkmm/widget_gradient.cpp:223 +msgid "Insert CPoint" +msgstr "Insereix CPunto" + +#: src/gtkmm/widget_gradient.cpp:235 +msgid "Remove CPoint" +msgstr "Esborra CPunto" + +#: src/gtkmm/widget_waypoint.cpp:76 +msgid "(Non-static value)" +msgstr "(Valor no-estàtic)" + +#: src/gtkmm/widget_waypoint.cpp:86 src/gtkmm/widget_waypoint.cpp:93 +#: src/gtkmm/widget_waypointmodel.cpp:72 src/gtkmm/widget_waypointmodel.cpp:79 +#, fuzzy +msgid "TCB Smooth" +msgstr "Suavitza" + +#: src/gtkmm/widget_waypoint.cpp:87 src/gtkmm/widget_waypoint.cpp:94 +#: src/gtkmm/widget_waypointmodel.cpp:73 src/gtkmm/widget_waypointmodel.cpp:80 +#, fuzzy +msgid "Constant" +msgstr "_Constant" + +#: src/gtkmm/widget_waypoint.cpp:89 src/gtkmm/widget_waypointmodel.cpp:75 +#, fuzzy +msgid "Ease In" +msgstr "_Entrada senzilla" + +#: src/gtkmm/widget_waypoint.cpp:96 src/gtkmm/widget_waypointmodel.cpp:82 +#, fuzzy +msgid "Ease Out" +msgstr "_Sortida senzilla" + +#: src/gtkmm/widget_waypoint.cpp:121 +#: src/synfigapp/actions/waypointremove.cpp:78 +#: src/synfigapp/actions/waypointset.cpp:77 +#: src/synfigapp/actions/waypointsimpleadd.cpp:78 +msgid "Waypoint" +msgstr "Interpolació" + +#: src/gtkmm/widget_waypoint.cpp:123 +msgid "Waypoint" +msgstr "Interpolació" + +#: src/gtkmm/widget_waypoint.cpp:135 +msgid "_Value" +msgstr "_Valor" + +#: src/gtkmm/widget_waypoint.cpp:142 +msgid "_Time" +msgstr "_Temps" + +#: src/gtkmm/widget_waypoint.cpp:148 +msgid "Interpolation" +msgstr "Interpolació" + +#: src/gtkmm/widget_waypoint.cpp:150 +msgid "Interpolation" +msgstr "Interpolació" + +#: src/gtkmm/widget_waypoint.cpp:162 +msgid "_In Interpolation" +msgstr "Interpolació d' _entrada" + +#: src/gtkmm/widget_waypoint.cpp:168 +msgid "_Out Interpolation" +msgstr "Interpolació de _Sortida" + +#: src/gtkmm/widget_waypoint.cpp:174 +msgid "TCB Parameters" +msgstr "Paràmetres TBC" + +#: src/gtkmm/widget_waypoint.cpp:176 +msgid "TCB Parameter" +msgstr "Paràmetres TBC" + +#: src/gtkmm/widget_waypoint.cpp:188 +msgid "T_ension" +msgstr "T_ensió" + +#: src/gtkmm/widget_waypoint.cpp:195 +msgid "_Continuity" +msgstr "_Continuïtat" + +#: src/gtkmm/widget_waypoint.cpp:202 +msgid "_Bias" +msgstr "_Bias" + +#: src/gtkmm/widget_waypoint.cpp:209 +msgid "Te_mporal Tension" +msgstr "Tensió te_mporal" + +#: src/gtkmm/widget_waypointmodel.cpp:64 +msgid "Out:" +msgstr "Sortida:" + +#: src/gtkmm/widget_waypointmodel.cpp:65 +msgid "In:" +msgstr "Entrada:" + +#: src/gtkmm/widget_waypointmodel.cpp:66 +msgid "Tension:" +msgstr "Tensió:" + +#: src/gtkmm/widget_waypointmodel.cpp:67 +msgid "Continuity:" +msgstr "Continuïtat:" + +#: src/gtkmm/widget_waypointmodel.cpp:68 +msgid "Bias:" +msgstr "Bias:" + +#: src/gtkmm/widget_waypointmodel.cpp:69 +msgid "Temporal Tension:" +msgstr "Tensió temporal:" + +#: src/gtkmm/workarea.cpp:1171 +#, fuzzy +msgid "Nudge" +msgstr "Empujoncito" + +#: src/gtkmm/workarea.cpp:1631 +msgid "Move" +msgstr "Mou" + +#: src/gtkmm/workarea.cpp:2322 +msgid "Rendering..." +msgstr "Renderitzant..." + +#: src/gtkmm/workarea.cpp:2349 src/gtkmm/workarea.cpp:2441 +msgid "Render Failed" +msgstr "Ha fallat el renderitzat" + +#: src/gtkmm/workarea.cpp:2423 +#, c-format +msgid "Rendering canvas %s..." +msgstr "Renderitza els llenços %s..." + +#: src/gtkmm/zoomdial.h:71 +msgid "Zoom In" +msgstr "Apropa" + +#: src/gtkmm/zoomdial.h:72 +msgid "Zoom Out" +msgstr "Allunya" + +#: src/gtkmm/zoomdial.h:73 +#, fuzzy +msgid "Zoom to Fit" +msgstr "Ajusta el zoom" + +#: src/gtkmm/zoomdial.h:74 +msgid "Zoom to 100%" +msgstr "Ajusta al 100%" + +#: src/synfigapp/action.cpp:469 +msgid "Selected Canvas" +msgstr "Llenç seleccionat" + +#: src/synfigapp/action.cpp:473 src/synfigapp/action.cpp:474 +msgid "Canvas Interface" +msgstr "Interfície de llenç" + +#: src/synfigapp/actions/activepointadd.cpp:49 +msgid "Add Activepoint" +msgstr "Afegeix el punt actiu" + +#: src/synfigapp/actions/activepointadd.cpp:75 +#: src/synfigapp/actions/activepointremove.cpp:74 +#: src/synfigapp/actions/activepointset.cpp:73 +#: src/synfigapp/actions/activepointsetoff.cpp:83 +#: src/synfigapp/actions/activepointseton.cpp:83 +#: src/synfigapp/actions/activepointsetsmart.cpp:82 +#: src/synfigapp/actions/colorset.cpp:79 +#: src/synfigapp/actions/gradientset.cpp:79 +#: src/synfigapp/actions/valuedescconvert.cpp:93 +#: src/synfigapp/actions/valuedescdisconnect.cpp:81 +#: src/synfigapp/actions/valuedescdisconnect.cpp:90 +#: src/synfigapp/actions/valuedescexport.cpp:88 +#: src/synfigapp/actions/valuedescset.cpp:83 +#: src/synfigapp/actions/valuedescset.cpp:92 +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:76 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:78 +#: src/synfigapp/actions/valuenodedynamiclistremove.cpp:74 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:77 +#: src/synfigapp/actions/valuenodedynamiclistrotateorder.cpp:74 +msgid "ValueDesc" +msgstr "Descripció de valor" + +#: src/synfigapp/actions/activepointadd.cpp:79 +#: src/synfigapp/actions/activepointsetsmart.cpp:86 +msgid "New Activepoint" +msgstr "Nou punt actiu" + +#: src/synfigapp/actions/activepointadd.cpp:80 +#: src/synfigapp/actions/activepointsetsmart.cpp:87 +#: src/synfigapp/actions/activepointsimpleadd.cpp:79 +msgid "Activepoint to be added" +msgstr "Punt actiu per afegir" + +#: src/synfigapp/actions/activepointadd.cpp:86 +#: src/synfigapp/actions/activepointsetsmart.cpp:93 +msgid "Time where activepoint is to be added" +msgstr "Temps on s'afegirà el punt actiu" + +#: src/synfigapp/actions/activepointadd.cpp:176 +#: src/synfigapp/actions/activepointremove.cpp:162 +msgid "A Activepoint already exists at this point in time" +msgstr "Ja existeix actualment un punt actiu en aquest punt en el temps" + +#: src/synfigapp/actions/activepointadd.cpp:179 +#: src/synfigapp/actions/activepointremove.cpp:165 +msgid "This activepoint is already in the ValueNode" +msgstr "Aquest punt actiu ja està en el Valor de Node" + +#: src/synfigapp/actions/activepointremove.cpp:49 +msgid "Remove Activepoint" +msgstr "Esborra Punt Actiu" + +#: src/synfigapp/actions/activepointremove.cpp:78 +#: src/synfigapp/actions/activepointset.cpp:77 +#: src/synfigapp/actions/activepointsetoff.cpp:87 +#: src/synfigapp/actions/activepointseton.cpp:87 +#: src/synfigapp/actions/activepointsimpleadd.cpp:78 +msgid "Activepoint" +msgstr "Punt Actiu" + +#: src/synfigapp/actions/activepointremove.cpp:79 +#: src/synfigapp/actions/activepointset.cpp:78 +msgid "Activepoint to be changed" +msgstr "Punt Actiu a canviar" + +#: src/synfigapp/actions/activepointremove.cpp:143 +#: src/synfigapp/actions/activepointset.cpp:151 +#: src/synfigapp/actions/activepointset.cpp:209 +#: src/synfigapp/actions/activepointset.cpp:255 +#: src/synfigapp/actions/activepointset.cpp:276 +msgid "Unable to find activepoint" +msgstr "Impossible trobar un punt actiu" + +#: src/synfigapp/actions/activepointset.cpp:49 +msgid "Set Activepoint" +msgstr "Estableix el punt actiu" + +#: src/synfigapp/actions/activepointsetoff.cpp:57 +msgid "Mark Activepoint as \"Off\"" +msgstr "Marca el punt actiu com \"Off\"" + +#: src/synfigapp/actions/activepointseton.cpp:57 +msgid "Mark Activepoint as \"On\"" +msgstr "Marcar el punt actiu com \"On\"" + +#: src/synfigapp/actions/activepointsetsmart.cpp:56 +msgid "Set Activepoint (Smart)" +msgstr "Estableix el punt actiu (Intel·ligent)" + +#: src/synfigapp/actions/activepointsetsmart.cpp:365 +#: src/synfigapp/actions/waypointsetsmart.cpp:439 +msgid "Unable to determine how to proceed. This is a bug." +msgstr "No s'ha pogut determinar com procedir. Açò és un error" + +#: src/synfigapp/actions/activepointsimpleadd.cpp:49 +#: src/synfigapp/actions/waypointsimpleadd.cpp:49 +msgid "Simply Add Waypoint" +msgstr "Simplement afegeix una interpolació" + +#: src/synfigapp/actions/activepointsimpleadd.cpp:74 +#: src/synfigapp/actions/waypointadd.cpp:76 +#: src/synfigapp/actions/waypointset.cpp:73 +#: src/synfigapp/actions/waypointsetsmart.cpp:85 +#: src/synfigapp/actions/waypointsimpleadd.cpp:74 +msgid "Destination ValueNode (Animated)" +msgstr "Valor de Node de Destí (Animat)" + +#: src/synfigapp/actions/activepointsimpleadd.cpp:169 +msgid "The activepoint to remove no longer exists" +msgstr "El punt actiu a eliminar ja no existeix" + +#: src/synfigapp/actions/blinepointtangentmerge.cpp:78 +#, c-format +msgid "Merge Tangents of '%s'" +msgstr "Barrejar tangents de «%s»" + +#: src/synfigapp/actions/blinepointtangentmerge.cpp:87 +#: src/synfigapp/actions/blinepointtangentsplit.cpp:87 +msgid "ValueNode of BLinePoint" +msgstr "Valor de node del punt de línia Béizer" + +#: src/synfigapp/actions/blinepointtangentmerge.cpp:156 +#: src/synfigapp/actions/blinepointtangentsplit.cpp:156 +msgid "Couldn't find action \"value_desc_set\"" +msgstr "No puc trobar l'acció \"value_desc_set\"" + +#: src/synfigapp/actions/blinepointtangentsplit.cpp:78 +#, c-format +msgid "Split Tangents of '%s'" +msgstr "Divideix tangents de «%s»" + +#: src/synfigapp/actions/canvasadd.cpp:49 +msgid "Add Child Canvas" +msgstr "Afegeix el llenç descendent" + +#: src/synfigapp/actions/canvasadd.cpp:79 +msgid "The name that you want this canvas to be" +msgstr "El nom que voleu que tingui aquest llenç" + +#: src/synfigapp/actions/canvasremove.cpp:49 +msgid "Remove Canvas" +msgstr "Esborra llenç" + +#: src/synfigapp/actions/canvasremove.cpp:107 +msgid "You cannot remove the root canvas!" +msgstr "No pot esborrar el llenç arrel!" + +#: src/synfigapp/actions/canvasremove.cpp:110 +msgid "You cannot remove an inline canvas!" +msgstr "No pot esborrar un llenç en línia!" + +#: src/synfigapp/actions/canvasrenddescset.cpp:49 +msgid "Set Canvas RendDesc" +msgstr "Estableix RendDesc del Llenç" + +#: src/synfigapp/actions/canvasrenddescset.cpp:73 +msgid "RendDesc" +msgstr "RendDesc" + +#: src/synfigapp/actions/colorset.cpp:55 +msgid "Apply Default Color" +msgstr "Aplica color per defecte" + +#: src/synfigapp/actions/editmodeset.cpp:49 +msgid "Set Edit Mode" +msgstr "Estableix el mode d'edició" + +#: src/synfigapp/actions/editmodeset.cpp:72 +msgid "New Edit Mode" +msgstr "Nou mode d'edició" + +#: src/synfigapp/actions/gradientset.cpp:55 +msgid "Apply Default Gradient" +msgstr "Aplica el gradient per defecte" + +#: src/synfigapp/actions/groupaddlayers.cpp:49 +msgid "Add Layers to Group" +msgstr "Afegeix capes al grup" + +#: src/synfigapp/actions/groupaddlayers.cpp:73 +msgid "Layer to be added to group" +msgstr "Capes per afegir-se a grup" + +#: src/synfigapp/actions/groupaddlayers.cpp:79 +msgid "Name of the Group to add the Layers to" +msgstr "Nom del grup al que s'afegeixen les capes" + +#: src/synfigapp/actions/groupremove.cpp:49 +msgid "Remove Group" +msgstr "Esborra grup" + +#: src/synfigapp/actions/groupremove.cpp:73 +msgid "Name of the Group to remove" +msgstr "Nom del grup a esborrar" + +#: src/synfigapp/actions/groupremovelayers.cpp:50 +msgid "Remove Layers from a Group" +msgstr "Esborra les capes d'un grup" + +#: src/synfigapp/actions/groupremovelayers.cpp:74 +msgid "Layer to be removed from group" +msgstr "Capa per a ser esborrada d'un grup" + +#: src/synfigapp/actions/grouprename.cpp:49 +msgid "Rename Group" +msgstr "Renombra grup" + +#: src/synfigapp/actions/grouprename.cpp:72 +msgid "Old Group" +msgstr "Grup anterior" + +#: src/synfigapp/actions/grouprename.cpp:73 +msgid "Name of the Group to rename" +msgstr "Nom del grup a renombrar" + +#: src/synfigapp/actions/grouprename.cpp:77 +msgid "New Group" +msgstr "Nou grup" + +#: src/synfigapp/actions/grouprename.cpp:78 +msgid "New name for group" +msgstr "Nou nom per al grup" + +#: src/synfigapp/actions/grouprename.cpp:123 +#, c-format +msgid "A group with the name \"%s\" already exists!" +msgstr "Un grup amb el nom «%s» ja existeix!" + +#: src/synfigapp/actions/keyframeadd.cpp:49 +msgid "Add Keyframe" +msgstr "Afegeix un fotograma clau" + +#: src/synfigapp/actions/keyframeadd.cpp:74 +#: src/synfigapp/actions/keyframeset.cpp:78 +msgid "New Keyframe" +msgstr "Nou fotograma clau" + +#: src/synfigapp/actions/keyframeadd.cpp:75 +#: src/synfigapp/actions/keyframeset.cpp:79 +msgid "Keyframe to be added" +msgstr "Fotograma Clau a afegir" + +#: src/synfigapp/actions/keyframeadd.cpp:114 +#: src/synfigapp/actions/keyframeduplicate.cpp:138 +#: src/synfigapp/actions/keyframeduplicate.cpp:217 +#: src/synfigapp/actions/keyframeremove.cpp:219 +#: src/synfigapp/actions/keyframeset.cpp:128 +msgid "A Keyframe already exists at this point in time" +msgstr "Ja existeix un fotograma Clau en aquest punt del temps" + +#: src/synfigapp/actions/keyframeadd.cpp:117 +#: src/synfigapp/actions/keyframeduplicate.cpp:220 +#: src/synfigapp/actions/keyframeremove.cpp:222 +msgid "This keyframe is already in the ValueNode" +msgstr "Aquest fotograma clau ja està en el Valor de Node" + +#: src/synfigapp/actions/keyframeduplicate.cpp:53 +msgid "Duplicate Keyframe" +msgstr "Duplica el fotograma clau" + +#: src/synfigapp/actions/keyframeduplicate.cpp:80 +msgid "Keyframe to be duplicated" +msgstr "Fotograma clau a ser duplicar" + +#: src/synfigapp/actions/keyframeduplicate.cpp:102 +msgid " (Duplicate)" +msgstr " (Duplicat)" + +#: src/synfigapp/actions/keyframeduplicate.cpp:135 +#: src/synfigapp/actions/keyframeremove.cpp:120 +#: src/synfigapp/actions/keyframeset.cpp:377 +#: src/synfigapp/actions/keyframewaypointset.cpp:129 +msgid "Unable to find the given keyframe" +msgstr "Impossible trobar el fotograma clau donat" + +#: src/synfigapp/actions/keyframeremove.cpp:53 +msgid "Remove Keyframe" +msgstr "Esborra el fotograma clau" + +#: src/synfigapp/actions/keyframeremove.cpp:79 +msgid "Keyframe to be removed" +msgstr "Fotograma clau a esborrar" + +#: src/synfigapp/actions/keyframeset.cpp:53 +msgid "Set Keyframe" +msgstr "Estableix fotograma clau" + +#: src/synfigapp/actions/keyframeset.cpp:385 +msgid "" +"Cannot change keyframe time because another keyframe already exists with " +"that time." +msgstr "" +"No es pot canviar el fotograma clau perquè un altre fotograma clau existeix " +"actualment amb aquest temps" + +#: src/synfigapp/actions/keyframesetdelta.cpp:53 +msgid "Set Keyframe Delta" +msgstr "Estableix Delta del fotograma clau" + +#: src/synfigapp/actions/keyframesetdelta.cpp:82 +msgid "Delta" +msgstr "Delta" + +#: src/synfigapp/actions/keyframewaypointset.cpp:53 +msgid "Set Waypoints at Keyframe" +msgstr "Estableix interpolacions en el fotograma clau" + +#: src/synfigapp/actions/keyframewaypointset.cpp:82 +#: src/synfigapp/actions/waypointsetsmart.cpp:95 +msgid "Waypoint Model" +msgstr "Model d'Interpolació" + +#: src/synfigapp/actions/layeractivate.cpp:50 +#: src/synfigapp/actions/layeractivate.cpp:71 +#: src/synfigapp/actions/layeractivate.cpp:75 +msgid "Activate Layer" +msgstr "Activa la capa" + +#: src/synfigapp/actions/layeractivate.cpp:76 +msgid "Deactivate Layer" +msgstr "Desactiva la capa" + +#: src/synfigapp/actions/layeractivate.cpp:90 +msgid "New Status" +msgstr "Nou estat" + +#: src/synfigapp/actions/layeractivate.cpp:91 +msgid "The new status of the layer" +msgstr "El nou estat de la capa" + +#: src/synfigapp/actions/layeractivate.cpp:141 +#: src/synfigapp/actions/layeradd.cpp:144 +#: src/synfigapp/actions/layerduplicate.cpp:135 +#: src/synfigapp/actions/layerencapsulate.cpp:191 +#: src/synfigapp/actions/layerlower.cpp:140 +#: src/synfigapp/actions/layermove.cpp:161 +#: src/synfigapp/actions/layermove.cpp:234 +#: src/synfigapp/actions/layerraise.cpp:137 +#: src/synfigapp/actions/layerremove.cpp:134 +msgid "This layer doesn't exist anymore." +msgstr "La capa ja no existeix." + +#: src/synfigapp/actions/layeradd.cpp:50 src/synfigapp/actions/layeradd.cpp:71 +#: src/synfigapp/actions/layeradd.cpp:73 +msgid "Add Layer" +msgstr "Afegeix capa" + +#: src/synfigapp/actions/layeradd.cpp:83 +msgid "Layer to be added" +msgstr "Capa a afegir" + +#: src/synfigapp/actions/layerduplicate.cpp:52 +#: src/synfigapp/actions/layerduplicate.cpp:72 +msgid "Duplicate Layer" +msgstr "Duplica capa" + +#: src/synfigapp/actions/layerduplicate.cpp:72 +msgid "Duplicate Layers" +msgstr "Duplica capes" + +#: src/synfigapp/actions/layerduplicate.cpp:82 +msgid "Layer to be duplicated" +msgstr "Capa a duplicar" + +#: src/synfigapp/actions/layerduplicate.cpp:141 +#: src/synfigapp/actions/layerencapsulate.cpp:200 +#: src/synfigapp/actions/layerremove.cpp:144 +msgid "This layer doesn't belong to this canvas anymore" +msgstr "La capa ja no pertany a aquest llenç" + +#: src/synfigapp/actions/layerencapsulate.cpp:72 +msgid "Encapsulate Layer" +msgstr "Encapsula la Capa" + +#: src/synfigapp/actions/layerencapsulate.cpp:72 +msgid "Encapsulate Layers" +msgstr "Encapsula les capes" + +#: src/synfigapp/actions/layerencapsulate.cpp:82 +msgid "Layer to be encapsulated" +msgstr "Capa per a ser encapsulada" + +#: src/synfigapp/actions/layerencapsulate.cpp:141 +msgid "No layers to encapsulate" +msgstr "Sense capes a encapsular" + +#: src/synfigapp/actions/layerencapsulate.cpp:194 +msgid "This layer doesn't have a parent canvas" +msgstr "Aquesta capa no té un llenç ascendent" + +#: src/synfigapp/actions/layerencapsulate.cpp:203 +msgid "get_canvas()!=subcanvas" +msgstr "get_canvas()!=subcanvas" + +#: src/synfigapp/actions/layerlower.cpp:51 +#: src/synfigapp/actions/layerlower.cpp:71 +msgid "Lower Layer" +msgstr "Baixa la capa" + +#: src/synfigapp/actions/layerlower.cpp:71 +msgid "Lower Layers" +msgstr "Baixa les capes" + +#: src/synfigapp/actions/layerlower.cpp:81 +msgid "Layer to be lowered" +msgstr "Capa per a ser baixada" + +#: src/synfigapp/actions/layermove.cpp:50 +#: src/synfigapp/actions/layermove.cpp:74 +#: src/synfigapp/actions/layermove.cpp:76 +msgid "Move Layer" +msgstr "Mou la capa" + +#: src/synfigapp/actions/layermove.cpp:86 +#: src/synfigapp/actions/layersetdesc.cpp:86 +msgid "Layer to be moved" +msgstr "Capa a moure" + +#: src/synfigapp/actions/layermove.cpp:90 +msgid "New Index" +msgstr "Nou índex" + +#: src/synfigapp/actions/layermove.cpp:91 +msgid "Where the layer is to be moved to" +msgstr "On s'ha de moure la capa" + +#: src/synfigapp/actions/layermove.cpp:95 +msgid "Destination Canvas" +msgstr "Llenç Destí" + +#: src/synfigapp/actions/layermove.cpp:96 +msgid "The canvas the layer is to be moved to" +msgstr "Llenç on la capa es mourà" + +#: src/synfigapp/actions/layermove.cpp:170 +msgid "You cannot directly move layers across compositions" +msgstr "No pot moure capes directament entre composicions" + +#: src/synfigapp/actions/layerparamconnect.cpp:49 +msgid "Connect Layer Parameter" +msgstr "Connecta paràmetre de capa" + +#: src/synfigapp/actions/layerparamconnect.cpp:76 +#: src/synfigapp/actions/layerparamdisconnect.cpp:79 +#: src/synfigapp/actions/layerparamset.cpp:76 +msgid "Param" +msgstr "Paràmetre" + +#: src/synfigapp/actions/layerparamconnect.cpp:147 +msgid "Layer did not recognize parameter name" +msgstr "Capa no reconeix el nom del paràmetre" + +#: src/synfigapp/actions/layerparamconnect.cpp:150 +msgid "Bad connection" +msgstr "Mala connexió" + +#: src/synfigapp/actions/layerparamdisconnect.cpp:50 +msgid "Disconnect Layer Parameter" +msgstr "Desconnecta el paràmetre de la capa" + +#: src/synfigapp/actions/layerparamdisconnect.cpp:135 +msgid "Layer Parameter is not connected to anything" +msgstr "El paràmetre de la capa no està connectat a res" + +#: src/synfigapp/actions/layerparamset.cpp:49 +msgid "Set Layer Parameter" +msgstr "Estableix el paràmetre de la capa" + +#: src/synfigapp/actions/layerparamset.cpp:132 +msgid "ValueNode attached to Parameter." +msgstr "Valor de node adjunt al paràmetre" + +#: src/synfigapp/actions/layerparamset.cpp:137 +#: src/synfigapp/actions/layerparamset.cpp:157 +msgid "Layer did not accept parameter." +msgstr "La capa no accepta el paràmetre" + +#: src/synfigapp/actions/layerraise.cpp:51 +#: src/synfigapp/actions/layerraise.cpp:71 +msgid "Raise Layer" +msgstr "Eleva la capa" + +#: src/synfigapp/actions/layerraise.cpp:71 +msgid "Raise Layers" +msgstr "Eleva les capes" + +#: src/synfigapp/actions/layerraise.cpp:81 +msgid "Layer to be raised" +msgstr "Capa a elevar" + +#: src/synfigapp/actions/layerremove.cpp:50 +#: src/synfigapp/actions/layerremove.cpp:70 +msgid "Remove Layer" +msgstr "Esborra capa" + +#: src/synfigapp/actions/layerremove.cpp:70 +msgid "Remove Layers" +msgstr "Esborra capes" + +#: src/synfigapp/actions/layerremove.cpp:80 +msgid "Layer to be deleted" +msgstr "Capa a esborrar" + +#: src/synfigapp/actions/layersetdesc.cpp:50 +#: src/synfigapp/actions/layersetdesc.cpp:73 +msgid "Set Layer Description" +msgstr "Estableix la descripció de la capa" + +#. TRANSLATORS: this is the string used in the history dialog when renaming a layer to/from its default name +#: src/synfigapp/actions/layersetdesc.cpp:75 +#: src/synfigapp/actions/layersetdesc.cpp:76 +msgid "[default]" +msgstr "[per defecte]" + +#: src/synfigapp/actions/layersetdesc.cpp:90 +msgid "New Description" +msgstr "Nova descripció" + +#: src/synfigapp/actions/layersetdesc.cpp:91 +msgid "Enter a new description for this layer" +msgstr "Introdueix una nova descripció per a aquesta capa" + +#: src/synfigapp/actions/timepointscopy.cpp:58 +msgid "Copy Time Points" +msgstr "Copia punts de temps" + +#: src/synfigapp/actions/timepointscopy.cpp:83 +#: src/synfigapp/actions/timepointsdelete.cpp:82 +#: src/synfigapp/actions/timepointsmove.cpp:83 +msgid "New Selected Layer" +msgstr "Nova capa seleccionada" + +#: src/synfigapp/actions/timepointscopy.cpp:84 +#: src/synfigapp/actions/timepointsdelete.cpp:83 +#: src/synfigapp/actions/timepointsmove.cpp:84 +msgid "A layer to add to our selected list" +msgstr "Una capa a afegir a la nostra llista seleccionada" + +#: src/synfigapp/actions/timepointscopy.cpp:90 +#: src/synfigapp/actions/timepointsdelete.cpp:89 +#: src/synfigapp/actions/timepointsmove.cpp:90 +msgid "New Selected Canvas" +msgstr "Seleccionat un nou llenç" + +#: src/synfigapp/actions/timepointscopy.cpp:91 +#: src/synfigapp/actions/timepointsdelete.cpp:90 +#: src/synfigapp/actions/timepointsmove.cpp:91 +msgid "A canvas to add to our selected list" +msgstr "Un llenç a afegir a la nostra llista seleccionada" + +#: src/synfigapp/actions/timepointscopy.cpp:97 +#: src/synfigapp/actions/timepointsdelete.cpp:96 +#: src/synfigapp/actions/timepointsmove.cpp:97 +msgid "New Selected ValueBase" +msgstr "Nou valor base seleccionat" + +#: src/synfigapp/actions/timepointscopy.cpp:98 +#: src/synfigapp/actions/timepointsdelete.cpp:97 +#: src/synfigapp/actions/timepointsmove.cpp:98 +msgid "A valuenode's description to add to our selected list" +msgstr "" +"Una descripció del valor de node a afegir a la nostra llista seleccionada" + +#: src/synfigapp/actions/timepointscopy.cpp:104 +#: src/synfigapp/actions/timepointsdelete.cpp:103 +#: src/synfigapp/actions/timepointsmove.cpp:104 +msgid "New Selected Time Point" +msgstr "Seleccionat un nou punt de temps" + +#: src/synfigapp/actions/timepointscopy.cpp:105 +#: src/synfigapp/actions/timepointsdelete.cpp:104 +#: src/synfigapp/actions/timepointsmove.cpp:105 +msgid "A time point to add to our selected list" +msgstr "Un punt de temps a afegir a la nostra llista seleccionada" + +#: src/synfigapp/actions/timepointscopy.cpp:110 +#: src/synfigapp/actions/timepointsmove.cpp:110 +msgid "Time adjustment" +msgstr "Ajust de temps" + +#: src/synfigapp/actions/timepointscopy.cpp:111 +#: src/synfigapp/actions/timepointsmove.cpp:111 +msgid "The amount of time to adjust all the selected points" +msgstr "La quantitat de temps a ajustar a tots els punts seleccionats" + +#: src/synfigapp/actions/timepointsdelete.cpp:58 +msgid "Delete Time Points" +msgstr "Esborra punts de temps" + +#: src/synfigapp/actions/timepointsmove.cpp:58 +msgid "Move Time Points" +msgstr "Mou punts de temps" + +#: src/synfigapp/actions/valuedescconnect.cpp:54 +msgid "Connect" +msgstr "Connecta" + +#. TRANSLATORS: This is used in the 'history' dialog when a connection is made. +#: src/synfigapp/actions/valuedescconnect.cpp:75 +#, c-format +msgid "Connect '%s' to '%s'" +msgstr "Connecta «%s» a «%s»" + +#: src/synfigapp/actions/valuedescconnect.cpp:86 +msgid "Destination ValueDesc" +msgstr "Descripció del valor de destí" + +#: src/synfigapp/actions/valuedescconnect.cpp:90 +#: src/synfigapp/actions/valuenodereplace.cpp:90 +msgid "Source ValueNode" +msgstr "Valor de node d'origen" + +#: src/synfigapp/actions/valuedescconnect.cpp:95 +msgid "Source ValueNode Name" +msgstr "Nom del valor de node d'origen" + +#: src/synfigapp/actions/valuedescconnect.cpp:239 +#: src/synfigapp/actions/valuedescdisconnect.cpp:216 +msgid "ValueDesc is not recognized or supported." +msgstr "Descripció del valor no reconegut o suportat" + +#: src/synfigapp/actions/valuedescconvert.cpp:60 +msgid "Convert" +msgstr "Converteix" + +#. TRANSLATORS: This is used in the 'history' dialog when a ValueNode is converted. The first %s is what is converted, the 2nd is the local name of the ValueNode's type. +#: src/synfigapp/actions/valuedescconvert.cpp:82 +#, c-format +msgid "Convert '%s' to ValueNode type '%s'" +msgstr "Converteix «%s» al tipus de valor de node «%s»" + +#: src/synfigapp/actions/valuedescconvert.cpp:98 +msgid "The type of ValueNode that you want to be converted to" +msgstr "El tipus de valor de node al que es vol convertir" + +#: src/synfigapp/actions/valuedescconvert.cpp:166 +msgid "Unable to decipher ValueDesc (Bug?)" +msgstr "Impossible desxifrar la descripció del valor (Bug?)" + +#: src/synfigapp/actions/valuedescconvert.cpp:171 +msgid "Unable to create new value node" +msgstr "Impossible crear nou valor de node" + +#: src/synfigapp/actions/valuedescdisconnect.cpp:56 +msgid "Disconnect" +msgstr "Desconnecta" + +#. TRANSLATORS: This is used in the History dialog when a ValueNode is disconnected. +#: src/synfigapp/actions/valuedescdisconnect.cpp:78 +#, c-format +msgid "Disconnect %s" +msgstr "Desconnecta %s" + +#: src/synfigapp/actions/valuedescexport.cpp:56 +msgid "Export" +msgstr "Exporta" + +#. TRANSLATORS: This is used in the 'history' dialog when a ValueNode is exported. The first %s is what is exported, the 2nd is the name it is given. +#: src/synfigapp/actions/valuedescexport.cpp:77 +#, c-format +msgid "Export '%s' as '%s'" +msgstr "Exporta «%s» com a «%s»" + +#: src/synfigapp/actions/valuedescexport.cpp:93 +msgid "The name that you want this value to be exported as" +msgstr "El nom amb el qual vuleu que s'exporte aquest valor" + +#: src/synfigapp/actions/valuedescexport.cpp:151 +msgid "Can only export Canvas when used as constant parameter" +msgstr "Només es pot exportar un llenç quan s'utilitze com paràmetre constant" + +#: src/synfigapp/actions/valuedescexport.cpp:174 +msgid "ValueBase is already exported" +msgstr "Valor de base ja exportat" + +#: src/synfigapp/actions/valuedescexport.cpp:181 +msgid "Unable to export parameter. (Bug?)" +msgstr "Impossible exportar paràmetre. (Bug?)" + +#: src/synfigapp/actions/valuedesclink.cpp:52 +msgid "Link" +msgstr "Enllaça" + +#: src/synfigapp/actions/valuedesclink.cpp:75 +msgid "ValueDesc to link" +msgstr "Descripció del Valor a enllaçar" + +#: src/synfigapp/actions/valuedesclink.cpp:112 +msgid "Cannot link two different exported values ('" +msgstr "No puc enllaçar dos valors exportats diferents ('" + +#: src/synfigapp/actions/valuedesclink.cpp:113 +msgid "' and '" +msgstr "' i '" + +#: src/synfigapp/actions/valuedesclink.cpp:114 +msgid "')" +msgstr "')" + +#: src/synfigapp/actions/valuedesclink.cpp:119 +msgid "Used exported ValueNode ('" +msgstr "S'utilitza el valor de node exportat ('" + +#: src/synfigapp/actions/valuedesclink.cpp:119 +msgid "')." +msgstr "')." + +#: src/synfigapp/actions/valuedesclink.cpp:126 +msgid "Using the only available ValueNode." +msgstr "Usant l'únic valor de node disponible." + +#: src/synfigapp/actions/valuedesclink.cpp:139 +#: src/synfigapp/actions/valuedesclink.cpp:145 +msgid "Using the most referenced ValueNode." +msgstr "Usant el valor de node més referenciat" + +#: src/synfigapp/actions/valuedesclink.cpp:153 +#: src/synfigapp/actions/valuedesclink.cpp:161 +msgid "There's a tie for most referenced; using the animated ValueNode." +msgstr "Hi ha un llaç per al més referenciado; usant el valor de node animat" + +#: src/synfigapp/actions/valuedesclink.cpp:174 +#: src/synfigapp/actions/valuedesclink.cpp:180 +msgid "" +"There's a tie for most referenced, and both are animated; using the one with " +"the most waypoints." +msgstr "" +"Hi ha un llaç per al més referenciado; i els dos són animats; usant el qual " +"té mes interpolacions." + +#: src/synfigapp/actions/valuedesclink.cpp:189 +#: src/synfigapp/actions/valuedesclink.cpp:195 +msgid "Everything is tied; using the least recently modified value." +msgstr "Tot està enllaçat; usant el valor més recentment modificat." + +#: src/synfigapp/actions/valuedesclink.cpp:201 +msgid "Absolutely everything is tied." +msgstr "Absolutament tot enllaçat enllaçat." + +#: src/synfigapp/actions/valuedesclink.cpp:209 +#, c-format +msgid "Cannot link two values of different types ('%s' and '%s')" +msgstr "No puc enllaçar dos valors de tipus diferent («%s» i «%s»)" + +#: src/synfigapp/actions/valuedesclink.cpp:246 +msgid "No ValueNodes were available, so one was created." +msgstr "No hi ha valor de node disponible, així que se n'ha creat un." + +#: src/synfigapp/actions/valuedescset.cpp:59 +msgid "Set ValueDesc" +msgstr "Estableix la descripció del valor" + +#: src/synfigapp/actions/valuedescset.cpp:80 +#, c-format +msgid "Set %s" +msgstr "Estableix %s" + +#: src/synfigapp/actions/valuedescset.cpp:180 +#: src/synfigapp/actions/valuedescset.cpp:205 +#: src/synfigapp/actions/valuedescset.cpp:273 +#: src/synfigapp/actions/valuedescset.cpp:331 +#: src/synfigapp/actions/valuedescset.cpp:368 +#: src/synfigapp/actions/valuedescset.cpp:393 +#: src/synfigapp/actions/valuedescset.cpp:411 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:184 +msgid "Unable to find action value_desc_set (bug)" +msgstr "Impossible trobar acció value_set_desc (error)" + +#: src/synfigapp/actions/valuedescset.cpp:262 +#, c-format +msgid "Bad type for composite (%s)" +msgstr "Mal tipus per la composició (%s)" + +#: src/synfigapp/actions/valuedescset.cpp:321 +#, c-format +msgid "Bad type for radial composite (%s)" +msgstr "Mal tipus per una composició radial (%s)" + +#: src/synfigapp/actions/valuedescset.cpp:497 +#: src/synfigapp/actions/valuedescset.cpp:544 +msgid "Direct manipulation of this ValueNode type is not yet supported" +msgstr "" +"La manipulació directa d'aquest tipus de balor de node no està suportat " +"encara" + +#: src/synfigapp/actions/valuedescset.cpp:542 +msgid "You must be in Animate-Editing-Mode to directly manipulate this value" +msgstr "Ha d'estar en mode d'edició d'animació per a manipular aquest valor" + +#: src/synfigapp/actions/valuedescset.cpp:564 +msgid "Unsupported ValueDesc type" +msgstr "Tipus de descripció de valor no suportat" + +#: src/synfigapp/actions/valuenodeadd.cpp:49 +msgid "Add ValueNode" +msgstr "Afegeix valor de node" + +#: src/synfigapp/actions/valuenodeadd.cpp:72 +msgid "New ValueNode" +msgstr "Nou valor de node" + +#: src/synfigapp/actions/valuenodeadd.cpp:73 +msgid "ValueNode to be added" +msgstr "Valor de node a afegir" + +#: src/synfigapp/actions/valuenodeadd.cpp:122 +msgid "Parameter appears to already be exported" +msgstr "El paràmetre sembla que ja s'havia exportat" + +#: src/synfigapp/actions/valuenodeadd.cpp:131 +msgid "Another exported ValueBase with this name already exists" +msgstr "Ja existeix un altre Valor Base exportat amb aquest nom" + +#: src/synfigapp/actions/valuenodeadd.cpp:135 +msgid "Exception caught on Add ValueNode." +msgstr "S'ha capturat una excepció a l'afegir valor de node." + +#: src/synfigapp/actions/valuenodeadd.cpp:154 +msgid "Exception caught on Remove ValueNode." +msgstr "S'ha capturat una excepció a l'esborrar el valor de node." + +#: src/synfigapp/actions/valuenodeconstset.cpp:49 +msgid "Set ValueNode_Const" +msgstr "Estableix un valor de node _constant" + +#: src/synfigapp/actions/valuenodeconstset.cpp:73 +#: src/synfigapp/actions/valuenoderename.cpp:82 +msgid "ValueNode_Const" +msgstr "Valor de node _constant" + +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:49 +msgid "Insert Item" +msgstr "Insereix un element" + +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:83 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:85 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:84 +msgid "Origin" +msgstr "Origen" + +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:87 +msgid "ValueNode to insert" +msgstr "Valor de node a inserir" + +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:51 +msgid "Insert Item (Smart)" +msgstr "Insereix un element (intel·ligent)" + +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:205 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:259 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:158 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:176 +msgid "Unable to find action (bug)" +msgstr "Impossible trobar acció (error)" + +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:221 +msgid "Unable to find action \"activepoint_set_off\"" +msgstr "Impossible trobar acció \"activi_point_set_off\"" + +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:240 +msgid "Unable to find action \"activepoint_set_on\"" +msgstr "Impossible trobar acció \"activi_point_set_on\"" + +#: src/synfigapp/actions/valuenodedynamiclistloop.cpp:49 +msgid "Loop" +msgstr "Bucle" + +#: src/synfigapp/actions/valuenodedynamiclistremove.cpp:49 +msgid "Remove Item" +msgstr "Esborra Element" + +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:50 +msgid "Remove Item (Smart)" +msgstr "Esborra element (Intel·ligent)" + +#: src/synfigapp/actions/valuenodedynamiclistrotateorder.cpp:49 +msgid "Rotate Order" +msgstr "Ordre de rotació" + +#: src/synfigapp/actions/valuenodedynamiclistunloop.cpp:49 +msgid "Unloop" +msgstr "Trenca el bucle" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:49 +msgid "Connect ValueNode Link" +msgstr "Connecta l'enllaç a valor de node" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:73 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:75 +msgid "Parent ValueNode" +msgstr "Valor de node ascendent" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:77 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:79 +msgid "Index" +msgstr "Índex" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:81 +msgid "ValueNode to be connected" +msgstr "Valor de node a connectar" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:132 +#: src/synfigapp/actions/valuenodelinkconnect.cpp:151 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:135 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:159 +#, c-format +msgid "Bad index, too big. LinkCount=%d, Index=%d" +msgstr "Mal Índex, massa gran. LinkCount=%d, Index=%d" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:137 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:140 +msgid "Parent would not accept link" +msgstr "L'ascendent no acceptarà l'enllaç" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:154 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:162 +msgid "Parent would not accept old link" +msgstr "L'ascendent no acceptarà l'enllaç antic" + +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:50 +msgid "Disconnect ValueNode Link" +msgstr "Desconnecta l'enllaç del valor de node" + +#: src/synfigapp/actions/valuenoderemove.cpp:50 +msgid "Unexport" +msgstr "Desfés exportació" + +#. TRANSLATORS: This is used in the 'history' dialog when a ValueNode is unexported. +#: src/synfigapp/actions/valuenoderemove.cpp:71 +#, c-format +msgid "Unexport '%s'" +msgstr "Desfés exportació «%s»" + +#: src/synfigapp/actions/valuenoderename.cpp:50 +msgid "Rename ValueNode" +msgstr "Renombra el valor de node" + +#. TRANSLATORS: This is used in the 'history' dialog when a ValueNode is renamed. +#: src/synfigapp/actions/valuenoderename.cpp:71 +#, c-format +msgid "Rename ValueNode from '%s' to '%s'" +msgstr "Renombra el valor de node des de «%s» a «%s»" + +#: src/synfigapp/actions/valuenoderename.cpp:87 +msgid "The new name of the ValueNode" +msgstr "El nou nom del valor de node" + +#: src/synfigapp/actions/valuenoderename.cpp:151 +msgid "A ValueNode with this ID already exists in this canvas" +msgstr "Un valor de node amb aquest ID ja existeix en aquest llenç" + +#: src/synfigapp/actions/valuenoderename.cpp:169 +msgid "A ValueNode with the old ID already exists in this canvas (BUG)" +msgstr "Un valor de node amb l'antic ID ja existeix en aquest llenç (BUG)" + +#: src/synfigapp/actions/valuenodereplace.cpp:49 +msgid "Replace ValueNode" +msgstr "Reemplaça el valor de node" + +#: src/synfigapp/actions/valuenodereplace.cpp:85 +msgid "Destination ValueNode" +msgstr "Valor de node de destí" + +#: src/synfigapp/actions/valuenodereplace.cpp:86 +msgid "ValueNode to replaced" +msgstr "Valor de node a reemplaçar" + +#: src/synfigapp/actions/valuenodereplace.cpp:91 +msgid "ValueNode that will replace the destination" +msgstr "Valor de node que reemplaçarà al destí" + +#: src/synfigapp/actions/valuenodereplace.cpp:137 +#: src/synfigapp/actions/valuenodereplace.cpp:193 +msgid "Attempted to replace valuenode with itself" +msgstr "Intent de reemplaçar un valor de node amb ell mateix" + +#: src/synfigapp/actions/valuenodereplace.cpp:140 +#: src/synfigapp/actions/valuenodereplace.cpp:196 +msgid "You cannot replace ValueNodes with different types!" +msgstr "No podeu reemplaçar el valor de node amb tipus diferents!" + +#: src/synfigapp/actions/valuenodereplace.cpp:163 +#: src/synfigapp/actions/valuenodereplace.cpp:201 +msgid "Nothing to replace." +msgstr "Res a remplazar." + +#: src/synfigapp/actions/valuenodereplace.cpp:170 +#: src/synfigapp/actions/valuenodereplace.cpp:208 +msgid "Action Failure. This is a bug. Please report it." +msgstr "Acció Fallida. Açò és un error. Per favor informeu del mateix." + +#: src/synfigapp/actions/valuenodereplace.cpp:188 +msgid "This action cannot be undone under these circumstances." +msgstr "Aquesta acció no es pot desfer sota sota aquestes circumstàncies." + +#: src/synfigapp/actions/valuenodereplace.cpp:213 +msgid ": (Undo) " +msgstr ": (Desfer) " + +#: src/synfigapp/actions/waypointadd.cpp:50 +#: src/synfigapp/actions/waypointsetsmart.cpp:59 +msgid "Add Waypoint" +msgstr "Afegeix interpolació" + +#: src/synfigapp/actions/waypointadd.cpp:80 +#: src/synfigapp/actions/waypointsetsmart.cpp:89 +msgid "New Waypoint" +msgstr "Nova interpolació" + +#: src/synfigapp/actions/waypointadd.cpp:81 +#: src/synfigapp/actions/waypointsetsmart.cpp:90 +#: src/synfigapp/actions/waypointsimpleadd.cpp:79 +msgid "Waypoint to be added" +msgstr "Interpolació a afegir" + +#: src/synfigapp/actions/waypointadd.cpp:87 +#: src/synfigapp/actions/waypointsetsmart.cpp:101 +msgid "Time where waypoint is to be added" +msgstr "Temps on es va a afegir la interpolació" + +#: src/synfigapp/actions/waypointadd.cpp:184 +#, c-format +msgid "A Waypoint already exists at this point in time (%s)" +msgstr "Ja existeix una interpolació en aquest punt en el temps (%s)" + +#: src/synfigapp/actions/waypointadd.cpp:187 +#: src/synfigapp/actions/waypointremove.cpp:180 +msgid "This waypoint is already in the ValueNode" +msgstr "Aquesta interpolació ja està en el valor de node" + +#: src/synfigapp/actions/waypointremove.cpp:49 +msgid "Remove Waypoint" +msgstr "Esborrar la interpolació" + +#: src/synfigapp/actions/waypointremove.cpp:74 +msgid "ValueNode (Animated)" +msgstr "Valor de Node (Animat)" + +#: src/synfigapp/actions/waypointremove.cpp:79 +msgid "Waypoint to be Removed" +msgstr "Interpolació a esborrar" + +#: src/synfigapp/actions/waypointremove.cpp:124 +#, c-format +msgid "UniqueID mismatch, iter=%d, waypoint=%d" +msgstr "Discreància d'ID únic;iter =%d, waypoint=%d" + +#: src/synfigapp/actions/waypointremove.cpp:127 +#, c-format +msgid "Time mismatch iter=%s, waypoint=%s" +msgstr "Discrepància de temps iter=%s, waypoint=%s" + +#: src/synfigapp/actions/waypointremove.cpp:141 +msgid "Unable to create ValueNode_Reference" +msgstr "Impossible crear la referència al valor de node" + +#: src/synfigapp/actions/waypointremove.cpp:162 +msgid "" +"This animated value node should be empty, but for some reason it isn't. This " +"is a bug. (1)" +msgstr "" +"Aquest valor de node animat hauria d'estar buit, per alguna raó no ho està. " +"Això és un error. (1)" + +#: src/synfigapp/actions/waypointremove.cpp:172 +msgid "" +"This animated value node should be empty, but for some reason it isn't. This " +"is a bug. (2)" +msgstr "" +"Aquest valor de node animat hauria d'estar buit, per alguna raó no ho està. " +"Això és un error. (2)" + +#: src/synfigapp/actions/waypointremove.cpp:177 +msgid "A Waypoint already exists at this point in time" +msgstr "Ja hi ha una Interpolació en aquest punt del temps" + +#: src/synfigapp/actions/waypointset.cpp:49 +msgid "Set Waypoint" +msgstr "Estableix la Interpolació" + +#: src/synfigapp/actions/waypointset.cpp:78 +msgid "Waypoint to be changed" +msgstr "Interpolació a canviar" + +#: src/synfigapp/actions/waypointset.cpp:133 +#: src/synfigapp/actions/waypointset.cpp:191 +#: src/synfigapp/actions/waypointset.cpp:235 +#: src/synfigapp/actions/waypointset.cpp:256 +msgid "Unable to find waypoint" +msgstr "Impossible trobar Interpolació" + +#: src/synfigapp/actions/waypointsimpleadd.cpp:146 +msgid "The waypoint to remove no longer exists" +msgstr "La interpolació a esborrar ja no existeix" + +#: src/synfigapp/action_system.cpp:77 +msgid "Action is not ready." +msgstr "L'acció no està preparada" + +#: src/synfigapp/action_system.cpp:109 +msgid "This action cannot be undone! Are you sure you want to continue?" +msgstr "Aquesta acció no es pot desfer! Esteu segurs de voler continuar?" + +#: src/synfigapp/action_system.cpp:128 src/synfigapp/action_system.cpp:145 +#: src/synfigapp/action_system.cpp:156 +msgid "Failed" +msgstr "Fallada" + +#: src/synfigapp/action_system.cpp:189 +msgid "Successful" +msgstr "Èxit" + +#: src/synfigapp/action_system.cpp:222 src/synfigapp/action_system.cpp:224 +msgid " (Undo): " +msgstr "(Desfer): " + +#: src/synfigapp/action_system.cpp:284 +msgid "Failed to undo." +msgstr "Fallada al desfer" + +#: src/synfigapp/action_system.cpp:320 src/synfigapp/action_system.cpp:322 +msgid " (Redo): " +msgstr " (Refer): " + +#: src/synfigapp/action_system.cpp:382 +msgid "Failed to redo." +msgstr "Fallada al refer" + +#: src/synfigapp/action_system.cpp:698 +msgid "State restore failure" +msgstr "Fallada al restaurar estat" + +#: src/synfigapp/canvasinterface.cpp:160 +msgid "Action Not Ready, unable to change mode" +msgstr "Acció no preparada, impossible canviar el mode" + +#: src/synfigapp/canvasinterface.cpp:166 +msgid "Unable to change mode" +msgstr "Impossible canviar el mode" + +#: src/synfigapp/canvasinterface.cpp:183 +msgid "Add Layer To" +msgstr "Afegeix capa a" + +#: src/synfigapp/canvasinterface.cpp:288 src/synfigapp/canvasinterface.cpp:349 +#: src/synfigapp/canvasinterface.cpp:382 +msgid "Action Not Ready" +msgstr "Acció no preparada" + +#: src/synfigapp/canvasinterface.cpp:294 src/synfigapp/canvasinterface.cpp:356 +#: src/synfigapp/canvasinterface.cpp:389 src/synfigapp/canvasinterface.cpp:477 +#: src/synfigapp/canvasinterface.cpp:494 src/synfigapp/canvasinterface.cpp:513 +#: src/synfigapp/canvasinterface.cpp:530 src/synfigapp/canvasinterface.cpp:695 +#: src/synfigapp/canvasinterface.cpp:720 src/synfigapp/canvasinterface.cpp:773 +msgid "Action Failed." +msgstr "Ha fallat l'acció." + +#: src/synfigapp/canvasinterface.cpp:316 +msgid "Move Action Not Ready" +msgstr "Acció moure no preparada" + +#: src/synfigapp/canvasinterface.cpp:322 +msgid "Move Action Failed." +msgstr "Ha fallat l'acció Moure" + +#: src/synfigapp/canvasinterface.cpp:365 +msgid "Empty name!" +msgstr "Nom buit!" + +#: src/synfigapp/canvasinterface.cpp:571 +msgid "Filename must have an extension!" +msgstr "L'arxiu ha de tenir una extensió!" + +#: src/synfigapp/canvasinterface.cpp:585 +msgid "Unable to open this composition" +msgstr "Impossible obrir aquesta composició" + +#: src/synfigapp/canvasinterface.cpp:589 +msgid "Unable to create \"Paste Canvas\" layer" +msgstr "Impsible crear la capa «Llenç Enganxat»" + +#: src/synfigapp/canvasinterface.cpp:604 +msgid "" +"Uncaught exception when attempting\n" +"to open this composition -- " +msgstr "" +"S'ha produit una excepció no capturada quan s'intentava\n" +"obrir aquesta composició" + +#: src/synfigapp/canvasinterface.cpp:610 +msgid "I don't know how to open images of this type -- " +msgstr "No es sap com obrir imatges d'aquest tipus -- " + +#: src/synfigapp/canvasinterface.cpp:765 +#, c-format +msgid "Unnamed%08d" +msgstr "Sense Nom%08d" + +#: src/synfigapp/canvasinterface.cpp:796 +msgid "" +"The value you are trying to edit is in a composition\n" +"which doesn't seem to be open. Open that composition and you\n" +"should be able to edit this value as normal." +msgstr "" +"El valor que esteu intentant editar és en una composició\n" +"que sembla que no està oberta. Obriu aquesta composició i podreu\n" +"editar aquest valor amb normalitat." + +#: src/synfigapp/uimanager.cpp:56 src/synfigapp/uimanager.cpp:83 +msgid "(no/yes)" +msgstr "(no/si)" + +#: src/synfigapp/uimanager.cpp:58 src/synfigapp/uimanager.cpp:85 +msgid "(yes/no)" +msgstr "(si/no)" + +#: src/synfigapp/uimanager.cpp:110 +msgid "(cancel/ok)" +msgstr "(cancel·la/ok)" + +#: src/synfigapp/uimanager.cpp:112 +msgid "(ok/cancel)" +msgstr "(ok/cancel·la)" + +#: src/synfigapp/uimanager.cpp:142 +msgid "error: " +msgstr "error: " + +#: src/synfigapp/uimanager.cpp:149 +msgid "warning: " +msgstr "avís: " + +#: src/synfigapp/value_desc.cpp:60 +msgid "Layer Parameter" +msgstr "Paràmetre de la capa" + +#: src/synfigapp/value_desc.cpp:71 +msgid "Value Node" +msgstr "Valor de node" + +#: src/synfigapp/value_desc.cpp:81 +msgid "Exported ValueNode" +msgstr "Valor de node exportat" + +#~ msgid "Ok" +#~ msgstr "OK" + +#~ msgid "Gradient" +#~ msgstr "Gradient" + +#~ msgid "Fill" +#~ msgstr "Farciment" + +#~ msgid "Outline" +#~ msgstr "Contorn" + +#~ msgid "Plant" +#~ msgstr "Planta" + +#~ msgid "/Special:Allpages" +#~ msgstr "/Special:Allpages" diff --git a/synfig-studio/po/es.po b/synfig-studio/po/es.po new file mode 100644 index 0000000..5cccda0 --- /dev/null +++ b/synfig-studio/po/es.po @@ -0,0 +1,4439 @@ +# translation of es.po to Español +# Copyright (C) YEAR Synfig Contributors +# This file is distributed under the same license as the PACKAGE package. +# +# Carlos López González , 2008. +# Franco Iacomella , 2008. +msgid "" +msgstr "" +"Project-Id-Version: es\n" +"Report-Msgid-Bugs-To: http://synfig.org/Bugs\n" +"POT-Creation-Date: 2008-10-06 14:28+0800\n" +"PO-Revision-Date: 2008-10-01 23:50+0200\n" +"Last-Translator: Carlos López González \n" +"Language-Team: Español \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#: src/gtkmm/about.cpp:104 +msgid "2D vector animation studio" +msgstr "Estudio de animación vectorial 2D" + +#: src/gtkmm/about.cpp:108 +msgid "Visit the Synfig website" +msgstr "Visite la web de Synfig" + +#: src/gtkmm/about.cpp:110 +msgid "" +"Copyright 2001-2008\n" +"Robert B. Quattlebaum Jr.,\n" +"Adrian Bentley and Synfig contributors" +msgstr "" +"Copyright 2001-2008\n" +"Robert B. Quattlebaum Jr.,\n" +"Adrian Bentley y los contribuidores de Synfig" + +#. TRANSLATORS: change this to your name, separate multiple names with \n +#: src/gtkmm/about.cpp:166 +msgid "translator-credits" +msgstr "" +"Carlos López González (genete)\n" +"Franco Iacomella (Yaco)" + +#: src/gtkmm/about.cpp:193 +#, c-format +msgid "" +"\n" +"Development version:\n" +"%s\n" +msgstr "" +"\n" +"Versión de desarrollo:\n" +"%s \n" + +#: src/gtkmm/about.cpp:198 +#, c-format +msgid "Built on %s\n" +msgstr "Contruido el %s\n" + +#: src/gtkmm/about.cpp:202 +msgid "Built with:\n" +msgstr "Construido con: \n" + +#: src/gtkmm/about.cpp:203 +#, c-format +msgid "ETL %s\n" +msgstr "ETL %s\n" + +#: src/gtkmm/about.cpp:204 +#, c-format +msgid "Synfig API %s\n" +msgstr "Synfig API %s\n" + +#: src/gtkmm/about.cpp:205 +#, c-format +msgid "Synfig library %d\n" +msgstr "Librería Synfig %d\n" + +#: src/gtkmm/about.cpp:206 +#, c-format +msgid "GTK+ %d.%d.%d\n" +msgstr "GTK+ %d.%d.%d\n" + +#: src/gtkmm/about.cpp:208 +#, c-format +msgid "GNU G++ %d.%d.%d\n" +msgstr "GNU G++ %d.%d.%d\n" + +#: src/gtkmm/about.cpp:213 +msgid "Using:\n" +msgstr "Usando:\n" + +#: src/gtkmm/about.cpp:214 +#, c-format +msgid "Synfig %s\n" +msgstr "Synfig %s\n" + +#: src/gtkmm/about.cpp:215 +#, c-format +msgid "GTK+ %d.%d.%d" +msgstr "GTK+ %d.%d.%d" + +#: src/gtkmm/app.cpp:665 src/gtkmm/toolbox.cpp:281 +msgid "_File" +msgstr "_Archivo" + +#: src/gtkmm/app.cpp:666 src/gtkmm/canvasview.cpp:3320 +msgid "_Edit" +msgstr "Edi_tar" + +#: src/gtkmm/app.cpp:667 +msgid "_View" +msgstr "_Ver" + +#: src/gtkmm/app.cpp:668 +msgid "_Canvas" +msgstr "_Lienzo" + +#: src/gtkmm/app.cpp:669 +msgid "_Layer" +msgstr "_Capa" + +#: src/gtkmm/app.cpp:670 +msgid "Show/Hide Ducks" +msgstr "Mostrar/Ocultar Nodos" + +#: src/gtkmm/app.cpp:671 +msgid "Preview Quality" +msgstr "Calidad de Previsualización" + +#: src/gtkmm/app.cpp:672 +msgid "Low-Res Pixel Size" +msgstr "Tamaño de pixel en Baja Resolución" + +#: src/gtkmm/app.cpp:673 src/gtkmm/canvasview.cpp:2265 +#: src/synfigapp/actions/layeradd.cpp:82 +msgid "New Layer" +msgstr "Nueva Capa" + +#: src/gtkmm/app.cpp:674 src/synfigapp/actions/keyframeduplicate.cpp:79 +#: src/synfigapp/actions/keyframeremove.cpp:78 +#: src/synfigapp/actions/keyframesetdelta.cpp:79 +#: src/synfigapp/actions/keyframewaypointset.cpp:78 +msgid "Keyframe" +msgstr "Fotograma Clave" + +#: src/gtkmm/app.cpp:675 src/gtkmm/iconcontroller.cpp:163 +#: src/synfigapp/actions/groupaddlayers.cpp:78 +#: src/synfigapp/actions/groupremove.cpp:72 +msgid "Group" +msgstr "Grupo" + +#: src/gtkmm/app.cpp:676 +msgid "State" +msgstr "Estado" + +#: src/gtkmm/app.cpp:677 +msgid "Toolbox" +msgstr "Caja de Herramientas" + +#: src/gtkmm/app.cpp:694 src/gtkmm/keyframeactionmanager.cpp:239 +msgid "Keyframe Properties" +msgstr "Propiedades del Fotograma Clave" + +#: src/gtkmm/app.cpp:705 src/gtkmm/canvasview.cpp:1206 +msgid "Import" +msgstr "Importar" + +#: src/gtkmm/app.cpp:706 src/gtkmm/canvasview.cpp:1209 +msgid "Render" +msgstr "Renderizar" + +#: src/gtkmm/app.cpp:707 src/gtkmm/canvasview.cpp:1212 +#: src/gtkmm/dialog_preview.cpp:171 +msgid "Preview" +msgstr "Previsualizar" + +#: src/gtkmm/app.cpp:708 +msgid "Preview Dialog" +msgstr "Diálogo de Previsualización" + +#: src/gtkmm/app.cpp:709 src/gtkmm/canvasview.cpp:1215 +msgid "Sound File" +msgstr "Archivo de Sonido" + +#: src/gtkmm/app.cpp:710 src/gtkmm/canvasoptions.cpp:151 +#: src/gtkmm/canvasview.cpp:1218 +msgid "Options" +msgstr "Opciones" + +#: src/gtkmm/app.cpp:711 +msgid "Close View" +msgstr "Cerrar Vista" + +#: src/gtkmm/app.cpp:712 src/gtkmm/canvasview.cpp:1224 +msgid "Close Document" +msgstr "Cerrar Documento" + +#: src/gtkmm/app.cpp:721 src/gtkmm/canvasview.cpp:1239 +msgid "Select All Ducks" +msgstr "Seleccionar todos los Nodos" + +#: src/gtkmm/app.cpp:722 src/gtkmm/canvasview.cpp:1243 +msgid "Unselect All Ducks" +msgstr "Deseleccionar todos los Nodos" + +#: src/gtkmm/app.cpp:723 src/gtkmm/canvasview.cpp:1247 +msgid "Select All Layers" +msgstr "Seleccionar Todas las Capas" + +#: src/gtkmm/app.cpp:724 src/gtkmm/canvasview.cpp:1251 +msgid "Unselect All Layers" +msgstr "Deseleccionar Todas las Capas" + +#: src/gtkmm/app.cpp:725 src/gtkmm/canvasproperties.cpp:197 +msgid "Properties" +msgstr "Propiedades" + +#: src/gtkmm/app.cpp:727 src/gtkmm/canvasview.cpp:1417 +msgid "Show Position Ducks" +msgstr "Mostrar los Nodos de Posición" + +#: src/gtkmm/app.cpp:728 src/gtkmm/canvasview.cpp:1419 +msgid "Show Vertex Ducks" +msgstr "Mostrar los Nodos de Vértice" + +#: src/gtkmm/app.cpp:729 src/gtkmm/canvasview.cpp:1418 +msgid "Show Tangent Ducks" +msgstr "Mostrar los Nodos de Tangente" + +#: src/gtkmm/app.cpp:730 src/gtkmm/canvasview.cpp:1420 +msgid "Show Radius Ducks" +msgstr "Mostrar los Nodos de Radio" + +#: src/gtkmm/app.cpp:731 src/gtkmm/canvasview.cpp:1421 +msgid "Show Width Ducks" +msgstr "Mostrar los Nodos de Espesor" + +#: src/gtkmm/app.cpp:732 src/gtkmm/canvasview.cpp:1422 +msgid "Show Angle Ducks" +msgstr "Mostrar los Nodos de Ángulo" + +#: src/gtkmm/app.cpp:733 src/gtkmm/canvasview.cpp:1270 +msgid "Use Parametric Renderer" +msgstr "Usar Renderizado Paramétrico " + +#: src/gtkmm/app.cpp:734 +msgid "Use Quality Level 1" +msgstr "Usar Nivel de Calidad 1" + +#: src/gtkmm/app.cpp:735 +msgid "Use Quality Level 2" +msgstr "Usar Nivel de Calidad 2" + +#: src/gtkmm/app.cpp:736 +msgid "Use Quality Level 3" +msgstr "Usar Nivel de Calidad 3" + +#: src/gtkmm/app.cpp:737 +msgid "Use Quality Level 4" +msgstr "Usar Nivel de Calidad 4" + +#: src/gtkmm/app.cpp:738 +msgid "Use Quality Level 5" +msgstr "Usar Nivel de Calidad 5" + +#: src/gtkmm/app.cpp:739 +msgid "Use Quality Level 6" +msgstr "Usar Nivel de Calidad 6" + +#: src/gtkmm/app.cpp:740 +msgid "Use Quality Level 7" +msgstr "Usar Nivel de Calidad 7" + +#: src/gtkmm/app.cpp:741 +msgid "Use Quality Level 8" +msgstr "Usar Nivel de Calidad 8" + +#: src/gtkmm/app.cpp:742 +msgid "Use Quality Level 9" +msgstr "Usar Nivel de Calidad 8" + +#: src/gtkmm/app.cpp:743 +msgid "Use Quality Level 10" +msgstr "Usar Nivel de Calidad 10" + +#: src/gtkmm/app.cpp:745 src/gtkmm/canvasview.cpp:1304 +#, c-format +msgid "Set Low-Res pixel size to %d" +msgstr "Establecer el tamaño de pixel de Baja Resolución a %d" + +#: src/gtkmm/app.cpp:746 src/gtkmm/preview.cpp:358 +msgid "Play" +msgstr "Reproducir" + +#: src/gtkmm/app.cpp:748 src/gtkmm/canvasview.cpp:994 +#: src/gtkmm/preview.cpp:364 +msgid "Stop" +msgstr "Parar" + +#: src/gtkmm/app.cpp:749 +msgid "Toggle Grid Show" +msgstr "Alternar Mostrar Rejilla" + +#: src/gtkmm/app.cpp:750 +msgid "Toggle Grid Snap" +msgstr "Alternar Adherir a Rejilla" + +#: src/gtkmm/app.cpp:751 +msgid "Toggle Guide Show" +msgstr "Alternar Mostrar Guía" + +#: src/gtkmm/app.cpp:752 +msgid "Toggle Low-Res" +msgstr "Alternar Baja Resolución" + +#: src/gtkmm/app.cpp:753 src/gtkmm/canvasview.cpp:1320 +msgid "Decrease Low-Res Pixel Size" +msgstr "Disminuir el tamaño de pixel de Baja Resolución" + +#: src/gtkmm/app.cpp:754 src/gtkmm/canvasview.cpp:1323 +msgid "Increase Low-Res Pixel Size" +msgstr "Aumentar el tamaño de pixel de Baja Resolución" + +#: src/gtkmm/app.cpp:755 +msgid "Toggle Onion Skin" +msgstr "Alternar Piel de Cebolla" + +#: src/gtkmm/app.cpp:762 src/gtkmm/canvasview.cpp:1386 +msgid "Jump to Next Keyframe" +msgstr "Saltar al Fotograma Clave Siguiente" + +#: src/gtkmm/app.cpp:763 src/gtkmm/canvasview.cpp:1389 +msgid "Jump to Prev Keyframe" +msgstr "Saltar al Fotograma Clave Previo" + +#: src/gtkmm/app.cpp:764 src/gtkmm/canvasview.cpp:1370 +msgid "Next Frame" +msgstr "Fotograma Siguiente" + +#: src/gtkmm/app.cpp:765 src/gtkmm/canvasview.cpp:1372 +msgid "Prev Frame" +msgstr "Fotograma Previo" + +#: src/gtkmm/app.cpp:766 src/gtkmm/canvasview.cpp:1375 +msgid "Seek Forward" +msgstr "Avanzar" + +#: src/gtkmm/app.cpp:767 src/gtkmm/canvasview.cpp:1377 +msgid "Seek Backward" +msgstr "Retroceder" + +#: src/gtkmm/app.cpp:768 src/gtkmm/canvasview.cpp:1383 +msgid "Seek to Begin" +msgstr "Retroceder al Principio" + +#: src/gtkmm/app.cpp:769 src/gtkmm/canvasview.cpp:1380 +msgid "Seek to End" +msgstr "Avanzar al Final" + +#: src/gtkmm/app.cpp:771 +msgid "Add group" +msgstr "Añadir grupo" + +#: src/gtkmm/app.cpp:773 src/gtkmm/iconcontroller.cpp:158 +#: src/synfigapp/actions/canvasadd.cpp:73 +msgid "New Canvas" +msgstr "Nuevo Lienzo" + +#: src/gtkmm/app.cpp:775 src/gtkmm/layeractionmanager.cpp:104 +#: src/gtkmm/layeractionmanager.cpp:494 +msgid "Increase Amount" +msgstr "Incrementar la Cantidad" + +#: src/gtkmm/app.cpp:776 src/gtkmm/layeractionmanager.cpp:116 +#: src/gtkmm/layeractionmanager.cpp:511 +msgid "Decrease Amount" +msgstr "Disminuir la Cantidad" + +#: src/gtkmm/app.cpp:1134 src/gtkmm/toolbox.cpp:359 +msgid "Synfig Studio" +msgstr "Synfig Studio" + +#: src/gtkmm/app.cpp:1147 +msgid "Failed to initialize synfig!" +msgstr "¡Fallo al inicializar Synfig!" + +#: src/gtkmm/app.cpp:1156 +msgid "Init UI Manager..." +msgstr "Iniciar Encargado de Interfaz de Usuario ..." + +#: src/gtkmm/app.cpp:1160 +msgid "Init Dock Manager..." +msgstr "Iniciar Encargado de Empotrables..." + +#: src/gtkmm/app.cpp:1163 +msgid "Init State Manager..." +msgstr "Iniciar Encargado de Estado..." + +#: src/gtkmm/app.cpp:1166 +msgid "Init Toolbox..." +msgstr "Iniciar Caja de Herramientas..." + +#: src/gtkmm/app.cpp:1169 +msgid "Init About Dialog..." +msgstr "Iniciar Diálogo Acerca de..." + +#: src/gtkmm/app.cpp:1172 +msgid "Init Tool Options..." +msgstr "Iniciar Opciones de Herramienta..." + +#: src/gtkmm/app.cpp:1176 +msgid "Init History..." +msgstr "Iniciar Historial..." + +#: src/gtkmm/app.cpp:1180 +msgid "Init Canvases..." +msgstr "Iniciar Lienzos..." + +#: src/gtkmm/app.cpp:1184 +msgid "Init Keyframes..." +msgstr "Iniciar Fotogramas Claves..." + +#: src/gtkmm/app.cpp:1188 +msgid "Init Layers..." +msgstr "Iniciar Capas..." + +#: src/gtkmm/app.cpp:1192 +msgid "Init Params..." +msgstr "Iniciar Parámetros..." + +#: src/gtkmm/app.cpp:1196 +msgid "Init MetaData..." +msgstr "Iniciar Meta Datos..." + +#: src/gtkmm/app.cpp:1200 +msgid "Init Children..." +msgstr "Iniciar Descendientes..." + +#: src/gtkmm/app.cpp:1204 +msgid "Init Info..." +msgstr "Iniciar Información..." + +#: src/gtkmm/app.cpp:1208 +msgid "Init Navigator..." +msgstr "Iniciar Navegador..." + +#: src/gtkmm/app.cpp:1212 +msgid "Init Timetrack..." +msgstr "Iniciar Línea de Tiempo..." + +#: src/gtkmm/app.cpp:1216 +msgid "Init Curve Editor..." +msgstr "Iniciar Editor de Curvas..." + +#: src/gtkmm/app.cpp:1220 +msgid "Init Layer Groups..." +msgstr "Iniciar Grupos de Capas..." + +#: src/gtkmm/app.cpp:1225 +msgid "Init Color Dialog..." +msgstr "Iniciar Diálogo de Color..." + +#: src/gtkmm/app.cpp:1228 +msgid "Init Gradient Dialog..." +msgstr "Iniciar Diálogo de Gradiente..." + +#: src/gtkmm/app.cpp:1231 +msgid "Init DeviceTracker..." +msgstr "Iniciar Seguimiento Dispositivos..." + +#: src/gtkmm/app.cpp:1234 +msgid "Init Tools..." +msgstr "Iniciar Herramientas..." + +#: src/gtkmm/app.cpp:1241 +msgid "Init ModMirror..." +msgstr "Iniciar Módulo Espejo..." + +#: src/gtkmm/app.cpp:1263 +msgid "Init ModPalette..." +msgstr "Iniciar Módulo Paleta..." + +#: src/gtkmm/app.cpp:1266 +msgid "Init Setup Dialog..." +msgstr "Iniciar Diálogo de Preferencias..." + +#: src/gtkmm/app.cpp:1269 +msgid "Init Input Dialog..." +msgstr "Iniciar Diálogo de Entrada..." + +#: src/gtkmm/app.cpp:1274 +msgid "Init auto recovery..." +msgstr "Iniciar Auto Recuperación..." + +#: src/gtkmm/app.cpp:1278 +msgid "Loading Settings..." +msgstr "Cargando Preferencias..." + +#: src/gtkmm/app.cpp:1280 +msgid "Checking auto-recover..." +msgstr "Chequeando Auto Recuperación..." + +#: src/gtkmm/app.cpp:1288 +msgid "Auto Recovery" +msgstr "Auto Recuperación" + +#: src/gtkmm/app.cpp:1289 +msgid "" +"Synfig Studio seems to have crashed\n" +"before you could save all your files.\n" +"Would you like to re-open those files\n" +"and recover your unsaved changes?" +msgstr "" +"Synfig parece haberse cerrado antes \n" +"de que pudiera salvar todos los ficheros\n" +"¿Quiere re-abrir esos ficheros y recuperar\n" +"los cambios no salvados?" + +#: src/gtkmm/app.cpp:1298 +msgid "Unable to fully recover from previous crash" +msgstr "Imposible recuperar completamente desde el ultimo cierrre" + +#: src/gtkmm/app.cpp:1300 +msgid "Unable to recover from previous crash" +msgstr "Imposible recuperar desde el ultimo cierre" + +#: src/gtkmm/app.cpp:1303 +msgid "" +"Synfig Studio has attempted to recover\n" +"from a previous crash. The files that it has\n" +"recovered are NOT YET SAVED. It would be a good\n" +"idea to review them and save them now." +msgstr "" +"Synfig ha intentado recuperarse de\n" +"un cierre previo. Los archivos que no se\n" +"han recuperado NO HAN SIDO GUARDADOS \n" +" TODAVÍA. Parece una buena idea recuperarlos\n" +"y guardarlos ahora." + +#: src/gtkmm/app.cpp:1319 +msgid "Loading files..." +msgstr "Cargando Ficheros..." + +#: src/gtkmm/app.cpp:1330 +msgid "Done." +msgstr "Hecho." + +#: src/gtkmm/app.cpp:1337 src/gtkmm/app.cpp:1341 +msgid "" +"Unknown exception caught when constructing App.\n" +"This software may be unstable." +msgstr "" +"Atrapada excepción desconocida cuando se construía la Aplicación. \n" +"Este programa puede ser inestable." + +#: src/gtkmm/app.cpp:1752 +msgid "Quit Request" +msgstr "Requerimiento de Salida" + +#: src/gtkmm/app.cpp:1755 +msgid "Cannot quit!" +msgstr "¡No puedo Salir!" + +#: src/gtkmm/app.cpp:1755 +msgid "" +"Tasks are currently running.\n" +"Please cancel the current tasks and try again" +msgstr "" +"Hay tareas ejecutandose actualmente.\n" +"Por favor cancelelas e inténtelo de nuevo." + +#: src/gtkmm/app.cpp:1823 +msgid "Quit Request sent" +msgstr "Requerimiento de Salida enviado" + +#: src/gtkmm/app.cpp:2040 +msgid "current" +msgstr "actual" + +#: src/gtkmm/app.cpp:2043 +msgid "and older" +msgstr "y más antiguo" + +#: src/gtkmm/app.cpp:2047 +msgid "File Format Version: " +msgstr "Versión de Formato de Archivo: " + +#: src/gtkmm/app.cpp:2146 +msgid "Feature not available" +msgstr "Característica no disponible" + +#: src/gtkmm/app.cpp:2147 +msgid "Sorry, this feature has not yet been implemented." +msgstr "Lo siento, esta funcionalidad no ha sido aún creada" + +#: src/gtkmm/app.cpp:2232 +msgid "Documentation" +msgstr "Documentación" + +#: src/gtkmm/app.cpp:2233 +msgid "" +"Documentation for Synfig Studio is available on the website:\n" +"\n" +"http://www.synfig.org/Documentation" +msgstr "" +"La Documentación para Synfig Studio está disponible en el sitio: \n" +"\n" +"http://www.synfig.org/Documentation" + +#: src/gtkmm/app.cpp:2234 src/gtkmm/toolbox.cpp:298 +msgid "Help" +msgstr "_Ayuda" + +#: src/gtkmm/app.cpp:2244 +msgid "No browser was found. Please load this website manually:" +msgstr "" +"No se ha encontrado navegador. Por favor cargue esta página web manualmente:" + +#: src/gtkmm/app.cpp:2246 +msgid "No browser found" +msgstr "No se ha encontrado Navegador" + +#: src/gtkmm/app.cpp:2354 +#, c-format +msgid "Unable to open file \"%s\"" +msgstr "Imposible abrir archivo \"%s\"" + +#: src/gtkmm/app.cpp:2362 +#, c-format +msgid "Unable to create instance for \"%s\"" +msgstr "Imposible crear instancia para \"%s\"" + +#: src/gtkmm/app.cpp:2368 src/gtkmm/iconcontroller.cpp:188 +#: src/gtkmm/instance.cpp:559 +msgid "CVS Update" +msgstr "Actualización por CVS" + +#: src/gtkmm/app.cpp:2368 +msgid "" +"There appears to be a newer version of this file available on the CVS " +"repository.\n" +"Would you like to update now? (It would probably be a good idea)" +msgstr "" +"Parece haber una nueva versión de este fichero en el depósito CVS.\n" +"¿Quiere actualizar ahora? (probablemente sea una buena idea)" + +#: src/gtkmm/app.cpp:2374 src/gtkmm/app.cpp:2379 src/gtkmm/instance.cpp:481 +#: src/gtkmm/instance.cpp:497 src/gtkmm/instance.cpp:509 +#: src/gtkmm/instance.cpp:520 src/gtkmm/instance.cpp:534 +#: src/gtkmm/instance.cpp:545 src/gtkmm/instance.cpp:575 +#: src/gtkmm/instance.cpp:586 src/gtkmm/instance.cpp:602 +#: src/gtkmm/instance.cpp:611 src/gtkmm/layerparamtreestore.cpp:246 +#: src/gtkmm/widget_canvaschooser.cpp:145 +#: src/gtkmm/widget_canvaschooser.cpp:163 +msgid "Error" +msgstr "Error" + +#: src/gtkmm/app.cpp:2379 +msgid "Uncaught error on file open (BUG)" +msgstr "Error no atrapado al abrir fichero (BUG)" + +#: src/gtkmm/app.cpp:2433 +msgid "Unable to open file" +msgstr "Imposible abrir fichero" + +#: src/gtkmm/canvasoptions.cpp:61 +msgid "Canvas Options" +msgstr "Opciones de Lienzo" + +#: src/gtkmm/canvasoptions.cpp:63 +msgid "_Snap to grid" +msgstr "Adherir a la _Rejilla" + +#: src/gtkmm/canvasoptions.cpp:64 +msgid "S_how grid" +msgstr "_Mostrar la Rejilla" + +#: src/gtkmm/canvasoptions.cpp:65 +msgid "Snap to _frame" +msgstr "Ahderir a _Fotograma" + +#: src/gtkmm/canvasoptions.cpp:80 +msgid "Grid" +msgstr "Rejilla" + +#: src/gtkmm/canvasoptions.cpp:90 +msgid "_Grid size" +msgstr "_Tamaño de Rejilla" + +#: src/gtkmm/canvasoptions.cpp:104 src/gtkmm/iconcontroller.cpp:142 +#: src/gtkmm/keyframetree.cpp:62 src/gtkmm/renddesc.cpp:96 +#: src/synfigapp/actions/activepointadd.cpp:85 +#: src/synfigapp/actions/activepointsetoff.cpp:92 +#: src/synfigapp/actions/activepointseton.cpp:92 +#: src/synfigapp/actions/activepointsetsmart.cpp:92 +#: src/synfigapp/actions/blinepointtangentmerge.cpp:91 +#: src/synfigapp/actions/blinepointtangentsplit.cpp:91 +#: src/synfigapp/actions/colorset.cpp:83 +#: src/synfigapp/actions/gradientset.cpp:83 +#: src/synfigapp/actions/keyframeduplicate.cpp:84 +#: src/synfigapp/actions/layerparamdisconnect.cpp:83 +#: src/synfigapp/actions/valuedescblinelink.cpp:89 +#: src/synfigapp/actions/valuedescconvert.cpp:102 +#: src/synfigapp/actions/valuedescdisconnect.cpp:94 +#: src/synfigapp/actions/valuedescset.cpp:100 +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:79 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:81 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:80 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:83 +#: src/synfigapp/actions/waypointadd.cpp:86 +#: src/synfigapp/actions/waypointsetsmart.cpp:100 +msgid "Time" +msgstr "Tiempo" + +#: src/gtkmm/canvasoptions.cpp:113 src/gtkmm/dialog_setup.cpp:177 +msgid "Units" +msgstr "Unidades" + +#: src/gtkmm/canvasoptions.cpp:114 +msgid "Not yet implemented!" +msgstr "¡Aún no creado!" + +#: src/gtkmm/canvasoptions.cpp:169 src/gtkmm/dialog_keyframe.cpp:89 +msgid "Not yet implemented" +msgstr "Aun no creado" + +#: src/gtkmm/canvasproperties.cpp:64 +msgid "Canvas Properties" +msgstr "Propiedades del Lienzo" + +#: src/gtkmm/canvasproperties.cpp:77 +msgid "Canvas Info" +msgstr "Información del Lienzo" + +#: src/gtkmm/canvasproperties.cpp:79 +msgid "Canvas Info" +msgstr "Información del Lienzo" + +#: src/gtkmm/canvasproperties.cpp:95 +msgid "_ID" +msgstr "_ID" + +#: src/gtkmm/canvasproperties.cpp:101 +msgid "_Name" +msgstr "_Nombre" + +#: src/gtkmm/canvasproperties.cpp:104 +msgid "_Description" +msgstr "_Descripción" + +#: src/gtkmm/canvasproperties.cpp:146 src/gtkmm/dock_metadata.cpp:69 +msgid "Key" +msgstr "Clave" + +#: src/gtkmm/canvasproperties.cpp:147 src/gtkmm/dock_metadata.cpp:70 +msgid "Data" +msgstr "Datos" + +#: src/gtkmm/canvasproperties.cpp:182 src/gtkmm/dock_metadata.cpp:134 +msgid "New MetaData Entry" +msgstr "Nueva Entrada de Meta Datos" + +#: src/gtkmm/canvasproperties.cpp:182 src/gtkmm/dock_metadata.cpp:134 +msgid "Please enter the name of the key" +msgstr "Por favor introduzca el nombre de la clave" + +#: src/gtkmm/canvasproperties.cpp:226 +msgid "Edit Canvas Properties" +msgstr "Editar Propiedades del Lienzo" + +#: src/gtkmm/canvastreestore.cpp:204 src/gtkmm/canvastreestore.cpp:242 +#: src/gtkmm/childrentreestore.cpp:204 src/gtkmm/iconcontroller.cpp:149 +#: src/synfigapp/action.cpp:468 +msgid "Canvas" +msgstr "Lienzo" + +#: src/gtkmm/canvastreestore.cpp:241 src/gtkmm/childrentreestore.cpp:201 +#: src/gtkmm/instance.cpp:415 +msgid "[Unnamed]" +msgstr "[Sin Nombre]" + +#: src/gtkmm/canvasview.cpp:241 src/gtkmm/workarea.cpp:2344 +#: src/gtkmm/workarea.cpp:2439 +msgid "Idle" +msgstr "Inactivo" + +#: src/gtkmm/canvasview.cpp:331 +msgid "ERROR" +msgstr "ERROR" + +#: src/gtkmm/canvasview.cpp:380 +msgid "Feature not yet implemented" +msgstr "Funcionalidad aún no creada" + +#: src/gtkmm/canvasview.cpp:926 +msgid "Moves the time window" +msgstr "Mueve la ventana de tiempo" + +#: src/gtkmm/canvasview.cpp:927 +msgid "Changes the current time" +msgstr "Cambia el tiempo actual" + +#: src/gtkmm/canvasview.cpp:936 +msgid "Animate" +msgstr "Animar" + +#: src/gtkmm/canvasview.cpp:940 src/gtkmm/canvasview.cpp:2533 +#: src/gtkmm/iconcontroller.cpp:182 +msgid "All Keyframes Locked" +msgstr "Todos los Fotogramas Clave Bloqueados" + +#: src/gtkmm/canvasview.cpp:995 +msgid "Refresh" +msgstr "Refrescar" + +#: src/gtkmm/canvasview.cpp:1221 +msgid "Close Window" +msgstr "Cerrar Ventana" + +#: src/gtkmm/canvasview.cpp:1227 +msgid "Quit" +msgstr "_Salir" + +#: src/gtkmm/canvasview.cpp:1279 +msgid " (best)" +msgstr "(mejor)" + +#: src/gtkmm/canvasview.cpp:1280 +msgid " (fastest)" +msgstr "(el más rápido)" + +#: src/gtkmm/canvasview.cpp:1282 +#, c-format +msgid "Set Quality to %d" +msgstr "Establecer calidad a %d" + +#: src/gtkmm/canvasview.cpp:1332 +msgid "Flipbook Dialog" +msgstr "Diálogo de Previsualización" + +#: src/gtkmm/canvasview.cpp:1339 src/gtkmm/iconcontroller.cpp:164 +msgid "Show Grid" +msgstr "Mostar Rejilla" + +#: src/gtkmm/canvasview.cpp:1343 +msgid "Snap to Grid" +msgstr "Adherir a la _Rejilla" + +#: src/gtkmm/canvasview.cpp:1347 +msgid "Show Guides" +msgstr "Mostar Guías" + +#: src/gtkmm/canvasview.cpp:1351 +msgid "Use Low-Res" +msgstr "Usar Baja Resolución" + +#: src/gtkmm/canvasview.cpp:1355 +msgid "Show Onion Skin" +msgstr "Mostrar Piel de Cebolla" + +#: src/gtkmm/canvasview.cpp:1398 +msgid "Zoom In on Timeline" +msgstr "Acercar a la Línea de Tiempo" + +#: src/gtkmm/canvasview.cpp:1401 +msgid "Zoom Out on Timeline" +msgstr "Alejar de la Linea de Tiempo" + +#: src/gtkmm/canvasview.cpp:1807 src/gtkmm/canvasview.cpp:2268 +msgid "Select All Children" +msgstr "Seleccionar todos los Descendientes" + +#: src/gtkmm/canvasview.cpp:2081 +msgid "-MODIFIED" +msgstr "-MODIFICADO" + +#: src/gtkmm/canvasview.cpp:2083 +msgid "-UPDATED" +msgstr "-ACTUALIZADO" + +#: src/gtkmm/canvasview.cpp:2088 +msgid " (Root)" +msgstr "(Raíz)" + +#: src/gtkmm/canvasview.cpp:2512 +msgid "In Animate Editing Mode" +msgstr "En Modo de Edición de Animación" + +#: src/gtkmm/canvasview.cpp:2522 +msgid "Not in Animate Editing Mode" +msgstr "No en Modo de Edición de Animación" + +#: src/gtkmm/canvasview.cpp:2543 src/gtkmm/iconcontroller.cpp:184 +msgid "Future Keyframes Locked" +msgstr "Fotogramas Claves Futuros Bloqueados" + +#: src/gtkmm/canvasview.cpp:2553 src/gtkmm/iconcontroller.cpp:183 +msgid "Past Keyframes Locked" +msgstr "Fotogramas Clave Pasados Bloqueados" + +#: src/gtkmm/canvasview.cpp:2563 src/gtkmm/iconcontroller.cpp:185 +msgid "No Keyframes Locked" +msgstr "Sin Bloquear Fotogramas Clave" + +#: src/gtkmm/canvasview.cpp:3177 +msgid "Change Waypoint Group" +msgstr "Cambiar Interpolación del Grupo" + +#: src/gtkmm/canvasview.cpp:3208 +msgid "Duplicate Waypoints" +msgstr "Duplicar Interpolaciones" + +#: src/gtkmm/canvasview.cpp:3224 +msgid "Remove Waypoints" +msgstr "Borrar Interpolaciones" + +#: src/gtkmm/canvasview.cpp:3269 src/gtkmm/canvasview.cpp:3272 +#: src/gtkmm/canvasview.cpp:3275 src/gtkmm/widget_defaults.cpp:290 +msgid "_TCB" +msgstr "_TCB" + +#: src/gtkmm/canvasview.cpp:3279 src/gtkmm/canvasview.cpp:3282 +#: src/gtkmm/canvasview.cpp:3285 src/gtkmm/widget_defaults.cpp:293 +msgid "_Linear" +msgstr "_Lineal" + +#: src/gtkmm/canvasview.cpp:3289 +msgid "_Ease In" +msgstr "_Suave" + +#: src/gtkmm/canvasview.cpp:3292 +msgid "_Ease Out" +msgstr "_Suave" + +#: src/gtkmm/canvasview.cpp:3295 src/gtkmm/widget_defaults.cpp:292 +msgid "_Ease In/Out" +msgstr "_Suave" + +#: src/gtkmm/canvasview.cpp:3299 src/gtkmm/canvasview.cpp:3302 +#: src/gtkmm/canvasview.cpp:3305 src/gtkmm/widget_defaults.cpp:291 +msgid "_Constant" +msgstr "_Constante" + +#: src/gtkmm/canvasview.cpp:3310 +msgid "_Jump To" +msgstr "Sa_ltar A" + +#: src/gtkmm/canvasview.cpp:3313 +msgid "_Duplicate" +msgstr "_Duplicar" + +#: src/gtkmm/canvasview.cpp:3316 +msgid "_Remove" +msgstr "_Borrar" + +#: src/gtkmm/canvasview.cpp:3316 +#, c-format +msgid "_Remove %d Waypoints" +msgstr "_Borrar %d Interpolación" + +#: src/gtkmm/canvasview.cpp:3327 +msgid "_Both" +msgstr "_Ambos" + +#: src/gtkmm/canvasview.cpp:3328 +msgid "_In" +msgstr "_Entrada" + +#: src/gtkmm/canvasview.cpp:3329 +msgid "_Out" +msgstr "_Salida" + +#: src/gtkmm/canvasview.cpp:3560 src/synfigapp/canvasinterface.cpp:565 +msgid "Import Image" +msgstr "Importar imagen" + +#: src/gtkmm/cellrenderer_value.cpp:221 +msgid "Paragraph" +msgstr "Párrafo" + +#: src/gtkmm/cellrenderer_value.cpp:225 +msgid "Enter Paragraph Text Here:" +msgstr "Introduzca Texto del Párrafo Aquí" + +#: src/gtkmm/cellrenderer_value.cpp:411 +msgid "" +msgstr "" + +#: src/gtkmm/cellrenderer_value.cpp:441 src/gtkmm/iconcontroller.cpp:146 +msgid "Segment" +msgstr "Segmento" + +#: src/gtkmm/cellrenderer_value.cpp:448 +msgid "List" +msgstr "Lista" + +#: src/gtkmm/cellrenderer_value.cpp:451 src/gtkmm/iconcontroller.cpp:147 +msgid "BLine Point" +msgstr "Punto Línea Bézier" + +#: src/gtkmm/cellrenderer_value.cpp:454 +msgid "UNKNOWN" +msgstr "DESCONOCIDO" + +#: src/gtkmm/childrentree.cpp:93 src/gtkmm/dock_canvases.cpp:108 +#: src/synfigapp/actions/canvasadd.cpp:78 +msgid "ID" +msgstr "ID" + +#: src/gtkmm/childrentree.cpp:113 src/gtkmm/layertree.cpp:354 +#: src/synfigapp/actions/valuedescconvert.cpp:97 +msgid "Type" +msgstr "Tipo" + +#: src/gtkmm/childrentree.cpp:124 src/synfigapp/actions/layerparamset.cpp:80 +#: src/synfigapp/actions/valuedescset.cpp:96 +#: src/synfigapp/actions/valuenodeconstset.cpp:77 +msgid "ValueBase" +msgstr "Valor Base" + +#: src/gtkmm/childrentree.cpp:140 src/gtkmm/dock_timetrack.cpp:87 +#: src/gtkmm/iconcontroller.cpp:180 src/gtkmm/layertree.cpp:367 +msgid "Time Track" +msgstr "Línea de Tiempo" + +#: src/gtkmm/childrentreestore.cpp:78 +msgid "Canvases" +msgstr "Lienzos" + +#: src/gtkmm/childrentreestore.cpp:83 +msgid "ValueBase Nodes" +msgstr "Nodos de Valor Base" + +#: src/gtkmm/dialog_color.cpp:68 +msgid "Colors" +msgstr "Colores" + +#: src/gtkmm/dialog_gradient.cpp:65 +msgid "Gradient Editor" +msgstr "Editor de Gradiente" + +#: src/gtkmm/dialog_gradient.cpp:75 +msgid "Grab" +msgstr "Grabar" + +#: src/gtkmm/dialog_keyframe.cpp:59 +msgid "Keyframe Dialog" +msgstr "Diálogo de Fotograma Clave" + +#: src/gtkmm/dialog_preview.cpp:62 +msgid "Preview Window" +msgstr "Ventana de Previsualización" + +#: src/gtkmm/dialog_preview.cpp:88 +msgid "Preview Options" +msgstr "Opciones de Previsualización" + +#: src/gtkmm/dialog_preview.cpp:91 +msgid "_Begin Time" +msgstr "Tiempo de _Comienzo" + +#: src/gtkmm/dialog_preview.cpp:92 src/gtkmm/renddesc.cpp:556 +msgid "_End Time" +msgstr "Tiempo de _Fin" + +#: src/gtkmm/dialog_preview.cpp:106 +msgid "General Settings" +msgstr "Atributos Generales" + +#: src/gtkmm/dialog_preview.cpp:108 +msgid "General Settings" +msgstr "Preferencias Generales" + +#: src/gtkmm/dialog_preview.cpp:120 +msgid "_Zoom" +msgstr "_Ampliación" + +#: src/gtkmm/dialog_preview.cpp:129 src/gtkmm/renddesc.cpp:546 +msgid "_Frames per second" +msgstr "_Fotogramas por Segundo" + +#: src/gtkmm/dialog_preview.cpp:138 src/gtkmm/renddesc.cpp:532 +msgid "Time Settings" +msgstr "Preferencias de Tiempo" + +#: src/gtkmm/dialog_preview.cpp:140 src/gtkmm/renddesc.cpp:534 +msgid "Time Settings" +msgstr "Atributos de Tiempo" + +#: src/gtkmm/dialog_setup.cpp:73 +msgid "Synfig Studio Setup" +msgstr "Preferencias de Synfig Studio" + +#: src/gtkmm/dialog_setup.cpp:79 +msgid "Visually Linear Color Selection" +msgstr "Selección del Color de manera Visualmente Lineal" + +#: src/gtkmm/dialog_setup.cpp:81 +msgid "Use Only a Single Thread" +msgstr "Usar sólo un Simple Hilo" + +#: src/gtkmm/dialog_setup.cpp:83 +msgid "Restrict Real-Valued Ducks to Top Right Quadrant" +msgstr "Restringir Nodos de Valores Reales al Cuadrante Superior Derecho" + +#: src/gtkmm/dialog_setup.cpp:113 +msgid "Gamma" +msgstr "Gamma" + +#: src/gtkmm/dialog_setup.cpp:119 src/gtkmm/widget_coloredit.cpp:353 +msgid "Red" +msgstr "Rojo" + +#: src/gtkmm/dialog_setup.cpp:124 src/gtkmm/widget_coloredit.cpp:355 +msgid "Green" +msgstr "Verde" + +#: src/gtkmm/dialog_setup.cpp:129 src/gtkmm/widget_coloredit.cpp:357 +msgid "Blue" +msgstr "Azul" + +#: src/gtkmm/dialog_setup.cpp:133 +msgid "Black Level" +msgstr "Nivel de Negro" + +#: src/gtkmm/dialog_setup.cpp:144 +msgid "Misc." +msgstr "Misc." + +#: src/gtkmm/dialog_setup.cpp:150 +msgid "Timestamp" +msgstr "Formato Tiempo" + +#: src/gtkmm/dialog_setup.cpp:178 +msgid "Pixels" +msgstr "Píxeles" + +#: src/gtkmm/dialog_setup.cpp:179 +msgid "Points" +msgstr "Puntos" + +#: src/gtkmm/dialog_setup.cpp:180 +msgid "Inches" +msgstr "Pulgadas" + +#: src/gtkmm/dialog_setup.cpp:181 +msgid "Meters" +msgstr "Metros" + +#: src/gtkmm/dialog_setup.cpp:182 +msgid "Centimeters" +msgstr "Centímetros" + +#: src/gtkmm/dialog_setup.cpp:183 +msgid "Millimeters" +msgstr "Milímetros" + +#: src/gtkmm/dialog_setup.cpp:188 +msgid "Unit System" +msgstr "Sistema de Unidades" + +#: src/gtkmm/dialog_setup.cpp:194 +msgid "Recent Files" +msgstr "Archivos Recientes" + +#: src/gtkmm/dialog_setup.cpp:206 +msgid "Auto Backup Interval (0 to disable)" +msgstr "Intervalo de Copia de Seguridad Automatica (0 para deshabilitar)" + +#: src/gtkmm/dialog_setup.cpp:213 +msgid "Browser Command" +msgstr "Comando del Navegador" + +#: src/gtkmm/dialog_setup.cpp:218 +msgid "Document" +msgstr "Documento" + +#: src/gtkmm/dialog_setup.cpp:221 +msgid "New Document filename prefix" +msgstr "Prefijo de Fichero de Documento nuevo" + +#: src/gtkmm/dialog_setup.cpp:223 +msgid "File name prefix for the new created document" +msgstr "" +"Nombre de Fichero para el \n" +"nuevo documento creado" + +#: src/gtkmm/dialog_setup.cpp:227 +msgid "New Document X size" +msgstr "Tamaño X del Nuevo Documento" + +#: src/gtkmm/dialog_setup.cpp:229 +msgid "Width in pixels of the new created document" +msgstr "Ancho en pixels del nuevo Documento creado" + +#: src/gtkmm/dialog_setup.cpp:233 +msgid "New Document Y size" +msgstr "Tamaño Y del Nuevo Documento" + +#: src/gtkmm/dialog_setup.cpp:235 +msgid "High in pixels of the new created document" +msgstr "Alto en pixels del nuevo Documento creado" + +#: src/gtkmm/dialog_setup.cpp:239 +msgid "Predefined Resolutions:" +msgstr "Resoluciones Predefinidas" + +#: src/gtkmm/dialog_setup.cpp:244 +msgid "4096x3112 Full Aperture 4K" +msgstr "4096x3112 Apertura Total 4K" + +#: src/gtkmm/dialog_setup.cpp:245 +msgid "2048x1556 Full Aperture Native 2K" +msgstr "2048x1556 Full Apertura Nativa 2K" + +#: src/gtkmm/dialog_setup.cpp:246 +msgid "1920x1080 HDTV 1080p/i" +msgstr "1920x1080 HDTV 1080p/i" + +#: src/gtkmm/dialog_setup.cpp:247 +msgid "1280x720 HDTV 720p" +msgstr "1280x720 HDTV 720p" + +#: src/gtkmm/dialog_setup.cpp:248 +msgid "720x576 DVD PAL" +msgstr "720x576 DVD PAL" + +#: src/gtkmm/dialog_setup.cpp:249 +msgid "720x480 DVD NTSC" +msgstr "720x480 DVD NTSC" + +#: src/gtkmm/dialog_setup.cpp:250 +msgid "720x540 Web 720x" +msgstr "720x540 Web 720x" + +#: src/gtkmm/dialog_setup.cpp:251 +msgid "720x405 Web 720x HD" +msgstr "720x405 Web 720x HD" + +#: src/gtkmm/dialog_setup.cpp:252 +msgid "640x480 Web 640x" +msgstr "640x480 Web 640x" + +#: src/gtkmm/dialog_setup.cpp:253 +msgid "640x360 Web 640x HD" +msgstr "640x360 Web 640x HD" + +#: src/gtkmm/dialog_setup.cpp:254 +msgid "480x360 Web 480x" +msgstr "480x360 Web 480x" + +#: src/gtkmm/dialog_setup.cpp:255 +msgid "480x270 Web 480x HD" +msgstr "480x270 Web 480x HD" + +#: src/gtkmm/dialog_setup.cpp:256 +msgid "360x270 Web 360x" +msgstr "360x270 Web 360x" + +#: src/gtkmm/dialog_setup.cpp:257 +msgid "360x203 Web 360x HD" +msgstr "360x203 Web 360x HD" + +#: src/gtkmm/dialog_setup.h:49 +msgid "Custom Size" +msgstr "Tamaño Personalizado" + +#: src/gtkmm/dialog_soundselect.cpp:60 +msgid "Sound Select" +msgstr "Seleccionar Sonido" + +#: src/gtkmm/dialog_soundselect.cpp:67 +msgid "Sound Parameters" +msgstr "Parámetros de Sonido" + +#: src/gtkmm/dialog_soundselect.cpp:68 +msgid "Sound Parameters" +msgstr "Parámetros de Sonido" + +#: src/gtkmm/dialog_soundselect.cpp:76 +msgid "_Sound File" +msgstr "Archivo de _Sonido" + +#: src/gtkmm/dialog_soundselect.cpp:79 +msgid "Time _Offset" +msgstr "_Desfase de Tiempo" + +#: src/gtkmm/dialog_tooloptions.cpp:56 src/gtkmm/dialog_tooloptions.cpp:78 +msgid "Tool Options" +msgstr "Opciones de Herramienta" + +#: src/gtkmm/dialog_tooloptions.cpp:57 +msgid "This tool has no options" +msgstr "Esta herramienta no tiene opciones" + +#: src/gtkmm/dialog_waypoint.cpp:63 +msgid "Waypoint Editor" +msgstr "Editor de Interpolación" + +#: src/gtkmm/dockable.cpp:121 +msgid "X" +msgstr "X" + +#: src/gtkmm/dock_canvases.cpp:55 +msgid "Canvas Browser" +msgstr "Navegador de Lienzos" + +#: src/gtkmm/dock_children.cpp:67 src/gtkmm/iconcontroller.cpp:175 +msgid "Children" +msgstr "Descendientes" + +#: src/gtkmm/dock_curves.cpp:70 src/gtkmm/iconcontroller.cpp:176 +msgid "Curves" +msgstr "Curvas" + +#: src/gtkmm/dockdialog.cpp:115 +msgid "Dock Panel" +msgstr "Panel Empotrable" + +#: src/gtkmm/dockdialog.cpp:563 +msgid "Empty Dock Panel" +msgstr "Panel Empotrable Vacío" + +#: src/gtkmm/dock_history.cpp:69 src/gtkmm/dock_history.cpp:125 +msgid "History" +msgstr "Historial" + +#: src/gtkmm/dock_history.cpp:78 src/gtkmm/iconcontroller.cpp:172 +msgid "Clear Undo Stack" +msgstr "Vaciar Pila de Deshacer" + +#: src/gtkmm/dock_history.cpp:79 +msgid "Clear the undo stack" +msgstr "Vaciar la pila de deshacer" + +#: src/gtkmm/dock_history.cpp:89 src/gtkmm/iconcontroller.cpp:173 +msgid "Clear Redo Stack" +msgstr "Vaciar Pila de Rehacer" + +#: src/gtkmm/dock_history.cpp:90 +msgid "Clear the redo stack" +msgstr "Vaciar la pila de rehacer" + +#: src/gtkmm/dock_history.cpp:100 +msgid "Clear Undo and Redo Stacks" +msgstr "Vaciar Pilas de Deshacer y Rehacer" + +#: src/gtkmm/dock_history.cpp:101 +msgid "Clear the undo and redo stacks" +msgstr "Vaciar pilas de deshacer y de rehacer" + +#: src/gtkmm/dock_history.cpp:111 src/gtkmm/toolbox.cpp:294 +msgid "Undo" +msgstr "Deshacer" + +#: src/gtkmm/dock_history.cpp:112 +msgid "Undo the previous action" +msgstr "Deshacer la acción anterior" + +#: src/gtkmm/dock_history.cpp:119 src/gtkmm/toolbox.cpp:295 +msgid "Redo" +msgstr "Rehacer" + +#: src/gtkmm/dock_history.cpp:120 +msgid "Redo the previously undone action" +msgstr "Rehacer la acción previamente deshecha" + +#: src/gtkmm/dock_history.cpp:211 src/gtkmm/keyframetree.cpp:92 +msgid "Jump" +msgstr "Saltar" + +#: src/gtkmm/dock_history.cpp:216 src/gtkmm/keyframetree.cpp:96 +msgid "(JMP)" +msgstr "(SALTA)" + +#: src/gtkmm/dock_history.cpp:228 +msgid "Action" +msgstr "Acción" + +#: src/gtkmm/dock_history.cpp:275 src/gtkmm/dock_history.cpp:283 +#: src/gtkmm/dock_history.cpp:291 +msgid "Clear History" +msgstr "Borrar Historial" + +#: src/gtkmm/dock_history.cpp:276 +msgid "" +"You will not be able to undo any changes that you have made!\n" +"Are you sure you want to clear the undo stack?" +msgstr "" +"No podrá deshacer cualquier cambio que haya hecho!\n" +"¿Está seguro de que quieres vaciar la pila de deshacer?" + +#: src/gtkmm/dock_history.cpp:284 +msgid "" +"You will not be able to redo any changes that you have made!\n" +"Are you sure you want to clear the redo stack?" +msgstr "" +"No podrá rehacer cualquier cambio que haya hecho!\n" +"¿Está seguro de que quieres vaciar la pila de rehacer?" + +#: src/gtkmm/dock_history.cpp:292 +msgid "" +"You will not be able to undo or redo any changes that you have made!\n" +"Are you sure you want to clear the undo and redo stacks?" +msgstr "" +"No podrá deshacer o rehacer cualquier cambio que haya hecho!\n" +"¿Está seguro de que quiere vaciar las pilas de deshacer y rehacer?" + +#: src/gtkmm/dock_info.cpp:96 src/gtkmm/instance.cpp:550 +msgid "Info" +msgstr "Información" + +#: src/gtkmm/dock_info.cpp:103 +msgid "X: " +msgstr "X: " + +#: src/gtkmm/dock_info.cpp:104 +msgid "Y: " +msgstr "Y: " + +#: src/gtkmm/dock_info.cpp:114 +msgid "R: " +msgstr "R: " + +#: src/gtkmm/dock_info.cpp:115 +msgid "G: " +msgstr "G: " + +#: src/gtkmm/dock_info.cpp:116 +msgid "B: " +msgstr "B: " + +#: src/gtkmm/dock_info.cpp:117 +msgid "A: " +msgstr "A: " + +#: src/gtkmm/dock_keyframes.cpp:66 src/gtkmm/iconcontroller.cpp:177 +msgid "Keyframes" +msgstr "Fotogramas Clave" + +#: src/gtkmm/dock_layergroups.cpp:68 +msgid "Groups" +msgstr "Grupos" + +#: src/gtkmm/dock_layergroups.cpp:74 +msgid "Group Ops" +msgstr "Opciones de Grupo" + +#: src/gtkmm/dock_layergroups.cpp:76 src/gtkmm/groupactionmanager.cpp:175 +#: src/gtkmm/groupactionmanager.cpp:176 +msgid "Add a New Group" +msgstr "Añadir un Nuevo Grupo" + +#: src/gtkmm/dock_layers.cpp:74 +msgid "Layers" +msgstr "Capas" + +#: src/gtkmm/dock_layers.cpp:146 +msgid "Layer Ops" +msgstr "Opciones de Capa" + +#: src/gtkmm/dock_metadata.cpp:64 +msgid "Canvas MetaData" +msgstr "Meta Datos del Lienzo" + +#: src/gtkmm/dock_metadata.cpp:84 +msgid "Add new MetaData entry" +msgstr "Añadir una nueva entrada de Meta Dato" + +#: src/gtkmm/dock_metadata.cpp:94 +msgid "Remove selected MetaData entry" +msgstr "Borra la entrada de Meta Dato seleccionada" + +#: src/gtkmm/dock_navigator.cpp:496 src/gtkmm/iconcontroller.cpp:179 +msgid "Navigator" +msgstr "Navegador" + +#: src/gtkmm/dock_params.cpp:65 +msgid "Params" +msgstr "Parámetros" + +#: src/gtkmm/dock_timetrack.cpp:83 src/gtkmm/layergrouptree.cpp:75 +#: src/gtkmm/layertree.cpp:221 src/gtkmm/layertree.cpp:300 +#: src/synfigapp/actions/canvasnameset.cpp:82 +#: src/synfigapp/actions/valuedescexport.cpp:92 +#: src/synfigapp/actions/valuenodeadd.cpp:77 +#: src/synfigapp/actions/valuenoderename.cpp:86 +msgid "Name" +msgstr "Nombre" + +#: src/gtkmm/dock_timetrack.cpp:404 +msgid "Timetrack" +msgstr "Línea de Tiempo" + +#: src/gtkmm/groupactionmanager.cpp:269 +msgid "UnnamedGroup" +msgstr "Grupo Sin Nombre" + +#: src/gtkmm/iconcontroller.cpp:139 +msgid "Bool" +msgstr "Booleano" + +#: src/gtkmm/iconcontroller.cpp:140 +msgid "Integer" +msgstr "Entero" + +#: src/gtkmm/iconcontroller.cpp:141 +msgid "Angle" +msgstr "Ángulo" + +#: src/gtkmm/iconcontroller.cpp:143 +msgid "Real" +msgstr "Real" + +#: src/gtkmm/iconcontroller.cpp:144 +msgid "Vector" +msgstr "Vector" + +#: src/gtkmm/iconcontroller.cpp:145 +msgid "Color" +msgstr "Color" + +#: src/gtkmm/iconcontroller.cpp:148 src/gtkmm/iconcontroller.cpp:150 +#: src/gtkmm/iconcontroller.cpp:156 src/gtkmm/iconcontroller.cpp:157 +msgid "Rename" +msgstr "Renombar" + +#: src/gtkmm/iconcontroller.cpp:152 +msgid "Reset Colors" +msgstr "Restablecer Colores" + +#: src/gtkmm/iconcontroller.cpp:153 +msgid "Swap Colors" +msgstr "Intercambiar Colores" + +#: src/gtkmm/iconcontroller.cpp:154 +#: src/synfigapp/actions/layerparamconnect.cpp:80 +#: src/synfigapp/actions/valuenodedynamiclistloop.cpp:72 +#: src/synfigapp/actions/valuenodedynamiclistunloop.cpp:72 +#: src/synfigapp/actions/valuenoderemove.cpp:80 +msgid "ValueNode" +msgstr "Valor de Nodo" + +#: src/gtkmm/iconcontroller.cpp:155 +msgid "About" +msgstr "Acerca de" + +#: src/gtkmm/iconcontroller.cpp:159 src/gtkmm/toolbox.cpp:293 +msgid "Save All" +msgstr "Salvar Todo" + +#: src/gtkmm/iconcontroller.cpp:160 src/gtkmm/layergrouptreestore.cpp:920 +#: src/gtkmm/layertreestore.cpp:930 +#: src/synfigapp/actions/groupaddlayers.cpp:72 +#: src/synfigapp/actions/groupremovelayers.cpp:73 +#: src/synfigapp/actions/layeractivate.cpp:86 +#: src/synfigapp/actions/layerduplicate.cpp:81 +#: src/synfigapp/actions/layerencapsulate.cpp:81 +#: src/synfigapp/actions/layerlower.cpp:80 +#: src/synfigapp/actions/layermove.cpp:85 +#: src/synfigapp/actions/layerparamconnect.cpp:72 +#: src/synfigapp/actions/layerparamdisconnect.cpp:75 +#: src/synfigapp/actions/layerparamset.cpp:72 +#: src/synfigapp/actions/layerraise.cpp:80 +#: src/synfigapp/actions/layerremove.cpp:79 +#: src/synfigapp/actions/layersetdesc.cpp:85 +msgid "Layer" +msgstr "Capa" + +#: src/gtkmm/iconcontroller.cpp:161 +msgid "Paste Canvas" +msgstr "Lienzo Pegado" + +#: src/gtkmm/iconcontroller.cpp:165 +msgid "Hide Grid" +msgstr "Ocultar Rejilla" + +#: src/gtkmm/iconcontroller.cpp:166 +msgid "Enable Grid Snap" +msgstr "Habilitar Adherir a Rejilla" + +#: src/gtkmm/iconcontroller.cpp:167 +msgid "Disable Grid Snap" +msgstr "Deshabilitar Adherir a Rejilla" + +#: src/gtkmm/iconcontroller.cpp:168 +msgid "Duplicate" +msgstr "Duplicar" + +#: src/gtkmm/iconcontroller.cpp:169 +#: src/synfigapp/actions/layerencapsulate.cpp:52 +msgid "Encapsulate" +msgstr "Encapsular" + +#: src/gtkmm/iconcontroller.cpp:170 src/gtkmm/layeractionmanager.cpp:134 +msgid "Select All Child Layers" +msgstr "Seleccionar Todas las Capas Decendientes" + +#: src/gtkmm/iconcontroller.cpp:178 +msgid "MetaData" +msgstr "Meta Dato" + +#: src/gtkmm/iconcontroller.cpp:187 +msgid "CVS Add" +msgstr "Añadir CVS" + +#: src/gtkmm/iconcontroller.cpp:189 src/gtkmm/instance.cpp:490 +#: src/gtkmm/instance.cpp:501 +msgid "CVS Commit" +msgstr "Entrega CVS" + +#: src/gtkmm/iconcontroller.cpp:190 src/gtkmm/instance.cpp:592 +msgid "CVS Revert" +msgstr "Revertir CVS" + +#: src/gtkmm/iconcontroller.cpp:193 +msgid "Normal Tool" +msgstr "Herramienta Normal" + +#: src/gtkmm/iconcontroller.cpp:194 src/gtkmm/state_polygon.cpp:234 +#: src/gtkmm/state_polygon.cpp:273 +msgid "Polygon Tool" +msgstr "Herramienta Polígono" + +#: src/gtkmm/iconcontroller.cpp:195 src/gtkmm/state_bline.cpp:377 +#: src/gtkmm/state_bline.cpp:421 +msgid "BLine Tool" +msgstr "Herramienta Línea Bézier" + +#: src/gtkmm/iconcontroller.cpp:196 +msgid "Eyedrop Tool" +msgstr "Herramienta Recoge Color" + +#: src/gtkmm/iconcontroller.cpp:197 +msgid "Fill Tool" +msgstr "Herramienta de Relleno" + +#: src/gtkmm/iconcontroller.cpp:198 src/gtkmm/state_draw.cpp:433 +#: src/gtkmm/state_draw.cpp:519 +msgid "Draw Tool" +msgstr "Herramienta de Dibujo" + +#: src/gtkmm/iconcontroller.cpp:199 src/gtkmm/state_sketch.cpp:325 +#: src/gtkmm/state_sketch.cpp:399 +msgid "Sketch Tool" +msgstr "Herramienta de Boceto" + +#: src/gtkmm/iconcontroller.cpp:200 src/gtkmm/state_circle.cpp:402 +#: src/gtkmm/state_circle.cpp:475 +msgid "Circle Tool" +msgstr "Herramienta de Círculo" + +#: src/gtkmm/iconcontroller.cpp:201 src/gtkmm/state_rectangle.cpp:351 +#: src/gtkmm/state_rectangle.cpp:407 +msgid "Rectangle Tool" +msgstr "Herramienta de Rectángulo" + +#: src/gtkmm/iconcontroller.cpp:202 src/gtkmm/state_smoothmove.cpp:176 +msgid "SmoothMove Tool" +msgstr "Herramienta de Mover Suave" + +#: src/gtkmm/iconcontroller.cpp:203 src/gtkmm/state_scale.cpp:166 +#: src/gtkmm/state_scale.cpp:192 +msgid "Scale Tool" +msgstr "Herramienta de Escalar" + +#: src/gtkmm/iconcontroller.cpp:204 src/gtkmm/state_width.cpp:228 +#: src/gtkmm/state_width.cpp:304 +msgid "Width Tool" +msgstr "Herramienta de Espesor" + +#: src/gtkmm/iconcontroller.cpp:205 src/gtkmm/state_rotate.cpp:180 +#: src/gtkmm/state_rotate.cpp:207 +msgid "Rotate Tool" +msgstr "Heramienta de Rotar" + +#: src/gtkmm/iconcontroller.cpp:206 +msgid "Zoom Tool" +msgstr "Herramienta de Zoom" + +#: src/gtkmm/iconcontroller.cpp:207 +msgid "Info Tool" +msgstr "Herramienta de Información" + +#: src/gtkmm/iconcontroller.cpp:208 src/gtkmm/mod_mirror/state_mirror.cpp:185 +#: src/gtkmm/mod_mirror/state_mirror.cpp:213 +msgid "Mirror Tool" +msgstr "Herramienta de Espejo" + +#: src/gtkmm/iconcontroller.cpp:210 src/gtkmm/state_gradient.cpp:266 +#: src/gtkmm/state_gradient.cpp:326 +msgid "Gradient Tool" +msgstr "Herramienta de Gradiente" + +#: src/gtkmm/iconcontroller.cpp:211 src/gtkmm/state_star.cpp:443 +#: src/gtkmm/state_star.cpp:503 +msgid "Star Tool" +msgstr "Herramienta de Estrella" + +#: src/gtkmm/instance.cpp:232 src/gtkmm/instance.cpp:335 +#, c-format +msgid "Unable to save to '%s'" +msgstr "Imposible guardar a '%s'" + +#: src/gtkmm/instance.cpp:233 +msgid "Save - Error" +msgstr "Guardar - Error" + +#: src/gtkmm/instance.cpp:263 +msgid "" +"There is currently a bug when using \"SaveAs\"\n" +"on a composition that is being referenced by other\n" +"files that are currently open. Close these\n" +"other files first before trying to use \"SaveAs\"." +msgstr "" +"Actualmente hay un error cuando se usa \"Guardar Como\"\n" +"en una composición que está siendo refernciada por otro\n" +"fichero que está abierto en ese momento. Cierre esos\n" +"ficheros primero antes de intentar usar \"Guardar Como\"." + +#: src/gtkmm/instance.cpp:267 src/gtkmm/instance.cpp:318 +#: src/gtkmm/instance.cpp:336 +msgid "SaveAs - Error" +msgstr "Guardar Como - Error" + +#: src/gtkmm/instance.cpp:281 +msgid "Choose a Filename to Save As" +msgstr "Elija un Nombre de Archivo para Guardar Como" + +#: src/gtkmm/instance.cpp:299 +msgid "Unknown extension" +msgstr "Extensión desconocida" + +#: src/gtkmm/instance.cpp:300 +msgid "" +"You have given the file name an extension\n" +"which I do not recognize. Are you sure this is what you want?" +msgstr "" +"Ha dado una extensión al archivo desconocida.\n" +"¿Está seguro que es eso lo que quiere?" + +#: src/gtkmm/instance.cpp:317 +#, c-format +msgid "Unable to check whether '%s' exists." +msgstr "Imposible comprobar si '%s' existe." + +#: src/gtkmm/instance.cpp:323 +#, c-format +msgid "" +"A file named '%s' already exists.\n" +"\n" +"Do you want to replace it with the file you are saving?" +msgstr "" +"Un fichero llamado '%s' ya existe.\n" +"\n" +"Quiere reemplazarlo con el fuchero que está salvando?" + +#: src/gtkmm/instance.cpp:326 +msgid "File exists" +msgstr "El fichero existe" + +#: src/gtkmm/instance.cpp:481 +msgid "You must first add this composition to the repository" +msgstr "Debe añadir antes esta composición al repositorio" + +#: src/gtkmm/instance.cpp:490 src/gtkmm/instance.cpp:559 +msgid "This will save any changes you have made. Are you sure?" +msgstr "Esto guardará cualquier cambio que haya hecho. ¿Está seguro?" + +#: src/gtkmm/instance.cpp:497 +msgid "" +"The local copy of the file hasn't been changed since the last update.\n" +"Nothing to commit!" +msgstr "" +"La copia local del archivo no ha sido cambiado desde la última " +"actualización.\n" +"¡Nada que enviar!" + +#: src/gtkmm/instance.cpp:501 +msgid "Enter a log message describing the changes you have made" +msgstr "" +"Introduzca un mensaje de diario describiendo los cambios que ha realizado" + +#: src/gtkmm/instance.cpp:509 +msgid "An error has occurred when trying to COMMIT" +msgstr "Ha ocurrido un error intentando ENVIAR" + +#: src/gtkmm/instance.cpp:520 +msgid "This composition has already been added to the repository" +msgstr "La composición ya ha sido enviada al repositorio" + +#: src/gtkmm/instance.cpp:534 +msgid "An error has occurred when trying to ADD" +msgstr "Un error ha ocurrido cuando se intentaba AÑADIR" + +#: src/gtkmm/instance.cpp:545 +msgid "" +"This file is not under version control, so there is nothing to update from!" +msgstr "" +"Este archivo no está actualmente bajo control de versión, así que ¡nada que " +"actualizar!" + +#: src/gtkmm/instance.cpp:550 +msgid "This file is up-to-date" +msgstr "Este archivo está actualizado" + +#: src/gtkmm/instance.cpp:575 src/gtkmm/instance.cpp:611 +msgid "An error has occurred when trying to UPDATE" +msgstr "Ha ocurrido un error cuando trataba de ACTUALIZAR" + +#: src/gtkmm/instance.cpp:586 +msgid "" +"This file is not under version control, so there is nothing to revert to!" +msgstr "" +"Este archivo no está actualmente bajo control de versión, así que ¡nada que " +"desactualizar!" + +#: src/gtkmm/instance.cpp:593 +msgid "" +"This will abandon all changes you have made\n" +"since the last time you performed a commit\n" +"operation. This cannot be undone! Are you sure\n" +"you want to do this?" +msgstr "" +"Esto abandonará todos los cambios que ha hecho\n" +"desde la última operación de envío realizada.\n" +"¡Esto no se puede deshacer! ¿Está seguro que \n" +"quiere hacer esto?" + +#: src/gtkmm/instance.cpp:602 +msgid "Unable to remove previous version" +msgstr "Imposible eliminar versión anterior" + +#: src/gtkmm/instance.cpp:630 +msgid "Error: Revert Failed" +msgstr "Error: Desactualización Fallida" + +#: src/gtkmm/instance.cpp:630 +msgid "" +"The revert operation has failed. This can be due to it being\n" +"referenced by another composition that is already open, or\n" +"because of an internal error in Synfig Studio. Try closing any\n" +"compositions that might reference this composition and try\n" +"again, or restart Synfig Studio." +msgstr "" +"La operación de desactualización ha fallado. Esto se puede deber\n" +" a que está referenciado por otra composición que esta actualmente \n" +"abierta o porque hay un error interno en Synfig Studio. Intente\n" +"cerrar cualquier composición que pueda hacer referencia a esta\n" +" y pruebe de nuevo o reinicie Synfig Studio." + +#: src/gtkmm/instance.cpp:658 +msgid "Revert to saved" +msgstr "Descatualizar a Salvado" + +#: src/gtkmm/instance.cpp:658 +msgid "" +"You will lose any changes you have made since your last save.\n" +"Are you sure?" +msgstr "" +"Se perderán los cambios realizados hasta la última vez que guardó.\n" +"¿Está seguro?" + +#: src/gtkmm/instance.cpp:681 +#, c-format +msgid "Would you like to save your changes to %s?" +msgstr "¿Quiere guardar los cambios a %s?" + +#: src/gtkmm/instance.cpp:697 +#, c-format +msgid "" +"%s has changes not yet on the CVS repository.\n" +"Would you like to commit these changes?" +msgstr "" +"%s no ha cambiado en el repositorio CVS.\n" +"¿Quiere enviar dichos cambios?" + +#: src/gtkmm/instance.cpp:1103 +msgid "Edit Waypoint" +msgstr "Editar Interpolación" + +#: src/gtkmm/instance.cpp:1144 +msgid "Set Waypoints" +msgstr "Establecer Interpolación" + +#: src/gtkmm/instance.cpp:1189 +msgid "Unable to convert to animated waypoint" +msgstr "Imposible convertir a una interpolación animada" + +#: src/gtkmm/instance.cpp:1206 +msgid "Unable to find waypoint_set_smart action" +msgstr "Imposible encotrar acción de establecer_interpolación_inteligente" + +#: src/gtkmm/instance.cpp:1219 +msgid "Unable to set a specific waypoint" +msgstr "Imposible establecer una interpolación especificada" + +#: src/gtkmm/instance.cpp:1247 +msgid "Edit Waypoints" +msgstr "Editar Interpolaciones" + +#: src/gtkmm/instance.h:41 +msgid "Synfig Animation " +msgstr "Animación Synfig " + +#: src/gtkmm/keyframeactionmanager.cpp:221 +msgid "Add New Keyframe" +msgstr "Añadir un nuevo Fotograma Clave" + +#: src/gtkmm/keyframetree.cpp:77 +msgid "Length" +msgstr "Longitud" + +#: src/gtkmm/keyframetree.cpp:108 +#: src/synfigapp/actions/canvasdescriptionset.cpp:82 +msgid "Description" +msgstr "Descripción" + +#: src/gtkmm/keyframetreestore.cpp:795 src/gtkmm/keyframetreestore.cpp:810 +msgid "Unable to find Keyframe in table" +msgstr "Imposible encontrar un Fotograma Clave en la tabla" + +#: src/gtkmm/keyframetreestore.cpp:801 +msgid "There are no keyframes n this canvas" +msgstr "No hay fotogramas clave en este lienzo" + +#: src/gtkmm/layeractionmanager.cpp:128 +msgid "Amount" +msgstr "Cantidad" + +#: src/gtkmm/layeractionmanager.cpp:364 +msgid "Paste" +msgstr "Pegar" + +#: src/gtkmm/layeractionmanager.cpp:450 +#: src/synfigapp/actions/layerduplicate.cpp:178 +#: src/synfigapp/canvasinterface.cpp:202 +#, c-format +msgid "Index %d" +msgstr "Índice %d" + +#: src/gtkmm/layergrouptree.cpp:64 src/gtkmm/layergrouptree.cpp:69 +#: src/gtkmm/layertree.cpp:193 +msgid " " +msgstr " " + +#: src/gtkmm/layergrouptreestore.cpp:442 +msgid "Activate " +msgstr "Activar " + +#: src/gtkmm/layergrouptreestore.cpp:442 +msgid "Deactivate " +msgstr "Desactivar " + +#: src/gtkmm/layergrouptreestore.cpp:566 +msgid "Regroup" +msgstr "Reagrupar" + +#: src/gtkmm/layerparamtreestore.cpp:234 +msgid "Set Layer Params" +msgstr "Establecer los Parámetros de Capa" + +#: src/gtkmm/layerparamtreestore.cpp:246 +msgid "Unable to set all layer parameters." +msgstr "Imposible establecer todos los parámetros de capa." + +#: src/gtkmm/layertree.cpp:206 src/gtkmm/layertree.cpp:249 +msgid "Z" +msgstr "Z" + +#: src/gtkmm/layertree.cpp:334 +msgid "Value" +msgstr "Valor" + +#: src/gtkmm/layertreestore.cpp:462 +msgid "Move Layers" +msgstr "Mover Capas" + +#: src/gtkmm/main.cpp:73 +msgid "synfig studio is already running" +msgstr "Synfig Studio ya está ejecutandose" + +#: src/gtkmm/main.cpp:74 +msgid "the existing process will be used" +msgstr "el proceso existente será usado" + +#: src/gtkmm/main.cpp:93 +msgid "synfig studio -- starting up application..." +msgstr "Synfig Studio: iniciando aplicación..." + +#: src/gtkmm/mod_mirror/state_mirror.cpp:181 +msgid "Horizontal" +msgstr "Horizontal" + +#: src/gtkmm/mod_mirror/state_mirror.cpp:182 +msgid "Vertical" +msgstr "Vertical" + +#: src/gtkmm/mod_palette/dock_palbrowse.cpp:56 +msgid "Palette Browser" +msgstr "Navegador de Paleta" + +#: src/gtkmm/mod_palette/dock_paledit.cpp:120 +msgid "Palette Editor" +msgstr "Editor de Paleta" + +#: src/gtkmm/mod_palette/dock_paledit.cpp:128 +msgid "Add Color" +msgstr "Añadir Color" + +#: src/gtkmm/mod_palette/dock_paledit.cpp:129 +msgid "" +"Add current foreground color\n" +"to the palette" +msgstr "" +"Añadir color de frente actual\n" +"a la paleta" + +#: src/gtkmm/mod_palette/dock_paledit.cpp:211 +msgid "Load Default Palette" +msgstr "Cargar Paleta por Defecto" + +#: src/gtkmm/onemoment.cpp:91 src/gtkmm/onemoment.cpp:93 +msgid "One Moment, Please..." +msgstr "Un momento, Por Favor..." + +#: src/gtkmm/preview.cpp:352 +msgid "Toggle Looping" +msgstr "Alternar Bucle" + +#: src/gtkmm/preview.cpp:376 +msgid "Halt Render" +msgstr "Parar Render" + +#: src/gtkmm/preview.cpp:382 +msgid "Re-Preview" +msgstr "Re-Previsualizar" + +#: src/gtkmm/preview.cpp:388 +msgid "Erase All" +msgstr "Borrar Todo" + +#: src/gtkmm/preview.cpp:398 +msgid "Last Rendered: " +msgstr "Último Render: " + +#: src/gtkmm/renddesc.cpp:95 +msgid "Image" +msgstr "Imagen" + +#: src/gtkmm/renddesc.cpp:97 +msgid "Other" +msgstr "Otro" + +#: src/gtkmm/renddesc.cpp:390 +msgid "_Pixel Aspect" +msgstr "_Aspecto del Pixel" + +#: src/gtkmm/renddesc.cpp:392 +msgid "Pi_xel Width" +msgstr "Ancho del _Pixel" + +#: src/gtkmm/renddesc.cpp:394 +msgid "Pix_el Height" +msgstr "Al_tura del Pixel" + +#: src/gtkmm/renddesc.cpp:396 +msgid "Image _Aspect" +msgstr "Aspecto de la _Imagen" + +#: src/gtkmm/renddesc.cpp:398 +msgid "Image _Width" +msgstr "Anchura de la Ima_gen" + +#: src/gtkmm/renddesc.cpp:400 +msgid "Image _Height" +msgstr "Al_tura de la Imagen" + +#: src/gtkmm/renddesc.cpp:402 +msgid "Image _Span" +msgstr "_Escalado Imagen" + +#: src/gtkmm/renddesc.cpp:442 +msgid "Image Size" +msgstr "Tamaño de Imagen" + +#: src/gtkmm/renddesc.cpp:444 +msgid "Image Size" +msgstr "Tamaño de Imagen" + +#: src/gtkmm/renddesc.cpp:455 +msgid "_Width" +msgstr "_Ancho" + +#: src/gtkmm/renddesc.cpp:458 +msgid "_Height" +msgstr "Al_to" + +#: src/gtkmm/renddesc.cpp:461 +msgid "_XRes" +msgstr "_XRes" + +#: src/gtkmm/renddesc.cpp:464 +msgid "_YRes" +msgstr "_YRes" + +#: src/gtkmm/renddesc.cpp:467 +msgid "_Physical Width" +msgstr "Ancho _Físico" + +#: src/gtkmm/renddesc.cpp:470 +msgid "Phy_sical Height" +msgstr "Alto Físi_co" + +#: src/gtkmm/renddesc.cpp:473 +msgid "I_mage Span" +msgstr "Expansión de la I_magen" + +#: src/gtkmm/renddesc.cpp:494 +msgid "Image Area" +msgstr "Área de la Imagen" + +#: src/gtkmm/renddesc.cpp:496 +msgid "Image Area" +msgstr "Área de la Imagen" + +#: src/gtkmm/renddesc.cpp:508 +msgid "_Top Left" +msgstr "Superior _Izda." + +#: src/gtkmm/renddesc.cpp:511 +msgid "_Bottom Right" +msgstr "Inferior _Dcha." + +#: src/gtkmm/renddesc.cpp:551 +msgid "_Start Time" +msgstr "_Tiempo de Comienzo" + +#: src/gtkmm/renddesc.cpp:574 +msgid "Locks and Links" +msgstr "Bloqueos y Enlaces" + +#: src/gtkmm/renddesc.cpp:576 +msgid "Locks and Links" +msgstr "Bloqueos y Enlaces" + +#: src/gtkmm/renddesc.cpp:597 +msgid "Focus Point" +msgstr "Punto de Foco" + +#: src/gtkmm/renddesc.cpp:599 +msgid "Focus Point" +msgstr "Punto de Foco" + +#: src/gtkmm/renddesc.cpp:609 +msgid "_Focus Point" +msgstr "Punto de _Foco" + +#: src/gtkmm/render.cpp:61 src/gtkmm/render.cpp:177 +msgid "Render Settings" +msgstr "Atributos de Muestreo" + +#: src/gtkmm/render.cpp:67 +msgid "Use _current frame" +msgstr "Usar fotogra_ma actual" + +#: src/gtkmm/render.cpp:77 +msgid "Auto" +msgstr "Auto" + +#: src/gtkmm/render.cpp:101 +msgid "Choose..." +msgstr "Elegir..." + +#: src/gtkmm/render.cpp:105 +msgid "Target" +msgstr "Tipo" + +#: src/gtkmm/render.cpp:107 +msgid "Target" +msgstr "Tipo" + +#: src/gtkmm/render.cpp:118 +msgid "_Filename" +msgstr "_Nombre Archivo" + +#: src/gtkmm/render.cpp:125 +msgid "_Target" +msgstr "_Tipo" + +#: src/gtkmm/render.cpp:133 +msgid "Settings" +msgstr "Preferencias" + +#: src/gtkmm/render.cpp:135 +msgid "Settings" +msgstr "Preferencias" + +#: src/gtkmm/render.cpp:147 +msgid "_Quality" +msgstr "_Calidad" + +#: src/gtkmm/render.cpp:153 +msgid "_Anti-Aliasing" +msgstr "_Anti-Aliasing" + +#: src/gtkmm/render.cpp:247 +msgid "You must supply a filename!" +msgstr "¡Debe suminstrar un nombre de archivo!" + +#: src/gtkmm/render.cpp:273 +msgid "Unable to determine proper target from filename." +msgstr "Imposible determinar el objetivo adecuado desde el nombre de archivo." + +#: src/gtkmm/render.cpp:280 +msgid "A filename is required for this target" +msgstr "Un nombre de archivo es requerido para este objetivo" + +#: src/gtkmm/render.cpp:287 +msgid "Unable to create target for " +msgstr "Imposible crear objetivo para " + +#: src/gtkmm/render.cpp:304 +msgid "Target initialization failure" +msgstr "Fallo de inicialización de objetivo" + +#: src/gtkmm/render.cpp:308 +msgid "Rendering " +msgstr "Mostrando " + +#: src/gtkmm/render.cpp:336 +msgid "File rendered successfully" +msgstr "Archivo mostrado existosamente" + +#: src/gtkmm/splash.cpp:113 +msgid "ERROR:" +msgstr "ERROR:" + +#: src/gtkmm/splash.cpp:129 +msgid "WARNING:" +msgstr "AVISO:" + +#: src/gtkmm/state_bline.cpp:361 src/gtkmm/state_circle.cpp:394 +#: src/gtkmm/state_draw.cpp:413 src/gtkmm/state_rectangle.cpp:341 +#: src/gtkmm/state_star.cpp:432 +msgid "Create Region BLine" +msgstr "Crear Región" + +#: src/gtkmm/state_bline.cpp:362 src/gtkmm/state_circle.cpp:395 +#: src/gtkmm/state_draw.cpp:414 src/gtkmm/state_rectangle.cpp:342 +#: src/gtkmm/state_star.cpp:433 +msgid "Create Outline BLine" +msgstr "Crear Contorno" + +#: src/gtkmm/state_bline.cpp:363 src/gtkmm/state_circle.cpp:396 +#: src/gtkmm/state_rectangle.cpp:343 src/gtkmm/state_star.cpp:434 +msgid "Create Curve Gradient BLine" +msgstr "Crear Gradiente Curvado" + +#: src/gtkmm/state_bline.cpp:364 src/gtkmm/state_circle.cpp:397 +#: src/gtkmm/state_rectangle.cpp:344 src/gtkmm/state_star.cpp:435 +msgid "Create Plant BLine" +msgstr "Crear Planta" + +#: src/gtkmm/state_bline.cpp:365 +msgid "Link Origins" +msgstr "Enlazar Orígenes" + +#: src/gtkmm/state_bline.cpp:366 src/gtkmm/state_draw.cpp:415 +msgid "Auto Export" +msgstr "Auto Exportar" + +#: src/gtkmm/state_bline.cpp:367 src/gtkmm/state_polygon.cpp:228 +msgid "Make" +msgstr "Crear" + +#: src/gtkmm/state_bline.cpp:368 +msgid "Clear" +msgstr "Borrar" + +#: src/gtkmm/state_bline.cpp:385 src/gtkmm/state_draw.cpp:450 +msgid "Feather" +msgstr "Desvanecimiento" + +#: src/gtkmm/state_bline.cpp:426 +msgid "Make BLine and/or Region" +msgstr "Hacer Linea Bézier, Planta y/o Región" + +#: src/gtkmm/state_bline.cpp:436 +msgid "Clear current BLine" +msgstr "Borrar Línea Bézier actual" + +#: src/gtkmm/state_bline.cpp:541 +msgid "New BLine" +msgstr "Nueva Línea Bézier" + +#: src/gtkmm/state_bline.cpp:584 +msgid "Unable to add value node" +msgstr "Imposible añadir valor de nodo" + +#: src/gtkmm/state_bline.cpp:626 src/gtkmm/state_circle.cpp:638 +#: src/gtkmm/state_rectangle.cpp:556 src/gtkmm/state_star.cpp:684 +msgid " Gradient" +msgstr "Gradiente" + +#: src/gtkmm/state_bline.cpp:645 src/gtkmm/state_bline.cpp:668 +#: src/gtkmm/state_circle.cpp:662 src/gtkmm/state_circle.cpp:685 +#: src/gtkmm/state_rectangle.cpp:575 src/gtkmm/state_rectangle.cpp:598 +#: src/gtkmm/state_star.cpp:703 src/gtkmm/state_star.cpp:726 +msgid "Unable to create Gradient layer" +msgstr "Imposible crear una Capa Gradiente" + +#: src/gtkmm/state_bline.cpp:685 src/gtkmm/state_circle.cpp:702 +#: src/gtkmm/state_rectangle.cpp:615 src/gtkmm/state_star.cpp:743 +msgid " Plant" +msgstr "Planta" + +#: src/gtkmm/state_bline.cpp:704 src/gtkmm/state_bline.cpp:727 +#: src/gtkmm/state_circle.cpp:726 src/gtkmm/state_circle.cpp:749 +#: src/gtkmm/state_rectangle.cpp:634 src/gtkmm/state_rectangle.cpp:657 +#: src/gtkmm/state_star.cpp:762 src/gtkmm/state_star.cpp:785 +msgid "Unable to create Plant layer" +msgstr "Imposible crear una Capa Planta" + +#: src/gtkmm/state_bline.cpp:744 src/gtkmm/state_circle.cpp:766 +#: src/gtkmm/state_draw.cpp:1058 src/gtkmm/state_draw.cpp:1977 +#: src/gtkmm/state_rectangle.cpp:674 src/gtkmm/state_star.cpp:802 +msgid " Region" +msgstr "Region" + +#: src/gtkmm/state_bline.cpp:774 src/gtkmm/state_bline.cpp:797 +#: src/gtkmm/state_circle.cpp:801 src/gtkmm/state_circle.cpp:824 +#: src/gtkmm/state_draw.cpp:1800 src/gtkmm/state_draw.cpp:1993 +#: src/gtkmm/state_rectangle.cpp:704 src/gtkmm/state_rectangle.cpp:727 +#: src/gtkmm/state_star.cpp:832 src/gtkmm/state_star.cpp:855 +msgid "Unable to create Region layer" +msgstr "Imposible crear una capa Región" + +#: src/gtkmm/state_bline.cpp:814 src/gtkmm/state_circle.cpp:839 +#: src/gtkmm/state_draw.cpp:1053 src/gtkmm/state_rectangle.cpp:742 +#: src/gtkmm/state_star.cpp:870 +msgid " Outline" +msgstr "Contorno" + +#: src/gtkmm/state_bline.cpp:838 src/gtkmm/state_bline.cpp:861 +#: src/gtkmm/state_circle.cpp:869 src/gtkmm/state_circle.cpp:892 +#: src/gtkmm/state_rectangle.cpp:767 src/gtkmm/state_rectangle.cpp:790 +#: src/gtkmm/state_star.cpp:895 src/gtkmm/state_star.cpp:918 +msgid "Unable to create Outline layer" +msgstr "Imposible crear una Capa Contorno" + +#: src/gtkmm/state_bline.cpp:1250 +msgid "Unloop BLine" +msgstr "Quitar Bucle" + +#: src/gtkmm/state_bline.cpp:1254 +msgid "Loop BLine" +msgstr "Hacer Bucle" + +#: src/gtkmm/state_bline.cpp:1259 +msgid "Delete Vertex" +msgstr "Borrar Vértice" + +#: src/gtkmm/state_bline.cpp:1274 +msgid "Insert Vertex" +msgstr "Insertar Vértice" + +#: src/gtkmm/state_bline.cpp:1336 +msgid "" +"Unable to find where to insert vertex, internal error, please report this bug" +msgstr "" +"Imposible encontrar donde insertar el vértice, error interno, por favor " +"reporte este bug" + +#: src/gtkmm/state_bline.cpp:1355 +msgid "Unable to remove vertex, internal error, please report this bug" +msgstr "Imposible borrar el vértice, error interno, por favor reporte este bug" + +#: src/gtkmm/state_bline.cpp:1369 +#: src/synfigapp/actions/blinepointtangentmerge.cpp:56 +msgid "Merge Tangents" +msgstr "Mezclar tangentes" + +#: src/gtkmm/state_bline.cpp:1376 +#: src/synfigapp/actions/blinepointtangentsplit.cpp:56 +msgid "Split Tangents" +msgstr "Dividir Tangentes" + +#: src/gtkmm/state_circle.cpp:392 src/gtkmm/state_rectangle.cpp:339 +#: src/gtkmm/state_star.cpp:429 +msgid "Invert" +msgstr "Invertir" + +#: src/gtkmm/state_circle.cpp:393 +msgid "Create Circle Layer" +msgstr "Crear Capa Círculo" + +#: src/gtkmm/state_circle.cpp:398 src/gtkmm/state_rectangle.cpp:345 +#: src/gtkmm/state_star.cpp:436 +msgid "Link BLine Origins" +msgstr "Enlazar Orígenes de Líneas Bézier" + +#: src/gtkmm/state_circle.cpp:406 +msgid "Falloff" +msgstr "Caída" + +#: src/gtkmm/state_circle.cpp:407 +msgid "Determines the falloff function for the feather" +msgstr "Determina la funcíon de caída del desvanecimiento" + +#: src/gtkmm/state_circle.cpp:409 src/gtkmm/state_gradient.cpp:273 +#: src/gtkmm/widget_waypoint.cpp:88 src/gtkmm/widget_waypoint.cpp:95 +#: src/gtkmm/widget_waypointmodel.cpp:74 src/gtkmm/widget_waypointmodel.cpp:81 +msgid "Linear" +msgstr "Linear" + +#: src/gtkmm/state_circle.cpp:410 +msgid "Squared" +msgstr "Proporcional" + +#: src/gtkmm/state_circle.cpp:411 +msgid "Square Root" +msgstr "Raíz cuadrada" + +#: src/gtkmm/state_circle.cpp:412 +msgid "Sigmond" +msgstr "Sigmoidea" + +#: src/gtkmm/state_circle.cpp:413 +msgid "Cosine" +msgstr "Coseno" + +#: src/gtkmm/state_circle.cpp:417 src/gtkmm/state_gradient.cpp:280 +msgid "Blend Method" +msgstr "Método de Mezcla" + +#: src/gtkmm/state_circle.cpp:418 +msgid "Defines the blend method to be used for circles" +msgstr "Define el método de mezcla usado para círculos" + +#: src/gtkmm/state_circle.cpp:424 src/gtkmm/state_rectangle.cpp:359 +#: src/gtkmm/state_star.cpp:445 +msgid "Feather:" +msgstr "Desvanecimiento:" + +#: src/gtkmm/state_circle.cpp:437 +msgid "BLine Points:" +msgstr "Punto Línea Bézier:" + +#: src/gtkmm/state_circle.cpp:439 +msgid "Point Angle Offset:" +msgstr "Desfase Angular de los Puntos" + +#: src/gtkmm/state_circle.cpp:526 +msgid "New Circle" +msgstr "Nuevo Círculo" + +#: src/gtkmm/state_draw.cpp:409 +msgid "Pressure Width" +msgstr "Presión del Espesor" + +#: src/gtkmm/state_draw.cpp:410 +msgid "Auto Loop" +msgstr "Auto Bucle" + +#: src/gtkmm/state_draw.cpp:411 +msgid "Auto Extend" +msgstr "Auto Extender" + +#: src/gtkmm/state_draw.cpp:412 +msgid "Auto Link" +msgstr "Auto Enlazar" + +#: src/gtkmm/state_draw.cpp:416 src/gtkmm/state_draw.cpp:524 +msgid "Fill Last Stroke" +msgstr "Rellenar Último Trazo" + +#: src/gtkmm/state_draw.cpp:419 +msgid "Min Pressure" +msgstr "Mínima Presión" + +#: src/gtkmm/state_draw.cpp:425 +msgid "LocalError" +msgstr "Error Local" + +#: src/gtkmm/state_draw.cpp:447 +msgid "Smooth" +msgstr "Suave" + +#: src/gtkmm/state_draw.cpp:778 +msgid "Sketch BLine" +msgstr "Esbozar Línea Bézier" + +#: src/gtkmm/state_draw.cpp:1088 +msgid "Unable to create layer" +msgstr "Imposible crear capa" + +#: src/gtkmm/state_draw.cpp:1272 +msgid "Define Region" +msgstr "Definir Region" + +#: src/gtkmm/state_draw.cpp:1834 src/gtkmm/state_draw.cpp:1885 +msgid "Extend BLine" +msgstr "Extender Línea Béizer" + +#: src/gtkmm/state_draw.cpp:1847 src/gtkmm/state_draw.cpp:1898 +msgid "Unable to set loop for bline" +msgstr "Imposible hacer bucle para la línea béizer" + +#: src/gtkmm/state_draw.cpp:1871 src/gtkmm/state_draw.cpp:1922 +msgid "Unable to insert item" +msgstr "Imposible insertar elemento" + +#: src/gtkmm/state_draw.cpp:1955 +msgid "Fill Stroke" +msgstr "Rellenar Trazo" + +#: src/gtkmm/state_fill.cpp:145 +msgid "No layer here" +msgstr "No hay capa aquí" + +#: src/gtkmm/state_fill.cpp:155 +msgid "Unable to set layer color" +msgstr "Imposible establecer color de capa" + +#: src/gtkmm/state_gradient.cpp:270 +msgid "Gradient Type" +msgstr "Tipo de Gradiente" + +#: src/gtkmm/state_gradient.cpp:271 +msgid "Determines the type of Gradient used" +msgstr "Determina el tipo de Gradiente usado" + +#: src/gtkmm/state_gradient.cpp:274 +msgid "Radial" +msgstr "Radial" + +#: src/gtkmm/state_gradient.cpp:275 +msgid "Conical" +msgstr "Cónico" + +#: src/gtkmm/state_gradient.cpp:276 +msgid "Spiral" +msgstr "Espiral" + +#: src/gtkmm/state_gradient.cpp:281 +msgid "The blend method the gradient will use" +msgstr "El método de mezcla que el gradiente usará" + +#: src/gtkmm/state_gradient.cpp:382 +msgid "New Gradient" +msgstr "Nuevo Gradiente" + +#: src/gtkmm/state_polygon.cpp:278 +msgid "Make Polygon" +msgstr "Crear Polígono" + +#: src/gtkmm/state_polygon.cpp:288 +msgid "Clear current Polygon" +msgstr "Borrar Polígono actual" + +#: src/gtkmm/state_polygon.cpp:370 +msgid "New Polygon" +msgstr "Nuevo Polígono" + +#: src/gtkmm/state_rectangle.cpp:340 +msgid "Create Rectangle Layer" +msgstr "Crear Capa Rectángulo" + +#: src/gtkmm/state_rectangle.cpp:355 +msgid "Expansion:" +msgstr "Expansión" + +#: src/gtkmm/state_rectangle.cpp:459 +msgid "New Rectangle" +msgstr "Nuevo Rectángulo" + +#: src/gtkmm/state_rotate.cpp:175 +msgid "Allow Scale" +msgstr "Permitir Escalar" + +#: src/gtkmm/state_rotate.cpp:369 +msgid "Move Duck" +msgstr "Mover Nodo" + +#: src/gtkmm/state_rotate.cpp:374 +msgid "Rotate Ducks" +msgstr "Rotar Nodos" + +#: src/gtkmm/state_scale.cpp:163 +msgid "Lock Aspect Ratio" +msgstr "Bloquear Relación de Aspecto" + +#: src/gtkmm/state_sketch.cpp:158 src/gtkmm/state_sketch.cpp:239 +msgid "Save Sketch" +msgstr "Guardar Boceto" + +#: src/gtkmm/state_sketch.cpp:168 +msgid "Unable to save sketch" +msgstr "Imposible guardar boceto" + +#: src/gtkmm/state_sketch.cpp:177 src/gtkmm/state_sketch.cpp:240 +msgid "Load Sketch" +msgstr "Cargar Boceto" + +#: src/gtkmm/state_sketch.cpp:187 +msgid "Unable to load sketch" +msgstr "Imposible cargar boceto" + +#: src/gtkmm/state_sketch.cpp:237 src/gtkmm/state_sketch.cpp:268 +#: src/gtkmm/state_sketch.cpp:269 +msgid "Clear Sketch" +msgstr "Borrar Boceto" + +#: src/gtkmm/state_sketch.cpp:238 +msgid "Undo Stroke" +msgstr "Deshacer Trazo" + +#: src/gtkmm/state_sketch.cpp:241 +msgid "Show Sketch" +msgstr "Mostrar Boceto" + +#: src/gtkmm/state_sketch.cpp:256 src/gtkmm/state_sketch.cpp:257 +msgid "Undo Last Stroke" +msgstr "Deshacer Último Trazo" + +#: src/gtkmm/state_sketch.cpp:280 src/gtkmm/state_sketch.cpp:281 +#: src/gtkmm/state_sketch.cpp:292 src/gtkmm/state_sketch.cpp:293 +msgid "Save Sketch As..." +msgstr "Guardar Boceto Como..." + +#: src/gtkmm/state_sketch.cpp:304 src/gtkmm/state_sketch.cpp:305 +msgid "Open a Sketch" +msgstr "Abrir un Boceto" + +#: src/gtkmm/state_smoothmove.cpp:177 +msgid "Radius" +msgstr "Radio" + +#: src/gtkmm/state_smoothmove.cpp:203 +msgid "Smooth Move" +msgstr "Mover Suave" + +#: src/gtkmm/state_star.cpp:430 +msgid "Regular Polygon" +msgstr "Polígono Regular" + +#: src/gtkmm/state_star.cpp:431 +msgid "Create Star Layer" +msgstr "Crear Capa Estrella" + +#: src/gtkmm/state_star.cpp:455 +msgid "Number of Points:" +msgstr "Número de Puntos:" + +#: src/gtkmm/state_star.cpp:457 +msgid "Inner Tangent:" +msgstr "Tangente Interior:" + +#: src/gtkmm/state_star.cpp:459 +msgid "Outer Tangent:" +msgstr "Tangente Exterior" + +#: src/gtkmm/state_star.cpp:461 +msgid "Inner Width:" +msgstr "Espesor Interior:" + +#: src/gtkmm/state_star.cpp:463 +msgid "Outer Width:" +msgstr "Espesor Exterior" + +#: src/gtkmm/state_star.cpp:465 +msgid "Radius Ratio:" +msgstr "Relación de Radios:" + +#: src/gtkmm/state_star.cpp:467 +msgid "Angle Offset:" +msgstr "Desfase Angular:" + +#: src/gtkmm/state_star.cpp:554 +msgid "New Star" +msgstr "Nuevo Estrella" + +#: src/gtkmm/state_text.cpp:274 +msgid "Multiline Editor" +msgstr "Editor Multiínea" + +#: src/gtkmm/state_text.cpp:283 src/gtkmm/state_text.cpp:328 +msgid "Text Tool" +msgstr "Herramienta de Texto" + +#: src/gtkmm/state_text.cpp:286 +msgid "Size:" +msgstr "Tamaño:" + +#: src/gtkmm/state_text.cpp:288 +msgid "Orientation:" +msgstr "Orientación:" + +#: src/gtkmm/state_text.cpp:290 +msgid "Family:" +msgstr "Familia:" + +#: src/gtkmm/state_text.cpp:372 +msgid "New Text" +msgstr "Nuevo Texto" + +#: src/gtkmm/state_text.cpp:397 +msgid "Text Paragraph" +msgstr "Texto del Párrafo" + +#: src/gtkmm/state_text.cpp:397 src/gtkmm/state_text.cpp:399 +msgid "Enter text here:" +msgstr "Introduzca Texto aquí:" + +#: src/gtkmm/state_text.cpp:399 +msgid "Text Entry" +msgstr "Entrada de Texto" + +#: src/gtkmm/state_width.cpp:223 +msgid "Relative Growth" +msgstr "Crecimiento Relativo" + +#: src/gtkmm/state_width.cpp:231 +msgid "Growth:" +msgstr "Crecimiento:" + +#: src/gtkmm/state_width.cpp:234 +msgid "Radius:" +msgstr "Radio:" + +#: src/gtkmm/state_width.cpp:559 +msgid "Sketch Width" +msgstr "Espesor del Boceto" + +#: src/gtkmm/toolbox.cpp:133 +msgid "Cannot save" +msgstr "No se puede Guardar" + +#: src/gtkmm/toolbox.cpp:133 src/gtkmm/toolbox.cpp:145 +msgid "Nothing to save" +msgstr "Nada para Guardar" + +#: src/gtkmm/toolbox.cpp:145 +msgid "Cannot save as" +msgstr "No se puedo Guardar Como" + +#: src/gtkmm/toolbox.cpp:167 +msgid "Cannot close" +msgstr "No se puede cerrar" + +#: src/gtkmm/toolbox.cpp:167 +msgid "Nothing to close" +msgstr "Nada para cerrrar" + +#: src/gtkmm/toolbox.cpp:220 +msgid "Vertical Dock: Canvases, History" +msgstr "Empotrable Vertical: Lienzos, Historial" + +#: src/gtkmm/toolbox.cpp:221 +msgid "Horizontal Dock: Layers, Children, Params" +msgstr "Emportrable Horizontal: Capas, Descendientes, Parámetros" + +#: src/gtkmm/toolbox.cpp:223 +msgid "Reset Windows to Original Layout" +msgstr "Restablecer Ventanas a su Disposición Original" + +#: src/gtkmm/toolbox.cpp:232 +msgid "Open Recent" +msgstr "Abrir Reciente" + +#: src/gtkmm/toolbox.cpp:239 +msgid "Panels" +msgstr "Paneles" + +#: src/gtkmm/toolbox.cpp:251 +msgid "Input Devices..." +msgstr "Dispositivos de Entrada..." + +#: src/gtkmm/toolbox.cpp:253 +msgid "Setup..." +msgstr "Preferencias..." + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:268 +msgid "Synfig Wiki" +msgstr "Synfig Wiki" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:268 +msgid "/Main_Page" +msgstr "/Main_Page.es" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:269 +msgid "Tutorials" +msgstr "Tutoriales" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:269 +msgid "/Tutorials" +msgstr "/Tutorials.es" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:270 +msgid "Frequently Asked Questions" +msgstr "Preguntas Frecuentes" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:270 +msgid "/FAQ" +msgstr "/FAQ.es" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:271 +msgid "Get Support" +msgstr "Obtener Soporte" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:271 +msgid "/Contact" +msgstr "/Contact.es" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:272 +msgid "Keyboard Shortcuts" +msgstr "Atajos de Teclado" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:272 +msgid "/Keyboard_Shortcuts" +msgstr "/Keyboard_Shortcuts.es" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:273 +msgid "Mouse Shortcuts" +msgstr "Atajos de Ratón" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:273 +msgid "/Mouse_Shortcuts" +msgstr "/Mouse_Shortcuts.es" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:274 +msgid "All Pages" +msgstr "Todas las Páginas" + +#: src/gtkmm/toolbox.cpp:282 +msgid "_Help" +msgstr "_Ayuda" + +#: src/gtkmm/toolbox.cpp:289 +msgid "New..." +msgstr "Nuevo..." + +#: src/gtkmm/toolbox.cpp:290 +msgid "Open..." +msgstr "Abrir..." + +#: src/gtkmm/toolbox.cpp:291 +msgid "Save" +msgstr "Guardar" + +#: src/gtkmm/toolbox.cpp:292 +msgid "Save As..." +msgstr "Guardar como..." + +#: src/gtkmm/toolbox.cpp:296 +msgid "Setup" +msgstr "Preferencias" + +#: src/gtkmm/toolbox.cpp:297 +msgid "About Synfig Studio" +msgstr "Acerca de Synfig Studio" + +#: src/gtkmm/widget_canvaschooser.cpp:115 +msgid "Other..." +msgstr "Otro..." + +#: src/gtkmm/widget_canvaschooser.cpp:136 +msgid "Choose Canvas" +msgstr "Elegir Lienzo" + +#: src/gtkmm/widget_canvaschooser.cpp:136 +msgid "Enter the relative name of the canvas that you want" +msgstr "Introduzca el nombre relativo al lienzo que desee" + +#: src/gtkmm/widget_canvaschooser.cpp:145 +msgid "No canvas name was specified" +msgstr "No se ha especificado nombre de lienzo" + +#: src/gtkmm/widget_canvaschooser.cpp:158 +msgid "Error:Exception Thrown" +msgstr "Error: Excepción Lanzada" + +#: src/gtkmm/widget_canvaschooser.cpp:163 +msgid "Unknown Exception" +msgstr "Excepción Desconocida" + +#: src/gtkmm/widget_coloredit.cpp:304 +msgid "RGB" +msgstr "RGB" + +#: src/gtkmm/widget_coloredit.cpp:305 +msgid "YUV" +msgstr "YUV" + +#: src/gtkmm/widget_coloredit.cpp:360 +msgid "HTML code" +msgstr "Código HTML" + +#: src/gtkmm/widget_coloredit.cpp:373 +msgid "Luma" +msgstr "Luma" + +#: src/gtkmm/widget_coloredit.cpp:374 +msgid "Hue" +msgstr "Matiz" + +#: src/gtkmm/widget_coloredit.cpp:375 +msgid "Saturation" +msgstr "Saturación" + +#: src/gtkmm/widget_coloredit.cpp:376 +msgid "U" +msgstr "U" + +#: src/gtkmm/widget_coloredit.cpp:377 +msgid "V" +msgstr "V" + +#: src/gtkmm/widget_coloredit.cpp:381 +msgid "Alpha" +msgstr "Transparencia" + +#: src/gtkmm/widget_defaults.cpp:213 +msgid "Foreground Color" +msgstr "Color de Frente" + +#: src/gtkmm/widget_defaults.cpp:221 +msgid "Background Color" +msgstr "Color de Fondo" + +#: src/gtkmm/widget_defaults.cpp:238 +msgid "" +"Swap Background and\n" +"Foreground Colors" +msgstr "" +"Intercambiar colores \n" +"de Frente y Fondo" + +#: src/gtkmm/widget_defaults.cpp:252 +msgid "Reset Colors to Black and White" +msgstr "Restablecer colores a Blanco y Negro" + +#: src/gtkmm/widget_defaults.cpp:264 +msgid "Brush Preview" +msgstr "Previsualizar Brocha" + +#: src/gtkmm/widget_defaults.cpp:274 +msgid "Brush Size" +msgstr "Tamaño de Brocha" + +#: src/gtkmm/widget_defaults.cpp:282 +msgid "Default Blend Method" +msgstr "Método de Mezcla por Defecto" + +#: src/gtkmm/widget_defaults.cpp:296 +msgid "Default Interpolation" +msgstr "Interpolación por Defecto" + +#: src/gtkmm/widget_defaults.cpp:304 +msgid "Default Opacity" +msgstr "Opacidad por Defecto" + +#: src/gtkmm/widget_defaults.cpp:311 +msgid "Default Gradient" +msgstr "Gradiente por Defecto" + +#: src/gtkmm/widget_filename.cpp:61 +msgid "Find" +msgstr "Encontrar" + +#: src/gtkmm/widget_filename.cpp:120 +msgid "Choose File" +msgstr "Elegir Archivo" + +#: src/gtkmm/widget_gradient.cpp:223 +msgid "Insert CPoint" +msgstr "Insertar CPunto" + +#: src/gtkmm/widget_gradient.cpp:235 +msgid "Remove CPoint" +msgstr "Quitar CPunto" + +#: src/gtkmm/widget_waypoint.cpp:76 +msgid "(Non-static value)" +msgstr "(Valor no-estático)" + +#: src/gtkmm/widget_waypoint.cpp:86 src/gtkmm/widget_waypoint.cpp:93 +#: src/gtkmm/widget_waypointmodel.cpp:72 src/gtkmm/widget_waypointmodel.cpp:79 +msgid "TCB Smooth" +msgstr "TCB" + +#: src/gtkmm/widget_waypoint.cpp:87 src/gtkmm/widget_waypoint.cpp:94 +#: src/gtkmm/widget_waypointmodel.cpp:73 src/gtkmm/widget_waypointmodel.cpp:80 +msgid "Constant" +msgstr "Constante" + +#: src/gtkmm/widget_waypoint.cpp:89 src/gtkmm/widget_waypointmodel.cpp:75 +msgid "Ease In" +msgstr "Suave" + +#: src/gtkmm/widget_waypoint.cpp:96 src/gtkmm/widget_waypointmodel.cpp:82 +msgid "Ease Out" +msgstr "Suave" + +#: src/gtkmm/widget_waypoint.cpp:121 +#: src/synfigapp/actions/waypointremove.cpp:78 +#: src/synfigapp/actions/waypointset.cpp:77 +#: src/synfigapp/actions/waypointsimpleadd.cpp:78 +msgid "Waypoint" +msgstr "Interpolación" + +#: src/gtkmm/widget_waypoint.cpp:123 +msgid "Waypoint" +msgstr "Interpolación" + +#: src/gtkmm/widget_waypoint.cpp:135 +msgid "_Value" +msgstr "_Valor" + +#: src/gtkmm/widget_waypoint.cpp:142 +msgid "_Time" +msgstr "_Tiempo" + +#: src/gtkmm/widget_waypoint.cpp:148 +msgid "Interpolation" +msgstr "Interpolación" + +#: src/gtkmm/widget_waypoint.cpp:150 +msgid "Interpolation" +msgstr "Interpolación" + +#: src/gtkmm/widget_waypoint.cpp:162 +msgid "_In Interpolation" +msgstr "Interpolación de _Entrada" + +#: src/gtkmm/widget_waypoint.cpp:168 +msgid "_Out Interpolation" +msgstr "Interpolación de _Salida" + +#: src/gtkmm/widget_waypoint.cpp:174 +msgid "TCB Parameters" +msgstr "Parámetros TCB" + +#: src/gtkmm/widget_waypoint.cpp:176 +msgid "TCB Parameter" +msgstr "Parámetros TBC" + +#: src/gtkmm/widget_waypoint.cpp:188 +msgid "T_ension" +msgstr "T_ensión" + +#: src/gtkmm/widget_waypoint.cpp:195 +msgid "_Continuity" +msgstr "_Continuidad" + +#: src/gtkmm/widget_waypoint.cpp:202 +msgid "_Bias" +msgstr "_Bias" + +#: src/gtkmm/widget_waypoint.cpp:209 +msgid "Te_mporal Tension" +msgstr "Tensión Te_mporal" + +#: src/gtkmm/widget_waypointmodel.cpp:64 +msgid "Out:" +msgstr "Salida:" + +#: src/gtkmm/widget_waypointmodel.cpp:65 +msgid "In:" +msgstr "Entrada:" + +#: src/gtkmm/widget_waypointmodel.cpp:66 +msgid "Tension:" +msgstr "Tensión:" + +#: src/gtkmm/widget_waypointmodel.cpp:67 +msgid "Continuity:" +msgstr "Continuidad:" + +#: src/gtkmm/widget_waypointmodel.cpp:68 +msgid "Bias:" +msgstr "Bias:" + +#: src/gtkmm/widget_waypointmodel.cpp:69 +msgid "Temporal Tension:" +msgstr "Tensión Temporal:" + +#: src/gtkmm/workarea.cpp:1171 +msgid "Nudge" +msgstr "Empujoncito" + +#: src/gtkmm/workarea.cpp:1631 +msgid "Move" +msgstr "Mover" + +#: src/gtkmm/workarea.cpp:2322 +msgid "Rendering..." +msgstr "Renderizando..." + +#: src/gtkmm/workarea.cpp:2349 src/gtkmm/workarea.cpp:2441 +msgid "Render Failed" +msgstr "El Render Falló" + +#: src/gtkmm/workarea.cpp:2423 +#, c-format +msgid "Rendering canvas %s..." +msgstr "Renderizando lienzos %s..." + +#: src/gtkmm/zoomdial.h:71 +msgid "Zoom In" +msgstr "Acercar" + +#: src/gtkmm/zoomdial.h:72 +msgid "Zoom Out" +msgstr "Alejar" + +#: src/gtkmm/zoomdial.h:73 +msgid "Zoom to Fit" +msgstr "Ajustar a la Ventana" + +#: src/gtkmm/zoomdial.h:74 +msgid "Zoom to 100%" +msgstr "Ajustar al 100%" + +#: src/synfigapp/action.cpp:469 +msgid "Selected Canvas" +msgstr "Lienzo Seleccionado" + +#: src/synfigapp/action.cpp:473 src/synfigapp/action.cpp:474 +msgid "Canvas Interface" +msgstr "Interfase de Lienzo" + +#: src/synfigapp/actions/activepointadd.cpp:49 +msgid "Add Activepoint" +msgstr "Añadir Punto activo" + +#: src/synfigapp/actions/activepointadd.cpp:75 +#: src/synfigapp/actions/activepointremove.cpp:74 +#: src/synfigapp/actions/activepointset.cpp:73 +#: src/synfigapp/actions/activepointsetoff.cpp:83 +#: src/synfigapp/actions/activepointseton.cpp:83 +#: src/synfigapp/actions/activepointsetsmart.cpp:82 +#: src/synfigapp/actions/colorset.cpp:79 +#: src/synfigapp/actions/gradientset.cpp:79 +#: src/synfigapp/actions/valuedescconvert.cpp:93 +#: src/synfigapp/actions/valuedescdisconnect.cpp:81 +#: src/synfigapp/actions/valuedescdisconnect.cpp:90 +#: src/synfigapp/actions/valuedescexport.cpp:88 +#: src/synfigapp/actions/valuedescset.cpp:83 +#: src/synfigapp/actions/valuedescset.cpp:92 +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:76 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:78 +#: src/synfigapp/actions/valuenodedynamiclistremove.cpp:74 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:77 +#: src/synfigapp/actions/valuenodedynamiclistrotateorder.cpp:74 +msgid "ValueDesc" +msgstr "Descripción de Valor" + +#: src/synfigapp/actions/activepointadd.cpp:79 +#: src/synfigapp/actions/activepointsetsmart.cpp:86 +msgid "New Activepoint" +msgstr "Nuevo Punto Activo" + +#: src/synfigapp/actions/activepointadd.cpp:80 +#: src/synfigapp/actions/activepointsetsmart.cpp:87 +#: src/synfigapp/actions/activepointsimpleadd.cpp:79 +msgid "Activepoint to be added" +msgstr "Punto Activo ara ser añadido" + +#: src/synfigapp/actions/activepointadd.cpp:86 +#: src/synfigapp/actions/activepointsetsmart.cpp:93 +msgid "Time where activepoint is to be added" +msgstr "Tiempo donde se añadirá el Punto Activo" + +#: src/synfigapp/actions/activepointadd.cpp:176 +#: src/synfigapp/actions/activepointremove.cpp:162 +msgid "A Activepoint already exists at this point in time" +msgstr "Un Punto Activo existe actualmente en este punto en el tiempo" + +#: src/synfigapp/actions/activepointadd.cpp:179 +#: src/synfigapp/actions/activepointremove.cpp:165 +msgid "This activepoint is already in the ValueNode" +msgstr "Este punto activo esta ya en el Valor de Nodo" + +#: src/synfigapp/actions/activepointremove.cpp:49 +msgid "Remove Activepoint" +msgstr "Borrar Punto Activo" + +#: src/synfigapp/actions/activepointremove.cpp:78 +#: src/synfigapp/actions/activepointset.cpp:77 +#: src/synfigapp/actions/activepointsetoff.cpp:87 +#: src/synfigapp/actions/activepointseton.cpp:87 +#: src/synfigapp/actions/activepointsimpleadd.cpp:78 +msgid "Activepoint" +msgstr "Punto Activo" + +#: src/synfigapp/actions/activepointremove.cpp:79 +#: src/synfigapp/actions/activepointset.cpp:78 +msgid "Activepoint to be changed" +msgstr "Punto Activo para ser cambiado" + +#: src/synfigapp/actions/activepointremove.cpp:143 +#: src/synfigapp/actions/activepointset.cpp:151 +#: src/synfigapp/actions/activepointset.cpp:209 +#: src/synfigapp/actions/activepointset.cpp:255 +#: src/synfigapp/actions/activepointset.cpp:276 +msgid "Unable to find activepoint" +msgstr "Imposible encontrar punto activo" + +#: src/synfigapp/actions/activepointset.cpp:49 +msgid "Set Activepoint" +msgstr "Establecer Punto Activo" + +#: src/synfigapp/actions/activepointsetoff.cpp:57 +msgid "Mark Activepoint as \"Off\"" +msgstr "Marcar Punto Activo como \"Off\"" + +#: src/synfigapp/actions/activepointseton.cpp:57 +msgid "Mark Activepoint as \"On\"" +msgstr "Marcar Punto Activo como \"On\"" + +#: src/synfigapp/actions/activepointsetsmart.cpp:56 +msgid "Set Activepoint (Smart)" +msgstr "Establecer Punto Activo (Inteligente)" + +#: src/synfigapp/actions/activepointsetsmart.cpp:365 +#: src/synfigapp/actions/waypointsetsmart.cpp:439 +msgid "Unable to determine how to proceed. This is a bug." +msgstr "Imposible determinar como proceder. Esto es un bug." + +#: src/synfigapp/actions/activepointsimpleadd.cpp:49 +#: src/synfigapp/actions/waypointsimpleadd.cpp:49 +msgid "Simply Add Waypoint" +msgstr "Simplemente Añade una Interpolación" + +#: src/synfigapp/actions/activepointsimpleadd.cpp:74 +#: src/synfigapp/actions/waypointadd.cpp:76 +#: src/synfigapp/actions/waypointset.cpp:73 +#: src/synfigapp/actions/waypointsetsmart.cpp:85 +#: src/synfigapp/actions/waypointsimpleadd.cpp:74 +msgid "Destination ValueNode (Animated)" +msgstr "Valor de Nodo de Destino (Animado)" + +#: src/synfigapp/actions/activepointsimpleadd.cpp:169 +msgid "The activepoint to remove no longer exists" +msgstr "El punto activo a eliminar no existe ya" + +#: src/synfigapp/actions/blinepointtangentmerge.cpp:78 +#, c-format +msgid "Merge Tangents of '%s'" +msgstr "Mezclar tangentes de '%s'" + +#: src/synfigapp/actions/blinepointtangentmerge.cpp:87 +#: src/synfigapp/actions/blinepointtangentsplit.cpp:87 +msgid "ValueNode of BLinePoint" +msgstr "Valor de Nodo del Punto de Línea Béizer" + +#: src/synfigapp/actions/blinepointtangentmerge.cpp:156 +#: src/synfigapp/actions/blinepointtangentsplit.cpp:156 +msgid "Couldn't find action \"value_desc_set\"" +msgstr "No puedo encontrar la acción \"value_desc_set\"" + +#: src/synfigapp/actions/blinepointtangentsplit.cpp:78 +#, c-format +msgid "Split Tangents of '%s'" +msgstr "Dividir Tangentes de '%s'" + +#: src/synfigapp/actions/canvasadd.cpp:49 +msgid "Add Child Canvas" +msgstr "Añadir Lienzo Descendiente" + +#: src/synfigapp/actions/canvasadd.cpp:79 +msgid "The name that you want this canvas to be" +msgstr "El nombre que Ud. quiere que sea este lienzo" + +#: src/synfigapp/actions/canvasdescriptionset.cpp:50 +msgid "Set Canvas Description" +msgstr "Establecer Descripción del Lienzo" + +#. TRANSLATORS: This is used in the 'history' dialog when a Canvas has its description changed. +#: src/synfigapp/actions/canvasdescriptionset.cpp:71 +#, c-format +msgid "Change canvas description from '%s' to '%s'" +msgstr "Cambiar la descripción del lienzo desde '%s' a '%s'" + +#: src/synfigapp/actions/canvasidset.cpp:50 +msgid "Set Canvas Id" +msgstr "Establecer Id de Lienzo" + +#. TRANSLATORS: This is used in the 'history' dialog when a Canvas has its id changed. +#: src/synfigapp/actions/canvasidset.cpp:71 +#, c-format +msgid "Change canvas id from '%s' to '%s'" +msgstr "Cambiar Id del lienzo desde '%s' a '%s'" + +#: src/synfigapp/actions/canvasidset.cpp:82 +msgid "Id" +msgstr "Id" + +#: src/synfigapp/actions/canvasnameset.cpp:50 +msgid "Set Canvas Name" +msgstr "Establecer Nombre del Lienzo" + +#. TRANSLATORS: This is used in the 'history' dialog when a Canvas has its name changed. +#: src/synfigapp/actions/canvasnameset.cpp:71 +#, c-format +msgid "Change canvas name from '%s' to '%s'" +msgstr "Cambiar nombre del lienzo desde '%s' a '%s'" + +#: src/synfigapp/actions/canvasremove.cpp:49 +msgid "Remove Canvas" +msgstr "Borrar Lienzo" + +#: src/synfigapp/actions/canvasremove.cpp:107 +msgid "You cannot remove the root canvas!" +msgstr "¡No puede borrar el lienzo raíz!" + +#: src/synfigapp/actions/canvasremove.cpp:110 +msgid "You cannot remove an inline canvas!" +msgstr "¡No puede borrar un lienzo en línea!" + +#: src/synfigapp/actions/canvasrenddescset.cpp:49 +msgid "Set Canvas RendDesc" +msgstr "Establecer Descripción de la Muestra del Lienzo" + +#: src/synfigapp/actions/canvasrenddescset.cpp:73 +msgid "RendDesc" +msgstr "Descripción de la Muestra" + +#: src/synfigapp/actions/colorset.cpp:55 +msgid "Apply Default Color" +msgstr "Aplicar Color por Defecto" + +#: src/synfigapp/actions/editmodeset.cpp:49 +msgid "Set Edit Mode" +msgstr "Establecer Modo de Edición" + +#: src/synfigapp/actions/editmodeset.cpp:72 +msgid "New Edit Mode" +msgstr "Nuevo Modo de Edición" + +#: src/synfigapp/actions/gradientset.cpp:55 +msgid "Apply Default Gradient" +msgstr "Aplicar Gradiente por Defecto" + +#: src/synfigapp/actions/groupaddlayers.cpp:49 +msgid "Add Layers to Group" +msgstr "Añadir Capas a Grupo" + +#: src/synfigapp/actions/groupaddlayers.cpp:73 +msgid "Layer to be added to group" +msgstr "Capas para ser añadiddas a grupo" + +#: src/synfigapp/actions/groupaddlayers.cpp:79 +msgid "Name of the Group to add the Layers to" +msgstr "Nombre del Grupo al que se añaden las Capas" + +#: src/synfigapp/actions/groupremove.cpp:49 +msgid "Remove Group" +msgstr "Borrar Grupo" + +#: src/synfigapp/actions/groupremove.cpp:73 +msgid "Name of the Group to remove" +msgstr "Nombre del Grupo a Borrar" + +#: src/synfigapp/actions/groupremovelayers.cpp:50 +msgid "Remove Layers from a Group" +msgstr "Borra Capas de un Grupo" + +#: src/synfigapp/actions/groupremovelayers.cpp:74 +msgid "Layer to be removed from group" +msgstr "Capa para ser borrada de un grupo" + +#: src/synfigapp/actions/grouprename.cpp:49 +msgid "Rename Group" +msgstr "Renombrar Grupo" + +#: src/synfigapp/actions/grouprename.cpp:72 +msgid "Old Group" +msgstr "Viejo Grupo" + +#: src/synfigapp/actions/grouprename.cpp:73 +msgid "Name of the Group to rename" +msgstr "Nombre del Grupo a Renombrar" + +#: src/synfigapp/actions/grouprename.cpp:77 +msgid "New Group" +msgstr "Nuevo Grupo" + +#: src/synfigapp/actions/grouprename.cpp:78 +msgid "New name for group" +msgstr "Nombre Nuevo para el Grupo" + +#: src/synfigapp/actions/grouprename.cpp:123 +#, c-format +msgid "A group with the name \"%s\" already exists!" +msgstr "¡Un grupo con el nombre \"%s\" ya existe!" + +#: src/synfigapp/actions/keyframeadd.cpp:49 +msgid "Add Keyframe" +msgstr "Añadir Fotograma Clave" + +#: src/synfigapp/actions/keyframeadd.cpp:74 +#: src/synfigapp/actions/keyframeset.cpp:78 +msgid "New Keyframe" +msgstr "Nuevo Fotograma Clave" + +#: src/synfigapp/actions/keyframeadd.cpp:75 +#: src/synfigapp/actions/keyframeset.cpp:79 +msgid "Keyframe to be added" +msgstr "Fotograma Clave para ser añadido" + +#: src/synfigapp/actions/keyframeadd.cpp:114 +#: src/synfigapp/actions/keyframeduplicate.cpp:138 +#: src/synfigapp/actions/keyframeduplicate.cpp:217 +#: src/synfigapp/actions/keyframeremove.cpp:219 +#: src/synfigapp/actions/keyframeset.cpp:128 +msgid "A Keyframe already exists at this point in time" +msgstr "Un Fotograma Clave ya existe en ese punto del tiempo" + +#: src/synfigapp/actions/keyframeadd.cpp:117 +#: src/synfigapp/actions/keyframeduplicate.cpp:220 +#: src/synfigapp/actions/keyframeremove.cpp:222 +msgid "This keyframe is already in the ValueNode" +msgstr "Este Fotograma Clave ya está en el Valor de Nodo" + +#: src/synfigapp/actions/keyframeduplicate.cpp:53 +msgid "Duplicate Keyframe" +msgstr "Duplicar Fotograma Clave" + +#: src/synfigapp/actions/keyframeduplicate.cpp:80 +msgid "Keyframe to be duplicated" +msgstr "Fotograma Clave para ser Duplicado" + +#: src/synfigapp/actions/keyframeduplicate.cpp:102 +msgid " (Duplicate)" +msgstr " (Duplicado)" + +#: src/synfigapp/actions/keyframeduplicate.cpp:135 +#: src/synfigapp/actions/keyframeremove.cpp:120 +#: src/synfigapp/actions/keyframeset.cpp:377 +#: src/synfigapp/actions/keyframewaypointset.cpp:129 +msgid "Unable to find the given keyframe" +msgstr "Imposible encontrar el fotograma clave dado" + +#: src/synfigapp/actions/keyframeremove.cpp:53 +msgid "Remove Keyframe" +msgstr "Borrar Fotograma Clave" + +#: src/synfigapp/actions/keyframeremove.cpp:79 +msgid "Keyframe to be removed" +msgstr "Fotograma Clave a ser borrado" + +#: src/synfigapp/actions/keyframeset.cpp:53 +msgid "Set Keyframe" +msgstr "Establecer Fotograma Clave" + +#: src/synfigapp/actions/keyframeset.cpp:385 +msgid "" +"Cannot change keyframe time because another keyframe already exists with " +"that time." +msgstr "" +"No puedo cambiar el fotograma clave porque otro fotograma clave existe " +"actualmente con ese tiempo" + +#: src/synfigapp/actions/keyframesetdelta.cpp:53 +msgid "Set Keyframe Delta" +msgstr "Establecer Delta del Fotograma Clave" + +#: src/synfigapp/actions/keyframesetdelta.cpp:82 +msgid "Delta" +msgstr "Delta" + +#: src/synfigapp/actions/keyframewaypointset.cpp:53 +msgid "Set Waypoints at Keyframe" +msgstr "Establecer Interpolaciones en el Fotograma Clave" + +#: src/synfigapp/actions/keyframewaypointset.cpp:82 +#: src/synfigapp/actions/waypointsetsmart.cpp:95 +msgid "Waypoint Model" +msgstr "Modelo de Interpolación" + +#: src/synfigapp/actions/layeractivate.cpp:50 +#: src/synfigapp/actions/layeractivate.cpp:71 +#: src/synfigapp/actions/layeractivate.cpp:75 +msgid "Activate Layer" +msgstr "Activar Capa" + +#: src/synfigapp/actions/layeractivate.cpp:76 +msgid "Deactivate Layer" +msgstr "Desactivar Capa" + +#: src/synfigapp/actions/layeractivate.cpp:90 +msgid "New Status" +msgstr "Nuevo Estado" + +#: src/synfigapp/actions/layeractivate.cpp:91 +msgid "The new status of the layer" +msgstr "El nuevo estado de la capa" + +#: src/synfigapp/actions/layeractivate.cpp:141 +#: src/synfigapp/actions/layeradd.cpp:144 +#: src/synfigapp/actions/layerduplicate.cpp:135 +#: src/synfigapp/actions/layerencapsulate.cpp:191 +#: src/synfigapp/actions/layerlower.cpp:140 +#: src/synfigapp/actions/layermove.cpp:161 +#: src/synfigapp/actions/layermove.cpp:234 +#: src/synfigapp/actions/layerraise.cpp:137 +#: src/synfigapp/actions/layerremove.cpp:134 +msgid "This layer doesn't exist anymore." +msgstr "La capa ya no existe." + +#: src/synfigapp/actions/layeradd.cpp:50 src/synfigapp/actions/layeradd.cpp:71 +#: src/synfigapp/actions/layeradd.cpp:73 +msgid "Add Layer" +msgstr "Añadir capa" + +#: src/synfigapp/actions/layeradd.cpp:83 +msgid "Layer to be added" +msgstr "Capa para ser añadida" + +#: src/synfigapp/actions/layerduplicate.cpp:52 +#: src/synfigapp/actions/layerduplicate.cpp:72 +msgid "Duplicate Layer" +msgstr "Duplicar Capa" + +#: src/synfigapp/actions/layerduplicate.cpp:72 +msgid "Duplicate Layers" +msgstr "Duplicar Capas" + +#: src/synfigapp/actions/layerduplicate.cpp:82 +msgid "Layer to be duplicated" +msgstr "Capa para ser duplicada" + +#: src/synfigapp/actions/layerduplicate.cpp:141 +#: src/synfigapp/actions/layerencapsulate.cpp:200 +#: src/synfigapp/actions/layerremove.cpp:144 +msgid "This layer doesn't belong to this canvas anymore" +msgstr "La capa ya no pertenece más a este lienzo" + +#: src/synfigapp/actions/layerencapsulate.cpp:72 +msgid "Encapsulate Layer" +msgstr "Encapsular Capa" + +#: src/synfigapp/actions/layerencapsulate.cpp:72 +msgid "Encapsulate Layers" +msgstr "Encapsular Capas" + +#: src/synfigapp/actions/layerencapsulate.cpp:82 +msgid "Layer to be encapsulated" +msgstr "Capa para ser encapsulada" + +#: src/synfigapp/actions/layerencapsulate.cpp:141 +msgid "No layers to encapsulate" +msgstr "Sin capas que encapsular" + +#: src/synfigapp/actions/layerencapsulate.cpp:194 +msgid "This layer doesn't have a parent canvas" +msgstr "Esta capa no tiene un lienzo ascendiente" + +#: src/synfigapp/actions/layerencapsulate.cpp:203 +msgid "get_canvas()!=subcanvas" +msgstr "get_canvas()!=subcanvas" + +#: src/synfigapp/actions/layerlower.cpp:51 +#: src/synfigapp/actions/layerlower.cpp:71 +msgid "Lower Layer" +msgstr "Bajar Capa" + +#: src/synfigapp/actions/layerlower.cpp:71 +msgid "Lower Layers" +msgstr "Bajar Capas" + +#: src/synfigapp/actions/layerlower.cpp:81 +msgid "Layer to be lowered" +msgstr "Capa para ser bajada" + +#: src/synfigapp/actions/layermove.cpp:50 +#: src/synfigapp/actions/layermove.cpp:74 +#: src/synfigapp/actions/layermove.cpp:76 +msgid "Move Layer" +msgstr "Mover capa" + +#: src/synfigapp/actions/layermove.cpp:86 +#: src/synfigapp/actions/layersetdesc.cpp:86 +msgid "Layer to be moved" +msgstr "Capa para ser movida" + +#: src/synfigapp/actions/layermove.cpp:90 +msgid "New Index" +msgstr "Nuevo índice" + +#: src/synfigapp/actions/layermove.cpp:91 +msgid "Where the layer is to be moved to" +msgstr "Donde la capa va a ser movida" + +#: src/synfigapp/actions/layermove.cpp:95 +msgid "Destination Canvas" +msgstr "Lienzo Destino" + +#: src/synfigapp/actions/layermove.cpp:96 +msgid "The canvas the layer is to be moved to" +msgstr "El Iienzo donde la capa va a ser movida" + +#: src/synfigapp/actions/layermove.cpp:170 +msgid "You cannot directly move layers across compositions" +msgstr "No puede mover capas directamente entre composiciones" + +#: src/synfigapp/actions/layerparamconnect.cpp:49 +msgid "Connect Layer Parameter" +msgstr "Conectar Parámetro de Capa" + +#: src/synfigapp/actions/layerparamconnect.cpp:76 +#: src/synfigapp/actions/layerparamdisconnect.cpp:79 +#: src/synfigapp/actions/layerparamset.cpp:76 +msgid "Param" +msgstr "Parámetro" + +#: src/synfigapp/actions/layerparamconnect.cpp:147 +msgid "Layer did not recognize parameter name" +msgstr "Capa no reconoce el nombre del parámetro" + +#: src/synfigapp/actions/layerparamconnect.cpp:150 +msgid "Bad connection" +msgstr "Mala conexión" + +#: src/synfigapp/actions/layerparamdisconnect.cpp:50 +msgid "Disconnect Layer Parameter" +msgstr "Desconectar el Parámetro de la Capa" + +#: src/synfigapp/actions/layerparamdisconnect.cpp:135 +msgid "Layer Parameter is not connected to anything" +msgstr "El Parámetro de la Capa no esta conectado a nada" + +#: src/synfigapp/actions/layerparamset.cpp:49 +msgid "Set Layer Parameter" +msgstr "Establecer el Parámetro de la Capa" + +#: src/synfigapp/actions/layerparamset.cpp:132 +msgid "ValueNode attached to Parameter." +msgstr "Valor de Nodo adjunto a Parámetro" + +#: src/synfigapp/actions/layerparamset.cpp:137 +#: src/synfigapp/actions/layerparamset.cpp:157 +msgid "Layer did not accept parameter." +msgstr "Capa no acepta el parámetro" + +#: src/synfigapp/actions/layerraise.cpp:51 +#: src/synfigapp/actions/layerraise.cpp:71 +msgid "Raise Layer" +msgstr "Elevar Capa" + +#: src/synfigapp/actions/layerraise.cpp:71 +msgid "Raise Layers" +msgstr "Elevar Capas" + +#: src/synfigapp/actions/layerraise.cpp:81 +msgid "Layer to be raised" +msgstr "Capa para ser elevada" + +#: src/synfigapp/actions/layerremove.cpp:50 +#: src/synfigapp/actions/layerremove.cpp:70 +msgid "Remove Layer" +msgstr "Borrar Capa" + +#: src/synfigapp/actions/layerremove.cpp:70 +msgid "Remove Layers" +msgstr "Borrar Capas" + +#: src/synfigapp/actions/layerremove.cpp:80 +msgid "Layer to be deleted" +msgstr "Capa para ser borrada" + +#: src/synfigapp/actions/layersetdesc.cpp:50 +#: src/synfigapp/actions/layersetdesc.cpp:73 +msgid "Set Layer Description" +msgstr "Establecer Descripción de la Capa" + +#. TRANSLATORS: this is the string used in the history dialog when renaming a layer to/from its default name +#: src/synfigapp/actions/layersetdesc.cpp:75 +#: src/synfigapp/actions/layersetdesc.cpp:76 +msgid "[default]" +msgstr "[por defecto]" + +#: src/synfigapp/actions/layersetdesc.cpp:90 +msgid "New Description" +msgstr "Nueva Descripción" + +#: src/synfigapp/actions/layersetdesc.cpp:91 +msgid "Enter a new description for this layer" +msgstr "Introduzca una nueva descripción para esta capa" + +#: src/synfigapp/actions/timepointscopy.cpp:58 +msgid "Copy Time Points" +msgstr "Copiar Puntos de Tiempo" + +#: src/synfigapp/actions/timepointscopy.cpp:83 +#: src/synfigapp/actions/timepointsdelete.cpp:82 +#: src/synfigapp/actions/timepointsmove.cpp:83 +msgid "New Selected Layer" +msgstr "Nueva Capa Seleccionada" + +#: src/synfigapp/actions/timepointscopy.cpp:84 +#: src/synfigapp/actions/timepointsdelete.cpp:83 +#: src/synfigapp/actions/timepointsmove.cpp:84 +msgid "A layer to add to our selected list" +msgstr "Una capa a añadir a nuestra lista seleccionada" + +#: src/synfigapp/actions/timepointscopy.cpp:90 +#: src/synfigapp/actions/timepointsdelete.cpp:89 +#: src/synfigapp/actions/timepointsmove.cpp:90 +msgid "New Selected Canvas" +msgstr "Nuevo Lienzo Seleccionado" + +#: src/synfigapp/actions/timepointscopy.cpp:91 +#: src/synfigapp/actions/timepointsdelete.cpp:90 +#: src/synfigapp/actions/timepointsmove.cpp:91 +msgid "A canvas to add to our selected list" +msgstr "Un lienzo a añadir a nuestra lista seleccionada" + +#: src/synfigapp/actions/timepointscopy.cpp:97 +#: src/synfigapp/actions/timepointsdelete.cpp:96 +#: src/synfigapp/actions/timepointsmove.cpp:97 +msgid "New Selected ValueBase" +msgstr "Nuevo Valor Base Seleccionado" + +#: src/synfigapp/actions/timepointscopy.cpp:98 +#: src/synfigapp/actions/timepointsdelete.cpp:97 +#: src/synfigapp/actions/timepointsmove.cpp:98 +msgid "A valuenode's description to add to our selected list" +msgstr "" +"Una descripción del valor de nodo a añadir a nuestra lista seleccionada" + +#: src/synfigapp/actions/timepointscopy.cpp:104 +#: src/synfigapp/actions/timepointsdelete.cpp:103 +#: src/synfigapp/actions/timepointsmove.cpp:104 +msgid "New Selected Time Point" +msgstr "Nuevo Punto de Tiempo Seleccionado" + +#: src/synfigapp/actions/timepointscopy.cpp:105 +#: src/synfigapp/actions/timepointsdelete.cpp:104 +#: src/synfigapp/actions/timepointsmove.cpp:105 +msgid "A time point to add to our selected list" +msgstr "Un punto de tiempo a añadir a nuestra lista seleccionada" + +#: src/synfigapp/actions/timepointscopy.cpp:110 +#: src/synfigapp/actions/timepointsmove.cpp:110 +msgid "Time adjustment" +msgstr "Ajuste de Tiempo" + +#: src/synfigapp/actions/timepointscopy.cpp:111 +#: src/synfigapp/actions/timepointsmove.cpp:111 +msgid "The amount of time to adjust all the selected points" +msgstr "La cantidad de tiempo a ajustar a todos los puntos seleccionados" + +#: src/synfigapp/actions/timepointsdelete.cpp:58 +msgid "Delete Time Points" +msgstr "Borrar Puntos de Tiempo" + +#: src/synfigapp/actions/timepointsmove.cpp:58 +msgid "Move Time Points" +msgstr "Mover Puntos de Tiempo" + +#: src/synfigapp/actions/valuedescblinelink.cpp:59 +msgid "Link to BLine" +msgstr "Enlazar a Línea Beizer" + +#: src/synfigapp/actions/valuedescblinelink.cpp:82 +#: src/synfigapp/actions/valuedesclink.cpp:75 +msgid "ValueDesc to link" +msgstr "Descripción del Valor a enlazar" + +#: src/synfigapp/actions/valuedescblinelink.cpp:86 +msgid "ValueDesc on BLine to link to" +msgstr "Descripción del Valor a enlazar en la Línea Beizer" + +#: src/synfigapp/actions/valuedescblinelink.cpp:93 +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:83 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:85 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:84 +msgid "Origin" +msgstr "Origen" + +#: src/synfigapp/actions/valuedescconnect.cpp:54 +msgid "Connect" +msgstr "Conectar" + +#. TRANSLATORS: This is used in the 'history' dialog when a connection is made. +#: src/synfigapp/actions/valuedescconnect.cpp:75 +#, c-format +msgid "Connect '%s' to '%s'" +msgstr "Conectar '%s' a '%s'" + +#: src/synfigapp/actions/valuedescconnect.cpp:86 +msgid "Destination ValueDesc" +msgstr "Descripción del Valor de Destino" + +#: src/synfigapp/actions/valuedescconnect.cpp:90 +#: src/synfigapp/actions/valuenodereplace.cpp:90 +msgid "Source ValueNode" +msgstr "Valor de Nodo de Origen" + +#: src/synfigapp/actions/valuedescconnect.cpp:95 +msgid "Source ValueNode Name" +msgstr "Nombre del Valor de Nodo de Origen" + +#: src/synfigapp/actions/valuedescconnect.cpp:239 +#: src/synfigapp/actions/valuedescdisconnect.cpp:216 +msgid "ValueDesc is not recognized or supported." +msgstr "Descripción del Valor no reconocido o soportado" + +#: src/synfigapp/actions/valuedescconvert.cpp:60 +msgid "Convert" +msgstr "Convertir" + +#. TRANSLATORS: This is used in the 'history' dialog when a ValueNode is converted. The first %s is what is converted, the 2nd is the local name of the ValueNode's type. +#: src/synfigapp/actions/valuedescconvert.cpp:82 +#, c-format +msgid "Convert '%s' to ValueNode type '%s'" +msgstr "Convertir '%s' al tipo de Valor de Nodo '%s'" + +#: src/synfigapp/actions/valuedescconvert.cpp:98 +msgid "The type of ValueNode that you want to be converted to" +msgstr "El tipo de Valor de Nodo al que se quiere convertir" + +#: src/synfigapp/actions/valuedescconvert.cpp:166 +msgid "Unable to decipher ValueDesc (Bug?)" +msgstr "Imposible descifrar La Descripción del Valor (¿Bug?)" + +#: src/synfigapp/actions/valuedescconvert.cpp:171 +msgid "Unable to create new value node" +msgstr "Imposible crear nuevo valor de nodo" + +#: src/synfigapp/actions/valuedescdisconnect.cpp:56 +msgid "Disconnect" +msgstr "Desconectar" + +#. TRANSLATORS: This is used in the History dialog when a ValueNode is disconnected. +#: src/synfigapp/actions/valuedescdisconnect.cpp:78 +#, c-format +msgid "Disconnect %s" +msgstr "Desconectar %s" + +#: src/synfigapp/actions/valuedescexport.cpp:56 +msgid "Export" +msgstr "Exportar" + +#. TRANSLATORS: This is used in the 'history' dialog when a ValueNode is exported. The first %s is what is exported, the 2nd is the name it is given. +#: src/synfigapp/actions/valuedescexport.cpp:77 +#, c-format +msgid "Export '%s' as '%s'" +msgstr "Exportar '%s' como '%s'" + +#: src/synfigapp/actions/valuedescexport.cpp:93 +msgid "The name that you want this value to be exported as" +msgstr "El nombre con el que quiere que se exporte este valor" + +#: src/synfigapp/actions/valuedescexport.cpp:151 +msgid "Can only export Canvas when used as constant parameter" +msgstr "" +"Sólo se puede exportar un lienzo cuando se use como parámetro constante" + +#: src/synfigapp/actions/valuedescexport.cpp:174 +msgid "ValueBase is already exported" +msgstr "Valor de Base actualmente exportado" + +#: src/synfigapp/actions/valuedescexport.cpp:181 +msgid "Unable to export parameter. (Bug?)" +msgstr "Imposible exportar parámetro. (¿Bug?)" + +#: src/synfigapp/actions/valuedesclink.cpp:52 +msgid "Link" +msgstr "Enlazar" + +#: src/synfigapp/actions/valuedesclink.cpp:112 +msgid "Cannot link two different exported values ('" +msgstr "No puedo enlazar dos valores exportados diferentes ('" + +#: src/synfigapp/actions/valuedesclink.cpp:113 +msgid "' and '" +msgstr "' y '" + +#: src/synfigapp/actions/valuedesclink.cpp:114 +msgid "')" +msgstr "')" + +#: src/synfigapp/actions/valuedesclink.cpp:119 +msgid "Used exported ValueNode ('" +msgstr "Usado Valor de Nodo exportado ('" + +#: src/synfigapp/actions/valuedesclink.cpp:119 +msgid "')." +msgstr "')." + +#: src/synfigapp/actions/valuedesclink.cpp:126 +msgid "Using the only available ValueNode." +msgstr "Usando el único Valor de Nodo disponible." + +#: src/synfigapp/actions/valuedesclink.cpp:139 +#: src/synfigapp/actions/valuedesclink.cpp:145 +msgid "Using the most referenced ValueNode." +msgstr "Usando el Valor de Nodo más referenciado." + +#: src/synfigapp/actions/valuedesclink.cpp:153 +#: src/synfigapp/actions/valuedesclink.cpp:161 +msgid "There's a tie for most referenced; using the animated ValueNode." +msgstr "Hay un lazo para el más referenciado; usando el Valor de Nodo animado." + +#: src/synfigapp/actions/valuedesclink.cpp:174 +#: src/synfigapp/actions/valuedesclink.cpp:180 +msgid "" +"There's a tie for most referenced, and both are animated; using the one with " +"the most waypoints." +msgstr "" +"Hay un lazo para el más referenciado; y ámbos son animados; usando el que " +"tiene mas interpolaciones." + +#: src/synfigapp/actions/valuedesclink.cpp:189 +#: src/synfigapp/actions/valuedesclink.cpp:195 +msgid "Everything is tied; using the least recently modified value." +msgstr "Todo esta enlazado; usando el valor más recientemente modificado." + +#: src/synfigapp/actions/valuedesclink.cpp:201 +msgid "Absolutely everything is tied." +msgstr "Absolutamente todo esta enlazado." + +#: src/synfigapp/actions/valuedesclink.cpp:209 +#, c-format +msgid "Cannot link two values of different types ('%s' and '%s')" +msgstr "No puedo enlazar dos valores de tipo diferente ('%s' y '%s')" + +#: src/synfigapp/actions/valuedesclink.cpp:246 +msgid "No ValueNodes were available, so one was created." +msgstr "No hay Valor de Nodo disponible, así que uno fue creado." + +#: src/synfigapp/actions/valuedescset.cpp:59 +msgid "Set ValueDesc" +msgstr "Establecer Descripción del Valor" + +#: src/synfigapp/actions/valuedescset.cpp:80 +#, c-format +msgid "Set %s" +msgstr "Establecer %s" + +#: src/synfigapp/actions/valuedescset.cpp:180 +#: src/synfigapp/actions/valuedescset.cpp:205 +#: src/synfigapp/actions/valuedescset.cpp:273 +#: src/synfigapp/actions/valuedescset.cpp:331 +#: src/synfigapp/actions/valuedescset.cpp:368 +#: src/synfigapp/actions/valuedescset.cpp:393 +#: src/synfigapp/actions/valuedescset.cpp:411 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:184 +msgid "Unable to find action value_desc_set (bug)" +msgstr "Imposible encontrar acción value_set_desc (error)" + +#: src/synfigapp/actions/valuedescset.cpp:262 +#, c-format +msgid "Bad type for composite (%s)" +msgstr "Mal tipo para composición (%s)" + +#: src/synfigapp/actions/valuedescset.cpp:321 +#, c-format +msgid "Bad type for radial composite (%s)" +msgstr "Mal tipo para composición radial (%s)" + +#: src/synfigapp/actions/valuedescset.cpp:497 +#: src/synfigapp/actions/valuedescset.cpp:544 +msgid "Direct manipulation of this ValueNode type is not yet supported" +msgstr "" +"Manipulación directa de este tipo de Valor de Nodo no esta soportada aún" + +#: src/synfigapp/actions/valuedescset.cpp:542 +msgid "You must be in Animate-Editing-Mode to directly manipulate this value" +msgstr "Debe estar en Modo de Edición de Animación para manipular este valor" + +#: src/synfigapp/actions/valuedescset.cpp:564 +msgid "Unsupported ValueDesc type" +msgstr "Tipo de Descripción de Valor no soportado" + +#: src/synfigapp/actions/valuenodeadd.cpp:49 +msgid "Add ValueNode" +msgstr "Añadir Valor de Nodo" + +#: src/synfigapp/actions/valuenodeadd.cpp:72 +msgid "New ValueNode" +msgstr "Nuevo Valor de Nodo" + +#: src/synfigapp/actions/valuenodeadd.cpp:73 +msgid "ValueNode to be added" +msgstr "Valor de Nodo a ser añadido" + +#: src/synfigapp/actions/valuenodeadd.cpp:122 +msgid "Parameter appears to already be exported" +msgstr "El parámetro parece que ya ha sido exportado" + +#: src/synfigapp/actions/valuenodeadd.cpp:131 +msgid "Another exported ValueBase with this name already exists" +msgstr "Ya existe Otro Valor Base exportado con este nombre" + +#: src/synfigapp/actions/valuenodeadd.cpp:135 +msgid "Exception caught on Add ValueNode." +msgstr "excepción atrapada al Añadir Valor de Nodo." + +#: src/synfigapp/actions/valuenodeadd.cpp:154 +msgid "Exception caught on Remove ValueNode." +msgstr "Atrapada excepción al Borrar Valor de Nodo." + +#: src/synfigapp/actions/valuenodeconstset.cpp:49 +msgid "Set ValueNode_Const" +msgstr "Establecer Valor de Nodo Constante" + +#: src/synfigapp/actions/valuenodeconstset.cpp:73 +#: src/synfigapp/actions/valuenoderename.cpp:82 +msgid "ValueNode_Const" +msgstr "Valor de Nodo Constante" + +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:49 +msgid "Insert Item" +msgstr "Insertar Elemento" + +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:87 +msgid "ValueNode to insert" +msgstr "Valor de Nodo a insertar" + +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:51 +msgid "Insert Item (Smart)" +msgstr "Insertar Elemento (inteligente)" + +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:205 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:259 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:158 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:176 +msgid "Unable to find action (bug)" +msgstr "Imposible encontrar acción (error)" + +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:221 +msgid "Unable to find action \"activepoint_set_off\"" +msgstr "Imposible encontrar acción \"active_point_set_off\"" + +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:240 +msgid "Unable to find action \"activepoint_set_on\"" +msgstr "Imposible encontrar acción \"active_point_set_on\"" + +#: src/synfigapp/actions/valuenodedynamiclistloop.cpp:49 +msgid "Loop" +msgstr "Bucle" + +#: src/synfigapp/actions/valuenodedynamiclistremove.cpp:49 +msgid "Remove Item" +msgstr "Borrar Elemento" + +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:50 +msgid "Remove Item (Smart)" +msgstr "Borrar Elemento (Inteligente)" + +#: src/synfigapp/actions/valuenodedynamiclistrotateorder.cpp:49 +msgid "Rotate Order" +msgstr "Rotar Orden" + +#: src/synfigapp/actions/valuenodedynamiclistunloop.cpp:49 +msgid "Unloop" +msgstr "Quitar Bucle" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:49 +msgid "Connect ValueNode Link" +msgstr "Conectar Enlace a Valor de Nodo" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:73 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:75 +msgid "Parent ValueNode" +msgstr "Valor de Nodo ascendiente" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:77 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:79 +msgid "Index" +msgstr "Índice" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:81 +msgid "ValueNode to be connected" +msgstr "Valor de Nodo a ser conectado" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:132 +#: src/synfigapp/actions/valuenodelinkconnect.cpp:151 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:135 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:159 +#, c-format +msgid "Bad index, too big. LinkCount=%d, Index=%d" +msgstr "Mal Índice, demasiado grande. LinkCount=%d, Index=%d" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:137 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:140 +msgid "Parent would not accept link" +msgstr "Ascendiente no aceptará el enlace" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:154 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:162 +msgid "Parent would not accept old link" +msgstr "Ascendiente no aceptará el enlace antiguo" + +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:50 +msgid "Disconnect ValueNode Link" +msgstr "Desconectar el Enlace del Valor de Nodo" + +#: src/synfigapp/actions/valuenoderemove.cpp:50 +msgid "Unexport" +msgstr "Des-exportar" + +#. TRANSLATORS: This is used in the 'history' dialog when a ValueNode is unexported. +#: src/synfigapp/actions/valuenoderemove.cpp:71 +#, c-format +msgid "Unexport '%s'" +msgstr "Des-exportar '%s'" + +#: src/synfigapp/actions/valuenoderename.cpp:50 +msgid "Rename ValueNode" +msgstr "Renombrar Valor de Nodo" + +#. TRANSLATORS: This is used in the 'history' dialog when a ValueNode is renamed. +#: src/synfigapp/actions/valuenoderename.cpp:71 +#, c-format +msgid "Rename ValueNode from '%s' to '%s'" +msgstr "Renombrar Valor de Nodo desde '%s' a '%s'" + +#: src/synfigapp/actions/valuenoderename.cpp:87 +msgid "The new name of the ValueNode" +msgstr "El nuevo nombre al Valor de Nodo" + +#: src/synfigapp/actions/valuenoderename.cpp:151 +msgid "A ValueNode with this ID already exists in this canvas" +msgstr "Un Valor de Nodo con este ID ya existe en este lienzo" + +#: src/synfigapp/actions/valuenoderename.cpp:169 +msgid "A ValueNode with the old ID already exists in this canvas (BUG)" +msgstr "Un Valor de Nodo con el antiguo ID ya existe en este lienzo (BUG)" + +#: src/synfigapp/actions/valuenodereplace.cpp:49 +msgid "Replace ValueNode" +msgstr "Reemplazar Valor de Nodo" + +#: src/synfigapp/actions/valuenodereplace.cpp:85 +msgid "Destination ValueNode" +msgstr "Valor de Nodo de Destino" + +#: src/synfigapp/actions/valuenodereplace.cpp:86 +msgid "ValueNode to replaced" +msgstr "Valor de Nodo a reemplazar" + +#: src/synfigapp/actions/valuenodereplace.cpp:91 +msgid "ValueNode that will replace the destination" +msgstr "Valor de Nodo que reemplazará al destino" + +#: src/synfigapp/actions/valuenodereplace.cpp:137 +#: src/synfigapp/actions/valuenodereplace.cpp:193 +msgid "Attempted to replace valuenode with itself" +msgstr "Intento de reemplazar un Valor de Nodo consigo mismo." + +#: src/synfigapp/actions/valuenodereplace.cpp:140 +#: src/synfigapp/actions/valuenodereplace.cpp:196 +msgid "You cannot replace ValueNodes with different types!" +msgstr "¡No puede reemplazar Valores de Nodo de diferentes tipos!" + +#: src/synfigapp/actions/valuenodereplace.cpp:163 +#: src/synfigapp/actions/valuenodereplace.cpp:201 +msgid "Nothing to replace." +msgstr "Nada a remplazar." + +#: src/synfigapp/actions/valuenodereplace.cpp:170 +#: src/synfigapp/actions/valuenodereplace.cpp:208 +msgid "Action Failure. This is a bug. Please report it." +msgstr "Acción Fallida. Esto es un error. Por favor informe del mismo." + +#: src/synfigapp/actions/valuenodereplace.cpp:188 +msgid "This action cannot be undone under these circumstances." +msgstr "Esta acción no puede ser deshecha bajo estas circunstancias." + +#: src/synfigapp/actions/valuenodereplace.cpp:213 +msgid ": (Undo) " +msgstr ": (Deshacer) " + +#: src/synfigapp/actions/waypointadd.cpp:50 +#: src/synfigapp/actions/waypointsetsmart.cpp:59 +msgid "Add Waypoint" +msgstr "Añadir Interpolación" + +#: src/synfigapp/actions/waypointadd.cpp:80 +#: src/synfigapp/actions/waypointsetsmart.cpp:89 +msgid "New Waypoint" +msgstr "Nueva Interpolación" + +#: src/synfigapp/actions/waypointadd.cpp:81 +#: src/synfigapp/actions/waypointsetsmart.cpp:90 +#: src/synfigapp/actions/waypointsimpleadd.cpp:79 +msgid "Waypoint to be added" +msgstr "Interpolación para ser añadida" + +#: src/synfigapp/actions/waypointadd.cpp:87 +#: src/synfigapp/actions/waypointsetsmart.cpp:101 +msgid "Time where waypoint is to be added" +msgstr "Tiempo donde se va a añadir la interpolación" + +#: src/synfigapp/actions/waypointadd.cpp:184 +#, c-format +msgid "A Waypoint already exists at this point in time (%s)" +msgstr "Una interpolación existe ya en ese punto en el tiempo (%s)" + +#: src/synfigapp/actions/waypointadd.cpp:187 +#: src/synfigapp/actions/waypointremove.cpp:180 +msgid "This waypoint is already in the ValueNode" +msgstr "Esta interpolación ya está en el Valor de Nodo" + +#: src/synfigapp/actions/waypointremove.cpp:49 +msgid "Remove Waypoint" +msgstr "Borrar Interpolación" + +#: src/synfigapp/actions/waypointremove.cpp:74 +msgid "ValueNode (Animated)" +msgstr "Valor de Nodo (Animado)" + +#: src/synfigapp/actions/waypointremove.cpp:79 +msgid "Waypoint to be Removed" +msgstr "Interpolación a ser Borrada" + +#: src/synfigapp/actions/waypointremove.cpp:124 +#, c-format +msgid "UniqueID mismatch, iter=%d, waypoint=%d" +msgstr "Descuadre de ID único;iter =%d, waypoint=%d" + +#: src/synfigapp/actions/waypointremove.cpp:127 +#, c-format +msgid "Time mismatch iter=%s, waypoint=%s" +msgstr "Descuadre de tiempo iter=%s, waypoint=%s" + +#: src/synfigapp/actions/waypointremove.cpp:141 +msgid "Unable to create ValueNode_Reference" +msgstr "Imposible crear Referencia al Valor de Nodo" + +#: src/synfigapp/actions/waypointremove.cpp:162 +msgid "" +"This animated value node should be empty, but for some reason it isn't. This " +"is a bug. (1)" +msgstr "" +"Este valor de nodo animado debería estar vacío, por alguna razón no lo está. " +"Esto es un error. (1)" + +#: src/synfigapp/actions/waypointremove.cpp:172 +msgid "" +"This animated value node should be empty, but for some reason it isn't. This " +"is a bug. (2)" +msgstr "" +"Este valor de nodo animado debería estar vacío, por alguna razón no lo está. " +"Esto es un error. (2)" + +#: src/synfigapp/actions/waypointremove.cpp:177 +msgid "A Waypoint already exists at this point in time" +msgstr "Una Interpolación ya existe en ese punto del tiempo" + +#: src/synfigapp/actions/waypointset.cpp:49 +msgid "Set Waypoint" +msgstr "Establecer Interpolación" + +#: src/synfigapp/actions/waypointset.cpp:78 +msgid "Waypoint to be changed" +msgstr "Interpolación a ser cambiada" + +#: src/synfigapp/actions/waypointset.cpp:133 +#: src/synfigapp/actions/waypointset.cpp:191 +#: src/synfigapp/actions/waypointset.cpp:235 +#: src/synfigapp/actions/waypointset.cpp:256 +msgid "Unable to find waypoint" +msgstr "Imposible encontrar Interpolación" + +#: src/synfigapp/actions/waypointsimpleadd.cpp:146 +msgid "The waypoint to remove no longer exists" +msgstr "La interpolación a borrar ya no existe" + +#: src/synfigapp/action_system.cpp:77 +msgid "Action is not ready." +msgstr "La acción no está preparada" + +#: src/synfigapp/action_system.cpp:109 +msgid "This action cannot be undone! Are you sure you want to continue?" +msgstr "¡Esta acción no puede deshacerse! ¿Esta seguro de querer continuar?" + +#: src/synfigapp/action_system.cpp:128 src/synfigapp/action_system.cpp:145 +#: src/synfigapp/action_system.cpp:156 +msgid "Failed" +msgstr "Fallido" + +#: src/synfigapp/action_system.cpp:189 +msgid "Successful" +msgstr "Éxito" + +#: src/synfigapp/action_system.cpp:222 src/synfigapp/action_system.cpp:224 +msgid " (Undo): " +msgstr "(Deshacer): " + +#: src/synfigapp/action_system.cpp:284 +msgid "Failed to undo." +msgstr "Fallado al deshacer" + +#: src/synfigapp/action_system.cpp:320 src/synfigapp/action_system.cpp:322 +msgid " (Redo): " +msgstr " (Rehacer): " + +#: src/synfigapp/action_system.cpp:382 +msgid "Failed to redo." +msgstr "Fallado al rehacer" + +#: src/synfigapp/action_system.cpp:698 +msgid "State restore failure" +msgstr "Fallo al restaurar estado" + +#: src/synfigapp/canvasinterface.cpp:160 +msgid "Action Not Ready, unable to change mode" +msgstr "Acción no preparada, imposible cambiar el modo" + +#: src/synfigapp/canvasinterface.cpp:166 +msgid "Unable to change mode" +msgstr "Imposible cambiar el modo" + +#: src/synfigapp/canvasinterface.cpp:183 +msgid "Add Layer To" +msgstr "Añadir Capa A" + +#: src/synfigapp/canvasinterface.cpp:288 src/synfigapp/canvasinterface.cpp:349 +#: src/synfigapp/canvasinterface.cpp:382 +msgid "Action Not Ready" +msgstr "Acción No Preparada" + +#: src/synfigapp/canvasinterface.cpp:294 src/synfigapp/canvasinterface.cpp:356 +#: src/synfigapp/canvasinterface.cpp:389 src/synfigapp/canvasinterface.cpp:477 +#: src/synfigapp/canvasinterface.cpp:494 src/synfigapp/canvasinterface.cpp:513 +#: src/synfigapp/canvasinterface.cpp:530 src/synfigapp/canvasinterface.cpp:695 +#: src/synfigapp/canvasinterface.cpp:720 src/synfigapp/canvasinterface.cpp:773 +msgid "Action Failed." +msgstr "Acció Fallida." + +#: src/synfigapp/canvasinterface.cpp:316 +msgid "Move Action Not Ready" +msgstr "Acción Mover No Preparada" + +#: src/synfigapp/canvasinterface.cpp:322 +msgid "Move Action Failed." +msgstr "Acción Mover Falida." + +#: src/synfigapp/canvasinterface.cpp:365 +msgid "Empty name!" +msgstr "¡Nombre vacío!" + +#: src/synfigapp/canvasinterface.cpp:571 +msgid "Filename must have an extension!" +msgstr "¡El archivo debe terner una extensión!" + +#: src/synfigapp/canvasinterface.cpp:585 +msgid "Unable to open this composition" +msgstr "Imposible abrir esta composición" + +#: src/synfigapp/canvasinterface.cpp:589 +msgid "Unable to create \"Paste Canvas\" layer" +msgstr "Impsible crear capa \"Lienzo Pegado\"" + +#: src/synfigapp/canvasinterface.cpp:604 +msgid "" +"Uncaught exception when attempting\n" +"to open this composition -- " +msgstr "" +"Excepción sin atrapar cuando se intentaba\n" +"abrir esta composición" + +#: src/synfigapp/canvasinterface.cpp:610 +msgid "I don't know how to open images of this type -- " +msgstr "No se como abrir imágenes de este tipo -- " + +#: src/synfigapp/canvasinterface.cpp:765 +#, c-format +msgid "Unnamed%08d" +msgstr "Sin Nombre%08d" + +#: src/synfigapp/canvasinterface.cpp:796 +msgid "" +"The value you are trying to edit is in a composition\n" +"which doesn't seem to be open. Open that composition and you\n" +"should be able to edit this value as normal." +msgstr "" +"El valor que esta intentando editar esta en una composición\n" +"que parece que no está abierta. Abra esa composición y podrá\n" +"editar este valor normalmente." + +#: src/synfigapp/uimanager.cpp:56 src/synfigapp/uimanager.cpp:83 +msgid "(no/yes)" +msgstr "(no/si)" + +#: src/synfigapp/uimanager.cpp:58 src/synfigapp/uimanager.cpp:85 +msgid "(yes/no)" +msgstr "(si/no)" + +#: src/synfigapp/uimanager.cpp:110 +msgid "(cancel/ok)" +msgstr "(cancelar/ok)" + +#: src/synfigapp/uimanager.cpp:112 +msgid "(ok/cancel)" +msgstr "(ok/cancelar)" + +#: src/synfigapp/uimanager.cpp:142 +msgid "error: " +msgstr "error: " + +#: src/synfigapp/uimanager.cpp:149 +msgid "warning: " +msgstr "aviso: " + +#: src/synfigapp/value_desc.cpp:60 +msgid "Layer Parameter" +msgstr "Parámetro de la Capa" + +#: src/synfigapp/value_desc.cpp:71 +msgid "Value Node" +msgstr "Valor de Nodo" + +#: src/synfigapp/value_desc.cpp:81 +msgid "Exported ValueNode" +msgstr "Valor de Nodo Exportado" diff --git a/synfig-studio/po/fr.po b/synfig-studio/po/fr.po new file mode 100644 index 0000000..d0b9465 --- /dev/null +++ b/synfig-studio/po/fr.po @@ -0,0 +1,4450 @@ +# translation of fr.po to +# French translations for Synfig Studio package. +# Copyright (C) 2007 Synfig Contributors +# This file is distributed under the same license as the Synfig Studio package. +# Aurore D , 2007. +# +msgid "" +msgstr "" +"Project-Id-Version: fr\n" +"Report-Msgid-Bugs-To: http://synfig.org/Bugs\n" +"POT-Creation-Date: 2008-10-06 14:28+0800\n" +"PO-Revision-Date: 2008-10-06 09:13+0200\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: KBabel 1.11.4\n" + +#: src/gtkmm/about.cpp:104 +msgid "2D vector animation studio" +msgstr "Studio d'animation vectorielle 2D" + +#: src/gtkmm/about.cpp:108 +msgid "Visit the Synfig website" +msgstr "Visiter le site de Synfig" + +#: src/gtkmm/about.cpp:110 +msgid "" +"Copyright 2001-2008\n" +"Robert B. Quattlebaum Jr.,\n" +"Adrian Bentley and Synfig contributors" +msgstr "" +"Copyright 2001-2008\n" +"Robert B. Quattlebaum Jr.,\n" +"Adrian Bentley et les contributeurs Synfig" + +#. TRANSLATORS: change this to your name, separate multiple names with \n +#: src/gtkmm/about.cpp:166 +msgid "translator-credits" +msgstr "Aurore D (rore)" + +#: src/gtkmm/about.cpp:193 +#, c-format +msgid "" +"\n" +"Development version:\n" +"%s\n" +msgstr "" +"\n" +"Version de développement :\n" +"%s\n" + +#: src/gtkmm/about.cpp:198 +#, c-format +msgid "Built on %s\n" +msgstr "Compilé sur %s\n" + +#: src/gtkmm/about.cpp:202 +msgid "Built with:\n" +msgstr "Compilé avec : \n" + +#: src/gtkmm/about.cpp:203 +#, c-format +msgid "ETL %s\n" +msgstr "ETL %s\n" + +#: src/gtkmm/about.cpp:204 +#, c-format +msgid "Synfig API %s\n" +msgstr "API Synfig %s\n" + +#: src/gtkmm/about.cpp:205 +#, c-format +msgid "Synfig library %d\n" +msgstr "Bibliothèque Synfig %d\n" + +#: src/gtkmm/about.cpp:206 +#, c-format +msgid "GTK+ %d.%d.%d\n" +msgstr "GTK+ %d.%d.%d\n" + +#: src/gtkmm/about.cpp:208 +#, c-format +msgid "GNU G++ %d.%d.%d\n" +msgstr "GNU G++ %d.%d.%d\n" + +#: src/gtkmm/about.cpp:213 +msgid "Using:\n" +msgstr "Utilise :\n" + +#: src/gtkmm/about.cpp:214 +#, c-format +msgid "Synfig %s\n" +msgstr "Synfig %s\n" + +#: src/gtkmm/about.cpp:215 +#, c-format +msgid "GTK+ %d.%d.%d" +msgstr "GTK+ %d.%d.%d" + +#: src/gtkmm/app.cpp:665 src/gtkmm/toolbox.cpp:281 +msgid "_File" +msgstr "_Fichier" + +#: src/gtkmm/app.cpp:666 src/gtkmm/canvasview.cpp:3320 +msgid "_Edit" +msgstr "_Édition" + +#: src/gtkmm/app.cpp:667 +msgid "_View" +msgstr "_Affichage" + +#: src/gtkmm/app.cpp:668 +msgid "_Canvas" +msgstr "_Canevas" + +#: src/gtkmm/app.cpp:669 +msgid "_Layer" +msgstr "Ca_lque" + +#: src/gtkmm/app.cpp:670 +msgid "Show/Hide Ducks" +msgstr "Afficher/Masquer les poignées" + +#: src/gtkmm/app.cpp:671 +msgid "Preview Quality" +msgstr "Qualité de l'aperçu" + +#: src/gtkmm/app.cpp:672 +msgid "Low-Res Pixel Size" +msgstr "Taille de pixel en basse résolution" + +#: src/gtkmm/app.cpp:673 src/gtkmm/canvasview.cpp:2265 +#: src/synfigapp/actions/layeradd.cpp:82 +msgid "New Layer" +msgstr "Nouveau calque" + +#: src/gtkmm/app.cpp:674 src/synfigapp/actions/keyframeduplicate.cpp:79 +#: src/synfigapp/actions/keyframeremove.cpp:78 +#: src/synfigapp/actions/keyframesetdelta.cpp:79 +#: src/synfigapp/actions/keyframewaypointset.cpp:78 +msgid "Keyframe" +msgstr "Image Clé" + +#: src/gtkmm/app.cpp:675 src/gtkmm/iconcontroller.cpp:163 +#: src/synfigapp/actions/groupaddlayers.cpp:78 +#: src/synfigapp/actions/groupremove.cpp:72 +msgid "Group" +msgstr "Groupe" + +#: src/gtkmm/app.cpp:676 +msgid "State" +msgstr "État" + +#: src/gtkmm/app.cpp:677 +msgid "Toolbox" +msgstr "Boîte à outils" + +#: src/gtkmm/app.cpp:694 src/gtkmm/keyframeactionmanager.cpp:239 +msgid "Keyframe Properties" +msgstr "Propriétés de l'image clé" + +#: src/gtkmm/app.cpp:705 src/gtkmm/canvasview.cpp:1206 +msgid "Import" +msgstr "Importer" + +#: src/gtkmm/app.cpp:706 src/gtkmm/canvasview.cpp:1209 +msgid "Render" +msgstr "Rendu" + +#: src/gtkmm/app.cpp:707 src/gtkmm/canvasview.cpp:1212 +#: src/gtkmm/dialog_preview.cpp:171 +msgid "Preview" +msgstr "Aperçu" + +#: src/gtkmm/app.cpp:708 +msgid "Preview Dialog" +msgstr "Dialogue d'aperçu" + +#: src/gtkmm/app.cpp:709 src/gtkmm/canvasview.cpp:1215 +msgid "Sound File" +msgstr "Fichier audio" + +#: src/gtkmm/app.cpp:710 src/gtkmm/canvasoptions.cpp:151 +#: src/gtkmm/canvasview.cpp:1218 +msgid "Options" +msgstr "Options" + +#: src/gtkmm/app.cpp:711 +msgid "Close View" +msgstr "Fermer la vue" + +#: src/gtkmm/app.cpp:712 src/gtkmm/canvasview.cpp:1224 +msgid "Close Document" +msgstr "Fermer le document" + +#: src/gtkmm/app.cpp:721 src/gtkmm/canvasview.cpp:1239 +msgid "Select All Ducks" +msgstr "Sélectionner toutes les poignées" + +#: src/gtkmm/app.cpp:722 src/gtkmm/canvasview.cpp:1243 +msgid "Unselect All Ducks" +msgstr "Délectionner toutes les poignées" + +#: src/gtkmm/app.cpp:723 src/gtkmm/canvasview.cpp:1247 +msgid "Select All Layers" +msgstr "Selectionner tous les calques" + +#: src/gtkmm/app.cpp:724 src/gtkmm/canvasview.cpp:1251 +msgid "Unselect All Layers" +msgstr "Déselectionner tous les calques" + +#: src/gtkmm/app.cpp:725 src/gtkmm/canvasproperties.cpp:197 +msgid "Properties" +msgstr "Propriétés" + +#: src/gtkmm/app.cpp:727 src/gtkmm/canvasview.cpp:1417 +msgid "Show Position Ducks" +msgstr "Afficher les poignées de position" + +#: src/gtkmm/app.cpp:728 src/gtkmm/canvasview.cpp:1419 +msgid "Show Vertex Ducks" +msgstr "Afficher les poignées de sommet" + +#: src/gtkmm/app.cpp:729 src/gtkmm/canvasview.cpp:1418 +msgid "Show Tangent Ducks" +msgstr "Afficher les tangentes" + +#: src/gtkmm/app.cpp:730 src/gtkmm/canvasview.cpp:1420 +msgid "Show Radius Ducks" +msgstr "Afficher les poignées de rayon" + +#: src/gtkmm/app.cpp:731 src/gtkmm/canvasview.cpp:1421 +msgid "Show Width Ducks" +msgstr "Afficher les poignées de largeur" + +#: src/gtkmm/app.cpp:732 src/gtkmm/canvasview.cpp:1422 +msgid "Show Angle Ducks" +msgstr "Afficher les poignées d'angle" + +#: src/gtkmm/app.cpp:733 src/gtkmm/canvasview.cpp:1270 +msgid "Use Parametric Renderer" +msgstr "Rendu paramétrique" + +#: src/gtkmm/app.cpp:734 +msgid "Use Quality Level 1" +msgstr "Qualité niveau 1" + +#: src/gtkmm/app.cpp:735 +msgid "Use Quality Level 2" +msgstr "Qualité niveau 2" + +#: src/gtkmm/app.cpp:736 +msgid "Use Quality Level 3" +msgstr "Qualité niveau 3" + +#: src/gtkmm/app.cpp:737 +msgid "Use Quality Level 4" +msgstr "Qualité niveau 4" + +#: src/gtkmm/app.cpp:738 +msgid "Use Quality Level 5" +msgstr "Qualité niveau 5" + +#: src/gtkmm/app.cpp:739 +msgid "Use Quality Level 6" +msgstr "Qualité niveau 6" + +#: src/gtkmm/app.cpp:740 +msgid "Use Quality Level 7" +msgstr "Qualité niveau 7" + +#: src/gtkmm/app.cpp:741 +msgid "Use Quality Level 8" +msgstr "Qualité niveau 8" + +#: src/gtkmm/app.cpp:742 +msgid "Use Quality Level 9" +msgstr "Qualité niveau 9" + +#: src/gtkmm/app.cpp:743 +msgid "Use Quality Level 10" +msgstr "Qualité niveau 10" + +#: src/gtkmm/app.cpp:745 src/gtkmm/canvasview.cpp:1304 +#, c-format +msgid "Set Low-Res pixel size to %d" +msgstr "Définir la taille des pixels basse-résolution à %d" + +#: src/gtkmm/app.cpp:746 src/gtkmm/preview.cpp:358 +msgid "Play" +msgstr "Jouer" + +#: src/gtkmm/app.cpp:748 src/gtkmm/canvasview.cpp:994 +#: src/gtkmm/preview.cpp:364 +msgid "Stop" +msgstr "Arrêter" + +#: src/gtkmm/app.cpp:749 +msgid "Toggle Grid Show" +msgstr "Basculer l'affichage de la grille" + +#: src/gtkmm/app.cpp:750 +msgid "Toggle Grid Snap" +msgstr "Basculer l'adhérence de la grille" + +#: src/gtkmm/app.cpp:751 +msgid "Toggle Guide Show" +msgstr "Basculer l'affichage des guides" + +#: src/gtkmm/app.cpp:752 +msgid "Toggle Low-Res" +msgstr "Basculer en/hors basse résolution" + +#: src/gtkmm/app.cpp:753 src/gtkmm/canvasview.cpp:1320 +msgid "Decrease Low-Res Pixel Size" +msgstr "Diminuer la taille des pixels basse-résolution" + +#: src/gtkmm/app.cpp:754 src/gtkmm/canvasview.cpp:1323 +msgid "Increase Low-Res Pixel Size" +msgstr "Augmenter la taille des pixels basse-résolution" + +#: src/gtkmm/app.cpp:755 +msgid "Toggle Onion Skin" +msgstr "Basculer l'onion skin" + +#: src/gtkmm/app.cpp:762 src/gtkmm/canvasview.cpp:1386 +msgid "Jump to Next Keyframe" +msgstr "Aller à l'image clé suivante" + +#: src/gtkmm/app.cpp:763 src/gtkmm/canvasview.cpp:1389 +msgid "Jump to Prev Keyframe" +msgstr "Aller à l'image clé précédente" + +#: src/gtkmm/app.cpp:764 src/gtkmm/canvasview.cpp:1370 +msgid "Next Frame" +msgstr "Image suivante" + +#: src/gtkmm/app.cpp:765 src/gtkmm/canvasview.cpp:1372 +msgid "Prev Frame" +msgstr "Image précédente" + +#: src/gtkmm/app.cpp:766 src/gtkmm/canvasview.cpp:1375 +msgid "Seek Forward" +msgstr "Avancer" + +#: src/gtkmm/app.cpp:767 src/gtkmm/canvasview.cpp:1377 +msgid "Seek Backward" +msgstr "Reculer" + +#: src/gtkmm/app.cpp:768 src/gtkmm/canvasview.cpp:1383 +msgid "Seek to Begin" +msgstr "Aller au début" + +#: src/gtkmm/app.cpp:769 src/gtkmm/canvasview.cpp:1380 +msgid "Seek to End" +msgstr "Aller à la fin" + +#: src/gtkmm/app.cpp:771 +msgid "Add group" +msgstr "Ajouter un groupe" + +#: src/gtkmm/app.cpp:773 src/gtkmm/iconcontroller.cpp:158 +#: src/synfigapp/actions/canvasadd.cpp:73 +msgid "New Canvas" +msgstr "Nouveau canevas" + +#: src/gtkmm/app.cpp:775 src/gtkmm/layeractionmanager.cpp:104 +#: src/gtkmm/layeractionmanager.cpp:494 +msgid "Increase Amount" +msgstr "Augmenter la visibilité" + +#: src/gtkmm/app.cpp:776 src/gtkmm/layeractionmanager.cpp:116 +#: src/gtkmm/layeractionmanager.cpp:511 +msgid "Decrease Amount" +msgstr "Diminuer la visibilité" + +#: src/gtkmm/app.cpp:1134 src/gtkmm/toolbox.cpp:359 +msgid "Synfig Studio" +msgstr "Synfig Studio" + +#: src/gtkmm/app.cpp:1147 +msgid "Failed to initialize synfig!" +msgstr "Échec de l'initialisation de Synfig" + +#: src/gtkmm/app.cpp:1156 +msgid "Init UI Manager..." +msgstr "Initialisation du gestionaire d'interface" + +#: src/gtkmm/app.cpp:1160 +msgid "Init Dock Manager..." +msgstr "Initialisation du gestionnaire d'onglet" + +#: src/gtkmm/app.cpp:1163 +msgid "Init State Manager..." +msgstr "Initialisation du gestionnaire d'état" + +#: src/gtkmm/app.cpp:1166 +msgid "Init Toolbox..." +msgstr "Initialisation de la boîte à outils" + +#: src/gtkmm/app.cpp:1169 +msgid "Init About Dialog..." +msgstr "Initialisation du dialogue \"à propos\"" + +#: src/gtkmm/app.cpp:1172 +msgid "Init Tool Options..." +msgstr "Initialisation des options des outils" + +#: src/gtkmm/app.cpp:1176 +msgid "Init History..." +msgstr "Initialisation de l'historique" + +#: src/gtkmm/app.cpp:1180 +msgid "Init Canvases..." +msgstr "Initialisation des canevas" + +#: src/gtkmm/app.cpp:1184 +msgid "Init Keyframes..." +msgstr "Initialisation des images clés" + +#: src/gtkmm/app.cpp:1188 +msgid "Init Layers..." +msgstr "Initialisation des calques" + +#: src/gtkmm/app.cpp:1192 +msgid "Init Params..." +msgstr "Initialisation des paramètres" + +#: src/gtkmm/app.cpp:1196 +msgid "Init MetaData..." +msgstr "Initialisation des métadonnées" + +#: src/gtkmm/app.cpp:1200 +msgid "Init Children..." +msgstr "Initialisation des éléments enfant " + +#: src/gtkmm/app.cpp:1204 +msgid "Init Info..." +msgstr "Initialisation du dialogue d'info" + +#: src/gtkmm/app.cpp:1208 +msgid "Init Navigator..." +msgstr "Initialisation du navigateur" + +#: src/gtkmm/app.cpp:1212 +msgid "Init Timetrack..." +msgstr "Initialisation de l'axe de temps" + +#: src/gtkmm/app.cpp:1216 +msgid "Init Curve Editor..." +msgstr "Initialisation de l'éditeur de courbes" + +#: src/gtkmm/app.cpp:1220 +msgid "Init Layer Groups..." +msgstr "Initialisation des groupes de calques" + +#: src/gtkmm/app.cpp:1225 +msgid "Init Color Dialog..." +msgstr "Initialisation du dialogue de couleur" + +#: src/gtkmm/app.cpp:1228 +msgid "Init Gradient Dialog..." +msgstr "Initialisation du dialogue de dégradé" + +#: src/gtkmm/app.cpp:1231 +msgid "Init DeviceTracker..." +msgstr "Initialisation du traqueur de périphériques" + +#: src/gtkmm/app.cpp:1234 +msgid "Init Tools..." +msgstr "Initialisation des outils" + +#: src/gtkmm/app.cpp:1241 +msgid "Init ModMirror..." +msgstr "Initialisation de ModMiroir" + +#: src/gtkmm/app.cpp:1263 +msgid "Init ModPalette..." +msgstr "Initialisation de ModPalette" + +#: src/gtkmm/app.cpp:1266 +msgid "Init Setup Dialog..." +msgstr "Initialisation du dialogue de configuration" + +#: src/gtkmm/app.cpp:1269 +msgid "Init Input Dialog..." +msgstr "Initialisation du dialogue d'entrée" + +#: src/gtkmm/app.cpp:1274 +msgid "Init auto recovery..." +msgstr "Initialisation de l'auto-restauration " + +#: src/gtkmm/app.cpp:1278 +msgid "Loading Settings..." +msgstr "Chargement de la configuration ..." + +#: src/gtkmm/app.cpp:1280 +msgid "Checking auto-recover..." +msgstr "Vérification de l'auto-restauration" + +#: src/gtkmm/app.cpp:1288 +msgid "Auto Recovery" +msgstr "Auto-restauration" + +#: src/gtkmm/app.cpp:1289 +msgid "" +"Synfig Studio seems to have crashed\n" +"before you could save all your files.\n" +"Would you like to re-open those files\n" +"and recover your unsaved changes?" +msgstr "" +"Il semblerait que Synfig se soit terminé\n" +"brutalement avant la sauvegarde de tous\n" +"vos fichiers.\n" +"Voulez-vous réouvrir ces fichiers et récupérer\n" +"vos modifications non enregistrées ?" + +#: src/gtkmm/app.cpp:1298 +msgid "Unable to fully recover from previous crash" +msgstr "Impossible de récupérer la session" + +#: src/gtkmm/app.cpp:1300 +msgid "Unable to recover from previous crash" +msgstr "Impossible de récupérer la session" + +#: src/gtkmm/app.cpp:1303 +msgid "" +"Synfig Studio has attempted to recover\n" +"from a previous crash. The files that it has\n" +"recovered are NOT YET SAVED. It would be a good\n" +"idea to review them and save them now." +msgstr "" +"Synfig Studio a essayé de récupérer la session d'avant\n" +"le dernier plantage. Les fichiers qui ont été récupérés ne\n" +"sont PAS ENCORE ENREGISTRÉS. Pensez à vérifier leur\n" +"état et à les enregistrer maintenant." + +#: src/gtkmm/app.cpp:1319 +msgid "Loading files..." +msgstr "Chargement des fichiers ..." + +#: src/gtkmm/app.cpp:1330 +msgid "Done." +msgstr "Fini." + +#: src/gtkmm/app.cpp:1337 src/gtkmm/app.cpp:1341 +msgid "" +"Unknown exception caught when constructing App.\n" +"This software may be unstable." +msgstr "" +"Une exception inconnue est survenue lors de l'initialisation de " +"l'application. Ce programme risque d'être instable." + +#: src/gtkmm/app.cpp:1752 +msgid "Quit Request" +msgstr "Demande d'arrêt" + +#: src/gtkmm/app.cpp:1755 +msgid "Cannot quit!" +msgstr "Impossible d'arrêter" + +#: src/gtkmm/app.cpp:1755 +msgid "" +"Tasks are currently running.\n" +"Please cancel the current tasks and try again" +msgstr "" +"Des tâches sont actuellement en cours.\n" +"Annulez les tâches courantes et réessayez." + +#: src/gtkmm/app.cpp:1823 +msgid "Quit Request sent" +msgstr "Demande d'arrêt envoyée" + +#: src/gtkmm/app.cpp:2040 +msgid "current" +msgstr "courant " + +#: src/gtkmm/app.cpp:2043 +msgid "and older" +msgstr "et ancien" + +#: src/gtkmm/app.cpp:2047 +msgid "File Format Version: " +msgstr "Version du format de fichier : " + +#: src/gtkmm/app.cpp:2146 +msgid "Feature not available" +msgstr "Fonctionnalité non disponible." + +#: src/gtkmm/app.cpp:2147 +msgid "Sorry, this feature has not yet been implemented." +msgstr "Désolé, cette fonctionnalité n'a pas encore été implémentée." + +#: src/gtkmm/app.cpp:2232 +msgid "Documentation" +msgstr "Documentation" + +#: src/gtkmm/app.cpp:2233 +msgid "" +"Documentation for Synfig Studio is available on the website:\n" +"\n" +"http://www.synfig.org/Documentation" +msgstr "" +"La documentation de Synfig studio est disponilbe sur le site :\n" +"\n" +"http://www.synfig.org/Documentation" + +#: src/gtkmm/app.cpp:2234 src/gtkmm/toolbox.cpp:298 +msgid "Help" +msgstr "Aide" + +#: src/gtkmm/app.cpp:2244 +msgid "No browser was found. Please load this website manually:" +msgstr "Navigateur non trouvé. Chargez le site manuellement s'il vous plaît :" + +#: src/gtkmm/app.cpp:2246 +msgid "No browser found" +msgstr "Aucun navigateur trouvé" + +#: src/gtkmm/app.cpp:2354 +#, c-format +msgid "Unable to open file \"%s\"" +msgstr "Impossible d'ouvrir le fichier \"%s\"" + +#: src/gtkmm/app.cpp:2362 +#, c-format +msgid "Unable to create instance for \"%s\"" +msgstr "Impossible de créer une instance pour \"%s\"" + +#: src/gtkmm/app.cpp:2368 src/gtkmm/iconcontroller.cpp:188 +#: src/gtkmm/instance.cpp:559 +msgid "CVS Update" +msgstr "Mise à jour CVS (update)" + +#: src/gtkmm/app.cpp:2368 +msgid "" +"There appears to be a newer version of this file available on the CVS " +"repository.\n" +"Would you like to update now? (It would probably be a good idea)" +msgstr "" +"Il semble qu'une version plus récente de ce fichier soit disponible dans le " +"dépôt CVS.\n" +"Voulez-vous mettre à jour maintenant ? (ce serait probablement une bonne " +"idée)" + +#: src/gtkmm/app.cpp:2374 src/gtkmm/app.cpp:2379 src/gtkmm/instance.cpp:481 +#: src/gtkmm/instance.cpp:497 src/gtkmm/instance.cpp:509 +#: src/gtkmm/instance.cpp:520 src/gtkmm/instance.cpp:534 +#: src/gtkmm/instance.cpp:545 src/gtkmm/instance.cpp:575 +#: src/gtkmm/instance.cpp:586 src/gtkmm/instance.cpp:602 +#: src/gtkmm/instance.cpp:611 src/gtkmm/layerparamtreestore.cpp:246 +#: src/gtkmm/widget_canvaschooser.cpp:145 +#: src/gtkmm/widget_canvaschooser.cpp:163 +msgid "Error" +msgstr "Erreur" + +#: src/gtkmm/app.cpp:2379 +msgid "Uncaught error on file open (BUG)" +msgstr "Erreur inconnue à l'ouverture du fichier" + +#: src/gtkmm/app.cpp:2433 +msgid "Unable to open file" +msgstr "Impossible d'ouvrir le fichier" + +#: src/gtkmm/canvasoptions.cpp:61 +msgid "Canvas Options" +msgstr "Options du canevas" + +#: src/gtkmm/canvasoptions.cpp:63 +msgid "_Snap to grid" +msgstr "Faire adhérer à la grille" + +#: src/gtkmm/canvasoptions.cpp:64 +msgid "S_how grid" +msgstr "Affic_her la grille" + +#: src/gtkmm/canvasoptions.cpp:65 +msgid "Snap to _frame" +msgstr "Faire adhérer aux images " + +#: src/gtkmm/canvasoptions.cpp:80 +msgid "Grid" +msgstr "Grille" + +#: src/gtkmm/canvasoptions.cpp:90 +msgid "_Grid size" +msgstr "Taille de la _grille" + +#: src/gtkmm/canvasoptions.cpp:104 src/gtkmm/iconcontroller.cpp:142 +#: src/gtkmm/keyframetree.cpp:62 src/gtkmm/renddesc.cpp:96 +#: src/synfigapp/actions/activepointadd.cpp:85 +#: src/synfigapp/actions/activepointsetoff.cpp:92 +#: src/synfigapp/actions/activepointseton.cpp:92 +#: src/synfigapp/actions/activepointsetsmart.cpp:92 +#: src/synfigapp/actions/blinepointtangentmerge.cpp:91 +#: src/synfigapp/actions/blinepointtangentsplit.cpp:91 +#: src/synfigapp/actions/colorset.cpp:83 +#: src/synfigapp/actions/gradientset.cpp:83 +#: src/synfigapp/actions/keyframeduplicate.cpp:84 +#: src/synfigapp/actions/layerparamdisconnect.cpp:83 +#: src/synfigapp/actions/valuedescblinelink.cpp:89 +#: src/synfigapp/actions/valuedescconvert.cpp:102 +#: src/synfigapp/actions/valuedescdisconnect.cpp:94 +#: src/synfigapp/actions/valuedescset.cpp:100 +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:79 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:81 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:80 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:83 +#: src/synfigapp/actions/waypointadd.cpp:86 +#: src/synfigapp/actions/waypointsetsmart.cpp:100 +msgid "Time" +msgstr "Temps" + +#: src/gtkmm/canvasoptions.cpp:113 src/gtkmm/dialog_setup.cpp:177 +msgid "Units" +msgstr "Unités" + +#: src/gtkmm/canvasoptions.cpp:114 +msgid "Not yet implemented!" +msgstr "Pas encore implémenté !" + +#: src/gtkmm/canvasoptions.cpp:169 src/gtkmm/dialog_keyframe.cpp:89 +msgid "Not yet implemented" +msgstr "Pas encore implémenté" + +#: src/gtkmm/canvasproperties.cpp:64 +msgid "Canvas Properties" +msgstr "Propriétés du canevas" + +#: src/gtkmm/canvasproperties.cpp:77 +msgid "Canvas Info" +msgstr "Infos sur le canevas" + +#: src/gtkmm/canvasproperties.cpp:79 +msgid "Canvas Info" +msgstr "Infos sur le canevas" + +#: src/gtkmm/canvasproperties.cpp:95 +msgid "_ID" +msgstr "_Identifiant" + +#: src/gtkmm/canvasproperties.cpp:101 +msgid "_Name" +msgstr "_Nom" + +#: src/gtkmm/canvasproperties.cpp:104 +msgid "_Description" +msgstr "_Description" + +#: src/gtkmm/canvasproperties.cpp:146 src/gtkmm/dock_metadata.cpp:69 +msgid "Key" +msgstr "Clé" + +#: src/gtkmm/canvasproperties.cpp:147 src/gtkmm/dock_metadata.cpp:70 +msgid "Data" +msgstr "Données" + +#: src/gtkmm/canvasproperties.cpp:182 src/gtkmm/dock_metadata.cpp:134 +msgid "New MetaData Entry" +msgstr "Nouvelle métadonnée" + +#: src/gtkmm/canvasproperties.cpp:182 src/gtkmm/dock_metadata.cpp:134 +msgid "Please enter the name of the key" +msgstr "Saisissez le nom de la clé " + +#: src/gtkmm/canvasproperties.cpp:226 +msgid "Edit Canvas Properties" +msgstr "Modifier les propriétés du canevas" + +#: src/gtkmm/canvastreestore.cpp:204 src/gtkmm/canvastreestore.cpp:242 +#: src/gtkmm/childrentreestore.cpp:204 src/gtkmm/iconcontroller.cpp:149 +#: src/synfigapp/action.cpp:468 +msgid "Canvas" +msgstr "Canevas" + +#: src/gtkmm/canvastreestore.cpp:241 src/gtkmm/childrentreestore.cpp:201 +#: src/gtkmm/instance.cpp:415 +msgid "[Unnamed]" +msgstr "[Sans nom]" + +#: src/gtkmm/canvasview.cpp:241 src/gtkmm/workarea.cpp:2344 +#: src/gtkmm/workarea.cpp:2439 +msgid "Idle" +msgstr "En attente" + +#: src/gtkmm/canvasview.cpp:331 +msgid "ERROR" +msgstr "ERREUR" + +#: src/gtkmm/canvasview.cpp:380 +msgid "Feature not yet implemented" +msgstr "Fonctionnalité pas encore implémentée" + +#: src/gtkmm/canvasview.cpp:926 +msgid "Moves the time window" +msgstr "Déplacer l'axe temporel" + +#: src/gtkmm/canvasview.cpp:927 +msgid "Changes the current time" +msgstr "Changer l'instant courant" + +#: src/gtkmm/canvasview.cpp:936 +msgid "Animate" +msgstr "Animer" + +#: src/gtkmm/canvasview.cpp:940 src/gtkmm/canvasview.cpp:2533 +#: src/gtkmm/iconcontroller.cpp:182 +msgid "All Keyframes Locked" +msgstr "Images clés toutes verrouillées" + +#: src/gtkmm/canvasview.cpp:995 +msgid "Refresh" +msgstr "Rafraîchir" + +#: src/gtkmm/canvasview.cpp:1221 +msgid "Close Window" +msgstr "Fermer la fenêtre" + +#: src/gtkmm/canvasview.cpp:1227 +msgid "Quit" +msgstr "Quitter" + +#: src/gtkmm/canvasview.cpp:1279 +msgid " (best)" +msgstr "(meilleure)" + +#: src/gtkmm/canvasview.cpp:1280 +msgid " (fastest)" +msgstr "(rapide)" + +#: src/gtkmm/canvasview.cpp:1282 +#, c-format +msgid "Set Quality to %d" +msgstr "Qualité à %d" + +#: src/gtkmm/canvasview.cpp:1332 +msgid "Flipbook Dialog" +msgstr "Revoir l'aperçu" + +#: src/gtkmm/canvasview.cpp:1339 src/gtkmm/iconcontroller.cpp:164 +msgid "Show Grid" +msgstr "Afficher la grille" + +#: src/gtkmm/canvasview.cpp:1343 +msgid "Snap to Grid" +msgstr "Faire adhérer à la grille" + +#: src/gtkmm/canvasview.cpp:1347 +msgid "Show Guides" +msgstr "Afficher les guides" + +#: src/gtkmm/canvasview.cpp:1351 +msgid "Use Low-Res" +msgstr "Utiliser la basse résolution" + +#: src/gtkmm/canvasview.cpp:1355 +msgid "Show Onion Skin" +msgstr "Afficher l'onion skin" + +#: src/gtkmm/canvasview.cpp:1398 +msgid "Zoom In on Timeline" +msgstr "Zoomer sur l'axe de temps" + +#: src/gtkmm/canvasview.cpp:1401 +msgid "Zoom Out on Timeline" +msgstr "Dézoomer sur l'axe de temps" + +#: src/gtkmm/canvasview.cpp:1807 src/gtkmm/canvasview.cpp:2268 +msgid "Select All Children" +msgstr "Sélectionner tous les enfants" + +#: src/gtkmm/canvasview.cpp:2081 +msgid "-MODIFIED" +msgstr "-MODIFIÉ" + +#: src/gtkmm/canvasview.cpp:2083 +msgid "-UPDATED" +msgstr "-MIS À JOUR" + +#: src/gtkmm/canvasview.cpp:2088 +msgid " (Root)" +msgstr "(Racine)" + +#: src/gtkmm/canvasview.cpp:2512 +msgid "In Animate Editing Mode" +msgstr "En mode Édition d'animation" + +#: src/gtkmm/canvasview.cpp:2522 +msgid "Not in Animate Editing Mode" +msgstr "Hors mode Édition d'animation" + +#: src/gtkmm/canvasview.cpp:2543 src/gtkmm/iconcontroller.cpp:184 +msgid "Future Keyframes Locked" +msgstr "Images clés suivantes verrouillées" + +#: src/gtkmm/canvasview.cpp:2553 src/gtkmm/iconcontroller.cpp:183 +msgid "Past Keyframes Locked" +msgstr "Images clés précédentes verrouillées" + +#: src/gtkmm/canvasview.cpp:2563 src/gtkmm/iconcontroller.cpp:185 +msgid "No Keyframes Locked" +msgstr "Aucune image clé verrouillée" + +#: src/gtkmm/canvasview.cpp:3177 +msgid "Change Waypoint Group" +msgstr "Modifier le groupe de point de passage" + +#: src/gtkmm/canvasview.cpp:3208 +msgid "Duplicate Waypoints" +msgstr "Dupliquer les points de passage" + +#: src/gtkmm/canvasview.cpp:3224 +msgid "Remove Waypoints" +msgstr "Supprimer les points de passage" + +#: src/gtkmm/canvasview.cpp:3269 src/gtkmm/canvasview.cpp:3272 +#: src/gtkmm/canvasview.cpp:3275 src/gtkmm/widget_defaults.cpp:290 +msgid "_TCB" +msgstr "_TCB" + +#: src/gtkmm/canvasview.cpp:3279 src/gtkmm/canvasview.cpp:3282 +#: src/gtkmm/canvasview.cpp:3285 src/gtkmm/widget_defaults.cpp:293 +msgid "_Linear" +msgstr "_Linéaire" + +#: src/gtkmm/canvasview.cpp:3289 +msgid "_Ease In" +msgstr "Adoucir en entrée" + +#: src/gtkmm/canvasview.cpp:3292 +msgid "_Ease Out" +msgstr "Adoucir en sortie" + +#: src/gtkmm/canvasview.cpp:3295 src/gtkmm/widget_defaults.cpp:292 +msgid "_Ease In/Out" +msgstr "Ad_oucir" + +#: src/gtkmm/canvasview.cpp:3299 src/gtkmm/canvasview.cpp:3302 +#: src/gtkmm/canvasview.cpp:3305 src/gtkmm/widget_defaults.cpp:291 +msgid "_Constant" +msgstr "_Constant" + +#: src/gtkmm/canvasview.cpp:3310 +msgid "_Jump To" +msgstr "_Aller à" + +#: src/gtkmm/canvasview.cpp:3313 +msgid "_Duplicate" +msgstr "_Dupliquer" + +#: src/gtkmm/canvasview.cpp:3316 +msgid "_Remove" +msgstr "Supp_rimer" + +#: src/gtkmm/canvasview.cpp:3316 +#, c-format +msgid "_Remove %d Waypoints" +msgstr "Supp_rimer %d points de passage" + +#: src/gtkmm/canvasview.cpp:3327 +msgid "_Both" +msgstr "Des deux côtés" + +#: src/gtkmm/canvasview.cpp:3328 +msgid "_In" +msgstr "_Entrée" + +#: src/gtkmm/canvasview.cpp:3329 +msgid "_Out" +msgstr "_Sortie" + +#: src/gtkmm/canvasview.cpp:3560 src/synfigapp/canvasinterface.cpp:565 +msgid "Import Image" +msgstr "Importer une image" + +#: src/gtkmm/cellrenderer_value.cpp:221 +msgid "Paragraph" +msgstr "Paragraphe" + +#: src/gtkmm/cellrenderer_value.cpp:225 +msgid "Enter Paragraph Text Here:" +msgstr "Saisissez votre texte :" + +#: src/gtkmm/cellrenderer_value.cpp:411 +msgid "" +msgstr "" + +#: src/gtkmm/cellrenderer_value.cpp:441 src/gtkmm/iconcontroller.cpp:146 +msgid "Segment" +msgstr "Segment" + +#: src/gtkmm/cellrenderer_value.cpp:448 +msgid "List" +msgstr "Liste" + +#: src/gtkmm/cellrenderer_value.cpp:451 src/gtkmm/iconcontroller.cpp:147 +msgid "BLine Point" +msgstr "Point de BLine" + +#: src/gtkmm/cellrenderer_value.cpp:454 +msgid "UNKNOWN" +msgstr "INCONNU" + +#: src/gtkmm/childrentree.cpp:93 src/gtkmm/dock_canvases.cpp:108 +#: src/synfigapp/actions/canvasadd.cpp:78 +msgid "ID" +msgstr "Identifiant" + +#: src/gtkmm/childrentree.cpp:113 src/gtkmm/layertree.cpp:354 +#: src/synfigapp/actions/valuedescconvert.cpp:97 +msgid "Type" +msgstr "Type" + +#: src/gtkmm/childrentree.cpp:124 src/synfigapp/actions/layerparamset.cpp:80 +#: src/synfigapp/actions/valuedescset.cpp:96 +#: src/synfigapp/actions/valuenodeconstset.cpp:77 +msgid "ValueBase" +msgstr "Valeur de base" + +#: src/gtkmm/childrentree.cpp:140 src/gtkmm/dock_timetrack.cpp:87 +#: src/gtkmm/iconcontroller.cpp:180 src/gtkmm/layertree.cpp:367 +msgid "Time Track" +msgstr "Axe de temps" + +#: src/gtkmm/childrentreestore.cpp:78 +msgid "Canvases" +msgstr "Canevas" + +#: src/gtkmm/childrentreestore.cpp:83 +msgid "ValueBase Nodes" +msgstr "Nœuds de valeurs de base" + +#: src/gtkmm/dialog_color.cpp:68 +msgid "Colors" +msgstr "Couleurs" + +#: src/gtkmm/dialog_gradient.cpp:65 +msgid "Gradient Editor" +msgstr "Éditeur de dégradés" + +#: src/gtkmm/dialog_gradient.cpp:75 +msgid "Grab" +msgstr "Récupérer" + +#: src/gtkmm/dialog_keyframe.cpp:59 +msgid "Keyframe Dialog" +msgstr "Dialogue d'image clé" + +#: src/gtkmm/dialog_preview.cpp:62 +msgid "Preview Window" +msgstr "Fenêtre d'aperçu" + +#: src/gtkmm/dialog_preview.cpp:88 +msgid "Preview Options" +msgstr "Options d'aperçu" + +#: src/gtkmm/dialog_preview.cpp:91 +msgid "_Begin Time" +msgstr "Heure de _début" + +#: src/gtkmm/dialog_preview.cpp:92 src/gtkmm/renddesc.cpp:556 +msgid "_End Time" +msgstr "Heure de _fin" + +#: src/gtkmm/dialog_preview.cpp:106 +msgid "General Settings" +msgstr "Configuration générale" + +#: src/gtkmm/dialog_preview.cpp:108 +msgid "General Settings" +msgstr "Configuration générale" + +#: src/gtkmm/dialog_preview.cpp:120 +msgid "_Zoom" +msgstr "_Zoom" + +#: src/gtkmm/dialog_preview.cpp:129 src/gtkmm/renddesc.cpp:546 +msgid "_Frames per second" +msgstr "Images par seconde" + +#: src/gtkmm/dialog_preview.cpp:138 src/gtkmm/renddesc.cpp:532 +msgid "Time Settings" +msgstr "Paramètres temporels" + +#: src/gtkmm/dialog_preview.cpp:140 src/gtkmm/renddesc.cpp:534 +msgid "Time Settings" +msgstr "Paramètres temporels" + +#: src/gtkmm/dialog_setup.cpp:73 +msgid "Synfig Studio Setup" +msgstr "Configuration de Synfig Studio" + +#: src/gtkmm/dialog_setup.cpp:79 +msgid "Visually Linear Color Selection" +msgstr "Correction de couleur linéaire" + +#: src/gtkmm/dialog_setup.cpp:81 +msgid "Use Only a Single Thread" +msgstr "Utiliser un seul processus" + +#: src/gtkmm/dialog_setup.cpp:83 +msgid "Restrict Real-Valued Ducks to Top Right Quadrant" +msgstr "" +"Restreindre le déplacement des poignées de taille au quart supérieur droit." + +#: src/gtkmm/dialog_setup.cpp:113 +msgid "Gamma" +msgstr "Gamma" + +#: src/gtkmm/dialog_setup.cpp:119 src/gtkmm/widget_coloredit.cpp:353 +msgid "Red" +msgstr "Rouge" + +#: src/gtkmm/dialog_setup.cpp:124 src/gtkmm/widget_coloredit.cpp:355 +msgid "Green" +msgstr "Vert" + +#: src/gtkmm/dialog_setup.cpp:129 src/gtkmm/widget_coloredit.cpp:357 +msgid "Blue" +msgstr "Bleu" + +#: src/gtkmm/dialog_setup.cpp:133 +msgid "Black Level" +msgstr "Niveau de noir" + +#: src/gtkmm/dialog_setup.cpp:144 +msgid "Misc." +msgstr "Divers" + +#: src/gtkmm/dialog_setup.cpp:150 +msgid "Timestamp" +msgstr "Horodatage" + +#: src/gtkmm/dialog_setup.cpp:178 +msgid "Pixels" +msgstr "Pixels" + +#: src/gtkmm/dialog_setup.cpp:179 +msgid "Points" +msgstr "Points" + +#: src/gtkmm/dialog_setup.cpp:180 +msgid "Inches" +msgstr "Pouces" + +#: src/gtkmm/dialog_setup.cpp:181 +msgid "Meters" +msgstr "Mètres" + +#: src/gtkmm/dialog_setup.cpp:182 +msgid "Centimeters" +msgstr "Centimètres" + +#: src/gtkmm/dialog_setup.cpp:183 +msgid "Millimeters" +msgstr "Millimètres" + +#: src/gtkmm/dialog_setup.cpp:188 +msgid "Unit System" +msgstr "Système d'unités" + +#: src/gtkmm/dialog_setup.cpp:194 +msgid "Recent Files" +msgstr "Fichiers récents" + +#: src/gtkmm/dialog_setup.cpp:206 +msgid "Auto Backup Interval (0 to disable)" +msgstr "Intervale d'auto-sauvegarde (0 = désactivé)" + +#: src/gtkmm/dialog_setup.cpp:213 +msgid "Browser Command" +msgstr "Commande du navigateur" + +#: src/gtkmm/dialog_setup.cpp:218 +msgid "Document" +msgstr "Document" + +#: src/gtkmm/dialog_setup.cpp:221 +msgid "New Document filename prefix" +msgstr "Préfixe du nouveau document" + +#: src/gtkmm/dialog_setup.cpp:223 +msgid "File name prefix for the new created document" +msgstr "Préfixe du nom de fichier du nouveau document" + +#: src/gtkmm/dialog_setup.cpp:227 +msgid "New Document X size" +msgstr "Dimension X du nouveau document" + +#: src/gtkmm/dialog_setup.cpp:229 +msgid "Width in pixels of the new created document" +msgstr "Largeur en pixels de nouveaux documents" + +#: src/gtkmm/dialog_setup.cpp:233 +msgid "New Document Y size" +msgstr "Dimension Y du nouveau document" + +#: src/gtkmm/dialog_setup.cpp:235 +msgid "High in pixels of the new created document" +msgstr "Hauteur en pixels des nouveaux documents" + +#: src/gtkmm/dialog_setup.cpp:239 +msgid "Predefined Resolutions:" +msgstr "Résolutions prédéfinies :" + +#: src/gtkmm/dialog_setup.cpp:244 +msgid "4096x3112 Full Aperture 4K" +msgstr "4096x3112 (4K Full Frame)" + +#: src/gtkmm/dialog_setup.cpp:245 +msgid "2048x1556 Full Aperture Native 2K" +msgstr "2048x1556 (2K Full Frame)" + +#: src/gtkmm/dialog_setup.cpp:246 +msgid "1920x1080 HDTV 1080p/i" +msgstr "1920x1080 HDTV 1080p" + +#: src/gtkmm/dialog_setup.cpp:247 +msgid "1280x720 HDTV 720p" +msgstr "1280x720 HDTV 720p" + +#: src/gtkmm/dialog_setup.cpp:248 +msgid "720x576 DVD PAL" +msgstr "720x576 DVD PAL" + +#: src/gtkmm/dialog_setup.cpp:249 +msgid "720x480 DVD NTSC" +msgstr "720x480 DVD NTSC" + +#: src/gtkmm/dialog_setup.cpp:250 +msgid "720x540 Web 720x" +msgstr "720x540 Web 720x" + +#: src/gtkmm/dialog_setup.cpp:251 +msgid "720x405 Web 720x HD" +msgstr "720x405 Web 720x HD" + +#: src/gtkmm/dialog_setup.cpp:252 +msgid "640x480 Web 640x" +msgstr "640x480 Web 640x" + +#: src/gtkmm/dialog_setup.cpp:253 +msgid "640x360 Web 640x HD" +msgstr "640x360 Web 640x HD" + +#: src/gtkmm/dialog_setup.cpp:254 +msgid "480x360 Web 480x" +msgstr "480x360 Web 480x" + +#: src/gtkmm/dialog_setup.cpp:255 +msgid "480x270 Web 480x HD" +msgstr "480x270 Web 480x HD" + +#: src/gtkmm/dialog_setup.cpp:256 +msgid "360x270 Web 360x" +msgstr "360x270 Web 360x" + +#: src/gtkmm/dialog_setup.cpp:257 +msgid "360x203 Web 360x HD" +msgstr "360x203 Web 360x HD" + +#: src/gtkmm/dialog_setup.h:49 +msgid "Custom Size" +msgstr "Dimension personnalisée" + +#: src/gtkmm/dialog_soundselect.cpp:60 +msgid "Sound Select" +msgstr "Sélection de son" + +#: src/gtkmm/dialog_soundselect.cpp:67 +msgid "Sound Parameters" +msgstr "Paramètres son" + +#: src/gtkmm/dialog_soundselect.cpp:68 +msgid "Sound Parameters" +msgstr "Paramètres Son" + +#: src/gtkmm/dialog_soundselect.cpp:76 +msgid "_Sound File" +msgstr "Fichier audio" + +#: src/gtkmm/dialog_soundselect.cpp:79 +msgid "Time _Offset" +msgstr "Décalage temporel" + +#: src/gtkmm/dialog_tooloptions.cpp:56 src/gtkmm/dialog_tooloptions.cpp:78 +msgid "Tool Options" +msgstr "Options des outils" + +#: src/gtkmm/dialog_tooloptions.cpp:57 +msgid "This tool has no options" +msgstr "Cet outil n'a pas d'options" + +#: src/gtkmm/dialog_waypoint.cpp:63 +msgid "Waypoint Editor" +msgstr "Editeur de point de passage" + +#: src/gtkmm/dockable.cpp:121 +msgid "X" +msgstr "X" + +#: src/gtkmm/dock_canvases.cpp:55 +msgid "Canvas Browser" +msgstr "Explorateur de canevas" + +#: src/gtkmm/dock_children.cpp:67 src/gtkmm/iconcontroller.cpp:175 +msgid "Children" +msgstr "Enfants" + +#: src/gtkmm/dock_curves.cpp:70 src/gtkmm/iconcontroller.cpp:176 +msgid "Curves" +msgstr "Courbes" + +#: src/gtkmm/dockdialog.cpp:115 +msgid "Dock Panel" +msgstr "Dialogue d'onglets" + +#: src/gtkmm/dockdialog.cpp:563 +msgid "Empty Dock Panel" +msgstr "Dialogue d'onglets vide" + +#: src/gtkmm/dock_history.cpp:69 src/gtkmm/dock_history.cpp:125 +msgid "History" +msgstr "Historique" + +#: src/gtkmm/dock_history.cpp:78 src/gtkmm/iconcontroller.cpp:172 +msgid "Clear Undo Stack" +msgstr "Vider l'historique d'annulation" + +#: src/gtkmm/dock_history.cpp:79 +msgid "Clear the undo stack" +msgstr "Vider l'historique d'annulation" + +#: src/gtkmm/dock_history.cpp:89 src/gtkmm/iconcontroller.cpp:173 +msgid "Clear Redo Stack" +msgstr "Vider l'historique de rétablissement" + +#: src/gtkmm/dock_history.cpp:90 +msgid "Clear the redo stack" +msgstr "Vider l'historique de rétablissement" + +#: src/gtkmm/dock_history.cpp:100 +msgid "Clear Undo and Redo Stacks" +msgstr "Vider l'historique d'annulation et de rétablissement" + +#: src/gtkmm/dock_history.cpp:101 +msgid "Clear the undo and redo stacks" +msgstr "Vider l'historique d'annulation et de rétablissement" + +#: src/gtkmm/dock_history.cpp:111 src/gtkmm/toolbox.cpp:294 +msgid "Undo" +msgstr "Annuler" + +#: src/gtkmm/dock_history.cpp:112 +msgid "Undo the previous action" +msgstr "Annuler la dernière action" + +#: src/gtkmm/dock_history.cpp:119 src/gtkmm/toolbox.cpp:295 +msgid "Redo" +msgstr "Rétablir" + +#: src/gtkmm/dock_history.cpp:120 +msgid "Redo the previously undone action" +msgstr "Rétablir la dernière action annulée" + +#: src/gtkmm/dock_history.cpp:211 src/gtkmm/keyframetree.cpp:92 +msgid "Jump" +msgstr "Aller à" + +#: src/gtkmm/dock_history.cpp:216 src/gtkmm/keyframetree.cpp:96 +msgid "(JMP)" +msgstr "(Saut)" + +#: src/gtkmm/dock_history.cpp:228 +msgid "Action" +msgstr "Action" + +#: src/gtkmm/dock_history.cpp:275 src/gtkmm/dock_history.cpp:283 +#: src/gtkmm/dock_history.cpp:291 +msgid "Clear History" +msgstr "Effacer l'historique" + +#: src/gtkmm/dock_history.cpp:276 +msgid "" +"You will not be able to undo any changes that you have made!\n" +"Are you sure you want to clear the undo stack?" +msgstr "" +"Vous ne pourrez plus défaire vos changements !\n" +"Êtes-vous sûr de vouloir effacer l'historique d'annulation ?" + +#: src/gtkmm/dock_history.cpp:284 +msgid "" +"You will not be able to redo any changes that you have made!\n" +"Are you sure you want to clear the redo stack?" +msgstr "" +"Vous ne pourrez plus rétablir vos changements !\n" +"Êtes-vous sûr de vouloir effacer l'historique de rétablissement" + +#: src/gtkmm/dock_history.cpp:292 +msgid "" +"You will not be able to undo or redo any changes that you have made!\n" +"Are you sure you want to clear the undo and redo stacks?" +msgstr "" +"Vous ne pourrez plus défaire ou refaire vos changements !\n" +"Êtes-vous sûr de vouloir effacer l'historique d'annulation et de " +"rétablissement ?" + +#: src/gtkmm/dock_info.cpp:96 src/gtkmm/instance.cpp:550 +msgid "Info" +msgstr "Info" + +#: src/gtkmm/dock_info.cpp:103 +msgid "X: " +msgstr "X :" + +#: src/gtkmm/dock_info.cpp:104 +msgid "Y: " +msgstr "Y :" + +#: src/gtkmm/dock_info.cpp:114 +msgid "R: " +msgstr "R :" + +#: src/gtkmm/dock_info.cpp:115 +msgid "G: " +msgstr "V :" + +#: src/gtkmm/dock_info.cpp:116 +msgid "B: " +msgstr "B :" + +#: src/gtkmm/dock_info.cpp:117 +msgid "A: " +msgstr "A :" + +#: src/gtkmm/dock_keyframes.cpp:66 src/gtkmm/iconcontroller.cpp:177 +msgid "Keyframes" +msgstr "Images clés" + +#: src/gtkmm/dock_layergroups.cpp:68 +msgid "Groups" +msgstr "Groupes" + +#: src/gtkmm/dock_layergroups.cpp:74 +msgid "Group Ops" +msgstr "Opérations de groupe" + +#: src/gtkmm/dock_layergroups.cpp:76 src/gtkmm/groupactionmanager.cpp:175 +#: src/gtkmm/groupactionmanager.cpp:176 +msgid "Add a New Group" +msgstr "Ajouter un nouveau groupe" + +#: src/gtkmm/dock_layers.cpp:74 +msgid "Layers" +msgstr "Calques" + +#: src/gtkmm/dock_layers.cpp:146 +msgid "Layer Ops" +msgstr "Opérations de calque" + +#: src/gtkmm/dock_metadata.cpp:64 +msgid "Canvas MetaData" +msgstr "Métadonnées du canevas" + +#: src/gtkmm/dock_metadata.cpp:84 +msgid "Add new MetaData entry" +msgstr "Ajouter une nouvelle métadonnée" + +#: src/gtkmm/dock_metadata.cpp:94 +msgid "Remove selected MetaData entry" +msgstr "Supprimer la métadonnée sélectionnée" + +#: src/gtkmm/dock_navigator.cpp:496 src/gtkmm/iconcontroller.cpp:179 +msgid "Navigator" +msgstr "Navigateur" + +#: src/gtkmm/dock_params.cpp:65 +msgid "Params" +msgstr "Paramètres" + +#: src/gtkmm/dock_timetrack.cpp:83 src/gtkmm/layergrouptree.cpp:75 +#: src/gtkmm/layertree.cpp:221 src/gtkmm/layertree.cpp:300 +#: src/synfigapp/actions/canvasnameset.cpp:82 +#: src/synfigapp/actions/valuedescexport.cpp:92 +#: src/synfigapp/actions/valuenodeadd.cpp:77 +#: src/synfigapp/actions/valuenoderename.cpp:86 +msgid "Name" +msgstr "Nom" + +#: src/gtkmm/dock_timetrack.cpp:404 +msgid "Timetrack" +msgstr "Axe de temps" + +#: src/gtkmm/groupactionmanager.cpp:269 +msgid "UnnamedGroup" +msgstr "Groupe sans nom" + +#: src/gtkmm/iconcontroller.cpp:139 +msgid "Bool" +msgstr "Booléen " + +#: src/gtkmm/iconcontroller.cpp:140 +msgid "Integer" +msgstr "Entier" + +#: src/gtkmm/iconcontroller.cpp:141 +msgid "Angle" +msgstr "Angle" + +#: src/gtkmm/iconcontroller.cpp:143 +msgid "Real" +msgstr "Réel" + +#: src/gtkmm/iconcontroller.cpp:144 +msgid "Vector" +msgstr "Vecteur" + +#: src/gtkmm/iconcontroller.cpp:145 +msgid "Color" +msgstr "Couleur" + +#: src/gtkmm/iconcontroller.cpp:148 src/gtkmm/iconcontroller.cpp:150 +#: src/gtkmm/iconcontroller.cpp:156 src/gtkmm/iconcontroller.cpp:157 +msgid "Rename" +msgstr "Renommer" + +#: src/gtkmm/iconcontroller.cpp:152 +msgid "Reset Colors" +msgstr "Rétablir les couleurs" + +#: src/gtkmm/iconcontroller.cpp:153 +msgid "Swap Colors" +msgstr "Échanger les couleurs" + +#: src/gtkmm/iconcontroller.cpp:154 +#: src/synfigapp/actions/layerparamconnect.cpp:80 +#: src/synfigapp/actions/valuenodedynamiclistloop.cpp:72 +#: src/synfigapp/actions/valuenodedynamiclistunloop.cpp:72 +#: src/synfigapp/actions/valuenoderemove.cpp:80 +msgid "ValueNode" +msgstr "Nœud de valeur" + +#: src/gtkmm/iconcontroller.cpp:155 +msgid "About" +msgstr "À propos" + +#: src/gtkmm/iconcontroller.cpp:159 src/gtkmm/toolbox.cpp:293 +msgid "Save All" +msgstr "Tout enregistrer" + +#: src/gtkmm/iconcontroller.cpp:160 src/gtkmm/layergrouptreestore.cpp:920 +#: src/gtkmm/layertreestore.cpp:930 +#: src/synfigapp/actions/groupaddlayers.cpp:72 +#: src/synfigapp/actions/groupremovelayers.cpp:73 +#: src/synfigapp/actions/layeractivate.cpp:86 +#: src/synfigapp/actions/layerduplicate.cpp:81 +#: src/synfigapp/actions/layerencapsulate.cpp:81 +#: src/synfigapp/actions/layerlower.cpp:80 +#: src/synfigapp/actions/layermove.cpp:85 +#: src/synfigapp/actions/layerparamconnect.cpp:72 +#: src/synfigapp/actions/layerparamdisconnect.cpp:75 +#: src/synfigapp/actions/layerparamset.cpp:72 +#: src/synfigapp/actions/layerraise.cpp:80 +#: src/synfigapp/actions/layerremove.cpp:79 +#: src/synfigapp/actions/layersetdesc.cpp:85 +msgid "Layer" +msgstr "Calque" + +#: src/gtkmm/iconcontroller.cpp:161 +msgid "Paste Canvas" +msgstr "Coller le canevas" + +#: src/gtkmm/iconcontroller.cpp:165 +msgid "Hide Grid" +msgstr "Cacher la grille" + +#: src/gtkmm/iconcontroller.cpp:166 +msgid "Enable Grid Snap" +msgstr "Activer l'adhérence de la grille" + +#: src/gtkmm/iconcontroller.cpp:167 +msgid "Disable Grid Snap" +msgstr "Désactiver l'adhérence de la grille" + +#: src/gtkmm/iconcontroller.cpp:168 +msgid "Duplicate" +msgstr "Dupliquer" + +#: src/gtkmm/iconcontroller.cpp:169 +#: src/synfigapp/actions/layerencapsulate.cpp:52 +msgid "Encapsulate" +msgstr "Encapsuler" + +#: src/gtkmm/iconcontroller.cpp:170 src/gtkmm/layeractionmanager.cpp:134 +msgid "Select All Child Layers" +msgstr "Sélectionner tous les calques enfants" + +#: src/gtkmm/iconcontroller.cpp:178 +msgid "MetaData" +msgstr "Métadonnée" + +#: src/gtkmm/iconcontroller.cpp:187 +msgid "CVS Add" +msgstr "Ajout pour CVS (add)" + +#: src/gtkmm/iconcontroller.cpp:189 src/gtkmm/instance.cpp:490 +#: src/gtkmm/instance.cpp:501 +msgid "CVS Commit" +msgstr "Archivage CVS (commit)" + +#: src/gtkmm/iconcontroller.cpp:190 src/gtkmm/instance.cpp:592 +msgid "CVS Revert" +msgstr "Rétablissement CVS (revert)" + +#: src/gtkmm/iconcontroller.cpp:193 +msgid "Normal Tool" +msgstr "Outil normal" + +#: src/gtkmm/iconcontroller.cpp:194 src/gtkmm/state_polygon.cpp:234 +#: src/gtkmm/state_polygon.cpp:273 +msgid "Polygon Tool" +msgstr "Outil polygone" + +#: src/gtkmm/iconcontroller.cpp:195 src/gtkmm/state_bline.cpp:377 +#: src/gtkmm/state_bline.cpp:421 +msgid "BLine Tool" +msgstr "Outil BLine" + +#: src/gtkmm/iconcontroller.cpp:196 +msgid "Eyedrop Tool" +msgstr "Outil pipette" + +#: src/gtkmm/iconcontroller.cpp:197 +msgid "Fill Tool" +msgstr "Outil remplissage" + +#: src/gtkmm/iconcontroller.cpp:198 src/gtkmm/state_draw.cpp:433 +#: src/gtkmm/state_draw.cpp:519 +msgid "Draw Tool" +msgstr "Outil calligraphie" + +#: src/gtkmm/iconcontroller.cpp:199 src/gtkmm/state_sketch.cpp:325 +#: src/gtkmm/state_sketch.cpp:399 +msgid "Sketch Tool" +msgstr "Outil dessin" + +#: src/gtkmm/iconcontroller.cpp:200 src/gtkmm/state_circle.cpp:402 +#: src/gtkmm/state_circle.cpp:475 +msgid "Circle Tool" +msgstr "Outil cercle" + +#: src/gtkmm/iconcontroller.cpp:201 src/gtkmm/state_rectangle.cpp:351 +#: src/gtkmm/state_rectangle.cpp:407 +msgid "Rectangle Tool" +msgstr "Outil rectangle" + +#: src/gtkmm/iconcontroller.cpp:202 src/gtkmm/state_smoothmove.cpp:176 +msgid "SmoothMove Tool" +msgstr "Outil déplacement lissé" + +#: src/gtkmm/iconcontroller.cpp:203 src/gtkmm/state_scale.cpp:166 +#: src/gtkmm/state_scale.cpp:192 +msgid "Scale Tool" +msgstr "Outil dimension" + +#: src/gtkmm/iconcontroller.cpp:204 src/gtkmm/state_width.cpp:228 +#: src/gtkmm/state_width.cpp:304 +msgid "Width Tool" +msgstr "Outil épaisseur" + +#: src/gtkmm/iconcontroller.cpp:205 src/gtkmm/state_rotate.cpp:180 +#: src/gtkmm/state_rotate.cpp:207 +msgid "Rotate Tool" +msgstr "Outil rotation" + +#: src/gtkmm/iconcontroller.cpp:206 +msgid "Zoom Tool" +msgstr "Outil zoom" + +#: src/gtkmm/iconcontroller.cpp:207 +msgid "Info Tool" +msgstr "Outil information" + +#: src/gtkmm/iconcontroller.cpp:208 src/gtkmm/mod_mirror/state_mirror.cpp:185 +#: src/gtkmm/mod_mirror/state_mirror.cpp:213 +msgid "Mirror Tool" +msgstr "Outil miroir" + +#: src/gtkmm/iconcontroller.cpp:210 src/gtkmm/state_gradient.cpp:266 +#: src/gtkmm/state_gradient.cpp:326 +msgid "Gradient Tool" +msgstr "Outil dégradé" + +#: src/gtkmm/iconcontroller.cpp:211 src/gtkmm/state_star.cpp:443 +#: src/gtkmm/state_star.cpp:503 +msgid "Star Tool" +msgstr "Outil étoile" + +#: src/gtkmm/instance.cpp:232 src/gtkmm/instance.cpp:335 +#, c-format +msgid "Unable to save to '%s'" +msgstr "Impossible d'enregistrer en tant que '%s'" + +#: src/gtkmm/instance.cpp:233 +msgid "Save - Error" +msgstr "Enregistrement - Erreur" + +#: src/gtkmm/instance.cpp:263 +msgid "" +"There is currently a bug when using \"SaveAs\"\n" +"on a composition that is being referenced by other\n" +"files that are currently open. Close these\n" +"other files first before trying to use \"SaveAs\"." +msgstr "" +"Il y a actuellement un bogue lors de l'utilisation de\n" +"\"Enregistrer sous\" dans une composition référencée\n" +"par d'autres fichiers actuellement ouverts. Fermez\n" +"ces fichiers avant de rééssayer \"Enregistrer sous\"." + +#: src/gtkmm/instance.cpp:267 src/gtkmm/instance.cpp:318 +#: src/gtkmm/instance.cpp:336 +msgid "SaveAs - Error" +msgstr "Enregistrer sous - Erreur" + +#: src/gtkmm/instance.cpp:281 +msgid "Choose a Filename to Save As" +msgstr "Choisissez un nom de fichier pour enregistrer sous" + +#: src/gtkmm/instance.cpp:299 +msgid "Unknown extension" +msgstr "Extension inconnue" + +#: src/gtkmm/instance.cpp:300 +msgid "" +"You have given the file name an extension\n" +"which I do not recognize. Are you sure this is what you want?" +msgstr "" +"Vous avez nommé votre fichier avec une\n" +"extention qui n'est pas reconnue.\n" +" Êtes-vous sûr de vouloir continuer ?" + +#: src/gtkmm/instance.cpp:317 +#, c-format +msgid "Unable to check whether '%s' exists." +msgstr "Impossible de vérifier l'existence de '%s'." + +#: src/gtkmm/instance.cpp:323 +#, c-format +msgid "" +"A file named '%s' already exists.\n" +"\n" +"Do you want to replace it with the file you are saving?" +msgstr "" +"Un fichier nommé '%s' existe déjà. \n" +"\n" +" Voulez vous le remplacer ?" + +#: src/gtkmm/instance.cpp:326 +msgid "File exists" +msgstr "Le fichier existe" + +#: src/gtkmm/instance.cpp:481 +msgid "You must first add this composition to the repository" +msgstr "Vous devez d'abord ajouter (add) cette composition au dépôt " + +#: src/gtkmm/instance.cpp:490 src/gtkmm/instance.cpp:559 +msgid "This will save any changes you have made. Are you sure?" +msgstr "Ceci enregistera toutes vos modifications. Êtes-vous sûr ?" + +#: src/gtkmm/instance.cpp:497 +msgid "" +"The local copy of the file hasn't been changed since the last update.\n" +"Nothing to commit!" +msgstr "" +"La copie locale du fichier n'a pas changé depuis la dernière mise à jour.\n" +"Rien à archiver !" + +#: src/gtkmm/instance.cpp:501 +msgid "Enter a log message describing the changes you have made" +msgstr "Saisissez la description de vos modifications" + +#: src/gtkmm/instance.cpp:509 +msgid "An error has occurred when trying to COMMIT" +msgstr "Une erreur est survenue durant l'opération \"COMMIT\"" + +#: src/gtkmm/instance.cpp:520 +msgid "This composition has already been added to the repository" +msgstr "Cette composition a déjà été ajoutée au dépôt" + +#: src/gtkmm/instance.cpp:534 +msgid "An error has occurred when trying to ADD" +msgstr "Une erreur est survenue durant l'opération \"ADD\"" + +#: src/gtkmm/instance.cpp:545 +msgid "" +"This file is not under version control, so there is nothing to update from!" +msgstr "" +"Ce fichier n'est pas inclu dans la gestion de version (CVS), impossible de " +"le mettre à jour" + +#: src/gtkmm/instance.cpp:550 +msgid "This file is up-to-date" +msgstr "Ce fichier est à jour" + +#: src/gtkmm/instance.cpp:575 src/gtkmm/instance.cpp:611 +msgid "An error has occurred when trying to UPDATE" +msgstr "Une erreur est survenue durant l'opération \"UPDATE\" (mise à jour)" + +#: src/gtkmm/instance.cpp:586 +msgid "" +"This file is not under version control, so there is nothing to revert to!" +msgstr "" +"Ce fichier n'est pas inclu dans la gestion de version (CVS), impossible de " +"rétablir l'état antérieur." + +#: src/gtkmm/instance.cpp:593 +msgid "" +"This will abandon all changes you have made\n" +"since the last time you performed a commit\n" +"operation. This cannot be undone! Are you sure\n" +"you want to do this?" +msgstr "" +"Toutes les modifications effectuées depuis le dernier\n" +" archivage (cvs commit) vont être abandonnées.\n" +"Vous ne pourrez plus revenir en arrière !\n" +"Êtes-vous sûr de vouloir continuer ?" + +#: src/gtkmm/instance.cpp:602 +msgid "Unable to remove previous version" +msgstr "Impossible de supprimer la version précédente." + +#: src/gtkmm/instance.cpp:630 +msgid "Error: Revert Failed" +msgstr "Erreur : Échec du retour à la version antérieure" + +#: src/gtkmm/instance.cpp:630 +msgid "" +"The revert operation has failed. This can be due to it being\n" +"referenced by another composition that is already open, or\n" +"because of an internal error in Synfig Studio. Try closing any\n" +"compositions that might reference this composition and try\n" +"again, or restart Synfig Studio." +msgstr "" +"L'opération de rétablissement d'une version antérieure (revert)\n" +"a échoué. Une composition déjà ouverte fait peut-être référence\n" +"à cette version, ou bien il s'agit d'une erreur interne de Synfig Studio.\n" +"Fermez toutes les compositions qui pourraient faire référence à\n" +"la composition courante et réessayez, ou bien redémarrez Synfig Studio." + +#: src/gtkmm/instance.cpp:658 +msgid "Revert to saved" +msgstr "Rétablissement de la dernière version sauvegardée." + +#: src/gtkmm/instance.cpp:658 +msgid "" +"You will lose any changes you have made since your last save.\n" +"Are you sure?" +msgstr "" +"Vous allez perdre toutes vos modifications depuis la dernière sauvegarde.\n" +"Êtes-vous sûr de vouloir continuer ?" + +#: src/gtkmm/instance.cpp:681 +#, c-format +msgid "Would you like to save your changes to %s?" +msgstr "Voulez-vous enregistrer vos modifications dans %s ?" + +#: src/gtkmm/instance.cpp:697 +#, c-format +msgid "" +"%s has changes not yet on the CVS repository.\n" +"Would you like to commit these changes?" +msgstr "" +"%s comporte des modifications pas encore enregistrées dans CVS.\n" +"Voulez-vous archiver ces modifications ?" + +#: src/gtkmm/instance.cpp:1103 +msgid "Edit Waypoint" +msgstr "Éditer le point de passage" + +#: src/gtkmm/instance.cpp:1144 +msgid "Set Waypoints" +msgstr "Définir les points de passage" + +#: src/gtkmm/instance.cpp:1189 +msgid "Unable to convert to animated waypoint" +msgstr "Conversion en point de passage animé impossible" + +#: src/gtkmm/instance.cpp:1206 +msgid "Unable to find waypoint_set_smart action" +msgstr "Impossible de trouver l'action waypoint_set_smart" + +#: src/gtkmm/instance.cpp:1219 +msgid "Unable to set a specific waypoint" +msgstr "Impossible de définir un point de passage spécifique" + +#: src/gtkmm/instance.cpp:1247 +msgid "Edit Waypoints" +msgstr "Éditer les points de passage" + +#: src/gtkmm/instance.h:41 +msgid "Synfig Animation " +msgstr "Animation Synfig " + +#: src/gtkmm/keyframeactionmanager.cpp:221 +msgid "Add New Keyframe" +msgstr "Ajouter une nouvelle image clé" + +#: src/gtkmm/keyframetree.cpp:77 +msgid "Length" +msgstr "Longueur" + +#: src/gtkmm/keyframetree.cpp:108 +#: src/synfigapp/actions/canvasdescriptionset.cpp:82 +msgid "Description" +msgstr "Description" + +#: src/gtkmm/keyframetreestore.cpp:795 src/gtkmm/keyframetreestore.cpp:810 +msgid "Unable to find Keyframe in table" +msgstr "Impossible de trouver l'image clé dans la table" + +#: src/gtkmm/keyframetreestore.cpp:801 +msgid "There are no keyframes n this canvas" +msgstr "Ce canevas ne contient pas d'image clé " + +#: src/gtkmm/layeractionmanager.cpp:128 +msgid "Amount" +msgstr "Visibilité" + +#: src/gtkmm/layeractionmanager.cpp:364 +msgid "Paste" +msgstr "Coller" + +#: src/gtkmm/layeractionmanager.cpp:450 +#: src/synfigapp/actions/layerduplicate.cpp:178 +#: src/synfigapp/canvasinterface.cpp:202 +#, c-format +msgid "Index %d" +msgstr "Index %d" + +#: src/gtkmm/layergrouptree.cpp:64 src/gtkmm/layergrouptree.cpp:69 +#: src/gtkmm/layertree.cpp:193 +msgid " " +msgstr " " + +#: src/gtkmm/layergrouptreestore.cpp:442 +msgid "Activate " +msgstr "Activer" + +#: src/gtkmm/layergrouptreestore.cpp:442 +msgid "Deactivate " +msgstr "Désactiver" + +#: src/gtkmm/layergrouptreestore.cpp:566 +msgid "Regroup" +msgstr "Regrouper" + +#: src/gtkmm/layerparamtreestore.cpp:234 +msgid "Set Layer Params" +msgstr "Définir les paramètres de calque" + +#: src/gtkmm/layerparamtreestore.cpp:246 +msgid "Unable to set all layer parameters." +msgstr "Impossible de définir tous les paramètres de calque." + +#: src/gtkmm/layertree.cpp:206 src/gtkmm/layertree.cpp:249 +msgid "Z" +msgstr "Z" + +#: src/gtkmm/layertree.cpp:334 +msgid "Value" +msgstr "Valeur" + +#: src/gtkmm/layertreestore.cpp:462 +msgid "Move Layers" +msgstr "Déplacer les calques" + +#: src/gtkmm/main.cpp:73 +msgid "synfig studio is already running" +msgstr "Synfig Studio est déjà lancé" + +#: src/gtkmm/main.cpp:74 +msgid "the existing process will be used" +msgstr "le processus existant va être utilisé" + +#: src/gtkmm/main.cpp:93 +msgid "synfig studio -- starting up application..." +msgstr "Synfig Studio -- démarrage de l'application ..." + +#: src/gtkmm/mod_mirror/state_mirror.cpp:181 +msgid "Horizontal" +msgstr "Horizontal" + +#: src/gtkmm/mod_mirror/state_mirror.cpp:182 +msgid "Vertical" +msgstr "Vertical" + +#: src/gtkmm/mod_palette/dock_palbrowse.cpp:56 +msgid "Palette Browser" +msgstr "Explorateur de palettes" + +#: src/gtkmm/mod_palette/dock_paledit.cpp:120 +msgid "Palette Editor" +msgstr "Éditeur de palette" + +#: src/gtkmm/mod_palette/dock_paledit.cpp:128 +msgid "Add Color" +msgstr "Ajouter une couleur" + +#: src/gtkmm/mod_palette/dock_paledit.cpp:129 +msgid "" +"Add current foreground color\n" +"to the palette" +msgstr "" +"Ajouter la couleur de premier plan\n" +"à la palette" + +#: src/gtkmm/mod_palette/dock_paledit.cpp:211 +msgid "Load Default Palette" +msgstr "Charger la palette par défaut" + +#: src/gtkmm/onemoment.cpp:91 src/gtkmm/onemoment.cpp:93 +msgid "One Moment, Please..." +msgstr "Un moment, s'il vous plaît" + +#: src/gtkmm/preview.cpp:352 +msgid "Toggle Looping" +msgstr "Lecture en boucle" + +#: src/gtkmm/preview.cpp:376 +msgid "Halt Render" +msgstr "Stopper le rendu" + +#: src/gtkmm/preview.cpp:382 +msgid "Re-Preview" +msgstr "Re-prévisualiser" + +#: src/gtkmm/preview.cpp:388 +msgid "Erase All" +msgstr "Tout effacer" + +#: src/gtkmm/preview.cpp:398 +msgid "Last Rendered: " +msgstr "Dernier rendu :" + +#: src/gtkmm/renddesc.cpp:95 +msgid "Image" +msgstr "Image" + +#: src/gtkmm/renddesc.cpp:97 +msgid "Other" +msgstr "Autre" + +#: src/gtkmm/renddesc.cpp:390 +msgid "_Pixel Aspect" +msgstr "Aspect des _pixels" + +#: src/gtkmm/renddesc.cpp:392 +msgid "Pi_xel Width" +msgstr "Largeur de pi_xel" + +#: src/gtkmm/renddesc.cpp:394 +msgid "Pix_el Height" +msgstr "Hauteur de pix_el" + +#: src/gtkmm/renddesc.cpp:396 +msgid "Image _Aspect" +msgstr "_Aspect de l'image" + +#: src/gtkmm/renddesc.cpp:398 +msgid "Image _Width" +msgstr "_Largeur de l'image" + +#: src/gtkmm/renddesc.cpp:400 +msgid "Image _Height" +msgstr "_Hauteur de l'image" + +#: src/gtkmm/renddesc.cpp:402 +msgid "Image _Span" +msgstr "_Étendue de l'image" + +#: src/gtkmm/renddesc.cpp:442 +msgid "Image Size" +msgstr "Taille de l'image" + +#: src/gtkmm/renddesc.cpp:444 +msgid "Image Size" +msgstr "Taille de l'image" + +#: src/gtkmm/renddesc.cpp:455 +msgid "_Width" +msgstr "_Largeur" + +#: src/gtkmm/renddesc.cpp:458 +msgid "_Height" +msgstr "_Hauteur" + +#: src/gtkmm/renddesc.cpp:461 +msgid "_XRes" +msgstr "Résolution _X" + +#: src/gtkmm/renddesc.cpp:464 +msgid "_YRes" +msgstr "Résolution _Y" + +#: src/gtkmm/renddesc.cpp:467 +msgid "_Physical Width" +msgstr "Largeur _physique" + +#: src/gtkmm/renddesc.cpp:470 +msgid "Phy_sical Height" +msgstr "Hauteur phy_sique" + +#: src/gtkmm/renddesc.cpp:473 +msgid "I_mage Span" +msgstr "_Étendue de l'image" + +#: src/gtkmm/renddesc.cpp:494 +msgid "Image Area" +msgstr "Zone de l'image" + +#: src/gtkmm/renddesc.cpp:496 +msgid "Image Area" +msgstr "Zone de l'image" + +#: src/gtkmm/renddesc.cpp:508 +msgid "_Top Left" +msgstr "Haut gauche" + +#: src/gtkmm/renddesc.cpp:511 +msgid "_Bottom Right" +msgstr "Bas droite" + +#: src/gtkmm/renddesc.cpp:551 +msgid "_Start Time" +msgstr "_Heure de début" + +#: src/gtkmm/renddesc.cpp:574 +msgid "Locks and Links" +msgstr "Verrous et liens" + +#: src/gtkmm/renddesc.cpp:576 +msgid "Locks and Links" +msgstr "Verrous et liens" + +#: src/gtkmm/renddesc.cpp:597 +msgid "Focus Point" +msgstr "Point focal" + +#: src/gtkmm/renddesc.cpp:599 +msgid "Focus Point" +msgstr "Point focal" + +#: src/gtkmm/renddesc.cpp:609 +msgid "_Focus Point" +msgstr "Point _focal" + +#: src/gtkmm/render.cpp:61 src/gtkmm/render.cpp:177 +msgid "Render Settings" +msgstr "Paramètres de rendu" + +#: src/gtkmm/render.cpp:67 +msgid "Use _current frame" +msgstr "Utiliser l'image courante" + +#: src/gtkmm/render.cpp:77 +msgid "Auto" +msgstr "Automatique" + +#: src/gtkmm/render.cpp:101 +msgid "Choose..." +msgstr "Sélectionner ..." + +#: src/gtkmm/render.cpp:105 +msgid "Target" +msgstr "Cible" + +#: src/gtkmm/render.cpp:107 +msgid "Target" +msgstr "Cible" + +#: src/gtkmm/render.cpp:118 +msgid "_Filename" +msgstr "Nom de _fichier" + +#: src/gtkmm/render.cpp:125 +msgid "_Target" +msgstr "_Cible" + +#: src/gtkmm/render.cpp:133 +msgid "Settings" +msgstr "Paramètres" + +#: src/gtkmm/render.cpp:135 +msgid "Settings" +msgstr "Paramètres" + +#: src/gtkmm/render.cpp:147 +msgid "_Quality" +msgstr "_Qualité" + +#: src/gtkmm/render.cpp:153 +msgid "_Anti-Aliasing" +msgstr "_Anti-crénelage" + +#: src/gtkmm/render.cpp:247 +msgid "You must supply a filename!" +msgstr "Vous devez fournir un nom de fichier !" + +#: src/gtkmm/render.cpp:273 +msgid "Unable to determine proper target from filename." +msgstr "Impossible de déterminer le type de fichier cible à partir du nom." + +#: src/gtkmm/render.cpp:280 +msgid "A filename is required for this target" +msgstr "Un nom de fichier est nécéssaire pour ce type de fichier cible." + +#: src/gtkmm/render.cpp:287 +msgid "Unable to create target for " +msgstr "Impossible de créer un fichier cible pour " + +#: src/gtkmm/render.cpp:304 +msgid "Target initialization failure" +msgstr "Erreur d'initialisation du fichier cible" + +#: src/gtkmm/render.cpp:308 +msgid "Rendering " +msgstr "Rendu en cours" + +#: src/gtkmm/render.cpp:336 +msgid "File rendered successfully" +msgstr "Fichier rendu avec succès" + +#: src/gtkmm/splash.cpp:113 +msgid "ERROR:" +msgstr "ERREUR :" + +#: src/gtkmm/splash.cpp:129 +msgid "WARNING:" +msgstr "AVERTISSEMENT :" + +#: src/gtkmm/state_bline.cpp:361 src/gtkmm/state_circle.cpp:394 +#: src/gtkmm/state_draw.cpp:413 src/gtkmm/state_rectangle.cpp:341 +#: src/gtkmm/state_star.cpp:432 +msgid "Create Region BLine" +msgstr "Créer une région" + +#: src/gtkmm/state_bline.cpp:362 src/gtkmm/state_circle.cpp:395 +#: src/gtkmm/state_draw.cpp:414 src/gtkmm/state_rectangle.cpp:342 +#: src/gtkmm/state_star.cpp:433 +msgid "Create Outline BLine" +msgstr "Créer un contour" + +#: src/gtkmm/state_bline.cpp:363 src/gtkmm/state_circle.cpp:396 +#: src/gtkmm/state_rectangle.cpp:343 src/gtkmm/state_star.cpp:434 +msgid "Create Curve Gradient BLine" +msgstr "Créer un dégradé suivant la forme" + +#: src/gtkmm/state_bline.cpp:364 src/gtkmm/state_circle.cpp:397 +#: src/gtkmm/state_rectangle.cpp:344 src/gtkmm/state_star.cpp:435 +msgid "Create Plant BLine" +msgstr "Créer une plante" + +#: src/gtkmm/state_bline.cpp:365 +msgid "Link Origins" +msgstr "Lier les origines" + +#: src/gtkmm/state_bline.cpp:366 src/gtkmm/state_draw.cpp:415 +msgid "Auto Export" +msgstr "Exporter automatiquement" + +#: src/gtkmm/state_bline.cpp:367 src/gtkmm/state_polygon.cpp:228 +msgid "Make" +msgstr "Créer" + +#: src/gtkmm/state_bline.cpp:368 +msgid "Clear" +msgstr "Effacer" + +#: src/gtkmm/state_bline.cpp:385 src/gtkmm/state_draw.cpp:450 +msgid "Feather" +msgstr "Adoucissement" + +#: src/gtkmm/state_bline.cpp:426 +msgid "Make BLine and/or Region" +msgstr "Créer une BLine et/ou une Région" + +#: src/gtkmm/state_bline.cpp:436 +msgid "Clear current BLine" +msgstr "Effacer la BLine courante" + +#: src/gtkmm/state_bline.cpp:541 +msgid "New BLine" +msgstr "Nouvelle BLine" + +#: src/gtkmm/state_bline.cpp:584 +msgid "Unable to add value node" +msgstr "Impossible d'ajouter un nœud de valeur" + +#: src/gtkmm/state_bline.cpp:626 src/gtkmm/state_circle.cpp:638 +#: src/gtkmm/state_rectangle.cpp:556 src/gtkmm/state_star.cpp:684 +msgid " Gradient" +msgstr "Dégradé" + +#: src/gtkmm/state_bline.cpp:645 src/gtkmm/state_bline.cpp:668 +#: src/gtkmm/state_circle.cpp:662 src/gtkmm/state_circle.cpp:685 +#: src/gtkmm/state_rectangle.cpp:575 src/gtkmm/state_rectangle.cpp:598 +#: src/gtkmm/state_star.cpp:703 src/gtkmm/state_star.cpp:726 +msgid "Unable to create Gradient layer" +msgstr "Impossible de créer un calque de dégradé" + +#: src/gtkmm/state_bline.cpp:685 src/gtkmm/state_circle.cpp:702 +#: src/gtkmm/state_rectangle.cpp:615 src/gtkmm/state_star.cpp:743 +msgid " Plant" +msgstr " Plante" + +#: src/gtkmm/state_bline.cpp:704 src/gtkmm/state_bline.cpp:727 +#: src/gtkmm/state_circle.cpp:726 src/gtkmm/state_circle.cpp:749 +#: src/gtkmm/state_rectangle.cpp:634 src/gtkmm/state_rectangle.cpp:657 +#: src/gtkmm/state_star.cpp:762 src/gtkmm/state_star.cpp:785 +msgid "Unable to create Plant layer" +msgstr "Impossible de créer un calque de plante" + +#: src/gtkmm/state_bline.cpp:744 src/gtkmm/state_circle.cpp:766 +#: src/gtkmm/state_draw.cpp:1058 src/gtkmm/state_draw.cpp:1977 +#: src/gtkmm/state_rectangle.cpp:674 src/gtkmm/state_star.cpp:802 +msgid " Region" +msgstr "Région" + +#: src/gtkmm/state_bline.cpp:774 src/gtkmm/state_bline.cpp:797 +#: src/gtkmm/state_circle.cpp:801 src/gtkmm/state_circle.cpp:824 +#: src/gtkmm/state_draw.cpp:1800 src/gtkmm/state_draw.cpp:1993 +#: src/gtkmm/state_rectangle.cpp:704 src/gtkmm/state_rectangle.cpp:727 +#: src/gtkmm/state_star.cpp:832 src/gtkmm/state_star.cpp:855 +msgid "Unable to create Region layer" +msgstr "Impossible de créer un calque de région" + +#: src/gtkmm/state_bline.cpp:814 src/gtkmm/state_circle.cpp:839 +#: src/gtkmm/state_draw.cpp:1053 src/gtkmm/state_rectangle.cpp:742 +#: src/gtkmm/state_star.cpp:870 +msgid " Outline" +msgstr "Contour" + +#: src/gtkmm/state_bline.cpp:838 src/gtkmm/state_bline.cpp:861 +#: src/gtkmm/state_circle.cpp:869 src/gtkmm/state_circle.cpp:892 +#: src/gtkmm/state_rectangle.cpp:767 src/gtkmm/state_rectangle.cpp:790 +#: src/gtkmm/state_star.cpp:895 src/gtkmm/state_star.cpp:918 +msgid "Unable to create Outline layer" +msgstr "Impossible de créer un calque de contour" + +#: src/gtkmm/state_bline.cpp:1250 +msgid "Unloop BLine" +msgstr "Ouvrir la BLine" + +#: src/gtkmm/state_bline.cpp:1254 +msgid "Loop BLine" +msgstr "Fermer la BLine" + +#: src/gtkmm/state_bline.cpp:1259 +msgid "Delete Vertex" +msgstr "Supprimer le vertex" + +#: src/gtkmm/state_bline.cpp:1274 +msgid "Insert Vertex" +msgstr "Insérer un vertex" + +#: src/gtkmm/state_bline.cpp:1336 +msgid "" +"Unable to find where to insert vertex, internal error, please report this bug" +msgstr "" +"Impossible de trouver où insérer le vertex, erreur interne, signalez ce bug " +"s'il vous plaît" + +#: src/gtkmm/state_bline.cpp:1355 +msgid "Unable to remove vertex, internal error, please report this bug" +msgstr "" +"Impossible de supprimer le vertex, erreur interne, signalez ce bug s'il vous " +"plaît" + +#: src/gtkmm/state_bline.cpp:1369 +#: src/synfigapp/actions/blinepointtangentmerge.cpp:56 +msgid "Merge Tangents" +msgstr "Fusionner les tangentes" + +#: src/gtkmm/state_bline.cpp:1376 +#: src/synfigapp/actions/blinepointtangentsplit.cpp:56 +msgid "Split Tangents" +msgstr "Séparer les tangentes" + +#: src/gtkmm/state_circle.cpp:392 src/gtkmm/state_rectangle.cpp:339 +#: src/gtkmm/state_star.cpp:429 +msgid "Invert" +msgstr "Inverser" + +#: src/gtkmm/state_circle.cpp:393 +msgid "Create Circle Layer" +msgstr "Créer un calque Cercle" + +#: src/gtkmm/state_circle.cpp:398 src/gtkmm/state_rectangle.cpp:345 +#: src/gtkmm/state_star.cpp:436 +msgid "Link BLine Origins" +msgstr "Lier les origines des BLines" + +#: src/gtkmm/state_circle.cpp:406 +msgid "Falloff" +msgstr "Atténuation" + +#: src/gtkmm/state_circle.cpp:407 +msgid "Determines the falloff function for the feather" +msgstr "Détermine la fonction d'atténuation utilisée pour l'adoucissement" + +#: src/gtkmm/state_circle.cpp:409 src/gtkmm/state_gradient.cpp:273 +#: src/gtkmm/widget_waypoint.cpp:88 src/gtkmm/widget_waypoint.cpp:95 +#: src/gtkmm/widget_waypointmodel.cpp:74 src/gtkmm/widget_waypointmodel.cpp:81 +msgid "Linear" +msgstr "Linéaire" + +#: src/gtkmm/state_circle.cpp:410 +msgid "Squared" +msgstr "Carré" + +#: src/gtkmm/state_circle.cpp:411 +msgid "Square Root" +msgstr "Racine carré" + +#: src/gtkmm/state_circle.cpp:412 +msgid "Sigmond" +msgstr "Sigmoïde" + +#: src/gtkmm/state_circle.cpp:413 +msgid "Cosine" +msgstr "Cosinus" + +#: src/gtkmm/state_circle.cpp:417 src/gtkmm/state_gradient.cpp:280 +msgid "Blend Method" +msgstr "Mode de fusion" + +#: src/gtkmm/state_circle.cpp:418 +msgid "Defines the blend method to be used for circles" +msgstr "Défini le mode de fusion à utiliser pour les cercles" + +#: src/gtkmm/state_circle.cpp:424 src/gtkmm/state_rectangle.cpp:359 +#: src/gtkmm/state_star.cpp:445 +msgid "Feather:" +msgstr "Adoucissement :" + +#: src/gtkmm/state_circle.cpp:437 +msgid "BLine Points:" +msgstr "Point de BLine :" + +#: src/gtkmm/state_circle.cpp:439 +msgid "Point Angle Offset:" +msgstr "" + +#: src/gtkmm/state_circle.cpp:526 +msgid "New Circle" +msgstr "Nouveau cercle" + +#: src/gtkmm/state_draw.cpp:409 +msgid "Pressure Width" +msgstr "Largeur selon la pression" + +#: src/gtkmm/state_draw.cpp:410 +msgid "Auto Loop" +msgstr "Fermeture automatique" + +#: src/gtkmm/state_draw.cpp:411 +msgid "Auto Extend" +msgstr "Étendre automatiquement" + +#: src/gtkmm/state_draw.cpp:412 +msgid "Auto Link" +msgstr "Lier automatiquement" + +#: src/gtkmm/state_draw.cpp:416 src/gtkmm/state_draw.cpp:524 +msgid "Fill Last Stroke" +msgstr "Remplissage du dernier tracé" + +#: src/gtkmm/state_draw.cpp:419 +msgid "Min Pressure" +msgstr "Pression minimale" + +#: src/gtkmm/state_draw.cpp:425 +msgid "LocalError" +msgstr "Erreur locale" + +#: src/gtkmm/state_draw.cpp:447 +msgid "Smooth" +msgstr "Lissage" + +#: src/gtkmm/state_draw.cpp:778 +msgid "Sketch BLine" +msgstr "Dessin de la BLine" + +#: src/gtkmm/state_draw.cpp:1088 +msgid "Unable to create layer" +msgstr "Impossible de créer le calque" + +#: src/gtkmm/state_draw.cpp:1272 +msgid "Define Region" +msgstr "Definir la région" + +#: src/gtkmm/state_draw.cpp:1834 src/gtkmm/state_draw.cpp:1885 +msgid "Extend BLine" +msgstr "Étendre la BLine" + +#: src/gtkmm/state_draw.cpp:1847 src/gtkmm/state_draw.cpp:1898 +msgid "Unable to set loop for bline" +msgstr "Impossible de fermer la BLine" + +#: src/gtkmm/state_draw.cpp:1871 src/gtkmm/state_draw.cpp:1922 +msgid "Unable to insert item" +msgstr "Impossible d'insérer un élément" + +#: src/gtkmm/state_draw.cpp:1955 +msgid "Fill Stroke" +msgstr "Remplir le tracé" + +#: src/gtkmm/state_fill.cpp:145 +msgid "No layer here" +msgstr "Pas de calque ici" + +#: src/gtkmm/state_fill.cpp:155 +msgid "Unable to set layer color" +msgstr "Impossible de définir la couleur du calque" + +#: src/gtkmm/state_gradient.cpp:270 +msgid "Gradient Type" +msgstr "Type de dégradé" + +#: src/gtkmm/state_gradient.cpp:271 +msgid "Determines the type of Gradient used" +msgstr "Détermine le type de dégradé utilisé" + +#: src/gtkmm/state_gradient.cpp:274 +msgid "Radial" +msgstr "Radial" + +#: src/gtkmm/state_gradient.cpp:275 +msgid "Conical" +msgstr "Conique" + +#: src/gtkmm/state_gradient.cpp:276 +msgid "Spiral" +msgstr "Spirale" + +#: src/gtkmm/state_gradient.cpp:281 +msgid "The blend method the gradient will use" +msgstr "Le mode de fusion utilisé pour le dégradé" + +#: src/gtkmm/state_gradient.cpp:382 +msgid "New Gradient" +msgstr "Nouveau dégradé" + +#: src/gtkmm/state_polygon.cpp:278 +msgid "Make Polygon" +msgstr "Créer un polygone" + +#: src/gtkmm/state_polygon.cpp:288 +msgid "Clear current Polygon" +msgstr "Effacer le polygone courant " + +#: src/gtkmm/state_polygon.cpp:370 +msgid "New Polygon" +msgstr "Nouveau polygone" + +#: src/gtkmm/state_rectangle.cpp:340 +msgid "Create Rectangle Layer" +msgstr "Créer un calque Rectangle" + +#: src/gtkmm/state_rectangle.cpp:355 +msgid "Expansion:" +msgstr "Expansion :" + +#: src/gtkmm/state_rectangle.cpp:459 +msgid "New Rectangle" +msgstr "Nouveau rectangle" + +#: src/gtkmm/state_rotate.cpp:175 +msgid "Allow Scale" +msgstr "Autoriser la mise à l'échelle" + +#: src/gtkmm/state_rotate.cpp:369 +msgid "Move Duck" +msgstr "Déplacer les poignées" + +#: src/gtkmm/state_rotate.cpp:374 +msgid "Rotate Ducks" +msgstr "Tourner les poignées" + +#: src/gtkmm/state_scale.cpp:163 +msgid "Lock Aspect Ratio" +msgstr "Verrouiller le ratio d'aspect" + +#: src/gtkmm/state_sketch.cpp:158 src/gtkmm/state_sketch.cpp:239 +msgid "Save Sketch" +msgstr "Enregistrer le dessin" + +#: src/gtkmm/state_sketch.cpp:168 +msgid "Unable to save sketch" +msgstr "Impossible d'enregistrer le dessin" + +#: src/gtkmm/state_sketch.cpp:177 src/gtkmm/state_sketch.cpp:240 +msgid "Load Sketch" +msgstr "Charger un dessin" + +#: src/gtkmm/state_sketch.cpp:187 +msgid "Unable to load sketch" +msgstr "Impossible de charger le dessin" + +#: src/gtkmm/state_sketch.cpp:237 src/gtkmm/state_sketch.cpp:268 +#: src/gtkmm/state_sketch.cpp:269 +msgid "Clear Sketch" +msgstr "Effacer le dessin" + +#: src/gtkmm/state_sketch.cpp:238 +msgid "Undo Stroke" +msgstr "Annuler le tracé" + +#: src/gtkmm/state_sketch.cpp:241 +msgid "Show Sketch" +msgstr "Afficher le dessin" + +#: src/gtkmm/state_sketch.cpp:256 src/gtkmm/state_sketch.cpp:257 +msgid "Undo Last Stroke" +msgstr "Annuler le dernier tracé" + +#: src/gtkmm/state_sketch.cpp:280 src/gtkmm/state_sketch.cpp:281 +#: src/gtkmm/state_sketch.cpp:292 src/gtkmm/state_sketch.cpp:293 +msgid "Save Sketch As..." +msgstr "Enregistrer le dessin sous ..." + +#: src/gtkmm/state_sketch.cpp:304 src/gtkmm/state_sketch.cpp:305 +msgid "Open a Sketch" +msgstr "Ouvrir un dessin" + +#: src/gtkmm/state_smoothmove.cpp:177 +msgid "Radius" +msgstr "Rayon" + +#: src/gtkmm/state_smoothmove.cpp:203 +msgid "Smooth Move" +msgstr "Déplacement lissé" + +#: src/gtkmm/state_star.cpp:430 +msgid "Regular Polygon" +msgstr "Polygone régulier" + +#: src/gtkmm/state_star.cpp:431 +msgid "Create Star Layer" +msgstr "Créer un calque Étoile" + +#: src/gtkmm/state_star.cpp:455 +msgid "Number of Points:" +msgstr "Nombre de points :" + +#: src/gtkmm/state_star.cpp:457 +msgid "Inner Tangent:" +msgstr "Tangente interne :" + +#: src/gtkmm/state_star.cpp:459 +msgid "Outer Tangent:" +msgstr "Tangente externe :" + +#: src/gtkmm/state_star.cpp:461 +msgid "Inner Width:" +msgstr "Largeur interne :" + +#: src/gtkmm/state_star.cpp:463 +msgid "Outer Width:" +msgstr "Largeur externe :" + +#: src/gtkmm/state_star.cpp:465 +msgid "Radius Ratio:" +msgstr "Ratio du rayon :" + +#: src/gtkmm/state_star.cpp:467 +msgid "Angle Offset:" +msgstr "Angle de décalage :" + +#: src/gtkmm/state_star.cpp:554 +msgid "New Star" +msgstr "Nouvelle étoile" + +#: src/gtkmm/state_text.cpp:274 +msgid "Multiline Editor" +msgstr "Éditeur multilignes" + +#: src/gtkmm/state_text.cpp:283 src/gtkmm/state_text.cpp:328 +msgid "Text Tool" +msgstr "Outil Texte" + +#: src/gtkmm/state_text.cpp:286 +msgid "Size:" +msgstr "Taille :" + +#: src/gtkmm/state_text.cpp:288 +msgid "Orientation:" +msgstr "Orientation :" + +#: src/gtkmm/state_text.cpp:290 +msgid "Family:" +msgstr "Famille :" + +#: src/gtkmm/state_text.cpp:372 +msgid "New Text" +msgstr "Nouveau texte" + +#: src/gtkmm/state_text.cpp:397 +msgid "Text Paragraph" +msgstr "Paragraphe de texte" + +#: src/gtkmm/state_text.cpp:397 src/gtkmm/state_text.cpp:399 +msgid "Enter text here:" +msgstr "Saisissez votre texte ici :" + +#: src/gtkmm/state_text.cpp:399 +msgid "Text Entry" +msgstr "Entrée texte" + +#: src/gtkmm/state_width.cpp:223 +msgid "Relative Growth" +msgstr "Agrandissement relatif" + +#: src/gtkmm/state_width.cpp:231 +msgid "Growth:" +msgstr "Agrandissement :" + +#: src/gtkmm/state_width.cpp:234 +msgid "Radius:" +msgstr "Rayon :" + +#: src/gtkmm/state_width.cpp:559 +msgid "Sketch Width" +msgstr "Largeur du dessin" + +#: src/gtkmm/toolbox.cpp:133 +msgid "Cannot save" +msgstr "Impossible d'enregistrer" + +#: src/gtkmm/toolbox.cpp:133 src/gtkmm/toolbox.cpp:145 +msgid "Nothing to save" +msgstr "Rien à enregistrer" + +#: src/gtkmm/toolbox.cpp:145 +msgid "Cannot save as" +msgstr "Impossible d'enregistrer sous" + +#: src/gtkmm/toolbox.cpp:167 +msgid "Cannot close" +msgstr "Impossible de fermer" + +#: src/gtkmm/toolbox.cpp:167 +msgid "Nothing to close" +msgstr "Rien à fermer" + +#: src/gtkmm/toolbox.cpp:220 +msgid "Vertical Dock: Canvases, History" +msgstr "Dialogue vertical : Canevas, historique" + +#: src/gtkmm/toolbox.cpp:221 +msgid "Horizontal Dock: Layers, Children, Params" +msgstr "Dialogue Horizontal : Calques, Enfants, Paramètres" + +#: src/gtkmm/toolbox.cpp:223 +msgid "Reset Windows to Original Layout" +msgstr "Rétablir la disposition d'origine des fenêtres" + +#: src/gtkmm/toolbox.cpp:232 +msgid "Open Recent" +msgstr "Récemment ouverts" + +#: src/gtkmm/toolbox.cpp:239 +msgid "Panels" +msgstr "Panneaux" + +#: src/gtkmm/toolbox.cpp:251 +msgid "Input Devices..." +msgstr "Périphériques d'entrée" + +#: src/gtkmm/toolbox.cpp:253 +msgid "Setup..." +msgstr "Configuration ..." + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:268 +msgid "Synfig Wiki" +msgstr "Wiki Synfig" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:268 +msgid "/Main_Page" +msgstr "/Main_Page.fr" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:269 +msgid "Tutorials" +msgstr "Tutoriels" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:269 +msgid "/Tutorials" +msgstr "" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:270 +msgid "Frequently Asked Questions" +msgstr "FAQ (Questions fréquentes)" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:270 +msgid "/FAQ" +msgstr "/FAQ.fr" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:271 +msgid "Get Support" +msgstr "Support" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:271 +msgid "/Contact" +msgstr "/Contact.fr" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:272 +msgid "Keyboard Shortcuts" +msgstr "Raccourcis clavier" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:272 +msgid "/Keyboard_Shortcuts" +msgstr "" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:273 +msgid "Mouse Shortcuts" +msgstr "Raccourcis souris" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:273 +msgid "/Mouse_Shortcuts" +msgstr "" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:274 +msgid "All Pages" +msgstr "Toutes les pages" + +#: src/gtkmm/toolbox.cpp:282 +msgid "_Help" +msgstr "_Aide" + +#: src/gtkmm/toolbox.cpp:289 +msgid "New..." +msgstr "Nouveau ..." + +#: src/gtkmm/toolbox.cpp:290 +msgid "Open..." +msgstr "Ouvrir ..." + +#: src/gtkmm/toolbox.cpp:291 +msgid "Save" +msgstr "Enregistrer" + +#: src/gtkmm/toolbox.cpp:292 +msgid "Save As..." +msgstr "Enregistrer sous ..." + +#: src/gtkmm/toolbox.cpp:296 +msgid "Setup" +msgstr "Configuration" + +#: src/gtkmm/toolbox.cpp:297 +msgid "About Synfig Studio" +msgstr "À propos de Synfig Studio" + +#: src/gtkmm/widget_canvaschooser.cpp:115 +msgid "Other..." +msgstr "Autre ..." + +#: src/gtkmm/widget_canvaschooser.cpp:136 +msgid "Choose Canvas" +msgstr "Sélectionner un canevas" + +#: src/gtkmm/widget_canvaschooser.cpp:136 +msgid "Enter the relative name of the canvas that you want" +msgstr "Entrer le nom relatif du canevas désiré" + +#: src/gtkmm/widget_canvaschooser.cpp:145 +msgid "No canvas name was specified" +msgstr "Aucun nom de canevas spécifié" + +#: src/gtkmm/widget_canvaschooser.cpp:158 +msgid "Error:Exception Thrown" +msgstr "Erreur : Exception générée" + +#: src/gtkmm/widget_canvaschooser.cpp:163 +msgid "Unknown Exception" +msgstr "Exception inconnue" + +#: src/gtkmm/widget_coloredit.cpp:304 +msgid "RGB" +msgstr "RVB" + +#: src/gtkmm/widget_coloredit.cpp:305 +msgid "YUV" +msgstr "YUV" + +#: src/gtkmm/widget_coloredit.cpp:360 +msgid "HTML code" +msgstr "Code HTML" + +#: src/gtkmm/widget_coloredit.cpp:373 +msgid "Luma" +msgstr "Luminance" + +#: src/gtkmm/widget_coloredit.cpp:374 +msgid "Hue" +msgstr "Teinte" + +#: src/gtkmm/widget_coloredit.cpp:375 +msgid "Saturation" +msgstr "Saturation" + +#: src/gtkmm/widget_coloredit.cpp:376 +msgid "U" +msgstr "U" + +#: src/gtkmm/widget_coloredit.cpp:377 +msgid "V" +msgstr "V" + +#: src/gtkmm/widget_coloredit.cpp:381 +msgid "Alpha" +msgstr "Alpha" + +#: src/gtkmm/widget_defaults.cpp:213 +msgid "Foreground Color" +msgstr "Couleur de premier plan" + +#: src/gtkmm/widget_defaults.cpp:221 +msgid "Background Color" +msgstr "Couleur d'arrière plan" + +#: src/gtkmm/widget_defaults.cpp:238 +msgid "" +"Swap Background and\n" +"Foreground Colors" +msgstr "" +"Échanger les couleurs de\n" +"premier et d'arrière plan" + +#: src/gtkmm/widget_defaults.cpp:252 +msgid "Reset Colors to Black and White" +msgstr "Réinitialiser les couleurs à Noir et Blanc" + +#: src/gtkmm/widget_defaults.cpp:264 +msgid "Brush Preview" +msgstr "Aperçu du pinceau" + +#: src/gtkmm/widget_defaults.cpp:274 +msgid "Brush Size" +msgstr "Taille du pinceau" + +#: src/gtkmm/widget_defaults.cpp:282 +msgid "Default Blend Method" +msgstr "Mode de fusion par défaut" + +#: src/gtkmm/widget_defaults.cpp:296 +msgid "Default Interpolation" +msgstr "Interpolation par défaut" + +#: src/gtkmm/widget_defaults.cpp:304 +msgid "Default Opacity" +msgstr "Opacité par défaut" + +#: src/gtkmm/widget_defaults.cpp:311 +msgid "Default Gradient" +msgstr "Dégradé par défaut" + +#: src/gtkmm/widget_filename.cpp:61 +msgid "Find" +msgstr "Chercher" + +#: src/gtkmm/widget_filename.cpp:120 +msgid "Choose File" +msgstr "Sélectionner un fichier" + +#: src/gtkmm/widget_gradient.cpp:223 +msgid "Insert CPoint" +msgstr "Ajouter un point de contrôle" + +#: src/gtkmm/widget_gradient.cpp:235 +msgid "Remove CPoint" +msgstr "http://rore.dyndns.org/rore/synfig/core_fr.po de contrôle" + +#: src/gtkmm/widget_waypoint.cpp:76 +msgid "(Non-static value)" +msgstr "(Valeur non-statique)" + +#: src/gtkmm/widget_waypoint.cpp:86 src/gtkmm/widget_waypoint.cpp:93 +#: src/gtkmm/widget_waypointmodel.cpp:72 src/gtkmm/widget_waypointmodel.cpp:79 +msgid "TCB Smooth" +msgstr "Lissage TCB" + +#: src/gtkmm/widget_waypoint.cpp:87 src/gtkmm/widget_waypoint.cpp:94 +#: src/gtkmm/widget_waypointmodel.cpp:73 src/gtkmm/widget_waypointmodel.cpp:80 +msgid "Constant" +msgstr "Constant" + +#: src/gtkmm/widget_waypoint.cpp:89 src/gtkmm/widget_waypointmodel.cpp:75 +msgid "Ease In" +msgstr "Adoucir en entrée" + +#: src/gtkmm/widget_waypoint.cpp:96 src/gtkmm/widget_waypointmodel.cpp:82 +msgid "Ease Out" +msgstr "Adoucir en sortie" + +#: src/gtkmm/widget_waypoint.cpp:121 +#: src/synfigapp/actions/waypointremove.cpp:78 +#: src/synfigapp/actions/waypointset.cpp:77 +#: src/synfigapp/actions/waypointsimpleadd.cpp:78 +msgid "Waypoint" +msgstr "Point de passage" + +#: src/gtkmm/widget_waypoint.cpp:123 +msgid "Waypoint" +msgstr "Point de passage" + +#: src/gtkmm/widget_waypoint.cpp:135 +msgid "_Value" +msgstr "_Valeur" + +#: src/gtkmm/widget_waypoint.cpp:142 +msgid "_Time" +msgstr "_Temps" + +#: src/gtkmm/widget_waypoint.cpp:148 +msgid "Interpolation" +msgstr "Interpolation" + +#: src/gtkmm/widget_waypoint.cpp:150 +msgid "Interpolation" +msgstr "Interpolation" + +#: src/gtkmm/widget_waypoint.cpp:162 +msgid "_In Interpolation" +msgstr "_Interpolation entrante" + +#: src/gtkmm/widget_waypoint.cpp:168 +msgid "_Out Interpolation" +msgstr "Interpolation s_ortante" + +#: src/gtkmm/widget_waypoint.cpp:174 +msgid "TCB Parameters" +msgstr "Paramètres TCB" + +#: src/gtkmm/widget_waypoint.cpp:176 +msgid "TCB Parameter" +msgstr "Paramètres TCB" + +#: src/gtkmm/widget_waypoint.cpp:188 +msgid "T_ension" +msgstr "T_ension" + +#: src/gtkmm/widget_waypoint.cpp:195 +msgid "_Continuity" +msgstr "_Continuité" + +#: src/gtkmm/widget_waypoint.cpp:202 +msgid "_Bias" +msgstr "_Biais" + +#: src/gtkmm/widget_waypoint.cpp:209 +msgid "Te_mporal Tension" +msgstr "Tension te_mporelle" + +#: src/gtkmm/widget_waypointmodel.cpp:64 +msgid "Out:" +msgstr "Sortie :" + +#: src/gtkmm/widget_waypointmodel.cpp:65 +msgid "In:" +msgstr "Entrée :" + +#: src/gtkmm/widget_waypointmodel.cpp:66 +msgid "Tension:" +msgstr "Tension :" + +#: src/gtkmm/widget_waypointmodel.cpp:67 +msgid "Continuity:" +msgstr "Continuité :" + +#: src/gtkmm/widget_waypointmodel.cpp:68 +msgid "Bias:" +msgstr "Biais :" + +#: src/gtkmm/widget_waypointmodel.cpp:69 +msgid "Temporal Tension:" +msgstr "Tension temporelle :" + +#: src/gtkmm/workarea.cpp:1171 +msgid "Nudge" +msgstr "" + +#: src/gtkmm/workarea.cpp:1631 +msgid "Move" +msgstr "Déplacer" + +#: src/gtkmm/workarea.cpp:2322 +msgid "Rendering..." +msgstr "Rendu en cours ..." + +#: src/gtkmm/workarea.cpp:2349 src/gtkmm/workarea.cpp:2441 +msgid "Render Failed" +msgstr "Échec du rendu" + +#: src/gtkmm/workarea.cpp:2423 +#, c-format +msgid "Rendering canvas %s..." +msgstr "Rendu du canevas %s ..." + +#: src/gtkmm/zoomdial.h:71 +msgid "Zoom In" +msgstr "Zoomer" + +#: src/gtkmm/zoomdial.h:72 +msgid "Zoom Out" +msgstr "Dézoomer" + +#: src/gtkmm/zoomdial.h:73 +msgid "Zoom to Fit" +msgstr "Zoom adapté" + +#: src/gtkmm/zoomdial.h:74 +msgid "Zoom to 100%" +msgstr "Zoomer à 100%" + +#: src/synfigapp/action.cpp:469 +msgid "Selected Canvas" +msgstr "Canevas sélectionné" + +#: src/synfigapp/action.cpp:473 src/synfigapp/action.cpp:474 +msgid "Canvas Interface" +msgstr "Interface du canevas" + +#: src/synfigapp/actions/activepointadd.cpp:49 +msgid "Add Activepoint" +msgstr "Ajouter un point d'action" + +#: src/synfigapp/actions/activepointadd.cpp:75 +#: src/synfigapp/actions/activepointremove.cpp:74 +#: src/synfigapp/actions/activepointset.cpp:73 +#: src/synfigapp/actions/activepointsetoff.cpp:83 +#: src/synfigapp/actions/activepointseton.cpp:83 +#: src/synfigapp/actions/activepointsetsmart.cpp:82 +#: src/synfigapp/actions/colorset.cpp:79 +#: src/synfigapp/actions/gradientset.cpp:79 +#: src/synfigapp/actions/valuedescconvert.cpp:93 +#: src/synfigapp/actions/valuedescdisconnect.cpp:81 +#: src/synfigapp/actions/valuedescdisconnect.cpp:90 +#: src/synfigapp/actions/valuedescexport.cpp:88 +#: src/synfigapp/actions/valuedescset.cpp:83 +#: src/synfigapp/actions/valuedescset.cpp:92 +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:76 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:78 +#: src/synfigapp/actions/valuenodedynamiclistremove.cpp:74 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:77 +#: src/synfigapp/actions/valuenodedynamiclistrotateorder.cpp:74 +msgid "ValueDesc" +msgstr "Description de valeur (ValueDesc)" + +#: src/synfigapp/actions/activepointadd.cpp:79 +#: src/synfigapp/actions/activepointsetsmart.cpp:86 +msgid "New Activepoint" +msgstr "Nouveau point d'action" + +#: src/synfigapp/actions/activepointadd.cpp:80 +#: src/synfigapp/actions/activepointsetsmart.cpp:87 +#: src/synfigapp/actions/activepointsimpleadd.cpp:79 +msgid "Activepoint to be added" +msgstr "Point d'action à ajouter" + +#: src/synfigapp/actions/activepointadd.cpp:86 +#: src/synfigapp/actions/activepointsetsmart.cpp:93 +msgid "Time where activepoint is to be added" +msgstr "Moment où ajouter le point d'action" + +#: src/synfigapp/actions/activepointadd.cpp:176 +#: src/synfigapp/actions/activepointremove.cpp:162 +msgid "A Activepoint already exists at this point in time" +msgstr "Un point d'action existe déjà à cet endroit" + +#: src/synfigapp/actions/activepointadd.cpp:179 +#: src/synfigapp/actions/activepointremove.cpp:165 +msgid "This activepoint is already in the ValueNode" +msgstr "Ce point d'action est déjà dans le nœud de valeur" + +#: src/synfigapp/actions/activepointremove.cpp:49 +msgid "Remove Activepoint" +msgstr "Supprimer le point d'action" + +#: src/synfigapp/actions/activepointremove.cpp:78 +#: src/synfigapp/actions/activepointset.cpp:77 +#: src/synfigapp/actions/activepointsetoff.cpp:87 +#: src/synfigapp/actions/activepointseton.cpp:87 +#: src/synfigapp/actions/activepointsimpleadd.cpp:78 +msgid "Activepoint" +msgstr "Point d'action" + +#: src/synfigapp/actions/activepointremove.cpp:79 +#: src/synfigapp/actions/activepointset.cpp:78 +msgid "Activepoint to be changed" +msgstr "Point d'action à modifier" + +#: src/synfigapp/actions/activepointremove.cpp:143 +#: src/synfigapp/actions/activepointset.cpp:151 +#: src/synfigapp/actions/activepointset.cpp:209 +#: src/synfigapp/actions/activepointset.cpp:255 +#: src/synfigapp/actions/activepointset.cpp:276 +msgid "Unable to find activepoint" +msgstr "Impossible de trouver le point d'action" + +#: src/synfigapp/actions/activepointset.cpp:49 +msgid "Set Activepoint" +msgstr "Définir un point d'action" + +#: src/synfigapp/actions/activepointsetoff.cpp:57 +msgid "Mark Activepoint as \"Off\"" +msgstr "Désactiver ce point d'action" + +#: src/synfigapp/actions/activepointseton.cpp:57 +msgid "Mark Activepoint as \"On\"" +msgstr "Activer ce point d'action" + +#: src/synfigapp/actions/activepointsetsmart.cpp:56 +msgid "Set Activepoint (Smart)" +msgstr "Définir le point d'action (Intelligent)" + +#: src/synfigapp/actions/activepointsetsmart.cpp:365 +#: src/synfigapp/actions/waypointsetsmart.cpp:439 +msgid "Unable to determine how to proceed. This is a bug." +msgstr "" +"Impossible de décider comment continuer.\n" +"C'est un bogue." + +#: src/synfigapp/actions/activepointsimpleadd.cpp:49 +#: src/synfigapp/actions/waypointsimpleadd.cpp:49 +msgid "Simply Add Waypoint" +msgstr "Ajouter simplement un point de passage " + +#: src/synfigapp/actions/activepointsimpleadd.cpp:74 +#: src/synfigapp/actions/waypointadd.cpp:76 +#: src/synfigapp/actions/waypointset.cpp:73 +#: src/synfigapp/actions/waypointsetsmart.cpp:85 +#: src/synfigapp/actions/waypointsimpleadd.cpp:74 +msgid "Destination ValueNode (Animated)" +msgstr "Nœud de valeur de destination (Animé)" + +#: src/synfigapp/actions/activepointsimpleadd.cpp:169 +msgid "The activepoint to remove no longer exists" +msgstr "Le point d'action à supprimer n'existe plus" + +#: src/synfigapp/actions/blinepointtangentmerge.cpp:78 +#, c-format +msgid "Merge Tangents of '%s'" +msgstr "Fusionner les tangentes de \"%s\"" + +#: src/synfigapp/actions/blinepointtangentmerge.cpp:87 +#: src/synfigapp/actions/blinepointtangentsplit.cpp:87 +msgid "ValueNode of BLinePoint" +msgstr "Nœud de valeur de la poigné de BLine" + +#: src/synfigapp/actions/blinepointtangentmerge.cpp:156 +#: src/synfigapp/actions/blinepointtangentsplit.cpp:156 +msgid "Couldn't find action \"value_desc_set\"" +msgstr "Impossible de trouver l'action \"value_desc_set\"" + +#: src/synfigapp/actions/blinepointtangentsplit.cpp:78 +#, c-format +msgid "Split Tangents of '%s'" +msgstr "Séparer les tangentes de \"%s\"" + +#: src/synfigapp/actions/canvasadd.cpp:49 +msgid "Add Child Canvas" +msgstr "Ajouter un canevas enfant" + +#: src/synfigapp/actions/canvasadd.cpp:79 +msgid "The name that you want this canvas to be" +msgstr "Le nom que vous souhaitez donner au canevas" + +#: src/synfigapp/actions/canvasdescriptionset.cpp:50 +msgid "Set Canvas Description" +msgstr "Décrire le canevas" + +#. TRANSLATORS: This is used in the 'history' dialog when a Canvas has its description changed. +#: src/synfigapp/actions/canvasdescriptionset.cpp:71 +#, c-format +msgid "Change canvas description from '%s' to '%s'" +msgstr "Changer la description du canevas de \"%s\" en \"%s\"" + +#: src/synfigapp/actions/canvasidset.cpp:50 +msgid "Set Canvas Id" +msgstr "Définir l'ID du canevas" + +#. TRANSLATORS: This is used in the 'history' dialog when a Canvas has its id changed. +#: src/synfigapp/actions/canvasidset.cpp:71 +#, c-format +msgid "Change canvas id from '%s' to '%s'" +msgstr "Changer l'ID du canevas \"%s\" en \"%s\"" + +#: src/synfigapp/actions/canvasidset.cpp:82 +msgid "Id" +msgstr "ID" + +#: src/synfigapp/actions/canvasnameset.cpp:50 +msgid "Set Canvas Name" +msgstr "Définir le nom du canevas" + +#. TRANSLATORS: This is used in the 'history' dialog when a Canvas has its name changed. +#: src/synfigapp/actions/canvasnameset.cpp:71 +#, c-format +msgid "Change canvas name from '%s' to '%s'" +msgstr "Renommer le canevas \"%s\" en \"%s\"" + +#: src/synfigapp/actions/canvasremove.cpp:49 +msgid "Remove Canvas" +msgstr "Supprimer le canevas" + +#: src/synfigapp/actions/canvasremove.cpp:107 +msgid "You cannot remove the root canvas!" +msgstr "Vous ne pouvez pas supprimer le canevas racine !" + +#: src/synfigapp/actions/canvasremove.cpp:110 +msgid "You cannot remove an inline canvas!" +msgstr "Vous ne pouvez pas supprimer un canevas inclu !" + +#: src/synfigapp/actions/canvasrenddescset.cpp:49 +msgid "Set Canvas RendDesc" +msgstr "" + +#: src/synfigapp/actions/canvasrenddescset.cpp:73 +msgid "RendDesc" +msgstr "" + +#: src/synfigapp/actions/colorset.cpp:55 +msgid "Apply Default Color" +msgstr "Appliquer la couleur par défaut" + +#: src/synfigapp/actions/editmodeset.cpp:49 +msgid "Set Edit Mode" +msgstr "Définir le mode d'édition" + +#: src/synfigapp/actions/editmodeset.cpp:72 +msgid "New Edit Mode" +msgstr "Nouveau mode d'édition" + +#: src/synfigapp/actions/gradientset.cpp:55 +msgid "Apply Default Gradient" +msgstr "Appliquer le dégradé par défaut" + +#: src/synfigapp/actions/groupaddlayers.cpp:49 +msgid "Add Layers to Group" +msgstr "Ajouter les calques au groupe" + +#: src/synfigapp/actions/groupaddlayers.cpp:73 +msgid "Layer to be added to group" +msgstr "Calques à ajouter au groupe" + +#: src/synfigapp/actions/groupaddlayers.cpp:79 +msgid "Name of the Group to add the Layers to" +msgstr "Nom du groupe auquel ajouter les calques" + +#: src/synfigapp/actions/groupremove.cpp:49 +msgid "Remove Group" +msgstr "Supprimer le groupe" + +#: src/synfigapp/actions/groupremove.cpp:73 +msgid "Name of the Group to remove" +msgstr "Nom du groupe à supprimer" + +#: src/synfigapp/actions/groupremovelayers.cpp:50 +msgid "Remove Layers from a Group" +msgstr "Enlever les calques d'un groupe" + +#: src/synfigapp/actions/groupremovelayers.cpp:74 +msgid "Layer to be removed from group" +msgstr "Calques à supprimer du groupe" + +#: src/synfigapp/actions/grouprename.cpp:49 +msgid "Rename Group" +msgstr "Renommer un groupe" + +#: src/synfigapp/actions/grouprename.cpp:72 +msgid "Old Group" +msgstr "Ancien groupe" + +#: src/synfigapp/actions/grouprename.cpp:73 +msgid "Name of the Group to rename" +msgstr "Nom du groupe à renomer" + +#: src/synfigapp/actions/grouprename.cpp:77 +msgid "New Group" +msgstr "Nouveau groupe" + +#: src/synfigapp/actions/grouprename.cpp:78 +msgid "New name for group" +msgstr "Nouveau nom du groupe" + +#: src/synfigapp/actions/grouprename.cpp:123 +#, c-format +msgid "A group with the name \"%s\" already exists!" +msgstr "Il existe déjà un groupe du nom de \"%s\" !" + +#: src/synfigapp/actions/keyframeadd.cpp:49 +msgid "Add Keyframe" +msgstr "Ajouter une image clé" + +#: src/synfigapp/actions/keyframeadd.cpp:74 +#: src/synfigapp/actions/keyframeset.cpp:78 +msgid "New Keyframe" +msgstr "Nouvelle image clé" + +#: src/synfigapp/actions/keyframeadd.cpp:75 +#: src/synfigapp/actions/keyframeset.cpp:79 +msgid "Keyframe to be added" +msgstr "Image clé à ajouter" + +#: src/synfigapp/actions/keyframeadd.cpp:114 +#: src/synfigapp/actions/keyframeduplicate.cpp:138 +#: src/synfigapp/actions/keyframeduplicate.cpp:217 +#: src/synfigapp/actions/keyframeremove.cpp:219 +#: src/synfigapp/actions/keyframeset.cpp:128 +msgid "A Keyframe already exists at this point in time" +msgstr "Une image clé existe déjà à cet endroit" + +#: src/synfigapp/actions/keyframeadd.cpp:117 +#: src/synfigapp/actions/keyframeduplicate.cpp:220 +#: src/synfigapp/actions/keyframeremove.cpp:222 +msgid "This keyframe is already in the ValueNode" +msgstr "Cette image clé est déjà dans le nœud de valeur" + +#: src/synfigapp/actions/keyframeduplicate.cpp:53 +msgid "Duplicate Keyframe" +msgstr "Dupliquer l'image clé" + +#: src/synfigapp/actions/keyframeduplicate.cpp:80 +msgid "Keyframe to be duplicated" +msgstr "Image clé à dupliquer" + +#: src/synfigapp/actions/keyframeduplicate.cpp:102 +msgid " (Duplicate)" +msgstr "(Dupliquée)" + +#: src/synfigapp/actions/keyframeduplicate.cpp:135 +#: src/synfigapp/actions/keyframeremove.cpp:120 +#: src/synfigapp/actions/keyframeset.cpp:377 +#: src/synfigapp/actions/keyframewaypointset.cpp:129 +msgid "Unable to find the given keyframe" +msgstr "Impossible de trouver l'image clé donnée" + +#: src/synfigapp/actions/keyframeremove.cpp:53 +msgid "Remove Keyframe" +msgstr "Supprimer l'image clé" + +#: src/synfigapp/actions/keyframeremove.cpp:79 +msgid "Keyframe to be removed" +msgstr "Image clé à supprimer" + +#: src/synfigapp/actions/keyframeset.cpp:53 +msgid "Set Keyframe" +msgstr "Configurer l'image clé" + +#: src/synfigapp/actions/keyframeset.cpp:385 +msgid "" +"Cannot change keyframe time because another keyframe already exists with " +"that time." +msgstr "" +"Impossible de déplacer l'image clé car une autre image clé existe déjà à cet " +"endroit" + +#: src/synfigapp/actions/keyframesetdelta.cpp:53 +msgid "Set Keyframe Delta" +msgstr "Définir le delta de l'image clé" + +#: src/synfigapp/actions/keyframesetdelta.cpp:82 +msgid "Delta" +msgstr "Delta" + +#: src/synfigapp/actions/keyframewaypointset.cpp:53 +msgid "Set Waypoints at Keyframe" +msgstr "Définir un http://rore.dyndns.org/rore/synfig/core_fr.po à l'image clé" + +#: src/synfigapp/actions/keyframewaypointset.cpp:82 +#: src/synfigapp/actions/waypointsetsmart.cpp:95 +msgid "Waypoint Model" +msgstr "Modèle de point de passage" + +#: src/synfigapp/actions/layeractivate.cpp:50 +#: src/synfigapp/actions/layeractivate.cpp:71 +#: src/synfigapp/actions/layeractivate.cpp:75 +msgid "Activate Layer" +msgstr "Activer le calque" + +#: src/synfigapp/actions/layeractivate.cpp:76 +msgid "Deactivate Layer" +msgstr "Désactiver le calque" + +#: src/synfigapp/actions/layeractivate.cpp:90 +msgid "New Status" +msgstr "Nouvel état" + +#: src/synfigapp/actions/layeractivate.cpp:91 +msgid "The new status of the layer" +msgstr "Le nouvel état du calque" + +#: src/synfigapp/actions/layeractivate.cpp:141 +#: src/synfigapp/actions/layeradd.cpp:144 +#: src/synfigapp/actions/layerduplicate.cpp:135 +#: src/synfigapp/actions/layerencapsulate.cpp:191 +#: src/synfigapp/actions/layerlower.cpp:140 +#: src/synfigapp/actions/layermove.cpp:161 +#: src/synfigapp/actions/layermove.cpp:234 +#: src/synfigapp/actions/layerraise.cpp:137 +#: src/synfigapp/actions/layerremove.cpp:134 +msgid "This layer doesn't exist anymore." +msgstr "Ce calque n'existe plus." + +#: src/synfigapp/actions/layeradd.cpp:50 src/synfigapp/actions/layeradd.cpp:71 +#: src/synfigapp/actions/layeradd.cpp:73 +msgid "Add Layer" +msgstr "Ajouter un calque" + +#: src/synfigapp/actions/layeradd.cpp:83 +msgid "Layer to be added" +msgstr "Calque à ajouter" + +#: src/synfigapp/actions/layerduplicate.cpp:52 +#: src/synfigapp/actions/layerduplicate.cpp:72 +msgid "Duplicate Layer" +msgstr "Dupliquer le calque" + +#: src/synfigapp/actions/layerduplicate.cpp:72 +msgid "Duplicate Layers" +msgstr "Dupliquer les calques" + +#: src/synfigapp/actions/layerduplicate.cpp:82 +msgid "Layer to be duplicated" +msgstr "Calque à dupliquer" + +#: src/synfigapp/actions/layerduplicate.cpp:141 +#: src/synfigapp/actions/layerencapsulate.cpp:200 +#: src/synfigapp/actions/layerremove.cpp:144 +msgid "This layer doesn't belong to this canvas anymore" +msgstr "Ce calque n'appartient plus à ce canevas" + +#: src/synfigapp/actions/layerencapsulate.cpp:72 +msgid "Encapsulate Layer" +msgstr "Encapsuler le calque" + +#: src/synfigapp/actions/layerencapsulate.cpp:72 +msgid "Encapsulate Layers" +msgstr "Encapsuler les calques" + +#: src/synfigapp/actions/layerencapsulate.cpp:82 +msgid "Layer to be encapsulated" +msgstr "Calque à encapsuler" + +#: src/synfigapp/actions/layerencapsulate.cpp:141 +msgid "No layers to encapsulate" +msgstr "Pas de calque à encapsuler" + +#: src/synfigapp/actions/layerencapsulate.cpp:194 +msgid "This layer doesn't have a parent canvas" +msgstr "Ce calque n'a pas de canevas parent" + +#: src/synfigapp/actions/layerencapsulate.cpp:203 +msgid "get_canvas()!=subcanvas" +msgstr "" + +#: src/synfigapp/actions/layerlower.cpp:51 +#: src/synfigapp/actions/layerlower.cpp:71 +msgid "Lower Layer" +msgstr "Descendre le calque" + +#: src/synfigapp/actions/layerlower.cpp:71 +msgid "Lower Layers" +msgstr "Descendre les calques" + +#: src/synfigapp/actions/layerlower.cpp:81 +msgid "Layer to be lowered" +msgstr "Calque à descendre" + +#: src/synfigapp/actions/layermove.cpp:50 +#: src/synfigapp/actions/layermove.cpp:74 +#: src/synfigapp/actions/layermove.cpp:76 +msgid "Move Layer" +msgstr "Déplacer le calque" + +#: src/synfigapp/actions/layermove.cpp:86 +#: src/synfigapp/actions/layersetdesc.cpp:86 +msgid "Layer to be moved" +msgstr "Calque à déplacer" + +#: src/synfigapp/actions/layermove.cpp:90 +msgid "New Index" +msgstr "Nouvel index" + +#: src/synfigapp/actions/layermove.cpp:91 +msgid "Where the layer is to be moved to" +msgstr "Où déplacer le calque" + +#: src/synfigapp/actions/layermove.cpp:95 +msgid "Destination Canvas" +msgstr "Canevas de destination" + +#: src/synfigapp/actions/layermove.cpp:96 +msgid "The canvas the layer is to be moved to" +msgstr "Canevas où déplacer le calque" + +#: src/synfigapp/actions/layermove.cpp:170 +msgid "You cannot directly move layers across compositions" +msgstr "" +"Vous ne pouvez pas déplacer les calques directement d'une composition à " +"l'autre" + +#: src/synfigapp/actions/layerparamconnect.cpp:49 +msgid "Connect Layer Parameter" +msgstr "Connecter le paramètre de calque" + +#: src/synfigapp/actions/layerparamconnect.cpp:76 +#: src/synfigapp/actions/layerparamdisconnect.cpp:79 +#: src/synfigapp/actions/layerparamset.cpp:76 +msgid "Param" +msgstr "Paramètre" + +#: src/synfigapp/actions/layerparamconnect.cpp:147 +msgid "Layer did not recognize parameter name" +msgstr "Nom de paramètre inconnu pour ce calque" + +#: src/synfigapp/actions/layerparamconnect.cpp:150 +msgid "Bad connection" +msgstr "Mauvaise connexion" + +#: src/synfigapp/actions/layerparamdisconnect.cpp:50 +msgid "Disconnect Layer Parameter" +msgstr "Déconnecter le paramètre de calque" + +#: src/synfigapp/actions/layerparamdisconnect.cpp:135 +msgid "Layer Parameter is not connected to anything" +msgstr "Le paramètre de calque n'est connecté à rien" + +#: src/synfigapp/actions/layerparamset.cpp:49 +msgid "Set Layer Parameter" +msgstr "Définir le paramètre de calque" + +#: src/synfigapp/actions/layerparamset.cpp:132 +msgid "ValueNode attached to Parameter." +msgstr "Nœud de valeur lié au paramètre" + +#: src/synfigapp/actions/layerparamset.cpp:137 +#: src/synfigapp/actions/layerparamset.cpp:157 +msgid "Layer did not accept parameter." +msgstr "Ce calque n'accepte pas ce paramètre" + +#: src/synfigapp/actions/layerraise.cpp:51 +#: src/synfigapp/actions/layerraise.cpp:71 +msgid "Raise Layer" +msgstr "Monter le calque" + +#: src/synfigapp/actions/layerraise.cpp:71 +msgid "Raise Layers" +msgstr "Monter les calques" + +#: src/synfigapp/actions/layerraise.cpp:81 +msgid "Layer to be raised" +msgstr "Calque à monter" + +#: src/synfigapp/actions/layerremove.cpp:50 +#: src/synfigapp/actions/layerremove.cpp:70 +msgid "Remove Layer" +msgstr "Supprimer le calque" + +#: src/synfigapp/actions/layerremove.cpp:70 +msgid "Remove Layers" +msgstr "Supprimer les calques" + +#: src/synfigapp/actions/layerremove.cpp:80 +msgid "Layer to be deleted" +msgstr "Calque à supprimer" + +#: src/synfigapp/actions/layersetdesc.cpp:50 +#: src/synfigapp/actions/layersetdesc.cpp:73 +msgid "Set Layer Description" +msgstr "Décrire le calque" + +#. TRANSLATORS: this is the string used in the history dialog when renaming a layer to/from its default name +#: src/synfigapp/actions/layersetdesc.cpp:75 +#: src/synfigapp/actions/layersetdesc.cpp:76 +msgid "[default]" +msgstr "[défaut]" + +#: src/synfigapp/actions/layersetdesc.cpp:90 +msgid "New Description" +msgstr "Nouvelle description" + +#: src/synfigapp/actions/layersetdesc.cpp:91 +msgid "Enter a new description for this layer" +msgstr "Entrez une nouvelle description pour ce calque" + +#: src/synfigapp/actions/timepointscopy.cpp:58 +msgid "Copy Time Points" +msgstr "Copier les points temporels" + +#: src/synfigapp/actions/timepointscopy.cpp:83 +#: src/synfigapp/actions/timepointsdelete.cpp:82 +#: src/synfigapp/actions/timepointsmove.cpp:83 +msgid "New Selected Layer" +msgstr "Nouveau calque sélectionné" + +#: src/synfigapp/actions/timepointscopy.cpp:84 +#: src/synfigapp/actions/timepointsdelete.cpp:83 +#: src/synfigapp/actions/timepointsmove.cpp:84 +msgid "A layer to add to our selected list" +msgstr "Calque à ajouter à la liste sélectionnée" + +#: src/synfigapp/actions/timepointscopy.cpp:90 +#: src/synfigapp/actions/timepointsdelete.cpp:89 +#: src/synfigapp/actions/timepointsmove.cpp:90 +msgid "New Selected Canvas" +msgstr "Nouveau canevas sélectionné" + +#: src/synfigapp/actions/timepointscopy.cpp:91 +#: src/synfigapp/actions/timepointsdelete.cpp:90 +#: src/synfigapp/actions/timepointsmove.cpp:91 +msgid "A canvas to add to our selected list" +msgstr "Canevas à ajouter à la liste sélectionnée" + +#: src/synfigapp/actions/timepointscopy.cpp:97 +#: src/synfigapp/actions/timepointsdelete.cpp:96 +#: src/synfigapp/actions/timepointsmove.cpp:97 +msgid "New Selected ValueBase" +msgstr "Nouvelle valeur de base sélectionnée" + +#: src/synfigapp/actions/timepointscopy.cpp:98 +#: src/synfigapp/actions/timepointsdelete.cpp:97 +#: src/synfigapp/actions/timepointsmove.cpp:98 +msgid "A valuenode's description to add to our selected list" +msgstr "Descriptions de nœud de valeur à ajouter à la liste sélectionnée" + +#: src/synfigapp/actions/timepointscopy.cpp:104 +#: src/synfigapp/actions/timepointsdelete.cpp:103 +#: src/synfigapp/actions/timepointsmove.cpp:104 +msgid "New Selected Time Point" +msgstr "Nouveau point temporel sélectionné" + +#: src/synfigapp/actions/timepointscopy.cpp:105 +#: src/synfigapp/actions/timepointsdelete.cpp:104 +#: src/synfigapp/actions/timepointsmove.cpp:105 +msgid "A time point to add to our selected list" +msgstr "Un point temporel à ajouter à votre liste sélectionnée" + +#: src/synfigapp/actions/timepointscopy.cpp:110 +#: src/synfigapp/actions/timepointsmove.cpp:110 +msgid "Time adjustment" +msgstr "Ajustement temporel" + +#: src/synfigapp/actions/timepointscopy.cpp:111 +#: src/synfigapp/actions/timepointsmove.cpp:111 +msgid "The amount of time to adjust all the selected points" +msgstr "La durée à laquelle ajuster tous les points sélectionnés" + +#: src/synfigapp/actions/timepointsdelete.cpp:58 +msgid "Delete Time Points" +msgstr "Supprimer les points temporels" + +#: src/synfigapp/actions/timepointsmove.cpp:58 +msgid "Move Time Points" +msgstr "Déplacer les points temporels" + +#: src/synfigapp/actions/valuedescblinelink.cpp:59 +msgid "Link to BLine" +msgstr "Lier à la BLine" + +#: src/synfigapp/actions/valuedescblinelink.cpp:82 +#: src/synfigapp/actions/valuedesclink.cpp:75 +msgid "ValueDesc to link" +msgstr "Description de valeur (ValueDesc) vers lien" + +#: src/synfigapp/actions/valuedescblinelink.cpp:86 +msgid "ValueDesc on BLine to link to" +msgstr "Description de valeur (ValueDesc) vers laquelle faire le lien" + +#: src/synfigapp/actions/valuedescblinelink.cpp:93 +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:83 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:85 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:84 +msgid "Origin" +msgstr "Origine" + +#: src/synfigapp/actions/valuedescconnect.cpp:54 +msgid "Connect" +msgstr "Connecter" + +#. TRANSLATORS: This is used in the 'history' dialog when a connection is made. +#: src/synfigapp/actions/valuedescconnect.cpp:75 +#, c-format +msgid "Connect '%s' to '%s'" +msgstr "Connecter \"%s\" à \"%s\"" + +#: src/synfigapp/actions/valuedescconnect.cpp:86 +msgid "Destination ValueDesc" +msgstr "Description de valeur (ValueDesc) de destination" + +#: src/synfigapp/actions/valuedescconnect.cpp:90 +#: src/synfigapp/actions/valuenodereplace.cpp:90 +msgid "Source ValueNode" +msgstr "Nœud de valeur source" + +#: src/synfigapp/actions/valuedescconnect.cpp:95 +msgid "Source ValueNode Name" +msgstr "Nom du nœud de valeur source" + +#: src/synfigapp/actions/valuedescconnect.cpp:239 +#: src/synfigapp/actions/valuedescdisconnect.cpp:216 +msgid "ValueDesc is not recognized or supported." +msgstr "Description de valeur (ValueDesc) non reconnue ou supportée." + +#: src/synfigapp/actions/valuedescconvert.cpp:60 +msgid "Convert" +msgstr "Convertir" + +#. TRANSLATORS: This is used in the 'history' dialog when a ValueNode is converted. The first %s is what is converted, the 2nd is the local name of the ValueNode's type. +#: src/synfigapp/actions/valuedescconvert.cpp:82 +#, c-format +msgid "Convert '%s' to ValueNode type '%s'" +msgstr "Convertir '%s' en type de nœud de valeur '%s'" + +#: src/synfigapp/actions/valuedescconvert.cpp:98 +msgid "The type of ValueNode that you want to be converted to" +msgstr "Type de nœud de valeur vers lequel vous voulez effectuer la conversion" + +#: src/synfigapp/actions/valuedescconvert.cpp:166 +msgid "Unable to decipher ValueDesc (Bug?)" +msgstr "Impossible de décoder la description de valeur (ValueDesc). Bogue ?" + +#: src/synfigapp/actions/valuedescconvert.cpp:171 +msgid "Unable to create new value node" +msgstr "Impossible de créer un nouveau nœud de valeur" + +#: src/synfigapp/actions/valuedescdisconnect.cpp:56 +msgid "Disconnect" +msgstr "Déconnecter" + +#. TRANSLATORS: This is used in the History dialog when a ValueNode is disconnected. +#: src/synfigapp/actions/valuedescdisconnect.cpp:78 +#, c-format +msgid "Disconnect %s" +msgstr "Déconnecter %s" + +#: src/synfigapp/actions/valuedescexport.cpp:56 +msgid "Export" +msgstr "Exporter" + +#. TRANSLATORS: This is used in the 'history' dialog when a ValueNode is exported. The first %s is what is exported, the 2nd is the name it is given. +#: src/synfigapp/actions/valuedescexport.cpp:77 +#, c-format +msgid "Export '%s' as '%s'" +msgstr "Exporter \"%s\" en tant que \"%s\"" + +#: src/synfigapp/actions/valuedescexport.cpp:93 +msgid "The name that you want this value to be exported as" +msgstr "Nom sous lequel vous voulez exporter cette valeur" + +#: src/synfigapp/actions/valuedescexport.cpp:151 +msgid "Can only export Canvas when used as constant parameter" +msgstr "Le canevas ne peut être exporté qu'en tant que paramètre constant." + +#: src/synfigapp/actions/valuedescexport.cpp:174 +msgid "ValueBase is already exported" +msgstr "La valeur de base est déjà exportée" + +#: src/synfigapp/actions/valuedescexport.cpp:181 +msgid "Unable to export parameter. (Bug?)" +msgstr "Impossible d'exporter le paramètre. (Bogue ?)" + +#: src/synfigapp/actions/valuedesclink.cpp:52 +msgid "Link" +msgstr "Lier" + +#: src/synfigapp/actions/valuedesclink.cpp:112 +msgid "Cannot link two different exported values ('" +msgstr "Impossible de lier deux valeurs exportées différentes (\"" + +#: src/synfigapp/actions/valuedesclink.cpp:113 +msgid "' and '" +msgstr "\" et \"" + +#: src/synfigapp/actions/valuedesclink.cpp:114 +msgid "')" +msgstr "\")" + +#: src/synfigapp/actions/valuedesclink.cpp:119 +msgid "Used exported ValueNode ('" +msgstr "Utilisation du nœud de valeur exporté (\"" + +#: src/synfigapp/actions/valuedesclink.cpp:119 +msgid "')." +msgstr "\")." + +#: src/synfigapp/actions/valuedesclink.cpp:126 +msgid "Using the only available ValueNode." +msgstr "Utilisation du seul nœud de valeur disponible." + +#: src/synfigapp/actions/valuedesclink.cpp:139 +#: src/synfigapp/actions/valuedesclink.cpp:145 +msgid "Using the most referenced ValueNode." +msgstr "Utilisation du nœud de valeur le plus référencé." + +#: src/synfigapp/actions/valuedesclink.cpp:153 +#: src/synfigapp/actions/valuedesclink.cpp:161 +msgid "There's a tie for most referenced; using the animated ValueNode." +msgstr "Nombre de références égales. Utilisation du nœud de valeur animé." + +#: src/synfigapp/actions/valuedesclink.cpp:174 +#: src/synfigapp/actions/valuedesclink.cpp:180 +msgid "" +"There's a tie for most referenced, and both are animated; using the one with " +"the most waypoints." +msgstr "" +"Nombre de références égales, et les deux nœuds sont animés. Utilisation de " +"celui avec le plus de points de passage." + +#: src/synfigapp/actions/valuedesclink.cpp:189 +#: src/synfigapp/actions/valuedesclink.cpp:195 +msgid "Everything is tied; using the least recently modified value." +msgstr "" +"Égalité à tous les niveaux, utilisation de la valeur la plus anciennement " +"modifiée." + +#: src/synfigapp/actions/valuedesclink.cpp:201 +msgid "Absolutely everything is tied." +msgstr "Égalité à tous les niveaux." + +#: src/synfigapp/actions/valuedesclink.cpp:209 +#, c-format +msgid "Cannot link two values of different types ('%s' and '%s')" +msgstr "Impossible de lier deux valeurs de type différent (\"%s\" et \"%s\")" + +#: src/synfigapp/actions/valuedesclink.cpp:246 +msgid "No ValueNodes were available, so one was created." +msgstr "Pas de nœud de valeur disponible, création d'un nouveau." + +#: src/synfigapp/actions/valuedescset.cpp:59 +msgid "Set ValueDesc" +msgstr "Définir la description de valeur (ValueDesc)" + +#: src/synfigapp/actions/valuedescset.cpp:80 +#, c-format +msgid "Set %s" +msgstr "Définir %s" + +#: src/synfigapp/actions/valuedescset.cpp:180 +#: src/synfigapp/actions/valuedescset.cpp:205 +#: src/synfigapp/actions/valuedescset.cpp:273 +#: src/synfigapp/actions/valuedescset.cpp:331 +#: src/synfigapp/actions/valuedescset.cpp:368 +#: src/synfigapp/actions/valuedescset.cpp:393 +#: src/synfigapp/actions/valuedescset.cpp:411 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:184 +msgid "Unable to find action value_desc_set (bug)" +msgstr "Impossible de trouver l'action value_desc_set (Bogue)" + +#: src/synfigapp/actions/valuedescset.cpp:262 +#, c-format +msgid "Bad type for composite (%s)" +msgstr "Type invalide pour un composé (%s)" + +#: src/synfigapp/actions/valuedescset.cpp:321 +#, c-format +msgid "Bad type for radial composite (%s)" +msgstr "Type invalide pour un composé radial (%s)" + +#: src/synfigapp/actions/valuedescset.cpp:497 +#: src/synfigapp/actions/valuedescset.cpp:544 +msgid "Direct manipulation of this ValueNode type is not yet supported" +msgstr "" +"La manipulation directe de ce nœud de valeur n'est pas encore disponible" + +#: src/synfigapp/actions/valuedescset.cpp:542 +msgid "You must be in Animate-Editing-Mode to directly manipulate this value" +msgstr "" +"Vous devez être en mode édition d'animation pour manipuler directement cette " +"valeur" + +#: src/synfigapp/actions/valuedescset.cpp:564 +msgid "Unsupported ValueDesc type" +msgstr "Description de valeur (ValueDesc) non supportée." + +#: src/synfigapp/actions/valuenodeadd.cpp:49 +msgid "Add ValueNode" +msgstr "Ajouter un nœud de valeur" + +#: src/synfigapp/actions/valuenodeadd.cpp:72 +msgid "New ValueNode" +msgstr "Nouveau nœud de valeur" + +#: src/synfigapp/actions/valuenodeadd.cpp:73 +msgid "ValueNode to be added" +msgstr "Nœud de valeur à ajouter" + +#: src/synfigapp/actions/valuenodeadd.cpp:122 +msgid "Parameter appears to already be exported" +msgstr "Le paramètre semble déjà exporté" + +#: src/synfigapp/actions/valuenodeadd.cpp:131 +msgid "Another exported ValueBase with this name already exists" +msgstr "Une autre valeur de base de même nom existe déjà" + +#: src/synfigapp/actions/valuenodeadd.cpp:135 +msgid "Exception caught on Add ValueNode." +msgstr "Une exception est survenue lors de l'ajout du nœud de valeur" + +#: src/synfigapp/actions/valuenodeadd.cpp:154 +msgid "Exception caught on Remove ValueNode." +msgstr "Un exception est survenue lors de la suppression du nœud de valeur" + +#: src/synfigapp/actions/valuenodeconstset.cpp:49 +msgid "Set ValueNode_Const" +msgstr "Définir ValueNode_Const" + +#: src/synfigapp/actions/valuenodeconstset.cpp:73 +#: src/synfigapp/actions/valuenoderename.cpp:82 +msgid "ValueNode_Const" +msgstr "" + +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:49 +msgid "Insert Item" +msgstr "Insérer un élément" + +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:87 +msgid "ValueNode to insert" +msgstr "Nœud de valeur à insérer" + +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:51 +msgid "Insert Item (Smart)" +msgstr "Insérer un élément (Intelligent)" + +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:205 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:259 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:158 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:176 +msgid "Unable to find action (bug)" +msgstr "Impossible de trouver l'action (Bogue)" + +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:221 +msgid "Unable to find action \"activepoint_set_off\"" +msgstr "Impossible de trouver l'action \"activepoint_set_off\"" + +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:240 +msgid "Unable to find action \"activepoint_set_on\"" +msgstr "Impossible de trouver l'action \"activepoint_set_on\"" + +#: src/synfigapp/actions/valuenodedynamiclistloop.cpp:49 +msgid "Loop" +msgstr "Fermer" + +#: src/synfigapp/actions/valuenodedynamiclistremove.cpp:49 +msgid "Remove Item" +msgstr "Supprimer l'élément" + +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:50 +msgid "Remove Item (Smart)" +msgstr "Supprimer l'élément (intelligemment)" + +#: src/synfigapp/actions/valuenodedynamiclistrotateorder.cpp:49 +msgid "Rotate Order" +msgstr "Inverser l'ordre" + +#: src/synfigapp/actions/valuenodedynamiclistunloop.cpp:49 +msgid "Unloop" +msgstr "Ouvrir" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:49 +msgid "Connect ValueNode Link" +msgstr "Connecter le lien du nœud de valeur" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:73 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:75 +msgid "Parent ValueNode" +msgstr "Nœud de valeur parent" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:77 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:79 +msgid "Index" +msgstr "Index" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:81 +msgid "ValueNode to be connected" +msgstr "Nœud de valeur à connecter" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:132 +#: src/synfigapp/actions/valuenodelinkconnect.cpp:151 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:135 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:159 +#, c-format +msgid "Bad index, too big. LinkCount=%d, Index=%d" +msgstr "Erreur d'index, trop grand. LinkCount=%d, Index=%d" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:137 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:140 +msgid "Parent would not accept link" +msgstr "Le parent à refusé le lien" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:154 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:162 +msgid "Parent would not accept old link" +msgstr "Le parent à refusé l'ancien lien" + +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:50 +msgid "Disconnect ValueNode Link" +msgstr "Déconnecter le lien du nœud de valeur" + +#: src/synfigapp/actions/valuenoderemove.cpp:50 +msgid "Unexport" +msgstr "Annuler l'export" + +#. TRANSLATORS: This is used in the 'history' dialog when a ValueNode is unexported. +#: src/synfigapp/actions/valuenoderemove.cpp:71 +#, c-format +msgid "Unexport '%s'" +msgstr "Annuler l'export de \"%s\"" + +#: src/synfigapp/actions/valuenoderename.cpp:50 +msgid "Rename ValueNode" +msgstr "Renommer le nœud de valeur" + +#. TRANSLATORS: This is used in the 'history' dialog when a ValueNode is renamed. +#: src/synfigapp/actions/valuenoderename.cpp:71 +#, c-format +msgid "Rename ValueNode from '%s' to '%s'" +msgstr "Renommer le nœud de valeur \"%s\" en \"%s\"" + +#: src/synfigapp/actions/valuenoderename.cpp:87 +msgid "The new name of the ValueNode" +msgstr "Le nouveau nom du nœud de valeur" + +#: src/synfigapp/actions/valuenoderename.cpp:151 +msgid "A ValueNode with this ID already exists in this canvas" +msgstr "Un nœud de valeur avec cet identifiant existe déjà dans le canevas" + +#: src/synfigapp/actions/valuenoderename.cpp:169 +msgid "A ValueNode with the old ID already exists in this canvas (BUG)" +msgstr "" +"Un nœud de valeur avant l'ancien identifiant existe déjà dans ce canevas " +"(bogue)" + +#: src/synfigapp/actions/valuenodereplace.cpp:49 +msgid "Replace ValueNode" +msgstr "Remplacer le nœud de valeur" + +#: src/synfigapp/actions/valuenodereplace.cpp:85 +msgid "Destination ValueNode" +msgstr "Nœud de valeur destination" + +#: src/synfigapp/actions/valuenodereplace.cpp:86 +msgid "ValueNode to replaced" +msgstr "Nœud de valeur à remplacer" + +#: src/synfigapp/actions/valuenodereplace.cpp:91 +msgid "ValueNode that will replace the destination" +msgstr "Nœud de valeur qui va remplacer celui de destination" + +#: src/synfigapp/actions/valuenodereplace.cpp:137 +#: src/synfigapp/actions/valuenodereplace.cpp:193 +msgid "Attempted to replace valuenode with itself" +msgstr "Tentative de remplacer le nœud de valeur avec lui même" + +#: src/synfigapp/actions/valuenodereplace.cpp:140 +#: src/synfigapp/actions/valuenodereplace.cpp:196 +msgid "You cannot replace ValueNodes with different types!" +msgstr "Vous ne pouvez pas remplacer des nœud de valeur de types différents !" + +#: src/synfigapp/actions/valuenodereplace.cpp:163 +#: src/synfigapp/actions/valuenodereplace.cpp:201 +msgid "Nothing to replace." +msgstr "Rien à remplacer" + +#: src/synfigapp/actions/valuenodereplace.cpp:170 +#: src/synfigapp/actions/valuenodereplace.cpp:208 +msgid "Action Failure. This is a bug. Please report it." +msgstr "Échec de l'action. Ceci est un bogue (Signalez le, s'il vous plaît)" + +#: src/synfigapp/actions/valuenodereplace.cpp:188 +msgid "This action cannot be undone under these circumstances." +msgstr "Cette action ne peut être annulée dans ces circonstances." + +#: src/synfigapp/actions/valuenodereplace.cpp:213 +msgid ": (Undo) " +msgstr ": (Annuler)" + +#: src/synfigapp/actions/waypointadd.cpp:50 +#: src/synfigapp/actions/waypointsetsmart.cpp:59 +msgid "Add Waypoint" +msgstr "Ajouter un point de passage" + +#: src/synfigapp/actions/waypointadd.cpp:80 +#: src/synfigapp/actions/waypointsetsmart.cpp:89 +msgid "New Waypoint" +msgstr "Nouveau point de passage" + +#: src/synfigapp/actions/waypointadd.cpp:81 +#: src/synfigapp/actions/waypointsetsmart.cpp:90 +#: src/synfigapp/actions/waypointsimpleadd.cpp:79 +msgid "Waypoint to be added" +msgstr "Point de passage à ajouter" + +#: src/synfigapp/actions/waypointadd.cpp:87 +#: src/synfigapp/actions/waypointsetsmart.cpp:101 +msgid "Time where waypoint is to be added" +msgstr "Moment où ajouter le point de passage" + +#: src/synfigapp/actions/waypointadd.cpp:184 +#, c-format +msgid "A Waypoint already exists at this point in time (%s)" +msgstr "Un point de passage existe déjà à cet endroit (%s)" + +#: src/synfigapp/actions/waypointadd.cpp:187 +#: src/synfigapp/actions/waypointremove.cpp:180 +msgid "This waypoint is already in the ValueNode" +msgstr "Ce point de passage est déjà dans le nœud de valeur" + +#: src/synfigapp/actions/waypointremove.cpp:49 +msgid "Remove Waypoint" +msgstr "Supprimer le point de passage" + +#: src/synfigapp/actions/waypointremove.cpp:74 +msgid "ValueNode (Animated)" +msgstr "Nœud de valeur (Animé)" + +#: src/synfigapp/actions/waypointremove.cpp:79 +msgid "Waypoint to be Removed" +msgstr "Point de passage à supprimer" + +#: src/synfigapp/actions/waypointremove.cpp:124 +#, c-format +msgid "UniqueID mismatch, iter=%d, waypoint=%d" +msgstr "Identifiants uniques non correspondants, iter=%d, waypoint=%d" + +#: src/synfigapp/actions/waypointremove.cpp:127 +#, c-format +msgid "Time mismatch iter=%s, waypoint=%s" +msgstr "Temps non correspondant, iter=%s, waypoint=%s" + +#: src/synfigapp/actions/waypointremove.cpp:141 +msgid "Unable to create ValueNode_Reference" +msgstr "" +"Impossible de créer une réflérence de nœud de valeur (ValueNode_Reference)" + +#: src/synfigapp/actions/waypointremove.cpp:162 +msgid "" +"This animated value node should be empty, but for some reason it isn't. This " +"is a bug. (1)" +msgstr "" +"Ce nœud de valeur animé devrait être vide, mais il ne l'est pas. C'est un " +"bogue (1)" + +#: src/synfigapp/actions/waypointremove.cpp:172 +msgid "" +"This animated value node should be empty, but for some reason it isn't. This " +"is a bug. (2)" +msgstr "" +"Ce nœud de valeur animé devrait être vide, mais il ne l'est pas. C'est un " +"bogue (2)" + +#: src/synfigapp/actions/waypointremove.cpp:177 +msgid "A Waypoint already exists at this point in time" +msgstr "Un point de passage existe déjà à cet endroit" + +#: src/synfigapp/actions/waypointset.cpp:49 +msgid "Set Waypoint" +msgstr "Définir le point de passage" + +#: src/synfigapp/actions/waypointset.cpp:78 +msgid "Waypoint to be changed" +msgstr "Point de passage à modifier" + +#: src/synfigapp/actions/waypointset.cpp:133 +#: src/synfigapp/actions/waypointset.cpp:191 +#: src/synfigapp/actions/waypointset.cpp:235 +#: src/synfigapp/actions/waypointset.cpp:256 +msgid "Unable to find waypoint" +msgstr "Impossible de trouver le point de passage" + +#: src/synfigapp/actions/waypointsimpleadd.cpp:146 +msgid "The waypoint to remove no longer exists" +msgstr "Le point de passage à enlever n'existe plus" + +#: src/synfigapp/action_system.cpp:77 +msgid "Action is not ready." +msgstr "L'action n'est pas prête" + +#: src/synfigapp/action_system.cpp:109 +msgid "This action cannot be undone! Are you sure you want to continue?" +msgstr "" +"Cette action ne peut pas être annulée. Êtes-vous sûr de vouloir continuer ?" + +#: src/synfigapp/action_system.cpp:128 src/synfigapp/action_system.cpp:145 +#: src/synfigapp/action_system.cpp:156 +msgid "Failed" +msgstr "Échec" + +#: src/synfigapp/action_system.cpp:189 +msgid "Successful" +msgstr "Succès" + +#: src/synfigapp/action_system.cpp:222 src/synfigapp/action_system.cpp:224 +msgid " (Undo): " +msgstr "(Annuler) :" + +#: src/synfigapp/action_system.cpp:284 +msgid "Failed to undo." +msgstr "Échec de l'annulation." + +#: src/synfigapp/action_system.cpp:320 src/synfigapp/action_system.cpp:322 +msgid " (Redo): " +msgstr "(Rétablir) :" + +#: src/synfigapp/action_system.cpp:382 +msgid "Failed to redo." +msgstr "Échec du rétablissement " + +#: src/synfigapp/action_system.cpp:698 +msgid "State restore failure" +msgstr "Échec de la récupération de l'état" + +#: src/synfigapp/canvasinterface.cpp:160 +msgid "Action Not Ready, unable to change mode" +msgstr "Action non prête. Impossible de changer de mode" + +#: src/synfigapp/canvasinterface.cpp:166 +msgid "Unable to change mode" +msgstr "Impossible de changer de mode" + +#: src/synfigapp/canvasinterface.cpp:183 +msgid "Add Layer To" +msgstr "Ajouter un calque à" + +#: src/synfigapp/canvasinterface.cpp:288 src/synfigapp/canvasinterface.cpp:349 +#: src/synfigapp/canvasinterface.cpp:382 +msgid "Action Not Ready" +msgstr "Action non prête" + +#: src/synfigapp/canvasinterface.cpp:294 src/synfigapp/canvasinterface.cpp:356 +#: src/synfigapp/canvasinterface.cpp:389 src/synfigapp/canvasinterface.cpp:477 +#: src/synfigapp/canvasinterface.cpp:494 src/synfigapp/canvasinterface.cpp:513 +#: src/synfigapp/canvasinterface.cpp:530 src/synfigapp/canvasinterface.cpp:695 +#: src/synfigapp/canvasinterface.cpp:720 src/synfigapp/canvasinterface.cpp:773 +msgid "Action Failed." +msgstr "L'action a échoué" + +#: src/synfigapp/canvasinterface.cpp:316 +msgid "Move Action Not Ready" +msgstr "Action de déplacement non prête" + +#: src/synfigapp/canvasinterface.cpp:322 +msgid "Move Action Failed." +msgstr "L'action de déplacement a échoué" + +#: src/synfigapp/canvasinterface.cpp:365 +msgid "Empty name!" +msgstr "Nom vide !" + +#: src/synfigapp/canvasinterface.cpp:571 +msgid "Filename must have an extension!" +msgstr "Le nom de fichier doit comporter une extension !" + +#: src/synfigapp/canvasinterface.cpp:585 +msgid "Unable to open this composition" +msgstr "Impossible d'ouvrir cette composition" + +#: src/synfigapp/canvasinterface.cpp:589 +msgid "Unable to create \"Paste Canvas\" layer" +msgstr "Impossible de créer un calque \"Canevas collé\"" + +#: src/synfigapp/canvasinterface.cpp:604 +msgid "" +"Uncaught exception when attempting\n" +"to open this composition -- " +msgstr "" +"Une exception inconnue est survenue lors de\n" +"la tentative d'ouverture de cette composition --" + +#: src/synfigapp/canvasinterface.cpp:610 +msgid "I don't know how to open images of this type -- " +msgstr "Je ne sais pas ouvrir les images de ce type --" + +#: src/synfigapp/canvasinterface.cpp:765 +#, c-format +msgid "Unnamed%08d" +msgstr "SansNom%08d" + +#: src/synfigapp/canvasinterface.cpp:796 +msgid "" +"The value you are trying to edit is in a composition\n" +"which doesn't seem to be open. Open that composition and you\n" +"should be able to edit this value as normal." +msgstr "" +"Le nœud de valeur que vous essayez de modifier appartient à\n" +"une composition qui semble ne pas être ouverte. Ouvrez cette\n" +"composition et vous devriez être capable de modifier cette valeur." + +#: src/synfigapp/uimanager.cpp:56 src/synfigapp/uimanager.cpp:83 +msgid "(no/yes)" +msgstr "(non/oui)" + +#: src/synfigapp/uimanager.cpp:58 src/synfigapp/uimanager.cpp:85 +msgid "(yes/no)" +msgstr "(oui/non)" + +#: src/synfigapp/uimanager.cpp:110 +msgid "(cancel/ok)" +msgstr "(annuler/valider)" + +#: src/synfigapp/uimanager.cpp:112 +msgid "(ok/cancel)" +msgstr "(valider/annuler)" + +#: src/synfigapp/uimanager.cpp:142 +msgid "error: " +msgstr "erreur :" + +#: src/synfigapp/uimanager.cpp:149 +msgid "warning: " +msgstr "avertissement :" + +#: src/synfigapp/value_desc.cpp:60 +msgid "Layer Parameter" +msgstr "Paramètre de calque" + +#: src/synfigapp/value_desc.cpp:71 +msgid "Value Node" +msgstr "Nœud de valeur" + +#: src/synfigapp/value_desc.cpp:81 +msgid "Exported ValueNode" +msgstr "Nœud de valeur exporté" diff --git a/synfig-studio/po/ru.po b/synfig-studio/po/ru.po new file mode 100644 index 0000000..c4202fd --- /dev/null +++ b/synfig-studio/po/ru.po @@ -0,0 +1,4430 @@ +msgid "" +msgstr "" +"Project-Id-Version: Synfig Studio\n" +"Report-Msgid-Bugs-To: http://synfig.org/Bugs\n" +"POT-Creation-Date: 2008-11-25 23:51+0100\n" +"PO-Revision-Date: 2008-11-22 04:25+0300\n" +"Last-Translator: Alexandre Prokoudine \n" +"Language-Team: GNOME Cyrillic \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Russian\n" +"X-Poedit-Country: RUSSIAN FEDERATION\n" + +#: src/gtkmm/about.cpp:104 +msgid "2D vector animation studio" +msgstr "Студия двухмерной векторной анимации" + +#: src/gtkmm/about.cpp:108 +msgid "Visit the Synfig website" +msgstr "Посетите сайт Synfig" + +#: src/gtkmm/about.cpp:110 +msgid "" +"Copyright 2001-2008\n" +"Robert B. Quattlebaum Jr.,\n" +"Adrian Bentley and Synfig contributors" +msgstr "" +"Авторские права 2001-2008\n" +"Robert B. Quattlebaum Jr.,\n" +"Adrian Bentley и участники проекта Synfig" + +#. TRANSLATORS: change this to your name, separate multiple names with \n +#: src/gtkmm/about.cpp:170 +msgid "translator-credits" +msgstr "Александр Прокудин " + +#: src/gtkmm/about.cpp:197 +#, c-format +msgid "" +"\n" +"Development version:\n" +"%s\n" +msgstr "" +"\n" +"Нестабильная версия:\n" +"%s\n" + +#: src/gtkmm/about.cpp:202 +#, c-format +msgid "Built on %s\n" +msgstr "Собрана %s\n" + +#: src/gtkmm/about.cpp:206 +msgid "Built with:\n" +msgstr "При помощи:\n" + +#: src/gtkmm/about.cpp:207 +#, c-format +msgid "ETL %s\n" +msgstr "ETL %s\n" + +#: src/gtkmm/about.cpp:208 +#, c-format +msgid "Synfig API %s\n" +msgstr "Synfig API %s\n" + +#: src/gtkmm/about.cpp:209 +#, c-format +msgid "Synfig library %d\n" +msgstr "Библиотека Synfig %d\n" + +#: src/gtkmm/about.cpp:210 +#, c-format +msgid "GTK+ %d.%d.%d\n" +msgstr "GTK+ %d.%d.%d\n" + +#: src/gtkmm/about.cpp:212 +#, c-format +msgid "GNU G++ %d.%d.%d\n" +msgstr "GNU G++ %d.%d.%d\n" + +#: src/gtkmm/about.cpp:217 +msgid "Using:\n" +msgstr "Использование:\n" + +#: src/gtkmm/about.cpp:218 +#, c-format +msgid "Synfig %s\n" +msgstr "Synfig %s\n" + +#: src/gtkmm/about.cpp:219 +#, c-format +msgid "GTK+ %d.%d.%d" +msgstr "GTK+ %d.%d.%d" + +#: src/gtkmm/app.cpp:679 src/gtkmm/toolbox.cpp:282 +msgid "_File" +msgstr "_Файл" + +#: src/gtkmm/app.cpp:680 src/gtkmm/canvasview.cpp:3343 +msgid "_Edit" +msgstr "_Правка" + +#: src/gtkmm/app.cpp:681 +msgid "_View" +msgstr "_Вид" + +#: src/gtkmm/app.cpp:682 +msgid "_Canvas" +msgstr "_Холст" + +#: src/gtkmm/app.cpp:683 +msgid "_Layer" +msgstr "Сло_й" + +#: src/gtkmm/app.cpp:684 +msgid "Show/Hide Ducks" +msgstr "" + +#: src/gtkmm/app.cpp:685 +msgid "Preview Quality" +msgstr "Качество предпросмотра" + +#: src/gtkmm/app.cpp:686 +msgid "Low-Res Pixel Size" +msgstr "" + +#: src/gtkmm/app.cpp:687 src/gtkmm/canvasview.cpp:2277 +#: src/synfigapp/actions/layeradd.cpp:82 +msgid "New Layer" +msgstr "Создать слой" + +#: src/gtkmm/app.cpp:688 src/synfigapp/actions/keyframeduplicate.cpp:79 +#: src/synfigapp/actions/keyframeremove.cpp:78 +#: src/synfigapp/actions/keyframesetdelta.cpp:79 +#: src/synfigapp/actions/keyframewaypointset.cpp:78 +msgid "Keyframe" +msgstr "Ключевой кадр" + +#: src/gtkmm/app.cpp:689 src/gtkmm/iconcontroller.cpp:164 +#: src/synfigapp/actions/groupaddlayers.cpp:78 +#: src/synfigapp/actions/groupremove.cpp:72 +msgid "Group" +msgstr "Группа" + +#: src/gtkmm/app.cpp:690 +msgid "State" +msgstr "Инструменты" + +#: src/gtkmm/app.cpp:691 +msgid "Toolbox" +msgstr "Панель инструментов" + +#: src/gtkmm/app.cpp:708 src/gtkmm/keyframeactionmanager.cpp:239 +msgid "Keyframe Properties" +msgstr "Свойства ключевого кадра" + +#: src/gtkmm/app.cpp:719 src/gtkmm/canvasview.cpp:1206 +msgid "Import" +msgstr "Импортировать" + +#: src/gtkmm/app.cpp:720 src/gtkmm/canvasview.cpp:1209 +msgid "Render" +msgstr "Рендеринг" + +#: src/gtkmm/app.cpp:721 src/gtkmm/canvasview.cpp:1212 +#: src/gtkmm/dialog_preview.cpp:171 +msgid "Preview" +msgstr "Предпросмотр" + +#: src/gtkmm/app.cpp:722 +msgid "Preview Dialog" +msgstr "" + +#: src/gtkmm/app.cpp:723 src/gtkmm/canvasview.cpp:1215 +msgid "Sound File" +msgstr "Звуковой файл" + +#: src/gtkmm/app.cpp:724 src/gtkmm/canvasoptions.cpp:151 +#: src/gtkmm/canvasview.cpp:1218 +msgid "Options" +msgstr "Параметры" + +#: src/gtkmm/app.cpp:725 +msgid "Close View" +msgstr "" + +#: src/gtkmm/app.cpp:726 src/gtkmm/canvasview.cpp:1224 +msgid "Close Document" +msgstr "Закрыть документ" + +#: src/gtkmm/app.cpp:735 src/gtkmm/canvasview.cpp:1239 +msgid "Select All Ducks" +msgstr "" + +#: src/gtkmm/app.cpp:736 src/gtkmm/canvasview.cpp:1243 +msgid "Unselect All Ducks" +msgstr "" + +#: src/gtkmm/app.cpp:737 src/gtkmm/canvasview.cpp:1247 +msgid "Select All Layers" +msgstr "Выбрать все слои" + +#: src/gtkmm/app.cpp:738 src/gtkmm/canvasview.cpp:1251 +msgid "Unselect All Layers" +msgstr "Снять выделение со всех слоёв" + +#: src/gtkmm/app.cpp:739 src/gtkmm/canvasproperties.cpp:197 +msgid "Properties" +msgstr "Свойства" + +#: src/gtkmm/app.cpp:741 src/gtkmm/canvasview.cpp:1417 +msgid "Show Position Ducks" +msgstr "" + +#: src/gtkmm/app.cpp:742 src/gtkmm/canvasview.cpp:1419 +msgid "Show Vertex Ducks" +msgstr "" + +#: src/gtkmm/app.cpp:743 src/gtkmm/canvasview.cpp:1418 +msgid "Show Tangent Ducks" +msgstr "" + +#: src/gtkmm/app.cpp:744 src/gtkmm/canvasview.cpp:1420 +msgid "Show Radius Ducks" +msgstr "" + +#: src/gtkmm/app.cpp:745 src/gtkmm/canvasview.cpp:1421 +msgid "Show Width Ducks" +msgstr "" + +#: src/gtkmm/app.cpp:746 src/gtkmm/canvasview.cpp:1422 +msgid "Show Angle Ducks" +msgstr "" + +#: src/gtkmm/app.cpp:747 src/gtkmm/canvasview.cpp:1270 +msgid "Use Parametric Renderer" +msgstr "" + +#: src/gtkmm/app.cpp:748 +msgid "Use Quality Level 1" +msgstr "Использовать уровень качества 1" + +#: src/gtkmm/app.cpp:749 +msgid "Use Quality Level 2" +msgstr "Использовать уровень качества 2" + +#: src/gtkmm/app.cpp:750 +msgid "Use Quality Level 3" +msgstr "Использовать уровень качества 3" + +#: src/gtkmm/app.cpp:751 +msgid "Use Quality Level 4" +msgstr "Использовать уровень качества 4" + +#: src/gtkmm/app.cpp:752 +msgid "Use Quality Level 5" +msgstr "Использовать уровень качества 5" + +#: src/gtkmm/app.cpp:753 +msgid "Use Quality Level 6" +msgstr "Использовать уровень качества 6" + +#: src/gtkmm/app.cpp:754 +msgid "Use Quality Level 7" +msgstr "Использовать уровень качества 7" + +#: src/gtkmm/app.cpp:755 +msgid "Use Quality Level 8" +msgstr "Использовать уровень качества 8" + +#: src/gtkmm/app.cpp:756 +msgid "Use Quality Level 9" +msgstr "Использовать уровень качества 9" + +#: src/gtkmm/app.cpp:757 +msgid "Use Quality Level 10" +msgstr "Использовать уровень качества 10" + +#: src/gtkmm/app.cpp:759 src/gtkmm/canvasview.cpp:1304 +#, c-format +msgid "Set Low-Res pixel size to %d" +msgstr "" + +#: src/gtkmm/app.cpp:760 src/gtkmm/preview.cpp:358 +msgid "Play" +msgstr "" + +#: src/gtkmm/app.cpp:762 src/gtkmm/canvasview.cpp:994 +#: src/gtkmm/preview.cpp:364 +msgid "Stop" +msgstr "Остановить" + +#: src/gtkmm/app.cpp:763 +msgid "Toggle Grid Show" +msgstr "" + +#: src/gtkmm/app.cpp:764 +msgid "Toggle Grid Snap" +msgstr "" + +#: src/gtkmm/app.cpp:765 +msgid "Toggle Guide Show" +msgstr "" + +#: src/gtkmm/app.cpp:766 +msgid "Toggle Low-Res" +msgstr "" + +#: src/gtkmm/app.cpp:767 src/gtkmm/canvasview.cpp:1320 +msgid "Decrease Low-Res Pixel Size" +msgstr "" + +#: src/gtkmm/app.cpp:768 src/gtkmm/canvasview.cpp:1323 +msgid "Increase Low-Res Pixel Size" +msgstr "" + +#: src/gtkmm/app.cpp:769 +msgid "Toggle Onion Skin" +msgstr "" + +#: src/gtkmm/app.cpp:776 src/gtkmm/canvasview.cpp:1386 +msgid "Jump to Next Keyframe" +msgstr "Перейти к следующему ключевому кадру" + +#: src/gtkmm/app.cpp:777 src/gtkmm/canvasview.cpp:1389 +msgid "Jump to Prev Keyframe" +msgstr "Перейти к предыдущему ключевому кадру" + +#: src/gtkmm/app.cpp:778 src/gtkmm/canvasview.cpp:1370 +msgid "Next Frame" +msgstr "Следующий кадр" + +#: src/gtkmm/app.cpp:779 src/gtkmm/canvasview.cpp:1372 +msgid "Prev Frame" +msgstr "Предыдущий кадр" + +#: src/gtkmm/app.cpp:780 src/gtkmm/canvasview.cpp:1375 +msgid "Seek Forward" +msgstr "Перемотать вперед" + +#: src/gtkmm/app.cpp:781 src/gtkmm/canvasview.cpp:1377 +msgid "Seek Backward" +msgstr "Перемотать назад" + +#: src/gtkmm/app.cpp:782 src/gtkmm/canvasview.cpp:1383 +msgid "Seek to Begin" +msgstr "Перемотать к началу" + +#: src/gtkmm/app.cpp:783 src/gtkmm/canvasview.cpp:1380 +msgid "Seek to End" +msgstr "Перемотать к концу" + +#: src/gtkmm/app.cpp:785 +msgid "Add group" +msgstr "Добавить группу" + +#: src/gtkmm/app.cpp:787 src/gtkmm/iconcontroller.cpp:159 +#: src/synfigapp/actions/canvasadd.cpp:73 +msgid "New Canvas" +msgstr "" + +#: src/gtkmm/app.cpp:789 src/gtkmm/layeractionmanager.cpp:105 +#: src/gtkmm/layeractionmanager.cpp:498 +msgid "Increase Amount" +msgstr "" + +#: src/gtkmm/app.cpp:790 src/gtkmm/layeractionmanager.cpp:117 +#: src/gtkmm/layeractionmanager.cpp:515 +msgid "Decrease Amount" +msgstr "" + +#: src/gtkmm/app.cpp:1148 src/gtkmm/toolbox.cpp:360 +msgid "Synfig Studio" +msgstr "Synfig Studio" + +#: src/gtkmm/app.cpp:1161 src/gtkmm/app.cpp:1166 +msgid "Failed to initialize synfig!" +msgstr "" + +#: src/gtkmm/app.cpp:1175 +msgid "Init UI Manager..." +msgstr "Диспетчер интерфейса..." + +#: src/gtkmm/app.cpp:1179 +msgid "Init Dock Manager..." +msgstr "Диспетчер панелей..." + +#: src/gtkmm/app.cpp:1182 +msgid "Init State Manager..." +msgstr "Диспетчер состояния..." + +#: src/gtkmm/app.cpp:1185 +msgid "Init Toolbox..." +msgstr "Панель инструментов..." + +#: src/gtkmm/app.cpp:1188 +msgid "Init About Dialog..." +msgstr "Справочный диалог..." + +#: src/gtkmm/app.cpp:1191 +msgid "Init Tool Options..." +msgstr "Параметры инструментов..." + +#: src/gtkmm/app.cpp:1195 +msgid "Init History..." +msgstr "История действий..." + +#: src/gtkmm/app.cpp:1199 +msgid "Init Canvases..." +msgstr "Холсты..." + +#: src/gtkmm/app.cpp:1203 +msgid "Init Keyframes..." +msgstr "Ключевые кадры..." + +#: src/gtkmm/app.cpp:1207 +msgid "Init Layers..." +msgstr "Слои..." + +#: src/gtkmm/app.cpp:1211 +msgid "Init Params..." +msgstr "Параметры..." + +#: src/gtkmm/app.cpp:1215 +msgid "Init MetaData..." +msgstr "Метаданные..." + +#: src/gtkmm/app.cpp:1219 +msgid "Init Children..." +msgstr "Потомки..." + +#: src/gtkmm/app.cpp:1223 +msgid "Init Info..." +msgstr "" + +#: src/gtkmm/app.cpp:1227 +msgid "Init Navigator..." +msgstr "Навигатор..." + +#: src/gtkmm/app.cpp:1231 +msgid "Init Timetrack..." +msgstr "Дорожка времени..." + +#: src/gtkmm/app.cpp:1235 +msgid "Init Curve Editor..." +msgstr "Редактор кривой..." + +#: src/gtkmm/app.cpp:1239 +msgid "Init Layer Groups..." +msgstr "Группы слоев..." + +#: src/gtkmm/app.cpp:1244 +msgid "Init Color Dialog..." +msgstr "Диалог выбора цвета..." + +#: src/gtkmm/app.cpp:1247 +msgid "Init Gradient Dialog..." +msgstr "Редактор градиентов..." + +#: src/gtkmm/app.cpp:1250 +msgid "Init DeviceTracker..." +msgstr "" + +#: src/gtkmm/app.cpp:1253 +msgid "Init Tools..." +msgstr "Инструменты..." + +#: src/gtkmm/app.cpp:1260 +msgid "Init ModMirror..." +msgstr "" + +#: src/gtkmm/app.cpp:1280 +msgid "Init ModPalette..." +msgstr "" + +#: src/gtkmm/app.cpp:1283 +msgid "Init Setup Dialog..." +msgstr "Диалог настройки..." + +#: src/gtkmm/app.cpp:1286 +msgid "Init Input Dialog..." +msgstr "Диалог устройств ввода..." + +#: src/gtkmm/app.cpp:1291 +msgid "Init auto recovery..." +msgstr "Автовосстановление..." + +#: src/gtkmm/app.cpp:1295 +msgid "Loading Settings..." +msgstr "Загружаются параметры..." + +#: src/gtkmm/app.cpp:1297 +msgid "Checking auto-recover..." +msgstr "Нужно ли автовосстановление..." + +#: src/gtkmm/app.cpp:1305 +msgid "Auto Recovery" +msgstr "Автовосстановление" + +#: src/gtkmm/app.cpp:1306 +msgid "" +"Synfig Studio seems to have crashed\n" +"before you could save all your files.\n" +"Would you like to re-open those files\n" +"and recover your unsaved changes?" +msgstr "" +"Кажется, Synfig Studio «упала» прежде,\n" +"чем вы сохранили данные. Вы хотите \n" +"заново открыть эти файлы и восстановить\n" +"не сохранившиеся изменения?" + +#: src/gtkmm/app.cpp:1315 +msgid "Unable to fully recover from previous crash" +msgstr "Невозможно полностью восстановить данные" + +#: src/gtkmm/app.cpp:1317 +msgid "Unable to recover from previous crash" +msgstr "Невозможно восстановить данные" + +#: src/gtkmm/app.cpp:1320 +msgid "" +"Synfig Studio has attempted to recover\n" +"from a previous crash. The files that it has\n" +"recovered are NOT YET SAVED. It would be a good\n" +"idea to review them and save them now." +msgstr "" + +#: src/gtkmm/app.cpp:1336 +msgid "Loading files..." +msgstr "" + +#: src/gtkmm/app.cpp:1347 +msgid "Done." +msgstr "Готово" + +#: src/gtkmm/app.cpp:1354 src/gtkmm/app.cpp:1358 +msgid "" +"Unknown exception caught when constructing App.\n" +"This software may be unstable." +msgstr "" + +#: src/gtkmm/app.cpp:1771 +msgid "Quit Request" +msgstr "" + +#: src/gtkmm/app.cpp:1774 +msgid "Cannot quit!" +msgstr "" + +#: src/gtkmm/app.cpp:1774 +msgid "" +"Tasks are currently running.\n" +"Please cancel the current tasks and try again" +msgstr "" + +#: src/gtkmm/app.cpp:1842 +msgid "Quit Request sent" +msgstr "" + +#: src/gtkmm/app.cpp:2059 +msgid "current" +msgstr "" + +#: src/gtkmm/app.cpp:2062 +msgid "and older" +msgstr "" + +#: src/gtkmm/app.cpp:2066 +msgid "File Format Version: " +msgstr "Версия формата файлов:" + +#: src/gtkmm/app.cpp:2165 +msgid "Feature not available" +msgstr "Функция недоступна" + +#: src/gtkmm/app.cpp:2166 +msgid "Sorry, this feature has not yet been implemented." +msgstr "" + +#: src/gtkmm/app.cpp:2251 +msgid "Documentation" +msgstr "Документация" + +#: src/gtkmm/app.cpp:2252 +msgid "" +"Documentation for Synfig Studio is available on the website:\n" +"\n" +"http://www.synfig.org/Documentation" +msgstr "" + +#: src/gtkmm/app.cpp:2253 src/gtkmm/toolbox.cpp:299 +msgid "Help" +msgstr "Справка" + +#: src/gtkmm/app.cpp:2263 +msgid "No browser was found. Please load this website manually:" +msgstr "" + +#: src/gtkmm/app.cpp:2265 +msgid "No browser found" +msgstr "" + +#: src/gtkmm/app.cpp:2374 +#, c-format +msgid "" +"Unable to load \"%s\":\n" +"\n" +msgstr "" + +#: src/gtkmm/app.cpp:2377 src/gtkmm/canvasview.cpp:3479 +#: src/gtkmm/canvasview.cpp:3591 +msgid "Warnings" +msgstr "" + +#: src/gtkmm/app.cpp:2385 +#, c-format +msgid "Unable to create instance for \"%s\"" +msgstr "" + +#: src/gtkmm/app.cpp:2391 src/gtkmm/iconcontroller.cpp:189 +#: src/gtkmm/instance.cpp:560 +msgid "CVS Update" +msgstr "" + +#: src/gtkmm/app.cpp:2391 +msgid "" +"There appears to be a newer version of this file available on the CVS " +"repository.\n" +"Would you like to update now? (It would probably be a good idea)" +msgstr "" + +#: src/gtkmm/app.cpp:2397 src/gtkmm/app.cpp:2402 src/gtkmm/app.cpp:2407 +#: src/gtkmm/instance.cpp:482 src/gtkmm/instance.cpp:498 +#: src/gtkmm/instance.cpp:510 src/gtkmm/instance.cpp:521 +#: src/gtkmm/instance.cpp:535 src/gtkmm/instance.cpp:546 +#: src/gtkmm/instance.cpp:576 src/gtkmm/instance.cpp:587 +#: src/gtkmm/instance.cpp:603 src/gtkmm/instance.cpp:612 +#: src/gtkmm/layerparamtreestore.cpp:246 +#: src/gtkmm/widget_canvaschooser.cpp:145 +#: src/gtkmm/widget_canvaschooser.cpp:164 +msgid "Error" +msgstr "Ошибка" + +#: src/gtkmm/app.cpp:2407 +msgid "Uncaught error on file open (BUG)" +msgstr "" + +#: src/gtkmm/app.cpp:2461 +msgid "Unable to open file" +msgstr "" + +#: src/gtkmm/canvasoptions.cpp:61 +msgid "Canvas Options" +msgstr "Параметры холста" + +#: src/gtkmm/canvasoptions.cpp:63 +msgid "_Snap to grid" +msgstr "Прилипать к _сетке" + +#: src/gtkmm/canvasoptions.cpp:64 +msgid "S_how grid" +msgstr "_Показывать сетку" + +#: src/gtkmm/canvasoptions.cpp:65 +msgid "Snap to _frame" +msgstr "Прилипать к _кадрам" + +#: src/gtkmm/canvasoptions.cpp:80 +msgid "Grid" +msgstr "Сетка" + +#: src/gtkmm/canvasoptions.cpp:90 +msgid "_Grid size" +msgstr "_Размер ячейки сетки" + +#: src/gtkmm/canvasoptions.cpp:104 src/gtkmm/iconcontroller.cpp:143 +#: src/gtkmm/keyframetree.cpp:62 src/gtkmm/renddesc.cpp:96 +#: src/synfigapp/actions/activepointadd.cpp:86 +#: src/synfigapp/actions/activepointsetoff.cpp:93 +#: src/synfigapp/actions/activepointseton.cpp:93 +#: src/synfigapp/actions/activepointsetsmart.cpp:93 +#: src/synfigapp/actions/blinepointtangentmerge.cpp:91 +#: src/synfigapp/actions/blinepointtangentsplit.cpp:91 +#: src/synfigapp/actions/colorset.cpp:83 +#: src/synfigapp/actions/gradientset.cpp:83 +#: src/synfigapp/actions/keyframeduplicate.cpp:84 +#: src/synfigapp/actions/layerparamdisconnect.cpp:83 +#: src/synfigapp/actions/valuedescblinelink.cpp:89 +#: src/synfigapp/actions/valuedescconvert.cpp:102 +#: src/synfigapp/actions/valuedescdisconnect.cpp:95 +#: src/synfigapp/actions/valuedescset.cpp:100 +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:80 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:81 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:81 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:83 +#: src/synfigapp/actions/waypointadd.cpp:87 +#: src/synfigapp/actions/waypointsetsmart.cpp:100 +msgid "Time" +msgstr "Время" + +#: src/gtkmm/canvasoptions.cpp:113 src/gtkmm/dialog_setup.cpp:179 +msgid "Units" +msgstr "Единицы" + +#: src/gtkmm/canvasoptions.cpp:114 +msgid "Not yet implemented!" +msgstr "Пока не реализовано!" + +#: src/gtkmm/canvasoptions.cpp:169 src/gtkmm/dialog_keyframe.cpp:89 +msgid "Not yet implemented" +msgstr "Пока не реализовано" + +#: src/gtkmm/canvasproperties.cpp:64 +msgid "Canvas Properties" +msgstr "Свойства холста" + +#: src/gtkmm/canvasproperties.cpp:77 +msgid "Canvas Info" +msgstr "" + +#: src/gtkmm/canvasproperties.cpp:79 +msgid "Canvas Info" +msgstr "Данные о холсте" + +#: src/gtkmm/canvasproperties.cpp:95 +msgid "_ID" +msgstr "_ID" + +#: src/gtkmm/canvasproperties.cpp:101 +msgid "_Name" +msgstr "_Имя" + +#: src/gtkmm/canvasproperties.cpp:104 +msgid "_Description" +msgstr "О_писание" + +#: src/gtkmm/canvasproperties.cpp:146 src/gtkmm/dock_metadata.cpp:69 +msgid "Key" +msgstr "Ключ" + +#: src/gtkmm/canvasproperties.cpp:147 src/gtkmm/dock_metadata.cpp:70 +msgid "Data" +msgstr "Данные" + +#: src/gtkmm/canvasproperties.cpp:182 src/gtkmm/dock_metadata.cpp:134 +msgid "New MetaData Entry" +msgstr "Новая запись в метаданных" + +#: src/gtkmm/canvasproperties.cpp:182 src/gtkmm/dock_metadata.cpp:134 +msgid "Please enter the name of the key" +msgstr "Введите название ключа" + +#: src/gtkmm/canvasproperties.cpp:226 +msgid "Edit Canvas Properties" +msgstr "" + +#: src/gtkmm/canvastreestore.cpp:204 src/gtkmm/canvastreestore.cpp:242 +#: src/gtkmm/childrentreestore.cpp:204 src/gtkmm/iconcontroller.cpp:150 +#: src/synfigapp/action.cpp:479 +msgid "Canvas" +msgstr "Холст" + +#: src/gtkmm/canvastreestore.cpp:241 src/gtkmm/childrentreestore.cpp:201 +#: src/gtkmm/instance.cpp:416 +msgid "[Unnamed]" +msgstr "" + +#: src/gtkmm/canvasview.cpp:241 src/gtkmm/workarea.cpp:2344 +#: src/gtkmm/workarea.cpp:2439 +msgid "Idle" +msgstr "Бездействие" + +#: src/gtkmm/canvasview.cpp:331 +msgid "ERROR" +msgstr "ОШИБКА" + +#: src/gtkmm/canvasview.cpp:380 +msgid "Feature not yet implemented" +msgstr "" + +#: src/gtkmm/canvasview.cpp:926 +msgid "Moves the time window" +msgstr "" + +#: src/gtkmm/canvasview.cpp:927 +msgid "Changes the current time" +msgstr "" + +#: src/gtkmm/canvasview.cpp:936 +msgid "Animate" +msgstr "Анимировать" + +#: src/gtkmm/canvasview.cpp:940 src/gtkmm/canvasview.cpp:2545 +#: src/gtkmm/iconcontroller.cpp:183 +msgid "All Keyframes Locked" +msgstr "Все ключевые кадры заперты" + +#: src/gtkmm/canvasview.cpp:995 +msgid "Refresh" +msgstr "Обновить" + +#: src/gtkmm/canvasview.cpp:1221 +msgid "Close Window" +msgstr "Закрыть окно" + +#: src/gtkmm/canvasview.cpp:1227 +msgid "Quit" +msgstr "Выйти" + +#: src/gtkmm/canvasview.cpp:1279 +msgid " (best)" +msgstr "" + +#: src/gtkmm/canvasview.cpp:1280 +msgid " (fastest)" +msgstr "" + +#: src/gtkmm/canvasview.cpp:1282 +#, c-format +msgid "Set Quality to %d" +msgstr "" + +#: src/gtkmm/canvasview.cpp:1332 +msgid "Flipbook Dialog" +msgstr "Диалог кинеографа" + +#: src/gtkmm/canvasview.cpp:1339 src/gtkmm/iconcontroller.cpp:165 +msgid "Show Grid" +msgstr "Показывать сетку" + +#: src/gtkmm/canvasview.cpp:1343 +msgid "Snap to Grid" +msgstr "Прилипать к сетке" + +#: src/gtkmm/canvasview.cpp:1347 +msgid "Show Guides" +msgstr "Показывать направляющие" + +#: src/gtkmm/canvasview.cpp:1351 +msgid "Use Low-Res" +msgstr "" + +#: src/gtkmm/canvasview.cpp:1355 +msgid "Show Onion Skin" +msgstr "Показывать восковку" + +#: src/gtkmm/canvasview.cpp:1398 +msgid "Zoom In on Timeline" +msgstr "" + +#: src/gtkmm/canvasview.cpp:1401 +msgid "Zoom Out on Timeline" +msgstr "" + +#: src/gtkmm/canvasview.cpp:1807 src/gtkmm/canvasview.cpp:2280 +msgid "Select All Children" +msgstr "Выделить всех потомков" + +#: src/gtkmm/canvasview.cpp:2093 +msgid "-MODIFIED" +msgstr "" + +#: src/gtkmm/canvasview.cpp:2095 +msgid "-UPDATED" +msgstr "" + +#: src/gtkmm/canvasview.cpp:2100 +msgid " (Root)" +msgstr "" + +#: src/gtkmm/canvasview.cpp:2524 +msgid "In Animate Editing Mode" +msgstr "" + +#: src/gtkmm/canvasview.cpp:2534 +msgid "Not in Animate Editing Mode" +msgstr "" + +#: src/gtkmm/canvasview.cpp:2555 src/gtkmm/iconcontroller.cpp:185 +msgid "Future Keyframes Locked" +msgstr "Будущие ключевые кадры заперты" + +#: src/gtkmm/canvasview.cpp:2565 src/gtkmm/iconcontroller.cpp:184 +msgid "Past Keyframes Locked" +msgstr "Прошлые ключевые кадры заперты" + +#: src/gtkmm/canvasview.cpp:2575 src/gtkmm/iconcontroller.cpp:186 +msgid "No Keyframes Locked" +msgstr "Нет запертых ключевых кадров" + +#: src/gtkmm/canvasview.cpp:3190 +msgid "Change Waypoint Group" +msgstr "" + +#: src/gtkmm/canvasview.cpp:3221 +msgid "Duplicate Waypoints" +msgstr "" + +#: src/gtkmm/canvasview.cpp:3237 +msgid "Remove Waypoints" +msgstr "" + +#: src/gtkmm/canvasview.cpp:3282 src/gtkmm/canvasview.cpp:3285 +#: src/gtkmm/canvasview.cpp:3288 src/gtkmm/widget_defaults.cpp:292 +msgid "_TCB" +msgstr "" + +#: src/gtkmm/canvasview.cpp:3292 src/gtkmm/canvasview.cpp:3295 +#: src/gtkmm/canvasview.cpp:3298 src/gtkmm/widget_defaults.cpp:295 +msgid "_Linear" +msgstr "" + +#: src/gtkmm/canvasview.cpp:3302 +msgid "_Ease In" +msgstr "" + +#: src/gtkmm/canvasview.cpp:3305 +msgid "_Ease Out" +msgstr "" + +#: src/gtkmm/canvasview.cpp:3308 src/gtkmm/widget_defaults.cpp:294 +msgid "_Ease In/Out" +msgstr "" + +#: src/gtkmm/canvasview.cpp:3312 src/gtkmm/canvasview.cpp:3315 +#: src/gtkmm/canvasview.cpp:3318 src/gtkmm/widget_defaults.cpp:293 +msgid "_Constant" +msgstr "" + +#: src/gtkmm/canvasview.cpp:3333 +msgid "_Jump To" +msgstr "" + +#: src/gtkmm/canvasview.cpp:3336 +msgid "_Duplicate" +msgstr "" + +#: src/gtkmm/canvasview.cpp:3339 +msgid "_Remove" +msgstr "" + +#: src/gtkmm/canvasview.cpp:3339 +#, c-format +msgid "_Remove %d Waypoints" +msgstr "" + +#: src/gtkmm/canvasview.cpp:3350 +msgid "_Both" +msgstr "" + +#: src/gtkmm/canvasview.cpp:3351 +msgid "_In" +msgstr "" + +#: src/gtkmm/canvasview.cpp:3352 +msgid "_Out" +msgstr "" + +#: src/gtkmm/canvasview.cpp:3587 src/synfigapp/canvasinterface.cpp:565 +msgid "Import Image" +msgstr "Импортировать изображение" + +#: src/gtkmm/cellrenderer_value.cpp:221 +msgid "Paragraph" +msgstr "Абзац" + +#: src/gtkmm/cellrenderer_value.cpp:225 +msgid "Enter Paragraph Text Here:" +msgstr "" + +#: src/gtkmm/cellrenderer_value.cpp:411 +msgid "" +msgstr "" + +#: src/gtkmm/cellrenderer_value.cpp:441 src/gtkmm/iconcontroller.cpp:147 +msgid "Segment" +msgstr "" + +#: src/gtkmm/cellrenderer_value.cpp:448 +msgid "List" +msgstr "Список" + +#: src/gtkmm/cellrenderer_value.cpp:451 src/gtkmm/iconcontroller.cpp:148 +msgid "BLine Point" +msgstr "Узел кривой" + +#: src/gtkmm/cellrenderer_value.cpp:454 +msgid "UNKNOWN" +msgstr "НЕИЗВЕСТНО" + +#: src/gtkmm/childrentree.cpp:93 src/gtkmm/dock_canvases.cpp:108 +#: src/synfigapp/actions/canvasadd.cpp:78 +msgid "ID" +msgstr "ID" + +#: src/gtkmm/childrentree.cpp:113 src/gtkmm/layertree.cpp:354 +#: src/synfigapp/actions/valuedescconvert.cpp:97 +msgid "Type" +msgstr "Тип" + +#: src/gtkmm/childrentree.cpp:124 src/synfigapp/actions/layerparamset.cpp:80 +#: src/synfigapp/actions/valuedescset.cpp:96 +#: src/synfigapp/actions/valuenodeconstset.cpp:77 +msgid "ValueBase" +msgstr "" + +#: src/gtkmm/childrentree.cpp:140 src/gtkmm/dock_timetrack.cpp:87 +#: src/gtkmm/iconcontroller.cpp:181 src/gtkmm/layertree.cpp:367 +msgid "Time Track" +msgstr "Дорожка времени" + +#: src/gtkmm/childrentreestore.cpp:78 +msgid "Canvases" +msgstr "Холсты" + +#: src/gtkmm/childrentreestore.cpp:83 +msgid "ValueBase Nodes" +msgstr "" + +#: src/gtkmm/dialog_color.cpp:68 +msgid "Colors" +msgstr "Цвета" + +#: src/gtkmm/dialog_gradient.cpp:65 +msgid "Gradient Editor" +msgstr "Редактор градиентов" + +#: src/gtkmm/dialog_gradient.cpp:75 +msgid "Set as Default" +msgstr "" + +#: src/gtkmm/dialog_keyframe.cpp:59 +msgid "Keyframe Dialog" +msgstr "Диалог ключевых кадров" + +#: src/gtkmm/dialog_preview.cpp:62 +msgid "Preview Window" +msgstr "Окно предпросмотра" + +#: src/gtkmm/dialog_preview.cpp:88 +msgid "Preview Options" +msgstr "Параметры предпросмотра" + +#: src/gtkmm/dialog_preview.cpp:91 +msgid "_Begin Time" +msgstr "Время _начала:" + +#: src/gtkmm/dialog_preview.cpp:92 src/gtkmm/renddesc.cpp:556 +msgid "_End Time" +msgstr "_Время конца:" + +#: src/gtkmm/dialog_preview.cpp:106 +msgid "General Settings" +msgstr "Общие параметры" + +#: src/gtkmm/dialog_preview.cpp:108 +msgid "General Settings" +msgstr "Общие параметры" + +#: src/gtkmm/dialog_preview.cpp:120 +msgid "_Zoom" +msgstr "_Масштаб:" + +#: src/gtkmm/dialog_preview.cpp:129 src/gtkmm/renddesc.cpp:546 +msgid "_Frames per second" +msgstr "_Кадров/с:" + +#: src/gtkmm/dialog_preview.cpp:138 src/gtkmm/renddesc.cpp:532 +msgid "Time Settings" +msgstr "Временные параметры" + +#: src/gtkmm/dialog_preview.cpp:140 src/gtkmm/renddesc.cpp:534 +msgid "Time Settings" +msgstr "Временные параметры" + +#: src/gtkmm/dialog_setup.cpp:74 +msgid "Synfig Studio Setup" +msgstr "" + +#: src/gtkmm/dialog_setup.cpp:80 +msgid "Visually Linear Color Selection" +msgstr "" + +#: src/gtkmm/dialog_setup.cpp:82 +msgid "Use Only a Single Thread" +msgstr "" + +#: src/gtkmm/dialog_setup.cpp:84 +msgid "Restrict Real-Valued Ducks to Top Right Quadrant" +msgstr "" + +#: src/gtkmm/dialog_setup.cpp:85 +msgid "Scale New Imported Images to Fit Canvas" +msgstr "" + +#: src/gtkmm/dialog_setup.cpp:115 +msgid "Gamma" +msgstr "Гамма" + +#: src/gtkmm/dialog_setup.cpp:121 src/gtkmm/widget_coloredit.cpp:354 +msgid "Red" +msgstr "Красный" + +#: src/gtkmm/dialog_setup.cpp:126 src/gtkmm/widget_coloredit.cpp:356 +msgid "Green" +msgstr "Зеленый" + +#: src/gtkmm/dialog_setup.cpp:131 src/gtkmm/widget_coloredit.cpp:358 +msgid "Blue" +msgstr "Синий" + +#: src/gtkmm/dialog_setup.cpp:135 +msgid "Black Level" +msgstr "Уровень черного" + +#: src/gtkmm/dialog_setup.cpp:146 +msgid "Misc." +msgstr "Разное" + +#: src/gtkmm/dialog_setup.cpp:152 +msgid "Timestamp" +msgstr "Отметка времени" + +#: src/gtkmm/dialog_setup.cpp:180 +msgid "Pixels" +msgstr "Пиксел" + +#: src/gtkmm/dialog_setup.cpp:181 +msgid "Points" +msgstr "Пункт" + +#: src/gtkmm/dialog_setup.cpp:182 +msgid "Inches" +msgstr "Дюйм" + +#: src/gtkmm/dialog_setup.cpp:183 +msgid "Meters" +msgstr "Метр" + +#: src/gtkmm/dialog_setup.cpp:184 +msgid "Centimeters" +msgstr "Сантиметр" + +#: src/gtkmm/dialog_setup.cpp:185 +msgid "Millimeters" +msgstr "Миллиметр" + +#: src/gtkmm/dialog_setup.cpp:190 +msgid "Unit System" +msgstr "Единица измерения" + +#: src/gtkmm/dialog_setup.cpp:196 +msgid "Recent Files" +msgstr "Помнить недавних файлов" + +#: src/gtkmm/dialog_setup.cpp:208 +msgid "Auto Backup Interval (0 to disable)" +msgstr "Интервал автосохранения (0 отключает)" + +#: src/gtkmm/dialog_setup.cpp:218 +msgid "Browser Command" +msgstr "Команда браузера" + +#: src/gtkmm/dialog_setup.cpp:223 +msgid "Document" +msgstr "Документ" + +#: src/gtkmm/dialog_setup.cpp:226 +msgid "New Document filename prefix" +msgstr "Новый префикс имени файлов" + +#: src/gtkmm/dialog_setup.cpp:228 +msgid "File name prefix for the new created document" +msgstr "" + +#: src/gtkmm/dialog_setup.cpp:232 +msgid "New Document X size" +msgstr "Ширина нового документа" + +#: src/gtkmm/dialog_setup.cpp:234 +msgid "Width in pixels of the new created document" +msgstr "Ширина нового документа в пикселах" + +#: src/gtkmm/dialog_setup.cpp:238 +msgid "New Document Y size" +msgstr "Высота нового документа" + +#: src/gtkmm/dialog_setup.cpp:240 +msgid "High in pixels of the new created document" +msgstr "Высота нового документа в пикселах" + +#: src/gtkmm/dialog_setup.cpp:244 +msgid "Predefined Resolutions:" +msgstr "Предустановки:" + +#: src/gtkmm/dialog_setup.cpp:249 +msgid "4096x3112 Full Aperture 4K" +msgstr "" + +#: src/gtkmm/dialog_setup.cpp:250 +msgid "2048x1556 Full Aperture Native 2K" +msgstr "" + +#: src/gtkmm/dialog_setup.cpp:251 +msgid "1920x1080 HDTV 1080p/i" +msgstr "1920x1080 HDTV 1080p/i" + +#: src/gtkmm/dialog_setup.cpp:252 +msgid "1280x720 HDTV 720p" +msgstr "1280x720 HDTV 720p" + +#: src/gtkmm/dialog_setup.cpp:253 +msgid "720x576 DVD PAL" +msgstr "720x576 DVD PAL" + +#: src/gtkmm/dialog_setup.cpp:254 +msgid "720x480 DVD NTSC" +msgstr "720x480 DVD NTSC" + +#: src/gtkmm/dialog_setup.cpp:255 +msgid "720x540 Web 720x" +msgstr "720x540 Web 720x" + +#: src/gtkmm/dialog_setup.cpp:256 +msgid "720x405 Web 720x HD" +msgstr "720x405 Web 720x HD" + +#: src/gtkmm/dialog_setup.cpp:257 +msgid "640x480 Web 640x" +msgstr "640x480 Web 640x" + +#: src/gtkmm/dialog_setup.cpp:258 +msgid "640x360 Web 640x HD" +msgstr "640x360 Web 640x HD" + +#: src/gtkmm/dialog_setup.cpp:259 +msgid "480x360 Web 480x" +msgstr "480x360 Web 480x" + +#: src/gtkmm/dialog_setup.cpp:260 +msgid "480x270 Web 480x HD" +msgstr "480x270 Web 480x HD" + +#: src/gtkmm/dialog_setup.cpp:261 +msgid "360x270 Web 360x" +msgstr "360x270 Web 360x" + +#: src/gtkmm/dialog_setup.cpp:262 +msgid "360x203 Web 360x HD" +msgstr "360x203 Web 360x HD" + +#: src/gtkmm/dialog_setup.h:50 +msgid "Custom Size" +msgstr "" + +#: src/gtkmm/dialog_soundselect.cpp:60 +msgid "Sound Select" +msgstr "Выбор звукового файла" + +#: src/gtkmm/dialog_soundselect.cpp:67 +msgid "Sound Parameters" +msgstr "" + +#: src/gtkmm/dialog_soundselect.cpp:68 +msgid "Sound Parameters" +msgstr "Параметры" + +#: src/gtkmm/dialog_soundselect.cpp:76 +msgid "_Sound File" +msgstr "_Звуковой файл" + +#: src/gtkmm/dialog_soundselect.cpp:79 +msgid "Time _Offset" +msgstr "_Смещение во времени" + +#: src/gtkmm/dialog_tooloptions.cpp:56 src/gtkmm/dialog_tooloptions.cpp:78 +msgid "Tool Options" +msgstr "Параметры инструмента" + +#: src/gtkmm/dialog_tooloptions.cpp:57 +msgid "This tool has no options" +msgstr "У этого инструмента нет параметров" + +#: src/gtkmm/dialog_waypoint.cpp:63 +msgid "Waypoint Editor" +msgstr "" + +#: src/gtkmm/dockable.cpp:121 +msgid "X" +msgstr "" + +#: src/gtkmm/dock_canvases.cpp:55 +msgid "Canvas Browser" +msgstr "" + +#: src/gtkmm/dock_children.cpp:67 src/gtkmm/iconcontroller.cpp:176 +msgid "Children" +msgstr "Потомки" + +#: src/gtkmm/dock_curves.cpp:70 src/gtkmm/iconcontroller.cpp:177 +msgid "Curves" +msgstr "Кривые" + +#: src/gtkmm/dockdialog.cpp:115 +msgid "Dock Panel" +msgstr "" + +#: src/gtkmm/dockdialog.cpp:563 +msgid "Empty Dock Panel" +msgstr "" + +#: src/gtkmm/dock_history.cpp:69 src/gtkmm/dock_history.cpp:125 +msgid "History" +msgstr "История действий" + +#: src/gtkmm/dock_history.cpp:78 src/gtkmm/iconcontroller.cpp:173 +msgid "Clear Undo Stack" +msgstr "" + +#: src/gtkmm/dock_history.cpp:79 +msgid "Clear the undo stack" +msgstr "" + +#: src/gtkmm/dock_history.cpp:89 src/gtkmm/iconcontroller.cpp:174 +msgid "Clear Redo Stack" +msgstr "" + +#: src/gtkmm/dock_history.cpp:90 +msgid "Clear the redo stack" +msgstr "" + +#: src/gtkmm/dock_history.cpp:100 +msgid "Clear Undo and Redo Stacks" +msgstr "" + +#: src/gtkmm/dock_history.cpp:101 +msgid "Clear the undo and redo stacks" +msgstr "" + +#: src/gtkmm/dock_history.cpp:111 src/gtkmm/toolbox.cpp:295 +msgid "Undo" +msgstr "Отменить" + +#: src/gtkmm/dock_history.cpp:112 +msgid "Undo the previous action" +msgstr "Отменить предыдущее действие" + +#: src/gtkmm/dock_history.cpp:119 src/gtkmm/toolbox.cpp:296 +msgid "Redo" +msgstr "Повторить" + +#: src/gtkmm/dock_history.cpp:120 +msgid "Redo the previously undone action" +msgstr "Повторить отмененное ранее действие" + +#: src/gtkmm/dock_history.cpp:211 src/gtkmm/keyframetree.cpp:92 +msgid "Jump" +msgstr "" + +#: src/gtkmm/dock_history.cpp:216 src/gtkmm/keyframetree.cpp:96 +msgid "(JMP)" +msgstr "" + +#: src/gtkmm/dock_history.cpp:228 +msgid "Action" +msgstr "Действие" + +#: src/gtkmm/dock_history.cpp:275 src/gtkmm/dock_history.cpp:283 +#: src/gtkmm/dock_history.cpp:291 +msgid "Clear History" +msgstr "Очистить историю" + +#: src/gtkmm/dock_history.cpp:276 +msgid "" +"You will not be able to undo any changes that you have made!\n" +"Are you sure you want to clear the undo stack?" +msgstr "" + +#: src/gtkmm/dock_history.cpp:284 +msgid "" +"You will not be able to redo any changes that you have made!\n" +"Are you sure you want to clear the redo stack?" +msgstr "" + +#: src/gtkmm/dock_history.cpp:292 +msgid "" +"You will not be able to undo or redo any changes that you have made!\n" +"Are you sure you want to clear the undo and redo stacks?" +msgstr "" + +#: src/gtkmm/dock_info.cpp:96 src/gtkmm/instance.cpp:551 +msgid "Info" +msgstr "Инфо" + +#: src/gtkmm/dock_info.cpp:103 +msgid "X: " +msgstr "X: " + +#: src/gtkmm/dock_info.cpp:104 +msgid "Y: " +msgstr "Y: " + +#: src/gtkmm/dock_info.cpp:114 +msgid "R: " +msgstr "R: " + +#: src/gtkmm/dock_info.cpp:115 +msgid "G: " +msgstr "G: " + +#: src/gtkmm/dock_info.cpp:116 +msgid "B: " +msgstr "B: " + +#: src/gtkmm/dock_info.cpp:117 +msgid "A: " +msgstr "A: " + +#: src/gtkmm/dock_keyframes.cpp:66 src/gtkmm/iconcontroller.cpp:178 +msgid "Keyframes" +msgstr "Ключевые кадры" + +#: src/gtkmm/dock_layergroups.cpp:68 +msgid "Groups" +msgstr "Группы" + +#: src/gtkmm/dock_layergroups.cpp:74 +msgid "Group Ops" +msgstr "" + +#: src/gtkmm/dock_layergroups.cpp:76 src/gtkmm/groupactionmanager.cpp:175 +#: src/gtkmm/groupactionmanager.cpp:176 +msgid "Add a New Group" +msgstr "Создать новую группу" + +#: src/gtkmm/dock_layers.cpp:74 +msgid "Layers" +msgstr "Слои" + +#: src/gtkmm/dock_layers.cpp:146 +msgid "Layer Ops" +msgstr "" + +#: src/gtkmm/dock_metadata.cpp:64 +msgid "Canvas MetaData" +msgstr "Метаданные холста" + +#: src/gtkmm/dock_metadata.cpp:84 +msgid "Add new MetaData entry" +msgstr "Создать новую запись в метаданных" + +#: src/gtkmm/dock_metadata.cpp:94 +msgid "Remove selected MetaData entry" +msgstr "" + +#: src/gtkmm/dock_navigator.cpp:496 src/gtkmm/iconcontroller.cpp:180 +msgid "Navigator" +msgstr "Навигатор" + +#: src/gtkmm/dock_params.cpp:65 +msgid "Params" +msgstr "Параметры" + +#: src/gtkmm/dock_timetrack.cpp:83 src/gtkmm/layergrouptree.cpp:75 +#: src/gtkmm/layertree.cpp:221 src/gtkmm/layertree.cpp:300 +#: src/synfigapp/actions/canvasnameset.cpp:82 +#: src/synfigapp/actions/valuedescexport.cpp:92 +#: src/synfigapp/actions/valuenodeadd.cpp:77 +#: src/synfigapp/actions/valuenoderename.cpp:86 +msgid "Name" +msgstr "Название" + +#: src/gtkmm/dock_timetrack.cpp:404 +msgid "Timetrack" +msgstr "Дорожка времени" + +#: src/gtkmm/groupactionmanager.cpp:269 +msgid "UnnamedGroup" +msgstr "БезымяннаяГруппа" + +#: src/gtkmm/iconcontroller.cpp:140 +msgid "Bool" +msgstr "" + +#: src/gtkmm/iconcontroller.cpp:141 +msgid "Integer" +msgstr "" + +#: src/gtkmm/iconcontroller.cpp:142 +msgid "Angle" +msgstr "" + +#: src/gtkmm/iconcontroller.cpp:144 +msgid "Real" +msgstr "" + +#: src/gtkmm/iconcontroller.cpp:145 +msgid "Vector" +msgstr "" + +#: src/gtkmm/iconcontroller.cpp:146 +msgid "Color" +msgstr "Цвет" + +#: src/gtkmm/iconcontroller.cpp:149 src/gtkmm/iconcontroller.cpp:151 +#: src/gtkmm/iconcontroller.cpp:157 src/gtkmm/iconcontroller.cpp:158 +msgid "Rename" +msgstr "" + +#: src/gtkmm/iconcontroller.cpp:153 +msgid "Reset Colors" +msgstr "" + +#: src/gtkmm/iconcontroller.cpp:154 +msgid "Swap Colors" +msgstr "" + +#: src/gtkmm/iconcontroller.cpp:155 +#: src/synfigapp/actions/layerparamconnect.cpp:80 +#: src/synfigapp/actions/valuenodedynamiclistloop.cpp:73 +#: src/synfigapp/actions/valuenodedynamiclistunloop.cpp:73 +#: src/synfigapp/actions/valuenoderemove.cpp:80 +#: src/synfigapp/value_desc.cpp:71 +msgid "ValueNode" +msgstr "" + +#: src/gtkmm/iconcontroller.cpp:156 +msgid "About" +msgstr "" + +#: src/gtkmm/iconcontroller.cpp:160 src/gtkmm/toolbox.cpp:294 +msgid "Save All" +msgstr "Сохранить все" + +#: src/gtkmm/iconcontroller.cpp:161 src/gtkmm/layergrouptreestore.cpp:920 +#: src/gtkmm/layertreestore.cpp:965 +#: src/synfigapp/actions/groupaddlayers.cpp:72 +#: src/synfigapp/actions/groupremovelayers.cpp:73 +#: src/synfigapp/actions/layeractivate.cpp:86 +#: src/synfigapp/actions/layerduplicate.cpp:81 +#: src/synfigapp/actions/layerencapsulate.cpp:81 +#: src/synfigapp/actions/layerlower.cpp:80 +#: src/synfigapp/actions/layermove.cpp:85 +#: src/synfigapp/actions/layerparamconnect.cpp:72 +#: src/synfigapp/actions/layerparamdisconnect.cpp:75 +#: src/synfigapp/actions/layerparamset.cpp:72 +#: src/synfigapp/actions/layerraise.cpp:80 +#: src/synfigapp/actions/layerremove.cpp:79 +#: src/synfigapp/actions/layersetdesc.cpp:85 +msgid "Layer" +msgstr "Слой" + +#: src/gtkmm/iconcontroller.cpp:162 +msgid "Paste Canvas" +msgstr "" + +#: src/gtkmm/iconcontroller.cpp:166 +msgid "Hide Grid" +msgstr "Скрыть сетку" + +#: src/gtkmm/iconcontroller.cpp:167 +msgid "Enable Grid Snap" +msgstr "Включить прилипание к сетке" + +#: src/gtkmm/iconcontroller.cpp:168 +msgid "Disable Grid Snap" +msgstr "Отключить прилипание к сетке" + +#: src/gtkmm/iconcontroller.cpp:169 +msgid "Duplicate" +msgstr "Продублировать" + +#: src/gtkmm/iconcontroller.cpp:170 +#: src/synfigapp/actions/layerencapsulate.cpp:52 +msgid "Encapsulate" +msgstr "Инкапсюлировать" + +#: src/gtkmm/iconcontroller.cpp:171 src/gtkmm/layeractionmanager.cpp:135 +msgid "Select All Child Layers" +msgstr "Выбрать все слои-потомки" + +#: src/gtkmm/iconcontroller.cpp:179 +msgid "MetaData" +msgstr "Метаданные" + +#: src/gtkmm/iconcontroller.cpp:188 +msgid "CVS Add" +msgstr "" + +#: src/gtkmm/iconcontroller.cpp:190 src/gtkmm/instance.cpp:491 +#: src/gtkmm/instance.cpp:502 +msgid "CVS Commit" +msgstr "" + +#: src/gtkmm/iconcontroller.cpp:191 src/gtkmm/instance.cpp:593 +msgid "CVS Revert" +msgstr "" + +#: src/gtkmm/iconcontroller.cpp:194 +msgid "Normal Tool" +msgstr "Селектор" + +#: src/gtkmm/iconcontroller.cpp:195 src/gtkmm/state_polygon.cpp:338 +#: src/gtkmm/state_polygon.cpp:392 +msgid "Polygon Tool" +msgstr "Многоугольник" + +#: src/gtkmm/iconcontroller.cpp:196 src/gtkmm/state_bline.cpp:377 +#: src/gtkmm/state_bline.cpp:421 +msgid "BLine Tool" +msgstr "Кривые" + +#: src/gtkmm/iconcontroller.cpp:197 +msgid "Eyedrop Tool" +msgstr "Пипетка" + +#: src/gtkmm/iconcontroller.cpp:198 +msgid "Fill Tool" +msgstr "Плоская заливка" + +#: src/gtkmm/iconcontroller.cpp:199 src/gtkmm/state_draw.cpp:433 +#: src/gtkmm/state_draw.cpp:519 +msgid "Draw Tool" +msgstr "Векторный карандаш" + +#: src/gtkmm/iconcontroller.cpp:200 src/gtkmm/state_sketch.cpp:325 +#: src/gtkmm/state_sketch.cpp:399 +msgid "Sketch Tool" +msgstr "Растровый карандаш" + +#: src/gtkmm/iconcontroller.cpp:201 src/gtkmm/state_circle.cpp:422 +#: src/gtkmm/state_circle.cpp:485 +msgid "Circle Tool" +msgstr "Круги и эллипсы" + +#: src/gtkmm/iconcontroller.cpp:202 src/gtkmm/state_rectangle.cpp:352 +#: src/gtkmm/state_rectangle.cpp:408 +msgid "Rectangle Tool" +msgstr "Прямоугольник" + +#: src/gtkmm/iconcontroller.cpp:203 src/gtkmm/state_smoothmove.cpp:177 +msgid "SmoothMove Tool" +msgstr "Перемещение" + +#: src/gtkmm/iconcontroller.cpp:204 src/gtkmm/state_scale.cpp:167 +#: src/gtkmm/state_scale.cpp:193 +msgid "Scale Tool" +msgstr "Масштабирование" + +#: src/gtkmm/iconcontroller.cpp:205 src/gtkmm/state_width.cpp:229 +#: src/gtkmm/state_width.cpp:305 +msgid "Width Tool" +msgstr "" + +#: src/gtkmm/iconcontroller.cpp:206 src/gtkmm/state_rotate.cpp:181 +#: src/gtkmm/state_rotate.cpp:208 +msgid "Rotate Tool" +msgstr "Вращение" + +#: src/gtkmm/iconcontroller.cpp:207 +msgid "Zoom Tool" +msgstr "Лупа" + +#: src/gtkmm/iconcontroller.cpp:208 +msgid "Info Tool" +msgstr "" + +#: src/gtkmm/iconcontroller.cpp:209 src/gtkmm/mod_mirror/state_mirror.cpp:185 +#: src/gtkmm/mod_mirror/state_mirror.cpp:213 +msgid "Mirror Tool" +msgstr "Отражение" + +#: src/gtkmm/iconcontroller.cpp:211 src/gtkmm/state_gradient.cpp:267 +#: src/gtkmm/state_gradient.cpp:327 +msgid "Gradient Tool" +msgstr "Градиентная заливка" + +#: src/gtkmm/iconcontroller.cpp:212 src/gtkmm/state_star.cpp:444 +#: src/gtkmm/state_star.cpp:504 +msgid "Star Tool" +msgstr "Звезда" + +#: src/gtkmm/instance.cpp:233 src/gtkmm/instance.cpp:336 +#, c-format +msgid "Unable to save to '%s'" +msgstr "" + +#: src/gtkmm/instance.cpp:234 +msgid "Save - Error" +msgstr "" + +#: src/gtkmm/instance.cpp:264 +msgid "" +"There is currently a bug when using \"SaveAs\"\n" +"on a composition that is being referenced by other\n" +"files that are currently open. Close these\n" +"other files first before trying to use \"SaveAs\"." +msgstr "" + +#: src/gtkmm/instance.cpp:268 src/gtkmm/instance.cpp:319 +#: src/gtkmm/instance.cpp:337 +msgid "SaveAs - Error" +msgstr "" + +#: src/gtkmm/instance.cpp:282 +msgid "Choose a Filename to Save As" +msgstr "" + +#: src/gtkmm/instance.cpp:300 +msgid "Unknown extension" +msgstr "" + +#: src/gtkmm/instance.cpp:301 +msgid "" +"You have given the file name an extension\n" +"which I do not recognize. Are you sure this is what you want?" +msgstr "" + +#: src/gtkmm/instance.cpp:318 +#, c-format +msgid "Unable to check whether '%s' exists." +msgstr "" + +#: src/gtkmm/instance.cpp:324 +#, c-format +msgid "" +"A file named '%s' already exists.\n" +"\n" +"Do you want to replace it with the file you are saving?" +msgstr "" + +#: src/gtkmm/instance.cpp:327 +msgid "File exists" +msgstr "" + +#: src/gtkmm/instance.cpp:482 +msgid "You must first add this composition to the repository" +msgstr "" + +#: src/gtkmm/instance.cpp:491 src/gtkmm/instance.cpp:560 +msgid "This will save any changes you have made. Are you sure?" +msgstr "" + +#: src/gtkmm/instance.cpp:498 +msgid "" +"The local copy of the file hasn't been changed since the last update.\n" +"Nothing to commit!" +msgstr "" + +#: src/gtkmm/instance.cpp:502 +msgid "Enter a log message describing the changes you have made" +msgstr "" + +#: src/gtkmm/instance.cpp:510 +msgid "An error has occurred when trying to COMMIT" +msgstr "" + +#: src/gtkmm/instance.cpp:521 +msgid "This composition has already been added to the repository" +msgstr "" + +#: src/gtkmm/instance.cpp:535 +msgid "An error has occurred when trying to ADD" +msgstr "" + +#: src/gtkmm/instance.cpp:546 +msgid "" +"This file is not under version control, so there is nothing to update from!" +msgstr "" + +#: src/gtkmm/instance.cpp:551 +msgid "This file is up-to-date" +msgstr "" + +#: src/gtkmm/instance.cpp:576 src/gtkmm/instance.cpp:612 +msgid "An error has occurred when trying to UPDATE" +msgstr "" + +#: src/gtkmm/instance.cpp:587 +msgid "" +"This file is not under version control, so there is nothing to revert to!" +msgstr "" + +#: src/gtkmm/instance.cpp:594 +msgid "" +"This will abandon all changes you have made\n" +"since the last time you performed a commit\n" +"operation. This cannot be undone! Are you sure\n" +"you want to do this?" +msgstr "" + +#: src/gtkmm/instance.cpp:603 +msgid "Unable to remove previous version" +msgstr "" + +#: src/gtkmm/instance.cpp:631 +msgid "Error: Revert Failed" +msgstr "" + +#: src/gtkmm/instance.cpp:631 +msgid "" +"The revert operation has failed. This can be due to it being\n" +"referenced by another composition that is already open, or\n" +"because of an internal error in Synfig Studio. Try closing any\n" +"compositions that might reference this composition and try\n" +"again, or restart Synfig Studio." +msgstr "" + +#: src/gtkmm/instance.cpp:659 +msgid "Revert to saved" +msgstr "" + +#: src/gtkmm/instance.cpp:659 +msgid "" +"You will lose any changes you have made since your last save.\n" +"Are you sure?" +msgstr "" + +#: src/gtkmm/instance.cpp:682 +#, c-format +msgid "Would you like to save your changes to %s?" +msgstr "Хотите ли вы сохранить изменения в %s?" + +#: src/gtkmm/instance.cpp:698 +#, c-format +msgid "" +"%s has changes not yet on the CVS repository.\n" +"Would you like to commit these changes?" +msgstr "" + +#: src/gtkmm/instance.cpp:1104 +msgid "Edit Waypoint" +msgstr "" + +#: src/gtkmm/instance.cpp:1145 +msgid "Set Waypoints" +msgstr "" + +#: src/gtkmm/instance.cpp:1190 +msgid "Unable to convert to animated waypoint" +msgstr "" + +#: src/gtkmm/instance.cpp:1207 +msgid "Unable to find waypoint_set_smart action" +msgstr "" + +#: src/gtkmm/instance.cpp:1220 +msgid "Unable to set a specific waypoint" +msgstr "" + +#: src/gtkmm/instance.cpp:1248 +msgid "Edit Waypoints" +msgstr "" + +#: src/gtkmm/instance.h:41 +msgid "Synfig Animation " +msgstr "Мультфильм Synfig" + +#: src/gtkmm/keyframeactionmanager.cpp:221 +msgid "Add New Keyframe" +msgstr "Добавить новый ключевой кадр" + +#: src/gtkmm/keyframetree.cpp:77 +msgid "Length" +msgstr "Длительность" + +#: src/gtkmm/keyframetree.cpp:108 +#: src/synfigapp/actions/canvasdescriptionset.cpp:82 +msgid "Description" +msgstr "Описание" + +#: src/gtkmm/keyframetreestore.cpp:795 src/gtkmm/keyframetreestore.cpp:810 +msgid "Unable to find Keyframe in table" +msgstr "Не удалось найти ключевой кадр в таблице" + +#: src/gtkmm/keyframetreestore.cpp:801 +msgid "There are no keyframes n this canvas" +msgstr "На этом холсте нет ключевых кадров" + +#: src/gtkmm/layeractionmanager.cpp:129 +msgid "Amount" +msgstr "Число" + +#: src/gtkmm/layeractionmanager.cpp:365 +msgid "Paste" +msgstr "Вставить" + +#: src/gtkmm/layeractionmanager.cpp:454 +#: src/synfigapp/actions/layerduplicate.cpp:178 +#: src/synfigapp/canvasinterface.cpp:202 +#, c-format +msgid "Index %d" +msgstr "" + +#: src/gtkmm/layergrouptree.cpp:64 src/gtkmm/layergrouptree.cpp:69 +#: src/gtkmm/layertree.cpp:193 +msgid " " +msgstr " " + +#: src/gtkmm/layergrouptreestore.cpp:442 +msgid "Activate " +msgstr "Активировать" + +#: src/gtkmm/layergrouptreestore.cpp:442 +msgid "Deactivate " +msgstr "Деактивировать" + +#: src/gtkmm/layergrouptreestore.cpp:566 +msgid "Regroup" +msgstr "Перегруппировать" + +#: src/gtkmm/layerparamtreestore.cpp:234 +msgid "Set Layer Params" +msgstr "Смена параметров слоя" + +#: src/gtkmm/layerparamtreestore.cpp:246 +msgid "Unable to set all layer parameters." +msgstr "" + +#: src/gtkmm/layertree.cpp:206 src/gtkmm/layertree.cpp:249 +msgid "Z" +msgstr "" + +#: src/gtkmm/layertree.cpp:334 +msgid "Value" +msgstr "Значение" + +#: src/gtkmm/layertreestore.cpp:464 +msgid "Move Layers" +msgstr "" + +#: src/gtkmm/main.cpp:73 +msgid "synfig studio is already running" +msgstr "" + +#: src/gtkmm/main.cpp:74 +msgid "the existing process will be used" +msgstr "" + +#: src/gtkmm/main.cpp:93 +msgid "synfig studio -- starting up application..." +msgstr "" + +#: src/gtkmm/mod_mirror/state_mirror.cpp:181 +msgid "Horizontal" +msgstr "По горизонтали" + +#: src/gtkmm/mod_mirror/state_mirror.cpp:182 +msgid "Vertical" +msgstr "По вертикали" + +#: src/gtkmm/mod_palette/dock_palbrowse.cpp:56 +msgid "Palette Browser" +msgstr "Просмотр палитр" + +#: src/gtkmm/mod_palette/dock_paledit.cpp:120 +msgid "Palette Editor" +msgstr "Редактор палитр" + +#: src/gtkmm/mod_palette/dock_paledit.cpp:128 +msgid "Add Color" +msgstr "Добавить цвет" + +#: src/gtkmm/mod_palette/dock_paledit.cpp:129 +msgid "" +"Add current foreground color\n" +"to the palette" +msgstr "" +"Добавить активный цвет\n" +"переднего плана в палитру" + +#: src/gtkmm/mod_palette/dock_paledit.cpp:211 +msgid "Load Default Palette" +msgstr "Загрузить исходную палитру" + +#: src/gtkmm/onemoment.cpp:91 src/gtkmm/onemoment.cpp:93 +msgid "One Moment, Please..." +msgstr "Минуточку, пожалуйста..." + +#: src/gtkmm/preview.cpp:352 +msgid "Toggle Looping" +msgstr "Включить или выключить зацикленное воспроизведение" + +#: src/gtkmm/preview.cpp:376 +msgid "Halt Render" +msgstr "Остановить рендеринг" + +#: src/gtkmm/preview.cpp:382 +msgid "Re-Preview" +msgstr "Открыть диалог параметров" + +#: src/gtkmm/preview.cpp:388 +msgid "Erase All" +msgstr "Стереть все" + +#: src/gtkmm/preview.cpp:398 +msgid "Last Rendered: " +msgstr "" + +#: src/gtkmm/renddesc.cpp:95 +msgid "Image" +msgstr "Изображение" + +#: src/gtkmm/renddesc.cpp:97 +msgid "Other" +msgstr "Прочие" + +#: src/gtkmm/renddesc.cpp:390 +msgid "_Pixel Aspect" +msgstr "_Соотношение сторон пиксела" + +#: src/gtkmm/renddesc.cpp:392 +msgid "Pi_xel Width" +msgstr "Ширина _пиксела" + +#: src/gtkmm/renddesc.cpp:394 +msgid "Pix_el Height" +msgstr "В_ысота пиксела" + +#: src/gtkmm/renddesc.cpp:396 +msgid "Image _Aspect" +msgstr "Соотношение сторон _изображения" + +#: src/gtkmm/renddesc.cpp:398 +msgid "Image _Width" +msgstr "_Ширина изображения" + +#: src/gtkmm/renddesc.cpp:400 +msgid "Image _Height" +msgstr "_Высота изображения" + +#: src/gtkmm/renddesc.cpp:402 +msgid "Image _Span" +msgstr "" + +#: src/gtkmm/renddesc.cpp:442 +msgid "Image Size" +msgstr "Размер изображения" + +#: src/gtkmm/renddesc.cpp:444 +msgid "Image Size" +msgstr "Размер изображения" + +#: src/gtkmm/renddesc.cpp:455 +msgid "_Width" +msgstr "_Ширина" + +#: src/gtkmm/renddesc.cpp:458 +msgid "_Height" +msgstr "_Высота" + +#: src/gtkmm/renddesc.cpp:461 +msgid "_XRes" +msgstr "" + +#: src/gtkmm/renddesc.cpp:464 +msgid "_YRes" +msgstr "" + +#: src/gtkmm/renddesc.cpp:467 +msgid "_Physical Width" +msgstr "_Физическая ширина" + +#: src/gtkmm/renddesc.cpp:470 +msgid "Phy_sical Height" +msgstr "Ф_изическая высота" + +#: src/gtkmm/renddesc.cpp:473 +msgid "I_mage Span" +msgstr "" + +#: src/gtkmm/renddesc.cpp:494 +msgid "Image Area" +msgstr "Область изображения" + +#: src/gtkmm/renddesc.cpp:496 +msgid "Image Area" +msgstr "Область изображения" + +#: src/gtkmm/renddesc.cpp:508 +msgid "_Top Left" +msgstr "В_ерхний левый угол:" + +#: src/gtkmm/renddesc.cpp:511 +msgid "_Bottom Right" +msgstr "_Нижний правый угол:" + +#: src/gtkmm/renddesc.cpp:551 +msgid "_Start Time" +msgstr "_Время начала:" + +#: src/gtkmm/renddesc.cpp:574 +msgid "Locks and Links" +msgstr "Запирание и связи" + +#: src/gtkmm/renddesc.cpp:576 +msgid "Locks and Links" +msgstr "Запирание и связи" + +#: src/gtkmm/renddesc.cpp:597 +msgid "Focus Point" +msgstr "Точка фокусировки" + +#: src/gtkmm/renddesc.cpp:599 +msgid "Focus Point" +msgstr "Точка фокусировки" + +#: src/gtkmm/renddesc.cpp:609 +msgid "_Focus Point" +msgstr "_Точка фокусировки" + +#: src/gtkmm/render.cpp:61 src/gtkmm/render.cpp:177 +msgid "Render Settings" +msgstr "Параметры рендеринга" + +#: src/gtkmm/render.cpp:67 +msgid "Use _current frame" +msgstr "_Использовать текущий кадр" + +#: src/gtkmm/render.cpp:77 +msgid "Auto" +msgstr "Автоматически" + +#: src/gtkmm/render.cpp:101 +msgid "Choose..." +msgstr "Выбрать..." + +#: src/gtkmm/render.cpp:105 +msgid "Target" +msgstr "Цель" + +#: src/gtkmm/render.cpp:107 +msgid "Target" +msgstr "Цель" + +#: src/gtkmm/render.cpp:118 +msgid "_Filename" +msgstr "_Имя файла:" + +#: src/gtkmm/render.cpp:125 +msgid "_Target" +msgstr "_Цель:" + +#: src/gtkmm/render.cpp:133 +msgid "Settings" +msgstr "Параметры" + +#: src/gtkmm/render.cpp:135 +msgid "Settings" +msgstr "Параметры" + +#: src/gtkmm/render.cpp:147 +msgid "_Quality" +msgstr "_Качество:" + +#: src/gtkmm/render.cpp:153 +msgid "_Anti-Aliasing" +msgstr "_Сглаживание:" + +#: src/gtkmm/render.cpp:247 +msgid "You must supply a filename!" +msgstr "Необходимо указать имя файла!" + +#: src/gtkmm/render.cpp:273 +msgid "Unable to determine proper target from filename." +msgstr "" + +#: src/gtkmm/render.cpp:280 +msgid "A filename is required for this target" +msgstr "" + +#: src/gtkmm/render.cpp:287 +msgid "Unable to create target for " +msgstr "" + +#: src/gtkmm/render.cpp:304 +msgid "Target initialization failure" +msgstr "" + +#: src/gtkmm/render.cpp:308 +msgid "Rendering " +msgstr "" + +#: src/gtkmm/render.cpp:336 +msgid "File rendered successfully" +msgstr "" + +#: src/gtkmm/splash.cpp:113 +msgid "ERROR:" +msgstr "ОШИБКА:" + +#: src/gtkmm/splash.cpp:129 +msgid "WARNING:" +msgstr "ПРЕДУПРЕЖДЕНИЕ:" + +#: src/gtkmm/state_bline.cpp:361 src/gtkmm/state_circle.cpp:395 +#: src/gtkmm/state_draw.cpp:413 src/gtkmm/state_polygon.cpp:325 +#: src/gtkmm/state_rectangle.cpp:342 src/gtkmm/state_star.cpp:433 +msgid "Create Region BLine" +msgstr "Создать кривую области" + +#: src/gtkmm/state_bline.cpp:362 src/gtkmm/state_circle.cpp:396 +#: src/gtkmm/state_draw.cpp:414 src/gtkmm/state_polygon.cpp:326 +#: src/gtkmm/state_rectangle.cpp:343 src/gtkmm/state_star.cpp:434 +msgid "Create Outline BLine" +msgstr "Создать кривую абриса" + +#: src/gtkmm/state_bline.cpp:363 src/gtkmm/state_circle.cpp:397 +#: src/gtkmm/state_polygon.cpp:327 src/gtkmm/state_rectangle.cpp:344 +#: src/gtkmm/state_star.cpp:435 +msgid "Create Curve Gradient BLine" +msgstr "" + +#: src/gtkmm/state_bline.cpp:364 src/gtkmm/state_circle.cpp:398 +#: src/gtkmm/state_polygon.cpp:328 src/gtkmm/state_rectangle.cpp:345 +#: src/gtkmm/state_star.cpp:436 +msgid "Create Plant BLine" +msgstr "Создать кривую растения" + +#: src/gtkmm/state_bline.cpp:365 src/gtkmm/state_circle.cpp:399 +#: src/gtkmm/state_polygon.cpp:329 src/gtkmm/state_star.cpp:437 +msgid "Link Origins" +msgstr "" + +#: src/gtkmm/state_bline.cpp:366 src/gtkmm/state_draw.cpp:415 +msgid "Auto Export" +msgstr "Автоэкспорт" + +#: src/gtkmm/state_bline.cpp:367 src/gtkmm/state_polygon.cpp:330 +msgid "Make" +msgstr "" + +#: src/gtkmm/state_bline.cpp:368 +msgid "Clear" +msgstr "" + +#: src/gtkmm/state_bline.cpp:385 src/gtkmm/state_draw.cpp:450 +#: src/gtkmm/state_polygon.cpp:352 +msgid "Feather" +msgstr "Растушёвка" + +#: src/gtkmm/state_bline.cpp:426 +msgid "Make BLine and/or Region" +msgstr "" + +#: src/gtkmm/state_bline.cpp:436 +msgid "Clear current BLine" +msgstr "" + +#: src/gtkmm/state_bline.cpp:541 +msgid "New BLine" +msgstr "" + +#: src/gtkmm/state_bline.cpp:584 +msgid "Unable to add value node" +msgstr "" + +#: src/gtkmm/state_bline.cpp:627 src/gtkmm/state_bline.cpp:690 +#: src/gtkmm/state_bline.cpp:753 src/gtkmm/state_bline.cpp:827 +#: src/gtkmm/state_circle.cpp:606 src/gtkmm/state_circle.cpp:681 +#: src/gtkmm/state_circle.cpp:755 src/gtkmm/state_circle.cpp:829 +#: src/gtkmm/state_circle.cpp:912 src/gtkmm/state_draw.cpp:1041 +#: src/gtkmm/state_draw.cpp:1060 src/gtkmm/state_draw.cpp:1072 +#: src/gtkmm/state_draw.cpp:1106 src/gtkmm/state_draw.cpp:1797 +#: src/gtkmm/state_gradient.cpp:409 src/gtkmm/state_gradient.cpp:422 +#: src/gtkmm/state_gradient.cpp:435 src/gtkmm/state_gradient.cpp:451 +#: src/gtkmm/state_polygon.cpp:536 src/gtkmm/state_polygon.cpp:620 +#: src/gtkmm/state_polygon.cpp:684 src/gtkmm/state_polygon.cpp:748 +#: src/gtkmm/state_polygon.cpp:821 src/gtkmm/state_rectangle.cpp:524 +#: src/gtkmm/state_rectangle.cpp:563 src/gtkmm/state_rectangle.cpp:627 +#: src/gtkmm/state_rectangle.cpp:691 src/gtkmm/state_rectangle.cpp:764 +#: src/gtkmm/state_star.cpp:639 src/gtkmm/state_star.cpp:718 +#: src/gtkmm/state_star.cpp:787 src/gtkmm/state_star.cpp:856 +#: src/gtkmm/state_star.cpp:934 src/gtkmm/state_text.cpp:405 +msgid "Unable to create layer" +msgstr "" + +#: src/gtkmm/state_bline.cpp:630 src/gtkmm/state_circle.cpp:686 +#: src/gtkmm/state_polygon.cpp:625 src/gtkmm/state_rectangle.cpp:568 +#: src/gtkmm/state_star.cpp:723 +msgid " Gradient" +msgstr "" + +#: src/gtkmm/state_bline.cpp:649 src/gtkmm/state_bline.cpp:672 +#: src/gtkmm/state_circle.cpp:710 src/gtkmm/state_circle.cpp:733 +#: src/gtkmm/state_polygon.cpp:644 src/gtkmm/state_polygon.cpp:667 +#: src/gtkmm/state_rectangle.cpp:587 src/gtkmm/state_rectangle.cpp:610 +#: src/gtkmm/state_star.cpp:742 src/gtkmm/state_star.cpp:765 +msgid "Unable to create Gradient layer" +msgstr "" + +#: src/gtkmm/state_bline.cpp:693 src/gtkmm/state_circle.cpp:760 +#: src/gtkmm/state_polygon.cpp:689 src/gtkmm/state_rectangle.cpp:632 +#: src/gtkmm/state_star.cpp:792 +msgid " Plant" +msgstr "" + +#: src/gtkmm/state_bline.cpp:712 src/gtkmm/state_bline.cpp:735 +#: src/gtkmm/state_circle.cpp:784 src/gtkmm/state_circle.cpp:807 +#: src/gtkmm/state_polygon.cpp:708 src/gtkmm/state_polygon.cpp:731 +#: src/gtkmm/state_rectangle.cpp:651 src/gtkmm/state_rectangle.cpp:674 +#: src/gtkmm/state_star.cpp:811 src/gtkmm/state_star.cpp:834 +msgid "Unable to create Plant layer" +msgstr "" + +#: src/gtkmm/state_bline.cpp:756 src/gtkmm/state_circle.cpp:834 +#: src/gtkmm/state_draw.cpp:1076 src/gtkmm/state_draw.cpp:2000 +#: src/gtkmm/state_polygon.cpp:753 src/gtkmm/state_rectangle.cpp:696 +#: src/gtkmm/state_star.cpp:861 +msgid " Region" +msgstr "" + +#: src/gtkmm/state_bline.cpp:786 src/gtkmm/state_bline.cpp:809 +#: src/gtkmm/state_circle.cpp:869 src/gtkmm/state_circle.cpp:892 +#: src/gtkmm/state_draw.cpp:1823 src/gtkmm/state_draw.cpp:2016 +#: src/gtkmm/state_polygon.cpp:783 src/gtkmm/state_polygon.cpp:806 +#: src/gtkmm/state_rectangle.cpp:726 src/gtkmm/state_rectangle.cpp:749 +#: src/gtkmm/state_star.cpp:891 src/gtkmm/state_star.cpp:914 +msgid "Unable to create Region layer" +msgstr "" + +#: src/gtkmm/state_bline.cpp:830 src/gtkmm/state_circle.cpp:917 +#: src/gtkmm/state_draw.cpp:1064 src/gtkmm/state_polygon.cpp:826 +#: src/gtkmm/state_rectangle.cpp:769 src/gtkmm/state_star.cpp:939 +msgid " Outline" +msgstr "" + +#: src/gtkmm/state_bline.cpp:854 src/gtkmm/state_bline.cpp:877 +#: src/gtkmm/state_circle.cpp:947 src/gtkmm/state_circle.cpp:970 +#: src/gtkmm/state_polygon.cpp:851 src/gtkmm/state_polygon.cpp:874 +#: src/gtkmm/state_rectangle.cpp:794 src/gtkmm/state_rectangle.cpp:817 +#: src/gtkmm/state_star.cpp:964 src/gtkmm/state_star.cpp:987 +msgid "Unable to create Outline layer" +msgstr "" + +#: src/gtkmm/state_bline.cpp:1262 +msgid "Unloop BLine" +msgstr "" + +#: src/gtkmm/state_bline.cpp:1266 +msgid "Loop BLine" +msgstr "" + +#: src/gtkmm/state_bline.cpp:1271 +msgid "Delete Vertex" +msgstr "Удалить вершину" + +#: src/gtkmm/state_bline.cpp:1286 +msgid "Insert Vertex" +msgstr "Вставить вершину" + +#: src/gtkmm/state_bline.cpp:1348 +msgid "" +"Unable to find where to insert vertex, internal error, please report this bug" +msgstr "" + +#: src/gtkmm/state_bline.cpp:1367 +msgid "Unable to remove vertex, internal error, please report this bug" +msgstr "" + +#: src/gtkmm/state_bline.cpp:1381 +#: src/synfigapp/actions/blinepointtangentmerge.cpp:56 +msgid "Merge Tangents" +msgstr "Объединить касательные" + +#: src/gtkmm/state_bline.cpp:1388 +#: src/synfigapp/actions/blinepointtangentsplit.cpp:56 +msgid "Split Tangents" +msgstr "Разделить касательные" + +#: src/gtkmm/state_circle.cpp:393 src/gtkmm/state_polygon.cpp:323 +#: src/gtkmm/state_rectangle.cpp:340 src/gtkmm/state_star.cpp:430 +msgid "Invert" +msgstr "Инвертировать" + +#: src/gtkmm/state_circle.cpp:394 +msgid "Create Circle Layer" +msgstr "Создать слой окружности" + +#: src/gtkmm/state_circle.cpp:405 +msgid "Falloff" +msgstr "" + +#: src/gtkmm/state_circle.cpp:406 +msgid "Determines the falloff function for the feather" +msgstr "" + +#: src/gtkmm/state_circle.cpp:408 src/gtkmm/state_gradient.cpp:274 +#: src/gtkmm/widget_waypoint.cpp:89 src/gtkmm/widget_waypoint.cpp:96 +#: src/gtkmm/widget_waypointmodel.cpp:75 src/gtkmm/widget_waypointmodel.cpp:82 +msgid "Linear" +msgstr "" + +#: src/gtkmm/state_circle.cpp:409 +msgid "Squared" +msgstr "" + +#: src/gtkmm/state_circle.cpp:410 +msgid "Square Root" +msgstr "" + +#: src/gtkmm/state_circle.cpp:411 +msgid "Sigmond" +msgstr "" + +#: src/gtkmm/state_circle.cpp:412 +msgid "Cosine" +msgstr "" + +#: src/gtkmm/state_circle.cpp:416 src/gtkmm/state_gradient.cpp:281 +msgid "Blend Method" +msgstr "Режим наложения" + +#: src/gtkmm/state_circle.cpp:417 +msgid "Defines the blend method to be used for circles" +msgstr "" + +#: src/gtkmm/state_circle.cpp:435 +msgid "Falloff:" +msgstr "" + +#: src/gtkmm/state_circle.cpp:439 src/gtkmm/state_rectangle.cpp:370 +#: src/gtkmm/state_star.cpp:454 +msgid "Feather:" +msgstr "Растушёвка:" + +#: src/gtkmm/state_circle.cpp:446 +msgid "BLine Points:" +msgstr "Узлы кривой:" + +#: src/gtkmm/state_circle.cpp:449 +msgid "Point Angle Offset:" +msgstr "" + +#: src/gtkmm/state_circle.cpp:536 +msgid "New Circle" +msgstr "Новая окружность" + +#: src/gtkmm/state_circle.cpp:659 +#, fuzzy +msgid "Unable to create Circle layer" +msgstr "Создать слой окружности" + +#: src/gtkmm/state_draw.cpp:409 +msgid "Pressure Width" +msgstr "" + +#: src/gtkmm/state_draw.cpp:410 +msgid "Auto Loop" +msgstr "" + +#: src/gtkmm/state_draw.cpp:411 +msgid "Auto Extend" +msgstr "" + +#: src/gtkmm/state_draw.cpp:412 +msgid "Auto Link" +msgstr "" + +#: src/gtkmm/state_draw.cpp:416 src/gtkmm/state_draw.cpp:524 +msgid "Fill Last Stroke" +msgstr "" + +#: src/gtkmm/state_draw.cpp:419 +msgid "Min Pressure" +msgstr "" + +#: src/gtkmm/state_draw.cpp:425 +msgid "LocalError" +msgstr "" + +#: src/gtkmm/state_draw.cpp:447 +msgid "Smooth" +msgstr "" + +#: src/gtkmm/state_draw.cpp:774 +msgid "Sketch BLine" +msgstr "" + +#: src/gtkmm/state_draw.cpp:1290 +msgid "Define Region" +msgstr "" + +#: src/gtkmm/state_draw.cpp:1857 src/gtkmm/state_draw.cpp:1908 +msgid "Extend BLine" +msgstr "" + +#: src/gtkmm/state_draw.cpp:1870 src/gtkmm/state_draw.cpp:1921 +msgid "Unable to set loop for bline" +msgstr "" + +#: src/gtkmm/state_draw.cpp:1894 src/gtkmm/state_draw.cpp:1945 +msgid "Unable to insert item" +msgstr "" + +#: src/gtkmm/state_draw.cpp:1978 +msgid "Fill Stroke" +msgstr "" + +#: src/gtkmm/state_fill.cpp:145 +msgid "No layer here" +msgstr "" + +#: src/gtkmm/state_fill.cpp:155 +msgid "Unable to set layer color" +msgstr "" + +#: src/gtkmm/state_gradient.cpp:271 +msgid "Gradient Type" +msgstr "Тип градиент" + +#: src/gtkmm/state_gradient.cpp:272 +msgid "Determines the type of Gradient used" +msgstr "Определяет тип используемого градиента" + +#: src/gtkmm/state_gradient.cpp:275 +msgid "Radial" +msgstr "Радиальный" + +#: src/gtkmm/state_gradient.cpp:276 +msgid "Conical" +msgstr "Конический" + +#: src/gtkmm/state_gradient.cpp:277 +msgid "Spiral" +msgstr "Спиральный" + +#: src/gtkmm/state_gradient.cpp:282 +msgid "The blend method the gradient will use" +msgstr "" + +#: src/gtkmm/state_gradient.cpp:383 +msgid "New Gradient" +msgstr "Новый градиент" + +#: src/gtkmm/state_polygon.cpp:324 +#, fuzzy +msgid "Create Polygon Layer" +msgstr "Создать слой окружности" + +#: src/gtkmm/state_polygon.cpp:397 +msgid "Make Polygon" +msgstr "" + +#: src/gtkmm/state_polygon.cpp:407 +msgid "Clear current Polygon" +msgstr "Очистить активный многоугольник" + +#: src/gtkmm/state_polygon.cpp:477 +msgid "New Polygon" +msgstr "Новый многоугольник" + +#: src/gtkmm/state_polygon.cpp:601 src/gtkmm/state_polygon.cpp:603 +msgid "Unable to create Polygon layer" +msgstr "" + +#: src/gtkmm/state_rectangle.cpp:341 +msgid "Create Rectangle Layer" +msgstr "Создать слоя прямоугольника" + +#: src/gtkmm/state_rectangle.cpp:346 +msgid "Link BLine Origins" +msgstr "Связать исходные точки кривых" + +#: src/gtkmm/state_rectangle.cpp:366 +msgid "Expansion:" +msgstr "Расширение:" + +#: src/gtkmm/state_rectangle.cpp:460 +msgid "New Rectangle" +msgstr "Новый прямоугольник" + +#: src/gtkmm/state_rotate.cpp:176 +msgid "Allow Scale" +msgstr "" + +#: src/gtkmm/state_rotate.cpp:370 +msgid "Move Duck" +msgstr "" + +#: src/gtkmm/state_rotate.cpp:375 +msgid "Rotate Ducks" +msgstr "" + +#: src/gtkmm/state_scale.cpp:164 +msgid "Lock Aspect Ratio" +msgstr "Запереть соотношение сторон" + +#: src/gtkmm/state_sketch.cpp:158 src/gtkmm/state_sketch.cpp:239 +msgid "Save Sketch" +msgstr "" + +#: src/gtkmm/state_sketch.cpp:168 +msgid "Unable to save sketch" +msgstr "" + +#: src/gtkmm/state_sketch.cpp:177 src/gtkmm/state_sketch.cpp:240 +msgid "Load Sketch" +msgstr "" + +#: src/gtkmm/state_sketch.cpp:187 +msgid "Unable to load sketch" +msgstr "" + +#: src/gtkmm/state_sketch.cpp:237 src/gtkmm/state_sketch.cpp:268 +#: src/gtkmm/state_sketch.cpp:269 +msgid "Clear Sketch" +msgstr "" + +#: src/gtkmm/state_sketch.cpp:238 +msgid "Undo Stroke" +msgstr "" + +#: src/gtkmm/state_sketch.cpp:241 +msgid "Show Sketch" +msgstr "" + +#: src/gtkmm/state_sketch.cpp:256 src/gtkmm/state_sketch.cpp:257 +msgid "Undo Last Stroke" +msgstr "" + +#: src/gtkmm/state_sketch.cpp:280 src/gtkmm/state_sketch.cpp:281 +#: src/gtkmm/state_sketch.cpp:292 src/gtkmm/state_sketch.cpp:293 +msgid "Save Sketch As..." +msgstr "" + +#: src/gtkmm/state_sketch.cpp:304 src/gtkmm/state_sketch.cpp:305 +msgid "Open a Sketch" +msgstr "" + +#: src/gtkmm/state_smoothmove.cpp:178 +msgid "Radius" +msgstr "" + +#: src/gtkmm/state_smoothmove.cpp:204 +msgid "Smooth Move" +msgstr "" + +#: src/gtkmm/state_star.cpp:431 +msgid "Regular Polygon" +msgstr "Обычный многоугольник" + +#: src/gtkmm/state_star.cpp:432 +msgid "Create Star Layer" +msgstr "Создать слой звезды" + +#: src/gtkmm/state_star.cpp:456 +msgid "Number of Points:" +msgstr "Количество точек:" + +#: src/gtkmm/state_star.cpp:458 +msgid "Inner Tangent:" +msgstr "Внутренняя касательная:" + +#: src/gtkmm/state_star.cpp:460 +msgid "Outer Tangent:" +msgstr "Внешняя касательная:" + +#: src/gtkmm/state_star.cpp:462 +msgid "Inner Width:" +msgstr "Внутренняя толщина:" + +#: src/gtkmm/state_star.cpp:464 +msgid "Outer Width:" +msgstr "Внешняя толщина:" + +#: src/gtkmm/state_star.cpp:466 +msgid "Radius Ratio:" +msgstr "Соотношение радиусов:" + +#: src/gtkmm/state_star.cpp:468 +msgid "Angle Offset:" +msgstr "Смещение угла:" + +#: src/gtkmm/state_star.cpp:555 +msgid "New Star" +msgstr "Новая звезда" + +#: src/gtkmm/state_star.cpp:696 +#, fuzzy +msgid "Unable to create Star layer" +msgstr "Создать слой звезды" + +#: src/gtkmm/state_text.cpp:275 +msgid "Multiline Editor" +msgstr "Многострочный редактор" + +#: src/gtkmm/state_text.cpp:284 src/gtkmm/state_text.cpp:329 +msgid "Text Tool" +msgstr "Текст" + +#: src/gtkmm/state_text.cpp:287 +msgid "Size:" +msgstr "Кегль" + +#: src/gtkmm/state_text.cpp:289 +msgid "Orientation:" +msgstr "Выключка:" + +#: src/gtkmm/state_text.cpp:291 +msgid "Family:" +msgstr "Гарнитура:" + +#: src/gtkmm/state_text.cpp:373 +msgid "New Text" +msgstr "Новый текст" + +#: src/gtkmm/state_text.cpp:398 +msgid "Text Paragraph" +msgstr "Новый абзац" + +#: src/gtkmm/state_text.cpp:398 src/gtkmm/state_text.cpp:400 +msgid "Enter text here:" +msgstr "Введите сюда текст:" + +#: src/gtkmm/state_text.cpp:400 +msgid "Text Entry" +msgstr "Ввод текста" + +#: src/gtkmm/state_width.cpp:224 +msgid "Relative Growth" +msgstr "Относительный рост" + +#: src/gtkmm/state_width.cpp:232 +msgid "Growth:" +msgstr "Сила:" + +#: src/gtkmm/state_width.cpp:235 +msgid "Radius:" +msgstr "Радиус:" + +#: src/gtkmm/state_width.cpp:560 +msgid "Sketch Width" +msgstr "" + +#: src/gtkmm/toolbox.cpp:134 +msgid "Cannot save" +msgstr "Невозможно сохранить" + +#: src/gtkmm/toolbox.cpp:134 src/gtkmm/toolbox.cpp:146 +msgid "Nothing to save" +msgstr "" + +#: src/gtkmm/toolbox.cpp:146 +msgid "Cannot save as" +msgstr "" + +#: src/gtkmm/toolbox.cpp:168 +msgid "Cannot close" +msgstr "" + +#: src/gtkmm/toolbox.cpp:168 +msgid "Nothing to close" +msgstr "" + +#: src/gtkmm/toolbox.cpp:221 +msgid "Vertical Dock: Canvases, History" +msgstr "" + +#: src/gtkmm/toolbox.cpp:222 +msgid "Horizontal Dock: Layers, Children, Params" +msgstr "" + +#: src/gtkmm/toolbox.cpp:224 +msgid "Reset Windows to Original Layout" +msgstr "" + +#: src/gtkmm/toolbox.cpp:233 +msgid "Open Recent" +msgstr "Открыть последние" + +#: src/gtkmm/toolbox.cpp:240 +msgid "Panels" +msgstr "Панели" + +#: src/gtkmm/toolbox.cpp:252 +msgid "Input Devices..." +msgstr "Устройства ввода..." + +#: src/gtkmm/toolbox.cpp:254 +msgid "Setup..." +msgstr "Настроить Synfig..." + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:269 +msgid "Synfig Wiki" +msgstr "Вики Synfig" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:269 +msgid "/Main_Page" +msgstr "/Main_Page" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:270 +msgid "Tutorials" +msgstr "Уроки" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:270 +msgid "/Tutorials" +msgstr "/Tutorials" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:271 +msgid "Frequently Asked Questions" +msgstr "Часто задаваемые вопросы" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:271 +msgid "/FAQ" +msgstr "/FAQ" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:272 +msgid "Get Support" +msgstr "Техподдержка" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:272 +msgid "/Contact" +msgstr "/Contact" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:273 +msgid "Keyboard Shortcuts" +msgstr "Клавиатурные комбинации" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:273 +msgid "/Keyboard_Shortcuts" +msgstr "/Keyboard_Shortcuts" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:274 +msgid "Mouse Shortcuts" +msgstr "Использование мыши" + +#. TRANSLATORS: a wiki page +#: src/gtkmm/toolbox.cpp:274 +msgid "/Mouse_Shortcuts" +msgstr "/Mouse_Shortcuts" + +#. TRANSLATORS: Help menu entry +#: src/gtkmm/toolbox.cpp:275 +msgid "All Pages" +msgstr "Все страницы" + +#: src/gtkmm/toolbox.cpp:283 +msgid "_Help" +msgstr "_Справка" + +#: src/gtkmm/toolbox.cpp:290 +msgid "New..." +msgstr "Создать" + +#: src/gtkmm/toolbox.cpp:291 +msgid "Open..." +msgstr "Открыть" + +#: src/gtkmm/toolbox.cpp:292 +msgid "Save" +msgstr "Сохранить" + +#: src/gtkmm/toolbox.cpp:293 +msgid "Save As..." +msgstr "Сохранить как..." + +#: src/gtkmm/toolbox.cpp:297 +msgid "Setup" +msgstr "Настроить" + +#: src/gtkmm/toolbox.cpp:298 +msgid "About Synfig Studio" +msgstr "О Synfig Studio" + +#: src/gtkmm/widget_canvaschooser.cpp:115 +msgid "Other..." +msgstr "Другое..." + +#: src/gtkmm/widget_canvaschooser.cpp:136 +msgid "Choose Canvas" +msgstr "Выберите холст" + +#: src/gtkmm/widget_canvaschooser.cpp:136 +msgid "Enter the relative name of the canvas that you want" +msgstr "" + +#: src/gtkmm/widget_canvaschooser.cpp:145 +msgid "No canvas name was specified" +msgstr "" + +#: src/gtkmm/widget_canvaschooser.cpp:159 +msgid "Error:Exception Thrown" +msgstr "" + +#: src/gtkmm/widget_canvaschooser.cpp:159 +msgid "" +"Error selecting canvas:\n" +"\n" +msgstr "" + +#: src/gtkmm/widget_canvaschooser.cpp:164 +msgid "Unknown Exception" +msgstr "" + +#: src/gtkmm/widget_coloredit.cpp:305 +msgid "RGB" +msgstr "RGB" + +#: src/gtkmm/widget_coloredit.cpp:306 +msgid "YUV" +msgstr "YUV" + +#: src/gtkmm/widget_coloredit.cpp:361 +msgid "HTML code" +msgstr "Код HTML" + +#: src/gtkmm/widget_coloredit.cpp:374 +msgid "Luma" +msgstr "Светимость" + +#: src/gtkmm/widget_coloredit.cpp:375 +msgid "Hue" +msgstr "Тон" + +#: src/gtkmm/widget_coloredit.cpp:376 +msgid "Saturation" +msgstr "Насыщенность" + +#: src/gtkmm/widget_coloredit.cpp:377 +msgid "U" +msgstr "U" + +#: src/gtkmm/widget_coloredit.cpp:378 +msgid "V" +msgstr "V" + +#: src/gtkmm/widget_coloredit.cpp:382 +msgid "Alpha" +msgstr "Альфа" + +#: src/gtkmm/widget_defaults.cpp:215 +msgid "Foreground Color" +msgstr "Цвет переднего плана" + +#: src/gtkmm/widget_defaults.cpp:223 +msgid "Background Color" +msgstr "Цвет фона" + +#: src/gtkmm/widget_defaults.cpp:240 +msgid "" +"Swap Background and\n" +"Foreground Colors" +msgstr "" +"Поменять местами цвета\n" +"переднего плана и фона" + +#: src/gtkmm/widget_defaults.cpp:254 +msgid "Reset Colors to Black and White" +msgstr "Сбросить цвета до черного и белого" + +#: src/gtkmm/widget_defaults.cpp:266 +msgid "Brush Preview" +msgstr "Предпросмотр кисти" + +#: src/gtkmm/widget_defaults.cpp:276 +msgid "Brush Size" +msgstr "Диаметр кисти" + +#: src/gtkmm/widget_defaults.cpp:284 +msgid "Default Blend Method" +msgstr "Режим наложения по умолчанию" + +#: src/gtkmm/widget_defaults.cpp:298 +msgid "Default Interpolation" +msgstr "Интерполяция по умолчанию" + +#: src/gtkmm/widget_defaults.cpp:306 +msgid "Default Opacity" +msgstr "Непрозрачность по умолчанию" + +#: src/gtkmm/widget_defaults.cpp:313 +msgid "Default Gradient" +msgstr "Градиент по умолчанию" + +#: src/gtkmm/widget_filename.cpp:61 +msgid "Find" +msgstr "" + +#: src/gtkmm/widget_filename.cpp:120 +msgid "Choose File" +msgstr "Выберите файл" + +#: src/gtkmm/widget_gradient.cpp:223 +msgid "Insert CPoint" +msgstr "" + +#: src/gtkmm/widget_gradient.cpp:235 +msgid "Remove CPoint" +msgstr "" + +#: src/gtkmm/widget_waypoint.cpp:77 +msgid "(Non-static value)" +msgstr "" + +#: src/gtkmm/widget_waypoint.cpp:87 src/gtkmm/widget_waypoint.cpp:94 +#: src/gtkmm/widget_waypointmodel.cpp:73 src/gtkmm/widget_waypointmodel.cpp:80 +msgid "TCB Smooth" +msgstr "" + +#: src/gtkmm/widget_waypoint.cpp:88 src/gtkmm/widget_waypoint.cpp:95 +#: src/gtkmm/widget_waypointmodel.cpp:74 src/gtkmm/widget_waypointmodel.cpp:81 +msgid "Constant" +msgstr "" + +#: src/gtkmm/widget_waypoint.cpp:90 src/gtkmm/widget_waypointmodel.cpp:76 +msgid "Ease In" +msgstr "" + +#: src/gtkmm/widget_waypoint.cpp:97 src/gtkmm/widget_waypointmodel.cpp:83 +msgid "Ease Out" +msgstr "" + +#: src/gtkmm/widget_waypoint.cpp:122 +#: src/synfigapp/actions/waypointremove.cpp:78 +#: src/synfigapp/actions/waypointset.cpp:77 +#: src/synfigapp/actions/waypointsimpleadd.cpp:78 +#: src/synfigapp/value_desc.cpp:81 +msgid "Waypoint" +msgstr "" + +#: src/gtkmm/widget_waypoint.cpp:124 +msgid "Waypoint" +msgstr "" + +#: src/gtkmm/widget_waypoint.cpp:136 +msgid "_Value" +msgstr "_Значение" + +#: src/gtkmm/widget_waypoint.cpp:143 +msgid "_Time" +msgstr "_Время" + +#: src/gtkmm/widget_waypoint.cpp:149 +msgid "Interpolation" +msgstr "Интерполяция" + +#: src/gtkmm/widget_waypoint.cpp:151 +msgid "Interpolation" +msgstr "Интерполяция" + +#: src/gtkmm/widget_waypoint.cpp:163 +msgid "_In Interpolation" +msgstr "" + +#: src/gtkmm/widget_waypoint.cpp:169 +msgid "_Out Interpolation" +msgstr "" + +#: src/gtkmm/widget_waypoint.cpp:175 +msgid "TCB Parameters" +msgstr "" + +#: src/gtkmm/widget_waypoint.cpp:177 +msgid "TCB Parameter" +msgstr "" + +#: src/gtkmm/widget_waypoint.cpp:189 +msgid "T_ension" +msgstr "" + +#: src/gtkmm/widget_waypoint.cpp:196 +msgid "_Continuity" +msgstr "_Непрерывность" + +#: src/gtkmm/widget_waypoint.cpp:203 +msgid "_Bias" +msgstr "" + +#: src/gtkmm/widget_waypoint.cpp:210 +msgid "Te_mporal Tension" +msgstr "" + +#: src/gtkmm/widget_waypointmodel.cpp:65 +msgid "Out:" +msgstr "" + +#: src/gtkmm/widget_waypointmodel.cpp:66 +msgid "In:" +msgstr "" + +#: src/gtkmm/widget_waypointmodel.cpp:67 +msgid "Tension:" +msgstr "" + +#: src/gtkmm/widget_waypointmodel.cpp:68 +msgid "Continuity:" +msgstr "Непрерывность:" + +#: src/gtkmm/widget_waypointmodel.cpp:69 +msgid "Bias:" +msgstr "" + +#: src/gtkmm/widget_waypointmodel.cpp:70 +msgid "Temporal Tension:" +msgstr "" + +#: src/gtkmm/workarea.cpp:1171 +msgid "Nudge" +msgstr "" + +#: src/gtkmm/workarea.cpp:1631 +msgid "Move" +msgstr "" + +#: src/gtkmm/workarea.cpp:2322 +msgid "Rendering..." +msgstr "" + +#: src/gtkmm/workarea.cpp:2349 src/gtkmm/workarea.cpp:2441 +msgid "Render Failed" +msgstr "" + +#: src/gtkmm/workarea.cpp:2423 +#, c-format +msgid "Rendering canvas %s..." +msgstr "" + +#: src/gtkmm/zoomdial.h:72 +msgid "Zoom In" +msgstr "Приблизить" + +#: src/gtkmm/zoomdial.h:73 +msgid "Zoom Out" +msgstr "Отдалить" + +#: src/gtkmm/zoomdial.h:74 +msgid "Zoom to Fit" +msgstr "Уместить" + +#: src/gtkmm/zoomdial.h:75 +msgid "Zoom to 100%" +msgstr "1:1" + +#: src/synfigapp/action.cpp:480 +msgid "Selected Canvas" +msgstr "" + +#: src/synfigapp/action.cpp:484 src/synfigapp/action.cpp:485 +msgid "Canvas Interface" +msgstr "" + +#: src/synfigapp/actions/activepointadd.cpp:50 +msgid "Add Activepoint" +msgstr "" + +#: src/synfigapp/actions/activepointadd.cpp:76 +#: src/synfigapp/actions/activepointremove.cpp:75 +#: src/synfigapp/actions/activepointset.cpp:74 +#: src/synfigapp/actions/activepointsetoff.cpp:84 +#: src/synfigapp/actions/activepointseton.cpp:84 +#: src/synfigapp/actions/activepointsetsmart.cpp:83 +#: src/synfigapp/actions/colorset.cpp:79 +#: src/synfigapp/actions/gradientset.cpp:79 +#: src/synfigapp/actions/valuedescconvert.cpp:93 +#: src/synfigapp/actions/valuedescdisconnect.cpp:82 +#: src/synfigapp/actions/valuedescdisconnect.cpp:91 +#: src/synfigapp/actions/valuedescexport.cpp:88 +#: src/synfigapp/actions/valuedescset.cpp:83 +#: src/synfigapp/actions/valuedescset.cpp:92 +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:77 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:78 +#: src/synfigapp/actions/valuenodedynamiclistremove.cpp:75 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:78 +#: src/synfigapp/actions/valuenodedynamiclistrotateorder.cpp:75 +msgid "ValueDesc" +msgstr "" + +#: src/synfigapp/actions/activepointadd.cpp:80 +#: src/synfigapp/actions/activepointsetsmart.cpp:87 +msgid "New Activepoint" +msgstr "" + +#: src/synfigapp/actions/activepointadd.cpp:81 +#: src/synfigapp/actions/activepointsetsmart.cpp:88 +#: src/synfigapp/actions/activepointsimpleadd.cpp:79 +msgid "Activepoint to be added" +msgstr "" + +#: src/synfigapp/actions/activepointadd.cpp:87 +#: src/synfigapp/actions/activepointsetsmart.cpp:94 +msgid "Time where activepoint is to be added" +msgstr "" + +#: src/synfigapp/actions/activepointadd.cpp:177 +#: src/synfigapp/actions/activepointremove.cpp:163 +msgid "A Activepoint already exists at this point in time" +msgstr "" + +#: src/synfigapp/actions/activepointadd.cpp:180 +#: src/synfigapp/actions/activepointremove.cpp:166 +msgid "This activepoint is already in the ValueNode" +msgstr "" + +#: src/synfigapp/actions/activepointremove.cpp:50 +msgid "Remove Activepoint" +msgstr "" + +#: src/synfigapp/actions/activepointremove.cpp:79 +#: src/synfigapp/actions/activepointset.cpp:78 +#: src/synfigapp/actions/activepointsetoff.cpp:88 +#: src/synfigapp/actions/activepointseton.cpp:88 +#: src/synfigapp/actions/activepointsimpleadd.cpp:78 +msgid "Activepoint" +msgstr "" + +#: src/synfigapp/actions/activepointremove.cpp:80 +#: src/synfigapp/actions/activepointset.cpp:79 +msgid "Activepoint to be changed" +msgstr "" + +#: src/synfigapp/actions/activepointremove.cpp:144 +#: src/synfigapp/actions/activepointset.cpp:152 +#: src/synfigapp/actions/activepointset.cpp:210 +#: src/synfigapp/actions/activepointset.cpp:256 +#: src/synfigapp/actions/activepointset.cpp:277 +msgid "Unable to find activepoint" +msgstr "" + +#: src/synfigapp/actions/activepointset.cpp:50 +msgid "Set Activepoint" +msgstr "" + +#: src/synfigapp/actions/activepointsetoff.cpp:58 +msgid "Mark Activepoint as \"Off\"" +msgstr "" + +#: src/synfigapp/actions/activepointseton.cpp:58 +msgid "Mark Activepoint as \"On\"" +msgstr "" + +#: src/synfigapp/actions/activepointsetsmart.cpp:57 +msgid "Set Activepoint (Smart)" +msgstr "" + +#: src/synfigapp/actions/activepointsetsmart.cpp:366 +#: src/synfigapp/actions/waypointsetsmart.cpp:439 +msgid "Unable to determine how to proceed. This is a bug." +msgstr "" + +#: src/synfigapp/actions/activepointsimpleadd.cpp:49 +#: src/synfigapp/actions/waypointsimpleadd.cpp:49 +msgid "Simply Add Waypoint" +msgstr "" + +#: src/synfigapp/actions/activepointsimpleadd.cpp:74 +#: src/synfigapp/actions/waypointadd.cpp:77 +#: src/synfigapp/actions/waypointset.cpp:73 +#: src/synfigapp/actions/waypointsetsmart.cpp:85 +#: src/synfigapp/actions/waypointsimpleadd.cpp:74 +msgid "Destination ValueNode (Animated)" +msgstr "" + +#: src/synfigapp/actions/activepointsimpleadd.cpp:169 +msgid "The activepoint to remove no longer exists" +msgstr "" + +#: src/synfigapp/actions/blinepointtangentmerge.cpp:78 +#, c-format +msgid "Merge Tangents of '%s'" +msgstr "" + +#: src/synfigapp/actions/blinepointtangentmerge.cpp:87 +#: src/synfigapp/actions/blinepointtangentsplit.cpp:87 +msgid "ValueNode of BLinePoint" +msgstr "" + +#: src/synfigapp/actions/blinepointtangentmerge.cpp:156 +#: src/synfigapp/actions/blinepointtangentsplit.cpp:156 +msgid "Couldn't find action \"value_desc_set\"" +msgstr "" + +#: src/synfigapp/actions/blinepointtangentsplit.cpp:78 +#, c-format +msgid "Split Tangents of '%s'" +msgstr "" + +#: src/synfigapp/actions/canvasadd.cpp:49 +msgid "Add Child Canvas" +msgstr "" + +#: src/synfigapp/actions/canvasadd.cpp:79 +msgid "The name that you want this canvas to be" +msgstr "" + +#: src/synfigapp/actions/canvasdescriptionset.cpp:50 +msgid "Set Canvas Description" +msgstr "" + +#. TRANSLATORS: This is used in the 'history' dialog when a Canvas has its description changed. +#: src/synfigapp/actions/canvasdescriptionset.cpp:71 +#, c-format +msgid "Change canvas description from '%s' to '%s'" +msgstr "" + +#: src/synfigapp/actions/canvasidset.cpp:50 +msgid "Set Canvas Id" +msgstr "" + +#. TRANSLATORS: This is used in the 'history' dialog when a Canvas has its id changed. +#: src/synfigapp/actions/canvasidset.cpp:71 +#, c-format +msgid "Change canvas id from '%s' to '%s'" +msgstr "" + +#: src/synfigapp/actions/canvasidset.cpp:82 +msgid "Id" +msgstr "" + +#: src/synfigapp/actions/canvasnameset.cpp:50 +msgid "Set Canvas Name" +msgstr "" + +#. TRANSLATORS: This is used in the 'history' dialog when a Canvas has its name changed. +#: src/synfigapp/actions/canvasnameset.cpp:71 +#, c-format +msgid "Change canvas name from '%s' to '%s'" +msgstr "" + +#: src/synfigapp/actions/canvasremove.cpp:49 +msgid "Remove Canvas" +msgstr "" + +#: src/synfigapp/actions/canvasremove.cpp:107 +msgid "You cannot remove the root canvas!" +msgstr "" + +#: src/synfigapp/actions/canvasremove.cpp:110 +msgid "You cannot remove an inline canvas!" +msgstr "" + +#: src/synfigapp/actions/canvasrenddescset.cpp:49 +msgid "Set Canvas RendDesc" +msgstr "" + +#: src/synfigapp/actions/canvasrenddescset.cpp:73 +msgid "RendDesc" +msgstr "" + +#: src/synfigapp/actions/colorset.cpp:55 +msgid "Apply Default Color" +msgstr "Применить цвет по умолчанию" + +#: src/synfigapp/actions/editmodeset.cpp:49 +msgid "Set Edit Mode" +msgstr "Смена режима правки" + +#: src/synfigapp/actions/editmodeset.cpp:72 +msgid "New Edit Mode" +msgstr "Новый режим правки" + +#: src/synfigapp/actions/gradientset.cpp:55 +msgid "Apply Default Gradient" +msgstr "" + +#: src/synfigapp/actions/groupaddlayers.cpp:49 +msgid "Add Layers to Group" +msgstr "Добавить слои в группу" + +#: src/synfigapp/actions/groupaddlayers.cpp:73 +msgid "Layer to be added to group" +msgstr "" + +#: src/synfigapp/actions/groupaddlayers.cpp:79 +msgid "Name of the Group to add the Layers to" +msgstr "" + +#: src/synfigapp/actions/groupremove.cpp:49 +msgid "Remove Group" +msgstr "Удалить группу" + +#: src/synfigapp/actions/groupremove.cpp:73 +msgid "Name of the Group to remove" +msgstr "" + +#: src/synfigapp/actions/groupremovelayers.cpp:50 +msgid "Remove Layers from a Group" +msgstr "Удалить слои из группы" + +#: src/synfigapp/actions/groupremovelayers.cpp:74 +msgid "Layer to be removed from group" +msgstr "" + +#: src/synfigapp/actions/grouprename.cpp:49 +msgid "Rename Group" +msgstr "" + +#: src/synfigapp/actions/grouprename.cpp:72 +msgid "Old Group" +msgstr "" + +#: src/synfigapp/actions/grouprename.cpp:73 +msgid "Name of the Group to rename" +msgstr "" + +#: src/synfigapp/actions/grouprename.cpp:77 +msgid "New Group" +msgstr "" + +#: src/synfigapp/actions/grouprename.cpp:78 +msgid "New name for group" +msgstr "" + +#: src/synfigapp/actions/grouprename.cpp:123 +#, c-format +msgid "A group with the name \"%s\" already exists!" +msgstr "" + +#: src/synfigapp/actions/keyframeadd.cpp:49 +msgid "Add Keyframe" +msgstr "" + +#: src/synfigapp/actions/keyframeadd.cpp:74 +#: src/synfigapp/actions/keyframeset.cpp:78 +msgid "New Keyframe" +msgstr "" + +#: src/synfigapp/actions/keyframeadd.cpp:75 +#: src/synfigapp/actions/keyframeset.cpp:79 +msgid "Keyframe to be added" +msgstr "" + +#: src/synfigapp/actions/keyframeadd.cpp:114 +#: src/synfigapp/actions/keyframeduplicate.cpp:138 +#: src/synfigapp/actions/keyframeduplicate.cpp:217 +#: src/synfigapp/actions/keyframeremove.cpp:219 +#: src/synfigapp/actions/keyframeset.cpp:128 +msgid "A Keyframe already exists at this point in time" +msgstr "" + +#: src/synfigapp/actions/keyframeadd.cpp:117 +#: src/synfigapp/actions/keyframeduplicate.cpp:220 +#: src/synfigapp/actions/keyframeremove.cpp:222 +msgid "This keyframe is already in the ValueNode" +msgstr "" + +#: src/synfigapp/actions/keyframeduplicate.cpp:53 +msgid "Duplicate Keyframe" +msgstr "Продублировать ключевой кадр" + +#: src/synfigapp/actions/keyframeduplicate.cpp:80 +msgid "Keyframe to be duplicated" +msgstr "Дублируемый ключевой кадр" + +#: src/synfigapp/actions/keyframeduplicate.cpp:102 +msgid " (Duplicate)" +msgstr "" + +#: src/synfigapp/actions/keyframeduplicate.cpp:135 +#: src/synfigapp/actions/keyframeremove.cpp:120 +#: src/synfigapp/actions/keyframeset.cpp:377 +#: src/synfigapp/actions/keyframewaypointset.cpp:129 +msgid "Unable to find the given keyframe" +msgstr "" + +#: src/synfigapp/actions/keyframeremove.cpp:53 +msgid "Remove Keyframe" +msgstr "Удалить ключевой кадр" + +#: src/synfigapp/actions/keyframeremove.cpp:79 +msgid "Keyframe to be removed" +msgstr "Удаляемый ключевой кадр" + +#: src/synfigapp/actions/keyframeset.cpp:53 +msgid "Set Keyframe" +msgstr "Указать ключевой кадр" + +#: src/synfigapp/actions/keyframeset.cpp:385 +msgid "" +"Cannot change keyframe time because another keyframe already exists with " +"that time." +msgstr "" + +#: src/synfigapp/actions/keyframesetdelta.cpp:53 +msgid "Set Keyframe Delta" +msgstr "" + +#: src/synfigapp/actions/keyframesetdelta.cpp:82 +msgid "Delta" +msgstr "" + +#: src/synfigapp/actions/keyframewaypointset.cpp:53 +msgid "Set Waypoints at Keyframe" +msgstr "" + +#: src/synfigapp/actions/keyframewaypointset.cpp:82 +#: src/synfigapp/actions/waypointsetsmart.cpp:95 +msgid "Waypoint Model" +msgstr "" + +#: src/synfigapp/actions/layeractivate.cpp:50 +#: src/synfigapp/actions/layeractivate.cpp:71 +#: src/synfigapp/actions/layeractivate.cpp:75 +msgid "Activate Layer" +msgstr "Активировать слой" + +#: src/synfigapp/actions/layeractivate.cpp:76 +msgid "Deactivate Layer" +msgstr "Деактивировать слой" + +#: src/synfigapp/actions/layeractivate.cpp:90 +msgid "New Status" +msgstr "Новый статус" + +#: src/synfigapp/actions/layeractivate.cpp:91 +msgid "The new status of the layer" +msgstr "Новый статус слоя" + +#: src/synfigapp/actions/layeractivate.cpp:141 +#: src/synfigapp/actions/layeradd.cpp:144 +#: src/synfigapp/actions/layerduplicate.cpp:135 +#: src/synfigapp/actions/layerencapsulate.cpp:191 +#: src/synfigapp/actions/layerlower.cpp:140 +#: src/synfigapp/actions/layermove.cpp:161 +#: src/synfigapp/actions/layermove.cpp:234 +#: src/synfigapp/actions/layerraise.cpp:137 +#: src/synfigapp/actions/layerremove.cpp:134 +msgid "This layer doesn't exist anymore." +msgstr "Этот слой больше не существует." + +#: src/synfigapp/actions/layeradd.cpp:50 src/synfigapp/actions/layeradd.cpp:71 +#: src/synfigapp/actions/layeradd.cpp:73 +msgid "Add Layer" +msgstr "Добавить слой" + +#: src/synfigapp/actions/layeradd.cpp:83 +msgid "Layer to be added" +msgstr "Добавляемый слой" + +#: src/synfigapp/actions/layerduplicate.cpp:52 +#: src/synfigapp/actions/layerduplicate.cpp:72 +msgid "Duplicate Layer" +msgstr "Продублировать слой" + +#: src/synfigapp/actions/layerduplicate.cpp:72 +msgid "Duplicate Layers" +msgstr "Продублировать слои" + +#: src/synfigapp/actions/layerduplicate.cpp:82 +msgid "Layer to be duplicated" +msgstr "Дублируемый слой" + +#: src/synfigapp/actions/layerduplicate.cpp:141 +#: src/synfigapp/actions/layerencapsulate.cpp:200 +#: src/synfigapp/actions/layerremove.cpp:144 +msgid "This layer doesn't belong to this canvas anymore" +msgstr "Этот слой больше не принадлежит холсту" + +#: src/synfigapp/actions/layerencapsulate.cpp:72 +msgid "Encapsulate Layer" +msgstr "Инкапсюлировать слой" + +#: src/synfigapp/actions/layerencapsulate.cpp:72 +msgid "Encapsulate Layers" +msgstr "Инкапсюлировать слои" + +#: src/synfigapp/actions/layerencapsulate.cpp:82 +msgid "Layer to be encapsulated" +msgstr "Инкапсюлируемый слой" + +#: src/synfigapp/actions/layerencapsulate.cpp:141 +msgid "No layers to encapsulate" +msgstr "Нет инкапсюлируемых слоёв" + +#: src/synfigapp/actions/layerencapsulate.cpp:194 +msgid "This layer doesn't have a parent canvas" +msgstr "" + +#: src/synfigapp/actions/layerencapsulate.cpp:203 +msgid "get_canvas()!=subcanvas" +msgstr "" + +#: src/synfigapp/actions/layerlower.cpp:51 +#: src/synfigapp/actions/layerlower.cpp:71 +msgid "Lower Layer" +msgstr "Опустить слой" + +#: src/synfigapp/actions/layerlower.cpp:71 +msgid "Lower Layers" +msgstr "Опустить слои" + +#: src/synfigapp/actions/layerlower.cpp:81 +msgid "Layer to be lowered" +msgstr "Опускаемый слой" + +#: src/synfigapp/actions/layermove.cpp:50 +#: src/synfigapp/actions/layermove.cpp:74 +#: src/synfigapp/actions/layermove.cpp:76 +msgid "Move Layer" +msgstr "Переместить слой" + +#: src/synfigapp/actions/layermove.cpp:86 +#: src/synfigapp/actions/layersetdesc.cpp:86 +msgid "Layer to be moved" +msgstr "Перемещаемый слой" + +#: src/synfigapp/actions/layermove.cpp:90 +msgid "New Index" +msgstr "" + +#: src/synfigapp/actions/layermove.cpp:91 +msgid "Where the layer is to be moved to" +msgstr "" + +#: src/synfigapp/actions/layermove.cpp:95 +msgid "Destination Canvas" +msgstr "" + +#: src/synfigapp/actions/layermove.cpp:96 +msgid "The canvas the layer is to be moved to" +msgstr "" + +#: src/synfigapp/actions/layermove.cpp:170 +msgid "You cannot directly move layers across compositions" +msgstr "" + +#: src/synfigapp/actions/layerparamconnect.cpp:49 +msgid "Connect Layer Parameter" +msgstr "" + +#: src/synfigapp/actions/layerparamconnect.cpp:76 +#: src/synfigapp/actions/layerparamdisconnect.cpp:79 +#: src/synfigapp/actions/layerparamset.cpp:76 +msgid "Param" +msgstr "" + +#: src/synfigapp/actions/layerparamconnect.cpp:147 +msgid "Layer did not recognize parameter name" +msgstr "" + +#: src/synfigapp/actions/layerparamconnect.cpp:150 +msgid "Bad connection" +msgstr "" + +#: src/synfigapp/actions/layerparamdisconnect.cpp:50 +msgid "Disconnect Layer Parameter" +msgstr "" + +#: src/synfigapp/actions/layerparamdisconnect.cpp:135 +msgid "Layer Parameter is not connected to anything" +msgstr "" + +#: src/synfigapp/actions/layerparamset.cpp:49 +msgid "Set Layer Parameter" +msgstr "" + +#: src/synfigapp/actions/layerparamset.cpp:132 +msgid "ValueNode attached to Parameter." +msgstr "" + +#: src/synfigapp/actions/layerparamset.cpp:137 +#: src/synfigapp/actions/layerparamset.cpp:157 +msgid "Layer did not accept parameter." +msgstr "" + +#: src/synfigapp/actions/layerraise.cpp:51 +#: src/synfigapp/actions/layerraise.cpp:71 +msgid "Raise Layer" +msgstr "Поднять слой" + +#: src/synfigapp/actions/layerraise.cpp:71 +msgid "Raise Layers" +msgstr "Поднять слои" + +#: src/synfigapp/actions/layerraise.cpp:81 +msgid "Layer to be raised" +msgstr "Поднимаемый слой" + +#: src/synfigapp/actions/layerremove.cpp:50 +#: src/synfigapp/actions/layerremove.cpp:70 +msgid "Remove Layer" +msgstr "Удалить слой" + +#: src/synfigapp/actions/layerremove.cpp:70 +msgid "Remove Layers" +msgstr "Удалить слои" + +#: src/synfigapp/actions/layerremove.cpp:80 +msgid "Layer to be deleted" +msgstr "Удаляемый слой" + +#: src/synfigapp/actions/layersetdesc.cpp:50 +#: src/synfigapp/actions/layersetdesc.cpp:73 +msgid "Set Layer Description" +msgstr "Указать описание слоя" + +#. TRANSLATORS: this is the string used in the history dialog when renaming a layer to/from its default name +#: src/synfigapp/actions/layersetdesc.cpp:75 +#: src/synfigapp/actions/layersetdesc.cpp:76 +msgid "[default]" +msgstr "(исходное название)" + +#: src/synfigapp/actions/layersetdesc.cpp:90 +msgid "New Description" +msgstr "Новое описание" + +#: src/synfigapp/actions/layersetdesc.cpp:91 +msgid "Enter a new description for this layer" +msgstr "Введите новое описание этого слоя" + +#: src/synfigapp/actions/timepointscopy.cpp:58 +msgid "Copy Time Points" +msgstr "" + +#: src/synfigapp/actions/timepointscopy.cpp:83 +#: src/synfigapp/actions/timepointsdelete.cpp:82 +#: src/synfigapp/actions/timepointsmove.cpp:83 +msgid "New Selected Layer" +msgstr "" + +#: src/synfigapp/actions/timepointscopy.cpp:84 +#: src/synfigapp/actions/timepointsdelete.cpp:83 +#: src/synfigapp/actions/timepointsmove.cpp:84 +msgid "A layer to add to our selected list" +msgstr "" + +#: src/synfigapp/actions/timepointscopy.cpp:90 +#: src/synfigapp/actions/timepointsdelete.cpp:89 +#: src/synfigapp/actions/timepointsmove.cpp:90 +msgid "New Selected Canvas" +msgstr "" + +#: src/synfigapp/actions/timepointscopy.cpp:91 +#: src/synfigapp/actions/timepointsdelete.cpp:90 +#: src/synfigapp/actions/timepointsmove.cpp:91 +msgid "A canvas to add to our selected list" +msgstr "" + +#: src/synfigapp/actions/timepointscopy.cpp:97 +#: src/synfigapp/actions/timepointsdelete.cpp:96 +#: src/synfigapp/actions/timepointsmove.cpp:97 +msgid "New Selected ValueBase" +msgstr "" + +#: src/synfigapp/actions/timepointscopy.cpp:98 +#: src/synfigapp/actions/timepointsdelete.cpp:97 +#: src/synfigapp/actions/timepointsmove.cpp:98 +msgid "A valuenode's description to add to our selected list" +msgstr "" + +#: src/synfigapp/actions/timepointscopy.cpp:104 +#: src/synfigapp/actions/timepointsdelete.cpp:103 +#: src/synfigapp/actions/timepointsmove.cpp:104 +msgid "New Selected Time Point" +msgstr "" + +#: src/synfigapp/actions/timepointscopy.cpp:105 +#: src/synfigapp/actions/timepointsdelete.cpp:104 +#: src/synfigapp/actions/timepointsmove.cpp:105 +msgid "A time point to add to our selected list" +msgstr "" + +#: src/synfigapp/actions/timepointscopy.cpp:110 +#: src/synfigapp/actions/timepointsmove.cpp:110 +msgid "Time adjustment" +msgstr "" + +#: src/synfigapp/actions/timepointscopy.cpp:111 +#: src/synfigapp/actions/timepointsmove.cpp:111 +msgid "The amount of time to adjust all the selected points" +msgstr "" + +#: src/synfigapp/actions/timepointsdelete.cpp:58 +msgid "Delete Time Points" +msgstr "" + +#: src/synfigapp/actions/timepointsmove.cpp:58 +msgid "Move Time Points" +msgstr "" + +#: src/synfigapp/actions/valuedescblinelink.cpp:59 +msgid "Link to BLine" +msgstr "" + +#: src/synfigapp/actions/valuedescblinelink.cpp:82 +#: src/synfigapp/actions/valuedesclink.cpp:75 +msgid "ValueDesc to link" +msgstr "" + +#: src/synfigapp/actions/valuedescblinelink.cpp:86 +msgid "ValueDesc on BLine to link to" +msgstr "" + +#: src/synfigapp/actions/valuedescblinelink.cpp:93 +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:84 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:85 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:85 +msgid "Origin" +msgstr "Исходная точка" + +#: src/synfigapp/actions/valuedescconnect.cpp:55 +msgid "Connect" +msgstr "Соединить" + +#. TRANSLATORS: This is used in the 'history' dialog when a connection is made. +#: src/synfigapp/actions/valuedescconnect.cpp:76 +#, c-format +msgid "Connect '%s' to '%s'" +msgstr "Соединение '%s' с '%s'" + +#: src/synfigapp/actions/valuedescconnect.cpp:87 +msgid "Destination ValueDesc" +msgstr "" + +#: src/synfigapp/actions/valuedescconnect.cpp:91 +#: src/synfigapp/actions/valuenodereplace.cpp:90 +msgid "Source ValueNode" +msgstr "" + +#: src/synfigapp/actions/valuedescconnect.cpp:96 +msgid "Source ValueNode Name" +msgstr "" + +#: src/synfigapp/actions/valuedescconnect.cpp:257 +#: src/synfigapp/actions/valuedescdisconnect.cpp:235 +msgid "ValueDesc is not recognized or supported." +msgstr "" + +#: src/synfigapp/actions/valuedescconvert.cpp:60 +msgid "Convert" +msgstr "Преобразовать" + +#. TRANSLATORS: This is used in the 'history' dialog when a ValueNode is converted. The first %s is what is converted, the 2nd is the local name of the ValueNode's type. +#: src/synfigapp/actions/valuedescconvert.cpp:82 +#, c-format +msgid "Convert '%s' to ValueNode type '%s'" +msgstr "" + +#: src/synfigapp/actions/valuedescconvert.cpp:98 +msgid "The type of ValueNode that you want to be converted to" +msgstr "" + +#: src/synfigapp/actions/valuedescconvert.cpp:166 +msgid "Unable to decipher ValueDesc (Bug?)" +msgstr "" + +#: src/synfigapp/actions/valuedescconvert.cpp:171 +msgid "Unable to create new value node" +msgstr "" + +#: src/synfigapp/actions/valuedescdisconnect.cpp:57 +msgid "Disconnect" +msgstr "Отсоединить" + +#. TRANSLATORS: This is used in the History dialog when a ValueNode is disconnected. +#: src/synfigapp/actions/valuedescdisconnect.cpp:79 +#, c-format +msgid "Disconnect %s" +msgstr "Отсоединение %s" + +#: src/synfigapp/actions/valuedescexport.cpp:56 +msgid "Export" +msgstr "Экспортировать" + +#. TRANSLATORS: This is used in the 'history' dialog when a ValueNode is exported. The first %s is what is exported, the 2nd is the name it is given. +#: src/synfigapp/actions/valuedescexport.cpp:77 +#, c-format +msgid "Export '%s' as '%s'" +msgstr "Экспорт '%s' как '%s'" + +#: src/synfigapp/actions/valuedescexport.cpp:93 +msgid "The name that you want this value to be exported as" +msgstr "" + +#: src/synfigapp/actions/valuedescexport.cpp:152 +msgid "Can only export Canvas when used as constant parameter" +msgstr "" + +#: src/synfigapp/actions/valuedescexport.cpp:174 +msgid "ValueBase is already exported" +msgstr "" + +#: src/synfigapp/actions/valuedescexport.cpp:182 +msgid "Unable to export parameter. (Bug?)" +msgstr "" + +#: src/synfigapp/actions/valuedesclink.cpp:52 +msgid "Link" +msgstr "" + +#: src/synfigapp/actions/valuedesclink.cpp:112 +msgid "Cannot link two different exported values ('" +msgstr "" + +#: src/synfigapp/actions/valuedesclink.cpp:113 +msgid "' and '" +msgstr "" + +#: src/synfigapp/actions/valuedesclink.cpp:114 +msgid "')" +msgstr "" + +#: src/synfigapp/actions/valuedesclink.cpp:119 +msgid "Used exported ValueNode ('" +msgstr "" + +#: src/synfigapp/actions/valuedesclink.cpp:119 +msgid "')." +msgstr "" + +#: src/synfigapp/actions/valuedesclink.cpp:126 +msgid "Using the only available ValueNode." +msgstr "" + +#: src/synfigapp/actions/valuedesclink.cpp:139 +#: src/synfigapp/actions/valuedesclink.cpp:145 +msgid "Using the most referenced ValueNode." +msgstr "" + +#: src/synfigapp/actions/valuedesclink.cpp:153 +#: src/synfigapp/actions/valuedesclink.cpp:161 +msgid "There's a tie for most referenced; using the animated ValueNode." +msgstr "" + +#: src/synfigapp/actions/valuedesclink.cpp:174 +#: src/synfigapp/actions/valuedesclink.cpp:180 +msgid "" +"There's a tie for most referenced, and both are animated; using the one with " +"the most waypoints." +msgstr "" + +#: src/synfigapp/actions/valuedesclink.cpp:189 +#: src/synfigapp/actions/valuedesclink.cpp:195 +msgid "Everything is tied; using the least recently modified value." +msgstr "" + +#: src/synfigapp/actions/valuedesclink.cpp:201 +msgid "Absolutely everything is tied." +msgstr "" + +#: src/synfigapp/actions/valuedesclink.cpp:209 +#, c-format +msgid "Cannot link two values of different types ('%s' and '%s')" +msgstr "" + +#: src/synfigapp/actions/valuedesclink.cpp:246 +msgid "No ValueNodes were available, so one was created." +msgstr "" + +#: src/synfigapp/actions/valuedescset.cpp:59 +msgid "Set ValueDesc" +msgstr "" + +#: src/synfigapp/actions/valuedescset.cpp:80 +#, c-format +msgid "Set %s" +msgstr "" + +#: src/synfigapp/actions/valuedescset.cpp:180 +#: src/synfigapp/actions/valuedescset.cpp:205 +#: src/synfigapp/actions/valuedescset.cpp:273 +#: src/synfigapp/actions/valuedescset.cpp:331 +#: src/synfigapp/actions/valuedescset.cpp:368 +#: src/synfigapp/actions/valuedescset.cpp:393 +#: src/synfigapp/actions/valuedescset.cpp:411 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:184 +msgid "Unable to find action value_desc_set (bug)" +msgstr "" + +#: src/synfigapp/actions/valuedescset.cpp:262 +#, c-format +msgid "Bad type for composite (%s)" +msgstr "" + +#: src/synfigapp/actions/valuedescset.cpp:321 +#, c-format +msgid "Bad type for radial composite (%s)" +msgstr "" + +#: src/synfigapp/actions/valuedescset.cpp:497 +#: src/synfigapp/actions/valuedescset.cpp:544 +msgid "Direct manipulation of this ValueNode type is not yet supported" +msgstr "" + +#: src/synfigapp/actions/valuedescset.cpp:542 +msgid "You must be in Animate-Editing-Mode to directly manipulate this value" +msgstr "" + +#: src/synfigapp/actions/valuedescset.cpp:564 +msgid "Unsupported ValueDesc type" +msgstr "" + +#: src/synfigapp/actions/valuenodeadd.cpp:49 +msgid "Add ValueNode" +msgstr "" + +#: src/synfigapp/actions/valuenodeadd.cpp:72 +msgid "New ValueNode" +msgstr "" + +#: src/synfigapp/actions/valuenodeadd.cpp:73 +msgid "ValueNode to be added" +msgstr "" + +#: src/synfigapp/actions/valuenodeadd.cpp:122 +msgid "Parameter appears to already be exported" +msgstr "" + +#: src/synfigapp/actions/valuenodeadd.cpp:131 +msgid "Another exported ValueBase with this name already exists" +msgstr "" + +#: src/synfigapp/actions/valuenodeadd.cpp:135 +msgid "Exception caught on Add ValueNode." +msgstr "" + +#: src/synfigapp/actions/valuenodeadd.cpp:154 +msgid "Exception caught on Remove ValueNode." +msgstr "" + +#: src/synfigapp/actions/valuenodeconstset.cpp:49 +msgid "Set ValueNode_Const" +msgstr "" + +#: src/synfigapp/actions/valuenodeconstset.cpp:73 +#: src/synfigapp/actions/valuenoderename.cpp:82 +msgid "ValueNode_Const" +msgstr "" + +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:50 +msgid "Insert Item" +msgstr "" + +#: src/synfigapp/actions/valuenodedynamiclistinsert.cpp:88 +msgid "ValueNode to insert" +msgstr "" + +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:51 +msgid "Insert Item (Smart)" +msgstr "" + +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:205 +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:259 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:159 +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:177 +msgid "Unable to find action (bug)" +msgstr "" + +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:221 +msgid "Unable to find action \"activepoint_set_off\"" +msgstr "" + +#: src/synfigapp/actions/valuenodedynamiclistinsertsmart.cpp:240 +msgid "Unable to find action \"activepoint_set_on\"" +msgstr "" + +#: src/synfigapp/actions/valuenodedynamiclistloop.cpp:50 +msgid "Loop" +msgstr "" + +#: src/synfigapp/actions/valuenodedynamiclistremove.cpp:50 +msgid "Remove Item" +msgstr "" + +#: src/synfigapp/actions/valuenodedynamiclistremovesmart.cpp:51 +msgid "Remove Item (Smart)" +msgstr "" + +#: src/synfigapp/actions/valuenodedynamiclistrotateorder.cpp:50 +msgid "Rotate Order" +msgstr "" + +#: src/synfigapp/actions/valuenodedynamiclistunloop.cpp:50 +msgid "Unloop" +msgstr "" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:49 +msgid "Connect ValueNode Link" +msgstr "" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:73 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:75 +msgid "Parent ValueNode" +msgstr "" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:77 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:79 +msgid "Index" +msgstr "" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:81 +msgid "ValueNode to be connected" +msgstr "" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:132 +#: src/synfigapp/actions/valuenodelinkconnect.cpp:151 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:135 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:159 +#, c-format +msgid "Bad index, too big. LinkCount=%d, Index=%d" +msgstr "" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:137 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:140 +msgid "Parent would not accept link" +msgstr "" + +#: src/synfigapp/actions/valuenodelinkconnect.cpp:154 +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:162 +msgid "Parent would not accept old link" +msgstr "" + +#: src/synfigapp/actions/valuenodelinkdisconnect.cpp:50 +msgid "Disconnect ValueNode Link" +msgstr "" + +#: src/synfigapp/actions/valuenoderemove.cpp:50 +msgid "Unexport" +msgstr "" + +#. TRANSLATORS: This is used in the 'history' dialog when a ValueNode is unexported. +#: src/synfigapp/actions/valuenoderemove.cpp:71 +#, c-format +msgid "Unexport '%s'" +msgstr "" + +#: src/synfigapp/actions/valuenoderename.cpp:50 +msgid "Rename ValueNode" +msgstr "" + +#. TRANSLATORS: This is used in the 'history' dialog when a ValueNode is renamed. +#: src/synfigapp/actions/valuenoderename.cpp:71 +#, c-format +msgid "Rename ValueNode from '%s' to '%s'" +msgstr "" + +#: src/synfigapp/actions/valuenoderename.cpp:87 +msgid "The new name of the ValueNode" +msgstr "" + +#: src/synfigapp/actions/valuenoderename.cpp:151 +msgid "A ValueNode with this ID already exists in this canvas" +msgstr "" + +#: src/synfigapp/actions/valuenoderename.cpp:169 +msgid "A ValueNode with the old ID already exists in this canvas (BUG)" +msgstr "" + +#: src/synfigapp/actions/valuenodereplace.cpp:49 +msgid "Replace ValueNode" +msgstr "" + +#: src/synfigapp/actions/valuenodereplace.cpp:85 +msgid "Destination ValueNode" +msgstr "" + +#: src/synfigapp/actions/valuenodereplace.cpp:86 +msgid "ValueNode to replaced" +msgstr "" + +#: src/synfigapp/actions/valuenodereplace.cpp:91 +msgid "ValueNode that will replace the destination" +msgstr "" + +#: src/synfigapp/actions/valuenodereplace.cpp:137 +#: src/synfigapp/actions/valuenodereplace.cpp:193 +msgid "Attempted to replace valuenode with itself" +msgstr "Была произведена попытка заменить valuenode на саму себя" + +#: src/synfigapp/actions/valuenodereplace.cpp:140 +#: src/synfigapp/actions/valuenodereplace.cpp:196 +msgid "You cannot replace ValueNodes with different types!" +msgstr "" + +#: src/synfigapp/actions/valuenodereplace.cpp:163 +#: src/synfigapp/actions/valuenodereplace.cpp:201 +msgid "Nothing to replace." +msgstr "" + +#: src/synfigapp/actions/valuenodereplace.cpp:170 +#: src/synfigapp/actions/valuenodereplace.cpp:208 +msgid "Action Failure. This is a bug. Please report it." +msgstr "" + +#: src/synfigapp/actions/valuenodereplace.cpp:188 +msgid "This action cannot be undone under these circumstances." +msgstr "" + +#: src/synfigapp/actions/valuenodereplace.cpp:213 +msgid ": (Undo) " +msgstr "" + +#: src/synfigapp/actions/waypointadd.cpp:51 +#: src/synfigapp/actions/waypointsetsmart.cpp:59 +msgid "Add Waypoint" +msgstr "" + +#: src/synfigapp/actions/waypointadd.cpp:81 +#: src/synfigapp/actions/waypointsetsmart.cpp:89 +msgid "New Waypoint" +msgstr "" + +#: src/synfigapp/actions/waypointadd.cpp:82 +#: src/synfigapp/actions/waypointsetsmart.cpp:90 +#: src/synfigapp/actions/waypointsimpleadd.cpp:79 +msgid "Waypoint to be added" +msgstr "" + +#: src/synfigapp/actions/waypointadd.cpp:88 +#: src/synfigapp/actions/waypointsetsmart.cpp:101 +msgid "Time where waypoint is to be added" +msgstr "" + +#: src/synfigapp/actions/waypointadd.cpp:185 +#, c-format +msgid "A Waypoint already exists at this point in time (%s)" +msgstr "" + +#: src/synfigapp/actions/waypointadd.cpp:188 +#: src/synfigapp/actions/waypointremove.cpp:198 +msgid "This waypoint is already in the ValueNode" +msgstr "" + +#: src/synfigapp/actions/waypointremove.cpp:49 +msgid "Remove Waypoint" +msgstr "" + +#: src/synfigapp/actions/waypointremove.cpp:74 +msgid "ValueNode (Animated)" +msgstr "" + +#: src/synfigapp/actions/waypointremove.cpp:79 +msgid "Waypoint to be Removed" +msgstr "" + +#: src/synfigapp/actions/waypointremove.cpp:124 +#, c-format +msgid "UniqueID mismatch, iter=%d, waypoint=%d" +msgstr "" + +#: src/synfigapp/actions/waypointremove.cpp:127 +#, c-format +msgid "Time mismatch iter=%s, waypoint=%s" +msgstr "" + +#: src/synfigapp/actions/waypointremove.cpp:141 +msgid "Unable to create ValueNode_Reference" +msgstr "" + +#: src/synfigapp/actions/waypointremove.cpp:172 +msgid "" +"This animated value node should be empty, but for some reason it isn't. This " +"is a bug. (1)" +msgstr "" + +#: src/synfigapp/actions/waypointremove.cpp:190 +msgid "" +"This animated value node should be empty, but for some reason it isn't. This " +"is a bug. (2)" +msgstr "" + +#: src/synfigapp/actions/waypointremove.cpp:195 +msgid "A Waypoint already exists at this point in time" +msgstr "" + +#: src/synfigapp/actions/waypointset.cpp:49 +msgid "Set Waypoint" +msgstr "" + +#: src/synfigapp/actions/waypointset.cpp:78 +msgid "Waypoint to be changed" +msgstr "" + +#: src/synfigapp/actions/waypointset.cpp:133 +#: src/synfigapp/actions/waypointset.cpp:191 +#: src/synfigapp/actions/waypointset.cpp:235 +#: src/synfigapp/actions/waypointset.cpp:256 +msgid "Unable to find waypoint" +msgstr "" + +#: src/synfigapp/actions/waypointsimpleadd.cpp:146 +msgid "The waypoint to remove no longer exists" +msgstr "" + +#: src/synfigapp/action_system.cpp:77 +msgid "Action is not ready." +msgstr "" + +#: src/synfigapp/action_system.cpp:109 +msgid "This action cannot be undone! Are you sure you want to continue?" +msgstr "" + +#: src/synfigapp/action_system.cpp:128 src/synfigapp/action_system.cpp:145 +#: src/synfigapp/action_system.cpp:156 +msgid "Failed" +msgstr "" + +#: src/synfigapp/action_system.cpp:189 +msgid "Successful" +msgstr "" + +#: src/synfigapp/action_system.cpp:222 src/synfigapp/action_system.cpp:224 +msgid " (Undo): " +msgstr "" + +#: src/synfigapp/action_system.cpp:284 +msgid "Failed to undo." +msgstr "" + +#: src/synfigapp/action_system.cpp:320 src/synfigapp/action_system.cpp:322 +msgid " (Redo): " +msgstr "" + +#: src/synfigapp/action_system.cpp:382 +msgid "Failed to redo." +msgstr "" + +#: src/synfigapp/action_system.cpp:698 +msgid "State restore failure" +msgstr "" + +#: src/synfigapp/canvasinterface.cpp:160 +msgid "Action Not Ready, unable to change mode" +msgstr "" + +#: src/synfigapp/canvasinterface.cpp:166 +msgid "Unable to change mode" +msgstr "" + +#: src/synfigapp/canvasinterface.cpp:183 +msgid "Add Layer To" +msgstr "" + +#: src/synfigapp/canvasinterface.cpp:288 src/synfigapp/canvasinterface.cpp:349 +#: src/synfigapp/canvasinterface.cpp:382 +msgid "Action Not Ready" +msgstr "" + +#: src/synfigapp/canvasinterface.cpp:294 src/synfigapp/canvasinterface.cpp:356 +#: src/synfigapp/canvasinterface.cpp:389 src/synfigapp/canvasinterface.cpp:477 +#: src/synfigapp/canvasinterface.cpp:494 src/synfigapp/canvasinterface.cpp:513 +#: src/synfigapp/canvasinterface.cpp:530 src/synfigapp/canvasinterface.cpp:707 +#: src/synfigapp/canvasinterface.cpp:732 src/synfigapp/canvasinterface.cpp:785 +msgid "Action Failed." +msgstr "" + +#: src/synfigapp/canvasinterface.cpp:316 +msgid "Move Action Not Ready" +msgstr "" + +#: src/synfigapp/canvasinterface.cpp:322 +msgid "Move Action Failed." +msgstr "" + +#: src/synfigapp/canvasinterface.cpp:365 +msgid "Empty name!" +msgstr "" + +#: src/synfigapp/canvasinterface.cpp:571 +msgid "Filename must have an extension!" +msgstr "" + +#: src/synfigapp/canvasinterface.cpp:584 +msgid "Unable to open this composition" +msgstr "" + +#: src/synfigapp/canvasinterface.cpp:588 +msgid "Unable to create \"Paste Canvas\" layer" +msgstr "" + +#: src/synfigapp/canvasinterface.cpp:604 +msgid "" +"Uncaught exception when attempting\n" +"to open this composition -- " +msgstr "" + +#: src/synfigapp/canvasinterface.cpp:610 +msgid "I don't know how to open images of this type -- " +msgstr "" + +#: src/synfigapp/canvasinterface.cpp:777 +#, c-format +msgid "Unnamed%08d" +msgstr "" + +#: src/synfigapp/canvasinterface.cpp:808 +msgid "" +"The value you are trying to edit is in a composition\n" +"which doesn't seem to be open. Open that composition and you\n" +"should be able to edit this value as normal." +msgstr "" + +#: src/synfigapp/uimanager.cpp:56 src/synfigapp/uimanager.cpp:83 +msgid "(no/yes)" +msgstr "" + +#: src/synfigapp/uimanager.cpp:58 src/synfigapp/uimanager.cpp:85 +msgid "(yes/no)" +msgstr "" + +#: src/synfigapp/uimanager.cpp:110 +msgid "(cancel/ok)" +msgstr "" + +#: src/synfigapp/uimanager.cpp:112 +msgid "(ok/cancel)" +msgstr "" + +#: src/synfigapp/uimanager.cpp:142 +msgid "error: " +msgstr "" + +#: src/synfigapp/uimanager.cpp:149 +msgid "warning: " +msgstr "" + +#: src/synfigapp/value_desc.cpp:60 +msgid "Layer Parameter" +msgstr "" + +#: src/synfigapp/value_desc.cpp:77 +msgid "Const ValueNode" +msgstr "" + +#: src/synfigapp/value_desc.cpp:89 +msgid "Exported ValueNode" +msgstr "" diff --git a/synfig-studio/src/Makefile.am b/synfig-studio/src/Makefile.am new file mode 100644 index 0000000..adc00c2 --- /dev/null +++ b/synfig-studio/src/Makefile.am @@ -0,0 +1,11 @@ +# $Id$ + +MAINTAINERCLEANFILES = Makefile.in + +EXTRA_DIST = \ + template.cpp \ + template.h + +SUBDIRS = \ + synfigapp \ + gtkmm diff --git a/synfig-studio/src/gtkmm/Makefile.am b/synfig-studio/src/gtkmm/Makefile.am new file mode 100644 index 0000000..c5cc73d --- /dev/null +++ b/synfig-studio/src/gtkmm/Makefile.am @@ -0,0 +1,385 @@ +# $Id$ + +EXTRA_DIST = \ + compview.cpp + +MAINTAINERCLEANFILES = \ + Makefile.in + + +CELLRENDERER_HH = \ + cellrenderer_gradient.h \ + cellrenderer_time.h \ + cellrenderer_timetrack.h \ + cellrenderer_value.h + +CELLRENDERER_CC = \ + cellrenderer_gradient.cpp \ + cellrenderer_time.cpp \ + cellrenderer_timetrack.cpp \ + cellrenderer_value.cpp + + +WORKAREARENDERER_HH = \ + renderer_bbox.h \ + renderer_canvas.h \ + renderer_dragbox.h \ + renderer_ducks.h \ + renderer_grid.h \ + renderer_guides.h \ + renderer_timecode.h \ + workarearenderer.h + +WORKAREARENDERER_CC = \ + renderer_bbox.cpp \ + renderer_canvas.cpp \ + renderer_dragbox.cpp \ + renderer_ducks.cpp \ + renderer_grid.cpp \ + renderer_guides.cpp \ + renderer_timecode.cpp \ + workarearenderer.cpp + + +PALETTE_HH = \ + mod_palette/dock_palbrowse.h \ + mod_palette/dock_paledit.h \ + mod_palette/mod_palette.h + +PALETTE_CC = \ + mod_palette/dock_palbrowse.cpp \ + mod_palette/dock_paledit.cpp \ + mod_palette/mod_palette.cpp + + +MOD_MIRROR_HH = \ + mod_mirror/mod_mirror.h \ + mod_mirror/state_mirror.h + +MOD_MIRROR_CC = \ + mod_mirror/mod_mirror.cpp \ + mod_mirror/state_mirror.cpp + + +DIALOG_HH = \ + dialog_color.h \ + dialog_gradient.h \ + dialog_keyframe.h \ + dialog_preview.h \ + dialog_setup.h \ + dialog_soundselect.h \ + dialog_waypoint.h + +DIALOG_CC = \ + dialog_color.cpp \ + dialog_gradient.cpp \ + dialog_keyframe.cpp \ + dialog_preview.cpp \ + dialog_setup.cpp \ + dialog_soundselect.cpp \ + dialog_waypoint.cpp + + +DOCK_HH = \ + dialog_tooloptions.h \ + dock_canvases.h \ + dock_canvasspecific.h \ + dock_children.h \ + dock_curves.h \ + dock_history.h \ + dock_info.h \ + dock_keyframes.h \ + dock_layergroups.h \ + dock_layers.h \ + dock_metadata.h \ + dock_navigator.h \ + dock_params.h \ + dock_timetrack.h \ + dockable.h \ + dockbook.h \ + dockdialog.h \ + dockmanager.h + +DOCK_CC = \ + dialog_tooloptions.cpp \ + dock_canvases.cpp \ + dock_canvasspecific.cpp \ + dock_children.cpp \ + dock_curves.cpp \ + dock_history.cpp \ + dock_info.cpp \ + dock_keyframes.cpp \ + dock_layergroups.cpp \ + dock_layers.cpp \ + dock_metadata.cpp \ + dock_navigator.cpp \ + dock_params.cpp \ + dock_timetrack.cpp \ + dockable.cpp \ + dockbook.cpp \ + dockdialog.cpp \ + dockmanager.cpp + + +WIDGET_HH = \ + widget_canvaschooser.h \ + widget_color.h \ + widget_coloredit.h \ + widget_compselect.h \ + widget_curves.h \ + widget_defaults.h \ + widget_distance.h \ + widget_enum.h \ + widget_filename.h \ + widget_gradient.h \ + widget_sound.h \ + widget_time.h \ + widget_timeslider.h \ + widget_value.h \ + widget_vector.h \ + widget_waypoint.h \ + widget_waypointmodel.h \ + widget_keyframe_list.h + +WIDGET_CC = \ + widget_canvaschooser.cpp \ + widget_color.cpp \ + widget_coloredit.cpp \ + widget_compselect.cpp \ + widget_curves.cpp \ + widget_defaults.cpp \ + widget_distance.cpp \ + widget_enum.cpp \ + widget_filename.cpp \ + widget_gradient.cpp \ + widget_sound.cpp \ + widget_time.cpp \ + widget_timeslider.cpp \ + widget_value.cpp \ + widget_vector.cpp \ + widget_waypoint.cpp \ + widget_waypointmodel.cpp \ + widget_keyframe_list.cpp + + +STATE_HH = \ + state_bline.h \ + state_circle.h \ + state_draw.h \ + state_eyedrop.h \ + state_fill.h \ + state_gradient.h \ + state_normal.h \ + state_polygon.h \ + state_rectangle.h \ + state_rotate.h \ + state_scale.h \ + state_sketch.h \ + state_smoothmove.h \ + state_star.h \ + state_stroke.h \ + state_text.h \ + state_width.h \ + state_zoom.h + +STATE_CC = \ + state_bline.cpp \ + state_circle.cpp \ + state_draw.cpp \ + state_eyedrop.cpp \ + state_fill.cpp \ + state_gradient.cpp \ + state_normal.cpp \ + state_polygon.cpp \ + state_rectangle.cpp \ + state_rotate.cpp \ + state_scale.cpp \ + state_sketch.cpp \ + state_smoothmove.cpp \ + state_star.cpp \ + state_stroke.cpp \ + state_text.cpp \ + state_width.cpp \ + state_zoom.cpp + + +TREEVIEW_HH = \ + childrentree.h \ + keyframetree.h \ + layergrouptree.h \ + layertree.h + +TREEVIEW_CC = \ + childrentree.cpp \ + keyframetree.cpp \ + layergrouptree.cpp \ + layertree.cpp + + +TREESTORE_HH = \ + canvastreestore.h \ + childrentreestore.h \ + historytreestore.h \ + keyframetreestore.h \ + layergrouptreestore.h \ + layerparamtreestore.h \ + layertreestore.h \ + metadatatreestore.h + +TREESTORE_CC = \ + canvastreestore.cpp \ + childrentreestore.cpp \ + historytreestore.cpp \ + keyframetreestore.cpp \ + layergrouptreestore.cpp \ + layerparamtreestore.cpp \ + layertreestore.cpp \ + metadatatreestore.cpp + + +DUCKTRANSFORM_HH = \ + ducktransform_rotate.h \ + ducktransform_scale.h \ + ducktransform_translate.h \ + duck.h + +DUCKTRANSFORM_CC = \ + duck.cpp + + +EVENTS_HH = \ + event_layerclick.h \ + event_mouse.h + + +ACTION_MANAGERS_HH = \ + groupactionmanager.h \ + keyframeactionmanager.h \ + layeractionmanager.h + +ACTION_MANAGERS_CC = \ + groupactionmanager.cpp \ + keyframeactionmanager.cpp \ + layeractionmanager.cpp + + +OTHER_HH = \ + compview.h \ + eventkey.h \ + smach.h \ + about.h \ + adjust_window.h \ + app.h \ + asyncrenderer.h \ + audiocontainer.h \ + autorecover.h \ + canvasoptions.h \ + canvasproperties.h \ + canvasview.h \ + devicetracker.h \ + dialogsettings.h \ + duckmatic.h \ + general.h \ + iconcontroller.h \ + instance.h \ + ipc.h \ + keymapsettings.h \ + module.h \ + onemoment.h \ + preview.h \ + renddesc.h \ + render.h \ + splash.h \ + statemanager.h \ + toolbox.h \ + valuelink.h \ + workarea.h \ + zoomdial.h \ + framedial.h \ + keyframedial.h \ + toggleducksdial.h \ + resolutiondial.h + +OTHER_CC = \ + main.cpp \ + about.cpp \ + adjust_window.cpp \ + app.cpp \ + asyncrenderer.cpp \ + audiocontainer.cpp \ + autorecover.cpp \ + canvasoptions.cpp \ + canvasproperties.cpp \ + canvasview.cpp \ + devicetracker.cpp \ + dialogsettings.cpp \ + duckmatic.cpp \ + iconcontroller.cpp \ + instance.cpp \ + ipc.cpp \ + keymapsettings.cpp \ + module.cpp \ + onemoment.cpp \ + preview.cpp \ + renddesc.cpp \ + render.cpp \ + splash.cpp \ + statemanager.cpp \ + toolbox.cpp \ + valuelink.cpp \ + workarea.cpp \ + zoomdial.cpp \ + framedial.cpp \ + keyframedial.cpp \ + toggleducksdial.cpp \ + resolutiondial.cpp + +INCLUDES = \ + -I$(top_srcdir)/src + +bin_PROGRAMS = synfigstudio + +synfigstudio_SOURCES = \ + $(MOD_MIRROR_CC) \ + $(MOD_MIRROR_HH) \ + $(PALETTE_CC) \ + $(PALETTE_HH) \ + $(WORKAREARENDERER_CC) \ + $(WORKAREARENDERER_HH) \ + $(ACTION_MANAGERS_HH) \ + $(ACTION_MANAGERS_CC) \ + $(DOCK_HH) \ + $(DOCK_CC) \ + $(OTHER_HH) \ + $(OTHER_CC) \ + $(EVENTS_HH) \ + $(DUCKTRANSFORM_HH) \ + $(DUCKTRANSFORM_CC) \ + $(TREEVIEW_HH) \ + $(TREEVIEW_CC) \ + $(TREESTORE_HH) \ + $(TREESTORE_CC) \ + $(STATE_CC) \ + $(STATE_HH) \ + $(WIDGET_CC) \ + $(WIDGET_HH) \ + $(CELLRENDERER_HH) \ + $(CELLRENDERER_CC) \ + $(DIALOG_HH) \ + $(DIALOG_CC) + +synfigstudio_LDADD = \ + ../synfigapp/libsynfigapp.la \ + @SYNFIG_LIBS@ \ + @GTKMM_LIBS@ \ + @FMOD_LIBS@ + +synfigstudio_LDFLAGS = \ + -dlopen self + +synfigstudio_CXXFLAGS = \ + @SYNFIG_CFLAGS@ \ + @GTKMM_CFLAGS@ \ + -DIMAGE_DIR=\"$(imagedir)\" \ + -DIMAGE_EXT=\"$(imageext)\" \ + "-DLOCALEDIR=\"$(localedir)\"" diff --git a/synfig-studio/src/gtkmm/about.cpp b/synfig-studio/src/gtkmm/about.cpp new file mode 100644 index 0000000..3afcc74 --- /dev/null +++ b/synfig-studio/src/gtkmm/about.cpp @@ -0,0 +1,240 @@ +/* === S Y N F I G ========================================================= */ +/*! \file about.cpp +** \brief About dialog implementation +** +** $Id$ +** +** \legal +** Copyright (c) 2008 Paul Wise +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include + +#include + +#include + +#include + +// This is generated at make time from .svn or .git/svn or autorevision.conf +#include + +#include "about.h" +#include "app.h" + +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace studio; + +/* === M A C R O S ========================================================= */ + +#ifndef VERSION +#define VERSION "unknown" +#define PACKAGE "synfigstudio" +#endif + +#ifdef WIN32 +# ifdef IMAGE_DIR +# undef IMAGE_DIR +# define IMAGE_DIR "share\\pixmaps" +# endif +#endif + +#ifndef IMAGE_DIR +# define IMAGE_DIR "/usr/local/share/pixmaps" +#endif + +#ifndef IMAGE_EXT +# define IMAGE_EXT "png" +#endif + +#define stringify_(x) #x +#define stringify(x) stringify_(x) + +/* === G L O B A L S ======================================================= */ + +extern const guint gtk_major_version; +extern const guint gtk_minor_version; +extern const guint gtk_micro_version; +extern const guint gtk_binary_age; +extern const guint gtk_interface_age; + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +About::About() +{ + +#ifdef HAVE_GTK_ABOUTDIALOG_SET_PROGRAM_NAME + set_program_name(PACKAGE_NAME); +#else + set_name(PACKAGE_NAME); +#endif + set_version(VERSION); + set_comments(_("2D vector animation studio")); + + set_url_hook(sigc::mem_fun(*this, &About::on_link_clicked)); + set_website("http://www.synfig.org/"); + set_website_label(_("Visit the Synfig website")); + + set_copyright(_("Copyright 2001-2008\nRobert B. Quattlebaum Jr.,\nAdrian Bentley and Synfig contributors")); + Glib::ustring license = + "This program is free software; you can redistribute it and/or modify " + "it under the terms of the GNU General Public License as published by " + "the Free Software Foundation; either version 2 of the License, or " + "(at your option) any later version.\n\n" + + "This program is distributed in the hope that it will be useful, " + "but WITHOUT ANY WARRANTY; without even the implied warranty of " + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the " + "GNU General Public License for more details.\n\n" + + "You should have received a copy of the GNU General Public License along " + "with this program; if not, write to the Free Software Foundation, Inc., " + "51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or visit: http://www.gnu.org/"; + set_license(license); +#ifdef HAVE_GTK_ABOUTDIALOG_SET_WRAP_LICENSE + set_wrap_license(true); +#endif + + std::vector authors; + authors.push_back("Original developers:"); + authors.push_back(""); + authors.push_back("Robert B. Quattlebaum Jr (darco)"); + authors.push_back("Adrian Bentley"); + authors.push_back(""); + authors.push_back("Contributors:"); + authors.push_back(""); + authors.push_back("Adrian Winchell (SnapSilverlight)"); + authors.push_back("Andreas Jochens"); + authors.push_back("Carlos López González (genete)"); + authors.push_back("Chris Moore (dooglus)"); + authors.push_back("Chris Norman (pixelgeek)"); + authors.push_back("Daniel Fort"); + authors.push_back("Daniel Hornung (rubikcube)"); + authors.push_back("David Roden (Bombe)"); + authors.push_back("Dmitriy Pomerantsev (Atrus)"); + authors.push_back("Douglas Lau"); + authors.push_back("Gerald Young (Yoyobuae)"); + authors.push_back("Gerco Ballintijn"); + authors.push_back("IL'dar AKHmetgaleev (AkhIL)"); + authors.push_back("Luka Pravica"); + authors.push_back("Martin Michlmayr (tbm)"); + authors.push_back("Miguel Gea Milvaques (xerakko)"); + authors.push_back("Paul Wise (pabs)"); + authors.push_back("Ralf Corsepius"); + authors.push_back("Yue Shi Lai"); + set_authors(authors); + + std::vector artists; + artists.push_back("Robert B. Quattlebaum Jr. (darco)"); + artists.push_back("Aurore D (rore)"); + artists.push_back("Carlos López González (genete)"); + artists.push_back("Chris Norman (pixelgeek)"); + artists.push_back("Daniel Hornung (rubikcube)"); + artists.push_back("Franco Iacomella (Yaco)"); + + set_artists(artists); + + // TRANSLATORS: change this to your name, separate multiple names with \n + set_translator_credits(_("translator-credits")); + + std::string imagepath; +#ifdef WIN32 + imagepath=App::get_base_path()+ETL_DIRECTORY_SEPARATOR+IMAGE_DIR; +#else + imagepath=IMAGE_DIR; +#endif + char* synfig_root=getenv("SYNFIG_ROOT"); + if(synfig_root) { + imagepath=synfig_root; + imagepath+=ETL_DIRECTORY_SEPARATOR; + imagepath+="share"; + imagepath+=ETL_DIRECTORY_SEPARATOR; + imagepath+="pixmaps"; + } + imagepath+=ETL_DIRECTORY_SEPARATOR; + + Gtk::Image *Logo = manage(new class Gtk::Image()); + Logo->set(imagepath+"synfig_icon."IMAGE_EXT); + set_logo(Logo->get_pixbuf()); + +#ifdef SHOW_EXTRA_INFO + + string extra_info = get_comments() + "\n"; + + #ifdef DEVEL_VERSION + extra_info += strprintf(_("\nDevelopment version:\n%s\n"),DEVEL_VERSION); + #endif + + extra_info += "\n"; + + extra_info += strprintf(_("Built on %s" /* at %s */ "\n"), __DATE__ /* , __TIME__ */ ); + + extra_info += "\n"; + + extra_info += strprintf(_("Built with:\n"), ETL_VERSION); + extra_info += strprintf(_("ETL %s\n"), ETL_VERSION); + extra_info += strprintf(_("Synfig API %s\n"), stringify(SYNFIG_VERSION)); + extra_info += strprintf(_("Synfig library %d\n"), SYNFIG_LIBRARY_VERSION); + extra_info += strprintf(_("GTK+ %d.%d.%d\n"), GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); + #ifdef __GNUC__ + extra_info += strprintf(_("GNU G++ %d.%d.%d\n"),__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__); + #endif + + extra_info += "\n"; + + extra_info += strprintf(_("Using:\n"), synfig::get_version()); + extra_info += strprintf(_("Synfig %s\n"), synfig::get_version()); + extra_info += strprintf(_("GTK+ %d.%d.%d"),gtk_major_version,gtk_minor_version,gtk_micro_version); + + #ifdef _DEBUG + extra_info += "\n\nDEBUG BUILD"; + #endif + + set_comments(extra_info); + +#endif + + // Hide the dialog when you click close + signal_response().connect(sigc::mem_fun(*this, &About::close)); +} + +void About::close(int){ + hide(); +} + +void About::on_link_clicked(Gtk::AboutDialog&, const Glib::ustring &url) +{ + App::open_url(url); +} diff --git a/synfig-studio/src/gtkmm/about.h b/synfig-studio/src/gtkmm/about.h new file mode 100644 index 0000000..f00a773 --- /dev/null +++ b/synfig-studio/src/gtkmm/about.h @@ -0,0 +1,55 @@ +/* === S Y N F I G ========================================================= */ +/*! \file about.h +** \brief About dialog class +** +** $Id$ +** +** \legal +** Copyright (c) 2008 Paul Wise +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_GTKMM_ABOUT_H +#define __SYNFIG_GTKMM_ABOUT_H + +/* === H E A D E R S ======================================================= */ + +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +# + +namespace studio { + +class About : public Gtk::AboutDialog +{ +public: + + About(); + void close(int); + void on_link_clicked(Gtk::AboutDialog&, const Glib::ustring &url); +}; + +}; // END of namespace studio + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-studio/src/gtkmm/adjust_window.cpp b/synfig-studio/src/gtkmm/adjust_window.cpp new file mode 100644 index 0000000..0b62737 --- /dev/null +++ b/synfig-studio/src/gtkmm/adjust_window.cpp @@ -0,0 +1,170 @@ +/* === S Y N F I G ========================================================= */ +/*! \file adjust_window.cpp +** \brief Adjustment Window Implementation File +** +** $Id$ +** +** \legal +** Copyright (c) 2004 Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "adjust_window.h" +#include "app.h" + +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +//using namespace etl; +//using namespace synfig; + +using studio::Adjust_Window; + +/* === M A C R O S ========================================================= */ +const double EPSILON = 1.0e-6; + +/* === G L O B A L S ======================================================= */ + +/* === P R O C E D U R E S ================================================= */ + +/* === M E T H O D S ======================================================= */ + +/* === E N T R Y P O I N T ================================================= */ + +Adjust_Window::Adjust_Window(double value, double lower, double upper, + double stepinc, double pageinc, double pagesize, + Gtk::Adjustment *adj) +: Adjustment(value,lower,upper,stepinc,pageinc,pagesize), + adj_child(0) +{ + if(adj) set_child_adjustment(adj); +} + +Adjust_Window::~Adjust_Window() +{ + //connections should automatically be killed etc. +} + +//child interface functions +Gtk::Adjustment *Adjust_Window::get_child_adjustment() +{ + return adj_child; +} + +const Gtk::Adjustment *Adjust_Window::get_child_adjustment() const +{ + return adj_child; +} + +void Adjust_Window::set_child_adjustment(Gtk::Adjustment *child) +{ + childchanged.disconnect(); + + adj_child = child; + + // synfig::info("Adjust: connecting to child signals"); + + if(child) + { + childchanged = child->signal_changed().connect(sigc::mem_fun(*this,&Adjust_Window::update_fromchild)); + + update_child(); + } +} + +void Adjust_Window::on_changed() +{ + update_child(); +} + +void Adjust_Window::on_value_changed() +{ + update_child(); +} + +//SUB TIME FUNCTIONS +double Adjust_Window::get_sub_lower() const +{ + return get_value(); +} + +double Adjust_Window::get_sub_upper() const +{ + return get_value() + get_page_size(); +} + +//---- REFRESH FUNCTIONS ----- +void Adjust_Window::update_child() +{ + if(adj_child) + { + bool childchanged = false; + + double v = get_value(); + double ve = v + get_page_size(); + + //reset child's values if they need to be... + if(abs(v - adj_child->get_lower()) > EPSILON) + { + adj_child->set_lower(v); + childchanged = true; + } + + if(abs(ve - adj_child->get_upper()) > EPSILON) + { + adj_child->set_upper(ve); + childchanged = true; + } + + if(childchanged) + { + adj_child->changed(); + } + } +} + +void Adjust_Window::update_fromchild() +{ + if(adj_child) + { + double b = adj_child->get_lower(); + double dist = adj_child->get_upper() - b; + + //reset our values if they need to be... + if(abs(get_value() - b) > EPSILON) + { + set_value(b); + value_changed(); + } + + if(abs(get_page_size() - dist) > EPSILON) + { + set_page_size(dist); + changed(); + } + } +} diff --git a/synfig-studio/src/gtkmm/adjust_window.h b/synfig-studio/src/gtkmm/adjust_window.h new file mode 100644 index 0000000..d1b57c3 --- /dev/null +++ b/synfig-studio/src/gtkmm/adjust_window.h @@ -0,0 +1,94 @@ +/* === S Y N F I G ========================================================= */ +/*! \file adjust_window.h +** \brief Adjustment Window Header +** +** $Id$ +** +** \legal +** Copyright (c) 2004 Adrian Bentley +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SYNFIG_TEMPLATE_H +#define __SYNFIG_TEMPLATE_H + +/* === H E A D E R S ======================================================= */ +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace studio { + +/* Sets up an adjustment that controls/communicates with another adjustment + (could be expanded to multiple children) + + The current value and pagesize define the lower and upper bounds of the + child adjustment. + + NEED TO REPLACE FUNCTIONALITY IN: + refresh_rend_desc + refresh_time_window + on_time_changed - possibly.... + + time_zoom_in - possibly... + time_zoom_out - possibly... + + play - possibly... + + THINGS TO CHECK: + disp_audio's use of time_adjustment + children_tree's use of time_adjustment + layer_tree's use of time_adjustment +*/ +class Adjust_Window : public Gtk::Adjustment +{ + Gtk::Adjustment *adj_child; + + sigc::connection childchanged; //we only care about the non-value parts of the child + + virtual void on_changed(); //value+pagesize corresponds to child upper + virtual void on_value_changed(); //value corresponds to child lower + +protected: //update interface + virtual void update_child(); + virtual void update_fromchild(); + +public: //structors + Adjust_Window(double value, double lower, double upper, + double step_increment=1, double page_increment=10, double page_size=0, + Gtk::Adjustment *adj = 0); + + virtual ~Adjust_Window(); + +public: //child interface + Gtk::Adjustment *get_child_adjustment(); + const Gtk::Adjustment *get_child_adjustment() const; + void set_child_adjustment(Gtk::Adjustment *child); + +public: //Sub value interface + double get_sub_lower() const; + double get_sub_upper() const; +}; + +}; // END of namespace studio + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-studio/src/gtkmm/app.cpp b/synfig-studio/src/gtkmm/app.cpp new file mode 100644 index 0000000..24e2bcf --- /dev/null +++ b/synfig-studio/src/gtkmm/app.cpp @@ -0,0 +1,2599 @@ +/* === S Y N F I G ========================================================= */ +/*! \file app.cpp +** \brief writeme +** +** $Id$ +** +** \legal +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore +** Copyright (c) 2008 Gerald Young +** Copyright (c) 2008 Carlos López +** +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. +** +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** \endlegal +*/ +/* ========================================================================= */ + +/* === H E A D E R S ======================================================= */ + +#ifdef USING_PCH +# include "pch.h" +#else +#ifdef HAVE_CONFIG_H +# include +#endif + +#ifdef WIN32 +#define WINVER 0x0500 +#include +#endif + +#include +#include +#include +#include + +#ifdef HAVE_SYS_ERRNO_H +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include + +#include "app.h" +#include "about.h" +#include "splash.h" +#include "instance.h" +#include "canvasview.h" +#include "dialog_setup.h" +#include "dialog_gradient.h" +#include "dialog_color.h" +#include "toolbox.h" +#include "compview.h" +#include "onemoment.h" + +#include "dockmanager.h" + +#include "state_eyedrop.h" +#include "state_normal.h" +#include "state_draw.h" +#include "state_fill.h" +#include "state_bline.h" +#include "state_polygon.h" +#include "state_sketch.h" +#include "state_gradient.h" +#include "state_circle.h" +#include "state_rectangle.h" +#include "state_smoothmove.h" +#include "state_scale.h" +#include "state_star.h" +#include "state_text.h" +#include "state_width.h" +#include "state_rotate.h" +#include "state_zoom.h" + +#include "devicetracker.h" +#include "dialog_tooloptions.h" +#include "widget_enum.h" + +#include "autorecover.h" + +#include +#include "dock_history.h" +#include "dock_canvases.h" +#include "dock_keyframes.h" +#include "dock_layers.h" +#include "dock_params.h" +#include "dock_metadata.h" +#include "dock_children.h" +#include "dock_info.h" +#include "dock_navigator.h" +#include "dock_layergroups.h" +#include "dock_timetrack.h" +#include "dock_curves.h" + +#include "mod_palette/mod_palette.h" +#include "mod_mirror/mod_mirror.h" + +#include + +#include "ipc.h" + +#include "module.h" + +#include "statemanager.h" + +#ifdef WITH_FMOD +#include +#endif + +#include +#include +#include + +#include "general.h" + +#endif + +/* === U S I N G =========================================================== */ + +using namespace std; +using namespace etl; +using namespace synfig; +using namespace studio; + +/* === M A C R O S ========================================================= */ + +#ifndef SYNFIG_USER_APP_DIR +#ifdef __APPLE__ +#define SYNFIG_USER_APP_DIR "Library/Synfig" +#elif defined(_WIN32) +#define SYNFIG_USER_APP_DIR "Synfig" +#else +#define SYNFIG_USER_APP_DIR ".synfig" +#endif +#endif + +#ifndef DPM2DPI +#define DPM2DPI(x) (float(x)/39.3700787402f) +#define DPI2DPM(x) (float(x)*39.3700787402f) +#endif + +#ifdef WIN32 +# ifdef IMAGE_DIR +# undef IMAGE_DIR +# define IMAGE_DIR "share\\pixmaps" +# endif +#endif + +#ifndef IMAGE_DIR +# define IMAGE_DIR "/usr/local/share/pixmaps" +#endif + +#ifndef IMAGE_EXT +# define IMAGE_EXT "tif" +#endif + +#include + +/* === S I G N A L S ======================================================= */ + +static sigc::signal signal_present_all_; +sigc::signal& +App::signal_present_all() { return signal_present_all_; } + +static sigc::signal signal_recent_files_changed_; +sigc::signal& +App::signal_recent_files_changed() { return signal_recent_files_changed_; } + +static sigc::signal > signal_canvas_view_focus_; +sigc::signal >& +App::signal_canvas_view_focus() { return signal_canvas_view_focus_; } + +static sigc::signal > signal_instance_selected_; +sigc::signal >& +App::signal_instance_selected() { return signal_instance_selected_; } + +static sigc::signal > signal_instance_created_; +sigc::signal >& +App::signal_instance_created() { return signal_instance_created_; } + +static sigc::signal > signal_instance_deleted_; +sigc::signal >& +App::signal_instance_deleted() { return signal_instance_deleted_; } + +/* === G L O B A L S ======================================================= */ + +static std::list recent_files; +const std::list& App::get_recent_files() { return recent_files; } + +static std::list recent_files_window_size; + +int App::Busy::count; +bool App::shutdown_in_progress; + +synfig::Gamma App::gamma; + +Glib::RefPtr App::ui_manager_; + +synfig::Distance::System App::distance_system; + +studio::Dialog_Setup* App::dialog_setup; + +etl::handle< studio::ModPalette > mod_palette_; +//studio::Dialog_Palette* App::dialog_palette; + +std::list > App::instance_list; + +static etl::handle ui_interface_; +const etl::handle& App::get_ui_interface() { return ui_interface_; } + +etl::handle App::selected_instance; +etl::handle App::selected_canvas_view; + +studio::About *studio::App::about=NULL; + +studio::Toolbox *studio::App::toolbox=NULL; + +studio::AutoRecover *studio::App::auto_recover=NULL; + +studio::IPC *ipc=NULL; + +studio::DockManager* studio::App::dock_manager=0; + +studio::DeviceTracker* studio::App::device_tracker=0; + +studio::Dialog_Gradient* studio::App::dialog_gradient; + +studio::Dialog_Color* studio::App::dialog_color; + +Gtk::InputDialog* studio::App::dialog_input; + +studio::Dialog_ToolOptions* studio::App::dialog_tool_options; + +studio::Dock_History* dock_history; +studio::Dock_Canvases* dock_canvases; +studio::Dock_Keyframes* dock_keyframes; +studio::Dock_Layers* dock_layers; +studio::Dock_Params* dock_params; +studio::Dock_MetaData* dock_meta_data; +studio::Dock_Children* dock_children; +studio::Dock_Info* dock_info; +studio::Dock_LayerGroups* dock_layer_groups; +studio::Dock_Navigator* dock_navigator; +studio::Dock_Timetrack* dock_timetrack; +studio::Dock_Curves* dock_curves; + +std::list< etl::handle< studio::Module > > module_list_; + +bool studio::App::use_colorspace_gamma=true; +#ifdef SINGLE_THREADED +bool studio::App::single_threaded=false; +#endif +bool studio::App::restrict_radius_ducks=false; +bool studio::App::resize_imported_images=false; +String studio::App::custom_filename_prefix(DEFAULT_FILENAME_PREFIX); +int studio::App::preferred_x_size=480; +int studio::App::preferred_y_size=270; +String studio::App::predefined_size(DEFAULT_PREDEFINED_SIZE); +String studio::App::predefined_fps(DEFAULT_PREDEFINED_FPS); +float studio::App::preferred_fps=24.0; +#ifdef USE_OPEN_FOR_URLS +String studio::App::browser_command("open"); // MacOS only +#else +String studio::App::browser_command("xdg-open"); // Linux XDG standard +#endif + +static int max_recent_files_=25; +int studio::App::get_max_recent_files() { return max_recent_files_; } +void studio::App::set_max_recent_files(int x) { max_recent_files_=x; } + +static synfig::String app_base_path_; + +namespace studio { + +bool +really_delete_widget(Gtk::Widget *widget) +{ + // synfig::info("really delete %p", (void*)widget); + delete widget; + return false; +} + +// nasty workaround - when we've finished with a popup menu, we want to delete it +// attaching to the signal_hide() signal gets us here before the action on the menu has run, +// so schedule the real delete to happen in 50ms, giving the action a chance to run +void +delete_widget(Gtk::Widget *widget) +{ + // synfig::info("delete %p", (void*)widget); + Glib::signal_timeout().connect(sigc::bind(sigc::ptr_fun(&really_delete_widget), widget), 50); +} + +}; // END of namespace studio +studio::StateManager* state_manager; + + + + +class GlobalUIInterface : public synfigapp::UIInterface +{ +public: + + virtual Response confirmation(const std::string &title, + const std::string &primaryText, + const std::string &secondaryText, + const std::string &confirmPhrase, + const std::string &cancelPhrase, + Response defaultResponse) + { + Gtk::MessageDialog dialog( + primaryText, // Message + false, // Markup + Gtk::MESSAGE_WARNING, // Type + Gtk::BUTTONS_NONE, // Buttons + true // Modal + ); + + if (! title.empty()) + dialog.set_title(title); + if (! secondaryText.empty()) + dialog.set_secondary_text(secondaryText); + + dialog.add_button(cancelPhrase, RESPONSE_CANCEL); + dialog.add_button(confirmPhrase, RESPONSE_OK); + dialog.set_default_response(defaultResponse); + + dialog.show_all(); + return (Response) dialog.run(); + } + + virtual Response yes_no(const std::string &title, const std::string &message,Response dflt=RESPONSE_YES) + { + Gtk::Dialog dialog( + title, // Title + true, // Modal + true // use_separator + ); + Gtk::Label label(message); + label.show(); + + dialog.get_vbox()->pack_start(label); + dialog.add_button(Gtk::StockID("gtk-yes"),RESPONSE_YES); + dialog.add_button(Gtk::StockID("gtk-no"),RESPONSE_NO); + + dialog.set_default_response(dflt); + dialog.show(); + return (Response)dialog.run(); + } + virtual Response yes_no_cancel(const std::string &title, const std::string &message,Response dflt=RESPONSE_YES) + { + Gtk::Dialog dialog( + title, // Title + true, // Modal + true // use_separator + ); + Gtk::Label label(message); + label.show(); + + dialog.get_vbox()->pack_start(label); + dialog.add_button(Gtk::StockID("gtk-yes"),RESPONSE_YES); + dialog.add_button(Gtk::StockID("gtk-no"),RESPONSE_NO); + dialog.add_button(Gtk::StockID("gtk-cancel"),RESPONSE_CANCEL); + + dialog.set_default_response(dflt); + dialog.show(); + return (Response)dialog.run(); + } + virtual Response ok_cancel(const std::string &title, const std::string &message,Response dflt=RESPONSE_OK) + { + Gtk::Dialog dialog( + title, // Title + true, // Modal + true // use_separator + ); + Gtk::Label label(message); + label.show(); + + dialog.get_vbox()->pack_start(label); + dialog.add_button(Gtk::StockID("gtk-ok"),RESPONSE_OK); + dialog.add_button(Gtk::StockID("gtk-cancel"),RESPONSE_CANCEL); + + dialog.set_default_response(dflt); + dialog.show(); + return (Response)dialog.run(); + } + + virtual bool + task(const std::string &task) + { + std::cerr<& action_group, int pos) +{ + action_group_list.push_back(action_group); + Gtk::UIManager::insert_action_group(action_group, pos); +} + +void +studio::UIManager::remove_action_group (const Glib::RefPtr& action_group) +{ + std::list >::iterator iter; + for(iter=action_group_list.begin();iter!=action_group_list.end();++iter) + if(*iter==action_group) + { + action_group_list.erase(iter); + Gtk::UIManager::remove_action_group(action_group); + return; + } + synfig::error("Unable to find action group"); +} + +void +studio::add_action_group_to_top(Glib::RefPtr ui_manager, Glib::RefPtr group) +{ + ui_manager->insert_action_group(group,0); + return; + std::list > prev_groups(ui_manager->get_action_groups()); + std::list >::reverse_iterator iter; + + for(iter=prev_groups.rbegin();iter!=prev_groups.rend();++iter) + { + if(*iter && (*iter)->get_name()!="menus") + { + synfig::info("Removing action group "+(*iter)->get_name()); + ui_manager->remove_action_group(*iter); + } + } + ui_manager->insert_action_group(group,0); + + for(;!prev_groups.empty();prev_groups.pop_front()) + { + if(prev_groups.front() && prev_groups.front()!=group && prev_groups.front()->get_name()!="menus") + ui_manager->insert_action_group(prev_groups.front(),1); + } +} +*/ +class Preferences : public synfigapp::Settings +{ +public: + virtual bool get_value(const synfig::String& key, synfig::String& value)const + { + if(key=="gamma") + { + value=strprintf("%f %f %f %f", + App::gamma.get_gamma_r(), + App::gamma.get_gamma_g(), + App::gamma.get_gamma_b(), + App::gamma.get_black_level() + ); + return true; + } + if(key=="time_format") + { + value=strprintf("%i",App::get_time_format()); + return true; + } + if(key=="file_history.size") + { + value=strprintf("%i",App::get_max_recent_files()); + return true; + } + if(key=="use_colorspace_gamma") + { + value=strprintf("%i",(int)App::use_colorspace_gamma); + return true; + } + if(key=="distance_system") + { + value=strprintf("%s",Distance::system_name(App::distance_system).c_str()); + return true; + } +#ifdef SINGLE_THREADED + if(key=="single_threaded") + { + value=strprintf("%i",(int)App::single_threaded); + return true; + } +#endif + if(key=="auto_recover_backup_interval") + { + value=strprintf("%i",App::auto_recover->get_timeout()); + return true; + } + if(key=="restrict_radius_ducks") + { + value=strprintf("%i",(int)App::restrict_radius_ducks); + return true; + } + if(key=="resize_imported_images") + { + value=strprintf("%i",(int)App::resize_imported_images); + return true; + } + if(key=="browser_command") + { + value=App::browser_command; + return true; + } + if(key=="custom_filename_prefix") + { + value=App::custom_filename_prefix; + return true; + } + if(key=="preferred_x_size") + { + value=strprintf("%i",App::preferred_x_size); + return true; + } + if(key=="preferred_y_size") + { + value=strprintf("%i",App::preferred_y_size); + return true; + } + if(key=="predefined_size") + { + value=strprintf("%s",App::predefined_size.c_str()); + return true; + } + if(key=="preferred_fps") + { + value=strprintf("%f",App::preferred_fps); + return true; + } + if(key=="predefined_fps") + { + value=strprintf("%s",App::predefined_fps.c_str()); + return true; + } + + return synfigapp::Settings::get_value(key,value); + } + + virtual bool set_value(const synfig::String& key,const synfig::String& value) + { + if(key=="gamma") + { + float r,g,b,blk; + + strscanf(value,"%f %f %f %f", + &r, + &g, + &b, + &blk + ); + + App::gamma.set_all(r,g,b,blk); + + return true; + } + if(key=="time_format") + { + int i(atoi(value.c_str())); + App::set_time_format(static_cast(i)); + return true; + } + if(key=="auto_recover_backup_interval") + { + int i(atoi(value.c_str())); + App::auto_recover->set_timeout(i); + return true; + } + if(key=="file_history.size") + { + int i(atoi(value.c_str())); + App::set_max_recent_files(i); + return true; + } + if(key=="use_colorspace_gamma") + { + int i(atoi(value.c_str())); + App::use_colorspace_gamma=i; + return true; + } + if(key=="distance_system") + { + App::distance_system=Distance::ident_system(value);; + return true; + } +#ifdef SINGLE_THREADED + if(key=="single_threaded") + { + int i(atoi(value.c_str())); + App::single_threaded=i; + return true; + } +#endif + if(key=="restrict_radius_ducks") + { + int i(atoi(value.c_str())); + App::restrict_radius_ducks=i; + return true; + } + if(key=="resize_imported_images") + { + int i(atoi(value.c_str())); + App::resize_imported_images=i; + return true; + } + if(key=="browser_command") + { + App::browser_command=value; + return true; + } + if(key=="custom_filename_prefix") + { + App::custom_filename_prefix=value; + return true; + } + if(key=="preferred_x_size") + { + int i(atoi(value.c_str())); + App::preferred_x_size=i; + return true; + } + if(key=="preferred_y_size") + { + int i(atoi(value.c_str())); + App::preferred_y_size=i; + return true; + } + if(key=="predefined_size") + { + App::predefined_size=value; + return true; + } + if(key=="preferred_fps") + { + float i(atof(value.c_str())); + App::preferred_fps=i; + return true; + } + if(key=="predefined_fps") + { + App::predefined_fps=value; + return true; + } + + return synfigapp::Settings::set_value(key,value); + } + + virtual KeyList get_key_list()const + { + KeyList ret(synfigapp::Settings::get_key_list()); + ret.push_back("gamma"); + ret.push_back("time_format"); + ret.push_back("distance_system"); + ret.push_back("file_history.size"); + ret.push_back("use_colorspace_gamma"); +#ifdef SINGLE_THREADED + ret.push_back("single_threaded"); +#endif + ret.push_back("auto_recover_backup_interval"); + ret.push_back("restrict_radius_ducks"); + ret.push_back("resize_imported_images"); + ret.push_back("browser_command"); + ret.push_back("custom_filename_prefix"); + ret.push_back("preferred_x_size"); + ret.push_back("preferred_y_size"); + ret.push_back("predefined_size"); + ret.push_back("preferred_fps"); + ret.push_back("predefined_fps"); + return ret; + } +}; + +static ::Preferences _preferences; + +void +init_ui_manager() +{ + Glib::RefPtr menus_action_group = Gtk::ActionGroup::create("menus"); + + Glib::RefPtr toolbox_action_group = Gtk::ActionGroup::create("toolbox"); + + Glib::RefPtr actions_action_group = Gtk::ActionGroup::create(); + + menus_action_group->add( Gtk::Action::create("menu-file", _("_File")) ); + menus_action_group->add( Gtk::Action::create("menu-edit", _("_Edit")) ); + menus_action_group->add( Gtk::Action::create("menu-view", _("_View")) ); + menus_action_group->add( Gtk::Action::create("menu-canvas", _("_Canvas")) ); + menus_action_group->add( Gtk::Action::create("menu-layer", _("_Layer")) ); + menus_action_group->add( Gtk::Action::create("menu-duck-mask", _("Show/Hide Ducks")) ); + menus_action_group->add( Gtk::Action::create("menu-preview-quality", _("Preview Quality")) ); + menus_action_group->add( Gtk::Action::create("menu-lowres-pixel", _("Low-Res Pixel Size")) ); + menus_action_group->add( Gtk::Action::create("menu-layer-new", _("New Layer")) ); + menus_action_group->add( Gtk::Action::create("menu-keyframe", _("Keyframe")) ); + menus_action_group->add( Gtk::Action::create("menu-group", _("Group")) ); + menus_action_group->add( Gtk::Action::create("menu-state", _("Tool")) ); + menus_action_group->add( Gtk::Action::create("menu-toolbox", _("Toolbox")) ); + + // Add the synfigapp actions... + synfigapp::Action::Book::iterator iter; + for(iter=synfigapp::Action::book().begin();iter!=synfigapp::Action::book().end();++iter) + { + actions_action_group->add(Gtk::Action::create( + "action-"+iter->second.name, + get_action_stock_id(iter->second), + iter->second.local_name,iter->second.local_name + )); + } + +#define DEFINE_ACTION(x,stock) { Glib::RefPtr action( Gtk::Action::create(x, stock) ); /*action->set_sensitive(false);*/ actions_action_group->add(action); } +#define DEFINE_ACTION2(x,stock,label) { Glib::RefPtr action( Gtk::Action::create(x, stock,label,label) ); /*action->set_sensitive(false);*/ actions_action_group->add(action); } +#define DEFINE_ACTION_SIG(group,x,stock,sig) { Glib::RefPtr action( Gtk::Action::create(x, stock) ); /*action->set_sensitive(false);*/ group->add(action,sig); } + + DEFINE_ACTION2("keyframe-properties", Gtk::StockID("gtk-properties"), _("Keyframe Properties")); + DEFINE_ACTION("about", Gtk::StockID("synfig-about")); + DEFINE_ACTION("new", Gtk::Stock::NEW); + DEFINE_ACTION("open", Gtk::Stock::OPEN); + DEFINE_ACTION("save", Gtk::Stock::SAVE); + DEFINE_ACTION("save-as", Gtk::Stock::SAVE_AS); + DEFINE_ACTION("revert", Gtk::Stock::REVERT_TO_SAVED); + DEFINE_ACTION("cvs-add", Gtk::StockID("synfig-cvs_add")); + DEFINE_ACTION("cvs-update", Gtk::StockID("synfig-cvs_update")); + DEFINE_ACTION("cvs-commit", Gtk::StockID("synfig-cvs_commit")); + DEFINE_ACTION("cvs-revert", Gtk::StockID("synfig-cvs_revert")); + DEFINE_ACTION("import", _("Import")); + DEFINE_ACTION("render", _("Render")); + DEFINE_ACTION("preview", _("Preview")); + DEFINE_ACTION("dialog-flipbook", _("Preview Dialog")); + DEFINE_ACTION("sound", _("Sound File")); + DEFINE_ACTION("options", _("Options")); + DEFINE_ACTION("close", _("Close View")); + DEFINE_ACTION("close-document", _("Close Document")); + DEFINE_ACTION("quit", Gtk::Stock::QUIT); + + + DEFINE_ACTION("undo", Gtk::StockID("gtk-undo")); + DEFINE_ACTION("redo", Gtk::StockID("gtk-redo")); + DEFINE_ACTION("cut", Gtk::StockID("gtk-cut")); + DEFINE_ACTION("copy", Gtk::StockID("gtk-copy")); + DEFINE_ACTION("paste", Gtk::StockID("gtk-paste")); + DEFINE_ACTION("select-all-ducks", _("Select All Ducks")); + DEFINE_ACTION("unselect-all-ducks", _("Unselect All Ducks")); + DEFINE_ACTION("select-all-layers", _("Select All Layers")); + DEFINE_ACTION("unselect-all-layers", _("Unselect All Layers")); + DEFINE_ACTION("properties", _("Properties")); + + DEFINE_ACTION("mask-position-ducks", _("Show Position Ducks")); + DEFINE_ACTION("mask-vertex-ducks", _("Show Vertex Ducks")); + DEFINE_ACTION("mask-tangent-ducks", _("Show Tangent Ducks")); + DEFINE_ACTION("mask-radius-ducks", _("Show Radius Ducks")); + DEFINE_ACTION("mask-width-ducks", _("Show Width Ducks")); + DEFINE_ACTION("mask-angle-ducks", _("Show Angle Ducks")); + DEFINE_ACTION("quality-00", _("Use Parametric Renderer")); + DEFINE_ACTION("quality-01", _("Use Quality Level 1")); + DEFINE_ACTION("quality-02", _("Use Quality Level 2")); + DEFINE_ACTION("quality-03", _("Use Quality Level 3")); + DEFINE_ACTION("quality-04", _("Use Quality Level 4")); + DEFINE_ACTION("quality-05", _("Use Quality Level 5")); + DEFINE_ACTION("quality-06", _("Use Quality Level 6")); + DEFINE_ACTION("quality-07", _("Use Quality Level 7")); + DEFINE_ACTION("quality-08", _("Use Quality Level 8")); + DEFINE_ACTION("quality-09", _("Use Quality Level 9")); + DEFINE_ACTION("quality-10", _("Use Quality Level 10")); + for(list::iterator iter = CanvasView::get_pixel_sizes().begin(); iter != CanvasView::get_pixel_sizes().end(); iter++) + DEFINE_ACTION(strprintf("lowres-pixel-%d", *iter), strprintf(_("Set Low-Res pixel size to %d"), *iter)); + DEFINE_ACTION("play", _("Play")); + // DEFINE_ACTION("pause", _("Pause")); + DEFINE_ACTION("stop", _("Stop")); + DEFINE_ACTION("toggle-grid-show", _("Toggle Grid Show")); + DEFINE_ACTION("toggle-grid-snap", _("Toggle Grid Snap")); + DEFINE_ACTION("toggle-guide-show", _("Toggle Guide Show")); + DEFINE_ACTION("toggle-low-res", _("Toggle Low-Res")); + DEFINE_ACTION("decrease-low-res-pixel-size", _("Decrease Low-Res Pixel Size")); + DEFINE_ACTION("increase-low-res-pixel-size", _("Increase Low-Res Pixel Size")); + DEFINE_ACTION("toggle-onion-skin", _("Toggle Onion Skin")); + DEFINE_ACTION("canvas-zoom-in", Gtk::StockID("gtk-zoom-in")); + DEFINE_ACTION("canvas-zoom-out", Gtk::StockID("gtk-zoom-out")); + DEFINE_ACTION("canvas-zoom-fit", Gtk::StockID("gtk-zoom-fit")); + DEFINE_ACTION("canvas-zoom-100", Gtk::StockID("gtk-zoom-100")); + DEFINE_ACTION("time-zoom-in", Gtk::StockID("gtk-zoom-in")); + DEFINE_ACTION("time-zoom-out", Gtk::StockID("gtk-zoom-out")); + DEFINE_ACTION("jump-next-keyframe", _("Jump to Next Keyframe")); + DEFINE_ACTION("jump-prev-keyframe", _("Jump to Prev Keyframe")); + DEFINE_ACTION("seek-next-frame", _("Next Frame")); + DEFINE_ACTION("seek-prev-frame", _("Prev Frame")); + DEFINE_ACTION("seek-next-second", _("Seek Forward")); + DEFINE_ACTION("seek-prev-second", _("Seek Backward")); + DEFINE_ACTION("seek-begin", _("Seek to Begin")); + DEFINE_ACTION("seek-end", _("Seek to End")); + + DEFINE_ACTION("action-group_add", _("Add group")); + + DEFINE_ACTION("canvas-new", _("New Canvas")); + + DEFINE_ACTION("amount-inc", _("Increase Amount")); + DEFINE_ACTION("amount-dec", _("Decrease Amount")); + +#undef DEFINE_ACTION + + +// Set up synfigapp actions + /*{ + synfigapp::Action::Book::iterator iter; + + for(iter=synfigapp::Action::book().begin();iter!=synfigapp::Action::book().end();++iter) + { + Gtk::StockID stock_id; + + if(!(iter->second.category&synfigapp::Action::CATEGORY_HIDDEN)) + { + //Gtk::Image* image(manage(new Gtk::Image())); + if(iter->second.task=="raise") stock_id=Gtk::Stock::GO_UP; + else if(iter->second.task=="lower") stock_id=Gtk::Stock::GO_DOWN; + else if(iter->second.task=="move_top") stock_id=Gtk::Stock::GOTO_TOP; + else if(iter->second.task=="move_bottom") stock_id=Gtk::Stock::GOTO_BOTTOM; + else if(iter->second.task=="remove") stock_id=Gtk::Stock::DELETE; + else if(iter->second.task=="set_on") stock_id=Gtk::Stock::YES; + else if(iter->second.task=="set_off") stock_id=Gtk::Stock::NO; + //else if(iter->second.task=="duplicate") stock_id=Gtk::Stock::COPY; + else if(iter->second.task=="remove") stock_id=Gtk::Stock::DELETE; + else stock_id=Gtk::StockID("synfig-"+iter->second.task); + + actions_action_group->add(Gtk::Action::create( + "action-"+iter->second.name, + stock_id, + iter->second.local_name,iter->second.local_name + )); + } + } + } +*/ + + + Glib::ustring ui_info = +"" +" " +"